mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-23 16:38:37 -05:00
40 lines
118 KiB
JavaScript
40 lines
118 KiB
JavaScript
|
define(["exports","./Matrix2-46444433","./RuntimeError-608565a6","./when-229515d6","./ComponentDatatype-692a36d3","./combine-35b6d9cb"],(function(e,t,n,r,o,i){"use strict";function s(e){this._ellipsoid=r.defaultValue(e,t.Ellipsoid.WGS84),this._semimajorAxis=this._ellipsoid.maximumRadius,this._oneOverSemimajorAxis=1/this._semimajorAxis}Object.defineProperties(s.prototype,{ellipsoid:{get:function(){return this._ellipsoid}}}),s.prototype.project=function(e,n){const o=this._semimajorAxis,i=e.longitude*o,s=e.latitude*o,a=e.height;return r.defined(n)?(n.x=i,n.y=s,n.z=a,n):new t.Cartesian3(i,s,a)},s.prototype.unproject=function(e,n){const o=this._oneOverSemimajorAxis,i=e.x*o,s=e.y*o,a=e.z;return r.defined(n)?(n.longitude=i,n.latitude=s,n.height=a,n):new t.Cartographic(i,s,a)};var a=Object.freeze({OUTSIDE:-1,INTERSECTING:0,INSIDE:1});function u(e,t){this.start=r.defaultValue(e,0),this.stop=r.defaultValue(t,0)}function c(e,n){this.center=t.Cartesian3.clone(r.defaultValue(e,t.Cartesian3.ZERO)),this.radius=r.defaultValue(n,0)}const l=new t.Cartesian3,d=new t.Cartesian3,f=new t.Cartesian3,p=new t.Cartesian3,h=new t.Cartesian3,m=new t.Cartesian3,g=new t.Cartesian3,y=new t.Cartesian3,v=new t.Cartesian3,w=new t.Cartesian3,C=new t.Cartesian3,_=new t.Cartesian3,b=4/3*o.CesiumMath.PI;c.fromPoints=function(e,n){if(r.defined(n)||(n=new c),!r.defined(e)||0===e.length)return n.center=t.Cartesian3.clone(t.Cartesian3.ZERO,n.center),n.radius=0,n;const o=t.Cartesian3.clone(e[0],g),i=t.Cartesian3.clone(o,l),s=t.Cartesian3.clone(o,d),a=t.Cartesian3.clone(o,f),u=t.Cartesian3.clone(o,p),b=t.Cartesian3.clone(o,h),x=t.Cartesian3.clone(o,m),S=e.length;let E;for(E=1;E<S;E++){t.Cartesian3.clone(e[E],o);const n=o.x,r=o.y,c=o.z;n<i.x&&t.Cartesian3.clone(o,i),n>u.x&&t.Cartesian3.clone(o,u),r<s.y&&t.Cartesian3.clone(o,s),r>b.y&&t.Cartesian3.clone(o,b),c<a.z&&t.Cartesian3.clone(o,a),c>x.z&&t.Cartesian3.clone(o,x)}const A=t.Cartesian3.magnitudeSquared(t.Cartesian3.subtract(u,i,y)),O=t.Cartesian3.magnitudeSquared(t.Cartesian3.subtract(b,s,y)),I=t.Cartesian3.magnitudeSquared(t.Cartesian3.subtract(x,a,y));let R=i,P=u,T=A;O>T&&(T=O,R=s,P=b),I>T&&(T=I,R=a,P=x);const q=v;q.x=.5*(R.x+P.x),q.y=.5*(R.y+P.y),q.z=.5*(R.z+P.z);let z=t.Cartesian3.magnitudeSquared(t.Cartesian3.subtract(P,q,y)),M=Math.sqrt(z);const D=w;D.x=i.x,D.y=s.y,D.z=a.z;const U=C;U.x=u.x,U.y=b.y,U.z=x.z;const k=t.Cartesian3.midpoint(D,U,_);let F=0;for(E=0;E<S;E++){t.Cartesian3.clone(e[E],o);const n=t.Cartesian3.magnitude(t.Cartesian3.subtract(o,k,y));n>F&&(F=n);const r=t.Cartesian3.magnitudeSquared(t.Cartesian3.subtract(o,q,y));if(r>z){const e=Math.sqrt(r);M=.5*(M+e),z=M*M;const t=e-M;q.x=(M*q.x+t*o.x)/e,q.y=(M*q.y+t*o.y)/e,q.z=(M*q.z+t*o.z)/e}}return M<F?(t.Cartesian3.clone(q,n.center),n.radius=M):(t.Cartesian3.clone(k,n.center),n.radius=F),n};const x=new s,S=new t.Cartesian3,E=new t.Cartesian3,A=new t.Cartographic,O=new t.Cartographic;c.fromRectangle2D=function(e,t,n){return c.fromRectangleWithHeights2D(e,t,0,0,n)},c.fromRectangleWithHeights2D=function(e,n,o,i,s){if(r.defined(s)||(s=new c),!r.defined(e))return s.center=t.Cartesian3.clone(t.Cartesian3.ZERO,s.center),s.radius=0,s;n=r.defaultValue(n,x),t.Rectangle.southwest(e,A),A.height=o,t.Rectangle.northeast(e,O),O.height=i;const a=n.project(A,S),u=n.project(O,E),l=u.x-a.x,d=u.y-a.y,f=u.z-a.z;s.radius=.5*Math.sqrt(l*l+d*d+f*f);const p=s.center;return p.x=a.x+.5*l,p.y=a.y+.5*d,p.z=a.z+.5*f,s};const I=[];c.fromRectangle3D=function(e,n,o,i){if(n=r.defaultValue(n,t.Ellipsoid.WGS84),o=r.defaultValue(o,0),r.defined(i)||(i=new c),!r.defined(e))return i.center=t.Cartesian3.clone(t.Cartesian3.ZERO,i.center),i.radius=0,i;const s=t.Rectangle.subsample(e,n,o,I);return c.fromPoints(s,i)},c.fromVertices=function(e,n,o,i){if(r.defined(i)||(i=new c),!r.defined(e)||0===e.length)return i.center=t.Cartesian3.clone(t.Cartesian3.ZERO,i.center),i.radius=0,i;n=r.defaultValue(n,t.Cartesian3.ZERO),o=r.defaultValue(o,3);const s=g;s.x=e[0]+n.x,s.y=e[1]+n.y,s.z=e[2]+n.z;const a=t.Cartesian3.clone(s,l),u=t.Cartesian3.clone(s,d),b=t.Cartesian3.clone(s,f),x=t.Cartesian3.clone(s,p)
|
||
|
/*!
|
||
|
* URI.js - Mutating URLs
|
||
|
* IPv6 Support
|
||
|
*
|
||
|
* Version: 1.19.7
|
||
|
*
|
||
|
* Author: Rodney Rehm
|
||
|
* Web: http://medialize.github.io/URI.js/
|
||
|
*
|
||
|
* Licensed under
|
||
|
* MIT License http://www.opensource.org/licenses/mit-license
|
||
|
*
|
||
|
*/var t,n;t=r.commonjsGlobal,n=function(e){var t=e&&e.IPv6;return{best:function(e){var t,n,r=e.toLowerCase().split(":"),o=r.length,i=8;for(""===r[0]&&""===r[1]&&""===r[2]?(r.shift(),r.shift()):""===r[0]&&""===r[1]?r.shift():""===r[o-1]&&""===r[o-2]&&r.pop(),-1!==r[(o=r.length)-1].indexOf(".")&&(i=7),t=0;t<o&&""!==r[t];t++);if(t<i)for(r.splice(t,1,"0000");r.length<i;)r.splice(t,0,"0000");for(var s=0;s<i;s++){n=r[s].split("");for(var a=0;a<3&&"0"===n[0]&&n.length>1;a++)n.splice(0,1);r[s]=n.join("")}var u=-1,c=0,l=0,d=-1,f=!1;for(s=0;s<i;s++)f?"0"===r[s]?l+=1:(f=!1,l>c&&(u=d,c=l)):"0"===r[s]&&(f=!0,d=s,l=1);l>c&&(u=d,c=l),c>1&&r.splice(u,c,""),o=r.length;var p="";for(""===r[0]&&(p=":"),s=0;s<o&&(p+=r[s],s!==o-1);s++)p+=":";return""===r[o-1]&&(p+=":"),p},noConflict:function(){return e.IPv6===this&&(e.IPv6=t),this}}},e.exports?e.exports=n():t.IPv6=n(t)})),St=r.createCommonjsModule((function(e){
|
||
|
/*!
|
||
|
* URI.js - Mutating URLs
|
||
|
* Second Level Domain (SLD) Support
|
||
|
*
|
||
|
* Version: 1.19.7
|
||
|
*
|
||
|
* Author: Rodney Rehm
|
||
|
* Web: http://medialize.github.io/URI.js/
|
||
|
*
|
||
|
* Licensed under
|
||
|
* MIT License http://www.opensource.org/licenses/mit-license
|
||
|
*
|
||
|
*/var t,n;t=r.commonjsGlobal,n=function(e){var t=e&&e.SecondLevelDomains,n={list:{ac:" com gov mil net org ",ae:" ac co gov mil name net org pro sch ",af:" com edu gov net org ",al:" com edu gov mil net org ",ao:" co ed gv it og pb ",ar:" com edu gob gov int mil net org tur ",at:" ac co gv or ",au:" asn com csiro edu gov id net org ",ba:" co com edu gov mil net org rs unbi unmo unsa untz unze ",bb:" biz co com edu gov info net org store tv ",bh:" biz cc com edu gov info net org ",bn:" com edu gov net org ",bo:" com edu gob gov int mil net org tv ",br:" adm adv agr am arq art ato b bio blog bmd cim cng cnt com coop ecn edu eng esp etc eti far flog fm fnd fot fst g12 ggf gov imb ind inf jor jus lel mat med mil mus net nom not ntr odo org ppg pro psc psi qsl rec slg srv tmp trd tur tv vet vlog wiki zlg ",bs:" com edu gov net org ",bz:" du et om ov rg ",ca:" ab bc mb nb nf nl ns nt nu on pe qc sk yk ",ck:" biz co edu gen gov info net org ",cn:" ac ah bj com cq edu fj gd gov gs gx gz ha hb he hi hl hn jl js jx ln mil net nm nx org qh sc sd sh sn sx tj tw xj xz yn zj ",co:" com edu gov mil net nom org ",cr:" ac c co ed fi go or sa ",cy:" ac biz com ekloges gov ltd name net org parliament press pro tm ",do:" art com edu gob gov mil net org sld web ",dz:" art asso com edu gov net org pol ",ec:" com edu fin gov info med mil net org pro ",eg:" com edu eun gov mil name net org sci ",er:" com edu gov ind mil net org rochest w ",es:" com edu gob nom org ",et:" biz com edu gov info name net org ",fj:" ac biz com info mil name net org pro ",fk:" ac co gov net nom org ",fr:" asso com f gouv nom prd presse tm ",gg:" co net org ",gh:" com edu gov mil org ",gn:" ac com gov net org ",gr:" com edu gov mil net org ",gt:" com edu gob ind mil net org ",gu:" com edu gov net org ",hk:" com edu gov idv net org ",hu:" 2000 agrar bolt casino city co erotica erotika film forum games hotel info ingatlan jogasz konyvelo lakas media news org priv reklam sex shop sport suli szex tm tozsde utazas video ",id:" ac co go mil net or sch web ",il:" ac co gov idf k12 muni net org ",in:" ac co edu ernet firm gen gov i ind mil net nic org res ",iq:" com edu gov i mil net org ",ir:" ac co dnssec gov i id net org sch ",it:" edu gov ",je:" co net org ",jo:" com edu gov mil name net org sch ",jp:" ac ad co ed go gr lg ne or ",ke:" ac co go info me mobi ne or sc ",kh:" com edu gov mil net org per ",ki:" biz com de edu gov info mob net org tel ",km:" asso com coop edu gouv k medecin mil nom notaires pharmaciens presse tm veterinaire ",kn:" edu gov net org ",kr:" ac busan chungbuk chungnam co daegu daejeon es gangwon go gwangju gyeongbuk gyeonggi gyeongnam hs incheon jeju jeonbuk jeonnam k kg mil ms ne or pe re sc seoul ulsan ",kw:" com edu gov net org ",ky:" com edu gov net org ",kz:" com edu gov mil net org ",lb:" com edu gov net org ",lk:" assn com edu gov grp hotel int ltd net ngo org sch soc web ",lr:" com edu gov net org ",lv:" asn com conf edu gov id mil net org ",ly:" com edu gov id med net org plc sch ",ma:" ac co gov m net org press ",mc:" asso tm ",me:" ac co edu gov its net org priv ",mg:" com edu gov mil nom org prd tm ",mk:" com edu gov inf name net org pro ",ml:" com edu gov net org presse ",mn:" edu gov org ",mo:" com edu gov net org ",mt:" com edu gov net org ",mv:" aero biz com coop edu gov info int mil museum name net org pro ",mw:" ac co com coop edu gov int museum net org ",mx:" com edu gob net org ",my:" com edu gov mil name net org sch ",nf:" arts com firm info net other per rec store web ",ng:" biz com edu gov mil mobi name net org sch ",ni:" ac co com edu gob mil net nom org ",np:" com edu gov mil net org ",nr:" biz com edu gov info net org ",om:" ac biz co com edu gov med mil museum net org pro sch ",pe:" com edu gob mil net nom org sld ",ph:" com edu gov i mil net ngo org ",pk:" biz com edu fam gob gok gon gop gos gov net org web ",pl:" art bialystok biz com edu gda gdansk gorzow gov info katowice krakow lodz lublin mil net ngo olsztyn org poznan pwr radom slupsk szczecin torun warszawa waw wroc wroclaw zgora ",pr:" ac biz com edu est gov
|
||
|
/*!
|
||
|
* URI.js - Mutating URLs
|
||
|
*
|
||
|
* Version: 1.19.7
|
||
|
*
|
||
|
* Author: Rodney Rehm
|
||
|
* Web: http://medialize.github.io/URI.js/
|
||
|
*
|
||
|
* Licensed under
|
||
|
* MIT License http://www.opensource.org/licenses/mit-license
|
||
|
*
|
||
|
*/var t,n;t=r.commonjsGlobal,n=function(e,t,n,r){var o=r&&r.URI;function i(e,t){var n=arguments.length>=1,r=arguments.length>=2;if(!(this instanceof i))return n?r?new i(e,t):new i(e):new i;if(void 0===e){if(n)throw new TypeError("undefined is not a valid argument for URI");e="undefined"!=typeof location?location.href+"":""}if(null===e&&n)throw new TypeError("null is not a valid argument for URI");return this.href(e),void 0!==t?this.absoluteTo(t):this}i.version="1.19.7";var s=i.prototype,a=Object.prototype.hasOwnProperty;function u(e){return e.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}function c(e){return void 0===e?"Undefined":String(Object.prototype.toString.call(e)).slice(8,-1)}function l(e){return"Array"===c(e)}function d(e,t){var n,r,o={};if("RegExp"===c(t))o=null;else if(l(t))for(n=0,r=t.length;n<r;n++)o[t[n]]=!0;else o[t]=!0;for(n=0,r=e.length;n<r;n++)(o&&void 0!==o[e[n]]||!o&&t.test(e[n]))&&(e.splice(n,1),r--,n--);return e}function f(e,t){var n,r;if(l(t)){for(n=0,r=t.length;n<r;n++)if(!f(e,t[n]))return!1;return!0}var o=c(t);for(n=0,r=e.length;n<r;n++)if("RegExp"===o){if("string"==typeof e[n]&&e[n].match(t))return!0}else if(e[n]===t)return!0;return!1}function p(e,t){if(!l(e)||!l(t))return!1;if(e.length!==t.length)return!1;e.sort(),t.sort();for(var n=0,r=e.length;n<r;n++)if(e[n]!==t[n])return!1;return!0}function h(e){return e.replace(/^\/+|\/+$/g,"")}function m(e){return escape(e)}function g(e){return encodeURIComponent(e).replace(/[!'()*]/g,m).replace(/\*/g,"%2A")}i._parts=function(){return{protocol:null,username:null,password:null,hostname:null,urn:null,port:null,path:null,query:null,fragment:null,preventInvalidHostname:i.preventInvalidHostname,duplicateQueryParameters:i.duplicateQueryParameters,escapeQuerySpace:i.escapeQuerySpace}},i.preventInvalidHostname=!1,i.duplicateQueryParameters=!1,i.escapeQuerySpace=!0,i.protocol_expression=/^[a-z][a-z0-9.+-]*$/i,i.idn_expression=/[^a-z0-9\._-]/i,i.punycode_expression=/(xn--)/i,i.ip4_expression=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,i.ip6_expression=/^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/,i.find_uri_expression=/\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))/gi,i.findUri={start:/\b(?:([a-z][a-z0-9.+-]*:\/\/)|www\.)/gi,end:/[\s\r\n]|$/,trim:/[`!()\[\]{};:'".,<>?«»“”„‘’]+$/,parens:/(\([^\)]*\)|\[[^\]]*\]|\{[^}]*\}|<[^>]*>)/g},i.defaultPorts={http:"80",https:"443",ftp:"21",gopher:"70",ws:"80",wss:"443"},i.hostProtocols=["http","https"],i.invalid_hostname_characters=/[^a-zA-Z0-9\.\-:_]/,i.domAttributes={a:"href",blockquote:"cite",link:"href",base:"href",script:"src",form:"action",img:"src",area:"href",iframe:"src",embed:"src",source:"src",track:"src",input:"src",audio:"src",video:"src"},i.getDomAttribute=function(e){if(e&&e.nodeName){var t=e.nodeName.toLowerCase();if("input"!==t||"image"===e.type)return i.domAttributes[t]}},i.encode=g,i.decode=decodeURIComponent,i.iso8859=f
|