-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathJsVotable.min.js
1 lines (1 loc) · 30.6 KB
/
JsVotable.min.js
1
!function(t,e){"function"==typeof define&&define.amd?define(["jquery"],e):t.mylib=e(t.$)}(this,function(t){var e,n,r;return function(t){function o(t,e){return T.call(t,e)}function i(t,e){var n,r,o,i,s,a,u,c,p,f,l=e&&e.split("/"),h=m.map,d=h&&h["*"]||{};if(t&&"."===t.charAt(0))if(e){for(l=l.slice(0,l.length-1),t=l.concat(t.split("/")),c=0;c<t.length;c+=1)if("."===(f=t[c]))t.splice(c,1),c-=1;else if(".."===f){if(1===c&&(".."===t[2]||".."===t[0]))break;c>0&&(t.splice(c-1,2),c-=2)}t=t.join("/")}else 0===t.indexOf("./")&&(t=t.substring(2));if((l||d)&&h){for(n=t.split("/"),c=n.length;c>0;c-=1){if(r=n.slice(0,c).join("/"),l)for(p=l.length;p>0;p-=1)if((o=h[l.slice(0,p).join("/")])&&(o=o[r])){i=o,s=c;break}if(i)break;!a&&d&&d[r]&&(a=d[r],u=c)}!i&&a&&(i=a,s=u),i&&(n.splice(0,s,i),t=n.join("/"))}return t}function s(e,n){return function(){return h.apply(t,A.call(arguments,0).concat([e,n]))}}function a(t){return function(e){return i(e,t)}}function u(t){return function(e){b[t]=e}}function c(e){if(o(g,e)){var n=g[e];delete g[e],v[e]=!0,l.apply(t,n)}if(!o(b,e)&&!o(v,e))throw new Error("No "+e);return b[e]}function p(t){var e,n=t?t.indexOf("!"):-1;return n>-1&&(e=t.substring(0,n),t=t.substring(n+1,t.length)),[e,t]}function f(t){return function(){return m&&m.config&&m.config[t]||{}}}var l,h,d,y,b={},g={},m={},v={},T=Object.prototype.hasOwnProperty,A=[].slice;d=function(t,e){var n,r=p(t),o=r[0];return t=r[1],o&&(o=i(o,e),n=c(o)),o?t=n&&n.normalize?n.normalize(t,a(e)):i(t,e):(t=i(t,e),r=p(t),o=r[0],t=r[1],o&&(n=c(o))),{f:o?o+"!"+t:t,n:t,pr:o,p:n}},y={require:function(t){return s(t)},exports:function(t){var e=b[t];return void 0!==e?e:b[t]={}},module:function(t){return{id:t,uri:"",exports:b[t],config:f(t)}}},l=function(e,n,r,i){var a,p,f,l,h,m,T=[];if(i=i||e,"function"==typeof r){for(n=!n.length&&r.length?["require","exports","module"]:n,h=0;h<n.length;h+=1)if(l=d(n[h],i),"require"===(p=l.f))T[h]=y.require(e);else if("exports"===p)T[h]=y.exports(e),m=!0;else if("module"===p)a=T[h]=y.module(e);else if(o(b,p)||o(g,p)||o(v,p))T[h]=c(p);else{if(!l.p)throw new Error(e+" missing "+p);l.p.load(l.n,s(i,!0),u(p),{}),T[h]=b[p]}f=r.apply(b[e],T),e&&(a&&a.exports!==t&&a.exports!==b[e]?b[e]=a.exports:f===t&&m||(b[e]=f))}else e&&(b[e]=r)},e=n=h=function(e,n,r,o,i){return"string"==typeof e?y[e]?y[e](n):c(d(e,n).f):(e.splice||(m=e,n.splice?(e=n,n=r,r=null):e=t),n=n||function(){},"function"==typeof r&&(r=o,o=i),o?l(t,e,n,r):setTimeout(function(){l(t,e,n,r)},4),h)},h.config=function(t){return m=t,m.deps&&h(m.deps,m.callback),h},r=function(t,e,n){e.splice||(n=e,e=[]),o(b,t)||o(g,t)||(g[t]=[t,e,n])},r.amd={jQuery:!0}}(),r("../minify/almond",function(){}),r("utils",[],function(){var t={};return t.inherits=function(t,e){function n(){}n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e},t.makeHttpObject=function(){try{return new XMLHttpRequest}catch(t){}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(t){}try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(t){}throw new Error("The object creation for making HTTP requests has failed.")},t.guid=function(){function t(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}return t()+t()+"-"+t()+"-"+t()+"-"+t()+"-"+t()+t()+t()},t.findValueByKeyword=function(t,e){var n=void 0;for(i=0;i<t.length;i++){var r=t[i];if(r[0]===e){n=r[1];break}}return n},t.parseXML=function(t){if(document.implementation&&document.implementation.createDocument)xmlDoc=(new DOMParser).parseFromString(t,"text/xml");else{if(!window.ActiveXObject)return alert("Your browser cannot handle this script"),null;xmlDoc=new ActiveXObject("Microsoft.XMLDOM"),xmlDoc.loadXML(t)}return xmlDoc},t}),r("cache",[],function(){var t=function(){this.nodeID={},this.nodeName={},this.warnings=[]};return t.prototype.getEltsByID=function(){return this.nodeID},t.prototype.getEltsByName=function(){return this.nodeName},t.prototype.getWarnings=function(){return this.warnings},t.prototype.addEntryID=function(t,e){this.nodeID[t]=e},t.prototype.addEntryName=function(t,e){this.nodeName.hasOwnProperty(t)?this.nodeName[t].push(e):(this.nodeName[t]=[],this.nodeName[t].push(e))},t.prototype.addWarning=function(t){this.warnings.push(t)},t}),r("abstractNode",["./utils","./cache"],function(t,e){var n=function(t,e){if(void 0===e)throw new Error("tagName is undefined for "+t);if(this.tagName=e,this.attributes={},null!=t&&1==t.nodeType){for(var n=0,o=t.attributes.length;n<o;n++){var i=t.attributes[n];this.attributes[i.name]=i.value}if(this.attributes.hasOwnProperty("ID")){var s=r.getInstance();s.addEntryID(this.attributes.ID,this)}if(this.attributes.hasOwnProperty("name")){var s=r.getInstance();s.addEntryName(this.attributes.name,this)}}};n.prototype.getAttributes=function(){return this.attributes},n.prototype.hasAttribute=function(t){return this.attributes.hasOwnProperty(t)},n.prototype.hasAttributes=function(){return 0!=Object.keys(this.attributes).length},n.prototype.getTagName=function(){return this.tagName},n.prototype.getCache=function(){return r.getInstance()};var r=function(){function t(){return new e}var n;return{getInstance:function(){return n||(n=t()),n}}}();return n}),r("constants",[],function(){var t=function(){};return t.API={version:"2.0.2"},t.TAG={BINARY:"BINARY",BINARY2:"BINARY2",COOSYS:"COOSYS",DATA:"DATA",DEFINITIONS:"DEFINITIONS",DESCRIPTION:"DESCRIPTION",FIELD:"FIELD",FIELDref:"FIELDref",FITS:"FITS",GROUP:"GROUP",INFO:"INFO",VOTABLE:"VOTABLE",LINK:"LINK",MAX:"MAX",MIN:"MIN",OPTION:"OPTION",PARAM:"PARAM",PARAMref:"PARAMref",RESOURCE:"RESOURCE",STREAM:"STREAM",TABLE:"TABLE",TABLEDATA:"TABLEDATA",TD:"TD",TR:"TR",VALUES:"VALUES"},t}),r("description",["./utils","./abstractNode","./constants"],function(t,e,n){var r=function(t){e.prototype.constructor.call(this,t,n.TAG.DESCRIPTION),this.value;var r=t.childNodes[0];null!=r&&3==r.nodeType&&(this.value=null==r.textContent?null:r.textContent.trim())};return t.inherits(e,r),r.prototype.getContent=function(){return this.value},r}),r("fieldref",["./utils","./abstractNode","./constants"],function(t,e,n){var r=function(t){e.prototype.constructor.call(this,t,n.TAG.FIELDref)};return t.inherits(e,r),r.prototype.ref=function(){return this.attributes.ref},r.prototype.ucd=function(){return this.attributes.ucd},r.prototype.utype=function(){return this.attributes.utype},r}),r("paramref",["./utils","./abstractNode","./constants"],function(t,e,n){var r=function(t){e.prototype.constructor.call(this,t,n.TAG.PARAMref)};return t.inherits(e,r),r.prototype.ref=function(){return this.attributes.ref},r.prototype.ucd=function(){return this.attributes.ucd},r.prototype.utype=function(){return this.attributes.utype},r}),r("min",["./utils","./abstractNode","./constants"],function(t,e,n){var r=function(t){e.prototype.constructor.call(this,t,n.TAG.MIN)};return t.inherits(e,r),r.prototype.value=function(){return this.attributes.value},r.prototype.inclusive=function(){return this.attributes.inclusive},r}),r("max",["./utils","./abstractNode","./constants"],function(t,e,n){var r=function(t){e.prototype.constructor.call(this,t,n.TAG.MAX)};return t.inherits(e,r),r.prototype.value=function(){return this.attributes.value},r.prototype.inclusive=function(){return this.attributes.inclusive},r}),r("option",["./utils","./abstractNode","./constants"],function(t,e,n){var r=function(t){e.prototype.constructor.call(this,t,n.TAG.OPTION);var r=this;this.options=o(r,t)},o=function(t,e){for(var o=[],i=0;null!=e&&i<e.childNodes.length;i++){var s=e.childNodes[i];if(1==s.nodeType){var a=s.localName;a==n.TAG.OPTION?o.push(new r(s)):t.getCache().addWarning("unknown element "+a+" in Option node")}}return o};return t.inherits(e,r),r.prototype.name=function(){return this.attributes.name},r.prototype.value=function(){return this.attributes.value},r.prototype.getOptions=function(){return this.options},r}),r("values",["./utils","./abstractNode","./min","./max","./option","./constants"],function(t,e,n,r,o,i){var s=function(t){e.prototype.constructor.call(this,t,i.TAG.VALUES);var n=this,r=a(n,t);this.min=r[0],this.max=r[1],this.options=r[2]},a=function(t,e){for(var s,a,u=[],c=0;null!=e&&c<e.childNodes.length;c++){var p=e.childNodes[c];if(1==p.nodeType){var f=p.localName;switch(f){case i.TAG.MIN:s=new n(p);break;case i.TAG.MAX:a=new r(p);break;case i.TAG.OPTION:u.push(new o(p));break;default:t.getCache().addWarning("unknown element "+f+" in Values node")}}}return[s,a,u]};return t.inherits(e,s),s.prototype.ID=function(){return this.attributes.ID},s.prototype.type=function(){return this.attributes.type},s.prototype.null=function(){return this.attributes.null},s.prototype.ref=function(){return this.attributes.ref},s.prototype.getMin=function(){return this.min},s.prototype.getMax=function(){return this.max},s.prototype.getOptions=function(){return this.options},s}),r("link",["./utils","./abstractNode","./constants"],function(t,e,n){var r=function(t){e.prototype.constructor.call(this,t,n.TAG.LINK)};return t.inherits(e,r),r.prototype.ID=function(){return this.attributes.ID},r.prototype.content_role=function(){return this.attributes["content-role"]},r.prototype.content_type=function(){return this.attributes["content-type"]},r.prototype.title=function(){return this.attributes.title},r.prototype.value=function(){return this.attributes.value},r.prototype.href=function(){return this.attributes.href},r.prototype.gref=function(){return this.attributes.gref},r.prototype.action=function(){return this.attributes.action},r}),r("field",["./utils","./abstractNode","./description","./values","./link","./constants"],function(t,e,n,r,o,i){var s=function(t){e.prototype.constructor.call(this,t,i.TAG.FIELD);var n=this,r=a(n,t);this.description=r[0],this.values=r[1],this.links=r[2]},a=function(t,e){for(var s,a,u=[],c=0;null!=e&&c<e.childNodes.length;c++){var p=e.childNodes[c];if(1==p.nodeType){var f=p.localName;switch(f){case i.TAG.DESCRIPTION:s=new n(p);break;case i.TAG.VALUES:a=new r(p);break;case i.TAG.LINK:u.push(new o(p));break;default:t.getCache().addWarning("unknown element "+f+" in Field node")}}}return[s,a,u]};return t.inherits(e,s),s.prototype.ID=function(){return this.attributes.ID},s.prototype.unit=function(){return this.attributes.unit},s.prototype.datatype=function(){return this.attributes.datatype},s.prototype.precision=function(){return this.attributes.precision},s.prototype.width=function(){return this.attributes.width},s.prototype.xtype=function(){return this.attributes.xtype},s.prototype.ref=function(){return this.attributes.ref},s.prototype.name=function(){return this.attributes.name},s.prototype.ucd=function(){return this.attributes.ucd},s.prototype.utype=function(){return this.attributes.utype},s.prototype.arraysize=function(){return this.attributes.arraysize},s.prototype.type=function(){return this.attributes.type},s.prototype.getDescription=function(){return this.description},s.prototype.getValues=function(){return this.values},s.prototype.getLinks=function(){return this.links},s}),r("param",["./utils","./field","./constants"],function(t,e,n){var r=function(t){e.prototype.constructor.call(this,t,n.TAG.PARAM)};return t.inherits(e,r),r.prototype.value=function(){return this.attributes.value},r}),r("group",["./utils","./abstractNode","./description","./fieldref","./paramref","./param","./constants"],function(t,e,n,r,o,i,s){var a=function(t){e.prototype.constructor.call(this,t,s.TAG.GROUP);var n=this,r=u(n,t);this.description=r[0],this.fieldrefs=r[1],this.paramrefs=r[2],this.params=r[3],this.groups=r[4]},u=function(t,e){for(var u,c=[],p=[],f=[],l=[],h=0;null!=e&&h<e.childNodes.length;h++){var d=e.childNodes[h];if(1==d.nodeType){var y=d.localName;switch(y){case s.TAG.DESCRIPTION:u=new n(d);break;case s.TAG.FIELDref:c.push(new r(d));break;case s.TAG.PARAMref:p.push(new o(d));break;case s.TAG.PARAM:f.push(new i(d));break;case s.TAG.GROUP:l.push(new a(d));break;default:t.getCache().addWarning("unknown element "+y+" in Group node")}}}return[u,c,p,f,l]};return t.inherits(e,a),a.prototype.ID=function(){return this.attributes.ID},a.prototype.name=function(){return this.attributes.name},a.prototype.ref=function(){return this.attributes.ref},a.prototype.ucd=function(){return this.attributes.ucd},a.prototype.utype=function(){return this.attributes.utype},a.prototype.getDescription=function(){return this.description},a.prototype.getFieldrefs=function(){return this.fieldrefs},a.prototype.getParamrefs=function(){return this.paramrefs},a.prototype.getParams=function(){return this.params},a.prototype.getGroups=function(){return this.groups},a}),r("coosys",["./utils","./abstractNode","./constants"],function(t,e,n){var r=function(t){e.prototype.constructor.call(this,t,n.TAG.COOSYS);var r=this;this.value=o(r,t)};t.inherits(e,r);var o=function(t,e){for(var n,r=0;null!=e&&r<e.childNodes.length;r++){var o=e.childNodes[r];null!=o&&3==o.nodeType?n=null==o.textContent?null:o.textContent.trim():t.getCache().addWarning("unknown element "+o+" in Coosys node")}return n};return r.prototype.ID=function(){return this.attributes.ID},r.prototype.equinox=function(){return this.attributes.equinox},r.prototype.epoch=function(){return this.attributes.epoch},r.prototype.system=function(){return this.attributes.system},r.prototype.getContent=function(){return this.value},r}),r("definitions",["./utils","./abstractNode","./group","./param","./coosys","./constants"],function(t,e,n,r,o,i){var s=function(t){e.prototype.constructor.call(this,t,i.TAG.DEFINITIONS);var n=this,r=a(n,t);this.coosys=r[0],this.param=r[1]},a=function(t,e){for(var n=[],s=[],a=0;null!=e&&a<e.childNodes.length;a++){var u=e.childNodes[a];if(1==u.nodeType){var c=u.localName;switch(c){case i.TAG.COOSYS:n.push(new o(u));break;case i.TAG.PARAM:s.push(new r(u));break;default:t.getCache().addWarning("unknown element "+c+" in Definitions node")}c==i.TAG.COOSYS?n.push(new o(u)):c==i.TAG.PARAM?s.push(new r(u)):t.getCache().addWarning("unknown element "+c+" in Definitions node")}}return[n,s]};return t.inherits(e,s),s.prototype.getCoosyss=function(){return this.coosys},s.prototype.getParams=function(){return this.param},s}),r("info",["./utils","./abstractNode","./constants"],function(t,e,n){var r=function(t){e.prototype.constructor.call(this,t,n.TAG.INFO);var r=t.childNodes[0];null!=r&&3==r.nodeType&&(this.val=null==r.textContent?null:r.textContent.trim())};return r.prototype.name=function(){return this.attributes.name},r.prototype.value=function(){return this.attributes.value},r.prototype.ID=function(){return this.attributes.ID},r.prototype.unit=function(){return this.attributes.unit},r.prototype.xtype=function(){return this.attributes.xtype},r.prototype.ref=function(){return this.attributes.ref},r.prototype.ucd=function(){return this.attributes.ucd},r.prototype.utype=function(){return this.attributes.utype},r.prototype.getContent=function(){return this.val},r}),r("td",["./utils","./abstractNode","./constants"],function(t,e,n){var r=function(t,r){e.prototype.constructor.call(this,t,n.TAG.TD),this.value=null==r?null==t.textContent?"":t.textContent.trim():null==r?"":r.trim()};return t.inherits(e,r),r.prototype.encoding=function(){return this.attributes.encoding},r.prototype.getContent=function(){return this.value},r}),r("tr",["./utils","./abstractNode","./td","./constants"],function(t,e,n,r){var o=function(t,o){if(e.prototype.constructor.call(this,t,r.TAG.TR),null==o){var s=this;this.tds=i(s,t)}else{this.tds=[];for(var a=0;a<o.length;a++)this.tds.push(new n(null,o[a]))}},i=function(t,e){for(var o=[],i=0;null!=e&&i<e.childNodes.length;i++){var s=e.childNodes[i];if(1==s.nodeType){var a=s.localName;a==r.TAG.TD?o.push(new n(s)):t.getCache().addWarning("unknown element "+a+" in Tr node")}}return o};return t.inherits(e,o),o.prototype.ID=function(){return this.attributes.ID},o.prototype.getTds=function(){return this.tds},o}),r("abstractData",["./utils","./abstractNode"],function(t,e){var n=function(t,n){e.prototype.constructor.call(this,t,n)};return t.inherits(e,n),n}),r("tabledata",["./utils","./tr","./abstractData","./constants"],function(t,e,n,r){var o=function(t,o){if(n.prototype.constructor.call(this,t,r.TAG.TABLEDATA),null==o){var s=this;this.trs=i(s,t)}else{this.trs=[];for(var a=0;a<o.length;a++)this.trs.push(new e(null,o[a]))}},i=function(t,n){for(var o=[],i=0;null!=n&&i<n.childNodes.length;i++){var s=n.childNodes[i];if(1==s.nodeType){var a=s.localName;a==r.TAG.TR?o.push(new e(s)):t.getCache().addWarning("unknown element "+a+" in TableData node")}}return o};return t.inherits(n,o),o.prototype.getTrs=function(){return this.trs},o}),r("converter/base64",[],function(){function t(t){"use strict";var e,n,r;return e=new ArrayBuffer(2),n=new DataView(e),r=t.join(""),n.setUint16(0,parseInt(r,2)),n.getInt16(0)}function e(t){"use strict";var e,n,r;return e=new ArrayBuffer(4),n=new DataView(e),r=t.join(""),n.setUint32(0,parseInt(r,2)),n.getInt32(0)}function n(t){"use strict";var e,n,r;return e=new ArrayBuffer(4),n=new DataView(e),r=t.join(""),n.setUint32(0,parseInt(r,2)),n.getFloat32(0)}function r(t){"use strict";var e,n,r;return e=new ArrayBuffer(8),n=new DataView(e),r=t.slice(0,32).join(""),n.setUint32(0,parseInt(r,2)),r="",r=t.slice(32,64).join(""),n.setUint32(4,parseInt(r,2)),n.getFloat64(0)}function o(t){"use strict";var e,n,r;return e=new ArrayBuffer(1),n=new DataView(e),r=t.join(""),n.setUint8(0,parseInt(r,2)),n.getUint8(0)}function i(t){"use strict";var e,n,r,i,s;for(e=t.length/8,n=[],s="",i=0,r=0;r<e;r+=1)n=t.slice(i,i+8),s=s.concat(String.fromCharCode(o(n))),n=[],i+=8;return s}function s(t){"use strict";var e,n,r;return e=new ArrayBuffer(4),n=new DataView(e),r=t.join(""),n.setUint32(0,parseInt(r,2)),n.getUint32(0)}function a(t){var e;return t>64&&t<91?e=t-65:t>96&&t<123?e=t-71:t>47&&t<58?e=t+4:43===t?e=62:47===t&&(e=63),e}var u={short:16,int:32,float:32,double:64,unsignedByte:8},c=function(t){this.ptrStream=0,this.bufferTabBits=[],this.fields=t};return c.prototype.computeDataSize=function(t,e,n){var r=0;if("char"===t)if(/\*/.test(this.fields[e].arraysize())){var o=this.streamB64(32,n);r=8*s(o),o=[]}else r=8*this.fields[e].arraysize();else r=u[t];return r},c.prototype.streamB64=function(t,e){for(var n=[],r=this.bufferTabBits.length,o=Math.ceil((t-r)/6),i=0;i<r;i+=1)n.push(this.bufferTabBits[i]);this.bufferTabBits=[];for(var i=0;i<o;i+=1){if(10==e.charCodeAt(this.ptrStream))i-=1;else for(var s=a(e.charCodeAt(this.ptrStream)),u=32;u>0;u>>=1)n.length!==t?n.push((s&u)===u?"1":"0"):this.bufferTabBits.push((s&u)===u?"1":"0");this.ptrStream+=1}return n},c.prototype.decodeValue=function(s,a,u,c){var p,f=[];switch("NULL"!=s&&(f=this.streamB64(a,c)),s){case"short":p=t(f);break;case"int":p=e(f);break;case"float":p=n(f),p=p.toFixed(this.fields[u].precision());break;case"double":p=r(f),p=p.toFixed(this.fields[u].precision());break;case"unsignedByte":p=o(f);break;case"char":p=i(f);break;case"NULL":p="NULL";break}return"NaN"!==p&&"NULL"!==p&&0!==p||(p=""),p},c.prototype.decode=function(t){var e=[],n=0,r=t.length,o=this.fields.length,i=[];do{var s=this.fields[n].datatype(),a=this.computeDataSize(s,n,t);0==a&&(s="NULL");var u=this.decodeValue(s,a,n,t);i.push(u),n===o-1?(n=0,e.push(i),i=[]):n+=1}while(this.ptrStream<r);return e},c}),r("stream",["./utils","./abstractNode","./converter/base64","./tabledata","./constants"],function(t,e,n,r,o){var i=function(t){e.prototype.constructor.call(this,t,o.TAG.STREAM),this.value=t.textContent};return t.inherits(e,i),i.prototype.type=function(){return this.attributes.type},i.prototype.href=function(){return this.attributes.href},i.prototype.actuate=function(){return this.attributes.actuate},i.prototype.encoding=function(){return this.attributes.encoding},i.prototype.expires=function(){return this.attributes.expires},i.prototype.rights=function(){return this.attributes.rights},i.prototype.getContent=function(t,e){var o;if(null!=t&&t){var i=new n(e);o=new r(null,i.decode(this.value))}else o=this.value;return o},i}),r("binary",["./utils","./stream","./abstractData","./constants"],function(t,e,n,r){var o=function(t){n.prototype.constructor.call(this,t,r.TAG.BINARY),this.stream=i(t)},i=function(t){for(var n,o=0;null!=t&&o<t.childNodes.length;o++){var i=t.childNodes[o];if(1==i.nodeType){if(i.localName!=r.TAG.STREAM)throw new Error("Unknown element");n=new e(i)}}return n};return t.inherits(n,o),o.prototype.getStream=function(){return this.stream},o}),r("binary2",["./utils","./stream","./abstractData","./constants"],function(t,e,n,r){var o=function(t){n.prototype.constructor.call(this,t,r.TAG.BINARY2);var e=this;this.stream=i(e,t)},i=function(t,e){for(var n,o=0;null!=e&&o<e.childNodes.length;o++){var i=e.childNodes[o];if(1==i.nodeType){var s=i.localName;s==r.TAG.STREAM?n=new Definitions(i):t.getCache().addWarning("unknown element "+s+" in Binary2 node")}}return n};return t.inherits(n,o),o.prototype.getStream=function(){return this.stream},o}),r("fits",["./utils","./abstractData","./stream","./constants"],function(t,e,n,r){var o=function(t){e.prototype.constructor.call(this,t,r.TAG.FITS);var n=this;this.stream=i(n,t)},i=function(t,e){for(var n,o=0;null!=e&&o<e.childNodes.length;o++){var i=e.childNodes[o];if(1==i.nodeType){var s=i.localName;s==r.TAG.STREAM?n=new Definitions(i):t.getCache().addWarning("unknown element "+s+" in Fits node")}}return n};return t.inherits(e,o),o.prototype.getStream=function(){return this.stream},o.prototype.extnum=function(){return this.attributes.extnum},o}),r("data",["./utils","./abstractNode","./tabledata","./binary","./binary2","./fits","./info","./constants"],function(t,e,n,r,o,i,s,a){var u=function(t){e.prototype.constructor.call(this,t,a.TAG.DATA);var n=this,r=c(n,t);this.data=r[0],this.infos=r[1]},c=function(t,e){for(var u,c=[],p=0;null!=e&&p<e.childNodes.length;p++){var f=e.childNodes[p];if(1==f.nodeType){var l=f.localName;switch(l){case a.TAG.TABLEDATA:u=new n(f);break;case a.TAG.BINARY:u=new r(f);break;case a.TAG.BINARY2:u=new o(f);break;case a.TAG.FITS:u=new i(f);break;case a.TAG.INFO:c.push(new s(f));break;default:t.getCache().addWarning("unknown element "+l+" in Data node")}}}return[u,c]};return t.inherits(e,u),u.prototype.getData=function(){return this.data},u.prototype.getDataImplementationName=function(){return this.data.getTagName()},u.prototype.getInfos=function(){return this.infos},u}),r("table",["./utils","./abstractNode","./description","./field","./param","./group","./link","./data","./info","./constants"],function(t,e,n,r,o,i,s,a,u,c){var p=function(t){e.prototype.constructor.call(this,t,c.TAG.TABLE);var n=this,r=f(n,t);this.fields=r[0],this.params=r[1],this.groups=r[2],this.links=r[3],this.data=r[4],this.description=r[5],this.infos=r[6]},f=function(t,e){for(var p,f,l=[],h=[],d=[],y=[],b=[],g=0;null!=e&&g<e.childNodes.length;g++){var m=e.childNodes[g];if(1==m.nodeType){var v=m.localName;switch(v){case c.TAG.DESCRIPTION:f=new n(m);break;case c.TAG.FIELD:l.push(new r(m));break;case c.TAG.PARAM:h.push(new o(m));break;case c.TAG.GROUP:d.push(new i(m));break;case c.TAG.LINK:y.push(new s(m));break;case c.TAG.DATA:p=new a(m);break;case c.TAG.INFO:b.push(new u(m));break;default:t.getCache().addWarning("unknown element "+v+" in Table node")}}}return[l,h,d,y,p,f,b]};return t.inherits(e,p),p.prototype.ID=function(){return this.attributes.ID},p.prototype.name=function(){return this.attributes.name},p.prototype.ref=function(){return this.attributes.ref},p.prototype.ucd=function(){return this.attributes.ucd},p.prototype.utype=function(){return this.attributes.utype},p.prototype.nrows=function(){return this.attributes.nrows},p.prototype.getFields=function(){return this.fields},p.prototype.getParams=function(){return this.params},p.prototype.getGroups=function(){return this.groups},p.prototype.getLinks=function(){return this.links},p.prototype.getData=function(){return this.data},p.prototype.getInfos=function(){return this.infos},p.prototype.getDescription=function(){return this.description},p}),r("resource",["./utils","./abstractNode","./description","./info","./table","./link","./coosys","./param","./group","./constants"],function(t,e,n,r,o,i,s,a,u,c){var p=function(t){e.prototype.constructor.call(this,t,c.TAG.RESOURCE);var n=this,r=f(n,t);this.description=r[0],this.infos=r[1],this.coosyss=r[2],this.params=r[3],this.groups=r[4],this.abstractSequences=r[5]},f=function(t,e){for(var f,l=[],h=[],d=[],y=[],b=[],g=0,m=0,v=0;null!=e&&v<e.childNodes.length;v++){var T=e.childNodes[v];if(1==T.nodeType){var A=T.localName;switch(A){case c.TAG.DESCRIPTION:f=new n(T),m++;break;case c.TAG.INFO:l.push(new r(T)),m++;break;case c.TAG.COOSYS:h.push(new s),m++;break;case c.TAG.GROUP:d.push(new u),m++;break;case c.TAG.PARAM:y.push(new a),m++;break;default:g=v}}if(0!=g)break}m>g&&(g=m);for(var v=g;null!=e&&v<e.childNodes.length;v++){var N={},w=[],I=[],T=e.childNodes[v];if(1==T.nodeType){var A=T.localName;switch(A){case c.TAG.LINK:w.push(new i(T));break;case c.TAG.TABLE:N.TABLE=new o(T),0!=w.length&&(N.LINKS=w,b.push(N.LINKS),N.LINKS=[],w=[]),0!=I.length&&(N.INFOS=I,b.push(N.INFOS),N.INFOS=[],I=[]),b.push(N.TABLE);break;case c.TAG.RESOURCE:N.RESOURCE=new p(T),0!=w.length&&(N.LINKS=w,b.push(N.LINKS),N.LINKS=[],w=[]),0!=I.length&&(N.INFOS=I,b.push(N.INFOS),N.INFOS=[],I=[]),b.push(N.RESOURCE);break;case c.TAG.INFO:I.push(new r(T)),v==e.childNodes.length-1&&b.push(I);break;default:t.getCache().addWarning("Unkknown element "+A+" in RESOURCE node")}}}return[f,l,h,y,d,b]};return t.inherits(e,p),p.prototype.ID=function(){return this.attributes.ID},p.prototype.name=function(){return this.attributes.name},p.prototype.utype=function(){return this.attributes.utype},p.prototype.type=function(){return this.attributes.type},p.prototype.getDescription=function(){return this.description},p.prototype.getInfos=function(){return this.infos},p.prototype.getCoosyss=function(){return this.coosyss},p.prototype.getGroups=function(){return this.groups},p.prototype.getParams=function(){return this.params},p.prototype.getResourcesOrTables=function(){return this.abstractSequences},p}),r("converter/geojson",["../utils","../constants"],function(t,e){function n(t){var e={type:"FeatureCollection",features:[]},n=function(t){var e,n=t.getDefinitions();return null!=n&&(e=n.getCoosyss()[0]),null!=t.getCoosyss()[0]&&(e=t.getCoosyss()[0]),e}(t);null!=n&&(e.crs={type:"name",properties:{name:n}});for(var o=[],i=t.getResources(),s=0;s<i.length;s++)r(i[s],o);return e.features=o,e}function r(t,n){for(var i=t.getResourcesOrTables(),s=0;s<i.length;s++){var a=i[s];a.getTagName()==e.TAG.RESOURCE?r(a,n):a.getTagName()==e.TAG.TABLE&&o(a,n)}}function o(t,n){var r,o=t.getFields(),s=t.getData(),a=t.getInfos();switch(s.getDataImplementationName()){case e.TAG.TABLEDATA:var u=s.getData();r=u.getTrs();break;case e.TAG.BINARY:var c=s.getData(),u=c.getStream().getContent(!0,o);r=u.getTrs();break;case e.TAG.BINARY2:throw new Error("Binary2 not implemented");break;case e.TAG.FITS:throw new Error("Fits not implemented");break;default:throw new Error("Type of data not implemented for "+t)}i(o,a,r,n)}function i(t,e,n,r){for(var o=0;o<n.length;o++){var i=n[o].getTds();r.push(s(t,e,i))}}function s(e,n,r){function o(t,e){return 0!=t.filter(function(t){return t===e}).length}for(var i={type:"Feature",geometry:null,properties:{}},s={},p=0;p<r.length;p++){var f=r[p],l=e[p],h=l.getValues(),d=null!=h?h.null():null,y=l.ucd(),b=l.datatype(),g=f.getContent(),m=l.name();if(o(u,y))s.RA=Number.parseFloat(g),s.COOSYS=l.ref();else if(o(c,y))s.DEC=Number.parseFloat(g);else if(o(a,y))s.ID=g;else{var v=i.properties;g!=d&&(v[m]=function(t,e){var n;switch(e){case"short":case"int":case"long":n=Number.parseInt(t);break;case"float":case"double":n=Number.parseFloat(t);break;default:n=t}return n}(g,b))}}s.hasOwnProperty("ID")||(s.ID=t.guid());for(var p=0;p<n.length;p++){var T=n[p];v[T.name()]=T.value()}!function(t){if(!(t.hasOwnProperty("RA")&&t.hasOwnProperty("DEC")&&t.hasOwnProperty("COOSYS")&&t.hasOwnProperty("ID")))throw new Error("core metadata missing "+JSON.stringify(t))}(s);var A={type:"Point",coordinates:[s.RA,s.DEC],crs:{type:"name",properties:{name:s.COOSYS}}};return i.geometry=A,i}var a=["meta.record","meta.id;meta.main","VOX:Image_Titleq"],u=["pos.eq.ra;meta.main","POS_EQ_RA_MAIN"],c=["pos.eq.dec;meta.main","POS_EQ_DEC_MAIN"],p=function(t){this.votable=t,this.featureCollection=n(this.votable)};return p.prototype.getGeoJSon=function(t){var e=!1|t;return JSON.stringify(this.featureCollection,null,e)},p}),r("votable",["./utils","./abstractNode","./definitions","./info","./resource","./description","./coosys","./group","./param","./converter/geojson","./constants"],function(t,e,n,r,o,i,s,a,u,c,p){function f(t){if(null==t)throw new Error("xml cannot be null");if("string"==typeof t){t=(new DOMParser).parseFromString(t,"application/xml")}else if(null==t.documentElement)throw new Error("This object is not supported");if(t.documentElement.localName!=p.TAG.VOTABLE)throw new Error("This input is not a VOTable");return t}var l=function(t){t=f(t);var n=t.documentElement;e.prototype.constructor.call(this,n,p.TAG.VOTABLE);var r=this,o=h(r,n);this.definitions=o[0],this.infos=o[1],this.resources=o[2],this.description=o[3],this.coosyss=o[4],this.groups=o[5],this.params=o[6]},h=function(t,e){for(var c,f,l=e,h=[],d=[],y=[],b=[],g=[],m=0;m<l.childNodes.length;m++){var v=l.childNodes[m];if(1==v.nodeType){var T=v.localName;switch(T){case p.TAG.DEFINITIONS:c=new n(v);break;case p.TAG.INFO:h.push(new r(v));break;case p.TAG.RESOURCE:d.push(new o(v));break;case p.TAG.DESCRIPTION:f=new i(v);break;case p.TAG.COOSYS:y.push(new s(v));break;case p.TAG.GROUP:b.push(new a(v));break;case p.TAG.PARAM:g.push(new u(v));break;default:t.getCache().addWarning("unknown element "+T+" in Votable node")}}}return[c,h,d,f,y,b,g]};return t.inherits(e,l),l.prototype.ID=function(){return this.attributes.ID},l.prototype.version=function(){return this.attributes.version},l.prototype.getInfos=function(){return this.infos},l.prototype.getDefinitions=function(){return this.definitions},l.prototype.getResources=function(){return this.resources},l.prototype.getCoosyss=function(){return this.coosyss},l.prototype.getGroups=function(){return this.groups},l.prototype.getParams=function(){return this.params},l.prototype.getDescription=function(){return this.description},l.prototype.getVotableEltByID=function(t){return this.getCache().getEltsByID()[t]},l.prototype.getVotableEltsByName=function(t){return this.getCache().getEltsByName()[t]},l.prototype.convertToGeoJSon=function(t){return new c(this).getGeoJSon(t)},l}),r("JsVotable",["./votable","./binary","./binary2","./coosys","./data","./definitions","./description","./field","./fieldref","./fits","./group","./info","./link","./max","./min","./option","./param","./paramref","./resource","./stream","./table","./tabledata","./td","./tr","./values","./constants"],function(t,e,n,r,o,i,s,a,u,c,p,f,l,h,d,y,b,g,m,v,T,A,N,w,I,D){var O={};return O.Constants=D,O.Votable=t,O.Binary=e,O.Binary2=n,O.Coosys=r,O.Data=o,O.Definitions=i,O.Description=s,O.Field=a,O.Fieldref=u,O.Fits=c,O.Group=p,O.Info=f,O.Link=l,O.Max=h,O.Min=d,O.Option=y,O.Param=b,O.Paramref=g,O.Resource=m,O.Stream=v,O.Table=T,O.TableData=A,O.Td=N,O.Tr=w,O.Values=I,O.version={major:2,minor:0,patch:2,date:"2019-02-15",toString:function(){return this.major+"."+this.minor+"."+this.patch}},window.JsVotable=O,O}),n(["JsVotable"]),r("jquery",function(){return t}),n("JsVotable")});