mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2024-12-26 23:25:53 -05:00
1 line
499 KiB
JavaScript
1 line
499 KiB
JavaScript
|
!function(t,e){"object"==typeof exports?module.exports=e():"function"==typeof define&&define.amd?define([],e):t.ol=e()}(this,function(){var t,e,o,r={},n=this;function i(t,e){var o,i=r;t=t.split("."),i=i||n,t[0]in i||!i.execScript||i.execScript("var "+t[0]);for(;t.length&&(o=t.shift());)t.length||void 0===e?i=i[o]&&i[o]!==Object.prototype[o]?i[o]:i[o]={}:i[o]=e}function N(t,e){return e<t?1:t<e?-1:0}function d(t,e){return 0<=t.indexOf(e)}function l(t,e,o){var i=t.length;if(t[0]<=e)return 0;if(!(e<=t[i-1]))if(0<o){for(o=1;o<i;++o)if(t[o]<e)return o-1}else if(o<0){for(o=1;o<i;++o)if(t[o]<=e)return o}else for(o=1;o<i;++o){if(t[o]==e)return o;if(t[o]<e)return t[o-1]-e<e-t[o]?o-1:o}return i-1}function c(t,e){var o=Array.isArray(e)?e:[e],i=o.length;for(e=0;e<i;e++)t[t.length]=o[e]}function p(t,e){-1<(e=t.indexOf(e))&&t.splice(e,1)}function v(t,e){for(var o,i=t.length>>>0,r=0;r<i;r++)if(e(o=t[r],r,t))return o;return null}function U(t,e){var o=t.length;if(o!==e.length)return!1;for(var i=0;i<o;i++)if(t[i]!==e[i])return!1;return!0}function u(t){var e,o=cp,i=t.length,r=Array(t.length);for(e=0;e<i;e++)r[e]={index:e,value:t[e]};for(r.sort(function(t,e){return o(t.value,e.value)||t.index-e.index}),e=0;e<t.length;e++)t[e]=r[e].value}function b(o,i){var r;return o.every(function(t,e){return!i(t,r=e,o)})?-1:r}function s(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t}function m(){}function G(t){return t.Vo||(t.Vo=++a)}var a=0;function h(t){this.message="Assertion failed. See https://openlayers.org/en/v4.2.0/doc/errors/#"+t+" for details.",this.code=t,this.name="AssertionError"}function R(t,e){if(!t)throw new h(e)}function I(t,e,o,i){this.ca=t,this.$=e,this.da=o,this.ia=i}function y(t,e,o){return t.ca<=e&&e<=t.$&&t.da<=o&&o<=t.ia}function C(t,e){return t.ca<=e.$&&t.$>=e.ca&&t.da<=e.ia&&t.ia>=e.da}function w(t,e,o){return Math.min(Math.max(t,e),o)}s(h,Error);var f="cosh"in Math?Math.cosh:function(t){return((t=Math.exp(t))+1/t)/2};function x(t,e,o,i,r,n){var p=r-o,s=n-i;if(p||s){var a=((t-o)*p+(e-i)*s)/(p*p+s*s);1<a?(o=r,i=n):0<a&&(o+=p*a,i+=s*a)}return g(t,e,o,i)}function g(t,e,o,i){return(t=o-t)*t+(e=i-e)*e}function S(t){return t*Math.PI/180}function L(t,e){return(t%=e)*e<0?t+e:t}function M(t,e,o){return t+o*(e-t)}function P(t,e,o){return void 0===o&&(o=[0,0]),o[0]=t[0]+2*e,o[1]=t[1]+2*e,o}function A(t,e,o){return void 0===o&&(o=[0,0]),o[0]=t[0]*e+.5|0,o[1]=t[1]*e+.5|0,o}function F(t,e){return Array.isArray(t)?t:(void 0===e?e=[t,t]:e[0]=e[1]=t,e)}function E(t){for(var e=V(),o=0,i=t.length;o<i;++o)q(e,t[o]);return e}function T(t,e,o){return o?(o[0]=t[0]-e,o[1]=t[1]-e,o[2]=t[2]+e,o[3]=t[3]+e,o):[t[0]-e,t[1]-e,t[2]+e,t[3]+e]}function j(t,e){return e?(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e):t.slice()}function k(t,e,o){return(e=e<t[0]?t[0]-e:t[2]<e?e-t[2]:0)*e+(t=o<t[1]?t[1]-o:t[3]<o?o-t[3]:0)*t}function D(t,e){return B(t,e[0],e[1])}function O(t,e){return t[0]<=e[0]&&e[2]<=t[2]&&t[1]<=e[1]&&e[3]<=t[3]}function B(t,e,o){return t[0]<=e&&e<=t[2]&&t[1]<=o&&o<=t[3]}function X(t,e){var o=t[1],i=t[2],r=t[3],n=e[0];e=e[1];var p=0;return n<t[0]?p|=16:i<n&&(p|=4),e<o?p|=8:r<e&&(p|=2),p=p||1}function V(){return[1/0,1/0,-1/0,-1/0]}function W(t,e,o,i,r){return r?(r[0]=t,r[1]=e,r[2]=o,r[3]=i,r):[t,e,o,i]}function Z(t){return W(1/0,1/0,-1/0,-1/0,t)}function K(t,e){var o=t[0];return W(o,t=t[1],o,t,e)}function z(t,e,o,i,r){return J(r=Z(r),t,e,o,i)}function Y(t,e){return t[0]==e[0]&&t[2]==e[2]&&t[1]==e[1]&&t[3]==e[3]}function H(t,e){return e[0]<t[0]&&(t[0]=e[0]),e[2]>t[2]&&(t[2]=e[2]),e[1]<t[1]&&(t[1]=e[1]),e[3]>t[3]&&(t[3]=e[3]),t}function q(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 J(t,e,o,i,r){for(;o<i;o+=r){var n=t,p=e[o],s=e[o+1];n[0]=Math.min(n[0],p),n[1]=Math.min(n[1],s),n[2]=Math.max(n[2],p),n[3]=Math.max(n[3],s)}return t}function _(t,e,o){var i;return(i=e.call(o,Q(t)))||(i=e.call(o,tt(t)))||(i=e.call(o,pt(t)))?i:!!(i=e.call(o,nt(t)))&&i}function $(t){var e=0;return ht(t)||(e=st(t)*it(t)),e}function Q(t){return[t[0],t[1]]}function tt(t){return[t[2],t[1]]}function et(
|