Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

d3-selection

Package Overview
Dependencies
Maintainers
1
Versions
58
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

d3-selection - npm Package Compare versions

Comparing version 0.6.2 to 0.6.3

2

build/bundle.js

@@ -1,1 +0,1 @@

var version = "0.6.2"; export * from "../index"; export {version};
var version = "0.6.3"; export * from "../index"; export {version};

@@ -182,3 +182,3 @@ (function (global, factory) {

uri = this.namespaceURI;
return uri
return uri && uri !== document.documentElement.namespaceURI
? document.createElementNS(uri, name)

@@ -942,3 +942,3 @@ : document.createElement(name);

var version = "0.6.2";
var version = "0.6.3";

@@ -945,0 +945,0 @@ exports.version = version;

@@ -1,1 +0,1 @@

!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define("d3-selection",["exports"],n):n(t.d3_selection={})}(this,function(t){"use strict";function n(t){return t.replace(zt,"\\$&")}function e(){}function r(n,e,r){return function(i){var o=t.event;t.event=i;try{n.call(this,this.__data__,e,r)}finally{t.event=o}}}function i(t){return function(n){var e=n.relatedTarget;e&&(e===this||8&e.compareDocumentPosition(this))||t(n)}}function o(t,n){return function(){var e=this[t];e&&(this.removeEventListener(n,e,e._capture),delete this[t])}}function u(t){var e=new RegExp("^__on([^.]+)"+n(t)+"$");return function(){for(var t in this){var n=t.match(e);if(n){var r=this[t];this.removeEventListener(n[1],r,r._capture),delete this[t]}}}}function s(t,n,e,o,u){return function(s,a,c){var l=this[n];l&&this.removeEventListener(e,l,l._capture),l=r(o,a,c),t&&(l=i(l)),l._listener=o,this.addEventListener(e,this[n]=l,l._capture=u)}}function a(t,n,r){var i,a,c=t+"",l="__on"+c;return arguments.length<2?(i=this.node()[l])&&i._listener:((i=c.indexOf("."))>0&&(c=c.slice(0,i)),(a=Ht.hasOwnProperty(c))&&(c=Ht[c]),this.each(n?i?s(a,l,c,n,null==r?!1:r):e:i?o(l,c):u(c)))}function c(){for(var n,e=t.event;n=e.sourceEvent;)e=n;return e}function l(t){return t&&(t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView)}function h(t,n,e){var r=l(t),i=r.CustomEvent;i?i=new i(n,e):(i=r.document.createEvent("Event"),e?(i.initEvent(n,e.bubbles,e.cancelable),i.detail=e.detail):i.initEvent(n,!1,!1)),t.dispatchEvent(i)}function f(t,n){return function(){return h(this,t,n)}}function p(t,n){return function(){return h(this,t,n.apply(this,arguments))}}function d(t,n){return this.each(("function"==typeof n?p:f)(t,n))}function _(t){return arguments.length?this.property("__data__",t):this.node().__data__}function m(){var t=this.parentNode;t&&t.removeChild(this)}function v(){return this.each(m)}function g(t){var n=t+="",e=n.indexOf(":");return e>=0&&"xmlns"!==(n=t.slice(0,e))&&(t=t.slice(e+1)),$t.hasOwnProperty(n)?{space:$t[n],local:t}:t}function y(t){return function(){return this.querySelector(t)}}function w(t){return function(){var n=this.ownerDocument,e=this.namespaceURI;return e?n.createElementNS(e,t):n.createElement(t)}}function x(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function A(t){var n=g(t);return(n.local?x:w)(n)}function S(t){return function(){return this.appendChild(t.apply(this,arguments))}}function b(t,n){return function(){return this.insertBefore(t.apply(this,arguments),n.apply(this,arguments)||null)}}function E(){return null}function C(t,n){var e="function"==typeof t?t:A(t);return this.select(arguments.length<2?S(e):b(e,null==n?E:"function"==typeof n?n:y(n)))}function N(){this.parentNode.insertBefore(this,this.parentNode.firstChild)}function M(){return this.each(N)}function T(){this.parentNode.appendChild(this)}function L(){return this.each(T)}function P(){this.innerHTML=""}function q(t){return function(){this.innerHTML=t}}function B(t){return function(){var n=t.apply(this,arguments);this.innerHTML=null==n?"":n}}function D(t){return arguments.length?this.each(null==t?P:("function"==typeof t?B:q)(t)):this.node().innerHTML}function O(){this.textContent=""}function V(t){return function(){this.textContent=t}}function R(t){return function(){var n=t.apply(this,arguments);this.textContent=null==n?"":n}}function X(t){return arguments.length?this.each(null==t?O:("function"==typeof t?R:V)(t)):this.node().textContent}function z(t){return t.trim().split(/^|\s+/)}function H(t){return t.classList||new Y(t)}function Y(t){this._node=t,this._names=z(t.getAttribute("class")||"")}function $(t,n){for(var e=H(t),r=-1,i=n.length;++r<i;)e.add(n[r])}function j(t,n){for(var e=H(t),r=-1,i=n.length;++r<i;)e.remove(n[r])}function k(t){return function(){$(this,t)}}function G(t){return function(){j(this,t)}}function I(t,n){return function(){(n.apply(this,arguments)?$:j)(this,t)}}function U(t,n){var e=z(t+"");if(arguments.length<2){for(var r=H(this.node()),i=-1,o=e.length;++i<o;)if(!r.contains(e[i]))return!1;return!0}return this.each(("function"==typeof n?I:n?k:G)(e,n))}function K(t){return function(){delete this[t]}}function W(t,n){return function(){this[t]=n}}function F(t,n){return function(){var e=n.apply(this,arguments);null==e?delete this[t]:this[t]=e}}function J(t,n){return arguments.length>1?this.each((null==n?K:"function"==typeof n?F:W)(t,n)):this.node()[t]}function Q(t){return function(){this.style.removeProperty(t)}}function Z(t,n,e){return function(){this.style.setProperty(t,n,e)}}function tt(t,n,e){return function(){var r=n.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,e)}}function nt(t,n,e){var r;return arguments.length>1?this.each((null==n?Q:"function"==typeof n?tt:Z)(t,n,null==e?"":e)):l(r=this.node()).getComputedStyle(r,null).getPropertyValue(t)}function et(t){return function(){this.removeAttribute(t)}}function rt(t){return function(){this.removeAttributeNS(t.space,t.local)}}function it(t,n){return function(){this.setAttribute(t,n)}}function ot(t,n){return function(){this.setAttributeNS(t.space,t.local,n)}}function ut(t,n){return function(){var e=n.apply(this,arguments);null==e?this.removeAttribute(t):this.setAttribute(t,e)}}function st(t,n){return function(){var e=n.apply(this,arguments);null==e?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,e)}}function at(t,n){var e=g(t);if(arguments.length<2){var r=this.node();return e.local?r.getAttributeNS(e.space,e.local):r.getAttribute(e)}return this.each((null==n?e.local?rt:et:"function"==typeof n?e.local?st:ut:e.local?ot:it)(e,n))}function ct(t){for(var n=this._nodes,e=0,r=n.length;r>e;++e)for(var i,o=n[e],u=0,s=o.length;s>u;++u)(i=o[u])&&t.call(i,i.__data__,u,o);return this}function lt(){return!this.node()}function ht(){var t=0;return this.each(function(){++t}),t}function ft(){for(var t=this._nodes,n=0,e=t.length;e>n;++n)for(var r=t[n],i=0,o=r.length;o>i;++i){var u=r[i];if(u)return u}return null}function pt(){var t=new Array(this.size()),n=-1;return this.each(function(){t[++n]=this}),t}function dt(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function _t(t){for(var n=t._nodes,e=0,r=n.length;r>e;++e)if(!Array.isArray(i=n[e]))for(var i,o=i.length,u=n[e]=new Array(o),s=0;o>s;++s)u[s]=i[s];return n}function mt(t){function n(n,e){return n&&e?t(n.__data__,e.__data__):!n-!e}t||(t=vt);for(var e=_t(this),r=0,i=e.length;i>r;++r)e[r].sort(n);return this.order()}function vt(t,n){return n>t?-1:t>n?1:t>=n?0:NaN}function gt(){for(var t=this._nodes,n=-1,e=t.length;++n<e;)for(var r,i=t[n],o=i.length-1,u=i[o];--o>=0;)(r=i[o])&&(u&&u!==r.nextSibling&&u.parentNode.insertBefore(r,u),u=r);return this}function yt(t){return new Array(t.length)}function wt(){var t=this._exit;return t?(this._exit=null,t):new Pt(this._nodes.map(yt),this._parents)}function xt(){var t=this._enter;return t?(this._enter=null,t):(t=new Pt(this._nodes.map(yt),this._parents),t._update=this,t)}function At(t){return function(){return t}}function St(t,n,e,r,i){var o,u=0,s=n.length,a=i.length,c=Math.min(s,a);for(e.length=0,e.length=a,r.length=0,r.length=s;c>u;++u)(o=n[u])?o.__data__=i[u]:e[u]=new Ct(t,i[u]);for(;a>u;++u)e[u]=new Ct(t,i[u]);for(;s>u;++u)(o=n[u])&&(r[u]=n[u]);n.length=a}function bt(t,n,e,r,i,o){var u,s,a,c=i.length,l=n.length,h={},f=new Array(l);for(e.length=0,e.length=c,r.length=0,r.length=l,u=0;l>u;++u)(s=n[u])&&(f[u]=a=jt+o.call(s,s.__data__,u,n),h[a]?r[u]=s:h[a]=s);for(n.length=0,n.length=c,u=0;c>u;++u)a=jt+o.call(t,i[u],u,i),(s=h[a])?s!==!0&&(n[u]=s,s.__data__=i[u]):e[u]=new Ct(t,i[u]),h[a]=!0;for(u=0;l>u;++u)(s=h[f[u]])!==!0&&(r[u]=s)}function Et(t,n){if(!t){var e=new Array(this.size()),r=-1;return this.each(function(t){e[++r]=t}),e}var i=n?bt:St,o=this._parents,u=_t(this),s=(this._enter=this.enter())._nodes,a=(this._exit=this.exit())._nodes;"function"!=typeof t&&(t=At(t));for(var c=u.length,l=0;c>l;++l){var h=u[l],f=o[l];i(f,h,s[l],a[l],t.call(f,f&&f.__data__,l,o),n);for(var p,d,_=h.length,m=0,v=0;_>m;++m)if(p=s[l][m]){for(m>=v&&(v=m+1);!(d=h[v])&&++v<_;);p._next=d||null}}return this}function Ct(t,n){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=n}function Nt(t){"function"!=typeof t&&(t=Ut(t));for(var n=this._nodes,e=n.length,r=new Array(e),i=0;e>i;++i)for(var o,u=n[i],s=u.length,a=r[i]=[],c=0;s>c;++c)(o=u[c])&&t.call(o,o.__data__,c,u)&&a.push(o);return new Pt(r,this._parents)}function Mt(t){return function(){return this.querySelectorAll(t)}}function Tt(t){"function"!=typeof t&&(t=Mt(t));for(var n=this._nodes,e=n.length,r=[],i=[],o=0;e>o;++o)for(var u,s=n[o],a=s.length,c=0;a>c;++c)(u=s[c])&&(r.push(t.call(u,u.__data__,c,s)),i.push(u));return new Pt(r,i)}function Lt(t){"function"!=typeof t&&(t=y(t));for(var n=this._nodes,e=this._update,r=n.length,i=new Array(r),o=0;r>o;++o)for(var u,s,a=n[o],c=a.length,l=i[o]=new Array(c),h=0;c>h;++h)(u=a[h])&&(s=t.call(u,u.__data__,h,a))&&("__data__"in u&&(s.__data__=u.__data__),e&&(e._nodes[o][h]=s),l[h]=s);return new Pt(i,this._parents)}function Pt(t,n){this._nodes=t,this._parents=n}function qt(){return new Pt([[document.documentElement]],Kt)}function Bt(t){return"string"==typeof t?new Pt([[document.querySelector(t)]],[document.documentElement]):new Pt([[t]],Kt)}function Dt(t,n){var e=t.ownerSVGElement||t;if(e.createSVGPoint){var r=e.createSVGPoint();if(0>Wt){var i=l(t);if(i.scrollX||i.scrollY){e=Bt(i.document.body).append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var o=e.node().getScreenCTM();Wt=!(o.f||o.e),e.remove()}}return Wt?(r.x=n.pageX,r.y=n.pageY):(r.x=n.clientX,r.y=n.clientY),r=r.matrixTransform(t.getScreenCTM().inverse()),[r.x,r.y]}var u=t.getBoundingClientRect();return[n.clientX-u.left-t.clientLeft,n.clientY-u.top-t.clientTop]}function Ot(t,n){return null==n&&(n=c()),n.changedTouches&&(n=n.changedTouches[0]),Dt(t,n)}function Vt(t){return"string"==typeof t?new Pt([document.querySelectorAll(t)],[document.documentElement]):new Pt([t],Kt)}function Rt(t,n,e){arguments.length<3&&(e=n,n=c().changedTouches);for(var r,i=0,o=n?n.length:0;o>i;++i)if((r=n[i]).identifier===e)return Dt(t,r);return null}function Xt(t,n){null==n&&(n=c().touches);for(var e=0,r=n?n.length:0,i=new Array(r);r>e;++e)i[e]=Dt(t,n[e]);return i}var zt=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,Ht={};if(t.event=null,"undefined"!=typeof document){var Yt=document.documentElement;"onmouseenter"in Yt||(Ht={mouseenter:"mouseover",mouseleave:"mouseout"})}var $t={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};Y.prototype={add:function(t){var n=this._names.indexOf(t);0>n&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var n=this._names.indexOf(t);n>=0&&(this._names.splice(n,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var jt="$";Ct.prototype={appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,n){return this._parent.insertBefore(t,n)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};var kt=function(t){return function(){return this.matches(t)}};if("undefined"!=typeof document){var Gt=document.documentElement;if(!Gt.matches){var It=Gt.webkitMatchesSelector||Gt.msMatchesSelector||Gt.mozMatchesSelector||Gt.oMatchesSelector;kt=function(t){return function(){return It.call(this,t)}}}}var Ut=kt,Kt=[null];Pt.prototype=qt.prototype={select:Lt,selectAll:Tt,filter:Nt,data:Et,enter:xt,exit:wt,order:gt,sort:mt,call:dt,nodes:pt,node:ft,size:ht,empty:lt,each:ct,attr:at,style:nt,property:J,classed:U,text:X,html:D,raise:L,lower:M,append:C,remove:v,datum:_,on:a,dispatch:d};var Wt="undefined"!=typeof navigator&&/WebKit/.test(navigator.userAgent)?-1:0,Ft="0.6.2";t.version=Ft,t.mouse=Ot,t.namespace=g,t.namespaces=$t,t.select=Bt,t.selectAll=Vt,t.selection=qt,t.touch=Rt,t.touches=Xt});
!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define("d3-selection",["exports"],n):n(t.d3_selection={})}(this,function(t){"use strict";function n(t){return t.replace(zt,"\\$&")}function e(){}function r(n,e,r){return function(i){var o=t.event;t.event=i;try{n.call(this,this.__data__,e,r)}finally{t.event=o}}}function i(t){return function(n){var e=n.relatedTarget;e&&(e===this||8&e.compareDocumentPosition(this))||t(n)}}function o(t,n){return function(){var e=this[t];e&&(this.removeEventListener(n,e,e._capture),delete this[t])}}function u(t){var e=new RegExp("^__on([^.]+)"+n(t)+"$");return function(){for(var t in this){var n=t.match(e);if(n){var r=this[t];this.removeEventListener(n[1],r,r._capture),delete this[t]}}}}function s(t,n,e,o,u){return function(s,a,c){var l=this[n];l&&this.removeEventListener(e,l,l._capture),l=r(o,a,c),t&&(l=i(l)),l._listener=o,this.addEventListener(e,this[n]=l,l._capture=u)}}function a(t,n,r){var i,a,c=t+"",l="__on"+c;return arguments.length<2?(i=this.node()[l])&&i._listener:((i=c.indexOf("."))>0&&(c=c.slice(0,i)),(a=Ht.hasOwnProperty(c))&&(c=Ht[c]),this.each(n?i?s(a,l,c,n,null==r?!1:r):e:i?o(l,c):u(c)))}function c(){for(var n,e=t.event;n=e.sourceEvent;)e=n;return e}function l(t){return t&&(t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView)}function h(t,n,e){var r=l(t),i=r.CustomEvent;i?i=new i(n,e):(i=r.document.createEvent("Event"),e?(i.initEvent(n,e.bubbles,e.cancelable),i.detail=e.detail):i.initEvent(n,!1,!1)),t.dispatchEvent(i)}function f(t,n){return function(){return h(this,t,n)}}function p(t,n){return function(){return h(this,t,n.apply(this,arguments))}}function d(t,n){return this.each(("function"==typeof n?p:f)(t,n))}function _(t){return arguments.length?this.property("__data__",t):this.node().__data__}function m(){var t=this.parentNode;t&&t.removeChild(this)}function v(){return this.each(m)}function g(t){var n=t+="",e=n.indexOf(":");return e>=0&&"xmlns"!==(n=t.slice(0,e))&&(t=t.slice(e+1)),Ut.hasOwnProperty(n)?{space:Ut[n],local:t}:t}function y(t){return function(){return this.querySelector(t)}}function w(t){return function(){var n=this.ownerDocument,e=this.namespaceURI;return e&&e!==n.documentElement.namespaceURI?n.createElementNS(e,t):n.createElement(t)}}function x(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function A(t){var n=g(t);return(n.local?x:w)(n)}function S(t){return function(){return this.appendChild(t.apply(this,arguments))}}function b(t,n){return function(){return this.insertBefore(t.apply(this,arguments),n.apply(this,arguments)||null)}}function E(){return null}function C(t,n){var e="function"==typeof t?t:A(t);return this.select(arguments.length<2?S(e):b(e,null==n?E:"function"==typeof n?n:y(n)))}function N(){this.parentNode.insertBefore(this,this.parentNode.firstChild)}function M(){return this.each(N)}function T(){this.parentNode.appendChild(this)}function L(){return this.each(T)}function P(){this.innerHTML=""}function q(t){return function(){this.innerHTML=t}}function B(t){return function(){var n=t.apply(this,arguments);this.innerHTML=null==n?"":n}}function D(t){return arguments.length?this.each(null==t?P:("function"==typeof t?B:q)(t)):this.node().innerHTML}function O(){this.textContent=""}function R(t){return function(){this.textContent=t}}function V(t){return function(){var n=t.apply(this,arguments);this.textContent=null==n?"":n}}function X(t){return arguments.length?this.each(null==t?O:("function"==typeof t?V:R)(t)):this.node().textContent}function z(t){return t.trim().split(/^|\s+/)}function H(t){return t.classList||new I(t)}function I(t){this._node=t,this._names=z(t.getAttribute("class")||"")}function U(t,n){for(var e=H(t),r=-1,i=n.length;++r<i;)e.add(n[r])}function Y(t,n){for(var e=H(t),r=-1,i=n.length;++r<i;)e.remove(n[r])}function $(t){return function(){U(this,t)}}function j(t){return function(){Y(this,t)}}function k(t,n){return function(){(n.apply(this,arguments)?U:Y)(this,t)}}function G(t,n){var e=z(t+"");if(arguments.length<2){for(var r=H(this.node()),i=-1,o=e.length;++i<o;)if(!r.contains(e[i]))return!1;return!0}return this.each(("function"==typeof n?k:n?$:j)(e,n))}function K(t){return function(){delete this[t]}}function W(t,n){return function(){this[t]=n}}function F(t,n){return function(){var e=n.apply(this,arguments);null==e?delete this[t]:this[t]=e}}function J(t,n){return arguments.length>1?this.each((null==n?K:"function"==typeof n?F:W)(t,n)):this.node()[t]}function Q(t){return function(){this.style.removeProperty(t)}}function Z(t,n,e){return function(){this.style.setProperty(t,n,e)}}function tt(t,n,e){return function(){var r=n.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,e)}}function nt(t,n,e){var r;return arguments.length>1?this.each((null==n?Q:"function"==typeof n?tt:Z)(t,n,null==e?"":e)):l(r=this.node()).getComputedStyle(r,null).getPropertyValue(t)}function et(t){return function(){this.removeAttribute(t)}}function rt(t){return function(){this.removeAttributeNS(t.space,t.local)}}function it(t,n){return function(){this.setAttribute(t,n)}}function ot(t,n){return function(){this.setAttributeNS(t.space,t.local,n)}}function ut(t,n){return function(){var e=n.apply(this,arguments);null==e?this.removeAttribute(t):this.setAttribute(t,e)}}function st(t,n){return function(){var e=n.apply(this,arguments);null==e?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,e)}}function at(t,n){var e=g(t);if(arguments.length<2){var r=this.node();return e.local?r.getAttributeNS(e.space,e.local):r.getAttribute(e)}return this.each((null==n?e.local?rt:et:"function"==typeof n?e.local?st:ut:e.local?ot:it)(e,n))}function ct(t){for(var n=this._nodes,e=0,r=n.length;r>e;++e)for(var i,o=n[e],u=0,s=o.length;s>u;++u)(i=o[u])&&t.call(i,i.__data__,u,o);return this}function lt(){return!this.node()}function ht(){var t=0;return this.each(function(){++t}),t}function ft(){for(var t=this._nodes,n=0,e=t.length;e>n;++n)for(var r=t[n],i=0,o=r.length;o>i;++i){var u=r[i];if(u)return u}return null}function pt(){var t=new Array(this.size()),n=-1;return this.each(function(){t[++n]=this}),t}function dt(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function _t(t){for(var n=t._nodes,e=0,r=n.length;r>e;++e)if(!Array.isArray(i=n[e]))for(var i,o=i.length,u=n[e]=new Array(o),s=0;o>s;++s)u[s]=i[s];return n}function mt(t){function n(n,e){return n&&e?t(n.__data__,e.__data__):!n-!e}t||(t=vt);for(var e=_t(this),r=0,i=e.length;i>r;++r)e[r].sort(n);return this.order()}function vt(t,n){return n>t?-1:t>n?1:t>=n?0:NaN}function gt(){for(var t=this._nodes,n=-1,e=t.length;++n<e;)for(var r,i=t[n],o=i.length-1,u=i[o];--o>=0;)(r=i[o])&&(u&&u!==r.nextSibling&&u.parentNode.insertBefore(r,u),u=r);return this}function yt(t){return new Array(t.length)}function wt(){var t=this._exit;return t?(this._exit=null,t):new Pt(this._nodes.map(yt),this._parents)}function xt(){var t=this._enter;return t?(this._enter=null,t):(t=new Pt(this._nodes.map(yt),this._parents),t._update=this,t)}function At(t){return function(){return t}}function St(t,n,e,r,i){var o,u=0,s=n.length,a=i.length,c=Math.min(s,a);for(e.length=0,e.length=a,r.length=0,r.length=s;c>u;++u)(o=n[u])?o.__data__=i[u]:e[u]=new Ct(t,i[u]);for(;a>u;++u)e[u]=new Ct(t,i[u]);for(;s>u;++u)(o=n[u])&&(r[u]=n[u]);n.length=a}function bt(t,n,e,r,i,o){var u,s,a,c=i.length,l=n.length,h={},f=new Array(l);for(e.length=0,e.length=c,r.length=0,r.length=l,u=0;l>u;++u)(s=n[u])&&(f[u]=a=Yt+o.call(s,s.__data__,u,n),h[a]?r[u]=s:h[a]=s);for(n.length=0,n.length=c,u=0;c>u;++u)a=Yt+o.call(t,i[u],u,i),(s=h[a])?s!==!0&&(n[u]=s,s.__data__=i[u]):e[u]=new Ct(t,i[u]),h[a]=!0;for(u=0;l>u;++u)(s=h[f[u]])!==!0&&(r[u]=s)}function Et(t,n){if(!t){var e=new Array(this.size()),r=-1;return this.each(function(t){e[++r]=t}),e}var i=n?bt:St,o=this._parents,u=_t(this),s=(this._enter=this.enter())._nodes,a=(this._exit=this.exit())._nodes;"function"!=typeof t&&(t=At(t));for(var c=u.length,l=0;c>l;++l){var h=u[l],f=o[l];i(f,h,s[l],a[l],t.call(f,f&&f.__data__,l,o),n);for(var p,d,_=h.length,m=0,v=0;_>m;++m)if(p=s[l][m]){for(m>=v&&(v=m+1);!(d=h[v])&&++v<_;);p._next=d||null}}return this}function Ct(t,n){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=n}function Nt(t){"function"!=typeof t&&(t=Gt(t));for(var n=this._nodes,e=n.length,r=new Array(e),i=0;e>i;++i)for(var o,u=n[i],s=u.length,a=r[i]=[],c=0;s>c;++c)(o=u[c])&&t.call(o,o.__data__,c,u)&&a.push(o);return new Pt(r,this._parents)}function Mt(t){return function(){return this.querySelectorAll(t)}}function Tt(t){"function"!=typeof t&&(t=Mt(t));for(var n=this._nodes,e=n.length,r=[],i=[],o=0;e>o;++o)for(var u,s=n[o],a=s.length,c=0;a>c;++c)(u=s[c])&&(r.push(t.call(u,u.__data__,c,s)),i.push(u));return new Pt(r,i)}function Lt(t){"function"!=typeof t&&(t=y(t));for(var n=this._nodes,e=this._update,r=n.length,i=new Array(r),o=0;r>o;++o)for(var u,s,a=n[o],c=a.length,l=i[o]=new Array(c),h=0;c>h;++h)(u=a[h])&&(s=t.call(u,u.__data__,h,a))&&("__data__"in u&&(s.__data__=u.__data__),e&&(e._nodes[o][h]=s),l[h]=s);return new Pt(i,this._parents)}function Pt(t,n){this._nodes=t,this._parents=n}function qt(){return new Pt([[document.documentElement]],Kt)}function Bt(t){return"string"==typeof t?new Pt([[document.querySelector(t)]],[document.documentElement]):new Pt([[t]],Kt)}function Dt(t,n){var e=t.ownerSVGElement||t;if(e.createSVGPoint){var r=e.createSVGPoint();if(0>Wt){var i=l(t);if(i.scrollX||i.scrollY){e=Bt(i.document.body).append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var o=e.node().getScreenCTM();Wt=!(o.f||o.e),e.remove()}}return Wt?(r.x=n.pageX,r.y=n.pageY):(r.x=n.clientX,r.y=n.clientY),r=r.matrixTransform(t.getScreenCTM().inverse()),[r.x,r.y]}var u=t.getBoundingClientRect();return[n.clientX-u.left-t.clientLeft,n.clientY-u.top-t.clientTop]}function Ot(t,n){return null==n&&(n=c()),n.changedTouches&&(n=n.changedTouches[0]),Dt(t,n)}function Rt(t){return"string"==typeof t?new Pt([document.querySelectorAll(t)],[document.documentElement]):new Pt([t],Kt)}function Vt(t,n,e){arguments.length<3&&(e=n,n=c().changedTouches);for(var r,i=0,o=n?n.length:0;o>i;++i)if((r=n[i]).identifier===e)return Dt(t,r);return null}function Xt(t,n){null==n&&(n=c().touches);for(var e=0,r=n?n.length:0,i=new Array(r);r>e;++e)i[e]=Dt(t,n[e]);return i}var zt=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,Ht={};if(t.event=null,"undefined"!=typeof document){var It=document.documentElement;"onmouseenter"in It||(Ht={mouseenter:"mouseover",mouseleave:"mouseout"})}var Ut={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};I.prototype={add:function(t){var n=this._names.indexOf(t);0>n&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var n=this._names.indexOf(t);n>=0&&(this._names.splice(n,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var Yt="$";Ct.prototype={appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,n){return this._parent.insertBefore(t,n)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};var $t=function(t){return function(){return this.matches(t)}};if("undefined"!=typeof document){var jt=document.documentElement;if(!jt.matches){var kt=jt.webkitMatchesSelector||jt.msMatchesSelector||jt.mozMatchesSelector||jt.oMatchesSelector;$t=function(t){return function(){return kt.call(this,t)}}}}var Gt=$t,Kt=[null];Pt.prototype=qt.prototype={select:Lt,selectAll:Tt,filter:Nt,data:Et,enter:xt,exit:wt,order:gt,sort:mt,call:dt,nodes:pt,node:ft,size:ht,empty:lt,each:ct,attr:at,style:nt,property:J,classed:G,text:X,html:D,raise:L,lower:M,append:C,remove:v,datum:_,on:a,dispatch:d};var Wt="undefined"!=typeof navigator&&/WebKit/.test(navigator.userAgent)?-1:0,Ft="0.6.3";t.version=Ft,t.mouse=Ot,t.namespace=g,t.namespaces=Ut,t.select=Bt,t.selectAll=Rt,t.selection=qt,t.touch=Vt,t.touches=Xt});
{
"name": "d3-selection",
"version": "0.6.2",
"version": "0.6.3",
"description": "Data-driven DOM manipulation: select elements and join them to data.",

@@ -5,0 +5,0 @@ "keywords": [

@@ -8,3 +8,3 @@ import namespace from "../namespace";

uri = this.namespaceURI;
return uri
return uri && uri !== document.documentElement.namespaceURI
? document.createElementNS(uri, name)

@@ -11,0 +11,0 @@ : document.createElement(name);

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc