radh-ui
Version:
Stencil Component Starter
1 lines • 12.2 kB
JavaScript
System.register(["./p-72e8199d.system.js"],(function(t){"use strict";var n,e;return{setters:[function(t){n=t.r;e=t.h}],execute:function(){var r="http://www.w3.org/1999/xhtml";var i={svg:"http://www.w3.org/2000/svg",xhtml:r,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function o(t){var n=t+="",e=n.indexOf(":");if(e>=0&&(n=t.slice(0,e))!=="xmlns")t=t.slice(e+1);return i.hasOwnProperty(n)?{space:i[n],local:t}:t}function u(t){return function(){var n=this.ownerDocument,e=this.namespaceURI;return e===r&&n.documentElement.namespaceURI===r?n.createElement(t):n.createElementNS(e,t)}}function s(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function a(t){var n=o(t);return(n.local?s:u)(n)}function f(){}function c(t){return t==null?f:function(){return this.querySelector(t)}}function l(t){if(typeof t!=="function")t=c(t);for(var n=this._groups,e=n.length,r=new Array(e),i=0;i<e;++i){for(var o=n[i],u=o.length,s=r[i]=new Array(u),a,f,l=0;l<u;++l){if((a=o[l])&&(f=t.call(a,a.__data__,l,o))){if("__data__"in a)f.__data__=a.__data__;s[l]=f}}}return new kt(r,this._parents)}function h(){return[]}function p(t){return t==null?h:function(){return this.querySelectorAll(t)}}function _(t){if(typeof t!=="function")t=p(t);for(var n=this._groups,e=n.length,r=[],i=[],o=0;o<e;++o){for(var u=n[o],s=u.length,a,f=0;f<s;++f){if(a=u[f]){r.push(t.call(a,a.__data__,f,u));i.push(a)}}}return new kt(r,i)}function d(t){return function(){return this.matches(t)}}function v(t){if(typeof t!=="function")t=d(t);for(var n=this._groups,e=n.length,r=new Array(e),i=0;i<e;++i){for(var o=n[i],u=o.length,s=r[i]=[],a,f=0;f<u;++f){if((a=o[f])&&t.call(a,a.__data__,f,o)){s.push(a)}}}return new kt(r,this._parents)}function y(t){return new Array(t.length)}function m(){return new kt(this._enter||this._groups.map(y),this._parents)}function g(t,n){this.ownerDocument=t.ownerDocument;this.namespaceURI=t.namespaceURI;this._next=null;this._parent=t;this.__data__=n}g.prototype={constructor:g,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)}};function w(t){return function(){return t}}var A="$";function x(t,n,e,r,i,o){var u=0,s,a=n.length,f=o.length;for(;u<f;++u){if(s=n[u]){s.__data__=o[u];r[u]=s}else{e[u]=new g(t,o[u])}}for(;u<a;++u){if(s=n[u]){i[u]=s}}}function b(t,n,e,r,i,o,u){var s,a,f={},c=n.length,l=o.length,h=new Array(c),p;for(s=0;s<c;++s){if(a=n[s]){h[s]=p=A+u.call(a,a.__data__,s,n);if(p in f){i[s]=a}else{f[p]=a}}}for(s=0;s<l;++s){p=A+u.call(t,o[s],s,o);if(a=f[p]){r[s]=a;a.__data__=o[s];f[p]=null}else{e[s]=new g(t,o[s])}}for(s=0;s<c;++s){if((a=n[s])&&f[h[s]]===a){i[s]=a}}}function S(t,n){if(!t){p=new Array(this.size()),f=-1;this.each((function(t){p[++f]=t}));return p}var e=n?b:x,r=this._parents,i=this._groups;if(typeof t!=="function")t=w(t);for(var o=i.length,u=new Array(o),s=new Array(o),a=new Array(o),f=0;f<o;++f){var c=r[f],l=i[f],h=l.length,p=t.call(c,c&&c.__data__,f,r),_=p.length,d=s[f]=new Array(_),v=u[f]=new Array(_),y=a[f]=new Array(h);e(c,l,d,v,y,p,n);for(var m=0,g=0,A,S;m<_;++m){if(A=d[m]){if(m>=g)g=m+1;while(!(S=v[g])&&++g<_);A._next=S||null}}}u=new kt(u,r);u._enter=s;u._exit=a;return u}function N(){return new kt(this._exit||this._groups.map(y),this._parents)}function E(t,n,e){var r=this.enter(),i=this,o=this.exit();r=typeof t==="function"?t(r):r.append(t+"");if(n!=null)i=n(i);if(e==null)o.remove();else e(o);return r&&i?r.merge(i).order():i}function L(t){for(var n=this._groups,e=t._groups,r=n.length,i=e.length,o=Math.min(r,i),u=new Array(r),s=0;s<o;++s){for(var a=n[s],f=e[s],c=a.length,l=u[s]=new Array(c),h,p=0;p<c;++p){if(h=a[p]||f[p]){l[p]=h}}}for(;s<r;++s){u[s]=n[s]}return new kt(u,this._parents)}function C(){for(var t=this._groups,n=-1,e=t.length;++n<e;){for(var r=t[n],i=r.length-1,o=r[i],u;--i>=0;){if(u=r[i]){if(o&&u.compareDocumentPosition(o)^4)o.parentNode.insertBefore(u,o);o=u}}}return this}function D(t){if(!t)t=P;function n(n,e){return n&&e?t(n.__data__,e.__data__):!n-!e}for(var e=this._groups,r=e.length,i=new Array(r),o=0;o<r;++o){for(var u=e[o],s=u.length,a=i[o]=new Array(s),f,c=0;c<s;++c){if(f=u[c]){a[c]=f}}a.sort(n)}return new kt(i,this._parents).order()}function P(t,n){return t<n?-1:t>n?1:t>=n?0:NaN}function q(){var t=arguments[0];arguments[0]=this;t.apply(null,arguments);return this}function B(){var t=new Array(this.size()),n=-1;this.each((function(){t[++n]=this}));return t}function O(){for(var t=this._groups,n=0,e=t.length;n<e;++n){for(var r=t[n],i=0,o=r.length;i<o;++i){var u=r[i];if(u)return u}}return null}function M(){var t=0;this.each((function(){++t}));return t}function T(){return!this.node()}function j(t){for(var n=this._groups,e=0,r=n.length;e<r;++e){for(var i=n[e],o=0,u=i.length,s;o<u;++o){if(s=i[o])t.call(s,s.__data__,o,i)}}return this}function z(t){return function(){this.removeAttribute(t)}}function H(t){return function(){this.removeAttributeNS(t.space,t.local)}}function I(t,n){return function(){this.setAttribute(t,n)}}function R(t,n){return function(){this.setAttributeNS(t.space,t.local,n)}}function U(t,n){return function(){var e=n.apply(this,arguments);if(e==null)this.removeAttribute(t);else this.setAttribute(t,e)}}function V(t,n){return function(){var e=n.apply(this,arguments);if(e==null)this.removeAttributeNS(t.space,t.local);else this.setAttributeNS(t.space,t.local,e)}}function k(t,n){var e=o(t);if(arguments.length<2){var r=this.node();return e.local?r.getAttributeNS(e.space,e.local):r.getAttribute(e)}return this.each((n==null?e.local?H:z:typeof n==="function"?e.local?V:U:e.local?R:I)(e,n))}function X(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function $(t){return function(){this.style.removeProperty(t)}}function F(t,n,e){return function(){this.style.setProperty(t,n,e)}}function G(t,n,e){return function(){var r=n.apply(this,arguments);if(r==null)this.style.removeProperty(t);else this.style.setProperty(t,r,e)}}function J(t,n,e){return arguments.length>1?this.each((n==null?$:typeof n==="function"?G:F)(t,n,e==null?"":e)):K(this.node(),t)}function K(t,n){return t.style.getPropertyValue(n)||X(t).getComputedStyle(t,null).getPropertyValue(n)}function Q(t){return function(){delete this[t]}}function W(t,n){return function(){this[t]=n}}function Y(t,n){return function(){var e=n.apply(this,arguments);if(e==null)delete this[t];else this[t]=e}}function Z(t,n){return arguments.length>1?this.each((n==null?Q:typeof n==="function"?Y:W)(t,n)):this.node()[t]}function tt(t){return t.trim().split(/^|\s+/)}function nt(t){return t.classList||new et(t)}function et(t){this._node=t;this._names=tt(t.getAttribute("class")||"")}et.prototype={add:function(t){var n=this._names.indexOf(t);if(n<0){this._names.push(t);this._node.setAttribute("class",this._names.join(" "))}},remove:function(t){var n=this._names.indexOf(t);if(n>=0){this._names.splice(n,1);this._node.setAttribute("class",this._names.join(" "))}},contains:function(t){return this._names.indexOf(t)>=0}};function rt(t,n){var e=nt(t),r=-1,i=n.length;while(++r<i)e.add(n[r])}function it(t,n){var e=nt(t),r=-1,i=n.length;while(++r<i)e.remove(n[r])}function ot(t){return function(){rt(this,t)}}function ut(t){return function(){it(this,t)}}function st(t,n){return function(){(n.apply(this,arguments)?rt:it)(this,t)}}function at(t,n){var e=tt(t+"");if(arguments.length<2){var r=nt(this.node()),i=-1,o=e.length;while(++i<o)if(!r.contains(e[i]))return false;return true}return this.each((typeof n==="function"?st:n?ot:ut)(e,n))}function ft(){this.textContent=""}function ct(t){return function(){this.textContent=t}}function lt(t){return function(){var n=t.apply(this,arguments);this.textContent=n==null?"":n}}function ht(t){return arguments.length?this.each(t==null?ft:(typeof t==="function"?lt:ct)(t)):this.node().textContent}function pt(){this.innerHTML=""}function _t(t){return function(){this.innerHTML=t}}function dt(t){return function(){var n=t.apply(this,arguments);this.innerHTML=n==null?"":n}}function vt(t){return arguments.length?this.each(t==null?pt:(typeof t==="function"?dt:_t)(t)):this.node().innerHTML}function yt(){if(this.nextSibling)this.parentNode.appendChild(this)}function mt(){return this.each(yt)}function gt(){if(this.previousSibling)this.parentNode.insertBefore(this,this.parentNode.firstChild)}function wt(){return this.each(gt)}function At(t){var n=typeof t==="function"?t:a(t);return this.select((function(){return this.appendChild(n.apply(this,arguments))}))}function xt(){return null}function bt(t,n){var e=typeof t==="function"?t:a(t),r=n==null?xt:typeof n==="function"?n:c(n);return this.select((function(){return this.insertBefore(e.apply(this,arguments),r.apply(this,arguments)||null)}))}function St(){var t=this.parentNode;if(t)t.removeChild(this)}function Nt(){return this.each(St)}function Et(){var t=this.cloneNode(false),n=this.parentNode;return n?n.insertBefore(t,this.nextSibling):t}function Lt(){var t=this.cloneNode(true),n=this.parentNode;return n?n.insertBefore(t,this.nextSibling):t}function Ct(t){return this.select(t?Lt:Et)}function Dt(t){return arguments.length?this.property("__data__",t):this.node().__data__}var Pt={};if(typeof document!=="undefined"){var qt=document.documentElement;if(!("onmouseenter"in qt)){Pt={mouseenter:"mouseover",mouseleave:"mouseout"}}}function Bt(t,n,e){t=Ot(t,n,e);return function(n){var e=n.relatedTarget;if(!e||e!==this&&!(e.compareDocumentPosition(this)&8)){t.call(this,n)}}}function Ot(t,n,e){return function(r){try{t.call(this,this.__data__,n,e)}finally{}}}function Mt(t){return t.trim().split(/^|\s+/).map((function(t){var n="",e=t.indexOf(".");if(e>=0)n=t.slice(e+1),t=t.slice(0,e);return{type:t,name:n}}))}function Tt(t){return function(){var n=this.__on;if(!n)return;for(var e=0,r=-1,i=n.length,o;e<i;++e){if(o=n[e],(!t.type||o.type===t.type)&&o.name===t.name){this.removeEventListener(o.type,o.listener,o.capture)}else{n[++r]=o}}if(++r)n.length=r;else delete this.__on}}function jt(t,n,e){var r=Pt.hasOwnProperty(t.type)?Bt:Ot;return function(i,o,u){var s=this.__on,a,f=r(n,o,u);if(s)for(var c=0,l=s.length;c<l;++c){if((a=s[c]).type===t.type&&a.name===t.name){this.removeEventListener(a.type,a.listener,a.capture);this.addEventListener(a.type,a.listener=f,a.capture=e);a.value=n;return}}this.addEventListener(t.type,f,e);a={type:t.type,name:t.name,value:n,listener:f,capture:e};if(!s)this.__on=[a];else s.push(a)}}function zt(t,n,e){var r=Mt(t+""),i,o=r.length,u;if(arguments.length<2){var s=this.node().__on;if(s)for(var a=0,f=s.length,c;a<f;++a){for(i=0,c=s[a];i<o;++i){if((u=r[i]).type===c.type&&u.name===c.name){return c.value}}}return}s=n?jt:Tt;if(e==null)e=false;for(i=0;i<o;++i)this.each(s(r[i],n,e));return this}function Ht(t,n,e){var r=X(t),i=r.CustomEvent;if(typeof i==="function"){i=new i(n,e)}else{i=r.document.createEvent("Event");if(e)i.initEvent(n,e.bubbles,e.cancelable),i.detail=e.detail;else i.initEvent(n,false,false)}t.dispatchEvent(i)}function It(t,n){return function(){return Ht(this,t,n)}}function Rt(t,n){return function(){return Ht(this,t,n.apply(this,arguments))}}function Ut(t,n){return this.each((typeof n==="function"?Rt:It)(t,n))}var Vt=[null];function kt(t,n){this._groups=t;this._parents=n}function Xt(){return new kt([[document.documentElement]],Vt)}kt.prototype=Xt.prototype={constructor:kt,select:l,selectAll:_,filter:v,data:S,enter:m,exit:N,join:E,merge:L,order:C,sort:D,call:q,nodes:B,node:O,size:M,empty:T,each:j,attr:k,style:J,property:Z,classed:at,text:ht,html:vt,raise:mt,lower:wt,append:At,insert:bt,remove:Nt,clone:Ct,datum:Dt,on:zt,dispatch:Ut};function $t(t){return typeof t==="string"?new kt([[document.querySelector(t)]],[document.documentElement]):new kt([[t]],Vt)}var Ft="radh-d3{}";var Gt=function(){function t(t){n(this,t)}t.prototype.componentDidLoad=function(){$t("#parrafo").style("color","green").style("font-size","20px")};t.prototype.render=function(){return e("div",null,e("p",{id:"parrafo"},"Linea de texto que contiene un parrafo en D3"))};return t}();t("radh_d3",Gt);Gt.style=Ft}}}));