����JFIFXX�����    $.' ",#(7),01444'9=82<.342  2!!22222222222222222222222222222222222222222222222222����"��4�� ���,�PG"Z_�4�˷����kjز�Z�,F+��_z�,�© �����zh6�٨�ic�fu���#ډb���_�N�?��wQ���5-�~�I���8����TK<5o�Iv-�����k�_U_�����~b�M��d����Ӝ�U�Hh��?]��E�w��Q���k�{��_}qFW7HTՑ��Y��F�?_�'ϔ��_�Ջt��=||I ��6�έ"�����D���/[�k�9���Y�8ds|\���Ҿp6�Ҵ���]��.����6�z<�v��@]�i%��$j��~�g��J>��no����pM[me�i$[����s�o�ᘨ�˸ nɜG-�ĨU�ycP�3.DB�li�;��hj���x7Z^�N�h������N3u{�:j�x�힞��#M&��jL P@_���� P��&��o8������9�����@Sz6�t7#O�ߋ �s}Yf�T���lmr����Z)'N��k�۞p����w\�Tȯ?�8`�O��i{wﭹW�[�r�� ��Q4F�׊���3m&L�=��h3����z~��#�\�l :�F,j@�� ʱ�wQT����8�"kJO���6�֚l����}���R�>ډK���]��y����&����p�}b��;N�1�m�r$�|��7�>e�@B�TM*-iH��g�D�)� E�m�|�ؘbҗ�a��Ҿ����t4���o���G��*oCN�rP���Q��@z,|?W[0�����:�n,jWiE��W��$~/�hp\��?��{(�0���+�Y8rΟ�+����>S-S����VN;�}�s?.����� w�9��˟<���Mq4�Wv'��{)0�1mB��V����W[�����8�/<� �%���wT^�5���b��)iM� pg�N�&ݝ��VO~�q���u���9� ����!��J27����$O-���! �:�%H��� ـ����y�ΠM=t{!S�� oK8������t<����è:a������[�����ա�H���~��w��Qz`�po�^ ����Q��n� �,uu�C�$ ^���,������8�#��:�6��e�|~���!�3�3.�\0��q��o�4`.|� ����y�Q�`~;�d�ׯ,��O�Zw�������`73�v�܋�<���Ȏ�� ـ4k��5�K�a�u�=9Yd��$>x�A�&�� j0� ���vF��� Y�|�y��� ~�6�@c��1vOp�Ig����4��l�OD���L����� R���c���j�_�uX6��3?nk��Wy�f;^*B� ��@�~a�`��Eu������+���6�L��.ü>��}y���}_�O�6�͐�:�YrG�X��kG�����l^w���~㒶sy��Iu�!� W ��X��N�7BV��O��!X�2����wvG�R�f�T#�����t�/?���%8�^�W�aT��G�cL�M���I��(J����1~�8�?aT ���]����AS�E��(��*E}� 2��#I/�׍qz��^t�̔���b�Yz4x���t�){ OH��+(E��A&�N�������XT��o��"�XC��'���)}�J�z�p� ��~5�}�^����+�6����w��c��Q�|Lp�d�H��}�(�.|����k��c4^�"�����Z?ȕ ��a<�L�!039C� �Eu�C�F�Ew�ç ;�n?�*o���B�8�bʝ���'#Rqf���M}7����]����s2tcS{�\icTx;�\��7K���P���ʇ Z O-��~��c>"��?�������P��E��O�8��@�8��G��Q�g�a�Վ���󁶠�䧘��_%#r�>�1�z�a��eb��qcPѵ��n���#L��� =��׀t� L�7�`��V���A{�C:�g���e@�w1 Xp3�c3�ġ����p��M"'-�@n4���fG��B3�DJ�8[Jo�ߐ���gK)ƛ��$���� ���8�3�����+���� �����6�ʻ���� ���S�kI�*KZlT _`���?��K����QK�d����B`�s}�>���`��*�>��,*@J�d�oF*����弝��O}�k��s��]��y�ߘ��c1G�V���<=�7��7����6�q�PT��tXԀ�!9*4�4Tހ3XΛex�46���Y��D ����� �BdemDa����\�_l,��G�/���֌7���Y�](�xTt^%�GE�����4�}bT���ڹ�����;Y)���B�Q��u��>J/J �⮶.�XԄ��j�ݳ�+E��d ��r�5�_D�1 ��o�� �B�x�΢�#���<��W�����8���R6�@g�M�.��� dr�D��>(otU��@x=��~v���2� ӣ�d�oBd��3�eO�6�㣷�����ݜ6��6Y��Qz`��S��{���\P�~z m5{J/L��1������<�e�ͅPu�b�]�ϔ���'������f�b� Zpw��c`"��i���BD@:)ִ�:�]��hv�E�w���T�l��P���"Ju�}��وV J��G6��. J/�Qgl߭�e�����@�z�Zev2u�)]կ�����7x���s�M�-<ɯ�c��r�v�����@��$�ޮ}lk���a���'����>x��O\�ZFu>�����ck#��&:��`�$�ai�>2Δ����l���oF[h��lE�ܺ�Πk:)���`�� $[6�����9�����kOw�\|���8}������ބ:��񶐕��I�A1/�=�2[�,�!��.}gN#�u����b��� ~��݊��}34q����d�E��Lc��$��"�[q�U�硬g^��%B �z���r�pJ�ru%v\h1Y�ne`ǥ:g���pQM~�^�Xi� ��`S�:V29.�P���V�?B�k�� AEvw%�_�9C�Q����wKekPؠ�\�;Io d�{ ߞo�c1eP����\� `����E=���@K<�Y���eڼ�J���w����{av�F�'�M�@/J��+9p���|]�����Iw &`��8���&M�hg��[�{��Xj��%��Ӓ�$��(����ʹN���<>�I���RY���K2�NPlL�ɀ)��&e����B+ь����( � �JTx���_?EZ� }@ 6�U���뙢ط�z��dWI�n` D����噥�[��uV��"�G&Ú����2g�}&m��?ċ�"����Om#��������� ��{�ON��"S�X��Ne��ysQ���@Fn��Vg���dX�~nj�]J�<�K]:��FW��b�������62�=��5f����JKw��bf�X�55��~J �%^����:�-�QIE��P��v�nZum� z � ~ə ���� ���ة����;�f��\v���g�8�1��f24;�V���ǔ�)����9���1\��c��v�/'Ƞ�w�������$�4�R-��t���� e�6�/�ġ �̕Ecy�J���u�B���<�W�ַ~�w[B1L۲�-JS΂�{���΃������A��20�c#��@ 0!1@AP"#2Q`$3V�%45a6�FRUq��� ����^7ׅ,$n�������+��F�`��2X'��0vM��p�L=������5��8������u�p~���.�`r�����\���O��,ư�0oS ��_�M�����l���4�kv\JSd���x���SW�<��Ae�IX����������$I���w�:S���y���›R��9�Q[���,�5�;�@]�%���u�@ *ro�lbI �� ��+���%m:�͇ZV�����u�̉����θau<�fc�.����{�4Ա� �Q����*�Sm��8\ujqs]{kN���)qO�y�_*dJ�b�7���yQqI&9�ԌK!�M}�R�;������S�T���1���i[U�ɵz�]��U)V�S6���3$K{�ߊ<�(� E]Զ[ǼENg�����'�\?#)Dkf��J���o��v���'�%ƞ�&K�u�!��b�35LX�Ϸ��63$K�a�;�9>,R��W��3�3� d�JeTYE.Mϧ��-�o�j3+y��y^�c�������VO�9NV\nd�1 ��!͕_)a�v;����թ�M�lWR1��)El��P;��yوÏ�u 3�k�5Pr6<�⒲l�!˞*��u־�n�!�l:����UNW ��%��Chx8vL'��X�@��*��)���̮��ˍ��� ���D-M�+J�U�kvK����+�x8��cY������?�Ԡ��~3mo��|�u@[XeY�C�\Kp�x8�oC�C�&����N�~3-H���� ��MX�s�u<`���~"WL��$8ξ��3���a�)|:@�m�\���^�`�@ҷ)�5p+��6���p�%i)P M���ngc�����#0Aruz���RL+xSS?���ʮ}()#�t��mˇ!��0}}y����<�e� �-ή�Ԩ��X������ MF���ԙ~l L.3���}�V뽺�v�����멬��Nl�)�2����^�Iq��a��M��qG��T�����c3#������3U�Ǎ���}��לS�|qa��ڃ�+���-��2�f����/��bz��ڐ�� �ݼ[2�ç����k�X�2�* �Z�d���J�G����M*9W���s{��w���T��x��y,�in�O�v��]���n����P�$�JB@=4�OTI�n��e�22a\����q�d���%�$��(���:���: /*�K[PR�fr\nڙdN���F�n�$�4�[�� U�zƶ����� �mʋ���,�ao�u 3�z� �x��Kn����\[��VFmbE;�_U��&V�Gg�]L�۪&#n%�$ɯ�dG���D�TI=�%+AB�Ru#��b4�1�»x�cs�YzڙJG��f��Il��d�eF'T� iA��T���uC�$����Y��H?����[!G`}���ͪ� �纤Hv\������j�Ex�K���!���OiƸ�Yj�+u-<���'q����uN�*�r\��+�]���<�wOZ.fp�ێ��,-*)V?j-kÊ#�`�r��dV����(�ݽBk�����G�ƛk�QmUڗe��Z���f}|����8�8��a���i��3'J�����~G_�^���d�8w������ R�`(�~�.��u���l�s+g�bv���W���lGc}��u���afE~1�Ue������Z�0�8�=e�� f@/�jqEKQQ�J��oN��J���W5~M>$6�Lt�;$ʳ{���^��6�{����v6���ķܰg�V�cnn �~z�x�«�,2�u�?cE+Ș�H؎�%�Za�)���X>uW�Tz�Nyo����s���FQƤ��$��*�&�LLXL)�1�" L��eO��ɟ�9=���:t��Z���c��Ž���Y?�ӭV�wv�~,Y��r�ۗ�|�y��GaF�����C�����.�+� ���v1���fήJ�����]�S��T��B��n5sW}y�$��~z�'�c ��8 ��� ,! �p��VN�S��N�N�q��y8z˱�A��4��*��'������2n<�s���^ǧ˭P�Jޮɏ�U�G�L�J�*#��<�V��t7�8����TĜ>��i}K%,���)[��z�21z ?�N�i�n1?T�I�R#��m-�����������������1����lA�`��fT5+��ܐ�c�q՝��ʐ��,���3�f2U�եmab��#ŠdQ�y>\��)�SLY����w#��.���ʑ�f��� ,"+�w�~�N�'�c�O�3F�������N<���)j��&��,-� �љ���֊�_�zS���TǦ����w�>��?�������n��U仆�V���e�����0���$�C�d���rP �m�׈e�Xm�Vu� �L��.�bֹ��� �[Դaզ���*��\y�8�Է:�Ez\�0�Kq�C b��̘��cө���Q��=0Y��s�N��S.���3.���O�o:���#���v7�[#߫ ��5�܎�L���Er4���9n��COWlG�^��0k�%<���ZB���aB_���������'=��{i�v�l�$�uC���mƎҝ{�c㱼�y]���W�i ��ߧc��m�H� m�"�"�����;Y�ߝ�Z�Ǔ�����:S#��|}�y�,/k�Ld� TA�(�AI$+I3��;Y*���Z��}|��ӧO��d�v��..#:n��f>�>���ȶI�TX��� 8��y����"d�R�|�)0���=���n4��6ⲑ�+��r<�O�܂~zh�z����7ܓ�HH�Ga롏���nCo�>������a ���~]���R���̲c?�6(�q�;5%� |�uj�~z8R=X��I�V=�|{v�Gj\gc��q����z�؋%M�ߍ����1y��#��@f^���^�>N�����#x#۹��6�Y~�?�dfPO��{��P�4��V��u1E1J �*|���%���JN��`eWu�zk M6���q t[�� ��g�G���v��WIG��u_ft����5�j�"�Y�:T��ɐ���*�;� e5���4����q$C��2d�}���� _S�L#m�Yp��O�.�C�;��c����Hi#֩%+) �Ӎ��ƲV���SYź��g |���tj��3�8���r|���V��1#;.SQ�A[���S������#���`n�+���$��$I �P\[�@�s��(�ED�z���P��])8�G#��0B��[ى��X�II�q<��9�~[Z멜�Z�⊔IWU&A>�P~�#��dp<�?����7���c��'~���5 ��+$���lx@�M�dm��n<=e�dyX��?{�|Aef ,|n3�<~z�ƃ�uۧ�����P��Y,�ӥQ�*g�#먙R�\���;T��i,��[9Qi歉����c>]9�� ��"�c��P�� �Md?٥��If�ت�u��k��/����F��9�c*9��Ǎ:�ØF���z�n*�@|I�ށ9����N3{'��[�'ͬ�Ҳ4��#}��!�V� Fu��,�,mTIk���v C�7v���B�6k�T9��1�*l� '~��ƞF��lU��'�M ����][ΩũJ_�{�i�I�n��$���L�� j��O�dx�����kza۪��#�E��Cl����x˘�o�����V���ɞ�ljr��)�/,�߬h�L��#��^��L�ф�,íMƁe�̩�NB�L�����iL����q�}��(��q��6IçJ$�W�E$��:������=#����(�K�B����zђ <��K(�N�۫K�w��^O{!����)�H���>x�������lx�?>Պ�+�>�W���,Ly!_�D���Ō�l���Q�!�[ �S����J��1��Ɛ�Y}��b,+�Lo�x�ɓ)����=�y�oh�@�꥟/��I��ѭ=��P�y9��� �ۍYӘ�e+�p�Jnϱ?V\SO%�(�t� ���=?MR�[Ș�����d�/ ��n�l��B�7j� ��!�;ӥ�/�[-���A�>�dN�sLj ��,ɪv��=1c�.SQ�O3�U���ƀ�ܽ�E����������̻��9G�ϷD�7(�}��Ävӌ\�y�_0[w ���<΍>����a_��[0+�L��F.�޺��f�>oN�T����q;���y\��bՃ��y�jH�<|q-eɏ�_?_9+P���Hp$�����[ux�K w�Mw��N�ی'$Y2�=��q���KB��P��~������Yul:�[<����F1�2�O���5=d����]Y�sw:���Ϯ���E��j,_Q��X��z`H1,#II ��d�wr��P˂@�ZJV����y$�\y�{}��^~���[:N����ߌ�U�������O��d�����ؾe��${p>G��3c���Ė�lʌ�� ת��[��`ϱ�-W����dg�I��ig2��� ��}s ��ؤ(%#sS@���~���3�X�nRG�~\jc3�v��ӍL��M[JB�T��s3}��j�Nʖ��W����;7��ç?=X�F=-�=����q�ߚ���#���='�c��7���ڑW�I(O+=:uxq�������������e2�zi+�kuG�R��������0�&e�n���iT^J����~\jy���p'dtG��s����O��3����9* �b#Ɋ�� p������[Bws�T�>d4�ۧs���nv�n���U���_�~,�v����ƜJ1��s�� �QIz��)�(lv8M���U=�;����56��G���s#�K���MP�=��LvyGd��}�VwWBF�'�à �?MH�U�g2�� ����!�p�7Q��j��ڴ����=��j�u��� Jn�A s���uM������e��Ɔ�Ҕ�!)'��8Ϣ�ٔ��ޝ(��Vp���צ֖d=�IC�J�Ǡ{q������kԭ�߸���i��@K����u�|�p=..�*+����x�����z[Aqġ#s2a�Ɗ���RR�)*HRsi�~�a &f��M��P����-K�L@��Z��Xy�'x�{}��Zm+���:�)�) IJ�-i�u���� ���ܒH��'�L(7�y�GӜq���� j��� 6ߌg1�g�o���,kر���tY�?W,���p���e���f�OQS��!K�۟cҒA�|ս�j�>��=⬒��˧L[�� �߿2JaB~R��u�:��Q�] �0H~���]�7��Ƽ�I���(}��cq '�ήET���q�?f�ab���ӥvr� �)o��-Q��_'����ᴎo��K������;��V���o��%���~OK ����*��b�f:���-ťIR��`B�5!RB@���ï�� �u �̯e\�_U�_������� g�ES��3�������QT��a����x����U<~�c?�*�#]�MW,[8O�a�x��]�1bC|踤�P��lw5V%�)�{t�<��d��5���0i�XSU��m:��Z�┵�i�"��1�^B�-��P�hJ��&)O��*�D��c�W��vM��)����}���P��ܗ-q����\mmζZ-l@�}��a��E�6��F�@��&Sg@���ݚ�M����� ȹ 4����#p�\H����dYDo�H���"��\��..R�B�H�z_�/5˘����6��KhJR��P�mƶi�m���3�,#c�co��q�a)*Pt����R�m�k�7x�D�E�\Y�閣_X�<���~�)���c[[�BP����6�Yq���S��0����%_����;��Àv�~�| VS؇ ��'O0��F0��\���U�-�d@�����7�SJ*z��3n��y��P����O���������m�~�P�3|Y��ʉr#�C�<�G~�.,! ���bqx���h~0=��!ǫ�jy����l�O,�[B��~��|9��ٱ����Xly�#�i�B��g%�S��������tˋ���e���ې��\[d�t)��.+u�|1 ������#�~Oj����hS�%��i.�~X���I�H�m��0n���c�1uE�q��cF�RF�o���7� �O�ꮧ� ���ۛ{��ʛi5�rw?׌#Qn�TW��~?y$��m\�\o����%W� ?=>S�N@�� �Ʈ���R����N�)�r"C�:��:����� �����#��qb��Y�. �6[��2K����2u�Ǧ�HYR��Q�MV��� �G�$��Q+.>�����nNH��q�^��� ����q��mM��V��D�+�-�#*�U�̒ ���p욳��u:�������IB���m���PV@O���r[b= �� ��1U�E��_Nm�yKbN�O���U�}�the�`�|6֮P>�\2�P�V���I�D�i�P�O;�9�r�mAHG�W�S]��J*�_�G��+kP�2����Ka�Z���H�'K�x�W�MZ%�O�YD�Rc+o��?�q��Ghm��d�S�oh�\�D�|:W������UA�Qc yT�q������~^�H��/��#p�CZ���T�I�1�ӏT����4��"�ČZ�����}��`w�#�*,ʹ�� ��0�i��課�Om�*�da��^gJ݅{���l�e9uF#T�ֲ��̲�ٞC"�q���ߍ ոޑ�o#�XZTp����@ o�8��(jd��xw�]�,f���`~�|,s��^����f�1���t��|��m�򸄭/ctr��5s��7�9Q�4�H1꠲BB@l9@���C�����+�wp�xu�£Yc�9��?`@#�o�mH�s2��)�=��2�.�l����jg�9$�Y�S�%*L������R�Y������7Z���,*=�䷘$�������arm�o�ϰ���UW.|�r�uf����IGw�t����Zwo��~5 ��YյhO+=8fF�)�W�7�L9lM�̘·Y���֘YLf�큹�pRF���99.A �"wz��=E\Z���'a� 2��Ǚ�#;�'}�G���*��l��^"q��+2FQ� hj��kŦ��${���ޮ-�T�٭cf�|�3#~�RJ����t��$b�(R��(����r���dx� >U b�&9,>���%E\� Ά�e�$��'�q't��*�א���ެ�b��-|d���SB�O�O��$�R+�H�)�܎�K��1m`;�J�2�Y~9��O�g8=vqD`K[�F)k�[���1m޼c��n���]s�k�z$@��)!I �x՝"v��9=�ZA=`Ɠi �:�E��)`7��vI��}d�YI�_ �o�:ob���o ���3Q��&D&�2=�� �Ά��;>�h����y.*ⅥS������Ӭ�+q&����j|UƧ����}���J0��WW< ۋS�)jQR�j���Ư��rN)�Gű�4Ѷ(�S)Ǣ�8��i��W52���No˓� ۍ%�5brOn�L�;�n��\G����=�^U�dI���8$�&���h��'���+�(������cȁ߫k�l��S^���cƗjԌE�ꭔ��gF���Ȓ��@���}O���*;e�v�WV���YJ\�]X'5��ղ�k�F��b 6R�o՜m��i N�i����>J����?��lPm�U��}>_Z&�KK��q�r��I�D�Չ~�q�3fL�:S�e>���E���-G���{L�6p�e,8��������QI��h��a�Xa��U�A'���ʂ���s�+טIjP�-��y�8ۈZ?J$��W�P� ��R�s�]��|�l(�ԓ��sƊi��o(��S0��Y� 8�T97.�����WiL��c�~�dxc�E|�2!�X�K�Ƙਫ਼�$((�6�~|d9u+�qd�^3�89��Y�6L�.I�����?���iI�q���9�)O/뚅����O���X��X�V��ZF[�یgQ�L��K1���RҖr@v�#��X�l��F���Нy�S�8�7�kF!A��sM���^rkp�jP�DyS$N���q��nxҍ!U�f�!eh�i�2�m���`�Y�I�9r�6� �TF���C}/�y�^���Η���5d�'��9A-��J��>{�_l+�`��A���[�'��յ�ϛ#w:݅�%��X�}�&�PSt�Q�"�-��\縵�/����$Ɨh�Xb�*�y��BS����;W�ջ_mc�����vt?2}1�;qS�d�d~u:2k5�2�R�~�z+|HE!)�Ǟl��7`��0�<�,�2*���Hl-��x�^����'_TV�gZA�'j� ^�2Ϊ��N7t�����?w�� �x1��f��Iz�C-Ȗ��K�^q�;���-W�DvT�7��8�Z�������� hK�(P:��Q- �8�n�Z���܃e貾�<�1�YT<�,�����"�6{/ �?�͟��|1�:�#g��W�>$����d��J��d�B��=��jf[��%rE^��il:��B���x���Sּ�1հ��,�=��*�7 fcG��#q� �eh?��2�7�����,�!7x��6�n�LC�4x��},Geǝ�tC.��vS �F�43��zz\��;QYC,6����~;RYS/6���|2���5���v��T��i����������mlv��������&� �nRh^ejR�LG�f���? �ۉҬܦƩ��|��Ȱ����>3����!v��i�ʯ�>�v��オ�X3e���_1z�Kȗ\<������!�8���V��]��?b�k41�Re��T�q��mz��TiOʦ�Z��Xq���L������q"+���2ۨ��8}�&N7XU7Ap�d�X��~�׿��&4e�o�F��� �H����O���č�c�� 懴�6���͉��+)��v;j��ݷ�� �UV�� i��� j���Y9GdÒJ1��詞�����V?h��l����l�cGs�ځ�������y�Ac�����\V3�? �� ܙg�>qH�S,�E�W�[�㺨�uch�⍸�O�}���a��>�q�6�n6����N6�q������N ! 1AQaq�0@����"2BRb�#Pr���3C`��Scst���$4D���%Td�� ?���N����a��3��m���C���w��������xA�m�q�m���m������$����4n淿t'��C"w��zU=D�\R+w�p+Y�T�&�պ@��ƃ��3ޯ?�Aﶂ��aŘ���@-�����Q�=���9D��ռ�ѻ@��M�V��P��܅�G5�f�Y<�u=,EC)�<�Fy'�"�&�չ�X~f��l�KԆV��?�� �W�N����=(� �;���{�r����ٌ�Y���h{�١������jW����P���Tc�����X�K�r��}���w�R��%��?���E��m�� �Y�q|����\lEE4���r���}�lsI�Y������f�$�=�d�yO����p�����yBj8jU�o�/�S��?�U��*������ˍ�0������u�q�m [�?f����a�� )Q�>����6#������� ?����0UQ����,IX���(6ڵ[�DI�MNލ�c&���υ�j\��X�R|,4��� j������T�hA�e��^���d���b<����n�� �즇�=!���3�^�`j�h�ȓr��jẕ�c�,ٞX����-����a�ﶔ���#�$��]w�O��Ӫ�1y%��L�Y<�wg#�ǝ�̗`�x�xa�t�w��»1���o7o5��>�m뭛C���Uƃߜ}�C���y1Xνm�F8�jI���]����H���ۺиE@I�i;r�8ӭ����V�F�Շ| ��&?�3|x�B�MuS�Ge�=Ӕ�#BE5G�����Y!z��_e��q�р/W>|-�Ci߇�t�1ޯќd�R3�u��g�=0 5��[?�#͏��q�cf���H��{ ?u�=?�?ǯ���}Z��z���hmΔ�BFTW�����<�q�(v� ��!��z���iW]*�J�V�z��gX֧A�q�&��/w���u�gYӘa���; �i=����g:��?2�dž6�ى�k�4�>�Pxs����}������G�9��3 ���)gG�R<>r h�$��'nc�h�P��Bj��J�ҧH� -��N1���N��?��~��}-q!=��_2hc�M��l�vY%UE�@|�v����M2�.Y[|y�"Eï��K�ZF,�ɯ?,q�?v�M 80jx�"�;�9vk�����+ ֧�� �ȺU��?�%�vcV��mA�6��Qg^M����A}�3�nl� QRN�l8�kkn�'�����(��M�7m9و�q���%ޟ���*h$Zk"��$�9��: �?U8�Sl��,,|ɒ��xH(ѷ����Gn�/Q�4�P��G�%��Ա8�N��!� �&�7�;���eKM7�4��9R/%����l�c>�x;������>��C�:�����t��h?aKX�bhe�ᜋ^�$�Iհ �hr7%F$�E��Fd���t��5���+�(M6�t����Ü�UU|zW�=a�Ts�Tg������dqP�Q����b'�m���1{|Y����X�N��b �P~��F^F:����k6�"�j!�� �I�r�`��1&�-$�Bevk:y���#yw��I0��x��=D�4��tU���P�ZH��ڠ底taP��6����b>�xa����Q�#� WeF��ŮNj�p�J* mQ�N����*I�-*�ȩ�F�g�3 �5��V�ʊ�ɮ�a��5F���O@{���NX��?����H�]3��1�Ri_u��������ѕ�� ����0��� F��~��:60�p�͈�S��qX#a�5>���`�o&+�<2�D����: �������ڝ�$�nP���*)�N�|y�Ej�F�5ټ�e���ihy�Z �>���k�bH�a�v��h�-#���!�Po=@k̆IEN��@��}Ll?j�O������߭�ʞ���Q|A07x���wt!xf���I2?Z��<ץ�T���cU�j��]��陎Ltl �}5�ϓ��$�,��O�mˊ�;�@O��jE��j(�ا,��LX���LO���Ц�90�O �.����a��nA���7������j4 ��W��_ٓ���zW�jcB������y՗+EM�)d���N�g6�y1_x��p�$Lv:��9�"z��p���ʙ$��^��JԼ*�ϭ����o���=x�Lj�6�J��u82�A�H�3$�ٕ@�=Vv�]�'�qEz�;I˼��)��=��ɯ���x �/�W(V���p�����$ �m�������u�����񶤑Oqˎ�T����r��㠚x�sr�GC��byp�G��1ߠ�w e�8�$⿄����/�M{*}��W�]˷.�CK\�ުx���/$�WPw���r� |i���&�}�{�X� �>��$-��l���?-z���g����lΆ���(F���h�vS*���b���߲ڡn,|)mrH[���a�3�ר�[1��3o_�U�3�TC�$��(�=�)0�kgP���� ��u�^=��4 �WYCҸ:��vQ�ר�X�à��tk�m,�t*��^�,�}D*� �"(�I��9R����>`�`��[~Q]�#af��i6l��8���6�:,s�s�N6�j"�A4���IuQ��6E,�GnH��zS�HO�uk�5$�I�4��ؤ�Q9�@��C����wp�BGv[]�u�Ov���0I4���\��y�����Q�Ѹ��~>Z��8�T��a��q�ޣ;z��a���/��S��I:�ܫ_�|������>=Z����8:�S��U�I�J��"IY���8%b8���H��:�QO�6�;7�I�S��J��ҌAά3��>c���E+&jf$eC+�z�;��V����� �r���ʺ������my�e���aQ�f&��6�ND��.:��NT�vm�<- u���ǝ\MvZY�N�NT��-A�>jr!S��n�O 1�3�Ns�%�3D@���`������ܟ 1�^c<���� �a�ɽ�̲�Xë#�w�|y�cW�=�9I*H8�p�^(4���՗�k��arOcW�tO�\�ƍR��8����'�K���I�Q�����?5�>[�}��yU�ײ -h��=��% q�ThG�2�)���"ו3]�!kB��*p�FDl�A���,�eEi�H�f�Ps�����5�H:�Փ~�H�0Dت�D�I����h�F3�������c��2���E��9�H��5�zԑ�ʚ�i�X�=:m�xg�hd(�v����׊�9iS��O��d@0ڽ���:�p�5�h-��t�&���X�q�ӕ,��ie�|���7A�2���O%P��E��htj��Y1��w�Ѓ!����  ���� ࢽ��My�7�\�a�@�ţ�J �4�Ȼ�F�@o�̒?4�wx��)��]�P��~�����u�����5�����7X ��9��^ܩ�U;Iꭆ 5 �������eK2�7(�{|��Y׎ �V��\"���Z�1� Z�����}��(�Ǝ"�1S���_�vE30>���p;� ΝD��%x�W�?W?v����o�^V�i�d��r[��/&>�~`�9Wh��y�;���R��� ;;ɮT��?����r$�g1�K����A��C��c��K��l:�'��3 c�ﳯ*"t8�~l��)���m��+U,z��`(�>yJ�?����h>��]��v��ЍG*�{`��;y]��I�T� ;c��NU�fo¾h���/$���|NS���1�S�"�H��V���T���4��uhǜ�]�v;���5�͠x��'C\�SBpl���h}�N����� A�Bx���%��ޭ�l��/����T��w�ʽ]D�=����K���ž�r㻠l4�S�O?=�k �M:� ��c�C�a�#ha���)�ѐxc�s���gP�iG��{+���x���Q���I= �� z��ԫ+ �8"�k�ñ�j=|����c ��y��CF��/��*9ж�h{ �?4�o� ��k�m�Q�N�x��;�Y��4膚�a�w?�6�>e]�����Q�r�:����g�,i"�����ԩA�*M�<�G��b�if��l^M��5� �Ҩ�{����6J��ZJ�����P�*�����Y���ݛu�_4�9�I8�7���������,^ToR���m4�H��?�N�S�ѕw��/S��甍�@�9H�S�T��t�ƻ���ʒU��*{Xs�@����f�����֒Li�K{H�w^���������Ϥm�tq���s� ���ք��f:��o~s��g�r��ט� �S�ѱC�e]�x���a��) ���(b-$(�j>�7q�B?ӕ�F��hV25r[7 Y� }L�R��}����*sg+��x�r�2�U=�*'WS��ZDW]�WǞ�<��叓���{�$�9Ou4��y�90-�1�'*D`�c�^o?(�9��u���ݐ��'PI&� f�Jݮ�������:wS����jfP1F:X �H�9dԯ���˝[�_54 �}*;@�ܨ�� ð�yn�T���?�ןd�#���4rG�ͨ��H�1�|-#���Mr�S3��G�3�����)�.᧏3v�z֑��r����$G"�`j �1t��x0<Ɔ�Wh6�y�6��,œ�Ga��gA����y��b��)��h�D��ß�_�m��ü �gG;��e�v��ݝ�nQ� ��C����-�*��o���y�a��M��I�>�<���]obD��"�:���G�A��-\%LT�8���c�)��+y76���o�Q�#*{�(F�⽕�y����=���rW�\p���۩�c���A���^e6��K������ʐ�cVf5$�'->���ՉN"���F�"�UQ@�f��Gb~��#�&�M=��8�ט�JNu9��D��[̤�s�o�~������ G��9T�tW^g5y$b��Y'��س�Ǵ�=��U-2 #�MC�t(�i� �lj�@Q 5�̣i�*�O����s�x�K�f��}\��M{E�V�{�υ��Ƈ�����);�H����I��fe�Lȣr�2��>��W�I�Ȃ6������i��k�� �5�YOxȺ����>��Y�f5'��|��H+��98pj�n�.O�y�������jY��~��i�w'������l�;�s�2��Y��:'lg�ꥴ)o#'Sa�a�K��Z� �m��}�`169�n���"���x��I ��*+� }F<��cГ���F�P�������ֹ*�PqX�x۩��,� ��N�� �4<-����%����:��7����W���u�`����� $�?�I��&����o��o��`v�>��P��"��l���4��5'�Z�gE���8���?��[�X�7(��.Q�-��*���ތL@̲����v��.5���[��=�t\+�CNܛ��,g�SQnH����}*F�G16���&:�t��4ُ"A��̣��$�b �|����#rs��a�����T�� ]�<�j��BS�('$�ɻ� �wP;�/�n��?�ݜ��x�F��yUn�~mL*-�������Xf�wd^�a�}��f�,=t�׵i�.2/wpN�Ep8�OР���•��R�FJ� 55TZ��T �ɭ�<��]��/�0�r�@�f��V��V����Nz�G��^���7hZi����k��3�,kN�e|�vg�1{9]_i��X5y7� 8e]�U����'�-2,���e"����]ot�I��Y_��n�(JҼ��1�O ]bXc���Nu�No��pS���Q_���_�?i�~�x h5d'�(qw52] ��'ޤ�q��o1�R!���`ywy�A4u���h<קy���\[~�4�\ X�Wt/� 6�����n�F�a8��f���z �3$�t(���q��q�x��^�XWeN'p<-v�!�{�(>ӽDP7��ո0�y)�e$ٕv�Ih'Q�EA�m*�H��RI��=:��� ���4牢) �%_iN�ݧ�l]� �Nt���G��H�L��� ɱ�g<���1V�,�J~�ٹ�"K��Q�� 9�HS�9�?@��k����r�;we݁�]I�!{ �@�G�[�"��`���J:�n]�{�cA�E����V��ʆ���#��U9�6����j�#Y�m\��q�e4h�B�7��C�������d<�?J����1g:ٳ���=Y���D�p�ц� ׈ǔ��1�]26؜oS�'��9�V�FVu�P�h�9�xc�oq�X��p�o�5��Ա5$�9W�V(�[Ak�aY錎qf;�'�[�|���b�6�Ck��)��#a#a˙��8���=äh�4��2��C��4tm^ �n'c���]GQ$[Wҿ��i���vN�{Fu ��1�gx��1┷���N�m��{j-,��x�� Ūm�ЧS�[�s���Gna���䑴�� x�p 8<������97�Q���ϴ�v�aϚG��Rt�Һ׈�f^\r��WH�JU�7Z���y)�vg=����n��4�_)y��D'y�6�]�c�5̪�\� �PF�k����&�c;��cq�$~T�7j ���nç]�<�g ":�to�t}�159�<�/�8������m�b�K#g'I'.W�����6��I/��>v��\�MN��g���m�A�yQL�4u�Lj�j9��#44�t��l^�}L����n��R��!��t��±]��r��h6ٍ>�yҏ�N��fU�� ���� Fm@�8}�/u��jb9������he:A�y�ծw��GpΧh�5����l}�3p468��)U��d��c����;Us/�֔�YX�1�O2��uq�s��`hwg�r~�{ R��mhN��؎*q 42�*th��>�#���E����#��Hv�O����q�}�����6�e��\�,Wk�#���X��b>��p}�դ��3���T5��†��6��[��@�P�y*n��|'f�֧>�lư΂�̺����SU�'*�q�p�_S�����M�� '��c�6�����m�� ySʨ;M��r���Ƌ�m�Kxo,���Gm�P��A�G�:��i��w�9�}M(�^�V��$ǒ�ѽ�9���|���� �a����J�SQ�a���r�B;����}���ٻ֢�2�%U���c�#�g���N�a�ݕ�'�v�[�OY'��3L�3�;,p�]@�S��{ls��X�'���c�jw�k'a�.��}�}&�� �dP�*�bK=ɍ!����;3n�gΊU�ߴmt�'*{,=SzfD� A��ko~�G�aoq�_mi}#�m�������P�Xhύ����mxǍ�΂���巿zf��Q���c���|kc�����?���W��Y�$���_Lv����l߶��c���`?����l�j�ݲˏ!V��6����U�Ђ(A���4y)H���p�Z_�x��>���e��R��$�/�`^'3qˏ�-&Q�=?��CFVR �D�fV�9��{�8g�������n�h�(P"��6�[�D���< E�����~0<@�`�G�6����Hг�cc�� �c�K.5��D��d�B���`?�XQ��2��ٿyqo&+�1^� DW�0�ꊩ���G�#��Q�nL3��c���������/��x ��1�1[y�x�პCW��C�c�UĨ80�m�e�4.{�m��u���I=��f�����0QRls9���f���������9���~f�����Ǩ��a�"@�8���ȁ�Q����#c�ic������G��$���G���r/$W�(��W���V�"��m�7�[m�A�m����bo��D� j����۳� l���^�k�h׽����� ��#� iXn�v��eT�k�a�^Y�4�BN��ĕ��0 !01@Q"2AaPq3BR������?���@4�Q�����T3,���㺠�W�[=JK�Ϟ���2�r^7��vc�:�9 �E�ߴ�w�S#d���Ix��u��:��Hp��9E!�� V 2;73|F��9Y���*ʬ�F��D����u&���y؟��^EA��A��(ɩ���^��GV:ݜDy�`��Jr29ܾ�㝉��[���E;Fzx��YG��U�e�Y�C���� ����v-tx����I�sם�Ę�q��Eb�+P\ :>�i�C'�;�����k|z�رn�y]�#ǿb��Q��������w�����(�r|ӹs��[�D��2v-%��@;�8<a���[\o[ϧw��I!��*0�krs)�[�J9^��ʜ��p1)� "��/_>��o��<1����A�E�y^�C��`�x1'ܣn�p��s`l���fQ��):�l����b>�Me�jH^?�kl3(�z:���1ŠK&?Q�~�{�ٺ�h�y���/�[��V�|6��}�KbX����mn[-��7�5q�94�������dm���c^���h� X��5��<�eޘ>G���-�}�دB�ޟ� ��|�rt�M��V+�]�c?�-#ڛ��^ǂ}���Lkr���O��u�>�-D�ry� D?:ޞ�U��ǜ�7�V��?瓮�"�#���r��չģVR;�n���/_� ؉v�ݶe5d�b9��/O��009�G���5n�W����JpA�*�r9�>�1��.[t���s�F���nQ� V 77R�]�ɫ8����_0<՜�IF�u(v��4��F�k�3��E)��N:��yڮe��P�`�1}�$WS��J�SQ�N�j�ٺ��޵�#l���ј(�5=��5�lǏmoW�v-�1����v,W�mn��߀$x�<����v�j(����c]��@#��1������Ǔ���o'��u+����;G�#�޸��v-lη��/(`i⣍Pm^���ԯ̾9Z��F��������n��1��� ��]�[��)�'������:�֪�W��FC����� �B9،!?���]��V��A�Վ�M��b�w��G F>_DȬ0¤�#�QR�[V��kz���m�w�"��9ZG�7'[��=�Q����j8R?�zf�\a�=��O�U����*oB�A�|G���2�54 �p��.w7� �� ��&������ξxGHp� B%��$g�����t�Џ򤵍z���HN�u�Я�-�'4��0��;_��3 !01"@AQa2Pq#3BR������?��ʩca��en��^��8���<�u#��m*08r��y�N"�<�Ѳ0��@\�p��� �����Kv�D��J8�Fҽ� �f�Y��-m�ybX�NP����}�!*8t(�OqѢ��Q�wW�K��ZD��Δ^e��!� ��B�K��p~�����e*l}z#9ң�k���q#�Ft�o��S�R����-�w�!�S���Ӥß|M�l޶V��!eˈ�8Y���c�ЮM2��tk���� ������J�fS����Ö*i/2�����n]�k�\���|4yX�8��U�P.���Ы[���l��@"�t�<������5�lF���vU�����W��W��;�b�cД^6[#7@vU�xgZv��F�6��Q,K�v��� �+Ъ��n��Ǣ��Ft���8��0��c�@�!�Zq s�v�t�;#](B��-�nῃ~���3g������5�J�%���O������n�kB�ĺ�.r��+���#�N$?�q�/�s�6��p��a����a��J/��M�8��6�ܰ"�*������ɗud"\w���aT(����[��F��U՛����RT�b���n�*��6���O��SJ�.�ij<�v�MT��R\c��5l�sZB>F��<7�;EA��{��E���Ö��1U/�#��d1�a�n.1ě����0�ʾR�h��|�R��Ao�3�m3 ��%�� ���28Q� ��y��φ���H�To�7�lW>����#i`�q���c����a��� �m,B�-j����݋�'mR1Ήt�>��V��p���s�0IbI�C.���1R�ea�����]H�6����������4B>��o��](��$B���m�����a�!=��?�B� K�Ǿ+�Ծ"�n���K��*��+��[T#�{E�J�S����Q�����s�5�:�U�\wĐ�f�3����܆&�)����I���Ԇw��E T�lrTf6Q|R�h:��[K�� �z��c֧�G�C��%\��_�a�84��HcO�bi��ؖV��7H �)*ģK~Xhչ0��4?�0��� �E<���}3���#���u�?�� ��|g�S�6ꊤ�|�I#Hڛ� �ա��w�X��9��7���Ŀ%�SL��y6č��|�F�a 8���b��$�sק�h���b9RAu7�˨p�Č�_\*w��묦��F ����4D~�f����|(�"m���NK��i�S�>�$d7SlA��/�²����SL��|6N�}���S�˯���g��]6��; �#�.��<���q'Q�1|KQ$�����񛩶"�$r�b:���N8�w@��8$�� �AjfG|~�9F ���Y��ʺ��Bwؒ������M:I岎�G��`s�YV5����6��A �b:�W���G�q%l�����F��H���7�������Fsv7��k�� 403WebShell
403Webshell
Server IP : 213.165.242.4  /  Your IP : 216.73.216.50
Web Server : Apache
System : Linux amsngx344.inmotionhosting.com 4.18.0-553.40.1.lve.el8.x86_64 #1 SMP Wed Feb 12 18:54:57 UTC 2025 x86_64
User : aquafi9 ( 1305)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /home/aquafi9/public_html/wp-content/plugins/pathomation/scripts/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/aquafi9/public_html/wp-content/plugins/pathomation/scripts/builder-bundle.min.js
!function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="/",n(n.s=249)}([function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.boundingExtent=function(t){for(var e=l(),n=0,r=t.length;n<r;++n)h(e,t[n]);return e},e.buffer=function(t,e,n){return n?(n[0]=t[0]-e,n[1]=t[1]-e,n[2]=t[2]+e,n[3]=t[3]+e,n):[t[0]-e,t[1]-e,t[2]+e,t[3]+e]},e.clone=function(t,e){return e?(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e):t.slice()},e.closestSquaredDistanceXY=function(t,e,n){var r,i;r=e<t[0]?t[0]-e:t[2]<e?e-t[2]:0;i=n<t[1]?t[1]-n:t[3]<n?n-t[3]:0;return r*r+i*i},e.containsCoordinate=function(t,e){return a(t,e[0],e[1])},e.containsExtent=function(t,e){return t[0]<=e[0]&&e[2]<=t[2]&&t[1]<=e[1]&&e[3]<=t[3]},e.containsXY=a,e.coordinateRelationship=s,e.createEmpty=l,e.createOrUpdate=u,e.createOrUpdateEmpty=c,e.createOrUpdateFromCoordinate=function(t,e){var n=t[0],r=t[1];return u(n,r,n,r,e)},e.createOrUpdateFromCoordinates=function(t,e){return p(c(e),t)},e.createOrUpdateFromFlatCoordinates=function(t,e,n,r,i){return f(c(i),t,e,n,r)},e.createOrUpdateFromRings=function(t,e){return d(c(e),t)},e.equals=function(t,e){return t[0]==e[0]&&t[2]==e[2]&&t[1]==e[1]&&t[3]==e[3]},e.approximatelyEquals=function(t,e,n){return Math.abs(t[0]-e[0])<n&&Math.abs(t[2]-e[2])<n&&Math.abs(t[1]-e[1])<n&&Math.abs(t[3]-e[3])<n},e.extend=function(t,e){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]);return t},e.extendCoordinate=h,e.extendCoordinates=p,e.extendFlatCoordinates=f,e.extendRings=d,e.extendXY=g,e.forEachCorner=function(t,e){var n;if(n=e(m(t)))return n;if(n=e(v(t)))return n;if(n=e(x(t)))return n;if(n=e(O(t)))return n;return!1},e.getArea=y,e.getBottomLeft=m,e.getBottomRight=v,e.getCenter=_,e.getCorner=function(t,e){var n;e===r.a.BOTTOM_LEFT?n=m(t):e===r.a.BOTTOM_RIGHT?n=v(t):e===r.a.TOP_LEFT?n=O(t):e===r.a.TOP_RIGHT?n=x(t):Object(o.a)(!1,13);return n},e.getEnlargedArea=function(t,e){var n=Math.min(t[0],e[0]),r=Math.min(t[1],e[1]),i=Math.max(t[2],e[2]),o=Math.max(t[3],e[3]);return(i-n)*(o-r)},e.getForViewAndSize=function(t,e,n,r,i){var o=e*r[0]/2,a=e*r[1]/2,s=Math.cos(n),l=Math.sin(n),c=o*s,h=o*l,p=a*s,f=a*l,d=t[0],g=t[1],y=d-c+f,m=d-c-f,v=d+c-f,_=d+c+f,b=g-h-p,w=g-h+p,O=g+h+p,x=g+h-p;return u(Math.min(y,m,v,_),Math.min(b,w,O,x),Math.max(y,m,v,_),Math.max(b,w,O,x),i)},e.getHeight=b,e.getIntersectionArea=function(t,e){return y(w(t,e))},e.getIntersection=w,e.getMargin=function(t){return E(t)+b(t)},e.getSize=function(t){return[t[2]-t[0],t[3]-t[1]]},e.getTopLeft=O,e.getTopRight=x,e.getWidth=E,e.intersects=S,e.isEmpty=C,e.returnOrUpdate=function(t,e){return e?(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e):t},e.scaleFromCenter=function(t,e){var n=(t[2]-t[0])/2*(e-1),r=(t[3]-t[1])/2*(e-1);t[0]-=n,t[2]+=n,t[1]-=r,t[3]+=r},e.intersectsSegment=function(t,e,n){var r=!1,o=s(t,e),a=s(t,n);if(o===i.a.INTERSECTING||a===i.a.INTERSECTING)r=!0;else{var l=t[0],u=t[1],c=t[2],h=t[3],p=e[0],f=e[1],d=n[0],g=n[1],y=(g-f)/(d-p),m=void 0,v=void 0;a&i.a.ABOVE&&!(o&i.a.ABOVE)&&(r=(m=d-(g-h)/y)>=l&&m<=c),r||!(a&i.a.RIGHT)||o&i.a.RIGHT||(r=(v=g-(d-c)*y)>=u&&v<=h),r||!(a&i.a.BELOW)||o&i.a.BELOW||(r=(m=d-(g-u)/y)>=l&&m<=c),r||!(a&i.a.LEFT)||o&i.a.LEFT||(r=(v=g-(d-l)*y)>=u&&v<=h)}return r},e.applyTransform=function(t,e,n,r){var i=[];if(r>1)for(var o=t[2]-t[0],a=t[3]-t[1],s=0;s<r;++s)i.push(t[0]+o*s/r,t[1],t[2],t[1]+a*s/r,t[2]-o*s/r,t[3],t[0],t[3]-a*s/r);else i=[t[0],t[1],t[2],t[1],t[2],t[3],t[0],t[3]];e(i,i,2);for(var l=[],c=[],s=0,h=i.length;s<h;s+=2)l.push(i[s]),c.push(i[s+1]);return function(t,e,n){var r=Math.min.apply(null,t),i=Math.min.apply(null,e),o=Math.max.apply(null,t),a=Math.max.apply(null,e);return u(r,i,o,a,n)}(l,c,n)},e.wrapX=function(t,e){var n=e.getExtent(),r=_(t);if(e.canWrapX()&&(r[0]<n[0]||r[0]>=n[2])){var i=E(n),o=Math.floor((r[0]-n[0])/i),a=o*i;t[0]-=a,t[2]-=a}return t};var r=n(174),i=n(175),o=n(4);function a(t,e,n){return t[0]<=e&&e<=t[2]&&t[1]<=n&&n<=t[3]}function s(t,e){var n=t[0],r=t[1],o=t[2],a=t[3],s=e[0],l=e[1],u=i.a.UNKNOWN;return s<n?u|=i.a.LEFT:s>o&&(u|=i.a.RIGHT),l<r?u|=i.a.BELOW:l>a&&(u|=i.a.ABOVE),u===i.a.UNKNOWN&&(u=i.a.INTERSECTING),u}function l(){return[1/0,1/0,-1/0,-1/0]}function u(t,e,n,r,i){return i?(i[0]=t,i[1]=e,i[2]=n,i[3]=r,i):[t,e,n,r]}function c(t){return u(1/0,1/0,-1/0,-1/0,t)}function h(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 p(t,e){for(var n=0,r=e.length;n<r;++n)h(t,e[n]);return t}function f(t,e,n,r,i){for(;n<r;n+=i)g(t,e[n],e[n+1]);return t}function d(t,e){for(var n=0,r=e.length;n<r;++n)p(t,e[n]);return t}function g(t,e,n){t[0]=Math.min(t[0],e),t[1]=Math.min(t[1],n),t[2]=Math.max(t[2],e),t[3]=Math.max(t[3],n)}function y(t){var e=0;return C(t)||(e=E(t)*b(t)),e}function m(t){return[t[0],t[1]]}function v(t){return[t[2],t[1]]}function _(t){return[(t[0]+t[2])/2,(t[1]+t[3])/2]}function b(t){return t[3]-t[1]}function w(t,e,n){var r=n||[1/0,1/0,-1/0,-1/0];return S(t,e)?(t[0]>e[0]?r[0]=t[0]:r[0]=e[0],t[1]>e[1]?r[1]=t[1]:r[1]=e[1],t[2]<e[2]?r[2]=t[2]:r[2]=e[2],t[3]<e[3]?r[3]=t[3]:r[3]=e[3]):c(r),r}function O(t){return[t[0],t[3]]}function x(t){return[t[2],t[3]]}function E(t){return t[2]-t[0]}function S(t,e){return t[0]<=e[2]&&t[2]>=e[0]&&t[1]<=e[3]&&t[3]>=e[1]}function C(t){return t[2]<t[0]||t[3]<t[1]}},function(t,e,n){"use strict";n.d(e,"a",function(){return r}),e.b=function(t){for(var e in t)delete t[e]},n.d(e,"c",function(){return i}),e.d=function(t){var e;for(e in t)return!1;return!e};var r="function"===typeof Object.assign?Object.assign:function(t,e){if(void 0===t||null===t)throw new TypeError("Cannot convert undefined or null to object");for(var n=Object(t),r=1,i=arguments.length;r<i;++r){var o=arguments[r];if(void 0!==o&&null!==o)for(var a in o)o.hasOwnProperty(a)&&(n[a]=o[a])}return n};var i="function"===typeof Object.values?Object.values:function(t){var e=[];for(var n in t)e.push(t[n]);return e}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.cloneTransform=f,e.identityTransform=d,e.addProjection=g,e.addProjections=y,e.get=m,e.getPointResolution=function(t,e,n,r){var o,a=(t=m(t)).getPointResolutionFunc();if(a){if(o=a(e,n),r&&r!==t.getUnits()){var s=t.getMetersPerUnit();s&&(o=o*s/i.a[r])}}else{var l=t.getUnits();if(l==i.b.DEGREES&&!r||r==i.b.DEGREES)o=e;else{var u=w(t,m("EPSG:4326"));if(u===d&&l!==i.b.DEGREES)o=e*t.getMetersPerUnit();else{var c=[n[0]-e/2,n[1],n[0]+e/2,n[1],n[0],n[1]-e/2,n[0],n[1]+e/2];c=u(c,c,2);var p=Object(h.a)(c.slice(0,2),c.slice(2,4)),f=Object(h.a)(c.slice(4,6),c.slice(6,8));o=(p+f)/2}var s=r?i.a[r]:t.getMetersPerUnit();void 0!==s&&(o/=s)}}return o},e.addEquivalentProjections=v,e.addEquivalentTransforms=_,e.clearAllProjections=function(){Object(s.b)(),Object(l.b)()},e.createProjection=function(t,e){return t?"string"===typeof t?m(t):t:m(e)},e.createTransformFromCoordinateTransform=b,e.addCoordinateTransforms=function(t,e,n,r){var i=m(t),o=m(e);Object(l.a)(i,o,b(n)),Object(l.a)(o,i,b(r))},e.fromLonLat=function(t,e){return x(t,"EPSG:4326",void 0!==e?e:"EPSG:3857")},e.toLonLat=function(t,e){var n=x(t,void 0!==e?e:"EPSG:3857","EPSG:4326"),r=n[0];(r<-180||r>180)&&(n[0]=Object(c.e)(r+180,360)-180);return n},e.equivalent=function(t,e){if(t===e)return!0;var n=t.getUnits()===e.getUnits();if(t.getCode()===e.getCode())return n;var r=w(t,e);return r===f&&n},e.getTransformFromProjections=w,e.getTransform=O,e.transform=x,e.transformExtent=E,e.transformWithProjections=function(t,e,n){return w(e,n)(t)},e.setUserProjection=C,e.clearUserProjection=function(){S=null},e.getUserProjection=function(){return S},e.useGeographic=function(){C("EPSG:4326")},e.toUserCoordinate=function(t,e){if(!S)return t;return x(t,e,S)},e.fromUserCoordinate=function(t,e){if(!S)return t;return x(t,S,e)},e.toUserExtent=function(t,e){if(!S)return t;return E(t,e,S)},e.fromUserExtent=function(t,e){if(!S)return t;return E(t,S,e)},e.createSafeCoordinateTransform=function(t,e,n){return function(r){var i,o,a=r[0],s=r[1];if(t.canWrapX()){var l=t.getExtent(),h=Object(u.getWidth)(l);(o=Object(p.g)(r,t,h))&&(a-=o*h),a=Object(c.a)(a,l[0],l[2]),s=Object(c.a)(s,l[1],l[3]),i=n([a,s])}else i=n(r);return o&&e.canWrapX()&&(i[0]+=o*Object(u.getWidth)(e.getExtent())),i}},e.addCommon=T;var r=n(106),i=n(43),o=n(257),a=n(258),s=n(259),l=n(260),u=n(0),c=n(7),h=n(182),p=n(20);function f(t,e,n){var r;if(void 0!==e){for(var i=0,o=t.length;i<o;++i)e[i]=t[i];r=e}else r=t.slice();return r}function d(t,e,n){if(void 0!==e&&t!==e){for(var r=0,i=t.length;r<i;++r)e[r]=t[r];t=e}return t}function g(t){Object(s.a)(t.getCode(),t),Object(l.a)(t,t,f)}function y(t){t.forEach(g)}function m(t){return"string"===typeof t?Object(s.c)(t):t||null}function v(t){y(t),t.forEach(function(e){t.forEach(function(t){e!==t&&Object(l.a)(e,t,f)})})}function _(t,e,n,r){t.forEach(function(t){e.forEach(function(e){Object(l.a)(t,e,n),Object(l.a)(e,t,r)})})}function b(t){return function(e,n,r){for(var i=e.length,o=void 0!==r?r:2,a=void 0!==n?n:new Array(i),s=0;s<i;s+=o){var l=t([e[s],e[s+1]]);a[s]=l[0],a[s+1]=l[1];for(var u=o-1;u>=2;--u)a[s+u]=e[s+u]}return a}}function w(t,e){var n=t.getCode(),r=e.getCode(),i=Object(l.c)(n,r);return i||(i=d),i}function O(t,e){return w(m(t),m(e))}function x(t,e,n){return O(e,n)(t,void 0,t.length)}function E(t,e,n,r){var i=O(e,n);return Object(u.applyTransform)(t,i,void 0,r)}n.d(e,"METERS_PER_UNIT",function(){return i.a}),n.d(e,"Projection",function(){return r.a});var S=null;function C(t){S=m(t)}function T(){v(o.a),v(a.a),_(a.a,o.a,o.b,o.c)}T()},function(t,e,n){"use strict";e.a={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,e,n){"use strict";e.a=function(t,e){if(!t)throw new r.a(e)};var r=n(130)},function(t,e,n){"use strict";function r(t,e){return t>e?1:t<e?-1:0}e.a=function(t,e,n){var i,o,a=n||r,s=0,l=t.length,u=!1;for(;s<l;)(o=+a(t[i=s+(l-s>>1)],e))<0?s=i+1:(l=i,u=!o);return u?s:~s},e.i=r,e.f=function(t,e){return t.indexOf(e)>=0},e.h=function(t,e,n){var r=t.length;if(t[0]<=e)return 0;if(e<=t[r-1])return r-1;var i=void 0;if(n>0){for(i=1;i<r;++i)if(t[i]<e)return i-1}else if(n<0){for(i=1;i<r;++i)if(t[i]<=e)return i}else for(i=1;i<r;++i){if(t[i]==e)return i;if(t[i]<e)return"function"===typeof n?n(e,t[i-1],t[i])>0?i-1:i:t[i-1]-e<e-t[i]?i-1:i}return r-1},e.j=function(t,e,n){for(;e<n;){var r=t[e];t[e]=t[n],t[n]=r,++e,--n}},e.c=function(t,e){for(var n=Array.isArray(e)?e:[e],r=n.length,i=0;i<r;i++)t[t.length]=n[i]},e.d=function(t,e){for(var n,r=t.length>>>0,i=0;i<r;i++)if(n=t[i],e(n,i,t))return n;return null},e.b=function(t,e){var n=t.length;if(n!==e.length)return!1;for(var r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0},e.e=function(t,e){var n;return t.every(function(r,i){return n=i,!e(r,i,t)})?-1:n},e.g=function(t,e,n){var i=e||r;return t.every(function(e,r){if(0===r)return!0;var o=i(t[r-1],e);return!(o>0||n&&0===o)})}},function(t,e,n){"use strict";e.b=function(){return function(){throw new Error("Unimplemented abstract method.")}()},e.c=function(t){return t.ol_uid||(t.ol_uid=String(++r))},n.d(e,"a",function(){return i});var r=0;var i="6.6.1"},function(t,e,n){"use strict";e.a=function(t,e,n){return Math.min(Math.max(t,e),n)},n.d(e,"b",function(){return r}),n.d(e,"d",function(){return i}),e.h=function(t,e,n,r,i,a){var s=i-n,l=a-r;if(0!==s||0!==l){var u=((t-n)*s+(e-r)*l)/(s*s+l*l);u>1?(n=i,r=a):u>0&&(n+=s*u,r+=l*u)}return o(t,e,n,r)},e.g=o,e.f=function(t){for(var e=t.length,n=0;n<e;n++){for(var r=n,i=Math.abs(t[n][n]),o=n+1;o<e;o++){var a=Math.abs(t[o][n]);a>i&&(i=a,r=o)}if(0===i)return null;var s=t[r];t[r]=t[n],t[n]=s;for(var l=n+1;l<e;l++)for(var u=-t[l][n]/t[n][n],c=n;c<e+1;c++)n==c?t[l][c]=0:t[l][c]+=u*t[n][c]}for(var h=new Array(e),p=e-1;p>=0;p--){h[p]=t[p][e]/t[p][p];for(var f=p-1;f>=0;f--)t[f][e]-=t[f][p]*h[p]}return h},e.i=function(t){return 180*t/Math.PI},e.j=function(t){return t*Math.PI/180},e.e=function(t,e){var n=t%e;return n*e<0?n+e:n},e.c=function(t,e,n){return t+n*(e-t)};var r="cosh"in Math?Math.cosh:function(t){var e=Math.exp(t);return(e+1/e)/2},i="log2"in Math?Math.log2:function(t){return Math.log(t)*Math.LOG2E};function o(t,e,n,r){var i=n-t,o=r-e;return i*i+o*o}},function(t,e,n){"use strict";e.a={POINT:"Point",LINE_STRING:"LineString",LINEAR_RING:"LinearRing",POLYGON:"Polygon",MULTI_POINT:"MultiPoint",MULTI_LINE_STRING:"MultiLineString",MULTI_POLYGON:"MultiPolygon",GEOMETRY_COLLECTION:"GeometryCollection",CIRCLE:"Circle"}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.listen=i,e.listenOnce=function(t,e,n,r){return i(t,e,n,r,!0)},e.unlistenByKey=function(t){t&&t.target&&(t.target.removeEventListener(t.type,t.listener),Object(r.b)(t))};var r=n(1);function i(t,e,n,r,i){if(r&&r!==t&&(n=n.bind(r)),i){var o=n;n=function(){t.removeEventListener(e,n),o.apply(this,arguments)}}var a={target:t,type:e,listener:n};return t.addEventListener(e,n),a}},function(t,e,n){"use strict";e.a=function(t,e,n,r){for(var o=n||32,a=[],s=0;s<o;++s)Object(p.c)(a,Object(w.b)(t,e,2*Math.PI*s/o,r));return a.push(a[0],a[1]),new x(a,i.a.XY,[a.length])},e.d=function(t){var e=t[0],n=t[1],r=t[2],o=t[3],a=[e,n,e,o,r,o,r,n,e,n];return new x(a,i.a.XY,[a.length])},e.c=function(t,e,n){for(var r=e||32,i=t.getStride(),o=t.getLayout(),a=t.getCenter(),s=i*(r+1),l=new Array(s),u=0;u<s;u+=i){l[u]=0,l[u+1]=0;for(var c=2;c<i;c++)l[u+c]=a[c]}var h=[l.length],p=new x(l,o,h);return E(p,a,t.getRadius(),n),p},e.e=E;var r,i=n(17),o=n(8),a=n(109),s=n(16),l=n(36),u=n(86),c=n(0),h=n(48),p=n(5),f=n(140),d=n(57),g=n(111),y=n(112),m=n(139),v=n(110),_=n(7),b=n(72),w=n(182),O=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),x=function(t){function e(e,n,r){var i=t.call(this)||this;return i.ends_=[],i.flatInteriorPointRevision_=-1,i.flatInteriorPoint_=null,i.maxDelta_=-1,i.maxDeltaRevision_=-1,i.orientedRevision_=-1,i.orientedFlatCoordinates_=null,void 0!==n&&r?(i.setFlatCoordinates(n,e),i.ends_=r):i.setCoordinates(e,n),i}return O(e,t),e.prototype.appendLinearRing=function(t){this.flatCoordinates?Object(p.c)(this.flatCoordinates,t.getFlatCoordinates()):this.flatCoordinates=t.getFlatCoordinates().slice(),this.ends_.push(this.flatCoordinates.length),this.changed()},e.prototype.clone=function(){var t=new e(this.flatCoordinates.slice(),this.layout,this.ends_.slice());return t.applyProperties(this),t},e.prototype.closestPointXY=function(t,e,n,r){return r<Object(c.closestSquaredDistanceXY)(this.getExtent(),t,e)?r:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(Object(u.a)(this.flatCoordinates,0,this.ends_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),Object(u.b)(this.flatCoordinates,0,this.ends_,this.stride,this.maxDelta_,!0,t,e,n,r))},e.prototype.containsXY=function(t,e){return Object(v.c)(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t,e)},e.prototype.getArea=function(){return Object(m.b)(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride)},e.prototype.getCoordinates=function(t){var e;return void 0!==t?(e=this.getOrientedFlatCoordinates().slice(),Object(y.d)(e,0,this.ends_,this.stride,t)):e=this.flatCoordinates,Object(d.b)(e,0,this.ends_,this.stride)},e.prototype.getEnds=function(){return this.ends_},e.prototype.getFlatInteriorPoint=function(){if(this.flatInteriorPointRevision_!=this.getRevision()){var t=Object(c.getCenter)(this.getExtent());this.flatInteriorPoint_=Object(f.a)(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t,0),this.flatInteriorPointRevision_=this.getRevision()}return this.flatInteriorPoint_},e.prototype.getInteriorPoint=function(){return new s.a(this.getFlatInteriorPoint(),i.a.XYM)},e.prototype.getLinearRingCount=function(){return this.ends_.length},e.prototype.getLinearRing=function(t){return t<0||this.ends_.length<=t?null:new a.a(this.flatCoordinates.slice(0===t?0:this.ends_[t-1],this.ends_[t]),this.layout)},e.prototype.getLinearRings=function(){for(var t=this.layout,e=this.flatCoordinates,n=this.ends_,r=[],i=0,o=0,s=n.length;o<s;++o){var l=n[o],u=new a.a(e.slice(i,l),t);r.push(u),i=l}return r},e.prototype.getOrientedFlatCoordinates=function(){if(this.orientedRevision_!=this.getRevision()){var t=this.flatCoordinates;Object(y.b)(t,0,this.ends_,this.stride)?this.orientedFlatCoordinates_=t:(this.orientedFlatCoordinates_=t.slice(),this.orientedFlatCoordinates_.length=Object(y.d)(this.orientedFlatCoordinates_,0,this.ends_,this.stride)),this.orientedRevision_=this.getRevision()}return this.orientedFlatCoordinates_},e.prototype.getSimplifiedGeometryInternal=function(t){var n=[],r=[];return n.length=Object(b.c)(this.flatCoordinates,0,this.ends_,this.stride,Math.sqrt(t),n,0,r),new e(n,i.a.XY,r)},e.prototype.getType=function(){return o.a.POLYGON},e.prototype.intersectsExtent=function(t){return Object(g.c)(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t)},e.prototype.setCoordinates=function(t,e){this.setLayout(e,t,2),this.flatCoordinates||(this.flatCoordinates=[]);var n=Object(h.c)(this.flatCoordinates,0,t,this.stride,this.ends_);this.flatCoordinates.length=0===n.length?0:n[n.length-1],this.changed()},e}(l.a);function E(t,e,n,r){for(var i=t.getFlatCoordinates(),o=t.getStride(),a=i.length/o-1,s=r||0,l=0;l<=a;++l){var u=l*o,c=s+2*Object(_.e)(l,a)*Math.PI/a;i[u]=e[0]+n*Math.cos(c),i[u+1]=e[1]+n*Math.sin(c)}t.changed()}e.b=x},function(t,e,n){"use strict";e.a=function(t,e,n,i){var o=n&&n.length?n.shift():r.g?new OffscreenCanvas(t||300,e||300):document.createElement("canvas");t&&(o.width=t);e&&(o.height=e);return o.getContext("2d",i)},e.c=function(t){var e=t.offsetWidth,n=getComputedStyle(t);return e+=parseInt(n.marginLeft,10)+parseInt(n.marginRight,10)},e.b=function(t){var e=t.offsetHeight,n=getComputedStyle(t);return e+=parseInt(n.marginTop,10)+parseInt(n.marginBottom,10)},e.g=function(t,e){var n=e.parentNode;n&&n.replaceChild(t,e)},e.e=function(t){return t&&t.parentNode?t.parentNode.removeChild(t):null},e.d=function(t){for(;t.lastChild;)t.removeChild(t.lastChild)},e.f=function(t,e){for(var n=t.childNodes,r=0;;++r){var i=n[r],o=e[r];if(!i&&!o)break;i!==o&&(i?o?t.insertBefore(o,i):(t.removeChild(i),--r):t.appendChild(o))}};var r=n(39)},function(t,e,n){"use strict";e.b=function(t){t.stopPropagation()};var r=function(){function t(t){this.propagationStopped,this.defaultPrevented,this.type=t,this.target=null}return t.prototype.preventDefault=function(){this.defaultPrevented=!0},t.prototype.stopPropagation=function(){this.propagationStopped=!0},t}();e.a=r},function(t,e,n){"use strict";e.b=function(){return!0},e.a=function(){return!1},e.c=function(){},e.d=function(t){var e,n,i,o=!1;return function(){var a=Array.prototype.slice.call(arguments);return o&&this===i&&Object(r.b)(a,n)||(o=!0,i=this,n=a,e=t.apply(this,arguments)),e}};var r=n(5)},function(t,e,n){"use strict";e.c=s,e.g=function(t){return u(t,1,0,0,1,0,0)},e.f=l,e.j=function(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},e.a=function(t,e){var n=e[0],r=e[1];return e[0]=t[0]*n+t[2]*r+t[4],e[1]=t[1]*n+t[3]*r+t[5],e},e.h=function(t,e){var n=Math.cos(e),r=Math.sin(e);return l(t,u(a,n,r,-r,n,0,0))},e.i=function(t,e,n){return l(t,u(a,e,0,0,n,0,0))},e.e=function(t,e,n){return u(t,e,0,0,n,0,0)},e.l=function(t,e,n){return l(t,u(a,1,0,0,1,e,n))},e.b=c,e.d=h,e.k=p;var r,i=n(39),o=n(4),a=new Array(6);function s(){return[1,0,0,1,0,0]}function l(t,e){var n=t[0],r=t[1],i=t[2],o=t[3],a=t[4],s=t[5],l=e[0],u=e[1],c=e[2],h=e[3],p=e[4],f=e[5];return t[0]=n*l+i*u,t[1]=r*l+o*u,t[2]=n*c+i*h,t[3]=r*c+o*h,t[4]=n*p+i*f+a,t[5]=r*p+o*f+s,t}function u(t,e,n,r,i,o,a){return t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=o,t[5]=a,t}function c(t,e,n,r,i,o,a,s){var l=Math.sin(o),u=Math.cos(o);return t[0]=r*u,t[1]=i*l,t[2]=-r*l,t[3]=i*u,t[4]=a*r*u-s*r*l+e,t[5]=a*i*l+s*i*u+n,t}function h(t,e){var n,r=(n=e)[0]*n[3]-n[1]*n[2];Object(o.a)(0!==r,32);var i=e[0],a=e[1],s=e[2],l=e[3],u=e[4],c=e[5];return t[0]=l/r,t[1]=-a/r,t[2]=-s/r,t[3]=i/r,t[4]=(s*c-l*u)/r,t[5]=-(i*c-a*u)/r,t}function p(t){var e="matrix("+t.join(", ")+")";if(i.g)return e;var n=r||(r=document.createElement("div"));return n.style.transform=e,n.style.transform}},function(t,e,n){"use strict";var r,i=n(24),o=n(3),a=n(4),s=n(9),l=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),u=function(t){function e(e){var n=t.call(this)||this;if(n.on,n.once,n.un,n.id_=void 0,n.geometryName_="geometry",n.style_=null,n.styleFunction_=void 0,n.geometryChangeKey_=null,n.addChangeListener(n.geometryName_,n.handleGeometryChanged_),e)if("function"===typeof e.getSimplifiedGeometry){var r=e;n.setGeometry(r)}else{var i=e;n.setProperties(i)}return n}return l(e,t),e.prototype.clone=function(){var t=new e(this.hasProperties()?this.getProperties():null);t.setGeometryName(this.getGeometryName());var n=this.getGeometry();n&&t.setGeometry(n.clone());var r=this.getStyle();return r&&t.setStyle(r),t},e.prototype.getGeometry=function(){return this.get(this.geometryName_)},e.prototype.getId=function(){return this.id_},e.prototype.getGeometryName=function(){return this.geometryName_},e.prototype.getStyle=function(){return this.style_},e.prototype.getStyleFunction=function(){return this.styleFunction_},e.prototype.handleGeometryChange_=function(){this.changed()},e.prototype.handleGeometryChanged_=function(){this.geometryChangeKey_&&(Object(s.unlistenByKey)(this.geometryChangeKey_),this.geometryChangeKey_=null);var t=this.getGeometry();t&&(this.geometryChangeKey_=Object(s.listen)(t,o.a.CHANGE,this.handleGeometryChange_,this)),this.changed()},e.prototype.setGeometry=function(t){this.set(this.geometryName_,t)},e.prototype.setStyle=function(t){this.style_=t,this.styleFunction_=t?function(t){if("function"===typeof t)return t;var e;if(Array.isArray(t))e=t;else{Object(a.a)("function"===typeof t.getZIndex,41);var n=t;e=[n]}return function(){return e}}(t):void 0,this.changed()},e.prototype.setId=function(t){this.id_=t,this.changed()},e.prototype.setGeometryName=function(t){this.removeChangeListener(this.geometryName_,this.handleGeometryChanged_),this.geometryName_=t,this.addChangeListener(this.geometryName_,this.handleGeometryChanged_),this.handleGeometryChanged_()},e}(i.a);e.a=u},function(t,e,n){"use strict";var r,i=n(8),o=n(36),a=n(0),s=n(48),l=n(7),u=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),c=function(t){function e(e,n){var r=t.call(this)||this;return r.setCoordinates(e,n),r}return u(e,t),e.prototype.clone=function(){var t=new e(this.flatCoordinates.slice(),this.layout);return t.applyProperties(this),t},e.prototype.closestPointXY=function(t,e,n,r){var i=this.flatCoordinates,o=Object(l.g)(t,e,i[0],i[1]);if(o<r){for(var a=this.stride,s=0;s<a;++s)n[s]=i[s];return n.length=a,o}return r},e.prototype.getCoordinates=function(){return this.flatCoordinates?this.flatCoordinates.slice():[]},e.prototype.computeExtent=function(t){return Object(a.createOrUpdateFromCoordinate)(this.flatCoordinates,t)},e.prototype.getType=function(){return i.a.POINT},e.prototype.intersectsExtent=function(t){return Object(a.containsXY)(t,this.flatCoordinates[0],this.flatCoordinates[1])},e.prototype.setCoordinates=function(t,e){this.setLayout(e,t,0),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=Object(s.a)(this.flatCoordinates,0,t,this.stride),this.changed()},e}(o.a);e.a=c},function(t,e,n){"use strict";e.a={XY:"XY",XYZ:"XYZ",XYM:"XYM",XYZM:"XYZM"}},function(t,e,n){"use strict";e.a=function(t){var e=arguments;return function(t){for(var n=!0,r=0,i=e.length;r<i&&(n=n&&e[r](t));++r);return n}},n.d(e,"b",function(){return s}),n.d(e,"c",function(){return l}),n.d(e,"f",function(){return u}),n.d(e,"d",function(){return c}),n.d(e,"e",function(){return h}),n.d(e,"g",function(){return p}),n.d(e,"i",function(){return f}),n.d(e,"k",function(){return d}),n.d(e,"n",function(){return g}),n.d(e,"j",function(){return y}),n.d(e,"m",function(){return m}),n.d(e,"o",function(){return v}),n.d(e,"h",function(){return _}),n.d(e,"l",function(){return b});var r=n(55),i=n(13),o=n(39),a=n(4);var s=function(t){var e=t.originalEvent;return e.altKey&&!(e.metaKey||e.ctrlKey)&&!e.shiftKey},l=function(t){var e=t.originalEvent;return e.altKey&&!(e.metaKey||e.ctrlKey)&&e.shiftKey},u=function(t){return!t.map.getTargetElement().hasAttribute("tabindex")||function(t){return t.target.getTargetElement().contains(document.activeElement)}(t)},c=i.b,h=function(t){return t.type==r.a.CLICK},p=function(t){var e=t.originalEvent;return 0==e.button&&!(o.f&&o.d&&e.ctrlKey)},f=i.a,d=function(t){return"pointermove"==t.type},g=function(t){return t.type==r.a.SINGLECLICK},y=function(t){var e=t.originalEvent;return!e.altKey&&!(e.metaKey||e.ctrlKey)&&!e.shiftKey},m=function(t){var e=t.originalEvent;return!e.altKey&&!(e.metaKey||e.ctrlKey)&&e.shiftKey},v=function(t){var e=t.originalEvent.target.tagName;return"INPUT"!==e&&"SELECT"!==e&&"TEXTAREA"!==e},_=function(t){var e=t.originalEvent;return Object(a.a)(void 0!==e,56),"mouse"==e.pointerType},b=function(t){var e=t.originalEvent;return Object(a.a)(void 0!==e,56),e.isPrimary&&0===e.button}},function(t,e,n){"use strict";n.d(e,"b",function(){return o}),n.d(e,"c",function(){return l}),n.d(e,"a",function(){return s});var r=n(23),i=!1,o=function(t){var e=!0;"undefined"===typeof window.HTMLElement&&(e=!1),document.all&&!document.querySelector&&(e=!1);var n=document.createElement("canvas");if(n.getContext&&n.getContext("2d")||(e=!1),window.XMLHttpRequest)try{var o=new XMLHttpRequest;"https:"!=window.location.protocol?o.open("GET","http://fake.pathomation.com/",!0):o.open("GET","https://fake.pathomation.com/",!0)}catch(t){e=!1}else e=!1;if(!e){var a=null;if(t)if(void 0!==t.innerHTML)a=t;else if("string"==typeof t){var s=t;s=s.replace("#",""),a=document.getElementById(s)}null!==a?a.innerHTML=r.a.translate("Browser not supported."):i||(i=!0,"string"===typeof PMA.UI.IncompatibilityRedirect?document.location=PMA.UI.IncompatibilityRedirect:alert(r.a.translate("Browser not supported.")))}return e},a=function(t){if(t){var e="",n=0;for(var r in t)t.hasOwnProperty(r)&&(n>0&&(e+="&"),e+=encodeURIComponent(r)+"="+encodeURIComponent(t[r]),n++);return e}return null},s=function(t,e,n,r,i){var o=this;e=e.toUpperCase(),i||(i={}),i.dataEncodeCallback||(i.dataEncodeCallback=a);var s=i.dataEncodeCallback(n);s&&"GET"==e&&(t=t+"?"+s,s=null);var l=new XMLHttpRequest;l.open(e,t,!0),i.contentType?l.setRequestHeader("Content-type",i.contentType):"POST"==e&&l.setRequestHeader("Content-type","application/x-www-form-urlencoded"),l.onreadystatechange=function(){4==l.readyState&&"function"==typeof r&&r.call(o,l)},s?l.send(s):l.send()},l=function(){var t=function(){return(65536*(1+Math.random())|0).toString(16).substring(1)};return t()+t()+"-"+t()+"-"+t()+"-"+t()+"-"+t()+t()+t()}},function(t,e,n){"use strict";e.a=function(t,e){return t[0]+=+e[0],t[1]+=+e[1],t},e.b=function(t,e){var n=e.getRadius(),r=e.getCenter(),i=r[0],o=r[1],a=t[0],s=t[1],l=a-i,u=s-o;0===l&&0===u&&(l=1);var c=Math.sqrt(l*l+u*u);return[i+n*l/c,o+n*u/c]},e.c=a,e.d=s,e.f=function(t,e){for(var n=!0,r=t.length-1;r>=0;--r)if(t[r]!=e[r]){n=!1;break}return n},e.h=function(t,e){var n=Math.cos(e),r=Math.sin(e),i=t[0]*n-t[1]*r,o=t[1]*n+t[0]*r;return t[0]=i,t[1]=o,t},e.i=function(t,e){return t[0]*=e,t[1]*=e,t},e.j=l,e.e=function(t,e){return Math.sqrt(l(t,e))},e.k=function(t,e){return l(t,a(t,e))},e.l=function(t,e){if(e.canWrapX()){var n=Object(r.getWidth)(e.getExtent()),i=u(t,e,n);i&&(t[0]-=i*n)}return t},e.g=u;var r=n(0),i=n(7),o=n(107);function a(t,e){var n,r,i=t[0],o=t[1],a=e[0],s=e[1],l=a[0],u=a[1],c=s[0],h=s[1],p=c-l,f=h-u,d=0===p&&0===f?0:(p*(i-l)+f*(o-u))/(p*p+f*f||0);return d<=0?(n=l,r=u):d>=1?(n=c,r=h):(n=l+d*p,r=u+d*f),[n,r]}function s(t,e,n){var r=Object(i.e)(e+180,360)-180,a=Math.abs(3600*r),s=n||0,l=Math.pow(10,s),u=Math.floor(a/3600),c=Math.floor((a-3600*u)/60),h=a-3600*u-60*c;return(h=Math.ceil(h*l)/l)>=60&&(h=0,c+=1),c>=60&&(c=0,u+=1),u+"\xb0 "+Object(o.b)(c,2)+"\u2032 "+Object(o.b)(h,2,s)+"\u2033"+(0==r?"":" "+t.charAt(r<0?1:0))}function l(t,e){var n=t[0]-e[0],r=t[1]-e[1];return n*n+r*r}function u(t,e,n){var i=e.getExtent(),o=0;if(e.canWrapX()&&(t[0]<i[0]||t[0]>i[2])){var a=n||Object(r.getWidth)(i);o=Math.floor((t[0]-i[0])/a)}return o}},function(t,e,n){"use strict";var r,i=n(17),o=n(8),a=n(36),s=n(86),l=n(0),u=n(48),c=n(72),h=n(5),p=n(190),f=n(57),d=n(141),g=n(111),y=n(192),m=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),v=function(t){function e(e,n){var r=t.call(this)||this;return r.flatMidpoint_=null,r.flatMidpointRevision_=-1,r.maxDelta_=-1,r.maxDeltaRevision_=-1,void 0===n||Array.isArray(e[0])?r.setCoordinates(e,n):r.setFlatCoordinates(n,e),r}return m(e,t),e.prototype.appendCoordinate=function(t){this.flatCoordinates?Object(h.c)(this.flatCoordinates,t):this.flatCoordinates=t.slice(),this.changed()},e.prototype.clone=function(){var t=new e(this.flatCoordinates.slice(),this.layout);return t.applyProperties(this),t},e.prototype.closestPointXY=function(t,e,n,r){return r<Object(l.closestSquaredDistanceXY)(this.getExtent(),t,e)?r:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(Object(s.e)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),Object(s.d)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!1,t,e,n,r))},e.prototype.forEachSegment=function(t){return Object(p.a)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)},e.prototype.getCoordinateAtM=function(t,e){if(this.layout!=i.a.XYM&&this.layout!=i.a.XYZM)return null;var n=void 0!==e&&e;return Object(d.b)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,n)},e.prototype.getCoordinates=function(){return Object(f.a)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},e.prototype.getCoordinateAt=function(t,e){return Object(d.a)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,e,this.stride)},e.prototype.getLength=function(){return Object(y.a)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},e.prototype.getFlatMidpoint=function(){return this.flatMidpointRevision_!=this.getRevision()&&(this.flatMidpoint_=this.getCoordinateAt(.5,this.flatMidpoint_),this.flatMidpointRevision_=this.getRevision()),this.flatMidpoint_},e.prototype.getSimplifiedGeometryInternal=function(t){var n=[];return n.length=Object(c.a)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,n,0),new e(n,i.a.XY)},e.prototype.getType=function(){return o.a.LINE_STRING},e.prototype.intersectsExtent=function(t){return Object(g.a)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)},e.prototype.setCoordinates=function(t,e){this.setLayout(e,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=Object(u.b)(this.flatCoordinates,0,t,this.stride),this.changed()},e}(a.a);e.a=v},function(t,e,n){"use strict";e.c=function(t,e,n){var r,i=n?Object(a.get)(n.featureProjection):null,o=n?Object(a.get)(n.dataProjection):null;r=i&&o&&!Object(a.equivalent)(i,o)?(e?t.clone():t).transform(e?i:o,e?o:i):t;if(e&&n&&void 0!==n.decimals){var s=Math.pow(10,n.decimals);r===t&&(r=t.clone()),r.applyTransform(function(t){for(var e=0,n=t.length;e<n;++e)t[e]=Math.round(t[e]*s)/s;return t})}return r},e.b=function(t,e){var n=e?Object(a.get)(e.featureProjection):null,r=e?Object(a.get)(e.dataProjection):null;return n&&r&&!Object(a.equivalent)(n,r)?Object(a.transformExtent)(t,r,n):t};var r=n(43),i=n(6),o=n(1),a=n(2),s=function(){function t(){this.dataProjection=void 0,this.defaultFeatureProjection=void 0}return t.prototype.getReadOptions=function(t,e){var n;if(e){var i=e.dataProjection?Object(a.get)(e.dataProjection):this.readProjection(t);e.extent&&i&&i.getUnits()===r.b.TILE_PIXELS&&(i=Object(a.get)(i)).setWorldExtent(e.extent),n={dataProjection:i,featureProjection:e.featureProjection}}return this.adaptOptions(n)},t.prototype.adaptOptions=function(t){return Object(o.a)({dataProjection:this.dataProjection,featureProjection:this.defaultFeatureProjection},t)},t.prototype.getType=function(){return Object(i.b)()},t.prototype.readFeature=function(t,e){return Object(i.b)()},t.prototype.readFeatures=function(t,e){return Object(i.b)()},t.prototype.readGeometry=function(t,e){return Object(i.b)()},t.prototype.readProjection=function(t){return Object(i.b)()},t.prototype.writeFeature=function(t,e){return Object(i.b)()},t.prototype.writeFeatures=function(t,e){return Object(i.b)()},t.prototype.writeGeometry=function(t,e){return Object(i.b)()},t}();e.a=s},function(t,e,n){"use strict";function r(t){"@babel/helpers - typeof";return(r="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}n.d(e,"a",function(){return a});var i="",o={},a={Labels:o,setCulture:function(t){i=t},interpolate:function(t,e){return t.replace(/{([^{}]*)}/g,function(t,n){var r=e[n];return"string"===typeof r||"number"===typeof r?r:t})},translate:function(t,e){return""!==i&&o[i].hasOwnProperty(t)&&(t=o[i][t]),"object"===r(e)?this.interpolate(t,e):t}}},function(t,e,n){"use strict";var r,i=n(12),o=n(67),a=n(41),s=n(1),l=n(6),u=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),c=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.key=n,i.oldValue=r,i}return u(e,t),e}(i.a),h=function(t){function e(e){var n=t.call(this)||this;return n.on,n.once,n.un,Object(l.c)(n),n.values_=null,void 0!==e&&n.setProperties(e),n}return u(e,t),e.prototype.get=function(t){var e;return this.values_&&this.values_.hasOwnProperty(t)&&(e=this.values_[t]),e},e.prototype.getKeys=function(){return this.values_&&Object.keys(this.values_)||[]},e.prototype.getProperties=function(){return this.values_&&Object(s.a)({},this.values_)||{}},e.prototype.hasProperties=function(){return!!this.values_},e.prototype.notify=function(t,e){var n;n="change:"+t,this.dispatchEvent(new c(n,t,e)),n=o.a.PROPERTYCHANGE,this.dispatchEvent(new c(n,t,e))},e.prototype.addChangeListener=function(t,e){this.addEventListener("change:"+t,e)},e.prototype.removeChangeListener=function(t,e){this.removeEventListener("change:"+t,e)},e.prototype.set=function(t,e,n){var r=this.values_||(this.values_={});if(n)r[t]=e;else{var i=r[t];r[t]=e,i!==e&&this.notify(t,i)}},e.prototype.setProperties=function(t,e){for(var n in t)this.set(n,t[n],e)},e.prototype.applyProperties=function(t){t.values_&&Object(s.a)(this.values_||(this.values_={}),t.values_)},e.prototype.unset=function(t,e){if(this.values_&&t in this.values_){var n=this.values_[t];delete this.values_[t],Object(s.d)(this.values_)&&(this.values_=null),e||this.notify(t,n)}},e}(a.a);e.a=h},function(t,e,n){"use strict";var r,i=n(130),o=n(24),a=n(64),s=n(12),l=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),u="length",c=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.element=n,i.index=r,i}return l(e,t),e}(s.a),h=function(t){function e(e,n){var r=t.call(this)||this;r.on,r.once,r.un;var i=n||{};if(r.unique_=!!i.unique,r.array_=e||[],r.unique_)for(var o=0,a=r.array_.length;o<a;++o)r.assertUnique_(r.array_[o],o);return r.updateLength_(),r}return l(e,t),e.prototype.clear=function(){for(;this.getLength()>0;)this.pop()},e.prototype.extend=function(t){for(var e=0,n=t.length;e<n;++e)this.push(t[e]);return this},e.prototype.forEach=function(t){for(var e=this.array_,n=0,r=e.length;n<r;++n)t(e[n],n,e)},e.prototype.getArray=function(){return this.array_},e.prototype.item=function(t){return this.array_[t]},e.prototype.getLength=function(){return this.get(u)},e.prototype.insertAt=function(t,e){this.unique_&&this.assertUnique_(e),this.array_.splice(t,0,e),this.updateLength_(),this.dispatchEvent(new c(a.a.ADD,e,t))},e.prototype.pop=function(){return this.removeAt(this.getLength()-1)},e.prototype.push=function(t){this.unique_&&this.assertUnique_(t);var e=this.getLength();return this.insertAt(e,t),this.getLength()},e.prototype.remove=function(t){for(var e=this.array_,n=0,r=e.length;n<r;++n)if(e[n]===t)return this.removeAt(n)},e.prototype.removeAt=function(t){var e=this.array_[t];return this.array_.splice(t,1),this.updateLength_(),this.dispatchEvent(new c(a.a.REMOVE,e,t)),e},e.prototype.setAt=function(t,e){var n=this.getLength();if(t<n){this.unique_&&this.assertUnique_(e,t);var r=this.array_[t];this.array_[t]=e,this.dispatchEvent(new c(a.a.REMOVE,r,t)),this.dispatchEvent(new c(a.a.ADD,e,t))}else{for(var i=n;i<t;++i)this.insertAt(i,void 0);this.insertAt(t,e)}},e.prototype.updateLength_=function(){this.set(u,this.array_.length)},e.prototype.assertUnique_=function(t,e){for(var n=0,r=this.array_.length;n<r;++n)if(this.array_[n]===t&&n!==e)throw new i.a(58)},e}(o.a);e.a=h},function(t,e,n){"use strict";e.a=function(t){for(var e=t.length,n=0,r=0,i=0;i<e;i++)n+=t[i].clientX,r+=t[i].clientY;return[n/e,r/e]};var r,i=n(58),o=n(55),a=n(1),s=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),l=function(t){function e(e){var n=this,r=e||{};return n=t.call(this,r)||this,r.handleDownEvent&&(n.handleDownEvent=r.handleDownEvent),r.handleDragEvent&&(n.handleDragEvent=r.handleDragEvent),r.handleMoveEvent&&(n.handleMoveEvent=r.handleMoveEvent),r.handleUpEvent&&(n.handleUpEvent=r.handleUpEvent),r.stopDown&&(n.stopDown=r.stopDown),n.handlingDownUpSequence=!1,n.trackedPointers_={},n.targetPointers=[],n}return s(e,t),e.prototype.getPointerCount=function(){return this.targetPointers.length},e.prototype.handleDownEvent=function(t){return!1},e.prototype.handleDragEvent=function(t){},e.prototype.handleEvent=function(t){if(!t.originalEvent)return!0;var e=!1;if(this.updateTrackedPointers_(t),this.handlingDownUpSequence){if(t.type==o.a.POINTERDRAG)this.handleDragEvent(t),t.originalEvent.preventDefault();else if(t.type==o.a.POINTERUP){var n=this.handleUpEvent(t);this.handlingDownUpSequence=n&&this.targetPointers.length>0}}else if(t.type==o.a.POINTERDOWN){var r=this.handleDownEvent(t);this.handlingDownUpSequence=r,e=this.stopDown(r)}else t.type==o.a.POINTERMOVE&&this.handleMoveEvent(t);return!e},e.prototype.handleMoveEvent=function(t){},e.prototype.handleUpEvent=function(t){return!1},e.prototype.stopDown=function(t){return t},e.prototype.updateTrackedPointers_=function(t){if(function(t){var e=t.type;return e===o.a.POINTERDOWN||e===o.a.POINTERDRAG||e===o.a.POINTERUP}(t)){var e=t.originalEvent,n=e.pointerId.toString();t.type==o.a.POINTERUP?delete this.trackedPointers_[n]:t.type==o.a.POINTERDOWN?this.trackedPointers_[n]=e:n in this.trackedPointers_&&(this.trackedPointers_[n]=e),this.targetPointers=Object(a.c)(this.trackedPointers_)}},e}(i.a);e.b=l},function(t,e,n){"use strict";n.d(e,"b",function(){return i}),e.c=o,e.d=function(t,e){return function t(e,n,r){if(e.nodeType==Node.CDATA_SECTION_NODE||e.nodeType==Node.TEXT_NODE)n?r.push(String(e.nodeValue).replace(/(\r\n|\r|\n)/g,"")):r.push(e.nodeValue);else{var i=void 0;for(i=e.firstChild;i;i=i.nextSibling)t(i,n,r)}return r}(t,e,[]).join("")},e.h=function(t){return"documentElement"in t},e.e=function(t,e,n){return t.getAttributeNS(e,n)||""},e.s=function(t){return(new DOMParser).parseFromString(t,"application/xml")},e.i=function(t,e){return function(n,i){var o=t.call(void 0!==e?e:this,n,i);if(void 0!==o){var a=i[i.length-1];Object(r.c)(a,o)}}},e.j=function(t,e){return function(n,r){var i=t.call(void 0!==e?e:this,n,r);if(void 0!==i){var o=r[r.length-1];o.push(i)}}},e.o=function(t,e){return function(n,r){var i=t.call(void 0!==e?e:this,n,r);void 0!==i&&(r[r.length-1]=i)}},e.m=function(t,e,n){return function(r,i){var o=t.call(void 0!==n?n:this,r,i);if(void 0!==o){var a=i[i.length-1],s=void 0!==e?e:r.localName,l=void 0;s in a?l=a[s]:(l=[],a[s]=l),l.push(o)}}},e.n=function(t,e,n){return function(r,i){var o=t.call(void 0!==n?n:this,r,i);if(void 0!==o){var a=i[i.length-1],s=void 0!==e?e:r.localName;a[s]=o}}},e.l=function(t,e){return function(n,r,i){t.call(void 0!==e?e:this,n,r,i);var o=i[i.length-1],a=o.node;a.appendChild(n)}},e.k=function(t,e){var n,r;return function(e,i,o){if(void 0===n){n={};var s={};s[e.localName]=t,n[e.namespaceURI]=s,r=a(e.localName)}u(n,r,i,o)}},e.q=a,n.d(e,"a",function(){return s}),e.p=function(t,e){for(var n=e.length,r=new Array(n),i=0;i<n;++i)r[i]=t[e[i]];return r},e.r=function(t,e,n){var r,i,o=void 0!==n?n:{};for(r=0,i=t.length;r<i;++r)o[t[r]]=e;return o},e.t=l,e.u=function(t,e,n,r,i){return r.push(t),l(e,n,r,i),r.pop()},e.v=function(t,e,n,r,i,o,a){return i.push(t),u(e,n,r,i,o,a),i.pop()},e.g=function(){void 0===c&&"undefined"!==typeof XMLSerializer&&(c=new XMLSerializer);return c},e.f=p;var r=n(5),i="http://www.w3.org/2001/XMLSchema-instance";function o(t,e){return p().createElementNS(t,e)}function a(t,e){var n=t;return function(t,r,i){var a=r[r.length-1].node,s=n;return void 0===s&&(s=i),o(void 0!==e?e:a.namespaceURI,s)}}var s=a();function l(t,e,n,r){var i;for(i=e.firstElementChild;i;i=i.nextElementSibling){var o=t[i.namespaceURI];if(void 0!==o){var a=o[i.localName];void 0!==a&&a.call(r,i,n)}}}function u(t,e,n,r,i,o){for(var a,s,l=(void 0!==i?i:n).length,u=0;u<l;++u)void 0!==(a=n[u])&&void 0!==(s=e.call(void 0!==o?o:this,a,r,void 0!==i?i[u]:void 0))&&t[s.namespaceURI][s.localName].call(o,s,a,r)}var c=void 0;var h=void 0;function p(){return void 0===h&&"undefined"!==typeof document&&(h=document.implementation.createDocument("","",null)),h}},function(t,e,n){"use strict";e.a=function(t,e,n){void 0===n&&(n=[0,0]);return n[0]=t[0]+2*e,n[1]=t[1]+2*e,n},e.b=function(t){return t[0]>0&&t[1]>0},e.c=function(t,e,n){void 0===n&&(n=[0,0]);return n[0]=t[0]*e+.5|0,n[1]=t[1]*e+.5|0,n},e.d=function(t,e){return Array.isArray(t)?t:(void 0===e?e=[t,t]:(e[0]=t,e[1]=t),e)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.defaults=function(t){var e=t||{},n=new i.a;(void 0===e.zoom||e.zoom)&&n.push(new a.a(e.zoomOptions));(void 0===e.rotate||e.rotate)&&n.push(new o.a(e.rotateOptions));(void 0===e.attribution||e.attribution)&&n.push(new r.a(e.attributionOptions));return n};var r=n(177),i=n(25),o=n(180),a=n(181);n.d(e,"Attribution",function(){return r.a});var s=n(42);n.d(e,"Control",function(){return s.a});var l=n(255);n.d(e,"FullScreen",function(){return l.a});var u=n(256);n.d(e,"MousePosition",function(){return u.a});var c=n(261);n.d(e,"OverviewMap",function(){return c.a}),n.d(e,"Rotate",function(){return o.a});var h=n(266);n.d(e,"ScaleLine",function(){return h.a}),n.d(e,"Zoom",function(){return a.a});var p=n(267);n.d(e,"ZoomSlider",function(){return p.a});var f=n(268);n.d(e,"ZoomToExtent",function(){return f.a})},function(t,e,n){"use strict";e.a={IDLE:0,LOADING:1,LOADED:2,ERROR:3,EMPTY:4}},function(t,e,n){"use strict";e.a={UNDEFINED:"undefined",LOADING:"loading",READY:"ready",ERROR:"error"}},function(t,e,n){"use strict";n.d(e,"c",function(){return u}),n.d(e,"a",function(){return c}),n.d(e,"d",function(){return h}),n.d(e,"b",function(){return p}),n.d(e,"e",function(){return f}),n.d(e,"l",function(){return g}),n.d(e,"k",function(){return y}),n.d(e,"f",function(){return v}),n.d(e,"j",function(){return _}),n.d(e,"i",function(){return b}),n.d(e,"h",function(){return w}),n.d(e,"g",function(){return O});var r=n(23),i=n(126);function o(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function a(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?o(Object(n),!0).forEach(function(e){s(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function s(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function l(t){"@babel/helpers - typeof";return(l="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var u={DirectorySelected:"directorySelected",SlideSelected:"slideSelected",ServerSelected:"serverSelected",ServerExpanded:"serverExpanded",DirectoryExpanded:"directoryExpanded",MultiSelectionChanged:"multiSelectionChanged",SlideDeSelected:"slideDeSelected",TreeNodeDoubleClicked:"treeNodeDoubleClicked",SlideInfoError:"SlideInfoError",BeforeSlideLoad:"BeforeSlideLoad",SlideLoaded:"SlideLoaded",AnnotationAdded:"annotationAdded",AnnotationDrawing:"annotationDrawing",AnnotationDeleted:"annotationDeleted",AnnotationModified:"annotationModified",AnnotationsSaved:"annotationsSaved",AnnotationsSelectionChanged:"annotationsSelectionChanged",AnnotationEditingStarted:"annotationEditingStarted",AnnotationEditingEnded:"annotationEditingEnded",FormSaved:"formSaved",FormEditClick:"formEditClick",SyncChanged:"syncChanged",SearchStarted:"searchStarted",SearchFinished:"searchFinished",SearchFailed:"searchFailed",ValueExpanded:"valueExpanded",Dropped:"dropped",SessionIdLoginFailed:"sessionIdLoginFailed",BeforeDrop:"beforeDrop"},c={Authenticate:"Authenticate",GetFiles:"GetFiles",GetDirectories:"GetDirectories",GetImageInfo:"GetImageInfo",GetImagesInfo:"GetImagesInfo",DeAuthenticate:"DeAuthenticate",GetForms:"GetForms",GetFormDefinitions:"GetFormDefinitions",GetFormSubmissions:"GetFormSubmissions",GetForm:"GetForm",SaveFormDefinition:"SaveFormDefinition",DeleteFormDefinition:"DeleteFormDefinition",SaveFormData:"SaveFormData",GetFormData:"GetFormData",GetAnnotations:"GetAnnotations",AddAnnotation:"AddAnnotation",UpdateAnnotation:"UpdateAnnotation",DeleteAnnotation:"DeleteAnnotation",GetVersionInfo:"GetVersionInfo",QueryFilename:"Filename",SaveAnnotations:"SaveAnnotations",DistinctValues:"DistinctValues",Metadata:"Metadata",GetEvents:"GetEvents",RunScripts:"Run"},h={All:"all",Thumbnail:"thumbnail",Barcode:"barcode"},p="application/x-pma-node",f={_list:{},set:function(t,e){this._list[t]=e},get:function(){return this._list},clear:function(){this._list={}}};function d(t){for(var e=/^\/+|\/+$/g,n=/^\/+/g,r=0,i=t.length;r<i;r++)t[r]=r===i-1?t[r].replace(n,""):t[r].replace(e,"");return t.join("/")}var g=function(t){if(null===t||void 0===t||""===t)return null;var e=JSON.parse(t);return e.hasOwnProperty("d")?e.d:e},y=function(t){try{var e=t.getData(PMA.UI.Components.DragDropMimeType);return JSON.parse(e)}catch(t){}try{var n=t.getData("text");return JSON.parse(n)}catch(t){}return null},m=function(t,e,n,r,i,o){e=e.toUpperCase();var a=null;(a=n&&n.toLowerCase&&"application/json"===n.toLowerCase()?JSON.stringify(r):function(t){if(t&&"object"===l(t)){var e="",n=0;for(var r in t)t.hasOwnProperty(r)&&(n>0&&(e+="&"),e+=encodeURIComponent(r)+"="+encodeURIComponent(t[r]),n++);return e}return t}(r))&&"GET"==e&&(t=t+"?"+a,a=null);var s=new XMLHttpRequest;s.open(e,t,!0),"POST"!=e||n?n&&s.setRequestHeader("Content-Type",n):s.setRequestHeader("Content-type","application/x-www-form-urlencoded"),s.onreadystatechange=function(){4===s.readyState&&(200===s.status?"function"===typeof i&&i(s):"function"===typeof o&&o(s))},a?s.send(a):s.send()},v=function(t){var e="GET";t.httpMethod&&(e=t.httpMethod),t.apiPath||(t.apiPath="api");var n=!0===t.webapi?"/":"/json/";m(d([t.serverUrl,t.apiPath+n,t.method]),e,t.contentType,t.data,t.success,t.failure)},_=function(t,e,n,o,s,l){if("string"!==typeof o)throw"Caller parameter not supplied";function u(t){if("function"===typeof l)if(t.responseText&&0!==t.responseText.length&&""!==t.responseType)try{var e=g(t.responseText);l(e)}catch(t){l({Message:r.a.translate("Authentication failed")})}else l({Message:r.a.translate("Authentication failed")})}var h;(h={serverUrl:t,method:c.GetVersionInfo},new Promise(function(t,e){var n=a(a({},h),{},{success:t,failure:e});v(n)})).then(function(r){var a=Object(i.a)(JSON.parse(r.responseText));v({serverUrl:t,method:c.Authenticate,httpMethod:a?"POST":"GET",contentType:a?"application/json":null,data:{username:e,password:n,caller:o},success:function(e){var n=g(e.responseText);n&&!0===n.Success?(f.set(t,n),"function"===typeof s&&s(n.SessionId)):u(e)},failure:u})},u)},b=function(t,e,n,r,i,o){return d([t,"thumbnail"])+"?sessionID="+encodeURIComponent(e)+"&pathOrUid="+encodeURIComponent(n)+"&orientation="+(r||0)+"&w="+(i||0)+"&h="+(o||0)},w=function(t,e,n,r,i,o,a){a||(a="jpg"),i=i||150,o=o||150;var s="0";r.channels&&(s=r.channels.join(","));var l=r.timeframe?r.timeframe:0,u=r.layer?r.layer:0,c=Math.max(i/r.width,o/r.height);(r.width*c<1||r.height<1)&&(c=1/Math.max(r.width,r.height));var h=r.rotation?r.rotation:0;return d([t,"region"])+"?sessionID="+encodeURIComponent(e)+"&pathOrUid="+encodeURIComponent(n)+"&format="+encodeURIComponent(a)+"&timeframe="+l+"&layer="+u+"&channels="+s+"&x="+Math.floor(r.x)+"&y="+Math.floor(r.y)+"&width="+Math.floor(r.width)+"&height="+Math.floor(r.height)+"&scale="+c+"&rotation="+h+"&flipHorizontal="+r.flipHorizontally+"&flipVertical="+r.flipVertically},O=function(t,e,n,r){return d([t,"barcode"])+"?sessionID="+encodeURIComponent(e)+"&pathOrUid="+encodeURIComponent(n)+"&rotation="+(r||0)}},function(t,e,n){"use strict";e.a={IDLE:0,LOADING:1,LOADED:2,ERROR:3,EMPTY:4}},function(t,e,n){"use strict";n.d(e,"c",function(){return r}),n.d(e,"d",function(){return i}),n.d(e,"e",function(){return o}),n.d(e,"f",function(){return a}),n.d(e,"b",function(){return s}),n.d(e,"a",function(){return l}),n.d(e,"g",function(){return h});var r="ol-hidden",i="ol-selectable",o="ol-unselectable",a="ol-unsupported",s="ol-control",l="ol-collapsed",u=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"),c=["style","variant","weight","size","lineHeight","family"],h=function(t){var e=t.match(u);if(!e)return null;for(var n={lineHeight:"normal",size:"1.2em",style:"normal",weight:"normal",variant:"normal"},r=0,i=c.length;r<i;++r){var o=e[r+1];void 0!==o&&(n[c[r]]=o)}return n.families=n.family.split(/,\s?/),n}},function(t,e,n){"use strict";e.d=function(t){var e;if("function"===typeof t)e=t;else{var n;if(Array.isArray(t))n=t;else{Object(s.a)("function"===typeof t.getZIndex,41);var r=t;n=[r]}e=function(){return n}}return e},e.a=function(t,e){if(!c){var n=new i.a({color:"rgba(255,255,255,0.4)"}),o=new a.a({color:"#3399CC",width:1.25});c=[new u({image:new r.a({fill:n,stroke:o,radius:5}),fill:n,stroke:o})]}return c},e.b=function(){var t={},e=[255,255,255,1],n=[0,153,255,1];return t[o.a.POLYGON]=[new u({fill:new i.a({color:[255,255,255,.5]})})],t[o.a.MULTI_POLYGON]=t[o.a.POLYGON],t[o.a.LINE_STRING]=[new u({stroke:new a.a({color:e,width:5})}),new u({stroke:new a.a({color:n,width:3})})],t[o.a.MULTI_LINE_STRING]=t[o.a.LINE_STRING],t[o.a.CIRCLE]=t[o.a.POLYGON].concat(t[o.a.LINE_STRING]),t[o.a.POINT]=[new u({image:new r.a({radius:6,fill:new i.a({color:n}),stroke:new a.a({color:e,width:1.5})}),zIndex:1/0})],t[o.a.MULTI_POINT]=t[o.a.POINT],t[o.a.GEOMETRY_COLLECTION]=t[o.a.POLYGON].concat(t[o.a.LINE_STRING],t[o.a.POINT]),t};var r=n(127),i=n(62),o=n(8),a=n(70),s=n(4);function l(t){"@babel/helpers - typeof";return(l="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var u=function(){function t(t){var e=t||{};this.geometry_=null,this.geometryFunction_=h,void 0!==e.geometry&&this.setGeometry(e.geometry),this.fill_=void 0!==e.fill?e.fill:null,this.image_=void 0!==e.image?e.image:null,this.renderer_=void 0!==e.renderer?e.renderer:null,this.stroke_=void 0!==e.stroke?e.stroke:null,this.text_=void 0!==e.text?e.text:null,this.zIndex_=e.zIndex}return t.prototype.clone=function(){var e=this.getGeometry();return e&&"object"===l(e)&&(e=e.clone()),new t({geometry:e,fill:this.getFill()?this.getFill().clone():void 0,image:this.getImage()?this.getImage().clone():void 0,renderer:this.getRenderer(),stroke:this.getStroke()?this.getStroke().clone():void 0,text:this.getText()?this.getText().clone():void 0,zIndex:this.getZIndex()})},t.prototype.getRenderer=function(){return this.renderer_},t.prototype.setRenderer=function(t){this.renderer_=t},t.prototype.getGeometry=function(){return this.geometry_},t.prototype.getGeometryFunction=function(){return this.geometryFunction_},t.prototype.getFill=function(){return this.fill_},t.prototype.setFill=function(t){this.fill_=t},t.prototype.getImage=function(){return this.image_},t.prototype.setImage=function(t){this.image_=t},t.prototype.getStroke=function(){return this.stroke_},t.prototype.setStroke=function(t){this.stroke_=t},t.prototype.getText=function(){return this.text_},t.prototype.setText=function(t){this.text_=t},t.prototype.getZIndex=function(){return this.zIndex_},t.prototype.setGeometry=function(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_=h,this.geometry_=t},t.prototype.setZIndex=function(t){this.zIndex_=t},t}();var c=null;function h(t){return t.getGeometry()}e.c=u},function(t,e,n){"use strict";e.b=h,e.c=function(t,e,n){var r=t.getFlatCoordinates();if(r){var i=t.getStride();return Object(l.c)(r,0,r.length,i,e,n)}return null};var r,i=n(138),o=n(17),a=n(6),s=n(0),l=n(56),u=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),c=function(t){function e(){var e=t.call(this)||this;return e.layout=o.a.XY,e.stride=2,e.flatCoordinates=null,e}return u(e,t),e.prototype.computeExtent=function(t){return Object(s.createOrUpdateFromFlatCoordinates)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)},e.prototype.getCoordinates=function(){return Object(a.b)()},e.prototype.getFirstCoordinate=function(){return this.flatCoordinates.slice(0,this.stride)},e.prototype.getFlatCoordinates=function(){return this.flatCoordinates},e.prototype.getLastCoordinate=function(){return this.flatCoordinates.slice(this.flatCoordinates.length-this.stride)},e.prototype.getLayout=function(){return this.layout},e.prototype.getSimplifiedGeometry=function(t){if(this.simplifiedGeometryRevision!==this.getRevision()&&(this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=this.getRevision()),t<0||0!==this.simplifiedGeometryMaxMinSquaredTolerance&&t<=this.simplifiedGeometryMaxMinSquaredTolerance)return this;var e=this.getSimplifiedGeometryInternal(t);return e.getFlatCoordinates().length<this.flatCoordinates.length?e:(this.simplifiedGeometryMaxMinSquaredTolerance=t,this)},e.prototype.getSimplifiedGeometryInternal=function(t){return this},e.prototype.getStride=function(){return this.stride},e.prototype.setFlatCoordinates=function(t,e){this.stride=h(t),this.layout=t,this.flatCoordinates=e},e.prototype.setCoordinates=function(t,e){Object(a.b)()},e.prototype.setLayout=function(t,e,n){var r;if(t)r=h(t);else{for(var i=0;i<n;++i){if(0===e.length)return this.layout=o.a.XY,void(this.stride=2);e=e[0]}t=function(t){var e;2==t?e=o.a.XY:3==t?e=o.a.XYZ:4==t&&(e=o.a.XYZM);return e}(r=e.length)}this.layout=t,this.stride=r},e.prototype.applyTransform=function(t){this.flatCoordinates&&(t(this.flatCoordinates,this.flatCoordinates,this.stride),this.changed())},e.prototype.rotate=function(t,e){var n=this.getFlatCoordinates();if(n){var r=this.getStride();Object(l.a)(n,0,n.length,r,t,e,n),this.changed()}},e.prototype.scale=function(t,e,n){var r=e;void 0===r&&(r=t);var i=n;i||(i=Object(s.getCenter)(this.getExtent()));var o=this.getFlatCoordinates();if(o){var a=this.getStride();Object(l.b)(o,0,o.length,a,t,r,i,o),this.changed()}},e.prototype.translate=function(t,e){var n=this.getFlatCoordinates();if(n){var r=this.getStride();Object(l.d)(n,0,n.length,r,t,e,n),this.changed()}},e}(i.a);function h(t){var e;return t==o.a.XY?e=2:t==o.a.XYZ||t==o.a.XYM?e=3:t==o.a.XYZM&&(e=4),e}e.a=c},function(t,e,n){"use strict";var r,i=n(17),o=n(8),a=n(21),s=n(36),l=n(86),u=n(0),c=n(48),h=n(72),p=n(5),f=n(57),d=n(141),g=n(111),y=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),m=function(t){function e(e,n,r){var i=t.call(this)||this;if(i.ends_=[],i.maxDelta_=-1,i.maxDeltaRevision_=-1,Array.isArray(e[0]))i.setCoordinates(e,n);else if(void 0!==n&&r)i.setFlatCoordinates(n,e),i.ends_=r;else{for(var o=i.getLayout(),a=e,s=[],l=[],u=0,c=a.length;u<c;++u){var h=a[u];0===u&&(o=h.getLayout()),Object(p.c)(s,h.getFlatCoordinates()),l.push(s.length)}i.setFlatCoordinates(o,s),i.ends_=l}return i}return y(e,t),e.prototype.appendLineString=function(t){this.flatCoordinates?Object(p.c)(this.flatCoordinates,t.getFlatCoordinates().slice()):this.flatCoordinates=t.getFlatCoordinates().slice(),this.ends_.push(this.flatCoordinates.length),this.changed()},e.prototype.clone=function(){var t=new e(this.flatCoordinates.slice(),this.layout,this.ends_.slice());return t.applyProperties(this),t},e.prototype.closestPointXY=function(t,e,n,r){return r<Object(u.closestSquaredDistanceXY)(this.getExtent(),t,e)?r:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(Object(l.a)(this.flatCoordinates,0,this.ends_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),Object(l.b)(this.flatCoordinates,0,this.ends_,this.stride,this.maxDelta_,!1,t,e,n,r))},e.prototype.getCoordinateAtM=function(t,e,n){if(this.layout!=i.a.XYM&&this.layout!=i.a.XYZM||0===this.flatCoordinates.length)return null;var r=void 0!==e&&e,o=void 0!==n&&n;return Object(d.c)(this.flatCoordinates,0,this.ends_,this.stride,t,r,o)},e.prototype.getCoordinates=function(){return Object(f.b)(this.flatCoordinates,0,this.ends_,this.stride)},e.prototype.getEnds=function(){return this.ends_},e.prototype.getLineString=function(t){return t<0||this.ends_.length<=t?null:new a.a(this.flatCoordinates.slice(0===t?0:this.ends_[t-1],this.ends_[t]),this.layout)},e.prototype.getLineStrings=function(){for(var t=this.flatCoordinates,e=this.ends_,n=this.layout,r=[],i=0,o=0,s=e.length;o<s;++o){var l=e[o],u=new a.a(t.slice(i,l),n);r.push(u),i=l}return r},e.prototype.getFlatMidpoints=function(){for(var t=[],e=this.flatCoordinates,n=0,r=this.ends_,i=this.stride,o=0,a=r.length;o<a;++o){var s=r[o],l=Object(d.a)(e,n,s,i,.5);Object(p.c)(t,l),n=s}return t},e.prototype.getSimplifiedGeometryInternal=function(t){var n=[],r=[];return n.length=Object(h.b)(this.flatCoordinates,0,this.ends_,this.stride,t,n,0,r),new e(n,i.a.XY,r)},e.prototype.getType=function(){return o.a.MULTI_LINE_STRING},e.prototype.intersectsExtent=function(t){return Object(g.b)(this.flatCoordinates,0,this.ends_,this.stride,t)},e.prototype.setCoordinates=function(t,e){this.setLayout(e,t,2),this.flatCoordinates||(this.flatCoordinates=[]);var n=Object(c.c)(this.flatCoordinates,0,t,this.stride,this.ends_);this.flatCoordinates.length=0===n.length?0:n[n.length-1],this.changed()},e}(s.a);e.a=m},function(t,e,n){"use strict";function r(t,e,n){return t+"/"+e+"/"+n}e.a=function(t,e,n,r){return void 0!==r?(r[0]=t,r[1]=e,r[2]=n,r):[t,e,n]},e.e=r,e.d=function(t){return r(t[0],t[1],t[2])},e.c=function(t){var e=t.substring(t.lastIndexOf("/")+1,t.length).split(",").map(Number),n=e[0],i=e[1],o=e[2];return r(n,i,o)},e.b=function(t){return t.split("/").map(Number)},e.f=function(t){return(t[1]<<t[0])+t[2]},e.g=function(t,e){var n=t[0],r=t[1],i=t[2];if(e.getMinZoom()>n||n>e.getMaxZoom())return!1;var o=e.getFullTileRange(n);return!o||o.containsXY(r,i)}},function(t,e,n){"use strict";n.d(e,"b",function(){return i}),n.d(e,"f",function(){return o}),n.d(e,"d",function(){return a}),n.d(e,"a",function(){return s}),n.d(e,"g",function(){return l}),n.d(e,"c",function(){return u}),n.d(e,"e",function(){return c});var r="undefined"!==typeof navigator&&"undefined"!==typeof navigator.userAgent?navigator.userAgent.toLowerCase():"",i=-1!==r.indexOf("firefox"),o=(-1!==r.indexOf("safari")&&r.indexOf("chrom"),-1!==r.indexOf("webkit")&&-1==r.indexOf("edge")),a=-1!==r.indexOf("macintosh"),s="undefined"!==typeof devicePixelRatio?devicePixelRatio:1,l="undefined"!==typeof WorkerGlobalScope&&"undefined"!==typeof OffscreenCanvas&&self instanceof WorkerGlobalScope,u="undefined"!==typeof Image&&Image.prototype.decode,c=function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("_",null,e),window.removeEventListener("_",null,e)}catch(t){}return t}()},function(t,e,n){"use strict";n.d(e,"c",function(){return u}),n.d(e,"b",function(){return c}),n.d(e,"d",function(){return h}),n.d(e,"e",function(){return p}),n.d(e,"f",function(){return f}),n.d(e,"g",function(){return d}),n.d(e,"i",function(){return g}),n.d(e,"k",function(){return y}),n.d(e,"l",function(){return m}),n.d(e,"m",function(){return v}),n.d(e,"j",function(){return _}),n.d(e,"h",function(){return b}),n.d(e,"a",function(){return w}),n.d(e,"o",function(){return O}),n.d(e,"s",function(){return T}),n.d(e,"q",function(){return I}),e.p=function(t,e,n){if(e in n)return n[e];var r=L(t,e);return n[e]=r,r},e.r=function(t,e,n){for(var r=e.length,i=0,o=0;o<r;++o){var a=L(t,e[o]);i=Math.max(i,a),n.push(a)}return i},e.n=function(t,e,n,r,i,o,a,s,l,u,c){t.save(),1!==n&&(t.globalAlpha*=n);e&&t.setTransform.apply(t,e);r.contextInstructions?(t.translate(l,u),t.scale(c[0],c[1]),function(t,e){for(var n=t.contextInstructions,r=0,i=n.length;r<i;r+=2)Array.isArray(n[r+1])?e[n[r]].apply(e,n[r+1]):e[n[r]]=n[r+1]}(r,t)):c[0]<0||c[1]<0?(t.translate(l,u),t.scale(c[0],c[1]),t.drawImage(r,i,o,a,s,0,0,a,s)):t.drawImage(r,i,o,a,s,l,u,a*c[0],s*c[1]);t.restore()};var r=n(24),i=n(68),o=n(39),a=n(1),s=n(11),l=n(34),u="10px sans-serif",c="#000",h="round",p=[],f=0,d="round",g=10,y="#000",m="center",v="middle",_=[0,0,0,0],b=1,w=new r.a,O=new i.a;O.setSize=function(){console.warn("labelCache is deprecated.")};var x,E,S=null,C={},T=function(){var t,e,n=100,r="32px ",i=["monospace","serif"],o=i.length,s="wmytzilWMYTZIL@#/&?$%10\uf013";function u(t,n,a){for(var l=!0,u=0;u<o;++u){var c=i[u];if(e=L(t+" "+n+" "+r+c,s),a!=c){var h=L(t+" "+n+" "+r+a+","+c,s);l=l&&h!=e}}return!!l}function c(){for(var e=!0,r=w.getKeys(),i=0,o=r.length;i<o;++i){var s=r[i];w.get(s)<n&&(u.apply(this,s.split("\n"))?(Object(a.b)(C),S=null,x=void 0,w.set(s,n)):(w.set(s,w.get(s)+1,!0),e=!1))}e&&(clearInterval(t),t=void 0)}return function(e){var r=Object(l.g)(e);if(r)for(var i=r.families,o=0,a=i.length;o<a;++o){var s=i[o],h=r.style+"\n"+r.weight+"\n"+s;void 0===w.get(h)&&(w.set(h,n,!0),u(r.style,r.weight,s)||(w.set(h,0,!0),void 0===t&&(t=setInterval(c,32))))}}}(),I=function(t){var e=C[t];if(void 0==e){if(o.g){var n=Object(l.g)(t),r=j(t,"\u017dg");e=(isNaN(Number(n.lineHeight))?1.2:Number(n.lineHeight))*(r.actualBoundingBoxAscent+r.actualBoundingBoxDescent)}else E||((E=document.createElement("div")).innerHTML="M",E.style.minHeight="0",E.style.maxHeight="none",E.style.height="auto",E.style.padding="0",E.style.border="none",E.style.position="absolute",E.style.display="block",E.style.left="-99999px"),E.style.font=t,document.body.appendChild(E),e=E.offsetHeight,document.body.removeChild(E);C[t]=e}return e};function j(t,e){return S||(S=Object(s.a)(1,1)),t!=x&&(S.font=t,x=S.font),S.measureText(e)}function L(t,e){return j(t,e).width}},function(t,e,n){"use strict";e.b=u;var r,i=n(68),o=n(3),a=n(9),s=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),l=function(t){function e(){var e=t.call(this)||this;return e.on=e.onInternal,e.once=e.onceInternal,e.un=e.unInternal,e.revision_=0,e}return s(e,t),e.prototype.changed=function(){++this.revision_,this.dispatchEvent(o.a.CHANGE)},e.prototype.getRevision=function(){return this.revision_},e.prototype.onInternal=function(t,e){if(Array.isArray(t)){for(var n=t.length,r=new Array(n),i=0;i<n;++i)r[i]=Object(a.listen)(this,t[i],e);return r}return Object(a.listen)(this,t,e)},e.prototype.onceInternal=function(t,e){var n;if(Array.isArray(t)){var r=t.length;n=new Array(r);for(var i=0;i<r;++i)n[i]=Object(a.listenOnce)(this,t[i],e)}else n=Object(a.listenOnce)(this,t,e);return e.ol_key=n,n},e.prototype.unInternal=function(t,e){var n=e.ol_key;if(n)u(n);else if(Array.isArray(t))for(var r=0,i=t.length;r<i;++r)this.removeEventListener(t[r],e);else this.removeEventListener(t,e)},e}(i.a);function u(t){if(Array.isArray(t))for(var e=0,n=t.length;e<n;++e)Object(a.unlistenByKey)(t[e]);else Object(a.unlistenByKey)(t)}l.prototype.on,l.prototype.once,l.prototype.un,e.a=l},function(t,e,n){"use strict";var r,i=n(24),o=n(104),a=n(13),s=n(9),l=n(11),u=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),c=function(t){function e(e){var n=t.call(this)||this,r=e.element;return!r||e.target||r.style.pointerEvents||(r.style.pointerEvents="auto"),n.element=r||null,n.target_=null,n.map_=null,n.listenerKeys=[],e.render&&(n.render=e.render),e.target&&n.setTarget(e.target),n}return u(e,t),e.prototype.disposeInternal=function(){Object(l.e)(this.element),t.prototype.disposeInternal.call(this)},e.prototype.getMap=function(){return this.map_},e.prototype.setMap=function(t){this.map_&&Object(l.e)(this.element);for(var e=0,n=this.listenerKeys.length;e<n;++e)Object(s.unlistenByKey)(this.listenerKeys[e]);(this.listenerKeys.length=0,this.map_=t,this.map_)&&((this.target_?this.target_:t.getOverlayContainerStopEvent()).appendChild(this.element),this.render!==a.c&&this.listenerKeys.push(Object(s.listen)(t,o.a.POSTRENDER,this.render,this)),t.render())},e.prototype.render=function(t){},e.prototype.setTarget=function(t){this.target_="string"===typeof t?document.getElementById(t):t},e}(i.a);e.a=c},function(t,e,n){"use strict";n.d(e,"a",function(){return i});var r={DEGREES:"degrees",FEET:"ft",METERS:"m",PIXELS:"pixels",TILE_PIXELS:"tile-pixels",USFEET:"us-ft"},i={};i[r.DEGREES]=2*Math.PI*6370997/360,i[r.FEET]=.3048,i[r.METERS]=1,i[r.USFEET]=1200/3937,e.b=r},function(t,e,n){"use strict";var r,i=n(8),o=n(16),a=n(36),s=n(0),l=n(48),u=n(5),c=n(57),h=n(7),p=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),f=function(t){function e(e,n){var r=t.call(this)||this;return n&&!Array.isArray(e[0])?r.setFlatCoordinates(n,e):r.setCoordinates(e,n),r}return p(e,t),e.prototype.appendPoint=function(t){this.flatCoordinates?Object(u.c)(this.flatCoordinates,t.getFlatCoordinates()):this.flatCoordinates=t.getFlatCoordinates().slice(),this.changed()},e.prototype.clone=function(){var t=new e(this.flatCoordinates.slice(),this.layout);return t.applyProperties(this),t},e.prototype.closestPointXY=function(t,e,n,r){if(r<Object(s.closestSquaredDistanceXY)(this.getExtent(),t,e))return r;for(var i=this.flatCoordinates,o=this.stride,a=0,l=i.length;a<l;a+=o){var u=Object(h.g)(t,e,i[a],i[a+1]);if(u<r){r=u;for(var c=0;c<o;++c)n[c]=i[a+c];n.length=o}}return r},e.prototype.getCoordinates=function(){return Object(c.a)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},e.prototype.getPoint=function(t){var e=this.flatCoordinates?this.flatCoordinates.length/this.stride:0;return t<0||e<=t?null:new o.a(this.flatCoordinates.slice(t*this.stride,(t+1)*this.stride),this.layout)},e.prototype.getPoints=function(){for(var t=this.flatCoordinates,e=this.layout,n=this.stride,r=[],i=0,a=t.length;i<a;i+=n){var s=new o.a(t.slice(i,i+n),e);r.push(s)}return r},e.prototype.getType=function(){return i.a.MULTI_POINT},e.prototype.intersectsExtent=function(t){for(var e=this.flatCoordinates,n=this.stride,r=0,i=e.length;r<i;r+=n){var o=e[r],a=e[r+1];if(Object(s.containsXY)(t,o,a))return!0}return!1},e.prototype.setCoordinates=function(t,e){this.setLayout(e,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=Object(l.b)(this.flatCoordinates,0,t,this.stride),this.changed()},e}(a.a);e.a=f},function(t,e,n){"use strict";var r,i=n(17),o=n(8),a=n(44),s=n(10),l=n(36),u=n(86),c=n(0),h=n(48),p=n(5),f=n(140),d=n(57),g=n(111),y=n(112),m=n(139),v=n(206),_=n(110),b=n(72),w=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),O=function(t){function e(e,n,r){var i=t.call(this)||this;if(i.endss_=[],i.flatInteriorPointsRevision_=-1,i.flatInteriorPoints_=null,i.maxDelta_=-1,i.maxDeltaRevision_=-1,i.orientedRevision_=-1,i.orientedFlatCoordinates_=null,!r&&!Array.isArray(e[0])){for(var o=i.getLayout(),a=e,s=[],l=[],u=0,c=a.length;u<c;++u){var h=a[u];0===u&&(o=h.getLayout());for(var f=s.length,d=h.getEnds(),g=0,y=d.length;g<y;++g)d[g]+=f;Object(p.c)(s,h.getFlatCoordinates()),l.push(d)}n=o,e=s,r=l}return void 0!==n&&r?(i.setFlatCoordinates(n,e),i.endss_=r):i.setCoordinates(e,n),i}return w(e,t),e.prototype.appendPolygon=function(t){var e;if(this.flatCoordinates){var n=this.flatCoordinates.length;Object(p.c)(this.flatCoordinates,t.getFlatCoordinates());for(var r=0,i=(e=t.getEnds().slice()).length;r<i;++r)e[r]+=n}else this.flatCoordinates=t.getFlatCoordinates().slice(),e=t.getEnds().slice(),this.endss_.push();this.endss_.push(e),this.changed()},e.prototype.clone=function(){for(var t=this.endss_.length,n=new Array(t),r=0;r<t;++r)n[r]=this.endss_[r].slice();var i=new e(this.flatCoordinates.slice(),this.layout,n);return i.applyProperties(this),i},e.prototype.closestPointXY=function(t,e,n,r){return r<Object(c.closestSquaredDistanceXY)(this.getExtent(),t,e)?r:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(Object(u.f)(this.flatCoordinates,0,this.endss_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),Object(u.c)(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,this.maxDelta_,!0,t,e,n,r))},e.prototype.containsXY=function(t,e){return Object(_.d)(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,t,e)},e.prototype.getArea=function(){return Object(m.c)(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride)},e.prototype.getCoordinates=function(t){var e;return void 0!==t?(e=this.getOrientedFlatCoordinates().slice(),Object(y.e)(e,0,this.endss_,this.stride,t)):e=this.flatCoordinates,Object(d.c)(e,0,this.endss_,this.stride)},e.prototype.getEndss=function(){return this.endss_},e.prototype.getFlatInteriorPoints=function(){if(this.flatInteriorPointsRevision_!=this.getRevision()){var t=Object(v.a)(this.flatCoordinates,0,this.endss_,this.stride);this.flatInteriorPoints_=Object(f.b)(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,t),this.flatInteriorPointsRevision_=this.getRevision()}return this.flatInteriorPoints_},e.prototype.getInteriorPoints=function(){return new a.a(this.getFlatInteriorPoints().slice(),i.a.XYM)},e.prototype.getOrientedFlatCoordinates=function(){if(this.orientedRevision_!=this.getRevision()){var t=this.flatCoordinates;Object(y.c)(t,0,this.endss_,this.stride)?this.orientedFlatCoordinates_=t:(this.orientedFlatCoordinates_=t.slice(),this.orientedFlatCoordinates_.length=Object(y.e)(this.orientedFlatCoordinates_,0,this.endss_,this.stride)),this.orientedRevision_=this.getRevision()}return this.orientedFlatCoordinates_},e.prototype.getSimplifiedGeometryInternal=function(t){var n=[],r=[];return n.length=Object(b.d)(this.flatCoordinates,0,this.endss_,this.stride,Math.sqrt(t),n,0,r),new e(n,i.a.XY,r)},e.prototype.getPolygon=function(t){if(t<0||this.endss_.length<=t)return null;var e;if(0===t)e=0;else{var n=this.endss_[t-1];e=n[n.length-1]}var r=this.endss_[t].slice(),i=r[r.length-1];if(0!==e)for(var o=0,a=r.length;o<a;++o)r[o]-=e;return new s.b(this.flatCoordinates.slice(e,i),this.layout,r)},e.prototype.getPolygons=function(){for(var t=this.layout,e=this.flatCoordinates,n=this.endss_,r=[],i=0,o=0,a=n.length;o<a;++o){var l=n[o].slice(),u=l[l.length-1];if(0!==i)for(var c=0,h=l.length;c<h;++c)l[c]-=i;var p=new s.b(e.slice(i,u),t,l);r.push(p),i=u}return r},e.prototype.getType=function(){return o.a.MULTI_POLYGON},e.prototype.intersectsExtent=function(t){return Object(g.d)(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,t)},e.prototype.setCoordinates=function(t,e){this.setLayout(e,t,3),this.flatCoordinates||(this.flatCoordinates=[]);var n=Object(h.d)(this.flatCoordinates,0,t,this.stride,this.endss_);if(0===n.length)this.flatCoordinates.length=0;else{var r=n[n.length-1];this.flatCoordinates.length=0===r.length?0:r[r.length-1]}this.changed()},e}(l.a);e.a=O},function(t,e){t.exports=jQuery},function(t,e,n){"use strict";function r(t){return Math.pow(t,3)}function i(t){return 3*t*t-2*t*t*t}e.a=r,e.b=function(t){return 1-r(1-t)},e.c=i,e.d=function(t){return t}},function(t,e,n){"use strict";function r(t,e,n,r){for(var i=0,o=n.length;i<o;++i)for(var a=n[i],s=0;s<r;++s)t[e++]=a[s];return e}function i(t,e,n,i,o){for(var a=o||[],s=0,l=0,u=n.length;l<u;++l){var c=r(t,e,n[l],i);a[s++]=c,e=c}return a.length=s,a}e.a=function(t,e,n,r){for(var i=0,o=n.length;i<o;++i)t[e++]=n[i];return e},e.b=r,e.c=i,e.d=function(t,e,n,r,o){for(var a=o||[],s=0,l=0,u=n.length;l<u;++l){var c=i(t,e,n[l],r,a[s]);a[s++]=c,e=c[c.length-1]}return a.length=s,a}},function(t,e,n){"use strict";var r,i=n(113),o=n(193),a=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),s=function(t){function e(e){return t.call(this,e)||this}return a(e,t),e.prototype.createRenderer=function(){return new o.a(this)},e}(i.a);e.a=s},function(t,e,n){"use strict";var r,i=n(25),o=n(64),a=n(12),s=n(3),l=n(67),u=n(146),c=n(88),h=n(31),p=n(114),f=n(13),d=n(276),g=n(4),y=n(0),m=n(5),v=n(6),_=n(1),b=n(9),w=n(201),O=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),x=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.feature=n,i.features=r,i}return O(e,t),e}(a.a),E=function(t){function e(e){var n=this,r=e||{};(n=t.call(this,{attributions:r.attributions,projection:void 0,state:h.a.READY,wrapX:void 0===r.wrapX||r.wrapX})||this).on,n.once,n.un,n.loader_=f.c,n.format_=r.format,n.overlaps_=void 0===r.overlaps||r.overlaps,n.url_=r.url,void 0!==r.loader?n.loader_=r.loader:void 0!==n.url_&&(Object(g.a)(n.format_,7),n.loader_=Object(w.b)(n.url_,n.format_)),n.strategy_=void 0!==r.strategy?r.strategy:d.a;var o,a,s=void 0===r.useSpatialIndex||r.useSpatialIndex;return n.featuresRtree_=s?new u.a:null,n.loadedExtentsRtree_=new u.a,n.loadingExtentsCount_=0,n.nullGeometryFeatures_={},n.idIndex_={},n.uidIndex_={},n.featureChangeKeys_={},n.featuresCollection_=null,Array.isArray(r.features)?a=r.features:r.features&&(a=(o=r.features).getArray()),s||void 0!==o||(o=new i.a(a)),void 0!==a&&n.addFeaturesInternal(a),void 0!==o&&n.bindFeaturesCollection_(o),n}return O(e,t),e.prototype.addFeature=function(t){this.addFeatureInternal(t),this.changed()},e.prototype.addFeatureInternal=function(t){var e=Object(v.c)(t);if(this.addToIndex_(e,t)){this.setupChangeEvents_(e,t);var n=t.getGeometry();if(n){var r=n.getExtent();this.featuresRtree_&&this.featuresRtree_.insert(r,t)}else this.nullGeometryFeatures_[e]=t;this.dispatchEvent(new x(p.a.ADDFEATURE,t))}else this.featuresCollection_&&this.featuresCollection_.remove(t)},e.prototype.setupChangeEvents_=function(t,e){this.featureChangeKeys_[t]=[Object(b.listen)(e,s.a.CHANGE,this.handleFeatureChange_,this),Object(b.listen)(e,l.a.PROPERTYCHANGE,this.handleFeatureChange_,this)]},e.prototype.addToIndex_=function(t,e){var n=!0,r=e.getId();return void 0!==r&&(r.toString()in this.idIndex_?n=!1:this.idIndex_[r.toString()]=e),n&&(Object(g.a)(!(t in this.uidIndex_),30),this.uidIndex_[t]=e),n},e.prototype.addFeatures=function(t){this.addFeaturesInternal(t),this.changed()},e.prototype.addFeaturesInternal=function(t){for(var e=[],n=[],r=[],i=0,o=t.length;i<o;i++){var a=t[i],s=Object(v.c)(a);this.addToIndex_(s,a)&&n.push(a)}i=0;for(var l=n.length;i<l;i++){a=n[i],s=Object(v.c)(a);this.setupChangeEvents_(s,a);var u=a.getGeometry();if(u){var c=u.getExtent();e.push(c),r.push(a)}else this.nullGeometryFeatures_[s]=a}this.featuresRtree_&&this.featuresRtree_.load(e,r);i=0;for(var h=n.length;i<h;i++)this.dispatchEvent(new x(p.a.ADDFEATURE,n[i]))},e.prototype.bindFeaturesCollection_=function(t){var e=!1;this.addEventListener(p.a.ADDFEATURE,function(n){e||(e=!0,t.push(n.feature),e=!1)}),this.addEventListener(p.a.REMOVEFEATURE,function(n){e||(e=!0,t.remove(n.feature),e=!1)}),t.addEventListener(o.a.ADD,function(t){e||(e=!0,this.addFeature(t.element),e=!1)}.bind(this)),t.addEventListener(o.a.REMOVE,function(t){e||(e=!0,this.removeFeature(t.element),e=!1)}.bind(this)),this.featuresCollection_=t},e.prototype.clear=function(t){if(t){for(var e in this.featureChangeKeys_){this.featureChangeKeys_[e].forEach(b.unlistenByKey)}this.featuresCollection_||(this.featureChangeKeys_={},this.idIndex_={},this.uidIndex_={})}else if(this.featuresRtree_)for(var n in this.featuresRtree_.forEach(this.removeFeatureInternal.bind(this)),this.nullGeometryFeatures_)this.removeFeatureInternal(this.nullGeometryFeatures_[n]);this.featuresCollection_&&this.featuresCollection_.clear(),this.featuresRtree_&&this.featuresRtree_.clear(),this.nullGeometryFeatures_={};var r=new x(p.a.CLEAR);this.dispatchEvent(r),this.changed()},e.prototype.forEachFeature=function(t){if(this.featuresRtree_)return this.featuresRtree_.forEach(t);this.featuresCollection_&&this.featuresCollection_.forEach(t)},e.prototype.forEachFeatureAtCoordinateDirect=function(t,e){var n=[t[0],t[1],t[0],t[1]];return this.forEachFeatureInExtent(n,function(n){return n.getGeometry().intersectsCoordinate(t)?e(n):void 0})},e.prototype.forEachFeatureInExtent=function(t,e){if(this.featuresRtree_)return this.featuresRtree_.forEachInExtent(t,e);this.featuresCollection_&&this.featuresCollection_.forEach(e)},e.prototype.forEachFeatureIntersectingExtent=function(t,e){return this.forEachFeatureInExtent(t,function(n){if(n.getGeometry().intersectsExtent(t)){var r=e(n);if(r)return r}})},e.prototype.getFeaturesCollection=function(){return this.featuresCollection_},e.prototype.getFeatures=function(){var t;return this.featuresCollection_?t=this.featuresCollection_.getArray().slice(0):this.featuresRtree_&&(t=this.featuresRtree_.getAll(),Object(_.d)(this.nullGeometryFeatures_)||Object(m.c)(t,Object(_.c)(this.nullGeometryFeatures_))),t},e.prototype.getFeaturesAtCoordinate=function(t){var e=[];return this.forEachFeatureAtCoordinateDirect(t,function(t){e.push(t)}),e},e.prototype.getFeaturesInExtent=function(t){return this.featuresRtree_?this.featuresRtree_.getInExtent(t):this.featuresCollection_?this.featuresCollection_.getArray().slice(0):[]},e.prototype.getClosestFeatureToCoordinate=function(t,e){var n=t[0],r=t[1],i=null,o=[NaN,NaN],a=1/0,s=[-1/0,-1/0,1/0,1/0],l=e||f.b;return this.featuresRtree_.forEachInExtent(s,function(t){if(l(t)){var e=t.getGeometry(),u=a;if((a=e.closestPointXY(n,r,o,a))<u){i=t;var c=Math.sqrt(a);s[0]=n-c,s[1]=r-c,s[2]=n+c,s[3]=r+c}}}),i},e.prototype.getExtent=function(t){return this.featuresRtree_.getExtent(t)},e.prototype.getFeatureById=function(t){var e=this.idIndex_[t.toString()];return void 0!==e?e:null},e.prototype.getFeatureByUid=function(t){var e=this.uidIndex_[t];return void 0!==e?e:null},e.prototype.getFormat=function(){return this.format_},e.prototype.getOverlaps=function(){return this.overlaps_},e.prototype.getUrl=function(){return this.url_},e.prototype.handleFeatureChange_=function(t){var e=t.target,n=Object(v.c)(e),r=e.getGeometry();if(r){var i=r.getExtent();n in this.nullGeometryFeatures_?(delete this.nullGeometryFeatures_[n],this.featuresRtree_&&this.featuresRtree_.insert(i,e)):this.featuresRtree_&&this.featuresRtree_.update(i,e)}else n in this.nullGeometryFeatures_||(this.featuresRtree_&&this.featuresRtree_.remove(e),this.nullGeometryFeatures_[n]=e);var o=e.getId();if(void 0!==o){var a=o.toString();this.idIndex_[a]!==e&&(this.removeFromIdIndex_(e),this.idIndex_[a]=e)}else this.removeFromIdIndex_(e),this.uidIndex_[n]=e;this.changed(),this.dispatchEvent(new x(p.a.CHANGEFEATURE,e))},e.prototype.hasFeature=function(t){var e=t.getId();return void 0!==e?e in this.idIndex_:Object(v.c)(t)in this.uidIndex_},e.prototype.isEmpty=function(){return this.featuresRtree_.isEmpty()&&Object(_.d)(this.nullGeometryFeatures_)},e.prototype.loadFeatures=function(t,e,n){for(var r=this.loadedExtentsRtree_,i=this.strategy_(t,e),o=function(t,o){var s=i[t];r.forEachInExtent(s,function(t){return Object(y.containsExtent)(t.extent,s)})||(++a.loadingExtentsCount_,a.dispatchEvent(new x(p.a.FEATURESLOADSTART)),a.loader_.call(a,s,e,n,function(t){--this.loadingExtentsCount_,this.dispatchEvent(new x(p.a.FEATURESLOADEND,void 0,t))}.bind(a),function(){--this.loadingExtentsCount_,this.dispatchEvent(new x(p.a.FEATURESLOADERROR))}.bind(a)),r.insert(s,{extent:s.slice()}))},a=this,s=0,l=i.length;s<l;++s)o(s);this.loading=this.loader_!==f.c&&this.loadingExtentsCount_>0},e.prototype.refresh=function(){this.clear(!0),this.loadedExtentsRtree_.clear(),t.prototype.refresh.call(this)},e.prototype.removeLoadedExtent=function(t){var e,n=this.loadedExtentsRtree_;n.forEachInExtent(t,function(n){if(Object(y.equals)(n.extent,t))return e=n,!0}),e&&n.remove(e)},e.prototype.removeFeature=function(t){var e=Object(v.c)(t);e in this.nullGeometryFeatures_?delete this.nullGeometryFeatures_[e]:this.featuresRtree_&&this.featuresRtree_.remove(t),this.removeFeatureInternal(t),this.changed()},e.prototype.removeFeatureInternal=function(t){var e=Object(v.c)(t);this.featureChangeKeys_[e].forEach(b.unlistenByKey),delete this.featureChangeKeys_[e];var n=t.getId();void 0!==n&&delete this.idIndex_[n.toString()],delete this.uidIndex_[e],this.dispatchEvent(new x(p.a.REMOVEFEATURE,t))},e.prototype.removeFromIdIndex_=function(t){var e=!1;for(var n in this.idIndex_)if(this.idIndex_[n]===t){delete this.idIndex_[n],e=!0;break}return e},e.prototype.setLoader=function(t){this.loader_=t},e.prototype.setUrl=function(t){Object(g.a)(this.format_,7),this.url_=t,this.setLoader(Object(w.b)(t,this.format_))},e}(c.a);e.a=E},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getForProjection=function(t){var e=t.getDefaultTileGrid();e||(e=p(t),t.setDefaultTileGrid(e));return e},e.wrapX=function(t,e,n){var r=e[0],i=t.getTileCoordCenter(e),o=f(n);if(Object(l.containsCoordinate)(o,i))return e;var a=Object(l.getWidth)(o),s=Math.ceil((o[0]-i[0])/a);return i[0]+=a*s,t.getTileCoordForCoordAndZ(i,r)},e.createForExtent=c,e.createXYZ=function(t){var e=t||{},n=e.extent||Object(s.get)("EPSG:3857").getExtent(),r={extent:n,minZoom:e.minZoom,tileSize:e.tileSize,resolutions:h(n,e.maxZoom,e.tileSize,e.maxResolution)};return new i.a(r)},e.createForProjection=p,e.extentFromProjection=f;var r=n(174),i=n(90),o=n(43),a=n(85),s=n(2),l=n(0),u=n(28);function c(t,e,n,o){var a=void 0!==o?o:r.a.TOP_LEFT,s=h(t,e,n);return new i.a({extent:t,origin:Object(l.getCorner)(t,a),resolutions:s,tileSize:n})}function h(t,e,n,r){for(var i=void 0!==e?e:a.a,o=Object(l.getHeight)(t),s=Object(l.getWidth)(t),c=Object(u.d)(void 0!==n?n:a.b),h=r>0?r:Math.max(s/c[0],o/c[1]),p=i+1,f=new Array(p),d=0;d<p;++d)f[d]=h/Math.pow(2,d);return f}function p(t,e,n,r){return c(f(t),e,n,r)}function f(t){var e=(t=Object(s.get)(t)).getExtent();if(!e){var n=180*s.METERS_PER_UNIT[o.b.DEGREES]/t.getMetersPerUnit();e=Object(l.createOrUpdate)(-n,-n,n,n)}return e}},function(t,e,n){"use strict";var r,i=n(3),o=n(157),a=n(303),s=n(116),l=n(30),u=n(151),c=n(89),h=n(92),p=n(2),f=n(38),d=n(51),g=n(6),y=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),m=function(t){function e(e){var n=t.call(this,{attributions:e.attributions,cacheSize:e.cacheSize,opaque:e.opaque,projection:e.projection,state:e.state,tileGrid:e.tileGrid,tileLoadFunction:e.tileLoadFunction?e.tileLoadFunction:v,tilePixelRatio:e.tilePixelRatio,tileUrlFunction:e.tileUrlFunction,url:e.url,urls:e.urls,wrapX:e.wrapX,transition:e.transition,key:e.key,attributionsCollapsible:e.attributionsCollapsible,zDirection:e.zDirection})||this;return n.crossOrigin=void 0!==e.crossOrigin?e.crossOrigin:null,n.tileClass=void 0!==e.tileClass?e.tileClass:o.a,n.tileCacheForProjection={},n.tileGridForProjection={},n.reprojectionErrorThreshold_=e.reprojectionErrorThreshold,n.contextOptions_=!1===e.imageSmoothing?h.b:void 0,n.renderReprojectionEdges_=!1,n}return y(e,t),e.prototype.canExpireCache=function(){if(!c.a)return t.prototype.canExpireCache.call(this);if(this.tileCache.canExpireCache())return!0;for(var e in this.tileCacheForProjection)if(this.tileCacheForProjection[e].canExpireCache())return!0;return!1},e.prototype.expireCache=function(e,n){if(c.a){var r=this.getTileCacheForProjection(e);for(var i in this.tileCache.expireCache(this.tileCache==r?n:{}),this.tileCacheForProjection){var o=this.tileCacheForProjection[i];o.expireCache(o==r?n:{})}}else t.prototype.expireCache.call(this,e,n)},e.prototype.getContextOptions=function(){return this.contextOptions_},e.prototype.getGutterForProjection=function(t){return c.a&&this.getProjection()&&t&&!Object(p.equivalent)(this.getProjection(),t)?0:this.getGutter()},e.prototype.getGutter=function(){return 0},e.prototype.getKey=function(){return t.prototype.getKey.call(this)+(this.contextOptions_?"\n"+JSON.stringify(this.contextOptions_):"")},e.prototype.getOpaque=function(e){return!(c.a&&this.getProjection()&&e&&!Object(p.equivalent)(this.getProjection(),e))&&t.prototype.getOpaque.call(this,e)},e.prototype.getTileGridForProjection=function(e){if(!c.a)return t.prototype.getTileGridForProjection.call(this,e);var n=this.getProjection();if(!this.tileGrid||n&&!Object(p.equivalent)(n,e)){var r=Object(g.c)(e);return r in this.tileGridForProjection||(this.tileGridForProjection[r]=Object(d.getForProjection)(e)),this.tileGridForProjection[r]}return this.tileGrid},e.prototype.getTileCacheForProjection=function(e){if(!c.a)return t.prototype.getTileCacheForProjection.call(this,e);var n=this.getProjection();if(!n||Object(p.equivalent)(n,e))return this.tileCache;var r=Object(g.c)(e);return r in this.tileCacheForProjection||(this.tileCacheForProjection[r]=new s.a(this.tileCache.highWaterMark)),this.tileCacheForProjection[r]},e.prototype.createTile_=function(t,e,n,r,o,a){var s=[t,e,n],u=this.getTileCoordForTileUrlFunction(s,o),c=u?this.tileUrlFunction(u,r,o):void 0,h=new this.tileClass(s,void 0!==c?l.a.IDLE:l.a.EMPTY,void 0!==c?c:"",this.crossOrigin,this.tileLoadFunction,this.tileOptions);return h.key=a,h.addEventListener(i.a.CHANGE,this.handleTileChange.bind(this)),h},e.prototype.getTile=function(t,e,n,r,i){var o=this.getProjection();if(c.a&&o&&i&&!Object(p.equivalent)(o,i)){var s=this.getTileCacheForProjection(i),l=[t,e,n],u=void 0,h=Object(f.d)(l);s.containsKey(h)&&(u=s.get(h));var d=this.getKey();if(u&&u.key==d)return u;var g=this.getTileGridForProjection(o),y=this.getTileGridForProjection(i),m=this.getTileCoordForTileUrlFunction(l,i),v=new a.a(o,g,i,y,l,m,this.getTilePixelRatio(r),this.getGutter(),function(t,e,n,r){return this.getTileInternal(t,e,n,r,o)}.bind(this),this.reprojectionErrorThreshold_,this.renderReprojectionEdges_,this.contextOptions_);return v.key=d,u?(v.interimTile=u,v.refreshInterimChain(),s.replace(h,v)):s.set(h,v),v}return this.getTileInternal(t,e,n,r,o||i)},e.prototype.getTileInternal=function(t,e,n,r,i){var o=null,a=Object(f.e)(t,e,n),s=this.getKey();if(this.tileCache.containsKey(a)){if((o=this.tileCache.get(a)).key!=s){var u=o;o=this.createTile_(t,e,n,r,i,s),u.getState()==l.a.IDLE?o.interimTile=u.interimTile:o.interimTile=u,o.refreshInterimChain(),this.tileCache.replace(a,o)}}else o=this.createTile_(t,e,n,r,i,s),this.tileCache.set(a,o);return o},e.prototype.setRenderReprojectionEdges=function(t){if(c.a&&this.renderReprojectionEdges_!=t){for(var e in this.renderReprojectionEdges_=t,this.tileCacheForProjection)this.tileCacheForProjection[e].clear();this.changed()}},e.prototype.setTileGridForProjection=function(t,e){if(c.a){var n=Object(p.get)(t);if(n){var r=Object(g.c)(n);r in this.tileGridForProjection||(this.tileGridForProjection[r]=e)}}},e}(u.a);function v(t,e){t.getImage().src=e}e.a=m},function(t,e,n){"use strict";e.a=function(t){return o(Object(r.d)(t,!1))},e.b=o,e.c=function(t){var e=Object(r.d)(t,!1),n=Date.parse(e);return isNaN(n)?void 0:n/1e3},e.d=function(t){return a(Object(r.d)(t,!1))},e.e=a,e.f=function(t){return s(Object(r.d)(t,!1))},e.g=s,e.h=function(t){return Object(r.d)(t,!1).trim()},e.i=function(t,e){l(t,e?"1":"0")},e.j=function(t,e){t.appendChild(Object(r.f)().createCDATASection(e))},e.k=function(t,e){var n=new Date(1e3*e),o=n.getUTCFullYear()+"-"+Object(i.b)(n.getUTCMonth()+1,2)+"-"+Object(i.b)(n.getUTCDate(),2)+"T"+Object(i.b)(n.getUTCHours(),2)+":"+Object(i.b)(n.getUTCMinutes(),2)+":"+Object(i.b)(n.getUTCSeconds(),2)+"Z";t.appendChild(Object(r.f)().createTextNode(o))},e.l=function(t,e){var n=e.toPrecision();t.appendChild(Object(r.f)().createTextNode(n))},e.m=function(t,e){var n=e.toString();t.appendChild(Object(r.f)().createTextNode(n))},e.n=l;var r=n(27),i=n(107);function o(t){var e=/^\s*(true|1)|(false|0)\s*$/.exec(t);return e?void 0!==e[1]||!1:void 0}function a(t){var e=/^\s*([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?)\s*$/i.exec(t);return e?parseFloat(e[1]):void 0}function s(t){var e=/^\s*(\d+)\s*$/.exec(t);return e?parseInt(e[1],10):void 0}function l(t,e){t.appendChild(Object(r.f)().createTextNode(e))}},function(t,e,n){"use strict";e.b=function(t,e){if(!t.visible)return!1;var n=e.resolution;if(n<t.minResolution||n>=t.maxResolution)return!1;var r=e.zoom;return r>t.minZoom&&r<=t.maxZoom};var r,i=n(178),o=n(3),a=n(179),s=n(71),l=n(31),u=n(4),c=n(1),h=n(9),p=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),f=function(t){function e(e){var n=this,r=Object(c.a)({},e);delete r.source,(n=t.call(this,r)||this).on,n.once,n.un,n.mapPrecomposeKey_=null,n.mapRenderKey_=null,n.sourceChangeKey_=null,n.renderer_=null,e.render&&(n.render=e.render),e.map&&n.setMap(e.map),n.addChangeListener(a.a.SOURCE,n.handleSourcePropertyChange_);var i=e.source?e.source:null;return n.setSource(i),n}return p(e,t),e.prototype.getLayersArray=function(t){var e=t||[];return e.push(this),e},e.prototype.getLayerStatesArray=function(t){var e=t||[];return e.push(this.getLayerState()),e},e.prototype.getSource=function(){return this.get(a.a.SOURCE)||null},e.prototype.getSourceState=function(){var t=this.getSource();return t?t.getState():l.a.UNDEFINED},e.prototype.handleSourceChange_=function(){this.changed()},e.prototype.handleSourcePropertyChange_=function(){this.sourceChangeKey_&&(Object(h.unlistenByKey)(this.sourceChangeKey_),this.sourceChangeKey_=null);var t=this.getSource();t&&(this.sourceChangeKey_=Object(h.listen)(t,o.a.CHANGE,this.handleSourceChange_,this)),this.changed()},e.prototype.getFeatures=function(t){return this.renderer_?this.renderer_.getFeatures(t):new Promise(function(t){return t([])})},e.prototype.render=function(t,e){var n=this.getRenderer();if(n.prepareFrame(t))return n.renderFrame(t,e)},e.prototype.setMap=function(t){this.mapPrecomposeKey_&&(Object(h.unlistenByKey)(this.mapPrecomposeKey_),this.mapPrecomposeKey_=null),t||this.changed(),this.mapRenderKey_&&(Object(h.unlistenByKey)(this.mapRenderKey_),this.mapRenderKey_=null),t&&(this.mapPrecomposeKey_=Object(h.listen)(t,s.a.PRECOMPOSE,function(t){var e=t.frameState.layerStatesArray,n=this.getLayerState(!1);Object(u.a)(!e.some(function(t){return t.layer===n.layer}),67),e.push(n)},this),this.mapRenderKey_=Object(h.listen)(this,o.a.CHANGE,t.render,t),this.changed())},e.prototype.setSource=function(t){this.set(a.a.SOURCE,t)},e.prototype.getRenderer=function(){return this.renderer_||(this.renderer_=this.createRenderer()),this.renderer_},e.prototype.hasRenderer=function(){return!!this.renderer_},e.prototype.createRenderer=function(){return null},e.prototype.disposeInternal=function(){this.setSource(null),t.prototype.disposeInternal.call(this)},e}(i.a);e.a=f},function(t,e,n){"use strict";var r=n(3);e.a={SINGLECLICK:"singleclick",CLICK:r.a.CLICK,DBLCLICK:r.a.DBLCLICK,POINTERDRAG:"pointerdrag",POINTERMOVE:"pointermove",POINTERDOWN:"pointerdown",POINTERUP:"pointerup",POINTEROVER:"pointerover",POINTEROUT:"pointerout",POINTERENTER:"pointerenter",POINTERLEAVE:"pointerleave",POINTERCANCEL:"pointercancel"}},function(t,e,n){"use strict";e.c=function(t,e,n,r,i,o){for(var a=o||[],s=0,l=e;l<n;l+=r){var u=t[l],c=t[l+1];a[s++]=i[0]*u+i[2]*c+i[4],a[s++]=i[1]*u+i[3]*c+i[5]}o&&a.length!=s&&(a.length=s);return a},e.a=function(t,e,n,r,i,o,a){for(var s=a||[],l=Math.cos(i),u=Math.sin(i),c=o[0],h=o[1],p=0,f=e;f<n;f+=r){var d=t[f]-c,g=t[f+1]-h;s[p++]=c+d*l-g*u,s[p++]=h+d*u+g*l;for(var y=f+2;y<f+r;++y)s[p++]=t[y]}a&&s.length!=p&&(s.length=p);return s},e.b=function(t,e,n,r,i,o,a,s){for(var l=s||[],u=a[0],c=a[1],h=0,p=e;p<n;p+=r){var f=t[p]-u,d=t[p+1]-c;l[h++]=u+i*f,l[h++]=c+o*d;for(var g=p+2;g<p+r;++g)l[h++]=t[g]}s&&l.length!=h&&(l.length=h);return l},e.d=function(t,e,n,r,i,o,a){for(var s=a||[],l=0,u=e;u<n;u+=r){s[l++]=t[u]+i,s[l++]=t[u+1]+o;for(var c=u+2;c<u+r;++c)s[l++]=t[c]}a&&s.length!=l&&(s.length=l);return s}},function(t,e,n){"use strict";function r(t,e,n,r,i){for(var o=void 0!==i?i:[],a=0,s=e;s<n;s+=r)o[a++]=t.slice(s,s+r);return o.length=a,o}function i(t,e,n,i,o){for(var a=void 0!==o?o:[],s=0,l=0,u=n.length;l<u;++l){var c=n[l];a[s++]=r(t,e,c,i,a[s]),e=c}return a.length=s,a}e.a=r,e.b=i,e.c=function(t,e,n,r,o){for(var a=void 0!==o?o:[],s=0,l=0,u=n.length;l<u;++l){var c=n[l];a[s++]=i(t,e,c,r,a[s]),e=c[c.length-1]}return a.length=s,a}},function(t,e,n){"use strict";e.b=function(t,e,n){var r=t.getCenterInternal();if(r){var i=[r[0]+e[0],r[1]+e[1]];t.animateInternal({duration:void 0!==n?n:250,easing:a.d,center:t.getConstrainedCenter(i)})}},e.c=function(t,e,n,r){var i=t.getZoom();if(void 0===i)return;var o=t.getConstrainedZoom(i+e),s=t.getResolutionForZoom(o);t.getAnimating()&&t.cancelAnimations();t.animate({resolution:s,anchor:n,duration:void 0!==r?r:250,easing:a.b})};var r,i=n(24),o=n(155),a=n(47),s=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),l=function(t){function e(e){var n=t.call(this)||this;return n.on,n.once,n.un,e&&e.handleEvent&&(n.handleEvent=e.handleEvent),n.map_=null,n.setActive(!0),n}return s(e,t),e.prototype.getActive=function(){return this.get(o.a.ACTIVE)},e.prototype.getMap=function(){return this.map_},e.prototype.handleEvent=function(t){return!0},e.prototype.setActive=function(t){this.set(o.a.ACTIVE,t)},e.prototype.setMap=function(t){this.map_=t},e}(i.a);e.a=l},function(t,e,n){"use strict";function r(t){"@babel/helpers - typeof";return(r="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}n.d(e,"a",function(){return i}),n.d(e,"d",function(){return o}),n.d(e,"b",function(){return a}),n.d(e,"c",function(){return s});function i(t,e,n){if(!s(n=n||{}))throw new Error("options is invalid");var r=n.bbox,i=n.id;if(void 0===t)throw new Error("geometry is required");if(e&&e.constructor!==Object)throw new Error("properties must be an Object");r&&l(r),i&&u(i);var o={type:"Feature"};return i&&(o.id=i),r&&(o.bbox=r),o.properties=e||{},o.geometry=t,o}function o(t,e,n){if(!t)throw new Error("coordinates is required");if(t.length<2)throw new Error("coordinates must be an array of two or more positions");if(!a(t[0][1])||!a(t[0][1]))throw new Error("coordinates must contain numbers");return i({type:"LineString",coordinates:t},e,n)}function a(t){return!isNaN(t)&&null!==t&&!Array.isArray(t)}function s(t){return!!t&&t.constructor===Object}function l(t){if(!t)throw new Error("bbox is required");if(!Array.isArray(t))throw new Error("bbox must be an Array");if(4!==t.length&&6!==t.length)throw new Error("bbox must be an Array of 4 or 6 numbers");t.forEach(function(t){if(!a(t))throw new Error("bbox must only contain numbers")})}function u(t){if(!t)throw new Error("id is required");if(-1===["string","number"].indexOf(r(t)))throw new Error("id must be a number or a string")}},function(t,e,n){"use strict";n.d(e,"i",function(){return r}),n.d(e,"c",function(){return i}),n.d(e,"a",function(){return o}),n.d(e,"f",function(){return a}),n.d(e,"b",function(){return s}),n.d(e,"d",function(){return l}),n.d(e,"e",function(){return u}),n.d(e,"g",function(){return c}),n.d(e,"h",function(){return h});var r={Default:"default",Classic:"classic",Modern:"modern"},i={N:"n",S:"s",E:"e",W:"w",NE:"ne",NW:"nw",SE:"se",SW:"sw"},o={Rectangle:"Rectangle",Arrow:"Arrow",Line:"Line",Icon:"Icon",Point:"Point",MultiPoint:"MultiPoint",Freehand:"Freehand",ClosedFreehand:"ClosedFreehand",CompoundFreehand:"CompoundFreehand",Ellipse:"Ellipse",Circle:"Circle",Polygon:"Polygon",LineString:"LineString"},a={Transform:"Transform",Modify:"Modify",Wand:"Wand",Brush:"Brush",Eraser:"Eraser"},s={Pristine:1,Added:2,Modified:3,Deleted:4},l={ZoomSlider:"zoomslider",ScaleLine:"scaleline",Overview:"overview",Barcode:"barcode",Magnifier:"magnifier",ColorAdjustments:"coloradjustments",LayerSwitch:"layerswitch",DimensionSelector:"dimensionselector",Filename:"filename",Snapshot:"shapshot",Rotation:"rotation",Attribution:"attribution",Fullscreen:"fullscreen"},u="rgba(255, 255, 255, 0.2)",c={DimensionsChanged:"change:dimension",ViewChanged:"viewchanged",TilesError:"tileserror",SlideLoadError:"SlideLoadError",FilenameClick:"click:filename",AnnotationLayerChanged:"layer:change"},h={Min:"min","1X":"1","2X":"2","5X":"5","10X":"10","20X":"20","40X":"40","1:1":"1:1",Max:"max"}},function(t,e,n){"use strict";e.b=function(t){return"string"===typeof t?t:p(t)},e.a=function(t){return Array.isArray(t)?t:c(t)},e.d=p,e.c=function(t){a.test(t)&&(t=s(t));return o.test(t)||0===t.indexOf("rgba(")||0===t.indexOf("rgb(")};var r=n(4),i=n(7),o=/^#([a-f0-9]{3}|[a-f0-9]{4}(?:[a-f0-9]{2}){0,2})$/i,a=/^([a-z]*)$|^hsla?\(.*\)$/i;function s(t){var e=document.createElement("div");if(e.style.color=t,""!==e.style.color){document.body.appendChild(e);var n=getComputedStyle(e).color;return document.body.removeChild(e),n}return""}var l,u,c=(l={},u=0,function(t){var e;if(l.hasOwnProperty(t))e=l[t];else{if(u>=1024){var n=0;for(var i in l)0===(3&n++)&&(delete l[i],--u)}e=function(t){var e,n,i,l,u;if(a.exec(t)&&(t=s(t)),o.exec(t)){var c=t.length-1,p=void 0;p=c<=4?1:2;var f=4===c||8===c;e=parseInt(t.substr(1+0*p,p),16),n=parseInt(t.substr(1+1*p,p),16),i=parseInt(t.substr(1+2*p,p),16),l=f?parseInt(t.substr(1+3*p,p),16):255,1==p&&(e=(e<<4)+e,n=(n<<4)+n,i=(i<<4)+i,f&&(l=(l<<4)+l)),u=[e,n,i,l/255]}else 0==t.indexOf("rgba(")?h(u=t.slice(5,-1).split(",").map(Number)):0==t.indexOf("rgb(")?((u=t.slice(4,-1).split(",").map(Number)).push(1),h(u)):Object(r.a)(!1,14);return u}(t),l[t]=e,++u}return e});function h(t){return t[0]=Object(i.a)(t[0]+.5|0,0,255),t[1]=Object(i.a)(t[1]+.5|0,0,255),t[2]=Object(i.a)(t[2]+.5|0,0,255),t[3]=Object(i.a)(t[3],0,1),t}function p(t){var e=t[0];e!=(0|e)&&(e=e+.5|0);var n=t[1];n!=(0|n)&&(n=n+.5|0);var r=t[2];return r!=(0|r)&&(r=r+.5|0),"rgba("+e+","+n+","+r+","+(void 0===t[3]?1:t[3])+")"}},function(t,e,n){"use strict";var r=function(){function t(t){var e=t||{};this.color_=void 0!==e.color?e.color:null}return t.prototype.clone=function(){var e=this.getColor();return new t({color:Array.isArray(e)?e.slice():e||void 0})},t.prototype.getColor=function(){return this.color_},t.prototype.setColor=function(t){this.color_=t},t}();e.a=r},function(t,e,n){"use strict";e.b=p;var r,i=n(3),o=n(103),a=n(33),s=n(39),l=n(0),u=n(9),c=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),h=function(t){function e(e,n,r,i,o,s){var l=t.call(this,e,n,r,a.a.IDLE)||this;return l.src_=i,l.image_=new Image,null!==o&&(l.image_.crossOrigin=o),l.unlisten_=null,l.state=a.a.IDLE,l.imageLoadFunction_=s,l}return c(e,t),e.prototype.getImage=function(){return this.image_},e.prototype.handleImageError_=function(){this.state=a.a.ERROR,this.unlistenImage_(),this.changed()},e.prototype.handleImageLoad_=function(){void 0===this.resolution&&(this.resolution=Object(l.getHeight)(this.extent)/this.image_.height),this.state=a.a.LOADED,this.unlistenImage_(),this.changed()},e.prototype.load=function(){this.state!=a.a.IDLE&&this.state!=a.a.ERROR||(this.state=a.a.LOADING,this.changed(),this.imageLoadFunction_(this,this.src_),this.unlisten_=p(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this)))},e.prototype.setImage=function(t){this.image_=t,this.resolution=Object(l.getHeight)(this.extent)/this.image_.height},e.prototype.unlistenImage_=function(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)},e}(o.a);function p(t,e,n){var r=t;if(r.src&&s.c){var o=!0;return r.decode().then(function(){o&&e()}).catch(function(t){o&&("EncodingError"===t.name&&"Invalid image type."===t.message?e():n())}),function(){o=!1}}var a=[Object(u.listenOnce)(r,i.a.LOAD,e),Object(u.listenOnce)(r,i.a.ERROR,n)];return function(){a.forEach(u.unlistenByKey)}}e.a=h},function(t,e,n){"use strict";e.a={ADD:"add",REMOVE:"remove"}},function(t,e,n){"use strict";e.a={ANIMATING:0,INTERACTING:1}},function(t,e,n){"use strict";e.b=function(t,e){t.getImage().src=e};var r,i=n(12),o=n(33),a=n(320),s=n(88),l=n(89),u=n(92),c=n(6),h=n(0),p=n(2),f=n(5),d=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),g="imageloadstart",y="imageloadend",m="imageloaderror",v=function(t){function e(e,n){var r=t.call(this,e)||this;return r.image=n,r}return d(e,t),e}(i.a),_=function(t){function e(e){var n=t.call(this,{attributions:e.attributions,projection:e.projection,state:e.state})||this;return n.on,n.once,n.un,n.resolutions_=void 0!==e.resolutions?e.resolutions:null,n.reprojectedImage_=null,n.reprojectedRevision_=0,n.contextOptions_=!1===e.imageSmoothing?u.b:void 0,n}return d(e,t),e.prototype.getResolutions=function(){return this.resolutions_},e.prototype.getContextOptions=function(){return this.contextOptions_},e.prototype.findNearestResolution=function(t){if(this.resolutions_){var e=Object(f.h)(this.resolutions_,t,0);t=this.resolutions_[e]}return t},e.prototype.getImage=function(t,e,n,r){var i=this.getProjection();if(l.a&&i&&r&&!Object(p.equivalent)(i,r)){if(this.reprojectedImage_){if(this.reprojectedRevision_==this.getRevision()&&Object(p.equivalent)(this.reprojectedImage_.getProjection(),r)&&this.reprojectedImage_.getResolution()==e&&Object(h.equals)(this.reprojectedImage_.getExtent(),t))return this.reprojectedImage_;this.reprojectedImage_.dispose(),this.reprojectedImage_=null}return this.reprojectedImage_=new a.a(i,r,t,e,n,function(t,e,n){return this.getImageInternal(t,e,n,i)}.bind(this),this.contextOptions_),this.reprojectedRevision_=this.getRevision(),this.reprojectedImage_}return i&&(r=i),this.getImageInternal(t,e,n,r)},e.prototype.getImageInternal=function(t,e,n,r){return Object(c.b)()},e.prototype.handleImageChange=function(t){var e=t.target;switch(e.getState()){case o.a.LOADING:this.loading=!0,this.dispatchEvent(new v(g,e));break;case o.a.LOADED:this.loading=!1,this.dispatchEvent(new v(y,e));break;case o.a.ERROR:this.loading=!1,this.dispatchEvent(new v(m,e))}},e}(s.a);e.a=_},function(t,e,n){"use strict";e.a={PROPERTYCHANGE:"propertychange"}},function(t,e,n){"use strict";var r,i=n(69),o=n(12),a=n(13),s=n(1),l=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),u=function(t){function e(e){var n=t.call(this)||this;return n.eventTarget_=e,n.pendingRemovals_=null,n.dispatching_=null,n.listeners_=null,n}return l(e,t),e.prototype.addEventListener=function(t,e){if(t&&e){var n=this.listeners_||(this.listeners_={}),r=n[t]||(n[t]=[]);-1===r.indexOf(e)&&r.push(e)}},e.prototype.dispatchEvent=function(t){var e="string"===typeof t?new o.a(t):t,n=e.type;e.target||(e.target=this.eventTarget_||this);var r,i=this.listeners_&&this.listeners_[n];if(i){var s=this.dispatching_||(this.dispatching_={}),l=this.pendingRemovals_||(this.pendingRemovals_={});n in s||(s[n]=0,l[n]=0),++s[n];for(var u=0,c=i.length;u<c;++u)if(!1===(r="handleEvent"in i[u]?i[u].handleEvent(e):i[u].call(this,e))||e.propagationStopped){r=!1;break}if(--s[n],0===s[n]){var h=l[n];for(delete l[n];h--;)this.removeEventListener(n,a.c);delete s[n]}return r}},e.prototype.disposeInternal=function(){this.listeners_&&Object(s.b)(this.listeners_)},e.prototype.getListeners=function(t){return this.listeners_&&this.listeners_[t]||void 0},e.prototype.hasListener=function(t){return!!this.listeners_&&(t?t in this.listeners_:Object.keys(this.listeners_).length>0)},e.prototype.removeEventListener=function(t,e){var n=this.listeners_&&this.listeners_[t];if(n){var r=n.indexOf(e);-1!==r&&(this.pendingRemovals_&&t in this.pendingRemovals_?(n[r]=a.c,++this.pendingRemovals_[t]):(n.splice(r,1),0===n.length&&delete this.listeners_[t]))}},e}(i.a);e.a=u},function(t,e,n){"use strict";var r=function(){function t(){this.disposed=!1}return t.prototype.dispose=function(){this.disposed||(this.disposed=!0,this.disposeInternal())},t.prototype.disposeInternal=function(){},t}();e.a=r},function(t,e,n){"use strict";var r=function(){function t(t){var e=t||{};this.color_=void 0!==e.color?e.color:null,this.lineCap_=e.lineCap,this.lineDash_=void 0!==e.lineDash?e.lineDash:null,this.lineDashOffset_=e.lineDashOffset,this.lineJoin_=e.lineJoin,this.miterLimit_=e.miterLimit,this.width_=e.width}return t.prototype.clone=function(){var e=this.getColor();return new t({color:Array.isArray(e)?e.slice():e||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()})},t.prototype.getColor=function(){return this.color_},t.prototype.getLineCap=function(){return this.lineCap_},t.prototype.getLineDash=function(){return this.lineDash_},t.prototype.getLineDashOffset=function(){return this.lineDashOffset_},t.prototype.getLineJoin=function(){return this.lineJoin_},t.prototype.getMiterLimit=function(){return this.miterLimit_},t.prototype.getWidth=function(){return this.width_},t.prototype.setColor=function(t){this.color_=t},t.prototype.setLineCap=function(t){this.lineCap_=t},t.prototype.setLineDash=function(t){this.lineDash_=t},t.prototype.setLineDashOffset=function(t){this.lineDashOffset_=t},t.prototype.setLineJoin=function(t){this.lineJoin_=t},t.prototype.setMiterLimit=function(t){this.miterLimit_=t},t.prototype.setWidth=function(t){this.width_=t},t}();e.a=r},function(t,e,n){"use strict";e.a={PRERENDER:"prerender",POSTRENDER:"postrender",PRECOMPOSE:"precompose",POSTCOMPOSE:"postcompose",RENDERCOMPLETE:"rendercomplete"}},function(t,e,n){"use strict";e.a=i,e.b=o,e.e=a,e.c=l,e.d=function(t,e,n,r,i,o,a,s){for(var u=0,c=n.length;u<c;++u){var h=n[u],p=[];a=l(t,e,h,r,i,o,a,p),s.push(p),e=h[h.length-1]}return a};var r=n(7);function i(t,e,n,i,o,a,s){var l=(n-e)/i;if(l<3){for(;e<n;e+=i)a[s++]=t[e],a[s++]=t[e+1];return s}var u=new Array(l);u[0]=1,u[l-1]=1;for(var c=[e,n-i],h=0;c.length>0;){for(var p=c.pop(),f=c.pop(),d=0,g=t[f],y=t[f+1],m=t[p],v=t[p+1],_=f+i;_<p;_+=i){var b=t[_],w=t[_+1],O=Object(r.h)(b,w,g,y,m,v);O>d&&(h=_,d=O)}d>o&&(u[(h-e)/i]=1,f+i<h&&c.push(f,h),h+i<p&&c.push(h,p))}for(_=0;_<l;++_)u[_]&&(a[s++]=t[e+_*i],a[s++]=t[e+_*i+1]);return s}function o(t,e,n,r,o,a,s,l){for(var u=0,c=n.length;u<c;++u){var h=n[u];s=i(t,e,h,r,o,a,s),l.push(s),e=h}return s}function a(t,e){return e*Math.round(t/e)}function s(t,e,n,r,i,o,s){if(e==n)return s;var l,u,c=a(t[e],i),h=a(t[e+1],i);e+=r,o[s++]=c,o[s++]=h;do{if(l=a(t[e],i),u=a(t[e+1],i),(e+=r)==n)return o[s++]=l,o[s++]=u,s}while(l==c&&u==h);for(;e<n;){var p=a(t[e],i),f=a(t[e+1],i);if(e+=r,p!=l||f!=u){var d=l-c,g=u-h,y=p-c,m=f-h;d*m==g*y&&(d<0&&y<d||d==y||d>0&&y>d)&&(g<0&&m<g||g==m||g>0&&m>g)?(l=p,u=f):(o[s++]=l,o[s++]=u,c=l,h=u,l=p,u=f)}}return o[s++]=l,o[s++]=u,s}function l(t,e,n,r,i,o,a,l){for(var u=0,c=n.length;u<c;++u){var h=n[u];a=s(t,e,h,r,i,o,a),l.push(a),e=h}return a}},function(t,e,n){"use strict";n.d(e,"d",function(){return i}),n.d(e,"e",function(){return o}),n.d(e,"a",function(){return a}),n.d(e,"b",function(){return s});var r={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},i=[r.FILL],o=[r.STROKE],a=[r.BEGIN_PATH],s=[r.CLOSE_PATH];e.c=r},function(t,e,n){"use strict";e.a={ARRAY_BUFFER:"arraybuffer",JSON:"json",TEXT:"text",XML:"xml"}},function(t,e,n){"use strict";var r,i=n(68),o=n(3),a=n(30),s=n(6),l=n(47),u=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),c=function(t){function e(e,n,r){var i=t.call(this)||this,o=r||{};return i.tileCoord=e,i.state=n,i.interimTile=null,i.key="",i.transition_=void 0===o.transition?250:o.transition,i.transitionStarts_={},i}return u(e,t),e.prototype.changed=function(){this.dispatchEvent(o.a.CHANGE)},e.prototype.release=function(){},e.prototype.getKey=function(){return this.key+"/"+this.tileCoord},e.prototype.getInterimTile=function(){if(!this.interimTile)return this;var t=this.interimTile;do{if(t.getState()==a.a.LOADED)return this.transition_=0,t;t=t.interimTile}while(t);return this},e.prototype.refreshInterimChain=function(){if(this.interimTile){var t=this.interimTile,e=this;do{if(t.getState()==a.a.LOADED){t.interimTile=null;break}t.getState()==a.a.LOADING?e=t:t.getState()==a.a.IDLE?e.interimTile=t.interimTile:e=t,t=e.interimTile}while(t)}},e.prototype.getTileCoord=function(){return this.tileCoord},e.prototype.getState=function(){return this.state},e.prototype.setState=function(t){if(this.state!==a.a.ERROR&&this.state>t)throw new Error("Tile load sequence violation");this.state=t,this.changed()},e.prototype.load=function(){Object(s.b)()},e.prototype.getAlpha=function(t,e){if(!this.transition_)return 1;var n=this.transitionStarts_[t];if(n){if(-1===n)return 1}else n=e,this.transitionStarts_[t]=n;var r=e-n+1e3/60;return r>=this.transition_?1:Object(l.a)(r/this.transition_)},e.prototype.inTransition=function(t){return!!this.transition_&&-1!==this.transitionStarts_[t]},e.prototype.endTransition=function(t){this.transition_&&(this.transitionStarts_[t]=-1)},e}(i.a);e.a=c},function(t,e,n){"use strict";e.a=function(t,e){for(var n=t.length,r=new Array(n),i=0;i<n;++i)r[i]=a(t[i],e);return s(r)},e.b=s,e.d=function(t,e,n){return},e.c=function(t){var e=[],n=/\{([a-z])-([a-z])\}/.exec(t);if(n){var r=n[1].charCodeAt(0),i=n[2].charCodeAt(0),o=void 0;for(o=r;o<=i;++o)e.push(t.replace(n[0],String.fromCharCode(o)));return e}if(n=/\{(\d+)-(\d+)\}/.exec(t)){for(var a=parseInt(n[2],10),s=parseInt(n[1],10);s<=a;s++)e.push(t.replace(n[0],s.toString()));return e}return e.push(t),e};var r=n(4),i=n(7),o=n(38);function a(t,e){var n=/\{z\}/g,i=/\{x\}/g,o=/\{y\}/g,a=/\{-y\}/g;return function(s,l,u){return s?t.replace(n,s[0].toString()).replace(i,s[1].toString()).replace(o,s[2].toString()).replace(a,function(){var t=s[0],n=e.getFullTileRange(t);return Object(r.a)(n,55),(n.getHeight()-s[2]-1).toString()}):void 0}}function s(t){return 1===t.length?t[0]:function(e,n,r){if(e){var a=Object(o.f)(e),s=Object(i.e)(a,t.length);return t[s](e,n,r)}}}},function(t,e,n){"use strict";e.a=function(t,e){var n=[];Object.keys(e).forEach(function(t){null!==e[t]&&void 0!==e[t]&&n.push(t+"="+encodeURIComponent(e[t]))});var r=n.join("&");return(t=-1===(t=t.replace(/[?&]$/,"")).indexOf("?")?t+"?":t+"&")+r}},function(t,e,n){"use strict";var r=function(){function t(t){this.tagName_=t}return t.prototype.getTagName=function(){return this.tagName_},t}();e.a=r},function(t,e,n){"use strict";var r,i=n(97),o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=function(t){function e(e,n,r,i){var o=t.call(this,e,n)||this;return o.expression=r,o.matchCase=i,o}return o(e,t),e}(i.a);e.a=a},function(t,e,n){"use strict";n.d(e,"a",function(){return i}),n.d(e,"b",function(){return o}),n.d(e,"c",function(){return a}),n.d(e,"d",function(){return s});var r=n(59);function i(t){if(!t)throw new Error("obj is required");var e=o(t);if(e.length>1&&Object(r.b)(e[0])&&Object(r.b)(e[1]))return e;throw new Error("Coordinate is not a valid Point")}function o(t){if(!t)throw new Error("obj is required");var e;if(t.length?e=t:t.coordinates?e=t.coordinates:t.geometry&&t.geometry.coordinates&&(e=t.geometry.coordinates),e)return function t(e){if(e.length>1&&Object(r.b)(e[0])&&Object(r.b)(e[1]))return!0;if(Array.isArray(e[0])&&e[0].length)return t(e[0]);throw new Error("coordinates must only contain numbers")}(e),e;throw new Error("No valid coordinates")}function a(t){if(!t)throw new Error("geojson is required");if(void 0!==t.geometry)return t.geometry;if(t.coordinates||t.geometries)return t;throw new Error("geojson must be a valid Feature or Geometry Object")}function s(t,e){if(!t)throw new Error((e||"geojson")+" is required");if(t.geometry&&t.geometry.type)return t.geometry.type;if(t.type)return t.type;throw new Error((e||"geojson")+" is invalid")}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(127);n.d(e,"Circle",function(){return r.a});var i=n(62);n.d(e,"Fill",function(){return i.a});var o=n(131);n.d(e,"Icon",function(){return o.a});var a=n(172);n.d(e,"IconImage",function(){return a.a});var s=n(129);n.d(e,"Image",function(){return s.a});var l=n(128);n.d(e,"RegularShape",function(){return l.a});var u=n(70);n.d(e,"Stroke",function(){return u.a});var c=n(35);n.d(e,"Style",function(){return c.c});var h=n(82);n.d(e,"Text",function(){return h.a})},function(t,e,n){"use strict";var r=n(62),i=n(176),o=n(28),a="#333",s=function(){function t(t){var e=t||{};this.font_=e.font,this.rotation_=e.rotation,this.rotateWithView_=e.rotateWithView,this.scale_=e.scale,this.scaleArray_=Object(o.d)(void 0!==e.scale?e.scale:1),this.text_=e.text,this.textAlign_=e.textAlign,this.textBaseline_=e.textBaseline,this.fill_=void 0!==e.fill?e.fill:new r.a({color:a}),this.maxAngle_=void 0!==e.maxAngle?e.maxAngle:Math.PI/4,this.placement_=void 0!==e.placement?e.placement:i.a.POINT,this.overflow_=!!e.overflow,this.stroke_=void 0!==e.stroke?e.stroke:null,this.offsetX_=void 0!==e.offsetX?e.offsetX:0,this.offsetY_=void 0!==e.offsetY?e.offsetY:0,this.backgroundFill_=e.backgroundFill?e.backgroundFill:null,this.backgroundStroke_=e.backgroundStroke?e.backgroundStroke:null,this.padding_=void 0===e.padding?null:e.padding}return t.prototype.clone=function(){var e=this.getScale();return new t({font:this.getFont(),placement:this.getPlacement(),maxAngle:this.getMaxAngle(),overflow:this.getOverflow(),rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),scale:Array.isArray(e)?e.slice():e,text:this.getText(),textAlign:this.getTextAlign(),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()})},t.prototype.getOverflow=function(){return this.overflow_},t.prototype.getFont=function(){return this.font_},t.prototype.getMaxAngle=function(){return this.maxAngle_},t.prototype.getPlacement=function(){return this.placement_},t.prototype.getOffsetX=function(){return this.offsetX_},t.prototype.getOffsetY=function(){return this.offsetY_},t.prototype.getFill=function(){return this.fill_},t.prototype.getRotateWithView=function(){return this.rotateWithView_},t.prototype.getRotation=function(){return this.rotation_},t.prototype.getScale=function(){return this.scale_},t.prototype.getScaleArray=function(){return this.scaleArray_},t.prototype.getStroke=function(){return this.stroke_},t.prototype.getText=function(){return this.text_},t.prototype.getTextAlign=function(){return this.textAlign_},t.prototype.getTextBaseline=function(){return this.textBaseline_},t.prototype.getBackgroundFill=function(){return this.backgroundFill_},t.prototype.getBackgroundStroke=function(){return this.backgroundStroke_},t.prototype.getPadding=function(){return this.padding_},t.prototype.setOverflow=function(t){this.overflow_=t},t.prototype.setFont=function(t){this.font_=t},t.prototype.setMaxAngle=function(t){this.maxAngle_=t},t.prototype.setOffsetX=function(t){this.offsetX_=t},t.prototype.setOffsetY=function(t){this.offsetY_=t},t.prototype.setPlacement=function(t){this.placement_=t},t.prototype.setRotateWithView=function(t){this.rotateWithView_=t},t.prototype.setFill=function(t){this.fill_=t},t.prototype.setRotation=function(t){this.rotation_=t},t.prototype.setScale=function(t){this.scale_=t,this.scaleArray_=Object(o.d)(void 0!==t?t:1)},t.prototype.setStroke=function(t){this.stroke_=t},t.prototype.setText=function(t){this.text_=t},t.prototype.setTextAlign=function(t){this.textAlign_=t},t.prototype.setTextBaseline=function(t){this.textBaseline_=t},t.prototype.setBackgroundFill=function(t){this.backgroundFill_=t},t.prototype.setBackgroundStroke=function(t){this.backgroundStroke_=t},t.prototype.setPadding=function(t){this.padding_=t},t}();e.a=s},function(t,e,n){"use strict";var r=n(24),i=n(104),o=n(185),a=n(34),s=n(0),l=n(9),u=n(11);function c(t){"@babel/helpers - typeof";return(c="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var h,p=this&&this.__extends||(h=function(t,e){return(h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}h(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),f={ELEMENT:"element",MAP:"map",OFFSET:"offset",POSITION:"position",POSITIONING:"positioning"},d=function(t){function e(e){var n=t.call(this)||this;n.on,n.once,n.un,n.options=e,n.id=e.id,n.insertFirst=void 0===e.insertFirst||e.insertFirst,n.stopEvent=void 0===e.stopEvent||e.stopEvent,n.element=document.createElement("div"),n.element.className=void 0!==e.className?e.className:"ol-overlay-container "+a.d,n.element.style.position="absolute",n.element.style.pointerEvents="auto";var r=e.autoPan;return r&&"object"!==c(r)&&(r={animation:e.autoPanAnimation,margin:e.autoPanMargin}),n.autoPan=r||!1,n.rendered={transform_:"",visible:!0},n.mapPostrenderListenerKey=null,n.addChangeListener(f.ELEMENT,n.handleElementChanged),n.addChangeListener(f.MAP,n.handleMapChanged),n.addChangeListener(f.OFFSET,n.handleOffsetChanged),n.addChangeListener(f.POSITION,n.handlePositionChanged),n.addChangeListener(f.POSITIONING,n.handlePositioningChanged),void 0!==e.element&&n.setElement(e.element),n.setOffset(void 0!==e.offset?e.offset:[0,0]),n.setPositioning(void 0!==e.positioning?e.positioning:o.a.TOP_LEFT),void 0!==e.position&&n.setPosition(e.position),n}return p(e,t),e.prototype.getElement=function(){return this.get(f.ELEMENT)},e.prototype.getId=function(){return this.id},e.prototype.getMap=function(){return this.get(f.MAP)},e.prototype.getOffset=function(){return this.get(f.OFFSET)},e.prototype.getPosition=function(){return this.get(f.POSITION)},e.prototype.getPositioning=function(){return this.get(f.POSITIONING)},e.prototype.handleElementChanged=function(){Object(u.d)(this.element);var t=this.getElement();t&&this.element.appendChild(t)},e.prototype.handleMapChanged=function(){this.mapPostrenderListenerKey&&(Object(u.e)(this.element),Object(l.unlistenByKey)(this.mapPostrenderListenerKey),this.mapPostrenderListenerKey=null);var t=this.getMap();if(t){this.mapPostrenderListenerKey=Object(l.listen)(t,i.a.POSTRENDER,this.render,this),this.updatePixelPosition();var e=this.stopEvent?t.getOverlayContainerStopEvent():t.getOverlayContainer();this.insertFirst?e.insertBefore(this.element,e.childNodes[0]||null):e.appendChild(this.element),this.performAutoPan()}},e.prototype.render=function(){this.updatePixelPosition()},e.prototype.handleOffsetChanged=function(){this.updatePixelPosition()},e.prototype.handlePositionChanged=function(){this.updatePixelPosition(),this.performAutoPan()},e.prototype.handlePositioningChanged=function(){this.updatePixelPosition()},e.prototype.setElement=function(t){this.set(f.ELEMENT,t)},e.prototype.setMap=function(t){this.set(f.MAP,t)},e.prototype.setOffset=function(t){this.set(f.OFFSET,t)},e.prototype.setPosition=function(t){this.set(f.POSITION,t)},e.prototype.performAutoPan=function(){this.autoPan&&this.panIntoView(this.autoPan)},e.prototype.panIntoView=function(t){var e=this.getMap();if(e&&e.getTargetElement()&&this.get(f.POSITION)){var n=this.getRect(e.getTargetElement(),e.getSize()),r=this.getElement(),i=this.getRect(r,[Object(u.c)(r),Object(u.b)(r)]),o=t||{},a=void 0===o.margin?20:o.margin;if(!Object(s.containsExtent)(n,i)){var l=i[0]-n[0],c=n[2]-i[2],h=i[1]-n[1],p=n[3]-i[3],d=[0,0];if(l<0?d[0]=l-a:c<0&&(d[0]=Math.abs(c)+a),h<0?d[1]=h-a:p<0&&(d[1]=Math.abs(p)+a),0!==d[0]||0!==d[1]){var g=e.getView().getCenterInternal(),y=e.getPixelFromCoordinateInternal(g);if(!y)return;var m=[y[0]+d[0],y[1]+d[1]],v=o.animation||{};e.getView().animateInternal({center:e.getCoordinateFromPixelInternal(m),duration:v.duration,easing:v.easing})}}}},e.prototype.getRect=function(t,e){var n=t.getBoundingClientRect(),r=n.left+window.pageXOffset,i=n.top+window.pageYOffset;return[r,i,r+e[0],i+e[1]]},e.prototype.setPositioning=function(t){this.set(f.POSITIONING,t)},e.prototype.setVisible=function(t){this.rendered.visible!==t&&(this.element.style.display=t?"":"none",this.rendered.visible=t)},e.prototype.updatePixelPosition=function(){var t=this.getMap(),e=this.getPosition();if(t&&t.isRendered()&&e){var n=t.getPixelFromCoordinate(e),r=t.getSize();this.updateRenderedPosition(n,r)}else this.setVisible(!1)},e.prototype.updateRenderedPosition=function(t,e){var n=this.element.style,r=this.getOffset(),i=this.getPositioning();this.setVisible(!0);var a=Math.round(t[0]+r[0])+"px",s=Math.round(t[1]+r[1])+"px",l="0%",u="0%";i==o.a.BOTTOM_RIGHT||i==o.a.CENTER_RIGHT||i==o.a.TOP_RIGHT?l="-100%":i!=o.a.BOTTOM_CENTER&&i!=o.a.CENTER_CENTER&&i!=o.a.TOP_CENTER||(l="-50%"),i==o.a.BOTTOM_LEFT||i==o.a.BOTTOM_CENTER||i==o.a.BOTTOM_RIGHT?u="-100%":i!=o.a.CENTER_LEFT&&i!=o.a.CENTER_CENTER&&i!=o.a.CENTER_RIGHT||(u="-50%");var c="translate("+l+", "+u+") translate("+a+", "+s+")";this.rendered.transform_!=c&&(this.rendered.transform_=c,n.transform=c,n.msTransform=c)},e.prototype.getOptions=function(){return this.options},e}(r.a);e.a=d},function(t,e,n){"use strict";var r,i=n(24),o=n(8),a=n(43),s=n(65),l=n(188),u=n(85),c=n(2),h=n(13),p=n(20),f=n(4),d=n(1),g=n(264),y=n(7),m=n(189),v=n(137),_=n(47),b=n(0),w=n(5),O=n(10),x=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),E=0,S=function(t){function e(e){var n=t.call(this)||this;n.on,n.once,n.un;var r=Object(d.a)({},e);return n.hints_=[0,0],n.animations_=[],n.updateAnimationKey_,n.projection_=Object(c.createProjection)(r.projection,"EPSG:3857"),n.viewportSize_=[100,100],n.targetCenter_=null,n.targetResolution_,n.targetRotation_,n.cancelAnchor_=void 0,r.center&&(r.center=Object(c.fromUserCoordinate)(r.center,n.projection_)),r.extent&&(r.extent=Object(c.fromUserExtent)(r.extent,n.projection_)),n.applyOptions_(r),n}return x(e,t),e.prototype.applyOptions_=function(t){var e=function(t){var e,n,r,i=void 0!==t.minZoom?t.minZoom:E,o=void 0!==t.maxZoom?t.maxZoom:28,s=void 0!==t.zoomFactor?t.zoomFactor:2,l=void 0!==t.multiWorld&&t.multiWorld,h=void 0===t.smoothResolutionConstraint||t.smoothResolutionConstraint,p=void 0!==t.showFullExtent&&t.showFullExtent,f=Object(c.createProjection)(t.projection,"EPSG:3857"),d=f.getExtent(),g=t.constrainOnlyCenter,y=t.extent;l||y||!f.isGlobal()||(g=!1,y=d);if(void 0!==t.resolutions){var v=t.resolutions;n=v[i],r=void 0!==v[o]?v[o]:v[v.length-1],e=t.constrainResolution?Object(m.c)(v,h,!g&&y,p):Object(m.a)(n,r,h,!g&&y,p)}else{var _=d?Math.max(Object(b.getWidth)(d),Object(b.getHeight)(d)):360*c.METERS_PER_UNIT[a.b.DEGREES]/f.getMetersPerUnit(),w=_/u.b/Math.pow(2,E),O=w/Math.pow(2,28-E);void 0!==(n=t.maxResolution)?i=0:n=w/Math.pow(s,i),void 0===(r=t.minResolution)&&(r=void 0!==t.maxZoom?void 0!==t.maxResolution?n/Math.pow(s,o):w/Math.pow(s,o):O),o=i+Math.floor(Math.log(n/r)/Math.log(s)),r=n/Math.pow(s,o-i),e=t.constrainResolution?Object(m.b)(s,n,r,h,!g&&y,p):Object(m.a)(n,r,h,!g&&y,p)}return{constraint:e,maxResolution:n,minResolution:r,minZoom:i,zoomFactor:s}}(t);this.maxResolution_=e.maxResolution,this.minResolution_=e.minResolution,this.zoomFactor_=e.zoomFactor,this.resolutions_=t.resolutions,this.padding_=t.padding,this.minZoom_=e.minZoom;var n=function(t){if(void 0!==t.extent){var e=void 0===t.smoothExtentConstraint||t.smoothExtentConstraint;return Object(g.a)(t.extent,t.constrainOnlyCenter,e)}var n=Object(c.createProjection)(t.projection,"EPSG:3857");if(!0!==t.multiWorld&&n.isGlobal()){var r=n.getExtent().slice();return r[0]=-1/0,r[2]=1/0,Object(g.a)(r,!1,!1)}return g.b}(t),r=e.constraint,i=function(t){if(void 0===t.enableRotation||t.enableRotation){var e=t.constrainRotation;return void 0===e||!0===e?Object(v.b)():!1===e?v.d:"number"===typeof e?Object(v.a)(e):v.d}return v.c}(t);this.constraints_={center:n,resolution:r,rotation:i},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),this.setProperties({}),this.options_=t},Object.defineProperty(e.prototype,"padding",{get:function(){return this.padding_},set:function(t){var e=this.padding_;this.padding_=t;var n=this.getCenter();if(n){var r=t||[0,0,0,0];e=e||[0,0,0,0];var i=this.getResolution(),o=i/2*(r[3]-e[3]+e[1]-r[1]),a=i/2*(r[0]-e[0]+e[2]-r[2]);this.setCenterInternal([n[0]+o,n[1]-a])}},enumerable:!1,configurable:!0}),e.prototype.getUpdatedOptions_=function(t){var e=Object(d.a)({},this.options_);return void 0!==e.resolution?e.resolution=this.getResolution():e.zoom=this.getZoom(),e.center=this.getCenterInternal(),e.rotation=this.getRotation(),Object(d.a)({},e,t)},e.prototype.animate=function(t){this.isDef()&&!this.getAnimating()&&this.resolveConstraints(0);for(var e=new Array(arguments.length),n=0;n<e.length;++n){var r=arguments[n];r.center&&((r=Object(d.a)({},r)).center=Object(c.fromUserCoordinate)(r.center,this.getProjection())),r.anchor&&((r=Object(d.a)({},r)).anchor=Object(c.fromUserCoordinate)(r.anchor,this.getProjection())),e[n]=r}this.animateInternal.apply(this,e)},e.prototype.animateInternal=function(t){var e,n=arguments.length;if(n>1&&"function"===typeof arguments[n-1]&&(e=arguments[n-1],--n),!this.isDef()){var r=arguments[n-1];return r.center&&this.setCenterInternal(r.center),void 0!==r.zoom&&this.setZoom(r.zoom),void 0!==r.rotation&&this.setRotation(r.rotation),void(e&&C(e,!0))}for(var i=Date.now(),o=this.targetCenter_.slice(),a=this.targetResolution_,l=this.targetRotation_,u=[],c=0;c<n;++c){var h=arguments[c],p={start:i,complete:!1,anchor:h.anchor,duration:void 0!==h.duration?h.duration:1e3,easing:h.easing||_.c,callback:e};if(h.center&&(p.sourceCenter=o,p.targetCenter=h.center.slice(),o=p.targetCenter),void 0!==h.zoom?(p.sourceResolution=a,p.targetResolution=this.getResolutionForZoom(h.zoom),a=p.targetResolution):h.resolution&&(p.sourceResolution=a,p.targetResolution=h.resolution,a=p.targetResolution),void 0!==h.rotation){p.sourceRotation=l;var f=Object(y.e)(h.rotation-l+Math.PI,2*Math.PI)-Math.PI;p.targetRotation=l+f,l=p.targetRotation}T(p)?p.complete=!0:i+=p.duration,u.push(p)}this.animations_.push(u),this.setHint(s.a.ANIMATING,1),this.updateAnimations_()},e.prototype.getAnimating=function(){return this.hints_[s.a.ANIMATING]>0},e.prototype.getInteracting=function(){return this.hints_[s.a.INTERACTING]>0},e.prototype.cancelAnimations=function(){var t;this.setHint(s.a.ANIMATING,-this.hints_[s.a.ANIMATING]);for(var e=0,n=this.animations_.length;e<n;++e){var r=this.animations_[e];if(r[0].callback&&C(r[0].callback,!1),!t)for(var i=0,o=r.length;i<o;++i){var a=r[i];if(!a.complete){t=a.anchor;break}}}this.animations_.length=0,this.cancelAnchor_=t},e.prototype.updateAnimations_=function(){if(void 0!==this.updateAnimationKey_&&(cancelAnimationFrame(this.updateAnimationKey_),this.updateAnimationKey_=void 0),this.getAnimating()){for(var t=Date.now(),e=!1,n=this.animations_.length-1;n>=0;--n){for(var r=this.animations_[n],i=!0,o=0,a=r.length;o<a;++o){var l=r[o];if(!l.complete){var u=t-l.start,c=l.duration>0?u/l.duration:1;c>=1?(l.complete=!0,c=1):i=!1;var h=l.easing(c);if(l.sourceCenter){var p=l.sourceCenter[0],f=l.sourceCenter[1],d=p+h*(l.targetCenter[0]-p),g=f+h*(l.targetCenter[1]-f);this.targetCenter_=[d,g]}if(l.sourceResolution&&l.targetResolution){var m=1===h?l.targetResolution:l.sourceResolution+h*(l.targetResolution-l.sourceResolution);if(l.anchor){var v=this.getViewportSize_(this.getRotation()),_=this.constraints_.resolution(m,0,v,!0);this.targetCenter_=this.calculateCenterZoom(_,l.anchor)}this.targetResolution_=m,this.applyTargetState_(!0)}if(void 0!==l.sourceRotation&&void 0!==l.targetRotation){var b=1===h?Object(y.e)(l.targetRotation+Math.PI,2*Math.PI)-Math.PI:l.sourceRotation+h*(l.targetRotation-l.sourceRotation);if(l.anchor){var w=this.constraints_.rotation(b,!0);this.targetCenter_=this.calculateCenterRotate(w,l.anchor)}this.targetRotation_=b}if(this.applyTargetState_(!0),e=!0,!l.complete)break}}if(i){this.animations_[n]=null,this.setHint(s.a.ANIMATING,-1);var O=r[0].callback;O&&C(O,!0)}}this.animations_=this.animations_.filter(Boolean),e&&void 0===this.updateAnimationKey_&&(this.updateAnimationKey_=requestAnimationFrame(this.updateAnimations_.bind(this)))}},e.prototype.calculateCenterRotate=function(t,e){var n,r=this.getCenterInternal();return void 0!==r&&(n=[r[0]-e[0],r[1]-e[1]],Object(p.h)(n,t-this.getRotation()),Object(p.a)(n,e)),n},e.prototype.calculateCenterZoom=function(t,e){var n,r=this.getCenterInternal(),i=this.getResolution();void 0!==r&&void 0!==i&&(n=[e[0]-t*(e[0]-r[0])/i,e[1]-t*(e[1]-r[1])/i]);return n},e.prototype.getViewportSize_=function(t){var e=this.viewportSize_;if(t){var n=e[0],r=e[1];return[Math.abs(n*Math.cos(t))+Math.abs(r*Math.sin(t)),Math.abs(n*Math.sin(t))+Math.abs(r*Math.cos(t))]}return e},e.prototype.setViewportSize=function(t){this.viewportSize_=Array.isArray(t)?t.slice():[100,100],this.getAnimating()||this.resolveConstraints(0)},e.prototype.getCenter=function(){var t=this.getCenterInternal();return t?Object(c.toUserCoordinate)(t,this.getProjection()):t},e.prototype.getCenterInternal=function(){return this.get(l.a.CENTER)},e.prototype.getConstraints=function(){return this.constraints_},e.prototype.getConstrainResolution=function(){return this.options_.constrainResolution},e.prototype.getHints=function(t){return void 0!==t?(t[0]=this.hints_[0],t[1]=this.hints_[1],t):this.hints_.slice()},e.prototype.calculateExtent=function(t){var e=this.calculateExtentInternal(t);return Object(c.toUserExtent)(e,this.getProjection())},e.prototype.calculateExtentInternal=function(t){var e=t||this.getViewportSizeMinusPadding_(),n=this.getCenterInternal();Object(f.a)(n,1);var r=this.getResolution();Object(f.a)(void 0!==r,2);var i=this.getRotation();return Object(f.a)(void 0!==i,3),Object(b.getForViewAndSize)(n,r,i,e)},e.prototype.getMaxResolution=function(){return this.maxResolution_},e.prototype.getMinResolution=function(){return this.minResolution_},e.prototype.getMaxZoom=function(){return this.getZoomForResolution(this.minResolution_)},e.prototype.setMaxZoom=function(t){this.applyOptions_(this.getUpdatedOptions_({maxZoom:t}))},e.prototype.getMinZoom=function(){return this.getZoomForResolution(this.maxResolution_)},e.prototype.setMinZoom=function(t){this.applyOptions_(this.getUpdatedOptions_({minZoom:t}))},e.prototype.setConstrainResolution=function(t){this.applyOptions_(this.getUpdatedOptions_({constrainResolution:t}))},e.prototype.getProjection=function(){return this.projection_},e.prototype.getResolution=function(){return this.get(l.a.RESOLUTION)},e.prototype.getResolutions=function(){return this.resolutions_},e.prototype.getResolutionForExtent=function(t,e){return this.getResolutionForExtentInternal(Object(c.fromUserExtent)(t,this.getProjection()),e)},e.prototype.getResolutionForExtentInternal=function(t,e){var n=e||this.getViewportSizeMinusPadding_(),r=Object(b.getWidth)(t)/n[0],i=Object(b.getHeight)(t)/n[1];return Math.max(r,i)},e.prototype.getResolutionForValueFunction=function(t){var e=t||2,n=this.getConstrainedResolution(this.maxResolution_),r=this.minResolution_,i=Math.log(n/r)/Math.log(e);return function(t){return n/Math.pow(e,t*i)}},e.prototype.getRotation=function(){return this.get(l.a.ROTATION)},e.prototype.getValueForResolutionFunction=function(t){var e=Math.log(t||2),n=this.getConstrainedResolution(this.maxResolution_),r=this.minResolution_,i=Math.log(n/r)/e;return function(t){return Math.log(n/t)/e/i}},e.prototype.getViewportSizeMinusPadding_=function(t){var e=this.getViewportSize_(t),n=this.padding_;return n&&(e=[e[0]-n[1]-n[3],e[1]-n[0]-n[2]]),e},e.prototype.getState=function(){var t=this.getProjection(),e=this.getResolution(),n=this.getRotation(),r=this.getCenterInternal(),i=this.padding_;if(i){var o=this.getViewportSizeMinusPadding_();r=I(r,this.getViewportSize_(),[o[0]/2+i[3],o[1]/2+i[0]],e,n)}return{center:r.slice(0),projection:void 0!==t?t:null,resolution:e,rotation:n,zoom:this.getZoom()}},e.prototype.getZoom=function(){var t,e=this.getResolution();return void 0!==e&&(t=this.getZoomForResolution(e)),t},e.prototype.getZoomForResolution=function(t){var e,n,r=this.minZoom_||0;if(this.resolutions_){var i=Object(w.h)(this.resolutions_,t,1);r=i,e=this.resolutions_[i],n=i==this.resolutions_.length-1?2:e/this.resolutions_[i+1]}else e=this.maxResolution_,n=this.zoomFactor_;return r+Math.log(e/t)/Math.log(n)},e.prototype.getResolutionForZoom=function(t){if(this.resolutions_){if(this.resolutions_.length<=1)return 0;var e=Object(y.a)(Math.floor(t),0,this.resolutions_.length-2),n=this.resolutions_[e]/this.resolutions_[e+1];return this.resolutions_[e]/Math.pow(n,Object(y.a)(t-e,0,1))}return this.maxResolution_/Math.pow(this.zoomFactor_,t-this.minZoom_)},e.prototype.fit=function(t,e){var n;if(Object(f.a)(Array.isArray(t)||"function"===typeof t.getSimplifiedGeometry,24),Array.isArray(t)){Object(f.a)(!Object(b.isEmpty)(t),25);var r=Object(c.fromUserExtent)(t,this.getProjection());n=Object(O.d)(r)}else if(t.getType()===o.a.CIRCLE){r=Object(c.fromUserExtent)(t.getExtent(),this.getProjection());(n=Object(O.d)(r)).rotate(this.getRotation(),Object(b.getCenter)(r))}else{var i=Object(c.getUserProjection)();n=i?t.clone().transform(i,this.getProjection()):t}this.fitInternal(n,e)},e.prototype.rotatedExtentForGeometry=function(t){for(var e=this.getRotation(),n=Math.cos(e),r=Math.sin(-e),i=t.getFlatCoordinates(),o=t.getStride(),a=1/0,s=1/0,l=-1/0,u=-1/0,c=0,h=i.length;c<h;c+=o){var p=i[c]*n-i[c+1]*r,f=i[c]*r+i[c+1]*n;a=Math.min(a,p),s=Math.min(s,f),l=Math.max(l,p),u=Math.max(u,f)}return[a,s,l,u]},e.prototype.fitInternal=function(t,e){var n=e||{},r=n.size;r||(r=this.getViewportSizeMinusPadding_());var i,o=void 0!==n.padding?n.padding:[0,0,0,0],a=void 0!==n.nearest&&n.nearest;i=void 0!==n.minResolution?n.minResolution:void 0!==n.maxZoom?this.getResolutionForZoom(n.maxZoom):0;var s=this.rotatedExtentForGeometry(t),l=this.getResolutionForExtentInternal(s,[r[0]-o[1]-o[3],r[1]-o[0]-o[2]]);l=isNaN(l)?i:Math.max(l,i),l=this.getConstrainedResolution(l,a?0:1);var u=this.getRotation(),c=Math.sin(u),p=Math.cos(u),f=Object(b.getCenter)(s);f[0]+=(o[1]-o[3])/2*l,f[1]+=(o[0]-o[2])/2*l;var d=f[0]*p-f[1]*c,g=f[1]*p+f[0]*c,y=this.getConstrainedCenter([d,g],l),m=n.callback?n.callback:h.c;void 0!==n.duration?this.animateInternal({resolution:l,center:y,duration:n.duration,easing:n.easing},m):(this.targetResolution_=l,this.targetCenter_=y,this.applyTargetState_(!1,!0),C(m,!0))},e.prototype.centerOn=function(t,e,n){this.centerOnInternal(Object(c.fromUserCoordinate)(t,this.getProjection()),e,n)},e.prototype.centerOnInternal=function(t,e,n){this.setCenterInternal(I(t,e,n,this.getResolution(),this.getRotation()))},e.prototype.calculateCenterShift=function(t,e,n,r){var i,o=this.padding_;if(o&&t){var a=this.getViewportSizeMinusPadding_(-n),s=I(t,r,[a[0]/2+o[3],a[1]/2+o[0]],e,n);i=[t[0]-s[0],t[1]-s[1]]}return i},e.prototype.isDef=function(){return!!this.getCenterInternal()&&void 0!==this.getResolution()},e.prototype.adjustCenter=function(t){var e=Object(c.toUserCoordinate)(this.targetCenter_,this.getProjection());this.setCenter([e[0]+t[0],e[1]+t[1]])},e.prototype.adjustCenterInternal=function(t){var e=this.targetCenter_;this.setCenterInternal([e[0]+t[0],e[1]+t[1]])},e.prototype.adjustResolution=function(t,e){var n=e&&Object(c.fromUserCoordinate)(e,this.getProjection());this.adjustResolutionInternal(t,n)},e.prototype.adjustResolutionInternal=function(t,e){var n=this.getAnimating()||this.getInteracting(),r=this.getViewportSize_(this.getRotation()),i=this.constraints_.resolution(this.targetResolution_*t,0,r,n);e&&(this.targetCenter_=this.calculateCenterZoom(i,e)),this.targetResolution_*=t,this.applyTargetState_()},e.prototype.adjustZoom=function(t,e){this.adjustResolution(Math.pow(this.zoomFactor_,-t),e)},e.prototype.adjustRotation=function(t,e){e&&(e=Object(c.fromUserCoordinate)(e,this.getProjection())),this.adjustRotationInternal(t,e)},e.prototype.adjustRotationInternal=function(t,e){var n=this.getAnimating()||this.getInteracting(),r=this.constraints_.rotation(this.targetRotation_+t,n);e&&(this.targetCenter_=this.calculateCenterRotate(r,e)),this.targetRotation_+=t,this.applyTargetState_()},e.prototype.setCenter=function(t){this.setCenterInternal(Object(c.fromUserCoordinate)(t,this.getProjection()))},e.prototype.setCenterInternal=function(t){this.targetCenter_=t,this.applyTargetState_()},e.prototype.setHint=function(t,e){return this.hints_[t]+=e,this.changed(),this.hints_[t]},e.prototype.setResolution=function(t){this.targetResolution_=t,this.applyTargetState_()},e.prototype.setRotation=function(t){this.targetRotation_=t,this.applyTargetState_()},e.prototype.setZoom=function(t){this.setResolution(this.getResolutionForZoom(t))},e.prototype.applyTargetState_=function(t,e){var n=this.getAnimating()||this.getInteracting()||e,r=this.constraints_.rotation(this.targetRotation_,n),i=this.getViewportSize_(r),o=this.constraints_.resolution(this.targetResolution_,0,i,n),a=this.constraints_.center(this.targetCenter_,o,i,n,this.calculateCenterShift(this.targetCenter_,o,r,i));this.get(l.a.ROTATION)!==r&&this.set(l.a.ROTATION,r),this.get(l.a.RESOLUTION)!==o&&this.set(l.a.RESOLUTION,o),this.get(l.a.CENTER)&&Object(p.f)(this.get(l.a.CENTER),a)||this.set(l.a.CENTER,a),this.getAnimating()&&!t&&this.cancelAnimations(),this.cancelAnchor_=void 0},e.prototype.resolveConstraints=function(t,e,n){var r=void 0!==t?t:200,i=e||0,o=this.constraints_.rotation(this.targetRotation_),a=this.getViewportSize_(o),s=this.constraints_.resolution(this.targetResolution_,i,a),l=this.constraints_.center(this.targetCenter_,s,a,!1,this.calculateCenterShift(this.targetCenter_,s,o,a));if(0===r&&!this.cancelAnchor_)return this.targetResolution_=s,this.targetRotation_=o,this.targetCenter_=l,void this.applyTargetState_();var u=n||(0===r?this.cancelAnchor_:void 0);this.cancelAnchor_=void 0,this.getResolution()===s&&this.getRotation()===o&&this.getCenterInternal()&&Object(p.f)(this.getCenterInternal(),l)||(this.getAnimating()&&this.cancelAnimations(),this.animateInternal({rotation:o,center:l,resolution:s,duration:r,easing:_.b,anchor:u}))},e.prototype.beginInteraction=function(){this.resolveConstraints(0),this.setHint(s.a.INTERACTING,1)},e.prototype.endInteraction=function(t,e,n){var r=n&&Object(c.fromUserCoordinate)(n,this.getProjection());this.endInteractionInternal(t,e,r)},e.prototype.endInteractionInternal=function(t,e,n){this.setHint(s.a.INTERACTING,-1),this.resolveConstraints(t,e,n)},e.prototype.getConstrainedCenter=function(t,e){var n=this.getViewportSize_(this.getRotation());return this.constraints_.center(t,e||this.getResolution(),n)},e.prototype.getConstrainedZoom=function(t,e){var n=this.getResolutionForZoom(t);return this.getZoomForResolution(this.getConstrainedResolution(n,e))},e.prototype.getConstrainedResolution=function(t,e){var n=e||0,r=this.getViewportSize_(this.getRotation());return this.constraints_.resolution(t,n,r)},e}(i.a);function C(t,e){setTimeout(function(){t(e)},0)}function T(t){return!(t.sourceCenter&&t.targetCenter&&!Object(p.f)(t.sourceCenter,t.targetCenter))&&(t.sourceResolution===t.targetResolution&&t.sourceRotation===t.targetRotation)}function I(t,e,n,r,i){var o=Math.cos(-i),a=Math.sin(-i),s=t[0]*o-t[1]*a,l=t[1]*o+t[0]*a;return[(s+=(e[0]/2-n[0])*r)*o-(l+=(n[1]-e[1]/2)*r)*(a=-a),l*o+s*a]}e.a=S},function(t,e,n){"use strict";n.d(e,"a",function(){return r}),n.d(e,"b",function(){return i});var r=42,i=256},function(t,e,n){"use strict";e.e=o,e.a=a,e.f=function(t,e,n,r,i){for(var o=0,s=n.length;o<s;++o){var l=n[o];i=a(t,e,l,r,i),e=l[l.length-1]}return i},e.d=s,e.b=l,e.c=function(t,e,n,r,i,o,a,s,u,c,h){for(var p=h||[NaN,NaN],f=0,d=n.length;f<d;++f){var g=n[f];c=l(t,e,g,r,i,o,a,s,u,c,p),e=g[g.length-1]}return c};var r=n(7);function i(t,e,n,i,o,a,s){var l,u=t[e],c=t[e+1],h=t[n]-u,p=t[n+1]-c;if(0===h&&0===p)l=e;else{var f=((o-u)*h+(a-c)*p)/(h*h+p*p);if(f>1)l=n;else{if(f>0){for(var d=0;d<i;++d)s[d]=Object(r.c)(t[e+d],t[n+d],f);return void(s.length=i)}l=e}}for(d=0;d<i;++d)s[d]=t[l+d];s.length=i}function o(t,e,n,i,o){var a=t[e],s=t[e+1];for(e+=i;e<n;e+=i){var l=t[e],u=t[e+1],c=Object(r.g)(a,s,l,u);c>o&&(o=c),a=l,s=u}return o}function a(t,e,n,r,i){for(var a=0,s=n.length;a<s;++a){var l=n[a];i=o(t,e,l,r,i),e=l}return i}function s(t,e,n,o,a,s,l,u,c,h,p){if(e==n)return h;var f,d;if(0===a){if((d=Object(r.g)(l,u,t[e],t[e+1]))<h){for(f=0;f<o;++f)c[f]=t[e+f];return c.length=o,d}return h}for(var g=p||[NaN,NaN],y=e+o;y<n;)if(i(t,y-o,y,o,l,u,g),(d=Object(r.g)(l,u,g[0],g[1]))<h){for(h=d,f=0;f<o;++f)c[f]=g[f];c.length=o,y+=o}else y+=o*Math.max((Math.sqrt(d)-Math.sqrt(h))/a|0,1);if(s&&(i(t,n-o,e,o,l,u,g),(d=Object(r.g)(l,u,g[0],g[1]))<h)){for(h=d,f=0;f<o;++f)c[f]=g[f];c.length=o}return h}function l(t,e,n,r,i,o,a,l,u,c,h){for(var p=h||[NaN,NaN],f=0,d=n.length;f<d;++f){var g=n[f];c=s(t,e,g,r,i,o,a,l,u,c,p),e=g}return c}},function(t,e,n){"use strict";var r,i=n(73),o=n(8),a=n(175),s=n(195),l=n(102),u=n(0),c=n(40),h=n(5),p=n(57),f=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),d=function(t){function e(e,n,r,i){var o=t.call(this)||this;return o.tolerance=e,o.maxExtent=n,o.pixelRatio=i,o.maxLineWidth=0,o.resolution=r,o.beginGeometryInstruction1_=null,o.beginGeometryInstruction2_=null,o.bufferedMaxExtent_=null,o.instructions=[],o.coordinates=[],o.tmpCoordinate_=[],o.hitDetectionInstructions=[],o.state={},o}return f(e,t),e.prototype.applyPixelRatio=function(t){var e=this.pixelRatio;return 1==e?t:t.map(function(t){return t*e})},e.prototype.appendFlatPointCoordinates=function(t,e){for(var n=this.getBufferedMaxExtent(),r=this.tmpCoordinate_,i=this.coordinates,o=i.length,a=0,s=t.length;a<s;a+=e)r[0]=t[a],r[1]=t[a+1],Object(u.containsCoordinate)(n,r)&&(i[o++]=r[0],i[o++]=r[1]);return o},e.prototype.appendFlatLineCoordinates=function(t,e,n,r,i,o){var s=this.coordinates,l=s.length,c=this.getBufferedMaxExtent();o&&(e+=r);var h,p,f,d=t[e],g=t[e+1],y=this.tmpCoordinate_,m=!0;for(h=e+r;h<n;h+=r)y[0]=t[h],y[1]=t[h+1],(f=Object(u.coordinateRelationship)(c,y))!==p?(m&&(s[l++]=d,s[l++]=g,m=!1),s[l++]=y[0],s[l++]=y[1]):f===a.a.INTERSECTING?(s[l++]=y[0],s[l++]=y[1],m=!1):m=!0,d=y[0],g=y[1],p=f;return(i&&m||h===e+r)&&(s[l++]=d,s[l++]=g),l},e.prototype.drawCustomCoordinates_=function(t,e,n,r,i){for(var o=0,a=n.length;o<a;++o){var s=n[o],l=this.appendFlatLineCoordinates(t,e,s,r,!1,!1);i.push(l),e=s}return e},e.prototype.drawCustom=function(t,e,n){this.beginGeometry(t,e);var r,a,s,l,u,c=t.getType(),h=t.getStride(),f=this.coordinates.length;if(c==o.a.MULTI_POLYGON){r=t.getOrientedFlatCoordinates(),l=[];var d=t.getEndss();u=0;for(var g=0,y=d.length;g<y;++g){var m=[];u=this.drawCustomCoordinates_(r,u,d[g],h,m),l.push(m)}this.instructions.push([i.c.CUSTOM,f,l,t,n,p.c])}else c==o.a.POLYGON||c==o.a.MULTI_LINE_STRING?(s=[],r=c==o.a.POLYGON?t.getOrientedFlatCoordinates():t.getFlatCoordinates(),u=this.drawCustomCoordinates_(r,0,t.getEnds(),h,s),this.instructions.push([i.c.CUSTOM,f,s,t,n,p.b])):c==o.a.LINE_STRING||c==o.a.CIRCLE?(r=t.getFlatCoordinates(),a=this.appendFlatLineCoordinates(r,0,r.length,h,!1,!1),this.instructions.push([i.c.CUSTOM,f,a,t,n,p.a])):c==o.a.MULTI_POINT?(r=t.getFlatCoordinates(),(a=this.appendFlatPointCoordinates(r,h))>f&&this.instructions.push([i.c.CUSTOM,f,a,t,n,p.a])):c==o.a.POINT&&(r=t.getFlatCoordinates(),this.coordinates.push(r[0],r[1]),a=this.coordinates.length,this.instructions.push([i.c.CUSTOM,f,a,t,n]));this.endGeometry(e)},e.prototype.beginGeometry=function(t,e){this.beginGeometryInstruction1_=[i.c.BEGIN_GEOMETRY,e,0,t],this.instructions.push(this.beginGeometryInstruction1_),this.beginGeometryInstruction2_=[i.c.BEGIN_GEOMETRY,e,0,t],this.hitDetectionInstructions.push(this.beginGeometryInstruction2_)},e.prototype.finish=function(){return{instructions:this.instructions,hitDetectionInstructions:this.hitDetectionInstructions,coordinates:this.coordinates}},e.prototype.reverseHitDetectionInstructions=function(){var t,e=this.hitDetectionInstructions;e.reverse();var n,r,o=e.length,a=-1;for(t=0;t<o;++t)(r=(n=e[t])[0])==i.c.END_GEOMETRY?a=t:r==i.c.BEGIN_GEOMETRY&&(n[2]=t,Object(h.j)(this.hitDetectionInstructions,a,t),a=-1)},e.prototype.setFillStrokeStyle=function(t,e){var n=this.state;if(t){var r=t.getColor();n.fillStyle=Object(l.a)(r||c.b)}else n.fillStyle=void 0;if(e){var i=e.getColor();n.strokeStyle=Object(l.a)(i||c.k);var o=e.getLineCap();n.lineCap=void 0!==o?o:c.d;var a=e.getLineDash();n.lineDash=a?a.slice():c.e;var s=e.getLineDashOffset();n.lineDashOffset=s||c.f;var u=e.getLineJoin();n.lineJoin=void 0!==u?u:c.g;var h=e.getWidth();n.lineWidth=void 0!==h?h:c.h;var p=e.getMiterLimit();n.miterLimit=void 0!==p?p:c.i,n.lineWidth>this.maxLineWidth&&(this.maxLineWidth=n.lineWidth,this.bufferedMaxExtent_=null)}else n.strokeStyle=void 0,n.lineCap=void 0,n.lineDash=null,n.lineDashOffset=void 0,n.lineJoin=void 0,n.lineWidth=void 0,n.miterLimit=void 0},e.prototype.createFill=function(t){var e=t.fillStyle,n=[i.c.SET_FILL_STYLE,e];return"string"!==typeof e&&n.push(!0),n},e.prototype.applyStroke=function(t){this.instructions.push(this.createStroke(t))},e.prototype.createStroke=function(t){return[i.c.SET_STROKE_STYLE,t.strokeStyle,t.lineWidth*this.pixelRatio,t.lineCap,t.lineJoin,t.miterLimit,this.applyPixelRatio(t.lineDash),t.lineDashOffset*this.pixelRatio]},e.prototype.updateFillStyle=function(t,e){var n=t.fillStyle;"string"===typeof n&&t.currentFillStyle==n||(void 0!==n&&this.instructions.push(e.call(this,t)),t.currentFillStyle=n)},e.prototype.updateStrokeStyle=function(t,e){var n=t.strokeStyle,r=t.lineCap,i=t.lineDash,o=t.lineDashOffset,a=t.lineJoin,s=t.lineWidth,l=t.miterLimit;(t.currentStrokeStyle!=n||t.currentLineCap!=r||i!=t.currentLineDash&&!Object(h.b)(t.currentLineDash,i)||t.currentLineDashOffset!=o||t.currentLineJoin!=a||t.currentLineWidth!=s||t.currentMiterLimit!=l)&&(void 0!==n&&e.call(this,t),t.currentStrokeStyle=n,t.currentLineCap=r,t.currentLineDash=i,t.currentLineDashOffset=o,t.currentLineJoin=a,t.currentLineWidth=s,t.currentMiterLimit=l)},e.prototype.endGeometry=function(t){this.beginGeometryInstruction1_[2]=this.instructions.length,this.beginGeometryInstruction1_=null,this.beginGeometryInstruction2_[2]=this.hitDetectionInstructions.length,this.beginGeometryInstruction2_=null;var e=[i.c.END_GEOMETRY,t];this.instructions.push(e),this.hitDetectionInstructions.push(e)},e.prototype.getBufferedMaxExtent=function(){if(!this.bufferedMaxExtent_&&(this.bufferedMaxExtent_=Object(u.clone)(this.maxExtent),this.maxLineWidth>0)){var t=this.resolution*(this.maxLineWidth+1)/2;Object(u.buffer)(this.bufferedMaxExtent_,t,this.bufferedMaxExtent_)}return this.bufferedMaxExtent_},e}(s.a);e.a=d},function(t,e,n){"use strict";var r,i=n(24),o=n(31),a=n(6),s=n(2),l=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),u=function(t){function e(e){var n=t.call(this)||this;return n.projection=Object(s.get)(e.projection),n.attributions_=c(e.attributions),n.attributionsCollapsible_=void 0===e.attributionsCollapsible||e.attributionsCollapsible,n.loading=!1,n.state_=void 0!==e.state?e.state:o.a.READY,n.wrapX_=void 0!==e.wrapX&&e.wrapX,n}return l(e,t),e.prototype.getAttributions=function(){return this.attributions_},e.prototype.getAttributionsCollapsible=function(){return this.attributionsCollapsible_},e.prototype.getProjection=function(){return this.projection},e.prototype.getResolutions=function(){return Object(a.b)()},e.prototype.getState=function(){return this.state_},e.prototype.getWrapX=function(){return this.wrapX_},e.prototype.getContextOptions=function(){},e.prototype.refresh=function(){this.changed()},e.prototype.setAttributions=function(t){this.attributions_=c(t),this.changed()},e.prototype.setState=function(t){this.state_=t,this.changed()},e}(i.a);function c(t){return t?Array.isArray(t)?function(e){return t}:"function"===typeof t?t:function(e){return[t]}:null}e.a=u},function(t,e,n){"use strict";n.d(e,"b",function(){return r}),n.d(e,"a",function(){return i});var r=.5,i=!0},function(t,e,n){"use strict";var r=n(149),i=n(85),o=n(4),a=n(7),s=n(0),l=n(38),u=n(5),c=n(28),h=[0,0,0],p=function(){function t(t){var e;if(this.minZoom=void 0!==t.minZoom?t.minZoom:0,this.resolutions_=t.resolutions,Object(o.a)(Object(u.g)(this.resolutions_,function(t,e){return e-t},!0),17),!t.origins)for(var n=0,a=this.resolutions_.length-1;n<a;++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,Object(o.a)(this.origins_.length==this.resolutions_.length,20));var l=t.extent;void 0===l||this.origin_||this.origins_||(this.origin_=Object(s.getTopLeft)(l)),Object(o.a)(!this.origin_&&this.origins_||this.origin_&&!this.origins_,18),this.tileSizes_=null,void 0!==t.tileSizes&&(this.tileSizes_=t.tileSizes,Object(o.a)(this.tileSizes_.length==this.resolutions_.length,19)),this.tileSize_=void 0!==t.tileSize?t.tileSize:this.tileSizes_?null:i.b,Object(o.a)(!this.tileSize_&&this.tileSizes_||this.tileSize_&&!this.tileSizes_,22),this.extent_=void 0!==l?l:null,this.fullTileRanges_=null,this.tmpSize_=[0,0],this.tmpExtent_=[0,0,0,0],void 0!==t.sizes?this.fullTileRanges_=t.sizes.map(function(t,e){var n=new r.b(Math.min(0,t[0]),Math.max(t[0]-1,-1),Math.min(0,t[1]),Math.max(t[1]-1,-1));if(l){var i=this.getTileRangeForExtentAndZ(l,e);n.minX=Math.max(i.minX,n.minX),n.maxX=Math.min(i.maxX,n.maxX),n.minY=Math.max(i.minY,n.minY),n.maxY=Math.min(i.maxY,n.maxY)}return n},this):l&&this.calculateTileRanges_(l)}return t.prototype.forEachTileCoord=function(t,e,n){for(var r=this.getTileRangeForExtentAndZ(t,e),i=r.minX,o=r.maxX;i<=o;++i)for(var a=r.minY,s=r.maxY;a<=s;++a)n([e,i,a])},t.prototype.forEachTileCoordParentTileRange=function(t,e,n,i){var o,a,s,l=null,u=t[0]-1;for(2===this.zoomFactor_?(a=t[1],s=t[2]):l=this.getTileCoordExtent(t,i);u>=this.minZoom;){if(2===this.zoomFactor_?(a=Math.floor(a/2),s=Math.floor(s/2),o=Object(r.a)(a,a,s,s,n)):o=this.getTileRangeForExtentAndZ(l,u,n),e(u,o))return!0;--u}return!1},t.prototype.getExtent=function(){return this.extent_},t.prototype.getMaxZoom=function(){return this.maxZoom},t.prototype.getMinZoom=function(){return this.minZoom},t.prototype.getOrigin=function(t){return this.origin_?this.origin_:this.origins_[t]},t.prototype.getResolution=function(t){return this.resolutions_[t]},t.prototype.getResolutions=function(){return this.resolutions_},t.prototype.getTileCoordChildTileRange=function(t,e,n){if(t[0]<this.maxZoom){if(2===this.zoomFactor_){var i=2*t[1],o=2*t[2];return Object(r.a)(i,i+1,o,o+1,e)}var a=this.getTileCoordExtent(t,n||this.tmpExtent_);return this.getTileRangeForExtentAndZ(a,t[0]+1,e)}return null},t.prototype.getTileRangeForTileCoordAndZ=function(t,e,n){if(e>this.maxZoom||e<this.minZoom)return null;var i=t[0],o=t[1],a=t[2];if(e===i)return Object(r.a)(o,a,o,a,n);if(this.zoomFactor_){var s=Math.pow(this.zoomFactor_,e-i),l=Math.floor(o*s),u=Math.floor(a*s);if(e<i)return Object(r.a)(l,l,u,u,n);var c=Math.floor(s*(o+1))-1,h=Math.floor(s*(a+1))-1;return Object(r.a)(l,c,u,h,n)}var p=this.getTileCoordExtent(t,this.tmpExtent_);return this.getTileRangeForExtentAndZ(p,e,n)},t.prototype.getTileRangeExtent=function(t,e,n){var r=this.getOrigin(t),i=this.getResolution(t),o=Object(c.d)(this.getTileSize(t),this.tmpSize_),a=r[0]+e.minX*o[0]*i,l=r[0]+(e.maxX+1)*o[0]*i,u=r[1]+e.minY*o[1]*i,h=r[1]+(e.maxY+1)*o[1]*i;return Object(s.createOrUpdate)(a,u,l,h,n)},t.prototype.getTileRangeForExtentAndZ=function(t,e,n){var i=h;this.getTileCoordForXYAndZ_(t[0],t[3],e,!1,i);var o=i[1],a=i[2];return this.getTileCoordForXYAndZ_(t[2],t[1],e,!0,i),Object(r.a)(o,i[1],a,i[2],n)},t.prototype.getTileCoordCenter=function(t){var e=this.getOrigin(t[0]),n=this.getResolution(t[0]),r=Object(c.d)(this.getTileSize(t[0]),this.tmpSize_);return[e[0]+(t[1]+.5)*r[0]*n,e[1]-(t[2]+.5)*r[1]*n]},t.prototype.getTileCoordExtent=function(t,e){var n=this.getOrigin(t[0]),r=this.getResolution(t[0]),i=Object(c.d)(this.getTileSize(t[0]),this.tmpSize_),o=n[0]+t[1]*i[0]*r,a=n[1]-(t[2]+1)*i[1]*r,l=o+i[0]*r,u=a+i[1]*r;return Object(s.createOrUpdate)(o,a,l,u,e)},t.prototype.getTileCoordForCoordAndResolution=function(t,e,n){return this.getTileCoordForXYAndResolution_(t[0],t[1],e,!1,n)},t.prototype.getTileCoordForXYAndResolution_=function(t,e,n,r,i){var o=this.getZForResolution(n),a=n/this.getResolution(o),s=this.getOrigin(o),u=Object(c.d)(this.getTileSize(o),this.tmpSize_),h=r?.5:0,p=r?.5:0,f=Math.floor((t-s[0])/n+h),d=Math.floor((s[1]-e)/n+p),g=a*f/u[0],y=a*d/u[1];return r?(g=Math.ceil(g)-1,y=Math.ceil(y)-1):(g=Math.floor(g),y=Math.floor(y)),Object(l.a)(o,g,y,i)},t.prototype.getTileCoordForXYAndZ_=function(t,e,n,r,i){var o=this.getOrigin(n),a=this.getResolution(n),s=Object(c.d)(this.getTileSize(n),this.tmpSize_),u=r?.5:0,h=r?.5:0,p=Math.floor((t-o[0])/a+u),f=Math.floor((o[1]-e)/a+h),d=p/s[0],g=f/s[1];return r?(d=Math.ceil(d)-1,g=Math.ceil(g)-1):(d=Math.floor(d),g=Math.floor(g)),Object(l.a)(n,d,g,i)},t.prototype.getTileCoordForCoordAndZ=function(t,e,n){return this.getTileCoordForXYAndZ_(t[0],t[1],e,!1,n)},t.prototype.getTileCoordResolution=function(t){return this.resolutions_[t[0]]},t.prototype.getTileSize=function(t){return this.tileSize_?this.tileSize_:this.tileSizes_[t]},t.prototype.getFullTileRange=function(t){return this.fullTileRanges_?this.fullTileRanges_[t]:this.extent_?this.getTileRangeForExtentAndZ(this.extent_,t):null},t.prototype.getZForResolution=function(t,e){var n=Object(u.h)(this.resolutions_,t,e||0);return Object(a.a)(n,this.minZoom,this.maxZoom)},t.prototype.calculateTileRanges_=function(t){for(var e=this.resolutions_.length,n=new Array(e),r=this.minZoom;r<e;++r)n[r]=this.getTileRangeForExtentAndZ(t,r);this.fullTileRanges_=n},t}();e.a=p},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.defaults=function(t){var e=t||{},n=new r.a,d=new c.a(-.005,.05,100);(void 0===e.altShiftDragRotate||e.altShiftDragRotate)&&n.push(new a.a);(void 0===e.doubleClickZoom||e.doubleClickZoom)&&n.push(new i.a({delta:e.zoomDelta,duration:e.zoomDuration}));(void 0===e.dragPan||e.dragPan)&&n.push(new o.a({onFocusOnly:e.onFocusOnly,kinetic:d}));(void 0===e.pinchRotate||e.pinchRotate)&&n.push(new p.a);(void 0===e.pinchZoom||e.pinchZoom)&&n.push(new f.a({duration:e.zoomDuration}));(void 0===e.keyboard||e.keyboard)&&(n.push(new l.a),n.push(new u.a({delta:e.zoomDelta,duration:e.zoomDuration})));(void 0===e.mouseWheelZoom||e.mouseWheelZoom)&&n.push(new h.a({onFocusOnly:e.onFocusOnly,duration:e.zoomDuration}));(void 0===e.shiftDragZoom||e.shiftDragZoom)&&n.push(new s.a({duration:e.zoomDuration}));return n};var r=n(25),i=n(214),o=n(215),a=n(216),s=n(217),l=n(219),u=n(220),c=n(156),h=n(221),p=n(222),f=n(223);n.d(e,"DoubleClickZoom",function(){return i.a});var d=n(296);n.d(e,"DragAndDrop",function(){return d.a});var g=n(218);n.d(e,"DragBox",function(){return g.a}),n.d(e,"DragPan",function(){return o.a}),n.d(e,"DragRotate",function(){return a.a});var y=n(297);n.d(e,"DragRotateAndZoom",function(){return y.a}),n.d(e,"DragZoom",function(){return s.a});var m=n(298);n.d(e,"Draw",function(){return m.a});var v=n(299);n.d(e,"Extent",function(){return v.a});var _=n(58);n.d(e,"Interaction",function(){return _.a}),n.d(e,"KeyboardPan",function(){return l.a}),n.d(e,"KeyboardZoom",function(){return u.a});var b=n(300);n.d(e,"Modify",function(){return b.a}),n.d(e,"MouseWheelZoom",function(){return h.a}),n.d(e,"PinchRotate",function(){return p.a}),n.d(e,"PinchZoom",function(){return f.a});var w=n(26);n.d(e,"Pointer",function(){return w.b});var O=n(301);n.d(e,"Select",function(){return O.a});var x=n(302);n.d(e,"Snap",function(){return x.a});var E=n(225);n.d(e,"Translate",function(){return E.a})},function(t,e,n){"use strict";n.d(e,"a",function(){return r}),n.d(e,"b",function(){return i});var r="1.3.0",i={imageSmoothingEnabled:!1,msImageSmoothingEnabled:!1}},function(t,e,n){"use strict";var r,i=n(304),o=n(209),a=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),s=function(t){function e(e){return t.call(this,e)||this}return a(e,t),e.prototype.createRenderer=function(){return new o.a(this)},e}(i.a);e.a=s},function(t,e,n){"use strict";var r,i=n(52),o=n(51),a=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),s=function(t){function e(e){var n=e||{},r=void 0!==n.projection?n.projection:"EPSG:3857",i=void 0!==n.tileGrid?n.tileGrid:Object(o.createXYZ)({extent:Object(o.extentFromProjection)(r),maxResolution:n.maxResolution,maxZoom:n.maxZoom,minZoom:n.minZoom,tileSize:n.tileSize});return t.call(this,{attributions:n.attributions,cacheSize:n.cacheSize,crossOrigin:n.crossOrigin,imageSmoothing:n.imageSmoothing,opaque:n.opaque,projection:r,reprojectionErrorThreshold:n.reprojectionErrorThreshold,tileGrid:i,tileLoadFunction:n.tileLoadFunction,tilePixelRatio:n.tilePixelRatio,tileUrlFunction:n.tileUrlFunction,url:n.url,urls:n.urls,wrapX:void 0===n.wrapX||n.wrapX,transition:n.transition,attributionsCollapsible:n.attributionsCollapsible,zDirection:n.zDirection})||this}return a(e,t),e}(i.a);e.a=s},function(t,e,n){"use strict";var r,i=n(22),o=n(74),a=n(6),s=n(5),l=n(27),u=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),c=function(t){function e(){var e=t.call(this)||this;return e.xmlSerializer_=Object(l.g)(),e}return u(e,t),e.prototype.getType=function(){return o.a.XML},e.prototype.readFeature=function(t,e){if(t){if("string"===typeof t){var n=Object(l.s)(t);return this.readFeatureFromDocument(n,e)}return Object(l.h)(t)?this.readFeatureFromDocument(t,e):this.readFeatureFromNode(t,e)}return null},e.prototype.readFeatureFromDocument=function(t,e){var n=this.readFeaturesFromDocument(t,e);return n.length>0?n[0]:null},e.prototype.readFeatureFromNode=function(t,e){return null},e.prototype.readFeatures=function(t,e){if(t){if("string"===typeof t){var n=Object(l.s)(t);return this.readFeaturesFromDocument(n,e)}return Object(l.h)(t)?this.readFeaturesFromDocument(t,e):this.readFeaturesFromNode(t,e)}return[]},e.prototype.readFeaturesFromDocument=function(t,e){for(var n=[],r=t.firstChild;r;r=r.nextSibling)r.nodeType==Node.ELEMENT_NODE&&Object(s.c)(n,this.readFeaturesFromNode(r,e));return n},e.prototype.readFeaturesFromNode=function(t,e){return Object(a.b)()},e.prototype.readGeometry=function(t,e){if(t){if("string"===typeof t){var n=Object(l.s)(t);return this.readGeometryFromDocument(n,e)}return Object(l.h)(t)?this.readGeometryFromDocument(t,e):this.readGeometryFromNode(t,e)}return null},e.prototype.readGeometryFromDocument=function(t,e){return null},e.prototype.readGeometryFromNode=function(t,e){return null},e.prototype.readProjection=function(t){if(t){if("string"===typeof t){var e=Object(l.s)(t);return this.readProjectionFromDocument(e)}return Object(l.h)(t)?this.readProjectionFromDocument(t):this.readProjectionFromNode(t)}return null},e.prototype.readProjectionFromDocument=function(t){return this.dataProjection},e.prototype.readProjectionFromNode=function(t){return this.dataProjection},e.prototype.writeFeature=function(t,e){var n=this.writeFeatureNode(t,e);return this.xmlSerializer_.serializeToString(n)},e.prototype.writeFeatureNode=function(t,e){return null},e.prototype.writeFeatures=function(t,e){var n=this.writeFeaturesNode(t,e);return this.xmlSerializer_.serializeToString(n)},e.prototype.writeFeaturesNode=function(t,e){return null},e.prototype.writeGeometry=function(t,e){var n=this.writeGeometryNode(t,e);return this.xmlSerializer_.serializeToString(n)},e.prototype.writeGeometryNode=function(t,e){return null},e}(i.a);e.a=c},function(t,e,n){"use strict";var r,i=n(78),o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=function(t){function e(e,n,r,i){var o=t.call(this,e)||this;return o.geometryName=n||"the_geom",o.geometry=r,o.srsName=i,o}return o(e,t),e}(i.a);e.a=a},function(t,e,n){"use strict";var r,i=n(78),o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=function(t){function e(e,n){var r=t.call(this,e)||this;return r.propertyName=n,r}return o(e,t),e}(i.a);e.a=a},function(t,e,n){"use strict";n.d(e,"a",function(){return i}),n.d(e,"c",function(){return o}),n.d(e,"d",function(){return a}),n.d(e,"b",function(){return s});var r=n(59);function i(t,e,n){if(null!==t)for(var r,o,a,s,l,u,c,h,p=0,f=0,d=t.type,g="FeatureCollection"===d,y="Feature"===d,m=g?t.features.length:1,v=0;v<m;v++){l=(h=!!(c=g?t.features[v].geometry:y?t.geometry:t)&&"GeometryCollection"===c.type)?c.geometries.length:1;for(var _=0;_<l;_++){var b=0,w=0;if(null!==(s=h?c.geometries[_]:c)){u=s.coordinates;var O=s.type;switch(p=!n||"Polygon"!==O&&"MultiPolygon"!==O?0:1,O){case null:break;case"Point":e(u,f,v,b,w),f++,b++;break;case"LineString":case"MultiPoint":for(r=0;r<u.length;r++)e(u[r],f,v,b,w),f++,"MultiPoint"===O&&b++;"LineString"===O&&b++;break;case"Polygon":case"MultiLineString":for(r=0;r<u.length;r++){for(o=0;o<u[r].length-p;o++)e(u[r][o],f,v,b,w),f++;"MultiLineString"===O&&b++,"Polygon"===O&&w++}"Polygon"===O&&b++;break;case"MultiPolygon":for(r=0;r<u.length;r++){for("MultiPolygon"===O&&(w=0),o=0;o<u[r].length;o++){for(a=0;a<u[r][o].length-p;a++)e(u[r][o][a],f,v,b,w),f++;w++}b++}break;case"GeometryCollection":for(r=0;r<s.geometries.length;r++)i(s.geometries[r],e,n);break;default:throw new Error("Unknown Geometry Type")}}}}}function o(t,e){var n,r,i,o,a,s,l,u,c,h,p=0,f="FeatureCollection"===t.type,d="Feature"===t.type,g=f?t.features.length:1;for(n=0;n<g;n++){for(s=f?t.features[n].geometry:d?t.geometry:t,u=f?t.features[n].properties:d?t.properties:{},c=f?t.features[n].bbox:d?t.bbox:void 0,h=f?t.features[n].id:d?t.id:void 0,a=(l=!!s&&"GeometryCollection"===s.type)?s.geometries.length:1,i=0;i<a;i++)if(null!==(o=l?s.geometries[i]:s))switch(o.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":e(o,p,u,c,h);break;case"GeometryCollection":for(r=0;r<o.geometries.length;r++)e(o.geometries[r],p,u,c,h);break;default:throw new Error("Unknown Geometry Type")}else e(null,p,u,c,h);p++}}function a(t,e,n){var r=n;return o(t,function(t,i,o,a,s){r=0===i&&void 0===n?t:e(r,t,i,o,a,s)}),r}function s(t,e){o(t,function(t,n,i,o,a){var s,l=null===t?null:t.type;switch(l){case null:case"Point":case"LineString":case"Polygon":return void e(Object(r.a)(t,i,{bbox:o,id:a}),n,0)}switch(l){case"MultiPoint":s="Point";break;case"MultiLineString":s="LineString";break;case"MultiPolygon":s="Polygon"}t.coordinates.forEach(function(t,o){var a={type:s,coordinates:t};e(Object(r.a)(a,i),n,o)})})}},function(t,e,n){"use strict";n.d(e,"a",function(){return w});var r=n(19),i=n(60),o=n(100),a=n(385),s=n(239),l=n(386),u=(n.n(l),n(101)),c=n(10),h=n(82),p=n(81),f=(n(238),n(41)),d=(n(241),n(387));function g(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function y(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function m(t){return function(t){if(Array.isArray(t))return v(t)}(t)||function(t){if("undefined"!==typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"===typeof t)return v(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return v(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function v(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function _(t,e,n,r,i,o,a){try{var s=t[o](a),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(r,i)}function b(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var w=function(){function t(e,n,a){if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.options=e,this.options.hasOwnProperty("magnifier")||(this.options.magnifier=!1),this.options.hasOwnProperty("colorAdjustments")||(this.options.colorAdjustments=!1),this.options.hasOwnProperty("annotations")||(this.options.annotations=!1),this.options.hasOwnProperty("fullscreenControl")||(this.options.fullscreenControl=!0),this.readyCallback=n,this.failCallback=a,this.options.flip||(this.options.flip={horizontally:!1,vertically:!1}),Object(r.b)(e.element)){if("string"!==typeof e.caller)throw"function"===typeof this.failCallback&&this.failCallback(),"Caller parameter not supplied";if("string"!==typeof e.theme&&(e.theme="default"),!e.element)throw"function"===typeof this.failCallback&&this.failCallback(),"No element provided";if(this.element=e.element,this.userInfo=null,this.imageInfo=e.imageInfo,e.image)this.image=e.image;else{if(!this.imageInfo)throw"function"===typeof this.failCallback&&this.failCallback(),"No image path or UID provided";this.image=this.imageInfo.Filename}if(e.sessionID)this.sessionID=e.sessionID;else{if(!e.username&&!e.password)throw"function"===typeof this.failCallback&&this.failCallback(),"SessionID or Username not provided. Cannot login.";if(this.username=e.username,this.password=e.password,!e.username||!e.password)throw"function"===typeof this.failCallback&&this.failCallback(),"Username and/or password not povided"}if(e.serverUrls&&e.serverUrls instanceof Array&&e.serverUrls.length>0)this.serverUrls=e.serverUrls;else if(!this.imageInfo)throw"function"===typeof this.failCallback&&this.failCallback(),"Server URLs not provided or is not an array and no image info was given.";this.overviewControl=null,this.dimensionsControl=null,this.barcodeControl=null,this.colorAdjustmentsControl=null,this.rotationControl=null,this.layerSwitcher=null,this.mouseWheelInteraction=null,this.measureDraw=null,this.zoomSliderControl=null,this.scaleLineControl=null,this.magnifierControl=null,this.filenameControl=null,this.snapShotControl=null,this.attributionControl=null,this.serviceUrl=null,this.imagesUrl=null,this.channelsString=null,this.channelClippingString=null,this.channelGammaString=null,this.imageAdjustments={brightness:0,contrast:1,gamma:1,rgb:[1,1,1],tileTransformers:[]},void 0===this.options.loadingBar&&(this.options.loadingBar=!0),void 0===this.options.annotationsLayers&&(this.options.annotationsLayers=!0),this.listeners={},this.listeners[i.g.DimensionsChanged]=[],this.listeners[i.g.ViewChanged]=[],this.listeners[i.g.TilesError]=[],this.listeners[i.g.SlideLoadError]=[],this.listeners[i.g.FilenameClick]=[],this.listeners[i.g.AnnotationLayerChanged]=[],this.map=null,o.o.call(this)}}var e,n,v;return e=t,(n=[{key:"calculateArea",value:function(t){if(0===this.imageInfo.MicrometresPerPixelX)return 0;var e=null;if(t instanceof u.a.geom.Polygon)e=t.getCoordinates()[0];else{if(t instanceof u.a.geom.LineString)return 0;if(!(t instanceof u.a.geom.Circle)){if(t instanceof u.a.geom.GeometryCollection){for(var n=t.getGeometries(),r=0,i=0;i<n.length;i++)r+=this.calculateArea.call(this,n[i]);return r}return 0}e=Object(c.c)(t).getCoordinates()[0]}for(var o=[],a=0;a<e.length;a++)o.push([e[a][0]*this.imageInfo.MicrometresPerPixelX,e[a][1]*this.imageInfo.MicrometresPerPixelY]);var s=new u.a.geom.Polygon([o]),l=s.getArea();return s=null,l}},{key:"calculateLength",value:function(t){if(0===this.imageInfo.MicrometresPerPixelX)return 0;var e=null;if(t instanceof u.a.geom.Polygon)e=t.getCoordinates()[0];else if(t instanceof u.a.geom.LineString)e=t.getCoordinates();else{if(!(t instanceof u.a.geom.Circle)){if(t instanceof u.a.geom.GeometryCollection){for(var n=t.getGeometries(),r=0,i=0;i<n.length;i++)r+=this.calculateLength.call(this,n[i]);return r}return 0}e=Object(c.c)(t).getCoordinates()[0]}for(var o=[],a=0;a<e.length;a++)o.push([e[a][0]*this.imageInfo.MicrometresPerPixelX,e[a][1]*this.imageInfo.MicrometresPerPixelY]);var s=new u.a.geom.LineString(o),l=s.getLength();return s=null,l}},{key:"formatLength",value:function(t){return 0===this.imageInfo.MicrometresPerPixelX?0:!(this.options.annotations&&!0===this.options.annotations.alwaysDisplayInMicrons)&&t>=1e3?Math.round(10*t/1e3)/10+" mm":Math.round(10*t)/10+" \u03bcm"}},{key:"formatArea",value:function(t){if(0===this.imageInfo.MicrometresPerPixelX)return 0;var e=String.fromCharCode("2".charCodeAt(0)+128);return!(this.options.annotations&&!0===this.options.annotations.alwaysDisplayInMicrons)&&t>=1e5?Math.round(10*t/1e6)/10+" mm"+e:Math.round(10*t)/10+" \u03bcm"+e}},{key:"getAnnotationTextStyle",value:function(t,e){var n=this.getAnnotationFormattedLabel(t);return new h.a({text:n,textAlign:"center",textBaseline:"bottom",placement:"point",overflow:!0,font:"normal 16px Tahoma",fill:new p.Fill({color:"#000000"}),stroke:new p.Stroke({color:"#ffffff",width:2})})}},{key:"getAnnotationFormattedLabel",value:function(t){var e="";if(this.options.annotations&&t&&t.metaData&&(!1!==this.options.annotations.labels&&t.metaData.Notes&&(e=t.metaData.Notes),!1!==this.options.annotations.showMeasurements)){var n=t.getGeometry().getType();t.metaData.hasOwnProperty("Dimensions")&&!isNaN(t.metaData.Dimensions)?(t.metaData.Dimensions>0&&(e+="\n"+t.metaData.FormattedLength),t.metaData.Dimensions>1&&(e+="\n"+t.metaData.FormattedArea)):-1!==n.indexOf("LineString")?e+="\n"+t.metaData.FormattedLength:-1===n.indexOf("Polygon")&&-1===n.indexOf("Circle")||(e+="\n"+t.metaData.FormattedLength+"\n"+t.metaData.FormattedArea)}return e}},{key:"getAnnotationStyle",value:function(t,e){return t.getText().setText(this.getAnnotationFormattedLabel(e)),t}},{key:"showAnnotation",value:function(t,e){if(null!==t&&!isNaN(t)){this.hiddenAnnotations||(this.hiddenAnnotations=[]);var n=null;if(e){for(var r=0;r<this.hiddenAnnotations.length;r++)if(this.hiddenAnnotations[r].getId()==t)return n=this.hiddenAnnotations.splice(r,1),void this.annotationsLayer.getSource().addFeatures(n)}else(n=this.annotationsLayer.getSource().getFeatureById(t))&&(this.annotationsLayer.getSource().removeFeature(n),this.hiddenAnnotations.push(n))}}},{key:"showAnnotationsByFingerprint",value:function(t){var e=this;t&&(this.forceLoadedAnnotationsByFingerprint||this.options.annotations.loadAnnotationsByFingerprint||(o.n.call(this,function(t){e.reloadAnnotations(null,t)}),this.forceLoadedAnnotationsByFingerprint=!0)),this.hiddenAnnotationsByFingerprint||(this.hiddenAnnotationsByFingerprint=[]);var n=null,r=this.annotationsLayer.getSource().getFeatures();if(t)for(var i=this.hiddenAnnotationsByFingerprint.length;i>0;i--)n=this.hiddenAnnotationsByFingerprint.pop(),this.annotationsLayer.getSource().addFeature(n);else for(var a=0;a<r.length;a++)(n=r[a]).metaData.Image!==this.imageInfo.Filename&&(this.annotationsLayer.getSource().removeFeature(n),this.hiddenAnnotationsByFingerprint.push(n))}},{key:"showAnnotations",value:function(t){this.annotationsLayer&&this.annotationsLayer.setVisible(t)}},{key:"getAnnotationLabelsVisible",value:function(){return!!this.annotationsLayer&&!0===this.options.annotations.labels}},{key:"showAnnotationsLabels",value:function(t,e){if(this.annotationsLayer){var n=this;if(void 0!==e){if(this.options.annotations.labels===t&&this.options.annotations.showMeasurements===e)return;this.options.annotations.showMeasurements=e}else e=this.options.annotations.showMeasurements;this.options.annotations.labels=t,this.annotationsLayer.getSource().forEachFeature(function(r,i){var o=r.getStyle(),a=null;if(o instanceof Array){for(var s=0;s<o.length;s++)if(o[s].getText()){a=o[s];break}}else a=o;if(a)try{t||e?a.getText().setText(n.getAnnotationFormattedLabel(r)):a.getText().setText("")}catch(t){return}},this),this.annotationsLayer.changed()}}},{key:"getAnnotations",value:function(){return this.annotationsLayer?this.hiddenAnnotations&&this.hiddenAnnotations.length>0?this.annotationsLayer.getSource().getFeatures().concat(this.hiddenAnnotations):this.annotationsLayer.getSource().getFeatures():null}},{key:"getActiveChannels",value:function(){for(var t=[],e=0;e<this.imageInfo.TimeFrames[0].Layers[0].Channels.length;e++)this.imageInfo.TimeFrames[0].Layers[0].Channels[e].Active&&t.push(e);return t}},{key:"setActiveChannels",value:function(t){for(var e=0;e<this.imageInfo.TimeFrames[0].Layers[0].Channels.length;e++)this.imageInfo.TimeFrames[0].Layers[0].Channels[e].Active=!1;for(e=0;e<t.length;e++)this.imageInfo.TimeFrames[0].Layers[0].Channels[t[e]].Active=!0;this.channelsString=this.getActiveChannels().join(","),this.channelClippingString=this.getChannelClippingString(),this.channelGammaString=this.getChannelGammaString(),this.redraw(),this.fireEvent(i.g.DimensionsChanged,this)}},{key:"setChannelRenderingOptions",value:function(t){this.imageInfo.TimeFrames[0].Layers[0].Channels[t.index].Clipping=t.clipping,this.imageInfo.TimeFrames[0].Layers[0].Channels[t.index].Gamma=t.gamma,this.channelClippingString=this.getChannelClippingString(),this.channelGammaString=this.getChannelGammaString(),this.redraw(),this.fireEvent(i.g.DimensionsChanged,this)}},{key:"getChannelClippingString",value:function(){var t=this.imageInfo.TimeFrames[0].Layers[0].Channels;this.channelClippingString="";for(var e=0;e<t.length;e++)t[e].Active&&(this.channelClippingString.length>0&&(this.channelClippingString+=","),t[e].Clipping?this.channelClippingString+=t[e].Clipping[0]+","+t[e].Clipping[1]:this.channelClippingString+="0,100");return this.channelClippingString}},{key:"getChannelGammaString",value:function(){var t=this.imageInfo.TimeFrames[0].Layers[0].Channels;this.channelGammaString="";for(var e=0;e<t.length;e++)t[e].Active&&(this.channelGammaString.length>0&&(this.channelGammaString+=","),t[e].Gamma?this.channelGammaString+=t[e].Gamma:this.channelGammaString+="1.0");return this.channelGammaString}},{key:"getActiveTimeFrame",value:function(){return this.selectedTimeFrame}},{key:"setActiveTimeFrame",value:function(t){(t=parseInt(t))>=0&&t<this.imageInfo.TimeFrames.length&&(this.selectedTimeFrame=t,this.redraw(),this.fireEvent(i.g.DimensionsChanged,this))}},{key:"getActiveLayer",value:function(){return this.selectedLayer}},{key:"setActiveLayer",value:function(t){(t=parseInt(t))>=0&&t<this.imageInfo.TimeFrames[this.selectedTimeFrame].Layers.length&&(this.selectedLayer=t,this.redraw(),this.fireEvent(i.g.DimensionsChanged,this))}},{key:"setFlip",value:function(t,e){var n=1==t,r=1==e,a=this.options.flip.horizontally!==n,s=this.options.flip.vertically!==r;if(a||s){var l,u=this.map.getView().getProjection().getExtent(),c=this.getPosition(),h=this.map.getView(),p=h.getProjection().getExtent(),f={extent:p,flip:this.options.flip},d=this.getAnnotations();if(d)for(l=0;l<d.length;l++)d[l].getGeometry().applyTransform(o.b.bind(f));this.options.flip.horizontally=n,this.options.flip.vertically=r;var g=o.f.call(this);if(this.map.setView(o.d.call(this,g,null,null,-h.getRotation())),f={extent:p=this.map.getView().getProjection().getExtent(),flip:this.options.flip},d)for(l=0;l<d.length;l++)d[l].getGeometry().applyTransform(o.b.bind(f));var y=this.getPosition();if(y.zoom=c.zoom,y.center[0]=a?p[0]+(u[2]-c.center[0]):p[0]+(c.center[0]-u[0]),y.center[1]=s?p[1]+(u[3]-c.center[1]):p[1]+(c.center[1]-u[1]),this.setPosition(y,null),this.redraw(),this.overviewControl){this.overviewControl.setMap(null);var m=o.l.call(this,this.element.querySelector(".ol-overview")),v=this.overviewControl&&this.overviewControl.getCollapsed();this.map.removeControl(this.overviewControl),this.overviewControl=o.e.call(this),this.map.addControl(this.overviewControl),m||o.s.call(this,this.element.querySelector(".ol-overview"),!1),this.overviewControl.setCollapsed(v),o.u.call(this)}this.fireEvent(i.g.ViewChanged,this)}}},{key:"getFlip",value:function(){return{horizontally:this.options.flip.horizontally,vertically:this.options.flip.vertically}}},{key:"redraw",value:function(){for(var t,e=this.map.getLayers().getArray(),n=0;n<e.length;n++)if(e[n].getSource){if(e[n]===this.mainLayer){var r=this.imageInfo.MaxZoomLevel,i=Math.pow(2,r);if((t=new u.a.layer.Tile({source:new u.a.source.XYZ({tileUrlFunction:this.mainLayer.getSource().getTileUrlFunction(),tileLoadFunction:this.mainLayer.getSource().getTileLoadFunction(),projection:this.mainLayer.getSource().getProjection(),wrapX:!1,attributions:"",crossOrigin:"PMA.UI",tileGrid:u.a.tilegrid.createXYZ({tileSize:[this.imageInfo.TileSize,this.imageInfo.TileSize],extent:[0,0,i*this.imageInfo.TileSize,i*this.imageInfo.TileSize],maxZoom:r})}),className:"ol-layer main-layer",extent:[0,0,i*this.imageInfo.TileSize,i*this.imageInfo.TileSize]})).set("active",!0,!0),this.mainLayer.set("active",!1,!0),this.options.loadingBar){Object(f.b)(this.listeners.tileloadstart),Object(f.b)(this.listeners.tileloadend),Object(f.b)(this.listeners.tileloaderror),this.listeners.tileloadstart=[],this.listeners.tileloadend=[],this.listeners.tileloaderror=[],this.loading=0,this.loaded=0,o.v.call(this);var a=this;this.listeners.tileloadstart.push(t.getSource().on("tileloadstart",function(){0===a.loading&&(a.progressEl.style.visibility="visible"),++a.loading,o.v.call(a)})),this.listeners.tileloadend.push(t.getSource().on("tileloadend",function(){setTimeout(function(){++a.loaded,o.v.call(a)},100)})),this.listeners.tileloaderror.push(t.getSource().on("tileloaderror",function(){setTimeout(function(){++a.loaded,o.v.call(a)},100)}))}setTimeout(function(t,e,n){n.setMap(null),t.removeLayer(e),n.setMap(t)},1e4,this.map,this.mainLayer,this.overviewControl)}}else if(e[n].getLayers)for(var s=e[n].getLayers().getArray(),l=0;l<s.length;l++)s[l].getSource().refresh(),s[l].setZIndex(999);t&&(this.mainLayer=t,this.map.addLayer(this.mainLayer),this.mainLayer.setZIndex(900),this.annotationsLayer&&this.annotationsLayer.setZIndex(1e3))}},{key:"zoomToObjective",value:function(t){if(this.imageInfo&&0!==this.imageInfo.MicrometresPerPixelX){var e;if("1:1"===t)e=1;else{if(t=parseFloat(t),isNaN(t)||0===t)return;e=10/this.imageInfo.MicrometresPerPixelX/t}this.map.getView().setResolution(e)}}},{key:"getPosition",value:function(){if(!this.map)return null;var t=this.map.getView();return t?{center:t.getCenter(),zoom:t.getZoom(),resolution:t.getResolution(),rotation:t.getRotation()}:null}},{key:"setPosition",value:function(t,e){this.map&&this.map.getView().animate(Object.assign(t,{duration:0}))}},{key:"fitToExtent",value:function(t,e){this.map&&this.map.getView().fit(t,{size:this.map.getSize(),constrainResolution:e||!1})}},{key:"getCurrentExtent",value:function(t){if(this.map){var e=this.map.getView(),n=e.calculateExtent(this.map.getSize());return t?this.rotateExtent(n,-e.getRotation()):n}}},{key:"setSessionID",value:function(t){this.sessionID=t,this.redraw()}},{key:"getSessionID",value:function(){return this.sessionID}},{key:"login",value:function(t,e){t&&(this.username=t),e&&(this.password=e),o.p.call(this,this.redraw)}},{key:"getViewportCoordinates",value:function(){var t=this.map.getSize(),e=[this.map.getCoordinateFromPixel([0,0]),this.map.getCoordinateFromPixel([t[0],0]),this.map.getCoordinateFromPixel([t[0],t[1]]),this.map.getCoordinateFromPixel([0,t[1]])],n=this.getFlip(),r=this.imageInfo.MaxZoomLevel,i=0,o=0,a=Math.pow(2,r)*this.imageInfo.TileSize;!0===n.horizontally&&(i=a-this.imageInfo.Width),!0!==n.vertically&&(o=a-this.imageInfo.Height);for(var s=0;s<4;s++)e[s][0]-=i,e[s][1]-=o,!0===n.horizontally&&(e[s][0]=this.imageInfo.Width-e[s][0]),!0!==n.vertically&&(e[s][1]=this.imageInfo.Height-e[s][1]);return e}},{key:"getSnapshotParameters",value:function(){var t=this.getViewportCoordinates(),e=this.map.getSize(),n=1/this.map.getView().getResolution(),r=this.getFlip(),i=180*-this.map.getView().getRotation()/Math.PI%360;return r.horizontally^r.vertically&&(i*=-1),{x:Math.round(t[0][0]),y:Math.round(t[0][1]),width:Math.round(e[0]/n),height:Math.round(e[1]/n),rotation:i,channels:this.getActiveChannels(),layer:this.selectedLayer,timeframe:this.selectedTimeFrame,flipHorizontally:r.horizontally,flipVertically:r.vertically}}},{key:"getSnapshotUrl",value:function(t,e,n,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"snapshot";n||(n="jpg"),null===a&&(a="snapshot"),r=!!r;var s=this.getViewportCoordinates(),l=this.map.getSize(),u=this.getFlip(),c=1/this.map.getView().getResolution();if(e)if(e==i.h.Min)c=1/Math.pow(2,this.imageInfo.MaxZoomLevel);else if(e==i.h.Max)c=this.options.digitalZoomLevels>0?2:1;else if(e==i.h["1:1"])c=1;else{var h=parseInt(e);if(h>=1){var p=-Math.log2(10)+Math.log2(h*this.imageInfo.MicrometresPerPixelX)+this.imageInfo.MaxZoomLevel;c=1/Math.pow(2,this.imageInfo.MaxZoomLevel-p)}}var f=180*-this.map.getView().getRotation()/Math.PI%360;u.horizontally^u.vertically&&(f*=-1);var d=Math.round(s[0][0]),g=Math.round(s[0][1]),y=Math.round(l[0]*this.map.getView().getResolution()),m=Math.round(l[1]*this.map.getView().getResolution()),v=this.imagesUrl+"region?pathOrUid="+encodeURIComponent(this.image)+"&format="+encodeURIComponent(n)+"&timeframe="+this.selectedTimeFrame+"&layer="+this.selectedLayer+"&channels="+this.channelsString+"&channelClipping="+this.channelClippingString+"&gamma="+this.channelGammaString+"&sessionID="+encodeURIComponent(this.sessionID)+"&drawScaleBar="+r+"&x="+d+"&y="+g+"&width="+y+"&height="+m+"&scale="+c+"&rotation="+f+"&dpi="+o+"&filename="+a+"&flipHorizontal="+u.horizontally+"&flipVertical="+u.vertically+(this.imageAdjustments.gamma&&1!=this.imageAdjustments.gamma?"&postGamma="+this.imageAdjustments.gamma.toFixed(2):"")+(this.imageAdjustments.brightness&&0!=this.imageAdjustments.brightness?"&brightness="+this.imageAdjustments.brightness:"")+(this.imageAdjustments.contrast&&1!=this.imageAdjustments.contrast?"&contrast="+this.imageAdjustments.contrast.toFixed(2):"");return t&&(v+="&downloadInsteadOfDisplay=true"),{url:v,width:Math.round(y*c),height:Math.round(m*c),scale:c}}},{key:"drawViewport",value:function(){var t=[],e=this.map.getSize();t.push(this.map.getCoordinateFromPixel([0,0])),t.push(this.map.getCoordinateFromPixel([0,e[1]])),t.push(this.map.getCoordinateFromPixel([e[0],e[1]])),t.push(this.map.getCoordinateFromPixel([e[0],0]));var n=new u.a.geom.Polygon([t]),r=new u.a.Feature(n),i=this.measureLayer.getSource();i.clear(),i.addFeature(r)}},{key:"getSnapshot",value:function(t,e){t||(t="png");var n=this;return new Promise(function(r,i){n.map.once("rendercomplete",function(a){try{var s=document.createElement("canvas"),u=a.target.getSize();s.width=u[0],s.height=u[1];var c=s.getContext("2d"),h=1/n.map.getView().getResolution();(function(){var t,r=(t=regeneratorRuntime.mark(function t(){var r,i,a,s,l,u,p,f,d,g;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(r=Array.from(n.map.getTargetElement().querySelectorAll(".ol-layer.main-layer canvas")),i=r[r.length-1],a=Array.from(n.map.getTargetElement().querySelectorAll(".ol-layer.annotations-layer canvas")),a=[i].concat(m(a)),s=a[0],0!==a.length){t.next=7;break}return t.abrupt("return");case 7:if(!(s.width>0)){t.next=25;break}for(l=s.parentNode.style.opacity,c.globalAlpha=""===l?1:Number(l),u="#000000",n.imageInfo&&n.imageInfo.BackgroundColor&&(u="#"+n.imageInfo.BackgroundColor),c.fillStyle=u,c.fillRect(0,0,c.canvas.width,c.canvas.height),p=0;p<a.length;p++)a[p].width>0&&(f=a[p].style.transform,d=f.match(/^matrix\(([^\(]*)\)$/)[1].split(",").map(Number),CanvasRenderingContext2D.prototype.setTransform.apply(c,d),c.drawImage(a[p],0,0),c.resetTransform());if(e&&!1===e.scalebar||Object(o.i)(c,n.imageInfo,h,e?e.scalebarLocation:null,e?e.scalebarFont:null),e&&e.title&&Object(o.j)(c,e.title),!e||!e.barcode){t.next=22;break}return g=0,n.barcodeControl&&n.barcodeControl.rotation&&(g=n.barcodeControl.rotation),t.next=22,Object(o.g)(c,n,g);case 22:if(!e||!e.overview){t.next=25;break}return t.next=25,Object(o.h)(c,n);case 25:case"end":return t.stop()}},t,this)}),function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function a(t){_(o,r,i,a,s,"next",t)}function s(t){_(o,r,i,a,s,"throw",t)}a(void 0)})});return function(){return r.apply(this,arguments)}})()().then(function(){var n="snapshot";if(e&&e.filename&&(n=e.filename),navigator.msSaveBlob){var i=s.msToBlob();if("jpg"==t&&console.warn("Cannot save jpg snapshot on internet explorer/edge. The resulting snapshot is in png format"),"blob"==t&&r(i),e&&e.dpi)return void Object(d.a)(i,e.dpi).then(function(t){navigator.msSaveBlob(t,n+".png"),r(t)});navigator.msSaveBlob(i,n+".png"),r(i)}else s.toBlob(function(i){"blob"==t&&r(i),e&&e.dpi?Object(d.a)(i,e.dpi).then(function(e){Object(l.saveAs)(e,n+"."+("jpg"==t?"jpg":"png")),r(e)}):(Object(l.saveAs)(i,n+"."+("jpg"==t?"jpg":"png")),r(i))},"jpg"==t?"image/jpeg":"image/png")})}catch(t){i(Error("Error creating snapshot"))}}),n.map.renderSync()})}},{key:"listen",value:function(t,e){this.listeners.hasOwnProperty(t)||console.error(t+" is not a valid event"),this.listeners[t].push(e)}},{key:"unlisten",value:function(t,e){this.listeners.hasOwnProperty(t)||console.error(t+" is not a valid event");var n=this.listeners[t].indexOf(e);return n>=0&&n<this.listeners[t].length&&(this.listeners[t].splice(n,1),!0)}},{key:"fireEvent",value:function(t,e){if(this.listeners.hasOwnProperty(t))for(var n=0,r=this.listeners[t].length;n<r;n++)this.listeners[t][n].call(this,e);else console.error(t+" does not exist")}},{key:"focusToAnnotation",value:function(t){var e=this.annotationsLayer.getSource().getFeatureById(t);if(e){var n={duration:500,center:this.map.getView().getCenter()},r=this.map.getSize(),i=e.getGeometry().getExtent();if(Math.abs((i[2]-i[0])*(i[3]-i[1]))<1e-4){var o=this.map.getView().getProjection().getExtent();i[0]-=o[2]/32,i[1]-=o[3]/32,i[2]+=o[2]/32,i[3]+=o[3]/32}this.map.getView().animate(n),this.map.getView().fit(i,r)}}},{key:"setBrightness",value:function(t){this.imageAdjustments.brightness=t,o.c.call(this)}},{key:"setContrast",value:function(t){this.imageAdjustments.contrast=t,o.c.call(this)}},{key:"setBrightnessContrastGamma",value:function(t,e,n){this.imageAdjustments.brightness=t,this.imageAdjustments.contrast=e,this.imageAdjustments.gamma=n,o.c.call(this)}},{key:"setGamma",value:function(t){this.imageAdjustments.gamma=t,o.c.call(this)}},{key:"setColorBalance",value:function(t,e,n){this.imageAdjustments.rgb=[t,e,n],o.c.call(this)}},{key:"getColorBalance",value:function(){return this.imageAdjustments.rgb}},{key:"addTileTransformer",value:function(t){this.imageAdjustments.tileTransformers=this.imageAdjustments.tileTransformers||[],this.imageAdjustments.tileTransformers.push(t)}},{key:"setTileTransformers",value:function(t){this.imageAdjustments.tileTransformers=t}},{key:"getBrightness",value:function(){return this.imageAdjustments.brightness}},{key:"getGamma",value:function(){return this.imageAdjustments.gamma}},{key:"getContrast",value:function(){return this.imageAdjustments.contrast}},{key:"getTileTransformers",value:function(){return(this.imageAdjustments.tileTransformers||[]).slice()}},{key:"getActiveServerUrl",value:function(){return this.imagesUrl}},{key:"updateSize",value:function(){if(this.map){this.map.updateSize();for(var t=this.map.getControls(),e=0;e<t.getLength();e++){var n=t.item(e);n instanceof s.a&&n.overviewMap&&n.overviewMap.updateSize()}o.r.call(this),o.u.call(this)}}},{key:"initializeFeatures",value:function(t,e){for(var n=new u.a.format.WKT,r={extent:e.getExtent(),flip:this.getFlip()},a=[],s=0;s<t.length;s++){var l=t[s],c=n.readFeature(l.Geometry);null===l.AnnotationID||void 0===l.AnnotationID?c.setId(1e4*Math.random()|0):c.setId(l.AnnotationID);var h=c.getGeometry();h.applyTransform(o.b.bind(r));var p=isNaN(l.Dimensions)?2:l.Dimensions,f=this.calculateArea(h),d=this.formatArea(f),g=this.calculateLength(h),y=this.formatLength(g),m=null;if(l.AuditLastModifiedOn){var v=/\/Date\(((\d*)([\+\-]?\d*))\)\//.exec(l.AuditLastModifiedOn);v&&v.length>2&&(m=new Date(parseInt(v[2])))}var _=null;if(l.AuditCreatedOn){var b=/\/Date\(((\d*)([\+\-]?\d*))\)\//.exec(l.AuditCreatedOn);b&&b.length>2&&(_=new Date(parseInt(b[2])))}else _=new Date;var w=l.FillColor?l.FillColor:i.e,O=l.Color?l.Color:"#3399CC",x=null;c.name=l.Notes,c.metaData={AnnotationID:l.AnnotationID,Classification:l.Classification,Color:O,CreatedOn:_,CreatedBy:l.AuditCreatedBy,Image:l.Image,LayerID:l.LayerID,Notes:l.Notes,UpdateInfo:l.UpdateInfo,UpdatedOn:m,UpdatedBy:l.AuditLastModifiedBy,Geometry:l.Geometry,Area:p>1?f:0,FormattedArea:p>1?d:"",Length:p>0?g:0,FormattedLength:p>0?y:"",FillColor:w,Dimensions:p,State:i.b.Pristine,LineThickness:l.LineThickness?l.LineThickness:2},"MultiPoint"===h.getType()&&(c.metaData.PointCount=h.getCoordinates().length);var E=new u.a.style.Fill({color:w}),S=new u.a.style.Stroke({color:O,width:c.metaData.LineThickness?c.metaData.LineThickness:2});if(l.Color&&-1!==l.Color.indexOf("#"))O="#"+l.Color.split("#")[1],x=new u.a.style.Circle({fill:E,stroke:S,radius:5});else-1!==l.Geometry.indexOf("POINT")&&(x=new u.a.style.Icon({anchor:[.5,.5],anchorXUnits:"fraction",anchorYUnits:"fraction",opacity:1,src:this.options.annotations.imageBaseUrl+l.Color,scale:isNaN(this.options.annotations.imageScale)?1:this.options.annotations.imageScale}));var C=new u.a.style.Style({image:x,fill:E,stroke:S,text:this.getAnnotationTextStyle(c,O)});c.setStyle(this.getAnnotationStyle(C,c)),c.originalStyle=C,a.push(c)}return a}},{key:"getAnnotationsLayersNames",value:function(){return this.imageInfo&&this.imageInfo.AnnotationsLayers?this.imageInfo.AnnotationsLayers:[]}},{key:"setControlsConfiguration",value:function(t){Array.isArray(t)||(t=[t]),o.t.call(this,t)}},{key:"getControlsConfiguration",value:function(){return o.m.call(this)}},{key:"hideGrid",value:function(){this.gridLayer&&this.gridLayer.getSource().clear()}},{key:"showGrid",value:function(t){if(!t||t.length<2||t[0]<=0||t[1]<=0)throw"Invalid size specified";this.options.grid={size:t},this.gridLayer.getSource().clear();var e=t[0]/this.imageInfo.MicrometresPerPixelX,n=t[1]/this.imageInfo.MicrometresPerPixelY,r=this.map.getView().getProjection().getExtent(),i=Math.min(r[0],r[2]),o=Math.max(r[0],r[2]),a=Math.min(r[1],r[3]),s=Math.max(r[1],r[3]),l=Math.ceil((o-i)/e),c=Math.ceil((s-a)/n);o=i+l*e,a=s-c*n;for(var h=0;h<=l;h++)this.gridLayer.getSource().addFeature(new u.a.Feature({geometry:new u.a.geom.LineString([[i+h*e,a],[i+h*e,s]])}));for(var p=0;p<=c;p++)this.gridLayer.getSource().addFeature(new u.a.Feature({geometry:new u.a.geom.LineString([[i,s-p*n],[o,s-p*n]])}))}},{key:"reloadAnnotations",value:function(t,e){if(!this.annotationsLayer||!this.mainLayer||!this.sessionID||!this.image)return console.error("Reload annotations: No image loaded in viewer"),void("function"===typeof t&&t.call(this));var n=this.annotationsLayer.getSource();n.clear(),this.hiddenAnnotations&&(this.hiddenAnnotations=[]),this.hiddenAnnotationsByFingerprint&&(this.hiddenAnnotationsByFingerprint=[]);var i=this.mainLayer.getSource().getProjection(),a=this;r.a.call(this,this.serviceUrl+"GetAnnotations","GET",function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?g(Object(n),!0).forEach(function(e){y(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):g(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}({sessionID:this.sessionID,pathOrUid:this.image,currentUserOnly:!1,refresh:Math.random()},e?{fingerprint:e}:{}),function(e){if(200==e.status){var r=Object(o.q)(e.responseText);if(r){var s=r,l=a.initializeFeatures(s,i);n.addFeatures(l)}}"function"===typeof t&&t.call(this)})}},{key:"rotateExtent",value:function(t,e){var n=u.a.geom.Polygon.fromExtent(t),r=u.a.extent.getCenter(t);return n.rotate(e,r),n.getExtent()}},{key:"getCurrentObjective",value:function(){if(!this.imageInfo||0==this.imageInfo.MicrometresPerPixelX)return"";if(!this.map)return console.warn("PMA.UI.Viewport map is not initialized"),"";var t=10/this.imageInfo.MicrometresPerPixelX/this.map.getView().getResolution();return t>1?(t|=0)+"X":void 0}},{key:"getMaxObjective",value:function(){var t=10/this.imageInfo.MicrometresPerPixelX;if(t>1)return t|=0,Object(o.k)(t)+"X"}},{key:"getAnnotationLayersVisibility",value:function(){return this.layerSwitcher?this.layerSwitcher.getLayersVisibility():[]}},{key:"setAnnotationLayersVisibility",value:function(t){this.layerSwitcher&&this.layerSwitcher.setLayersVisibility(t)}},{key:"getMouseWheelZoomMode",value:function(){return this.mouseWheelInteraction?this.mouseWheelInteraction.mode:MouseWheelMode.Normal}},{key:"setMouseWheelZoomMode",value:function(t){this.mouseWheelInteraction&&this.mouseWheelInteraction.setMode(t)}},{key:"startMeasuring",value:function(t){a.a.call(this,t)}},{key:"stopMeasuring",value:function(){a.b.call(this,!0)}}])&&b(e.prototype,n),v&&b(e,v),t}()},function(t,e,n){"use strict";e.o=function(){this.imageInfo?(this.serviceUrl=this.imageInfo.BaseUrl+"api/json/",this.imagesUrl=this.imageInfo.BaseUrl,this.sessionID?F.call(this):k.call(this,F)):function t(e){var n=this;r.a.call(this,this.serverUrls[e]+"api/json/GetVersionInfo","GET",null,function(r){if(200==r.status){var i=this.serverUrls[e];"/"!=i[i.length-1]&&(i+="/");var o=JSON.parse(r.responseText);this.serviceUrl=i+"api/json/",this.imagesUrl=i,this.sessionID?F.call(this):k.call(this,F,o)}else{if(!(e<this.serverUrls.length-1))throw"function"===typeof n.failCallback&&n.failCallback(),"No accessible server URL found.";t.call(this,e+1)}})}.call(this,0)},e.a=I,e.q=P,e.p=k,e.b=function(t,e,n){for(var r=0;r<t.length;r+=n){var i=t[r],o=t[r+1];!0!==this.flip.vertically&&(o=this.extent[3]-o),!0===this.flip.horizontally&&(i=this.extent[2]-i),e[r]=i,e[r+1]=o}},e.n=G,e.f=z,e.d=B,e.e=V,e.u=q,e.r=X,e.k=function(t){var e=[1,2,5,10,20,40,80,160];return e[e.map(function(e){return Math.abs(1-e/t)}).reduce(function(t,e,n,r){return e<r[t]?n:t},0)]},e.v=K,e.c=function(){null!=this.colorAdjustmentsControl&&this.colorAdjustmentsControl.update(this.imageAdjustments.brightness,this.imageAdjustments.contrast,this.imageAdjustments.gamma);this.mainLayer.getSource().refresh()},e.i=function(t,e,n,r,i){var o=t;if(0==e.MicrometresPerPixelX)return;i||(i="24px serif");r||(r="TopLeft");var a=n/e.MicrometresPerPixelX,s=0,l=1,u=0,c=o.canvas.width,h=o.canvas.height;for(;u<80;){var p=s/l;0==p?s=1:1==p?s=2:2==p?s=5:(s=1,l*=10),u=(s*=l)*a}var f="";s%1e3==0?(f=" mm",s/=1e3):f=" \u03bcm";var d=r.toLowerCase().startsWith("bottom")?h-25-20:20,g=r.toLowerCase().endsWith("right")?c-160-20:20;o.fillStyle="white",o.fillRect(g-4,d-4,u+8,33),o.beginPath(),o.moveTo(g,d),o.lineTo(g,d+25),o.lineTo(g+u,d+25),o.lineTo(g+u,d),o.stroke(),o.font=i,o.fillStyle="red";var y=o.measureText("".concat(s," ").concat(f)),m=g+u/2-y.width/2;m=m<g?g:m,o.textBaseline="top",o.fillText("".concat(s," ").concat(f),m,d)},e.j=function(t,e){if(!e||!t)return;t.font="32px serif",t.fillStyle="black",t.strokeStyle="white",t.lineWidth=4;var n=t.measureText(e),r=t.canvas.width/2-n.width/2;t.textBaseline="top",t.strokeText(e,r,20),t.fillText(e,r,20)},e.g=function(t,e,n){return new Promise(function(r,i){var o=e&&e.imageInfo;if(e&&t&&o)if(o.AssociatedImageTypes.indexOf("Barcode")<0)r();else{var a=new Image;a.crossOrigin="anonymous",a.onload=function(){var e=.12*t.canvas.width,n=e*(a.height/a.width),i=t.canvas.width-e-20;t.lineWidth=2,t.drawImage(a,i,20,e,n),t.strokeStyle="black",t.strokeRect(i,20,e+2,n+2),t.strokeStyle="white",t.strokeRect(i+2,22,e-2,n-2),r()},a.onerror=i,a.src=function(t,e){return t.getActiveServerUrl()+"barcode?sessionID="+encodeURIComponent(t.getSessionID())+"&pathOrUid="+encodeURIComponent(t.imageInfo.Filename)+(e?"&rotation="+e:"")}(e,n)}else r()})},e.h=function(t,e){return new Promise(function(n,r){var i=.2*t.canvas.width/e.imageInfo.Width,o=e.imagesUrl+"region?pathOrUid="+encodeURIComponent(e.image)+"&format=jpg&timeframe="+e.selectedTimeFrame+"&layer="+e.selectedLayer+"&channels="+e.channelsString+"&channelClipping="+e.channelClippingString+"&sessionID="+encodeURIComponent(e.sessionID)+"&drawScaleBar=false&x=0&y=0&width="+e.imageInfo.Width+"&height="+e.imageInfo.Height+"&scale="+i,a=new Image;a.crossOrigin="anonymous",a.onload=function(){var e=.2*t.canvas.width,r=e*(a.height/a.width),i=t.canvas.width-e-20,o=t.canvas.height-r-20;t.drawImage(a,i,o,e,r),t.lineWidth=2,t.strokeStyle="black",t.strokeRect(i,o,e+2,r+2),t.strokeStyle="white",t.strokeRect(i+2,o+2,e-2,r-2),n()},a.onerror=r,a.src=o})},e.s=Z,e.l=J,e.t=function(t){for(var e=0;e<t.length;e++){var n=t[e];n.control==i.d.ZoomSlider?Z.call(this,this.element.querySelector(".ol-zoomslider"),n.visible):n.control==i.d.ScaleLine?$.call(this,n):n.control==i.d.Overview?(Z.call(this,this.element.querySelector(".ol-overview"),n.visible),this.overviewControl.setCollapsed(n.collapsed)):n.control==i.d.Barcode?(Z.call(this,this.element.querySelector(".ol-associated-image"),n.visible),this.barcodeControl&&this.barcodeControl.setCollapsed(n.collapsed)):n.control==i.d.Magnifier?this.magnifierControl&&this.magnifierControl.setCollapsed(n.visible):n.control==i.d.ColorAdjustments?Z.call(this,this.element.querySelector(".ol-brightness-contrast"),n.visible):n.control==i.d.LayerSwitch?(Z.call(this,this.element.querySelector(".ol-layerswitch"),n.visible),this.layerSwitcher&&this.layerSwitcher.setCollapsed(n.collapsed)):n.control==i.d.DimensionSelector?(Z.call(this,this.element.querySelector(".ol-dimension-selector"),n.visible),this.dimensionsControl&&this.dimensionsControl.setCollapsed(n.collapsed)):n.control==i.d.Filename?(Z.call(this,this.element.querySelector(".ol-filename"),n.visible),this.filenameControl&&this.filenameControl.setCollapsed(n.collapsed)):n.control==i.d.Snapshot?Z.call(this,this.element.querySelector(".ol-snapshot"),n.visible):n.control==i.d.RotationControl?(Z.call(this,this.element.querySelector(".ol-rotation"),n.visible),this.rotationControl&&this.rotationControl.setCollapsed(n.collapsed)):n.control==i.d.Attribution?Z.call(this,this.element.querySelector(".ol-attr"),n.visible):n.control==i.d.Fullscreen&&Z.call(this,this.element.querySelector(".ol-full-screen"),n.visible)}},e.m=function(){var t=this.element.querySelector(".ol-scale-line");return[{control:i.d.ZoomSlider,visible:J.call(this,this.element.querySelector(".ol-zoomslider"))},{control:i.d.ScaleLine,visible:this.scaleLineControl&&J.call(this,this.element.querySelector(".ol-scale-line")),collapsed:!!t&&j(t,"collapsed")},{control:i.d.Overview,visible:J.call(this,this.element.querySelector(".ol-overview")),collapsed:this.overviewControl&&this.overviewControl.getCollapsed()},{control:i.d.Barcode,visible:J.call(this,this.element.querySelector(".ol-associated-image")),collapsed:this.barcodeControl&&this.barcodeControl.getCollapsed(),rotation:this.barcodeControl?this.barcodeControl.rotation:0},{control:i.d.Magnifier,visible:this.magnifierControl&&this.magnifierControl.getCollapsed()},{control:i.d.ColorAdjustments,visible:J.call(this,this.element.querySelector(".ol-brightness-contrast"))},{control:i.d.LayerSwitch,visible:this.layerSwitcher&&J.call(this,this.element.querySelector(".ol-layerswitch")),collapsed:!!this.layerSwitcher&&this.layerSwitcher.getCollapsed()},{control:i.d.DimensionSelector,visible:this.dimensionsControl&&J.call(this,this.element.querySelector(".ol-dimension-selector")),collapsed:!!this.dimensionsControl&&this.dimensionsControl.getCollapsed()},{control:i.d.Filename,visible:this.filenameControl&&J.call(this,this.element.querySelector(".ol-filename")),collapsed:!!this.filenameControl&&this.filenameControl.getCollapsed(),filename:null},{control:i.d.Snapshot,visible:this.snapShotControl&&J.call(this,this.element.querySelector(".ol-snapshot"))},{control:i.d.RotationControl,visible:this.rotationControl&&J.call(this,this.element.querySelector(".ol-rotation"))},{control:i.d.Attribution,visible:this.attributionControl&&J.call(this,this.element.querySelector(".ol-attr")),options:null}]};var r=n(19),i=n(60),o=n(101),a=n(35),s=n(156),l=n(18),u=n(237),c=n(23),h=n(371),p=n(238),f=n(239),d=n(375),g=n(376),y=n(377),m=n(378),v=n(381),_=n(382),b=n(383),w=n(384),O=n(241),x=n(126);function E(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function S(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function C(t){"@babel/helpers - typeof";return(C="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var T={};function I(t,e,n){t.addEventListener?t.addEventListener(e,n,!1):t.attachEvent&&t.attachEvent("on"+e,n)}function j(t,e){return-1!==(" "+t.className+" ").indexOf(" "+e+" ")}function L(t,e){t&&(j(t,e)||(t.className+=" "+e))}function R(t,e){t&&j(t,e)&&(t.className=t.className.replace(new RegExp(e,"g"),""))}function P(t){if(null===t||void 0===t||""===t)return null;var e=JSON.parse(t);return e.hasOwnProperty("d")?e.d:e}function N(t,e){if(!0===this.options.flip.horizontally||!0===this.options.flip.vertically||0!==this.imageAdjustments.brightness||1!==this.imageAdjustments.contrast||1!==this.imageAdjustments.gamma||null!==this.imageAdjustments.rgb&&(1!=this.imageAdjustments.rgb[0]||1!=this.imageAdjustments.rgb[1]||1!=this.imageAdjustments.rgb[2])||this.imageAdjustments.tileTransformers&&0!==this.imageAdjustments.tileTransformers.length){var n=new Image;n.crossOrigin="";var r=this;n.onload=function(){var e=document.createElement("canvas");e.width=n.width,e.height=n.height;var i=e.getContext("2d"),o=r.options.flip.horizontally?n.width:0,a=r.options.flip.vertically?n.height:0,s=r.options.flip.horizontally?-1:1,l=r.options.flip.vertically?-1:1;if(i.translate(o,a),i.scale(s,l),i.drawImage(n,0,0),0!==r.imageAdjustments.brightness||1!==r.imageAdjustments.contrast||1!==r.imageAdjustments.gamma||null!==r.imageAdjustments.rgb&&(1!=r.imageAdjustments.rgb[0]||1!=r.imageAdjustments.rgb[1]||1!=r.imageAdjustments.rgb[2])||r.imageAdjustments.tileTransformers&&r.imageAdjustments.tileTransformers.length>0){var u=i.getImageData(0,0,e.width,e.height);if(r.imageAdjustments.tileTransformers)for(var c=0;c<r.imageAdjustments.tileTransformers.length;c++)r.imageAdjustments.tileTransformers[c](u);var h=r.imageAdjustments.brightness,p=r.imageAdjustments.contrast;!function(t,e,n,r){var i=[];(!r||r<0)&&(r=0);for(var o=0;o<256;o++){var a=n*(o-128)+128+e;1!=r&&(a=255*Math.pow(a/255,1/r)),a[o]<0&&(a[o]=0),a[o]>255&&(a[o]=255),i.push(a)}for(o=0;o<t.length;o+=4)t[o]=i[t[o]],t[o+1]=i[t[o+1]],t[o+2]=i[t[o+2]]}(u.data,h,p,r.imageAdjustments.gamma),null===r.imageAdjustments.rgb||1==r.imageAdjustments.rgb[0]&&1==r.imageAdjustments.rgb[1]&&1==r.imageAdjustments.rgb[2]||function(t,e,n,r){for(var i=0;i<t.length;i+=4)t[i]=Math.max(0,Math.min(255,t[i]*e)),t[i+1]=Math.max(0,Math.min(255,t[i+1]*n)),t[i+2]=Math.max(0,Math.min(255,t[i+2]*r))}(u.data,r.imageAdjustments.rgb[0],r.imageAdjustments.rgb[1],r.imageAdjustments.rgb[2]),i.putImageData(u,0,0)}t.getImage().src=e.toDataURL("image/jpeg")},n.src=e}else t.getImage().src=e}function M(t,e,n,r){this.imageInfo.MaxZoomLevel;var i=Math.pow(2,e[0]),o=e[1];!0===this.options.flip.horizontally&&(o=i-e[1]-1);var a=e[2];return!0===this.options.flip.vertically&&(a=i-e[2]-1),this.imagesUrl+"annotatedTile?sessionID="+encodeURIComponent(this.sessionID)+"&pathOrUid="+encodeURIComponent(this.image)+"&type="+encodeURIComponent(t)+"&x="+o+"&y="+a+"&z="+e[0]}function A(t,e){if(!0===this.options.flip.horizontally||!0===this.options.flip.vertically){var n=new Image;n.crossOrigin="";var r=this;n.onload=function(){var e=document.createElement("canvas");e.width=n.width,e.height=n.height;var i=e.getContext("2d"),o=r.options.flip.horizontally?n.width:0,a=r.options.flip.vertically?n.height:0,s=r.options.flip.horizontally?-1:1,l=r.options.flip.vertically?-1:1;i.translate(o,a),i.scale(s,l),i.drawImage(n,0,0),t.getImage().src=e.toDataURL("image/png")},n.src=e}else t.getImage().src=e}function k(t,e){var n=this;n.userInfo=null;var i=Object(x.a)(e);r.a.call(this,this.serviceUrl+"Authenticate",i?"POST":"GET",{username:this.username,password:this.password,caller:this.options.caller},function(e){if(200!=e.status)throw"function"===typeof n.failCallback&&n.failCallback(),console.log(e),"Login failed with status "+e.status+" "+e.statusText;var r=P(e.responseText);if(!r||!0!==r.Success)throw"function"===typeof n.failCallback&&n.failCallback(),"Login failed. "+r.Reason;n.sessionID=r.SessionId,n.userInfo=r,t&&t.call(n)},{contentType:"application/json",dataEncodeCallback:i?JSON.stringify:null})}function F(){if(this.imageInfo)Y.call(this);else{var t=this;r.a.call(this,this.serviceUrl+"GetImageInfo","GET",{sessionID:this.sessionID,pathOrUid:this.image},function(e){if(200==e.status){var n=P(e.responseText);n?(t.imageInfo=n,Y.call(t)):("function"===typeof t.failCallback&&t.failCallback(),t.fireEvent(i.g.SlideLoadError,t),console.error("Server found but could not get image info"))}else{"function"===typeof t.failCallback&&t.failCallback();var r=0,o=c.a.translate("Unknown Error");try{if(e.responseText&&0!==e.responseText.length){var a=P(e.responseText);a&&a.hasOwnProperty("Code")&&(r=a.Code,o=c.a.translate(a.Message))}}catch(t){}this.element&&(this.element.innerHTML="Cannot load slide. "+o),t.Error={Code:r,Message:o},t.fireEvent(i.g.SlideLoadError,t),console.error("Server responded with status "+e.status+" and code "+r),console.log(e)}})}}function D(t,e,n,i){var o=this;r.a.call(this,this.serviceUrl+"GetAnnotations","GET",function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?E(Object(n),!0).forEach(function(e){S(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):E(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}({sessionID:this.sessionID,pathOrUid:this.image,currentUserOnly:!1,refresh:Math.random()},n?{fingerprint:n}:{}),function(n){if(200==n.status){var r=P(n.responseText);if(r){var a=r;if("function"===typeof i){a=[];r.forEach(function(t){i(t)&&a.push(t)})}var s=o.initializeFeatures(a,e);t.addFeatures(s)}}"function"===typeof o.readyCallback&&o.readyCallback()})}function G(t){r.a.call(this,this.serviceUrl+"GetFingerprint","GET",{sessionID:this.sessionID,pathOrUid:this.image},function(e){if(200==e.status){var n=P(e.responseText);t(n||null)}else t(null)})}function U(){var t,e,n;null!==this.arrowPanInteraction&&this.map.removeInteraction(this.arrowPanInteraction),this.arrowPanInteraction=new o.a.interaction.KeyboardPan({pixelDelta:(t=this.options.keyboardPanFactor,e=this.element.offsetWidth,n=t*e,(isNaN(n)||n<0||!isFinite(n))&&(n=50),n),duration:0}),this.map.addInteraction(this.arrowPanInteraction)}function z(){var t=this.imageInfo.MaxZoomLevel,e=0,n=0,r=Math.pow(2,t)*this.imageInfo.TileSize;!0===this.options.flip.horizontally&&(e=r-this.imageInfo.Width),!0!==this.options.flip.vertically&&(n=r-this.imageInfo.Height);var i=1;return this.imageInfo.MicrometresPerPixelX&&this.imageInfo.MicrometresPerPixelX>0&&(i=this.imageInfo.MicrometresPerPixelX),new o.a.proj.Projection({code:"pixel",units:"pixels",extent:[e,n,e+this.imageInfo.Width,n+this.imageInfo.Height],metersPerUnit:1e-6*i,getPointResolution:function(t,e){return t}})}function B(t,e,n,r){var a=Math.pow(2,this.imageInfo.MaxZoomLevel),s=parseInt(this.options.digitalZoomLevels);(isNaN(s)||s<=0)&&(s=0),this.options.digitalZoomLevels=s;for(var l=this.imageInfo.MaxZoomLevel,c=this.imageInfo.Width,h=this.imageInfo.Height;l>0&&(c>this.element.offsetWidth||h>this.element.offsetHeight);)c/=2,h/=2,l--;var p=[];if(this.imageInfo.MicrometresPerPixelX){var f=a,d=1/Math.pow(2,s),g=this.imageInfo.MicrometresPerPixelX;for(p=[1,2,5,10,20,40,80,160].map(function(t){return{objective:t,resolution:10/g/t}});p[0].resolution<f;)p=[{objective:0,resolution:2*p[0].resolution}].concat(p);p[p.length-1]>d&&p.push({objective:"MAX",resolution:d})}var y=new u.b({projection:t,center:e||o.a.extent.getCenter(t.getExtent()),showFullExtent:!0,maxResolution:a,minResolution:1/Math.pow(2,s),zoom:n||l,rotation:r||0,resolutions:0==p.length?void 0:p.map(function(t){return t.resolution}),constrainResolution:!1,zoomFactor:2}),m=this;function v(){m.fireEvent(i.g.ViewChanged,m)}return y.on("change:center",v.bind(this)),y.on("change:resolution",v.bind(this)),y.on("change:rotation",v.bind(this)),y}function V(){var t=Math.pow(2,this.imageInfo.MaxZoomLevel);return this.element.querySelector(".ol-overview")&&this.element.querySelector(".ol-overview").remove(),new f.a({maxResolution:t,tipLabel:c.a.translate("Overview"),collapsed:this.options.overview&&!0===this.options.overview.collapsed,tracking:this.options.overview&&!0===this.options.overview.tracking,stateManager:T})}function Y(){this.imageInfo.TimeFrames&&this.imageInfo.TimeFrames.TimeFrame&&(this.imageInfo.TimeFrames=[this.imageInfo.TimeFrames.TimeFrame]),this.imageInfo.TimeFrames&&0!==this.imageInfo.TimeFrames.length||(this.imageInfo.TimeFrames=[],this.imageInfo.TimeFrames.push({Layers:[{LayerID:0,Channels:[{ChannelID:0,Color:"ffffffff",Name:"Default"}]}],TimeID:0}));for(var t=0;t<this.imageInfo.TimeFrames.length;t++){var e=this.imageInfo.TimeFrames[t];e.Layers.ImageLayer&&(e.Layers=[e.Layers.ImageLayer]);for(var n=0;n<this.imageInfo.TimeFrames[t].Layers.length;n++){var r=this.imageInfo.TimeFrames[t].Layers[n];r.Channels.Channel&&(r.Channels=[r.Channels.Channel])}}for(this.selectedTimeFrame=this.options.fov&&this.options.fov.timeframe?this.options.fov.timeframe:0,this.selectedLayer=this.options.fov&&this.options.fov.layer?this.options.fov.layer:0,t=0;t<this.imageInfo.TimeFrames[0].Layers[0].Channels.length;t++){var f=this.imageInfo.TimeFrames[0].Layers[0].Channels[t];this.options.fov&&this.options.fov.channels?f.Active=this.options.fov.channels.includes(t):f.hasOwnProperty("Active")||(f.Active=!0),f.DefaultGamma?f.Gamma=f.DefaultGamma:f.Gamma=1}for(var x in this.channelsString=this.getActiveChannels().join(","),this.channelGammaString=this.getChannelGammaString(),L(this.element,"pma-ui-viewport-container"),this.element.tabIndex<0&&(this.element.tabIndex=0),i.i)i.i.hasOwnProperty(x)&&R(this.element,i.i[x]);L(this.element,this.options.theme),this.element.innerHTML="",this.imageInfo.BackgroundColor||(this.imageInfo.BackgroundColor="ffffff"),this.imageInfo.TimeFrames[0].Layers[0].Channels.length<2&&this.imageInfo.TimeFrames.length<2&&this.imageInfo.TimeFrames[0].Layers.length<2&&(this.options.dimensions=!1),this.element.style.backgroundColor="#"+this.imageInfo.BackgroundColor,this.imageInfo.NumberOfZoomLevels&&(this.imageInfo.MaxZoomLevel=this.imageInfo.NumberOfZoomLevels);var E=this.imageInfo.MaxZoomLevel;(!this.imageInfo.MicrometresPerPixelX||this.imageInfo.MicrometresPerPixelX<=0)&&(this.options.scaleLine=!1);var S=z.call(this),P=Math.pow(2,E),k=new o.a.layer.Tile({source:new o.a.source.XYZ({tileUrlFunction:function(t,e,n){this.imageInfo.MaxZoomLevel;var r=Math.pow(2,t[0]),i=t[1];!0===this.options.flip.horizontally&&(i=r-t[1]-1);var o=t[2];return!0===this.options.flip.vertically&&(o=r-t[2]-1),this.imagesUrl+"tile?sessionID="+encodeURIComponent(this.sessionID)+"&channels="+this.channelsString+"&channelClipping="+this.channelClippingString+"&gamma="+this.channelGammaString+"&timeframe="+this.selectedTimeFrame+"&layer="+this.selectedLayer+"&pathOrUid="+encodeURIComponent(this.image)+"&x="+i+"&y="+o+"&z="+t[0]}.bind(this),tileLoadFunction:N.bind(this),projection:S,wrapX:!1,attributions:"",crossOrigin:"PMA.UI",cacheSize:100,tileGrid:o.a.tilegrid.createXYZ({tileSize:[this.imageInfo.TileSize,this.imageInfo.TileSize],extent:[0,0,P*this.imageInfo.TileSize,P*this.imageInfo.TileSize],maxZoom:E})}),preload:2,className:"ol-layer main-layer",extent:[0,0,P*this.imageInfo.TileSize,P*this.imageInfo.TileSize]});this.mainLayer=k,this.loading=0,this.loaded=0,this.progressEl=null;var F=this;this.options.loadingBar&&(this.loading=0,this.loaded=0,this.progressEl=document.createElement("div"),this.progressEl.className="ol-progress",this.imageInfo.TimeFrames[0].Layers[0].Channels.length>1&&(this.progressEl.className="ol-progress dark"),this.element.appendChild(this.progressEl),k.getSource().on("tileloadstart",function(t){0===F.loading&&(F.progressEl.style.visibility="visible"),++F.loading,K.call(F)}),k.getSource().on("tileloadend",function(){setTimeout(function(){++F.loaded,K.call(F)},100)}),k.getSource().on("tileloaderror",function(){setTimeout(function(){++F.loaded,K.call(F)},100)})),k.getSource().on("tileloaderror",function(t){F.fireEvent(i.g.TilesError,F)});var Y=new o.a.interaction.DragZoom({condition:l.m,duration:0}),W=new o.a.interaction.DragRotate({condition:l.b}),J=[new o.a.control.Zoom({zoomInTipLabel:c.a.translate("Zoom in"),zoomOutTipLabel:c.a.translate("Zoom out")}),new h.a({tipLabel:c.a.translate("Previous view"),dragZoom:Y})];J.push(new o.a.control.FullScreen({tipLabel:c.a.translate("Toggle fullscreen"),source:this.options.fullScreenElement,label:"\u2195",labelActive:"\u2195"}));var Q=[k];if(this.options.annotationsLayers&&this.imageInfo.AnnotationsLayers&&this.imageInfo.AnnotationsLayers.length>0){for(var tt=[],et=0;et<this.imageInfo.AnnotationsLayers.length;et++){var nt=this.imageInfo.AnnotationsLayers[et],rt=new o.a.layer.Tile({displayInLayerSwitcher:!0,visible:!0===this.options.annotationsLayers.loadLayers,title:nt,source:new o.a.source.XYZ({tileUrlFunction:M.bind(this,nt),tileLoadFunction:A.bind(this),projection:S,wrapX:!1,attributions:"",crossOrigin:"PMA.UI"}),extent:[0,0,P*this.imageInfo.TileSize,P*this.imageInfo.TileSize],className:"ol-layer annotations-layer"});rt.getSource().tileGrid=o.a.tilegrid.createXYZ({tileSize:[this.imageInfo.TileSize,this.imageInfo.TileSize],extent:[0,0,P*this.imageInfo.TileSize,P*this.imageInfo.TileSize],maxZoom:E}),tt.push(rt)}if(tt.length>0){var it=new o.a.layer.Group({title:c.a.translate("Annotation layers"),layers:tt});Q.push(it)}}if(this.options.annotations){var ot=new o.a.source.Vector({projection:S});this.annotationsLayer=new o.a.layer.Vector({source:ot,updateWhileAnimating:!0,updateWhileInteracting:!0,className:"ol-layer annotations-layer"}),function(t,e){var n=this;"object"===C(this.options.annotations)&&"loadAnnotationsByFingerprint"in this.options.annotations&&this.options.annotations.loadAnnotationsByFingerprint?G.call(this,function(r){D.call(n,t,e,r,n.options.annotations.filter)}):D.call(this,t,e,null,this.options.annotations.filter)}.call(this,ot,S),Q.push(this.annotationsLayer),this.showAnnotations(!1!==this.options.annotations.visible)}var at=new o.a.source.Vector({projection:S});this.measureLayer=new o.a.layer.Vector({source:at,updateWhileAnimating:!0,updateWhileInteracting:!0,style:new a.c({fill:new o.a.style.Fill({color:"rgba(255, 255, 255, 0.2)"}),stroke:new o.a.style.Stroke({color:"#ffcc33",width:2}),image:new o.a.style.Circle({radius:7,fill:new o.a.style.Fill({color:"rgba(255, 255, 255, 0.2)"}),stroke:new o.a.style.Stroke({color:"#ff0000",width:2})}),text:new o.a.style.Text({font:"12px Calibri,sans-serif",fill:new o.a.style.Fill({color:"#000"}),stroke:new o.a.style.Stroke({color:"#fff",width:2})})})}),this.gridLayer=new o.a.layer.Vector({updateWhileAnimating:!0,updateWhileInteracting:!0,source:new o.a.source.Vector({projection:S}),style:new o.a.style.Style({fill:new o.a.style.Fill({color:"rgba(255, 255, 255, 0.2)"}),stroke:new o.a.style.Stroke({color:"#bbcc33",width:1})})}),this.measureTooltips=[],Q.push(this.measureLayer),Q.push(this.gridLayer),this.options.keyboardPanFactor||(this.options.keyboardPanFactor=.5);var st=new o.a.interaction.DragPan({kinetic:new s.a(-.005,.05,100),onFocusOnly:!1});if(this.mouseWheelInteraction=new O.a({duration:0,maxDelta:1,deltaPerZoom:100,timeout:0,onFocusOnly:!1,condition:l.d,constrainResolution:!1}),this.map=new u.a({interactions:[st,W,Y,this.mouseWheelInteraction,new o.a.interaction.PinchZoom({constrainResolution:!1}),new o.a.interaction.PinchRotate,new o.a.interaction.DoubleClickZoom,new o.a.interaction.KeyboardZoom],loadTilesWhileAnimating:!0===this.options.highQuality,loadTilesWhileInteracting:!0===this.options.highQuality,layers:Q,target:this.element,controls:J,view:B.call(this,S)}),Z.call(this,this.element.querySelector(".ol-full-screen"),this.options.fullscreenControl),U.call(this),this.options.customButtons&&function(t){if(null!=t&&t.length>0&&this.element){var e=i.c.S,n={};n[e]=[];for(var r=0;r<t.length;r++)if(t[r].location){var o=t[r].location;(n[o]=n[o]||[]).push(t[r])}else n[e].push(t[r]);for(var a in n)if(n.hasOwnProperty(a)){var s=document.createElement("div");for(s.className="ol-unselectable ol-control ol-pma-custom-btn ol-custom-control "+a.toString(),r=0;r<n[a].length;r++){var l=n[a][r],u=document.createElement("button");u.title=l.title?l.title:"",u.innerHTML=l.content?l.content:"",u.className=l.class?l.class:"","function"===typeof l.callback&&u.addEventListener("click",l.callback.bind(this)),s.appendChild(u)}this.element.querySelector(".ol-overlaycontainer-stopevent").appendChild(s)}}}.call(this,this.options.customButtons),this.options.position&&this.setPosition(this.options.position),this.options.fov&&this.options.fov.extent&&this.fitToExtent(this.options.fov.extent,1==this.options.fov.constrainResolution),this.options.fov&&this.options.fov.rotation&&this.setPosition({rotation:this.options.fov.rotation}),function(){this.zoomSliderControl=new o.a.control.ZoomSlider,this.map.addControl(this.zoomSliderControl),!1===this.options.zoomSlider&&Z.call(this,this.element.querySelector(".ol-zoomslider"),!1);for(var t=this.imageInfo.MetaData,e=0;e<t.length;e++)if("compression"===t[e].Name){"Jpeg2000YCbCr"!==t[e].Value&&"Jpeg2000RGB"!==t[e].Value&&"Jpeg2000"!==t[e].Value&&-1===t[e].Value.indexOf("JPEG 2000")&&"JP2"!==t[e].Value||!0;break}!1?(this.attributionControl=new v.a({className:"ol-attr-kakadu",html:'<a href="http://kakadusoftware.com/" target="_blank">&nbsp;</a>'}),this.map.addControl(this.attributionControl)):this.options.attributions&&(this.attributionControl=new v.a(this.options.attributions),this.map.addControl(this.attributionControl));this.colorAdjustmentsControl=new b.a({layer:this.mainLayer,viewer:this}),this.map.addControl(this.colorAdjustmentsControl),Z.call(this,this.element.querySelector(".ol-brightness-contrast"),this.options.colorAdjustments),this.options.annotationsLayers&&this.imageInfo.AnnotationsLayers&&this.imageInfo.AnnotationsLayers.length>0&&(this.layerSwitcher=new _.a({pmaViewport:this,tipLabel:c.a.translate("Layers"),collapsed:!(!this.options.annotationsLayers||!this.options.annotationsLayers.collapsed),stateManager:T}),this.map.addControl(this.layerSwitcher));if(this.overviewControl=V.call(this),this.map.addControl(this.overviewControl),Z.call(this,this.element.querySelector(".ol-overview"),this.options.overview),this.imageInfo.AssociatedImageTypes)for(var n=0;n<this.imageInfo.AssociatedImageTypes.length;n++)if("barcode"==this.imageInfo.AssociatedImageTypes[n].toLowerCase()){var r=0,a=!1;this.options.barcode&&(this.options.barcode.rotation&&(r=this.options.barcode.rotation),this.options.barcode.collapsed&&(a=this.options.barcode.collapsed)),this.barcodeControl=new d.a({pmaViewport:this,rotation:r,collapsed:a,imageType:"barcode",tipLabel:c.a.translate("Barcode"),stateManager:T}),this.map.addControl(this.barcodeControl),Z.call(this,this.element.querySelector(".ol-associated-image"),this.options.barcode);break}this.dimensionsControl=new m.a({pmaViewport:this,tipLabel:c.a.translate("Channels"),collapsed:this.options.dimensions&&this.options.dimensions.collapsed,stateManager:T}),this.map.addControl(this.dimensionsControl),this.dimensionsControl.renderSliders(),Z.call(this,this.element.querySelector(".ol-dimension-selector"),this.options.dimensions);var s=this,l={onClick:function(){s.fireEvent(i.g.FilenameClick,s)},stateManager:T};"string"===typeof this.options.filename?l.filename=s.options.filename:"function"===typeof this.options.filename?l.filename=s.options.filename.call(s,{serverUrl:s.getActiveServerUrl(),path:s.imageInfo.Filename}):l.filename=s.imageInfo.Filename;this.filenameControl=new y.a(l),this.map.addControl(this.filenameControl),Z.call(this,this.element.querySelector(".ol-filename"),this.options.filename),T.scaleLine||(T.scaleLine={});this.scaleLineControl=new o.a.control.ScaleLine,this.map.addControl(this.scaleLineControl);var u,h=this.element.querySelector(".ol-scale-line");if(h){0==this.options.scaleLine&&$.call(this,{visible:!1,collapsed:T.scaleLine.collapsed}),!0===T.scaleLine.collapsed&&L(h,"collapsed");var f=document.createElement("div");f.className="scanResolution",H.call(this,f),h.appendChild(f);var O=this;this.map.getView().on("change:resolution",function(){H.call(O,f)}),I(h,"click",function(){j(h,"collapsed")?(R(h,"collapsed"),T.scaleLine.collapsed=!1):(L(h,"collapsed"),T.scaleLine.collapsed=!0)})}this.snapShotControl=new g.a({pmaViewport:this,tipLabel:c.a.translate("Snapshot")}),this.map.addControl(this.snapShotControl),Z.call(this,this.element.querySelector(".ol-snapshot"),1==this.options.snapshot);try{u=!0===this.options.rotationControl.collapsed}catch(t){u=!1}this.rotationControl=new p.a({pmaViewport:this,resetTipLabel:c.a.translate("Reset rotation"),flipHorizontallyTipLabel:c.a.translate("Flip horizontally"),flipVerticallyTipLabel:c.a.translate("Flip vertically"),collapsed:u}),this.map.addControl(this.rotationControl),Z.call(this,this.element.querySelector(".ol-rotation"),!(!1===this.options.rotationControl)),this.magnifierControl=function(t,e){return new w.a({target:t,collapsed:e})}.call(this,null,!this.options.magnifier||this.options.magnifier&&!0===this.options.magnifier.collapsed),this.map.addControl(this.magnifierControl),X.call(this)}.call(this),this.options.digitalZoomLevels>1){var lt=this.options.digitalZoomLevels+E,ut=100-Math.round(100*this.options.digitalZoomLevels/lt);if(ut>0&&ut<=100){var ct=this.element.querySelector(".ol-zoomslider");if(ct){var ht,pt=window.getComputedStyle(ct,null),ft=document.createElement("div");ft.className="pma-ui-viewport-container "+this.options.theme;var dt=document.createElement("div");dt.className=this.options.theme+" ol-zoomslider digital-zoom-levels",ft.appendChild(dt),ct.appendChild(ft),ht=window.getComputedStyle(dt,null).getPropertyValue("background-color"),ct.removeChild(ft),ct.style.background="linear-gradient(to top, "+pt.getPropertyValue("background-color")+" "+ut+"%, "+ht+" "+ut+"%, "+ht+" 100%)"}}}this.options.grid&&this.showGrid(this.options.grid.size),this.map&&(this.map.on("change:size",function(){q.call(this),U.call(this)}.bind(this)),q.call(this)),isNaN(this.imageInfo.DefaultGamma)||this.setGamma(this.imageInfo.DefaultGamma),this.options.annotations||"function"!==typeof this.readyCallback||this.readyCallback()}function q(){var t=this.map.getSize();if(this.element.className=this.element.className.replace(/ xlg\b| lg\b| md\b| sm\b| xs\b/g,""),t[0]>1200?(this.element.className+=" xlg",R(this.element.querySelector(".ol-scale-line"),"collapsed"),R(this.element.querySelector(".ol-filename"),"ol-collapsed")):t[0]>992?(this.element.className+=" lg",R(this.element.querySelector(".ol-scale-line"),"collapsed"),R(this.element.querySelector(".ol-filename"),"ol-collapsed")):t[0]>768?(this.element.className+=" md",R(this.element.querySelector(".ol-scale-line"),"collapsed"),R(this.element.querySelector(".ol-filename"),"ol-collapsed")):t[0]>576?this.element.className+=" sm":this.element.className+=" xs",this.element.className=this.element.className.replace(/ xlgh| lgh| mdh| smh| xsh/g,""),t[1]>1200?this.element.className+=" xlgh":t[1]>992?this.element.className+=" lgh":t[1]>768?this.element.className+=" mdh":t[1]>576?this.element.className+=" smh":this.element.className+=" xsh",this.overviewControl)if(t[0]<300||t[1]<300);else{var e=1/14;t[0]<500?e=1/6:t[0]<750?e=1/7:t[0]<1e3?e=1/8:t[0]<1250?e=1/9:t[0]<1500?e=.1:t[0]<1750?e=1/11:t[0]<2e3?e=1/12:t[0]<3e3&&(e=1/13),this.overviewControl.changeOverviewSizePx(Math.sqrt(t[0]*t[0])*e)}}function X(){var t=this.element.querySelector(".ol-zoomslider");if(t){var e=t.querySelector(".objectives-scale");e&&t.removeChild(e);var n=window.getComputedStyle(t,null);if(0!==this.imageInfo.MicrometresPerPixelX){parseFloat(n.getPropertyValue("padding-top")),parseFloat(n.getPropertyValue("margin-top")),parseFloat(n.getPropertyValue("border-top-width")),parseFloat(n.getPropertyValue("padding-bottom")),parseFloat(n.getPropertyValue("margin-bottom")),parseFloat(n.getPropertyValue("border-bottom-width"));var r=this.element.querySelector(".ol-zoomslider-thumb"),i=window.getComputedStyle(r,null),o=r.offsetHeight+parseFloat(i.getPropertyValue("padding-top"))+parseFloat(i.getPropertyValue("margin-top"))+parseFloat(i.getPropertyValue("border-top-width"))+parseFloat(i.getPropertyValue("padding-bottom"))+parseFloat(i.getPropertyValue("margin-bottom"))+parseFloat(i.getPropertyValue("border-bottom-width")),a=t.offsetHeight-o;a+=o-r.offsetHeight;for(var s=10/this.imageInfo.MicrometresPerPixelX,l=this.options.digitalZoomLevels+this.imageInfo.MaxZoomLevel,u=a/l,c=[],h=0;h<=l;h++){var p=s/Math.pow(2,l-h-this.options.digitalZoomLevels);!1!==(p=W(p))&&c.push({name:p+"X",height:u*h})}if(c.length>0){var f=document.createElement("div");f.className="objectives-scale",t.appendChild(f);for(var d="",g=0;g<c.length;g++)d+='<div style="bottom: '+c[g].height+'px"><div>'+c[g].name+"</div></div>";f.innerHTML=d,f.style.height=a+"px",f.style.top=o/2+"px"}}}}function W(t){if(t>1){(t|=0)>10&&(t=10*Math.round(t/10)|0);for(var e=[1,2,5,10,20,40,80,160],n=0;n<e.length;n++)if(e[n]===t)return e[n]}return!1}function H(t){var e=10/this.imageInfo.MicrometresPerPixelX/this.map.getView().getResolution();e>1?(e|=0,t.innerHTML=e+"X",t.style.display="block"):t.style.display="none"}function K(){var t=this.loaded/this.loading*100;t>100&&(t=100);var e=t.toFixed(1)+"%";if(this.progressEl.style.width=e,this.loading<=this.loaded){this.loading=0,this.loaded=0;var n=this;setTimeout(function(){n.loading===n.loaded&&(n.progressEl.style.visibility="hidden",n.progressEl.style.width=0)},500)}}function Z(t,e){if(t)if(!1===e)L(t,"ol-hidden");else{if(j(t,"ol-dimension-selector")&&this.imageInfo.TimeFrames[0].Layers[0].Channels.length<2&&this.imageInfo.TimeFrames.length<2&&this.imageInfo.TimeFrames[0].Layers.length<2)return;R(t,"ol-hidden")}}function J(t){return!!t&&!j(t,"ol-hidden")}function $(t){var e=this.element.querySelector(".ol-scale-line");e&&(Z.call(this,e,t.visible),!0===t.collapsed?(L(e,"collapsed"),T.scaleLine.collapsed=!0):(R(e,"collapsed"),T.scaleLine.collapsed=!1))}},function(t,e,n){"use strict";n.d(e,"a",function(){return d});var r=n(81),i=n(29),o=n(2),a=n(269),s=n(315),l=n(51),u=n(91),c=n(9),h=n(160),p=n(0),f=n(123),d=(n(83),{layer:a,source:s,tilegrid:l,proj:o,control:i,style:r,interaction:u,events:c,format:h,extent:p,geom:f})},function(t,e,n){"use strict";e.a=function(t){return Array.isArray(t)?Object(r.d)(t):t};var r=n(61)},function(t,e,n){"use strict";var r,i=n(68),o=n(3),a=n(6),s=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),l=function(t){function e(e,n,r,i){var o=t.call(this)||this;return o.extent=e,o.pixelRatio_=r,o.resolution=n,o.state=i,o}return s(e,t),e.prototype.changed=function(){this.dispatchEvent(o.a.CHANGE)},e.prototype.getExtent=function(){return this.extent},e.prototype.getImage=function(){return Object(a.b)()},e.prototype.getPixelRatio=function(){return this.pixelRatio_},e.prototype.getResolution=function(){return this.resolution},e.prototype.getState=function(){return this.state},e.prototype.load=function(){Object(a.b)()},e}(i.a);e.a=l},function(t,e,n){"use strict";e.a={POSTRENDER:"postrender",MOVESTART:"movestart",MOVEEND:"moveend"}},function(t,e,n){"use strict";e.a={POINTERMOVE:"pointermove",POINTERDOWN:"pointerdown",POINTERUP:"pointerup",POINTEROVER:"pointerover",POINTEROUT:"pointerout",POINTERENTER:"pointerenter",POINTERLEAVE:"pointerleave",POINTERCANCEL:"pointercancel"}},function(t,e,n){"use strict";var r=n(43),i=function(){function t(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}return t.prototype.canWrapX=function(){return this.canWrapX_},t.prototype.getCode=function(){return this.code_},t.prototype.getExtent=function(){return this.extent_},t.prototype.getUnits=function(){return this.units_},t.prototype.getMetersPerUnit=function(){return this.metersPerUnit_||r.a[this.units_]},t.prototype.getWorldExtent=function(){return this.worldExtent_},t.prototype.getAxisOrientation=function(){return this.axisOrientation_},t.prototype.isGlobal=function(){return this.global_},t.prototype.setGlobal=function(t){this.global_=t,this.canWrapX_=!(!t||!this.extent_)},t.prototype.getDefaultTileGrid=function(){return this.defaultTileGrid_},t.prototype.setDefaultTileGrid=function(t){this.defaultTileGrid_=t},t.prototype.setExtent=function(t){this.extent_=t,this.canWrapX_=!(!this.global_||!t)},t.prototype.setWorldExtent=function(t){this.worldExtent_=t},t.prototype.setGetPointResolution=function(t){this.getPointResolutionFunc_=t},t.prototype.getPointResolutionFunc=function(){return this.getPointResolutionFunc_},t}();e.a=i},function(t,e,n){"use strict";e.b=function(t,e,n){var r=void 0!==n?t.toFixed(n):""+t,i=r.indexOf(".");return(i=-1===i?r.length:i)>e?r:new Array(1+e-i).join("0")+r},e.a=function(t,e){for(var n=(""+t).split("."),r=(""+e).split("."),i=0;i<Math.max(n.length,r.length);i++){var o=parseInt(n[i]||"0",10),a=parseInt(r[i]||"0",10);if(o>a)return 1;if(a>o)return-1}return 0}},function(t,e,n){"use strict";var r,i=n(135),o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=function(t){function e(e,n,r,i,o){var a=t.call(this,e,n,o)||this;return a.originalEvent=r,a.pixel_=null,a.coordinate_=null,a.dragging=void 0!==i&&i,a}return o(e,t),Object.defineProperty(e.prototype,"pixel",{get:function(){return this.pixel_||(this.pixel_=this.map.getEventPixel(this.originalEvent)),this.pixel_},set:function(t){this.pixel_=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"coordinate",{get:function(){return this.coordinate_||(this.coordinate_=this.map.getCoordinateFromPixel(this.pixel)),this.coordinate_},set:function(t){this.coordinate_=t},enumerable:!1,configurable:!0}),e.prototype.preventDefault=function(){t.prototype.preventDefault.call(this),"preventDefault"in this.originalEvent&&this.originalEvent.preventDefault()},e.prototype.stopPropagation=function(){t.prototype.stopPropagation.call(this),"stopPropagation"in this.originalEvent&&this.originalEvent.stopPropagation()},e}(i.a);e.a=a},function(t,e,n){"use strict";var r,i=n(17),o=n(8),a=n(36),s=n(86),l=n(0),u=n(48),c=n(72),h=n(57),p=n(139),f=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),d=function(t){function e(e,n){var r=t.call(this)||this;return r.maxDelta_=-1,r.maxDeltaRevision_=-1,void 0===n||Array.isArray(e[0])?r.setCoordinates(e,n):r.setFlatCoordinates(n,e),r}return f(e,t),e.prototype.clone=function(){return new e(this.flatCoordinates.slice(),this.layout)},e.prototype.closestPointXY=function(t,e,n,r){return r<Object(l.closestSquaredDistanceXY)(this.getExtent(),t,e)?r:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(Object(s.e)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),Object(s.d)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!0,t,e,n,r))},e.prototype.getArea=function(){return Object(p.a)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},e.prototype.getCoordinates=function(){return Object(h.a)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},e.prototype.getSimplifiedGeometryInternal=function(t){var n=[];return n.length=Object(c.a)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,n,0),new e(n,i.a.XY)},e.prototype.getType=function(){return o.a.LINEAR_RING},e.prototype.intersectsExtent=function(t){return!1},e.prototype.setCoordinates=function(t,e){this.setLayout(e,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=Object(u.b)(this.flatCoordinates,0,t,this.stride),this.changed()},e}(a.a);e.a=d},function(t,e,n){"use strict";e.a=function(t,e,n,o,a){return!Object(r.forEachCorner)(a,function(r){return!i(t,e,n,o,r[0],r[1])})},e.b=i,e.c=o,e.d=function(t,e,n,r,i,a){if(0===n.length)return!1;for(var s=0,l=n.length;s<l;++s){var u=n[s];if(o(t,e,u,r,i,a))return!0;e=u[u.length-1]}return!1};var r=n(0);function i(t,e,n,r,i,o){for(var a=0,s=t[n-r],l=t[n-r+1];e<n;e+=r){var u=t[e],c=t[e+1];l<=o?c>o&&(u-s)*(o-l)-(i-s)*(c-l)>0&&a++:c<=o&&(u-s)*(o-l)-(i-s)*(c-l)<0&&a--,s=u,l=c}return 0!==a}function o(t,e,n,r,o,a){if(0===n.length)return!1;if(!i(t,e,n[0],r,o,a))return!1;for(var s=1,l=n.length;s<l;++s)if(i(t,n[s-1],n[s],r,o,a))return!1;return!0}},function(t,e,n){"use strict";e.a=a,e.b=function(t,e,n,r,i){for(var o=0,s=n.length;o<s;++o){if(a(t,e,n[o],r,i))return!0;e=n[o]}return!1},e.c=s,e.d=function(t,e,n,r,i){for(var o=0,a=n.length;o<a;++o){var l=n[o];if(s(t,e,l,r,i))return!0;e=l[l.length-1]}return!1};var r=n(0),i=n(190),o=n(110);function a(t,e,n,o,a){var s=Object(r.extendFlatCoordinates)(Object(r.createEmpty)(),t,e,n,o);return!!Object(r.intersects)(a,s)&&(!!Object(r.containsExtent)(a,s)||(s[0]>=a[0]&&s[2]<=a[2]||(s[1]>=a[1]&&s[3]<=a[3]||Object(i.a)(t,e,n,o,function(t,e){return Object(r.intersectsSegment)(a,t,e)}))))}function s(t,e,n,r,i){if(!function(t,e,n,r,i){return!!a(t,e,n,r,i)||!!Object(o.b)(t,e,n,r,i[0],i[1])||!!Object(o.b)(t,e,n,r,i[0],i[3])||!!Object(o.b)(t,e,n,r,i[2],i[1])||!!Object(o.b)(t,e,n,r,i[2],i[3])}(t,e,n[0],r,i))return!1;if(1===n.length)return!0;for(var s=1,l=n.length;s<l;++s)if(Object(o.a)(t,n[s-1],n[s],r,i)&&!a(t,n[s-1],n[s],r,i))return!1;return!0}},function(t,e,n){"use strict";e.a=i,e.b=o,e.c=function(t,e,n,r,i){for(var a=0,s=n.length;a<s;++a){var l=n[a];if(!o(t,e,l,r,i))return!1;l.length&&(e=l[l.length-1])}return!0},e.d=a,e.e=function(t,e,n,r,i){for(var o=0,s=n.length;o<s;++o)e=a(t,e,n[o],r,i);return e};var r=n(265);function i(t,e,n,r){for(var i=0,o=t[n-r],a=t[n-r+1];e<n;e+=r){var s=t[e],l=t[e+1];i+=(s-o)*(l+a),o=s,a=l}return 0===i?void 0:i>0}function o(t,e,n,r,o){for(var a=void 0!==o&&o,s=0,l=n.length;s<l;++s){var u=n[s],c=i(t,e,u,r);if(0===s){if(a&&c||!a&&!c)return!1}else if(a&&!c||!a&&c)return!1;e=u}return!0}function a(t,e,n,o,a){for(var s=void 0!==a&&a,l=0,u=n.length;l<u;++l){var c=n[l],h=i(t,e,c,o);(0===l?s&&h||!s&&!h:s&&!h||!s&&h)&&Object(r.a)(t,e,c,o),e=c}return e}},function(t,e,n){"use strict";var r,i=n(54),o=n(142),a=n.n(o),s=n(1),l=n(35),u=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),c="renderOrder",h=function(t){function e(e){var n=this,r=e||{},i=Object(s.a)({},r);return delete i.style,delete i.renderBuffer,delete i.updateWhileAnimating,delete i.updateWhileInteracting,(n=t.call(this,i)||this).declutter_=void 0!==r.declutter&&r.declutter,n.renderBuffer_=void 0!==r.renderBuffer?r.renderBuffer:100,n.style_=null,n.styleFunction_=void 0,n.setStyle(r.style),n.updateWhileAnimating_=void 0!==r.updateWhileAnimating&&r.updateWhileAnimating,n.updateWhileInteracting_=void 0!==r.updateWhileInteracting&&r.updateWhileInteracting,n}return u(e,t),e.prototype.getDeclutter=function(){return this.declutter_},e.prototype.getFeatures=function(e){return t.prototype.getFeatures.call(this,e)},e.prototype.getRenderBuffer=function(){return this.renderBuffer_},e.prototype.getRenderOrder=function(){return this.get(c)},e.prototype.getStyle=function(){return this.style_},e.prototype.getStyleFunction=function(){return this.styleFunction_},e.prototype.getUpdateWhileAnimating=function(){return this.updateWhileAnimating_},e.prototype.getUpdateWhileInteracting=function(){return this.updateWhileInteracting_},e.prototype.renderDeclutter=function(t){t.declutterTree||(t.declutterTree=new a.a(9)),this.getRenderer().renderDeclutter(t)},e.prototype.setRenderOrder=function(t){this.set(c,t)},e.prototype.setStyle=function(t){this.style_=void 0!==t?t:l.a,this.styleFunction_=null===t?void 0:Object(l.d)(this.style_),this.changed()},e}(i.a);e.a=h},function(t,e,n){"use strict";e.a={ADDFEATURE:"addfeature",CHANGEFEATURE:"changefeature",CLEAR:"clear",REMOVEFEATURE:"removefeature",FEATURESLOADSTART:"featuresloadstart",FEATURESLOADEND:"featuresloadend",FEATURESLOADERROR:"featuresloaderror"}},function(t,e,n){"use strict";n.d(e,"a",function(){return i}),n.d(e,"c",function(){return o}),n.d(e,"f",function(){return a}),n.d(e,"e",function(){return s}),n.d(e,"b",function(){return l}),n.d(e,"g",function(){return u}),n.d(e,"i",function(){return c}),n.d(e,"h",function(){return h}),n.d(e,"d",function(){return p}),e.j=d,e.k=function(){if(!r){var t=document.createElement("canvas"),e=d(t);e&&(r=e.getSupportedExtensions())}return r};var r,i=34962,o=34963,a=35040,s=35044,l=35048,u=5121,c=5123,h=5125,p=5126,f=["experimental-webgl","webgl","webkit-3d","moz-webgl"];function d(t,e){for(var n=f.length,r=0;r<n;++r)try{var i=t.getContext(f[r],e);if(i)return i}catch(t){}return null}},function(t,e,n){"use strict";var r,i=n(291),o=n(38),a=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return a(e,t),e.prototype.expireCache=function(t){for(;this.canExpireCache();){if(this.peekLast().getKey()in t)break;this.pop().release()}},e.prototype.pruneExceptNewestZ=function(){if(0!==this.getCount()){var t=this.peekFirstKey(),e=Object(o.b)(t)[0];this.forEach(function(t){t.tileCoord[0]!==e&&(this.remove(Object(o.d)(t.tileCoord)),t.release())}.bind(this))}},e}(i.a);e.a=s},function(t,e,n){"use strict";n.d(e,"a",function(){return y});var r,i=n(12),o=n(88),a=n(116),s=n(30),l=n(6),u=n(4),c=n(2),h=n(38),p=n(51),f=n(28),d=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),g=function(t){function e(e){var n=t.call(this,{attributions:e.attributions,attributionsCollapsible:e.attributionsCollapsible,projection:e.projection,state:e.state,wrapX:e.wrapX})||this;n.on,n.once,n.un,n.opaque_=void 0!==e.opaque&&e.opaque,n.tilePixelRatio_=void 0!==e.tilePixelRatio?e.tilePixelRatio:1,n.tileGrid=void 0!==e.tileGrid?e.tileGrid:null;var r=e.tileGrid;return r&&Object(f.d)(r.getTileSize(r.getMinZoom()),[256,256]),n.tileCache=new a.a(e.cacheSize||0),n.tmpSize=[0,0],n.key_=e.key||"",n.tileOptions={transition:e.transition},n.zDirection=e.zDirection?e.zDirection:0,n}return d(e,t),e.prototype.canExpireCache=function(){return this.tileCache.canExpireCache()},e.prototype.expireCache=function(t,e){var n=this.getTileCacheForProjection(t);n&&n.expireCache(e)},e.prototype.forEachLoadedTile=function(t,e,n,r){var i=this.getTileCacheForProjection(t);if(!i)return!1;for(var o,a,l,u=!0,c=n.minX;c<=n.maxX;++c)for(var p=n.minY;p<=n.maxY;++p)a=Object(h.e)(e,c,p),l=!1,i.containsKey(a)&&(l=(o=i.get(a)).getState()===s.a.LOADED)&&(l=!1!==r(o)),l||(u=!1);return u},e.prototype.getGutterForProjection=function(t){return 0},e.prototype.getKey=function(){return this.key_},e.prototype.setKey=function(t){this.key_!==t&&(this.key_=t,this.changed())},e.prototype.getOpaque=function(t){return this.opaque_},e.prototype.getResolutions=function(){return this.tileGrid.getResolutions()},e.prototype.getTile=function(t,e,n,r,i){return Object(l.b)()},e.prototype.getTileGrid=function(){return this.tileGrid},e.prototype.getTileGridForProjection=function(t){return this.tileGrid?this.tileGrid:Object(p.getForProjection)(t)},e.prototype.getTileCacheForProjection=function(t){return Object(u.a)(Object(c.equivalent)(this.getProjection(),t),68),this.tileCache},e.prototype.getTilePixelRatio=function(t){return this.tilePixelRatio_},e.prototype.getTilePixelSize=function(t,e,n){var r=this.getTileGridForProjection(n),i=this.getTilePixelRatio(e),o=Object(f.d)(r.getTileSize(t),this.tmpSize);return 1==i?o:Object(f.c)(o,i,this.tmpSize)},e.prototype.getTileCoordForTileUrlFunction=function(t,e){var n=void 0!==e?e:this.getProjection(),r=this.getTileGridForProjection(n);return this.getWrapX()&&n.isGlobal()&&(t=Object(p.wrapX)(r,t,n)),Object(h.g)(t,r)?t:null},e.prototype.clear=function(){this.tileCache.clear()},e.prototype.refresh=function(){this.clear(),t.prototype.refresh.call(this)},e.prototype.updateCacheSize=function(t,e){var n=this.getTileCacheForProjection(e);t>n.highWaterMark&&(n.highWaterMark=t)},e.prototype.useTile=function(t,e,n,r){},e}(o.a),y=function(t){function e(e,n){var r=t.call(this,e)||this;return r.tile=n,r}return d(e,t),e}(i.a);e.b=g},function(t,e,n){"use strict";var r,i=n(3),o=n(138),a=n(8),s=n(0),l=n(9),u=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),c=function(t){function e(e){var n=t.call(this)||this;return n.geometries_=e||null,n.changeEventsKeys_=[],n.listenGeometriesChange_(),n}return u(e,t),e.prototype.unlistenGeometriesChange_=function(){this.changeEventsKeys_.forEach(l.unlistenByKey),this.changeEventsKeys_.length=0},e.prototype.listenGeometriesChange_=function(){if(this.geometries_)for(var t=0,e=this.geometries_.length;t<e;++t)this.changeEventsKeys_.push(Object(l.listen)(this.geometries_[t],i.a.CHANGE,this.changed,this))},e.prototype.clone=function(){var t=new e(null);return t.setGeometries(this.geometries_),t.applyProperties(this),t},e.prototype.closestPointXY=function(t,e,n,r){if(r<Object(s.closestSquaredDistanceXY)(this.getExtent(),t,e))return r;for(var i=this.geometries_,o=0,a=i.length;o<a;++o)r=i[o].closestPointXY(t,e,n,r);return r},e.prototype.containsXY=function(t,e){for(var n=this.geometries_,r=0,i=n.length;r<i;++r)if(n[r].containsXY(t,e))return!0;return!1},e.prototype.computeExtent=function(t){Object(s.createOrUpdateEmpty)(t);for(var e=this.geometries_,n=0,r=e.length;n<r;++n)Object(s.extend)(t,e[n].getExtent());return t},e.prototype.getGeometries=function(){return h(this.geometries_)},e.prototype.getGeometriesArray=function(){return this.geometries_},e.prototype.getGeometriesArrayRecursive=function(){for(var t=[],e=this.geometries_,n=0,r=e.length;n<r;++n)e[n].getType()===this.getType()?t=t.concat(e[n].getGeometriesArrayRecursive()):t.push(e[n]);return t},e.prototype.getSimplifiedGeometry=function(t){if(this.simplifiedGeometryRevision!==this.getRevision()&&(this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=this.getRevision()),t<0||0!==this.simplifiedGeometryMaxMinSquaredTolerance&&t<this.simplifiedGeometryMaxMinSquaredTolerance)return this;for(var n=[],r=this.geometries_,i=!1,o=0,a=r.length;o<a;++o){var s=r[o],l=s.getSimplifiedGeometry(t);n.push(l),l!==s&&(i=!0)}if(i){var u=new e(null);return u.setGeometriesArray(n),u}return this.simplifiedGeometryMaxMinSquaredTolerance=t,this},e.prototype.getType=function(){return a.a.GEOMETRY_COLLECTION},e.prototype.intersectsExtent=function(t){for(var e=this.geometries_,n=0,r=e.length;n<r;++n)if(e[n].intersectsExtent(t))return!0;return!1},e.prototype.isEmpty=function(){return 0===this.geometries_.length},e.prototype.rotate=function(t,e){for(var n=this.geometries_,r=0,i=n.length;r<i;++r)n[r].rotate(t,e);this.changed()},e.prototype.scale=function(t,e,n){var r=n;r||(r=Object(s.getCenter)(this.getExtent()));for(var i=this.geometries_,o=0,a=i.length;o<a;++o)i[o].scale(t,e,r);this.changed()},e.prototype.setGeometries=function(t){this.setGeometriesArray(h(t))},e.prototype.setGeometriesArray=function(t){this.unlistenGeometriesChange_(),this.geometries_=t,this.listenGeometriesChange_(),this.changed()},e.prototype.applyTransform=function(t){for(var e=this.geometries_,n=0,r=e.length;n<r;++n)e[n].applyTransform(t);this.changed()},e.prototype.translate=function(t,e){for(var n=this.geometries_,r=0,i=n.length;r<i;++r)n[r].translate(t,e);this.changed()},e.prototype.disposeInternal=function(){this.unlistenGeometriesChange_(),t.prototype.disposeInternal.call(this)},e}(o.a);function h(t){for(var e=[],n=0,r=t.length;n<r;++n)e.push(t[n].clone());return e}e.a=c},function(t,e,n){"use strict";e.b=p,e.a=function(t,e,n,r){var i=Object(a.getCenter)(n),o=p(t,e,i,r);(!isFinite(o)||o<=0)&&Object(a.forEachCorner)(n,function(n){return o=p(t,e,n,r),isFinite(o)&&o>0});return o},e.c=function(t,e,n,l,p,f,d,g,y,m,v,_){var b=Object(s.a)(Math.round(n*t),Math.round(n*e));if(Object(o.a)(b,_),0===y.length)return b.canvas;function w(t){return Math.round(t*n)/n}b.scale(n,n),b.globalCompositeOperation="lighter";var O=Object(a.createEmpty)();y.forEach(function(t,e,n){Object(a.extend)(O,t.extent)});var x=Object(a.getWidth)(O),E=Object(a.getHeight)(O),S=Object(s.a)(Math.round(n*x/l),Math.round(n*E/l));Object(o.a)(S,_);var C=n/l;y.forEach(function(t,e,n){var r=t.extent[0]-O[0],i=-(t.extent[3]-O[3]),o=Object(a.getWidth)(t.extent),s=Object(a.getHeight)(t.extent);t.image.width>0&&t.image.height>0&&S.drawImage(t.image,m,m,t.image.width-2*m,t.image.height-2*m,r*C,i*C,o*C,s*C)});var T=Object(a.getTopLeft)(d);g.getTriangles().forEach(function(t,e,o){var a=t.source,s=t.target,p=a[0][0],d=a[0][1],g=a[1][0],y=a[1][1],m=a[2][0],v=a[2][1],x=w((s[0][0]-T[0])/f),E=w(-(s[0][1]-T[1])/f),C=w((s[1][0]-T[0])/f),I=w(-(s[1][1]-T[1])/f),j=w((s[2][0]-T[0])/f),L=w(-(s[2][1]-T[1])/f),R=p,P=d;p=0,d=0;var N=[[g-=R,y-=P,0,0,C-x],[m-=R,v-=P,0,0,j-x],[0,0,g,y,I-E],[0,0,m,v,L-E]],M=Object(u.f)(N);if(M){if(b.save(),b.beginPath(),function(){if(void 0===r){var t=document.createElement("canvas").getContext("2d");t.globalCompositeOperation="lighter",t.fillStyle="rgba(210, 0, 0, 0.75)",c(t,4,5,4,0),c(t,4,5,0,5);var e=t.getImageData(0,0,3,3).data;r=h(e,0)||h(e,4)||h(e,8)}return r}()||_===i.b){b.moveTo(C,I);for(var A=x-C,k=E-I,F=0;F<4;F++)b.lineTo(C+w((F+1)*A/4),I+w(F*k/3)),3!=F&&b.lineTo(C+w((F+1)*A/4),I+w((F+1)*k/3));b.lineTo(j,L)}else b.moveTo(C,I),b.lineTo(x,E),b.lineTo(j,L);b.clip(),b.transform(M[0],M[2],M[1],M[3],x,E),b.translate(O[0]-R,O[3]-P),b.scale(l/n,-l/n),b.drawImage(S.canvas,0,0),b.restore()}}),v&&(b.save(),b.globalCompositeOperation="source-over",b.strokeStyle="black",b.lineWidth=1,g.getTriangles().forEach(function(t,e,n){var r=t.target,i=(r[0][0]-T[0])/f,o=-(r[0][1]-T[1])/f,a=(r[1][0]-T[0])/f,s=-(r[1][1]-T[1])/f,l=(r[2][0]-T[0])/f,u=-(r[2][1]-T[1])/f;b.beginPath(),b.moveTo(a,s),b.lineTo(i,o),b.lineTo(l,u),b.closePath(),b.stroke()}),b.restore());return b.canvas};var r,i=n(92),o=n(1),a=n(0),s=n(11),l=n(2),u=n(7);function c(t,e,n,r,i){t.beginPath(),t.moveTo(0,0),t.lineTo(e,n),t.lineTo(r,i),t.closePath(),t.save(),t.clip(),t.fillRect(0,0,Math.max(e,r)+1,Math.max(n,i)),t.restore()}function h(t,e){return Math.abs(t[4*e]-210)>2||Math.abs(t[4*e+3]-191.25)>2}function p(t,e,n,r){var i=Object(l.transform)(n,e,t),o=Object(l.getPointResolution)(e,r,n),s=e.getMetersPerUnit();void 0!==s&&(o*=s);var u=t.getMetersPerUnit();void 0!==u&&(o/=u);var c=t.getExtent();if(!c||Object(a.containsCoordinate)(c,i)){var h=Object(l.getPointResolution)(t,o,i)/o;isFinite(h)&&h>0&&(o/=h)}return o}},function(t,e,n){"use strict";var r,i=n(103),o=n(33),a=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),s=function(t){function e(e,n,r,i,a){var s=this,l=void 0!==a?o.a.IDLE:o.a.LOADED;return(s=t.call(this,e,n,r,l)||this).loader_=void 0!==a?a:null,s.canvas_=i,s.error_=null,s}return a(e,t),e.prototype.getError=function(){return this.error_},e.prototype.handleLoad_=function(t){t?(this.error_=t,this.state=o.a.ERROR):this.state=o.a.LOADED,this.changed()},e.prototype.load=function(){this.state==o.a.IDLE&&(this.state=o.a.LOADING,this.changed(),this.loader_(this.handleLoad_.bind(this)))},e.prototype.getImage=function(){return this.canvas_},e}(i.a);e.a=s},function(t,e,n){"use strict";var r,i=n(122),o=n(27),a=n(1),s=n(0),l=n(2),u=n(22),c=n(53),h=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),p=i.a+" http://schemas.opengis.net/gml/2.1.2/feature.xsd",f={MultiLineString:"lineStringMember",MultiCurve:"curveMember",MultiPolygon:"polygonMember",MultiSurface:"surfaceMember"},d=function(t){function e(e){var n=this,r=e||{};return(n=t.call(this,r)||this).FEATURE_COLLECTION_PARSERS[i.a].featureMember=Object(o.j)(n.readFeaturesInternal),n.schemaLocation=r.schemaLocation?r.schemaLocation:p,n}return h(e,t),e.prototype.readFlatCoordinates=function(t,e){var n=Object(o.d)(t,!1).replace(/^\s*|\s*$/g,""),r=e[0].srsName,i="enu";if(r){var a=Object(l.get)(r);a&&(i=a.getAxisOrientation())}for(var s=n.trim().split(/\s+/),u=[],c=0,h=s.length;c<h;c++){var p=s[c].split(/,+/),f=parseFloat(p[0]),d=parseFloat(p[1]),g=3===p.length?parseFloat(p[2]):0;"en"===i.substr(0,2)?u.push(f,d,g):u.push(d,f,g)}return u},e.prototype.readBox=function(t,e){var n=Object(o.u)([null],this.BOX_PARSERS_,t,e,this);return Object(s.createOrUpdate)(n[1][0],n[1][1],n[1][3],n[1][4])},e.prototype.innerBoundaryIsParser=function(t,e){var n=Object(o.u)(void 0,this.RING_PARSERS,t,e,this);n&&e[e.length-1].push(n)},e.prototype.outerBoundaryIsParser=function(t,e){var n=Object(o.u)(void 0,this.RING_PARSERS,t,e,this);n&&(e[e.length-1][0]=n)},e.prototype.GEOMETRY_NODE_FACTORY_=function(t,e,n){var r,i=e[e.length-1],a=i.multiSurface,s=i.surface,l=i.multiCurve;return Array.isArray(t)?r="Envelope":"MultiPolygon"===(r=t.getType())&&!0===a?r="MultiSurface":"Polygon"===r&&!0===s?r="Surface":"MultiLineString"===r&&!0===l&&(r="MultiCurve"),Object(o.c)("http://www.opengis.net/gml",r)},e.prototype.writeFeatureElement=function(t,e,n){var r=e.getId();r&&t.setAttribute("fid",r);var i=n[n.length-1],s=i.featureNS,l=e.getGeometryName();i.serializers||(i.serializers={},i.serializers[s]={});var u=[],h=[];if(e.hasProperties()){var p=e.getProperties();for(var f in p){var d=p[f];null!==d&&(u.push(f),h.push(d),f==l||"function"===typeof d.getSimplifiedGeometry?f in i.serializers[s]||(i.serializers[s][f]=Object(o.l)(this.writeGeometryElement,this)):f in i.serializers[s]||(i.serializers[s][f]=Object(o.l)(c.n)))}}var g=Object(a.a)({},i);g.node=t,Object(o.v)(g,i.serializers,Object(o.q)(void 0,s),h,n,u)},e.prototype.writeCurveOrLineString=function(t,e,n){var r=n[n.length-1].srsName;if("LineStringSegment"!==t.nodeName&&r&&t.setAttribute("srsName",r),"LineString"===t.nodeName||"LineStringSegment"===t.nodeName){var i=this.createCoordinatesNode_(t.namespaceURI);t.appendChild(i),this.writeCoordinates_(i,e,n)}else if("Curve"===t.nodeName){var a=Object(o.c)(t.namespaceURI,"segments");t.appendChild(a),this.writeCurveSegments_(a,e,n)}},e.prototype.writeLineStringOrCurveMember=function(t,e,n){var r=this.GEOMETRY_NODE_FACTORY_(e,n);r&&(t.appendChild(r),this.writeCurveOrLineString(r,e,n))},e.prototype.writeMultiCurveOrLineString=function(t,e,n){var r=n[n.length-1],i=r.hasZ,a=r.srsName,s=r.curve;a&&t.setAttribute("srsName",a);var l=e.getLineStrings();Object(o.v)({node:t,hasZ:i,srsName:a,curve:s},this.LINESTRINGORCURVEMEMBER_SERIALIZERS,this.MULTIGEOMETRY_MEMBER_NODE_FACTORY_,l,n,void 0,this)},e.prototype.writeGeometryElement=function(t,e,n){var r,i=n[n.length-1],s=Object(a.a)({},i);s.node=t,r=Array.isArray(e)?Object(u.b)(e,i):Object(u.c)(e,!0,i),Object(o.v)(s,this.GEOMETRY_SERIALIZERS,this.GEOMETRY_NODE_FACTORY_,[r],n,void 0,this)},e.prototype.createCoordinatesNode_=function(t){var e=Object(o.c)(t,"coordinates");return e.setAttribute("decimal","."),e.setAttribute("cs",","),e.setAttribute("ts"," "),e},e.prototype.writeCoordinates_=function(t,e,n){for(var r=n[n.length-1],i=r.hasZ,o=r.srsName,a=e.getCoordinates(),s=a.length,l=new Array(s),u=0;u<s;++u){var h=a[u];l[u]=this.getCoords_(h,o,i)}Object(c.n)(t,l.join(" "))},e.prototype.writeCurveSegments_=function(t,e,n){var r=Object(o.c)(t.namespaceURI,"LineStringSegment");t.appendChild(r),this.writeCurveOrLineString(r,e,n)},e.prototype.writeSurfaceOrPolygon=function(t,e,n){var r=n[n.length-1],i=r.hasZ,a=r.srsName;if("PolygonPatch"!==t.nodeName&&a&&t.setAttribute("srsName",a),"Polygon"===t.nodeName||"PolygonPatch"===t.nodeName){var s=e.getLinearRings();Object(o.v)({node:t,hasZ:i,srsName:a},this.RING_SERIALIZERS,this.RING_NODE_FACTORY_,s,n,void 0,this)}else if("Surface"===t.nodeName){var l=Object(o.c)(t.namespaceURI,"patches");t.appendChild(l),this.writeSurfacePatches_(l,e,n)}},e.prototype.RING_NODE_FACTORY_=function(t,e,n){var r=e[e.length-1],i=r.node,a=r.exteriorWritten;return void 0===a&&(r.exteriorWritten=!0),Object(o.c)(i.namespaceURI,void 0!==a?"innerBoundaryIs":"outerBoundaryIs")},e.prototype.writeSurfacePatches_=function(t,e,n){var r=Object(o.c)(t.namespaceURI,"PolygonPatch");t.appendChild(r),this.writeSurfaceOrPolygon(r,e,n)},e.prototype.writeRing=function(t,e,n){var r=Object(o.c)(t.namespaceURI,"LinearRing");t.appendChild(r),this.writeLinearRing(r,e,n)},e.prototype.getCoords_=function(t,e,n){var r="enu";e&&(r=Object(l.get)(e).getAxisOrientation());var i="en"===r.substr(0,2)?t[0]+","+t[1]:t[1]+","+t[0];n&&(i+=","+(t[2]||0));return i},e.prototype.writePoint=function(t,e,n){var r=n[n.length-1],i=r.hasZ,o=r.srsName;o&&t.setAttribute("srsName",o);var a=this.createCoordinatesNode_(t.namespaceURI);t.appendChild(a);var s=e.getCoordinates(),l=this.getCoords_(s,o,i);Object(c.n)(a,l)},e.prototype.writeMultiPoint=function(t,e,n){var r=n[n.length-1],i=r.hasZ,a=r.srsName;a&&t.setAttribute("srsName",a);var s=e.getPoints();Object(o.v)({node:t,hasZ:i,srsName:a},this.POINTMEMBER_SERIALIZERS,Object(o.q)("pointMember"),s,n,void 0,this)},e.prototype.writePointMember=function(t,e,n){var r=Object(o.c)(t.namespaceURI,"Point");t.appendChild(r),this.writePoint(r,e,n)},e.prototype.writeLinearRing=function(t,e,n){var r=n[n.length-1].srsName;r&&t.setAttribute("srsName",r);var i=this.createCoordinatesNode_(t.namespaceURI);t.appendChild(i),this.writeCoordinates_(i,e,n)},e.prototype.writeMultiSurfaceOrPolygon=function(t,e,n){var r=n[n.length-1],i=r.hasZ,a=r.srsName,s=r.surface;a&&t.setAttribute("srsName",a);var l=e.getPolygons();Object(o.v)({node:t,hasZ:i,srsName:a,surface:s},this.SURFACEORPOLYGONMEMBER_SERIALIZERS,this.MULTIGEOMETRY_MEMBER_NODE_FACTORY_,l,n,void 0,this)},e.prototype.writeSurfaceOrPolygonMember=function(t,e,n){var r=this.GEOMETRY_NODE_FACTORY_(e,n);r&&(t.appendChild(r),this.writeSurfaceOrPolygon(r,e,n))},e.prototype.writeEnvelope=function(t,e,n){var r=n[n.length-1].srsName;r&&t.setAttribute("srsName",r);var i=[e[0]+" "+e[1],e[2]+" "+e[3]];Object(o.v)({node:t},this.ENVELOPE_SERIALIZERS,o.a,i,n,["lowerCorner","upperCorner"],this)},e.prototype.MULTIGEOMETRY_MEMBER_NODE_FACTORY_=function(t,e,n){var r=e[e.length-1].node;return Object(o.c)("http://www.opengis.net/gml",f[r.nodeName])},e}(i.b);d.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS={"http://www.opengis.net/gml":{coordinates:Object(o.o)(d.prototype.readFlatCoordinates)}},d.prototype.FLAT_LINEAR_RINGS_PARSERS={"http://www.opengis.net/gml":{innerBoundaryIs:d.prototype.innerBoundaryIsParser,outerBoundaryIs:d.prototype.outerBoundaryIsParser}},d.prototype.BOX_PARSERS_={"http://www.opengis.net/gml":{coordinates:Object(o.j)(d.prototype.readFlatCoordinates)}},d.prototype.GEOMETRY_PARSERS={"http://www.opengis.net/gml":{Point:Object(o.o)(i.b.prototype.readPoint),MultiPoint:Object(o.o)(i.b.prototype.readMultiPoint),LineString:Object(o.o)(i.b.prototype.readLineString),MultiLineString:Object(o.o)(i.b.prototype.readMultiLineString),LinearRing:Object(o.o)(i.b.prototype.readLinearRing),Polygon:Object(o.o)(i.b.prototype.readPolygon),MultiPolygon:Object(o.o)(i.b.prototype.readMultiPolygon),Box:Object(o.o)(d.prototype.readBox)}},d.prototype.GEOMETRY_SERIALIZERS={"http://www.opengis.net/gml":{Curve:Object(o.l)(d.prototype.writeCurveOrLineString),MultiCurve:Object(o.l)(d.prototype.writeMultiCurveOrLineString),Point:Object(o.l)(d.prototype.writePoint),MultiPoint:Object(o.l)(d.prototype.writeMultiPoint),LineString:Object(o.l)(d.prototype.writeCurveOrLineString),MultiLineString:Object(o.l)(d.prototype.writeMultiCurveOrLineString),LinearRing:Object(o.l)(d.prototype.writeLinearRing),Polygon:Object(o.l)(d.prototype.writeSurfaceOrPolygon),MultiPolygon:Object(o.l)(d.prototype.writeMultiSurfaceOrPolygon),Surface:Object(o.l)(d.prototype.writeSurfaceOrPolygon),MultiSurface:Object(o.l)(d.prototype.writeMultiSurfaceOrPolygon),Envelope:Object(o.l)(d.prototype.writeEnvelope)}},d.prototype.LINESTRINGORCURVEMEMBER_SERIALIZERS={"http://www.opengis.net/gml":{lineStringMember:Object(o.l)(d.prototype.writeLineStringOrCurveMember),curveMember:Object(o.l)(d.prototype.writeLineStringOrCurveMember)}},d.prototype.RING_SERIALIZERS={"http://www.opengis.net/gml":{outerBoundaryIs:Object(o.l)(d.prototype.writeRing),innerBoundaryIs:Object(o.l)(d.prototype.writeRing)}},d.prototype.POINTMEMBER_SERIALIZERS={"http://www.opengis.net/gml":{pointMember:Object(o.l)(d.prototype.writePointMember)}},d.prototype.SURFACEORPOLYGONMEMBER_SERIALIZERS={"http://www.opengis.net/gml":{surfaceMember:Object(o.l)(d.prototype.writeSurfaceOrPolygonMember),polygonMember:Object(o.l)(d.prototype.writeSurfaceOrPolygonMember)}},d.prototype.ENVELOPE_SERIALIZERS={"http://www.opengis.net/gml":{lowerCorner:Object(o.l)(c.n),upperCorner:Object(o.l)(c.n)}},e.a=d},function(t,e,n){"use strict";n.d(e,"a",function(){return b});var r,i=n(15),o=n(17),a=n(21),s=n(109),l=n(37),u=n(44),c=n(45),h=n(16),p=n(10),f=n(95),d=n(1),g=n(5),y=n(27),m=n(2),v=n(22),_=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),b="http://www.opengis.net/gml",w=/^[\s\xa0]*$/,O=function(t){function e(e){var n=t.call(this)||this,r=e||{};return n.featureType=r.featureType,n.featureNS=r.featureNS,n.srsName=r.srsName,n.schemaLocation="",n.FEATURE_COLLECTION_PARSERS={},n.FEATURE_COLLECTION_PARSERS[n.namespace]={featureMember:Object(y.j)(n.readFeaturesInternal),featureMembers:Object(y.o)(n.readFeaturesInternal)},n}return _(e,t),e.prototype.readFeaturesInternal=function(t,e){var n=t.localName,r=null;if("FeatureCollection"==n)r=Object(y.u)([],this.FEATURE_COLLECTION_PARSERS,t,e,this);else if("featureMembers"==n||"featureMember"==n||"member"==n){var i=e[0],o=i.featureType,a=i.featureNS;if(!o&&t.childNodes){o=[],a={};for(var s=0,l=t.childNodes.length;s<l;++s){var u=t.childNodes[s];if(1===u.nodeType){var c=u.nodeName.split(":").pop();if(-1===o.indexOf(c)){var h="",p=0,f=u.namespaceURI;for(var d in a){if(a[d]===f){h=d;break}++p}h||(a[h="p"+p]=f),o.push(h+":"+c)}}}"featureMember"!=n&&(i.featureType=o,i.featureNS=a)}if("string"===typeof a){var g=a;(a={}).p0=g}var m={},v=Array.isArray(o)?o:[o];for(var _ in a){var b={};for(s=0,l=v.length;s<l;++s){(-1===v[s].indexOf(":")?"p0":v[s].split(":")[0])===_&&(b[v[s].split(":").pop()]="featureMembers"==n?Object(y.j)(this.readFeatureElement,this):Object(y.o)(this.readFeatureElement,this))}m[a[_]]=b}r="featureMember"==n||"member"==n?Object(y.u)(void 0,m,t,e):Object(y.u)([],m,t,e)}return null===r&&(r=[]),r},e.prototype.readGeometryElement=function(t,e){var n=e[0];n.srsName=t.firstElementChild.getAttribute("srsName"),n.srsDimension=t.firstElementChild.getAttribute("srsDimension");var r=Object(y.u)(null,this.GEOMETRY_PARSERS,t,e,this);return r?Array.isArray(r)?Object(v.b)(r,n):Object(v.c)(r,!1,n):void 0},e.prototype.readFeatureElementInternal=function(t,e,n){for(var r,o={},a=t.firstElementChild;a;a=a.nextElementSibling){var s=void 0,l=a.localName;0===a.childNodes.length||1===a.childNodes.length&&(3===a.firstChild.nodeType||4===a.firstChild.nodeType)?(s=Object(y.d)(a,!1),w.test(s)&&(s=void 0)):(n&&(s=this.readGeometryElement(a,e)),s?"boundedBy"!==l&&(r=l):s=this.readFeatureElementInternal(a,e,!1)),o[l]?(o[l]instanceof Array||(o[l]=[o[l]]),o[l].push(s)):o[l]=s;var u=a.attributes.length;if(u>0){o[l]={_content_:o[l]};for(var c=0;c<u;c++){var h=a.attributes[c].name;o[l][h]=a.attributes[c].value}}}if(n){var p=new i.a(o);r&&p.setGeometryName(r);var f=t.getAttribute("fid")||Object(y.e)(t,this.namespace,"id");return f&&p.setId(f),p}return o},e.prototype.readFeatureElement=function(t,e){return this.readFeatureElementInternal(t,e,!0)},e.prototype.readPoint=function(t,e){var n=this.readFlatCoordinatesFromNode(t,e);if(n)return new h.a(n,o.a.XYZ)},e.prototype.readMultiPoint=function(t,e){var n=Object(y.u)([],this.MULTIPOINT_PARSERS,t,e,this);return n?new u.a(n):void 0},e.prototype.readMultiLineString=function(t,e){var n=Object(y.u)([],this.MULTILINESTRING_PARSERS,t,e,this);if(n)return new l.a(n)},e.prototype.readMultiPolygon=function(t,e){var n=Object(y.u)([],this.MULTIPOLYGON_PARSERS,t,e,this);if(n)return new c.a(n)},e.prototype.pointMemberParser=function(t,e){Object(y.t)(this.POINTMEMBER_PARSERS,t,e,this)},e.prototype.lineStringMemberParser=function(t,e){Object(y.t)(this.LINESTRINGMEMBER_PARSERS,t,e,this)},e.prototype.polygonMemberParser=function(t,e){Object(y.t)(this.POLYGONMEMBER_PARSERS,t,e,this)},e.prototype.readLineString=function(t,e){var n=this.readFlatCoordinatesFromNode(t,e);return n?new a.a(n,o.a.XYZ):void 0},e.prototype.readFlatLinearRing=function(t,e){var n=Object(y.u)(null,this.GEOMETRY_FLAT_COORDINATES_PARSERS,t,e,this);return n||void 0},e.prototype.readLinearRing=function(t,e){var n=this.readFlatCoordinatesFromNode(t,e);if(n)return new s.a(n,o.a.XYZ)},e.prototype.readPolygon=function(t,e){var n=Object(y.u)([null],this.FLAT_LINEAR_RINGS_PARSERS,t,e,this);if(n&&n[0]){var r,i=n[0],a=[i.length],s=void 0;for(s=1,r=n.length;s<r;++s)Object(g.c)(i,n[s]),a.push(i.length);return new p.b(i,o.a.XYZ,a)}},e.prototype.readFlatCoordinatesFromNode=function(t,e){return Object(y.u)(null,this.GEOMETRY_FLAT_COORDINATES_PARSERS,t,e,this)},e.prototype.readGeometryFromNode=function(t,e){var n=this.readGeometryElement(t,[this.getReadOptions(t,e||{})]);return n||null},e.prototype.readFeaturesFromNode=function(t,e){var n={featureType:this.featureType,featureNS:this.featureNS};return e&&Object(d.a)(n,this.getReadOptions(t,e)),this.readFeaturesInternal(t,[n])||[]},e.prototype.readProjectionFromNode=function(t){return Object(m.get)(this.srsName?this.srsName:t.firstElementChild.getAttribute("srsName"))},e}(f.a);O.prototype.namespace=b,O.prototype.FLAT_LINEAR_RINGS_PARSERS={"http://www.opengis.net/gml":{}},O.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS={"http://www.opengis.net/gml":{}},O.prototype.GEOMETRY_PARSERS={"http://www.opengis.net/gml":{}},O.prototype.MULTIPOINT_PARSERS={"http://www.opengis.net/gml":{pointMember:Object(y.j)(O.prototype.pointMemberParser),pointMembers:Object(y.j)(O.prototype.pointMemberParser)}},O.prototype.MULTILINESTRING_PARSERS={"http://www.opengis.net/gml":{lineStringMember:Object(y.j)(O.prototype.lineStringMemberParser),lineStringMembers:Object(y.j)(O.prototype.lineStringMemberParser)}},O.prototype.MULTIPOLYGON_PARSERS={"http://www.opengis.net/gml":{polygonMember:Object(y.j)(O.prototype.polygonMemberParser),polygonMembers:Object(y.j)(O.prototype.polygonMemberParser)}},O.prototype.POINTMEMBER_PARSERS={"http://www.opengis.net/gml":{Point:Object(y.j)(O.prototype.readFlatCoordinatesFromNode)}},O.prototype.LINESTRINGMEMBER_PARSERS={"http://www.opengis.net/gml":{LineString:Object(y.j)(O.prototype.readLineString)}},O.prototype.POLYGONMEMBER_PARSERS={"http://www.opengis.net/gml":{Polygon:Object(y.j)(O.prototype.readPolygon)}},O.prototype.RING_PARSERS={"http://www.opengis.net/gml":{LinearRing:Object(y.o)(O.prototype.readFlatLinearRing)}},e.b=O},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(224);n.d(e,"Circle",function(){return r.a});var i=n(138);n.d(e,"Geometry",function(){return i.a});var o=n(118);n.d(e,"GeometryCollection",function(){return o.a});var a=n(109);n.d(e,"LinearRing",function(){return a.a});var s=n(21);n.d(e,"LineString",function(){return s.a});var l=n(37);n.d(e,"MultiLineString",function(){return l.a});var u=n(44);n.d(e,"MultiPoint",function(){return u.a});var c=n(45);n.d(e,"MultiPolygon",function(){return c.a});var h=n(16);n.d(e,"Point",function(){return h.a});var p=n(10);n.d(e,"Polygon",function(){return p.b});var f=n(36);n.d(e,"SimpleGeometry",function(){return f.a})},function(t,e){t.exports=React},function(t,e,n){"use strict";n(126),n(23),n(99);var r=n(60);n.d(e,"f",function(){return r.i});var i=n(388);n.d(e,"g",function(){return i.a});var o=n(246);n.d(e,"c",function(){return o.a});n(390),n(247);var a=n(242);n.d(e,"d",function(){return a.a});n(391),n(392);var s=n(32);n.d(e,"b",function(){return s.c}),n.d(e,"h",function(){return s.i});var l=n(395);n.d(e,"a",function(){return l.a});var u=n(407);n.d(e,"e",function(){return u.a});n(408),n(409),n(410),n(411);var c=n(412),h=(n.n(c),n(413)),p=(n.n(h),n(414)),f=(n.n(p),n(415));n.n(f)},function(t,e,n){"use strict";n.d(e,"a",function(){return i});var r=n(254),i=(n.n(r).a.version,function(t){var e=!1;if(t&&void 0!==t&&null!==t&&""!==t){var n=t.split(".").map(function(t){return parseInt(t)});4===n.length&&(n[0]>2||2===n[0]&&n[3]>=1836)&&(e=!0)}return e})},function(t,e,n){"use strict";var r,i=n(128),o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=function(t){function e(e){var n=e||{};return t.call(this,{points:1/0,fill:n.fill,radius:n.radius,stroke:n.stroke,scale:void 0!==n.scale?n.scale:1,rotation:void 0!==n.rotation?n.rotation:0,rotateWithView:void 0!==n.rotateWithView&&n.rotateWithView,displacement:void 0!==n.displacement?n.displacement:[0,0]})||this}return o(e,t),e.prototype.clone=function(){var t=this.getScale(),n=new e({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()});return n.setOpacity(this.getOpacity()),n},e.prototype.setRadius=function(t){this.radius_=t,this.render()},e}(i.a);e.a=a},function(t,e,n){"use strict";var r,i=n(33),o=n(129),a=n(61),s=n(102),l=n(11),u=n(40),c=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),h=function(t){function e(e){var n=this,r=void 0!==e.rotateWithView&&e.rotateWithView;return(n=t.call(this,{opacity:1,rotateWithView:r,rotation:void 0!==e.rotation?e.rotation:0,scale:void 0!==e.scale?e.scale:1,displacement:void 0!==e.displacement?e.displacement:[0,0]})||this).canvas_=void 0,n.hitDetectionCanvas_=null,n.fill_=void 0!==e.fill?e.fill:null,n.origin_=[0,0],n.points_=e.points,n.radius_=void 0!==e.radius?e.radius:e.radius1,n.radius2_=e.radius2,n.angle_=void 0!==e.angle?e.angle:0,n.stroke_=void 0!==e.stroke?e.stroke:null,n.anchor_=null,n.size_=null,n.renderOptions_=null,n.render(),n}return c(e,t),e.prototype.clone=function(){var t=this.getScale(),n=new e({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()});return n.setOpacity(this.getOpacity()),n},e.prototype.getAnchor=function(){return this.anchor_},e.prototype.getAngle=function(){return this.angle_},e.prototype.getFill=function(){return this.fill_},e.prototype.getHitDetectionImage=function(){return this.hitDetectionCanvas_||this.createHitDetectionCanvas_(this.renderOptions_),this.hitDetectionCanvas_},e.prototype.getImage=function(t){var e=this.canvas_[t];if(!e){var n=this.renderOptions_,r=Object(l.a)(n.size*t,n.size*t);this.draw_(n,r,t),e=r.canvas,this.canvas_[t]=e}return e},e.prototype.getPixelRatio=function(t){return t},e.prototype.getImageSize=function(){return this.size_},e.prototype.getImageState=function(){return i.a.LOADED},e.prototype.getOrigin=function(){return this.origin_},e.prototype.getPoints=function(){return this.points_},e.prototype.getRadius=function(){return this.radius_},e.prototype.getRadius2=function(){return this.radius2_},e.prototype.getSize=function(){return this.size_},e.prototype.getStroke=function(){return this.stroke_},e.prototype.listenImageChange=function(t){},e.prototype.load=function(){},e.prototype.unlistenImageChange=function(t){},e.prototype.calculateLineJoinSize_=function(t,e,n){if(0===e||this.points_===1/0||"bevel"!==t&&"miter"!==t)return e;var r=this.radius_,i=void 0===this.radius2_?r:this.radius2_;if(r<i){var o=r;r=i,i=o}var a=void 0===this.radius2_?this.points_:2*this.points_,s=2*Math.PI/a,l=i*Math.sin(s),u=r-Math.sqrt(i*i-l*l),c=Math.sqrt(l*l+u*u),h=c/l;if("miter"===t&&h<=n)return h*e;var p=e/2/h,f=e/2*(u/c),d=Math.sqrt((r+p)*(r+p)+f*f)-r;if(void 0===this.radius2_||"bevel"===t)return 2*d;var g=r*Math.sin(s),y=i-Math.sqrt(r*r-g*g),m=Math.sqrt(g*g+y*y)/g;if(m<=n){var v=m*e/2-i-r;return 2*Math.max(d,v)}return 2*d},e.prototype.createRenderOptions=function(){var t,e=u.g,n=0,r=null,i=0,o=0;this.stroke_&&(null===(t=this.stroke_.getColor())&&(t=u.k),t=Object(s.a)(t),void 0===(o=this.stroke_.getWidth())&&(o=u.h),r=this.stroke_.getLineDash(),i=this.stroke_.getLineDashOffset(),void 0===(e=this.stroke_.getLineJoin())&&(e=u.g),void 0===(n=this.stroke_.getMiterLimit())&&(n=u.i));var a=this.calculateLineJoinSize_(e,o,n),l=Math.max(this.radius_,this.radius2_||0);return{strokeStyle:t,strokeWidth:o,size:Math.ceil(2*l+a),lineDash:r,lineDashOffset:i,lineJoin:e,miterLimit:n}},e.prototype.render=function(){this.renderOptions_=this.createRenderOptions();var t=this.renderOptions_.size,e=this.getDisplacement();this.canvas_={},this.anchor_=[t/2-e[0],t/2+e[1]],this.size_=[t,t]},e.prototype.draw_=function(t,e,n){if(e.scale(n,n),e.translate(t.size/2,t.size/2),this.createPath_(e),this.fill_){var r=this.fill_.getColor();null===r&&(r=u.b),e.fillStyle=Object(s.a)(r),e.fill()}this.stroke_&&(e.strokeStyle=t.strokeStyle,e.lineWidth=t.strokeWidth,e.setLineDash&&t.lineDash&&(e.setLineDash(t.lineDash),e.lineDashOffset=t.lineDashOffset),e.lineJoin=t.lineJoin,e.miterLimit=t.miterLimit,e.stroke())},e.prototype.createHitDetectionCanvas_=function(t){if(this.fill_){var e=this.fill_.getColor(),n=0;if("string"===typeof e&&(e=Object(a.a)(e)),null===e?n=1:Array.isArray(e)&&(n=4===e.length?e[3]:1),0===n){var r=Object(l.a)(t.size,t.size);this.hitDetectionCanvas_=r.canvas,this.drawHitDetectionCanvas_(t,r)}}this.hitDetectionCanvas_||(this.hitDetectionCanvas_=this.getImage(1))},e.prototype.createPath_=function(t){var e=this.points_,n=this.radius_;if(e===1/0)t.arc(0,0,n,0,2*Math.PI);else{var r=void 0===this.radius2_?n:this.radius2_;void 0!==this.radius2_&&(e*=2);for(var i=this.angle_-Math.PI/2,o=2*Math.PI/e,a=0;a<e;a++){var s=i+a*o,l=a%2===0?n:r;t.lineTo(l*Math.cos(s),l*Math.sin(s))}t.closePath()}},e.prototype.drawHitDetectionCanvas_=function(t,e){e.translate(t.size/2,t.size/2),this.createPath_(e),e.fillStyle=u.b,e.fill(),this.stroke_&&(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())},e}(o.a);e.a=h},function(t,e,n){"use strict";var r=n(6),i=n(28),o=function(){function t(t){this.opacity_=t.opacity,this.rotateWithView_=t.rotateWithView,this.rotation_=t.rotation,this.scale_=t.scale,this.scaleArray_=Object(i.d)(t.scale),this.displacement_=t.displacement}return t.prototype.clone=function(){var e=this.getScale();return new t({opacity:this.getOpacity(),scale:Array.isArray(e)?e.slice():e,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),displacement:this.getDisplacement().slice()})},t.prototype.getOpacity=function(){return this.opacity_},t.prototype.getRotateWithView=function(){return this.rotateWithView_},t.prototype.getRotation=function(){return this.rotation_},t.prototype.getScale=function(){return this.scale_},t.prototype.getScaleArray=function(){return this.scaleArray_},t.prototype.getDisplacement=function(){return this.displacement_},t.prototype.getAnchor=function(){return Object(r.b)()},t.prototype.getImage=function(t){return Object(r.b)()},t.prototype.getHitDetectionImage=function(){return Object(r.b)()},t.prototype.getPixelRatio=function(t){return 1},t.prototype.getImageState=function(){return Object(r.b)()},t.prototype.getImageSize=function(){return Object(r.b)()},t.prototype.getOrigin=function(){return Object(r.b)()},t.prototype.getSize=function(){return Object(r.b)()},t.prototype.setOpacity=function(t){this.opacity_=t},t.prototype.setRotateWithView=function(t){this.rotateWithView_=t},t.prototype.setRotation=function(t){this.rotation_=t},t.prototype.setScale=function(t){this.scale_=t,this.scaleArray_=Object(i.d)(t)},t.prototype.listenImageChange=function(t){Object(r.b)()},t.prototype.load=function(){Object(r.b)()},t.prototype.unlistenImageChange=function(t){Object(r.b)()},t}();e.a=o},function(t,e,n){"use strict";var r,i=n(6),o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=function(t){function e(e){var n=this,r="Assertion failed. See https://openlayers.org/en/"+("latest"===i.a?i.a:"v"+i.a.split("-")[0])+"/doc/errors/#"+e+" for details.";return(n=t.call(this,r)||this).code=e,n.name="AssertionError",n.message=r,n}return o(e,t),e}(Error);e.a=a},function(t,e,n){"use strict";var r,i=n(3),o=n(132),a=n(171),s=n(33),l=n(129),u=n(61),c=n(4),h=n(172),p=n(6),f=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),d=function(t){function e(e){var n=this,r=e||{},i=void 0!==r.opacity?r.opacity:1,l=void 0!==r.rotation?r.rotation:0,f=void 0!==r.scale?r.scale:1,d=void 0!==r.rotateWithView&&r.rotateWithView;(n=t.call(this,{opacity:i,rotation:l,scale:f,displacement:void 0!==r.displacement?r.displacement:[0,0],rotateWithView:d})||this).anchor_=void 0!==r.anchor?r.anchor:[.5,.5],n.normalizedAnchor_=null,n.anchorOrigin_=void 0!==r.anchorOrigin?r.anchorOrigin:a.a.TOP_LEFT,n.anchorXUnits_=void 0!==r.anchorXUnits?r.anchorXUnits:o.a.FRACTION,n.anchorYUnits_=void 0!==r.anchorYUnits?r.anchorYUnits:o.a.FRACTION,n.crossOrigin_=void 0!==r.crossOrigin?r.crossOrigin:null;var g=void 0!==r.img?r.img:null,y=void 0!==r.imgSize?r.imgSize:null,m=r.src;Object(c.a)(!(void 0!==m&&g),4),Object(c.a)(!g||g&&y,5),void 0!==m&&0!==m.length||!g||(m=g.src||Object(p.c)(g)),Object(c.a)(void 0!==m&&m.length>0,6);var v=void 0!==r.src?s.a.IDLE:s.a.LOADED;return n.color_=void 0!==r.color?Object(u.a)(r.color):null,n.iconImage_=Object(h.b)(g,m,y,n.crossOrigin_,v,n.color_),n.offset_=void 0!==r.offset?r.offset:[0,0],n.offsetOrigin_=void 0!==r.offsetOrigin?r.offsetOrigin:a.a.TOP_LEFT,n.origin_=null,n.size_=void 0!==r.size?r.size:null,n}return f(e,t),e.prototype.clone=function(){var t=this.getScale();return new e({anchor:this.anchor_.slice(),anchorOrigin:this.anchorOrigin_,anchorXUnits:this.anchorXUnits_,anchorYUnits:this.anchorYUnits_,crossOrigin:this.crossOrigin_,color:this.color_&&this.color_.slice?this.color_.slice():this.color_||void 0,src:this.getSrc(),offset:this.offset_.slice(),offsetOrigin:this.offsetOrigin_,size:null!==this.size_?this.size_.slice():void 0,opacity:this.getOpacity(),scale:Array.isArray(t)?t.slice():t,rotation:this.getRotation(),rotateWithView:this.getRotateWithView()})},e.prototype.getAnchor=function(){if(this.normalizedAnchor_)return this.normalizedAnchor_;var t=this.anchor_,e=this.getSize();if(this.anchorXUnits_==o.a.FRACTION||this.anchorYUnits_==o.a.FRACTION){if(!e)return null;t=this.anchor_.slice(),this.anchorXUnits_==o.a.FRACTION&&(t[0]*=e[0]),this.anchorYUnits_==o.a.FRACTION&&(t[1]*=e[1])}if(this.anchorOrigin_!=a.a.TOP_LEFT){if(!e)return null;t===this.anchor_&&(t=this.anchor_.slice()),this.anchorOrigin_!=a.a.TOP_RIGHT&&this.anchorOrigin_!=a.a.BOTTOM_RIGHT||(t[0]=-t[0]+e[0]),this.anchorOrigin_!=a.a.BOTTOM_LEFT&&this.anchorOrigin_!=a.a.BOTTOM_RIGHT||(t[1]=-t[1]+e[1])}var n=this.getDisplacement();return t[0]-=n[0],t[1]+=n[1],this.normalizedAnchor_=t,this.normalizedAnchor_},e.prototype.setAnchor=function(t){this.anchor_=t,this.normalizedAnchor_=null},e.prototype.getColor=function(){return this.color_},e.prototype.getImage=function(t){return this.iconImage_.getImage(t)},e.prototype.getPixelRatio=function(t){return this.iconImage_.getPixelRatio(t)},e.prototype.getImageSize=function(){return this.iconImage_.getSize()},e.prototype.getImageState=function(){return this.iconImage_.getImageState()},e.prototype.getHitDetectionImage=function(){return this.iconImage_.getHitDetectionImage()},e.prototype.getOrigin=function(){if(this.origin_)return this.origin_;var t=this.offset_;if(this.offsetOrigin_!=a.a.TOP_LEFT){var e=this.getSize(),n=this.iconImage_.getSize();if(!e||!n)return null;t=t.slice(),this.offsetOrigin_!=a.a.TOP_RIGHT&&this.offsetOrigin_!=a.a.BOTTOM_RIGHT||(t[0]=n[0]-e[0]-t[0]),this.offsetOrigin_!=a.a.BOTTOM_LEFT&&this.offsetOrigin_!=a.a.BOTTOM_RIGHT||(t[1]=n[1]-e[1]-t[1])}return this.origin_=t,this.origin_},e.prototype.getSrc=function(){return this.iconImage_.getSrc()},e.prototype.getSize=function(){return this.size_?this.size_:this.iconImage_.getSize()},e.prototype.listenImageChange=function(t){this.iconImage_.addEventListener(i.a.CHANGE,t)},e.prototype.load=function(){this.iconImage_.load()},e.prototype.unlistenImageChange=function(t){this.iconImage_.removeEventListener(i.a.CHANGE,t)},e}(l.a);e.a=d},function(t,e,n){"use strict";e.a={FRACTION:"fraction",PIXELS:"pixels"}},function(t,e,n){"use strict";var r,i=n(12),o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=function(t){function e(e,n,r,i){var o=t.call(this,e)||this;return o.inversePixelTransform=n,o.frameState=r,o.context=i,o}return o(e,t),e}(i.a);e.a=a},function(t,e,n){"use strict";var r,i=n(24),o=n(25),a=n(64),s=n(3),l=n(186),u=n(108),c=n(187),h=n(55),p=n(135),f=n(104),d=n(184),g=n(67),y=n(105),m=n(71),v=n(136),_=n(84),b=n(65),w=n(39),O=n(13),x=n(14),E=n(4),S=n(0),C=n(2),T=n(28),I=n(9),j=n(11),L=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),R=function(t){function e(e){var n=t.call(this)||this;n.on,n.once,n.un;var r=function(t){var e=null;void 0!==t.keyboardEventTarget&&(e="string"===typeof t.keyboardEventTarget?document.getElementById(t.keyboardEventTarget):t.keyboardEventTarget);var n,r,i,a={},s=t.layers&&"function"===typeof t.layers.getLayers?t.layers:new l.a({layers:t.layers});a[d.a.LAYERGROUP]=s,a[d.a.TARGET]=t.target,a[d.a.VIEW]=void 0!==t.view?t.view:new _.a,void 0!==t.controls&&(Array.isArray(t.controls)?n=new o.a(t.controls.slice()):(Object(E.a)("function"===typeof t.controls.getArray,47),n=t.controls));void 0!==t.interactions&&(Array.isArray(t.interactions)?r=new o.a(t.interactions.slice()):(Object(E.a)("function"===typeof t.interactions.getArray,48),r=t.interactions));void 0!==t.overlays?Array.isArray(t.overlays)?i=new o.a(t.overlays.slice()):(Object(E.a)("function"===typeof t.overlays.getArray,49),i=t.overlays):i=new o.a;return{controls:n,interactions:r,keyboardEventTarget:e,overlays:i,values:a}}(e);return n.boundHandleBrowserEvent_=n.handleBrowserEvent.bind(n),n.maxTilesLoading_=void 0!==e.maxTilesLoading?e.maxTilesLoading:16,n.pixelRatio_=void 0!==e.pixelRatio?e.pixelRatio:w.a,n.postRenderTimeoutHandle_,n.animationDelayKey_,n.animationDelay_=function(){this.animationDelayKey_=void 0,this.renderFrame_(Date.now())}.bind(n),n.coordinateToPixelTransform_=Object(x.c)(),n.pixelToCoordinateTransform_=Object(x.c)(),n.frameIndex_=0,n.frameState_=null,n.previousExtent_=null,n.viewPropertyListenerKey_=null,n.viewChangeListenerKey_=null,n.layerGroupPropertyListenerKeys_=null,n.viewport_=document.createElement("div"),n.viewport_.className="ol-viewport"+("ontouchstart"in window?" ol-touch":""),n.viewport_.style.position="relative",n.viewport_.style.overflow="hidden",n.viewport_.style.width="100%",n.viewport_.style.height="100%",n.overlayContainer_=document.createElement("div"),n.overlayContainer_.style.position="absolute",n.overlayContainer_.style.zIndex="0",n.overlayContainer_.style.width="100%",n.overlayContainer_.style.height="100%",n.overlayContainer_.style.pointerEvents="none",n.overlayContainer_.className="ol-overlaycontainer",n.viewport_.appendChild(n.overlayContainer_),n.overlayContainerStopEvent_=document.createElement("div"),n.overlayContainerStopEvent_.style.position="absolute",n.overlayContainerStopEvent_.style.zIndex="0",n.overlayContainerStopEvent_.style.width="100%",n.overlayContainerStopEvent_.style.height="100%",n.overlayContainerStopEvent_.style.pointerEvents="none",n.overlayContainerStopEvent_.className="ol-overlaycontainer-stopevent",n.viewport_.appendChild(n.overlayContainerStopEvent_),n.mapBrowserEventHandler_=null,n.moveTolerance_=e.moveTolerance,n.keyboardEventTarget_=r.keyboardEventTarget,n.keyHandlerKeys_=null,n.controls=r.controls||new o.a,n.interactions=r.interactions||new o.a,n.overlays_=r.overlays,n.overlayIdIndex_={},n.renderer_=null,n.handleResize_,n.postRenderFunctions_=[],n.tileQueue_=new v.a(n.getTilePriority.bind(n),n.handleTileChange_.bind(n)),n.addChangeListener(d.a.LAYERGROUP,n.handleLayerGroupChanged_),n.addChangeListener(d.a.VIEW,n.handleViewChanged_),n.addChangeListener(d.a.SIZE,n.handleSizeChanged_),n.addChangeListener(d.a.TARGET,n.handleTargetChanged_),n.setProperties(r.values),n.controls.forEach(function(t){t.setMap(this)}.bind(n)),n.controls.addEventListener(a.a.ADD,function(t){t.element.setMap(this)}.bind(n)),n.controls.addEventListener(a.a.REMOVE,function(t){t.element.setMap(null)}.bind(n)),n.interactions.forEach(function(t){t.setMap(this)}.bind(n)),n.interactions.addEventListener(a.a.ADD,function(t){t.element.setMap(this)}.bind(n)),n.interactions.addEventListener(a.a.REMOVE,function(t){t.element.setMap(null)}.bind(n)),n.overlays_.forEach(n.addOverlayInternal_.bind(n)),n.overlays_.addEventListener(a.a.ADD,function(t){this.addOverlayInternal_(t.element)}.bind(n)),n.overlays_.addEventListener(a.a.REMOVE,function(t){var e=t.element.getId();void 0!==e&&delete this.overlayIdIndex_[e.toString()],t.element.setMap(null)}.bind(n)),n}return L(e,t),e.prototype.createRenderer=function(){throw new Error("Use a map type that has a createRenderer method")},e.prototype.addControl=function(t){this.getControls().push(t)},e.prototype.addInteraction=function(t){this.getInteractions().push(t)},e.prototype.addLayer=function(t){this.getLayerGroup().getLayers().push(t)},e.prototype.addOverlay=function(t){this.getOverlays().push(t)},e.prototype.addOverlayInternal_=function(t){var e=t.getId();void 0!==e&&(this.overlayIdIndex_[e.toString()]=t),t.setMap(this)},e.prototype.disposeInternal=function(){this.setTarget(null),t.prototype.disposeInternal.call(this)},e.prototype.forEachFeatureAtPixel=function(t,e,n){if(this.frameState_){var r=this.getCoordinateFromPixelInternal(t),i=void 0!==(n=void 0!==n?n:{}).hitTolerance?n.hitTolerance:0,o=void 0!==n.layerFilter?n.layerFilter:O.b,a=!1!==n.checkWrapped;return this.renderer_.forEachFeatureAtCoordinate(r,this.frameState_,i,a,e,null,o,null)}},e.prototype.getFeaturesAtPixel=function(t,e){var n=[];return this.forEachFeatureAtPixel(t,function(t){n.push(t)},e),n},e.prototype.forEachLayerAtPixel=function(t,e,n){if(this.frameState_){var r=n||{},i=void 0!==r.hitTolerance?r.hitTolerance:0,o=r.layerFilter||O.b;return this.renderer_.forEachLayerAtPixel(t,this.frameState_,i,e,o)}},e.prototype.hasFeatureAtPixel=function(t,e){if(!this.frameState_)return!1;var n=this.getCoordinateFromPixelInternal(t),r=void 0!==(e=void 0!==e?e:{}).layerFilter?e.layerFilter:O.b,i=void 0!==e.hitTolerance?e.hitTolerance:0,o=!1!==e.checkWrapped;return this.renderer_.hasFeatureAtCoordinate(n,this.frameState_,i,o,r,null)},e.prototype.getEventCoordinate=function(t){return this.getCoordinateFromPixel(this.getEventPixel(t))},e.prototype.getEventCoordinateInternal=function(t){return this.getCoordinateFromPixelInternal(this.getEventPixel(t))},e.prototype.getEventPixel=function(t){var e=this.viewport_.getBoundingClientRect(),n="changedTouches"in t?t.changedTouches[0]:t;return[n.clientX-e.left,n.clientY-e.top]},e.prototype.getTarget=function(){return this.get(d.a.TARGET)},e.prototype.getTargetElement=function(){var t=this.getTarget();return void 0!==t?"string"===typeof t?document.getElementById(t):t:null},e.prototype.getCoordinateFromPixel=function(t){return Object(C.toUserCoordinate)(this.getCoordinateFromPixelInternal(t),this.getView().getProjection())},e.prototype.getCoordinateFromPixelInternal=function(t){var e=this.frameState_;return e?Object(x.a)(e.pixelToCoordinateTransform,t.slice()):null},e.prototype.getControls=function(){return this.controls},e.prototype.getOverlays=function(){return this.overlays_},e.prototype.getOverlayById=function(t){var e=this.overlayIdIndex_[t.toString()];return void 0!==e?e:null},e.prototype.getInteractions=function(){return this.interactions},e.prototype.getLayerGroup=function(){return this.get(d.a.LAYERGROUP)},e.prototype.getLayers=function(){return this.getLayerGroup().getLayers()},e.prototype.getLoading=function(){for(var t=this.getLayerGroup().getLayerStatesArray(),e=0,n=t.length;e<n;++e){var r=t[e].layer.getSource();if(r&&r.loading)return!0}return!1},e.prototype.getPixelFromCoordinate=function(t){var e=Object(C.fromUserCoordinate)(t,this.getView().getProjection());return this.getPixelFromCoordinateInternal(e)},e.prototype.getPixelFromCoordinateInternal=function(t){var e=this.frameState_;return e?Object(x.a)(e.coordinateToPixelTransform,t.slice(0,2)):null},e.prototype.getRenderer=function(){return this.renderer_},e.prototype.getSize=function(){return this.get(d.a.SIZE)},e.prototype.getView=function(){return this.get(d.a.VIEW)},e.prototype.getViewport=function(){return this.viewport_},e.prototype.getOverlayContainer=function(){return this.overlayContainer_},e.prototype.getOverlayContainerStopEvent=function(){return this.overlayContainerStopEvent_},e.prototype.getOwnerDocument=function(){var t=this.getTargetElement();return t?t.ownerDocument:document},e.prototype.getTilePriority=function(t,e,n,r){return Object(v.b)(this.frameState_,t,e,n,r)},e.prototype.handleBrowserEvent=function(t,e){var n=e||t.type,r=new u.a(n,this,t);this.handleMapBrowserEvent(r)},e.prototype.handleMapBrowserEvent=function(t){if(this.frameState_){var e=t.originalEvent,n=e.type;if(n===y.a.POINTERDOWN||n===s.a.WHEEL||n===s.a.KEYDOWN){var r=this.getOwnerDocument(),i=this.viewport_.getRootNode?this.viewport_.getRootNode():r,o=e.target;if(this.overlayContainerStopEvent_.contains(o)||!(i===r?r.documentElement:i).contains(o))return}if(t.frameState=this.frameState_,!1!==this.dispatchEvent(t))for(var a=this.getInteractions().getArray().slice(),l=a.length-1;l>=0;l--){var u=a[l];if(u.getMap()===this&&u.getActive()&&this.getTargetElement())if(!u.handleEvent(t)||t.propagationStopped)break}}},e.prototype.handlePostRender=function(){var t=this.frameState_,e=this.tileQueue_;if(!e.isEmpty()){var n=this.maxTilesLoading_,r=n;if(t){var i=t.viewHints;if(i[b.a.ANIMATING]||i[b.a.INTERACTING]){var o=Date.now()-t.time>8;n=o?0:8,r=o?0:2}}e.getTilesLoading()<n&&(e.reprioritize(),e.loadMoreTiles(n,r))}!t||!this.hasListener(m.a.RENDERCOMPLETE)||t.animate||this.tileQueue_.getTilesLoading()||this.getLoading()||this.renderer_.dispatchRenderEvent(m.a.RENDERCOMPLETE,t);for(var a=this.postRenderFunctions_,s=0,l=a.length;s<l;++s)a[s](this,t);a.length=0},e.prototype.handleSizeChanged_=function(){this.getView()&&!this.getView().getAnimating()&&this.getView().resolveConstraints(0),this.render()},e.prototype.handleTargetChanged_=function(){var t;if(this.getTarget()&&(t=this.getTargetElement()),this.mapBrowserEventHandler_){for(var e=0,n=this.keyHandlerKeys_.length;e<n;++e)Object(I.unlistenByKey)(this.keyHandlerKeys_[e]);this.keyHandlerKeys_=null,this.viewport_.removeEventListener(s.a.CONTEXTMENU,this.boundHandleBrowserEvent_),this.viewport_.removeEventListener(s.a.WHEEL,this.boundHandleBrowserEvent_),void 0!==this.handleResize_&&(removeEventListener(s.a.RESIZE,this.handleResize_,!1),this.handleResize_=void 0),this.mapBrowserEventHandler_.dispose(),this.mapBrowserEventHandler_=null,Object(j.e)(this.viewport_)}if(t){for(var r in t.appendChild(this.viewport_),this.renderer_||(this.renderer_=this.createRenderer()),this.mapBrowserEventHandler_=new c.a(this,this.moveTolerance_),h.a)this.mapBrowserEventHandler_.addEventListener(h.a[r],this.handleMapBrowserEvent.bind(this));this.viewport_.addEventListener(s.a.CONTEXTMENU,this.boundHandleBrowserEvent_,!1),this.viewport_.addEventListener(s.a.WHEEL,this.boundHandleBrowserEvent_,!!w.e&&{passive:!1});var i=this.keyboardEventTarget_?this.keyboardEventTarget_:t;this.keyHandlerKeys_=[Object(I.listen)(i,s.a.KEYDOWN,this.handleBrowserEvent,this),Object(I.listen)(i,s.a.KEYPRESS,this.handleBrowserEvent,this)],this.handleResize_||(this.handleResize_=this.updateSize.bind(this),window.addEventListener(s.a.RESIZE,this.handleResize_,!1))}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()},e.prototype.handleTileChange_=function(){this.render()},e.prototype.handleViewPropertyChanged_=function(){this.render()},e.prototype.handleViewChanged_=function(){this.viewPropertyListenerKey_&&(Object(I.unlistenByKey)(this.viewPropertyListenerKey_),this.viewPropertyListenerKey_=null),this.viewChangeListenerKey_&&(Object(I.unlistenByKey)(this.viewChangeListenerKey_),this.viewChangeListenerKey_=null);var t=this.getView();t&&(this.updateViewportSize_(),this.viewPropertyListenerKey_=Object(I.listen)(t,g.a.PROPERTYCHANGE,this.handleViewPropertyChanged_,this),this.viewChangeListenerKey_=Object(I.listen)(t,s.a.CHANGE,this.handleViewPropertyChanged_,this),t.resolveConstraints(0)),this.render()},e.prototype.handleLayerGroupChanged_=function(){this.layerGroupPropertyListenerKeys_&&(this.layerGroupPropertyListenerKeys_.forEach(I.unlistenByKey),this.layerGroupPropertyListenerKeys_=null);var t=this.getLayerGroup();t&&(this.layerGroupPropertyListenerKeys_=[Object(I.listen)(t,g.a.PROPERTYCHANGE,this.render,this),Object(I.listen)(t,s.a.CHANGE,this.render,this)]),this.render()},e.prototype.isRendered=function(){return!!this.frameState_},e.prototype.renderSync=function(){this.animationDelayKey_&&cancelAnimationFrame(this.animationDelayKey_),this.animationDelay_()},e.prototype.redrawText=function(){for(var t=this.getLayerGroup().getLayerStatesArray(),e=0,n=t.length;e<n;++e){var r=t[e].layer;r.hasRenderer()&&r.getRenderer().handleFontsChanged()}},e.prototype.render=function(){this.renderer_&&void 0===this.animationDelayKey_&&(this.animationDelayKey_=requestAnimationFrame(this.animationDelay_))},e.prototype.removeControl=function(t){return this.getControls().remove(t)},e.prototype.removeInteraction=function(t){return this.getInteractions().remove(t)},e.prototype.removeLayer=function(t){return this.getLayerGroup().getLayers().remove(t)},e.prototype.removeOverlay=function(t){return this.getOverlays().remove(t)},e.prototype.renderFrame_=function(t){var e=this,n=this.getSize(),r=this.getView(),i=this.frameState_,o=null;if(void 0!==n&&Object(T.b)(n)&&r&&r.isDef()){var a=r.getHints(this.frameState_?this.frameState_.viewHints:void 0),s=r.getState();o={animate:!1,coordinateToPixelTransform:this.coordinateToPixelTransform_,declutterTree:null,extent:Object(S.getForViewAndSize)(s.center,s.resolution,s.rotation,n),index:this.frameIndex_++,layerIndex:0,layerStatesArray:this.getLayerGroup().getLayerStatesArray(),pixelRatio:this.pixelRatio_,pixelToCoordinateTransform:this.pixelToCoordinateTransform_,postRenderFunctions:[],size:n,tileQueue:this.tileQueue_,time:t,usedTiles:{},viewState:s,viewHints:a,wantedTiles:{}}}if(this.frameState_=o,this.renderer_.renderFrame(o),o){if(o.animate&&this.render(),Array.prototype.push.apply(this.postRenderFunctions_,o.postRenderFunctions),i)(!this.previousExtent_||!Object(S.isEmpty)(this.previousExtent_)&&!Object(S.equals)(o.extent,this.previousExtent_))&&(this.dispatchEvent(new p.a(f.a.MOVESTART,this,i)),this.previousExtent_=Object(S.createOrUpdateEmpty)(this.previousExtent_));this.previousExtent_&&!o.viewHints[b.a.ANIMATING]&&!o.viewHints[b.a.INTERACTING]&&!Object(S.equals)(o.extent,this.previousExtent_)&&(this.dispatchEvent(new p.a(f.a.MOVEEND,this,o)),Object(S.clone)(o.extent,this.previousExtent_))}this.dispatchEvent(new p.a(f.a.POSTRENDER,this,o)),this.postRenderTimeoutHandle_||(this.postRenderTimeoutHandle_=setTimeout(function(){e.postRenderTimeoutHandle_=void 0,e.handlePostRender()},0))},e.prototype.setLayerGroup=function(t){this.set(d.a.LAYERGROUP,t)},e.prototype.setSize=function(t){this.set(d.a.SIZE,t)},e.prototype.setTarget=function(t){this.set(d.a.TARGET,t)},e.prototype.setView=function(t){this.set(d.a.VIEW,t)},e.prototype.updateSize=function(){var t=this.getTargetElement(),e=void 0;if(t){var n=getComputedStyle(t),r=t.offsetWidth-parseFloat(n.borderLeftWidth)-parseFloat(n.paddingLeft)-parseFloat(n.paddingRight)-parseFloat(n.borderRightWidth),i=t.offsetHeight-parseFloat(n.borderTopWidth)-parseFloat(n.paddingTop)-parseFloat(n.paddingBottom)-parseFloat(n.borderBottomWidth);isNaN(r)||isNaN(i)||(e=[r,i],Object(T.b)(e)||console.warn("No map visible because the map container's width or height are 0."))}this.setSize(e),this.updateViewportSize_()},e.prototype.updateViewportSize_=function(){var t=this.getView();if(t){var e=void 0,n=getComputedStyle(this.viewport_);n.width&&n.height&&(e=[parseInt(n.width,10),parseInt(n.height,10)]),t.setViewportSize(e)}},e}(i.a);e.a=R},function(t,e,n){"use strict";var r,i=n(12),o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.map=n,i.frameState=void 0!==r?r:null,i}return o(e,t),e}(i.a);e.a=a},function(t,e,n){"use strict";e.b=function(t,e,n,r,i){if(!t||!(n in t.wantedTiles))return o.a;if(!t.wantedTiles[n][e.getKey()])return o.a;var a=t.viewState.center,s=r[0]-a[0],l=r[1]-a[1];return 65536*Math.log(i)+Math.sqrt(s*s+l*l)/i};var r,i=n(3),o=n(263),a=n(30),s=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),l=function(t){function e(e,n){var r=t.call(this,function(t){return e.apply(null,t)},function(t){return t[0].getKey()})||this;return r.boundHandleTileChange_=r.handleTileChange.bind(r),r.tileChangeCallback_=n,r.tilesLoading_=0,r.tilesLoadingKeys_={},r}return s(e,t),e.prototype.enqueue=function(e){var n=t.prototype.enqueue.call(this,e);n&&e[0].addEventListener(i.a.CHANGE,this.boundHandleTileChange_);return n},e.prototype.getTilesLoading=function(){return this.tilesLoading_},e.prototype.handleTileChange=function(t){var e=t.target,n=e.getState();if(n===a.a.LOADED||n===a.a.ERROR||n===a.a.EMPTY){e.removeEventListener(i.a.CHANGE,this.boundHandleTileChange_);var r=e.getKey();r in this.tilesLoadingKeys_&&(delete this.tilesLoadingKeys_[r],--this.tilesLoading_),this.tileChangeCallback_()}},e.prototype.loadMoreTiles=function(t,e){for(var n,r,i=0;this.tilesLoading_<t&&i<e&&this.getCount()>0;)r=(n=this.dequeue()[0]).getKey(),n.getState()!==a.a.IDLE||r in this.tilesLoadingKeys_||(this.tilesLoadingKeys_[r]=!0,++this.tilesLoading_,++i,n.load())},e}(o.b);e.a=l},function(t,e,n){"use strict";e.c=function(t){return void 0!==t?0:void 0},e.d=function(t){return void 0!==t?t:void 0},e.a=function(t){var e=2*Math.PI/t;return function(t,n){return n?t:void 0!==t?t=Math.floor(t/e+.5)*e:void 0}},e.b=function(t){var e=t||Object(r.j)(5);return function(t,n){return n?t:void 0!==t?Math.abs(t)<=e?0:t:void 0}};var r=n(7)},function(t,e,n){"use strict";var r,i=n(24),o=n(43),a=n(6),s=n(14),l=n(0),u=n(2),c=n(13),h=n(56),p=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),f=Object(s.c)(),d=function(t){function e(){var e=t.call(this)||this;return e.extent_=Object(l.createEmpty)(),e.extentRevision_=-1,e.simplifiedGeometryMaxMinSquaredTolerance=0,e.simplifiedGeometryRevision=0,e.simplifyTransformedInternal=Object(c.d)(function(t,e,n){if(!n)return this.getSimplifiedGeometry(e);var r=this.clone();return r.applyTransform(n),r.getSimplifiedGeometry(e)}),e}return p(e,t),e.prototype.simplifyTransformed=function(t,e){return this.simplifyTransformedInternal(this.getRevision(),t,e)},e.prototype.clone=function(){return Object(a.b)()},e.prototype.closestPointXY=function(t,e,n,r){return Object(a.b)()},e.prototype.containsXY=function(t,e){var n=this.getClosestPoint([t,e]);return n[0]===t&&n[1]===e},e.prototype.getClosestPoint=function(t,e){var n=e||[NaN,NaN];return this.closestPointXY(t[0],t[1],n,1/0),n},e.prototype.intersectsCoordinate=function(t){return this.containsXY(t[0],t[1])},e.prototype.computeExtent=function(t){return Object(a.b)()},e.prototype.getExtent=function(t){if(this.extentRevision_!=this.getRevision()){var e=this.computeExtent(this.extent_);(isNaN(e[0])||isNaN(e[1]))&&Object(l.createOrUpdateEmpty)(e),this.extentRevision_=this.getRevision()}return Object(l.returnOrUpdate)(this.extent_,t)},e.prototype.rotate=function(t,e){Object(a.b)()},e.prototype.scale=function(t,e,n){Object(a.b)()},e.prototype.simplify=function(t){return this.getSimplifiedGeometry(t*t)},e.prototype.getSimplifiedGeometry=function(t){return Object(a.b)()},e.prototype.getType=function(){return Object(a.b)()},e.prototype.applyTransform=function(t){Object(a.b)()},e.prototype.intersectsExtent=function(t){return Object(a.b)()},e.prototype.translate=function(t,e){Object(a.b)()},e.prototype.transform=function(t,e){var n=Object(u.get)(t),r=n.getUnits()==o.b.TILE_PIXELS?function(t,r,i){var o=n.getExtent(),a=n.getWorldExtent(),c=Object(l.getHeight)(a)/Object(l.getHeight)(o);return Object(s.b)(f,a[0],a[3],c,-c,0,0,0),Object(h.c)(t,0,t.length,i,f,r),Object(u.getTransform)(n,e)(t,r,i)}:Object(u.getTransform)(n,e);return this.applyTransform(r),this},e}(i.a);e.a=d},function(t,e,n){"use strict";function r(t,e,n,r){for(var i=0,o=t[n-r],a=t[n-r+1];e<n;e+=r){var s=t[e],l=t[e+1];i+=a*s-o*l,o=s,a=l}return i/2}function i(t,e,n,i){for(var o=0,a=0,s=n.length;a<s;++a){var l=n[a];o+=r(t,e,l,i),e=l}return o}e.a=r,e.b=i,e.c=function(t,e,n,r){for(var o=0,a=0,s=n.length;a<s;++a){var l=n[a];o+=i(t,e,l,r),e=l[l.length-1]}return o}},function(t,e,n){"use strict";e.a=o,e.b=function(t,e,n,r,i){for(var a=[],s=0,l=n.length;s<l;++s){var u=n[s];a=o(t,e,u,r,i,2*s,a),e=u[u.length-1]}return a};var r=n(110),i=n(5);function o(t,e,n,o,a,s,l){for(var u,c,h,p,f,d,g,y=a[s+1],m=[],v=0,_=n.length;v<_;++v){var b=n[v];for(p=t[b-o],d=t[b-o+1],u=e;u<b;u+=o)f=t[u],g=t[u+1],(y<=d&&g<=y||d<=y&&y<=g)&&(h=(y-d)/(g-d)*(f-p)+p,m.push(h)),p=f,d=g}var w=NaN,O=-1/0;for(m.sort(i.i),p=m[0],u=1,c=m.length;u<c;++u){f=m[u];var x=Math.abs(f-p);x>O&&(h=(p+f)/2,Object(r.c)(t,e,n,o,h,y)&&(w=h,O=x)),p=f}return isNaN(w)&&(w=a[s]),l?(l.push(w,y,O),l):[w,y,O]}},function(t,e,n){"use strict";e.a=function(t,e,n,o,a,s,l){var u,c,h=(n-e)/o;if(1===h)u=e;else if(2===h)u=e,c=a;else if(0!==h){for(var p=t[e],f=t[e+1],d=0,g=[0],y=e+o;y<n;y+=o){var m=t[y],v=t[y+1];d+=Math.sqrt((m-p)*(m-p)+(v-f)*(v-f)),g.push(d),p=m,f=v}var _=a*d,b=Object(r.a)(g,_);b<0?(c=(_-g[-b-2])/(g[-b-1]-g[-b-2]),u=e+(-b-2)*o):u=e+b*o}for(var w=l>1?l:2,O=s||new Array(w),y=0;y<w;++y)O[y]=void 0===u?NaN:void 0===c?t[u+y]:Object(i.c)(t[u+y],t[u+o+y],c);return O},e.b=o,e.c=function(t,e,n,r,i,a,s){if(s)return o(t,e,n[n.length-1],r,i,a);var l;if(i<t[r-1])return a?((l=t.slice(0,r))[r-1]=i,l):null;if(t[t.length-1]<i)return a?((l=t.slice(t.length-r))[r-1]=i,l):null;for(var u=0,c=n.length;u<c;++u){var h=n[u];if(e!=h){if(i<t[e+r-1])return null;if(i<=t[h-1])return o(t,e,h,r,i,!1);e=h}}return null};var r=n(5),i=n(7);function o(t,e,n,r,o,a){if(n==e)return null;var s;if(o<t[e+r-1])return a?((s=t.slice(e,e+r))[r-1]=o,s):null;if(t[n-1]<o)return a?((s=t.slice(n-r,n))[r-1]=o,s):null;if(o==t[e+r-1])return t.slice(e,e+r);for(var l=e/r,u=n/r;l<u;){var c=l+u>>1;o<t[(c+1)*r-1]?u=c:l=c+1}var h=t[l*r-1];if(o==h)return t.slice((l-1)*r,(l-1)*r+r);var p=(o-h)/(t[(l+1)*r-1]-h);s=[];for(var f=0;f<r-1;++f)s.push(Object(i.c)(t[(l-1)*r+f],t[l*r+f],p));return s.push(o),s}},function(t,e,n){var r,i,o;function a(t){"@babel/helpers - typeof";return(a="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}o=function(){"use strict";function t(t,r,i,o,a){!function t(n,r,i,o,a){for(;o>i;){if(o-i>600){var s=o-i+1,l=r-i+1,u=Math.log(s),c=.5*Math.exp(2*u/3),h=.5*Math.sqrt(u*c*(s-c)/s)*(l-s/2<0?-1:1);t(n,r,Math.max(i,Math.floor(r-l*c/s+h)),Math.min(o,Math.floor(r+(s-l)*c/s+h)),a)}var p=n[r],f=i,d=o;for(e(n,i,r),a(n[o],p)>0&&e(n,i,o);f<d;){for(e(n,f,d),f++,d--;a(n[f],p)<0;)f++;for(;a(n[d],p)>0;)d--}0===a(n[i],p)?e(n,i,d):e(n,++d,o),d<=r&&(i=d+1),r<=d&&(o=d-1)}}(t,r,i||0,o||t.length-1,a||n)}function e(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function n(t,e){return t<e?-1:t>e?1:0}var r=function(t){void 0===t&&(t=9),this._maxEntries=Math.max(4,t),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()};function i(t,e,n){if(!n)return e.indexOf(t);for(var r=0;r<e.length;r++)if(n(t,e[r]))return r;return-1}function o(t,e){a(t,0,t.children.length,e,t)}function a(t,e,n,r,i){i||(i=d(null)),i.minX=1/0,i.minY=1/0,i.maxX=-1/0,i.maxY=-1/0;for(var o=e;o<n;o++){var a=t.children[o];s(i,t.leaf?r(a):a)}return i}function s(t,e){return t.minX=Math.min(t.minX,e.minX),t.minY=Math.min(t.minY,e.minY),t.maxX=Math.max(t.maxX,e.maxX),t.maxY=Math.max(t.maxY,e.maxY),t}function l(t,e){return t.minX-e.minX}function u(t,e){return t.minY-e.minY}function c(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function h(t){return t.maxX-t.minX+(t.maxY-t.minY)}function p(t,e){return t.minX<=e.minX&&t.minY<=e.minY&&e.maxX<=t.maxX&&e.maxY<=t.maxY}function f(t,e){return e.minX<=t.maxX&&e.minY<=t.maxY&&e.maxX>=t.minX&&e.maxY>=t.minY}function d(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function g(e,n,r,i,o){for(var a=[n,r];a.length;)if(!((r=a.pop())-(n=a.pop())<=i)){var s=n+Math.ceil((r-n)/i/2)*i;t(e,s,n,r,o),a.push(n,s,s,r)}}return r.prototype.all=function(){return this._all(this.data,[])},r.prototype.search=function(t){var e=this.data,n=[];if(!f(t,e))return n;for(var r=this.toBBox,i=[];e;){for(var o=0;o<e.children.length;o++){var a=e.children[o],s=e.leaf?r(a):a;f(t,s)&&(e.leaf?n.push(a):p(t,s)?this._all(a,n):i.push(a))}e=i.pop()}return n},r.prototype.collides=function(t){var e=this.data;if(!f(t,e))return!1;for(var n=[];e;){for(var r=0;r<e.children.length;r++){var i=e.children[r],o=e.leaf?this.toBBox(i):i;if(f(t,o)){if(e.leaf||p(t,o))return!0;n.push(i)}}e=n.pop()}return!1},r.prototype.load=function(t){if(!t||!t.length)return this;if(t.length<this._minEntries){for(var e=0;e<t.length;e++)this.insert(t[e]);return this}var n=this._build(t.slice(),0,t.length-1,0);if(this.data.children.length)if(this.data.height===n.height)this._splitRoot(this.data,n);else{if(this.data.height<n.height){var r=this.data;this.data=n,n=r}this._insert(n,this.data.height-n.height-1,!0)}else this.data=n;return this},r.prototype.insert=function(t){return t&&this._insert(t,this.data.height-1),this},r.prototype.clear=function(){return this.data=d([]),this},r.prototype.remove=function(t,e){if(!t)return this;for(var n,r,o,a=this.data,s=this.toBBox(t),l=[],u=[];a||l.length;){if(a||(a=l.pop(),r=l[l.length-1],n=u.pop(),o=!0),a.leaf){var c=i(t,a.children,e);if(-1!==c)return a.children.splice(c,1),l.push(a),this._condense(l),this}o||a.leaf||!p(a,s)?r?(n++,a=r.children[n],o=!1):a=null:(l.push(a),u.push(n),n=0,r=a,a=a.children[0])}return this},r.prototype.toBBox=function(t){return t},r.prototype.compareMinX=function(t,e){return t.minX-e.minX},r.prototype.compareMinY=function(t,e){return t.minY-e.minY},r.prototype.toJSON=function(){return this.data},r.prototype.fromJSON=function(t){return this.data=t,this},r.prototype._all=function(t,e){for(var n=[];t;)t.leaf?e.push.apply(e,t.children):n.push.apply(n,t.children),t=n.pop();return e},r.prototype._build=function(t,e,n,r){var i,a=n-e+1,s=this._maxEntries;if(a<=s)return o(i=d(t.slice(e,n+1)),this.toBBox),i;r||(r=Math.ceil(Math.log(a)/Math.log(s)),s=Math.ceil(a/Math.pow(s,r-1))),(i=d([])).leaf=!1,i.height=r;var l=Math.ceil(a/s),u=l*Math.ceil(Math.sqrt(s));g(t,e,n,u,this.compareMinX);for(var c=e;c<=n;c+=u){var h=Math.min(c+u-1,n);g(t,c,h,l,this.compareMinY);for(var p=c;p<=h;p+=l){var f=Math.min(p+l-1,h);i.children.push(this._build(t,p,f,r-1))}}return o(i,this.toBBox),i},r.prototype._chooseSubtree=function(t,e,n,r){for(;r.push(e),!e.leaf&&r.length-1!==n;){for(var i=1/0,o=1/0,a=void 0,s=0;s<e.children.length;s++){var l=e.children[s],u=c(l),h=(p=t,f=l,(Math.max(f.maxX,p.maxX)-Math.min(f.minX,p.minX))*(Math.max(f.maxY,p.maxY)-Math.min(f.minY,p.minY))-u);h<o?(o=h,i=u<i?u:i,a=l):h===o&&u<i&&(i=u,a=l)}e=a||e.children[0]}var p,f;return e},r.prototype._insert=function(t,e,n){var r=n?t:this.toBBox(t),i=[],o=this._chooseSubtree(r,this.data,e,i);for(o.children.push(t),s(o,r);e>=0&&i[e].children.length>this._maxEntries;)this._split(i,e),e--;this._adjustParentBBoxes(r,i,e)},r.prototype._split=function(t,e){var n=t[e],r=n.children.length,i=this._minEntries;this._chooseSplitAxis(n,i,r);var a=this._chooseSplitIndex(n,i,r),s=d(n.children.splice(a,n.children.length-a));s.height=n.height,s.leaf=n.leaf,o(n,this.toBBox),o(s,this.toBBox),e?t[e-1].children.push(s):this._splitRoot(n,s)},r.prototype._splitRoot=function(t,e){this.data=d([t,e]),this.data.height=t.height+1,this.data.leaf=!1,o(this.data,this.toBBox)},r.prototype._chooseSplitIndex=function(t,e,n){for(var r,i,o,s,l,u,h,p=1/0,f=1/0,d=e;d<=n-e;d++){var g=a(t,0,d,this.toBBox),y=a(t,d,n,this.toBBox),m=(i=g,o=y,s=void 0,l=void 0,u=void 0,h=void 0,s=Math.max(i.minX,o.minX),l=Math.max(i.minY,o.minY),u=Math.min(i.maxX,o.maxX),h=Math.min(i.maxY,o.maxY),Math.max(0,u-s)*Math.max(0,h-l)),v=c(g)+c(y);m<p?(p=m,r=d,f=v<f?v:f):m===p&&v<f&&(f=v,r=d)}return r||n-e},r.prototype._chooseSplitAxis=function(t,e,n){var r=t.leaf?this.compareMinX:l,i=t.leaf?this.compareMinY:u;this._allDistMargin(t,e,n,r)<this._allDistMargin(t,e,n,i)&&t.children.sort(r)},r.prototype._allDistMargin=function(t,e,n,r){t.children.sort(r);for(var i=this.toBBox,o=a(t,0,e,i),l=a(t,n-e,n,i),u=h(o)+h(l),c=e;c<n-e;c++){var p=t.children[c];s(o,t.leaf?i(p):p),u+=h(o)}for(var f=n-e-1;f>=e;f--){var d=t.children[f];s(l,t.leaf?i(d):d),u+=h(l)}return u},r.prototype._adjustParentBBoxes=function(t,e,n){for(var r=n;r>=0;r--)s(e[r],t)},r.prototype._condense=function(t){for(var e=t.length-1,n=void 0;e>=0;e--)0===t[e].children.length?e>0?(n=t[e-1].children).splice(n.indexOf(t[e]),1):this.clear():o(t[e],this.toBBox)},r},"object"==a(e)&&"undefined"!=typeof t?t.exports=o():void 0===(i="function"===typeof(r=o)?r.call(e,n,e,t):r)||(t.exports=i)},function(t,e,n){"use strict";var r,i=n(197),o=n(133),a=n(71),s=n(14),l=n(0),u=n(11),c=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),h=function(t){function e(e){var n=t.call(this,e)||this;return n.container=null,n.renderedResolution,n.tempTransform=Object(s.c)(),n.pixelTransform=Object(s.c)(),n.inversePixelTransform=Object(s.c)(),n.context=null,n.containerReused=!1,n}return c(e,t),e.prototype.useContainer=function(t,e,n){var r,i,o=this.getLayer().getClassName();t&&""===t.style.opacity&&t.className===o&&((s=t.firstElementChild)instanceof HTMLCanvasElement&&(i=s.getContext("2d")));if(!i||0!==i.canvas.width&&i.canvas.style.transform!==e?this.containerReused&&(this.container=null,this.context=null,this.containerReused=!1):(this.container=t,this.context=i,this.containerReused=!0),!this.container){(r=document.createElement("div")).className=o;var a=r.style;a.position="absolute",a.width="100%",a.height="100%";var s=(i=Object(u.a)()).canvas;r.appendChild(s),(a=s.style).position="absolute",a.left="0",a.transformOrigin="top left",this.container=r,this.context=i}},e.prototype.clipUnrotated=function(t,e,n){var r=Object(l.getTopLeft)(n),i=Object(l.getTopRight)(n),o=Object(l.getBottomRight)(n),a=Object(l.getBottomLeft)(n);Object(s.a)(e.coordinateToPixelTransform,r),Object(s.a)(e.coordinateToPixelTransform,i),Object(s.a)(e.coordinateToPixelTransform,o),Object(s.a)(e.coordinateToPixelTransform,a);var u=this.inversePixelTransform;Object(s.a)(u,r),Object(s.a)(u,i),Object(s.a)(u,o),Object(s.a)(u,a),t.save(),t.beginPath(),t.moveTo(Math.round(r[0]),Math.round(r[1])),t.lineTo(Math.round(i[0]),Math.round(i[1])),t.lineTo(Math.round(o[0]),Math.round(o[1])),t.lineTo(Math.round(a[0]),Math.round(a[1])),t.clip()},e.prototype.dispatchRenderEvent_=function(t,e,n){var r=this.getLayer();if(r.hasListener(t)){var i=new o.a(t,this.inversePixelTransform,n,e);r.dispatchEvent(i)}},e.prototype.preRender=function(t,e){this.dispatchRenderEvent_(a.a.PRERENDER,t,e)},e.prototype.postRender=function(t,e){this.dispatchRenderEvent_(a.a.POSTRENDER,t,e)},e.prototype.getRenderTransform=function(t,e,n,r,i,o,a){var l=i/2,u=o/2,c=r/e,h=-c,p=-t[0]+a,f=-t[1];return Object(s.b)(this.tempTransform,l,u,c,h,-n,p,f)},e.prototype.getDataAtPixel=function(t,e,n){var r,i=Object(s.a)(this.inversePixelTransform,t.slice()),o=this.context,a=this.getLayer().getExtent();if(a){var u=Object(s.a)(e.pixelToCoordinateTransform,t.slice());if(!Object(l.containsCoordinate)(a,u))return null}try{var c=Math.round(i[0]),h=Math.round(i[1]),p=document.createElement("canvas"),f=p.getContext("2d");p.width=1,p.height=1,f.clearRect(0,0,1,1),f.drawImage(o.canvas,c,h,1,1,0,0,1,1),r=f.getImageData(0,0,1,1).data}catch(t){return"SecurityError"===t.name?new Uint8Array:r}return 0===r[3]?null:r},e}(i.a);e.a=h},function(t,e,n){"use strict";e.a={CIRCLE:"Circle",DEFAULT:"Default",IMAGE:"Image",LINE_STRING:"LineString",POLYGON:"Polygon",TEXT:"Text"}},function(t,e,n){"use strict";e.a=function(t,e){return parseInt(Object(a.c)(t),10)-parseInt(Object(a.c)(e),10)},e.b=function(t,e){var n=u(t,e);return n*n},e.c=u,e.d=function(t,e,n,a,s,u,c){var h=!1,p=n.getImage();if(p){var f=p.getImageState();f==o.a.LOADED||f==o.a.ERROR?p.unlistenImageChange(s):(f==o.a.IDLE&&p.load(),f=p.getImageState(),p.listenImageChange(s),h=!0)}return function(t,e,n,o,a,s){var u=n.getGeometryFunction()(e);if(u){var c=u.simplifyTransformed(o,a);if(n.getRenderer())!function t(e,n,o,a){if(n.getType()!=i.a.GEOMETRY_COLLECTION){var s=e.getBuilder(o.getZIndex(),r.a.DEFAULT);s.drawCustom(n,a,o.getRenderer())}else for(var l=n.getGeometries(),u=0,c=l.length;u<c;++u)t(e,l[u],o,a)}(t,c,n,e);else{var h=l[c.getType()];h(t,c,n,e,s)}}}(t,e,n,a,u,c),h};var r=n(144),i=n(8),o=n(33),a=n(6),s=.5,l={Point:function(t,e,n,i,a){var s,l=n.getImage(),u=n.getText();a&&(t=a,s=l&&u&&u.getText()?{}:void 0);if(l){if(l.getImageState()!=o.a.LOADED)return;var c=t.getBuilder(n.getZIndex(),r.a.IMAGE);c.setImageStyle(l,s),c.drawPoint(e,i)}if(u&&u.getText()){var h=t.getBuilder(n.getZIndex(),r.a.TEXT);h.setTextStyle(u,s),h.drawText(e,i)}},LineString:function(t,e,n,i,o){var a=n.getStroke();if(a){var s=t.getBuilder(n.getZIndex(),r.a.LINE_STRING);s.setFillStrokeStyle(null,a),s.drawLineString(e,i)}var l=n.getText();if(l&&l.getText()){var u=(o||t).getBuilder(n.getZIndex(),r.a.TEXT);u.setTextStyle(l),u.drawText(e,i)}},Polygon:function(t,e,n,i,o){var a=n.getFill(),s=n.getStroke();if(a||s){var l=t.getBuilder(n.getZIndex(),r.a.POLYGON);l.setFillStrokeStyle(a,s),l.drawPolygon(e,i)}var u=n.getText();if(u&&u.getText()){var c=(o||t).getBuilder(n.getZIndex(),r.a.TEXT);c.setTextStyle(u),c.drawText(e,i)}},MultiPoint:function(t,e,n,i,a){var s,l=n.getImage(),u=n.getText();a&&(t=a,s=l&&u&&u.getText()?{}:void 0);if(l){if(l.getImageState()!=o.a.LOADED)return;var c=t.getBuilder(n.getZIndex(),r.a.IMAGE);c.setImageStyle(l,s),c.drawMultiPoint(e,i)}if(u&&u.getText()){var h=(a||t).getBuilder(n.getZIndex(),r.a.TEXT);h.setTextStyle(u,s),h.drawText(e,i)}},MultiLineString:function(t,e,n,i,o){var a=n.getStroke();if(a){var s=t.getBuilder(n.getZIndex(),r.a.LINE_STRING);s.setFillStrokeStyle(null,a),s.drawMultiLineString(e,i)}var l=n.getText();if(l&&l.getText()){var u=(o||t).getBuilder(n.getZIndex(),r.a.TEXT);u.setTextStyle(l),u.drawText(e,i)}},MultiPolygon:function(t,e,n,i,o){var a=n.getFill(),s=n.getStroke();if(s||a){var l=t.getBuilder(n.getZIndex(),r.a.POLYGON);l.setFillStrokeStyle(a,s),l.drawMultiPolygon(e,i)}var u=n.getText();if(u&&u.getText()){var c=(o||t).getBuilder(n.getZIndex(),r.a.TEXT);c.setTextStyle(u),c.drawText(e,i)}},GeometryCollection:function(t,e,n,r,i){var o,a,s=e.getGeometriesArray();for(o=0,a=s.length;o<a;++o){var u=l[s[o].getType()];u(t,s[o],n,r,i)}},Circle:function(t,e,n,i,o){var a=n.getFill(),s=n.getStroke();if(a||s){var l=t.getBuilder(n.getZIndex(),r.a.CIRCLE);l.setFillStrokeStyle(a,s),l.drawCircle(e,i)}var u=n.getText();if(u&&u.getText()){var c=(o||t).getBuilder(n.getZIndex(),r.a.TEXT);c.setTextStyle(u),c.drawText(e,i)}}};function u(t,e){return s*t/e}},function(t,e,n){"use strict";var r=n(142),i=n.n(r),o=n(0),a=n(6),s=n(1),l=function(){function t(t){this.rbush_=new i.a(t),this.items_={}}return t.prototype.insert=function(t,e){var n={minX:t[0],minY:t[1],maxX:t[2],maxY:t[3],value:e};this.rbush_.insert(n),this.items_[Object(a.c)(e)]=n},t.prototype.load=function(t,e){for(var n=new Array(e.length),r=0,i=e.length;r<i;r++){var o=t[r],s=e[r],l={minX:o[0],minY:o[1],maxX:o[2],maxY:o[3],value:s};n[r]=l,this.items_[Object(a.c)(s)]=l}this.rbush_.load(n)},t.prototype.remove=function(t){var e=Object(a.c)(t),n=this.items_[e];return delete this.items_[e],null!==this.rbush_.remove(n)},t.prototype.update=function(t,e){var n=this.items_[Object(a.c)(e)],r=[n.minX,n.minY,n.maxX,n.maxY];Object(o.equals)(r,t)||(this.remove(e),this.insert(t,e))},t.prototype.getAll=function(){return this.rbush_.all().map(function(t){return t.value})},t.prototype.getInExtent=function(t){var e={minX:t[0],minY:t[1],maxX:t[2],maxY:t[3]};return this.rbush_.search(e).map(function(t){return t.value})},t.prototype.forEach=function(t){return this.forEach_(this.getAll(),t)},t.prototype.forEachInExtent=function(t,e){return this.forEach_(this.getInExtent(t),e)},t.prototype.forEach_=function(t,e){for(var n,r=0,i=t.length;r<i;r++)if(n=e(t[r]))return n;return n},t.prototype.isEmpty=function(){return Object(s.d)(this.items_)},t.prototype.clear=function(){this.rbush_.clear(),this.items_={}},t.prototype.getExtent=function(t){var e=this.rbush_.toJSON();return Object(o.createOrUpdate)(e.minX,e.minY,e.maxX,e.maxY,t)},t.prototype.concat=function(t){for(var e in this.rbush_.load(t.rbush_.all()),t.items_)this.items_[e]=t.items_[e]},t}();e.a=l},function(t,e,n){"use strict";var r,i=n(22),o=n(74),a=n(17),s=n(8),l=n(21),u=n(37),c=n(44),h=n(45),p=n(289),f=n.n(p),d=n(16),g=n(10),y=n(106),m=n(208),v=n(43),_=n(4),b=n(2),w=n(112),O=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),x=function(t){function e(e){var n=t.call(this)||this,r=e||{};return n.dataProjection=new y.a({code:"",units:v.b.TILE_PIXELS}),n.featureClass_=r.featureClass?r.featureClass:m.a,n.geometryName_=r.geometryName,n.layerName_=r.layerName?r.layerName:"layer",n.layers_=r.layers?r.layers:null,n.idProperty_=r.idProperty,n}return O(e,t),e.prototype.readRawGeometry_=function(t,e,n,r){t.pos=e.geometry;for(var i=t.readVarint()+t.pos,o=1,a=0,s=0,l=0,u=0,c=0;t.pos<i;){if(!a){var h=t.readVarint();o=7&h,a=h>>3}a--,1===o||2===o?(s+=t.readSVarint(),l+=t.readSVarint(),1===o&&u>c&&(r.push(u),c=u),n.push(s,l),u+=2):7===o?u>c&&(n.push(n[c],n[c+1]),u+=2):Object(_.a)(!1,59)}u>c&&(r.push(u),c=u)},e.prototype.createFeature_=function(t,e,n){var r,o=e.type;if(0===o)return null;var p,f=e.properties;this.idProperty_?(p=f[this.idProperty_],delete f[this.idProperty_]):p=e.id,f[this.layerName_]=e.layer.name;var y=[],v=[];this.readRawGeometry_(t,e,y,v);var _=function(t,e){var n;1===t?n=1===e?s.a.POINT:s.a.MULTI_POINT:2===t?n=1===e?s.a.LINE_STRING:s.a.MULTI_LINE_STRING:3===t&&(n=s.a.POLYGON);return n}(o,v.length);if(this.featureClass_===m.a)(r=new this.featureClass_(_,y,v,f,p)).transform(n.dataProjection);else{var b=void 0;if(_==s.a.POLYGON){for(var O=[],x=0,E=0,S=0,C=v.length;S<C;++S){var T=v[S];if(Object(w.a)(y,x,T,2)){if(0===O.length)continue;O[O.length-1].push(v[E])}else O.push(v.slice(E,S+1));E=S+1,x=T}b=O.length>1?new h.a(y,a.a.XY,O):new g.b(y,a.a.XY,v)}else b=_===s.a.POINT?new d.a(y,a.a.XY):_===s.a.LINE_STRING?new l.a(y,a.a.XY):_===s.a.POLYGON?new g.b(y,a.a.XY,v):_===s.a.MULTI_POINT?new c.a(y,a.a.XY):_===s.a.MULTI_LINE_STRING?new u.a(y,a.a.XY,v):null;r=new(0,this.featureClass_),this.geometryName_&&r.setGeometryName(this.geometryName_);var I=Object(i.c)(b,!1,n);r.setGeometry(I),r.setId(p),r.setProperties(f,!0)}return r},e.prototype.getType=function(){return o.a.ARRAY_BUFFER},e.prototype.readFeatures=function(t,e){var n=this.layers_,r=this.adaptOptions(e),i=Object(b.get)(r.dataProjection);i.setWorldExtent(r.extent),r.dataProjection=i;var o=new f.a(t),a=o.readFields(E,{}),s=[];for(var l in a)if(!n||-1!=n.indexOf(l)){var u=a[l],c=u?[0,0,u.extent,u.extent]:null;i.setExtent(c);for(var h=0,p=u.length;h<p;++h){var d=T(o,u,h);s.push(this.createFeature_(o,d,r))}}return s},e.prototype.readProjection=function(t){return this.dataProjection},e.prototype.setLayers=function(t){this.layers_=t},e}(i.a);function E(t,e,n){if(3===t){var r={keys:[],values:[],features:[]},i=n.readVarint()+n.pos;n.readFields(S,r,i),r.length=r.features.length,r.length&&(e[r.name]=r)}}function S(t,e,n){if(15===t)e.version=n.readVarint();else if(1===t)e.name=n.readString();else if(5===t)e.extent=n.readVarint();else if(2===t)e.features.push(n.pos);else if(3===t)e.keys.push(n.readString());else if(4===t){for(var r=null,i=n.readVarint()+n.pos;n.pos<i;)r=1===(t=n.readVarint()>>3)?n.readString():2===t?n.readFloat():3===t?n.readDouble():4===t?n.readVarint64():5===t?n.readVarint():6===t?n.readSVarint():7===t?n.readBoolean():null;e.values.push(r)}}function C(t,e,n){if(1==t)e.id=n.readVarint();else if(2==t)for(var r=n.readVarint()+n.pos;n.pos<r;){var i=e.layer.keys[n.readVarint()],o=e.layer.values[n.readVarint()];e.properties[i]=o}else 3==t?e.type=n.readVarint():4==t&&(e.geometry=n.pos)}function T(t,e,n){t.pos=e.features[n];var r=t.readVarint()+t.pos,i={layer:e,type:0,properties:{}};return t.readFields(C,i,r),i}e.a=x},function(t,e,n){"use strict";var r,i=n(113),o=n(290),a=n(211),s=n(210),l=n(4),u=n(1),c=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),h=function(t){function e(e){var n=this,r=e||{},i=Object(u.a)({},r);delete i.preload,delete i.useInterimTilesOnError,(n=t.call(this,i)||this).on,n.once,n.un,r.renderMode===s.a.IMAGE&&(console.warn('renderMode: "image" is deprecated. Option ignored.'),r.renderMode=void 0);var o=r.renderMode||s.a.HYBRID;return Object(l.a)(o==s.a.HYBRID||o==s.a.VECTOR,28),n.renderMode_=o,n.setPreload(r.preload?r.preload:0),n.setUseInterimTilesOnError(void 0===r.useInterimTilesOnError||r.useInterimTilesOnError),n}return c(e,t),e.prototype.createRenderer=function(){return new o.a(this)},e.prototype.getFeatures=function(e){return t.prototype.getFeatures.call(this,e)},e.prototype.getRenderMode=function(){return this.renderMode_},e.prototype.getPreload=function(){return this.get(a.a.PRELOAD)},e.prototype.getUseInterimTilesOnError=function(){return this.get(a.a.USE_INTERIM_TILES_ON_ERROR)},e.prototype.setPreload=function(t){this.set(a.a.PRELOAD,t)},e.prototype.setUseInterimTilesOnError=function(t){this.set(a.a.USE_INTERIM_TILES_ON_ERROR,t)},e}(i.a);e.a=h},function(t,e,n){"use strict";e.a=function(t,e,n,i,o){return void 0!==o?(o.minX=t,o.maxX=e,o.minY=n,o.maxY=i,o):new r(t,e,n,i)};var r=function(){function t(t,e,n,r){this.minX=t,this.maxX=e,this.minY=n,this.maxY=r}return t.prototype.contains=function(t){return this.containsXY(t[1],t[2])},t.prototype.containsTileRange=function(t){return this.minX<=t.minX&&t.maxX<=this.maxX&&this.minY<=t.minY&&t.maxY<=this.maxY},t.prototype.containsXY=function(t,e){return this.minX<=t&&t<=this.maxX&&this.minY<=e&&e<=this.maxY},t.prototype.equals=function(t){return this.minX==t.minX&&this.minY==t.minY&&this.maxX==t.maxX&&this.maxY==t.maxY},t.prototype.extend=function(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)},t.prototype.getHeight=function(){return this.maxY-this.minY+1},t.prototype.getSize=function(){return[this.getWidth(),this.getHeight()]},t.prototype.getWidth=function(){return this.maxX-this.minX+1},t.prototype.intersects=function(t){return this.minX<=t.maxX&&this.maxX>=t.minX&&this.minY<=t.maxY&&this.maxY>=t.minY},t}();e.b=r},function(t,e,n){"use strict";var r,i=n(3),o=n(212),a=n(116),s=n(30),l=n(151),u=n(213),c=n(0),h=n(51),p=n(38),f=n(1),d=n(201),g=n(28),y=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),m=function(t){function e(e){var n=this,r=e.projection||"EPSG:3857",i=e.extent||Object(h.extentFromProjection)(r),s=e.tileGrid||Object(h.createXYZ)({extent:i,maxResolution:e.maxResolution,maxZoom:void 0!==e.maxZoom?e.maxZoom:22,minZoom:e.minZoom,tileSize:e.tileSize||512});return(n=t.call(this,{attributions:e.attributions,attributionsCollapsible:e.attributionsCollapsible,cacheSize:e.cacheSize,opaque:!1,projection:r,state:e.state,tileGrid:s,tileLoadFunction:e.tileLoadFunction?e.tileLoadFunction:v,tileUrlFunction:e.tileUrlFunction,url:e.url,urls:e.urls,wrapX:void 0===e.wrapX||e.wrapX,transition:e.transition,zDirection:void 0===e.zDirection?1:e.zDirection})||this).format_=e.format?e.format:null,n.sourceTileCache=new a.a(n.tileCache.highWaterMark),n.overlaps_=void 0==e.overlaps||e.overlaps,n.tileClass=e.tileClass?e.tileClass:o.a,n.tileGrids_={},n}return y(e,t),e.prototype.getFeaturesInExtent=function(t){var e=[],n=this.tileCache;if(0===n.getCount())return e;var r=Object(p.b)(n.peekFirstKey())[0],i=this.tileGrid;return n.forEach(function(n){if(n.tileCoord[0]===r&&n.getState()===s.a.LOADED)for(var o=n.getSourceTiles(),a=0,l=o.length;a<l;++a){var u=o[a],h=u.tileCoord;if(Object(c.intersects)(t,i.getTileCoordExtent(h))){var p=u.getFeatures();if(p)for(var f=0,d=p.length;f<d;++f){var g=p[f],y=g.getGeometry();Object(c.intersects)(t,y.getExtent())&&e.push(g)}}}}),e},e.prototype.getOverlaps=function(){return this.overlaps_},e.prototype.clear=function(){this.tileCache.clear(),this.sourceTileCache.clear()},e.prototype.expireCache=function(e,n){var r=this.getTileCacheForProjection(e),i=Object.keys(n).reduce(function(t,e){var n=Object(p.c)(e);if(r.containsKey(n))for(var i=r.get(n).sourceTiles,o=0,a=i.length;o<a;++o)t[i[o].getKey()]=!0;return t},{});t.prototype.expireCache.call(this,e,n),this.sourceTileCache.expireCache(i)},e.prototype.getSourceTiles=function(t,e,n){var r=this;if(n.getState()===s.a.IDLE){n.setState(s.a.LOADING);var o=n.wrappedTileCoord,a=this.getTileGridForProjection(e),l=a.getTileCoordExtent(o),u=o[0],h=a.getResolution(u);Object(c.buffer)(l,-h,l);var p=this.tileGrid,d=p.getExtent();d&&Object(c.getIntersection)(l,d,l);var g=p.getZForResolution(h,1);p.forEachTileCoord(l,g,function(o){var a=r.tileUrlFunction(o,t,e),l=r.sourceTileCache.containsKey(a)?r.sourceTileCache.get(a):new r.tileClass(o,a?s.a.IDLE:s.a.EMPTY,a,r.format_,r.tileLoadFunction);n.sourceTiles.push(l);var u=l.getState();if(u<s.a.LOADED){l.addEventListener(i.a.CHANGE,function t(e){r.handleTileChange(e);var o=l.getState();if(o===s.a.LOADED||o===s.a.ERROR){var a=l.getKey();a in n.errorTileKeys?l.getState()===s.a.LOADED&&delete n.errorTileKeys[a]:n.loadingSourceTiles--,o===s.a.ERROR?n.errorTileKeys[a]=!0:l.removeEventListener(i.a.CHANGE,t),0===n.loadingSourceTiles&&n.setState(Object(f.d)(n.errorTileKeys)?s.a.LOADED:s.a.ERROR)}}),n.loadingSourceTiles++}u===s.a.IDLE&&(l.extent=p.getTileCoordExtent(o),l.projection=e,l.resolution=p.getResolution(o[0]),r.sourceTileCache.set(a,l),l.load())}),n.loadingSourceTiles||n.setState(n.sourceTiles.some(function(t){return t.getState()===s.a.ERROR})?s.a.ERROR:s.a.LOADED)}return n.sourceTiles},e.prototype.getTile=function(t,e,n,r,i){var o,a=Object(p.e)(t,e,n),l=this.getKey();if(this.tileCache.containsKey(a)&&(o=this.tileCache.get(a)).key===l)return o;var h=[t,e,n],f=this.getTileCoordForTileUrlFunction(h,i),d=this.getTileGrid().getExtent(),g=this.getTileGridForProjection(i);if(f&&d){var y=g.getTileCoordExtent(f);Object(c.buffer)(y,-g.getResolution(t),y),Object(c.intersects)(d,y)||(f=null)}var m=!0;if(null!==f){var v=this.tileGrid,_=g.getResolution(t),b=v.getZForResolution(_,1),w=g.getTileCoordExtent(f);Object(c.buffer)(w,-_,w),v.forEachTileCoord(w,b,function(t){m=m&&!this.tileUrlFunction(t,r,i)}.bind(this))}var O=new u.a(h,m?s.a.EMPTY:s.a.IDLE,f,this.getSourceTiles.bind(this,r,i));return O.key=l,o?(O.interimTile=o,O.refreshInterimChain(),this.tileCache.replace(a,O)):this.tileCache.set(a,O),O},e.prototype.getTileGridForProjection=function(t){var e=t.getCode(),n=this.tileGrids_[e];if(!n){var r=this.tileGrid;n=Object(h.createForProjection)(t,void 0,r?r.getTileSize(r.getMinZoom()):void 0),this.tileGrids_[e]=n}return n},e.prototype.getTilePixelRatio=function(t){return t},e.prototype.getTilePixelSize=function(t,e,n){var r=this.getTileGridForProjection(n),i=Object(g.d)(r.getTileSize(t),this.tmpSize);return[Math.round(i[0]*e),Math.round(i[1]*e)]},e.prototype.updateCacheSize=function(e,n){t.prototype.updateCacheSize.call(this,2*e,n),this.sourceTileCache.highWaterMark=this.getTileCacheForProjection(n).highWaterMark},e}(l.a);function v(t,e){t.setLoader(function(n,r,i){Object(d.a)(e,t.getFormat(),n,r,i,t.onLoad.bind(t),t.onError.bind(t))})}e.a=m},function(t,e,n){"use strict";var r,i=n(292),o=n(117),a=n(30),s=n(76),l=n(38),u=n(6),c=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),h=function(t){function e(n){var r=t.call(this,{attributions:n.attributions,cacheSize:n.cacheSize,opaque:n.opaque,projection:n.projection,state:n.state,tileGrid:n.tileGrid,tilePixelRatio:n.tilePixelRatio,wrapX:n.wrapX,transition:n.transition,key:n.key,attributionsCollapsible:n.attributionsCollapsible,zDirection:n.zDirection})||this;return r.generateTileUrlFunction_=r.tileUrlFunction===e.prototype.tileUrlFunction,r.tileLoadFunction=n.tileLoadFunction,n.tileUrlFunction&&(r.tileUrlFunction=n.tileUrlFunction),r.urls=null,n.urls?r.setUrls(n.urls):n.url&&r.setUrl(n.url),r.tileLoadingKeys_={},r}return c(e,t),e.prototype.getTileLoadFunction=function(){return this.tileLoadFunction},e.prototype.getTileUrlFunction=function(){return Object.getPrototypeOf(this).tileUrlFunction===this.tileUrlFunction?this.tileUrlFunction.bind(this):this.tileUrlFunction},e.prototype.getUrls=function(){return this.urls},e.prototype.handleTileChange=function(t){var e,n=t.target,r=Object(u.c)(n),s=n.getState();s==a.a.LOADING?(this.tileLoadingKeys_[r]=!0,e=i.a.TILELOADSTART):r in this.tileLoadingKeys_&&(delete this.tileLoadingKeys_[r],e=s==a.a.ERROR?i.a.TILELOADERROR:s==a.a.LOADED?i.a.TILELOADEND:void 0),void 0!=e&&this.dispatchEvent(new o.a(e,n))},e.prototype.setTileLoadFunction=function(t){this.tileCache.clear(),this.tileLoadFunction=t,this.changed()},e.prototype.setTileUrlFunction=function(t,e){this.tileUrlFunction=t,this.tileCache.pruneExceptNewestZ(),"undefined"!==typeof e?this.setKey(e):this.changed()},e.prototype.setUrl=function(t){var e=Object(s.c)(t);this.urls=e,this.setUrls(e)},e.prototype.setUrls=function(t){this.urls=t;var e=t.join("\n");this.generateTileUrlFunction_?this.setTileUrlFunction(Object(s.a)(t,this.tileGrid),e):this.setKey(e)},e.prototype.tileUrlFunction=function(t,e,n){},e.prototype.useTile=function(t,e,n){var r=Object(l.e)(t,e,n);this.tileCache.containsKey(r)&&this.tileCache.get(r)},e}(o.b);e.a=h},function(t,e,n){"use strict";var r,i=n(15),o=n(118),a=n(8),s=n(153),l=n(21),u=n(37),c=n(44),h=n(45),p=n(16),f=n(10),d=n(4),g=n(1),y=n(2),m=n(22),v=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),_=function(t){function e(e){var n=this,r=e||{};return(n=t.call(this)||this).dataProjection=Object(y.get)(r.dataProjection?r.dataProjection:"EPSG:4326"),r.featureProjection&&(n.defaultFeatureProjection=Object(y.get)(r.featureProjection)),n.geometryName_=r.geometryName,n.extractGeometryName_=r.extractGeometryName,n}return v(e,t),e.prototype.readFeatureFromObject=function(t,e){var n=null,r=b((n="Feature"===t.type?t:{type:"Feature",geometry:t,properties:null}).geometry,e),o=new i.a;return this.geometryName_?o.setGeometryName(this.geometryName_):this.extractGeometryName_&&"geometry_name"in n!==void 0&&o.setGeometryName(n.geometry_name),o.setGeometry(r),"id"in n&&o.setId(n.id),n.properties&&o.setProperties(n.properties,!0),o},e.prototype.readFeaturesFromObject=function(t,e){var n=null;if("FeatureCollection"===t.type){n=[];for(var r=t.features,i=0,o=r.length;i<o;++i)n.push(this.readFeatureFromObject(r[i],e))}else n=[this.readFeatureFromObject(t,e)];return n},e.prototype.readGeometryFromObject=function(t,e){return b(t,e)},e.prototype.readProjectionFromObject=function(t){var e,n=t.crs;return n?"name"==n.type?e=Object(y.get)(n.properties.name):"EPSG"===n.type?e=Object(y.get)("EPSG:"+n.properties.code):Object(d.a)(!1,36):e=this.dataProjection,e},e.prototype.writeFeatureObject=function(t,e){e=this.adaptOptions(e);var n={type:"Feature",geometry:null,properties:null},r=t.getId();if(void 0!==r&&(n.id=r),!t.hasProperties())return n;var i=t.getProperties(),o=t.getGeometry();return o&&(n.geometry=w(o,e),delete i[t.getGeometryName()]),Object(g.d)(i)||(n.properties=i),n},e.prototype.writeFeaturesObject=function(t,e){e=this.adaptOptions(e);for(var n=[],r=0,i=t.length;r<i;++r)n.push(this.writeFeatureObject(t[r],e));return{type:"FeatureCollection",features:n}},e.prototype.writeGeometryObject=function(t,e){return w(t,this.adaptOptions(e))},e}(s.a);function b(t,e){if(!t)return null;var n;switch(t.type){case a.a.POINT:n=function(t){return new p.a(t.coordinates)}(t);break;case a.a.LINE_STRING:n=function(t){return new l.a(t.coordinates)}(t);break;case a.a.POLYGON:n=function(t){return new f.b(t.coordinates)}(t);break;case a.a.MULTI_POINT:n=function(t){return new c.a(t.coordinates)}(t);break;case a.a.MULTI_LINE_STRING:n=function(t){return new u.a(t.coordinates)}(t);break;case a.a.MULTI_POLYGON:n=function(t){return new h.a(t.coordinates)}(t);break;case a.a.GEOMETRY_COLLECTION:n=function(t,e){var n=t.geometries.map(function(t){return b(t,e)});return new o.a(n)}(t);break;default:throw new Error("Unsupported GeoJSON type: "+t.type)}return Object(m.c)(n,!1,e)}function w(t,e){var n,r=(t=Object(m.c)(t,!0,e)).getType();switch(r){case a.a.POINT:n=function(t,e){return{type:"Point",coordinates:t.getCoordinates()}}(t);break;case a.a.LINE_STRING:n=function(t,e){return{type:"LineString",coordinates:t.getCoordinates()}}(t);break;case a.a.POLYGON:n=function(t,e){var n;e&&(n=e.rightHanded);return{type:"Polygon",coordinates:t.getCoordinates(n)}}(t,e);break;case a.a.MULTI_POINT:n=function(t,e){return{type:"MultiPoint",coordinates:t.getCoordinates()}}(t);break;case a.a.MULTI_LINE_STRING:n=function(t,e){return{type:"MultiLineString",coordinates:t.getCoordinates()}}(t);break;case a.a.MULTI_POLYGON:n=function(t,e){var n;e&&(n=e.rightHanded);return{type:"MultiPolygon",coordinates:t.getCoordinates(n)}}(t,e);break;case a.a.GEOMETRY_COLLECTION:n=function(t,e){return{type:"GeometryCollection",geometries:t.getGeometriesArray().map(function(t){var n=Object(g.a)({},e);return delete n.featureProjection,w(t,n)})}}(t,e);break;case a.a.CIRCLE:n={type:"GeometryCollection",geometries:[]};break;default:throw new Error("Unsupported geometry type: "+r)}return n}e.a=_},function(t,e,n){"use strict";var r,i=n(22),o=n(74),a=n(6),s=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),l=function(t){function e(){return t.call(this)||this}return s(e,t),e.prototype.getType=function(){return o.a.JSON},e.prototype.readFeature=function(t,e){return this.readFeatureFromObject(u(t),this.getReadOptions(t,e))},e.prototype.readFeatures=function(t,e){return this.readFeaturesFromObject(u(t),this.getReadOptions(t,e))},e.prototype.readFeatureFromObject=function(t,e){return Object(a.b)()},e.prototype.readFeaturesFromObject=function(t,e){return Object(a.b)()},e.prototype.readGeometry=function(t,e){return this.readGeometryFromObject(u(t),this.getReadOptions(t,e))},e.prototype.readGeometryFromObject=function(t,e){return Object(a.b)()},e.prototype.readProjection=function(t){return this.readProjectionFromObject(u(t))},e.prototype.readProjectionFromObject=function(t){return Object(a.b)()},e.prototype.writeFeature=function(t,e){return JSON.stringify(this.writeFeatureObject(t,e))},e.prototype.writeFeatureObject=function(t,e){return Object(a.b)()},e.prototype.writeFeatures=function(t,e){return JSON.stringify(this.writeFeaturesObject(t,e))},e.prototype.writeFeaturesObject=function(t,e){return Object(a.b)()},e.prototype.writeGeometry=function(t,e){return JSON.stringify(this.writeGeometryObject(t,e))},e.prototype.writeGeometryObject=function(t,e){return Object(a.b)()},e}(i.a);function u(t){if("string"===typeof t){var e=JSON.parse(t);return e||null}return null!==t?t:null}e.a=l},function(t,e,n){"use strict";var r,i=n(183),o=n(134),a=n(1),s=n(29),l=n(91),u=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),c=function(t){function e(e){return(e=Object(a.a)({},e)).controls||(e.controls=Object(s.defaults)()),e.interactions||(e.interactions=Object(l.defaults)({onFocusOnly:!0})),t.call(this,e)||this}return u(e,t),e.prototype.createRenderer=function(){return new i.a(this)},e}(o.a);e.a=c},function(t,e,n){"use strict";e.a={ACTIVE:"active"}},function(t,e,n){"use strict";var r=function(){function t(t,e,n){this.decay_=t,this.minVelocity_=e,this.delay_=n,this.points_=[],this.angle_=0,this.initialVelocity_=0}return t.prototype.begin=function(){this.points_.length=0,this.angle_=0,this.initialVelocity_=0},t.prototype.update=function(t,e){this.points_.push(t,e,Date.now())},t.prototype.end=function(){if(this.points_.length<6)return!1;var t=Date.now()-this.delay_,e=this.points_.length-3;if(this.points_[e+2]<t)return!1;for(var n=e-3;n>0&&this.points_[n+2]>t;)n-=3;var r=this.points_[e+2]-this.points_[n+2];if(r<1e3/60)return!1;var i=this.points_[e]-this.points_[n],o=this.points_[e+1]-this.points_[n+1];return this.angle_=Math.atan2(o,i),this.initialVelocity_=Math.sqrt(i*i+o*o)/r,this.initialVelocity_>this.minVelocity_},t.prototype.getDistance=function(){return(this.minVelocity_-this.initialVelocity_)/this.decay_},t.prototype.getAngle=function(){return this.angle_},t}();e.a=r},function(t,e,n){"use strict";var r,i=n(75),o=n(30),a=n(11),s=n(63),l=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),u=function(t){function e(e,n,r,i,o,a){var s=t.call(this,e,n,a)||this;return s.crossOrigin_=i,s.src_=r,s.key=r,s.image_=new Image,null!==i&&(s.image_.crossOrigin=i),s.unlisten_=null,s.tileLoadFunction_=o,s}return l(e,t),e.prototype.getImage=function(){return this.image_},e.prototype.setImage=function(t){this.image_=t,this.state=o.a.LOADED,this.unlistenImage_(),this.changed()},e.prototype.handleImageError_=function(){var t;this.state=o.a.ERROR,this.unlistenImage_(),this.image_=((t=Object(a.a)(1,1)).fillStyle="rgba(0,0,0,0)",t.fillRect(0,0,1,1),t.canvas),this.changed()},e.prototype.handleImageLoad_=function(){var t=this.image_;t.naturalWidth&&t.naturalHeight?this.state=o.a.LOADED:this.state=o.a.EMPTY,this.unlistenImage_(),this.changed()},e.prototype.load=function(){this.state==o.a.ERROR&&(this.state=o.a.IDLE,this.image_=new Image,null!==this.crossOrigin_&&(this.image_.crossOrigin=this.crossOrigin_)),this.state==o.a.IDLE&&(this.state=o.a.LOADING,this.changed(),this.tileLoadFunction_(this,this.src_),this.unlisten_=Object(s.b)(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this)))},e.prototype.unlistenImage_=function(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)},e}(i.a);e.a=u},function(t,e,n){"use strict";e.a=function(t,e,n,i){var o=document.createElement("script"),a="olc_"+Object(r.c)(e);function s(){delete window[a],o.parentNode.removeChild(o)}o.async=!0,o.src=t+(-1==t.indexOf("?")?"?":"&")+(i||"callback")+"="+a;var l=setTimeout(function(){s(),n&&n()},1e4);window[a]=function(t){clearTimeout(l),s(),e(t)},document.getElementsByTagName("head")[0].appendChild(o)};var r=n(6)},function(t,e){function n(t){"@babel/helpers - typeof";return(n="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var r;r=function(){return this}();try{r=r||Function("return this")()||(0,eval)("this")}catch(t){"object"===("undefined"===typeof window?"undefined":n(window))&&(r=window)}t.exports=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(335);n.d(e,"EsriJSON",function(){return r.a});var i=n(152);n.d(e,"GeoJSON",function(){return i.a});var o=n(336);n.d(e,"GML",function(){return o.a});var a=n(337);n.d(e,"GPX",function(){return a.a});var s=n(338);n.d(e,"IGC",function(){return s.a});var l=n(232);n.d(e,"IIIFInfo",function(){return l.b});var u=n(339);n.d(e,"KML",function(){return u.a});var c=n(147);n.d(e,"MVT",function(){return c.a});var h=n(235);n.d(e,"OWS",function(){return h.a});var p=n(340);n.d(e,"Polyline",function(){return p.a});var f=n(342);n.d(e,"TopoJSON",function(){return f.a});var d=n(343);n.d(e,"WFS",function(){return d.a});var g=n(366);n.d(e,"WKT",function(){return g.a});var y=n(367);n.d(e,"WMSCapabilities",function(){return y.a});var m=n(368);n.d(e,"WMSGetFeatureInfo",function(){return m.a});var v=n(369);n.d(e,"WMTSCapabilities",function(){return v.a})},function(t,e,n){"use strict";var r,i=n(121),o=n(122),a=n(17),s=n(21),l=n(37),u=n(45),c=n(10),h=n(27),p=n(1),f=n(0),d=n(5),g=n(2),y=n(53),m=n(22),v=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),_=o.a+" http://schemas.opengis.net/gml/3.1.1/profiles/gmlsfProfile/1.0.0/gmlsf.xsd",b={MultiLineString:"lineStringMember",MultiCurve:"curveMember",MultiPolygon:"polygonMember",MultiSurface:"surfaceMember"},w=function(t){function e(e){var n=this,r=e||{};return(n=t.call(this,r)||this).surface_=void 0!==r.surface&&r.surface,n.curve_=void 0!==r.curve&&r.curve,n.multiCurve_=void 0===r.multiCurve||r.multiCurve,n.multiSurface_=void 0===r.multiSurface||r.multiSurface,n.schemaLocation=r.schemaLocation?r.schemaLocation:_,n.hasZ=void 0!==r.hasZ&&r.hasZ,n}return v(e,t),e.prototype.readMultiCurve=function(t,e){var n=Object(h.u)([],this.MULTICURVE_PARSERS,t,e,this);return n?new l.a(n):void 0},e.prototype.readMultiSurface=function(t,e){var n=Object(h.u)([],this.MULTISURFACE_PARSERS,t,e,this);if(n)return new u.a(n)},e.prototype.curveMemberParser=function(t,e){Object(h.t)(this.CURVEMEMBER_PARSERS,t,e,this)},e.prototype.surfaceMemberParser=function(t,e){Object(h.t)(this.SURFACEMEMBER_PARSERS,t,e,this)},e.prototype.readPatch=function(t,e){return Object(h.u)([null],this.PATCHES_PARSERS,t,e,this)},e.prototype.readSegment=function(t,e){return Object(h.u)([null],this.SEGMENTS_PARSERS,t,e,this)},e.prototype.readPolygonPatch=function(t,e){return Object(h.u)([null],this.FLAT_LINEAR_RINGS_PARSERS,t,e,this)},e.prototype.readLineStringSegment=function(t,e){return Object(h.u)([null],this.GEOMETRY_FLAT_COORDINATES_PARSERS,t,e,this)},e.prototype.interiorParser=function(t,e){var n=Object(h.u)(void 0,this.RING_PARSERS,t,e,this);n&&e[e.length-1].push(n)},e.prototype.exteriorParser=function(t,e){var n=Object(h.u)(void 0,this.RING_PARSERS,t,e,this);n&&(e[e.length-1][0]=n)},e.prototype.readSurface=function(t,e){var n=Object(h.u)([null],this.SURFACE_PARSERS,t,e,this);if(n&&n[0]){var r,i=n[0],o=[i.length],s=void 0;for(s=1,r=n.length;s<r;++s)Object(d.c)(i,n[s]),o.push(i.length);return new c.b(i,a.a.XYZ,o)}},e.prototype.readCurve=function(t,e){var n=Object(h.u)([null],this.CURVE_PARSERS,t,e,this);return n?new s.a(n,a.a.XYZ):void 0},e.prototype.readEnvelope=function(t,e){var n=Object(h.u)([null],this.ENVELOPE_PARSERS,t,e,this);return Object(f.createOrUpdate)(n[1][0],n[1][1],n[2][0],n[2][1])},e.prototype.readFlatPos=function(t,e){for(var n,r=Object(h.d)(t,!1),i=/^\s*([+\-]?\d*\.?\d+(?:[eE][+\-]?\d+)?)\s*/,o=[];n=i.exec(r);)o.push(parseFloat(n[1])),r=r.substr(n[0].length);if(""===r){var a=e[0].srsName,s="enu";if(a)s=Object(g.get)(a).getAxisOrientation();if("neu"===s){var l,u=void 0;for(u=0,l=o.length;u<l;u+=3){var c=o[u],p=o[u+1];o[u]=p,o[u+1]=c}}var f=o.length;if(2==f&&o.push(0),0!==f)return o}},e.prototype.readFlatPosList=function(t,e){var n=Object(h.d)(t,!1).replace(/^\s*|\s*$/g,""),r=e[0],i=r.srsName,o=r.srsDimension,a="enu";i&&(a=Object(g.get)(i).getAxisOrientation());var s,l,u,c=n.split(/\s+/),p=2;t.getAttribute("srsDimension")?p=Object(y.g)(t.getAttribute("srsDimension")):t.getAttribute("dimension")?p=Object(y.g)(t.getAttribute("dimension")):t.parentNode.getAttribute("srsDimension")?p=Object(y.g)(t.parentNode.getAttribute("srsDimension")):o&&(p=Object(y.g)(o));for(var f=[],d=0,m=c.length;d<m;d+=p)s=parseFloat(c[d]),l=parseFloat(c[d+1]),u=3===p?parseFloat(c[d+2]):0,"en"===a.substr(0,2)?f.push(s,l,u):f.push(l,s,u);return f},e.prototype.writePos_=function(t,e,n){var r=n[n.length-1],i=r.hasZ,o=i?"3":"2";t.setAttribute("srsDimension",o);var a=r.srsName,s="enu";a&&(s=Object(g.get)(a).getAxisOrientation());var l,u=e.getCoordinates();(l="en"===s.substr(0,2)?u[0]+" "+u[1]:u[1]+" "+u[0],i)&&(l+=" "+(u[2]||0));Object(y.n)(t,l)},e.prototype.getCoords_=function(t,e,n){var r="enu";e&&(r=Object(g.get)(e).getAxisOrientation());var i="en"===r.substr(0,2)?t[0]+" "+t[1]:t[1]+" "+t[0];n&&(i+=" "+(t[2]||0));return i},e.prototype.writePosList_=function(t,e,n){var r=n[n.length-1],i=r.hasZ,o=i?"3":"2";t.setAttribute("srsDimension",o);for(var a,s=r.srsName,l=e.getCoordinates(),u=l.length,c=new Array(u),h=0;h<u;++h)a=l[h],c[h]=this.getCoords_(a,s,i);Object(y.n)(t,c.join(" "))},e.prototype.writePoint=function(t,e,n){var r=n[n.length-1].srsName;r&&t.setAttribute("srsName",r);var i=Object(h.c)(t.namespaceURI,"pos");t.appendChild(i),this.writePos_(i,e,n)},e.prototype.writeEnvelope=function(t,e,n){var r=n[n.length-1].srsName;r&&t.setAttribute("srsName",r);var i=[e[0]+" "+e[1],e[2]+" "+e[3]];Object(h.v)({node:t},this.ENVELOPE_SERIALIZERS,h.a,i,n,["lowerCorner","upperCorner"],this)},e.prototype.writeLinearRing=function(t,e,n){var r=n[n.length-1].srsName;r&&t.setAttribute("srsName",r);var i=Object(h.c)(t.namespaceURI,"posList");t.appendChild(i),this.writePosList_(i,e,n)},e.prototype.RING_NODE_FACTORY_=function(t,e,n){var r=e[e.length-1],i=r.node,o=r.exteriorWritten;return void 0===o&&(r.exteriorWritten=!0),Object(h.c)(i.namespaceURI,void 0!==o?"interior":"exterior")},e.prototype.writeSurfaceOrPolygon=function(t,e,n){var r=n[n.length-1],i=r.hasZ,o=r.srsName;if("PolygonPatch"!==t.nodeName&&o&&t.setAttribute("srsName",o),"Polygon"===t.nodeName||"PolygonPatch"===t.nodeName){var a=e.getLinearRings();Object(h.v)({node:t,hasZ:i,srsName:o},this.RING_SERIALIZERS,this.RING_NODE_FACTORY_,a,n,void 0,this)}else if("Surface"===t.nodeName){var s=Object(h.c)(t.namespaceURI,"patches");t.appendChild(s),this.writeSurfacePatches_(s,e,n)}},e.prototype.writeCurveOrLineString=function(t,e,n){var r=n[n.length-1].srsName;if("LineStringSegment"!==t.nodeName&&r&&t.setAttribute("srsName",r),"LineString"===t.nodeName||"LineStringSegment"===t.nodeName){var i=Object(h.c)(t.namespaceURI,"posList");t.appendChild(i),this.writePosList_(i,e,n)}else if("Curve"===t.nodeName){var o=Object(h.c)(t.namespaceURI,"segments");t.appendChild(o),this.writeCurveSegments_(o,e,n)}},e.prototype.writeMultiSurfaceOrPolygon=function(t,e,n){var r=n[n.length-1],i=r.hasZ,o=r.srsName,a=r.surface;o&&t.setAttribute("srsName",o);var s=e.getPolygons();Object(h.v)({node:t,hasZ:i,srsName:o,surface:a},this.SURFACEORPOLYGONMEMBER_SERIALIZERS,this.MULTIGEOMETRY_MEMBER_NODE_FACTORY_,s,n,void 0,this)},e.prototype.writeMultiPoint=function(t,e,n){var r=n[n.length-1],i=r.srsName,o=r.hasZ;i&&t.setAttribute("srsName",i);var a=e.getPoints();Object(h.v)({node:t,hasZ:o,srsName:i},this.POINTMEMBER_SERIALIZERS,Object(h.q)("pointMember"),a,n,void 0,this)},e.prototype.writeMultiCurveOrLineString=function(t,e,n){var r=n[n.length-1],i=r.hasZ,o=r.srsName,a=r.curve;o&&t.setAttribute("srsName",o);var s=e.getLineStrings();Object(h.v)({node:t,hasZ:i,srsName:o,curve:a},this.LINESTRINGORCURVEMEMBER_SERIALIZERS,this.MULTIGEOMETRY_MEMBER_NODE_FACTORY_,s,n,void 0,this)},e.prototype.writeRing=function(t,e,n){var r=Object(h.c)(t.namespaceURI,"LinearRing");t.appendChild(r),this.writeLinearRing(r,e,n)},e.prototype.writeSurfaceOrPolygonMember=function(t,e,n){var r=this.GEOMETRY_NODE_FACTORY_(e,n);r&&(t.appendChild(r),this.writeSurfaceOrPolygon(r,e,n))},e.prototype.writePointMember=function(t,e,n){var r=Object(h.c)(t.namespaceURI,"Point");t.appendChild(r),this.writePoint(r,e,n)},e.prototype.writeLineStringOrCurveMember=function(t,e,n){var r=this.GEOMETRY_NODE_FACTORY_(e,n);r&&(t.appendChild(r),this.writeCurveOrLineString(r,e,n))},e.prototype.writeSurfacePatches_=function(t,e,n){var r=Object(h.c)(t.namespaceURI,"PolygonPatch");t.appendChild(r),this.writeSurfaceOrPolygon(r,e,n)},e.prototype.writeCurveSegments_=function(t,e,n){var r=Object(h.c)(t.namespaceURI,"LineStringSegment");t.appendChild(r),this.writeCurveOrLineString(r,e,n)},e.prototype.writeGeometryElement=function(t,e,n){var r,i=n[n.length-1],o=Object(p.a)({},i);o.node=t,r=Array.isArray(e)?Object(m.b)(e,i):Object(m.c)(e,!0,i),Object(h.v)(o,this.GEOMETRY_SERIALIZERS,this.GEOMETRY_NODE_FACTORY_,[r],n,void 0,this)},e.prototype.writeFeatureElement=function(t,e,n){var r=e.getId();r&&t.setAttribute("fid",r);var i=n[n.length-1],o=i.featureNS,a=e.getGeometryName();i.serializers||(i.serializers={},i.serializers[o]={});var s=[],l=[];if(e.hasProperties()){var u=e.getProperties();for(var c in u){var f=u[c];null!==f&&(s.push(c),l.push(f),c==a||"function"===typeof f.getSimplifiedGeometry?c in i.serializers[o]||(i.serializers[o][c]=Object(h.l)(this.writeGeometryElement,this)):c in i.serializers[o]||(i.serializers[o][c]=Object(h.l)(y.n)))}}var d=Object(p.a)({},i);d.node=t,Object(h.v)(d,i.serializers,Object(h.q)(void 0,o),l,n,s)},e.prototype.writeFeatureMembers_=function(t,e,n){var r=n[n.length-1],i=r.featureType,o=r.featureNS,a={};a[o]={},a[o][i]=Object(h.l)(this.writeFeatureElement,this);var s=Object(p.a)({},r);s.node=t,Object(h.v)(s,a,Object(h.q)(i,o),e,n)},e.prototype.MULTIGEOMETRY_MEMBER_NODE_FACTORY_=function(t,e,n){var r=e[e.length-1].node;return Object(h.c)(this.namespace,b[r.nodeName])},e.prototype.GEOMETRY_NODE_FACTORY_=function(t,e,n){var r,i=e[e.length-1],o=i.multiSurface,a=i.surface,s=i.curve,l=i.multiCurve;return Array.isArray(t)?r="Envelope":"MultiPolygon"===(r=t.getType())&&!0===o?r="MultiSurface":"Polygon"===r&&!0===a?r="Surface":"LineString"===r&&!0===s?r="Curve":"MultiLineString"===r&&!0===l&&(r="MultiCurve"),Object(h.c)(this.namespace,r)},e.prototype.writeGeometryNode=function(t,e){e=this.adaptOptions(e);var n=Object(h.c)(this.namespace,"geom"),r={node:n,hasZ:this.hasZ,srsName:this.srsName,curve:this.curve_,surface:this.surface_,multiSurface:this.multiSurface_,multiCurve:this.multiCurve_};return e&&Object(p.a)(r,e),this.writeGeometryElement(n,t,[r]),n},e.prototype.writeFeaturesNode=function(t,e){e=this.adaptOptions(e);var n=Object(h.c)(this.namespace,"featureMembers");n.setAttributeNS(h.b,"xsi:schemaLocation",this.schemaLocation);var r={srsName:this.srsName,hasZ:this.hasZ,curve:this.curve_,surface:this.surface_,multiSurface:this.multiSurface_,multiCurve:this.multiCurve_,featureNS:this.featureNS,featureType:this.featureType};return e&&Object(p.a)(r,e),this.writeFeatureMembers_(n,t,[r]),n},e}(o.b);w.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS={"http://www.opengis.net/gml":{pos:Object(h.o)(w.prototype.readFlatPos),posList:Object(h.o)(w.prototype.readFlatPosList),coordinates:Object(h.o)(i.a.prototype.readFlatCoordinates)}},w.prototype.FLAT_LINEAR_RINGS_PARSERS={"http://www.opengis.net/gml":{interior:w.prototype.interiorParser,exterior:w.prototype.exteriorParser}},w.prototype.GEOMETRY_PARSERS={"http://www.opengis.net/gml":{Point:Object(h.o)(o.b.prototype.readPoint),MultiPoint:Object(h.o)(o.b.prototype.readMultiPoint),LineString:Object(h.o)(o.b.prototype.readLineString),MultiLineString:Object(h.o)(o.b.prototype.readMultiLineString),LinearRing:Object(h.o)(o.b.prototype.readLinearRing),Polygon:Object(h.o)(o.b.prototype.readPolygon),MultiPolygon:Object(h.o)(o.b.prototype.readMultiPolygon),Surface:Object(h.o)(w.prototype.readSurface),MultiSurface:Object(h.o)(w.prototype.readMultiSurface),Curve:Object(h.o)(w.prototype.readCurve),MultiCurve:Object(h.o)(w.prototype.readMultiCurve),Envelope:Object(h.o)(w.prototype.readEnvelope)}},w.prototype.MULTICURVE_PARSERS={"http://www.opengis.net/gml":{curveMember:Object(h.j)(w.prototype.curveMemberParser),curveMembers:Object(h.j)(w.prototype.curveMemberParser)}},w.prototype.MULTISURFACE_PARSERS={"http://www.opengis.net/gml":{surfaceMember:Object(h.j)(w.prototype.surfaceMemberParser),surfaceMembers:Object(h.j)(w.prototype.surfaceMemberParser)}},w.prototype.CURVEMEMBER_PARSERS={"http://www.opengis.net/gml":{LineString:Object(h.j)(o.b.prototype.readLineString),Curve:Object(h.j)(w.prototype.readCurve)}},w.prototype.SURFACEMEMBER_PARSERS={"http://www.opengis.net/gml":{Polygon:Object(h.j)(o.b.prototype.readPolygon),Surface:Object(h.j)(w.prototype.readSurface)}},w.prototype.SURFACE_PARSERS={"http://www.opengis.net/gml":{patches:Object(h.o)(w.prototype.readPatch)}},w.prototype.CURVE_PARSERS={"http://www.opengis.net/gml":{segments:Object(h.o)(w.prototype.readSegment)}},w.prototype.ENVELOPE_PARSERS={"http://www.opengis.net/gml":{lowerCorner:Object(h.j)(w.prototype.readFlatPosList),upperCorner:Object(h.j)(w.prototype.readFlatPosList)}},w.prototype.PATCHES_PARSERS={"http://www.opengis.net/gml":{PolygonPatch:Object(h.o)(w.prototype.readPolygonPatch)}},w.prototype.SEGMENTS_PARSERS={"http://www.opengis.net/gml":{LineStringSegment:Object(h.o)(w.prototype.readLineStringSegment)}},w.prototype.writeFeatures,w.prototype.RING_SERIALIZERS={"http://www.opengis.net/gml":{exterior:Object(h.l)(w.prototype.writeRing),interior:Object(h.l)(w.prototype.writeRing)}},w.prototype.ENVELOPE_SERIALIZERS={"http://www.opengis.net/gml":{lowerCorner:Object(h.l)(y.n),upperCorner:Object(h.l)(y.n)}},w.prototype.SURFACEORPOLYGONMEMBER_SERIALIZERS={"http://www.opengis.net/gml":{surfaceMember:Object(h.l)(w.prototype.writeSurfaceOrPolygonMember),polygonMember:Object(h.l)(w.prototype.writeSurfaceOrPolygonMember)}},w.prototype.POINTMEMBER_SERIALIZERS={"http://www.opengis.net/gml":{pointMember:Object(h.l)(w.prototype.writePointMember)}},w.prototype.LINESTRINGORCURVEMEMBER_SERIALIZERS={"http://www.opengis.net/gml":{lineStringMember:Object(h.l)(w.prototype.writeLineStringOrCurveMember),curveMember:Object(h.l)(w.prototype.writeLineStringOrCurveMember)}},w.prototype.GEOMETRY_SERIALIZERS={"http://www.opengis.net/gml":{Curve:Object(h.l)(w.prototype.writeCurveOrLineString),MultiCurve:Object(h.l)(w.prototype.writeMultiCurveOrLineString),Point:Object(h.l)(w.prototype.writePoint),MultiPoint:Object(h.l)(w.prototype.writeMultiPoint),LineString:Object(h.l)(w.prototype.writeCurveOrLineString),MultiLineString:Object(h.l)(w.prototype.writeMultiCurveOrLineString),LinearRing:Object(h.l)(w.prototype.writeLinearRing),Polygon:Object(h.l)(w.prototype.writeSurfaceOrPolygon),MultiPolygon:Object(h.l)(w.prototype.writeMultiSurfaceOrPolygon),Surface:Object(h.l)(w.prototype.writeSurfaceOrPolygon),MultiSurface:Object(h.l)(w.prototype.writeMultiSurfaceOrPolygon),Envelope:Object(h.l)(w.prototype.writeEnvelope)}},e.a=w},function(t,e,n){"use strict";var r,i=n(22),o=n(74),a=n(6),s=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),l=function(t){function e(){return t.call(this)||this}return s(e,t),e.prototype.getType=function(){return o.a.TEXT},e.prototype.readFeature=function(t,e){return this.readFeatureFromText(u(t),this.adaptOptions(e))},e.prototype.readFeatureFromText=function(t,e){return Object(a.b)()},e.prototype.readFeatures=function(t,e){return this.readFeaturesFromText(u(t),this.adaptOptions(e))},e.prototype.readFeaturesFromText=function(t,e){return Object(a.b)()},e.prototype.readGeometry=function(t,e){return this.readGeometryFromText(u(t),this.adaptOptions(e))},e.prototype.readGeometryFromText=function(t,e){return Object(a.b)()},e.prototype.readProjection=function(t){return this.readProjectionFromText(u(t))},e.prototype.readProjectionFromText=function(t){return this.dataProjection},e.prototype.writeFeature=function(t,e){return this.writeFeatureText(t,this.adaptOptions(e))},e.prototype.writeFeatureText=function(t,e){return Object(a.b)()},e.prototype.writeFeatures=function(t,e){return this.writeFeaturesText(t,this.adaptOptions(e))},e.prototype.writeFeaturesText=function(t,e){return Object(a.b)()},e.prototype.writeGeometry=function(t,e){return this.writeGeometryText(t,this.adaptOptions(e))},e.prototype.writeGeometryText=function(t,e){return Object(a.b)()},e}(i.a);function u(t){return"string"===typeof t?t:""}e.a=l},function(t,e,n){"use strict";var r=n(27),i=function(){function t(){}return t.prototype.read=function(t){if(t){if("string"===typeof t){var e=Object(r.s)(t);return this.readFromDocument(e)}return Object(r.h)(t)?this.readFromDocument(t):this.readFromNode(t)}return null},t.prototype.readFromDocument=function(t){for(var e=t.firstChild;e;e=e.nextSibling)if(e.nodeType==Node.ELEMENT_NODE)return this.readFromNode(e);return null},t.prototype.readFromNode=function(t){},t}();e.a=i},function(t,e,n){"use strict";e.a=function(t){return t.getAttributeNS(r,"href")};var r="http://www.w3.org/1999/xlink"},function(t,e,n){"use strict";var r=n(166);n.n(r);e.a=function(){for(var t=new r.GeoJSONReader,e=t.read(JSON.stringify(arguments[0].geometry)),n=1;n<arguments.length;n++)e=r.UnionOp.union(e,t.read(JSON.stringify(arguments[n].geometry)));return{type:"Feature",geometry:e=(new r.GeoJSONWriter).write(e),properties:arguments[0].properties}}},function(t,e,n){var r,i,o,a;function s(t){"@babel/helpers - typeof";return(s="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}a=function(t){"use strict";function e(){}function n(t){this.message=t||""}function r(t){this.message=t||""}function i(t){this.message=t||""}function o(){}function a(t){return null===t?Mt:t.color}function s(t){return null===t?null:t.parent}function l(t,e){null!==t&&(t.color=e)}function u(t){return null===t?null:t.left}function c(t){return null===t?null:t.right}function h(){this.root_=null,this.size_=0}function p(){}function f(){this.array_=[],arguments[0]instanceof bt&&this.addAll(arguments[0])}function d(){}function g(t){this.message=t||""}function y(){this.array_=[]}"fill"in Array.prototype||Object.defineProperty(Array.prototype,"fill",{configurable:!0,value:function(t){if(void 0===this||null===this)throw new TypeError(this+" is not an object");var e=Object(this),n=Math.max(Math.min(e.length,9007199254740991),0)||0,r=1 in arguments&&parseInt(Number(arguments[1]),10)||0;r=r<0?Math.max(n+r,0):Math.min(r,n);var i=2 in arguments&&void 0!==arguments[2]?parseInt(Number(arguments[2]),10)||0:n;for(i=i<0?Math.max(n+arguments[2],0):Math.min(i,n);r<i;)e[r]=t,++r;return e},writable:!0}),Number.isFinite=Number.isFinite||function(t){return"number"==typeof t&&isFinite(t)},Number.isInteger=Number.isInteger||function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t},Number.parseFloat=Number.parseFloat||parseFloat,Number.isNaN=Number.isNaN||function(t){return t!=t},Math.trunc=Math.trunc||function(t){return t<0?Math.ceil(t):Math.floor(t)};var m=function(){};m.prototype.interfaces_=function(){return[]},m.prototype.getClass=function(){return m},m.prototype.equalsWithTolerance=function(t,e,n){return Math.abs(t-e)<=n};var v=function(t){function e(e){t.call(this,e),this.name="IllegalArgumentException",this.message=e,this.stack=(new t).stack}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Error),_=function(){},b={MAX_VALUE:{configurable:!0}};_.isNaN=function(t){return Number.isNaN(t)},_.doubleToLongBits=function(t){return t},_.longBitsToDouble=function(t){return t},_.isInfinite=function(t){return!Number.isFinite(t)},b.MAX_VALUE.get=function(){return Number.MAX_VALUE},Object.defineProperties(_,b);var w=function(){},O=function(){},x=function(){},E=function t(){if(this.x=null,this.y=null,this.z=null,0===arguments.length)this.x=0,this.y=0,this.z=t.NULL_ORDINATE;else if(1===arguments.length){var e=arguments[0];this.x=e.x,this.y=e.y,this.z=e.z}else 2===arguments.length?(this.x=arguments[0],this.y=arguments[1],this.z=t.NULL_ORDINATE):3===arguments.length&&(this.x=arguments[0],this.y=arguments[1],this.z=arguments[2])},S={DimensionalComparator:{configurable:!0},serialVersionUID:{configurable:!0},NULL_ORDINATE:{configurable:!0},X:{configurable:!0},Y:{configurable:!0},Z:{configurable:!0}};E.prototype.setOrdinate=function(t,e){switch(t){case E.X:this.x=e;break;case E.Y:this.y=e;break;case E.Z:this.z=e;break;default:throw new v("Invalid ordinate index: "+t)}},E.prototype.equals2D=function(){if(1===arguments.length){var t=arguments[0];return this.x===t.x&&this.y===t.y}if(2===arguments.length){var e=arguments[0],n=arguments[1];return!!m.equalsWithTolerance(this.x,e.x,n)&&!!m.equalsWithTolerance(this.y,e.y,n)}},E.prototype.getOrdinate=function(t){switch(t){case E.X:return this.x;case E.Y:return this.y;case E.Z:return this.z}throw new v("Invalid ordinate index: "+t)},E.prototype.equals3D=function(t){return this.x===t.x&&this.y===t.y&&(this.z===t.z||_.isNaN(this.z))&&_.isNaN(t.z)},E.prototype.equals=function(t){return t instanceof E&&this.equals2D(t)},E.prototype.equalInZ=function(t,e){return m.equalsWithTolerance(this.z,t.z,e)},E.prototype.compareTo=function(t){var e=t;return this.x<e.x?-1:this.x>e.x?1:this.y<e.y?-1:this.y>e.y?1:0},E.prototype.clone=function(){},E.prototype.copy=function(){return new E(this)},E.prototype.toString=function(){return"("+this.x+", "+this.y+", "+this.z+")"},E.prototype.distance3D=function(t){var e=this.x-t.x,n=this.y-t.y,r=this.z-t.z;return Math.sqrt(e*e+n*n+r*r)},E.prototype.distance=function(t){var e=this.x-t.x,n=this.y-t.y;return Math.sqrt(e*e+n*n)},E.prototype.hashCode=function(){var t=17;return 37*(t=37*t+E.hashCode(this.x))+E.hashCode(this.y)},E.prototype.setCoordinate=function(t){this.x=t.x,this.y=t.y,this.z=t.z},E.prototype.interfaces_=function(){return[w,O,e]},E.prototype.getClass=function(){return E},E.hashCode=function(){if(1===arguments.length){var t=arguments[0],e=_.doubleToLongBits(t);return Math.trunc((e^e)>>>32)}},S.DimensionalComparator.get=function(){return C},S.serialVersionUID.get=function(){return 0x5cbf2c235c7e5800},S.NULL_ORDINATE.get=function(){return _.NaN},S.X.get=function(){return 0},S.Y.get=function(){return 1},S.Z.get=function(){return 2},Object.defineProperties(E,S);var C=function(t){if(this._dimensionsToTest=2,0===arguments.length);else if(1===arguments.length){var e=arguments[0];if(2!==e&&3!==e)throw new v("only 2 or 3 dimensions may be specified");this._dimensionsToTest=e}};C.prototype.compare=function(t,e){var n=t,r=e,i=C.compare(n.x,r.x);if(0!==i)return i;var o=C.compare(n.y,r.y);return 0!==o?o:this._dimensionsToTest<=2?0:C.compare(n.z,r.z)},C.prototype.interfaces_=function(){return[x]},C.prototype.getClass=function(){return C},C.compare=function(t,e){return t<e?-1:t>e?1:_.isNaN(t)?_.isNaN(e)?0:-1:_.isNaN(e)?1:0};var T=function(){};T.prototype.create=function(){},T.prototype.interfaces_=function(){return[]},T.prototype.getClass=function(){return T};var I=function(){},j={INTERIOR:{configurable:!0},BOUNDARY:{configurable:!0},EXTERIOR:{configurable:!0},NONE:{configurable:!0}};I.prototype.interfaces_=function(){return[]},I.prototype.getClass=function(){return I},I.toLocationSymbol=function(t){switch(t){case I.EXTERIOR:return"e";case I.BOUNDARY:return"b";case I.INTERIOR:return"i";case I.NONE:return"-"}throw new v("Unknown location value: "+t)},j.INTERIOR.get=function(){return 0},j.BOUNDARY.get=function(){return 1},j.EXTERIOR.get=function(){return 2},j.NONE.get=function(){return-1},Object.defineProperties(I,j);var L=function(t,e){return t.interfaces_&&t.interfaces_().indexOf(e)>-1},R=function(){},P={LOG_10:{configurable:!0}};R.prototype.interfaces_=function(){return[]},R.prototype.getClass=function(){return R},R.log10=function(t){var e=Math.log(t);return _.isInfinite(e)?e:_.isNaN(e)?e:e/R.LOG_10},R.min=function(t,e,n,r){var i=t;return e<i&&(i=e),n<i&&(i=n),r<i&&(i=r),i},R.clamp=function(){if("number"==typeof arguments[2]&&"number"==typeof arguments[0]&&"number"==typeof arguments[1]){var t=arguments[0],e=arguments[1],n=arguments[2];return t<e?e:t>n?n:t}if(Number.isInteger(arguments[2])&&Number.isInteger(arguments[0])&&Number.isInteger(arguments[1])){var r=arguments[0],i=arguments[1],o=arguments[2];return r<i?i:r>o?o:r}},R.wrap=function(t,e){return t<0?e- -t%e:t%e},R.max=function(){if(3===arguments.length){var t=arguments[0],e=arguments[1],n=arguments[2],r=t;return e>r&&(r=e),n>r&&(r=n),r}if(4===arguments.length){var i=arguments[0],o=arguments[1],a=arguments[2],s=arguments[3],l=i;return o>l&&(l=o),a>l&&(l=a),s>l&&(l=s),l}},R.average=function(t,e){return(t+e)/2},P.LOG_10.get=function(){return Math.log(10)},Object.defineProperties(R,P);var N=function(t){this.str=t};N.prototype.append=function(t){this.str+=t},N.prototype.setCharAt=function(t,e){this.str=this.str.substr(0,t)+e+this.str.substr(t+1)},N.prototype.toString=function(t){return this.str};var M=function(t){this.value=t};M.prototype.intValue=function(){return this.value},M.prototype.compareTo=function(t){return this.value<t?-1:this.value>t?1:0},M.isNaN=function(t){return Number.isNaN(t)};var A=function(){};A.isWhitespace=function(t){return t<=32&&t>=0||127===t},A.toUpperCase=function(t){return t.toUpperCase()};var k=function t(){if(this._hi=0,this._lo=0,0===arguments.length)this.init(0);else if(1===arguments.length){if("number"==typeof arguments[0]){var e=arguments[0];this.init(e)}else if(arguments[0]instanceof t){var n=arguments[0];this.init(n)}else if("string"==typeof arguments[0]){var r=arguments[0];t.call(this,t.parse(r))}}else if(2===arguments.length){var i=arguments[0],o=arguments[1];this.init(i,o)}},F={PI:{configurable:!0},TWO_PI:{configurable:!0},PI_2:{configurable:!0},E:{configurable:!0},NaN:{configurable:!0},EPS:{configurable:!0},SPLIT:{configurable:!0},MAX_PRINT_DIGITS:{configurable:!0},TEN:{configurable:!0},ONE:{configurable:!0},SCI_NOT_EXPONENT_CHAR:{configurable:!0},SCI_NOT_ZERO:{configurable:!0}};k.prototype.le=function(t){return(this._hi<t._hi||this._hi===t._hi)&&this._lo<=t._lo},k.prototype.extractSignificantDigits=function(t,e){var n=this.abs(),r=k.magnitude(n._hi),i=k.TEN.pow(r);(n=n.divide(i)).gt(k.TEN)?(n=n.divide(k.TEN),r+=1):n.lt(k.ONE)&&(n=n.multiply(k.TEN),r-=1);for(var o=r+1,a=new N,s=k.MAX_PRINT_DIGITS-1,l=0;l<=s;l++){t&&l===o&&a.append(".");var u=Math.trunc(n._hi);if(u<0)break;var c=!1,h=0;u>9?(c=!0,h="9"):h="0"+u,a.append(h),n=n.subtract(k.valueOf(u)).multiply(k.TEN),c&&n.selfAdd(k.TEN);var p=!0,f=k.magnitude(n._hi);if(f<0&&Math.abs(f)>=s-l&&(p=!1),!p)break}return e[0]=r,a.toString()},k.prototype.sqr=function(){return this.multiply(this)},k.prototype.doubleValue=function(){return this._hi+this._lo},k.prototype.subtract=function(){if(arguments[0]instanceof k){var t=arguments[0];return this.add(t.negate())}if("number"==typeof arguments[0]){var e=arguments[0];return this.add(-e)}},k.prototype.equals=function(){if(1===arguments.length){var t=arguments[0];return this._hi===t._hi&&this._lo===t._lo}},k.prototype.isZero=function(){return 0===this._hi&&0===this._lo},k.prototype.selfSubtract=function(){if(arguments[0]instanceof k){var t=arguments[0];return this.isNaN()?this:this.selfAdd(-t._hi,-t._lo)}if("number"==typeof arguments[0]){var e=arguments[0];return this.isNaN()?this:this.selfAdd(-e,0)}},k.prototype.getSpecialNumberString=function(){return this.isZero()?"0.0":this.isNaN()?"NaN ":null},k.prototype.min=function(t){return this.le(t)?this:t},k.prototype.selfDivide=function(){if(1===arguments.length){if(arguments[0]instanceof k){var t=arguments[0];return this.selfDivide(t._hi,t._lo)}if("number"==typeof arguments[0]){var e=arguments[0];return this.selfDivide(e,0)}}else if(2===arguments.length){var n,r,i,o,a=arguments[0],s=arguments[1],l=null,u=null,c=null,h=null;return i=this._hi/a,h=(l=(c=k.SPLIT*i)-(l=c-i))*(u=(h=k.SPLIT*a)-(u=h-a))-(o=i*a)+l*(r=a-u)+(n=i-l)*u+n*r,h=i+(c=(this._hi-o-h+this._lo-i*s)/a),this._hi=h,this._lo=i-h+c,this}},k.prototype.dump=function(){return"DD<"+this._hi+", "+this._lo+">"},k.prototype.divide=function(){if(arguments[0]instanceof k){var t,e,n,r,i=arguments[0],o=null,a=null,s=null,l=null;return t=(n=this._hi/i._hi)-(o=(s=k.SPLIT*n)-(o=s-n)),l=o*(a=(l=k.SPLIT*i._hi)-(a=l-i._hi))-(r=n*i._hi)+o*(e=i._hi-a)+t*a+t*e,s=(this._hi-r-l+this._lo-n*i._lo)/i._hi,new k(l=n+s,n-l+s)}if("number"==typeof arguments[0]){var u=arguments[0];return _.isNaN(u)?k.createNaN():k.copy(this).selfDivide(u,0)}},k.prototype.ge=function(t){return(this._hi>t._hi||this._hi===t._hi)&&this._lo>=t._lo},k.prototype.pow=function(t){if(0===t)return k.valueOf(1);var e=new k(this),n=k.valueOf(1),r=Math.abs(t);if(r>1)for(;r>0;)r%2==1&&n.selfMultiply(e),(r/=2)>0&&(e=e.sqr());else n=e;return t<0?n.reciprocal():n},k.prototype.ceil=function(){if(this.isNaN())return k.NaN;var t=Math.ceil(this._hi),e=0;return t===this._hi&&(e=Math.ceil(this._lo)),new k(t,e)},k.prototype.compareTo=function(t){var e=t;return this._hi<e._hi?-1:this._hi>e._hi?1:this._lo<e._lo?-1:this._lo>e._lo?1:0},k.prototype.rint=function(){return this.isNaN()?this:this.add(.5).floor()},k.prototype.setValue=function(){if(arguments[0]instanceof k){var t=arguments[0];return this.init(t),this}if("number"==typeof arguments[0]){var e=arguments[0];return this.init(e),this}},k.prototype.max=function(t){return this.ge(t)?this:t},k.prototype.sqrt=function(){if(this.isZero())return k.valueOf(0);if(this.isNegative())return k.NaN;var t=1/Math.sqrt(this._hi),e=this._hi*t,n=k.valueOf(e),r=this.subtract(n.sqr())._hi*(.5*t);return n.add(r)},k.prototype.selfAdd=function(){if(1===arguments.length){if(arguments[0]instanceof k){var t=arguments[0];return this.selfAdd(t._hi,t._lo)}if("number"==typeof arguments[0]){var e,n,r,i,o,a=arguments[0],s=null;return s=(r=this._hi+a)-(i=r-this._hi),n=(o=(s=a-i+(this._hi-s))+this._lo)+(r-(e=r+o)),this._hi=e+n,this._lo=n+(e-this._hi),this}}else if(2===arguments.length){var l,u,c,h,p=arguments[0],f=arguments[1],d=null,g=null,y=null;c=this._hi+p,u=this._lo+f,g=c-(y=c-this._hi),d=u-(h=u-this._lo);var m=(l=c+(y=(g=p-y+(this._hi-g))+u))+(y=(d=f-h+(this._lo-d))+(y+(c-l))),v=y+(l-m);return this._hi=m,this._lo=v,this}},k.prototype.selfMultiply=function(){if(1===arguments.length){if(arguments[0]instanceof k){var t=arguments[0];return this.selfMultiply(t._hi,t._lo)}if("number"==typeof arguments[0]){var e=arguments[0];return this.selfMultiply(e,0)}}else if(2===arguments.length){var n,r,i=arguments[0],o=arguments[1],a=null,s=null,l=null,u=null;a=(l=k.SPLIT*this._hi)-this._hi,u=k.SPLIT*i,a=l-a,n=this._hi-a,s=u-i;var c=(l=this._hi*i)+(u=a*(s=u-s)-l+a*(r=i-s)+n*s+n*r+(this._hi*o+this._lo*i)),h=u+(a=l-c);return this._hi=c,this._lo=h,this}},k.prototype.selfSqr=function(){return this.selfMultiply(this)},k.prototype.floor=function(){if(this.isNaN())return k.NaN;var t=Math.floor(this._hi),e=0;return t===this._hi&&(e=Math.floor(this._lo)),new k(t,e)},k.prototype.negate=function(){return this.isNaN()?this:new k(-this._hi,-this._lo)},k.prototype.clone=function(){},k.prototype.multiply=function(){if(arguments[0]instanceof k){var t=arguments[0];return t.isNaN()?k.createNaN():k.copy(this).selfMultiply(t)}if("number"==typeof arguments[0]){var e=arguments[0];return _.isNaN(e)?k.createNaN():k.copy(this).selfMultiply(e,0)}},k.prototype.isNaN=function(){return _.isNaN(this._hi)},k.prototype.intValue=function(){return Math.trunc(this._hi)},k.prototype.toString=function(){var t=k.magnitude(this._hi);return t>=-3&&t<=20?this.toStandardNotation():this.toSciNotation()},k.prototype.toStandardNotation=function(){var t=this.getSpecialNumberString();if(null!==t)return t;var e=new Array(1).fill(null),n=this.extractSignificantDigits(!0,e),r=e[0]+1,i=n;if("."===n.charAt(0))i="0"+n;else if(r<0)i="0."+k.stringOfChar("0",-r)+n;else if(-1===n.indexOf(".")){var o=r-n.length;i=n+k.stringOfChar("0",o)+".0"}return this.isNegative()?"-"+i:i},k.prototype.reciprocal=function(){var t,e,n,r,i=null,o=null,a=null,s=null;t=(n=1/this._hi)-(i=(a=k.SPLIT*n)-(i=a-n)),o=(s=k.SPLIT*this._hi)-this._hi;var l=n+(a=(1-(r=n*this._hi)-(s=i*(o=s-o)-r+i*(e=this._hi-o)+t*o+t*e)-n*this._lo)/this._hi);return new k(l,n-l+a)},k.prototype.toSciNotation=function(){if(this.isZero())return k.SCI_NOT_ZERO;var t=this.getSpecialNumberString();if(null!==t)return t;var e=new Array(1).fill(null),n=this.extractSignificantDigits(!1,e),r=k.SCI_NOT_EXPONENT_CHAR+e[0];if("0"===n.charAt(0))throw new Error("Found leading zero: "+n);var i="";n.length>1&&(i=n.substring(1));var o=n.charAt(0)+"."+i;return this.isNegative()?"-"+o+r:o+r},k.prototype.abs=function(){return this.isNaN()?k.NaN:this.isNegative()?this.negate():new k(this)},k.prototype.isPositive=function(){return(this._hi>0||0===this._hi)&&this._lo>0},k.prototype.lt=function(t){return(this._hi<t._hi||this._hi===t._hi)&&this._lo<t._lo},k.prototype.add=function(){if(arguments[0]instanceof k){var t=arguments[0];return k.copy(this).selfAdd(t)}if("number"==typeof arguments[0]){var e=arguments[0];return k.copy(this).selfAdd(e)}},k.prototype.init=function(){if(1===arguments.length){if("number"==typeof arguments[0]){var t=arguments[0];this._hi=t,this._lo=0}else if(arguments[0]instanceof k){var e=arguments[0];this._hi=e._hi,this._lo=e._lo}}else if(2===arguments.length){var n=arguments[0],r=arguments[1];this._hi=n,this._lo=r}},k.prototype.gt=function(t){return(this._hi>t._hi||this._hi===t._hi)&&this._lo>t._lo},k.prototype.isNegative=function(){return(this._hi<0||0===this._hi)&&this._lo<0},k.prototype.trunc=function(){return this.isNaN()?k.NaN:this.isPositive()?this.floor():this.ceil()},k.prototype.signum=function(){return this._hi>0?1:this._hi<0?-1:this._lo>0?1:this._lo<0?-1:0},k.prototype.interfaces_=function(){return[e,w,O]},k.prototype.getClass=function(){return k},k.sqr=function(t){return k.valueOf(t).selfMultiply(t)},k.valueOf=function(){if("string"==typeof arguments[0]){var t=arguments[0];return k.parse(t)}if("number"==typeof arguments[0]){var e=arguments[0];return new k(e)}},k.sqrt=function(t){return k.valueOf(t).sqrt()},k.parse=function(t){for(var e=0,n=t.length;A.isWhitespace(t.charAt(e));)e++;var r=!1;if(e<n){var i=t.charAt(e);"-"!==i&&"+"!==i||(e++,"-"===i&&(r=!0))}for(var o=new k,a=0,s=0,l=0;!(e>=n);){var u=t.charAt(e);if(e++,A.isDigit(u)){var c=u-"0";o.selfMultiply(k.TEN),o.selfAdd(c),a++}else{if("."!==u){if("e"===u||"E"===u){var h=t.substring(e);try{l=M.parseInt(h)}catch(e){throw e instanceof Error?new Error("Invalid exponent "+h+" in string "+t):e}break}throw new Error("Unexpected character '"+u+"' at position "+e+" in string "+t)}s=a}}var p=o,f=a-s-l;if(0===f)p=o;else if(f>0){var d=k.TEN.pow(f);p=o.divide(d)}else if(f<0){var g=k.TEN.pow(-f);p=o.multiply(g)}return r?p.negate():p},k.createNaN=function(){return new k(_.NaN,_.NaN)},k.copy=function(t){return new k(t)},k.magnitude=function(t){var e=Math.abs(t),n=Math.log(e)/Math.log(10),r=Math.trunc(Math.floor(n));return 10*Math.pow(10,r)<=e&&(r+=1),r},k.stringOfChar=function(t,e){for(var n=new N,r=0;r<e;r++)n.append(t);return n.toString()},F.PI.get=function(){return new k(3.141592653589793,1.2246467991473532e-16)},F.TWO_PI.get=function(){return new k(6.283185307179586,2.4492935982947064e-16)},F.PI_2.get=function(){return new k(1.5707963267948966,6.123233995736766e-17)},F.E.get=function(){return new k(2.718281828459045,1.4456468917292502e-16)},F.NaN.get=function(){return new k(_.NaN,_.NaN)},F.EPS.get=function(){return 1.23259516440783e-32},F.SPLIT.get=function(){return 134217729},F.MAX_PRINT_DIGITS.get=function(){return 32},F.TEN.get=function(){return k.valueOf(10)},F.ONE.get=function(){return k.valueOf(1)},F.SCI_NOT_EXPONENT_CHAR.get=function(){return"E"},F.SCI_NOT_ZERO.get=function(){return"0.0E0"},Object.defineProperties(k,F);var D=function(){},G={DP_SAFE_EPSILON:{configurable:!0}};D.prototype.interfaces_=function(){return[]},D.prototype.getClass=function(){return D},D.orientationIndex=function(t,e,n){var r=D.orientationIndexFilter(t,e,n);if(r<=1)return r;var i=k.valueOf(e.x).selfAdd(-t.x),o=k.valueOf(e.y).selfAdd(-t.y),a=k.valueOf(n.x).selfAdd(-e.x),s=k.valueOf(n.y).selfAdd(-e.y);return i.selfMultiply(s).selfSubtract(o.selfMultiply(a)).signum()},D.signOfDet2x2=function(t,e,n,r){return t.multiply(r).selfSubtract(e.multiply(n)).signum()},D.intersection=function(t,e,n,r){var i=k.valueOf(r.y).selfSubtract(n.y).selfMultiply(k.valueOf(e.x).selfSubtract(t.x)),o=k.valueOf(r.x).selfSubtract(n.x).selfMultiply(k.valueOf(e.y).selfSubtract(t.y)),a=i.subtract(o),s=k.valueOf(r.x).selfSubtract(n.x).selfMultiply(k.valueOf(t.y).selfSubtract(n.y)),l=k.valueOf(r.y).selfSubtract(n.y).selfMultiply(k.valueOf(t.x).selfSubtract(n.x)),u=s.subtract(l).selfDivide(a).doubleValue(),c=k.valueOf(t.x).selfAdd(k.valueOf(e.x).selfSubtract(t.x).selfMultiply(u)).doubleValue(),h=k.valueOf(e.x).selfSubtract(t.x).selfMultiply(k.valueOf(t.y).selfSubtract(n.y)),p=k.valueOf(e.y).selfSubtract(t.y).selfMultiply(k.valueOf(t.x).selfSubtract(n.x)),f=h.subtract(p).selfDivide(a).doubleValue(),d=k.valueOf(n.y).selfAdd(k.valueOf(r.y).selfSubtract(n.y).selfMultiply(f)).doubleValue();return new E(c,d)},D.orientationIndexFilter=function(t,e,n){var r=null,i=(t.x-n.x)*(e.y-n.y),o=(t.y-n.y)*(e.x-n.x),a=i-o;if(i>0){if(o<=0)return D.signum(a);r=i+o}else{if(!(i<0))return D.signum(a);if(o>=0)return D.signum(a);r=-i-o}var s=D.DP_SAFE_EPSILON*r;return a>=s||-a>=s?D.signum(a):2},D.signum=function(t){return t>0?1:t<0?-1:0},G.DP_SAFE_EPSILON.get=function(){return 1e-15},Object.defineProperties(D,G);var U=function(){},z={X:{configurable:!0},Y:{configurable:!0},Z:{configurable:!0},M:{configurable:!0}};z.X.get=function(){return 0},z.Y.get=function(){return 1},z.Z.get=function(){return 2},z.M.get=function(){return 3},U.prototype.setOrdinate=function(t,e,n){},U.prototype.size=function(){},U.prototype.getOrdinate=function(t,e){},U.prototype.getCoordinate=function(){},U.prototype.getCoordinateCopy=function(t){},U.prototype.getDimension=function(){},U.prototype.getX=function(t){},U.prototype.clone=function(){},U.prototype.expandEnvelope=function(t){},U.prototype.copy=function(){},U.prototype.getY=function(t){},U.prototype.toCoordinateArray=function(){},U.prototype.interfaces_=function(){return[O]},U.prototype.getClass=function(){return U},Object.defineProperties(U,z);var B=function(){},V=function(t){function e(){t.call(this,"Projective point not representable on the Cartesian plane.")}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(B),Y=function(){};Y.arraycopy=function(t,e,n,r,i){for(var o=0,a=e;a<e+i;a++)n[r+o]=t[a],o++},Y.getProperty=function(t){return{"line.separator":"\n"}[t]};var q=function t(){if(this.x=null,this.y=null,this.w=null,0===arguments.length)this.x=0,this.y=0,this.w=1;else if(1===arguments.length){var e=arguments[0];this.x=e.x,this.y=e.y,this.w=1}else if(2===arguments.length){if("number"==typeof arguments[0]&&"number"==typeof arguments[1]){var n=arguments[0],r=arguments[1];this.x=n,this.y=r,this.w=1}else if(arguments[0]instanceof t&&arguments[1]instanceof t){var i=arguments[0],o=arguments[1];this.x=i.y*o.w-o.y*i.w,this.y=o.x*i.w-i.x*o.w,this.w=i.x*o.y-o.x*i.y}else if(arguments[0]instanceof E&&arguments[1]instanceof E){var a=arguments[0],s=arguments[1];this.x=a.y-s.y,this.y=s.x-a.x,this.w=a.x*s.y-s.x*a.y}}else if(3===arguments.length){var l=arguments[0],u=arguments[1],c=arguments[2];this.x=l,this.y=u,this.w=c}else if(4===arguments.length){var h=arguments[0],p=arguments[1],f=arguments[2],d=arguments[3],g=h.y-p.y,y=p.x-h.x,m=h.x*p.y-p.x*h.y,v=f.y-d.y,_=d.x-f.x,b=f.x*d.y-d.x*f.y;this.x=y*b-_*m,this.y=v*m-g*b,this.w=g*_-v*y}};q.prototype.getY=function(){var t=this.y/this.w;if(_.isNaN(t)||_.isInfinite(t))throw new V;return t},q.prototype.getX=function(){var t=this.x/this.w;if(_.isNaN(t)||_.isInfinite(t))throw new V;return t},q.prototype.getCoordinate=function(){var t=new E;return t.x=this.getX(),t.y=this.getY(),t},q.prototype.interfaces_=function(){return[]},q.prototype.getClass=function(){return q},q.intersection=function(t,e,n,r){var i=t.y-e.y,o=e.x-t.x,a=t.x*e.y-e.x*t.y,s=n.y-r.y,l=r.x-n.x,u=n.x*r.y-r.x*n.y,c=i*l-s*o,h=(o*u-l*a)/c,p=(s*a-i*u)/c;if(_.isNaN(h)||_.isInfinite(h)||_.isNaN(p)||_.isInfinite(p))throw new V;return new E(h,p)};var X=function t(){if(this._minx=null,this._maxx=null,this._miny=null,this._maxy=null,0===arguments.length)this.init();else if(1===arguments.length){if(arguments[0]instanceof E){var e=arguments[0];this.init(e.x,e.x,e.y,e.y)}else if(arguments[0]instanceof t){var n=arguments[0];this.init(n)}}else if(2===arguments.length){var r=arguments[0],i=arguments[1];this.init(r.x,i.x,r.y,i.y)}else if(4===arguments.length){var o=arguments[0],a=arguments[1],s=arguments[2],l=arguments[3];this.init(o,a,s,l)}},W={serialVersionUID:{configurable:!0}};X.prototype.getArea=function(){return this.getWidth()*this.getHeight()},X.prototype.equals=function(t){if(!(t instanceof X))return!1;var e=t;return this.isNull()?e.isNull():this._maxx===e.getMaxX()&&this._maxy===e.getMaxY()&&this._minx===e.getMinX()&&this._miny===e.getMinY()},X.prototype.intersection=function(t){if(this.isNull()||t.isNull()||!this.intersects(t))return new X;var e=this._minx>t._minx?this._minx:t._minx,n=this._miny>t._miny?this._miny:t._miny,r=this._maxx<t._maxx?this._maxx:t._maxx,i=this._maxy<t._maxy?this._maxy:t._maxy;return new X(e,r,n,i)},X.prototype.isNull=function(){return this._maxx<this._minx},X.prototype.getMaxX=function(){return this._maxx},X.prototype.covers=function(){if(1===arguments.length){if(arguments[0]instanceof E){var t=arguments[0];return this.covers(t.x,t.y)}if(arguments[0]instanceof X){var e=arguments[0];return!this.isNull()&&!e.isNull()&&e.getMinX()>=this._minx&&e.getMaxX()<=this._maxx&&e.getMinY()>=this._miny&&e.getMaxY()<=this._maxy}}else if(2===arguments.length){var n=arguments[0],r=arguments[1];return!this.isNull()&&n>=this._minx&&n<=this._maxx&&r>=this._miny&&r<=this._maxy}},X.prototype.intersects=function(){if(1===arguments.length){if(arguments[0]instanceof X){var t=arguments[0];return!this.isNull()&&!t.isNull()&&!(t._minx>this._maxx||t._maxx<this._minx||t._miny>this._maxy||t._maxy<this._miny)}if(arguments[0]instanceof E){var e=arguments[0];return this.intersects(e.x,e.y)}}else if(2===arguments.length){var n=arguments[0],r=arguments[1];return!this.isNull()&&!(n>this._maxx||n<this._minx||r>this._maxy||r<this._miny)}},X.prototype.getMinY=function(){return this._miny},X.prototype.getMinX=function(){return this._minx},X.prototype.expandToInclude=function(){if(1===arguments.length){if(arguments[0]instanceof E){var t=arguments[0];this.expandToInclude(t.x,t.y)}else if(arguments[0]instanceof X){var e=arguments[0];if(e.isNull())return null;this.isNull()?(this._minx=e.getMinX(),this._maxx=e.getMaxX(),this._miny=e.getMinY(),this._maxy=e.getMaxY()):(e._minx<this._minx&&(this._minx=e._minx),e._maxx>this._maxx&&(this._maxx=e._maxx),e._miny<this._miny&&(this._miny=e._miny),e._maxy>this._maxy&&(this._maxy=e._maxy))}}else if(2===arguments.length){var n=arguments[0],r=arguments[1];this.isNull()?(this._minx=n,this._maxx=n,this._miny=r,this._maxy=r):(n<this._minx&&(this._minx=n),n>this._maxx&&(this._maxx=n),r<this._miny&&(this._miny=r),r>this._maxy&&(this._maxy=r))}},X.prototype.minExtent=function(){if(this.isNull())return 0;var t=this.getWidth(),e=this.getHeight();return t<e?t:e},X.prototype.getWidth=function(){return this.isNull()?0:this._maxx-this._minx},X.prototype.compareTo=function(t){var e=t;return this.isNull()?e.isNull()?0:-1:e.isNull()?1:this._minx<e._minx?-1:this._minx>e._minx?1:this._miny<e._miny?-1:this._miny>e._miny?1:this._maxx<e._maxx?-1:this._maxx>e._maxx?1:this._maxy<e._maxy?-1:this._maxy>e._maxy?1:0},X.prototype.translate=function(t,e){if(this.isNull())return null;this.init(this.getMinX()+t,this.getMaxX()+t,this.getMinY()+e,this.getMaxY()+e)},X.prototype.toString=function(){return"Env["+this._minx+" : "+this._maxx+", "+this._miny+" : "+this._maxy+"]"},X.prototype.setToNull=function(){this._minx=0,this._maxx=-1,this._miny=0,this._maxy=-1},X.prototype.getHeight=function(){return this.isNull()?0:this._maxy-this._miny},X.prototype.maxExtent=function(){if(this.isNull())return 0;var t=this.getWidth(),e=this.getHeight();return t>e?t:e},X.prototype.expandBy=function(){if(1===arguments.length){var t=arguments[0];this.expandBy(t,t)}else if(2===arguments.length){var e=arguments[0],n=arguments[1];if(this.isNull())return null;this._minx-=e,this._maxx+=e,this._miny-=n,this._maxy+=n,(this._minx>this._maxx||this._miny>this._maxy)&&this.setToNull()}},X.prototype.contains=function(){if(1===arguments.length){if(arguments[0]instanceof X){var t=arguments[0];return this.covers(t)}if(arguments[0]instanceof E){var e=arguments[0];return this.covers(e)}}else if(2===arguments.length){var n=arguments[0],r=arguments[1];return this.covers(n,r)}},X.prototype.centre=function(){return this.isNull()?null:new E((this.getMinX()+this.getMaxX())/2,(this.getMinY()+this.getMaxY())/2)},X.prototype.init=function(){if(0===arguments.length)this.setToNull();else if(1===arguments.length){if(arguments[0]instanceof E){var t=arguments[0];this.init(t.x,t.x,t.y,t.y)}else if(arguments[0]instanceof X){var e=arguments[0];this._minx=e._minx,this._maxx=e._maxx,this._miny=e._miny,this._maxy=e._maxy}}else if(2===arguments.length){var n=arguments[0],r=arguments[1];this.init(n.x,r.x,n.y,r.y)}else if(4===arguments.length){var i=arguments[0],o=arguments[1],a=arguments[2],s=arguments[3];i<o?(this._minx=i,this._maxx=o):(this._minx=o,this._maxx=i),a<s?(this._miny=a,this._maxy=s):(this._miny=s,this._maxy=a)}},X.prototype.getMaxY=function(){return this._maxy},X.prototype.distance=function(t){if(this.intersects(t))return 0;var e=0;this._maxx<t._minx?e=t._minx-this._maxx:this._minx>t._maxx&&(e=this._minx-t._maxx);var n=0;return this._maxy<t._miny?n=t._miny-this._maxy:this._miny>t._maxy&&(n=this._miny-t._maxy),0===e?n:0===n?e:Math.sqrt(e*e+n*n)},X.prototype.hashCode=function(){var t=17;return 37*(t=37*(t=37*(t=37*t+E.hashCode(this._minx))+E.hashCode(this._maxx))+E.hashCode(this._miny))+E.hashCode(this._maxy)},X.prototype.interfaces_=function(){return[w,e]},X.prototype.getClass=function(){return X},X.intersects=function(){if(3===arguments.length){var t=arguments[0],e=arguments[1],n=arguments[2];return n.x>=(t.x<e.x?t.x:e.x)&&n.x<=(t.x>e.x?t.x:e.x)&&n.y>=(t.y<e.y?t.y:e.y)&&n.y<=(t.y>e.y?t.y:e.y)}if(4===arguments.length){var r=arguments[0],i=arguments[1],o=arguments[2],a=arguments[3],s=Math.min(o.x,a.x),l=Math.max(o.x,a.x),u=Math.min(r.x,i.x),c=Math.max(r.x,i.x);return!(u>l)&&!(c<s)&&(s=Math.min(o.y,a.y),l=Math.max(o.y,a.y),u=Math.min(r.y,i.y),c=Math.max(r.y,i.y),!(u>l)&&!(c<s))}},W.serialVersionUID.get=function(){return 0x51845cd552189800},Object.defineProperties(X,W);var H={typeStr:/^\s*(\w+)\s*\(\s*(.*)\s*\)\s*$/,emptyTypeStr:/^\s*(\w+)\s*EMPTY\s*$/,spaces:/\s+/,parenComma:/\)\s*,\s*\(/,doubleParenComma:/\)\s*\)\s*,\s*\(\s*\(/,trimParens:/^\s*\(?(.*?)\)?\s*$/},K=function(t){this.geometryFactory=t||new me};K.prototype.read=function(t){var e,n,r;t=t.replace(/[\n\r]/g," ");var i=H.typeStr.exec(t);if(-1!==t.search("EMPTY")&&((i=H.emptyTypeStr.exec(t))[2]=void 0),i&&(n=i[1].toLowerCase(),r=i[2],J[n]&&(e=J[n].apply(this,[r]))),void 0===e)throw new Error("Could not parse WKT "+t);return e},K.prototype.write=function(t){return this.extractGeometry(t)},K.prototype.extractGeometry=function(t){var e=t.getGeometryType().toLowerCase();if(!Z[e])return null;var n=e.toUpperCase();return t.isEmpty()?n+" EMPTY":n+"("+Z[e].apply(this,[t])+")"};var Z={coordinate:function(t){return t.x+" "+t.y},point:function(t){return Z.coordinate.call(this,t._coordinates._coordinates[0])},multipoint:function(t){for(var e=[],n=0,r=t._geometries.length;n<r;++n)e.push("("+Z.point.apply(this,[t._geometries[n]])+")");return e.join(",")},linestring:function(t){for(var e=[],n=0,r=t._points._coordinates.length;n<r;++n)e.push(Z.coordinate.apply(this,[t._points._coordinates[n]]));return e.join(",")},linearring:function(t){for(var e=[],n=0,r=t._points._coordinates.length;n<r;++n)e.push(Z.coordinate.apply(this,[t._points._coordinates[n]]));return e.join(",")},multilinestring:function(t){for(var e=[],n=0,r=t._geometries.length;n<r;++n)e.push("("+Z.linestring.apply(this,[t._geometries[n]])+")");return e.join(",")},polygon:function(t){var e=[];e.push("("+Z.linestring.apply(this,[t._shell])+")");for(var n=0,r=t._holes.length;n<r;++n)e.push("("+Z.linestring.apply(this,[t._holes[n]])+")");return e.join(",")},multipolygon:function(t){for(var e=[],n=0,r=t._geometries.length;n<r;++n)e.push("("+Z.polygon.apply(this,[t._geometries[n]])+")");return e.join(",")},geometrycollection:function(t){for(var e=[],n=0,r=t._geometries.length;n<r;++n)e.push(this.extractGeometry(t._geometries[n]));return e.join(",")}},J={point:function(t){if(void 0===t)return this.geometryFactory.createPoint();var e=t.trim().split(H.spaces);return this.geometryFactory.createPoint(new E(Number.parseFloat(e[0]),Number.parseFloat(e[1])))},multipoint:function(t){if(void 0===t)return this.geometryFactory.createMultiPoint();for(var e,n=t.trim().split(","),r=[],i=0,o=n.length;i<o;++i)e=n[i].replace(H.trimParens,"$1"),r.push(J.point.apply(this,[e]));return this.geometryFactory.createMultiPoint(r)},linestring:function(t){if(void 0===t)return this.geometryFactory.createLineString();for(var e,n=t.trim().split(","),r=[],i=0,o=n.length;i<o;++i)e=n[i].trim().split(H.spaces),r.push(new E(Number.parseFloat(e[0]),Number.parseFloat(e[1])));return this.geometryFactory.createLineString(r)},linearring:function(t){if(void 0===t)return this.geometryFactory.createLinearRing();for(var e,n=t.trim().split(","),r=[],i=0,o=n.length;i<o;++i)e=n[i].trim().split(H.spaces),r.push(new E(Number.parseFloat(e[0]),Number.parseFloat(e[1])));return this.geometryFactory.createLinearRing(r)},multilinestring:function(t){if(void 0===t)return this.geometryFactory.createMultiLineString();for(var e,n=t.trim().split(H.parenComma),r=[],i=0,o=n.length;i<o;++i)e=n[i].replace(H.trimParens,"$1"),r.push(J.linestring.apply(this,[e]));return this.geometryFactory.createMultiLineString(r)},polygon:function(t){if(void 0===t)return this.geometryFactory.createPolygon();for(var e,n,r,i,o=t.trim().split(H.parenComma),a=[],s=0,l=o.length;s<l;++s)e=o[s].replace(H.trimParens,"$1"),n=J.linestring.apply(this,[e]),r=this.geometryFactory.createLinearRing(n._points),0===s?i=r:a.push(r);return this.geometryFactory.createPolygon(i,a)},multipolygon:function(t){if(void 0===t)return this.geometryFactory.createMultiPolygon();for(var e,n=t.trim().split(H.doubleParenComma),r=[],i=0,o=n.length;i<o;++i)e=n[i].replace(H.trimParens,"$1"),r.push(J.polygon.apply(this,[e]));return this.geometryFactory.createMultiPolygon(r)},geometrycollection:function(t){if(void 0===t)return this.geometryFactory.createGeometryCollection();for(var e=(t=t.replace(/,\s*([A-Za-z])/g,"|$1")).trim().split("|"),n=[],r=0,i=e.length;r<i;++r)n.push(this.read(e[r]));return this.geometryFactory.createGeometryCollection(n)}},$=function(t){this.parser=new K(t)};$.prototype.write=function(t){return this.parser.write(t)},$.toLineString=function(t,e){if(2!==arguments.length)throw new Error("Not implemented");return"LINESTRING ( "+t.x+" "+t.y+", "+e.x+" "+e.y+" )"};var Q=function(t){function e(e){t.call(this,e),this.name="RuntimeException",this.message=e,this.stack=(new t).stack}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Error),tt=function(t){function e(){if(t.call(this),0===arguments.length)t.call(this);else if(1===arguments.length){var e=arguments[0];t.call(this,e)}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(Q),et=function(){};et.prototype.interfaces_=function(){return[]},et.prototype.getClass=function(){return et},et.shouldNeverReachHere=function(){if(0===arguments.length)et.shouldNeverReachHere(null);else if(1===arguments.length){var t=arguments[0];throw new tt("Should never reach here"+(null!==t?": "+t:""))}},et.isTrue=function(){var t,e;if(1===arguments.length)t=arguments[0],et.isTrue(t,null);else if(2===arguments.length&&(t=arguments[0],e=arguments[1],!t))throw null===e?new tt:new tt(e)},et.equals=function(){var t,e,n;if(2===arguments.length)t=arguments[0],e=arguments[1],et.equals(t,e,null);else if(3===arguments.length&&(t=arguments[0],e=arguments[1],n=arguments[2],!e.equals(t)))throw new tt("Expected "+t+" but encountered "+e+(null!==n?": "+n:""))};var nt=function(){this._result=null,this._inputLines=Array(2).fill().map(function(){return Array(2)}),this._intPt=new Array(2).fill(null),this._intLineIndex=null,this._isProper=null,this._pa=null,this._pb=null,this._precisionModel=null,this._intPt[0]=new E,this._intPt[1]=new E,this._pa=this._intPt[0],this._pb=this._intPt[1],this._result=0},rt={DONT_INTERSECT:{configurable:!0},DO_INTERSECT:{configurable:!0},COLLINEAR:{configurable:!0},NO_INTERSECTION:{configurable:!0},POINT_INTERSECTION:{configurable:!0},COLLINEAR_INTERSECTION:{configurable:!0}};nt.prototype.getIndexAlongSegment=function(t,e){return this.computeIntLineIndex(),this._intLineIndex[t][e]},nt.prototype.getTopologySummary=function(){var t=new N;return this.isEndPoint()&&t.append(" endpoint"),this._isProper&&t.append(" proper"),this.isCollinear()&&t.append(" collinear"),t.toString()},nt.prototype.computeIntersection=function(t,e,n,r){this._inputLines[0][0]=t,this._inputLines[0][1]=e,this._inputLines[1][0]=n,this._inputLines[1][1]=r,this._result=this.computeIntersect(t,e,n,r)},nt.prototype.getIntersectionNum=function(){return this._result},nt.prototype.computeIntLineIndex=function(){if(0===arguments.length)null===this._intLineIndex&&(this._intLineIndex=Array(2).fill().map(function(){return Array(2)}),this.computeIntLineIndex(0),this.computeIntLineIndex(1));else if(1===arguments.length){var t=arguments[0];this.getEdgeDistance(t,0)>this.getEdgeDistance(t,1)?(this._intLineIndex[t][0]=0,this._intLineIndex[t][1]=1):(this._intLineIndex[t][0]=1,this._intLineIndex[t][1]=0)}},nt.prototype.isProper=function(){return this.hasIntersection()&&this._isProper},nt.prototype.setPrecisionModel=function(t){this._precisionModel=t},nt.prototype.isInteriorIntersection=function(){if(0===arguments.length)return!!this.isInteriorIntersection(0)||!!this.isInteriorIntersection(1);if(1===arguments.length){for(var t=arguments[0],e=0;e<this._result;e++)if(!this._intPt[e].equals2D(this._inputLines[t][0])&&!this._intPt[e].equals2D(this._inputLines[t][1]))return!0;return!1}},nt.prototype.getIntersection=function(t){return this._intPt[t]},nt.prototype.isEndPoint=function(){return this.hasIntersection()&&!this._isProper},nt.prototype.hasIntersection=function(){return this._result!==nt.NO_INTERSECTION},nt.prototype.getEdgeDistance=function(t,e){return nt.computeEdgeDistance(this._intPt[e],this._inputLines[t][0],this._inputLines[t][1])},nt.prototype.isCollinear=function(){return this._result===nt.COLLINEAR_INTERSECTION},nt.prototype.toString=function(){return $.toLineString(this._inputLines[0][0],this._inputLines[0][1])+" - "+$.toLineString(this._inputLines[1][0],this._inputLines[1][1])+this.getTopologySummary()},nt.prototype.getEndpoint=function(t,e){return this._inputLines[t][e]},nt.prototype.isIntersection=function(t){for(var e=0;e<this._result;e++)if(this._intPt[e].equals2D(t))return!0;return!1},nt.prototype.getIntersectionAlongSegment=function(t,e){return this.computeIntLineIndex(),this._intPt[this._intLineIndex[t][e]]},nt.prototype.interfaces_=function(){return[]},nt.prototype.getClass=function(){return nt},nt.computeEdgeDistance=function(t,e,n){var r=Math.abs(n.x-e.x),i=Math.abs(n.y-e.y),o=-1;if(t.equals(e))o=0;else if(t.equals(n))o=r>i?r:i;else{var a=Math.abs(t.x-e.x),s=Math.abs(t.y-e.y);0!==(o=r>i?a:s)||t.equals(e)||(o=Math.max(a,s))}return et.isTrue(!(0===o&&!t.equals(e)),"Bad distance calculation"),o},nt.nonRobustComputeEdgeDistance=function(t,e,n){var r=t.x-e.x,i=t.y-e.y,o=Math.sqrt(r*r+i*i);return et.isTrue(!(0===o&&!t.equals(e)),"Invalid distance calculation"),o},rt.DONT_INTERSECT.get=function(){return 0},rt.DO_INTERSECT.get=function(){return 1},rt.COLLINEAR.get=function(){return 2},rt.NO_INTERSECTION.get=function(){return 0},rt.POINT_INTERSECTION.get=function(){return 1},rt.COLLINEAR_INTERSECTION.get=function(){return 2},Object.defineProperties(nt,rt);var it=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.isInSegmentEnvelopes=function(t){var e=new X(this._inputLines[0][0],this._inputLines[0][1]),n=new X(this._inputLines[1][0],this._inputLines[1][1]);return e.contains(t)&&n.contains(t)},e.prototype.computeIntersection=function(){if(3!==arguments.length)return t.prototype.computeIntersection.apply(this,arguments);var e=arguments[0],n=arguments[1],r=arguments[2];if(this._isProper=!1,X.intersects(n,r,e)&&0===st.orientationIndex(n,r,e)&&0===st.orientationIndex(r,n,e))return this._isProper=!0,(e.equals(n)||e.equals(r))&&(this._isProper=!1),this._result=t.POINT_INTERSECTION,null;this._result=t.NO_INTERSECTION},e.prototype.normalizeToMinimum=function(t,e,n,r,i){i.x=this.smallestInAbsValue(t.x,e.x,n.x,r.x),i.y=this.smallestInAbsValue(t.y,e.y,n.y,r.y),t.x-=i.x,t.y-=i.y,e.x-=i.x,e.y-=i.y,n.x-=i.x,n.y-=i.y,r.x-=i.x,r.y-=i.y},e.prototype.safeHCoordinateIntersection=function(t,n,r,i){var o=null;try{o=q.intersection(t,n,r,i)}catch(a){if(!(a instanceof V))throw a;o=e.nearestEndpoint(t,n,r,i)}return o},e.prototype.intersection=function(t,n,r,i){var o=this.intersectionWithNormalization(t,n,r,i);return this.isInSegmentEnvelopes(o)||(o=new E(e.nearestEndpoint(t,n,r,i))),null!==this._precisionModel&&this._precisionModel.makePrecise(o),o},e.prototype.smallestInAbsValue=function(t,e,n,r){var i=t,o=Math.abs(i);return Math.abs(e)<o&&(i=e,o=Math.abs(e)),Math.abs(n)<o&&(i=n,o=Math.abs(n)),Math.abs(r)<o&&(i=r),i},e.prototype.checkDD=function(t,e,n,r,i){var o=D.intersection(t,e,n,r),a=this.isInSegmentEnvelopes(o);Y.out.println("DD in env = "+a+"  --------------------- "+o),i.distance(o)>1e-4&&Y.out.println("Distance = "+i.distance(o))},e.prototype.intersectionWithNormalization=function(t,e,n,r){var i=new E(t),o=new E(e),a=new E(n),s=new E(r),l=new E;this.normalizeToEnvCentre(i,o,a,s,l);var u=this.safeHCoordinateIntersection(i,o,a,s);return u.x+=l.x,u.y+=l.y,u},e.prototype.computeCollinearIntersection=function(e,n,r,i){var o=X.intersects(e,n,r),a=X.intersects(e,n,i),s=X.intersects(r,i,e),l=X.intersects(r,i,n);return o&&a?(this._intPt[0]=r,this._intPt[1]=i,t.COLLINEAR_INTERSECTION):s&&l?(this._intPt[0]=e,this._intPt[1]=n,t.COLLINEAR_INTERSECTION):o&&s?(this._intPt[0]=r,this._intPt[1]=e,!r.equals(e)||a||l?t.COLLINEAR_INTERSECTION:t.POINT_INTERSECTION):o&&l?(this._intPt[0]=r,this._intPt[1]=n,!r.equals(n)||a||s?t.COLLINEAR_INTERSECTION:t.POINT_INTERSECTION):a&&s?(this._intPt[0]=i,this._intPt[1]=e,!i.equals(e)||o||l?t.COLLINEAR_INTERSECTION:t.POINT_INTERSECTION):a&&l?(this._intPt[0]=i,this._intPt[1]=n,!i.equals(n)||o||s?t.COLLINEAR_INTERSECTION:t.POINT_INTERSECTION):t.NO_INTERSECTION},e.prototype.normalizeToEnvCentre=function(t,e,n,r,i){var o=t.x<e.x?t.x:e.x,a=t.y<e.y?t.y:e.y,s=t.x>e.x?t.x:e.x,l=t.y>e.y?t.y:e.y,u=n.x<r.x?n.x:r.x,c=n.y<r.y?n.y:r.y,h=n.x>r.x?n.x:r.x,p=n.y>r.y?n.y:r.y,f=((o>u?o:u)+(s<h?s:h))/2,d=((a>c?a:c)+(l<p?l:p))/2;i.x=f,i.y=d,t.x-=i.x,t.y-=i.y,e.x-=i.x,e.y-=i.y,n.x-=i.x,n.y-=i.y,r.x-=i.x,r.y-=i.y},e.prototype.computeIntersect=function(e,n,r,i){if(this._isProper=!1,!X.intersects(e,n,r,i))return t.NO_INTERSECTION;var o=st.orientationIndex(e,n,r),a=st.orientationIndex(e,n,i);if(o>0&&a>0||o<0&&a<0)return t.NO_INTERSECTION;var s=st.orientationIndex(r,i,e),l=st.orientationIndex(r,i,n);return s>0&&l>0||s<0&&l<0?t.NO_INTERSECTION:0===o&&0===a&&0===s&&0===l?this.computeCollinearIntersection(e,n,r,i):(0===o||0===a||0===s||0===l?(this._isProper=!1,e.equals2D(r)||e.equals2D(i)?this._intPt[0]=e:n.equals2D(r)||n.equals2D(i)?this._intPt[0]=n:0===o?this._intPt[0]=new E(r):0===a?this._intPt[0]=new E(i):0===s?this._intPt[0]=new E(e):0===l&&(this._intPt[0]=new E(n))):(this._isProper=!0,this._intPt[0]=this.intersection(e,n,r,i)),t.POINT_INTERSECTION)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e.nearestEndpoint=function(t,e,n,r){var i=t,o=st.distancePointLine(t,n,r),a=st.distancePointLine(e,n,r);return a<o&&(o=a,i=e),(a=st.distancePointLine(n,t,e))<o&&(o=a,i=n),(a=st.distancePointLine(r,t,e))<o&&(o=a,i=r),i},e}(nt),ot=function(){};ot.prototype.interfaces_=function(){return[]},ot.prototype.getClass=function(){return ot},ot.orientationIndex=function(t,e,n){var r=e.x-t.x,i=e.y-t.y,o=n.x-e.x,a=n.y-e.y;return ot.signOfDet2x2(r,i,o,a)},ot.signOfDet2x2=function(t,e,n,r){var i=null,o=null,a=null;if(i=1,0===t||0===r)return 0===e||0===n?0:e>0?n>0?-i:i:n>0?i:-i;if(0===e||0===n)return r>0?t>0?i:-i:t>0?-i:i;if(e>0?r>0?e<=r||(i=-i,o=t,t=n,n=o,o=e,e=r,r=o):e<=-r?(i=-i,n=-n,r=-r):(o=t,t=-n,n=o,o=e,e=-r,r=o):r>0?-e<=r?(i=-i,t=-t,e=-e):(o=-t,t=n,n=o,o=-e,e=r,r=o):e>=r?(t=-t,e=-e,n=-n,r=-r):(i=-i,o=-t,t=-n,n=o,o=-e,e=-r,r=o),t>0){if(!(n>0))return i;if(!(t<=n))return i}else{if(n>0)return-i;if(!(t>=n))return-i;i=-i,t=-t,n=-n}for(;;){if(n-=(a=Math.floor(n/t))*t,(r-=a*e)<0)return-i;if(r>e)return i;if(t>n+n){if(e<r+r)return i}else{if(e>r+r)return-i;n=t-n,r=e-r,i=-i}if(0===r)return 0===n?0:-i;if(0===n)return i;if(t-=(a=Math.floor(t/n))*n,(e-=a*r)<0)return i;if(e>r)return-i;if(n>t+t){if(r<e+e)return-i}else{if(r>e+e)return i;t=n-t,e=r-e,i=-i}if(0===e)return 0===t?0:i;if(0===t)return-i}};var at=function(){this._p=null,this._crossingCount=0,this._isPointOnSegment=!1;var t=arguments[0];this._p=t};at.prototype.countSegment=function(t,e){if(t.x<this._p.x&&e.x<this._p.x)return null;if(this._p.x===e.x&&this._p.y===e.y)return this._isPointOnSegment=!0,null;if(t.y===this._p.y&&e.y===this._p.y){var n=t.x,r=e.x;return n>r&&(n=e.x,r=t.x),this._p.x>=n&&this._p.x<=r&&(this._isPointOnSegment=!0),null}if(t.y>this._p.y&&e.y<=this._p.y||e.y>this._p.y&&t.y<=this._p.y){var i=t.x-this._p.x,o=t.y-this._p.y,a=e.x-this._p.x,s=e.y-this._p.y,l=ot.signOfDet2x2(i,o,a,s);if(0===l)return this._isPointOnSegment=!0,null;s<o&&(l=-l),l>0&&this._crossingCount++}},at.prototype.isPointInPolygon=function(){return this.getLocation()!==I.EXTERIOR},at.prototype.getLocation=function(){return this._isPointOnSegment?I.BOUNDARY:this._crossingCount%2==1?I.INTERIOR:I.EXTERIOR},at.prototype.isOnSegment=function(){return this._isPointOnSegment},at.prototype.interfaces_=function(){return[]},at.prototype.getClass=function(){return at},at.locatePointInRing=function(){if(arguments[0]instanceof E&&L(arguments[1],U)){for(var t=arguments[0],e=arguments[1],n=new at(t),r=new E,i=new E,o=1;o<e.size();o++)if(e.getCoordinate(o,r),e.getCoordinate(o-1,i),n.countSegment(r,i),n.isOnSegment())return n.getLocation();return n.getLocation()}if(arguments[0]instanceof E&&arguments[1]instanceof Array){for(var a=arguments[0],s=arguments[1],l=new at(a),u=1;u<s.length;u++){var c=s[u],h=s[u-1];if(l.countSegment(c,h),l.isOnSegment())return l.getLocation()}return l.getLocation()}};var st=function(){},lt={CLOCKWISE:{configurable:!0},RIGHT:{configurable:!0},COUNTERCLOCKWISE:{configurable:!0},LEFT:{configurable:!0},COLLINEAR:{configurable:!0},STRAIGHT:{configurable:!0}};st.prototype.interfaces_=function(){return[]},st.prototype.getClass=function(){return st},st.orientationIndex=function(t,e,n){return D.orientationIndex(t,e,n)},st.signedArea=function(){if(arguments[0]instanceof Array){var t=arguments[0];if(t.length<3)return 0;for(var e=0,n=t[0].x,r=1;r<t.length-1;r++){var i=t[r].x-n,o=t[r+1].y;e+=i*(t[r-1].y-o)}return e/2}if(L(arguments[0],U)){var a=arguments[0],s=a.size();if(s<3)return 0;var l=new E,u=new E,c=new E;a.getCoordinate(0,u),a.getCoordinate(1,c);var h=u.x;c.x-=h;for(var p=0,f=1;f<s-1;f++)l.y=u.y,u.x=c.x,u.y=c.y,a.getCoordinate(f+1,c),c.x-=h,p+=u.x*(l.y-c.y);return p/2}},st.distanceLineLine=function(t,e,n,r){if(t.equals(e))return st.distancePointLine(t,n,r);if(n.equals(r))return st.distancePointLine(r,t,e);var i=!1;if(X.intersects(t,e,n,r)){var o=(e.x-t.x)*(r.y-n.y)-(e.y-t.y)*(r.x-n.x);if(0===o)i=!0;else{var a=(t.y-n.y)*(r.x-n.x)-(t.x-n.x)*(r.y-n.y),s=((t.y-n.y)*(e.x-t.x)-(t.x-n.x)*(e.y-t.y))/o,l=a/o;(l<0||l>1||s<0||s>1)&&(i=!0)}}else i=!0;return i?R.min(st.distancePointLine(t,n,r),st.distancePointLine(e,n,r),st.distancePointLine(n,t,e),st.distancePointLine(r,t,e)):0},st.isPointInRing=function(t,e){return st.locatePointInRing(t,e)!==I.EXTERIOR},st.computeLength=function(t){var e=t.size();if(e<=1)return 0;var n=0,r=new E;t.getCoordinate(0,r);for(var i=r.x,o=r.y,a=1;a<e;a++){t.getCoordinate(a,r);var s=r.x,l=r.y,u=s-i,c=l-o;n+=Math.sqrt(u*u+c*c),i=s,o=l}return n},st.isCCW=function(t){var e=t.length-1;if(e<3)throw new v("Ring has fewer than 4 points, so orientation cannot be determined");for(var n=t[0],r=0,i=1;i<=e;i++){var o=t[i];o.y>n.y&&(n=o,r=i)}var a=r;do{(a-=1)<0&&(a=e)}while(t[a].equals2D(n)&&a!==r);var s=r;do{s=(s+1)%e}while(t[s].equals2D(n)&&s!==r);var l=t[a],u=t[s];if(l.equals2D(n)||u.equals2D(n)||l.equals2D(u))return!1;var c=st.computeOrientation(l,n,u);return 0===c?l.x>u.x:c>0},st.locatePointInRing=function(t,e){return at.locatePointInRing(t,e)},st.distancePointLinePerpendicular=function(t,e,n){var r=(n.x-e.x)*(n.x-e.x)+(n.y-e.y)*(n.y-e.y),i=((e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y))/r;return Math.abs(i)*Math.sqrt(r)},st.computeOrientation=function(t,e,n){return st.orientationIndex(t,e,n)},st.distancePointLine=function(){if(2===arguments.length){var t=arguments[0],e=arguments[1];if(0===e.length)throw new v("Line array must contain at least one vertex");for(var n=t.distance(e[0]),r=0;r<e.length-1;r++){var i=st.distancePointLine(t,e[r],e[r+1]);i<n&&(n=i)}return n}if(3===arguments.length){var o=arguments[0],a=arguments[1],s=arguments[2];if(a.x===s.x&&a.y===s.y)return o.distance(a);var l=(s.x-a.x)*(s.x-a.x)+(s.y-a.y)*(s.y-a.y),u=((o.x-a.x)*(s.x-a.x)+(o.y-a.y)*(s.y-a.y))/l;if(u<=0)return o.distance(a);if(u>=1)return o.distance(s);var c=((a.y-o.y)*(s.x-a.x)-(a.x-o.x)*(s.y-a.y))/l;return Math.abs(c)*Math.sqrt(l)}},st.isOnLine=function(t,e){for(var n=new it,r=1;r<e.length;r++){var i=e[r-1],o=e[r];if(n.computeIntersection(t,i,o),n.hasIntersection())return!0}return!1},lt.CLOCKWISE.get=function(){return-1},lt.RIGHT.get=function(){return st.CLOCKWISE},lt.COUNTERCLOCKWISE.get=function(){return 1},lt.LEFT.get=function(){return st.COUNTERCLOCKWISE},lt.COLLINEAR.get=function(){return 0},lt.STRAIGHT.get=function(){return st.COLLINEAR},Object.defineProperties(st,lt);var ut=function(){};ut.prototype.filter=function(t){},ut.prototype.interfaces_=function(){return[]},ut.prototype.getClass=function(){return ut};var ct=function(){var t=arguments[0];this._envelope=null,this._factory=null,this._SRID=null,this._userData=null,this._factory=t,this._SRID=t.getSRID()},ht={serialVersionUID:{configurable:!0},SORTINDEX_POINT:{configurable:!0},SORTINDEX_MULTIPOINT:{configurable:!0},SORTINDEX_LINESTRING:{configurable:!0},SORTINDEX_LINEARRING:{configurable:!0},SORTINDEX_MULTILINESTRING:{configurable:!0},SORTINDEX_POLYGON:{configurable:!0},SORTINDEX_MULTIPOLYGON:{configurable:!0},SORTINDEX_GEOMETRYCOLLECTION:{configurable:!0},geometryChangedFilter:{configurable:!0}};ct.prototype.isGeometryCollection=function(){return this.getSortIndex()===ct.SORTINDEX_GEOMETRYCOLLECTION},ct.prototype.getFactory=function(){return this._factory},ct.prototype.getGeometryN=function(t){return this},ct.prototype.getArea=function(){return 0},ct.prototype.isRectangle=function(){return!1},ct.prototype.equals=function(){if(arguments[0]instanceof ct){var t=arguments[0];return null!==t&&this.equalsTopo(t)}if(arguments[0]instanceof Object){var e=arguments[0];if(!(e instanceof ct))return!1;var n=e;return this.equalsExact(n)}},ct.prototype.equalsExact=function(t){return this===t||this.equalsExact(t,0)},ct.prototype.geometryChanged=function(){this.apply(ct.geometryChangedFilter)},ct.prototype.geometryChangedAction=function(){this._envelope=null},ct.prototype.equalsNorm=function(t){return null!==t&&this.norm().equalsExact(t.norm())},ct.prototype.getLength=function(){return 0},ct.prototype.getNumGeometries=function(){return 1},ct.prototype.compareTo=function(){if(1===arguments.length){var t=arguments[0],e=t;return this.getSortIndex()!==e.getSortIndex()?this.getSortIndex()-e.getSortIndex():this.isEmpty()&&e.isEmpty()?0:this.isEmpty()?-1:e.isEmpty()?1:this.compareToSameClass(t)}if(2===arguments.length){var n=arguments[0],r=arguments[1];return this.getSortIndex()!==n.getSortIndex()?this.getSortIndex()-n.getSortIndex():this.isEmpty()&&n.isEmpty()?0:this.isEmpty()?-1:n.isEmpty()?1:this.compareToSameClass(n,r)}},ct.prototype.getUserData=function(){return this._userData},ct.prototype.getSRID=function(){return this._SRID},ct.prototype.getEnvelope=function(){return this.getFactory().toGeometry(this.getEnvelopeInternal())},ct.prototype.checkNotGeometryCollection=function(t){if(t.getSortIndex()===ct.SORTINDEX_GEOMETRYCOLLECTION)throw new v("This method does not support GeometryCollection arguments")},ct.prototype.equal=function(t,e,n){return 0===n?t.equals(e):t.distance(e)<=n},ct.prototype.norm=function(){var t=this.copy();return t.normalize(),t},ct.prototype.getPrecisionModel=function(){return this._factory.getPrecisionModel()},ct.prototype.getEnvelopeInternal=function(){return null===this._envelope&&(this._envelope=this.computeEnvelopeInternal()),new X(this._envelope)},ct.prototype.setSRID=function(t){this._SRID=t},ct.prototype.setUserData=function(t){this._userData=t},ct.prototype.compare=function(t,e){for(var n=t.iterator(),r=e.iterator();n.hasNext()&&r.hasNext();){var i=n.next(),o=r.next(),a=i.compareTo(o);if(0!==a)return a}return n.hasNext()?1:r.hasNext()?-1:0},ct.prototype.hashCode=function(){return this.getEnvelopeInternal().hashCode()},ct.prototype.isGeometryCollectionOrDerived=function(){return this.getSortIndex()===ct.SORTINDEX_GEOMETRYCOLLECTION||this.getSortIndex()===ct.SORTINDEX_MULTIPOINT||this.getSortIndex()===ct.SORTINDEX_MULTILINESTRING||this.getSortIndex()===ct.SORTINDEX_MULTIPOLYGON},ct.prototype.interfaces_=function(){return[O,w,e]},ct.prototype.getClass=function(){return ct},ct.hasNonEmptyElements=function(t){for(var e=0;e<t.length;e++)if(!t[e].isEmpty())return!0;return!1},ct.hasNullElements=function(t){for(var e=0;e<t.length;e++)if(null===t[e])return!0;return!1},ht.serialVersionUID.get=function(){return 0x799ea46522854c00},ht.SORTINDEX_POINT.get=function(){return 0},ht.SORTINDEX_MULTIPOINT.get=function(){return 1},ht.SORTINDEX_LINESTRING.get=function(){return 2},ht.SORTINDEX_LINEARRING.get=function(){return 3},ht.SORTINDEX_MULTILINESTRING.get=function(){return 4},ht.SORTINDEX_POLYGON.get=function(){return 5},ht.SORTINDEX_MULTIPOLYGON.get=function(){return 6},ht.SORTINDEX_GEOMETRYCOLLECTION.get=function(){return 7},ht.geometryChangedFilter.get=function(){return pt},Object.defineProperties(ct,ht);var pt=function(){};pt.interfaces_=function(){return[ut]},pt.filter=function(t){t.geometryChangedAction()};var ft=function(){};ft.prototype.filter=function(t){},ft.prototype.interfaces_=function(){return[]},ft.prototype.getClass=function(){return ft};var dt=function(){},gt={Mod2BoundaryNodeRule:{configurable:!0},EndPointBoundaryNodeRule:{configurable:!0},MultiValentEndPointBoundaryNodeRule:{configurable:!0},MonoValentEndPointBoundaryNodeRule:{configurable:!0},MOD2_BOUNDARY_RULE:{configurable:!0},ENDPOINT_BOUNDARY_RULE:{configurable:!0},MULTIVALENT_ENDPOINT_BOUNDARY_RULE:{configurable:!0},MONOVALENT_ENDPOINT_BOUNDARY_RULE:{configurable:!0},OGC_SFS_BOUNDARY_RULE:{configurable:!0}};dt.prototype.isInBoundary=function(t){},dt.prototype.interfaces_=function(){return[]},dt.prototype.getClass=function(){return dt},gt.Mod2BoundaryNodeRule.get=function(){return yt},gt.EndPointBoundaryNodeRule.get=function(){return mt},gt.MultiValentEndPointBoundaryNodeRule.get=function(){return vt},gt.MonoValentEndPointBoundaryNodeRule.get=function(){return _t},gt.MOD2_BOUNDARY_RULE.get=function(){return new yt},gt.ENDPOINT_BOUNDARY_RULE.get=function(){return new mt},gt.MULTIVALENT_ENDPOINT_BOUNDARY_RULE.get=function(){return new vt},gt.MONOVALENT_ENDPOINT_BOUNDARY_RULE.get=function(){return new _t},gt.OGC_SFS_BOUNDARY_RULE.get=function(){return dt.MOD2_BOUNDARY_RULE},Object.defineProperties(dt,gt);var yt=function(){};yt.prototype.isInBoundary=function(t){return t%2==1},yt.prototype.interfaces_=function(){return[dt]},yt.prototype.getClass=function(){return yt};var mt=function(){};mt.prototype.isInBoundary=function(t){return t>0},mt.prototype.interfaces_=function(){return[dt]},mt.prototype.getClass=function(){return mt};var vt=function(){};vt.prototype.isInBoundary=function(t){return t>1},vt.prototype.interfaces_=function(){return[dt]},vt.prototype.getClass=function(){return vt};var _t=function(){};_t.prototype.isInBoundary=function(t){return 1===t},_t.prototype.interfaces_=function(){return[dt]},_t.prototype.getClass=function(){return _t};var bt=function(){};bt.prototype.add=function(){},bt.prototype.addAll=function(){},bt.prototype.isEmpty=function(){},bt.prototype.iterator=function(){},bt.prototype.size=function(){},bt.prototype.toArray=function(){},bt.prototype.remove=function(){},(n.prototype=new Error).name="IndexOutOfBoundsException";var wt=function(){};wt.prototype.hasNext=function(){},wt.prototype.next=function(){},wt.prototype.remove=function(){};var Ot=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(){},e.prototype.set=function(){},e.prototype.isEmpty=function(){},e}(bt);(r.prototype=new Error).name="NoSuchElementException";var xt=function(t){function e(){t.call(this),this.array_=[],arguments[0]instanceof bt&&this.addAll(arguments[0])}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.ensureCapacity=function(){},e.prototype.interfaces_=function(){return[t,bt]},e.prototype.add=function(t){return 1===arguments.length?this.array_.push(t):this.array_.splice(arguments[0],arguments[1]),!0},e.prototype.clear=function(){this.array_=[]},e.prototype.addAll=function(t){for(var e=t.iterator();e.hasNext();)this.add(e.next());return!0},e.prototype.set=function(t,e){var n=this.array_[t];return this.array_[t]=e,n},e.prototype.iterator=function(){return new Et(this)},e.prototype.get=function(t){if(t<0||t>=this.size())throw new n;return this.array_[t]},e.prototype.isEmpty=function(){return 0===this.array_.length},e.prototype.size=function(){return this.array_.length},e.prototype.toArray=function(){for(var t=[],e=0,n=this.array_.length;e<n;e++)t.push(this.array_[e]);return t},e.prototype.remove=function(t){for(var e=!1,n=0,r=this.array_.length;n<r;n++)if(this.array_[n]===t){this.array_.splice(n,1),e=!0;break}return e},e}(Ot),Et=function(t){function e(e){t.call(this),this.arrayList_=e,this.position_=0}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.next=function(){if(this.position_===this.arrayList_.size())throw new r;return this.arrayList_.get(this.position_++)},e.prototype.hasNext=function(){return this.position_<this.arrayList_.size()},e.prototype.set=function(t){return this.arrayList_.set(this.position_-1,t)},e.prototype.remove=function(){this.arrayList_.remove(this.arrayList_.get(this.position_))},e}(wt),St=function(t){function e(){if(t.call(this),0===arguments.length);else if(1===arguments.length){var e=arguments[0];this.ensureCapacity(e.length),this.add(e,!0)}else if(2===arguments.length){var n=arguments[0],r=arguments[1];this.ensureCapacity(n.length),this.add(n,r)}}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var n={coordArrayType:{configurable:!0}};return n.coordArrayType.get=function(){return new Array(0).fill(null)},e.prototype.getCoordinate=function(t){return this.get(t)},e.prototype.addAll=function(){if(2===arguments.length){for(var e=arguments[0],n=arguments[1],r=!1,i=e.iterator();i.hasNext();)this.add(i.next(),n),r=!0;return r}return t.prototype.addAll.apply(this,arguments)},e.prototype.clone=function(){for(var e=t.prototype.clone.call(this),n=0;n<this.size();n++)e.add(n,this.get(n).copy());return e},e.prototype.toCoordinateArray=function(){return this.toArray(e.coordArrayType)},e.prototype.add=function(){if(1===arguments.length){var e=arguments[0];t.prototype.add.call(this,e)}else if(2===arguments.length){if(arguments[0]instanceof Array&&"boolean"==typeof arguments[1]){var n=arguments[0],r=arguments[1];return this.add(n,r,!0),!0}if(arguments[0]instanceof E&&"boolean"==typeof arguments[1]){var i=arguments[0];if(!arguments[1]&&this.size()>=1&&this.get(this.size()-1).equals2D(i))return null;t.prototype.add.call(this,i)}else if(arguments[0]instanceof Object&&"boolean"==typeof arguments[1]){var o=arguments[0],a=arguments[1];return this.add(o,a),!0}}else if(3===arguments.length){if("boolean"==typeof arguments[2]&&arguments[0]instanceof Array&&"boolean"==typeof arguments[1]){var s=arguments[0],l=arguments[1];if(arguments[2])for(var u=0;u<s.length;u++)this.add(s[u],l);else for(var c=s.length-1;c>=0;c--)this.add(s[c],l);return!0}if("boolean"==typeof arguments[2]&&Number.isInteger(arguments[0])&&arguments[1]instanceof E){var h=arguments[0],p=arguments[1];if(!arguments[2]){var f=this.size();if(f>0){if(h>0&&this.get(h-1).equals2D(p))return null;if(h<f&&this.get(h).equals2D(p))return null}}t.prototype.add.call(this,h,p)}}else if(4===arguments.length){var d=arguments[0],g=arguments[1],y=arguments[2],m=arguments[3],v=1;y>m&&(v=-1);for(var _=y;_!==m;_+=v)this.add(d[_],g);return!0}},e.prototype.closeRing=function(){this.size()>0&&this.add(new E(this.get(0)),!1)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},Object.defineProperties(e,n),e}(xt),Ct=function(){},Tt={ForwardComparator:{configurable:!0},BidirectionalComparator:{configurable:!0},coordArrayType:{configurable:!0}};Tt.ForwardComparator.get=function(){return It},Tt.BidirectionalComparator.get=function(){return jt},Tt.coordArrayType.get=function(){return new Array(0).fill(null)},Ct.prototype.interfaces_=function(){return[]},Ct.prototype.getClass=function(){return Ct},Ct.isRing=function(t){return!(t.length<4)&&!!t[0].equals2D(t[t.length-1])},Ct.ptNotInList=function(t,e){for(var n=0;n<t.length;n++){var r=t[n];if(Ct.indexOf(r,e)<0)return r}return null},Ct.scroll=function(t,e){var n=Ct.indexOf(e,t);if(n<0)return null;var r=new Array(t.length).fill(null);Y.arraycopy(t,n,r,0,t.length-n),Y.arraycopy(t,0,r,t.length-n,n),Y.arraycopy(r,0,t,0,t.length)},Ct.equals=function(){if(2===arguments.length){var t=arguments[0],e=arguments[1];if(t===e)return!0;if(null===t||null===e)return!1;if(t.length!==e.length)return!1;for(var n=0;n<t.length;n++)if(!t[n].equals(e[n]))return!1;return!0}if(3===arguments.length){var r=arguments[0],i=arguments[1],o=arguments[2];if(r===i)return!0;if(null===r||null===i)return!1;if(r.length!==i.length)return!1;for(var a=0;a<r.length;a++)if(0!==o.compare(r[a],i[a]))return!1;return!0}},Ct.intersection=function(t,e){for(var n=new St,r=0;r<t.length;r++)e.intersects(t[r])&&n.add(t[r],!0);return n.toCoordinateArray()},Ct.hasRepeatedPoints=function(t){for(var e=1;e<t.length;e++)if(t[e-1].equals(t[e]))return!0;return!1},Ct.removeRepeatedPoints=function(t){return Ct.hasRepeatedPoints(t)?new St(t,!1).toCoordinateArray():t},Ct.reverse=function(t){for(var e=t.length-1,n=Math.trunc(e/2),r=0;r<=n;r++){var i=t[r];t[r]=t[e-r],t[e-r]=i}},Ct.removeNull=function(t){for(var e=0,n=0;n<t.length;n++)null!==t[n]&&e++;var r=new Array(e).fill(null);if(0===e)return r;for(var i=0,o=0;o<t.length;o++)null!==t[o]&&(r[i++]=t[o]);return r},Ct.copyDeep=function(){if(1===arguments.length){for(var t=arguments[0],e=new Array(t.length).fill(null),n=0;n<t.length;n++)e[n]=new E(t[n]);return e}if(5===arguments.length)for(var r=arguments[0],i=arguments[1],o=arguments[2],a=arguments[3],s=arguments[4],l=0;l<s;l++)o[a+l]=new E(r[i+l])},Ct.isEqualReversed=function(t,e){for(var n=0;n<t.length;n++){var r=t[n],i=e[t.length-n-1];if(0!==r.compareTo(i))return!1}return!0},Ct.envelope=function(t){for(var e=new X,n=0;n<t.length;n++)e.expandToInclude(t[n]);return e},Ct.toCoordinateArray=function(t){return t.toArray(Ct.coordArrayType)},Ct.atLeastNCoordinatesOrNothing=function(t,e){return e.length>=t?e:[]},Ct.indexOf=function(t,e){for(var n=0;n<e.length;n++)if(t.equals(e[n]))return n;return-1},Ct.increasingDirection=function(t){for(var e=0;e<Math.trunc(t.length/2);e++){var n=t.length-1-e,r=t[e].compareTo(t[n]);if(0!==r)return r}return 1},Ct.compare=function(t,e){for(var n=0;n<t.length&&n<e.length;){var r=t[n].compareTo(e[n]);if(0!==r)return r;n++}return n<e.length?-1:n<t.length?1:0},Ct.minCoordinate=function(t){for(var e=null,n=0;n<t.length;n++)(null===e||e.compareTo(t[n])>0)&&(e=t[n]);return e},Ct.extract=function(t,e,n){e=R.clamp(e,0,t.length);var r=(n=R.clamp(n,-1,t.length))-e+1;n<0&&(r=0),e>=t.length&&(r=0),n<e&&(r=0);var i=new Array(r).fill(null);if(0===r)return i;for(var o=0,a=e;a<=n;a++)i[o++]=t[a];return i},Object.defineProperties(Ct,Tt);var It=function(){};It.prototype.compare=function(t,e){return Ct.compare(t,e)},It.prototype.interfaces_=function(){return[x]},It.prototype.getClass=function(){return It};var jt=function(){};jt.prototype.compare=function(t,e){var n=t,r=e;if(n.length<r.length)return-1;if(n.length>r.length)return 1;if(0===n.length)return 0;var i=Ct.compare(n,r);return Ct.isEqualReversed(n,r)?0:i},jt.prototype.OLDcompare=function(t,e){var n=t,r=e;if(n.length<r.length)return-1;if(n.length>r.length)return 1;if(0===n.length)return 0;for(var i=Ct.increasingDirection(n),o=Ct.increasingDirection(r),a=i>0?0:n.length-1,s=o>0?0:n.length-1,l=0;l<n.length;l++){var u=n[a].compareTo(r[s]);if(0!==u)return u;a+=i,s+=o}return 0},jt.prototype.interfaces_=function(){return[x]},jt.prototype.getClass=function(){return jt};var Lt=function(){};Lt.prototype.get=function(){},Lt.prototype.put=function(){},Lt.prototype.size=function(){},Lt.prototype.values=function(){},Lt.prototype.entrySet=function(){};var Rt=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Lt);(i.prototype=new Error).name="OperationNotSupported",(o.prototype=new bt).contains=function(){};var Pt=function(t){function e(){t.call(this),this.array_=[],arguments[0]instanceof bt&&this.addAll(arguments[0])}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.contains=function(t){for(var e=0,n=this.array_.length;e<n;e++)if(this.array_[e]===t)return!0;return!1},e.prototype.add=function(t){return!this.contains(t)&&(this.array_.push(t),!0)},e.prototype.addAll=function(t){for(var e=t.iterator();e.hasNext();)this.add(e.next());return!0},e.prototype.remove=function(t){throw new Error},e.prototype.size=function(){return this.array_.length},e.prototype.isEmpty=function(){return 0===this.array_.length},e.prototype.toArray=function(){for(var t=[],e=0,n=this.array_.length;e<n;e++)t.push(this.array_[e]);return t},e.prototype.iterator=function(){return new Nt(this)},e}(o),Nt=function(t){function e(e){t.call(this),this.hashSet_=e,this.position_=0}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.next=function(){if(this.position_===this.hashSet_.size())throw new r;return this.hashSet_.array_[this.position_++]},e.prototype.hasNext=function(){return this.position_<this.hashSet_.size()},e.prototype.remove=function(){throw new i},e}(wt),Mt=0;(h.prototype=new Rt).get=function(t){for(var e=this.root_;null!==e;){var n=t.compareTo(e.key);if(n<0)e=e.left;else{if(!(n>0))return e.value;e=e.right}}return null},h.prototype.put=function(t,e){if(null===this.root_)return this.root_={key:t,value:e,left:null,right:null,parent:null,color:Mt,getValue:function(){return this.value},getKey:function(){return this.key}},this.size_=1,null;var n,r,i=this.root_;do{if(n=i,(r=t.compareTo(i.key))<0)i=i.left;else{if(!(r>0)){var o=i.value;return i.value=e,o}i=i.right}}while(null!==i);var a={key:t,left:null,right:null,value:e,parent:n,color:Mt,getValue:function(){return this.value},getKey:function(){return this.key}};return r<0?n.left=a:n.right=a,this.fixAfterInsertion(a),this.size_++,null},h.prototype.fixAfterInsertion=function(t){for(t.color=1;null!=t&&t!==this.root_&&1===t.parent.color;)if(s(t)===u(s(s(t)))){var e=c(s(s(t)));1===a(e)?(l(s(t),Mt),l(e,Mt),l(s(s(t)),1),t=s(s(t))):(t===c(s(t))&&(t=s(t),this.rotateLeft(t)),l(s(t),Mt),l(s(s(t)),1),this.rotateRight(s(s(t))))}else{var n=u(s(s(t)));1===a(n)?(l(s(t),Mt),l(n,Mt),l(s(s(t)),1),t=s(s(t))):(t===u(s(t))&&(t=s(t),this.rotateRight(t)),l(s(t),Mt),l(s(s(t)),1),this.rotateLeft(s(s(t))))}this.root_.color=Mt},h.prototype.values=function(){var t=new xt,e=this.getFirstEntry();if(null!==e)for(t.add(e.value);null!==(e=h.successor(e));)t.add(e.value);return t},h.prototype.entrySet=function(){var t=new Pt,e=this.getFirstEntry();if(null!==e)for(t.add(e);null!==(e=h.successor(e));)t.add(e);return t},h.prototype.rotateLeft=function(t){if(null!=t){var e=t.right;t.right=e.left,null!=e.left&&(e.left.parent=t),e.parent=t.parent,null===t.parent?this.root_=e:t.parent.left===t?t.parent.left=e:t.parent.right=e,e.left=t,t.parent=e}},h.prototype.rotateRight=function(t){if(null!=t){var e=t.left;t.left=e.right,null!=e.right&&(e.right.parent=t),e.parent=t.parent,null===t.parent?this.root_=e:t.parent.right===t?t.parent.right=e:t.parent.left=e,e.right=t,t.parent=e}},h.prototype.getFirstEntry=function(){var t=this.root_;if(null!=t)for(;null!=t.left;)t=t.left;return t},h.successor=function(t){if(null===t)return null;if(null!==t.right){for(var e=t.right;null!==e.left;)e=e.left;return e}for(var n=t.parent,r=t;null!==n&&r===n.right;)r=n,n=n.parent;return n},h.prototype.size=function(){return this.size_};var At=function(){};At.prototype.interfaces_=function(){return[]},At.prototype.getClass=function(){return At},p.prototype=new o,(f.prototype=new p).contains=function(t){for(var e=0,n=this.array_.length;e<n;e++)if(0===this.array_[e].compareTo(t))return!0;return!1},f.prototype.add=function(t){if(this.contains(t))return!1;for(var e=0,n=this.array_.length;e<n;e++)if(1===this.array_[e].compareTo(t))return this.array_.splice(e,0,t),!0;return this.array_.push(t),!0},f.prototype.addAll=function(t){for(var e=t.iterator();e.hasNext();)this.add(e.next());return!0},f.prototype.remove=function(t){throw new i},f.prototype.size=function(){return this.array_.length},f.prototype.isEmpty=function(){return 0===this.array_.length},f.prototype.toArray=function(){for(var t=[],e=0,n=this.array_.length;e<n;e++)t.push(this.array_[e]);return t},f.prototype.iterator=function(){return new kt(this)};var kt=function(t){this.treeSet_=t,this.position_=0};kt.prototype.next=function(){if(this.position_===this.treeSet_.size())throw new r;return this.treeSet_.array_[this.position_++]},kt.prototype.hasNext=function(){return this.position_<this.treeSet_.size()},kt.prototype.remove=function(){throw new i};var Ft=function(){};Ft.sort=function(){var t,e,n,r,i=arguments[0];if(1===arguments.length)r=function(t,e){return t.compareTo(e)},i.sort(r);else if(2===arguments.length)n=arguments[1],r=function(t,e){return n.compare(t,e)},i.sort(r);else if(3===arguments.length){(e=i.slice(arguments[1],arguments[2])).sort();var o=i.slice(0,arguments[1]).concat(e,i.slice(arguments[2],i.length));for(i.splice(0,i.length),t=0;t<o.length;t++)i.push(o[t])}else if(4===arguments.length)for(e=i.slice(arguments[1],arguments[2]),n=arguments[3],r=function(t,e){return n.compare(t,e)},e.sort(r),o=i.slice(0,arguments[1]).concat(e,i.slice(arguments[2],i.length)),i.splice(0,i.length),t=0;t<o.length;t++)i.push(o[t])},Ft.asList=function(t){for(var e=new xt,n=0,r=t.length;n<r;n++)e.add(t[n]);return e};var Dt=function(){},Gt={P:{configurable:!0},L:{configurable:!0},A:{configurable:!0},FALSE:{configurable:!0},TRUE:{configurable:!0},DONTCARE:{configurable:!0},SYM_FALSE:{configurable:!0},SYM_TRUE:{configurable:!0},SYM_DONTCARE:{configurable:!0},SYM_P:{configurable:!0},SYM_L:{configurable:!0},SYM_A:{configurable:!0}};Gt.P.get=function(){return 0},Gt.L.get=function(){return 1},Gt.A.get=function(){return 2},Gt.FALSE.get=function(){return-1},Gt.TRUE.get=function(){return-2},Gt.DONTCARE.get=function(){return-3},Gt.SYM_FALSE.get=function(){return"F"},Gt.SYM_TRUE.get=function(){return"T"},Gt.SYM_DONTCARE.get=function(){return"*"},Gt.SYM_P.get=function(){return"0"},Gt.SYM_L.get=function(){return"1"},Gt.SYM_A.get=function(){return"2"},Dt.prototype.interfaces_=function(){return[]},Dt.prototype.getClass=function(){return Dt},Dt.toDimensionSymbol=function(t){switch(t){case Dt.FALSE:return Dt.SYM_FALSE;case Dt.TRUE:return Dt.SYM_TRUE;case Dt.DONTCARE:return Dt.SYM_DONTCARE;case Dt.P:return Dt.SYM_P;case Dt.L:return Dt.SYM_L;case Dt.A:return Dt.SYM_A}throw new v("Unknown dimension value: "+t)},Dt.toDimensionValue=function(t){switch(A.toUpperCase(t)){case Dt.SYM_FALSE:return Dt.FALSE;case Dt.SYM_TRUE:return Dt.TRUE;case Dt.SYM_DONTCARE:return Dt.DONTCARE;case Dt.SYM_P:return Dt.P;case Dt.SYM_L:return Dt.L;case Dt.SYM_A:return Dt.A}throw new v("Unknown dimension symbol: "+t)},Object.defineProperties(Dt,Gt);var Ut=function(){};Ut.prototype.filter=function(t){},Ut.prototype.interfaces_=function(){return[]},Ut.prototype.getClass=function(){return Ut};var zt=function(){};zt.prototype.filter=function(t,e){},zt.prototype.isDone=function(){},zt.prototype.isGeometryChanged=function(){},zt.prototype.interfaces_=function(){return[]},zt.prototype.getClass=function(){return zt};var Bt=function(t){function e(e,n){if(t.call(this,n),this._geometries=e||[],t.hasNullElements(this._geometries))throw new v("geometries must not contain null elements")}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var n={serialVersionUID:{configurable:!0}};return e.prototype.computeEnvelopeInternal=function(){for(var t=new X,e=0;e<this._geometries.length;e++)t.expandToInclude(this._geometries[e].getEnvelopeInternal());return t},e.prototype.getGeometryN=function(t){return this._geometries[t]},e.prototype.getSortIndex=function(){return t.SORTINDEX_GEOMETRYCOLLECTION},e.prototype.getCoordinates=function(){for(var t=new Array(this.getNumPoints()).fill(null),e=-1,n=0;n<this._geometries.length;n++)for(var r=this._geometries[n].getCoordinates(),i=0;i<r.length;i++)t[++e]=r[i];return t},e.prototype.getArea=function(){for(var t=0,e=0;e<this._geometries.length;e++)t+=this._geometries[e].getArea();return t},e.prototype.equalsExact=function(){if(2===arguments.length){var e=arguments[0],n=arguments[1];if(!this.isEquivalentClass(e))return!1;var r=e;if(this._geometries.length!==r._geometries.length)return!1;for(var i=0;i<this._geometries.length;i++)if(!this._geometries[i].equalsExact(r._geometries[i],n))return!1;return!0}return t.prototype.equalsExact.apply(this,arguments)},e.prototype.normalize=function(){for(var t=0;t<this._geometries.length;t++)this._geometries[t].normalize();Ft.sort(this._geometries)},e.prototype.getCoordinate=function(){return this.isEmpty()?null:this._geometries[0].getCoordinate()},e.prototype.getBoundaryDimension=function(){for(var t=Dt.FALSE,e=0;e<this._geometries.length;e++)t=Math.max(t,this._geometries[e].getBoundaryDimension());return t},e.prototype.getDimension=function(){for(var t=Dt.FALSE,e=0;e<this._geometries.length;e++)t=Math.max(t,this._geometries[e].getDimension());return t},e.prototype.getLength=function(){for(var t=0,e=0;e<this._geometries.length;e++)t+=this._geometries[e].getLength();return t},e.prototype.getNumPoints=function(){for(var t=0,e=0;e<this._geometries.length;e++)t+=this._geometries[e].getNumPoints();return t},e.prototype.getNumGeometries=function(){return this._geometries.length},e.prototype.reverse=function(){for(var t=this._geometries.length,e=new Array(t).fill(null),n=0;n<this._geometries.length;n++)e[n]=this._geometries[n].reverse();return this.getFactory().createGeometryCollection(e)},e.prototype.compareToSameClass=function(){if(1===arguments.length){var t=arguments[0],e=new f(Ft.asList(this._geometries)),n=new f(Ft.asList(t._geometries));return this.compare(e,n)}if(2===arguments.length){for(var r=arguments[0],i=arguments[1],o=r,a=this.getNumGeometries(),s=o.getNumGeometries(),l=0;l<a&&l<s;){var u=this.getGeometryN(l),c=o.getGeometryN(l),h=u.compareToSameClass(c,i);if(0!==h)return h;l++}return l<a?1:l<s?-1:0}},e.prototype.apply=function(){if(L(arguments[0],ft))for(var t=arguments[0],e=0;e<this._geometries.length;e++)this._geometries[e].apply(t);else if(L(arguments[0],zt)){var n=arguments[0];if(0===this._geometries.length)return null;for(var r=0;r<this._geometries.length&&(this._geometries[r].apply(n),!n.isDone());r++);n.isGeometryChanged()&&this.geometryChanged()}else if(L(arguments[0],Ut)){var i=arguments[0];i.filter(this);for(var o=0;o<this._geometries.length;o++)this._geometries[o].apply(i)}else if(L(arguments[0],ut)){var a=arguments[0];a.filter(this);for(var s=0;s<this._geometries.length;s++)this._geometries[s].apply(a)}},e.prototype.getBoundary=function(){return this.checkNotGeometryCollection(this),et.shouldNeverReachHere(),null},e.prototype.clone=function(){var e=t.prototype.clone.call(this);e._geometries=new Array(this._geometries.length).fill(null);for(var n=0;n<this._geometries.length;n++)e._geometries[n]=this._geometries[n].clone();return e},e.prototype.getGeometryType=function(){return"GeometryCollection"},e.prototype.copy=function(){for(var t=new Array(this._geometries.length).fill(null),n=0;n<t.length;n++)t[n]=this._geometries[n].copy();return new e(t,this._factory)},e.prototype.isEmpty=function(){for(var t=0;t<this._geometries.length;t++)if(!this._geometries[t].isEmpty())return!1;return!0},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},n.serialVersionUID.get=function(){return-0x4f07bcb1f857d800},Object.defineProperties(e,n),e}(ct),Vt=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var n={serialVersionUID:{configurable:!0}};return e.prototype.getSortIndex=function(){return ct.SORTINDEX_MULTILINESTRING},e.prototype.equalsExact=function(){if(2===arguments.length){var e=arguments[0],n=arguments[1];return!!this.isEquivalentClass(e)&&t.prototype.equalsExact.call(this,e,n)}return t.prototype.equalsExact.apply(this,arguments)},e.prototype.getBoundaryDimension=function(){return this.isClosed()?Dt.FALSE:0},e.prototype.isClosed=function(){if(this.isEmpty())return!1;for(var t=0;t<this._geometries.length;t++)if(!this._geometries[t].isClosed())return!1;return!0},e.prototype.getDimension=function(){return 1},e.prototype.reverse=function(){for(var t=this._geometries.length,e=new Array(t).fill(null),n=0;n<this._geometries.length;n++)e[t-1-n]=this._geometries[n].reverse();return this.getFactory().createMultiLineString(e)},e.prototype.getBoundary=function(){return new Yt(this).getBoundary()},e.prototype.getGeometryType=function(){return"MultiLineString"},e.prototype.copy=function(){for(var t=new Array(this._geometries.length).fill(null),n=0;n<t.length;n++)t[n]=this._geometries[n].copy();return new e(t,this._factory)},e.prototype.interfaces_=function(){return[At]},e.prototype.getClass=function(){return e},n.serialVersionUID.get=function(){return 0x7155d2ab4afa8000},Object.defineProperties(e,n),e}(Bt),Yt=function(){if(this._geom=null,this._geomFact=null,this._bnRule=null,this._endpointMap=null,1===arguments.length){var t=arguments[0],e=dt.MOD2_BOUNDARY_RULE;this._geom=t,this._geomFact=t.getFactory(),this._bnRule=e}else if(2===arguments.length){var n=arguments[0],r=arguments[1];this._geom=n,this._geomFact=n.getFactory(),this._bnRule=r}};Yt.prototype.boundaryMultiLineString=function(t){if(this._geom.isEmpty())return this.getEmptyMultiPoint();var e=this.computeBoundaryCoordinates(t);return 1===e.length?this._geomFact.createPoint(e[0]):this._geomFact.createMultiPointFromCoords(e)},Yt.prototype.getBoundary=function(){return this._geom instanceof Kt?this.boundaryLineString(this._geom):this._geom instanceof Vt?this.boundaryMultiLineString(this._geom):this._geom.getBoundary()},Yt.prototype.boundaryLineString=function(t){return this._geom.isEmpty()?this.getEmptyMultiPoint():t.isClosed()?this._bnRule.isInBoundary(2)?t.getStartPoint():this._geomFact.createMultiPoint():this._geomFact.createMultiPoint([t.getStartPoint(),t.getEndPoint()])},Yt.prototype.getEmptyMultiPoint=function(){return this._geomFact.createMultiPoint()},Yt.prototype.computeBoundaryCoordinates=function(t){var e=new xt;this._endpointMap=new h;for(var n=0;n<t.getNumGeometries();n++){var r=t.getGeometryN(n);0!==r.getNumPoints()&&(this.addEndpoint(r.getCoordinateN(0)),this.addEndpoint(r.getCoordinateN(r.getNumPoints()-1)))}for(var i=this._endpointMap.entrySet().iterator();i.hasNext();){var o=i.next(),a=o.getValue().count;this._bnRule.isInBoundary(a)&&e.add(o.getKey())}return Ct.toCoordinateArray(e)},Yt.prototype.addEndpoint=function(t){var e=this._endpointMap.get(t);null===e&&(e=new qt,this._endpointMap.put(t,e)),e.count++},Yt.prototype.interfaces_=function(){return[]},Yt.prototype.getClass=function(){return Yt},Yt.getBoundary=function(){if(1===arguments.length){var t=arguments[0];return new Yt(t).getBoundary()}if(2===arguments.length){var e=arguments[0],n=arguments[1];return new Yt(e,n).getBoundary()}};var qt=function(){this.count=null};qt.prototype.interfaces_=function(){return[]},qt.prototype.getClass=function(){return qt};var Xt=function(){},Wt={NEWLINE:{configurable:!0},SIMPLE_ORDINATE_FORMAT:{configurable:!0}};Xt.prototype.interfaces_=function(){return[]},Xt.prototype.getClass=function(){return Xt},Xt.chars=function(t,e){for(var n=new Array(e).fill(null),r=0;r<e;r++)n[r]=t;return String(n)},Xt.getStackTrace=function(){if(1===arguments.length){var t=arguments[0],e=new function(){},n=new function(){}(e);return t.printStackTrace(n),e.toString()}if(2===arguments.length){for(var r=arguments[0],i=arguments[1],o="",a=new function(){}(new function(){}(Xt.getStackTrace(r))),s=0;s<i;s++)try{o+=a.readLine()+Xt.NEWLINE}catch(t){if(!(t instanceof d))throw t;et.shouldNeverReachHere()}return o}},Xt.split=function(t,e){for(var n=e.length,r=new xt,i=""+t,o=i.indexOf(e);o>=0;){var a=i.substring(0,o);r.add(a),o=(i=i.substring(o+n)).indexOf(e)}i.length>0&&r.add(i);for(var s=new Array(r.size()).fill(null),l=0;l<s.length;l++)s[l]=r.get(l);return s},Xt.toString=function(){if(1===arguments.length){var t=arguments[0];return Xt.SIMPLE_ORDINATE_FORMAT.format(t)}},Xt.spaces=function(t){return Xt.chars(" ",t)},Wt.NEWLINE.get=function(){return Y.getProperty("line.separator")},Wt.SIMPLE_ORDINATE_FORMAT.get=function(){return new function(){}("0.#")},Object.defineProperties(Xt,Wt);var Ht=function(){};Ht.prototype.interfaces_=function(){return[]},Ht.prototype.getClass=function(){return Ht},Ht.copyCoord=function(t,e,n,r){for(var i=Math.min(t.getDimension(),n.getDimension()),o=0;o<i;o++)n.setOrdinate(r,o,t.getOrdinate(e,o))},Ht.isRing=function(t){var e=t.size();return 0===e||!(e<=3)&&t.getOrdinate(0,U.X)===t.getOrdinate(e-1,U.X)&&t.getOrdinate(0,U.Y)===t.getOrdinate(e-1,U.Y)},Ht.isEqual=function(t,e){var n=t.size();if(n!==e.size())return!1;for(var r=Math.min(t.getDimension(),e.getDimension()),i=0;i<n;i++)for(var o=0;o<r;o++){var a=t.getOrdinate(i,o),s=e.getOrdinate(i,o);if(t.getOrdinate(i,o)!==e.getOrdinate(i,o)&&(!_.isNaN(a)||!_.isNaN(s)))return!1}return!0},Ht.extend=function(t,e,n){var r=t.create(n,e.getDimension()),i=e.size();if(Ht.copy(e,0,r,0,i),i>0)for(var o=i;o<n;o++)Ht.copy(e,i-1,r,o,1);return r},Ht.reverse=function(t){for(var e=t.size()-1,n=Math.trunc(e/2),r=0;r<=n;r++)Ht.swap(t,r,e-r)},Ht.swap=function(t,e,n){if(e===n)return null;for(var r=0;r<t.getDimension();r++){var i=t.getOrdinate(e,r);t.setOrdinate(e,r,t.getOrdinate(n,r)),t.setOrdinate(n,r,i)}},Ht.copy=function(t,e,n,r,i){for(var o=0;o<i;o++)Ht.copyCoord(t,e+o,n,r+o)},Ht.toString=function(){if(1===arguments.length){var t=arguments[0],e=t.size();if(0===e)return"()";var n=t.getDimension(),r=new N;r.append("(");for(var i=0;i<e;i++){i>0&&r.append(" ");for(var o=0;o<n;o++)o>0&&r.append(","),r.append(Xt.toString(t.getOrdinate(i,o)))}return r.append(")"),r.toString()}},Ht.ensureValidRing=function(t,e){var n=e.size();return 0===n?e:n<=3?Ht.createClosedRing(t,e,4):e.getOrdinate(0,U.X)===e.getOrdinate(n-1,U.X)&&e.getOrdinate(0,U.Y)===e.getOrdinate(n-1,U.Y)?e:Ht.createClosedRing(t,e,n+1)},Ht.createClosedRing=function(t,e,n){var r=t.create(n,e.getDimension()),i=e.size();Ht.copy(e,0,r,0,i);for(var o=i;o<n;o++)Ht.copy(e,0,r,o,1);return r};var Kt=function(t){function e(e,n){t.call(this,n),this._points=null,this.init(e)}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var n={serialVersionUID:{configurable:!0}};return e.prototype.computeEnvelopeInternal=function(){return this.isEmpty()?new X:this._points.expandEnvelope(new X)},e.prototype.isRing=function(){return this.isClosed()&&this.isSimple()},e.prototype.getSortIndex=function(){return t.SORTINDEX_LINESTRING},e.prototype.getCoordinates=function(){return this._points.toCoordinateArray()},e.prototype.equalsExact=function(){if(2===arguments.length){var e=arguments[0],n=arguments[1];if(!this.isEquivalentClass(e))return!1;var r=e;if(this._points.size()!==r._points.size())return!1;for(var i=0;i<this._points.size();i++)if(!this.equal(this._points.getCoordinate(i),r._points.getCoordinate(i),n))return!1;return!0}return t.prototype.equalsExact.apply(this,arguments)},e.prototype.normalize=function(){for(var t=0;t<Math.trunc(this._points.size()/2);t++){var e=this._points.size()-1-t;if(!this._points.getCoordinate(t).equals(this._points.getCoordinate(e)))return this._points.getCoordinate(t).compareTo(this._points.getCoordinate(e))>0&&Ht.reverse(this._points),null}},e.prototype.getCoordinate=function(){return this.isEmpty()?null:this._points.getCoordinate(0)},e.prototype.getBoundaryDimension=function(){return this.isClosed()?Dt.FALSE:0},e.prototype.isClosed=function(){return!this.isEmpty()&&this.getCoordinateN(0).equals2D(this.getCoordinateN(this.getNumPoints()-1))},e.prototype.getEndPoint=function(){return this.isEmpty()?null:this.getPointN(this.getNumPoints()-1)},e.prototype.getDimension=function(){return 1},e.prototype.getLength=function(){return st.computeLength(this._points)},e.prototype.getNumPoints=function(){return this._points.size()},e.prototype.reverse=function(){var t=this._points.copy();return Ht.reverse(t),this.getFactory().createLineString(t)},e.prototype.compareToSameClass=function(){if(1===arguments.length){for(var t=arguments[0],e=0,n=0;e<this._points.size()&&n<t._points.size();){var r=this._points.getCoordinate(e).compareTo(t._points.getCoordinate(n));if(0!==r)return r;e++,n++}return e<this._points.size()?1:n<t._points.size()?-1:0}if(2===arguments.length){var i=arguments[0];return arguments[1].compare(this._points,i._points)}},e.prototype.apply=function(){if(L(arguments[0],ft))for(var t=arguments[0],e=0;e<this._points.size();e++)t.filter(this._points.getCoordinate(e));else if(L(arguments[0],zt)){var n=arguments[0];if(0===this._points.size())return null;for(var r=0;r<this._points.size()&&(n.filter(this._points,r),!n.isDone());r++);n.isGeometryChanged()&&this.geometryChanged()}else L(arguments[0],Ut)?arguments[0].filter(this):L(arguments[0],ut)&&arguments[0].filter(this)},e.prototype.getBoundary=function(){return new Yt(this).getBoundary()},e.prototype.isEquivalentClass=function(t){return t instanceof e},e.prototype.clone=function(){var e=t.prototype.clone.call(this);return e._points=this._points.clone(),e},e.prototype.getCoordinateN=function(t){return this._points.getCoordinate(t)},e.prototype.getGeometryType=function(){return"LineString"},e.prototype.copy=function(){return new e(this._points.copy(),this._factory)},e.prototype.getCoordinateSequence=function(){return this._points},e.prototype.isEmpty=function(){return 0===this._points.size()},e.prototype.init=function(t){if(null===t&&(t=this.getFactory().getCoordinateSequenceFactory().create([])),1===t.size())throw new v("Invalid number of points in LineString (found "+t.size()+" - must be 0 or >= 2)");this._points=t},e.prototype.isCoordinate=function(t){for(var e=0;e<this._points.size();e++)if(this._points.getCoordinate(e).equals(t))return!0;return!1},e.prototype.getStartPoint=function(){return this.isEmpty()?null:this.getPointN(0)},e.prototype.getPointN=function(t){return this.getFactory().createPoint(this._points.getCoordinate(t))},e.prototype.interfaces_=function(){return[At]},e.prototype.getClass=function(){return e},n.serialVersionUID.get=function(){return 0x2b2b51ba435c8e00},Object.defineProperties(e,n),e}(ct),Zt=function(){};Zt.prototype.interfaces_=function(){return[]},Zt.prototype.getClass=function(){return Zt};var Jt=function(t){function e(e,n){t.call(this,n),this._coordinates=e||null,this.init(this._coordinates)}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var n={serialVersionUID:{configurable:!0}};return e.prototype.computeEnvelopeInternal=function(){if(this.isEmpty())return new X;var t=new X;return t.expandToInclude(this._coordinates.getX(0),this._coordinates.getY(0)),t},e.prototype.getSortIndex=function(){return t.SORTINDEX_POINT},e.prototype.getCoordinates=function(){return this.isEmpty()?[]:[this.getCoordinate()]},e.prototype.equalsExact=function(){if(2===arguments.length){var e=arguments[0],n=arguments[1];return!!this.isEquivalentClass(e)&&(!(!this.isEmpty()||!e.isEmpty())||this.isEmpty()===e.isEmpty()&&this.equal(e.getCoordinate(),this.getCoordinate(),n))}return t.prototype.equalsExact.apply(this,arguments)},e.prototype.normalize=function(){},e.prototype.getCoordinate=function(){return 0!==this._coordinates.size()?this._coordinates.getCoordinate(0):null},e.prototype.getBoundaryDimension=function(){return Dt.FALSE},e.prototype.getDimension=function(){return 0},e.prototype.getNumPoints=function(){return this.isEmpty()?0:1},e.prototype.reverse=function(){return this.copy()},e.prototype.getX=function(){if(null===this.getCoordinate())throw new Error("getX called on empty Point");return this.getCoordinate().x},e.prototype.compareToSameClass=function(){if(1===arguments.length){var t=arguments[0];return this.getCoordinate().compareTo(t.getCoordinate())}if(2===arguments.length){var e=arguments[0];return arguments[1].compare(this._coordinates,e._coordinates)}},e.prototype.apply=function(){if(L(arguments[0],ft)){var t=arguments[0];if(this.isEmpty())return null;t.filter(this.getCoordinate())}else if(L(arguments[0],zt)){var e=arguments[0];if(this.isEmpty())return null;e.filter(this._coordinates,0),e.isGeometryChanged()&&this.geometryChanged()}else L(arguments[0],Ut)?arguments[0].filter(this):L(arguments[0],ut)&&arguments[0].filter(this)},e.prototype.getBoundary=function(){return this.getFactory().createGeometryCollection(null)},e.prototype.clone=function(){var e=t.prototype.clone.call(this);return e._coordinates=this._coordinates.clone(),e},e.prototype.getGeometryType=function(){return"Point"},e.prototype.copy=function(){return new e(this._coordinates.copy(),this._factory)},e.prototype.getCoordinateSequence=function(){return this._coordinates},e.prototype.getY=function(){if(null===this.getCoordinate())throw new Error("getY called on empty Point");return this.getCoordinate().y},e.prototype.isEmpty=function(){return 0===this._coordinates.size()},e.prototype.init=function(t){null===t&&(t=this.getFactory().getCoordinateSequenceFactory().create([])),et.isTrue(t.size()<=1),this._coordinates=t},e.prototype.isSimple=function(){return!0},e.prototype.interfaces_=function(){return[Zt]},e.prototype.getClass=function(){return e},n.serialVersionUID.get=function(){return 0x44077bad161cbc00},Object.defineProperties(e,n),e}(ct),$t=function(){};$t.prototype.interfaces_=function(){return[]},$t.prototype.getClass=function(){return $t};var Qt=function(t){function e(e,n,r){if(t.call(this,r),this._shell=null,this._holes=null,null===e&&(e=this.getFactory().createLinearRing()),null===n&&(n=[]),t.hasNullElements(n))throw new v("holes must not contain null elements");if(e.isEmpty()&&t.hasNonEmptyElements(n))throw new v("shell is empty but holes are not");this._shell=e,this._holes=n}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var n={serialVersionUID:{configurable:!0}};return e.prototype.computeEnvelopeInternal=function(){return this._shell.getEnvelopeInternal()},e.prototype.getSortIndex=function(){return t.SORTINDEX_POLYGON},e.prototype.getCoordinates=function(){if(this.isEmpty())return[];for(var t=new Array(this.getNumPoints()).fill(null),e=-1,n=this._shell.getCoordinates(),r=0;r<n.length;r++)t[++e]=n[r];for(var i=0;i<this._holes.length;i++)for(var o=this._holes[i].getCoordinates(),a=0;a<o.length;a++)t[++e]=o[a];return t},e.prototype.getArea=function(){var t=0;t+=Math.abs(st.signedArea(this._shell.getCoordinateSequence()));for(var e=0;e<this._holes.length;e++)t-=Math.abs(st.signedArea(this._holes[e].getCoordinateSequence()));return t},e.prototype.isRectangle=function(){if(0!==this.getNumInteriorRing())return!1;if(null===this._shell)return!1;if(5!==this._shell.getNumPoints())return!1;for(var t=this._shell.getCoordinateSequence(),e=this.getEnvelopeInternal(),n=0;n<5;n++){var r=t.getX(n);if(r!==e.getMinX()&&r!==e.getMaxX())return!1;var i=t.getY(n);if(i!==e.getMinY()&&i!==e.getMaxY())return!1}for(var o=t.getX(0),a=t.getY(0),s=1;s<=4;s++){var l=t.getX(s),u=t.getY(s);if(l!==o===(u!==a))return!1;o=l,a=u}return!0},e.prototype.equalsExact=function(){if(2===arguments.length){var e=arguments[0],n=arguments[1];if(!this.isEquivalentClass(e))return!1;var r=e,i=this._shell,o=r._shell;if(!i.equalsExact(o,n))return!1;if(this._holes.length!==r._holes.length)return!1;for(var a=0;a<this._holes.length;a++)if(!this._holes[a].equalsExact(r._holes[a],n))return!1;return!0}return t.prototype.equalsExact.apply(this,arguments)},e.prototype.normalize=function(){if(0===arguments.length){this.normalize(this._shell,!0);for(var t=0;t<this._holes.length;t++)this.normalize(this._holes[t],!1);Ft.sort(this._holes)}else if(2===arguments.length){var e=arguments[0],n=arguments[1];if(e.isEmpty())return null;var r=new Array(e.getCoordinates().length-1).fill(null);Y.arraycopy(e.getCoordinates(),0,r,0,r.length);var i=Ct.minCoordinate(e.getCoordinates());Ct.scroll(r,i),Y.arraycopy(r,0,e.getCoordinates(),0,r.length),e.getCoordinates()[r.length]=r[0],st.isCCW(e.getCoordinates())===n&&Ct.reverse(e.getCoordinates())}},e.prototype.getCoordinate=function(){return this._shell.getCoordinate()},e.prototype.getNumInteriorRing=function(){return this._holes.length},e.prototype.getBoundaryDimension=function(){return 1},e.prototype.getDimension=function(){return 2},e.prototype.getLength=function(){var t=0;t+=this._shell.getLength();for(var e=0;e<this._holes.length;e++)t+=this._holes[e].getLength();return t},e.prototype.getNumPoints=function(){for(var t=this._shell.getNumPoints(),e=0;e<this._holes.length;e++)t+=this._holes[e].getNumPoints();return t},e.prototype.reverse=function(){var t=this.copy();t._shell=this._shell.copy().reverse(),t._holes=new Array(this._holes.length).fill(null);for(var e=0;e<this._holes.length;e++)t._holes[e]=this._holes[e].copy().reverse();return t},e.prototype.convexHull=function(){return this.getExteriorRing().convexHull()},e.prototype.compareToSameClass=function(){if(1===arguments.length){var t=arguments[0],e=this._shell,n=t._shell;return e.compareToSameClass(n)}if(2===arguments.length){var r=arguments[0],i=arguments[1],o=r,a=this._shell,s=o._shell,l=a.compareToSameClass(s,i);if(0!==l)return l;for(var u=this.getNumInteriorRing(),c=o.getNumInteriorRing(),h=0;h<u&&h<c;){var p=this.getInteriorRingN(h),f=o.getInteriorRingN(h),d=p.compareToSameClass(f,i);if(0!==d)return d;h++}return h<u?1:h<c?-1:0}},e.prototype.apply=function(t){if(L(t,ft)){this._shell.apply(t);for(var e=0;e<this._holes.length;e++)this._holes[e].apply(t)}else if(L(t,zt)){if(this._shell.apply(t),!t.isDone())for(var n=0;n<this._holes.length&&(this._holes[n].apply(t),!t.isDone());n++);t.isGeometryChanged()&&this.geometryChanged()}else if(L(t,Ut))t.filter(this);else if(L(t,ut)){t.filter(this),this._shell.apply(t);for(var r=0;r<this._holes.length;r++)this._holes[r].apply(t)}},e.prototype.getBoundary=function(){if(this.isEmpty())return this.getFactory().createMultiLineString();var t=new Array(this._holes.length+1).fill(null);t[0]=this._shell;for(var e=0;e<this._holes.length;e++)t[e+1]=this._holes[e];return t.length<=1?this.getFactory().createLinearRing(t[0].getCoordinateSequence()):this.getFactory().createMultiLineString(t)},e.prototype.clone=function(){var e=t.prototype.clone.call(this);e._shell=this._shell.clone(),e._holes=new Array(this._holes.length).fill(null);for(var n=0;n<this._holes.length;n++)e._holes[n]=this._holes[n].clone();return e},e.prototype.getGeometryType=function(){return"Polygon"},e.prototype.copy=function(){for(var t=this._shell.copy(),n=new Array(this._holes.length).fill(null),r=0;r<n.length;r++)n[r]=this._holes[r].copy();return new e(t,n,this._factory)},e.prototype.getExteriorRing=function(){return this._shell},e.prototype.isEmpty=function(){return this._shell.isEmpty()},e.prototype.getInteriorRingN=function(t){return this._holes[t]},e.prototype.interfaces_=function(){return[$t]},e.prototype.getClass=function(){return e},n.serialVersionUID.get=function(){return-0x307ffefd8dc97200},Object.defineProperties(e,n),e}(ct),te=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var n={serialVersionUID:{configurable:!0}};return e.prototype.getSortIndex=function(){return ct.SORTINDEX_MULTIPOINT},e.prototype.isValid=function(){return!0},e.prototype.equalsExact=function(){if(2===arguments.length){var e=arguments[0],n=arguments[1];return!!this.isEquivalentClass(e)&&t.prototype.equalsExact.call(this,e,n)}return t.prototype.equalsExact.apply(this,arguments)},e.prototype.getCoordinate=function(){if(1===arguments.length){var e=arguments[0];return this._geometries[e].getCoordinate()}return t.prototype.getCoordinate.apply(this,arguments)},e.prototype.getBoundaryDimension=function(){return Dt.FALSE},e.prototype.getDimension=function(){return 0},e.prototype.getBoundary=function(){return this.getFactory().createGeometryCollection(null)},e.prototype.getGeometryType=function(){return"MultiPoint"},e.prototype.copy=function(){for(var t=new Array(this._geometries.length).fill(null),n=0;n<t.length;n++)t[n]=this._geometries[n].copy();return new e(t,this._factory)},e.prototype.interfaces_=function(){return[Zt]},e.prototype.getClass=function(){return e},n.serialVersionUID.get=function(){return-0x6fb1ed4162e0fc00},Object.defineProperties(e,n),e}(Bt),ee=function(t){function e(e,n){e instanceof E&&n instanceof me&&(e=n.getCoordinateSequenceFactory().create(e)),t.call(this,e,n),this.validateConstruction()}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var n={MINIMUM_VALID_SIZE:{configurable:!0},serialVersionUID:{configurable:!0}};return e.prototype.getSortIndex=function(){return ct.SORTINDEX_LINEARRING},e.prototype.getBoundaryDimension=function(){return Dt.FALSE},e.prototype.isClosed=function(){return!!this.isEmpty()||t.prototype.isClosed.call(this)},e.prototype.reverse=function(){var t=this._points.copy();return Ht.reverse(t),this.getFactory().createLinearRing(t)},e.prototype.validateConstruction=function(){if(!this.isEmpty()&&!t.prototype.isClosed.call(this))throw new v("Points of LinearRing do not form a closed linestring");if(this.getCoordinateSequence().size()>=1&&this.getCoordinateSequence().size()<e.MINIMUM_VALID_SIZE)throw new v("Invalid number of points in LinearRing (found "+this.getCoordinateSequence().size()+" - must be 0 or >= 4)")},e.prototype.getGeometryType=function(){return"LinearRing"},e.prototype.copy=function(){return new e(this._points.copy(),this._factory)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},n.MINIMUM_VALID_SIZE.get=function(){return 4},n.serialVersionUID.get=function(){return-0x3b229e262367a600},Object.defineProperties(e,n),e}(Kt),ne=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var n={serialVersionUID:{configurable:!0}};return e.prototype.getSortIndex=function(){return ct.SORTINDEX_MULTIPOLYGON},e.prototype.equalsExact=function(){if(2===arguments.length){var e=arguments[0],n=arguments[1];return!!this.isEquivalentClass(e)&&t.prototype.equalsExact.call(this,e,n)}return t.prototype.equalsExact.apply(this,arguments)},e.prototype.getBoundaryDimension=function(){return 1},e.prototype.getDimension=function(){return 2},e.prototype.reverse=function(){for(var t=this._geometries.length,e=new Array(t).fill(null),n=0;n<this._geometries.length;n++)e[n]=this._geometries[n].reverse();return this.getFactory().createMultiPolygon(e)},e.prototype.getBoundary=function(){if(this.isEmpty())return this.getFactory().createMultiLineString();for(var t=new xt,e=0;e<this._geometries.length;e++)for(var n=this._geometries[e].getBoundary(),r=0;r<n.getNumGeometries();r++)t.add(n.getGeometryN(r));var i=new Array(t.size()).fill(null);return this.getFactory().createMultiLineString(t.toArray(i))},e.prototype.getGeometryType=function(){return"MultiPolygon"},e.prototype.copy=function(){for(var t=new Array(this._geometries.length).fill(null),n=0;n<t.length;n++)t[n]=this._geometries[n].copy();return new e(t,this._factory)},e.prototype.interfaces_=function(){return[$t]},e.prototype.getClass=function(){return e},n.serialVersionUID.get=function(){return-0x7a5aa1369171980},Object.defineProperties(e,n),e}(Bt),re=function(t){this._factory=t||null,this._isUserDataCopied=!1},ie={NoOpGeometryOperation:{configurable:!0},CoordinateOperation:{configurable:!0},CoordinateSequenceOperation:{configurable:!0}};re.prototype.setCopyUserData=function(t){this._isUserDataCopied=t},re.prototype.edit=function(t,e){if(null===t)return null;var n=this.editInternal(t,e);return this._isUserDataCopied&&n.setUserData(t.getUserData()),n},re.prototype.editInternal=function(t,e){return null===this._factory&&(this._factory=t.getFactory()),t instanceof Bt?this.editGeometryCollection(t,e):t instanceof Qt?this.editPolygon(t,e):t instanceof Jt?e.edit(t,this._factory):t instanceof Kt?e.edit(t,this._factory):(et.shouldNeverReachHere("Unsupported Geometry class: "+t.getClass().getName()),null)},re.prototype.editGeometryCollection=function(t,e){for(var n=e.edit(t,this._factory),r=new xt,i=0;i<n.getNumGeometries();i++){var o=this.edit(n.getGeometryN(i),e);null===o||o.isEmpty()||r.add(o)}return n.getClass()===te?this._factory.createMultiPoint(r.toArray([])):n.getClass()===Vt?this._factory.createMultiLineString(r.toArray([])):n.getClass()===ne?this._factory.createMultiPolygon(r.toArray([])):this._factory.createGeometryCollection(r.toArray([]))},re.prototype.editPolygon=function(t,e){var n=e.edit(t,this._factory);if(null===n&&(n=this._factory.createPolygon(null)),n.isEmpty())return n;var r=this.edit(n.getExteriorRing(),e);if(null===r||r.isEmpty())return this._factory.createPolygon();for(var i=new xt,o=0;o<n.getNumInteriorRing();o++){var a=this.edit(n.getInteriorRingN(o),e);null===a||a.isEmpty()||i.add(a)}return this._factory.createPolygon(r,i.toArray([]))},re.prototype.interfaces_=function(){return[]},re.prototype.getClass=function(){return re},re.GeometryEditorOperation=function(){},ie.NoOpGeometryOperation.get=function(){return oe},ie.CoordinateOperation.get=function(){return ae},ie.CoordinateSequenceOperation.get=function(){return se},Object.defineProperties(re,ie);var oe=function(){};oe.prototype.edit=function(t,e){return t},oe.prototype.interfaces_=function(){return[re.GeometryEditorOperation]},oe.prototype.getClass=function(){return oe};var ae=function(){};ae.prototype.edit=function(t,e){var n=this.editCoordinates(t.getCoordinates(),t);return null===n?t:t instanceof ee?e.createLinearRing(n):t instanceof Kt?e.createLineString(n):t instanceof Jt?n.length>0?e.createPoint(n[0]):e.createPoint():t},ae.prototype.interfaces_=function(){return[re.GeometryEditorOperation]},ae.prototype.getClass=function(){return ae};var se=function(){};se.prototype.edit=function(t,e){return t instanceof ee?e.createLinearRing(this.edit(t.getCoordinateSequence(),t)):t instanceof Kt?e.createLineString(this.edit(t.getCoordinateSequence(),t)):t instanceof Jt?e.createPoint(this.edit(t.getCoordinateSequence(),t)):t},se.prototype.interfaces_=function(){return[re.GeometryEditorOperation]},se.prototype.getClass=function(){return se};var le=function(){if(this._dimension=3,this._coordinates=null,1===arguments.length){if(arguments[0]instanceof Array)this._coordinates=arguments[0],this._dimension=3;else if(Number.isInteger(arguments[0])){var t=arguments[0];this._coordinates=new Array(t).fill(null);for(var e=0;e<t;e++)this._coordinates[e]=new E}else if(L(arguments[0],U)){var n=arguments[0];if(null===n)return this._coordinates=new Array(0).fill(null),null;this._dimension=n.getDimension(),this._coordinates=new Array(n.size()).fill(null);for(var r=0;r<this._coordinates.length;r++)this._coordinates[r]=n.getCoordinateCopy(r)}}else if(2===arguments.length)if(arguments[0]instanceof Array&&Number.isInteger(arguments[1])){var i=arguments[0],o=arguments[1];this._coordinates=i,this._dimension=o,null===i&&(this._coordinates=new Array(0).fill(null))}else if(Number.isInteger(arguments[0])&&Number.isInteger(arguments[1])){var a=arguments[0],s=arguments[1];this._coordinates=new Array(a).fill(null),this._dimension=s;for(var l=0;l<a;l++)this._coordinates[l]=new E}},ue={serialVersionUID:{configurable:!0}};le.prototype.setOrdinate=function(t,e,n){switch(e){case U.X:this._coordinates[t].x=n;break;case U.Y:this._coordinates[t].y=n;break;case U.Z:this._coordinates[t].z=n;break;default:throw new v("invalid ordinateIndex")}},le.prototype.size=function(){return this._coordinates.length},le.prototype.getOrdinate=function(t,e){switch(e){case U.X:return this._coordinates[t].x;case U.Y:return this._coordinates[t].y;case U.Z:return this._coordinates[t].z}return _.NaN},le.prototype.getCoordinate=function(){if(1===arguments.length){var t=arguments[0];return this._coordinates[t]}if(2===arguments.length){var e=arguments[0],n=arguments[1];n.x=this._coordinates[e].x,n.y=this._coordinates[e].y,n.z=this._coordinates[e].z}},le.prototype.getCoordinateCopy=function(t){return new E(this._coordinates[t])},le.prototype.getDimension=function(){return this._dimension},le.prototype.getX=function(t){return this._coordinates[t].x},le.prototype.clone=function(){for(var t=new Array(this.size()).fill(null),e=0;e<this._coordinates.length;e++)t[e]=this._coordinates[e].clone();return new le(t,this._dimension)},le.prototype.expandEnvelope=function(t){for(var e=0;e<this._coordinates.length;e++)t.expandToInclude(this._coordinates[e]);return t},le.prototype.copy=function(){for(var t=new Array(this.size()).fill(null),e=0;e<this._coordinates.length;e++)t[e]=this._coordinates[e].copy();return new le(t,this._dimension)},le.prototype.toString=function(){if(this._coordinates.length>0){var t=new N(17*this._coordinates.length);t.append("("),t.append(this._coordinates[0]);for(var e=1;e<this._coordinates.length;e++)t.append(", "),t.append(this._coordinates[e]);return t.append(")"),t.toString()}return"()"},le.prototype.getY=function(t){return this._coordinates[t].y},le.prototype.toCoordinateArray=function(){return this._coordinates},le.prototype.interfaces_=function(){return[U,e]},le.prototype.getClass=function(){return le},ue.serialVersionUID.get=function(){return-0xcb44a778db18e00},Object.defineProperties(le,ue);var ce=function(){},he={serialVersionUID:{configurable:!0},instanceObject:{configurable:!0}};ce.prototype.readResolve=function(){return ce.instance()},ce.prototype.create=function(){if(1===arguments.length){if(arguments[0]instanceof Array){var t=arguments[0];return new le(t)}if(L(arguments[0],U)){var e=arguments[0];return new le(e)}}else if(2===arguments.length){var n=arguments[0],r=arguments[1];return r>3&&(r=3),r<2?new le(n):new le(n,r)}},ce.prototype.interfaces_=function(){return[T,e]},ce.prototype.getClass=function(){return ce},ce.instance=function(){return ce.instanceObject},he.serialVersionUID.get=function(){return-0x38e49fa6cf6f2e00},he.instanceObject.get=function(){return new ce},Object.defineProperties(ce,he);var pe=function(t){function e(){t.call(this),this.map_=new Map}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(t){return this.map_.get(t)||null},e.prototype.put=function(t,e){return this.map_.set(t,e),e},e.prototype.values=function(){for(var t=new xt,e=this.map_.values(),n=e.next();!n.done;)t.add(n.value),n=e.next();return t},e.prototype.entrySet=function(){var t=new Pt;return this.map_.entries().forEach(function(e){return t.add(e)}),t},e.prototype.size=function(){return this.map_.size()},e}(Lt),fe=function t(){if(this._modelType=null,this._scale=null,0===arguments.length)this._modelType=t.FLOATING;else if(1===arguments.length)if(arguments[0]instanceof ge){var e=arguments[0];this._modelType=e,e===t.FIXED&&this.setScale(1)}else if("number"==typeof arguments[0]){var n=arguments[0];this._modelType=t.FIXED,this.setScale(n)}else if(arguments[0]instanceof t){var r=arguments[0];this._modelType=r._modelType,this._scale=r._scale}},de={serialVersionUID:{configurable:!0},maximumPreciseValue:{configurable:!0}};fe.prototype.equals=function(t){if(!(t instanceof fe))return!1;var e=t;return this._modelType===e._modelType&&this._scale===e._scale},fe.prototype.compareTo=function(t){var e=t,n=this.getMaximumSignificantDigits(),r=e.getMaximumSignificantDigits();return new M(n).compareTo(new M(r))},fe.prototype.getScale=function(){return this._scale},fe.prototype.isFloating=function(){return this._modelType===fe.FLOATING||this._modelType===fe.FLOATING_SINGLE},fe.prototype.getType=function(){return this._modelType},fe.prototype.toString=function(){var t="UNKNOWN";return this._modelType===fe.FLOATING?t="Floating":this._modelType===fe.FLOATING_SINGLE?t="Floating-Single":this._modelType===fe.FIXED&&(t="Fixed (Scale="+this.getScale()+")"),t},fe.prototype.makePrecise=function(){if("number"==typeof arguments[0]){var t=arguments[0];return _.isNaN(t)?t:this._modelType===fe.FLOATING_SINGLE?t:this._modelType===fe.FIXED?Math.round(t*this._scale)/this._scale:t}if(arguments[0]instanceof E){var e=arguments[0];if(this._modelType===fe.FLOATING)return null;e.x=this.makePrecise(e.x),e.y=this.makePrecise(e.y)}},fe.prototype.getMaximumSignificantDigits=function(){var t=16;return this._modelType===fe.FLOATING?t=16:this._modelType===fe.FLOATING_SINGLE?t=6:this._modelType===fe.FIXED&&(t=1+Math.trunc(Math.ceil(Math.log(this.getScale())/Math.log(10)))),t},fe.prototype.setScale=function(t){this._scale=Math.abs(t)},fe.prototype.interfaces_=function(){return[e,w]},fe.prototype.getClass=function(){return fe},fe.mostPrecise=function(t,e){return t.compareTo(e)>=0?t:e},de.serialVersionUID.get=function(){return 0x6bee6404e9a25c00},de.maximumPreciseValue.get=function(){return 9007199254740992},Object.defineProperties(fe,de);var ge=function t(e){this._name=e||null,t.nameToTypeMap.put(e,this)},ye={serialVersionUID:{configurable:!0},nameToTypeMap:{configurable:!0}};ge.prototype.readResolve=function(){return ge.nameToTypeMap.get(this._name)},ge.prototype.toString=function(){return this._name},ge.prototype.interfaces_=function(){return[e]},ge.prototype.getClass=function(){return ge},ye.serialVersionUID.get=function(){return-552860263173159e4},ye.nameToTypeMap.get=function(){return new pe},Object.defineProperties(ge,ye),fe.Type=ge,fe.FIXED=new ge("FIXED"),fe.FLOATING=new ge("FLOATING"),fe.FLOATING_SINGLE=new ge("FLOATING SINGLE");var me=function t(){this._precisionModel=new fe,this._SRID=0,this._coordinateSequenceFactory=t.getDefaultCoordinateSequenceFactory(),0===arguments.length||(1===arguments.length?L(arguments[0],T)?this._coordinateSequenceFactory=arguments[0]:arguments[0]instanceof fe&&(this._precisionModel=arguments[0]):2===arguments.length?(this._precisionModel=arguments[0],this._SRID=arguments[1]):3===arguments.length&&(this._precisionModel=arguments[0],this._SRID=arguments[1],this._coordinateSequenceFactory=arguments[2]))},ve={serialVersionUID:{configurable:!0}};me.prototype.toGeometry=function(t){return t.isNull()?this.createPoint(null):t.getMinX()===t.getMaxX()&&t.getMinY()===t.getMaxY()?this.createPoint(new E(t.getMinX(),t.getMinY())):t.getMinX()===t.getMaxX()||t.getMinY()===t.getMaxY()?this.createLineString([new E(t.getMinX(),t.getMinY()),new E(t.getMaxX(),t.getMaxY())]):this.createPolygon(this.createLinearRing([new E(t.getMinX(),t.getMinY()),new E(t.getMinX(),t.getMaxY()),new E(t.getMaxX(),t.getMaxY()),new E(t.getMaxX(),t.getMinY()),new E(t.getMinX(),t.getMinY())]),null)},me.prototype.createLineString=function(t){return t?t instanceof Array?new Kt(this.getCoordinateSequenceFactory().create(t),this):L(t,U)?new Kt(t,this):void 0:new Kt(this.getCoordinateSequenceFactory().create([]),this)},me.prototype.createMultiLineString=function(){if(0===arguments.length)return new Vt(null,this);if(1===arguments.length){var t=arguments[0];return new Vt(t,this)}},me.prototype.buildGeometry=function(t){for(var e=null,n=!1,r=!1,i=t.iterator();i.hasNext();){var o=i.next(),a=o.getClass();null===e&&(e=a),a!==e&&(n=!0),o.isGeometryCollectionOrDerived()&&(r=!0)}if(null===e)return this.createGeometryCollection();if(n||r)return this.createGeometryCollection(me.toGeometryArray(t));var s=t.iterator().next();if(t.size()>1){if(s instanceof Qt)return this.createMultiPolygon(me.toPolygonArray(t));if(s instanceof Kt)return this.createMultiLineString(me.toLineStringArray(t));if(s instanceof Jt)return this.createMultiPoint(me.toPointArray(t));et.shouldNeverReachHere("Unhandled class: "+s.getClass().getName())}return s},me.prototype.createMultiPointFromCoords=function(t){return this.createMultiPoint(null!==t?this.getCoordinateSequenceFactory().create(t):null)},me.prototype.createPoint=function(){if(0===arguments.length)return this.createPoint(this.getCoordinateSequenceFactory().create([]));if(1===arguments.length){if(arguments[0]instanceof E){var t=arguments[0];return this.createPoint(null!==t?this.getCoordinateSequenceFactory().create([t]):null)}if(L(arguments[0],U)){var e=arguments[0];return new Jt(e,this)}}},me.prototype.getCoordinateSequenceFactory=function(){return this._coordinateSequenceFactory},me.prototype.createPolygon=function(){if(0===arguments.length)return new Qt(null,null,this);if(1===arguments.length){if(L(arguments[0],U)){var t=arguments[0];return this.createPolygon(this.createLinearRing(t))}if(arguments[0]instanceof Array){var e=arguments[0];return this.createPolygon(this.createLinearRing(e))}if(arguments[0]instanceof ee){var n=arguments[0];return this.createPolygon(n,null)}}else if(2===arguments.length){var r=arguments[0],i=arguments[1];return new Qt(r,i,this)}},me.prototype.getSRID=function(){return this._SRID},me.prototype.createGeometryCollection=function(){if(0===arguments.length)return new Bt(null,this);if(1===arguments.length){var t=arguments[0];return new Bt(t,this)}},me.prototype.createGeometry=function(t){return new re(this).edit(t,{edit:function(){if(2===arguments.length){var t=arguments[0];return this._coordinateSequenceFactory.create(t)}}})},me.prototype.getPrecisionModel=function(){return this._precisionModel},me.prototype.createLinearRing=function(){if(0===arguments.length)return this.createLinearRing(this.getCoordinateSequenceFactory().create([]));if(1===arguments.length){if(arguments[0]instanceof Array){var t=arguments[0];return this.createLinearRing(null!==t?this.getCoordinateSequenceFactory().create(t):null)}if(L(arguments[0],U)){var e=arguments[0];return new ee(e,this)}}},me.prototype.createMultiPolygon=function(){if(0===arguments.length)return new ne(null,this);if(1===arguments.length){var t=arguments[0];return new ne(t,this)}},me.prototype.createMultiPoint=function(){if(0===arguments.length)return new te(null,this);if(1===arguments.length){if(arguments[0]instanceof Array){var t=arguments[0];return new te(t,this)}if(arguments[0]instanceof Array){var e=arguments[0];return this.createMultiPoint(null!==e?this.getCoordinateSequenceFactory().create(e):null)}if(L(arguments[0],U)){var n=arguments[0];if(null===n)return this.createMultiPoint(new Array(0).fill(null));for(var r=new Array(n.size()).fill(null),i=0;i<n.size();i++){var o=this.getCoordinateSequenceFactory().create(1,n.getDimension());Ht.copy(n,i,o,0,1),r[i]=this.createPoint(o)}return this.createMultiPoint(r)}}},me.prototype.interfaces_=function(){return[e]},me.prototype.getClass=function(){return me},me.toMultiPolygonArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},me.toGeometryArray=function(t){if(null===t)return null;var e=new Array(t.size()).fill(null);return t.toArray(e)},me.getDefaultCoordinateSequenceFactory=function(){return ce.instance()},me.toMultiLineStringArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},me.toLineStringArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},me.toMultiPointArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},me.toLinearRingArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},me.toPointArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},me.toPolygonArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},me.createPointFromInternalCoord=function(t,e){return e.getPrecisionModel().makePrecise(t),e.getFactory().createPoint(t)},ve.serialVersionUID.get=function(){return-0x5ea75f2051eeb400},Object.defineProperties(me,ve);var _e=["Point","MultiPoint","LineString","MultiLineString","Polygon","MultiPolygon"],be=function(t){this.geometryFactory=t||new me};be.prototype.read=function(t){var e,n=(e="string"==typeof t?JSON.parse(t):t).type;if(!we[n])throw new Error("Unknown GeoJSON type: "+e.type);return-1!==_e.indexOf(n)?we[n].apply(this,[e.coordinates]):"GeometryCollection"===n?we[n].apply(this,[e.geometries]):we[n].apply(this,[e])},be.prototype.write=function(t){var e=t.getGeometryType();if(!Oe[e])throw new Error("Geometry is not supported");return Oe[e].apply(this,[t])};var we={Feature:function(t){var e={};for(var n in t)e[n]=t[n];if(t.geometry){var r=t.geometry.type;if(!we[r])throw new Error("Unknown GeoJSON type: "+t.type);e.geometry=this.read(t.geometry)}return t.bbox&&(e.bbox=we.bbox.apply(this,[t.bbox])),e},FeatureCollection:function(t){var e={};if(t.features){e.features=[];for(var n=0;n<t.features.length;++n)e.features.push(this.read(t.features[n]))}return t.bbox&&(e.bbox=this.parse.bbox.apply(this,[t.bbox])),e},coordinates:function(t){for(var e=[],n=0;n<t.length;++n){var r=t[n];e.push(new E(r[0],r[1]))}return e},bbox:function(t){return this.geometryFactory.createLinearRing([new E(t[0],t[1]),new E(t[2],t[1]),new E(t[2],t[3]),new E(t[0],t[3]),new E(t[0],t[1])])},Point:function(t){var e=new E(t[0],t[1]);return this.geometryFactory.createPoint(e)},MultiPoint:function(t){for(var e=[],n=0;n<t.length;++n)e.push(we.Point.apply(this,[t[n]]));return this.geometryFactory.createMultiPoint(e)},LineString:function(t){var e=we.coordinates.apply(this,[t]);return this.geometryFactory.createLineString(e)},MultiLineString:function(t){for(var e=[],n=0;n<t.length;++n)e.push(we.LineString.apply(this,[t[n]]));return this.geometryFactory.createMultiLineString(e)},Polygon:function(t){for(var e=we.coordinates.apply(this,[t[0]]),n=this.geometryFactory.createLinearRing(e),r=[],i=1;i<t.length;++i){var o=t[i],a=we.coordinates.apply(this,[o]),s=this.geometryFactory.createLinearRing(a);r.push(s)}return this.geometryFactory.createPolygon(n,r)},MultiPolygon:function(t){for(var e=[],n=0;n<t.length;++n){var r=t[n];e.push(we.Polygon.apply(this,[r]))}return this.geometryFactory.createMultiPolygon(e)},GeometryCollection:function(t){for(var e=[],n=0;n<t.length;++n){var r=t[n];e.push(this.read(r))}return this.geometryFactory.createGeometryCollection(e)}},Oe={coordinate:function(t){return[t.x,t.y]},Point:function(t){return{type:"Point",coordinates:Oe.coordinate.apply(this,[t.getCoordinate()])}},MultiPoint:function(t){for(var e=[],n=0;n<t._geometries.length;++n){var r=t._geometries[n],i=Oe.Point.apply(this,[r]);e.push(i.coordinates)}return{type:"MultiPoint",coordinates:e}},LineString:function(t){for(var e=[],n=t.getCoordinates(),r=0;r<n.length;++r){var i=n[r];e.push(Oe.coordinate.apply(this,[i]))}return{type:"LineString",coordinates:e}},MultiLineString:function(t){for(var e=[],n=0;n<t._geometries.length;++n){var r=t._geometries[n],i=Oe.LineString.apply(this,[r]);e.push(i.coordinates)}return{type:"MultiLineString",coordinates:e}},Polygon:function(t){var e=[],n=Oe.LineString.apply(this,[t._shell]);e.push(n.coordinates);for(var r=0;r<t._holes.length;++r){var i=t._holes[r],o=Oe.LineString.apply(this,[i]);e.push(o.coordinates)}return{type:"Polygon",coordinates:e}},MultiPolygon:function(t){for(var e=[],n=0;n<t._geometries.length;++n){var r=t._geometries[n],i=Oe.Polygon.apply(this,[r]);e.push(i.coordinates)}return{type:"MultiPolygon",coordinates:e}},GeometryCollection:function(t){for(var e=[],n=0;n<t._geometries.length;++n){var r=t._geometries[n],i=r.getGeometryType();e.push(Oe[i].apply(this,[r]))}return{type:"GeometryCollection",geometries:e}}},xe=function(t){this.geometryFactory=t||new me,this.precisionModel=this.geometryFactory.getPrecisionModel(),this.parser=new be(this.geometryFactory)};xe.prototype.read=function(t){var e=this.parser.read(t);return this.precisionModel.getType()===fe.FIXED&&this.reducePrecision(e),e},xe.prototype.reducePrecision=function(t){var e,n;if(t.coordinate)this.precisionModel.makePrecise(t.coordinate);else if(t.points)for(e=0,n=t.points.length;e<n;e++)this.precisionModel.makePrecise(t.points[e]);else if(t.geometries)for(e=0,n=t.geometries.length;e<n;e++)this.reducePrecision(t.geometries[e])};var Ee=function(){this.parser=new be(this.geometryFactory)};Ee.prototype.write=function(t){return this.parser.write(t)};var Se=function(){},Ce={ON:{configurable:!0},LEFT:{configurable:!0},RIGHT:{configurable:!0}};Se.prototype.interfaces_=function(){return[]},Se.prototype.getClass=function(){return Se},Se.opposite=function(t){return t===Se.LEFT?Se.RIGHT:t===Se.RIGHT?Se.LEFT:t},Ce.ON.get=function(){return 0},Ce.LEFT.get=function(){return 1},Ce.RIGHT.get=function(){return 2},Object.defineProperties(Se,Ce),(g.prototype=new Error).name="EmptyStackException",(y.prototype=new Ot).add=function(t){return this.array_.push(t),!0},y.prototype.get=function(t){if(t<0||t>=this.size())throw new Error;return this.array_[t]},y.prototype.push=function(t){return this.array_.push(t),t},y.prototype.pop=function(t){if(0===this.array_.length)throw new g;return this.array_.pop()},y.prototype.peek=function(){if(0===this.array_.length)throw new g;return this.array_[this.array_.length-1]},y.prototype.empty=function(){return 0===this.array_.length},y.prototype.isEmpty=function(){return this.empty()},y.prototype.search=function(t){return this.array_.indexOf(t)},y.prototype.size=function(){return this.array_.length},y.prototype.toArray=function(){for(var t=[],e=0,n=this.array_.length;e<n;e++)t.push(this.array_[e]);return t};var Te=function(){this._minIndex=-1,this._minCoord=null,this._minDe=null,this._orientedDe=null};Te.prototype.getCoordinate=function(){return this._minCoord},Te.prototype.getRightmostSide=function(t,e){var n=this.getRightmostSideOfSegment(t,e);return n<0&&(n=this.getRightmostSideOfSegment(t,e-1)),n<0&&(this._minCoord=null,this.checkForRightmostCoordinate(t)),n},Te.prototype.findRightmostEdgeAtVertex=function(){var t=this._minDe.getEdge().getCoordinates();et.isTrue(this._minIndex>0&&this._minIndex<t.length,"rightmost point expected to be interior vertex of edge");var e=t[this._minIndex-1],n=t[this._minIndex+1],r=st.computeOrientation(this._minCoord,n,e),i=!1;e.y<this._minCoord.y&&n.y<this._minCoord.y&&r===st.COUNTERCLOCKWISE?i=!0:e.y>this._minCoord.y&&n.y>this._minCoord.y&&r===st.CLOCKWISE&&(i=!0),i&&(this._minIndex=this._minIndex-1)},Te.prototype.getRightmostSideOfSegment=function(t,e){var n=t.getEdge().getCoordinates();if(e<0||e+1>=n.length)return-1;if(n[e].y===n[e+1].y)return-1;var r=Se.LEFT;return n[e].y<n[e+1].y&&(r=Se.RIGHT),r},Te.prototype.getEdge=function(){return this._orientedDe},Te.prototype.checkForRightmostCoordinate=function(t){for(var e=t.getEdge().getCoordinates(),n=0;n<e.length-1;n++)(null===this._minCoord||e[n].x>this._minCoord.x)&&(this._minDe=t,this._minIndex=n,this._minCoord=e[n])},Te.prototype.findRightmostEdgeAtNode=function(){var t=this._minDe.getNode().getEdges();this._minDe=t.getRightmostEdge(),this._minDe.isForward()||(this._minDe=this._minDe.getSym(),this._minIndex=this._minDe.getEdge().getCoordinates().length-1)},Te.prototype.findEdge=function(t){for(var e=t.iterator();e.hasNext();){var n=e.next();n.isForward()&&this.checkForRightmostCoordinate(n)}et.isTrue(0!==this._minIndex||this._minCoord.equals(this._minDe.getCoordinate()),"inconsistency in rightmost processing"),0===this._minIndex?this.findRightmostEdgeAtNode():this.findRightmostEdgeAtVertex(),this._orientedDe=this._minDe,this.getRightmostSide(this._minDe,this._minIndex)===Se.LEFT&&(this._orientedDe=this._minDe.getSym())},Te.prototype.interfaces_=function(){return[]},Te.prototype.getClass=function(){return Te};var Ie=function(t){function e(n,r){t.call(this,e.msgWithCoord(n,r)),this.pt=r?new E(r):null,this.name="TopologyException"}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getCoordinate=function(){return this.pt},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e.msgWithCoord=function(t,e){return e?t:t+" [ "+e+" ]"},e}(Q),je=function(){this.array_=[]};je.prototype.addLast=function(t){this.array_.push(t)},je.prototype.removeFirst=function(){return this.array_.shift()},je.prototype.isEmpty=function(){return 0===this.array_.length};var Le=function(){this._finder=null,this._dirEdgeList=new xt,this._nodes=new xt,this._rightMostCoord=null,this._env=null,this._finder=new Te};Le.prototype.clearVisitedEdges=function(){for(var t=this._dirEdgeList.iterator();t.hasNext();)t.next().setVisited(!1)},Le.prototype.getRightmostCoordinate=function(){return this._rightMostCoord},Le.prototype.computeNodeDepth=function(t){for(var e=null,n=t.getEdges().iterator();n.hasNext();){var r=n.next();if(r.isVisited()||r.getSym().isVisited()){e=r;break}}if(null===e)throw new Ie("unable to find edge to compute depths at "+t.getCoordinate());t.getEdges().computeDepths(e);for(var i=t.getEdges().iterator();i.hasNext();){var o=i.next();o.setVisited(!0),this.copySymDepths(o)}},Le.prototype.computeDepth=function(t){this.clearVisitedEdges();var e=this._finder.getEdge();e.setEdgeDepths(Se.RIGHT,t),this.copySymDepths(e),this.computeDepths(e)},Le.prototype.create=function(t){this.addReachable(t),this._finder.findEdge(this._dirEdgeList),this._rightMostCoord=this._finder.getCoordinate()},Le.prototype.findResultEdges=function(){for(var t=this._dirEdgeList.iterator();t.hasNext();){var e=t.next();e.getDepth(Se.RIGHT)>=1&&e.getDepth(Se.LEFT)<=0&&!e.isInteriorAreaEdge()&&e.setInResult(!0)}},Le.prototype.computeDepths=function(t){var e=new Pt,n=new je,r=t.getNode();for(n.addLast(r),e.add(r),t.setVisited(!0);!n.isEmpty();){var i=n.removeFirst();e.add(i),this.computeNodeDepth(i);for(var o=i.getEdges().iterator();o.hasNext();){var a=o.next().getSym();if(!a.isVisited()){var s=a.getNode();e.contains(s)||(n.addLast(s),e.add(s))}}}},Le.prototype.compareTo=function(t){var e=t;return this._rightMostCoord.x<e._rightMostCoord.x?-1:this._rightMostCoord.x>e._rightMostCoord.x?1:0},Le.prototype.getEnvelope=function(){if(null===this._env){for(var t=new X,e=this._dirEdgeList.iterator();e.hasNext();)for(var n=e.next().getEdge().getCoordinates(),r=0;r<n.length-1;r++)t.expandToInclude(n[r]);this._env=t}return this._env},Le.prototype.addReachable=function(t){var e=new y;for(e.add(t);!e.empty();){var n=e.pop();this.add(n,e)}},Le.prototype.copySymDepths=function(t){var e=t.getSym();e.setDepth(Se.LEFT,t.getDepth(Se.RIGHT)),e.setDepth(Se.RIGHT,t.getDepth(Se.LEFT))},Le.prototype.add=function(t,e){t.setVisited(!0),this._nodes.add(t);for(var n=t.getEdges().iterator();n.hasNext();){var r=n.next();this._dirEdgeList.add(r);var i=r.getSym().getNode();i.isVisited()||e.push(i)}},Le.prototype.getNodes=function(){return this._nodes},Le.prototype.getDirectedEdges=function(){return this._dirEdgeList},Le.prototype.interfaces_=function(){return[w]},Le.prototype.getClass=function(){return Le};var Re=function t(){if(this.location=null,1===arguments.length){if(arguments[0]instanceof Array){var e=arguments[0];this.init(e.length)}else if(Number.isInteger(arguments[0])){var n=arguments[0];this.init(1),this.location[Se.ON]=n}else if(arguments[0]instanceof t){var r=arguments[0];if(this.init(r.location.length),null!==r)for(var i=0;i<this.location.length;i++)this.location[i]=r.location[i]}}else if(3===arguments.length){var o=arguments[0],a=arguments[1],s=arguments[2];this.init(3),this.location[Se.ON]=o,this.location[Se.LEFT]=a,this.location[Se.RIGHT]=s}};Re.prototype.setAllLocations=function(t){for(var e=0;e<this.location.length;e++)this.location[e]=t},Re.prototype.isNull=function(){for(var t=0;t<this.location.length;t++)if(this.location[t]!==I.NONE)return!1;return!0},Re.prototype.setAllLocationsIfNull=function(t){for(var e=0;e<this.location.length;e++)this.location[e]===I.NONE&&(this.location[e]=t)},Re.prototype.isLine=function(){return 1===this.location.length},Re.prototype.merge=function(t){if(t.location.length>this.location.length){var e=new Array(3).fill(null);e[Se.ON]=this.location[Se.ON],e[Se.LEFT]=I.NONE,e[Se.RIGHT]=I.NONE,this.location=e}for(var n=0;n<this.location.length;n++)this.location[n]===I.NONE&&n<t.location.length&&(this.location[n]=t.location[n])},Re.prototype.getLocations=function(){return this.location},Re.prototype.flip=function(){if(this.location.length<=1)return null;var t=this.location[Se.LEFT];this.location[Se.LEFT]=this.location[Se.RIGHT],this.location[Se.RIGHT]=t},Re.prototype.toString=function(){var t=new N;return this.location.length>1&&t.append(I.toLocationSymbol(this.location[Se.LEFT])),t.append(I.toLocationSymbol(this.location[Se.ON])),this.location.length>1&&t.append(I.toLocationSymbol(this.location[Se.RIGHT])),t.toString()},Re.prototype.setLocations=function(t,e,n){this.location[Se.ON]=t,this.location[Se.LEFT]=e,this.location[Se.RIGHT]=n},Re.prototype.get=function(t){return t<this.location.length?this.location[t]:I.NONE},Re.prototype.isArea=function(){return this.location.length>1},Re.prototype.isAnyNull=function(){for(var t=0;t<this.location.length;t++)if(this.location[t]===I.NONE)return!0;return!1},Re.prototype.setLocation=function(){if(1===arguments.length){var t=arguments[0];this.setLocation(Se.ON,t)}else if(2===arguments.length){var e=arguments[0],n=arguments[1];this.location[e]=n}},Re.prototype.init=function(t){this.location=new Array(t).fill(null),this.setAllLocations(I.NONE)},Re.prototype.isEqualOnSide=function(t,e){return this.location[e]===t.location[e]},Re.prototype.allPositionsEqual=function(t){for(var e=0;e<this.location.length;e++)if(this.location[e]!==t)return!1;return!0},Re.prototype.interfaces_=function(){return[]},Re.prototype.getClass=function(){return Re};var Pe=function t(){if(this.elt=new Array(2).fill(null),1===arguments.length){if(Number.isInteger(arguments[0])){var e=arguments[0];this.elt[0]=new Re(e),this.elt[1]=new Re(e)}else if(arguments[0]instanceof t){var n=arguments[0];this.elt[0]=new Re(n.elt[0]),this.elt[1]=new Re(n.elt[1])}}else if(2===arguments.length){var r=arguments[0],i=arguments[1];this.elt[0]=new Re(I.NONE),this.elt[1]=new Re(I.NONE),this.elt[r].setLocation(i)}else if(3===arguments.length){var o=arguments[0],a=arguments[1],s=arguments[2];this.elt[0]=new Re(o,a,s),this.elt[1]=new Re(o,a,s)}else if(4===arguments.length){var l=arguments[0],u=arguments[1],c=arguments[2],h=arguments[3];this.elt[0]=new Re(I.NONE,I.NONE,I.NONE),this.elt[1]=new Re(I.NONE,I.NONE,I.NONE),this.elt[l].setLocations(u,c,h)}};Pe.prototype.getGeometryCount=function(){var t=0;return this.elt[0].isNull()||t++,this.elt[1].isNull()||t++,t},Pe.prototype.setAllLocations=function(t,e){this.elt[t].setAllLocations(e)},Pe.prototype.isNull=function(t){return this.elt[t].isNull()},Pe.prototype.setAllLocationsIfNull=function(){if(1===arguments.length){var t=arguments[0];this.setAllLocationsIfNull(0,t),this.setAllLocationsIfNull(1,t)}else if(2===arguments.length){var e=arguments[0],n=arguments[1];this.elt[e].setAllLocationsIfNull(n)}},Pe.prototype.isLine=function(t){return this.elt[t].isLine()},Pe.prototype.merge=function(t){for(var e=0;e<2;e++)null===this.elt[e]&&null!==t.elt[e]?this.elt[e]=new Re(t.elt[e]):this.elt[e].merge(t.elt[e])},Pe.prototype.flip=function(){this.elt[0].flip(),this.elt[1].flip()},Pe.prototype.getLocation=function(){if(1===arguments.length){var t=arguments[0];return this.elt[t].get(Se.ON)}if(2===arguments.length){var e=arguments[0],n=arguments[1];return this.elt[e].get(n)}},Pe.prototype.toString=function(){var t=new N;return null!==this.elt[0]&&(t.append("A:"),t.append(this.elt[0].toString())),null!==this.elt[1]&&(t.append(" B:"),t.append(this.elt[1].toString())),t.toString()},Pe.prototype.isArea=function(){if(0===arguments.length)return this.elt[0].isArea()||this.elt[1].isArea();if(1===arguments.length){var t=arguments[0];return this.elt[t].isArea()}},Pe.prototype.isAnyNull=function(t){return this.elt[t].isAnyNull()},Pe.prototype.setLocation=function(){if(2===arguments.length){var t=arguments[0],e=arguments[1];this.elt[t].setLocation(Se.ON,e)}else if(3===arguments.length){var n=arguments[0],r=arguments[1],i=arguments[2];this.elt[n].setLocation(r,i)}},Pe.prototype.isEqualOnSide=function(t,e){return this.elt[0].isEqualOnSide(t.elt[0],e)&&this.elt[1].isEqualOnSide(t.elt[1],e)},Pe.prototype.allPositionsEqual=function(t,e){return this.elt[t].allPositionsEqual(e)},Pe.prototype.toLine=function(t){this.elt[t].isArea()&&(this.elt[t]=new Re(this.elt[t].location[0]))},Pe.prototype.interfaces_=function(){return[]},Pe.prototype.getClass=function(){return Pe},Pe.toLineLabel=function(t){for(var e=new Pe(I.NONE),n=0;n<2;n++)e.setLocation(n,t.getLocation(n));return e};var Ne=function(){this._startDe=null,this._maxNodeDegree=-1,this._edges=new xt,this._pts=new xt,this._label=new Pe(I.NONE),this._ring=null,this._isHole=null,this._shell=null,this._holes=new xt,this._geometryFactory=null;var t=arguments[0],e=arguments[1];this._geometryFactory=e,this.computePoints(t),this.computeRing()};Ne.prototype.computeRing=function(){if(null!==this._ring)return null;for(var t=new Array(this._pts.size()).fill(null),e=0;e<this._pts.size();e++)t[e]=this._pts.get(e);this._ring=this._geometryFactory.createLinearRing(t),this._isHole=st.isCCW(this._ring.getCoordinates())},Ne.prototype.isIsolated=function(){return 1===this._label.getGeometryCount()},Ne.prototype.computePoints=function(t){this._startDe=t;var e=t,n=!0;do{if(null===e)throw new Ie("Found null DirectedEdge");if(e.getEdgeRing()===this)throw new Ie("Directed Edge visited twice during ring-building at "+e.getCoordinate());this._edges.add(e);var r=e.getLabel();et.isTrue(r.isArea()),this.mergeLabel(r),this.addPoints(e.getEdge(),e.isForward(),n),n=!1,this.setEdgeRing(e,this),e=this.getNext(e)}while(e!==this._startDe)},Ne.prototype.getLinearRing=function(){return this._ring},Ne.prototype.getCoordinate=function(t){return this._pts.get(t)},Ne.prototype.computeMaxNodeDegree=function(){this._maxNodeDegree=0;var t=this._startDe;do{var e=t.getNode().getEdges().getOutgoingDegree(this);e>this._maxNodeDegree&&(this._maxNodeDegree=e),t=this.getNext(t)}while(t!==this._startDe);this._maxNodeDegree*=2},Ne.prototype.addPoints=function(t,e,n){var r=t.getCoordinates();if(e){var i=1;n&&(i=0);for(var o=i;o<r.length;o++)this._pts.add(r[o])}else{var a=r.length-2;n&&(a=r.length-1);for(var s=a;s>=0;s--)this._pts.add(r[s])}},Ne.prototype.isHole=function(){return this._isHole},Ne.prototype.setInResult=function(){var t=this._startDe;do{t.getEdge().setInResult(!0),t=t.getNext()}while(t!==this._startDe)},Ne.prototype.containsPoint=function(t){var e=this.getLinearRing();if(!e.getEnvelopeInternal().contains(t))return!1;if(!st.isPointInRing(t,e.getCoordinates()))return!1;for(var n=this._holes.iterator();n.hasNext();)if(n.next().containsPoint(t))return!1;return!0},Ne.prototype.addHole=function(t){this._holes.add(t)},Ne.prototype.isShell=function(){return null===this._shell},Ne.prototype.getLabel=function(){return this._label},Ne.prototype.getEdges=function(){return this._edges},Ne.prototype.getMaxNodeDegree=function(){return this._maxNodeDegree<0&&this.computeMaxNodeDegree(),this._maxNodeDegree},Ne.prototype.getShell=function(){return this._shell},Ne.prototype.mergeLabel=function(){if(1===arguments.length){var t=arguments[0];this.mergeLabel(t,0),this.mergeLabel(t,1)}else if(2===arguments.length){var e=arguments[0],n=arguments[1],r=e.getLocation(n,Se.RIGHT);if(r===I.NONE)return null;if(this._label.getLocation(n)===I.NONE)return this._label.setLocation(n,r),null}},Ne.prototype.setShell=function(t){this._shell=t,null!==t&&t.addHole(this)},Ne.prototype.toPolygon=function(t){for(var e=new Array(this._holes.size()).fill(null),n=0;n<this._holes.size();n++)e[n]=this._holes.get(n).getLinearRing();return t.createPolygon(this.getLinearRing(),e)},Ne.prototype.interfaces_=function(){return[]},Ne.prototype.getClass=function(){return Ne};var Me=function(t){function e(){var e=arguments[0],n=arguments[1];t.call(this,e,n)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setEdgeRing=function(t,e){t.setMinEdgeRing(e)},e.prototype.getNext=function(t){return t.getNextMin()},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(Ne),Ae=function(t){function e(){var e=arguments[0],n=arguments[1];t.call(this,e,n)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.buildMinimalRings=function(){var t=new xt,e=this._startDe;do{if(null===e.getMinEdgeRing()){var n=new Me(e,this._geometryFactory);t.add(n)}e=e.getNext()}while(e!==this._startDe);return t},e.prototype.setEdgeRing=function(t,e){t.setEdgeRing(e)},e.prototype.linkDirectedEdgesForMinimalEdgeRings=function(){var t=this._startDe;do{t.getNode().getEdges().linkMinimalDirectedEdges(this),t=t.getNext()}while(t!==this._startDe)},e.prototype.getNext=function(t){return t.getNext()},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(Ne),ke=function(){if(this._label=null,this._isInResult=!1,this._isCovered=!1,this._isCoveredSet=!1,this._isVisited=!1,0===arguments.length);else if(1===arguments.length){var t=arguments[0];this._label=t}};ke.prototype.setVisited=function(t){this._isVisited=t},ke.prototype.setInResult=function(t){this._isInResult=t},ke.prototype.isCovered=function(){return this._isCovered},ke.prototype.isCoveredSet=function(){return this._isCoveredSet},ke.prototype.setLabel=function(t){this._label=t},ke.prototype.getLabel=function(){return this._label},ke.prototype.setCovered=function(t){this._isCovered=t,this._isCoveredSet=!0},ke.prototype.updateIM=function(t){et.isTrue(this._label.getGeometryCount()>=2,"found partial label"),this.computeIM(t)},ke.prototype.isInResult=function(){return this._isInResult},ke.prototype.isVisited=function(){return this._isVisited},ke.prototype.interfaces_=function(){return[]},ke.prototype.getClass=function(){return ke};var Fe=function(t){function e(){t.call(this),this._coord=null,this._edges=null;var e=arguments[0],n=arguments[1];this._coord=e,this._edges=n,this._label=new Pe(0,I.NONE)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.isIncidentEdgeInResult=function(){for(var t=this.getEdges().getEdges().iterator();t.hasNext();)if(t.next().getEdge().isInResult())return!0;return!1},e.prototype.isIsolated=function(){return 1===this._label.getGeometryCount()},e.prototype.getCoordinate=function(){return this._coord},e.prototype.print=function(t){t.println("node "+this._coord+" lbl: "+this._label)},e.prototype.computeIM=function(t){},e.prototype.computeMergedLocation=function(t,e){var n=I.NONE;if(n=this._label.getLocation(e),!t.isNull(e)){var r=t.getLocation(e);n!==I.BOUNDARY&&(n=r)}return n},e.prototype.setLabel=function(){if(2!==arguments.length)return t.prototype.setLabel.apply(this,arguments);var e=arguments[0],n=arguments[1];null===this._label?this._label=new Pe(e,n):this._label.setLocation(e,n)},e.prototype.getEdges=function(){return this._edges},e.prototype.mergeLabel=function(){if(arguments[0]instanceof e){var t=arguments[0];this.mergeLabel(t._label)}else if(arguments[0]instanceof Pe)for(var n=arguments[0],r=0;r<2;r++){var i=this.computeMergedLocation(n,r);this._label.getLocation(r)===I.NONE&&this._label.setLocation(r,i)}},e.prototype.add=function(t){this._edges.insert(t),t.setNode(this)},e.prototype.setLabelBoundary=function(t){if(null===this._label)return null;var e=I.NONE;null!==this._label&&(e=this._label.getLocation(t));var n=null;switch(e){case I.BOUNDARY:n=I.INTERIOR;break;case I.INTERIOR:default:n=I.BOUNDARY}this._label.setLocation(t,n)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(ke),De=function(){this.nodeMap=new h,this.nodeFact=null;var t=arguments[0];this.nodeFact=t};De.prototype.find=function(t){return this.nodeMap.get(t)},De.prototype.addNode=function(){if(arguments[0]instanceof E){var t=arguments[0],e=this.nodeMap.get(t);return null===e&&(e=this.nodeFact.createNode(t),this.nodeMap.put(t,e)),e}if(arguments[0]instanceof Fe){var n=arguments[0],r=this.nodeMap.get(n.getCoordinate());return null===r?(this.nodeMap.put(n.getCoordinate(),n),n):(r.mergeLabel(n),r)}},De.prototype.print=function(t){for(var e=this.iterator();e.hasNext();)e.next().print(t)},De.prototype.iterator=function(){return this.nodeMap.values().iterator()},De.prototype.values=function(){return this.nodeMap.values()},De.prototype.getBoundaryNodes=function(t){for(var e=new xt,n=this.iterator();n.hasNext();){var r=n.next();r.getLabel().getLocation(t)===I.BOUNDARY&&e.add(r)}return e},De.prototype.add=function(t){var e=t.getCoordinate();this.addNode(e).add(t)},De.prototype.interfaces_=function(){return[]},De.prototype.getClass=function(){return De};var Ge=function(){},Ue={NE:{configurable:!0},NW:{configurable:!0},SW:{configurable:!0},SE:{configurable:!0}};Ge.prototype.interfaces_=function(){return[]},Ge.prototype.getClass=function(){return Ge},Ge.isNorthern=function(t){return t===Ge.NE||t===Ge.NW},Ge.isOpposite=function(t,e){return t!==e&&2===(t-e+4)%4},Ge.commonHalfPlane=function(t,e){if(t===e)return t;if(2===(t-e+4)%4)return-1;var n=t<e?t:e;return 0===n&&3===(t>e?t:e)?3:n},Ge.isInHalfPlane=function(t,e){return e===Ge.SE?t===Ge.SE||t===Ge.SW:t===e||t===e+1},Ge.quadrant=function(){if("number"==typeof arguments[0]&&"number"==typeof arguments[1]){var t=arguments[0],e=arguments[1];if(0===t&&0===e)throw new v("Cannot compute the quadrant for point ( "+t+", "+e+" )");return t>=0?e>=0?Ge.NE:Ge.SE:e>=0?Ge.NW:Ge.SW}if(arguments[0]instanceof E&&arguments[1]instanceof E){var n=arguments[0],r=arguments[1];if(r.x===n.x&&r.y===n.y)throw new v("Cannot compute the quadrant for two identical points "+n);return r.x>=n.x?r.y>=n.y?Ge.NE:Ge.SE:r.y>=n.y?Ge.NW:Ge.SW}},Ue.NE.get=function(){return 0},Ue.NW.get=function(){return 1},Ue.SW.get=function(){return 2},Ue.SE.get=function(){return 3},Object.defineProperties(Ge,Ue);var ze=function(){if(this._edge=null,this._label=null,this._node=null,this._p0=null,this._p1=null,this._dx=null,this._dy=null,this._quadrant=null,1===arguments.length){var t=arguments[0];this._edge=t}else if(3===arguments.length){var e=arguments[0],n=arguments[1],r=arguments[2];this._edge=e,this.init(n,r),this._label=null}else if(4===arguments.length){var i=arguments[0],o=arguments[1],a=arguments[2],s=arguments[3];this._edge=i,this.init(o,a),this._label=s}};ze.prototype.compareDirection=function(t){return this._dx===t._dx&&this._dy===t._dy?0:this._quadrant>t._quadrant?1:this._quadrant<t._quadrant?-1:st.computeOrientation(t._p0,t._p1,this._p1)},ze.prototype.getDy=function(){return this._dy},ze.prototype.getCoordinate=function(){return this._p0},ze.prototype.setNode=function(t){this._node=t},ze.prototype.print=function(t){var e=Math.atan2(this._dy,this._dx),n=this.getClass().getName(),r=n.lastIndexOf("."),i=n.substring(r+1);t.print("  "+i+": "+this._p0+" - "+this._p1+" "+this._quadrant+":"+e+"   "+this._label)},ze.prototype.compareTo=function(t){var e=t;return this.compareDirection(e)},ze.prototype.getDirectedCoordinate=function(){return this._p1},ze.prototype.getDx=function(){return this._dx},ze.prototype.getLabel=function(){return this._label},ze.prototype.getEdge=function(){return this._edge},ze.prototype.getQuadrant=function(){return this._quadrant},ze.prototype.getNode=function(){return this._node},ze.prototype.toString=function(){var t=Math.atan2(this._dy,this._dx),e=this.getClass().getName(),n=e.lastIndexOf(".");return"  "+e.substring(n+1)+": "+this._p0+" - "+this._p1+" "+this._quadrant+":"+t+"   "+this._label},ze.prototype.computeLabel=function(t){},ze.prototype.init=function(t,e){this._p0=t,this._p1=e,this._dx=e.x-t.x,this._dy=e.y-t.y,this._quadrant=Ge.quadrant(this._dx,this._dy),et.isTrue(!(0===this._dx&&0===this._dy),"EdgeEnd with identical endpoints found")},ze.prototype.interfaces_=function(){return[w]},ze.prototype.getClass=function(){return ze};var Be=function(t){function e(){var e=arguments[0],n=arguments[1];if(t.call(this,e),this._isForward=null,this._isInResult=!1,this._isVisited=!1,this._sym=null,this._next=null,this._nextMin=null,this._edgeRing=null,this._minEdgeRing=null,this._depth=[0,-999,-999],this._isForward=n,n)this.init(e.getCoordinate(0),e.getCoordinate(1));else{var r=e.getNumPoints()-1;this.init(e.getCoordinate(r),e.getCoordinate(r-1))}this.computeDirectedLabel()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getNextMin=function(){return this._nextMin},e.prototype.getDepth=function(t){return this._depth[t]},e.prototype.setVisited=function(t){this._isVisited=t},e.prototype.computeDirectedLabel=function(){this._label=new Pe(this._edge.getLabel()),this._isForward||this._label.flip()},e.prototype.getNext=function(){return this._next},e.prototype.setDepth=function(t,e){if(-999!==this._depth[t]&&this._depth[t]!==e)throw new Ie("assigned depths do not match",this.getCoordinate());this._depth[t]=e},e.prototype.isInteriorAreaEdge=function(){for(var t=!0,e=0;e<2;e++)this._label.isArea(e)&&this._label.getLocation(e,Se.LEFT)===I.INTERIOR&&this._label.getLocation(e,Se.RIGHT)===I.INTERIOR||(t=!1);return t},e.prototype.setNextMin=function(t){this._nextMin=t},e.prototype.print=function(e){t.prototype.print.call(this,e),e.print(" "+this._depth[Se.LEFT]+"/"+this._depth[Se.RIGHT]),e.print(" ("+this.getDepthDelta()+")"),this._isInResult&&e.print(" inResult")},e.prototype.setMinEdgeRing=function(t){this._minEdgeRing=t},e.prototype.isLineEdge=function(){var t=this._label.isLine(0)||this._label.isLine(1),e=!this._label.isArea(0)||this._label.allPositionsEqual(0,I.EXTERIOR),n=!this._label.isArea(1)||this._label.allPositionsEqual(1,I.EXTERIOR);return t&&e&&n},e.prototype.setEdgeRing=function(t){this._edgeRing=t},e.prototype.getMinEdgeRing=function(){return this._minEdgeRing},e.prototype.getDepthDelta=function(){var t=this._edge.getDepthDelta();return this._isForward||(t=-t),t},e.prototype.setInResult=function(t){this._isInResult=t},e.prototype.getSym=function(){return this._sym},e.prototype.isForward=function(){return this._isForward},e.prototype.getEdge=function(){return this._edge},e.prototype.printEdge=function(t){this.print(t),t.print(" "),this._isForward?this._edge.print(t):this._edge.printReverse(t)},e.prototype.setSym=function(t){this._sym=t},e.prototype.setVisitedEdge=function(t){this.setVisited(t),this._sym.setVisited(t)},e.prototype.setEdgeDepths=function(t,e){var n=this.getEdge().getDepthDelta();this._isForward||(n=-n);var r=1;t===Se.LEFT&&(r=-1);var i=Se.opposite(t),o=e+n*r;this.setDepth(t,e),this.setDepth(i,o)},e.prototype.getEdgeRing=function(){return this._edgeRing},e.prototype.isInResult=function(){return this._isInResult},e.prototype.setNext=function(t){this._next=t},e.prototype.isVisited=function(){return this._isVisited},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e.depthFactor=function(t,e){return t===I.EXTERIOR&&e===I.INTERIOR?1:t===I.INTERIOR&&e===I.EXTERIOR?-1:0},e}(ze),Ve=function(){};Ve.prototype.createNode=function(t){return new Fe(t,null)},Ve.prototype.interfaces_=function(){return[]},Ve.prototype.getClass=function(){return Ve};var Ye=function(){if(this._edges=new xt,this._nodes=null,this._edgeEndList=new xt,0===arguments.length)this._nodes=new De(new Ve);else if(1===arguments.length){var t=arguments[0];this._nodes=new De(t)}};Ye.prototype.printEdges=function(t){t.println("Edges:");for(var e=0;e<this._edges.size();e++){t.println("edge "+e+":");var n=this._edges.get(e);n.print(t),n.eiList.print(t)}},Ye.prototype.find=function(t){return this._nodes.find(t)},Ye.prototype.addNode=function(){if(arguments[0]instanceof Fe){var t=arguments[0];return this._nodes.addNode(t)}if(arguments[0]instanceof E){var e=arguments[0];return this._nodes.addNode(e)}},Ye.prototype.getNodeIterator=function(){return this._nodes.iterator()},Ye.prototype.linkResultDirectedEdges=function(){for(var t=this._nodes.iterator();t.hasNext();)t.next().getEdges().linkResultDirectedEdges()},Ye.prototype.debugPrintln=function(t){Y.out.println(t)},Ye.prototype.isBoundaryNode=function(t,e){var n=this._nodes.find(e);if(null===n)return!1;var r=n.getLabel();return null!==r&&r.getLocation(t)===I.BOUNDARY},Ye.prototype.linkAllDirectedEdges=function(){for(var t=this._nodes.iterator();t.hasNext();)t.next().getEdges().linkAllDirectedEdges()},Ye.prototype.matchInSameDirection=function(t,e,n,r){return!!t.equals(n)&&st.computeOrientation(t,e,r)===st.COLLINEAR&&Ge.quadrant(t,e)===Ge.quadrant(n,r)},Ye.prototype.getEdgeEnds=function(){return this._edgeEndList},Ye.prototype.debugPrint=function(t){Y.out.print(t)},Ye.prototype.getEdgeIterator=function(){return this._edges.iterator()},Ye.prototype.findEdgeInSameDirection=function(t,e){for(var n=0;n<this._edges.size();n++){var r=this._edges.get(n),i=r.getCoordinates();if(this.matchInSameDirection(t,e,i[0],i[1]))return r;if(this.matchInSameDirection(t,e,i[i.length-1],i[i.length-2]))return r}return null},Ye.prototype.insertEdge=function(t){this._edges.add(t)},Ye.prototype.findEdgeEnd=function(t){for(var e=this.getEdgeEnds().iterator();e.hasNext();){var n=e.next();if(n.getEdge()===t)return n}return null},Ye.prototype.addEdges=function(t){for(var e=t.iterator();e.hasNext();){var n=e.next();this._edges.add(n);var r=new Be(n,!0),i=new Be(n,!1);r.setSym(i),i.setSym(r),this.add(r),this.add(i)}},Ye.prototype.add=function(t){this._nodes.add(t),this._edgeEndList.add(t)},Ye.prototype.getNodes=function(){return this._nodes.values()},Ye.prototype.findEdge=function(t,e){for(var n=0;n<this._edges.size();n++){var r=this._edges.get(n),i=r.getCoordinates();if(t.equals(i[0])&&e.equals(i[1]))return r}return null},Ye.prototype.interfaces_=function(){return[]},Ye.prototype.getClass=function(){return Ye},Ye.linkResultDirectedEdges=function(t){for(var e=t.iterator();e.hasNext();)e.next().getEdges().linkResultDirectedEdges()};var qe=function(){this._geometryFactory=null,this._shellList=new xt;var t=arguments[0];this._geometryFactory=t};qe.prototype.sortShellsAndHoles=function(t,e,n){for(var r=t.iterator();r.hasNext();){var i=r.next();i.isHole()?n.add(i):e.add(i)}},qe.prototype.computePolygons=function(t){for(var e=new xt,n=t.iterator();n.hasNext();){var r=n.next().toPolygon(this._geometryFactory);e.add(r)}return e},qe.prototype.placeFreeHoles=function(t,e){for(var n=e.iterator();n.hasNext();){var r=n.next();if(null===r.getShell()){var i=this.findEdgeRingContaining(r,t);if(null===i)throw new Ie("unable to assign hole to a shell",r.getCoordinate(0));r.setShell(i)}}},qe.prototype.buildMinimalEdgeRings=function(t,e,n){for(var r=new xt,i=t.iterator();i.hasNext();){var o=i.next();if(o.getMaxNodeDegree()>2){o.linkDirectedEdgesForMinimalEdgeRings();var a=o.buildMinimalRings(),s=this.findShell(a);null!==s?(this.placePolygonHoles(s,a),e.add(s)):n.addAll(a)}else r.add(o)}return r},qe.prototype.containsPoint=function(t){for(var e=this._shellList.iterator();e.hasNext();)if(e.next().containsPoint(t))return!0;return!1},qe.prototype.buildMaximalEdgeRings=function(t){for(var e=new xt,n=t.iterator();n.hasNext();){var r=n.next();if(r.isInResult()&&r.getLabel().isArea()&&null===r.getEdgeRing()){var i=new Ae(r,this._geometryFactory);e.add(i),i.setInResult()}}return e},qe.prototype.placePolygonHoles=function(t,e){for(var n=e.iterator();n.hasNext();){var r=n.next();r.isHole()&&r.setShell(t)}},qe.prototype.getPolygons=function(){return this.computePolygons(this._shellList)},qe.prototype.findEdgeRingContaining=function(t,e){for(var n=t.getLinearRing(),r=n.getEnvelopeInternal(),i=n.getCoordinateN(0),o=null,a=null,s=e.iterator();s.hasNext();){var l=s.next(),u=l.getLinearRing(),c=u.getEnvelopeInternal();null!==o&&(a=o.getLinearRing().getEnvelopeInternal());var h=!1;c.contains(r)&&st.isPointInRing(i,u.getCoordinates())&&(h=!0),h&&(null===o||a.contains(c))&&(o=l)}return o},qe.prototype.findShell=function(t){for(var e=0,n=null,r=t.iterator();r.hasNext();){var i=r.next();i.isHole()||(n=i,e++)}return et.isTrue(e<=1,"found two shells in MinimalEdgeRing list"),n},qe.prototype.add=function(){if(1===arguments.length){var t=arguments[0];this.add(t.getEdgeEnds(),t.getNodes())}else if(2===arguments.length){var e=arguments[0],n=arguments[1];Ye.linkResultDirectedEdges(n);var r=this.buildMaximalEdgeRings(e),i=new xt,o=this.buildMinimalEdgeRings(r,this._shellList,i);this.sortShellsAndHoles(o,this._shellList,i),this.placeFreeHoles(this._shellList,i)}},qe.prototype.interfaces_=function(){return[]},qe.prototype.getClass=function(){return qe};var Xe=function(){};Xe.prototype.getBounds=function(){},Xe.prototype.interfaces_=function(){return[]},Xe.prototype.getClass=function(){return Xe};var We=function(){this._bounds=null,this._item=null;var t=arguments[0],e=arguments[1];this._bounds=t,this._item=e};We.prototype.getItem=function(){return this._item},We.prototype.getBounds=function(){return this._bounds},We.prototype.interfaces_=function(){return[Xe,e]},We.prototype.getClass=function(){return We};var He=function(){this._size=null,this._items=null,this._size=0,this._items=new xt,this._items.add(null)};He.prototype.poll=function(){if(this.isEmpty())return null;var t=this._items.get(1);return this._items.set(1,this._items.get(this._size)),this._size-=1,this.reorder(1),t},He.prototype.size=function(){return this._size},He.prototype.reorder=function(t){for(var e=null,n=this._items.get(t);2*t<=this._size&&((e=2*t)!==this._size&&this._items.get(e+1).compareTo(this._items.get(e))<0&&e++,this._items.get(e).compareTo(n)<0);t=e)this._items.set(t,this._items.get(e));this._items.set(t,n)},He.prototype.clear=function(){this._size=0,this._items.clear()},He.prototype.isEmpty=function(){return 0===this._size},He.prototype.add=function(t){this._items.add(null),this._size+=1;var e=this._size;for(this._items.set(0,t);t.compareTo(this._items.get(Math.trunc(e/2)))<0;e/=2)this._items.set(e,this._items.get(Math.trunc(e/2)));this._items.set(e,t)},He.prototype.interfaces_=function(){return[]},He.prototype.getClass=function(){return He};var Ke=function(){};Ke.prototype.visitItem=function(t){},Ke.prototype.interfaces_=function(){return[]},Ke.prototype.getClass=function(){return Ke};var Ze=function(){};Ze.prototype.insert=function(t,e){},Ze.prototype.remove=function(t,e){},Ze.prototype.query=function(){},Ze.prototype.interfaces_=function(){return[]},Ze.prototype.getClass=function(){return Ze};var Je=function(){if(this._childBoundables=new xt,this._bounds=null,this._level=null,0===arguments.length);else if(1===arguments.length){var t=arguments[0];this._level=t}},$e={serialVersionUID:{configurable:!0}};Je.prototype.getLevel=function(){return this._level},Je.prototype.size=function(){return this._childBoundables.size()},Je.prototype.getChildBoundables=function(){return this._childBoundables},Je.prototype.addChildBoundable=function(t){et.isTrue(null===this._bounds),this._childBoundables.add(t)},Je.prototype.isEmpty=function(){return this._childBoundables.isEmpty()},Je.prototype.getBounds=function(){return null===this._bounds&&(this._bounds=this.computeBounds()),this._bounds},Je.prototype.interfaces_=function(){return[Xe,e]},Je.prototype.getClass=function(){return Je},$e.serialVersionUID.get=function(){return 0x5a1e55ec41369800},Object.defineProperties(Je,$e);var Qe=function(){};Qe.reverseOrder=function(){return{compare:function(t,e){return e.compareTo(t)}}},Qe.min=function(t){return Qe.sort(t),t.get(0)},Qe.sort=function(t,e){var n=t.toArray();e?Ft.sort(n,e):Ft.sort(n);for(var r=t.iterator(),i=0,o=n.length;i<o;i++)r.next(),r.set(n[i])},Qe.singletonList=function(t){var e=new xt;return e.add(t),e};var tn=function(){this._boundable1=null,this._boundable2=null,this._distance=null,this._itemDistance=null;var t=arguments[0],e=arguments[1],n=arguments[2];this._boundable1=t,this._boundable2=e,this._itemDistance=n,this._distance=this.distance()};tn.prototype.expandToQueue=function(t,e){var n=tn.isComposite(this._boundable1),r=tn.isComposite(this._boundable2);if(n&&r)return tn.area(this._boundable1)>tn.area(this._boundable2)?(this.expand(this._boundable1,this._boundable2,t,e),null):(this.expand(this._boundable2,this._boundable1,t,e),null);if(n)return this.expand(this._boundable1,this._boundable2,t,e),null;if(r)return this.expand(this._boundable2,this._boundable1,t,e),null;throw new v("neither boundable is composite")},tn.prototype.isLeaves=function(){return!(tn.isComposite(this._boundable1)||tn.isComposite(this._boundable2))},tn.prototype.compareTo=function(t){var e=t;return this._distance<e._distance?-1:this._distance>e._distance?1:0},tn.prototype.expand=function(t,e,n,r){for(var i=t.getChildBoundables().iterator();i.hasNext();){var o=i.next(),a=new tn(o,e,this._itemDistance);a.getDistance()<r&&n.add(a)}},tn.prototype.getBoundable=function(t){return 0===t?this._boundable1:this._boundable2},tn.prototype.getDistance=function(){return this._distance},tn.prototype.distance=function(){return this.isLeaves()?this._itemDistance.distance(this._boundable1,this._boundable2):this._boundable1.getBounds().distance(this._boundable2.getBounds())},tn.prototype.interfaces_=function(){return[w]},tn.prototype.getClass=function(){return tn},tn.area=function(t){return t.getBounds().getArea()},tn.isComposite=function(t){return t instanceof Je};var en=function t(){if(this._root=null,this._built=!1,this._itemBoundables=new xt,this._nodeCapacity=null,0===arguments.length){var e=t.DEFAULT_NODE_CAPACITY;this._nodeCapacity=e}else if(1===arguments.length){var n=arguments[0];et.isTrue(n>1,"Node capacity must be greater than 1"),this._nodeCapacity=n}},nn={IntersectsOp:{configurable:!0},serialVersionUID:{configurable:!0},DEFAULT_NODE_CAPACITY:{configurable:!0}};en.prototype.getNodeCapacity=function(){return this._nodeCapacity},en.prototype.lastNode=function(t){return t.get(t.size()-1)},en.prototype.size=function(){if(0===arguments.length)return this.isEmpty()?0:(this.build(),this.size(this._root));if(1===arguments.length){for(var t=0,e=arguments[0].getChildBoundables().iterator();e.hasNext();){var n=e.next();n instanceof Je?t+=this.size(n):n instanceof We&&(t+=1)}return t}},en.prototype.removeItem=function(t,e){for(var n=null,r=t.getChildBoundables().iterator();r.hasNext();){var i=r.next();i instanceof We&&i.getItem()===e&&(n=i)}return null!==n&&(t.getChildBoundables().remove(n),!0)},en.prototype.itemsTree=function(){if(0===arguments.length){this.build();var t=this.itemsTree(this._root);return null===t?new xt:t}if(1===arguments.length){for(var e=arguments[0],n=new xt,r=e.getChildBoundables().iterator();r.hasNext();){var i=r.next();if(i instanceof Je){var o=this.itemsTree(i);null!==o&&n.add(o)}else i instanceof We?n.add(i.getItem()):et.shouldNeverReachHere()}return n.size()<=0?null:n}},en.prototype.insert=function(t,e){et.isTrue(!this._built,"Cannot insert items into an STR packed R-tree after it has been built."),this._itemBoundables.add(new We(t,e))},en.prototype.boundablesAtLevel=function(){if(1===arguments.length){var t=arguments[0],e=new xt;return this.boundablesAtLevel(t,this._root,e),e}if(3===arguments.length){var n=arguments[0],r=arguments[1],i=arguments[2];if(et.isTrue(n>-2),r.getLevel()===n)return i.add(r),null;for(var o=r.getChildBoundables().iterator();o.hasNext();){var a=o.next();a instanceof Je?this.boundablesAtLevel(n,a,i):(et.isTrue(a instanceof We),-1===n&&i.add(a))}return null}},en.prototype.query=function(){if(1===arguments.length){var t=arguments[0];this.build();var e=new xt;return this.isEmpty()?e:(this.getIntersectsOp().intersects(this._root.getBounds(),t)&&this.query(t,this._root,e),e)}if(2===arguments.length){var n=arguments[0],r=arguments[1];if(this.build(),this.isEmpty())return null;this.getIntersectsOp().intersects(this._root.getBounds(),n)&&this.query(n,this._root,r)}else if(3===arguments.length)if(L(arguments[2],Ke)&&arguments[0]instanceof Object&&arguments[1]instanceof Je)for(var i=arguments[0],o=arguments[1],a=arguments[2],s=o.getChildBoundables(),l=0;l<s.size();l++){var u=s.get(l);this.getIntersectsOp().intersects(u.getBounds(),i)&&(u instanceof Je?this.query(i,u,a):u instanceof We?a.visitItem(u.getItem()):et.shouldNeverReachHere())}else if(L(arguments[2],Ot)&&arguments[0]instanceof Object&&arguments[1]instanceof Je)for(var c=arguments[0],h=arguments[1],p=arguments[2],f=h.getChildBoundables(),d=0;d<f.size();d++){var g=f.get(d);this.getIntersectsOp().intersects(g.getBounds(),c)&&(g instanceof Je?this.query(c,g,p):g instanceof We?p.add(g.getItem()):et.shouldNeverReachHere())}},en.prototype.build=function(){if(this._built)return null;this._root=this._itemBoundables.isEmpty()?this.createNode(0):this.createHigherLevels(this._itemBoundables,-1),this._itemBoundables=null,this._built=!0},en.prototype.getRoot=function(){return this.build(),this._root},en.prototype.remove=function(){if(2===arguments.length){var t=arguments[0],e=arguments[1];return this.build(),!!this.getIntersectsOp().intersects(this._root.getBounds(),t)&&this.remove(t,this._root,e)}if(3===arguments.length){var n=arguments[0],r=arguments[1],i=arguments[2],o=this.removeItem(r,i);if(o)return!0;for(var a=null,s=r.getChildBoundables().iterator();s.hasNext();){var l=s.next();if(this.getIntersectsOp().intersects(l.getBounds(),n)&&l instanceof Je&&(o=this.remove(n,l,i))){a=l;break}}return null!==a&&a.getChildBoundables().isEmpty()&&r.getChildBoundables().remove(a),o}},en.prototype.createHigherLevels=function(t,e){et.isTrue(!t.isEmpty());var n=this.createParentBoundables(t,e+1);return 1===n.size()?n.get(0):this.createHigherLevels(n,e+1)},en.prototype.depth=function(){if(0===arguments.length)return this.isEmpty()?0:(this.build(),this.depth(this._root));if(1===arguments.length){for(var t=0,e=arguments[0].getChildBoundables().iterator();e.hasNext();){var n=e.next();if(n instanceof Je){var r=this.depth(n);r>t&&(t=r)}}return t+1}},en.prototype.createParentBoundables=function(t,e){et.isTrue(!t.isEmpty());var n=new xt;n.add(this.createNode(e));var r=new xt(t);Qe.sort(r,this.getComparator());for(var i=r.iterator();i.hasNext();){var o=i.next();this.lastNode(n).getChildBoundables().size()===this.getNodeCapacity()&&n.add(this.createNode(e)),this.lastNode(n).addChildBoundable(o)}return n},en.prototype.isEmpty=function(){return this._built?this._root.isEmpty():this._itemBoundables.isEmpty()},en.prototype.interfaces_=function(){return[e]},en.prototype.getClass=function(){return en},en.compareDoubles=function(t,e){return t>e?1:t<e?-1:0},nn.IntersectsOp.get=function(){return rn},nn.serialVersionUID.get=function(){return-0x35ef64c82d4c5400},nn.DEFAULT_NODE_CAPACITY.get=function(){return 10},Object.defineProperties(en,nn);var rn=function(){},on=function(){};on.prototype.distance=function(t,e){},on.prototype.interfaces_=function(){return[]},on.prototype.getClass=function(){return on};var an=function(t){function n(e){e=e||n.DEFAULT_NODE_CAPACITY,t.call(this,e)}t&&(n.__proto__=t),(n.prototype=Object.create(t&&t.prototype)).constructor=n;var r={STRtreeNode:{configurable:!0},serialVersionUID:{configurable:!0},xComparator:{configurable:!0},yComparator:{configurable:!0},intersectsOp:{configurable:!0},DEFAULT_NODE_CAPACITY:{configurable:!0}};return n.prototype.createParentBoundablesFromVerticalSlices=function(t,e){et.isTrue(t.length>0);for(var n=new xt,r=0;r<t.length;r++)n.addAll(this.createParentBoundablesFromVerticalSlice(t[r],e));return n},n.prototype.createNode=function(t){return new sn(t)},n.prototype.size=function(){return 0===arguments.length?t.prototype.size.call(this):t.prototype.size.apply(this,arguments)},n.prototype.insert=function(){if(2!==arguments.length)return t.prototype.insert.apply(this,arguments);var e=arguments[0],n=arguments[1];if(e.isNull())return null;t.prototype.insert.call(this,e,n)},n.prototype.getIntersectsOp=function(){return n.intersectsOp},n.prototype.verticalSlices=function(t,e){for(var n=Math.trunc(Math.ceil(t.size()/e)),r=new Array(e).fill(null),i=t.iterator(),o=0;o<e;o++){r[o]=new xt;for(var a=0;i.hasNext()&&a<n;){var s=i.next();r[o].add(s),a++}}return r},n.prototype.query=function(){if(1===arguments.length){var e=arguments[0];return t.prototype.query.call(this,e)}if(2===arguments.length){var n=arguments[0],r=arguments[1];t.prototype.query.call(this,n,r)}else if(3===arguments.length)if(L(arguments[2],Ke)&&arguments[0]instanceof Object&&arguments[1]instanceof Je){var i=arguments[0],o=arguments[1],a=arguments[2];t.prototype.query.call(this,i,o,a)}else if(L(arguments[2],Ot)&&arguments[0]instanceof Object&&arguments[1]instanceof Je){var s=arguments[0],l=arguments[1],u=arguments[2];t.prototype.query.call(this,s,l,u)}},n.prototype.getComparator=function(){return n.yComparator},n.prototype.createParentBoundablesFromVerticalSlice=function(e,n){return t.prototype.createParentBoundables.call(this,e,n)},n.prototype.remove=function(){if(2===arguments.length){var e=arguments[0],n=arguments[1];return t.prototype.remove.call(this,e,n)}return t.prototype.remove.apply(this,arguments)},n.prototype.depth=function(){return 0===arguments.length?t.prototype.depth.call(this):t.prototype.depth.apply(this,arguments)},n.prototype.createParentBoundables=function(t,e){et.isTrue(!t.isEmpty());var r=Math.trunc(Math.ceil(t.size()/this.getNodeCapacity())),i=new xt(t);Qe.sort(i,n.xComparator);var o=this.verticalSlices(i,Math.trunc(Math.ceil(Math.sqrt(r))));return this.createParentBoundablesFromVerticalSlices(o,e)},n.prototype.nearestNeighbour=function(){if(1===arguments.length){if(L(arguments[0],on)){var t=arguments[0],e=new tn(this.getRoot(),this.getRoot(),t);return this.nearestNeighbour(e)}if(arguments[0]instanceof tn){var r=arguments[0];return this.nearestNeighbour(r,_.POSITIVE_INFINITY)}}else if(2===arguments.length){if(arguments[0]instanceof n&&L(arguments[1],on)){var i=arguments[0],o=arguments[1],a=new tn(this.getRoot(),i.getRoot(),o);return this.nearestNeighbour(a)}if(arguments[0]instanceof tn&&"number"==typeof arguments[1]){var s=arguments[0],l=arguments[1],u=null,c=new He;for(c.add(s);!c.isEmpty()&&l>0;){var h=c.poll(),p=h.getDistance();if(p>=l)break;h.isLeaves()?(l=p,u=h):h.expandToQueue(c,l)}return[u.getBoundable(0).getItem(),u.getBoundable(1).getItem()]}}else if(3===arguments.length){var f=arguments[0],d=arguments[1],g=arguments[2],y=new We(f,d),m=new tn(this.getRoot(),y,g);return this.nearestNeighbour(m)[0]}},n.prototype.interfaces_=function(){return[Ze,e]},n.prototype.getClass=function(){return n},n.centreX=function(t){return n.avg(t.getMinX(),t.getMaxX())},n.avg=function(t,e){return(t+e)/2},n.centreY=function(t){return n.avg(t.getMinY(),t.getMaxY())},r.STRtreeNode.get=function(){return sn},r.serialVersionUID.get=function(){return 0x39920f7d5f261e0},r.xComparator.get=function(){return{interfaces_:function(){return[x]},compare:function(e,r){return t.compareDoubles(n.centreX(e.getBounds()),n.centreX(r.getBounds()))}}},r.yComparator.get=function(){return{interfaces_:function(){return[x]},compare:function(e,r){return t.compareDoubles(n.centreY(e.getBounds()),n.centreY(r.getBounds()))}}},r.intersectsOp.get=function(){return{interfaces_:function(){return[t.IntersectsOp]},intersects:function(t,e){return t.intersects(e)}}},r.DEFAULT_NODE_CAPACITY.get=function(){return 10},Object.defineProperties(n,r),n}(en),sn=function(t){function e(){var e=arguments[0];t.call(this,e)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.computeBounds=function(){for(var t=null,e=this.getChildBoundables().iterator();e.hasNext();){var n=e.next();null===t?t=new X(n.getBounds()):t.expandToInclude(n.getBounds())}return t},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(Je),ln=function(){};ln.prototype.interfaces_=function(){return[]},ln.prototype.getClass=function(){return ln},ln.relativeSign=function(t,e){return t<e?-1:t>e?1:0},ln.compare=function(t,e,n){if(e.equals2D(n))return 0;var r=ln.relativeSign(e.x,n.x),i=ln.relativeSign(e.y,n.y);switch(t){case 0:return ln.compareValue(r,i);case 1:return ln.compareValue(i,r);case 2:return ln.compareValue(i,-r);case 3:return ln.compareValue(-r,i);case 4:return ln.compareValue(-r,-i);case 5:return ln.compareValue(-i,-r);case 6:return ln.compareValue(-i,r);case 7:return ln.compareValue(r,-i)}return et.shouldNeverReachHere("invalid octant value"),0},ln.compareValue=function(t,e){return t<0?-1:t>0?1:e<0?-1:e>0?1:0};var un=function(){this._segString=null,this.coord=null,this.segmentIndex=null,this._segmentOctant=null,this._isInterior=null;var t=arguments[0],e=arguments[1],n=arguments[2],r=arguments[3];this._segString=t,this.coord=new E(e),this.segmentIndex=n,this._segmentOctant=r,this._isInterior=!e.equals2D(t.getCoordinate(n))};un.prototype.getCoordinate=function(){return this.coord},un.prototype.print=function(t){t.print(this.coord),t.print(" seg # = "+this.segmentIndex)},un.prototype.compareTo=function(t){var e=t;return this.segmentIndex<e.segmentIndex?-1:this.segmentIndex>e.segmentIndex?1:this.coord.equals2D(e.coord)?0:ln.compare(this._segmentOctant,this.coord,e.coord)},un.prototype.isEndPoint=function(t){return 0===this.segmentIndex&&!this._isInterior||this.segmentIndex===t},un.prototype.isInterior=function(){return this._isInterior},un.prototype.interfaces_=function(){return[w]},un.prototype.getClass=function(){return un};var cn=function(){this._nodeMap=new h,this._edge=null;var t=arguments[0];this._edge=t};cn.prototype.getSplitCoordinates=function(){var t=new St;this.addEndpoints();for(var e=this.iterator(),n=e.next();e.hasNext();){var r=e.next();this.addEdgeCoordinates(n,r,t),n=r}return t.toCoordinateArray()},cn.prototype.addCollapsedNodes=function(){var t=new xt;this.findCollapsesFromInsertedNodes(t),this.findCollapsesFromExistingVertices(t);for(var e=t.iterator();e.hasNext();){var n=e.next().intValue();this.add(this._edge.getCoordinate(n),n)}},cn.prototype.print=function(t){t.println("Intersections:");for(var e=this.iterator();e.hasNext();)e.next().print(t)},cn.prototype.findCollapsesFromExistingVertices=function(t){for(var e=0;e<this._edge.size()-2;e++){var n=this._edge.getCoordinate(e),r=this._edge.getCoordinate(e+2);n.equals2D(r)&&t.add(new M(e+1))}},cn.prototype.addEdgeCoordinates=function(t,e,n){var r=this._edge.getCoordinate(e.segmentIndex),i=e.isInterior()||!e.coord.equals2D(r);n.add(new E(t.coord),!1);for(var o=t.segmentIndex+1;o<=e.segmentIndex;o++)n.add(this._edge.getCoordinate(o));i&&n.add(new E(e.coord))},cn.prototype.iterator=function(){return this._nodeMap.values().iterator()},cn.prototype.addSplitEdges=function(t){this.addEndpoints(),this.addCollapsedNodes();for(var e=this.iterator(),n=e.next();e.hasNext();){var r=e.next(),i=this.createSplitEdge(n,r);t.add(i),n=r}},cn.prototype.findCollapseIndex=function(t,e,n){if(!t.coord.equals2D(e.coord))return!1;var r=e.segmentIndex-t.segmentIndex;return e.isInterior()||r--,1===r&&(n[0]=t.segmentIndex+1,!0)},cn.prototype.findCollapsesFromInsertedNodes=function(t){for(var e=new Array(1).fill(null),n=this.iterator(),r=n.next();n.hasNext();){var i=n.next();this.findCollapseIndex(r,i,e)&&t.add(new M(e[0])),r=i}},cn.prototype.getEdge=function(){return this._edge},cn.prototype.addEndpoints=function(){var t=this._edge.size()-1;this.add(this._edge.getCoordinate(0),0),this.add(this._edge.getCoordinate(t),t)},cn.prototype.createSplitEdge=function(t,e){var n=e.segmentIndex-t.segmentIndex+2,r=this._edge.getCoordinate(e.segmentIndex),i=e.isInterior()||!e.coord.equals2D(r);i||n--;var o=new Array(n).fill(null),a=0;o[a++]=new E(t.coord);for(var s=t.segmentIndex+1;s<=e.segmentIndex;s++)o[a++]=this._edge.getCoordinate(s);return i&&(o[a]=new E(e.coord)),new dn(o,this._edge.getData())},cn.prototype.add=function(t,e){var n=new un(this._edge,t,e,this._edge.getSegmentOctant(e)),r=this._nodeMap.get(n);return null!==r?(et.isTrue(r.coord.equals2D(t),"Found equal nodes with different coordinates"),r):(this._nodeMap.put(n,n),n)},cn.prototype.checkSplitEdgesCorrectness=function(t){var e=this._edge.getCoordinates(),n=t.get(0).getCoordinate(0);if(!n.equals2D(e[0]))throw new Q("bad split edge start point at "+n);var r=t.get(t.size()-1).getCoordinates(),i=r[r.length-1];if(!i.equals2D(e[e.length-1]))throw new Q("bad split edge end point at "+i)},cn.prototype.interfaces_=function(){return[]},cn.prototype.getClass=function(){return cn};var hn=function(){};hn.prototype.interfaces_=function(){return[]},hn.prototype.getClass=function(){return hn},hn.octant=function(){if("number"==typeof arguments[0]&&"number"==typeof arguments[1]){var t=arguments[0],e=arguments[1];if(0===t&&0===e)throw new v("Cannot compute the octant for point ( "+t+", "+e+" )");var n=Math.abs(t),r=Math.abs(e);return t>=0?e>=0?n>=r?0:1:n>=r?7:6:e>=0?n>=r?3:2:n>=r?4:5}if(arguments[0]instanceof E&&arguments[1]instanceof E){var i=arguments[0],o=arguments[1],a=o.x-i.x,s=o.y-i.y;if(0===a&&0===s)throw new v("Cannot compute the octant for two identical points "+i);return hn.octant(a,s)}};var pn=function(){};pn.prototype.getCoordinates=function(){},pn.prototype.size=function(){},pn.prototype.getCoordinate=function(t){},pn.prototype.isClosed=function(){},pn.prototype.setData=function(t){},pn.prototype.getData=function(){},pn.prototype.interfaces_=function(){return[]},pn.prototype.getClass=function(){return pn};var fn=function(){};fn.prototype.addIntersection=function(t,e){},fn.prototype.interfaces_=function(){return[pn]},fn.prototype.getClass=function(){return fn};var dn=function(){this._nodeList=new cn(this),this._pts=null,this._data=null;var t=arguments[0],e=arguments[1];this._pts=t,this._data=e};dn.prototype.getCoordinates=function(){return this._pts},dn.prototype.size=function(){return this._pts.length},dn.prototype.getCoordinate=function(t){return this._pts[t]},dn.prototype.isClosed=function(){return this._pts[0].equals(this._pts[this._pts.length-1])},dn.prototype.getSegmentOctant=function(t){return t===this._pts.length-1?-1:this.safeOctant(this.getCoordinate(t),this.getCoordinate(t+1))},dn.prototype.setData=function(t){this._data=t},dn.prototype.safeOctant=function(t,e){return t.equals2D(e)?0:hn.octant(t,e)},dn.prototype.getData=function(){return this._data},dn.prototype.addIntersection=function(){if(2===arguments.length){var t=arguments[0],e=arguments[1];this.addIntersectionNode(t,e)}else if(4===arguments.length){var n=arguments[0],r=arguments[1],i=arguments[3],o=new E(n.getIntersection(i));this.addIntersection(o,r)}},dn.prototype.toString=function(){return $.toLineString(new le(this._pts))},dn.prototype.getNodeList=function(){return this._nodeList},dn.prototype.addIntersectionNode=function(t,e){var n=e,r=n+1;if(r<this._pts.length){var i=this._pts[r];t.equals2D(i)&&(n=r)}return this._nodeList.add(t,n)},dn.prototype.addIntersections=function(t,e,n){for(var r=0;r<t.getIntersectionNum();r++)this.addIntersection(t,e,n,r)},dn.prototype.interfaces_=function(){return[fn]},dn.prototype.getClass=function(){return dn},dn.getNodedSubstrings=function(){if(1===arguments.length){var t=arguments[0],e=new xt;return dn.getNodedSubstrings(t,e),e}if(2===arguments.length)for(var n=arguments[0],r=arguments[1],i=n.iterator();i.hasNext();)i.next().getNodeList().addSplitEdges(r)};var gn=function(){if(this.p0=null,this.p1=null,0===arguments.length)this.p0=new E,this.p1=new E;else if(1===arguments.length){var t=arguments[0];this.p0=new E(t.p0),this.p1=new E(t.p1)}else if(2===arguments.length)this.p0=arguments[0],this.p1=arguments[1];else if(4===arguments.length){var e=arguments[0],n=arguments[1],r=arguments[2],i=arguments[3];this.p0=new E(e,n),this.p1=new E(r,i)}},yn={serialVersionUID:{configurable:!0}};gn.prototype.minX=function(){return Math.min(this.p0.x,this.p1.x)},gn.prototype.orientationIndex=function(){if(arguments[0]instanceof gn){var t=arguments[0],e=st.orientationIndex(this.p0,this.p1,t.p0),n=st.orientationIndex(this.p0,this.p1,t.p1);return e>=0&&n>=0?Math.max(e,n):e<=0&&n<=0?Math.max(e,n):0}if(arguments[0]instanceof E){var r=arguments[0];return st.orientationIndex(this.p0,this.p1,r)}},gn.prototype.toGeometry=function(t){return t.createLineString([this.p0,this.p1])},gn.prototype.isVertical=function(){return this.p0.x===this.p1.x},gn.prototype.equals=function(t){if(!(t instanceof gn))return!1;var e=t;return this.p0.equals(e.p0)&&this.p1.equals(e.p1)},gn.prototype.intersection=function(t){var e=new it;return e.computeIntersection(this.p0,this.p1,t.p0,t.p1),e.hasIntersection()?e.getIntersection(0):null},gn.prototype.project=function(){if(arguments[0]instanceof E){var t=arguments[0];if(t.equals(this.p0)||t.equals(this.p1))return new E(t);var e=this.projectionFactor(t),n=new E;return n.x=this.p0.x+e*(this.p1.x-this.p0.x),n.y=this.p0.y+e*(this.p1.y-this.p0.y),n}if(arguments[0]instanceof gn){var r=arguments[0],i=this.projectionFactor(r.p0),o=this.projectionFactor(r.p1);if(i>=1&&o>=1)return null;if(i<=0&&o<=0)return null;var a=this.project(r.p0);i<0&&(a=this.p0),i>1&&(a=this.p1);var s=this.project(r.p1);return o<0&&(s=this.p0),o>1&&(s=this.p1),new gn(a,s)}},gn.prototype.normalize=function(){this.p1.compareTo(this.p0)<0&&this.reverse()},gn.prototype.angle=function(){return Math.atan2(this.p1.y-this.p0.y,this.p1.x-this.p0.x)},gn.prototype.getCoordinate=function(t){return 0===t?this.p0:this.p1},gn.prototype.distancePerpendicular=function(t){return st.distancePointLinePerpendicular(t,this.p0,this.p1)},gn.prototype.minY=function(){return Math.min(this.p0.y,this.p1.y)},gn.prototype.midPoint=function(){return gn.midPoint(this.p0,this.p1)},gn.prototype.projectionFactor=function(t){if(t.equals(this.p0))return 0;if(t.equals(this.p1))return 1;var e=this.p1.x-this.p0.x,n=this.p1.y-this.p0.y,r=e*e+n*n;return r<=0?_.NaN:((t.x-this.p0.x)*e+(t.y-this.p0.y)*n)/r},gn.prototype.closestPoints=function(t){var e=this.intersection(t);if(null!==e)return[e,e];var n=new Array(2).fill(null),r=_.MAX_VALUE,i=null,o=this.closestPoint(t.p0);r=o.distance(t.p0),n[0]=o,n[1]=t.p0;var a=this.closestPoint(t.p1);(i=a.distance(t.p1))<r&&(r=i,n[0]=a,n[1]=t.p1);var s=t.closestPoint(this.p0);(i=s.distance(this.p0))<r&&(r=i,n[0]=this.p0,n[1]=s);var l=t.closestPoint(this.p1);return(i=l.distance(this.p1))<r&&(r=i,n[0]=this.p1,n[1]=l),n},gn.prototype.closestPoint=function(t){var e=this.projectionFactor(t);return e>0&&e<1?this.project(t):this.p0.distance(t)<this.p1.distance(t)?this.p0:this.p1},gn.prototype.maxX=function(){return Math.max(this.p0.x,this.p1.x)},gn.prototype.getLength=function(){return this.p0.distance(this.p1)},gn.prototype.compareTo=function(t){var e=t,n=this.p0.compareTo(e.p0);return 0!==n?n:this.p1.compareTo(e.p1)},gn.prototype.reverse=function(){var t=this.p0;this.p0=this.p1,this.p1=t},gn.prototype.equalsTopo=function(t){return this.p0.equals(t.p0)&&(this.p1.equals(t.p1)||this.p0.equals(t.p1))&&this.p1.equals(t.p0)},gn.prototype.lineIntersection=function(t){try{return q.intersection(this.p0,this.p1,t.p0,t.p1)}catch(t){if(!(t instanceof V))throw t}return null},gn.prototype.maxY=function(){return Math.max(this.p0.y,this.p1.y)},gn.prototype.pointAlongOffset=function(t,e){var n=this.p0.x+t*(this.p1.x-this.p0.x),r=this.p0.y+t*(this.p1.y-this.p0.y),i=this.p1.x-this.p0.x,o=this.p1.y-this.p0.y,a=Math.sqrt(i*i+o*o),s=0,l=0;if(0!==e){if(a<=0)throw new Error("Cannot compute offset from zero-length line segment");s=e*i/a,l=e*o/a}return new E(n-l,r+s)},gn.prototype.setCoordinates=function(){if(1===arguments.length){var t=arguments[0];this.setCoordinates(t.p0,t.p1)}else if(2===arguments.length){var e=arguments[0],n=arguments[1];this.p0.x=e.x,this.p0.y=e.y,this.p1.x=n.x,this.p1.y=n.y}},gn.prototype.segmentFraction=function(t){var e=this.projectionFactor(t);return e<0?e=0:(e>1||_.isNaN(e))&&(e=1),e},gn.prototype.toString=function(){return"LINESTRING( "+this.p0.x+" "+this.p0.y+", "+this.p1.x+" "+this.p1.y+")"},gn.prototype.isHorizontal=function(){return this.p0.y===this.p1.y},gn.prototype.distance=function(){if(arguments[0]instanceof gn){var t=arguments[0];return st.distanceLineLine(this.p0,this.p1,t.p0,t.p1)}if(arguments[0]instanceof E){var e=arguments[0];return st.distancePointLine(e,this.p0,this.p1)}},gn.prototype.pointAlong=function(t){var e=new E;return e.x=this.p0.x+t*(this.p1.x-this.p0.x),e.y=this.p0.y+t*(this.p1.y-this.p0.y),e},gn.prototype.hashCode=function(){var t=_.doubleToLongBits(this.p0.x);t^=31*_.doubleToLongBits(this.p0.y);var e=Math.trunc(t)^Math.trunc(t>>32),n=_.doubleToLongBits(this.p1.x);return n^=31*_.doubleToLongBits(this.p1.y),e^Math.trunc(n)^Math.trunc(n>>32)},gn.prototype.interfaces_=function(){return[w,e]},gn.prototype.getClass=function(){return gn},gn.midPoint=function(t,e){return new E((t.x+e.x)/2,(t.y+e.y)/2)},yn.serialVersionUID.get=function(){return 0x2d2172135f411c00},Object.defineProperties(gn,yn);var mn=function(){this.tempEnv1=new X,this.tempEnv2=new X,this._overlapSeg1=new gn,this._overlapSeg2=new gn};mn.prototype.overlap=function(){if(2===arguments.length);else if(4===arguments.length){var t=arguments[0],e=arguments[1],n=arguments[2],r=arguments[3];t.getLineSegment(e,this._overlapSeg1),n.getLineSegment(r,this._overlapSeg2),this.overlap(this._overlapSeg1,this._overlapSeg2)}},mn.prototype.interfaces_=function(){return[]},mn.prototype.getClass=function(){return mn};var vn=function(){this._pts=null,this._start=null,this._end=null,this._env=null,this._context=null,this._id=null;var t=arguments[0],e=arguments[1],n=arguments[2],r=arguments[3];this._pts=t,this._start=e,this._end=n,this._context=r};vn.prototype.getLineSegment=function(t,e){e.p0=this._pts[t],e.p1=this._pts[t+1]},vn.prototype.computeSelect=function(t,e,n,r){var i=this._pts[e],o=this._pts[n];if(r.tempEnv1.init(i,o),n-e==1)return r.select(this,e),null;if(!t.intersects(r.tempEnv1))return null;var a=Math.trunc((e+n)/2);e<a&&this.computeSelect(t,e,a,r),a<n&&this.computeSelect(t,a,n,r)},vn.prototype.getCoordinates=function(){for(var t=new Array(this._end-this._start+1).fill(null),e=0,n=this._start;n<=this._end;n++)t[e++]=this._pts[n];return t},vn.prototype.computeOverlaps=function(t,e){this.computeOverlapsInternal(this._start,this._end,t,t._start,t._end,e)},vn.prototype.setId=function(t){this._id=t},vn.prototype.select=function(t,e){this.computeSelect(t,this._start,this._end,e)},vn.prototype.getEnvelope=function(){if(null===this._env){var t=this._pts[this._start],e=this._pts[this._end];this._env=new X(t,e)}return this._env},vn.prototype.getEndIndex=function(){return this._end},vn.prototype.getStartIndex=function(){return this._start},vn.prototype.getContext=function(){return this._context},vn.prototype.getId=function(){return this._id},vn.prototype.computeOverlapsInternal=function(t,e,n,r,i,o){var a=this._pts[t],s=this._pts[e],l=n._pts[r],u=n._pts[i];if(e-t==1&&i-r==1)return o.overlap(this,t,n,r),null;if(o.tempEnv1.init(a,s),o.tempEnv2.init(l,u),!o.tempEnv1.intersects(o.tempEnv2))return null;var c=Math.trunc((t+e)/2),h=Math.trunc((r+i)/2);t<c&&(r<h&&this.computeOverlapsInternal(t,c,n,r,h,o),h<i&&this.computeOverlapsInternal(t,c,n,h,i,o)),c<e&&(r<h&&this.computeOverlapsInternal(c,e,n,r,h,o),h<i&&this.computeOverlapsInternal(c,e,n,h,i,o))},vn.prototype.interfaces_=function(){return[]},vn.prototype.getClass=function(){return vn};var _n=function(){};_n.prototype.interfaces_=function(){return[]},_n.prototype.getClass=function(){return _n},_n.getChainStartIndices=function(t){var e=0,n=new xt;n.add(new M(e));do{var r=_n.findChainEnd(t,e);n.add(new M(r)),e=r}while(e<t.length-1);return _n.toIntArray(n)},_n.findChainEnd=function(t,e){for(var n=e;n<t.length-1&&t[n].equals2D(t[n+1]);)n++;if(n>=t.length-1)return t.length-1;for(var r=Ge.quadrant(t[n],t[n+1]),i=e+1;i<t.length&&(t[i-1].equals2D(t[i])||Ge.quadrant(t[i-1],t[i])===r);)i++;return i-1},_n.getChains=function(){if(1===arguments.length){var t=arguments[0];return _n.getChains(t,null)}if(2===arguments.length){for(var e=arguments[0],n=arguments[1],r=new xt,i=_n.getChainStartIndices(e),o=0;o<i.length-1;o++){var a=new vn(e,i[o],i[o+1],n);r.add(a)}return r}},_n.toIntArray=function(t){for(var e=new Array(t.size()).fill(null),n=0;n<e.length;n++)e[n]=t.get(n).intValue();return e};var bn=function(){};bn.prototype.computeNodes=function(t){},bn.prototype.getNodedSubstrings=function(){},bn.prototype.interfaces_=function(){return[]},bn.prototype.getClass=function(){return bn};var wn=function(){if(this._segInt=null,0===arguments.length);else if(1===arguments.length){var t=arguments[0];this.setSegmentIntersector(t)}};wn.prototype.setSegmentIntersector=function(t){this._segInt=t},wn.prototype.interfaces_=function(){return[bn]},wn.prototype.getClass=function(){return wn};var On=function(t){function e(e){e?t.call(this,e):t.call(this),this._monoChains=new xt,this._index=new an,this._idCounter=0,this._nodedSegStrings=null,this._nOverlaps=0}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var n={SegmentOverlapAction:{configurable:!0}};return e.prototype.getMonotoneChains=function(){return this._monoChains},e.prototype.getNodedSubstrings=function(){return dn.getNodedSubstrings(this._nodedSegStrings)},e.prototype.getIndex=function(){return this._index},e.prototype.add=function(t){for(var e=_n.getChains(t.getCoordinates(),t).iterator();e.hasNext();){var n=e.next();n.setId(this._idCounter++),this._index.insert(n.getEnvelope(),n),this._monoChains.add(n)}},e.prototype.computeNodes=function(t){this._nodedSegStrings=t;for(var e=t.iterator();e.hasNext();)this.add(e.next());this.intersectChains()},e.prototype.intersectChains=function(){for(var t=new xn(this._segInt),e=this._monoChains.iterator();e.hasNext();)for(var n=e.next(),r=this._index.query(n.getEnvelope()).iterator();r.hasNext();){var i=r.next();if(i.getId()>n.getId()&&(n.computeOverlaps(i,t),this._nOverlaps++),this._segInt.isDone())return null}},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},n.SegmentOverlapAction.get=function(){return xn},Object.defineProperties(e,n),e}(wn),xn=function(t){function e(){t.call(this),this._si=null;var e=arguments[0];this._si=e}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.overlap=function(){if(4!==arguments.length)return t.prototype.overlap.apply(this,arguments);var e=arguments[0],n=arguments[1],r=arguments[2],i=arguments[3],o=e.getContext(),a=r.getContext();this._si.processIntersections(o,n,a,i)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(mn),En=function t(){if(this._quadrantSegments=t.DEFAULT_QUADRANT_SEGMENTS,this._endCapStyle=t.CAP_ROUND,this._joinStyle=t.JOIN_ROUND,this._mitreLimit=t.DEFAULT_MITRE_LIMIT,this._isSingleSided=!1,this._simplifyFactor=t.DEFAULT_SIMPLIFY_FACTOR,0===arguments.length);else if(1===arguments.length){var e=arguments[0];this.setQuadrantSegments(e)}else if(2===arguments.length){var n=arguments[0],r=arguments[1];this.setQuadrantSegments(n),this.setEndCapStyle(r)}else if(4===arguments.length){var i=arguments[0],o=arguments[1],a=arguments[2],s=arguments[3];this.setQuadrantSegments(i),this.setEndCapStyle(o),this.setJoinStyle(a),this.setMitreLimit(s)}},Sn={CAP_ROUND:{configurable:!0},CAP_FLAT:{configurable:!0},CAP_SQUARE:{configurable:!0},JOIN_ROUND:{configurable:!0},JOIN_MITRE:{configurable:!0},JOIN_BEVEL:{configurable:!0},DEFAULT_QUADRANT_SEGMENTS:{configurable:!0},DEFAULT_MITRE_LIMIT:{configurable:!0},DEFAULT_SIMPLIFY_FACTOR:{configurable:!0}};En.prototype.getEndCapStyle=function(){return this._endCapStyle},En.prototype.isSingleSided=function(){return this._isSingleSided},En.prototype.setQuadrantSegments=function(t){this._quadrantSegments=t,0===this._quadrantSegments&&(this._joinStyle=En.JOIN_BEVEL),this._quadrantSegments<0&&(this._joinStyle=En.JOIN_MITRE,this._mitreLimit=Math.abs(this._quadrantSegments)),t<=0&&(this._quadrantSegments=1),this._joinStyle!==En.JOIN_ROUND&&(this._quadrantSegments=En.DEFAULT_QUADRANT_SEGMENTS)},En.prototype.getJoinStyle=function(){return this._joinStyle},En.prototype.setJoinStyle=function(t){this._joinStyle=t},En.prototype.setSimplifyFactor=function(t){this._simplifyFactor=t<0?0:t},En.prototype.getSimplifyFactor=function(){return this._simplifyFactor},En.prototype.getQuadrantSegments=function(){return this._quadrantSegments},En.prototype.setEndCapStyle=function(t){this._endCapStyle=t},En.prototype.getMitreLimit=function(){return this._mitreLimit},En.prototype.setMitreLimit=function(t){this._mitreLimit=t},En.prototype.setSingleSided=function(t){this._isSingleSided=t},En.prototype.interfaces_=function(){return[]},En.prototype.getClass=function(){return En},En.bufferDistanceError=function(t){var e=Math.PI/2/t;return 1-Math.cos(e/2)},Sn.CAP_ROUND.get=function(){return 1},Sn.CAP_FLAT.get=function(){return 2},Sn.CAP_SQUARE.get=function(){return 3},Sn.JOIN_ROUND.get=function(){return 1},Sn.JOIN_MITRE.get=function(){return 2},Sn.JOIN_BEVEL.get=function(){return 3},Sn.DEFAULT_QUADRANT_SEGMENTS.get=function(){return 8},Sn.DEFAULT_MITRE_LIMIT.get=function(){return 5},Sn.DEFAULT_SIMPLIFY_FACTOR.get=function(){return.01},Object.defineProperties(En,Sn);var Cn=function(t){this._distanceTol=null,this._isDeleted=null,this._angleOrientation=st.COUNTERCLOCKWISE,this._inputLine=t||null},Tn={INIT:{configurable:!0},DELETE:{configurable:!0},KEEP:{configurable:!0},NUM_PTS_TO_CHECK:{configurable:!0}};Cn.prototype.isDeletable=function(t,e,n,r){var i=this._inputLine[t],o=this._inputLine[e],a=this._inputLine[n];return!!this.isConcave(i,o,a)&&!!this.isShallow(i,o,a,r)&&this.isShallowSampled(i,o,t,n,r)},Cn.prototype.deleteShallowConcavities=function(){for(var t=1,e=this.findNextNonDeletedIndex(t),n=this.findNextNonDeletedIndex(e),r=!1;n<this._inputLine.length;){var i=!1;this.isDeletable(t,e,n,this._distanceTol)&&(this._isDeleted[e]=Cn.DELETE,i=!0,r=!0),t=i?n:e,e=this.findNextNonDeletedIndex(t),n=this.findNextNonDeletedIndex(e)}return r},Cn.prototype.isShallowConcavity=function(t,e,n,r){return st.computeOrientation(t,e,n)===this._angleOrientation&&st.distancePointLine(e,t,n)<r},Cn.prototype.isShallowSampled=function(t,e,n,r,i){var o=Math.trunc((r-n)/Cn.NUM_PTS_TO_CHECK);o<=0&&(o=1);for(var a=n;a<r;a+=o)if(!this.isShallow(t,e,this._inputLine[a],i))return!1;return!0},Cn.prototype.isConcave=function(t,e,n){return st.computeOrientation(t,e,n)===this._angleOrientation},Cn.prototype.simplify=function(t){this._distanceTol=Math.abs(t),t<0&&(this._angleOrientation=st.CLOCKWISE),this._isDeleted=new Array(this._inputLine.length).fill(null);var e=!1;do{e=this.deleteShallowConcavities()}while(e);return this.collapseLine()},Cn.prototype.findNextNonDeletedIndex=function(t){for(var e=t+1;e<this._inputLine.length&&this._isDeleted[e]===Cn.DELETE;)e++;return e},Cn.prototype.isShallow=function(t,e,n,r){return st.distancePointLine(e,t,n)<r},Cn.prototype.collapseLine=function(){for(var t=new St,e=0;e<this._inputLine.length;e++)this._isDeleted[e]!==Cn.DELETE&&t.add(this._inputLine[e]);return t.toCoordinateArray()},Cn.prototype.interfaces_=function(){return[]},Cn.prototype.getClass=function(){return Cn},Cn.simplify=function(t,e){return new Cn(t).simplify(e)},Tn.INIT.get=function(){return 0},Tn.DELETE.get=function(){return 1},Tn.KEEP.get=function(){return 1},Tn.NUM_PTS_TO_CHECK.get=function(){return 10},Object.defineProperties(Cn,Tn);var In=function(){this._ptList=null,this._precisionModel=null,this._minimimVertexDistance=0,this._ptList=new xt},jn={COORDINATE_ARRAY_TYPE:{configurable:!0}};In.prototype.getCoordinates=function(){return this._ptList.toArray(In.COORDINATE_ARRAY_TYPE)},In.prototype.setPrecisionModel=function(t){this._precisionModel=t},In.prototype.addPt=function(t){var e=new E(t);if(this._precisionModel.makePrecise(e),this.isRedundant(e))return null;this._ptList.add(e)},In.prototype.revere=function(){},In.prototype.addPts=function(t,e){if(e)for(var n=0;n<t.length;n++)this.addPt(t[n]);else for(var r=t.length-1;r>=0;r--)this.addPt(t[r])},In.prototype.isRedundant=function(t){if(this._ptList.size()<1)return!1;var e=this._ptList.get(this._ptList.size()-1);return t.distance(e)<this._minimimVertexDistance},In.prototype.toString=function(){return(new me).createLineString(this.getCoordinates()).toString()},In.prototype.closeRing=function(){if(this._ptList.size()<1)return null;var t=new E(this._ptList.get(0)),e=this._ptList.get(this._ptList.size()-1);if(t.equals(e))return null;this._ptList.add(t)},In.prototype.setMinimumVertexDistance=function(t){this._minimimVertexDistance=t},In.prototype.interfaces_=function(){return[]},In.prototype.getClass=function(){return In},jn.COORDINATE_ARRAY_TYPE.get=function(){return new Array(0).fill(null)},Object.defineProperties(In,jn);var Ln=function(){},Rn={PI_TIMES_2:{configurable:!0},PI_OVER_2:{configurable:!0},PI_OVER_4:{configurable:!0},COUNTERCLOCKWISE:{configurable:!0},CLOCKWISE:{configurable:!0},NONE:{configurable:!0}};Ln.prototype.interfaces_=function(){return[]},Ln.prototype.getClass=function(){return Ln},Ln.toDegrees=function(t){return 180*t/Math.PI},Ln.normalize=function(t){for(;t>Math.PI;)t-=Ln.PI_TIMES_2;for(;t<=-Math.PI;)t+=Ln.PI_TIMES_2;return t},Ln.angle=function(){if(1===arguments.length){var t=arguments[0];return Math.atan2(t.y,t.x)}if(2===arguments.length){var e=arguments[0],n=arguments[1],r=n.x-e.x,i=n.y-e.y;return Math.atan2(i,r)}},Ln.isAcute=function(t,e,n){var r=t.x-e.x,i=t.y-e.y;return r*(n.x-e.x)+i*(n.y-e.y)>0},Ln.isObtuse=function(t,e,n){var r=t.x-e.x,i=t.y-e.y;return r*(n.x-e.x)+i*(n.y-e.y)<0},Ln.interiorAngle=function(t,e,n){var r=Ln.angle(e,t),i=Ln.angle(e,n);return Math.abs(i-r)},Ln.normalizePositive=function(t){if(t<0){for(;t<0;)t+=Ln.PI_TIMES_2;t>=Ln.PI_TIMES_2&&(t=0)}else{for(;t>=Ln.PI_TIMES_2;)t-=Ln.PI_TIMES_2;t<0&&(t=0)}return t},Ln.angleBetween=function(t,e,n){var r=Ln.angle(e,t),i=Ln.angle(e,n);return Ln.diff(r,i)},Ln.diff=function(t,e){var n=null;return(n=t<e?e-t:t-e)>Math.PI&&(n=2*Math.PI-n),n},Ln.toRadians=function(t){return t*Math.PI/180},Ln.getTurn=function(t,e){var n=Math.sin(e-t);return n>0?Ln.COUNTERCLOCKWISE:n<0?Ln.CLOCKWISE:Ln.NONE},Ln.angleBetweenOriented=function(t,e,n){var r=Ln.angle(e,t),i=Ln.angle(e,n)-r;return i<=-Math.PI?i+Ln.PI_TIMES_2:i>Math.PI?i-Ln.PI_TIMES_2:i},Rn.PI_TIMES_2.get=function(){return 2*Math.PI},Rn.PI_OVER_2.get=function(){return Math.PI/2},Rn.PI_OVER_4.get=function(){return Math.PI/4},Rn.COUNTERCLOCKWISE.get=function(){return st.COUNTERCLOCKWISE},Rn.CLOCKWISE.get=function(){return st.CLOCKWISE},Rn.NONE.get=function(){return st.COLLINEAR},Object.defineProperties(Ln,Rn);var Pn=function t(){this._maxCurveSegmentError=0,this._filletAngleQuantum=null,this._closingSegLengthFactor=1,this._segList=null,this._distance=0,this._precisionModel=null,this._bufParams=null,this._li=null,this._s0=null,this._s1=null,this._s2=null,this._seg0=new gn,this._seg1=new gn,this._offset0=new gn,this._offset1=new gn,this._side=0,this._hasNarrowConcaveAngle=!1;var e=arguments[0],n=arguments[1],r=arguments[2];this._precisionModel=e,this._bufParams=n,this._li=new it,this._filletAngleQuantum=Math.PI/2/n.getQuadrantSegments(),n.getQuadrantSegments()>=8&&n.getJoinStyle()===En.JOIN_ROUND&&(this._closingSegLengthFactor=t.MAX_CLOSING_SEG_LEN_FACTOR),this.init(r)},Nn={OFFSET_SEGMENT_SEPARATION_FACTOR:{configurable:!0},INSIDE_TURN_VERTEX_SNAP_DISTANCE_FACTOR:{configurable:!0},CURVE_VERTEX_SNAP_DISTANCE_FACTOR:{configurable:!0},MAX_CLOSING_SEG_LEN_FACTOR:{configurable:!0}};Pn.prototype.addNextSegment=function(t,e){if(this._s0=this._s1,this._s1=this._s2,this._s2=t,this._seg0.setCoordinates(this._s0,this._s1),this.computeOffsetSegment(this._seg0,this._side,this._distance,this._offset0),this._seg1.setCoordinates(this._s1,this._s2),this.computeOffsetSegment(this._seg1,this._side,this._distance,this._offset1),this._s1.equals(this._s2))return null;var n=st.computeOrientation(this._s0,this._s1,this._s2),r=n===st.CLOCKWISE&&this._side===Se.LEFT||n===st.COUNTERCLOCKWISE&&this._side===Se.RIGHT;0===n?this.addCollinear(e):r?this.addOutsideTurn(n,e):this.addInsideTurn(n,e)},Pn.prototype.addLineEndCap=function(t,e){var n=new gn(t,e),r=new gn;this.computeOffsetSegment(n,Se.LEFT,this._distance,r);var i=new gn;this.computeOffsetSegment(n,Se.RIGHT,this._distance,i);var o=e.x-t.x,a=e.y-t.y,s=Math.atan2(a,o);switch(this._bufParams.getEndCapStyle()){case En.CAP_ROUND:this._segList.addPt(r.p1),this.addFilletArc(e,s+Math.PI/2,s-Math.PI/2,st.CLOCKWISE,this._distance),this._segList.addPt(i.p1);break;case En.CAP_FLAT:this._segList.addPt(r.p1),this._segList.addPt(i.p1);break;case En.CAP_SQUARE:var l=new E;l.x=Math.abs(this._distance)*Math.cos(s),l.y=Math.abs(this._distance)*Math.sin(s);var u=new E(r.p1.x+l.x,r.p1.y+l.y),c=new E(i.p1.x+l.x,i.p1.y+l.y);this._segList.addPt(u),this._segList.addPt(c)}},Pn.prototype.getCoordinates=function(){return this._segList.getCoordinates()},Pn.prototype.addMitreJoin=function(t,e,n,r){var i=!0,o=null;try{o=q.intersection(e.p0,e.p1,n.p0,n.p1),(r<=0?1:o.distance(t)/Math.abs(r))>this._bufParams.getMitreLimit()&&(i=!1)}catch(t){if(!(t instanceof V))throw t;o=new E(0,0),i=!1}i?this._segList.addPt(o):this.addLimitedMitreJoin(e,n,r,this._bufParams.getMitreLimit())},Pn.prototype.addFilletCorner=function(t,e,n,r,i){var o=e.x-t.x,a=e.y-t.y,s=Math.atan2(a,o),l=n.x-t.x,u=n.y-t.y,c=Math.atan2(u,l);r===st.CLOCKWISE?s<=c&&(s+=2*Math.PI):s>=c&&(s-=2*Math.PI),this._segList.addPt(e),this.addFilletArc(t,s,c,r,i),this._segList.addPt(n)},Pn.prototype.addOutsideTurn=function(t,e){if(this._offset0.p1.distance(this._offset1.p0)<this._distance*Pn.OFFSET_SEGMENT_SEPARATION_FACTOR)return this._segList.addPt(this._offset0.p1),null;this._bufParams.getJoinStyle()===En.JOIN_MITRE?this.addMitreJoin(this._s1,this._offset0,this._offset1,this._distance):this._bufParams.getJoinStyle()===En.JOIN_BEVEL?this.addBevelJoin(this._offset0,this._offset1):(e&&this._segList.addPt(this._offset0.p1),this.addFilletCorner(this._s1,this._offset0.p1,this._offset1.p0,t,this._distance),this._segList.addPt(this._offset1.p0))},Pn.prototype.createSquare=function(t){this._segList.addPt(new E(t.x+this._distance,t.y+this._distance)),this._segList.addPt(new E(t.x+this._distance,t.y-this._distance)),this._segList.addPt(new E(t.x-this._distance,t.y-this._distance)),this._segList.addPt(new E(t.x-this._distance,t.y+this._distance)),this._segList.closeRing()},Pn.prototype.addSegments=function(t,e){this._segList.addPts(t,e)},Pn.prototype.addFirstSegment=function(){this._segList.addPt(this._offset1.p0)},Pn.prototype.addLastSegment=function(){this._segList.addPt(this._offset1.p1)},Pn.prototype.initSideSegments=function(t,e,n){this._s1=t,this._s2=e,this._side=n,this._seg1.setCoordinates(t,e),this.computeOffsetSegment(this._seg1,n,this._distance,this._offset1)},Pn.prototype.addLimitedMitreJoin=function(t,e,n,r){var i=this._seg0.p1,o=Ln.angle(i,this._seg0.p0),a=Ln.angleBetweenOriented(this._seg0.p0,i,this._seg1.p1)/2,s=Ln.normalize(o+a),l=Ln.normalize(s+Math.PI),u=r*n,c=n-u*Math.abs(Math.sin(a)),h=i.x+u*Math.cos(l),p=i.y+u*Math.sin(l),f=new E(h,p),d=new gn(i,f),g=d.pointAlongOffset(1,c),y=d.pointAlongOffset(1,-c);this._side===Se.LEFT?(this._segList.addPt(g),this._segList.addPt(y)):(this._segList.addPt(y),this._segList.addPt(g))},Pn.prototype.computeOffsetSegment=function(t,e,n,r){var i=e===Se.LEFT?1:-1,o=t.p1.x-t.p0.x,a=t.p1.y-t.p0.y,s=Math.sqrt(o*o+a*a),l=i*n*o/s,u=i*n*a/s;r.p0.x=t.p0.x-u,r.p0.y=t.p0.y+l,r.p1.x=t.p1.x-u,r.p1.y=t.p1.y+l},Pn.prototype.addFilletArc=function(t,e,n,r,i){var o=r===st.CLOCKWISE?-1:1,a=Math.abs(e-n),s=Math.trunc(a/this._filletAngleQuantum+.5);if(s<1)return null;for(var l=a/s,u=0,c=new E;u<a;){var h=e+o*u;c.x=t.x+i*Math.cos(h),c.y=t.y+i*Math.sin(h),this._segList.addPt(c),u+=l}},Pn.prototype.addInsideTurn=function(t,e){if(this._li.computeIntersection(this._offset0.p0,this._offset0.p1,this._offset1.p0,this._offset1.p1),this._li.hasIntersection())this._segList.addPt(this._li.getIntersection(0));else if(this._hasNarrowConcaveAngle=!0,this._offset0.p1.distance(this._offset1.p0)<this._distance*Pn.INSIDE_TURN_VERTEX_SNAP_DISTANCE_FACTOR)this._segList.addPt(this._offset0.p1);else{if(this._segList.addPt(this._offset0.p1),this._closingSegLengthFactor>0){var n=new E((this._closingSegLengthFactor*this._offset0.p1.x+this._s1.x)/(this._closingSegLengthFactor+1),(this._closingSegLengthFactor*this._offset0.p1.y+this._s1.y)/(this._closingSegLengthFactor+1));this._segList.addPt(n);var r=new E((this._closingSegLengthFactor*this._offset1.p0.x+this._s1.x)/(this._closingSegLengthFactor+1),(this._closingSegLengthFactor*this._offset1.p0.y+this._s1.y)/(this._closingSegLengthFactor+1));this._segList.addPt(r)}else this._segList.addPt(this._s1);this._segList.addPt(this._offset1.p0)}},Pn.prototype.createCircle=function(t){var e=new E(t.x+this._distance,t.y);this._segList.addPt(e),this.addFilletArc(t,0,2*Math.PI,-1,this._distance),this._segList.closeRing()},Pn.prototype.addBevelJoin=function(t,e){this._segList.addPt(t.p1),this._segList.addPt(e.p0)},Pn.prototype.init=function(t){this._distance=t,this._maxCurveSegmentError=t*(1-Math.cos(this._filletAngleQuantum/2)),this._segList=new In,this._segList.setPrecisionModel(this._precisionModel),this._segList.setMinimumVertexDistance(t*Pn.CURVE_VERTEX_SNAP_DISTANCE_FACTOR)},Pn.prototype.addCollinear=function(t){this._li.computeIntersection(this._s0,this._s1,this._s1,this._s2),this._li.getIntersectionNum()>=2&&(this._bufParams.getJoinStyle()===En.JOIN_BEVEL||this._bufParams.getJoinStyle()===En.JOIN_MITRE?(t&&this._segList.addPt(this._offset0.p1),this._segList.addPt(this._offset1.p0)):this.addFilletCorner(this._s1,this._offset0.p1,this._offset1.p0,st.CLOCKWISE,this._distance))},Pn.prototype.closeRing=function(){this._segList.closeRing()},Pn.prototype.hasNarrowConcaveAngle=function(){return this._hasNarrowConcaveAngle},Pn.prototype.interfaces_=function(){return[]},Pn.prototype.getClass=function(){return Pn},Nn.OFFSET_SEGMENT_SEPARATION_FACTOR.get=function(){return.001},Nn.INSIDE_TURN_VERTEX_SNAP_DISTANCE_FACTOR.get=function(){return.001},Nn.CURVE_VERTEX_SNAP_DISTANCE_FACTOR.get=function(){return 1e-6},Nn.MAX_CLOSING_SEG_LEN_FACTOR.get=function(){return 80},Object.defineProperties(Pn,Nn);var Mn=function(){this._distance=0,this._precisionModel=null,this._bufParams=null;var t=arguments[0],e=arguments[1];this._precisionModel=t,this._bufParams=e};Mn.prototype.getOffsetCurve=function(t,e){if(this._distance=e,0===e)return null;var n=e<0,r=Math.abs(e),i=this.getSegGen(r);t.length<=1?this.computePointCurve(t[0],i):this.computeOffsetCurve(t,n,i);var o=i.getCoordinates();return n&&Ct.reverse(o),o},Mn.prototype.computeSingleSidedBufferCurve=function(t,e,n){var r=this.simplifyTolerance(this._distance);if(e){n.addSegments(t,!0);var i=Cn.simplify(t,-r),o=i.length-1;n.initSideSegments(i[o],i[o-1],Se.LEFT),n.addFirstSegment();for(var a=o-2;a>=0;a--)n.addNextSegment(i[a],!0)}else{n.addSegments(t,!1);var s=Cn.simplify(t,r),l=s.length-1;n.initSideSegments(s[0],s[1],Se.LEFT),n.addFirstSegment();for(var u=2;u<=l;u++)n.addNextSegment(s[u],!0)}n.addLastSegment(),n.closeRing()},Mn.prototype.computeRingBufferCurve=function(t,e,n){var r=this.simplifyTolerance(this._distance);e===Se.RIGHT&&(r=-r);var i=Cn.simplify(t,r),o=i.length-1;n.initSideSegments(i[o-1],i[0],e);for(var a=1;a<=o;a++){var s=1!==a;n.addNextSegment(i[a],s)}n.closeRing()},Mn.prototype.computeLineBufferCurve=function(t,e){var n=this.simplifyTolerance(this._distance),r=Cn.simplify(t,n),i=r.length-1;e.initSideSegments(r[0],r[1],Se.LEFT);for(var o=2;o<=i;o++)e.addNextSegment(r[o],!0);e.addLastSegment(),e.addLineEndCap(r[i-1],r[i]);var a=Cn.simplify(t,-n),s=a.length-1;e.initSideSegments(a[s],a[s-1],Se.LEFT);for(var l=s-2;l>=0;l--)e.addNextSegment(a[l],!0);e.addLastSegment(),e.addLineEndCap(a[1],a[0]),e.closeRing()},Mn.prototype.computePointCurve=function(t,e){switch(this._bufParams.getEndCapStyle()){case En.CAP_ROUND:e.createCircle(t);break;case En.CAP_SQUARE:e.createSquare(t)}},Mn.prototype.getLineCurve=function(t,e){if(this._distance=e,e<0&&!this._bufParams.isSingleSided())return null;if(0===e)return null;var n=Math.abs(e),r=this.getSegGen(n);if(t.length<=1)this.computePointCurve(t[0],r);else if(this._bufParams.isSingleSided()){var i=e<0;this.computeSingleSidedBufferCurve(t,i,r)}else this.computeLineBufferCurve(t,r);return r.getCoordinates()},Mn.prototype.getBufferParameters=function(){return this._bufParams},Mn.prototype.simplifyTolerance=function(t){return t*this._bufParams.getSimplifyFactor()},Mn.prototype.getRingCurve=function(t,e,n){if(this._distance=n,t.length<=2)return this.getLineCurve(t,n);if(0===n)return Mn.copyCoordinates(t);var r=this.getSegGen(n);return this.computeRingBufferCurve(t,e,r),r.getCoordinates()},Mn.prototype.computeOffsetCurve=function(t,e,n){var r=this.simplifyTolerance(this._distance);if(e){var i=Cn.simplify(t,-r),o=i.length-1;n.initSideSegments(i[o],i[o-1],Se.LEFT),n.addFirstSegment();for(var a=o-2;a>=0;a--)n.addNextSegment(i[a],!0)}else{var s=Cn.simplify(t,r),l=s.length-1;n.initSideSegments(s[0],s[1],Se.LEFT),n.addFirstSegment();for(var u=2;u<=l;u++)n.addNextSegment(s[u],!0)}n.addLastSegment()},Mn.prototype.getSegGen=function(t){return new Pn(this._precisionModel,this._bufParams,t)},Mn.prototype.interfaces_=function(){return[]},Mn.prototype.getClass=function(){return Mn},Mn.copyCoordinates=function(t){for(var e=new Array(t.length).fill(null),n=0;n<e.length;n++)e[n]=new E(t[n]);return e};var An=function(){this._subgraphs=null,this._seg=new gn,this._cga=new st;var t=arguments[0];this._subgraphs=t},kn={DepthSegment:{configurable:!0}};An.prototype.findStabbedSegments=function(){if(1===arguments.length){for(var t=arguments[0],e=new xt,n=this._subgraphs.iterator();n.hasNext();){var r=n.next(),i=r.getEnvelope();t.y<i.getMinY()||t.y>i.getMaxY()||this.findStabbedSegments(t,r.getDirectedEdges(),e)}return e}if(3===arguments.length)if(L(arguments[2],Ot)&&arguments[0]instanceof E&&arguments[1]instanceof Be){for(var o=arguments[0],a=arguments[1],s=arguments[2],l=a.getEdge().getCoordinates(),u=0;u<l.length-1;u++)if(this._seg.p0=l[u],this._seg.p1=l[u+1],this._seg.p0.y>this._seg.p1.y&&this._seg.reverse(),!(Math.max(this._seg.p0.x,this._seg.p1.x)<o.x)&&!(this._seg.isHorizontal()||o.y<this._seg.p0.y||o.y>this._seg.p1.y||st.computeOrientation(this._seg.p0,this._seg.p1,o)===st.RIGHT)){var c=a.getDepth(Se.LEFT);this._seg.p0.equals(l[u])||(c=a.getDepth(Se.RIGHT));var h=new Fn(this._seg,c);s.add(h)}}else if(L(arguments[2],Ot)&&arguments[0]instanceof E&&L(arguments[1],Ot))for(var p=arguments[0],f=arguments[1],d=arguments[2],g=f.iterator();g.hasNext();){var y=g.next();y.isForward()&&this.findStabbedSegments(p,y,d)}},An.prototype.getDepth=function(t){var e=this.findStabbedSegments(t);return 0===e.size()?0:Qe.min(e)._leftDepth},An.prototype.interfaces_=function(){return[]},An.prototype.getClass=function(){return An},kn.DepthSegment.get=function(){return Fn},Object.defineProperties(An,kn);var Fn=function(){this._upwardSeg=null,this._leftDepth=null;var t=arguments[0],e=arguments[1];this._upwardSeg=new gn(t),this._leftDepth=e};Fn.prototype.compareTo=function(t){var e=t;if(this._upwardSeg.minX()>=e._upwardSeg.maxX())return 1;if(this._upwardSeg.maxX()<=e._upwardSeg.minX())return-1;var n=this._upwardSeg.orientationIndex(e._upwardSeg);return 0!==n?n:0!=(n=-1*e._upwardSeg.orientationIndex(this._upwardSeg))?n:this._upwardSeg.compareTo(e._upwardSeg)},Fn.prototype.compareX=function(t,e){var n=t.p0.compareTo(e.p0);return 0!==n?n:t.p1.compareTo(e.p1)},Fn.prototype.toString=function(){return this._upwardSeg.toString()},Fn.prototype.interfaces_=function(){return[w]},Fn.prototype.getClass=function(){return Fn};var Dn=function(t,e,n){this.p0=t||null,this.p1=e||null,this.p2=n||null};Dn.prototype.area=function(){return Dn.area(this.p0,this.p1,this.p2)},Dn.prototype.signedArea=function(){return Dn.signedArea(this.p0,this.p1,this.p2)},Dn.prototype.interpolateZ=function(t){if(null===t)throw new v("Supplied point is null.");return Dn.interpolateZ(t,this.p0,this.p1,this.p2)},Dn.prototype.longestSideLength=function(){return Dn.longestSideLength(this.p0,this.p1,this.p2)},Dn.prototype.isAcute=function(){return Dn.isAcute(this.p0,this.p1,this.p2)},Dn.prototype.circumcentre=function(){return Dn.circumcentre(this.p0,this.p1,this.p2)},Dn.prototype.area3D=function(){return Dn.area3D(this.p0,this.p1,this.p2)},Dn.prototype.centroid=function(){return Dn.centroid(this.p0,this.p1,this.p2)},Dn.prototype.inCentre=function(){return Dn.inCentre(this.p0,this.p1,this.p2)},Dn.prototype.interfaces_=function(){return[]},Dn.prototype.getClass=function(){return Dn},Dn.area=function(t,e,n){return Math.abs(((n.x-t.x)*(e.y-t.y)-(e.x-t.x)*(n.y-t.y))/2)},Dn.signedArea=function(t,e,n){return((n.x-t.x)*(e.y-t.y)-(e.x-t.x)*(n.y-t.y))/2},Dn.det=function(t,e,n,r){return t*r-e*n},Dn.interpolateZ=function(t,e,n,r){var i=e.x,o=e.y,a=n.x-i,s=r.x-i,l=n.y-o,u=r.y-o,c=a*u-s*l,h=t.x-i,p=t.y-o,f=(u*h-s*p)/c,d=(-l*h+a*p)/c;return e.z+f*(n.z-e.z)+d*(r.z-e.z)},Dn.longestSideLength=function(t,e,n){var r=t.distance(e),i=e.distance(n),o=n.distance(t),a=r;return i>a&&(a=i),o>a&&(a=o),a},Dn.isAcute=function(t,e,n){return!!Ln.isAcute(t,e,n)&&!!Ln.isAcute(e,n,t)&&!!Ln.isAcute(n,t,e)},Dn.circumcentre=function(t,e,n){var r=n.x,i=n.y,o=t.x-r,a=t.y-i,s=e.x-r,l=e.y-i,u=2*Dn.det(o,a,s,l),c=Dn.det(a,o*o+a*a,l,s*s+l*l),h=Dn.det(o,o*o+a*a,s,s*s+l*l);return new E(r-c/u,i+h/u)},Dn.perpendicularBisector=function(t,e){var n=e.x-t.x,r=e.y-t.y,i=new q(t.x+n/2,t.y+r/2,1),o=new q(t.x-r+n/2,t.y+n+r/2,1);return new q(i,o)},Dn.angleBisector=function(t,e,n){var r=e.distance(t),i=r/(r+e.distance(n)),o=n.x-t.x,a=n.y-t.y;return new E(t.x+i*o,t.y+i*a)},Dn.area3D=function(t,e,n){var r=e.x-t.x,i=e.y-t.y,o=e.z-t.z,a=n.x-t.x,s=n.y-t.y,l=n.z-t.z,u=i*l-o*s,c=o*a-r*l,h=r*s-i*a,p=u*u+c*c+h*h;return Math.sqrt(p)/2},Dn.centroid=function(t,e,n){var r=(t.x+e.x+n.x)/3,i=(t.y+e.y+n.y)/3;return new E(r,i)},Dn.inCentre=function(t,e,n){var r=e.distance(n),i=t.distance(n),o=t.distance(e),a=r+i+o,s=(r*t.x+i*e.x+o*n.x)/a,l=(r*t.y+i*e.y+o*n.y)/a;return new E(s,l)};var Gn=function(){this._inputGeom=null,this._distance=null,this._curveBuilder=null,this._curveList=new xt;var t=arguments[0],e=arguments[1],n=arguments[2];this._inputGeom=t,this._distance=e,this._curveBuilder=n};Gn.prototype.addPoint=function(t){if(this._distance<=0)return null;var e=t.getCoordinates(),n=this._curveBuilder.getLineCurve(e,this._distance);this.addCurve(n,I.EXTERIOR,I.INTERIOR)},Gn.prototype.addPolygon=function(t){var e=this._distance,n=Se.LEFT;this._distance<0&&(e=-this._distance,n=Se.RIGHT);var r=t.getExteriorRing(),i=Ct.removeRepeatedPoints(r.getCoordinates());if(this._distance<0&&this.isErodedCompletely(r,this._distance))return null;if(this._distance<=0&&i.length<3)return null;this.addPolygonRing(i,e,n,I.EXTERIOR,I.INTERIOR);for(var o=0;o<t.getNumInteriorRing();o++){var a=t.getInteriorRingN(o),s=Ct.removeRepeatedPoints(a.getCoordinates());this._distance>0&&this.isErodedCompletely(a,-this._distance)||this.addPolygonRing(s,e,Se.opposite(n),I.INTERIOR,I.EXTERIOR)}},Gn.prototype.isTriangleErodedCompletely=function(t,e){var n=new Dn(t[0],t[1],t[2]),r=n.inCentre();return st.distancePointLine(r,n.p0,n.p1)<Math.abs(e)},Gn.prototype.addLineString=function(t){if(this._distance<=0&&!this._curveBuilder.getBufferParameters().isSingleSided())return null;var e=Ct.removeRepeatedPoints(t.getCoordinates()),n=this._curveBuilder.getLineCurve(e,this._distance);this.addCurve(n,I.EXTERIOR,I.INTERIOR)},Gn.prototype.addCurve=function(t,e,n){if(null===t||t.length<2)return null;var r=new dn(t,new Pe(0,I.BOUNDARY,e,n));this._curveList.add(r)},Gn.prototype.getCurves=function(){return this.add(this._inputGeom),this._curveList},Gn.prototype.addPolygonRing=function(t,e,n,r,i){if(0===e&&t.length<ee.MINIMUM_VALID_SIZE)return null;var o=r,a=i;t.length>=ee.MINIMUM_VALID_SIZE&&st.isCCW(t)&&(o=i,a=r,n=Se.opposite(n));var s=this._curveBuilder.getRingCurve(t,n,e);this.addCurve(s,o,a)},Gn.prototype.add=function(t){if(t.isEmpty())return null;t instanceof Qt?this.addPolygon(t):t instanceof Kt?this.addLineString(t):t instanceof Jt?this.addPoint(t):t instanceof te?this.addCollection(t):t instanceof Vt?this.addCollection(t):t instanceof ne?this.addCollection(t):t instanceof Bt&&this.addCollection(t)},Gn.prototype.isErodedCompletely=function(t,e){var n=t.getCoordinates();if(n.length<4)return e<0;if(4===n.length)return this.isTriangleErodedCompletely(n,e);var r=t.getEnvelopeInternal(),i=Math.min(r.getHeight(),r.getWidth());return e<0&&2*Math.abs(e)>i},Gn.prototype.addCollection=function(t){for(var e=0;e<t.getNumGeometries();e++){var n=t.getGeometryN(e);this.add(n)}},Gn.prototype.interfaces_=function(){return[]},Gn.prototype.getClass=function(){return Gn};var Un=function(){};Un.prototype.locate=function(t){},Un.prototype.interfaces_=function(){return[]},Un.prototype.getClass=function(){return Un};var zn=function(){this._parent=null,this._atStart=null,this._max=null,this._index=null,this._subcollectionIterator=null;var t=arguments[0];this._parent=t,this._atStart=!0,this._index=0,this._max=t.getNumGeometries()};zn.prototype.next=function(){if(this._atStart)return this._atStart=!1,zn.isAtomic(this._parent)&&this._index++,this._parent;if(null!==this._subcollectionIterator){if(this._subcollectionIterator.hasNext())return this._subcollectionIterator.next();this._subcollectionIterator=null}if(this._index>=this._max)throw new r;var t=this._parent.getGeometryN(this._index++);return t instanceof Bt?(this._subcollectionIterator=new zn(t),this._subcollectionIterator.next()):t},zn.prototype.remove=function(){throw new Error(this.getClass().getName())},zn.prototype.hasNext=function(){if(this._atStart)return!0;if(null!==this._subcollectionIterator){if(this._subcollectionIterator.hasNext())return!0;this._subcollectionIterator=null}return!(this._index>=this._max)},zn.prototype.interfaces_=function(){return[wt]},zn.prototype.getClass=function(){return zn},zn.isAtomic=function(t){return!(t instanceof Bt)};var Bn=function(){this._geom=null;var t=arguments[0];this._geom=t};Bn.prototype.locate=function(t){return Bn.locate(t,this._geom)},Bn.prototype.interfaces_=function(){return[Un]},Bn.prototype.getClass=function(){return Bn},Bn.isPointInRing=function(t,e){return!!e.getEnvelopeInternal().intersects(t)&&st.isPointInRing(t,e.getCoordinates())},Bn.containsPointInPolygon=function(t,e){if(e.isEmpty())return!1;var n=e.getExteriorRing();if(!Bn.isPointInRing(t,n))return!1;for(var r=0;r<e.getNumInteriorRing();r++){var i=e.getInteriorRingN(r);if(Bn.isPointInRing(t,i))return!1}return!0},Bn.containsPoint=function(t,e){if(e instanceof Qt)return Bn.containsPointInPolygon(t,e);if(e instanceof Bt)for(var n=new zn(e);n.hasNext();){var r=n.next();if(r!==e&&Bn.containsPoint(t,r))return!0}return!1},Bn.locate=function(t,e){return e.isEmpty()?I.EXTERIOR:Bn.containsPoint(t,e)?I.INTERIOR:I.EXTERIOR};var Vn=function(){this._edgeMap=new h,this._edgeList=null,this._ptInAreaLocation=[I.NONE,I.NONE]};Vn.prototype.getNextCW=function(t){this.getEdges();var e=this._edgeList.indexOf(t),n=e-1;return 0===e&&(n=this._edgeList.size()-1),this._edgeList.get(n)},Vn.prototype.propagateSideLabels=function(t){for(var e=I.NONE,n=this.iterator();n.hasNext();){var r=n.next().getLabel();r.isArea(t)&&r.getLocation(t,Se.LEFT)!==I.NONE&&(e=r.getLocation(t,Se.LEFT))}if(e===I.NONE)return null;for(var i=e,o=this.iterator();o.hasNext();){var a=o.next(),s=a.getLabel();if(s.getLocation(t,Se.ON)===I.NONE&&s.setLocation(t,Se.ON,i),s.isArea(t)){var l=s.getLocation(t,Se.LEFT),u=s.getLocation(t,Se.RIGHT);if(u!==I.NONE){if(u!==i)throw new Ie("side location conflict",a.getCoordinate());l===I.NONE&&et.shouldNeverReachHere("found single null side (at "+a.getCoordinate()+")"),i=l}else et.isTrue(s.getLocation(t,Se.LEFT)===I.NONE,"found single null side"),s.setLocation(t,Se.RIGHT,i),s.setLocation(t,Se.LEFT,i)}}},Vn.prototype.getCoordinate=function(){var t=this.iterator();return t.hasNext()?t.next().getCoordinate():null},Vn.prototype.print=function(t){Y.out.println("EdgeEndStar:   "+this.getCoordinate());for(var e=this.iterator();e.hasNext();)e.next().print(t)},Vn.prototype.isAreaLabelsConsistent=function(t){return this.computeEdgeEndLabels(t.getBoundaryNodeRule()),this.checkAreaLabelsConsistent(0)},Vn.prototype.checkAreaLabelsConsistent=function(t){var e=this.getEdges();if(e.size()<=0)return!0;var n=e.size()-1,r=e.get(n).getLabel().getLocation(t,Se.LEFT);et.isTrue(r!==I.NONE,"Found unlabelled area edge");for(var i=r,o=this.iterator();o.hasNext();){var a=o.next().getLabel();et.isTrue(a.isArea(t),"Found non-area edge");var s=a.getLocation(t,Se.LEFT),l=a.getLocation(t,Se.RIGHT);if(s===l)return!1;if(l!==i)return!1;i=s}return!0},Vn.prototype.findIndex=function(t){this.iterator();for(var e=0;e<this._edgeList.size();e++)if(this._edgeList.get(e)===t)return e;return-1},Vn.prototype.iterator=function(){return this.getEdges().iterator()},Vn.prototype.getEdges=function(){return null===this._edgeList&&(this._edgeList=new xt(this._edgeMap.values())),this._edgeList},Vn.prototype.getLocation=function(t,e,n){return this._ptInAreaLocation[t]===I.NONE&&(this._ptInAreaLocation[t]=Bn.locate(e,n[t].getGeometry())),this._ptInAreaLocation[t]},Vn.prototype.toString=function(){var t=new N;t.append("EdgeEndStar:   "+this.getCoordinate()),t.append("\n");for(var e=this.iterator();e.hasNext();){var n=e.next();t.append(n),t.append("\n")}return t.toString()},Vn.prototype.computeEdgeEndLabels=function(t){for(var e=this.iterator();e.hasNext();)e.next().computeLabel(t)},Vn.prototype.computeLabelling=function(t){this.computeEdgeEndLabels(t[0].getBoundaryNodeRule()),this.propagateSideLabels(0),this.propagateSideLabels(1);for(var e=[!1,!1],n=this.iterator();n.hasNext();)for(var r=n.next().getLabel(),i=0;i<2;i++)r.isLine(i)&&r.getLocation(i)===I.BOUNDARY&&(e[i]=!0);for(var o=this.iterator();o.hasNext();)for(var a=o.next(),s=a.getLabel(),l=0;l<2;l++)if(s.isAnyNull(l)){var u=I.NONE;if(e[l])u=I.EXTERIOR;else{var c=a.getCoordinate();u=this.getLocation(l,c,t)}s.setAllLocationsIfNull(l,u)}},Vn.prototype.getDegree=function(){return this._edgeMap.size()},Vn.prototype.insertEdgeEnd=function(t,e){this._edgeMap.put(t,e),this._edgeList=null},Vn.prototype.interfaces_=function(){return[]},Vn.prototype.getClass=function(){return Vn};var Yn=function(t){function e(){t.call(this),this._resultAreaEdgeList=null,this._label=null,this._SCANNING_FOR_INCOMING=1,this._LINKING_TO_OUTGOING=2}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.linkResultDirectedEdges=function(){this.getResultAreaEdges();for(var t=null,e=null,n=this._SCANNING_FOR_INCOMING,r=0;r<this._resultAreaEdgeList.size();r++){var i=this._resultAreaEdgeList.get(r),o=i.getSym();if(i.getLabel().isArea())switch(null===t&&i.isInResult()&&(t=i),n){case this._SCANNING_FOR_INCOMING:if(!o.isInResult())continue;e=o,n=this._LINKING_TO_OUTGOING;break;case this._LINKING_TO_OUTGOING:if(!i.isInResult())continue;e.setNext(i),n=this._SCANNING_FOR_INCOMING}}if(n===this._LINKING_TO_OUTGOING){if(null===t)throw new Ie("no outgoing dirEdge found",this.getCoordinate());et.isTrue(t.isInResult(),"unable to link last incoming dirEdge"),e.setNext(t)}},e.prototype.insert=function(t){var e=t;this.insertEdgeEnd(e,e)},e.prototype.getRightmostEdge=function(){var t=this.getEdges(),e=t.size();if(e<1)return null;var n=t.get(0);if(1===e)return n;var r=t.get(e-1),i=n.getQuadrant(),o=r.getQuadrant();return Ge.isNorthern(i)&&Ge.isNorthern(o)?n:Ge.isNorthern(i)||Ge.isNorthern(o)?0!==n.getDy()?n:0!==r.getDy()?r:(et.shouldNeverReachHere("found two horizontal edges incident on node"),null):r},e.prototype.print=function(t){Y.out.println("DirectedEdgeStar: "+this.getCoordinate());for(var e=this.iterator();e.hasNext();){var n=e.next();t.print("out "),n.print(t),t.println(),t.print("in "),n.getSym().print(t),t.println()}},e.prototype.getResultAreaEdges=function(){if(null!==this._resultAreaEdgeList)return this._resultAreaEdgeList;this._resultAreaEdgeList=new xt;for(var t=this.iterator();t.hasNext();){var e=t.next();(e.isInResult()||e.getSym().isInResult())&&this._resultAreaEdgeList.add(e)}return this._resultAreaEdgeList},e.prototype.updateLabelling=function(t){for(var e=this.iterator();e.hasNext();){var n=e.next().getLabel();n.setAllLocationsIfNull(0,t.getLocation(0)),n.setAllLocationsIfNull(1,t.getLocation(1))}},e.prototype.linkAllDirectedEdges=function(){this.getEdges();for(var t=null,e=null,n=this._edgeList.size()-1;n>=0;n--){var r=this._edgeList.get(n),i=r.getSym();null===e&&(e=i),null!==t&&i.setNext(t),t=r}e.setNext(t)},e.prototype.computeDepths=function(){if(1===arguments.length){var t=arguments[0],e=this.findIndex(t),n=t.getDepth(Se.LEFT),r=t.getDepth(Se.RIGHT),i=this.computeDepths(e+1,this._edgeList.size(),n);if(this.computeDepths(0,e,i)!==r)throw new Ie("depth mismatch at "+t.getCoordinate())}else if(3===arguments.length){for(var o=arguments[0],a=arguments[1],s=arguments[2],l=o;l<a;l++){var u=this._edgeList.get(l);u.setEdgeDepths(Se.RIGHT,s),s=u.getDepth(Se.LEFT)}return s}},e.prototype.mergeSymLabels=function(){for(var t=this.iterator();t.hasNext();){var e=t.next();e.getLabel().merge(e.getSym().getLabel())}},e.prototype.linkMinimalDirectedEdges=function(t){for(var e=null,n=null,r=this._SCANNING_FOR_INCOMING,i=this._resultAreaEdgeList.size()-1;i>=0;i--){var o=this._resultAreaEdgeList.get(i),a=o.getSym();switch(null===e&&o.getEdgeRing()===t&&(e=o),r){case this._SCANNING_FOR_INCOMING:if(a.getEdgeRing()!==t)continue;n=a,r=this._LINKING_TO_OUTGOING;break;case this._LINKING_TO_OUTGOING:if(o.getEdgeRing()!==t)continue;n.setNextMin(o),r=this._SCANNING_FOR_INCOMING}}r===this._LINKING_TO_OUTGOING&&(et.isTrue(null!==e,"found null for first outgoing dirEdge"),et.isTrue(e.getEdgeRing()===t,"unable to link last incoming dirEdge"),n.setNextMin(e))},e.prototype.getOutgoingDegree=function(){if(0===arguments.length){for(var t=0,e=this.iterator();e.hasNext();)e.next().isInResult()&&t++;return t}if(1===arguments.length){for(var n=arguments[0],r=0,i=this.iterator();i.hasNext();)i.next().getEdgeRing()===n&&r++;return r}},e.prototype.getLabel=function(){return this._label},e.prototype.findCoveredLineEdges=function(){for(var t=I.NONE,e=this.iterator();e.hasNext();){var n=e.next(),r=n.getSym();if(!n.isLineEdge()){if(n.isInResult()){t=I.INTERIOR;break}if(r.isInResult()){t=I.EXTERIOR;break}}}if(t===I.NONE)return null;for(var i=t,o=this.iterator();o.hasNext();){var a=o.next(),s=a.getSym();a.isLineEdge()?a.getEdge().setCovered(i===I.INTERIOR):(a.isInResult()&&(i=I.EXTERIOR),s.isInResult()&&(i=I.INTERIOR))}},e.prototype.computeLabelling=function(e){t.prototype.computeLabelling.call(this,e),this._label=new Pe(I.NONE);for(var n=this.iterator();n.hasNext();)for(var r=n.next().getEdge().getLabel(),i=0;i<2;i++){var o=r.getLocation(i);o!==I.INTERIOR&&o!==I.BOUNDARY||this._label.setLocation(i,I.INTERIOR)}},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(Vn),qn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createNode=function(t){return new Fe(t,new Yn)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(Ve),Xn=function t(){this._pts=null,this._orientation=null;var e=arguments[0];this._pts=e,this._orientation=t.orientation(e)};Xn.prototype.compareTo=function(t){var e=t;return Xn.compareOriented(this._pts,this._orientation,e._pts,e._orientation)},Xn.prototype.interfaces_=function(){return[w]},Xn.prototype.getClass=function(){return Xn},Xn.orientation=function(t){return 1===Ct.increasingDirection(t)},Xn.compareOriented=function(t,e,n,r){for(var i=e?1:-1,o=r?1:-1,a=e?t.length:-1,s=r?n.length:-1,l=e?0:t.length-1,u=r?0:n.length-1;;){var c=t[l].compareTo(n[u]);if(0!==c)return c;var h=(l+=i)===a,p=(u+=o)===s;if(h&&!p)return-1;if(!h&&p)return 1;if(h&&p)return 0}};var Wn=function(){this._edges=new xt,this._ocaMap=new h};Wn.prototype.print=function(t){t.print("MULTILINESTRING ( ");for(var e=0;e<this._edges.size();e++){var n=this._edges.get(e);e>0&&t.print(","),t.print("(");for(var r=n.getCoordinates(),i=0;i<r.length;i++)i>0&&t.print(","),t.print(r[i].x+" "+r[i].y);t.println(")")}t.print(")  ")},Wn.prototype.addAll=function(t){for(var e=t.iterator();e.hasNext();)this.add(e.next())},Wn.prototype.findEdgeIndex=function(t){for(var e=0;e<this._edges.size();e++)if(this._edges.get(e).equals(t))return e;return-1},Wn.prototype.iterator=function(){return this._edges.iterator()},Wn.prototype.getEdges=function(){return this._edges},Wn.prototype.get=function(t){return this._edges.get(t)},Wn.prototype.findEqualEdge=function(t){var e=new Xn(t.getCoordinates());return this._ocaMap.get(e)},Wn.prototype.add=function(t){this._edges.add(t);var e=new Xn(t.getCoordinates());this._ocaMap.put(e,t)},Wn.prototype.interfaces_=function(){return[]},Wn.prototype.getClass=function(){return Wn};var Hn=function(){};Hn.prototype.processIntersections=function(t,e,n,r){},Hn.prototype.isDone=function(){},Hn.prototype.interfaces_=function(){return[]},Hn.prototype.getClass=function(){return Hn};var Kn=function(){this._hasIntersection=!1,this._hasProper=!1,this._hasProperInterior=!1,this._hasInterior=!1,this._properIntersectionPoint=null,this._li=null,this._isSelfIntersection=null,this.numIntersections=0,this.numInteriorIntersections=0,this.numProperIntersections=0,this.numTests=0;var t=arguments[0];this._li=t};Kn.prototype.isTrivialIntersection=function(t,e,n,r){if(t===n&&1===this._li.getIntersectionNum()){if(Kn.isAdjacentSegments(e,r))return!0;if(t.isClosed()){var i=t.size()-1;if(0===e&&r===i||0===r&&e===i)return!0}}return!1},Kn.prototype.getProperIntersectionPoint=function(){return this._properIntersectionPoint},Kn.prototype.hasProperInteriorIntersection=function(){return this._hasProperInterior},Kn.prototype.getLineIntersector=function(){return this._li},Kn.prototype.hasProperIntersection=function(){return this._hasProper},Kn.prototype.processIntersections=function(t,e,n,r){if(t===n&&e===r)return null;this.numTests++;var i=t.getCoordinates()[e],o=t.getCoordinates()[e+1],a=n.getCoordinates()[r],s=n.getCoordinates()[r+1];this._li.computeIntersection(i,o,a,s),this._li.hasIntersection()&&(this.numIntersections++,this._li.isInteriorIntersection()&&(this.numInteriorIntersections++,this._hasInterior=!0),this.isTrivialIntersection(t,e,n,r)||(this._hasIntersection=!0,t.addIntersections(this._li,e,0),n.addIntersections(this._li,r,1),this._li.isProper()&&(this.numProperIntersections++,this._hasProper=!0,this._hasProperInterior=!0)))},Kn.prototype.hasIntersection=function(){return this._hasIntersection},Kn.prototype.isDone=function(){return!1},Kn.prototype.hasInteriorIntersection=function(){return this._hasInterior},Kn.prototype.interfaces_=function(){return[Hn]},Kn.prototype.getClass=function(){return Kn},Kn.isAdjacentSegments=function(t,e){return 1===Math.abs(t-e)};var Zn=function(){this.coord=null,this.segmentIndex=null,this.dist=null;var t=arguments[0],e=arguments[1],n=arguments[2];this.coord=new E(t),this.segmentIndex=e,this.dist=n};Zn.prototype.getSegmentIndex=function(){return this.segmentIndex},Zn.prototype.getCoordinate=function(){return this.coord},Zn.prototype.print=function(t){t.print(this.coord),t.print(" seg # = "+this.segmentIndex),t.println(" dist = "+this.dist)},Zn.prototype.compareTo=function(t){var e=t;return this.compare(e.segmentIndex,e.dist)},Zn.prototype.isEndPoint=function(t){return 0===this.segmentIndex&&0===this.dist||this.segmentIndex===t},Zn.prototype.toString=function(){return this.coord+" seg # = "+this.segmentIndex+" dist = "+this.dist},Zn.prototype.getDistance=function(){return this.dist},Zn.prototype.compare=function(t,e){return this.segmentIndex<t?-1:this.segmentIndex>t?1:this.dist<e?-1:this.dist>e?1:0},Zn.prototype.interfaces_=function(){return[w]},Zn.prototype.getClass=function(){return Zn};var Jn=function(){this._nodeMap=new h,this.edge=null;var t=arguments[0];this.edge=t};Jn.prototype.print=function(t){t.println("Intersections:");for(var e=this.iterator();e.hasNext();)e.next().print(t)},Jn.prototype.iterator=function(){return this._nodeMap.values().iterator()},Jn.prototype.addSplitEdges=function(t){this.addEndpoints();for(var e=this.iterator(),n=e.next();e.hasNext();){var r=e.next(),i=this.createSplitEdge(n,r);t.add(i),n=r}},Jn.prototype.addEndpoints=function(){var t=this.edge.pts.length-1;this.add(this.edge.pts[0],0,0),this.add(this.edge.pts[t],t,0)},Jn.prototype.createSplitEdge=function(t,e){var n=e.segmentIndex-t.segmentIndex+2,r=this.edge.pts[e.segmentIndex],i=e.dist>0||!e.coord.equals2D(r);i||n--;var o=new Array(n).fill(null),a=0;o[a++]=new E(t.coord);for(var s=t.segmentIndex+1;s<=e.segmentIndex;s++)o[a++]=this.edge.pts[s];return i&&(o[a]=e.coord),new nr(o,new Pe(this.edge._label))},Jn.prototype.add=function(t,e,n){var r=new Zn(t,e,n),i=this._nodeMap.get(r);return null!==i?i:(this._nodeMap.put(r,r),r)},Jn.prototype.isIntersection=function(t){for(var e=this.iterator();e.hasNext();)if(e.next().coord.equals(t))return!0;return!1},Jn.prototype.interfaces_=function(){return[]},Jn.prototype.getClass=function(){return Jn};var $n=function(){};$n.prototype.getChainStartIndices=function(t){var e=0,n=new xt;n.add(new M(e));do{var r=this.findChainEnd(t,e);n.add(new M(r)),e=r}while(e<t.length-1);return $n.toIntArray(n)},$n.prototype.findChainEnd=function(t,e){for(var n=Ge.quadrant(t[e],t[e+1]),r=e+1;r<t.length&&Ge.quadrant(t[r-1],t[r])===n;)r++;return r-1},$n.prototype.interfaces_=function(){return[]},$n.prototype.getClass=function(){return $n},$n.toIntArray=function(t){for(var e=new Array(t.size()).fill(null),n=0;n<e.length;n++)e[n]=t.get(n).intValue();return e};var Qn=function(){this.e=null,this.pts=null,this.startIndex=null,this.env1=new X,this.env2=new X;var t=arguments[0];this.e=t,this.pts=t.getCoordinates();var e=new $n;this.startIndex=e.getChainStartIndices(this.pts)};Qn.prototype.getCoordinates=function(){return this.pts},Qn.prototype.getMaxX=function(t){var e=this.pts[this.startIndex[t]].x,n=this.pts[this.startIndex[t+1]].x;return e>n?e:n},Qn.prototype.getMinX=function(t){var e=this.pts[this.startIndex[t]].x,n=this.pts[this.startIndex[t+1]].x;return e<n?e:n},Qn.prototype.computeIntersectsForChain=function(){if(4===arguments.length){var t=arguments[0],e=arguments[1],n=arguments[2],r=arguments[3];this.computeIntersectsForChain(this.startIndex[t],this.startIndex[t+1],e,e.startIndex[n],e.startIndex[n+1],r)}else if(6===arguments.length){var i=arguments[0],o=arguments[1],a=arguments[2],s=arguments[3],l=arguments[4],u=arguments[5],c=this.pts[i],h=this.pts[o],p=a.pts[s],f=a.pts[l];if(o-i==1&&l-s==1)return u.addIntersections(this.e,i,a.e,s),null;if(this.env1.init(c,h),this.env2.init(p,f),!this.env1.intersects(this.env2))return null;var d=Math.trunc((i+o)/2),g=Math.trunc((s+l)/2);i<d&&(s<g&&this.computeIntersectsForChain(i,d,a,s,g,u),g<l&&this.computeIntersectsForChain(i,d,a,g,l,u)),d<o&&(s<g&&this.computeIntersectsForChain(d,o,a,s,g,u),g<l&&this.computeIntersectsForChain(d,o,a,g,l,u))}},Qn.prototype.getStartIndexes=function(){return this.startIndex},Qn.prototype.computeIntersects=function(t,e){for(var n=0;n<this.startIndex.length-1;n++)for(var r=0;r<t.startIndex.length-1;r++)this.computeIntersectsForChain(n,t,r,e)},Qn.prototype.interfaces_=function(){return[]},Qn.prototype.getClass=function(){return Qn};var tr=function t(){this._depth=Array(2).fill().map(function(){return Array(3)});for(var e=0;e<2;e++)for(var n=0;n<3;n++)this._depth[e][n]=t.NULL_VALUE},er={NULL_VALUE:{configurable:!0}};tr.prototype.getDepth=function(t,e){return this._depth[t][e]},tr.prototype.setDepth=function(t,e,n){this._depth[t][e]=n},tr.prototype.isNull=function(){if(0===arguments.length){for(var t=0;t<2;t++)for(var e=0;e<3;e++)if(this._depth[t][e]!==tr.NULL_VALUE)return!1;return!0}if(1===arguments.length){var n=arguments[0];return this._depth[n][1]===tr.NULL_VALUE}if(2===arguments.length){var r=arguments[0],i=arguments[1];return this._depth[r][i]===tr.NULL_VALUE}},tr.prototype.normalize=function(){for(var t=0;t<2;t++)if(!this.isNull(t)){var e=this._depth[t][1];this._depth[t][2]<e&&(e=this._depth[t][2]),e<0&&(e=0);for(var n=1;n<3;n++){var r=0;this._depth[t][n]>e&&(r=1),this._depth[t][n]=r}}},tr.prototype.getDelta=function(t){return this._depth[t][Se.RIGHT]-this._depth[t][Se.LEFT]},tr.prototype.getLocation=function(t,e){return this._depth[t][e]<=0?I.EXTERIOR:I.INTERIOR},tr.prototype.toString=function(){return"A: "+this._depth[0][1]+","+this._depth[0][2]+" B: "+this._depth[1][1]+","+this._depth[1][2]},tr.prototype.add=function(){if(1===arguments.length)for(var t=arguments[0],e=0;e<2;e++)for(var n=1;n<3;n++){var r=t.getLocation(e,n);r!==I.EXTERIOR&&r!==I.INTERIOR||(this.isNull(e,n)?this._depth[e][n]=tr.depthAtLocation(r):this._depth[e][n]+=tr.depthAtLocation(r))}else if(3===arguments.length){var i=arguments[0],o=arguments[1];arguments[2]===I.INTERIOR&&this._depth[i][o]++}},tr.prototype.interfaces_=function(){return[]},tr.prototype.getClass=function(){return tr},tr.depthAtLocation=function(t){return t===I.EXTERIOR?0:t===I.INTERIOR?1:tr.NULL_VALUE},er.NULL_VALUE.get=function(){return-1},Object.defineProperties(tr,er);var nr=function(t){function e(){if(t.call(this),this.pts=null,this._env=null,this.eiList=new Jn(this),this._name=null,this._mce=null,this._isIsolated=!0,this._depth=new tr,this._depthDelta=0,1===arguments.length){var n=arguments[0];e.call(this,n,null)}else if(2===arguments.length){var r=arguments[0],i=arguments[1];this.pts=r,this._label=i}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDepth=function(){return this._depth},e.prototype.getCollapsedEdge=function(){var t=new Array(2).fill(null);return t[0]=this.pts[0],t[1]=this.pts[1],new e(t,Pe.toLineLabel(this._label))},e.prototype.isIsolated=function(){return this._isIsolated},e.prototype.getCoordinates=function(){return this.pts},e.prototype.setIsolated=function(t){this._isIsolated=t},e.prototype.setName=function(t){this._name=t},e.prototype.equals=function(t){if(!(t instanceof e))return!1;var n=t;if(this.pts.length!==n.pts.length)return!1;for(var r=!0,i=!0,o=this.pts.length,a=0;a<this.pts.length;a++)if(this.pts[a].equals2D(n.pts[a])||(r=!1),this.pts[a].equals2D(n.pts[--o])||(i=!1),!r&&!i)return!1;return!0},e.prototype.getCoordinate=function(){if(0===arguments.length)return this.pts.length>0?this.pts[0]:null;if(1===arguments.length){var t=arguments[0];return this.pts[t]}},e.prototype.print=function(t){t.print("edge "+this._name+": "),t.print("LINESTRING (");for(var e=0;e<this.pts.length;e++)e>0&&t.print(","),t.print(this.pts[e].x+" "+this.pts[e].y);t.print(")  "+this._label+" "+this._depthDelta)},e.prototype.computeIM=function(t){e.updateIM(this._label,t)},e.prototype.isCollapsed=function(){return!!this._label.isArea()&&3===this.pts.length&&!!this.pts[0].equals(this.pts[2])},e.prototype.isClosed=function(){return this.pts[0].equals(this.pts[this.pts.length-1])},e.prototype.getMaximumSegmentIndex=function(){return this.pts.length-1},e.prototype.getDepthDelta=function(){return this._depthDelta},e.prototype.getNumPoints=function(){return this.pts.length},e.prototype.printReverse=function(t){t.print("edge "+this._name+": ");for(var e=this.pts.length-1;e>=0;e--)t.print(this.pts[e]+" ");t.println("")},e.prototype.getMonotoneChainEdge=function(){return null===this._mce&&(this._mce=new Qn(this)),this._mce},e.prototype.getEnvelope=function(){if(null===this._env){this._env=new X;for(var t=0;t<this.pts.length;t++)this._env.expandToInclude(this.pts[t])}return this._env},e.prototype.addIntersection=function(t,e,n,r){var i=new E(t.getIntersection(r)),o=e,a=t.getEdgeDistance(n,r),s=o+1;if(s<this.pts.length){var l=this.pts[s];i.equals2D(l)&&(o=s,a=0)}this.eiList.add(i,o,a)},e.prototype.toString=function(){var t=new N;t.append("edge "+this._name+": "),t.append("LINESTRING (");for(var e=0;e<this.pts.length;e++)e>0&&t.append(","),t.append(this.pts[e].x+" "+this.pts[e].y);return t.append(")  "+this._label+" "+this._depthDelta),t.toString()},e.prototype.isPointwiseEqual=function(t){if(this.pts.length!==t.pts.length)return!1;for(var e=0;e<this.pts.length;e++)if(!this.pts[e].equals2D(t.pts[e]))return!1;return!0},e.prototype.setDepthDelta=function(t){this._depthDelta=t},e.prototype.getEdgeIntersectionList=function(){return this.eiList},e.prototype.addIntersections=function(t,e,n){for(var r=0;r<t.getIntersectionNum();r++)this.addIntersection(t,e,n,r)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e.updateIM=function(){if(2!==arguments.length)return t.prototype.updateIM.apply(this,arguments);var e=arguments[0],n=arguments[1];n.setAtLeastIfValid(e.getLocation(0,Se.ON),e.getLocation(1,Se.ON),1),e.isArea()&&(n.setAtLeastIfValid(e.getLocation(0,Se.LEFT),e.getLocation(1,Se.LEFT),2),n.setAtLeastIfValid(e.getLocation(0,Se.RIGHT),e.getLocation(1,Se.RIGHT),2))},e}(ke),rr=function(t){this._workingPrecisionModel=null,this._workingNoder=null,this._geomFact=null,this._graph=null,this._edgeList=new Wn,this._bufParams=t||null};rr.prototype.setWorkingPrecisionModel=function(t){this._workingPrecisionModel=t},rr.prototype.insertUniqueEdge=function(t){var e=this._edgeList.findEqualEdge(t);if(null!==e){var n=e.getLabel(),r=t.getLabel();e.isPointwiseEqual(t)||(r=new Pe(t.getLabel())).flip(),n.merge(r);var i=rr.depthDelta(r),o=e.getDepthDelta()+i;e.setDepthDelta(o)}else this._edgeList.add(t),t.setDepthDelta(rr.depthDelta(t.getLabel()))},rr.prototype.buildSubgraphs=function(t,e){for(var n=new xt,r=t.iterator();r.hasNext();){var i=r.next(),o=i.getRightmostCoordinate(),a=new An(n).getDepth(o);i.computeDepth(a),i.findResultEdges(),n.add(i),e.add(i.getDirectedEdges(),i.getNodes())}},rr.prototype.createSubgraphs=function(t){for(var e=new xt,n=t.getNodes().iterator();n.hasNext();){var r=n.next();if(!r.isVisited()){var i=new Le;i.create(r),e.add(i)}}return Qe.sort(e,Qe.reverseOrder()),e},rr.prototype.createEmptyResultGeometry=function(){return this._geomFact.createPolygon()},rr.prototype.getNoder=function(t){if(null!==this._workingNoder)return this._workingNoder;var e=new On,n=new it;return n.setPrecisionModel(t),e.setSegmentIntersector(new Kn(n)),e},rr.prototype.buffer=function(t,e){var n=this._workingPrecisionModel;null===n&&(n=t.getPrecisionModel()),this._geomFact=t.getFactory();var r=new Mn(n,this._bufParams),i=new Gn(t,e,r).getCurves();if(i.size()<=0)return this.createEmptyResultGeometry();this.computeNodedEdges(i,n),this._graph=new Ye(new qn),this._graph.addEdges(this._edgeList.getEdges());var o=this.createSubgraphs(this._graph),a=new qe(this._geomFact);this.buildSubgraphs(o,a);var s=a.getPolygons();return s.size()<=0?this.createEmptyResultGeometry():this._geomFact.buildGeometry(s)},rr.prototype.computeNodedEdges=function(t,e){var n=this.getNoder(e);n.computeNodes(t);for(var r=n.getNodedSubstrings().iterator();r.hasNext();){var i=r.next(),o=i.getCoordinates();if(2!==o.length||!o[0].equals2D(o[1])){var a=i.getData(),s=new nr(i.getCoordinates(),new Pe(a));this.insertUniqueEdge(s)}}},rr.prototype.setNoder=function(t){this._workingNoder=t},rr.prototype.interfaces_=function(){return[]},rr.prototype.getClass=function(){return rr},rr.depthDelta=function(t){var e=t.getLocation(0,Se.LEFT),n=t.getLocation(0,Se.RIGHT);return e===I.INTERIOR&&n===I.EXTERIOR?1:e===I.EXTERIOR&&n===I.INTERIOR?-1:0},rr.convertSegStrings=function(t){for(var e=new me,n=new xt;t.hasNext();){var r=t.next(),i=e.createLineString(r.getCoordinates());n.add(i)}return e.buildGeometry(n)};var ir=function(){if(this._noder=null,this._scaleFactor=null,this._offsetX=null,this._offsetY=null,this._isScaled=!1,2===arguments.length){var t=arguments[0],e=arguments[1];this._noder=t,this._scaleFactor=e,this._offsetX=0,this._offsetY=0,this._isScaled=!this.isIntegerPrecision()}else if(4===arguments.length){var n=arguments[0],r=arguments[1],i=arguments[2],o=arguments[3];this._noder=n,this._scaleFactor=r,this._offsetX=i,this._offsetY=o,this._isScaled=!this.isIntegerPrecision()}};ir.prototype.rescale=function(){if(L(arguments[0],bt))for(var t=arguments[0].iterator();t.hasNext();){var e=t.next();this.rescale(e.getCoordinates())}else if(arguments[0]instanceof Array){for(var n=arguments[0],r=0;r<n.length;r++)n[r].x=n[r].x/this._scaleFactor+this._offsetX,n[r].y=n[r].y/this._scaleFactor+this._offsetY;2===n.length&&n[0].equals2D(n[1])&&Y.out.println(n)}},ir.prototype.scale=function(){if(L(arguments[0],bt)){for(var t=arguments[0],e=new xt,n=t.iterator();n.hasNext();){var r=n.next();e.add(new dn(this.scale(r.getCoordinates()),r.getData()))}return e}if(arguments[0]instanceof Array){for(var i=arguments[0],o=new Array(i.length).fill(null),a=0;a<i.length;a++)o[a]=new E(Math.round((i[a].x-this._offsetX)*this._scaleFactor),Math.round((i[a].y-this._offsetY)*this._scaleFactor),i[a].z);return Ct.removeRepeatedPoints(o)}},ir.prototype.isIntegerPrecision=function(){return 1===this._scaleFactor},ir.prototype.getNodedSubstrings=function(){var t=this._noder.getNodedSubstrings();return this._isScaled&&this.rescale(t),t},ir.prototype.computeNodes=function(t){var e=t;this._isScaled&&(e=this.scale(t)),this._noder.computeNodes(e)},ir.prototype.interfaces_=function(){return[bn]},ir.prototype.getClass=function(){return ir};var or=function(){this._li=new it,this._segStrings=null;var t=arguments[0];this._segStrings=t},ar={fact:{configurable:!0}};or.prototype.checkEndPtVertexIntersections=function(){if(0===arguments.length)for(var t=this._segStrings.iterator();t.hasNext();){var e=t.next().getCoordinates();this.checkEndPtVertexIntersections(e[0],this._segStrings),this.checkEndPtVertexIntersections(e[e.length-1],this._segStrings)}else if(2===arguments.length)for(var n=arguments[0],r=arguments[1].iterator();r.hasNext();)for(var i=r.next().getCoordinates(),o=1;o<i.length-1;o++)if(i[o].equals(n))throw new Q("found endpt/interior pt intersection at index "+o+" :pt "+n)},or.prototype.checkInteriorIntersections=function(){if(0===arguments.length)for(var t=this._segStrings.iterator();t.hasNext();)for(var e=t.next(),n=this._segStrings.iterator();n.hasNext();){var r=n.next();this.checkInteriorIntersections(e,r)}else if(2===arguments.length)for(var i=arguments[0],o=arguments[1],a=i.getCoordinates(),s=o.getCoordinates(),l=0;l<a.length-1;l++)for(var u=0;u<s.length-1;u++)this.checkInteriorIntersections(i,l,o,u);else if(4===arguments.length){var c=arguments[0],h=arguments[1],p=arguments[2],f=arguments[3];if(c===p&&h===f)return null;var d=c.getCoordinates()[h],g=c.getCoordinates()[h+1],y=p.getCoordinates()[f],m=p.getCoordinates()[f+1];if(this._li.computeIntersection(d,g,y,m),this._li.hasIntersection()&&(this._li.isProper()||this.hasInteriorIntersection(this._li,d,g)||this.hasInteriorIntersection(this._li,y,m)))throw new Q("found non-noded intersection at "+d+"-"+g+" and "+y+"-"+m)}},or.prototype.checkValid=function(){this.checkEndPtVertexIntersections(),this.checkInteriorIntersections(),this.checkCollapses()},or.prototype.checkCollapses=function(){if(0===arguments.length)for(var t=this._segStrings.iterator();t.hasNext();){var e=t.next();this.checkCollapses(e)}else if(1===arguments.length)for(var n=arguments[0].getCoordinates(),r=0;r<n.length-2;r++)this.checkCollapse(n[r],n[r+1],n[r+2])},or.prototype.hasInteriorIntersection=function(t,e,n){for(var r=0;r<t.getIntersectionNum();r++){var i=t.getIntersection(r);if(!i.equals(e)&&!i.equals(n))return!0}return!1},or.prototype.checkCollapse=function(t,e,n){if(t.equals(n))throw new Q("found non-noded collapse at "+or.fact.createLineString([t,e,n]))},or.prototype.interfaces_=function(){return[]},or.prototype.getClass=function(){return or},ar.fact.get=function(){return new me},Object.defineProperties(or,ar);var sr=function(){this._li=null,this._pt=null,this._originalPt=null,this._ptScaled=null,this._p0Scaled=null,this._p1Scaled=null,this._scaleFactor=null,this._minx=null,this._maxx=null,this._miny=null,this._maxy=null,this._corner=new Array(4).fill(null),this._safeEnv=null;var t=arguments[0],e=arguments[1],n=arguments[2];if(this._originalPt=t,this._pt=t,this._scaleFactor=e,this._li=n,e<=0)throw new v("Scale factor must be non-zero");1!==e&&(this._pt=new E(this.scale(t.x),this.scale(t.y)),this._p0Scaled=new E,this._p1Scaled=new E),this.initCorners(this._pt)},lr={SAFE_ENV_EXPANSION_FACTOR:{configurable:!0}};sr.prototype.intersectsScaled=function(t,e){var n=Math.min(t.x,e.x),r=Math.max(t.x,e.x),i=Math.min(t.y,e.y),o=Math.max(t.y,e.y),a=this._maxx<n||this._minx>r||this._maxy<i||this._miny>o;if(a)return!1;var s=this.intersectsToleranceSquare(t,e);return et.isTrue(!(a&&s),"Found bad envelope test"),s},sr.prototype.initCorners=function(t){this._minx=t.x-.5,this._maxx=t.x+.5,this._miny=t.y-.5,this._maxy=t.y+.5,this._corner[0]=new E(this._maxx,this._maxy),this._corner[1]=new E(this._minx,this._maxy),this._corner[2]=new E(this._minx,this._miny),this._corner[3]=new E(this._maxx,this._miny)},sr.prototype.intersects=function(t,e){return 1===this._scaleFactor?this.intersectsScaled(t,e):(this.copyScaled(t,this._p0Scaled),this.copyScaled(e,this._p1Scaled),this.intersectsScaled(this._p0Scaled,this._p1Scaled))},sr.prototype.scale=function(t){return Math.round(t*this._scaleFactor)},sr.prototype.getCoordinate=function(){return this._originalPt},sr.prototype.copyScaled=function(t,e){e.x=this.scale(t.x),e.y=this.scale(t.y)},sr.prototype.getSafeEnvelope=function(){if(null===this._safeEnv){var t=sr.SAFE_ENV_EXPANSION_FACTOR/this._scaleFactor;this._safeEnv=new X(this._originalPt.x-t,this._originalPt.x+t,this._originalPt.y-t,this._originalPt.y+t)}return this._safeEnv},sr.prototype.intersectsPixelClosure=function(t,e){return this._li.computeIntersection(t,e,this._corner[0],this._corner[1]),!!this._li.hasIntersection()||(this._li.computeIntersection(t,e,this._corner[1],this._corner[2]),!!this._li.hasIntersection()||(this._li.computeIntersection(t,e,this._corner[2],this._corner[3]),!!this._li.hasIntersection()||(this._li.computeIntersection(t,e,this._corner[3],this._corner[0]),!!this._li.hasIntersection())))},sr.prototype.intersectsToleranceSquare=function(t,e){var n=!1,r=!1;return this._li.computeIntersection(t,e,this._corner[0],this._corner[1]),!!this._li.isProper()||(this._li.computeIntersection(t,e,this._corner[1],this._corner[2]),!!this._li.isProper()||(this._li.hasIntersection()&&(n=!0),this._li.computeIntersection(t,e,this._corner[2],this._corner[3]),!!this._li.isProper()||(this._li.hasIntersection()&&(r=!0),this._li.computeIntersection(t,e,this._corner[3],this._corner[0]),!!this._li.isProper()||!(!n||!r)||!!t.equals(this._pt)||!!e.equals(this._pt))))},sr.prototype.addSnappedNode=function(t,e){var n=t.getCoordinate(e),r=t.getCoordinate(e+1);return!!this.intersects(n,r)&&(t.addIntersection(this.getCoordinate(),e),!0)},sr.prototype.interfaces_=function(){return[]},sr.prototype.getClass=function(){return sr},lr.SAFE_ENV_EXPANSION_FACTOR.get=function(){return.75},Object.defineProperties(sr,lr);var ur=function(){this.tempEnv1=new X,this.selectedSegment=new gn};ur.prototype.select=function(){if(1===arguments.length);else if(2===arguments.length){var t=arguments[0],e=arguments[1];t.getLineSegment(e,this.selectedSegment),this.select(this.selectedSegment)}},ur.prototype.interfaces_=function(){return[]},ur.prototype.getClass=function(){return ur};var cr=function(){this._index=null;var t=arguments[0];this._index=t},hr={HotPixelSnapAction:{configurable:!0}};cr.prototype.snap=function(){if(1===arguments.length){var t=arguments[0];return this.snap(t,null,-1)}if(3===arguments.length){var e=arguments[0],n=arguments[1],r=arguments[2],i=e.getSafeEnvelope(),o=new pr(e,n,r);return this._index.query(i,{interfaces_:function(){return[Ke]},visitItem:function(t){t.select(i,o)}}),o.isNodeAdded()}},cr.prototype.interfaces_=function(){return[]},cr.prototype.getClass=function(){return cr},hr.HotPixelSnapAction.get=function(){return pr},Object.defineProperties(cr,hr);var pr=function(t){function e(){t.call(this),this._hotPixel=null,this._parentEdge=null,this._hotPixelVertexIndex=null,this._isNodeAdded=!1;var e=arguments[0],n=arguments[1],r=arguments[2];this._hotPixel=e,this._parentEdge=n,this._hotPixelVertexIndex=r}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.isNodeAdded=function(){return this._isNodeAdded},e.prototype.select=function(){if(2!==arguments.length)return t.prototype.select.apply(this,arguments);var e=arguments[0],n=arguments[1],r=e.getContext();if(null!==this._parentEdge&&r===this._parentEdge&&n===this._hotPixelVertexIndex)return null;this._isNodeAdded=this._hotPixel.addSnappedNode(r,n)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(ur),fr=function(){this._li=null,this._interiorIntersections=null;var t=arguments[0];this._li=t,this._interiorIntersections=new xt};fr.prototype.processIntersections=function(t,e,n,r){if(t===n&&e===r)return null;var i=t.getCoordinates()[e],o=t.getCoordinates()[e+1],a=n.getCoordinates()[r],s=n.getCoordinates()[r+1];if(this._li.computeIntersection(i,o,a,s),this._li.hasIntersection()&&this._li.isInteriorIntersection()){for(var l=0;l<this._li.getIntersectionNum();l++)this._interiorIntersections.add(this._li.getIntersection(l));t.addIntersections(this._li,e,0),n.addIntersections(this._li,r,1)}},fr.prototype.isDone=function(){return!1},fr.prototype.getInteriorIntersections=function(){return this._interiorIntersections},fr.prototype.interfaces_=function(){return[Hn]},fr.prototype.getClass=function(){return fr};var dr=function(){this._pm=null,this._li=null,this._scaleFactor=null,this._noder=null,this._pointSnapper=null,this._nodedSegStrings=null;var t=arguments[0];this._pm=t,this._li=new it,this._li.setPrecisionModel(t),this._scaleFactor=t.getScale()};dr.prototype.checkCorrectness=function(t){var e=dn.getNodedSubstrings(t),n=new or(e);try{n.checkValid()}catch(t){if(!(t instanceof B))throw t;t.printStackTrace()}},dr.prototype.getNodedSubstrings=function(){return dn.getNodedSubstrings(this._nodedSegStrings)},dr.prototype.snapRound=function(t,e){var n=this.findInteriorIntersections(t,e);this.computeIntersectionSnaps(n),this.computeVertexSnaps(t)},dr.prototype.findInteriorIntersections=function(t,e){var n=new fr(e);return this._noder.setSegmentIntersector(n),this._noder.computeNodes(t),n.getInteriorIntersections()},dr.prototype.computeVertexSnaps=function(){if(L(arguments[0],bt))for(var t=arguments[0].iterator();t.hasNext();){var e=t.next();this.computeVertexSnaps(e)}else if(arguments[0]instanceof dn)for(var n=arguments[0],r=n.getCoordinates(),i=0;i<r.length;i++){var o=new sr(r[i],this._scaleFactor,this._li);this._pointSnapper.snap(o,n,i)&&n.addIntersection(r[i],i)}},dr.prototype.computeNodes=function(t){this._nodedSegStrings=t,this._noder=new On,this._pointSnapper=new cr(this._noder.getIndex()),this.snapRound(t,this._li)},dr.prototype.computeIntersectionSnaps=function(t){for(var e=t.iterator();e.hasNext();){var n=e.next(),r=new sr(n,this._scaleFactor,this._li);this._pointSnapper.snap(r)}},dr.prototype.interfaces_=function(){return[bn]},dr.prototype.getClass=function(){return dr};var gr=function(){if(this._argGeom=null,this._distance=null,this._bufParams=new En,this._resultGeometry=null,this._saveException=null,1===arguments.length){var t=arguments[0];this._argGeom=t}else if(2===arguments.length){var e=arguments[0],n=arguments[1];this._argGeom=e,this._bufParams=n}},yr={CAP_ROUND:{configurable:!0},CAP_BUTT:{configurable:!0},CAP_FLAT:{configurable:!0},CAP_SQUARE:{configurable:!0},MAX_PRECISION_DIGITS:{configurable:!0}};gr.prototype.bufferFixedPrecision=function(t){var e=new ir(new dr(new fe(1)),t.getScale()),n=new rr(this._bufParams);n.setWorkingPrecisionModel(t),n.setNoder(e),this._resultGeometry=n.buffer(this._argGeom,this._distance)},gr.prototype.bufferReducedPrecision=function(){var t=this;if(0===arguments.length){for(var e=gr.MAX_PRECISION_DIGITS;e>=0;e--){try{t.bufferReducedPrecision(e)}catch(e){if(!(e instanceof Ie))throw e;t._saveException=e}if(null!==t._resultGeometry)return null}throw this._saveException}if(1===arguments.length){var n=arguments[0],r=gr.precisionScaleFactor(this._argGeom,this._distance,n),i=new fe(r);this.bufferFixedPrecision(i)}},gr.prototype.computeGeometry=function(){if(this.bufferOriginalPrecision(),null!==this._resultGeometry)return null;var t=this._argGeom.getFactory().getPrecisionModel();t.getType()===fe.FIXED?this.bufferFixedPrecision(t):this.bufferReducedPrecision()},gr.prototype.setQuadrantSegments=function(t){this._bufParams.setQuadrantSegments(t)},gr.prototype.bufferOriginalPrecision=function(){try{var t=new rr(this._bufParams);this._resultGeometry=t.buffer(this._argGeom,this._distance)}catch(t){if(!(t instanceof Q))throw t;this._saveException=t}},gr.prototype.getResultGeometry=function(t){return this._distance=t,this.computeGeometry(),this._resultGeometry},gr.prototype.setEndCapStyle=function(t){this._bufParams.setEndCapStyle(t)},gr.prototype.interfaces_=function(){return[]},gr.prototype.getClass=function(){return gr},gr.bufferOp=function(){if(2===arguments.length){var t=arguments[0],e=arguments[1];return new gr(t).getResultGeometry(e)}if(3===arguments.length){if(Number.isInteger(arguments[2])&&arguments[0]instanceof ct&&"number"==typeof arguments[1]){var n=arguments[0],r=arguments[1],i=arguments[2],o=new gr(n);return o.setQuadrantSegments(i),o.getResultGeometry(r)}if(arguments[2]instanceof En&&arguments[0]instanceof ct&&"number"==typeof arguments[1]){var a=arguments[0],s=arguments[1],l=arguments[2];return new gr(a,l).getResultGeometry(s)}}else if(4===arguments.length){var u=arguments[0],c=arguments[1],h=arguments[2],p=arguments[3],f=new gr(u);return f.setQuadrantSegments(h),f.setEndCapStyle(p),f.getResultGeometry(c)}},gr.precisionScaleFactor=function(t,e,n){var r=t.getEnvelopeInternal(),i=R.max(Math.abs(r.getMaxX()),Math.abs(r.getMaxY()),Math.abs(r.getMinX()),Math.abs(r.getMinY()))+2*(e>0?e:0),o=n-Math.trunc(Math.log(i)/Math.log(10)+1);return Math.pow(10,o)},yr.CAP_ROUND.get=function(){return En.CAP_ROUND},yr.CAP_BUTT.get=function(){return En.CAP_FLAT},yr.CAP_FLAT.get=function(){return En.CAP_FLAT},yr.CAP_SQUARE.get=function(){return En.CAP_SQUARE},yr.MAX_PRECISION_DIGITS.get=function(){return 12},Object.defineProperties(gr,yr);var mr=function(){this._pt=[new E,new E],this._distance=_.NaN,this._isNull=!0};mr.prototype.getCoordinates=function(){return this._pt},mr.prototype.getCoordinate=function(t){return this._pt[t]},mr.prototype.setMinimum=function(){if(1===arguments.length){var t=arguments[0];this.setMinimum(t._pt[0],t._pt[1])}else if(2===arguments.length){var e=arguments[0],n=arguments[1];if(this._isNull)return this.initialize(e,n),null;var r=e.distance(n);r<this._distance&&this.initialize(e,n,r)}},mr.prototype.initialize=function(){if(0===arguments.length)this._isNull=!0;else if(2===arguments.length){var t=arguments[0],e=arguments[1];this._pt[0].setCoordinate(t),this._pt[1].setCoordinate(e),this._distance=t.distance(e),this._isNull=!1}else if(3===arguments.length){var n=arguments[0],r=arguments[1],i=arguments[2];this._pt[0].setCoordinate(n),this._pt[1].setCoordinate(r),this._distance=i,this._isNull=!1}},mr.prototype.getDistance=function(){return this._distance},mr.prototype.setMaximum=function(){if(1===arguments.length){var t=arguments[0];this.setMaximum(t._pt[0],t._pt[1])}else if(2===arguments.length){var e=arguments[0],n=arguments[1];if(this._isNull)return this.initialize(e,n),null;var r=e.distance(n);r>this._distance&&this.initialize(e,n,r)}},mr.prototype.interfaces_=function(){return[]},mr.prototype.getClass=function(){return mr};var vr=function(){};vr.prototype.interfaces_=function(){return[]},vr.prototype.getClass=function(){return vr},vr.computeDistance=function(){if(arguments[2]instanceof mr&&arguments[0]instanceof Kt&&arguments[1]instanceof E)for(var t=arguments[0],e=arguments[1],n=arguments[2],r=t.getCoordinates(),i=new gn,o=0;o<r.length-1;o++){i.setCoordinates(r[o],r[o+1]);var a=i.closestPoint(e);n.setMinimum(a,e)}else if(arguments[2]instanceof mr&&arguments[0]instanceof Qt&&arguments[1]instanceof E){var s=arguments[0],l=arguments[1],u=arguments[2];vr.computeDistance(s.getExteriorRing(),l,u);for(var c=0;c<s.getNumInteriorRing();c++)vr.computeDistance(s.getInteriorRingN(c),l,u)}else if(arguments[2]instanceof mr&&arguments[0]instanceof ct&&arguments[1]instanceof E){var h=arguments[0],p=arguments[1],f=arguments[2];if(h instanceof Kt)vr.computeDistance(h,p,f);else if(h instanceof Qt)vr.computeDistance(h,p,f);else if(h instanceof Bt)for(var d=h,g=0;g<d.getNumGeometries();g++){var y=d.getGeometryN(g);vr.computeDistance(y,p,f)}else f.setMinimum(h.getCoordinate(),p)}else if(arguments[2]instanceof mr&&arguments[0]instanceof gn&&arguments[1]instanceof E){var m=arguments[0],v=arguments[1],_=arguments[2],b=m.closestPoint(v);_.setMinimum(b,v)}};var _r=function(t){this._maxPtDist=new mr,this._inputGeom=t||null},br={MaxPointDistanceFilter:{configurable:!0},MaxMidpointDistanceFilter:{configurable:!0}};_r.prototype.computeMaxMidpointDistance=function(t){var e=new Or(this._inputGeom);t.apply(e),this._maxPtDist.setMaximum(e.getMaxPointDistance())},_r.prototype.computeMaxVertexDistance=function(t){var e=new wr(this._inputGeom);t.apply(e),this._maxPtDist.setMaximum(e.getMaxPointDistance())},_r.prototype.findDistance=function(t){return this.computeMaxVertexDistance(t),this.computeMaxMidpointDistance(t),this._maxPtDist.getDistance()},_r.prototype.getDistancePoints=function(){return this._maxPtDist},_r.prototype.interfaces_=function(){return[]},_r.prototype.getClass=function(){return _r},br.MaxPointDistanceFilter.get=function(){return wr},br.MaxMidpointDistanceFilter.get=function(){return Or},Object.defineProperties(_r,br);var wr=function(t){this._maxPtDist=new mr,this._minPtDist=new mr,this._geom=t||null};wr.prototype.filter=function(t){this._minPtDist.initialize(),vr.computeDistance(this._geom,t,this._minPtDist),this._maxPtDist.setMaximum(this._minPtDist)},wr.prototype.getMaxPointDistance=function(){return this._maxPtDist},wr.prototype.interfaces_=function(){return[ft]},wr.prototype.getClass=function(){return wr};var Or=function(t){this._maxPtDist=new mr,this._minPtDist=new mr,this._geom=t||null};Or.prototype.filter=function(t,e){if(0===e)return null;var n=t.getCoordinate(e-1),r=t.getCoordinate(e),i=new E((n.x+r.x)/2,(n.y+r.y)/2);this._minPtDist.initialize(),vr.computeDistance(this._geom,i,this._minPtDist),this._maxPtDist.setMaximum(this._minPtDist)},Or.prototype.isDone=function(){return!1},Or.prototype.isGeometryChanged=function(){return!1},Or.prototype.getMaxPointDistance=function(){return this._maxPtDist},Or.prototype.interfaces_=function(){return[zt]},Or.prototype.getClass=function(){return Or};var xr=function(t){this._comps=t||null};xr.prototype.filter=function(t){t instanceof Qt&&this._comps.add(t)},xr.prototype.interfaces_=function(){return[Ut]},xr.prototype.getClass=function(){return xr},xr.getPolygons=function(){if(1===arguments.length){var t=arguments[0];return xr.getPolygons(t,new xt)}if(2===arguments.length){var e=arguments[0],n=arguments[1];return e instanceof Qt?n.add(e):e instanceof Bt&&e.apply(new xr(n)),n}};var Er=function(){if(this._lines=null,this._isForcedToLineString=!1,1===arguments.length){var t=arguments[0];this._lines=t}else if(2===arguments.length){var e=arguments[0],n=arguments[1];this._lines=e,this._isForcedToLineString=n}};Er.prototype.filter=function(t){if(this._isForcedToLineString&&t instanceof ee){var e=t.getFactory().createLineString(t.getCoordinateSequence());return this._lines.add(e),null}t instanceof Kt&&this._lines.add(t)},Er.prototype.setForceToLineString=function(t){this._isForcedToLineString=t},Er.prototype.interfaces_=function(){return[ut]},Er.prototype.getClass=function(){return Er},Er.getGeometry=function(){if(1===arguments.length){var t=arguments[0];return t.getFactory().buildGeometry(Er.getLines(t))}if(2===arguments.length){var e=arguments[0],n=arguments[1];return e.getFactory().buildGeometry(Er.getLines(e,n))}},Er.getLines=function(){if(1===arguments.length){var t=arguments[0];return Er.getLines(t,!1)}if(2===arguments.length){if(L(arguments[0],bt)&&L(arguments[1],bt)){for(var e=arguments[0],n=arguments[1],r=e.iterator();r.hasNext();){var i=r.next();Er.getLines(i,n)}return n}if(arguments[0]instanceof ct&&"boolean"==typeof arguments[1]){var o=arguments[0],a=arguments[1],s=new xt;return o.apply(new Er(s,a)),s}if(arguments[0]instanceof ct&&L(arguments[1],bt)){var l=arguments[0],u=arguments[1];return l instanceof Kt?u.add(l):l.apply(new Er(u)),u}}else if(3===arguments.length){if("boolean"==typeof arguments[2]&&L(arguments[0],bt)&&L(arguments[1],bt)){for(var c=arguments[0],h=arguments[1],p=arguments[2],f=c.iterator();f.hasNext();){var d=f.next();Er.getLines(d,h,p)}return h}if("boolean"==typeof arguments[2]&&arguments[0]instanceof ct&&L(arguments[1],bt)){var g=arguments[0],y=arguments[1],m=arguments[2];return g.apply(new Er(y,m)),y}}};var Sr=function(){if(this._boundaryRule=dt.OGC_SFS_BOUNDARY_RULE,this._isIn=null,this._numBoundaries=null,0===arguments.length);else if(1===arguments.length){var t=arguments[0];if(null===t)throw new v("Rule must be non-null");this._boundaryRule=t}};Sr.prototype.locateInternal=function(){if(arguments[0]instanceof E&&arguments[1]instanceof Qt){var t=arguments[0],e=arguments[1];if(e.isEmpty())return I.EXTERIOR;var n=e.getExteriorRing(),r=this.locateInPolygonRing(t,n);if(r===I.EXTERIOR)return I.EXTERIOR;if(r===I.BOUNDARY)return I.BOUNDARY;for(var i=0;i<e.getNumInteriorRing();i++){var o=e.getInteriorRingN(i),a=this.locateInPolygonRing(t,o);if(a===I.INTERIOR)return I.EXTERIOR;if(a===I.BOUNDARY)return I.BOUNDARY}return I.INTERIOR}if(arguments[0]instanceof E&&arguments[1]instanceof Kt){var s=arguments[0],l=arguments[1];if(!l.getEnvelopeInternal().intersects(s))return I.EXTERIOR;var u=l.getCoordinates();return l.isClosed()||!s.equals(u[0])&&!s.equals(u[u.length-1])?st.isOnLine(s,u)?I.INTERIOR:I.EXTERIOR:I.BOUNDARY}if(arguments[0]instanceof E&&arguments[1]instanceof Jt){var c=arguments[0];return arguments[1].getCoordinate().equals2D(c)?I.INTERIOR:I.EXTERIOR}},Sr.prototype.locateInPolygonRing=function(t,e){return e.getEnvelopeInternal().intersects(t)?st.locatePointInRing(t,e.getCoordinates()):I.EXTERIOR},Sr.prototype.intersects=function(t,e){return this.locate(t,e)!==I.EXTERIOR},Sr.prototype.updateLocationInfo=function(t){t===I.INTERIOR&&(this._isIn=!0),t===I.BOUNDARY&&this._numBoundaries++},Sr.prototype.computeLocation=function(t,e){if(e instanceof Jt&&this.updateLocationInfo(this.locateInternal(t,e)),e instanceof Kt)this.updateLocationInfo(this.locateInternal(t,e));else if(e instanceof Qt)this.updateLocationInfo(this.locateInternal(t,e));else if(e instanceof Vt)for(var n=e,r=0;r<n.getNumGeometries();r++){var i=n.getGeometryN(r);this.updateLocationInfo(this.locateInternal(t,i))}else if(e instanceof ne)for(var o=e,a=0;a<o.getNumGeometries();a++){var s=o.getGeometryN(a);this.updateLocationInfo(this.locateInternal(t,s))}else if(e instanceof Bt)for(var l=new zn(e);l.hasNext();){var u=l.next();u!==e&&this.computeLocation(t,u)}},Sr.prototype.locate=function(t,e){return e.isEmpty()?I.EXTERIOR:e instanceof Kt?this.locateInternal(t,e):e instanceof Qt?this.locateInternal(t,e):(this._isIn=!1,this._numBoundaries=0,this.computeLocation(t,e),this._boundaryRule.isInBoundary(this._numBoundaries)?I.BOUNDARY:this._numBoundaries>0||this._isIn?I.INTERIOR:I.EXTERIOR)},Sr.prototype.interfaces_=function(){return[]},Sr.prototype.getClass=function(){return Sr};var Cr=function t(){if(this._component=null,this._segIndex=null,this._pt=null,2===arguments.length){var e=arguments[0],n=arguments[1];t.call(this,e,t.INSIDE_AREA,n)}else if(3===arguments.length){var r=arguments[0],i=arguments[1],o=arguments[2];this._component=r,this._segIndex=i,this._pt=o}},Tr={INSIDE_AREA:{configurable:!0}};Cr.prototype.isInsideArea=function(){return this._segIndex===Cr.INSIDE_AREA},Cr.prototype.getCoordinate=function(){return this._pt},Cr.prototype.getGeometryComponent=function(){return this._component},Cr.prototype.getSegmentIndex=function(){return this._segIndex},Cr.prototype.interfaces_=function(){return[]},Cr.prototype.getClass=function(){return Cr},Tr.INSIDE_AREA.get=function(){return-1},Object.defineProperties(Cr,Tr);var Ir=function(t){this._pts=t||null};Ir.prototype.filter=function(t){t instanceof Jt&&this._pts.add(t)},Ir.prototype.interfaces_=function(){return[Ut]},Ir.prototype.getClass=function(){return Ir},Ir.getPoints=function(){if(1===arguments.length){var t=arguments[0];return t instanceof Jt?Qe.singletonList(t):Ir.getPoints(t,new xt)}if(2===arguments.length){var e=arguments[0],n=arguments[1];return e instanceof Jt?n.add(e):e instanceof Bt&&e.apply(new Ir(n)),n}};var jr=function(){this._locations=null;var t=arguments[0];this._locations=t};jr.prototype.filter=function(t){(t instanceof Jt||t instanceof Kt||t instanceof Qt)&&this._locations.add(new Cr(t,0,t.getCoordinate()))},jr.prototype.interfaces_=function(){return[Ut]},jr.prototype.getClass=function(){return jr},jr.getLocations=function(t){var e=new xt;return t.apply(new jr(e)),e};var Lr=function(){if(this._geom=null,this._terminateDistance=0,this._ptLocator=new Sr,this._minDistanceLocation=null,this._minDistance=_.MAX_VALUE,2===arguments.length){var t=arguments[0],e=arguments[1];this._geom=[t,e],this._terminateDistance=0}else if(3===arguments.length){var n=arguments[0],r=arguments[1],i=arguments[2];this._geom=new Array(2).fill(null),this._geom[0]=n,this._geom[1]=r,this._terminateDistance=i}};Lr.prototype.computeContainmentDistance=function(){if(0===arguments.length){var t=new Array(2).fill(null);if(this.computeContainmentDistance(0,t),this._minDistance<=this._terminateDistance)return null;this.computeContainmentDistance(1,t)}else if(2===arguments.length){var e=arguments[0],n=arguments[1],r=1-e,i=xr.getPolygons(this._geom[e]);if(i.size()>0){var o=jr.getLocations(this._geom[r]);if(this.computeContainmentDistance(o,i,n),this._minDistance<=this._terminateDistance)return this._minDistanceLocation[r]=n[0],this._minDistanceLocation[e]=n[1],null}}else if(3===arguments.length)if(arguments[2]instanceof Array&&L(arguments[0],Ot)&&L(arguments[1],Ot)){for(var a=arguments[0],s=arguments[1],l=arguments[2],u=0;u<a.size();u++)for(var c=a.get(u),h=0;h<s.size();h++)if(this.computeContainmentDistance(c,s.get(h),l),this._minDistance<=this._terminateDistance)return null}else if(arguments[2]instanceof Array&&arguments[0]instanceof Cr&&arguments[1]instanceof Qt){var p=arguments[0],f=arguments[1],d=arguments[2],g=p.getCoordinate();if(I.EXTERIOR!==this._ptLocator.locate(g,f))return this._minDistance=0,d[0]=p,d[1]=new Cr(f,g),null}},Lr.prototype.computeMinDistanceLinesPoints=function(t,e,n){for(var r=0;r<t.size();r++)for(var i=t.get(r),o=0;o<e.size();o++){var a=e.get(o);if(this.computeMinDistance(i,a,n),this._minDistance<=this._terminateDistance)return null}},Lr.prototype.computeFacetDistance=function(){var t=new Array(2).fill(null),e=Er.getLines(this._geom[0]),n=Er.getLines(this._geom[1]),r=Ir.getPoints(this._geom[0]),i=Ir.getPoints(this._geom[1]);return this.computeMinDistanceLines(e,n,t),this.updateMinDistance(t,!1),this._minDistance<=this._terminateDistance?null:(t[0]=null,t[1]=null,this.computeMinDistanceLinesPoints(e,i,t),this.updateMinDistance(t,!1),this._minDistance<=this._terminateDistance?null:(t[0]=null,t[1]=null,this.computeMinDistanceLinesPoints(n,r,t),this.updateMinDistance(t,!0),this._minDistance<=this._terminateDistance?null:(t[0]=null,t[1]=null,this.computeMinDistancePoints(r,i,t),void this.updateMinDistance(t,!1))))},Lr.prototype.nearestLocations=function(){return this.computeMinDistance(),this._minDistanceLocation},Lr.prototype.updateMinDistance=function(t,e){if(null===t[0])return null;e?(this._minDistanceLocation[0]=t[1],this._minDistanceLocation[1]=t[0]):(this._minDistanceLocation[0]=t[0],this._minDistanceLocation[1]=t[1])},Lr.prototype.nearestPoints=function(){return this.computeMinDistance(),[this._minDistanceLocation[0].getCoordinate(),this._minDistanceLocation[1].getCoordinate()]},Lr.prototype.computeMinDistance=function(){if(0===arguments.length){if(null!==this._minDistanceLocation)return null;if(this._minDistanceLocation=new Array(2).fill(null),this.computeContainmentDistance(),this._minDistance<=this._terminateDistance)return null;this.computeFacetDistance()}else if(3===arguments.length)if(arguments[2]instanceof Array&&arguments[0]instanceof Kt&&arguments[1]instanceof Jt){var t=arguments[0],e=arguments[1],n=arguments[2];if(t.getEnvelopeInternal().distance(e.getEnvelopeInternal())>this._minDistance)return null;for(var r=t.getCoordinates(),i=e.getCoordinate(),o=0;o<r.length-1;o++){var a=st.distancePointLine(i,r[o],r[o+1]);if(a<this._minDistance){this._minDistance=a;var s=new gn(r[o],r[o+1]).closestPoint(i);n[0]=new Cr(t,o,s),n[1]=new Cr(e,0,i)}if(this._minDistance<=this._terminateDistance)return null}}else if(arguments[2]instanceof Array&&arguments[0]instanceof Kt&&arguments[1]instanceof Kt){var l=arguments[0],u=arguments[1],c=arguments[2];if(l.getEnvelopeInternal().distance(u.getEnvelopeInternal())>this._minDistance)return null;for(var h=l.getCoordinates(),p=u.getCoordinates(),f=0;f<h.length-1;f++)for(var d=0;d<p.length-1;d++){var g=st.distanceLineLine(h[f],h[f+1],p[d],p[d+1]);if(g<this._minDistance){this._minDistance=g;var y=new gn(h[f],h[f+1]),m=new gn(p[d],p[d+1]),v=y.closestPoints(m);c[0]=new Cr(l,f,v[0]),c[1]=new Cr(u,d,v[1])}if(this._minDistance<=this._terminateDistance)return null}}},Lr.prototype.computeMinDistancePoints=function(t,e,n){for(var r=0;r<t.size();r++)for(var i=t.get(r),o=0;o<e.size();o++){var a=e.get(o),s=i.getCoordinate().distance(a.getCoordinate());if(s<this._minDistance&&(this._minDistance=s,n[0]=new Cr(i,0,i.getCoordinate()),n[1]=new Cr(a,0,a.getCoordinate())),this._minDistance<=this._terminateDistance)return null}},Lr.prototype.distance=function(){if(null===this._geom[0]||null===this._geom[1])throw new v("null geometries are not supported");return this._geom[0].isEmpty()||this._geom[1].isEmpty()?0:(this.computeMinDistance(),this._minDistance)},Lr.prototype.computeMinDistanceLines=function(t,e,n){for(var r=0;r<t.size();r++)for(var i=t.get(r),o=0;o<e.size();o++){var a=e.get(o);if(this.computeMinDistance(i,a,n),this._minDistance<=this._terminateDistance)return null}},Lr.prototype.interfaces_=function(){return[]},Lr.prototype.getClass=function(){return Lr},Lr.distance=function(t,e){return new Lr(t,e).distance()},Lr.isWithinDistance=function(t,e,n){return new Lr(t,e,n).distance()<=n},Lr.nearestPoints=function(t,e){return new Lr(t,e).nearestPoints()};var Rr=function(){this._pt=[new E,new E],this._distance=_.NaN,this._isNull=!0};Rr.prototype.getCoordinates=function(){return this._pt},Rr.prototype.getCoordinate=function(t){return this._pt[t]},Rr.prototype.setMinimum=function(){if(1===arguments.length){var t=arguments[0];this.setMinimum(t._pt[0],t._pt[1])}else if(2===arguments.length){var e=arguments[0],n=arguments[1];if(this._isNull)return this.initialize(e,n),null;var r=e.distance(n);r<this._distance&&this.initialize(e,n,r)}},Rr.prototype.initialize=function(){if(0===arguments.length)this._isNull=!0;else if(2===arguments.length){var t=arguments[0],e=arguments[1];this._pt[0].setCoordinate(t),this._pt[1].setCoordinate(e),this._distance=t.distance(e),this._isNull=!1}else if(3===arguments.length){var n=arguments[0],r=arguments[1],i=arguments[2];this._pt[0].setCoordinate(n),this._pt[1].setCoordinate(r),this._distance=i,this._isNull=!1}},Rr.prototype.toString=function(){return $.toLineString(this._pt[0],this._pt[1])},Rr.prototype.getDistance=function(){return this._distance},Rr.prototype.setMaximum=function(){if(1===arguments.length){var t=arguments[0];this.setMaximum(t._pt[0],t._pt[1])}else if(2===arguments.length){var e=arguments[0],n=arguments[1];if(this._isNull)return this.initialize(e,n),null;var r=e.distance(n);r>this._distance&&this.initialize(e,n,r)}},Rr.prototype.interfaces_=function(){return[]},Rr.prototype.getClass=function(){return Rr};var Pr=function(){};Pr.prototype.interfaces_=function(){return[]},Pr.prototype.getClass=function(){return Pr},Pr.computeDistance=function(){if(arguments[2]instanceof Rr&&arguments[0]instanceof Kt&&arguments[1]instanceof E)for(var t=arguments[0],e=arguments[1],n=arguments[2],r=new gn,i=t.getCoordinates(),o=0;o<i.length-1;o++){r.setCoordinates(i[o],i[o+1]);var a=r.closestPoint(e);n.setMinimum(a,e)}else if(arguments[2]instanceof Rr&&arguments[0]instanceof Qt&&arguments[1]instanceof E){var s=arguments[0],l=arguments[1],u=arguments[2];Pr.computeDistance(s.getExteriorRing(),l,u);for(var c=0;c<s.getNumInteriorRing();c++)Pr.computeDistance(s.getInteriorRingN(c),l,u)}else if(arguments[2]instanceof Rr&&arguments[0]instanceof ct&&arguments[1]instanceof E){var h=arguments[0],p=arguments[1],f=arguments[2];if(h instanceof Kt)Pr.computeDistance(h,p,f);else if(h instanceof Qt)Pr.computeDistance(h,p,f);else if(h instanceof Bt)for(var d=h,g=0;g<d.getNumGeometries();g++){var y=d.getGeometryN(g);Pr.computeDistance(y,p,f)}else f.setMinimum(h.getCoordinate(),p)}else if(arguments[2]instanceof Rr&&arguments[0]instanceof gn&&arguments[1]instanceof E){var m=arguments[0],v=arguments[1],_=arguments[2],b=m.closestPoint(v);_.setMinimum(b,v)}};var Nr=function(){this._g0=null,this._g1=null,this._ptDist=new Rr,this._densifyFrac=0;var t=arguments[0],e=arguments[1];this._g0=t,this._g1=e},Mr={MaxPointDistanceFilter:{configurable:!0},MaxDensifiedByFractionDistanceFilter:{configurable:!0}};Nr.prototype.getCoordinates=function(){return this._ptDist.getCoordinates()},Nr.prototype.setDensifyFraction=function(t){if(t>1||t<=0)throw new v("Fraction is not in range (0.0 - 1.0]");this._densifyFrac=t},Nr.prototype.compute=function(t,e){this.computeOrientedDistance(t,e,this._ptDist),this.computeOrientedDistance(e,t,this._ptDist)},Nr.prototype.distance=function(){return this.compute(this._g0,this._g1),this._ptDist.getDistance()},Nr.prototype.computeOrientedDistance=function(t,e,n){var r=new Ar(e);if(t.apply(r),n.setMaximum(r.getMaxPointDistance()),this._densifyFrac>0){var i=new kr(e,this._densifyFrac);t.apply(i),n.setMaximum(i.getMaxPointDistance())}},Nr.prototype.orientedDistance=function(){return this.computeOrientedDistance(this._g0,this._g1,this._ptDist),this._ptDist.getDistance()},Nr.prototype.interfaces_=function(){return[]},Nr.prototype.getClass=function(){return Nr},Nr.distance=function(){if(2===arguments.length){var t=arguments[0],e=arguments[1];return new Nr(t,e).distance()}if(3===arguments.length){var n=arguments[0],r=arguments[1],i=arguments[2],o=new Nr(n,r);return o.setDensifyFraction(i),o.distance()}},Mr.MaxPointDistanceFilter.get=function(){return Ar},Mr.MaxDensifiedByFractionDistanceFilter.get=function(){return kr},Object.defineProperties(Nr,Mr);var Ar=function(){this._maxPtDist=new Rr,this._minPtDist=new Rr,this._euclideanDist=new Pr,this._geom=null;var t=arguments[0];this._geom=t};Ar.prototype.filter=function(t){this._minPtDist.initialize(),Pr.computeDistance(this._geom,t,this._minPtDist),this._maxPtDist.setMaximum(this._minPtDist)},Ar.prototype.getMaxPointDistance=function(){return this._maxPtDist},Ar.prototype.interfaces_=function(){return[ft]},Ar.prototype.getClass=function(){return Ar};var kr=function(){this._maxPtDist=new Rr,this._minPtDist=new Rr,this._geom=null,this._numSubSegs=0;var t=arguments[0],e=arguments[1];this._geom=t,this._numSubSegs=Math.trunc(Math.round(1/e))};kr.prototype.filter=function(t,e){if(0===e)return null;for(var n=t.getCoordinate(e-1),r=t.getCoordinate(e),i=(r.x-n.x)/this._numSubSegs,o=(r.y-n.y)/this._numSubSegs,a=0;a<this._numSubSegs;a++){var s=n.x+a*i,l=n.y+a*o,u=new E(s,l);this._minPtDist.initialize(),Pr.computeDistance(this._geom,u,this._minPtDist),this._maxPtDist.setMaximum(this._minPtDist)}},kr.prototype.isDone=function(){return!1},kr.prototype.isGeometryChanged=function(){return!1},kr.prototype.getMaxPointDistance=function(){return this._maxPtDist},kr.prototype.interfaces_=function(){return[zt]},kr.prototype.getClass=function(){return kr};var Fr=function(t,e,n){this._minValidDistance=null,this._maxValidDistance=null,this._minDistanceFound=null,this._maxDistanceFound=null,this._isValid=!0,this._errMsg=null,this._errorLocation=null,this._errorIndicator=null,this._input=t||null,this._bufDistance=e||null,this._result=n||null},Dr={VERBOSE:{configurable:!0},MAX_DISTANCE_DIFF_FRAC:{configurable:!0}};Fr.prototype.checkMaximumDistance=function(t,e,n){var r=new Nr(e,t);if(r.setDensifyFraction(.25),this._maxDistanceFound=r.orientedDistance(),this._maxDistanceFound>n){this._isValid=!1;var i=r.getCoordinates();this._errorLocation=i[1],this._errorIndicator=t.getFactory().createLineString(i),this._errMsg="Distance between buffer curve and input is too large ("+this._maxDistanceFound+" at "+$.toLineString(i[0],i[1])+")"}},Fr.prototype.isValid=function(){var t=Math.abs(this._bufDistance),e=Fr.MAX_DISTANCE_DIFF_FRAC*t;return this._minValidDistance=t-e,this._maxValidDistance=t+e,!(!this._input.isEmpty()&&!this._result.isEmpty())||(this._bufDistance>0?this.checkPositiveValid():this.checkNegativeValid(),Fr.VERBOSE&&Y.out.println("Min Dist= "+this._minDistanceFound+"  err= "+(1-this._minDistanceFound/this._bufDistance)+"  Max Dist= "+this._maxDistanceFound+"  err= "+(this._maxDistanceFound/this._bufDistance-1)),this._isValid)},Fr.prototype.checkNegativeValid=function(){if(!(this._input instanceof Qt||this._input instanceof ne||this._input instanceof Bt))return null;var t=this.getPolygonLines(this._input);if(this.checkMinimumDistance(t,this._result,this._minValidDistance),!this._isValid)return null;this.checkMaximumDistance(t,this._result,this._maxValidDistance)},Fr.prototype.getErrorIndicator=function(){return this._errorIndicator},Fr.prototype.checkMinimumDistance=function(t,e,n){var r=new Lr(t,e,n);if(this._minDistanceFound=r.distance(),this._minDistanceFound<n){this._isValid=!1;var i=r.nearestPoints();this._errorLocation=r.nearestPoints()[1],this._errorIndicator=t.getFactory().createLineString(i),this._errMsg="Distance between buffer curve and input is too small ("+this._minDistanceFound+" at "+$.toLineString(i[0],i[1])+" )"}},Fr.prototype.checkPositiveValid=function(){var t=this._result.getBoundary();if(this.checkMinimumDistance(this._input,t,this._minValidDistance),!this._isValid)return null;this.checkMaximumDistance(this._input,t,this._maxValidDistance)},Fr.prototype.getErrorLocation=function(){return this._errorLocation},Fr.prototype.getPolygonLines=function(t){for(var e=new xt,n=new Er(e),r=xr.getPolygons(t).iterator();r.hasNext();)r.next().apply(n);return t.getFactory().buildGeometry(e)},Fr.prototype.getErrorMessage=function(){return this._errMsg},Fr.prototype.interfaces_=function(){return[]},Fr.prototype.getClass=function(){return Fr},Dr.VERBOSE.get=function(){return!1},Dr.MAX_DISTANCE_DIFF_FRAC.get=function(){return.012},Object.defineProperties(Fr,Dr);var Gr=function(t,e,n){this._isValid=!0,this._errorMsg=null,this._errorLocation=null,this._errorIndicator=null,this._input=t||null,this._distance=e||null,this._result=n||null},Ur={VERBOSE:{configurable:!0},MAX_ENV_DIFF_FRAC:{configurable:!0}};Gr.prototype.isValid=function(){return this.checkPolygonal(),this._isValid?(this.checkExpectedEmpty(),this._isValid?(this.checkEnvelope(),this._isValid?(this.checkArea(),this._isValid?(this.checkDistance(),this._isValid):this._isValid):this._isValid):this._isValid):this._isValid},Gr.prototype.checkEnvelope=function(){if(this._distance<0)return null;var t=this._distance*Gr.MAX_ENV_DIFF_FRAC;0===t&&(t=.001);var e=new X(this._input.getEnvelopeInternal());e.expandBy(this._distance);var n=new X(this._result.getEnvelopeInternal());n.expandBy(t),n.contains(e)||(this._isValid=!1,this._errorMsg="Buffer envelope is incorrect",this._errorIndicator=this._input.getFactory().toGeometry(n)),this.report("Envelope")},Gr.prototype.checkDistance=function(){var t=new Fr(this._input,this._distance,this._result);t.isValid()||(this._isValid=!1,this._errorMsg=t.getErrorMessage(),this._errorLocation=t.getErrorLocation(),this._errorIndicator=t.getErrorIndicator()),this.report("Distance")},Gr.prototype.checkArea=function(){var t=this._input.getArea(),e=this._result.getArea();this._distance>0&&t>e&&(this._isValid=!1,this._errorMsg="Area of positive buffer is smaller than input",this._errorIndicator=this._result),this._distance<0&&t<e&&(this._isValid=!1,this._errorMsg="Area of negative buffer is larger than input",this._errorIndicator=this._result),this.report("Area")},Gr.prototype.checkPolygonal=function(){this._result instanceof Qt||this._result instanceof ne||(this._isValid=!1),this._errorMsg="Result is not polygonal",this._errorIndicator=this._result,this.report("Polygonal")},Gr.prototype.getErrorIndicator=function(){return this._errorIndicator},Gr.prototype.getErrorLocation=function(){return this._errorLocation},Gr.prototype.checkExpectedEmpty=function(){return this._input.getDimension()>=2?null:this._distance>0?null:(this._result.isEmpty()||(this._isValid=!1,this._errorMsg="Result is non-empty",this._errorIndicator=this._result),void this.report("ExpectedEmpty"))},Gr.prototype.report=function(t){if(!Gr.VERBOSE)return null;Y.out.println("Check "+t+": "+(this._isValid?"passed":"FAILED"))},Gr.prototype.getErrorMessage=function(){return this._errorMsg},Gr.prototype.interfaces_=function(){return[]},Gr.prototype.getClass=function(){return Gr},Gr.isValidMsg=function(t,e,n){var r=new Gr(t,e,n);return r.isValid()?null:r.getErrorMessage()},Gr.isValid=function(t,e,n){return!!new Gr(t,e,n).isValid()},Ur.VERBOSE.get=function(){return!1},Ur.MAX_ENV_DIFF_FRAC.get=function(){return.012},Object.defineProperties(Gr,Ur);var zr=function(){this._pts=null,this._data=null;var t=arguments[0],e=arguments[1];this._pts=t,this._data=e};zr.prototype.getCoordinates=function(){return this._pts},zr.prototype.size=function(){return this._pts.length},zr.prototype.getCoordinate=function(t){return this._pts[t]},zr.prototype.isClosed=function(){return this._pts[0].equals(this._pts[this._pts.length-1])},zr.prototype.getSegmentOctant=function(t){return t===this._pts.length-1?-1:hn.octant(this.getCoordinate(t),this.getCoordinate(t+1))},zr.prototype.setData=function(t){this._data=t},zr.prototype.getData=function(){return this._data},zr.prototype.toString=function(){return $.toLineString(new le(this._pts))},zr.prototype.interfaces_=function(){return[pn]},zr.prototype.getClass=function(){return zr};var Br=function(){this._findAllIntersections=!1,this._isCheckEndSegmentsOnly=!1,this._li=null,this._interiorIntersection=null,this._intSegments=null,this._intersections=new xt,this._intersectionCount=0,this._keepIntersections=!0;var t=arguments[0];this._li=t,this._interiorIntersection=null};Br.prototype.getInteriorIntersection=function(){return this._interiorIntersection},Br.prototype.setCheckEndSegmentsOnly=function(t){this._isCheckEndSegmentsOnly=t},Br.prototype.getIntersectionSegments=function(){return this._intSegments},Br.prototype.count=function(){return this._intersectionCount},Br.prototype.getIntersections=function(){return this._intersections},Br.prototype.setFindAllIntersections=function(t){this._findAllIntersections=t},Br.prototype.setKeepIntersections=function(t){this._keepIntersections=t},Br.prototype.processIntersections=function(t,e,n,r){if(!this._findAllIntersections&&this.hasIntersection())return null;if(t===n&&e===r)return null;if(this._isCheckEndSegmentsOnly&&!this.isEndSegment(t,e)&&!this.isEndSegment(n,r))return null;var i=t.getCoordinates()[e],o=t.getCoordinates()[e+1],a=n.getCoordinates()[r],s=n.getCoordinates()[r+1];this._li.computeIntersection(i,o,a,s),this._li.hasIntersection()&&this._li.isInteriorIntersection()&&(this._intSegments=new Array(4).fill(null),this._intSegments[0]=i,this._intSegments[1]=o,this._intSegments[2]=a,this._intSegments[3]=s,this._interiorIntersection=this._li.getIntersection(0),this._keepIntersections&&this._intersections.add(this._interiorIntersection),this._intersectionCount++)},Br.prototype.isEndSegment=function(t,e){return 0===e||e>=t.size()-2},Br.prototype.hasIntersection=function(){return null!==this._interiorIntersection},Br.prototype.isDone=function(){return!this._findAllIntersections&&null!==this._interiorIntersection},Br.prototype.interfaces_=function(){return[Hn]},Br.prototype.getClass=function(){return Br},Br.createAllIntersectionsFinder=function(t){var e=new Br(t);return e.setFindAllIntersections(!0),e},Br.createAnyIntersectionFinder=function(t){return new Br(t)},Br.createIntersectionCounter=function(t){var e=new Br(t);return e.setFindAllIntersections(!0),e.setKeepIntersections(!1),e};var Vr=function(){this._li=new it,this._segStrings=null,this._findAllIntersections=!1,this._segInt=null,this._isValid=!0;var t=arguments[0];this._segStrings=t};Vr.prototype.execute=function(){if(null!==this._segInt)return null;this.checkInteriorIntersections()},Vr.prototype.getIntersections=function(){return this._segInt.getIntersections()},Vr.prototype.isValid=function(){return this.execute(),this._isValid},Vr.prototype.setFindAllIntersections=function(t){this._findAllIntersections=t},Vr.prototype.checkInteriorIntersections=function(){this._isValid=!0,this._segInt=new Br(this._li),this._segInt.setFindAllIntersections(this._findAllIntersections);var t=new On;if(t.setSegmentIntersector(this._segInt),t.computeNodes(this._segStrings),this._segInt.hasIntersection())return this._isValid=!1,null},Vr.prototype.checkValid=function(){if(this.execute(),!this._isValid)throw new Ie(this.getErrorMessage(),this._segInt.getInteriorIntersection())},Vr.prototype.getErrorMessage=function(){if(this._isValid)return"no intersections found";var t=this._segInt.getIntersectionSegments();return"found non-noded intersection between "+$.toLineString(t[0],t[1])+" and "+$.toLineString(t[2],t[3])},Vr.prototype.interfaces_=function(){return[]},Vr.prototype.getClass=function(){return Vr},Vr.computeIntersections=function(t){var e=new Vr(t);return e.setFindAllIntersections(!0),e.isValid(),e.getIntersections()};var Yr=function t(){this._nv=null;var e=arguments[0];this._nv=new Vr(t.toSegmentStrings(e))};Yr.prototype.checkValid=function(){this._nv.checkValid()},Yr.prototype.interfaces_=function(){return[]},Yr.prototype.getClass=function(){return Yr},Yr.toSegmentStrings=function(t){for(var e=new xt,n=t.iterator();n.hasNext();){var r=n.next();e.add(new zr(r.getCoordinates(),r))}return e},Yr.checkValid=function(t){new Yr(t).checkValid()};var qr=function(t){this._mapOp=t};qr.prototype.map=function(t){for(var e=new xt,n=0;n<t.getNumGeometries();n++){var r=this._mapOp.map(t.getGeometryN(n));r.isEmpty()||e.add(r)}return t.getFactory().createGeometryCollection(me.toGeometryArray(e))},qr.prototype.interfaces_=function(){return[]},qr.prototype.getClass=function(){return qr},qr.map=function(t,e){return new qr(e).map(t)};var Xr=function(){this._op=null,this._geometryFactory=null,this._ptLocator=null,this._lineEdgesList=new xt,this._resultLineList=new xt;var t=arguments[0],e=arguments[1],n=arguments[2];this._op=t,this._geometryFactory=e,this._ptLocator=n};Xr.prototype.collectLines=function(t){for(var e=this._op.getGraph().getEdgeEnds().iterator();e.hasNext();){var n=e.next();this.collectLineEdge(n,t,this._lineEdgesList),this.collectBoundaryTouchEdge(n,t,this._lineEdgesList)}},Xr.prototype.labelIsolatedLine=function(t,e){var n=this._ptLocator.locate(t.getCoordinate(),this._op.getArgGeometry(e));t.getLabel().setLocation(e,n)},Xr.prototype.build=function(t){return this.findCoveredLineEdges(),this.collectLines(t),this.buildLines(t),this._resultLineList},Xr.prototype.collectLineEdge=function(t,e,n){var r=t.getLabel(),i=t.getEdge();t.isLineEdge()&&(t.isVisited()||!Ci.isResultOfOp(r,e)||i.isCovered()||(n.add(i),t.setVisitedEdge(!0)))},Xr.prototype.findCoveredLineEdges=function(){for(var t=this._op.getGraph().getNodes().iterator();t.hasNext();)t.next().getEdges().findCoveredLineEdges();for(var e=this._op.getGraph().getEdgeEnds().iterator();e.hasNext();){var n=e.next(),r=n.getEdge();if(n.isLineEdge()&&!r.isCoveredSet()){var i=this._op.isCoveredByA(n.getCoordinate());r.setCovered(i)}}},Xr.prototype.labelIsolatedLines=function(t){for(var e=t.iterator();e.hasNext();){var n=e.next(),r=n.getLabel();n.isIsolated()&&(r.isNull(0)?this.labelIsolatedLine(n,0):this.labelIsolatedLine(n,1))}},Xr.prototype.buildLines=function(t){for(var e=this._lineEdgesList.iterator();e.hasNext();){var n=e.next(),r=this._geometryFactory.createLineString(n.getCoordinates());this._resultLineList.add(r),n.setInResult(!0)}},Xr.prototype.collectBoundaryTouchEdge=function(t,e,n){var r=t.getLabel();return t.isLineEdge()?null:t.isVisited()?null:t.isInteriorAreaEdge()?null:t.getEdge().isInResult()?null:(et.isTrue(!(t.isInResult()||t.getSym().isInResult())||!t.getEdge().isInResult()),void(Ci.isResultOfOp(r,e)&&e===Ci.INTERSECTION&&(n.add(t.getEdge()),t.setVisitedEdge(!0))))},Xr.prototype.interfaces_=function(){return[]},Xr.prototype.getClass=function(){return Xr};var Wr=function(){this._op=null,this._geometryFactory=null,this._resultPointList=new xt;var t=arguments[0],e=arguments[1];this._op=t,this._geometryFactory=e};Wr.prototype.filterCoveredNodeToPoint=function(t){var e=t.getCoordinate();if(!this._op.isCoveredByLA(e)){var n=this._geometryFactory.createPoint(e);this._resultPointList.add(n)}},Wr.prototype.extractNonCoveredResultNodes=function(t){for(var e=this._op.getGraph().getNodes().iterator();e.hasNext();){var n=e.next();if(!n.isInResult()&&!n.isIncidentEdgeInResult()&&(0===n.getEdges().getDegree()||t===Ci.INTERSECTION)){var r=n.getLabel();Ci.isResultOfOp(r,t)&&this.filterCoveredNodeToPoint(n)}}},Wr.prototype.build=function(t){return this.extractNonCoveredResultNodes(t),this._resultPointList},Wr.prototype.interfaces_=function(){return[]},Wr.prototype.getClass=function(){return Wr};var Hr=function(){this._inputGeom=null,this._factory=null,this._pruneEmptyGeometry=!0,this._preserveGeometryCollectionType=!0,this._preserveCollections=!1,this._preserveType=!1};Hr.prototype.transformPoint=function(t,e){return this._factory.createPoint(this.transformCoordinates(t.getCoordinateSequence(),t))},Hr.prototype.transformPolygon=function(t,e){var n=!0,r=this.transformLinearRing(t.getExteriorRing(),t);null!==r&&r instanceof ee&&!r.isEmpty()||(n=!1);for(var i=new xt,o=0;o<t.getNumInteriorRing();o++){var a=this.transformLinearRing(t.getInteriorRingN(o),t);null===a||a.isEmpty()||(a instanceof ee||(n=!1),i.add(a))}if(n)return this._factory.createPolygon(r,i.toArray([]));var s=new xt;return null!==r&&s.add(r),s.addAll(i),this._factory.buildGeometry(s)},Hr.prototype.createCoordinateSequence=function(t){return this._factory.getCoordinateSequenceFactory().create(t)},Hr.prototype.getInputGeometry=function(){return this._inputGeom},Hr.prototype.transformMultiLineString=function(t,e){for(var n=new xt,r=0;r<t.getNumGeometries();r++){var i=this.transformLineString(t.getGeometryN(r),t);null!==i&&(i.isEmpty()||n.add(i))}return this._factory.buildGeometry(n)},Hr.prototype.transformCoordinates=function(t,e){return this.copy(t)},Hr.prototype.transformLineString=function(t,e){return this._factory.createLineString(this.transformCoordinates(t.getCoordinateSequence(),t))},Hr.prototype.transformMultiPoint=function(t,e){for(var n=new xt,r=0;r<t.getNumGeometries();r++){var i=this.transformPoint(t.getGeometryN(r),t);null!==i&&(i.isEmpty()||n.add(i))}return this._factory.buildGeometry(n)},Hr.prototype.transformMultiPolygon=function(t,e){for(var n=new xt,r=0;r<t.getNumGeometries();r++){var i=this.transformPolygon(t.getGeometryN(r),t);null!==i&&(i.isEmpty()||n.add(i))}return this._factory.buildGeometry(n)},Hr.prototype.copy=function(t){return t.copy()},Hr.prototype.transformGeometryCollection=function(t,e){for(var n=new xt,r=0;r<t.getNumGeometries();r++){var i=this.transform(t.getGeometryN(r));null!==i&&(this._pruneEmptyGeometry&&i.isEmpty()||n.add(i))}return this._preserveGeometryCollectionType?this._factory.createGeometryCollection(me.toGeometryArray(n)):this._factory.buildGeometry(n)},Hr.prototype.transform=function(t){if(this._inputGeom=t,this._factory=t.getFactory(),t instanceof Jt)return this.transformPoint(t,null);if(t instanceof te)return this.transformMultiPoint(t,null);if(t instanceof ee)return this.transformLinearRing(t,null);if(t instanceof Kt)return this.transformLineString(t,null);if(t instanceof Vt)return this.transformMultiLineString(t,null);if(t instanceof Qt)return this.transformPolygon(t,null);if(t instanceof ne)return this.transformMultiPolygon(t,null);if(t instanceof Bt)return this.transformGeometryCollection(t,null);throw new v("Unknown Geometry subtype: "+t.getClass().getName())},Hr.prototype.transformLinearRing=function(t,e){var n=this.transformCoordinates(t.getCoordinateSequence(),t);if(null===n)return this._factory.createLinearRing(null);var r=n.size();return r>0&&r<4&&!this._preserveType?this._factory.createLineString(n):this._factory.createLinearRing(n)},Hr.prototype.interfaces_=function(){return[]},Hr.prototype.getClass=function(){return Hr};var Kr=function t(){if(this._snapTolerance=0,this._srcPts=null,this._seg=new gn,this._allowSnappingToSourceVertices=!1,this._isClosed=!1,arguments[0]instanceof Kt&&"number"==typeof arguments[1]){var e=arguments[0],n=arguments[1];t.call(this,e.getCoordinates(),n)}else if(arguments[0]instanceof Array&&"number"==typeof arguments[1]){var r=arguments[0],i=arguments[1];this._srcPts=r,this._isClosed=t.isClosed(r),this._snapTolerance=i}};Kr.prototype.snapVertices=function(t,e){for(var n=this._isClosed?t.size()-1:t.size(),r=0;r<n;r++){var i=t.get(r),o=this.findSnapForVertex(i,e);null!==o&&(t.set(r,new E(o)),0===r&&this._isClosed&&t.set(t.size()-1,new E(o)))}},Kr.prototype.findSnapForVertex=function(t,e){for(var n=0;n<e.length;n++){if(t.equals2D(e[n]))return null;if(t.distance(e[n])<this._snapTolerance)return e[n]}return null},Kr.prototype.snapTo=function(t){var e=new St(this._srcPts);return this.snapVertices(e,t),this.snapSegments(e,t),e.toCoordinateArray()},Kr.prototype.snapSegments=function(t,e){if(0===e.length)return null;var n=e.length;e[0].equals2D(e[e.length-1])&&(n=e.length-1);for(var r=0;r<n;r++){var i=e[r],o=this.findSegmentIndexToSnap(i,t);o>=0&&t.add(o+1,new E(i),!1)}},Kr.prototype.findSegmentIndexToSnap=function(t,e){for(var n=_.MAX_VALUE,r=-1,i=0;i<e.size()-1;i++){if(this._seg.p0=e.get(i),this._seg.p1=e.get(i+1),this._seg.p0.equals2D(t)||this._seg.p1.equals2D(t)){if(this._allowSnappingToSourceVertices)continue;return-1}var o=this._seg.distance(t);o<this._snapTolerance&&o<n&&(n=o,r=i)}return r},Kr.prototype.setAllowSnappingToSourceVertices=function(t){this._allowSnappingToSourceVertices=t},Kr.prototype.interfaces_=function(){return[]},Kr.prototype.getClass=function(){return Kr},Kr.isClosed=function(t){return!(t.length<=1)&&t[0].equals2D(t[t.length-1])};var Zr=function(t){this._srcGeom=t||null},Jr={SNAP_PRECISION_FACTOR:{configurable:!0}};Zr.prototype.snapTo=function(t,e){var n=this.extractTargetCoordinates(t);return new $r(e,n).transform(this._srcGeom)},Zr.prototype.snapToSelf=function(t,e){var n=this.extractTargetCoordinates(this._srcGeom),r=new $r(t,n,!0).transform(this._srcGeom),i=r;return e&&L(i,$t)&&(i=r.buffer(0)),i},Zr.prototype.computeSnapTolerance=function(t){return this.computeMinimumSegmentLength(t)/10},Zr.prototype.extractTargetCoordinates=function(t){for(var e=new f,n=t.getCoordinates(),r=0;r<n.length;r++)e.add(n[r]);return e.toArray(new Array(0).fill(null))},Zr.prototype.computeMinimumSegmentLength=function(t){for(var e=_.MAX_VALUE,n=0;n<t.length-1;n++){var r=t[n].distance(t[n+1]);r<e&&(e=r)}return e},Zr.prototype.interfaces_=function(){return[]},Zr.prototype.getClass=function(){return Zr},Zr.snap=function(t,e,n){var r=new Array(2).fill(null),i=new Zr(t);r[0]=i.snapTo(e,n);var o=new Zr(e);return r[1]=o.snapTo(r[0],n),r},Zr.computeOverlaySnapTolerance=function(){if(1===arguments.length){var t=arguments[0],e=Zr.computeSizeBasedSnapTolerance(t),n=t.getPrecisionModel();if(n.getType()===fe.FIXED){var r=1/n.getScale()*2/1.415;r>e&&(e=r)}return e}if(2===arguments.length){var i=arguments[0],o=arguments[1];return Math.min(Zr.computeOverlaySnapTolerance(i),Zr.computeOverlaySnapTolerance(o))}},Zr.computeSizeBasedSnapTolerance=function(t){var e=t.getEnvelopeInternal();return Math.min(e.getHeight(),e.getWidth())*Zr.SNAP_PRECISION_FACTOR},Zr.snapToSelf=function(t,e,n){return new Zr(t).snapToSelf(e,n)},Jr.SNAP_PRECISION_FACTOR.get=function(){return 1e-9},Object.defineProperties(Zr,Jr);var $r=function(t){function e(e,n,r){t.call(this),this._snapTolerance=e||null,this._snapPts=n||null,this._isSelfSnap=void 0!==r&&r}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.snapLine=function(t,e){var n=new Kr(t,this._snapTolerance);return n.setAllowSnappingToSourceVertices(this._isSelfSnap),n.snapTo(e)},e.prototype.transformCoordinates=function(t,e){var n=t.toCoordinateArray(),r=this.snapLine(n,this._snapPts);return this._factory.getCoordinateSequenceFactory().create(r)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(Hr),Qr=function(){this._isFirst=!0,this._commonMantissaBitsCount=53,this._commonBits=0,this._commonSignExp=null};Qr.prototype.getCommon=function(){return _.longBitsToDouble(this._commonBits)},Qr.prototype.add=function(t){var e=_.doubleToLongBits(t);return this._isFirst?(this._commonBits=e,this._commonSignExp=Qr.signExpBits(this._commonBits),this._isFirst=!1,null):Qr.signExpBits(e)!==this._commonSignExp?(this._commonBits=0,null):(this._commonMantissaBitsCount=Qr.numCommonMostSigMantissaBits(this._commonBits,e),void(this._commonBits=Qr.zeroLowerBits(this._commonBits,64-(12+this._commonMantissaBitsCount))))},Qr.prototype.toString=function(){if(1===arguments.length){var t=arguments[0],e=_.longBitsToDouble(t),n="0000000000000000000000000000000000000000000000000000000000000000"+_.toBinaryString(t),r=n.substring(n.length-64);return r.substring(0,1)+"  "+r.substring(1,12)+"(exp) "+r.substring(12)+" [ "+e+" ]"}},Qr.prototype.interfaces_=function(){return[]},Qr.prototype.getClass=function(){return Qr},Qr.getBit=function(t,e){return 0!=(t&1<<e)?1:0},Qr.signExpBits=function(t){return t>>52},Qr.zeroLowerBits=function(t,e){return t&~((1<<e)-1)},Qr.numCommonMostSigMantissaBits=function(t,e){for(var n=0,r=52;r>=0;r--){if(Qr.getBit(t,r)!==Qr.getBit(e,r))return n;n++}return 52};var ti=function(){this._commonCoord=null,this._ccFilter=new ni},ei={CommonCoordinateFilter:{configurable:!0},Translater:{configurable:!0}};ti.prototype.addCommonBits=function(t){var e=new ri(this._commonCoord);t.apply(e),t.geometryChanged()},ti.prototype.removeCommonBits=function(t){if(0===this._commonCoord.x&&0===this._commonCoord.y)return t;var e=new E(this._commonCoord);e.x=-e.x,e.y=-e.y;var n=new ri(e);return t.apply(n),t.geometryChanged(),t},ti.prototype.getCommonCoordinate=function(){return this._commonCoord},ti.prototype.add=function(t){t.apply(this._ccFilter),this._commonCoord=this._ccFilter.getCommonCoordinate()},ti.prototype.interfaces_=function(){return[]},ti.prototype.getClass=function(){return ti},ei.CommonCoordinateFilter.get=function(){return ni},ei.Translater.get=function(){return ri},Object.defineProperties(ti,ei);var ni=function(){this._commonBitsX=new Qr,this._commonBitsY=new Qr};ni.prototype.filter=function(t){this._commonBitsX.add(t.x),this._commonBitsY.add(t.y)},ni.prototype.getCommonCoordinate=function(){return new E(this._commonBitsX.getCommon(),this._commonBitsY.getCommon())},ni.prototype.interfaces_=function(){return[ft]},ni.prototype.getClass=function(){return ni};var ri=function(){this.trans=null;var t=arguments[0];this.trans=t};ri.prototype.filter=function(t,e){var n=t.getOrdinate(e,0)+this.trans.x,r=t.getOrdinate(e,1)+this.trans.y;t.setOrdinate(e,0,n),t.setOrdinate(e,1,r)},ri.prototype.isDone=function(){return!1},ri.prototype.isGeometryChanged=function(){return!0},ri.prototype.interfaces_=function(){return[zt]},ri.prototype.getClass=function(){return ri};var ii=function(t,e){this._geom=new Array(2).fill(null),this._snapTolerance=null,this._cbr=null,this._geom[0]=t,this._geom[1]=e,this.computeSnapTolerance()};ii.prototype.selfSnap=function(t){return new Zr(t).snapTo(t,this._snapTolerance)},ii.prototype.removeCommonBits=function(t){this._cbr=new ti,this._cbr.add(t[0]),this._cbr.add(t[1]);var e=new Array(2).fill(null);return e[0]=this._cbr.removeCommonBits(t[0].copy()),e[1]=this._cbr.removeCommonBits(t[1].copy()),e},ii.prototype.prepareResult=function(t){return this._cbr.addCommonBits(t),t},ii.prototype.getResultGeometry=function(t){var e=this.snap(this._geom),n=Ci.overlayOp(e[0],e[1],t);return this.prepareResult(n)},ii.prototype.checkValid=function(t){t.isValid()||Y.out.println("Snapped geometry is invalid")},ii.prototype.computeSnapTolerance=function(){this._snapTolerance=Zr.computeOverlaySnapTolerance(this._geom[0],this._geom[1])},ii.prototype.snap=function(t){var e=this.removeCommonBits(t);return Zr.snap(e[0],e[1],this._snapTolerance)},ii.prototype.interfaces_=function(){return[]},ii.prototype.getClass=function(){return ii},ii.overlayOp=function(t,e,n){return new ii(t,e).getResultGeometry(n)},ii.union=function(t,e){return ii.overlayOp(t,e,Ci.UNION)},ii.intersection=function(t,e){return ii.overlayOp(t,e,Ci.INTERSECTION)},ii.symDifference=function(t,e){return ii.overlayOp(t,e,Ci.SYMDIFFERENCE)},ii.difference=function(t,e){return ii.overlayOp(t,e,Ci.DIFFERENCE)};var oi=function(t,e){this._geom=new Array(2).fill(null),this._geom[0]=t,this._geom[1]=e};oi.prototype.getResultGeometry=function(t){var e=null,n=!1,r=null;try{e=Ci.overlayOp(this._geom[0],this._geom[1],t),n=!0}catch(t){if(!(t instanceof Q))throw t;r=t}if(!n)try{e=ii.overlayOp(this._geom[0],this._geom[1],t)}catch(t){throw t instanceof Q?r:t}return e},oi.prototype.interfaces_=function(){return[]},oi.prototype.getClass=function(){return oi},oi.overlayOp=function(t,e,n){return new oi(t,e).getResultGeometry(n)},oi.union=function(t,e){return oi.overlayOp(t,e,Ci.UNION)},oi.intersection=function(t,e){return oi.overlayOp(t,e,Ci.INTERSECTION)},oi.symDifference=function(t,e){return oi.overlayOp(t,e,Ci.SYMDIFFERENCE)},oi.difference=function(t,e){return oi.overlayOp(t,e,Ci.DIFFERENCE)};var ai=function(){this.mce=null,this.chainIndex=null;var t=arguments[0],e=arguments[1];this.mce=t,this.chainIndex=e};ai.prototype.computeIntersections=function(t,e){this.mce.computeIntersectsForChain(this.chainIndex,t.mce,t.chainIndex,e)},ai.prototype.interfaces_=function(){return[]},ai.prototype.getClass=function(){return ai};var si=function t(){if(this._label=null,this._xValue=null,this._eventType=null,this._insertEvent=null,this._deleteEventIndex=null,this._obj=null,2===arguments.length){var e=arguments[0],n=arguments[1];this._eventType=t.DELETE,this._xValue=e,this._insertEvent=n}else if(3===arguments.length){var r=arguments[0],i=arguments[1],o=arguments[2];this._eventType=t.INSERT,this._label=r,this._xValue=i,this._obj=o}},li={INSERT:{configurable:!0},DELETE:{configurable:!0}};si.prototype.isDelete=function(){return this._eventType===si.DELETE},si.prototype.setDeleteEventIndex=function(t){this._deleteEventIndex=t},si.prototype.getObject=function(){return this._obj},si.prototype.compareTo=function(t){var e=t;return this._xValue<e._xValue?-1:this._xValue>e._xValue?1:this._eventType<e._eventType?-1:this._eventType>e._eventType?1:0},si.prototype.getInsertEvent=function(){return this._insertEvent},si.prototype.isInsert=function(){return this._eventType===si.INSERT},si.prototype.isSameLabel=function(t){return null!==this._label&&this._label===t._label},si.prototype.getDeleteEventIndex=function(){return this._deleteEventIndex},si.prototype.interfaces_=function(){return[w]},si.prototype.getClass=function(){return si},li.INSERT.get=function(){return 1},li.DELETE.get=function(){return 2},Object.defineProperties(si,li);var ui=function(){};ui.prototype.interfaces_=function(){return[]},ui.prototype.getClass=function(){return ui};var ci=function(){this._hasIntersection=!1,this._hasProper=!1,this._hasProperInterior=!1,this._properIntersectionPoint=null,this._li=null,this._includeProper=null,this._recordIsolated=null,this._isSelfIntersection=null,this._numIntersections=0,this.numTests=0,this._bdyNodes=null,this._isDone=!1,this._isDoneWhenProperInt=!1;var t=arguments[0],e=arguments[1],n=arguments[2];this._li=t,this._includeProper=e,this._recordIsolated=n};ci.prototype.isTrivialIntersection=function(t,e,n,r){if(t===n&&1===this._li.getIntersectionNum()){if(ci.isAdjacentSegments(e,r))return!0;if(t.isClosed()){var i=t.getNumPoints()-1;if(0===e&&r===i||0===r&&e===i)return!0}}return!1},ci.prototype.getProperIntersectionPoint=function(){return this._properIntersectionPoint},ci.prototype.setIsDoneIfProperInt=function(t){this._isDoneWhenProperInt=t},ci.prototype.hasProperInteriorIntersection=function(){return this._hasProperInterior},ci.prototype.isBoundaryPointInternal=function(t,e){for(var n=e.iterator();n.hasNext();){var r=n.next().getCoordinate();if(t.isIntersection(r))return!0}return!1},ci.prototype.hasProperIntersection=function(){return this._hasProper},ci.prototype.hasIntersection=function(){return this._hasIntersection},ci.prototype.isDone=function(){return this._isDone},ci.prototype.isBoundaryPoint=function(t,e){return null!==e&&(!!this.isBoundaryPointInternal(t,e[0])||!!this.isBoundaryPointInternal(t,e[1]))},ci.prototype.setBoundaryNodes=function(t,e){this._bdyNodes=new Array(2).fill(null),this._bdyNodes[0]=t,this._bdyNodes[1]=e},ci.prototype.addIntersections=function(t,e,n,r){if(t===n&&e===r)return null;this.numTests++;var i=t.getCoordinates()[e],o=t.getCoordinates()[e+1],a=n.getCoordinates()[r],s=n.getCoordinates()[r+1];this._li.computeIntersection(i,o,a,s),this._li.hasIntersection()&&(this._recordIsolated&&(t.setIsolated(!1),n.setIsolated(!1)),this._numIntersections++,this.isTrivialIntersection(t,e,n,r)||(this._hasIntersection=!0,!this._includeProper&&this._li.isProper()||(t.addIntersections(this._li,e,0),n.addIntersections(this._li,r,1)),this._li.isProper()&&(this._properIntersectionPoint=this._li.getIntersection(0).copy(),this._hasProper=!0,this._isDoneWhenProperInt&&(this._isDone=!0),this.isBoundaryPoint(this._li,this._bdyNodes)||(this._hasProperInterior=!0))))},ci.prototype.interfaces_=function(){return[]},ci.prototype.getClass=function(){return ci},ci.isAdjacentSegments=function(t,e){return 1===Math.abs(t-e)};var hi=function(t){function e(){t.call(this),this.events=new xt,this.nOverlaps=null}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.prepareEvents=function(){Qe.sort(this.events);for(var t=0;t<this.events.size();t++){var e=this.events.get(t);e.isDelete()&&e.getInsertEvent().setDeleteEventIndex(t)}},e.prototype.computeIntersections=function(){if(1===arguments.length){var t=arguments[0];this.nOverlaps=0,this.prepareEvents();for(var e=0;e<this.events.size();e++){var n=this.events.get(e);if(n.isInsert()&&this.processOverlaps(e,n.getDeleteEventIndex(),n,t),t.isDone())break}}else if(3===arguments.length)if(arguments[2]instanceof ci&&L(arguments[0],Ot)&&L(arguments[1],Ot)){var r=arguments[0],i=arguments[1],o=arguments[2];this.addEdges(r,r),this.addEdges(i,i),this.computeIntersections(o)}else if("boolean"==typeof arguments[2]&&L(arguments[0],Ot)&&arguments[1]instanceof ci){var a=arguments[0],s=arguments[1];arguments[2]?this.addEdges(a,null):this.addEdges(a),this.computeIntersections(s)}},e.prototype.addEdge=function(t,e){for(var n=t.getMonotoneChainEdge(),r=n.getStartIndexes(),i=0;i<r.length-1;i++){var o=new ai(n,i),a=new si(e,n.getMinX(i),o);this.events.add(a),this.events.add(new si(n.getMaxX(i),a))}},e.prototype.processOverlaps=function(t,e,n,r){for(var i=n.getObject(),o=t;o<e;o++){var a=this.events.get(o);if(a.isInsert()){var s=a.getObject();n.isSameLabel(a)||(i.computeIntersections(s,r),this.nOverlaps++)}}},e.prototype.addEdges=function(){if(1===arguments.length)for(var t=arguments[0].iterator();t.hasNext();){var e=t.next();this.addEdge(e,e)}else if(2===arguments.length)for(var n=arguments[0],r=arguments[1],i=n.iterator();i.hasNext();){var o=i.next();this.addEdge(o,r)}},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(ui),pi=function(){this._min=_.POSITIVE_INFINITY,this._max=_.NEGATIVE_INFINITY},fi={NodeComparator:{configurable:!0}};pi.prototype.getMin=function(){return this._min},pi.prototype.intersects=function(t,e){return!(this._min>e||this._max<t)},pi.prototype.getMax=function(){return this._max},pi.prototype.toString=function(){return $.toLineString(new E(this._min,0),new E(this._max,0))},pi.prototype.interfaces_=function(){return[]},pi.prototype.getClass=function(){return pi},fi.NodeComparator.get=function(){return di},Object.defineProperties(pi,fi);var di=function(){};di.prototype.compare=function(t,e){var n=t,r=e,i=(n._min+n._max)/2,o=(r._min+r._max)/2;return i<o?-1:i>o?1:0},di.prototype.interfaces_=function(){return[x]},di.prototype.getClass=function(){return di};var gi=function(t){function e(){t.call(this),this._item=null;var e=arguments[0],n=arguments[1],r=arguments[2];this._min=e,this._max=n,this._item=r}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.query=function(t,e,n){if(!this.intersects(t,e))return null;n.visitItem(this._item)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(pi),yi=function(t){function e(){t.call(this),this._node1=null,this._node2=null;var e=arguments[0],n=arguments[1];this._node1=e,this._node2=n,this.buildExtent(this._node1,this._node2)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.buildExtent=function(t,e){this._min=Math.min(t._min,e._min),this._max=Math.max(t._max,e._max)},e.prototype.query=function(t,e,n){if(!this.intersects(t,e))return null;null!==this._node1&&this._node1.query(t,e,n),null!==this._node2&&this._node2.query(t,e,n)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(pi),mi=function(){this._leaves=new xt,this._root=null,this._level=0};mi.prototype.buildTree=function(){Qe.sort(this._leaves,new pi.NodeComparator);for(var t=this._leaves,e=null,n=new xt;;){if(this.buildLevel(t,n),1===n.size())return n.get(0);e=t,t=n,n=e}},mi.prototype.insert=function(t,e,n){if(null!==this._root)throw new Error("Index cannot be added to once it has been queried");this._leaves.add(new gi(t,e,n))},mi.prototype.query=function(t,e,n){this.init(),this._root.query(t,e,n)},mi.prototype.buildRoot=function(){if(null!==this._root)return null;this._root=this.buildTree()},mi.prototype.printNode=function(t){Y.out.println($.toLineString(new E(t._min,this._level),new E(t._max,this._level)))},mi.prototype.init=function(){if(null!==this._root)return null;this.buildRoot()},mi.prototype.buildLevel=function(t,e){this._level++,e.clear();for(var n=0;n<t.size();n+=2){var r=t.get(n);if(null===(n+1<t.size()?t.get(n):null))e.add(r);else{var i=new yi(t.get(n),t.get(n+1));e.add(i)}}},mi.prototype.interfaces_=function(){return[]},mi.prototype.getClass=function(){return mi};var vi=function(){this._items=new xt};vi.prototype.visitItem=function(t){this._items.add(t)},vi.prototype.getItems=function(){return this._items},vi.prototype.interfaces_=function(){return[Ke]},vi.prototype.getClass=function(){return vi};var _i=function(){this._index=null;var t=arguments[0];if(!L(t,$t))throw new v("Argument must be Polygonal");this._index=new Oi(t)},bi={SegmentVisitor:{configurable:!0},IntervalIndexedGeometry:{configurable:!0}};_i.prototype.locate=function(t){var e=new at(t),n=new wi(e);return this._index.query(t.y,t.y,n),e.getLocation()},_i.prototype.interfaces_=function(){return[Un]},_i.prototype.getClass=function(){return _i},bi.SegmentVisitor.get=function(){return wi},bi.IntervalIndexedGeometry.get=function(){return Oi},Object.defineProperties(_i,bi);var wi=function(){this._counter=null;var t=arguments[0];this._counter=t};wi.prototype.visitItem=function(t){var e=t;this._counter.countSegment(e.getCoordinate(0),e.getCoordinate(1))},wi.prototype.interfaces_=function(){return[Ke]},wi.prototype.getClass=function(){return wi};var Oi=function(){this._index=new mi;var t=arguments[0];this.init(t)};Oi.prototype.init=function(t){for(var e=Er.getLines(t).iterator();e.hasNext();){var n=e.next().getCoordinates();this.addLine(n)}},Oi.prototype.addLine=function(t){for(var e=1;e<t.length;e++){var n=new gn(t[e-1],t[e]),r=Math.min(n.p0.y,n.p1.y),i=Math.max(n.p0.y,n.p1.y);this._index.insert(r,i,n)}},Oi.prototype.query=function(){if(2===arguments.length){var t=arguments[0],e=arguments[1],n=new vi;return this._index.query(t,e,n),n.getItems()}if(3===arguments.length){var r=arguments[0],i=arguments[1],o=arguments[2];this._index.query(r,i,o)}},Oi.prototype.interfaces_=function(){return[]},Oi.prototype.getClass=function(){return Oi};var xi=function(t){function e(){if(t.call(this),this._parentGeom=null,this._lineEdgeMap=new pe,this._boundaryNodeRule=null,this._useBoundaryDeterminationRule=!0,this._argIndex=null,this._boundaryNodes=null,this._hasTooFewPoints=!1,this._invalidPoint=null,this._areaPtLocator=null,this._ptLocator=new Sr,2===arguments.length){var e=arguments[0],n=arguments[1],r=dt.OGC_SFS_BOUNDARY_RULE;this._argIndex=e,this._parentGeom=n,this._boundaryNodeRule=r,null!==n&&this.add(n)}else if(3===arguments.length){var i=arguments[0],o=arguments[1],a=arguments[2];this._argIndex=i,this._parentGeom=o,this._boundaryNodeRule=a,null!==o&&this.add(o)}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.insertBoundaryPoint=function(t,n){var r=this._nodes.addNode(n).getLabel(),i=1;I.NONE,r.getLocation(t,Se.ON)===I.BOUNDARY&&i++;var o=e.determineBoundary(this._boundaryNodeRule,i);r.setLocation(t,o)},e.prototype.computeSelfNodes=function(){if(2===arguments.length){var t=arguments[0],e=arguments[1];return this.computeSelfNodes(t,e,!1)}if(3===arguments.length){var n=arguments[0],r=arguments[1],i=arguments[2],o=new ci(n,!0,!1);o.setIsDoneIfProperInt(i);var a=this.createEdgeSetIntersector(),s=this._parentGeom instanceof ee||this._parentGeom instanceof Qt||this._parentGeom instanceof ne,l=r||!s;return a.computeIntersections(this._edges,o,l),this.addSelfIntersectionNodes(this._argIndex),o}},e.prototype.computeSplitEdges=function(t){for(var e=this._edges.iterator();e.hasNext();)e.next().eiList.addSplitEdges(t)},e.prototype.computeEdgeIntersections=function(t,e,n){var r=new ci(e,n,!0);return r.setBoundaryNodes(this.getBoundaryNodes(),t.getBoundaryNodes()),this.createEdgeSetIntersector().computeIntersections(this._edges,t._edges,r),r},e.prototype.getGeometry=function(){return this._parentGeom},e.prototype.getBoundaryNodeRule=function(){return this._boundaryNodeRule},e.prototype.hasTooFewPoints=function(){return this._hasTooFewPoints},e.prototype.addPoint=function(){if(arguments[0]instanceof Jt){var t=arguments[0].getCoordinate();this.insertPoint(this._argIndex,t,I.INTERIOR)}else if(arguments[0]instanceof E){var e=arguments[0];this.insertPoint(this._argIndex,e,I.INTERIOR)}},e.prototype.addPolygon=function(t){this.addPolygonRing(t.getExteriorRing(),I.EXTERIOR,I.INTERIOR);for(var e=0;e<t.getNumInteriorRing();e++){var n=t.getInteriorRingN(e);this.addPolygonRing(n,I.INTERIOR,I.EXTERIOR)}},e.prototype.addEdge=function(t){this.insertEdge(t);var e=t.getCoordinates();this.insertPoint(this._argIndex,e[0],I.BOUNDARY),this.insertPoint(this._argIndex,e[e.length-1],I.BOUNDARY)},e.prototype.addLineString=function(t){var e=Ct.removeRepeatedPoints(t.getCoordinates());if(e.length<2)return this._hasTooFewPoints=!0,this._invalidPoint=e[0],null;var n=new nr(e,new Pe(this._argIndex,I.INTERIOR));this._lineEdgeMap.put(t,n),this.insertEdge(n),et.isTrue(e.length>=2,"found LineString with single point"),this.insertBoundaryPoint(this._argIndex,e[0]),this.insertBoundaryPoint(this._argIndex,e[e.length-1])},e.prototype.getInvalidPoint=function(){return this._invalidPoint},e.prototype.getBoundaryPoints=function(){for(var t=this.getBoundaryNodes(),e=new Array(t.size()).fill(null),n=0,r=t.iterator();r.hasNext();){var i=r.next();e[n++]=i.getCoordinate().copy()}return e},e.prototype.getBoundaryNodes=function(){return null===this._boundaryNodes&&(this._boundaryNodes=this._nodes.getBoundaryNodes(this._argIndex)),this._boundaryNodes},e.prototype.addSelfIntersectionNode=function(t,e,n){if(this.isBoundaryNode(t,e))return null;n===I.BOUNDARY&&this._useBoundaryDeterminationRule?this.insertBoundaryPoint(t,e):this.insertPoint(t,e,n)},e.prototype.addPolygonRing=function(t,e,n){if(t.isEmpty())return null;var r=Ct.removeRepeatedPoints(t.getCoordinates());if(r.length<4)return this._hasTooFewPoints=!0,this._invalidPoint=r[0],null;var i=e,o=n;st.isCCW(r)&&(i=n,o=e);var a=new nr(r,new Pe(this._argIndex,I.BOUNDARY,i,o));this._lineEdgeMap.put(t,a),this.insertEdge(a),this.insertPoint(this._argIndex,r[0],I.BOUNDARY)},e.prototype.insertPoint=function(t,e,n){var r=this._nodes.addNode(e),i=r.getLabel();null===i?r._label=new Pe(t,n):i.setLocation(t,n)},e.prototype.createEdgeSetIntersector=function(){return new hi},e.prototype.addSelfIntersectionNodes=function(t){for(var e=this._edges.iterator();e.hasNext();)for(var n=e.next(),r=n.getLabel().getLocation(t),i=n.eiList.iterator();i.hasNext();){var o=i.next();this.addSelfIntersectionNode(t,o.coord,r)}},e.prototype.add=function(){if(1!==arguments.length)return t.prototype.add.apply(this,arguments);var e=arguments[0];if(e.isEmpty())return null;if(e instanceof ne&&(this._useBoundaryDeterminationRule=!1),e instanceof Qt)this.addPolygon(e);else if(e instanceof Kt)this.addLineString(e);else if(e instanceof Jt)this.addPoint(e);else if(e instanceof te)this.addCollection(e);else if(e instanceof Vt)this.addCollection(e);else if(e instanceof ne)this.addCollection(e);else{if(!(e instanceof Bt))throw new Error(e.getClass().getName());this.addCollection(e)}},e.prototype.addCollection=function(t){for(var e=0;e<t.getNumGeometries();e++){var n=t.getGeometryN(e);this.add(n)}},e.prototype.locate=function(t){return L(this._parentGeom,$t)&&this._parentGeom.getNumGeometries()>50?(null===this._areaPtLocator&&(this._areaPtLocator=new _i(this._parentGeom)),this._areaPtLocator.locate(t)):this._ptLocator.locate(t,this._parentGeom)},e.prototype.findEdge=function(){if(1===arguments.length){var e=arguments[0];return this._lineEdgeMap.get(e)}return t.prototype.findEdge.apply(this,arguments)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e.determineBoundary=function(t,e){return t.isInBoundary(e)?I.BOUNDARY:I.INTERIOR},e}(Ye),Ei=function(){if(this._li=new it,this._resultPrecisionModel=null,this._arg=null,1===arguments.length){var t=arguments[0];this.setComputationPrecision(t.getPrecisionModel()),this._arg=new Array(1).fill(null),this._arg[0]=new xi(0,t)}else if(2===arguments.length){var e=arguments[0],n=arguments[1],r=dt.OGC_SFS_BOUNDARY_RULE;e.getPrecisionModel().compareTo(n.getPrecisionModel())>=0?this.setComputationPrecision(e.getPrecisionModel()):this.setComputationPrecision(n.getPrecisionModel()),this._arg=new Array(2).fill(null),this._arg[0]=new xi(0,e,r),this._arg[1]=new xi(1,n,r)}else if(3===arguments.length){var i=arguments[0],o=arguments[1],a=arguments[2];i.getPrecisionModel().compareTo(o.getPrecisionModel())>=0?this.setComputationPrecision(i.getPrecisionModel()):this.setComputationPrecision(o.getPrecisionModel()),this._arg=new Array(2).fill(null),this._arg[0]=new xi(0,i,a),this._arg[1]=new xi(1,o,a)}};Ei.prototype.getArgGeometry=function(t){return this._arg[t].getGeometry()},Ei.prototype.setComputationPrecision=function(t){this._resultPrecisionModel=t,this._li.setPrecisionModel(this._resultPrecisionModel)},Ei.prototype.interfaces_=function(){return[]},Ei.prototype.getClass=function(){return Ei};var Si=function(){};Si.prototype.interfaces_=function(){return[]},Si.prototype.getClass=function(){return Si},Si.map=function(){if(arguments[0]instanceof ct&&L(arguments[1],Si.MapOp)){for(var t=arguments[0],e=arguments[1],n=new xt,r=0;r<t.getNumGeometries();r++){var i=e.map(t.getGeometryN(r));null!==i&&n.add(i)}return t.getFactory().buildGeometry(n)}if(L(arguments[0],bt)&&L(arguments[1],Si.MapOp)){for(var o=arguments[0],a=arguments[1],s=new xt,l=o.iterator();l.hasNext();){var u=l.next(),c=a.map(u);null!==c&&s.add(c)}return s}},Si.MapOp=function(){};var Ci=function(t){function e(){var e=arguments[0],n=arguments[1];t.call(this,e,n),this._ptLocator=new Sr,this._geomFact=null,this._resultGeom=null,this._graph=null,this._edgeList=new Wn,this._resultPolyList=new xt,this._resultLineList=new xt,this._resultPointList=new xt,this._graph=new Ye(new qn),this._geomFact=e.getFactory()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.insertUniqueEdge=function(t){var e=this._edgeList.findEqualEdge(t);if(null!==e){var n=e.getLabel(),r=t.getLabel();e.isPointwiseEqual(t)||(r=new Pe(t.getLabel())).flip();var i=e.getDepth();i.isNull()&&i.add(n),i.add(r),n.merge(r)}else this._edgeList.add(t)},e.prototype.getGraph=function(){return this._graph},e.prototype.cancelDuplicateResultEdges=function(){for(var t=this._graph.getEdgeEnds().iterator();t.hasNext();){var e=t.next(),n=e.getSym();e.isInResult()&&n.isInResult()&&(e.setInResult(!1),n.setInResult(!1))}},e.prototype.isCoveredByLA=function(t){return!!this.isCovered(t,this._resultLineList)||!!this.isCovered(t,this._resultPolyList)},e.prototype.computeGeometry=function(t,n,r,i){var o=new xt;return o.addAll(t),o.addAll(n),o.addAll(r),o.isEmpty()?e.createEmptyResult(i,this._arg[0].getGeometry(),this._arg[1].getGeometry(),this._geomFact):this._geomFact.buildGeometry(o)},e.prototype.mergeSymLabels=function(){for(var t=this._graph.getNodes().iterator();t.hasNext();)t.next().getEdges().mergeSymLabels()},e.prototype.isCovered=function(t,e){for(var n=e.iterator();n.hasNext();){var r=n.next();if(this._ptLocator.locate(t,r)!==I.EXTERIOR)return!0}return!1},e.prototype.replaceCollapsedEdges=function(){for(var t=new xt,e=this._edgeList.iterator();e.hasNext();){var n=e.next();n.isCollapsed()&&(e.remove(),t.add(n.getCollapsedEdge()))}this._edgeList.addAll(t)},e.prototype.updateNodeLabelling=function(){for(var t=this._graph.getNodes().iterator();t.hasNext();){var e=t.next(),n=e.getEdges().getLabel();e.getLabel().merge(n)}},e.prototype.getResultGeometry=function(t){return this.computeOverlay(t),this._resultGeom},e.prototype.insertUniqueEdges=function(t){for(var e=t.iterator();e.hasNext();){var n=e.next();this.insertUniqueEdge(n)}},e.prototype.computeOverlay=function(t){this.copyPoints(0),this.copyPoints(1),this._arg[0].computeSelfNodes(this._li,!1),this._arg[1].computeSelfNodes(this._li,!1),this._arg[0].computeEdgeIntersections(this._arg[1],this._li,!0);var e=new xt;this._arg[0].computeSplitEdges(e),this._arg[1].computeSplitEdges(e),this.insertUniqueEdges(e),this.computeLabelsFromDepths(),this.replaceCollapsedEdges(),Yr.checkValid(this._edgeList.getEdges()),this._graph.addEdges(this._edgeList.getEdges()),this.computeLabelling(),this.labelIncompleteNodes(),this.findResultAreaEdges(t),this.cancelDuplicateResultEdges();var n=new qe(this._geomFact);n.add(this._graph),this._resultPolyList=n.getPolygons();var r=new Xr(this,this._geomFact,this._ptLocator);this._resultLineList=r.build(t);var i=new Wr(this,this._geomFact,this._ptLocator);this._resultPointList=i.build(t),this._resultGeom=this.computeGeometry(this._resultPointList,this._resultLineList,this._resultPolyList,t)},e.prototype.labelIncompleteNode=function(t,e){var n=this._ptLocator.locate(t.getCoordinate(),this._arg[e].getGeometry());t.getLabel().setLocation(e,n)},e.prototype.copyPoints=function(t){for(var e=this._arg[t].getNodeIterator();e.hasNext();){var n=e.next();this._graph.addNode(n.getCoordinate()).setLabel(t,n.getLabel().getLocation(t))}},e.prototype.findResultAreaEdges=function(t){for(var n=this._graph.getEdgeEnds().iterator();n.hasNext();){var r=n.next(),i=r.getLabel();i.isArea()&&!r.isInteriorAreaEdge()&&e.isResultOfOp(i.getLocation(0,Se.RIGHT),i.getLocation(1,Se.RIGHT),t)&&r.setInResult(!0)}},e.prototype.computeLabelsFromDepths=function(){for(var t=this._edgeList.iterator();t.hasNext();){var e=t.next(),n=e.getLabel(),r=e.getDepth();if(!r.isNull()){r.normalize();for(var i=0;i<2;i++)n.isNull(i)||!n.isArea()||r.isNull(i)||(0===r.getDelta(i)?n.toLine(i):(et.isTrue(!r.isNull(i,Se.LEFT),"depth of LEFT side has not been initialized"),n.setLocation(i,Se.LEFT,r.getLocation(i,Se.LEFT)),et.isTrue(!r.isNull(i,Se.RIGHT),"depth of RIGHT side has not been initialized"),n.setLocation(i,Se.RIGHT,r.getLocation(i,Se.RIGHT))))}}},e.prototype.computeLabelling=function(){for(var t=this._graph.getNodes().iterator();t.hasNext();)t.next().getEdges().computeLabelling(this._arg);this.mergeSymLabels(),this.updateNodeLabelling()},e.prototype.labelIncompleteNodes=function(){for(var t=this._graph.getNodes().iterator();t.hasNext();){var e=t.next(),n=e.getLabel();e.isIsolated()&&(n.isNull(0)?this.labelIncompleteNode(e,0):this.labelIncompleteNode(e,1)),e.getEdges().updateLabelling(n)}},e.prototype.isCoveredByA=function(t){return!!this.isCovered(t,this._resultPolyList)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(Ei);Ci.overlayOp=function(t,e,n){return new Ci(t,e).getResultGeometry(n)},Ci.intersection=function(t,e){if(t.isEmpty()||e.isEmpty())return Ci.createEmptyResult(Ci.INTERSECTION,t,e,t.getFactory());if(t.isGeometryCollection()){var n=e;return qr.map(t,{interfaces_:function(){return[Si.MapOp]},map:function(t){return t.intersection(n)}})}return t.checkNotGeometryCollection(t),t.checkNotGeometryCollection(e),oi.overlayOp(t,e,Ci.INTERSECTION)},Ci.symDifference=function(t,e){if(t.isEmpty()||e.isEmpty()){if(t.isEmpty()&&e.isEmpty())return Ci.createEmptyResult(Ci.SYMDIFFERENCE,t,e,t.getFactory());if(t.isEmpty())return e.copy();if(e.isEmpty())return t.copy()}return t.checkNotGeometryCollection(t),t.checkNotGeometryCollection(e),oi.overlayOp(t,e,Ci.SYMDIFFERENCE)},Ci.resultDimension=function(t,e,n){var r=e.getDimension(),i=n.getDimension(),o=-1;switch(t){case Ci.INTERSECTION:o=Math.min(r,i);break;case Ci.UNION:o=Math.max(r,i);break;case Ci.DIFFERENCE:o=r;break;case Ci.SYMDIFFERENCE:o=Math.max(r,i)}return o},Ci.createEmptyResult=function(t,e,n,r){var i=null;switch(Ci.resultDimension(t,e,n)){case-1:i=r.createGeometryCollection(new Array(0).fill(null));break;case 0:i=r.createPoint();break;case 1:i=r.createLineString();break;case 2:i=r.createPolygon()}return i},Ci.difference=function(t,e){return t.isEmpty()?Ci.createEmptyResult(Ci.DIFFERENCE,t,e,t.getFactory()):e.isEmpty()?t.copy():(t.checkNotGeometryCollection(t),t.checkNotGeometryCollection(e),oi.overlayOp(t,e,Ci.DIFFERENCE))},Ci.isResultOfOp=function(){if(2===arguments.length){var t=arguments[0],e=arguments[1],n=t.getLocation(0),r=t.getLocation(1);return Ci.isResultOfOp(n,r,e)}if(3===arguments.length){var i=arguments[0],o=arguments[1],a=arguments[2];switch(i===I.BOUNDARY&&(i=I.INTERIOR),o===I.BOUNDARY&&(o=I.INTERIOR),a){case Ci.INTERSECTION:return i===I.INTERIOR&&o===I.INTERIOR;case Ci.UNION:return i===I.INTERIOR||o===I.INTERIOR;case Ci.DIFFERENCE:return i===I.INTERIOR&&o!==I.INTERIOR;case Ci.SYMDIFFERENCE:return i===I.INTERIOR&&o!==I.INTERIOR||i!==I.INTERIOR&&o===I.INTERIOR}return!1}},Ci.INTERSECTION=1,Ci.UNION=2,Ci.DIFFERENCE=3,Ci.SYMDIFFERENCE=4;var Ti=function(){this._g=null,this._boundaryDistanceTolerance=null,this._linework=null,this._ptLocator=new Sr,this._seg=new gn;var t=arguments[0],e=arguments[1];this._g=t,this._boundaryDistanceTolerance=e,this._linework=this.extractLinework(t)};Ti.prototype.isWithinToleranceOfBoundary=function(t){for(var e=0;e<this._linework.getNumGeometries();e++)for(var n=this._linework.getGeometryN(e).getCoordinateSequence(),r=0;r<n.size()-1;r++)if(n.getCoordinate(r,this._seg.p0),n.getCoordinate(r+1,this._seg.p1),this._seg.distance(t)<=this._boundaryDistanceTolerance)return!0;return!1},Ti.prototype.getLocation=function(t){return this.isWithinToleranceOfBoundary(t)?I.BOUNDARY:this._ptLocator.locate(t,this._g)},Ti.prototype.extractLinework=function(t){var e=new Ii;t.apply(e);var n=e.getLinework(),r=me.toLineStringArray(n);return t.getFactory().createMultiLineString(r)},Ti.prototype.interfaces_=function(){return[]},Ti.prototype.getClass=function(){return Ti};var Ii=function(){this._linework=null,this._linework=new xt};Ii.prototype.getLinework=function(){return this._linework},Ii.prototype.filter=function(t){if(t instanceof Qt){var e=t;this._linework.add(e.getExteriorRing());for(var n=0;n<e.getNumInteriorRing();n++)this._linework.add(e.getInteriorRingN(n))}},Ii.prototype.interfaces_=function(){return[Ut]},Ii.prototype.getClass=function(){return Ii};var ji=function(){this._g=null,this._doLeft=!0,this._doRight=!0;var t=arguments[0];this._g=t};ji.prototype.extractPoints=function(t,e,n){for(var r=t.getCoordinates(),i=0;i<r.length-1;i++)this.computeOffsetPoints(r[i],r[i+1],e,n)},ji.prototype.setSidesToGenerate=function(t,e){this._doLeft=t,this._doRight=e},ji.prototype.getPoints=function(t){for(var e=new xt,n=Er.getLines(this._g).iterator();n.hasNext();){var r=n.next();this.extractPoints(r,t,e)}return e},ji.prototype.computeOffsetPoints=function(t,e,n,r){var i=e.x-t.x,o=e.y-t.y,a=Math.sqrt(i*i+o*o),s=n*i/a,l=n*o/a,u=(e.x+t.x)/2,c=(e.y+t.y)/2;if(this._doLeft){var h=new E(u-l,c+s);r.add(h)}if(this._doRight){var p=new E(u+l,c-s);r.add(p)}},ji.prototype.interfaces_=function(){return[]},ji.prototype.getClass=function(){return ji};var Li=function t(){this._geom=null,this._locFinder=null,this._location=new Array(3).fill(null),this._invalidLocation=null,this._boundaryDistanceTolerance=t.TOLERANCE,this._testCoords=new xt;var e=arguments[0],n=arguments[1],r=arguments[2];this._boundaryDistanceTolerance=t.computeBoundaryDistanceTolerance(e,n),this._geom=[e,n,r],this._locFinder=[new Ti(this._geom[0],this._boundaryDistanceTolerance),new Ti(this._geom[1],this._boundaryDistanceTolerance),new Ti(this._geom[2],this._boundaryDistanceTolerance)]},Ri={TOLERANCE:{configurable:!0}};Li.prototype.reportResult=function(t,e,n){Y.out.println("Overlay result invalid - A:"+I.toLocationSymbol(e[0])+" B:"+I.toLocationSymbol(e[1])+" expected:"+(n?"i":"e")+" actual:"+I.toLocationSymbol(e[2]))},Li.prototype.isValid=function(t){return this.addTestPts(this._geom[0]),this.addTestPts(this._geom[1]),this.checkValid(t)},Li.prototype.checkValid=function(){if(1===arguments.length){for(var t=arguments[0],e=0;e<this._testCoords.size();e++){var n=this._testCoords.get(e);if(!this.checkValid(t,n))return this._invalidLocation=n,!1}return!0}if(2===arguments.length){var r=arguments[0],i=arguments[1];return this._location[0]=this._locFinder[0].getLocation(i),this._location[1]=this._locFinder[1].getLocation(i),this._location[2]=this._locFinder[2].getLocation(i),!!Li.hasLocation(this._location,I.BOUNDARY)||this.isValidResult(r,this._location)}},Li.prototype.addTestPts=function(t){var e=new ji(t);this._testCoords.addAll(e.getPoints(5*this._boundaryDistanceTolerance))},Li.prototype.isValidResult=function(t,e){var n=Ci.isResultOfOp(e[0],e[1],t),r=!(n^e[2]===I.INTERIOR);return r||this.reportResult(t,e,n),r},Li.prototype.getInvalidLocation=function(){return this._invalidLocation},Li.prototype.interfaces_=function(){return[]},Li.prototype.getClass=function(){return Li},Li.hasLocation=function(t,e){for(var n=0;n<3;n++)if(t[n]===e)return!0;return!1},Li.computeBoundaryDistanceTolerance=function(t,e){return Math.min(Zr.computeSizeBasedSnapTolerance(t),Zr.computeSizeBasedSnapTolerance(e))},Li.isValid=function(t,e,n,r){return new Li(t,e,r).isValid(n)},Ri.TOLERANCE.get=function(){return 1e-6},Object.defineProperties(Li,Ri);var Pi=function t(e){this._geomFactory=null,this._skipEmpty=!1,this._inputGeoms=null,this._geomFactory=t.extractFactory(e),this._inputGeoms=e};Pi.prototype.extractElements=function(t,e){if(null===t)return null;for(var n=0;n<t.getNumGeometries();n++){var r=t.getGeometryN(n);this._skipEmpty&&r.isEmpty()||e.add(r)}},Pi.prototype.combine=function(){for(var t=new xt,e=this._inputGeoms.iterator();e.hasNext();){var n=e.next();this.extractElements(n,t)}return 0===t.size()?null!==this._geomFactory?this._geomFactory.createGeometryCollection(null):null:this._geomFactory.buildGeometry(t)},Pi.prototype.interfaces_=function(){return[]},Pi.prototype.getClass=function(){return Pi},Pi.combine=function(){if(1===arguments.length){var t=arguments[0];return new Pi(t).combine()}if(2===arguments.length){var e=arguments[0],n=arguments[1];return new Pi(Pi.createList(e,n)).combine()}if(3===arguments.length){var r=arguments[0],i=arguments[1],o=arguments[2];return new Pi(Pi.createList(r,i,o)).combine()}},Pi.extractFactory=function(t){return t.isEmpty()?null:t.iterator().next().getFactory()},Pi.createList=function(){if(2===arguments.length){var t=arguments[0],e=arguments[1],n=new xt;return n.add(t),n.add(e),n}if(3===arguments.length){var r=arguments[0],i=arguments[1],o=arguments[2],a=new xt;return a.add(r),a.add(i),a.add(o),a}};var Ni=function(){this._inputPolys=null,this._geomFactory=null;var t=arguments[0];this._inputPolys=t,null===this._inputPolys&&(this._inputPolys=new xt)},Mi={STRTREE_NODE_CAPACITY:{configurable:!0}};Ni.prototype.reduceToGeometries=function(t){for(var e=new xt,n=t.iterator();n.hasNext();){var r=n.next(),i=null;L(r,Ot)?i=this.unionTree(r):r instanceof ct&&(i=r),e.add(i)}return e},Ni.prototype.extractByEnvelope=function(t,e,n){for(var r=new xt,i=0;i<e.getNumGeometries();i++){var o=e.getGeometryN(i);o.getEnvelopeInternal().intersects(t)?r.add(o):n.add(o)}return this._geomFactory.buildGeometry(r)},Ni.prototype.unionOptimized=function(t,e){var n=t.getEnvelopeInternal(),r=e.getEnvelopeInternal();if(!n.intersects(r))return Pi.combine(t,e);if(t.getNumGeometries()<=1&&e.getNumGeometries()<=1)return this.unionActual(t,e);var i=n.intersection(r);return this.unionUsingEnvelopeIntersection(t,e,i)},Ni.prototype.union=function(){if(null===this._inputPolys)throw new Error("union() method cannot be called twice");if(this._inputPolys.isEmpty())return null;this._geomFactory=this._inputPolys.iterator().next().getFactory();for(var t=new an(Ni.STRTREE_NODE_CAPACITY),e=this._inputPolys.iterator();e.hasNext();){var n=e.next();t.insert(n.getEnvelopeInternal(),n)}this._inputPolys=null;var r=t.itemsTree();return this.unionTree(r)},Ni.prototype.binaryUnion=function(){if(1===arguments.length){var t=arguments[0];return this.binaryUnion(t,0,t.size())}if(3===arguments.length){var e=arguments[0],n=arguments[1],r=arguments[2];if(r-n<=1){var i=Ni.getGeometry(e,n);return this.unionSafe(i,null)}if(r-n==2)return this.unionSafe(Ni.getGeometry(e,n),Ni.getGeometry(e,n+1));var o=Math.trunc((r+n)/2),a=this.binaryUnion(e,n,o),s=this.binaryUnion(e,o,r);return this.unionSafe(a,s)}},Ni.prototype.repeatedUnion=function(t){for(var e=null,n=t.iterator();n.hasNext();){var r=n.next();e=null===e?r.copy():e.union(r)}return e},Ni.prototype.unionSafe=function(t,e){return null===t&&null===e?null:null===t?e.copy():null===e?t.copy():this.unionOptimized(t,e)},Ni.prototype.unionActual=function(t,e){return Ni.restrictToPolygons(t.union(e))},Ni.prototype.unionTree=function(t){var e=this.reduceToGeometries(t);return this.binaryUnion(e)},Ni.prototype.unionUsingEnvelopeIntersection=function(t,e,n){var r=new xt,i=this.extractByEnvelope(n,t,r),o=this.extractByEnvelope(n,e,r),a=this.unionActual(i,o);return r.add(a),Pi.combine(r)},Ni.prototype.bufferUnion=function(){if(1===arguments.length){var t=arguments[0];return t.get(0).getFactory().buildGeometry(t).buffer(0)}if(2===arguments.length){var e=arguments[0],n=arguments[1];return e.getFactory().createGeometryCollection([e,n]).buffer(0)}},Ni.prototype.interfaces_=function(){return[]},Ni.prototype.getClass=function(){return Ni},Ni.restrictToPolygons=function(t){if(L(t,$t))return t;var e=xr.getPolygons(t);return 1===e.size()?e.get(0):t.getFactory().createMultiPolygon(me.toPolygonArray(e))},Ni.getGeometry=function(t,e){return e>=t.size()?null:t.get(e)},Ni.union=function(t){return new Ni(t).union()},Mi.STRTREE_NODE_CAPACITY.get=function(){return 4},Object.defineProperties(Ni,Mi);var Ai=function(){};Ai.prototype.interfaces_=function(){return[]},Ai.prototype.getClass=function(){return Ai},Ai.union=function(t,e){if(t.isEmpty()||e.isEmpty()){if(t.isEmpty()&&e.isEmpty())return Ci.createEmptyResult(Ci.UNION,t,e,t.getFactory());if(t.isEmpty())return e.copy();if(e.isEmpty())return t.copy()}return t.checkNotGeometryCollection(t),t.checkNotGeometryCollection(e),oi.overlayOp(t,e,Ci.UNION)},t.GeoJSONReader=xe,t.GeoJSONWriter=Ee,t.OverlayOp=Ci,t.UnionOp=Ai,t.BufferOp=gr,Object.defineProperty(t,"__esModule",{value:!0})},"object"==s(e)&&"undefined"!=typeof t?a(e):(i=[e],void 0===(o="function"===typeof(r=a)?r.apply(e,i):r)||(t.exports=o))},function(t,e,n){"use strict";var r=n(166),i=(n.n(r),n(372)),o=n(59),a=n(80),s=n(98);function l(t){switch(t.type){case"Polygon":return Object(i.a)(t)>1?t:null;case"MultiPolygon":var e=[];if(Object(s.b)(t,function(t){Object(i.a)(t)>1&&e.push(t.geometry.coordinates)}),e.length)return{type:"MultiPolygon",coordinates:e}}}e.a=function(t,e){var n=Object(a.c)(t),i=Object(a.c)(e),s=t.properties||{};if(n=l(n),i=l(i),!n)return null;if(!i)return Object(o.a)(n,s);var u=new r.GeoJSONReader,c=u.read(n),h=u.read(i),p=r.OverlayOp.difference(c,h);if(p.isEmpty())return null;var f=(new r.GeoJSONWriter).write(p);return Object(o.a)(f,s)}},function(t,e,n){var r,i,o,a;function s(t){"@babel/helpers - typeof";return(s="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}a=function(t){"use strict";if(!t.ui||!t.ui.fancytree){var e,n,r=null,i=new RegExp(/\.|\//),o=/[&<>"'/]/g,a=/[<>"'/]/g,l={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"},u={16:!0,17:!0,18:!0},c={8:"backspace",9:"tab",10:"return",13:"return",19:"pause",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"insert",46:"del",59:";",61:"=",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9",106:"*",107:"+",109:"-",110:".",111:"/",112:"f1",113:"f2",114:"f3",115:"f4",116:"f5",117:"f6",118:"f7",119:"f8",120:"f9",121:"f10",122:"f11",123:"f12",144:"numlock",145:"scroll",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},h={16:"shift",17:"ctrl",18:"alt",91:"meta",93:"meta"},p={0:"",1:"left",2:"middle",3:"right"},f="active expanded focus folder lazy radiogroup selected unselectable unselectableIgnore".split(" "),d={},g="columns types".split(" "),y="checkbox expanded extraClasses folder icon iconTooltip key lazy partsel radiogroup refKey selected statusNodeType title tooltip type unselectable unselectableIgnore unselectableStatus".split(" "),m={},v={},_={active:!0,children:!0,data:!0,focus:!0};for(e=0;e<f.length;e++)d[f[e]]=!0;for(e=0;e<y.length;e++)n=y[e],m[n]=!0,n!==n.toLowerCase()&&(v[n.toLowerCase()]=n);return b(t.ui,"Fancytree requires jQuery UI (http://jqueryui.com)"),Date.now||(Date.now=function(){return(new Date).getTime()}),R.prototype={_findDirectChild:function(t){var e,n,r=this.children;if(r)if("string"===typeof t){for(e=0,n=r.length;e<n;e++)if(r[e].key===t)return r[e]}else{if("number"===typeof t)return this.children[t];if(t.parent===this)return t}return null},_setChildren:function(t){b(t&&(!this.children||0===this.children.length),"only init supported"),this.children=[];for(var e=0,n=t.length;e<n;e++)this.children.push(new R(this,t[e]));this.tree._callHook("treeStructureChanged",this.tree,"setChildren")},addChildren:function(e,n){var r,i,o,a,s=this.getFirstChild(),l=this.getLastChild(),u=[];for(t.isPlainObject(e)&&(e=[e]),this.children||(this.children=[]),r=0,i=e.length;r<i;r++)u.push(new R(this,e[r]));if(a=u[0],null==n?this.children=this.children.concat(u):(n=this._findDirectChild(n),b((o=t.inArray(n,this.children))>=0,"insertBefore must be an existing child"),this.children.splice.apply(this.children,[o,0].concat(u))),s&&!n){for(r=0,i=u.length;r<i;r++)u[r].render();s!==this.getFirstChild()&&s.renderStatus(),l!==this.getLastChild()&&l.renderStatus()}else(!this.parent||this.parent.ul||this.tr)&&this.render();return 3===this.tree.options.selectMode&&this.fixSelection3FromEndNodes(),this.triggerModifyChild("add",1===u.length?u[0]:null),a},addClass:function(t){return this.toggleClass(t,!0)},addNode:function(t,e){switch(void 0!==e&&"over"!==e||(e="child"),e){case"after":return this.getParent().addChildren(t,this.getNextSibling());case"before":return this.getParent().addChildren(t,this);case"firstChild":var n=this.children?this.children[0]:null;return this.addChildren(t,n);case"child":case"over":return this.addChildren(t)}b(!1,"Invalid mode: "+e)},addPagingNode:function(e,n){var r,i;if(n=n||"child",!1!==e)return e=t.extend({title:this.tree.options.strings.moreData,statusNodeType:"paging",icon:!1},e),this.partload=!0,this.addNode(e,n);for(r=this.children.length-1;r>=0;r--)"paging"===(i=this.children[r]).statusNodeType&&this.removeChild(i);this.partload=!1},appendSibling:function(t){return this.addNode(t,"after")},applyCommand:function(t,e){return this.tree.applyCommand(t,this,e)},applyPatch:function(e){if(null===e)return this.remove(),S(this);var n,r,i={children:!0,expanded:!0,parent:!0};for(n in e)e.hasOwnProperty(n)&&(r=e[n],i[n]||t.isFunction(r)||(m[n]?this[n]=r:this.data[n]=r));return e.hasOwnProperty("children")&&(this.removeChildren(),e.children&&this._setChildren(e.children)),this.isVisible()&&(this.renderTitle(),this.renderStatus()),e.hasOwnProperty("expanded")?this.setExpanded(e.expanded):S(this)},collapseSiblings:function(){return this.tree._callHook("nodeCollapseSiblings",this)},copyTo:function(t,e,n){return t.addNode(this.toDict(!0,n),e)},countChildren:function(t){var e,n,r,i=this.children;if(!i)return 0;if(r=i.length,!1!==t)for(e=0,n=r;e<n;e++)r+=i[e].countChildren();return r},debug:function(t){this.tree.options.debugLevel>=4&&(Array.prototype.unshift.call(arguments,this.toString()),w("log",arguments))},discard:function(){return this.warn("FancytreeNode.discard() is deprecated since 2014-02-16. Use .resetLazy() instead."),this.resetLazy()},discardMarkup:function(t){var e=t?"nodeRemoveMarkup":"nodeRemoveChildMarkup";this.tree._callHook(e,this)},error:function(t){this.tree.options.debugLevel>=1&&(Array.prototype.unshift.call(arguments,this.toString()),w("error",arguments))},findAll:function(e){e=t.isFunction(e)?e:L(e);var n=[];return this.visit(function(t){e(t)&&n.push(t)}),n},findFirst:function(e){e=t.isFunction(e)?e:L(e);var n=null;return this.visit(function(t){if(e(t))return n=t,!1}),n},findRelatedNode:function(t,e){return this.tree.findRelatedNode(this,t,e)},_changeSelectStatusAttrs:function(t){var e=!1,n=this.tree.options,i=r.evalOption("unselectable",this,this,n,!1),o=r.evalOption("unselectableStatus",this,this,n,void 0);switch(i&&null!=o&&(t=o),t){case!1:e=this.selected||this.partsel,this.selected=!1,this.partsel=!1;break;case!0:e=!this.selected||!this.partsel,this.selected=!0,this.partsel=!0;break;case void 0:e=this.selected||!this.partsel,this.selected=!1,this.partsel=!0;break;default:b(!1,"invalid state: "+t)}return e&&this.renderStatus(),e},fixSelection3AfterClick:function(t){var e=this.isSelected();this.visit(function(t){if(t._changeSelectStatusAttrs(e),t.radiogroup)return"skip"}),this.fixSelection3FromEndNodes(t)},fixSelection3FromEndNodes:function(t){var e=this.tree.options;b(3===e.selectMode,"expected selectMode 3"),function t(n){var i,o,a,s,l,u,c,h,p=n.children;if(p&&p.length){for(u=!0,c=!1,i=0,o=p.length;i<o;i++)s=t(a=p[i]),r.evalOption("unselectableIgnore",a,a,e,!1)||(!1!==s&&(c=!0),!0!==s&&(u=!1));l=!!u||!!c&&void 0}else l=null==(h=r.evalOption("unselectableStatus",n,n,e,void 0))?!!n.selected:!!h;return n.partsel&&!n.selected&&n.lazy&&null==n.children&&(l=void 0),n._changeSelectStatusAttrs(l),l}(this),this.visitParents(function(t){var n,i,o,a,s,l=t.children,u=!0,c=!1;for(n=0,i=l.length;n<i;n++)o=l[n],r.evalOption("unselectableIgnore",o,o,e,!1)||(((a=null==(s=r.evalOption("unselectableStatus",o,o,e,void 0))?!!o.selected:!!s)||o.partsel)&&(c=!0),a||(u=!1));a=!!u||!!c&&void 0,t._changeSelectStatusAttrs(a)})},fromDict:function(e){for(var n in e)m[n]?this[n]=e[n]:"data"===n?t.extend(this.data,e.data):t.isFunction(e[n])||_[n]||(this.data[n]=e[n]);e.children&&(this.removeChildren(),this.addChildren(e.children)),this.renderTitle()},getChildren:function(){if(void 0!==this.hasChildren())return this.children},getFirstChild:function(){return this.children?this.children[0]:null},getIndex:function(){return t.inArray(this,this.parent.children)},getIndexHier:function(e,n){e=e||".";var r,i=[];return t.each(this.getParentList(!1,!0),function(t,e){r=""+(e.getIndex()+1),n&&(r=("0000000"+r).substr(-n)),i.push(r)}),i.join(e)},getKeyPath:function(t){var e=this.tree.options.keyPathSeparator;return e+this.getPath(!t,"key",e)},getLastChild:function(){return this.children?this.children[this.children.length-1]:null},getLevel:function(){for(var t=0,e=this.parent;e;)t++,e=e.parent;return t},getNextSibling:function(){if(this.parent){var t,e,n=this.parent.children;for(t=0,e=n.length-1;t<e;t++)if(n[t]===this)return n[t+1]}return null},getParent:function(){return this.parent},getParentList:function(t,e){for(var n=[],r=e?this:this.parent;r;)(t||r.parent)&&n.unshift(r),r=r.parent;return n},getPath:function(e,n,r){e=!1!==e,n=n||"title",r=r||"/";var i,o=[],a=t.isFunction(n);return this.visitParents(function(t){t.parent&&(i=a?n(t):t[n],o.unshift(i))},e),o.join(r)},getPrevSibling:function(){if(this.parent){var t,e,n=this.parent.children;for(t=1,e=n.length;t<e;t++)if(n[t]===this)return n[t-1]}return null},getSelectedNodes:function(t){var e=[];return this.visit(function(n){if(n.selected&&(e.push(n),!0===t))return"skip"}),e},hasChildren:function(){if(this.lazy){if(null==this.children)return;if(0===this.children.length)return!1;if(1===this.children.length&&this.children[0].isStatusNode())return;return!0}return!(!this.children||!this.children.length)},hasClass:function(t){return(" "+(this.extraClasses||"")+" ").indexOf(" "+t+" ")>=0},hasFocus:function(){return this.tree.hasFocus()&&this.tree.focusNode===this},info:function(t){this.tree.options.debugLevel>=3&&(Array.prototype.unshift.call(arguments,this.toString()),w("info",arguments))},isActive:function(){return this.tree.activeNode===this},isBelowOf:function(t){return this.getIndexHier(".",5)>t.getIndexHier(".",5)},isChildOf:function(t){return this.parent&&this.parent===t},isDescendantOf:function(e){if(!e||e.tree!==this.tree)return!1;for(var n=this.parent;n;){if(n===e)return!0;n===n.parent&&t.error("Recursive parent link: "+n),n=n.parent}return!1},isExpanded:function(){return!!this.expanded},isFirstSibling:function(){var t=this.parent;return!t||t.children[0]===this},isFolder:function(){return!!this.folder},isLastSibling:function(){var t=this.parent;return!t||t.children[t.children.length-1]===this},isLazy:function(){return!!this.lazy},isLoaded:function(){return!this.lazy||void 0!==this.hasChildren()},isLoading:function(){return!!this._isLoading},isRoot:function(){return this.isRootNode()},isPartsel:function(){return!this.selected&&!!this.partsel},isPartload:function(){return!!this.partload},isRootNode:function(){return this.tree.rootNode===this},isSelected:function(){return!!this.selected},isStatusNode:function(){return!!this.statusNodeType},isPagingNode:function(){return"paging"===this.statusNodeType},isTopLevel:function(){return this.tree.rootNode===this.parent},isUndefined:function(){return void 0===this.hasChildren()},isVisible:function(){var t,e,n=this.tree.enableFilter,r=this.getParentList(!1,!1);if(n&&!this.match&&!this.subMatchCount)return!1;for(t=0,e=r.length;t<e;t++)if(!r[t].expanded)return!1;return!0},lazyLoad:function(e){t.error("FancytreeNode.lazyLoad() is deprecated since 2014-02-16. Use .load() instead.")},load:function(t){var e,n,r=this,i=this.isExpanded();return b(this.isLazy(),"load() requires a lazy node"),t||this.isUndefined()?(this.isLoaded()&&this.resetLazy(),!1===(n=this.tree._triggerNodeEvent("lazyLoad",this))?S(this):(b("boolean"!==typeof n,"lazyLoad event must return source in data.result"),e=this.tree._callHook("nodeLoadChildren",this,n),i?(this.expanded=!0,e.always(function(){r.render()})):e.always(function(){r.renderStatus()}),e)):S(this)},makeVisible:function(e){var n,r=this,i=[],o=new t.Deferred,a=this.getParentList(!1,!1),s=a.length,l=!(e&&!0===e.noAnimation),u=!(e&&!1===e.scrollIntoView);for(n=s-1;n>=0;n--)i.push(a[n].setExpanded(!0,e));return t.when.apply(t,i).done(function(){u?r.scrollIntoView(l).done(function(){o.resolve()}):o.resolve()}),o.promise()},moveTo:function(e,n,r){void 0===n||"over"===n?n="child":"firstChild"===n&&(e.children&&e.children.length?(n="before",e=e.children[0]):n="child");var i,o=this.tree,a=this.parent,s="child"===n?e:e.parent;if(this!==e){if(this.parent?s.isDescendantOf(this)&&t.error("Cannot move a node to its own descendant"):t.error("Cannot move system root"),s!==a&&a.triggerModifyChild("remove",this),1===this.parent.children.length){if(this.parent===s)return;this.parent.children=this.parent.lazy?[]:null,this.parent.expanded=!1}else b((i=t.inArray(this,this.parent.children))>=0,"invalid source parent"),this.parent.children.splice(i,1);if(this.parent=s,s.hasChildren())switch(n){case"child":s.children.push(this);break;case"before":b((i=t.inArray(e,s.children))>=0,"invalid target parent"),s.children.splice(i,0,this);break;case"after":b((i=t.inArray(e,s.children))>=0,"invalid target parent"),s.children.splice(i+1,0,this);break;default:t.error("Invalid mode "+n)}else s.children=[this];r&&e.visit(r,!0),s===a?s.triggerModifyChild("move",this):s.triggerModifyChild("add",this),o!==e.tree&&(this.warn("Cross-tree moveTo is experimental!"),this.visit(function(t){t.tree=e.tree},!0)),o._callHook("treeStructureChanged",o,"moveTo"),a.isDescendantOf(s)||a.render(),s.isDescendantOf(a)||s===a||s.render()}},navigate:function(e,n){var r,i=t.ui.keyCode;switch(e){case"left":case i.LEFT:if(this.expanded)return this.setExpanded(!1);break;case"right":case i.RIGHT:if(!this.expanded&&(this.children||this.lazy))return this.setExpanded()}if(r=this.findRelatedNode(e)){try{r.makeVisible({scrollIntoView:!1})}catch(t){}return!1===n?(r.setFocus(),S()):r.setActive()}return this.warn("Could not find related node '"+e+"'."),S()},remove:function(){return this.parent.removeChild(this)},removeChild:function(t){return this.tree._callHook("nodeRemoveChild",this,t)},removeChildren:function(){return this.tree._callHook("nodeRemoveChildren",this)},removeClass:function(t){return this.toggleClass(t,!1)},render:function(t,e){return this.tree._callHook("nodeRender",this,t,e)},renderTitle:function(){return this.tree._callHook("nodeRenderTitle",this)},renderStatus:function(){return this.tree._callHook("nodeRenderStatus",this)},replaceWith:function(n){var r,i=this.parent,o=t.inArray(this,i.children),a=this;return b(this.isPagingNode(),"replaceWith() currently requires a paging status node"),(r=this.tree._callHook("nodeLoadChildren",this,n)).done(function(t){var n=a.children;for(e=0;e<n.length;e++)n[e].parent=i;i.children.splice.apply(i.children,[o+1,0].concat(n)),a.children=null,a.remove(),i.render()}).fail(function(){a.setExpanded()}),r},resetLazy:function(){this.removeChildren(),this.expanded=!1,this.lazy=!0,this.children=void 0,this.renderStatus()},scheduleAction:function(e,n){this.tree.timer&&(clearTimeout(this.tree.timer),this.tree.debug("clearTimeout(%o)",this.tree.timer)),this.tree.timer=null;var r=this;switch(e){case"cancel":break;case"expand":this.tree.timer=setTimeout(function(){r.tree.debug("setTimeout: trigger expand"),r.setExpanded(!0)},n);break;case"activate":this.tree.timer=setTimeout(function(){r.tree.debug("setTimeout: trigger activate"),r.setActive(!0)},n);break;default:t.error("Invalid mode "+e)}},scrollIntoView:function(e,n){if(void 0!==n&&((r=n).tree&&void 0!==r.statusNodeType))throw Error("scrollIntoView() with 'topNode' option is deprecated since 2014-05-08. Use 'options.topNode' instead.");var r,i=t.extend({effects:!0===e?{duration:200,queue:!1}:e,scrollOfs:this.tree.options.scrollOfs,scrollParent:this.tree.options.scrollParent,topNode:null},n),o=i.scrollParent,a=this.tree.$container,s=a.css("overflow-y");o?o.jquery||(o=t(o)):o=this.tree.tbody?a.scrollParent():"scroll"===s||"auto"===s?a:a.scrollParent(),o[0]!==document&&o[0]!==document.body||(this.debug("scrollIntoView(): normalizing scrollParent to 'window':",o[0]),o=t(window));var l,u,c,h=new t.Deferred,p=this,f=t(this.span).height(),d=i.scrollOfs.top||0,g=i.scrollOfs.bottom||0,y=o.height(),m=o.scrollTop(),v=o,_=o[0]===window,w=i.topNode||null,O=null;return this.isRootNode()||!this.isVisible()?(this.info("scrollIntoView(): node is invisible."),S()):(_?(u=t(this.span).offset().top,l=w&&w.span?t(w.span).offset().top:0,v=t("html,body")):(b(o[0]!==document&&o[0]!==document.body,"scrollParent should be a simple element or `window`, not document or body."),c=o.offset().top,u=t(this.span).offset().top-c+m,l=w?t(w.span).offset().top-c+m:0,y-=Math.max(0,o.innerHeight()-o[0].clientHeight)),u<m+d?O=u-d:u+f>m+y-g&&(O=u+f-y+g,w&&(b(w.isRootNode()||w.isVisible(),"topNode must be visible"),l<O&&(O=l-d))),null===O?h.resolveWith(this):i.effects?(i.effects.complete=function(){h.resolveWith(p)},v.stop(!0).animate({scrollTop:O},i.effects)):(v[0].scrollTop=O,h.resolveWith(this)),h.promise())},setActive:function(t,e){return this.tree._callHook("nodeSetActive",this,t,e)},setExpanded:function(t,e){return this.tree._callHook("nodeSetExpanded",this,t,e)},setFocus:function(t){return this.tree._callHook("nodeSetFocus",this,t)},setSelected:function(t,e){return this.tree._callHook("nodeSetSelected",this,t,e)},setStatus:function(t,e,n){return this.tree._callHook("nodeSetStatus",this,t,e,n)},setTitle:function(t){this.title=t,this.renderTitle(),this.triggerModify("rename")},sortChildren:function(t,e){var n,r,i=this.children;if(i){if(t=t||function(t,e){var n=t.title.toLowerCase(),r=e.title.toLowerCase();return n===r?0:n>r?1:-1},i.sort(t),e)for(n=0,r=i.length;n<r;n++)i[n].children&&i[n].sortChildren(t,"$norender$");"$norender$"!==e&&this.render(),this.triggerModifyChild("sort")}},toDict:function(e,n){var r,i,o,a,s={},l=this;if(t.each(y,function(t,e){(l[e]||!1===l[e])&&(s[e]=l[e])}),t.isEmptyObject(this.data)||(s.data=t.extend({},this.data),t.isEmptyObject(s.data)&&delete s.data),n){if(!1===(a=n(s,l)))return!1;"skip"===a&&(e=!1)}if(e&&t.isArray(this.children))for(s.children=[],r=0,i=this.children.length;r<i;r++)(o=this.children[r]).isStatusNode()||!1!==(a=o.toDict(!0,n))&&s.children.push(a);return s},toggleClass:function(e,n){var r,i,o=e.match(/\S+/g)||[],a=0,s=!1,l=this[this.tree.statusClassPropName],u=" "+(this.extraClasses||"")+" ";for(l&&t(l).toggleClass(e,n);r=o[a++];)if(i=u.indexOf(" "+r+" ")>=0,n=void 0===n?!i:!!n)i||(u+=r+" ",s=!0);else for(;u.indexOf(" "+r+" ")>-1;)u=u.replace(" "+r+" "," ");return this.extraClasses=t.trim(u),s},toggleExpanded:function(){return this.tree._callHook("nodeToggleExpanded",this)},toggleSelected:function(){return this.tree._callHook("nodeToggleSelected",this)},toString:function(){return"FancytreeNode@"+this.key+"[title='"+this.title+"']"},triggerModifyChild:function(e,n,r){var i,o=this.tree.options.modifyChild;o&&(n&&n.parent!==this&&t.error("childNode "+n+" is not a child of "+this),i={node:this,tree:this.tree,operation:e,childNode:n||null},r&&t.extend(i,r),o({type:"modifyChild"},i))},triggerModify:function(t,e){this.parent.triggerModifyChild(t,this,e)},visit:function(t,e){var n,r,i=!0,o=this.children;if(!0===e&&(!1===(i=t(this))||"skip"===i))return i;if(o)for(n=0,r=o.length;n<r&&!1!==(i=o[n].visit(t,!0));n++);return i},visitAndLoad:function(e,n,r){var i,o,a,s=this;return!e||!0!==n||!1!==(o=e(s))&&"skip"!==o?s.children||s.lazy?(i=new t.Deferred,a=[],s.load().done(function(){for(var n=0,r=s.children.length;n<r;n++){if(!1===(o=s.children[n].visitAndLoad(e,!0,!0))){i.reject();break}"skip"!==o&&a.push(o)}t.when.apply(this,a).then(function(){i.resolve()})}),i.promise()):S():r?o:S()},visitParents:function(t,e){if(e&&!1===t(this))return!1;for(var n=this.parent;n;){if(!1===t(n))return!1;n=n.parent}return!0},visitSiblings:function(t,e){var n,r,i,o=this.parent.children;for(n=0,r=o.length;n<r;n++)if(i=o[n],(e||i!==this)&&!1===t(i))return!1;return!0},warn:function(t){this.tree.options.debugLevel>=2&&(Array.prototype.unshift.call(arguments,this.toString()),w("warn",arguments))}},P.prototype={_makeHookContext:function(e,n,r){var i,o;return void 0!==e.node?(n&&e.originalEvent!==n&&t.error("invalid args"),i=e):e.tree?i={node:e,tree:o=e.tree,widget:o.widget,options:o.widget.options,originalEvent:n,typeInfo:o.types[e.type]||{}}:e.widget?i={node:null,tree:e,widget:e.widget,options:e.widget.options,originalEvent:n}:t.error("invalid args"),r&&t.extend(i,r),i},_callHook:function(e,n,r){var i=this._makeHookContext(n),o=this[e],a=Array.prototype.slice.call(arguments,2);return t.isFunction(o)||t.error("_callHook('"+e+"') is not a function"),a.unshift(i),o.apply(this,a)},_setExpiringValue:function(t,e,n){this._tempCache[t]={value:e,expire:Date.now()+(+n||50)}},_getExpiringValue:function(t){var e=this._tempCache[t];return e&&e.expire>Date.now()?e.value:(delete this._tempCache[t],null)},_usesExtension:function(e){return t.inArray(e,this.options.extensions)>=0},_requireExtension:function(e,n,r,i){null!=r&&(r=!!r);var o=this._local.name,a=this.options.extensions,s=t.inArray(e,a)<t.inArray(o,a),l=n&&null==this.ext[e],u=!l&&null!=r&&r!==s;return b(o&&o!==e,"invalid or same name '"+o+"' (require yourself?)"),!l&&!u||(i||(l||n?(i="'"+o+"' extension requires '"+e+"'",u&&(i+=" to be registered "+(r?"before":"after")+" itself")):i="If used together, `"+e+"` must be registered "+(r?"before":"after")+" `"+o+"`"),t.error(i),!1)},activateKey:function(t,e){var n=this.getNodeByKey(t);return n?n.setActive(!0,e):this.activeNode&&this.activeNode.setActive(!1,e),n},addPagingNode:function(t,e){return this.rootNode.addPagingNode(t,e)},applyCommand:function(e,n,r){var i;switch(n=n||this.getActiveNode(),e){case"moveUp":(i=n.getPrevSibling())&&(n.moveTo(i,"before"),n.setActive());break;case"moveDown":(i=n.getNextSibling())&&(n.moveTo(i,"after"),n.setActive());break;case"indent":(i=n.getPrevSibling())&&(n.moveTo(i,"child"),i.setExpanded(),n.setActive());break;case"outdent":n.isTopLevel()||(n.moveTo(n.getParent(),"after"),n.setActive());break;case"remove":i=n.getPrevSibling()||n.getParent(),n.remove(),i&&i.setActive();break;case"addChild":n.editCreateNode("child","");break;case"addSibling":n.editCreateNode("after","");break;case"rename":n.editStart();break;case"down":case"first":case"last":case"left":case"parent":case"right":case"up":return n.navigate(e);default:t.error("Unhandled command: '"+e+"'")}},applyPatch:function(e){var n,r,i,o,a,s,l=e.length,u=[];for(r=0;r<l;r++)b(2===(i=e[r]).length,"patchList must be an array of length-2-arrays"),o=i[0],a=i[1],(s=null===o?this.rootNode:this.getNodeByKey(o))?(n=new t.Deferred,u.push(n),s.applyPatch(a).always(T(n,s))):this.warn("could not find node with key '"+o+"'");return t.when.apply(t,u).promise()},clear:function(t){this._callHook("treeClear",this)},count:function(){return this.rootNode.countChildren()},debug:function(t){this.options.debugLevel>=4&&(Array.prototype.unshift.call(arguments,this.toString()),w("log",arguments))},destroy:function(){this.widget.destroy()},enable:function(t){!1===t?this.widget.disable():this.widget.enable()},enableUpdate:function(t){return t=!1!==t,!!this._enableUpdate===!!t?t:(this._enableUpdate=t,t?(this.debug("enableUpdate(true): redraw "),this._callHook("treeStructureChanged",this,"enableUpdate"),this.render()):this.debug("enableUpdate(false)..."),!t)},error:function(t){this.options.debugLevel>=1&&(Array.prototype.unshift.call(arguments,this.toString()),w("error",arguments))},expandAll:function(t,e){var n=this.enableUpdate(!1);t=!1!==t,this.visit(function(n){!1!==n.hasChildren()&&n.isExpanded()!==t&&n.setExpanded(t,e)}),this.enableUpdate(n)},findAll:function(t){return this.rootNode.findAll(t)},findFirst:function(t){return this.rootNode.findFirst(t)},findNextNode:function(t,e){var n,r=null,i=this.getFirstChild();function o(n){if(t(n)&&(r=n),r||n===e)return!1}return t="string"===typeof t?(n=new RegExp("^"+t,"i"),function(t){return n.test(t.title)}):t,e=e||i,this.visitRows(o,{start:e,includeSelf:!1}),r||e===i||this.visitRows(o,{start:i,includeSelf:!0}),r},findRelatedNode:function(e,n,r){var i=null,o=t.ui.keyCode;switch(n){case"parent":case o.BACKSPACE:e.parent&&e.parent.parent&&(i=e.parent);break;case"first":case o.HOME:this.visit(function(t){if(t.isVisible())return i=t,!1});break;case"last":case o.END:this.visit(function(t){t.isVisible()&&(i=t)});break;case"left":case o.LEFT:e.expanded?e.setExpanded(!1):e.parent&&e.parent.parent&&(i=e.parent);break;case"right":case o.RIGHT:e.expanded||!e.children&&!e.lazy?e.children&&e.children.length&&(i=e.children[0]):(e.setExpanded(),i=e);break;case"up":case o.UP:this.visitRows(function(t){return i=t,!1},{start:e,reverse:!0,includeSelf:!1});break;case"down":case o.DOWN:this.visitRows(function(t){return i=t,!1},{start:e,includeSelf:!1});break;default:this.tree.warn("Unknown relation '"+n+"'.")}return i},generateFormElements:function(e,n,r){r=r||{};var i,o="string"===typeof e?e:"ft_"+this._id+"[]",a="string"===typeof n?n:"ft_"+this._id+"_active",s="fancytree_result_"+this._id,l=t("#"+s),u=3===this.options.selectMode&&!1!==r.stopOnParents;function c(e){l.append(t("<input>",{type:"checkbox",name:o,value:e.key,checked:!0}))}l.length?l.empty():l=t("<div>",{id:s}).hide().insertAfter(this.$container),!1!==n&&this.activeNode&&l.append(t("<input>",{type:"radio",name:a,value:this.activeNode.key,checked:!0})),r.filter?this.visit(function(t){var e=r.filter(t);if("skip"===e)return e;!1!==e&&c(t)}):!1!==e&&(i=this.getSelectedNodes(u),t.each(i,function(t,e){c(e)}))},getActiveNode:function(){return this.activeNode},getFirstChild:function(){return this.rootNode.getFirstChild()},getFocusNode:function(){return this.focusNode},getOption:function(t){return this.widget.option(t)},getNodeByKey:function(t,e){var n,r;return!e&&(n=document.getElementById(this.options.idPrefix+t))?n.ftnode?n.ftnode:null:(e=e||this.rootNode,r=null,t=""+t,e.visit(function(e){if(e.key===t)return r=e,!1},!0),r)},getRootNode:function(){return this.rootNode},getSelectedNodes:function(t){return this.rootNode.getSelectedNodes(t)},hasFocus:function(){return!!this._hasFocus},info:function(t){this.options.debugLevel>=3&&(Array.prototype.unshift.call(arguments,this.toString()),w("info",arguments))},isLoading:function(){var t=!1;return this.rootNode.visit(function(e){if(e._isLoading||e._requestId)return t=!0,!1},!0),t},loadKeyPath:function(e,n){var r,i,o,a=this,s=new t.Deferred,l=this.getRootNode(),u=this.options.keyPathSeparator,c=[],h=t.extend({},n);for("function"===typeof n?r=n:n&&n.callback&&(r=n.callback),h.callback=function(t,e,n){r&&r.call(t,e,n),s.notifyWith(t,[{node:e,status:n}])},null==h.matchKey&&(h.matchKey=function(t,e){return t.key===e}),t.isArray(e)||(e=[e]),i=0;i<e.length;i++)(o=e[i]).charAt(0)===u&&(o=o.substr(1)),c.push(o.split(u));return setTimeout(function(){a._loadKeyPathImpl(s,h,l,c).done(function(){s.resolve()})},0),s.promise()},_loadKeyPathImpl:function(e,n,r,i){var o,a,s,l,u,c,h,p,f,d,g=this;function y(t,e){var r,i,o=t.children;if(o)for(r=0,i=o.length;r<i;r++)if(n.matchKey(o[r],e))return o[r];return null}for(h={},a=0;a<i.length;a++)for(f=i[a],p=r;f.length;){if(s=f.shift(),!(l=y(p,s))){this.warn("loadKeyPath: key not found: "+s+" (parent: "+p+")"),n.callback(this,s,"error");break}if(0===f.length){n.callback(this,l,"ok");break}if(l.lazy&&void 0===l.hasChildren()){n.callback(this,l,"loaded"),h[s=l.key]?h[s].pathSegList.push(f):h[s]={parent:l,pathSegList:[f]};break}n.callback(this,l,"loaded"),p=l}function m(t,e,r){n.callback(g,e,"loading"),e.load().done(function(){g._loadKeyPathImpl.call(g,t,n,e,r).always(T(t,g))}).fail(function(r){g.warn("loadKeyPath: error loading lazy "+e),n.callback(g,l,"error"),t.rejectWith(g)})}for(u in o=[],h)h.hasOwnProperty(u)&&(c=h[u],d=new t.Deferred,o.push(d),m(d,c.parent,c.pathSegList));return t.when.apply(t,o).promise()},reactivate:function(t){var e,n=this.activeNode;return n?(this.activeNode=null,e=n.setActive(!0,{noFocus:!0}),t&&n.setFocus(),e):S()},reload:function(t){return this._callHook("treeClear",this),this._callHook("treeLoad",this,t)},render:function(t,e){return this.rootNode.render(t,e)},selectAll:function(t){this.visit(function(e){e.setSelected(t)})},setFocus:function(t){return this._callHook("treeSetFocus",this,t)},setOption:function(t,e){return this.widget.option(t,e)},debugTime:function(t){this.options.debugLevel>=4&&window.console.time(this+" - "+t)},debugTimeEnd:function(t){this.options.debugLevel>=4&&window.console.timeEnd(this+" - "+t)},toDict:function(t,e){var n=this.rootNode.toDict(!0,e);return t?n:n.children},toString:function(){return"Fancytree@"+this._id},_triggerNodeEvent:function(t,e,n,r){var i=this._makeHookContext(e,n,r),o=this.widget._trigger(t,n,i);return!1!==o&&void 0!==i.result?i.result:o},_triggerTreeEvent:function(t,e,n){var r=this._makeHookContext(this,e,n),i=this.widget._trigger(t,e,r);return!1!==i&&void 0!==r.result?r.result:i},visit:function(t){return this.rootNode.visit(t,!1)},visitRows:function(t,e){if(!this.rootNode.hasChildren())return!1;if(e&&e.reverse)return delete e.reverse,this._visitRowsUp(t,e);var n,r,i,o,a=0,s=!1===(e=e||{}).includeSelf,l=!!e.includeHidden,u=!l&&this.enableFilter,c=e.start||this.rootNode.children[0];for(i=c.parent;i;){for(b((r=(o=i.children).indexOf(c)+a)>=0,"Could not find "+c+" in parent's children: "+i),n=r;n<o.length;n++)if(c=o[n],!u||c.match||c.subMatchCount){if(!s&&!1===t(c))return!1;if(s=!1,c.children&&c.children.length&&(l||c.expanded)&&!1===c.visit(function(e){return!u||e.match||e.subMatchCount?!1!==t(e)&&(l||!e.children||e.expanded?void 0:"skip"):"skip"},!1))return!1}c=i,i=i.parent,a=1}return!0},_visitRowsUp:function(t,e){for(var n,r,i=!!e.includeHidden,o=e.start||this.rootNode.children[0];;){if((n=(r=o.parent).children)[0]===o){if(!(o=r).parent)break;n=r.children}else for(o=n[n.indexOf(o)-1];(i||o.expanded)&&o.children&&o.children.length;)r=o,o=(n=o.children)[n.length-1];if((i||o.isVisible())&&!1===t(o))return!1}},warn:function(t){this.options.debugLevel>=2&&(Array.prototype.unshift.call(arguments,this.toString()),w("warn",arguments))}},t.extend(P.prototype,{nodeClick:function(t){var e,n,r=t.targetType,i=t.node;if("expander"===r){if(i.isLoading())return void i.debug("Got 2nd click while loading: ignored");this._callHook("nodeToggleExpanded",t)}else if("checkbox"===r)this._callHook("nodeToggleSelected",t),t.options.focusOnSelect&&this._callHook("nodeSetFocus",t,!0);else{if(n=!1,e=!0,i.folder)switch(t.options.clickFolderMode){case 2:n=!0,e=!1;break;case 3:e=!0,n=!0}e&&(this.nodeSetFocus(t),this._callHook("nodeSetActive",t,!0)),n&&this._callHook("nodeToggleExpanded",t)}},nodeCollapseSiblings:function(t,e){var n,r,i,o=t.node;if(o.parent)for(r=0,i=(n=o.parent.children).length;r<i;r++)n[r]!==o&&n[r].expanded&&this._callHook("nodeSetExpanded",n[r],!1,e)},nodeDblclick:function(t){"title"===t.targetType&&4===t.options.clickFolderMode&&this._callHook("nodeToggleExpanded",t),"title"===t.targetType&&t.originalEvent.preventDefault()},nodeKeydown:function(e){var n,i,o,a=e.originalEvent,s=e.node,l=e.tree,u=e.options,p=a.which,f=a.key||String.fromCharCode(p),d=!!(a.altKey||a.ctrlKey||a.metaKey),g=!h[p]&&!c[p]&&!d,y=t(a.target),m=!0,v=!(a.ctrlKey||!u.autoActivate);if(s||(o=this.getActiveNode()||this.getFirstChild())&&(o.setFocus(),(s=e.node=this.focusNode).debug("Keydown force focus on active node")),u.quicksearch&&g&&!y.is(":input:enabled"))return(i=Date.now())-l.lastQuicksearchTime>500&&(l.lastQuicksearchTerm=""),l.lastQuicksearchTime=i,l.lastQuicksearchTerm+=f,(n=l.findNextNode(l.lastQuicksearchTerm,l.getActiveNode()))&&n.setActive(),void a.preventDefault();switch(r.eventToString(a)){case"+":case"=":l.nodeSetExpanded(e,!0);break;case"-":l.nodeSetExpanded(e,!1);break;case"space":s.isPagingNode()?l._triggerNodeEvent("clickPaging",e,a):r.evalOption("checkbox",s,s,u,!1)?l.nodeToggleSelected(e):l.nodeSetActive(e,!0);break;case"return":l.nodeSetActive(e,!0);break;case"home":case"end":case"backspace":case"left":case"right":case"up":case"down":s.navigate(a.which,v);break;default:m=!1}m&&a.preventDefault()},nodeLoadChildren:function(e,n){var r,i,o,a=null,s=!0,l=e.tree,u=e.node,c=u.parent,h="nodeLoadChildren",p=Date.now();return t.isFunction(n)&&(n=n.call(l,{type:"source"},e),b(!t.isFunction(n),"source callback must not return another function")),t.isFunction(n.then)?a=n:n.url?(r=t.extend({},e.options.ajax,n)).debugDelay?(i=r.debugDelay,delete r.debugDelay,t.isArray(i)&&(i=i[0]+Math.random()*(i[1]-i[0])),u.warn("nodeLoadChildren waiting debugDelay "+Math.round(i)+" ms ..."),a=t.Deferred(function(e){setTimeout(function(){t.ajax(r).done(function(){e.resolveWith(this,arguments)}).fail(function(){e.rejectWith(this,arguments)})},i)})):a=t.ajax(r):t.isPlainObject(n)||t.isArray(n)?(a={then:function(t,e){t(n,null,null)}},s=!1):t.error("Invalid source type: "+n),u._requestId&&(u.warn("Recursive load request #"+p+" while #"+u._requestId+" is pending."),u._requestId=p),s&&(l.debugTime(h),l.nodeSetStatus(e,"loading")),o=new t.Deferred,a.then(function(r,i,a){var s,h;if("json"!==n.dataType&&"jsonp"!==n.dataType||"string"!==typeof r||t.error("Ajax request returned a string (did you get the JSON dataType wrong?)."),u._requestId&&u._requestId>p)o.rejectWith(this,["$recursive_request"]);else if(null!==u.parent||null===c){if(e.options.postProcess){try{(h=l._triggerNodeEvent("postProcess",e,e.originalEvent,{response:r,error:null,dataType:n.dataType})).error&&l.warn("postProcess returned error:",h)}catch(t){h={error:t,message:""+t,details:"postProcess failed"}}if(h.error)return s=t.isPlainObject(h.error)?h.error:{message:h.error},s=l._makeHookContext(u,null,s),void o.rejectWith(this,[s]);(t.isArray(h)||t.isPlainObject(h)&&t.isArray(h.children))&&(r=h)}else r&&r.hasOwnProperty("d")&&e.options.enableAspx&&(42===e.options.enableAspx&&l.warn("The default for enableAspx will change to `false` in the fututure. Pass `enableAspx: true` or implement postProcess to silence this warning."),r="string"===typeof r.d?t.parseJSON(r.d):r.d);o.resolveWith(this,[r])}else o.rejectWith(this,["$request_target_invalid"])},function(t,e,n){var r=l._makeHookContext(u,null,{error:t,args:Array.prototype.slice.call(arguments),message:n,details:t.status+": "+n});o.rejectWith(this,[r])}),o.done(function(n){var r,i,o;l.nodeSetStatus(e,"ok"),t.isPlainObject(n)?(b(u.isRootNode(),"source may only be an object for root nodes (expecting an array of child objects otherwise)"),b(t.isArray(n.children),"if an object is passed as source, it must contain a 'children' array (all other properties are added to 'tree.data')"),i=n,r=n.children,delete i.children,t.each(g,function(t,e){void 0!==i[e]&&(l[e]=i[e],delete i[e])}),t.extend(l.data,i)):r=n,b(t.isArray(r),"expected array of children"),u._setChildren(r),l.options.nodata&&0===r.length&&(t.isFunction(l.options.nodata)?o=l.options.nodata.call(l,{type:"nodata"},e):!0===l.options.nodata&&u.isRootNode()?o=l.options.strings.noData:"string"===typeof l.options.nodata&&u.isRootNode()&&(o=l.options.nodata),o&&u.setStatus("nodata",o)),l._triggerNodeEvent("loadChildren",u)}).fail(function(t){var n;"$recursive_request"!==t?"$request_target_invalid"!==t?(t.node&&t.error&&t.message?n=t:"[object Object]"===(n=l._makeHookContext(u,null,{error:t,args:Array.prototype.slice.call(arguments),message:t?t.message||t.toString():""})).message&&(n.message=""),u.warn("Load children failed ("+n.message+")",n),!1!==l._triggerNodeEvent("loadError",n,null)&&l.nodeSetStatus(e,"error",n.message,n.details)):u.warn("Lazy parent node was removed while loading: discarding response."):u.warn("Ignored response for obsolete load request #"+p+" (expected #"+u._requestId+")")}).always(function(){u._requestId=null,s&&l.debugTimeEnd(h)}),o.promise()},nodeLoadKeyPath:function(t,e){},nodeRemoveChild:function(e,n){var r,i=e.node,o=t.extend({},e,{node:n}),a=i.children;if(1===a.length)return b(n===a[0],"invalid single child"),this.nodeRemoveChildren(e);this.activeNode&&(n===this.activeNode||this.activeNode.isDescendantOf(n))&&this.activeNode.setActive(!1),this.focusNode&&(n===this.focusNode||this.focusNode.isDescendantOf(n))&&(this.focusNode=null),this.nodeRemoveMarkup(o),this.nodeRemoveChildren(o),b((r=t.inArray(n,a))>=0,"invalid child"),i.triggerModifyChild("remove",n),n.visit(function(t){t.parent=null},!0),this._callHook("treeRegisterNode",this,!1,n),a.splice(r,1)},nodeRemoveChildMarkup:function(e){var n=e.node;n.ul&&(n.isRootNode()?t(n.ul).empty():(t(n.ul).remove(),n.ul=null),n.visit(function(t){t.li=t.ul=null}))},nodeRemoveChildren:function(t){var e=t.tree,n=t.node;n.children&&(this.activeNode&&this.activeNode.isDescendantOf(n)&&this.activeNode.setActive(!1),this.focusNode&&this.focusNode.isDescendantOf(n)&&(this.focusNode=null),this.nodeRemoveChildMarkup(t),n.triggerModifyChild("remove",null),n.visit(function(t){t.parent=null,e._callHook("treeRegisterNode",e,!1,t)}),n.lazy?n.children=[]:n.children=null,n.isRootNode()||(n.expanded=!1),this.nodeRenderStatus(t))},nodeRemoveMarkup:function(e){var n=e.node;n.li&&(t(n.li).remove(),n.li=null),this.nodeRemoveChildMarkup(e)},nodeRender:function(e,n,r,i,o){var a,s,l,u,c,h,p,f=e.node,d=e.tree,g=e.options,y=g.aria,m=!1,v=f.parent,_=!v,w=f.children,O=null;if(!1!==d._enableUpdate&&(_||v.ul)){if(b(_||v.ul,"parent UL must exist"),_||(f.li&&(n||f.li.parentNode!==f.parent.ul)&&(f.li.parentNode===f.parent.ul?O=f.li.nextSibling:this.debug("Unlinking "+f+" (must be child of "+f.parent+")"),this.nodeRemoveMarkup(e)),f.li?this.nodeRenderStatus(e):(m=!0,f.li=document.createElement("li"),f.li.ftnode=f,f.key&&g.generateIds&&(f.li.id=g.idPrefix+f.key),f.span=document.createElement("span"),f.span.className="fancytree-node",y&&!f.tr&&t(f.li).attr("role","treeitem"),f.li.appendChild(f.span),this.nodeRenderTitle(e),g.createNode&&g.createNode.call(d,{type:"createNode"},e)),g.renderNode&&g.renderNode.call(d,{type:"renderNode"},e)),w){if(_||f.expanded||!0===r){for(f.ul||(f.ul=document.createElement("ul"),(!0!==i||o)&&f.expanded||(f.ul.style.display="none"),y&&t(f.ul).attr("role","group"),f.li?f.li.appendChild(f.ul):f.tree.$div.append(f.ul)),u=0,c=w.length;u<c;u++)p=t.extend({},e,{node:w[u]}),this.nodeRender(p,n,r,!1,!0);for(a=f.ul.firstChild;a;)(l=a.ftnode)&&l.parent!==f?(f.debug("_fixParent: remove missing "+l,a),h=a.nextSibling,a.parentNode.removeChild(a),a=h):a=a.nextSibling;for(a=f.ul.firstChild,u=0,c=w.length-1;u<c;u++)(s=w[u])===(l=a.ftnode)?a=a.nextSibling:f.ul.insertBefore(s.li,l.li)}}else f.ul&&(this.warn("remove child markup for "+f),this.nodeRemoveChildMarkup(e));_||m&&v.ul.insertBefore(f.li,O)}},nodeRenderTitle:function(e,n){var o,a,s,l,u,c,h,p=e.node,f=e.tree,d=e.options,g=d.aria,y=p.getLevel(),m=[];void 0!==n&&(p.title=n),p.span&&!1!==f._enableUpdate&&(u=g&&!1!==p.hasChildren()?" role='button'":"",y<d.minExpandLevel?(p.lazy||(p.expanded=!0),y>1&&m.push("<span "+u+" class='fancytree-expander fancytree-expander-fixed'></span>")):m.push("<span "+u+" class='fancytree-expander'></span>"),(o=r.evalOption("checkbox",p,p,d,!1))&&!p.isStatusNode()&&(u=g?" role='checkbox'":"",a="fancytree-checkbox",("radio"===o||p.parent&&p.parent.radiogroup)&&(a+=" fancytree-radio"),m.push("<span "+u+" class='"+a+"'></span>")),void 0!==p.data.iconClass&&(p.icon?t.error("'iconClass' node option is deprecated since v2.14.0: use 'icon' only instead"):(p.warn("'iconClass' node option is deprecated since v2.14.0: use 'icon' instead"),p.icon=p.data.iconClass)),!1!==(s=r.evalOption("icon",p,p,d,!0))&&(u=g?" role='presentation'":"",h=(h=r.evalOption("iconTooltip",p,p,d,null))?" title='"+j(h)+"'":"","string"===typeof s?i.test(s)?(s="/"===s.charAt(0)?s:(d.imagePath||"")+s,m.push("<img src='"+s+"' class='fancytree-icon'"+h+" alt='' />")):m.push("<span "+u+" class='fancytree-custom-icon "+s+"'"+h+"></span>"):s.text?m.push("<span "+u+" class='fancytree-custom-icon "+(s.addClass||"")+"'"+h+">"+r.escapeHtml(s.text)+"</span>"):s.html?m.push("<span "+u+" class='fancytree-custom-icon "+(s.addClass||"")+"'"+h+">"+s.html+"</span>"):m.push("<span "+u+" class='fancytree-icon'"+h+"></span>")),l="",d.renderTitle&&(l=d.renderTitle.call(f,{type:"renderTitle"},e)||""),l||(!0===(c=r.evalOption("tooltip",p,p,d,null))&&(c=p.title),l="<span class='fancytree-title'"+(c=c?" title='"+j(c)+"'":"")+(d.titlesTabbable?" tabindex='0'":"")+">"+(d.escapeTitles?r.escapeHtml(p.title):p.title)+"</span>"),m.push(l),p.span.innerHTML=m.join(""),this.nodeRenderStatus(e),d.enhanceTitle&&(e.$title=t(">span.fancytree-title",p.span),l=d.enhanceTitle.call(f,{type:"enhanceTitle"},e)||""))},nodeRenderStatus:function(e){var n,i=e.node,o=e.tree,a=e.options,s=i.hasChildren(),l=i.isLastSibling(),u=a.aria,c=a._classNames,h=[],p=i[o.statusClassPropName];p&&!1!==o._enableUpdate&&(u&&(n=t(i.tr||i.li)),h.push(c.node),o.activeNode===i&&h.push(c.active),o.focusNode===i&&h.push(c.focused),i.expanded&&h.push(c.expanded),u&&(!1===s?n.removeAttr("aria-expanded"):n.attr("aria-expanded",Boolean(i.expanded))),i.folder&&h.push(c.folder),!1!==s&&h.push(c.hasChildren),l&&h.push(c.lastsib),i.lazy&&null==i.children&&h.push(c.lazy),i.partload&&h.push(c.partload),i.partsel&&h.push(c.partsel),r.evalOption("unselectable",i,i,a,!1)&&h.push(c.unselectable),i._isLoading&&h.push(c.loading),i._error&&h.push(c.error),i.statusNodeType&&h.push(c.statusNodePrefix+i.statusNodeType),i.selected?(h.push(c.selected),u&&n.attr("aria-selected",!0)):u&&n.attr("aria-selected",!1),i.extraClasses&&h.push(i.extraClasses),!1===s?h.push(c.combinedExpanderPrefix+"n"+(l?"l":"")):h.push(c.combinedExpanderPrefix+(i.expanded?"e":"c")+(i.lazy&&null==i.children?"d":"")+(l?"l":"")),h.push(c.combinedIconPrefix+(i.expanded?"e":"c")+(i.folder?"f":"")),p.className=h.join(" "),i.li&&t(i.li).toggleClass(c.lastsib,l))},nodeSetActive:function(e,n,r){r=r||{};var i,o=e.node,a=e.tree,s=e.options,l=!0===r.noEvents,u=!0===r.noFocus,c=!1!==r.scrollIntoView;return o===a.activeNode===(n=!1!==n)?S(o):(c&&e.originalEvent&&t(e.originalEvent.target).is("a,:checkbox")&&(o.info("Not scrolling while clicking an embedded link."),c=!1),n&&!l&&!1===this._triggerNodeEvent("beforeActivate",o,e.originalEvent)?C(o,["rejected"]):(n?(a.activeNode&&(b(a.activeNode!==o,"node was active (inconsistency)"),i=t.extend({},e,{node:a.activeNode}),a.nodeSetActive(i,!1),b(null===a.activeNode,"deactivate was out of sync?")),s.activeVisible&&o.makeVisible({scrollIntoView:c}),a.activeNode=o,a.nodeRenderStatus(e),u||a.nodeSetFocus(e),l||a._triggerNodeEvent("activate",o,e.originalEvent)):(b(a.activeNode===o,"node was not active (inconsistency)"),a.activeNode=null,this.nodeRenderStatus(e),l||e.tree._triggerNodeEvent("deactivate",o,e.originalEvent)),S(o)))},nodeSetExpanded:function(e,n,r){r=r||{};var i,o,a,s,l,u,c=e.node,h=e.tree,p=e.options,f=!0===r.noAnimation,d=!0===r.noEvents;if(n=!1!==n,t(c.li).hasClass(p._classNames.animating))return c.warn("setExpanded("+n+") while animating: ignored."),C(c,["recursion"]);if(c.expanded&&n||!c.expanded&&!n)return S(c);if(n&&!c.lazy&&!c.hasChildren())return S(c);if(!n&&c.getLevel()<p.minExpandLevel)return C(c,["locked"]);if(!d&&!1===this._triggerNodeEvent("beforeExpand",c,e.originalEvent))return C(c,["rejected"]);if(f||c.isVisible()||(f=r.noAnimation=!0),o=new t.Deferred,n&&!c.expanded&&p.autoCollapse){l=c.getParentList(!1,!0),u=p.autoCollapse;try{for(p.autoCollapse=!1,a=0,s=l.length;a<s;a++)this._callHook("nodeCollapseSiblings",l[a],r)}finally{p.autoCollapse=u}}return o.done(function(){var t=c.getLastChild();n&&p.autoScroll&&!f&&t&&h._enableUpdate?t.scrollIntoView(!0,{topNode:c}).always(function(){d||e.tree._triggerNodeEvent(n?"expand":"collapse",e)}):d||e.tree._triggerNodeEvent(n?"expand":"collapse",e)}),i=function(r){var i=p._classNames,o=p.toggleEffect;if(c.expanded=n,h._callHook("treeStructureChanged",e,n?"expand":"collapse"),h._callHook("nodeRender",e,!1,!1,!0),c.ul)if("none"!==c.ul.style.display===!!c.expanded)c.warn("nodeSetExpanded: UL.style.display already set");else{if(o&&!f)return t(c.li).addClass(i.animating),void(t.isFunction(t(c.ul)[o.effect])?t(c.ul)[o.effect]({duration:o.duration,always:function(){t(this).removeClass(i.animating),t(c.li).removeClass(i.animating),r()}}):(t(c.ul).stop(!0,!0),t(c.ul).parent().find(".ui-effects-placeholder").remove(),t(c.ul).toggle(o.effect,o.options,o.duration,function(){t(this).removeClass(i.animating),t(c.li).removeClass(i.animating),r()})));c.ul.style.display=c.expanded||!parent?"":"none"}r()},n&&c.lazy&&void 0===c.hasChildren()?c.load().done(function(){o.notifyWith&&o.notifyWith(c,["loaded"]),i(function(){o.resolveWith(c)})}).fail(function(t){i(function(){o.rejectWith(c,["load failed ("+t+")"])})}):i(function(){o.resolveWith(c)}),o.promise()},nodeSetFocus:function(e,n){var r,i=e.tree,o=e.node,a=i.options,s=!!e.originalEvent&&t(e.originalEvent.target).is(":input");if(n=!1!==n,i.focusNode){if(i.focusNode===o&&n)return;r=t.extend({},e,{node:i.focusNode}),i.focusNode=null,this._triggerNodeEvent("blur",r),this._callHook("nodeRenderStatus",r)}n&&(this.hasFocus()||(o.debug("nodeSetFocus: forcing container focus"),this._callHook("treeSetFocus",e,!0,{calledByNode:!0})),o.makeVisible({scrollIntoView:!1}),i.focusNode=o,a.titlesTabbable&&(s||t(o.span).find(".fancytree-title").focus()),a.aria&&t(i.$container).attr("aria-activedescendant",t(o.tr||o.li).uniqueId().attr("id")),this._triggerNodeEvent("focus",e),document.activeElement===i.$container.get(0)||t(document.activeElement,i.$container).length>=1||t(i.$container).focus(),a.autoScroll&&o.scrollIntoView(),this._callHook("nodeRenderStatus",e))},nodeSetSelected:function(t,e,n){n=n||{};var i=t.node,o=t.tree,a=t.options,s=!0===n.noEvents,l=i.parent;if(e=!1!==e,!r.evalOption("unselectable",i,i,a,!1)){if(i._lastSelectIntent=e,!!i.selected===e&&(3!==a.selectMode||!i.partsel||e))return e;if(!s&&!1===this._triggerNodeEvent("beforeSelect",i,t.originalEvent))return!!i.selected;e&&1===a.selectMode?(o.lastSelectedNode&&o.lastSelectedNode.setSelected(!1),i.selected=e):3!==a.selectMode||!l||l.radiogroup||i.radiogroup?l&&l.radiogroup?i.visitSiblings(function(t){t._changeSelectStatusAttrs(e&&t===i)},!0):i.selected=e:(i.selected=e,i.fixSelection3AfterClick(n)),this.nodeRenderStatus(t),o.lastSelectedNode=e?i:null,s||o._triggerNodeEvent("select",t)}},nodeSetStatus:function(e,n,r,i){var o=e.node,a=e.tree;function s(n,r){var i=o.children?o.children[0]:null;return i&&i.isStatusNode()?(t.extend(i,n),i.statusNodeType=r,a._callHook("nodeRenderTitle",i)):(o._setChildren([n]),a._callHook("treeStructureChanged",e,"setStatusNode"),o.children[0].statusNodeType=r,a.render()),o.children[0]}switch(n){case"ok":!function(){var t=o.children?o.children[0]:null;if(t&&t.isStatusNode()){try{o.ul&&(o.ul.removeChild(t.li),t.li=null)}catch(t){}1===o.children.length?o.children=[]:o.children.shift(),a._callHook("treeStructureChanged",e,"clearStatusNode")}}(),o._isLoading=!1,o._error=null,o.renderStatus();break;case"loading":o.parent||s({title:a.options.strings.loading+(r?" ("+r+")":""),checkbox:!1,tooltip:i},n),o._isLoading=!0,o._error=null,o.renderStatus();break;case"error":s({title:a.options.strings.loadError+(r?" ("+r+")":""),checkbox:!1,tooltip:i},n),o._isLoading=!1,o._error={message:r,details:i},o.renderStatus();break;case"nodata":s({title:r||a.options.strings.noData,checkbox:!1,tooltip:i},n),o._isLoading=!1,o._error=null,o.renderStatus();break;default:t.error("invalid node status "+n)}},nodeToggleExpanded:function(t){return this.nodeSetExpanded(t,!t.node.expanded)},nodeToggleSelected:function(t){var e=t.node,n=!e.selected;return e.partsel&&!e.selected&&!0===e._lastSelectIntent&&(n=!1,e.selected=!0),e._lastSelectIntent=n,this.nodeSetSelected(t,n)},treeClear:function(t){var e=t.tree;e.activeNode=null,e.focusNode=null,e.$div.find(">ul.fancytree-container").empty(),e.rootNode.children=null,e._callHook("treeStructureChanged",t,"clear")},treeCreate:function(t){},treeDestroy:function(t){this.$div.find(">ul.fancytree-container").remove(),this.$source&&this.$source.removeClass("fancytree-helper-hidden")},treeInit:function(e){var n=e.tree,r=n.options;n.$container.attr("tabindex",r.tabindex),t.each(g,function(t,e){void 0!==r[e]&&(n.info("Move option "+e+" to tree"),n[e]=r[e],delete r[e])}),r.checkboxAutoHide&&n.$container.addClass("fancytree-checkbox-auto-hide"),r.rtl?n.$container.attr("DIR","RTL").addClass("fancytree-rtl"):n.$container.removeAttr("DIR").removeClass("fancytree-rtl"),r.aria&&(n.$container.attr("role","tree"),1!==r.selectMode&&n.$container.attr("aria-multiselectable",!0)),this.treeLoad(e)},treeLoad:function(e,n){var i,o,a,s=e.tree,l=e.widget.element,u=t.extend({},e,{node:this.rootNode});if(s.rootNode.children&&this.treeClear(e),n=n||this.options.source)"string"===typeof n&&t.error("Not implemented");else switch(o=l.data("type")||"html"){case"html":(a=l.find(">ul").not(".fancytree-container").first()).length?(a.addClass("ui-fancytree-source fancytree-helper-hidden"),n=t.ui.fancytree.parseHtml(a),this.data=t.extend(this.data,I(a))):(r.warn("No `source` option was passed and container does not contain `<ul>`: assuming `source: []`."),n=[]);break;case"json":n=t.parseJSON(l.text()),l.contents().filter(function(){return 3===this.nodeType}).remove(),t.isPlainObject(n)&&(b(t.isArray(n.children),"if an object is passed as source, it must contain a 'children' array (all other properties are added to 'tree.data')"),i=n,n=n.children,delete i.children,t.each(g,function(t,e){void 0!==i[e]&&(s[e]=i[e],delete i[e])}),t.extend(s.data,i));break;default:t.error("Invalid data-type: "+o)}return s._triggerTreeEvent("preInit",null),this.nodeLoadChildren(u,n).done(function(){s._callHook("treeStructureChanged",e,"loadChildren"),s.render(),3===e.options.selectMode&&s.rootNode.fixSelection3FromEndNodes(),s.activeNode&&s.options.activeVisible&&s.activeNode.makeVisible(),s._triggerTreeEvent("init",null,{status:!0})}).fail(function(){s.render(),s._triggerTreeEvent("init",null,{status:!1})})},treeRegisterNode:function(t,e,n){t.tree._callHook("treeStructureChanged",t,e?"addNode":"removeNode")},treeSetFocus:function(e,n,r){var i;(n=!1!==n)!==this.hasFocus()&&(this._hasFocus=n,!n&&this.focusNode?this.focusNode.setFocus(!1):!n||r&&r.calledByNode||t(this.$container).focus(),this.$container.toggleClass("fancytree-treefocus",n),this._triggerTreeEvent(n?"focusTree":"blurTree"),n&&!this.activeNode&&(i=this._lastMousedownNode||this.getFirstChild())&&i.setFocus())},treeSetOption:function(e,n,r){var i=e.tree,o=!0,a=!1,l=!1;switch(n){case"aria":case"checkbox":case"icon":case"minExpandLevel":case"tabindex":a=!0,l=!0;break;case"checkboxAutoHide":i.$container.toggleClass("fancytree-checkbox-auto-hide",!!r);break;case"escapeTitles":case"tooltip":l=!0;break;case"rtl":!1===r?i.$container.removeAttr("DIR").removeClass("fancytree-rtl"):i.$container.attr("DIR","RTL").addClass("fancytree-rtl"),l=!0;break;case"source":o=!1,i._callHook("treeLoad",i,r),l=!0}i.debug("set option "+n+"="+r+" <"+s(r)+">"),o&&(this.widget._super?this.widget._super.call(this.widget,n,r):t.Widget.prototype._setOption.call(this.widget,n,r)),a&&i._callHook("treeCreate",i),l&&i.render(!0,!1)},treeStructureChanged:function(t,e){}}),t.widget("ui.fancytree",{options:{activeVisible:!0,ajax:{type:"GET",cache:!1,dataType:"json"},aria:!0,autoActivate:!0,autoCollapse:!1,autoScroll:!1,checkbox:!1,clickFolderMode:4,copyFunctionsToData:!1,debugLevel:null,disabled:!1,enableAspx:42,escapeTitles:!1,extensions:[],focusOnSelect:!1,generateIds:!1,icon:!0,idPrefix:"ft_",keyboard:!0,keyPathSeparator:"/",minExpandLevel:1,nodata:!0,quicksearch:!1,rtl:!1,scrollOfs:{top:0,bottom:0},scrollParent:null,selectMode:2,strings:{loading:"Loading...",loadError:"Load error!",moreData:"More...",noData:"No data."},tabindex:"0",titlesTabbable:!1,toggleEffect:{effect:"slideToggle",duration:200},tooltip:!1,treeId:null,_classNames:{active:"fancytree-active",animating:"fancytree-animating",combinedExpanderPrefix:"fancytree-exp-",combinedIconPrefix:"fancytree-ico-",error:"fancytree-error",expanded:"fancytree-expanded",focused:"fancytree-focused",folder:"fancytree-folder",hasChildren:"fancytree-has-children",lastsib:"fancytree-lastsib",lazy:"fancytree-lazy",loading:"fancytree-loading",node:"fancytree-node",partload:"fancytree-partload",partsel:"fancytree-partsel",radio:"fancytree-radio",selected:"fancytree-selected",statusNodePrefix:"fancytree-statusnode-",unselectable:"fancytree-unselectable"},lazyLoad:null,postProcess:null},_deprecationWarning:function(t){var e=this.tree;e&&e.options.debugLevel>=3&&e.warn("$().fancytree('"+t+"') is deprecated (see https://wwwendt.de/tech/fancytree/doc/jsdoc/Fancytree_Widget.html")},_create:function(){this.tree=new P(this),this.$source=this.source||"json"===this.element.data("type")?this.element:this.element.find(">ul").first();var e,n,r,i=this.options,o=i.extensions;this.tree;for(r=0;r<o.length;r++)n=o[r],(e=t.ui.fancytree._extensions[n])||t.error("Could not apply extension '"+n+"' (it is not registered, did you forget to include it?)"),this.tree.options[n]=O({},e.options,this.tree.options[n]),b(void 0===this.tree.ext[n],"Extension name must not exist as Fancytree.ext attribute: '"+n+"'"),this.tree.ext[n]={},E(this.tree,0,e,n),e;void 0!==i.icons&&(!0===i.icon?(this.tree.warn("'icons' tree option is deprecated since v2.14.0: use 'icon' instead"),i.icon=i.icons):t.error("'icons' tree option is deprecated since v2.14.0: use 'icon' only instead")),void 0!==i.iconClass&&(i.icon?t.error("'iconClass' tree option is deprecated since v2.14.0: use 'icon' only instead"):(this.tree.warn("'iconClass' tree option is deprecated since v2.14.0: use 'icon' instead"),i.icon=i.iconClass)),void 0!==i.tabbable&&(i.tabindex=i.tabbable?"0":"-1",this.tree.warn("'tabbable' tree option is deprecated since v2.17.0: use 'tabindex='"+i.tabindex+"' instead")),this.tree._callHook("treeCreate",this.tree)},_init:function(){this.tree._callHook("treeInit",this.tree),this._bind()},_setOption:function(t,e){return this.tree._callHook("treeSetOption",this.tree,t,e)},_destroy:function(){this._unbind(),this.tree._callHook("treeDestroy",this.tree)},_unbind:function(){var e=this.tree._ns;this.element.off(e),this.tree.$container.off(e),t(document).off(e)},_bind:function(){var e=this,n=this.options,i=this.tree,o=i._ns;this._unbind(),i.$container.on("focusin"+o+" focusout"+o,function(e){var n=r.getNode(e),o="focusin"===e.type;if(!o&&n&&t(e.target).is("a"))n.debug("Ignored focusout on embedded <a> element.");else{if(o){if(i._getExpiringValue("focusin"))return void i.debug("Ignored double focusin.");i._setExpiringValue("focusin",!0,50),n||(n=i._getExpiringValue("mouseDownNode"))&&i.debug("Reconstruct mouse target for focusin from recent event.")}n?i._callHook("nodeSetFocus",i._makeHookContext(n,e),o):i.tbody&&t(e.target).parents("table.fancytree-container > thead").length?i.debug("Ignore focus event outside table body.",e):i._callHook("treeSetFocus",i,o)}}).on("selectstart"+o,"span.fancytree-title",function(t){t.preventDefault()}).on("keydown"+o,function(t){if(n.disabled||!1===n.keyboard)return!0;var e,r=i.focusNode,o=i._makeHookContext(r||i,t),a=i.phase;try{return i.phase="userEvent","preventNav"===(e=r?i._triggerNodeEvent("keydown",r,t):i._triggerTreeEvent("keydown",t))?e=!0:!1!==e&&(e=i._callHook("nodeKeydown",o)),e}finally{i.phase=a}}).on("mousedown"+o,function(t){var e=r.getEventTarget(t);i._lastMousedownNode=e?e.node:null,i._setExpiringValue("mouseDownNode",i._lastMousedownNode)}).on("click"+o+" dblclick"+o,function(t){if(n.disabled)return!0;var i,o=r.getEventTarget(t),a=o.node,s=e.tree,l=s.phase;if(!a)return!0;i=s._makeHookContext(a,t);try{switch(s.phase="userEvent",t.type){case"click":return i.targetType=o.type,a.isPagingNode()?!0===s._triggerNodeEvent("clickPaging",i,t):!1!==s._triggerNodeEvent("click",i,t)&&s._callHook("nodeClick",i);case"dblclick":return i.targetType=o.type,!1!==s._triggerNodeEvent("dblclick",i,t)&&s._callHook("nodeDblclick",i)}}finally{s.phase=l}})},getActiveNode:function(){return this._deprecationWarning("getActiveNode"),this.tree.activeNode},getNodeByKey:function(t){return this._deprecationWarning("getNodeByKey"),this.tree.getNodeByKey(t)},getRootNode:function(){return this._deprecationWarning("getRootNode"),this.tree.rootNode},getTree:function(){return this._deprecationWarning("getTree"),this.tree}}),r=t.ui.fancytree,t.extend(t.ui.fancytree,{version:"2.38.0",buildType:"production",debugLevel:3,_nextId:1,_nextNodeKey:1,_extensions:{},_FancytreeClass:P,_FancytreeNodeClass:R,jquerySupports:{positionMyOfs:function(e,n,r,i){var o,a,s,l=t.map(t.trim(e).split("."),function(t){return parseInt(t,10)}),u=t.map(Array.prototype.slice.call(arguments,1),function(t){return parseInt(t,10)});for(o=0;o<u.length;o++)if((a=l[o]||0)!==(s=u[o]||0))return a>s;return!0}(t.ui.version,1,9)},assert:function(t,e){return b(t,e)},createTree:function(e,n){var i=t(e).fancytree(n);return r.getTree(i)},debounce:function(t,e,n,r){var i;return 3===arguments.length&&"boolean"!==typeof n&&(r=n,n=!1),function(){var o=arguments;r=r||this,n&&!i&&e.apply(r,o),clearTimeout(i),i=setTimeout(function(){n||e.apply(r,o),i=null},t)}},debug:function(e){t.ui.fancytree.debugLevel>=4&&w("log",arguments)},error:function(e){t.ui.fancytree.debugLevel>=1&&w("error",arguments)},escapeHtml:function(t){return(""+t).replace(o,function(t){return l[t]})},fixPositionOptions:function(e){if((e.offset||(""+e.my+e.at).indexOf("%")>=0)&&t.error("expected new position syntax (but '%' is not supported)"),!t.ui.fancytree.jquerySupports.positionMyOfs){var n=/(\w+)([+-]?\d+)?\s+(\w+)([+-]?\d+)?/.exec(e.my),r=/(\w+)([+-]?\d+)?\s+(\w+)([+-]?\d+)?/.exec(e.at),i=(n[2]?+n[2]:0)+(r[2]?+r[2]:0),o=(n[4]?+n[4]:0)+(r[4]?+r[4]:0);e=t.extend({},e,{my:n[1]+" "+n[3],at:r[1]+" "+r[3]}),(i||o)&&(e.offset=i+" "+o)}return e},getEventTarget:function(e){var n,i=e&&e.target?e.target.className:"",o={node:this.getNode(e.target),type:void 0};return/\bfancytree-title\b/.test(i)?o.type="title":/\bfancytree-expander\b/.test(i)?o.type=!1===o.node.hasChildren()?"prefix":"expander":/\bfancytree-checkbox\b/.test(i)?o.type="checkbox":/\bfancytree(-custom)?-icon\b/.test(i)?o.type="icon":/\bfancytree-node\b/.test(i)?o.type="title":e&&e.target&&((n=t(e.target)).is("ul[role=group]")?((o.node&&o.node.tree||r).debug("Ignoring click on outer UL."),o.node=null):n.closest(".fancytree-title").length?o.type="title":n.closest(".fancytree-checkbox").length?o.type="checkbox":n.closest(".fancytree-expander").length&&(o.type="expander")),o},getEventTargetType:function(t){return this.getEventTarget(t).type},getNode:function(e){if(e instanceof R)return e;for(e instanceof t?e=e[0]:void 0!==e.originalEvent&&(e=e.target);e;){if(e.ftnode)return e.ftnode;e=e.parentNode}return null},getTree:function(e){var n,r=e;return e instanceof P?e:(void 0===e&&(e=0),"number"===typeof e?e=t(".fancytree-container").eq(e):"string"===typeof e?(e=t("#ft-id-"+r).eq(0)).length||(e=t(r).eq(0)):e instanceof Element||e instanceof HTMLDocument?e=t(e):e instanceof t?e=e.eq(0):void 0!==e.originalEvent&&(e=t(e.target)),(n=(e=e.closest(":ui-fancytree")).data("ui-fancytree")||e.data("fancytree"))?n.tree:null)},evalOption:function(e,n,r,i,o){var a,s,l=n.tree,u=i[e],c=r[e];return t.isFunction(u)?(a={node:n,tree:l,widget:l.widget,options:l.widget.options,typeInfo:l.types[n.type]||{}},null==(s=u.call(l,{type:e},a))&&(s=c)):s=null==c?u:c,null==s&&(s=o),s},setSpanIcon:function(e,n,r){var i=t(e);"string"===typeof r?i.attr("class",n+" "+r):(r.text?i.text(""+r.text):r.html&&(e.innerHTML=r.html),i.attr("class",n+" "+(r.addClass||"")))},eventToString:function(t){var e=t.which,n=t.type,r=[];return t.altKey&&r.push("alt"),t.ctrlKey&&r.push("ctrl"),t.metaKey&&r.push("meta"),t.shiftKey&&r.push("shift"),"click"===n||"dblclick"===n?r.push(p[t.button]+n):"wheel"===n?r.push(n):u[e]||r.push(c[e]||String.fromCharCode(e).toLowerCase()),r.join("+")},info:function(e){t.ui.fancytree.debugLevel>=3&&w("info",arguments)},keyEventToString:function(t){return this.warn("keyEventToString() is deprecated: use eventToString()"),this.eventToString(t)},overrideMethod:function(e,n,r,i){var o,a=e[n]||t.noop;e[n]=function(){var t=i||this;try{return o=t._super,t._super=a,r.apply(t,arguments)}finally{t._super=o}}},parseHtml:function(e){var n,r,i,o,a,s,l,u,c=[];return e.find(">li").each(function(){var h,p,g=t(this),m=g.find(">span",this).first(),_=m.length?null:g.find(">a").first(),b={tooltip:null,data:{}};for(m.length?b.title=m.html():_&&_.length?(b.title=_.html(),b.data.href=_.attr("href"),b.data.target=_.attr("target"),b.tooltip=_.attr("title")):(b.title=g.html(),(a=b.title.search(/<ul/i))>=0&&(b.title=b.title.substring(0,a))),b.title=t.trim(b.title),o=0,s=f.length;o<s;o++)b[f[o]]=void 0;for(n=this.className.split(" "),i=[],o=0,s=n.length;o<s;o++)r=n[o],d[r]?b[r]=!0:i.push(r);if(b.extraClasses=i.join(" "),(l=g.attr("title"))&&(b.tooltip=l),(l=g.attr("id"))&&(b.key=l),g.attr("hideCheckbox")&&(b.checkbox=!1),(h=I(g))&&!t.isEmptyObject(h)){for(p in v)h.hasOwnProperty(p)&&(h[v[p]]=h[p],delete h[p]);for(o=0,s=y.length;o<s;o++)l=y[o],null!=(u=h[l])&&(delete h[l],b[l]=u);t.extend(b.data,h)}(e=g.find(">ul").first()).length?b.children=t.ui.fancytree.parseHtml(e):b.children=b.lazy?void 0:null,c.push(b)}),c},registerExtension:function(e){b(null!=e.name,"extensions must have a `name` property."),b(null!=e.version,"extensions must have a `version` property."),t.ui.fancytree._extensions[e.name]=e},unescapeHtml:function(t){var e=document.createElement("div");return e.innerHTML=t,0===e.childNodes.length?"":e.childNodes[0].nodeValue},warn:function(e){t.ui.fancytree.debugLevel>=2&&w("warn",arguments)}}),t.ui.fancytree}function b(e,n){e||(n="Fancytree assertion failed"+(n=n?": "+n:""),t.ui.fancytree.error(n),t.error(n))}function w(t,e){var n,r,i=window.console?window.console[t]:null;if(i)try{i.apply(window.console,e)}catch(t){for(r="",n=0;n<e.length;n++)r+=e[n];i(r)}}function O(){var e,n,r,i,o,a=arguments[0]||{},l=1,u=arguments.length;if("object"===s(a)||t.isFunction(a)||(a={}),l===u)throw Error("need at least two args");for(;l<u;l++)if(null!=(e=arguments[l]))for(n in e)if(e.hasOwnProperty(n)){if(r=a[n],a===(i=e[n]))continue;i&&t.isPlainObject(i)?(o=r&&t.isPlainObject(r)?r:{},a[n]=O(o,i)):void 0!==i&&(a[n]=i)}return a}function x(t,e,n,r,i){var o,a,s,l,u;return o=e[t],a=r[t],s=e.ext[i],l=function(){return o.apply(e,arguments)},u=function(t){return o.apply(e,t)},function(){var t=e._local,n=e._super,r=e._superApply;try{return e._local=s,e._super=l,e._superApply=u,a.apply(e,arguments)}finally{e._local=t,e._super=n,e._superApply=r}}}function E(e,n,r,i){for(var o in r)"function"===typeof r[o]?"function"===typeof e[o]?e[o]=x(o,e,0,r,i):"_"===o.charAt(0)?e.ext[i][o]=x(o,e,0,r,i):t.error("Could not override tree."+o+". Use prefix '_' to create tree."+i+"._"+o):"options"!==o&&(e.ext[i][o]=r[o])}function S(e,n){return void 0===e?t.Deferred(function(){this.resolve()}).promise():t.Deferred(function(){this.resolveWith(e,n)}).promise()}function C(e,n){return void 0===e?t.Deferred(function(){this.reject()}).promise():t.Deferred(function(){this.rejectWith(e,n)}).promise()}function T(t,e){return function(){t.resolveWith(e)}}function I(e){var n=t.extend({},e.data()),r=n.json;return delete n.fancytree,delete n.uiFancytree,r&&(delete n.json,n=t.extend(n,r)),n}function j(t){return(""+t).replace(a,function(t){return l[t]})}function L(t){return t=t.toLowerCase(),function(e){return e.title.toLowerCase().indexOf(t)>=0}}function R(e,n){var i,o,a,s;for(this.parent=e,this.tree=e.tree,this.ul=null,this.li=null,this.statusNodeType=null,this._isLoading=!1,this._error=null,this.data={},i=0,o=y.length;i<o;i++)this[a=y[i]]=n[a];for(a in null==this.unselectableIgnore&&null==this.unselectableStatus||(this.unselectable=!0),n.hideCheckbox&&t.error("'hideCheckbox' node option was removed in v2.23.0: use 'checkbox: false'"),n.data&&t.extend(this.data,n.data),n)m[a]||!this.tree.options.copyFunctionsToData&&t.isFunction(n[a])||_[a]||(this.data[a]=n[a]);null==this.key?this.tree.options.defaultKey?(this.key=""+this.tree.options.defaultKey(this),b(this.key,"defaultKey() must return a unique key")):this.key="_"+r._nextNodeKey++:this.key=""+this.key,n.active&&(b(null===this.tree.activeNode,"only one active node allowed"),this.tree.activeNode=this),n.selected&&(this.tree.lastSelectedNode=this),(s=n.children)?s.length?this._setChildren(s):this.children=this.lazy?[]:null:this.children=null,this.tree._callHook("treeRegisterNode",this.tree,!0,this)}function P(e){this.widget=e,this.$div=e.element,this.options=e.options,this.options&&(void 0!==this.options.lazyload&&t.error("The 'lazyload' event is deprecated since 2014-02-25. Use 'lazyLoad' (with uppercase L) instead."),void 0!==this.options.loaderror&&t.error("The 'loaderror' event was renamed since 2014-07-03. Use 'loadError' (with uppercase E) instead."),void 0!==this.options.fx&&t.error("The 'fx' option was replaced by 'toggleEffect' since 2014-11-30."),void 0!==this.options.removeNode&&t.error("The 'removeNode' event was replaced by 'modifyChild' since 2.20 (2016-09-10).")),this.ext={},this.types={},this.columns={},this.data=I(this.$div),this._id=""+(this.options.treeId||t.ui.fancytree._nextId++),this._ns=".fancytree-"+this._id,this.activeNode=null,this.focusNode=null,this._hasFocus=null,this._tempCache={},this._lastMousedownNode=null,this._enableUpdate=!0,this.lastSelectedNode=null,this.systemFocusElement=null,this.lastQuicksearchTerm="",this.lastQuicksearchTime=0,this.viewport=null,this.statusClassPropName="span",this.ariaPropName="li",this.nodeContainerAttrName="li",this.$div.find(">ul.fancytree-container").remove();var n,i={tree:this};this.rootNode=new R(i,{title:"root",key:"root_"+this._id,children:null,expanded:!0}),this.rootNode.parent=null,n=t("<ul>",{id:"ft-id-"+this._id,class:"ui-fancytree fancytree-container fancytree-plain"}).appendTo(this.$div),this.$container=n,this.rootNode.ul=n[0],null==this.options.debugLevel&&(this.options.debugLevel=r.debugLevel)}t.ui.fancytree.warn("Fancytree: ignored duplicate include")},i=[n(46),n(389)],void 0===(o="function"===typeof(r=a)?r.apply(e,i):r)||(t.exports=o)},function(t,e){},function(t,e){},function(t,e,n){"use strict";e.a={BOTTOM_LEFT:"bottom-left",BOTTOM_RIGHT:"bottom-right",TOP_LEFT:"top-left",TOP_RIGHT:"top-right"}},function(t,e,n){"use strict";e.b=function(t,e,n,r,i,o){var a=u.a.get(e,r,o);a||(a=new f(t,e,n,r,i,o),u.a.set(e,r,o,a));return a};var r,i=n(68),o=n(3),a=n(33),s=n(61),l=n(11),u=n(173),c=n(63),h=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),p=null,f=function(t){function e(e,n,r,i,o,a){var s=t.call(this)||this;return s.hitDetectionImage_=null,s.image_=e||new Image,null!==i&&(s.image_.crossOrigin=i),s.canvas_={},s.color_=a,s.unlisten_=null,s.imageState_=o,s.size_=r,s.src_=n,s.tainted_,s}return h(e,t),e.prototype.isTainted_=function(){if(void 0===this.tainted_&&this.imageState_===a.a.LOADED){p||(p=Object(l.a)(1,1)),p.drawImage(this.image_,0,0);try{p.getImageData(0,0,1,1),this.tainted_=!1}catch(t){p=null,this.tainted_=!0}}return!0===this.tainted_},e.prototype.dispatchChangeEvent_=function(){this.dispatchEvent(o.a.CHANGE)},e.prototype.handleImageError_=function(){this.imageState_=a.a.ERROR,this.unlistenImage_(),this.dispatchChangeEvent_()},e.prototype.handleImageLoad_=function(){this.imageState_=a.a.LOADED,this.size_?(this.image_.width=this.size_[0],this.image_.height=this.size_[1]):this.size_=[this.image_.width,this.image_.height],this.unlistenImage_(),this.dispatchChangeEvent_()},e.prototype.getImage=function(t){return this.replaceColor_(t),this.canvas_[t]?this.canvas_[t]:this.image_},e.prototype.getPixelRatio=function(t){return this.replaceColor_(t),this.canvas_[t]?t:1},e.prototype.getImageState=function(){return this.imageState_},e.prototype.getHitDetectionImage=function(){if(!this.hitDetectionImage_)if(this.isTainted_()){var t=this.size_[0],e=this.size_[1],n=Object(l.a)(t,e);n.fillRect(0,0,t,e),this.hitDetectionImage_=n.canvas}else this.hitDetectionImage_=this.image_;return this.hitDetectionImage_},e.prototype.getSize=function(){return this.size_},e.prototype.getSrc=function(){return this.src_},e.prototype.load=function(){if(this.imageState_==a.a.IDLE){this.imageState_=a.a.LOADING;try{this.image_.src=this.src_}catch(t){this.handleImageError_()}this.unlisten_=Object(c.b)(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this))}},e.prototype.replaceColor_=function(t){if(this.color_&&!this.canvas_[t]){var e=document.createElement("canvas");this.canvas_[t]=e,e.width=Math.ceil(this.image_.width*t),e.height=Math.ceil(this.image_.height*t);var n=e.getContext("2d");if(n.scale(t,t),n.drawImage(this.image_,0,0),n.globalCompositeOperation="multiply","multiply"===n.globalCompositeOperation||this.isTainted_())n.fillStyle=Object(s.b)(this.color_),n.fillRect(0,0,e.width/t,e.height/t),n.globalCompositeOperation="destination-in",n.drawImage(this.image_,0,0);else{for(var r=n.getImageData(0,0,e.width,e.height),i=r.data,o=this.color_[0]/255,a=this.color_[1]/255,l=this.color_[2]/255,u=this.color_[3],c=0,h=i.length;c<h;c+=4)i[c]*=o,i[c+1]*=a,i[c+2]*=l,i[c+3]*=u;n.putImageData(r,0,0)}}},e.prototype.unlistenImage_=function(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)},e}(i.a);e.a=f},function(t,e,n){"use strict";n.d(e,"a",function(){return a});var r=n(61),i=function(){function t(){this.cache_={},this.cacheSize_=0,this.maxCacheSize_=32}return t.prototype.clear=function(){this.cache_={},this.cacheSize_=0},t.prototype.canExpireCache=function(){return this.cacheSize_>this.maxCacheSize_},t.prototype.expire=function(){if(this.canExpireCache()){var t=0;for(var e in this.cache_){var n=this.cache_[e];0!==(3&t++)||n.hasListener()||(delete this.cache_[e],--this.cacheSize_)}}},t.prototype.get=function(t,e,n){var r=o(t,e,n);return r in this.cache_?this.cache_[r]:null},t.prototype.set=function(t,e,n,r){var i=o(t,e,n);this.cache_[i]=r,++this.cacheSize_},t.prototype.setSize=function(t){this.maxCacheSize_=t,this.expire()},t}();function o(t,e,n){return e+":"+t+":"+(n?Object(r.b)(n):"null")}var a=new i},function(t,e,n){"use strict";e.a={BOTTOM_LEFT:"bottom-left",BOTTOM_RIGHT:"bottom-right",TOP_LEFT:"top-left",TOP_RIGHT:"top-right"}},function(t,e,n){"use strict";e.a={UNKNOWN:0,INTERSECTING:1,ABOVE:2,RIGHT:4,BELOW:8,LEFT:16}},function(t,e,n){"use strict";e.a={POINT:"point",LINE:"line"}},function(t,e,n){"use strict";var r,i=n(42),o=n(3),a=n(34),s=n(5),l=n(54),u=n(11),c=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),h=function(t){function e(e){var n=this,r=e||{};(n=t.call(this,{element:document.createElement("div"),render:r.render,target:r.target})||this).ulElement_=document.createElement("ul"),n.collapsed_=void 0===r.collapsed||r.collapsed,n.userCollapsed_=n.collapsed_,n.overrideCollapsible_=void 0!==r.collapsible,n.collapsible_=void 0===r.collapsible||r.collapsible,n.collapsible_||(n.collapsed_=!1);var i=void 0!==r.className?r.className:"ol-attribution",s=void 0!==r.tipLabel?r.tipLabel:"Attributions",l=void 0!==r.expandClassName?r.expandClassName:i+"-expand",u=void 0!==r.collapseLabel?r.collapseLabel:"\xbb",c=void 0!==r.collapseClassName?r.collapseClassName:i+"-collpase";"string"===typeof u?(n.collapseLabel_=document.createElement("span"),n.collapseLabel_.textContent=u,n.collapseLabel_.className=c):n.collapseLabel_=u;var h=void 0!==r.label?r.label:"i";"string"===typeof h?(n.label_=document.createElement("span"),n.label_.textContent=h,n.label_.className=l):n.label_=h;var p=n.collapsible_&&!n.collapsed_?n.collapseLabel_:n.label_;n.toggleButton_=document.createElement("button"),n.toggleButton_.setAttribute("type","button"),n.toggleButton_.setAttribute("aria-expanded",String(!n.collapsed_)),n.toggleButton_.title=s,n.toggleButton_.appendChild(p),n.toggleButton_.addEventListener(o.a.CLICK,n.handleClick_.bind(n),!1);var f=i+" "+a.e+" "+a.b+(n.collapsed_&&n.collapsible_?" "+a.a:"")+(n.collapsible_?"":" ol-uncollapsible"),d=n.element;return d.className=f,d.appendChild(n.toggleButton_),d.appendChild(n.ulElement_),n.renderedAttributions_=[],n.renderedVisible_=!0,n}return c(e,t),e.prototype.collectSourceAttributions_=function(t){for(var e={},n=[],r=!0,i=t.layerStatesArray,o=0,a=i.length;o<a;++o){var s=i[o];if(Object(l.b)(s,t.viewState)){var u=s.layer.getSource();if(u){var c=u.getAttributions();if(c){var h=c(t);if(h)if(r=r&&!1!==u.getAttributionsCollapsible(),Array.isArray(h))for(var p=0,f=h.length;p<f;++p)h[p]in e||(n.push(h[p]),e[h[p]]=!0);else h in e||(n.push(h),e[h]=!0)}}}}return this.overrideCollapsible_||this.setCollapsible(r),n},e.prototype.updateElement_=function(t){if(t){var e=this.collectSourceAttributions_(t),n=e.length>0;if(this.renderedVisible_!=n&&(this.element.style.display=n?"":"none",this.renderedVisible_=n),!Object(s.b)(e,this.renderedAttributions_)){Object(u.d)(this.ulElement_);for(var r=0,i=e.length;r<i;++r){var o=document.createElement("li");o.innerHTML=e[r],this.ulElement_.appendChild(o)}this.renderedAttributions_=e}}else this.renderedVisible_&&(this.element.style.display="none",this.renderedVisible_=!1)},e.prototype.handleClick_=function(t){t.preventDefault(),this.handleToggle_(),this.userCollapsed_=this.collapsed_},e.prototype.handleToggle_=function(){this.element.classList.toggle(a.a),this.collapsed_?Object(u.g)(this.collapseLabel_,this.label_):Object(u.g)(this.label_,this.collapseLabel_),this.collapsed_=!this.collapsed_,this.toggleButton_.setAttribute("aria-expanded",String(!this.collapsed_))},e.prototype.getCollapsible=function(){return this.collapsible_},e.prototype.setCollapsible=function(t){this.collapsible_!==t&&(this.collapsible_=t,this.element.classList.toggle("ol-uncollapsible"),this.userCollapsed_&&this.handleToggle_())},e.prototype.setCollapsed=function(t){this.userCollapsed_=t,this.collapsible_&&this.collapsed_!==t&&this.handleToggle_()},e.prototype.getCollapsed=function(){return this.collapsed_},e.prototype.render=function(t){this.updateElement_(t.frameState)},e}(i.a);e.a=h},function(t,e,n){"use strict";var r=n(24),i=n(179),o=n(6),a=n(4),s=n(1),l=n(7);function u(t){"@babel/helpers - typeof";return(u="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var c,h=this&&this.__extends||(c=function(t,e){return(c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}c(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),p=function(t){function e(e){var n=t.call(this)||this;n.on,n.once,n.un;var r=Object(s.a)({},e);return"object"===u(e.properties)&&(delete r.properties,Object(s.a)(r,e.properties)),r[i.a.OPACITY]=void 0!==e.opacity?e.opacity:1,Object(a.a)("number"===typeof r[i.a.OPACITY],64),r[i.a.VISIBLE]=void 0===e.visible||e.visible,r[i.a.Z_INDEX]=e.zIndex,r[i.a.MAX_RESOLUTION]=void 0!==e.maxResolution?e.maxResolution:1/0,r[i.a.MIN_RESOLUTION]=void 0!==e.minResolution?e.minResolution:0,r[i.a.MIN_ZOOM]=void 0!==e.minZoom?e.minZoom:-1/0,r[i.a.MAX_ZOOM]=void 0!==e.maxZoom?e.maxZoom:1/0,n.className_=void 0!==r.className?e.className:"ol-layer",delete r.className,n.setProperties(r),n.state_=null,n}return h(e,t),e.prototype.getClassName=function(){return this.className_},e.prototype.getLayerState=function(t){var e=this.state_||{layer:this,managed:void 0===t||t},n=this.getZIndex();return e.opacity=Object(l.a)(Math.round(100*this.getOpacity())/100,0,1),e.sourceState=this.getSourceState(),e.visible=this.getVisible(),e.extent=this.getExtent(),e.zIndex=void 0!==n||e.managed?n: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},e.prototype.getLayersArray=function(t){return Object(o.b)()},e.prototype.getLayerStatesArray=function(t){return Object(o.b)()},e.prototype.getExtent=function(){return this.get(i.a.EXTENT)},e.prototype.getMaxResolution=function(){return this.get(i.a.MAX_RESOLUTION)},e.prototype.getMinResolution=function(){return this.get(i.a.MIN_RESOLUTION)},e.prototype.getMinZoom=function(){return this.get(i.a.MIN_ZOOM)},e.prototype.getMaxZoom=function(){return this.get(i.a.MAX_ZOOM)},e.prototype.getOpacity=function(){return this.get(i.a.OPACITY)},e.prototype.getSourceState=function(){return Object(o.b)()},e.prototype.getVisible=function(){return this.get(i.a.VISIBLE)},e.prototype.getZIndex=function(){return this.get(i.a.Z_INDEX)},e.prototype.setExtent=function(t){this.set(i.a.EXTENT,t)},e.prototype.setMaxResolution=function(t){this.set(i.a.MAX_RESOLUTION,t)},e.prototype.setMinResolution=function(t){this.set(i.a.MIN_RESOLUTION,t)},e.prototype.setMaxZoom=function(t){this.set(i.a.MAX_ZOOM,t)},e.prototype.setMinZoom=function(t){this.set(i.a.MIN_ZOOM,t)},e.prototype.setOpacity=function(t){Object(a.a)("number"===typeof t,64),this.set(i.a.OPACITY,t)},e.prototype.setVisible=function(t){this.set(i.a.VISIBLE,t)},e.prototype.setZIndex=function(t){this.set(i.a.Z_INDEX,t)},e.prototype.disposeInternal=function(){this.state_&&(this.state_.layer=null,this.state_=null),t.prototype.disposeInternal.call(this)},e}(r.a);e.a=p},function(t,e,n){"use strict";e.a={OPACITY:"opacity",VISIBLE:"visible",EXTENT:"extent",Z_INDEX:"zIndex",MAX_RESOLUTION:"maxResolution",MIN_RESOLUTION:"minResolution",MAX_ZOOM:"maxZoom",MIN_ZOOM:"minZoom",SOURCE:"source"}},function(t,e,n){"use strict";var r,i=n(42),o=n(3),a=n(34),s=n(47),l=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),u=function(t){function e(e){var n=this,r=e||{};n=t.call(this,{element:document.createElement("div"),render:r.render,target:r.target})||this;var i=void 0!==r.className?r.className:"ol-rotate",s=void 0!==r.label?r.label:"\u21e7",l=void 0!==r.compassClassName?r.compassClassName:"ol-compass";n.label_=null,"string"===typeof s?(n.label_=document.createElement("span"),n.label_.className=l,n.label_.textContent=s):(n.label_=s,n.label_.classList.add(l));var u=r.tipLabel?r.tipLabel:"Reset rotation",c=document.createElement("button");c.className=i+"-reset",c.setAttribute("type","button"),c.title=u,c.appendChild(n.label_),c.addEventListener(o.a.CLICK,n.handleClick_.bind(n),!1);var h=i+" "+a.e+" "+a.b,p=n.element;return p.className=h,p.appendChild(c),n.callResetNorth_=r.resetNorth?r.resetNorth:void 0,n.duration_=void 0!==r.duration?r.duration:250,n.autoHide_=void 0===r.autoHide||r.autoHide,n.rotation_=void 0,n.autoHide_&&n.element.classList.add(a.c),n}return l(e,t),e.prototype.handleClick_=function(t){t.preventDefault(),void 0!==this.callResetNorth_?this.callResetNorth_():this.resetNorth_()},e.prototype.resetNorth_=function(){var t=this.getMap().getView();if(t){var e=t.getRotation();void 0!==e&&(this.duration_>0&&e%(2*Math.PI)!==0?t.animate({rotation:0,duration:this.duration_,easing:s.b}):t.setRotation(0))}},e.prototype.render=function(t){var e=t.frameState;if(e){var n=e.viewState.rotation;if(n!=this.rotation_){var r="rotate("+n+"rad)";if(this.autoHide_){var i=this.element.classList.contains(a.c);i||0!==n?i&&0!==n&&this.element.classList.remove(a.c):this.element.classList.add(a.c)}this.label_.style.transform=r}this.rotation_=n}},e}(i.a);e.a=u},function(t,e,n){"use strict";var r,i=n(42),o=n(3),a=n(34),s=n(47),l=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),u=function(t){function e(e){var n=this,r=e||{};n=t.call(this,{element:document.createElement("div"),target:r.target})||this;var i=void 0!==r.className?r.className:"ol-zoom",s=void 0!==r.delta?r.delta:1,l=void 0!==r.zoomInClassName?r.zoomInClassName:i+"-in",u=void 0!==r.zoomOutClassName?r.zoomOutClassName:i+"-out",c=void 0!==r.zoomInLabel?r.zoomInLabel:"+",h=void 0!==r.zoomOutLabel?r.zoomOutLabel:"\u2212",p=void 0!==r.zoomInTipLabel?r.zoomInTipLabel:"Zoom in",f=void 0!==r.zoomOutTipLabel?r.zoomOutTipLabel:"Zoom out",d=document.createElement("button");d.className=l,d.setAttribute("type","button"),d.title=p,d.appendChild("string"===typeof c?document.createTextNode(c):c),d.addEventListener(o.a.CLICK,n.handleClick_.bind(n,s),!1);var g=document.createElement("button");g.className=u,g.setAttribute("type","button"),g.title=f,g.appendChild("string"===typeof h?document.createTextNode(h):h),g.addEventListener(o.a.CLICK,n.handleClick_.bind(n,-s),!1);var y=i+" "+a.e+" "+a.b,m=n.element;return m.className=y,m.appendChild(d),m.appendChild(g),n.duration_=void 0!==r.duration?r.duration:250,n}return l(e,t),e.prototype.handleClick_=function(t,e){e.preventDefault(),this.zoomByDelta_(t)},e.prototype.zoomByDelta_=function(t){var e=this.getMap().getView();if(e){var n=e.getZoom();if(void 0!==n){var r=e.getConstrainedZoom(n+t);this.duration_>0?(e.getAnimating()&&e.cancelAnimations(),e.animate({zoom:r,duration:this.duration_,easing:s.b})):e.setZoom(r)}}},e}(i.a);e.a=u},function(t,e,n){"use strict";e.a=o,e.b=function(t,e,n,o){var a=o||i,s=Object(r.j)(t[1]),l=Object(r.j)(t[0]),u=e/a,c=Math.asin(Math.sin(s)*Math.cos(u)+Math.cos(s)*Math.sin(u)*Math.cos(n)),h=l+Math.atan2(Math.sin(n)*Math.sin(u)*Math.cos(s),Math.cos(u)-Math.sin(s)*Math.sin(c));return[Object(r.i)(h),Object(r.i)(c)]};n(8);var r=n(7),i=6371008.8;function o(t,e,n){var o=n||i,a=Object(r.j)(t[1]),s=Object(r.j)(e[1]),l=(s-a)/2,u=Object(r.j)(e[0]-t[0])/2,c=Math.sin(l)*Math.sin(l)+Math.sin(u)*Math.sin(u)*Math.cos(a)*Math.cos(s);return 2*o*Math.atan2(Math.sqrt(c),Math.sqrt(1-c))}},function(t,e,n){"use strict";var r,i=n(262),o=n(67),a=n(133),s=n(71),l=n(31),u=n(34),c=n(40),h=n(54),p=n(9),f=n(11),d=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),g=function(t){function e(e){var n=t.call(this,e)||this;n.fontChangeListenerKey_=Object(p.listen)(c.a,o.a.PROPERTYCHANGE,e.redrawText.bind(e)),n.element_=document.createElement("div");var r=n.element_.style;r.position="absolute",r.width="100%",r.height="100%",r.zIndex="0",n.element_.className=u.e+" ol-layers";var i=e.getViewport();return i.insertBefore(n.element_,i.firstChild||null),n.children_=[],n.renderedVisible_=!0,n}return d(e,t),e.prototype.dispatchRenderEvent=function(t,e){var n=this.getMap();if(n.hasListener(t)){var r=new a.a(t,void 0,e);n.dispatchEvent(r)}},e.prototype.disposeInternal=function(){Object(p.unlistenByKey)(this.fontChangeListenerKey_),this.element_.parentNode.removeChild(this.element_),t.prototype.disposeInternal.call(this)},e.prototype.renderFrame=function(t){if(t){this.calculateMatrices2D(t),this.dispatchRenderEvent(s.a.PRECOMPOSE,t);var e=t.layerStatesArray.sort(function(t,e){return t.zIndex-e.zIndex}),n=t.viewState;this.children_.length=0;for(var r=[],i=null,o=0,a=e.length;o<a;++o){var u=e[o];if(t.layerIndex=o,Object(h.b)(u,n)&&(u.sourceState==l.a.READY||u.sourceState==l.a.UNDEFINED)){var c=u.layer,p=c.render(t,i);p&&(p!==i&&(this.children_.push(p),i=p),"getDeclutter"in c&&r.push(c))}}for(o=r.length-1;o>=0;--o)r[o].renderDeclutter(t);Object(f.f)(this.element_,this.children_),this.dispatchRenderEvent(s.a.POSTCOMPOSE,t),this.renderedVisible_||(this.element_.style.display="",this.renderedVisible_=!0),this.scheduleExpireIconCache(t)}else this.renderedVisible_&&(this.element_.style.display="none",this.renderedVisible_=!1)},e.prototype.forEachLayerAtPixel=function(t,e,n,r,i){for(var o=e.viewState,a=e.layerStatesArray,s=a.length-1;s>=0;--s){var l=a[s],u=l.layer;if(u.hasRenderer()&&Object(h.b)(l,o)&&i(u)){var c=u.getRenderer().getDataAtPixel(t,e,n);if(c){var p=r(u,c);if(p)return p}}}},e}(i.a);e.a=g},function(t,e,n){"use strict";e.a={LAYERGROUP:"layergroup",SIZE:"size",TARGET:"target",VIEW:"view"}},function(t,e,n){"use strict";e.a={BOTTOM_LEFT:"bottom-left",BOTTOM_CENTER:"bottom-center",BOTTOM_RIGHT:"bottom-right",CENTER_LEFT:"center-left",CENTER_CENTER:"center-center",CENTER_RIGHT:"center-right",TOP_LEFT:"top-left",TOP_CENTER:"top-center",TOP_RIGHT:"top-right"}},function(t,e,n){"use strict";var r,i=n(178),o=n(25),a=n(64),s=n(3),l=n(67),u=n(31),c=n(4),h=n(1),p=n(0),f=n(6),d=n(9),g=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),y={LAYERS:"layers"},m=function(t){function e(e){var n=this,r=e||{},i=Object(h.a)({},r);delete i.layers;var a=r.layers;return(n=t.call(this,i)||this).layersListenerKeys_=[],n.listenerKeys_={},n.addChangeListener(y.LAYERS,n.handleLayersChanged_),a?Array.isArray(a)?a=new o.a(a.slice(),{unique:!0}):Object(c.a)("function"===typeof a.getArray,43):a=new o.a(void 0,{unique:!0}),n.setLayers(a),n}return g(e,t),e.prototype.handleLayerChange_=function(){this.changed()},e.prototype.handleLayersChanged_=function(){this.layersListenerKeys_.forEach(d.unlistenByKey),this.layersListenerKeys_.length=0;var t=this.getLayers();for(var e in this.layersListenerKeys_.push(Object(d.listen)(t,a.a.ADD,this.handleLayersAdd_,this),Object(d.listen)(t,a.a.REMOVE,this.handleLayersRemove_,this)),this.listenerKeys_)this.listenerKeys_[e].forEach(d.unlistenByKey);Object(h.b)(this.listenerKeys_);for(var n=t.getArray(),r=0,i=n.length;r<i;r++){var o=n[r];this.listenerKeys_[Object(f.c)(o)]=[Object(d.listen)(o,l.a.PROPERTYCHANGE,this.handleLayerChange_,this),Object(d.listen)(o,s.a.CHANGE,this.handleLayerChange_,this)]}this.changed()},e.prototype.handleLayersAdd_=function(t){var e=t.element;this.listenerKeys_[Object(f.c)(e)]=[Object(d.listen)(e,l.a.PROPERTYCHANGE,this.handleLayerChange_,this),Object(d.listen)(e,s.a.CHANGE,this.handleLayerChange_,this)],this.changed()},e.prototype.handleLayersRemove_=function(t){var e=t.element,n=Object(f.c)(e);this.listenerKeys_[n].forEach(d.unlistenByKey),delete this.listenerKeys_[n],this.changed()},e.prototype.getLayers=function(){return this.get(y.LAYERS)},e.prototype.setLayers=function(t){this.set(y.LAYERS,t)},e.prototype.getLayersArray=function(t){var e=void 0!==t?t:[];return this.getLayers().forEach(function(t){t.getLayersArray(e)}),e},e.prototype.getLayerStatesArray=function(t){var e=void 0!==t?t:[],n=e.length;this.getLayers().forEach(function(t){t.getLayerStatesArray(e)});var r=this.getLayerState(),i=r.zIndex;t||void 0!==r.zIndex||(i=0);for(var o=n,a=e.length;o<a;o++){var s=e[o];s.opacity*=r.opacity,s.visible=s.visible&&r.visible,s.maxResolution=Math.min(s.maxResolution,r.maxResolution),s.minResolution=Math.max(s.minResolution,r.minResolution),s.minZoom=Math.max(s.minZoom,r.minZoom),s.maxZoom=Math.min(s.maxZoom,r.maxZoom),void 0!==r.extent&&(void 0!==s.extent?s.extent=Object(p.getIntersection)(s.extent,r.extent):s.extent=r.extent),void 0===s.zIndex&&(s.zIndex=i)}return e},e.prototype.getSourceState=function(){return u.a.READY},e}(i.a);e.a=m},function(t,e,n){"use strict";var r,i=n(3),o=n(108),a=n(55),s=n(105),l=n(68),u=n(39),c=n(13),h=n(9),p=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),f=function(t){function e(e,n){var r=t.call(this,e)||this;r.map_=e,r.clickTimeoutId_,r.emulateClicks_=!1,r.dragging_=!1,r.dragListenerKeys_=[],r.moveTolerance_=void 0===n?1:n,r.down_=null;var o=r.map_.getViewport();return r.activePointers_=0,r.trackedTouches_={},r.element_=o,r.pointerdownListenerKey_=Object(h.listen)(o,s.a.POINTERDOWN,r.handlePointerDown_,r),r.originalPointerMoveEvent_,r.relayedListenerKey_=Object(h.listen)(o,s.a.POINTERMOVE,r.relayEvent_,r),r.boundHandleTouchMove_=r.handleTouchMove_.bind(r),r.element_.addEventListener(i.a.TOUCHMOVE,r.boundHandleTouchMove_,!!u.e&&{passive:!1}),r}return p(e,t),e.prototype.emulateClick_=function(t){var e=new o.a(a.a.CLICK,this.map_,t);this.dispatchEvent(e),void 0!==this.clickTimeoutId_?(clearTimeout(this.clickTimeoutId_),this.clickTimeoutId_=void 0,e=new o.a(a.a.DBLCLICK,this.map_,t),this.dispatchEvent(e)):this.clickTimeoutId_=setTimeout(function(){this.clickTimeoutId_=void 0;var e=new o.a(a.a.SINGLECLICK,this.map_,t);this.dispatchEvent(e)}.bind(this),250)},e.prototype.updateActivePointers_=function(t){var e=t;e.type==a.a.POINTERUP||e.type==a.a.POINTERCANCEL?delete this.trackedTouches_[e.pointerId]:e.type==a.a.POINTERDOWN&&(this.trackedTouches_[e.pointerId]=!0),this.activePointers_=Object.keys(this.trackedTouches_).length},e.prototype.handlePointerUp_=function(t){this.updateActivePointers_(t);var e=new o.a(a.a.POINTERUP,this.map_,t);this.dispatchEvent(e),this.emulateClicks_&&!e.defaultPrevented&&!this.dragging_&&this.isMouseActionButton_(t)&&this.emulateClick_(this.down_),0===this.activePointers_&&(this.dragListenerKeys_.forEach(h.unlistenByKey),this.dragListenerKeys_.length=0,this.dragging_=!1,this.down_=null)},e.prototype.isMouseActionButton_=function(t){return 0===t.button},e.prototype.handlePointerDown_=function(t){this.emulateClicks_=0===this.activePointers_,this.updateActivePointers_(t);var e=new o.a(a.a.POINTERDOWN,this.map_,t);for(var n in this.dispatchEvent(e),this.down_={},t){var r=t[n];this.down_[n]="function"===typeof r?c.c:r}if(0===this.dragListenerKeys_.length){var i=this.map_.getOwnerDocument();this.dragListenerKeys_.push(Object(h.listen)(i,a.a.POINTERMOVE,this.handlePointerMove_,this),Object(h.listen)(i,a.a.POINTERUP,this.handlePointerUp_,this),Object(h.listen)(this.element_,a.a.POINTERCANCEL,this.handlePointerUp_,this)),this.element_.getRootNode&&this.element_.getRootNode()!==i&&this.dragListenerKeys_.push(Object(h.listen)(this.element_.getRootNode(),a.a.POINTERUP,this.handlePointerUp_,this))}},e.prototype.handlePointerMove_=function(t){if(this.isMoving_(t)){this.dragging_=!0;var e=new o.a(a.a.POINTERDRAG,this.map_,t,this.dragging_);this.dispatchEvent(e)}},e.prototype.relayEvent_=function(t){this.originalPointerMoveEvent_=t;var e=!(!this.down_||!this.isMoving_(t));this.dispatchEvent(new o.a(t.type,this.map_,t,e))},e.prototype.handleTouchMove_=function(t){var e=this.originalPointerMoveEvent_;e&&!e.defaultPrevented||"boolean"===typeof t.cancelable&&!0!==t.cancelable||t.preventDefault()},e.prototype.isMoving_=function(t){return this.dragging_||Math.abs(t.clientX-this.down_.clientX)>this.moveTolerance_||Math.abs(t.clientY-this.down_.clientY)>this.moveTolerance_},e.prototype.disposeInternal=function(){this.relayedListenerKey_&&(Object(h.unlistenByKey)(this.relayedListenerKey_),this.relayedListenerKey_=null),this.element_.removeEventListener(i.a.TOUCHMOVE,this.boundHandleTouchMove_),this.pointerdownListenerKey_&&(Object(h.unlistenByKey)(this.pointerdownListenerKey_),this.pointerdownListenerKey_=null),this.dragListenerKeys_.forEach(h.unlistenByKey),this.dragListenerKeys_.length=0,this.element_=null,t.prototype.disposeInternal.call(this)},e}(l.a);e.a=f},function(t,e,n){"use strict";e.a={CENTER:"center",RESOLUTION:"resolution",ROTATION:"rotation"}},function(t,e,n){"use strict";e.c=function(t,e,n,i){return function(l,u,c,h){if(void 0!==l){var p=t[0],f=t[t.length-1],d=n?a(p,n,c,i):p;if(h){var g=void 0===e||e;return g?s(l,d,f):Object(r.a)(l,f,d)}var y=Math.min(d,l),m=Math.floor(Object(o.h)(t,y,u));return t[m]>d&&m<t.length-1?t[m+1]:t[m]}}},e.b=function(t,e,n,i,o,l){return function(u,c,h,p){if(void 0!==u){var f=o?a(e,o,h,l):e,d=void 0!==n?n:0;if(p){var g=void 0===i||i;return g?s(u,f,d):Object(r.a)(u,d,f)}var y=Math.ceil(Math.log(e/f)/Math.log(t)-1e-9),m=-c*(.5-1e-9)+.5,v=Math.min(f,u),_=Math.floor(Math.log(e/v)/Math.log(t)+m),b=Math.max(y,_),w=e/Math.pow(t,b);return Object(r.a)(w,d,f)}}},e.a=function(t,e,n,i,o){return function(l,u,c,h){if(void 0!==l){var p=i?a(t,i,c,o):t,f=void 0===n||n;return f&&h?s(l,p,e):Object(r.a)(l,e,p)}}};var r=n(7),i=n(0),o=n(5);function a(t,e,n,r){var o=Object(i.getWidth)(e)/n[0],a=Object(i.getHeight)(e)/n[1];return r?Math.min(t,Math.max(o,a)):Math.min(t,Math.min(o,a))}function s(t,e,n){var i=Math.min(t,e);return i*=Math.log(1+50*Math.max(0,t/e-1))/50+1,n&&(i=Math.max(i,n),i/=Math.log(1+50*Math.max(0,n/t-1))/50+1),Object(r.a)(i,n/2,2*e)}},function(t,e,n){"use strict";e.a=function(t,e,n,r,i){for(var o,a=[t[e],t[e+1]],s=[];e+r<n;e+=r){if(s[0]=t[e+r],s[1]=t[e+r+1],o=i(a,s))return o;a[0]=s[0],a[1]=s[1]}return!1}},function(t,e,n){"use strict";var r,i=n(25),o=n(71),a=n(15),s=n(62),l=n(17),u=n(21),c=n(16),h=n(70),p=n(35),f=n(82),d=n(49),g=n(50),y=n(0),m=n(1),v=n(7),_=n(20),b=n(2),w=n(277),O=n(278),x=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),E=new h.a({color:"rgba(0,0,0,0.2)"}),S=[90,45,30,20,10,5,2,1,.5,.2,.1,.05,.01,.005,.002,.001],C=function(t){function e(e){var n=this,r=e||{},a=Object(m.a)({updateWhileAnimating:!0,updateWhileInteracting:!0,renderBuffer:0},r);return delete a.maxLines,delete a.strokeStyle,delete a.targetSize,delete a.showLabels,delete a.lonLabelFormatter,delete a.latLabelFormatter,delete a.lonLabelPosition,delete a.latLabelPosition,delete a.lonLabelStyle,delete a.latLabelStyle,delete a.intervals,(n=t.call(this,a)||this).projection_=null,n.maxLat_=1/0,n.maxLon_=1/0,n.minLat_=-1/0,n.minLon_=-1/0,n.maxX_=1/0,n.maxY_=1/0,n.minX_=-1/0,n.minY_=-1/0,n.targetSize_=void 0!==r.targetSize?r.targetSize:100,n.maxLines_=void 0!==r.maxLines?r.maxLines:100,n.meridians_=[],n.parallels_=[],n.strokeStyle_=void 0!==r.strokeStyle?r.strokeStyle:E,n.fromLonLatTransform_=void 0,n.toLonLatTransform_=void 0,n.projectionCenterLonLat_=null,n.bottomLeft_=null,n.bottomRight_=null,n.topLeft_=null,n.topRight_=null,n.meridiansLabels_=null,n.parallelsLabels_=null,r.showLabels&&(n.lonLabelFormatter_=void 0==r.lonLabelFormatter?_.d.bind(n,"EW"):r.lonLabelFormatter,n.latLabelFormatter_=void 0==r.latLabelFormatter?_.d.bind(n,"NS"):r.latLabelFormatter,n.lonLabelPosition_=void 0==r.lonLabelPosition?0:r.lonLabelPosition,n.latLabelPosition_=void 0==r.latLabelPosition?1:r.latLabelPosition,n.lonLabelStyleBase_=new p.c({text:void 0!==r.lonLabelStyle?r.lonLabelStyle.clone():new f.a({font:"12px Calibri,sans-serif",textBaseline:"bottom",fill:new s.a({color:"rgba(0,0,0,1)"}),stroke:new h.a({color:"rgba(255,255,255,1)",width:3})})}),n.lonLabelStyle_=function(t){var e=t.get("graticule_label");return this.lonLabelStyleBase_.getText().setText(e),this.lonLabelStyleBase_}.bind(n),n.latLabelStyleBase_=new p.c({text:void 0!==r.latLabelStyle?r.latLabelStyle.clone():new f.a({font:"12px Calibri,sans-serif",textAlign:"right",fill:new s.a({color:"rgba(0,0,0,1)"}),stroke:new h.a({color:"rgba(255,255,255,1)",width:3})})}),n.latLabelStyle_=function(t){var e=t.get("graticule_label");return this.latLabelStyleBase_.getText().setText(e),this.latLabelStyleBase_}.bind(n),n.meridiansLabels_=[],n.parallelsLabels_=[],n.addEventListener(o.a.POSTRENDER,n.drawLabels_.bind(n))),n.intervals_=void 0!==r.intervals?r.intervals:S,n.setSource(new g.a({loader:n.loaderFunction.bind(n),strategy:n.strategyFunction.bind(n),features:new i.a,overlaps:!1,useSpatialIndex:!1,wrapX:r.wrapX})),n.featurePool_=[],n.lineStyle_=new p.c({stroke:n.strokeStyle_}),n.loadedExtent_=null,n.renderedExtent_=null,n.setRenderOrder(null),n}return x(e,t),e.prototype.strategyFunction=function(t,e){var n=t.slice();return this.projection_&&this.getSource().getWrapX()&&Object(y.wrapX)(n,this.projection_),this.loadedExtent_&&(Object(y.approximatelyEquals)(this.loadedExtent_,n,e)?n=this.loadedExtent_.slice():this.getSource().removeLoadedExtent(this.loadedExtent_)),[n]},e.prototype.loaderFunction=function(t,e,n){this.loadedExtent_=t;var r=this.getSource(),i=this.getExtent()||[-1/0,-1/0,1/0,1/0],o=Object(y.getIntersection)(i,t);if((!this.renderedExtent_||!Object(y.equals)(this.renderedExtent_,o))&&(this.renderedExtent_=o,!Object(y.isEmpty)(o))){var s=Object(y.getCenter)(o),l=e*e/4;(!this.projection_||!Object(b.equivalent)(this.projection_,n))&&this.updateProjectionInfo_(n),this.createGraticule_(o,s,e,l);var u,c=this.meridians_.length+this.parallels_.length;for(this.meridiansLabels_&&(c+=this.meridians_.length),this.parallelsLabels_&&(c+=this.parallels_.length);c>this.featurePool_.length;)u=new a.a,this.featurePool_.push(u);var h=r.getFeaturesCollection();h.clear();var p,f,d=0;for(p=0,f=this.meridians_.length;p<f;++p)(u=this.featurePool_[d++]).setGeometry(this.meridians_[p]),u.setStyle(this.lineStyle_),h.push(u);for(p=0,f=this.parallels_.length;p<f;++p)(u=this.featurePool_[d++]).setGeometry(this.parallels_[p]),u.setStyle(this.lineStyle_),h.push(u)}},e.prototype.addMeridian_=function(t,e,n,r,i,o){var a=this.getMeridian_(t,e,n,r,o);if(Object(y.intersects)(a.getExtent(),i)){if(this.meridiansLabels_){var s=this.lonLabelFormatter_(t);o in this.meridiansLabels_?this.meridiansLabels_[o].text=s:this.meridiansLabels_[o]={geom:new c.a([]),text:s}}this.meridians_[o++]=a}return o},e.prototype.addParallel_=function(t,e,n,r,i,o){var a=this.getParallel_(t,e,n,r,o);if(Object(y.intersects)(a.getExtent(),i)){if(this.parallelsLabels_){var s=this.latLabelFormatter_(t);o in this.parallelsLabels_?this.parallelsLabels_[o].text=s:this.parallelsLabels_[o]={geom:new c.a([]),text:s}}this.parallels_[o++]=a}return o},e.prototype.drawLabels_=function(t){var e=t.frameState.viewState.rotation,n=t.frameState.extent,r=Object(y.getCenter)(n),i=n;if(e){var o=Object(y.getWidth)(n),a=Object(y.getHeight)(n),s=Math.abs(Math.cos(e)),l=Math.abs(Math.sin(e)),u=(l*a-s*o)/(l*l-s*s),c=(l*o-s*a)/(l*l-s*s);i=[r[0]-u/2,r[1]-c/2,r[0]+u/2,r[1]+c/2]}var h=0,p=0,f=this.latLabelPosition_<.5,d=this.projection_.getExtent(),g=Object(y.getWidth)(d);this.getSource().getWrapX()&&this.projection_.canWrapX()&&!Object(y.containsExtent)(d,n)&&(h=Math.floor((n[0]-d[0])/g),p=Math.ceil((n[2]-d[2])/g),f=f!==Math.abs(e)>Math.PI/2);for(var m=Object(w.a)(t),v=h;v<=p;++v){var _=this.meridians_.length+this.parallels_.length,b=void 0,O=void 0,x=void 0,E=void 0;if(this.meridiansLabels_)for(O=0,x=this.meridiansLabels_.length;O<x;++O){var S=this.meridians_[O];if(e||0!==v)(C=S.clone()).translate(v*g,0),C.rotate(-e,r),(E=this.getMeridianPoint_(C,i,O)).rotate(e,r);else E=this.getMeridianPoint_(S,n,O);(b=this.featurePool_[_++]).setGeometry(E),b.set("graticule_label",this.meridiansLabels_[O].text),m.drawFeature(b,this.lonLabelStyle_(b))}if(this.parallelsLabels_&&(v===h&&f||v===p&&!f))for(O=0,x=this.parallels_.length;O<x;++O){var C;S=this.parallels_[O];if(e||0!==v)(C=S.clone()).translate(v*g,0),C.rotate(-e,r),(E=this.getParallelPoint_(C,i,O)).rotate(e,r);else E=this.getParallelPoint_(S,n,O);(b=this.featurePool_[_++]).setGeometry(E),b.set("graticule_label",this.parallelsLabels_[O].text),m.drawFeature(b,this.latLabelStyle_(b))}}},e.prototype.createGraticule_=function(t,e,n,r){var i=this.getInterval_(n);if(-1==i)return this.meridians_.length=0,this.parallels_.length=0,this.meridiansLabels_&&(this.meridiansLabels_.length=0),void(this.parallelsLabels_&&(this.parallelsLabels_.length=0));var o=!1,a=this.projection_.getExtent(),s=Object(y.getWidth)(a);this.getSource().getWrapX()&&this.projection_.canWrapX()&&!Object(y.containsExtent)(a,t)&&(Object(y.getWidth)(t)>=s?(t[0]=a[0],t[2]=a[2]):o=!0);var l=[Object(v.a)(e[0],this.minX_,this.maxX_),Object(v.a)(e[1],this.minY_,this.maxY_)],u=this.toLonLatTransform_(l);isNaN(u[1])&&(u[1]=Math.abs(this.maxLat_)>=Math.abs(this.minLat_)?this.maxLat_:this.minLat_);var c,h,p,f,d=Object(v.a)(u[0],this.minLon_,this.maxLon_),g=Object(v.a)(u[1],this.minLat_,this.maxLat_),m=this.maxLines_,_=t;o||(_=[Object(v.a)(t[0],this.minX_,this.maxX_),Object(v.a)(t[1],this.minY_,this.maxY_),Object(v.a)(t[2],this.minX_,this.maxX_),Object(v.a)(t[3],this.minY_,this.maxY_)]);var b=Object(y.applyTransform)(_,this.toLonLatTransform_,void 0,8),w=b[3],O=b[2],x=b[1],E=b[0];if(o||(Object(y.containsCoordinate)(_,this.bottomLeft_)&&(E=this.minLon_,x=this.minLat_),Object(y.containsCoordinate)(_,this.bottomRight_)&&(O=this.maxLon_,x=this.minLat_),Object(y.containsCoordinate)(_,this.topLeft_)&&(E=this.minLon_,w=this.maxLat_),Object(y.containsCoordinate)(_,this.topRight_)&&(O=this.maxLon_,w=this.maxLat_),w=Object(v.a)(w,g,this.maxLat_),O=Object(v.a)(O,d,this.maxLon_),x=Object(v.a)(x,this.minLat_,g),E=Object(v.a)(E,this.minLon_,d)),d=Math.floor(d/i)*i,f=Object(v.a)(d,this.minLon_,this.maxLon_),h=this.addMeridian_(f,x,w,r,t,0),c=0,o)for(;(f-=i)>=E&&c++<m;)h=this.addMeridian_(f,x,w,r,t,h);else for(;f!=this.minLon_&&c++<m;)f=Math.max(f-i,this.minLon_),h=this.addMeridian_(f,x,w,r,t,h);if(f=Object(v.a)(d,this.minLon_,this.maxLon_),c=0,o)for(;(f+=i)<=O&&c++<m;)h=this.addMeridian_(f,x,w,r,t,h);else for(;f!=this.maxLon_&&c++<m;)f=Math.min(f+i,this.maxLon_),h=this.addMeridian_(f,x,w,r,t,h);for(this.meridians_.length=h,this.meridiansLabels_&&(this.meridiansLabels_.length=h),g=Math.floor(g/i)*i,p=Object(v.a)(g,this.minLat_,this.maxLat_),h=this.addParallel_(p,E,O,r,t,0),c=0;p!=this.minLat_&&c++<m;)p=Math.max(p-i,this.minLat_),h=this.addParallel_(p,E,O,r,t,h);for(p=Object(v.a)(g,this.minLat_,this.maxLat_),c=0;p!=this.maxLat_&&c++<m;)p=Math.min(p+i,this.maxLat_),h=this.addParallel_(p,E,O,r,t,h);this.parallels_.length=h,this.parallelsLabels_&&(this.parallelsLabels_.length=h)},e.prototype.getInterval_=function(t){for(var e=this.projectionCenterLonLat_[0],n=this.projectionCenterLonLat_[1],r=-1,i=Math.pow(this.targetSize_*t,2),o=[],a=[],s=0,l=this.intervals_.length;s<l;++s){var u=Object(v.a)(this.intervals_[s]/2,0,90),c=Object(v.a)(n,-90+u,90-u);if(o[0]=e-u,o[1]=c-u,a[0]=e+u,a[1]=c+u,this.fromLonLatTransform_(o,o),this.fromLonLatTransform_(a,a),Math.pow(a[0]-o[0],2)+Math.pow(a[1]-o[1],2)<=i)break;r=this.intervals_[s]}return r},e.prototype.getMeridian_=function(t,e,n,r,i){var o=Object(O.a)(t,e,n,this.projection_,r),a=this.meridians_[i];return a?(a.setFlatCoordinates(l.a.XY,o),a.changed()):(a=new u.a(o,l.a.XY),this.meridians_[i]=a),a},e.prototype.getMeridianPoint_=function(t,e,n){var r=t.getFlatCoordinates(),i=1,o=r.length-1;r[i]>r[o]&&(i=o,o=1);var a=Math.max(e[1],r[i]),s=Math.min(e[3],r[o]),l=Object(v.a)(e[1]+Math.abs(e[1]-e[3])*this.lonLabelPosition_,a,s),u=[r[i-1]+(r[o-1]-r[i-1])*(l-r[i])/(r[o]-r[i]),l],c=this.meridiansLabels_[n].geom;return c.setCoordinates(u),c},e.prototype.getMeridians=function(){return this.meridians_},e.prototype.getParallel_=function(t,e,n,r,i){var o=Object(O.b)(t,e,n,this.projection_,r),a=this.parallels_[i];return a?(a.setFlatCoordinates(l.a.XY,o),a.changed()):a=new u.a(o,l.a.XY),a},e.prototype.getParallelPoint_=function(t,e,n){var r=t.getFlatCoordinates(),i=0,o=r.length-2;r[i]>r[o]&&(i=o,o=0);var a=Math.max(e[0],r[i]),s=Math.min(e[2],r[o]),l=Object(v.a)(e[0]+Math.abs(e[0]-e[2])*this.latLabelPosition_,a,s),u=[l,r[i+1]+(r[o+1]-r[i+1])*(l-r[i])/(r[o]-r[i])],c=this.parallelsLabels_[n].geom;return c.setCoordinates(u),c},e.prototype.getParallels=function(){return this.parallels_},e.prototype.updateProjectionInfo_=function(t){var e=Object(b.get)("EPSG:4326"),n=t.getWorldExtent();this.maxLat_=n[3],this.maxLon_=n[2],this.minLat_=n[1],this.minLon_=n[0];var r=Object(b.getTransform)(t,e);if(this.minLon_<this.maxLon_)this.toLonLatTransform_=r;else{var i=this.minLon_+this.maxLon_/2;this.maxLon_+=360,this.toLonLatTransform_=function(t,e,n){for(var o=n||2,a=r(t,e,o),s=0,l=a.length;s<l;s+=o)a[s]<i&&(a[s]+=360);return a}}this.fromLonLatTransform_=Object(b.getTransform)(e,t);var o=Object(y.applyTransform)([this.minLon_,this.minLat_,this.maxLon_,this.maxLat_],this.fromLonLatTransform_,void 0,8);this.minX_=o[0],this.maxX_=o[2],this.minY_=o[1],this.maxY_=o[3],this.bottomLeft_=this.fromLonLatTransform_([this.minLon_,this.minLat_]),this.bottomRight_=this.fromLonLatTransform_([this.maxLon_,this.minLat_]),this.topLeft_=this.fromLonLatTransform_([this.minLon_,this.maxLat_]),this.topRight_=this.fromLonLatTransform_([this.maxLon_,this.maxLat_]),this.projectionCenterLonLat_=this.toLonLatTransform_(Object(y.getCenter)(t.getExtent())),isNaN(this.projectionCenterLonLat_[1])&&(this.projectionCenterLonLat_[1]=Math.abs(this.maxLat_)>=Math.abs(this.minLat_)?this.maxLat_:this.minLat_),this.projection_=t},e}(d.a);e.a=C},function(t,e,n){"use strict";function r(t,e,n,r){for(var i=t[e],o=t[e+1],a=0,s=e+r;s<n;s+=r){var l=t[s],u=t[s+1];a+=Math.sqrt((l-i)*(l-i)+(u-o)*(u-o)),i=l,o=u}return a}e.a=r},function(t,e,n){"use strict";var r,i=n(194),o=n(143),a=n(198),s=n(65),l=n(199),u=n(14),c=n(0),h=n(145),p=n(5),f=n(2),d=n(6),g=n(20),y=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),m=function(t){function e(e){var n=t.call(this,e)||this;return n.boundHandleStyleImageChange_=n.handleStyleImageChange_.bind(n),n.animatingOrInteracting_,n.dirty_=!1,n.hitDetectionImageData_=null,n.renderedFeatures_=null,n.renderedRevision_=-1,n.renderedResolution_=NaN,n.renderedExtent_=Object(c.createEmpty)(),n.wrappedRenderedExtent_=Object(c.createEmpty)(),n.renderedRotation_,n.renderedCenter_=null,n.renderedProjection_=null,n.renderedRenderOrder_=null,n.replayGroup_=null,n.replayGroupChanged=!0,n.declutterExecutorGroup=null,n.clipping=!0,n}return y(e,t),e.prototype.useContainer=function(e,n,r){r<1&&(e=null),t.prototype.useContainer.call(this,e,n,r)},e.prototype.renderWorlds=function(t,e,n){var r=e.extent,i=e.viewState,o=i.center,a=i.resolution,l=i.projection,u=i.rotation,h=l.getExtent(),p=this.getLayer().getSource(),f=e.pixelRatio,d=e.viewHints,g=!(d[s.a.ANIMATING]||d[s.a.INTERACTING]),y=this.context,m=Math.round(e.size[0]*f),v=Math.round(e.size[1]*f),_=p.getWrapX()&&l.canWrapX(),b=_?Object(c.getWidth)(h):null,w=_?Math.ceil((r[2]-h[2])/b)+1:1,O=_?Math.floor((r[0]-h[0])/b):0;do{var x=this.getRenderTransform(o,a,u,f,m,v,O*b);t.execute(y,1,x,u,g,void 0,n)}while(++O<w)},e.prototype.renderDeclutter=function(t){this.declutterExecutorGroup&&this.renderWorlds(this.declutterExecutorGroup,t,t.declutterTree)},e.prototype.renderFrame=function(t,e){var n=t.pixelRatio,r=t.layerStatesArray[t.layerIndex];Object(u.e)(this.pixelTransform,1/n,1/n),Object(u.d)(this.inversePixelTransform,this.pixelTransform);var i=Object(u.k)(this.pixelTransform);this.useContainer(e,i,r.opacity);var o=this.context,a=o.canvas,s=this.replayGroup_,l=this.declutterExecutorGroup;if((!s||s.isEmpty())&&(!l||l.isEmpty()))return!this.containerReused&&a.width>0&&(a.width=0),this.container;var h=Math.round(t.size[0]*n),p=Math.round(t.size[1]*n);a.width!=h||a.height!=p?(a.width=h,a.height=p,a.style.transform!==i&&(a.style.transform=i)):this.containerReused||o.clearRect(0,0,h,p),this.preRender(o,t);var d=t.viewState,g=d.projection,y=!1,m=!0;if(r.extent&&this.clipping){var v=Object(f.fromUserExtent)(r.extent,g);(y=(m=Object(c.intersects)(v,t.extent))&&!Object(c.containsExtent)(v,t.extent))&&this.clipUnrotated(o,t,v)}m&&this.renderWorlds(s,t),y&&o.restore(),this.postRender(o,t);var _=r.opacity,b=this.container;return _!==parseFloat(b.style.opacity)&&(b.style.opacity=1===_?"":String(_)),this.renderedRotation_!==d.rotation&&(this.renderedRotation_=d.rotation,this.hitDetectionImageData_=null),this.container},e.prototype.getFeatures=function(t){return new Promise(function(e){if(!this.hitDetectionImageData_&&!this.animatingOrInteracting_){var n=[this.context.canvas.width,this.context.canvas.height];Object(u.a)(this.pixelTransform,n);var r=this.renderedCenter_,i=this.renderedResolution_,o=this.renderedRotation_,a=this.renderedProjection_,s=this.wrappedRenderedExtent_,h=this.getLayer(),p=[],f=n[0]*l.a,d=n[1]*l.a;p.push(this.getRenderTransform(r,i,o,l.a,f,d,0).slice());var g=h.getSource(),y=a.getExtent();if(g.getWrapX()&&a.canWrapX()&&!Object(c.containsExtent)(y,s)){for(var m=s[0],v=Object(c.getWidth)(y),_=0,b=void 0;m<y[0];)b=v*--_,p.push(this.getRenderTransform(r,i,o,l.a,f,d,b).slice()),m+=v;for(_=0,m=s[2];m>y[2];)b=v*++_,p.push(this.getRenderTransform(r,i,o,l.a,f,d,b).slice()),m-=v}this.hitDetectionImageData_=Object(l.b)(n,p,this.renderedFeatures_,h.getStyleFunction(),s,i,o)}e(Object(l.c)(t,this.renderedFeatures_,this.hitDetectionImageData_))}.bind(this))},e.prototype.forEachFeatureAtCoordinate=function(t,e,n,r,i){var o=this;if(this.replayGroup_){var a,s=e.viewState.resolution,l=e.viewState.rotation,u=this.getLayer(),c={},h=function(t,e,n){var o=Object(d.c)(t),a=c[o];if(a){if(!0!==a&&n<a.distanceSq){if(0===n)return c[o]=!0,i.splice(i.lastIndexOf(a),1),r(t,u,e);a.geometry=e,a.distanceSq=n}}else{if(0===n)return c[o]=!0,r(t,u,e);i.push(c[o]={feature:t,layer:u,geometry:e,distanceSq:n,callback:r})}},p=[this.replayGroup_];return this.declutterExecutorGroup&&p.push(this.declutterExecutorGroup),p.some(function(r){return a=r.forEachFeatureAtCoordinate(t,s,l,n,h,r===o.declutterExecutorGroup?e.declutterTree.all().map(function(t){return t.value}):null)}),a}},e.prototype.handleFontsChanged=function(){var t=this.getLayer();t.getVisible()&&this.replayGroup_&&t.changed()},e.prototype.handleStyleImageChange_=function(t){this.renderIfReadyAndVisible()},e.prototype.prepareFrame=function(t){var e=this.getLayer(),n=e.getSource();if(!n)return!1;var r=t.viewHints[s.a.ANIMATING],o=t.viewHints[s.a.INTERACTING],l=e.getUpdateWhileAnimating(),u=e.getUpdateWhileInteracting();if(!this.dirty_&&!l&&r||!u&&o)return this.animatingOrInteracting_=!0,!0;this.animatingOrInteracting_=!1;var d=t.extent,y=t.viewState,m=y.projection,v=y.resolution,_=t.pixelRatio,b=e.getRevision(),w=e.getRenderBuffer(),O=e.getRenderOrder();void 0===O&&(O=h.a);var x=y.center.slice(),E=Object(c.buffer)(d,w*v),S=E.slice(),C=[E.slice()],T=m.getExtent();if(n.getWrapX()&&m.canWrapX()&&!Object(c.containsExtent)(T,t.extent)){var I=Object(c.getWidth)(T),j=Math.max(Object(c.getWidth)(E)/2,I);E[0]=T[0]-j,E[2]=T[2]+j,Object(g.l)(x,m);var L=Object(c.wrapX)(C[0],m);L[0]<T[0]&&L[2]<T[2]?C.push([L[0]+I,L[1],L[2]+I,L[3]]):L[0]>T[0]&&L[2]>T[2]&&C.push([L[0]-I,L[1],L[2]-I,L[3]])}if(!this.dirty_&&this.renderedResolution_==v&&this.renderedRevision_==b&&this.renderedRenderOrder_==O&&Object(c.containsExtent)(this.wrappedRenderedExtent_,E))return Object(p.b)(this.renderedExtent_,S)||(this.hitDetectionImageData_=null,this.renderedExtent_=S),this.renderedCenter_=x,this.replayGroupChanged=!1,!0;this.replayGroup_=null,this.dirty_=!1;var R,P=new i.a(Object(h.c)(v,_),E,v,_);this.getLayer().getDeclutter()&&(R=new i.a(Object(h.c)(v,_),E,v,_));var N,M=Object(f.getUserProjection)();if(M){for(var A=0,k=C.length;A<k;++A)n.loadFeatures(Object(f.toUserExtent)(C[A],m),v,M);N=Object(f.getTransformFromProjections)(M,m)}else for(A=0,k=C.length;A<k;++A)n.loadFeatures(C[A],v,m);var F=Object(h.b)(v,_),D=function(t){var n,r=t.getStyleFunction()||e.getStyleFunction();if(r&&(n=r(t,v)),n){var i=this.renderFeature(t,F,n,P,N,R);this.dirty_=this.dirty_||i}}.bind(this),G=Object(f.toUserExtent)(E,m),U=n.getFeaturesInExtent(G);O&&U.sort(O);for(A=0,k=U.length;A<k;++A)D(U[A]);this.renderedFeatures_=U;var z=P.finish(),B=new a.a(E,v,_,n.getOverlaps(),z,e.getRenderBuffer());return R&&(this.declutterExecutorGroup=new a.a(E,v,_,n.getOverlaps(),R.finish(),e.getRenderBuffer())),this.renderedResolution_=v,this.renderedRevision_=b,this.renderedRenderOrder_=O,this.renderedExtent_=S,this.wrappedRenderedExtent_=E,this.renderedCenter_=x,this.renderedProjection_=m,this.replayGroup_=B,this.hitDetectionImageData_=null,this.replayGroupChanged=!0,!0},e.prototype.renderFeature=function(t,e,n,r,i,o){if(!n)return!1;var a=!1;if(Array.isArray(n))for(var s=0,l=n.length;s<l;++s)a=Object(h.d)(r,t,n[s],e,this.boundHandleStyleImageChange_,i,o)||a;else a=Object(h.d)(r,t,n,e,this.boundHandleStyleImageChange_,i,o);return a},e}(o.a);e.a=m},function(t,e,n){"use strict";var r=n(87),i=n(270),o=n(271),a=n(272),s=n(196),l={Circle:a.a,Default:r.a,Image:i.a,LineString:o.a,Polygon:a.a,Text:s.b},u=function(){function t(t,e,n,r){this.tolerance_=t,this.maxExtent_=e,this.pixelRatio_=r,this.resolution_=n,this.buildersByZIndex_={}}return t.prototype.finish=function(){var t={};for(var e in this.buildersByZIndex_){t[e]=t[e]||{};var n=this.buildersByZIndex_[e];for(var r in n){var i=n[r].finish();t[e][r]=i}}return t},t.prototype.getBuilder=function(t,e){var n=void 0!==t?t.toString():"0",r=this.buildersByZIndex_[n];void 0===r&&(r={},this.buildersByZIndex_[n]=r);var i=r[e];void 0===i&&(i=new(0,l[e])(this.tolerance_,this.maxExtent_,this.resolution_,this.pixelRatio_),r[e]=i);return i},t}();e.a=u},function(t,e,n){"use strict";var r=function(){function t(){}return t.prototype.drawCustom=function(t,e,n){},t.prototype.drawGeometry=function(t){},t.prototype.setStyle=function(t){},t.prototype.drawCircle=function(t,e){},t.prototype.drawFeature=function(t,e){},t.prototype.drawGeometryCollection=function(t,e){},t.prototype.drawLineString=function(t,e){},t.prototype.drawMultiLineString=function(t,e){},t.prototype.drawMultiPoint=function(t,e){},t.prototype.drawMultiPolygon=function(t,e){},t.prototype.drawPoint=function(t,e){},t.prototype.drawPolygon=function(t,e){},t.prototype.drawText=function(t,e){},t.prototype.setFillStrokeStyle=function(t,e){},t.prototype.setImageStyle=function(t,e){},t.prototype.setTextStyle=function(t,e){},t}();e.a=r},function(t,e,n){"use strict";n.d(e,"a",function(){return d});var r,i=n(87),o=n(73),a=n(8),s=n(176),l=n(102),u=n(40),c=n(6),h=n(0),p=n(273),f=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),d={left:0,end:0,center:.5,right:1,start:1,top:0,middle:.5,hanging:.2,alphabetic:.8,ideographic:.8,bottom:1},g=function(t){function e(e,n,r,i){var o=t.call(this,e,n,r,i)||this;return o.labels_=null,o.text_="",o.textOffsetX_=0,o.textOffsetY_=0,o.textRotateWithView_=void 0,o.textRotation_=0,o.textFillState_=null,o.fillStates={},o.textStrokeState_=null,o.strokeStates={},o.textState_={},o.textStates={},o.textKey_="",o.fillKey_="",o.strokeKey_="",o.declutterImageWithText_=void 0,o}return f(e,t),e.prototype.finish=function(){var e=t.prototype.finish.call(this);return e.textStates=this.textStates,e.fillStates=this.fillStates,e.strokeStates=this.strokeStates,e},e.prototype.drawText=function(t,e){var n=this.textFillState_,r=this.textStrokeState_,i=this.textState_;if(""!==this.text_&&i&&(n||r)){var l=this.coordinates,c=l.length,f=t.getType(),d=null,g=t.getStride();if(i.placement!==s.a.LINE||f!=a.a.LINE_STRING&&f!=a.a.MULTI_LINE_STRING&&f!=a.a.POLYGON&&f!=a.a.MULTI_POLYGON){var y=i.overflow?null:[];switch(f){case a.a.POINT:case a.a.MULTI_POINT:d=t.getFlatCoordinates();break;case a.a.LINE_STRING:d=t.getFlatMidpoint();break;case a.a.CIRCLE:d=t.getCenter();break;case a.a.MULTI_LINE_STRING:d=t.getFlatMidpoints(),g=2;break;case a.a.POLYGON:d=t.getFlatInteriorPoint(),i.overflow||y.push(d[2]/this.resolution),g=3;break;case a.a.MULTI_POLYGON:var m=t.getFlatInteriorPoints();d=[];for(I=0,j=m.length;I<j;I+=3)i.overflow||y.push(m[I+2]/this.resolution),d.push(m[I],m[I+1]);if(0===d.length)return;g=2}if((k=this.appendFlatPointCoordinates(d,g))===c)return;if(y&&(k-c)/2!==d.length/g){var v=c/2;y=y.filter(function(t,e){var n=l[2*(v+e)]===d[e*g]&&l[2*(v+e)+1]===d[e*g+1];return n||--v,n})}this.saveTextStates_(),(i.backgroundFill||i.backgroundStroke)&&(this.setFillStrokeStyle(i.backgroundFill,i.backgroundStroke),i.backgroundFill&&(this.updateFillStyle(this.state,this.createFill),this.hitDetectionInstructions.push(this.createFill(this.state))),i.backgroundStroke&&(this.updateStrokeStyle(this.state,this.applyStroke),this.hitDetectionInstructions.push(this.createStroke(this.state)))),this.beginGeometry(t,e);var _=i.padding;if(_!=u.j&&(i.scale[0]<0||i.scale[1]<0)){var b=i.padding[0],w=i.padding[1],O=i.padding[2],x=i.padding[3];i.scale[0]<0&&(w=-w,x=-x),i.scale[1]<0&&(b=-b,O=-O),_=[b,w,O,x]}var E=this.pixelRatio;this.instructions.push([o.c.DRAW_IMAGE,c,k,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[1,1],NaN,this.declutterImageWithText_,_==u.j?u.j:_.map(function(t){return t*E}),!!i.backgroundFill,!!i.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_,this.textOffsetX_,this.textOffsetY_,y]);var S=1/E;this.hitDetectionInstructions.push([o.c.DRAW_IMAGE,c,k,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[S,S],NaN,this.declutterImageWithText_,_,!!i.backgroundFill,!!i.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_,this.textOffsetX_,this.textOffsetY_,y]),this.endGeometry(e)}else{if(!Object(h.intersects)(this.getBufferedMaxExtent(),t.getExtent()))return;var C=void 0;if(d=t.getFlatCoordinates(),f==a.a.LINE_STRING)C=[d.length];else if(f==a.a.MULTI_LINE_STRING)C=t.getEnds();else if(f==a.a.POLYGON)C=t.getEnds().slice(0,1);else if(f==a.a.MULTI_POLYGON){var T=t.getEndss();C=[];for(var I=0,j=T.length;I<j;++I)C.push(T[I][0])}this.beginGeometry(t,e);for(var L=i.textAlign,R=0,P=void 0,N=0,M=C.length;N<M;++N){if(void 0==L){var A=Object(p.a)(i.maxAngle,d,R,C[N],g);R=A[0],P=A[1]}else P=C[N];for(var I=R;I<P;I+=g)l.push(d[I],d[I+1]);var k=l.length;R=C[N],this.drawChars_(c,k),c=k}this.endGeometry(e)}}},e.prototype.saveTextStates_=function(){var t=this.textStrokeState_,e=this.textState_,n=this.textFillState_,r=this.strokeKey_;t&&(r in this.strokeStates||(this.strokeStates[r]={strokeStyle:t.strokeStyle,lineCap:t.lineCap,lineDashOffset:t.lineDashOffset,lineWidth:t.lineWidth,lineJoin:t.lineJoin,miterLimit:t.miterLimit,lineDash:t.lineDash}));var i=this.textKey_;i in this.textStates||(this.textStates[i]={font:e.font,textAlign:e.textAlign||u.l,textBaseline:e.textBaseline||u.m,scale:e.scale});var o=this.fillKey_;n&&(o in this.fillStates||(this.fillStates[o]={fillStyle:n.fillStyle}))},e.prototype.drawChars_=function(t,e){var n=this.textStrokeState_,r=this.textState_,i=this.strokeKey_,a=this.textKey_,s=this.fillKey_;this.saveTextStates_();var l=this.pixelRatio,u=d[r.textBaseline],c=this.textOffsetY_*l,h=this.text_,p=n?n.lineWidth*Math.abs(r.scale[0])/2:0;this.instructions.push([o.c.DRAW_CHARS,t,e,u,r.overflow,s,r.maxAngle,l,c,i,p*l,h,a,1]),this.hitDetectionInstructions.push([o.c.DRAW_CHARS,t,e,u,r.overflow,s,r.maxAngle,1,c,i,p,h,a,1/l])},e.prototype.setTextStyle=function(t,e){var n,r,i;if(t){var o=t.getFill();o?((r=this.textFillState_)||(r={},this.textFillState_=r),r.fillStyle=Object(l.a)(o.getColor()||u.b)):(r=null,this.textFillState_=r);var a=t.getStroke();if(a){(i=this.textStrokeState_)||(i={},this.textStrokeState_=i);var s=a.getLineDash(),h=a.getLineDashOffset(),p=a.getWidth(),f=a.getMiterLimit();i.lineCap=a.getLineCap()||u.d,i.lineDash=s?s.slice():u.e,i.lineDashOffset=void 0===h?u.f:h,i.lineJoin=a.getLineJoin()||u.g,i.lineWidth=void 0===p?u.h:p,i.miterLimit=void 0===f?u.i:f,i.strokeStyle=Object(l.a)(a.getColor()||u.k)}else i=null,this.textStrokeState_=i;n=this.textState_;var d=t.getFont()||u.c;Object(u.s)(d);var g=t.getScaleArray();n.overflow=t.getOverflow(),n.font=d,n.maxAngle=t.getMaxAngle(),n.placement=t.getPlacement(),n.textAlign=t.getTextAlign(),n.textBaseline=t.getTextBaseline()||u.m,n.backgroundFill=t.getBackgroundFill(),n.backgroundStroke=t.getBackgroundStroke(),n.padding=t.getPadding()||u.j,n.scale=void 0===g?[1,1]:g;var y=t.getOffsetX(),m=t.getOffsetY(),v=t.getRotateWithView(),_=t.getRotation();this.text_=t.getText()||"",this.textOffsetX_=void 0===y?0:y,this.textOffsetY_=void 0===m?0:m,this.textRotateWithView_=void 0!==v&&v,this.textRotation_=void 0===_?0:_,this.strokeKey_=i?("string"==typeof i.strokeStyle?i.strokeStyle:Object(c.c)(i.strokeStyle))+i.lineCap+i.lineDashOffset+"|"+i.lineWidth+i.lineJoin+i.miterLimit+"["+i.lineDash.join()+"]":"",this.textKey_=n.font+n.scale+(n.textAlign||"?")+(n.textBaseline||"?"),this.fillKey_=r?"string"==typeof r.fillStyle?r.fillStyle:"|"+Object(c.c)(r.fillStyle):""}else this.text_="";this.declutterImageWithText_=e},e}(i.a);e.b=g},function(t,e,n){"use strict";var r,i=n(3),o=n(33),a=n(41),s=n(31),l=n(6),u=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),c=function(t){function e(e){var n=t.call(this)||this;return n.boundHandleImageChange_=n.handleImageChange_.bind(n),n.layer_=e,n.declutterExecutorGroup=null,n}return u(e,t),e.prototype.getFeatures=function(t){return Object(l.b)()},e.prototype.prepareFrame=function(t){return Object(l.b)()},e.prototype.renderFrame=function(t,e){return Object(l.b)()},e.prototype.loadedTileCallback=function(t,e,n){t[e]||(t[e]={}),t[e][n.tileCoord.toString()]=n},e.prototype.createLoadedTileFinder=function(t,e,n){return function(r,i){var o=this.loadedTileCallback.bind(this,n,r);return t.forEachLoadedTile(e,r,i,o)}.bind(this)},e.prototype.forEachFeatureAtCoordinate=function(t,e,n,r,i){},e.prototype.getDataAtPixel=function(t,e,n){return Object(l.b)()},e.prototype.getLayer=function(){return this.layer_},e.prototype.handleFontsChanged=function(){},e.prototype.handleImageChange_=function(t){t.target.getState()===o.a.LOADED&&this.renderIfReadyAndVisible()},e.prototype.loadImage=function(t){var e=t.getState();return e!=o.a.LOADED&&e!=o.a.ERROR&&t.addEventListener(i.a.CHANGE,this.boundHandleImageChange_),e==o.a.IDLE&&(t.load(),e=t.getState()),e==o.a.LOADED},e.prototype.renderIfReadyAndVisible=function(){var t=this.getLayer();t.getVisible()&&t.getSourceState()==s.a.READY&&t.changed()},e}(a.a);e.a=c},function(t,e,n){"use strict";var r=n(144),i=n(274),o=n(0),a=n(14),s=n(11),l=n(1),u=n(5),c=n(56),h=[r.a.POLYGON,r.a.CIRCLE,r.a.LINE_STRING,r.a.IMAGE,r.a.TEXT,r.a.DEFAULT],p=function(){function t(t,e,n,r,i,o){this.maxExtent_=t,this.overlaps_=r,this.pixelRatio_=n,this.resolution_=e,this.renderBuffer_=o,this.executorsByZIndex_={},this.hitDetectionContext_=null,this.hitDetectionTransform_=Object(a.c)(),this.createExecutors_(i)}return t.prototype.clip=function(t,e){var n=this.getClipCoords(e);t.beginPath(),t.moveTo(n[0],n[1]),t.lineTo(n[2],n[3]),t.lineTo(n[4],n[5]),t.lineTo(n[6],n[7]),t.clip()},t.prototype.createExecutors_=function(t){for(var e in t){var n=this.executorsByZIndex_[e];void 0===n&&(n={},this.executorsByZIndex_[e]=n);var r=t[e];for(var o in r){var a=r[o];n[o]=new i.a(this.resolution_,this.pixelRatio_,this.overlaps_,a)}}},t.prototype.hasExecutors=function(t){for(var e in this.executorsByZIndex_)for(var n=this.executorsByZIndex_[e],r=0,i=t.length;r<i;++r)if(t[r]in n)return!0;return!1},t.prototype.forEachFeatureAtCoordinate=function(t,e,n,i,l,c){var p=2*(i=Math.round(i))+1,d=Object(a.b)(this.hitDetectionTransform_,i+.5,i+.5,1/e,-1/e,-n,-t[0],-t[1]),g=!this.hitDetectionContext_;g&&(this.hitDetectionContext_=Object(s.a)(p,p));var y,m=this.hitDetectionContext_;m.canvas.width!==p||m.canvas.height!==p?(m.canvas.width=p,m.canvas.height=p):g||m.clearRect(0,0,p,p),void 0!==this.renderBuffer_&&(y=Object(o.createEmpty)(),Object(o.extendCoordinate)(y,t),Object(o.buffer)(y,e*(this.renderBuffer_+i),y));var v,_=function(t){if(void 0!==f[t])return f[t];for(var e=2*t+1,n=t*t,r=new Array(n+1),i=0;i<=t;++i)for(var o=0;o<=t;++o){var a=i*i+o*o;if(a>n)break;var s=r[a];s||(s=[],r[a]=s),s.push(4*((t+i)*e+(t+o))+3),i>0&&s.push(4*((t-i)*e+(t+o))+3),o>0&&(s.push(4*((t+i)*e+(t-o))+3),i>0&&s.push(4*((t-i)*e+(t-o))+3))}for(var l=[],i=0,u=r.length;i<u;++i)r[i]&&l.push.apply(l,r[i]);return f[t]=l,l}(i);function b(t,e){for(var n=m.getImageData(0,0,p,p).data,o=0,a=_.length;o<a;o++)if(n[_[o]]>0){if(!c||v!==r.a.IMAGE&&v!==r.a.TEXT||-1!==c.indexOf(t)){var s=(_[o]-3)/4,u=i-s%p,h=i-(s/p|0),f=l(t,e,u*u+h*h);if(f)return f}m.clearRect(0,0,p,p);break}}var w,O,x,E,S,C=Object.keys(this.executorsByZIndex_).map(Number);for(C.sort(u.i),w=C.length-1;w>=0;--w){var T=C[w].toString();for(x=this.executorsByZIndex_[T],O=h.length-1;O>=0;--O)if(void 0!==(E=x[v=h[O]])&&(S=E.executeHitDetection(m,d,n,b,y)))return S}},t.prototype.getClipCoords=function(t){var e=this.maxExtent_;if(!e)return null;var n=e[0],r=e[1],i=e[2],o=e[3],a=[n,r,n,o,i,o,i,r];return Object(c.c)(a,0,8,2,t,a),a},t.prototype.isEmpty=function(){return Object(l.d)(this.executorsByZIndex_)},t.prototype.execute=function(t,e,n,r,i,o,a){var s=Object.keys(this.executorsByZIndex_).map(Number);s.sort(u.i),this.maxExtent_&&(t.save(),this.clip(t,n));var l,c,p,f,d,g,y=o||h;for(a&&s.reverse(),l=0,c=s.length;l<c;++l){var m=s[l].toString();for(d=this.executorsByZIndex_[m],p=0,f=y.length;p<f;++p){void 0!==(g=d[y[p]])&&g.execute(t,e,n,r,i,a)}}this.maxExtent_&&t.restore()},t}(),f={};e.a=p},function(t,e,n){"use strict";n.d(e,"a",function(){return h}),e.b=function(t,e,n,s,p,f,d){var g=t[0]*h,y=t[1]*h,m=Object(l.a)(g,y);m.imageSmoothingEnabled=!1;for(var v=m.canvas,_=new r.a(m,h,p,null,d),b=n.length,w=Math.floor(16777215/b),O={},x=1;x<=b;++x){var E=n[x-1],S=E.getStyleFunction()||s;if(s){var C=S(E,f);if(C){Array.isArray(C)||(C=[C]);for(var T=x*w,I="#"+("000000"+T.toString(16)).slice(-6),j=0,L=C.length;j<L;++j){var R=C[j],P=R.getGeometryFunction()(E);if(P&&Object(u.intersects)(p,P.getExtent())){var N=R.clone(),M=N.getFill();M&&M.setColor(I);var A=N.getStroke();A&&(A.setColor(I),A.setLineDash(null)),N.setText(void 0);var k=R.getImage();if(k&&0!==k.getOpacity()){var F=k.getImageSize();if(!F)continue;var D=Object(l.a)(F[0],F[1],void 0,{alpha:!1}),G=D.canvas;D.fillStyle=I,D.fillRect(0,0,G.width,G.height),N.setImage(new a.Icon({img:G,imgSize:F,anchor:k.getAnchor(),anchorXUnits:o.a.PIXELS,anchorYUnits:o.a.PIXELS,offset:k.getOrigin(),opacity:1,size:k.getSize(),scale:k.getScale(),rotation:k.getRotation(),rotateWithView:k.getRotateWithView()}))}var U=N.getZIndex()||0,z=O[U];z||(z={},O[U]=z,z[i.a.POLYGON]=[],z[i.a.CIRCLE]=[],z[i.a.LINE_STRING]=[],z[i.a.POINT]=[]),z[P.getType().replace("Multi","")].push(P,N)}}}}}for(var B=Object.keys(O).map(Number).sort(c.i),x=0,V=B.length;x<V;++x){var z=O[B[x]];for(var Y in z)for(var q=z[Y],j=0,L=q.length;j<L;j+=2){_.setStyle(q[j+1]);for(var X=0,W=e.length;X<W;++X)_.setTransform(e[X]),_.drawGeometry(q[j])}}return m.getImageData(0,0,v.width,v.height)},e.c=function(t,e,n){var r=[];if(n){var i=Math.floor(Math.round(t[0])*h),o=Math.floor(Math.round(t[1])*h),a=4*(Object(s.a)(i,0,n.width-1)+Object(s.a)(o,0,n.height-1)*n.width),l=n.data[a],u=n.data[a+1],c=n.data[a+2],p=c+256*(u+256*l),f=Math.floor(16777215/e.length);p&&p%f===0&&r.push(e[p/f-1])}return r};var r=n(200),i=n(8),o=n(132),a=n(81),s=n(7),l=n(11),u=n(0),c=n(5),h=.5},function(t,e,n){"use strict";var r,i=n(8),o=n(195),a=n(102),s=n(14),l=n(40),u=n(5),c=n(0),h=n(56),p=n(36),f=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),d=function(t){function e(e,n,r,i,o,a,l){var u=t.call(this)||this;return u.context_=e,u.pixelRatio_=n,u.extent_=r,u.transform_=i,u.viewRotation_=o,u.squaredTolerance_=a,u.userTransform_=l,u.contextFillState_=null,u.contextStrokeState_=null,u.contextTextState_=null,u.fillState_=null,u.strokeState_=null,u.image_=null,u.imageAnchorX_=0,u.imageAnchorY_=0,u.imageHeight_=0,u.imageOpacity_=0,u.imageOriginX_=0,u.imageOriginY_=0,u.imageRotateWithView_=!1,u.imageRotation_=0,u.imageScale_=[0,0],u.imageWidth_=0,u.text_="",u.textOffsetX_=0,u.textOffsetY_=0,u.textRotateWithView_=!1,u.textRotation_=0,u.textScale_=[0,0],u.textFillState_=null,u.textStrokeState_=null,u.textState_=null,u.pixelCoordinates_=[],u.tmpLocalTransform_=Object(s.c)(),u}return f(e,t),e.prototype.drawImages_=function(t,e,n,r){if(this.image_){var i=Object(h.c)(t,e,n,r,this.transform_,this.pixelCoordinates_),o=this.context_,a=this.tmpLocalTransform_,l=o.globalAlpha;1!=this.imageOpacity_&&(o.globalAlpha=l*this.imageOpacity_);var u=this.imageRotation_;this.imageRotateWithView_&&(u+=this.viewRotation_);for(var c=0,p=i.length;c<p;c+=2){var f=i[c]-this.imageAnchorX_,d=i[c+1]-this.imageAnchorY_;if(0!==u||1!=this.imageScale_[0]||1!=this.imageScale_[1]){var g=f+this.imageAnchorX_,y=d+this.imageAnchorY_;Object(s.b)(a,g,y,1,1,u,-g,-y),o.setTransform.apply(o,a),o.translate(g,y),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.setTransform(1,0,0,1,0,0)}else o.drawImage(this.image_,this.imageOriginX_,this.imageOriginY_,this.imageWidth_,this.imageHeight_,f,d,this.imageWidth_,this.imageHeight_)}1!=this.imageOpacity_&&(o.globalAlpha=l)}},e.prototype.drawText_=function(t,e,n,r){if(this.textState_&&""!==this.text_){this.textFillState_&&this.setContextFillState_(this.textFillState_),this.textStrokeState_&&this.setContextStrokeState_(this.textStrokeState_),this.setContextTextState_(this.textState_);var i=Object(h.c)(t,e,n,r,this.transform_,this.pixelCoordinates_),o=this.context_,a=this.textRotation_;for(this.textRotateWithView_&&(a+=this.viewRotation_);e<n;e+=r){var l=i[e]+this.textOffsetX_,u=i[e+1]+this.textOffsetY_;if(0!==a||1!=this.textScale_[0]||1!=this.textScale_[1]){var c=Object(s.b)(this.tmpLocalTransform_,l,u,1,1,a,-l,-u);o.setTransform.apply(o,c),o.translate(l,u),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.setTransform(1,0,0,1,0,0)}else this.textStrokeState_&&o.strokeText(this.text_,l,u),this.textFillState_&&o.fillText(this.text_,l,u)}}},e.prototype.moveToLineTo_=function(t,e,n,r,i){var o=this.context_,a=Object(h.c)(t,e,n,r,this.transform_,this.pixelCoordinates_);o.moveTo(a[0],a[1]);var s=a.length;i&&(s-=2);for(var l=2;l<s;l+=2)o.lineTo(a[l],a[l+1]);return i&&o.closePath(),n},e.prototype.drawRings_=function(t,e,n,r){for(var i=0,o=n.length;i<o;++i)e=this.moveToLineTo_(t,e,n[i],r,!0);return e},e.prototype.drawCircle=function(t){if(Object(c.intersects)(this.extent_,t.getExtent())){if(this.fillState_||this.strokeState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);var e=Object(p.c)(t,this.transform_,this.pixelCoordinates_),n=e[2]-e[0],r=e[3]-e[1],i=Math.sqrt(n*n+r*r),o=this.context_;o.beginPath(),o.arc(e[0],e[1],i,0,2*Math.PI),this.fillState_&&o.fill(),this.strokeState_&&o.stroke()}""!==this.text_&&this.drawText_(t.getCenter(),0,2,2)}},e.prototype.setStyle=function(t){this.setFillStrokeStyle(t.getFill(),t.getStroke()),this.setImageStyle(t.getImage()),this.setTextStyle(t.getText())},e.prototype.setTransform=function(t){this.transform_=t},e.prototype.drawGeometry=function(t){switch(t.getType()){case i.a.POINT:this.drawPoint(t);break;case i.a.LINE_STRING:this.drawLineString(t);break;case i.a.POLYGON:this.drawPolygon(t);break;case i.a.MULTI_POINT:this.drawMultiPoint(t);break;case i.a.MULTI_LINE_STRING:this.drawMultiLineString(t);break;case i.a.MULTI_POLYGON:this.drawMultiPolygon(t);break;case i.a.GEOMETRY_COLLECTION:this.drawGeometryCollection(t);break;case i.a.CIRCLE:this.drawCircle(t)}},e.prototype.drawFeature=function(t,e){var n=e.getGeometryFunction()(t);n&&Object(c.intersects)(this.extent_,n.getExtent())&&(this.setStyle(e),this.drawGeometry(n))},e.prototype.drawGeometryCollection=function(t){for(var e=t.getGeometriesArray(),n=0,r=e.length;n<r;++n)this.drawGeometry(e[n])},e.prototype.drawPoint=function(t){this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_));var e=t.getFlatCoordinates(),n=t.getStride();this.image_&&this.drawImages_(e,0,e.length,n),""!==this.text_&&this.drawText_(e,0,e.length,n)},e.prototype.drawMultiPoint=function(t){this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_));var e=t.getFlatCoordinates(),n=t.getStride();this.image_&&this.drawImages_(e,0,e.length,n),""!==this.text_&&this.drawText_(e,0,e.length,n)},e.prototype.drawLineString=function(t){if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),Object(c.intersects)(this.extent_,t.getExtent())){if(this.strokeState_){this.setContextStrokeState_(this.strokeState_);var e=this.context_,n=t.getFlatCoordinates();e.beginPath(),this.moveToLineTo_(n,0,n.length,t.getStride(),!1),e.stroke()}if(""!==this.text_){var r=t.getFlatMidpoint();this.drawText_(r,0,2,2)}}},e.prototype.drawMultiLineString=function(t){this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_));var e=t.getExtent();if(Object(c.intersects)(this.extent_,e)){if(this.strokeState_){this.setContextStrokeState_(this.strokeState_);var n=this.context_,r=t.getFlatCoordinates(),i=0,o=t.getEnds(),a=t.getStride();n.beginPath();for(var s=0,l=o.length;s<l;++s)i=this.moveToLineTo_(r,i,o[s],a,!1);n.stroke()}if(""!==this.text_){var u=t.getFlatMidpoints();this.drawText_(u,0,u.length,2)}}},e.prototype.drawPolygon=function(t){if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),Object(c.intersects)(this.extent_,t.getExtent())){if(this.strokeState_||this.fillState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);var 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_){var n=t.getFlatInteriorPoint();this.drawText_(n,0,2,2)}}},e.prototype.drawMultiPolygon=function(t){if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),Object(c.intersects)(this.extent_,t.getExtent())){if(this.strokeState_||this.fillState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);var e=this.context_,n=t.getOrientedFlatCoordinates(),r=0,i=t.getEndss(),o=t.getStride();e.beginPath();for(var a=0,s=i.length;a<s;++a){var l=i[a];r=this.drawRings_(n,r,l,o)}this.fillState_&&e.fill(),this.strokeState_&&e.stroke()}if(""!==this.text_){var u=t.getFlatInteriorPoints();this.drawText_(u,0,u.length,2)}}},e.prototype.setContextFillState_=function(t){var e=this.context_,n=this.contextFillState_;n?n.fillStyle!=t.fillStyle&&(n.fillStyle=t.fillStyle,e.fillStyle=t.fillStyle):(e.fillStyle=t.fillStyle,this.contextFillState_={fillStyle:t.fillStyle})},e.prototype.setContextStrokeState_=function(t){var e=this.context_,n=this.contextStrokeState_;n?(n.lineCap!=t.lineCap&&(n.lineCap=t.lineCap,e.lineCap=t.lineCap),e.setLineDash&&(Object(u.b)(n.lineDash,t.lineDash)||e.setLineDash(n.lineDash=t.lineDash),n.lineDashOffset!=t.lineDashOffset&&(n.lineDashOffset=t.lineDashOffset,e.lineDashOffset=t.lineDashOffset)),n.lineJoin!=t.lineJoin&&(n.lineJoin=t.lineJoin,e.lineJoin=t.lineJoin),n.lineWidth!=t.lineWidth&&(n.lineWidth=t.lineWidth,e.lineWidth=t.lineWidth),n.miterLimit!=t.miterLimit&&(n.miterLimit=t.miterLimit,e.miterLimit=t.miterLimit),n.strokeStyle!=t.strokeStyle&&(n.strokeStyle=t.strokeStyle,e.strokeStyle=t.strokeStyle)):(e.lineCap=t.lineCap,e.setLineDash&&(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})},e.prototype.setContextTextState_=function(t){var e=this.context_,n=this.contextTextState_,r=t.textAlign?t.textAlign:l.l;n?(n.font!=t.font&&(n.font=t.font,e.font=t.font),n.textAlign!=r&&(n.textAlign=r,e.textAlign=r),n.textBaseline!=t.textBaseline&&(n.textBaseline=t.textBaseline,e.textBaseline=t.textBaseline)):(e.font=t.font,e.textAlign=r,e.textBaseline=t.textBaseline,this.contextTextState_={font:t.font,textAlign:r,textBaseline:t.textBaseline})},e.prototype.setFillStrokeStyle=function(t,e){var n=this;if(t){var r=t.getColor();this.fillState_={fillStyle:Object(a.a)(r||l.b)}}else this.fillState_=null;if(e){var i=e.getColor(),o=e.getLineCap(),s=e.getLineDash(),u=e.getLineDashOffset(),c=e.getLineJoin(),h=e.getWidth(),p=e.getMiterLimit(),f=s||l.e;this.strokeState_={lineCap:void 0!==o?o:l.d,lineDash:1===this.pixelRatio_?f:f.map(function(t){return t*n.pixelRatio_}),lineDashOffset:(u||l.f)*this.pixelRatio_,lineJoin:void 0!==c?c:l.g,lineWidth:(void 0!==h?h:l.h)*this.pixelRatio_,miterLimit:void 0!==p?p:l.i,strokeStyle:Object(a.a)(i||l.k)}}else this.strokeState_=null},e.prototype.setImageStyle=function(t){var e;if(t&&(e=t.getSize())){var n=t.getAnchor(),r=t.getOrigin();this.image_=t.getImage(this.pixelRatio_),this.imageAnchorX_=n[0]*this.pixelRatio_,this.imageAnchorY_=n[1]*this.pixelRatio_,this.imageHeight_=e[1]*this.pixelRatio_,this.imageOpacity_=t.getOpacity(),this.imageOriginX_=r[0],this.imageOriginY_=r[1],this.imageRotateWithView_=t.getRotateWithView(),this.imageRotation_=t.getRotation(),this.imageScale_=t.getScaleArray(),this.imageWidth_=e[0]*this.pixelRatio_}else this.image_=null},e.prototype.setTextStyle=function(t){if(t){var e=t.getFill();if(e){var n=e.getColor();this.textFillState_={fillStyle:Object(a.a)(n||l.b)}}else this.textFillState_=null;var r=t.getStroke();if(r){var i=r.getColor(),o=r.getLineCap(),s=r.getLineDash(),u=r.getLineDashOffset(),c=r.getLineJoin(),h=r.getWidth(),p=r.getMiterLimit();this.textStrokeState_={lineCap:void 0!==o?o:l.d,lineDash:s||l.e,lineDashOffset:u||l.f,lineJoin:void 0!==c?c:l.g,lineWidth:void 0!==h?h:l.h,miterLimit:void 0!==p?p:l.i,strokeStyle:Object(a.a)(i||l.k)}}else this.textStrokeState_=null;var f=t.getFont(),d=t.getOffsetX(),g=t.getOffsetY(),y=t.getRotateWithView(),m=t.getRotation(),v=t.getScaleArray(),_=t.getText(),b=t.getTextAlign(),w=t.getTextBaseline();this.textState_={font:void 0!==f?f:l.c,textAlign:void 0!==b?b:l.l,textBaseline:void 0!==w?w:l.m},this.text_=void 0!==_?_:"",this.textOffsetX_=void 0!==d?this.pixelRatio_*d:0,this.textOffsetY_=void 0!==g?this.pixelRatio_*g:0,this.textRotateWithView_=void 0!==y&&y,this.textRotation_=void 0!==m?m:0,this.textScale_=[this.pixelRatio_*v[0],this.pixelRatio_*v[1]]}else this.text_=""},e}(o.a);e.a=d},function(t,e,n){"use strict";e.a=a,e.b=function(t,e){return function(n,r,o,s,l){var u=this;a(t,e,n,r,o,function(t,e){u.addFeatures(t),void 0!==s&&s(t)},l||i.c)}};var r=n(74),i=n(13),o=!1;function a(t,e,n,i,a,s,l){var u=new XMLHttpRequest;u.open("GET","function"===typeof t?t(n,i,a):t,!0),e.getType()==r.a.ARRAY_BUFFER&&(u.responseType="arraybuffer"),u.withCredentials=o,u.onload=function(t){if(!u.status||u.status>=200&&u.status<300){var i=e.getType(),o=void 0;i==r.a.JSON||i==r.a.TEXT?o=u.responseText:i==r.a.XML?(o=u.responseXML)||(o=(new DOMParser).parseFromString(u.responseText,"application/xml")):i==r.a.ARRAY_BUFFER&&(o=u.response),o?s(e.readFeatures(o,{extent:n,featureProjection:a}),e.readProjection(o)):l()}else l()},u.onerror=l,u.send()}},function(t,e,n){"use strict";var r,i=n(113),o=n(8),a=n(114),s=n(65),l=n(280),u=n(281),c=n(285),h=n(115),p=n(203),f=n(14),d=n(4),g=n(0),y=n(286),m=n(6),v=n(9),_=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),b=function(t){function e(e,n){var r=this,i=n.uniforms||{},o=Object(f.c)();i[p.b.PROJECTION_MATRIX]=o,(r=t.call(this,e,{className:n.className,uniforms:i,postProcesses:n.postProcesses})||this).sourceRevision_=-1,r.verticesBuffer_=new l.a(h.a,h.b),r.hitVerticesBuffer_=new l.a(h.a,h.b),r.indicesBuffer_=new l.a(h.c,h.b),r.program_=r.helper.getProgram(n.fragmentShader,n.vertexShader),r.hitDetectionEnabled_=!(!n.hitFragmentShader||!n.hitVertexShader),r.hitProgram_=r.hitDetectionEnabled_&&r.helper.getProgram(n.hitFragmentShader,n.hitVertexShader);var s=n.attributes?n.attributes.map(function(t){return{name:"a_"+t.name,size:1,type:p.a.FLOAT}}):[];r.attributes=[{name:"a_position",size:2,type:p.a.FLOAT},{name:"a_index",size:1,type:p.a.FLOAT}].concat(s),r.hitDetectionAttributes=[{name:"a_position",size:2,type:p.a.FLOAT},{name:"a_index",size:1,type:p.a.FLOAT},{name:"a_hitColor",size:4,type:p.a.FLOAT},{name:"a_featureUid",size:1,type:p.a.FLOAT}].concat(s),r.customAttributes=n.attributes?n.attributes:[],r.previousExtent_=Object(g.createEmpty)(),r.currentTransform_=o,r.renderTransform_=Object(f.c)(),r.invertRenderTransform_=Object(f.c)(),r.renderInstructions_=new Float32Array(0),r.hitRenderInstructions_=new Float32Array(0),r.hitRenderTarget_=r.hitDetectionEnabled_&&new c.a(r.helper),r.worker_=Object(y.a)(),r.worker_.addEventListener("message",function(t){var e=t.data;if(e.type===u.a.GENERATE_BUFFERS){var n=e.projectionTransform;e.hitDetection?(this.hitVerticesBuffer_.fromArrayBuffer(e.vertexBuffer),this.helper.flushBufferData(this.hitVerticesBuffer_)):(this.verticesBuffer_.fromArrayBuffer(e.vertexBuffer),this.helper.flushBufferData(this.verticesBuffer_)),this.indicesBuffer_.fromArrayBuffer(e.indexBuffer),this.helper.flushBufferData(this.indicesBuffer_),this.renderTransform_=n,Object(f.d)(this.invertRenderTransform_,this.renderTransform_),e.hitDetection?this.hitRenderInstructions_=new Float32Array(t.data.renderInstructions):this.renderInstructions_=new Float32Array(t.data.renderInstructions),this.getLayer().changed()}}.bind(r)),r.featureCache_={},r.featureCount_=0;var d=r.getLayer().getSource();return r.sourceListenKeys_=[Object(v.listen)(d,a.a.ADDFEATURE,r.handleSourceFeatureAdded_,r),Object(v.listen)(d,a.a.CHANGEFEATURE,r.handleSourceFeatureChanged_,r),Object(v.listen)(d,a.a.REMOVEFEATURE,r.handleSourceFeatureDelete_,r),Object(v.listen)(d,a.a.CLEAR,r.handleSourceFeatureClear_,r)],d.forEachFeature(function(t){this.featureCache_[Object(m.c)(t)]={feature:t,properties:t.getProperties(),geometry:t.getGeometry()},this.featureCount_++}.bind(r)),r}return _(e,t),e.prototype.handleSourceFeatureAdded_=function(t){var e=t.feature;this.featureCache_[Object(m.c)(e)]={feature:e,properties:e.getProperties(),geometry:e.getGeometry()},this.featureCount_++},e.prototype.handleSourceFeatureChanged_=function(t){var e=t.feature;this.featureCache_[Object(m.c)(e)]={feature:e,properties:e.getProperties(),geometry:e.getGeometry()}},e.prototype.handleSourceFeatureDelete_=function(t){var e=t.feature;delete this.featureCache_[Object(m.c)(e)],this.featureCount_--},e.prototype.handleSourceFeatureClear_=function(){this.featureCache_={},this.featureCount_=0},e.prototype.renderFrame=function(t){this.preRender(t);var e=this.indicesBuffer_.getSize();this.helper.drawElements(0,e),this.helper.finalizeDraw(t);var n=this.helper.getCanvas(),r=t.layerStatesArray[t.layerIndex].opacity;return r!==parseFloat(n.style.opacity)&&(n.style.opacity=String(r)),this.hitDetectionEnabled_&&(this.renderHitDetection(t),this.hitRenderTarget_.clearCachedData()),this.postRender(t),n},e.prototype.prepareFrame=function(t){var e=this.getLayer(),n=e.getSource(),r=t.viewState,o=!t.viewHints[s.a.ANIMATING]&&!t.viewHints[s.a.INTERACTING],a=!Object(g.equals)(this.previousExtent_,t.extent),l=this.sourceRevision_<n.getRevision();if(l&&(this.sourceRevision_=n.getRevision()),o&&(a||l)){var u=r.projection,c=r.resolution,h=e instanceof i.a?e.getRenderBuffer():0,p=Object(g.buffer)(t.extent,h*c);n.loadFeatures(p,c,u),this.rebuildBuffers_(t),this.previousExtent_=t.extent.slice()}return this.helper.makeProjectionTransform(t,this.currentTransform_),Object(f.f)(this.currentTransform_,this.invertRenderTransform_),this.helper.useProgram(this.program_),this.helper.prepareDraw(t),this.helper.bindBuffer(this.verticesBuffer_),this.helper.bindBuffer(this.indicesBuffer_),this.helper.enableAttributes(this.attributes),!0},e.prototype.rebuildBuffers_=function(t){var e=Object(f.c)();this.helper.makeProjectionTransform(t,e);var n,r,i=(2+this.customAttributes.length)*this.featureCount_;if(this.renderInstructions_&&this.renderInstructions_.length===i||(this.renderInstructions_=new Float32Array(i)),this.hitDetectionEnabled_){var a=(7+this.customAttributes.length)*this.featureCount_;this.hitRenderInstructions_&&this.hitRenderInstructions_.length===a||(this.hitRenderInstructions_=new Float32Array(a))}var s,l=[],c=[],h=0,p=0;for(var d in this.featureCache_)if((r=(n=this.featureCache_[d]).geometry)&&r.getType()===o.a.POINT){l[0]=r.getFlatCoordinates()[0],l[1]=r.getFlatCoordinates()[1],Object(f.a)(e,l),s=Object(u.c)(p+6,c),this.renderInstructions_[h++]=l[0],this.renderInstructions_[h++]=l[1],this.hitDetectionEnabled_&&(this.hitRenderInstructions_[p++]=l[0],this.hitRenderInstructions_[p++]=l[1],this.hitRenderInstructions_[p++]=s[0],this.hitRenderInstructions_[p++]=s[1],this.hitRenderInstructions_[p++]=s[2],this.hitRenderInstructions_[p++]=s[3],this.hitRenderInstructions_[p++]=Number(d));for(var g=void 0,y=0;y<this.customAttributes.length;y++)g=this.customAttributes[y].callback(n.feature,n.properties),this.renderInstructions_[h++]=g,this.hitDetectionEnabled_&&(this.hitRenderInstructions_[p++]=g)}var m={type:u.a.GENERATE_BUFFERS,renderInstructions:this.renderInstructions_.buffer,customAttributesCount:this.customAttributes.length};if(m.projectionTransform=e,this.worker_.postMessage(m,[this.renderInstructions_.buffer]),this.renderInstructions_=null,this.hitDetectionEnabled_){var v={type:u.a.GENERATE_BUFFERS,renderInstructions:this.hitRenderInstructions_.buffer,customAttributesCount:5+this.customAttributes.length};v.projectionTransform=e,v.hitDetection=!0,this.worker_.postMessage(v,[this.hitRenderInstructions_.buffer]),this.hitRenderInstructions_=null}},e.prototype.forEachFeatureAtCoordinate=function(t,e,n,r,i){if(Object(d.a)(this.hitDetectionEnabled_,66),this.hitRenderInstructions_){var o=Object(f.a)(e.coordinateToPixelTransform,t.slice()),a=this.hitRenderTarget_.readPixel(o[0]/2,o[1]/2),s=[a[0]/255,a[1]/255,a[2]/255,a[3]/255],l=Object(u.b)(s),c=this.hitRenderInstructions_[l],h=Math.floor(c).toString(),p=this.getLayer().getSource().getFeatureByUid(h);return p?r(p,this.getLayer(),null):void 0}},e.prototype.renderHitDetection=function(t){if(this.hitVerticesBuffer_.getSize()){this.hitRenderTarget_.setSize([Math.floor(t.size[0]/2),Math.floor(t.size[1]/2)]),this.helper.useProgram(this.hitProgram_),this.helper.prepareDrawToRenderTarget(t,this.hitRenderTarget_,!0),this.helper.bindBuffer(this.hitVerticesBuffer_),this.helper.bindBuffer(this.indicesBuffer_),this.helper.enableAttributes(this.hitDetectionAttributes);var e=this.indicesBuffer_.getSize();this.helper.drawElements(0,e)}},e.prototype.disposeInternal=function(){this.worker_.terminate(),this.layer_=null,this.sourceListenKeys_.forEach(function(t){Object(v.unlistenByKey)(t)}),this.sourceListenKeys_=null,t.prototype.disposeInternal.call(this)},e}(u.d);e.a=b},function(t,e,n){"use strict";n.d(e,"b",function(){return g}),n.d(e,"a",function(){return y});var r,i=n(282),o=n(69),a=n(283),s=n(115),l=n(4),u=n(1),c=n(14),h=n(284),p=n(6),f=n(5),d=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),g={PROJECTION_MATRIX:"u_projectionMatrix",OFFSET_SCALE_MATRIX:"u_offsetScaleMatrix",OFFSET_ROTATION_MATRIX:"u_offsetRotateMatrix",TIME:"u_time",ZOOM:"u_zoom",RESOLUTION:"u_resolution"},y={UNSIGNED_BYTE:s.g,UNSIGNED_SHORT:s.i,UNSIGNED_INT:s.h,FLOAT:s.d},m=function(t){function e(e){var n=t.call(this)||this,r=e||{};n.boundHandleWebGLContextLost_=n.handleWebGLContextLost.bind(n),n.boundHandleWebGLContextRestored_=n.handleWebGLContextRestored.bind(n),n.canvas_=document.createElement("canvas"),n.canvas_.style.position="absolute",n.canvas_.style.left="0",n.gl_=Object(s.j)(n.canvas_);var o=n.getGL();if(n.bufferCache_={},n.currentProgram_=null,Object(l.a)(Object(f.f)(Object(s.k)(),"OES_element_index_uint"),63),o.getExtension("OES_element_index_uint"),n.canvas_.addEventListener(i.a.LOST,n.boundHandleWebGLContextLost_),n.canvas_.addEventListener(i.a.RESTORED,n.boundHandleWebGLContextRestored_),n.offsetRotateMatrix_=Object(c.c)(),n.offsetScaleMatrix_=Object(c.c)(),n.tmpMat4_=Object(h.a)(),n.uniformLocations_={},n.attribLocations_={},n.uniforms_=[],r.uniforms)for(var u in r.uniforms)n.uniforms_.push({name:u,value:r.uniforms[u]});return n.postProcessPasses_=r.postProcesses?r.postProcesses.map(function(t){return new a.a({webGlContext:o,scaleRatio:t.scaleRatio,vertexShader:t.vertexShader,fragmentShader:t.fragmentShader,uniforms:t.uniforms})}):[new a.a({webGlContext:o})],n.shaderCompileErrors_=null,n.startTime_=Date.now(),n}return d(e,t),e.prototype.bindBuffer=function(t){var e=this.getGL(),n=Object(p.c)(t),r=this.bufferCache_[n];r||(r={buffer:t,webGlBuffer:e.createBuffer()},this.bufferCache_[n]=r);e.bindBuffer(t.getType(),r.webGlBuffer)},e.prototype.flushBufferData=function(t){var e=this.getGL();this.bindBuffer(t),e.bufferData(t.getType(),t.getArray(),t.getUsage())},e.prototype.deleteBuffer=function(t){var e=this.getGL(),n=Object(p.c)(t),r=this.bufferCache_[n];r&&!e.isContextLost()&&e.deleteBuffer(r.webGlBuffer),delete this.bufferCache_[n]},e.prototype.disposeInternal=function(){this.canvas_.removeEventListener(i.a.LOST,this.boundHandleWebGLContextLost_),this.canvas_.removeEventListener(i.a.RESTORED,this.boundHandleWebGLContextRestored_)},e.prototype.prepareDraw=function(t){var e=this.getGL(),n=this.getCanvas(),r=t.size,i=t.pixelRatio;n.width=r[0]*i,n.height=r[1]*i,n.style.width=r[0]+"px",n.style.height=r[1]+"px",e.useProgram(this.currentProgram_);for(var o=this.postProcessPasses_.length-1;o>=0;o--)this.postProcessPasses_[o].init(t);e.bindTexture(e.TEXTURE_2D,null),e.clearColor(0,0,0,0),e.clear(e.COLOR_BUFFER_BIT),e.enable(e.BLEND),e.blendFunc(e.ONE,e.ONE_MINUS_SRC_ALPHA),e.useProgram(this.currentProgram_),this.applyFrameState(t),this.applyUniforms(t)},e.prototype.prepareDrawToRenderTarget=function(t,e,n){var r=this.getGL(),i=e.getSize();r.bindFramebuffer(r.FRAMEBUFFER,e.getFramebuffer()),r.viewport(0,0,i[0],i[1]),r.bindTexture(r.TEXTURE_2D,e.getTexture()),r.clearColor(0,0,0,0),r.clear(r.COLOR_BUFFER_BIT),r.enable(r.BLEND),r.blendFunc(r.ONE,n?r.ZERO:r.ONE_MINUS_SRC_ALPHA),r.useProgram(this.currentProgram_),this.applyFrameState(t),this.applyUniforms(t)},e.prototype.drawElements=function(t,e){var n=this.getGL(),r=n.UNSIGNED_INT,i=e-t,o=4*t;n.drawElements(n.TRIANGLES,i,r,o)},e.prototype.finalizeDraw=function(t){for(var e=0;e<this.postProcessPasses_.length;e++)this.postProcessPasses_[e].apply(t,this.postProcessPasses_[e+1]||null)},e.prototype.getCanvas=function(){return this.canvas_},e.prototype.getGL=function(){return this.gl_},e.prototype.applyFrameState=function(t){var e=t.size,n=t.viewState.rotation,r=Object(c.g)(this.offsetScaleMatrix_);Object(c.i)(r,2/e[0],2/e[1]);var i=Object(c.g)(this.offsetRotateMatrix_);0!==n&&Object(c.h)(i,-n),this.setUniformMatrixValue(g.OFFSET_SCALE_MATRIX,Object(h.b)(this.tmpMat4_,r)),this.setUniformMatrixValue(g.OFFSET_ROTATION_MATRIX,Object(h.b)(this.tmpMat4_,i)),this.setUniformFloatValue(g.TIME,.001*(Date.now()-this.startTime_)),this.setUniformFloatValue(g.ZOOM,t.viewState.zoom),this.setUniformFloatValue(g.RESOLUTION,t.viewState.resolution)},e.prototype.applyUniforms=function(t){var e,n=this.getGL(),r=0;this.uniforms_.forEach(function(i){if((e="function"===typeof i.value?i.value(t):i.value)instanceof HTMLCanvasElement||e instanceof HTMLImageElement||e instanceof ImageData)i.texture||(i.prevValue=void 0,i.texture=n.createTexture()),n.activeTexture(n["TEXTURE"+r]),n.bindTexture(n.TEXTURE_2D,i.texture),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MIN_FILTER,n.LINEAR),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_S,n.CLAMP_TO_EDGE),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_T,n.CLAMP_TO_EDGE),(!(e instanceof HTMLImageElement)||e.complete)&&i.prevValue!==e&&(i.prevValue=e,n.texImage2D(n.TEXTURE_2D,0,n.RGBA,n.RGBA,n.UNSIGNED_BYTE,e)),n.uniform1i(this.getUniformLocation(i.name),r++);else if(Array.isArray(e)&&6===e.length)this.setUniformMatrixValue(i.name,Object(h.b)(this.tmpMat4_,e));else if(Array.isArray(e)&&e.length<=4)switch(e.length){case 2:return void n.uniform2f(this.getUniformLocation(i.name),e[0],e[1]);case 3:return void n.uniform3f(this.getUniformLocation(i.name),e[0],e[1],e[2]);case 4:return void n.uniform4f(this.getUniformLocation(i.name),e[0],e[1],e[2],e[3]);default:return}else"number"===typeof e&&n.uniform1f(this.getUniformLocation(i.name),e)}.bind(this))},e.prototype.useProgram=function(t){return t!=this.currentProgram_&&(this.getGL().useProgram(t),this.currentProgram_=t,this.uniformLocations_={},this.attribLocations_={},!0)},e.prototype.compileShader=function(t,e){var n=this.getGL(),r=n.createShader(e);return n.shaderSource(r,t),n.compileShader(r),r},e.prototype.getProgram=function(t,e){var n=this.getGL(),r=this.compileShader(t,n.FRAGMENT_SHADER),i=this.compileShader(e,n.VERTEX_SHADER),o=n.createProgram();if(n.attachShader(o,r),n.attachShader(o,i),n.linkProgram(o),!n.getShaderParameter(r,n.COMPILE_STATUS)){var a="Fragment shader compliation failed: "+n.getShaderInfoLog(r);throw new Error(a)}if(n.deleteShader(r),!n.getShaderParameter(i,n.COMPILE_STATUS)){a="Vertex shader compilation failed: "+n.getShaderInfoLog(i);throw new Error(a)}if(n.deleteShader(i),!n.getProgramParameter(o,n.LINK_STATUS)){a="GL program linking failed: "+n.getShaderInfoLog(i);throw new Error(a)}return o},e.prototype.getUniformLocation=function(t){return void 0===this.uniformLocations_[t]&&(this.uniformLocations_[t]=this.getGL().getUniformLocation(this.currentProgram_,t)),this.uniformLocations_[t]},e.prototype.getAttributeLocation=function(t){return void 0===this.attribLocations_[t]&&(this.attribLocations_[t]=this.getGL().getAttribLocation(this.currentProgram_,t)),this.attribLocations_[t]},e.prototype.makeProjectionTransform=function(t,e){var n=t.size,r=t.viewState.rotation,i=t.viewState.resolution,o=t.viewState.center;return Object(c.g)(e),Object(c.b)(e,0,0,2/(i*n[0]),2/(i*n[1]),-r,-o[0],-o[1]),e},e.prototype.setUniformFloatValue=function(t,e){this.getGL().uniform1f(this.getUniformLocation(t),e)},e.prototype.setUniformMatrixValue=function(t,e){this.getGL().uniformMatrix4fv(this.getUniformLocation(t),!1,e)},e.prototype.enableAttributeArray_=function(t,e,n,r,i){var o=this.getAttributeLocation(t);o<0||(this.getGL().enableVertexAttribArray(o),this.getGL().vertexAttribPointer(o,e,n,!1,r,i))},e.prototype.enableAttributes=function(t){for(var e=function(t){for(var e=0,n=0;n<t.length;n++){var r=t[n];e+=r.size*v(r.type)}return e}(t),n=0,r=0;r<t.length;r++){var i=t[r];this.enableAttributeArray_(i.name,i.size,i.type||s.d,e,n),n+=i.size*v(i.type)}},e.prototype.handleWebGLContextLost=function(){Object(u.b)(this.bufferCache_),this.currentProgram_=null},e.prototype.handleWebGLContextRestored=function(){},e.prototype.createTexture=function(t,e,n){var r=this.getGL(),i=n||r.createTexture(),o=r.RGBA,a=r.RGBA,s=r.UNSIGNED_BYTE;return r.bindTexture(r.TEXTURE_2D,i),e?r.texImage2D(r.TEXTURE_2D,0,o,a,s,e):r.texImage2D(r.TEXTURE_2D,0,o,t[0],t[1],0,a,s,null),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MIN_FILTER,r.LINEAR),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_S,r.CLAMP_TO_EDGE),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_T,r.CLAMP_TO_EDGE),i},e}(o.a);function v(t){switch(t){case y.UNSIGNED_BYTE:return Uint8Array.BYTES_PER_ELEMENT;case y.UNSIGNED_SHORT:return Uint16Array.BYTES_PER_ELEMENT;case y.UNSIGNED_INT:return Uint32Array.BYTES_PER_ELEMENT;case y.FLOAT:default:return Float32Array.BYTES_PER_ELEMENT}}e.c=m},function(t,e,n){"use strict";var r,i=n(287),o=n(205),a=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),s=function(t){function e(e){return t.call(this,e)||this}return a(e,t),e.prototype.createRenderer=function(){return new o.a(this)},e}(i.a);e.a=s},function(t,e,n){"use strict";var r,i=n(143),o=n(65),a=n(89),s=n(1),l=n(14),u=n(0),c=n(2),h=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),p=function(t){function e(e){var n=t.call(this,e)||this;return n.image_=null,n}return h(e,t),e.prototype.getImage=function(){return this.image_?this.image_.getImage():null},e.prototype.prepareFrame=function(t){var e=t.layerStatesArray[t.layerIndex],n=t.pixelRatio,r=t.viewState,i=r.resolution,s=this.getLayer().getSource(),l=t.viewHints,h=t.extent;if(void 0!==e.extent&&(h=Object(u.getIntersection)(h,Object(c.fromUserExtent)(e.extent,r.projection))),!l[o.a.ANIMATING]&&!l[o.a.INTERACTING]&&!Object(u.isEmpty)(h))if(s){var p=r.projection;if(!a.a){var f=s.getProjection();f&&(p=f)}var d=s.getImage(h,i,n,p);d&&this.loadImage(d)&&(this.image_=d)}else this.image_=null;return!!this.image_},e.prototype.renderFrame=function(t,e){var n=this.image_,r=n.getExtent(),i=n.getResolution(),o=n.getPixelRatio(),a=t.layerStatesArray[t.layerIndex],h=t.pixelRatio,p=t.viewState,f=p.center,d=p.resolution,g=t.size,y=h*i/(d*o),m=Math.round(g[0]*h),v=Math.round(g[1]*h),_=p.rotation;if(_){var b=Math.round(Math.sqrt(m*m+v*v));m=b,v=b}Object(l.b)(this.pixelTransform,t.size[0]/2,t.size[1]/2,1/h,1/h,_,-m/2,-v/2),Object(l.d)(this.inversePixelTransform,this.pixelTransform);var w=Object(l.k)(this.pixelTransform);this.useContainer(e,w,a.opacity);var O=this.context,x=O.canvas;x.width!=m||x.height!=v?(x.width=m,x.height=v):this.containerReused||O.clearRect(0,0,m,v);var E=!1,S=!0;if(a.extent){var C=Object(c.fromUserExtent)(a.extent,p.projection);(E=(S=Object(u.intersects)(C,t.extent))&&!Object(u.containsExtent)(C,t.extent))&&this.clipUnrotated(O,t,C)}var T=n.getImage(),I=Object(l.b)(this.tempTransform,m/2,v/2,y,y,0,o*(r[0]-f[0])/i,o*(f[1]-r[3])/i);this.renderedResolution=i*h/o;var j=T.width*I[0],L=T.height*I[3];if(Object(s.a)(O,this.getLayer().getSource().getContextOptions()),this.preRender(O,t),S&&j>=.5&&L>=.5){var R=I[4],P=I[5],N=a.opacity,M=void 0;1!==N&&(M=O.globalAlpha,O.globalAlpha=N),O.drawImage(T,0,0,+T.width,+T.height,Math.round(R),Math.round(P),Math.round(j),Math.round(L)),1!==N&&(O.globalAlpha=M)}return this.postRender(O,t),E&&O.restore(),w!==x.style.transform&&(x.style.transform=w),this.container},e}(i.a);e.a=p},function(t,e,n){"use strict";e.a=function(t,e,n,i){for(var o=[],a=Object(r.createEmpty)(),s=0,l=n.length;s<l;++s){var u=n[s];a=Object(r.createOrUpdateFromFlatCoordinates)(t,e,u[0],i),o.push((a[0]+a[2])/2,(a[1]+a[3])/2),e=u[u.length-1]}return o};var r=n(0)},function(t,e){e.read=function(t,e,n,r,i){var o,a,s=8*i-r-1,l=(1<<s)-1,u=l>>1,c=-7,h=n?i-1:0,p=n?-1:1,f=t[e+h];for(h+=p,o=f&(1<<-c)-1,f>>=-c,c+=s;c>0;o=256*o+t[e+h],h+=p,c-=8);for(a=o&(1<<-c)-1,o>>=-c,c+=r;c>0;a=256*a+t[e+h],h+=p,c-=8);if(0===o)o=1-u;else{if(o===l)return a?NaN:1/0*(f?-1:1);a+=Math.pow(2,r),o-=u}return(f?-1:1)*a*Math.pow(2,o-r)},e.write=function(t,e,n,r,i,o){var a,s,l,u=8*o-i-1,c=(1<<u)-1,h=c>>1,p=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,f=r?0:o-1,d=r?1:-1,g=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=c):(a=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-a))<1&&(a--,l*=2),(e+=a+h>=1?p/l:p*Math.pow(2,1-h))*l>=2&&(a++,l/=2),a+h>=c?(s=0,a=c):a+h>=1?(s=(e*l-1)*Math.pow(2,i),a+=h):(s=e*Math.pow(2,h-1)*Math.pow(2,i),a=0));i>=8;t[n+f]=255&s,f+=d,s/=256,i-=8);for(a=a<<i|s,u+=i;u>0;t[n+f]=255&a,f+=d,a/=256,u-=8);t[n+f-d]|=128*g}},function(t,e,n){"use strict";var r=n(8),i=n(14),o=n(0),a=n(5),s=n(140),l=n(2),u=n(141),c=n(206),h=n(56),p=Object(i.c)(),f=function(){function t(t,e,n,r,i){this.extent_,this.id_=i,this.type_=t,this.flatCoordinates_=e,this.flatInteriorPoints_=null,this.flatMidpoints_=null,this.ends_=n,this.properties_=r}return t.prototype.get=function(t){return this.properties_[t]},t.prototype.getExtent=function(){return this.extent_||(this.extent_=this.type_===r.a.POINT?Object(o.createOrUpdateFromCoordinate)(this.flatCoordinates_):Object(o.createOrUpdateFromFlatCoordinates)(this.flatCoordinates_,0,this.flatCoordinates_.length,2)),this.extent_},t.prototype.getFlatInteriorPoint=function(){if(!this.flatInteriorPoints_){var t=Object(o.getCenter)(this.getExtent());this.flatInteriorPoints_=Object(s.a)(this.flatCoordinates_,0,this.ends_,2,t,0)}return this.flatInteriorPoints_},t.prototype.getFlatInteriorPoints=function(){if(!this.flatInteriorPoints_){var t=Object(c.a)(this.flatCoordinates_,0,this.ends_,2);this.flatInteriorPoints_=Object(s.b)(this.flatCoordinates_,0,this.ends_,2,t)}return this.flatInteriorPoints_},t.prototype.getFlatMidpoint=function(){return this.flatMidpoints_||(this.flatMidpoints_=Object(u.a)(this.flatCoordinates_,0,this.flatCoordinates_.length,2,.5)),this.flatMidpoints_},t.prototype.getFlatMidpoints=function(){if(!this.flatMidpoints_){this.flatMidpoints_=[];for(var t=this.flatCoordinates_,e=0,n=this.ends_,r=0,i=n.length;r<i;++r){var o=n[r],s=Object(u.a)(t,e,o,2,.5);Object(a.c)(this.flatMidpoints_,s),e=o}}return this.flatMidpoints_},t.prototype.getId=function(){return this.id_},t.prototype.getOrientedFlatCoordinates=function(){return this.flatCoordinates_},t.prototype.getGeometry=function(){return this},t.prototype.getSimplifiedGeometry=function(t){return this},t.prototype.simplifyTransformed=function(t,e){return this},t.prototype.getProperties=function(){return this.properties_},t.prototype.getStride=function(){return 2},t.prototype.getStyleFunction=function(){},t.prototype.getType=function(){return this.type_},t.prototype.transform=function(t){var e=(t=Object(l.get)(t)).getExtent(),n=t.getWorldExtent();if(e&&n){var r=Object(o.getHeight)(n)/Object(o.getHeight)(e);Object(i.b)(p,n[0],n[3],r,-r,0,0,0),Object(h.c)(this.flatCoordinates_,0,this.flatCoordinates_.length,2,p,this.flatCoordinates_)}},t.prototype.getEnds=function(){return this.ends_},t}();f.prototype.getEndss=f.prototype.getEnds,f.prototype.getFlatCoordinates=f.prototype.getOrientedFlatCoordinates,e.a=f},function(t,e,n){"use strict";var r,i=n(143),o=n(149),a=n(30),s=n(14),l=n(1),u=n(0),c=n(2),h=n(6),p=n(5),f=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),d=function(t){function e(e){var n=t.call(this,e)||this;return n.extentChanged=!0,n.renderedExtent_=null,n.renderedPixelRatio,n.renderedProjection=null,n.renderedRevision,n.renderedTiles=[],n.newTiles_=!1,n.tmpExtent=Object(u.createEmpty)(),n.tmpTileRange_=new o.b(0,0,0,0),n}return f(e,t),e.prototype.isDrawableTile=function(t){var e=this.getLayer(),n=t.getState(),r=e.getUseInterimTilesOnError();return n==a.a.LOADED||n==a.a.EMPTY||n==a.a.ERROR&&!r},e.prototype.getTile=function(t,e,n,r){var i=r.pixelRatio,o=r.viewState.projection,s=this.getLayer(),l=s.getSource().getTile(t,e,n,i,o);return l.getState()==a.a.ERROR&&(s.getUseInterimTilesOnError()?s.getPreload()>0&&(this.newTiles_=!0):l.setState(a.a.LOADED)),this.isDrawableTile(l)||(l=l.getInterimTile()),l},e.prototype.loadedTileCallback=function(e,n,r){return!!this.isDrawableTile(r)&&t.prototype.loadedTileCallback.call(this,e,n,r)},e.prototype.prepareFrame=function(t){return!!this.getLayer().getSource()},e.prototype.renderFrame=function(t,e){var n=t.layerStatesArray[t.layerIndex],r=t.viewState,i=r.projection,o=r.resolution,f=r.center,d=r.rotation,g=t.pixelRatio,y=this.getLayer(),m=y.getSource(),v=m.getRevision(),_=m.getTileGridForProjection(i),b=_.getZForResolution(o,m.zDirection),w=_.getResolution(b),O=t.extent,x=n.extent&&Object(c.fromUserExtent)(n.extent,i);x&&(O=Object(u.getIntersection)(O,Object(c.fromUserExtent)(n.extent,i)));var E=m.getTilePixelRatio(g),S=Math.round(t.size[0]*E),C=Math.round(t.size[1]*E);if(d){var T=Math.round(Math.sqrt(S*S+C*C));S=T,C=T}var I=w*S/2/E,j=w*C/2/E,L=[f[0]-I,f[1]-j,f[0]+I,f[1]+j],R=_.getTileRangeForExtentAndZ(O,b),P={};P[b]={};var N=this.createLoadedTileFinder(m,i,P),M=this.tmpExtent,A=this.tmpTileRange_;this.newTiles_=!1;for(var k=R.minX;k<=R.maxX;++k)for(var F=R.minY;F<=R.maxY;++F){var D=this.getTile(b,k,F,t);if(this.isDrawableTile(D)){var G=Object(h.c)(this);if(D.getState()==a.a.LOADED){P[b][D.tileCoord.toString()]=D;var U=D.inTransition(G);this.newTiles_||!U&&-1!==this.renderedTiles.indexOf(D)||(this.newTiles_=!0)}if(1===D.getAlpha(G,t.time))continue}var z=_.getTileCoordChildTileRange(D.tileCoord,A,M),B=!1;z&&(B=N(b+1,z)),B||_.forEachTileCoordParentTileRange(D.tileCoord,N,A,M)}var V=w/o;Object(s.b)(this.pixelTransform,t.size[0]/2,t.size[1]/2,1/E,1/E,d,-S/2,-C/2);var Y=Object(s.k)(this.pixelTransform);this.useContainer(e,Y,n.opacity);var q=this.context,X=q.canvas;Object(s.d)(this.inversePixelTransform,this.pixelTransform),Object(s.b)(this.tempTransform,S/2,C/2,V,V,0,-S/2,-C/2),X.width!=S||X.height!=C?(X.width=S,X.height=C):this.containerReused||q.clearRect(0,0,S,C),x&&this.clipUnrotated(q,t,x),Object(l.a)(q,m.getContextOptions()),this.preRender(q,t),this.renderedTiles.length=0;var W,H,K,Z=Object.keys(P).map(Number);Z.sort(p.i),1!==n.opacity||this.containerReused&&!m.getOpaque(t.viewState.projection)?(W=[],H=[]):Z=Z.reverse();for(var J=Z.length-1;J>=0;--J){var $=Z[J],Q=m.getTilePixelSize($,g,i),tt=_.getResolution($)/w,et=Q[0]*tt*V,nt=Q[1]*tt*V,rt=_.getTileCoordForCoordAndZ(Object(u.getTopLeft)(L),$),it=_.getTileCoordExtent(rt),ot=Object(s.a)(this.tempTransform,[E*(it[0]-L[0])/w,E*(L[3]-it[3])/w]),at=E*m.getGutterForProjection(i),st=P[$];for(var lt in st){var ut=(D=st[lt]).tileCoord,ct=rt[1]-ut[1],ht=Math.round(ot[0]-(ct-1)*et),pt=rt[2]-ut[2],ft=Math.round(ot[1]-(pt-1)*nt),dt=ht-(k=Math.round(ot[0]-ct*et)),gt=ft-(F=Math.round(ot[1]-pt*nt)),yt=b===$;if(!(U=yt&&1!==D.getAlpha(Object(h.c)(this),t.time)))if(W){q.save(),K=[k,F,k+dt,F,k+dt,F+gt,k,F+gt];for(var mt=0,vt=W.length;mt<vt;++mt)if(b!==$&&$<H[mt]){var _t=W[mt];q.beginPath(),q.moveTo(K[0],K[1]),q.lineTo(K[2],K[3]),q.lineTo(K[4],K[5]),q.lineTo(K[6],K[7]),q.moveTo(_t[6],_t[7]),q.lineTo(_t[4],_t[5]),q.lineTo(_t[2],_t[3]),q.lineTo(_t[0],_t[1]),q.clip()}W.push(K),H.push($)}else q.clearRect(k,F,dt,gt);this.drawTileImage(D,t,k,F,dt,gt,at,yt,n.opacity),W&&!U?(q.restore(),this.renderedTiles.unshift(D)):this.renderedTiles.push(D),this.updateUsedTiles(t.usedTiles,m,D)}}return this.renderedRevision=v,this.renderedResolution=w,this.extentChanged=!this.renderedExtent_||!Object(u.equals)(this.renderedExtent_,L),this.renderedExtent_=L,this.renderedPixelRatio=g,this.renderedProjection=i,this.manageTilePyramid(t,m,_,g,i,O,b,y.getPreload()),this.scheduleExpireCache(t,m),this.postRender(q,t),n.extent&&q.restore(),Y!==X.style.transform&&(X.style.transform=Y),this.container},e.prototype.drawTileImage=function(t,e,n,r,i,o,a,s,l){var u=this.getTileImage(t);if(u){var c=Object(h.c)(this),p=s?t.getAlpha(c,e.time):1,f=l*p,d=f!==this.context.globalAlpha;d&&(this.context.save(),this.context.globalAlpha=f),this.context.drawImage(u,a,a,u.width-2*a,u.height-2*a,n,r,i,o),d&&this.context.restore(),1!==p?e.animate=!0:s&&t.endTransition(c)}},e.prototype.getImage=function(){var t=this.context;return t?t.canvas:null},e.prototype.getTileImage=function(t){return t.getImage()},e.prototype.scheduleExpireCache=function(t,e){if(e.canExpireCache()){var n=function(t,e,n){var r=Object(h.c)(t);r in n.usedTiles&&t.expireCache(n.viewState.projection,n.usedTiles[r])}.bind(null,e);t.postRenderFunctions.push(n)}},e.prototype.updateUsedTiles=function(t,e,n){var r=Object(h.c)(e);r in t||(t[r]={}),t[r][n.getKey()]=!0},e.prototype.manageTilePyramid=function(t,e,n,r,i,o,s,l,u){var c=Object(h.c)(e);c in t.wantedTiles||(t.wantedTiles[c]={});var p,f,d,g,y,m,v=t.wantedTiles[c],_=t.tileQueue,b=0;for(m=n.getMinZoom();m<=s;++m)for(f=n.getTileRangeForExtentAndZ(o,m,f),d=n.getResolution(m),g=f.minX;g<=f.maxX;++g)for(y=f.minY;y<=f.maxY;++y)s-m<=l?(++b,(p=e.getTile(m,g,y,r,i)).getState()==a.a.IDLE&&(v[p.getKey()]=!0,_.isKeyQueued(p.getKey())||_.enqueue([p,c,n.getTileCoordCenter(p.tileCoord),d])),void 0!==u&&u(p)):e.useTile(m,g,y,i);e.updateCacheSize(b,i)},e}(i.a);d.prototype.getLayer,e.a=d},function(t,e,n){"use strict";e.a={IMAGE:"image",HYBRID:"hybrid",VECTOR:"vector"}},function(t,e,n){"use strict";e.a={PRELOAD:"preload",USE_INTERIM_TILES_ON_ERROR:"useInterimTilesOnError"}},function(t,e,n){"use strict";var r,i=n(75),o=n(30),a=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),s=function(t){function e(e,n,r,i,o,a){var s=t.call(this,e,n,a)||this;return s.extent=null,s.format_=i,s.features_=null,s.loader_,s.projection=null,s.resolution,s.tileLoadFunction_=o,s.url_=r,s.key=r,s}return a(e,t),e.prototype.getFormat=function(){return this.format_},e.prototype.getFeatures=function(){return this.features_},e.prototype.load=function(){this.state==o.a.IDLE&&(this.setState(o.a.LOADING),this.tileLoadFunction_(this,this.url_),this.loader_&&this.loader_(this.extent,this.resolution,this.projection))},e.prototype.onLoad=function(t,e){this.setFeatures(t)},e.prototype.onError=function(){this.setState(o.a.ERROR)},e.prototype.setFeatures=function(t){this.features_=t,this.setState(o.a.LOADED)},e.prototype.setLoader=function(t){this.loader_=t},e}(i.a);e.a=s},function(t,e,n){"use strict";var r,i=n(75),o=n(11),a=n(6),s=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),l=[],u=function(t){function e(e,n,r,i){var o=t.call(this,e,n,{transition:0})||this;return o.context_={},o.executorGroups={},o.declutterExecutorGroups={},o.loadingSourceTiles=0,o.hitDetectionImageData={},o.replayState_={},o.sourceTiles=[],o.errorTileKeys={},o.wantedResolution,o.getSourceTiles=i.bind(void 0,o),o.wrappedTileCoord=r,o}return s(e,t),e.prototype.getContext=function(t){var e=Object(a.c)(t);return e in this.context_||(this.context_[e]=Object(o.a)(1,1,l)),this.context_[e]},e.prototype.hasContext=function(t){return Object(a.c)(t)in this.context_},e.prototype.getImage=function(t){return this.hasContext(t)?this.getContext(t).canvas:null},e.prototype.getReplayState=function(t){var e=Object(a.c)(t);return e in this.replayState_||(this.replayState_[e]={dirty:!1,renderedRenderOrder:null,renderedResolution:NaN,renderedRevision:-1,renderedTileResolution:NaN,renderedTileRevision:-1,renderedTileZ:-1}),this.replayState_[e]},e.prototype.load=function(){this.getSourceTiles()},e.prototype.release=function(){for(var e in this.context_)l.push(this.context_[e].canvas),delete this.context_[e];t.prototype.release.call(this)},e}(i.a);e.a=u},function(t,e,n){"use strict";var r,i=n(58),o=n(55),a=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),s=function(t){function e(e){var n=t.call(this)||this,r=e||{};return n.delta_=r.delta?r.delta:1,n.duration_=void 0!==r.duration?r.duration:250,n}return a(e,t),e.prototype.handleEvent=function(t){var e=!1;if(t.type==o.a.DBLCLICK){var n=t.originalEvent,r=t.map,a=t.coordinate,s=n.shiftKey?-this.delta_:this.delta_,l=r.getView();Object(i.c)(l,s,a,this.duration_),n.preventDefault(),e=!0}return!e},e}(i.a);e.a=s},function(t,e,n){"use strict";var r,i=n(26),o=n(13),a=n(18),s=n(47),l=n(20),u=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),c=function(t){function e(e){var n=t.call(this,{stopDown:o.a})||this,r=e||{};n.kinetic_=r.kinetic,n.lastCentroid=null,n.lastPointersCount_,n.panning_=!1;var i=r.condition?r.condition:Object(a.a)(a.j,a.l);return n.condition_=r.onFocusOnly?Object(a.a)(a.f,i):i,n.noKinetic_=!1,n}return u(e,t),e.prototype.handleDragEvent=function(t){this.panning_||(this.panning_=!0,this.getMap().getView().beginInteraction());var e=this.targetPointers,n=Object(i.a)(e);if(e.length==this.lastPointersCount_){if(this.kinetic_&&this.kinetic_.update(n[0],n[1]),this.lastCentroid){var r=[this.lastCentroid[0]-n[0],n[1]-this.lastCentroid[1]],o=t.map.getView();Object(l.i)(r,o.getResolution()),Object(l.h)(r,o.getRotation()),o.adjustCenterInternal(r)}}else this.kinetic_&&this.kinetic_.begin();this.lastCentroid=n,this.lastPointersCount_=e.length,t.originalEvent.preventDefault()},e.prototype.handleUpEvent=function(t){var e=t.map,n=e.getView();if(0===this.targetPointers.length){if(!this.noKinetic_&&this.kinetic_&&this.kinetic_.end()){var r=this.kinetic_.getDistance(),i=this.kinetic_.getAngle(),o=n.getCenterInternal(),a=e.getPixelFromCoordinateInternal(o),l=e.getCoordinateFromPixelInternal([a[0]-r*Math.cos(i),a[1]-r*Math.sin(i)]);n.animateInternal({center:n.getConstrainedCenter(l),duration:500,easing:s.b})}return this.panning_&&(this.panning_=!1,n.endInteraction()),!1}return this.kinetic_&&this.kinetic_.begin(),this.lastCentroid=null,!0},e.prototype.handleDownEvent=function(t){if(this.targetPointers.length>0&&this.condition_(t)){var e=t.map.getView();return this.lastCentroid=null,e.getAnimating()&&e.cancelAnimations(),this.kinetic_&&this.kinetic_.begin(),this.noKinetic_=this.targetPointers.length>1,!0}return!1},e}(i.b);e.a=c},function(t,e,n){"use strict";var r,i=n(26),o=n(13),a=n(18),s=n(137),l=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),u=function(t){function e(e){var n=this,r=e||{};return(n=t.call(this,{stopDown:o.a})||this).condition_=r.condition?r.condition:a.c,n.lastAngle_=void 0,n.duration_=void 0!==r.duration?r.duration:250,n}return l(e,t),e.prototype.handleDragEvent=function(t){if(Object(a.h)(t)){var e=t.map,n=e.getView();if(n.getConstraints().rotation!==s.c){var r=e.getSize(),i=t.pixel,o=Math.atan2(r[1]/2-i[1],i[0]-r[0]/2);if(void 0!==this.lastAngle_){var l=o-this.lastAngle_;n.adjustRotationInternal(-l)}this.lastAngle_=o}}},e.prototype.handleUpEvent=function(t){return!Object(a.h)(t)||(t.map.getView().endInteraction(this.duration_),!1)},e.prototype.handleDownEvent=function(t){return!!Object(a.h)(t)&&(!(!Object(a.g)(t)||!this.condition_(t))&&(t.map.getView().beginInteraction(),this.lastAngle_=void 0,!0))},e}(i.b);e.a=u},function(t,e,n){"use strict";var r,i=n(218),o=n(47),a=n(18),s=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),l=function(t){function e(e){var n=this,r=e||{},i=r.condition?r.condition:a.m;return(n=t.call(this,{condition:i,className:r.className||"ol-dragzoom",minArea:r.minArea})||this).duration_=void 0!==r.duration?r.duration:200,n.out_=void 0!==r.out&&r.out,n}return s(e,t),e.prototype.onBoxEnd=function(t){var e=this.getMap().getView(),n=this.getGeometry();if(this.out_){var r=e.rotatedExtentForGeometry(n),i=e.getResolutionForExtentInternal(r),a=e.getResolution()/i;(n=n.clone()).scale(a*a)}e.fitInternal(n,{duration:this.duration_,easing:o.b})},e}(i.a);e.a=l},function(t,e,n){"use strict";var r,i=n(12),o=n(26),a=n(294),s=n(18),l=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),u="boxstart",c="boxdrag",h="boxend",p="boxcancel",f=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.coordinate=n,i.mapBrowserEvent=r,i}return l(e,t),e}(i.a),d=function(t){function e(e){var n=t.call(this)||this;n.on,n.once,n.un;var r=e||{};return n.box_=new a.a(r.className||"ol-dragbox"),n.minArea_=void 0!==r.minArea?r.minArea:64,r.onBoxEnd&&(n.onBoxEnd=r.onBoxEnd),n.startPixel_=null,n.condition_=r.condition?r.condition:s.g,n.boxEndCondition_=r.boxEndCondition?r.boxEndCondition:n.defaultBoxEndCondition,n}return l(e,t),e.prototype.defaultBoxEndCondition=function(t,e,n){var r=n[0]-e[0],i=n[1]-e[1];return r*r+i*i>=this.minArea_},e.prototype.getGeometry=function(){return this.box_.getGeometry()},e.prototype.handleDragEvent=function(t){this.box_.setPixels(this.startPixel_,t.pixel),this.dispatchEvent(new f(c,t.coordinate,t))},e.prototype.handleUpEvent=function(t){this.box_.setMap(null);var e=this.boxEndCondition_(t,this.startPixel_,t.pixel);return e&&this.onBoxEnd(t),this.dispatchEvent(new f(e?h:p,t.coordinate,t)),!1},e.prototype.handleDownEvent=function(t){return!!this.condition_(t)&&(this.startPixel_=t.pixel,this.box_.setMap(t.map),this.box_.setPixels(this.startPixel_,this.startPixel_),this.dispatchEvent(new f(u,t.coordinate,t)),!0)},e.prototype.onBoxEnd=function(t){},e}(o.b);e.a=d},function(t,e,n){"use strict";var r,i=n(3),o=n(58),a=n(295),s=n(18),l=n(20),u=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),c=function(t){function e(e){var n=t.call(this)||this,r=e||{};return n.defaultCondition_=function(t){return Object(s.j)(t)&&Object(s.o)(t)},n.condition_=void 0!==r.condition?r.condition:n.defaultCondition_,n.duration_=void 0!==r.duration?r.duration:100,n.pixelDelta_=void 0!==r.pixelDelta?r.pixelDelta:128,n}return u(e,t),e.prototype.handleEvent=function(t){var e=!1;if(t.type==i.a.KEYDOWN){var n=t.originalEvent,r=n.keyCode;if(this.condition_(t)&&(r==a.a.DOWN||r==a.a.LEFT||r==a.a.RIGHT||r==a.a.UP)){var s=t.map.getView(),u=s.getResolution()*this.pixelDelta_,c=0,h=0;r==a.a.DOWN?h=-u:r==a.a.LEFT?c=-u:r==a.a.RIGHT?c=u:h=u;var p=[c,h];Object(l.h)(p,s.getRotation()),Object(o.b)(s,p,this.duration_),n.preventDefault(),e=!0}}return!e},e}(o.a);e.a=c},function(t,e,n){"use strict";var r,i=n(3),o=n(58),a=n(18),s=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),l=function(t){function e(e){var n=t.call(this)||this,r=e||{};return n.condition_=r.condition?r.condition:a.o,n.delta_=r.delta?r.delta:1,n.duration_=void 0!==r.duration?r.duration:100,n}return s(e,t),e.prototype.handleEvent=function(t){var e=!1;if(t.type==i.a.KEYDOWN||t.type==i.a.KEYPRESS){var n=t.originalEvent,r=n.charCode;if(this.condition_(t)&&(r=="+".charCodeAt(0)||r=="-".charCodeAt(0))){var a=t.map,s=r=="+".charCodeAt(0)?this.delta_:-this.delta_,l=a.getView();Object(o.c)(l,s,void 0,this.duration_),n.preventDefault(),e=!0}}return!e},e}(o.a);e.a=l},function(t,e,n){"use strict";var r,i=n(3),o=n(58),a=n(39),s=n(18),l=n(7),u=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),c="trackpad",h="wheel",p=function(t){function e(e){var n=this,r=e||{};(n=t.call(this,r)||this).totalDelta_=0,n.lastDelta_=0,n.maxDelta_=void 0!==r.maxDelta?r.maxDelta:1,n.duration_=void 0!==r.duration?r.duration:250,n.timeout_=void 0!==r.timeout?r.timeout:80,n.useAnchor_=void 0===r.useAnchor||r.useAnchor,n.constrainResolution_=void 0!==r.constrainResolution&&r.constrainResolution;var i=r.condition?r.condition:s.d;return n.condition_=r.onFocusOnly?Object(s.a)(s.f,i):i,n.lastAnchor_=null,n.startTime_=void 0,n.timeoutId_,n.mode_=void 0,n.trackpadEventGap_=400,n.trackpadTimeoutId_,n.deltaPerZoom_=300,n}return u(e,t),e.prototype.endInteraction_=function(){this.trackpadTimeoutId_=void 0,this.getMap().getView().endInteraction(void 0,this.lastDelta_?this.lastDelta_>0?1:-1:0,this.lastAnchor_)},e.prototype.handleEvent=function(t){if(!this.condition_(t))return!0;if(t.type!==i.a.WHEEL)return!0;var e,n=t.map,r=t.originalEvent;if(r.preventDefault(),this.useAnchor_&&(this.lastAnchor_=t.coordinate),t.type==i.a.WHEEL&&(e=r.deltaY,a.b&&r.deltaMode===WheelEvent.DOM_DELTA_PIXEL&&(e/=a.a),r.deltaMode===WheelEvent.DOM_DELTA_LINE&&(e*=40)),0===e)return!1;this.lastDelta_=e;var o=Date.now();void 0===this.startTime_&&(this.startTime_=o),(!this.mode_||o-this.startTime_>this.trackpadEventGap_)&&(this.mode_=Math.abs(e)<4?c:h);var s=n.getView();if(this.mode_===c&&!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(-e/this.deltaPerZoom_,this.lastAnchor_),this.startTime_=o,!1;this.totalDelta_+=e;var l=Math.max(this.timeout_-(o-this.startTime_),0);return clearTimeout(this.timeoutId_),this.timeoutId_=setTimeout(this.handleWheelZoom_.bind(this,n),l),!1},e.prototype.handleWheelZoom_=function(t){var e=t.getView();e.getAnimating()&&e.cancelAnimations();var n=-Object(l.a)(this.totalDelta_,-this.maxDelta_*this.deltaPerZoom_,this.maxDelta_*this.deltaPerZoom_)/this.deltaPerZoom_;(e.getConstrainResolution()||this.constrainResolution_)&&(n=n?n>0?1:-1:0),Object(o.c)(e,n,this.lastAnchor_,this.duration_),this.mode_=void 0,this.totalDelta_=0,this.lastAnchor_=null,this.startTime_=void 0,this.timeoutId_=void 0},e.prototype.setMouseAnchor=function(t){this.useAnchor_=t,t||(this.lastAnchor_=null)},e}(o.a);e.a=p},function(t,e,n){"use strict";var r,i=n(26),o=n(13),a=n(137),s=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),l=function(t){function e(e){var n=this,r=e||{},i=r;return i.stopDown||(i.stopDown=o.a),(n=t.call(this,i)||this).anchor_=null,n.lastAngle_=void 0,n.rotating_=!1,n.rotationDelta_=0,n.threshold_=void 0!==r.threshold?r.threshold:.3,n.duration_=void 0!==r.duration?r.duration:250,n}return s(e,t),e.prototype.handleDragEvent=function(t){var e=0,n=this.targetPointers[0],r=this.targetPointers[1],o=Math.atan2(r.clientY-n.clientY,r.clientX-n.clientX);if(void 0!==this.lastAngle_){var s=o-this.lastAngle_;this.rotationDelta_+=s,!this.rotating_&&Math.abs(this.rotationDelta_)>this.threshold_&&(this.rotating_=!0),e=s}this.lastAngle_=o;var l=t.map,u=l.getView();if(u.getConstraints().rotation!==a.c){var c=l.getViewport().getBoundingClientRect(),h=Object(i.a)(this.targetPointers);h[0]-=c.left,h[1]-=c.top,this.anchor_=l.getCoordinateFromPixelInternal(h),this.rotating_&&(l.render(),u.adjustRotationInternal(e,this.anchor_))}},e.prototype.handleUpEvent=function(t){return!(this.targetPointers.length<2)||(t.map.getView().endInteraction(this.duration_),!1)},e.prototype.handleDownEvent=function(t){if(this.targetPointers.length>=2){var 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},e}(i.b);e.a=l},function(t,e,n){"use strict";var r,i=n(26),o=n(13),a=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),s=function(t){function e(e){var n=this,r=e||{},i=r;return i.stopDown||(i.stopDown=o.a),(n=t.call(this,i)||this).anchor_=null,n.duration_=void 0!==r.duration?r.duration:400,n.lastDistance_=void 0,n.lastScaleDelta_=1,n}return a(e,t),e.prototype.handleDragEvent=function(t){var e=1,n=this.targetPointers[0],r=this.targetPointers[1],o=n.clientX-r.clientX,a=n.clientY-r.clientY,s=Math.sqrt(o*o+a*a);void 0!==this.lastDistance_&&(e=this.lastDistance_/s),this.lastDistance_=s;var l=t.map,u=l.getView();1!=e&&(this.lastScaleDelta_=e);var c=l.getViewport().getBoundingClientRect(),h=Object(i.a)(this.targetPointers);h[0]-=c.left,h[1]-=c.top,this.anchor_=l.getCoordinateFromPixelInternal(h),l.render(),u.adjustResolutionInternal(e,this.anchor_)},e.prototype.handleUpEvent=function(t){if(this.targetPointers.length<2){var e=t.map.getView(),n=this.lastScaleDelta_>1?1:-1;return e.endInteraction(this.duration_,n),!1}return!0},e.prototype.handleDownEvent=function(t){if(this.targetPointers.length>=2){var e=t.map;return this.anchor_=null,this.lastDistance_=void 0,this.lastScaleDelta_=1,this.handlingDownUpSequence||e.getView().beginInteraction(),!0}return!1},e}(i.b);e.a=s},function(t,e,n){"use strict";var r,i=n(8),o=n(36),a=n(0),s=n(48),l=n(56),u=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),c=function(t){function e(e,n,r){var i=t.call(this)||this;if(void 0!==r&&void 0===n)i.setFlatCoordinates(r,e);else{var o=n||0;i.setCenterAndRadius(e,o,r)}return i}return u(e,t),e.prototype.clone=function(){var t=new e(this.flatCoordinates.slice(),void 0,this.layout);return t.applyProperties(this),t},e.prototype.closestPointXY=function(t,e,n,r){var i=this.flatCoordinates,o=t-i[0],a=e-i[1],s=o*o+a*a;if(s<r){if(0===s)for(var l=0;l<this.stride;++l)n[l]=i[l];else{var u=this.getRadius()/Math.sqrt(s);n[0]=i[0]+u*o,n[1]=i[1]+u*a;for(l=2;l<this.stride;++l)n[l]=i[l]}return n.length=this.stride,s}return r},e.prototype.containsXY=function(t,e){var n=this.flatCoordinates,r=t-n[0],i=e-n[1];return r*r+i*i<=this.getRadiusSquared_()},e.prototype.getCenter=function(){return this.flatCoordinates.slice(0,this.stride)},e.prototype.computeExtent=function(t){var e=this.flatCoordinates,n=e[this.stride]-e[0];return Object(a.createOrUpdate)(e[0]-n,e[1]-n,e[0]+n,e[1]+n,t)},e.prototype.getRadius=function(){return Math.sqrt(this.getRadiusSquared_())},e.prototype.getRadiusSquared_=function(){var t=this.flatCoordinates[this.stride]-this.flatCoordinates[0],e=this.flatCoordinates[this.stride+1]-this.flatCoordinates[1];return t*t+e*e},e.prototype.getType=function(){return i.a.CIRCLE},e.prototype.intersectsExtent=function(t){var e=this.getExtent();if(Object(a.intersects)(t,e)){var n=this.getCenter();return t[0]<=n[0]&&t[2]>=n[0]||(t[1]<=n[1]&&t[3]>=n[1]||Object(a.forEachCorner)(t,this.intersectsCoordinate.bind(this)))}return!1},e.prototype.setCenter=function(t){var e=this.stride,n=this.flatCoordinates[e]-this.flatCoordinates[0],r=t.slice();r[e]=r[0]+n;for(var i=1;i<e;++i)r[e+i]=t[i];this.setFlatCoordinates(this.layout,r),this.changed()},e.prototype.setCenterAndRadius=function(t,e,n){this.setLayout(n,t,0),this.flatCoordinates||(this.flatCoordinates=[]);var r=this.flatCoordinates,i=Object(s.a)(r,0,t,this.stride);r[i++]=r[0]+e;for(var o=1,a=this.stride;o<a;++o)r[i++]=r[o];r.length=i,this.changed()},e.prototype.getCoordinates=function(){return null},e.prototype.setCoordinates=function(t,e){},e.prototype.setRadius=function(t){this.flatCoordinates[this.stride]=this.flatCoordinates[0]+t,this.changed()},e.prototype.rotate=function(t,e){var n=this.getCenter(),r=this.getStride();this.setCenter(Object(l.a)(n,0,n.length,r,t,e,n)),this.changed()},e.prototype.translate=function(t,e){var n=this.getCenter(),r=this.getStride();this.setCenter(Object(l.d)(n,0,n.length,r,t,e,n)),this.changed()},e}(o.a);c.prototype.transform,e.a=c},function(t,e,n){"use strict";var r,i=n(25),o=n(12),a=n(155),s=n(26),l=n(13),u=n(18),c=n(5),h=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),p="translatestart",f="translating",d="translateend",g=function(t){function e(e,n,r,i,o){var a=t.call(this,e)||this;return a.features=n,a.coordinate=r,a.startCoordinate=i,a.mapBrowserEvent=o,a}return h(e,t),e}(o.a),y=function(t){function e(e){var n,r=this,i=e||{};if((r=t.call(this,i)||this).on,r.once,r.un,r.lastCoordinate_=null,r.startCoordinate_=null,r.features_=void 0!==i.features?i.features:null,i.layers)if("function"===typeof i.layers)n=i.layers;else{var o=i.layers;n=function(t){return Object(c.f)(o,t)}}else n=l.b;return r.layerFilter_=n,r.filter_=i.filter?i.filter:l.b,r.hitTolerance_=i.hitTolerance?i.hitTolerance:0,r.condition_=i.condition?i.condition:u.d,r.lastFeature_=null,r.addChangeListener(a.a.ACTIVE,r.handleActiveChanged_),r}return h(e,t),e.prototype.handleDownEvent=function(t){if(!t.originalEvent||!this.condition_(t))return!1;if(this.lastFeature_=this.featuresAtPixel_(t.pixel,t.map),!this.lastCoordinate_&&this.lastFeature_){this.startCoordinate_=t.coordinate,this.lastCoordinate_=t.coordinate,this.handleMoveEvent(t);var e=this.features_||new i.a([this.lastFeature_]);return this.dispatchEvent(new g(p,e,t.coordinate,this.startCoordinate_,t)),!0}return!1},e.prototype.handleUpEvent=function(t){if(this.lastCoordinate_){this.lastCoordinate_=null,this.handleMoveEvent(t);var e=this.features_||new i.a([this.lastFeature_]);return this.dispatchEvent(new g(d,e,t.coordinate,this.startCoordinate_,t)),this.startCoordinate_=null,!0}return!1},e.prototype.handleDragEvent=function(t){if(this.lastCoordinate_){var e=t.coordinate,n=e[0]-this.lastCoordinate_[0],r=e[1]-this.lastCoordinate_[1],o=this.features_||new i.a([this.lastFeature_]);o.forEach(function(t){var e=t.getGeometry();e.translate(n,r),t.setGeometry(e)}),this.lastCoordinate_=e,this.dispatchEvent(new g(f,o,e,this.startCoordinate_,t))}},e.prototype.handleMoveEvent=function(t){var e=t.map.getViewport();this.featuresAtPixel_(t.pixel,t.map)?(e.classList.remove(this.lastCoordinate_?"ol-grab":"ol-grabbing"),e.classList.add(this.lastCoordinate_?"ol-grabbing":"ol-grab")):e.classList.remove("ol-grab","ol-grabbing")},e.prototype.featuresAtPixel_=function(t,e){return e.forEachFeatureAtPixel(t,function(t,e){if(this.filter_(t,e)&&(!this.features_||Object(c.f)(this.features_.getArray(),t)))return t}.bind(this),{layerFilter:this.layerFilter_,hitTolerance:this.hitTolerance_})},e.prototype.getHitTolerance=function(){return this.hitTolerance_},e.prototype.setHitTolerance=function(t){this.hitTolerance_=t},e.prototype.setMap=function(e){var n=this.getMap();t.prototype.setMap.call(this,e),this.updateState_(n)},e.prototype.handleActiveChanged_=function(){this.updateState_(null)},e.prototype.updateState_=function(t){var e=this.getMap(),n=this.getActive();e&&n||(e=e||t)&&e.getViewport().classList.remove("ol-grab","ol-grabbing")},e}(s.b);e.a=y},function(t,e,n){"use strict";var r,i=n(31),o=n(52),a=n(0),s=n(4),l=n(76),u=n(51),c=n(2),h=n(158),p=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),f=function(t){function e(e){var n=t.call(this,{attributions:e.attributions,cacheSize:e.cacheSize,crossOrigin:e.crossOrigin,imageSmoothing:e.imageSmoothing,projection:Object(c.get)("EPSG:3857"),reprojectionErrorThreshold:e.reprojectionErrorThreshold,state:i.a.LOADING,tileLoadFunction:e.tileLoadFunction,wrapX:void 0===e.wrapX||e.wrapX,transition:e.transition,zDirection:e.zDirection})||this;if(n.tileJSON_=null,n.tileSize_=e.tileSize,e.url)if(e.jsonp)Object(h.a)(e.url,n.handleTileJSONResponse.bind(n),n.handleTileJSONError.bind(n));else{var r=new XMLHttpRequest;r.addEventListener("load",n.onXHRLoad_.bind(n)),r.addEventListener("error",n.onXHRError_.bind(n)),r.open("GET",e.url),r.send()}else e.tileJSON?n.handleTileJSONResponse(e.tileJSON):Object(s.a)(!1,51);return n}return p(e,t),e.prototype.onXHRLoad_=function(t){var e=t.target;if(!e.status||e.status>=200&&e.status<300){var n=void 0;try{n=JSON.parse(e.responseText)}catch(t){return void this.handleTileJSONError()}this.handleTileJSONResponse(n)}else this.handleTileJSONError()},e.prototype.onXHRError_=function(t){this.handleTileJSONError()},e.prototype.getTileJSON=function(){return this.tileJSON_},e.prototype.handleTileJSONResponse=function(t){var e,n=Object(c.get)("EPSG:4326"),r=this.getProjection();if(void 0!==t.bounds){var o=Object(c.getTransformFromProjections)(n,r);e=Object(a.applyTransform)(t.bounds,o)}var s=Object(u.extentFromProjection)(r),h=t.minzoom||0,p=t.maxzoom||22,f=Object(u.createXYZ)({extent:s,maxZoom:p,minZoom:h,tileSize:this.tileSize_});if(this.tileGrid=f,this.tileUrlFunction=Object(l.a)(t.tiles,f),void 0!==t.attribution&&!this.getAttributions()){var d=void 0!==e?e:s;this.setAttributions(function(e){return Object(a.intersects)(d,e.extent)?[t.attribution]:null})}this.tileJSON_=t,this.setState(i.a.READY)},e.prototype.handleTileJSONError=function(){this.setState(i.a.ERROR)},e}(o.a);e.a=f},function(t,e,n){"use strict";var r=n(0),i=n(2),o=n(7),a=10,s=function(){function t(t,e,n,s,l,u){this.sourceProj_=t,this.targetProj_=e;var c={},h=Object(i.getTransform)(this.targetProj_,this.sourceProj_);this.transformInv_=function(t){var e=t[0]+"/"+t[1];return c[e]||(c[e]=h(t)),c[e]},this.maxSourceExtent_=s,this.errorThresholdSquared_=l*l,this.triangles_=[],this.wrapsXInSource_=!1,this.canWrapXInSource_=this.sourceProj_.canWrapX()&&!!s&&!!this.sourceProj_.getExtent()&&Object(r.getWidth)(s)==Object(r.getWidth)(this.sourceProj_.getExtent()),this.sourceWorldWidth_=this.sourceProj_.getExtent()?Object(r.getWidth)(this.sourceProj_.getExtent()):null,this.targetWorldWidth_=this.targetProj_.getExtent()?Object(r.getWidth)(this.targetProj_.getExtent()):null;var p=Object(r.getTopLeft)(n),f=Object(r.getTopRight)(n),d=Object(r.getBottomRight)(n),g=Object(r.getBottomLeft)(n),y=this.transformInv_(p),m=this.transformInv_(f),v=this.transformInv_(d),_=this.transformInv_(g),b=a+(u?Math.max(0,Math.ceil(Object(o.d)(Object(r.getArea)(n)/(u*u*256*256)))):0);if(this.addQuad_(p,f,d,g,y,m,v,_,b),this.wrapsXInSource_){var w=1/0;this.triangles_.forEach(function(t,e,n){w=Math.min(w,t.source[0][0],t.source[1][0],t.source[2][0])}),this.triangles_.forEach(function(t){if(Math.max(t.source[0][0],t.source[1][0],t.source[2][0])-w>this.sourceWorldWidth_/2){var e=[[t.source[0][0],t.source[0][1]],[t.source[1][0],t.source[1][1]],[t.source[2][0],t.source[2][1]]];e[0][0]-w>this.sourceWorldWidth_/2&&(e[0][0]-=this.sourceWorldWidth_),e[1][0]-w>this.sourceWorldWidth_/2&&(e[1][0]-=this.sourceWorldWidth_),e[2][0]-w>this.sourceWorldWidth_/2&&(e[2][0]-=this.sourceWorldWidth_);var n=Math.min(e[0][0],e[1][0],e[2][0]);Math.max(e[0][0],e[1][0],e[2][0])-n<this.sourceWorldWidth_/2&&(t.source=e)}}.bind(this))}c={}}return t.prototype.addTriangle_=function(t,e,n,r,i,o){this.triangles_.push({source:[r,i,o],target:[t,e,n]})},t.prototype.addQuad_=function(t,e,n,i,a,s,l,u,c){var h=Object(r.boundingExtent)([a,s,l,u]),p=this.sourceWorldWidth_?Object(r.getWidth)(h)/this.sourceWorldWidth_:null,f=this.sourceWorldWidth_,d=this.sourceProj_.canWrapX()&&p>.5&&p<1,g=!1;if(c>0){if(this.targetProj_.isGlobal()&&this.targetWorldWidth_){var y=Object(r.boundingExtent)([t,e,n,i]);g=Object(r.getWidth)(y)/this.targetWorldWidth_>.25||g}!d&&this.sourceProj_.isGlobal()&&p&&(g=p>.25||g)}if(!(!g&&this.maxSourceExtent_&&isFinite(h[0])&&isFinite(h[1])&&isFinite(h[2])&&isFinite(h[3]))||Object(r.intersects)(h,this.maxSourceExtent_)){var m=0;if(!g&&(!isFinite(a[0])||!isFinite(a[1])||!isFinite(s[0])||!isFinite(s[1])||!isFinite(l[0])||!isFinite(l[1])||!isFinite(u[0])||!isFinite(u[1])))if(c>0)g=!0;else if(1!=(m=(isFinite(a[0])&&isFinite(a[1])?0:8)+(isFinite(s[0])&&isFinite(s[1])?0:4)+(isFinite(l[0])&&isFinite(l[1])?0:2)+(isFinite(u[0])&&isFinite(u[1])?0:1))&&2!=m&&4!=m&&8!=m)return;if(c>0){if(!g){var v=[(t[0]+n[0])/2,(t[1]+n[1])/2],_=this.transformInv_(v),b=void 0;if(d)b=(Object(o.e)(a[0],f)+Object(o.e)(l[0],f))/2-Object(o.e)(_[0],f);else b=(a[0]+l[0])/2-_[0];var w=(a[1]+l[1])/2-_[1];g=b*b+w*w>this.errorThresholdSquared_}if(g){if(Math.abs(t[0]-n[0])<=Math.abs(t[1]-n[1])){var O=[(e[0]+n[0])/2,(e[1]+n[1])/2],x=this.transformInv_(O),E=[(i[0]+t[0])/2,(i[1]+t[1])/2],S=this.transformInv_(E);this.addQuad_(t,e,O,E,a,s,x,S,c-1),this.addQuad_(E,O,n,i,S,x,l,u,c-1)}else{var C=[(t[0]+e[0])/2,(t[1]+e[1])/2],T=this.transformInv_(C),I=[(n[0]+i[0])/2,(n[1]+i[1])/2],j=this.transformInv_(I);this.addQuad_(t,C,I,i,a,T,j,u,c-1),this.addQuad_(C,e,n,I,T,s,l,j,c-1)}return}}if(d){if(!this.canWrapXInSource_)return;this.wrapsXInSource_=!0}0==(11&m)&&this.addTriangle_(t,n,i,a,l,u),0==(14&m)&&this.addTriangle_(t,n,e,a,l,s),m&&(0==(13&m)&&this.addTriangle_(e,i,t,s,u,a),0==(7&m)&&this.addTriangle_(e,i,n,s,u,l))}},t.prototype.calculateSourceExtent=function(){var t=Object(r.createEmpty)();return this.triangles_.forEach(function(e,n,i){var o=e.source;Object(r.extendCoordinate)(t,o[0]),Object(r.extendCoordinate)(t,o[1]),Object(r.extendCoordinate)(t,o[2])}),t},t.prototype.getTriangles=function(){return this.triangles_},t}();e.a=s},function(t,e){var n={thin:100,hairline:100,"ultra-light":100,"extra-light":100,light:200,book:300,regular:400,normal:400,plain:400,roman:400,standard:400,medium:500,"semi-bold":600,"demi-bold":600,bold:700,heavy:800,black:800,"extra-bold":800,"ultra-black":900,"extra-black":900,"ultra-bold":900,"heavy-black":900,fat:900,poster:900},r=/(italic|oblique)$/i,i={};t.exports=function(t,e,o){var a=i[t];if(!a){Array.isArray(t)||(t=[t]);for(var s=400,l="normal",u=[],c=0,h=t.length;c<h;++c){var p=t[c].split(" "),f=p[p.length-1].toLowerCase();for(var d in"normal"==f||"italic"==f||"oblique"==f?(l=f,p.pop(),f=p[p.length-1].toLowerCase()):r.test(f)&&(f=f.replace(r,""),l=p[p.length-1].replace(f,"")),n)if(f==d||f==d.replace("-","")||f==d.replace("-"," ")){s=n[d],p.pop();break}"number"==typeof f&&(s=f);var g=p.join(" ").replace("Klokantech Noto Sans","Noto Sans");-1!==g.indexOf(" ")&&(g='"'+g+'"'),u.push(g)}a=i[t]=[l,s,u]}return a[0]+" "+a[1]+" "+e+"px"+(o?"/"+o:"")+" "+a[2]}},function(t,e,n){"use strict";(function(t,r){function i(t){return function(t){if(Array.isArray(t))return u(t)}(t)||o(t)||l(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(t){if("undefined"!==typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function a(t,e){return c(t)||function(t,e){var n=null==t?null:"undefined"!==typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==n)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(t){s=!0,i=t}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(t,e)||l(t,e)||s()}function s(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function l(t,e){if(t){if("string"===typeof t)return u(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u(t,e):void 0}}function u(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function c(t){if(Array.isArray(t))return t}function h(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function p(t,e,n){return e&&h(t.prototype,e),n&&h(t,n),t}function f(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function d(t,e){if(e&&("object"===_(e)||"function"===typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function g(t){var e="function"===typeof Map?new Map:void 0;return(g=function(t){if(null===t||(n=t,-1===Function.toString.call(n).indexOf("[native code]")))return t;var n;if("function"!==typeof t)throw new TypeError("Super expression must either be null or a function");if("undefined"!==typeof e){if(e.has(t))return e.get(t);e.set(t,r)}function r(){return y(t,arguments,v(this).constructor)}return r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),m(r,t)})(t)}function y(t,e,n){return(y=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}()?Reflect.construct:function(t,e,n){var r=[null];r.push.apply(r,e);var i=new(Function.bind.apply(t,r));return n&&m(i,n.prototype),i}).apply(null,arguments)}function m(t,e){return(m=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function v(t){return(v=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function _(t){"@babel/helpers - typeof";return(_="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}n.d(e,"a",function(){return ct}),n.d(e,"b",function(){return kn}),n.d(e,"c",function(){return dr}),n.d(e,"d",function(){return Tn}),n.d(e,"e",function(){return gr}),n.d(e,"f",function(){return b});var b={$version:8,$root:{version:{required:!0,type:"enum",values:[8],doc:"Style specification version number. Must be 8.",example:8},name:{type:"string",doc:"A human-readable name for the style.",example:"Bright"},metadata:{type:"*",doc:"Arbitrary properties useful to track with the stylesheet, but do not influence rendering. Properties should be prefixed to avoid collisions, like 'mapbox:'."},center:{type:"array",value:"number",doc:"Default map center in longitude and latitude.  The style center will be used only if the map has not been positioned by other means (e.g. map options or user interaction).",example:[-73.9749,40.7736]},zoom:{type:"number",doc:"Default zoom level.  The style zoom will be used only if the map has not been positioned by other means (e.g. map options or user interaction).",example:12.5},bearing:{type:"number",default:0,period:360,units:"degrees",doc:'Default bearing, in degrees. The bearing is the compass direction that is "up"; for example, a bearing of 90\xb0 orients the map so that east is up. This value will be used only if the map has not been positioned by other means (e.g. map options or user interaction).',example:29},pitch:{type:"number",default:0,units:"degrees",doc:"Default pitch, in degrees. Zero is perpendicular to the surface, for a look straight down at the map, while a greater value like 60 looks ahead towards the horizon. The style pitch will be used only if the map has not been positioned by other means (e.g. map options or user interaction).",example:50},light:{type:"light",doc:"The global light source.",example:{anchor:"viewport",color:"white",intensity:.4}},terrain:{type:"terrain",doc:"A global modifier that elevates layers and markers based on a DEM data source."},fog:{type:"fog",doc:"A global effect that fades layers and markers based on their distance to the camera. The fog can be used to approximate the effect of atmosphere on distant objects and enhance the depth perception of the map when used with terrain or 3D features."},sources:{required:!0,type:"sources",doc:"Data source specifications.",example:{"mapbox-streets":{type:"vector",url:"mapbox://mapbox.mapbox-streets-v6"}}},sprite:{type:"string",doc:"A base URL for retrieving the sprite image and metadata. The extensions `.png`, `.json` and scale factor `@2x.png` will be automatically appended. This property is required if any layer uses the `background-pattern`, `fill-pattern`, `line-pattern`, `fill-extrusion-pattern`, or `icon-image` properties. The URL must be absolute, containing the [scheme, authority and path components](https://en.wikipedia.org/wiki/URL#Syntax).",example:"mapbox://sprites/mapbox/bright-v8"},glyphs:{type:"string",doc:"A URL template for loading signed-distance-field glyph sets in PBF format. The URL must include `{fontstack}` and `{range}` tokens. This property is required if any layer uses the `text-field` layout property. The URL must be absolute, containing the [scheme, authority and path components](https://en.wikipedia.org/wiki/URL#Syntax).",example:"mapbox://fonts/mapbox/{fontstack}/{range}.pbf"},transition:{type:"transition",doc:"A global transition definition to use as a default across properties, to be used for timing transitions between one value and the next when no property-specific transition is set. Collision-based symbol fading is controlled independently of the style's `transition` property.",example:{duration:300,delay:0}},layers:{required:!0,type:"array",value:"layer",doc:"Layers will be drawn in the order of this array.",example:[{id:"water",source:"mapbox-streets","source-layer":"water",type:"fill",paint:{"fill-color":"#00ffff"}}]}},sources:{"*":{type:"source",doc:"Specification of a data source. For vector and raster sources, either TileJSON or a URL to a TileJSON must be provided. For image and video sources, a URL must be provided. For GeoJSON sources, a URL or inline GeoJSON must be provided."}},source:["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],source_vector:{type:{required:!0,type:"enum",values:{vector:{doc:"A vector tile source."}},doc:"The type of the source."},url:{type:"string",doc:"A URL to a TileJSON resource. Supported protocols are `http:`, `https:`, and `mapbox://<Tileset ID>`."},tiles:{type:"array",value:"string",doc:"An array of one or more tile source URLs, as in the TileJSON spec."},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129],doc:"An array containing the longitude and latitude of the southwest and northeast corners of the source's bounding box in the following order: `[sw.lng, sw.lat, ne.lng, ne.lat]`. When this property is included in a source, no tiles outside of the given bounds are requested by Mapbox GL."},scheme:{type:"enum",values:{xyz:{doc:"Slippy map tilenames scheme."},tms:{doc:"OSGeo spec scheme."}},default:"xyz",doc:"Influences the y direction of the tile coordinates. The global-mercator (aka Spherical Mercator) profile is assumed."},minzoom:{type:"number",default:0,doc:"Minimum zoom level for which tiles are available, as in the TileJSON spec."},maxzoom:{type:"number",default:22,doc:"Maximum zoom level for which tiles are available, as in the TileJSON spec. Data from tiles at the maxzoom are used when displaying the map at higher zoom levels."},attribution:{type:"string",doc:"Contains an attribution to be displayed when the map is shown to a user."},promoteId:{type:"promoteId",doc:"A property to use as a feature id (for feature state). Either a property name, or an object of the form `{<sourceLayer>: <propertyName>}`. If specified as a string for a vector tile source, the same property is used across all its source layers."},volatile:{type:"boolean",default:!1,doc:"A setting to determine whether a source's tiles are cached locally.","sdk-support":{"basic functionality":{android:"9.3.0",ios:"5.10.0"}}},"*":{type:"*",doc:"Other keys to configure the data source."}},source_raster:{type:{required:!0,type:"enum",values:{raster:{doc:"A raster tile source."}},doc:"The type of the source."},url:{type:"string",doc:"A URL to a TileJSON resource. Supported protocols are `http:`, `https:`, and `mapbox://<Tileset ID>`."},tiles:{type:"array",value:"string",doc:"An array of one or more tile source URLs, as in the TileJSON spec."},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129],doc:"An array containing the longitude and latitude of the southwest and northeast corners of the source's bounding box in the following order: `[sw.lng, sw.lat, ne.lng, ne.lat]`. When this property is included in a source, no tiles outside of the given bounds are requested by Mapbox GL."},minzoom:{type:"number",default:0,doc:"Minimum zoom level for which tiles are available, as in the TileJSON spec."},maxzoom:{type:"number",default:22,doc:"Maximum zoom level for which tiles are available, as in the TileJSON spec. Data from tiles at the maxzoom are used when displaying the map at higher zoom levels."},tileSize:{type:"number",default:512,units:"pixels",doc:"The minimum visual size to display tiles for this layer. Only configurable for raster layers."},scheme:{type:"enum",values:{xyz:{doc:"Slippy map tilenames scheme."},tms:{doc:"OSGeo spec scheme."}},default:"xyz",doc:"Influences the y direction of the tile coordinates. The global-mercator (aka Spherical Mercator) profile is assumed."},attribution:{type:"string",doc:"Contains an attribution to be displayed when the map is shown to a user."},volatile:{type:"boolean",default:!1,doc:"A setting to determine whether a source's tiles are cached locally.","sdk-support":{"basic functionality":{android:"9.3.0",ios:"5.10.0"}}},"*":{type:"*",doc:"Other keys to configure the data source."}},source_raster_dem:{type:{required:!0,type:"enum",values:{"raster-dem":{doc:"A RGB-encoded raster DEM source"}},doc:"The type of the source."},url:{type:"string",doc:"A URL to a TileJSON resource. Supported protocols are `http:`, `https:`, and `mapbox://<Tileset ID>`."},tiles:{type:"array",value:"string",doc:"An array of one or more tile source URLs, as in the TileJSON spec."},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129],doc:"An array containing the longitude and latitude of the southwest and northeast corners of the source's bounding box in the following order: `[sw.lng, sw.lat, ne.lng, ne.lat]`. When this property is included in a source, no tiles outside of the given bounds are requested by Mapbox GL."},minzoom:{type:"number",default:0,doc:"Minimum zoom level for which tiles are available, as in the TileJSON spec."},maxzoom:{type:"number",default:22,doc:"Maximum zoom level for which tiles are available, as in the TileJSON spec. Data from tiles at the maxzoom are used when displaying the map at higher zoom levels."},tileSize:{type:"number",default:512,units:"pixels",doc:"The minimum visual size to display tiles for this layer. Only configurable for raster layers."},attribution:{type:"string",doc:"Contains an attribution to be displayed when the map is shown to a user."},encoding:{type:"enum",values:{terrarium:{doc:"Terrarium format PNG tiles. See https://aws.amazon.com/es/public-datasets/terrain/ for more info."},mapbox:{doc:"Mapbox Terrain RGB tiles. See https://www.mapbox.com/help/access-elevation-data/#mapbox-terrain-rgb for more info."}},default:"mapbox",doc:"The encoding used by this source. Mapbox Terrain RGB is used by default"},volatile:{type:"boolean",default:!1,doc:"A setting to determine whether a source's tiles are cached locally.","sdk-support":{"basic functionality":{android:"9.3.0",ios:"5.10.0"}}},"*":{type:"*",doc:"Other keys to configure the data source."}},source_geojson:{type:{required:!0,type:"enum",values:{geojson:{doc:"A GeoJSON data source."}},doc:"The data type of the GeoJSON source."},data:{type:"*",doc:"A URL to a GeoJSON file, or inline GeoJSON."},maxzoom:{type:"number",default:18,doc:"Maximum zoom level at which to create vector tiles (higher means greater detail at high zoom levels)."},attribution:{type:"string",doc:"Contains an attribution to be displayed when the map is shown to a user."},buffer:{type:"number",default:128,maximum:512,minimum:0,doc:"Size of the tile buffer on each side. A value of 0 produces no buffer. A value of 512 produces a buffer as wide as the tile itself. Larger values produce fewer rendering artifacts near tile edges and slower performance."},filter:{type:"*",doc:"An expression for filtering features prior to processing them for rendering."},tolerance:{type:"number",default:.375,doc:"Douglas-Peucker simplification tolerance (higher means simpler geometries and faster performance)."},cluster:{type:"boolean",default:!1,doc:"If the data is a collection of point features, setting this to true clusters the points by radius into groups. Cluster groups become new `Point` features in the source with additional properties:\n * `cluster` Is `true` if the point is a cluster \n * `cluster_id` A unqiue id for the cluster to be used in conjunction with the [cluster inspection methods](https://www.mapbox.com/mapbox-gl-js/api/#geojsonsource#getclusterexpansionzoom)\n * `point_count` Number of original points grouped into this cluster\n * `point_count_abbreviated` An abbreviated point count"},clusterRadius:{type:"number",default:50,minimum:0,doc:"Radius of each cluster if clustering is enabled. A value of 512 indicates a radius equal to the width of a tile."},clusterMaxZoom:{type:"number",doc:"Max zoom on which to cluster points if clustering is enabled. Defaults to one zoom less than maxzoom (so that last zoom features are not clustered). Clusters are re-evaluated at integer zoom levels so setting clusterMaxZoom to 14 means the clusters will be displayed until z15."},clusterMinPoints:{type:"number",doc:"Minimum number of points necessary to form a cluster if clustering is enabled. Defaults to `2`."},clusterProperties:{type:"*",doc:'An object defining custom properties on the generated clusters if clustering is enabled, aggregating values from clustered points. Has the form `{"property_name": [operator, map_expression]}`. `operator` is any expression function that accepts at least 2 operands (e.g. `"+"` or `"max"`) \u2014 it accumulates the property value from clusters/points the cluster contains; `map_expression` produces the value of a single point.\n\nExample: `{"sum": ["+", ["get", "scalerank"]]}`.\n\nFor more advanced use cases, in place of `operator`, you can use a custom reduce expression that references a special `["accumulated"]` value, e.g.:\n`{"sum": [["+", ["accumulated"], ["get", "sum"]], ["get", "scalerank"]]}`'},lineMetrics:{type:"boolean",default:!1,doc:"Whether to calculate line distance metrics. This is required for line layers that specify `line-gradient` values."},generateId:{type:"boolean",default:!1,doc:"Whether to generate ids for the geojson features. When enabled, the `feature.id` property will be auto assigned based on its index in the `features` array, over-writing any previous values."},promoteId:{type:"promoteId",doc:"A property to use as a feature id (for feature state). Either a property name, or an object of the form `{<sourceLayer>: <propertyName>}`."}},source_video:{type:{required:!0,type:"enum",values:{video:{doc:"A video data source."}},doc:"The data type of the video source."},urls:{required:!0,type:"array",value:"string",doc:"URLs to video content in order of preferred format."},coordinates:{required:!0,doc:"Corners of video specified in longitude, latitude pairs.",type:"array",length:4,value:{type:"array",length:2,value:"number",doc:"A single longitude, latitude pair."}}},source_image:{type:{required:!0,type:"enum",values:{image:{doc:"An image data source."}},doc:"The data type of the image source."},url:{required:!0,type:"string",doc:"URL that points to an image."},coordinates:{required:!0,doc:"Corners of image specified in longitude, latitude pairs.",type:"array",length:4,value:{type:"array",length:2,value:"number",doc:"A single longitude, latitude pair."}}},layer:{id:{type:"string",doc:"Unique layer name.",required:!0},type:{type:"enum",values:{fill:{doc:"A filled polygon with an optional stroked border.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}},line:{doc:"A stroked line.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}},symbol:{doc:"An icon or a text label.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}},circle:{doc:"A filled circle.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}},heatmap:{doc:"A heatmap.","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"fill-extrusion":{doc:"An extruded (3D) polygon.","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}},raster:{doc:"Raster map textures such as satellite imagery.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}},hillshade:{doc:"Client-side hillshading visualization based on DEM data. Currently, the implementation only supports Mapbox Terrain RGB and Mapzen Terrarium tiles.","sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},background:{doc:"The background color or pattern of the map.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}},sky:{doc:"A spherical dome around the map that is always rendered behind all other layers.","sdk-support":{"basic functionality":{js:"2.0.0",ios:"10.0.0",android:"10.0.0"}}}},doc:"Rendering type of this layer.",required:!0},metadata:{type:"*",doc:"Arbitrary properties useful to track with the layer, but do not influence rendering. Properties should be prefixed to avoid collisions, like 'mapbox:'."},source:{type:"string",doc:"Name of a source description to be used for this layer. Required for all layer types except `background`."},"source-layer":{type:"string",doc:"Layer to use from a vector tile source. Required for vector tile sources; prohibited for all other source types, including GeoJSON sources."},minzoom:{type:"number",minimum:0,maximum:24,doc:"The minimum zoom level for the layer. At zoom levels less than the minzoom, the layer will be hidden."},maxzoom:{type:"number",minimum:0,maximum:24,doc:"The maximum zoom level for the layer. At zoom levels equal to or greater than the maxzoom, the layer will be hidden."},filter:{type:"filter",doc:"A expression specifying conditions on source features. Only features that match the filter are displayed. Zoom expressions in filters are only evaluated at integer zoom levels. The `feature-state` expression is not supported in filter expressions."},layout:{type:"layout",doc:"Layout properties for the layer."},paint:{type:"paint",doc:"Default paint properties for this layer."}},layout:["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background","layout_sky"],layout_background:{visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},"property-type":"constant"}},layout_sky:{visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"2.0.0",ios:"10.0.0",android:"10.0.0"}},"property-type":"constant"}},layout_fill:{"fill-sort-key":{type:"number",doc:"Sorts features in ascending order based on this value. Features with a higher sort key will appear above features with a lower sort key.","sdk-support":{"basic functionality":{js:"1.2.0",android:"9.1.0",ios:"5.8.0",macos:"0.15.0"},"data-driven styling":{js:"1.2.0",android:"9.1.0",ios:"5.8.0",macos:"0.15.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},"property-type":"constant"}},layout_circle:{"circle-sort-key":{type:"number",doc:"Sorts features in ascending order based on this value. Features with a higher sort key will appear above features with a lower sort key.","sdk-support":{"basic functionality":{js:"1.2.0",android:"9.2.0",ios:"5.9.0",macos:"0.16.0"},"data-driven styling":{js:"1.2.0",android:"9.2.0",ios:"5.9.0",macos:"0.16.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},"property-type":"constant"}},layout_heatmap:{visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},"property-type":"constant"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},"property-type":"constant"}},layout_line:{"line-cap":{type:"enum",values:{butt:{doc:"A cap with a squared-off end which is drawn to the exact endpoint of the line."},round:{doc:"A cap with a rounded end which is drawn beyond the endpoint of the line at a radius of one-half of the line's width and centered on the endpoint of the line."},square:{doc:"A cap with a squared-off end which is drawn beyond the endpoint of the line at a distance of one-half of the line's width."}},default:"butt",doc:"The display of line endings.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"2.3.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-join":{type:"enum",values:{bevel:{doc:"A join with a squared-off end which is drawn beyond the endpoint of the line at a distance of one-half of the line's width."},round:{doc:"A join with a rounded end which is drawn beyond the endpoint of the line at a radius of one-half of the line's width and centered on the endpoint of the line."},miter:{doc:"A join with a sharp, angled corner which is drawn with the outer sides beyond the endpoint of the path until they meet."}},default:"miter",doc:"The display of lines when joining.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.40.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,doc:"Used to automatically convert miter joins to bevel joins for sharp angles.",requires:[{"line-join":"miter"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,doc:"Used to automatically convert round joins to miter joins for shallow angles.",requires:[{"line-join":"round"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-sort-key":{type:"number",doc:"Sorts features in ascending order based on this value. Features with a higher sort key will appear above features with a lower sort key.","sdk-support":{"basic functionality":{js:"1.2.0",android:"9.1.0",ios:"5.8.0",macos:"0.15.0"},"data-driven styling":{js:"1.2.0",android:"9.1.0",ios:"5.8.0",macos:"0.15.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},"property-type":"constant"}},layout_symbol:{"symbol-placement":{type:"enum",values:{point:{doc:"The label is placed at the point where the geometry is located."},line:{doc:"The label is placed along the line of the geometry. Can only be used on `LineString` and `Polygon` geometries."},"line-center":{doc:"The label is placed at the center of the line of the geometry. Can only be used on `LineString` and `Polygon` geometries. Note that a single feature in a vector tile may contain multiple line geometries."}},default:"point",doc:"Label placement relative to its geometry.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"`line-center` value":{js:"0.47.0",android:"6.4.0",ios:"4.3.0",macos:"0.10.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",doc:"Distance between two symbol anchors.",requires:[{"symbol-placement":"line"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,doc:"If true, the symbols will not cross tile edges to avoid mutual collisions. Recommended in layers that don't have enough padding in the vector tile to prevent collisions, or if it is a point symbol layer placed after a line symbol layer. When using a client that supports global collision detection, like Mapbox GL JS version 0.42.0 or greater, enabling this property is not needed to prevent clipped labels at tile boundaries.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",doc:"Sorts features in ascending order based on this value. Features with lower sort keys are drawn and placed first.  When `icon-allow-overlap` or `text-allow-overlap` is `false`, features with a lower sort key will have priority during placement. When `icon-allow-overlap` or `text-allow-overlap` is set to `true`, features with a higher sort key will overlap over features with a lower sort key.","sdk-support":{"basic functionality":{js:"0.53.0",android:"7.4.0",ios:"4.11.0",macos:"0.14.0"},"data-driven styling":{js:"0.53.0",android:"7.4.0",ios:"4.11.0",macos:"0.14.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{doc:"Sorts symbols by `symbol-sort-key` if set. Otherwise, sorts symbols by their y-position relative to the viewport if `icon-allow-overlap` or `text-allow-overlap` is set to `true` or `icon-ignore-placement` or `text-ignore-placement` is `false`."},"viewport-y":{doc:"Sorts symbols by their y-position relative to the viewport if `icon-allow-overlap` or `text-allow-overlap` is set to `true` or `icon-ignore-placement` or `text-ignore-placement` is `false`."},source:{doc:"Sorts symbols by `symbol-sort-key` if set. Otherwise, no sorting is applied; symbols are rendered in the same order as the source data."}},default:"auto",doc:"Determines whether overlapping symbols in the same layer are rendered in the order that they appear in the data source or by their y-position relative to the viewport. To control the order and prioritization of symbols otherwise, use `symbol-sort-key`.","sdk-support":{"basic functionality":{js:"0.49.0",android:"6.6.0",ios:"4.5.0",macos:"0.12.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,doc:"If true, the icon will be visible even if it collides with other previously drawn symbols.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,doc:"If true, other symbols can be visible even if they collide with the icon.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,doc:"If true, text will display without their corresponding icons when the icon collides with other symbols and the text does not.",requires:["icon-image","text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{doc:"When `symbol-placement` is set to `point`, aligns icons east-west. When `symbol-placement` is set to `line` or `line-center`, aligns icon x-axes with the line."},viewport:{doc:"Produces icons whose x-axes are aligned with the x-axis of the viewport, regardless of the value of `symbol-placement`."},auto:{doc:"When `symbol-placement` is set to `point`, this is equivalent to `viewport`. When `symbol-placement` is set to `line` or `line-center`, this is equivalent to `map`."}},default:"auto",doc:"In combination with `symbol-placement`, determines the rotation behavior of icons.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"`auto` value":{js:"0.25.0",android:"4.2.0",ios:"3.4.0",macos:"0.3.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",doc:"Scales the original size of the icon by the provided factor. The new pixel size of the image will be the original pixel size multiplied by `icon-size`. 1 is the original size; 3 triples the size of the image.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.35.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{doc:"The icon is displayed at its intrinsic aspect ratio."},width:{doc:"The icon is scaled in the x-dimension to fit the width of the text."},height:{doc:"The icon is scaled in the y-dimension to fit the height of the text."},both:{doc:"The icon is scaled in both x- and y-dimensions."}},default:"none",doc:"Scales the icon to fit around the associated text.",requires:["icon-image","text-field"],"sdk-support":{"basic functionality":{js:"0.21.0",android:"4.2.0",ios:"3.4.0",macos:"0.2.1"},"stretchable icons":{js:"1.6.0",android:"9.2.0",ios:"5.8.0",macos:"0.15.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",doc:"Size of the additional area added to dimensions determined by `icon-text-fit`, in clockwise order: top, right, bottom, left.",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],"sdk-support":{"basic functionality":{js:"0.21.0",android:"4.2.0",ios:"3.4.0",macos:"0.2.1"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",doc:"Name of image in sprite to use for drawing an image background.",tokens:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.35.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",doc:"Rotates the icon clockwise.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.21.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"number",default:2,minimum:0,units:"pixels",doc:"Size of the additional area around the icon bounding box used for detecting symbol collisions.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-keep-upright":{type:"boolean",default:!1,doc:"If true, the icon may be flipped to prevent it from being rendered upside-down.",requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],doc:"Offset distance of icon from its anchor. Positive values indicate right and down, while negative values indicate left and up. Each component is multiplied by the value of `icon-size` to obtain the final offset in pixels. When combined with `icon-rotate` the offset will be as if the rotated direction was up.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{doc:"The center of the icon is placed closest to the anchor."},left:{doc:"The left side of the icon is placed closest to the anchor."},right:{doc:"The right side of the icon is placed closest to the anchor."},top:{doc:"The top of the icon is placed closest to the anchor."},bottom:{doc:"The bottom of the icon is placed closest to the anchor."},"top-left":{doc:"The top left corner of the icon is placed closest to the anchor."},"top-right":{doc:"The top right corner of the icon is placed closest to the anchor."},"bottom-left":{doc:"The bottom left corner of the icon is placed closest to the anchor."},"bottom-right":{doc:"The bottom right corner of the icon is placed closest to the anchor."}},default:"center",doc:"Part of the icon placed closest to the anchor.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.40.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"},"data-driven styling":{js:"0.40.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{doc:"The icon is aligned to the plane of the map."},viewport:{doc:"The icon is aligned to the plane of the viewport."},auto:{doc:"Automatically matches the value of `icon-rotation-alignment`."}},default:"auto",doc:"Orientation of icon when map is pitched.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.39.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{doc:"The text is aligned to the plane of the map."},viewport:{doc:"The text is aligned to the plane of the viewport."},auto:{doc:"Automatically matches the value of `text-rotation-alignment`."}},default:"auto",doc:"Orientation of text when map is pitched.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.21.0",android:"4.2.0",ios:"3.4.0",macos:"0.2.1"},"`auto` value":{js:"0.25.0",android:"4.2.0",ios:"3.4.0",macos:"0.3.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{doc:"When `symbol-placement` is set to `point`, aligns text east-west. When `symbol-placement` is set to `line` or `line-center`, aligns text x-axes with the line."},viewport:{doc:"Produces glyphs whose x-axes are aligned with the x-axis of the viewport, regardless of the value of `symbol-placement`."},auto:{doc:"When `symbol-placement` is set to `point`, this is equivalent to `viewport`. When `symbol-placement` is set to `line` or `line-center`, this is equivalent to `map`."}},default:"auto",doc:"In combination with `symbol-placement`, determines the rotation behavior of the individual glyphs forming the text.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"`auto` value":{js:"0.25.0",android:"4.2.0",ios:"3.4.0",macos:"0.3.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,doc:"Value to use for a text label. If a plain `string` is provided, it will be treated as a `formatted` with default/inherited formatting options.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"],doc:"Font stack to use for displaying text.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",doc:"Font size.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.35.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",doc:"The maximum line width for text wrapping.",requires:["text-field",{"symbol-placement":["point"]}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.40.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",doc:"Text leading value for multi-line text.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"2.3.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-letter-spacing":{type:"number",default:0,units:"ems",doc:"Text tracking amount.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.40.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{doc:"The text is aligned towards the anchor position."},left:{doc:"The text is aligned to the left."},center:{doc:"The text is centered."},right:{doc:"The text is aligned to the right."}},default:"center",doc:"Text justification options.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.39.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"},auto:{js:"0.54.0",android:"7.4.0",ios:"4.10.0",macos:"0.14.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{type:"number",units:"ems",default:0,doc:"Radial offset of text, in the direction of the symbol's anchor. Useful in combination with `text-variable-anchor`, which defaults to using the two-dimensional `text-offset` if present.","sdk-support":{"basic functionality":{js:"0.54.0",android:"7.4.0",ios:"4.10.0",macos:"0.14.0"},"data-driven styling":{js:"0.54.0",android:"7.4.0",ios:"4.10.0",macos:"0.14.0"}},requires:["text-field"],"property-type":"data-driven",expression:{interpolated:!0,parameters:["zoom","feature"]}},"text-variable-anchor":{type:"array",value:"enum",values:{center:{doc:"The center of the text is placed closest to the anchor."},left:{doc:"The left side of the text is placed closest to the anchor."},right:{doc:"The right side of the text is placed closest to the anchor."},top:{doc:"The top of the text is placed closest to the anchor."},bottom:{doc:"The bottom of the text is placed closest to the anchor."},"top-left":{doc:"The top left corner of the text is placed closest to the anchor."},"top-right":{doc:"The top right corner of the text is placed closest to the anchor."},"bottom-left":{doc:"The bottom left corner of the text is placed closest to the anchor."},"bottom-right":{doc:"The bottom right corner of the text is placed closest to the anchor."}},requires:["text-field",{"symbol-placement":["point"]}],doc:"To increase the chance of placing high-priority labels on the map, you can provide an array of `text-anchor` locations: the renderer will attempt to place the label at each location, in order, before moving onto the next label. Use `text-justify: auto` to choose justification based on anchor position. To apply an offset, use the `text-radial-offset` or the two-dimensional `text-offset`.","sdk-support":{"basic functionality":{js:"0.54.0",android:"7.4.0",ios:"4.10.0",macos:"0.14.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-anchor":{type:"enum",values:{center:{doc:"The center of the text is placed closest to the anchor."},left:{doc:"The left side of the text is placed closest to the anchor."},right:{doc:"The right side of the text is placed closest to the anchor."},top:{doc:"The top of the text is placed closest to the anchor."},bottom:{doc:"The bottom of the text is placed closest to the anchor."},"top-left":{doc:"The top left corner of the text is placed closest to the anchor."},"top-right":{doc:"The top right corner of the text is placed closest to the anchor."},"bottom-left":{doc:"The bottom left corner of the text is placed closest to the anchor."},"bottom-right":{doc:"The bottom right corner of the text is placed closest to the anchor."}},default:"center",doc:"Part of the text placed closest to the anchor.",requires:["text-field",{"!":"text-variable-anchor"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.39.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",doc:"Maximum angle change between adjacent characters.",requires:["text-field",{"symbol-placement":["line","line-center"]}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{doc:"If a text's language supports horizontal writing mode, symbols would be laid out horizontally."},vertical:{doc:"If a text's language supports vertical writing mode, symbols would be laid out vertically."}},doc:"The property allows control over a symbol's orientation. Note that the property values act as a hint, so that a symbol whose language doesn\u2019t support the provided orientation will be laid out in its natural orientation. Example: English point symbol will be rendered horizontally even if array value contains single 'vertical' enum value. For symbol with point placement, the order of elements in an array define priority order for the placement of an orientation variant. For symbol with line placement, the default text writing mode is either ['horizontal', 'vertical'] or ['vertical', 'horizontal'], the order doesn't affect the placement.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"1.3.0",android:"8.3.0",ios:"5.3.0",macos:"0.15.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",doc:"Rotates the text clockwise.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.35.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",doc:"Size of the additional area around the text bounding box used for detecting symbol collisions.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,doc:"If true, the text may be flipped vertically to prevent it from being rendered upside-down.",requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{doc:"The text is not altered."},uppercase:{doc:"Forces all letters to be displayed in uppercase."},lowercase:{doc:"Forces all letters to be displayed in lowercase."}},default:"none",doc:"Specifies how to capitalize text, similar to the CSS `text-transform` property.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",doc:"Offset distance of text from its anchor. Positive values indicate right and down, while negative values indicate left and up. If used with text-variable-anchor, input values will be taken as absolute values. Offsets along the x- and y-axis will be applied automatically based on the anchor position.",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.35.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,doc:"If true, the text will be visible even if it collides with other previously drawn symbols.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,doc:"If true, other symbols can be visible even if they collide with the text.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,doc:"If true, icons will display without their corresponding text when the text collides with other symbols and the icon does not.",requires:["text-field","icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},"property-type":"constant"}},layout_raster:{visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},"property-type":"constant"}},layout_hillshade:{visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},"property-type":"constant"}},filter:{type:"array",value:"*",doc:"A filter selects specific features from a layer."},filter_operator:{type:"enum",values:{"==":{doc:'`["==", key, value]` equality: `feature[key] = value`'},"!=":{doc:'`["!=", key, value]` inequality: `feature[key] \u2260 value`'},">":{doc:'`[">", key, value]` greater than: `feature[key] > value`'},">=":{doc:'`[">=", key, value]` greater than or equal: `feature[key] \u2265 value`'},"<":{doc:'`["<", key, value]` less than: `feature[key] < value`'},"<=":{doc:'`["<=", key, value]` less than or equal: `feature[key] \u2264 value`'},in:{doc:'`["in", key, v0, ..., vn]` set inclusion: `feature[key] \u2208 {v0, ..., vn}`'},"!in":{doc:'`["!in", key, v0, ..., vn]` set exclusion: `feature[key] \u2209 {v0, ..., vn}`'},all:{doc:'`["all", f0, ..., fn]` logical `AND`: `f0 \u2227 ... \u2227 fn`'},any:{doc:'`["any", f0, ..., fn]` logical `OR`: `f0 \u2228 ... \u2228 fn`'},none:{doc:'`["none", f0, ..., fn]` logical `NOR`: `\xacf0 \u2227 ... \u2227 \xacfn`'},has:{doc:'`["has", key]` `feature[key]` exists'},"!has":{doc:'`["!has", key]` `feature[key]` does not exist'},within:{doc:'`["within", object]` feature geometry is within object geometry'}},doc:"The filter operator."},geometry_type:{type:"enum",values:{Point:{doc:"Filter to point geometries."},LineString:{doc:"Filter to line geometries."},Polygon:{doc:"Filter to polygon geometries."}},doc:"The geometry type for the filter to select."},function:{expression:{type:"expression",doc:"An expression."},stops:{type:"array",doc:"An array of stops.",value:"function_stop"},base:{type:"number",default:1,minimum:0,doc:"The exponential base of the interpolation curve. It controls the rate at which the result increases. Higher values make the result increase more towards the high end of the range. With `1` the stops are interpolated linearly."},property:{type:"string",doc:"The name of a feature property to use as the function input.",default:"$zoom"},type:{type:"enum",values:{identity:{doc:"Return the input value as the output value."},exponential:{doc:"Generate an output by interpolating between stops just less than and just greater than the function input."},interval:{doc:"Return the output value of the stop just less than the function input."},categorical:{doc:"Return the output value of the stop equal to the function input."}},doc:"The interpolation strategy to use in function evaluation.",default:"exponential"},colorSpace:{type:"enum",values:{rgb:{doc:"Use the RGB color space to interpolate color values"},lab:{doc:"Use the LAB color space to interpolate color values."},hcl:{doc:"Use the HCL color space to interpolate color values, interpolating the Hue, Chroma, and Luminance channels individually."}},doc:"The color space in which colors interpolated. Interpolating colors in perceptual color spaces like LAB and HCL tend to produce color ramps that look more consistent and produce colors that can be differentiated more easily than those interpolated in RGB space.",default:"rgb"},default:{type:"*",required:!1,doc:"A value to serve as a fallback function result when a value isn't otherwise available. It is used in the following circumstances:\n* In categorical functions, when the feature value does not match any of the stop domain values.\n* In property and zoom-and-property functions, when a feature does not contain a value for the specified property.\n* In identity functions, when the feature value is not valid for the style property (for example, if the function is being used for a `circle-color` property but the feature property value is not a string or not a valid color).\n* In interval or exponential property and zoom-and-property functions, when the feature value is not numeric.\nIf no default is provided, the style property's default is used in these circumstances."}},function_stop:{type:"array",minimum:0,maximum:24,value:["number","color"],length:2,doc:"Zoom level and value pair."},expression:{type:"array",value:"*",minimum:1,doc:"An expression defines a function that can be used for data-driven style properties or feature filters."},expression_name:{doc:"",type:"enum",values:{let:{doc:'Binds expressions to named variables, which can then be referenced in the result expression using ["var", "variable_name"].',group:"Variable binding","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},var:{doc:'References variable bound using "let".',group:"Variable binding","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},literal:{doc:"Provides a literal array or object value.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},array:{doc:"Asserts that the input is an array (optionally with a specific item type and length).  If, when the input expression is evaluated, it is not of the asserted type, then this assertion will cause the whole expression to be aborted.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},at:{doc:"Retrieves an item from an array.",group:"Lookup","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},in:{doc:"Determines whether an item exists in an array or a substring exists in a string. In the specific case when the second and third arguments are string literals, you must wrap at least one of them in a [`literal`](#types-literal) expression to hint correct interpretation to the [type system](#type-system).",group:"Lookup","sdk-support":{"basic functionality":{js:"1.6.0",android:"9.1.0",ios:"5.8.0",macos:"0.15.0"}}},"index-of":{doc:"Returns the first position at which an item can be found in an array or a substring can be found in a string, or `-1` if the input cannot be found. Accepts an optional index from where to begin the search.",group:"Lookup","sdk-support":{"basic functionality":{js:"1.10.0"}}},slice:{doc:"Returns an item from an array or a substring from a string from a specified start index, or between a start index and an end index if set. The return value is inclusive of the start index but not of the end index.",group:"Lookup","sdk-support":{"basic functionality":{js:"1.10.0"}}},case:{doc:"Selects the first output whose corresponding test condition evaluates to true, or the fallback value otherwise.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},match:{doc:'Selects the output for which the label value matches the input value, or the fallback value if no match is found. The input can be any expression (for example, `["get", "building_type"]`). Each label must be unique, and must be either:\n - a single literal value; or\n - an array of literal values, the values of which must be all strings or all numbers (for example `[100, 101]` or `["c", "b"]`).\n\nThe input matches if any of the values in the array matches using strict equality, similar to the `"in"` operator.\nIf the input type does not match the type of the labels, the result will be the fallback value.',group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},coalesce:{doc:"Evaluates each expression in turn until the first non-null value is obtained, and returns that value.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},step:{doc:'Produces discrete, stepped results by evaluating a piecewise-constant function defined by pairs of input and output values ("stops"). The `input` may be any numeric expression (e.g., `["get", "population"]`). Stop inputs must be numeric literals in strictly ascending order. Returns the output value of the stop just less than the input, or the first output if the input is less than the first stop.',group:"Ramps, scales, curves","sdk-support":{"basic functionality":{js:"0.42.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},interpolate:{doc:'Produces continuous, smooth results by interpolating between pairs of input and output values ("stops"). The `input` may be any numeric expression (e.g., `["get", "population"]`). Stop inputs must be numeric literals in strictly ascending order. The output type must be `number`, `array<number>`, or `color`.\n\nInterpolation types:\n- `["linear"]`: Interpolates linearly between the pair of stops just less than and just greater than the input.\n- `["exponential", base]`: Interpolates exponentially between the stops just less than and just greater than the input. `base` controls the rate at which the output increases: higher values make the output increase more towards the high end of the range. With values close to 1 the output increases linearly.\n- `["cubic-bezier", x1, y1, x2, y2]`: Interpolates using the cubic bezier curve defined by the given control points.',group:"Ramps, scales, curves","sdk-support":{"basic functionality":{js:"0.42.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"interpolate-hcl":{doc:'Produces continuous, smooth results by interpolating between pairs of input and output values ("stops"). Works like `interpolate`, but the output type must be `color`, and the interpolation is performed in the Hue-Chroma-Luminance color space.',group:"Ramps, scales, curves","sdk-support":{"basic functionality":{js:"0.49.0"}}},"interpolate-lab":{doc:'Produces continuous, smooth results by interpolating between pairs of input and output values ("stops"). Works like `interpolate`, but the output type must be `color`, and the interpolation is performed in the CIELAB color space.',group:"Ramps, scales, curves","sdk-support":{"basic functionality":{js:"0.49.0"}}},ln2:{doc:"Returns mathematical constant ln(2).",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},pi:{doc:"Returns the mathematical constant pi.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},e:{doc:"Returns the mathematical constant e.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},typeof:{doc:"Returns a string describing the type of the given value.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},string:{doc:"Asserts that the input value is a string. If multiple values are provided, each one is evaluated in order until a string is obtained. If none of the inputs are strings, the expression is an error.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},number:{doc:"Asserts that the input value is a number. If multiple values are provided, each one is evaluated in order until a number is obtained. If none of the inputs are numbers, the expression is an error.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},boolean:{doc:"Asserts that the input value is a boolean. If multiple values are provided, each one is evaluated in order until a boolean is obtained. If none of the inputs are booleans, the expression is an error.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},object:{doc:"Asserts that the input value is an object. If multiple values are provided, each one is evaluated in order until an object is obtained. If none of the inputs are objects, the expression is an error.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},collator:{doc:"Returns a `collator` for use in locale-dependent comparison operations. The `case-sensitive` and `diacritic-sensitive` options default to `false`. The `locale` argument specifies the IETF language tag of the locale to use. If none is provided, the default locale is used. If the requested locale is not available, the `collator` will use a system-defined fallback locale. Use `resolved-locale` to test the results of locale fallback behavior.",group:"Types","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}},format:{doc:'Returns a `formatted` string for displaying mixed-format text in the `text-field` property. The input may contain a string literal or expression, including an [`\'image\'`](#types-image) expression. Strings may be followed by a style override object that supports the following properties:\n- `"text-font"`: Overrides the font stack specified by the root layout property.\n- `"text-color"`: Overrides the color specified by the root paint property.\n- `"font-scale"`: Applies a scaling factor on `text-size` as specified by the root layout property.',group:"Types","sdk-support":{"basic functionality":{js:"0.48.0",android:"6.7.0",ios:"4.6.0",macos:"0.12.0"},"text-font":{js:"0.48.0",android:"6.7.0",ios:"4.6.0",macos:"0.12.0"},"font-scale":{js:"0.48.0",android:"6.7.0",ios:"4.6.0",macos:"0.12.0"},"text-color":{js:"1.3.0",android:"7.3.0",ios:"4.10.0",macos:"0.14.0"},image:{js:"1.6.0",android:"8.6.0",ios:"5.7.0",macos:"0.15.0"}}},image:{doc:"Returns an `image` type for use in `icon-image`, `*-pattern` entries and as a section in the `format` expression. If set, the `image` argument will check that the requested image exists in the style and will return either the resolved image name or `null`, depending on whether or not the image is currently in the style. This validation process is synchronous and requires the image to have been added to the style before requesting it in the `image` argument.",group:"Types","sdk-support":{"basic functionality":{js:"1.4.0",android:"8.6.0",ios:"5.7.0",macos:"0.15.0"}}},"number-format":{doc:"Converts the input number into a string representation using the providing formatting rules. If set, the `locale` argument specifies the locale to use, as a BCP 47 language tag. If set, the `currency` argument specifies an ISO 4217 code to use for currency-style formatting. If set, the `min-fraction-digits` and `max-fraction-digits` arguments specify the minimum and maximum number of fractional digits to include.",group:"Types","sdk-support":{"basic functionality":{js:"0.54.0",android:"8.4.0",ios:"5.4.0",macos:"0.15.0"}}},"to-string":{doc:'Converts the input value to a string. If the input is `null`, the result is `""`. If the input is a boolean, the result is `"true"` or `"false"`. If the input is a number, it is converted to a string as specified by the ["NumberToString" algorithm](https://tc39.github.io/ecma262/#sec-tostring-applied-to-the-number-type) of the ECMAScript Language Specification. If the input is a color, it is converted to a string of the form `"rgba(r,g,b,a)"`, where `r`, `g`, and `b` are numerals ranging from 0 to 255, and `a` ranges from 0 to 1. Otherwise, the input is converted to a string in the format specified by the [`JSON.stringify`](https://tc39.github.io/ecma262/#sec-json.stringify) function of the ECMAScript Language Specification.',group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"to-number":{doc:'Converts the input value to a number, if possible. If the input is `null` or `false`, the result is 0. If the input is `true`, the result is 1. If the input is a string, it is converted to a number as specified by the ["ToNumber Applied to the String Type" algorithm](https://tc39.github.io/ecma262/#sec-tonumber-applied-to-the-string-type) of the ECMAScript Language Specification. If multiple values are provided, each one is evaluated in order until the first successful conversion is obtained. If none of the inputs can be converted, the expression is an error.',group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"to-boolean":{doc:"Converts the input value to a boolean. The result is `false` when then input is an empty string, 0, `false`, `null`, or `NaN`; otherwise it is `true`.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"to-rgba":{doc:"Returns a four-element array containing the input color's red, green, blue, and alpha components, in that order.",group:"Color","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"to-color":{doc:"Converts the input value to a color. If multiple values are provided, each one is evaluated in order until the first successful conversion is obtained. If none of the inputs can be converted, the expression is an error.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},rgb:{doc:"Creates a color value from red, green, and blue components, which must range between 0 and 255, and an alpha component of 1. If any component is out of range, the expression is an error.",group:"Color","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},rgba:{doc:"Creates a color value from red, green, blue components, which must range between 0 and 255, and an alpha component which must range between 0 and 1. If any component is out of range, the expression is an error.",group:"Color","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},get:{doc:"Retrieves a property value from the current feature's properties, or from another object if a second argument is provided. Returns null if the requested property is missing.",group:"Lookup","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},has:{doc:"Tests for the presence of an property value in the current feature's properties, or from another object if a second argument is provided.",group:"Lookup","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},length:{doc:"Gets the length of an array or string.",group:"Lookup","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},properties:{doc:'Gets the feature properties object.  Note that in some cases, it may be more efficient to use ["get", "property_name"] directly.',group:"Feature data","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"feature-state":{doc:"Retrieves a property value from the current feature's state. Returns null if the requested property is not present on the feature's state. A feature's state is not part of the GeoJSON or vector tile data, and must be set programmatically on each feature. Features are identified by their `id` attribute, which must be an integer or a string that can be cast to an integer. Note that [\"feature-state\"] can only be used with paint properties that support data-driven styling.",group:"Feature data","sdk-support":{"basic functionality":{js:"0.46.0"}}},"geometry-type":{doc:"Gets the feature's geometry type: `Point`, `MultiPoint`, `LineString`, `MultiLineString`, `Polygon`, `MultiPolygon`. `Multi*` feature types are only returned in GeoJSON sources. When working with vector tile sources, use the singular forms.",group:"Feature data","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},id:{doc:"Gets the feature's id, if it has one.",group:"Feature data","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},zoom:{doc:'Gets the current zoom level.  Note that in style layout and paint properties, ["zoom"] may only appear as the input to a top-level "step" or "interpolate" expression.',group:"Zoom","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"heatmap-density":{doc:"Gets the kernel density estimation of a pixel in a heatmap layer, which is a relative measure of how many data points are crowded around a particular pixel. Can only be used in the `heatmap-color` property.",group:"Heatmap","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"line-progress":{doc:"Gets the progress along a gradient line. Can only be used in the `line-gradient` property.",group:"Feature data","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.5.0",ios:"4.6.0",macos:"0.12.0"}}},"sky-radial-progress":{doc:"Gets the distance of a point on the sky from the sun position. Returns 0 at sun position and 1 when the distance reaches `sky-gradient-radius`. Can only be used in the `sky-gradient` property.",group:"sky","sdk-support":{"basic functionality":{js:"2.0.0",ios:"10.0.0",android:"10.0.0"}}},accumulated:{doc:"Gets the value of a cluster property accumulated so far. Can only be used in the `clusterProperties` option of a clustered GeoJSON source.",group:"Feature data","sdk-support":{"basic functionality":{js:"0.53.0",android:"8.4.0",ios:"5.5.0",macos:"0.15.0"}}},"+":{doc:"Returns the sum of the inputs.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"*":{doc:"Returns the product of the inputs.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"-":{doc:"For two inputs, returns the result of subtracting the second input from the first. For a single input, returns the result of subtracting it from 0.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"/":{doc:"Returns the result of floating point division of the first input by the second.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"%":{doc:"Returns the remainder after integer division of the first input by the second.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"^":{doc:"Returns the result of raising the first input to the power specified by the second.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},sqrt:{doc:"Returns the square root of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.42.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},log10:{doc:"Returns the base-ten logarithm of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},ln:{doc:"Returns the natural logarithm of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},log2:{doc:"Returns the base-two logarithm of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},sin:{doc:"Returns the sine of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},cos:{doc:"Returns the cosine of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},tan:{doc:"Returns the tangent of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},asin:{doc:"Returns the arcsine of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},acos:{doc:"Returns the arccosine of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},atan:{doc:"Returns the arctangent of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},min:{doc:"Returns the minimum value of the inputs.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},max:{doc:"Returns the maximum value of the inputs.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},round:{doc:'Rounds the input to the nearest integer. Halfway values are rounded away from zero. For example, `["round", -1.5]` evaluates to -2.',group:"Math","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},abs:{doc:"Returns the absolute value of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},ceil:{doc:"Returns the smallest integer that is greater than or equal to the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},floor:{doc:"Returns the largest integer that is less than or equal to the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},distance:{doc:"Returns the shortest distance in meters between the evaluated feature and the input geometry. The input value can be a valid GeoJSON of type `Point`, `MultiPoint`, `LineString`, `MultiLineString`, `Polygon`, `MultiPolygon`, `Feature`, or `FeatureCollection`. Distance values returned may vary in precision due to loss in precision from encoding geometries, particularly below zoom level 13.",group:"Math","sdk-support":{"basic functionality":{android:"9.2.0",ios:"5.9.0",macos:"0.16.0"}}},"==":{doc:"Returns `true` if the input values are equal, `false` otherwise. The comparison is strictly typed: values of different runtime types are always considered unequal. Cases where the types are known to be different at parse time are considered invalid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},collator:{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}},"!=":{doc:"Returns `true` if the input values are not equal, `false` otherwise. The comparison is strictly typed: values of different runtime types are always considered unequal. Cases where the types are known to be different at parse time are considered invalid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},collator:{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}},">":{doc:"Returns `true` if the first input is strictly greater than the second, `false` otherwise. The arguments are required to be either both strings or both numbers; if during evaluation they are not, expression evaluation produces an error. Cases where this constraint is known not to hold at parse time are considered in valid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},collator:{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}},"<":{doc:"Returns `true` if the first input is strictly less than the second, `false` otherwise. The arguments are required to be either both strings or both numbers; if during evaluation they are not, expression evaluation produces an error. Cases where this constraint is known not to hold at parse time are considered in valid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},collator:{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}},">=":{doc:"Returns `true` if the first input is greater than or equal to the second, `false` otherwise. The arguments are required to be either both strings or both numbers; if during evaluation they are not, expression evaluation produces an error. Cases where this constraint is known not to hold at parse time are considered in valid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},collator:{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}},"<=":{doc:"Returns `true` if the first input is less than or equal to the second, `false` otherwise. The arguments are required to be either both strings or both numbers; if during evaluation they are not, expression evaluation produces an error. Cases where this constraint is known not to hold at parse time are considered in valid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},collator:{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}},all:{doc:"Returns `true` if all the inputs are `true`, `false` otherwise. The inputs are evaluated in order, and evaluation is short-circuiting: once an input expression evaluates to `false`, the result is `false` and no further input expressions are evaluated.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},any:{doc:"Returns `true` if any of the inputs are `true`, `false` otherwise. The inputs are evaluated in order, and evaluation is short-circuiting: once an input expression evaluates to `true`, the result is `true` and no further input expressions are evaluated.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"!":{doc:"Logical negation. Returns `true` if the input is `false`, and `false` if the input is `true`.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},within:{doc:"Returns `true` if the evaluated feature is fully contained inside a boundary of the input geometry, `false` otherwise. The input value can be a valid GeoJSON of type `Polygon`, `MultiPolygon`, `Feature`, or `FeatureCollection`. Supported features for evaluation:\n- `Point`: Returns `false` if a point is on the boundary or falls outside the boundary.\n- `LineString`: Returns `false` if any part of a line falls outside the boundary, the line intersects the boundary, or a line's endpoint is on the boundary.",group:"Decision","sdk-support":{"basic functionality":{js:"1.9.0",android:"9.1.0",ios:"5.8.0",macos:"0.15.0"}}},"is-supported-script":{doc:"Returns `true` if the input string is expected to render legibly. Returns `false` if the input string contains sections that cannot be rendered without potential loss of meaning (e.g. Indic scripts that require complex text shaping, or right-to-left scripts if the the `mapbox-gl-rtl-text` plugin is not in use in Mapbox GL JS).",group:"String","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.6.0"}}},upcase:{doc:"Returns the input string converted to uppercase. Follows the Unicode Default Case Conversion algorithm and the locale-insensitive case mappings in the Unicode Character Database.",group:"String","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},downcase:{doc:"Returns the input string converted to lowercase. Follows the Unicode Default Case Conversion algorithm and the locale-insensitive case mappings in the Unicode Character Database.",group:"String","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},concat:{doc:"Returns a `string` consisting of the concatenation of the inputs. Each input is converted to a string as if by `to-string`.",group:"String","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"resolved-locale":{doc:"Returns the IETF language tag of the locale being used by the provided `collator`. This can be used to determine the default system locale, or to determine if a requested locale was successfully loaded.",group:"String","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}}}},fog:{range:{type:"array",default:[.5,10],minimum:-20,maximum:20,length:2,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},doc:"The start and end distance range in which fog fades from fully transparent to fully opaque. The distance to the point at the center of the map is defined as zero, so that negative range values are closer to the camera, and positive values are farther away.",example:[.5,10],"sdk-support":{"basic functionality":{js:"2.3.0"}}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0,doc:"The color of the fog. Using opacity is recommended only for smoothly transitioning fog on/off as anything less than 100% opacity results in more tiles loaded and drawn.","sdk-support":{"basic functionality":{js:"2.3.0"}}},"horizon-blend":{type:"number","property-type":"data-constant",default:.1,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0,doc:"Horizon blend applies a smooth fade from the color of the fog to the color of the sky. A value of zero leaves a sharp transition from fog to sky. Increasing the value blends the color of fog into increasingly high angles of the sky.","sdk-support":{"basic functionality":{js:"2.3.0"}}}},light:{anchor:{type:"enum",default:"viewport",values:{map:{doc:"The position of the light source is aligned to the rotation of the map."},viewport:{doc:"The position of the light source is aligned to the rotation of the viewport."}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]},doc:"Whether extruded geometries are lit relative to the map or viewport.",example:"map","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},doc:"Position of the light source relative to lit (extruded) geometries, in [r radial coordinate, a azimuthal angle, p polar angle] where r indicates the distance from the center of the base of an object to its light, a indicates the position of the light relative to 0\xb0 (0\xb0 when `light.anchor` is set to `viewport` corresponds to the top of the viewport, or 0\xb0 when `light.anchor` is set to `map` corresponds to due north, and degrees proceed clockwise), and p indicates the height of the light (from 0\xb0, directly above, to 180\xb0, directly below).",example:[1.5,90,80],"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0,doc:"Color tint for lighting extruded geometries.","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0,doc:"Intensity of lighting (on a scale from 0 to 1). Higher numbers will present as more extreme contrast.","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}}},terrain:{source:{type:"string",doc:"Name of a source of `raster_dem` type to be used for terrain elevation.",required:!0,"sdk-support":{"basic functionality":{js:"2.0.0",ios:"10.0.0",android:"10.0.0"}}},exaggeration:{type:"number","property-type":"data-constant",default:1,minimum:0,maximum:1e3,expression:{interpolated:!0,parameters:["zoom"]},transition:!0,doc:"Exaggerates the elevation of the terrain by multiplying the data from the DEM with this value.","sdk-support":{"basic functionality":{js:"2.0.0",ios:"10.0.0",android:"10.0.0"}}}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background","paint_sky"],paint_fill:{"fill-antialias":{type:"boolean",default:!0,doc:"Whether or not the fill should be antialiased.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,doc:"The opacity of the entire fill layer. In contrast to the `fill-color`, this value will also affect the 1px stroke around the fill, if the stroke is used.",transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.21.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",doc:"The color of the filled part of this layer. This color can be specified as `rgba` with an alpha component and the color's opacity will not affect the opacity of the 1px stroke, if it is used.",transition:!0,requires:[{"!":"fill-pattern"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.19.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",doc:"The outline color of the fill. Matches the value of `fill-color` if unspecified.",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.19.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",doc:"The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{doc:"The fill is translated relative to the map."},viewport:{doc:"The fill is translated relative to the viewport."}},doc:"Controls the frame of reference for `fill-translate`.",default:"map",requires:["fill-translate"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!0,doc:"Name of image in sprite to use for drawing image fills. For seamless patterns, image width and height must be a factor of two (2, 4, 8, ..., 512). Note that zoom-dependent expressions will be evaluated only at integer zoom levels.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.49.0",android:"6.5.0",macos:"0.11.0",ios:"4.4.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,doc:"The opacity of the entire fill extrusion layer. This is rendered on a per-layer, not per-feature, basis, and data-driven styling is not available.",transition:!0,"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",doc:"The base color of the extruded fill. The extrusion's surfaces will be shaded differently based on this color in combination with the root `light` settings. If this color is specified as `rgba` with an alpha component, the alpha component will be ignored; use `fill-extrusion-opacity` to set layer opacity.",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"},"data-driven styling":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",doc:"The geometry's offset. Values are [x, y] where negatives indicate left and up (on the flat plane), respectively.","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{doc:"The fill extrusion is translated relative to the map."},viewport:{doc:"The fill extrusion is translated relative to the viewport."}},doc:"Controls the frame of reference for `fill-extrusion-translate`.",default:"map",requires:["fill-extrusion-translate"],"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,doc:"Name of image in sprite to use for drawing images on extruded fills. For seamless patterns, image width and height must be a factor of two (2, 4, 8, ..., 512). Note that zoom-dependent expressions will be evaluated only at integer zoom levels.","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"},"data-driven styling":{js:"0.49.0",android:"6.5.0",macos:"0.11.0",ios:"4.4.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",doc:"The height with which to extrude this layer.",transition:!0,"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"},"data-driven styling":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",doc:"The height with which to extrude the base of this layer. Must be less than or equal to `fill-extrusion-height`.",transition:!0,requires:["fill-extrusion-height"],"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"},"data-driven styling":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,doc:"Whether to apply a vertical gradient to the sides of a fill-extrusion layer. If true, sides will be shaded slightly darker farther down.",transition:!1,"sdk-support":{"basic functionality":{js:"0.50.0",android:"7.0.0",ios:"4.7.0",macos:"0.13.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:{"line-opacity":{type:"number",doc:"The opacity at which the line will be drawn.",default:1,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",doc:"The color with which the line will be drawn.",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.23.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",doc:"The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{doc:"The line is translated relative to the map."},viewport:{doc:"The line is translated relative to the viewport."}},doc:"Controls the frame of reference for `line-translate`.",default:"map",requires:["line-translate"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",doc:"Stroke thickness.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.39.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,doc:"Draws a line casing outside of a line's actual path. Value indicates the width of the inner gap.",transition:!0,units:"pixels","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,doc:"The line's offset. For linear features, a positive value offsets the line to the right, relative to the direction of the line, and a negative value to the left. For polygon features, a positive value results in an inset, and a negative value results in an outset.",transition:!0,units:"pixels","sdk-support":{"basic functionality":{js:"0.12.1",android:"3.0.0",ios:"3.1.0",macos:"0.1.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",doc:"Blur applied to the line, in pixels.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",doc:"Specifies the lengths of the alternating dashes and gaps that form the dash pattern. The lengths are later scaled by the line width. To convert a dash length to pixels, multiply the length by the current line width. Note that GeoJSON sources with `lineMetrics: true` specified won't render dashed lines to the expected scale. Also note that zoom-dependent expressions will be evaluated only at integer zoom levels.",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"2.3.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-pattern":{type:"resolvedImage",transition:!0,doc:"Name of image in sprite to use for drawing image lines. For seamless patterns, image width must be a factor of two (2, 4, 8, ..., 512). Note that zoom-dependent expressions will be evaluated only at integer zoom levels.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.49.0",android:"6.5.0",macos:"0.11.0",ios:"4.4.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",doc:'Defines a gradient with which to color a line feature. Can only be used with GeoJSON sources that specify `"lineMetrics": true`.',transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],"sdk-support":{"basic functionality":{js:"0.45.0",android:"6.5.0",ios:"4.4.0",macos:"0.11.0"},"data-driven styling":{}},expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},paint_circle:{"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",doc:"Circle radius.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.18.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",doc:"The fill color of the circle.",transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.18.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,doc:"Amount to blur the circle. 1 blurs the circle such that only the centerpoint is full opacity.",transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.20.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",doc:"The opacity at which the circle will be drawn.",default:1,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.20.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",doc:"The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{doc:"The circle is translated relative to the map."},viewport:{doc:"The circle is translated relative to the viewport."}},doc:"Controls the frame of reference for `circle-translate`.",default:"map",requires:["circle-translate"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{doc:"Circles are scaled according to their apparent distance to the camera."},viewport:{doc:"Circles are not scaled."}},default:"map",doc:"Controls the scaling behavior of the circle when the map is pitched.","sdk-support":{"basic functionality":{js:"0.21.0",android:"4.2.0",ios:"3.4.0",macos:"0.2.1"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{doc:"The circle is aligned to the plane of the map."},viewport:{doc:"The circle is aligned to the plane of the viewport."}},default:"viewport",doc:"Orientation of circle when map is pitched.","sdk-support":{"basic functionality":{js:"0.39.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",doc:"The width of the circle's stroke. Strokes are placed outside of the `circle-radius`.","sdk-support":{"basic functionality":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",doc:"The stroke color of the circle.",transition:!0,"sdk-support":{"basic functionality":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",doc:"The opacity of the circle's stroke.",default:1,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},paint_heatmap:{"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",doc:"Radius of influence of one heatmap point in pixels. Increasing the value makes the heatmap smoother, but less detailed.","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},"data-driven styling":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,doc:"A measure of how much an individual point contributes to the heatmap. A value of 10 would be equivalent to having 10 points of weight 1 in the same spot. Especially useful when combined with clustering.","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},"data-driven styling":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,doc:"Similar to `heatmap-weight` but controls the intensity of the heatmap globally. Primarily used for adjusting the heatmap based on zoom level.","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],doc:'Defines the color of each pixel based on its density value in a heatmap.  Should be an expression that uses `["heatmap-density"]` as input.',transition:!1,"sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},"data-driven styling":{}},expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",doc:"The global opacity at which the heatmap layer will be drawn.",default:1,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_symbol:{"icon-opacity":{doc:"The opacity at which the icon will be drawn.",type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,doc:"The color of the icon. This can only be used with sdf icons.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,doc:"The color of the icon's halo. Icon halos can only be used with SDF icons.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",doc:"Distance of halo to the icon outline.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",doc:"Fade out the halo towards the outside.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",doc:"Distance that the icon's anchor is moved from its original placement. Positive values indicate right and down, while negative values indicate left and up.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{doc:"Icons are translated relative to the map."},viewport:{doc:"Icons are translated relative to the viewport."}},doc:"Controls the frame of reference for `icon-translate`.",default:"map",requires:["icon-image","icon-translate"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",doc:"The opacity at which the text will be drawn.",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",doc:"The color with which the text will be drawn.",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,doc:"The color of the text's halo, which helps it stand out from backgrounds.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",doc:"Distance of halo to the font outline. Max text halo width is 1/4 of the font-size.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",doc:"The halo's fadeout distance towards the outside.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",doc:"Distance that the text's anchor is moved from its original placement. Positive values indicate right and down, while negative values indicate left and up.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{doc:"The text is translated relative to the map."},viewport:{doc:"The text is translated relative to the viewport."}},doc:"Controls the frame of reference for `text-translate`.",default:"map",requires:["text-field","text-translate"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_raster:{"raster-opacity":{type:"number",doc:"The opacity at which the image will be drawn.",default:1,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",doc:"Rotates hues around the color wheel.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",doc:"Increase or reduce the brightness of the image. The value is the minimum brightness.",default:0,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",doc:"Increase or reduce the brightness of the image. The value is the maximum brightness.",default:1,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",doc:"Increase or reduce the saturation of the image.",default:0,minimum:-1,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",doc:"Increase or reduce the contrast of the image.",default:0,minimum:-1,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",doc:"The resampling/interpolation method to use for overscaling, also known as texture magnification filter",values:{linear:{doc:"(Bi)linear filtering interpolates pixel values using the weighted average of the four closest original source pixels creating a smooth but blurry look when overscaled"},nearest:{doc:"Nearest neighbor filtering interpolates pixel values using the nearest original source pixel creating a sharp but pixelated look when overscaled"}},default:"linear","sdk-support":{"basic functionality":{js:"0.47.0",android:"6.3.0",ios:"4.2.0",macos:"0.9.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",doc:"Fade duration when a new tile is added.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_hillshade:{"hillshade-illumination-direction":{type:"number",default:335,minimum:0,maximum:359,doc:"The direction of the light source used to generate the hillshading with 0 as the top of the viewport if `hillshade-illumination-anchor` is set to `viewport` and due north if `hillshade-illumination-anchor` is set to `map`.",transition:!1,"sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{doc:"The hillshade illumination is relative to the north direction."},viewport:{doc:"The hillshade illumination is relative to the top of the viewport."}},default:"viewport",doc:"Direction of light source when map is rotated.","sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",doc:"Intensity of the hillshade",default:.5,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"color",default:"#000000",doc:"The shading color of areas that face away from the light source.",transition:!0,"sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"color",default:"#FFFFFF",doc:"The shading color of areas that faces towards the light source.",transition:!0,"sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",doc:"The shading color used to accentuate rugged terrain like sharp cliffs and gorges.",transition:!0,"sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_background:{"background-color":{type:"color",default:"#000000",doc:"The color with which the background will be drawn.",transition:!0,requires:[{"!":"background-pattern"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,doc:"Name of image in sprite to use for drawing an image background. For seamless patterns, image width and height must be a factor of two (2, 4, 8, ..., 512). Note that zoom-dependent expressions will be evaluated only at integer zoom levels.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,doc:"The opacity at which the background will be drawn.",transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_sky:{"sky-type":{type:"enum",values:{gradient:{doc:"Renders the sky with a gradient that can be configured with `sky-gradient-radius` and `sky-gradient`."},atmosphere:{doc:"Renders the sky with a simulated atmospheric scattering algorithm, the sun direction can be attached to the light position or explicitly set through `sky-atmosphere-sun`."}},default:"atmosphere",doc:"The type of the sky","sdk-support":{"basic functionality":{js:"2.0.0",ios:"10.0.0",android:"10.0.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"sky-atmosphere-sun":{type:"array",value:"number",length:2,units:"degrees",minimum:[0,0],maximum:[360,180],transition:!1,doc:"Position of the sun center [a azimuthal angle, p polar angle]. The azimuthal angle indicates the position of the sun relative to 0\xb0 north, where degrees proceed clockwise. The polar angle indicates the height of the sun, where 0\xb0 is directly above, at zenith, and 90\xb0 at the horizon. When this property is ommitted, the sun center is directly inherited from the light position.","sdk-support":{"basic functionality":{js:"2.0.0",ios:"10.0.0",android:"10.0.0"}},requires:[{"sky-type":"atmosphere"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"sky-atmosphere-sun-intensity":{type:"number",requires:[{"sky-type":"atmosphere"}],default:10,minimum:0,maximum:100,transition:!1,doc:"Intensity of the sun as a light source in the atmosphere (on a scale from 0 to a 100). Setting higher values will brighten up the sky.","sdk-support":{"basic functionality":{js:"2.0.0",ios:"10.0.0",android:"10.0.0"}},"property-type":"data-constant"},"sky-gradient-center":{type:"array",requires:[{"sky-type":"gradient"}],value:"number",default:[0,0],length:2,units:"degrees",minimum:[0,0],maximum:[360,180],transition:!1,doc:"Position of the gradient center [a azimuthal angle, p polar angle]. The azimuthal angle indicates the position of the gradient center relative to 0\xb0 north, where degrees proceed clockwise. The polar angle indicates the height of the gradient center, where 0\xb0 is directly above, at zenith, and 90\xb0 at the horizon.","sdk-support":{"basic functionality":{js:"2.0.0",ios:"10.0.0",android:"10.0.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"sky-gradient-radius":{type:"number",requires:[{"sky-type":"gradient"}],default:90,minimum:0,maximum:180,transition:!1,doc:"The angular distance (measured in degrees) from `sky-gradient-center` up to which the gradient extends. A value of 180 causes the gradient to wrap around to the opposite direction from `sky-gradient-center`.","sdk-support":{"basic functionality":{js:"2.0.0",ios:"10.0.0",android:"10.0.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"sky-gradient":{type:"color",default:["interpolate",["linear"],["sky-radial-progress"],.8,"#87ceeb",1,"white"],doc:"Defines a radial color gradient with which to color the sky. The color values can be interpolated with an expression using `sky-radial-progress`. The range [0, 1] for the interpolant covers a radial distance (in degrees) of [0, `sky-gradient-radius`] centered at the position specified by `sky-gradient-center`.",transition:!1,requires:[{"sky-type":"gradient"}],"sdk-support":{"basic functionality":{js:"2.0.0",ios:"10.0.0",android:"10.0.0"},"data-driven styling":{}},expression:{interpolated:!0,parameters:["sky-radial-progress"]},"property-type":"color-ramp"},"sky-atmosphere-halo-color":{type:"color",default:"white",doc:"A color applied to the atmosphere sun halo. The alpha channel describes how strongly the sun halo is represented in an atmosphere sky layer.",transition:!1,requires:[{"sky-type":"atmosphere"}],"sdk-support":{"basic functionality":{js:"2.0.0",ios:"10.0.0",android:"10.0.0"}},"property-type":"data-constant"},"sky-atmosphere-color":{type:"color",default:"white",doc:"A color used to tweak the main atmospheric scattering coefficients. Using white applies the default coefficients giving the natural blue color to the atmosphere. This color affects how heavily the corresponding wavelength is represented during scattering. The alpha channel describes the density of the atmosphere, with 1 maximum density and 0 no density.",transition:!1,requires:[{"sky-type":"atmosphere"}],"sdk-support":{"basic functionality":{js:"2.0.0",ios:"10.0.0",android:"10.0.0"}},"property-type":"data-constant"},"sky-opacity":{type:"number",default:1,minimum:0,maximum:1,doc:"The opacity of the entire sky layer.",transition:!0,"sdk-support":{"basic functionality":{js:"2.0.0",ios:"10.0.0",android:"10.0.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds",doc:"Time allotted for transitions to complete."},delay:{type:"number",default:0,minimum:0,units:"milliseconds",doc:"Length of time before a transition begins."}},"property-type":{"data-driven":{type:"property-type",doc:"Property is interpolable and can be represented using a property expression."},"cross-faded":{type:"property-type",doc:"Property is non-interpolable; rather, its values will be cross-faded to smoothly transition between integer zooms."},"cross-faded-data-driven":{type:"property-type",doc:"Property is non-interpolable; rather, its values will be cross-faded to smoothly transition between integer zooms. It can be represented using a property expression."},"color-ramp":{type:"property-type",doc:"Property should be specified using a color ramp from which the output color can be sampled based on a property calculation."},"data-constant":{type:"property-type",doc:"Property is interpolable but cannot be represented using a property expression."},constant:{type:"property-type",doc:"Property is constant across all zoom levels and property values."}},promoteId:{"*":{type:"string",doc:"A name of a feature property to use as ID for feature state."}}};var w="undefined"!==typeof globalThis?globalThis:"undefined"!==typeof window?window:"undefined"!==typeof t?t:"undefined"!==typeof self?self:{};function O(t){var e={exports:{}};return t(e,e.exports),e.exports}var x=O(function(t,e){!function(n){var r=e&&!e.nodeType&&e,i=t&&!t.nodeType&&t,o="object"==_(w)&&w;o.global!==o&&o.window!==o&&o.self!==o||(n=o);var a,s,l=2147483647,u=36,c=1,h=26,p=38,f=700,d=72,g=128,y="-",m=/^xn--/,v=/[^\x20-\x7E]/,b=/[\x2E\u3002\uFF0E\uFF61]/g,O={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},x=u-c,E=Math.floor,S=String.fromCharCode;function C(t){throw RangeError(O[t])}function T(t,e){for(var n=t.length,r=[];n--;)r[n]=e(t[n]);return r}function I(t,e){var n=t.split("@"),r="";return n.length>1&&(r=n[0]+"@",t=n[1]),r+T((t=t.replace(b,".")).split("."),e).join(".")}function j(t){for(var e,n,r=[],i=0,o=t.length;i<o;)(e=t.charCodeAt(i++))>=55296&&e<=56319&&i<o?56320==(64512&(n=t.charCodeAt(i++)))?r.push(((1023&e)<<10)+(1023&n)+65536):(r.push(e),i--):r.push(e);return r}function L(t){return T(t,function(t){var e="";return t>65535&&(e+=S((t-=65536)>>>10&1023|55296),t=56320|1023&t),e+=S(t)}).join("")}function R(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function P(t,e,n){var r=0;for(t=n?E(t/f):t>>1,t+=E(t/e);t>x*h>>1;r+=u)t=E(t/x);return E(r+(x+1)*t/(t+p))}function N(t){var e,n,r,i,o,a,s,p,f,m,v,_=[],b=t.length,w=0,O=g,x=d;for((n=t.lastIndexOf(y))<0&&(n=0),r=0;r<n;++r)t.charCodeAt(r)>=128&&C("not-basic"),_.push(t.charCodeAt(r));for(i=n>0?n+1:0;i<b;){for(o=w,a=1,s=u;i>=b&&C("invalid-input"),((p=(v=t.charCodeAt(i++))-48<10?v-22:v-65<26?v-65:v-97<26?v-97:u)>=u||p>E((l-w)/a))&&C("overflow"),w+=p*a,!(p<(f=s<=x?c:s>=x+h?h:s-x));s+=u)a>E(l/(m=u-f))&&C("overflow"),a*=m;x=P(w-o,e=_.length+1,0==o),E(w/e)>l-O&&C("overflow"),O+=E(w/e),w%=e,_.splice(w++,0,O)}return L(_)}function M(t){var e,n,r,i,o,a,s,p,f,m,v,_,b,w,O,x=[];for(_=(t=j(t)).length,e=g,n=0,o=d,a=0;a<_;++a)(v=t[a])<128&&x.push(S(v));for(r=i=x.length,i&&x.push(y);r<_;){for(s=l,a=0;a<_;++a)(v=t[a])>=e&&v<s&&(s=v);for(s-e>E((l-n)/(b=r+1))&&C("overflow"),n+=(s-e)*b,e=s,a=0;a<_;++a)if((v=t[a])<e&&++n>l&&C("overflow"),v==e){for(p=n,f=u;!(p<(m=f<=o?c:f>=o+h?h:f-o));f+=u)O=p-m,w=u-m,x.push(S(R(m+O%w,0))),p=E(O/w);x.push(S(R(p,0))),o=P(n,b,r==i),n=0,++r}++n,++e}return x.join("")}if(a={version:"1.3.2",ucs2:{decode:j,encode:L},decode:N,encode:M,toASCII:function(t){return I(t,function(t){return v.test(t)?"xn--"+M(t):t})},toUnicode:function(t){return I(t,function(t){return m.test(t)?N(t.slice(4).toLowerCase()):t})}},r&&i)if(t.exports==r)i.exports=a;else for(s in a)a.hasOwnProperty(s)&&(r[s]=a[s]);else n.punycode=a}(w)}),E={isString:function(t){return"string"===typeof t},isObject:function(t){return"object"===_(t)&&null!==t},isNull:function(t){return null===t},isNullOrUndefined:function(t){return null==t}};function S(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var C=function(t,e,n,r){e=e||"&",n=n||"=";var i={};if("string"!==typeof t||0===t.length)return i;var o=/\+/g;t=t.split(e);var a=1e3;r&&"number"===typeof r.maxKeys&&(a=r.maxKeys);var s=t.length;a>0&&s>a&&(s=a);for(var l=0;l<s;++l){var u,c,h,p,f=t[l].replace(o,"%20"),d=f.indexOf(n);d>=0?(u=f.substr(0,d),c=f.substr(d+1)):(u=f,c=""),h=decodeURIComponent(u),p=decodeURIComponent(c),S(i,h)?Array.isArray(i[h])?i[h].push(p):i[h]=[i[h],p]:i[h]=p}return i},T=function(t){switch(_(t)){case"string":return t;case"boolean":return t?"true":"false";case"number":return isFinite(t)?t:"";default:return""}},I=function(t,e,n,r){return e=e||"&",n=n||"=",null===t&&(t=void 0),"object"===_(t)?Object.keys(t).map(function(r){var i=encodeURIComponent(T(r))+n;return Array.isArray(t[r])?t[r].map(function(t){return i+encodeURIComponent(T(t))}).join(e):i+encodeURIComponent(T(t[r]))}).join(e):r?encodeURIComponent(T(r))+n+encodeURIComponent(T(t)):""},j=O(function(t,e){e.decode=e.parse=C,e.encode=e.stringify=I});function L(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var R=/^([a-z0-9.+-]+:)/i,P=/:[0-9]*$/,N=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,M=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),A=["'"].concat(M),k=["%","/","?",";","#"].concat(A),F=["/","?","#"],D=/^[+a-z0-9A-Z_-]{0,63}$/,G=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,U={javascript:!0,"javascript:":!0},z={javascript:!0,"javascript:":!0},B={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function V(t,e,n){if(t&&E.isObject(t)&&t instanceof L)return t;var r=new L;return r.parse(t,e,n),r}L.prototype.parse=function(t,e,n){if(!E.isString(t))throw new TypeError("Parameter 'url' must be a string, not "+_(t));var r=t.indexOf("?"),i=-1!==r&&r<t.indexOf("#")?"?":"#",o=t.split(i);o[0]=o[0].replace(/\\/g,"/");var a=t=o.join(i);if(a=a.trim(),!n&&1===t.split("#").length){var s=N.exec(a);if(s)return this.path=a,this.href=a,this.pathname=s[1],s[2]?(this.search=s[2],this.query=e?j.parse(this.search.substr(1)):this.search.substr(1)):e&&(this.search="",this.query={}),this}var l=R.exec(a);if(l){var u=(l=l[0]).toLowerCase();this.protocol=u,a=a.substr(l.length)}if(n||l||a.match(/^\/\/[^@\/]+@[^@\/]+/)){var c="//"===a.substr(0,2);!c||l&&z[l]||(a=a.substr(2),this.slashes=!0)}if(!z[l]&&(c||l&&!B[l])){for(var h,p,f=-1,d=0;d<F.length;d++){-1!==(g=a.indexOf(F[d]))&&(-1===f||g<f)&&(f=g)}-1!==(p=-1===f?a.lastIndexOf("@"):a.lastIndexOf("@",f))&&(h=a.slice(0,p),a=a.slice(p+1),this.auth=decodeURIComponent(h)),f=-1;for(d=0;d<k.length;d++){var g;-1!==(g=a.indexOf(k[d]))&&(-1===f||g<f)&&(f=g)}-1===f&&(f=a.length),this.host=a.slice(0,f),a=a.slice(f),this.parseHost(),this.hostname=this.hostname||"";var y="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!y)for(var m=this.hostname.split(/\./),v=(d=0,m.length);d<v;d++){var b=m[d];if(b&&!b.match(D)){for(var w="",O=0,S=b.length;O<S;O++)b.charCodeAt(O)>127?w+="x":w+=b[O];if(!w.match(D)){var C=m.slice(0,d),T=m.slice(d+1),I=b.match(G);I&&(C.push(I[1]),T.unshift(I[2])),T.length&&(a="/"+T.join(".")+a),this.hostname=C.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),y||(this.hostname=x.toASCII(this.hostname));var L=this.port?":"+this.port:"",P=this.hostname||"";this.host=P+L,this.href+=this.host,y&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==a[0]&&(a="/"+a))}if(!U[u])for(d=0,v=A.length;d<v;d++){var M=A[d];if(-1!==a.indexOf(M)){var V=encodeURIComponent(M);V===M&&(V=escape(M)),a=a.split(M).join(V)}}var Y=a.indexOf("#");-1!==Y&&(this.hash=a.substr(Y),a=a.slice(0,Y));var q=a.indexOf("?");if(-1!==q?(this.search=a.substr(q),this.query=a.substr(q+1),e&&(this.query=j.parse(this.query)),a=a.slice(0,q)):e&&(this.search="",this.query={}),a&&(this.pathname=a),B[u]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){L=this.pathname||"";var X=this.search||"";this.path=L+X}return this.href=this.format(),this},L.prototype.format=function(){var t=this.auth||"";t&&(t=(t=encodeURIComponent(t)).replace(/%3A/i,":"),t+="@");var e=this.protocol||"",n=this.pathname||"",r=this.hash||"",i=!1,o="";this.host?i=t+this.host:this.hostname&&(i=t+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(i+=":"+this.port)),this.query&&E.isObject(this.query)&&Object.keys(this.query).length&&(o=j.stringify(this.query));var a=this.search||o&&"?"+o||"";return e&&":"!==e.substr(-1)&&(e+=":"),this.slashes||(!e||B[e])&&!1!==i?(i="//"+(i||""),n&&"/"!==n.charAt(0)&&(n="/"+n)):i||(i=""),r&&"#"!==r.charAt(0)&&(r="#"+r),a&&"?"!==a.charAt(0)&&(a="?"+a),e+i+(n=n.replace(/[?#]/g,function(t){return encodeURIComponent(t)}))+(a=a.replace("#","%23"))+r},L.prototype.resolve=function(t){return this.resolveObject(V(t,!1,!0)).format()},L.prototype.resolveObject=function(t){if(E.isString(t)){var e=new L;e.parse(t,!1,!0),t=e}for(var n=new L,r=Object.keys(this),i=0;i<r.length;i++){var o=r[i];n[o]=this[o]}if(n.hash=t.hash,""===t.href)return n.href=n.format(),n;if(t.slashes&&!t.protocol){for(var a=Object.keys(t),s=0;s<a.length;s++){var l=a[s];"protocol"!==l&&(n[l]=t[l])}return B[n.protocol]&&n.hostname&&!n.pathname&&(n.path=n.pathname="/"),n.href=n.format(),n}if(t.protocol&&t.protocol!==n.protocol){if(!B[t.protocol]){for(var u=Object.keys(t),c=0;c<u.length;c++){var h=u[c];n[h]=t[h]}return n.href=n.format(),n}if(n.protocol=t.protocol,t.host||z[t.protocol])n.pathname=t.pathname;else{for(var p=(t.pathname||"").split("/");p.length&&!(t.host=p.shift()););t.host||(t.host=""),t.hostname||(t.hostname=""),""!==p[0]&&p.unshift(""),p.length<2&&p.unshift(""),n.pathname=p.join("/")}if(n.search=t.search,n.query=t.query,n.host=t.host||"",n.auth=t.auth,n.hostname=t.hostname||t.host,n.port=t.port,n.pathname||n.search){var f=n.pathname||"",d=n.search||"";n.path=f+d}return n.slashes=n.slashes||t.slashes,n.href=n.format(),n}var g=n.pathname&&"/"===n.pathname.charAt(0),y=t.host||t.pathname&&"/"===t.pathname.charAt(0),m=y||g||n.host&&t.pathname,v=m,_=n.pathname&&n.pathname.split("/")||[],b=(p=t.pathname&&t.pathname.split("/")||[],n.protocol&&!B[n.protocol]);if(b&&(n.hostname="",n.port=null,n.host&&(""===_[0]?_[0]=n.host:_.unshift(n.host)),n.host="",t.protocol&&(t.hostname=null,t.port=null,t.host&&(""===p[0]?p[0]=t.host:p.unshift(t.host)),t.host=null),m=m&&(""===p[0]||""===_[0])),y)n.host=t.host||""===t.host?t.host:n.host,n.hostname=t.hostname||""===t.hostname?t.hostname:n.hostname,n.search=t.search,n.query=t.query,_=p;else if(p.length)_||(_=[]),_.pop(),_=_.concat(p),n.search=t.search,n.query=t.query;else if(!E.isNullOrUndefined(t.search)){if(b)n.hostname=n.host=_.shift(),(C=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=C.shift(),n.host=n.hostname=C.shift());return n.search=t.search,n.query=t.query,E.isNull(n.pathname)&&E.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n}if(!_.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var w=_.slice(-1)[0],O=(n.host||t.host||_.length>1)&&("."===w||".."===w)||""===w,x=0,S=_.length;S>=0;S--)"."===(w=_[S])?_.splice(S,1):".."===w?(_.splice(S,1),x++):x&&(_.splice(S,1),x--);if(!m&&!v)for(;x--;x)_.unshift("..");!m||""===_[0]||_[0]&&"/"===_[0].charAt(0)||_.unshift(""),O&&"/"!==_.join("/").substr(-1)&&_.push("");var C,T=""===_[0]||_[0]&&"/"===_[0].charAt(0);b&&(n.hostname=n.host=T?"":_.length?_.shift():"",(C=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=C.shift(),n.host=n.hostname=C.shift()));return(m=m||n.host&&_.length)&&!T&&_.unshift(""),_.length?n.pathname=_.join("/"):(n.pathname=null,n.path=null),E.isNull(n.pathname)&&E.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=t.auth||n.auth,n.slashes=n.slashes||t.slashes,n.href=n.format(),n},L.prototype.parseHost=function(){var t=this.host,e=P.exec(t);e&&(":"!==(e=e[0])&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)};function Y(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];for(var i=0;i<n.length;i++){var o=n[i];for(var a in o)t[a]=o[a]}return t}var q=function(t){function e(t,n){var r;return f(this,e),(r=d(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,n))).message=n,r.key=t,r}return function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&m(t,e)}(e,g(Error)),e}(),X=function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];f(this,t),this.parent=e,this.bindings={};var r=!0,i=!1,o=void 0;try{for(var s,l=n[Symbol.iterator]();!(r=(s=l.next()).done);r=!0){var u=a(s.value,2),c=u[0],h=u[1];this.bindings[c]=h}}catch(t){i=!0,o=t}finally{try{r||null==l.return||l.return()}finally{if(i)throw o}}}return p(t,[{key:"concat",value:function(e){return new t(this,e)}},{key:"get",value:function(t){if(this.bindings[t])return this.bindings[t];if(this.parent)return this.parent.get(t);throw new Error("".concat(t," not found in scope."))}},{key:"has",value:function(t){return!!this.bindings[t]||!!this.parent&&this.parent.has(t)}}]),t}(),W={kind:"null"},H={kind:"number"},K={kind:"string"},Z={kind:"boolean"},J={kind:"color"},$={kind:"object"},Q={kind:"value"},tt={kind:"collator"},et={kind:"formatted"},nt={kind:"resolvedImage"};function rt(t,e){return{kind:"array",itemType:t,N:e}}function it(t){if("array"===t.kind){var e=it(t.itemType);return"number"===typeof t.N?"array<".concat(e,", ").concat(t.N,">"):"value"===t.itemType.kind?"array":"array<".concat(e,">")}return t.kind}var ot=[W,H,K,Z,J,et,$,rt(Q),nt];function at(t,e){if("error"===e.kind)return null;if("array"===t.kind){if("array"===e.kind&&(0===e.N&&"value"===e.itemType.kind||!at(t.itemType,e.itemType))&&("number"!==typeof t.N||t.N===e.N))return null}else{if(t.kind===e.kind)return null;if("value"===t.kind){var n=!0,r=!1,i=void 0;try{for(var o,a=ot[Symbol.iterator]();!(n=(o=a.next()).done);n=!0){if(!at(o.value,e))return null}}catch(t){r=!0,i=t}finally{try{n||null==a.return||a.return()}finally{if(r)throw i}}}}return"Expected ".concat(it(t)," but found ").concat(it(e)," instead.")}function st(t,e){return e.some(function(e){return e.kind===t.kind})}function lt(t,e){return e.some(function(e){return"null"===e?null===t:"array"===e?Array.isArray(t):"object"===e?t&&!Array.isArray(t)&&"object"===_(t):e===_(t)})}var ut=O(function(t,e){var n={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],rebeccapurple:[102,51,153,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function r(t){return(t=Math.round(t))<0?0:t>255?255:t}function i(t){return t<0?0:t>1?1:t}function o(t){return"%"===t[t.length-1]?r(parseFloat(t)/100*255):r(parseInt(t))}function a(t){return"%"===t[t.length-1]?i(parseFloat(t)/100):i(parseFloat(t))}function s(t,e,n){return n<0?n+=1:n>1&&(n-=1),6*n<1?t+(e-t)*n*6:2*n<1?e:3*n<2?t+(e-t)*(2/3-n)*6:t}try{e.parseCSSColor=function(t){var e,i=t.replace(/ /g,"").toLowerCase();if(i in n)return n[i].slice();if("#"===i[0])return 4===i.length?(e=parseInt(i.substr(1),16))>=0&&e<=4095?[(3840&e)>>4|(3840&e)>>8,240&e|(240&e)>>4,15&e|(15&e)<<4,1]:null:7===i.length&&(e=parseInt(i.substr(1),16))>=0&&e<=16777215?[(16711680&e)>>16,(65280&e)>>8,255&e,1]:null;var l=i.indexOf("("),u=i.indexOf(")");if(-1!==l&&u+1===i.length){var c=i.substr(0,l),h=i.substr(l+1,u-(l+1)).split(","),p=1;switch(c){case"rgba":if(4!==h.length)return null;p=a(h.pop());case"rgb":return 3!==h.length?null:[o(h[0]),o(h[1]),o(h[2]),p];case"hsla":if(4!==h.length)return null;p=a(h.pop());case"hsl":if(3!==h.length)return null;var f=(parseFloat(h[0])%360+360)%360/360,d=a(h[1]),g=a(h[2]),y=g<=.5?g*(d+1):g+d-g*d,m=2*g-y;return[r(255*s(m,y,f+1/3)),r(255*s(m,y,f)),r(255*s(m,y,f-1/3)),p];default:return null}}return null}}catch(t){}}),ct=function(){function t(e,n,r){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;f(this,t),this.r=e,this.g=n,this.b=r,this.a=i}return p(t,[{key:"toString",value:function(){var t=a(this.toArray(),4),e=t[0],n=t[1],r=t[2],i=t[3];return"rgba(".concat(Math.round(e),",").concat(Math.round(n),",").concat(Math.round(r),",").concat(i,")")}},{key:"toArray",value:function(){var t=this.r,e=this.g,n=this.b,r=this.a;return 0===r?[0,0,0,0]:[255*t/r,255*e/r,255*n/r,r]}}],[{key:"parse",value:function(e){if(e){if(e instanceof t)return e;if("string"===typeof e){var n=ut.parseCSSColor(e);if(n)return new t(n[0]/255*n[3],n[1]/255*n[3],n[2]/255*n[3],n[3])}}}}]),t}();ct.black=new ct(0,0,0,1),ct.white=new ct(1,1,1,1),ct.transparent=new ct(0,0,0,0),ct.red=new ct(1,0,0,1),ct.blue=new ct(0,0,1,1);var ht=function(){function t(e,n,r){f(this,t),this.sensitivity=e?n?"variant":"case":n?"accent":"base",this.locale=r,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}return p(t,[{key:"compare",value:function(t,e){return this.collator.compare(t,e)}},{key:"resolvedLocale",value:function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}]),t}(),pt=function t(e,n,r,i,o){f(this,t),this.text=e,this.image=n,this.scale=r,this.fontStack=i,this.textColor=o},ft=function(){function t(e){f(this,t),this.sections=e}return p(t,[{key:"isEmpty",value:function(){return 0===this.sections.length||!this.sections.some(function(t){return 0!==t.text.length||t.image&&0!==t.image.name.length})}},{key:"toString",value:function(){return 0===this.sections.length?"":this.sections.map(function(t){return t.text}).join("")}},{key:"serialize",value:function(){var t=["format"],e=!0,n=!1,r=void 0;try{for(var i,o=this.sections[Symbol.iterator]();!(e=(i=o.next()).done);e=!0){var a=i.value;if(a.image)t.push(["image",a.image.name]);else{t.push(a.text);var s={};a.fontStack&&(s["text-font"]=["literal",a.fontStack.split(",")]),a.scale&&(s["font-scale"]=a.scale),a.textColor&&(s["text-color"]=["rgba"].concat(a.textColor.toArray())),t.push(s)}}}catch(t){n=!0,r=t}finally{try{e||null==o.return||o.return()}finally{if(n)throw r}}return t}}],[{key:"fromString",value:function(e){return new t([new pt(e,null,null,null,null)])}},{key:"factory",value:function(e){return e instanceof t?e:t.fromString(e)}}]),t}(),dt=function(){function t(e){f(this,t),this.name=e.name,this.available=e.available}return p(t,[{key:"toString",value:function(){return this.name}},{key:"serialize",value:function(){return["image",this.name]}}],[{key:"fromString",value:function(e){return e?new t({name:e,available:!1}):null}}]),t}();function gt(t,e,n,r){return"number"===typeof t&&t>=0&&t<=255&&"number"===typeof e&&e>=0&&e<=255&&"number"===typeof n&&n>=0&&n<=255?"undefined"===typeof r||"number"===typeof r&&r>=0&&r<=1?null:"Invalid rgba value [".concat([t,e,n,r].join(", "),"]: 'a' must be between 0 and 1."):"Invalid rgba value [".concat(("number"===typeof r?[t,e,n,r]:[t,e,n]).join(", "),"]: 'r', 'g', and 'b' must be between 0 and 255.")}function yt(t){if(null===t)return!0;if("string"===typeof t)return!0;if("boolean"===typeof t)return!0;if("number"===typeof t)return!0;if(t instanceof ct)return!0;if(t instanceof ht)return!0;if(t instanceof ft)return!0;if(t instanceof dt)return!0;if(Array.isArray(t)){var e=!0,n=!1,r=void 0;try{for(var i,o=t[Symbol.iterator]();!(e=(i=o.next()).done);e=!0){if(!yt(i.value))return!1}}catch(t){n=!0,r=t}finally{try{e||null==o.return||o.return()}finally{if(n)throw r}}return!0}if("object"===_(t)){for(var a in t)if(!yt(t[a]))return!1;return!0}return!1}function mt(t){if(null===t)return W;if("string"===typeof t)return K;if("boolean"===typeof t)return Z;if("number"===typeof t)return H;if(t instanceof ct)return J;if(t instanceof ht)return tt;if(t instanceof ft)return et;if(t instanceof dt)return nt;if(Array.isArray(t)){var e,n=t.length,r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done);r=!0){var l=mt(a.value);if(e){if(e===l)continue;e=Q;break}e=l}}catch(t){i=!0,o=t}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return rt(e||Q,n)}return $}function vt(t){var e=_(t);return null===t?"":"string"===e||"number"===e||"boolean"===e?String(t):t instanceof ct||t instanceof ft||t instanceof dt?t.toString():JSON.stringify(t)}var _t=function(){function t(e,n){f(this,t),this.type=e,this.value=n}return p(t,[{key:"evaluate",value:function(){return this.value}},{key:"eachChild",value:function(){}},{key:"outputDefined",value:function(){return!0}},{key:"serialize",value:function(){return"array"===this.type.kind||"object"===this.type.kind?["literal",this.value]:this.value instanceof ct?["rgba"].concat(this.value.toArray()):this.value instanceof ft?this.value.serialize():this.value}}],[{key:"parse",value:function(e,n){if(2!==e.length)return n.error("'literal' expression requires exactly one argument, but found ".concat(e.length-1," instead."));if(!yt(e[1]))return n.error("invalid value");var r=e[1],i=mt(r),o=n.expectedType;return"array"!==i.kind||0!==i.N||!o||"array"!==o.kind||"number"===typeof o.N&&0!==o.N||(i=o),new t(i,r)}}]),t}(),bt=function(){function t(e){f(this,t),this.name="ExpressionEvaluationError",this.message=e}return p(t,[{key:"toJSON",value:function(){return this.message}}]),t}(),wt={string:K,number:H,boolean:Z,object:$},Ot=function(){function t(e,n){f(this,t),this.type=e,this.args=n}return p(t,[{key:"evaluate",value:function(t){for(var e=0;e<this.args.length;e++){var n=this.args[e].evaluate(t);if(!at(this.type,mt(n)))return n;if(e===this.args.length-1)throw new bt("Expected value to be of type ".concat(it(this.type),", but found ").concat(it(mt(n))," instead."))}return null}},{key:"eachChild",value:function(t){this.args.forEach(t)}},{key:"outputDefined",value:function(){return this.args.every(function(t){return t.outputDefined()})}},{key:"serialize",value:function(){var t=this.type,e=[t.kind];if("array"===t.kind){var n=t.itemType;if("string"===n.kind||"number"===n.kind||"boolean"===n.kind){e.push(n.kind);var r=t.N;("number"===typeof r||this.args.length>1)&&e.push(r)}}return e.concat(this.args.map(function(t){return t.serialize()}))}}],[{key:"parse",value:function(e,n){if(e.length<2)return n.error("Expected at least one argument.");var r,i=1,o=e[0];if("array"===o){var a,s;if(e.length>2){var l=e[1];if("string"!==typeof l||!(l in wt)||"object"===l)return n.error('The item type argument of "array" must be one of string, number, boolean',1);a=wt[l],i++}else a=Q;if(e.length>3){if(null!==e[2]&&("number"!==typeof e[2]||e[2]<0||e[2]!==Math.floor(e[2])))return n.error('The length argument to "array" must be a positive integer literal',2);s=e[2],i++}r=rt(a,s)}else r=wt[o];for(var u=[];i<e.length;i++){var c=n.parse(e[i],i,Q);if(!c)return null;u.push(c)}return new t(r,u)}}]),t}(),xt=function(){function t(e){f(this,t),this.type=et,this.sections=e}return p(t,[{key:"evaluate",value:function(t){return new ft(this.sections.map(function(e){var n=e.content.evaluate(t);return mt(n)===nt?new pt("",n,null,null,null):new pt(vt(n),null,e.scale?e.scale.evaluate(t):null,e.font?e.font.evaluate(t).join(","):null,e.textColor?e.textColor.evaluate(t):null)}))}},{key:"eachChild",value:function(t){var e=!0,n=!1,r=void 0;try{for(var i,o=this.sections[Symbol.iterator]();!(e=(i=o.next()).done);e=!0){var a=i.value;t(a.content),a.scale&&t(a.scale),a.font&&t(a.font),a.textColor&&t(a.textColor)}}catch(t){n=!0,r=t}finally{try{e||null==o.return||o.return()}finally{if(n)throw r}}}},{key:"outputDefined",value:function(){return!1}},{key:"serialize",value:function(){var t=["format"],e=!0,n=!1,r=void 0;try{for(var i,o=this.sections[Symbol.iterator]();!(e=(i=o.next()).done);e=!0){var a=i.value;t.push(a.content.serialize());var s={};a.scale&&(s["font-scale"]=a.scale.serialize()),a.font&&(s["text-font"]=a.font.serialize()),a.textColor&&(s["text-color"]=a.textColor.serialize()),t.push(s)}}catch(t){n=!0,r=t}finally{try{e||null==o.return||o.return()}finally{if(n)throw r}}return t}}],[{key:"parse",value:function(e,n){if(e.length<2)return n.error("Expected at least one argument.");var r=e[1];if(!Array.isArray(r)&&"object"===_(r))return n.error("First argument must be an image or text section.");for(var i=[],o=!1,a=1;a<=e.length-1;++a){var s=e[a];if(o&&"object"===_(s)&&!Array.isArray(s)){o=!1;var l=null;if(s["font-scale"]&&!(l=n.parse(s["font-scale"],1,H)))return null;var u=null;if(s["text-font"]&&!(u=n.parse(s["text-font"],1,rt(K))))return null;var c=null;if(s["text-color"]&&!(c=n.parse(s["text-color"],1,J)))return null;var h=i[i.length-1];h.scale=l,h.font=u,h.textColor=c}else{var p=n.parse(e[a],1,Q);if(!p)return null;var f=p.type.kind;if("string"!==f&&"value"!==f&&"null"!==f&&"resolvedImage"!==f)return n.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");o=!0,i.push({content:p,scale:null,font:null,textColor:null})}}return new t(i)}}]),t}(),Et=function(){function t(e){f(this,t),this.type=nt,this.input=e}return p(t,[{key:"evaluate",value:function(t){var e=this.input.evaluate(t),n=dt.fromString(e);return n&&t.availableImages&&(n.available=t.availableImages.indexOf(e)>-1),n}},{key:"eachChild",value:function(t){t(this.input)}},{key:"outputDefined",value:function(){return!1}},{key:"serialize",value:function(){return["image",this.input.serialize()]}}],[{key:"parse",value:function(e,n){if(2!==e.length)return n.error("Expected two arguments.");var r=n.parse(e[1],1,K);return r?new t(r):n.error("No image name provided.")}}]),t}(),St={"to-boolean":Z,"to-color":J,"to-number":H,"to-string":K},Ct=function(){function t(e,n){f(this,t),this.type=e,this.args=n}return p(t,[{key:"evaluate",value:function(t){if("boolean"===this.type.kind)return Boolean(this.args[0].evaluate(t));if("color"===this.type.kind){var e,n,r=!0,i=!1,o=void 0;try{for(var a,s=this.args[Symbol.iterator]();!(r=(a=s.next()).done);r=!0){if(n=null,(e=a.value.evaluate(t))instanceof ct)return e;if("string"===typeof e){var l=t.parseColor(e);if(l)return l}else if(Array.isArray(e)&&!(n=e.length<3||e.length>4?"Invalid rbga value ".concat(JSON.stringify(e),": expected an array containing either three or four numeric values."):gt(e[0],e[1],e[2],e[3])))return new ct(e[0]/255,e[1]/255,e[2]/255,e[3])}}catch(t){i=!0,o=t}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}throw new bt(n||"Could not parse color from value '".concat("string"===typeof e?e:String(JSON.stringify(e)),"'"))}if("number"===this.type.kind){var u=null,c=!0,h=!1,p=void 0;try{for(var f,d=this.args[Symbol.iterator]();!(c=(f=d.next()).done);c=!0){if(null===(u=f.value.evaluate(t)))return 0;var g=Number(u);if(!isNaN(g))return g}}catch(t){h=!0,p=t}finally{try{c||null==d.return||d.return()}finally{if(h)throw p}}throw new bt("Could not convert ".concat(JSON.stringify(u)," to number."))}return"formatted"===this.type.kind?ft.fromString(vt(this.args[0].evaluate(t))):"resolvedImage"===this.type.kind?dt.fromString(vt(this.args[0].evaluate(t))):vt(this.args[0].evaluate(t))}},{key:"eachChild",value:function(t){this.args.forEach(t)}},{key:"outputDefined",value:function(){return this.args.every(function(t){return t.outputDefined()})}},{key:"serialize",value:function(){if("formatted"===this.type.kind)return new xt([{content:this.args[0],scale:null,font:null,textColor:null}]).serialize();if("resolvedImage"===this.type.kind)return new Et(this.args[0]).serialize();var t=["to-".concat(this.type.kind)];return this.eachChild(function(e){t.push(e.serialize())}),t}}],[{key:"parse",value:function(e,n){if(e.length<2)return n.error("Expected at least one argument.");var r=e[0];if(("to-boolean"===r||"to-string"===r)&&2!==e.length)return n.error("Expected one argument.");for(var i=St[r],o=[],a=1;a<e.length;a++){var s=n.parse(e[a],a,Q);if(!s)return null;o.push(s)}return new t(i,o)}}]),t}(),Tt=["Unknown","Point","LineString","Polygon"],It=function(){function t(){f(this,t),this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache={},this.availableImages=null,this.canonical=null}return p(t,[{key:"id",value:function(){return this.feature&&"id"in this.feature?this.feature.id:null}},{key:"geometryType",value:function(){return this.feature?"number"===typeof this.feature.type?Tt[this.feature.type]:this.feature.type:null}},{key:"geometry",value:function(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null}},{key:"canonicalID",value:function(){return this.canonical}},{key:"properties",value:function(){return this.feature&&this.feature.properties||{}}},{key:"parseColor",value:function(t){var e=this._parseColorCache[t];return e||(e=this._parseColorCache[t]=ct.parse(t)),e}}]),t}(),jt=function(){function t(e,n,r,i){f(this,t),this.name=e,this.type=n,this._evaluate=r,this.args=i}return p(t,[{key:"evaluate",value:function(t){return this._evaluate(t,this.args)}},{key:"eachChild",value:function(t){this.args.forEach(t)}},{key:"outputDefined",value:function(){return!1}},{key:"serialize",value:function(){return[this.name].concat(this.args.map(function(t){return t.serialize()}))}}],[{key:"parse",value:function(e,n){var r=e[0],o=t.definitions[r];if(!o)return n.error('Unknown expression "'.concat(r,'". If you wanted a literal array, use ["literal", [...]].'),0);var s=Array.isArray(o)?o[0]:o.type,l=Array.isArray(o)?[[o[1],o[2]]]:o.overloads,u=l.filter(function(t){var n=a(t,1)[0];return!Array.isArray(n)||n.length===e.length-1}),c=null,h=!0,p=!1,f=void 0;try{for(var d,g=u[Symbol.iterator]();!(h=(d=g.next()).done);h=!0){var y=a(d.value,2),m=y[0],v=y[1];c=new $t(n.registry,n.path,null,n.scope);for(var _=[],b=!1,w=1;w<e.length;w++){var O=e[w],x=Array.isArray(m)?m[w-1]:m.type,E=c.parse(O,1+_.length,x);if(!E){b=!0;break}_.push(E)}if(!b)if(Array.isArray(m)&&m.length!==_.length)c.error("Expected ".concat(m.length," arguments, but found ").concat(_.length," instead."));else{for(var S=0;S<_.length;S++){var C=Array.isArray(m)?m[S]:m.type,T=_[S];c.concat(S+1).checkSubtype(C,T.type)}if(0===c.errors.length)return new t(r,s,v,_)}}}catch(t){p=!0,f=t}finally{try{h||null==g.return||g.return()}finally{if(p)throw f}}if(1===u.length){var I;(I=n.errors).push.apply(I,i(c.errors))}else{for(var j=(u.length?u:l).map(function(t){var e,n=a(t,1)[0];return e=n,Array.isArray(e)?"(".concat(e.map(it).join(", "),")"):"(".concat(it(e.type),"...)")}).join(" | "),L=[],R=1;R<e.length;R++){var P=n.parse(e[R],1+L.length);if(!P)return null;L.push(it(P.type))}n.error("Expected arguments of type ".concat(j,", but found (").concat(L.join(", "),") instead."))}return null}},{key:"register",value:function(e,n){for(var r in t.definitions=n,n)e[r]=t}}]),t}();var Lt=function(){function t(e,n,r){f(this,t),this.type=tt,this.locale=r,this.caseSensitive=e,this.diacriticSensitive=n}return p(t,[{key:"evaluate",value:function(t){return new ht(this.caseSensitive.evaluate(t),this.diacriticSensitive.evaluate(t),this.locale?this.locale.evaluate(t):null)}},{key:"eachChild",value:function(t){t(this.caseSensitive),t(this.diacriticSensitive),this.locale&&t(this.locale)}},{key:"outputDefined",value:function(){return!1}},{key:"serialize",value:function(){var t={};return t["case-sensitive"]=this.caseSensitive.serialize(),t["diacritic-sensitive"]=this.diacriticSensitive.serialize(),this.locale&&(t.locale=this.locale.serialize()),["collator",t]}}],[{key:"parse",value:function(e,n){if(2!==e.length)return n.error("Expected one argument.");var r=e[1];if("object"!==_(r)||Array.isArray(r))return n.error("Collator options argument must be an object.");var i=n.parse(void 0!==r["case-sensitive"]&&r["case-sensitive"],1,Z);if(!i)return null;var o=n.parse(void 0!==r["diacritic-sensitive"]&&r["diacritic-sensitive"],1,Z);if(!o)return null;var a=null;return r.locale&&!(a=n.parse(r.locale,1,K))?null:new t(i,o,a)}}]),t}(),Rt=8192;function Pt(t,e){t[0]=Math.min(t[0],e[0]),t[1]=Math.min(t[1],e[1]),t[2]=Math.max(t[2],e[0]),t[3]=Math.max(t[3],e[1])}function Nt(t,e){return!(t[0]<=e[0])&&(!(t[2]>=e[2])&&(!(t[1]<=e[1])&&!(t[3]>=e[3])))}function Mt(t,e){var n,r=(180+t[0])/360,i=(n=t[1],(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+n*Math.PI/360)))/360),o=Math.pow(2,e.z);return[Math.round(r*o*Rt),Math.round(i*o*Rt)]}function At(t,e,n){return e[1]>t[1]!==n[1]>t[1]&&t[0]<(n[0]-e[0])*(t[1]-e[1])/(n[1]-e[1])+e[0]}function kt(t,e){for(var n,r,i,o,a,s,l,u=!1,c=0,h=e.length;c<h;c++)for(var p=e[c],f=0,d=p.length;f<d-1;f++){if(n=t,r=p[f],i=p[f+1],void 0,void 0,void 0,void 0,o=n[0]-r[0],a=n[1]-r[1],s=n[0]-i[0],l=n[1]-i[1],o*l-s*a===0&&o*s<=0&&a*l<=0)return!1;At(t,p[f],p[f+1])&&(u=!u)}return u}function Ft(t,e){for(var n=0;n<e.length;n++)if(kt(t,e[n]))return!0;return!1}function Dt(t,e,n,r){var i=t[0]-n[0],o=t[1]-n[1],a=e[0]-n[0],s=e[1]-n[1],l=r[0]-n[0],u=r[1]-n[1],c=i*u-l*o,h=a*u-l*s;return c>0&&h<0||c<0&&h>0}function Gt(t,e,n){var r,i,o,a,s,l,u,c,h=!0,p=!1,f=void 0;try{for(var d,g=n[Symbol.iterator]();!(h=(d=g.next()).done);h=!0)for(var y=d.value,m=0;m<y.length-1;++m)if(r=t,i=e,o=y[m],a=y[m+1],s=void 0,l=void 0,void 0,void 0,u=[i[0]-r[0],i[1]-r[1]],c=[a[0]-o[0],a[1]-o[1]],0!==(s=c)[0]*(l=u)[1]-s[1]*l[0]&&Dt(r,i,o,a)&&Dt(o,a,r,i))return!0}catch(t){p=!0,f=t}finally{try{h||null==g.return||g.return()}finally{if(p)throw f}}return!1}function Ut(t,e){for(var n=0;n<t.length;++n)if(!kt(t[n],e))return!1;for(var r=0;r<t.length-1;++r)if(Gt(t[r],t[r+1],e))return!1;return!0}function zt(t,e){for(var n=0;n<e.length;n++)if(Ut(t,e[n]))return!0;return!1}function Bt(t,e,n){for(var r=[],i=0;i<t.length;i++){for(var o=[],a=0;a<t[i].length;a++){var s=Mt(t[i][a],n);Pt(e,s),o.push(s)}r.push(o)}return r}function Vt(t,e,n){for(var r=[],i=0;i<t.length;i++){var o=Bt(t[i],e,n);r.push(o)}return r}function Yt(t,e,n,r){if(t[0]<n[0]||t[0]>n[2]){var i=.5*r,o=t[0]-n[0]>i?-r:n[0]-t[0]>i?r:0;0===o&&(o=t[0]-n[2]>i?-r:n[2]-t[0]>i?r:0),t[0]+=o}Pt(e,t)}function qt(t,e,n,r){var i=Math.pow(2,r.z)*Rt,o=[r.x*Rt,r.y*Rt],a=[],s=!0,l=!1,u=void 0;try{for(var c,h=t[Symbol.iterator]();!(s=(c=h.next()).done);s=!0){var p=c.value,f=!0,d=!1,g=void 0;try{for(var y,m=p[Symbol.iterator]();!(f=(y=m.next()).done);f=!0){var v=y.value,_=[v.x+o[0],v.y+o[1]];Yt(_,e,n,i),a.push(_)}}catch(t){d=!0,g=t}finally{try{f||null==m.return||m.return()}finally{if(d)throw g}}}}catch(t){l=!0,u=t}finally{try{s||null==h.return||h.return()}finally{if(l)throw u}}return a}function Xt(t,e,n,r){var i,o=Math.pow(2,r.z)*Rt,a=[r.x*Rt,r.y*Rt],s=[],l=!0,u=!1,c=void 0;try{for(var h,p=t[Symbol.iterator]();!(l=(h=p.next()).done);l=!0){var f=h.value,d=[],g=!0,y=!1,m=void 0;try{for(var v,_=f[Symbol.iterator]();!(g=(v=_.next()).done);g=!0){var b=v.value,w=[b.x+a[0],b.y+a[1]];Pt(e,w),d.push(w)}}catch(t){y=!0,m=t}finally{try{g||null==_.return||_.return()}finally{if(y)throw m}}s.push(d)}}catch(t){u=!0,c=t}finally{try{l||null==p.return||p.return()}finally{if(u)throw c}}if(e[2]-e[0]<=o/2){(i=e)[0]=i[1]=1/0,i[2]=i[3]=-1/0;var O=!0,x=!1,E=void 0;try{for(var S,C=s[Symbol.iterator]();!(O=(S=C.next()).done);O=!0){var T=S.value,I=!0,j=!1,L=void 0;try{for(var R,P=T[Symbol.iterator]();!(I=(R=P.next()).done);I=!0){Yt(R.value,e,n,o)}}catch(t){j=!0,L=t}finally{try{I||null==P.return||P.return()}finally{if(j)throw L}}}}catch(t){x=!0,E=t}finally{try{O||null==C.return||C.return()}finally{if(x)throw E}}}return s}var Wt=function(){function t(e,n){f(this,t),this.type=Z,this.geojson=e,this.geometries=n}return p(t,[{key:"evaluate",value:function(t){if(null!=t.geometry()&&null!=t.canonicalID()){if("Point"===t.geometryType())return function(t,e){var n=[1/0,1/0,-1/0,-1/0],r=[1/0,1/0,-1/0,-1/0],i=t.canonicalID();if("Polygon"===e.type){var o=Bt(e.coordinates,r,i),a=qt(t.geometry(),n,r,i);if(!Nt(n,r))return!1;var s=!0,l=!1,u=void 0;try{for(var c,h=a[Symbol.iterator]();!(s=(c=h.next()).done);s=!0)if(!kt(c.value,o))return!1}catch(t){l=!0,u=t}finally{try{s||null==h.return||h.return()}finally{if(l)throw u}}}if("MultiPolygon"===e.type){var p=Vt(e.coordinates,r,i),f=qt(t.geometry(),n,r,i);if(!Nt(n,r))return!1;var d=!0,g=!1,y=void 0;try{for(var m,v=f[Symbol.iterator]();!(d=(m=v.next()).done);d=!0)if(!Ft(m.value,p))return!1}catch(t){g=!0,y=t}finally{try{d||null==v.return||v.return()}finally{if(g)throw y}}}return!0}(t,this.geometries);if("LineString"===t.geometryType())return function(t,e){var n=[1/0,1/0,-1/0,-1/0],r=[1/0,1/0,-1/0,-1/0],i=t.canonicalID();if("Polygon"===e.type){var o=Bt(e.coordinates,r,i),a=Xt(t.geometry(),n,r,i);if(!Nt(n,r))return!1;var s=!0,l=!1,u=void 0;try{for(var c,h=a[Symbol.iterator]();!(s=(c=h.next()).done);s=!0)if(!Ut(c.value,o))return!1}catch(t){l=!0,u=t}finally{try{s||null==h.return||h.return()}finally{if(l)throw u}}}if("MultiPolygon"===e.type){var p=Vt(e.coordinates,r,i),f=Xt(t.geometry(),n,r,i);if(!Nt(n,r))return!1;var d=!0,g=!1,y=void 0;try{for(var m,v=f[Symbol.iterator]();!(d=(m=v.next()).done);d=!0)if(!zt(m.value,p))return!1}catch(t){g=!0,y=t}finally{try{d||null==v.return||v.return()}finally{if(g)throw y}}}return!0}(t,this.geometries)}return!1}},{key:"eachChild",value:function(){}},{key:"outputDefined",value:function(){return!0}},{key:"serialize",value:function(){return["within",this.geojson]}}],[{key:"parse",value:function(e,n){if(2!==e.length)return n.error("'within' expression requires exactly one argument, but found ".concat(e.length-1," instead."));if(yt(e[1])){var r=e[1];if("FeatureCollection"===r.type)for(var i=0;i<r.features.length;++i){var o=r.features[i].geometry.type;if("Polygon"===o||"MultiPolygon"===o)return new t(r,r.features[i].geometry)}else if("Feature"===r.type){var a=r.geometry.type;if("Polygon"===a||"MultiPolygon"===a)return new t(r,r.geometry)}else if("Polygon"===r.type||"MultiPolygon"===r.type)return new t(r,r)}return n.error("'within' expression requires valid geojson object that contains polygon geometry type.")}}]),t}();function Ht(t){if(t instanceof jt){if("get"===t.name&&1===t.args.length)return!1;if("feature-state"===t.name)return!1;if("has"===t.name&&1===t.args.length)return!1;if("properties"===t.name||"geometry-type"===t.name||"id"===t.name)return!1;if(/^filter-/.test(t.name))return!1}if(t instanceof Wt)return!1;var e=!0;return t.eachChild(function(t){e&&!Ht(t)&&(e=!1)}),e}function Kt(t){if(t instanceof jt&&"feature-state"===t.name)return!1;var e=!0;return t.eachChild(function(t){e&&!Kt(t)&&(e=!1)}),e}function Zt(t,e){if(t instanceof jt&&e.indexOf(t.name)>=0)return!1;var n=!0;return t.eachChild(function(t){n&&!Zt(t,e)&&(n=!1)}),n}var Jt=function(){function t(e,n){f(this,t),this.type=n.type,this.name=e,this.boundExpression=n}return p(t,[{key:"evaluate",value:function(t){return this.boundExpression.evaluate(t)}},{key:"eachChild",value:function(){}},{key:"outputDefined",value:function(){return!1}},{key:"serialize",value:function(){return["var",this.name]}}],[{key:"parse",value:function(e,n){if(2!==e.length||"string"!==typeof e[1])return n.error("'var' expression requires exactly one string literal argument.");var r=e[1];return n.scope.has(r)?new t(r,n.scope.get(r)):n.error('Unknown variable "'.concat(r,'". Make sure "').concat(r,'" has been bound in an enclosing "let" expression before using it.'),1)}}]),t}(),$t=function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2?arguments[2]:void 0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:new X,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[];f(this,t),this.registry=e,this.path=n,this.key=n.map(function(t){return"[".concat(t,"]")}).join(""),this.scope=i,this.errors=o,this.expectedType=r}return p(t,[{key:"parse",value:function(t,e,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};return e?this.concat(e,n,r)._parse(t,i):this._parse(t,i)}},{key:"_parse",value:function(t,e){function n(t,e,n){return"assert"===n?new Ot(e,[t]):"coerce"===n?new Ct(e,[t]):t}if(null!==t&&"string"!==typeof t&&"boolean"!==typeof t&&"number"!==typeof t||(t=["literal",t]),Array.isArray(t)){if(0===t.length)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');var r=t[0];if("string"!==typeof r)return this.error("Expression name must be a string, but found ".concat(_(r),' instead. If you wanted a literal array, use ["literal", [...]].'),0),null;var i=this.registry[r];if(i){var o=i.parse(t,this);if(!o)return null;if(this.expectedType){var a=this.expectedType,s=o.type;if("string"!==a.kind&&"number"!==a.kind&&"boolean"!==a.kind&&"object"!==a.kind&&"array"!==a.kind||"value"!==s.kind)if("color"!==a.kind&&"formatted"!==a.kind&&"resolvedImage"!==a.kind||"value"!==s.kind&&"string"!==s.kind){if(this.checkSubtype(a,s))return null}else o=n(o,a,e.typeAnnotation||"coerce");else o=n(o,a,e.typeAnnotation||"assert")}if(!(o instanceof _t)&&"resolvedImage"!==o.type.kind&&function t(e){if(e instanceof Jt)return t(e.boundExpression);if(e instanceof jt&&"error"===e.name)return!1;if(e instanceof Lt)return!1;if(e instanceof Wt)return!1;var n=e instanceof Ct||e instanceof Ot;var r=!0;e.eachChild(function(e){r=n?r&&t(e):r&&e instanceof _t});if(!r)return!1;return Ht(e)&&Zt(e,["zoom","heatmap-density","line-progress","sky-radial-progress","accumulated","is-supported-script"])}(o)){var l=new It;try{o=new _t(o.type,o.evaluate(l))}catch(t){return this.error(t.message),null}}return o}return this.error('Unknown expression "'.concat(r,'". If you wanted a literal array, use ["literal", [...]].'),0)}return"undefined"===typeof t?this.error("'undefined' value invalid. Use null instead."):"object"===_(t)?this.error('Bare objects invalid. Use ["literal", {...}] instead.'):this.error("Expected an array, but found ".concat(_(t)," instead."))}},{key:"concat",value:function(e,n,r){var i="number"===typeof e?this.path.concat(e):this.path,o=r?this.scope.concat(r):this.scope;return new t(this.registry,i,n||null,o,this.errors)}},{key:"error",value:function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];var i="".concat(this.key).concat(n.map(function(t){return"[".concat(t,"]")}).join(""));this.errors.push(new q(i,t))}},{key:"checkSubtype",value:function(t,e){var n=at(t,e);return n&&this.error(n),n}}]),t}();function Qt(t,e){for(var n,r,i=t.length-1,o=0,a=i,s=0;o<=a;)if(n=t[s=Math.floor((o+a)/2)],r=t[s+1],n<=e){if(s===i||e<r)return s;o=s+1}else{if(!(n>e))throw new bt("Input is not a number.");a=s-1}return 0}var te=function(){function t(e,n,r){f(this,t),this.type=e,this.input=n,this.labels=[],this.outputs=[];var i=!0,o=!1,s=void 0;try{for(var l,u=r[Symbol.iterator]();!(i=(l=u.next()).done);i=!0){var c=a(l.value,2),h=c[0],p=c[1];this.labels.push(h),this.outputs.push(p)}}catch(t){o=!0,s=t}finally{try{i||null==u.return||u.return()}finally{if(o)throw s}}}return p(t,[{key:"evaluate",value:function(t){var e=this.labels,n=this.outputs;if(1===e.length)return n[0].evaluate(t);var r=this.input.evaluate(t);if(r<=e[0])return n[0].evaluate(t);var i=e.length;return r>=e[i-1]?n[i-1].evaluate(t):n[Qt(e,r)].evaluate(t)}},{key:"eachChild",value:function(t){t(this.input);var e=!0,n=!1,r=void 0;try{for(var i,o=this.outputs[Symbol.iterator]();!(e=(i=o.next()).done);e=!0){t(i.value)}}catch(t){n=!0,r=t}finally{try{e||null==o.return||o.return()}finally{if(n)throw r}}}},{key:"outputDefined",value:function(){return this.outputs.every(function(t){return t.outputDefined()})}},{key:"serialize",value:function(){for(var t=["step",this.input.serialize()],e=0;e<this.labels.length;e++)e>0&&t.push(this.labels[e]),t.push(this.outputs[e].serialize());return t}}],[{key:"parse",value:function(e,n){if(e.length-1<4)return n.error("Expected at least 4 arguments, but found only ".concat(e.length-1,"."));if((e.length-1)%2!==0)return n.error("Expected an even number of arguments.");var r=n.parse(e[1],1,H);if(!r)return null;var i=[],o=null;n.expectedType&&"value"!==n.expectedType.kind&&(o=n.expectedType);for(var a=1;a<e.length;a+=2){var s=1===a?-1/0:e[a],l=e[a+1],u=a,c=a+1;if("number"!==typeof s)return n.error('Input/output pairs for "step" expressions must be defined using literal numeric values (not computed expressions) for the input values.',u);if(i.length&&i[i.length-1][0]>=s)return n.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',u);var h=n.parse(l,c,o);if(!h)return null;o=o||h.type,i.push([s,h])}return new t(o,r,i)}}]),t}(),ee=ne;function ne(t,e,n,r){this.cx=3*t,this.bx=3*(n-t)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*e,this.by=3*(r-e)-this.cy,this.ay=1-this.cy-this.by,this.p1x=t,this.p1y=r,this.p2x=n,this.p2y=r}function re(t,e,n){return t*(1-n)+e*n}ne.prototype.sampleCurveX=function(t){return((this.ax*t+this.bx)*t+this.cx)*t},ne.prototype.sampleCurveY=function(t){return((this.ay*t+this.by)*t+this.cy)*t},ne.prototype.sampleCurveDerivativeX=function(t){return(3*this.ax*t+2*this.bx)*t+this.cx},ne.prototype.solveCurveX=function(t,e){var n,r,i,o,a;for("undefined"===typeof e&&(e=1e-6),i=t,a=0;a<8;a++){if(o=this.sampleCurveX(i)-t,Math.abs(o)<e)return i;var s=this.sampleCurveDerivativeX(i);if(Math.abs(s)<1e-6)break;i-=o/s}if(r=1,(i=t)<(n=0))return n;if(i>r)return r;for(;n<r;){if(o=this.sampleCurveX(i),Math.abs(o-t)<e)return i;t>o?n=i:r=i,i=.5*(r-n)+n}return i},ne.prototype.solve=function(t,e){return this.sampleCurveY(this.solveCurveX(t,e))};var ie=Object.freeze({__proto__:null,number:re,color:function(t,e,n){return new ct(re(t.r,e.r,n),re(t.g,e.g,n),re(t.b,e.b,n),re(t.a,e.a,n))},array:function(t,e,n){return t.map(function(t,r){return re(t,e[r],n)})}}),oe=.95047,ae=1,se=1.08883,le=4/29,ue=6/29,ce=3*ue*ue,he=ue*ue*ue,pe=Math.PI/180,fe=180/Math.PI;function de(t){return t>he?Math.pow(t,1/3):t/ce+le}function ge(t){return t>ue?t*t*t:ce*(t-le)}function ye(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function me(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function ve(t){var e=me(t.r),n=me(t.g),r=me(t.b),i=de((.4124564*e+.3575761*n+.1804375*r)/oe),o=de((.2126729*e+.7151522*n+.072175*r)/ae);return{l:116*o-16,a:500*(i-o),b:200*(o-de((.0193339*e+.119192*n+.9503041*r)/se)),alpha:t.a}}function _e(t){var e=(t.l+16)/116,n=isNaN(t.a)?e:e+t.a/500,r=isNaN(t.b)?e:e-t.b/200;return e=ae*ge(e),n=oe*ge(n),r=se*ge(r),new ct(ye(3.2404542*n-1.5371385*e-.4985314*r),ye(-.969266*n+1.8760108*e+.041556*r),ye(.0556434*n-.2040259*e+1.0572252*r),t.alpha)}var be={forward:ve,reverse:_e,interpolate:function(t,e,n){return{l:re(t.l,e.l,n),a:re(t.a,e.a,n),b:re(t.b,e.b,n),alpha:re(t.alpha,e.alpha,n)}}},we={forward:function(t){var e=ve(t),n=e.l,r=e.a,i=e.b,o=Math.atan2(i,r)*fe;return{h:o<0?o+360:o,c:Math.sqrt(r*r+i*i),l:n,alpha:t.a}},reverse:function(t){var e=t.h*pe,n=t.c;return _e({l:t.l,a:Math.cos(e)*n,b:Math.sin(e)*n,alpha:t.alpha})},interpolate:function(t,e,n){return{h:function(t,e,n){var r=e-t;return t+n*(r>180||r<-180?r-360*Math.round(r/360):r)}(t.h,e.h,n),c:re(t.c,e.c,n),l:re(t.l,e.l,n),alpha:re(t.alpha,e.alpha,n)}}},Oe=Object.freeze({__proto__:null,lab:be,hcl:we}),xe=function(){function t(e,n,r,i,o){f(this,t),this.type=e,this.operator=n,this.interpolation=r,this.input=i,this.labels=[],this.outputs=[];var s=!0,l=!1,u=void 0;try{for(var c,h=o[Symbol.iterator]();!(s=(c=h.next()).done);s=!0){var p=a(c.value,2),d=p[0],g=p[1];this.labels.push(d),this.outputs.push(g)}}catch(t){l=!0,u=t}finally{try{s||null==h.return||h.return()}finally{if(l)throw u}}}return p(t,[{key:"evaluate",value:function(e){var n=this.labels,r=this.outputs;if(1===n.length)return r[0].evaluate(e);var i=this.input.evaluate(e);if(i<=n[0])return r[0].evaluate(e);var o=n.length;if(i>=n[o-1])return r[o-1].evaluate(e);var a=Qt(n,i),s=n[a],l=n[a+1],u=t.interpolationFactor(this.interpolation,i,s,l),c=r[a].evaluate(e),h=r[a+1].evaluate(e);return"interpolate"===this.operator?ie[this.type.kind.toLowerCase()](c,h,u):"interpolate-hcl"===this.operator?we.reverse(we.interpolate(we.forward(c),we.forward(h),u)):be.reverse(be.interpolate(be.forward(c),be.forward(h),u))}},{key:"eachChild",value:function(t){t(this.input);var e=!0,n=!1,r=void 0;try{for(var i,o=this.outputs[Symbol.iterator]();!(e=(i=o.next()).done);e=!0){t(i.value)}}catch(t){n=!0,r=t}finally{try{e||null==o.return||o.return()}finally{if(n)throw r}}}},{key:"outputDefined",value:function(){return this.outputs.every(function(t){return t.outputDefined()})}},{key:"serialize",value:function(){var t;t="linear"===this.interpolation.name?["linear"]:"exponential"===this.interpolation.name?1===this.interpolation.base?["linear"]:["exponential",this.interpolation.base]:["cubic-bezier"].concat(this.interpolation.controlPoints);for(var e=[this.operator,t,this.input.serialize()],n=0;n<this.labels.length;n++)e.push(this.labels[n],this.outputs[n].serialize());return e}}],[{key:"interpolationFactor",value:function(t,e,n,r){var i=0;if("exponential"===t.name)i=Ee(e,t.base,n,r);else if("linear"===t.name)i=Ee(e,1,n,r);else if("cubic-bezier"===t.name){var o=t.controlPoints;i=new ee(o[0],o[1],o[2],o[3]).solve(Ee(e,1,n,r))}return i}},{key:"parse",value:function(e,n){var r,i=c(r=e)||o(r)||l(r)||s(),a=i[0],u=i[1],h=i[2],p=i.slice(3);if(!Array.isArray(u)||0===u.length)return n.error("Expected an interpolation type expression.",1);if("linear"===u[0])u={name:"linear"};else if("exponential"===u[0]){var f=u[1];if("number"!==typeof f)return n.error("Exponential interpolation requires a numeric base.",1,1);u={name:"exponential",base:f}}else{if("cubic-bezier"!==u[0])return n.error("Unknown interpolation type ".concat(String(u[0])),1,0);var d=u.slice(1);if(4!==d.length||d.some(function(t){return"number"!==typeof t||t<0||t>1}))return n.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);u={name:"cubic-bezier",controlPoints:d}}if(e.length-1<4)return n.error("Expected at least 4 arguments, but found only ".concat(e.length-1,"."));if((e.length-1)%2!==0)return n.error("Expected an even number of arguments.");if(!(h=n.parse(h,2,H)))return null;var g=[],y=null;"interpolate-hcl"===a||"interpolate-lab"===a?y=J:n.expectedType&&"value"!==n.expectedType.kind&&(y=n.expectedType);for(var m=0;m<p.length;m+=2){var v=p[m],_=p[m+1],b=m+3,w=m+4;if("number"!==typeof v)return n.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.',b);if(g.length&&g[g.length-1][0]>=v)return n.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',b);var O=n.parse(_,w,y);if(!O)return null;y=y||O.type,g.push([v,O])}return"number"===y.kind||"color"===y.kind||"array"===y.kind&&"number"===y.itemType.kind&&"number"===typeof y.N?new t(y,a,u,h,g):n.error("Type ".concat(it(y)," is not interpolatable."))}}]),t}();function Ee(t,e,n,r){var i=r-n,o=t-n;return 0===i?0:1===e?o/i:(Math.pow(e,o)-1)/(Math.pow(e,i)-1)}var Se=function(){function t(e,n){f(this,t),this.type=e,this.args=n}return p(t,[{key:"evaluate",value:function(t){var e,n=null,r=0,i=!0,o=!1,a=void 0;try{for(var s,l=this.args[Symbol.iterator]();!(i=(s=l.next()).done);i=!0){if(r++,(n=s.value.evaluate(t))&&n instanceof dt&&!n.available&&(e||(e=n.name),n=null,r===this.args.length&&(n=e)),null!==n)break}}catch(t){o=!0,a=t}finally{try{i||null==l.return||l.return()}finally{if(o)throw a}}return n}},{key:"eachChild",value:function(t){this.args.forEach(t)}},{key:"outputDefined",value:function(){return this.args.every(function(t){return t.outputDefined()})}},{key:"serialize",value:function(){var t=["coalesce"];return this.eachChild(function(e){t.push(e.serialize())}),t}}],[{key:"parse",value:function(e,n){if(e.length<2)return n.error("Expectected at least one argument.");var r=null,i=n.expectedType;i&&"value"!==i.kind&&(r=i);var o=[],a=!0,s=!1,l=void 0;try{for(var u,c=e.slice(1)[Symbol.iterator]();!(a=(u=c.next()).done);a=!0){var h=u.value,p=n.parse(h,1+o.length,r,void 0,{typeAnnotation:"omit"});if(!p)return null;r=r||p.type,o.push(p)}}catch(t){s=!0,l=t}finally{try{a||null==c.return||c.return()}finally{if(s)throw l}}return new t(i&&o.some(function(t){return at(i,t.type)})?Q:r,o)}}]),t}(),Ce=function(){function t(e,n){f(this,t),this.type=n.type,this.bindings=[].concat(e),this.result=n}return p(t,[{key:"evaluate",value:function(t){return this.result.evaluate(t)}},{key:"eachChild",value:function(t){var e=!0,n=!1,r=void 0;try{for(var i,o=this.bindings[Symbol.iterator]();!(e=(i=o.next()).done);e=!0){t(i.value[1])}}catch(t){n=!0,r=t}finally{try{e||null==o.return||o.return()}finally{if(n)throw r}}t(this.result)}},{key:"outputDefined",value:function(){return this.result.outputDefined()}},{key:"serialize",value:function(){var t=["let"],e=!0,n=!1,r=void 0;try{for(var i,o=this.bindings[Symbol.iterator]();!(e=(i=o.next()).done);e=!0){var s=a(i.value,2),l=s[0],u=s[1];t.push(l,u.serialize())}}catch(t){n=!0,r=t}finally{try{e||null==o.return||o.return()}finally{if(n)throw r}}return t.push(this.result.serialize()),t}}],[{key:"parse",value:function(e,n){if(e.length<4)return n.error("Expected at least 3 arguments, but found ".concat(e.length-1," instead."));for(var r=[],i=1;i<e.length-1;i+=2){var o=e[i];if("string"!==typeof o)return n.error("Expected string, but found ".concat(_(o)," instead."),i);if(/[^a-zA-Z0-9_]/.test(o))return n.error("Variable names must contain only alphanumeric characters or '_'.",i);var a=n.parse(e[i+1],i+1);if(!a)return null;r.push([o,a])}var s=n.parse(e[e.length-1],e.length-1,n.expectedType,r);return s?new t(r,s):null}}]),t}(),Te=function(){function t(e,n,r){f(this,t),this.type=e,this.index=n,this.input=r}return p(t,[{key:"evaluate",value:function(t){var e=this.index.evaluate(t),n=this.input.evaluate(t);if(e<0)throw new bt("Array index out of bounds: ".concat(e," < 0."));if(e>=n.length)throw new bt("Array index out of bounds: ".concat(e," > ").concat(n.length-1,"."));if(e!==Math.floor(e))throw new bt("Array index must be an integer, but found ".concat(e," instead."));return n[e]}},{key:"eachChild",value:function(t){t(this.index),t(this.input)}},{key:"outputDefined",value:function(){return!1}},{key:"serialize",value:function(){return["at",this.index.serialize(),this.input.serialize()]}}],[{key:"parse",value:function(e,n){if(3!==e.length)return n.error("Expected 2 arguments, but found ".concat(e.length-1," instead."));var r=n.parse(e[1],1,H),i=n.parse(e[2],2,rt(n.expectedType||Q));return r&&i?new t(i.type.itemType,r,i):null}}]),t}(),Ie=function(){function t(e,n){f(this,t),this.type=Z,this.needle=e,this.haystack=n}return p(t,[{key:"evaluate",value:function(t){var e=this.needle.evaluate(t),n=this.haystack.evaluate(t);if(!n)return!1;if(!lt(e,["boolean","string","number","null"]))throw new bt("Expected first argument to be of type boolean, string, number or null, but found ".concat(it(mt(e))," instead."));if(!lt(n,["string","array"]))throw new bt("Expected second argument to be of type array or string, but found ".concat(it(mt(n))," instead."));return n.indexOf(e)>=0}},{key:"eachChild",value:function(t){t(this.needle),t(this.haystack)}},{key:"outputDefined",value:function(){return!0}},{key:"serialize",value:function(){return["in",this.needle.serialize(),this.haystack.serialize()]}}],[{key:"parse",value:function(e,n){if(3!==e.length)return n.error("Expected 2 arguments, but found ".concat(e.length-1," instead."));var r=n.parse(e[1],1,Q),i=n.parse(e[2],2,Q);return r&&i?st(r.type,[Z,K,H,W,Q])?new t(r,i):n.error("Expected first argument to be of type boolean, string, number or null, but found ".concat(it(r.type)," instead")):null}}]),t}(),je=function(){function t(e,n,r){f(this,t),this.type=H,this.needle=e,this.haystack=n,this.fromIndex=r}return p(t,[{key:"evaluate",value:function(t){var e=this.needle.evaluate(t),n=this.haystack.evaluate(t);if(!lt(e,["boolean","string","number","null"]))throw new bt("Expected first argument to be of type boolean, string, number or null, but found ".concat(it(mt(e))," instead."));if(!lt(n,["string","array"]))throw new bt("Expected second argument to be of type array or string, but found ".concat(it(mt(n))," instead."));if(this.fromIndex){var r=this.fromIndex.evaluate(t);return n.indexOf(e,r)}return n.indexOf(e)}},{key:"eachChild",value:function(t){t(this.needle),t(this.haystack),this.fromIndex&&t(this.fromIndex)}},{key:"outputDefined",value:function(){return!1}},{key:"serialize",value:function(){if(null!=this.fromIndex&&void 0!==this.fromIndex){var t=this.fromIndex.serialize();return["index-of",this.needle.serialize(),this.haystack.serialize(),t]}return["index-of",this.needle.serialize(),this.haystack.serialize()]}}],[{key:"parse",value:function(e,n){if(e.length<=2||e.length>=5)return n.error("Expected 3 or 4 arguments, but found ".concat(e.length-1," instead."));var r=n.parse(e[1],1,Q),i=n.parse(e[2],2,Q);if(!r||!i)return null;if(!st(r.type,[Z,K,H,W,Q]))return n.error("Expected first argument to be of type boolean, string, number or null, but found ".concat(it(r.type)," instead"));if(4===e.length){var o=n.parse(e[3],3,H);return o?new t(r,i,o):null}return new t(r,i)}}]),t}(),Le=function(){function t(e,n,r,i,o,a){f(this,t),this.inputType=e,this.type=n,this.input=r,this.cases=i,this.outputs=o,this.otherwise=a}return p(t,[{key:"evaluate",value:function(t){var e=this.input.evaluate(t);return(mt(e)===this.inputType&&this.outputs[this.cases[e]]||this.otherwise).evaluate(t)}},{key:"eachChild",value:function(t){t(this.input),this.outputs.forEach(t),t(this.otherwise)}},{key:"outputDefined",value:function(){return this.outputs.every(function(t){return t.outputDefined()})&&this.otherwise.outputDefined()}},{key:"serialize",value:function(){var t=this,e=["match",this.input.serialize()],n=Object.keys(this.cases).sort(),r=[],i={},o=!0,s=!1,l=void 0;try{for(var u,c=n[Symbol.iterator]();!(o=(u=c.next()).done);o=!0){var h=u.value,p=i[this.cases[h]];void 0===p?(i[this.cases[h]]=r.length,r.push([this.cases[h],[h]])):r[p][1].push(h)}}catch(t){s=!0,l=t}finally{try{o||null==c.return||c.return()}finally{if(s)throw l}}for(var f=function(e){return"number"===t.inputType.kind?Number(e):e},d=0;d<r.length;d++){var g=a(r[d],2),y=g[0],m=g[1];1===m.length?e.push(f(m[0])):e.push(m.map(f)),e.push(this.outputs[y].serialize())}return e.push(this.otherwise.serialize()),e}}],[{key:"parse",value:function(e,n){if(e.length<5)return n.error("Expected at least 4 arguments, but found only ".concat(e.length-1,"."));if(e.length%2!==1)return n.error("Expected an even number of arguments.");var r,i;n.expectedType&&"value"!==n.expectedType.kind&&(i=n.expectedType);for(var o={},a=[],s=2;s<e.length-1;s+=2){var l=e[s],u=e[s+1];Array.isArray(l)||(l=[l]);var c=n.concat(s);if(0===l.length)return c.error("Expected at least one branch label.");var h=!0,p=!1,f=void 0;try{for(var d,g=l[Symbol.iterator]();!(h=(d=g.next()).done);h=!0){var y=d.value;if("number"!==typeof y&&"string"!==typeof y)return c.error("Branch labels must be numbers or strings.");if("number"===typeof y&&Math.abs(y)>Number.MAX_SAFE_INTEGER)return c.error("Branch labels must be integers no larger than ".concat(Number.MAX_SAFE_INTEGER,"."));if("number"===typeof y&&Math.floor(y)!==y)return c.error("Numeric branch labels must be integer values.");if(r){if(c.checkSubtype(r,mt(y)))return null}else r=mt(y);if("undefined"!==typeof o[String(y)])return c.error("Branch labels must be unique.");o[String(y)]=a.length}}catch(t){p=!0,f=t}finally{try{h||null==g.return||g.return()}finally{if(p)throw f}}var m=n.parse(u,s,i);if(!m)return null;i=i||m.type,a.push(m)}var v=n.parse(e[1],1,Q);if(!v)return null;var _=n.parse(e[e.length-1],e.length-1,i);return _?"value"!==v.type.kind&&n.concat(1).checkSubtype(r,v.type)?null:new t(r,i,v,o,a,_):null}}]),t}(),Re=function(){function t(e,n,r){f(this,t),this.type=e,this.branches=n,this.otherwise=r}return p(t,[{key:"evaluate",value:function(t){var e=!0,n=!1,r=void 0;try{for(var i,o=this.branches[Symbol.iterator]();!(e=(i=o.next()).done);e=!0){var s=a(i.value,2),l=s[0],u=s[1];if(l.evaluate(t))return u.evaluate(t)}}catch(t){n=!0,r=t}finally{try{e||null==o.return||o.return()}finally{if(n)throw r}}return this.otherwise.evaluate(t)}},{key:"eachChild",value:function(t){var e=!0,n=!1,r=void 0;try{for(var i,o=this.branches[Symbol.iterator]();!(e=(i=o.next()).done);e=!0){var s=a(i.value,2),l=s[0],u=s[1];t(l),t(u)}}catch(t){n=!0,r=t}finally{try{e||null==o.return||o.return()}finally{if(n)throw r}}t(this.otherwise)}},{key:"outputDefined",value:function(){return this.branches.every(function(t){var e=a(t,2);e[0];return e[1].outputDefined()})&&this.otherwise.outputDefined()}},{key:"serialize",value:function(){var t=["case"];return this.eachChild(function(e){t.push(e.serialize())}),t}}],[{key:"parse",value:function(e,n){if(e.length<4)return n.error("Expected at least 3 arguments, but found only ".concat(e.length-1,"."));if(e.length%2!==0)return n.error("Expected an odd number of arguments.");var r;n.expectedType&&"value"!==n.expectedType.kind&&(r=n.expectedType);for(var i=[],o=1;o<e.length-1;o+=2){var a=n.parse(e[o],o,Z);if(!a)return null;var s=n.parse(e[o+1],o+1,r);if(!s)return null;i.push([a,s]),r=r||s.type}var l=n.parse(e[e.length-1],e.length-1,r);return l?new t(r,i,l):null}}]),t}(),Pe=function(){function t(e,n,r,i){f(this,t),this.type=e,this.input=n,this.beginIndex=r,this.endIndex=i}return p(t,[{key:"evaluate",value:function(t){var e=this.input.evaluate(t),n=this.beginIndex.evaluate(t);if(!lt(e,["string","array"]))throw new bt("Expected first argument to be of type array or string, but found ".concat(it(mt(e))," instead."));if(this.endIndex){var r=this.endIndex.evaluate(t);return e.slice(n,r)}return e.slice(n)}},{key:"eachChild",value:function(t){t(this.input),t(this.beginIndex),this.endIndex&&t(this.endIndex)}},{key:"outputDefined",value:function(){return!1}},{key:"serialize",value:function(){if(null!=this.endIndex&&void 0!==this.endIndex){var t=this.endIndex.serialize();return["slice",this.input.serialize(),this.beginIndex.serialize(),t]}return["slice",this.input.serialize(),this.beginIndex.serialize()]}}],[{key:"parse",value:function(e,n){if(e.length<=2||e.length>=5)return n.error("Expected 3 or 4 arguments, but found ".concat(e.length-1," instead."));var r=n.parse(e[1],1,Q),i=n.parse(e[2],2,H);if(!r||!i)return null;if(!st(r.type,[rt(Q),K,Q]))return n.error("Expected first argument to be of type array or string, but found ".concat(it(r.type)," instead"));if(4===e.length){var o=n.parse(e[3],3,H);return o?new t(r.type,r,i,o):null}return new t(r.type,r,i)}}]),t}();function Ne(t,e){return"=="===t||"!="===t?"boolean"===e.kind||"string"===e.kind||"number"===e.kind||"null"===e.kind||"value"===e.kind:"string"===e.kind||"number"===e.kind||"value"===e.kind}function Me(t,e,n,r){return 0===r.compare(e,n)}function Ae(t,e,n){var r="=="!==t&&"!="!==t;return function(){function i(t,e,n){f(this,i),this.type=Z,this.lhs=t,this.rhs=e,this.collator=n,this.hasUntypedArgument="value"===t.type.kind||"value"===e.type.kind}return p(i,[{key:"evaluate",value:function(i){var o=this.lhs.evaluate(i),a=this.rhs.evaluate(i);if(r&&this.hasUntypedArgument){var s=mt(o),l=mt(a);if(s.kind!==l.kind||"string"!==s.kind&&"number"!==s.kind)throw new bt('Expected arguments for "'.concat(t,'" to be (string, string) or (number, number), but found (').concat(s.kind,", ").concat(l.kind,") instead."))}if(this.collator&&!r&&this.hasUntypedArgument){var u=mt(o),c=mt(a);if("string"!==u.kind||"string"!==c.kind)return e(i,o,a)}return this.collator?n(i,o,a,this.collator.evaluate(i)):e(i,o,a)}},{key:"eachChild",value:function(t){t(this.lhs),t(this.rhs),this.collator&&t(this.collator)}},{key:"outputDefined",value:function(){return!0}},{key:"serialize",value:function(){var e=[t];return this.eachChild(function(t){e.push(t.serialize())}),e}}],[{key:"parse",value:function(t,e){if(3!==t.length&&4!==t.length)return e.error("Expected two or three arguments.");var n=t[0],o=e.parse(t[1],1,Q);if(!o)return null;if(!Ne(n,o.type))return e.concat(1).error('"'.concat(n,"\" comparisons are not supported for type '").concat(it(o.type),"'."));var a=e.parse(t[2],2,Q);if(!a)return null;if(!Ne(n,a.type))return e.concat(2).error('"'.concat(n,"\" comparisons are not supported for type '").concat(it(a.type),"'."));if(o.type.kind!==a.type.kind&&"value"!==o.type.kind&&"value"!==a.type.kind)return e.error("Cannot compare types '".concat(it(o.type),"' and '").concat(it(a.type),"'."));r&&("value"===o.type.kind&&"value"!==a.type.kind?o=new Ot(a.type,[o]):"value"!==o.type.kind&&"value"===a.type.kind&&(a=new Ot(o.type,[a])));var s=null;if(4===t.length){if("string"!==o.type.kind&&"string"!==a.type.kind&&"value"!==o.type.kind&&"value"!==a.type.kind)return e.error("Cannot use collator to compare non-string types.");if(!(s=e.parse(t[3],3,tt)))return null}return new i(o,a,s)}}]),i}()}var ke=Ae("==",function(t,e,n){return e===n},Me),Fe=Ae("!=",function(t,e,n){return e!==n},function(t,e,n,r){return!Me(0,e,n,r)}),De=Ae("<",function(t,e,n){return e<n},function(t,e,n,r){return r.compare(e,n)<0}),Ge=Ae(">",function(t,e,n){return e>n},function(t,e,n,r){return r.compare(e,n)>0}),Ue=Ae("<=",function(t,e,n){return e<=n},function(t,e,n,r){return r.compare(e,n)<=0}),ze=Ae(">=",function(t,e,n){return e>=n},function(t,e,n,r){return r.compare(e,n)>=0}),Be=function(){function t(e,n,r,i,o){f(this,t),this.type=K,this.number=e,this.locale=n,this.currency=r,this.minFractionDigits=i,this.maxFractionDigits=o}return p(t,[{key:"evaluate",value:function(t){return new Intl.NumberFormat(this.locale?this.locale.evaluate(t):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(t):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(t):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(t):void 0}).format(this.number.evaluate(t))}},{key:"eachChild",value:function(t){t(this.number),this.locale&&t(this.locale),this.currency&&t(this.currency),this.minFractionDigits&&t(this.minFractionDigits),this.maxFractionDigits&&t(this.maxFractionDigits)}},{key:"outputDefined",value:function(){return!1}},{key:"serialize",value:function(){var t={};return this.locale&&(t.locale=this.locale.serialize()),this.currency&&(t.currency=this.currency.serialize()),this.minFractionDigits&&(t["min-fraction-digits"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(t["max-fraction-digits"]=this.maxFractionDigits.serialize()),["number-format",this.number.serialize(),t]}}],[{key:"parse",value:function(e,n){if(3!==e.length)return n.error("Expected two arguments.");var r=n.parse(e[1],1,H);if(!r)return null;var i=e[2];if("object"!==_(i)||Array.isArray(i))return n.error("NumberFormat options argument must be an object.");var o=null;if(i.locale&&!(o=n.parse(i.locale,1,K)))return null;var a=null;if(i.currency&&!(a=n.parse(i.currency,1,K)))return null;var s=null;if(i["min-fraction-digits"]&&!(s=n.parse(i["min-fraction-digits"],1,H)))return null;var l=null;return i["max-fraction-digits"]&&!(l=n.parse(i["max-fraction-digits"],1,H))?null:new t(r,o,a,s,l)}}]),t}(),Ve={"==":ke,"!=":Fe,">":Ge,"<":De,">=":ze,"<=":Ue,array:Ot,at:Te,boolean:Ot,case:Re,coalesce:Se,collator:Lt,format:xt,image:Et,in:Ie,"index-of":je,interpolate:xe,"interpolate-hcl":xe,"interpolate-lab":xe,length:function(){function t(e){f(this,t),this.type=H,this.input=e}return p(t,[{key:"evaluate",value:function(t){var e=this.input.evaluate(t);if("string"===typeof e)return e.length;if(Array.isArray(e))return e.length;throw new bt("Expected value to be of type string or array, but found ".concat(it(mt(e))," instead."))}},{key:"eachChild",value:function(t){t(this.input)}},{key:"outputDefined",value:function(){return!1}},{key:"serialize",value:function(){var t=["length"];return this.eachChild(function(e){t.push(e.serialize())}),t}}],[{key:"parse",value:function(e,n){if(2!==e.length)return n.error("Expected 1 argument, but found ".concat(e.length-1," instead."));var r=n.parse(e[1],1);return r?"array"!==r.type.kind&&"string"!==r.type.kind&&"value"!==r.type.kind?n.error("Expected argument of type string or array, but found ".concat(it(r.type)," instead.")):new t(r):null}}]),t}(),let:Ce,literal:_t,match:Le,number:Ot,"number-format":Be,object:Ot,slice:Pe,step:te,string:Ot,"to-boolean":Ct,"to-color":Ct,"to-number":Ct,"to-string":Ct,var:Jt,within:Wt};function Ye(t,e){var n=a(e,4),r=n[0],i=n[1],o=n[2],s=n[3];r=r.evaluate(t),i=i.evaluate(t),o=o.evaluate(t);var l=s?s.evaluate(t):1,u=gt(r,i,o,l);if(u)throw new bt(u);return new ct(r/255*l,i/255*l,o/255*l,l)}function qe(t,e){return t in e}function Xe(t,e){var n=e[t];return"undefined"===typeof n?null:n}function We(t){return{type:t}}function He(t){return{result:"success",value:t}}function Ke(t){return{result:"error",value:t}}function Ze(t){return"data-driven"===t["property-type"]||"cross-faded-data-driven"===t["property-type"]}function Je(t){return!!t.expression&&t.expression.parameters.indexOf("zoom")>-1}function $e(t){return!!t.expression&&t.expression.interpolated}function Qe(t){return t instanceof Number?"number":t instanceof String?"string":t instanceof Boolean?"boolean":Array.isArray(t)?"array":null===t?"null":_(t)}function tn(t){return"object"===_(t)&&null!==t&&!Array.isArray(t)}function en(t){return t}function nn(t,e){var n,r,i,o="color"===e.type,a=t.stops&&"object"===_(t.stops[0][0]),s=a||void 0!==t.property,l=a||!s,u=t.type||($e(e)?"exponential":"interval");if(o&&((t=Y({},t)).stops&&(t.stops=t.stops.map(function(t){return[t[0],ct.parse(t[1])]})),t.default?t.default=ct.parse(t.default):t.default=ct.parse(e.default)),t.colorSpace&&"rgb"!==t.colorSpace&&!Oe[t.colorSpace])throw new Error("Unknown color space: ".concat(t.colorSpace));if("exponential"===u)n=sn;else if("interval"===u)n=an;else if("categorical"===u){n=on,r=Object.create(null);var c=!0,h=!1,p=void 0;try{for(var f,d=t.stops[Symbol.iterator]();!(c=(f=d.next()).done);c=!0){var g=f.value;r[g[0]]=g[1]}}catch(t){h=!0,p=t}finally{try{c||null==d.return||d.return()}finally{if(h)throw p}}i=_(t.stops[0][0])}else{if("identity"!==u)throw new Error('Unknown function type "'.concat(u,'"'));n=ln}if(a){for(var y={},m=[],v=0;v<t.stops.length;v++){var b=t.stops[v],w=b[0].zoom;void 0===y[w]&&(y[w]={zoom:w,type:t.type,property:t.property,default:t.default,stops:[]},m.push(w)),y[w].stops.push([b[0].value,b[1]])}for(var O=[],x=0;x<m.length;x++){var E=m[x];O.push([y[E].zoom,nn(y[E],e)])}var S={name:"linear"};return{kind:"composite",interpolationType:S,interpolationFactor:xe.interpolationFactor.bind(void 0,S),zoomStops:O.map(function(t){return t[0]}),evaluate:function(n,r){var i=n.zoom;return sn({stops:O,base:t.base},e,i).evaluate(i,r)}}}if(l){var C="exponential"===u?{name:"exponential",base:void 0!==t.base?t.base:1}:null;return{kind:"camera",interpolationType:C,interpolationFactor:xe.interpolationFactor.bind(void 0,C),zoomStops:t.stops.map(function(t){return t[0]}),evaluate:function(o){var a=o.zoom;return n(t,e,a,r,i)}}}return{kind:"source",evaluate:function(o,a){var s=a&&a.properties?a.properties[t.property]:void 0;return void 0===s?rn(t.default,e.default):n(t,e,s,r,i)}}}function rn(t,e,n){return void 0!==t?t:void 0!==e?e:void 0!==n?n:void 0}function on(t,e,n,r,i){return rn(_(n)===i?r[n]:void 0,t.default,e.default)}function an(t,e,n){if("number"!==Qe(n))return rn(t.default,e.default);var r=t.stops.length;if(1===r)return t.stops[0][1];if(n<=t.stops[0][0])return t.stops[0][1];if(n>=t.stops[r-1][0])return t.stops[r-1][1];var i=Qt(t.stops.map(function(t){return t[0]}),n);return t.stops[i][1]}function sn(t,e,n){var r=void 0!==t.base?t.base:1;if("number"!==Qe(n))return rn(t.default,e.default);var i=t.stops.length;if(1===i)return t.stops[0][1];if(n<=t.stops[0][0])return t.stops[0][1];if(n>=t.stops[i-1][0])return t.stops[i-1][1];var o=Qt(t.stops.map(function(t){return t[0]}),n),a=function(t,e,n,r){var i=r-n,o=t-n;return 0===i?0:1===e?o/i:(Math.pow(e,o)-1)/(Math.pow(e,i)-1)}(n,r,t.stops[o][0],t.stops[o+1][0]),s=t.stops[o][1],l=t.stops[o+1][1],u=ie[e.type]||en;if(t.colorSpace&&"rgb"!==t.colorSpace){var c=Oe[t.colorSpace];u=function(t,e){return c.reverse(c.interpolate(c.forward(t),c.forward(e),a))}}return"function"===typeof s.evaluate?{evaluate:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=s.evaluate.apply(void 0,e),i=l.evaluate.apply(void 0,e);if(void 0!==r&&void 0!==i)return u(r,i,a)}}:u(s,l,a)}function ln(t,e,n){return"color"===e.type?n=ct.parse(n):"formatted"===e.type?n=ft.fromString(n.toString()):"resolvedImage"===e.type?n=dt.fromString(n.toString()):Qe(n)===e.type||"enum"===e.type&&e.values[n]||(n=void 0),rn(n,t.default,e.default)}jt.register(Ve,{error:[{kind:"error"},[K],function(t,e){var n=a(e,1)[0];throw new bt(n.evaluate(t))}],typeof:[K,[Q],function(t,e){return it(mt(a(e,1)[0].evaluate(t)))}],"to-rgba":[rt(H,4),[J],function(t,e){return a(e,1)[0].evaluate(t).toArray()}],rgb:[J,[H,H,H],Ye],rgba:[J,[H,H,H,H],Ye],has:{type:Z,overloads:[[[K],function(t,e){return qe(a(e,1)[0].evaluate(t),t.properties())}],[[K,$],function(t,e){var n=a(e,2),r=n[0],i=n[1];return qe(r.evaluate(t),i.evaluate(t))}]]},get:{type:Q,overloads:[[[K],function(t,e){return Xe(a(e,1)[0].evaluate(t),t.properties())}],[[K,$],function(t,e){var n=a(e,2),r=n[0],i=n[1];return Xe(r.evaluate(t),i.evaluate(t))}]]},"feature-state":[Q,[K],function(t,e){return Xe(a(e,1)[0].evaluate(t),t.featureState||{})}],properties:[$,[],function(t){return t.properties()}],"geometry-type":[K,[],function(t){return t.geometryType()}],id:[Q,[],function(t){return t.id()}],zoom:[H,[],function(t){return t.globals.zoom}],"heatmap-density":[H,[],function(t){return t.globals.heatmapDensity||0}],"line-progress":[H,[],function(t){return t.globals.lineProgress||0}],"sky-radial-progress":[H,[],function(t){return t.globals.skyRadialProgress||0}],accumulated:[Q,[],function(t){return void 0===t.globals.accumulated?null:t.globals.accumulated}],"+":[H,We(H),function(t,e){var n=0,r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done);r=!0){n+=a.value.evaluate(t)}}catch(t){i=!0,o=t}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}],"*":[H,We(H),function(t,e){var n=1,r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done);r=!0){n*=a.value.evaluate(t)}}catch(t){i=!0,o=t}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}],"-":{type:H,overloads:[[[H,H],function(t,e){var n=a(e,2),r=n[0],i=n[1];return r.evaluate(t)-i.evaluate(t)}],[[H],function(t,e){return-a(e,1)[0].evaluate(t)}]]},"/":[H,[H,H],function(t,e){var n=a(e,2),r=n[0],i=n[1];return r.evaluate(t)/i.evaluate(t)}],"%":[H,[H,H],function(t,e){var n=a(e,2),r=n[0],i=n[1];return r.evaluate(t)%i.evaluate(t)}],ln2:[H,[],function(){return Math.LN2}],pi:[H,[],function(){return Math.PI}],e:[H,[],function(){return Math.E}],"^":[H,[H,H],function(t,e){var n=a(e,2),r=n[0],i=n[1];return Math.pow(r.evaluate(t),i.evaluate(t))}],sqrt:[H,[H],function(t,e){var n=a(e,1)[0];return Math.sqrt(n.evaluate(t))}],log10:[H,[H],function(t,e){var n=a(e,1)[0];return Math.log(n.evaluate(t))/Math.LN10}],ln:[H,[H],function(t,e){var n=a(e,1)[0];return Math.log(n.evaluate(t))}],log2:[H,[H],function(t,e){var n=a(e,1)[0];return Math.log(n.evaluate(t))/Math.LN2}],sin:[H,[H],function(t,e){var n=a(e,1)[0];return Math.sin(n.evaluate(t))}],cos:[H,[H],function(t,e){var n=a(e,1)[0];return Math.cos(n.evaluate(t))}],tan:[H,[H],function(t,e){var n=a(e,1)[0];return Math.tan(n.evaluate(t))}],asin:[H,[H],function(t,e){var n=a(e,1)[0];return Math.asin(n.evaluate(t))}],acos:[H,[H],function(t,e){var n=a(e,1)[0];return Math.acos(n.evaluate(t))}],atan:[H,[H],function(t,e){var n=a(e,1)[0];return Math.atan(n.evaluate(t))}],min:[H,We(H),function(t,e){return Math.min.apply(Math,i(e.map(function(e){return e.evaluate(t)})))}],max:[H,We(H),function(t,e){return Math.max.apply(Math,i(e.map(function(e){return e.evaluate(t)})))}],abs:[H,[H],function(t,e){var n=a(e,1)[0];return Math.abs(n.evaluate(t))}],round:[H,[H],function(t,e){var n=a(e,1)[0].evaluate(t);return n<0?-Math.round(-n):Math.round(n)}],floor:[H,[H],function(t,e){var n=a(e,1)[0];return Math.floor(n.evaluate(t))}],ceil:[H,[H],function(t,e){var n=a(e,1)[0];return Math.ceil(n.evaluate(t))}],"filter-==":[Z,[K,Q],function(t,e){var n=a(e,2),r=n[0],i=n[1];return t.properties()[r.value]===i.value}],"filter-id-==":[Z,[Q],function(t,e){var n=a(e,1)[0];return t.id()===n.value}],"filter-type-==":[Z,[K],function(t,e){var n=a(e,1)[0];return t.geometryType()===n.value}],"filter-<":[Z,[K,Q],function(t,e){var n=a(e,2),r=n[0],i=n[1],o=t.properties()[r.value],s=i.value;return _(o)===_(s)&&o<s}],"filter-id-<":[Z,[Q],function(t,e){var n=a(e,1)[0],r=t.id(),i=n.value;return _(r)===_(i)&&r<i}],"filter->":[Z,[K,Q],function(t,e){var n=a(e,2),r=n[0],i=n[1],o=t.properties()[r.value],s=i.value;return _(o)===_(s)&&o>s}],"filter-id->":[Z,[Q],function(t,e){var n=a(e,1)[0],r=t.id(),i=n.value;return _(r)===_(i)&&r>i}],"filter-<=":[Z,[K,Q],function(t,e){var n=a(e,2),r=n[0],i=n[1],o=t.properties()[r.value],s=i.value;return _(o)===_(s)&&o<=s}],"filter-id-<=":[Z,[Q],function(t,e){var n=a(e,1)[0],r=t.id(),i=n.value;return _(r)===_(i)&&r<=i}],"filter->=":[Z,[K,Q],function(t,e){var n=a(e,2),r=n[0],i=n[1],o=t.properties()[r.value],s=i.value;return _(o)===_(s)&&o>=s}],"filter-id->=":[Z,[Q],function(t,e){var n=a(e,1)[0],r=t.id(),i=n.value;return _(r)===_(i)&&r>=i}],"filter-has":[Z,[Q],function(t,e){return a(e,1)[0].value in t.properties()}],"filter-has-id":[Z,[],function(t){return null!==t.id()&&void 0!==t.id()}],"filter-type-in":[Z,[rt(K)],function(t,e){return a(e,1)[0].value.indexOf(t.geometryType())>=0}],"filter-id-in":[Z,[rt(Q)],function(t,e){return a(e,1)[0].value.indexOf(t.id())>=0}],"filter-in-small":[Z,[K,rt(Q)],function(t,e){var n=a(e,2),r=n[0];return n[1].value.indexOf(t.properties()[r.value])>=0}],"filter-in-large":[Z,[K,rt(Q)],function(t,e){var n=a(e,2),r=n[0],i=n[1];return function(t,e,n,r){for(;n<=r;){var i=n+r>>1;if(e[i]===t)return!0;e[i]>t?r=i-1:n=i+1}return!1}(t.properties()[r.value],i.value,0,i.value.length-1)}],all:{type:Z,overloads:[[[Z,Z],function(t,e){var n=a(e,2),r=n[0],i=n[1];return r.evaluate(t)&&i.evaluate(t)}],[We(Z),function(t,e){var n=!0,r=!1,i=void 0;try{for(var o,a=e[Symbol.iterator]();!(n=(o=a.next()).done);n=!0){if(!o.value.evaluate(t))return!1}}catch(t){r=!0,i=t}finally{try{n||null==a.return||a.return()}finally{if(r)throw i}}return!0}]]},any:{type:Z,overloads:[[[Z,Z],function(t,e){var n=a(e,2),r=n[0],i=n[1];return r.evaluate(t)||i.evaluate(t)}],[We(Z),function(t,e){var n=!0,r=!1,i=void 0;try{for(var o,a=e[Symbol.iterator]();!(n=(o=a.next()).done);n=!0){if(o.value.evaluate(t))return!0}}catch(t){r=!0,i=t}finally{try{n||null==a.return||a.return()}finally{if(r)throw i}}return!1}]]},"!":[Z,[Z],function(t,e){return!a(e,1)[0].evaluate(t)}],"is-supported-script":[Z,[K],function(t,e){var n=a(e,1)[0],r=t.globals&&t.globals.isSupportedScript;return!r||r(n.evaluate(t))}],upcase:[K,[K],function(t,e){return a(e,1)[0].evaluate(t).toUpperCase()}],downcase:[K,[K],function(t,e){return a(e,1)[0].evaluate(t).toLowerCase()}],concat:[K,We(Q),function(t,e){return e.map(function(e){return vt(e.evaluate(t))}).join("")}],"resolved-locale":[K,[tt],function(t,e){return a(e,1)[0].evaluate(t).resolvedLocale()}]});var un=function(){function t(e,n){var r;f(this,t),this.expression=e,this._warningHistory={},this._evaluator=new It,this._defaultValue=n?"color"===(r=n).type&&tn(r.default)?new ct(0,0,0,0):"color"===r.type?ct.parse(r.default)||null:void 0===r.default?null:r.default:null,this._enumValues=n&&"enum"===n.type?n.values:null}return p(t,[{key:"evaluateWithoutErrorHandling",value:function(t,e,n,r,i,o){return this._evaluator.globals=t,this._evaluator.feature=e,this._evaluator.featureState=n,this._evaluator.canonical=r,this._evaluator.availableImages=i||null,this._evaluator.formattedSection=o,this.expression.evaluate(this._evaluator)}},{key:"evaluate",value:function(t,e,n,r,i,o){this._evaluator.globals=t,this._evaluator.feature=e||null,this._evaluator.featureState=n||null,this._evaluator.canonical=r,this._evaluator.availableImages=i||null,this._evaluator.formattedSection=o||null;try{var a=this.expression.evaluate(this._evaluator);if(null===a||void 0===a||"number"===typeof a&&a!==a)return this._defaultValue;if(this._enumValues&&!(a in this._enumValues))throw new bt("Expected value to be one of ".concat(Object.keys(this._enumValues).map(function(t){return JSON.stringify(t)}).join(", "),", but found ").concat(JSON.stringify(a)," instead."));return a}catch(t){return this._warningHistory[t.message]||(this._warningHistory[t.message]=!0,"undefined"!==typeof console&&console.warn(t.message)),this._defaultValue}}}]),t}();function cn(t){return Array.isArray(t)&&t.length>0&&"string"===typeof t[0]&&t[0]in Ve}function hn(t,e){var n=new $t(Ve,[],e?function(t){var e={color:J,string:K,number:H,enum:K,boolean:Z,formatted:et,resolvedImage:nt};if("array"===t.type)return rt(e[t.value]||Q,t.length);return e[t.type]}(e):void 0),r=n.parse(t,void 0,void 0,void 0,e&&"string"===e.type?{typeAnnotation:"coerce"}:void 0);return r?He(new un(r,e)):Ke(n.errors)}var pn=function(){function t(e,n){f(this,t),this.kind=e,this._styleExpression=n,this.isStateDependent="constant"!==e&&!Kt(n.expression)}return p(t,[{key:"evaluateWithoutErrorHandling",value:function(t,e,n,r,i,o){return this._styleExpression.evaluateWithoutErrorHandling(t,e,n,r,i,o)}},{key:"evaluate",value:function(t,e,n,r,i,o){return this._styleExpression.evaluate(t,e,n,r,i,o)}}]),t}(),fn=function(){function t(e,n,r,i){f(this,t),this.kind=e,this.zoomStops=r,this._styleExpression=n,this.isStateDependent="camera"!==e&&!Kt(n.expression),this.interpolationType=i}return p(t,[{key:"evaluateWithoutErrorHandling",value:function(t,e,n,r,i,o){return this._styleExpression.evaluateWithoutErrorHandling(t,e,n,r,i,o)}},{key:"evaluate",value:function(t,e,n,r,i,o){return this._styleExpression.evaluate(t,e,n,r,i,o)}},{key:"interpolationFactor",value:function(t,e,n){return this.interpolationType?xe.interpolationFactor(this.interpolationType,t,e,n):0}}]),t}();function dn(t,e){if("error"===(t=hn(t,e)).result)return t;var n=t.value.expression,r=Ht(n);if(!r&&!Ze(e))return Ke([new q("","data expressions not supported")]);var i=Zt(n,["zoom"]);if(!i&&!Je(e))return Ke([new q("","zoom expressions not supported")]);var o=function t(e){var n=null;if(e instanceof Ce)n=t(e.result);else if(e instanceof Se){var r=!0,i=!1,o=void 0;try{for(var a,s=e.args[Symbol.iterator]();!(r=(a=s.next()).done);r=!0){var l=a.value;if(n=t(l))break}}catch(t){i=!0,o=t}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}}else(e instanceof te||e instanceof xe)&&e.input instanceof jt&&"zoom"===e.input.name&&(n=e);if(n instanceof q)return n;e.eachChild(function(e){var r=t(e);r instanceof q?n=r:!n&&r?n=new q("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):n&&r&&n!==r&&(n=new q("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))});return n}(n);if(!o&&!i)return Ke([new q("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);if(o instanceof q)return Ke([o]);if(o instanceof xe&&!$e(e))return Ke([new q("",'"interpolate" expressions cannot be used with this property')]);if(!o)return He(new pn(r?"constant":"source",t.value));var a=o instanceof xe?o.interpolation:void 0;return He(new fn(r?"camera":"composite",t.value,o.labels,a))}var gn=function(){function t(e,n){f(this,t),this._parameters=e,this._specification=n,Y(this,nn(this._parameters,this._specification))}return p(t,null,[{key:"deserialize",value:function(e){return new t(e._parameters,e._specification)}},{key:"serialize",value:function(t){return{_parameters:t._parameters,_specification:t._specification}}}]),t}();function yn(t){return"object"===_(t)?["literal",t]:t}function mn(t,e){var n=t.stops;if(!n)return function(t,e){var n=["get",t.property];if(void 0===t.default)return"string"===e.type?["string",n]:n;if("enum"===e.type)return["match",n,Object.keys(e.values),n,t.default];var r=["color"===e.type?"to-color":e.type,n,yn(t.default)];return"array"===e.type&&r.splice(1,0,e.value,e.length||null),r}(t,e);var r=n&&"object"===_(n[0][0]),i=r||void 0!==t.property,o=r||!i;return n=n.map(function(t){return!i&&e.tokens&&"string"===typeof t[1]?[t[0],En(t[1])]:[t[0],yn(t[1])]}),r?function(t,e,n){for(var r={},i={},o=[],a=0;a<n.length;a++){var s=n[a],l=s[0].zoom;void 0===r[l]&&(r[l]={zoom:l,type:t.type,property:t.property,default:t.default},i[l]=[],o.push(l)),i[l].push([s[0].value,s[1]])}if("exponential"===xn({},e)){var u=[vn(t),["linear"],["zoom"]],c=!0,h=!1,p=void 0;try{for(var f,d=o[Symbol.iterator]();!(c=(f=d.next()).done);c=!0){var g=f.value,y=bn(r[g],e,i[g]);On(u,g,y,!1)}}catch(t){h=!0,p=t}finally{try{c||null==d.return||d.return()}finally{if(h)throw p}}return u}var m=["step",["zoom"]],v=!0,_=!1,b=void 0;try{for(var w,O=o[Symbol.iterator]();!(v=(w=O.next()).done);v=!0){var x=w.value,E=bn(r[x],e,i[x]);On(m,x,E,!0)}}catch(t){_=!0,b=t}finally{try{v||null==O.return||O.return()}finally{if(_)throw b}}return wn(m),m}(t,e,n):o?function(t,e,n){var r,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:["zoom"],o=xn(t,e),a=!1;if("interval"===o)r=["step",i],a=!0;else{if("exponential"!==o)throw new Error('Unknown zoom function type "'.concat(o,'"'));var s=void 0!==t.base?t.base:1;r=[vn(t),1===s?["linear"]:["exponential",s],i]}var l=!0,u=!1,c=void 0;try{for(var h,p=n[Symbol.iterator]();!(l=(h=p.next()).done);l=!0){var f=h.value;On(r,f[0],f[1],a)}}catch(t){u=!0,c=t}finally{try{l||null==p.return||p.return()}finally{if(u)throw c}}return wn(r),r}(t,e,n):bn(t,e,n)}function vn(t){switch(t.colorSpace){case"hcl":return"interpolate-hcl";case"lab":return"interpolate-lab";default:return"interpolate"}}function _n(t,e){var n,r,i=yn((n=t.default,r=e.default,void 0!==n?n:void 0!==r?r:void 0));return void 0===i&&"resolvedImage"===e.type?"":i}function bn(t,e,n){var r=xn(t,e),i=["get",t.property];if("categorical"===r&&"boolean"===typeof n[0][0]){var o=["case"],a=!0,s=!1,l=void 0;try{for(var u,c=n[Symbol.iterator]();!(a=(u=c.next()).done);a=!0){var h=u.value;o.push(["==",i,h[0]],h[1])}}catch(t){s=!0,l=t}finally{try{a||null==c.return||c.return()}finally{if(s)throw l}}return o.push(_n(t,e)),o}if("categorical"===r){var p=["match",i],f=!0,d=!1,g=void 0;try{for(var y,m=n[Symbol.iterator]();!(f=(y=m.next()).done);f=!0){var v=y.value;On(p,v[0],v[1],!1)}}catch(t){d=!0,g=t}finally{try{f||null==m.return||m.return()}finally{if(d)throw g}}return p.push(_n(t,e)),p}if("interval"===r){var _=["step",["number",i]],b=!0,w=!1,O=void 0;try{for(var x,E=n[Symbol.iterator]();!(b=(x=E.next()).done);b=!0){var S=x.value;On(_,S[0],S[1],!0)}}catch(t){w=!0,O=t}finally{try{b||null==E.return||E.return()}finally{if(w)throw O}}return wn(_),void 0===t.default?_:["case",["==",["typeof",i],"number"],_,yn(t.default)]}if("exponential"===r){var C=void 0!==t.base?t.base:1,T=[vn(t),1===C?["linear"]:["exponential",C],["number",i]],I=!0,j=!1,L=void 0;try{for(var R,P=n[Symbol.iterator]();!(I=(R=P.next()).done);I=!0){var N=R.value;On(T,N[0],N[1],!1)}}catch(t){j=!0,L=t}finally{try{I||null==P.return||P.return()}finally{if(j)throw L}}return void 0===t.default?T:["case",["==",["typeof",i],"number"],T,yn(t.default)]}throw new Error("Unknown property function type ".concat(r))}function wn(t){"step"===t[0]&&3===t.length&&(t.push(0),t.push(t[3]))}function On(t,e,n,r){t.length>3&&e===t[t.length-2]||(r&&2===t.length||t.push(e),t.push(n))}function xn(t,e){return t.type?t.type:e.expression.interpolated?"exponential":"interval"}function En(t){for(var e=["concat"],n=/{([^{}]+)}/g,r=0,i=n.exec(t);null!==i;i=n.exec(t)){var o=t.slice(r,n.lastIndex-i[0].length);r=n.lastIndex,o.length>0&&e.push(o),e.push(["get",i[1]])}if(1===e.length)return t;if(r<t.length)e.push(t.slice(r));else if(2===e.length)return["to-string",e[1]];return e}function Sn(t){if(!0===t||!1===t)return!0;if(!Array.isArray(t)||0===t.length)return!1;switch(t[0]){case"has":return t.length>=2&&"$id"!==t[1]&&"$type"!==t[1];case"in":return t.length>=3&&("string"!==typeof t[1]||Array.isArray(t[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return 3!==t.length||Array.isArray(t[1])||Array.isArray(t[2]);case"any":case"all":var e=!0,n=!1,r=void 0;try{for(var i,o=t.slice(1)[Symbol.iterator]();!(e=(i=o.next()).done);e=!0){var a=i.value;if(!Sn(a)&&"boolean"!==typeof a)return!1}}catch(t){n=!0,r=t}finally{try{e||null==o.return||o.return()}finally{if(n)throw r}}return!0;default:return!0}}var Cn={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function Tn(t){if(null===t||void 0===t)return{filter:function(){return!0},needGeometry:!1};Sn(t)||(t=jn(t));var e=hn(t,Cn);if("error"===e.result)throw new Error(e.value.map(function(t){return"".concat(t.key,": ").concat(t.message)}).join(", "));return{filter:function(t,n,r){return e.value.evaluate(t,n,{},r)},needGeometry:function t(e){if(!Array.isArray(e))return!1;if("within"===e[0])return!0;for(var n=1;n<e.length;n++)if(t(e[n]))return!0;return!1}(t)}}function In(t,e){return t<e?-1:t>e?1:0}function jn(t){if(!t)return!0;var e,n=t[0];return t.length<=1?"any"!==n:"=="===n?Ln(t[1],t[2],"=="):"!="===n?Nn(Ln(t[1],t[2],"==")):"<"===n||">"===n||"<="===n||">="===n?Ln(t[1],t[2],n):"any"===n?(e=t.slice(1),["any"].concat(e.map(jn))):"all"===n?["all"].concat(t.slice(1).map(jn)):"none"===n?["all"].concat(t.slice(1).map(jn).map(Nn)):"in"===n?Rn(t[1],t.slice(2)):"!in"===n?Nn(Rn(t[1],t.slice(2))):"has"===n?Pn(t[1]):"!has"===n?Nn(Pn(t[1])):"within"!==n||t}function Ln(t,e,n){switch(t){case"$type":return["filter-type-".concat(n),e];case"$id":return["filter-id-".concat(n),e];default:return["filter-".concat(n),t,e]}}function Rn(t,e){if(0===e.length)return!1;switch(t){case"$type":return["filter-type-in",["literal",e]];case"$id":return["filter-id-in",["literal",e]];default:return e.length>200&&!e.some(function(t){return _(t)!==_(e[0])})?["filter-in-large",t,["literal",e.sort(In)]]:["filter-in-small",t,["literal",e]]}}function Pn(t){switch(t){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",t]}}function Nn(t){return["!",t]}var Mn=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function An(t,e){var n={};for(var r in t)"ref"!==r&&(n[r]=t[r]);return Mn.forEach(function(t){t in e&&(n[t]=e[t])}),n}function kn(t){t=t.slice();for(var e=Object.create(null),n=0;n<t.length;n++)e[t[n].id]=t[n];for(var r=0;r<t.length;r++)"ref"in t[r]&&(t[r]=An(t[r],e[t[r].ref]));return t}var Fn=function t(e,n,r,i){f(this,t),this.message=(e?"".concat(e,": "):"")+r,i&&(this.identifier=i),null!==n&&void 0!==n&&n.__line__&&(this.line=n.__line__)},Dn=function t(e){f(this,t),this.error=e,this.message=e.message;var n=e.message.match(/line (\d+)/);this.line=n?parseInt(n[1],10):0};function Gn(t){var e=t.key,n=t.value;return n?[new Fn(e,n,"constants have been deprecated as of v8")]:[]}function Un(t){return t instanceof Number||t instanceof String||t instanceof Boolean?t.valueOf():t}function zn(t){if(Array.isArray(t))return t.map(zn);if(t instanceof Object&&!(t instanceof Number||t instanceof String||t instanceof Boolean)){var e={};for(var n in t)e[n]=zn(t[n]);return e}return Un(t)}function Bn(t){var e=t.key,n=t.value,r=t.valueSpec||{},i=t.objectElementValidators||{},o=t.style,a=t.styleSpec,s=[],l=Qe(n);if("object"!==l)return[new Fn(e,n,"object expected, ".concat(l," found"))];for(var u in n){var c=u.split(".")[0],h=r[c]||r["*"],p=void 0;if(i[c])p=i[c];else if(r[c])p=ar;else if(i["*"])p=i["*"];else{if(!r["*"]){s.push(new Fn(e,n[u],'unknown property "'.concat(u,'"')));continue}p=ar}s=s.concat(p({key:(e?"".concat(e,"."):e)+u,value:n[u],valueSpec:h,style:o,styleSpec:a,object:n,objectKey:u},n))}for(var f in r)i[f]||r[f].required&&void 0===r[f].default&&void 0===n[f]&&s.push(new Fn(e,n,'missing required property "'.concat(f,'"')));return s}function Vn(t){var e=t.value,n=t.valueSpec,r=t.style,i=t.styleSpec,o=t.key,a=t.arrayElementValidator||ar;if("array"!==Qe(e))return[new Fn(o,e,"array expected, ".concat(Qe(e)," found"))];if(n.length&&e.length!==n.length)return[new Fn(o,e,"array length ".concat(n.length," expected, length ").concat(e.length," found"))];if(n["min-length"]&&e.length<n["min-length"])return[new Fn(o,e,"array length at least ".concat(n["min-length"]," expected, length ").concat(e.length," found"))];var s={type:n.value,values:n.values,minimum:n.minimum,maximum:n.maximum};i.$version<7&&(s.function=n.function),"object"===Qe(n.value)&&(s=n.value);for(var l=[],u=0;u<e.length;u++)l=l.concat(a({array:e,arrayIndex:u,value:e[u],valueSpec:s,style:r,styleSpec:i,key:"".concat(o,"[").concat(u,"]")}));return l}function Yn(t){var e=t.key,n=t.value,r=t.valueSpec,i=Qe(n);if("number"===i&&n!==n&&(i="NaN"),"number"!==i)return[new Fn(e,n,"number expected, ".concat(i," found"))];if("minimum"in r){var o=r.minimum;if("array"===Qe(r.minimum)){var a=t.arrayIndex;o=r.minimum[a]}if(n<o)return[new Fn(e,n,"".concat(n," is less than the minimum value ").concat(o))]}if("maximum"in r){var s=r.maximum;if("array"===Qe(r.maximum)){var l=t.arrayIndex;s=r.maximum[l]}if(n>s)return[new Fn(e,n,"".concat(n," is greater than the maximum value ").concat(s))]}return[]}function qn(t){var e,n,r,i=t.valueSpec,o=Un(t.value.type),a={},s="categorical"!==o&&void 0===t.value.property,l=!s,u="array"===Qe(t.value.stops)&&"array"===Qe(t.value.stops[0])&&"object"===Qe(t.value.stops[0][0]),c=Bn({key:t.key,value:t.value,valueSpec:t.styleSpec.function,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{stops:function(t){if("identity"===o)return[new Fn(t.key,t.value,'identity function may not have a "stops" property')];var e=[],n=t.value;e=e.concat(Vn({key:t.key,value:n,valueSpec:t.valueSpec,style:t.style,styleSpec:t.styleSpec,arrayElementValidator:h})),"array"===Qe(n)&&0===n.length&&e.push(new Fn(t.key,n,"array must have at least one stop"));return e},default:function(t){return ar({key:t.key,value:t.value,valueSpec:i,style:t.style,styleSpec:t.styleSpec})}}});return"identity"===o&&s&&c.push(new Fn(t.key,t.value,'missing required property "property"')),"identity"===o||t.value.stops||c.push(new Fn(t.key,t.value,'missing required property "stops"')),"exponential"===o&&t.valueSpec.expression&&!$e(t.valueSpec)&&c.push(new Fn(t.key,t.value,"exponential functions not supported")),t.styleSpec.$version>=8&&(l&&!Ze(t.valueSpec)?c.push(new Fn(t.key,t.value,"property functions not supported")):s&&!Je(t.valueSpec)&&c.push(new Fn(t.key,t.value,"zoom functions not supported"))),"categorical"!==o&&!u||void 0!==t.value.property||c.push(new Fn(t.key,t.value,'"property" property is required')),c;function h(t){var e=[],o=t.value,s=t.key;if("array"!==Qe(o))return[new Fn(s,o,"array expected, ".concat(Qe(o)," found"))];if(2!==o.length)return[new Fn(s,o,"array length 2 expected, length ".concat(o.length," found"))];if(u){if("object"!==Qe(o[0]))return[new Fn(s,o,"object expected, ".concat(Qe(o[0])," found"))];if(void 0===o[0].zoom)return[new Fn(s,o,"object stop key must have zoom")];if(void 0===o[0].value)return[new Fn(s,o,"object stop key must have value")];if(r&&r>Un(o[0].zoom))return[new Fn(s,o[0].zoom,"stop zoom values must appear in ascending order")];Un(o[0].zoom)!==r&&(r=Un(o[0].zoom),n=void 0,a={}),e=e.concat(Bn({key:"".concat(s,"[0]"),value:o[0],valueSpec:{zoom:{}},style:t.style,styleSpec:t.styleSpec,objectElementValidators:{zoom:Yn,value:p}}))}else e=e.concat(p({key:"".concat(s,"[0]"),value:o[0],valueSpec:{},style:t.style,styleSpec:t.styleSpec},o));return cn(zn(o[1]))?e.concat([new Fn("".concat(s,"[1]"),o[1],"expressions are not allowed in function stops.")]):e.concat(ar({key:"".concat(s,"[1]"),value:o[1],valueSpec:i,style:t.style,styleSpec:t.styleSpec}))}function p(t,r){var s=Qe(t.value),l=Un(t.value),u=null!==t.value?t.value:r;if(e){if(s!==e)return[new Fn(t.key,u,"".concat(s," stop domain type must match previous stop domain type ").concat(e))]}else e=s;if("number"!==s&&"string"!==s&&"boolean"!==s)return[new Fn(t.key,u,"stop domain value must be a number, string, or boolean")];if("number"!==s&&"categorical"!==o){var c="number expected, ".concat(s," found");return Ze(i)&&void 0===o&&(c+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new Fn(t.key,u,c)]}return"categorical"!==o||"number"!==s||isFinite(l)&&Math.floor(l)===l?"categorical"!==o&&"number"===s&&void 0!==n&&l<n?[new Fn(t.key,u,"stop domain values must appear in ascending order")]:(n=l,"categorical"===o&&l in a?[new Fn(t.key,u,"stop domain values must be unique")]:(a[l]=!0,[])):[new Fn(t.key,u,"integer expected, found ".concat(l))]}}function Xn(t){var e=("property"===t.expressionContext?dn:hn)(zn(t.value),t.valueSpec);if("error"===e.result)return e.value.map(function(e){return new Fn("".concat(t.key).concat(e.key),t.value,e.message)});var n=e.value.expression||e.value._styleExpression.expression;if("property"===t.expressionContext&&"text-font"===t.propertyKey&&!n.outputDefined())return[new Fn(t.key,t.value,'Invalid data expression for "'.concat(t.propertyKey,'". Output values must be contained as literals within the expression.'))];if("property"===t.expressionContext&&"layout"===t.propertyType&&!Kt(n))return[new Fn(t.key,t.value,'"feature-state" data expressions are not supported with layout properties.')];if("filter"===t.expressionContext&&!Kt(n))return[new Fn(t.key,t.value,'"feature-state" data expressions are not supported with filters.')];if(t.expressionContext&&0===t.expressionContext.indexOf("cluster")){if(!Zt(n,["zoom","feature-state"]))return[new Fn(t.key,t.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if("cluster-initial"===t.expressionContext&&!Ht(n))return[new Fn(t.key,t.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function Wn(t){var e=t.key,n=t.value,r=t.valueSpec,i=[];return Array.isArray(r.values)?-1===r.values.indexOf(Un(n))&&i.push(new Fn(e,n,"expected one of [".concat(r.values.join(", "),"], ").concat(JSON.stringify(n)," found"))):-1===Object.keys(r.values).indexOf(Un(n))&&i.push(new Fn(e,n,"expected one of [".concat(Object.keys(r.values).join(", "),"], ").concat(JSON.stringify(n)," found"))),i}function Hn(t){return Sn(zn(t.value))?Xn(Y({},t,{expressionContext:"filter",valueSpec:{value:"boolean"}})):function t(e){var n=e.value;var r=e.key;if("array"!==Qe(n))return[new Fn(r,n,"array expected, ".concat(Qe(n)," found"))];var i=e.styleSpec;var o;var a=[];if(n.length<1)return[new Fn(r,n,"filter array must have at least 1 element")];a=a.concat(Wn({key:"".concat(r,"[0]"),value:n[0],valueSpec:i.filter_operator,style:e.style,styleSpec:e.styleSpec}));switch(Un(n[0])){case"<":case"<=":case">":case">=":n.length>=2&&"$type"===Un(n[1])&&a.push(new Fn(r,n,'"$type" cannot be use with operator "'.concat(n[0],'"')));case"==":case"!=":3!==n.length&&a.push(new Fn(r,n,'filter array for operator "'.concat(n[0],'" must have 3 elements')));case"in":case"!in":n.length>=2&&"string"!==(o=Qe(n[1]))&&a.push(new Fn("".concat(r,"[1]"),n[1],"string expected, ".concat(o," found")));for(var s=2;s<n.length;s++)o=Qe(n[s]),"$type"===Un(n[1])?a=a.concat(Wn({key:"".concat(r,"[").concat(s,"]"),value:n[s],valueSpec:i.geometry_type,style:e.style,styleSpec:e.styleSpec})):"string"!==o&&"number"!==o&&"boolean"!==o&&a.push(new Fn("".concat(r,"[").concat(s,"]"),n[s],"string, number, or boolean expected, ".concat(o," found")));break;case"any":case"all":case"none":for(var l=1;l<n.length;l++)a=a.concat(t({key:"".concat(r,"[").concat(l,"]"),value:n[l],style:e.style,styleSpec:e.styleSpec}));break;case"has":case"!has":o=Qe(n[1]),2!==n.length?a.push(new Fn(r,n,'filter array for "'.concat(n[0],'" operator must have 2 elements'))):"string"!==o&&a.push(new Fn("".concat(r,"[1]"),n[1],"string expected, ".concat(o," found")));break;case"within":o=Qe(n[1]),2!==n.length?a.push(new Fn(r,n,'filter array for "'.concat(n[0],'" operator must have 2 elements'))):"object"!==o&&a.push(new Fn("".concat(r,"[1]"),n[1],"object expected, ".concat(o," found")))}return a}(t)}function Kn(t,e){var n=t.key,r=t.style,i=t.styleSpec,o=t.value,a=t.objectKey,s=i["".concat(e,"_").concat(t.layerType)];if(!s)return[];var l=a.match(/^(.*)-transition$/);if("paint"===e&&l&&s[l[1]]&&s[l[1]].transition)return ar({key:n,value:o,valueSpec:i.transition,style:r,styleSpec:i});var u,c=t.valueSpec||s[a];if(!c)return[new Fn(n,o,'unknown property "'.concat(a,'"'))];if("string"===Qe(o)&&Ze(c)&&!c.tokens&&(u=/^{([^}]+)}$/.exec(o)))return[new Fn(n,o,'"'.concat(a,'" does not support interpolation syntax\n')+'Use an identity property function instead: `{ "type": "identity", "property": '.concat(JSON.stringify(u[1])," }`."))];var h=[];return"symbol"===t.layerType&&("text-field"===a&&r&&!r.glyphs&&h.push(new Fn(n,o,'use of "text-field" requires a style "glyphs" property')),"text-font"===a&&tn(zn(o))&&"identity"===Un(o.type)&&h.push(new Fn(n,o,'"text-font" does not support identity functions'))),h.concat(ar({key:t.key,value:o,valueSpec:c,style:r,styleSpec:i,expressionContext:"property",propertyType:e,propertyKey:a}))}function Zn(t){return Kn(t,"paint")}function Jn(t){return Kn(t,"layout")}function $n(t){var e=[],n=t.value,r=t.key,i=t.style,o=t.styleSpec;n.type||n.ref||e.push(new Fn(r,n,'either "type" or "ref" is required'));var a,s=Un(n.type),l=Un(n.ref);if(n.id)for(var u=Un(n.id),c=0;c<t.arrayIndex;c++){var h=i.layers[c];Un(h.id)===u&&e.push(new Fn(r,n.id,'duplicate layer id "'.concat(n.id,'", previously used at line ').concat(h.id.__line__)))}if("ref"in n)["type","source","source-layer","filter","layout"].forEach(function(t){t in n&&e.push(new Fn(r,n[t],'"'.concat(t,'" is prohibited for ref layers')))}),i.layers.forEach(function(t){Un(t.id)===l&&(a=t)}),a?a.ref?e.push(new Fn(r,n.ref,"ref cannot reference another ref layer")):s=Un(a.type):e.push(new Fn(r,n.ref,'ref layer "'.concat(l,'" not found')));else if("background"!==s&&"sky"!==s)if(n.source){var p=i.sources&&i.sources[n.source],f=p&&Un(p.type);p?"vector"===f&&"raster"===s?e.push(new Fn(r,n.source,'layer "'.concat(n.id,'" requires a raster source'))):"raster"===f&&"raster"!==s?e.push(new Fn(r,n.source,'layer "'.concat(n.id,'" requires a vector source'))):"vector"!==f||n["source-layer"]?"raster-dem"===f&&"hillshade"!==s?e.push(new Fn(r,n.source,"raster-dem source can only be used with layer type 'hillshade'.")):"line"!==s||!n.paint||!n.paint["line-gradient"]||"geojson"===f&&p.lineMetrics||e.push(new Fn(r,n,'layer "'.concat(n.id,'" specifies a line-gradient, which requires a GeoJSON source with `lineMetrics` enabled.'))):e.push(new Fn(r,n,'layer "'.concat(n.id,'" must specify a "source-layer"'))):e.push(new Fn(r,n.source,'source "'.concat(n.source,'" not found')))}else e.push(new Fn(r,n,'missing required property "source"'));return e=e.concat(Bn({key:r,value:n,valueSpec:o.layer,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{"*":function(){return[]},type:function(){return ar({key:"".concat(r,".type"),value:n.type,valueSpec:o.layer.type,style:t.style,styleSpec:t.styleSpec,object:n,objectKey:"type"})},filter:Hn,layout:function(t){return Bn({layer:n,key:t.key,value:t.value,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{"*":function(t){return Jn(Y({layerType:s},t))}}})},paint:function(t){return Bn({layer:n,key:t.key,value:t.value,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{"*":function(t){return Zn(Y({layerType:s},t))}}})}}}))}function Qn(t){var e=t.value,n=t.key,r=Qe(e);return"string"!==r?[new Fn(n,e,"string expected, ".concat(r," found"))]:[]}var tr={promoteId:function(t){var e=t.key,n=t.value;if("string"===Qe(n))return Qn({key:e,value:n});var r=[];for(var o in n)r.push.apply(r,i(Qn({key:"".concat(e,".").concat(o),value:n[o]})));return r}};function er(t){var e=t.value,n=t.key,r=t.styleSpec,o=t.style;if(!e.type)return[new Fn(n,e,'"type" is required')];var s,l=Un(e.type);switch(l){case"vector":case"raster":case"raster-dem":return s=Bn({key:n,value:e,valueSpec:r["source_".concat(l.replace("-","_"))],style:t.style,styleSpec:r,objectElementValidators:tr});case"geojson":if(s=Bn({key:n,value:e,valueSpec:r.source_geojson,style:o,styleSpec:r,objectElementValidators:tr}),e.cluster)for(var u in e.clusterProperties){var c,h,p=a(e.clusterProperties[u],2),f=p[0],d=p[1],g="string"===typeof f?[f,["accumulated"],["get",u]]:f;(c=s).push.apply(c,i(Xn({key:"".concat(n,".").concat(u,".map"),value:d,expressionContext:"cluster-map"}))),(h=s).push.apply(h,i(Xn({key:"".concat(n,".").concat(u,".reduce"),value:g,expressionContext:"cluster-reduce"})))}return s;case"video":return Bn({key:n,value:e,valueSpec:r.source_video,style:o,styleSpec:r});case"image":return Bn({key:n,value:e,valueSpec:r.source_image,style:o,styleSpec:r});case"canvas":return[new Fn(n,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return Wn({key:"".concat(n,".type"),value:e.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]},style:o,styleSpec:r})}}function nr(t){var e=t.value,n=t.styleSpec,r=n.light,i=t.style,o=[],a=Qe(e);if(void 0===e)return o;if("object"!==a)return o=o.concat([new Fn("light",e,"object expected, ".concat(a," found"))]);for(var s in e){var l=s.match(/^(.*)-transition$/);o=l&&r[l[1]]&&r[l[1]].transition?o.concat(ar({key:s,value:e[s],valueSpec:n.transition,style:i,styleSpec:n})):r[s]?o.concat(ar({key:s,value:e[s],valueSpec:r[s],style:i,styleSpec:n})):o.concat([new Fn(s,e[s],'unknown property "'.concat(s,'"'))])}return o}function rr(t){var e=t.value,n=t.key,r=t.style,i=t.styleSpec,o=i.terrain,a=[],s=Qe(e);if(void 0===e)return a;if("object"!==s)return a=a.concat([new Fn("terrain",e,"object expected, ".concat(s," found"))]);for(var l in e){var u=l.match(/^(.*)-transition$/);a=u&&o[u[1]]&&o[u[1]].transition?a.concat(ar({key:l,value:e[l],valueSpec:i.transition,style:r,styleSpec:i})):o[l]?a.concat(ar({key:l,value:e[l],valueSpec:o[l],style:r,styleSpec:i})):a.concat([new Fn(l,e[l],'unknown property "'.concat(l,'"'))])}if(e.source){var c=r.sources&&r.sources[e.source],h=c&&Un(c.type);c?"raster-dem"!==h&&a.push(new Fn(n,e.source,"terrain cannot be used with a source of type ".concat(h,', it only be used with a "raster-dem" source type'))):a.push(new Fn(n,e.source,'source "'.concat(e.source,'" not found')))}else a.push(new Fn(n,e,'terrain is missing required property "source"'));return a}function ir(t){var e=t.value,n=t.style,r=t.styleSpec,i=r.fog,o=[],a=Qe(e);if(void 0===e)return o;if("object"!==a)return o=o.concat([new Fn("fog",e,"object expected, ".concat(a," found"))]);for(var s in e){var l=s.match(/^(.*)-transition$/);o=l&&i[l[1]]&&i[l[1]].transition?o.concat(ar({key:s,value:e[s],valueSpec:r.transition,style:n,styleSpec:r})):i[s]?o.concat(ar({key:s,value:e[s],valueSpec:i[s],style:n,styleSpec:r})):o.concat([new Fn(s,e[s],'unknown property "'.concat(s,'"'))])}return o}var or={"*":function(){return[]},array:Vn,boolean:function(t){var e=t.value,n=t.key,r=Qe(e);return"boolean"!==r?[new Fn(n,e,"boolean expected, ".concat(r," found"))]:[]},number:Yn,color:function(t){var e=t.key,n=t.value,r=Qe(n);return"string"!==r?[new Fn(e,n,"color expected, ".concat(r," found"))]:null===ut.parseCSSColor(n)?[new Fn(e,n,'color expected, "'.concat(n,'" found'))]:[]},constants:Gn,enum:Wn,filter:Hn,function:qn,layer:$n,object:Bn,source:er,light:nr,terrain:rr,fog:ir,string:Qn,formatted:function(t){return 0===Qn(t).length?[]:Xn(t)},resolvedImage:function(t){return 0===Qn(t).length?[]:Xn(t)}};function ar(t){var e=t.value,n=t.valueSpec,r=t.styleSpec;return n.expression&&tn(Un(e))?qn(t):n.expression&&cn(zn(e))?Xn(t):n.type&&or[n.type]?or[n.type](t):Bn(Y({},t,{valueSpec:n.type?r[n.type]:n}))}function sr(t){var e=t.value,n=t.key,r=Qn(t);return r.length?r:(-1===e.indexOf("{fontstack}")&&r.push(new Fn(n,e,'"glyphs" url must include a "{fontstack}" token')),-1===e.indexOf("{range}")&&r.push(new Fn(n,e,'"glyphs" url must include a "{range}" token')),r)}function lr(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:b,n=[];return n=n.concat(ar({key:"",value:t,valueSpec:e.$root,styleSpec:e,style:t,objectElementValidators:{glyphs:sr,"*":function(){return[]}}})),t.constants&&(n=n.concat(Gn({key:"constants",value:t.constants,style:t,styleSpec:e}))),ur(n)}function ur(t){return[].concat(t).sort(function(t,e){return t.line-e.line})}function cr(t){return function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return ur(t.apply(this,n))}}lr.source=cr(er),lr.light=cr(nr),lr.terrain=cr(rr),lr.fog=cr(ir),lr.layer=cr($n),lr.filter=cr(Hn),lr.paintProperty=cr(Zn),lr.layoutProperty=cr(Jn);var hr=O(function(t,e){var n=function(){var t=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},e=[1,12],n=[1,13],r=[1,9],i=[1,10],o=[1,11],a=[1,14],s=[1,15],l=[14,18,22,24],u=[18,22],c=[22,24],h={trace:function(){},yy:{},symbols_:{error:2,JSONString:3,STRING:4,JSONNumber:5,NUMBER:6,JSONNullLiteral:7,NULL:8,JSONBooleanLiteral:9,TRUE:10,FALSE:11,JSONText:12,JSONValue:13,EOF:14,JSONObject:15,JSONArray:16,"{":17,"}":18,JSONMemberList:19,JSONMember:20,":":21,",":22,"[":23,"]":24,JSONElementList:25,$accept:0,$end:1},terminals_:{2:"error",4:"STRING",6:"NUMBER",8:"NULL",10:"TRUE",11:"FALSE",14:"EOF",17:"{",18:"}",21:":",22:",",23:"[",24:"]"},productions_:[0,[3,1],[5,1],[7,1],[9,1],[9,1],[12,2],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[15,2],[15,3],[20,3],[19,1],[19,3],[16,2],[16,3],[25,1],[25,3]],performAction:function(t,e,n,r,i,o,a){var s=o.length-1;switch(i){case 1:this.$=new String(t.replace(/\\(\\|")/g,"$1").replace(/\\n/g,"\n").replace(/\\r/g,"\r").replace(/\\t/g,"\t").replace(/\\v/g,"\v").replace(/\\f/g,"\f").replace(/\\b/g,"\b")),this.$.__line__=this._$.first_line;break;case 2:this.$=new Number(t),this.$.__line__=this._$.first_line;break;case 3:this.$=null;break;case 4:this.$=new Boolean(!0),this.$.__line__=this._$.first_line;break;case 5:this.$=new Boolean(!1),this.$.__line__=this._$.first_line;break;case 6:return this.$=o[s-1];case 13:this.$={},Object.defineProperty(this.$,"__line__",{value:this._$.first_line,enumerable:!1});break;case 14:case 19:this.$=o[s-1],Object.defineProperty(this.$,"__line__",{value:this._$.first_line,enumerable:!1});break;case 15:this.$=[o[s-2],o[s]];break;case 16:this.$={},this.$[o[s][0]]=o[s][1];break;case 17:this.$=o[s-2],o[s-2][o[s][0]]=o[s][1];break;case 18:this.$=[],Object.defineProperty(this.$,"__line__",{value:this._$.first_line,enumerable:!1});break;case 20:this.$=[o[s]];break;case 21:this.$=o[s-2],o[s-2].push(o[s])}},table:[{3:5,4:e,5:6,6:n,7:3,8:r,9:4,10:i,11:o,12:1,13:2,15:7,16:8,17:a,23:s},{1:[3]},{14:[1,16]},t(l,[2,7]),t(l,[2,8]),t(l,[2,9]),t(l,[2,10]),t(l,[2,11]),t(l,[2,12]),t(l,[2,3]),t(l,[2,4]),t(l,[2,5]),t([14,18,21,22,24],[2,1]),t(l,[2,2]),{3:20,4:e,18:[1,17],19:18,20:19},{3:5,4:e,5:6,6:n,7:3,8:r,9:4,10:i,11:o,13:23,15:7,16:8,17:a,23:s,24:[1,21],25:22},{1:[2,6]},t(l,[2,13]),{18:[1,24],22:[1,25]},t(u,[2,16]),{21:[1,26]},t(l,[2,18]),{22:[1,28],24:[1,27]},t(c,[2,20]),t(l,[2,14]),{3:20,4:e,20:29},{3:5,4:e,5:6,6:n,7:3,8:r,9:4,10:i,11:o,13:30,15:7,16:8,17:a,23:s},t(l,[2,19]),{3:5,4:e,5:6,6:n,7:3,8:r,9:4,10:i,11:o,13:31,15:7,16:8,17:a,23:s},t(u,[2,17]),t(u,[2,15]),t(c,[2,21])],defaultActions:{16:[2,6]},parseError:function(t,e){if(!e.recoverable)throw new Error(t);this.trace(t)},parse:function(t){var e=this,n=[0],r=[null],i=[],o=this.table,a="",s=0,l=0,u=1,c=i.slice.call(arguments,1),h=Object.create(this.lexer),p={yy:{}};for(var f in this.yy)Object.prototype.hasOwnProperty.call(this.yy,f)&&(p.yy[f]=this.yy[f]);h.setInput(t,p.yy),p.yy.lexer=h,p.yy.parser=this,"undefined"==typeof h.yylloc&&(h.yylloc={});var d=h.yylloc;i.push(d);var g=h.options&&h.options.ranges;"function"===typeof p.yy.parseError?this.parseError=p.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var y,m,v,_,b,w,O,x,E,S={};;){if(m=n[n.length-1],this.defaultActions[m]?v=this.defaultActions[m]:(null!==y&&"undefined"!=typeof y||(E=void 0,"number"!==typeof(E=h.lex()||u)&&(E=e.symbols_[E]||E),y=E),v=o[m]&&o[m][y]),"undefined"===typeof v||!v.length||!v[0]){var C="";for(b in x=[],o[m])this.terminals_[b]&&b>2&&x.push("'"+this.terminals_[b]+"'");C=h.showPosition?"Parse error on line "+(s+1)+":\n"+h.showPosition()+"\nExpecting "+x.join(", ")+", got '"+(this.terminals_[y]||y)+"'":"Parse error on line "+(s+1)+": Unexpected "+(y==u?"end of input":"'"+(this.terminals_[y]||y)+"'"),this.parseError(C,{text:h.match,token:this.terminals_[y]||y,line:h.yylineno,loc:d,expected:x})}if(v[0]instanceof Array&&v.length>1)throw new Error("Parse Error: multiple actions possible at state: "+m+", token: "+y);switch(v[0]){case 1:n.push(y),r.push(h.yytext),i.push(h.yylloc),n.push(v[1]),y=null,l=h.yyleng,a=h.yytext,s=h.yylineno,d=h.yylloc;break;case 2:if(w=this.productions_[v[1]][1],S.$=r[r.length-w],S._$={first_line:i[i.length-(w||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(w||1)].first_column,last_column:i[i.length-1].last_column},g&&(S._$.range=[i[i.length-(w||1)].range[0],i[i.length-1].range[1]]),"undefined"!==typeof(_=this.performAction.apply(S,[a,l,s,p.yy,v[1],r,i].concat(c))))return _;w&&(n=n.slice(0,-1*w*2),r=r.slice(0,-1*w),i=i.slice(0,-1*w)),n.push(this.productions_[v[1]][0]),r.push(S.$),i.push(S._$),O=o[n[n.length-2]][n[n.length-1]],n.push(O);break;case 3:return!0}}return!0}},p={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var o in i)this[o]=i[o];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),o=0;o<i.length;o++)if((n=this._input.match(this.rules[i[o]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=o,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[o])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(t,e,n,r){switch(n){case 0:break;case 1:return 6;case 2:return e.yytext=e.yytext.substr(1,e.yyleng-2),4;case 3:return 17;case 4:return 18;case 5:return 23;case 6:return 24;case 7:return 22;case 8:return 21;case 9:return 10;case 10:return 11;case 11:return 8;case 12:return 14;case 13:return"INVALID"}},rules:[/^(?:\s+)/,/^(?:(-?([0-9]|[1-9][0-9]+))(\.[0-9]+)?([eE][-+]?[0-9]+)?\b)/,/^(?:"(?:\\[\\"bfnrt/]|\\u[a-fA-F0-9]{4}|[^\\\0-\x09\x0a-\x1f"])*")/,/^(?:\{)/,/^(?:\})/,/^(?:\[)/,/^(?:\])/,/^(?:,)/,/^(?::)/,/^(?:true\b)/,/^(?:false\b)/,/^(?:null\b)/,/^(?:$)/,/^(?:.)/],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13],inclusive:!0}}};function f(){this.yy={}}return h.lexer=p,f.prototype=h,h.Parser=f,new f}();e.parser=n,e.Parser=n.Parser,e.parse=function(){return n.parse.apply(n,arguments)}});function pr(t){if(t instanceof String||"string"===typeof t||t instanceof r)try{return hr.parse(t.toString())}catch(t){throw new Dn(t)}return t}function fr(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:b,n=t;try{n=pr(n)}catch(t){return[t]}return lr(n,e)}new Set(["vector","raster","raster-dem"]);var dr={StyleExpression:un,isExpression:cn,isExpressionFilter:Sn,createExpression:hn,createPropertyExpression:dn,normalizePropertyExpression:function(t,e){if(tn(t))return new gn(t,e);if(cn(t)){var n=dn(t,e);if("error"===n.result)throw new Error(n.value.map(function(t){return"".concat(t.key,": ").concat(t.message)}).join(", "));return n.value}var r=t;return"string"===typeof t&&"color"===e.type&&(r=ct.parse(t)),{kind:"constant",evaluate:function(){return r}}},ZoomConstantExpression:pn,ZoomDependentExpression:fn,StylePropertyFunction:gn},gr={convertFunction:mn,createFunction:nn,isFunction:tn};fr.parsed=fr,fr.latest=fr}).call(e,n(159),n(306).Buffer)},function(t,e,n){"use strict";n.d(e,"b",function(){return a}),e.e=function(t){return t*Math.PI/180},n.d(e,"d",function(){return s}),e.c=l,e.f=function(t,e){for(var n=0,r=e.length;n<r;++n){var i=e[n];if(i<t&&n+1<r){var o=e[n]/e[n+1];return n+Math.log(e[n]/t)/Math.log(o)}}return r-1},e.a=h,e.g=function t(e,n,r,i){if(-1!==e.indexOf("\n")){for(var o=e.split("\n"),a=[],s=0,l=o.length;s<l;++s)a.push(t(o[s],n,r,i));return a.join("\n")}var u=r+","+n+","+e+","+i;var c=d[u];if(!c){var g=e.split(" ");if(g.length>1){var y=p();y.font=n;for(var m=y.measureText("M").width,v=m*r,_="",a=[],s=0,l=g.length;s<l;++s){var b=g[s],w=_+(_?" ":"")+b;f(w,i)<=v?_=w:(_&&a.push(_),_=b)}_&&a.push(_);for(var s=0,l=a.length;s<l&&l>1;++s){var O=a[s];if(f(O,i)<.35*v){var x=s>0?f(a[s-1],i):1/0,E=s<l-1?f(a[s+1],i):1/0;a.splice(s,1),l-=1,x<E?(a[s-1]+=" "+O,s-=1):a[s]=O+" "+a[s]}}for(var s=0,l=a.length-1;s<l;++s){var S=a[s],C=a[s+1];if(f(S,i)>.7*v&&f(C,i)<.6*v){var T=S.split(" "),I=T.pop();f(I,i)<.2*v&&(a[s]=T.join(" "),a[s+1]=I+" "+C),l-=1}}c=a.join("\n")}else c=e;c=h(c,i),d[u]=c}return c};var r=n(3),i=n(40),o=n(9),a="function"===typeof Object.assign?Object.assign:function(t,e){if(void 0===t||null===t)throw new TypeError("Cannot convert undefined or null to object");for(var n=Object(t),r=1,i=arguments.length;r<i;++r){var o=arguments[r];if(void 0!==o&&null!==o)for(var a in o)o.hasOwnProperty(a)&&(n[a]=o[a])}return n};var s=function(){for(var t=[],e=78271.51696402048;t.length<=24;e/=2)t.push(e);return t}();function l(t,e){if("undefined"!==typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"undefined"!==typeof OffscreenCanvas)return new OffscreenCanvas(t,e);var n=document.createElement("canvas");return n.width=t,n.height=e,n}var u,c=Array(256).join("\u200a");function h(t,e){if(e>=.05){for(var n="",r=t.split("\n"),i=c.slice(0,Math.round(e/.1)),o=0,a=r.length;o<a;++o)o>0&&(n+="\n"),n+=r[o].split("").join(i);return n}return t}function p(){return u||(u=l(1,1).getContext("2d")),u}function f(t,e){return p().measureText(t).width+(t.length-1)*e}var d={};i.o&&Object(o.listen)(i.o,r.a.CLEAR,function(){d={}})},function(t,e,n){"use strict";n.d(e,"a",function(){return y});var r,i=n(85),o=n(157),a=n(90),s=n(52),l=n(30),u=n(4),c=n(11),h=n(76),p=n(0),f=n(28),d=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),g={DEFAULT:"default",TRUNCATED:"truncated"},y=function(t){function e(e,n,r,i,o,a,s){var l=t.call(this,n,r,i,o,a,s)||this;return l.zoomifyImage_=null,l.tileSize_=e,l}return d(e,t),e.prototype.getImage=function(){if(this.zoomifyImage_)return this.zoomifyImage_;var e=t.prototype.getImage.call(this);if(this.state==l.a.LOADED){var n=this.tileSize_;if(e.width==n[0]&&e.height==n[1])return this.zoomifyImage_=e,e;var r=Object(c.a)(n[0],n[1]);return r.drawImage(e,0,0),this.zoomifyImage_=r.canvas,r.canvas}return e},e}(o.a),m=function(t){function e(e){var n=this,r=e,o=r.size,s=void 0!==r.tierSizeCalculation?r.tierSizeCalculation:g.DEFAULT,l=r.tilePixelRatio||1,c=o[0],d=o[1],m=[],v=r.tileSize||i.b,_=v*l;switch(s){case g.DEFAULT:for(;c>_||d>_;)m.push([Math.ceil(c/_),Math.ceil(d/_)]),_+=_;break;case g.TRUNCATED:for(var b=c,w=d;b>_||w>_;)m.push([Math.ceil(b/_),Math.ceil(w/_)]),b>>=1,w>>=1;break;default:Object(u.a)(!1,53)}m.push([1,1]),m.reverse();for(var O=[l],x=[0],E=1,S=m.length;E<S;E++)O.push(l<<E),x.push(m[E-1][0]*m[E-1][1]+x[E-1]);O.reverse();var C=new a.a({tileSize:v,extent:r.extent||[0,-d,c,0],resolutions:O}),T=r.url;T&&-1==T.indexOf("{TileGroup}")&&-1==T.indexOf("{tileIndex}")&&(T+="{TileGroup}/{z}-{x}-{y}.jpg");var I=Object(h.c)(T),j=v*l;var L=Object(h.b)(I.map(function(t){return function(e,n,r){if(e){var i=e[0],o=e[1],a=e[2],s=o+a*m[i][0],l={z:i,x:o,y:a,tileIndex:s,TileGroup:"TileGroup"+((s+x[i])/j|0)};return t.replace(/\{(\w+?)\}/g,function(t,e){return l[e]})}}})),R=y.bind(null,Object(f.d)(v*l));(n=t.call(this,{attributions:r.attributions,cacheSize:r.cacheSize,crossOrigin:r.crossOrigin,imageSmoothing:r.imageSmoothing,projection:r.projection,tilePixelRatio:l,reprojectionErrorThreshold:r.reprojectionErrorThreshold,tileClass:R,tileGrid:C,tileUrlFunction:L,transition:r.transition})||this).zDirection=r.zDirection;var P=L(C.getTileCoordForCoordAndResolution(Object(p.getCenter)(C.getExtent()),O[O.length-1]),1,null),N=new Image;return N.addEventListener("error",function(){j=v,this.changed()}.bind(n)),N.src=P,n}return d(e,t),e}(s.a);e.b=m},function(t,e,n){"use strict";n.d(e,"a",function(){return a});var r=n(4),i=n(5),o=this&&this.__spreadArray||function(t,e){for(var n=0,r=e.length,i=t.length;n<r;n++,i++)t[i]=e[n];return t},a={VERSION1:"version1",VERSION2:"version2",VERSION3:"version3"},s={};s[a.VERSION1]={level0:{supports:[],formats:[],qualities:["native"]},level1:{supports:["regionByPx","sizeByW","sizeByH","sizeByPct"],formats:["jpg"],qualities:["native"]},level2:{supports:["regionByPx","regionByPct","sizeByW","sizeByH","sizeByPct","sizeByConfinedWh","sizeByWh"],formats:["jpg","png"],qualities:["native","color","grey","bitonal"]}},s[a.VERSION2]={level0:{supports:[],formats:["jpg"],qualities:["default"]},level1:{supports:["regionByPx","sizeByW","sizeByH","sizeByPct"],formats:["jpg"],qualities:["default"]},level2:{supports:["regionByPx","regionByPct","sizeByW","sizeByH","sizeByPct","sizeByConfinedWh","sizeByDistortedWh","sizeByWh"],formats:["jpg","png"],qualities:["default","bitonal"]}},s[a.VERSION3]={level0:{supports:[],formats:["jpg"],qualities:["default"]},level1:{supports:["regionByPx","regionSquare","sizeByW","sizeByH","sizeByWh"],formats:["jpg"],qualities:["default"]},level2:{supports:["regionByPx","regionSquare","regionByPct","sizeByW","sizeByH","sizeByPct","sizeByConfinedWh","sizeByWh"],formats:["jpg","png"],qualities:["default"]}},s.none={none:{supports:[],formats:[],qualities:[]}};var l=/^https?:\/\/library\.stanford\.edu\/iiif\/image-api\/(?:1\.1\/)?compliance\.html#level[0-2]$/,u=/^https?:\/\/iiif\.io\/api\/image\/2\/level[0-2](?:\.json)?$/,c=/(^https?:\/\/iiif\.io\/api\/image\/3\/level[0-2](?:\.json)?$)|(^level[0-2]$)/;var h={};h[a.VERSION1]=function(t){var e=t.getComplianceLevelSupportedFeatures();return void 0===e&&(e=s[a.VERSION1].level0),{url:void 0===t.imageInfo["@id"]?void 0:t.imageInfo["@id"].replace(/\/?(?:info\.json)?$/g,""),supports:e.supports,formats:o(o([],e.formats),[void 0===t.imageInfo.formats?[]:t.imageInfo.formats]),qualities:o(o([],e.qualities),[void 0===t.imageInfo.qualities?[]:t.imageInfo.qualities]),resolutions:t.imageInfo.scale_factors,tileSize:void 0!==t.imageInfo.tile_width?void 0!==t.imageInfo.tile_height?[t.imageInfo.tile_width,t.imageInfo.tile_height]:[t.imageInfo.tile_width,t.imageInfo.tile_width]:void 0!=t.imageInfo.tile_height?[t.imageInfo.tile_height,t.imageInfo.tile_height]:void 0}},h[a.VERSION2]=function(t){var e=t.getComplianceLevelSupportedFeatures(),n=Array.isArray(t.imageInfo.profile)&&t.imageInfo.profile.length>1,r=n&&t.imageInfo.profile[1].supports?t.imageInfo.profile[1].supports:[],i=n&&t.imageInfo.profile[1].formats?t.imageInfo.profile[1].formats:[],a=n&&t.imageInfo.profile[1].qualities?t.imageInfo.profile[1].qualities:[];return{url:t.imageInfo["@id"].replace(/\/?(?:info\.json)?$/g,""),sizes:void 0===t.imageInfo.sizes?void 0:t.imageInfo.sizes.map(function(t){return[t.width,t.height]}),tileSize:void 0===t.imageInfo.tiles?void 0:[t.imageInfo.tiles.map(function(t){return t.width})[0],t.imageInfo.tiles.map(function(t){return void 0===t.height?t.width:t.height})[0]],resolutions:void 0===t.imageInfo.tiles?void 0:t.imageInfo.tiles.map(function(t){return t.scaleFactors})[0],supports:o(o([],e.supports),r),formats:o(o([],e.formats),i),qualities:o(o([],e.qualities),a)}},h[a.VERSION3]=function(t){var e=t.getComplianceLevelSupportedFeatures(),n=void 0===t.imageInfo.extraFormats?e.formats:o(o([],e.formats),t.imageInfo.extraFormats),r=void 0!==t.imageInfo.preferredFormats&&Array.isArray(t.imageInfo.preferredFormats)&&t.imageInfo.preferredFormats.length>0?t.imageInfo.preferredFormats.filter(function(t){return Object(i.f)(["jpg","png","gif"],t)}).reduce(function(t,e){return void 0===t&&Object(i.f)(n,e)?e:t},void 0):void 0;return{url:t.imageInfo.id,sizes:void 0===t.imageInfo.sizes?void 0:t.imageInfo.sizes.map(function(t){return[t.width,t.height]}),tileSize:void 0===t.imageInfo.tiles?void 0:[t.imageInfo.tiles.map(function(t){return t.width})[0],t.imageInfo.tiles.map(function(t){return t.height})[0]],resolutions:void 0===t.imageInfo.tiles?void 0:t.imageInfo.tiles.map(function(t){return t.scaleFactors})[0],supports:void 0===t.imageInfo.extraFeatures?e.supports:o(o([],e.supports),t.imageInfo.extraFeatures),formats:n,qualities:void 0===t.imageInfo.extraQualities?e.qualities:o(o([],e.qualities),t.imageInfo.extraQualities),preferredFormat:r}};var p=function(){function t(t){this.setImageInfo(t)}return t.prototype.setImageInfo=function(t){this.imageInfo="string"==typeof t?JSON.parse(t):t},t.prototype.getImageApiVersion=function(){if(void 0!==this.imageInfo){var t=this.imageInfo["@context"]||"ol-no-context";"string"==typeof t&&(t=[t]);for(var e=0;e<t.length;e++)switch(t[e]){case"http://library.stanford.edu/iiif/image-api/1.1/context.json":case"http://iiif.io/api/image/1/context.json":return a.VERSION1;case"http://iiif.io/api/image/2/context.json":return a.VERSION2;case"http://iiif.io/api/image/3/context.json":return a.VERSION3;case"ol-no-context":if(this.getComplianceLevelEntryFromProfile(a.VERSION1)&&this.imageInfo.identifier)return a.VERSION1}Object(r.a)(!1,61)}},t.prototype.getComplianceLevelEntryFromProfile=function(t){if(void 0!==this.imageInfo&&void 0!==this.imageInfo.profile)switch(void 0===t&&(t=this.getImageApiVersion()),t){case a.VERSION1:if(l.test(this.imageInfo.profile))return this.imageInfo.profile;break;case a.VERSION3:if(c.test(this.imageInfo.profile))return this.imageInfo.profile;break;case a.VERSION2:if("string"===typeof this.imageInfo.profile&&u.test(this.imageInfo.profile))return this.imageInfo.profile;if(Array.isArray(this.imageInfo.profile)&&this.imageInfo.profile.length>0&&"string"===typeof this.imageInfo.profile[0]&&u.test(this.imageInfo.profile[0]))return this.imageInfo.profile[0]}},t.prototype.getComplianceLevelFromProfile=function(t){var e=this.getComplianceLevelEntryFromProfile(t);if(void 0!==e){var n=e.match(/level[0-2](?:\.json)?$/g);return Array.isArray(n)?n[0].replace(".json",""):void 0}},t.prototype.getComplianceLevelSupportedFeatures=function(){if(void 0!==this.imageInfo){var t=this.getImageApiVersion(),e=this.getComplianceLevelFromProfile(t);return void 0===e?s.none.none:s[t][e]}},t.prototype.getTileSourceOptions=function(t){var e=t||{},n=this.getImageApiVersion();if(void 0!==n){var r=void 0===n?void 0:h[n](this);if(void 0!==r)return{url:r.url,version:n,size:[this.imageInfo.width,this.imageInfo.height],sizes:r.sizes,format:void 0!==e.format&&Object(i.f)(r.formats,e.format)?e.format:void 0!==r.preferredFormat?r.preferredFormat:"jpg",supports:r.supports,quality:e.quality&&Object(i.f)(r.qualities,e.quality)?e.quality:Object(i.f)(r.qualities,"native")?"native":"default",resolutions:Array.isArray(r.resolutions)?r.resolutions.sort(function(t,e){return e-t}):void 0,tileSize:r.tileSize}}},t}();e.b=p},function(t,e,n){"use strict";e.a={CARMENTA_SERVER:"carmentaserver",GEOSERVER:"geoserver",MAPSERVER:"mapserver",QGIS:"qgis"}},function(t,e,n){"use strict";n.d(e,"a",function(){return a});var r,i=n(94),o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a='&#169; <a href="https://www.openstreetmap.org/copyright" target="_blank">OpenStreetMap</a> contributors.',s=function(t){function e(e){var n,r=e||{};n=void 0!==r.attributions?r.attributions:[a];var i=void 0!==r.crossOrigin?r.crossOrigin:"anonymous",o=void 0!==r.url?r.url:"https://{a-c}.tile.openstreetmap.org/{z}/{x}/{y}.png";return t.call(this,{attributions:n,attributionsCollapsible:!1,cacheSize:r.cacheSize,crossOrigin:i,imageSmoothing:r.imageSmoothing,maxZoom:void 0!==r.maxZoom?r.maxZoom:19,opaque:void 0===r.opaque||r.opaque,reprojectionErrorThreshold:r.reprojectionErrorThreshold,tileLoadFunction:r.tileLoadFunction,transition:r.transition,url:o,wrapX:r.wrapX,zDirection:r.zDirection})||this}return o(e,t),e}(i.a);e.b=s},function(t,e,n){"use strict";var r,i=n(163),o=n(27),a=n(164),s=n(53),l=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),u=[null,"http://www.opengis.net/ows/1.1"],c=Object(o.r)(u,{ServiceIdentification:Object(o.n)(function(t,e){return Object(o.u)({},x,t,e)}),ServiceProvider:Object(o.n)(function(t,e){return Object(o.u)({},E,t,e)}),OperationsMetadata:Object(o.n)(function(t,e){return Object(o.u)({},_,t,e)})}),h=function(t){function e(){return t.call(this)||this}return l(e,t),e.prototype.readFromNode=function(t){var e=Object(o.u)({},c,t,[]);return e||null},e}(i.a),p=Object(o.r)(u,{DeliveryPoint:Object(o.n)(s.h),City:Object(o.n)(s.h),AdministrativeArea:Object(o.n)(s.h),PostalCode:Object(o.n)(s.h),Country:Object(o.n)(s.h),ElectronicMailAddress:Object(o.n)(s.h)}),f=Object(o.r)(u,{Value:Object(o.m)(function(t,e){return Object(s.h)(t)})}),d=Object(o.r)(u,{AllowedValues:Object(o.n)(function(t,e){return Object(o.u)({},f,t,e)})}),g=Object(o.r)(u,{Phone:Object(o.n)(function(t,e){return Object(o.u)({},b,t,e)}),Address:Object(o.n)(function(t,e){return Object(o.u)({},p,t,e)})}),y=Object(o.r)(u,{HTTP:Object(o.n)(function(t,e){return Object(o.u)({},m,t,e)})}),m=Object(o.r)(u,{Get:Object(o.m)(function(t,e){var n=Object(a.a)(t);if(!n)return;return Object(o.u)({href:n},w,t,e)}),Post:void 0}),v=Object(o.r)(u,{DCP:Object(o.n)(function(t,e){return Object(o.u)({},y,t,e)})}),_=Object(o.r)(u,{Operation:function(t,e){var n=t.getAttribute("name"),r=Object(o.u)({},v,t,e);if(!r)return;e[e.length-1][n]=r}}),b=Object(o.r)(u,{Voice:Object(o.n)(s.h),Facsimile:Object(o.n)(s.h)}),w=Object(o.r)(u,{Constraint:Object(o.m)(function(t,e){var n=t.getAttribute("name");if(!n)return;return Object(o.u)({name:n},d,t,e)})}),O=Object(o.r)(u,{IndividualName:Object(o.n)(s.h),PositionName:Object(o.n)(s.h),ContactInfo:Object(o.n)(function(t,e){return Object(o.u)({},g,t,e)})}),x=Object(o.r)(u,{Abstract:Object(o.n)(s.h),AccessConstraints:Object(o.n)(s.h),Fees:Object(o.n)(s.h),Title:Object(o.n)(s.h),ServiceTypeVersion:Object(o.n)(s.h),ServiceType:Object(o.n)(s.h)}),E=Object(o.r)(u,{ProviderName:Object(o.n)(s.h),ProviderSite:Object(o.n)(a.a),ServiceContact:Object(o.n)(function(t,e){return Object(o.u)({},O,t,e)})});e.a=h},function(t,e,n){"use strict";var r,i=n(78),o=n(4),a=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),s=function(t){function e(e,n){var r=t.call(this,e)||this;return r.conditions=n,Object(o.a)(r.conditions.length>=2,57),r}return a(e,t),e}(i.a);e.a=s},function(t,e,n){"use strict";n(130),n(25),n(69),n(15),n(370),n(191),n(63),n(103),n(120),n(157),n(156);var r=n(154);n.d(e,"a",function(){return r.a});n(108),n(187),n(135),n(24),n(41),n(83),n(134),n(75),n(116),n(136),n(149),n(213),n(212);var i=n(84);n.d(e,"b",function(){return i.a});n(6)},function(t,e,n){"use strict";n.d(e,"a",function(){return c});var r=n(29);n(99);function i(t){"@babel/helpers - typeof";return(i="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function o(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function a(t,e,n){return(a="undefined"!==typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=s(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(n):i.value}})(t,e,n||t)}function s(t){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function l(t,e){return(l=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function u(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}var c=function(t){function e(t){var n;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r,o,a,s=t||{};s.collapsed=!0===s.collapsed,a=document.createElement("span"),s.collapsed?a.innerHTML="\xbb":a.innerHTML="\xab";var l=document.createElement("button");l.type="button",l.title="Compass",l.appendChild(a);var c=document.createElement("div");c.className="ol-rotation ol-control ol-unselectable";var h=document.createElement("span");h.innerHTML="&#176",h.className="ol-degree";var p=document.createElement("input");p.id="rotationText",p.type="text",p.value=0,p.maxLength=5,p.size=1;var f=document.createElement("input");f.id="rotation",f.type="range",f.min=-180,f.max=180,f.value=0,f.step=1,r=s.resetTipLabel?s.resetTipLabel:"Reset rotation",o='<i class="fa fa-repeat" aria-hidden="true"></i>',(a=document.createElement("span")).innerHTML=o;var d=document.createElement("button");d.type="button",d.title=r,d.appendChild(a),r=s.flipHorizontallyTipLabel?s.flipHorizontallyTipLabel:"Flip horizontally",o='<i class="fa fa-code" aria-hidden="true"></i>',(a=document.createElement("span")).innerHTML=o;var g=document.createElement("button");g.type="button",g.title=r,g.appendChild(a),r=s.flipVerticallyTipLabel?s.flipVerticallyTipLabel:"Flip vertically",o='<i class="fa fa-code fa-rotate-90" aria-hidden="true"></i>',(a=document.createElement("span")).innerHTML=o;var y=document.createElement("button");y.type="button",y.title=r,y.appendChild(a),s.collapsed||(c.appendChild(p),c.appendChild(h),c.appendChild(f),c.appendChild(d),c.appendChild(g),c.appendChild(y)),c.appendChild(l),(n=function(t,e){if(e&&("object"===i(e)||"function"===typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return u(t)}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,{element:c,target:s.target}))).collapsed=s.collapsed;var m=!1;n.collapseControl=function(t){t&&(t.preventDefault(),t.stopPropagation()),this.collapsed=!this.collapsed,this.collapsed?(c.removeChild(y),c.removeChild(g),c.removeChild(d),c.removeChild(f),c.removeChild(h),c.removeChild(p),l.firstChild.innerHTML="\xbb"):(c.insertBefore(y,c.firstChild),c.insertBefore(g,c.firstChild),c.insertBefore(d,c.firstChild),c.insertBefore(f,c.firstChild),c.insertBefore(h,c.firstChild),c.insertBefore(p,c.firstChild),l.firstChild.innerHTML="\xab")};return n.pmaViewport=s.pmaViewport,f.addEventListener("input",function(t){m=!0,t.preventDefault(),t.stopPropagation(),p.value=f.value,this.pmaViewport.setPosition({rotation:.0174532925*f.value}),m=!1}.bind(u(n)),!1),d.addEventListener("click",function(t){t.preventDefault(),t.stopPropagation(),p.value=0,f.value=0,this.pmaViewport.setPosition({rotation:0}),d.blur(),d.hideFocus=!0,d.style.outline="none"}.bind(u(n)),!1),l.addEventListener("click",n.collapseControl.bind(u(n)),!1),g.addEventListener("click",function(t){t.preventDefault(),t.stopPropagation(),this.pmaViewport.setFlip(!this.pmaViewport.getFlip().horizontally,this.pmaViewport.getFlip().vertically),this.pmaViewport.getFlip().horizontally?g.classList.add("selected"):g.classList.remove("selected"),g.blur(),g.hideFocus=!0,g.style.outline="none"}.bind(u(n)),!1),y.addEventListener("click",function(t){t.preventDefault(),t.stopPropagation(),this.pmaViewport.setFlip(this.pmaViewport.getFlip().horizontally,!this.pmaViewport.getFlip().vertically),this.pmaViewport.getFlip().vertically?y.classList.add("selected"):y.classList.remove("selected"),y.blur(),y.hideFocus=!0,y.style.outline="none"}.bind(u(n)),!1),p.addEventListener("input",function(t){m=!0,t.preventDefault(),t.stopPropagation();var e=p.value.replace(/[^\d-]/g,"");if("-"!=e){""==e&&(e=0);var n=parseInt(e),r=n%360;n=2*r%360-r,p.value=n,f.value=n,this.pmaViewport.setPosition({rotation:.0174532925*n}),m=!1}}.bind(u(n)),!1),n.pmaViewport.listen("viewchanged",function(t){if(!m){var e=Math.floor(this.pmaViewport.getPosition().rotation/.0174532925),n=e%360;e=2*n%360-n,p.value=e,f.value=e,this.pmaViewport.getFlip().horizontally?g.classList.add("selected"):g.classList.remove("selected"),this.pmaViewport.getFlip().vertically?y.classList.add("selected"):y.classList.remove("selected")}}.bind(u(n))),n}var n,s,c;return function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&l(t,e)}(e,r["Control"]),n=e,(s=[{key:"setMap",value:function(t){a(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"setMap",this).call(this,t)}},{key:"getCollapsed",value:function(){return this.collapsed}},{key:"setCollapsed",value:function(t){this.getCollapsed()!=t&&this.collapseControl()}}])&&o(n.prototype,s),c&&o(n,c),e}()},function(t,e,n){"use strict";n.d(e,"a",function(){return T});var r=n(29),i=n(237),o=n(0),a=n(49),s=n(93),l=n(50),u=n(15),c=n(25),h=n(123),p=n(10),f=n(81),d=n(152),g=n(165),y=n(167),m=n(373),v=n(41);function _(t){"@babel/helpers - typeof";return(_="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function b(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function w(t,e,n){return(w="undefined"!==typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=E(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(n):i.value}})(t,e,n||t)}function O(t,e){return(O=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function x(t,e,n,r){return(x="undefined"!==typeof Reflect&&Reflect.set?Reflect.set:function(t,e,n,r){var i,o=E(t,e);if(o){if((i=Object.getOwnPropertyDescriptor(o,e)).set)return i.set.call(r,n),!0;if(!i.writable)return!1}if(i=Object.getOwnPropertyDescriptor(r,e)){if(!i.writable)return!1;i.value=n,Object.defineProperty(r,e,i)}else!function(t,e,n){e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n}(r,e,n);return!0})(t,e,n,r)}function E(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=S(t)););return t}function S(t){return(S=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function C(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}var T=function(t){function e(t){var n;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=t||{},i=document.createElement("div");n=function(t,e){if(e&&("object"===_(e)||"function"===typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return C(t)}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,{element:i,target:r.target})),function(t,e,n,r,i){if(!x(t,e,n,r||t)&&i)throw new Error("failed to set property")}(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"render",n.updateBox.bind(C(n)),n),n.trackingFlag=!0===r.tracking,n.stateManager=r.stateManager?r.stateManager:null,n.stateManager?(n.stateManager.overview||(n.stateManager.overview={},n.stateManager.overview.collapsed=!!r.collapsed&&r.collapsed),n.collapsed_=!0===n.stateManager.overview.collapsed):n.collapsed_=!!r.collapsed&&r.collapsed,n.collapsible_=!r.collapsible||r.collapsible,n.collapsible_||(n.collapsed_=!1);var o=r.className?r.className:"ol-overview",a=r.tipLabel?r.tipLabel:"Overview map",s=r.collapseLabel?r.collapseLabel:"\xbb";n.collapseLabel_=document.createElement("span"),n.collapseLabel_.innerHTML=s;var l=r.label?r.label:"\xab";n.label_=document.createElement("span"),n.label_.innerHTML=l;var u=n.collapsible_&&!n.collapsed_?n.collapseLabel_:n.label_,c=document.createElement("button");c.type="button",c.title=a,c.appendChild(u),"ontouchstart"in document.documentElement?c.addEventListener("touchstart",n.buttonClk.bind(C(n)),!1):c.addEventListener("click",n.buttonClk.bind(C(n)),!1),n.ovmapDiv=document.createElement("div"),n.ovmapDiv.className="ol-overview-map";var h=o+" ol-unselectable ol-control"+(n.collapsed_&&n.collapsible_?" ol-collapsed":"")+(n.collapsible_?"":" ol-uncollapsible");i.className=h,i.appendChild(n.ovmapDiv),i.appendChild(c);var p=document.createElement("button");p.type="button",p.title="Enlarge",p.className="size",p.innerHTML="+","ontouchstart"in document.documentElement?p.addEventListener("touchstart",n.enlargeButtonClick.bind(C(n)),!1):p.addEventListener("click",n.enlargeButtonClick.bind(C(n)),!1),i.appendChild(p);var f=document.createElement("button");f.type="button",f.title="Shrink",f.className="size",f.innerHTML="-","ontouchstart"in document.documentElement?f.addEventListener("touchstart",n.shrinkButtonClick.bind(C(n)),!1):f.addEventListener("click",n.shrinkButtonClick.bind(C(n)),!1),i.appendChild(f);var d=document.createElement("button");return d.type="button",d.title="Enable tracking",d.className="size",d.innerHTML="\u2315","ontouchstart"in document.documentElement?d.addEventListener("touchstart",n.trackingButtonClick.bind(C(n)),!1):d.addEventListener("click",n.trackingButtonClick.bind(C(n)),!1),i.appendChild(d),n.trackingButton=d,n.featureSelect=null,n.eventKeys=[],n}var n,E,S;return function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&O(t,e)}(e,r["Control"]),n=e,(E=[{key:"getBoxSize",value:function(){if(this.masterMap){var t=o.getBottomLeft(this.masterMap.getView().getProjection().getExtent()),e=o.getTopRight(this.masterMap.getView().getProjection().getExtent());return[Math.abs((t[0]-e[0])/this.masterMap.getView().getMaxResolution()),Math.abs((e[1]-t[1])/this.masterMap.getView().getMaxResolution())]}return[0,0]}},{key:"createOverviewView",value:function(){var t=this.masterMap.getView().getProjection(),e=t.getExtent();return new i.b({projection:t,center:o.getCenter(e),showFullExtent:!0,maxResolution:1250,minResolution:1})}},{key:"setMap",value:function(t){if(t){var n=this.getMap();if(t!==n){n&&this.overviewMap.setTarget(null),w(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"setMap",this).call(this,t),this.masterMap=t;var r=this.getBoxSize(),h=1,g=t.getSize();(r[0]>g[0]/5||r[1]>g[1]/5)&&(h=2),r[0]/=h,r[1]/=h;var y=this.createOverviewView(),m=new a.a({source:new l.a({features:[new u.a({geometry:Object(p.d)(t.getView().calculateExtent(t.getSize()))})]}),style:new f.Style({stroke:new f.Stroke({width:2,color:"rgba(0, 60, 136, 1.0)"}),fill:new f.Fill({color:"rgba(0, 0, 0, 0.0)"})})}),_=new u.a({geometry:Object(p.d)(t.getView().calculateExtent(t.getSize()))});_.setStyle(new f.Style({fill:new f.Fill({color:"rgba(0, 0, 0, 0.4)"})}));var b=new a.a({source:new l.a({features:[_]}),visible:!1}),O=t.getLayers().item(0),x=t.getLayers().getArray().filter(function(t){return!0===t.get("active")});x.length>0&&(O=x[0]);var E=[new s.a({source:O.getSource()})];E.push(b),E.push(m),this.currentOverlayFeature=_;this.viewboxFeatures=[null,null,null,null];var S=Math.round(Math.sqrt(r[0]*r[0]+r[1]*r[1]));this.ovmapDiv.style.width=S+"px",this.ovmapDiv.style.height=S+"px",this.overviewMap=new i.a({controls:new c.a,interactions:new c.a,target:this.ovmapDiv,view:y,layers:E});var C=new d.a;this.format=C;this.simplifyOptions={tolerance:.01,highQuality:!1};var T={featureProjection:this.overviewMap.getView().getProjection()};this.formatOptions=T;var I=C.writeFeatureObject(this.currentOverlayFeature,T);this.currentOverlayFeatureJson=I;var j=[];j.push(new f.Style({stroke:new f.Stroke({width:1,color:"rgba(255, 0, 0, 1.0)"}),fill:new f.Fill({color:"rgba(0, 0, 0, 0.3)"})})),j.push(new f.Style({stroke:new f.Stroke({width:1,color:"rgba(0, 255, 255, 1.0)"}),fill:new f.Fill({color:"rgba(0, 0, 0, 0.2)"})})),j.push(new f.Style({stroke:new f.Stroke({width:1,color:"rgba(255, 215, 0, 1.0)"}),fill:new f.Fill({color:"rgba(0, 0, 0, 0.1)"})})),j.push(new f.Style({stroke:new f.Stroke({width:1,color:"rgba(0, 255, 0, 1.0)"}),fill:new f.Fill({color:"rgba(0, 0, 0, 0.0)"})})),this.featureStyle=j,this.vectorLayer=m,this.fogLayer=b;this.polling=0;this.pollingRate=10;var L=t.getView().getZoom();this.lastZoomValue=L;var R=this,P=this.overviewMap.on("singleclick",function(e){e.preventDefault(),t.getView().setCenter(e.coordinate)},this);this.eventKeys.push(P),P=this.overviewMap.on("pointermove",function(e){e.preventDefault();var n=!1;e.dragging?(R.featureSelect||(R.featureSelect=R.overviewMap.forEachFeatureAtPixel(e.pixel,function(t,e){return n=!0,t})),R.featureSelect&&t.getView().setCenter(e.coordinate)):R.featureSelect&&(R.featureSelect=null),n||(n=R.overviewMap.forEachFeatureAtPixel(e.pixel,function(t,e){return!0}));var r=e.map.getTargetElement();r.style.cursor=n?"move":""},this),this.eventKeys.push(P),P=t.getView().on("change:center",this.updateBox.bind(this),this),this.eventKeys.push(P),P=t.getView().on("change:resolution",this.updateBox.bind(this),this),this.eventKeys.push(P),P=t.getView().on("change:rotation",this.updateBox.bind(this),this),this.eventKeys.push(P),this.overviewMap.updateSize();var N=t.getView().getProjection().getExtent();this.overviewMap.getView().fit(N,this.overviewMap.getSize()),this.overviewMap.getView().setCenter(o.getCenter(N)),this.updateBox(),this.setTrackingEnabled(this.trackingFlag),this.masterView=this.masterMap.getView()}}else Object(v.b)(this.eventKeys)}},{key:"updateBox",value:function(){if(this.masterMap&&this.masterMap.isRendered()&&this.overviewMap.isRendered()){var t=this.masterMap.getView(),e=this.overviewMap.getView(),n=t.getRotation();e.setRotation(n);var r=this.masterMap.getSize(),i=t.getResolution(),a=r[0]*i*.5,s=r[1]*i*.5,l=t.getCenter(),c=l[0]-a,p=l[0]+a,d=[c,l[1]-s,p,l[1]+s],v=t.getProjection().getExtent(),_=o.getBottomLeft(v),b=o.getTopRight(v),w=o.getCenter(v),O=Math.abs(_[0]-b[0]),x=Math.abs(b[1]-_[1]),E=.5*Math.sqrt(O*O+x*x),S=[w[0]-E,w[1]-E,w[0]+E,w[1]+E],C=o.getIntersection(d,S),T=new h.Polygon([[[C[0],C[1]],[C[2],C[1]],[C[2],C[3]],[C[0],C[3]],[C[0],C[1]]]]);if(T.rotate(n,T.getInteriorPoint().getFirstCoordinate()),this.vectorLayer.getSource().getFeatures()[0].setGeometry(T),this.trackingFlag){var I;switch(!0){case Math.floor(t.getZoom())<3:return;case Math.floor(t.getZoom())<4:I=1;break;case Math.floor(t.getZoom())<6:I=2;break;case Math.floor(t.getZoom())<7:I=3;break;default:I=4}var j=new u.a({geometry:T}),L=this.format.writeFeatureObject(j,this.formatOptions);if(0!==this.polling&&this.polling<this.pollingRate&&this.lastZoomValue===t.getZoom())return void this.polling++;this.polling=1,this.lastZoomValue=t.getZoom();for(var R=0;R<I;R++)if(null!==this.viewboxFeatures[R]){var P=this.viewboxFeatures[R],N=Object(g.a)(P,L);this.viewboxFeatures[R]=N}else this.viewboxFeatures[R]=L;for(var M,A=Array.from(this.viewboxFeatures),k=0;k<A.length-1;k++)if(null!==A[k+1]&&null!==A[k]){var F=A[k+1],D=Object(m.a)(F,this.simplifyOptions),G=A[k],U=Object(m.a)(G,this.simplifyOptions),z=Object(y.a)(U,D);A[k]=z}var B=this.viewboxFeatures[0],V=Object(m.a)(B,this.simplifyOptions);M=Object(y.a)(this.currentOverlayFeatureJson,V);var Y=this.format.readFeature(M,this.formatOptions);Y.setStyle(new f.Style({fill:new f.Fill({color:"rgba(0, 0, 0, 0.4)"})}));var q=Array.from(this.fogLayer.getSource().getFeatures());this.fogLayer.getSource().clear(),this.fogLayer.getSource().addFeature(Y);for(var X=0;X<A.length;X++){var W=A[X];if(null!==W){var H=this.format.readFeature(W,this.formatOptions);H.setStyle(this.featureStyle[X]),this.fogLayer.getSource().addFeature(H)}else q[X+1]&&this.fogLayer.getSource().addFeature(q[X+1])}}}}},{key:"buttonClk",value:function(t){t&&(t.preventDefault(),t.stopPropagation()),(" "+this.element.className+" ").indexOf(" ol-collapsed ")>-1?this.element.className=this.element.className.replace(/ol-collapsed/g,""):this.element.className+=" ol-collapsed",this.collapsed_?this.label_.parentNode.replaceChild(this.collapseLabel_,this.label_):this.collapseLabel_.parentNode.replaceChild(this.label_,this.collapseLabel_),this.collapsed_=!this.collapsed_,this.stateManager&&(this.stateManager.overview.collapsed=this.collapsed_),this.overviewMap.updateSize()}},{key:"changeOverviewSize",value:function(t){var e=[this.ovmapDiv.clientWidth,this.ovmapDiv.clientHeight];e[0]/=t,e[1]/=t;var n=Math.round(Math.sqrt(e[0]*e[0]+e[1]*e[1]));n<60||n>600||(this.ovmapDiv.style.width=e[0]+"px",this.ovmapDiv.style.height=e[1]+"px",this.overviewMap.updateSize(),this.overviewMap.getView().fit(this.overviewMap.getView().getProjection().getExtent(),this.overviewMap.getSize()))}},{key:"changeOverviewSizePx",value:function(t){if(!(t<60||t>600)){var e=this.getBoxSize();Math.round(Math.sqrt(e[0]*e[0]+e[1]*e[1]));this.ovmapDiv.style.width=t+"px",this.ovmapDiv.style.height=t+"px",this.overviewMap&&(this.overviewMap.updateSize(),this.overviewMap.getView().fit(this.masterMap.getView().getProjection().getExtent()))}}},{key:"enlargeButtonClick",value:function(t){t&&(t.preventDefault(),t.stopPropagation()),this.changeOverviewSize(.75)}},{key:"shrinkButtonClick",value:function(t){t&&(t.preventDefault(),t.stopPropagation()),this.changeOverviewSize(1.25)}},{key:"trackingButtonClick",value:function(t){t&&(t.preventDefault(),t.stopPropagation()),this.setTrackingEnabled(!this.trackingFlag)}},{key:"setTrackingEnabled",value:function(t){this.trackingFlag=t,this.trackingFlag?(this.trackingButton.classList.add("selected"),this.polling=0,this.fogLayer.setVisible(!0),this.updateBox()):(this.trackingButton.classList.remove("selected"),this.fogLayer.setVisible(!1)),this.trackingButton.blur(),this.trackingButton.hideFocus=!0,this.trackingButton.style.outline="none"}},{key:"getTrackingEnabled",value:function(){return this.trackingFlag}},{key:"getCollapsed",value:function(){return(" "+this.element.className+" ").indexOf(" ol-collapsed ")>-1}},{key:"setCollapsed",value:function(t){this.getCollapsed()!=t&&this.buttonClk()}}])&&b(n.prototype,E),S&&b(n,S),e}()},function(t,e,n){"use strict";var r=n(59),i=n(80);function o(t){"@babel/helpers - typeof";return(o="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function a(t){var e,n,r,o,a,l=Object(i.b)(t);if(2===l.length&&(e=l[0],n=l[1],e[0]!==n[0]||e[1]!==n[1]))return l;var u=[],c=l.length-1;u.push(l[0]);for(var h=1;h<c;h++)r=l[h-1],o=l[h],s(r,a=l[h+1],o)||u.push(o);return u.push(a),u}function s(t,e,n){var r=n[0],i=n[1],o=t[0],a=t[1],s=e[0],l=e[1],u=s-o,c=l-a;return 0===(r-o)*c-(i-a)*u&&(Math.abs(u)>=Math.abs(c)?u>0?o<=r&&r<=s:s<=r&&r<=o:c>0?a<=i&&i<=l:l<=i&&i<=a)}e.a=function(t,e){var n="object"===o(e)?e.mutate:e;if(!t)throw new Error("geojson is required");var s=Object(i.d)(t),l=[];switch(s){case"LineString":l=a(t);break;case"MultiLineString":case"Polygon":Object(i.b)(t).forEach(function(t){l.push(a(t))});break;case"MultiPolygon":Object(i.b)(t).forEach(function(t){var e=[];t.forEach(function(t){e.push(a(t))}),l.push(e)});break;case"Point":return t;case"MultiPoint":var u={};Object(i.b)(t).forEach(function(t){var e=t.join("-");u.hasOwnProperty(e)||(l.push(t),u[e]=!0)});break;default:throw new Error(s+" geometry not supported")}return t.coordinates?!0===n?(t.coordinates=l,t):{type:s,coordinates:l}:!0===n?(t.geometry.coordinates=l,t):Object(r.a)({type:s,coordinates:l},t.properties,t.bbox,t.id)}},function(t,e,n){"use strict";n.d(e,"a",function(){return u});var r=n(91);function i(t){"@babel/helpers - typeof";return(i="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function o(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function a(t,e){if(e&&("object"===i(e)||"function"===typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function s(t,e){return(s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var l={normal:"Normal",objectives:"Objectives"},u=function(t){function e(t){var n;if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),!(n=a(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t))).hasOwnProperty("deltaPerZoom_"))throw"deltaPerZoom_ not found";return n.deltaPerZoom_=t.deltaPerZoom,n.mode=l.normal,n}var n,i,u;return function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&s(t,e)}(e,r["MouseWheelZoom"]),n=e,(i=[{key:"setMode",value:function(t){var e=this.getMap().getView();t==l.normal?(e.setConstrainResolution(!1),this.constrainResolution_=!1,this.mode=t):(e.setConstrainResolution(!0),this.constrainResolution_=!0,this.mode=t)}}])&&o(n.prototype,i),u&&o(n,u),e}()},function(t,e,n){"use strict";n.d(e,"a",function(){return o});var r=n(19);function i(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var o=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),Object(r.b)()&&(n instanceof Array?(this.serverSessions=n,this.context=e,this.context.registerAuthenticationProvider(this)):console.error("Expected array of server credentials"))}var e,n,o;return e=t,(n=[{key:"authenticate",value:function(t,e,n){for(var r=0,i=this.serverSessions.length;r<i;r++)if(this.serverSessions[r].serverUrl===t)return e(this.serverSessions[r].sessionId),!0;return!1}},{key:"updateSessionId",value:function(t,e){for(var n=0,r=this.serverSessions.length;n<r;n++)if(this.serverSessions[n].serverUrl===t){this.serverSessions[n].sessionId=e;break}}}])&&i(e.prototype,n),o&&i(e,o),t}()},function(t,e,n){var r,i,o,a;a=function(t){"use strict";var e,n,r=t.ui.fancytree,i=/Mac/.test(navigator.platform),o="fancytree-drag-source",a="fancytree-drag-remove",s="fancytree-drop-accept",l="fancytree-drop-after",u="fancytree-drop-before",c="fancytree-drop-over",h="fancytree-drop-reject",p="fancytree-drop-target",f="application/x-fancytree-node",d=null,g=null,y=null,m=null,v=null,_=null,b=null,w=null,O=null,x=null;function E(){v=null,x=null,b=null,w=null,_=null,g=null,y=null,m&&m.removeClass(o+" "+a),m=null,d&&d.hide(),n&&(n.remove(),n=null)}function S(t){return 0===t?"":t>0?"+"+t:""+t}function C(t,e){var n=e.tree,r=e.dataTransfer;"dragstart"===t.type?(e.effectAllowed=n.options.dnd5.effectAllowed,e.dropEffect=n.options.dnd5.dropEffectDefault):(e.effectAllowed=w,e.dropEffect=b),e.dropEffectSuggested=function(t,e,n){var r=n;return i?e.metaKey&&e.altKey?r="link":e.ctrlKey?r="link":e.metaKey?r="move":e.altKey&&(r="copy"):e.ctrlKey?r="copy":e.shiftKey?r="move":e.altKey&&(r="link"),r!==_&&t.info("evalEffectModifiers: "+e.type+" - evalEffectModifiers(): "+_+" -> "+r),_=r,r}(n,t,n.options.dnd5.dropEffectDefault),e.isMove="move"===e.dropEffect,e.files=r.files||[]}function T(t,e,n){var r=e.tree,i=e.dataTransfer;return"dragstart"!==t.type&&w!==e.effectAllowed&&r.warn("effectAllowed should only be changed in dragstart event: "+t.type+": data.effectAllowed changed from "+w+" -> "+e.effectAllowed),!1===n&&(r.info("applyDropEffectCallback: allowDrop === false"),e.effectAllowed="none",e.dropEffect="none"),e.isMove="move"===e.dropEffect,"dragstart"===t.type&&(w=e.effectAllowed,b=e.dropEffect),i.effectAllowed=w,i.dropEffect=b,b}function I(e,n){if(n.options.dnd5.scroll&&function(e,n){var r,i,o=e.options.dnd5,a=e.$scrollParent[0],s=o.scrollSensitivity,l=o.scrollSpeed,u=0;a!==document&&"HTML"!==a.tagName?(r=e.$scrollParent.offset(),i=a.scrollTop,r.top+a.offsetHeight-n.pageY<s?a.scrollHeight-e.$scrollParent.innerHeight()-i>0&&(a.scrollTop=u=i+l):i>0&&n.pageY-r.top<s&&(a.scrollTop=u=i-l)):(i=t(document).scrollTop())>0&&n.pageY-i<s?(u=i-l,t(document).scrollTop(u)):t(window).height()-(n.pageY-i)<s&&(u=i+l,t(document).scrollTop(u)),u&&e.debug("autoScroll: "+u+"px")}(n.tree,e),!n.node)return n.tree.warn("Ignored dragover for non-node"),O;var i,o,a,f,g=null,y=n.tree,m=y.options,_=m.dnd5,b=n.node,w=n.otherNode,x="center",E=t(b.span),I=E.find("span.fancytree-title");if(!1===v)return y.debug("Ignored dragover, since dragenter returned false."),!1;("string"===typeof v&&t.error("assert failed: dragenter returned string"),o=E.offset(),f=(e.pageY-o.top)/E.height(),void 0===e.pageY&&y.warn("event.pageY is undefined: see issue #1013."),v.after&&f>.75?g="after":!v.over&&v.after&&f>.5?g="after":v.before&&f<=.25?g="before":!v.over&&v.before&&f<=.5?g="before":v.over&&(g="over"),_.preventVoidMoves&&"move"===n.dropEffect&&(b===w?(b.debug("Drop over source node prevented."),g=null):"before"===g&&w&&b===w.getNextSibling()?(b.debug("Drop after source node prevented."),g=null):"after"===g&&w&&b===w.getPrevSibling()?(b.debug("Drop before source node prevented."),g=null):"over"===g&&w&&w.parent===b&&w.isLastSibling()&&(b.debug("Drop last child over own parent prevented."),g=null)),n.hitMode=g,g&&_.dragOver)&&(C(e,n),_.dragOver(b,n),T(e,n,!!g),g=n.hitMode);if(O=g,"after"===g||"before"===g||"over"===g){switch(i=_.dropMarkerOffsetX||0,g){case"before":x="top",i+=_.dropMarkerInsertOffsetX||0;break;case"after":x="bottom",i+=_.dropMarkerInsertOffsetX||0}a={my:"left"+S(i)+" center",at:"left "+x,of:I},m.rtl&&(a.my="right"+S(-i)+" center",a.at="right "+x),d.toggleClass(l,"after"===g).toggleClass(c,"over"===g).toggleClass(u,"before"===g).show().position(r.fixPositionOptions(a))}else d.hide();return t(b.span).toggleClass(p,"after"===g||"before"===g||"over"===g).toggleClass(l,"after"===g).toggleClass(u,"before"===g).toggleClass(s,"over"===g).toggleClass(h,!1===g),g}function j(e){var n,i,o,a,l=this.options.dnd5,u=null,p=r.getNode(e),m=e.dataTransfer||e.originalEvent.dataTransfer,_={tree:this,node:p,options:this.options,originalEvent:e.originalEvent,widget:this.widget,hitMode:v,dataTransfer:m,otherNode:g||null,otherNodeList:y||null,otherNodeData:null,useDefaultImage:!0,dropEffect:void 0,dropEffectSuggested:void 0,effectAllowed:void 0,files:null,isCancelled:void 0,isMove:void 0};switch(e.type){case"dragenter":if(x=null,!p){this.debug("Ignore non-node "+e.type+": "+e.target.tagName+"."+e.target.className),v=!1;break}if(t(p.span).addClass(c).removeClass(s+" "+h),o=t.inArray(f,m.types)>=0,l.preventNonNodes&&!o){p.debug("Reject dropping a non-node."),v=!1;break}if(l.preventForeignNodes&&(!g||g.tree!==p.tree)){p.debug("Reject dropping a foreign node."),v=!1;break}if(l.preventSameParent&&_.otherNode&&_.otherNode.tree===p.tree&&p.parent===_.otherNode.parent){p.debug("Reject dropping as sibling (same parent)."),v=!1;break}if(l.preventRecursion&&_.otherNode&&_.otherNode.tree===p.tree&&p.isDescendantOf(_.otherNode)){p.debug("Reject dropping below own ancestor."),v=!1;break}if(l.preventLazyParents&&!p.isLoaded()){p.warn("Drop over unloaded target node prevented."),v=!1;break}d.show(),C(e,_),a=function(e){var n;return!!e&&(n=t.isPlainObject(e)?{over:!!e.over,before:!!e.before,after:!!e.after}:t.isArray(e)?{over:t.inArray("over",e)>=0,before:t.inArray("before",e)>=0,after:t.inArray("after",e)>=0}:{over:!0===e||"over"===e,before:!0===e||"before"===e,after:!0===e||"after"===e},0!==Object.keys(n).length&&n)}(l.dragEnter(p,_)),v=a,T(e,_,u=a&&(a.over||a.before||a.after));break;case"dragover":if(!p){this.debug("Ignore non-node "+e.type+": "+e.target.tagName+"."+e.target.className);break}C(e,_),u=!!(O=I(e,_)),("over"===O||!1===O)&&!p.expanded&&!1!==p.hasChildren()?x?!(l.autoExpandMS&&Date.now()-x>l.autoExpandMS)||p.isLoading()||l.dragExpand&&!1===l.dragExpand(p,_)||p.setExpanded():x=Date.now():x=null;break;case"dragleave":if(!p){this.debug("Ignore non-node "+e.type+": "+e.target.tagName+"."+e.target.className);break}if(!t(p.span).hasClass(c)){p.debug("Ignore dragleave (multi).");break}t(p.span).removeClass(c+" "+s+" "+h),p.scheduleAction("cancel"),l.dragLeave(p,_),d.hide();break;case"drop":if(t.inArray(f,m.types)>=0&&(i=m.getData(f),this.info(e.type+": getData('application/x-fancytree-node'): '"+i+"'")),i||(i=m.getData("text"),this.info(e.type+": getData('text'): '"+i+"'")),i)try{void 0!==(n=JSON.parse(i)).title&&(_.otherNodeData=n)}catch(t){}this.debug(e.type+": nodeData: '"+i+"', otherNodeData: ",_.otherNodeData),t(p.span).removeClass(c+" "+s+" "+h),_.hitMode=O,C(e,_),_.isCancelled=!O;var b=g&&g.span,w=g&&g.tree;l.dragDrop(p,_),e.preventDefault(),b&&!document.body.contains(b)&&(w===this?(this.debug("Drop handler removed source element: generating dragEnd."),l.dragEnd(g,_)):this.warn("Drop handler removed source element: dragend event may be lost.")),E()}if(u)return e.preventDefault(),!1}return t.ui.fancytree.getDragNodeList=function(){return y||[]},t.ui.fancytree.getDragNode=function(){return g},t.ui.fancytree.registerExtension({name:"dnd5",version:"2.38.0",options:{autoExpandMS:1500,dropMarkerInsertOffsetX:-16,dropMarkerOffsetX:-24,dropMarkerParent:"body",multiSource:!1,effectAllowed:"all",dropEffectDefault:"move",preventForeignNodes:!1,preventLazyParents:!0,preventNonNodes:!1,preventRecursion:!0,preventSameParent:!1,preventVoidMoves:!0,scroll:!0,scrollSensitivity:20,scrollSpeed:5,setTextTypeJson:!1,sourceCopyHook:null,dragStart:null,dragDrag:t.noop,dragEnd:t.noop,dragEnter:null,dragOver:t.noop,dragExpand:t.noop,dragDrop:t.noop,dragLeave:t.noop},treeInit:function(i){var s,l=i.tree,u=i.options,c=u.glyph||null,h=u.dnd5;t.inArray("dnd",u.extensions)>=0&&t.error("Extensions 'dnd' and 'dnd5' are mutually exclusive."),h.dragStop&&t.error("dragStop is not used by ext-dnd5. Use dragEnd instead."),null!=h.preventRecursiveMoves&&t.error("preventRecursiveMoves was renamed to preventRecursion."),h.dragStart&&r.overrideMethod(i.options,"createNode",function(t,e){this._super.apply(this,arguments),e.node.span?e.node.span.draggable=!0:e.node.warn("Cannot add `draggable`: no span tag")}),this._superApply(arguments),this.$container.addClass("fancytree-ext-dnd5"),s=t("<span>").appendTo(this.$container),this.$scrollParent=s.scrollParent(),s.remove(),(d=t("#fancytree-drop-marker")).length||(d=t("<div id='fancytree-drop-marker'></div>").hide().css({"z-index":1e3,"pointer-events":"none"}).prependTo(h.dropMarkerParent),c&&r.setSpanIcon(d[0],c.map._addClass,c.map.dropMarker)),d.toggleClass("fancytree-rtl",!!u.rtl),h.dragStart&&l.$container.on("dragstart drag dragend",function(i){var s,l=this.options.dnd5,u=r.getNode(i),c=i.dataTransfer||i.originalEvent.dataTransfer,h={tree:this,node:u,options:this.options,originalEvent:i.originalEvent,widget:this.widget,dataTransfer:c,useDefaultImage:!0,dropEffect:void 0,dropEffectSuggested:void 0,effectAllowed:void 0,files:void 0,isCancelled:void 0,isMove:void 0};switch(i.type){case"dragstart":if(!u)return this.info("Ignored dragstart on a non-node."),!1;g=u,y=!1===l.multiSource?[u]:!0===l.multiSource?u.isSelected()?this.getSelectedNodes():[u]:l.multiSource(u,h),(m=t(t.map(y,function(t){return t.span}))).addClass(o);var p=u.toDict(!0,l.sourceCopyHook);p.treeId=u.tree._id,s=JSON.stringify(p);try{c.setData(f,s),c.setData("text/html",t(u.span).html()),c.setData("text/plain",u.title)}catch(t){this.warn("Could not set data (IE only accepts 'text') - "+t)}return l.setTextTypeJson?c.setData("text",s):c.setData("text",u.title),C(i,h),!1===l.dragStart(u,h)?(E(),!1):(T(i,h),n=null,h.useDefaultImage&&(e=t(u.span).find(".fancytree-title"),y&&y.length>1&&(n=t("<span class='fancytree-childcounter'/>").text("+"+(y.length-1)).appendTo(e)),c.setDragImage&&c.setDragImage(e[0],-10,-10)),!0);case"drag":C(i,h),l.dragDrag(u,h),T(i,h),m.toggleClass(a,h.isMove);break;case"dragend":C(i,h),E(),h.isCancelled=!O,l.dragEnd(u,h,!O)}}.bind(l)),h.dragEnter&&l.$container.on("dragenter dragover dragleave drop",j.bind(l))}}),t.ui.fancytree},i=[n(46),n(168)],void 0===(o="function"===typeof(r=a)?r.apply(e,i):r)||(t.exports=o)},function(t,e){},function(t,e){},function(t,e,n){"use strict";n.d(e,"a",function(){return l});var r=n(19),i=n(32),o=n(247),a=n(23);function s(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var l=function(){function t(e){if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),Object(r.b)()){if(!e||"string"!==typeof e.caller)throw"Caller parameter not supplied";for(var n in this.options=e,this.listeners={},i.c)i.c.hasOwnProperty(n)&&(this.listeners[i.c[n]]=[]);this.authenticationProviders=[]}}var e,n,l;return e=t,(n=[{key:"getCaller",value:function(){return this.options.caller}},{key:"registerAuthenticationProvider",value:function(t){"function"!==typeof t.authenticate?console.error("Invalid authentication provider"):this.authenticationProviders.push(t)}},{key:"removeAuthenticationProvider",value:function(t,e){if("function"!==typeof t.authenticate)console.error("Invalid authentication provider");else for(var n=0;n<this.authenticationProviders.length;n++)if(this.authenticationProviders[n]===t){this.authenticationProviders.splice(n,1),!1!==e&&i.e.clear();break}}},{key:"getAuthenticationProviders",value:function(){return this.authenticationProviders}},{key:"pingServers",value:function(t,e,n){(n<=1||!n||void 0===n)&&(n=6);var r=t.map(function(t){return{serverUrl:t,success:!1,times:[],avgTime:null,attempts:0}}),o=function t(o,a,s){if(r[a].attempts++,s&&r[a].attempts>1){var l=performance.now()-o;r[a].times.push(l),r[a].avgTime=null!=r[a].avgTime?(r[a].avgTime*r[a].times.length+l)/(r[a].times.length+1):l,r[a].success=!0}if(r[a].attempts>=n&&a++,a>=r.length)"function"===typeof e&&e(r.sort(function(t,e){return null!=t.avgTime&&null!=e.avgTime?t.avgTime-e.avgTime:null!=t.avgTime?-1e7:1e7}).map(function(t){return t.serverUrl}),r);else{var u=performance.now();Object(i.f)({serverUrl:r[a].serverUrl,method:i.a.GetVersionInfo,success:t.bind(this,u,a,!0),failure:t.bind(this,u,a,!1)})}},a=performance.now();Object(i.f)({serverUrl:r[0].serverUrl,method:i.a.GetVersionInfo,success:o.bind(this,a,0,!0),failure:o.bind(this,a,0,!1)})}},{key:"getUserInfo",value:function(t){for(var e in i.e.get())if(i.e.get().hasOwnProperty(e)&&e===t&&i.e.get()[e])return i.e.get()[e];return null}},{key:"getSession",value:function(t,e,n){for(var r in i.e.get())if(i.e.get().hasOwnProperty(r)&&r===t&&i.e.get()[r])return void e(i.e.get()[r].SessionId);(function(t,e,n){var r=0;for(r=0;r<this.authenticationProviders.length;r++)if(!(this.authenticationProviders[r]instanceof o.a)&&this.authenticationProviders[r].authenticate(t,e,n))return;for(r=0;r<this.authenticationProviders.length;r++)if(this.authenticationProviders[r]instanceof o.a){if(this.authenticationProviders[r].authenticate(t,e,n))return;break}"function"===typeof n&&n({Message:a.a.translate("Authentication failed at server {serverUrl}.",{serverUrl:t})})}).call(this,t,e,n)}},{key:"getImageInfo",value:function(t,e,n,r){u.call(this,{attemptCount:0,serverUrl:t,method:i.a.GetImageInfo,data:{pathOrUid:e},httpMethod:"GET",success:n,failure:r})}},{key:"getFiles",value:function(t,e,n,r){console.warn("Context.getFiles is deprecated please use Context.getSlides instead"),u.call(this,{attemptCount:0,serverUrl:t,method:i.a.GetFiles,data:{path:e},httpMethod:"GET",success:n,failure:r})}},{key:"getSlides",value:function(t){u.call(this,{attemptCount:0,serverUrl:t.serverUrl,method:i.a.GetFiles,data:{path:t.path,scope:t.scope?t.scope:0},httpMethod:"GET",success:t.success,failure:t.failure})}},{key:"getDirectories",value:function(t,e,n,r){u.call(this,{attemptCount:0,serverUrl:t,method:i.a.GetDirectories,data:{path:e},httpMethod:"GET",success:n,failure:r})}},{key:"getAnnotations",value:function(t,e,n,r,o){u.call(this,{attemptCount:0,serverUrl:t,method:i.a.GetAnnotations,data:{pathOrUid:e,currentUserOnly:n},httpMethod:"GET",success:r,failure:o})}},{key:"addAnnotation",value:function(t,e,n,r,o,a,s,l,c){u.call(this,{attemptCount:0,serverUrl:t,method:i.a.AddAnnotation,data:{pathOrUid:e,classification:n,layerID:r,notes:o,geometry:a,color:s},httpMethod:"POST",contentType:"application/json",success:l,failure:c})}},{key:"updateAnnotation",value:function(t,e,n,r,o,a,s,l,c){u.call(this,{attemptCount:0,serverUrl:t,method:i.a.UpdateAnnotation,data:{pathOrUid:e,layerID:n,annotationID:r,notes:o,geometry:a,color:s},httpMethod:"POST",contentType:"application/json",success:l,failure:c})}},{key:"saveAnnotations",value:function(t,e,n,r,o,a,s){u.call(this,{attemptCount:0,serverUrl:t,method:i.a.SaveAnnotations,data:{pathOrUid:e,added:n,updated:r,deleted:o},httpMethod:"POST",contentType:"application/json",success:a,failure:s})}},{key:"deleteAnnotation",value:function(t,e,n,r,o,a){u.call(this,{attemptCount:0,serverUrl:t,method:i.a.DeleteAnnotation,data:{pathOrUid:e,layerID:n,annotationID:r},httpMethod:"POST",contentType:"application/json",success:o,failure:a})}},{key:"getFormDefinitions",value:function(t,e,n,r,o){u.call(this,{attemptCount:0,serverUrl:t,method:i.a.GetFormDefinitions,data:{formIDs:e instanceof Array?e.join(","):e,rootDirectoryAlias:n},httpMethod:"GET",success:r,failure:o})}},{key:"getFormSubmissions",value:function(t,e,n,r,o,a){u.call(this,{attemptCount:0,serverUrl:t,method:i.a.GetFormSubmissions,data:{pathOrUids:e instanceof Array?e:[],formIDs:n instanceof Array?n:[],currentUserOnly:r},httpMethod:"POST",contentType:"application/json",success:o,failure:a})}},{key:"saveFormDefinition",value:function(t,e,n,r){u.call(this,{attemptCount:0,serverUrl:t,method:i.a.SaveFormDefinition,apiPath:"admin",contentType:"application/json",data:{definition:e},httpMethod:"POST",success:n,failure:r})}},{key:"deleteFormDefinition",value:function(t,e,n,r){u.call(this,{attemptCount:0,serverUrl:t,method:i.a.DeleteFormDefinition,apiPath:"admin",data:{formID:e},httpMethod:"GET",success:n,failure:r})}},{key:"getVersionInfo",value:function(t,e,n){Object(i.f)({serverUrl:t,method:i.a.GetVersionInfo,success:function(t){if("function"===typeof e){var n=Object(i.l)(t.responseText);e(n)}},failure:function(t){if("function"===typeof n)if(t.responseText&&0!==t.responseText.length){var e=Object(i.l)(t.responseText);n(e)}else n({Message:a.a.translate("Get Version Info failed")})}})}},{key:"getEvents",value:function(t,e,n){u.call(this,{attemptCount:0,serverUrl:t.serverUrl,method:i.a.GetEvents,apiPath:"admin",data:{page:t.page,pageSize:t.pageSize},httpMethod:"GET",success:e,failure:n})}},{key:"deAuthenticate",value:function(t,e,n){var r=null;if(i.e.get().hasOwnProperty(t)&&i.e.get()[t]){if(!(r=i.e.get()[t].SessionId)&&"function"===typeof e)return void e()}else for(var o=function(t){r=t},a=0;a<this.authenticationProviders.length;a++)if(this.authenticationProviders[a]instanceof PMA.UI.Authentication.SessionLogin){if(this.authenticationProviders[a].authenticate(t,o,null))break}else;null!=r&&(i.e.set(t,null),Object(i.f)({serverUrl:t,method:i.a.DeAuthenticate,data:{sessionID:r},success:function(t){"function"===typeof e&&e()},failure:function(t){if("function"===typeof n)if(t.responseText&&0!==t.responseText.length){var e=Object(i.l)(t.responseText);n(e)}else n()}}))}},{key:"queryFilename",value:function(t,e,n,r,o){u.call(this,{attemptCount:0,serverUrl:t,method:i.a.QueryFilename,apiPath:"query",data:{path:e,pattern:n},httpMethod:"GET",success:r,failure:o})}},{key:"distinctValues",value:function(t){u.call(this,{attemptCount:0,serverUrl:t.serverUrl,method:i.a.DistinctValues,apiPath:"query",data:{formID:t.formId,fieldID:t.fieldId},httpMethod:"GET",success:t.success,failure:t.failure})}},{key:"getImagesInfo",value:function(t){u.call(this,{attemptCount:0,serverUrl:t.serverUrl,method:i.a.GetImagesInfo,apiPath:"api",data:{pathOrUids:t.images},contentType:"application/json",httpMethod:"POST",success:t.success,failure:t.failure})}},{key:"metadata",value:function(t){u.call(this,{attemptCount:0,serverUrl:t.serverUrl,method:i.a.Metadata,apiPath:"query",data:{expressions:t.expressions},httpMethod:"POST",contentType:"application/json",success:t.success,failure:t.failure})}},{key:"checkPmaStartServer",value:function(t,e){Object(i.f)({method:i.a.GetVersionInfo,httpMethod:"GET",serverUrl:"http://127.0.0.1:54001/",success:function(){"function"===typeof callback&&t.call(this,!0)},failure:function(){"function"===typeof callback&&e.call(this,!1)}})}},{key:"getPmaStartCorsUrl",value:function(){return"http://127.0.0.1:54001/home/allowdomain/?host="+document.location.origin}},{key:"runScript",value:function(t){u.call(this,{attemptCount:0,serverUrl:t.serverUrl,method:i.a.RunScripts,apiPath:"scripts",webapi:!0,data:Object.assign({name:t.name},t.params),httpMethod:"GET",success:t.success,failure:t.failure})}},{key:"listen",value:function(t,e){this.listeners.hasOwnProperty(t)||console.error(t+" is not a valid event"),this.listeners[t].push(e)}},{key:"fireEvent",value:function(t,e){if(this.listeners.hasOwnProperty(t))for(var n=0,r=this.listeners[t].length;n<r;n++)this.listeners[t][n](e);else console.error(t+" does not exist")}}])&&s(e.prototype,n),l&&s(e,l),t}();function u(t){var e=this;t.apiPath||(t.apiPath="api"),e.getSession(t.serverUrl,function(n){t.data.sessionID=n,Object(i.f)({serverUrl:t.serverUrl,method:t.method,data:t.data,contentType:t.contentType,httpMethod:t.httpMethod,apiPath:t.apiPath,webapi:t.webapi,success:function(e){if("function"===typeof t.success){var n=Object(i.l)(e.responseText);t.success(t.data.sessionID,n)}},failure:function(n){if(i.e.set(t.serverUrl,null),0==n.status&&0===t.attemptCount)t.attemptCount=1,u.call(e,t);else if("function"===typeof t.failure)if(n.responseText&&0!==n.responseText.length)try{var r=Object(i.l)(n.responseText);t.failure(r),e.fireEvent(i.c.SessionIdLoginFailed,{serverUrl:t.serverUrl})}catch(r){t.failure(n.responseText),e.fireEvent(i.c.SessionIdLoginFailed,{serverUrl:t.serverUrl})}else t.failure({Message:a.a.translate("Authentication failed")}),e.fireEvent(i.c.SessionIdLoginFailed,{serverUrl:t.serverUrl})}})},function(n){!n.Message&&n.Reason&&(n.Message=n.Reason),"function"===typeof t.failure&&t.failure(n),e.fireEvent(i.c.SessionIdLoginFailed,{serverUrl:t.serverUrl})})}l.prototype.GetImagesInfo=l.prototype.getImagesInfo},function(t,e,n){"use strict";n.d(e,"a",function(){return c});var r=n(32),i=n(46),o=n.n(i),a=n(23),s=n(19);function l(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function u(t,e){var n=this;Object(r.j)(t,o()("div.pma-ui-loginprompt input[type=text]").val(),o()("div.pma-ui-loginprompt input[type=password]").val(),this.context.getCaller(),function(t){for(var e=0;e<n.successCallbacks.length;e++)n.successCallbacks[e](t);n.active=!1,o()("div.pma-ui-loginprompt").remove()},function(t){if(!t.Message&&t.Reason&&(t.Message=t.Reason),e<2)o()("div.pma-ui-loginprompt .error").html(t.Message);else{n.active=!1;for(var r=0;r<n.failureCallbacks.length;r++)n.failureCallbacks[r](t);o()("div.pma-ui-loginprompt").remove()}})}var c=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),Object(s.b)()&&(this.context=e,this.context.registerAuthenticationProvider(this),this.active=!1,this.serverNameCallback=n)}var e,n,r;return e=t,(n=[{key:"authenticate",value:function(t,e,n){if(this.active)"function"===typeof e&&this.successCallbacks.push(e),"function"===typeof n&&this.failureCallbacks.push(n);else{this.successCallbacks=[],this.failureCallbacks=[],"function"===typeof e&&this.successCallbacks.push(e),"function"===typeof n&&this.failureCallbacks.push(n),this.active=!0;var r=this,i=0,s=t;if("function"===typeof this.serverNameCallback){var l=this.serverNameCallback(t);l&&"string"===typeof l&&(s=l)}o()("body").append("<div class='pma-ui-loginprompt'><div class='login-panel'><div><label>"+s+"</label></div><div><input type='text' placeholder='"+a.a.translate("Username")+"' /></div><div><input type='password' placeholder='"+a.a.translate("Password")+"' /></div><div class='error'></div><div class='controls'><input type='button' class='accept' value='"+a.a.translate("OK")+"' /><input type='button' class='cancel' value='"+a.a.translate("Cancel")+"' /></div></div></div>"),o()("div.pma-ui-loginprompt input[type=text], div.pma-ui-loginprompt input[type=password]").keypress(function(e){13==e.which&&(e.preventDefault(),u.call(r,t,i++))}),o()("div.pma-ui-loginprompt input.accept").click(function(){u.call(r,t,i++)}),o()("div.pma-ui-loginprompt input.cancel").click(function(){r.active=!1;for(var t=0;t<r.failureCallbacks.length;t++)r.failureCallbacks[t]({Message:a.a.translate("Login cancelled")});o()("div.pma-ui-loginprompt").remove()})}return!0}}])&&l(e.prototype,n),r&&l(e,r),t}()},function(t,e,n){"use strict";var r=n(166),i=(n.n(r),n(397)),o=n(80),a=n(59),s=n(240);e.a=function(t,e){var n=Object(o.c)(t),l=Object(o.c)(e);if(Object(s.a)(Object(i.a)(l,{precision:4})).coordinates[0].length<4)return null;if(Object(s.a)(Object(i.a)(n,{precision:4})).coordinates[0].length<4)return null;var u=new r.GeoJSONReader,c=u.read(Object(i.a)(n)),h=u.read(Object(i.a)(l)),p=r.OverlayOp.intersection(c,h);if(p.isEmpty())return null;var f=(new r.GeoJSONWriter).write(p);return Object(a.a)(f)}},function(t,e,n){n(250),t.exports=n(251)},function(t,e,n){"use strict"},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(46),i=n.n(r),o=n(252),a=n(416);i()(window).on("et_builder_api_ready",function(t,e){e.registerModules(o.a),e.registerModalFields(a.a)})},function(t,e,n){"use strict";var r=n(253);e.a=[r.a]},function(t,e,n){"use strict";var r=n(124),i=n.n(r),o=n(125),a=n(169);n.n(a);function s(t){"@babel/helpers - typeof";return(s="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function l(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function u(t,e){if(e&&("object"===s(e)||"function"===typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function c(t,e){return(c=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var h=[{serverUrl:window.PmaCoreConfiguration.serverUrl,sessionId:window.PmaCoreConfiguration.sessionId}],p=function(t){function e(t){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=u(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t))).viewportRef=i.a.createRef(null),n.context=null,n.viewport=null,n}var n,a,s;return function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&c(t,e)}(e,r["Component"]),n=e,(a=[{key:"componentDidMount",value:function(){}},{key:"componentDidUpdate",value:function(){if(null!=this.props.slide){this.context=new o.c({caller:"PMA.wordpress"}),new o.d(this.context,h);var t=this.props.viewport_options?this.props.viewport_options.split("|"):[],e=t.length>1&&"on"===t[0],n=t.length>1&&"on"===t[1],r=t.length>1&&"on"===t[2],i=t.length>1&&"on"===t[3];this.viewport=new o.e(this.context,{element:this.viewportRef.current,overview:r,dimensions:i,snapshot:!0,filename:n,scaleLine:!0,annotations:{labels:!0,alwaysDisplayInMicrons:!0},annotationsLayers:{collapsed:!0},digitalZoomLevels:2,loadingBar:!0,highQuality:!0,barcode:e,colorAdjustments:!1,zoomSlider:!0,theme:o.f.Default,keyboardPanFactor:.5}),this.viewport.load(h[0].serverUrl,this.props.slide)}}},{key:"render",value:function(){return i.a.createElement(r.Fragment,null,i.a.createElement("h1",{className:"simp-pmawordpress-heading"},this.props.heading),i.a.createElement("div",{id:"viewer"},null==this.props.slide?"No slide selected.":i.a.createElement("div",{ref:this.viewportRef,style:{height:this.props.viewport_height&&"0"!==this.props.viewport_height?this.props.viewport_height:"500px",width:this.props.viewport_width&&"0"!==this.props.viewport_width?this.props.viewport_width:""}})))}}])&&l(n.prototype,a),s&&l(n,s),e}();Object.defineProperty(p,"slug",{configurable:!0,enumerable:!0,writable:!0,value:"simp_pathomation_slide"}),e.a=p},function(t,e){t.exports={_from:"@pathomation/pma.ui@^2.7.2",_id:"@pathomation/pma.ui@2.13.0",_inBundle:!1,_integrity:"sha512-JQIY2SH/kuBUEDqgSuZpw72iYCwmUDyRoiP4ggCULK9wJyol0tDXBEnB+ol3PFozX/emR1dsARc/u0g+s9uvPQ==",_location:"/@pathomation/pma.ui",_phantomChildren:{},_requested:{type:"range",registry:!0,raw:"@pathomation/pma.ui@^2.7.2",name:"@pathomation/pma.ui",escapedName:"@pathomation%2fpma.ui",scope:"@pathomation",rawSpec:"^2.7.2",saveSpec:null,fetchSpec:"^2.7.2"},_requiredBy:["/"],_resolved:"https://registry.npmjs.org/@pathomation/pma.ui/-/pma.ui-2.13.0.tgz",_shasum:"b1e4d81d45fb0d1276c6ac8547a6c48069d45e61",_spec:"@pathomation/pma.ui@^2.7.2",_where:"C:\\inetpub\\wwwroot\\wp-content\\plugins\\pathomation",author:{name:"Pathomation"},build:"549",bundleDependencies:!1,dependencies:{"@turf/turf":"^5.1.6","caniuse-lite":"^1.0.30001247","file-saver":"^2.0.2","font-awesome":"^4.7.0",jquery:"^3.5.1","jquery.fancytree":"^2.36.1",nouislider:"^14.6.0",ol:"^6.5.0","ol-magic-wand":"^1.0.5","perfect-scrollbar":"^1.5.0"},deprecated:!1,description:"PMA.UI is a Javascript library that provides UI and programmatic components to interact with PMA.core",devDependencies:{"@babel/core":"^7.12.13","@babel/plugin-transform-runtime":"^7.13.10","@babel/preset-env":"^7.12.13","@types/nouislider":"^9.0.7","@types/ol":"^6.3.1","babel-loader":"^8.2.2","copy-webpack-plugin":"^6.0.2","css-loader":"^3.5.3",docdash:"^1.2.0","file-loader":"^6.0.0","font-awesome":"^4.7.0",jsdoc:"^3.6.4","jsdoc-template":"git+https://github.com/braintree/jsdoc-template.git","mini-css-extract-plugin":"^0.9.0","node-svn-ultimate":"^1.2.1","null-loader":"^4.0.0","optimize-css-assets-webpack-plugin":"^5.0.3","perfect-scrollbar":"^1.5.0",rimraf:"^3.0.2","ts-loader":"^7.0.5",typescript:"^3.9.5",webpack:"^4.43.0","webpack-cli":"^3.3.11","webpack-dev-server":"^3.11.0","webpack-provide-global-plugin":"0.0.1","@babel/plugin-proposal-object-rest-spread":"^7.13.8","@babel/plugin-proposal-optional-catch-binding":"^7.13.8"},directories:{lib:"lib",man:"man"},keywords:["digital pathology","pathology","whole slide image","digital slide"],license:"ISC",main:"src/index.js",man:[],name:"@pathomation/pma.ui",scripts:{build:"npm run clean && npx webpack --mode=production && compress.bat","build-wordpress":"npm run clean && npx webpack --mode=production --config webpack.wordpress.config.js",clean:"rimraf dist/* && rimraf build/*",dev:"webpack --watch",documentation:"jsdoc -c jsdoc\\conf.json && copy-bundle.bat","publish-npm":"npm publish --access public",test:'echo "Error: no test specified" && exit 1'},version:"2.13.0",babel:{presets:["@babel/preset-env"],plugins:["@babel/plugin-proposal-object-rest-spread","@babel/plugin-proposal-optional-catch-binding"]}}},function(t,e,n){"use strict";var r,i=n(42),o=n(3),a=n(34),s=n(9),l=n(11),u=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),c=["fullscreenchange","webkitfullscreenchange","MSFullscreenChange"],h="enterfullscreen",p="leavefullscreen",f=function(t){function e(e){var n=this,r=e||{};(n=t.call(this,{element:document.createElement("div"),target:r.target})||this).on,n.once,n.un,n.cssClassName_=void 0!==r.className?r.className:"ol-full-screen",n.activeClassName_=void 0!==r.activeClassName?r.activeClassName.split(" "):[n.cssClassName_+"-true"],n.inactiveClassName_=void 0!==r.inactiveClassName?r.inactiveClassName.split(" "):[n.cssClassName_+"-false"];var i=void 0!==r.label?r.label:"\u2922";n.labelNode_="string"===typeof i?document.createTextNode(i):i;var s=void 0!==r.labelActive?r.labelActive:"\xd7";n.labelActiveNode_="string"===typeof s?document.createTextNode(s):s,n.button_=document.createElement("button");var l=r.tipLabel?r.tipLabel:"Toggle full-screen";n.setClassName_(n.button_,g()),n.button_.setAttribute("type","button"),n.button_.title=l,n.button_.appendChild(n.labelNode_),n.button_.addEventListener(o.a.CLICK,n.handleClick_.bind(n),!1);var u=n.cssClassName_+" "+a.e+" "+a.b+" "+(d()?"":a.f),c=n.element;return c.className=u,c.appendChild(n.button_),n.keys_=void 0!==r.keys&&r.keys,n.source_=r.source,n}return u(e,t),e.prototype.handleClick_=function(t){t.preventDefault(),this.handleFullScreen_()},e.prototype.handleFullScreen_=function(){if(d()){var t=this.getMap();if(t)if(g())document.exitFullscreen?document.exitFullscreen():document.msExitFullscreen?document.msExitFullscreen():document.webkitExitFullscreen&&document.webkitExitFullscreen();else{var e=void 0;e=this.source_?"string"===typeof this.source_?document.getElementById(this.source_):this.source_:t.getTargetElement(),this.keys_?function(t){t.webkitRequestFullscreen?t.webkitRequestFullscreen():y(t)}(e):y(e)}}},e.prototype.handleFullScreenChange_=function(){var t=this.getMap();g()?(this.setClassName_(this.button_,!0),Object(l.g)(this.labelActiveNode_,this.labelNode_),this.dispatchEvent(h)):(this.setClassName_(this.button_,!1),Object(l.g)(this.labelNode_,this.labelActiveNode_),this.dispatchEvent(p)),t&&t.updateSize()},e.prototype.setClassName_=function(t,e){var n,r,i,o=this.activeClassName_,a=this.inactiveClassName_,s=e?o:a;(n=t.classList).remove.apply(n,o),(r=t.classList).remove.apply(r,a),(i=t.classList).add.apply(i,s)},e.prototype.setMap=function(e){if(t.prototype.setMap.call(this,e),e)for(var n=0,r=c.length;n<r;++n)this.listenerKeys.push(Object(s.listen)(document,c[n],this.handleFullScreenChange_,this))},e}(i.a);function d(){var t=document.body;return!!(t.webkitRequestFullscreen||t.msRequestFullscreen&&document.msFullscreenEnabled||t.requestFullscreen&&document.fullscreenEnabled)}function g(){return!!(document.webkitIsFullScreen||document.msFullscreenElement||document.fullscreenElement)}function y(t){t.requestFullscreen?t.requestFullscreen():t.msRequestFullscreen?t.msRequestFullscreen():t.webkitRequestFullscreen&&t.webkitRequestFullscreen()}e.a=f},function(t,e,n){"use strict";var r,i=n(42),o=n(105),a=n(2),s=n(9),l=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),u="projection",c=function(t){function e(e){var n=this,r=e||{},i=document.createElement("div");i.className=void 0!==r.className?r.className:"ol-mouse-position",(n=t.call(this,{element:i,render:r.render,target:r.target})||this).on,n.once,n.un,n.addChangeListener(u,n.handleProjectionChanged_),r.coordinateFormat&&n.setCoordinateFormat(r.coordinateFormat),r.projection&&n.setProjection(r.projection);var o=!0,a="&#160;";return"undefinedHTML"in r?(void 0!==r.undefinedHTML&&(a=r.undefinedHTML),o=!!a):"placeholder"in r&&(!1===r.placeholder?o=!1:a=String(r.placeholder)),n.placeholder_=a,n.renderOnMouseOut_=o,n.renderedHTML_=i.innerHTML,n.mapProjection_=null,n.transform_=null,n}return l(e,t),e.prototype.handleProjectionChanged_=function(){this.transform_=null},e.prototype.getCoordinateFormat=function(){return this.get("coordinateFormat")},e.prototype.getProjection=function(){return this.get(u)},e.prototype.handleMouseMove=function(t){var e=this.getMap();this.updateHTML_(e.getEventPixel(t))},e.prototype.handleMouseOut=function(t){this.updateHTML_(null)},e.prototype.setMap=function(e){if(t.prototype.setMap.call(this,e),e){var n=e.getViewport();this.listenerKeys.push(Object(s.listen)(n,o.a.POINTERMOVE,this.handleMouseMove,this)),this.renderOnMouseOut_&&this.listenerKeys.push(Object(s.listen)(n,o.a.POINTEROUT,this.handleMouseOut,this)),this.updateHTML_(null)}},e.prototype.setCoordinateFormat=function(t){this.set("coordinateFormat",t)},e.prototype.setProjection=function(t){this.set(u,Object(a.get)(t))},e.prototype.updateHTML_=function(t){var e=this.placeholder_;if(t&&this.mapProjection_){if(!this.transform_){var n=this.getProjection();this.transform_=n?Object(a.getTransformFromProjections)(this.mapProjection_,n):a.identityTransform}var r=this.getMap().getCoordinateFromPixelInternal(t);if(r){var i=Object(a.getUserProjection)();i&&(this.transform_=Object(a.getTransformFromProjections)(this.mapProjection_,i)),this.transform_(r,r);var o=this.getCoordinateFormat();e=o?o(r):r.toString()}}this.renderedHTML_&&e===this.renderedHTML_||(this.element.innerHTML=e,this.renderedHTML_=e)},e.prototype.render=function(t){var e=t.frameState;e?this.mapProjection_!=e.viewState.projection&&(this.mapProjection_=e.viewState.projection,this.transform_=null):this.mapProjection_=null},e}(i.a);e.a=c},function(t,e,n){"use strict";n.d(e,"a",function(){return d}),e.b=function(t,e,n){var r=t.length,i=n>1?n:2,o=e;void 0===o&&(o=i>2?t.slice():new Array(r));for(var a=0;a<r;a+=i){o[a]=u*t[a]/180;var s=l*Math.log(Math.tan(Math.PI*(+t[a+1]+90)/360));s>p?s=p:s<-p&&(s=-p),o[a+1]=s}return o},e.c=function(t,e,n){var r=t.length,i=n>1?n:2,o=e;void 0===o&&(o=i>2?t.slice():new Array(r));for(var a=0;a<r;a+=i)o[a]=180*t[a]/u,o[a+1]=360*Math.atan(Math.exp(t[a+1]/l))/Math.PI-90;return o};var r,i=n(106),o=n(43),a=n(7),s=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),l=6378137,u=Math.PI*l,c=[-u,-u,u,u],h=[-180,-85,180,85],p=l*Math.log(Math.tan(Math.PI/2)),f=function(t){function e(e){return t.call(this,{code:e,units:o.b.METERS,extent:c,global:!0,worldExtent:h,getPointResolution:function(t,e){return t/Object(a.b)(e[1]/l)}})||this}return s(e,t),e}(i.a),d=[new f("EPSG:3857"),new f("EPSG:102100"),new f("EPSG:102113"),new f("EPSG:900913"),new f("http://www.opengis.net/gml/srs/epsg.xml#3857")]},function(t,e,n){"use strict";n.d(e,"a",function(){return c});var r,i=n(106),o=n(43),a=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),s=[-180,-90,180,90],l=6378137*Math.PI/180,u=function(t){function e(e,n){return t.call(this,{code:e,units:o.b.DEGREES,extent:s,axisOrientation:n,global:!0,metersPerUnit:l,worldExtent:s})||this}return a(e,t),e}(i.a),c=[new u("CRS:84"),new u("EPSG:4326","neu"),new u("urn:ogc:def:crs:OGC:1.3:CRS84"),new u("urn:ogc:def:crs:OGC:2:84"),new u("http://www.opengis.net/gml/srs/epsg.xml#4326","neu")]},function(t,e,n){"use strict";e.b=function(){r={}},e.c=function(t){return r[t]||r[t.replace(/urn:(x-)?ogc:def:crs:EPSG:(.*:)?(\w+)$/,"EPSG:$3")]||null},e.a=function(t,e){r[t]=e};var r={}},function(t,e,n){"use strict";e.b=function(){r={}},e.a=function(t,e,n){var i=t.getCode(),o=e.getCode();i in r||(r[i]={});r[i][o]=n},e.c=function(t,e){var n;t in r&&e in r[t]&&(n=r[t][e]);return n};n(1);var r={}},function(t,e,n){"use strict";var r,i=n(183),o=n(42),a=n(3),s=n(104),l=n(184),u=n(67),c=n(83),h=n(185),p=n(134),f=n(84),d=n(188),g=n(34),y=n(0),m=n(9),v=n(10),_=n(11),b=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),w=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return b(e,t),e.prototype.createRenderer=function(){return new i.a(this)},e}(p.a),O=function(t){function e(e){var n=this,r=e||{};(n=t.call(this,{element:document.createElement("div"),render:r.render,target:r.target})||this).boundHandleRotationChanged_=n.handleRotationChanged_.bind(n),n.collapsed_=void 0===r.collapsed||r.collapsed,n.collapsible_=void 0===r.collapsible||r.collapsible,n.collapsible_||(n.collapsed_=!1),n.rotateWithView_=void 0!==r.rotateWithView&&r.rotateWithView,n.viewExtent_=void 0;var i=void 0!==r.className?r.className:"ol-overviewmap",o=void 0!==r.tipLabel?r.tipLabel:"Overview map",s=void 0!==r.collapseLabel?r.collapseLabel:"\xab";"string"===typeof s?(n.collapseLabel_=document.createElement("span"),n.collapseLabel_.textContent=s):n.collapseLabel_=s;var l=void 0!==r.label?r.label:"\xbb";"string"===typeof l?(n.label_=document.createElement("span"),n.label_.textContent=l):n.label_=l;var u=n.collapsible_&&!n.collapsed_?n.collapseLabel_:n.label_,p=document.createElement("button");p.setAttribute("type","button"),p.title=o,p.appendChild(u),p.addEventListener(a.a.CLICK,n.handleClick_.bind(n),!1),n.ovmapDiv_=document.createElement("div"),n.ovmapDiv_.className="ol-overviewmap-map",n.view_=r.view,n.ovmap_=new w({view:r.view});var f=n.ovmap_;r.layers&&r.layers.forEach(function(t){f.addLayer(t)});var d=document.createElement("div");d.className="ol-overviewmap-box",d.style.boxSizing="border-box",n.boxOverlay_=new c.a({position:[0,0],positioning:h.a.CENTER_CENTER,element:d}),n.ovmap_.addOverlay(n.boxOverlay_);var y=i+" "+g.e+" "+g.b+(n.collapsed_&&n.collapsible_?" "+g.a:"")+(n.collapsible_?"":" ol-uncollapsible"),m=n.element;m.className=y,m.appendChild(n.ovmapDiv_),m.appendChild(p);var v=n,_=n.boxOverlay_,b=function(t){var e,n={clientX:(e=t).clientX,clientY:e.clientY},r=f.getEventCoordinateInternal(n);_.setPosition(r)},O=function t(e){var n=f.getEventCoordinateInternal(e);v.getMap().getView().setCenterInternal(n),window.removeEventListener("mousemove",b),window.removeEventListener("mouseup",t)};return n.boxOverlay_.getElement().addEventListener("mousedown",function(){window.addEventListener("mousemove",b),window.addEventListener("mouseup",O)}),n}return b(e,t),e.prototype.setMap=function(e){var n=this.getMap();if(e!==n){if(n){var r=n.getView();r&&this.unbindView_(r),this.ovmap_.setTarget(null)}if(t.prototype.setMap.call(this,e),e){this.ovmap_.setTarget(this.ovmapDiv_),this.listenerKeys.push(Object(m.listen)(e,u.a.PROPERTYCHANGE,this.handleMapPropertyChange_,this));var i=e.getView();i&&(this.bindView_(i),i.isDef()&&(this.ovmap_.updateSize(),this.resetExtent_())),this.ovmap_.isRendered()||this.updateBoxAfterOvmapIsRendered_()}}},e.prototype.handleMapPropertyChange_=function(t){if(t.key===l.a.VIEW){var e=t.oldValue;e&&this.unbindView_(e);var n=this.getMap().getView();this.bindView_(n)}else this.ovmap_.isRendered()||t.key!==l.a.TARGET&&t.key!==l.a.SIZE||this.ovmap_.updateSize()},e.prototype.bindView_=function(t){if(!this.view_){var e=new f.a({projection:t.getProjection()});this.ovmap_.setView(e)}t.addChangeListener(d.a.ROTATION,this.boundHandleRotationChanged_),this.handleRotationChanged_()},e.prototype.unbindView_=function(t){t.removeChangeListener(d.a.ROTATION,this.boundHandleRotationChanged_)},e.prototype.handleRotationChanged_=function(){this.rotateWithView_&&this.ovmap_.getView().setRotation(this.getMap().getView().getRotation())},e.prototype.validateExtent_=function(){var t=this.getMap(),e=this.ovmap_;if(t.isRendered()&&e.isRendered()){var n=t.getSize(),r=t.getView().calculateExtentInternal(n);if(!this.viewExtent_||!Object(y.equals)(r,this.viewExtent_)){this.viewExtent_=r;var i=e.getSize(),o=e.getView().calculateExtentInternal(i),a=e.getPixelFromCoordinateInternal(Object(y.getTopLeft)(r)),s=e.getPixelFromCoordinateInternal(Object(y.getBottomRight)(r)),l=Math.abs(a[0]-s[0]),u=Math.abs(a[1]-s[1]),c=i[0],h=i[1];l<.1*c||u<.1*h||l>.75*c||u>.75*h?this.resetExtent_():Object(y.containsExtent)(o,r)||this.recenter_()}}},e.prototype.resetExtent_=function(){var t=this.getMap(),e=this.ovmap_,n=t.getSize(),r=t.getView().calculateExtentInternal(n),i=e.getView(),o=Math.log(7.5)/Math.LN2,a=1/(.1*Math.pow(2,o/2));Object(y.scaleFromCenter)(r,a),i.fitInternal(Object(v.d)(r))},e.prototype.recenter_=function(){var t=this.getMap(),e=this.ovmap_,n=t.getView();e.getView().setCenterInternal(n.getCenterInternal())},e.prototype.updateBox_=function(){var t=this.getMap(),e=this.ovmap_;if(t.isRendered()&&e.isRendered()){var n=t.getSize(),r=t.getView(),i=e.getView(),o=this.rotateWithView_?0:-r.getRotation(),a=this.boxOverlay_,s=this.boxOverlay_.getElement(),l=r.getCenterInternal(),u=r.getResolution(),c=i.getResolution(),h=n[0]*u/c,p=n[1]*u/c;if(a.setPosition(l),s){s.style.width=h+"px",s.style.height=p+"px";var f="rotate("+o+"rad)";s.style.transform=f}}},e.prototype.updateBoxAfterOvmapIsRendered_=function(){this.ovmapPostrenderKey_||(this.ovmapPostrenderKey_=Object(m.listenOnce)(this.ovmap_,s.a.POSTRENDER,function(t){delete this.ovmapPostrenderKey_,this.updateBox_()},this))},e.prototype.handleClick_=function(t){t.preventDefault(),this.handleToggle_()},e.prototype.handleToggle_=function(){this.element.classList.toggle(g.a),this.collapsed_?Object(_.g)(this.collapseLabel_,this.label_):Object(_.g)(this.label_,this.collapseLabel_),this.collapsed_=!this.collapsed_;var t=this.ovmap_;if(!this.collapsed_){if(t.isRendered())return this.viewExtent_=void 0,void t.render();t.updateSize(),this.resetExtent_(),this.updateBoxAfterOvmapIsRendered_()}},e.prototype.getCollapsible=function(){return this.collapsible_},e.prototype.setCollapsible=function(t){this.collapsible_!==t&&(this.collapsible_=t,this.element.classList.toggle("ol-uncollapsible"),!t&&this.collapsed_&&this.handleToggle_())},e.prototype.setCollapsed=function(t){this.collapsible_&&this.collapsed_!==t&&this.handleToggle_()},e.prototype.getCollapsed=function(){return this.collapsed_},e.prototype.getRotateWithView=function(){return this.rotateWithView_},e.prototype.setRotateWithView=function(t){this.rotateWithView_!==t&&(this.rotateWithView_=t,0!==this.getMap().getView().getRotation()&&(this.rotateWithView_?this.handleRotationChanged_():this.ovmap_.getView().setRotation(0),this.viewExtent_=void 0,this.validateExtent_(),this.updateBox_()))},e.prototype.getOverviewMap=function(){return this.ovmap_},e.prototype.render=function(t){this.validateExtent_(),this.updateBox_()},e}(o.a);e.a=O},function(t,e,n){"use strict";var r,i=n(69),o=n(13),a=n(6),s=n(14),l=n(0),u=n(173),c=n(54),h=n(20),p=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),f=function(t){function e(e){var n=t.call(this)||this;return n.map_=e,n}return p(e,t),e.prototype.dispatchRenderEvent=function(t,e){Object(a.b)()},e.prototype.calculateMatrices2D=function(t){var e=t.viewState,n=t.coordinateToPixelTransform,r=t.pixelToCoordinateTransform;Object(s.b)(n,t.size[0]/2,t.size[1]/2,1/e.resolution,-1/e.resolution,-e.rotation,-e.center[0],-e.center[1]),Object(s.d)(r,n)},e.prototype.forEachFeatureAtCoordinate=function(t,e,n,r,i,o,a,s){var u,p=e.viewState;function f(t,e,n,r){return i.call(o,e,t?n:null,r)}var d=p.projection,g=Object(h.l)(t.slice(),d),y=[[0,0]];if(d.canWrapX()&&r){var m=d.getExtent(),v=Object(l.getWidth)(m);y.push([-v,0],[v,0])}for(var _=e.layerStatesArray,b=_.length,w=[],O=[],x=0;x<y.length;x++)for(var E=b-1;E>=0;--E){var S=_[E],C=S.layer;if(C.hasRenderer()&&Object(c.b)(S,p)&&a.call(s,C)){var T=C.getRenderer(),I=C.getSource();if(T&&I){var j=I.getWrapX()?g:t,L=f.bind(null,S.managed);O[0]=j[0]+y[x][0],O[1]=j[1]+y[x][1],u=T.forEachFeatureAtCoordinate(O,e,n,L,w)}if(u)return u}}if(0!==w.length){var R=1/w.length;return w.forEach(function(t,e){return t.distanceSq+=e*R}),w.sort(function(t,e){return t.distanceSq-e.distanceSq}),w.some(function(t){return u=t.callback(t.feature,t.layer,t.geometry)}),u}},e.prototype.forEachLayerAtPixel=function(t,e,n,r,i){return Object(a.b)()},e.prototype.hasFeatureAtCoordinate=function(t,e,n,r,i,a){return void 0!==this.forEachFeatureAtCoordinate(t,e,n,r,o.b,this,i,a)},e.prototype.getMap=function(){return this.map_},e.prototype.renderFrame=function(t){Object(a.b)()},e.prototype.scheduleExpireIconCache=function(t){u.a.canExpireCache()&&t.postRenderFunctions.push(d)},e}(i.a);function d(t,e){u.a.expire()}e.a=f},function(t,e,n){"use strict";n.d(e,"a",function(){return o});var r=n(4),i=n(1),o=1/0,a=function(){function t(t,e){this.priorityFunction_=t,this.keyFunction_=e,this.elements_=[],this.priorities_=[],this.queuedElements_={}}return t.prototype.clear=function(){this.elements_.length=0,this.priorities_.length=0,Object(i.b)(this.queuedElements_)},t.prototype.dequeue=function(){var t=this.elements_,e=this.priorities_,n=t[0];1==t.length?(t.length=0,e.length=0):(t[0]=t.pop(),e[0]=e.pop(),this.siftUp_(0));var r=this.keyFunction_(n);return delete this.queuedElements_[r],n},t.prototype.enqueue=function(t){Object(r.a)(!(this.keyFunction_(t)in this.queuedElements_),31);var e=this.priorityFunction_(t);return e!=o&&(this.elements_.push(t),this.priorities_.push(e),this.queuedElements_[this.keyFunction_(t)]=!0,this.siftDown_(0,this.elements_.length-1),!0)},t.prototype.getCount=function(){return this.elements_.length},t.prototype.getLeftChildIndex_=function(t){return 2*t+1},t.prototype.getRightChildIndex_=function(t){return 2*t+2},t.prototype.getParentIndex_=function(t){return t-1>>1},t.prototype.heapify_=function(){var t;for(t=(this.elements_.length>>1)-1;t>=0;t--)this.siftUp_(t)},t.prototype.isEmpty=function(){return 0===this.elements_.length},t.prototype.isKeyQueued=function(t){return t in this.queuedElements_},t.prototype.isQueued=function(t){return this.isKeyQueued(this.keyFunction_(t))},t.prototype.siftUp_=function(t){for(var e=this.elements_,n=this.priorities_,r=e.length,i=e[t],o=n[t],a=t;t<r>>1;){var s=this.getLeftChildIndex_(t),l=this.getRightChildIndex_(t),u=l<r&&n[l]<n[s]?l:s;e[t]=e[u],n[t]=n[u],t=u}e[t]=i,n[t]=o,this.siftDown_(a,t)},t.prototype.siftDown_=function(t,e){for(var n=this.elements_,r=this.priorities_,i=n[e],o=r[e];e>t;){var a=this.getParentIndex_(e);if(!(r[a]>o))break;n[e]=n[a],r[e]=r[a],e=a}n[e]=i,r[e]=o},t.prototype.reprioritize=function(){var t,e,n,r=this.priorityFunction_,i=this.elements_,a=this.priorities_,s=0,l=i.length;for(e=0;e<l;++e)(n=r(t=i[e]))==o?delete this.queuedElements_[this.keyFunction_(t)]:(a[s]=n,i[s++]=t);i.length=s,a.length=s,this.heapify_()},t}();e.b=a},function(t,e,n){"use strict";e.a=function(t,e,n){return function(i,o,a,s,l){if(i){var u=e?0:a[0]*o,c=e?0:a[1]*o,h=l?l[0]:0,p=l?l[1]:0,f=t[0]+u/2+h,d=t[2]-u/2+h,g=t[1]+c/2+p,y=t[3]-c/2+p;f>d&&(d=f=(d+f)/2),g>y&&(y=g=(y+g)/2);var m=Object(r.a)(i[0],f,d),v=Object(r.a)(i[1],g,y),_=30*o;return s&&n&&(m+=-_*Math.log(1+Math.max(0,f-i[0])/_)+_*Math.log(1+Math.max(0,i[0]-d)/_),v+=-_*Math.log(1+Math.max(0,g-i[1])/_)+_*Math.log(1+Math.max(0,i[1]-y)/_)),[m,v]}}},e.b=function(t){return t};var r=n(7)},function(t,e,n){"use strict";e.a=function(t,e,n,r){for(;e<n-r;){for(var i=0;i<r;++i){var o=t[e+i];t[e+i]=t[n-r+i],t[n-r+i]=o}e+=r,n-=r}}},function(t,e,n){"use strict";var r,i=n(42),o=n(43),a=n(34),s=n(2),l=n(4),u=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),c="units",h={DEGREES:"degrees",IMPERIAL:"imperial",NAUTICAL:"nautical",METRIC:"metric",US:"us"},p=[1,2,5],f=function(t){function e(e){var n=this,r=e||{},i=void 0!==r.className?r.className:r.bar?"ol-scale-bar":"ol-scale-line";return(n=t.call(this,{element:document.createElement("div"),render:r.render,target:r.target})||this).on,n.once,n.un,n.innerElement_=document.createElement("div"),n.innerElement_.className=i+"-inner",n.element.className=i+" "+a.e,n.element.appendChild(n.innerElement_),n.viewState_=null,n.minWidth_=void 0!==r.minWidth?r.minWidth:64,n.renderedVisible_=!1,n.renderedWidth_=void 0,n.renderedHTML_="",n.addChangeListener(c,n.handleUnitsChanged_),n.setUnits(r.units||h.METRIC),n.scaleBar_=r.bar||!1,n.scaleBarSteps_=r.steps||4,n.scaleBarText_=r.text||!1,n.dpi_=r.dpi||void 0,n}return u(e,t),e.prototype.getUnits=function(){return this.get(c)},e.prototype.handleUnitsChanged_=function(){this.updateElement_()},e.prototype.setUnits=function(t){this.set(c,t)},e.prototype.setDpi=function(t){this.dpi_=t},e.prototype.updateElement_=function(){var t=this.viewState_;if(t){var e=t.center,n=t.projection,r=this.getUnits(),i=r==h.DEGREES?o.b.DEGREES:o.b.METERS,a=Object(s.getPointResolution)(n,t.resolution,e,i),u=this.minWidth_*(this.dpi_||25.4/.28)/(25.4/.28),c=u*a,f="";if(r==h.DEGREES){var d=s.METERS_PER_UNIT[o.b.DEGREES];(c*=d)<d/60?(f="\u2033",a*=3600):c<d?(f="\u2032",a*=60):f="\xb0"}else r==h.IMPERIAL?c<.9144?(f="in",a/=.0254):c<1609.344?(f="ft",a/=.3048):(f="mi",a/=1609.344):r==h.NAUTICAL?(a/=1852,f="nm"):r==h.METRIC?c<.001?(f="\u03bcm",a*=1e6):c<1?(f="mm",a*=1e3):c<1e3?f="m":(f="km",a/=1e3):r==h.US?c<.9144?(f="in",a*=39.37):c<1609.344?(f="ft",a/=.30480061):(f="mi",a/=1609.3472):Object(l.a)(!1,33);for(var g,y,m,v,_=3*Math.floor(Math.log(u*a)/Math.log(10));;){m=Math.floor(_/3);var b=Math.pow(10,m);if(g=p[(_%3+3)%3]*b,y=Math.round(g/a),isNaN(y))return this.element.style.display="none",void(this.renderedVisible_=!1);if(y>=u)break;++_}v=this.scaleBar_?this.createScaleBar(y,g,f):g.toFixed(m<0?-m:0)+" "+f,this.renderedHTML_!=v&&(this.innerElement_.innerHTML=v,this.renderedHTML_=v),this.renderedWidth_!=y&&(this.innerElement_.style.width=y+"px",this.renderedWidth_=y),this.renderedVisible_||(this.element.style.display="",this.renderedVisible_=!0)}else this.renderedVisible_&&(this.element.style.display="none",this.renderedVisible_=!1)},e.prototype.createScaleBar=function(t,e,n){for(var r="1 : "+Math.round(this.getScaleForResolution()).toLocaleString(),i=[],o=t/this.scaleBarSteps_,a="#ffffff",s=0;s<this.scaleBarSteps_;s++)0===s&&i.push(this.createMarker("absolute",s)),i.push('<div><div class="ol-scale-singlebar" style="width: '+o+"px;background-color: "+a+';"></div>'+this.createMarker("relative",s)+(s%2===0||2===this.scaleBarSteps_?this.createStepText(s,t,!1,e,n):"")+"</div>"),s===this.scaleBarSteps_-1&&i.push(this.createStepText(s+1,t,!0,e,n)),a="#ffffff"===a?"#000000":"#ffffff";return'<div style="display: flex;">'+(this.scaleBarText_?'<div class="ol-scale-text" style="width: '+t+'px;">'+r+"</div>":"")+i.join("")+"</div>"},e.prototype.createMarker=function(t,e){return'<div class="ol-scale-step-marker" style="position: '+t+";top: "+("absolute"===t?3:-10)+'px;"></div>'},e.prototype.createStepText=function(t,e,n,r,i){var o=(0===t?0:Math.round(r/this.scaleBarSteps_*t*100)/100)+(0===t?"":" "+i),a=0===t?-3:e/this.scaleBarSteps_*-1,s=0===t?0:e/this.scaleBarSteps_*2;return'<div class="ol-scale-step-text" style="margin-left: '+a+"px;text-align: "+(0===t?"left":"center")+"; min-width: "+s+"px;left: "+(n?e+"px":"unset")+';">'+o+"</div>"},e.prototype.getScaleForResolution=function(){var t=Object(s.getPointResolution)(this.viewState_.projection,this.viewState_.resolution,this.viewState_.center),e=this.dpi_||25.4/.28,n=this.viewState_.projection.getMetersPerUnit();return parseFloat(t.toString())*n*(1e3/25.4)*e},e.prototype.render=function(t){var e=t.frameState;this.viewState_=e?e.viewState:null,this.updateElement_()},e}(i.a);e.a=f},function(t,e,n){"use strict";var r,i=n(42),o=n(3),a=n(105),s=n(34),l=n(7),u=n(47),c=n(9),h=n(12),p=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),f={VERTICAL:0,HORIZONTAL:1},d=function(t){function e(e){var n=this,r=e||{};(n=t.call(this,{element:document.createElement("div"),render:r.render})||this).dragListenerKeys_=[],n.currentResolution_=void 0,n.direction_=f.VERTICAL,n.dragging_,n.heightLimit_=0,n.widthLimit_=0,n.startX_,n.startY_,n.thumbSize_=null,n.sliderInitialized_=!1,n.duration_=void 0!==r.duration?r.duration:200;var i=void 0!==r.className?r.className:"ol-zoomslider",l=document.createElement("button");l.setAttribute("type","button"),l.className=i+"-thumb "+s.e;var u=n.element;return u.className=i+" "+s.e+" "+s.b,u.appendChild(l),u.addEventListener(a.a.POINTERDOWN,n.handleDraggerStart_.bind(n),!1),u.addEventListener(a.a.POINTERMOVE,n.handleDraggerDrag_.bind(n),!1),u.addEventListener(a.a.POINTERUP,n.handleDraggerEnd_.bind(n),!1),u.addEventListener(o.a.CLICK,n.handleContainerClick_.bind(n),!1),l.addEventListener(o.a.CLICK,h.b,!1),n}return p(e,t),e.prototype.setMap=function(e){t.prototype.setMap.call(this,e),e&&e.render()},e.prototype.initSlider_=function(){var t=this.element,e=t.offsetWidth,n=t.offsetHeight;if(0===e&&0===n)return this.sliderInitialized_=!1;var r=getComputedStyle(t);e-=parseFloat(r.paddingRight)+parseFloat(r.paddingLeft),n-=parseFloat(r.paddingTop)+parseFloat(r.paddingBottom);var i=t.firstElementChild,o=getComputedStyle(i),a=i.offsetWidth+parseFloat(o.marginRight)+parseFloat(o.marginLeft),s=i.offsetHeight+parseFloat(o.marginTop)+parseFloat(o.marginBottom);return this.thumbSize_=[a,s],e>n?(this.direction_=f.HORIZONTAL,this.widthLimit_=e-a):(this.direction_=f.VERTICAL,this.heightLimit_=n-s),this.sliderInitialized_=!0},e.prototype.handleContainerClick_=function(t){var e=this.getMap().getView(),n=this.getRelativePosition_(t.offsetX-this.thumbSize_[0]/2,t.offsetY-this.thumbSize_[1]/2),r=this.getResolutionForPosition_(n),i=e.getConstrainedZoom(e.getZoomForResolution(r));e.animateInternal({zoom:i,duration:this.duration_,easing:u.b})},e.prototype.handleDraggerStart_=function(t){if(!this.dragging_&&t.target===this.element.firstElementChild){var e=this.element.firstElementChild;if(this.getMap().getView().beginInteraction(),this.startX_=t.clientX-parseFloat(e.style.left),this.startY_=t.clientY-parseFloat(e.style.top),this.dragging_=!0,0===this.dragListenerKeys_.length){var n=this.handleDraggerDrag_,r=this.handleDraggerEnd_,i=this.getMap().getOwnerDocument();this.dragListenerKeys_.push(Object(c.listen)(i,a.a.POINTERMOVE,n,this),Object(c.listen)(i,a.a.POINTERUP,r,this))}}},e.prototype.handleDraggerDrag_=function(t){if(this.dragging_){var e=t.clientX-this.startX_,n=t.clientY-this.startY_,r=this.getRelativePosition_(e,n);this.currentResolution_=this.getResolutionForPosition_(r),this.getMap().getView().setResolution(this.currentResolution_)}},e.prototype.handleDraggerEnd_=function(t){this.dragging_&&(this.getMap().getView().endInteraction(),this.dragging_=!1,this.startX_=void 0,this.startY_=void 0,this.dragListenerKeys_.forEach(c.unlistenByKey),this.dragListenerKeys_.length=0)},e.prototype.setThumbPosition_=function(t){var e=this.getPositionForResolution_(t),n=this.element.firstElementChild;this.direction_==f.HORIZONTAL?n.style.left=this.widthLimit_*e+"px":n.style.top=this.heightLimit_*e+"px"},e.prototype.getRelativePosition_=function(t,e){var n;return n=this.direction_===f.HORIZONTAL?t/this.widthLimit_:e/this.heightLimit_,Object(l.a)(n,0,1)},e.prototype.getResolutionForPosition_=function(t){return this.getMap().getView().getResolutionForValueFunction()(1-t)},e.prototype.getPositionForResolution_=function(t){var e=this.getMap().getView().getValueForResolutionFunction();return Object(l.a)(1-e(t),0,1)},e.prototype.render=function(t){if(t.frameState&&(this.sliderInitialized_||this.initSlider_())){var e=t.frameState.viewState.resolution;this.currentResolution_=e,this.setThumbPosition_(e)}},e}(i.a);e.a=d},function(t,e,n){"use strict";var r,i=n(42),o=n(3),a=n(34),s=n(10),l=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),u=function(t){function e(e){var n=this,r=e||{};(n=t.call(this,{element:document.createElement("div"),target:r.target})||this).extent=r.extent?r.extent:null;var i=void 0!==r.className?r.className:"ol-zoom-extent",s=void 0!==r.label?r.label:"E",l=void 0!==r.tipLabel?r.tipLabel:"Fit to extent",u=document.createElement("button");u.setAttribute("type","button"),u.title=l,u.appendChild("string"===typeof s?document.createTextNode(s):s),u.addEventListener(o.a.CLICK,n.handleClick_.bind(n),!1);var c=i+" "+a.e+" "+a.b,h=n.element;return h.className=c,h.appendChild(u),n}return l(e,t),e.prototype.handleClick_=function(t){t.preventDefault(),this.handleZoomToExtent()},e.prototype.handleZoomToExtent=function(){var t=this.getMap().getView(),e=this.extent?this.extent:t.getProjection().getExtent();t.fitInternal(Object(s.d)(e))},e}(i.a);e.a=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(191);n.d(e,"Graticule",function(){return r.a});var i=n(186);n.d(e,"Group",function(){return i.a});var o=n(279);n.d(e,"Heatmap",function(){return o.a});var a=n(204);n.d(e,"Image",function(){return a.a});var s=n(54);n.d(e,"Layer",function(){return s.a});var l=n(288);n.d(e,"MapboxVector",function(){return l.a});var u=n(93);n.d(e,"Tile",function(){return u.a});var c=n(49);n.d(e,"Vector",function(){return c.a});var h=n(310);n.d(e,"VectorImage",function(){return h.a});var p=n(148);n.d(e,"VectorTile",function(){return p.a});var f=n(312);n.d(e,"WebGLPoints",function(){return f.a})},function(t,e,n){"use strict";var r,i=n(87),o=n(73),a=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),s=function(t){function e(e,n,r,i){var o=t.call(this,e,n,r,i)||this;return o.hitDetectionImage_=null,o.image_=null,o.imagePixelRatio_=void 0,o.anchorX_=void 0,o.anchorY_=void 0,o.height_=void 0,o.opacity_=void 0,o.originX_=void 0,o.originY_=void 0,o.rotateWithView_=void 0,o.rotation_=void 0,o.scale_=void 0,o.width_=void 0,o.declutterImageWithText_=void 0,o}return a(e,t),e.prototype.drawPoint=function(t,e){if(this.image_){this.beginGeometry(t,e);var n=t.getFlatCoordinates(),r=t.getStride(),i=this.coordinates.length,a=this.appendFlatPointCoordinates(n,r);this.instructions.push([o.c.DRAW_IMAGE,i,a,this.image_,this.anchorX_*this.imagePixelRatio_,this.anchorY_*this.imagePixelRatio_,Math.ceil(this.height_*this.imagePixelRatio_),this.opacity_,this.originX_,this.originY_,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.declutterImageWithText_]),this.hitDetectionInstructions.push([o.c.DRAW_IMAGE,i,a,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.height_,this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.width_,this.declutterImageWithText_]),this.endGeometry(e)}},e.prototype.drawMultiPoint=function(t,e){if(this.image_){this.beginGeometry(t,e);var n=t.getFlatCoordinates(),r=t.getStride(),i=this.coordinates.length,a=this.appendFlatPointCoordinates(n,r);this.instructions.push([o.c.DRAW_IMAGE,i,a,this.image_,this.anchorX_*this.imagePixelRatio_,this.anchorY_*this.imagePixelRatio_,Math.ceil(this.height_*this.imagePixelRatio_),this.opacity_,this.originX_,this.originY_,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.declutterImageWithText_]),this.hitDetectionInstructions.push([o.c.DRAW_IMAGE,i,a,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.height_,this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.width_,this.declutterImageWithText_]),this.endGeometry(e)}},e.prototype.finish=function(){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,t.prototype.finish.call(this)},e.prototype.setImageStyle=function(t,e){var n=t.getAnchor(),r=t.getSize(),i=t.getHitDetectionImage(),o=t.getImage(this.pixelRatio),a=t.getOrigin();this.imagePixelRatio_=t.getPixelRatio(this.pixelRatio),this.anchorX_=n[0],this.anchorY_=n[1],this.hitDetectionImage_=i,this.image_=o,this.height_=r[1],this.opacity_=t.getOpacity(),this.originX_=a[0],this.originY_=a[1],this.rotateWithView_=t.getRotateWithView(),this.rotation_=t.getRotation(),this.scale_=t.getScaleArray(),this.width_=r[0],this.declutterImageWithText_=e},e}(i.a);e.a=s},function(t,e,n){"use strict";var r,i=n(87),o=n(73),a=n(40),s=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),l=function(t){function e(e,n,r,i){return t.call(this,e,n,r,i)||this}return s(e,t),e.prototype.drawFlatCoordinates_=function(t,e,n,r){var i=this.coordinates.length,a=this.appendFlatLineCoordinates(t,e,n,r,!1,!1),s=[o.c.MOVE_TO_LINE_TO,i,a];return this.instructions.push(s),this.hitDetectionInstructions.push(s),n},e.prototype.drawLineString=function(t,e){var n=this.state,r=n.strokeStyle,i=n.lineWidth;if(void 0!==r&&void 0!==i){this.updateStrokeStyle(n,this.applyStroke),this.beginGeometry(t,e),this.hitDetectionInstructions.push([o.c.SET_STROKE_STYLE,n.strokeStyle,n.lineWidth,n.lineCap,n.lineJoin,n.miterLimit,a.e,a.f],o.a);var s=t.getFlatCoordinates(),l=t.getStride();this.drawFlatCoordinates_(s,0,s.length,l),this.hitDetectionInstructions.push(o.e),this.endGeometry(e)}},e.prototype.drawMultiLineString=function(t,e){var n=this.state,r=n.strokeStyle,i=n.lineWidth;if(void 0!==r&&void 0!==i){this.updateStrokeStyle(n,this.applyStroke),this.beginGeometry(t,e),this.hitDetectionInstructions.push([o.c.SET_STROKE_STYLE,n.strokeStyle,n.lineWidth,n.lineCap,n.lineJoin,n.miterLimit,n.lineDash,n.lineDashOffset],o.a);for(var a=t.getEnds(),s=t.getFlatCoordinates(),l=t.getStride(),u=0,c=0,h=a.length;c<h;++c)u=this.drawFlatCoordinates_(s,u,a[c],l);this.hitDetectionInstructions.push(o.e),this.endGeometry(e)}},e.prototype.finish=function(){var e=this.state;return void 0!=e.lastStroke&&e.lastStroke!=this.coordinates.length&&this.instructions.push(o.e),this.reverseHitDetectionInstructions(),this.state=null,t.prototype.finish.call(this)},e.prototype.applyStroke=function(e){void 0!=e.lastStroke&&e.lastStroke!=this.coordinates.length&&(this.instructions.push(o.e),e.lastStroke=this.coordinates.length),e.lastStroke=0,t.prototype.applyStroke.call(this,e),this.instructions.push(o.a)},e}(i.a);e.a=l},function(t,e,n){"use strict";var r,i=n(87),o=n(73),a=n(40),s=n(72),l=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),u=function(t){function e(e,n,r,i){return t.call(this,e,n,r,i)||this}return l(e,t),e.prototype.drawFlatCoordinatess_=function(t,e,n,r){var i=this.state,a=void 0!==i.fillStyle,s=void 0!==i.strokeStyle,l=n.length;this.instructions.push(o.a),this.hitDetectionInstructions.push(o.a);for(var u=0;u<l;++u){var c=n[u],h=this.coordinates.length,p=this.appendFlatLineCoordinates(t,e,c,r,!0,!s),f=[o.c.MOVE_TO_LINE_TO,h,p];this.instructions.push(f),this.hitDetectionInstructions.push(f),s&&(this.instructions.push(o.b),this.hitDetectionInstructions.push(o.b)),e=c}return a&&(this.instructions.push(o.d),this.hitDetectionInstructions.push(o.d)),s&&(this.instructions.push(o.e),this.hitDetectionInstructions.push(o.e)),e},e.prototype.drawCircle=function(t,e){var n=this.state,r=n.fillStyle,i=n.strokeStyle;if(void 0!==r||void 0!==i){this.setFillStrokeStyles_(),this.beginGeometry(t,e),void 0!==n.fillStyle&&this.hitDetectionInstructions.push([o.c.SET_FILL_STYLE,a.b]),void 0!==n.strokeStyle&&this.hitDetectionInstructions.push([o.c.SET_STROKE_STYLE,n.strokeStyle,n.lineWidth,n.lineCap,n.lineJoin,n.miterLimit,n.lineDash,n.lineDashOffset]);var s=t.getFlatCoordinates(),l=t.getStride(),u=this.coordinates.length;this.appendFlatLineCoordinates(s,0,s.length,l,!1,!1);var c=[o.c.CIRCLE,u];this.instructions.push(o.a,c),this.hitDetectionInstructions.push(o.a,c),void 0!==n.fillStyle&&(this.instructions.push(o.d),this.hitDetectionInstructions.push(o.d)),void 0!==n.strokeStyle&&(this.instructions.push(o.e),this.hitDetectionInstructions.push(o.e)),this.endGeometry(e)}},e.prototype.drawPolygon=function(t,e){var n=this.state,r=n.fillStyle,i=n.strokeStyle;if(void 0!==r||void 0!==i){this.setFillStrokeStyles_(),this.beginGeometry(t,e),void 0!==n.fillStyle&&this.hitDetectionInstructions.push([o.c.SET_FILL_STYLE,a.b]),void 0!==n.strokeStyle&&this.hitDetectionInstructions.push([o.c.SET_STROKE_STYLE,n.strokeStyle,n.lineWidth,n.lineCap,n.lineJoin,n.miterLimit,n.lineDash,n.lineDashOffset]);var s=t.getEnds(),l=t.getOrientedFlatCoordinates(),u=t.getStride();this.drawFlatCoordinatess_(l,0,s,u),this.endGeometry(e)}},e.prototype.drawMultiPolygon=function(t,e){var n=this.state,r=n.fillStyle,i=n.strokeStyle;if(void 0!==r||void 0!==i){this.setFillStrokeStyles_(),this.beginGeometry(t,e),void 0!==n.fillStyle&&this.hitDetectionInstructions.push([o.c.SET_FILL_STYLE,a.b]),void 0!==n.strokeStyle&&this.hitDetectionInstructions.push([o.c.SET_STROKE_STYLE,n.strokeStyle,n.lineWidth,n.lineCap,n.lineJoin,n.miterLimit,n.lineDash,n.lineDashOffset]);for(var s=t.getEndss(),l=t.getOrientedFlatCoordinates(),u=t.getStride(),c=0,h=0,p=s.length;h<p;++h)c=this.drawFlatCoordinatess_(l,c,s[h],u);this.endGeometry(e)}},e.prototype.finish=function(){this.reverseHitDetectionInstructions(),this.state=null;var e=this.tolerance;if(0!==e)for(var n=this.coordinates,r=0,i=n.length;r<i;++r)n[r]=Object(s.e)(n[r],e);return t.prototype.finish.call(this)},e.prototype.setFillStrokeStyles_=function(){var t=this.state;void 0!==t.fillStyle&&this.updateFillStyle(t,this.createFill),void 0!==t.strokeStyle&&this.updateStrokeStyle(t,this.applyStroke)},e}(i.a);e.a=u},function(t,e,n){"use strict";e.a=function(t,e,n,r,i){var o,a,s,l,u,c,h,p,f,d=n,g=n,y=0,m=0,v=n;for(o=n;o<r;o+=i){var _=e[o],b=e[o+1];void 0!==l&&(p=_-l,f=b-u,s=Math.sqrt(p*p+f*f),void 0!==c&&(m+=a,Math.acos((c*p+h*f)/(a*s))>t&&(m>y&&(y=m,d=v,g=o),m=0,v=o-i)),a=s,c=p,h=f),l=_,u=b}return(m+=s)>y?[v,o]:[d,g]}},function(t,e,n){"use strict";var r=n(73),i=n(196),o=n(39),a=n(14),s=n(0),l=n(40),u=n(275),c=n(5),h=n(192),p=n(56),f=Object(s.createEmpty)(),d=[],g=[],y=[],m=[];function v(t){return t[3].declutterBox}var _=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 b(t,e){return"start"!==e&&"end"!==e||_.test(t)||(e="start"===e?"left":"right"),i.a[e]}var w=function(){function t(t,e,n,r){this.overlaps=n,this.pixelRatio=e,this.resolution=t,this.alignFill_,this.instructions=r.instructions,this.coordinates=r.coordinates,this.coordinateCache_={},this.renderedTransform_=Object(a.c)(),this.hitDetectionInstructions=r.hitDetectionInstructions,this.pixelCoordinates_=null,this.viewRotation_=0,this.fillStates=r.fillStates||{},this.strokeStates=r.strokeStates||{},this.textStates=r.textStates||{},this.widths_={},this.labels_={}}return t.prototype.createLabel=function(t,e,n,r){var i=t+e+n+r;if(this.labels_[i])return this.labels_[i];var a=r?this.strokeStates[r]:null,s=n?this.fillStates[n]:null,u=this.textStates[e],c=this.pixelRatio,h=[u.scale[0]*c,u.scale[1]*c],p=b(t,u.textAlign||l.l),f=r&&a.lineWidth?a.lineWidth:0,d=t.split("\n"),g=d.length,y=[],m=Object(l.r)(u.font,d,y),v=Object(l.q)(u.font),_=m+f,w=[],O=(_+2)*h[0],x=(v*g+f)*h[1],E={width:O<0?Math.floor(O):Math.ceil(O),height:x<0?Math.floor(x):Math.ceil(x),contextInstructions:w};(1==h[0]&&1==h[1]||w.push("scale",h),w.push("font",u.font),r)&&(w.push("strokeStyle",a.strokeStyle),w.push("lineWidth",f),w.push("lineCap",a.lineCap),w.push("lineJoin",a.lineJoin),w.push("miterLimit",a.miterLimit),(o.g?OffscreenCanvasRenderingContext2D:CanvasRenderingContext2D).prototype.setLineDash&&(w.push("setLineDash",[a.lineDash]),w.push("lineDashOffset",a.lineDashOffset)));n&&w.push("fillStyle",s.fillStyle),w.push("textBaseline","middle"),w.push("textAlign","center");var S,C=.5-p,T=p*_+C*f;if(r)for(S=0;S<g;++S)w.push("strokeText",[d[S],T+C*y[S],.5*(f+v)+S*v]);if(n)for(S=0;S<g;++S)w.push("fillText",[d[S],T+C*y[S],.5*(f+v)+S*v]);return this.labels_[i]=E,E},t.prototype.replayTextBackground_=function(t,e,n,r,i,o,a){t.beginPath(),t.moveTo.apply(t,e),t.lineTo.apply(t,n),t.lineTo.apply(t,r),t.lineTo.apply(t,i),t.lineTo.apply(t,e),o&&(this.alignFill_=o[2],this.fill_(t)),a&&(this.setStrokeStyle_(t,a),t.stroke())},t.prototype.calculateImageOrLabelDimensions_=function(t,e,n,r,i,o,l,u,c,h,p,v,_,b,w,O){var x,E=n-(l*=v[0]),S=r-(u*=v[1]),C=i+c>t?t-c:i,T=o+h>e?e-h:o,I=b[3]+C*v[0]+b[1],j=b[0]+T*v[1]+b[2],L=E-b[3],R=S-b[0];return(w||0!==p)&&(d[0]=L,m[0]=L,d[1]=R,g[1]=R,g[0]=L+I,y[0]=g[0],y[1]=R+j,m[1]=y[1]),0!==p?(x=Object(a.b)(Object(a.c)(),n,r,1,1,p,-n,-r),Object(a.a)(x,d),Object(a.a)(x,g),Object(a.a)(x,y),Object(a.a)(x,m),Object(s.createOrUpdate)(Math.min(d[0],g[0],y[0],m[0]),Math.min(d[1],g[1],y[1],m[1]),Math.max(d[0],g[0],y[0],m[0]),Math.max(d[1],g[1],y[1],m[1]),f)):Object(s.createOrUpdate)(Math.min(L,L+I),Math.min(R,R+j),Math.max(L,L+I),Math.max(R,R+j),f),_&&(E=Math.round(E),S=Math.round(S)),{drawImageX:E,drawImageY:S,drawImageW:C,drawImageH:T,originX:c,originY:h,declutterBox:{minX:f[0],minY:f[1],maxX:f[2],maxY:f[3],value:O},canvasTransform:x,scale:v}},t.prototype.replayImageOrLabel_=function(t,e,n,r,i,o,a){var s=!(!o&&!a),u=r.declutterBox,c=t.canvas,h=a?a[2]*r.scale[0]/2:0;return u.minX-h<=c.width/e&&u.maxX+h>=0&&u.minY-h<=c.height/e&&u.maxY+h>=0&&(s&&this.replayTextBackground_(t,d,g,y,m,o,a),Object(l.n)(t,r.canvasTransform,i,n,r.originX,r.originY,r.drawImageW,r.drawImageH,r.drawImageX,r.drawImageY,r.scale)),!0},t.prototype.fill_=function(t){if(this.alignFill_){var e=Object(a.a)(this.renderedTransform_,[0,0]),n=512*this.pixelRatio;t.save(),t.translate(e[0]%n,e[1]%n),t.rotate(this.viewRotation_)}t.fill(),this.alignFill_&&t.restore()},t.prototype.setStrokeStyle_=function(t,e){t.strokeStyle=e[1],t.lineWidth=e[2],t.lineCap=e[3],t.lineJoin=e[4],t.miterLimit=e[5],t.setLineDash&&(t.lineDashOffset=e[7],t.setLineDash(e[6]))},t.prototype.drawLabelWithPointPlacement_=function(t,e,n,r){var o=this.textStates[e],a=this.createLabel(t,e,r,n),s=this.strokeStates[n],u=this.pixelRatio,c=b(t,o.textAlign||l.l),h=i.a[o.textBaseline||l.m],p=s&&s.lineWidth?s.lineWidth:0;return{label:a,anchorX:c*(a.width/u-2*o.scale[0])+2*(.5-c)*p,anchorY:h*a.height/u+2*(.5-h)*p}},t.prototype.execute_=function(t,e,n,o,f,d,g,y){var m;this.pixelCoordinates_&&Object(c.b)(n,this.renderedTransform_)?m=this.pixelCoordinates_:(this.pixelCoordinates_||(this.pixelCoordinates_=[]),m=Object(p.c)(this.coordinates,0,this.coordinates.length,2,n,this.pixelCoordinates_),Object(a.j)(this.renderedTransform_,n));for(var _,b,w,O,x,E,S,C,T,I,j,L,R,P,N,M,A=0,k=o.length,F=0,D=0,G=0,U=null,z=null,B=this.coordinateCache_,V=this.viewRotation_,Y=Math.round(1e12*Math.atan2(-n[1],n[0]))/1e12,q={context:t,pixelRatio:this.pixelRatio,resolution:this.resolution,rotation:V},X=this.instructions!=o||this.overlaps?0:200;A<k;){var W=o[A];switch(W[0]){case r.c.BEGIN_GEOMETRY:R=W[1],M=W[3],R.getGeometry()?void 0===g||Object(s.intersects)(g,M.getExtent())?++A:A=W[2]+1:A=W[2];break;case r.c.BEGIN_PATH:D>X&&(this.fill_(t),D=0),G>X&&(t.stroke(),G=0),D||G||(t.beginPath(),O=NaN,x=NaN),++A;break;case r.c.CIRCLE:var H=m[F=W[1]],K=m[F+1],Z=m[F+2]-H,J=m[F+3]-K,$=Math.sqrt(Z*Z+J*J);t.moveTo(H+$,K),t.arc(H,K,$,0,2*Math.PI,!0),++A;break;case r.c.CLOSE_PATH:t.closePath(),++A;break;case r.c.CUSTOM:F=W[1],_=W[2];var Q=W[3],tt=W[4],et=6==W.length?W[5]:void 0;q.geometry=Q,q.feature=R,A in B||(B[A]=[]);var nt=B[A];et?et(m,F,_,2,nt):(nt[0]=m[F],nt[1]=m[F+1],nt.length=2),tt(nt,q),++A;break;case r.c.DRAW_IMAGE:F=W[1],_=W[2],C=W[3],b=W[4],w=W[5];var rt=W[6],it=W[7],ot=W[8],at=W[9],st=W[10],lt=W[11],ut=W[12],ct=W[13],ht=W[14];if(!C&&W.length>=19){T=W[18],I=W[19],j=W[20],L=W[21];var pt=this.drawLabelWithPointPlacement_(T,I,j,L);C=pt.label,W[3]=C;var ft=W[22];b=(pt.anchorX-ft)*this.pixelRatio,W[4]=b;var dt=W[23];w=(pt.anchorY-dt)*this.pixelRatio,W[5]=w,rt=C.height,W[6]=rt,ct=C.width,W[13]=ct}var gt=void 0;W.length>24&&(gt=W[24]);var yt=void 0,mt=void 0,vt=void 0;W.length>16?(yt=W[15],mt=W[16],vt=W[17]):(yt=l.j,mt=!1,vt=!1),st&&Y?lt+=V:st||Y||(lt-=V);for(var _t=0;F<_;F+=2)if(!(gt&&gt[_t++]<ct/this.pixelRatio)){var bt=[t,e,C,Ht=this.calculateImageOrLabelDimensions_(C.width,C.height,m[F],m[F+1],ct,rt,b,w,ot,at,lt,ut,f,yt,mt||vt,R),it,mt?U:null,vt?z:null],wt=void 0,Ot=void 0;if(y&&ht){var xt=_-F;if(!ht[xt]){ht[xt]=bt;continue}if(wt=ht[xt],delete ht[xt],Ot=v(wt),y.collides(Ot))continue}y&&y.collides(Ht.declutterBox)||(wt&&(y&&y.insert(Ot),this.replayImageOrLabel_.apply(this,wt)),y&&y.insert(Ht.declutterBox),this.replayImageOrLabel_.apply(this,bt))}++A;break;case r.c.DRAW_CHARS:var Et=W[1],St=W[2],Ct=W[3],Tt=W[4];L=W[5];var It=W[6],jt=W[7],Lt=W[8];j=W[9];var Rt=W[10];T=W[11],I=W[12];var Pt=[W[13],W[13]],Nt=this.textStates[I],Mt=Nt.font,At=[Nt.scale[0]*jt,Nt.scale[1]*jt],kt=void 0;Mt in this.widths_?kt=this.widths_[Mt]:(kt={},this.widths_[Mt]=kt);var Ft=Object(h.a)(m,Et,St,2),Dt=Math.abs(At[0])*Object(l.p)(Mt,T,kt);if(Tt||Dt<=Ft){var Gt=this.textStates[I].textAlign,Ut=(Ft-Dt)*i.a[Gt],zt=Object(u.a)(m,Et,St,2,T,Ut,It,Math.abs(At[0]),l.p,Mt,kt,Y?0:this.viewRotation_);t:if(zt){var Bt=[],Vt=void 0,Yt=void 0,qt=void 0,Xt=void 0,Wt=void 0;if(j)for(Vt=0,Yt=zt.length;Vt<Yt;++Vt){qt=(Wt=zt[Vt])[4],Xt=this.createLabel(qt,I,"",j),b=Wt[2]+(At[0]<0?-Rt:Rt),w=Ct*Xt.height+2*(.5-Ct)*Rt*At[1]/At[0]-Lt;var Ht=this.calculateImageOrLabelDimensions_(Xt.width,Xt.height,Wt[0],Wt[1],Xt.width,Xt.height,b,w,0,0,Wt[3],Pt,!1,l.j,!1,R);if(y&&y.collides(Ht.declutterBox))break t;Bt.push([t,e,Xt,Ht,1,null,null])}if(L)for(Vt=0,Yt=zt.length;Vt<Yt;++Vt){qt=(Wt=zt[Vt])[4],Xt=this.createLabel(qt,I,L,""),b=Wt[2],w=Ct*Xt.height-Lt;Ht=this.calculateImageOrLabelDimensions_(Xt.width,Xt.height,Wt[0],Wt[1],Xt.width,Xt.height,b,w,0,0,Wt[3],Pt,!1,l.j,!1,R);if(y&&y.collides(Ht.declutterBox))break t;Bt.push([t,e,Xt,Ht,1,null,null])}y&&y.load(Bt.map(v));for(var Kt=0,Zt=Bt.length;Kt<Zt;++Kt)this.replayImageOrLabel_.apply(this,Bt[Kt])}}++A;break;case r.c.END_GEOMETRY:if(void 0!==d){var Jt=d(R=W[1],M);if(Jt)return Jt}++A;break;case r.c.FILL:X?D++:this.fill_(t),++A;break;case r.c.MOVE_TO_LINE_TO:for(F=W[1],_=W[2],P=m[F],S=(N=m[F+1])+.5|0,(E=P+.5|0)===O&&S===x||(t.moveTo(P,N),O=E,x=S),F+=2;F<_;F+=2)E=(P=m[F])+.5|0,S=(N=m[F+1])+.5|0,F!=_-2&&E===O&&S===x||(t.lineTo(P,N),O=E,x=S);++A;break;case r.c.SET_FILL_STYLE:U=W,this.alignFill_=W[2],D&&(this.fill_(t),D=0,G&&(t.stroke(),G=0)),t.fillStyle=W[1],++A;break;case r.c.SET_STROKE_STYLE:z=W,G&&(t.stroke(),G=0),this.setStrokeStyle_(t,W),++A;break;case r.c.STROKE:X?G++:t.stroke(),++A;break;default:++A}}D&&this.fill_(t),G&&t.stroke()},t.prototype.execute=function(t,e,n,r,i,o){this.viewRotation_=r,this.execute_(t,e,n,this.instructions,i,void 0,void 0,o)},t.prototype.executeHitDetection=function(t,e,n,r,i){return this.viewRotation_=n,this.execute_(t,1,e,this.hitDetectionInstructions,!0,r,i)},t}();e.a=w},function(t,e,n){"use strict";e.a=function(t,e,n,o,a,s,l,u,c,h,p,f){var d=t[e],g=t[e+1],y=0,m=0,v=0,_=0;function b(){y=d,m=g,d=t[e+=o],g=t[e+1],_+=v,v=Math.sqrt((d-y)*(d-y)+(g-m)*(g-m))}do{b()}while(e<n-o&&_+v<s);var w=(s-_)/v,O=Object(r.c)(y,d,w),x=Object(r.c)(m,g,w),E=e-o,S=_,C=s+u*c(h,a,p);for(;e<n-o&&_+v<C;)b();w=(C-_)/v;var T,I=Object(r.c)(y,d,w),j=Object(r.c)(m,g,w);if(f){var L=[O,x,I,j];Object(i.a)(L,0,4,2,f,L,L),T=L[0]>L[2]}else T=O>I;var R,P=Math.PI,N=[],M=E+o===e;if(v=0,_=S,d=t[e=E],g=t[e+1],M){b();var A=Math.atan2(g-m,d-y);T&&(A+=A>0?-P:P);var k=(I+O)/2,F=(j+x)/2;return N[0]=[k,F,(C-s)/2,A,a],N}for(var D=0,G=a.length;D<G;){b();var U=Math.atan2(g-m,d-y);if(T&&(U+=U>0?-P:P),void 0!==R){var z=U-R;if(z+=z>P?-2*P:z<-P?2*P:0,Math.abs(z)>l)return null}R=U;for(var B=D,V=0;D<G;++D){var Y=T?G-D-1:D,q=u*c(h,a[Y],p);if(e+o<n&&_+v<s+V+q/2)break;V+=q}if(D!==B){var X=T?a.substring(G-B,G-D):a.substring(B,D);w=(s+V/2-_)/v;var k=Object(r.c)(y,d,w),F=Object(r.c)(m,g,w);N.push([k,F,V/2,U,X]),s+=V}}return N};var r=n(7),i=n(56)},function(t,e,n){"use strict";e.a=function(t,e){return[[-1/0,-1/0,1/0,1/0]]}},function(t,e,n){"use strict";e.a=function(t){var e,n=t.inversePixelTransform[0],s=t.frameState,l=Object(i.f)(t.inversePixelTransform.slice(),s.coordinateToPixelTransform),u=Object(o.b)(s.viewState.resolution,n),c=Object(a.getUserProjection)();c&&(e=Object(a.getTransformFromProjections)(c,s.viewState.projection));return new r.a(t.context,n,s.extent,l,s.viewState.rotation,u,e)};var r=n(200),i=(n(39),n(14)),o=n(145),a=n(2)},function(t,e,n){"use strict";e.a=function(t,e,n,i,a){var s=Object(r.get)("EPSG:4326");return o(function(r){return[t,e+(n-e)*r]},Object(r.getTransform)(s,i),a)},e.b=function(t,e,n,i,a){var s=Object(r.get)("EPSG:4326");return o(function(r){return[e+(n-e)*r,t]},Object(r.getTransform)(s,i),a)};var r=n(2),i=n(7);function o(t,e,n){for(var r,o,a,s,l,u,c=[],h=t(0),p=t(1),f=e(h),d=e(p),g=[p,h],y=[d,f],m=[1,0],v={},_=1e5;--_>0&&m.length>0;)a=m.pop(),h=g.pop(),f=y.pop(),(u=a.toString())in v||(c.push(f[0],f[1]),v[u]=!0),s=m.pop(),p=g.pop(),d=y.pop(),o=e(r=t(l=(a+s)/2)),Object(i.h)(o[0],o[1],f[0],f[1],d[0],d[1])<n?(c.push(d[0],d[1]),v[u=s.toString()]=!0):(m.push(s,l,l,a),y.push(d,o,o,f),g.push(p,r,r,h));return c}},function(t,e,n){"use strict";var r,i=n(49),o=n(202),a=n(1),s=n(7),l=n(11),u=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),c={BLUR:"blur",GRADIENT:"gradient",RADIUS:"radius"},h=["#00f","#0ff","#0f0","#ff0","#f00"],p=function(t){function e(e){var n=this,r=e||{},i=Object(a.a)({},r);delete i.gradient,delete i.radius,delete i.blur,delete i.weight,(n=t.call(this,i)||this).gradient_=null,n.addChangeListener(c.GRADIENT,n.handleGradientChanged_),n.setGradient(r.gradient?r.gradient:h),n.setBlur(void 0!==r.blur?r.blur:15),n.setRadius(void 0!==r.radius?r.radius:8);var o=r.weight?r.weight:"weight";return n.weightFunction_="string"===typeof o?function(t){return t.get(o)}:o,n.setRenderOrder(null),n}return u(e,t),e.prototype.getBlur=function(){return this.get(c.BLUR)},e.prototype.getGradient=function(){return this.get(c.GRADIENT)},e.prototype.getRadius=function(){return this.get(c.RADIUS)},e.prototype.handleGradientChanged_=function(){this.gradient_=function(t){for(var e=Object(l.a)(1,256),n=e.createLinearGradient(0,0,1,256),r=1/(t.length-1),i=0,o=t.length;i<o;++i)n.addColorStop(i*r,t[i]);return e.fillStyle=n,e.fillRect(0,0,1,256),e.canvas}(this.getGradient())},e.prototype.setBlur=function(t){this.set(c.BLUR,t)},e.prototype.setGradient=function(t){this.set(c.GRADIENT,t)},e.prototype.setRadius=function(t){this.set(c.RADIUS,t)},e.prototype.createRenderer=function(){return new o.a(this,{className:this.getClassName(),attributes:[{name:"weight",callback:function(t){var e=this.weightFunction_(t);return void 0!==e?Object(s.a)(e,0,1):1}.bind(this)}],vertexShader:"\n        precision mediump float;\n        uniform mat4 u_projectionMatrix;\n        uniform mat4 u_offsetScaleMatrix;\n        uniform float u_size;\n        attribute vec2 a_position;\n        attribute float a_index;\n        attribute float a_weight;\n\n        varying vec2 v_texCoord;\n        varying float v_weight;\n\n        void main(void) {\n          mat4 offsetMatrix = u_offsetScaleMatrix;\n          float offsetX = a_index == 0.0 || a_index == 3.0 ? -u_size / 2.0 : u_size / 2.0;\n          float offsetY = a_index == 0.0 || a_index == 1.0 ? -u_size / 2.0 : u_size / 2.0;\n          vec4 offsets = offsetMatrix * vec4(offsetX, offsetY, 0.0, 0.0);\n          gl_Position = u_projectionMatrix * vec4(a_position, 0.0, 1.0) + offsets;\n          float u = a_index == 0.0 || a_index == 3.0 ? 0.0 : 1.0;\n          float v = a_index == 0.0 || a_index == 1.0 ? 0.0 : 1.0;\n          v_texCoord = vec2(u, v);\n          v_weight = a_weight;\n        }",fragmentShader:"\n        precision mediump float;\n        uniform float u_blurSlope;\n\n        varying vec2 v_texCoord;\n        varying float v_weight;\n\n        void main(void) {\n          vec2 texCoord = v_texCoord * 2.0 - vec2(1.0, 1.0);\n          float sqRadius = texCoord.x * texCoord.x + texCoord.y * texCoord.y;\n          float value = (1.0 - sqrt(sqRadius)) * u_blurSlope;\n          float alpha = smoothstep(0.0, 1.0, value) * v_weight;\n          gl_FragColor = vec4(alpha, alpha, alpha, alpha);\n        }",hitVertexShader:"\n        precision mediump float;\n        uniform mat4 u_projectionMatrix;\n        uniform mat4 u_offsetScaleMatrix;\n        uniform float u_size;\n        attribute vec2 a_position;\n        attribute float a_index;\n        attribute float a_weight;\n        attribute vec4 a_hitColor;\n\n        varying vec2 v_texCoord;\n        varying float v_weight;\n        varying vec4 v_hitColor;\n\n        void main(void) {\n          mat4 offsetMatrix = u_offsetScaleMatrix;\n          float offsetX = a_index == 0.0 || a_index == 3.0 ? -u_size / 2.0 : u_size / 2.0;\n          float offsetY = a_index == 0.0 || a_index == 1.0 ? -u_size / 2.0 : u_size / 2.0;\n          vec4 offsets = offsetMatrix * vec4(offsetX, offsetY, 0.0, 0.0);\n          gl_Position = u_projectionMatrix * vec4(a_position, 0.0, 1.0) + offsets;\n          float u = a_index == 0.0 || a_index == 3.0 ? 0.0 : 1.0;\n          float v = a_index == 0.0 || a_index == 1.0 ? 0.0 : 1.0;\n          v_texCoord = vec2(u, v);\n          v_hitColor = a_hitColor;\n          v_weight = a_weight;\n        }",hitFragmentShader:"\n        precision mediump float;\n        uniform float u_blurSlope;\n\n        varying vec2 v_texCoord;\n        varying float v_weight;\n        varying vec4 v_hitColor;\n\n        void main(void) {\n          vec2 texCoord = v_texCoord * 2.0 - vec2(1.0, 1.0);\n          float sqRadius = texCoord.x * texCoord.x + texCoord.y * texCoord.y;\n          float value = (1.0 - sqrt(sqRadius)) * u_blurSlope;\n          float alpha = smoothstep(0.0, 1.0, value) * v_weight;\n          if (alpha < 0.05) {\n            discard;\n          }\n\n          gl_FragColor = v_hitColor;\n        }",uniforms:{u_size:function(){return 2*(this.get(c.RADIUS)+this.get(c.BLUR))}.bind(this),u_blurSlope:function(){return this.get(c.RADIUS)/Math.max(1,this.get(c.BLUR))}.bind(this)},postProcesses:[{fragmentShader:"\n            precision mediump float;\n\n            uniform sampler2D u_image;\n            uniform sampler2D u_gradientTexture;\n\n            varying vec2 v_texCoord;\n\n            void main() {\n              vec4 color = texture2D(u_image, v_texCoord);\n              gl_FragColor.a = color.a;\n              gl_FragColor.rgb = texture2D(u_gradientTexture, vec2(0.5, color.a)).rgb;\n              gl_FragColor.rgb *= gl_FragColor.a;\n            }",uniforms:{u_gradientTexture:function(){return this.gradient_}.bind(this)}}]})},e.prototype.renderDeclutter=function(){},e}(i.a);e.a=p},function(t,e,n){"use strict";var r=n(115),i=n(4),o={STATIC_DRAW:r.e,STREAM_DRAW:r.f,DYNAMIC_DRAW:r.b},a=function(){function t(t,e){this.array=null,this.type=t,Object(i.a)(t===r.a||t===r.c,62),this.usage=void 0!==e?e:o.STATIC_DRAW}return t.prototype.ofSize=function(t){this.array=new(s(this.type))(t)},t.prototype.fromArray=function(t){this.array=s(this.type).from(t)},t.prototype.fromArrayBuffer=function(t){this.array=new(s(this.type))(t)},t.prototype.getType=function(){return this.type},t.prototype.getArray=function(){return this.array},t.prototype.getUsage=function(){return this.usage},t.prototype.getSize=function(){return this.array?this.array.length:0},t}();function s(t){switch(t){case r.a:return Float32Array;case r.c:return Uint32Array;default:return Float32Array}}e.a=a},function(t,e,n){"use strict";n.d(e,"a",function(){return u}),e.c=function(t,e){var n=e||[];return n[0]=Math.floor(t/256/256/256)/255,n[1]=Math.floor(t/256/256)%256/255,n[2]=Math.floor(t/256)%256/255,n[3]=t%256/255,n},e.b=function(t){var e=0;return e+=Math.round(256*t[0]*256*256*255),e+=Math.round(256*t[1]*256*255),e+=Math.round(256*t[2]*255),e+=Math.round(255*t[3])};var r,i=n(197),o=n(133),a=n(71),s=n(203),l=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),u={GENERATE_BUFFERS:"GENERATE_BUFFERS"},c=function(t){function e(e,n){var r=t.call(this,e)||this,i=n||{};return r.helper=new s.c({postProcesses:i.postProcesses,uniforms:i.uniforms}),void 0!==i.className&&(r.helper.getCanvas().className=i.className),r}return l(e,t),e.prototype.disposeInternal=function(){this.helper.dispose(),t.prototype.disposeInternal.call(this)},e.prototype.dispatchRenderEvent_=function(t,e){var n=this.getLayer();if(n.hasListener(t)){var r=new o.a(t,null,e,null);n.dispatchEvent(r)}},e.prototype.preRender=function(t){this.dispatchRenderEvent_(a.a.PRERENDER,t)},e.prototype.postRender=function(t){this.dispatchRenderEvent_(a.a.POSTRENDER,t)},e}(i.a);e.d=c},function(t,e,n){"use strict";e.a={LOST:"webglcontextlost",RESTORED:"webglcontextrestored"}},function(t,e,n){"use strict";var r="\n  precision mediump float;\n  \n  attribute vec2 a_position;\n  varying vec2 v_texCoord;\n  varying vec2 v_screenCoord;\n  \n  uniform vec2 u_screenSize;\n   \n  void main() {\n    v_texCoord = a_position * 0.5 + 0.5;\n    v_screenCoord = v_texCoord * u_screenSize;\n    gl_Position = vec4(a_position, 0.0, 1.0);\n  }\n",i="\n  precision mediump float;\n   \n  uniform sampler2D u_image;\n   \n  varying vec2 v_texCoord;\n   \n  void main() {\n    gl_FragColor = texture2D(u_image, v_texCoord);\n  }\n",o=function(){function t(t){this.gl_=t.webGlContext;var e=this.gl_;this.scaleRatio_=t.scaleRatio||1,this.renderTargetTexture_=e.createTexture(),this.renderTargetTextureSize_=null,this.frameBuffer_=e.createFramebuffer();var n=e.createShader(e.VERTEX_SHADER);e.shaderSource(n,t.vertexShader||r),e.compileShader(n);var o=e.createShader(e.FRAGMENT_SHADER);e.shaderSource(o,t.fragmentShader||i),e.compileShader(o),this.renderTargetProgram_=e.createProgram(),e.attachShader(this.renderTargetProgram_,n),e.attachShader(this.renderTargetProgram_,o),e.linkProgram(this.renderTargetProgram_),this.renderTargetVerticesBuffer_=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,this.renderTargetVerticesBuffer_),e.bufferData(e.ARRAY_BUFFER,new Float32Array([-1,-1,1,-1,-1,1,1,-1,1,1,-1,1]),e.STATIC_DRAW),this.renderTargetAttribLocation_=e.getAttribLocation(this.renderTargetProgram_,"a_position"),this.renderTargetUniformLocation_=e.getUniformLocation(this.renderTargetProgram_,"u_screenSize"),this.renderTargetTextureLocation_=e.getUniformLocation(this.renderTargetProgram_,"u_image"),this.uniforms_=[],t.uniforms&&Object.keys(t.uniforms).forEach(function(n){this.uniforms_.push({value:t.uniforms[n],location:e.getUniformLocation(this.renderTargetProgram_,n)})}.bind(this))}return t.prototype.getGL=function(){return this.gl_},t.prototype.init=function(t){var e=this.getGL(),n=[e.drawingBufferWidth*this.scaleRatio_,e.drawingBufferHeight*this.scaleRatio_];if(e.bindFramebuffer(e.FRAMEBUFFER,this.getFrameBuffer()),e.viewport(0,0,n[0],n[1]),!this.renderTargetTextureSize_||this.renderTargetTextureSize_[0]!==n[0]||this.renderTargetTextureSize_[1]!==n[1]){this.renderTargetTextureSize_=n;var r=e.RGBA,i=e.RGBA,o=e.UNSIGNED_BYTE;e.bindTexture(e.TEXTURE_2D,this.renderTargetTexture_),e.texImage2D(e.TEXTURE_2D,0,r,n[0],n[1],0,i,o,null),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,this.renderTargetTexture_,0)}},t.prototype.apply=function(t,e){var n=this.getGL(),r=t.size;n.bindFramebuffer(n.FRAMEBUFFER,e?e.getFrameBuffer():null),n.activeTexture(n.TEXTURE0),n.bindTexture(n.TEXTURE_2D,this.renderTargetTexture_),n.clearColor(0,0,0,0),n.clear(n.COLOR_BUFFER_BIT),n.enable(n.BLEND),n.blendFunc(n.ONE,n.ONE_MINUS_SRC_ALPHA),n.viewport(0,0,n.drawingBufferWidth,n.drawingBufferHeight),n.bindBuffer(n.ARRAY_BUFFER,this.renderTargetVerticesBuffer_),n.useProgram(this.renderTargetProgram_),n.enableVertexAttribArray(this.renderTargetAttribLocation_),n.vertexAttribPointer(this.renderTargetAttribLocation_,2,n.FLOAT,!1,0,0),n.uniform2f(this.renderTargetUniformLocation_,r[0],r[1]),n.uniform1i(this.renderTargetTextureLocation_,0),this.applyUniforms(t),n.drawArrays(n.TRIANGLES,0,6)},t.prototype.getFrameBuffer=function(){return this.frameBuffer_},t.prototype.applyUniforms=function(t){var e,n=this.getGL(),r=1;this.uniforms_.forEach(function(i){if((e="function"===typeof i.value?i.value(t):i.value)instanceof HTMLCanvasElement||e instanceof ImageData)i.texture||(i.texture=n.createTexture()),n.activeTexture(n["TEXTURE"+r]),n.bindTexture(n.TEXTURE_2D,i.texture),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MIN_FILTER,n.LINEAR),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_S,n.CLAMP_TO_EDGE),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_T,n.CLAMP_TO_EDGE),e instanceof ImageData?n.texImage2D(n.TEXTURE_2D,0,n.RGBA,n.RGBA,e.width,e.height,0,n.UNSIGNED_BYTE,new Uint8Array(e.data)):n.texImage2D(n.TEXTURE_2D,0,n.RGBA,n.RGBA,n.UNSIGNED_BYTE,e),n.uniform1i(i.location,r++);else if(Array.isArray(e))switch(e.length){case 2:return void n.uniform2f(i.location,e[0],e[1]);case 3:return void n.uniform3f(i.location,e[0],e[1],e[2]);case 4:return void n.uniform4f(i.location,e[0],e[1],e[2],e[3]);default:return}else"number"===typeof e&&n.uniform1f(i.location,e)})},t}();e.a=o},function(t,e,n){"use strict";e.a=function(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]},e.b=function(t,e){return t[0]=e[0],t[1]=e[1],t[4]=e[2],t[5]=e[3],t[12]=e[4],t[13]=e[5],t}},function(t,e,n){"use strict";var r=n(5),i=new Uint8Array(4),o=function(){function t(t,e){this.helper_=t;var n=t.getGL();this.texture_=n.createTexture(),this.framebuffer_=n.createFramebuffer(),this.size_=e||[1,1],this.data_=new Uint8Array(0),this.dataCacheDirty_=!0,this.updateSize_()}return t.prototype.setSize=function(t){Object(r.b)(t,this.size_)||(this.size_[0]=t[0],this.size_[1]=t[1],this.updateSize_())},t.prototype.getSize=function(){return this.size_},t.prototype.clearCachedData=function(){this.dataCacheDirty_=!0},t.prototype.readAll=function(){if(this.dataCacheDirty_){var t=this.size_,e=this.helper_.getGL();e.bindFramebuffer(e.FRAMEBUFFER,this.framebuffer_),e.readPixels(0,0,t[0],t[1],e.RGBA,e.UNSIGNED_BYTE,this.data_),this.dataCacheDirty_=!1}return this.data_},t.prototype.readPixel=function(t,e){if(t<0||e<0||t>this.size_[0]||e>=this.size_[1])return i[0]=0,i[1]=0,i[2]=0,i[3]=0,i;this.readAll();var n=Math.floor(t)+(this.size_[1]-Math.floor(e)-1)*this.size_[0];return i[0]=this.data_[4*n],i[1]=this.data_[4*n+1],i[2]=this.data_[4*n+2],i[3]=this.data_[4*n+3],i},t.prototype.getTexture=function(){return this.texture_},t.prototype.getFramebuffer=function(){return this.framebuffer_},t.prototype.updateSize_=function(){var t=this.size_,e=this.helper_.getGL();this.texture_=this.helper_.createTexture(t,null,this.texture_),e.bindFramebuffer(e.FRAMEBUFFER,this.framebuffer_),e.viewport(0,0,t[0],t[1]),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,this.texture_,0),this.data_=new Uint8Array(t[0]*t[1]*4)},t}();e.a=o},function(t,e,n){"use strict";e.a=function(){return new Worker(i)};var r=new Blob(['var e="function"==typeof Object.assign?Object.assign:function(e,n){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),r=1,o=arguments.length;r<o;++r){var i=arguments[r];if(null!=i)for(var f in i)i.hasOwnProperty(f)&&(t[f]=i[f])}return t},n="GENERATE_BUFFERS",t=[],r={vertexPosition:0,indexPosition:0};function o(e,n,t,r,o){e[n+0]=t,e[n+1]=r,e[n+2]=o}function i(e,n,i,f,s,u){var a=3+s,l=e[n+0],v=e[n+1],c=t;c.length=s;for(var g=0;g<c.length;g++)c[g]=e[n+2+g];var b=u?u.vertexPosition:0,h=u?u.indexPosition:0,d=b/a;return o(i,b,l,v,0),c.length&&i.set(c,b+3),o(i,b+=a,l,v,1),c.length&&i.set(c,b+3),o(i,b+=a,l,v,2),c.length&&i.set(c,b+3),o(i,b+=a,l,v,3),c.length&&i.set(c,b+3),b+=a,f[h++]=d,f[h++]=d+1,f[h++]=d+3,f[h++]=d+1,f[h++]=d+2,f[h++]=d+3,r.vertexPosition=b,r.indexPosition=h,r}var f=self;f.onmessage=function(t){var r=t.data;if(r.type===n){for(var o=r.customAttributesCount,s=2+o,u=new Float32Array(r.renderInstructions),a=u.length/s,l=4*a*(o+3),v=new Uint32Array(6*a),c=new Float32Array(l),g=null,b=0;b<u.length;b+=s)g=i(u,b,c,v,o,g);var h=e({vertexBuffer:c.buffer,indexBuffer:v.buffer,renderInstructions:u.buffer},r);f.postMessage(h,[c.buffer,v.buffer,u.buffer])}};'],{type:"application/javascript"}),i=URL.createObjectURL(r)},function(t,e,n){"use strict";var r,i=n(54),o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=function(t){function e(e){var n=e||{};return t.call(this,n)||this}return o(e,t),e}(i.a);e.a=a},function(t,e,n){"use strict";var r,i=n(12),o=n(3),a=n(147),s=n(31),l=n(148),u=n(150),c=n(293),h=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),p="https://api.mapbox.com";function f(t){return 0!==t.indexOf("mapbox://")?"":t.slice("mapbox://".length)}var d=function(t){function e(e){var n=t.call(this,o.a.ERROR)||this;return n.error=e,n}return h(e,t),e}(i.a),g="vector",y=function(t){function e(e){var n=this,r=!("declutter"in e)||e.declutter,i=new u.a({state:s.a.LOADING,format:new a.a});return(n=t.call(this,{source:i,declutter:r,className:e.className,opacity:e.opacity,visible:e.visible,zIndex:e.zIndex,minResolution:e.minResolution,maxResolution:e.maxResolution,minZoom:e.minZoom,maxZoom:e.maxZoom,renderOrder:e.renderOrder,renderBuffer:e.renderBuffer,renderMode:e.renderMode,map:e.map,updateWhileAnimating:e.updateWhileAnimating,updateWhileInteracting:e.updateWhileInteracting,preload:e.preload,useInterimTilesOnError:e.useInterimTilesOnError,properties:e.properties})||this).sourceId=e.source,n.layers=e.layers,n.accessToken=e.accessToken,n.fetchStyle(e.styleUrl),n}return h(e,t),e.prototype.fetchStyle=function(t){var e=this,n=function(t,e){var n=f(t);if(!n)return t;if(0!==n.indexOf("styles/"))throw new Error("unexpected style url: "+t);var r=n.slice("styles/".length);return p+"/styles/v1/"+r+"?&access_token="+e}(t,this.accessToken);fetch(n).then(function(t){if(!t.ok)throw new Error("unexpected response when fetching style: "+t.status);return t.json()}).then(function(t){e.onStyleLoad(t)}).catch(function(t){e.handleError(t)})},e.prototype.onStyleLoad=function(t){var e,n,r=this;if(this.layers){for(var i={},o=0;o<t.layers.length;++o){var a=t.layers[o];a.source&&(i[a.id]=a.source)}var l=void 0;for(o=0;o<this.layers.length;++o){var u=i[this.layers[o]];if(!u)return void this.handleError(new Error("could not find source for "+this.layers[o]));if(l){if(l!==u)return void this.handleError(new Error("layers can only use a single source, found "+l+" and "+u))}else l=u}e=l,n=this.layers}else n=e=this.sourceId;n||(n=e=Object.keys(t.sources)[0]),t.sprite&&(t.sprite=function(t,e){var n=f(t);if(!n)return t;if(0!==n.indexOf("sprites/"))throw new Error("unexpected sprites url: "+t);var r=n.slice("sprites/".length);return p+"/styles/v1/"+r+"/sprite?access_token="+e}(t.sprite,this.accessToken)),t.glyphs&&(t.glyphs=function(t,e){var n=f(t);if(!n)return t;if(0!==n.indexOf("fonts/"))throw new Error("unexpected fonts url: "+t);var r=n.slice("fonts/".length);return p+"/fonts/v1/"+r+"/0-255.pbf?access_token="+e}(t.glyphs,this.accessToken));var h=t.sources[e];if(h.type===g){var d,y,m,v=this.getSource();v.setUrl((d=h.url,y=this.accessToken,(m=f(d))?"https://{a-d}.tiles.mapbox.com/v4/"+m+"/{z}/{x}/{y}.vector.pbf?access_token="+y:d)),Object(c.a)(this,t,n).then(function(){v.setState(s.a.READY)}).catch(function(t){r.handleError(t)})}else this.handleError(new Error("only works for vector sources, found "+h.type))},e.prototype.handleError=function(t){this.dispatchEvent(new d(t)),this.getSource().setState(s.a.ERROR)},e}(l.a);e.a=y},function(t,e,n){"use strict";t.exports=i;var r=n(207);function i(t){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(t)?t:new Uint8Array(t||0),this.pos=0,this.type=0,this.length=this.buf.length}i.Varint=0,i.Fixed64=1,i.Bytes=2,i.Fixed32=5;var o="undefined"===typeof TextDecoder?null:new TextDecoder("utf8");function a(t){return t.type===i.Bytes?t.readVarint()+t.pos:t.pos+1}function s(t,e,n){return n?4294967296*e+(t>>>0):4294967296*(e>>>0)+(t>>>0)}function l(t,e,n){var r=e<=16383?1:e<=2097151?2:e<=268435455?3:Math.floor(Math.log(e)/(7*Math.LN2));n.realloc(r);for(var i=n.pos-1;i>=t;i--)n.buf[i+r]=n.buf[i]}function u(t,e){for(var n=0;n<t.length;n++)e.writeVarint(t[n])}function c(t,e){for(var n=0;n<t.length;n++)e.writeSVarint(t[n])}function h(t,e){for(var n=0;n<t.length;n++)e.writeFloat(t[n])}function p(t,e){for(var n=0;n<t.length;n++)e.writeDouble(t[n])}function f(t,e){for(var n=0;n<t.length;n++)e.writeBoolean(t[n])}function d(t,e){for(var n=0;n<t.length;n++)e.writeFixed32(t[n])}function g(t,e){for(var n=0;n<t.length;n++)e.writeSFixed32(t[n])}function y(t,e){for(var n=0;n<t.length;n++)e.writeFixed64(t[n])}function m(t,e){for(var n=0;n<t.length;n++)e.writeSFixed64(t[n])}function v(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16)+16777216*t[e+3]}function _(t,e,n){t[n]=e,t[n+1]=e>>>8,t[n+2]=e>>>16,t[n+3]=e>>>24}function b(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16)+(t[e+3]<<24)}i.prototype={destroy:function(){this.buf=null},readFields:function(t,e,n){for(n=n||this.length;this.pos<n;){var r=this.readVarint(),i=r>>3,o=this.pos;this.type=7&r,t(i,e,this),this.pos===o&&this.skip(r)}return e},readMessage:function(t,e){return this.readFields(t,e,this.readVarint()+this.pos)},readFixed32:function(){var t=v(this.buf,this.pos);return this.pos+=4,t},readSFixed32:function(){var t=b(this.buf,this.pos);return this.pos+=4,t},readFixed64:function(){var t=v(this.buf,this.pos)+4294967296*v(this.buf,this.pos+4);return this.pos+=8,t},readSFixed64:function(){var t=v(this.buf,this.pos)+4294967296*b(this.buf,this.pos+4);return this.pos+=8,t},readFloat:function(){var t=r.read(this.buf,this.pos,!0,23,4);return this.pos+=4,t},readDouble:function(){var t=r.read(this.buf,this.pos,!0,52,8);return this.pos+=8,t},readVarint:function(t){var e,n,r=this.buf;return e=127&(n=r[this.pos++]),n<128?e:(e|=(127&(n=r[this.pos++]))<<7,n<128?e:(e|=(127&(n=r[this.pos++]))<<14,n<128?e:(e|=(127&(n=r[this.pos++]))<<21,n<128?e:function(t,e,n){var r,i,o=n.buf;if(i=o[n.pos++],r=(112&i)>>4,i<128)return s(t,r,e);if(i=o[n.pos++],r|=(127&i)<<3,i<128)return s(t,r,e);if(i=o[n.pos++],r|=(127&i)<<10,i<128)return s(t,r,e);if(i=o[n.pos++],r|=(127&i)<<17,i<128)return s(t,r,e);if(i=o[n.pos++],r|=(127&i)<<24,i<128)return s(t,r,e);if(i=o[n.pos++],r|=(1&i)<<31,i<128)return s(t,r,e);throw new Error("Expected varint not more than 10 bytes")}(e|=(15&(n=r[this.pos]))<<28,t,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var t=this.readVarint();return t%2===1?(t+1)/-2:t/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var t=this.readVarint()+this.pos,e=this.pos;return this.pos=t,t-e>=12&&o?function(t,e,n){return o.decode(t.subarray(e,n))}(this.buf,e,t):function(t,e,n){var r="",i=e;for(;i<n;){var o,a,s,l=t[i],u=null,c=l>239?4:l>223?3:l>191?2:1;if(i+c>n)break;1===c?l<128&&(u=l):2===c?128===(192&(o=t[i+1]))&&(u=(31&l)<<6|63&o)<=127&&(u=null):3===c?(o=t[i+1],a=t[i+2],128===(192&o)&&128===(192&a)&&((u=(15&l)<<12|(63&o)<<6|63&a)<=2047||u>=55296&&u<=57343)&&(u=null)):4===c&&(o=t[i+1],a=t[i+2],s=t[i+3],128===(192&o)&&128===(192&a)&&128===(192&s)&&((u=(15&l)<<18|(63&o)<<12|(63&a)<<6|63&s)<=65535||u>=1114112)&&(u=null)),null===u?(u=65533,c=1):u>65535&&(u-=65536,r+=String.fromCharCode(u>>>10&1023|55296),u=56320|1023&u),r+=String.fromCharCode(u),i+=c}return r}(this.buf,e,t)},readBytes:function(){var t=this.readVarint()+this.pos,e=this.buf.subarray(this.pos,t);return this.pos=t,e},readPackedVarint:function(t,e){if(this.type!==i.Bytes)return t.push(this.readVarint(e));var n=a(this);for(t=t||[];this.pos<n;)t.push(this.readVarint(e));return t},readPackedSVarint:function(t){if(this.type!==i.Bytes)return t.push(this.readSVarint());var e=a(this);for(t=t||[];this.pos<e;)t.push(this.readSVarint());return t},readPackedBoolean:function(t){if(this.type!==i.Bytes)return t.push(this.readBoolean());var e=a(this);for(t=t||[];this.pos<e;)t.push(this.readBoolean());return t},readPackedFloat:function(t){if(this.type!==i.Bytes)return t.push(this.readFloat());var e=a(this);for(t=t||[];this.pos<e;)t.push(this.readFloat());return t},readPackedDouble:function(t){if(this.type!==i.Bytes)return t.push(this.readDouble());var e=a(this);for(t=t||[];this.pos<e;)t.push(this.readDouble());return t},readPackedFixed32:function(t){if(this.type!==i.Bytes)return t.push(this.readFixed32());var e=a(this);for(t=t||[];this.pos<e;)t.push(this.readFixed32());return t},readPackedSFixed32:function(t){if(this.type!==i.Bytes)return t.push(this.readSFixed32());var e=a(this);for(t=t||[];this.pos<e;)t.push(this.readSFixed32());return t},readPackedFixed64:function(t){if(this.type!==i.Bytes)return t.push(this.readFixed64());var e=a(this);for(t=t||[];this.pos<e;)t.push(this.readFixed64());return t},readPackedSFixed64:function(t){if(this.type!==i.Bytes)return t.push(this.readSFixed64());var e=a(this);for(t=t||[];this.pos<e;)t.push(this.readSFixed64());return t},skip:function(t){var e=7&t;if(e===i.Varint)for(;this.buf[this.pos++]>127;);else if(e===i.Bytes)this.pos=this.readVarint()+this.pos;else if(e===i.Fixed32)this.pos+=4;else{if(e!==i.Fixed64)throw new Error("Unimplemented type: "+e);this.pos+=8}},writeTag:function(t,e){this.writeVarint(t<<3|e)},realloc:function(t){for(var e=this.length||16;e<this.pos+t;)e*=2;if(e!==this.length){var n=new Uint8Array(e);n.set(this.buf),this.buf=n,this.length=e}},finish:function(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)},writeFixed32:function(t){this.realloc(4),_(this.buf,t,this.pos),this.pos+=4},writeSFixed32:function(t){this.realloc(4),_(this.buf,t,this.pos),this.pos+=4},writeFixed64:function(t){this.realloc(8),_(this.buf,-1&t,this.pos),_(this.buf,Math.floor(t*(1/4294967296)),this.pos+4),this.pos+=8},writeSFixed64:function(t){this.realloc(8),_(this.buf,-1&t,this.pos),_(this.buf,Math.floor(t*(1/4294967296)),this.pos+4),this.pos+=8},writeVarint:function(t){(t=+t||0)>268435455||t<0?function(t,e){var n,r;t>=0?(n=t%4294967296|0,r=t/4294967296|0):(r=~(-t/4294967296),4294967295^(n=~(-t%4294967296))?n=n+1|0:(n=0,r=r+1|0));if(t>=0x10000000000000000||t<-0x10000000000000000)throw new Error("Given varint doesn't fit into 10 bytes");e.realloc(10),function(t,e,n){n.buf[n.pos++]=127&t|128,t>>>=7,n.buf[n.pos++]=127&t|128,t>>>=7,n.buf[n.pos++]=127&t|128,t>>>=7,n.buf[n.pos++]=127&t|128,t>>>=7,n.buf[n.pos]=127&t}(n,0,e),function(t,e){var n=(7&t)<<4;if(e.buf[e.pos++]|=n|((t>>>=3)?128:0),!t)return;if(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),!t)return;if(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),!t)return;if(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),!t)return;if(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),!t)return;e.buf[e.pos++]=127&t}(r,e)}(t,this):(this.realloc(4),this.buf[this.pos++]=127&t|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=t>>>7&127))))},writeSVarint:function(t){this.writeVarint(t<0?2*-t-1:2*t)},writeBoolean:function(t){this.writeVarint(Boolean(t))},writeString:function(t){t=String(t),this.realloc(4*t.length),this.pos++;var e=this.pos;this.pos=function(t,e,n){for(var r,i,o=0;o<e.length;o++){if((r=e.charCodeAt(o))>55295&&r<57344){if(!i){r>56319||o+1===e.length?(t[n++]=239,t[n++]=191,t[n++]=189):i=r;continue}if(r<56320){t[n++]=239,t[n++]=191,t[n++]=189,i=r;continue}r=i-55296<<10|r-56320|65536,i=null}else i&&(t[n++]=239,t[n++]=191,t[n++]=189,i=null);r<128?t[n++]=r:(r<2048?t[n++]=r>>6|192:(r<65536?t[n++]=r>>12|224:(t[n++]=r>>18|240,t[n++]=r>>12&63|128),t[n++]=r>>6&63|128),t[n++]=63&r|128)}return n}(this.buf,t,this.pos);var n=this.pos-e;n>=128&&l(e,n,this),this.pos=e-1,this.writeVarint(n),this.pos+=n},writeFloat:function(t){this.realloc(4),r.write(this.buf,t,this.pos,!0,23,4),this.pos+=4},writeDouble:function(t){this.realloc(8),r.write(this.buf,t,this.pos,!0,52,8),this.pos+=8},writeBytes:function(t){var e=t.length;this.writeVarint(e),this.realloc(e);for(var n=0;n<e;n++)this.buf[this.pos++]=t[n]},writeRawMessage:function(t,e){this.pos++;var n=this.pos;t(e,this);var r=this.pos-n;r>=128&&l(n,r,this),this.pos=n-1,this.writeVarint(r),this.pos+=r},writeMessage:function(t,e,n){this.writeTag(t,i.Bytes),this.writeRawMessage(e,n)},writePackedVarint:function(t,e){e.length&&this.writeMessage(t,u,e)},writePackedSVarint:function(t,e){e.length&&this.writeMessage(t,c,e)},writePackedBoolean:function(t,e){e.length&&this.writeMessage(t,f,e)},writePackedFloat:function(t,e){e.length&&this.writeMessage(t,h,e)},writePackedDouble:function(t,e){e.length&&this.writeMessage(t,p,e)},writePackedFixed32:function(t,e){e.length&&this.writeMessage(t,d,e)},writePackedSFixed32:function(t,e){e.length&&this.writeMessage(t,g,e)},writePackedFixed64:function(t,e){e.length&&this.writeMessage(t,y,e)},writePackedSFixed64:function(t,e){e.length&&this.writeMessage(t,m,e)},writeBytesField:function(t,e){this.writeTag(t,i.Bytes),this.writeBytes(e)},writeFixed32Field:function(t,e){this.writeTag(t,i.Fixed32),this.writeFixed32(e)},writeSFixed32Field:function(t,e){this.writeTag(t,i.Fixed32),this.writeSFixed32(e)},writeFixed64Field:function(t,e){this.writeTag(t,i.Fixed64),this.writeFixed64(e)},writeSFixed64Field:function(t,e){this.writeTag(t,i.Fixed64),this.writeSFixed64(e)},writeVarintField:function(t,e){this.writeTag(t,i.Varint),this.writeVarint(e)},writeSVarintField:function(t,e){this.writeTag(t,i.Varint),this.writeSVarint(e)},writeStringField:function(t,e){this.writeTag(t,i.Bytes),this.writeString(e)},writeFloatField:function(t,e){this.writeTag(t,i.Fixed32),this.writeFloat(e)},writeDoubleField:function(t,e){this.writeTag(t,i.Fixed64),this.writeDouble(e)},writeBooleanField:function(t,e){this.writeVarintField(t,Boolean(e))}}},function(t,e,n){"use strict";var r,i=n(194),o=n(198),a=n(209),s=n(3),l=n(144),u=n(30),c=n(210),h=n(65),p=n(199),f=n(14),d=n(0),g=n(1),y=n(145),m=n(6),v=n(9),_=n(28),b=n(20),w=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),O={image:[l.a.POLYGON,l.a.CIRCLE,l.a.LINE_STRING,l.a.IMAGE,l.a.TEXT],hybrid:[l.a.POLYGON,l.a.LINE_STRING],vector:[]},x={hybrid:[l.a.IMAGE,l.a.TEXT,l.a.DEFAULT],vector:[l.a.POLYGON,l.a.CIRCLE,l.a.LINE_STRING,l.a.IMAGE,l.a.TEXT,l.a.DEFAULT]},E=function(t){function e(e){var n=t.call(this,e)||this;return n.boundHandleStyleImageChange_=n.handleStyleImageChange_.bind(n),n.dirty_=!1,n.renderedLayerRevision_,n.renderedPixelToCoordinateTransform_=null,n.renderedRotation_,n.renderTileImageQueue_={},n.tileListenerKeys_={},n.tmpTransform_=Object(f.c)(),n}return w(e,t),e.prototype.prepareTile=function(t,e,n,r){var i,o=Object(m.c)(t),a=t.getState();return(a===u.a.LOADED||a===u.a.ERROR)&&o in this.tileListenerKeys_&&(Object(v.unlistenByKey)(this.tileListenerKeys_[o]),delete this.tileListenerKeys_[o]),a!==u.a.LOADED&&a!==u.a.ERROR||(this.updateExecutorGroup_(t,e,n),this.tileImageNeedsRender_(t)&&(i=!0,r&&(this.renderTileImageQueue_[o]=t))),i},e.prototype.getTile=function(e,n,r,i){var o=i.pixelRatio,a=i.viewState,l=a.resolution,p=a.projection,f=this.getLayer(),d=f.getSource().getTile(e,n,r,o,p);if(d.getState()<u.a.LOADED){d.wantedResolution=l;var g=Object(m.c)(d);if(!(g in this.tileListenerKeys_)){var y=Object(v.listen)(d,s.a.CHANGE,this.prepareTile.bind(this,d,o,p,!0));this.tileListenerKeys_[g]=y}}else{var _=i.viewHints;!!(_[h.a.ANIMATING]||_[h.a.INTERACTING])&&d.wantedResolution||(d.wantedResolution=l),this.prepareTile(d,o,p,!1)&&f.getRenderMode()!==c.a.VECTOR&&this.renderTileImage_(d,i)}return t.prototype.getTile.call(this,e,n,r,i)},e.prototype.isDrawableTile=function(e){var n=this.getLayer();return t.prototype.isDrawableTile.call(this,e)&&(n.getRenderMode()===c.a.VECTOR?Object(m.c)(n)in e.executorGroups:e.hasContext(n))},e.prototype.getTileImage=function(t){return t.getImage(this.getLayer())},e.prototype.prepareFrame=function(e){var n=this.getLayer().getRevision();return this.renderedLayerRevision_!=n&&(this.renderedTiles.length=0),this.renderedLayerRevision_=n,t.prototype.prepareFrame.call(this,e)},e.prototype.updateExecutorGroup_=function(t,e,n){var r=this.getLayer(),a=r.getRevision(),s=r.getRenderOrder()||null,l=t.wantedResolution,h=t.getReplayState(r);if(h.dirty||h.renderedResolution!==l||h.renderedRevision!=a||h.renderedRenderOrder!=s){var p=r.getSource(),f=r.getDeclutter(),g=p.getTileGrid(),v=p.getTileGridForProjection(n).getTileCoordExtent(t.wrappedTileCoord),_=p.getSourceTiles(e,n,t),b=Object(m.c)(r);delete t.hitDetectionImageData[b],t.executorGroups[b]=[],f&&(t.declutterExecutorGroups[b]=[]);for(var w=function(n,a){var m=_[n];if(m.getState()!=u.a.LOADED)return"continue";var w=m.tileCoord,x=g.getTileCoordExtent(w),E=Object(d.getIntersection)(v,x),S=Object(d.buffer)(E,r.getRenderBuffer()*l,O.tmpExtent),C=Object(d.equals)(x,E)?null:S;h.dirty=!1;var T=new i.a(0,S,l,e),I=f?new i.a(0,E,l,e):void 0,j=Object(y.b)(l,e),L=function(t){var e,n=t.getStyleFunction()||r.getStyleFunction();if(n&&(e=n(t,l)),e){var i=this.renderFeature(t,j,e,T,I);this.dirty_=this.dirty_||i,h.dirty=h.dirty||i}},R=m.getFeatures();s&&s!==h.renderedRenderOrder&&R.sort(s);for(var P=0,N=R.length;P<N;++P){var M=R[P];C&&!Object(d.intersects)(C,M.getGeometry().getExtent())||L.call(O,M)}var A=T.finish(),k=r.getRenderMode()!==c.a.VECTOR&&f&&1===_.length?null:E,F=new o.a(k,l,e,p.getOverlaps(),A,r.getRenderBuffer());if(t.executorGroups[b].push(F),I){var D=new o.a(null,l,e,p.getOverlaps(),I.finish(),r.getRenderBuffer());t.declutterExecutorGroups[b].push(D)}},O=this,x=0,E=_.length;x<E;++x)w(x);h.renderedRevision=a,h.renderedRenderOrder=s,h.renderedResolution=l}},e.prototype.forEachFeatureAtCoordinate=function(t,e,n,r,i){var o=e.viewState.resolution,a=e.viewState.rotation;n=void 0==n?0:n;var s=this.getLayer(),l=s.getSource().getTileGridForProjection(e.viewState.projection),u=Object(d.boundingExtent)([t]);Object(d.buffer)(u,o*n,u);for(var c,h={},p=function(t,e,n){var o=t.getId();void 0===o&&(o=Object(m.c)(t));var a=h[o];if(a){if(!0!==a&&n<a.distanceSq){if(0===n)return h[o]=!0,i.splice(i.lastIndexOf(a),1),r(t,s,e);a.geometry=e,a.distanceSq=n}}else{if(0===n)return h[o]=!0,r(t,s,e);i.push(h[o]={feature:t,layer:s,geometry:e,distanceSq:n,callback:r})}},f=this.renderedTiles,g=function(r,i){var h=f[r],g=l.getTileCoordExtent(h.wrappedTileCoord);if(!Object(d.intersects)(g,u))return"continue";var y=Object(m.c)(s),v=[h.executorGroups[y]],_=h.declutterExecutorGroups[y];_&&v.push(_),v.some(function(r){for(var i=r===_?e.declutterTree.all().map(function(t){return t.value}):null,s=0,l=r.length;s<l;++s){var u=r[s];if(c=u.forEachFeatureAtCoordinate(t,o,a,n,p,i))return!0}})},y=0,v=f.length;!c&&y<v;++y)g(y);return c},e.prototype.getFeatures=function(t){return new Promise(function(e,n){for(var r,i=this.getLayer(),o=Object(m.c)(i),a=i.getSource(),s=this.renderedProjection,l=s.getExtent(),c=this.renderedResolution,h=a.getTileGridForProjection(s),g=Object(f.a)(this.renderedPixelToCoordinateTransform_,t.slice()),y=h.getTileCoordForCoordAndResolution(g,c),v=0,w=this.renderedTiles.length;v<w;++v)if(y.toString()===this.renderedTiles[v].tileCoord.toString()){if((r=this.renderedTiles[v]).getState()===u.a.LOADED){var O=h.getTileCoordExtent(r.tileCoord);a.getWrapX()&&s.canWrapX()&&!Object(d.containsExtent)(l,O)&&Object(b.l)(g,s);break}r=void 0}if(!r||r.loadingSourceTiles>0)e([]);else{var x=h.getTileCoordExtent(r.wrappedTileCoord),E=Object(d.getTopLeft)(x),S=[(g[0]-E[0])/c,(E[1]-g[1])/c],C=r.getSourceTiles().reduce(function(t,e){return t.concat(e.getFeatures())},[]),T=r.hitDetectionImageData[o];if(!T&&!this.animatingOrInteracting_){var I=Object(_.d)(h.getTileSize(h.getZForResolution(c))),j=this.renderedRotation_,L=[this.getRenderTransform(h.getTileCoordCenter(r.wrappedTileCoord),c,0,p.a,I[0]*p.a,I[1]*p.a,0)];T=Object(p.b)(I,L,C,i.getStyleFunction(),h.getTileCoordExtent(r.wrappedTileCoord),r.getReplayState(i).renderedResolution,j),r.hitDetectionImageData[o]=T}e(Object(p.c)(S,C,T))}}.bind(this))},e.prototype.handleFontsChanged=function(){Object(g.b)(this.renderTileImageQueue_);var t=this.getLayer();t.getVisible()&&void 0!==this.renderedLayerRevision_&&t.changed()},e.prototype.handleStyleImageChange_=function(t){this.renderIfReadyAndVisible()},e.prototype.renderDeclutter=function(t){var e=this.context,n=e.globalAlpha;e.globalAlpha=this.getLayer().getOpacity();for(var r=t.viewHints,i=!(r[h.a.ANIMATING]||r[h.a.INTERACTING]),o=this.renderedTiles,a=0,s=o.length;a<s;++a){var l=o[a],u=l.declutterExecutorGroups[Object(m.c)(this.getLayer())];if(u)for(var c=u.length-1;c>=0;--c)u[c].execute(this.context,1,this.getTileRenderTransform(l,t),t.viewState.rotation,i,void 0,t.declutterTree)}e.globalAlpha=n},e.prototype.getTileRenderTransform=function(t,e){var n=e.pixelRatio,r=e.viewState,i=r.center,o=r.resolution,a=r.rotation,s=e.size,l=Math.round(s[0]*n),u=Math.round(s[1]*n),c=this.getLayer().getSource().getTileGridForProjection(e.viewState.projection),h=t.tileCoord,p=c.getTileCoordExtent(t.wrappedTileCoord),d=c.getTileCoordExtent(h,this.tmpExtent)[0]-p[0];return Object(f.f)(Object(f.i)(this.inversePixelTransform.slice(),1/n,1/n),this.getRenderTransform(i,o,a,n,l,u,d))},e.prototype.renderFrame=function(e,n){var r=e.viewHints,i=!(r[h.a.ANIMATING]||r[h.a.INTERACTING]);this.renderQueuedTileImages_(i,e),t.prototype.renderFrame.call(this,e,n),this.renderedPixelToCoordinateTransform_=e.pixelToCoordinateTransform.slice(),this.renderedRotation_=e.viewState.rotation;var o=this.getLayer(),a=o.getRenderMode(),s=o.getSource(),l=e.usedTiles[Object(m.c)(s)];for(var u in this.renderTileImageQueue_)l&&u in l||delete this.renderTileImageQueue_[u];var c=this.context,p=c.globalAlpha;c.globalAlpha=o.getOpacity();for(var f=x[a],d=e.viewState.rotation,g=this.renderedTiles,y=[],v=[],_=g.length-1;_>=0;--_)for(var b=g[_],w=this.getTileRenderTransform(b,e),O=b.executorGroups[Object(m.c)(o)],E=!1,S=0,C=O.length;S<C;++S){var T=O[S];if(T.hasExecutors(f)){var I=b.tileCoord[0],j=void 0;if(!E&&(j=T.getClipCoords(w))){c.save();for(var L=0,R=y.length;L<R;++L){var P=y[L];I<v[L]&&(c.beginPath(),c.moveTo(j[0],j[1]),c.lineTo(j[2],j[3]),c.lineTo(j[4],j[5]),c.lineTo(j[6],j[7]),c.moveTo(P[6],P[7]),c.lineTo(P[4],P[5]),c.lineTo(P[2],P[3]),c.lineTo(P[0],P[1]),c.clip())}}T.execute(c,1,w,d,i,f),!E&&j&&(c.restore(),y.push(j),v.push(I),E=!0)}}return c.globalAlpha=p,this.container},e.prototype.renderQueuedTileImages_=function(t,e){for(var n in this.renderTileImageQueue_){if(!t&&Date.now()-e.time>8){e.animate=!0;break}var r=this.renderTileImageQueue_[n];delete this.renderTileImageQueue_[n],this.renderTileImage_(r,e)}},e.prototype.renderFeature=function(t,e,n,r,i){if(!n)return!1;var o=!1;if(Array.isArray(n))for(var a=0,s=n.length;a<s;++a)o=Object(y.d)(r,t,n[a],e,this.boundHandleStyleImageChange_,void 0,i)||o;else o=Object(y.d)(r,t,n,e,this.boundHandleStyleImageChange_,void 0,i);return o},e.prototype.tileImageNeedsRender_=function(t){var e=this.getLayer();if(e.getRenderMode()===c.a.VECTOR)return!1;var n=t.getReplayState(e),r=e.getRevision(),i=t.wantedResolution;return n.renderedTileResolution!==i||n.renderedTileRevision!==r},e.prototype.renderTileImage_=function(t,e){var n=this.getLayer(),r=t.getReplayState(n),i=n.getRevision(),o=t.executorGroups[Object(m.c)(n)];r.renderedTileRevision=i;var a=t.wrappedTileCoord,s=a[0],l=n.getSource(),u=e.pixelRatio,c=e.viewState.projection,h=l.getTileGridForProjection(c),p=h.getResolution(t.tileCoord[0]),d=e.pixelRatio/t.wantedResolution*p,g=h.getResolution(s),y=t.getContext(n);u=Math.round(Math.max(u,d/u));var v=l.getTilePixelSize(s,u,c);y.canvas.width=v[0],y.canvas.height=v[1];var _=u/d;if(1!==_){var b=Object(f.g)(this.tmpTransform_);Object(f.i)(b,_,_),y.setTransform.apply(y,b)}var w=h.getTileCoordExtent(a,this.tmpExtent),x=d/g,E=Object(f.g)(this.tmpTransform_);Object(f.i)(E,x,-x),Object(f.l)(E,-w[0],-w[3]);for(var S=0,C=o.length;S<C;++S){o[S].execute(y,_,E,0,!0,O[n.getRenderMode()])}r.renderedTileResolution=t.wantedResolution},e}(a.a);e.a=E},function(t,e,n){"use strict";var r=n(4),i=function(){function t(t){this.highWaterMark=void 0!==t?t:2048,this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null}return t.prototype.canExpireCache=function(){return this.highWaterMark>0&&this.getCount()>this.highWaterMark},t.prototype.clear=function(){this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null},t.prototype.containsKey=function(t){return this.entries_.hasOwnProperty(t)},t.prototype.forEach=function(t){for(var e=this.oldest_;e;)t(e.value_,e.key_,this),e=e.newer},t.prototype.get=function(t,e){var n=this.entries_[t];return Object(r.a)(void 0!==n,15),n===this.newest_?n.value_:(n===this.oldest_?(this.oldest_=this.oldest_.newer,this.oldest_.older=null):(n.newer.older=n.older,n.older.newer=n.newer),n.newer=null,n.older=this.newest_,this.newest_.newer=n,this.newest_=n,n.value_)},t.prototype.remove=function(t){var e=this.entries_[t];return Object(r.a)(void 0!==e,15),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_},t.prototype.getCount=function(){return this.count_},t.prototype.getKeys=function(){var t,e=new Array(this.count_),n=0;for(t=this.newest_;t;t=t.older)e[n++]=t.key_;return e},t.prototype.getValues=function(){var t,e=new Array(this.count_),n=0;for(t=this.newest_;t;t=t.older)e[n++]=t.value_;return e},t.prototype.peekLast=function(){return this.oldest_.value_},t.prototype.peekLastKey=function(){return this.oldest_.key_},t.prototype.peekFirstKey=function(){return this.newest_.key_},t.prototype.pop=function(){var 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_},t.prototype.replace=function(t,e){this.get(t),this.entries_[t].value_=e},t.prototype.set=function(t,e){Object(r.a)(!(t in this.entries_),16);var n={key_:t,newer:null,older:this.newest_,value_:e};this.newest_?this.newest_.newer=n:this.oldest_=n,this.newest_=n,this.entries_[t]=n,++this.count_},t.prototype.setSize=function(t){this.highWaterMark=t},t}();e.a=i},function(t,e,n){"use strict";e.a={TILELOADSTART:"tileloadstart",TILELOADEND:"tileloadend",TILELOADERROR:"tileloaderror"}},function(t,e,n){"use strict";e.a=O;var r=n(152),i=(n(147),n(154),n(90),n(226),n(93),n(49)),o=(n(50),n(148)),a=(n(150),n(84),n(305)),s=n(309),l=n.n(s),u=n(228),c=n.n(u);n(229),n(230),n(51),n(2),n(41);function h(t){"@babel/helpers - typeof";return(h="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var p,f=/font-family: ?([^;]*);/,d=/("|')/g;function g(t){if(!p){p={};for(var e=document.styleSheets,n=0,r=e.length;n<r;++n){var i=e[n];try{var o=i.rules||i.cssRules;if(o)for(var a=0,s=o.length;a<s;++a){var l=o[a];if(5==l.type){var u=l.cssText.match(f);p[u[1].replace(d,"")]=!0}}}catch(t){}}}return t in p}var y={},m=l.a.getNames();function v(t){var e=t.toString();if(e in y)return t;for(var n=t.map(function(t){var e=c()(t,1).split(" ");return[e.slice(3).join(" ").replace(/"/g,""),e[1]+e[0]]}),r=0,i=n.length;r<i;++r){var o=n[r],a=o[0];if(!g(a)&&-1!==m.indexOf(a)){var s="https://fonts.googleapis.com/css?family="+a.replace(/ /g,"+")+":"+o[1];if(!document.querySelector('link[href="'+s+'"]')){var l=document.createElement("link");l.href=s,l.rel="stylesheet",document.head.appendChild(l)}}}return y[e]=!0,t}var _=/^(.*)(\?.*)$/;function b(t,e){return e&&0===t.indexOf(".")&&(t=e+t),t}function w(t,e,n){var r=(t=b(t,e)).match(_);return r?r[1]+n+(r.length>2?r[2]:""):t+n}function O(t,e,n,r,s){return new Promise(function(l,u){if("object"!=h(e)&&(e=JSON.parse(e)),8!=e.version)return u(new Error("glStyle version 8 required."));if(!(t instanceof i.a||t instanceof o.a))return u(new Error("Can only apply to VectorLayer or VectorTileLayer"));var c,p,f;function d(){f||e.sprite&&!c?f?(t.setStyle(f),l()):u(new Error("Something went wrong trying to apply style.")):(f=Object(a.a)(t,e,n,s,c,p,v),t.getStyle()?l():u(new Error("Nothing to show for source ["+n+"]")))}if(e.sprite){var g=.5==(window.devicePixelRatio>=1.5?.5:1)?"@2x":"",y=w(e.sprite,r,g+".json");fetch(y,{credentials:"same-origin"}).then(function(t){return t.ok||""===g?t:(y=w(e.sprite,r,".json"),fetch(y,{credentials:"same-origin"}))}).then(function(t){if(t.ok)return t.json();u(new Error("Problem fetching sprite from "+y+": "+t.statusText))}).then(function(t){if(void 0===t)return u(new Error("No sprites found."));c=t,p=w(e.sprite,r,g+".png"),d()}).catch(function(t){u(new Error("Sprites cannot be loaded: "+y+": "+t.message))})}else d()})}new r.a},function(t,e,n){"use strict";var r,i=n(69),o=n(10),a=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),s=function(t){function e(e){var n=t.call(this)||this;return n.geometry_=null,n.element_=document.createElement("div"),n.element_.style.position="absolute",n.element_.style.pointerEvents="auto",n.element_.className="ol-box "+e,n.map_=null,n.startPixel_=null,n.endPixel_=null,n}return a(e,t),e.prototype.disposeInternal=function(){this.setMap(null)},e.prototype.render_=function(){var t=this.startPixel_,e=this.endPixel_,n=this.element_.style;n.left=Math.min(t[0],e[0])+"px",n.top=Math.min(t[1],e[1])+"px",n.width=Math.abs(e[0]-t[0])+"px",n.height=Math.abs(e[1]-t[1])+"px"},e.prototype.setMap=function(t){if(this.map_){this.map_.getOverlayContainer().removeChild(this.element_);var e=this.element_.style;e.left="inherit",e.top="inherit",e.width="inherit",e.height="inherit"}this.map_=t,this.map_&&this.map_.getOverlayContainer().appendChild(this.element_)},e.prototype.setPixels=function(t,e){this.startPixel_=t,this.endPixel_=e,this.createOrUpdateGeometry(),this.render_()},e.prototype.createOrUpdateGeometry=function(){var t=this.startPixel_,e=this.endPixel_,n=[t,[t[0],e[1]],e,[e[0],t[1]]].map(this.map_.getCoordinateFromPixelInternal,this.map_);n[4]=n[0].slice(),this.geometry_?this.geometry_.setCoordinates([n]):this.geometry_=new o.b([n])},e.prototype.getGeometry=function(){return this.geometry_},e}(i.a);e.a=s},function(t,e,n){"use strict";e.a={LEFT:37,UP:38,RIGHT:39,DOWN:40}},function(t,e,n){"use strict";var r,i=n(12),o=n(3),a=n(74),s=n(58),l=n(13),u=n(2),c=n(9),h=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),p="addfeatures",f=function(t){function e(e,n,r,i){var o=t.call(this,e)||this;return o.features=r,o.file=n,o.projection=i,o}return h(e,t),e}(i.a),d=function(t){function e(e){var n=this,r=e||{};(n=t.call(this,{handleEvent:l.b})||this).on,n.once,n.un,n.readAsBuffer_=!1,n.formats_=[];for(var i=r.formatConstructors?r.formatConstructors:[],o=0,s=i.length;o<s;++o){var c=i[o];"function"===typeof c&&(c=new c),n.formats_.push(c),n.readAsBuffer_=n.readAsBuffer_||c.getType()===a.a.ARRAY_BUFFER}return n.projection_=r.projection?Object(u.get)(r.projection):null,n.dropListenKeys_=null,n.source_=r.source||null,n.target=r.target?r.target:null,n}return h(e,t),e.prototype.handleResult_=function(t,e){var n,r=e.target.result,i=this.getMap(),o=this.projection_;o||(o=i.getView().getProjection());for(var s=this.formats_,l=0,u=s.length;l<u;++l){var c=s[l],h=r;this.readAsBuffer_&&c.getType()!==a.a.ARRAY_BUFFER&&(void 0===n&&(n=(new TextDecoder).decode(r)),h=n);var d=this.tryReadFeatures_(c,h,{featureProjection:o});if(d&&d.length>0){this.source_&&(this.source_.clear(),this.source_.addFeatures(d)),this.dispatchEvent(new f(p,t,d,o));break}}},e.prototype.registerListeners_=function(){var t=this.getMap();if(t){var e=this.target?this.target:t.getViewport();this.dropListenKeys_=[Object(c.listen)(e,o.a.DROP,this.handleDrop,this),Object(c.listen)(e,o.a.DRAGENTER,this.handleStop,this),Object(c.listen)(e,o.a.DRAGOVER,this.handleStop,this),Object(c.listen)(e,o.a.DROP,this.handleStop,this)]}},e.prototype.setActive=function(e){!this.getActive()&&e&&this.registerListeners_(),this.getActive()&&!e&&this.unregisterListeners_(),t.prototype.setActive.call(this,e)},e.prototype.setMap=function(e){this.unregisterListeners_(),t.prototype.setMap.call(this,e),this.getActive()&&this.registerListeners_()},e.prototype.tryReadFeatures_=function(t,e,n){try{return t.readFeatures(e,n)}catch(t){return null}},e.prototype.unregisterListeners_=function(){this.dropListenKeys_&&(this.dropListenKeys_.forEach(c.unlistenByKey),this.dropListenKeys_=null)},e.prototype.handleDrop=function(t){for(var e=t.dataTransfer.files,n=0,r=e.length;n<r;++n){var i=e.item(n),a=new FileReader;a.addEventListener(o.a.LOAD,this.handleResult_.bind(this,i)),this.readAsBuffer_?a.readAsArrayBuffer(i):a.readAsText(i)}},e.prototype.handleStop=function(t){t.stopPropagation(),t.preventDefault(),t.dataTransfer.dropEffect="copy"},e}(s.a);e.a=d},function(t,e,n){"use strict";var r,i=n(26),o=n(18),a=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),s=function(t){function e(e){var n=this,r=e||{};return(n=t.call(this,r)||this).condition_=r.condition?r.condition:o.m,n.lastAngle_=void 0,n.lastMagnitude_=void 0,n.lastScaleDelta_=0,n.duration_=void 0!==r.duration?r.duration:400,n}return a(e,t),e.prototype.handleDragEvent=function(t){if(Object(o.h)(t)){var e=t.map,n=e.getSize(),r=t.pixel,i=r[0]-n[0]/2,a=n[1]/2-r[1],s=Math.atan2(a,i),l=Math.sqrt(i*i+a*a),u=e.getView();if(void 0!==this.lastAngle_){var c=this.lastAngle_-s;u.adjustRotationInternal(c)}this.lastAngle_=s,void 0!==this.lastMagnitude_&&u.adjustResolutionInternal(this.lastMagnitude_/l),void 0!==this.lastMagnitude_&&(this.lastScaleDelta_=this.lastMagnitude_/l),this.lastMagnitude_=l}},e.prototype.handleUpEvent=function(t){if(!Object(o.h)(t))return!0;var e=t.map.getView(),n=this.lastScaleDelta_>1?1:-1;return e.endInteraction(this.duration_,n),this.lastScaleDelta_=0,!1},e.prototype.handleDownEvent=function(t){return!!Object(o.h)(t)&&(!!this.condition_(t)&&(t.map.getView().beginInteraction(),this.lastAngle_=void 0,this.lastMagnitude_=void 0,!0))},e}(i.b);e.a=s},function(t,e,n){"use strict";var r,i=n(224),o=n(12),a=n(3),s=n(15),l=n(8),u=n(155),c=n(21),h=n(108),p=n(55),f=n(37),d=n(44),g=n(45),y=n(16),m=n(26),v=n(10),_=n(49),b=n(50),w=n(13),O=n(18),x=(n(0),n(35)),E=n(2),S=n(20),C=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),T={POINT:"Point",LINE_STRING:"LineString",POLYGON:"Polygon",CIRCLE:"Circle"},I="drawstart",j="drawend",L="drawabort",R=function(t){function e(e,n){var r=t.call(this,e)||this;return r.feature=n,r}return C(e,t),e}(o.a),P=function(t){function e(e){var n=this,r=e;r.stopDown||(r.stopDown=w.a),(n=t.call(this,r)||this).on,n.once,n.un,n.shouldHandle_=!1,n.downPx_=null,n.downTimeout_,n.lastDragTime_,n.pointerType_,n.freehand_=!1,n.source_=e.source?e.source:null,n.features_=e.features?e.features:null,n.snapTolerance_=e.snapTolerance?e.snapTolerance:12,n.type_=e.type,n.mode_=function(t){switch(t){case l.a.POINT:case l.a.MULTI_POINT:return T.POINT;case l.a.LINE_STRING:case l.a.MULTI_LINE_STRING:return T.LINE_STRING;case l.a.POLYGON:case l.a.MULTI_POLYGON:return T.POLYGON;case l.a.CIRCLE:return T.CIRCLE;default:throw new Error("Invalid type: "+t)}}(n.type_),n.stopClick_=!!e.stopClick,n.minPoints_=e.minPoints?e.minPoints:n.mode_===T.POLYGON?3:2,n.maxPoints_=n.mode_===T.CIRCLE?2:e.maxPoints?e.maxPoints:1/0,n.finishCondition_=e.finishCondition?e.finishCondition:w.b;var o,a=e.geometryFunction;if(!a){var s,h=n.mode_;if(h===T.CIRCLE)a=function(t,e,n){var r=e||new i.a([NaN,NaN]),o=Object(E.fromUserCoordinate)(t[0],n),a=Object(S.j)(o,Object(E.fromUserCoordinate)(t[t.length-1],n));r.setCenterAndRadius(o,Math.sqrt(a));var s=Object(E.getUserProjection)();return s&&r.transform(n,s),r};else h===T.POINT?s=y.a:h===T.LINE_STRING?s=c.a:h===T.POLYGON&&(s=v.b),a=function(t,e,n){return e?h===T.POLYGON?t[0].length?e.setCoordinates([t[0].concat([t[0][0]])]):e.setCoordinates([]):e.setCoordinates(t):e=new s(t),e}}return n.geometryFunction_=a,n.dragVertexDelay_=void 0!==e.dragVertexDelay?e.dragVertexDelay:500,n.finishCoordinate_=null,n.sketchFeature_=null,n.sketchPoint_=null,n.sketchCoords_=null,n.sketchLine_=null,n.sketchLineCoords_=null,n.squaredClickTolerance_=e.clickTolerance?e.clickTolerance*e.clickTolerance:36,n.overlay_=new _.a({source:new b.a({useSpatialIndex:!1,wrapX:!!e.wrapX&&e.wrapX}),style:e.style?e.style:(o=Object(x.b)(),function(t,e){return o[t.getGeometry().getType()]}),updateWhileInteracting:!0}),n.geometryName_=e.geometryName,n.condition_=e.condition?e.condition:O.j,n.freehandCondition_,e.freehand?n.freehandCondition_=O.d:n.freehandCondition_=e.freehandCondition?e.freehandCondition:O.m,n.addChangeListener(u.a.ACTIVE,n.updateState_),n}return C(e,t),e.prototype.setMap=function(e){t.prototype.setMap.call(this,e),this.updateState_()},e.prototype.getOverlay=function(){return this.overlay_},e.prototype.handleEvent=function(e){e.originalEvent.type===a.a.CONTEXTMENU&&e.originalEvent.preventDefault(),this.freehand_=this.mode_!==T.POINT&&this.freehandCondition_(e);var n=e.type===p.a.POINTERMOVE,r=!0;!this.freehand_&&this.lastDragTime_&&e.type===p.a.POINTERDRAG&&(Date.now()-this.lastDragTime_>=this.dragVertexDelay_?(this.downPx_=e.pixel,this.shouldHandle_=!this.freehand_,n=!0):this.lastDragTime_=void 0,this.shouldHandle_&&void 0!==this.downTimeout_&&(clearTimeout(this.downTimeout_),this.downTimeout_=void 0));return this.freehand_&&e.type===p.a.POINTERDRAG&&null!==this.sketchFeature_?(this.addToDrawing_(e.coordinate),r=!1):this.freehand_&&e.type===p.a.POINTERDOWN?r=!1:n&&this.getPointerCount()<2?(r=e.type===p.a.POINTERMOVE)&&this.freehand_?(this.handlePointerMove_(e),this.shouldHandle_&&e.originalEvent.preventDefault()):("mouse"===e.originalEvent.pointerType||e.type===p.a.POINTERDRAG&&void 0===this.downTimeout_)&&this.handlePointerMove_(e):e.type===p.a.DBLCLICK&&(r=!1),t.prototype.handleEvent.call(this,e)&&r},e.prototype.handleDownEvent=function(t){return this.shouldHandle_=!this.freehand_,this.freehand_?(this.downPx_=t.pixel,this.finishCoordinate_||this.startDrawing_(t.coordinate),!0):this.condition_(t)?(this.lastDragTime_=Date.now(),this.downTimeout_=setTimeout(function(){this.handlePointerMove_(new h.a(p.a.POINTERMOVE,t.map,t.originalEvent,!1,t.frameState))}.bind(this),this.dragVertexDelay_),this.downPx_=t.pixel,!0):(this.lastDragTime_=void 0,!1)},e.prototype.handleUpEvent=function(t){var e=!0;if(0===this.getPointerCount())if(this.downTimeout_&&(clearTimeout(this.downTimeout_),this.downTimeout_=void 0),this.handlePointerMove_(t),this.shouldHandle_){var n=!this.finishCoordinate_;n&&this.startDrawing_(t.coordinate),!n&&this.freehand_?this.finishDrawing():this.freehand_||n&&this.mode_!==T.POINT||(this.atFinish_(t.pixel)?this.finishCondition_(t)&&this.finishDrawing():this.addToDrawing_(t.coordinate)),e=!1}else this.freehand_&&this.abortDrawing();return!e&&this.stopClick_&&t.preventDefault(),e},e.prototype.handlePointerMove_=function(t){if(this.pointerType_=t.originalEvent.pointerType,this.downPx_&&(!this.freehand_&&this.shouldHandle_||this.freehand_&&!this.shouldHandle_)){var e=this.downPx_,n=t.pixel,r=e[0]-n[0],i=e[1]-n[1],o=r*r+i*i;if(this.shouldHandle_=this.freehand_?o>this.squaredClickTolerance_:o<=this.squaredClickTolerance_,!this.shouldHandle_)return}this.finishCoordinate_?this.modifyDrawing_(t.coordinate):this.createOrUpdateSketchPoint_(t.coordinate.slice())},e.prototype.atFinish_=function(t){var e=!1;if(this.sketchFeature_){var n=!1,r=[this.finishCoordinate_],i=this.mode_;if(i===T.POINT)e=!0;else if(i===T.CIRCLE)e=2===this.sketchCoords_.length;else if(i===T.LINE_STRING)n=this.sketchCoords_.length>this.minPoints_;else if(i===T.POLYGON){var o=this.sketchCoords_;n=o[0].length>this.minPoints_,r=[o[0][0],o[0][o[0].length-2]]}if(n)for(var a=this.getMap(),s=0,l=r.length;s<l;s++){var u=r[s],c=a.getPixelFromCoordinate(u),h=t[0]-c[0],p=t[1]-c[1],f=this.freehand_?1:this.snapTolerance_;if(e=Math.sqrt(h*h+p*p)<=f){this.finishCoordinate_=u;break}}}return e},e.prototype.createOrUpdateSketchPoint_=function(t){this.sketchPoint_?this.sketchPoint_.getGeometry().setCoordinates(t):(this.sketchPoint_=new s.a(new y.a(t)),this.updateSketchFeatures_())},e.prototype.createOrUpdateCustomSketchLine_=function(t){this.sketchLine_||(this.sketchLine_=new s.a);var e=t.getLinearRing(0),n=this.sketchLine_.getGeometry();n?(n.setFlatCoordinates(e.getLayout(),e.getFlatCoordinates()),n.changed()):(n=new c.a(e.getFlatCoordinates(),e.getLayout()),this.sketchLine_.setGeometry(n))},e.prototype.startDrawing_=function(t){var e=this.getMap().getView().getProjection();this.finishCoordinate_=t,this.mode_===T.POINT?this.sketchCoords_=t.slice():this.mode_===T.POLYGON?(this.sketchCoords_=[[t.slice(),t.slice()]],this.sketchLineCoords_=this.sketchCoords_[0]):this.sketchCoords_=[t.slice(),t.slice()],this.sketchLineCoords_&&(this.sketchLine_=new s.a(new c.a(this.sketchLineCoords_)));var n=this.geometryFunction_(this.sketchCoords_,void 0,e);this.sketchFeature_=new s.a,this.geometryName_&&this.sketchFeature_.setGeometryName(this.geometryName_),this.sketchFeature_.setGeometry(n),this.updateSketchFeatures_(),this.dispatchEvent(new R(I,this.sketchFeature_))},e.prototype.modifyDrawing_=function(t){var e,n,r=this.getMap(),i=this.sketchFeature_.getGeometry(),o=r.getView().getProjection();(this.mode_===T.POINT?n=this.sketchCoords_:this.mode_===T.POLYGON?(n=(e=this.sketchCoords_[0])[e.length-1],this.atFinish_(r.getPixelFromCoordinate(t))&&(t=this.finishCoordinate_.slice())):n=(e=this.sketchCoords_)[e.length-1],n[0]=t[0],n[1]=t[1],this.geometryFunction_(this.sketchCoords_,i,o),this.sketchPoint_)&&this.sketchPoint_.getGeometry().setCoordinates(t);if(i.getType()===l.a.POLYGON&&this.mode_!==T.POLYGON)this.createOrUpdateCustomSketchLine_(i);else if(this.sketchLineCoords_){this.sketchLine_.getGeometry().setCoordinates(this.sketchLineCoords_)}this.updateSketchFeatures_()},e.prototype.addToDrawing_=function(t){var e,n,r=this.sketchFeature_.getGeometry(),i=this.getMap().getView().getProjection(),o=this.mode_;o===T.LINE_STRING||o===T.CIRCLE?(this.finishCoordinate_=t.slice(),(n=this.sketchCoords_).length>=this.maxPoints_&&(this.freehand_?n.pop():e=!0),n.push(t.slice()),this.geometryFunction_(n,r,i)):o===T.POLYGON&&((n=this.sketchCoords_[0]).length>=this.maxPoints_&&(this.freehand_?n.pop():e=!0),n.push(t.slice()),e&&(this.finishCoordinate_=n[0]),this.geometryFunction_(this.sketchCoords_,r,i)),this.createOrUpdateSketchPoint_(t.slice()),this.updateSketchFeatures_(),e&&this.finishDrawing()},e.prototype.removeLastPoint=function(){if(this.sketchFeature_){var t,e=this.sketchFeature_.getGeometry(),n=this.getMap().getView().getProjection(),r=this.mode_;if(r===T.LINE_STRING||r===T.CIRCLE){if((t=this.sketchCoords_).splice(-2,1),t.length>=2){this.finishCoordinate_=t[t.length-2].slice();var i=this.finishCoordinate_.slice();t[t.length-1]=i,this.createOrUpdateSketchPoint_(i)}this.geometryFunction_(t,e,n),e.getType()===l.a.POLYGON&&this.sketchLine_&&this.createOrUpdateCustomSketchLine_(e)}else if(r===T.POLYGON){(t=this.sketchCoords_[0]).splice(-2,1);var o=this.sketchLine_.getGeometry();if(t.length>=2){i=t[t.length-2].slice();t[t.length-1]=i,this.createOrUpdateSketchPoint_(i)}o.setCoordinates(t),this.geometryFunction_(this.sketchCoords_,e,n)}1===t.length&&this.abortDrawing(),this.updateSketchFeatures_()}},e.prototype.finishDrawing=function(){var t=this.abortDrawing_();if(t){var e=this.sketchCoords_,n=t.getGeometry(),r=this.getMap().getView().getProjection();this.mode_===T.LINE_STRING?(e.pop(),this.geometryFunction_(e,n,r)):this.mode_===T.POLYGON&&(e[0].pop(),this.geometryFunction_(e,n,r),e=n.getCoordinates()),this.type_===l.a.MULTI_POINT?t.setGeometry(new d.a([e])):this.type_===l.a.MULTI_LINE_STRING?t.setGeometry(new f.a([e])):this.type_===l.a.MULTI_POLYGON&&t.setGeometry(new g.a([e])),this.dispatchEvent(new R(j,t)),this.features_&&this.features_.push(t),this.source_&&this.source_.addFeature(t)}},e.prototype.abortDrawing_=function(){this.finishCoordinate_=null;var t=this.sketchFeature_;return this.sketchFeature_=null,this.sketchPoint_=null,this.sketchLine_=null,this.overlay_.getSource().clear(!0),t},e.prototype.abortDrawing=function(){var t=this.abortDrawing_();t&&this.dispatchEvent(new R(L,t))},e.prototype.appendCoordinates=function(t){var e,n=this.mode_,r=!this.sketchFeature_;if(r&&this.startDrawing_(t[0]),n===T.LINE_STRING||n===T.CIRCLE)e=this.sketchCoords_;else{if(n!==T.POLYGON)return;e=this.sketchCoords_&&this.sketchCoords_.length?this.sketchCoords_[0]:[]}r&&e.shift(),e.pop();for(var i=0;i<t.length;i++)this.addToDrawing_(t[i]);var o=t[t.length-1];this.addToDrawing_(o),this.modifyDrawing_(o)},e.prototype.extend=function(t){var e=t.getGeometry();this.sketchFeature_=t,this.sketchCoords_=e.getCoordinates();var n=this.sketchCoords_[this.sketchCoords_.length-1];this.finishCoordinate_=n.slice(),this.sketchCoords_.push(n.slice()),this.sketchPoint_=new s.a(new y.a(n)),this.updateSketchFeatures_(),this.dispatchEvent(new R(I,this.sketchFeature_))},e.prototype.updateSketchFeatures_=function(){var t=[];this.sketchFeature_&&t.push(this.sketchFeature_),this.sketchLine_&&t.push(this.sketchLine_),this.sketchPoint_&&t.push(this.sketchPoint_);var e=this.overlay_.getSource();e.clear(!0),e.addFeatures(t)},e.prototype.updateState_=function(){var t=this.getMap(),e=this.getActive();t&&e||this.abortDrawing(),this.overlay_.setMap(e?t:null)},e}(m.b);e.a=P},function(t,e,n){"use strict";var r,i=n(12),o=n(15),a=n(8),s=n(55),l=n(16),u=n(26),c=n(49),h=n(50),p=n(18),f=n(0),d=n(20),g=n(35),y=n(10),m=n(2),v=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),_={EXTENTCHANGED:"extentchanged"},b=function(t){function e(e){var n=t.call(this,_.EXTENTCHANGED)||this;return n.extent=e,n}return v(e,t),e}(i.a),w=function(t){function e(e){var n,r=this,i=e||{};return(r=t.call(this,i)||this).on,r.once,r.un,r.condition_=i.condition?i.condition:p.d,r.extent_=null,r.pointerHandler_=null,r.pixelTolerance_=void 0!==i.pixelTolerance?i.pixelTolerance:10,r.snappedToVertex_=!1,r.extentFeature_=null,r.vertexFeature_=null,e||(e={}),r.extentOverlay_=new c.a({source:new h.a({useSpatialIndex:!1,wrapX:!!e.wrapX}),style:e.boxStyle?e.boxStyle:(n=Object(g.b)(),function(t,e){return n[a.a.POLYGON]}),updateWhileAnimating:!0,updateWhileInteracting:!0}),r.vertexOverlay_=new c.a({source:new h.a({useSpatialIndex:!1,wrapX:!!e.wrapX}),style:e.pointerStyle?e.pointerStyle:function(){var t=Object(g.b)();return function(e,n){return t[a.a.POINT]}}(),updateWhileAnimating:!0,updateWhileInteracting:!0}),e.extent&&r.setExtent(e.extent),r}return v(e,t),e.prototype.snapToVertex_=function(t,e){var n=e.getCoordinateFromPixelInternal(t),r=this.getExtentInternal();if(r){var i=function(t){return[[[t[0],t[1]],[t[0],t[3]]],[[t[0],t[3]],[t[2],t[3]]],[[t[2],t[3]],[t[2],t[1]]],[[t[2],t[1]],[t[0],t[1]]]]}(r);i.sort(function(t,e){return Object(d.k)(n,t)-Object(d.k)(n,e)});var o=i[0],a=Object(d.c)(n,o),s=e.getPixelFromCoordinateInternal(a);if(Object(d.e)(t,s)<=this.pixelTolerance_){var l=e.getPixelFromCoordinateInternal(o[0]),u=e.getPixelFromCoordinateInternal(o[1]),c=Object(d.j)(s,l),h=Object(d.j)(s,u),p=Math.sqrt(Math.min(c,h));return this.snappedToVertex_=p<=this.pixelTolerance_,this.snappedToVertex_&&(a=c>h?o[1]:o[0]),a}}return null},e.prototype.handlePointerMove_=function(t){var e=t.pixel,n=t.map,r=this.snapToVertex_(e,n);r||(r=n.getCoordinateFromPixelInternal(e)),this.createOrUpdatePointerFeature_(r)},e.prototype.createOrUpdateExtentFeature_=function(t){var e=this.extentFeature_;return e?t?e.setGeometry(Object(y.d)(t)):e.setGeometry(void 0):(e=t?new o.a(Object(y.d)(t)):new o.a({}),this.extentFeature_=e,this.extentOverlay_.getSource().addFeature(e)),e},e.prototype.createOrUpdatePointerFeature_=function(t){var e=this.vertexFeature_;e?e.getGeometry().setCoordinates(t):(e=new o.a(new l.a(t)),this.vertexFeature_=e,this.vertexOverlay_.getSource().addFeature(e));return e},e.prototype.handleEvent=function(e){return!e.originalEvent||!this.condition_(e)||(e.type!=s.a.POINTERMOVE||this.handlingDownUpSequence||this.handlePointerMove_(e),t.prototype.handleEvent.call(this,e),!1)},e.prototype.handleDownEvent=function(t){var e=t.pixel,n=t.map,r=this.getExtentInternal(),i=this.snapToVertex_(e,n),o=function(t){var e=null,n=null;return t[0]==r[0]?e=r[2]:t[0]==r[2]&&(e=r[0]),t[1]==r[1]?n=r[3]:t[1]==r[3]&&(n=r[1]),null!==e&&null!==n?[e,n]:null};if(i&&r){var a=i[0]==r[0]||i[0]==r[2]?i[0]:null,s=i[1]==r[1]||i[1]==r[3]?i[1]:null;null!==a&&null!==s?this.pointerHandler_=O(o(i)):null!==a?this.pointerHandler_=x(o([a,r[1]]),o([a,r[3]])):null!==s&&(this.pointerHandler_=x(o([r[0],s]),o([r[2],s])))}else i=n.getCoordinateFromPixelInternal(e),this.setExtent([i[0],i[1],i[0],i[1]]),this.pointerHandler_=O(i);return!0},e.prototype.handleDragEvent=function(t){if(this.pointerHandler_){var e=t.coordinate;this.setExtent(this.pointerHandler_(e)),this.createOrUpdatePointerFeature_(e)}},e.prototype.handleUpEvent=function(t){this.pointerHandler_=null;var e=this.getExtentInternal();return e&&0!==Object(f.getArea)(e)||this.setExtent(null),!1},e.prototype.setMap=function(e){this.extentOverlay_.setMap(e),this.vertexOverlay_.setMap(e),t.prototype.setMap.call(this,e)},e.prototype.getExtent=function(){return Object(m.toUserExtent)(this.getExtentInternal(),this.getMap().getView().getProjection())},e.prototype.getExtentInternal=function(){return this.extent_},e.prototype.setExtent=function(t){this.extent_=t||null,this.createOrUpdateExtentFeature_(t),this.dispatchEvent(new b(this.extent_))},e}(u.b);function O(t){return function(e){return Object(f.boundingExtent)([t,e])}}function x(t,e){return t[0]==e[0]?function(n){return Object(f.boundingExtent)([t,[n[0],e[1]]])}:t[1]==e[1]?function(n){return Object(f.boundingExtent)([t,[e[0],n[1]]])}:null}e.a=w},function(t,e,n){"use strict";var r=n(25),i=n(64),o=n(12),a=n(3),s=n(15),l=n(8),u=n(55),c=n(16),h=n(26),p=n(146),f=n(114),d=n(49),g=n(50),y=n(18),m=n(0),v=n(20),_=n(35),b=n(5),w=n(10),O=n(2),x=n(6);function E(t){"@babel/helpers - typeof";return(E="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var S,C=this&&this.__extends||(S=function(t,e){return(S=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}S(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),T=1,I=[0,0,0,0],j=[],L="modifystart",R="modifyend",P=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.features=n,i.mapBrowserEvent=r,i}return C(e,t),e}(o.a),N=function(t){function e(e){var n,o,a=t.call(this,e)||this;if(a.on,a.once,a.un,a.boundHandleFeatureChange_=a.handleFeatureChange_.bind(a),a.condition_=e.condition?e.condition:y.l,a.defaultDeleteCondition_=function(t){return Object(y.b)(t)&&Object(y.n)(t)},a.deleteCondition_=e.deleteCondition?e.deleteCondition:a.defaultDeleteCondition_,a.insertVertexCondition_=e.insertVertexCondition?e.insertVertexCondition:y.d,a.vertexFeature_=null,a.vertexSegments_=null,a.lastPixel_=[0,0],a.ignoreNextSingleClick_=!1,a.featuresBeingModified_=null,a.rBush_=new p.a,a.pixelTolerance_=void 0!==e.pixelTolerance?e.pixelTolerance:10,a.snappedToVertex_=!1,a.changingFeature_=!1,a.dragSegments_=[],a.overlay_=new d.a({source:new g.a({useSpatialIndex:!1,wrapX:!!e.wrapX}),style:e.style?e.style:(n=Object(_.b)(),function(t,e){return n[l.a.POINT]}),updateWhileAnimating:!0,updateWhileInteracting:!0}),a.SEGMENT_WRITERS_={Point:a.writePointGeometry_.bind(a),LineString:a.writeLineStringGeometry_.bind(a),LinearRing:a.writeLineStringGeometry_.bind(a),Polygon:a.writePolygonGeometry_.bind(a),MultiPoint:a.writeMultiPointGeometry_.bind(a),MultiLineString:a.writeMultiLineStringGeometry_.bind(a),MultiPolygon:a.writeMultiPolygonGeometry_.bind(a),Circle:a.writeCircleGeometry_.bind(a),GeometryCollection:a.writeGeometryCollectionGeometry_.bind(a)},a.source_=null,a.hitDetection_=null,e.features?o=e.features:e.source&&(a.source_=e.source,o=new r.a(a.source_.getFeatures()),a.source_.addEventListener(f.a.ADDFEATURE,a.handleSourceAdd_.bind(a)),a.source_.addEventListener(f.a.REMOVEFEATURE,a.handleSourceRemove_.bind(a))),!o)throw new Error("The modify interaction requires features, a source or a layer");return e.hitDetection&&(a.hitDetection_=e.hitDetection),a.features_=o,a.features_.forEach(a.addFeature_.bind(a)),a.features_.addEventListener(i.a.ADD,a.handleFeatureAdd_.bind(a)),a.features_.addEventListener(i.a.REMOVE,a.handleFeatureRemove_.bind(a)),a.lastPointerEvent_=null,a.delta_=[0,0],a.snapToPointer_=void 0===e.snapToPointer?!a.hitDetection_:e.snapToPointer,a}return C(e,t),e.prototype.addFeature_=function(t){var e=t.getGeometry();if(e){var n=this.SEGMENT_WRITERS_[e.getType()];n&&n(t,e)}var r=this.getMap();r&&r.isRendered()&&this.getActive()&&this.handlePointerAtPixel_(this.lastPixel_,r),t.addEventListener(a.a.CHANGE,this.boundHandleFeatureChange_)},e.prototype.willModifyFeatures_=function(t,e){if(!this.featuresBeingModified_){this.featuresBeingModified_=new r.a;for(var n=this.featuresBeingModified_.getArray(),i=0,o=e.length;i<o;++i)for(var a=e[i],s=0,l=a.length;s<l;++s){var u=a[s].feature;u&&-1===n.indexOf(u)&&this.featuresBeingModified_.push(u)}0===this.featuresBeingModified_.getLength()?this.featuresBeingModified_=null:this.dispatchEvent(new P(L,this.featuresBeingModified_,t))}},e.prototype.removeFeature_=function(t){this.removeFeatureSegmentData_(t),this.vertexFeature_&&0===this.features_.getLength()&&(this.overlay_.getSource().removeFeature(this.vertexFeature_),this.vertexFeature_=null),t.removeEventListener(a.a.CHANGE,this.boundHandleFeatureChange_)},e.prototype.removeFeatureSegmentData_=function(t){var e=this.rBush_,n=[];e.forEach(function(e){t===e.feature&&n.push(e)});for(var r=n.length-1;r>=0;--r){for(var i=n[r],o=this.dragSegments_.length-1;o>=0;--o)this.dragSegments_[o][0]===i&&this.dragSegments_.splice(o,1);e.remove(i)}},e.prototype.setActive=function(e){this.vertexFeature_&&!e&&(this.overlay_.getSource().removeFeature(this.vertexFeature_),this.vertexFeature_=null),t.prototype.setActive.call(this,e)},e.prototype.setMap=function(e){this.overlay_.setMap(e),t.prototype.setMap.call(this,e)},e.prototype.getOverlay=function(){return this.overlay_},e.prototype.handleSourceAdd_=function(t){t.feature&&this.features_.push(t.feature)},e.prototype.handleSourceRemove_=function(t){t.feature&&this.features_.remove(t.feature)},e.prototype.handleFeatureAdd_=function(t){this.addFeature_(t.element)},e.prototype.handleFeatureChange_=function(t){if(!this.changingFeature_){var e=t.target;this.removeFeature_(e),this.addFeature_(e)}},e.prototype.handleFeatureRemove_=function(t){var e=t.element;this.removeFeature_(e)},e.prototype.writePointGeometry_=function(t,e){var n=e.getCoordinates(),r={feature:t,geometry:e,segment:[n,n]};this.rBush_.insert(e.getExtent(),r)},e.prototype.writeMultiPointGeometry_=function(t,e){for(var n=e.getCoordinates(),r=0,i=n.length;r<i;++r){var o=n[r],a={feature:t,geometry:e,depth:[r],index:r,segment:[o,o]};this.rBush_.insert(e.getExtent(),a)}},e.prototype.writeLineStringGeometry_=function(t,e){for(var n=e.getCoordinates(),r=0,i=n.length-1;r<i;++r){var o=n.slice(r,r+2),a={feature:t,geometry:e,index:r,segment:o};this.rBush_.insert(Object(m.boundingExtent)(o),a)}},e.prototype.writeMultiLineStringGeometry_=function(t,e){for(var n=e.getCoordinates(),r=0,i=n.length;r<i;++r)for(var o=n[r],a=0,s=o.length-1;a<s;++a){var l=o.slice(a,a+2),u={feature:t,geometry:e,depth:[r],index:a,segment:l};this.rBush_.insert(Object(m.boundingExtent)(l),u)}},e.prototype.writePolygonGeometry_=function(t,e){for(var n=e.getCoordinates(),r=0,i=n.length;r<i;++r)for(var o=n[r],a=0,s=o.length-1;a<s;++a){var l=o.slice(a,a+2),u={feature:t,geometry:e,depth:[r],index:a,segment:l};this.rBush_.insert(Object(m.boundingExtent)(l),u)}},e.prototype.writeMultiPolygonGeometry_=function(t,e){for(var n=e.getCoordinates(),r=0,i=n.length;r<i;++r)for(var o=n[r],a=0,s=o.length;a<s;++a)for(var l=o[a],u=0,c=l.length-1;u<c;++u){var h=l.slice(u,u+2),p={feature:t,geometry:e,depth:[a,r],index:u,segment:h};this.rBush_.insert(Object(m.boundingExtent)(h),p)}},e.prototype.writeCircleGeometry_=function(t,e){var n=e.getCenter(),r={feature:t,geometry:e,index:0,segment:[n,n]},i={feature:t,geometry:e,index:T,segment:[n,n]},o=[r,i];r.featureSegments=o,i.featureSegments=o,this.rBush_.insert(Object(m.createOrUpdateFromCoordinate)(n),r);var a=e,s=Object(O.getUserProjection)();if(s&&this.getMap()){var l=this.getMap().getView().getProjection();a=a.clone().transform(s,l),a=Object(w.c)(a).transform(l,s)}this.rBush_.insert(a.getExtent(),i)},e.prototype.writeGeometryCollectionGeometry_=function(t,e){for(var n=e.getGeometriesArray(),r=0;r<n.length;++r){var i=n[r];(0,this.SEGMENT_WRITERS_[i.getType()])(t,i)}},e.prototype.createOrUpdateVertexFeature_=function(t,e,n){var r=this.vertexFeature_;r?r.getGeometry().setCoordinates(t):(r=new s.a(new c.a(t)),this.vertexFeature_=r,this.overlay_.getSource().addFeature(r));return r.set("features",e),r.set("geometries",n),r},e.prototype.handleEvent=function(e){return!e.originalEvent||(this.lastPointerEvent_=e,e.map.getView().getInteracting()||e.type!=u.a.POINTERMOVE||this.handlingDownUpSequence||this.handlePointerMove_(e),this.vertexFeature_&&this.deleteCondition_(e)&&(n=!(e.type!=u.a.SINGLECLICK||!this.ignoreNextSingleClick_)||this.removePoint()),e.type==u.a.SINGLECLICK&&(this.ignoreNextSingleClick_=!1),t.prototype.handleEvent.call(this,e)&&!n);var n},e.prototype.handleDragEvent=function(t){this.ignoreNextSingleClick_=!1,this.willModifyFeatures_(t,this.dragSegments_);for(var e=[t.coordinate[0]+this.delta_[0],t.coordinate[1]+this.delta_[1]],n=[],r=[],i=0,o=this.dragSegments_.length;i<o;++i){var a=this.dragSegments_[i],s=a[0],u=s.feature;-1===n.indexOf(u)&&n.push(u);var c=s.geometry;-1===r.indexOf(c)&&r.push(c);for(var h=s.depth,p=void 0,f=s.segment,d=a[1];e.length<c.getStride();)e.push(f[d][e.length]);switch(c.getType()){case l.a.POINT:p=e,f[0]=e,f[1]=e;break;case l.a.MULTI_POINT:(p=c.getCoordinates())[s.index]=e,f[0]=e,f[1]=e;break;case l.a.LINE_STRING:(p=c.getCoordinates())[s.index+d]=e,f[d]=e;break;case l.a.MULTI_LINE_STRING:case l.a.POLYGON:(p=c.getCoordinates())[h[0]][s.index+d]=e,f[d]=e;break;case l.a.MULTI_POLYGON:(p=c.getCoordinates())[h[1]][h[0]][s.index+d]=e,f[d]=e;break;case l.a.CIRCLE:if(f[0]=e,f[1]=e,0===s.index)this.changingFeature_=!0,c.setCenter(e),this.changingFeature_=!1;else{this.changingFeature_=!0;var g=t.map.getView().getProjection(),y=Object(v.e)(Object(O.fromUserCoordinate)(c.getCenter(),g),Object(O.fromUserCoordinate)(e,g)),m=Object(O.getUserProjection)();if(m){var _=c.clone().transform(m,g);_.setRadius(y),y=_.transform(g,m).getRadius()}c.setRadius(y),this.changingFeature_=!1}}p&&this.setGeometryCoordinates_(c,p)}this.createOrUpdateVertexFeature_(e,n,r)},e.prototype.handleDownEvent=function(t){if(!this.condition_(t))return!1;var e=t.coordinate;this.handlePointerAtPixel_(t.pixel,t.map,e),this.dragSegments_.length=0,this.featuresBeingModified_=null;var n=this.vertexFeature_;if(n){var r=t.map.getView().getProjection(),i=[],o=n.getGeometry().getCoordinates(),a=Object(m.boundingExtent)([o]),s=this.rBush_.getInExtent(a),u={};s.sort(M);for(var c=0,h=s.length;c<h;++c){var p=s[c],f=p.segment,d=Object(x.c)(p.geometry),g=p.depth;if(g&&(d+="-"+g.join("-")),u[d]||(u[d]=new Array(2)),p.geometry.getType()!==l.a.CIRCLE||p.index!==T)if(!Object(v.f)(f[0],o)||u[d][0])if(!Object(v.f)(f[1],o)||u[d][1])Object(x.c)(f)in this.vertexSegments_&&!u[d][0]&&!u[d][1]&&this.insertVertexCondition_(t)&&i.push(p);else{if((p.geometry.getType()===l.a.LINE_STRING||p.geometry.getType()===l.a.MULTI_LINE_STRING)&&u[d][0]&&0===u[d][0].index)continue;this.dragSegments_.push([p,1]),u[d][1]=p}else this.dragSegments_.push([p,0]),u[d][0]=p;else{var y=k(e,p,r);Object(v.f)(y,o)&&!u[d][0]&&(this.dragSegments_.push([p,0]),u[d][0]=p)}}i.length&&this.willModifyFeatures_(t,[i]);for(var _=i.length-1;_>=0;--_)this.insertVertex_(i[_],o)}return!!this.vertexFeature_},e.prototype.handleUpEvent=function(t){for(var e=this.dragSegments_.length-1;e>=0;--e){var n=this.dragSegments_[e][0],r=n.geometry;if(r.getType()===l.a.CIRCLE){var i=r.getCenter(),o=n.featureSegments[0],a=n.featureSegments[1];o.segment[0]=i,o.segment[1]=i,a.segment[0]=i,a.segment[1]=i,this.rBush_.update(Object(m.createOrUpdateFromCoordinate)(i),o);var s=r,u=Object(O.getUserProjection)();if(u){var c=t.map.getView().getProjection();s=s.clone().transform(u,c),s=Object(w.c)(s).transform(c,u)}this.rBush_.update(s.getExtent(),a)}else this.rBush_.update(Object(m.boundingExtent)(n.segment),n)}return this.featuresBeingModified_&&(this.dispatchEvent(new P(R,this.featuresBeingModified_,t)),this.featuresBeingModified_=null),!1},e.prototype.handlePointerMove_=function(t){this.lastPixel_=t.pixel,this.handlePointerAtPixel_(t.pixel,t.map,t.coordinate)},e.prototype.handlePointerAtPixel_=function(t,e,n){var r,i,o=this,a=n||e.getCoordinateFromPixel(t),s=e.getView().getProjection();if(this.hitDetection_){var u="object"===E(this.hitDetection_)?function(t){return t===o.hitDetection_}:void 0;e.forEachFeatureAtPixel(t,function(t,e,n){if((n=n||t.getGeometry()).getType()===l.a.POINT&&Object(b.f)(o.features_.getArray(),t)){i=n;var a=n.getFlatCoordinates().slice(0,2);r=[{feature:t,geometry:n,segment:[a,a]}]}return!0},{layerFilter:u})}if(!r){var c=Object(O.fromUserExtent)(Object(m.createOrUpdateFromCoordinate)(a,I),s),h=e.getView().getResolution()*this.pixelTolerance_,p=Object(O.toUserExtent)(Object(m.buffer)(c,h,I),s);r=this.rBush_.getInExtent(p)}if(r&&r.length>0){var f=r.sort(function(t,e){return A(a,t,s)-A(a,e,s)})[0],d=f.segment,g=k(a,f,s),y=e.getPixelFromCoordinate(g),_=Object(v.e)(t,y);if(i||_<=this.pixelTolerance_){var w={};if(w[Object(x.c)(d)]=!0,this.snapToPointer_||(this.delta_[0]=g[0]-a[0],this.delta_[1]=g[1]-a[1]),f.geometry.getType()===l.a.CIRCLE&&f.index===T)this.snappedToVertex_=!0,this.createOrUpdateVertexFeature_(g,[f.feature],[f.geometry]);else{var S=e.getPixelFromCoordinate(d[0]),C=e.getPixelFromCoordinate(d[1]),j=Object(v.j)(y,S),L=Object(v.j)(y,C);_=Math.sqrt(Math.min(j,L)),this.snappedToVertex_=_<=this.pixelTolerance_,this.snappedToVertex_&&(g=j>L?d[1]:d[0]),this.createOrUpdateVertexFeature_(g,[f.feature],[f.geometry]);var R={};R[Object(x.c)(f.geometry)]=!0;for(var P=1,N=r.length;P<N;++P){var M=r[P].segment;if(!(Object(v.f)(d[0],M[0])&&Object(v.f)(d[1],M[1])||Object(v.f)(d[0],M[1])&&Object(v.f)(d[1],M[0])))break;var F=Object(x.c)(r[P].geometry);F in R||(R[F]=!0,w[Object(x.c)(M)]=!0)}}return void(this.vertexSegments_=w)}}this.vertexFeature_&&(this.overlay_.getSource().removeFeature(this.vertexFeature_),this.vertexFeature_=null)},e.prototype.insertVertex_=function(t,e){for(var n,r=t.segment,i=t.feature,o=t.geometry,a=t.depth,s=t.index;e.length<o.getStride();)e.push(0);switch(o.getType()){case l.a.MULTI_LINE_STRING:case l.a.POLYGON:(n=o.getCoordinates())[a[0]].splice(s+1,0,e);break;case l.a.MULTI_POLYGON:(n=o.getCoordinates())[a[1]][a[0]].splice(s+1,0,e);break;case l.a.LINE_STRING:(n=o.getCoordinates()).splice(s+1,0,e);break;default:return}this.setGeometryCoordinates_(o,n);var u=this.rBush_;u.remove(t),this.updateSegmentIndices_(o,s,a,1);var c={segment:[r[0],e],feature:i,geometry:o,depth:a,index:s};u.insert(Object(m.boundingExtent)(c.segment),c),this.dragSegments_.push([c,1]);var h={segment:[e,r[1]],feature:i,geometry:o,depth:a,index:s+1};u.insert(Object(m.boundingExtent)(h.segment),h),this.dragSegments_.push([h,0]),this.ignoreNextSingleClick_=!0},e.prototype.removePoint=function(){if(this.lastPointerEvent_&&this.lastPointerEvent_.type!=u.a.POINTERDRAG){var t=this.lastPointerEvent_;this.willModifyFeatures_(t,this.dragSegments_);var e=this.removeVertex_();return this.dispatchEvent(new P(R,this.featuresBeingModified_,t)),this.featuresBeingModified_=null,e}return!1},e.prototype.removeVertex_=function(){var t,e,n,r,i,o,a,s,u,c,h,p=this.dragSegments_,f={},d=!1;for(i=p.length-1;i>=0;--i)c=(n=p[i])[0],h=Object(x.c)(c.feature),c.depth&&(h+="-"+c.depth.join("-")),h in f||(f[h]={}),0===n[1]?(f[h].right=c,f[h].index=c.index):1==n[1]&&(f[h].left=c,f[h].index=c.index+1);for(h in f){switch(u=f[h].right,a=f[h].left,s=(o=f[h].index)-1,c=void 0!==a?a:u,s<0&&(s=0),t=e=(r=c.geometry).getCoordinates(),d=!1,r.getType()){case l.a.MULTI_LINE_STRING:e[c.depth[0]].length>2&&(e[c.depth[0]].splice(o,1),d=!0);break;case l.a.LINE_STRING:e.length>2&&(e.splice(o,1),d=!0);break;case l.a.MULTI_POLYGON:t=t[c.depth[1]];case l.a.POLYGON:(t=t[c.depth[0]]).length>4&&(o==t.length-1&&(o=0),t.splice(o,1),d=!0,0===o&&(t.pop(),t.push(t[0]),s=t.length-1))}if(d){this.setGeometryCoordinates_(r,e);var g=[];if(void 0!==a&&(this.rBush_.remove(a),g.push(a.segment[0])),void 0!==u&&(this.rBush_.remove(u),g.push(u.segment[1])),void 0!==a&&void 0!==u){var y={depth:c.depth,feature:c.feature,geometry:c.geometry,index:s,segment:g};this.rBush_.insert(Object(m.boundingExtent)(y.segment),y)}this.updateSegmentIndices_(r,o,c.depth,-1),this.vertexFeature_&&(this.overlay_.getSource().removeFeature(this.vertexFeature_),this.vertexFeature_=null),p.length=0}}return d},e.prototype.setGeometryCoordinates_=function(t,e){this.changingFeature_=!0,t.setCoordinates(e),this.changingFeature_=!1},e.prototype.updateSegmentIndices_=function(t,e,n,r){this.rBush_.forEachInExtent(t.getExtent(),function(i){i.geometry===t&&(void 0===n||void 0===i.depth||Object(b.b)(i.depth,n))&&i.index>e&&(i.index+=r)})},e}(h.b);function M(t,e){return t.index-e.index}function A(t,e,n){var r=e.geometry;if(r.getType()===l.a.CIRCLE){var i=r;if(e.index===T){var o=Object(O.getUserProjection)();o&&(i=i.clone().transform(o,n));var a=Object(v.j)(i.getCenter(),Object(O.fromUserCoordinate)(t,n)),s=Math.sqrt(a)-i.getRadius();return s*s}}var u=Object(O.fromUserCoordinate)(t,n);return j[0]=Object(O.fromUserCoordinate)(e.segment[0],n),j[1]=Object(O.fromUserCoordinate)(e.segment[1],n),Object(v.k)(u,j)}function k(t,e,n){var r=e.geometry;if(r.getType()===l.a.CIRCLE&&e.index===T){var i=r,o=Object(O.getUserProjection)();return o&&(i=i.clone().transform(o,n)),Object(O.toUserCoordinate)(i.getClosestPoint(Object(O.fromUserCoordinate)(t,n)),n)}var a=Object(O.fromUserCoordinate)(t,n);return j[0]=Object(O.fromUserCoordinate)(e.segment[0],n),j[1]=Object(O.fromUserCoordinate)(e.segment[1],n),Object(O.toUserCoordinate)(Object(v.c)(a,j),n)}e.a=N},function(t,e,n){"use strict";var r,i=n(25),o=n(64),a=n(12),s=n(8),l=n(58),u=n(13),c=n(1),h=n(35),p=n(5),f=n(6),d=n(18),g=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),y="select",m=function(t){function e(e,n,r,i){var o=t.call(this,e)||this;return o.selected=n,o.deselected=r,o.mapBrowserEvent=i,o}return g(e,t),e}(a.a),v={},_=function(t){function e(e){var n=t.call(this)||this;n.on,n.once,n.un;var r,o,a=e||{};if(n.boundAddFeature_=n.addFeature_.bind(n),n.boundRemoveFeature_=n.removeFeature_.bind(n),n.condition_=a.condition?a.condition:d.n,n.addCondition_=a.addCondition?a.addCondition:d.i,n.removeCondition_=a.removeCondition?a.removeCondition:d.i,n.toggleCondition_=a.toggleCondition?a.toggleCondition:d.m,n.multi_=!!a.multi&&a.multi,n.filter_=a.filter?a.filter:u.b,n.hitTolerance_=a.hitTolerance?a.hitTolerance:0,n.style_=void 0!==a.style?a.style:(r=Object(h.b)(),Object(p.c)(r[s.a.POLYGON],r[s.a.LINE_STRING]),Object(p.c)(r[s.a.GEOMETRY_COLLECTION],r[s.a.LINE_STRING]),function(t){return t.getGeometry()?r[t.getGeometry().getType()]:null}),n.features_=a.features||new i.a,a.layers)if("function"===typeof a.layers)o=a.layers;else{var l=a.layers;o=function(t){return Object(p.f)(l,t)}}else o=u.b;return n.layerFilter_=o,n.featureLayerAssociation_={},n}return g(e,t),e.prototype.addFeatureLayerAssociation_=function(t,e){this.featureLayerAssociation_[Object(f.c)(t)]=e},e.prototype.getFeatures=function(){return this.features_},e.prototype.getHitTolerance=function(){return this.hitTolerance_},e.prototype.getLayer=function(t){return this.featureLayerAssociation_[Object(f.c)(t)]},e.prototype.setHitTolerance=function(t){this.hitTolerance_=t},e.prototype.setMap=function(e){this.getMap()&&this.style_&&this.features_.forEach(this.restorePreviousStyle_.bind(this)),t.prototype.setMap.call(this,e),e?(this.features_.addEventListener(o.a.ADD,this.boundAddFeature_),this.features_.addEventListener(o.a.REMOVE,this.boundRemoveFeature_),this.style_&&this.features_.forEach(this.applySelectedStyle_.bind(this))):(this.features_.removeEventListener(o.a.ADD,this.boundAddFeature_),this.features_.removeEventListener(o.a.REMOVE,this.boundRemoveFeature_))},e.prototype.addFeature_=function(t){var e=t.element;this.style_&&this.applySelectedStyle_(e)},e.prototype.removeFeature_=function(t){var e=t.element;this.style_&&this.restorePreviousStyle_(e)},e.prototype.getStyle=function(){return this.style_},e.prototype.applySelectedStyle_=function(t){var e=Object(f.c)(t);e in v||(v[e]=t.getStyle()),t.setStyle(this.style_)},e.prototype.restorePreviousStyle_=function(t){for(var n=this.getMap().getInteractions().getArray(),r=n.length-1;r>=0;--r){var i=n[r];if(i!==this&&i instanceof e&&i.getStyle()&&-1!==i.getFeatures().getArray().lastIndexOf(t))return void t.setStyle(i.getStyle())}var o=Object(f.c)(t);t.setStyle(v[o]),delete v[o]},e.prototype.removeFeatureLayerAssociation_=function(t){delete this.featureLayerAssociation_[Object(f.c)(t)]},e.prototype.handleEvent=function(t){if(!this.condition_(t))return!0;var e=this.addCondition_(t),n=this.removeCondition_(t),r=this.toggleCondition_(t),i=!e&&!n&&!r,o=t.map,a=this.getFeatures(),s=[],l=[];if(i){Object(c.b)(this.featureLayerAssociation_),o.forEachFeatureAtPixel(t.pixel,function(t,e){if(this.filter_(t,e))return l.push(t),this.addFeatureLayerAssociation_(t,e),!this.multi_}.bind(this),{layerFilter:this.layerFilter_,hitTolerance:this.hitTolerance_});for(var u=a.getLength()-1;u>=0;--u){var h=a.item(u),f=l.indexOf(h);f>-1?l.splice(f,1):(a.remove(h),s.push(h))}0!==l.length&&a.extend(l)}else{o.forEachFeatureAtPixel(t.pixel,function(t,i){if(this.filter_(t,i))return!e&&!r||Object(p.f)(a.getArray(),t)?(n||r)&&Object(p.f)(a.getArray(),t)&&(s.push(t),this.removeFeatureLayerAssociation_(t)):(l.push(t),this.addFeatureLayerAssociation_(t,i)),!this.multi_}.bind(this),{layerFilter:this.layerFilter_,hitTolerance:this.hitTolerance_});for(var d=s.length-1;d>=0;--d)a.remove(s[d]);a.extend(l)}return(l.length>0||s.length>0)&&this.dispatchEvent(new m(y,l,s,t)),!0},e}(l.a);e.a=_},function(t,e,n){"use strict";var r,i=n(64),o=n(3),a=n(8),s=n(26),l=n(146),u=n(114),c=n(13),h=n(0),p=n(20),f=n(10),d=n(2),g=n(6),y=n(1),m=n(9),v=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});function _(t){return t.feature?t.feature:t.element?t.element:void 0}var b=[],w=function(t){function e(e){var n=this,r=e||{},i=r;return i.handleDownEvent||(i.handleDownEvent=c.b),i.stopDown||(i.stopDown=c.a),(n=t.call(this,i)||this).source_=r.source?r.source:null,n.vertex_=void 0===r.vertex||r.vertex,n.edge_=void 0===r.edge||r.edge,n.features_=r.features?r.features:null,n.featuresListenerKeys_=[],n.featureChangeListenerKeys_={},n.indexedFeaturesExtents_={},n.pendingFeatures_={},n.pixelTolerance_=void 0!==r.pixelTolerance?r.pixelTolerance:10,n.rBush_=new l.a,n.SEGMENT_WRITERS_={Point:n.writePointGeometry_.bind(n),LineString:n.writeLineStringGeometry_.bind(n),LinearRing:n.writeLineStringGeometry_.bind(n),Polygon:n.writePolygonGeometry_.bind(n),MultiPoint:n.writeMultiPointGeometry_.bind(n),MultiLineString:n.writeMultiLineStringGeometry_.bind(n),MultiPolygon:n.writeMultiPolygonGeometry_.bind(n),GeometryCollection:n.writeGeometryCollectionGeometry_.bind(n),Circle:n.writeCircleGeometry_.bind(n)},n}return v(e,t),e.prototype.addFeature=function(t,e){var n=void 0===e||e,r=Object(g.c)(t),i=t.getGeometry();if(i){var a=this.SEGMENT_WRITERS_[i.getType()];a&&(this.indexedFeaturesExtents_[r]=i.getExtent(Object(h.createEmpty)()),a(t,i))}n&&(this.featureChangeListenerKeys_[r]=Object(m.listen)(t,o.a.CHANGE,this.handleFeatureChange_,this))},e.prototype.forEachFeatureAdd_=function(t){this.addFeature(t)},e.prototype.forEachFeatureRemove_=function(t){this.removeFeature(t)},e.prototype.getFeatures_=function(){var t;return this.features_?t=this.features_:this.source_&&(t=this.source_.getFeatures()),t},e.prototype.handleEvent=function(e){var n=this.snapTo(e.pixel,e.coordinate,e.map);return n.snapped&&(e.coordinate=n.vertex.slice(0,2),e.pixel=n.vertexPixel),t.prototype.handleEvent.call(this,e)},e.prototype.handleFeatureAdd_=function(t){var e=_(t);this.addFeature(e)},e.prototype.handleFeatureRemove_=function(t){var e=_(t);this.removeFeature(e)},e.prototype.handleFeatureChange_=function(t){var e=t.target;if(this.handlingDownUpSequence){var n=Object(g.c)(e);n in this.pendingFeatures_||(this.pendingFeatures_[n]=e)}else this.updateFeature_(e)},e.prototype.handleUpEvent=function(t){var e=Object(y.c)(this.pendingFeatures_);return e.length&&(e.forEach(this.updateFeature_.bind(this)),this.pendingFeatures_={}),!1},e.prototype.removeFeature=function(t,e){var n=void 0===e||e,r=Object(g.c)(t),i=this.indexedFeaturesExtents_[r];if(i){var o=this.rBush_,a=[];o.forEachInExtent(i,function(e){t===e.feature&&a.push(e)});for(var s=a.length-1;s>=0;--s)o.remove(a[s])}n&&(Object(m.unlistenByKey)(this.featureChangeListenerKeys_[r]),delete this.featureChangeListenerKeys_[r])},e.prototype.setMap=function(e){var n=this.getMap(),r=this.featuresListenerKeys_,o=this.getFeatures_();n&&(r.forEach(m.unlistenByKey),r.length=0,o.forEach(this.forEachFeatureRemove_.bind(this))),t.prototype.setMap.call(this,e),e&&(this.features_?r.push(Object(m.listen)(this.features_,i.a.ADD,this.handleFeatureAdd_,this),Object(m.listen)(this.features_,i.a.REMOVE,this.handleFeatureRemove_,this)):this.source_&&r.push(Object(m.listen)(this.source_,u.a.ADDFEATURE,this.handleFeatureAdd_,this),Object(m.listen)(this.source_,u.a.REMOVEFEATURE,this.handleFeatureRemove_,this)),o.forEach(this.forEachFeatureAdd_.bind(this)))},e.prototype.snapTo=function(t,e,n){var r=n.getCoordinateFromPixel([t[0]-this.pixelTolerance_,t[1]+this.pixelTolerance_]),i=n.getCoordinateFromPixel([t[0]+this.pixelTolerance_,t[1]-this.pixelTolerance_]),o=Object(h.boundingExtent)([r,i]),s=this.rBush_.getInExtent(o);this.vertex_&&!this.edge_&&(s=s.filter(function(t){return t.feature.getGeometry().getType()!==a.a.CIRCLE}));var l=!1,u=null,c=null;if(0===s.length)return{snapped:l,vertex:u,vertexPixel:c};for(var f,g=n.getView().getProjection(),y=Object(d.fromUserCoordinate)(e,g),m=1/0,v=0;v<s.length;++v){var _=s[v];b[0]=Object(d.fromUserCoordinate)(_.segment[0],g),b[1]=Object(d.fromUserCoordinate)(_.segment[1],g);var w=Object(p.k)(y,b);w<m&&(f=_,m=w)}var O=f.segment;if(this.vertex_&&!this.edge_){var x=n.getPixelFromCoordinate(O[0]),E=n.getPixelFromCoordinate(O[1]),S=Object(p.j)(t,x),C=Object(p.j)(t,E);Math.sqrt(Math.min(S,C))<=this.pixelTolerance_&&(l=!0,u=S>C?O[1]:O[0],c=n.getPixelFromCoordinate(u))}else if(this.edge_){var T=f.feature.getGeometry().getType()===a.a.CIRCLE;if(T){var I=f.feature.getGeometry(),j=Object(d.getUserProjection)();j&&(I=I.clone().transform(j,g)),u=Object(d.toUserCoordinate)(Object(p.b)(y,I),g)}else b[0]=Object(d.fromUserCoordinate)(O[0],g),b[1]=Object(d.fromUserCoordinate)(O[1],g),u=Object(d.toUserCoordinate)(Object(p.c)(y,b),g);if(c=n.getPixelFromCoordinate(u),Object(p.e)(t,c)<=this.pixelTolerance_&&(l=!0,this.vertex_&&!T)){x=n.getPixelFromCoordinate(O[0]),E=n.getPixelFromCoordinate(O[1]),S=Object(p.j)(c,x),C=Object(p.j)(c,E);Math.sqrt(Math.min(S,C))<=this.pixelTolerance_&&(u=S>C?O[1]:O[0],c=n.getPixelFromCoordinate(u))}}return l&&(c=[Math.round(c[0]),Math.round(c[1])]),{snapped:l,vertex:u,vertexPixel:c}},e.prototype.updateFeature_=function(t){this.removeFeature(t,!1),this.addFeature(t,!1)},e.prototype.writeCircleGeometry_=function(t,e){var n=this.getMap().getView().getProjection(),r=e,i=Object(d.getUserProjection)();i&&(r=r.clone().transform(i,n));var o=Object(f.c)(r);i&&o.transform(n,i);for(var a=o.getCoordinates()[0],s=0,l=a.length-1;s<l;++s){var u=a.slice(s,s+2),c={feature:t,segment:u};this.rBush_.insert(Object(h.boundingExtent)(u),c)}},e.prototype.writeGeometryCollectionGeometry_=function(t,e){for(var n=e.getGeometriesArray(),r=0;r<n.length;++r){var i=this.SEGMENT_WRITERS_[n[r].getType()];i&&i(t,n[r])}},e.prototype.writeLineStringGeometry_=function(t,e){for(var n=e.getCoordinates(),r=0,i=n.length-1;r<i;++r){var o=n.slice(r,r+2),a={feature:t,segment:o};this.rBush_.insert(Object(h.boundingExtent)(o),a)}},e.prototype.writeMultiLineStringGeometry_=function(t,e){for(var n=e.getCoordinates(),r=0,i=n.length;r<i;++r)for(var o=n[r],a=0,s=o.length-1;a<s;++a){var l=o.slice(a,a+2),u={feature:t,segment:l};this.rBush_.insert(Object(h.boundingExtent)(l),u)}},e.prototype.writeMultiPointGeometry_=function(t,e){for(var n=e.getCoordinates(),r=0,i=n.length;r<i;++r){var o=n[r],a={feature:t,segment:[o,o]};this.rBush_.insert(e.getExtent(),a)}},e.prototype.writeMultiPolygonGeometry_=function(t,e){for(var n=e.getCoordinates(),r=0,i=n.length;r<i;++r)for(var o=n[r],a=0,s=o.length;a<s;++a)for(var l=o[a],u=0,c=l.length-1;u<c;++u){var p=l.slice(u,u+2),f={feature:t,segment:p};this.rBush_.insert(Object(h.boundingExtent)(p),f)}},e.prototype.writePointGeometry_=function(t,e){var n=e.getCoordinates(),r={feature:t,segment:[n,n]};this.rBush_.insert(e.getExtent(),r)},e.prototype.writePolygonGeometry_=function(t,e){for(var n=e.getCoordinates(),r=0,i=n.length;r<i;++r)for(var o=n[r],a=0,s=o.length-1;a<s;++a){var l=o.slice(a,a+2),u={feature:t,segment:l};this.rBush_.insert(Object(h.boundingExtent)(l),u)}},e}(s.b);e.a=w},function(t,e,n){"use strict";var r,i=n(89),o=n(3),a=n(75),s=n(30),l=n(227),u=n(119),c=n(7),h=n(0),p=n(9),f=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),d=function(t){function e(e,n,r,o,a,p,f,d,g,y,m,v){var _=t.call(this,a,s.a.IDLE)||this;_.renderEdges_=void 0!==m&&m,_.contextOptions_=v,_.pixelRatio_=f,_.gutter_=d,_.canvas_=null,_.sourceTileGrid_=n,_.targetTileGrid_=o,_.wrappedTileCoord_=p||a,_.sourceTiles_=[],_.sourcesListenerKeys_=null,_.sourceZ_=0;var b=o.getTileCoordExtent(_.wrappedTileCoord_),w=_.targetTileGrid_.getExtent(),O=_.sourceTileGrid_.getExtent(),x=w?Object(h.getIntersection)(b,w):b;if(0===Object(h.getArea)(x))return _.state=s.a.EMPTY,_;var E=e.getExtent();E&&(O=O?Object(h.getIntersection)(O,E):E);var S=o.getResolution(_.wrappedTileCoord_[0]),C=Object(u.a)(e,r,x,S);if(!isFinite(C)||C<=0)return _.state=s.a.EMPTY,_;var T=void 0!==y?y:i.b;if(_.triangulation_=new l.a(e,r,x,O,C*T,S),0===_.triangulation_.getTriangles().length)return _.state=s.a.EMPTY,_;_.sourceZ_=n.getZForResolution(C);var I=_.triangulation_.calculateSourceExtent();if(O&&(e.canWrapX()?(I[1]=Object(c.a)(I[1],O[1],O[3]),I[3]=Object(c.a)(I[3],O[1],O[3])):I=Object(h.getIntersection)(I,O)),Object(h.getArea)(I)){for(var j=n.getTileRangeForExtentAndZ(I,_.sourceZ_),L=j.minX;L<=j.maxX;L++)for(var R=j.minY;R<=j.maxY;R++){var P=g(_.sourceZ_,L,R,f);P&&_.sourceTiles_.push(P)}0===_.sourceTiles_.length&&(_.state=s.a.EMPTY)}else _.state=s.a.EMPTY;return _}return f(e,t),e.prototype.getImage=function(){return this.canvas_},e.prototype.reproject_=function(){var t=[];if(this.sourceTiles_.forEach(function(e,n,r){e&&e.getState()==s.a.LOADED&&t.push({extent:this.sourceTileGrid_.getTileCoordExtent(e.tileCoord),image:e.getImage()})}.bind(this)),this.sourceTiles_.length=0,0===t.length)this.state=s.a.ERROR;else{var e=this.wrappedTileCoord_[0],n=this.targetTileGrid_.getTileSize(e),r="number"===typeof n?n:n[0],i="number"===typeof n?n:n[1],o=this.targetTileGrid_.getResolution(e),a=this.sourceTileGrid_.getResolution(this.sourceZ_),l=this.targetTileGrid_.getTileCoordExtent(this.wrappedTileCoord_);this.canvas_=Object(u.c)(r,i,this.pixelRatio_,a,this.sourceTileGrid_.getExtent(),o,l,this.triangulation_,t,this.gutter_,this.renderEdges_,this.contextOptions_),this.state=s.a.LOADED}this.changed()},e.prototype.load=function(){if(this.state==s.a.IDLE){this.state=s.a.LOADING,this.changed();var t=0;this.sourcesListenerKeys_=[],this.sourceTiles_.forEach(function(e,n,r){var i=e.getState();if(i==s.a.IDLE||i==s.a.LOADING){t++;var a=Object(p.listen)(e,o.a.CHANGE,function(n){var r=e.getState();r!=s.a.LOADED&&r!=s.a.ERROR&&r!=s.a.EMPTY||(Object(p.unlistenByKey)(a),0===--t&&(this.unlistenSources_(),this.reproject_()))},this);this.sourcesListenerKeys_.push(a)}}.bind(this)),0===t?setTimeout(this.reproject_.bind(this),0):this.sourceTiles_.forEach(function(t,e,n){t.getState()==s.a.IDLE&&t.load()})}},e.prototype.unlistenSources_=function(){this.sourcesListenerKeys_.forEach(p.unlistenByKey),this.sourcesListenerKeys_=null},e}(a.a);e.a=d},function(t,e,n){"use strict";var r,i=n(54),o=n(211),a=n(1),s=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),l=function(t){function e(e){var n=this,r=e||{},i=Object(a.a)({},r);return delete i.preload,delete i.useInterimTilesOnError,(n=t.call(this,i)||this).on,n.once,n.un,n.setPreload(void 0!==r.preload?r.preload:0),n.setUseInterimTilesOnError(void 0===r.useInterimTilesOnError||r.useInterimTilesOnError),n}return s(e,t),e.prototype.getPreload=function(){return this.get(o.a.PRELOAD)},e.prototype.setPreload=function(t){this.set(o.a.PRELOAD,t)},e.prototype.getUseInterimTilesOnError=function(){return this.get(o.a.USE_INTERIM_TILES_ON_ERROR)},e.prototype.setUseInterimTilesOnError=function(t){this.set(o.a.USE_INTERIM_TILES_ON_ERROR,t)},e}(i.a);e.a=l},function(t,e,n){"use strict";e.b=C;var r,i,o=n(127),a=n(62),s=n(131),l=n(208),u=n(70),c=n(35),h=n(82),p=n(228),f=n.n(p),d=n(229),g=n(230),y=d.e.isFunction,m=d.e.convertFunction,v=d.c.isExpression,_=d.c.createPropertyExpression,b={Point:1,MultiPoint:1,LineString:2,MultiLineString:2,Polygon:3,MultiPolygon:3},w={center:[.5,.5],left:[0,.5],right:[1,.5],top:[.5,0],bottom:[.5,1],"top-left":[0,0],"top-right":[1,0],"bottom-left":[0,1],"bottom-right":[1,1]},O=function(t,e){var n=_(t,e);if("error"===n.result)throw new Error(n.value.map(function(t){return t.key+": "+t.message}).join(", "));return n.value},x={},E={zoom:0},S={};function C(t,e,n,r,i){var o=t.id;S[o]||(S[o]={});var a=S[o];if(!a[n]){var s=(t[e]||x)[n],l=d.f[e+"_"+t.type][n];void 0===s&&(s=l.default);var u=v(s);if(!u&&y(s)&&(s=m(s,l),u=!0),u){var c=O(s,l);a[n]=c.evaluate.bind(c)}else"color"==l.type&&(s=d.a.parse(s)),a[n]=function(){return s}}return E.zoom=r,a[n](E,i)}var T={};function I(t,e){if(t){if(0===t.a||0===e)return;var n=t.a;return e=void 0===e?1:e,"rgba("+Math.round(255*t.r/n)+","+Math.round(255*t.g/n)+","+Math.round(255*t.b/n)+","+n*e+")"}return t}var j=/^([^]*)\{(.*)\}([^]*)$/;function L(t,e){var n;do{if(n=t.match(j)){var r=e[n[2]]||"";t=n[1]+r+n[3]}}while(n);return t}var R=!1;e.a=function(t,e,n,p,y,m,v){if(void 0===p&&(p=g.d),"string"==typeof e&&(e=JSON.parse(e)),8!=e.version)throw new Error("glStyle version 8 required.");var _,O;if(m)if("undefined"!==typeof Image){var j=new Image;j.crossOrigin="anonymous",j.onload=function(){_=j,O=[j.width,j.height],t.changed(),j.onload=null},j.src=m}else if("undefined"!==typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope){var P=self;P.postMessage({action:"loadImage",src:m}),P.addEventListener("message",function(t){"imageLoaded"===t.data.action&&t.data.src===m&&(_=t.data.image,O=[_.width,_.height])})}for(var N,M=Object(d.b)(e.layers),A={},k=[],F=0,D=M.length;F<D;++F){var G=M[F],U=G.id;if("string"==typeof n&&G.source==n||-1!==n.indexOf(U)){var z=G["source-layer"];if(!N){N=G.source;var B=e.sources[N];if(!B)throw new Error('Source "'+N+'" is not defined');var V=B.type;if("vector"!==V&&"geojson"!==V)throw new Error('Source "'+N+'" is not of type "vector" or "geojson", but "'+V+'"')}var Y=A[z];Y||(Y=[],A[z]=Y),Y.push({layer:G,index:F}),k.push(U)}delete S[U],delete T[U]}var q=new u.a,X=new a.a,W={},H={},K=[],Z=function(t,e){var n=t.getProperties(),m=A[n.layer];if(m){var S=p.indexOf(e);-1==S&&(S=Object(g.f)(e,p));for(var j,P=b[t.getGeometry().getType()],N={properties:n,type:P},M=-1,k=function(p,b){var R=m[p],A=R.layer,k=A.id,F=A.layout||x,D=A.paint||x;if("none"===F.visibility||"minzoom"in A&&S<A.minzoom||"maxzoom"in A&&S>=A.maxzoom)return"continue";var G=A.filter;if(!G||function(t,e,n,r){return t in T||(T[t]=Object(d.d)(e).filter),E.zoom=r,T[t](E,n)}(k,G,N,S)){j=A;var U=void 0,z=void 0,B=void 0,V=void 0,Y=void 0,Z=void 0,J=R.index;if(3==P&&("fill"==A.type||"fill-extrusion"==A.type))if(z=C(A,"paint",A.type+"-opacity",S,N),A.type+"-pattern"in D){var $=C(A,"paint",A.type+"-pattern",S,N);if($){var Q="string"===typeof $?L($,n):$.toString();if(_&&y&&y[Q]){(Z=K[++M])&&Z.getFill()&&!Z.getStroke()&&!Z.getText()||(Z=new c.c({fill:new a.a}),K[M]=Z),B=Z.getFill(),Z.setZIndex(J);var tt=H[jt=Q+"."+z];if(!tt){var et=y[Q];(Rt=(Lt=Object(g.c)(et.width,et.height)).getContext("2d")).globalAlpha=z,Rt.drawImage(_,et.x,et.y,et.width,et.height,0,0,et.width,et.height),tt=Rt.createPattern(Lt,"repeat"),H[jt]=tt}B.setColor(tt)}}}else(U=I(C(A,"paint",A.type+"-color",S,N),z))&&(A.type+"-outline-color"in D&&(Y=I(C(A,"paint",A.type+"-outline-color",S,N),z)),Y||(Y=U),(Z=K[++M])&&Z.getFill()&&Z.getStroke()&&!Z.getText()||(Z=new c.c({fill:new a.a,stroke:new u.a}),K[M]=Z),(B=Z.getFill()).setColor(U),(V=Z.getStroke()).setColor(Y),V.setWidth(1),Z.setZIndex(J));if(1!=P&&"line"==A.type){U=!("line-pattern"in D)&&"line-color"in D?I(C(A,"paint","line-color",S,N),C(A,"paint","line-opacity",S,N)):void 0;var nt=C(A,"paint","line-width",S,N);U&&nt>0&&((Z=K[++M])&&Z.getStroke()&&!Z.getFill()&&!Z.getText()||(Z=new c.c({stroke:new u.a}),K[M]=Z),(V=Z.getStroke()).setLineCap(C(A,"layout","line-cap",S,N)),V.setLineJoin(C(A,"layout","line-join",S,N)),V.setMiterLimit(C(A,"layout","line-miter-limit",S,N)),V.setColor(U),V.setWidth(nt),V.setLineDash(D["line-dasharray"]?C(A,"paint","line-dasharray",S,N).map(function(t){return t*nt}):null),Z.setZIndex(J))}var rt=!1,it=null,ot=0,at=void 0,st=void 0,lt=void 0;if((1==P||2==P)&&"icon-image"in F){var ut=C(A,"layout","icon-image",S,N);if(ut){at="string"===typeof ut?L(ut,n):ut.toString();var ct=void 0;if(_&&y&&y[at]){var ht=C(A,"layout","icon-rotation-alignment",S,N);if(2==P){var pt=t.getGeometry();if(pt.getFlatMidpoint||pt.getFlatMidpoints){var ft=pt.getExtent();if(Math.sqrt(Math.max(Math.pow((ft[2]-ft[0])/e,2),Math.pow((ft[3]-ft[1])/e,2)))>150){var dt="MultiLineString"===pt.getType()?pt.getFlatMidpoints():pt.getFlatMidpoint();if(i||(r=[NaN,NaN],i=new l.a("Point",r,[],{},null)),ct=i,r[0]=dt[0],r[1]=dt[1],"line"===(Jt=C(A,"layout","symbol-placement",S,N))&&"map"===ht)for(var gt=pt.getStride(),yt=pt.getFlatCoordinates(),mt=0,vt=yt.length-gt;mt<vt;mt+=gt){var _t=yt[mt],bt=yt[mt+1],wt=yt[mt+gt],Ot=yt[mt+gt+1],xt=Math.min(_t,wt),Et=Math.min(bt,Ot),St=Math.max(_t,wt),Ct=Math.max(bt,Ot);if(dt[0]>=xt&&dt[0]<=St&&dt[1]>=Et&&dt[1]<=Ct){ot=Math.atan2(bt-Ot,wt-_t);break}}}}}if(2!==P||ct){var Tt=C(A,"layout","icon-size",S,N),It=void 0!==D["icon-color"]?C(A,"paint","icon-color",S,N):null;if(!It||0!==It.a){var jt=at+"."+Tt;if(null!==It&&(jt+="."+It),!(st=W[jt])){et=y[at];if(null!==It){var Lt,Rt;(Rt=(Lt=Object(g.c)(et.width,et.height)).getContext("2d")).drawImage(_,et.x,et.y,et.width,et.height,0,0,et.width,et.height);for(var Pt=Rt.getImageData(0,0,Lt.width,Lt.height),Nt=0,Mt=Pt.data.length;Nt<Mt;Nt+=4){var At=It.a;0!==At&&(Pt.data[Nt]=255*It.r/At,Pt.data[Nt+1]=255*It.g/At,Pt.data[Nt+2]=255*It.b/At),Pt.data[Nt+3]=At}Rt.putImageData(Pt,0,0),st=new s.a({img:Lt,imgSize:[Lt.width,Lt.height],scale:Tt/et.pixelRatio}),W[jt]=st}else st=new s.a({img:_,imgSize:O,size:[et.width,et.height],offset:[et.x,et.y],rotateWithView:"map"===ht,scale:Tt/et.pixelRatio}),W[jt]=st}}st&&((Z=K[++M])&&Z.getImage()&&!Z.getFill()&&!Z.getStroke()||(Z=new c.c,K[M]=Z),Z.setGeometry(ct),st.setRotation(ot+Object(g.e)(C(A,"layout","icon-rotate",S,N))),st.setOpacity(C(A,"paint","icon-opacity",S,N)),st.setAnchor(w[C(A,"layout","icon-anchor",S,N)]),Z.setImage(st),it=Z.getText(),Z.setText(void 0),Z.setZIndex(J),rt=!0,lt=!1)}else lt=!0}}}if(1==P&&"circle-radius"in D){(Z=K[++M])&&Z.getImage()&&!Z.getFill()&&!Z.getStroke()||(Z=new c.c,K[M]=Z);var kt=C(A,"paint","circle-radius",S,N),Ft=I(C(A,"paint","circle-stroke-color",S,N),C(A,"paint","circle-stroke-opacity",S,N)),Dt=I(C(A,"paint","circle-color",S,N),C(A,"paint","circle-opacity",S,N)),Gt=C(A,"paint","circle-stroke-width",S,N),Ut=kt+"."+Ft+"."+Dt+"."+Gt;(st=W[Ut])||(st=new o.a({radius:kt,stroke:Ft&&Gt>0?new u.a({width:Gt,color:Ft}):void 0,fill:Dt?new a.a({color:Dt}):void 0}),W[Ut]=st),Z.setImage(st),it=Z.getText(),Z.setText(void 0),Z.setGeometry(void 0),Z.setZIndex(J),rt=!0}var zt=void 0;if("text-field"in F)zt=L(C(A,"layout","text-field",S,N).toString(),n).trim(),z=C(A,"paint","text-opacity",S,N);if(zt&&z&&!lt){rt||((Z=K[++M])&&Z.getText()&&!Z.getFill()&&!Z.getStroke()||(Z=new c.c,K[M]=Z),Z.setImage(void 0),Z.setGeometry(void 0)),Z.getText()||Z.setText(it||new h.a({padding:[2,2,2,2]})),it=Z.getText();var Bt=Math.round(C(A,"layout","text-size",S,N)),Vt=C(A,"layout","text-font",S,N),Yt=C(A,"layout","text-line-height",S,N),qt=f()(v?v(Vt):Vt,Bt,Yt),Xt=F["text-transform"];"uppercase"==Xt?zt=zt.toUpperCase():"lowercase"==Xt&&(zt=zt.toLowerCase());var Wt=C(A,"layout","text-max-width",S,N),Ht=C(A,"layout","text-letter-spacing",S,N),Kt=2==P?Object(g.a)(zt,Ht):Object(g.g)(zt,qt,Wt,Ht);it.setText(Kt),it.setFont(qt),it.setRotation(Object(g.e)(C(A,"layout","text-rotate",S,N)));var Zt=C(A,"layout","text-anchor",S,N),Jt=rt||1==P?"point":C(A,"layout","symbol-placement",S,N);it.setPlacement(Jt);var $t=C(A,"paint","text-halo-width",S,N),Qt=C(A,"layout","text-offset",S,N),te=C(A,"paint","text-translate",S,N),ee=0,ne=0;if("point"==Jt){var re="center";-1!==Zt.indexOf("left")?(re="left",ne=$t):-1!==Zt.indexOf("right")&&(re="right",ne=-$t),it.setTextAlign(re);var ie=C(A,"layout","text-rotation-alignment",S,N);it.setRotateWithView("map"==ie)}else it.setMaxAngle(Object(g.e)(C(A,"layout","text-max-angle",S,N))*zt.length/Kt.length),it.setTextAlign(),it.setRotateWithView(!1);var oe="middle";0==Zt.indexOf("bottom")?(oe="bottom",ee=-$t-.5*(Yt-1)*Bt):0==Zt.indexOf("top")&&(oe="top",ee=$t+.5*(Yt-1)*Bt),it.setTextBaseline(oe),it.setOffsetX(Qt[0]*Bt+ne+te[0]),it.setOffsetY(Qt[1]*Bt+ee+te[1]),X.setColor(I(C(A,"paint","text-color",S,N),z)),it.setFill(X);var ae=I(C(A,"paint","text-halo-color",S,N),z);if(ae){q.setColor(ae),$t*=2;var se=.5*Bt;q.setWidth($t<=se?$t:se),it.setStroke(q)}else it.setStroke(void 0);var le=C(A,"layout","text-padding",S,N),ue=it.getPadding();le!==ue[0]&&(ue[0]=le,ue[1]=le,ue[2]=le,ue[3]=le),Z.setZIndex(J)}}},F=0,D=m.length;F<D;++F)k(F);return M>-1?(K.length=M+1,R&&("function"===typeof t.set?t.set("mapbox-layer",j):t.getProperties()["mapbox-layer"]=j),K):void 0}};return t.setStyle(Z),t.set("mapbox-source",N),t.set("mapbox-layers",k),Z}},function(t,e,n){"use strict";(function(t){var r=n(307),i=n(207),o=n(308);function a(){return l.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(t,e){if(a()<e)throw new RangeError("Invalid typed array length");return l.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e)).__proto__=l.prototype:(null===t&&(t=new l(e)),t.length=e),t}function l(t,e,n){if(!l.TYPED_ARRAY_SUPPORT&&!(this instanceof l))return new l(t,e,n);if("number"===typeof t){if("string"===typeof e)throw new Error("If encoding is specified then the first argument must be a string");return h(this,t)}return u(this,t,e,n)}function u(t,e,n,r){if("number"===typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!==typeof ArrayBuffer&&e instanceof ArrayBuffer?function(t,e,n,r){if(e.byteLength,n<0||e.byteLength<n)throw new RangeError("'offset' is out of bounds");if(e.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");e=void 0===n&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,n):new Uint8Array(e,n,r);l.TYPED_ARRAY_SUPPORT?(t=e).__proto__=l.prototype:t=p(t,e);return t}(t,e,n,r):"string"===typeof e?function(t,e,n){"string"===typeof n&&""!==n||(n="utf8");if(!l.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|d(e,n),i=(t=s(t,r)).write(e,n);i!==r&&(t=t.slice(0,i));return t}(t,e,n):function(t,e){if(l.isBuffer(e)){var n=0|f(e.length);return 0===(t=s(t,n)).length?t:(e.copy(t,0,0,n),t)}if(e){if("undefined"!==typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!==typeof e.length||(r=e.length)!==r?s(t,0):p(t,e);if("Buffer"===e.type&&o(e.data))return p(t,e.data)}var r;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,e)}function c(t){if("number"!==typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function h(t,e){if(c(e),t=s(t,e<0?0:0|f(e)),!l.TYPED_ARRAY_SUPPORT)for(var n=0;n<e;++n)t[n]=0;return t}function p(t,e){var n=e.length<0?0:0|f(e.length);t=s(t,n);for(var r=0;r<n;r+=1)t[r]=255&e[r];return t}function f(t){if(t>=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|t}function d(t,e){if(l.isBuffer(t))return t.length;if("undefined"!==typeof ArrayBuffer&&"function"===typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!==typeof t&&(t=""+t);var n=t.length;if(0===n)return 0;for(var r=!1;;)switch(e){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return U(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return z(t).length;default:if(r)return U(t).length;e=(""+e).toLowerCase(),r=!0}}function g(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function y(t,e,n,r,i){if(0===t.length)return-1;if("string"===typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(i)return-1;n=t.length-1}else if(n<0){if(!i)return-1;n=0}if("string"===typeof e&&(e=l.from(e,r)),l.isBuffer(e))return 0===e.length?-1:m(t,e,n,r,i);if("number"===typeof e)return e&=255,l.TYPED_ARRAY_SUPPORT&&"function"===typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,n):Uint8Array.prototype.lastIndexOf.call(t,e,n):m(t,[e],n,r,i);throw new TypeError("val must be string, number or Buffer")}function m(t,e,n,r,i){var o,a=1,s=t.length,l=e.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(t.length<2||e.length<2)return-1;a=2,s/=2,l/=2,n/=2}function u(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}if(i){var c=-1;for(o=n;o<s;o++)if(u(t,o)===u(e,-1===c?0:o-c)){if(-1===c&&(c=o),o-c+1===l)return c*a}else-1!==c&&(o-=o-c),c=-1}else for(n+l>s&&(n=s-l),o=n;o>=0;o--){for(var h=!0,p=0;p<l;p++)if(u(t,o+p)!==u(e,p)){h=!1;break}if(h)return o}return-1}function v(t,e,n,r){n=Number(n)||0;var i=t.length-n;r?(r=Number(r))>i&&(r=i):r=i;var o=e.length;if(o%2!==0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var a=0;a<r;++a){var s=parseInt(e.substr(2*a,2),16);if(isNaN(s))return a;t[n+a]=s}return a}function _(t,e,n,r){return B(U(e,t.length-n),t,n,r)}function b(t,e,n,r){return B(function(t){for(var e=[],n=0;n<t.length;++n)e.push(255&t.charCodeAt(n));return e}(e),t,n,r)}function w(t,e,n,r){return b(t,e,n,r)}function O(t,e,n,r){return B(z(e),t,n,r)}function x(t,e,n,r){return B(function(t,e){for(var n,r,i,o=[],a=0;a<t.length&&!((e-=2)<0);++a)n=t.charCodeAt(a),r=n>>8,i=n%256,o.push(i),o.push(r);return o}(e,t.length-n),t,n,r)}function E(t,e,n){return 0===e&&n===t.length?r.fromByteArray(t):r.fromByteArray(t.slice(e,n))}function S(t,e,n){n=Math.min(t.length,n);for(var r=[],i=e;i<n;){var o,a,s,l,u=t[i],c=null,h=u>239?4:u>223?3:u>191?2:1;if(i+h<=n)switch(h){case 1:u<128&&(c=u);break;case 2:128===(192&(o=t[i+1]))&&(l=(31&u)<<6|63&o)>127&&(c=l);break;case 3:o=t[i+1],a=t[i+2],128===(192&o)&&128===(192&a)&&(l=(15&u)<<12|(63&o)<<6|63&a)>2047&&(l<55296||l>57343)&&(c=l);break;case 4:o=t[i+1],a=t[i+2],s=t[i+3],128===(192&o)&&128===(192&a)&&128===(192&s)&&(l=(15&u)<<18|(63&o)<<12|(63&a)<<6|63&s)>65535&&l<1114112&&(c=l)}null===c?(c=65533,h=1):c>65535&&(c-=65536,r.push(c>>>10&1023|55296),c=56320|1023&c),r.push(c),i+=h}return function(t){var e=t.length;if(e<=C)return String.fromCharCode.apply(String,t);var n="",r=0;for(;r<e;)n+=String.fromCharCode.apply(String,t.slice(r,r+=C));return n}(r)}e.Buffer=l,e.SlowBuffer=function(t){+t!=t&&(t=0);return l.alloc(+t)},e.INSPECT_MAX_BYTES=50,l.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"===typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}(),e.kMaxLength=a(),l.poolSize=8192,l._augment=function(t){return t.__proto__=l.prototype,t},l.from=function(t,e,n){return u(null,t,e,n)},l.TYPED_ARRAY_SUPPORT&&(l.prototype.__proto__=Uint8Array.prototype,l.__proto__=Uint8Array,"undefined"!==typeof Symbol&&Symbol.species&&l[Symbol.species]===l&&Object.defineProperty(l,Symbol.species,{value:null,configurable:!0})),l.alloc=function(t,e,n){return function(t,e,n,r){return c(e),e<=0?s(t,e):void 0!==n?"string"===typeof r?s(t,e).fill(n,r):s(t,e).fill(n):s(t,e)}(null,t,e,n)},l.allocUnsafe=function(t){return h(null,t)},l.allocUnsafeSlow=function(t){return h(null,t)},l.isBuffer=function(t){return!(null==t||!t._isBuffer)},l.compare=function(t,e){if(!l.isBuffer(t)||!l.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var n=t.length,r=e.length,i=0,o=Math.min(n,r);i<o;++i)if(t[i]!==e[i]){n=t[i],r=e[i];break}return n<r?-1:r<n?1:0},l.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},l.concat=function(t,e){if(!o(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return l.alloc(0);var n;if(void 0===e)for(e=0,n=0;n<t.length;++n)e+=t[n].length;var r=l.allocUnsafe(e),i=0;for(n=0;n<t.length;++n){var a=t[n];if(!l.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(r,i),i+=a.length}return r},l.byteLength=d,l.prototype._isBuffer=!0,l.prototype.swap16=function(){var t=this.length;if(t%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)g(this,e,e+1);return this},l.prototype.swap32=function(){var t=this.length;if(t%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)g(this,e,e+3),g(this,e+1,e+2);return this},l.prototype.swap64=function(){var t=this.length;if(t%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)g(this,e,e+7),g(this,e+1,e+6),g(this,e+2,e+5),g(this,e+3,e+4);return this},l.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?S(this,0,t):function(t,e,n){var r=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return j(this,e,n);case"utf8":case"utf-8":return S(this,e,n);case"ascii":return T(this,e,n);case"latin1":case"binary":return I(this,e,n);case"base64":return E(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return L(this,e,n);default:if(r)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0}}.apply(this,arguments)},l.prototype.equals=function(t){if(!l.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===l.compare(this,t)},l.prototype.inspect=function(){var t="",n=e.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(t+=" ... ")),"<Buffer "+t+">"},l.prototype.compare=function(t,e,n,r,i){if(!l.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===n&&(n=t?t.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),e<0||n>t.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&e>=n)return 0;if(r>=i)return-1;if(e>=n)return 1;if(e>>>=0,n>>>=0,r>>>=0,i>>>=0,this===t)return 0;for(var o=i-r,a=n-e,s=Math.min(o,a),u=this.slice(r,i),c=t.slice(e,n),h=0;h<s;++h)if(u[h]!==c[h]){o=u[h],a=c[h];break}return o<a?-1:a<o?1:0},l.prototype.includes=function(t,e,n){return-1!==this.indexOf(t,e,n)},l.prototype.indexOf=function(t,e,n){return y(this,t,e,n,!0)},l.prototype.lastIndexOf=function(t,e,n){return y(this,t,e,n,!1)},l.prototype.write=function(t,e,n,r){if(void 0===e)r="utf8",n=this.length,e=0;else if(void 0===n&&"string"===typeof e)r=e,n=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-e;if((void 0===n||n>i)&&(n=i),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return v(this,t,e,n);case"utf8":case"utf-8":return _(this,t,e,n);case"ascii":return b(this,t,e,n);case"latin1":case"binary":return w(this,t,e,n);case"base64":return O(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,t,e,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var C=4096;function T(t,e,n){var r="";n=Math.min(t.length,n);for(var i=e;i<n;++i)r+=String.fromCharCode(127&t[i]);return r}function I(t,e,n){var r="";n=Math.min(t.length,n);for(var i=e;i<n;++i)r+=String.fromCharCode(t[i]);return r}function j(t,e,n){var r=t.length;(!e||e<0)&&(e=0),(!n||n<0||n>r)&&(n=r);for(var i="",o=e;o<n;++o)i+=G(t[o]);return i}function L(t,e,n){for(var r=t.slice(e,n),i="",o=0;o<r.length;o+=2)i+=String.fromCharCode(r[o]+256*r[o+1]);return i}function R(t,e,n){if(t%1!==0||t<0)throw new RangeError("offset is not uint");if(t+e>n)throw new RangeError("Trying to access beyond buffer length")}function P(t,e,n,r,i,o){if(!l.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<o)throw new RangeError('"value" argument is out of bounds');if(n+r>t.length)throw new RangeError("Index out of range")}function N(t,e,n,r){e<0&&(e=65535+e+1);for(var i=0,o=Math.min(t.length-n,2);i<o;++i)t[n+i]=(e&255<<8*(r?i:1-i))>>>8*(r?i:1-i)}function M(t,e,n,r){e<0&&(e=4294967295+e+1);for(var i=0,o=Math.min(t.length-n,4);i<o;++i)t[n+i]=e>>>8*(r?i:3-i)&255}function A(t,e,n,r,i,o){if(n+r>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function k(t,e,n,r,o){return o||A(t,0,n,4),i.write(t,e,n,r,23,4),n+4}function F(t,e,n,r,o){return o||A(t,0,n,8),i.write(t,e,n,r,52,8),n+8}l.prototype.slice=function(t,e){var n,r=this.length;if(t=~~t,e=void 0===e?r:~~e,t<0?(t+=r)<0&&(t=0):t>r&&(t=r),e<0?(e+=r)<0&&(e=0):e>r&&(e=r),e<t&&(e=t),l.TYPED_ARRAY_SUPPORT)(n=this.subarray(t,e)).__proto__=l.prototype;else{var i=e-t;n=new l(i,void 0);for(var o=0;o<i;++o)n[o]=this[o+t]}return n},l.prototype.readUIntLE=function(t,e,n){t|=0,e|=0,n||R(t,e,this.length);for(var r=this[t],i=1,o=0;++o<e&&(i*=256);)r+=this[t+o]*i;return r},l.prototype.readUIntBE=function(t,e,n){t|=0,e|=0,n||R(t,e,this.length);for(var r=this[t+--e],i=1;e>0&&(i*=256);)r+=this[t+--e]*i;return r},l.prototype.readUInt8=function(t,e){return e||R(t,1,this.length),this[t]},l.prototype.readUInt16LE=function(t,e){return e||R(t,2,this.length),this[t]|this[t+1]<<8},l.prototype.readUInt16BE=function(t,e){return e||R(t,2,this.length),this[t]<<8|this[t+1]},l.prototype.readUInt32LE=function(t,e){return e||R(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},l.prototype.readUInt32BE=function(t,e){return e||R(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},l.prototype.readIntLE=function(t,e,n){t|=0,e|=0,n||R(t,e,this.length);for(var r=this[t],i=1,o=0;++o<e&&(i*=256);)r+=this[t+o]*i;return r>=(i*=128)&&(r-=Math.pow(2,8*e)),r},l.prototype.readIntBE=function(t,e,n){t|=0,e|=0,n||R(t,e,this.length);for(var r=e,i=1,o=this[t+--r];r>0&&(i*=256);)o+=this[t+--r]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*e)),o},l.prototype.readInt8=function(t,e){return e||R(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},l.prototype.readInt16LE=function(t,e){e||R(t,2,this.length);var n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt16BE=function(t,e){e||R(t,2,this.length);var n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt32LE=function(t,e){return e||R(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},l.prototype.readInt32BE=function(t,e){return e||R(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},l.prototype.readFloatLE=function(t,e){return e||R(t,4,this.length),i.read(this,t,!0,23,4)},l.prototype.readFloatBE=function(t,e){return e||R(t,4,this.length),i.read(this,t,!1,23,4)},l.prototype.readDoubleLE=function(t,e){return e||R(t,8,this.length),i.read(this,t,!0,52,8)},l.prototype.readDoubleBE=function(t,e){return e||R(t,8,this.length),i.read(this,t,!1,52,8)},l.prototype.writeUIntLE=function(t,e,n,r){(t=+t,e|=0,n|=0,r)||P(this,t,e,n,Math.pow(2,8*n)-1,0);var i=1,o=0;for(this[e]=255&t;++o<n&&(i*=256);)this[e+o]=t/i&255;return e+n},l.prototype.writeUIntBE=function(t,e,n,r){(t=+t,e|=0,n|=0,r)||P(this,t,e,n,Math.pow(2,8*n)-1,0);var i=n-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+n},l.prototype.writeUInt8=function(t,e,n){return t=+t,e|=0,n||P(this,t,e,1,255,0),l.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},l.prototype.writeUInt16LE=function(t,e,n){return t=+t,e|=0,n||P(this,t,e,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):N(this,t,e,!0),e+2},l.prototype.writeUInt16BE=function(t,e,n){return t=+t,e|=0,n||P(this,t,e,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):N(this,t,e,!1),e+2},l.prototype.writeUInt32LE=function(t,e,n){return t=+t,e|=0,n||P(this,t,e,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):M(this,t,e,!0),e+4},l.prototype.writeUInt32BE=function(t,e,n){return t=+t,e|=0,n||P(this,t,e,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):M(this,t,e,!1),e+4},l.prototype.writeIntLE=function(t,e,n,r){if(t=+t,e|=0,!r){var i=Math.pow(2,8*n-1);P(this,t,e,n,i-1,-i)}var o=0,a=1,s=0;for(this[e]=255&t;++o<n&&(a*=256);)t<0&&0===s&&0!==this[e+o-1]&&(s=1),this[e+o]=(t/a>>0)-s&255;return e+n},l.prototype.writeIntBE=function(t,e,n,r){if(t=+t,e|=0,!r){var i=Math.pow(2,8*n-1);P(this,t,e,n,i-1,-i)}var o=n-1,a=1,s=0;for(this[e+o]=255&t;--o>=0&&(a*=256);)t<0&&0===s&&0!==this[e+o+1]&&(s=1),this[e+o]=(t/a>>0)-s&255;return e+n},l.prototype.writeInt8=function(t,e,n){return t=+t,e|=0,n||P(this,t,e,1,127,-128),l.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},l.prototype.writeInt16LE=function(t,e,n){return t=+t,e|=0,n||P(this,t,e,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):N(this,t,e,!0),e+2},l.prototype.writeInt16BE=function(t,e,n){return t=+t,e|=0,n||P(this,t,e,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):N(this,t,e,!1),e+2},l.prototype.writeInt32LE=function(t,e,n){return t=+t,e|=0,n||P(this,t,e,4,2147483647,-2147483648),l.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):M(this,t,e,!0),e+4},l.prototype.writeInt32BE=function(t,e,n){return t=+t,e|=0,n||P(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),l.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):M(this,t,e,!1),e+4},l.prototype.writeFloatLE=function(t,e,n){return k(this,t,e,!0,n)},l.prototype.writeFloatBE=function(t,e,n){return k(this,t,e,!1,n)},l.prototype.writeDoubleLE=function(t,e,n){return F(this,t,e,!0,n)},l.prototype.writeDoubleBE=function(t,e,n){return F(this,t,e,!1,n)},l.prototype.copy=function(t,e,n,r){if(n||(n=0),r||0===r||(r=this.length),e>=t.length&&(e=t.length),e||(e=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),t.length-e<r-n&&(r=t.length-e+n);var i,o=r-n;if(this===t&&n<e&&e<r)for(i=o-1;i>=0;--i)t[i+e]=this[i+n];else if(o<1e3||!l.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)t[i+e]=this[i+n];else Uint8Array.prototype.set.call(t,this.subarray(n,n+o),e);return o},l.prototype.fill=function(t,e,n,r){if("string"===typeof t){if("string"===typeof e?(r=e,e=0,n=this.length):"string"===typeof n&&(r=n,n=this.length),1===t.length){var i=t.charCodeAt(0);i<256&&(t=i)}if(void 0!==r&&"string"!==typeof r)throw new TypeError("encoding must be a string");if("string"===typeof r&&!l.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"===typeof t&&(t&=255);if(e<0||this.length<e||this.length<n)throw new RangeError("Out of range index");if(n<=e)return this;var o;if(e>>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"===typeof t)for(o=e;o<n;++o)this[o]=t;else{var a=l.isBuffer(t)?t:U(new l(t,r).toString()),s=a.length;for(o=0;o<n-e;++o)this[o+e]=a[o%s]}return this};var D=/[^+\/0-9A-Za-z-_]/g;function G(t){return t<16?"0"+t.toString(16):t.toString(16)}function U(t,e){var n;e=e||1/0;for(var r=t.length,i=null,o=[],a=0;a<r;++a){if((n=t.charCodeAt(a))>55295&&n<57344){if(!i){if(n>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(a+1===r){(e-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(e-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((e-=1)<0)break;o.push(n)}else if(n<2048){if((e-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function z(t){return r.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(D,"")).length<2)return"";for(;t.length%4!==0;)t+="=";return t}(t))}function B(t,e,n,r){for(var i=0;i<r&&!(i+n>=e.length||i>=t.length);++i)e[i+n]=t[i];return i}}).call(e,n(159))},function(t,e,n){"use strict";e.byteLength=function(t){var e=u(t),n=e[0],r=e[1];return 3*(n+r)/4-r},e.toByteArray=function(t){var e,n,r=u(t),a=r[0],s=r[1],l=new o(function(t,e,n){return 3*(e+n)/4-n}(0,a,s)),c=0,h=s>0?a-4:a;for(n=0;n<h;n+=4)e=i[t.charCodeAt(n)]<<18|i[t.charCodeAt(n+1)]<<12|i[t.charCodeAt(n+2)]<<6|i[t.charCodeAt(n+3)],l[c++]=e>>16&255,l[c++]=e>>8&255,l[c++]=255&e;2===s&&(e=i[t.charCodeAt(n)]<<2|i[t.charCodeAt(n+1)]>>4,l[c++]=255&e);1===s&&(e=i[t.charCodeAt(n)]<<10|i[t.charCodeAt(n+1)]<<4|i[t.charCodeAt(n+2)]>>2,l[c++]=e>>8&255,l[c++]=255&e);return l},e.fromByteArray=function(t){for(var e,n=t.length,i=n%3,o=[],a=0,s=n-i;a<s;a+=16383)o.push(c(t,a,a+16383>s?s:a+16383));1===i?(e=t[n-1],o.push(r[e>>2]+r[e<<4&63]+"==")):2===i&&(e=(t[n-2]<<8)+t[n-1],o.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"="));return o.join("")};for(var r=[],i=[],o="undefined"!==typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,l=a.length;s<l;++s)r[s]=a[s],i[a.charCodeAt(s)]=s;function u(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=t.indexOf("=");return-1===n&&(n=e),[n,n===e?0:4-n%4]}function c(t,e,n){for(var i,o,a=[],s=e;s<n;s+=3)i=(t[s]<<16&16711680)+(t[s+1]<<8&65280)+(255&t[s+2]),a.push(r[(o=i)>>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return a.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},function(t,e){var n={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==n.call(t)}},function(t,e){(function(){var e;t.exports={icon:"icons/google.svg",name:"google",title:"Google Fonts",link:"google.com/fonts",getNames:function(){return e},getLink:function(t){return"https://fonts.google.com/specimen/"+t.replace(/( )/g,"+")},normalizeName:function(t){return t}},e=["ABeeZee","Abel","Abril Fatface","Aclonica","Acme","Actor","Adamina","Advent Pro","Aguafina Script","Akronim","Aladin","Aldrich","Alef","Alegreya","Alegreya SC","Alegreya Sans","Alegreya Sans SC","Alex Brush","Alfa Slab One","Alice","Alike","Alike Angular","Allan","Allerta","Allerta Stencil","Allura","Almendra","Almendra Display","Almendra SC","Amarante","Amaranth","Amatic SC","Amethysta","Amiri","Amita","Anaheim","Andada","Andika","Angkor","Annie Use Your Telescope","Anonymous Pro","Antic","Antic Didone","Antic Slab","Anton","Arapey","Arbutus","Arbutus Slab","Architects Daughter","Archivo Black","Archivo Narrow","Arimo","Arizonia","Armata","Artifika","Arvo","Arya","Asap","Asar","Asset","Astloch","Asul","Atomic Age","Aubrey","Audiowide","Autour One","Average","Average Sans","Averia Gruesa Libre","Averia Libre","Averia Sans Libre","Averia Serif Libre","Bad Script","Balthazar","Bangers","Basic","Battambang","Baumans","Bayon","Belgrano","Belleza","BenchNine","Bentham","Berkshire Swash","Bevan","Bigelow Rules","Bigshot One","Bilbo","Bilbo Swash Caps","Biryani","Bitter","Black Ops One","Bokor","Bonbon","Boogaloo","Bowlby One","Bowlby One SC","Brawler","Bree Serif","Bubblegum Sans","Bubbler One","Buda","Buenard","Butcherman","Butterfly Kids","Cabin","Cabin Condensed","Cabin Sketch","Caesar Dressing","Cagliostro","Calligraffitti","Cambay","Cambo","Candal","Cantarell","Cantata One","Cantora One","Capriola","Cardo","Carme","Carrois Gothic","Carrois Gothic SC","Carter One","Catamaran","Caudex","Caveat","Caveat Brush","Cedarville Cursive","Ceviche One","Changa One","Chango","Chau Philomene One","Chela One","Chelsea Market","Chenla","Cherry Cream Soda","Cherry Swash","Chewy","Chicle","Chivo","Chonburi","Cinzel","Cinzel Decorative","Clicker Script","Coda","Coda Caption","Codystar","Combo","Comfortaa","Coming Soon","Concert One","Condiment","Content","Contrail One","Convergence","Cookie","Copse","Corben","Courgette","Cousine","Coustard","Covered By Your Grace","Crafty Girls","Creepster","Crete Round","Crimson Text","Croissant One","Crushed","Cuprum","Cutive","Cutive Mono","Damion","Dancing Script","Dangrek","Dawning of a New Day","Days One","Dekko","Delius","Delius Swash Caps","Delius Unicase","Della Respira","Denk One","Devonshire","Dhurjati","Didact Gothic","Diplomata","Diplomata SC","Domine","Donegal One","Doppio One","Dorsa","Dosis","Dr Sugiyama","Droid Sans","Droid Sans Mono","Droid Serif","Duru Sans","Dynalight","EB Garamond","Eagle Lake","Eater","Economica","Eczar","Ek Mukta","Electrolize","Elsie","Elsie Swash Caps","Emblema One","Emilys Candy","Engagement","Englebert","Enriqueta","Erica One","Esteban","Euphoria Script","Ewert","Exo","Exo 2","Expletus Sans","Fanwood Text","Fascinate","Fascinate Inline","Faster One","Fasthand","Fauna One","Federant","Federo","Felipa","Fenix","Finger Paint","Fira Mono","Fira Sans","Fjalla One","Fjord One","Flamenco","Flavors","Fondamento","Fontdiner Swanky","Forum","Francois One","Freckle Face","Fredericka the Great","Fredoka One","Freehand","Fresca","Frijole","Fruktur","Fugaz One","GFS Didot","GFS Neohellenic","Gabriela","Gafata","Galdeano","Galindo","Gentium Basic","Gentium Book Basic","Geo","Geostar","Geostar Fill","Germania One","Gidugu","Gilda Display","Give You Glory","Glass Antiqua","Glegoo","Gloria Hallelujah","Goblin One","Gochi Hand","Gorditas","Goudy Bookletter 1911","Graduate","Grand Hotel","Gravitas One","Great Vibes","Griffy","Gruppo","Gudea","Gurajada","Habibi","Halant","Hammersmith One","Hanalei","Hanalei Fill","Handlee","Hanuman","Happy Monkey","Headland One","Henny Penny","Herr Von Muellerhoff","Hind","Hind Siliguri","Hind Vadodara","Holtwood One SC","Homemade Apple","Homenaje","IM Fell DW Pica","IM Fell DW Pica SC","IM Fell Double Pica","IM Fell Double Pica SC","IM Fell English","IM Fell English SC","IM Fell French Canon","IM Fell French Canon SC","IM Fell Great Primer","IM Fell Great Primer SC","Iceberg","Iceland","Imprima","Inconsolata","Inder","Indie Flower","Inika","Inknut Antiqua","Irish Grover","Istok Web","Italiana","Italianno","Itim","Jacques Francois","Jacques Francois Shadow","Jaldi","Jim Nightshade","Jockey One","Jolly Lodger","Josefin Sans","Josefin Slab","Joti One","Judson","Julee","Julius Sans One","Junge","Jura","Just Another Hand","Just Me Again Down Here","Kadwa","Kalam","Kameron","Kantumruy","Karla","Karma","Kaushan Script","Kavoon","Kdam Thmor","Keania One","Kelly Slab","Kenia","Khand","Khmer","Khula","Kite One","Knewave","Kotta One","Koulen","Kranky","Kreon","Kristi","Krona One","Kurale","La Belle Aurore","Laila","Lakki Reddy","Lancelot","Lateef","Lato","League Script","Leckerli One","Ledger","Lekton","Lemon","Libre Baskerville","Life Savers","Lilita One","Lily Script One","Limelight","Linden Hill","Lobster","Lobster Two","Londrina Outline","Londrina Shadow","Londrina Sketch","Londrina Solid","Lora","Love Ya Like A Sister","Loved by the King","Lovers Quarrel","Luckiest Guy","Lusitana","Lustria","Macondo","Macondo Swash Caps","Magra","Maiden Orange","Mako","Mallanna","Mandali","Marcellus","Marcellus SC","Marck Script","Margarine","Marko One","Marmelad","Martel","Martel Sans","Marvel","Mate","Mate SC","Maven Pro","McLaren","Meddon","MedievalSharp","Medula One","Megrim","Meie Script","Merienda","Merienda One","Merriweather","Merriweather Sans","Metal","Metal Mania","Metamorphous","Metrophobic","Michroma","Milonga","Miltonian","Miltonian Tattoo","Miniver","Miss Fajardose","Modak","Modern Antiqua","Molengo","Molle","Monda","Monofett","Monoton","Monsieur La Doulaise","Montaga","Montez","Montserrat","Montserrat Alternates","Montserrat Subrayada","Moul","Moulpali","Mountains of Christmas","Mouse Memoirs","Mr Bedfort","Mr Dafoe","Mr De Haviland","Mrs Saint Delafield","Mrs Sheppards","Muli","Mystery Quest","NTR","Neucha","Neuton","New Rocker","News Cycle","Niconne","Nixie One","Nobile","Nokora","Norican","Nosifer","Nothing You Could Do","Noticia Text","Noto Sans","Noto Serif","Nova Cut","Nova Flat","Nova Mono","Nova Oval","Nova Round","Nova Script","Nova Slim","Nova Square","Numans","Nunito","Odor Mean Chey","Offside","Old Standard TT","Oldenburg","Oleo Script","Oleo Script Swash Caps","Open Sans","Open Sans Condensed","Oranienbaum","Orbitron","Oregano","Orienta","Original Surfer","Oswald","Over the Rainbow","Overlock","Overlock SC","Ovo","Oxygen","Oxygen Mono","PT Mono","PT Sans","PT Sans Caption","PT Sans Narrow","PT Serif","PT Serif Caption","Pacifico","Palanquin","Palanquin Dark","Paprika","Parisienne","Passero One","Passion One","Pathway Gothic One","Patrick Hand","Patrick Hand SC","Patua One","Paytone One","Peddana","Peralta","Permanent Marker","Petit Formal Script","Petrona","Philosopher","Piedra","Pinyon Script","Pirata One","Plaster","Play","Playball","Playfair Display","Playfair Display SC","Podkova","Poiret One","Poller One","Poly","Pompiere","Pontano Sans","Poppins","Port Lligat Sans","Port Lligat Slab","Pragati Narrow","Prata","Preahvihear","Press Start 2P","Princess Sofia","Prociono","Prosto One","Puritan","Purple Purse","Quando","Quantico","Quattrocento","Quattrocento Sans","Questrial","Quicksand","Quintessential","Qwigley","Racing Sans One","Radley","Rajdhani","Raleway","Raleway Dots","Ramabhadra","Ramaraja","Rambla","Rammetto One","Ranchers","Rancho","Ranga","Rationale","Ravi Prakash","Redressed","Reenie Beanie","Revalia","Rhodium Libre","Ribeye","Ribeye Marrow","Righteous","Risque","Roboto","Roboto Condensed","Roboto Mono","Roboto Slab","Rochester","Rock Salt","Rokkitt","Romanesco","Ropa Sans","Rosario","Rosarivo","Rouge Script","Rozha One","Rubik","Rubik Mono One","Rubik One","Ruda","Rufina","Ruge Boogie","Ruluko","Rum Raisin","Ruslan Display","Russo One","Ruthie","Rye","Sacramento","Sahitya","Sail","Salsa","Sanchez","Sancreek","Sansita One","Sarala","Sarina","Sarpanch","Satisfy","Scada","Scheherazade","Schoolbell","Seaweed Script","Sevillana","Seymour One","Shadows Into Light","Shadows Into Light Two","Shanti","Share","Share Tech","Share Tech Mono","Shojumaru","Short Stack","Siemreap","Sigmar One","Signika","Signika Negative","Simonetta","Sintony","Sirin Stencil","Six Caps","Skranji","Slabo 13px","Slabo 27px","Slackey","Smokum","Smythe","Sniglet","Snippet","Snowburst One","Sofadi One","Sofia","Sonsie One","Sorts Mill Goudy","Source Code Pro","Source Sans Pro","Source Serif Pro","Special Elite","Spicy Rice","Spinnaker","Spirax","Squada One","Sree Krushnadevaraya","Stalemate","Stalinist One","Stardos Stencil","Stint Ultra Condensed","Stint Ultra Expanded","Stoke","Strait","Sue Ellen Francisco","Sumana","Sunshiney","Supermercado One","Sura","Suranna","Suravaram","Suwannaphum","Swanky and Moo Moo","Syncopate","Tangerine","Taprom","Tauri","Teko","Telex","Tenali Ramakrishna","Tenor Sans","Text Me One","The Girl Next Door","Tienne","Tillana","Timmana","Tinos","Titan One","Titillium Web","Trade Winds","Trocchi","Trochut","Trykker","Tulpen One","Ubuntu","Ubuntu Condensed","Ubuntu Mono","Ultra","Uncial Antiqua","Underdog","Unica One","UnifrakturCook","UnifrakturMaguntia","Unkempt","Unlock","Unna","VT323","Vampiro One","Varela","Varela Round","Vast Shadow","Vesper Libre","Vibur","Vidaloka","Viga","Voces","Volkhov","Vollkorn","Voltaire","Waiting for the Sunrise","Wallpoet","Walter Turncoat","Warnes","Wellfleet","Wendy One","Wire One","Work Sans","Yanone Kaffeesatz","Yantramanav","Yellowtail","Yeseva One","Yesteryear","Zeyada"]}).call(this)},function(t,e,n){"use strict";var r,i=n(113),o=n(311),a=n(1),s=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),l=function(t){function e(e){var n=this,r=e||{},i=Object(a.a)({},r);return delete i.imageRatio,(n=t.call(this,i)||this).imageRatio_=void 0!==r.imageRatio?r.imageRatio:1,n}return s(e,t),e.prototype.getImageRatio=function(){return this.imageRatio_},e.prototype.createRenderer=function(){return new o.a(this)},e}(i.a);e.a=l},function(t,e,n){"use strict";var r,i=n(205),o=n(193),a=n(3),s=n(120),l=n(33),u=n(142),c=n.n(u),h=n(65),p=n(14),f=n(1),d=n(0),g=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),y=function(t){function e(e){var n=t.call(this,e)||this;return n.vectorRenderer_=new o.a(e),n.layerImageRatio_=e.getImageRatio(),n.coordinateToVectorPixelTransform_=Object(p.c)(),n.renderedPixelToCoordinateTransform_=null,n}return g(e,t),e.prototype.disposeInternal=function(){this.vectorRenderer_.dispose(),t.prototype.disposeInternal.call(this)},e.prototype.getFeatures=function(t){if(!this.vectorRenderer_)return new Promise(function(t){return t([])});var e=Object(p.a)(this.coordinateToVectorPixelTransform_,Object(p.a)(this.renderedPixelToCoordinateTransform_,t.slice()));return this.vectorRenderer_.getFeatures(e)},e.prototype.handleFontsChanged=function(){this.vectorRenderer_.handleFontsChanged()},e.prototype.prepareFrame=function(t){var e=t.pixelRatio,n=t.viewState,r=n.resolution,i=t.viewHints,o=this.vectorRenderer_,u=t.extent;1!==this.layerImageRatio_&&(u=u.slice(0),Object(d.scaleFromCenter)(u,this.layerImageRatio_));var g=Object(d.getWidth)(u)/r,y=Object(d.getHeight)(u)/r;if(!i[h.a.ANIMATING]&&!i[h.a.INTERACTING]&&!Object(d.isEmpty)(u)){o.useContainer(null,null,1);var m=o.context,v=Object(f.a)({},t,{declutterTree:new c.a(9),extent:u,size:[g,y],viewState:Object(f.a)({},t.viewState,{rotation:0})}),_=new s.a(u,r,e,m.canvas,function(t){o.prepareFrame(v)&&o.replayGroupChanged&&(o.clipping=!1,o.renderFrame(v,null),o.renderDeclutter(v),t())});_.addEventListener(a.a.CHANGE,function(){if(_.getState()===l.a.LOADED){this.image_=_;var t=_.getResolution(),r=_.getPixelRatio(),i=t*e/r;this.renderedResolution=i,this.coordinateToVectorPixelTransform_=Object(p.b)(this.coordinateToVectorPixelTransform_,g/2,y/2,1/i,-1/i,0,-n.center[0],-n.center[1])}}.bind(this)),_.load()}return this.image_&&(this.renderedPixelToCoordinateTransform_=t.pixelToCoordinateTransform.slice()),!!this.image_},e.prototype.preRender=function(){},e.prototype.postRender=function(){},e.prototype.renderDeclutter=function(){},e.prototype.forEachFeatureAtCoordinate=function(e,n,r,i,o){return this.vectorRenderer_?this.vectorRenderer_.forEachFeatureAtCoordinate(e,n,r,i,o):t.prototype.forEachFeatureAtCoordinate.call(this,e,n,r,i,o)},e}(i.a);e.a=y},function(t,e,n){"use strict";var r,i=n(54),o=n(202),a=n(1),s=n(313),l=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),u=function(t){function e(e){var n=this,r=Object(a.a)({},e);return(n=t.call(this,r)||this).parseResult_=Object(s.a)(e.style),n.hitDetectionDisabled_=!!e.disableHitDetection,n}return l(e,t),e.prototype.createRenderer=function(){return new o.a(this,{className:this.getClassName(),vertexShader:this.parseResult_.builder.getSymbolVertexShader(),fragmentShader:this.parseResult_.builder.getSymbolFragmentShader(),hitVertexShader:!this.hitDetectionDisabled_&&this.parseResult_.builder.getSymbolVertexShader(!0),hitFragmentShader:!this.hitDetectionDisabled_&&this.parseResult_.builder.getSymbolFragmentShader(!0),uniforms:this.parseResult_.uniforms,attributes:this.parseResult_.attributes})},e.prototype.disposeInternal=function(){this.getRenderer().disposeInternal(),t.prototype.disposeInternal.call(this)},e}(i.a);e.a=u},function(t,e,n){"use strict";e.a=function(t){var e=t.symbol,n=void 0!==e.size?e.size:1,o=e.color||"white",a=e.textureCoord||[0,0,1,1],s=e.offset||[0,0],l=void 0!==e.opacity?e.opacity:1,u=void 0!==e.rotation?e.rotation:0,c={inFragmentShader:!1,variables:[],attributes:[],stringLiteralsMap:{}},h=Object(r.b)(c,n,r.a.NUMBER_ARRAY|r.a.NUMBER),p=Object(r.b)(c,s,r.a.NUMBER_ARRAY),f=Object(r.b)(c,a,r.a.NUMBER_ARRAY),d=Object(r.b)(c,u,r.a.NUMBER),g={inFragmentShader:!0,variables:c.variables,attributes:[],stringLiteralsMap:c.stringLiteralsMap},y=Object(r.b)(g,o,r.a.COLOR),m=Object(r.b)(g,l,r.a.NUMBER),v="1.0",_="vec2("+Object(r.b)(g,n,r.a.NUMBER_ARRAY|r.a.NUMBER)+").x";switch(e.symbolType){case"square":case"image":break;case"circle":v="(1.0-smoothstep(1.-4./"+_+",1.,dot(v_quadCoord-.5,v_quadCoord-.5)*4.))";break;case"triangle":var b="(v_quadCoord*2.-1.)",w="(atan("+b+".x,"+b+".y))";v="(1.0-smoothstep(.5-3./"+_+",.5,cos(floor(.5+"+w+"/2.094395102)*2.094395102-"+w+")*length("+b+")))";break;default:throw new Error("Unexpected symbol type: "+e.symbolType)}var O=(new i).setSizeExpression("vec2("+h+")").setRotationExpression(d).setSymbolOffsetExpression(p).setTextureCoordinateExpression(f).setSymbolRotateWithView(!!e.rotateWithView).setColorExpression("vec4("+y+".rgb, "+y+".a * "+m+" * "+v+")");if(t.filter){var x=Object(r.b)(g,t.filter,r.a.BOOLEAN);O.setFragmentDiscardExpression("!"+x)}var E={};if(g.variables.forEach(function(e){var n=Object(r.d)(e);O.addUniform("float "+n),E[n]=function(){if(!t.variables||void 0===t.variables[e])throw new Error("The following variable is missing from the style: "+e);var n=t.variables[e];return"string"===typeof n&&(n=Object(r.c)(c,n)),void 0!==n?n:-9999999}}),"image"===e.symbolType&&e.src){var S=new Image;S.src=e.src,O.addUniform("sampler2D u_texture").setColorExpression(O.getColorExpression()+" * texture2D(u_texture, v_texCoord)"),E.u_texture=S}return g.attributes.forEach(function(t){-1===c.attributes.indexOf(t)&&c.attributes.push(t),O.addVarying("v_"+t,"float","a_"+t)}),c.attributes.forEach(function(t){O.addAttribute("float a_"+t)}),{builder:O,attributes:c.attributes.map(function(t){return{name:t,callback:function(e,n){var i=n[t];return"string"===typeof i&&(i=Object(r.c)(c,i)),void 0!==i?i:-9999999}}}),uniforms:E}};var r=n(314),i=function(){function t(){this.uniforms=[],this.attributes=[],this.varyings=[],this.sizeExpression="vec2(1.0)",this.rotationExpression="0.0",this.offsetExpression="vec2(0.0)",this.colorExpression="vec4(1.0)",this.texCoordExpression="vec4(0.0, 0.0, 1.0, 1.0)",this.discardExpression="false",this.rotateWithView=!1}return t.prototype.addUniform=function(t){return this.uniforms.push(t),this},t.prototype.addAttribute=function(t){return this.attributes.push(t),this},t.prototype.addVarying=function(t,e,n){return this.varyings.push({name:t,type:e,expression:n}),this},t.prototype.setSizeExpression=function(t){return this.sizeExpression=t,this},t.prototype.setRotationExpression=function(t){return this.rotationExpression=t,this},t.prototype.setSymbolOffsetExpression=function(t){return this.offsetExpression=t,this},t.prototype.setColorExpression=function(t){return this.colorExpression=t,this},t.prototype.setTextureCoordinateExpression=function(t){return this.texCoordExpression=t,this},t.prototype.setFragmentDiscardExpression=function(t){return this.discardExpression=t,this},t.prototype.setSymbolRotateWithView=function(t){return this.rotateWithView=t,this},t.prototype.getSizeExpression=function(){return this.sizeExpression},t.prototype.getOffsetExpression=function(){return this.offsetExpression},t.prototype.getColorExpression=function(){return this.colorExpression},t.prototype.getTextureCoordinateExpression=function(){return this.texCoordExpression},t.prototype.getFragmentDiscardExpression=function(){return this.discardExpression},t.prototype.getSymbolVertexShader=function(t){var e=this.rotateWithView?"u_offsetScaleMatrix * u_offsetRotateMatrix":"u_offsetScaleMatrix",n=this.attributes,r=this.varyings;return t&&(n=n.concat("vec4 a_hitColor"),r=r.concat({name:"v_hitColor",type:"vec4",expression:"a_hitColor"})),"precision mediump float;\nuniform mat4 u_projectionMatrix;\nuniform mat4 u_offsetScaleMatrix;\nuniform mat4 u_offsetRotateMatrix;\nuniform float u_time;\nuniform float u_zoom;\nuniform float u_resolution;\n"+this.uniforms.map(function(t){return"uniform "+t+";"}).join("\n")+"\nattribute vec2 a_position;\nattribute float a_index;\n"+n.map(function(t){return"attribute "+t+";"}).join("\n")+"\nvarying vec2 v_texCoord;\nvarying vec2 v_quadCoord;\n"+r.map(function(t){return"varying "+t.type+" "+t.name+";"}).join("\n")+"\nvoid main(void) {\n  mat4 offsetMatrix = "+e+";\n  vec2 halfSize = "+this.sizeExpression+" * 0.5;\n  vec2 offset = "+this.offsetExpression+";\n  float angle = "+this.rotationExpression+";\n  float offsetX;\n  float offsetY;\n  if (a_index == 0.0) {\n    offsetX = (offset.x - halfSize.x) * cos(angle) + (offset.y - halfSize.y) * sin(angle);\n    offsetY = (offset.y - halfSize.y) * cos(angle) - (offset.x - halfSize.x) * sin(angle);\n  } else if (a_index == 1.0) {\n    offsetX = (offset.x + halfSize.x) * cos(angle) + (offset.y - halfSize.y) * sin(angle);\n    offsetY = (offset.y - halfSize.y) * cos(angle) - (offset.x + halfSize.x) * sin(angle);\n  } else if (a_index == 2.0) {\n    offsetX = (offset.x + halfSize.x) * cos(angle) + (offset.y + halfSize.y) * sin(angle);\n    offsetY = (offset.y + halfSize.y) * cos(angle) - (offset.x + halfSize.x) * sin(angle);\n  } else {\n    offsetX = (offset.x - halfSize.x) * cos(angle) + (offset.y + halfSize.y) * sin(angle);\n    offsetY = (offset.y + halfSize.y) * cos(angle) - (offset.x - halfSize.x) * sin(angle);\n  }\n  vec4 offsets = offsetMatrix * vec4(offsetX, offsetY, 0.0, 0.0);\n  gl_Position = u_projectionMatrix * vec4(a_position, 0.0, 1.0) + offsets;\n  vec4 texCoord = "+this.texCoordExpression+";\n  float u = a_index == 0.0 || a_index == 3.0 ? texCoord.s : texCoord.p;\n  float v = a_index == 2.0 || a_index == 3.0 ? texCoord.t : texCoord.q;\n  v_texCoord = vec2(u, v);\n  u = a_index == 0.0 || a_index == 3.0 ? 0.0 : 1.0;\n  v = a_index == 2.0 || a_index == 3.0 ? 0.0 : 1.0;\n  v_quadCoord = vec2(u, v);\n"+r.map(function(t){return"  "+t.name+" = "+t.expression+";"}).join("\n")+"\n}"},t.prototype.getSymbolFragmentShader=function(t){var e=t?"  if (gl_FragColor.a < 0.1) { discard; } gl_FragColor = v_hitColor;":"",n=this.varyings;return t&&(n=n.concat({name:"v_hitColor",type:"vec4",expression:"a_hitColor"})),"precision mediump float;\nuniform float u_time;\nuniform float u_zoom;\nuniform float u_resolution;\n"+this.uniforms.map(function(t){return"uniform "+t+";"}).join("\n")+"\nvarying vec2 v_texCoord;\nvarying vec2 v_quadCoord;\n"+n.map(function(t){return"varying "+t.type+" "+t.name+";"}).join("\n")+"\nvoid main(void) {\n  if ("+this.discardExpression+") { discard; }\n  gl_FragColor = "+this.colorExpression+";\n  gl_FragColor.rgb *= gl_FragColor.a;\n"+e+"\n}"},t}()},function(t,e,n){"use strict";n.d(e,"a",function(){return i}),e.c=u,e.b=c,e.d=b;var r=n(61),i={NUMBER:1,STRING:2,COLOR:4,BOOLEAN:8,NUMBER_ARRAY:16,ANY:31,NONE:0},o={};function a(t){if("number"===typeof t)return i.NUMBER;if("boolean"===typeof t)return i.BOOLEAN;if("string"===typeof t)return Object(r.c)(t)?i.COLOR|i.STRING:i.STRING;if(!Array.isArray(t))throw new Error("Unhandled value type: "+JSON.stringify(t));var e=t;if(e.every(function(t){return"number"===typeof t}))return 3===e.length||4===e.length?i.COLOR|i.NUMBER_ARRAY:i.NUMBER_ARRAY;if("string"!==typeof e[0])throw new Error("Expected an expression operator but received: "+JSON.stringify(e));var n=o[e[0]];if(void 0===n)throw new Error("Unrecognized expression operator: "+JSON.stringify(e));return n.getReturnType(e.slice(1))}function s(t){var e=t.toString();return-1===e.indexOf(".")?e+".0":e}function l(t){if(t.length<2||t.length>4)throw new Error("`formatArray` can only output `vec2`, `vec3` or `vec4` arrays.");return"vec"+t.length+"("+t.map(s).join(", ")+")"}function u(t,e){return void 0===t.stringLiteralsMap[e]&&(t.stringLiteralsMap[e]=Object.keys(t.stringLiteralsMap).length),t.stringLiteralsMap[e]}function c(t,e,n){if(Array.isArray(e)&&"string"===typeof e[0]){var c=o[e[0]];if(void 0===c)throw new Error("Unrecognized expression operator: "+JSON.stringify(e));return c.toGlsl(t,e.slice(1),n)}var h,p,f=a(e);if((f&i.NUMBER)>0)return s(e);if((f&i.BOOLEAN)>0)return e.toString();if((f&i.STRING)>0&&(void 0===n||n==i.STRING))return function(t,e){return s(u(t,e))}(t,e.toString());if((f&i.COLOR)>0&&(void 0===n||n==i.COLOR))return h=e,(p=Object(r.a)(h).slice()).length<4&&p.push(1),l(p.map(function(t,e){return e<3?t/255:t}));if((f&i.NUMBER_ARRAY)>0)return l(e);throw new Error("Unexpected expression "+e+" (expected type "+n+")")}function h(t){if(!(a(t)&i.NUMBER))throw new Error("A numeric value was expected, got "+JSON.stringify(t)+" instead")}function p(t){for(var e=0;e<t.length;e++)h(t[e])}function f(t){if(!(a(t)&i.STRING))throw new Error("A string value was expected, got "+JSON.stringify(t)+" instead")}function d(t){if(!(a(t)&i.BOOLEAN))throw new Error("A boolean value was expected, got "+JSON.stringify(t)+" instead")}function g(t,e){if(t.length!==e)throw new Error("Exactly "+e+" arguments were expected, got "+t.length+" instead")}function y(t,e){if(t.length<e)throw new Error("At least "+e+" arguments were expected, got "+t.length+" instead")}function m(t,e){if(t.length>e)throw new Error("At most "+e+" arguments were expected, got "+t.length+" instead")}function v(t){if(t.length%2!==0)throw new Error("An even amount of arguments was expected, got "+t+" instead")}function _(t,e){if(n=e,Math.log2(n)%1!==0)throw new Error("Could not infer only one type from the following expression: "+JSON.stringify(t));var n}function b(t){return"u_var_"+t}function w(t){return{getReturnType:function(t){return i.BOOLEAN},toGlsl:function(e,n){g(n,2);for(var r=i.ANY,o=0;o<n.length;o++)r&=a(n[o]);if(0===r)throw new Error("All arguments should be of compatible type, got "+JSON.stringify(n)+" instead");return"("+c(e,n[0],r)+" "+t+" "+c(e,n[1],r)+")"}}}function O(t){return{getReturnType:function(t){return i.BOOLEAN},toGlsl:function(e,n){y(n,2);for(var r=0;r<n.length;r++)d(n[r]);return"("+n.map(function(t){return c(e,t)}).join(" "+t+" ")+")"}}}o.get={getReturnType:function(t){return i.ANY},toGlsl:function(t,e){g(e,1),f(e[0]);var n=e[0].toString();return-1===t.attributes.indexOf(n)&&t.attributes.push(n),(t.inFragmentShader?"v_":"a_")+n}},o.var={getReturnType:function(t){return i.ANY},toGlsl:function(t,e){g(e,1),f(e[0]);var n=e[0].toString();return-1===t.variables.indexOf(n)&&t.variables.push(n),b(n)}},o.time={getReturnType:function(t){return i.NUMBER},toGlsl:function(t,e){return g(e,0),"u_time"}},o.zoom={getReturnType:function(t){return i.NUMBER},toGlsl:function(t,e){return g(e,0),"u_zoom"}},o.resolution={getReturnType:function(t){return i.NUMBER},toGlsl:function(t,e){return g(e,0),"u_resolution"}},o["*"]={getReturnType:function(t){return i.NUMBER},toGlsl:function(t,e){return g(e,2),p(e),"("+c(t,e[0])+" * "+c(t,e[1])+")"}},o["/"]={getReturnType:function(t){return i.NUMBER},toGlsl:function(t,e){return g(e,2),p(e),"("+c(t,e[0])+" / "+c(t,e[1])+")"}},o["+"]={getReturnType:function(t){return i.NUMBER},toGlsl:function(t,e){return g(e,2),p(e),"("+c(t,e[0])+" + "+c(t,e[1])+")"}},o["-"]={getReturnType:function(t){return i.NUMBER},toGlsl:function(t,e){return g(e,2),p(e),"("+c(t,e[0])+" - "+c(t,e[1])+")"}},o.clamp={getReturnType:function(t){return i.NUMBER},toGlsl:function(t,e){g(e,3),p(e);var n=c(t,e[1]),r=c(t,e[2]);return"clamp("+c(t,e[0])+", "+n+", "+r+")"}},o["%"]={getReturnType:function(t){return i.NUMBER},toGlsl:function(t,e){return g(e,2),p(e),"mod("+c(t,e[0])+", "+c(t,e[1])+")"}},o["^"]={getReturnType:function(t){return i.NUMBER},toGlsl:function(t,e){return g(e,2),p(e),"pow("+c(t,e[0])+", "+c(t,e[1])+")"}},o[">"]={getReturnType:function(t){return i.BOOLEAN},toGlsl:function(t,e){return g(e,2),p(e),"("+c(t,e[0])+" > "+c(t,e[1])+")"}},o[">="]={getReturnType:function(t){return i.BOOLEAN},toGlsl:function(t,e){return g(e,2),p(e),"("+c(t,e[0])+" >= "+c(t,e[1])+")"}},o["<"]={getReturnType:function(t){return i.BOOLEAN},toGlsl:function(t,e){return g(e,2),p(e),"("+c(t,e[0])+" < "+c(t,e[1])+")"}},o["<="]={getReturnType:function(t){return i.BOOLEAN},toGlsl:function(t,e){return g(e,2),p(e),"("+c(t,e[0])+" <= "+c(t,e[1])+")"}},o["=="]=w("=="),o["!="]=w("!="),o["!"]={getReturnType:function(t){return i.BOOLEAN},toGlsl:function(t,e){return g(e,1),d(e[0]),"(!"+c(t,e[0])+")"}},o.all=O("&&"),o.any=O("||"),o.between={getReturnType:function(t){return i.BOOLEAN},toGlsl:function(t,e){g(e,3),p(e);var n=c(t,e[1]),r=c(t,e[2]),i=c(t,e[0]);return"("+i+" >= "+n+" && "+i+" <= "+r+")"}},o.array={getReturnType:function(t){return i.NUMBER_ARRAY},toGlsl:function(t,e){y(e,2),m(e,4),p(e);var n=e.map(function(e){return c(t,e,i.NUMBER)});return"vec"+e.length+"("+n.join(", ")+")"}},o.color={getReturnType:function(t){return i.COLOR},toGlsl:function(t,e){y(e,3),m(e,4),p(e);var n=e;3===e.length&&n.push(1);var r=e.map(function(e,n){return c(t,e,i.NUMBER)+(n<3?" / 255.0":"")});return"vec"+e.length+"("+r.join(", ")+")"}},o.interpolate={getReturnType:function(t){for(var e=i.COLOR|i.NUMBER,n=3;n<t.length;n+=2)e&=a(t[n]);return e},toGlsl:function(t,e,n){v(e),y(e,6);var r,a=e[0];switch(a[0]){case"linear":r=1;break;case"exponential":r=a[1];break;default:r=null}if(!r)throw new Error('Invalid interpolation type for "interpolate" operator, received: '+JSON.stringify(a));var l=void 0!==n?n:i.ANY,u=o.interpolate.getReturnType(e)&l;_(e,u);for(var h=c(t,e[1]),p=null,f=2;f<e.length-2;f+=2){var d=c(t,e[f]),g=c(t,e[f+1],u),m=c(t,e[f+2]),b=c(t,e[f+3],u);p="mix("+(p||g)+", "+b+", pow(clamp(("+h+" - "+d+") / ("+m+" - "+d+"), 0.0, 1.0), "+s(r)+"))"}return p}},o.match={getReturnType:function(t){for(var e=i.ANY,n=2;n<t.length;n+=2)e&=a(t[n]);return e&=a(t[t.length-1])},toGlsl:function(t,e,n){v(e),y(e,4);var r=void 0!==n?n:i.ANY,a=o.match.getReturnType(e)&r;_(e,a);for(var s=c(t,e[0]),l=c(t,e[e.length-1],a),u=null,h=e.length-3;h>=1;h-=2){u="("+s+" == "+c(t,e[h])+" ? "+c(t,e[h+1],a)+" : "+(u||l)+")"}return u}},o.case={getReturnType:function(t){for(var e=i.ANY,n=1;n<t.length;n+=2)e&=a(t[n]);return e&=a(t[t.length-1])},toGlsl:function(t,e,n){!function(t){if(t.length%2===0)throw new Error("An odd amount of arguments was expected, got "+t+" instead")}(e),y(e,3);var r=void 0!==n?n:i.ANY,a=o.case.getReturnType(e)&r;_(e,a);for(var s=0;s<e.length-1;s+=2)d(e[s]);var l=c(t,e[e.length-1],a),u=null;for(s=e.length-3;s>=0;s-=2){u="("+c(t,e[s])+" ? "+c(t,e[s+1],a)+" : "+(u||l)+")"}return u}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(316);n.d(e,"BingMaps",function(){return r.a});var i=n(317);n.d(e,"CartoDB",function(){return i.a});var o=n(318);n.d(e,"Cluster",function(){return o.a});var a=n(319);n.d(e,"IIIF",function(){return a.a});var s=n(66);n.d(e,"Image",function(){return s.a});var l=n(321);n.d(e,"ImageArcGISRest",function(){return l.a});var u=n(322);n.d(e,"ImageCanvas",function(){return u.a});var c=n(323);n.d(e,"ImageMapGuide",function(){return c.a});var h=n(324);n.d(e,"ImageStatic",function(){return h.a});var p=n(325);n.d(e,"ImageWMS",function(){return p.a});var f=n(234);n.d(e,"OSM",function(){return f.b});var d=n(326);n.d(e,"Raster",function(){return d.a});var g=n(88);n.d(e,"Source",function(){return g.a});var y=n(327);n.d(e,"Stamen",function(){return y.a});var m=n(117);n.d(e,"Tile",function(){return m.b});var v=n(328);n.d(e,"TileArcGISRest",function(){return v.a});var _=n(329);n.d(e,"TileDebug",function(){return _.a});var b=n(52);n.d(e,"TileImage",function(){return b.a});var w=n(226);n.d(e,"TileJSON",function(){return w.a});var O=n(330);n.d(e,"TileWMS",function(){return O.a});var x=n(151);n.d(e,"UrlTile",function(){return x.a});var E=n(331);n.d(e,"UTFGrid",function(){return E.a});var S=n(50);n.d(e,"Vector",function(){return S.a});var C=n(150);n.d(e,"VectorTile",function(){return C.a});var T=n(332);n.d(e,"WMTS",function(){return T.a});var I=n(94);n.d(e,"XYZ",function(){return I.a});var j=n(231);n.d(e,"Zoomify",function(){return j.b})},function(t,e,n){"use strict";var r,i=n(31),o=n(52),a=n(0),s=n(76),l=n(38),u=n(51),c=n(2),h=n(158),p=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});var f=function(t){function e(e){var n=this,r=void 0!==e.hidpi&&e.hidpi;(n=t.call(this,{cacheSize:e.cacheSize,crossOrigin:"anonymous",imageSmoothing:e.imageSmoothing,opaque:!0,projection:Object(c.get)("EPSG:3857"),reprojectionErrorThreshold:e.reprojectionErrorThreshold,state:i.a.LOADING,tileLoadFunction:e.tileLoadFunction,tilePixelRatio:r?2:1,wrapX:void 0===e.wrapX||e.wrapX,transition:e.transition,zDirection:e.zDirection})||this).hidpi_=r,n.culture_=void 0!==e.culture?e.culture:"en-us",n.maxZoom_=void 0!==e.maxZoom?e.maxZoom:-1,n.apiKey_=e.key,n.imagerySet_=e.imagerySet;var o="https://dev.virtualearth.net/REST/v1/Imagery/Metadata/"+n.imagerySet_+"?uriScheme=https&include=ImageryProviders&key="+n.apiKey_+"&c="+n.culture_;return Object(h.a)(o,n.handleImageryMetadataResponse.bind(n),void 0,"jsonp"),n}return p(e,t),e.prototype.getApiKey=function(){return this.apiKey_},e.prototype.getImagerySet=function(){return this.imagerySet_},e.prototype.handleImageryMetadataResponse=function(t){if(200==t.statusCode&&"OK"==t.statusDescription&&"ValidCredentials"==t.authenticationResultCode&&1==t.resourceSets.length&&1==t.resourceSets[0].resources.length){var e=t.resourceSets[0].resources[0],n=-1==this.maxZoom_?e.zoomMax:this.maxZoom_,r=this.getProjection(),o=Object(u.extentFromProjection)(r),h=this.hidpi_?2:1,p=e.imageWidth==e.imageHeight?e.imageWidth/h:[e.imageWidth/h,e.imageHeight/h],f=Object(u.createXYZ)({extent:o,minZoom:e.zoomMin,maxZoom:n,tileSize:p});this.tileGrid=f;var d=this.culture_,g=this.hidpi_;if(this.tileUrlFunction=Object(s.b)(e.imageUrlSubdomains.map(function(t){var n=[0,0,0],r=e.imageUrl.replace("{subdomain}",t).replace("{culture}",d);return function(t,e,i){if(t){Object(l.a)(t[0],t[1],t[2],n);var o=r;return g&&(o+="&dpi=d1&device=mobile"),o.replace("{quadkey}",function(t){var e,n,r=t[0],i=new Array(r),o=1<<r-1;for(e=0;e<r;++e)n=48,t[1]&o&&(n+=1),t[2]&o&&(n+=2),i[e]=String.fromCharCode(n),o>>=1;return i.join("")}(n))}}})),e.imageryProviders){var y=Object(c.getTransformFromProjections)(Object(c.get)("EPSG:4326"),this.getProjection());this.setAttributions(function(t){var n=[],r=t.viewState,i=this.getTileGrid(),o=i.getZForResolution(r.resolution,this.zDirection),s=i.getTileCoordForCoordAndZ(r.center,o)[0];return e.imageryProviders.map(function(e){for(var r=!1,i=e.coverageAreas,o=0,l=i.length;o<l;++o){var u=i[o];if(s>=u.zoomMin&&s<=u.zoomMax){var c=u.bbox,h=[c[1],c[0],c[3],c[2]],p=Object(a.applyTransform)(h,y);if(Object(a.intersects)(p,t.extent)){r=!0;break}}}r&&n.push(e.attribution)}),n.push('<a class="ol-attribution-bing-tos" href="https://www.microsoft.com/maps/product/terms.html" target="_blank">Terms of Use</a>'),n}.bind(this))}this.setState(i.a.READY)}else this.setState(i.a.ERROR)},e}(o.a);e.a=f},function(t,e,n){"use strict";var r,i=n(31),o=n(94),a=n(1),s=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),l=function(t){function e(e){var n=t.call(this,{attributions:e.attributions,cacheSize:e.cacheSize,crossOrigin:e.crossOrigin,maxZoom:void 0!==e.maxZoom?e.maxZoom:18,minZoom:e.minZoom,projection:e.projection,transition:e.transition,wrapX:e.wrapX,zDirection:e.zDirection})||this;return n.account_=e.account,n.mapId_=e.map||"",n.config_=e.config||{},n.templateCache_={},n.initializeMap_(),n}return s(e,t),e.prototype.getConfig=function(){return this.config_},e.prototype.updateConfig=function(t){Object(a.a)(this.config_,t),this.initializeMap_()},e.prototype.setConfig=function(t){this.config_=t||{},this.initializeMap_()},e.prototype.initializeMap_=function(){var t=JSON.stringify(this.config_);if(this.templateCache_[t])this.applyTemplate_(this.templateCache_[t]);else{var e="https://"+this.account_+".carto.com/api/v1/map";this.mapId_&&(e+="/named/"+this.mapId_);var n=new XMLHttpRequest;n.addEventListener("load",this.handleInitResponse_.bind(this,t)),n.addEventListener("error",this.handleInitError_.bind(this)),n.open("POST",e),n.setRequestHeader("Content-type","application/json"),n.send(JSON.stringify(this.config_))}},e.prototype.handleInitResponse_=function(t,e){var n=e.target;if(!n.status||n.status>=200&&n.status<300){var r=void 0;try{r=JSON.parse(n.responseText)}catch(t){return void this.setState(i.a.ERROR)}this.applyTemplate_(r),this.templateCache_[t]=r,this.setState(i.a.READY)}else this.setState(i.a.ERROR)},e.prototype.handleInitError_=function(t){this.setState(i.a.ERROR)},e.prototype.applyTemplate_=function(t){var e="https://"+t.cdn_url.https+"/"+this.account_+"/api/v1/map/"+t.layergroupid+"/{z}/{x}/{y}.png";this.setUrl(e)},e}(o.a);e.a=l},function(t,e,n){"use strict";var r,i=n(3),o=n(15),a=n(8),s=n(16),l=n(50),u=n(20),c=n(4),h=n(0),p=n(6),f=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),d=function(t){function e(e){var n=t.call(this,{attributions:e.attributions,wrapX:e.wrapX})||this;return n.resolution=void 0,n.distance=void 0!==e.distance?e.distance:20,n.minDistance=e.minDistance||0,n.interpolationRatio=0,n.features=[],n.geometryFunction=e.geometryFunction||function(t){var e=t.getGeometry();return Object(c.a)(e.getType()==a.a.POINT,10),e},n.source=null,n.boundRefresh_=n.refresh.bind(n),n.updateDistance(n.distance,n.minDistance),n.setSource(e.source||null),n}return f(e,t),e.prototype.clear=function(e){this.features.length=0,t.prototype.clear.call(this,e)},e.prototype.getDistance=function(){return this.distance},e.prototype.getSource=function(){return this.source},e.prototype.loadFeatures=function(t,e,n){this.source.loadFeatures(t,e,n),e!==this.resolution&&(this.resolution=e,this.refresh())},e.prototype.setDistance=function(t){this.updateDistance(t,this.minDistance)},e.prototype.setMinDistance=function(t){this.updateDistance(this.distance,t)},e.prototype.getMinDistance=function(){return this.minDistance},e.prototype.setSource=function(t){this.source&&this.source.removeEventListener(i.a.CHANGE,this.boundRefresh_),this.source=t,t&&t.addEventListener(i.a.CHANGE,this.boundRefresh_),this.refresh()},e.prototype.refresh=function(){this.clear(),this.cluster(),this.addFeatures(this.features)},e.prototype.updateDistance=function(t,e){var n=0===t?0:Math.min(e,t)/t,r=t!==this.distance||this.interpolationRatio!==n;this.distance=t,this.minDistance=e,this.interpolationRatio=n,r&&this.refresh()},e.prototype.cluster=function(){if(void 0!==this.resolution&&this.source)for(var t=Object(h.createEmpty)(),e=this.distance*this.resolution,n=this.source.getFeatures(),r={},i=0,o=n.length;i<o;i++){var a=n[i];if(!(Object(p.c)(a)in r)){var s=this.geometryFunction(a);if(s){var l=s.getCoordinates();Object(h.createOrUpdateFromCoordinate)(l,t),Object(h.buffer)(t,e,t);var u=this.source.getFeaturesInExtent(t).filter(function(t){var e=Object(p.c)(t);return!(e in r)&&(r[e]=!0,!0)});this.features.push(this.createCluster(u,t))}}}},e.prototype.createCluster=function(t,e){for(var n=[0,0],r=t.length-1;r>=0;--r){var i=this.geometryFunction(t[r]);i?Object(u.a)(n,i.getCoordinates()):t.splice(r,1)}Object(u.i)(n,1/t.length);var a=Object(h.getCenter)(e),l=this.interpolationRatio,c=new s.a([n[0]*(1-l)+a[0]*l,n[1]*(1-l)+a[1]*l]),p=new o.a(c);return p.set("features",t,!0),p},e}(l.a);e.a=d},function(t,e,n){"use strict";var r,i=n(90),o=n(52),a=n(231),s=n(85),l=n(232),u=n(4),c=n(0),h=n(5),p=n(28),f=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});function d(t){return t.toLocaleString("en",{maximumFractionDigits:10})}var g=function(t){function e(e){var n=this,r=e||{},o=r.url||"";o+=o.lastIndexOf("/")===o.length-1||""===o?"":"/";var f=r.version||l.a.VERSION2,g=r.sizes||[],y=r.size;Object(u.a)(void 0!=y&&Array.isArray(y)&&2==y.length&&!isNaN(y[0])&&y[0]>0&&!isNaN(y[1])&&y[1]>0,60);var m,v,_,b=y[0],w=y[1],O=r.tileSize,x=r.tilePixelRatio||1,E=r.format||"jpg",S=r.quality||(r.version==l.a.VERSION1?"native":"default"),C=r.resolutions||[],T=r.supports||[],I=r.extent||[0,-w,b,0],j=void 0!=g&&Array.isArray(g)&&g.length>0,L=void 0!==O&&("number"===typeof O&&Number.isInteger(O)&&O>0||Array.isArray(O)&&O.length>0),R=void 0!=T&&Array.isArray(T)&&(Object(h.f)(T,"regionByPx")||Object(h.f)(T,"regionByPct"))&&(Object(h.f)(T,"sizeByWh")||Object(h.f)(T,"sizeByH")||Object(h.f)(T,"sizeByW")||Object(h.f)(T,"sizeByPct"));if(C.sort(function(t,e){return e-t}),L||R)if(void 0!=O&&("number"===typeof O&&Number.isInteger(O)&&O>0?(m=O,v=O):Array.isArray(O)&&O.length>0&&((1==O.length||void 0==O[1]&&Number.isInteger(O[0]))&&(m=O[0],v=O[0]),2==O.length&&(Number.isInteger(O[0])&&Number.isInteger(O[1])?(m=O[0],v=O[1]):void 0==O[0]&&Number.isInteger(O[1])&&(m=O[1],v=O[1])))),void 0!==m&&void 0!==v||(m=s.b,v=s.b),0==C.length)for(var P=_=Math.max(Math.ceil(Math.log(b/m)/Math.LN2),Math.ceil(Math.log(w/v)/Math.LN2));P>=0;P--)C.push(Math.pow(2,P));else{var N=Math.max.apply(Math,C);_=Math.round(Math.log(N)/Math.LN2)}else if(m=b,v=w,C=[],j){g.sort(function(t,e){return t[0]-e[0]}),_=-1;var M=[];for(P=0;P<g.length;P++){var A=b/g[P][0];C.length>0&&C[C.length-1]==A?M.push(P):(C.push(A),_++)}if(M.length>0)for(P=0;P<M.length;P++)g.splice(M[P]-P,1)}else C.push(1),g.push([b,w]),_=0;var k=new i.a({tileSize:[m,v],extent:I,origin:Object(c.getTopLeft)(I),resolutions:C}),F=a.a.bind(null,Object(p.d)(O||256).map(function(t){return t*x}));return(n=t.call(this,{attributions:r.attributions,attributionsCollapsible:r.attributionsCollapsible,cacheSize:r.cacheSize,crossOrigin:r.crossOrigin,imageSmoothing:r.imageSmoothing,projection:r.projection,reprojectionErrorThreshold:r.reprojectionErrorThreshold,state:r.state,tileClass:F,tileGrid:k,tilePixelRatio:r.tilePixelRatio,tileUrlFunction:function(t,e,n){var r,i,a=t[0];if(!(a>_)){var s=t[1],u=t[2],c=C[a];if(!(void 0===s||void 0===u||void 0===c||s<0||Math.ceil(b/c/m)<=s||u<0||Math.ceil(w/c/v)<=u)){if(R||L){var p=s*m*c,y=u*v*c,O=m*c,x=v*c,I=m,P=v;p+O>b&&(O=b-p),y+x>w&&(x=w-y),p+m*c>b&&(I=Math.floor((b-p+c-1)/c)),y+v*c>w&&(P=Math.floor((w-y+c-1)/c)),0==p&&O==b&&0==y&&x==w?r="full":!R||Object(h.f)(T,"regionByPx")?r=p+","+y+","+O+","+x:Object(h.f)(T,"regionByPct")&&(r="pct:"+d(p/b*100)+","+d(y/w*100)+","+d(O/b*100)+","+d(x/w*100)),f!=l.a.VERSION3||R&&!Object(h.f)(T,"sizeByWh")?!R||Object(h.f)(T,"sizeByW")?i=I+",":Object(h.f)(T,"sizeByH")?i=","+P:Object(h.f)(T,"sizeByWh")?i=I+","+P:Object(h.f)(T,"sizeByPct")&&(i="pct:"+d(100/c)):i=I+","+P}else if(r="full",j){var N=g[a][0],M=g[a][1];i=f==l.a.VERSION3?N==b&&M==w?"max":N+","+M:N==b?"full":N+","}else i=f==l.a.VERSION3?"max":"full";return o+r+"/"+i+"/0/"+S+"."+E}}},transition:r.transition})||this).zDirection=r.zDirection,n}return f(e,t),e}(o.a);e.a=g},function(t,e,n){"use strict";var r,i=n(89),o=n(3),a=n(103),s=n(33),l=n(227),u=n(119),c=n(0),h=n(9),p=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),f=function(t){function e(e,n,r,o,a,h,p){var f=this,d=e.getExtent(),g=n.getExtent(),y=g?Object(c.getIntersection)(r,g):r,m=Object(c.getCenter)(y),v=Object(u.b)(e,n,m,o),_=i.b,b=new l.a(e,n,y,d,v*_,o),w=h(b.calculateSourceExtent(),v,a),O=w?s.a.IDLE:s.a.EMPTY,x=w?w.getPixelRatio():1;return(f=t.call(this,r,o,x,O)||this).targetProj_=n,f.maxSourceExtent_=d,f.triangulation_=b,f.targetResolution_=o,f.targetExtent_=r,f.sourceImage_=w,f.sourcePixelRatio_=x,f.contextOptions_=p,f.canvas_=null,f.sourceListenerKey_=null,f}return p(e,t),e.prototype.disposeInternal=function(){this.state==s.a.LOADING&&this.unlistenSource_(),t.prototype.disposeInternal.call(this)},e.prototype.getImage=function(){return this.canvas_},e.prototype.getProjection=function(){return this.targetProj_},e.prototype.reproject_=function(){var t=this.sourceImage_.getState();if(t==s.a.LOADED){var e=Object(c.getWidth)(this.targetExtent_)/this.targetResolution_,n=Object(c.getHeight)(this.targetExtent_)/this.targetResolution_;this.canvas_=Object(u.c)(e,n,this.sourcePixelRatio_,this.sourceImage_.getResolution(),this.maxSourceExtent_,this.targetResolution_,this.targetExtent_,this.triangulation_,[{extent:this.sourceImage_.getExtent(),image:this.sourceImage_.getImage()}],0,void 0,this.contextOptions_)}this.state=t,this.changed()},e.prototype.load=function(){if(this.state==s.a.IDLE){this.state=s.a.LOADING,this.changed();var t=this.sourceImage_.getState();t==s.a.LOADED||t==s.a.ERROR?this.reproject_():(this.sourceListenerKey_=Object(h.listen)(this.sourceImage_,o.a.CHANGE,function(t){var e=this.sourceImage_.getState();e!=s.a.LOADED&&e!=s.a.ERROR||(this.unlistenSource_(),this.reproject_())},this),this.sourceImage_.load())}},e.prototype.unlistenSource_=function(){Object(h.unlistenByKey)(this.sourceListenerKey_),this.sourceListenerKey_=null},e}(a.a);e.a=f},function(t,e,n){"use strict";var r,i=n(3),o=n(66),a=n(63),s=n(77),l=n(4),u=n(1),c=n(0),h=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),p=function(t){function e(e){var n=this,r=e||{};return(n=t.call(this,{attributions:r.attributions,imageSmoothing:r.imageSmoothing,projection:r.projection,resolutions:r.resolutions})||this).crossOrigin_=void 0!==r.crossOrigin?r.crossOrigin:null,n.hidpi_=void 0===r.hidpi||r.hidpi,n.url_=r.url,n.imageLoadFunction_=void 0!==r.imageLoadFunction?r.imageLoadFunction:o.b,n.params_=r.params||{},n.image_=null,n.imageSize_=[0,0],n.renderedRevision_=0,n.ratio_=void 0!==r.ratio?r.ratio:1.5,n}return h(e,t),e.prototype.getParams=function(){return this.params_},e.prototype.getImageInternal=function(t,e,n,r){if(void 0===this.url_)return null;e=this.findNearestResolution(e),n=this.hidpi_?n:1;var o=this.image_;if(o&&this.renderedRevision_==this.getRevision()&&o.getResolution()==e&&o.getPixelRatio()==n&&Object(c.containsExtent)(o.getExtent(),t))return o;var s={F:"image",FORMAT:"PNG32",TRANSPARENT:!0};Object(u.a)(s,this.params_);var l=((t=t.slice())[0]+t[2])/2,h=(t[1]+t[3])/2;if(1!=this.ratio_){var p=this.ratio_*Object(c.getWidth)(t)/2,f=this.ratio_*Object(c.getHeight)(t)/2;t[0]=l-p,t[1]=h-f,t[2]=l+p,t[3]=h+f}var d=e/n,g=Math.ceil(Object(c.getWidth)(t)/d),y=Math.ceil(Object(c.getHeight)(t)/d);t[0]=l-d*g/2,t[2]=l+d*g/2,t[1]=h-d*y/2,t[3]=h+d*y/2,this.imageSize_[0]=g,this.imageSize_[1]=y;var m=this.getRequestUrl_(t,this.imageSize_,n,r,s);return this.image_=new a.a(t,e,n,m,this.crossOrigin_,this.imageLoadFunction_),this.renderedRevision_=this.getRevision(),this.image_.addEventListener(i.a.CHANGE,this.handleImageChange.bind(this)),this.image_},e.prototype.getImageLoadFunction=function(){return this.imageLoadFunction_},e.prototype.getRequestUrl_=function(t,e,n,r,i){var o=r.getCode().split(/:(?=\d+$)/).pop();i.SIZE=e[0]+","+e[1],i.BBOX=t.join(","),i.BBOXSR=o,i.IMAGESR=o,i.DPI=Math.round(90*n);var a=this.url_,u=a.replace(/MapServer\/?$/,"MapServer/export").replace(/ImageServer\/?$/,"ImageServer/exportImage");return u==a&&Object(l.a)(!1,50),Object(s.a)(u,i)},e.prototype.getUrl=function(){return this.url_},e.prototype.setImageLoadFunction=function(t){this.image_=null,this.imageLoadFunction_=t,this.changed()},e.prototype.setUrl=function(t){t!=this.url_&&(this.url_=t,this.image_=null,this.changed())},e.prototype.updateParams=function(t){Object(u.a)(this.params_,t),this.image_=null,this.changed()},e}(o.a);e.a=p},function(t,e,n){"use strict";var r,i=n(120),o=n(66),a=n(0),s=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),l=function(t){function e(e){var n=this,r=e||{};return(n=t.call(this,{attributions:r.attributions,imageSmoothing:r.imageSmoothing,projection:r.projection,resolutions:r.resolutions,state:r.state})||this).canvasFunction_=r.canvasFunction,n.canvas_=null,n.renderedRevision_=0,n.ratio_=void 0!==r.ratio?r.ratio:1.5,n}return s(e,t),e.prototype.getImageInternal=function(t,e,n,r){e=this.findNearestResolution(e);var o=this.canvas_;if(o&&this.renderedRevision_==this.getRevision()&&o.getResolution()==e&&o.getPixelRatio()==n&&Object(a.containsExtent)(o.getExtent(),t))return o;t=t.slice(),Object(a.scaleFromCenter)(t,this.ratio_);var s=[Object(a.getWidth)(t)/e*n,Object(a.getHeight)(t)/e*n],l=this.canvasFunction_.call(this,t,e,n,s,r);return l&&(o=new i.a(t,e,n,l)),this.canvas_=o,this.renderedRevision_=this.getRevision(),o},e}(o.a);e.a=l},function(t,e,n){"use strict";var r,i=n(3),o=n(66),a=n(63),s=n(77),l=n(1),u=n(0),c=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),h=function(t){function e(e){var n=t.call(this,{imageSmoothing:e.imageSmoothing,projection:e.projection,resolutions:e.resolutions})||this;return n.crossOrigin_=void 0!==e.crossOrigin?e.crossOrigin:null,n.displayDpi_=void 0!==e.displayDpi?e.displayDpi:96,n.params_=e.params||{},n.url_=e.url,n.imageLoadFunction_=void 0!==e.imageLoadFunction?e.imageLoadFunction:o.b,n.hidpi_=void 0===e.hidpi||e.hidpi,n.metersPerUnit_=void 0!==e.metersPerUnit?e.metersPerUnit:1,n.ratio_=void 0!==e.ratio?e.ratio:1,n.useOverlay_=void 0!==e.useOverlay&&e.useOverlay,n.image_=null,n.renderedRevision_=0,n}return c(e,t),e.prototype.getParams=function(){return this.params_},e.prototype.getImageInternal=function(t,e,n,r){e=this.findNearestResolution(e),n=this.hidpi_?n:1;var o=this.image_;if(o&&this.renderedRevision_==this.getRevision()&&o.getResolution()==e&&o.getPixelRatio()==n&&Object(u.containsExtent)(o.getExtent(),t))return o;1!=this.ratio_&&(t=t.slice(),Object(u.scaleFromCenter)(t,this.ratio_));var s=[Object(u.getWidth)(t)/e*n,Object(u.getHeight)(t)/e*n];if(void 0!==this.url_){var l=this.getUrl(this.url_,this.params_,t,s,r);(o=new a.a(t,e,n,l,this.crossOrigin_,this.imageLoadFunction_)).addEventListener(i.a.CHANGE,this.handleImageChange.bind(this))}else o=null;return this.image_=o,this.renderedRevision_=this.getRevision(),o},e.prototype.getImageLoadFunction=function(){return this.imageLoadFunction_},e.prototype.updateParams=function(t){Object(l.a)(this.params_,t),this.changed()},e.prototype.getUrl=function(t,e,n,r,i){var o=function(t,e,n,r){var i=Object(u.getWidth)(t),o=Object(u.getHeight)(t),a=e[0],s=e[1],l=.0254/r;return s*i>a*o?i*n/(a*l):o*n/(s*l)}(n,r,this.metersPerUnit_,this.displayDpi_),a=Object(u.getCenter)(n),c={OPERATION:this.useOverlay_?"GETDYNAMICMAPOVERLAYIMAGE":"GETMAPIMAGE",VERSION:"2.0.0",LOCALE:"en",CLIENTAGENT:"ol/source/ImageMapGuide source",CLIP:"1",SETDISPLAYDPI:this.displayDpi_,SETDISPLAYWIDTH:Math.round(r[0]),SETDISPLAYHEIGHT:Math.round(r[1]),SETVIEWSCALE:o,SETVIEWCENTERX:a[0],SETVIEWCENTERY:a[1]};return Object(l.a)(c,e),Object(s.a)(t,c)},e.prototype.setImageLoadFunction=function(t){this.image_=null,this.imageLoadFunction_=t,this.changed()},e}(o.a);e.a=h},function(t,e,n){"use strict";var r,i=n(3),o=n(66),a=n(33),s=n(63),l=n(1),u=n(11),c=n(0),h=n(2),p=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),f=function(t){function e(e){var n=this,r=void 0!==e.crossOrigin?e.crossOrigin:null,a=void 0!==e.imageLoadFunction?e.imageLoadFunction:o.b;return(n=t.call(this,{attributions:e.attributions,imageSmoothing:e.imageSmoothing,projection:Object(h.get)(e.projection)})||this).url_=e.url,n.imageExtent_=e.imageExtent,n.image_=new s.a(n.imageExtent_,void 0,1,n.url_,r,a),n.imageSize_=e.imageSize?e.imageSize:null,n.image_.addEventListener(i.a.CHANGE,n.handleImageChange.bind(n)),n}return p(e,t),e.prototype.getImageExtent=function(){return this.imageExtent_},e.prototype.getImageInternal=function(t,e,n,r){return Object(c.intersects)(t,this.image_.getExtent())?this.image_:null},e.prototype.getUrl=function(){return this.url_},e.prototype.handleImageChange=function(e){if(this.image_.getState()==a.a.LOADED){var n=this.image_.getExtent(),r=this.image_.getImage(),i=void 0,o=void 0;this.imageSize_?(i=this.imageSize_[0],o=this.imageSize_[1]):(i=r.width,o=r.height);var s=Object(c.getWidth)(n),h=Object(c.getHeight)(n),p=s/i,f=h/o,d=i,g=o;if(p>f?d=Math.round(s/f):g=Math.round(h/p),d!==i||g!==o){var y=Object(u.a)(d,g);Object(l.a)(y,this.getContextOptions());var m=y.canvas;y.drawImage(r,0,0,i,o,0,0,m.width,m.height),this.image_.setImage(m)}}t.prototype.handleImageChange.call(this,e)},e}(o.a);e.a=f},function(t,e,n){"use strict";var r,i=n(92),o=n(3),a=n(66),s=n(63),l=n(233),u=n(77),c=n(4),h=n(1),p=n(119),f=n(107),d=n(0),g=n(2),y=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),m=[101,101],v=function(t){function e(e){var n=this,r=e||{};return(n=t.call(this,{attributions:r.attributions,imageSmoothing:r.imageSmoothing,projection:r.projection,resolutions:r.resolutions})||this).crossOrigin_=void 0!==r.crossOrigin?r.crossOrigin:null,n.url_=r.url,n.imageLoadFunction_=void 0!==r.imageLoadFunction?r.imageLoadFunction:a.b,n.params_=r.params||{},n.v13_=!0,n.updateV13_(),n.serverType_=r.serverType,n.hidpi_=void 0===r.hidpi||r.hidpi,n.image_=null,n.imageSize_=[0,0],n.renderedRevision_=0,n.ratio_=void 0!==r.ratio?r.ratio:1.5,n}return y(e,t),e.prototype.getFeatureInfoUrl=function(t,e,n,r){if(void 0!==this.url_){var o=Object(g.get)(n),a=this.getProjection();a&&a!==o&&(e=Object(p.b)(a,o,t,e),t=Object(g.transform)(t,o,a));var s=Object(d.getForViewAndSize)(t,e,0,m),l={SERVICE:"WMS",VERSION:i.a,REQUEST:"GetFeatureInfo",FORMAT:"image/png",TRANSPARENT:!0,QUERY_LAYERS:this.params_.LAYERS};Object(h.a)(l,this.params_,r);var u=Math.floor((t[0]-s[0])/e),c=Math.floor((s[3]-t[1])/e);return l[this.v13_?"I":"X"]=u,l[this.v13_?"J":"Y"]=c,this.getRequestUrl_(s,m,1,a||o,l)}},e.prototype.getLegendUrl=function(t,e){if(void 0!==this.url_){var n={SERVICE:"WMS",VERSION:i.a,REQUEST:"GetLegendGraphic",FORMAT:"image/png"};if(void 0===e||void 0===e.LAYER){var r=this.params_.LAYERS;if(!(!Array.isArray(r)||1===r.length))return;n.LAYER=r}if(void 0!==t){var o=this.getProjection()?this.getProjection().getMetersPerUnit():1;n.SCALE=t*o/28e-5}return Object(h.a)(n,e),Object(u.a)(this.url_,n)}},e.prototype.getParams=function(){return this.params_},e.prototype.getImageInternal=function(t,e,n,r){if(void 0===this.url_)return null;e=this.findNearestResolution(e),1==n||this.hidpi_&&void 0!==this.serverType_||(n=1);var a=e/n,l=Object(d.getCenter)(t),u=Math.ceil(Object(d.getWidth)(t)/a),c=Math.ceil(Object(d.getHeight)(t)/a),p=Object(d.getForViewAndSize)(l,a,0,[u,c]),f=Math.ceil(this.ratio_*Object(d.getWidth)(t)/a),g=Math.ceil(this.ratio_*Object(d.getHeight)(t)/a),y=Object(d.getForViewAndSize)(l,a,0,[f,g]),m=this.image_;if(m&&this.renderedRevision_==this.getRevision()&&m.getResolution()==e&&m.getPixelRatio()==n&&Object(d.containsExtent)(m.getExtent(),p))return m;var v={SERVICE:"WMS",VERSION:i.a,REQUEST:"GetMap",FORMAT:"image/png",TRANSPARENT:!0};Object(h.a)(v,this.params_),this.imageSize_[0]=Math.round(Object(d.getWidth)(y)/a),this.imageSize_[1]=Math.round(Object(d.getHeight)(y)/a);var _=this.getRequestUrl_(y,this.imageSize_,n,r,v);return this.image_=new s.a(y,e,n,_,this.crossOrigin_,this.imageLoadFunction_),this.renderedRevision_=this.getRevision(),this.image_.addEventListener(o.a.CHANGE,this.handleImageChange.bind(this)),this.image_},e.prototype.getImageLoadFunction=function(){return this.imageLoadFunction_},e.prototype.getRequestUrl_=function(t,e,n,r,i){if(Object(c.a)(void 0!==this.url_,9),i[this.v13_?"CRS":"SRS"]=r.getCode(),"STYLES"in this.params_||(i.STYLES=""),1!=n)switch(this.serverType_){case l.a.GEOSERVER:var o=90*n+.5|0;"FORMAT_OPTIONS"in i?i.FORMAT_OPTIONS+=";dpi:"+o:i.FORMAT_OPTIONS="dpi:"+o;break;case l.a.MAPSERVER:i.MAP_RESOLUTION=90*n;break;case l.a.CARMENTA_SERVER:case l.a.QGIS:i.DPI=90*n;break;default:Object(c.a)(!1,8)}i.WIDTH=e[0],i.HEIGHT=e[1];var a,s=r.getAxisOrientation();return a=this.v13_&&"ne"==s.substr(0,2)?[t[1],t[0],t[3],t[2]]:t,i.BBOX=a.join(","),Object(u.a)(this.url_,i)},e.prototype.getUrl=function(){return this.url_},e.prototype.setImageLoadFunction=function(t){this.image_=null,this.imageLoadFunction_=t,this.changed()},e.prototype.setUrl=function(t){t!=this.url_&&(this.url_=t,this.image_=null,this.changed())},e.prototype.updateParams=function(t){Object(h.a)(this.params_,t),this.updateV13_(),this.image_=null,this.changed()},e.prototype.updateV13_=function(){var t=this.params_.VERSION||i.a;this.v13_=Object(f.a)(t,"1.3")>=0},e}(a.a);e.a=v},function(t,e,n){"use strict";var r,i=n(69),o=n(12),a=n(3),s=n(120),l=n(204),u=n(66),c=n(88),h=n(31),p=n(93),f=n(136),d=n(117),g=n(1),y=n(11),m=n(14),v=n(0),_=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),b=!0;try{new ImageData(10,10)}catch(t){b=!1}var w=document.createElement("canvas").getContext("2d");function O(t){var e=!0;try{new ImageData(10,10)}catch(t){e=!1}function n(t,n,r){return e?new ImageData(t,n,r):{data:t,width:n,height:r}}return function(e){var r,i,o=e.buffers,a=e.meta,s=e.imageOps,l=e.width,u=e.height,c=o.length,h=o[0].byteLength;if(s){var p=new Array(c);for(i=0;i<c;++i)p[i]=n(new Uint8ClampedArray(o[i]),l,u);r=t(p,a).data}else{r=new Uint8ClampedArray(h);var f=new Array(c),d=new Array(c);for(i=0;i<c;++i)f[i]=new Uint8ClampedArray(o[i]),d[i]=[0,0,0,0];for(var g=0;g<h;g+=4){for(var y=0;y<c;++y){var m=f[y];d[y][0]=m[g],d[y][1]=m[g+1],d[y][2]=m[g+2],d[y][3]=m[g+3]}var v=t(d,a);r[g]=v[0],r[g+1]=v[1],r[g+2]=v[2],r[g+3]=v[3]}}return r.buffer}}function x(t,e){var n=Object.keys(t.lib||{}).map(function(e){return"var "+e+" = "+t.lib[e].toString()+";"}).concat(["var __minion__ = ("+O.toString()+")(",t.operation.toString(),");",'self.addEventListener("message", function(event) {',"  var buffer = __minion__(event.data);","  self.postMessage({buffer: buffer, meta: event.data.meta}, [buffer]);","});"]),r=new Blob(n,{type:"text/javascript"}),i=URL.createObjectURL(r),o=new Worker(i);return o.addEventListener("message",e),o}var E=function(t){function e(e){var n,r=t.call(this)||this;r._imageOps=!!e.imageOps;var i=[];if(n=0===e.threads?0:r._imageOps?1:e.threads||1)for(var o=0;o<n;++o)i[o]=x(e,r._onWorkerMessage.bind(r,o));else i[0]=function(t,e){var n=O(t.operation),r=!1;return{postMessage:function(t){setTimeout(function(){r||e({data:{buffer:n(t),meta:t.meta}})},0)},terminate:function(){r=!0}}}(e,r._onWorkerMessage.bind(r,0));return r._workers=i,r._queue=[],r._maxQueueLength=e.queue||1/0,r._running=0,r._dataLookup={},r._job=null,r}return _(e,t),e.prototype.process=function(t,e,n){this._enqueue({inputs:t,meta:e,callback:n}),this._dispatch()},e.prototype._enqueue=function(t){for(this._queue.push(t);this._queue.length>this._maxQueueLength;)this._queue.shift().callback(null,null)},e.prototype._dispatch=function(){if(0===this._running&&this._queue.length>0){var t=this._queue.shift();this._job=t;var e=t.inputs[0].width,n=t.inputs[0].height,r=t.inputs.map(function(t){return t.data.buffer}),i=this._workers.length;if(this._running=i,1===i)this._workers[0].postMessage({buffers:r,meta:t.meta,imageOps:this._imageOps,width:e,height:n},r);else for(var o=t.inputs[0].data.length,a=4*Math.ceil(o/4/i),s=0;s<i;++s){for(var l=s*a,u=[],c=0,h=r.length;c<h;++c)u.push(r[c].slice(l,l+a));this._workers[s].postMessage({buffers:u,meta:t.meta,imageOps:this._imageOps,width:e,height:n},u)}}},e.prototype._onWorkerMessage=function(t,e){this.disposed||(this._dataLookup[t]=e.data,--this._running,0===this._running&&this._resolveJob())},e.prototype._resolveJob=function(){var t,e,n=this._job,r=this._workers.length;if(1===r)t=new Uint8ClampedArray(this._dataLookup[0].buffer),e=this._dataLookup[0].meta;else{var i=n.inputs[0].data.length;t=new Uint8ClampedArray(i),e=new Array(i);for(var o=4*Math.ceil(i/4/r),a=0;a<r;++a){var s=this._dataLookup[a].buffer,l=a*o;t.set(new Uint8ClampedArray(s),l),e[a]=this._dataLookup[a].meta}}this._job=null,this._dataLookup={},n.callback(null,function(t,e,n){if(b)return new ImageData(t,e,n);var r=w.createImageData(e,n);return r.data.set(t),r}(t,n.inputs[0].width,n.inputs[0].height),e),this._dispatch()},e.prototype.disposeInternal=function(){for(var t=0;t<this._workers.length;++t)this._workers[t].terminate();this._workers.length=0},e}(i.a),S="beforeoperations",C="afteroperations",T={PIXEL:"pixel",IMAGE:"image"},I=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.extent=n.extent,i.resolution=n.viewState.resolution/n.pixelRatio,i.data=r,i}return _(e,t),e}(o.a),j=function(t){function e(e){var n=t.call(this,{projection:null})||this;n.processor_=null,n.operationType_=void 0!==e.operationType?e.operationType:T.PIXEL,n.threads_=void 0!==e.threads?e.threads:1,n.layers_=function(t){for(var e=t.length,n=new Array(e),r=0;r<e;++r)n[r]=P(t[r]);return n}(e.sources);for(var r,i=n.changed.bind(n),o=0,s=n.layers_.length;o<s;++o)n.layers_[o].addEventListener(a.a.CHANGE,i);return n.tileQueue_=new f.a(function(){return 1},n.changed.bind(n)),n.requestedFrameState_,n.renderedImageCanvas_=null,n.renderedRevision_,n.frameState_={animate:!1,coordinateToPixelTransform:Object(m.c)(),declutterTree:null,extent:null,index:0,layerIndex:0,layerStatesArray:(r=n.layers_,r.map(function(t){return t.getLayerState()})),pixelRatio:1,pixelToCoordinateTransform:Object(m.c)(),postRenderFunctions:[],size:[0,0],tileQueue:n.tileQueue_,time:Date.now(),usedTiles:{},viewState:{rotation:0},viewHints:[],wantedTiles:{}},n.setAttributions(function(t){for(var n=[],r=0,i=e.sources.length;r<i;++r){var o=e.sources[r],a=(o instanceof c.a?o:o.getSource()).getAttributions();if("function"===typeof a){var s=a(t);n.push.apply(n,s)}}return 0!==n.length?n:null}),void 0!==e.operation&&n.setOperation(e.operation,e.lib),n}return _(e,t),e.prototype.setOperation=function(t,e){this.processor_&&this.processor_.dispose(),this.processor_=new E({operation:t,imageOps:this.operationType_===T.IMAGE,queue:1,lib:e,threads:this.threads_}),this.changed()},e.prototype.updateFrameState_=function(t,e,n){var r=Object(g.a)({},this.frameState_);r.viewState=Object(g.a)({},r.viewState);var i=Object(v.getCenter)(t);r.extent=t.slice(),r.size[0]=Math.round(Object(v.getWidth)(t)/e),r.size[1]=Math.round(Object(v.getHeight)(t)/e),r.time=1/0;var o=r.viewState;return o.center=i,o.projection=n,o.resolution=e,r},e.prototype.allSourcesReady_=function(){for(var t=!0,e=0,n=this.layers_.length;e<n;++e)if(this.layers_[e].getSource().getState()!==h.a.READY){t=!1;break}return t},e.prototype.getImage=function(t,e,n,r){if(!this.allSourcesReady_())return null;var i=this.updateFrameState_(t,e,r);if(this.requestedFrameState_=i,this.renderedImageCanvas_){var o=this.renderedImageCanvas_.getResolution(),a=this.renderedImageCanvas_.getExtent();e===o&&Object(v.equals)(t,a)||(this.renderedImageCanvas_=null)}return this.renderedImageCanvas_&&this.getRevision()===this.renderedRevision_||this.processSources_(),i.tileQueue.loadMoreTiles(16,16),i.animate&&requestAnimationFrame(this.changed.bind(this)),this.renderedImageCanvas_},e.prototype.processSources_=function(){for(var t=this.requestedFrameState_,e=this.layers_.length,n=new Array(e),r=0;r<e;++r){t.layerIndex=r;var i=R(this.layers_[r],t);if(!i)return;n[r]=i}var o={};this.dispatchEvent(new I(S,t,o)),this.processor_.process(n,o,this.onWorkerComplete_.bind(this,t))},e.prototype.onWorkerComplete_=function(t,e,n,r){if(!e&&n){var i=t.extent,o=t.viewState.resolution;if(o===this.requestedFrameState_.viewState.resolution&&Object(v.equals)(i,this.requestedFrameState_.extent)){var a;if(this.renderedImageCanvas_)a=this.renderedImageCanvas_.getImage().getContext("2d");else{var l=Math.round(Object(v.getWidth)(i)/o),u=Math.round(Object(v.getHeight)(i)/o);a=Object(y.a)(l,u),this.renderedImageCanvas_=new s.a(i,o,1,a.canvas)}a.putImageData(n,0,0),this.changed(),this.renderedRevision_=this.getRevision(),this.dispatchEvent(new I(C,t,r))}}},e.prototype.getImageInternal=function(){return null},e.prototype.disposeInternal=function(){this.processor_&&this.processor_.dispose(),t.prototype.disposeInternal.call(this)},e}(u.a);j.prototype.dispose;var L=null;function R(t,e){var n=t.getRenderer();if(!n)throw new Error("Unsupported layer type: "+t);if(!n.prepareFrame(e))return null;var r=e.size[0],i=e.size[1];if(0===r||0===i)return null;var o,a=n.renderFrame(e,null);if(a&&(o=a.firstElementChild),!(o instanceof HTMLCanvasElement))throw new Error("Unsupported rendered element: "+o);if(o.width===r&&o.height===i)return o.getContext("2d").getImageData(0,0,r,i);if(L){var s=L.canvas;s.width!==r||s.height!==i?L=Object(y.a)(r,i):L.clearRect(0,0,r,i)}else L=Object(y.a)(r,i);return L.drawImage(o,0,0,r,i),L.getImageData(0,0,r,i)}function P(t){var e;return t instanceof c.a?t instanceof d.b?e=new p.a({source:t}):t instanceof u.a&&(e=new l.a({source:t})):e=t,e}e.a=j},function(t,e,n){"use strict";var r,i=n(94),o=n(234),a=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),s=['Map tiles by <a href="https://stamen.com/" target="_blank">Stamen Design</a>, under <a href="https://creativecommons.org/licenses/by/3.0/" target="_blank">CC BY 3.0</a>.',o.a],l={terrain:{extension:"jpg",opaque:!0},"terrain-background":{extension:"jpg",opaque:!0},"terrain-labels":{extension:"png",opaque:!1},"terrain-lines":{extension:"png",opaque:!1},"toner-background":{extension:"png",opaque:!0},toner:{extension:"png",opaque:!0},"toner-hybrid":{extension:"png",opaque:!1},"toner-labels":{extension:"png",opaque:!1},"toner-lines":{extension:"png",opaque:!1},"toner-lite":{extension:"png",opaque:!0},watercolor:{extension:"jpg",opaque:!0}},u={terrain:{minZoom:0,maxZoom:18},toner:{minZoom:0,maxZoom:20},watercolor:{minZoom:0,maxZoom:18}},c=function(t){function e(e){var n=e.layer.indexOf("-"),r=-1==n?e.layer:e.layer.slice(0,n),i=u[r],o=l[e.layer],a=void 0!==e.url?e.url:"https://stamen-tiles-{a-d}.a.ssl.fastly.net/"+e.layer+"/{z}/{x}/{y}."+o.extension;return t.call(this,{attributions:s,cacheSize:e.cacheSize,crossOrigin:"anonymous",imageSmoothing:e.imageSmoothing,maxZoom:void 0!=e.maxZoom?e.maxZoom:i.maxZoom,minZoom:void 0!=e.minZoom?e.minZoom:i.minZoom,opaque:o.opaque,reprojectionErrorThreshold:e.reprojectionErrorThreshold,tileLoadFunction:e.tileLoadFunction,transition:e.transition,url:a,wrapX:e.wrapX,zDirection:e.zDirection})||this}return a(e,t),e}(i.a);e.a=c},function(t,e,n){"use strict";var r,i=n(52),o=n(77),a=n(1),s=n(0),l=n(7),u=n(28),c=n(38),h=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),p=function(t){function e(e){var n=this,r=e||{};return(n=t.call(this,{attributions:r.attributions,cacheSize:r.cacheSize,crossOrigin:r.crossOrigin,imageSmoothing:r.imageSmoothing,projection:r.projection,reprojectionErrorThreshold:r.reprojectionErrorThreshold,tileGrid:r.tileGrid,tileLoadFunction:r.tileLoadFunction,url:r.url,urls:r.urls,wrapX:void 0===r.wrapX||r.wrapX,transition:r.transition,zDirection:r.zDirection})||this).params_=r.params||{},n.hidpi_=void 0===r.hidpi||r.hidpi,n.tmpExtent_=Object(s.createEmpty)(),n.setKey(n.getKeyForParams_()),n}return h(e,t),e.prototype.getKeyForParams_=function(){var t=0,e=[];for(var n in this.params_)e[t++]=n+"-"+this.params_[n];return e.join("/")},e.prototype.getParams=function(){return this.params_},e.prototype.getRequestUrl_=function(t,e,n,r,i,a){var s=this.urls;if(s){var u,h=i.getCode().split(/:(?=\d+$)/).pop();if(a.SIZE=e[0]+","+e[1],a.BBOX=n.join(","),a.BBOXSR=h,a.IMAGESR=h,a.DPI=Math.round(a.DPI?a.DPI*r:90*r),1==s.length)u=s[0];else u=s[Object(l.e)(Object(c.f)(t),s.length)];var p=u.replace(/MapServer\/?$/,"MapServer/export").replace(/ImageServer\/?$/,"ImageServer/exportImage");return Object(o.a)(p,a)}},e.prototype.getTilePixelRatio=function(t){return this.hidpi_?t:1},e.prototype.updateParams=function(t){Object(a.a)(this.params_,t),this.setKey(this.getKeyForParams_())},e.prototype.tileUrlFunction=function(t,e,n){var r=this.getTileGrid();if(r||(r=this.getTileGridForProjection(n)),!(r.getResolutions().length<=t[0])){1==e||this.hidpi_||(e=1);var i=r.getTileCoordExtent(t,this.tmpExtent_),o=Object(u.d)(r.getTileSize(t[0]),this.tmpSize);1!=e&&(o=Object(u.c)(o,e,this.tmpSize));var s={F:"image",FORMAT:"PNG32",TRANSPARENT:!0};return Object(a.a)(s,this.params_),this.getRequestUrl_(t,o,i,e,n,s)}},e}(i.a);e.a=p},function(t,e,n){"use strict";var r,i=n(94),o=n(11),a=n(28),s=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),l=function(t){function e(e){var n=this,r=e||{};return n=t.call(this,{opaque:!1,projection:r.projection,tileGrid:r.tileGrid,wrapX:void 0===r.wrapX||r.wrapX,zDirection:r.zDirection,url:r.template||"z:{z} x:{x} y:{y}",tileLoadFunction:function(t,e){var r=t.getTileCoord()[0],i=Object(a.d)(n.tileGrid.getTileSize(r)),s=Object(o.a)(i[0],i[1]);s.strokeStyle="grey",s.strokeRect(.5,.5,i[0]+.5,i[1]+.5),s.fillStyle="grey",s.strokeStyle="white",s.textAlign="center",s.textBaseline="middle",s.font="24px sans-serif",s.lineWidth=4,s.strokeText(e,i[0]/2,i[1]/2,i[0]),s.fillText(e,i[0]/2,i[1]/2,i[0]),t.setImage(s.canvas)}})||this}return s(e,t),e}(i.a);e.a=l},function(t,e,n){"use strict";var r,i=n(92),o=n(52),a=n(233),s=n(77),l=n(4),u=n(1),c=n(0),h=n(28),p=n(119),f=n(107),d=n(2),g=n(7),y=n(38),m=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),v=function(t){function e(e){var n=this,r=e||{},i=r.params||{},o=!("TRANSPARENT"in i)||i.TRANSPARENT;return(n=t.call(this,{attributions:r.attributions,attributionsCollapsible:r.attributionsCollapsible,cacheSize:r.cacheSize,crossOrigin:r.crossOrigin,imageSmoothing:r.imageSmoothing,opaque:!o,projection:r.projection,reprojectionErrorThreshold:r.reprojectionErrorThreshold,tileClass:r.tileClass,tileGrid:r.tileGrid,tileLoadFunction:r.tileLoadFunction,url:r.url,urls:r.urls,wrapX:void 0===r.wrapX||r.wrapX,transition:r.transition,zDirection:r.zDirection})||this).gutter_=void 0!==r.gutter?r.gutter:0,n.params_=i,n.v13_=!0,n.serverType_=r.serverType,n.hidpi_=void 0===r.hidpi||r.hidpi,n.tmpExtent_=Object(c.createEmpty)(),n.updateV13_(),n.setKey(n.getKeyForParams_()),n}return m(e,t),e.prototype.getFeatureInfoUrl=function(t,e,n,r){var o=Object(d.get)(n),a=this.getProjection(),s=this.getTileGrid();s||(s=this.getTileGridForProjection(o));var l=s.getZForResolution(e,this.zDirection),f=s.getTileCoordForCoordAndZ(t,l);if(!(s.getResolutions().length<=f[0])){var g=s.getResolution(f[0]),y=s.getTileCoordExtent(f,this.tmpExtent_),m=Object(h.d)(s.getTileSize(f[0]),this.tmpSize),v=this.gutter_;0!==v&&(m=Object(h.a)(m,v,this.tmpSize),y=Object(c.buffer)(y,g*v,y)),a&&a!==o&&(g=Object(p.b)(a,o,t,g),y=Object(d.transformExtent)(y,o,a),t=Object(d.transform)(t,o,a));var _={SERVICE:"WMS",VERSION:i.a,REQUEST:"GetFeatureInfo",FORMAT:"image/png",TRANSPARENT:!0,QUERY_LAYERS:this.params_.LAYERS};Object(u.a)(_,this.params_,r);var b=Math.floor((t[0]-y[0])/g),w=Math.floor((y[3]-t[1])/g);return _[this.v13_?"I":"X"]=b,_[this.v13_?"J":"Y"]=w,this.getRequestUrl_(f,m,y,1,a||o,_)}},e.prototype.getLegendUrl=function(t,e){if(void 0!==this.urls[0]){var n={SERVICE:"WMS",VERSION:i.a,REQUEST:"GetLegendGraphic",FORMAT:"image/png"};if(void 0===e||void 0===e.LAYER){var r=this.params_.LAYERS;if(!(!Array.isArray(r)||1===r.length))return;n.LAYER=r}if(void 0!==t){var o=this.getProjection()?this.getProjection().getMetersPerUnit():1;n.SCALE=t*o/28e-5}return Object(u.a)(n,e),Object(s.a)(this.urls[0],n)}},e.prototype.getGutter=function(){return this.gutter_},e.prototype.getParams=function(){return this.params_},e.prototype.getRequestUrl_=function(t,e,n,r,i,o){var u=this.urls;if(u){if(o.WIDTH=e[0],o.HEIGHT=e[1],o[this.v13_?"CRS":"SRS"]=i.getCode(),"STYLES"in this.params_||(o.STYLES=""),1!=r)switch(this.serverType_){case a.a.GEOSERVER:var c=90*r+.5|0;"FORMAT_OPTIONS"in o?o.FORMAT_OPTIONS+=";dpi:"+c:o.FORMAT_OPTIONS="dpi:"+c;break;case a.a.MAPSERVER:o.MAP_RESOLUTION=90*r;break;case a.a.CARMENTA_SERVER:case a.a.QGIS:o.DPI=90*r;break;default:Object(l.a)(!1,52)}var h,p=i.getAxisOrientation(),f=n;if(this.v13_&&"ne"==p.substr(0,2)){var d=void 0;d=n[0],f[0]=n[1],f[1]=d,d=n[2],f[2]=n[3],f[3]=d}if(o.BBOX=f.join(","),1==u.length)h=u[0];else h=u[Object(g.e)(Object(y.f)(t),u.length)];return Object(s.a)(h,o)}},e.prototype.getTilePixelRatio=function(t){return this.hidpi_&&void 0!==this.serverType_?t:1},e.prototype.getKeyForParams_=function(){var t=0,e=[];for(var n in this.params_)e[t++]=n+"-"+this.params_[n];return e.join("/")},e.prototype.updateParams=function(t){Object(u.a)(this.params_,t),this.updateV13_(),this.setKey(this.getKeyForParams_())},e.prototype.updateV13_=function(){var t=this.params_.VERSION||i.a;this.v13_=Object(f.a)(t,"1.3")>=0},e.prototype.tileUrlFunction=function(t,e,n){var r=this.getTileGrid();if(r||(r=this.getTileGridForProjection(n)),!(r.getResolutions().length<=t[0])){1==e||this.hidpi_&&void 0!==this.serverType_||(e=1);var o=r.getResolution(t[0]),a=r.getTileCoordExtent(t,this.tmpExtent_),s=Object(h.d)(r.getTileSize(t[0]),this.tmpSize),l=this.gutter_;0!==l&&(s=Object(h.a)(s,l,this.tmpSize),a=Object(c.buffer)(a,o*l,a)),1!=e&&(s=Object(h.c)(s,e,this.tmpSize));var p={SERVICE:"WMS",VERSION:i.a,REQUEST:"GetMap",FORMAT:"image/png",TRANSPARENT:!0};return Object(u.a)(p,this.params_),this.getRequestUrl_(t,s,a,e,n,p)}},e}(o.a);e.a=v},function(t,e,n){"use strict";var r,i=n(3),o=n(31),a=n(75),s=n(117),l=n(30),u=n(0),c=n(4),h=n(76),p=n(51),f=n(38),d=n(2),g=n(9),y=n(158),m=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),v=function(t){function e(e,n,r,i,o,a){var s=t.call(this,e,n)||this;return s.src_=r,s.extent_=i,s.preemptive_=o,s.grid_=null,s.keys_=null,s.data_=null,s.jsonp_=a,s}return m(e,t),e.prototype.getImage=function(){return null},e.prototype.getData=function(t){if(!this.grid_||!this.keys_)return null;var e=(t[0]-this.extent_[0])/(this.extent_[2]-this.extent_[0]),n=(t[1]-this.extent_[1])/(this.extent_[3]-this.extent_[1]),r=this.grid_[Math.floor((1-n)*this.grid_.length)];if("string"!==typeof r)return null;var i=r.charCodeAt(Math.floor(e*r.length));i>=93&&i--,i>=35&&i--;var o=null;if((i-=32)in this.keys_){var a=this.keys_[i];o=this.data_&&a in this.data_?this.data_[a]:a}return o},e.prototype.forDataAtCoordinate=function(t,e,n){this.state==l.a.EMPTY&&!0===n?(this.state=l.a.IDLE,Object(g.listenOnce)(this,i.a.CHANGE,function(n){e(this.getData(t))},this),this.loadInternal_()):!0===n?setTimeout(function(){e(this.getData(t))}.bind(this),0):e(this.getData(t))},e.prototype.getKey=function(){return this.src_},e.prototype.handleError_=function(){this.state=l.a.ERROR,this.changed()},e.prototype.handleLoad_=function(t){this.grid_=t.grid,this.keys_=t.keys,this.data_=t.data,this.state=l.a.LOADED,this.changed()},e.prototype.loadInternal_=function(){if(this.state==l.a.IDLE)if(this.state=l.a.LOADING,this.jsonp_)Object(y.a)(this.src_,this.handleLoad_.bind(this),this.handleError_.bind(this));else{var t=new XMLHttpRequest;t.addEventListener("load",this.onXHRLoad_.bind(this)),t.addEventListener("error",this.onXHRError_.bind(this)),t.open("GET",this.src_),t.send()}},e.prototype.onXHRLoad_=function(t){var e=t.target;if(!e.status||e.status>=200&&e.status<300){var n=void 0;try{n=JSON.parse(e.responseText)}catch(t){return void this.handleError_()}this.handleLoad_(n)}else this.handleError_()},e.prototype.onXHRError_=function(t){this.handleError_()},e.prototype.load=function(){this.preemptive_?this.loadInternal_():this.setState(l.a.EMPTY)},e}(a.a),_=function(t){function e(e){var n=t.call(this,{projection:Object(d.get)("EPSG:3857"),state:o.a.LOADING,zDirection:e.zDirection})||this;if(n.preemptive_=void 0===e.preemptive||e.preemptive,n.tileUrlFunction_=h.d,n.template_=void 0,n.jsonp_=e.jsonp||!1,e.url)if(n.jsonp_)Object(y.a)(e.url,n.handleTileJSONResponse.bind(n),n.handleTileJSONError.bind(n));else{var r=new XMLHttpRequest;r.addEventListener("load",n.onXHRLoad_.bind(n)),r.addEventListener("error",n.onXHRError_.bind(n)),r.open("GET",e.url),r.send()}else e.tileJSON?n.handleTileJSONResponse(e.tileJSON):Object(c.a)(!1,51);return n}return m(e,t),e.prototype.onXHRLoad_=function(t){var e=t.target;if(!e.status||e.status>=200&&e.status<300){var n=void 0;try{n=JSON.parse(e.responseText)}catch(t){return void this.handleTileJSONError()}this.handleTileJSONResponse(n)}else this.handleTileJSONError()},e.prototype.onXHRError_=function(t){this.handleTileJSONError()},e.prototype.getTemplate=function(){return this.template_},e.prototype.forDataAtCoordinateAndResolution=function(t,e,n,r){if(this.tileGrid){var i=this.tileGrid.getZForResolution(e,this.zDirection),o=this.tileGrid.getTileCoordForCoordAndZ(t,i);this.getTile(o[0],o[1],o[2],1,this.getProjection()).forDataAtCoordinate(t,n,r)}else!0===r?setTimeout(function(){n(null)},0):n(null)},e.prototype.handleTileJSONError=function(){this.setState(o.a.ERROR)},e.prototype.handleTileJSONResponse=function(t){var e,n=Object(d.get)("EPSG:4326"),r=this.getProjection();if(void 0!==t.bounds){var i=Object(d.getTransformFromProjections)(n,r);e=Object(u.applyTransform)(t.bounds,i)}var a=Object(p.extentFromProjection)(r),s=t.minzoom||0,l=t.maxzoom||22,c=Object(p.createXYZ)({extent:a,maxZoom:l,minZoom:s});this.tileGrid=c,this.template_=t.template;var f=t.grids;if(f){if(this.tileUrlFunction_=Object(h.a)(f,c),void 0!==t.attribution){var g=void 0!==e?e:a;this.setAttributions(function(e){return Object(u.intersects)(g,e.extent)?[t.attribution]:null})}this.setState(o.a.READY)}else this.setState(o.a.ERROR)},e.prototype.getTile=function(t,e,n,r,i){var o=Object(f.e)(t,e,n);if(this.tileCache.containsKey(o))return this.tileCache.get(o);var a=[t,e,n],s=this.getTileCoordForTileUrlFunction(a,i),u=this.tileUrlFunction_(s,r,i),c=new v(a,void 0!==u?l.a.IDLE:l.a.EMPTY,void 0!==u?u:"",this.tileGrid.getTileCoordExtent(a),this.preemptive_,this.jsonp_);return this.tileCache.set(o,c),c},e.prototype.useTile=function(t,e,n){var r=Object(f.e)(t,e,n);this.tileCache.containsKey(r)&&this.tileCache.get(r)},e}(s.b);e.a=_},function(t,e,n){"use strict";var r,i=n(52),o=n(333),a=n(77),s=n(1),l=(n(0),n(334),n(76)),u=(n(2),n(5),this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)})),c=function(t){function e(e){var n=this,r=void 0!==e.requestEncoding?e.requestEncoding:o.a.KVP,i=e.tileGrid,a=e.urls;return void 0===a&&void 0!==e.url&&(a=Object(l.c)(e.url)),(n=t.call(this,{attributions:e.attributions,attributionsCollapsible:e.attributionsCollapsible,cacheSize:e.cacheSize,crossOrigin:e.crossOrigin,imageSmoothing:e.imageSmoothing,projection:e.projection,reprojectionErrorThreshold:e.reprojectionErrorThreshold,tileClass:e.tileClass,tileGrid:i,tileLoadFunction:e.tileLoadFunction,tilePixelRatio:e.tilePixelRatio,urls:a,wrapX:void 0!==e.wrapX&&e.wrapX,transition:e.transition,zDirection:e.zDirection})||this).version_=void 0!==e.version?e.version:"1.0.0",n.format_=void 0!==e.format?e.format:"image/jpeg",n.dimensions_=void 0!==e.dimensions?e.dimensions:{},n.layer_=e.layer,n.matrixSet_=e.matrixSet,n.style_=e.style,n.requestEncoding_=r,n.setKey(n.getKeyForDimensions_()),a&&a.length>0&&(n.tileUrlFunction=Object(l.b)(a.map(n.createFromWMTSTemplate.bind(n)))),n}return u(e,t),e.prototype.setUrls=function(t){this.urls=t;var e=t.join("\n");this.setTileUrlFunction(Object(l.b)(t.map(this.createFromWMTSTemplate.bind(this))),e)},e.prototype.getDimensions=function(){return this.dimensions_},e.prototype.getFormat=function(){return this.format_},e.prototype.getLayer=function(){return this.layer_},e.prototype.getMatrixSet=function(){return this.matrixSet_},e.prototype.getRequestEncoding=function(){return this.requestEncoding_},e.prototype.getStyle=function(){return this.style_},e.prototype.getVersion=function(){return this.version_},e.prototype.getKeyForDimensions_=function(){var t=0,e=[];for(var n in this.dimensions_)e[t++]=n+"-"+this.dimensions_[n];return e.join("/")},e.prototype.updateDimensions=function(t){Object(s.a)(this.dimensions_,t),this.setKey(this.getKeyForDimensions_())},e.prototype.createFromWMTSTemplate=function(t){var e=this.requestEncoding_,n={layer:this.layer_,style:this.style_,tilematrixset:this.matrixSet_};e==o.a.KVP&&Object(s.a)(n,{Service:"WMTS",Request:"GetTile",Version:this.version_,Format:this.format_}),t=e==o.a.KVP?Object(a.a)(t,n):t.replace(/\{(\w+?)\}/g,function(t,e){return e.toLowerCase()in n?n[e.toLowerCase()]:t});var r=this.tileGrid,i=this.dimensions_;return function(n,l,u){if(n){var c={TileMatrix:r.getMatrixId(n[0]),TileCol:n[1],TileRow:n[2]};Object(s.a)(c,i);var h=t;return h=e==o.a.KVP?Object(a.a)(h,c):h.replace(/\{(\w+?)\}/g,function(t,e){return c[e]})}}},e}(i.a);e.a=c},function(t,e,n){"use strict";e.a={KVP:"KVP",REST:"REST"}},function(t,e,n){"use strict";e.a=function(t,e,n){var r=[],i=[],s=[],u=[],c=[],h=void 0!==n?n:[],p=t.SupportedCRS,f=Object(a.get)(p),d=f.getMetersPerUnit(),g="ne"==f.getAxisOrientation().substr(0,2);return t.TileMatrix.sort(function(t,e){return e.ScaleDenominator-t.ScaleDenominator}),t.TileMatrix.forEach(function(e){if(!(h.length>0)||Object(o.d)(h,function(n){return e.Identifier==n.TileMatrix||-1===e.Identifier.indexOf(":")&&t.Identifier+":"+e.Identifier===n.TileMatrix})){i.push(e.Identifier);var n=28e-5*e.ScaleDenominator/d,a=e.TileWidth,l=e.TileHeight;g?s.push([e.TopLeftCorner[1],e.TopLeftCorner[0]]):s.push(e.TopLeftCorner),r.push(n),u.push(a==l?a:[a,l]),c.push([e.MatrixWidth,e.MatrixHeight])}}),new l({extent:e,origins:s,resolutions:r,matrixIds:i,tileSizes:u,sizes:c})};var r,i=n(90),o=n(5),a=n(2),s=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),l=function(t){function e(e){var n=t.call(this,{extent:e.extent,origin:e.origin,origins:e.origins,resolutions:e.resolutions,tileSize:e.tileSize,tileSizes:e.tileSizes,sizes:e.sizes})||this;return n.matrixIds_=e.matrixIds,n}return s(e,t),e.prototype.getMatrixId=function(t){return this.matrixIds_[t]},e.prototype.getMatrixIds=function(){return this.matrixIds_},e}(i.a)},function(t,e,n){"use strict";var r,i=n(15),o=n(17),a=n(8),s=n(153),l=n(21),u=n(109),c=n(37),h=n(44),p=n(45),f=n(16),d=n(10),g=n(4),y=n(1),m=n(0),v=n(48),_=n(2),b=n(112),w=n(22),O=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),x={};x[a.a.POINT]=function(t){var e;e=void 0!==t.m&&void 0!==t.z?new f.a([t.x,t.y,t.z,t.m],o.a.XYZM):void 0!==t.z?new f.a([t.x,t.y,t.z],o.a.XYZ):void 0!==t.m?new f.a([t.x,t.y,t.m],o.a.XYM):new f.a([t.x,t.y]);return e},x[a.a.LINE_STRING]=function(t){var e=T(t);return new l.a(t.paths[0],e)},x[a.a.POLYGON]=function(t){var e=T(t);return new d.b(t.rings,e)},x[a.a.MULTI_POINT]=function(t){var e=T(t);return new h.a(t.points,e)},x[a.a.MULTI_LINE_STRING]=function(t){var e=T(t);return new c.a(t.paths,e)},x[a.a.MULTI_POLYGON]=function(t){var e=T(t);return new p.a(t.rings,e)};var E={};E[a.a.POINT]=function(t,e){var n,r=t.getCoordinates(),i=t.getLayout();i===o.a.XYZ?n={x:r[0],y:r[1],z:r[2]}:i===o.a.XYM?n={x:r[0],y:r[1],m:r[2]}:i===o.a.XYZM?n={x:r[0],y:r[1],z:r[2],m:r[3]}:i===o.a.XY?n={x:r[0],y:r[1]}:Object(g.a)(!1,34);return n},E[a.a.LINE_STRING]=function(t,e){var n=I(t);return{hasZ:n.hasZ,hasM:n.hasM,paths:[t.getCoordinates()]}},E[a.a.POLYGON]=function(t,e){var n=I(t);return{hasZ:n.hasZ,hasM:n.hasM,rings:t.getCoordinates(!1)}},E[a.a.MULTI_POINT]=function(t,e){var n=I(t);return{hasZ:n.hasZ,hasM:n.hasM,points:t.getCoordinates()}},E[a.a.MULTI_LINE_STRING]=function(t,e){var n=I(t);return{hasZ:n.hasZ,hasM:n.hasM,paths:t.getCoordinates()}},E[a.a.MULTI_POLYGON]=function(t,e){for(var n=I(t),r=t.getCoordinates(!1),i=[],o=0;o<r.length;o++)for(var a=r[o].length-1;a>=0;a--)i.push(r[o][a]);return{hasZ:n.hasZ,hasM:n.hasM,rings:i}};var S=function(t){function e(e){var n=this,r=e||{};return(n=t.call(this)||this).geometryName_=r.geometryName,n}return O(e,t),e.prototype.readFeatureFromObject=function(t,e,n){var r=t,o=C(r.geometry,e),a=new i.a;if(this.geometryName_&&a.setGeometryName(this.geometryName_),a.setGeometry(o),r.attributes){a.setProperties(r.attributes,!0);var s=r.attributes[n];void 0!==s&&a.setId(s)}return a},e.prototype.readFeaturesFromObject=function(t,e){var n=e||{};if(t.features){for(var r=[],i=t.features,o=0,a=i.length;o<a;++o)r.push(this.readFeatureFromObject(i[o],n,t.objectIdFieldName));return r}return[this.readFeatureFromObject(t,n)]},e.prototype.readGeometryFromObject=function(t,e){return C(t,e)},e.prototype.readProjectionFromObject=function(t){if(t.spatialReference&&void 0!==t.spatialReference.wkid){var e=t.spatialReference.wkid;return Object(_.get)("EPSG:"+e)}return null},e.prototype.writeGeometryObject=function(t,e){return j(t,this.adaptOptions(e))},e.prototype.writeFeatureObject=function(t,e){e=this.adaptOptions(e);var n={};if(!t.hasProperties())return n.attributes={},n;var r=t.getProperties(),i=t.getGeometry();if(i){n.geometry=j(i,e);var o=e&&(e.dataProjection||e.featureProjection);o&&(n.geometry.spatialReference={wkid:Number(Object(_.get)(o).getCode().split(":").pop())}),delete r[t.getGeometryName()]}return Object(y.d)(r)?n.attributes={}:n.attributes=r,n},e.prototype.writeFeaturesObject=function(t,e){e=this.adaptOptions(e);for(var n=[],r=0,i=t.length;r<i;++r)n.push(this.writeFeatureObject(t[r],e));return{features:n}},e}(s.a);function C(t,e){var n,r,i;if(!t)return null;if("number"===typeof t.x&&"number"===typeof t.y)i=a.a.POINT;else if(t.points)i=a.a.MULTI_POINT;else if(t.paths){i=1===t.paths.length?a.a.LINE_STRING:a.a.MULTI_LINE_STRING}else if(t.rings){var o=t,s=T(o),l=function(t,e){var n,r,i=[],o=[],a=[];for(n=0,r=t.length;n<r;++n){i.length=0,Object(v.b)(i,0,t[n],e.length);var s=Object(b.a)(i,0,i.length,e.length);s?o.push([t[n]]):a.push(t[n])}for(;a.length;){var l=a.shift(),c=!1;for(n=o.length-1;n>=0;n--){var h=o[n][0],p=Object(m.containsExtent)(new u.a(h).getExtent(),new u.a(l).getExtent());if(p){o[n].push(l),c=!0;break}}c||o.push([l.reverse()])}return o}(o.rings,s);1===l.length?(i=a.a.POLYGON,t=Object(y.a)({},t,((n={}).rings=l[0],n))):(i=a.a.MULTI_POLYGON,t=Object(y.a)({},t,((r={}).rings=l,r)))}var c=x[i];return Object(w.c)(c(t),!1,e)}function T(t){var e=o.a.XY;return!0===t.hasZ&&!0===t.hasM?e=o.a.XYZM:!0===t.hasZ?e=o.a.XYZ:!0===t.hasM&&(e=o.a.XYM),e}function I(t){var e=t.getLayout();return{hasZ:e===o.a.XYZ||e===o.a.XYZM,hasM:e===o.a.XYM||e===o.a.XYZM}}function j(t,e){return(0,E[t.getType()])(Object(w.c)(t,!0,e),e)}e.a=S},function(t,e,n){"use strict";var r=n(161).a;r.prototype.writeFeatures,r.prototype.writeFeaturesNode,e.a=r},function(t,e,n){"use strict";var r,i=n(15),o=n(17),a=n(8),s=n(21),l=n(37),u=n(16),c=n(95),h=n(27),p=n(2),f=n(5),d=n(53),g=n(22),y=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),m=[null,"http://www.topografix.com/GPX/1/0","http://www.topografix.com/GPX/1/1"],v={rte:X,trk:W,wpt:H},_=Object(h.r)(m,{rte:Object(h.j)(X),trk:Object(h.j)(W),wpt:Object(h.j)(H)}),b=Object(h.r)(m,{text:Object(h.n)(d.h,"linkText"),type:Object(h.n)(d.h,"linkType")}),w=Object(h.r)(m,{rte:Object(h.l)(function(t,e,n){var r=n[0],i=e.getProperties(),o={node:t};o.properties=i;var s=e.getGeometry();if(s.getType()==a.a.LINE_STRING){var l=Object(g.c)(s,!0,r);o.geometryLayout=l.getLayout(),i.rtept=l.getCoordinates()}var u=n[n.length-1].node,c=R[u.namespaceURI],p=Object(h.p)(i,c);Object(h.v)(o,P,h.a,p,n,c)}),trk:Object(h.l)(function(t,e,n){var r=n[0],i=e.getProperties(),o={node:t};o.properties=i;var s=e.getGeometry();if(s.getType()==a.a.MULTI_LINE_STRING){var l=Object(g.c)(s,!0,r);i.trkseg=l.getLineStrings()}var u=n[n.length-1].node,c=M[u.namespaceURI],p=Object(h.p)(i,c);Object(h.v)(o,A,h.a,p,n,c)}),wpt:Object(h.l)(function(t,e,n){var r=n[0],i=n[n.length-1];i.properties=e.getProperties();var o=e.getGeometry();if(o.getType()==a.a.POINT){var s=Object(g.c)(o,!0,r);i.geometryLayout=s.getLayout(),Z(t,s.getCoordinates(),n)}})}),O=function(t){function e(e){var n=t.call(this)||this,r=e||{};return n.dataProjection=Object(p.get)("EPSG:4326"),n.readExtensions_=r.readExtensions,n}return y(e,t),e.prototype.handleReadExtensions_=function(t){t||(t=[]);for(var e=0,n=t.length;e<n;++e){var r=t[e];if(this.readExtensions_){var i=r.get("extensionsNode_")||null;this.readExtensions_(r,i)}r.set("extensionsNode_",void 0)}},e.prototype.readFeatureFromNode=function(t,e){if(!Object(f.f)(m,t.namespaceURI))return null;var n=v[t.localName];if(!n)return null;var r=n(t,[this.getReadOptions(t,e)]);return r?(this.handleReadExtensions_([r]),r):null},e.prototype.readFeaturesFromNode=function(t,e){if(!Object(f.f)(m,t.namespaceURI))return[];if("gpx"==t.localName){var n=Object(h.u)([],_,t,[this.getReadOptions(t,e)]);return n?(this.handleReadExtensions_(n),n):[]}return[]},e.prototype.writeFeaturesNode=function(t,e){e=this.adaptOptions(e);var n=Object(h.c)("http://www.topografix.com/GPX/1/1","gpx");return n.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xsi",h.b),n.setAttributeNS(h.b,"xsi:schemaLocation","http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd"),n.setAttribute("version","1.1"),n.setAttribute("creator","OpenLayers"),Object(h.v)({node:n},w,z,t,[e]),n},e}(c.a),x=Object(h.r)(m,{name:Object(h.n)(d.h),cmt:Object(h.n)(d.h),desc:Object(h.n)(d.h),src:Object(h.n)(d.h),link:Y,number:Object(h.n)(d.f),extensions:q,type:Object(h.n)(d.h),rtept:function(t,e){var n=Object(h.u)({},E,t,e);if(n){var r=e[e.length-1],i=r.flatCoordinates,o=r.layoutOptions;B(i,o,t,n)}}}),E=Object(h.r)(m,{ele:Object(h.n)(d.d),time:Object(h.n)(d.c)}),S=Object(h.r)(m,{name:Object(h.n)(d.h),cmt:Object(h.n)(d.h),desc:Object(h.n)(d.h),src:Object(h.n)(d.h),link:Y,number:Object(h.n)(d.f),type:Object(h.n)(d.h),extensions:q,trkseg:function(t,e){var n=e[e.length-1];Object(h.t)(C,t,e);var r=n.flatCoordinates;n.ends.push(r.length)}}),C=Object(h.r)(m,{trkpt:function(t,e){var n=Object(h.u)({},T,t,e);if(n){var r=e[e.length-1],i=r.flatCoordinates,o=r.layoutOptions;B(i,o,t,n)}}}),T=Object(h.r)(m,{ele:Object(h.n)(d.d),time:Object(h.n)(d.c)}),I=Object(h.r)(m,{ele:Object(h.n)(d.d),time:Object(h.n)(d.c),magvar:Object(h.n)(d.d),geoidheight:Object(h.n)(d.d),name:Object(h.n)(d.h),cmt:Object(h.n)(d.h),desc:Object(h.n)(d.h),src:Object(h.n)(d.h),link:Y,sym:Object(h.n)(d.h),type:Object(h.n)(d.h),fix:Object(h.n)(d.h),sat:Object(h.n)(d.f),hdop:Object(h.n)(d.d),vdop:Object(h.n)(d.d),pdop:Object(h.n)(d.d),ageofdgpsdata:Object(h.n)(d.d),dgpsid:Object(h.n)(d.f),extensions:q}),j=["text","type"],L=Object(h.r)(m,{text:Object(h.l)(d.n),type:Object(h.l)(d.n)}),R=Object(h.r)(m,["name","cmt","desc","src","link","number","type","rtept"]),P=Object(h.r)(m,{name:Object(h.l)(d.n),cmt:Object(h.l)(d.n),desc:Object(h.l)(d.n),src:Object(h.l)(d.n),link:Object(h.l)(K),number:Object(h.l)(d.m),type:Object(h.l)(d.n),rtept:Object(h.k)(Object(h.l)(Z))}),N=Object(h.r)(m,["ele","time"]),M=Object(h.r)(m,["name","cmt","desc","src","link","number","type","trkseg"]),A=Object(h.r)(m,{name:Object(h.l)(d.n),cmt:Object(h.l)(d.n),desc:Object(h.l)(d.n),src:Object(h.l)(d.n),link:Object(h.l)(K),number:Object(h.l)(d.m),type:Object(h.l)(d.n),trkseg:Object(h.k)(Object(h.l)(function(t,e,n){var r={node:t};r.geometryLayout=e.getLayout(),r.properties={},Object(h.v)(r,F,k,e.getCoordinates(),n)}))}),k=Object(h.q)("trkpt"),F=Object(h.r)(m,{trkpt:Object(h.l)(Z)}),D=Object(h.r)(m,["ele","time","magvar","geoidheight","name","cmt","desc","src","link","sym","type","fix","sat","hdop","vdop","pdop","ageofdgpsdata","dgpsid"]),G=Object(h.r)(m,{ele:Object(h.l)(d.l),time:Object(h.l)(d.k),magvar:Object(h.l)(d.l),geoidheight:Object(h.l)(d.l),name:Object(h.l)(d.n),cmt:Object(h.l)(d.n),desc:Object(h.l)(d.n),src:Object(h.l)(d.n),link:Object(h.l)(K),sym:Object(h.l)(d.n),type:Object(h.l)(d.n),fix:Object(h.l)(d.n),sat:Object(h.l)(d.m),hdop:Object(h.l)(d.l),vdop:Object(h.l)(d.l),pdop:Object(h.l)(d.l),ageofdgpsdata:Object(h.l)(d.l),dgpsid:Object(h.l)(d.m)}),U={Point:"wpt",LineString:"rte",MultiLineString:"trk"};function z(t,e,n){var r=t.getGeometry();if(r){var i=U[r.getType()];if(i){var o=e[e.length-1].node;return Object(h.c)(o.namespaceURI,i)}}}function B(t,e,n,r){return t.push(parseFloat(n.getAttribute("lon")),parseFloat(n.getAttribute("lat"))),"ele"in r?(t.push(r.ele),delete r.ele,e.hasZ=!0):t.push(0),"time"in r?(t.push(r.time),delete r.time,e.hasM=!0):t.push(0),t}function V(t,e,n){var r=o.a.XY,i=2;if(t.hasZ&&t.hasM?(r=o.a.XYZM,i=4):t.hasZ?(r=o.a.XYZ,i=3):t.hasM&&(r=o.a.XYM,i=3),4!==i){for(var a=0,s=e.length/4;a<s;a++)e[a*i]=e[4*a],e[a*i+1]=e[4*a+1],t.hasZ&&(e[a*i+2]=e[4*a+2]),t.hasM&&(e[a*i+2]=e[4*a+3]);if(e.length=e.length/4*i,n)for(a=0,s=n.length;a<s;a++)n[a]=n[a]/4*i}return r}function Y(t,e){var n=e[e.length-1],r=t.getAttribute("href");null!==r&&(n.link=r),Object(h.t)(b,t,e)}function q(t,e){e[e.length-1].extensionsNode_=t}function X(t,e){var n=e[0],r=Object(h.u)({flatCoordinates:[],layoutOptions:{}},x,t,e);if(r){var o=r.flatCoordinates;delete r.flatCoordinates;var a=r.layoutOptions;delete r.layoutOptions;var l=V(a,o),u=new s.a(o,l);Object(g.c)(u,!1,n);var c=new i.a(u);return c.setProperties(r,!0),c}}function W(t,e){var n=e[0],r=Object(h.u)({flatCoordinates:[],ends:[],layoutOptions:{}},S,t,e);if(r){var o=r.flatCoordinates;delete r.flatCoordinates;var a=r.ends;delete r.ends;var s=r.layoutOptions;delete r.layoutOptions;var u=V(s,o,a),c=new l.a(o,u,a);Object(g.c)(c,!1,n);var p=new i.a(c);return p.setProperties(r,!0),p}}function H(t,e){var n=e[0],r=Object(h.u)({},I,t,e);if(r){var o={},a=B([],o,t,r),s=V(o,a),l=new u.a(a,s);Object(g.c)(l,!1,n);var c=new i.a(l);return c.setProperties(r,!0),c}}function K(t,e,n){t.setAttribute("href",e);var r=n[n.length-1].properties,i=[r.linkText,r.linkType];Object(h.v)({node:t},L,h.a,i,n,j)}function Z(t,e,n){var r=n[n.length-1],i=r.node.namespaceURI,a=r.properties;switch(t.setAttributeNS(null,"lat",String(e[1])),t.setAttributeNS(null,"lon",String(e[0])),r.geometryLayout){case o.a.XYZM:0!==e[3]&&(a.time=e[3]);case o.a.XYZ:0!==e[2]&&(a.ele=e[2]);break;case o.a.XYM:0!==e[2]&&(a.time=e[2])}var s="rtept"==t.nodeName?N[i]:D[i],l=Object(h.p)(a,s);Object(h.v)({node:t,properties:a},G,h.a,l,n,s)}e.a=O},function(t,e,n){"use strict";var r,i=n(15),o=n(17),a=n(21),s=n(162),l=n(2),u=n(22),c=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),h={BAROMETRIC:"barometric",GPS:"gps",NONE:"none"},p=/^B(\d{2})(\d{2})(\d{2})(\d{2})(\d{5})([NS])(\d{3})(\d{5})([EW])([AV])(\d{5})(\d{5})/,f=/^H.([A-Z]{3}).*?:(.*)/,d=/^HFDTE(\d{2})(\d{2})(\d{2})/,g=/\r\n|\r|\n/,y=function(t){function e(e){var n=t.call(this)||this,r=e||{};return n.dataProjection=Object(l.get)("EPSG:4326"),n.altitudeMode_=r.altitudeMode?r.altitudeMode:h.NONE,n}return c(e,t),e.prototype.readFeatureFromText=function(t,e){var n,r,s=this.altitudeMode_,l=t.split(g),c={},y=[],m=2e3,v=0,_=1,b=-1;for(n=0,r=l.length;n<r;++n){var w=l[n],O=void 0;if("B"==w.charAt(0)){if(O=p.exec(w)){var x=parseInt(O[1],10),E=parseInt(O[2],10),S=parseInt(O[3],10),C=parseInt(O[4],10)+parseInt(O[5],10)/6e4;"S"==O[6]&&(C=-C);var T=parseInt(O[7],10)+parseInt(O[8],10)/6e4;if("W"==O[9]&&(T=-T),y.push(T,C),s!=h.NONE){var I=void 0;I=s==h.GPS?parseInt(O[11],10):s==h.BAROMETRIC?parseInt(O[12],10):0,y.push(I)}var j=Date.UTC(m,v,_,x,E,S);j<b&&(j=Date.UTC(m,v,_+1,x,E,S)),y.push(j/1e3),b=j}}else"H"==w.charAt(0)&&((O=d.exec(w))?(_=parseInt(O[1],10),v=parseInt(O[2],10)-1,m=2e3+parseInt(O[3],10)):(O=f.exec(w))&&(c[O[1]]=O[2].trim()))}if(0===y.length)return null;var L=s==h.NONE?o.a.XYM:o.a.XYZM,R=new a.a(y,L),P=new i.a(Object(u.c)(R,!1,e));return P.setProperties(c,!0),P},e.prototype.readFeaturesFromText=function(t,e){var n=this.readFeatureFromText(t,e);return n?[n]:[]},e}(s.a);e.a=y},function(t,e,n){"use strict";var r=n(15),i=n(62),o=n(118),a=n(17),s=n(8),l=n(131),u=n(132),c=n(171),h=n(21),p=n(37),f=n(44),d=n(45),g=n(16),y=n(10),m=n(70),v=n(35),_=n(82),b=n(95),w=n(27),O=n(61),x=n(4),E=n(5),S=n(2),C=n(53),T=n(7),I=n(22);function j(t){"@babel/helpers - typeof";return(j="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var L,R,P,N,M,A,k,F,D=this&&this.__extends||(L=function(t,e){return(L=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}L(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),G=["http://www.google.com/kml/ext/2.2"],U=[null,"http://earth.google.com/kml/2.0","http://earth.google.com/kml/2.1","http://earth.google.com/kml/2.2","http://www.opengis.net/kml/2.2"],z={fraction:u.a.FRACTION,pixels:u.a.PIXELS,insetPixels:u.a.PIXELS},B=Object(w.r)(U,{ExtendedData:Ft,Region:Dt,MultiGeometry:Object(w.n)(It,"geometry"),LineString:Object(w.n)(St,"geometry"),LinearRing:Object(w.n)(Ct,"geometry"),Point:Object(w.n)(jt,"geometry"),Polygon:Object(w.n)(Rt,"geometry"),Style:Object(w.n)(Nt),StyleMap:function(t,e){var n=ht.call(this,t,e);if(!n)return;var r=e[e.length-1];Array.isArray(n)?r.Style=n:"string"===typeof n?r.styleUrl=n:Object(x.a)(!1,38)},address:Object(w.n)(C.h),description:Object(w.n)(C.h),name:Object(w.n)(C.h),open:Object(w.n)(C.a),phoneNumber:Object(w.n)(C.h),styleUrl:Object(w.n)(lt),visibility:Object(w.n)(C.a)},Object(w.r)(G,{MultiTrack:Object(w.n)(function(t,e){var n=Object(w.u)([],vt,t,e);if(!n)return;return new p.a(n)},"geometry"),Track:Object(w.n)(bt,"geometry")})),V=Object(w.r)(U,{ExtendedData:Ft,Region:Dt,Link:function(t,e){Object(w.t)(Y,t,e)},address:Object(w.n)(C.h),description:Object(w.n)(C.h),name:Object(w.n)(C.h),open:Object(w.n)(C.a),phoneNumber:Object(w.n)(C.h),visibility:Object(w.n)(C.a)}),Y=Object(w.r)(U,{href:Object(w.n)(st)}),q=Object(w.r)(U,{LatLonAltBox:function(t,e){var n=Object(w.u)({},zt,t,e);if(!n)return;var r=e[e.length-1],i=[parseFloat(n.west),parseFloat(n.south),parseFloat(n.east),parseFloat(n.north)];r.extent=i,r.altitudeMode=n.altitudeMode,r.minAltitude=parseFloat(n.minAltitude),r.maxAltitude=parseFloat(n.maxAltitude)},Lod:function(t,e){var n=Object(w.u)({},Bt,t,e);if(!n)return;var r=e[e.length-1];r.minLodPixels=parseFloat(n.minLodPixels),r.maxLodPixels=parseFloat(n.maxLodPixels),r.minFadeExtent=parseFloat(n.minFadeExtent),r.maxFadeExtent=parseFloat(n.maxFadeExtent)}}),X=Object(w.r)(U,["Document","Placemark"]),W=Object(w.r)(U,{Document:Object(w.l)(function(t,e,n){var r={node:t};Object(w.v)(r,Wt,Ht,e,n,void 0,this)}),Placemark:Object(w.l)(ve)}),H=null;var K,Z=null;var J,$=null;var Q=null;var tt=null;var et,nt=null;function rt(t){return t}var it=function(t){function e(e){var n=t.call(this)||this,r=e||{};return nt||(R=[255,255,255,1],H=new i.a({color:R}),P=[20,2],N=u.a.PIXELS,M=u.a.PIXELS,A=[64,64],k="https://maps.google.com/mapfiles/kml/pushpin/ylw-pushpin.png",F=.5,Z=new l.a({anchor:P,anchorOrigin:c.a.BOTTOM_LEFT,anchorXUnits:N,anchorYUnits:M,crossOrigin:"anonymous",rotation:0,scale:F,size:A,src:k}),K="NO_IMAGE",$=new m.a({color:R,width:1}),J=new m.a({color:[51,51,51,1],width:2}),Q=new _.a({font:"bold 16px Helvetica",fill:H,stroke:J,scale:.8}),tt=new v.c({fill:H,image:Z,text:Q,stroke:$,zIndex:0}),nt=[tt]),n.dataProjection=Object(S.get)("EPSG:4326"),n.defaultStyle_=r.defaultStyle?r.defaultStyle:nt,n.extractStyles_=void 0===r.extractStyles||r.extractStyles,n.writeStyles_=void 0===r.writeStyles||r.writeStyles,n.sharedStyles_={},n.showPointNames_=void 0===r.showPointNames||r.showPointNames,n.crossOrigin_=void 0!==r.crossOrigin?r.crossOrigin:"anonymous",n.iconUrlFunction_=r.iconUrlFunction?r.iconUrlFunction:rt,n}return D(e,t),e.prototype.readDocumentOrFolder_=function(t,e){var n=Object(w.r)(U,{Document:Object(w.i)(this.readDocumentOrFolder_,this),Folder:Object(w.i)(this.readDocumentOrFolder_,this),Placemark:Object(w.j)(this.readPlacemark_,this),Style:this.readSharedStyle_.bind(this),StyleMap:this.readSharedStyleMap_.bind(this)}),r=Object(w.u)([],n,t,e,this);return r||void 0},e.prototype.readPlacemark_=function(t,e){var n=Object(w.u)({geometry:null},B,t,e,this);if(n){var i=new r.a,a=t.getAttribute("id");null!==a&&i.setId(a);var l=e[0],u=n.geometry;if(u&&Object(I.c)(u,!1,l),i.setGeometry(u),delete n.geometry,this.extractStyles_){var c=function(t,e,n,r,i){return function(a,l){var u=i,c="",h=[];if(u){var p=a.getGeometry();if(p){var f=p.getType();f===s.a.GEOMETRY_COLLECTION?(h=p.getGeometriesArrayRecursive().filter(function(t){var e=t.getType();return e===s.a.POINT||e===s.a.MULTI_POINT}),u=h.length>0):u=f===s.a.POINT||f===s.a.MULTI_POINT}}u&&(c=a.get("name"),(u=u&&!!c)&&c.search(/&[^&]+;/)>-1&&(et||(et=document.createElement("textarea")),et.innerHTML=c,c=et.value));var d=n;if(t?d=t:e&&(d=function t(e,n,r){return Array.isArray(e)?e:"string"===typeof e?t(r[e],n,r):n}(e,n,r)),u){var g=function(t,e){var n=[0,0],r="start",i=t.getImage();if(i){var o=i.getImageSize();if(null===o&&(o=A),2==o.length){var a=i.getScaleArray();n[0]=a[0]*o[0]/2,n[1]=-a[1]*o[1]/2,r="left"}}var s=t.getText();s?((s=s.clone()).setFont(s.getFont()||Q.getFont()),s.setScale(s.getScale()||Q.getScale()),s.setFill(s.getFill()||Q.getFill()),s.setStroke(s.getStroke()||J)):s=Q.clone();return s.setText(e),s.setOffsetX(n[0]),s.setOffsetY(n[1]),s.setTextAlign(r),new v.c({image:i,text:s})}(d[0],c);if(h.length>0){g.setGeometry(new o.a(h));var y=new v.c({geometry:d[0].getGeometry(),image:null,fill:d[0].getFill(),stroke:d[0].getStroke(),text:null});return[g,y].concat(d.slice(1))}return g}return d}}(n.Style,n.styleUrl,this.defaultStyle_,this.sharedStyles_,this.showPointNames_);i.setStyle(c)}return delete n.Style,i.setProperties(n,!0),i}},e.prototype.readSharedStyle_=function(t,e){var n=t.getAttribute("id");if(null!==n){var r=Nt.call(this,t,e);if(r){var i=void 0,o=t.baseURI;if(o&&"about:blank"!=o||(o=window.location.href),o)i=new URL("#"+n,o).href;else i="#"+n;this.sharedStyles_[i]=r}}},e.prototype.readSharedStyleMap_=function(t,e){var n=t.getAttribute("id");if(null!==n){var r=ht.call(this,t,e);if(r){var i,o=t.baseURI;if(o&&"about:blank"!=o||(o=window.location.href),o)i=new URL("#"+n,o).href;else i="#"+n;this.sharedStyles_[i]=r}}},e.prototype.readFeatureFromNode=function(t,e){if(!Object(E.f)(U,t.namespaceURI))return null;var n=this.readPlacemark_(t,[this.getReadOptions(t,e)]);return n||null},e.prototype.readFeaturesFromNode=function(t,e){if(!Object(E.f)(U,t.namespaceURI))return[];var n,r=t.localName;if("Document"==r||"Folder"==r)return(n=this.readDocumentOrFolder_(t,[this.getReadOptions(t,e)]))||[];if("Placemark"==r){var i=this.readPlacemark_(t,[this.getReadOptions(t,e)]);return i?[i]:[]}if("kml"==r){n=[];for(var o=t.firstElementChild;o;o=o.nextElementSibling){var a=this.readFeaturesFromNode(o,e);a&&Object(E.c)(n,a)}return n}return[]},e.prototype.readName=function(t){if(t){if("string"===typeof t){var e=Object(w.s)(t);return this.readNameFromDocument(e)}return Object(w.h)(t)?this.readNameFromDocument(t):this.readNameFromNode(t)}},e.prototype.readNameFromDocument=function(t){for(var e=t.firstChild;e;e=e.nextSibling)if(e.nodeType==Node.ELEMENT_NODE){var n=this.readNameFromNode(e);if(n)return n}},e.prototype.readNameFromNode=function(t){for(var e=t.firstElementChild;e;e=e.nextElementSibling)if(Object(E.f)(U,e.namespaceURI)&&"name"==e.localName)return Object(C.h)(e);for(e=t.firstElementChild;e;e=e.nextElementSibling){var n=e.localName;if(Object(E.f)(U,e.namespaceURI)&&("Document"==n||"Folder"==n||"Placemark"==n||"kml"==n)){var r=this.readNameFromNode(e);if(r)return r}}},e.prototype.readNetworkLinks=function(t){var e=[];if("string"===typeof t){var n=Object(w.s)(t);Object(E.c)(e,this.readNetworkLinksFromDocument(n))}else Object(w.h)(t)?Object(E.c)(e,this.readNetworkLinksFromDocument(t)):Object(E.c)(e,this.readNetworkLinksFromNode(t));return e},e.prototype.readNetworkLinksFromDocument=function(t){for(var e=[],n=t.firstChild;n;n=n.nextSibling)n.nodeType==Node.ELEMENT_NODE&&Object(E.c)(e,this.readNetworkLinksFromNode(n));return e},e.prototype.readNetworkLinksFromNode=function(t){for(var e=[],n=t.firstElementChild;n;n=n.nextElementSibling)if(Object(E.f)(U,n.namespaceURI)&&"NetworkLink"==n.localName){var r=Object(w.u)({},V,n,[]);e.push(r)}for(n=t.firstElementChild;n;n=n.nextElementSibling){var i=n.localName;!Object(E.f)(U,n.namespaceURI)||"Document"!=i&&"Folder"!=i&&"kml"!=i||Object(E.c)(e,this.readNetworkLinksFromNode(n))}return e},e.prototype.readRegion=function(t){var e=[];if("string"===typeof t){var n=Object(w.s)(t);Object(E.c)(e,this.readRegionFromDocument(n))}else Object(w.h)(t)?Object(E.c)(e,this.readRegionFromDocument(t)):Object(E.c)(e,this.readRegionFromNode(t));return e},e.prototype.readRegionFromDocument=function(t){for(var e=[],n=t.firstChild;n;n=n.nextSibling)n.nodeType==Node.ELEMENT_NODE&&Object(E.c)(e,this.readRegionFromNode(n));return e},e.prototype.readRegionFromNode=function(t){for(var e=[],n=t.firstElementChild;n;n=n.nextElementSibling)if(Object(E.f)(U,n.namespaceURI)&&"Region"==n.localName){var r=Object(w.u)({},q,n,[]);e.push(r)}for(n=t.firstElementChild;n;n=n.nextElementSibling){var i=n.localName;!Object(E.f)(U,n.namespaceURI)||"Document"!=i&&"Folder"!=i&&"kml"!=i||Object(E.c)(e,this.readRegionFromNode(n))}return e},e.prototype.writeFeaturesNode=function(t,e){e=this.adaptOptions(e);var n=Object(w.c)(U[4],"kml"),r="http://www.w3.org/2000/xmlns/";n.setAttributeNS(r,"xmlns:gx",G[0]),n.setAttributeNS(r,"xmlns:xsi",w.b),n.setAttributeNS(w.b,"xsi:schemaLocation","http://www.opengis.net/kml/2.2 https://developers.google.com/kml/schema/kml22gx.xsd");var i={node:n},o={};t.length>1?o.Document=t:1==t.length&&(o.Placemark=t[0]);var a=X[n.namespaceURI],s=Object(w.p)(o,a);return Object(w.v)(i,W,w.a,s,[e],a,this),n},e}(b.a);function ot(t){var e=Object(w.d)(t,!1),n=/^\s*#?\s*([0-9A-Fa-f]{8})\s*$/.exec(e);if(n){var r=n[1];return[parseInt(r.substr(6,2),16),parseInt(r.substr(4,2),16),parseInt(r.substr(2,2),16),parseInt(r.substr(0,2),16)/255]}}function at(t){var e=Object(w.d)(t,!1),n=[];e=e.replace(/\s*,\s*/g,",");for(var r,i=/^\s*([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?),([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?)(?:\s+|,|$)(?:([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?)(?:\s+|$))?\s*/i;r=i.exec(e);){var o=parseFloat(r[1]),a=parseFloat(r[2]),s=r[3]?parseFloat(r[3]):0;n.push(o,a,s),e=e.substr(r[0].length)}if(""===e)return n}function st(t){var e=Object(w.d)(t,!1).trim(),n=t.baseURI;return n&&"about:blank"!=n||(n=window.location.href),n?new URL(e,n).href:e}function lt(t){var e=Object(w.d)(t,!1).trim().replace(/^(?!.*#)/,"#"),n=t.baseURI;return n&&"about:blank"!=n||(n=window.location.href),n?new URL(e,n).href:e}function ut(t){return Object(C.d)(t)}var ct=Object(w.r)(U,{Pair:function(t,e){var n=Object(w.u)({},Gt,t,e,this);if(!n)return;var r=n.key;if(r&&"normal"==r){var i=n.styleUrl;i&&(e[e.length-1]=i);var o=n.Style;o&&(e[e.length-1]=o)}}});function ht(t,e){return Object(w.u)(void 0,ct,t,e,this)}var pt=Object(w.r)(U,{Icon:Object(w.n)(function(t,e){var n=Object(w.u)({},wt,t,e);return n||null}),color:Object(w.n)(ot),heading:Object(w.n)(C.d),hotSpot:Object(w.n)(function(t){var e,n=t.getAttribute("xunits"),r=t.getAttribute("yunits");return e="insetPixels"!==n?"insetPixels"!==r?c.a.BOTTOM_LEFT:c.a.TOP_LEFT:"insetPixels"!==r?c.a.BOTTOM_RIGHT:c.a.TOP_RIGHT,{x:parseFloat(t.getAttribute("x")),xunits:z[n],y:parseFloat(t.getAttribute("y")),yunits:z[r],origin:e}}),scale:Object(w.n)(ut)});var ft=Object(w.r)(U,{color:Object(w.n)(ot),scale:Object(w.n)(ut)});var dt=Object(w.r)(U,{color:Object(w.n)(ot),width:Object(w.n)(C.d)});var gt=Object(w.r)(U,{color:Object(w.n)(ot),fill:Object(w.n)(C.a),outline:Object(w.n)(C.a)});var yt=Object(w.r)(U,{coordinates:Object(w.o)(at)});function mt(t,e){return Object(w.u)(null,yt,t,e)}var vt=Object(w.r)(G,{Track:Object(w.j)(bt)});var _t=Object(w.r)(U,{when:function(t,e){var n=e[e.length-1].whens,r=Object(w.d)(t,!1),i=Date.parse(r);n.push(isNaN(i)?0:i)}},Object(w.r)(G,{coord:function(t,e){var n=e[e.length-1].coordinates,r=Object(w.d)(t,!1),i=/^\s*([+\-]?\d+(?:\.\d*)?(?:e[+\-]?\d*)?)\s+([+\-]?\d+(?:\.\d*)?(?:e[+\-]?\d*)?)\s+([+\-]?\d+(?:\.\d*)?(?:e[+\-]?\d*)?)\s*$/i.exec(r);if(i){var o=parseFloat(i[1]),a=parseFloat(i[2]),s=parseFloat(i[3]);n.push([o,a,s])}else n.push([])}}));function bt(t,e){var n=Object(w.u)({coordinates:[],whens:[]},_t,t,e);if(n){for(var r=[],i=n.coordinates,o=n.whens,s=0,l=Math.min(i.length,o.length);s<l;++s)3==i[s].length&&r.push(i[s][0],i[s][1],i[s][2],o[s]);return new h.a(r,a.a.XYZM)}}var wt=Object(w.r)(U,{href:Object(w.n)(st)},Object(w.r)(G,{x:Object(w.n)(C.d),y:Object(w.n)(C.d),w:Object(w.n)(C.d),h:Object(w.n)(C.d)}));var Ot=Object(w.r)(U,{coordinates:Object(w.o)(at)});function xt(t,e){return Object(w.u)(null,Ot,t,e)}var Et=Object(w.r)(U,{extrude:Object(w.n)(C.a),tessellate:Object(w.n)(C.a),altitudeMode:Object(w.n)(C.h)});function St(t,e){var n=Object(w.u)({},Et,t,e),r=xt(t,e);if(r){var i=new h.a(r,a.a.XYZ);return i.setProperties(n,!0),i}}function Ct(t,e){var n=Object(w.u)({},Et,t,e),r=xt(t,e);if(r){var i=new y.b(r,a.a.XYZ,[r.length]);return i.setProperties(n,!0),i}}var Tt=Object(w.r)(U,{LineString:Object(w.j)(St),LinearRing:Object(w.j)(Ct),MultiGeometry:Object(w.j)(It),Point:Object(w.j)(jt),Polygon:Object(w.j)(Rt)});function It(t,e){var n,r=Object(w.u)([],Tt,t,e);if(!r)return null;if(0===r.length)return new o.a(r);for(var i,a=!0,l=r[0].getType(),u=1,c=r.length;u<c;++u)if((i=r[u]).getType()!=l){a=!1;break}if(a){var h=void 0,g=void 0;if(l==s.a.POINT){var y=r[0];h=y.getLayout(),g=y.getFlatCoordinates();for(u=1,c=r.length;u<c;++u)i=r[u],Object(E.c)(g,i.getFlatCoordinates());Mt(n=new f.a(g,h),r)}else l==s.a.LINE_STRING?Mt(n=new p.a(r),r):l==s.a.POLYGON?Mt(n=new d.a(r),r):l==s.a.GEOMETRY_COLLECTION?n=new o.a(r):Object(x.a)(!1,37)}else n=new o.a(r);return n}function jt(t,e){var n=Object(w.u)({},Et,t,e),r=xt(t,e);if(r){var i=new g.a(r,a.a.XYZ);return i.setProperties(n,!0),i}}var Lt=Object(w.r)(U,{innerBoundaryIs:function(t,e){var n=Object(w.u)([],Vt,t,e);if(n.length>0){var r=e[e.length-1];r.push.apply(r,n)}},outerBoundaryIs:function(t,e){var n=Object(w.u)(void 0,Yt,t,e);if(n){var r=e[e.length-1];r[0]=n}}});function Rt(t,e){var n=Object(w.u)({},Et,t,e),r=Object(w.u)([null],Lt,t,e);if(r&&r[0]){for(var i=r[0],o=[i.length],s=1,l=r.length;s<l;++s)Object(E.c)(i,r[s]),o.push(i.length);var u=new y.b(i,a.a.XYZ,o);return u.setProperties(n,!0),u}}var Pt=Object(w.r)(U,{IconStyle:function(t,e){var n=Object(w.u)({},pt,t,e);if(n){var r,i,o,a,s=e[e.length-1],h="Icon"in n?n.Icon:{},p=!("Icon"in n)||Object.keys(h).length>0,f=h.href;f?r=f:p&&(r=k);var d,g=c.a.BOTTOM_LEFT,y=n.hotSpot;y?(i=[y.x,y.y],o=y.xunits,a=y.yunits,g=y.origin):r===k?(i=P,o=N,a=M):/^http:\/\/maps\.(?:google|gstatic)\.com\//.test(r)&&(i=[.5,0],o=u.a.FRACTION,a=u.a.FRACTION);var m,v=h.x,_=h.y;void 0!==v&&void 0!==_&&(d=[v,_]);var b,O=h.w,x=h.h;void 0!==O&&void 0!==x&&(m=[O,x]);var E=n.heading;void 0!==E&&(b=Object(T.j)(E));var S=n.scale,C=n.color;if(p){r==k&&(m=A,void 0===S&&(S=F));var I=new l.a({anchor:i,anchorOrigin:g,anchorXUnits:o,anchorYUnits:a,crossOrigin:this.crossOrigin_,offset:d,offsetOrigin:c.a.BOTTOM_LEFT,rotation:b,scale:S,size:m,src:this.iconUrlFunction_(r),color:C});s.imageStyle=I}else s.imageStyle=K}},LabelStyle:function(t,e){var n=Object(w.u)({},ft,t,e);if(n){var r=e[e.length-1],o=new _.a({fill:new i.a({color:"color"in n?n.color:R}),scale:n.scale});r.textStyle=o}},LineStyle:function(t,e){var n=Object(w.u)({},dt,t,e);if(n){var r=e[e.length-1],i=new m.a({color:"color"in n?n.color:R,width:"width"in n?n.width:1});r.strokeStyle=i}},PolyStyle:function(t,e){var n=Object(w.u)({},gt,t,e);if(n){var r=e[e.length-1],o=new i.a({color:"color"in n?n.color:R});r.fillStyle=o;var a=n.fill;void 0!==a&&(r.fill=a);var s=n.outline;void 0!==s&&(r.outline=s)}}});function Nt(t,e){var n=Object(w.u)({},Pt,t,e,this);if(!n)return null;var r,i="fillStyle"in n?n.fillStyle:H,a=n.fill;void 0===a||a||(i=null),"imageStyle"in n?n.imageStyle!=K&&(r=n.imageStyle):r=Z;var l="textStyle"in n?n.textStyle:Q,u="strokeStyle"in n?n.strokeStyle:$,c=n.outline;return void 0===c||c?[new v.c({fill:i,image:r,stroke:u,text:l,zIndex:void 0})]:[new v.c({geometry:function(t){var e=t.getGeometry(),n=e.getType();return n===s.a.GEOMETRY_COLLECTION?new o.a(e.getGeometriesArrayRecursive().filter(function(t){var e=t.getType();return e!==s.a.POLYGON&&e!==s.a.MULTI_POLYGON})):n!==s.a.POLYGON&&n!==s.a.MULTI_POLYGON?e:void 0},fill:i,image:r,stroke:u,text:l,zIndex:void 0}),new v.c({geometry:function(t){var e=t.getGeometry(),n=e.getType();return n===s.a.GEOMETRY_COLLECTION?new o.a(e.getGeometriesArrayRecursive().filter(function(t){var e=t.getType();return e===s.a.POLYGON||e===s.a.MULTI_POLYGON})):n===s.a.POLYGON||n===s.a.MULTI_POLYGON?e:void 0},fill:i,stroke:null,zIndex:void 0})]}function Mt(t,e){var n,r,i,o=e.length,a=new Array(e.length),s=new Array(e.length),l=new Array(e.length);n=!1,r=!1,i=!1;for(var u=0;u<o;++u){var c=e[u];a[u]=c.get("extrude"),s[u]=c.get("tessellate"),l[u]=c.get("altitudeMode"),n=n||void 0!==a[u],r=r||void 0!==s[u],i=i||l[u]}n&&t.set("extrude",a),r&&t.set("tessellate",s),i&&t.set("altitudeMode",l)}var At=Object(w.r)(U,{displayName:Object(w.n)(C.h),value:Object(w.n)(C.h)});var kt=Object(w.r)(U,{Data:function(t,e){var n=t.getAttribute("name");Object(w.t)(At,t,e);var r=e[e.length-1];n&&r.displayName?r[n]={value:r.value,displayName:r.displayName,toString:function(){return r.value}}:null!==n?r[n]=r.value:null!==r.displayName&&(r[r.displayName]=r.value),delete r.value},SchemaData:function(t,e){Object(w.t)(Ut,t,e)}});function Ft(t,e){Object(w.t)(kt,t,e)}function Dt(t,e){Object(w.t)(q,t,e)}var Gt=Object(w.r)(U,{Style:Object(w.n)(Nt),key:Object(w.n)(C.h),styleUrl:Object(w.n)(lt)});var Ut=Object(w.r)(U,{SimpleData:function(t,e){var n=t.getAttribute("name");if(null!==n){var r=Object(C.h)(t),i=e[e.length-1];i[n]=r}}});var zt=Object(w.r)(U,{altitudeMode:Object(w.n)(C.h),minAltitude:Object(w.n)(C.d),maxAltitude:Object(w.n)(C.d),north:Object(w.n)(C.d),south:Object(w.n)(C.d),east:Object(w.n)(C.d),west:Object(w.n)(C.d)});var Bt=Object(w.r)(U,{minLodPixels:Object(w.n)(C.d),maxLodPixels:Object(w.n)(C.d),minFadeExtent:Object(w.n)(C.d),maxFadeExtent:Object(w.n)(C.d)});var Vt=Object(w.r)(U,{LinearRing:Object(w.j)(mt)});var Yt=Object(w.r)(U,{LinearRing:Object(w.o)(mt)});function qt(t,e){for(var n=Object(O.a)(e),r=[255*(4==n.length?n[3]:1),n[2],n[1],n[0]],i=0;i<4;++i){var o=Math.floor(r[i]).toString(16);r[i]=1==o.length?"0"+o:o}Object(C.n)(t,r.join(""))}var Xt=Object(w.r)(U,{Data:Object(w.l)(function(t,e,n){t.setAttribute("name",e.name);var r={node:t},i=e.value;"object"==j(i)?(null!==i&&i.displayName&&Object(w.v)(r,Xt,w.a,[i.displayName],n,["displayName"]),null!==i&&i.value&&Object(w.v)(r,Xt,w.a,[i.value],n,["value"])):Object(w.v)(r,Xt,w.a,[i],n,["value"])}),value:Object(w.l)(function(t,e){Object(C.n)(t,e)}),displayName:Object(w.l)(function(t,e){Object(C.j)(t,e)})});var Wt=Object(w.r)(U,{Placemark:Object(w.l)(ve)}),Ht=function(t,e,n){var r=e[e.length-1].node;return Object(w.c)(r.namespaceURI,"Placemark")};var Kt=Object(w.q)("Data");var Zt=Object(w.r)(U,["href"],Object(w.r)(G,["x","y","w","h"])),Jt=Object(w.r)(U,{href:Object(w.l)(C.n)},Object(w.r)(G,{x:Object(w.l)(C.l),y:Object(w.l)(C.l),w:Object(w.l)(C.l),h:Object(w.l)(C.l)})),$t=function(t,e,n){return Object(w.c)(G[0],"gx:"+n)};var Qt=Object(w.r)(U,["scale","heading","Icon","color","hotSpot"]),te=Object(w.r)(U,{Icon:Object(w.l)(function(t,e,n){var r={node:t},i=n[n.length-1].node,o=Zt[i.namespaceURI],a=Object(w.p)(e,o);Object(w.v)(r,Jt,w.a,a,n,o),o=Zt[G[0]],a=Object(w.p)(e,o),Object(w.v)(r,Jt,$t,a,n,o)}),color:Object(w.l)(qt),heading:Object(w.l)(C.l),hotSpot:Object(w.l)(function(t,e){t.setAttribute("x",String(e.x)),t.setAttribute("y",String(e.y)),t.setAttribute("xunits",e.xunits),t.setAttribute("yunits",e.yunits)}),scale:Object(w.l)(Ie)});var ee=Object(w.r)(U,["color","scale"]),ne=Object(w.r)(U,{color:Object(w.l)(qt),scale:Object(w.l)(Ie)});var re=Object(w.r)(U,["color","width"]),ie=Object(w.r)(U,{color:Object(w.l)(qt),width:Object(w.l)(C.l)});var oe={Point:"Point",LineString:"LineString",LinearRing:"LinearRing",Polygon:"Polygon",MultiPoint:"MultiGeometry",MultiLineString:"MultiGeometry",MultiPolygon:"MultiGeometry",GeometryCollection:"MultiGeometry"},ae=function(t,e,n){if(t){var r=e[e.length-1].node;return Object(w.c)(r.namespaceURI,oe[t.getType()])}},se=Object(w.q)("Point"),le=Object(w.q)("LineString"),ue=Object(w.q)("LinearRing"),ce=Object(w.q)("Polygon"),he=Object(w.r)(U,{LineString:Object(w.l)(we),Point:Object(w.l)(we),Polygon:Object(w.l)(Ce),GeometryCollection:Object(w.l)(pe)});function pe(t,e,n){var r,i={node:t},o=e.getType(),a=[];o===s.a.GEOMETRY_COLLECTION?(e.getGeometriesArrayRecursive().forEach(function(t){var e=t.getType();e===s.a.MULTI_POINT?a=a.concat(t.getPoints()):e===s.a.MULTI_LINE_STRING?a=a.concat(t.getLineStrings()):e===s.a.MULTI_POLYGON?a=a.concat(t.getPolygons()):e===s.a.POINT||e===s.a.LINE_STRING||e===s.a.POLYGON?a.push(t):Object(x.a)(!1,39)}),r=ae):o===s.a.MULTI_POINT?(a=e.getPoints(),r=se):o===s.a.MULTI_LINE_STRING?(a=e.getLineStrings(),r=le):o===s.a.MULTI_POLYGON?(a=e.getPolygons(),r=ce):Object(x.a)(!1,39),Object(w.v)(i,he,r,a,n)}var fe=Object(w.r)(U,{LinearRing:Object(w.l)(we)});function de(t,e,n){var r={node:t};Object(w.v)(r,fe,ue,[e],n)}var ge=Object(w.r)(U,{ExtendedData:Object(w.l)(function(t,e,n){for(var r={node:t},i=e.names,o=e.values,a=i.length,s=0;s<a;s++)Object(w.v)(r,Xt,Kt,[{name:i[s],value:o[s]}],n)}),MultiGeometry:Object(w.l)(pe),LineString:Object(w.l)(we),LinearRing:Object(w.l)(we),Point:Object(w.l)(we),Polygon:Object(w.l)(Ce),Style:Object(w.l)(function(t,e,n){var r={node:t},i={};if(e.pointStyles.length){var o=e.pointStyles[0].getText();o&&(i.LabelStyle=o);var a=e.pointStyles[0].getImage();a&&"function"===typeof a.getSrc&&(i.IconStyle=a)}if(e.lineStyles.length){var s=e.lineStyles[0].getStroke();s&&(i.LineStyle=s)}if(e.polyStyles.length){var s=e.polyStyles[0].getStroke();s&&!i.LineStyle&&(i.LineStyle=s),i.PolyStyle=e.polyStyles[0]}var l=n[n.length-1].node,u=je[l.namespaceURI],c=Object(w.p)(i,u);Object(w.v)(r,Le,w.a,c,n,u)}),address:Object(w.l)(C.n),description:Object(w.l)(C.n),name:Object(w.l)(C.n),open:Object(w.l)(C.i),phoneNumber:Object(w.l)(C.n),styleUrl:Object(w.l)(C.n),visibility:Object(w.l)(C.i)}),ye=Object(w.r)(U,["name","open","visibility","address","phoneNumber","description","styleUrl","Style"]),me=Object(w.q)("ExtendedData");function ve(t,e,n){var r={node:t};e.getId()&&t.setAttribute("id",e.getId());var i=e.getProperties(),o={address:1,description:1,name:1,open:1,phoneNumber:1,styleUrl:1,visibility:1};o[e.getGeometryName()]=1;var a=Object.keys(i||{}).sort().filter(function(t){return!o[t]}),l=e.getStyleFunction();if(l){var u=l(e,0);if(u){var c=Array.isArray(u)?u:[u],h=c;if(e.getGeometry()&&(h=c.filter(function(t){var n=t.getGeometryFunction()(e);if(n){var r=n.getType();return r===s.a.GEOMETRY_COLLECTION?n.getGeometriesArrayRecursive().filter(function(t){var e=t.getType();return e===s.a.POINT||e===s.a.MULTI_POINT}).length:r===s.a.POINT||r===s.a.MULTI_POINT}})),this.writeStyles_){var p=c,f=c;e.getGeometry()&&(p=c.filter(function(t){var n=t.getGeometryFunction()(e);if(n){var r=n.getType();return r===s.a.GEOMETRY_COLLECTION?n.getGeometriesArrayRecursive().filter(function(t){var e=t.getType();return e===s.a.LINE_STRING||e===s.a.MULTI_LINE_STRING}).length:r===s.a.LINE_STRING||r===s.a.MULTI_LINE_STRING}}),f=c.filter(function(t){var n=t.getGeometryFunction()(e);if(n){var r=n.getType();return r===s.a.GEOMETRY_COLLECTION?n.getGeometriesArrayRecursive().filter(function(t){var e=t.getType();return e===s.a.POLYGON||e===s.a.MULTI_POLYGON}).length:r===s.a.POLYGON||r===s.a.MULTI_POLYGON}})),i.Style={pointStyles:h,lineStyles:p,polyStyles:f}}if(h.length&&void 0===i.name){var d=h[0].getText();d&&(i.name=d.getText())}}}var g=n[n.length-1].node,y=ye[g.namespaceURI],m=Object(w.p)(i,y);if(Object(w.v)(r,ge,w.a,m,n,y),a.length>0){var v={names:a,values:Object(w.p)(i,a)};Object(w.v)(r,ge,me,[v],n)}var _=n[0],b=e.getGeometry();b&&(b=Object(I.c)(b,!0,_)),Object(w.v)(r,ge,ae,[b],n)}var _e=Object(w.r)(U,["extrude","tessellate","altitudeMode","coordinates"]),be=Object(w.r)(U,{extrude:Object(w.l)(C.i),tessellate:Object(w.l)(C.i),altitudeMode:Object(w.l)(C.n),coordinates:Object(w.l)(function(t,e,n){var r,i=n[n.length-1],o=i.layout,s=i.stride;o==a.a.XY||o==a.a.XYM?r=2:o==a.a.XYZ||o==a.a.XYZM?r=3:Object(x.a)(!1,34);var l=e.length,u="";if(l>0){u+=e[0];for(var c=1;c<r;++c)u+=","+e[c];for(var h=s;h<l;h+=s)for(u+=" "+e[h],c=1;c<r;++c)u+=","+e[h+c]}Object(C.n)(t,u)})});function we(t,e,n){var r=e.getFlatCoordinates(),i={node:t};i.layout=e.getLayout(),i.stride=e.getStride();var o=e.getProperties();o.coordinates=r;var a=n[n.length-1].node,s=_e[a.namespaceURI],l=Object(w.p)(o,s);Object(w.v)(i,be,w.a,l,n,s)}var Oe=Object(w.r)(U,["color","fill","outline"]),xe=Object(w.r)(U,{outerBoundaryIs:Object(w.l)(de),innerBoundaryIs:Object(w.l)(de)}),Ee=Object(w.q)("innerBoundaryIs"),Se=Object(w.q)("outerBoundaryIs");function Ce(t,e,n){var r=e.getLinearRings(),i=r.shift(),o={node:t};Object(w.v)(o,xe,Ee,r,n),Object(w.v)(o,xe,Se,[i],n)}var Te=Object(w.r)(U,{color:Object(w.l)(qt),fill:Object(w.l)(C.i),outline:Object(w.l)(C.i)});function Ie(t,e){Object(C.l)(t,Math.round(1e6*e)/1e6)}var je=Object(w.r)(U,["IconStyle","LabelStyle","LineStyle","PolyStyle"]),Le=Object(w.r)(U,{IconStyle:Object(w.l)(function(t,e,n){var r={node:t},i={},o=e.getSrc(),a=e.getSize(),s=e.getImageSize(),l={href:o};if(a){l.w=a[0],l.h=a[1];var c=e.getAnchor(),h=e.getOrigin();if(h&&s&&0!==h[0]&&h[1]!==a[1]&&(l.x=h[0],l.y=s[1]-(h[1]+a[1])),c&&(c[0]!==a[0]/2||c[1]!==a[1]/2)){var p={x:c[0],xunits:u.a.PIXELS,y:a[1]-c[1],yunits:u.a.PIXELS};i.hotSpot=p}}i.Icon=l;var f=e.getScale();1!==f&&(i.scale=f);var d=e.getRotation();0!==d&&(i.heading=d);var g=e.getColor();g&&(i.color=g);var y=n[n.length-1].node,m=Qt[y.namespaceURI],v=Object(w.p)(i,m);Object(w.v)(r,te,w.a,v,n,m)}),LabelStyle:Object(w.l)(function(t,e,n){var r={node:t},i={},o=e.getFill();o&&(i.color=o.getColor());var a=e.getScale();a&&1!==a&&(i.scale=a);var s=n[n.length-1].node,l=ee[s.namespaceURI],u=Object(w.p)(i,l);Object(w.v)(r,ne,w.a,u,n,l)}),LineStyle:Object(w.l)(function(t,e,n){var r={node:t},i={color:e.getColor(),width:Number(e.getWidth())||1},o=n[n.length-1].node,a=re[o.namespaceURI],s=Object(w.p)(i,a);Object(w.v)(r,ie,w.a,s,n,a)}),PolyStyle:Object(w.l)(function(t,e,n){var r={node:t},i=e.getFill(),o=e.getStroke(),a={color:i?i.getColor():void 0,fill:!!i&&void 0,outline:!!o&&void 0},s=n[n.length-1].node,l=Oe[s.namespaceURI],u=Object(w.p)(a,l);Object(w.v)(r,Te,w.a,u,n,l)})});e.a=it},function(t,e,n){"use strict";var r,i=n(15),o=n(17),a=n(21),s=n(162),l=n(4),u=n(341),c=n(2),h=n(36),p=n(57),f=n(22),d=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),g=function(t){function e(e){var n=t.call(this)||this,r=e||{};return n.dataProjection=Object(c.get)("EPSG:4326"),n.factor_=r.factor?r.factor:1e5,n.geometryLayout_=r.geometryLayout?r.geometryLayout:o.a.XY,n}return d(e,t),e.prototype.readFeatureFromText=function(t,e){var n=this.readGeometryFromText(t,e);return new i.a(n)},e.prototype.readFeaturesFromText=function(t,e){return[this.readFeatureFromText(t,e)]},e.prototype.readGeometryFromText=function(t,e){var n=Object(h.b)(this.geometryLayout_),r=function(t,e,n){var r,i=n||1e5,o=new Array(e);for(r=0;r<e;++r)o[r]=0;for(var a=function(t,e){for(var n=e||1e5,r=function(t){for(var e=function(t){for(var e=[],n=0,r=0,i=0,o=t.length;i<o;++i){var a=t.charCodeAt(i)-63;n|=(31&a)<<r,a<32?(e.push(n),n=0,r=0):r+=5}return e}(t),n=0,r=e.length;n<r;++n){var i=e[n];e[n]=1&i?~(i>>1):i>>1}return e}(t),i=0,o=r.length;i<o;++i)r[i]/=n;return r}(t,i),s=0,l=a.length;s<l;)for(r=0;r<e;++r,++s)o[r]+=a[s],a[s]=o[r];return a}(t,n,this.factor_);Object(u.a)(r,0,r.length,n,r);var i=Object(p.a)(r,0,r.length,n),o=new a.a(i,this.geometryLayout_);return Object(f.c)(o,!1,this.adaptOptions(e))},e.prototype.writeFeatureText=function(t,e){var n=t.getGeometry();return n?this.writeGeometryText(n,e):(Object(l.a)(!1,40),"")},e.prototype.writeFeaturesText=function(t,e){return this.writeFeatureText(t[0],e)},e.prototype.writeGeometryText=function(t,e){var n=(t=Object(f.c)(t,!0,this.adaptOptions(e))).getFlatCoordinates(),r=t.getStride();return Object(u.a)(n,0,n.length,r,n),function(t,e,n){var r,i=n||1e5,o=new Array(e);for(r=0;r<e;++r)o[r]=0;for(var a=0,s=t.length;a<s;)for(r=0;r<e;++r,++a){var l=t[a],u=l-o[r];o[r]=l,t[a]=u}return function(t,e){for(var n=e||1e5,r=0,i=t.length;r<i;++r)t[r]=Math.round(t[r]*n);return function(t){for(var e=0,n=t.length;e<n;++e){var r=t[e];t[e]=r<0?~(r<<1):r<<1}return function(t){for(var e="",n=0,r=t.length;n<r;++n)e+=y(t[n]);return e}(t)}(t)}(t,i)}(n,r,this.factor_)},e}(s.a);function y(t){for(var e,n="";t>=32;)e=63+(32|31&t),n+=String.fromCharCode(e),t>>=5;return e=t+63,n+=String.fromCharCode(e)}e.a=g},function(t,e,n){"use strict";e.a=function(t,e,n,r,i,o){var a,s;void 0!==i?(a=i,s=void 0!==o?o:0):(a=[],s=0);var l=e;for(;l<n;){var u=t[l++];a[s++]=t[l++],a[s++]=u;for(var c=2;c<r;++c)a[s++]=t[l++]}return a.length=s,a}},function(t,e,n){"use strict";var r,i=n(15),o=n(153),a=n(21),s=n(37),l=n(44),u=n(45),c=n(16),h=n(10),p=n(2),f=n(22),d=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),g=function(t){function e(e){var n=t.call(this)||this,r=e||{};return n.layerName_=r.layerName,n.layers_=r.layers?r.layers:null,n.dataProjection=Object(p.get)(r.dataProjection?r.dataProjection:"EPSG:4326"),n}return d(e,t),e.prototype.readFeaturesFromObject=function(t,e){if("Topology"==t.type){var n=t,r=void 0,i=null,o=null;n.transform&&(i=(r=n.transform).scale,o=r.translate);var a=n.arcs;r&&function(t,e,n){for(var r=0,i=t.length;r<i;++r)b(t[r],e,n)}(a,i,o);var s=[],l=n.objects,u=this.layerName_,c=void 0;for(var h in l)this.layers_&&-1==this.layers_.indexOf(h)||("GeometryCollection"===l[h].type?(c=l[h],s.push.apply(s,v(c,a,i,o,u,h,e))):(c=l[h],s.push(_(c,a,i,o,u,h,e))));return s}return[]},e.prototype.readProjectionFromObject=function(t){return this.dataProjection},e}(o.a),y={Point:function(t,e,n){var r=t.coordinates;e&&n&&w(r,e,n);return new c.a(r)},LineString:function(t,e){var n=m(t.arcs,e);return new a.a(n)},Polygon:function(t,e){for(var n=[],r=0,i=t.arcs.length;r<i;++r)n[r]=m(t.arcs[r],e);return new h.b(n)},MultiPoint:function(t,e,n){var r=t.coordinates;if(e&&n)for(var i=0,o=r.length;i<o;++i)w(r[i],e,n);return new l.a(r)},MultiLineString:function(t,e){for(var n=[],r=0,i=t.arcs.length;r<i;++r)n[r]=m(t.arcs[r],e);return new s.a(n)},MultiPolygon:function(t,e){for(var n=[],r=0,i=t.arcs.length;r<i;++r){for(var o=t.arcs[r],a=[],s=0,l=o.length;s<l;++s)a[s]=m(o[s],e);n[r]=a}return new u.a(n)}};function m(t,e){for(var n,r,i=[],o=0,a=t.length;o<a;++o)n=t[o],o>0&&i.pop(),r=n>=0?e[n]:e[~n].slice().reverse(),i.push.apply(i,r);for(var s=0,l=i.length;s<l;++s)i[s]=i[s].slice();return i}function v(t,e,n,r,i,o,a){for(var s=t.geometries,l=[],u=0,c=s.length;u<c;++u)l[u]=_(s[u],e,n,r,i,o,a);return l}function _(t,e,n,r,o,a,s){var l=null,u=t.type;if(u){var c=y[u];l="Point"===u||"MultiPoint"===u?c(t,n,r):c(t,e),l=Object(f.c)(l,!1,s)}var h=new i.a({geometry:l});void 0!==t.id&&h.setId(t.id);var p=t.properties;return o&&(p||(p={}),p[o]=a),p&&h.setProperties(p,!0),h}function b(t,e,n){for(var r=0,i=0,o=0,a=t.length;o<a;++o){var s=t[o];r+=s[0],i+=s[1],s[0]=r,s[1]=i,w(s,e,n)}}function w(t,e,n){t[0]=t[0]*e[0]+n[0],t[1]=t[1]*e[1]+n[1]}e.a=g},function(t,e,n){"use strict";var r,i=n(121),o=n(161),a=n(344),s=n(122),l=n(95),u=n(27),c=n(345),h=n(4),p=n(1),f=n(2),d=n(53),g=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),y={"http://www.opengis.net/gml":{boundedBy:Object(u.n)(s.b.prototype.readGeometryElement,"bounds")},"http://www.opengis.net/wfs/2.0":{member:Object(u.j)(s.b.prototype.readFeaturesInternal)}},m={"http://www.opengis.net/wfs":{totalInserted:Object(u.n)(d.f),totalUpdated:Object(u.n)(d.f),totalDeleted:Object(u.n)(d.f)},"http://www.opengis.net/wfs/2.0":{totalInserted:Object(u.n)(d.f),totalUpdated:Object(u.n)(d.f),totalDeleted:Object(u.n)(d.f)}},v={"http://www.opengis.net/wfs":{TransactionSummary:Object(u.n)(R,"transactionSummary"),InsertResults:Object(u.n)(A,"insertIds")},"http://www.opengis.net/wfs/2.0":{TransactionSummary:Object(u.n)(R,"transactionSummary"),InsertResults:Object(u.n)(A,"insertIds")}},_={"http://www.opengis.net/wfs":{PropertyName:Object(u.l)(d.n)},"http://www.opengis.net/wfs/2.0":{PropertyName:Object(u.l)(d.n)}},b={"http://www.opengis.net/wfs":{Insert:Object(u.l)(k),Update:Object(u.l)(U),Delete:Object(u.l)(G),Property:Object(u.l)(z),Native:Object(u.l)(B)},"http://www.opengis.net/wfs/2.0":{Insert:Object(u.l)(k),Update:Object(u.l)(U),Delete:Object(u.l)(G),Property:Object(u.l)(z),Native:Object(u.l)(B)}},w="feature",O="http://www.w3.org/2000/xmlns/",x={"2.0.0":"http://www.opengis.net/ogc/1.1","1.1.0":"http://www.opengis.net/ogc","1.0.0":"http://www.opengis.net/ogc"},E={"2.0.0":"http://www.opengis.net/wfs/2.0","1.1.0":"http://www.opengis.net/wfs","1.0.0":"http://www.opengis.net/wfs"},S={"2.0.0":"http://www.opengis.net/fes/2.0","1.1.0":"http://www.opengis.net/fes","1.0.0":"http://www.opengis.net/fes"},C={"2.0.0":"http://www.opengis.net/wfs/2.0 http://schemas.opengis.net/wfs/2.0/wfs.xsd","1.1.0":"http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1.0/wfs.xsd","1.0.0":"http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.0.0/wfs.xsd"},T={"2.0.0":a.a,"1.1.0":o.a,"1.0.0":i.a},I="1.1.0",j=function(t){function e(e){var n=t.call(this)||this,r=e||{};return n.version_=r.version?r.version:I,n.featureType_=r.featureType,n.featureNS_=r.featureNS,n.gmlFormat_=r.gmlFormat?r.gmlFormat:new T[n.version_],n.schemaLocation_=r.schemaLocation?r.schemaLocation:C[n.version_],n}return g(e,t),e.prototype.getFeatureType=function(){return this.featureType_},e.prototype.setFeatureType=function(t){this.featureType_=t},e.prototype.readFeaturesFromNode=function(t,e){var n={node:t};Object(p.a)(n,{featureType:this.featureType_,featureNS:this.featureNS_}),Object(p.a)(n,this.getReadOptions(t,e||{}));var r,i=[n];r="2.0.0"===this.version_?y:this.gmlFormat_.FEATURE_COLLECTION_PARSERS;var o=Object(u.u)([],r,t,i,this.gmlFormat_);return o||(o=[]),o},e.prototype.readTransactionResponse=function(t){if(t){if("string"===typeof t){var e=Object(u.s)(t);return this.readTransactionResponseFromDocument(e)}return Object(u.h)(t)?this.readTransactionResponseFromDocument(t):this.readTransactionResponseFromNode(t)}},e.prototype.readFeatureCollectionMetadata=function(t){if(t){if("string"===typeof t){var e=Object(u.s)(t);return this.readFeatureCollectionMetadataFromDocument(e)}return Object(u.h)(t)?this.readFeatureCollectionMetadataFromDocument(t):this.readFeatureCollectionMetadataFromNode(t)}},e.prototype.readFeatureCollectionMetadataFromDocument=function(t){for(var e=t.firstChild;e;e=e.nextSibling)if(e.nodeType==Node.ELEMENT_NODE)return this.readFeatureCollectionMetadataFromNode(e)},e.prototype.readFeatureCollectionMetadataFromNode=function(t){var e={},n=Object(d.g)(t.getAttribute("numberOfFeatures"));return e.numberOfFeatures=n,Object(u.u)(e,y,t,[],this.gmlFormat_)},e.prototype.readTransactionResponseFromDocument=function(t){for(var e=t.firstChild;e;e=e.nextSibling)if(e.nodeType==Node.ELEMENT_NODE)return this.readTransactionResponseFromNode(e)},e.prototype.readTransactionResponseFromNode=function(t){return Object(u.u)({},v,t,[])},e.prototype.writeGetFeature=function(t){var e=this,n=Object(u.c)(E[this.version_],"GetFeature");n.setAttribute("service","WFS"),n.setAttribute("version",this.version_),t.handle&&n.setAttribute("handle",t.handle),t.outputFormat&&n.setAttribute("outputFormat",t.outputFormat),void 0!==t.maxFeatures&&n.setAttribute("maxFeatures",String(t.maxFeatures)),t.resultType&&n.setAttribute("resultType",t.resultType),void 0!==t.startIndex&&n.setAttribute("startIndex",String(t.startIndex)),void 0!==t.count&&n.setAttribute("count",String(t.count)),void 0!==t.viewParams&&n.setAttribute("viewParams",t.viewParams),n.setAttributeNS(u.b,"xsi:schemaLocation",this.schemaLocation_);var r={node:n};if(Object(p.a)(r,{version:this.version_,srsName:t.srsName,featureNS:t.featureNS?t.featureNS:this.featureNS_,featurePrefix:t.featurePrefix,propertyNames:t.propertyNames?t.propertyNames:[]}),Object(h.a)(Array.isArray(t.featureTypes),11),"string"===typeof t.featureTypes[0]){var i=t.filter;t.bbox&&(Object(h.a)(t.geometryName,12),i=this.combineBboxAndFilter(t.geometryName,t.bbox,t.srsName,i)),Object(p.a)(r,{geometryName:t.geometryName,filter:i}),at(n,t.featureTypes,[r])}else t.featureTypes.forEach(function(i){var o=e.combineBboxAndFilter(i.geometryName,i.bbox,t.srsName,t.filter);Object(p.a)(r,{geometryName:i.geometryName,filter:o}),at(n,[i.name],[r])});return n},e.prototype.combineBboxAndFilter=function(t,e,n,r){var i=Object(c.b)(t,e,n);return r?Object(c.a)(r,i):i},e.prototype.writeTransaction=function(t,e,n,r){var i,o=[],a=r.version?r.version:this.version_,s=Object(u.c)(E[a],"Transaction");s.setAttribute("service","WFS"),s.setAttribute("version",a),r&&(i=r.gmlOptions?r.gmlOptions:{},r.handle&&s.setAttribute("handle",r.handle)),s.setAttributeNS(u.b,"xsi:schemaLocation",C[a]);var l=function(t,e,n,r){var i,o=r.featurePrefix?r.featurePrefix:w;"1.0.0"===n?i=2:"1.1.0"===n?i=3:"2.0.0"===n&&(i=3.2);return Object(p.a)({node:t},{version:n,featureNS:r.featureNS,featureType:r.featureType,featurePrefix:o,gmlVersion:i,hasZ:r.hasZ,srsName:r.srsName},e)}(s,i,a,r);return t&&L("Insert",t,o,l),e&&L("Update",e,o,l),n&&L("Delete",n,o,l),r.nativeElements&&L("Native",r.nativeElements,o,l),s},e.prototype.readProjectionFromDocument=function(t){for(var e=t.firstChild;e;e=e.nextSibling)if(e.nodeType==Node.ELEMENT_NODE)return this.readProjectionFromNode(e);return null},e.prototype.readProjectionFromNode=function(t){if(t.firstElementChild&&t.firstElementChild.firstElementChild)for(var e=(t=t.firstElementChild.firstElementChild).firstElementChild;e;e=e.nextElementSibling)if(0!==e.childNodes.length&&(1!==e.childNodes.length||3!==e.firstChild.nodeType)){var n=[{}];return this.gmlFormat_.readGeometryElement(e,n),Object(f.get)(n.pop().srsName)}return null},e}(l.a);function L(t,e,n,r){Object(u.v)(r,b,Object(u.q)(t),e,n)}function R(t,e){return Object(u.u)({},m,t,e)}var P={"http://www.opengis.net/ogc":{FeatureId:Object(u.j)(function(t,e){return t.getAttribute("fid")})},"http://www.opengis.net/ogc/1.1":{FeatureId:Object(u.j)(function(t,e){return t.getAttribute("fid")})}};function N(t,e){Object(u.t)(P,t,e)}var M={"http://www.opengis.net/wfs":{Feature:N},"http://www.opengis.net/wfs/2.0":{Feature:N}};function A(t,e){return Object(u.u)([],M,t,e)}function k(t,e,n){var r=n[n.length-1],s=r.featureType,l=r.featureNS,c=r.gmlVersion,h=Object(u.c)(l,s);t.appendChild(h),2===c?i.a.prototype.writeFeatureElement(h,e,n):3===c?o.a.prototype.writeFeatureElement(h,e,n):a.a.prototype.writeFeatureElement(h,e,n)}function F(t,e,n){var r=n[n.length-1].version,i=x[r],o=Object(u.c)(i,"Filter"),a=Object(u.c)(i,"FeatureId");o.appendChild(a),a.setAttribute("fid",e),t.appendChild(o)}function D(t,e){var n=(t=t||w)+":";return 0===e.indexOf(n)?e:n+e}function G(t,e,n){var r=n[n.length-1];Object(h.a)(void 0!==e.getId(),26);var i=r.featureType,o=r.featurePrefix,a=r.featureNS,s=D(o,i);t.setAttribute("typeName",s),t.setAttributeNS(O,"xmlns:"+o,a);var l=e.getId();void 0!==l&&F(t,l,n)}function U(t,e,n){var r=n[n.length-1];Object(h.a)(void 0!==e.getId(),27);var i=r.version,o=r.featureType,a=r.featurePrefix,s=r.featureNS,l=D(a,o),c=e.getGeometryName();t.setAttribute("typeName",l),t.setAttributeNS(O,"xmlns:"+a,s);var p=e.getId();if(void 0!==p){for(var f=e.getKeys(),d=[],g=0,y=f.length;g<y;g++){var m=e.get(f[g]);if(void 0!==m){var v=f[g];m&&"function"===typeof m.getSimplifiedGeometry&&(v=c),d.push({name:v,value:m})}}Object(u.v)({version:i,gmlVersion:r.gmlVersion,node:t,hasZ:r.hasZ,srsName:r.srsName},b,Object(u.q)("Property"),d,n),F(t,p,n)}}function z(t,e,n){var r=n[n.length-1],s=r.version,l=E[s],c=Object(u.c)(l,"Name"),h=r.gmlVersion;if(t.appendChild(c),Object(d.n)(c,e.name),void 0!==e.value&&null!==e.value){var p=Object(u.c)(l,"Value");t.appendChild(p),e.value&&"function"===typeof e.value.getSimplifiedGeometry?2===h?i.a.prototype.writeGeometryElement(p,e.value,n):3===h?o.a.prototype.writeGeometryElement(p,e.value,n):a.a.prototype.writeGeometryElement(p,e.value,n):Object(d.n)(p,e.value)}}function B(t,e,n){e.vendorId&&t.setAttribute("vendorId",e.vendorId),void 0!==e.safeToIgnore&&t.setAttribute("safeToIgnore",String(e.safeToIgnore)),void 0!==e.value&&Object(d.n)(t,e.value)}var V={"http://www.opengis.net/wfs":{Query:Object(u.l)(Y)},"http://www.opengis.net/wfs/2.0":{Query:Object(u.l)(Y)},"http://www.opengis.net/ogc":{During:Object(u.l)(K),And:Object(u.l)(Z),Or:Object(u.l)(Z),Not:Object(u.l)(J),BBOX:Object(u.l)(X),Contains:Object(u.l)(W),Intersects:Object(u.l)(W),Within:Object(u.l)(W),DWithin:Object(u.l)(H),PropertyIsEqualTo:Object(u.l)($),PropertyIsNotEqualTo:Object(u.l)($),PropertyIsLessThan:Object(u.l)($),PropertyIsLessThanOrEqualTo:Object(u.l)($),PropertyIsGreaterThan:Object(u.l)($),PropertyIsGreaterThanOrEqualTo:Object(u.l)($),PropertyIsNull:Object(u.l)(Q),PropertyIsBetween:Object(u.l)(tt),PropertyIsLike:Object(u.l)(et)},"http://www.opengis.net/fes/2.0":{During:Object(u.l)(K),And:Object(u.l)(Z),Or:Object(u.l)(Z),Not:Object(u.l)(J),BBOX:Object(u.l)(X),Contains:Object(u.l)(W),Disjoint:Object(u.l)(W),Intersects:Object(u.l)(W),ResourceId:Object(u.l)(function(t,e,n){t.setAttribute("rid",e.rid)}),Within:Object(u.l)(W),DWithin:Object(u.l)(H),PropertyIsEqualTo:Object(u.l)($),PropertyIsNotEqualTo:Object(u.l)($),PropertyIsLessThan:Object(u.l)($),PropertyIsLessThanOrEqualTo:Object(u.l)($),PropertyIsGreaterThan:Object(u.l)($),PropertyIsGreaterThanOrEqualTo:Object(u.l)($),PropertyIsNull:Object(u.l)(Q),PropertyIsBetween:Object(u.l)(tt),PropertyIsLike:Object(u.l)(et)}};function Y(t,e,n){var r,i,o=n[n.length-1],a=o.version,s=o.featurePrefix,l=o.featureNS,c=o.propertyNames,h=o.srsName;r=s?D(s,e):e,i="2.0.0"===a?"typeNames":"typeName",t.setAttribute(i,r),h&&t.setAttribute("srsName",h),l&&t.setAttributeNS(O,"xmlns:"+s,l);var f=Object(p.a)({},o);f.node=t,Object(u.v)(f,_,Object(u.q)("PropertyName"),c,n);var d=o.filter;if(d){var g=Object(u.c)(st(a),"Filter");t.appendChild(g),q(g,d,n)}}function q(t,e,n){var r=n[n.length-1],i={node:t};Object(p.a)(i,{context:r}),Object(u.v)(i,V,Object(u.q)(e.getTagName()),[e],n)}function X(t,e,n){var r=n[n.length-1],i=r.context.version;r.srsName=e.srsName;var o=T[i];it(i,t,e.geometryName),o.prototype.writeGeometryElement(t,e.extent,n)}function W(t,e,n){var r=n[n.length-1],i=r.context.version;r.srsName=e.srsName;var o=T[i];it(i,t,e.geometryName),o.prototype.writeGeometryElement(t,e.geometry,n)}function H(t,e,n){var r=n[n.length-1].context.version;W(t,e,n);var i=Object(u.c)(st(r),"Distance");Object(d.n)(i,e.distance.toString()),"2.0.0"===r?i.setAttribute("uom",e.unit):i.setAttribute("units",e.unit),t.appendChild(i)}function K(t,e,n){var r=n[n.length-1].context.version;nt(S[r],"ValueReference",t,e.propertyName);var i=Object(u.c)(s.a,"TimePeriod");t.appendChild(i);var o=Object(u.c)(s.a,"begin");i.appendChild(o),ot(o,e.begin);var a=Object(u.c)(s.a,"end");i.appendChild(a),ot(a,e.end)}function Z(t,e,n){var r=n[n.length-1].context,i={node:t};Object(p.a)(i,{context:r});for(var o=e.conditions,a=0,s=o.length;a<s;++a){var l=o[a];Object(u.v)(i,V,Object(u.q)(l.getTagName()),[l],n)}}function J(t,e,n){var r=n[n.length-1].context,i={node:t};Object(p.a)(i,{context:r});var o=e.condition;Object(u.v)(i,V,Object(u.q)(o.getTagName()),[o],n)}function $(t,e,n){var r=n[n.length-1].context.version;void 0!==e.matchCase&&t.setAttribute("matchCase",e.matchCase.toString()),it(r,t,e.propertyName),rt(r,t,""+e.expression)}function Q(t,e,n){it(n[n.length-1].context.version,t,e.propertyName)}function tt(t,e,n){var r=n[n.length-1].context.version,i=st(r);it(r,t,e.propertyName);var o=Object(u.c)(i,"LowerBoundary");t.appendChild(o),rt(r,o,""+e.lowerBoundary);var a=Object(u.c)(i,"UpperBoundary");t.appendChild(a),rt(r,a,""+e.upperBoundary)}function et(t,e,n){var r=n[n.length-1].context.version;t.setAttribute("wildCard",e.wildCard),t.setAttribute("singleChar",e.singleChar),t.setAttribute("escapeChar",e.escapeChar),void 0!==e.matchCase&&t.setAttribute("matchCase",e.matchCase.toString()),it(r,t,e.propertyName),rt(r,t,""+e.pattern)}function nt(t,e,n,r){var i=Object(u.c)(t,e);Object(d.n)(i,r),n.appendChild(i)}function rt(t,e,n){nt(st(t),"Literal",e,n)}function it(t,e,n){"2.0.0"===t?nt(S[t],"ValueReference",e,n):nt(x[t],"PropertyName",e,n)}function ot(t,e){var n=Object(u.c)(s.a,"TimeInstant");t.appendChild(n);var r=Object(u.c)(s.a,"timePosition");n.appendChild(r),Object(d.n)(r,e)}function at(t,e,n){var r=n[n.length-1],i=Object(p.a)({},r);i.node=t,Object(u.v)(i,V,Object(u.q)("Query"),e,n)}function st(t){return"2.0.0"===t?S[t]:x[t]}e.a=j},function(t,e,n){"use strict";var r,i=n(121),o=n(161),a=n(122),s=n(27),l=n(53),u=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),c=function(t){function e(e){var n=this,r=e||{};return(n=t.call(this,r)||this).schemaLocation=r.schemaLocation?r.schemaLocation:n.namespace+" http://schemas.opengis.net/gml/3.2.1/gml.xsd",n}return u(e,t),e}(o.a);c.prototype.namespace="http://www.opengis.net/gml/3.2",c.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS={"http://www.opengis.net/gml/3.2":{pos:Object(s.o)(o.a.prototype.readFlatPos),posList:Object(s.o)(o.a.prototype.readFlatPosList),coordinates:Object(s.o)(i.a.prototype.readFlatCoordinates)}},c.prototype.FLAT_LINEAR_RINGS_PARSERS={"http://www.opengis.net/gml/3.2":{interior:o.a.prototype.interiorParser,exterior:o.a.prototype.exteriorParser}},c.prototype.GEOMETRY_PARSERS={"http://www.opengis.net/gml/3.2":{Point:Object(s.o)(a.b.prototype.readPoint),MultiPoint:Object(s.o)(a.b.prototype.readMultiPoint),LineString:Object(s.o)(a.b.prototype.readLineString),MultiLineString:Object(s.o)(a.b.prototype.readMultiLineString),LinearRing:Object(s.o)(a.b.prototype.readLinearRing),Polygon:Object(s.o)(a.b.prototype.readPolygon),MultiPolygon:Object(s.o)(a.b.prototype.readMultiPolygon),Surface:Object(s.o)(c.prototype.readSurface),MultiSurface:Object(s.o)(o.a.prototype.readMultiSurface),Curve:Object(s.o)(c.prototype.readCurve),MultiCurve:Object(s.o)(o.a.prototype.readMultiCurve),Envelope:Object(s.o)(c.prototype.readEnvelope)}},c.prototype.MULTICURVE_PARSERS={"http://www.opengis.net/gml/3.2":{curveMember:Object(s.j)(o.a.prototype.curveMemberParser),curveMembers:Object(s.j)(o.a.prototype.curveMemberParser)}},c.prototype.MULTISURFACE_PARSERS={"http://www.opengis.net/gml/3.2":{surfaceMember:Object(s.j)(o.a.prototype.surfaceMemberParser),surfaceMembers:Object(s.j)(o.a.prototype.surfaceMemberParser)}},c.prototype.CURVEMEMBER_PARSERS={"http://www.opengis.net/gml/3.2":{LineString:Object(s.j)(a.b.prototype.readLineString),Curve:Object(s.j)(o.a.prototype.readCurve)}},c.prototype.SURFACEMEMBER_PARSERS={"http://www.opengis.net/gml/3.2":{Polygon:Object(s.j)(a.b.prototype.readPolygon),Surface:Object(s.j)(o.a.prototype.readSurface)}},c.prototype.SURFACE_PARSERS={"http://www.opengis.net/gml/3.2":{patches:Object(s.o)(o.a.prototype.readPatch)}},c.prototype.CURVE_PARSERS={"http://www.opengis.net/gml/3.2":{segments:Object(s.o)(o.a.prototype.readSegment)}},c.prototype.ENVELOPE_PARSERS={"http://www.opengis.net/gml/3.2":{lowerCorner:Object(s.j)(o.a.prototype.readFlatPosList),upperCorner:Object(s.j)(o.a.prototype.readFlatPosList)}},c.prototype.PATCHES_PARSERS={"http://www.opengis.net/gml/3.2":{PolygonPatch:Object(s.o)(o.a.prototype.readPolygonPatch)}},c.prototype.SEGMENTS_PARSERS={"http://www.opengis.net/gml/3.2":{LineStringSegment:Object(s.o)(o.a.prototype.readLineStringSegment)}},c.prototype.MULTIPOINT_PARSERS={"http://www.opengis.net/gml/3.2":{pointMember:Object(s.j)(a.b.prototype.pointMemberParser),pointMembers:Object(s.j)(a.b.prototype.pointMemberParser)}},c.prototype.MULTILINESTRING_PARSERS={"http://www.opengis.net/gml/3.2":{lineStringMember:Object(s.j)(a.b.prototype.lineStringMemberParser),lineStringMembers:Object(s.j)(a.b.prototype.lineStringMemberParser)}},c.prototype.MULTIPOLYGON_PARSERS={"http://www.opengis.net/gml/3.2":{polygonMember:Object(s.j)(a.b.prototype.polygonMemberParser),polygonMembers:Object(s.j)(a.b.prototype.polygonMemberParser)}},c.prototype.POINTMEMBER_PARSERS={"http://www.opengis.net/gml/3.2":{Point:Object(s.j)(a.b.prototype.readFlatCoordinatesFromNode)}},c.prototype.LINESTRINGMEMBER_PARSERS={"http://www.opengis.net/gml/3.2":{LineString:Object(s.j)(a.b.prototype.readLineString)}},c.prototype.POLYGONMEMBER_PARSERS={"http://www.opengis.net/gml/3.2":{Polygon:Object(s.j)(a.b.prototype.readPolygon)}},c.prototype.RING_PARSERS={"http://www.opengis.net/gml/3.2":{LinearRing:Object(s.o)(a.b.prototype.readFlatLinearRing)}},c.prototype.RING_SERIALIZERS={"http://www.opengis.net/gml/3.2":{exterior:Object(s.l)(o.a.prototype.writeRing),interior:Object(s.l)(o.a.prototype.writeRing)}},c.prototype.ENVELOPE_SERIALIZERS={"http://www.opengis.net/gml/3.2":{lowerCorner:Object(s.l)(l.n),upperCorner:Object(s.l)(l.n)}},c.prototype.SURFACEORPOLYGONMEMBER_SERIALIZERS={"http://www.opengis.net/gml/3.2":{surfaceMember:Object(s.l)(o.a.prototype.writeSurfaceOrPolygonMember),polygonMember:Object(s.l)(o.a.prototype.writeSurfaceOrPolygonMember)}},c.prototype.POINTMEMBER_SERIALIZERS={"http://www.opengis.net/gml/3.2":{pointMember:Object(s.l)(o.a.prototype.writePointMember)}},c.prototype.LINESTRINGORCURVEMEMBER_SERIALIZERS={"http://www.opengis.net/gml/3.2":{lineStringMember:Object(s.l)(o.a.prototype.writeLineStringOrCurveMember),curveMember:Object(s.l)(o.a.prototype.writeLineStringOrCurveMember)}},c.prototype.GEOMETRY_SERIALIZERS={"http://www.opengis.net/gml/3.2":{Curve:Object(s.l)(o.a.prototype.writeCurveOrLineString),MultiCurve:Object(s.l)(o.a.prototype.writeMultiCurveOrLineString),Point:Object(s.l)(c.prototype.writePoint),MultiPoint:Object(s.l)(o.a.prototype.writeMultiPoint),LineString:Object(s.l)(o.a.prototype.writeCurveOrLineString),MultiLineString:Object(s.l)(o.a.prototype.writeMultiCurveOrLineString),LinearRing:Object(s.l)(o.a.prototype.writeLinearRing),Polygon:Object(s.l)(o.a.prototype.writeSurfaceOrPolygon),MultiPolygon:Object(s.l)(o.a.prototype.writeMultiSurfaceOrPolygon),Surface:Object(s.l)(o.a.prototype.writeSurfaceOrPolygon),MultiSurface:Object(s.l)(o.a.prototype.writeMultiSurfaceOrPolygon),Envelope:Object(s.l)(o.a.prototype.writeEnvelope)}},e.a=c},function(t,e,n){"use strict";e.a=function(t){var e=[null].concat(Array.prototype.slice.call(arguments));return new(Function.prototype.bind.apply(r.a,e))},e.b=function(t,e,n){return new i.a(t,e,n)};var r=n(346),i=n(347);n(348),n(349),n(350),n(351),n(352),n(353),n(354),n(355),n(356),n(357),n(358),n(359),n(360),n(361),n(362),n(363),n(364),n(365)},function(t,e,n){"use strict";var r,i=n(236),o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=function(t){function e(e){return t.call(this,"And",Array.prototype.slice.call(arguments))||this}return o(e,t),e}(i.a);e.a=a},function(t,e,n){"use strict";var r,i=n(78),o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=function(t){function e(e,n,r){var i=t.call(this,"BBOX")||this;if(i.geometryName=e,i.extent=n,4!==n.length)throw new Error("Expected an extent with four values ([minX, minY, maxX, maxY])");return i.srsName=r,i}return o(e,t),e}(i.a);e.a=a},function(t,e,n){"use strict";var r,i=n(96),o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=function(t){function e(e,n,r){return t.call(this,"Contains",e,n,r)||this}return o(e,t),e}(i.a);e.a=a},function(t,e,n){"use strict";var r,i=n(96),o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=function(t){function e(e,n,r,i,o){var a=t.call(this,"DWithin",e,n,o)||this;return a.distance=r,a.unit=i,a}return o(e,t),e}(i.a);e.a=a},function(t,e,n){"use strict";var r,i=n(96),o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=function(t){function e(e,n,r){return t.call(this,"Disjoint",e,n,r)||this}return o(e,t),e}(i.a);e.a=a},function(t,e,n){"use strict";var r,i=n(97),o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=function(t){function e(e,n,r){var i=t.call(this,"During",e)||this;return i.begin=n,i.end=r,i}return o(e,t),e}(i.a);e.a=a},function(t,e,n){"use strict";var r,i=n(79),o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=function(t){function e(e,n,r){return t.call(this,"PropertyIsEqualTo",e,n,r)||this}return o(e,t),e}(i.a);e.a=a},function(t,e,n){"use strict";var r,i=n(79),o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=function(t){function e(e,n){return t.call(this,"PropertyIsGreaterThan",e,n)||this}return o(e,t),e}(i.a);e.a=a},function(t,e,n){"use strict";var r,i=n(79),o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=function(t){function e(e,n){return t.call(this,"PropertyIsGreaterThanOrEqualTo",e,n)||this}return o(e,t),e}(i.a);e.a=a},function(t,e,n){"use strict";var r,i=n(96),o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=function(t){function e(e,n,r){return t.call(this,"Intersects",e,n,r)||this}return o(e,t),e}(i.a);e.a=a},function(t,e,n){"use strict";var r,i=n(97),o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=function(t){function e(e,n,r){var i=t.call(this,"PropertyIsBetween",e)||this;return i.lowerBoundary=n,i.upperBoundary=r,i}return o(e,t),e}(i.a);e.a=a},function(t,e,n){"use strict";var r,i=n(97),o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=function(t){function e(e,n,r,i,o,a){var s=t.call(this,"PropertyIsLike",e)||this;return s.pattern=n,s.wildCard=void 0!==r?r:"*",s.singleChar=void 0!==i?i:".",s.escapeChar=void 0!==o?o:"!",s.matchCase=a,s}return o(e,t),e}(i.a);e.a=a},function(t,e,n){"use strict";var r,i=n(97),o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=function(t){function e(e){return t.call(this,"PropertyIsNull",e)||this}return o(e,t),e}(i.a);e.a=a},function(t,e,n){"use strict";var r,i=n(79),o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=function(t){function e(e,n){return t.call(this,"PropertyIsLessThan",e,n)||this}return o(e,t),e}(i.a);e.a=a},function(t,e,n){"use strict";var r,i=n(79),o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=function(t){function e(e,n){return t.call(this,"PropertyIsLessThanOrEqualTo",e,n)||this}return o(e,t),e}(i.a);e.a=a},function(t,e,n){"use strict";var r,i=n(78),o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=function(t){function e(e){var n=t.call(this,"Not")||this;return n.condition=e,n}return o(e,t),e}(i.a);e.a=a},function(t,e,n){"use strict";var r,i=n(79),o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=function(t){function e(e,n,r){return t.call(this,"PropertyIsNotEqualTo",e,n,r)||this}return o(e,t),e}(i.a);e.a=a},function(t,e,n){"use strict";var r,i=n(236),o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=function(t){function e(e){return t.call(this,"Or",Array.prototype.slice.call(arguments))||this}return o(e,t),e}(i.a);e.a=a},function(t,e,n){"use strict";var r,i=n(78),o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=function(t){function e(e){var n=t.call(this,"ResourceId")||this;return n.rid=e,n}return o(e,t),e}(i.a);e.a=a},function(t,e,n){"use strict";var r,i=n(96),o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=function(t){function e(e,n,r){return t.call(this,"Within",e,n,r)||this}return o(e,t),e}(i.a);e.a=a},function(t,e,n){"use strict";var r,i=n(15),o=n(118),a=n(17),s=n(8),l=n(21),u=n(37),c=n(44),h=n(45),p=n(16),f=n(10),d=n(162),g=n(22),y=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),m={POINT:p.a,LINESTRING:l.a,POLYGON:f.b,MULTIPOINT:c.a,MULTILINESTRING:u.a,MULTIPOLYGON:h.a},v="EMPTY",_="Z",b="M",w={START:0,TEXT:1,LEFT_PAREN:2,RIGHT_PAREN:3,NUMBER:4,COMMA:5,EOF:6},O={};for(var x in s.a)O[x]=s.a[x].toUpperCase();var E=function(){function t(t){this.wkt=t,this.index_=-1}return t.prototype.isAlpha_=function(t){return t>="a"&&t<="z"||t>="A"&&t<="Z"},t.prototype.isNumeric_=function(t,e){return t>="0"&&t<="9"||"."==t&&!(void 0!==e&&e)},t.prototype.isWhiteSpace_=function(t){return" "==t||"\t"==t||"\r"==t||"\n"==t},t.prototype.nextChar_=function(){return this.wkt.charAt(++this.index_)},t.prototype.nextToken=function(){var t,e=this.nextChar_(),n=this.index_,r=e;if("("==e)t=w.LEFT_PAREN;else if(","==e)t=w.COMMA;else if(")"==e)t=w.RIGHT_PAREN;else if(this.isNumeric_(e)||"-"==e)t=w.NUMBER,r=this.readNumber_();else if(this.isAlpha_(e))t=w.TEXT,r=this.readText_();else{if(this.isWhiteSpace_(e))return this.nextToken();if(""!==e)throw new Error("Unexpected character: "+e);t=w.EOF}return{position:n,value:r,type:t}},t.prototype.readNumber_=function(){var t,e=this.index_,n=!1,r=!1;do{"."==t?n=!0:"e"!=t&&"E"!=t||(r=!0),t=this.nextChar_()}while(this.isNumeric_(t,n)||!r&&("e"==t||"E"==t)||r&&("-"==t||"+"==t));return parseFloat(this.wkt.substring(e,this.index_--))},t.prototype.readText_=function(){var t,e=this.index_;do{t=this.nextChar_()}while(this.isAlpha_(t));return this.wkt.substring(e,this.index_--).toUpperCase()},t}(),S=function(){function t(t){this.lexer_=t,this.token_={position:0,type:w.START},this.layout_=a.a.XY}return t.prototype.consume_=function(){this.token_=this.lexer_.nextToken()},t.prototype.isTokenType=function(t){return this.token_.type==t},t.prototype.match=function(t){var e=this.isTokenType(t);return e&&this.consume_(),e},t.prototype.parse=function(){return this.consume_(),this.parseGeometry_()},t.prototype.parseGeometryLayout_=function(){var t=a.a.XY,e=this.token_;if(this.isTokenType(w.TEXT)){var n=e.value;n===_?t=a.a.XYZ:n===b?t=a.a.XYM:"ZM"===n&&(t=a.a.XYZM),t!==a.a.XY&&this.consume_()}return t},t.prototype.parseGeometryCollectionText_=function(){if(this.match(w.LEFT_PAREN)){var t=[];do{t.push(this.parseGeometry_())}while(this.match(w.COMMA));if(this.match(w.RIGHT_PAREN))return t}throw new Error(this.formatErrorMessage_())},t.prototype.parsePointText_=function(){if(this.match(w.LEFT_PAREN)){var t=this.parsePoint_();if(this.match(w.RIGHT_PAREN))return t}throw new Error(this.formatErrorMessage_())},t.prototype.parseLineStringText_=function(){if(this.match(w.LEFT_PAREN)){var t=this.parsePointList_();if(this.match(w.RIGHT_PAREN))return t}throw new Error(this.formatErrorMessage_())},t.prototype.parsePolygonText_=function(){if(this.match(w.LEFT_PAREN)){var t=this.parseLineStringTextList_();if(this.match(w.RIGHT_PAREN))return t}throw new Error(this.formatErrorMessage_())},t.prototype.parseMultiPointText_=function(){if(this.match(w.LEFT_PAREN)){var t=void 0;if(t=this.token_.type==w.LEFT_PAREN?this.parsePointTextList_():this.parsePointList_(),this.match(w.RIGHT_PAREN))return t}throw new Error(this.formatErrorMessage_())},t.prototype.parseMultiLineStringText_=function(){if(this.match(w.LEFT_PAREN)){var t=this.parseLineStringTextList_();if(this.match(w.RIGHT_PAREN))return t}throw new Error(this.formatErrorMessage_())},t.prototype.parseMultiPolygonText_=function(){if(this.match(w.LEFT_PAREN)){var t=this.parsePolygonTextList_();if(this.match(w.RIGHT_PAREN))return t}throw new Error(this.formatErrorMessage_())},t.prototype.parsePoint_=function(){for(var t=[],e=this.layout_.length,n=0;n<e;++n){var r=this.token_;if(!this.match(w.NUMBER))break;t.push(r.value)}if(t.length==e)return t;throw new Error(this.formatErrorMessage_())},t.prototype.parsePointList_=function(){for(var t=[this.parsePoint_()];this.match(w.COMMA);)t.push(this.parsePoint_());return t},t.prototype.parsePointTextList_=function(){for(var t=[this.parsePointText_()];this.match(w.COMMA);)t.push(this.parsePointText_());return t},t.prototype.parseLineStringTextList_=function(){for(var t=[this.parseLineStringText_()];this.match(w.COMMA);)t.push(this.parseLineStringText_());return t},t.prototype.parsePolygonTextList_=function(){for(var t=[this.parsePolygonText_()];this.match(w.COMMA);)t.push(this.parsePolygonText_());return t},t.prototype.isEmptyGeometry_=function(){var t=this.isTokenType(w.TEXT)&&this.token_.value==v;return t&&this.consume_(),t},t.prototype.formatErrorMessage_=function(){return"Unexpected `"+this.token_.value+"` at position "+this.token_.position+" in `"+this.lexer_.wkt+"`"},t.prototype.parseGeometry_=function(){var t=this.token_;if(this.match(w.TEXT)){var e=t.value;this.layout_=this.parseGeometryLayout_();var n=this.isEmptyGeometry_();if("GEOMETRYCOLLECTION"==e){if(n)return new o.a([]);var r=this.parseGeometryCollectionText_();return new o.a(r)}var i=m[e];if(!i)throw new Error("Invalid geometry type: "+e);var a=void 0;if(n)a="POINT"==e?[NaN,NaN]:[];else switch(e){case"POINT":a=this.parsePointText_();break;case"LINESTRING":a=this.parseLineStringText_();break;case"POLYGON":a=this.parsePolygonText_();break;case"MULTIPOINT":a=this.parseMultiPointText_();break;case"MULTILINESTRING":a=this.parseMultiLineStringText_();break;case"MULTIPOLYGON":a=this.parseMultiPolygonText_()}return new i(a,this.layout_)}throw new Error(this.formatErrorMessage_())},t}(),C=function(t){function e(e){var n=t.call(this)||this,r=e||{};return n.splitCollection_=void 0!==r.splitCollection&&r.splitCollection,n}return y(e,t),e.prototype.parse_=function(t){var e=new E(t);return new S(e).parse()},e.prototype.readFeatureFromText=function(t,e){var n=this.readGeometryFromText(t,e),r=new i.a;return r.setGeometry(n),r},e.prototype.readFeaturesFromText=function(t,e){for(var n=[],r=this.readGeometryFromText(t,e),o=[],a=0,l=(n=this.splitCollection_&&r.getType()==s.a.GEOMETRY_COLLECTION?r.getGeometriesArray():[r]).length;a<l;++a){var u=new i.a;u.setGeometry(n[a]),o.push(u)}return o},e.prototype.readGeometryFromText=function(t,e){var n=this.parse_(t);return Object(g.c)(n,!1,e)},e.prototype.writeFeatureText=function(t,e){var n=t.getGeometry();return n?this.writeGeometryText(n,e):""},e.prototype.writeFeaturesText=function(t,e){if(1==t.length)return this.writeFeatureText(t[0],e);for(var n=[],r=0,i=t.length;r<i;++r)n.push(t[r].getGeometry());var a=new o.a(n);return this.writeGeometryText(a,e)},e.prototype.writeGeometryText=function(t,e){return R(Object(g.c)(t,!0,e))},e}(d.a);function T(t){var e=t.getCoordinates();return 0===e.length?"":e.join(" ")}function I(t){for(var e=t.getCoordinates(),n=[],r=0,i=e.length;r<i;++r)n.push(e[r].join(" "));return n.join(",")}function j(t){for(var e=[],n=t.getLinearRings(),r=0,i=n.length;r<i;++r)e.push("("+I(n[r])+")");return e.join(",")}var L={Point:T,LineString:I,Polygon:j,MultiPoint:function(t){for(var e=[],n=t.getPoints(),r=0,i=n.length;r<i;++r)e.push("("+T(n[r])+")");return e.join(",")},MultiLineString:function(t){for(var e=[],n=t.getLineStrings(),r=0,i=n.length;r<i;++r)e.push("("+I(n[r])+")");return e.join(",")},MultiPolygon:function(t){for(var e=[],n=t.getPolygons(),r=0,i=n.length;r<i;++r)e.push("("+j(n[r])+")");return e.join(",")},GeometryCollection:function(t){for(var e=[],n=t.getGeometries(),r=0,i=n.length;r<i;++r)e.push(R(n[r]));return e.join(",")}};function R(t){var e=t.getType(),n=(0,L[e])(t);if(e=e.toUpperCase(),"function"===typeof t.getFlatCoordinates){var r=function(t){var e=t.getLayout(),n="";return e!==a.a.XYZ&&e!==a.a.XYZM||(n+=_),e!==a.a.XYM&&e!==a.a.XYZM||(n+=b),n}(t);r.length>0&&(e+=" "+r)}return 0===n.length?e+" "+v:e+"("+n+")"}e.a=C},function(t,e,n){"use strict";var r,i=n(163),o=n(27),a=n(53),s=n(164),l=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),u=[null,"http://www.opengis.net/wms"],c=Object(o.r)(u,{Service:Object(o.n)(function(t,e){return Object(o.u)({},f,t,e)}),Capability:Object(o.n)(function(t,e){return Object(o.u)({},h,t,e)})}),h=Object(o.r)(u,{Request:Object(o.n)(function(t,e){return Object(o.u)({},w,t,e)}),Exception:Object(o.n)(function(t,e){return Object(o.u)([],m,t,e)}),Layer:Object(o.n)(function(t,e){var n=Object(o.u)({},v,t,e);if(void 0===n.Layer)return Object.assign(n,I(t,e));return n})}),p=function(t){function e(){var e=t.call(this)||this;return e.version=void 0,e}return l(e,t),e.prototype.readFromNode=function(t){this.version=t.getAttribute("version").trim();var e=Object(o.u)({version:this.version},c,t,[]);return e||null},e}(i.a),f=Object(o.r)(u,{Name:Object(o.n)(a.h),Title:Object(o.n)(a.h),Abstract:Object(o.n)(a.h),KeywordList:Object(o.n)(P),OnlineResource:Object(o.n)(s.a),ContactInformation:Object(o.n)(function(t,e){return Object(o.u)({},d,t,e)}),Fees:Object(o.n)(a.h),AccessConstraints:Object(o.n)(a.h),LayerLimit:Object(o.n)(a.f),MaxWidth:Object(o.n)(a.f),MaxHeight:Object(o.n)(a.f)}),d=Object(o.r)(u,{ContactPersonPrimary:Object(o.n)(function(t,e){return Object(o.u)({},g,t,e)}),ContactPosition:Object(o.n)(a.h),ContactAddress:Object(o.n)(function(t,e){return Object(o.u)({},y,t,e)}),ContactVoiceTelephone:Object(o.n)(a.h),ContactFacsimileTelephone:Object(o.n)(a.h),ContactElectronicMailAddress:Object(o.n)(a.h)}),g=Object(o.r)(u,{ContactPerson:Object(o.n)(a.h),ContactOrganization:Object(o.n)(a.h)}),y=Object(o.r)(u,{AddressType:Object(o.n)(a.h),Address:Object(o.n)(a.h),City:Object(o.n)(a.h),StateOrProvince:Object(o.n)(a.h),PostCode:Object(o.n)(a.h),Country:Object(o.n)(a.h)}),m=Object(o.r)(u,{Format:Object(o.j)(a.h)}),v=Object(o.r)(u,{Name:Object(o.n)(a.h),Title:Object(o.n)(a.h),Abstract:Object(o.n)(a.h),KeywordList:Object(o.n)(P),CRS:Object(o.m)(a.h),EX_GeographicBoundingBox:Object(o.n)(function(t,e){var n=Object(o.u)({},b,t,e);if(!n)return;var r=n.westBoundLongitude,i=n.southBoundLatitude,a=n.eastBoundLongitude,s=n.northBoundLatitude;if(void 0===r||void 0===i||void 0===a||void 0===s)return;return[r,i,a,s]}),BoundingBox:Object(o.m)(function(t,e){var n=[Object(a.e)(t.getAttribute("minx")),Object(a.e)(t.getAttribute("miny")),Object(a.e)(t.getAttribute("maxx")),Object(a.e)(t.getAttribute("maxy"))],r=[Object(a.e)(t.getAttribute("resx")),Object(a.e)(t.getAttribute("resy"))];return{crs:t.getAttribute("CRS"),extent:n,res:r}}),Dimension:Object(o.m)(function(t,e){return{name:t.getAttribute("name"),units:t.getAttribute("units"),unitSymbol:t.getAttribute("unitSymbol"),default:t.getAttribute("default"),multipleValues:Object(a.b)(t.getAttribute("multipleValues")),nearestValue:Object(a.b)(t.getAttribute("nearestValue")),current:Object(a.b)(t.getAttribute("current")),values:Object(a.h)(t)}}),Attribution:Object(o.n)(function(t,e){return Object(o.u)({},_,t,e)}),AuthorityURL:Object(o.m)(function(t,e){var n=j(t,e);if(n)return n.name=t.getAttribute("name"),n;return}),Identifier:Object(o.m)(a.h),MetadataURL:Object(o.m)(function(t,e){var n=j(t,e);if(n)return n.type=t.getAttribute("type"),n;return}),DataURL:Object(o.m)(j),FeatureListURL:Object(o.m)(j),Style:Object(o.m)(function(t,e){return Object(o.u)({},S,t,e)}),MinScaleDenominator:Object(o.n)(a.d),MaxScaleDenominator:Object(o.n)(a.d),Layer:Object(o.m)(I)}),_=Object(o.r)(u,{Title:Object(o.n)(a.h),OnlineResource:Object(o.n)(s.a),LogoURL:Object(o.n)(R)}),b=Object(o.r)(u,{westBoundLongitude:Object(o.n)(a.d),eastBoundLongitude:Object(o.n)(a.d),southBoundLatitude:Object(o.n)(a.d),northBoundLatitude:Object(o.n)(a.d)}),w=Object(o.r)(u,{GetCapabilities:Object(o.n)(L),GetMap:Object(o.n)(L),GetFeatureInfo:Object(o.n)(L)}),O=Object(o.r)(u,{Format:Object(o.m)(a.h),DCPType:Object(o.m)(function(t,e){return Object(o.u)({},x,t,e)})}),x=Object(o.r)(u,{HTTP:Object(o.n)(function(t,e){return Object(o.u)({},E,t,e)})}),E=Object(o.r)(u,{Get:Object(o.n)(j),Post:Object(o.n)(j)}),S=Object(o.r)(u,{Name:Object(o.n)(a.h),Title:Object(o.n)(a.h),Abstract:Object(o.n)(a.h),LegendURL:Object(o.m)(R),StyleSheetURL:Object(o.n)(j),StyleURL:Object(o.n)(j)}),C=Object(o.r)(u,{Format:Object(o.n)(a.h),OnlineResource:Object(o.n)(s.a)}),T=Object(o.r)(u,{Keyword:Object(o.j)(a.h)});function I(t,e){var n=e[e.length-1],r=Object(o.u)({},v,t,e);if(r){var i=Object(a.b)(t.getAttribute("queryable"));void 0===i&&(i=n.queryable),r.queryable=void 0!==i&&i;var s=Object(a.g)(t.getAttribute("cascaded"));void 0===s&&(s=n.cascaded),r.cascaded=s;var l=Object(a.b)(t.getAttribute("opaque"));void 0===l&&(l=n.opaque),r.opaque=void 0!==l&&l;var u=Object(a.b)(t.getAttribute("noSubsets"));void 0===u&&(u=n.noSubsets),r.noSubsets=void 0!==u&&u;var c=Object(a.e)(t.getAttribute("fixedWidth"));c||(c=n.fixedWidth),r.fixedWidth=c;var h=Object(a.e)(t.getAttribute("fixedHeight"));h||(h=n.fixedHeight),r.fixedHeight=h;["Style","CRS","AuthorityURL"].forEach(function(t){if(t in n){var e=r[t]||[];r[t]=e.concat(n[t])}});return["EX_GeographicBoundingBox","BoundingBox","Dimension","Attribution","MinScaleDenominator","MaxScaleDenominator"].forEach(function(t){if(!(t in r)){var e=n[t];r[t]=e}}),r}}function j(t,e){return Object(o.u)({},C,t,e)}function L(t,e){return Object(o.u)({},O,t,e)}function R(t,e){var n=j(t,e);if(n){var r=[Object(a.g)(t.getAttribute("width")),Object(a.g)(t.getAttribute("height"))];return n.size=r,n}}function P(t,e){return Object(o.u)([],T,t,e)}e.a=p},function(t,e,n){"use strict";var r,i=n(121),o=n(95),a=n(1),s=n(5),l=n(27),u=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),c=function(t){function e(e){var n=t.call(this)||this,r=e||{};return n.featureNS_="http://mapserver.gis.umn.edu/mapserver",n.gmlFormat_=new i.a,n.layers_=r.layers?r.layers:null,n}return u(e,t),e.prototype.getLayers=function(){return this.layers_},e.prototype.setLayers=function(t){this.layers_=t},e.prototype.readFeatures_=function(t,e){t.setAttribute("namespaceURI",this.featureNS_);var n=t.localName,r=[];if(0===t.childNodes.length)return r;if("msGMLOutput"==n)for(var i=0,o=t.childNodes.length;i<o;i++){var a=t.childNodes[i];if(a.nodeType===Node.ELEMENT_NODE){var u=a,c=e[0],h=u.localName.replace("_layer","");if(!this.layers_||Object(s.f)(this.layers_,h)){var p=h+"_feature";c.featureType=p,c.featureNS=this.featureNS_;var f={};f[p]=Object(l.j)(this.gmlFormat_.readFeatureElement,this.gmlFormat_);var d=Object(l.r)([c.featureNS,null],f);u.setAttribute("namespaceURI",this.featureNS_);var g=Object(l.u)([],d,u,e,this.gmlFormat_);g&&Object(s.c)(r,g)}}}if("FeatureCollection"==n){var y=Object(l.u)([],this.gmlFormat_.FEATURE_COLLECTION_PARSERS,t,[{}],this.gmlFormat_);y&&(r=y)}return r},e.prototype.readFeaturesFromNode=function(t,e){var n={};return e&&Object(a.a)(n,this.getReadOptions(t,e)),this.readFeatures_(t,[n])},e}(o.a);e.a=c},function(t,e,n){"use strict";var r,i=n(235),o=n(163),a=n(0),s=n(27),l=n(53),u=n(164),c=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),h=[null,"http://www.opengis.net/wmts/1.0"],p=[null,"http://www.opengis.net/ows/1.1"],f=Object(s.r)(h,{Contents:Object(s.n)(function(t,e){return Object(s.u)({},g,t,e)})}),d=function(t){function e(){var e=t.call(this)||this;return e.owsParser_=new i.a,e}return c(e,t),e.prototype.readFromNode=function(t){var e=t.getAttribute("version");e&&(e=e.trim());var n=this.owsParser_.readFromNode(t);return n?(n.version=e,(n=Object(s.u)(n,f,t,[]))||null):null},e}(o.a),g=Object(s.r)(h,{Layer:Object(s.m)(function(t,e){return Object(s.u)({},y,t,e)}),TileMatrixSet:Object(s.m)(function(t,e){return Object(s.u)({},x,t,e)})}),y=Object(s.r)(h,{Style:Object(s.m)(function(t,e){var n=Object(s.u)({},m,t,e);if(!n)return;var r="true"===t.getAttribute("isDefault");return n.isDefault=r,n}),Format:Object(s.m)(l.h),TileMatrixSetLink:Object(s.m)(function(t,e){return Object(s.u)({},v,t,e)}),Dimension:Object(s.m)(function(t,e){return Object(s.u)({},w,t,e)}),ResourceURL:Object(s.m)(function(t,e){var n=t.getAttribute("format"),r=t.getAttribute("template"),i=t.getAttribute("resourceType"),o={};n&&(o.format=n);r&&(o.template=r);i&&(o.resourceType=i);return o})},Object(s.r)(p,{Title:Object(s.n)(l.h),Abstract:Object(s.n)(l.h),WGS84BoundingBox:Object(s.n)(S),Identifier:Object(s.n)(l.h)})),m=Object(s.r)(h,{LegendURL:Object(s.m)(function(t,e){var n={};return n.format=t.getAttribute("format"),n.href=Object(u.a)(t),n})},Object(s.r)(p,{Title:Object(s.n)(l.h),Identifier:Object(s.n)(l.h)})),v=Object(s.r)(h,{TileMatrixSet:Object(s.n)(l.h),TileMatrixSetLimits:Object(s.n)(function(t,e){return Object(s.u)([],_,t,e)})}),_=Object(s.r)(h,{TileMatrixLimits:Object(s.j)(function(t,e){return Object(s.u)({},b,t,e)})}),b=Object(s.r)(h,{TileMatrix:Object(s.n)(l.h),MinTileRow:Object(s.n)(l.f),MaxTileRow:Object(s.n)(l.f),MinTileCol:Object(s.n)(l.f),MaxTileCol:Object(s.n)(l.f)}),w=Object(s.r)(h,{Default:Object(s.n)(l.h),Value:Object(s.m)(l.h)},Object(s.r)(p,{Identifier:Object(s.n)(l.h)})),O=Object(s.r)(p,{LowerCorner:Object(s.j)(C),UpperCorner:Object(s.j)(C)}),x=Object(s.r)(h,{WellKnownScaleSet:Object(s.n)(l.h),TileMatrix:Object(s.m)(function(t,e){return Object(s.u)({},E,t,e)})},Object(s.r)(p,{SupportedCRS:Object(s.n)(l.h),Identifier:Object(s.n)(l.h),BoundingBox:Object(s.n)(S)})),E=Object(s.r)(h,{TopLeftCorner:Object(s.n)(C),ScaleDenominator:Object(s.n)(l.d),TileWidth:Object(s.n)(l.f),TileHeight:Object(s.n)(l.f),MatrixWidth:Object(s.n)(l.f),MatrixHeight:Object(s.n)(l.f)},Object(s.r)(p,{Identifier:Object(s.n)(l.h)}));function S(t,e){var n=Object(s.u)([],O,t,e);if(2==n.length)return Object(a.boundingExtent)(n)}function C(t,e){var n=Object(l.h)(t).split(/\s+/);if(n&&2==n.length){var r=+n[0],i=+n[1];if(!isNaN(r)&&!isNaN(i))return[r,i]}}e.a=d},function(t,e,n){"use strict";var r,i=n(12),o=n(24),a=n(3),s=n(10),l=n(2),u=n(7),c=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),h={ACCURACY:"accuracy",ACCURACY_GEOMETRY:"accuracyGeometry",ALTITUDE:"altitude",ALTITUDE_ACCURACY:"altitudeAccuracy",HEADING:"heading",POSITION:"position",PROJECTION:"projection",SPEED:"speed",TRACKING:"tracking",TRACKING_OPTIONS:"trackingOptions"},p=function(t){function e(e){var n=t.call(this,a.a.ERROR)||this;return n.code=e.code,n.message=e.message,n}return c(e,t),e}(i.a);!function(t){function e(e){var n=t.call(this)||this;n.on,n.once,n.un;var r=e||{};return n.position_=null,n.transform_=l.identityTransform,n.watchId_=void 0,n.addChangeListener(h.PROJECTION,n.handleProjectionChanged_),n.addChangeListener(h.TRACKING,n.handleTrackingChanged_),void 0!==r.projection&&n.setProjection(r.projection),void 0!==r.trackingOptions&&n.setTrackingOptions(r.trackingOptions),n.setTracking(void 0!==r.tracking&&r.tracking),n}c(e,t),e.prototype.disposeInternal=function(){this.setTracking(!1),t.prototype.disposeInternal.call(this)},e.prototype.handleProjectionChanged_=function(){var t=this.getProjection();t&&(this.transform_=Object(l.getTransformFromProjections)(Object(l.get)("EPSG:4326"),t),this.position_&&this.set(h.POSITION,this.transform_(this.position_)))},e.prototype.handleTrackingChanged_=function(){if("geolocation"in navigator){var t=this.getTracking();t&&void 0===this.watchId_?this.watchId_=navigator.geolocation.watchPosition(this.positionChange_.bind(this),this.positionError_.bind(this),this.getTrackingOptions()):t||void 0===this.watchId_||(navigator.geolocation.clearWatch(this.watchId_),this.watchId_=void 0)}},e.prototype.positionChange_=function(t){var e=t.coords;this.set(h.ACCURACY,e.accuracy),this.set(h.ALTITUDE,null===e.altitude?void 0:e.altitude),this.set(h.ALTITUDE_ACCURACY,null===e.altitudeAccuracy?void 0:e.altitudeAccuracy),this.set(h.HEADING,null===e.heading?void 0:Object(u.j)(e.heading)),this.position_?(this.position_[0]=e.longitude,this.position_[1]=e.latitude):this.position_=[e.longitude,e.latitude];var n=this.transform_(this.position_);this.set(h.POSITION,n),this.set(h.SPEED,null===e.speed?void 0:e.speed);var r=Object(s.a)(this.position_,e.accuracy);r.applyTransform(this.transform_),this.set(h.ACCURACY_GEOMETRY,r),this.changed()},e.prototype.positionError_=function(t){this.dispatchEvent(new p(t))},e.prototype.getAccuracy=function(){return this.get(h.ACCURACY)},e.prototype.getAccuracyGeometry=function(){return this.get(h.ACCURACY_GEOMETRY)||null},e.prototype.getAltitude=function(){return this.get(h.ALTITUDE)},e.prototype.getAltitudeAccuracy=function(){return this.get(h.ALTITUDE_ACCURACY)},e.prototype.getHeading=function(){return this.get(h.HEADING)},e.prototype.getPosition=function(){return this.get(h.POSITION)},e.prototype.getProjection=function(){return this.get(h.PROJECTION)},e.prototype.getSpeed=function(){return this.get(h.SPEED)},e.prototype.getTracking=function(){return this.get(h.TRACKING)},e.prototype.getTrackingOptions=function(){return this.get(h.TRACKING_OPTIONS)},e.prototype.setProjection=function(t){this.set(h.PROJECTION,Object(l.get)(t))},e.prototype.setTracking=function(t){this.set(h.TRACKING,t)},e.prototype.setTrackingOptions=function(t){this.set(h.TRACKING_OPTIONS,t)}}(o.a)},function(t,e,n){"use strict";n.d(e,"a",function(){return c});var r=n(29);n(100);function i(t){"@babel/helpers - typeof";return(i="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function o(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function a(t,e,n){return(a="undefined"!==typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=s(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(n):i.value}})(t,e,n||t)}function s(t){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function l(t,e){return(l=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function u(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}var c=function(t){function e(t){var n;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=t||{},o=r.dragZoom,a=function(t){t.preventDefault(),t.stopPropagation(),(" "+f.className+" ").indexOf(" disabled ")>-1||(f.className+=" disabled",this.getMap().getView().setResolution(p))},s=r.tipLabel?r.tipLabel:"Previous view",l=r.label?r.label:"\u2190",c=document.createElement("span");c.innerHTML=l;var h=document.createElement("button");h.type="button",h.title=s,h.appendChild(c);var p=1,f=document.createElement("div");return f.className="ol-prevZoom ol-control ol-unselectable disabled",f.appendChild(h),n=function(t,e){if(e&&("object"===i(e)||"function"===typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return u(t)}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,{element:f,target:r.target})),o.on("boxstart",function(t){(" "+f.className+" ").indexOf(" disabled ")>-1&&(f.className=f.className.replace(/disabled/g,"")),p=this.getMap().getView().getResolution()}.bind(u(n))),h.addEventListener("click",a.bind(u(n)),!1),h.addEventListener("touchstart",a.bind(u(n)),!1),n}var n,s,c;return function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&l(t,e)}(e,r["Control"]),n=e,(s=[{key:"setMap",value:function(t){a(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"setMap",this).call(this,t)}}])&&o(n.prototype,s),c&&o(n,c),e}()},function(t,e,n){"use strict";var r=n(98);var i=6378137;function o(t){var e=0;if(t&&t.length>0){e+=Math.abs(a(t[0]));for(var n=1;n<t.length;n++)e-=Math.abs(a(t[n]))}return e}function a(t){var e,n,r,o,a,l,u=0,c=t.length;if(c>2){for(l=0;l<c;l++)l===c-2?(r=c-2,o=c-1,a=0):l===c-1?(r=c-1,o=0,a=1):(r=l,o=l+1,a=l+2),e=t[r],n=t[o],u+=(s(t[a][0])-s(e[0]))*Math.sin(s(n[1]));u=u*i*i/2}return u}function s(t){return t*Math.PI/180}e.a=function(t){return Object(r.d)(t,function(t,e){return t+function t(e){var n,r=0;switch(e.type){case"Polygon":return o(e.coordinates);case"MultiPolygon":for(n=0;n<e.coordinates.length;n++)r+=o(e.coordinates[n]);return r;case"Point":case"MultiPoint":case"LineString":case"MultiLineString":return 0;case"GeometryCollection":for(n=0;n<e.geometries.length;n++)r+=t(e.geometries[n]);return r}}(e)},0)}},function(t,e,n){"use strict";var r=n(240),i=n(374),o=n(98),a=n(59);function s(t,e,n){var r=e.x,i=e.y,o=n.x-r,a=n.y-i;if(0!==o||0!==a){var s=((t.x-r)*o+(t.y-i)*a)/(o*o+a*a);s>1?(r=n.x,i=n.y):s>0&&(r+=o*s,i+=a*s)}return(o=t.x-r)*o+(a=t.y-i)*a}function l(t,e){var n=t.length-1,r=[t[0]];return function t(e,n,r,i,o){for(var a,l=i,u=n+1;u<r;u++){var c=s(e[u],e[n],e[r]);c>l&&(a=u,l=c)}l>i&&(a-n>1&&t(e,n,a,i,o),o.push(e[a]),r-a>1&&t(e,a,r,i,o))}(t,0,n,e,r),r.push(t[n]),r}function u(t,e,n){if(t.length<=2)return t;var r=void 0!==e?e*e:1;return t=l(t=n?t:function(t,e){for(var n,r,i,o,a,s=t[0],l=[s],u=1,c=t.length;u<c;u++)n=t[u],i=s,o=(r=n).x-i.x,a=r.y-i.y,o*o+a*a>e&&(l.push(n),s=n);return s!==n&&l.push(n),l}(t,r),r)}function c(t,e,n){return u(t.map(function(t){return{x:t[0],y:t[1],z:t[2]}}),e,n).map(function(t){return t.z?[t.x,t.y,t.z]:[t.x,t.y]})}function h(t,e,n){return t.map(function(t){var r=t.map(function(t){return{x:t[0],y:t[1]}});if(r.length<4)throw new Error("invalid polygon");for(var i=u(r,e,n).map(function(t){return[t.x,t.y]});!p(i);)i=u(r,e-=.01*e,n).map(function(t){return[t.x,t.y]});return i[i.length-1][0]===i[0][0]&&i[i.length-1][1]===i[0][1]||i.push(i[0]),i})}function p(t){return!(t.length<3)&&!(3===t.length&&t[2][0]===t[0][0]&&t[2][1]===t[0][1])}e.a=function(t,e){if(e=e||{},!Object(a.c)(e))throw new Error("options is invalid");var n=void 0!==e.tolerance?e.tolerance:1,s=e.highQuality||!1,l=e.mutate||!1;if(!t)throw new Error("geojson is required");if(n&&n<0)throw new Error("invalid tolerance");return!0!==l&&(t=Object(i.a)(t)),Object(o.c)(t,function(t){!function(t,e,n){var i=t.type;if("Point"===i||"MultiPoint"===i)return t;Object(r.a)(t,!0);var o=t.coordinates;switch(i){case"LineString":t.coordinates=c(o,e,n);break;case"MultiLineString":t.coordinates=o.map(function(t){return c(t,e,n)});break;case"Polygon":t.coordinates=h(o,e,n);break;case"MultiPolygon":t.coordinates=o.map(function(t){return h(t,e,n)})}}(t,n,s)}),t}},function(t,e,n){"use strict";function r(t){"@babel/helpers - typeof";return(r="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t){var e={type:"Feature"};return Object.keys(t).forEach(function(n){switch(n){case"type":case"properties":case"geometry":return;default:e[n]=t[n]}}),e.properties=function t(e){var n={};if(!e)return n;Object.keys(e).forEach(function(i){var o=e[i];"object"===r(o)?null===o?n[i]=null:o.length?n[i]=o.map(function(t){return t}):n[i]=t(o):n[i]=o});return n}(t.properties),e.geometry=o(t.geometry),e}function o(t){var e={type:t.type};return t.bbox&&(e.bbox=t.bbox),"GeometryCollection"===t.type?(e.geometries=t.geometries.map(function(t){return o(t)}),e):(e.coordinates=function t(e){if("object"!==r(e[0]))return e.slice();return e.map(function(e){return t(e)})}(t.coordinates),e)}e.a=function(t){if(!t)throw new Error("geojson is required");switch(t.type){case"Feature":return i(t);case"FeatureCollection":return function(t){var e={type:"FeatureCollection"};return Object.keys(t).forEach(function(n){switch(n){case"type":case"features":return;default:e[n]=t[n]}}),e.features=t.features.map(function(t){return i(t)}),e}(t);case"Point":case"LineString":case"Polygon":case"MultiPoint":case"MultiLineString":case"MultiPolygon":case"GeometryCollection":return o(t);default:throw new Error("unknown GeoJSON type")}}},function(t,e,n){"use strict";n.d(e,"a",function(){return l});var r=n(29);function i(t){"@babel/helpers - typeof";return(i="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function o(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function a(t,e){return(a=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function s(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}var l=function(t){function e(t){var n;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=t||{},o=document.createElement("div");(n=function(t,e){if(e&&("object"===i(e)||"function"===typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return s(t)}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,{element:o,target:r.target}))).pmaViewport=r.pmaViewport,n.stateManager=r.stateManager?r.stateManager:null,n.stateManager?(n.stateManager.associatedImage||(n.stateManager.associatedImage={},n.stateManager.associatedImage.collapsed=!!r.collapsed&&r.collapsed),n.collapsed_=!0===n.stateManager.associatedImage.collapsed):n.collapsed_=!!r.collapsed&&r.collapsed;var a=r.className?r.className:"ol-associated-image",l=r.tipLabel?r.tipLabel:"Barcode",u=r.collapseLabel?r.collapseLabel:"\xab";n.collapseLabel_=document.createElement("span"),n.collapseLabel_.innerHTML=u;var c=r.label?r.label:"\xbb";n.label_=document.createElement("span"),n.label_.innerHTML=c;var h=n.collapsed_?n.collapseLabel_:n.label_,p=document.createElement("button");p.type="button",p.title=l,p.appendChild(h),"ontouchstart"in document.documentElement?p.addEventListener("touchstart",n.buttonClk.bind(s(n)),!1):p.addEventListener("click",n.buttonClk.bind(s(n)),!1),n.stateManager&&"number"===typeof n.stateManager.associatedImage.rotation?n.rotation=n.stateManager.associatedImage.rotation:n.rotation=t.rotation?t.rotation:0,n.imageType=t.imageType.toLowerCase();var f=document.createElement("img");f.src=n.getImageUrl();var d=document.createElement("div");d.className="ol-associated-image-container",d.appendChild(f);var g=a+" ol-unselectable ol-control "+(n.collapsed_?" ol-collapsed":"");function y(t){t.preventDefault(),t.stopPropagation(),this.rotation=(this.rotation+90)%360,this.stateManager&&(this.stateManager.associatedImage.rotation=this.rotation),f.src=this.getImageUrl()}o.className=g,o.appendChild(p),o.appendChild(d),"ontouchstart"in document.documentElement?f.addEventListener("touchstart",y.bind(s(n)),!1):f.addEventListener("click",y.bind(s(n)),!1),n.imageElement=f;var m=document.createElement("button");function v(){window.open(this.getImageUrl(),"_blank")}m.type="button",m.title="Rotate",m.className="size",m.innerHTML="\u2b6e","ontouchstart"in document.documentElement?m.addEventListener("touchstart",y.bind(s(n)),!1):m.addEventListener("click",y.bind(s(n)),!1),o.appendChild(m);var _=document.createElement("button");return _.type="button",_.title="zoom out",_.className="size",_.innerHTML="\u2315","ontouchstart"in document.documentElement?_.addEventListener("touchstart",v.bind(s(n)),!1):_.addEventListener("click",v.bind(s(n)),!1),o.appendChild(_),n}var n,l,u;return function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&a(t,e)}(e,r["Control"]),n=e,(l=[{key:"getImageUrl",value:function(){return this.pmaViewport.getActiveServerUrl()+this.imageType+"?sessionID="+encodeURIComponent(this.pmaViewport.getSessionID())+"&pathOrUid="+encodeURIComponent(this.pmaViewport.imageInfo.Filename)+"&rotation="+this.rotation}},{key:"setRotation",value:function(t){this.rotation=t,this.stateManager&&(this.stateManager.associatedImage.rotation=this.rotation),this.imageElement.src=this.getImageUrl()}},{key:"getRotation",value:function(){return this.rotation}},{key:"getCollapsed",value:function(){return(" "+this.element.className+" ").indexOf(" ol-collapsed ")>-1}},{key:"setCollapsed",value:function(t){this.getCollapsed()!=t&&this.buttonClk()}},{key:"buttonClk",value:function(t){t&&(t.preventDefault(),t.stopPropagation()),(" "+this.element.className+" ").indexOf(" ol-collapsed ")>-1?this.element.className=this.element.className.replace(/ol-collapsed/g,""):this.element.className+=" ol-collapsed",this.collapsed_?this.collapseLabel_.parentNode.replaceChild(this.label_,this.collapseLabel_):this.label_.parentNode.replaceChild(this.collapseLabel_,this.label_),this.collapsed_=!this.collapsed_,this.stateManager&&(this.stateManager.associatedImage.collapsed=this.collapsed_)}}])&&o(n.prototype,l),u&&o(n,u),e}()},function(t,e,n){"use strict";n.d(e,"a",function(){return s});var r=n(29);function i(t){"@babel/helpers - typeof";return(i="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function o(t,e){return(o=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function a(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}var s=function(t){function e(t){var n;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=t||{},o=document.createElement("div");(n=function(t,e){if(e&&("object"===i(e)||"function"===typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return a(t)}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,{element:o,target:r.target}))).pmaViewport=r.pmaViewport;var s=document.createElement("a");s.href="#",s.innerHTML=r.tipLabel?r.tipLabel:"Snapshot";var l=a(n),u=function(t){if(t.preventDefault(),l.pmaViewport){var e=l.pmaViewport.getSnapshotUrl(!1).url;window.open(e,"_blank")}};return s.addEventListener("click",u,!1),s.addEventListener("touchstart",u,!1),o.className="ol-snapshot ol-unselectable",o.appendChild(s),n}return function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&o(t,e)}(e,r["Control"]),e}()},function(t,e,n){"use strict";n.d(e,"a",function(){return l});var r=n(29);function i(t){"@babel/helpers - typeof";return(i="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function o(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function a(t,e){if(e&&("object"===i(e)||"function"===typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function s(t,e){return(s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var l=function(t){function e(t){var n;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=t||{},i=document.createElement("div");(n=a(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,{element:i,target:r.target}))).stateManager=r.stateManager?r.stateManager:null,n.stateManager?(n.stateManager.fileName||(n.stateManager.fileName={},n.stateManager.fileName.collapsed=!!r.collapsed&&r.collapsed),n.collapsed_=!0===n.stateManager.fileName.collapsed):n.collapsed_=!!r.collapsed&&r.collapsed;var o=r.collapseLabel?r.collapseLabel:"\xab";n.collapseLabel_=document.createElement("a"),n.collapseLabel_.href="#",n.collapseLabel_.innerHTML=o;var s=r.label?r.label:"\xbb";n.label_=document.createElement("a"),n.label_.href="#",n.label_.innerHTML=s;var l=document.createElement("a");l.href="#";var u=document.createElement("span");u.innerHTML=r.filename,l.appendChild(u);var c=function(t){t.preventDefault(),"function"===typeof r.onClick&&r.onClick()};return l.addEventListener("click",c,!1),l.addEventListener("touchstart",c,!1),i.className="ol-filename ol-unselectable"+(n.collapsed_?" ol-collapsed":""),i.appendChild(l),i.appendChild(n.collapseLabel_),i.appendChild(n.label_),n.handleCollapseClick=function(t){t&&t.preventDefault(),(" "+i.className+" ").indexOf(" ol-collapsed ")>-1?i.className=i.className.replace(/ol-collapsed/g,""):i.className+=" ol-collapsed"},n.collapseLabel_.addEventListener("click",n.handleCollapseClick,!1),n.collapseLabel_.addEventListener("touchstart",n.handleCollapseClick,!1),n.label_.addEventListener("click",n.handleCollapseClick,!1),n.label_.addEventListener("touchstart",n.handleCollapseClick,!1),n}var n,i,l;return function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&s(t,e)}(e,r["Control"]),n=e,(i=[{key:"getCollapsed",value:function(){return(" "+this.element.className+" ").indexOf(" ol-collapsed ")>-1}},{key:"setCollapsed",value:function(t){this.getCollapsed()!=t&&this.handleCollapseClick()}}])&&o(n.prototype,i),l&&o(n,l),e}()},function(t,e,n){"use strict";n.d(e,"a",function(){return d});var r=n(29),i=n(379),o=n.n(i),a=n(380),s=(n.n(a),n(19)),l=n(23);function u(t){"@babel/helpers - typeof";return(u="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function c(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function h(t,e){return(h=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function p(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}var f=[{step:1,class:"x1"},{step:.5,class:"x2"},{step:.2,class:"x3"},{step:.1,class:"x4"},{step:.05,class:"x5"}],d=function(t){function e(t){var n;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=t||{},i=document.createElement("div");(n=function(t,e){if(e&&("object"===u(e)||"function"===typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return p(t)}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,{element:i,target:r.target}))).pmaViewport=r.pmaViewport,n.stateManager=r.stateManager?r.stateManager:null,n.stateManager?(n.stateManager.dimensionSelector||(n.stateManager.dimensionSelector={},n.stateManager.dimensionSelector.collapsed=!!r.collapsed&&r.collapsed),n.collapsed_=!0===n.stateManager.dimensionSelector.collapsed):n.collapsed_=!!r.collapsed&&r.collapsed,n.sliders=[],n.slidersValues=[],n.currentStep=0;var o=r.className?r.className:"ol-dimension-selector";n.tipLabel=r.tipLabel?r.tipLabel:"Channels";var a=r.collapseLabel?r.collapseLabel:"\xbb";n.collapseLabel_=document.createElement("span"),n.collapseLabel_.innerHTML=a;var s=r.label?r.label:"\xab";n.label_=document.createElement("span"),n.label_.innerHTML=s;var l=n.collapsed_?n.collapseLabel_:n.label_,c=document.createElement("button");c.type="button",c.title=n.tipLabel,c.appendChild(l),c.className="collapse-button",c.style="float: left",n.btnEventUsed="click","ontouchstart"in document.documentElement&&(n.btnEventUsed="touchstart"),c.addEventListener(n.btnEventUsed,n.buttonClk.bind(p(n)),!1);var h=o+" ol-unselectable ol-control "+(n.collapsed_?" ol-collapsed":"");n.dimensionsDiv=document.createElement("div"),n.dimensionsDiv.className="ol-dimensions-container",n.renderDimensionsControl(),n.dimensionControlsDiv=document.createElement("div"),n.dimensionControlsDiv.className="ol-dimensions-container",n.renderSelectors(!0),i.className=h,n.dimensionsDiv&&""!==n.dimensionsDiv&&i.appendChild(n.dimensionsDiv),n.dimensionControlsDiv&&""!==n.dimensionControlsDiv&&i.appendChild(n.dimensionControlsDiv),i.appendChild(c);return"Decrease resolution",s='<i class="fa fa-minus" aria-hidden="true"></i>',document.createElement("span").innerHTML=s,n.lastSelection=-1,n.element.addEventListener("wheel",n.wheelEvent.bind(p(n)),!1),n}var n,i,a;return function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&h(t,e)}(e,r["Control"]),n=e,(i=[{key:"buttonClk",value:function(t){t&&(t.preventDefault(),t.stopPropagation()),(" "+this.element.className+" ").indexOf(" ol-collapsed ")>-1?this.element.className=this.element.className.replace(/ol-collapsed/g,""):this.element.className+=" ol-collapsed",this.pmaViewport.imageInfo.TimeFrames[0].Layers[0].Channels.length>1&&(this.collapsed_?this.collapseLabel_.parentNode.replaceChild(this.label_,this.collapseLabel_):this.label_.parentNode.replaceChild(this.collapseLabel_,this.label_)),this.collapsed_=!this.collapsed_,this.stateManager&&(this.stateManager.dimensionSelector.collapsed=this.collapsed_)}},{key:"getCollapsed",value:function(){return(" "+this.element.className+" ").indexOf(" ol-collapsed ")>-1}},{key:"setCollapsed",value:function(t){this.getCollapsed()!=t&&this.buttonClk()}},{key:"renderDimensionsControl",value:function(){function t(t){for(var e=[],n=this.dimensionsDiv.querySelectorAll(".ol-dimensions-container ul input[type='checkbox']"),r=0;r<n.length;r++)n[r].checked&&(e.push(r),this.lastSelection=r);0===e.length&&(n[this.lastSelection].checked=!0,e.push(this.lastSelection)),this.pmaViewport.setActiveChannels(e)}if(this.sliders=[],this.pmaViewport.imageInfo.TimeFrames[0].Layers[0].Channels.length>1){for(var e="<div id='channels'>"+this.tipLabel+"</div><div id='step'></div><ul>",n=0;n<this.pmaViewport.imageInfo.TimeFrames[0].Layers[0].Channels.length;n++){var r=this.pmaViewport.imageInfo.TimeFrames[0].Layers[0].Channels[n];if(e+="<li style='background-color: #"+r.Color.substr(2,6)+"'>",e+="<span class='channel-span'><label>"+r.Name+" <input type='checkbox' "+(r.Active?"checked='checked'":"")+" /></label></span>","Default"!==r.Name){var i="".concat(Object(s.c)(),"_slider");this.sliders.push(i),e+="<span class='slider-span' id='"+i+"'></span>"}e+="</li>"}e+="</ul>",this.sliders.length>0&&(e+="<div style='display: block; height: 25px;'>",e+="<button id='increaseButton' type='button' title='Increase resolution' style='float: right;'>",e+="<span><i class='fa fa-plus' aria-hidden='true'></i></span>",e+="</button>",e+="<button id='decreaseButton' type='button' title='Decrease resolution' style='float: right;'>",e+="<span><i class='fa fa-minus' aria-hidden='true'></i></span>",e+="</button>",e+="</div>"),this.dimensionsDiv.innerHTML=e;var o=this.dimensionsDiv.querySelectorAll(".ol-dimensions-container ul input[type='checkbox']");for(n=0;n<o.length;n++)o[n].addEventListener("change",t.bind(this),!1);if(this.sliders.length>0){var a=this;this.dimensionsDiv.querySelector("#increaseButton").addEventListener("click",function(){a.destroySliders(),a.renderDimensionsControl(),a.renderSelectors(!1),a.currentStep=a.currentStep<4?a.currentStep+1:a.currentStep,a.renderSliders(a.currentStep)},!1),this.dimensionsDiv.querySelector("#decreaseButton").addEventListener("click",function(){a.destroySliders(),a.renderDimensionsControl(),a.renderSelectors(!1),a.currentStep=a.currentStep>0?a.currentStep-1:a.currentStep,a.renderSliders(a.currentStep)},!1)}}}},{key:"renderSelectors",value:function(t){function e(t){"timeframe"==t.target.name?this.pmaViewport.setActiveTimeFrame(t.target.value):"zstack"==t.target.name&&this.pmaViewport.setActiveLayer(t.target.value),document.getElementById("zstackSlider")&&(document.getElementById("zstackLabel").innerHTML=l.a.translate("Z-stack: <br /> {stack} / {total}",{stack:this.pmaViewport.getActiveLayer()+1,total:this.pmaViewport.imageInfo.TimeFrames[this.pmaViewport.getActiveTimeFrame()].Layers.length})),document.getElementById("timeframeSlider")&&(document.getElementById("timeframeLabel").innerHTML=l.a.translate("Time frame: <br /> {frame} / {total}",{frame:this.pmaViewport.getActiveTimeFrame()+1,total:this.pmaViewport.imageInfo.TimeFrames.length}))}function n(t){var e=this.pmaViewport.getActiveTimeFrame(),n=this.pmaViewport.getActiveLayer();"prev-timeframe"==t.target.name?(--e<0&&(e=this.pmaViewport.imageInfo.TimeFrames.length-1),this.pmaViewport.setActiveTimeFrame(e)):"next-timeframe"==t.target.name?(++e>=this.pmaViewport.imageInfo.TimeFrames.length&&(e=0),this.pmaViewport.setActiveTimeFrame(e)):"prev-zstack"==t.target.name?(--n<0&&(n=this.pmaViewport.imageInfo.TimeFrames[e].Layers.length-1),this.pmaViewport.setActiveLayer(n)):"next-zstack"==t.target.name&&(++n>=this.pmaViewport.imageInfo.TimeFrames[e].Layers.length&&(n=0),this.pmaViewport.setActiveLayer(n)),document.getElementById("zstackSlider")&&(document.getElementById("zstackSlider").value=n,document.getElementById("zstackLabel").innerHTML=l.a.translate("Z-stack: <br /> {stack} / {total}",{stack:this.pmaViewport.getActiveLayer()+1,total:this.pmaViewport.imageInfo.TimeFrames[this.pmaViewport.getActiveTimeFrame()].Layers.length})),document.getElementById("timeframeSlider")&&(document.getElementById("timeframeSlider").value=e,document.getElementById("timeframeLabel").innerHTML=l.a.translate("Time frame: <br /> {frame} / {total}",{frame:this.pmaViewport.getActiveTimeFrame()+1,total:this.pmaViewport.imageInfo.TimeFrames.length}))}var r="";this.pmaViewport.imageInfo.TimeFrames.length>1&&(r+='<div id="timeframeLabel">'+l.a.translate("Time frame: <br /> {frame} / {total}",{frame:this.pmaViewport.getActiveTimeFrame()+1,total:this.pmaViewport.imageInfo.TimeFrames.length})+"</div>",r+="<button name='prev-timeframe' class='prev-next-button'>&lt;</button>",r+='<input type="range" min="0" max="'+(this.pmaViewport.imageInfo.TimeFrames.length-1)+'" value="'+this.pmaViewport.getActiveTimeFrame()+'" name="timeframe" id="timeframeSlider">',r+="<button name='next-timeframe' class='prev-next-button'>&gt;</button>");var i=this.pmaViewport.imageInfo.TimeFrames[this.pmaViewport.getActiveTimeFrame()];if(i.Layers.length>1){t&&this.pmaViewport.setActiveLayer(0|Math.round((i.Layers.length-1)/2));var o=this.pmaViewport.getActiveLayer();r+='<div id="zstackLabel">'+l.a.translate("Z-stack: <br /> {stack} / {total}",{stack:o+1,total:i.Layers.length})+"</div>",r+="<button name='prev-zstack' class='prev-next-button'>&lt;</button>",r+='<input type="range" min="0" max="'+(i.Layers.length-1)+'" value="'+o+'" name="zstack" id="zstackSlider">',r+="<button name='next-zstack' class='prev-next-button'>&gt;</button>"}if(""!==r){this.dimensionControlsDiv.innerHTML="<div>"+r+"</div>";for(var a=this.dimensionControlsDiv.querySelectorAll(".ol-dimensions-container input[type=range]"),s=0;s<a.length;s++)a[s].addEventListener("input",e.bind(this),!1);var u=this.dimensionControlsDiv.querySelectorAll(".ol-dimensions-container .prev-next-button");for(s=0;s<u.length;s++)u[s].addEventListener(this.btnEventUsed,n.bind(this),!1)}}},{key:"wheelEvent",value:function(t){if(t.preventDefault(),!((" "+this.element.className+" ").indexOf(" ol-collapsed ")>-1)){var e=this.pmaViewport.getActiveTimeFrame(),n=this.pmaViewport.getActiveLayer();t.deltaY&&t.deltaY<0?(--n<0&&(n=0),this.pmaViewport.setActiveLayer(n)):t.deltaY&&t.deltaY>0&&(++n>=this.pmaViewport.imageInfo.TimeFrames[e].Layers.length&&(n=this.pmaViewport.imageInfo.TimeFrames[e].Layers.length-1),this.pmaViewport.setActiveLayer(n)),document.getElementById("zstackSlider")&&(document.getElementById("zstackSlider").value=n,document.getElementById("zstackLabel").innerHTML=l.a.translate("Z-stack: <br /> {stack} / {total}",{stack:this.pmaViewport.getActiveLayer()+1,total:this.pmaViewport.imageInfo.TimeFrames[this.pmaViewport.getActiveTimeFrame()].Layers.length})),document.getElementById("timeframeSlider")&&(document.getElementById("timeframeSlider").value=e,document.getElementById("timeframeLabel").innerHTML=l.a.translate("Time frame: <br /> {frame} / {total}",{frame:this.pmaViewport.getActiveTimeFrame()+1,total:this.pmaViewport.imageInfo.TimeFrames.length}))}}},{key:"round",value:function(t,e){var n=Math.pow(10,e||0);return Math.round(t*n)/n}},{key:"renderSliders",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;if(0!==this.sliders.length)for(var e=this,n=0;n<this.sliders.length;n++){var r;r=this.slidersValues[n]?this.slidersValues[n]:[0,100];var i=document.getElementById(this.sliders[n]);f.forEach(function(t){i.parentElement.classList.remove(t.class)}),i.parentElement.classList.add(f[t].class),document.getElementById("step").innerText="Step: "+f[t].step,o.a.create(i,{start:r,tooltips:[!0,!0],step:f[t].step,connect:!0,margin:f[t].step,keyboardSupport:!0,range:{min:0,max:100},format:{to:function(t){return e.round(t,2).toFixed(2)},from:function(t){return e.round(t,2).toFixed(2)}}}),i.noUiSlider.channelIndex=n,i.noUiSlider.on("change",function(t){e.pmaViewport.setChannelRenderingOptions({index:this.channelIndex,clipping:t})})}}},{key:"destroySliders",value:function(){for(var t=0;t<this.sliders.length;t++){var e=document.getElementById(this.sliders[t]);this.slidersValues[t]=e.noUiSlider.get(),e.noUiSlider.destroy()}this.sliders=[]}}])&&c(n.prototype,i),a&&c(n,a),e}()},function(t,e,n){var r,i,o;function a(t){"@babel/helpers - typeof";return(a="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}i=[],void 0===(o="function"===typeof(r=function(){"use strict";var t="14.7.0";function e(t){t.parentElement.removeChild(t)}function n(t){return null!==t&&void 0!==t}function r(t){t.preventDefault()}function i(t){return"number"===typeof t&&!isNaN(t)&&isFinite(t)}function o(t,e,n){n>0&&(c(t,e),setTimeout(function(){h(t,e)},n))}function s(t){return Math.max(Math.min(t,100),0)}function l(t){return Array.isArray(t)?t:[t]}function u(t){var e=(t=String(t)).split(".");return e.length>1?e[1].length:0}function c(t,e){t.classList&&!/\s/.test(e)?t.classList.add(e):t.className+=" "+e}function h(t,e){t.classList&&!/\s/.test(e)?t.classList.remove(e):t.className=t.className.replace(new RegExp("(^|\\b)"+e.split(" ").join("|")+"(\\b|$)","gi")," ")}function p(t){var e=void 0!==window.pageXOffset,n="CSS1Compat"===(t.compatMode||"");return{x:e?window.pageXOffset:n?t.documentElement.scrollLeft:t.body.scrollLeft,y:e?window.pageYOffset:n?t.documentElement.scrollTop:t.body.scrollTop}}function f(t,e){return 100/(e-t)}function d(t,e,n){return 100*e/(t[n+1]-t[n])}function g(t,e){for(var n=1;t>=e[n];)n+=1;return n}function y(t,e,n){if(n>=t.slice(-1)[0])return 100;var r=g(n,t),i=t[r-1],o=t[r],a=e[r-1],s=e[r];return a+function(t,e){return d(t,t[0]<0?e+Math.abs(t[0]):e-t[0],0)}([i,o],n)/f(a,s)}function m(t,e,n,r){if(100===r)return r;var i=g(r,t),o=t[i-1],a=t[i];return n?r-o>(a-o)/2?a:o:e[i-1]?t[i-1]+function(t,e){return Math.round(t/e)*e}(r-t[i-1],e[i-1]):r}function v(e,n,r){var o;if("number"===typeof n&&(n=[n]),!Array.isArray(n))throw new Error("noUiSlider ("+t+"): 'range' contains invalid value.");if(!i(o="min"===e?0:"max"===e?100:parseFloat(e))||!i(n[0]))throw new Error("noUiSlider ("+t+"): 'range' value isn't numeric.");r.xPct.push(o),r.xVal.push(n[0]),o?r.xSteps.push(!isNaN(n[1])&&n[1]):isNaN(n[1])||(r.xSteps[0]=n[1]),r.xHighestCompleteStep.push(0)}function _(t,e,n){if(e)if(n.xVal[t]!==n.xVal[t+1]){n.xSteps[t]=d([n.xVal[t],n.xVal[t+1]],e,0)/f(n.xPct[t],n.xPct[t+1]);var r=(n.xVal[t+1]-n.xVal[t])/n.xNumSteps[t],i=Math.ceil(Number(r.toFixed(3))-1),o=n.xVal[t]+n.xNumSteps[t]*i;n.xHighestCompleteStep[t]=o}else n.xSteps[t]=n.xHighestCompleteStep[t]=n.xVal[t]}function b(t,e,n){var r;this.xPct=[],this.xVal=[],this.xSteps=[n||!1],this.xNumSteps=[!1],this.xHighestCompleteStep=[],this.snap=e;var i=[];for(r in t)t.hasOwnProperty(r)&&i.push([t[r],r]);for(i.length&&"object"===a(i[0][0])?i.sort(function(t,e){return t[0][0]-e[0][0]}):i.sort(function(t,e){return t[0]-e[0]}),r=0;r<i.length;r++)v(i[r][1],i[r][0],this);for(this.xNumSteps=this.xSteps.slice(0),r=0;r<this.xNumSteps.length;r++)_(r,this.xNumSteps[r],this)}b.prototype.getDistance=function(e){var n,r=[];for(n=0;n<this.xNumSteps.length-1;n++){var i=this.xNumSteps[n];if(i&&e/i%1!==0)throw new Error("noUiSlider ("+t+"): 'limit', 'margin' and 'padding' of "+this.xPct[n]+"% range must be divisible by step.");r[n]=d(this.xVal,e,n)}return r},b.prototype.getAbsoluteDistance=function(t,e,n){var r,i=0;if(t<this.xPct[this.xPct.length-1])for(;t>this.xPct[i+1];)i++;else t===this.xPct[this.xPct.length-1]&&(i=this.xPct.length-2);n||t!==this.xPct[i+1]||i++;var o=1,a=e[i],s=0,l=0,u=0,c=0;for(r=n?(t-this.xPct[i])/(this.xPct[i+1]-this.xPct[i]):(this.xPct[i+1]-t)/(this.xPct[i+1]-this.xPct[i]);a>0;)s=this.xPct[i+1+c]-this.xPct[i+c],e[i+c]*o+100-100*r>100?(l=s*r,o=(a-100*r)/e[i+c],r=1):(l=e[i+c]*s/100*o,o=0),n?(u-=l,this.xPct.length+c>=1&&c--):(u+=l,this.xPct.length-c>=1&&c++),a=e[i+c]*o;return t+u},b.prototype.toStepping=function(t){return t=y(this.xVal,this.xPct,t)},b.prototype.fromStepping=function(t){return function(t,e,n){if(n>=100)return t.slice(-1)[0];var r=g(n,e),i=t[r-1],o=t[r],a=e[r-1];return function(t,e){return e*(t[1]-t[0])/100+t[0]}([i,o],(n-a)*f(a,e[r]))}(this.xVal,this.xPct,t)},b.prototype.getStep=function(t){return t=m(this.xPct,this.xSteps,this.snap,t)},b.prototype.getDefaultStep=function(t,e,n){var r=g(t,this.xPct);return(100===t||e&&t===this.xPct[r-1])&&(r=Math.max(r-1,1)),(this.xVal[r]-this.xVal[r-1])/n},b.prototype.getNearbySteps=function(t){var e=g(t,this.xPct);return{stepBefore:{startValue:this.xVal[e-2],step:this.xNumSteps[e-2],highestStep:this.xHighestCompleteStep[e-2]},thisStep:{startValue:this.xVal[e-1],step:this.xNumSteps[e-1],highestStep:this.xHighestCompleteStep[e-1]},stepAfter:{startValue:this.xVal[e],step:this.xNumSteps[e],highestStep:this.xHighestCompleteStep[e]}}},b.prototype.countStepDecimals=function(){var t=this.xNumSteps.map(u);return Math.max.apply(null,t)},b.prototype.convert=function(t){return this.getStep(this.toStepping(t))};var w={to:function(t){return void 0!==t&&t.toFixed(2)},from:Number},O={target:"target",base:"base",origin:"origin",handle:"handle",handleLower:"handle-lower",handleUpper:"handle-upper",touchArea:"touch-area",horizontal:"horizontal",vertical:"vertical",background:"background",connect:"connect",connects:"connects",ltr:"ltr",rtl:"rtl",textDirectionLtr:"txt-dir-ltr",textDirectionRtl:"txt-dir-rtl",draggable:"draggable",drag:"state-drag",tap:"state-tap",active:"active",tooltip:"tooltip",pips:"pips",pipsHorizontal:"pips-horizontal",pipsVertical:"pips-vertical",marker:"marker",markerHorizontal:"marker-horizontal",markerVertical:"marker-vertical",markerNormal:"marker-normal",markerLarge:"marker-large",markerSub:"marker-sub",value:"value",valueHorizontal:"value-horizontal",valueVertical:"value-vertical",valueNormal:"value-normal",valueLarge:"value-large",valueSub:"value-sub"},x={tooltips:".__tooltips",aria:".__aria"};function E(e){if(function(t){return"object"===a(t)&&"function"===typeof t.to&&"function"===typeof t.from}(e))return!0;throw new Error("noUiSlider ("+t+"): 'format' requires 'to' and 'from' methods.")}function S(e,n){if(!i(n))throw new Error("noUiSlider ("+t+"): 'step' is not numeric.");e.singleStep=n}function C(e,n){if(!i(n))throw new Error("noUiSlider ("+t+"): 'keyboardPageMultiplier' is not numeric.");e.keyboardPageMultiplier=n}function T(e,n){if(!i(n))throw new Error("noUiSlider ("+t+"): 'keyboardDefaultStep' is not numeric.");e.keyboardDefaultStep=n}function I(e,n){if("object"!==a(n)||Array.isArray(n))throw new Error("noUiSlider ("+t+"): 'range' is not an object.");if(void 0===n.min||void 0===n.max)throw new Error("noUiSlider ("+t+"): Missing 'min' or 'max' in 'range'.");if(n.min===n.max)throw new Error("noUiSlider ("+t+"): 'range' 'min' and 'max' cannot be equal.");e.spectrum=new b(n,e.snap,e.singleStep)}function j(e,n){if(n=l(n),!Array.isArray(n)||!n.length)throw new Error("noUiSlider ("+t+"): 'start' option is incorrect.");e.handles=n.length,e.start=n}function L(e,n){if(e.snap=n,"boolean"!==typeof n)throw new Error("noUiSlider ("+t+"): 'snap' option must be a boolean.")}function R(e,n){if(e.animate=n,"boolean"!==typeof n)throw new Error("noUiSlider ("+t+"): 'animate' option must be a boolean.")}function P(e,n){if(e.animationDuration=n,"number"!==typeof n)throw new Error("noUiSlider ("+t+"): 'animationDuration' option must be a number.")}function N(e,n){var r,i=[!1];if("lower"===n?n=[!0,!1]:"upper"===n&&(n=[!1,!0]),!0===n||!1===n){for(r=1;r<e.handles;r++)i.push(n);i.push(!1)}else{if(!Array.isArray(n)||!n.length||n.length!==e.handles+1)throw new Error("noUiSlider ("+t+"): 'connect' option doesn't match handle count.");i=n}e.connect=i}function M(e,n){switch(n){case"horizontal":e.ort=0;break;case"vertical":e.ort=1;break;default:throw new Error("noUiSlider ("+t+"): 'orientation' option is invalid.")}}function A(e,n){if(!i(n))throw new Error("noUiSlider ("+t+"): 'margin' option must be numeric.");0!==n&&(e.margin=e.spectrum.getDistance(n))}function k(e,n){if(!i(n))throw new Error("noUiSlider ("+t+"): 'limit' option must be numeric.");if(e.limit=e.spectrum.getDistance(n),!e.limit||e.handles<2)throw new Error("noUiSlider ("+t+"): 'limit' option is only supported on linear sliders with 2 or more handles.")}function F(e,n){var r;if(!i(n)&&!Array.isArray(n))throw new Error("noUiSlider ("+t+"): 'padding' option must be numeric or array of exactly 2 numbers.");if(Array.isArray(n)&&2!==n.length&&!i(n[0])&&!i(n[1]))throw new Error("noUiSlider ("+t+"): 'padding' option must be numeric or array of exactly 2 numbers.");if(0!==n){for(Array.isArray(n)||(n=[n,n]),e.padding=[e.spectrum.getDistance(n[0]),e.spectrum.getDistance(n[1])],r=0;r<e.spectrum.xNumSteps.length-1;r++)if(e.padding[0][r]<0||e.padding[1][r]<0)throw new Error("noUiSlider ("+t+"): 'padding' option must be a positive number(s).");var o=n[0]+n[1],a=e.spectrum.xVal[0];if(o/(e.spectrum.xVal[e.spectrum.xVal.length-1]-a)>1)throw new Error("noUiSlider ("+t+"): 'padding' option must not exceed 100% of the range.")}}function D(e,n){switch(n){case"ltr":e.dir=0;break;case"rtl":e.dir=1;break;default:throw new Error("noUiSlider ("+t+"): 'direction' option was not recognized.")}}function G(e,n){if("string"!==typeof n)throw new Error("noUiSlider ("+t+"): 'behaviour' must be a string containing options.");var r=n.indexOf("tap")>=0,i=n.indexOf("drag")>=0,o=n.indexOf("fixed")>=0,a=n.indexOf("snap")>=0,s=n.indexOf("hover")>=0,l=n.indexOf("unconstrained")>=0;if(o){if(2!==e.handles)throw new Error("noUiSlider ("+t+"): 'fixed' behaviour must be used with 2 handles");A(e,e.start[1]-e.start[0])}if(l&&(e.margin||e.limit))throw new Error("noUiSlider ("+t+"): 'unconstrained' behaviour cannot be used with margin or limit");e.events={tap:r||a,drag:i,fixed:o,snap:a,hover:s,unconstrained:l}}function U(e,n){if(!1!==n)if(!0===n){e.tooltips=[];for(var r=0;r<e.handles;r++)e.tooltips.push(!0)}else{if(e.tooltips=l(n),e.tooltips.length!==e.handles)throw new Error("noUiSlider ("+t+"): must pass a formatter for all handles.");e.tooltips.forEach(function(e){if("boolean"!==typeof e&&("object"!==a(e)||"function"!==typeof e.to))throw new Error("noUiSlider ("+t+"): 'tooltips' must be passed a formatter or 'false'.")})}}function z(t,e){t.ariaFormat=e,E(e)}function B(t,e){t.format=e,E(e)}function V(e,n){if(e.keyboardSupport=n,"boolean"!==typeof n)throw new Error("noUiSlider ("+t+"): 'keyboardSupport' option must be a boolean.")}function Y(t,e){t.documentElement=e}function q(e,n){if("string"!==typeof n&&!1!==n)throw new Error("noUiSlider ("+t+"): 'cssPrefix' must be a string or `false`.");e.cssPrefix=n}function X(e,n){if("object"!==a(n))throw new Error("noUiSlider ("+t+"): 'cssClasses' must be an object.");if("string"===typeof e.cssPrefix)for(var r in e.cssClasses={},n)n.hasOwnProperty(r)&&(e.cssClasses[r]=e.cssPrefix+n[r]);else e.cssClasses=n}function W(e){var r={margin:0,limit:0,padding:0,animate:!0,animationDuration:300,ariaFormat:w,format:w},i={step:{r:!1,t:S},keyboardPageMultiplier:{r:!1,t:C},keyboardDefaultStep:{r:!1,t:T},start:{r:!0,t:j},connect:{r:!0,t:N},direction:{r:!0,t:D},snap:{r:!1,t:L},animate:{r:!1,t:R},animationDuration:{r:!1,t:P},range:{r:!0,t:I},orientation:{r:!1,t:M},margin:{r:!1,t:A},limit:{r:!1,t:k},padding:{r:!1,t:F},behaviour:{r:!0,t:G},ariaFormat:{r:!1,t:z},format:{r:!1,t:B},tooltips:{r:!1,t:U},keyboardSupport:{r:!0,t:V},documentElement:{r:!1,t:Y},cssPrefix:{r:!0,t:q},cssClasses:{r:!0,t:X}},o={connect:!1,direction:"ltr",behaviour:"tap",orientation:"horizontal",keyboardSupport:!0,cssPrefix:"noUi-",cssClasses:O,keyboardPageMultiplier:5,keyboardDefaultStep:10};e.format&&!e.ariaFormat&&(e.ariaFormat=e.format),Object.keys(i).forEach(function(a){if(!n(e[a])&&void 0===o[a]){if(i[a].r)throw new Error("noUiSlider ("+t+"): '"+a+"' is required.");return!0}i[a].t(r,n(e[a])?e[a]:o[a])}),r.pips=e.pips;var a=document.createElement("div"),s=void 0!==a.style.msTransform,l=void 0!==a.style.transform;r.transformRule=l?"transform":s?"msTransform":"webkitTransform";return r.style=[["left","top"],["right","bottom"]][r.dir][r.ort],r}function H(i,a,u){var f,d,g,y,m,v,_,b,w=window.navigator.pointerEnabled?{start:"pointerdown",move:"pointermove",end:"pointerup"}:window.navigator.msPointerEnabled?{start:"MSPointerDown",move:"MSPointerMove",end:"MSPointerUp"}:{start:"mousedown touchstart",move:"mousemove touchmove",end:"mouseup touchend"},O=window.CSS&&CSS.supports&&CSS.supports("touch-action","none")&&function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("test",null,e)}catch(t){}return t}(),E=i,S=a.spectrum,C=[],T=[],I=[],j=0,L={},R=i.ownerDocument,P=a.documentElement||R.documentElement,N=R.body,M=-1,A=0,k=1,F=2,D="rtl"===R.dir||1===a.ort?0:100;function G(t,e){var n=R.createElement("div");return e&&c(n,e),t.appendChild(n),n}function U(t,e){var n=G(t,a.cssClasses.origin),r=G(n,a.cssClasses.handle);return G(r,a.cssClasses.touchArea),r.setAttribute("data-handle",e),a.keyboardSupport&&(r.setAttribute("tabindex","0"),r.addEventListener("keydown",function(t){return function(t,e){if(V()||Y(e))return!1;var n=["Left","Right"],r=["Down","Up"],i=["PageDown","PageUp"],o=["Home","End"];a.dir&&!a.ort?n.reverse():a.ort&&!a.dir&&(r.reverse(),i.reverse());var s,l=t.key.replace("Arrow",""),u=l===i[0],c=l===i[1],h=l===r[0]||l===n[0]||u,p=l===r[1]||l===n[1]||c,f=l===o[1];if(!h&&!p&&l!==o[0]&&!f)return!0;if(t.preventDefault(),p||h){var d=a.keyboardPageMultiplier,g=h?0:1,y=_t(e),m=y[g];if(null===m)return!1;!1===m&&(m=S.getDefaultStep(T[e],h,a.keyboardDefaultStep)),(c||u)&&(m*=d),m=Math.max(m,1e-7),m*=h?-1:1,s=C[e]+m}else s=f?a.spectrum.xVal[a.spectrum.xVal.length-1]:a.spectrum.xVal[0];return dt(e,S.toStepping(s),!0,!0),lt("slide",e),lt("update",e),lt("change",e),lt("set",e),!1}(t,e)})),r.setAttribute("role","slider"),r.setAttribute("aria-orientation",a.ort?"vertical":"horizontal"),0===e?c(r,a.cssClasses.handleLower):e===a.handles-1&&c(r,a.cssClasses.handleUpper),n}function z(t,e){return!!e&&G(t,a.cssClasses.connect)}function B(t,e){return!!a.tooltips[e]&&G(t.firstChild,a.cssClasses.tooltip)}function V(){return E.hasAttribute("disabled")}function Y(t){return d[t].hasAttribute("disabled")}function q(){m&&(st("update"+x.tooltips),m.forEach(function(t){t&&e(t)}),m=null)}function X(){q(),m=d.map(B),at("update"+x.tooltips,function(t,e,n){if(m[e]){var r=t[e];!0!==a.tooltips[e]&&(r=a.tooltips[e].to(n[e])),m[e].innerHTML=r}})}function H(t,e,n){var r=R.createElement("div"),i=[];i[A]=a.cssClasses.valueNormal,i[k]=a.cssClasses.valueLarge,i[F]=a.cssClasses.valueSub;var o=[];o[A]=a.cssClasses.markerNormal,o[k]=a.cssClasses.markerLarge,o[F]=a.cssClasses.markerSub;var s=[a.cssClasses.valueHorizontal,a.cssClasses.valueVertical],l=[a.cssClasses.markerHorizontal,a.cssClasses.markerVertical];function u(t,e){var n=e===a.cssClasses.value,r=n?i:o;return e+" "+(n?s:l)[a.ort]+" "+r[t]}return c(r,a.cssClasses.pips),c(r,0===a.ort?a.cssClasses.pipsHorizontal:a.cssClasses.pipsVertical),Object.keys(t).forEach(function(i){!function(t,i,o){if((o=e?e(i,o):o)!==M){var s=G(r,!1);s.className=u(o,a.cssClasses.marker),s.style[a.style]=t+"%",o>A&&((s=G(r,!1)).className=u(o,a.cssClasses.value),s.setAttribute("data-value",i),s.style[a.style]=t+"%",s.innerHTML=n.to(i))}}(i,t[i][0],t[i][1])}),r}function K(){y&&(e(y),y=null)}function Z(e){K();var n=e.mode,r=e.density||1,i=e.filter||!1,o=function(e,n,r){if("range"===e||"steps"===e)return S.xVal;if("count"===e){if(n<2)throw new Error("noUiSlider ("+t+"): 'values' (>= 2) required for mode 'count'.");var i=n-1,o=100/i;for(n=[];i--;)n[i]=i*o;n.push(100),e="positions"}return"positions"===e?n.map(function(t){return S.fromStepping(r?S.getStep(t):t)}):"values"===e?r?n.map(function(t){return S.fromStepping(S.getStep(S.toStepping(t)))}):n:void 0}(n,e.values||!1,e.stepped||!1),a=function(t,e,n){var r,i={},o=S.xVal[0],a=S.xVal[S.xVal.length-1],s=!1,l=!1,u=0;return r=n.slice().sort(function(t,e){return t-e}),(n=r.filter(function(t){return!this[t]&&(this[t]=!0)},{}))[0]!==o&&(n.unshift(o),s=!0),n[n.length-1]!==a&&(n.push(a),l=!0),n.forEach(function(r,o){var a,c,h,p,f,d,g,y,m,v,_=r,b=n[o+1],w="steps"===e;if(w&&(a=S.xNumSteps[o]),a||(a=b-_),!1!==_)for(void 0===b&&(b=_),a=Math.max(a,1e-7),c=_;c<=b;c=(c+a).toFixed(7)/1){for(y=(f=(p=S.toStepping(c))-u)/t,v=f/(m=Math.round(y)),h=1;h<=m;h+=1)i[(d=u+h*v).toFixed(5)]=[S.fromStepping(d),0];g=n.indexOf(c)>-1?k:w?F:A,!o&&s&&c!==b&&(g=0),c===b&&l||(i[p.toFixed(5)]=[c,g]),u=p}}),i}(r,n,o),s=e.format||{to:Math.round};return y=E.appendChild(H(a,i,s))}function J(){var t=f.getBoundingClientRect(),e="offset"+["Width","Height"][a.ort];return 0===a.ort?t.width||f[e]:t.height||f[e]}function $(t,e,n,r){var i=function(i){return!!(i=function(t,e,n){var r,i,o=0===t.type.indexOf("touch"),a=0===t.type.indexOf("mouse"),s=0===t.type.indexOf("pointer");0===t.type.indexOf("MSPointer")&&(s=!0);if("mousedown"===t.type&&!t.buttons&&!t.touches)return!1;if(o){var l=function(t){return t.target===n||n.contains(t.target)||t.target.shadowRoot&&t.target.shadowRoot.contains(n)};if("touchstart"===t.type){var u=Array.prototype.filter.call(t.touches,l);if(u.length>1)return!1;r=u[0].pageX,i=u[0].pageY}else{var c=Array.prototype.find.call(t.changedTouches,l);if(!c)return!1;r=c.pageX,i=c.pageY}}e=e||p(R),(a||s)&&(r=t.clientX+e.x,i=t.clientY+e.y);return t.pageOffset=e,t.points=[r,i],t.cursor=a||s,t}(i,r.pageOffset,r.target||e))&&(!(V()&&!r.doNotReject)&&(o=E,s=a.cssClasses.tap,!((o.classList?o.classList.contains(s):new RegExp("\\b"+s+"\\b").test(o.className))&&!r.doNotReject)&&(!(t===w.start&&void 0!==i.buttons&&i.buttons>1)&&((!r.hover||!i.buttons)&&(O||i.preventDefault(),i.calcPoint=i.points[a.ort],void n(i,r))))));var o,s},o=[];return t.split(" ").forEach(function(t){e.addEventListener(t,i,!!O&&{passive:!0}),o.push([t,i])}),o}function Q(t){var e,n,r,i,o,l,u=100*(t-(e=f,n=a.ort,r=e.getBoundingClientRect(),i=e.ownerDocument,o=i.documentElement,l=p(i),/webkit.*Chrome.*Mobile/i.test(navigator.userAgent)&&(l.x=0),n?r.top+l.y-o.clientTop:r.left+l.x-o.clientLeft))/J();return u=s(u),a.dir?100-u:u}function tt(t,e){"mouseout"===t.type&&"HTML"===t.target.nodeName&&null===t.relatedTarget&&nt(t,e)}function et(t,e){if(-1===navigator.appVersion.indexOf("MSIE 9")&&0===t.buttons&&0!==e.buttonsProperty)return nt(t,e);var n=(a.dir?-1:1)*(t.calcPoint-e.startCalcPoint);ht(n>0,100*n/e.baseSize,e.locations,e.handleNumbers)}function nt(t,e){e.handle&&(h(e.handle,a.cssClasses.active),j-=1),e.listeners.forEach(function(t){P.removeEventListener(t[0],t[1])}),0===j&&(h(E,a.cssClasses.drag),ft(),t.cursor&&(N.style.cursor="",N.removeEventListener("selectstart",r))),e.handleNumbers.forEach(function(t){lt("change",t),lt("set",t),lt("end",t)})}function rt(t,e){if(e.handleNumbers.some(Y))return!1;var n;1===e.handleNumbers.length&&(n=d[e.handleNumbers[0]].children[0],j+=1,c(n,a.cssClasses.active));t.stopPropagation();var i=[],o=$(w.move,P,et,{target:t.target,handle:n,listeners:i,startCalcPoint:t.calcPoint,baseSize:J(),pageOffset:t.pageOffset,handleNumbers:e.handleNumbers,buttonsProperty:t.buttons,locations:T.slice()}),s=$(w.end,P,nt,{target:t.target,handle:n,listeners:i,doNotReject:!0,handleNumbers:e.handleNumbers}),l=$("mouseout",P,tt,{target:t.target,handle:n,listeners:i,doNotReject:!0,handleNumbers:e.handleNumbers});i.push.apply(i,o.concat(s,l)),t.cursor&&(N.style.cursor=getComputedStyle(t.target).cursor,d.length>1&&c(E,a.cssClasses.drag),N.addEventListener("selectstart",r,!1)),e.handleNumbers.forEach(function(t){lt("start",t)})}function it(t){t.stopPropagation();var e=Q(t.calcPoint),n=function(t){var e=100,n=!1;return d.forEach(function(r,i){if(!Y(i)){var o=T[i],a=Math.abs(o-t);(a<e||a<=e&&t>o||100===a&&100===e)&&(n=i,e=a)}}),n}(e);if(!1===n)return!1;a.events.snap||o(E,a.cssClasses.tap,a.animationDuration),dt(n,e,!0,!0),ft(),lt("slide",n,!0),lt("update",n,!0),lt("change",n,!0),lt("set",n,!0),a.events.snap&&rt(t,{handleNumbers:[n]})}function ot(t){var e=Q(t.calcPoint),n=S.getStep(e),r=S.fromStepping(n);Object.keys(L).forEach(function(t){"hover"===t.split(".")[0]&&L[t].forEach(function(t){t.call(v,r)})})}function at(t,e){L[t]=L[t]||[],L[t].push(e),"update"===t.split(".")[0]&&d.forEach(function(t,e){lt("update",e)})}function st(t){var e=t&&t.split(".")[0],n=e?t.substring(e.length):t;Object.keys(L).forEach(function(t){var r=t.split(".")[0],i=t.substring(r.length);e&&e!==r||n&&n!==i||function(t){return t===x.aria||t===x.tooltips}(i)&&n!==i||delete L[t]})}function lt(t,e,n){Object.keys(L).forEach(function(r){var i=r.split(".")[0];t===i&&L[r].forEach(function(t){t.call(v,C.map(a.format.to),e,C.slice(),n||!1,T.slice(),v)})})}function ut(t,e,n,r,i,o){var l;return d.length>1&&!a.events.unconstrained&&(r&&e>0&&(l=S.getAbsoluteDistance(t[e-1],a.margin,0),n=Math.max(n,l)),i&&e<d.length-1&&(l=S.getAbsoluteDistance(t[e+1],a.margin,1),n=Math.min(n,l))),d.length>1&&a.limit&&(r&&e>0&&(l=S.getAbsoluteDistance(t[e-1],a.limit,0),n=Math.min(n,l)),i&&e<d.length-1&&(l=S.getAbsoluteDistance(t[e+1],a.limit,1),n=Math.max(n,l))),a.padding&&(0===e&&(l=S.getAbsoluteDistance(0,a.padding[0],0),n=Math.max(n,l)),e===d.length-1&&(l=S.getAbsoluteDistance(100,a.padding[1],1),n=Math.min(n,l))),!((n=s(n=S.getStep(n)))===t[e]&&!o)&&n}function ct(t,e){var n=a.ort;return(n?e:t)+", "+(n?t:e)}function ht(t,e,n,r){var i=n.slice(),o=[!t,t],a=[t,!t];r=r.slice(),t&&r.reverse(),r.length>1?r.forEach(function(t,n){var r=ut(i,t,i[t]+e,o[n],a[n],!1);!1===r?e=0:(e=r-i[t],i[t]=r)}):o=a=[!0];var s=!1;r.forEach(function(t,r){s=dt(t,n[t]+e,o[r],a[r])||s}),s&&r.forEach(function(t){lt("update",t),lt("slide",t)})}function pt(t,e){return a.dir?100-t-e:t}function ft(){I.forEach(function(t){var e=T[t]>50?-1:1,n=3+(d.length+e*t);d[t].style.zIndex=n})}function dt(t,e,n,r,i){return i||(e=ut(T,t,e,n,r,!1)),!1!==e&&(function(t,e){T[t]=e,C[t]=S.fromStepping(e);var n="translate("+ct(10*(pt(e,0)-D)+"%","0")+")";d[t].style[a.transformRule]=n,gt(t),gt(t+1)}(t,e),!0)}function gt(t){if(g[t]){var e=0,n=100;0!==t&&(e=T[t-1]),t!==g.length-1&&(n=T[t]);var r=n-e,i="translate("+ct(pt(e,r)+"%","0")+")",o="scale("+ct(r/100,"1")+")";g[t].style[a.transformRule]=i+" "+o}}function yt(t,e){return null===t||!1===t||void 0===t?T[e]:("number"===typeof t&&(t=String(t)),t=a.format.from(t),!1===(t=S.toStepping(t))||isNaN(t)?T[e]:t)}function mt(t,e,n){var r=l(t),i=void 0===T[0];e=void 0===e||!!e,a.animate&&!i&&o(E,a.cssClasses.tap,a.animationDuration),I.forEach(function(t){dt(t,yt(r[t],t),!0,!1,n)});for(var s=1===I.length?0:1;s<I.length;++s)I.forEach(function(t){dt(t,T[t],!0,!0,n)});ft(),I.forEach(function(t){lt("update",t),null!==r[t]&&e&&lt("set",t)})}function vt(){var t=C.map(a.format.to);return 1===t.length?t[0]:t}function _t(t){var e=T[t],n=S.getNearbySteps(e),r=C[t],i=n.thisStep.step,o=null;if(a.snap)return[r-n.stepBefore.startValue||null,n.stepAfter.startValue-r||null];!1!==i&&r+i>n.stepAfter.startValue&&(i=n.stepAfter.startValue-r),o=r>n.thisStep.startValue?n.thisStep.step:!1!==n.stepBefore.step&&r-n.stepBefore.highestStep,100===e?i=null:0===e&&(o=null);var s=S.countStepDecimals();return null!==i&&!1!==i&&(i=Number(i.toFixed(s))),null!==o&&!1!==o&&(o=Number(o.toFixed(s))),[o,i]}return c(_=E,a.cssClasses.target),0===a.dir?c(_,a.cssClasses.ltr):c(_,a.cssClasses.rtl),0===a.ort?c(_,a.cssClasses.horizontal):c(_,a.cssClasses.vertical),c(_,"rtl"===getComputedStyle(_).direction?a.cssClasses.textDirectionRtl:a.cssClasses.textDirectionLtr),f=G(_,a.cssClasses.base),function(t,e){var n=G(e,a.cssClasses.connects);d=[],(g=[]).push(z(n,t[0]));for(var r=0;r<a.handles;r++)d.push(U(e,r)),I[r]=r,g.push(z(n,t[r+1]))}(a.connect,f),(b=a.events).fixed||d.forEach(function(t,e){$(w.start,t.children[0],rt,{handleNumbers:[e]})}),b.tap&&$(w.start,f,it,{}),b.hover&&$(w.move,f,ot,{hover:!0}),b.drag&&g.forEach(function(t,e){if(!1!==t&&0!==e&&e!==g.length-1){var n=d[e-1],r=d[e],i=[t];c(t,a.cssClasses.draggable),b.fixed&&(i.push(n.children[0]),i.push(r.children[0])),i.forEach(function(t){$(w.start,t,rt,{handles:[n,r],handleNumbers:[e-1,e]})})}}),mt(a.start),a.pips&&Z(a.pips),a.tooltips&&X(),st("update"+x.aria),at("update"+x.aria,function(t,e,n,r,i){I.forEach(function(t){var e=d[t],r=ut(T,t,0,!0,!0,!0),o=ut(T,t,100,!0,!0,!0),s=i[t],l=a.ariaFormat.to(n[t]);r=S.fromStepping(r).toFixed(1),o=S.fromStepping(o).toFixed(1),s=S.fromStepping(s).toFixed(1),e.children[0].setAttribute("aria-valuemin",r),e.children[0].setAttribute("aria-valuemax",o),e.children[0].setAttribute("aria-valuenow",s),e.children[0].setAttribute("aria-valuetext",l)})}),v={destroy:function(){for(var t in st(x.aria),st(x.tooltips),a.cssClasses)a.cssClasses.hasOwnProperty(t)&&h(E,a.cssClasses[t]);for(;E.firstChild;)E.removeChild(E.firstChild);delete E.noUiSlider},steps:function(){return I.map(_t)},on:at,off:st,get:vt,set:mt,setHandle:function(e,n,r,i){if(!((e=Number(e))>=0&&e<I.length))throw new Error("noUiSlider ("+t+"): invalid handle number, got: "+e);dt(e,yt(n,e),!0,!0,i),lt("update",e),r&&lt("set",e)},reset:function(t){mt(a.start,t)},__moveHandles:function(t,e,n){ht(t,e,T,n)},options:u,updateOptions:function(t,e){var r=vt(),i=["margin","limit","padding","range","animate","snap","step","format","pips","tooltips"];i.forEach(function(e){void 0!==t[e]&&(u[e]=t[e])});var o=W(u);i.forEach(function(e){void 0!==t[e]&&(a[e]=o[e])}),S=o.spectrum,a.margin=o.margin,a.limit=o.limit,a.padding=o.padding,a.pips?Z(a.pips):K(),a.tooltips?X():q(),T=[],mt(n(t.start)?t.start:r,e)},target:E,removePips:K,removeTooltips:q,getTooltips:function(){return m},getOrigins:function(){return d},pips:Z}}return{__spectrum:b,version:t,cssClasses:O,create:function(e,n){if(!e||!e.nodeName)throw new Error("noUiSlider ("+t+"): create requires a single element, got: "+e);if(e.noUiSlider)throw new Error("noUiSlider ("+t+"): Slider was already initialized.");var r=H(e,W(n),n);return e.noUiSlider=r,r}}})?r.apply(e,i):r)||(t.exports=o)},function(t,e){},function(t,e,n){"use strict";n.d(e,"a",function(){return s});var r=n(29);function i(t){"@babel/helpers - typeof";return(i="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function o(t,e){if(e&&("object"===i(e)||"function"===typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function a(t,e){return(a=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var s=function(t){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n=t||{},r=document.createElement("div");return r.className=(n.className||"ol-attr")+" ol-unselectable",r.innerHTML=n.html||"",o(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,{element:r,target:n.target}))}return function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&a(t,e)}(e,r["Control"]),e}()},function(t,e,n){"use strict";n.d(e,"a",function(){return h});var r=n(29),i=n(60);function o(t){"@babel/helpers - typeof";return(o="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function a(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function s(t,e,n){return(s="undefined"!==typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=l(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(n):i.value}})(t,e,n||t)}function l(t){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function u(t,e){return(u=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function c(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}var h=function(t){function e(t){var n;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=t||{},i=document.createElement("div");(n=function(t,e){if(e&&("object"===o(e)||"function"===typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return c(t)}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,{element:i,target:r.target}))).pmaViewport=r.pmaViewport,n.stateManager=r.stateManager?r.stateManager:null,n.stateManager?(n.stateManager.layerSwitch||(n.stateManager.layerSwitch={},n.stateManager.layerSwitch.collapsed=!!r.collapsed&&r.collapsed),n.collapsed_=!0===n.stateManager.layerSwitch.collapsed):n.collapsed_=!!r.collapsed&&r.collapsed;var a=r.className?r.className:"ol-layerswitch",s=r.tipLabel?r.tipLabel:"Channels",l=r.collapseLabel?r.collapseLabel:"\xbb";n.collapseLabel_=document.createElement("span"),n.collapseLabel_.innerHTML=l;var u=r.label?r.label:"\xab";n.label_=document.createElement("span"),n.label_.innerHTML=u;var h=n.collapsed_?n.collapseLabel_:n.label_,p=document.createElement("button");p.type="button",p.title=s,p.appendChild(h),p.className="collapse-button",n.btnEventUsed="click","ontouchstart"in document.documentElement&&(n.btnEventUsed="touchstart"),p.addEventListener(n.btnEventUsed,n.buttonClk.bind(c(n)),!1);var f=a+" ol-unselectable ol-control "+(n.collapsed_?" ol-collapsed":"");return i.className=f,i.appendChild(p),n.panel_=document.createElement("ul"),n.panel_.className="panel",i.appendChild(n.panel_),n}var n,l,h;return function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&u(t,e)}(e,r["Control"]),n=e,(l=[{key:"setMap",value:function(t){s(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"setMap",this).call(this,t),this.drawPanel()}},{key:"setLayersVisibility",value:function(t){if(t&&0!=t.length&&this.getMap())for(var e=this.getMap().getLayers().getArray(),n=0;n<t.length;n++){var r=t[n];if(r.name)for(var i=e.length-1;i>=0;i--)if(e[i].getLayers)for(var o=e[i].getLayers().getArray(),a=o.length-1;a>=0;a--){var s=o[a],l=s.get("title")||s.get("name");l==r.name&&(s.setVisible(r.visible),null!=r.opacity&&s.setOpacity(r.opacity));var u=this.panel_.querySelector("li[data-name='".concat(l,"']"));if(u)u.querySelector("input[type=checkbox]").checked=s.getVisible(),u.querySelector("input[type=range]").value=100*s.getOpacity()}}}},{key:"getLayersVisibility",value:function(){if(this.getMap()){for(var t=[],e=this.getMap().getLayers().getArray(),n=e.length-1;n>=0;n--)if(e[n].getLayers)for(var r=e[n].getLayers().getArray(),i=r.length-1;i>=0;i--){var o=r[i],a=o.get("title")||o.get("name");t.push({name:a,visible:o.getVisible(),opacity:o.getOpacity()})}return t}}},{key:"drawPanel",value:function(t){if(this.getMap()){var e=this.getMap().getLayers().getArray();this.panel_.innerHTML="";for(var n=e.length-1;n>=0;n--)if(e[n].getLayers)for(var r=e[n].getLayers().getArray(),o=r.length-1;o>=0;o--){var a=r[o],s=document.createElement("li");s.setAttribute("data-name",a.get("title")||a.get("name")),s.className=a.getVisible()?"visible ":" ",this.panel_.appendChild(s);var l="<input type='checkbox' "+(a.getVisible()?"checked='checked' ":"")+"/>";l+="<label title='"+(a.get("title")||a.get("name"))+"'>"+(a.get("title")||a.get("name"))+"</label>",l+='<input type="range" min="0" max="100" value="'+100*a.getOpacity()+'" name="layer-opacity" >',s.innerHTML=l;var u=s.querySelector("input[type=checkbox]");u.addEventListener("change",h.bind(this,a,u),!1),s.querySelector("label").addEventListener(this.btnEventUsed,h.bind(this,a,u),!1);var c=s.querySelector("input[type=range]");c.addEventListener("change",p.bind(this,a,c),!1)}}function h(t,e){t.setVisible(!t.getVisible()),e.checked=t.getVisible(),this.pmaViewport&&this.pmaViewport.fireEvent(i.g.AnnotationLayerChanged,this.pmaViewport)}function p(t,e){t.setOpacity(e.value/100),this.pmaViewport&&this.pmaViewport.fireEvent(i.g.AnnotationLayerChanged,this.pmaViewport)}}},{key:"getCollapsed",value:function(){return(" "+this.element.className+" ").indexOf(" ol-collapsed ")>-1}},{key:"setCollapsed",value:function(t){this.getCollapsed()!=t&&this.buttonClk()}},{key:"buttonClk",value:function(t){t&&(t.preventDefault(),t.stopPropagation()),(" "+this.element.className+" ").indexOf(" ol-collapsed ")>-1?this.element.className=this.element.className.replace(/ol-collapsed/g,""):this.element.className+=" ol-collapsed",this.collapsed_?this.collapseLabel_.parentNode.replaceChild(this.label_,this.collapseLabel_):this.label_.parentNode.replaceChild(this.collapseLabel_,this.label_),this.collapsed_=!this.collapsed_,this.stateManager&&(this.stateManager.layerSwitch.collapsed=this.collapsed_)}}])&&a(n.prototype,l),h&&a(n,h),e}()},function(t,e,n){"use strict";n.d(e,"a",function(){return u});var r=n(29),i=(n(100),n(23));function o(t){"@babel/helpers - typeof";return(o="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function a(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function s(t,e){return(s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function l(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}var u=function(t){function e(t){var n;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=t||{},a=(r.layer,r.viewer),s=document.createElement("div");(n=function(t,e){if(e&&("object"===o(e)||"function"===typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return l(t)}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,{element:s,target:r.target}))).brightness=0,n.contrast=1,n.gamma=1;var u=l(n);function c(){u.btnbicon.innerHTML=u.brightness.toFixed(0),u.btncicon.innerHTML=u.contrast.toFixed(2),u.btncicon.innerHTML=u.gamma.toFixed(2),a.setBrightnessContrastGamma(u.brightness,u.contrast,u.gamma),u.getMap().render()}return n.btnbplus=document.createElement("button"),n.btnbplus.className="ol-brightness-in",n.btnbplus.innerHTML="+",n.btnbicon=document.createElement("button"),n.btnbicon.className="ol-brightness-middle",n.btnbicon.innerHTML="0",n.btnbicon.title=i.a.translate("Adjust brightness"),n.btnbminus=document.createElement("button"),n.btnbminus.className="ol-brightness-out",n.btnbminus.innerHTML="-",n.btncplus=document.createElement("button"),n.btncplus.className="ol-contrast-in",n.btncplus.innerHTML="+",n.btncicon=document.createElement("button"),n.btncicon.className="ol-contrast-middle",n.btncicon.innerHTML="1.00",n.btncicon.title=i.a.translate("Adjust contrast"),n.btncminus=document.createElement("button"),n.btncminus.className="ol-contrast-out",n.btncminus.innerHTML="-",n.btngplus=document.createElement("button"),n.btngplus.className="ol-gamma-in",n.btngplus.innerHTML="+",n.btngicon=document.createElement("button"),n.btngicon.className="ol-gamma-middle",n.btngicon.innerHTML="1.00",n.btngicon.title=i.a.translate("Adjust gamma"),n.btngminus=document.createElement("button"),n.btngminus.className="ol-gamma-out",n.btngminus.innerHTML="-",n.btnbplus.addEventListener("click",function(){u.brightness+=10,c()},!1),n.btnbminus.addEventListener("click",function(){u.brightness-=10,c()},!1),n.btnbicon.addEventListener("click",function(){u.brightness=0,c()},!1),n.btncplus.addEventListener("click",function(){u.contrast+=.125,c()},!1),n.btncminus.addEventListener("click",function(){u.contrast-=.125,c()},!1),n.btncicon.addEventListener("click",function(){u.contrast=1,c()},!1),n.btngplus.addEventListener("click",function(){u.gamma+=.1,c()},!1),n.btngminus.addEventListener("click",function(){u.gamma-=.1,c()},!1),n.btngicon.addEventListener("click",function(){u.gamma=1,c()},!1),s.className="ol-brightness-contrast ol-unselectable ol-control",s.appendChild(n.btnbminus),s.appendChild(n.btnbicon),s.appendChild(n.btnbplus),s.appendChild(n.btncminus),s.appendChild(n.btncicon),s.appendChild(n.btncplus),s.appendChild(n.btngminus),s.appendChild(n.btngicon),s.appendChild(n.btngplus),n}var n,u,c;return function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&s(t,e)}(e,r["Control"]),n=e,(u=[{key:"update",value:function(t,e,n){this.brightness=t,this.contrast=e,this.gamma=n,this.btnbicon.innerHTML=this.brightness.toFixed(0),this.btncicon.innerHTML=this.contrast.toFixed(2),this.btngicon.innerHTML=this.gamma.toFixed(2)}}])&&a(n.prototype,u),c&&a(n,c),e}()},function(t,e,n){"use strict";n.d(e,"a",function(){return d});var r=n(29),i=n(84),o=n(154),a=n(25),s=n(93);function l(t){"@babel/helpers - typeof";return(l="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function u(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function c(t,e,n){return(c="undefined"!==typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=h(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(n):i.value}})(t,e,n||t)}function h(t){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function p(t,e){return(p=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function f(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}var d=function(t){function e(t){var n;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=t||{},i=document.createElement("div");if((n=function(t,e){if(e&&("object"===l(e)||"function"===typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return f(t)}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,{element:i,target:r.target}))).collapsed_=!1,!0===r.collapsed&&(n.collapsed_=!0),i.className="ol-control ",r.target)n.magnifierDiv=i;else{i.className+=" ol-magnifier",n.magnifierDiv=document.createElement("div"),n.magnifierDiv.className="magnifier-map-container",i.appendChild(n.magnifierDiv);var o=document.createElement("button");o.type="button",o.title="Enlarge",o.className="size",o.innerHTML="+","ontouchstart"in document.documentElement?o.addEventListener("touchstart",n.enlargeButtonClick.bind(f(n)),!1):o.addEventListener("click",n.enlargeButtonClick.bind(f(n)),!1),i.appendChild(o);var a=document.createElement("button");a.type="button",a.title="Shrink",a.className="size",a.innerHTML="-","ontouchstart"in document.documentElement?a.addEventListener("touchstart",n.shrinkButtonClick.bind(f(n)),!1):a.addEventListener("click",n.shrinkButtonClick.bind(f(n)),!1),i.appendChild(a)}return n.magnifierMap=null,n.mouseMoveFunc=null,n}var n,h,d;return function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&p(t,e)}(e,r["Control"]),n=e,(h=[{key:"handleMouseMove",value:function(t){if(!0!==this.getCollapsed()){var e=this.getMap(),n=e.getEventPixel(t),r=e.getCoordinateFromPixel(n);r&&this.magnifierMap.getView().setCenter(r)}}},{key:"getCollapsed",value:function(){return(" "+this.element.className+" ").indexOf(" ol-collapsed ")>-1}},{key:"setCollapsed",value:function(t){this.getCollapsed()!=t&&((" "+this.element.className+" ").indexOf(" ol-collapsed ")>-1?(this.element.className=this.element.className.replace(/ol-collapsed/g,""),this.magnifierMap&&this.magnifierMap.updateSize()):this.element.className+=" ol-collapsed"),this.collapsed_=t}},{key:"changeMagnifierSize",value:function(t){if(this.element){var e=Math.sqrt(this.element.clientHeight*this.element.clientHeight+this.element.clientWidth*this.element.clientWidth);if(e<60||e>600)return;this.element.style.width=this.element.clientWidth*t+"px",this.element.style.height=this.element.clientHeight*t+"px"}this.magnifierMap&&this.magnifierMap.updateSize()}},{key:"setMap",value:function(t){if(t){if(t!==this.getMap()){c(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"setMap",this).call(this,t);var n=t.getView(),r=new i.a({projection:n.getProjection(),center:n.getCenter(),extent:n.getProjection().getExtent(),maxResolution:1,minResolution:1,zoom:0}),l=t.getLayers().item(0);this.magnifierMap=new o.a({controls:new a.a,interactions:new a.a,target:this.magnifierDiv,view:r,layers:[new s.a({source:l.getSource()})]});var u=!1;this.magnifierMap.on("change:size",function(){u||(u=!0,this.magnifierMap.updateSize(),u=!1)}.bind(this)),this.mouseMoveFunc=this.handleMouseMove.bind(this),t.getViewport().addEventListener("mousemove",this.mouseMoveFunc),this.collapsed_!==this.getCollapsed()&&this.setCollapsed(this.collapsed_)}}else{if(this.magnifierMap){var h=this.element;h&&h.parentElement.removeChild(h)}this.getMap()&&this.mouseMoveFunc&&this.getMap().getViewport().removeEventListener("mousemove",this.mouseMoveFunc)}}},{key:"enlargeButtonClick",value:function(t){t&&(t.preventDefault(),t.stopPropagation()),this.changeMagnifierSize(1.25)}},{key:"shrinkButtonClick",value:function(t){t&&(t.preventDefault(),t.stopPropagation()),this.changeMagnifierSize(.75)}}])&&u(n.prototype,h),d&&u(n,d),e}()},function(t,e,n){"use strict";e.a=function(t){if(this.measureDraw)return;t="area"===t?"Polygon":"LineString",this.measureDraw=new r.a.interaction.Draw({source:this.measureLayer.getSource(),type:t,geometryFunction:null,style:new r.a.style.Style({fill:new r.a.style.Fill({color:"rgba(255, 255, 255, 0.2)"}),stroke:new r.a.style.Stroke({color:"rgba(0, 0, 0, 0.5)",lineDash:[10,10],width:2}),image:new r.a.style.Circle({radius:5,stroke:new r.a.style.Stroke({color:"rgba(0, 0, 0, 0.7)"}),fill:new r.a.style.Fill({color:"rgba(255, 255, 255, 0.2)"})})}),condition:a.j,freehandCondition:a.i}),this.map.addInteraction(this.measureDraw);var e,n,u=this,c=function(){var t=document.createElement("div");t.className="pma-ui-viewport-tooltip pma-ui-viewport-tooltip-measure";var e=new i.a({element:t,offset:[0,-15],positioning:"bottom-center",stopEvent:!1,insertFirst:!1});this.map.addOverlay(e),e.element=t,t.parentElement.style.display="block";var n=this;return Object(o.a)(t,"click",function(){n.map.removeOverlay(e),n.measureLayer.getSource().removeFeature(e.sketch),t.parentNode&&t.parentNode.removeChild(t),t=null}),e}.call(this);this.measureTooltips.push(c),this.measureDraw.on("drawstart",function(t){n=t.feature,c.sketch=n;var i=t.coordinate;e=n.getGeometry().on("change",function(t){var e,n=t.target;n instanceof r.a.geom.Polygon?(e=function(t){if(0===this.imageInfo.MicrometresPerPixelX)return t.getArea()+" px<sup>2</sup>";var e,n=t.getArea()*this.imageInfo.MicrometresPerPixelX*this.imageInfo.MicrometresPerPixelX;e=n>1e4?Math.round(10*n/1e6)/10+" mm<sup>2</sup>":Math.round(10*n)/10+" \u03bcm<sup>2</sup>";return e}.call(u,n),i=n.getInteriorPoint().getCoordinates()):n instanceof r.a.geom.LineString&&(e=function(t){if(0===this.imageInfo.MicrometresPerPixelX)return t.getLength()+" px";var e,n=t.getLength()*this.imageInfo.MicrometresPerPixelX;e=n>=1e3?Math.round(10*n/1e3)/10+" mm":Math.round(10*n)/10+" \u03bcm";return e}.call(u,n),i=n.getLastCoordinate()),c.element.innerHTML=e,c.setPosition(i)})},this),this.measureDraw.on("drawend",function(){c.element.className="pma-ui-viewport-tooltip pma-ui-viewport-tooltip-static",c.setOffset([0,-7]),c.sketch=n,n=null,Object(s.b)(e),setTimeout(function(){l.call(u)},100)},this)},e.b=l;var r=n(101),i=n(83),o=n(100),a=n(18),s=n(41);function l(t){if(this.measureDraw&&(this.map.removeInteraction(this.measureDraw),this.measureDraw=null),1==t)for(;this.measureTooltips.length>0;){var e=this.measureTooltips.pop();this.map.removeOverlay(e),this.measureLayer.getSource().removeFeature(e.sketch),e.element.parentNode&&e.element.parentNode.removeChild(e.element)}}},function(t,e,n){(function(n){var r,i,o;function a(t){"@babel/helpers - typeof";return(a="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}i=[],void 0===(o="function"===typeof(r=function(){"use strict";function e(t,e,n){var r=new XMLHttpRequest;r.open("GET",t),r.responseType="blob",r.onload=function(){l(r.response,e,n)},r.onerror=function(){console.error("could not download file")},r.send()}function r(t){var e=new XMLHttpRequest;e.open("HEAD",t,!1);try{e.send()}catch(t){}return 200<=e.status&&299>=e.status}function i(t){try{t.dispatchEvent(new MouseEvent("click"))}catch(n){var e=document.createEvent("MouseEvents");e.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),t.dispatchEvent(e)}}var o="object"==("undefined"===typeof window?"undefined":a(window))&&window.window===window?window:"object"==("undefined"===typeof self?"undefined":a(self))&&self.self===self?self:"object"==("undefined"===typeof n?"undefined":a(n))&&n.global===n?n:void 0,s=o.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),l=o.saveAs||("object"!=("undefined"===typeof window?"undefined":a(window))||window!==o?function(){}:"download"in HTMLAnchorElement.prototype&&!s?function(t,n,a){var s=o.URL||o.webkitURL,l=document.createElement("a");n=n||t.name||"download",l.download=n,l.rel="noopener","string"==typeof t?(l.href=t,l.origin===location.origin?i(l):r(l.href)?e(t,n,a):i(l,l.target="_blank")):(l.href=s.createObjectURL(t),setTimeout(function(){s.revokeObjectURL(l.href)},4e4),setTimeout(function(){i(l)},0))}:"msSaveOrOpenBlob"in navigator?function(t,n,o){if(n=n||t.name||"download","string"!=typeof t)navigator.msSaveOrOpenBlob(function(t,e){return"undefined"==typeof e?e={autoBom:!1}:"object"!=a(e)&&(console.warn("Deprecated: Expected third argument to be a object"),e={autoBom:!e}),e.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(t.type)?new Blob(["\ufeff",t],{type:t.type}):t}(t,o),n);else if(r(t))e(t,n,o);else{var s=document.createElement("a");s.href=t,s.target="_blank",setTimeout(function(){i(s)})}}:function(t,n,r,i){if((i=i||open("","_blank"))&&(i.document.title=i.document.body.innerText="downloading..."),"string"==typeof t)return e(t,n,r);var a="application/octet-stream"===t.type,l=/constructor/i.test(o.HTMLElement)||o.safari,u=/CriOS\/[\d]+/.test(navigator.userAgent);if((u||a&&l||s)&&"undefined"!=typeof FileReader){var c=new FileReader;c.onloadend=function(){var t=c.result;t=u?t:t.replace(/^data:[^;]*;/,"data:attachment/file;"),i?i.location.href=t:location=t,i=null},c.readAsDataURL(t)}else{var h=o.URL||o.webkitURL,p=h.createObjectURL(t);i?i.location=p:location.href=p,i=null,setTimeout(function(){h.revokeObjectURL(p)},4e4)}});o.saveAs=l.saveAs=l,"undefined"!=typeof t&&(t.exports=l)})?r.apply(e,i):r)||(t.exports=o)}).call(e,n(159))},function(t,e,n){"use strict";function r(t){var e=-1;i||(i=function(){for(var t=new Int32Array(256),e=0;e<256;e++){for(var n=e,r=0;r<8;r++)n=1&n?3988292384^n>>>1:n>>>1;t[e]=n}return t}());for(var n=0;n<t.length;n++)e=i[255&(e^t[n])]^e>>>8;return-1^e}var i;e.a=function(t,e){var n=t.slice(0,33);return new Promise(function(r,i){var o=new FileReader;o.onload=function(){var n=new Uint8Array(o.result),i=t.slice(33),a=h(n,e,t.type);r(new Blob([a,i],{type:t.type}))},o.readAsArrayBuffer(n)})};var o="image/png",a="image/jpeg",s="p".charCodeAt(0),l="H".charCodeAt(0),u="Y".charCodeAt(0),c="s".charCodeAt(0);function h(t,e,n,i){if(n===a)return t[13]=1,t[14]=e>>8,t[15]=255&e,t[16]=e>>8,t[17]=255&e,t;if(n===o){var h=new Uint8Array(13);e*=39.3701,h[0]=s,h[1]=l,h[2]=u,h[3]=c,h[4]=e>>>24,h[5]=e>>>16,h[6]=e>>>8,h[7]=255&e,h[8]=h[4],h[9]=h[5],h[10]=h[6],h[11]=h[7],h[12]=1;var p=r(h),f=new Uint8Array(4);if(f[0]=p>>>24,f[1]=p>>>16,f[2]=p>>>8,f[3]=255&p,i){var d=function(t){for(var e=t.length-1;e>=4;e--)if(9===t[e-4]&&t[e-3]===s&&t[e-2]===l&&t[e-1]===u&&t[e]===c)return e-3}(t);return t.set(h,d),t.set(f,d+13),t}var g=new Uint8Array(4);g[0]=0,g[1]=0,g[2]=0,g[3]=9;var y=new Uint8Array(54);return y.set(t,0),y.set(g,33),y.set(h,37),y.set(f,50),y}}},function(t,e,n){"use strict";n.d(e,"a",function(){return g});var r=n(23),i=n(242),o=n(19),a=n(32),s=n(46),l=n.n(s),u=n(168),c=(n.n(u),n(243)),h=(n.n(c),n(244)),p=(n.n(h),n(245));n.n(p);function f(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var d="http://127.0.0.1:54001/",g=function(){function t(e,n){if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),Object(o.b)()){if(this.element=n.element,"string"==typeof n.element){var i=document.querySelector(n.element);i?this.element=i:console.error("Invalid selector for element")}this.context=e,this.servers=n.servers||[];var s=this;this.navigating=!1,this.lastNavigatePathRequest=null,this.autoExpand=!0===n.autoExpandNodes,this.checkboxes=!0===n.checkboxes,this.lastSearchResults={},this.listeners={},this.listeners[a.c.DirectorySelected]=[],this.listeners[a.c.SlideSelected]=[],this.listeners[a.c.ServerSelected]=[],this.listeners[a.c.MultiSelectionChanged]=[],this.listeners[a.c.TreeNodeDoubleClicked]=[],this.listeners[a.c.ServerExpanded]=[],this.listeners[a.c.DirectoryExpanded]=[],this.listeners[a.c.SearchFinished]=[],this.listeners[a.c.SearchFailed]=[],this.lastSearchHash=0,this.previewEnabled=!1,"function"===typeof n.rootDirSortCb&&(this.rootDirSortCb=n.rootDirSortCb);for(var c=[],h=0;h<this.servers.length;h++)c.push({title:this.servers[h].name,serverNode:!0,key:this.servers[h].url,serverIndex:h,extraClasses:"server",dirPath:this.servers[h].path?this.servers[h].path:"/",lazy:!0,unselectableStatus:!1,unselectable:!0,selected:!1,checkbox:!1}),this.context.getVersionInfo(this.servers[h].url,v.bind(this,this.servers[h]));var p=null;if(!0===n.search){var f=n.searchClass?n.searchClass:"pma-ui-tree-search-box";p=l()("<input type='text' class='"+f+"' placeholder='"+r.a.translate("Search")+"'/><hr />").appendTo(this.element)}this.fancytree=Object(u.createTree)(this.element,{keyPathSeparator:"?",checkbox:!0===n.checkboxes,extensions:["dnd5"],dnd5:{dragStart:function(t,e){return!(!t.data.dirPath||t.data.serverNode)&&(t.data.dragging=!0,t.isActive&&t.setActive(!1),e.dataTransfer.setData("text",JSON.stringify({serverUrl:t.data.serverUrl,path:t.data.dirPath,isFolder:t.isFolder()})),!0)},dragEnd:function(t,e){t.data.dragging=!1}},selectMode:3,toggleEffect:{options:{direction:"left"},duration:400},wide:{iconWidth:"1em",iconSpacing:"0.5em",levelOfs:"1.5em"},icon:function(t,e){return"_searchResults"===e.node.key?e.node.data.searching?"fa fa-spinner fa-spin":"fa fa-search":!0===e.node.data.serverNode?"server":!0===e.node.data.rootDir?"rootdir":e.node.isFolder()?void 0:"image"},renderNode:"function"===typeof n.renderNode?n.renderNode:null,source:c,lazyLoad:function(t,e){var n=new l.a.Deferred;e.result=n.promise();var i=e.node,o="/"===i.data.dirPath?"":i.data.dirPath,a=this,s="/"===i.data.dirPath;this.context.getDirectories(a.servers[i.data.serverIndex].url,o,function(t,e){a.rootDirSortCb&&""===o&&(e=a.rootDirSortCb(e));for(var l=[],u=0;u<e.length;u++)l.push({title:e[u].split("/").pop(),lazy:!0,serverIndex:i.data.serverIndex,serverUrl:a.servers[i.data.serverIndex].url,dirPath:e[u],key:e[u],folder:!0,rootDir:s,extraClasses:s?"rootdir":"subdir",checkbox:a.checkboxes});!1!==a.servers[i.data.serverIndex].showFiles&&o&&""!==o?a.context.getSlides({serverUrl:a.servers[i.data.serverIndex].url,path:o,success:function(t,e){for(var r=0;r<e.length;r++)l.push({title:e[r].split("/").pop(),lazy:!1,serverIndex:i.data.serverIndex,dirPath:e[r],serverUrl:a.servers[i.data.serverIndex].url,key:e[r],folder:!1,extraClasses:"slide"});n.resolve(l)},failure:function(t){n.reject(t.Message?t.Message:r.a.translate("Error loading files"))}}):n.resolve(l)},function(t){n.reject(t.Message?t.Message:r.a.translate("Error loading directories"))})}.bind(this),activate:function(t,e){var n=e.node;"_searchResults"==n.key&&!0===s.autoExpand&&n.setExpanded(!0),setTimeout(function(){n.data&&!0===n.data.dragging?t.preventDefault():!0!==n.data.serverNode?"/"!==n.data.dirPath?n.isFolder()?(!0===s.autoExpand&&n.setExpanded(!0),s.fireEvent(a.c.DirectorySelected,{serverUrl:s.servers[n.data.serverIndex].url,path:n.data.dirPath})):s.servers[n.data.serverIndex]&&s.fireEvent(a.c.SlideSelected,{serverUrl:s.servers[n.data.serverIndex].url,path:n.data.dirPath}):!0===s.autoExpand&&n.setExpanded(!0):s.fireEvent(a.c.ServerSelected,{serverUrl:s.servers[n.data.serverIndex].url})},300)},select:function(t,e){var n=e.tree.getSelectedNodes(),r=[];if(n&&n.length>0)for(var i=0;i<n.length;i++)null===n[i]||!0===n[i].data.serverNode||!0===n[i].data.rootDir||n[i].isFolder()||r.push({serverUrl:s.servers[n[i].data.serverIndex].url,path:n[i].data.dirPath});s.fireEvent(a.c.MultiSelectionChanged,r)},expand:function(t,e){var n=e.node;setTimeout(function(){!0!==n.data.serverNode?"/"!==n.data.dirPath&&n.isFolder()&&s.fireEvent(a.c.DirectoryExpanded,{serverUrl:s.servers[n.data.serverIndex].url,path:n.data.dirPath}):s.fireEvent(a.c.ServerExpanded,{serverUrl:s.servers[n.data.serverIndex].url})},300)},dblclick:function(t,e){var n=e.node;s.fireEvent(a.c.TreeNodeDoubleClicked,{serverUrl:s.servers[n.data.serverIndex].url,path:n.data.dirPath,isSlide:!(!0===n.data.serverNode||!0===n.data.rootDir||n.isFolder())})}}),!0===n.preview&&w.call(this,this.fancytree),!0===n.autoDetectPmaStart&&this.addPmaStartServer(),!0===n.search&&l()(this.element).find(".ui-fancytree").addClass("ui-fancytree-search");var d=this,g=null,y=this.fancytree;p&&p.on("input propertychange paste",function(){var t=l()(this).val();if(t&&t.length>3)clearTimeout(g),g=setTimeout(function(){_.call(d,t)},500);else{var e=y.getNodeByKey("_searchResults");e&&e.remove()}})}}var e,n,s;return e=t,(n=[{key:"togglePreview",value:function(t){t&&!this.previewEnabled?w.call(this,l()(this.element)):!t&&this.previewEnabled&&function(t){this.previewEnabled&&(l()(this.element).off("mouseenter","span.fancytree-title"),l()(this.element).off("mouseleave","span.fancytree-title"),l()(this.element).off("mousemove","span.fancytree-title"),l()("#fancytree-preview").remove(),this.previewEnabled=!1)}.call(this,l()(this.element))}},{key:"addServer",value:function(t){if(t){this.servers.push(t);var e={title:this.servers[this.servers.length-1].name,serverNode:!0,key:this.servers[this.servers.length-1].url,serverIndex:this.servers.length-1,extraClasses:"server",dirPath:this.servers[this.servers.length-1].path?this.servers[this.servers.length-1].path:"/",lazy:!0,unselectableStatus:!1,unselectable:!0,selected:!1,checkbox:!1};this.context.getVersionInfo(t.url,v.bind(this,t)),this.fancytree.getRootNode().addChildren(e)}}},{key:"removeServer",value:function(t){var e=this.fancytree.getRootNode().getChildren();e&&e.length&&t>=0&&t<e.length?(e[t].data&&this.servers.splice(e[t].data.serverIndex,1),e[t].remove()):console.error("No children found or index out of range")}},{key:"removePmaStartServer",value:function(){for(var t=this.fancytree.getRootNode().getChildren(),e=0;e<t.length;e++)t[e].key==d&&this.removeServer(t[e].data.serverIndex)}},{key:"addPmaStartServer",value:function(t){for(var e=this,n=this.fancytree.getRootNode().getChildren(),o=0;o<n.length;o++)if(n[o].key==d)return;Object(a.f)({method:a.a.GetVersionInfo,httpMethod:"GET",data:{rnd:Math.random()},serverUrl:d,success:function(){new i.a(e.context,[{serverUrl:d,sessionId:"pma.core.lite"}]);e.addServer({name:r.a.translate("Computer"),url:d}),"function"===typeof t&&t.call(this,!0)},failure:function(){"function"===typeof t&&t.call(this,!1)}})}},{key:"getServers",value:function(){return this.servers}},{key:"getSelectedSlide",value:function(){var t=this.fancytree.getActiveNode();return null===t||!0===t.data.serverNode||!0===t.data.rootDir||t.isFolder()?null:{server:this.servers[t.data.serverIndex].url,path:t.data.dirPath}}},{key:"getSelectedDirectory",value:function(){var t=this.fancytree.getActiveNode();return null===t||!0!==t.data.rootDir&&!t.isFolder()?null:{server:this.servers[t.data.serverIndex].url,path:t.data.dirPath}}},{key:"getMultiSelection",value:function(){var t=this.fancytree.getSelectedNodes(),e=[];if(t&&t.length>0)for(var n=0;n<t.length;n++)null===t[n]||!0===t[n].data.serverNode||!0===t[n].data.rootDir||t[n].isFolder()||e.push({serverUrl:this.servers[t[n].data.serverIndex].url,path:t[n].data.dirPath});return e}},{key:"clearMultiSelection",value:function(){this.fancytree.selectAll(!1)}},{key:"navigateTo",value:function(t){var e=this;if(!e.navigating){e.navigating=!0;var n=this.fancytree,r=b.call(this,t,n);return n.loadKeyPath(r,function(t,n){"ok"===n&&(t.setActive(),t.scrollIntoView(),e.navigating=!1)}).done(function(){if(e.navigating=!1,e.lastNavigatePathRequest){var t=e.lastNavigatePathRequest;e.lastNavigatePathRequest=null,e.navigateTo(t)}})}e.lastNavigatePathRequest=t}},{key:"refresh",value:function(t){var e=this.fancytree,n=b.call(this,t,e);return e.loadKeyPath(n,function(t,e){"ok"===e&&t.resetLazy()})}},{key:"getSearchResults",value:function(){return this.lastSearchResults}},{key:"clearSearchResults",value:function(){var t=this.fancytree.getNodeByKey("_searchResults");t&&t.remove()}},{key:"search",value:function(t){return this.clearSearchResults(),_.call(this,t)}},{key:"listen",value:function(t,e){this.listeners.hasOwnProperty(t)||console.error(t+" is not a valid event"),this.listeners[t].push(e)}},{key:"fireEvent",value:function(t,e){if(this.listeners.hasOwnProperty(t))for(var n=0,r=this.listeners[t].length;n<r;n++)this.listeners[t][n].call(this,e);else console.error(t+" does not exist")}},{key:"getFilesVisibility",value:function(t){for(var e=this.fancytree.getRootNode().getChildren(),n=0;n<e.length;n++)if(e[n].key==t)for(var r=0;r<this.servers.length;r++)if(this.servers[r].url==e[n].key)return this.servers[r].showFiles}},{key:"setFilesVisibility",value:function(t,e){for(var n=this.fancytree.getRootNode().getChildren(),r=0;r<n.length;r++)if(n[r].key==t){for(var i=0;i<this.servers.length;i++)this.servers[i].url==n[r].key&&(this.servers[i].showFiles=e);n[r].resetLazy()}}},{key:"collapseAll",value:function(){for(var t=this.fancytree.getRootNode().getChildren(),e=0;e<t.length;e++)t[e].resetLazy()}},{key:"signOut",value:function(t){for(var e=this.fancytree.getRootNode().getChildren(),n=0;n<e.length;n++)e[n].key==t&&(e[n].resetLazy(),this.context.deAuthenticate(t))}}])&&f(e.prototype,n),s&&f(e,s),t}();function y(t,e,n,i,o){if(this.lastSearchHash===n){this.lastSearchResults[this.servers[e].name]=o;for(var s=t.addChildren({title:this.servers[e].name,serverNode:!0,key:"_searchServer_"+this.servers[e].url,serverIndex:e,dirPath:this.servers[e].path?this.servers[e].path:"/",lazy:!1,unselectableStatus:!1,unselectable:!0,selected:!1,checkbox:!1,resultCount:o.length}),u=l()(this.element).fancytree("getTree"),c=0;c<o.length;c++)for(var h=o[c].split("/"),p="",f=s,d=0;d<h.length;d++){p+=d>0?"/"+h[d]:h[d];var g=u.getNodeByKey("_searchResult_"+p,f);null==g?f=f.addChildren({title:p.split("/").pop(),lazy:!1,serverIndex:e,dirPath:p,key:"_searchResult_"+p,folder:d<h.length-1,rootDir:0==d,extraClasses:0==d?"rootdir":"subdir",checkbox:this.checkboxes,resultCount:1}):(f=g,g.data.resultCount+=1)}t.data.resultCount+=o.length,t.visit(function(e){e==t?e.setTitle(r.a.translate('Search results for "{pattern}" ({count})',{pattern:t.data.pattern,count:e.data.resultCount})):(e.isFolder()||e.data.serverNode)&&e==s&&e.setTitle(e.title+" ("+e.data.resultCount+")")},!0),t.data.serverDone++,t.data.serverDone>=t.data.serversSearched&&(t.data.searching=!1,t.renderTitle()),t.makeVisible(),t.setExpanded(!0),this.fireEvent(a.c.SearchFinished,this.lastSearchResults)}}function m(t,e,n){this.lastSearchHash===n&&(t.data.serverDone++,t.data.serverDone>=t.data.serversSearched&&(t.data.searching=!1,t.renderTitle()),this.fireEvent(a.c.SearchFailed,this.servers[e]))}function v(t,e){t.version=e}function _(t){this.lastSearchResults={};var e=l()(this.element).fancytree("getTree").getNodeByKey("_searchResults");if(null==e){var n={title:r.a.translate('Search results for "{pattern}"',{pattern:t}),key:"_searchResults",lazy:!1,selected:!1,checkbox:!1,resultCount:0,searching:!0,serverDone:0,serversSearched:0,pattern:t};e=this.fancytree.getRootNode().addChildren(n)}else e.resultCount=0,e.removeChildren(),e.data.searching=!0,e.data.serverDone=0,e.data.serversSearched=0,e.data.pattern=t,e.renderTitle();e.makeVisible(),e.setExpanded(!0);this.lastSearchHash=Math.random();for(var i=0;i<this.servers.length;i++)this.servers[i].version&&"1."!==this.servers[i].version.substring(0,"1.".length)&&(e.data.serversSearched++,this.context.queryFilename(this.servers[i].url,"",t,y.bind(this,e,i,this.lastSearchHash),m.bind(this,e,i,this.lastSearchHash)))}function b(t,e){var n=t.split("/").filter(function(t){return null!=t&&""!=t}),r="";if(n.length>0){for(var i=0;i<this.servers.length;i++)if(this.servers[i].name.toLowerCase()==n[0].toLowerCase()){n[0]=this.servers[i].url,r=this.servers[i].path?this.servers[i].path:"";break}for(r&&(n[1]=r+"/"+n[1]),i=2;i<n.length;i++)n[i]=n[i-1]+"/"+n[i]}return n=n.join(e.options.keyPathSeparator)}function w(t){if(!this.previewEnabled){var e=null,n=this;l()(this.element).on("mouseenter","span.fancytree-title",function(t){var r=l.a.ui.fancytree.getNode(t);if(null!==r&&!0!==r.data.serverNode&&!0!==r.data.rootDir&&!r.isFolder()&&void 0!==r.data.serverIndex){var i=n.servers[r.data.serverIndex].url;e=setTimeout(function(){n.context.getSession(i,function(e){var n=Object(a.i)(i,e,r.data.dirPath,0,150,0),o=l()("#fancytree-preview");o.length>0&&o.remove(),(o=l()("<p id='fancytree-preview' class='fancytree-preview'><i class='fa fa-spinner fa-spin'></i><img/></p>").appendTo("body")).css("position","absolute").css("top",t.pageY+-30+"px").css("left",t.pageX+100+"px").fadeIn("fast"),o.find("img").bind("load",function(){o.find("i").remove()}).attr("src",n)})},250)}}),l()(this.element).on("mouseleave","span.fancytree-title",function(t){l()("#fancytree-preview").remove(),e&&(clearTimeout(e),e=null)}),l()(this.element).on("mousemove","span.fancytree-title",function(t){var e=l()("#fancytree-preview");e.length>0&&e.css("top",t.pageY+-30+"px").css("left",t.pageX+100+"px")}),this.previewEnabled=!0}}},function(t,e,n){var r,i,o,a;a=function(t){t.ui=t.ui||{};t.ui.version="1.12.1";var e,n=0,r=Array.prototype.slice;t.cleanData=t.cleanData||(e=t.cleanData,function(n){var r,i,o;for(o=0;null!=(i=n[o]);o++)try{(r=t._data(i,"events"))&&r.remove&&t(i).triggerHandler("remove")}catch(t){}e(n)}),t.widget=t.widget||function(e,n,r){var i,o,a,s={},l=e.split(".")[0],u=l+"-"+(e=e.split(".")[1]);return r||(r=n,n=t.Widget),t.isArray(r)&&(r=t.extend.apply(null,[{}].concat(r))),t.expr[":"][u.toLowerCase()]=function(e){return!!t.data(e,u)},t[l]=t[l]||{},i=t[l][e],o=t[l][e]=function(t,e){if(!this._createWidget)return new o(t,e);arguments.length&&this._createWidget(t,e)},t.extend(o,i,{version:r.version,_proto:t.extend({},r),_childConstructors:[]}),(a=new n).options=t.widget.extend({},a.options),t.each(r,function(e,r){t.isFunction(r)?s[e]=function(){function t(){return n.prototype[e].apply(this,arguments)}function i(t){return n.prototype[e].apply(this,t)}return function(){var e,n=this._super,o=this._superApply;return this._super=t,this._superApply=i,e=r.apply(this,arguments),this._super=n,this._superApply=o,e}}():s[e]=r}),o.prototype=t.widget.extend(a,{widgetEventPrefix:i&&a.widgetEventPrefix||e},s,{constructor:o,namespace:l,widgetName:e,widgetFullName:u}),i?(t.each(i._childConstructors,function(e,n){var r=n.prototype;t.widget(r.namespace+"."+r.widgetName,o,n._proto)}),delete i._childConstructors):n._childConstructors.push(o),t.widget.bridge(e,o),o},t.widget.extend=function(e){for(var n,i,o=r.call(arguments,1),a=0,s=o.length;a<s;a++)for(n in o[a])i=o[a][n],o[a].hasOwnProperty(n)&&void 0!==i&&(t.isPlainObject(i)?e[n]=t.isPlainObject(e[n])?t.widget.extend({},e[n],i):t.widget.extend({},i):e[n]=i);return e},t.widget.bridge=function(e,n){var i=n.prototype.widgetFullName||e;t.fn[e]=function(o){var a="string"===typeof o,s=r.call(arguments,1),l=this;return a?this.length||"instance"!==o?this.each(function(){var n,r=t.data(this,i);return"instance"===o?(l=r,!1):r?t.isFunction(r[o])&&"_"!==o.charAt(0)?(n=r[o].apply(r,s))!==r&&void 0!==n?(l=n&&n.jquery?l.pushStack(n.get()):n,!1):void 0:t.error("no such method '"+o+"' for "+e+" widget instance"):t.error("cannot call methods on "+e+" prior to initialization; attempted to call method '"+o+"'")}):l=void 0:(s.length&&(o=t.widget.extend.apply(null,[o].concat(s))),this.each(function(){var e=t.data(this,i);e?(e.option(o||{}),e._init&&e._init()):t.data(this,i,new n(o,this))})),l}},t.Widget=t.Widget||function(){},t.Widget._childConstructors=[],t.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{classes:{},disabled:!1,create:null},_createWidget:function(e,r){r=t(r||this.defaultElement||this)[0],this.element=t(r),this.uuid=n++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=t(),this.hoverable=t(),this.focusable=t(),this.classesElementLookup={},r!==this&&(t.data(r,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===r&&this.destroy()}}),this.document=t(r.style?r.ownerDocument:r.document||r),this.window=t(this.document[0].defaultView||this.document[0].parentWindow)),this.options=t.widget.extend({},this.options,this._getCreateOptions(),e),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:t.noop,_create:t.noop,_init:t.noop,destroy:function(){var e=this;this._destroy(),t.each(this.classesElementLookup,function(t,n){e._removeClass(n,t)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:t.noop,widget:function(){return this.element},option:function(e,n){var r,i,o,a=e;if(0===arguments.length)return t.widget.extend({},this.options);if("string"===typeof e)if(a={},e=(r=e.split(".")).shift(),r.length){for(i=a[e]=t.widget.extend({},this.options[e]),o=0;o<r.length-1;o++)i[r[o]]=i[r[o]]||{},i=i[r[o]];if(e=r.pop(),1===arguments.length)return void 0===i[e]?null:i[e];i[e]=n}else{if(1===arguments.length)return void 0===this.options[e]?null:this.options[e];a[e]=n}return this._setOptions(a),this},_setOptions:function(t){var e;for(e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return"classes"===t&&this._setOptionClasses(e),this.options[t]=e,"disabled"===t&&this._setOptionDisabled(e),this},_setOptionClasses:function(e){var n,r,i;for(n in e)i=this.classesElementLookup[n],e[n]!==this.options.classes[n]&&i&&i.length&&(r=t(i.get()),this._removeClass(i,n),r.addClass(this._classes({element:r,keys:n,classes:e,add:!0})))},_setOptionDisabled:function(t){this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!!t),t&&(this._removeClass(this.hoverable,null,"ui-state-hover"),this._removeClass(this.focusable,null,"ui-state-focus"))},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_classes:function(e){var n=[],r=this;function i(i,o){var a,s;for(s=0;s<i.length;s++)a=r.classesElementLookup[i[s]]||t(),a=e.add?t(t.unique(a.get().concat(e.element.get()))):t(a.not(e.element).get()),r.classesElementLookup[i[s]]=a,n.push(i[s]),o&&e.classes[i[s]]&&n.push(e.classes[i[s]])}return e=t.extend({element:this.element,classes:this.options.classes||{}},e),this._on(e.element,{remove:"_untrackClassesElement"}),e.keys&&i(e.keys.match(/\S+/g)||[],!0),e.extra&&i(e.extra.match(/\S+/g)||[]),n.join(" ")},_untrackClassesElement:function(e){var n=this;t.each(n.classesElementLookup,function(r,i){-1!==t.inArray(e.target,i)&&(n.classesElementLookup[r]=t(i.not(e.target).get()))})},_removeClass:function(t,e,n){return this._toggleClass(t,e,n,!1)},_addClass:function(t,e,n){return this._toggleClass(t,e,n,!0)},_toggleClass:function(t,e,n,r){r="boolean"===typeof r?r:n;var i="string"===typeof t||null===t,o={extra:i?e:n,keys:i?t:e,element:i?this.element:t,add:r};return o.element.toggleClass(this._classes(o),r),this},_on:function(e,n,r){var i,o=this;"boolean"!==typeof e&&(r=n,n=e,e=!1),r?(n=i=t(n),this.bindings=this.bindings.add(n)):(r=n,n=this.element,i=this.widget()),t.each(r,function(r,a){function s(){if(e||!0!==o.options.disabled&&!t(this).hasClass("ui-state-disabled"))return("string"===typeof a?o[a]:a).apply(o,arguments)}"string"!==typeof a&&(s.guid=a.guid=a.guid||s.guid||t.guid++);var l=r.match(/^([\w:-]*)\s*(.*)$/),u=l[1]+o.eventNamespace,c=l[2];c?i.on(u,c,s):n.on(u,s)})},_off:function(e,n){n=(n||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,e.off(n).off(n),this.bindings=t(this.bindings.not(e).get()),this.focusable=t(this.focusable.not(e).get()),this.hoverable=t(this.hoverable.not(e).get())},_delay:function(t,e){var n=this;return setTimeout(function(){return("string"===typeof t?n[t]:t).apply(n,arguments)},e||0)},_hoverable:function(e){this.hoverable=this.hoverable.add(e),this._on(e,{mouseenter:function(e){this._addClass(t(e.currentTarget),null,"ui-state-hover")},mouseleave:function(e){this._removeClass(t(e.currentTarget),null,"ui-state-hover")}})},_focusable:function(e){this.focusable=this.focusable.add(e),this._on(e,{focusin:function(e){this._addClass(t(e.currentTarget),null,"ui-state-focus")},focusout:function(e){this._removeClass(t(e.currentTarget),null,"ui-state-focus")}})},_trigger:function(e,n,r){var i,o,a=this.options[e];if(r=r||{},(n=t.Event(n)).type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase(),n.target=this.element[0],o=n.originalEvent)for(i in o)i in n||(n[i]=o[i]);return this.element.trigger(n,r),!(t.isFunction(a)&&!1===a.apply(this.element[0],[n].concat(r))||n.isDefaultPrevented())}},t.each({show:"fadeIn",hide:"fadeOut"},function(e,n){t.Widget.prototype["_"+e]=function(r,i,o){var a;"string"===typeof i&&(i={effect:i});var s=i?!0===i||"number"===typeof i?n:i.effect||n:e;"number"===typeof(i=i||{})&&(i={duration:i}),a=!t.isEmptyObject(i),i.complete=o,i.delay&&r.delay(i.delay),a&&t.effects&&t.effects.effect[s]?r[e](i):s!==e&&r[s]?r[s](i.duration,i.easing,o):r.queue(function(n){t(this)[e](),o&&o.call(r[0]),n()})}});t.widget;!function(){var e,n=Math.max,r=Math.abs,i=/left|center|right/,o=/top|center|bottom/,a=/[\+\-]\d+(\.[\d]+)?%?/,s=/^\w+/,l=/%$/,u=t.fn.position;function c(t,e,n){return[parseFloat(t[0])*(l.test(t[0])?e/100:1),parseFloat(t[1])*(l.test(t[1])?n/100:1)]}function h(e,n){return parseInt(t.css(e,n),10)||0}t.position=t.position||{scrollbarWidth:function(){if(void 0!==e)return e;var n,r,i=t("<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),o=i.children()[0];return t("body").append(i),n=o.offsetWidth,i.css("overflow","scroll"),n===(r=o.offsetWidth)&&(r=i[0].clientWidth),i.remove(),e=n-r},getScrollInfo:function(e){var n=e.isWindow||e.isDocument?"":e.element.css("overflow-x"),r=e.isWindow||e.isDocument?"":e.element.css("overflow-y"),i="scroll"===n||"auto"===n&&e.width<e.element[0].scrollWidth;return{width:"scroll"===r||"auto"===r&&e.height<e.element[0].scrollHeight?t.position.scrollbarWidth():0,height:i?t.position.scrollbarWidth():0}},getWithinInfo:function(e){var n=t(e||window),r=t.isWindow(n[0]),i=!!n[0]&&9===n[0].nodeType;return{element:n,isWindow:r,isDocument:i,offset:!r&&!i?t(e).offset():{left:0,top:0},scrollLeft:n.scrollLeft(),scrollTop:n.scrollTop(),width:n.outerWidth(),height:n.outerHeight()}}},t.fn.position=function(e){if(!e||!e.of)return u.apply(this,arguments);e=t.extend({},e);var l,p,f,d,g,y,m,v,_=t(e.of),b=t.position.getWithinInfo(e.within),w=t.position.getScrollInfo(b),O=(e.collision||"flip").split(" "),x={};return y=9===(v=(m=_)[0]).nodeType?{width:m.width(),height:m.height(),offset:{top:0,left:0}}:t.isWindow(v)?{width:m.width(),height:m.height(),offset:{top:m.scrollTop(),left:m.scrollLeft()}}:v.preventDefault?{width:0,height:0,offset:{top:v.pageY,left:v.pageX}}:{width:m.outerWidth(),height:m.outerHeight(),offset:m.offset()},_[0].preventDefault&&(e.at="left top"),p=y.width,f=y.height,d=y.offset,g=t.extend({},d),t.each(["my","at"],function(){var t,n,r=(e[this]||"").split(" ");1===r.length&&(r=i.test(r[0])?r.concat(["center"]):o.test(r[0])?["center"].concat(r):["center","center"]),r[0]=i.test(r[0])?r[0]:"center",r[1]=o.test(r[1])?r[1]:"center",t=a.exec(r[0]),n=a.exec(r[1]),x[this]=[t?t[0]:0,n?n[0]:0],e[this]=[s.exec(r[0])[0],s.exec(r[1])[0]]}),1===O.length&&(O[1]=O[0]),"right"===e.at[0]?g.left+=p:"center"===e.at[0]&&(g.left+=p/2),"bottom"===e.at[1]?g.top+=f:"center"===e.at[1]&&(g.top+=f/2),l=c(x.at,p,f),g.left+=l[0],g.top+=l[1],this.each(function(){var i,o,a=t(this),s=a.outerWidth(),u=a.outerHeight(),y=h(this,"marginLeft"),m=h(this,"marginTop"),v=s+y+h(this,"marginRight")+w.width,E=u+m+h(this,"marginBottom")+w.height,S=t.extend({},g),C=c(x.my,a.outerWidth(),a.outerHeight());"right"===e.my[0]?S.left-=s:"center"===e.my[0]&&(S.left-=s/2),"bottom"===e.my[1]?S.top-=u:"center"===e.my[1]&&(S.top-=u/2),S.left+=C[0],S.top+=C[1],i={marginLeft:y,marginTop:m},t.each(["left","top"],function(n,r){t.ui.position[O[n]]&&t.ui.position[O[n]][r](S,{targetWidth:p,targetHeight:f,elemWidth:s,elemHeight:u,collisionPosition:i,collisionWidth:v,collisionHeight:E,offset:[l[0]+C[0],l[1]+C[1]],my:e.my,at:e.at,within:b,elem:a})}),e.using&&(o=function(t){var i=d.left-S.left,o=i+p-s,l=d.top-S.top,c=l+f-u,h={target:{element:_,left:d.left,top:d.top,width:p,height:f},element:{element:a,left:S.left,top:S.top,width:s,height:u},horizontal:o<0?"left":i>0?"right":"center",vertical:c<0?"top":l>0?"bottom":"middle"};p<s&&r(i+o)<p&&(h.horizontal="center"),f<u&&r(l+c)<f&&(h.vertical="middle"),n(r(i),r(o))>n(r(l),r(c))?h.important="horizontal":h.important="vertical",e.using.call(this,t,h)}),a.offset(t.extend(S,{using:o}))})},t.ui.position={fit:{left:function(t,e){var r,i=e.within,o=i.isWindow?i.scrollLeft:i.offset.left,a=i.width,s=t.left-e.collisionPosition.marginLeft,l=o-s,u=s+e.collisionWidth-a-o;e.collisionWidth>a?l>0&&u<=0?(r=t.left+l+e.collisionWidth-a-o,t.left+=l-r):t.left=u>0&&l<=0?o:l>u?o+a-e.collisionWidth:o:l>0?t.left+=l:u>0?t.left-=u:t.left=n(t.left-s,t.left)},top:function(t,e){var r,i=e.within,o=i.isWindow?i.scrollTop:i.offset.top,a=e.within.height,s=t.top-e.collisionPosition.marginTop,l=o-s,u=s+e.collisionHeight-a-o;e.collisionHeight>a?l>0&&u<=0?(r=t.top+l+e.collisionHeight-a-o,t.top+=l-r):t.top=u>0&&l<=0?o:l>u?o+a-e.collisionHeight:o:l>0?t.top+=l:u>0?t.top-=u:t.top=n(t.top-s,t.top)}},flip:{left:function(t,e){var n,i,o=e.within,a=o.offset.left+o.scrollLeft,s=o.width,l=o.isWindow?o.scrollLeft:o.offset.left,u=t.left-e.collisionPosition.marginLeft,c=u-l,h=u+e.collisionWidth-s-l,p="left"===e.my[0]?-e.elemWidth:"right"===e.my[0]?e.elemWidth:0,f="left"===e.at[0]?e.targetWidth:"right"===e.at[0]?-e.targetWidth:0,d=-2*e.offset[0];c<0?((n=t.left+p+f+d+e.collisionWidth-s-a)<0||n<r(c))&&(t.left+=p+f+d):h>0&&((i=t.left-e.collisionPosition.marginLeft+p+f+d-l)>0||r(i)<h)&&(t.left+=p+f+d)},top:function(t,e){var n,i,o=e.within,a=o.offset.top+o.scrollTop,s=o.height,l=o.isWindow?o.scrollTop:o.offset.top,u=t.top-e.collisionPosition.marginTop,c=u-l,h=u+e.collisionHeight-s-l,p="top"===e.my[1],f=p?-e.elemHeight:"bottom"===e.my[1]?e.elemHeight:0,d="top"===e.at[1]?e.targetHeight:"bottom"===e.at[1]?-e.targetHeight:0,g=-2*e.offset[1];c<0?((i=t.top+f+d+g+e.collisionHeight-s-a)<0||i<r(c))&&(t.top+=f+d+g):h>0&&((n=t.top-e.collisionPosition.marginTop+f+d+g-l)>0||r(n)<h)&&(t.top+=f+d+g)}},flipfit:{left:function(){t.ui.position.flip.left.apply(this,arguments),t.ui.position.fit.left.apply(this,arguments)},top:function(){t.ui.position.flip.top.apply(this,arguments),t.ui.position.fit.top.apply(this,arguments)}}}}();var i;t.ui.position,t.ui.keyCode={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38},t.fn.scrollParent=function(e){var n=this.css("position"),r="absolute"===n,i=e?/(auto|scroll|hidden)/:/(auto|scroll)/,o=this.parents().filter(function(){var e=t(this);return(!r||"static"!==e.css("position"))&&i.test(e.css("overflow")+e.css("overflow-y")+e.css("overflow-x"))}).eq(0);return"fixed"!==n&&o.length?o:t(this[0].ownerDocument||document)},t.fn.extend({uniqueId:(i=0,function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++i)})}),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&t(this).removeAttr("id")})}})},i=[n(46)],void 0===(o="function"===typeof(r=a)?r.apply(e,i):r)||(t.exports=o)},function(t,e,n){"use strict";n(19),n(32)},function(t,e,n){"use strict";n(19)},function(t,e,n){"use strict";n(23),n(19),n(32),n(393);var r=n(394),i=(n.n(r),n(46));n.n(i)},function(t,e,n){"use strict";function r(t){return getComputedStyle(t)}function i(t,e){for(var n in e){var r=e[n];"number"===typeof r&&(r+="px"),t.style[n]=r}return t}function o(t){var e=document.createElement("div");return e.className=t,e}var a="undefined"!==typeof Element&&(Element.prototype.matches||Element.prototype.webkitMatchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector);function s(t,e){if(!a)throw new Error("No element matching method supported");return a.call(t,e)}function l(t){t.remove?t.remove():t.parentNode&&t.parentNode.removeChild(t)}function u(t,e){return Array.prototype.filter.call(t.children,function(t){return s(t,e)})}var c={main:"ps",rtl:"ps__rtl",element:{thumb:function(t){return"ps__thumb-"+t},rail:function(t){return"ps__rail-"+t},consuming:"ps__child--consume"},state:{focus:"ps--focus",clicking:"ps--clicking",active:function(t){return"ps--active-"+t},scrolling:function(t){return"ps--scrolling-"+t}}},h={x:null,y:null};function p(t,e){var n=t.element.classList,r=c.state.scrolling(e);n.contains(r)?clearTimeout(h[e]):n.add(r)}function f(t,e){h[e]=setTimeout(function(){return t.isAlive&&t.element.classList.remove(c.state.scrolling(e))},t.settings.scrollingThreshold)}var d=function(t){this.element=t,this.handlers={}},g={isEmpty:{configurable:!0}};d.prototype.bind=function(t,e){"undefined"===typeof this.handlers[t]&&(this.handlers[t]=[]),this.handlers[t].push(e),this.element.addEventListener(t,e,!1)},d.prototype.unbind=function(t,e){var n=this;this.handlers[t]=this.handlers[t].filter(function(r){return!(!e||r===e)||(n.element.removeEventListener(t,r,!1),!1)})},d.prototype.unbindAll=function(){for(var t in this.handlers)this.unbind(t)},g.isEmpty.get=function(){var t=this;return Object.keys(this.handlers).every(function(e){return 0===t.handlers[e].length})},Object.defineProperties(d.prototype,g);var y=function(){this.eventElements=[]};function m(t){if("function"===typeof window.CustomEvent)return new CustomEvent(t);var e=document.createEvent("CustomEvent");return e.initCustomEvent(t,!1,!1,void 0),e}function v(t,e,n,r,i){var o;if(void 0===r&&(r=!0),void 0===i&&(i=!1),"top"===e)o=["contentHeight","containerHeight","scrollTop","y","up","down"];else{if("left"!==e)throw new Error("A proper axis should be provided");o=["contentWidth","containerWidth","scrollLeft","x","left","right"]}!function(t,e,n,r,i){var o=n[0],a=n[1],s=n[2],l=n[3],u=n[4],c=n[5];void 0===r&&(r=!0);void 0===i&&(i=!1);var h=t.element;t.reach[l]=null,h[s]<1&&(t.reach[l]="start");h[s]>t[o]-t[a]-1&&(t.reach[l]="end");e&&(h.dispatchEvent(m("ps-scroll-"+l)),e<0?h.dispatchEvent(m("ps-scroll-"+u)):e>0&&h.dispatchEvent(m("ps-scroll-"+c)),r&&function(t,e){p(t,e),f(t,e)}(t,l));t.reach[l]&&(e||i)&&h.dispatchEvent(m("ps-"+l+"-reach-"+t.reach[l]))}(t,n,o,r,i)}function _(t){return parseInt(t,10)||0}y.prototype.eventElement=function(t){var e=this.eventElements.filter(function(e){return e.element===t})[0];return e||(e=new d(t),this.eventElements.push(e)),e},y.prototype.bind=function(t,e,n){this.eventElement(t).bind(e,n)},y.prototype.unbind=function(t,e,n){var r=this.eventElement(t);r.unbind(e,n),r.isEmpty&&this.eventElements.splice(this.eventElements.indexOf(r),1)},y.prototype.unbindAll=function(){this.eventElements.forEach(function(t){return t.unbindAll()}),this.eventElements=[]},y.prototype.once=function(t,e,n){var r=this.eventElement(t);r.bind(e,function t(i){r.unbind(e,t),n(i)})};var b={isWebKit:"undefined"!==typeof document&&"WebkitAppearance"in document.documentElement.style,supportsTouch:"undefined"!==typeof window&&("ontouchstart"in window||"maxTouchPoints"in window.navigator&&window.navigator.maxTouchPoints>0||window.DocumentTouch&&document instanceof window.DocumentTouch),supportsIePointer:"undefined"!==typeof navigator&&navigator.msMaxTouchPoints,isChrome:"undefined"!==typeof navigator&&/Chrome/i.test(navigator&&navigator.userAgent)};function w(t){var e=t.element,n=Math.floor(e.scrollTop),r=e.getBoundingClientRect();t.containerWidth=Math.round(r.width),t.containerHeight=Math.round(r.height),t.contentWidth=e.scrollWidth,t.contentHeight=e.scrollHeight,e.contains(t.scrollbarXRail)||(u(e,c.element.rail("x")).forEach(function(t){return l(t)}),e.appendChild(t.scrollbarXRail)),e.contains(t.scrollbarYRail)||(u(e,c.element.rail("y")).forEach(function(t){return l(t)}),e.appendChild(t.scrollbarYRail)),!t.settings.suppressScrollX&&t.containerWidth+t.settings.scrollXMarginOffset<t.contentWidth?(t.scrollbarXActive=!0,t.railXWidth=t.containerWidth-t.railXMarginWidth,t.railXRatio=t.containerWidth/t.railXWidth,t.scrollbarXWidth=O(t,_(t.railXWidth*t.containerWidth/t.contentWidth)),t.scrollbarXLeft=_((t.negativeScrollAdjustment+e.scrollLeft)*(t.railXWidth-t.scrollbarXWidth)/(t.contentWidth-t.containerWidth))):t.scrollbarXActive=!1,!t.settings.suppressScrollY&&t.containerHeight+t.settings.scrollYMarginOffset<t.contentHeight?(t.scrollbarYActive=!0,t.railYHeight=t.containerHeight-t.railYMarginHeight,t.railYRatio=t.containerHeight/t.railYHeight,t.scrollbarYHeight=O(t,_(t.railYHeight*t.containerHeight/t.contentHeight)),t.scrollbarYTop=_(n*(t.railYHeight-t.scrollbarYHeight)/(t.contentHeight-t.containerHeight))):t.scrollbarYActive=!1,t.scrollbarXLeft>=t.railXWidth-t.scrollbarXWidth&&(t.scrollbarXLeft=t.railXWidth-t.scrollbarXWidth),t.scrollbarYTop>=t.railYHeight-t.scrollbarYHeight&&(t.scrollbarYTop=t.railYHeight-t.scrollbarYHeight),function(t,e){var n={width:e.railXWidth},r=Math.floor(t.scrollTop);e.isRtl?n.left=e.negativeScrollAdjustment+t.scrollLeft+e.containerWidth-e.contentWidth:n.left=t.scrollLeft;e.isScrollbarXUsingBottom?n.bottom=e.scrollbarXBottom-r:n.top=e.scrollbarXTop+r;i(e.scrollbarXRail,n);var o={top:r,height:e.railYHeight};e.isScrollbarYUsingRight?e.isRtl?o.right=e.contentWidth-(e.negativeScrollAdjustment+t.scrollLeft)-e.scrollbarYRight-e.scrollbarYOuterWidth-9:o.right=e.scrollbarYRight-t.scrollLeft:e.isRtl?o.left=e.negativeScrollAdjustment+t.scrollLeft+2*e.containerWidth-e.contentWidth-e.scrollbarYLeft-e.scrollbarYOuterWidth:o.left=e.scrollbarYLeft+t.scrollLeft;i(e.scrollbarYRail,o),i(e.scrollbarX,{left:e.scrollbarXLeft,width:e.scrollbarXWidth-e.railBorderXWidth}),i(e.scrollbarY,{top:e.scrollbarYTop,height:e.scrollbarYHeight-e.railBorderYWidth})}(e,t),t.scrollbarXActive?e.classList.add(c.state.active("x")):(e.classList.remove(c.state.active("x")),t.scrollbarXWidth=0,t.scrollbarXLeft=0,e.scrollLeft=!0===t.isRtl?t.contentWidth:0),t.scrollbarYActive?e.classList.add(c.state.active("y")):(e.classList.remove(c.state.active("y")),t.scrollbarYHeight=0,t.scrollbarYTop=0,e.scrollTop=0)}function O(t,e){return t.settings.minScrollbarLength&&(e=Math.max(e,t.settings.minScrollbarLength)),t.settings.maxScrollbarLength&&(e=Math.min(e,t.settings.maxScrollbarLength)),e}function x(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],l=e[6],u=e[7],h=e[8],d=t.element,g=null,y=null,m=null;function v(e){e.touches&&e.touches[0]&&(e[i]=e.touches[0].pageY),d[l]=g+m*(e[i]-y),p(t,u),w(t),e.stopPropagation(),e.preventDefault()}function _(){f(t,u),t[h].classList.remove(c.state.clicking),t.event.unbind(t.ownerDocument,"mousemove",v)}function b(e,a){g=d[l],a&&e.touches&&(e[i]=e.touches[0].pageY),y=e[i],m=(t[r]-t[n])/(t[o]-t[s]),a?t.event.bind(t.ownerDocument,"touchmove",v):(t.event.bind(t.ownerDocument,"mousemove",v),t.event.once(t.ownerDocument,"mouseup",_),e.preventDefault()),t[h].classList.add(c.state.clicking),e.stopPropagation()}t.event.bind(t[a],"mousedown",function(t){b(t)}),t.event.bind(t[a],"touchstart",function(t){b(t,!0)})}var E={"click-rail":function(t){t.element,t.event.bind(t.scrollbarY,"mousedown",function(t){return t.stopPropagation()}),t.event.bind(t.scrollbarYRail,"mousedown",function(e){var n=e.pageY-window.pageYOffset-t.scrollbarYRail.getBoundingClientRect().top>t.scrollbarYTop?1:-1;t.element.scrollTop+=n*t.containerHeight,w(t),e.stopPropagation()}),t.event.bind(t.scrollbarX,"mousedown",function(t){return t.stopPropagation()}),t.event.bind(t.scrollbarXRail,"mousedown",function(e){var n=e.pageX-window.pageXOffset-t.scrollbarXRail.getBoundingClientRect().left>t.scrollbarXLeft?1:-1;t.element.scrollLeft+=n*t.containerWidth,w(t),e.stopPropagation()})},"drag-thumb":function(t){x(t,["containerWidth","contentWidth","pageX","railXWidth","scrollbarX","scrollbarXWidth","scrollLeft","x","scrollbarXRail"]),x(t,["containerHeight","contentHeight","pageY","railYHeight","scrollbarY","scrollbarYHeight","scrollTop","y","scrollbarYRail"])},keyboard:function(t){var e=t.element;t.event.bind(t.ownerDocument,"keydown",function(n){if(!(n.isDefaultPrevented&&n.isDefaultPrevented()||n.defaultPrevented)&&(s(e,":hover")||s(t.scrollbarX,":focus")||s(t.scrollbarY,":focus"))){var r,i=document.activeElement?document.activeElement:t.ownerDocument.activeElement;if(i){if("IFRAME"===i.tagName)i=i.contentDocument.activeElement;else for(;i.shadowRoot;)i=i.shadowRoot.activeElement;if(s(r=i,"input,[contenteditable]")||s(r,"select,[contenteditable]")||s(r,"textarea,[contenteditable]")||s(r,"button,[contenteditable]"))return}var o=0,a=0;switch(n.which){case 37:o=n.metaKey?-t.contentWidth:n.altKey?-t.containerWidth:-30;break;case 38:a=n.metaKey?t.contentHeight:n.altKey?t.containerHeight:30;break;case 39:o=n.metaKey?t.contentWidth:n.altKey?t.containerWidth:30;break;case 40:a=n.metaKey?-t.contentHeight:n.altKey?-t.containerHeight:-30;break;case 32:a=n.shiftKey?t.containerHeight:-t.containerHeight;break;case 33:a=t.containerHeight;break;case 34:a=-t.containerHeight;break;case 36:a=t.contentHeight;break;case 35:a=-t.contentHeight;break;default:return}t.settings.suppressScrollX&&0!==o||t.settings.suppressScrollY&&0!==a||(e.scrollTop-=a,e.scrollLeft+=o,w(t),function(n,r){var i=Math.floor(e.scrollTop);if(0===n){if(!t.scrollbarYActive)return!1;if(0===i&&r>0||i>=t.contentHeight-t.containerHeight&&r<0)return!t.settings.wheelPropagation}var o=e.scrollLeft;if(0===r){if(!t.scrollbarXActive)return!1;if(0===o&&n<0||o>=t.contentWidth-t.containerWidth&&n>0)return!t.settings.wheelPropagation}return!0}(o,a)&&n.preventDefault())}})},wheel:function(t){var e=t.element;function n(n){var i=function(t){var e=t.deltaX,n=-1*t.deltaY;return"undefined"!==typeof e&&"undefined"!==typeof n||(e=-1*t.wheelDeltaX/6,n=t.wheelDeltaY/6),t.deltaMode&&1===t.deltaMode&&(e*=10,n*=10),e!==e&&n!==n&&(e=0,n=t.wheelDelta),t.shiftKey?[-n,-e]:[e,n]}(n),o=i[0],a=i[1];if(!function(t,n,i){if(!b.isWebKit&&e.querySelector("select:focus"))return!0;if(!e.contains(t))return!1;for(var o=t;o&&o!==e;){if(o.classList.contains(c.element.consuming))return!0;var a=r(o);if(i&&a.overflowY.match(/(scroll|auto)/)){var s=o.scrollHeight-o.clientHeight;if(s>0&&(o.scrollTop>0&&i<0||o.scrollTop<s&&i>0))return!0}if(n&&a.overflowX.match(/(scroll|auto)/)){var l=o.scrollWidth-o.clientWidth;if(l>0&&(o.scrollLeft>0&&n<0||o.scrollLeft<l&&n>0))return!0}o=o.parentNode}return!1}(n.target,o,a)){var s=!1;t.settings.useBothWheelAxes?t.scrollbarYActive&&!t.scrollbarXActive?(a?e.scrollTop-=a*t.settings.wheelSpeed:e.scrollTop+=o*t.settings.wheelSpeed,s=!0):t.scrollbarXActive&&!t.scrollbarYActive&&(o?e.scrollLeft+=o*t.settings.wheelSpeed:e.scrollLeft-=a*t.settings.wheelSpeed,s=!0):(e.scrollTop-=a*t.settings.wheelSpeed,e.scrollLeft+=o*t.settings.wheelSpeed),w(t),(s=s||function(n,r){var i=Math.floor(e.scrollTop),o=0===e.scrollTop,a=i+e.offsetHeight===e.scrollHeight,s=0===e.scrollLeft,l=e.scrollLeft+e.offsetWidth===e.scrollWidth;return!(Math.abs(r)>Math.abs(n)?o||a:s||l)||!t.settings.wheelPropagation}(o,a))&&!n.ctrlKey&&(n.stopPropagation(),n.preventDefault())}}"undefined"!==typeof window.onwheel?t.event.bind(e,"wheel",n):"undefined"!==typeof window.onmousewheel&&t.event.bind(e,"mousewheel",n)},touch:function(t){if(b.supportsTouch||b.supportsIePointer){var e=t.element,n={},i=0,o={},a=null;b.supportsTouch?(t.event.bind(e,"touchstart",h),t.event.bind(e,"touchmove",p),t.event.bind(e,"touchend",f)):b.supportsIePointer&&(window.PointerEvent?(t.event.bind(e,"pointerdown",h),t.event.bind(e,"pointermove",p),t.event.bind(e,"pointerup",f)):window.MSPointerEvent&&(t.event.bind(e,"MSPointerDown",h),t.event.bind(e,"MSPointerMove",p),t.event.bind(e,"MSPointerUp",f)))}function s(n,r){e.scrollTop-=r,e.scrollLeft-=n,w(t)}function l(t){return t.targetTouches?t.targetTouches[0]:t}function u(t){return(!t.pointerType||"pen"!==t.pointerType||0!==t.buttons)&&(!(!t.targetTouches||1!==t.targetTouches.length)||!(!t.pointerType||"mouse"===t.pointerType||t.pointerType===t.MSPOINTER_TYPE_MOUSE))}function h(t){if(u(t)){var e=l(t);n.pageX=e.pageX,n.pageY=e.pageY,i=(new Date).getTime(),null!==a&&clearInterval(a)}}function p(a){if(u(a)){var h=l(a),p={pageX:h.pageX,pageY:h.pageY},f=p.pageX-n.pageX,d=p.pageY-n.pageY;if(function(t,n,i){if(!e.contains(t))return!1;for(var o=t;o&&o!==e;){if(o.classList.contains(c.element.consuming))return!0;var a=r(o);if(i&&a.overflowY.match(/(scroll|auto)/)){var s=o.scrollHeight-o.clientHeight;if(s>0&&(o.scrollTop>0&&i<0||o.scrollTop<s&&i>0))return!0}if(n&&a.overflowX.match(/(scroll|auto)/)){var l=o.scrollWidth-o.clientWidth;if(l>0&&(o.scrollLeft>0&&n<0||o.scrollLeft<l&&n>0))return!0}o=o.parentNode}return!1}(a.target,f,d))return;s(f,d),n=p;var g=(new Date).getTime(),y=g-i;y>0&&(o.x=f/y,o.y=d/y,i=g),function(n,r){var i=Math.floor(e.scrollTop),o=e.scrollLeft,a=Math.abs(n),s=Math.abs(r);if(s>a){if(r<0&&i===t.contentHeight-t.containerHeight||r>0&&0===i)return 0===window.scrollY&&r>0&&b.isChrome}else if(a>s&&(n<0&&o===t.contentWidth-t.containerWidth||n>0&&0===o))return!0;return!0}(f,d)&&a.preventDefault()}}function f(){t.settings.swipeEasing&&(clearInterval(a),a=setInterval(function(){t.isInitialized?clearInterval(a):o.x||o.y?Math.abs(o.x)<.01&&Math.abs(o.y)<.01?clearInterval(a):t.element?(s(30*o.x,30*o.y),o.x*=.8,o.y*=.8):clearInterval(a):clearInterval(a)},10))}}},S=function(t,e){var n=this;if(void 0===e&&(e={}),"string"===typeof t&&(t=document.querySelector(t)),!t||!t.nodeName)throw new Error("no element is specified to initialize PerfectScrollbar");for(var a in this.element=t,t.classList.add(c.main),this.settings={handlers:["click-rail","drag-thumb","keyboard","wheel","touch"],maxScrollbarLength:null,minScrollbarLength:null,scrollingThreshold:1e3,scrollXMarginOffset:0,scrollYMarginOffset:0,suppressScrollX:!1,suppressScrollY:!1,swipeEasing:!0,useBothWheelAxes:!1,wheelPropagation:!0,wheelSpeed:1},e)this.settings[a]=e[a];this.containerWidth=null,this.containerHeight=null,this.contentWidth=null,this.contentHeight=null;var s,l,u=function(){return t.classList.add(c.state.focus)},h=function(){return t.classList.remove(c.state.focus)};this.isRtl="rtl"===r(t).direction,!0===this.isRtl&&t.classList.add(c.rtl),this.isNegativeScroll=(l=t.scrollLeft,t.scrollLeft=-1,s=t.scrollLeft<0,t.scrollLeft=l,s),this.negativeScrollAdjustment=this.isNegativeScroll?t.scrollWidth-t.clientWidth:0,this.event=new y,this.ownerDocument=t.ownerDocument||document,this.scrollbarXRail=o(c.element.rail("x")),t.appendChild(this.scrollbarXRail),this.scrollbarX=o(c.element.thumb("x")),this.scrollbarXRail.appendChild(this.scrollbarX),this.scrollbarX.setAttribute("tabindex",0),this.event.bind(this.scrollbarX,"focus",u),this.event.bind(this.scrollbarX,"blur",h),this.scrollbarXActive=null,this.scrollbarXWidth=null,this.scrollbarXLeft=null;var p=r(this.scrollbarXRail);this.scrollbarXBottom=parseInt(p.bottom,10),isNaN(this.scrollbarXBottom)?(this.isScrollbarXUsingBottom=!1,this.scrollbarXTop=_(p.top)):this.isScrollbarXUsingBottom=!0,this.railBorderXWidth=_(p.borderLeftWidth)+_(p.borderRightWidth),i(this.scrollbarXRail,{display:"block"}),this.railXMarginWidth=_(p.marginLeft)+_(p.marginRight),i(this.scrollbarXRail,{display:""}),this.railXWidth=null,this.railXRatio=null,this.scrollbarYRail=o(c.element.rail("y")),t.appendChild(this.scrollbarYRail),this.scrollbarY=o(c.element.thumb("y")),this.scrollbarYRail.appendChild(this.scrollbarY),this.scrollbarY.setAttribute("tabindex",0),this.event.bind(this.scrollbarY,"focus",u),this.event.bind(this.scrollbarY,"blur",h),this.scrollbarYActive=null,this.scrollbarYHeight=null,this.scrollbarYTop=null;var f=r(this.scrollbarYRail);this.scrollbarYRight=parseInt(f.right,10),isNaN(this.scrollbarYRight)?(this.isScrollbarYUsingRight=!1,this.scrollbarYLeft=_(f.left)):this.isScrollbarYUsingRight=!0,this.scrollbarYOuterWidth=this.isRtl?function(t){var e=r(t);return _(e.width)+_(e.paddingLeft)+_(e.paddingRight)+_(e.borderLeftWidth)+_(e.borderRightWidth)}(this.scrollbarY):null,this.railBorderYWidth=_(f.borderTopWidth)+_(f.borderBottomWidth),i(this.scrollbarYRail,{display:"block"}),this.railYMarginHeight=_(f.marginTop)+_(f.marginBottom),i(this.scrollbarYRail,{display:""}),this.railYHeight=null,this.railYRatio=null,this.reach={x:t.scrollLeft<=0?"start":t.scrollLeft>=this.contentWidth-this.containerWidth?"end":null,y:t.scrollTop<=0?"start":t.scrollTop>=this.contentHeight-this.containerHeight?"end":null},this.isAlive=!0,this.settings.handlers.forEach(function(t){return E[t](n)}),this.lastScrollTop=Math.floor(t.scrollTop),this.lastScrollLeft=t.scrollLeft,this.event.bind(this.element,"scroll",function(t){return n.onScroll(t)}),w(this)};S.prototype.update=function(){this.isAlive&&(this.negativeScrollAdjustment=this.isNegativeScroll?this.element.scrollWidth-this.element.clientWidth:0,i(this.scrollbarXRail,{display:"block"}),i(this.scrollbarYRail,{display:"block"}),this.railXMarginWidth=_(r(this.scrollbarXRail).marginLeft)+_(r(this.scrollbarXRail).marginRight),this.railYMarginHeight=_(r(this.scrollbarYRail).marginTop)+_(r(this.scrollbarYRail).marginBottom),i(this.scrollbarXRail,{display:"none"}),i(this.scrollbarYRail,{display:"none"}),w(this),v(this,"top",0,!1,!0),v(this,"left",0,!1,!0),i(this.scrollbarXRail,{display:""}),i(this.scrollbarYRail,{display:""}))},S.prototype.onScroll=function(t){this.isAlive&&(w(this),v(this,"top",this.element.scrollTop-this.lastScrollTop),v(this,"left",this.element.scrollLeft-this.lastScrollLeft),this.lastScrollTop=Math.floor(this.element.scrollTop),this.lastScrollLeft=this.element.scrollLeft)},S.prototype.destroy=function(){this.isAlive&&(this.event.unbindAll(),l(this.scrollbarX),l(this.scrollbarY),l(this.scrollbarXRail),l(this.scrollbarYRail),this.removePsClasses(),this.element=null,this.scrollbarX=null,this.scrollbarY=null,this.scrollbarXRail=null,this.scrollbarYRail=null,this.isAlive=!1)},S.prototype.removePsClasses=function(){this.element.className=this.element.className.split(" ").filter(function(t){return!t.match(/^ps([-_].+|)$/)}).join(" ")},e.a=S},function(t,e){},function(t,e,n){"use strict";n.d(e,"a",function(){return B});var r=n(160),i=n(91),o=n(83),a=n(41),s=n(81),l=n(123),u=n(10),c=n(18),h=n(19),p=n(99),f=n(23),d=n(60),g=n(32),y=n(46),m=n.n(y),v=n(396),_=(n.n(v),n(101),n(165)),b=n(167),w=n(248),O=n(398),x=n(399),E=n(404),S=n(15);function C(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var T=32;function I(){var t;return"color"===(t=m()('<input type="color" value="!" />')[0]).type&&"!"!==t.value}function j(t,e){t.getInteractions().forEach(function(t,n,r){t instanceof i.DragPan&&t.setActive(e)})}function L(t,e,n,r,i,o){var a=null;n||(n=d.e),t||(t=function(){if(null===this.element)return"#000000";var t=m()(this.element).find("li.draw a.active").data("color");return t||"#000000"}.call(this)),e||(e=function(){if(null===this.element)return 1;var t=parseInt(m()(this.element).find("li.draw a.active").data("size"));return(isNaN(t)||t<1)&&(t=1),t}.call(this));var l=new s.Fill({color:n}),u=new s.Stroke({color:t,width:e});return a=r?new s.Icon({anchor:[.5,.5],anchorXUnits:"fraction",anchorYUnits:"fraction",opacity:1,src:this.viewport.options.annotations.imageBaseUrl+r,scale:isNaN(this.viewport.options.annotations.imageScale)?1:this.viewport.options.annotations.imageScale}):new s.Circle({fill:l,stroke:u,radius:5}),new s.Style({image:a,fill:l,stroke:u,text:this.viewport.getAnnotationTextStyle(i),geometry:o})}function R(t,e){return e?e.setCoordinates(t):e=new l.MultiPoint(t),e}function P(t){return 3===t.length?Math.sqrt(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]):Math.sqrt(t[0]*t[0]+t[1]*t[1])}function N(t,e){var n,r,i=t[1],o=t[0],a=(r=o,3===(n=i).lenth&&3===r.length?[r[0]-n[0],r[1]-n[1],r[2]-n[2]]:[r[0]-n[0],r[1]-n[1]]),s=P(a),u=function(t,e){if(2===t.length&&t.push(0),e||(e=P(t)),e>1e-5){var n=1/e;t[0]*=n,t[1]*=n,t[2]*=n}return 3===t.length?[t[0],t[1],t[2]]:[t[0],t[1]]}(a,s),c=function(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}(u,[0,0,1]),h=.15*s,p=.75*s,f=.15*s,d=[i[0]-c[0]*h/2,i[1]-c[1]*h/2],g=[i[0]+c[0]*h/2,i[1]+c[1]*h/2],y=[d[0]+u[0]*p,d[1]+u[1]*p],m=[g[0]+u[0]*p,g[1]+u[1]*p],v=[y[0]-c[0]*f/2,y[1]-c[1]*f/2],_=[m[0]+c[0]*f/2,m[1]+c[1]*f/2],b=[[d,y,v,[o[0],o[1]],_,m,g,d]];return e?e.setCoordinates(b):e=new l.Polygon(b),e}function M(t,e,n){if(this.drawingControlsContainer&&this.viewport.element.contains(this.drawingControlsContainer)&&this.viewport.element.removeChild(this.drawingControlsContainer),this.drawingControlsContainer=null,this.endDrawingButton=null,this.removeLastButton=null,this.continueDrawingButton=null,this.cancelDrawingButton=null,this.counterButton=null,null!=this.changeFeatureKey&&a.b(this.changeFeatureKey),t){this.changeFeatureKey=null;var r=this;this.drawingControlsContainer=document.createElement("div"),this.drawingControlsContainer.className="ol-control pma-ui-viewport-annotations-drawing",this.cancelDrawingButton=document.createElement("button"),this.cancelDrawingButton.innerHTML=f.a.translate("Cancel"),m()(this.cancelDrawingButton).click(function(t){t.preventDefault(),M.call(r,!1,e),r.finishDrawing(!1,e)}),e===d.a.CompoundFreehand&&r.drawing||this.viewport.element.appendChild(this.drawingControlsContainer),e===d.a.MultiPoint?(this.removeLastButton=document.createElement("button"),this.removeLastButton.innerHTML=f.a.translate("Remove last point"),this.drawingControlsContainer.appendChild(this.removeLastButton),m()(this.removeLastButton).click(function(t){t.preventDefault(),r.draw&&r.draw.removeLastPoint()}),this.endDrawingButton=document.createElement("button"),this.endDrawingButton.innerHTML=f.a.translate("Finish"),m()(this.endDrawingButton).click(function(t){t.preventDefault(),M.call(r,!1,d.a.MultiPoint),r.finishDrawing(!0)}),this.drawingControlsContainer.appendChild(this.endDrawingButton),this.counterButton=document.createElement("button"),this.counterButton.innerHTML="0",n&&(n.getGeometry()&&n.getGeometry().getCoordinates()&&(this.counterButton.innerHTML=n.getGeometry().getCoordinates().length),this.changeFeatureKey&&a.b(this.changeFeatureKey),this.changeFeatureKey=n.on("change",function(t){r.counterButton&&(r.counterButton.innerHTML=n.getGeometry().getCoordinates().length-1)})),this.drawingControlsContainer.insertBefore(this.counterButton,this.removeLastButton)):e===d.a.CompoundFreehand&&(r.drawing||(this.continueDrawingButton=document.createElement("button"),this.continueDrawingButton.innerHTML=f.a.translate("Draw"),this.drawingControlsContainer.appendChild(this.continueDrawingButton),m()(this.continueDrawingButton).click(function(t){t.preventDefault(),r.startDrawing({type:d.a.CompoundFreehand,color:r.lastAnnotationStyle.color,fillColor:r.lastAnnotationStyle.fillColor,penWidth:r.lastAnnotationStyle.penSize,iconRelativePath:r.lastAnnotationStyle.iconPath}),r.continueDrawingButton&&(r.continueDrawingButton.style.display="none")})),this.removeLastButton=document.createElement("button"),this.removeLastButton.innerHTML=f.a.translate("Remove last"),m()(this.removeLastButton).click(function(t){if(t.preventDefault(),r.compoundFreehandList.length>0){var e=r.compoundFreehandList.pop();r.deleteAnnotation(e.getId())}}),this.endDrawingButton=document.createElement("button"),this.endDrawingButton.innerHTML=f.a.translate("Finish"),m()(this.endDrawingButton).click(function(t){t.preventDefault(),M.call(r,!1,d.a.CompoundFreehand),r.finishDrawing(!0),r.compoundFreehandList.length>0&&(r.mergeSelection(r.compoundFreehandList),r.compoundFreehandList=[])}),this.drawingControlsContainer.appendChild(this.endDrawingButton),this.drawingControlsContainer.appendChild(this.removeLastButton)),this.drawingControlsContainer.appendChild(this.cancelDrawingButton)}}function A(t,e,n){if(this.editingControlsContainer&&this.viewport.element.contains(this.editingControlsContainer)&&this.viewport.element.removeChild(this.editingControlsContainer),this.editingControlsContainer=null,this.endEditingButton=null,this.cancelEditingButton=null,this.saveEditingButton=null,this.brushSizeIncreaseEditingButton=null,this.brushSizeDecreaseEditingButton=null,this.brushTypeCircleEditingButton=null,this.brushTypeSquareEditingButton=null,t){var r=this;this.editingControlsContainer=document.createElement("div"),this.editingControlsContainer.className="ol-control pma-ui-viewport-annotations-drawing",this.cancelEditingButton=document.createElement("button"),this.cancelEditingButton.innerHTML=f.a.translate("Stop editing"),m()(this.cancelEditingButton).click(function(t){t.preventDefault(),A.call(r,!1,e),r.stopEditing()}),this.viewport.element.appendChild(this.editingControlsContainer),e===d.f.Wand&&(this.saveEditingButton=document.createElement("button"),this.saveEditingButton.innerHTML=f.a.translate("Create annotation from selection"),m()(this.saveEditingButton).click(function(t){t.preventDefault(),r.saveMagicWandAnnotation()}),this.editingControlsContainer.appendChild(this.saveEditingButton)),e!==d.f.Brush&&e!==d.f.Eraser||(this.brushSizeIncreaseEditingButton=document.createElement("button"),this.brushSizeIncreaseEditingButton.innerHTML="&nbsp;+&nbsp;",this.brushSizeIncreaseEditingButton.title=f.a.translate("Increase brush tip size"),m()(this.brushSizeIncreaseEditingButton).click(function(t){t.preventDefault();var e=r.edit.getBrushSize();e+=r.edit.options.brushStep,r.edit.setBrushSize(e)}),this.editingControlsContainer.appendChild(this.brushSizeIncreaseEditingButton),this.brushSizeDecreaseEditingButton=document.createElement("button"),this.brushSizeDecreaseEditingButton.innerHTML="&nbsp;-&nbsp;",this.brushSizeDecreaseEditingButton.title=f.a.translate("Decrease brush tip size"),m()(this.brushSizeDecreaseEditingButton).click(function(t){t.preventDefault();var e=r.edit.getBrushSize();e=(e-=r.edit.options.brushStep)<=0?1:e,r.edit.setBrushSize(e)}),this.editingControlsContainer.appendChild(this.brushSizeDecreaseEditingButton),this.brushTypeCircleEditingButton=document.createElement("button"),this.brushTypeCircleEditingButton.innerHTML="&nbsp;&#9675;&nbsp;",this.brushTypeCircleEditingButton.title=f.a.translate("Change brush tip to circle"),m()(this.brushTypeCircleEditingButton).click(function(t){t.preventDefault(),r.edit.setBrushType("circle")}),this.editingControlsContainer.appendChild(this.brushTypeCircleEditingButton),this.brushTypeSquareEditingButton=document.createElement("button"),this.brushTypeSquareEditingButton.innerHTML="&nbsp;&#9633;&nbsp;",this.brushTypeSquareEditingButton.title=f.a.translate("Change brush tip to square"),m()(this.brushTypeSquareEditingButton).click(function(t){t.preventDefault(),r.edit.setBrushType("square")}),this.editingControlsContainer.appendChild(this.brushTypeSquareEditingButton)),this.editingControlsContainer.appendChild(this.cancelEditingButton)}}function k(t){t.type!==d.a.CompoundFreehand&&(this.compoundFreehandList=[]),M.call(this,!1,t.type);var e,n,r,s,u,h=t.type,p=c.j,f=c.m;switch(this.stopDrawingOnMouseUp=!1,this.lastAnnotationStyle={color:t.color,fillColor:t.fillColor,penSize:t.penWidth,iconPath:t.iconRelativePath},!0===this.selectionAdded&&(this.selectionAdded=!1,this.hoverInteraction.getFeatures().clear(),this.viewport.map.removeInteraction(this.hoverInteraction),this.selectInteraction.getFeatures().clear(),this.viewport.map.removeInteraction(this.selectInteraction)),h){case d.a.Rectangle:r=function(t,e){if(this.size){var n=Math.abs(this.size[0]/2),r=Math.abs(this.size[1]/2),i=t;return new l.Polygon([[[i[0]-n,i[1]-r],[i[0]-n,i[1]+r],[i[0]+n,i[1]+r],[i[0]+n,i[1]-r],[i[0]-n,i[1]-r]]])}var o=t[0],a=t[1];if(!o||!a)return null;var s=[[o,[o[0],a[1]],a,[a[0],o[1]],o]];return e?e.setCoordinates(s):e=new l.Polygon(s),e}.bind(t),t.size?(e=1,h="Point",u=function(t){var e=t.getGeometry();if("Point"===e.getType()){var n=Math.abs(this.size[0]/2),r=Math.abs(this.size[1]/2),i=e.getFirstCoordinate();return new l.Polygon([[[i[0]-n,i[1]-r],[i[0]-n,i[1]+r],[i[0]+n,i[1]+r],[i[0]+n,i[1]-r],[i[0]-n,i[1]-r]]])}return e}.bind(t)):(e=2,h="LineString");break;case d.a.Arrow:r=N,e=2,h="LineString";break;case d.a.Line:e=2,h="LineString";break;case d.a.Icon:h="Point";break;case d.a.MultiPoint:r=R,h="LineString",s=c.i,n=1;break;case d.a.Freehand:case d.a.CompoundFreehand:j(this.viewport.map,!1),h="LineString",f=c.j,p=c.n,this.stopDrawingOnMouseUp=!0;break;case d.a.ClosedFreehand:j(this.viewport.map,!1),h="Polygon",f=c.j,p=c.n,this.stopDrawingOnMouseUp=!0;break;case d.a.Ellipse:r=function(t,e){var n=t[0],r=t[1];if(!n||!r)return null;for(var i=(n[1]-r[1])/2,o=[n[0],n[1]+i],a=r,s=[(a[0]+o[0])/2,(a[1]+o[1])/2],u=[s[0]-a[0],s[1]-a[1]],c=[],h=2*Math.PI/T,p=0;p<T;p++){var f=p*h,d=[Math.round(s[0]+u[0]*Math.cos(f)),Math.round(s[1]+u[1]*Math.sin(f))];c.push(d)}return c.push(c[0]),e?e.setCoordinates([c]):e=new l.Polygon([c]),e}.bind(t),e=2,h="LineString";break;case d.a.Circle:t.size&&(e=1,h="Point",u=function(t){var e=t.getGeometry();return"Point"===e.getType()?new l.Circle(e.getFirstCoordinate(),this.size[0]/2):e}.bind(t)),r=function(t,e){if(this.size)return new l.Circle(t,this.size[0]/2);var n=e||new l.Circle([NaN,NaN]),r=t[0],i=t[0][0]-t[1][0],o=t[0][1]-t[1][1],a=Math.sqrt(i*i+o*o);return n.setCenterAndRadius(r,a),n}.bind(t)}var y=L.call(this,t.color,t.penWidth,t.fillColor,t.iconRelativePath,null,u);this.draw=new i.Draw({source:this.viewport.annotationsLayer.getSource(),type:h,geometryFunction:r,maxPoints:e,minPoints:n,style:y,condition:p,finishCondition:s,freehandCondition:f}),this.snapInteraction=new i.Snap({source:this.viewport.annotationsLayer.getSource()});var m=!1;if(t.feature&&(m=!0,this.draw.extend(t.feature),this.drawing=!0,t.feature.drawingType=t.type,t.feature.color=t.feature.metaData.Color,t.feature.penSize=t.feature.metaData.LineThickness,t.feature.fillColor=t.feature.metaData.FillColor,M.call(this,!0,t.type,t.feature),t.feature=null),this.viewport.map.addInteraction(this.draw),this.viewport.map.addInteraction(this.snapInteraction),!0===this.viewport.getAnnotationLabelsVisible())var v=function(){var t=document.createElement("div");t.className="pma-ui-viewport-tooltip pma-ui-viewport-tooltip-measure";var e=new o.a({element:t,offset:[0,-15],positioning:"bottom-center"});return this.viewport.map.addOverlay(e),e.element=t,e}.call(this);var _=this,b=null;this.draw.on("drawstart",function(e){_.drawing=!0,_.shouldRejectDrawing=!1,M.call(_,!0,t.type,e.feature),e.feature.setId(1e4*Math.random()|0);var n=e.coordinate;b=e.feature.on("change",function(t){var n={temporary:e.feature.temporary,feature:e.feature};_.fireEvent(g.c.AnnotationDrawing,n)}),v&&e.feature.getGeometry().on("change",function(e){var r,i=e.target;switch(t.type){case d.a.Rectangle:case d.a.Ellipse:case d.a.Polygon:case d.a.ClosedFreehand:r=_.viewport.formatArea(_.viewport.calculateArea(i)),n=i.getInteriorPoint().getCoordinates();break;case d.a.Line:case d.a.LineString:case d.a.Freehand:case d.a.Circle:r=_.viewport.formatLength(_.viewport.calculateLength(i)),n=i.getLastCoordinate()}v.element.innerHTML=r,v.setPosition(n)}),e.feature.notes=t.notes,e.feature.drawingType=t.type,e.feature.temporary=!0,e.feature.penSize=t.penWidth,e.feature.color=t.color,e.feature.fillColor=t.fillColor,e.feature.icon=t.iconRelativePath}),this.draw.on("drawend",function(t){if(_.drawing=!1,M.call(_,t.feature.drawingType===d.a.CompoundFreehand,t.feature.drawingType,t.feature),t.feature.drawingType===d.a.CompoundFreehand&&_.drawingControlsContainer){var e=t.feature.getGeometry().getLastCoordinate(),n=_.viewport.map.getPixelFromCoordinate(e);_.drawingControlsContainer.style.left=n[0]+25+"px",_.drawingControlsContainer.style.top=n[1]-50+"px"}if(!_.getEnabled())return t.preventDefault(),!1;v&&_.viewport.map.removeOverlay(v),_.shouldRejectDrawing?D.call(_):setTimeout(function(){D.call(_)},100),t.feature.drawingType===d.a.CompoundFreehand&&_.compoundFreehandList.push(t.feature),a.b(b),F.call(_,t.feature,m)})}function F(t,e){var n=this,r=L.call(n,t.color,t.penSize,t.fillColor,t.icon,t);void 0===t.getId()&&t.setId(1e4*Math.random()|0),t.setStyle(n.viewport.getAnnotationStyle(r,t)),t.originalStyle=r,t.temporary=!1,null!==n.element&&(m()(n.element).find("li.draw a").removeClass("active"),m()(n.element).find(".color-picker").hide());var i={temporary:t.temporary,feature:t},o={extent:n.viewport.map.getView().getProjection().getExtent(),flip:n.viewport.options.flip},a=t.getGeometry().clone();a.applyTransform(function(t,e,n){for(var r=0;r<t.length;r+=n){var i=t[r],o=t[r+1];!0!==this.flip.vertically&&(o=this.extent[3]-o),!0===this.flip.horizontally&&(i=this.extent[2]-i),e[r]=i,e[r+1]=o}}.bind(o));var s="";s="Freehand"===t.drawingType||"ClosedFreehand"===t.drawingType?n.format.writeGeometry(a.simplify(2)):"Circle"===t.drawingType?n.format.writeGeometry(Object(u.c)(a)):n.format.writeGeometry(a);var l=2;switch(t.drawingType){case d.a.Arrow:case d.a.Icon:case d.a.Point:case d.a.MultiPoint:l=0;break;case d.a.Line:case d.a.Freehand:case d.a.CompoundFreehand:case d.a.LineString:l=1;break;case d.a.Rectangle:case d.a.Ellipse:case d.a.Polygon:case d.a.ClosedFreehand:case d.a.Circle:l=2}e?(t.metaData.UpdatedOn=new Date,t.metaData.UpdatedBy=null):t.metaData={AnnotationID:null,Classification:f.a.translate("Generic"),Color:t.icon?t.icon:t.originalStyle.getStroke().getColor(),Image:n.viewport.imageInfo.Filename,LayerID:1,Notes:t.notes?t.notes:"",UpdateInfo:"",State:d.b.Added,FillColor:t.originalStyle.getFill().getColor(),Dimensions:l,LineThickness:t.penSize,CreatedOn:new Date,CreatedBy:null,UpdatedOn:null,UpdatedBy:null};var c=t.getGeometry();if(l>0){var h=n.viewport.calculateLength(c);if(t.metaData.Length=h,t.metaData.FormattedLength=n.viewport.formatLength(h),l>1){var p=n.viewport.calculateArea(c);t.metaData.Area=p,t.metaData.FormattedArea=n.viewport.formatArea(p)}}t.metaData.DrawingType=t.drawingType,t.metaData.DrawingType==d.a.MultiPoint&&(t.metaData.PointCount=c.getCoordinates?c.getCoordinates().length:0),t.metaData.Geometry=s,e&&t.metaData.State!==d.b.Added&&(t.metaData.State=d.b.Modified),setTimeout(function(){-1!==s.indexOf("MULTIPOINT EMPTY")?n.deleteAnnotation(t.getId()):(t.setStyle(n.viewport.getAnnotationStyle(r,t)),e?n.fireEvent(g.c.AnnotationModified,i):!n.shouldRejectDrawing&&t&&t.drawingType!==d.a.CompoundFreehand&&n.fireEvent(g.c.AnnotationAdded,i))},10)}function D(){this.draw&&(j(this.viewport.map,!0),this.viewport.map.removeInteraction(this.draw),this.draw=null),this.edit&&(j(this.viewport.map,!0),this.viewport.map.removeInteraction(this.edit),this.edit=null),!0!==this.selectionAdded&&(this.selectionAdded=!0,this.selectInteraction.getFeatures().clear(),this.viewport.map.addInteraction(this.selectInteraction),this.hoverInteraction.getFeatures().clear(),this.viewport.map.addInteraction(this.hoverInteraction))}function G(){if(null!==this.element){var t="<ul class='pma-ui-annotations'>";I()?t+="<li class='option color-picker'><input type='color' value='#000000' /></li>":t+="<li class='option color-picker'><input type='button' value=' ' /><input type='hidden' value='#000000' /></li>",t+="<li class='option draw'><a data-type='Freehand' data-size='2' data-color='#008000' style='color: #008000' class='size-2' href='#' title='"+f.a.translate("Freehand size 1")+"'><i class='fa fa-circle' aria-hidden='true'></i></a></li>",t+="<li class='option draw'><a data-type='ClosedFreehand' data-size='2' data-color='#008000' style='color: #008000' class='size-2' href='#' title='"+f.a.translate("Closed Freehand size 1")+"'><i class='fa fa-pencil-square' aria-hidden='true'></i></a></li>",t+="<li class='option draw'><a data-type='CompoundFreehand' data-size='2' data-color='#008080' style='color: #008080' class='size-2' href='#' title='"+f.a.translate("Compound Freehand size 2")+"'><i class='fa fa-chain' aria-hidden='true'></i></a></li>",t+="<li class='option draw'><a data-type='Text' data-size='1' data-color='#000000' style='color: #000000' class='size-2' href='#' title='"+f.a.translate("Text")+"'><i class='fa fa-font' aria-hidden='true'></i></a></li>",t+="<li class='option draw'><a data-type='Arrow' data-size='2' data-color='#000000' style='color: #000000' class='size-2' href='#' title='"+f.a.translate("Arrow")+"'><i class='fa fa-arrow-right' aria-hidden='true'></i></a></li>",t+="<li class='option draw'><a data-type='Line' data-size='1' data-color='#F00F00' style='color: #F00F00' class='size-2' href='#' title='"+f.a.translate("Measure")+"'><i class='fa fa-minus' aria-hidden='true'></i></a></li>",t+="</ul>";var e=this,n=m()(this.element);n.html(t),I()||(e.jsColorPicker=new v(n.find("li.color-picker input")[0],{valueElement:n.find("li.color-picker input[type=hidden]")[0],hash:!0,closable:!0,closeText:f.a.translate("Close")})),n.find("li.color-picker input").change(function(){var t=m()(this).val();n.find("li.draw a.active").data("color",t),n.find("li.draw a.active").css("color",t),function(){if(this.draw&&null!==this.element){var t=m()(this.element).find("li.draw a.active");1===t.length&&(t.removeClass("active"),t.click())}}.call(e)}),n.find("li.option.delete a").click(function(t){t.preventDefault();var n=e.getSelection();n&&n.length>0&&e.deleteAnnotation(n[0].getId())}),n.find("li.option.save a").click(function(t){t.preventDefault(),e.saveAnnotations()}),n.find("li.draw a").click(function(t){t.preventDefault();var n=m()(this);(function(t){if(this.getEnabled())if(this.finishDrawing(!0),t.hasClass("active"))t.removeClass("active");else{var e=t.data("type"),n="";if("Text"!==e||(e="Point",n=prompt(f.a.translate("Enter text")))){var r=this.getSelection();this.startDrawing({type:e,color:t.data("color"),penWidth:t.data("size"),iconRelativePath:t.data("icon"),feature:r&&r.length>0?r[0]:null,fillColor:PMA.UI.View.DefaultFillColor,notes:n}),t.addClass("active"),null!==this.jsColorPicker?this.jsColorPicker.fromString(t.data("color")):m()(this.element).find(".color-picker input[type='color']").val(t.data("color")),m()(this.element).find(".color-picker").show()}}}).call(e,n)})}}function U(t,e){if(t&&0!==t.length){var n=t.pop(),r=this;n.metaData.Notes||(n.metaData.Notes=f.a.translate(" ")),n.metaData.Classification||(n.metaData.Classification=f.a.translate("no classification")),r.context.addAnnotation(r.serverUrl,r.path,n.metaData.Classification,n.metaData.LayerID,n.metaData.Notes,n.metaData.Geometry,n.metaData.Color,function(i,o){n.metaData.AnnotationID=o,n.setId(o),n.metaData.State=d.b.Pristine,U.call(r,t,e)},function(){r.fireEvent(g.c.AnnotationsSaved,{success:!1}),console.error("Saving annotation (add) failed"),console.log(arguments)})}else(function t(e){if(!e||0===e.length)return void function t(){if(!this.deletedAnnotations||0===this.deletedAnnotations.length)return void this.fireEvent(g.c.AnnotationsSaved,{success:!0});var e=this.deletedAnnotations.pop();var n=this;if(null===e.metaData.AnnotationID)return void t.call(n);n.context.deleteAnnotation(n.serverUrl,n.path,e.metaData.LayerID,e.metaData.AnnotationID,function(){t.call(n)},function(){n.fireEvent(g.c.AnnotationsSaved,{success:!1}),console.error("Saving annotation (delete) failed"),console.log(arguments)})}.call(this);var n=e.pop();var r=this;r.context.updateAnnotation(r.serverUrl,r.path,n.metaData.LayerID,n.metaData.AnnotationID,n.metaData.Notes,n.metaData.Geometry,n.metaData.Color,function(){n.metaData.State=d.b.Pristine,t.call(r,e)},function(){r.fireEvent(g.c.AnnotationsSaved,{success:!1}),console.error("Saving annotation (edit) failed"),console.log(arguments)})}).call(this,e)}function z(t){var e=this;null===e.isPMACore2?this.context.getVersionInfo(e.serverUrl,function(n){n&&"1."===n.substring(0,"1.".length)?e.isPMACore2=!1:e.isPMACore2=!0,"function"===typeof t&&t.call(e,e.isPMACore2)},function(){console.error("Cannot reach server")}):"function"===typeof t&&t.call(e,e.isPMACore2)}var B=function(){function t(e){if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),Object(h.b)()){if(e.element instanceof HTMLElement)this.element=e.element;else if("string"==typeof e.element){var n=document.querySelector(e.element);n?this.element=n:console.error("Invalid selector for element")}else this.element=null;if(this.element&&(this.element.style.pointerEvents="auto"),e.viewport instanceof p.a&&e.viewport.map)if(e.viewport.annotationsLayer){this.serverUrl=e.serverUrl,this.path=e.path,this.context=e.context,this.viewport=e.viewport,this.drawing=!1,this.selectionAdded=!1,this.stopDrawingOnMouseUp=!1,this.format=new r.WKT,this.jsColorPicker=null,this.isPMACore2=null,z.call(this),this.listeners={},this.listeners[g.c.AnnotationAdded]=[],this.listeners[g.c.AnnotationDrawing]=[],this.listeners[g.c.AnnotationDeleted]=[],this.listeners[g.c.AnnotationModified]=[],this.listeners[g.c.AnnotationsSaved]=[],this.listeners[g.c.AnnotationsSelectionChanged]=[],this.listeners[g.c.AnnotationEditingStarted]=[],this.listeners[g.c.AnnotationEditingEnded]=[],function(){var t=this,e=Math.sqrt(2),n=function(t,n){var r=5;if(n.originalStyle){var i=n.originalStyle.clone(),o=i.getFill();o||(o=new s.Fill),o.setColor("rgba(255, 255, 255, 0)"),i.getStroke().setColor(t),i.getStroke().setWidth(i.getStroke().getWidth()+3);var a=i.getImage();if(a&&a.getSize){var l=a.getSize(),u=l[0]>l[1]?l[0]:l[1];r=(e*u/2).toFixed(0)}return i.setImage(new s.Circle({fill:new s.Fill({color:"rgba(255, 255, 255, 0.7)"}),stroke:new s.Stroke({color:t,width:4}),radius:r})),i}return new s.Style({stroke:new s.Stroke({color:t,width:3}),fill:new s.Fill({color:"rgba(255, 255, 255, 0.7)"}),image:new s.RegularShape({fill:new s.Fill({color:"rgba(255, 255, 255, 0.7)"}),stroke:new s.Stroke({color:t,width:4}),points:4,radius:5,angle:Math.PI/4})})};this.selectInteraction=new i.Select({condition:c.e,layers:[this.viewport.annotationsLayer],style:n.bind(this,"rgba(0, 153, 255, 1)")});var r=this.selectInteraction.getFeatures();this.hoverInteraction=new i.Select({condition:c.k,layers:[this.viewport.annotationsLayer],filter:function(t,e){return-1===r.getArray().indexOf(t)},style:n.bind(this,"#ffff00")}),this.selectInteraction.on("select",function(e){t.fireEvent(g.c.AnnotationsSelectionChanged,r.getArray())}),this.selectionAdded=!0,this.selectInteraction.getFeatures().clear(),this.viewport.map.addInteraction(this.selectInteraction),this.hoverInteraction.getFeatures().clear(),this.viewport.map.addInteraction(this.hoverInteraction)}.call(this),G.call(this);var o=this;this.viewport.map.on("pointerup",function(t){o.drawing&&!0===o.stopDrawingOnMouseUp&&o.finishDrawing(!0)}),this.setEnabled(!0===e.enabled),this.compoundFreehandList=[],this.lastAnnotationStyle=null,this.shouldRejectDrawing=!1}else console.error("Annotations must be enabled in the viewport for this to work");else console.error("Invalid viewport instance")}}var e,n,o;return e=t,(n=[{key:"replaceAnnotations",value:function(t){t&&t instanceof Array||(t=[]);for(var e=0;e<t.length;e++)t[e].AnnotationID=null,t[e].Image=this.viewport.image;this.finishDrawing(!0);var n=this.viewport.getAnnotations();this.deletedAnnotations=this.deletedAnnotations||[];for(var r=0;r<n.length;r++)switch(n[r].metaData.State){case d.b.Pristine:case d.b.Modified:this.deletedAnnotations.push(n[r])}var i=this.viewport.annotationsLayer.getSource();i.clear();for(var o=this.viewport.initializeFeatures(t,this.viewport.mainLayer.getSource().getProjection()),a=0;a<o.length;a++)o[a].metaData.State=d.b.Added;i.addFeatures(o),this.viewport.redraw()}},{key:"addAnnotation",value:function(t){t.AnnotationID=null,t.Image=this.viewport.image,this.finishDrawing(!0);for(var e=this.viewport.annotationsLayer.getSource(),n=this.viewport.initializeFeatures([t],this.viewport.mainLayer.getSource().getProjection()),r=0;r<n.length;r++)n[r].metaData.State=d.b.Added;e.addFeatures(n);var i={temporary:!1,feature:n&&n.length?n[0]:null};this.fireEvent(g.c.AnnotationAdded,i)}},{key:"getActive",value:function(){return null!==this.element&&m()(this.element).find("li.draw a.active").length>0}},{key:"getEnabled",value:function(){return this.enabled}},{key:"setEnabled",value:function(t){this.enabled=!0===t,this.getEnabled()?null!==this.element&&m()(this.element).find("li.draw a").removeClass("disabled"):(this.finishDrawing(!1),null!==this.element&&(m()(this.element).find("li.draw a").removeClass("active"),m()(this.element).find("li.draw a").addClass("disabled"),m()(this.element).find(".color-picker").hide()))}},{key:"startDrawing",value:function(t){"string"===typeof t&&(t={type:arguments[0],color:arguments[1],penWidth:arguments[2],iconRelativePath:arguments[3],feature:arguments[4],fillColor:PMA.UI.View.DefaultFillColor,notes:""}),this.getEnabled()&&(this.drawing?console.error("Drawing already in progress. Finish drawing before starting a new one."):(t.fillColor||(t.fillColor=PMA.UI.View.DefaultFillColor),t.size&&(t.size.length&&2==t.size.length?t.size[0]<=0||t.size[1]<=0?t.size=void 0:this.viewport.imageInfo&&this.viewport.imageInfo.MicrometresPerPixelX&&this.viewport.imageInfo.MicrometresPerPixelY?t.size=[t.size[0]/this.viewport.imageInfo.MicrometresPerPixelX,t.size[1]/this.viewport.imageInfo.MicrometresPerPixelY]:t.size=void 0:t.size=void 0),this.finishDrawing(!1),k.call(this,t)))}},{key:"finishDrawing",value:function(t,e){this.shouldRejectDrawing=!t;var n=!1===t;if(this.drawing?null!=this.draw&&this.draw.finishDrawing():n=!1,D.call(this),null!==this.element&&(m()(this.element).find(".color-picker").hide(),m()(this.element).find("li.draw a").removeClass("active")),n||e==d.a.CompoundFreehand){var r=this.viewport.annotationsLayer.getSource(),i=r.getFeatures();if(this.compoundFreehandList.length>0)for(;this.compoundFreehandList.length>0;){var o=this.compoundFreehandList.pop();r.removeFeature(o)}else i.length>0&&r.removeFeature(i[i.length-1])}}},{key:"listen",value:function(t,e){this.listeners.hasOwnProperty(t)||console.error(t+" is not a valid event"),this.listeners[t].push(e)}},{key:"fireEvent",value:function(t,e){if(this.listeners.hasOwnProperty(t))for(var n=0,r=this.listeners[t].length;n<r;n++)this.listeners[t][n].call(this,e);else console.error(t+" does not exist")}},{key:"getSelection",value:function(){return this.selectInteraction.getFeatures().getArray()}},{key:"saveAnnotations",value:function(){for(var t=this.viewport.getAnnotations(),e=[],n=[],r=0;r<t.length;r++)switch(t[r].metaData.State){case d.b.Added:e.push(t[r]);break;case d.b.Pristine:case d.b.Modified:n.push(t[r])}z.call(this,function(){this.isPMACore2?function(t,e){var n,r,i=[];if(t&&t.length)for(n=0;n<t.length;n++)(r=t[n]).metaData.Notes||(r.metaData.Notes=f.a.translate(" ")),r.metaData.Classification||(r.metaData.Classification=f.a.translate("no classification")),null===r.metaData.AnnotationID&&(r.metaData.AnnotationID=0),i.push(r.metaData);var o=e.map(function(t){return t.metaData}),a=[];if(this.deletedAnnotations&&this.deletedAnnotations.length>0)for(n=0;n<this.deletedAnnotations.length;n++)null!==this.deletedAnnotations[n].metaData.AnnotationID&&a.push(this.deletedAnnotations[n].metaData);var s=this;this.context.saveAnnotations(this.serverUrl,this.path,i,o,a,function(r,i){if(t&&t.length){if(null==i||i.length!=t.length)return void console.error("Annotations saved but cannot update annotation ids");for(n=0;n<i.length;n++)t[n].metaData.AnnotationID=i[n],t[n].setId(i[n]),t[n].metaData.State=d.b.Pristine}if(e&&e.length)for(n=0;n<e.length;n++)e[n].metaData.State=d.b.Pristine;s.deletedAnnotations=[],s.fireEvent(g.c.AnnotationsSaved,{success:!0})},function(){s.fireEvent(g.c.AnnotationsSaved,{success:!1}),console.error("Saving annotations failed"),console.log(arguments)})}.call(this,e,n):U.call(this,e,n)})}},{key:"hasChanges",value:function(){if(this.deletedAnnotations&&this.deletedAnnotations.length>0)return!0;for(var t=this.viewport.getAnnotations(),e=0;e<t.length;e++)switch(t[e].metaData.State){case d.b.Added:return!0;case d.b.Pristine:break;case d.b.Modified:return!0}return!1}},{key:"deleteAnnotation",value:function(t){if(null!==t&&!isNaN(t)){var e=this.viewport.annotationsLayer.getSource().getFeatureById(t);e&&(this.clearHighlight(),this.clearSelection(),this.viewport.annotationsLayer.getSource().removeFeature(e),e.metaData.State=d.b.Deleted,this.deletedAnnotations||(this.deletedAnnotations=[]),this.deletedAnnotations.push(e),this.fireEvent(g.c.AnnotationDeleted,{annotationId:t,feature:e}))}}},{key:"highlightAnnotation",value:function(t){if(null!==t&&!isNaN(t)){var e=this.viewport.annotationsLayer.getSource().getFeatureById(t);if(e){var n=this.hoverInteraction.getFeatures();n.clear(),n.push(e)}}}},{key:"clearHighlight",value:function(){this.hoverInteraction.getFeatures().clear()}},{key:"selectAnnotation",value:function(t){if(null!==t&&!isNaN(t)){var e=this.viewport.annotationsLayer.getSource().getFeatureById(t);if(e){var n=this.selectInteraction.getFeatures();n.clear(),n.push(e)}}}},{key:"clearSelection",value:function(){this.selectInteraction.getFeatures().clear()}},{key:"mergeSelection",value:function(t){if(t||(t=this.getSelection()),t&&!(t.length<1)){for(var e=[],n=0;n<t.length;n++){var r=t[n].getGeometry();r.getFirstCoordinate&&e.push({id:t[n].getId(),geometry:r,first:r.getFirstCoordinate(),last:r.getLastCoordinate(),coordinates:r.getCoordinates(),sqDistanceFirst:0,sqDistanceLast:0,sqDistanceFirstFirst:0,sqDistanceLastFirst:0})}for(n=0;n<e.length;n++)this.deleteAnnotation(e[n].id);var i=e[0].coordinates,o=i[0],a=i[i.length-1];for(e.splice(0,1);e.length>0;){var s=-1,u=-1;for(n=0;n<e.length;n++)e[n].sqDistanceFirst=Math.pow(a[0]-e[n].first[0],2)+Math.pow(a[1]-e[n].first[1],2),e[n].sqDistanceLast=Math.pow(a[0]-e[n].last[0],2)+Math.pow(a[1]-e[n].last[1],2),e[n].sqDistanceFirstFirst=Math.pow(o[0]-e[n].first[0],2)+Math.pow(o[1]-e[n].first[1],2),e[n].sqDistanceLastFirst=Math.pow(o[0]-e[n].last[0],2)+Math.pow(o[1]-e[n].last[1],2),(-1==s||e[n].sqDistanceFirst<s)&&(s=e[n].sqDistanceFirst,u=n),(-1==s||e[n].sqDistanceLast<s)&&(s=e[n].sqDistanceLast,u=n);for(var c=e.splice(u,1)[0],h=c.sqDistanceLast<c.sqDistanceFirst,p=0;p<c.coordinates.length;p++)h?i.push(c.coordinates[c.coordinates.length-1-p]):i.push(c.coordinates[p]);o=i[0],a=i[i.length-1]}i.push(i[0]);var f=new l.Polygon([i]),d=new S.a({geometry:f});d.color=this.lastAnnotationStyle.color,d.fillColor=this.lastAnnotationStyle.fillColor,d.penSize=this.lastAnnotationStyle.penSize,d.icon=this.lastAnnotationStyle.iconPath,F.call(this,d,!1),this.viewport.annotationsLayer.getSource().addFeatures([d]),this.clearSelection()}}},{key:"booleanUnion",value:function(t){var e=this;if(t)if(t.length<2)console.error("This operation requires at least 2 annotations");else{var n=[],i=[],o=new r.GeoJSON,a={featureProjection:this.viewport.map.getView().getProjection()},s="";t.forEach(function(t){s+=t.metaData.Notes?t.metaData.Notes+" ":""});for(var l=t[0].metaData.Color?t[0].metaData.Color:t[0].color,u=t[0].metaData.FillColor?t[0].metaData.FillColor:t[0].fillColor,c=t[0].metaData.LineThickness?t[0].metaData.LineThickness:t[0].penSize,h=t[0].icon,p=0;p<t.length;p++){var f=t[p];if("Polygon"!==f.getGeometry().getType()&&"MultiPolygon"!==f.getGeometry().getType())return void console.error("Selection contains non-polygon geometry");var d=o.writeFeatureObject(f,a);n.push(d),i.push(d)}var g=_.a.apply(void 0,i);if("FeatureCollection"===g.type)throw"Feature collection detected";if("MultiPolygon"===g.geometry.type)g.geometry.coordinates.forEach(function(t){var n={type:"Polygon",coordinates:t},r=o.readFeature(n,a);r.color=l,r.fillColor=u,r.penSize=c,r.icon=h,r.notes=s||"",F.call(e,r,!1),e.viewport.annotationsLayer.getSource().addFeatures([r])});else{var y=o.readFeature(g,a);y.color=l,y.fillColor=u,y.penSize=c,y.icon=h,y.notes=s||"",F.call(this,y,!1),this.viewport.annotationsLayer.getSource().addFeatures([y])}n.forEach(function(t){e.deleteAnnotation(t.id)})}else console.error("No annotations provided")}},{key:"booleanDifference",value:function(t,e){var n=this;if(t&&e){var i=new r.GeoJSON,o={featureProjection:this.viewport.map.getView().getProjection()},a="";a+=t.metaData.Notes?t.metaData.Notes+" ":"",a+=e.metaData.Notes?e.metaData.Notes+" ":"";var s,l,u=t.metaData.Color?t.metaData.Color:t.color,c=t.metaData.FillColor?t.metaData.FillColor:t.fillColor,h=t.metaData.LineThickness?t.metaData.LineThickness:t.penSize,p=t.icon,f=[],d=[],g=[];if("Polygon"===t.getGeometry().getType()){var y=i.writeFeatureObject(t,o);if(s=y.id,f.push(y),"Polygon"===e.getGeometry().getType()){var m=i.writeFeatureObject(e,o);l=m.id,d.push(m),f.forEach(function(t){d.forEach(function(e){if(Object(w.a)(t,e)){var n=Object(b.a)(t,e);if(n){if("FeatureCollection"===n.type)throw"Feature collection detected";g.push(n)}else console.error("Nullified geometry")}else console.error("Non-intersecting geometry")})}),g.length>0&&(g.forEach(function(t){if("MultiPolygon"!==t.geometry.type){var e=i.readFeature(t,o);return e.color=u,e.fillColor=c,e.penSize=h,e.icon=p,e.notes=a||"",F.call(n,e,!1),n.viewport.annotationsLayer.getSource().addFeatures([e]),e}t.geometry.coordinates.forEach(function(t){var e={type:"Polygon",coordinates:t},r=i.readFeature(e,o);r.color=u,r.fillColor=c,r.penSize=h,r.icon=p,r.notes=a||"",F.call(n,r,!1),n.viewport.annotationsLayer.getSource().addFeatures([r])})}),this.deleteAnnotation(s),this.deleteAnnotation(l))}else console.error("Annotation contains non-polygon geometry")}else console.error("Annotation contains non-polygon geometry")}else console.error("No annotations provided")}},{key:"saveTransformedAnnotations",value:function(t){!(arguments.length>1&&void 0!==arguments[1])||arguments[1]?(t.color=t.metaData.Color,t.penSize=t.metaData.LineThickness,t.fillColor=t.metaData.FillColor,F.call(this,t,!0)):F.call(this,t,!1)}},{key:"enterTransformMode",value:function(t){var e=t,n=new O.a({layers:[this.viewport.annotationsLayer],enableRotatedTransform:!1,translateFeature:!0,scale:!0,rotate:!0,keepAspectRatio:!1,translate:!0,stretch:!0});this.edit=n,this.viewport.map.addInteraction(n),e&&n.select(e,!0)}},{key:"enterModifyMode",value:function(t){var e=t,n=new i.Modify({source:this.viewport.annotationsLayer.getSource()});this.edit=n,this.viewport.map.addInteraction(n),annotationManager.selectInteraction.on("select",function(t){e&&(annotationManager.saveTransformedAnnotations(e),annotationManager.viewport.map.removeInteraction(n),e=null)})}},{key:"enterMagicWandMode",value:function(t){if(t){var e=new E.a({layers:[this.viewport.gridLayer],hatchLength:4,hatchTimeout:300,waitClass:"magic-wand-loading",addClass:"magic-wand-add"});this.edit=e,this.edit.options=t,this.viewport.map.addInteraction(e)}else console.error("No style options provided.")}},{key:"saveMagicWandAnnotation",value:function(){var t=annotationManager.edit.getContours(5,50);if(t){var e=t.map(function(t){return t.points.map(function(t){return annotationManager.viewport.map.getCoordinateFromPixel([t.x,t.y])})}),n=new S.a({geometry:new l.Polygon(e)});n.color=annotationManager.edit.options.color,n.fillColor=annotationManager.edit.options.fillColor,n.penSize=annotationManager.edit.options.penSize,n.icon=annotationManager.edit.options.icon,n.notes=annotationManager.edit.options.notes,annotationManager.saveTransformedAnnotations(n,!1),annotationManager.viewport.annotationsLayer.getSource().addFeatures([n]),annotationManager.viewport.annotationsLayer.setVisible(!0)}}},{key:"enterBrushMode",value:function(t,e,n){var r=this;n||(n={brushSize:500,brushType:"circle",brushStep:50});var i=new x.a({map:this.viewport.map,feature:e,layer:this.viewport.annotationsLayer,brushSize:n.brushSize,brushType:n.brushType,brushMode:t?"eraser":"brush"});i.addEventListener("drawing",function(t){if(null!=t.target.getId())r.deleteAnnotation(t.target.getId()),null!==t.target.getFeature()&&(F.call(r,t.target.getFeature(),!1),r.viewport.annotationsLayer.getSource().addFeature(t.target.getFeature()));else if(null!==t.target.getFeature()){var e=t.target.getFeature();F.call(r,e,!0),e.color=e.metaData.Color,e.fillColor=e.metaData.FillColor,e.penSize=e.metaData.LineThickness,e.notes=e.metaData.Notes?e.metaData.Notes:"",e.changed()}}),this.edit=i,this.edit.options={brushStep:n.brushStep},this.viewport.map.addInteraction(i)}},{key:"enterEditMode",value:function(t){if(this.getEnabled())if(this.editing)console.error("Editing already in progress. Finish editing before starting a new one.");else switch(this.editing=!0,this.fireEvent(g.c.AnnotationEditingStarted),A.call(this,!0,t.type,t.feature),t.type){case d.f.Modify:this.enterModifyMode(t.feature);break;case d.f.Transform:this.enterTransformMode(t.feature);break;case d.f.Wand:if("undefined"===typeof t.color||"undefined"===typeof t.fillColor||"undefined"===typeof t.penWidth||"undefined"===typeof t.iconRelativePath||"undefined"===typeof t.notes){console.error("Required parameters missing!"),this.editing=!1,A.call(this,!1,null,null);break}this.enterMagicWandMode({color:t.color,fillColor:t.fillColor,penWidth:t.penWidth,iconRelativePath:t.iconRelativePath,notes:t.notes});break;case d.f.Brush:this.enterBrushMode(!1,t.feature,{brushType:t.brushType,brushSize:t.brushSize,brushStep:t.brushStep});break;case d.f.Eraser:this.enterBrushMode(!0,t.feature,{brushType:t.brushType,brushSize:t.brushSize,brushStep:t.brushStep});break;default:this.editing=!1,A.call(this,!1,null,null)}}},{key:"stopEditing",value:function(){this.editing&&null!=this.edit&&(A.call(this,!1,null,null),"function"===typeof this.edit.stopEditing&&this.edit.stopEditing(),this.editing=!1),D.call(this),this.fireEvent(g.c.AnnotationEditingEnded)}}])&&C(e.prototype,n),o&&C(e,o),t}()},function(t,e,n){"use strict";var r,i,o,a,s,l;window.jscolor||(window.jscolor=((l={register:function(){l.attachDOMReadyEvent(l.init),l.attachEvent(document,"mousedown",l.onDocumentMouseDown),l.attachEvent(document,"touchstart",l.onDocumentTouchStart),l.attachEvent(window,"resize",l.onWindowResize)},init:function(){l.jscolor.lookupClass&&l.jscolor.installByClassName(l.jscolor.lookupClass)},tryInstallOnElements:function(t,e){for(var n=new RegExp("(^|\\s)("+e+")(\\s*(\\{[^}]*\\})|\\s|$)","i"),r=0;r<t.length;r+=1){var i;if(void 0===t[r].type||"color"!=t[r].type.toLowerCase()||!l.isColorAttrSupported)if(!t[r].jscolor&&t[r].className&&(i=t[r].className.match(n))){var o=t[r],a=null,s=l.getDataAttr(o,"jscolor");null!==s?a=s:i[4]&&(a=i[4]);var u={};if(a)try{u=new Function("return ("+a+")")()}catch(t){l.warn("Error parsing jscolor options: "+t+":\n"+a)}o.jscolor=new l.jscolor(o,u)}}},isColorAttrSupported:(s=document.createElement("input"),!(!s.setAttribute||(s.setAttribute("type","color"),"color"!=s.type.toLowerCase()))),isCanvasSupported:function(){var t=document.createElement("canvas");return!(!t.getContext||!t.getContext("2d"))}(),fetchElement:function(t){return"string"===typeof t?document.getElementById(t):t},isElementType:function(t,e){return t.nodeName.toLowerCase()===e.toLowerCase()},getDataAttr:function(t,e){var n="data-"+e,r=t.getAttribute(n);return null!==r?r:null},attachEvent:function(t,e,n){t.addEventListener?t.addEventListener(e,n,!1):t.attachEvent&&t.attachEvent("on"+e,n)},detachEvent:function(t,e,n){t.removeEventListener?t.removeEventListener(e,n,!1):t.detachEvent&&t.detachEvent("on"+e,n)},_attachedGroupEvents:{},attachGroupEvent:function(t,e,n,r){l._attachedGroupEvents.hasOwnProperty(t)||(l._attachedGroupEvents[t]=[]),l._attachedGroupEvents[t].push([e,n,r]),l.attachEvent(e,n,r)},detachGroupEvents:function(t){if(l._attachedGroupEvents.hasOwnProperty(t)){for(var e=0;e<l._attachedGroupEvents[t].length;e+=1){var n=l._attachedGroupEvents[t][e];l.detachEvent(n[0],n[1],n[2])}delete l._attachedGroupEvents[t]}},attachDOMReadyEvent:function(t){var e=!1,n=function(){e||(e=!0,t())};if("complete"!==document.readyState){if(document.addEventListener)document.addEventListener("DOMContentLoaded",n,!1),window.addEventListener("load",n,!1);else if(document.attachEvent&&(document.attachEvent("onreadystatechange",function(){"complete"===document.readyState&&(document.detachEvent("onreadystatechange",arguments.callee),n())}),window.attachEvent("onload",n),document.documentElement.doScroll&&window==window.top)){!function t(){if(document.body)try{document.documentElement.doScroll("left"),n()}catch(e){setTimeout(t,1)}}()}}else setTimeout(n,1)},warn:function(t){window.console&&window.console.warn&&window.console.warn(t)},preventDefault:function(t){t.preventDefault&&t.preventDefault(),t.returnValue=!1},captureTarget:function(t){t.setCapture&&(l._capturedTarget=t,l._capturedTarget.setCapture())},releaseTarget:function(){l._capturedTarget&&(l._capturedTarget.releaseCapture(),l._capturedTarget=null)},fireEvent:function(t,e){if(t)if(document.createEvent)(n=document.createEvent("HTMLEvents")).initEvent(e,!0,!0),t.dispatchEvent(n);else if(document.createEventObject){var n=document.createEventObject();t.fireEvent("on"+e,n)}else t["on"+e]&&t["on"+e]()},classNameToList:function(t){return t.replace(/^\s+|\s+$/g,"").split(/\s+/)},hasClass:function(t,e){return!!e&&-1!=(" "+t.className.replace(/\s+/g," ")+" ").indexOf(" "+e+" ")},setClass:function(t,e){for(var n=l.classNameToList(e),r=0;r<n.length;r+=1)l.hasClass(t,n[r])||(t.className+=(t.className?" ":"")+n[r])},unsetClass:function(t,e){for(var n=l.classNameToList(e),r=0;r<n.length;r+=1){var i=new RegExp("^\\s*"+n[r]+"\\s*|\\s*"+n[r]+"\\s*$|\\s+"+n[r]+"(\\s+)","g");t.className=t.className.replace(i,"$1")}},getStyle:function(t){return window.getComputedStyle?window.getComputedStyle(t):t.currentStyle},setStyle:(i=document.createElement("div"),o=function(t){for(var e=0;e<t.length;e+=1)if(t[e]in i.style)return t[e]},a={borderRadius:o(["borderRadius","MozBorderRadius","webkitBorderRadius"]),boxShadow:o(["boxShadow","MozBoxShadow","webkitBoxShadow"])},function(t,e,n){switch(e.toLowerCase()){case"opacity":var r=Math.round(100*parseFloat(n));t.style.opacity=n,t.style.filter="alpha(opacity="+r+")";break;default:t.style[a[e]]=n}}),setBorderRadius:function(t,e){l.setStyle(t,"borderRadius",e||"0")},setBoxShadow:function(t,e){l.setStyle(t,"boxShadow",e||"none")},getElementPos:function(t,e){var n=0,r=0,i=t.getBoundingClientRect();if(n=i.left,r=i.top,!e){var o=l.getViewPos();n+=o[0],r+=o[1]}return[n,r]},getElementSize:function(t){return[t.offsetWidth,t.offsetHeight]},getAbsPointerPos:function(t){t||(t=window.event);var e=0,n=0;return"undefined"!==typeof t.changedTouches&&t.changedTouches.length?(e=t.changedTouches[0].clientX,n=t.changedTouches[0].clientY):"number"===typeof t.clientX&&(e=t.clientX,n=t.clientY),{x:e,y:n}},getRelPointerPos:function(t){t||(t=window.event);var e=(t.target||t.srcElement).getBoundingClientRect(),n=0,r=0;return"undefined"!==typeof t.changedTouches&&t.changedTouches.length?(n=t.changedTouches[0].clientX,r=t.changedTouches[0].clientY):"number"===typeof t.clientX&&(n=t.clientX,r=t.clientY),{x:n-e.left,y:r-e.top}},getViewPos:function(){var t=document.documentElement;return[(window.pageXOffset||t.scrollLeft)-(t.clientLeft||0),(window.pageYOffset||t.scrollTop)-(t.clientTop||0)]},getViewSize:function(){var t=document.documentElement;return[window.innerWidth||t.clientWidth,window.innerHeight||t.clientHeight]},redrawPosition:function(){if(l.picker&&l.picker.owner){var t,e,n=l.picker.owner;n.fixed?(t=l.getElementPos(n.targetElement,!0),e=[0,0]):(t=l.getElementPos(n.targetElement),e=l.getViewPos());var r,i,o,a=l.getElementSize(n.targetElement),s=l.getViewSize(),u=l.getPickerOuterDims(n);switch(n.position.toLowerCase()){case"left":r=1,i=0,o=-1;break;case"right":r=1,i=0,o=1;break;case"top":r=0,i=1,o=-1;break;default:r=0,i=1,o=1}var c=(a[i]+u[i])/2;if(n.smartPosition)h=[-e[r]+t[r]+u[r]>s[r]&&-e[r]+t[r]+a[r]/2>s[r]/2&&t[r]+a[r]-u[r]>=0?t[r]+a[r]-u[r]:t[r],-e[i]+t[i]+a[i]+u[i]-c+c*o>s[i]?-e[i]+t[i]+a[i]/2>s[i]/2&&t[i]+a[i]-c-c*o>=0?t[i]+a[i]-c-c*o:t[i]+a[i]-c+c*o:t[i]+a[i]-c+c*o>=0?t[i]+a[i]-c+c*o:t[i]+a[i]-c-c*o];else var h=[t[r],t[i]+a[i]-c+c*o];var p=h[r],f=h[i],d=n.fixed?"fixed":"absolute",g=(h[0]+u[0]>t[0]||h[0]<t[0]+a[0])&&h[1]+u[1]<t[1]+a[1];l._drawPosition(n,p,f,d,g)}},_drawPosition:function(t,e,n,r,i){var o=i?0:t.shadowBlur;l.picker.wrap.style.position=r,l.picker.wrap.style.left=e+"px",l.picker.wrap.style.top=n+"px",l.setBoxShadow(l.picker.boxS,t.shadow?new l.BoxShadow(0,o,t.shadowBlur,0,t.shadowColor):null)},getPickerDims:function(t){var e=!!l.getSliderComponent(t);return[2*t.insetWidth+2*t.padding+t.width+(e?2*t.insetWidth+l.getPadToSliderPadding(t)+t.sliderSize:0),2*t.insetWidth+2*t.padding+t.height+(t.closable?2*t.insetWidth+t.padding+t.buttonHeight:0)]},getPickerOuterDims:function(t){var e=l.getPickerDims(t);return[e[0]+2*t.borderWidth,e[1]+2*t.borderWidth]},getPadToSliderPadding:function(t){return Math.max(t.padding,1.5*(2*t.pointerBorderWidth+t.pointerThickness))},getPadYComponent:function(t){switch(t.mode.charAt(1).toLowerCase()){case"v":return"v"}return"s"},getSliderComponent:function(t){if(t.mode.length>2)switch(t.mode.charAt(2).toLowerCase()){case"s":return"s";case"v":return"v"}return null},onDocumentMouseDown:function(t){t||(t=window.event);var e=t.target||t.srcElement;e._jscLinkedInstance?e._jscLinkedInstance.showOnClick&&e._jscLinkedInstance.show():e._jscControlName?l.onControlPointerStart(t,e,e._jscControlName,"mouse"):l.picker&&l.picker.owner&&l.picker.owner.hide()},onDocumentTouchStart:function(t){t||(t=window.event);var e=t.target||t.srcElement;e._jscLinkedInstance?e._jscLinkedInstance.showOnClick&&e._jscLinkedInstance.show():e._jscControlName?l.onControlPointerStart(t,e,e._jscControlName,"touch"):l.picker&&l.picker.owner&&l.picker.owner.hide()},onWindowResize:function(t){l.redrawPosition()},onParentScroll:function(t){l.picker&&l.picker.owner&&l.picker.owner.hide()},_pointerMoveEvent:{mouse:"mousemove",touch:"touchmove"},_pointerEndEvent:{mouse:"mouseup",touch:"touchend"},_pointerOrigin:null,_capturedTarget:null,onControlPointerStart:function(t,e,n,r){var i=e._jscInstance;l.preventDefault(t),l.captureTarget(e);var o=function(i,o){l.attachGroupEvent("drag",i,l._pointerMoveEvent[r],l.onDocumentPointerMove(t,e,n,r,o)),l.attachGroupEvent("drag",i,l._pointerEndEvent[r],l.onDocumentPointerEnd(t,e,n,r))};if(o(document,[0,0]),window.parent&&window.frameElement){var a=window.frameElement.getBoundingClientRect(),s=[-a.left,-a.top];o(window.parent.window.document,s)}var u=l.getAbsPointerPos(t),c=l.getRelPointerPos(t);switch(l._pointerOrigin={x:u.x-c.x,y:u.y-c.y},n){case"pad":switch(l.getSliderComponent(i)){case"s":0===i.hsv[1]&&i.fromHSV(null,100,null);break;case"v":0===i.hsv[2]&&i.fromHSV(null,null,100)}l.setPad(i,t,0,0);break;case"sld":l.setSld(i,t,0)}l.dispatchFineChange(i)},onDocumentPointerMove:function(t,e,n,r,i){return function(t){var r=e._jscInstance;switch(n){case"pad":t||(t=window.event),l.setPad(r,t,i[0],i[1]),l.dispatchFineChange(r);break;case"sld":t||(t=window.event),l.setSld(r,t,i[1]),l.dispatchFineChange(r)}}},onDocumentPointerEnd:function(t,e,n,r){return function(t){var n=e._jscInstance;l.detachGroupEvents("drag"),l.releaseTarget(),l.dispatchChange(n)}},dispatchChange:function(t){t.valueElement&&l.isElementType(t.valueElement,"input")&&l.fireEvent(t.valueElement,"change")},dispatchFineChange:function(t){t.onFineChange&&("string"===typeof t.onFineChange?new Function(t.onFineChange):t.onFineChange).call(t)},setPad:function(t,e,n,r){var i=l.getAbsPointerPos(e),o=n+i.x-l._pointerOrigin.x-t.padding-t.insetWidth,a=r+i.y-l._pointerOrigin.y-t.padding-t.insetWidth,s=o*(360/(t.width-1)),u=100-a*(100/(t.height-1));switch(l.getPadYComponent(t)){case"s":t.fromHSV(s,u,null,l.leaveSld);break;case"v":t.fromHSV(s,null,u,l.leaveSld)}},setSld:function(t,e,n){var r=100-(n+l.getAbsPointerPos(e).y-l._pointerOrigin.y-t.padding-t.insetWidth)*(100/(t.height-1));switch(l.getSliderComponent(t)){case"s":t.fromHSV(null,r,null,l.leavePad);break;case"v":t.fromHSV(null,null,r,l.leavePad)}},_vmlNS:"jsc_vml_",_vmlCSS:"jsc_vml_css_",_vmlReady:!1,initVML:function(){if(!l._vmlReady){var t=document;if(t.namespaces[l._vmlNS]||t.namespaces.add(l._vmlNS,"urn:schemas-microsoft-com:vml"),!t.styleSheets[l._vmlCSS]){var e=["shape","shapetype","group","background","path","formulas","handles","fill","stroke","shadow","textbox","textpath","imagedata","line","polyline","curve","rect","roundrect","oval","arc","image"],n=t.createStyleSheet();n.owningElement.id=l._vmlCSS;for(var r=0;r<e.length;r+=1)n.addRule(l._vmlNS+"\\:"+e[r],"behavior:url(#default#VML);")}l._vmlReady=!0}},createPalette:function(){var t={elm:null,draw:null};if(l.isCanvasSupported){var e=document.createElement("canvas"),n=e.getContext("2d"),r=function(t,r,i){e.width=t,e.height=r,n.clearRect(0,0,e.width,e.height);var o=n.createLinearGradient(0,0,e.width,0);o.addColorStop(0,"#F00"),o.addColorStop(1/6,"#FF0"),o.addColorStop(2/6,"#0F0"),o.addColorStop(.5,"#0FF"),o.addColorStop(4/6,"#00F"),o.addColorStop(5/6,"#F0F"),o.addColorStop(1,"#F00"),n.fillStyle=o,n.fillRect(0,0,e.width,e.height);var a=n.createLinearGradient(0,0,0,e.height);switch(i.toLowerCase()){case"s":a.addColorStop(0,"rgba(255,255,255,0)"),a.addColorStop(1,"rgba(255,255,255,1)");break;case"v":a.addColorStop(0,"rgba(0,0,0,0)"),a.addColorStop(1,"rgba(0,0,0,1)")}n.fillStyle=a,n.fillRect(0,0,e.width,e.height)};t.elm=e,t.draw=r}else{l.initVML();var i=document.createElement("div");i.style.position="relative",i.style.overflow="hidden";var o=document.createElement(l._vmlNS+":fill");o.type="gradient",o.method="linear",o.angle="90",o.colors="16.67% #F0F, 33.33% #00F, 50% #0FF, 66.67% #0F0, 83.33% #FF0";var a=document.createElement(l._vmlNS+":rect");a.style.position="absolute",a.style.left="-1px",a.style.top="-1px",a.stroked=!1,a.appendChild(o),i.appendChild(a);var s=document.createElement(l._vmlNS+":fill");s.type="gradient",s.method="linear",s.angle="180",s.opacity="0";var u=document.createElement(l._vmlNS+":rect");u.style.position="absolute",u.style.left="-1px",u.style.top="-1px",u.stroked=!1,u.appendChild(s),i.appendChild(u);r=function(t,e,n){switch(i.style.width=t+"px",i.style.height=e+"px",a.style.width=u.style.width=t+1+"px",a.style.height=u.style.height=e+1+"px",o.color="#F00",o.color2="#F00",n.toLowerCase()){case"s":s.color=s.color2="#FFF";break;case"v":s.color=s.color2="#000"}};t.elm=i,t.draw=r}return t},createSliderGradient:function(){var t={elm:null,draw:null};if(l.isCanvasSupported){var e=document.createElement("canvas"),n=e.getContext("2d"),r=function(t,r,i,o){e.width=t,e.height=r,n.clearRect(0,0,e.width,e.height);var a=n.createLinearGradient(0,0,0,e.height);a.addColorStop(0,i),a.addColorStop(1,o),n.fillStyle=a,n.fillRect(0,0,e.width,e.height)};t.elm=e,t.draw=r}else{l.initVML();var i=document.createElement("div");i.style.position="relative",i.style.overflow="hidden";var o=document.createElement(l._vmlNS+":fill");o.type="gradient",o.method="linear",o.angle="180";var a=document.createElement(l._vmlNS+":rect");a.style.position="absolute",a.style.left="-1px",a.style.top="-1px",a.stroked=!1,a.appendChild(o),i.appendChild(a);r=function(t,e,n,r){i.style.width=t+"px",i.style.height=e+"px",a.style.width=t+1+"px",a.style.height=e+1+"px",o.color=n,o.color2=r};t.elm=i,t.draw=r}return t},leaveValue:1,leaveStyle:2,leavePad:4,leaveSld:8,BoxShadow:(r=function(t,e,n,r,i,o){this.hShadow=t,this.vShadow=e,this.blur=n,this.spread=r,this.color=i,this.inset=!!o},r.prototype.toString=function(){var t=[Math.round(this.hShadow)+"px",Math.round(this.vShadow)+"px",Math.round(this.blur)+"px",Math.round(this.spread)+"px",this.color];return this.inset&&t.push("inset"),t.join(" ")},r),jscolor:function(t,e){for(var n in this.value=null,this.valueElement=t,this.styleElement=t,this.required=!0,this.refine=!0,this.hash=!1,this.uppercase=!0,this.onFineChange=null,this.activeClass="jscolor-active",this.minS=0,this.maxS=100,this.minV=0,this.maxV=100,this.hsv=[0,0,100],this.rgb=[255,255,255],this.width=181,this.height=101,this.showOnClick=!0,this.mode="HSV",this.position="bottom",this.smartPosition=!0,this.sliderSize=16,this.crossSize=8,this.closable=!1,this.closeText="Close",this.buttonColor="#000000",this.buttonHeight=18,this.padding=12,this.backgroundColor="#FFFFFF",this.borderWidth=1,this.borderColor="#BBBBBB",this.borderRadius=8,this.insetWidth=1,this.insetColor="#BBBBBB",this.shadow=!0,this.shadowBlur=15,this.shadowColor="rgba(0,0,0,0.2)",this.pointerColor="#4C4C4C",this.pointerBorderColor="#FFFFFF",this.pointerBorderWidth=1,this.pointerThickness=2,this.zIndex=1e4,this.container=null,e)e.hasOwnProperty(n)&&(this[n]=e[n]);function r(t,e,n){var r=n/100*255;if(null===t)return[r,r,r];t/=60,e/=100;var i=Math.floor(t),o=r*(1-e),a=r*(1-e*(i%2?t-i:1-(t-i)));switch(i){case 6:case 0:return[r,a,o];case 1:return[a,r,o];case 2:return[o,r,a];case 3:return[o,a,r];case 4:return[a,o,r];case 5:return[r,o,a]}}function i(){h._processParentElementsInDOM(),l.picker||(l.picker={owner:null,wrap:document.createElement("div"),box:document.createElement("div"),boxS:document.createElement("div"),boxB:document.createElement("div"),pad:document.createElement("div"),padB:document.createElement("div"),padM:document.createElement("div"),padPal:l.createPalette(),cross:document.createElement("div"),crossBY:document.createElement("div"),crossBX:document.createElement("div"),crossLY:document.createElement("div"),crossLX:document.createElement("div"),sld:document.createElement("div"),sldB:document.createElement("div"),sldM:document.createElement("div"),sldGrad:l.createSliderGradient(),sldPtrS:document.createElement("div"),sldPtrIB:document.createElement("div"),sldPtrMB:document.createElement("div"),sldPtrOB:document.createElement("div"),btn:document.createElement("div"),btnT:document.createElement("span")},l.picker.pad.appendChild(l.picker.padPal.elm),l.picker.padB.appendChild(l.picker.pad),l.picker.cross.appendChild(l.picker.crossBY),l.picker.cross.appendChild(l.picker.crossBX),l.picker.cross.appendChild(l.picker.crossLY),l.picker.cross.appendChild(l.picker.crossLX),l.picker.padB.appendChild(l.picker.cross),l.picker.box.appendChild(l.picker.padB),l.picker.box.appendChild(l.picker.padM),l.picker.sld.appendChild(l.picker.sldGrad.elm),l.picker.sldB.appendChild(l.picker.sld),l.picker.sldB.appendChild(l.picker.sldPtrOB),l.picker.sldPtrOB.appendChild(l.picker.sldPtrMB),l.picker.sldPtrMB.appendChild(l.picker.sldPtrIB),l.picker.sldPtrIB.appendChild(l.picker.sldPtrS),l.picker.box.appendChild(l.picker.sldB),l.picker.box.appendChild(l.picker.sldM),l.picker.btn.appendChild(l.picker.btnT),l.picker.box.appendChild(l.picker.btn),l.picker.boxB.appendChild(l.picker.box),l.picker.wrap.appendChild(l.picker.boxS),l.picker.wrap.appendChild(l.picker.boxB));var t,e,n=l.picker,r=!!l.getSliderComponent(h),i=l.getPickerDims(h),s=2*h.pointerBorderWidth+h.pointerThickness+2*h.crossSize,u=l.getPadToSliderPadding(h),c=Math.min(h.borderRadius,Math.round(h.padding*Math.PI));n.wrap.style.clear="both",n.wrap.style.width=i[0]+2*h.borderWidth+"px",n.wrap.style.height=i[1]+2*h.borderWidth+"px",n.wrap.style.zIndex=h.zIndex,n.box.style.width=i[0]+"px",n.box.style.height=i[1]+"px",n.boxS.style.position="absolute",n.boxS.style.left="0",n.boxS.style.top="0",n.boxS.style.width="100%",n.boxS.style.height="100%",l.setBorderRadius(n.boxS,c+"px"),n.boxB.style.position="relative",n.boxB.style.border=h.borderWidth+"px solid",n.boxB.style.borderColor=h.borderColor,n.boxB.style.background=h.backgroundColor,l.setBorderRadius(n.boxB,c+"px"),n.padM.style.background=n.sldM.style.background="#FFF",l.setStyle(n.padM,"opacity","0"),l.setStyle(n.sldM,"opacity","0"),n.pad.style.position="relative",n.pad.style.width=h.width+"px",n.pad.style.height=h.height+"px",n.padPal.draw(h.width,h.height,l.getPadYComponent(h)),n.padB.style.position="absolute",n.padB.style.left=h.padding+"px",n.padB.style.top=h.padding+"px",n.padB.style.border=h.insetWidth+"px solid",n.padB.style.borderColor=h.insetColor,n.padM._jscInstance=h,n.padM._jscControlName="pad",n.padM.style.position="absolute",n.padM.style.left="0",n.padM.style.top="0",n.padM.style.width=h.padding+2*h.insetWidth+h.width+u/2+"px",n.padM.style.height=i[1]+"px",n.padM.style.cursor="crosshair",n.cross.style.position="absolute",n.cross.style.left=n.cross.style.top="0",n.cross.style.width=n.cross.style.height=s+"px",n.crossBY.style.position=n.crossBX.style.position="absolute",n.crossBY.style.background=n.crossBX.style.background=h.pointerBorderColor,n.crossBY.style.width=n.crossBX.style.height=2*h.pointerBorderWidth+h.pointerThickness+"px",n.crossBY.style.height=n.crossBX.style.width=s+"px",n.crossBY.style.left=n.crossBX.style.top=Math.floor(s/2)-Math.floor(h.pointerThickness/2)-h.pointerBorderWidth+"px",n.crossBY.style.top=n.crossBX.style.left="0",n.crossLY.style.position=n.crossLX.style.position="absolute",n.crossLY.style.background=n.crossLX.style.background=h.pointerColor,n.crossLY.style.height=n.crossLX.style.width=s-2*h.pointerBorderWidth+"px",n.crossLY.style.width=n.crossLX.style.height=h.pointerThickness+"px",n.crossLY.style.left=n.crossLX.style.top=Math.floor(s/2)-Math.floor(h.pointerThickness/2)+"px",n.crossLY.style.top=n.crossLX.style.left=h.pointerBorderWidth+"px",n.sld.style.overflow="hidden",n.sld.style.width=h.sliderSize+"px",n.sld.style.height=h.height+"px",n.sldGrad.draw(h.sliderSize,h.height,"#000","#000"),n.sldB.style.display=r?"block":"none",n.sldB.style.position="absolute",n.sldB.style.right=h.padding+"px",n.sldB.style.top=h.padding+"px",n.sldB.style.border=h.insetWidth+"px solid",n.sldB.style.borderColor=h.insetColor,n.sldM._jscInstance=h,n.sldM._jscControlName="sld",n.sldM.style.display=r?"block":"none",n.sldM.style.position="absolute",n.sldM.style.right="0",n.sldM.style.top="0",n.sldM.style.width=h.sliderSize+u/2+h.padding+2*h.insetWidth+"px",n.sldM.style.height=i[1]+"px",n.sldM.style.cursor="default",n.sldPtrIB.style.border=n.sldPtrOB.style.border=h.pointerBorderWidth+"px solid "+h.pointerBorderColor,n.sldPtrOB.style.position="absolute",n.sldPtrOB.style.left=-(2*h.pointerBorderWidth+h.pointerThickness)+"px",n.sldPtrOB.style.top="0",n.sldPtrMB.style.border=h.pointerThickness+"px solid "+h.pointerColor,n.sldPtrS.style.width=h.sliderSize+"px",n.sldPtrS.style.height=f+"px",n.btn.style.display=h.closable?"block":"none",n.btn.style.position="absolute",n.btn.style.left=h.padding+"px",n.btn.style.bottom=h.padding+"px",n.btn.style.padding="0 15px",n.btn.style.height=h.buttonHeight+"px",n.btn.style.border=h.insetWidth+"px solid",t=h.insetColor.split(/\s+/),e=t.length<2?t[0]:t[1]+" "+t[0]+" "+t[0]+" "+t[1],n.btn.style.borderColor=e,n.btn.style.color=h.buttonColor,n.btn.style.font="12px sans-serif",n.btn.style.textAlign="center";try{n.btn.style.cursor="pointer"}catch(t){n.btn.style.cursor="hand"}n.btn.onmousedown=function(){h.hide()},n.btnT.style.lineHeight=h.buttonHeight+"px",n.btnT.innerHTML="",n.btnT.appendChild(document.createTextNode(h.closeText)),o(),a(),l.picker.owner&&l.picker.owner!==h&&l.unsetClass(l.picker.owner.targetElement,h.activeClass),l.picker.owner=h,l.isElementType(p,"body")?l.redrawPosition():l._drawPosition(h,0,0,"relative",!1),n.wrap.parentNode!=p&&p.appendChild(n.wrap),l.setClass(h.targetElement,h.activeClass)}function o(){switch(l.getPadYComponent(h)){case"s":var t=1;break;case"v":t=2}var e=Math.round(h.hsv[0]/360*(h.width-1)),n=Math.round((1-h.hsv[t]/100)*(h.height-1)),i=2*h.pointerBorderWidth+h.pointerThickness+2*h.crossSize,o=-Math.floor(i/2);switch(l.picker.cross.style.left=e+o+"px",l.picker.cross.style.top=n+o+"px",l.getSliderComponent(h)){case"s":var a=r(h.hsv[0],100,h.hsv[2]),s=r(h.hsv[0],0,h.hsv[2]),u="rgb("+Math.round(a[0])+","+Math.round(a[1])+","+Math.round(a[2])+")",c="rgb("+Math.round(s[0])+","+Math.round(s[1])+","+Math.round(s[2])+")";l.picker.sldGrad.draw(h.sliderSize,h.height,u,c);break;case"v":var p=r(h.hsv[0],h.hsv[1],100);u="rgb("+Math.round(p[0])+","+Math.round(p[1])+","+Math.round(p[2])+")",c="#000";l.picker.sldGrad.draw(h.sliderSize,h.height,u,c)}}function a(){var t=l.getSliderComponent(h);if(t){switch(t){case"s":var e=1;break;case"v":e=2}var n=Math.round((1-h.hsv[e]/100)*(h.height-1));l.picker.sldPtrOB.style.top=n-(2*h.pointerBorderWidth+h.pointerThickness)-Math.floor(f/2)+"px"}}function s(){return l.picker&&l.picker.owner===h}if(this.hide=function(){s()&&(l.unsetClass(h.targetElement,h.activeClass),l.picker.wrap.parentNode.removeChild(l.picker.wrap),delete l.picker.owner)},this.show=function(){i()},this.redraw=function(){s()&&i()},this.importColor=function(){this.valueElement&&l.isElementType(this.valueElement,"input")?this.refine?!this.required&&/^\s*$/.test(this.valueElement.value)?(this.valueElement.value="",this.styleElement&&(this.styleElement.style.backgroundImage=this.styleElement._jscOrigStyle.backgroundImage,this.styleElement.style.backgroundColor=this.styleElement._jscOrigStyle.backgroundColor,this.styleElement.style.color=this.styleElement._jscOrigStyle.color),this.exportColor(l.leaveValue|l.leaveStyle)):this.fromString(this.valueElement.value)||this.exportColor():this.fromString(this.valueElement.value,l.leaveValue)||(this.styleElement&&(this.styleElement.style.backgroundImage=this.styleElement._jscOrigStyle.backgroundImage,this.styleElement.style.backgroundColor=this.styleElement._jscOrigStyle.backgroundColor,this.styleElement.style.color=this.styleElement._jscOrigStyle.color),this.exportColor(l.leaveValue|l.leaveStyle)):this.exportColor()},this.exportColor=function(t){if(!(t&l.leaveValue)&&this.valueElement){var e=this.toString();this.uppercase&&(e=e.toUpperCase()),this.hash&&(e="#"+e),l.isElementType(this.valueElement,"input")?this.valueElement.value=e:this.valueElement.innerHTML=e}t&l.leaveStyle||this.styleElement&&(this.styleElement.style.backgroundImage="none",this.styleElement.style.backgroundColor="#"+this.toString(),this.styleElement.style.color=this.isLight()?"#000":"#FFF"),t&l.leavePad||!s()||o(),t&l.leaveSld||!s()||a()},this.fromHSV=function(t,e,n,i){if(null!==t){if(isNaN(t))return!1;t=Math.max(0,Math.min(360,t))}if(null!==e){if(isNaN(e))return!1;e=Math.max(0,Math.min(100,this.maxS,e),this.minS)}if(null!==n){if(isNaN(n))return!1;n=Math.max(0,Math.min(100,this.maxV,n),this.minV)}this.rgb=r(null===t?this.hsv[0]:this.hsv[0]=t,null===e?this.hsv[1]:this.hsv[1]=e,null===n?this.hsv[2]:this.hsv[2]=n),this.exportColor(i)},this.fromRGB=function(t,e,n,i){if(null!==t){if(isNaN(t))return!1;t=Math.max(0,Math.min(255,t))}if(null!==e){if(isNaN(e))return!1;e=Math.max(0,Math.min(255,e))}if(null!==n){if(isNaN(n))return!1;n=Math.max(0,Math.min(255,n))}var o=function(t,e,n){t/=255,e/=255,n/=255;var r=Math.min(Math.min(t,e),n),i=Math.max(Math.max(t,e),n),o=i-r;if(0===o)return[null,0,100*i];var a=t===r?3+(n-e)/o:e===r?5+(t-n)/o:1+(e-t)/o;return[60*(6===a?0:a),o/i*100,100*i]}(null===t?this.rgb[0]:t,null===e?this.rgb[1]:e,null===n?this.rgb[2]:n);null!==o[0]&&(this.hsv[0]=Math.max(0,Math.min(360,o[0]))),0!==o[2]&&(this.hsv[1]=null===o[1]?null:Math.max(0,this.minS,Math.min(100,this.maxS,o[1]))),this.hsv[2]=null===o[2]?null:Math.max(0,this.minV,Math.min(100,this.maxV,o[2]));var a=r(this.hsv[0],this.hsv[1],this.hsv[2]);this.rgb[0]=a[0],this.rgb[1]=a[1],this.rgb[2]=a[2],this.exportColor(i)},this.fromString=function(t,e){var n;if(n=t.match(/^\W*([0-9A-F]{3}([0-9A-F]{3})?)\W*$/i))return 6===n[1].length?this.fromRGB(parseInt(n[1].substr(0,2),16),parseInt(n[1].substr(2,2),16),parseInt(n[1].substr(4,2),16),e):this.fromRGB(parseInt(n[1].charAt(0)+n[1].charAt(0),16),parseInt(n[1].charAt(1)+n[1].charAt(1),16),parseInt(n[1].charAt(2)+n[1].charAt(2),16),e),!0;if(n=t.match(/^\W*rgba?\(([^)]*)\)\W*$/i)){var r,i,o,a=n[1].split(","),s=/^\s*(\d*)(\.\d+)?\s*$/;if(a.length>=3&&(r=a[0].match(s))&&(i=a[1].match(s))&&(o=a[2].match(s))){var l=parseFloat((r[1]||"0")+(r[2]||"")),u=parseFloat((i[1]||"0")+(i[2]||"")),c=parseFloat((o[1]||"0")+(o[2]||""));return this.fromRGB(l,u,c,e),!0}}return!1},this.toString=function(){return(256|Math.round(this.rgb[0])).toString(16).substr(1)+(256|Math.round(this.rgb[1])).toString(16).substr(1)+(256|Math.round(this.rgb[2])).toString(16).substr(1)},this.toHEXString=function(){return"#"+this.toString().toUpperCase()},this.toRGBString=function(){return"rgb("+Math.round(this.rgb[0])+","+Math.round(this.rgb[1])+","+Math.round(this.rgb[2])+")"},this.isLight=function(){return.213*this.rgb[0]+.715*this.rgb[1]+.072*this.rgb[2]>127.5},this._processParentElementsInDOM=function(){if(!this._linkedElementsProcessed){this._linkedElementsProcessed=!0;var t=this.targetElement;do{var e=l.getStyle(t);e&&"fixed"===e.position.toLowerCase()&&(this.fixed=!0),t!==this.targetElement&&(t._jscEventsAttached||(l.attachEvent(t,"scroll",l.onParentScroll),t._jscEventsAttached=!0))}while((t=t.parentNode)&&!l.isElementType(t,"body"))}},"string"===typeof t){var u=t,c=document.getElementById(u);c?this.targetElement=c:l.warn("Could not find target element with ID '"+u+"'")}else t?this.targetElement=t:l.warn("Invalid target element: '"+t+"'");if(this.targetElement._jscLinkedInstance)l.warn("Cannot link jscolor twice to the same element. Skipping.");else{this.targetElement._jscLinkedInstance=this,this.valueElement=l.fetchElement(this.valueElement),this.styleElement=l.fetchElement(this.styleElement);var h=this,p=this.container?l.fetchElement(this.container):document.getElementsByTagName("body")[0],f=3;if(l.isElementType(this.targetElement,"button"))if(this.targetElement.onclick){var d=this.targetElement.onclick;this.targetElement.onclick=function(t){return d.call(this,t),!1}}else this.targetElement.onclick=function(){return!1};if(this.valueElement&&l.isElementType(this.valueElement,"input")){var g=function(){h.fromString(h.valueElement.value,l.leaveValue),l.dispatchFineChange(h)};l.attachEvent(this.valueElement,"keyup",g),l.attachEvent(this.valueElement,"input",g),l.attachEvent(this.valueElement,"blur",function(){h.importColor()}),this.valueElement.setAttribute("autocomplete","off")}this.styleElement&&(this.styleElement._jscOrigStyle={backgroundImage:this.styleElement.style.backgroundImage,backgroundColor:this.styleElement.style.backgroundColor,color:this.styleElement.style.color}),this.value?this.fromString(this.value)||this.exportColor():this.importColor()}}}).jscolor.lookupClass="jscolor",l.jscolor.installByClassName=function(t){var e=document.getElementsByTagName("input"),n=document.getElementsByTagName("button");l.tryInstallOnElements(e,t),l.tryInstallOnElements(n,t)},l.register(),l.jscolor))},function(t,e,n){"use strict";var r=n(98),i=n(59);e.a=function(t,e){if(e=e||{},!Object(i.c)(e))throw new Error("options is invalid");var n=e.precision,o=e.coordinates,a=e.mutate;if(n=void 0===n||null===n||isNaN(n)?6:n,o=void 0===o||null===o||isNaN(o)?3:o,!t)throw new Error("<geojson> is required");if("number"!==typeof n)throw new Error("<precision> must be a number");if("number"!==typeof o)throw new Error("<coordinates> must be a number");!1!==a&&void 0!==a||(t=JSON.parse(JSON.stringify(t)));var s=Math.pow(10,n);return Object(r.a)(t,function(t){!function(t,e,n){t.length>n&&t.splice(n,t.length);for(var r=0;r<t.length;r++)t[r]=Math.round(t[r]*e)/e}(t,s,o)}),t}},function(t,e,n){"use strict";var r=n(35),i=n(70),o=n(50),a=n(62),s=n(49),l=n(16),u=n(15),c=n(25),h=n(26),p=n(128),f=n(10),d=n(0),g=n(41),y=function(t){t||(t={});var e=this;this.selection_=new c.a,this.handles_=new c.a,this.overlayLayer_=new s.a({source:new o.a({features:this.handles_,useSpatialIndex:!1,wrapX:!1}),name:"Transform overlay",displayInLayerSwitcher:!1,style:function(t){return e.style[(t.get("handle")||"default")+(t.get("constraint")||"")+(t.get("option")||"")]}}),h.b.call(this,{handleDownEvent:this.handleDownEvent_,handleDragEvent:this.handleDragEvent_,handleMoveEvent:this.handleMoveEvent_,handleUpEvent:this.handleUpEvent_}),this.features_=t.features,"function"===typeof t.filter&&(this._filter=t.filter),this.layers_=t.layers?t.layers instanceof Array?t.layers:[t.layers]:null,this._handleEvent=t.condition||function(){return!0},this.addFn_=t.addCondition||function(){return!1},this.set("translateFeature",!1!==t.translateFeature),this.set("translate",!1!==t.translate),this.set("translateBBox",!0===t.translateBBox),this.set("stretch",!1!==t.stretch),this.set("scale",!1!==t.scale),this.set("rotate",!1!==t.rotate),this.set("keepAspectRatio",t.keepAspectRatio||function(t){return t.originalEvent.shiftKey}),this.set("modifyCenter",t.modifyCenter||function(t){return t.originalEvent.metaKey||t.originalEvent.ctrlKey}),this.set("noFlip",t.noFlip||!1),this.set("selection",!1!==t.selection),this.set("hitTolerance",t.hitTolerance||0),this.set("enableRotatedTransform",t.enableRotatedTransform||!1),this.on("propertychange",function(){this.drawSketch_()}),this.setDefaultStyle()};(y.prototype=Object.create(h.b.prototype)).constructor=y,y.prototype.Cursors={default:"auto",select:"pointer",translate:"move",rotate:"move",rotate0:"move",scale:"nesw-resize",scale1:"nwse-resize",scale2:"nesw-resize",scale3:"nwse-resize",scalev:"ew-resize",scaleh1:"ns-resize",scalev2:"ew-resize",scaleh3:"ns-resize"},y.prototype.setMap=function(t){var e=this.getMap();if(e){var n=e.getTargetElement();e.removeLayer(this.overlayLayer_),this.previousCursor_&&n&&(n.style.cursor=this.previousCursor_),this.previousCursor_=void 0}h.b.prototype.setMap.call(this,t),this.overlayLayer_.setMap(t),null===t&&this.select(null),null!==t&&(this.isTouch=/touch/.test(t.getViewport().className),this.setDefaultStyle())},y.prototype.setActive=function(t){this.select(null),this.overlayLayer_.setVisible(t),h.b.prototype.setActive.call(this,t)},y.prototype.setDefaultStyle=function(){var t=new i.a({color:[255,0,0,1],width:1}),e=new i.a({color:[255,0,0,1],width:1,lineDash:[4,4]}),n=new a.a({color:[255,0,0,.01]}),o=new a.a({color:[255,255,255,.8]}),s=new p.a({fill:o,stroke:t,radius:this.isTouch?12:6,points:15});s.getAnchor()[0]=this.isTouch?-10:-5;var l=new p.a({fill:o,stroke:t,radius:this.isTouch?16:8,points:4,angle:Math.PI/4}),u=new p.a({fill:o,stroke:t,radius:this.isTouch?12:6,points:4,angle:Math.PI/4});function c(t,e,n){return[new r.c({image:t,stroke:e,fill:n})]}this.style={default:c(l,e,n),translate:c(l,t,o),rotate:c(s,t,o),rotate0:c(l,t,o),scale:c(l,t,o),scale1:c(l,t,o),scale2:c(l,t,o),scale3:c(l,t,o),scalev:c(u,t,o),scaleh1:c(u,t,o),scalev2:c(u,t,o),scaleh3:c(u,t,o)},this.drawSketch_()},y.prototype.setStyle=function(t,e){if(e){e instanceof Array?this.style[t]=e:this.style[t]=[e];for(var n=0;n<this.style[t].length;n++){var r=this.style[t][n].getImage();r&&("rotate"==t&&(r.getAnchor()[0]=-5),this.isTouch&&r.setScale(1.8));var i=this.style[t][n].getText();i&&("rotate"==t&&i.setOffsetX(this.isTouch?14:7),this.isTouch&&i.setScale(1.8))}this.drawSketch_()}},y.prototype.getFeatureAtPixel_=function(t){var e=this;return this.getMap().forEachFeatureAtPixel(t,function(t,n){var r=!1;if(!n){if(t===e.bbox_)return!!e.get("translateBBox")&&{feature:t,handle:"translate",constraint:"",option:""};if(e.handles_.forEach(function(e){e===t&&(r=!0)}),r)return{feature:t,handle:t.get("handle"),constraint:t.get("constraint"),option:t.get("option")}}if(!e.get("selection"))return e.selection_.getArray().some(function(e){return t===e})?{feature:t}:null;if(e._filter)return e._filter(t,n)?{feature:t}:null;if(e.layers_){for(var i=0;i<e.layers_.length;i++)if(e.layers_[i]===n)return{feature:t};return null}return e.features_?(e.features_.forEach(function(e){e===t&&(r=!0)}),r?{feature:t}:null):{feature:t}},{hitTolerance:this.get("hitTolerance")})||{}},y.prototype.getGeometryRotateToZero_=function(t,e){var n=t.getGeometry(),r=this.getMap().getView().getRotation();if(0===r||!this.get("enableRotatedTransform"))return e?n.clone():n;var i=n.clone();return i.rotate(-1*r,this.getMap().getView().getCenter()),i},y.prototype.drawSketch_=function(t){var e,n,r;if(this.overlayLayer_.getSource().clear(),this.selection_.getLength()){var i=this.getMap().getView().getRotation(),o=this.getGeometryRotateToZero_(this.selection_.item(0)).getExtent();if(o=Object(d.buffer)(o,0),this.selection_.forEach(function(t){var e=this.getGeometryRotateToZero_(t).getExtent();Object(d.extend)(o,e)}.bind(this)),!0===t)this.ispt_||(this.overlayLayer_.getSource().addFeature(new u.a({geometry:new l.a(this.center_),handle:"rotate0"})),r=Object(f.d)(o),this.get("enableRotatedTransform")&&0!==i&&r.rotate(i,this.getMap().getView().getCenter()),n=this.bbox_=new u.a(r),this.overlayLayer_.getSource().addFeature(n));else{if(this.ispt_){var a=this.getMap().getPixelFromCoordinate([o[0],o[1]]);o=Object(d.boundingExtent)([this.getMap().getCoordinateFromPixel([a[0]-10,a[1]-10]),this.getMap().getCoordinateFromPixel([a[0]+10,a[1]+10])])}r=Object(f.d)(o),this.get("enableRotatedTransform")&&0!==i&&r.rotate(i,this.getMap().getView().getCenter()),n=this.bbox_=new u.a(r);var s=[],c=r.getCoordinates()[0];if(!this.ispt_){if(s.push(n),!this.iscircle_&&this.get("stretch")&&this.get("scale"))for(e=0;e<c.length-1;e++)n=new u.a({geometry:new l.a([(c[e][0]+c[e+1][0])/2,(c[e][1]+c[e+1][1])/2]),handle:"scale",constraint:e%2?"h":"v",option:e}),s.push(n);if(this.get("scale"))for(e=0;e<c.length-1;e++)n=new u.a({geometry:new l.a(c[e]),handle:"scale",option:e}),s.push(n);this.get("translate")&&!this.get("translateFeature")&&(n=new u.a({geometry:new l.a([(c[0][0]+c[2][0])/2,(c[0][1]+c[2][1])/2]),handle:"translate"}),s.push(n))}!this.iscircle_&&this.get("rotate")&&(n=new u.a({geometry:new l.a(c[3]),handle:"rotate"}),s.push(n)),this.overlayLayer_.getSource().addFeatures(s)}}},y.prototype.select=function(t,e){if(!t)return this.selection_.clear(),void this.drawSketch_();if(t.getGeometry&&t.getGeometry()){if(e)this.selection_.push(t);else{var n=this.selection_.getArray().indexOf(t);this.selection_.removeAt(n)}this.ispt_=1===this.selection_.getLength()&&"Point"==this.selection_.item(0).getGeometry().getType(),this.iscircle_=1===this.selection_.getLength()&&"Circle"==this.selection_.item(0).getGeometry().getType(),this.drawSketch_(),this.watchFeatures_(),this.dispatchEvent({type:"select",feature:t,features:this.selection_})}},y.prototype.setSelection=function(t){this.selection_.clear(),t.forEach(function(t){this.selection_.push(t)}.bind(this)),this.ispt_=1===this.selection_.getLength()&&"Point"==this.selection_.item(0).getGeometry().getType(),this.iscircle_=1===this.selection_.getLength()&&"Circle"==this.selection_.item(0).getGeometry().getType(),this.drawSketch_(),this.watchFeatures_(),this.dispatchEvent({type:"select",features:this.selection_})},y.prototype.watchFeatures_=function(){this._featureListeners&&this._featureListeners.forEach(function(t){Object(g.b)(t)}),this._featureListeners=[],this.selection_.forEach(function(t){this._featureListeners.push(t.on("change",function(){this.isUpdating_||this.drawSketch_()}.bind(this)))}.bind(this))},y.prototype.handleDownEvent_=function(t){if(this._handleEvent(t,this.selection_)){var e=this.getFeatureAtPixel_(t.pixel),n=e.feature;if(this.selection_.getLength()&&this.selection_.getArray().indexOf(n)>=0&&(this.ispt_&&this.get("translate")||this.get("translateFeature"))&&(e.handle="translate"),e.handle){this.mode_=e.handle,this.opt_=e.option,this.constraint_=e.constraint;var r=this.getMap().getView().getRotation();this.coordinate_=t.coordinate,this.pixel_=t.pixel,this.geoms_=[],this.rotatedGeoms_=[];for(var i,o=Object(d.createEmpty)(),a=Object(d.createEmpty)(),s=0;i=this.selection_.item(s);s++)if(this.geoms_.push(i.getGeometry().clone()),o=Object(d.extend)(o,i.getGeometry().getExtent()),this.get("enableRotatedTransform")&&0!==r){var l=this.getGeometryRotateToZero_(i,!0);this.rotatedGeoms_.push(l),a=Object(d.extend)(a,l.getExtent())}if(this.extent_=Object(f.d)(o).getCoordinates()[0],this.get("enableRotatedTransform")&&0!==r&&(this.rotatedExtent_=Object(f.d)(a).getCoordinates()[0]),"rotate"===this.mode_){this.center_=this.getCenter()||Object(d.getCenter)(o);var u=t.map.getTargetElement();u.style.cursor=this.Cursors.rotate0,this.previousCursor_=u.style.cursor}else this.center_=Object(d.getCenter)(o);return this.angle_=Math.atan2(this.center_[1]-t.coordinate[1],this.center_[0]-t.coordinate[0]),this.dispatchEvent({type:this.mode_+"start",feature:this.selection_.item(0),features:this.selection_,pixel:t.pixel,coordinate:t.coordinate}),!0}if(this.get("selection")){if(n){this.addFn_(t)||this.selection_.clear();var c=this.selection_.getArray().indexOf(n);c<0?this.selection_.push(n):this.selection_.removeAt(c)}else this.selection_.clear();return this.ispt_=1===this.selection_.getLength()&&"Point"==this.selection_.item(0).getGeometry().getType(),this.iscircle_=1===this.selection_.getLength()&&"Circle"==this.selection_.item(0).getGeometry().getType(),this.drawSketch_(),this.watchFeatures_(),this.dispatchEvent({type:"select",feature:n,features:this.selection_,pixel:t.pixel,coordinate:t.coordinate}),!1}}},y.prototype.getFeatures=function(){return this.selection_},y.prototype.getCenter=function(){return this.get("center")},y.prototype.setCenter=function(t){return this.set("center",t)},y.prototype.handleDragEvent_=function(t){if(this._handleEvent(t,this.features_)){var e,n,r,i=this.getMap().getView().getRotation(),o=[this.coordinate_[0],this.coordinate_[1]],a=[t.coordinate[0],t.coordinate[1]];switch(this.isUpdating_=!0,this.mode_){case"rotate":var s=Math.atan2(this.center_[1]-a[1],this.center_[0]-a[0]);if(!this.ispt)for(e=0;n=this.selection_.item(e);e++)(r=this.geoms_[e].clone()).rotate(s-this.angle_,this.center_),"Circle"==r.getType()&&r.setCenterAndRadius(r.getCenter(),r.getRadius()),n.setGeometry(r);this.drawSketch_(!0),this.dispatchEvent({type:"rotating",feature:this.selection_.item(0),features:this.selection_,angle:s-this.angle_,pixel:t.pixel,coordinate:t.coordinate});break;case"translate":var u=a[0]-o[0],c=a[1]-o[1];for(e=0;n=this.selection_.item(e);e++)n.getGeometry().translate(u,c);this.handles_.forEach(function(t){t.getGeometry().translate(u,c)}),this.coordinate_=t.coordinate,this.dispatchEvent({type:"translating",feature:this.selection_.item(0),features:this.selection_,delta:[u,c],pixel:t.pixel,coordinate:t.coordinate});break;case"scale":var h=this.center_;if(this.get("modifyCenter")(t)){var p=this.extent_;this.get("enableRotatedTransform")&&0!==i&&(p=this.rotatedExtent_),h=p[(Number(this.opt_)+2)%4]}var f=this.coordinate_,d=t.coordinate;if(this.get("enableRotatedTransform")&&0!==i){var g=new l.a(this.coordinate_);g.rotate(-1*i,h),f=g.getCoordinates();var y=new l.a(t.coordinate);y.rotate(-1*i,h),d=y.getCoordinates()}var m=(d[0]-h[0])/(f[0]-h[0]),v=(d[1]-h[1])/(f[1]-h[1]);if(this.get("enableRotatedTransform")&&0!==i){var _=new l.a(h);_.rotate(-1*i,this.getMap().getView().getCenter()),h=_.getCoordinates()}for(this.get("noFlip")&&(m<0&&(m=-m),v<0&&(v=-v)),this.constraint_?"h"==this.constraint_?m=1:v=1:this.get("keepAspectRatio")(t)&&(m=v=Math.min(m,v)),e=0;n=this.selection_.item(e);e++)(r=0!==i&&this.get("enableRotatedTransform")?this.rotatedGeoms_[e].clone():this.geoms_[e].clone()).applyTransform(function(t,e,n){if(n<2)return e;for(var i=0;i<t.length;i+=n)1!=m&&(e[i]=h[0]+(t[i]-h[0])*m),1!=v&&(e[i+1]=h[1]+(t[i+1]-h[1])*v);return"Circle"==r.getType()&&r.setCenterAndRadius(r.getCenter(),r.getRadius()),e}),this.get("enableRotatedTransform")&&0!==i&&r.rotate(i,this.getMap().getView().getCenter()),n.setGeometry(r);this.drawSketch_(),this.dispatchEvent({type:"scaling",feature:this.selection_.item(0),features:this.selection_,scale:[m,v],pixel:t.pixel,coordinate:t.coordinate})}this.isUpdating_=!1}},y.prototype.handleMoveEvent_=function(t){if(this._handleEvent(t,this.features_)&&!this.mode_){var e=this.getFeatureAtPixel_(t.pixel),n=t.map.getTargetElement();if(e.feature){var r=e.handle?this.Cursors[(e.handle||"default")+(e.constraint||"")+(e.option||"")]:this.Cursors.select;void 0===this.previousCursor_&&(this.previousCursor_=n.style.cursor),n.style.cursor=r}else void 0!==this.previousCursor_&&(n.style.cursor=this.previousCursor_),this.previousCursor_=void 0}},y.prototype.handleUpEvent_=function(t){"rotate"===this.mode_&&(t.map.getTargetElement().style.cursor=this.Cursors.default,this.previousCursor_=void 0);return this.dispatchEvent({type:this.mode_+"end",feature:this.selection_.item(0),features:this.selection_,oldgeom:this.geoms_[0],oldgeoms:this.geoms_}),this.drawSketch_(),this.mode_=null,!1},y.prototype.getFeatures=function(){return this.selection_},e.a=y},function(t,e,n){"use strict";var r=n(15),i=n(25),o=n(0),a=n(26),s=n(225),l=n(10),u=n(123),c=n(160),h=n(165),p=n(167),f=n(248),d=n(400),g=function(t){t||(t={});this.pointer_=null,this.map_=t.map||function(){return!1},this.sel_=t.feature||null,this.feature_=null,this.layer_=t.layer||function(){return!1},this.idToDelete_=null,this.translate_=null,a.b.call(this,{handleDownEvent:this.handleDownEvent_,handleDragEvent:this.handleDragEvent_,handleMoveEvent:this.handleMoveEvent_,handleUpEvent:this.handleUpEvent_}),this.set("brushSize",t.brushSize||500),this.set("brushType",t.brushType||y.CIRCLE),this.set("brushMode",t.brushMode||m.BRUSH),this.on("propertychange",function(){})};(g.prototype=Object.create(a.b.prototype)).constructor=g;var y={CIRCLE:"circle",SQUARE:"square"},m={BRUSH:"brush",ERASER:"eraser"};g.prototype.setActive=function(t){a.b.prototype.setActive.call(this,t)},g.prototype.setBrushSize=function(t){null==t||void 0==t||t<=0||this.get("brushSize")!=t&&(this.set("brushSize",t),this.setPointer_())},g.prototype.getBrushSize=function(){return this.get("brushSize")},g.prototype.setBrushType=function(t){null!=t&&void 0!=t&&this.get("brushType")!=t&&(this.set("brushType",t),this.setPointer_())},g.prototype.getBrushType=function(){return y[this.get("brushType")]},g.prototype.setBrushMode=function(t){null!=t&&void 0!=t&&this.get("brushMode")!=t&&(this.set("brushMode",t),this.setPointer_())},g.prototype.getBrushMode=function(){return this.get("brushMode")},g.prototype.setPointer_=function(){null!=this.format_&&void 0!=this.format_||(this.format_=new c.GeoJSON),null!=this.formatOptions_&&void 0!=this.formatOptions_||(this.formatOptions_={featureProjection:this.map_.getView().getProjection()});var t=null;if(this.get("brushType")==y.CIRCLE&&(t=Object(l.c)(new u.Circle([0,0],this.get("brushSize")))),this.get("brushType")==y.SQUARE){var e=this.get("brushSize");t=new u.Polygon([[[-1*e,e],[e,e],[e,-1*e],[-1*e,-1*e],[-1*e,e]]])}var n=new r.a({geometry:t});n.color="#000",n.fillColor="#00000099",n.penSize=1,null!=this.pointer_&&(this.layer_.getSource().removeFeature(this.pointer_),this.map_.removeInteraction(this.translate_)),this.pointer_=n,$(this.map_.getTarget()).find("canvas").css("cursor","none"),this.translate_=new s.a({features:new i.a([this.pointer_])}),this.layer_.getSource().addFeature(this.pointer_),this.map_.addInteraction(this.translate_)},g.prototype.handleDownEvent_=function(t){this.get("brushMode")==m.BRUSH&&this.dispatchEvent("drawingstart"),this.get("brushMode")==m.ERASER&&this.dispatchEvent("erasingstart")},g.prototype.handleDragEvent_=function(t){var e=this;t.preventDefault();var n=null;if(this.sel_)n=this.sel_;else try{n=this.getFeatureAtPixel_(t.pixel).feature}catch(t){return}if(null!=n&&void 0!=n){var r=this.format_,i=this.formatOptions_,o=this.pointer_,a=n.metaData.Notes?n.metaData.Notes:"",s=n.metaData.Color?n.metaData.Color:n.color,l=n.metaData.FillColor?n.metaData.FillColor:n.fillColor,u=n.metaData.LineThickness?n.metaData.LineThickness:n.penSize,c=n.icon;if(this.get("brushMode")!=m.BRUSH||"Polygon"===n.getGeometry().getType()||"MultiPolygon"===n.getGeometry().getType())if(this.get("brushMode")!=m.ERASER||"Polygon"===n.getGeometry().getType()){var h=r.writeFeatureObject(n,i),p=r.writeFeatureObject(o,i);if(Object(f.a)(h,p)){var g=null;if(this.get("brushMode")==m.BRUSH&&(g=this.unify_(h,p)),this.get("brushMode")==m.ERASER){if(Object(d.a)(p,h))return this.idToDelete_=h.id,this.feature_=null,void this.dispatchEvent("erasing");g=this.differentiate_(h,p)}if(null!=g)if("MultiPolygon"===g.geometry.type)g.geometry.coordinates.forEach(function(t){var n={type:"Polygon",coordinates:t},o=r.readFeature(n,i);o.color=s,o.fillColor=l,o.penSize=u,o.icon=c,o.notes=a||"",e.idToDelete_=h.id,e.feature_=o,e.get("brushMode")==m.BRUSH&&e.dispatchEvent("drawing"),e.get("brushMode")==m.ERASER&&e.dispatchEvent("erasing"),e.sel_&&e.stopEditing()});else{var y=r.readFeature(g,i);n.setGeometry(y.getGeometry()),n.changed(),this.idToDelete_=null,this.feature_=n,this.get("brushMode")==m.BRUSH&&this.dispatchEvent("drawing"),this.get("brushMode")==m.ERASER&&this.dispatchEvent("erasing")}}}else console.error("Feature contains non-polygon geometry");else console.error("Feature contains non-polygon geometry")}},g.prototype.handleMoveEvent_=function(t){null==this.map_&&(this.map_=t.map),null==this.pointer_&&this.setPointer_(),t.dragging&&this.handleDragEvent_(t);var e=this.pointer_.getGeometry().getExtent(),n=o.getCenter(e);this.pointer_.getGeometry().translate(t.coordinate[0]-n[0],t.coordinate[1]-n[1])},g.prototype.handleUpEvent_=function(t){this.get("brushMode")==m.BRUSH&&this.dispatchEvent("drawingend"),this.get("brushMode")==m.ERASER&&this.dispatchEvent("erasingend")},g.prototype.unify_=function(t,e){var n=Object(h.a)(t,e);if("FeatureCollection"===n.type)throw"Feature collection detected";return"MultiPolygon"===n.geometry.type?null:n},g.prototype.differentiate_=function(t,e){var n=Object(p.a)(t,e);if(!n)return null;if("FeatureCollection"===n.type)throw"Feature collection detected";return n},g.prototype.getFeatureAtPixel_=function(t){var e=this,n=this.get("brushSize"),r=new u.Polygon([[[-1*n,n],[n,n],[n,-1*n],[-1*n,-1*n],[-1*n,n]]]).getCoordinates(),i=this.map_.getPixelFromCoordinate(r[0][0]),o=(this.map_.getPixelFromCoordinate(r[0][1])[0]-i[0])/2;return this.map_.forEachFeatureAtPixel(t,function(t,n){return e.layer_===n&&t!==e.pointer_?{feature:t}:null},{hitTolerance:o})||null},g.prototype.getFeature=function(){return this.feature_},g.prototype.getId=function(){return this.idToDelete_},g.prototype.stopEditing=function(){$(this.map_.getTarget()).find("canvas").css("cursor",""),this.layer_.getSource().removeFeature(this.pointer_),this.map_.removeInteraction(this.translate_),this.map_.removeInteraction(this),a.b.prototype.setActive.call(this,!1)},e.a=g},function(t,e,n){"use strict";var r=n(401),i=n(402),o=n(403),a=n(80);function s(t,e){return!(t[0]>e[0])&&(!(t[2]<e[2])&&(!(t[1]>e[1])&&!(t[3]<e[3])))}function l(t,e){return t[0]===e[0]&&t[1]===e[1]}e.a=function(t,e){var n=Object(a.d)(t),u=Object(a.d)(e),c=Object(a.c)(t),h=Object(a.c)(e),p=Object(a.b)(t),f=Object(a.b)(e);switch(n){case"Point":switch(u){case"Point":return l(p,f);default:throw new Error("feature2 "+u+" geometry not supported")}case"MultiPoint":switch(u){case"Point":return function(t,e){var n,r=!1;for(n=0;n<t.coordinates.length;n++)if(l(t.coordinates[n],e.coordinates)){r=!0;break}return r}(c,h);case"MultiPoint":return function(t,e){for(var n=0;n<e.coordinates.length;n++){for(var r=!1,i=0;i<t.coordinates.length;i++)if(l(e.coordinates[n],t.coordinates[i])){r=!0;break}if(!r)return!1}return!0}(c,h);default:throw new Error("feature2 "+u+" geometry not supported")}case"LineString":switch(u){case"Point":return Object(o.a)(h,c,{ignoreEndVertices:!0});case"LineString":return function(t,e){for(var n=!1,r=0;r<e.coordinates.length;r++)if(Object(o.a)({type:"Point",coordinates:e.coordinates[r]},t,{ignoreEndVertices:!0})&&(n=!0),!Object(o.a)({type:"Point",coordinates:e.coordinates[r]},t,{ignoreEndVertices:!1}))return!1;return n}(c,h);case"MultiPoint":return function(t,e){for(var n=!1,r=0;r<e.coordinates.length;r++)if(Object(o.a)(e.coordinates[r],t,{ignoreEndVertices:!0})&&(n=!0),!Object(o.a)(e.coordinates[r],t))return!1;return!!n}(c,h);default:throw new Error("feature2 "+u+" geometry not supported")}case"Polygon":switch(u){case"Point":return Object(r.a)(h,c,{ignoreBoundary:!0});case"LineString":return function(t,e){var n,o,a=!1,l=0,u=Object(i.a)(t),c=Object(i.a)(e);if(!s(u,c))return!1;for(;l<e.coordinates.length-1;l++){var h=(n=e.coordinates[l],o=e.coordinates[l+1],[(n[0]+o[0])/2,(n[1]+o[1])/2]);if(Object(r.a)({type:"Point",coordinates:h},t,{ignoreBoundary:!0})){a=!0;break}}return a}(c,h);case"Polygon":return function(t,e){var n=Object(i.a)(t),o=Object(i.a)(e);if(!s(n,o))return!1;for(var a=0;a<e.coordinates[0].length;a++)if(!Object(r.a)(e.coordinates[0][a],t))return!1;return!0}(c,h);case"MultiPoint":return function(t,e){for(var n=0;n<e.coordinates.length;n++)if(!Object(r.a)(e.coordinates[n],t,{ignoreBoundary:!0}))return!1;return!0}(c,h);default:throw new Error("feature2 "+u+" geometry not supported")}default:throw new Error("feature1 "+n+" geometry not supported")}}},function(t,e,n){"use strict";var r=n(80);function i(t){"@babel/helpers - typeof";return(i="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function o(t,e,n){var r=!1;e[0][0]===e[e.length-1][0]&&e[0][1]===e[e.length-1][1]&&(e=e.slice(0,e.length-1));for(var i=0,o=e.length-1;i<e.length;o=i++){var a=e[i][0],s=e[i][1],l=e[o][0],u=e[o][1];if(t[1]*(a-l)+s*(l-t[0])+u*(t[0]-a)===0&&(a-t[0])*(l-t[0])<=0&&(s-t[1])*(u-t[1])<=0)return!n;s>t[1]!==u>t[1]&&t[0]<(l-a)*(t[1]-s)/(u-s)+a&&(r=!r)}return r}e.a=function(t,e,n){if("object"!==i(n=n||{}))throw new Error("options is invalid");var a=n.ignoreBoundary;if(!t)throw new Error("point is required");if(!e)throw new Error("polygon is required");var s=Object(r.a)(t),l=Object(r.b)(e),u=e.geometry?e.geometry.type:e.type,c=e.bbox;if(c&&!1===function(t,e){return e[0]<=t[0]&&e[1]<=t[1]&&e[2]>=t[0]&&e[3]>=t[1]}(s,c))return!1;"Polygon"===u&&(l=[l]);for(var h=0,p=!1;h<l.length&&!p;h++)if(o(s,l[h][0],a)){for(var f=!1,d=1;d<l[h].length&&!f;)o(s,l[h][d],!a)&&(f=!0),d++;f||(p=!0)}return p}},function(t,e,n){"use strict";var r=n(98);e.a=function(t){var e=[1/0,1/0,-1/0,-1/0];return Object(r.a)(t,function(t){e[0]>t[0]&&(e[0]=t[0]),e[1]>t[1]&&(e[1]=t[1]),e[2]<t[0]&&(e[2]=t[0]),e[3]<t[1]&&(e[3]=t[1])}),e}},function(t,e,n){"use strict";var r=n(80),i=n(59);function o(t,e,n,r){var i=n[0],o=n[1],a=t[0],s=t[1],l=e[0],u=e[1],c=l-a,h=u-s;return 0===(n[0]-a)*h-(n[1]-s)*c&&(r?"start"===r?Math.abs(c)>=Math.abs(h)?c>0?a<i&&i<=l:l<=i&&i<a:h>0?s<o&&o<=u:u<=o&&o<s:"end"===r?Math.abs(c)>=Math.abs(h)?c>0?a<=i&&i<l:l<i&&i<=a:h>0?s<=o&&o<u:u<o&&o<=s:"both"===r?Math.abs(c)>=Math.abs(h)?c>0?a<i&&i<l:l<i&&i<a:h>0?s<o&&o<u:u<o&&o<s:void 0:Math.abs(c)>=Math.abs(h)?c>0?a<=i&&i<=l:l<=i&&i<=a:h>0?s<=o&&o<=u:u<=o&&o<=s)}e.a=function(t,e,n){var a=(n=n||{}).ignoreEndVertices;if(!Object(i.c)(n))throw new Error("invalid options");if(!t)throw new Error("pt is required");if(!e)throw new Error("line is required");for(var s=Object(r.a)(t),l=Object(r.b)(e),u=0;u<l.length-1;u++){var c=!1;if(a&&(0===u&&(c="start"),u===l.length-2&&(c="end"),0===u&&u+1===l.length-1&&(c="both")),o(l[u],l[u+1],s,c))return!0}return!1}},function(t,e,n){"use strict";n.d(e,"a",function(){return v});var r=n(24),i=n(91),o=n(41),a=n(405),s=n.n(a);function l(t){"@babel/helpers - typeof";return(l="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function h(t,e,n){return e&&c(t.prototype,e),n&&c(t,n),t}function p(t,e){if(e&&("object"===l(e)||"function"===typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function f(t,e,n){return(f="undefined"!==typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=d(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(n):i.value}})(t,e,n||t)}function d(t){return(d=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function g(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&y(t,e)}function y(t,e){return(y=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var m=function(t){function e(t){var n;return u(this,e),(n=p(this,(e.__proto__||Object.getPrototypeOf(e)).call(this))).map=t.map,n.layers=null,n.mask=null,n.border_=null,n.hatchInterval_=null,n.hatchOffset_=0,n.hatchLength=t.hatchLength,n.hatchTimeout=t.hatchTimeout,n.size=null,n.context=null,n.snapshot=null,n.contextWithoutMask=document.createElement("canvas").getContext("2d"),n.bytes=4,n.loading_=!1,n.lock_=!1,n.mapKeys_=null,n.layersKeys_=null,n.mapKeyOnceComplete=null,n.mapKeyOnceRender=null,n.createCanvas(),n.connectToMap(),n.setLayers(t.layers),n.hatchTimeout&&n.hatchTimeout>0&&(n.hatchInterval=setInterval(function(){return n.hatchTick_()},n.hatchTimeout)),n}return g(e,r["a"]),h(e,[{key:"createCanvas",value:function(){this.context=document.createElement("canvas").getContext("2d"),this.setCanvasSize(),this.clearMask()}},{key:"setCanvasSize",value:function(){var t=this.map.getSize();this.context.canvas.width=t[0],this.context.canvas.height=t[1],this.contextWithoutMask.canvas.width=t[0],this.contextWithoutMask.canvas.height=t[1],this.size={w:t[0],h:t[1]}}},{key:"disposeInternal",value:function(){this.disconnectFromMap(),this.disconnectFromLayers(),this.clearMask(),this.hatchInterval&&clearInterval(this.hatchInterval),this.layers=null,this.contextWithoutMask=null,this.context=null,this.snapshot=null,this.map=null,f(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"disposeInternal",this).call(this)}},{key:"connectToMap",value:function(){this.mapKeys_=[this.map.getView().on("change:resolution",this.onViewResChanged_.bind(this)),this.map.on("change:size",this.onMapSizeChanged_.bind(this)),this.map.on("moveend",this.onMapMoved_.bind(this)),this.map.on("postrender",this.onPostRender_.bind(this))]}},{key:"disconnectFromMap",value:function(){this.mapKeys_&&(Object(o.b)(this.mapKeys_),this.mapKeys_=null),this.mapKeyOnceComplete&&(Object(o.b)(this.mapKeyOnceComplete),this.mapKeyOnceComplete=null),this.mapKeyOnceRender&&(Object(o.b)(this.mapKeyOnceRender),this.mapKeyOnceRender=null)}},{key:"onViewResChanged_",value:function(){this.createCanvas(),this.setCanvasSize()}},{key:"onMapSizeChanged_",value:function(){var t=this;this.setCanvasSize(),setTimeout(function(){return t.scan()},50)}},{key:"onMapMoved_",value:function(){this.scan()}},{key:"setLayers",value:function(t){return!!t&&(this.disconnectFromLayers(),this.layers=Array.isArray(t)?t:[t],this.connectToLayers(),this.scan(),!0)}},{key:"connectToLayers",value:function(){var t=this;this.layersKeys_=[],this.layers.forEach(function(e){t.layersKeys_.push(e.on("change",function(e){return t.scan()}),e.on("propertychange",function(e){return t.scan()}))})}},{key:"disconnectFromLayers",value:function(){this.layersKeys_&&(Object(o.b)(this.layersKeys_),this.layersKeys_=null)}},{key:"isReady",value:function(){return!this.loading_&&null!=this.snapshot}},{key:"scan",value:function(){var t=this;if(!this.loading_&&this.map&&(this.snapshot=null,this.hasVisibleLayers_())){this.dispatchEvent("scanStarted");var e=this.map.getSize();this.size={w:e[0],h:e[1]},this.loading_=!0,this.mapKeyOnceComplete=this.map.once("rendercomplete",function(){t.lock_||(t.mapKeyOnceRender=t.map.once("postrender",function(){t.getRenderLayers_().length>0&&(t.snapshot=t.contextWithoutMask.getImageData(0,0,t.size.w,t.size.h).data),t.loading_=!1,t.lock_=!1,t.dispatchEvent("scanFinished")})),t.lock_=!0,t.map.render()}),this.map.render()}}},{key:"hasVisibleLayers_",value:function(){return null!=this.layers&&this.layers.filter(function(t){return t.getVisible()&&t.getOpacity()>0}).length>0}},{key:"onPostRender_",value:function(){var t=this;this.lock_&&(this.contextWithoutMask.clearRect(0,0,this.size.w,this.size.h),this.getRenderLayers_().forEach(function(e){var n=e.getRenderer().context.canvas;t.contextWithoutMask.drawImage(n,0,0,n.width,n.height,0,0,t.size.w,t.size.h)})),this.drawBorder()}},{key:"render",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=this.getRenderLayers_();if(0!=e.length){var n=e[e.length-1].getRenderer().context;if(t){var r=this.contextWithoutMask;n.drawImage(r.canvas,0,0,r.canvas.width,r.canvas.height,0,0,n.canvas.width,n.canvas.height)}var i=this.context;n.drawImage(i.canvas,0,0,i.canvas.width,i.canvas.height,0,0,n.canvas.width,n.canvas.height)}}},{key:"getRenderLayers_",value:function(){return null==this.layers?[]:this.layers.filter(function(t){var e=t.getRenderer().context;return e&&t.getVisible()&&t.getOpacity()>0&&e.canvas.width>0&&e.canvas.height>0}).sort(function(t,e){return t.getZIndex()-e.getZIndex()})}},{key:"hatchTick_",value:function(){return this.hatchOffset_=(this.hatchOffset_+1)%(2*this.hatchLength),this.drawBorder(!1)}},{key:"clearMask",value:function(){this.mask=null,this.border_=null,this.context&&this.context.clearRect(0,0,this.size.w,this.size.h),this.map.render()}},{key:"setMask",value:function(t){this.mask=t,this.map.render()}},{key:"drawBorder",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(!this.mask)return!1;var e,n,r,i,o,a=this.size.w,l=this.size.h,u=this.size.w-1,c=this.size.h-1,h=this.size.w+2,p=this.size.h+2;if(t){var f,d,g,y,m,_,b,w,O,x,E=v.getMainWorldOffset(this.map),S=this.mask.data,C=this.mask.width,T=this.mask.bounds,I=this.mask.globalOffset,j=new Uint8Array(h*p),L=[{x:I.x,y:I.y},{x:I.x-E.width+1,y:I.y},{x:I.x+E.width-1,y:I.y}],R=L.length;for(n=0;n<R;n++)if(f=(x=L[n]).x-E.x,d=x.y-E.y,g=f+T.minX,y=d+T.minY,m=f+T.maxX,_=d+T.maxY,!(m<0||g>u||_<0||y>c))for(w=g>-1?g:-1,O=y>-1?y:-1,o=(m<u+1?m:u+1)-w+1,e=(O+1)*h+(w+1),b=((_<c+1?_:c+1)-d)*C+(w-f)+1,r=(O-d)*C+(w-f);r<b;r+=C){for(i=0;i<o;i++)1===S[r+i]&&(j[e+i]=1);e+=h}this.border_=s.a.getBorderIndices({data:j,width:h,height:p})}this.context.clearRect(0,0,a,l);var P=this.border_;if(!P)return!1;var N,M,A=this.context.createImageData(a,l),k=A.data,F=this.hatchLength,D=2*F,G=this.hatchOffset_;for(o=P.length,n=0;n<o;n++)M=((e=P[n])-(N=e%h))/h,M-=1,(N-=1)<0||N>u||M<0||M>c||(r=4*(M*a+N),(N+M+G)%D<F?k[r+3]=255:(k[r]=255,k[r+1]=255,k[r+2]=255,k[r+3]=255));return this.context.putImageData(A,0,0),this.render(),!0}},{key:"getPixelColor",value:function(t,e){var n=(e*this.size.w+t)*this.bytes;return[this.snapshot[n],this.snapshot[n+1],this.snapshot[n+2],this.snapshot[n+3]]}},{key:"toImageUrl",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"image/png";if(!this.isReady()||!this.size)return null;var e=document.createElement("canvas"),n=e.getContext("2d");n.canvas.width=this.size.w,n.canvas.height=this.size.h;for(var r=n.createImageData(this.size.w,this.size.h),i=0;i<this.snapshot.length;i++)r.data[i]=this.snapshot[i];return n.putImageData(r,0,0),e.toDataURL(t)}}]),e}(),v=function(t){function e(t){var n;return u(this,e),(n=p(this,(e.__proto__||Object.getPrototypeOf(e)).call(this))).layers=t.layers,n.hatchLength=null==t.hatchLength?4:t.hatchLength,n.hatchTimeout=null==t.hatchTimeout?300:t.hatchTimeout,n.colorThreshold=null==t.colorThreshold?15:t.colorThreshold,n.blurRadius=null==t.blurRadius?5:t.blurRadius,n.includeBorders=null==t.includeBorders||t.includeBorders,n.currentThreshold_=0,n.history=0==t.history?null:new _,n.tileMask_=null,n.isMapConnect_=!1,n.allowDraw_=!1,n.addMode_=!1,n.oldMask_=null,n.downPoint_=null,n.mapKeys_=null,n.allowAdd_=null==t.addMode||t.addMode,n.isDebug_=null!=t.debugMode&&t.debugMode,t.waitClass&&(n.waitClass=t.waitClass),t.drawClass&&(n.drawClass=t.drawClass),t.addClass&&(n.addClass=t.addClass),n}return g(e,i["Pointer"]),h(e,[{key:"handleDragEvent",value:function(t){var e=t.originalEvent;if(this.allowDraw_){var n=this.getMap().getEventPixel(e),r=Math.round(n[0]),i=Math.round(n[1]),o=this.downPoint_.x,a=this.downPoint_.y;if(r!=o||i!=a){var s=r-o,l=i-a,u=Math.sqrt(s*s+l*l),c=Math.abs(s),h=Math.abs(l),p=c>h?s/c:l/h;p=p<0?p/5:p/3;var f=Math.min(Math.max(this.colorThreshold+Math.round(p*u),1),255);f!=this.currentThreshold_&&(this.currentThreshold_=f,this.drawMask_(o,a))}}return!this.allowDraw_}},{key:"handleDownEvent",value:function(t){var e=t.originalEvent;if(0!=e.button)return this.allowDraw_=!1,this.oldMask_=null,this.addMode_=!1,!1;if(this.tileMask_&&this.tileMask_.isReady()&&!this.getMap().getView().getAnimating()){var n=this.getMap().getEventPixel(e);return this.downPoint_={x:Math.round(n[0]),y:Math.round(n[1])},this.allowDraw_=!0,this.addMode_=e.ctrlKey,this.drawMask_(this.downPoint_.x,this.downPoint_.y),!0}}},{key:"handleUpEvent",value:function(t){t.originalEvent;return this.allowDraw_&&this.tileMask_&&this.history&&this.history.addMask(this.tileMask_.mask),this.currentThreshold_=this.colorThreshold,this.allowDraw_=!1,this.oldMask_=null,this.addMode_=!1,!1}},{key:"onMapKeyDown_",value:function(t){var e=this.getMap();if(e){var n=e.getTargetElement();17==t.keyCode&&null!=this.addClass&&this.allowAdd_&&n.classList.add(this.addClass)}}},{key:"onMapKeyUp_",value:function(t){var e=this.getMap();if(e){var n=e.getTargetElement(),r=e.getView();if(17==t.keyCode&&this.allowAdd_&&n.classList.remove(this.addClass),83==t.keyCode&&this.isDebug_){if(!this.tileMask_||!this.tileMask_.isReady()||r.getInteracting()||r.getAnimating())return;this.tileMask_.context.clearRect(0,0,this.tileMask_.size.w,this.tileMask_.size.h),this.tileMask_.render(!0)}if(67==t.keyCode&&this.isDebug_){if(!this.tileMask_||!this.tileMask_.isReady()||r.getInteracting()||r.getAnimating())return;var i=this.getContours();if(null==i)return;var o,a,s,l=i.filter(function(t){return!t.inner}),u=i.filter(function(t){return t.inner}),c=this.tileMask_.context;for(c.clearRect(0,0,this.tileMask_.size.w,this.tileMask_.size.h),c.beginPath(),o=0;o<l.length;o++)for(s=l[o].points,c.moveTo(s[0].x,s[0].y),a=1;a<s.length;a++)c.lineTo(s[a].x,s[a].y);for(c.strokeStyle="green",c.stroke(),c.beginPath(),o=0;o<u.length;o++)for(s=u[o].points,c.moveTo(s[0].x,s[0].y),a=1;a<s.length;a++)c.lineTo(s[a].x,s[a].y);c.strokeStyle="red",c.stroke(),this.tileMask_.render(!0)}if(t.ctrlKey&&this.history){var h=null;89==t.keyCode&&(h=this.history.redo()),90==t.keyCode&&(h=this.history.undo()),h&&this.tileMask_&&this.tileMask_.setMask(h)}}}},{key:"setActive",value:function(t){!this.getActive()&&t&&this.onActivate_(),this.getActive()&&!t&&this.onDeactivate_(),f(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"setActive",this).call(this,t)}},{key:"stopEditing",value:function(){this.setActive(!1),annotationManager.viewport.annotationsLayer.setVisible(!0)}},{key:"onActivate_",value:function(){var t=this.getMap();t&&(this.connectToMap(t),this.createMask(t))}},{key:"onDeactivate_",value:function(){this.allowDraw_=!1,this.downPoint_=null,this.oldMask_=null,this.addMode_=!1,this.disconnectFromMap(),this.tileMask_&&this.tileMask_.dispose(),this.tileMask_=null,this.clearHistory_()}},{key:"disposeInternal",value:function(){this.onDeactivate_(),this.history&&this.history.dispose(),this.history=null,this.layers=null,f(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"disposeInternal",this).call(this)}},{key:"setMap",value:function(t){this.onDeactivate_(),f(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"setMap",this).call(this,t),this.getActive()&&this.onActivate_()}},{key:"connectToMap",value:function(t){var e=this;this.mapKeys_=[t.getView().on("change:resolution",this.onViewResChanged_.bind(this))],this.keyDownListener=this.onMapKeyDown_.bind(this),this.keyUpListener=this.onMapKeyUp_.bind(this),document.addEventListener("keydown",this.keyDownListener),document.addEventListener("keyup",this.keyUpListener);var n=t.getTargetElement();this.drawClass&&n.classList.add(this.drawClass),this.onMapContextMenuListener_=function(t){e.getActive()&&t.preventDefault()},n.addEventListener("contextmenu",this.onMapContextMenuListener_)}},{key:"disconnectFromMap",value:function(){this.mapKeys_&&(Object(o.b)(this.mapKeys_),this.mapKeys_=null),document.removeEventListener("keydown",this.keyDownListener),document.removeEventListener("keyup",this.keyUpListener);var t=this.getMap();if(t){var e=t.getTargetElement();e.classList.remove(this.drawClass),e.classList.remove(this.waitClass),e.classList.remove(this.addClass),e.removeEventListener("contextmenu",this.onMapContextMenuListener_)}}},{key:"onViewResChanged_",value:function(){this.clearHistory_()}},{key:"clearHistory_",value:function(){this.history&&this.history.clear()}},{key:"createMask",value:function(t){var e=this,n=t.getTargetElement();this.tileMask_=new m({map:t,layers:this.layers,hatchTimeout:this.hatchTimeout,hatchLength:this.hatchLength}),this.waitClass&&(this.tileMask_.on("scanStarted",function(){return n.classList.add(e.waitClass)}),this.tileMask_.on("scanFinished",function(){return n.classList.remove(e.waitClass)}))}},{key:"concatMask_",value:function(t,e){var n,r,i,o,a,s,l=e.data,u=t.data,c=e.width,h=t.width,p=e.globalOffset.x,f=e.globalOffset.y,d=t.globalOffset.x,g=t.globalOffset.y,y=e.bounds,m=t.bounds,v=Math.min(y.minX+p,m.minX+d),_=Math.min(y.minY+f,m.minY+g),b={minX:0,minY:0,maxX:Math.max(y.maxX+p,m.maxX+d)-v,maxY:Math.max(y.maxY+f,m.maxY+g)-_},w=b.maxX+1,O=b.maxY+1,x=new Uint8Array(w*O);for(s=y.maxX-y.minX+1,n=(f-_+y.minY)*w+(p-v+y.minX),o=y.minY*c+y.minX,a=y.maxY*c+y.minX+1,i=o;i<a;i+=c)x.set(l.subarray(i,i+s),n),n+=w;for(s=m.maxX-m.minX+1,n=(g-_+m.minY)*w+(d-v+m.minX),o=m.minY*h+m.minX,a=m.maxY*h+m.minX+1,i=o;i<a;i+=h){for(r=0;r<s;r++)1===u[i+r]&&(x[n+r]=1);n+=w}return{data:x,width:w,height:O,bounds:b,globalOffset:{x:v,y:_}}}},{key:"drawMask_",value:function(t,n){if(!this.tileMask_||!this.tileMask_.isReady())return!1;var r=this.tileMask_.size,i=this.getMap(),o=i.getSize(),a=o[0],l=o[1];if(r.w!=a||r.h!=l)return this.tileMask_.scan(),!1;var u=this.tileMask_,c=e.getMainWorldOffset(i),h={data:this.tileMask_.snapshot,width:r.w,height:r.h,bytes:this.tileMask_.bytes},p=null;if(this.allowAdd_&&this.addMode_&&u.mask){if(!this.oldMask_){var f=u.mask,d=f.bounds;this.oldMask_={data:new Uint8Array(f.data),width:f.width,height:f.height,bounds:{minX:d.minX,maxX:d.maxX,minY:d.minY,maxY:d.maxY},globalOffset:{x:f.globalOffset.x,y:f.globalOffset.y}};var g,y,m,v,_,b,w,O,x,E,S,C,T,I,j=this.oldMask_.globalOffset,L=[{x:j.x,y:j.y}],R=h.width,P=new Uint8Array(R*h.height),N=this.oldMask_.data,M=this.oldMask_.width,A=this.oldMask_.bounds,k=h.width-1,F=h.height-1,D=L.length;for(y=0;y<D;y++)if(S=(b=L[y]).x-c.x,C=b.y-c.y,w=S+A.minX,O=C+A.minY,x=S+A.maxX,E=C+A.maxY,!(x<0||w>k||E<0||O>F))for(T=w>0?w:0,I=O>0?O:0,_=(x<k?x:k)-T+1,g=I*R+T,v=((E<F?E:F)-C)*M+(T-S)+1,m=(I-C)*M+(T-S);m<v;m+=M)P.set(N.subarray(m,m+_),g),g+=R;this.oldMask_.visibleData=P}if(!(p=s.a.floodFill(h,t,n,this.currentThreshold_,this.oldMask_.visibleData,this.includeBorders)))return!1;this.blurRadius>0&&(p=s.a.gaussBlurOnlyBorder(p,this.blurRadius,this.oldMask_.visibleData)),p.globalOffset=c;var G=c.x+p.width/2-(this.oldMask_.globalOffset.x+this.oldMask_.width/2);Math.abs(G)>c.width/2&&(p.globalOffset.x=G>0?c.x-c.width:c.x+c.width),p=this.concatMask_(p,this.oldMask_)}else p=s.a.floodFill(h,t,n,this.currentThreshold_,null,this.includeBorders),this.blurRadius>0&&(p=s.a.gaussBlurOnlyBorder(p,this.blurRadius)),p.globalOffset=c;return u.setMask(p),!0}},{key:"setLayers",value:function(t){return!!t&&(this.layers=t,!!this.tileMask_&&this.tileMask_.setLayers(t))}},{key:"getContours",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:30;if(!this.tileMask_.mask)return null;var r=e.getMainWorldOffset(this.getMap()),i=this.tileMask_.mask,o=i.globalOffset.x-Math.round(r.x),a=i.globalOffset.y-Math.round(r.y),l=s.a.traceContours(i);return t>0&&(l=s.a.simplifyContours(l,t,n)),l.map(function(t){return t.initialCount=t.initialCount||t.points.length,t.points.forEach(function(t){t.x+=o,t.y+=a}),t})}},{key:"getMask",value:function(){if(this.tileMask_){var t,n,r=this.tileMask_.mask,i=e.getMainWorldOffset(this.getMap()),o=0,a=r.data,s=r.bounds,l=r.width,u=s.maxX-s.minX+1,c=s.maxY-s.minY+1,h=new Uint8Array(u*c);for(n=s.minY;n<=s.maxY;n++)for(t=s.minX;t<=s.maxX;t++)h[o++]=a[n*l+t];return{data:h,size:{w:u,h:c},offset:{x:r.globalOffset.x+s.minX-Math.round(i.x),y:r.globalOffset.y+s.minY-Math.round(i.y)}}}return null}},{key:"clearMask",value:function(){this.tileMask_&&this.tileMask_.clearMask()}}],[{key:"getMainWorldOffset",value:function(t){var e=t.getView().getProjection().getExtent(),n=t.getPixelFromCoordinate([e[0],e[3]]);n={x:Math.round(-n[0]),y:Math.round(-n[1])};var r=t.getPixelFromCoordinate([e[2],e[1]]);r={x:Math.round(-r[0]),y:Math.round(-r[1])};var i=n.x-r.x,o=n.x%i;return{x:o<0?o+i:o,y:n.y,width:i}}}]),e}(),_=function(t){function e(){var t;return u(this,e),(t=p(this,(e.__proto__||Object.getPrototypeOf(e)).call(this))).masks=[],t.current=-1,t}return g(e,r["a"]),h(e,[{key:"disposeInternal",value:function(){this.masks=null,f(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"disposeInternal",this).call(this)}},{key:"clear",value:function(){this.masks.length=0,this.current=-1}},{key:"addMask",value:function(t){return!!t&&(this.current++,this.masks.length=this.current,this.masks.push(t),!0)}},{key:"getCurrent",value:function(){return this.current>-1?this.masks[this.current]:null}},{key:"allowUndo",value:function(){return this.current>0}},{key:"allowRedo",value:function(){return this.current<this.masks.length-1}},{key:"undo",value:function(){return this.allowUndo()?(this.current--,this.getCurrent()):null}},{key:"redo",value:function(){return this.allowRedo()?(this.current++,this.getCurrent()):null}}]),e}()},function(t,e,n){(function(t){var e=function(){var t={};return t.floodFill=function(t,e,n,r,i,o){return o?function(t,e,n,r,i){var o,a,s,l,u,c,h,p,f,d,g=t.data,y=t.width,m=t.height,v=t.bytes,_=-1,b=y+1,w=-1,O=m+1,x=n*y+e,E=new Uint8Array(y*m),S=new Uint8Array(i||y*m);if(1===S[x])return null;var C=[g[x*=v],g[x+1],g[x+2],g[x+3]],T=[{y:n,left:e-1,right:e+1,dir:1}];do{for(l=T.shift(),d=!1,a=l.left+1;a<l.right;a++)if(h=l.y*y,x=(h+a)*v,1!==S[h+a]&&(d=!0,E[h+a]=1,S[h+a]=1,!((o=g[x]-C[0])>r||o<-r)&&!((o=g[x+1]-C[1])>r||o<-r)&&!((o=g[x+2]-C[2])>r||o<-r))){for(c=a-1;c>-1&&(x=(p=h+c)*v,1!==S[p])&&(E[p]=1,S[p]=1,c--,!((o=g[x]-C[0])>r||o<-r))&&!((o=g[x+1]-C[1])>r||o<-r)&&!((o=g[x+2]-C[2])>r||o<-r););for(u=a+1;u<y&&(x=(f=h+u)*v,1!==S[f])&&(E[f]=1,S[f]=1,u++,!((o=g[x]-C[0])>r||o<-r))&&!((o=g[x+1]-C[1])>r||o<-r)&&!((o=g[x+2]-C[2])>r||o<-r););c<b&&(b=c+1),u>_&&(_=u-1),(s=l.y-l.dir)>=0&&s<m&&(c<l.left&&T.push({y:s,left:c,right:l.left,dir:-l.dir}),l.right<u&&T.push({y:s,left:l.right,right:u,dir:-l.dir})),(s=l.y+l.dir)>=0&&s<m&&c<u&&T.push({y:s,left:c,right:u,dir:l.dir})}d&&(l.y<O&&(O=l.y),l.y>w&&(w=l.y))}while(T.length>0);return{data:E,width:t.width,height:t.height,bounds:{minX:b,minY:O,maxX:_,maxY:w}}}(t,e,n,r,i):function(t,e,n,r,i){var o,a,s,l,u,c,h,p,f,d,g=t.data,y=t.width,m=t.height,v=t.bytes,_=-1,b=y+1,w=-1,O=m+1,x=n*y+e,E=new Uint8Array(y*m),S=new Uint8Array(i||y*m);if(1===S[x])return null;var C=[g[x*=v],g[x+1],g[x+2],g[x+3]],T=[{y:n,left:e-1,right:e+1,dir:1}];do{for(l=T.shift(),d=!1,a=l.left+1;a<l.right;a++)if(h=l.y*y,x=(h+a)*v,1!==S[h+a]&&!((o=g[x]-C[0])>r||o<-r)&&!((o=g[x+1]-C[1])>r||o<-r)&&!((o=g[x+2]-C[2])>r||o<-r)){for(d=!0,E[h+a]=1,S[h+a]=1,c=a-1;c>-1&&(x=(p=h+c)*v,1!==S[p])&&!((o=g[x]-C[0])>r||o<-r)&&!((o=g[x+1]-C[1])>r||o<-r)&&!((o=g[x+2]-C[2])>r||o<-r);)E[p]=1,S[p]=1,c--;for(u=a+1;u<y&&(x=(f=h+u)*v,1!==S[f])&&!((o=g[x]-C[0])>r||o<-r)&&!((o=g[x+1]-C[1])>r||o<-r)&&!((o=g[x+2]-C[2])>r||o<-r);)E[f]=1,S[f]=1,u++;c<b&&(b=c+1),u>_&&(_=u-1),(s=l.y-l.dir)>=0&&s<m&&(c<l.left&&T.push({y:s,left:c,right:l.left,dir:-l.dir}),l.right<u&&T.push({y:s,left:l.right,right:u,dir:-l.dir})),(s=l.y+l.dir)>=0&&s<m&&c<u&&T.push({y:s,left:c,right:u,dir:l.dir})}d&&(l.y<O&&(O=l.y),l.y>w&&(w=l.y))}while(T.length>0);return{data:E,width:t.width,height:t.height,bounds:{minX:b,minY:O,maxX:_,maxY:w}}}(t,e,n,r,i)},t.gaussBlur=function(t,e){var n,r,i,o,a,s,l,u,c=2*e+1,h=e*e,p=new Float32Array(c),f=0,d=t.width,g=t.height,y=t.data,m=t.bounds.minX,v=t.bounds.maxX,_=t.bounds.minY,b=t.bounds.maxY;for(n=0;n<e;n++){var w=(e-n)*(e-n),O=Math.exp(-w/(2*h))/(2*Math.PI*h);p[e+n]=p[e-n]=O,f+=2*O}for(n=0;n<c;n++)p[n]/=f;var x=new Uint8Array(d*g),E=e+d,S=e+g;for(a=_;a<b+1;a++)for(o=m;o<v+1;o++){for(s=0,r=a*d+o,l=e-o>0?e-o:0,u=E-o<c?E-o:c,i=r-e,n=l;n<u;n++)s+=y[i+n]*p[n];for(l=e-a>0?e-a:0,u=S-a<c?S-a:c,i=r-e*d,n=l;n<u;n++)s+=y[i+n*d]*p[n];x[r]=s>.5?1:0}return{data:x,width:d,height:g,bounds:{minX:m,minY:_,maxX:v,maxY:b}}},t.gaussBlurOnlyBorder=function(t,e,n){var r,i,o,a,s,l,u,c,h,p,f,d=function(t,e,n){var r,i,o,a,s,l,u,c=t.width,h=t.height,p=t.data,f=new Uint8Array(p),d=t.bounds.minX,g=t.bounds.maxX,y=t.bounds.minY,m=t.bounds.maxY,v=c*h,_=new Uint8Array(v),b=[],w=Math.max(d,1),O=Math.min(g,c-2),x=Math.max(y,1),E=Math.min(m,h-2);if(n&&n.length>0)for(s=0;s<v;s++)1===n[s]&&(f[s]=1);for(a=x;a<E+1;a++)for(r=w;r<O+1;r++)0!==p[s=a*c+r]&&(l=s+c,u=s-c,0!==f[s+1]&&0!==f[s-1]&&0!==f[l]&&0!==f[l+1]&&0!==f[l-1]&&0!==f[u]&&0!==f[u+1]&&0!==f[u-1]||b.push(s));if(0==d)for(a=y;a<m+1;a++)1===p[a*c]&&b.push(a*c);if(g==c-1)for(a=y;a<m+1;a++)1===p[a*c+g]&&b.push(a*c+g);if(0==y)for(r=d;r<g+1;r++)1===p[r]&&b.push(r);if(m==h-1)for(r=d;r<g+1;r++)1===p[m*c+r]&&b.push(m*c+r);var S,C,T=[],I=e+c,j=e+h,L=2*e+1;for(v=b.length,o=0;o<v;o++){for(_[s=b[o]]=1,T.push(s),a=(s-(r=s%c))/c,S=e-r>0?e-r:0,C=I-r<L?I-r:L,l=s-e,i=S;i<C;i++)0===_[u=l+i]&&(_[u]=1,T.push(u));for(S=e-a>0?e-a:0,C=j-a<L?j-a:L,l=s-e*c,i=S;i<C;i++)0===_[u=l+i*c]&&(_[u]=1,T.push(u))}return T}(t,e,n),g=2*e+1,y=2*e*e,m=new Float32Array(g),v=0,_=t.width,b=t.height,w=t.data,O=t.bounds.minX,x=t.bounds.maxX,E=t.bounds.minY,S=t.bounds.maxY,C=d.length;for(o=0;o<e;o++)i=(e-o)*(e-o),r=Math.exp(-i/y)/Math.PI,m[e+o]=m[e-o]=r,v+=2*r;for(o=0;o<g;o++)m[o]/=v;var T=new Uint8Array(w),I=e+_,j=e+b;for(o=0;o<C;o++){for(h=0,c=((s=d[o])-(u=s%_))/_,p=e-u>0?e-u:0,f=I-u<g?I-u:g,l=s-e,a=p;a<f;a++)h+=w[l+a]*m[a];if(h>.5)T[s]=1,u<O&&(O=u),u>x&&(x=u),c<E&&(E=c),c>S&&(S=c);else{for(p=e-c>0?e-c:0,f=j-c<g?j-c:g,l=s-e*_,a=p;a<f;a++)h+=w[l+a*_]*m[a];h>.5?(T[s]=1,u<O&&(O=u),u>x&&(x=u),c<E&&(E=c),c>S&&(S=c)):T[s]=0}}return{data:T,width:_,height:b,bounds:{minX:O,minY:E,maxX:x,maxY:S}}},t.createBorderMask=function(t){var e,n,r,i,o,a=t.width,s=t.height,l=t.data,u=t.bounds.minX,c=t.bounds.maxX,h=t.bounds.minY,p=t.bounds.maxY,f=c-u+1,d=p-h+1,g=new Uint8Array(f*d),y=Math.max(u,1),m=Math.min(c,a-2),v=Math.max(h,1),_=Math.min(p,s-2);for(n=v;n<_+1;n++)for(e=y;e<m+1;e++)0!==l[r=n*a+e]&&(i=r+a,o=r-a,0!==l[r+1]&&0!==l[r-1]&&0!==l[i]&&0!==l[i+1]&&0!==l[i-1]&&0!==l[o]&&0!==l[o+1]&&0!==l[o-1]||(g[(n-h)*f+(e-u)]=1));if(0==u)for(n=h;n<p+1;n++)1===l[n*a]&&(g[(n-h)*f]=1);if(c==a-1)for(n=h;n<p+1;n++)1===l[n*a+c]&&(g[(n-h)*f+(c-u)]=1);if(0==h)for(e=u;e<c+1;e++)1===l[e]&&(g[e-u]=1);if(p==s-1)for(e=u;e<c+1;e++)1===l[p*a+e]&&(g[(p-h)*f+(e-u)]=1);return{data:g,width:f,height:d,offset:{x:u,y:h}}},t.getBorderIndices=function(t){var e,n,r,i,o,a=t.width,s=t.height,l=t.data,u=[],c=a-1,h=s-1;for(n=1;n<h;n++)for(e=1;e<c;e++)0!==l[r=n*a+e]&&(i=r+a,o=r-a,0!==l[r+1]&&0!==l[r-1]&&0!==l[i]&&0!==l[i+1]&&0!==l[i-1]&&0!==l[o]&&0!==l[o+1]&&0!==l[o-1]||u.push(r));for(n=0;n<s;n++)1===l[n*a]&&u.push(n*a);for(e=0;e<a;e++)1===l[e]&&u.push(e);for(r=a-1,n=0;n<s;n++)1===l[n*a+r]&&u.push(n*a+r);for(r=(s-1)*a,e=0;e<a;e++)1===l[r+e]&&u.push(r+e);return u},t.traceContours=function(t){var e,n,r,i,o,a,s,l,u,c,h,p,f,d,g,y=function(t){var e,n,r=t.width,i=t.data,o=t.bounds.minX,a=t.bounds.maxX,s=t.bounds.minY,l=t.bounds.maxY,u=a-o+3,c=l-s+3,h=new Uint8Array(u*c);for(n=s;n<l+1;n++)for(e=o;e<a+1;e++)1===i[n*r+e]&&(h[(n-s+1)*u+(e-o+1)]=1);return{data:h,width:u,height:c,offset:{x:o-1,y:s-1}}}(t),m=[],v=0,_=y.width,b=2*_,w=y.height,O=y.data,x=y.offset.x,E=y.offset.y,S=new Uint8Array(O),C=[[1,0],[1,1],[0,1],[-1,1],[-1,0],[-1,-1],[0,-1],[1,-1]];for(i=1;i<w-1;i++)for(r=1;r<_-1;r++)if(1===O[o=i*_+r])for(e=-_;e<b;e+=b)if(0===O[o+e]&&0===S[o+e]){for(v++,s=[],u=(l=e===_)?2:6,p=f=c={x:r,y:i},h=null;;){for(S[p.y*_+p.x]=v,n=0;n<8;n++){if(g=C[u=(u+1)%8],1===O[a=(d={x:p.x+g[0],y:p.y+g[1]}).y*_+d.x]){S[a]=v;break}S[a]=-1,d=null}if(null===d)break;if(p=d,h){if(f.x===c.x&&f.y===c.y&&p.x===h.x&&p.y===h.y)break}else h=d;s.push({x:f.x+x,y:f.y+E}),f=p,u=(u+4)%8}null!=d&&(s.push({x:c.x+x,y:c.y+E}),m.push({inner:l,label:v,points:s}))}return m},t.simplifyContours=function(t,e,n){var r,i,o,a,s,l,u,c,h,p,f,d,g,y,m,v,_,b,w,O,x,E=t.length,S=[];for(i=0;i<E;i++)if(s=(a=t[i]).points,(l=a.points.length)<n){for(u=[],o=0;o<l;o++)u.push({x:s[o].x,y:s[o].y});S.push({inner:a.inner,label:a.label,points:u,initialCount:l})}else{c=[0,l-1],h=[{first:0,last:l-1}];do{if(!((p=h.shift()).last<=p.first+1)){for(f=-1,d=p.first,r=p.first+1;r<p.last;r++)w=s[r],O=s[p.first],x=s[p.last],_=w.x-O.x,b=w.y-O.y,y=Math.sqrt(_*_+b*b),_=w.x-x.x,b=w.y-x.y,m=Math.sqrt(_*_+b*b),_=O.x-x.x,b=O.y-x.y,v=Math.sqrt(_*_+b*b),(g=y>=Math.sqrt(m*m+v*v)?m:m>=Math.sqrt(y*y+v*v)?y:Math.abs((b*w.x-_*w.y+O.x*x.y-x.x*O.y)/v))>f&&(d=r,f=g);f>e&&(c.push(d),h.push({first:p.first,last:d}),h.push({first:d,last:p.last}))}}while(h.length>0);for(u=[],l=c.length,c.sort(function(t,e){return t-e}),o=0;o<l;o++)u.push({x:s[c[o]].x,y:s[c[o]].y});S.push({inner:a.inner,label:a.label,points:u,initialCount:a.points.length})}return S},t}();"undefined"!==typeof t&&null!==t&&(t.exports=e),"undefined"!==typeof window&&null!==window&&(window.MagicWand=e)}).call(e,n(406)(t))},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e,n){"use strict";n.d(e,"a",function(){return c});var r=n(19),i=n(99),o=n(32);function a(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function s(t){"@babel/helpers - typeof";return(s="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function l(t,e,n,r){if(this.lastLoadImageRequest&&(this.lastLoadImageRequest.serverUrl!==t||this.lastLoadImageRequest.path!==e||this.lastLoadImageRequest.doneCb!==n)){var i=this.lastLoadImageRequest;this.lastLoadImageRequest=null,this.load(i.serverUrl,i.path,i.doneCb,i.dropped)}}function u(){this.element&&(this.element.addEventListener("drop",function(t){t.preventDefault();var e=Object(o.k)(t.dataTransfer);e&&!e.isFolder&&e.path&&e.serverUrl&&0==this.fireEvent(o.c.BeforeDrop,{serverUrl:e.serverUrl,path:e.path,node:e}).filter(function(t){return 0==t}).length&&this.load(e.serverUrl,e.path,null,!0)}.bind(this),!1),this.element.addEventListener("dragover",function(t){t.preventDefault();var e=t.dataTransfer.types;if(e){var n=!1;if(e.indexOf?n=e.indexOf("application/x-fancytree-node")>-1||e.indexOf(o.b)>-1:e.contains&&(n=e.contains("application/x-fancytree-node")||e.contains(o.b)),n)return void(t.dataTransfer.dropEffect="link")}t.dataTransfer.dropEffect="none"}.bind(this),!1))}var c=function(){function t(e,n){if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),Object(r.b)()){if(this.loadingImage=!1,this.lastLoadImageRequest=null,this.context=e,this.slideLoaderOptions=n||{},this.listeners={},this.listeners[o.c.SlideInfoError]=[],this.listeners[o.c.BeforeSlideLoad]=[],this.listeners[o.c.SlideLoaded]=[],this.listeners[o.c.BeforeDrop]=[],this.mainViewport=null,this.slideLoaderOptions.element)this.element=this.slideLoaderOptions.element;u.call(this)}}var e,n,c;return e=t,(n=[{key:"setOption",value:function(t,e){this.slideLoaderOptions[t]=e}},{key:"getOption",value:function(t){return this.slideLoaderOptions[t]}},{key:"load",value:function(t,e,n,r){if(!0!==this.loadingImage){if(!0!==r&&(r=!1),this.loadingImage=!0,this.mainViewport&&this.mainViewport.map){for(;this.mainViewport.map.getInteractions().getLength()>0;)this.mainViewport.map.removeInteraction(this.mainViewport.map.getInteractions().item(0));for(;this.mainViewport.map.getLayers().getLength()>0;)this.mainViewport.map.removeLayer(this.mainViewport.map.getLayers().item(0));for(;this.mainViewport.map.getControls().getLength()>0;)this.mainViewport.map.removeControl(this.mainViewport.map.getControls().item(0))}var a={serverUrl:t,path:e,cancel:!1};if(this.fireEvent(o.c.BeforeSlideLoad,a),a.cancel)this.loadingImage=!1;else{var u=this;if(!t||!e)return this.mainViewport&&(this.mainViewport.element.innerHTML="",this.mainViewport=null),this.loadingImage=!1,this.fireEvent(o.c.SlideLoaded,{serverUrl:t,path:e,dropped:r}),"function"===typeof n&&n(),void l.call(u,t,e,n,r);this.context.getSession(t,function(a){var c=function(t){if(null===t||"object"!=s(t))return t;var e=t.constructor();for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}(u.slideLoaderOptions);c.serverUrls=[t],c.image=e,c.sessionID=a,c.caller=u.context.getCaller(),u.mainViewport=new i.a(c,function(){u.loadingImage=!1,u.fireEvent(o.c.SlideLoaded,{serverUrl:t,path:e,dropped:r}),"function"===typeof n&&n(),l.call(u,t,e,n,r)},function(){u.loadingImage=!1,console.error("Error loading slide")});var h=0;u.mainViewport.listen("tileserror",function(){0===h?(h++,o.e.set(t,null),u.context.getSession(t,function(t){h=-1,u.mainViewport.sessionID=t,u.mainViewport.redraw()},function(){u.fireEvent(o.c.SlideInfoError,{})})):-1===h&&(h=0,u.fireEvent(o.c.SlideInfoError,{}))}),u.mainViewport.listen("SlideLoadError",function(){u.loadingImage=!1,u.fireEvent(o.c.SlideInfoError,{}),l.call(u,t,e,n,r)})},function(){u.loadingImage=!1,u.fireEvent(o.c.SlideInfoError,{}),l.call(u,t,e,n,r)})}}else this.lastLoadImageRequest={serverUrl:t,path:e,doneCb:n,dropped:!0===r}}},{key:"getLoadedImageInfo",value:function(){return this.mainViewport&&this.mainViewport.map&&this.mainViewport.imageInfo?this.mainViewport.imageInfo:null}},{key:"reloadAnnotations",value:function(t){this.mainViewport&&this.mainViewport.map&&this.mainViewport.imageInfo?this.mainViewport.reloadAnnotations(t):"function"===typeof t&&t.call(this)}},{key:"listen",value:function(t,e){this.listeners.hasOwnProperty(t)||console.error(t+" is not a valid event"),this.listeners[t].push(e)}},{key:"fireEvent",value:function(t,e){if(this.listeners.hasOwnProperty(t)){for(var n=[],r=0,i=this.listeners[t].length;r<i;r++)n.push(this.listeners[t][r].call(this,e));return n}console.error(t+" does not exist")}}])&&a(e.prototype,n),c&&a(e,c),t}()},function(t,e,n){"use strict";var r=n(23),i=n(19),o=n(32);function a(t){"@babel/helpers - typeof";return(a="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function s(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function l(t,e){for(var n=0;n<t.length;n++)if(t[n]==e)return!0;return!1}var u=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),Object(i.b)()&&(this.listeners={},this.listeners[o.c.FormSaved]=[],this.listeners[o.c.FormEditClick]=[],this.context=e)}var e,n,l;return e=t,(n=[{key:"renderReadOnlyField",value:function(e,n,i){var o=(n&&n.FormValue?n.FormValue:"").replace(/"/g,"&quot;");0!==o.length&&n&&e.FieldType!=t.FieldType.CheckBox&&e.FormList&&e.FormList.FormListValues&&!n.IsOtherValue&&!n.IsBelowDetectableLimit&&(o=e.FormList.FormListValues[o].Value),n&&n.IsBelowDetectableLimit&&(o=r.a.translate("Below detectable limit"));var a="";switch(e.FieldType){case t.FieldType.Paragraph:a+='<p class="'+i+'">'+o+"</p>";break;case t.FieldType.CheckBox:if(e.FormList&&e.FormList.FormListValues&&n&&!n.IsOtherValue&&0!==o.length&&!n.IsBelowDetectableLimit){var s=o.split("|");for(a+='<ul class="'+i+'">',k=0;k<s.length;k++)a+="<li>"+e.FormList.FormListValues[s[k]].Value+"</li>";a+="</ul>"}else a+='<div class="'+i+'">'+o+"</div>";break;case t.FieldType.Percentage:a+='<div class="'+i+'">'+o+"%</div>";break;case t.FieldType.HyperLink:a+='<a class="link-field" title="'+e.Tooltip+'" href="'+e.Url+'" '+(!0===e.NewWindow?' target="_blank" ':"")+">"+e.Label+"</a>";break;case t.FieldType.Label:break;default:a+='<div class="'+i+'">'+o+"</div>"}return a}},{key:"getForm",value:function(t,e,n,r,i){var s=this;s.context.getSession(t,function(l){Object(o.f)({serverUrl:t,method:o.a.GetForm,data:{sessionID:l,id:e},success:function(e){var u=Object(o.l)(e.responseText);u?null!==n&&void 0!==n&&"object"===a(n)?function(t,e,n,r,i,a,s,l){var u=this;Object(o.f)({serverUrl:t,method:o.a.GetFormData,data:{sessionID:e,pathOrUid:r,formId:n.FormID,currentUserOnly:i},success:function(t){var e=Object(o.l)(t.responseText);if("function"===typeof s){var n=null;if("string"===typeof a){for(var r=0;r<e.length;r++)if(e[r].Login==a){n=[e[r]];break}}else n="function"===typeof a?a.call(u,e):e;s.call(u,n)}},failure:l})}.call(s,t,l,u,n.path,!0===n.currentUserOnly,n.dataFilter,function(t){u.FormData=t,"function"===typeof r&&r.call(s,u,t)},i):"function"===typeof r&&r.call(s,u,null):"function"===typeof i&&i()},failure:i})},i)}},{key:"getForms",value:function(t,e,n){this.context.getSession(t,function(r){Object(o.f)({serverUrl:t,method:o.a.GetForms,data:{sessionID:r},success:function(t){var r=Object(o.l)(t.responseText);r&&"function"===typeof e?e(r):"function"===typeof n&&n(r)},failure:n})},n)}},{key:"displayForm",value:function(t,e,n,r,i,o){var a=this;this.getForm(t,e,r,function(e,s){a.serverUrl=t,e&&(a.form=e,a.form.enabled=!0,!0===e.ReadOnly&&(r.readOnly=!0)),a.path=r.path,a.originalData=s,v.call(a,n,e,r,s,i,o)},o)}},{key:"renderForm",value:function(t,e,n,r,i,o){e&&(this.form=e,this.form.enabled=!0,!0===e.ReadOnly&&(n.readOnly=!0)),this.path=n.path,this.originalData=r,v.call(this,t,e,n,r,i,o)}},{key:"saveForm",value:function(e,n){var i=this;i.setEnabled(!1),$("#"+i.form.ClientID+" button[type='submit']").html(r.a.translate("Saving...")),function(e,n){if(!function(){if(!this.form)return!1;h.call(this);var e,n,i=this.form;$("#"+i.ClientID+"_validation").html("");for(var o=0;o<this.form.FormFields.length;o++){var a=i.FormFields[o],s=y(this.form,o),l=$("#"+s+"_validation");switch(l.html(""),a.FieldType){case t.FieldType.Text:case t.FieldType.Paragraph:case t.FieldType.DateTime:if(e=$("#"+s),!0===a.Required&&""===e.val())return e.addClass("invalid"),e.focus(),l.html(r.a.translate("Please enter a value")),!1;e.removeClass("invalid");break;case t.FieldType.Integer:case t.FieldType.Double:case t.FieldType.Percentage:if(e=$("#"+s),!0===a.Required&&""===e.val()&&(n=!1,!0===a.AllowBelowDetectableLimit&&1===$("#"+s+"_below:checked").length&&(n=!0),!n))return e.addClass("invalid"),e.focus(),l.html(r.a.translate("Please enter a value")),!1;var u=e.val();if(isNaN(u))return e.addClass("invalid"),e.focus(),l.html(r.a.translate("Please enter a valid value")),!1;if("number"!==typeof u&&(u=parseFloat(u)),"number"===typeof a.LowerBound&&u<a.LowerBound)return e.addClass("invalid"),e.focus(),l.html(r.a.translate("Please enter a value larger than or equal to {LowerBound}",{LowerBound:a.LowerBound})),!1;if("number"===typeof a.UpperBound&&u>a.UpperBound)return e.addClass("invalid"),e.focus(),l.html(r.a.translate("Please enter a value less than or equal to {UpperBound}",{UpperBound:a.UpperBound})),!1;e.removeClass("invalid");break;case t.FieldType.ListBox:if(e=$("#"+s),!0===a.Required&&""===e.val()&&(n=!1,a.AllowOther&&""!==$("#"+s+"_other").val()&&(n=!0),!n))return e.addClass("invalid"),e.focus(),l.html(r.a.translate("Please select a value")),!1;e.removeClass("invalid");break;case t.FieldType.CheckBox:case t.FieldType.RadioButton:if(!0===a.Required&&0===$("input[name='"+s+"']:not([id$='_other_indicator']):checked").length&&(!0!==a.AllowOther||""===$("#"+s+"_other").val()))return $("input[name='"+s+"']").first().focus(),l.html(r.a.translate("Please select a value")),!1;break;case t.FieldType.Label:case t.FieldType.HyperLink:break;default:return console.error("Unknown field type "+a.FieldType),!1}}return!0}.call(this))return void("function"===typeof n&&n({success:!1,message:r.a.translate("Form validation error")}));var i=this;i.context.getSession(i.serverUrl,function(a){var s=function(e){for(var n=[],r=this.form,i=0;i<this.form.FormFields.length;i++){var o,a,s=r.FormFields[i],l=y(this.form,i),u=null,h=!1,p=!1;switch(s.FieldType){case t.FieldType.Text:case t.FieldType.Paragraph:case t.FieldType.DateTime:""!==(o=$("#"+l)).val()&&(u=o.val());break;case t.FieldType.Integer:case t.FieldType.Double:case t.FieldType.Percentage:""!==(o=$("#"+l)).val()?u=o.val():!0===s.AllowBelowDetectableLimit&&1===$("#"+l+"_below:checked").length&&(h=!0);break;case t.FieldType.ListBox:""!==(o=$("#"+l)).val()?u=o.val():s.AllowOther&&""!==$("#"+l+"_other").val()&&(u=$("#"+l+"_other").val(),p=!0);break;case t.FieldType.CheckBox:a=$("#"+l+"_other").val(),0!==(o=$("input[name='"+l+"']:checked")).length?u=c(o):!0===s.AllowOther&&""!==a&&(u=a,p=!0);break;case t.FieldType.RadioButton:a=$("#"+l+"_other").val(),0!==(o=$("input[name='"+l+"']:not([id$='_other_indicator']):checked")).length?u=o.val():!0===s.AllowOther&&""!==a&&(u=a,p=!0)}n.push({FieldId:s.FieldID,FormValue:u,IsBelowDetectableLimit:h,IsOtherValue:p})}return{sessionID:e,pathOrUid:this.path,formId:this.form.FormID,fieldValues:n}}.call(i,a);Object(o.f)({serverUrl:i.serverUrl,method:o.a.SaveFormData,httpMethod:"POST",contentType:"application/json",data:s,success:function(t){i.hasChangesProperty=!1,"function"===typeof e&&e({success:!0,message:""})},failure:function(t){var e=r.a.translate("Save failed. Check the form values and try again.");if(t&&t.responseText){var o=JSON.parse(t.responseText);o&&o.Message&&(e=o.Message)}$("#"+i.form.ClientID+"_validation").html(e),"function"===typeof n&&n({success:!1,message:e})}})},function(t){"function"===typeof n&&n({success:!1,message:t&&t.Message?t.Message:r.a.translate("Authentication error")})})}.call(this,function(t){$("#"+i.form.ClientID+" button[type='submit']").html(r.a.translate("Save")),i.setEnabled(!0),i.fireEvent(o.c.FormSaved,t),"function"===typeof e&&e(t)},function(t){$("#"+i.form.ClientID+" button[type='submit']").html(r.a.translate("Save")),i.setEnabled(!0),i.fireEvent(o.c.FormSaved,t),"function"===typeof n&&n(t)})}},{key:"setEnabled",value:function(t){this.form?(this.form.enabled=!!t,$("#"+this.form.ClientID+" > fieldset").prop("disabled",!this.form.enabled)):console.error("No form")}},{key:"getEnabled",value:function(){if(this.form)return this.form.enabled;console.error("No form")}},{key:"listen",value:function(t,e){this.listeners.hasOwnProperty(t)||console.error(t+" is not a valid event"),this.listeners[t].push(e)}},{key:"fireEvent",value:function(t,e){if(this.listeners.hasOwnProperty(t))for(var n=0,r=this.listeners[t].length;n<r;n++)this.listeners[t][n].call(this,e);else console.error(t+" does not exist")}},{key:"hasChanges",value:function(){return!!this.form&&this.hasChangesProperty}},{key:"reset",value:function(){if(!this.form)return!1;$("#"+this.form.ClientID+" [type='reset']").click()}}])&&s(e.prototype,n),l&&s(e,l),t}();function c(t){var e="";return t.each(function(){e.length>0&&(e+="|"),e+=this.value}),e}function h(){this.form&&($("#"+this.form.ClientID+" [id$='_validation']").html(""),$("#"+this.form.ClientID+" *").removeClass("invalid"))}function p(t,e){$("#"+e+"_below").change(function(){this.checked&&$("#"+e).val("")})}function f(t,e){$("#"+e).change(function(){""!==$(this).val()&&$("#"+e+"_below").prop("checked",!1)})}function d(t,e){$("#"+e+"_other").change(function(){""!==$(this).val()&&($("#"+e).val(""),$("input[name='"+e+"'").prop("checked",!1),$("#"+e+"_other_indicator").prop("checked",!0))})}function g(t,e){$("input[name='"+e+"'], #"+e).change(function(){(this.checked||"SELECT"===this.tagName&&""!==this.value)&&$("#"+e+"_other").val("")})}function y(t,e){return t.ClientID+"_field_"+t.FormFields[e].FieldID}function m(t,e,n){var i,o,a=t.FormFields[e];a.Tooltip=a.Tooltip||"";var s=y(t,e),c=function(t){if(this.originalData){for(var e=0;e<this.originalData.length;e++){var n=this.originalData[e];if(n.FieldValues&&n.FieldValues.length)for(var r=0;r<n.FieldValues.length;r++){var i=n.FieldValues[r];if(i.FieldId===t)return i}}return null}}.call(this,a.FieldID);if(c||(c={IsOtherValue:!1,IsBelowDetectableLimit:!1,FormValue:null}),"function"===typeof n.fieldCb&&!1===n.fieldCb(t,a,c))return"";var h="";a.ExtraStyle&&(h+=" "+a.ExtraStyle+" "),a.fieldGroupClass&&(h+=" "+a.fieldGroupClass+" ");var p=c&&c.FormValue?c.FormValue:"",f='<div class="form-group '+(!0===a.Required?"required":"")+" "+h+'" title="'+a.Tooltip+'">';a.FieldType!==u.FieldType.HyperLink&&(f+='<label for="'+s+'">'+a.Label+"</label>"),f+="<div class='field-container "+(n.fieldContainerClass?n.fieldContainerClass:"")+" "+(a.fieldContainerClass?a.fieldContainerClass:"")+" '>";var d="";!0===a.Required&&(d=' required="required" ');var g="";if(n.inputClass&&(g+=" "+n.inputClass+" "),a.fieldClass&&(g+=" "+a.fieldClass+" "),a.FieldType===u.FieldType.DateTime&&console.warn("PMA.UI.Components.Forms: No proper date time field support yet."),!0===n.readOnly)f+=this.renderReadOnlyField(a,c,g);else{switch(a.FieldType){case u.FieldType.Text:f+='<input id="'+s+'" name="'+s+'" value="'+p+'" type="text" placeholder="'+a.Tooltip+'" '+d+' class="'+g+'" />';break;case u.FieldType.DateTime:f+='<input id="'+s+'" name="'+s+'" value="'+p+'" type="text" placeholder="yyyy-MM-dd HH:mm:ss" '+d+' class="'+g+'" />';break;case u.FieldType.Paragraph:f+='<textarea id="'+s+'" name="'+s+'" placeholder="'+a.Tooltip+'"'+d+' class="'+g+'">'+p+"</textarea>";break;case u.FieldType.ListBox:if(f+='<select id="'+s+'" name="'+s+'"  class="'+g+'">',a.FormList&&a.FormList.FormListValues)for(f+='<option value="" '+(0===p.length?'selected="selected"':"")+">"+a.Tooltip+"</option>",i=a.FormList.FormListValues,o=0;o<i.length;o++)f+='<option value="'+i[o].ValueID+'" '+(0!==p.length&&i[o].ValueID==p?'selected="selected"':"")+">"+i[o].Value+"</option>";f+="</select>";break;case u.FieldType.CheckBox:f+='<ul class="checkboxlist">';var m=p.split("|");if(a.FormList&&a.FormList.FormListValues)for(i=a.FormList.FormListValues,o=0;o<i.length;o++)f+="<li>",f+='<input type="checkbox" class="'+g+'" id="'+s+"_"+i[o].ValueID+'" name="'+s+'" value="'+i[o].ValueID+'" '+(l(m,""+i[o].ValueID)?'checked="checked"':"")+"/>",f+='<label for="'+s+"_"+i[o].ValueID+'">'+i[o].Value+"</label>",f+="</li>";f+="</ul>";break;case u.FieldType.RadioButton:if(f+='<ul class="radiobuttonlist">',a.FormList&&a.FormList.FormListValues){for(i=a.FormList.FormListValues,o=0;o<i.length;o++)f+="<li>",f+='<input type="radio" class="'+g+'" id="'+s+"_"+i[o].ValueID+'" name="'+s+'" value="'+i[o].ValueID+'" '+(""!==p&&i[o].ValueID==p?'checked="checked"':"")+" />",f+='<label for="'+s+"_"+i[o].ValueID+'">'+i[o].Value+"</label>",f+="</li>";!0===a.AllowOther&&(f+="<li>",f+='<input type="radio" class="'+g+'" id="'+s+'_other_indicator" name="'+s+'" '+(c&&c.IsOtherValue?'checked="checked"':"")+' value="other" />',f+='<label for="'+s+'_other_indicator">'+r.a.translate("Other value")+"</label>",f+="</li>")}f+="</ul>";break;case u.FieldType.Integer:var v=1;a.Interval&&(v=0|a.Interval),f+='<input id="'+s+'" name="'+s+'"'+d+" "+(null!==a.LowerBound?'min="'+a.LowerBound+'"':"")+" "+(null!==a.UpperBound?'max="'+a.UpperBound+'"':"")+' type="number" step="'+v+'" value="'+p+'"  placeholder="'+a.Tooltip+'" class="'+g+'"/>';break;case u.FieldType.Double:f+='<input id="'+s+'" name="'+s+'"'+d+" "+(null!==a.LowerBound?'min="'+a.LowerBound+'"':"")+" "+(null!==a.UpperBound?'max="'+a.UpperBound+'"':"")+' type="number" step="'+(a.Interval?a.Interval:"any")+'" value="'+p+'" placeholder="'+a.Tooltip+'" class="'+g+'" />';break;case u.FieldType.Percentage:var _=0,b=100;null!==a.LowerBound&&(0|a.LowerBound)>=0&&(_=0|a.LowerBound),null!==a.UpperBound&&(0|a.UpperBound)<=0&&(b=0|a.UpperBound),f+='<input id="'+s+'" name="'+s+'"'+d+' min="'+_+'" max="'+b+'" type="number" step="'+(a.Interval?a.Interval:"any")+'" value="'+p+'" placeholder="'+a.Tooltip+'" class="'+g+'" />';break;case u.FieldType.Label:break;case u.FieldType.HyperLink:f+='<a class="link-field" id="'+s+'" title="'+a.Tooltip+'" href="'+a.Url+'" '+(!0===a.NewWindow?' target="_blank" ':"")+">"+a.Label+"</a>"}!0===a.AllowBelowDetectableLimit&&(f+='<div class="below-container">',f+='<input id="'+s+'_below" name="'+s+'_below" type="checkbox"  '+(c&&!0===c.IsBelowDetectableLimit?'checked="checked"':"")+' value="below" />',f+='<label for="'+s+'_below">'+r.a.translate("Below detectable limit")+"</label>",f+="<div>"),!0===a.AllowOther&&(f+='<input id="'+s+'_other" class="other '+(n.inputClass?n.inputClass:"")+'" name="'+s+'_other" type="text" value="'+(""!==p&&c&&!0===c.IsOtherValue?p:"")+'" placeholder="'+r.a.translate("Other value")+'" />')}return f+='<span id="'+s+'_validation" class="field-validation '+(n.fieldValidationClass?n.fieldValidationClass:"")+'"></span>',a.additionalHtml&&(f+=a.additionalHtml),f+="</div></div>"}function v(t,e,n,i,a,s){this.form.ClientID="frm"+(1e7*Math.random()|0),this.hasChangesProperty=!1;var l="<form class='pma-ui-form "+(n.formClass?n.formClass:"")+"' name='"+e.ClientID+"' id='"+e.ClientID+"' autocomplete='off' novalidate><fieldset>";e.FormName&&(l+="<legend class='form-name'>"+e.FormName+(!0===n.editButton&&!0===n.readOnly?'<span class="edit-button">'+r.a.translate("[Edit]")+"</span>":"")+"</legend>"),e.Instructions&&(l+="<div class='form-instructions'>"+e.Instructions+"</div>"),e.FormFields.sort(function(t,e){return t.DisplayOrder-e.DisplayOrder});for(var u=0;u<e.FormFields.length;u++)l+=m.call(this,e,u,n);l+="<div id='"+e.ClientID+"_validation' class='form-validation "+(n.validationClass?n.validationClass:"")+"'></div>",!0!==n.readOnly&&(l+="<div class='input-container "+(n.btnContainerClass?n.btnContainerClass:"")+"'>",l+="<button type='submit' value='"+r.a.translate("Save")+"' class='"+(n.btnSaveClass?n.btnSaveClass:"")+"' >"+r.a.translate("Save")+"</button>",l+="<button type='reset' value='"+r.a.translate("Reset")+"' class='"+(n.btnResetClass?n.btnResetClass:"")+"' >"+r.a.translate("Reset")+"</button>"),l+="</div>",l+="</fieldset></form>",$(t).html(l),function(){var t=this;$("#"+this.form.ClientID).submit(function(e){e.preventDefault(),t.saveForm()}).change(function(){t.hasChangesProperty=!0}),$("#"+this.form.ClientID+" legend .edit-button").click(function(e){e.preventDefault(),t.fireEvent(o.c.FormEditClick)}),$("#"+this.form.ClientID+" [type='reset']").click(function(e){h.call(t),t.hasChangesProperty=!1,$("#"+t.form.ClientID+" select").val(""),$("#"+t.form.ClientID+" input[type='text']").val(""),$("#"+t.form.ClientID+" input[type='number']").val(""),$("#"+t.form.ClientID+" textarea").val(""),$("#"+t.form.ClientID+" input[type='checkbox'], #"+t.form.ClientID+" input[type='radio']").prop("checked",!1),e.preventDefault()});for(var e=0;e<this.form.FormFields.length;e++){var n=y(this.form,e),r=this.form.FormFields[e];r.AllowBelowDetectableLimit&&(p.call(t,r,n),f.call(t,r,n)),r.AllowOther&&(d.call(t,r,n),g.call(t,r,n))}}.call(this),"function"===typeof a&&a.call(this,this.form,null)}u.FieldType={Text:0,Paragraph:1,ListBox:2,CheckBox:3,RadioButton:4,Integer:5,Double:6,DateTime:7,Percentage:8,Label:9,HyperLink:10}},function(t,e,n){"use strict";n(23),n(32),n(19);var r=n(46),i=(n.n(r),n(168)),o=(n.n(i),n(243)),a=(n.n(o),n(244)),s=(n.n(a),n(245));n.n(s)},function(t,e,n){"use strict";n(23),n(246),n(32),n(19)},function(t,e,n){"use strict";n(32),n(60),n(20)},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e,n){"use strict";var r=n(417),i=n(418);e.a=[i.a,r.a]},function(t,e,n){"use strict";var r=n(124),i=n.n(r),o=n(125),a=n(170);n.n(a);function s(t){"@babel/helpers - typeof";return(s="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function l(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function u(t,e){return(u=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function c(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}var h=[{serverUrl:window.PmaCoreConfiguration.serverUrl,sessionId:window.PmaCoreConfiguration.sessionId}],p=function(t){function e(t){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),n=function(t,e){if(e&&("object"===s(e)||"function"===typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return c(t)}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t)),Object.defineProperty(c(n),"getReadableFileSizeString",{configurable:!0,enumerable:!0,writable:!0,value:function(t){var e=-1;do{t/=1024,e++}while(t>1024);return Math.max(t,.1).toFixed(1)+[" kB"," MB"," GB"," TB","PB","EB","ZB","YB"][e]}}),n.treeRef=i.a.createRef(null),n.state={tree:null,context:null,thumbUrl:"",imageInfo:null,showImageInfo:!1},n}var n,a,p;return function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&u(t,e)}(e,r["Component"]),n=e,(a=[{key:"componentDidMount",value:function(){var t=this;if(h.length>0){var e=new o.c({caller:"PMA.wordpress"});new o.d(e,h),this.setState({context:e}),setTimeout(function(){return t.bindTreeToDomNode()})}}},{key:"componentWillUnmount",value:function(){this.state.imageInfo&&this.props._onChange(this.props.name,this.state.imageInfo.Filename)}},{key:"bindTreeToDomNode",value:function(){var t=this,e=new o.g(this.state.context,{servers:[{name:"My Server",url:h[0].serverUrl}],element:this.treeRef.current,checkboxes:!1,autoDetectPmaStart:!1,autoExpandNodes:!0,preview:!1,search:!1});e.navigateTo("My Server/"+this.props.value),e.listen(o.b.SlideSelected,function(e){var n=o.h(e.serverUrl,window.PmaCoreConfiguration.sessionId,e.path,0);t.setState({thumbUrl:n}),t.state.context.getImageInfo(e.serverUrl,e.path,function(e,n){t.setState({imageInfo:n,showImageInfo:!0})})}),this.setState({tree:e})}},{key:"render",value:function(){return i.a.createElement("div",{className:"pmaslidedialog"},i.a.createElement("div",{className:"pmaslidetree",id:"pmaslidetree",ref:this.treeRef}),this.state.showImageInfo&&i.a.createElement("div",{className:"pmaslide-sidebar"},i.a.createElement("div",{className:"attachment-details"},i.a.createElement("h2",null,"Slide Details"),i.a.createElement("div",{className:"attachment-info"},i.a.createElement("div",{className:"thumbnail thumbnail-image"},i.a.createElement("img",{src:this.state.thumbUrl,alt:""})),i.a.createElement("div",{className:"details"},i.a.createElement("div",{className:"filename"},this.state.imageInfo.Filename),i.a.createElement("div",{className:"uploaded"},new Date(parseInt(this.state.imageInfo.LastModified.substr(6))).toDateString()),i.a.createElement("div",{className:"file-size"},this.getReadableFileSizeString(this.state.imageInfo.PhysicalSize)),i.a.createElement("div",{className:"dimensions"},this.state.imageInfo.Width+" by "+this.state.imageInfo.Height+" pixels"),i.a.createElement("div",{className:"compat-meta"},"Assosiated Images: "+this.state.imageInfo.AssociatedImageTypes.toString()))))))}}])&&l(n.prototype,a),p&&l(n,p),e}();Object.defineProperty(p,"slug",{configurable:!0,enumerable:!0,writable:!0,value:"pmawp_slide_selector"}),e.a=p},function(t,e,n){"use strict";var r=n(124),i=n.n(r),o=n(125);function a(t){"@babel/helpers - typeof";return(a="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function s(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function l(t,e){return(l=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function u(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}var c=[{serverUrl:window.PmaCoreConfiguration.serverUrl,sessionId:window.PmaCoreConfiguration.sessionId}],h=function(t){function e(t){var n,r;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e){if(e&&("object"===a(e)||"function"===typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return u(t)}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t))).viewerRef=i.a.createRef(null);try{r=JSON.parse(n.props.value)}catch(t){r={}}return n.state={context:null,slideLoader:null,annotationsManager:null,roi:r.roi||"",geometry:r.geometry||"",channels:r.channels||[],layer:r.layer||-1,timeFrame:r.timeFrame||-1},n.selectRoi=n.selectRoi.bind(u(n)),n.removeRoi=n.removeRoi.bind(u(n)),n.setViewportState=n.setViewportState.bind(u(n)),n}var n,h,p;return function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&l(t,e)}(e,r["Component"]),n=e,(h=[{key:"componentWillUnmount",value:function(){var t={roi:this.state.roi,geometry:this.state.geometry,channels:this.state.channels,layer:this.state.layer,timeFrame:this.state.timeFrame};this.props._onChange(this.props.name,JSON.stringify(t))}},{key:"componentDidMount",value:function(){var t=this;if(c.length>0){var e=new o.c({caller:"PMA.wordpress"});new o.d(e,c),this.setState({context:e}),setTimeout(function(){return t.bindViewerToDomNode()})}}},{key:"bindViewerToDomNode",value:function(){var t=this,e=new o.e(this.state.context,{element:this.viewerRef.current,overview:!1,dimensions:!0,snapshot:!1,filename:!1,scaleLine:!0,annotations:{visible:!0,labels:!1},annotationsLayers:!1,digitalZoomLevels:2,loadingBar:!0,highQuality:!0,barcode:!1,colorAdjustments:!1,zoomSlider:!0,theme:o.f.Default,keyboardPanFactor:.5});this.setState({slideLoader:e}),setTimeout(function(){return e.load(c[0].serverUrl,t.props.moduleSettings.slide,function(){e.mainViewport.showAnnotationsLabels(!1,!1);var t=new o.a({context:this.state.context,element:null,viewport:e.mainViewport,serverUrl:c[0].serverUrl,path:this.props.moduleSettings.slide,enabled:!0});if(t.replaceAnnotations([]),""!==this.state.roi&&""!==this.state.geometry){var n={LayerID:1,Geometry:this.state.geometry,Color:"rgba(0,0,256,1.0)",fillColor:"rgba(0,0,0,0.0)",LineThickness:1};t.addAnnotation(n)}this.setState({annotationsManager:t})}.bind(t))})}},{key:"selectRoi",value:function(t){t.preventDefault(),this.state.annotationsManager.startDrawing({type:"Rectangle",color:"rgba(0,0,256,1.0)",fillColor:"rgba(0,0,0,0.0)",penWidth:1}),this.state.annotationsManager.listen(o.b.AnnotationAdded,function(t){this.setState({roi:t.feature.getGeometry().getExtent().join(","),geometry:t.feature.metaData.Geometry})}.bind(this))}},{key:"removeRoi",value:function(t){t.preventDefault(),this.state.annotationsManager.replaceAnnotations([]),this.setState({roi:"",geometry:""})}},{key:"setViewportState",value:function(t){t.preventDefault();var e=this.state.slideLoader.mainViewport,n=e.getActiveChannels(),r=e.getActiveLayer(),i=e.getActiveTimeFrame();this.setState({channels:n,layer:r,timeFrame:i})}},{key:"render",value:function(){return i.a.createElement("div",null,i.a.createElement("button",{onClick:this.selectRoi,disabled:""!==this.state.roi},"Select roi"),i.a.createElement("button",{onClick:this.removeRoi,disabled:""===this.state.roi},"Remove roi"),i.a.createElement("button",{onClick:this.setViewportState},"Set viewport state"),i.a.createElement("div",{id:"currentviewer",ref:this.viewerRef,style:{height:"500px"}}))}}])&&s(n.prototype,h),p&&s(n,p),e}();Object.defineProperty(h,"slug",{configurable:!0,enumerable:!0,writable:!0,value:"pmawp_viewport_roi"}),e.a=h}]);

Youez - 2016 - github.com/yon3zu
LinuXploit