diff --git a/.gitignore b/.gitignore
index 40a11da..a7636f8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,7 +5,7 @@
.idea/
*.iml
-### Dependencies ###
+### Misc ###
node_modules/
*.map
.sass-cache
\ No newline at end of file
diff --git a/git-hooks/pre-commit b/git-hooks/pre-commit
index c819412..b4446ae 100755
--- a/git-hooks/pre-commit
+++ b/git-hooks/pre-commit
@@ -11,7 +11,7 @@ jsfiles=$(git diff --staged --name-only --diff-filter=ACM | grep '\.js$')
[ -z "$jsfiles" ] && exit 0
# ESLINT CHECK
-eslintresult=$(./node_modules/.bin/eslint --color $jsfiles)
+eslintresult=$(./node_modules/.bin/eslint --ignore-pattern '/src/lib/*' --color $jsfiles --quiet)
if [[ $eslintresult != "" ]]; then
echo "$eslintresult"
diff --git a/package.json b/package.json
index cb238ca..a963c8b 100644
--- a/package.json
+++ b/package.json
@@ -10,7 +10,7 @@
"prettier": "^1.5.2"
},
"scripts": {
- "install": "ln -s ../../git-hooks/pre-commit .git/hooks/pre-commit"
+ "install": "ln -sf ../../git-hooks/pre-commit .git/hooks/pre-commit"
},
"repository": {
"type": "git",
diff --git a/src/lib/inlet.min.js b/src/lib/inlet.min.js
index 47ae4b9..942dc7a 100644
--- a/src/lib/inlet.min.js
+++ b/src/lib/inlet.min.js
@@ -1,2 +1,2 @@
-// Generated by CoffeeScript 1.10.0
-if(function(){var t,e,r,n,o,i,s,a,l,u,c,h,d=[].slice;s=function(t,e,r){return r=0>r?r+1:r>1?r-1:r,1>6*r?t+(e-t)*r*6:1>2*r?e:2>3*r?t+(e-t)*(.66666-r)*6:t},i=function(t,e,r){var n,o;return o=.5>=r?r*(e+1):r+e-r*e,n=2*r-o,{r:s(n,o,t+.33333),g:s(n,o,t),b:s(n,o,t-.33333)}},c=function(t,e,r){var n,o,i,s,a,l,u;return s=Math.max(t,e,r),a=Math.min(t,e,r),n=s-a,u=s+a,o=a===s?0:t===s?(60*(e-r)/n+360)%360:e===s?60*(r-t)/n+120:60*(t-e)/n+240,i=u/2,l=0===i?0:1===i?1:.5>=i?n/u:n/(2-u),{h:o,s:l,l:i}},o=function(t,e,r,o){return null!=o?"hsla("+n(Math.round(180*t/Math.PI),360)+","+Math.round(100*e)+"%,"+Math.round(100*r)+"%,"+o+")":"hsl("+n(Math.round(180*t/Math.PI),360)+","+Math.round(100*e)+"%,"+Math.round(100*r)+"%)"},r=function(t){var e,r,n,o,i,s;return s=document.createElement("span"),document.body.appendChild(s),s.style.backgroundColor=t,i=getComputedStyle(s).backgroundColor,document.body.removeChild(s),n=/^rgb\((\d+), (\d+), (\d+)\)$/.exec(i),n||(n=/^rgba\((\d+), (\d+), (\d+), ([\d.]+)\)$/.exec(i)),o=parseInt(n[1]),r=parseInt(n[2]),e=parseInt(n[3]),n[4]?{r:o/255,g:r/255,b:e/255,a:parseFloat(n[4])}:{r:o/255,g:r/255,b:e/255}},a=function(t){var e,r;return r=document.createElement("span"),document.body.appendChild(r),r.style.backgroundColor=t,e=r.style.backgroundColor.length>0,r.remove(),e},h=function(t,e){var r,n;for(r in e)n=e[r],t.style[r]=n;return t},n=function(t,e){return t%=e,0>t&&(t+=e),t},l=function(t,e,r){return e+(r-e)*Math.min(1,Math.max(0,t))},t=function(){function t(t,e,r){var n,o,s,a,l,u,c,h,d,p,f,m,v,g,b,y,x,M,w,C,k;for(this.radius=t,this.width=e,this.lightness=r,g=this.radius,w=this.width,o=this.canvas=document.createElement("canvas"),o.width=o.height=2*g,s=o.getContext("2d"),f=s.createImageData(o.width,o.height),l=f.data,k=p=0,b=o.height;b>=0?b>p:p>b;k=b>=0?++p:--p)for(C=m=0,y=o.width;y>=0?y>m:m>y;C=y>=0?++m:--m)c=k-g,u=C-g,a=Math.sqrt(c*c+u*u),a>g+1.5||(a-=10,M=Math.max(0,Math.min(1,a/(g-w/2-10))),d=Math.atan2(c,u)/(2*Math.PI),x=i(d,M,this.lightness),v=x.r,h=x.g,n=x.b,l[4*(k*o.width+C)+0]=255*v,l[4*(k*o.width+C)+1]=255*h,l[4*(k*o.width+C)+2]=255*n,l[4*(k*o.width+C)+3]=255);s.putImageData(f,0,0)}return t.prototype.drawHSLCircle=function(t,e){var r,n,o,i;return t.width=t.height=2*this.radius,r=t.getContext("2d"),i=this.width,o=this.radius,n=l(e,i,o),r.save(),r.fillStyle="rgba(0,0,0,0.3)",r.beginPath(),r.arc(o,o,o,0,2*Math.PI),r.fill(),r.fillStyle="black",r.beginPath(),r.arc(o,o,n,0,2*Math.PI),r.arc(o,o,n-i,0,2*Math.PI,!0),r.fill(),r.globalCompositeOperation="source-in",r.drawImage(this.canvas,0,0),r.restore()},t}(),u=function(t){return"string"==typeof t&&(t=r(t)),null!=t.r&&null!=t.g&&null!=t.b?(t=c(t.r,t.g,t.b),t.h=t.h*Math.PI/180):null!=t.h&&null!=t.s&&null!=t.l&&(t.h=t.h*Math.PI/180),t},e=function(){function e(t){this.color=u(t),this.refColor=this.color,this.el=v(),this.circleContainer=this.el.appendChild(a.call(this)),this.lSlider=this.el.appendChild(m.call(this)),this.colorPreview=this.el.appendChild(p.call(this)),s.call(this),this.setLightness(this.color.l)}var s,a,p,f,m,v,g,b;return g=80,b=25,e.prototype.setHue=function(t){var e,r,n;return this.color.h=t,n=l(this.color.s,b,g)-b/2,r=g-b/2,h(this.hueKnob,{left:Math.round(r+Math.cos(t)*n+6-1)+"px",top:Math.round(r+Math.sin(t)*n+6-1)+"px"}),this.colorPreview.style.backgroundColor=this.lKnob.style.backgroundColor=this.hueKnob.style.backgroundColor=o(this.color.h,this.color.s,this.color.l),e=o(this.color.h,this.color.s,.5),this.lSlider.style.backgroundImage="-webkit-linear-gradient(bottom, black, "+e+" 50%, white)",this.lSlider.style.backgroundImage="-moz-linear-gradient(bottom, black, "+e+" 50%, white)",this.emit("changed")},e.prototype.setSaturation=function(t){return this.color.s=t,this.circle.drawHSLCircle(this.circleCanvas,t),this.setHue(this.color.h)},e.prototype.setLightness=function(e){return this.color.l=e,this.circle=new t(g,b,e),this.lKnob.style.top=(1-e)*this.lSlider._height-11+"px",this.setSaturation(this.color.s)},e.prototype.setHSL=function(t,e,r){return this.color.h=n(t,360)*Math.PI/180,this.color.s=Math.max(0,Math.min(1,e)),r=Math.max(0,Math.min(1,r)),this.setLightness(r)},e.prototype.getHSL=function(){return{h:n(180*this.color.h/Math.PI,360),s:this.color.s,l:this.color.l}},e.prototype.setRGB=function(t,e,r){var n,o,i,s;return i=c(t,e,r),n=i.h,s=i.s,o=i.l,this.setHSL(n,s,o)},e.prototype.getRGB=function(){return i(this.color.h/(2*Math.PI),this.color.s,this.color.l)},e.prototype.getCSS=function(){return o(this.color.h,this.color.s,this.color.l)},e.prototype.setCSS=function(t){var e,n,o,i;return i=r(t),o=i.r,n=i.g,e=i.b,this.setRGB(o,n,e)},e.prototype.on=function(t,e){var r;return null==this._listeners&&(this._listeners={}),(null!=(r=this._listeners)[t]?r[t]:r[t]=[]).push(e)},e.prototype.emit=function(){var t,e,r,n,o,i,s,a;if(e=arguments[0],t=2<=arguments.length?d.call(arguments,1):[],this._listeners){for(s=null!=(i=this._listeners[e])?i:[],a=[],r=0,o=s.length;o>r;r++)n=s[r],a.push(n.call.apply(n,[this].concat(d.call(t))));return a}},e.prototype.removeListener=function(t,e){var r;return this._listeners[t]?this._listeners[t]=function(){var n,o,i,s;for(i=this._listeners[t],s=[],n=0,o=i.length;o>n;n++)r=i[n],r!==e&&s.push(r);return s}.call(this):void 0},s=function(){var t,e;return this.lKnob.onmousedown=function(t){return function(e){var r,n;return document.documentElement.style.cursor="pointer",window.addEventListener("mousemove",r=function(e){var r,n;return r=t.lSlider.getBoundingClientRect(),n=e.clientY-r.top,t.setLightness(Math.max(0,Math.min(1,1-n/t.lSlider._height)))}),window.addEventListener("mouseup",n=function(t){return window.removeEventListener("mousemove",r),window.removeEventListener("mouseup",n),window.removeEventListener("blur",n),document.documentElement.style.cursor=""}),window.addEventListener("blur",n),e.preventDefault(),e.stopPropagation()}}(this),t=this.circleContainer,e=function(e){return function(r){var n,o,i,s,a,u,c;return u=r.layerX,c=r.layerY,o=u-g,i=c-g,n=Math.sqrt(o*o+i*i),a=Math.atan2(i,o),s=l(e.color.s,b,g),n>s-b&&s>n?-Math.PI/8=7*Math.PI/8||a<=-7*Math.PI/8?t.style.cursor="ew-resize":Math.PI/8<=a&&a<3*Math.PI/8||-7*Math.PI/8a-b&&a>n?(document.documentElement.style.cursor=t.style.cursor,window.addEventListener("mousemove",s=function(t){var r,s,l;return a=e.circleCanvas.getBoundingClientRect(),r=a.left+a.width/2,s=a.top+a.height/2,o=t.clientX-r,i=t.clientY-s,n=Math.sqrt(o*o+i*i),n-=10,l=Math.max(0,Math.min(1,n/(g-b/2-10))),e.setSaturation(l)}),window.addEventListener("mouseup",c=function(t){return window.removeEventListener("mousemove",s),window.removeEventListener("mouseup",c),window.removeEventListener("blur",c),document.documentElement.style.cursor=""}),window.addEventListener("blur",c)):void 0}}(this)),this.hueKnob.onmousedown=function(t){return function(e){var r,n;return document.documentElement.style.cursor="pointer",window.addEventListener("mousemove",r=function(e){var r,n,o;return o=t.circleCanvas.getBoundingClientRect(),r=o.left+o.width/2,n=o.top+o.height/2,t.setHue(Math.atan2(e.clientY-n,e.clientX-r))}),window.addEventListener("mouseup",n=function(t){return window.removeEventListener("mousemove",r),window.removeEventListener("mouseup",n),window.removeEventListener("blur",n),document.documentElement.style.cursor=""}),window.addEventListener("blur",n),e.preventDefault(),e.stopPropagation()}}(this)},v=function(){var t;return t=document.createElement("div"),t.className="picker",h(t,{display:"inline-block",background:"hsl(0, 0%, 97%)",padding:"6px",borderRadius:"6px",boxShadow:"1px 1px 5px hsla(0, 0%, 39%, 0.2), hsla(0, 0%, 100%, 0.9) 0px 0px 1em 0.3em inset",border:"1px solid hsla(0, 0%, 59%, 0.2)",position:"absolute",backgroundImage:"-webkit-linear-gradient(left top, hsla(0, 0%, 0%, 0.05) 25%, transparent 25%, transparent 50%, hsla(0, 0%, 0%, 0.05) 50%, hsla(0, 0%, 0%, 0.05) 75%, transparent 75%, transparent)",backgroundSize:"40px 40px"}),h(t,{backgroundImage:"-moz-linear-gradient(left top, hsla(0, 0%, 0%, 0.05) 25%, transparent 25%, transparent 50%, hsla(0, 0%, 0%, 0.05) 50%, hsla(0, 0%, 0%, 0.05) 75%, transparent 75%, transparent)",zIndex:"1000"}),t},a=function(){var t,e;return t=document.createElement("div"),h(t,{display:"inline-block",width:2*g+"px",height:2*g+"px",borderRadius:g+"px",boxShadow:"0px 0px 7px rgba(0,0,0,0.3)"}),t.appendChild(this.circleCanvas=document.createElement("canvas")),this.hueKnob=e=f(27),t.appendChild(e),t},m=function(){var t,e;return e=document.createElement("div"),h(e,{display:"inline-block",width:"20px",height:2*g-22+"px",marginLeft:"6px",borderRadius:"10px",boxShadow:"hsla(0, 100%, 100%, 0.1) 0 1px 2px 1px inset, hsla(0, 100%, 100%, 0.2) 0 1px inset, hsla(0, 0%, 0%, 0.4) 0 -1px 1px inset, hsla(0, 0%, 0%, 0.4) 0 1px 1px",position:"relative",top:"-11px"}),e._height=2*g-22,this.lKnob=t=f(22),h(t,{left:"-1px"}),e.appendChild(t),e},p=function(){var t,e,r;return t=document.createElement("div"),e=o(this.refColor.h,this.refColor.s,this.refColor.l),r=o(this.refColor.h,this.refColor.s,this.refColor.l,0),h(t,{boxShadow:"hsla(0, 0%, 0%, 0.5) 0 1px 5px, hsla(0, 100%, 100%, 0.4) 0 1px 1px inset, hsla(0, 0%, 0%, 0.3) 0 -1px 1px inset",height:"25px",marginTop:"6px",borderRadius:"3px",backgroundImage:"-webkit-linear-gradient(-20deg, "+r+", "+r+" 69%, "+e+" 70%, "+e+")"}),h(t,{backgroundImage:"-moz-linear-gradient(-20deg, "+r+", "+r+" 69%, "+e+" 70%, "+e+")"}),t},f=function(t){var e;return e=document.createElement("div"),e.className="knob",h(e,{position:"absolute",width:t+"px",height:t+"px",backgroundColor:"red",borderRadius:Math.floor(t/2)+"px",cursor:"pointer",backgroundImage:"-webkit-gradient(radial, 50% 0%, 0, 50% 0%, 15, color-stop(0%, rgba(255, 255, 255, 0.8)), color-stop(100%, rgba(255, 255, 255, 0.2)))",boxShadow:"white 0px 1px 1px inset, rgba(0, 0, 0, 0.4) 0px -1px 1px inset, rgba(0, 0, 0, 0.4) 0px 1px 4px 0px, rgba(0, 0, 0, 0.6) 0 0 2px"}),h(e,{backgroundImage:"radial-gradient(circle at center top, rgba(255,255,255,0.8), rgba(255, 255, 255, 0.2) 15px"}),e},e.prototype.presentModal=function(t,e){var r;return h(this.el,{left:t+"px",top:e-10+"px",opacity:"0",webkitTransition:"0.15s",MozTransition:"0.15s"}),r=document.createElement("div"),r.style.position="fixed",r.style.top=r.style.left=r.style.bottom=r.style.right="0",r.style.zIndex="999",r.onclick=function(t){return function(){var n;return document.body.removeChild(r),t.el.style.top=e+10+"px",t.el.style.opacity=0,n=function(){return document.body.removeChild(t.el),t.el.removeEventListener("webkitTransitionEnd",n),t.el.removeEventListener("transitionend",n)},t.el.addEventListener("webkitTransitionEnd",n),t.el.addEventListener("transitionend",n),t.emit("closed")}}(this),document.body.appendChild(r),document.body.appendChild(this.el),this.el.offsetHeight,this.el.style.opacity="1",this.el.style.top=e+"px",this},e.prototype.presentModalBeneath=function(t){var e,r,n;return e=t.getBoundingClientRect(),r=e.left+window.scrollX,n=e.bottom+window.scrollY+4,this.presentModal(r,n)},e}(),window.thistle={Picker:e,isValidCSSColor:a}}.call(this),"undefined"==typeof Color)var Color={};"undefined"==typeof Color.Space&&(Color.Space={}),function(){"use strict";var useEval=!1,functions={},shortcuts={"HEX24>HSL":"HEX24>RGB>HSL","HEX32>HSLA":"HEX32>RGBA>HSLA","HEX24>CMYK":"HEX24>RGB>CMY>CMYK","RGB>CMYK":"RGB>CMY>CMYK"},root=Color.Space=function(color,route){shortcuts[route]&&(route=shortcuts[route]);var r=route.split(">");if("object"==typeof color&&color[0]>=0){for(var type=r[0],tmp={},i=0;i1&&(key=key.substr(key.indexOf("_")+1)),key+=(0===pos?"":"_")+r[pos],color=root[key](color),useEval&&(f="Color.Space."+key+"("+f+")");return useEval&&(functions[route]=eval("(function(color) { return "+f+" })")),color};root.RGB_W3=function(t){return"rgb("+(t.R>>0)+","+(t.G>>0)+","+(t.B>>0)+")"},root.RGBA_W3=function(t){var e="number"==typeof t.A?t.A/255:1;return"rgba("+(t.R>>0)+","+(t.G>>0)+","+(t.B>>0)+","+e+")"},root.W3_RGB=function(t){return t=t.substr(4,t.length-5).split(","),{R:parseInt(t[0],10),G:parseInt(t[1],10),B:parseInt(t[2],10)}},root.W3_RGBA=function(t){return t=t.substr(5,t.length-6).split(","),{R:parseInt(t[0],10),G:parseInt(t[1],10),B:parseInt(t[2],10),A:255*parseFloat(t[3])}},root.HSL_W3=function(t){return"hsl("+(t.H+.5>>0)+","+(t.S+.5>>0)+"%,"+(t.L+.5>>0)+"%)"},root.HSLA_W3=function(t){var e="number"==typeof t.A?t.A/255:1;return"hsla("+(t.H+.5>>0)+","+(t.S+.5>>0)+"%,"+(t.L+.5>>0)+"%,"+e+")"},root.W3_HSL=function(t){var e=t.indexOf("(")+1,r=t.indexOf(")");return t=t.substr(e,r-e).split(","),{H:parseInt(t[0],10),S:parseInt(t[1],10),L:parseInt(t[2],10)}},root.W3_HSLA=function(t){var e=t.indexOf("(")+1,r=t.indexOf(")");return t=t.substr(e,r-e).split(","),{H:parseInt(t[0],10),S:parseInt(t[1],10),L:parseInt(t[2],10),A:255*parseFloat(t[3],10)}},root.W3_HEX=root.W3_HEX24=function(t){return"#"===t.substr(0,1)&&(t=t.substr(1)),3===t.length&&(t=t[0]+t[0]+t[1]+t[1]+t[2]+t[2]),parseInt("0x"+t,16)},root.W3_HEX32=function(t){return"#"===t.substr(0,1)&&(t=t.substr(1)),6===t.length?parseInt("0xFF"+t,10):parseInt("0x"+t,16)},root.HEX_W3=root.HEX24_W3=function(t,e){e||(e=6),t||(t=0);var r,n=t.toString(16);for(r=n.length;e>r;)n="0"+n,r++;for(r=n.length;r>e;)n=n.substr(1),r--;return"#"+n},root.HEX32_W3=function(t){return root.HEX_W3(t,8)},root.HEX_RGB=root.HEX24_RGB=function(t){return{R:t>>16,G:t>>8&255,B:255&t}},root.HEX32_RGBA=function(t){return{R:t>>>16&255,G:t>>>8&255,B:255&t,A:t>>>24}},root.RGBA_HEX32=function(t){return(t.A<<24|t.R<<16|t.G<<8|t.B)>>>0},root.RGB_HEX24=root.RGB_HEX=function(t){return t.R<0&&(t.R=0),t.G<0&&(t.G=0),t.B<0&&(t.B=0),t.R>255&&(t.R=255),t.G>255&&(t.G=255),t.B>255&&(t.B=255),t.R<<16|t.G<<8|t.B},root.RGB_CMY=function(t){return{C:1-t.R/255,M:1-t.G/255,Y:1-t.B/255}},root.RGBA_HSLA=root.RGB_HSL=function(t){var e,r,n=t.R/255,o=t.G/255,i=t.B/255,s=Math.min(n,o,i),a=Math.max(n,o,i),l=a-s,u=(a+s)/2;if(0===l)e=0,r=0;else{r=.5>u?l/(a+s):l/(2-a-s);var c=((a-n)/6+l/2)/l,h=((a-o)/6+l/2)/l,d=((a-i)/6+l/2)/l;n===a?e=d-h:o===a?e=1/3+c-d:i===a&&(e=2/3+h-c),0>e&&(e+=1),e>1&&(e-=1)}return{H:360*e,S:100*r,L:100*u,A:t.A}},root.RGBA_HSVA=root.RGB_HSV=function(t){var e,r,n=t.R/255,o=t.G/255,i=t.B/255,s=Math.min(n,o,i),a=Math.max(n,o,i),l=a-s,u=a;if(0===l)e=0,r=0;else{r=l/a;var c=((a-n)/6+l/2)/l,h=((a-o)/6+l/2)/l,d=((a-i)/6+l/2)/l;n===a?e=d-h:o===a?e=1/3+c-d:i===a&&(e=2/3+h-c),0>e&&(e+=1),e>1&&(e-=1)}return{H:360*e,S:100*r,V:100*u,A:t.A}},root.CMY_RGB=function(t){return{R:Math.max(0,255*(1-t.C)),G:Math.max(0,255*(1-t.M)),B:Math.max(0,255*(1-t.Y))}},root.CMY_CMYK=function(t){var e=t.C,r=t.M,n=t.Y,o=Math.min(n,Math.min(r,Math.min(e,1)));return e=Math.round((e-o)/(1-o)*100),r=Math.round((r-o)/(1-o)*100),n=Math.round((n-o)/(1-o)*100),o=Math.round(100*o),{C:e,M:r,Y:n,K:o}},root.CMYK_CMY=function(t){return{C:t.C*(1-t.K)+t.K,M:t.M*(1-t.K)+t.K,Y:t.Y*(1-t.K)+t.K}},root.HSLA_RGBA=root.HSL_RGB=function(t){var e,r,n,o,i,s,a=t.H/360,l=t.S/100,u=t.L/100;return 0===l?e=r=n=u:(i=.5>u?u*(1+l):u+l-l*u,o=2*u-i,s=a+1/3,0>s&&(s+=1),s>1&&(s-=1),e=1>6*s?o+6*(i-o)*s:1>2*s?i:2>3*s?o+(i-o)*(2/3-s)*6:o,s=a,0>s&&(s+=1),s>1&&(s-=1),r=1>6*s?o+6*(i-o)*s:1>2*s?i:2>3*s?o+(i-o)*(2/3-s)*6:o,s=a-1/3,0>s&&(s+=1),s>1&&(s-=1),n=1>6*s?o+6*(i-o)*s:1>2*s?i:2>3*s?o+(i-o)*(2/3-s)*6:o),{R:255*e,G:255*r,B:255*n,A:t.A}},root.HSVA_RGBA=root.HSV_RGB=function(t){var e,r,n,o,i,s,a=t.H/360,l=t.S/100,u=t.V/100;if(0===l)e=r=n=Math.round(255*u);else switch(a>=1&&(a=0),a=6*a,o=a-Math.floor(a),i=Math.round(255*u*(1-l)),n=Math.round(255*u*(1-l*o)),s=Math.round(255*u*(1-l*(1-o))),u=Math.round(255*u),Math.floor(a)){case 0:e=u,r=s,n=i;break;case 1:e=n,r=u,n=i;break;case 2:e=i,r=u,n=s;break;case 3:e=i,r=n,n=u;break;case 4:e=s,r=i,n=u;break;case 5:e=u,r=i,n=n}return{R:e,G:r,B:n,A:t.A}}}(),Inlet=function(){function t(t,r){function n(t){var e=String(u.checked),r=c.getCursor(!0),n=a(r,"boolean");if(n){var o={line:r.line,ch:n.start},i={line:r.line,ch:n.end};c.replaceRange(e,o,i)}}function o(t){t.target!==k&&t.target!==w&&t.target!==u&&(w.style.visibility="hidden")}function i(){1==arguments.length?event=arguments[0]:event=arguments[1],event.keyCode==E||event.keyCode==I?event.altKey&&s():(event.keyCode==L||event.keyCode==S)&&event.altKey&&s()}function s(t){if(!c.somethingSelected()){k=t.target;var r=c.getCursor(!0);c.getTokenAt(r);cursorOffset=c.cursorCoords(!0,"page");var o=c.cursorCoords(!0,y).left,i=(a(r,"number"),a(r,"hsl")),s=a(r,"hex"),h=a(r,"rgb"),b=a(r,"boolean"),x=cursorOffset.top-d;cursorOffset.topHSL>RGB>HEX24>W3"),R(picked,"hex")})}else if(i){var C=i.string;l=new thistle.Picker(C),l.setCSS(C),l.presentModal(M,x),l.on("changed",function(){picked=l.getCSS(),R(picked,"hsl")})}else if(h){var C=h.string;l=new thistle.Picker(C),l.setCSS(C),l.presentModal(M,x),l.on("changed",function(){picked=l.getCSS(),picked=Color.Space(picked,"W3>HSL>RGB>W3"),R(picked,"rgb")})}else if(b){var E=cursorOffset.top-v,S=window.getComputedStyle(w),L=e(S.width),I=o-L/2+g,H=JSON.parse(b.string);H?(w.removeChild(u),u=document.createElement("input"),u.className="checkbox",u.setAttribute("type","checkbox"),u.setAttribute("checked","checked"),u.addEventListener("change",n),w.appendChild(u)):(w.removeChild(u),u=document.createElement("input"),u.className="checkbox",u.setAttribute("type","checkbox"),u.addEventListener("change",n),w.appendChild(u)),w.style.top=E-3+"px",w.style.left=I+"px",w.style.visibility="visible"}}}function a(t,e){if(e){var r;switch(e.toLowerCase()){case"boolean":r=/true|false/g;break;case"hsl":r=/hsla?\(\s*(\d{1,3})\s*,\s*(\d{1,3}\%)\s*,\s*(\d{1,3}\%)\s*(?:\s*,\s*(\d+(?:\.\d+)?)\s*)?\)/g;break;case"rgb":r=/rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)/g;break;case"hex":r=/#[a-fA-F0-9]{3,6}/g;break;case"number":r=/[-]?\.?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?/g;break;default:throw new Error("invalid match selection")}for(var n=c.getLine(t.line),o=r.exec(n);o;){var i=o[0],s=i.length,a=o.index,l=o.index+s;if(t.ch>=a&&t.ch<=l)return o=null,{start:a,end:l,string:i};o=r.exec(n)}}}var l,u,c=t;r||(r={}),r.picker||(r.picker={}),r.slider||(r.slider={}),r.clicker||(r.clicker={});var h=r.container||document.body,d=r.picker.topOffset||220,p=r.picker.bottomOffset||16,f=r.picker.topBoundary||250,m=r.picker.leftOffset||75,v=r.slider.yOffset||15,g=r.slider.xOffset||0,b=r.slider.width,y=r.horizontalMode||"page",x=r.fixedContainer,M=(r.slider.callback||function(t){},r.picker.callback||function(t){},r.clicker.callback||function(t){},c.getWrapperElement());M.addEventListener("mouseup",s),document.body.addEventListener("mouseup",o),c.setOption("onKeyEvent",i);var w=document.createElement("div");w.className="inlet_clicker",w.style.visibility="hidden",w.style.position="absolute",h.appendChild(w);var u=document.createElement("input");u.className="checkbox",u.setAttribute("type","checkbox"),u.addEventListener("change",n),w.appendChild(u);var C=document.createElement("div");C.className="inlet_slider",C.style.visibility="hidden",b&&(C.style.width=b),x?C.style.position="fixed":C.style.position="absolute",C.style.top=0;var k,E=37,S=38,L=39,I=40,R=function(t,e){var r=c.getCursor();if(e){var n=a(r,e),o={line:r.line,ch:n.start},i={line:r.line,ch:n.end};c.picking=!0,c.replaceRange(t,o,i),setTimeout(function(){c.picking=!1},100)}};l=new thistle.Picker("#ffffff")}function e(t){var e=0;return t.length>2&&(e=parseFloat(t.slice(0,t.length-2))),e||(e=0),e}return t}();
\ No newline at end of file
+// Generated by CoffeeScript 1.12.7
+((function(){var a,b,c,d,e,f,g,h,i,j,k,l,m=[].slice;g=function(a,b,c){return c=c<0?c+1:c>1?c-1:c,c*6<1?a+(b-a)*c*6:c*2<1?b:c*3<2?a+(b-a)*(.66666-c)*6:a},f=function(a,b,c){var d,e;return e=c<=.5?c*(b+1):c+b-c*b,d=c*2-e,{r:g(d,e,a+.33333),g:g(d,e,a),b:g(d,e,a-.33333)}},k=function(a,b,c){var d,e,f,g,h,i,j;return g=Math.max(a,b,c),h=Math.min(a,b,c),d=g-h,j=g+h,e=h===g?0:a===g?(60*(b-c)/d+360)%360:b===g?60*(c-a)/d+120:60*(a-b)/d+240,f=j/2,i=f===0?0:f===1?1:f<=.5?d/j:d/(2-j),{h:e,s:i,l:f}},e=function(a,b,c,e){return e!=null?"hsla("+d(Math.round(a*180/Math.PI),360)+","+Math.round(b*100)+"%,"+Math.round(c*100)+"%,"+e+")":"hsl("+d(Math.round(a*180/Math.PI),360)+","+Math.round(b*100)+"%,"+Math.round(c*100)+"%)"},c=function(a){var b,c,d,e,f,g;return g=document.createElement("span"),document.body.appendChild(g),g.style.backgroundColor=a,f=getComputedStyle(g).backgroundColor,document.body.removeChild(g),d=/^rgb\((\d+), (\d+), (\d+)\)$/.exec(f),d||(d=/^rgba\((\d+), (\d+), (\d+), ([\d.]+)\)$/.exec(f)),e=parseInt(d[1]),c=parseInt(d[2]),b=parseInt(d[3]),d[4]?{r:e/255,g:c/255,b:b/255,a:parseFloat(d[4])}:{r:e/255,g:c/255,b:b/255}},h=function(a){var b,c;return c=document.createElement("span"),document.body.appendChild(c),c.style.backgroundColor=a,b=c.style.backgroundColor.length>0,c.remove(),b},l=function(a,b){var c,d;for(c in b)d=b[c],a.style[c]=d;return a},d=function(a,b){return a%=b,a<0&&(a+=b),a},i=function(a,b,c){return b+(c-b)*Math.min(1,Math.max(0,a))},a=function(){function a(a,b,c){var d,e,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y;this.radius=a,this.width=b,this.lightness=c,r=this.radius,w=this.width,e=this.canvas=document.createElement("canvas"),e.width=e.height=r*2,g=e.getContext("2d"),o=g.createImageData(e.width,e.height),i=o.data;for(y=n=0,s=e.height;0<=s?ns;y=0<=s?++n:--n)for(x=p=0,t=e.width;0<=t?pt;x=0<=t?++p:--p){k=y-r,j=x-r,h=Math.sqrt(k*k+j*j);if(h>r+1.5)continue;h-=10,v=Math.max(0,Math.min(1,h/(r-w/2-10))),m=Math.atan2(k,j)/(Math.PI*2),u=f(m,v,this.lightness),q=u.r,l=u.g,d=u.b,i[(y*e.width+x)*4+0]=q*255,i[(y*e.width+x)*4+1]=l*255,i[(y*e.width+x)*4+2]=d*255,i[(y*e.width+x)*4+3]=255}g.putImageData(o,0,0)}return a.prototype.drawHSLCircle=function(a,b){var c,d,e,f;return a.width=a.height=2*this.radius,c=a.getContext("2d"),f=this.width,e=this.radius,d=i(b,f,e),c.save(),c.fillStyle="rgba(0,0,0,0.3)",c.beginPath(),c.arc(e,e,e,0,Math.PI*2),c.fill(),c.fillStyle="black",c.beginPath(),c.arc(e,e,d,0,Math.PI*2),c.arc(e,e,d-f,0,Math.PI*2,!0),c.fill(),c.globalCompositeOperation="source-in",c.drawImage(this.canvas,0,0),c.restore()},a}(),j=function(a){return typeof a=="string"&&(a=c(a)),a.r!=null&&a.g!=null&&a.b!=null?(a=k(a.r,a.g,a.b),a.h=a.h*Math.PI/180):a.h!=null&&a.s!=null&&a.l!=null&&(a.h=a.h*Math.PI/180),a},b=function(){function s(a){this.color=j(a),this.refColor=this.color,this.el=p(),this.circleContainer=this.el.appendChild(g.call(this)),this.lSlider=this.el.appendChild(o.call(this)),this.colorPreview=this.el.appendChild(h.call(this)),b.call(this),this.setLightness(this.color.l)}var b,g,h,n,o,p,q,r;return q=80,r=25,s.prototype.setHue=function(a){var b,c,d;return this.color.h=a,d=i(this.color.s,r,q)-r/2,c=q-r/2,l(this.hueKnob,{left:Math.round(c+Math.cos(a)*d+6-1)+"px",top:Math.round(c+Math.sin(a)*d+6-1)+"px"}),this.colorPreview.style.backgroundColor=this.lKnob.style.backgroundColor=this.hueKnob.style.backgroundColor=e(this.color.h,this.color.s,this.color.l),b=e(this.color.h,this.color.s,.5),this.lSlider.style.backgroundImage="-webkit-linear-gradient(bottom, black, "+b+" 50%, white)",this.lSlider.style.backgroundImage="-moz-linear-gradient(bottom, black, "+b+" 50%, white)",this.emit("changed")},s.prototype.setSaturation=function(a){return this.color.s=a,this.circle.drawHSLCircle(this.circleCanvas,a),this.setHue(this.color.h)},s.prototype.setLightness=function(b){return this.color.l=b,this.circle=new a(q,r,b),this.lKnob.style.top=(1-b)*this.lSlider._height-11+"px",this.setSaturation(this.color.s)},s.prototype.setHSL=function(a,b,c){return this.color.h=d(a,360)*Math.PI/180,this.color.s=Math.max(0,Math.min(1,b)),c=Math.max(0,Math.min(1,c)),this.setLightness(c)},s.prototype.getHSL=function(){return{h:d(this.color.h*180/Math.PI,360),s:this.color.s,l:this.color.l}},s.prototype.setRGB=function(a,b,c){var d,e,f,g;return f=k(a,b,c),d=f.h,g=f.s,e=f.l,this.setHSL(d,g,e)},s.prototype.getRGB=function(){return f(this.color.h/(Math.PI*2),this.color.s,this.color.l)},s.prototype.getCSS=function(){return e(this.color.h,this.color.s,this.color.l)},s.prototype.setCSS=function(a){var b,d,e,f;return f=c(a),e=f.r,d=f.g,b=f.b,this.setRGB(e,d,b)},s.prototype.on=function(a,b){var c;return this._listeners==null&&(this._listeners={}),((c=this._listeners)[a]!=null?c[a]:c[a]=[]).push(b)},s.prototype.emit=function(){var a,b,c,d,e,f,g,h;b=arguments[0],a=2<=arguments.length?m.call(arguments,1):[];if(this._listeners){g=(f=this._listeners[b])!=null?f:[],h=[];for(c=0,e=g.length;c=7*Math.PI/8||h<=-7*Math.PI/8)return a.style.cursor="ew-resize";if(Math.PI/8<=h&&h<3*Math.PI/8||-7*Math.PI/8HSL":"HEX24>RGB>HSL","HEX32>HSLA":"HEX32>RGBA>HSLA","HEX24>CMYK":"HEX24>RGB>CMY>CMYK","RGB>CMYK":"RGB>CMY>CMYK"},root=Color.Space=function(color,route){shortcuts[route]&&(route=shortcuts[route]);var r=route.split(">");if(typeof color=="object"&&color[0]>=0){var type=r[0],tmp={};for(var i=0;i1&&(key=key.substr(key.indexOf("_")+1)),key+=(pos===0?"":"_")+r[pos],color=root[key](color),useEval&&(f="Color.Space."+key+"("+f+")");return useEval&&(functions[route]=eval("(function(color) { return "+f+" })")),color};root.RGB_W3=function(a){return"rgb("+(a.R>>0)+","+(a.G>>0)+","+(a.B>>0)+")"},root.RGBA_W3=function(a){var b=typeof a.A=="number"?a.A/255:1;return"rgba("+(a.R>>0)+","+(a.G>>0)+","+(a.B>>0)+","+b+")"},root.W3_RGB=function(a){return a=a.substr(4,a.length-5).split(","),{R:parseInt(a[0],10),G:parseInt(a[1],10),B:parseInt(a[2],10)}},root.W3_RGBA=function(a){return a=a.substr(5,a.length-6).split(","),{R:parseInt(a[0],10),G:parseInt(a[1],10),B:parseInt(a[2],10),A:parseFloat(a[3])*255}},root.HSL_W3=function(a){return"hsl("+(a.H+.5>>0)+","+(a.S+.5>>0)+"%,"+(a.L+.5>>0)+"%)"},root.HSLA_W3=function(a){var b=typeof a.A=="number"?a.A/255:1;return"hsla("+(a.H+.5>>0)+","+(a.S+.5>>0)+"%,"+(a.L+.5>>0)+"%,"+b+")"},root.W3_HSL=function(a){var b=a.indexOf("(")+1,c=a.indexOf(")");return a=a.substr(b,c-b).split(","),{H:parseInt(a[0],10),S:parseInt(a[1],10),L:parseInt(a[2],10)}},root.W3_HSLA=function(a){var b=a.indexOf("(")+1,c=a.indexOf(")");return a=a.substr(b,c-b).split(","),{H:parseInt(a[0],10),S:parseInt(a[1],10),L:parseInt(a[2],10),A:parseFloat(a[3],10)*255}},root.W3_HEX=root.W3_HEX24=function(a){return a.substr(0,1)==="#"&&(a=a.substr(1)),a.length===3&&(a=a[0]+a[0]+a[1]+a[1]+a[2]+a[2]),parseInt("0x"+a,16)},root.W3_HEX32=function(a){return a.substr(0,1)==="#"&&(a=a.substr(1)),a.length===6?parseInt("0xFF"+a,10):parseInt("0x"+a,16)},root.HEX_W3=root.HEX24_W3=function(a,b){b||(b=6),a||(a=0);var c,d=a.toString(16);c=d.length;while(cb)d=d.substr(1),c--;return"#"+d},root.HEX32_W3=function(a){return root.HEX_W3(a,8)},root.HEX_RGB=root.HEX24_RGB=function(a){return{R:a>>16,G:a>>8&255,B:a&255}},root.HEX32_RGBA=function(a){return{R:a>>>16&255,G:a>>>8&255,B:a&255,A:a>>>24}},root.RGBA_HEX32=function(a){return(a.A<<24|a.R<<16|a.G<<8|a.B)>>>0},root.RGB_HEX24=root.RGB_HEX=function(a){return a.R<0&&(a.R=0),a.G<0&&(a.G=0),a.B<0&&(a.B=0),a.R>255&&(a.R=255),a.G>255&&(a.G=255),a.B>255&&(a.B=255),a.R<<16|a.G<<8|a.B},root.RGB_CMY=function(a){return{C:1-a.R/255,M:1-a.G/255,Y:1-a.B/255}},root.RGBA_HSLA=root.RGB_HSL=function(a){var b=a.R/255,c=a.G/255,d=a.B/255,e=Math.min(b,c,d),f=Math.max(b,c,d),g=f-e,h,i,j=(f+e)/2;if(g===0)h=0,i=0;else{j<.5?i=g/(f+e):i=g/(2-f-e);var k=((f-b)/6+g/2)/g,l=((f-c)/6+g/2)/g,m=((f-d)/6+g/2)/g;b===f?h=m-l:c===f?h=1/3+k-m:d===f&&(h=2/3+l-k),h<0&&(h+=1),h>1&&(h-=1)}return{H:h*360,S:i*100,L:j*100,A:a.A}},root.RGBA_HSVA=root.RGB_HSV=function(a){var b=a.R/255,c=a.G/255,d=a.B/255,e=Math.min(b,c,d),f=Math.max(b,c,d),g=f-e,h,i,j=f;if(g===0)h=0,i=0;else{i=g/f;var k=((f-b)/6+g/2)/g,l=((f-c)/6+g/2)/g,m=((f-d)/6+g/2)/g;b===f?h=m-l:c===f?h=1/3+k-m:d===f&&(h=2/3+l-k),h<0&&(h+=1),h>1&&(h-=1)}return{H:h*360,S:i*100,V:j*100,A:a.A}},root.CMY_RGB=function(a){return{R:Math.max(0,(1-a.C)*255),G:Math.max(0,(1-a.M)*255),B:Math.max(0,(1-a.Y)*255)}},root.CMY_CMYK=function(a){var b=a.C,c=a.M,d=a.Y,e=Math.min(d,Math.min(c,Math.min(b,1)));return b=Math.round((b-e)/(1-e)*100),c=Math.round((c-e)/(1-e)*100),d=Math.round((d-e)/(1-e)*100),e=Math.round(e*100),{C:b,M:c,Y:d,K:e}},root.CMYK_CMY=function(a){return{C:a.C*(1-a.K)+a.K,M:a.M*(1-a.K)+a.K,Y:a.Y*(1-a.K)+a.K}},root.HSLA_RGBA=root.HSL_RGB=function(a){var b=a.H/360,c=a.S/100,d=a.L/100,e,f,g,h,i,j;return c===0?e=f=g=d:(d<.5?i=d*(1+c):i=d+c-c*d,h=2*d-i,j=b+1/3,j<0&&(j+=1),j>1&&(j-=1),6*j<1?e=h+(i-h)*6*j:2*j<1?e=i:3*j<2?e=h+(i-h)*(2/3-j)*6:e=h,j=b,j<0&&(j+=1),j>1&&(j-=1),6*j<1?f=h+(i-h)*6*j:2*j<1?f=i:3*j<2?f=h+(i-h)*(2/3-j)*6:f=h,j=b-1/3,j<0&&(j+=1),j>1&&(j-=1),6*j<1?g=h+(i-h)*6*j:2*j<1?g=i:3*j<2?g=h+(i-h)*(2/3-j)*6:g=h),{R:e*255,G:f*255,B:g*255,A:a.A}},root.HSVA_RGBA=root.HSV_RGB=function(a){var b=a.H/360,c=a.S/100,d=a.V/100,e,f,g,h,i,j;if(c===0)e=f=g=Math.round(d*255);else{b>=1&&(b=0),b=6*b,h=b-Math.floor(b),i=Math.round(255*d*(1-c)),g=Math.round(255*d*(1-c*h)),j=Math.round(255*d*(1-c*(1-h))),d=Math.round(255*d);switch(Math.floor(b)){case 0:e=d,f=j,g=i;break;case 1:e=g,f=d,g=i;break;case 2:e=i,f=d,g=j;break;case 3:e=i,f=g,g=d;break;case 4:e=j,f=i,g=d;break;case 5:e=d,f=i,g=g}}return{R:e,G:f,B:g,A:a.A}}}(),Inlet=function(){function a(a,c){function w(a){var b=String(g.checked),c=d.getCursor(!0),e=L(c,"boolean");if(!e)return;var f={line:c.line,ch:e.start},h={line:c.line,ch:e.end};d.replaceRange(b,f,h)}function z(a){var b=String(e.value),c=d.getCursor(!0),f=L(c,"number");if(!f)return;var g={line:c.line,ch:f.start},h={line:c.line,ch:f.end};d.dragging=!0,d.replaceRange(b,g,h)}function A(a){e.value=0;var b=d.getCursor(!0),c=L(b,"number");if(!c)return;var f=parseFloat(c.string),g=K(f);e.setAttribute("value",f),e.setAttribute("step",g.step),e.setAttribute("min",g.min),e.setAttribute("max",g.max),e.value=f,d.dragging=!1}function C(a){if(a.target===B||a.target===x||a.target===e||a.target===v||a.target===g)return;x.style.visibility="hidden",v.style.visibility="hidden"}function H(){arguments.length==1?event=arguments[0]:event=arguments[1];if(event.keyCode==D||event.keyCode==G){if(x.style.visibility==="visible")return e.stepDown(1),z(),!0;event.altKey&&J()}else if(event.keyCode==F||event.keyCode==E){if(x.style.visibility==="visible")return e.stepUp(1),z(),!0;event.altKey&&J()}else x.style.visibility="hidden"}function J(a){if(d.somethingSelected())return;B=a.target;var c=d.getCursor(!0),h=d.getTokenAt(c);cursorOffset=d.cursorCoords(!0,"page");var o=d.cursorCoords(!0,p).left,q=L(c,"number"),r=L(c,"hsl"),s=L(c,"hex"),t=L(c,"rgb"),u=L(c,"boolean"),y=cursorOffset.top-i;cursorOffset.topHSL>RGB>HEX24>W3"),I(picked,"hex")})}else if(r){var A=r.string;f=new thistle.Picker(A),f.setCSS(A),f.presentModal(z,y),f.on("changed",function(){picked=f.getCSS(),I(picked,"hsl")})}else if(t){var A=t.string;f=new thistle.Picker(A),f.setCSS(A),f.presentModal(z,y),f.on("changed",function(){picked=f.getCSS(),picked=Color.Space(picked,"W3>HSL>RGB>W3"),I(picked,"rgb")})}}function K(a){var b,c,d,e;return a===0?b=[-100,100]:b=[-a*3,a*5],b[0]20?c=1:c=(max-min)/200,{min:min,max:max,step:c}}function L(a,b){if(!b)return;var c;switch(b.toLowerCase()){case"boolean":c=/true|false/g;break;case"hsl":c=/hsla?\(\s*(\d{1,3})\s*,\s*(\d{1,3}\%)\s*,\s*(\d{1,3}\%)\s*(?:\s*,\s*(\d+(?:\.\d+)?)\s*)?\)/g;break;case"rgb":c=/rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)/g;break;case"hex":c=/#[a-fA-F0-9]{3,6}/g;break;case"number":c=/[-]?\.?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?/g;break;default:throw new Error("invalid match selection")}var e=d.getLine(a.line),f=c.exec(e);while(f){var g=f[0],h=g.length,i=f.index,j=f.index+h;if(a.ch>=i&&a.ch<=j)return f=null,{start:i,end:j,string:g};f=c.exec(e)}return}var d=a,e,f,g;c||(c={}),c.picker||(c.picker={}),c.slider||(c.slider={}),c.clicker||(c.clicker={});var h=c.container||document.body,i=c.picker.topOffset||220,j=c.picker.bottomOffset||16,k=c.picker.topBoundary||250,l=c.picker.leftOffset||75,m=c.slider.yOffset||15,n=c.slider.xOffset||0,o=c.slider.width,p=c.horizontalMode||"page",q=c.fixedContainer,r=c.slider.callback||function(a){},s=c.picker.callback||function(a){},t=c.clicker.callback||function(a){},u=d.getWrapperElement();u.addEventListener("mouseup",J),document.body.addEventListener("mouseup",C),d.setOption("onKeyEvent",H);var v=document.createElement("div");v.className="inlet_clicker",v.style.visibility="hidden",v.style.position="absolute",h.appendChild(v);var g=document.createElement("input");g.className="checkbox",g.setAttribute("type","checkbox"),g.addEventListener("change",w),v.appendChild(g);var x=document.createElement("div");x.className="inlet_slider",x.style.visibility="hidden",o&&(x.style.width=o),q?x.style.position="fixed":x.style.position="absolute",x.style.top=0,h.appendChild(x);var e=document.createElement("input");e.className="range",e.setAttribute("type","range"),e.addEventListener("input",z),e.addEventListener("change",z);var y=navigator.userAgent.toLowerCase().indexOf("firefox")>-1;y||e.addEventListener("mouseup",A),x.appendChild(e);var B,D=37,E=38,F=39,G=40,I=function(a,b){var c=d.getCursor();if(!b)return;var e=L(c,b),f={line:c.line,ch:e.start},g={line:c.line,ch:e.end};d.picking=!0,d.replaceRange(a,f,g),setTimeout(function(){d.picking=!1},100)};f=new thistle.Picker("#ffffff")}function b(a){var b=0;return a.length>2&&(b=parseFloat(a.slice(0,a.length-2))),b||(b=0),b}function c(a){var b=0,c=0;while(a&&!isNaN(a.offsetLeft)&&!isNaN(a.offsetTop))b+=a.offsetLeft-a.scrollLeft,c+=a.offsetTop-a.scrollTop,a=a.offsetParent;return{top:c,left:b}}return a}();