text: var slice$=[].slice;(function(){var parent,ldCover;parent=function(r,s,e){var n;e==null&&(e=document);n=r;while(n&&n!==e){n=n.parentNode}if(n!==e){return null}n=r;while(n&&n!==e&&n.matches&&!n.matches(s)){n=n.parentNode}if(n===e&&(!e.matches||!e.matches(s))){return null}return n};ldCover=function(opt){var ret,cls,that,clicksrc,this$=this;opt==null&&(opt={});this.opt=import$({delay:300,autoZ:true,baseZ:3e3,escape:true,byDisplay:true},opt);this.promises=[];this.root=!opt.root?(ret=document.createElement("div"),ret.innerHTML='<div class="base"></div>',ret):typeof opt.root==="string"?document.querySelector(opt.root):opt.root;cls=typeof opt.type==="string"?opt.type.split(" "):opt.type;if(that=this.root.getAttribute("data-lock")){if(that==="true"){this.opt.lock=true}}this.inner=this.root.querySelector(".inner");this.base=this.root.querySelector(".base");this.root.classList.add.apply(this.root.classList,["ldcv"].concat(cls||[]));if(this.opt.byDisplay){this.root.style.display="none"}clicksrc=null;this.root.addEventListener("mousedown",function(e){return clicksrc=e.target});this.root.addEventListener("click",function(e){var tgt,action;if(clicksrc===this$.root&&!this$.opt.lock){return this$.toggle(false)}tgt=parent(e.target,"*[data-ldcv-set]",this$.root);if(tgt&&(action=tgt.getAttribute("data-ldcv-set"))!=null){if(!parent(tgt,".disabled",this$.root)){return this$.set(action)}}});this.evtHandler={};return this};ldCover.prototype=import$(Object.create(Object.prototype),{append:function(it){var base;base=this.root.childNodes[0];return(base&&base.classList.contains("base")?base:this.root).appendChild(it)},get:function(){var this$=this;return new Promise(function(res,rej){this$.promises.push({res:res,rej:rej});return this$.toggle(true)})},set:function(v,hide){hide==null&&(hide=true);this.promises.splice(0).map(function(p){return p.res(v)});if(hide){return this.toggle(false)}},isOn:function(){return this.root.classList.contains("active")},toggle:function(v){var this$=this;return new Promise(function(res,rej){if(!(v!=null)&&this$.root.classList.contains("running")){return res()}this$.root.classList.add("running");if(this$.opt.byDisplay){this$.root.style.display="block"}return setTimeout(function(){var isActive,esc,z,ref$,idx,r;if(v!=null){this$.root.classList[v?"add":"remove"]("active")}else{this$.root.classList.toggle("active")}isActive=this$.root.classList.contains("active");if(!this$.opt.lock&&this$.opt.escape&&isActive){esc=function(e){if(e.keyCode===27){this$.toggle(false);return document.removeEventListener("keyup",esc)}};document.addEventListener("keyup",esc)}if(this$.opt.animation&&this$.inner){this$.inner.classList[isActive?"add":"remove"].apply(this$.inner.classList,this$.opt.animation.split(" "))}if(this$.opt.autoZ){if(isActive){this$.root.style.zIndex=this$.z=z=((ref$=ldCover.zstack)[ref$.length-1]||this$.opt.baseZ)+1;ldCover.zstack.push(z)}else{idx=ldCover.zstack.indexOf(this$.z);delete this$.z;if(idx<0){this$.root.classList.remove("running");return res()}this$.root.style.zIndex="";r=ldCover.zstack.splice(idx,1)}}if(this$.opt.transformFix&&!isActive){this$.root.classList.remove("shown")}setTimeout(function(){this$.root.classList.remove("running");if(this$.opt.transformFix&&isActive){this$.root.classList.add("shown")}if(!isActive&&this$.opt.byDisplay){return this$.root.style.display="none"}},this$.opt.delay);if(this$.promises.length&&!isActive){this$.set(undefined,false)}this$.fire("toggle."+(isActive?"on":"off"));return res()},50)})},on:function(n,cb){var ref$;return((ref$=this.evtHandler)[n]||(ref$[n]=[])).push(cb)},fire:function(n){var v,i$,ref$,len$,cb,results$=[];v=slice$.call(arguments,1);for(i$=0,len$=(ref$=this.evtHandler[n]||[]).length;i$<len$;++i$){cb=ref$[i$];results$.push(cb.apply(this,v))}return results$}});import$(ldCover,{zstack:[]});if(typeof module!="undefined"&&module!==null){module.exports=ldCover}if(window){return window.ldCover=ldCover}})();function import$(obj,src){var own={}.hasOwnProperty;for(var key in src)if(own.call(src,key))obj[key]=src[key];return obj}var images,html,slice$=[].slice;(function(){var cancel,mouse,CLS;cancel=function(e){e.stopPropagation();return e.preventDefault()};mouse={over:false,start:function(ldcp,type){var list;list=[["selectstart",function(e){return cancel(e)}],["mousemove",function(e){return mouse.move(ldcp,e,type)}],["mouseup",function(e){setTimeout(function(){return mouse.over=false},100);return list.map(function(it){return document.removeEventListener(it[0],it[1])})}]];list.map(function(it){return document.addEventListener(it[0],it[1])});return mouse.over=true},move:function(ldcp,e,type,isClick){isClick==null&&(isClick=false);if(!(e.buttons||isClick)){return}ldcp.setPos(type,e.clientX,e.clientY,true);return cancel(e)}};CLS=function(node,cfg){var k,v,that,pal,ref$,x$,elem,y$,i$,len$,n,j$,this$=this;node==null&&(node=null);cfg==null&&(cfg={});if(typeof node==="string"){node=document.querySelector(node)}cfg=import$({className:"",context:"default",onColorChange:null,onPaletteChange:null,idx:0,palette:null,pinned:false,exclusive:false,inline:null},cfg);if(node){for(k in cfg){v=cfg[k];if(that=node.getAttribute("data-"+k)){cfg[k]=that}}}if(cfg.context==="random"){cfg.context="random-"+Math.random().toString(16)}cfg.idx=isNaN(+cfg.idx)?0:+ +cfg.idx;cfg.className=(cfg.className+" ldColorPicker "+(cfg.inline?[]:"bubble")).split(" ").filter(function(it){return it});["color","palette"].map(function(it){return"on"+it+"change"}).map(function(name){if(typeof cfg[name]==="string"){return cfg[name]=new Function([name],cfg[name])}});pal=cfg.palette;pal=typeof pal==="stirng"?(pal=pal.trim(),pal[0]==="["?{colors:JSON.parse(pal).map(function(it){return ldColor.hsl(it)})}:{colors:pal.split(",").map(function(it){return ldColor.hsl(it.trim())})}):Array.isArray(pal)?{colors:pal.map(function(it){return ldColr.hsl(it)})}:pal;CLS.PalPool.bind(cfg.context,this,pal);ref$=(this.evtHandler={},this.dim={d1:{},d2:{}},this);ref$.idx=cfg.idx;ref$.pinned=cfg.pinned;ref$.context=cfg.context;ref$.exclusive=cfg.exclusive;ref$.inline=cfg.inline;if(cfg.inline){this.toggler=null;this.root=node}else{this.toggler=node;this.root=document.createElement("div");document.body.appendChild(this.root)}x$=this.root;if(!cfg.inline){ref$=x$.style;ref$.position="absolute";ref$.display="none"}x$.classList.add.apply(this.root.classList,cfg.className);x$.innerHTML=html;x$.getColorPicker=function(){return this$};x$.addEventListener("click",function(e){return cancel(e)});this.elem=elem={mask0:".ldcp-hue .ldcp-mask",ptr0:".ldcp-hue .ldcp-ptr-bar",panel0:".ldcp-hue img",mask1:".ldcp-alpha .ldcp-mask",ptr1:".ldcp-alpha .ldcp-ptr-bar",panel1:".ldcp-alpha .ldcp-alpha-img",mask2:".ldcp-2d .ldcp-mask",ptr2:".ldcp-2d .ldcp-ptr-circle",panel2:".ldcp-2d img",d2:".ldcp-2d",d1:".ldcp-1d",btnAdd:".ldcp-cbtn:nth-of-type(1)",btnDel:".ldcp-cbtn:nth-of-type(2)",caret:".ldcp-caret",editGroup:".ldcp-edit-group",colorNone:".ldcp-color-none",idx:".ldcp-idx",pal:".ldcp-palette"};["h","s","l","r","g","b","a","hex"].map(function(it){return elem["in-"+it]=".ldcp-in-"+it});for(k in elem){v=elem[k];elem[k]=this.root.querySelector(v)}this.elem.btnAdd.addEventListener("click",function(e){return this$.addColor()});this.elem.btnDel.addEventListener("click",function(e){return this$.delColor()});this.elem.colorNone.addEventListener("click",function(e){return this$.setAlpha(NaN)});this.elem.pal.addEventListener("click",function(e){var node,idx;node=e.target.classList.contains("ldcp-color")?e.target:e.target.parentNode;idx=Array.from(this$.elem.pal.querySelectorAll(".ldcp-color")).indexOf(node);if(idx>=0){return this$.setIdx(idx)}});this.syncPalette();if(this.toggler){y$=this.toggler;y$.getColorPicker=function(){return this$};y$.addEventListener("click",function(e){setTimeout(function(){return this$.toggle()},0);if(!cfg.exclusive||this$.root.style.display!=="none"){return cancel(e)}});y$.addEventListener("keyup",function(e){var ret;ret=ldColor.hsl(this$.toggler.value);if(!isNaN(ret.h)){return this$.setColor(ret)}});y$.value=ldColor.web(this.getColor());if(this.toggler.nodeName==="INPUT"){y$.setAttribute("autocomplete","off")}}for(i$=0,len$=(ref$=["mask","ptr"]).length;i$<len$;++i$){n=ref$[i$];for(j$=0;j$<=2;++j$){v=j$;fn$(n,v)}}if(cfg.onColorChange){this.on("change",function(it){return cfg.onColorChange.apply(this$.toggler,[it])})}if(cfg.onPaletteChange){this.on("change-palette",function(it){return cfg.onPaletteChange.apply(this$.toggler,[it])})}document.addEventListener("keydown",function(e){if((e.which||e.keyCode)===27&&this$.toggler&&!this$.pinned){return this$.toggle(false)}});this.setIdx(this.idx);if(cfg.pinned){this.toggle(true)}this.fire("inited");return this;function fn$(n,v){var x$;x$=elem[n+""+v];x$.addEventListener("mousedown",function(e){return mouse.start(this$,v)});x$.addEventListener("click",function(e){return mouse.move(this$,e,v,true)});return x$}};(function(){var pool;pool={update:function(ldcp,ctx){return ldcp.bindPalette(this.prepare(ctx).palette)},populate:function(ctx){return this.prepare(ctx).users.map(function(it){return it.syncPalette()})},prepare:function(ctx){var that;if(that=this.hash[ctx]){return that}else{return this.hash[ctx]={users:[],palette:this.random()}}},set:function(ctx,pal){var ref$;ref$=this.prepare(ctx).palette;ref$.name=pal.name;ref$.colors=pal.colors;return this.populate(ctx)},get:function(ctx){var that;return(that=this.hash[ctx])?that.palette:null},bind:function(ctx,ldcp,pal){this.prepare(ctx).users.push(ldcp);this.update(ldcp,ctx);if(pal!=null){return this.set(ctx,pal)}},random:function(n){var i;n==null&&(n=5);return{name:"Random",colors:function(){var i$,to$,results$=[];for(i$=0,to$=n;i$<to$;++i$){i=i$;results$.push({h:Math.floor(Math.random()*360),s:Math.random(),l:Math.random()})}return results$}()}}};pool.hash={default:{users:[],palette:pool.random()}};return CLS.PalPool=pool})();CLS.prototype=import$(Object.create(Object.prototype),{updateDimension:function(){var this$=this;return["d1","d2"].map(function(it){var ref$;return ref$=this$.dim[it],ref$.w=this$.elem[it].offsetWidth,ref$.h=this$.elem[it].offsetHeight,ref$})},setPos:function(type,x,y,isEvent){var ref$,h,s,l,lv,sv,y1,y2,ret,w,ptr,ref1$,lx,ly,c;isEvent==null&&(isEvent=false);if(!this.dim.d1.w){this.updateDimension()}if(typeof type!=="number"){ref$=ldColor.hsl(type),h=ref$.h,s=ref$.s,l=ref$.l;lv=(2*l+s*(1-Math.abs(2*l-1)))/2;sv=2*(lv-l)/lv;if(isNaN(sv)){sv=s}x=this.dim.d2.w*sv;y1=this.dim.d2.h*(1-lv)/1;y2=this.dim.d1.h*(h/360)/1;this.elem.panel2.style.backgroundColor=ldColor.web({h:h,s:1,l:.5});this.setPos(2,x,y1,false);this.setPos(0,x,y2,false);this.syncColorAt(this.idx);return}if(isEvent){ret=this.root.getBoundingClientRect();ref$=[x-ret.left-5,y-ret.top-5],x=ref$[0],y=ref$[1]}ref$=this.dim[type===2?"d2":"d1"],w=ref$.w,h=ref$.h;ptr=this.elem["ptr"+type];x=(ref$=x>0?x:0)<w?ref$:w;y=(ref$=y>0?y:0)<h?ref$:h;ptr.style.top=y+"px";this.elem["in-hex"].value="#000";if(type===2){ptr.style.left=x+"px"}if(!isEvent){return}if(type===1){return this.setAlpha(1-((ref$=(ref1$=(y*1.04-h*.02)/h)>0?ref1$:0)<1?ref$:1))}ref$=[x*1.04-w*.02,y*1.04-h*.02],lx=ref$[0],ly=ref$[1];ref$=[(ref$=(ref1$=lx/w)>0?ref1$:0)<1?ref$:1,(ref$=(ref1$=ly/h)>0?ref1$:0)<1?ref$:1],lx=ref$[0],ly=ref$[1];c=this.getColorAt(this.idx,"hsl");lv=type===2?1-ly:(2*c.l+c.s*(1-Math.abs(2*c.l-1)))/2;sv=type===2?lx:2*(lv-c.l)/lv;h=type===0?ly*360:c.h;l=lv*(2-sv)/2;s=l!==0&&l!==1?lv*sv/(1-Math.abs(2*l-1)):x/w;if(isNaN(s)){s=0}if(isNaN(l)){l=0}return this.setColor({h:h,s:s,l:l,a:c.a})},setIdx:function(ci){var oi,n,cc,oc,hsl,that;oi=this.idx;this.idx=ci;n=this.elem.pal.childNodes[ci+1];this.elem.idx.style.left=n.offsetLeft+n.offsetWidth/2+"px";if(this.idx!==oi){this.fire("change-idx",ci,oi)}cc=this.getColorAt(ci,"hsl");oc=this.getColorAt(oi,"hsl");if(!ldColor.same(cc,oc)){this.fire("change",cc,oc)}hsl=ldColor.hsl(cc);if(that=this.toggler){that.setAttribute("data-idx",ci);that.value=ldColor.web(cc,(that.value||"").length===4)}return this.setPos(hsl)},getIdx:function(){return this.idx},syncColorAt:function(idx,n){var c;n=n||Array.from(this.elem.pal.querySelectorAll(".ldcp-color"))[idx];if(!n){return}n=n.childNodes[0];c=ldColor.hsl(this.palette.colors[idx]);if(!c){return}n.style.backgroundColor=ldColor.web(c);return n.classList[isNaN(c.a)?"add":"remove"]("none")},syncPalette:function(){var pnode,nodes,i$,to$,i,node,ref$,ref1$,ref2$;pnode=this.elem.pal;nodes=pnode.querySelectorAll(".ldcp-color");for(i$=0,to$=Math.max(nodes.length,this.palette.colors.length);i$<to$;++i$){i=i$;if(i>=nodes.length){node=document.createElement("div");node.classList.add("ldcp-color");node.appendChild(document.createElement("div"));pnode.appendChild(node)}else if(i>=this.palette.colors.length){pnode.removeChild(pnode.childNodes[pnode.childNodes.length-1])}if(i<this.palette.colors.length){this.syncColorAt(i,node)}}if(this.idx>=this.palette.colors.length){this.idx=this.palette.colors.length-1}if(typeof context!="undefined"&&context!==null&&context===this.context&&(typeof affectIdx!="undefined"&&affectIdx!==null)&&(typeof direction!="undefined"&&direction!==null)&&affectIdx<=this.idx){this.idx+=direction;this.idx=(ref$=(ref2$=this.idx)>0?ref2$:0)<(ref1$=this.color.vals.length-1)?ref$:ref1$;if(oldIdx!==this.idx){this.fire("change-idx",this.idx)}}return this.setIdx(this.idx)},bindPalette:function(pal){return this.palette=pal},setPalette:function(pal){var oc,that,cc;oc=this.palette.colors[this.idx];this.palette.colors=JSON.parse(JSON.stringify(pal.colors.map(function(it){return ldColor.hsl(it)})));if(that=pal.name){this.palette.name=that}CLS.PalPool.set(this.context,this.palette);cc=this.getColor();if(!ldColor.same(cc,oc)){return this.fire("change",cc,oc)}},getPalette:function(){return this.palette},setColor:function(cc){var oc;oc=this.palette.colors[this.idx];this.palette.colors[this.idx]=ldColor.hsl(cc);this.setPos(cc);if(!ldColor.same(cc,oc)){this.fire("change",cc,oc)}if(this.toggler){this.toggler.value=ldColor.web(cc,(this.toggler.value||"").length===4)}return CLS.PalPool.populate(this.context)},getColor:function(type){type==null&&(type="rgb");return this.getColorAt(this.idx,type)},getColorAt:function(idx,type){type==null&&(type="rgb");return ldColor[type](this.palette.colors[idx])},setAlpha:function(a){var oc,cc;oc=this.getColorAt(this.idx);this.palette.colors[this.idx].a=a;cc=this.getColorAt(this.idx);if(oc.a!==a){this.fire("change",cc,oc)}if(this.toggler){this.toggler.value=ldColor.web(cc,(this.toggler.value||"").length===4)}return this.syncColorAt(this.idx)},getAlpha:function(){return this.getColorAt(this.idx,"rgb").a},setPin:function(p){if(this.pinned!==!!p){this.fire("change-pin",p,this.pinned)}this.pinned=!!p;if(this.pinned){return this.toggle(true)}},isPinned:function(){return this.pinned},addColor:function(){this.palette.colors.splice(this.idx,0,ldColor.rand());return this.syncPalette()},delColor:function(){if(this.palette.colors.length>1){this.palette.colors.splice(this.idx,1)}return this.syncPalette()},toggle:function(isOn,toggler){var display,ref$,sx,sy,box,rbox,left,top,this$=this;if(this.pinned){isOn=true}display=this.root.style.display;if((isOn!=null&&!isOn||!(isOn!=null)&&display!=="none")&&!this.inline){this.root.style.display="none";document.removeEventListener("click",this.docToggler);return this.fire("toggle",false)}this.root.style.display="block";toggler=this.toggler||toggler;if(toggler){if(window.getComputedStyle(this.root).position==="fixed"){ref$=[0,0],sx=ref$[0],sy=ref$[1]}else{sx=window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0;sy=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0}box=toggler.getBoundingClientRect();rbox=this.root.getBoundingClientRect();ref$=[box.left+sx,box.top+sy-20],left=ref$[0],top=ref$[1];if(this.root.classList.contains("top")){top=box.top-this.root.offsetHeight-10+sy-20}else if(this.root.classList.contains("left")){left=box.left-this.root.offsetWidth-10+sx}else if(this.root.classList.contains("right")){left=box.left+toggler.offsetWidth+10+sx}else{top=box.top+box.height+10+sy}if(left+rbox.width>=window.innerWidth){left=window.innerWidth-rbox.width}ref$=this.root.style;ref$.left=left+"px";ref$.top=top+"px"}document.addEventListener("click",function(){document.removeEventListener("click",this$.docToggler);return this$.docToggler=function(){if(mouse.over){return mouse.over=false}document.removeEventListener("click",this$.docToggler);return this$.toggle()}}());this.updateDimension();this.setIdx(this.idx);return this.fire("toggle",true)},on:function(n,cb){var ref$;return((ref$=this.evtHandler)[n]||(ref$[n]=[])).push(cb)},fire:function(n){var v,i$,ref$,len$,cb,results$=[];v=slice$.call(arguments,1);for(i$=0,len$=(ref$=this.evtHandler[n]||[]).length;i$<len$;++i$){cb=ref$[i$];results$.push(cb.apply(this,v))}return results$},destroy:function(){this.root.parentNode.removeChild(this.root);return this.evtHandler={}}});if(typeof module!="undefined"&&module!==null){return module.exports=CLS}else{return window.ldColorPicker=CLS}})();images={hue:"data:image/jpg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAYEBAUEBAYFBQUGBgYHCQ4JCQgICRINDQoOFRIWFhUSFBQXGiEcFxgfGRQUHScdHyIjJSUlFhwpLCgkKyEkJST/2wBDAQYGBgkICREJCREkGBQYJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCT/wgARCADIABQDAREAAhEBAxEB/8QAGwABAAIDAQEAAAAAAAAAAAAAAAECAwQFBgf/xAAbAQEAAgMBAQAAAAAAAAAAAAAAAQYDBAUCB//aAAwDAQACEAMQAAAA85W/sMFjqaepBY9vX+GJPcV7lCTrczkAcXbrYGPJhAAAAzdXGEtmzYANyz4AM1jwTJDxVj9CT51ZvYtD5/ZMUGXx6wZc0QubWHpC0T19OwiYdzQsYk39XfSmGjy9oScut7sFkc2s7ok1uRlgsf/EACcQAAEDAgYCAQUAAAAAAAAAAAABAhMUFQMEBSFhYhBSEhEiMEFR/9oACAEBAAE/APDSz8Fn4G6PwWfqWbqJo/Us3BZ+omj9StK0rSZxO4nd+KMjIyIiIiIiIibA90JsH3QmwfdC+di+9hNd7l93X7y+9xmtq5NnFdmPqu/7K7Mf0wdSzLEXlT47qfEY3ZSm3UphmW2UoyjG5PgouCh4G5LjxsIVJUjcyTk43HJicbjeWn//xAAfEQEBAAEFAAMBAAAAAAAAAAAAFBMBAhESYQMQIDD/2gAIAQIBAT8A+6VKlSpUqVKlw4cOmjpo6afykSJEfiPxH4kSJGDROn8SJEiRIkYdjFtbvh2ffLu7u7IyMjKysv4qVKlSpUrWeq/x/8QAHhEBAAICAwEBAQAAAAAAAAAAABIUAhMRIGEBEDD/2gAIAQMBAT8A/bCwst7e3tra2rS0tN+Tfk35fykkkkkkkkl04cOOnOTnJ8+5IooqysrKvir4q+Kvir4q9NbW1NbWgggh0//Z",gradient:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAABQCAYAAACOEfKtAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAFXZJREFUeNqcnVuT47aShAFSE+MXx26Ef75/2nnykx2+rO/XaaIWhalEfyiBPY7TERpJFEWRyazKrALIqWb2n/7431prK6W0/tr6a3+y/l6vr/589efm6/n7/pmW+Wv/rj+/+MOXx2ut+9KfX47j8PV9+RXb/IDv+fOHWP4S2/f3L/G72vZLa21sx19ju+P72nZ/fDjP8+p/4/t9nfG9x+Px0v+av/b9fPfu3dwn319f7v/0da5Yr71//96303766Sf74osvrq+//rp9//3343XtK/3UN/Q/H/EafwO0AEWgToACaO3wfAg07IxA8L14EShaJw7+A77rYH2I5fr+B4KL7Y/vOzgOTID8ohPoy/wzf+2/7d/HydMJuOJ7PJYB7t9//60TNoD8888/2x9//NF+//33qz/s559/vn788cf25Zdftkff2D995RIbt/5D8+wIOD2LccHOi0AGCJMF+OwFj4tM5UHHtl8IMIHXPoG9F/bz0omOfXMArIPoZHBajWjy9/31JEp/74iVzkp/tn/++af2zz3kyocPH44O5FjWn2sHrv7222/1hx9+qN988411BpavvvrKHh6xYF/xjVanWd9QLNLnh/+oVvPlenB9f/Y/fH7gYXEy+FmNfRjf82d91l/rew3Lxz713zm4ToBX9Vm813cHK/zZjyWAHPvjwPn7/uzx7q9rfxwdOHMQ//rrr9IZWPx9B+905vX3x7fffls6oO1hpnQ3ds7wKHFQBxhXy+vffB07rmUEpCCXljj7C+C+fQfA2YRtjAPmSdIjDrxpn/13BKaAdAACLAswLT5zUFqcqCNYN/bPn/vj9FUdtP5ozj4HsYdv+fXXX4uD1x/lu+++Kx3A+vnnn9vDERcOO2AigQO3CW5efzKEjCaL+Lk/xDgdUDyagNE2AmydHLF2guxRgxM3t+Hf84cfowM5clMHN3KbAzjei4UdrNLDtcTz6cB1ID3vOQMPB/GXX34pvlysfcSPlwg7CxXWzpg+igM2hYnCY9LxlW0VAFSAWMHWmkJSJ4vvSzDrFPgBwiWmIVxPhOgI5QDK4jsm8CJ8zwDMwXOWjVD29TpgA9AeptZD1AE0B6w//NlF10PX2TjWf0TOy+wSKBYMKJtwtby+8mWcgMkyERb5UaAKjMqQFJNCPCZLFaoBllhoISaDabHs+LjKwO2I3KYQHuIx/E1noduTvqxKNJx9vo6HsItHB+10AemP1tlnnYUObu0Waaj1QwfKEE7h2cgsrFfAogqxqcip+bWEZiZ3PSNnHpGX9bkJFC1juAtwASSw3E04MAp1B8uBcTIEkMMQOpgerr7cWef5z9fryx79/dXfV1/eAfQQbv29s9ctTfnss89eQxiAWVJfAWUI1UJAmMfCZiyMBIjKf8t3lRKYv5TDmMuCrVe8n+t7SJpQD7ACUAfGlAMjbP3zwVZfr+c2z28tlHfktxAUiYmzz0F2USnuAz2s+/qnr5cB5IE35jyGqtiSlpnYIrui7yKkD4DKPCg1ZQhPBsfyyUCGJ5gpsTiV54KRntNOz13+vQ7gYFuE6vCBvswVV9bFgXLr4kB14Ial8XD25ZEv/XfcMxtFhExpZGTKZ5mZmUnKjQSqwAcuKklRSSp6ALgZ0sGsJnsiJophsjFiXvg7z3lTcR2QCPWRE4OFDtoQlQBzgOi5L9jYQqFbrDOE5yGBCAArQqjIuwlcKPEuxJ9CGwKURaIgbK/IS2LrEUwi66b/UzgLfIWzP0JJlQtLAFYC2Ec/+FHfOuN8ua/vLAwAHcixTjDvFEMdUActFLs6mGHI2xMD6eF0wAFkzWKQwMv2RAdtOvBgoK9zgtlkmEJWyw5UERNUWBNfZyT1CF1VGSUYNiorXw9ez0F6CVHx0FUYl2DVWKacJ/YJRF8v9sVLwI8A+k73eK5hTOnnqLhlJy43KltzVQJrIhAL8xoeRi/H5QIJgmEBzhnAz/ANIbHIewPAYN0AV/lOLPSHq2185vXvi+c9Z1x/f7nFkRg5S6OOvlzKZ6ixJEMuy2q6CIlKMoA6ttVPyHydgNSyI4p85bQiL8dwpd+L/DaZGCwb+TIYdgpUBzJsiwm0ALEqhJ1locgOlv/goz9fkeucqcMLItxr7IOO9bETkWyab3NeXpaZl0WCoqCwTPXsBCmpbmNZps/84PH5MMXOPLHST0pUF+OEOcv8eENNGxj4cCvj4AUbq3KfftNzp38vSt8Rwt1MP6lw9oBZdUsWiLAzBEsHvoQ5vrsIAO2KwJGXdEZFS0o5T+BYMFi5Tgp8RGgZwtfFoAYrZV8GWx2UyH9TecNYy+IINO1bUeUSzF1EpObWVtSSlupVg2LPzkoK4YrtZYbVBGSBPZkiI0uiKgXMswjNMwA8lBsFUgAv32fR35uqGuB5KF9Q4UGIsDijHxhgzZJPyq72Wv87HxEGnrOUmwOTVtifUy7bFP41KzCqBp2A5TN8Lj9XZHxj/RGKcQIralvlNz4rFxbmO9/fsDWDPSEkRU1U5LZChZWVkeg4Wfy1TmJs+5oAioHIX5bEYmltsW5mHS1xUNWRxSOatQRYeVM2xeDrsnAcBC98npRajVCDgZZtUUgXCYfexzILVgqcEvmuRj4dbazwjqq5DW5jjLCgQWI01NMxa7lARieF1YOJqf4+WuqFHWQW//B6KslOtZ8cFLFPaitBQFvqjJxUpL5iXLBPnxWa5gBIJVmhQY4G6hVgCshLaUleFh33Vx8oEFPDM7eyaHkWxdZ6FA2KhGwSw515TXmQYcs8qDMfYBWE8SzxxKzIk9NMB5hOlkvL++tHKPFLWJ5LDIwQVojXUHn2G4/AbeRAQ0O1qsUPJj5VGRmI1FExigZYy7BkL88kVuzjATQ1B454XVIelF05AZZy4CnlxWd6f0RPsEQlIzZeypvhOf03LqWHiBh1zT8aaVmYVPPK8dfETGPOZLvqxjhrjGP24mInaKyztREoqixUaSiE5wmIZG9Q4AoACZylHNgkFMG6GfICL37jiv3SSdYQ7+j8LO2sVFksDVR4uSOGNp9a8Wwc6DVG61jtTCaiq7KIR7w/uR7a8QU5cQKF/HdyGUCKduHLNMvKgTLLYFuLlcfyaKI0RFr1sWbamAofYwAst66U3JfW/SZsGa6sQLI/rMgpFAtRdbIXZdrSMIjXE6wkJDVYN1jmyhkhq5ynCmaKR3g+ndwx7KBcK8cQ7bmRA9VMsF3NC/9nEArWywsDAd5Tzy8pcUHryTL78Hp2VALMCRANs0ouiMn0gGgilBCMF+U8lYkB2BMDFb4BusXUD1VC59JMuKl/FzvDnt5mIIger2y6zEurSsqG/LIAx+UAb2nRg5Vi3xEHWYJxFYBLJE6KiNJHkKkqdJkHq9rzH8exRwOj/717hNJNGxOdFJlmS2MaFcvEKkuKXDCWUbL6AkAZ4hohokVTRcVOLC8Ajb2/GarBIuXGoZRhqgty3RVhqpkIDWaajQvt9/FKSFMuPGRjlAMn+yIfTXedmgkT0FS9VCrwXa7TUCXYVsC+yjFdVhZSYaUcsirnPoA1XwerZu4TYLIpyrVOyjQsqmYwp6YcSw6M1sws1Wigme8IHMM6DxIJTM1FUT2sZTirBfnEELoFufGA1SnoMi/iEc8VzzWFZ4VN2YlHCyAfMPAVYjLZF1P8zv787sEzGl2EpyaqFJc2ZdNVsZQD53gHjbRCRFMykjrTwhzoOrMyke+jyMx2FUywlHi+9n0QYAJD4hHbr+2VejMS4jimf5VXVQhP40wjnVr4lhsK2Tzn4Ugd+C6kxSrEyGK0obSyMqoWOHhe6Qf9YCJUyVKxsCC/lWBWS5+JAA15TsZZ7sGCfb7s4VP5vB4cKKkFz9yn4cnUts8hzNbUEs4JOIFW0NGYjVIIBvPiSduSHg2Mu5LBnsISTJI9qXgcyH0XzXzkSk4hMZSpmqn2Ti19mWKDaBiarJY6yjTHhTYntatoa9g8LZshyYYQZ63caGFyBZKWCVA1Z68AaGlVYZZWDt8WQJ6aRIqZD2zjSUTOISKiu4sIR8zw2t4o2+4EpHKsN9W5B5i6lHBkpwBH/sqAcfpaQXenJaFhjdzUR+Q+odOjkcnJSrTqlvk6Dl7n12OqMFtVyIV218bKM1hTjttWI6xE0jIewAErZTl0CWqqTiqBgxpftEq7h/woGGcQRoJ3AljPga8AKgdydiq6MQo/y5UJK5fc82OXZRPOnMNnZFlSu4OmWQDG90uEIEFmnpMVmf4PlcoM5TQTrIGFEszGGbUSkaHCMdJOABfPt/N7qZyzNHhe0nuqbkEenLmLAiOwICYN6zO0p+FP4ZwZ1tQ0hllWaCtXHjDNB6owPWuSZ4u+qZd2Hxkoynv5FqFprC7QXSkb9i1TOzRZM0253YY4X6fcqJlV7Q0FLsp1mXkZ0A3jFMqGKkPdnwuzWh2wEyDOPB1R9BhGOgruMUi8KdssTTCqbEmx1EtTNea4slR+09Y6JETBkMZBpqiPF4CUh5XfEisVbjUJjRhoMNCz5mUqkCFHzhtVUvQJLoVzhPu7aaSRu54603c5j8OeXI+dagzE0L6w+mCZJxZWNB5y4jfUy1cy4BOw2C6rngOADd+o9EQbFdbkonnWdCFMlD/j/WOxMaRfmlFqUFxj98VfpxKvoo1V8uA5p3SkiZMzLGPdhwDC9mZLHQ3YymkfbInFaNpU2bROkaKiFm+ILr09OJEJ4AnIx0NjARg8f+rASJnVDMCseY4JL7Oz0GzlAPoyFkKRgUJfPGgw+4rKpFKl9R51LFloOwAxVHqgzl1UNw6sobZoEM0RwouNUdjqNYczObePYKZhTGMYx0TJlgz50jBNUz6uNAvhwJhxiwphqWWTQbfs9wQ0VL2BXRzM18LJMADFi49UI5dZidBI76awMYwxVpKrEUu+MTcYCi6MYVe6cBhTM0spTNiOWEWwZrpQaoGvq6mvZ1yWwDSM4Viap1gIHHoE08ZUtfU5msbrRmRPsqiArZxEfm0aCgWhvQDIabvMnxr5Qtu/YJ7NHBeGWhuSfmW7H9tRCF8xE4K5zxCuxsvDQljHxTzul+NHXkM4cqBtZt1P0DQkANXMg1AGEBvYwTGSA4W5mg8UEbLS0vzAA6lCDFTZVTgVBMs5LFE50sftZ3a11/zF0CWgx6xENBiTZ+SnioSlncyyZqguEzBTiNNM05CSzYUmmn1CdK8LZ+ZTYJIZbhCMlpmHE2NpqrFhFK6kcC5ZREJEX2th9QTz2Eca2rTcRAUrF9ZSdNLk8oMNWShvY+gGg2f+0mRKhhqu/a3Io5XXkCQRMloStqsQObYRDYWwqhCNmz8WG3PTjc7jvwTp6bMQGib/ki5rmAcmG4TLWg8kdA6u141aGvxpw3oUC0vmPmE4SVHpQbEPhiv4KR721I2RiGxYWNGVNlxss4Ru7sYkZV76i2kdhm6DkJ1xhLObEkn8imltDaaeuVP9PL1vmHZH9DhIxAuADDaNob4AqH7gUolgWHNnpEsCYmEf1ZiCkdphDTXrQQOOETtDIj+g3gUXJWYAKucZEiz29Dbhq23OsRhcoZXFg1ez6qQ8pg/kDK1UyhkmkjNvLVUK1ZmmGqNzPMP0g4XKxgNUHqQflOcpr3FbkjhZUvByA57l3iauCuVtCZZhjlj3jDGR13YWGFhSWJJlJiDRmc7t/5LaYOWNQfk8eYkgLR5MnlBsgVDpSs2GkC0MyTfAK0lZtW2NeeQhIubFY1FhGOnd1UlLhZGAzULxBFYaAphhkaZJ1GRmS85DDEttR9UI95HbIH6ZjbzwMeW4I4UuQ5ghPrsxFSHMq9VLmhuThWa5/4HyyN3VSymsC2YsHCrc2VfUAH8e9Cco0fA0NACokgUiU7Mg0L4kUA0nxBKA2q/21M5KIby0s9KYcMksvRGauvOViZ0s6ZQjWz5opIOn/AWQmJNtk7eyMT6WDnL6PLHvdSdfS7mtCi9dmB2QGxEpySduc14CgmFnaQymMmwTIhzoLqnYzyxbwha5Nec1XixumwvIC1pbFddCn1sfSADT9XM1h3R+fsvu5HLP3Tw9ISsbWJCCyyxqtiWqo1Mz2FK62LEsr7tlXSISe4RjTHi29JkD000ndpe6Wr5+blM3U8m1fsuszAeyaY1ZSiNPlH3r9caClJ1Ybb7TNjgcEJmyiAhDeKfAm5tR2J3q7pi52RaX5fGH7ffTsuOOTalyIGAlpYV86xY+8zZXhdcLpkpk+EDbAJin9ZY8Y39zI4p/c+DLCWGLCL7vjqFLMk+D+pZSzCdZWfI1bSl00/E/ARg58KCILJTdgcl8lAFO903Iy5/aYgmgltbdhuEu7NP2d4BvnxMZLI392KbayiA+q3Au23bXBbMnuGNrUt08+L5r3Ja7nJq3mfLvHUqWfq/l30cUtMxA2jSClm5ttYRwySGcTfVdews/nNlnVM2dCU/VTbsJ/4p717w59Epm3Zwc25zEepPjyNK6udmafOAxW/rneS6jc/wiLqjZ3h4qnandDucJmpZO0rG5hHY3/tI4Hp1r73zzslyS4RjqxuyzlCsYfaubHHhMADklNuerHfvS2bN0D4VdJZNvTJa72HPaCEq6mu5P03DPrV3Xx3bCp+2kjnpJb+zm1n5nun6abHytRPLcu92NJ1Tj7uZMs2uba+D02m6AzZfUHpuJTMfmwMumoigbcVgapRswbFNx2Qa8fK/EVxHxMPYQ3gG4O8hPKfWGuSV1c0rawad08caJ2HpMhlcWk93+7WxM3hYja7OdQyE8Z3beAcUcyHC7uZPlNuxvwH4CNSX0skkRdo/BctOgtz7PYOc7dNa0XsXznBczcyBD+MaqbK9g3xls5LSSftjSVJGn+3Clu8U13ToAuWy5o2a6RYuBxHesJ7gnb0v6FhPTvRMrheTBabM3A0v0hnWT00q64ezi+6AG9S4t3Nxe4EBeXaYas+TC5blbJacN2kTH8Ymw3kURgayP1BDdKei88eKNytruzr5ph46bHLRt0uYJTCk9ZIbke3j9q99+I4SfwhnKeyQr8xFAWZmU97Y5cXOLqLpRrYIb19adGORcSvak7+Sc9hTCN9vId2CyvL870N/Ih+cmpOuDs+Nv/urb7F7Y+HRnS5jm+pZKa0cZthuA6qZ+5f2vj1R+2qZy+hRoOzHarf+RganWfdOq4Mxvw/FmXKXyJhaf2O96kyLqxvRmQJ6UGnmx3rDwU+Dd3WN7vvepHY/dfWBuj3ANjfIvzuRTyJKlCPXd+tvf/9RvZzIkZ7BtmPyXf5893r9//6P/txGfSqa7g/3ETtgnGJ2X2b88IW+J0Zatyiv4bz6Wm4//W7SSf/XH//2/AAMAJIxzucIDLtAAAAAASUVORK5CYII=",opacity:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAACACAYAAAAClekiAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA1ZJREFUeNrcWVuO3EAIBNz5zxXmP/c/Qc4x85VbRCKezXrUxlSBxytFir+86x6a5lEFtN7v928i4vL30fAut9vNt/fp2+sZ0+LtxxYWW3g/CEALNoE6aSBRkwEWzD9m/9cR1J/PauDcFjWw2Wjg3dH3EXbKrK3sW/SCJO6UsInNAtXdv4MdP94fj4dn8bEJGcC/2Xnno7yM/BSwhLNp8jf00Ag7VFoc3kfyQ2Fnjv/fjoCSif0NQ1kTg6GjCQplSeIj+y5j9fMi+PEVD2IOzEJ8oLMRO+wMu+WCsmgk9jCWjQ6icbdmZDAFQjhdwwQIc1+GB9WTuxEIOLgLbfTEgx9s2zVOqDZnjiBdGzCrlwIQhUGhg7BRJ6w9wwMBoasJtekADGTMdfP6rhccEKw+8YB6YcUDlqmSpXNmB8SVjnjBEztkG9gACy3Rwq5mI4zEpYg+ZbRXpTMsrpgXKlTaM9Pq54UhzlQfZMCyY2cjiQQjdHwew5vsfPg+ws6l36OBvzQOBGjCYkPHm8Y7aFAZTFAVs+EBSt25X3CUzpdhfUncZB04e8eNmjUcS8NwkOKrAqPCA9hweNEn2BxISxZhXU9seJAlj0/9Aiy8uuwsjFgW4gGtkiwT0Nl5hwf6JibsvCCNztVRv7AQPKB5UDFTKzojHkiCB1JpYCdKfJqN8g42omzULkLP5MrO6oiAUBx00aktAKJ2FkjeRKcXHiib1Kxxwqo2vWKDEpUZRpziBRpcUQM9Ua0oqpEMUF0GcYdc0GKmlNZICyi0EdHuYT3pF3YaJHhwqtguxwLMC8qQKhZZXd+nyWSktCmpLh7BCKCk2cnGQF7EhV1FpA9hz/nBTwYgU31wuv3XznSnU+qyIQwdA3U6eMumeR12gul8KRK/bAhzTkDAg0M+BDxISxzrzMzYSPQf2wDwYoetD6GsZKEwetds2Er6BNgzoYsYk/ya5IUHv4DKbJ646xf0RAy03OiNnkEydo4XUw4AV9lcmV1KpLxRRSIbwEhmRJY4yhrPynBQ8PisAxVVYqA+OFBb5gUlJe7unslIIJVXSOyeqWq6WuzMRgNlNmpRbAoahSGiVVQrdwbRmuCBb/cLv9mshODBKVCFhDuaIKKVBm8/l0jlPxHwR4ABAF3bekgydK22AAAAAElFTkSuQmCC"};html="<div class='ldcp-panel'><div class='ldcp-v ldcp-g1'><div class='ldcp-h ldcp-g11 ldcp-2d'><div style='top:20px;left:20px' class='ldcp-ptr-circle'></div><img src='"+images.gradient+"'><div class='ldcp-mask'></div></div><div class='ldcp-h ldcp-g12 ldcp-1d ldcp-hue'><div class='ldcp-ptr-bar'></div><img src='"+images.hue+"'><div class='ldcp-mask'></div></div><div class='ldcp-h ldcp-g13 ldcp-1d ldcp-alpha'><div class='ldcp-ptr-bar'></div><div class='ldcp-alpha-img' style='background-image:url("+images.opacity+")'></div><div class='ldcp-mask'></div></div></div><div class='ldcp-v ldcp-g2'><div class='ldcp-colors ldcp-h ldcp-g21'><div class='ldcp-palette'><small class='ldcp-idx'></small></div><small class='ldcp-sep'></small><div class='ldcp-color-none'></div><span class='ldcp-cbtn ldcp-btn-add'>+</span><span class='ldcp-cbtn ldcp-btn-remove'>-</span></div></div>\n<div class='ldcp-v ldcp-g3'><div class='ldcp-h ldcp-g31'>\n<div class='ldcp-edit-group'><span>R</span><input class='ldcp-in-r' value='255'><span>G</span><input class='ldcp-in-g' value='255'><span>B</span><input class='ldcp-in-b' value='255'></div>\n<div class='ldcp-edit-group' style='display:none'><span>H</span><input class='ldcp-in-h' value='255'><span>S</span><input class='ldcp-in-s' value='255'><span>L</span><input class='ldcp-in-l' value='255'></div>\n<div class='ldcp-edit-group ldcp-edit-hex' style='display:none'><span>HEX</span><input class='ldcp-in-hex' value='#000000'></div>\n<span>A</span><input value='255' class='ldcp-in-a'>\n<span class='ldcp-caret'>RGBA &#x25be;</span></div></div></div><div class='ldcp-chooser'><button/><button/><button/></div>";function import$(obj,src){var own={}.hasOwnProperty;for(var key in src)if(own.call(src,key))obj[key]=src[key];return obj}(function(){var ReI,ReN,ReP,re,parse,ldColor,t0,t1,t2,t3,Xn,Yn,Zn,conv,utils,k,v;ReI="\\s*([+-]?\\d+)\\s*";ReN="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*";ReP="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*";re={hex3:/^#([0-9a-fA-F]{3})$/,hex6:/^#([0-9a-fA-F]{6})$/,rgbint:new RegExp("^rgb\\("+[ReI,ReI,ReI]+"\\)$"),rgbp:new RegExp("^rgb\\("+[ReP,ReP,ReP]+"\\)$"),rgbaint:new RegExp("^rgba\\("+[ReI,ReI,ReI,ReN]+"\\)$"),rgbap:new RegExp("^rgba\\("+[ReP,ReP,ReP,ReN]+"\\)$"),hslp:new RegExp("^hsl\\("+[ReN,ReP,ReP]+"\\)$"),hslap:new RegExp("^hsla\\("+[ReN,ReP,ReP,ReN]+"\\)$")};parse={hex3:function(v){v=parseInt(v[1],16);return{r:(v>>8)*17,g:(v&240)*17>>4,b:(v&15)*17,a:1}},hex6:function(v){v=parseInt(v[1],16);return{r:v>>16,g:v>>8&255,b:v&255,a:1}},rgbint:function(v){return{r:+v[1],g:+v[2],b:+v[3],a:1}},rgbp:function(v){return{r:v[1]*255/100,g:+v[2]*255/100,b:+v[3]*255/100,a:1}},rgbaint:function(v){return{r:+v[1],g:+v[2],b:+v[3],a:+v[4]}},rgbap:function(v){return{r:v[1]*255/100,g:+v[2]*255/100,b:v[3]*255/100,a:+v[4]}},hslap:function(v){return{h:+v[1],s:v[2]/100,l:v[3]/100,a:+v[4]}},hslp:function(v){return{h:+v[1],s:v[2]/100,l:v[3]/100,a:1}},all:function(o){var that,ref$,k,v;if(typeof o==="object"){if(!(o.a!=null)){o.a=1}return o["@a"]?o=conv.lab2rgb(o):o["c"]?o=conv.hcl2rgb(o):o.hex?(that=re.hex3.exec(o.hex))?(ref$=parse.hex3(that)||{},ref$.a=o.a,ref$):(that=re.hex6.exec(o.hex))?(ref$=parse.hex6(that),ref$.a=o.a,ref$):o:o.value?parse.all(o.value):o}else if(typeof o==="number"){return conv.num2rgb(o)}o=(o+"").trim().toLowerCase();for(k in ref$=re){v=ref$[k];if(that=v.exec(o)){return parse[k](that)}else{continue}}if(typeof named!="undefined"&&named!==null&&named[o]){return conv.num2rgb(named[o])}if(o==="transparent"){return{r:NaN,g:NaN,b:NaN,a:0}}return{r:NaN,g:NaN,b:NaN,a:NaN}}};ldColor=function(v){return import$(this,parse.all(v))};t0=4/29;t1=6/29;t2=3*t1*t1;t3=t1*t1*t1;Xn=.96422;Yn=1;Zn=.82521;conv={num2rgb:function(v){return{r:v>>16,g:v>>8&255,b:v&255,a:1}},_hsl2rgb:function(h,m1,m2){return(h<60?m1+(m2-m1)*h/60:h<180?m2:h<240?m1+(m2-m1)*(240-h)/60:m1)*255},hsl2rgb:function(arg$){var h,s,l,a,m2,m1,ref$;h=arg$.h,s=arg$.s,l=arg$.l,a=arg$.a;h=h%360+(h<0)*360;s=isNaN(h)||isNaN(s)?0:s;m2=l+(l<.5?l:1-l)*s;m1=2*l-m2;return{r:(ref$=this._hsl2rgb(h>=240?h-240:h+120,m1,m2))>0?ref$:0,g:(ref$=this._hsl2rgb(h,m1,m2))>0?ref$:0,b:(ref$=this._hsl2rgb(h<120?h+240:h-120,m1,m2))>0?ref$:0,a:a}},rgb2hsl:function(arg$){var r,g,b,a,ref$,Cmax,Cmin,delta,l,h,s;r=arg$.r,g=arg$.g,b=arg$.b,a=arg$.a;ref$=[r/255,g/255,b/255],r=ref$[0],g=ref$[1],b=ref$[2];Cmax=Math.max(r,g,b);Cmin=Math.min(r,g,b);delta=Cmax-Cmin;l=(Cmax+Cmin)/2;if(delta===0){ref$=[0,0],h=ref$[0],s=ref$[1]}else{h=function(){switch(false){case Cmax!==r:return 60*((g-b)/delta%6);case Cmax!==g:return 60*((b-r)/delta+2);case Cmax!==b:return 60*((r-g)/delta+4)}}();s=delta/(1-Math.abs(2*l-1))}h=(h+360)%360;return{h:h,s:s,l:l,a:a}},_rgb2lrgb:function(x){if((x/=255)<=.04045){return x/12.92}else{return Math.pow((x+.055)/1.055,2.4)}},_xyz2lab:function(t){if(t>t3){return Math.pow(t,1/3)}else{return t/t2+t0}},_lab2xyz:function(t){if(t>t1){return t*t*t}else{return t2*(t-t0)}},_lrgb2rgb:function(x){var ref$,ref1$;return(ref$=(ref1$=255*(x<=.0031308?12.92*x:1.055*Math.pow(x,1/2.4)-.055))<255?ref1$:255)>0?ref$:0},lab2rgb:function(v){var ref$,l,a,b,o,y,x,z;ref$=[v["@l"],v["@a"],v["@b"],v["a"]!=null?v["a"]:1],l=ref$[0],a=ref$[1],b=ref$[2],o=ref$[3];y=(l+16)/116;x=isNaN(a)?y:y+a/500;z=isNaN(b)?y:y-b/200;x=Xn*conv._lab2xyz(x);y=Yn*conv._lab2xyz(y);z=Zn*conv._lab2xyz(z);return{r:conv._lrgb2rgb(3.1338561*x-1.6168667*y-.4906146*z),g:conv._lrgb2rgb(-.9787684*x+1.9161415*y+.033454*z),b:conv._lrgb2rgb(.0719453*x-.2289914*y+1.4052427*z),a:o}},lab2hcl:function(v){var ref$,l,a,b,o,h;ref$=[v["@l"],v["@a"],v["@b"],v["a"]!=null?v["a"]:1],l=ref$[0],a=ref$[1],b=ref$[2],o=ref$[3];if(a===0&&b===0){return{h:NaN,c:0,l:l,a:o}}h=Math.atan2(b,a)*180/Math.PI;return{h:h<0?h+360:h>0?h:0,c:Math.sqrt(a*a+b*b),l:l>0?l:0,a:(ref$=o>0?o:0)<1?ref$:1}},hcl2lab:function(v){var h;v.a=v.a!=null?v.a:1;if(isNaN(v.h)){return{"@l":v.l,"@a":0,"@b":0,a:v.a}}h=v.h*Math.PI/180;return{"@l":v.l,"@a":Math.cos(h)*v.c,"@b":Math.sin(h)*v.c,a:v.a}},hcl2rgb:function(v){return this.lab2rgb(this.hcl2lab(v))}};utils={same:function(a,b){var ref$;b==null&&(b=this);ref$=[this.rgb(a),this.rgb(b)],a=ref$[0],b=ref$[1];return a.r===b.r&&a.g===b.g&&a.b===b.b&&a.a===b.a},rgb:function(v){var ret;v==null&&(v=this);ret=parse.all(v);if(ret.c!=null){return conv.lab2rgb(conv.hcl2lab(ret))}if(ret.h!=null){return conv.hsl2rgb(ret)}else{return ret}},rgbfv:function(v){var ret;v==null&&(v=this);ret=this.rgb(v);return[ret.r/255,ret.g/255,ret.b/255]},web:function(v,compact){var ret;v==null&&(v=this);compact==null&&(compact=false);ret=utils.rgb(v);if(ret.a!=null&&isNaN(ret.a)){return"transparent"}if(ret.a<1){return this.rgbaStr(ret)}else{return this.hex(ret,compact)}},rgbaStr:function(v){var ret;v==null&&(v=this);ret=utils.rgb(v);return"rgba("+Math.round(ret.r)+", "+Math.round(ret.g)+", "+Math.round(ret.b)+", "+ret.a+")"},hsl:function(v){var ret;v==null&&(v=this);ret=parse.all(v);if(ret.r!=null){return conv.rgb2hsl(ret)}else{return ret}},hex:function(v,compact){var ref$,ret;v==null&&(v=this);compact==null&&(compact=false);if(v!=null&&typeof v==="boolean"){ref$=[this,v],v=ref$[0],compact=ref$[1]}ret=utils.rgb(v);ret=["r","g","b"].map(function(it){var v,ref$;v=((ref$=Math.round(ret[it]))<255?ref$:255).toString(16)+"";return v=repeatString$("0",2-v.length)+v}).join("");if(compact&&ret[0]===ret[1]&&ret[2]===ret[3]&&ret[4]===ret[5]){ret=ret[0]+ret[2]+ret[4]}return"#"+ret},lab:function(v){var ref$,r,g,b,a,y,x,z;v==null&&(v=this);if(v.c){return conv.hcl2lab(v)}ref$=utils.rgb(v),r=ref$.r,g=ref$.g,b=ref$.b,a=ref$.a;r=conv._rgb2lrgb(r);g=conv._rgb2lrgb(g);b=conv._rgb2lrgb(b);y=conv._xyz2lab((.2225045*r+.7168786*g+.0606169*b)/Yn);if(r===g&&g===b){x=z=y}else{x=conv._xyz2lab((.4360747*r+.3850649*g+.1430804*b)/Xn);z=conv._xyz2lab((.0139322*r+.0971045*g+.7141733*b)/Zn)}return{"@l":116*y-16,"@a":500*(x-y),"@b":200*(y-z),a:a}},hcl:function(v){v==null&&(v=this);return conv.lab2hcl(utils.lab(v))},int:function(v){v==null&&(v=this);v=utils.rgb(v);return(Math.round(v.r)<<16)+(Math.round(v.g)<<8)+Math.round(v.b)},rand:function(){return{h:Math.random()*360,s:Math.random(),l:Math.random(),a:1}},lighter:function(v,k){var hsl;v==null&&(v=this);k==null&&(k=1);hsl=utils.hsl(v);hsl.l*=Math.pow(1/.7,k);return hsl},darker:function(v,k){var hsl;v==null&&(v=this);k==null&&(k=1);hsl=utils.hsl(v);hsl.l*=Math.pow(.7,k);return hsl}};import$(ldColor,utils);ldColor.prototype=import$(Object.create(Object.prototype),utils);for(k in utils){v=utils[k];fn$(k,v)}if(typeof module!="undefined"&&module!==null){return module.exports=ldColor}else{return window.ldColor=ldColor}function fn$(k,v){return ldColor.prototype[k]=function(){return v(this)}}})();function import$(obj,src){var own={}.hasOwnProperty;for(var key in src)if(own.call(src,key))obj[key]=src[key];return obj}function repeatString$(str,n){for(var r="";n>0;(n>>=1)&&(str+=str))if(n&1)r+=str;return r}var slice$=[].slice;(function(){var ldPalettePicker;ldPalettePicker=function(opt){var root,el,content,mypal,ret,palFromNode,usePal,search,saver,evts,n,this$=this;opt==null&&(opt={});this.opt=opt=import$({palettes:[],itemPerLine:2},opt);this.pals={view:opt.palettes};this.root=root=typeof opt.root===typeof""?document.querySelector(opt.root):opt.root;if(opt.className){this.root.classList.add.apply(this.root.classList,opt.className.split(" ").filter(function(it){return it}).map(function(it){return it.trim()}))}this.el=el={};el.nv={root:ld$.find(root,".navbar",0),search:ld$.find(root,"input[data-tag=search]",0)};el.pn={view:ld$.find(root,".panel[data-panel=view]",0),mypal:ld$.find(root,".panel[data-panel=mypal]",0),edit:ld$.find(root,".panel[data-panel=edit]",0)};el.pnin={view:ld$.find(el.pn.view,".inner",0),mypal:ld$.find(el.pn.mypal,".inner",0)};el.ed={save:ld$.find(el.pn.edit,"*[data-action=save]",0)};el.mp={load:ld$.find(el.pn.mypal,".btn-load",0)};content={pals:{},add:function(tab,p){var ref$,this$=this;tab==null&&(tab="view");if(!this.pals[tab]){this.pals[tab]=[]}return(ref$=this.pals)[tab]=ref$[tab].concat(p.map(function(it){return{html:this$.html(it),obj:it}}))},build:function(p,tgt){var rows,lines,i$,step$,to$,i,line,j$,to1$,j;p==null&&(p=[]);tgt==null&&(tgt="view");if(tgt==="edit"){tgt="view"}rows=p.map(function(it){return it.html});if(rows.length===0){return el.pnin[tgt].innerHTML="no result..."}if(opt.useClusterizejs&&(typeof Clusterize!="undefined"&&Clusterize!==null)){lines=[];for(i$=0,to$=rows.length,step$=opt.itemPerLine;step$<0?i$>to$:i$<to$;i$+=step$){i=i$;line=[];for(j$=0,to1$=opt.itemPerLine;j$<to1$;++j$){j=j$;line.push(rows[i+j])}lines.push("<div>"+line.join("")+"</div>")}if((content.cluster||(content.cluster={}))[tgt]){return content.cluster[tgt].update(lines)}else{return(content.cluster||(content.cluster={}))[tgt]=new Clusterize({rows_in_block:7,rows:lines,contentElem:el.pnin[tgt],scrollElem:el.pn[tgt]})}}else{return el.pnin[tgt].innerHTML=rows.join("")}},html:function(c){var cs;cs=c.colors.map(function(it){return'<div class="color" style="background:'+ldColor.rgbaStr(it)+'"></div>'}).join("");return'<div class="ldp"'+(c.key?' data-key="'+c.key+'"':"")+'>\n  <div class="colors">\n  <div class="ctrl">\n  <div data-action="use"><i class="i-check"></i>USE</div>\n  <div data-action="edit"><i class="i-gear"></i>EDIT</div>\n  </div>\n  '+cs+'\n  </div>\n  <div class="name">'+(c.name||"untitled")+"</div>\n</div>"}};if(opt.mypal!=null){mypal={loader:new ldLoader({root:el.mp.load,autoZ:true}),page:Object.create(opt.mypal),fetch:function(){return this.page.fetch().then(function(ret){content.add("mypal",ret);return content.build(content.pals.mypal,"mypal")})}};mypal.page.setHost(el.pn.mypal);el.mp.load.addEventListener("click",function(){return mypal.loader.on().then(function(){return mypal.page.fetch()}).then(function(it){debounce(100);return it}).then(function(it){content.add("mypal",it);return content.build(content.pals.mypal,"mypal")}).then(function(){return mypal.loader.off(100)}).then(function(){if(mypal.page.isEnd()){return el.mp.load.style.display="none"}})})}else{ret=ld$.parent(ld$.find(el.nv.root,"a[data-panel=mypal]",0),".nav-item",el.nv.root);ret.style.display="none";ld$.remove(el.pn.mypal)}palFromNode=function(n){var p,that,ref$,key,name,hexs;p=ld$.find(n,".ldp",0)||ld$.parent(n,".ldp",root);ref$=(that=p)?[ld$.attr(p,"data-key"),ld$.find(that,".name",0).innerText]:[null,"untitled"],key=ref$[0],name=ref$[1];hexs=(that=ld$.find(n,".colors",0)||ld$.parent(n,".colors",root))?ld$.find(that,".color").map(function(it){return ldColor.hex(it.style.backgroundColor||it.style.background)}):[];return{name:name,hexs:hexs,key:key}};usePal=function(n){var ref$,name,hexs,key,ret;ref$=palFromNode(n),name=ref$.name,hexs=ref$.hexs,key=ref$.key;this$.fire("use",ret={name:name,key:key,colors:hexs.map(function(it){return ldColor.rgb(it)})});if(this$.ldcv){return this$.ldcv.set(ret)}};search=function(v){var n,pal;v==null&&(v="");n=ld$.find(el.nv.root,".active",0);pal=n?ld$.attr(n,"data-panel"):"view";if(!v){return content.build(content.pals[pal]||[],pal)}v=v.toLowerCase().trim();if(pal==="edit"){pal="view"}content.build((content.pals[pal]||[]).filter(function(it){return(it.obj.name||"untitled").indexOf(v)>=0||(it.obj.tag||[]).filter(function(it){return it.indexOf(v)>=0}).length}),pal);return this$.tab(pal)};el.nv.search.addEventListener("keyup",function(e){return search(e.target.value||"")});if(opt.save!=null){saver={loader:new ldLoader({root:el.ed.save,autoZ:true}),save:opt.save}}evts={save:function(tgt){var ref$,colors,name,key,width,height,len,canvas,ctx,i$,i;if(!ld$.parent(tgt,"[data-action=save]",root)){return false}if(!(saver!=null)){return true}saver.loader.on();ref$=this$.ldpe.getPal(),colors=ref$.colors,name=ref$.name,key=ref$.key;ref$=[800,300,colors.length],width=ref$[0],height=ref$[1],len=ref$[2];canvas=document.createElement("canvas");document.body.appendChild(canvas);ref$=canvas.style;ref$.display="block";ref$.position="absolute";ref$.zIndex=-1;ref$.opacity=0;ref$.visibility="hidden";canvas.width=width;canvas.height=height;ctx=canvas.getContext("2d");ctx.fillStyle="#ffffff";ctx.fillRect(0,0,canvas.width,canvas.height);for(i$=0;i$<len;++i$){i=i$;ctx.fillStyle=colors[i].value;ctx.fillRect((width-600)*.5+600*(i/len),(height-150)*.5,600/len,150)}canvas.toBlob(function(thumb){return saver.save({thumb:thumb,data:{name:name,type:"palette",payload:{colors:colors}}},key)["finally"](function(){return saver.loader.off(500)}).then(function(pal){if(pal){return this$.ldpe.init({pal:pal})}})});return true},use:function(tgt){var n;if(!ld$.parent(tgt,"[data-action=use]",root)){return false}if(n=ld$.parent(tgt,".ldp *[data-action]",root)){return usePal(n)||true}if(n=ld$.parent(tgt,".panel[data-panel=edit]",root)){n=ld$.find(n,".ldp",0);if(n){return usePal(n)||true}}},mypal:function(tgt){var p,n;if(!(p=ld$.parent(tgt,".navbar",root))){return}if(n=ld$.parent(tgt,"*[data-panel=mypal]",p)){if(!(mypal!=null)){return this$.tab("view")}mypal.fetch();return this$.tab("mypal")}},view:function(tgt){var p,n;if(!(p=ld$.parent(tgt,".navbar",root))){return}if(n=ld$.parent(tgt,"*[data-panel=view]",p)){return this$.tab("view")}if(!(n=ld$.parent(tgt,"*[data-cat]",p))){return}this$.tab("view");return search(el.nv.search.value=ld$.attr(n,"data-cat")||"")},edit:function(tgt){var n;if(!(n=ld$.parent(tgt,".ldp *[data-action]",root))){return}if(ld$.attr(n,"data-action")==="edit"){this$.tab("edit");this$.ldpe.init({pal:palFromNode(n)});return true}},undo:function(tgt){var n;if(n=ld$.parent(tgt,"*[data-action=undo]",root)){return this$.ldpe.undo()||true}},nav:function(tgt){if(ld$.attr(tgt,"data-panel")&&ld$.parent(tgt,".navbar",root)){return this$.tab(ld$.attr(tgt,"data-panel"))}}};root.addEventListener("click",function(e){var tgt;tgt=e.target;if(evts.save(tgt)){return}if(evts.use(tgt)){return}if(evts.mypal(tgt)){return}if(evts.view(tgt)){return}if(evts.edit(tgt)){return}if(evts.undo(tgt)){return}if(evts.nav(tgt)){}});this.evtHandler={};content.add("view",opt.palettes);content.build(content.pals.view);this.ldpe=new ldPaletteEditor({root:el.pn.edit});this.edit=function(pal,toggle){toggle==null&&(toggle=true);this$.ldpe.init({pal:pal});if(toggle){return this$.tab("edit")}};if(typeof ldCover!="undefined"&&ldCover!==null&&opt.ldcv){if(n=ld$.parent(this.root,".ldcv",document)){this.ldcv=new ldCover(import$({root:n},typeof opt.ldcv==="object"?opt.ldcv:{}))}}return this};ldPalettePicker.prototype=import$(Object.create(Object.prototype),{on:function(n,cb){var ref$;return((ref$=this.evtHandler)[n]||(ref$[n]=[])).push(cb)},fire:function(n){var v,i$,ref$,len$,cb,results$=[];v=slice$.call(arguments,1);for(i$=0,len$=(ref$=this.evtHandler[n]||[]).length;i$<len$;++i$){cb=ref$[i$];results$.push(cb.apply(this,v))}return results$},get:function(){var this$=this;return Promise.resolve().then(function(){if(this$.ldcv){return this$.ldcv.get()}})},tab:function(n){var idx,that;if(!n){return}idx=(that=ld$.find(this.root,".panel[data-panel="+n+"]",0))?ld$.index(that):-1;if(idx<0){return}ld$.find(this.root,".panels",0).style.transform="translate("+idx*-100+"%,0)";ld$.find(this.root,".nav-link").map(function(it){return it.classList.toggle("active",ld$.attr(it,"data-panel")===n)});this.ldpe.syncUi();return true},random:function(){var pals;pals=this.opt.palettes;if(!this.opt.random){return pals[Math.floor(Math.random()*pals.length)]}if(Array.isArray(this.opt.random)){return this.opt.random[Math.floor(Math.random()*this.opt.random.length)]}return this.opt.random()}});import$(ldPalettePicker,{palettes:[],parse:{text:function(txt){return txt.split("\n").filter(function(it){return it}).map(function(v){v=v.split(",").map(function(it){return it.toLowerCase()});return{name:v[0],colors:v[1].split(" ").map(function(it){return"#"+it}),tag:v.slice(2)}})}},register:function(name,palettes){if(typeof palettes==="string"){palettes=this.parse.text(palettes)}return this.palettes.push([name,palettes])},get:function(name){return(this.palettes.filter(function(it){return it[0]===name})[0]||["",[]])[1]},init:function(opt){var pals;opt==null&&(opt={});pals=!opt.pals?this.get("default"):opt.pals;return Array.from(document.querySelectorAll("*[ldPalettePicker]")).map(function(it){return new ldPalettePicker(import$({palettes:pals,root:it},opt))})}});ldPalettePicker.register("default","flourish,b22 e55 f87 fb6 ab8 898,qualitative\ngray,000 333 666 ddd fff,gradient\nyoung,fec fe6 cd9 acd 7ab aac,concept\nplotDB,ed1e79 c69c6d 8cc63f 29abe2,brand\nFrench,37a 9ab eee f98 c10,diverging\nAfghan Girl,010 253 ffd da8 b53,artwork");if(typeof window!="undefined"&&window!==null){return window.ldPalettePicker=ldPalettePicker}})();function import$(obj,src){var own={}.hasOwnProperty;for(var key in src)if(own.call(src,key))obj[key]=src[key];return obj}(function(){var ldPaletteEditor;ldPaletteEditor=function(opt){var root,el,log,ldcp,ldrs,irsOpt,ref$,getIdx,dragger,editInit,editUpdate,evts,this$=this;opt==null&&(opt={});this.opt=opt=import$({palettes:[],itemPerLine:2},opt);this.root=root=typeof opt.root===typeof""?document.querySelector(opt.root):opt.root;this.el=el={};el.ed={picker:ld$.find(root,".ldColorPicker",0),pal:ld$.find(root,".ldp",0),colors:ld$.find(root,".ldp .colors",0),hex:ld$.find(root,"input[data-tag=hex]",0),sel:ld$.find(root,"select",0),cfgs:ld$.find(root,".config")};log={stack:[],cur:null,handle:null,undo:function(){var html;html=log.stack.pop();if(!html){return}el.ed.pal.innerHTML=html;return el.ed.colors=ld$.find(el.ed.pal,".colors",0)},push:function(forced){var that,_,this$=this;forced==null&&(forced=false);if(that=this.handle){clearTimeout(that)}if(!this.cur){this.cur=el.ed.pal.innerHTML}_=function(){var ref$;if((ref$=this$.stack)[ref$.length-1]!==this$.cur){this$.stack.push(this$.cur)}return this$.handle=null,this$.cur=null,this$};if(forced){return _()}else{return this.handle=setTimeout(function(){return _()},200)}},clear:function(){this.stack.splice(0);if(this.handle){clearTimeout(this.handle)}return this.handle=null,this.cur=null,this}};this.undo=function(){return log.undo()};this.clearLog=function(){return log.clear()};this.ldcp=ldcp=new ldColorPicker(el.ed.picker,{inline:true});ldcp.on("change",function(it){log.push();return editUpdate(it)});this.ldrs=ldrs={};irsOpt={base:{min:0,max:255,step:1,hide_min_max:true,hide_from_to:true,grid:false}};import$(irsOpt,{"hsl-h":(ref$=import$({},irsOpt.base),ref$.max=360,ref$),"hsl-s":(ref$=import$({},irsOpt.base),ref$.max=1,ref$.step=.01,ref$),"hsl-l":(ref$=import$({},irsOpt.base),ref$.max=1,ref$.step=.01,ref$),"hcl-h":(ref$=import$({},irsOpt.base),ref$.max=360,ref$),"hcl-c":(ref$=import$({},irsOpt.base),ref$.max=230,ref$),"hcl-l":(ref$=import$({},irsOpt.base),ref$.max=100,ref$)});irsOpt["rgb-r"]=irsOpt["rgb-g"]=irsOpt["rgb-b"]=irsOpt.base;["rgb-r","rgb-g","rgb-b","hsl-h","hsl-s","hsl-l","hcl-h","hcl-c","hcl-l"].map(function(it){return function(t){var v;v=t.split("-");ld$.find(root,".value[data-tag="+t+"]",0).addEventListener("change",function(e){var c;c=ldcp.getColor(v[0]);c[v[1]]=e.target.value;return ldcp.setColor(c)});ldrs[t]=new ldSlider(import$({root:ld$.find(root,".ldrs[data-tag="+t+"]",0)},irsOpt[t]));return function(t){return ldrs[t].on("change",function(val){var c;ldcp._slider=t;c=ldcp.getColor(v[0]);c[v[1]]=val;return ldcp.setColor(c)})}(t)}(it)});el.ed.hex.addEventListener("change",function(e){return ldcp.setColor(e.target.value)});el.ed.sel.addEventListener("change",function(e){return el.ed.cfgs.map(function(it){var k,ref$,v,results$=[];it.classList[ld$.attr(it,"data-tag")===e.target.value?"add":"remove"]("active");for(k in ref$=ldrs){v=ref$[k];results$.push(v.update())}return results$})});getIdx=function(e){var box,idx,ref$,ref1$,ref2$;box=dragger.data.box;return idx=dragger.data.colors.length*((ref$=(ref2$=e.clientX-box.x)>0?ref2$:0)<(ref1$=box.width)?ref$:ref1$)/box.width};dragger=function(e){var ref$,box,srcidx,initx,colors,span,desidx,src,offset,ref1$,ref2$,ref3$,des;ref$=dragger.data,box=ref$.box,srcidx=ref$.srcidx,initx=ref$.initx,colors=ref$.colors,span=ref$.span;desidx=Math.round(getIdx(e));src=el.ed.colors.childNodes[srcidx];offset=(ref$=(ref2$=e.clientX-initx)>(ref3$=-srcidx*span)?ref2$:ref3$)<(ref1$=(colors.length-srcidx-1)*span)?ref$:ref1$;src.style.transform="translate("+offset+"px,0)";if(srcidx===desidx||srcidx+1===desidx){return}src.style.transform="translate(0,0)";dragger.data.initx=e.clientX;log.push();src=el.ed.colors.childNodes[srcidx];des=el.ed.colors.childNodes[desidx];src.remove();el.ed.colors.insertBefore(src,des);return dragger.data.srcidx=desidx<srcidx?desidx:desidx-1};el.ed.pal.addEventListener("mousedown",function(e){if(!ld$.parent(e.target,".colors",el.ed.pal)){return}dragger.data={initx:e.clientX,colors:ld$.find(el.ed.colors,".color"),box:el.ed.colors.getBoundingClientRect()};dragger.data.srcidx=Math.floor(getIdx(e));dragger.data.span=dragger.data.box.width/dragger.data.colors.length;document.removeEventListener("mousemove",dragger);return document.addEventListener("mousemove",dragger)});el.ed.pal.addEventListener("mouseup",function(e){if(!ld$.parent(e.target,".colors",el.ed.pal)){return}ld$.find(el.ed.colors,".color").map(function(it){return it.style.transform=""});return document.removeEventListener("mousemove",dragger)});document.addEventListener("mouseup",function(){return document.removeEventListener("mousemove",dragger)});this.init=editInit=function(opt){var ref$,hexs,key,name,elp;opt==null&&(opt={});opt=import$({pal:{}},opt);ref$=[opt.pal.hexs||opt.pal.colors.map(function(it){return ldColor.hex(it)}),opt.pal.key,opt.pal.name||"Custom"],hexs=ref$[0],key=ref$[1],name=ref$[2];elp=el.ed.colors.parentNode;if(key){elp.setAttribute("data-key",key)}else{elp.removeAttribute("data-key")}el.ed.colors.innerHTML=hexs.map(function(d,i){var hcl;hcl=ldColor.hcl(d);return'<div class="color'+(i?"":" active")+(hcl.l<50?" dark":"")+'"\nstyle="background:'+d+";color:"+d+'">\n  <div data-action>\n    <i class="i-clone"></i>\n    <i class="i-bars"></i>\n    <i class="i-close"></i>\n  </div>\n</div>'}).join("");ld$.find(elp,".name",0).innerHTML=name||"untitled";editUpdate(hexs[0]);return ldcp.setColor(hexs[0])};editUpdate=function(c){var hcl,node,this$=this;hcl=ldColor.hcl(c);node=ld$.find(root,".color.active",0);node.style.background=ldColor.rgbaStr(c);node.classList[hcl.l<50?"add":"remove"]("dark");el.ed.hex.value=ldColor.hex(c);c={rgb:ldColor.rgb(c),hsl:ldColor.hsl(c),hcl:hcl};return["rgb-r","rgb-g","rgb-b","hsl-h","hsl-s","hsl-l","hcl-h","hcl-c","hcl-l"].map(function(t){var p,v;p=t.split("-");v=c[p[0]][p[1]];if(!(t==="hsl-s"||t==="hsl-l")){v=Math.round(v)}ld$.find(root,".value[data-tag="+t+"]",0).value=v;if(ldcp._slider===t){return ldcp._slider=null}return ldrs[t].set(v)})};evts={editColor:function(tgt){var btn,color,sibling,node;btn=ld$.parent(tgt,"i",el.ed.pal);color=ld$.parent(tgt,".color",el.ed.pal);if(btn&&!btn.classList.contains("i-bars")&&color.classList.contains("active")){if(btn.classList.contains("i-close")){if(color.parentNode.childNodes.length<=1){return true}log.push();if(color.classList.contains("active")){sibling=color.parentNode.childNodes[ld$.index(color)+1]||color.parentNode.childNodes[ld$.index(color)-1];if(sibling){sibling.classList.add("active")}}color.remove();return true}if(btn.classList.contains("i-clone")){node=color.cloneNode(true);ld$.child(color.parentNode).map(function(it){return it.classList.remove("active")});node.classList.add("active");ld$.insertAfter(color.parentNode,node,color);return true}}if(color){ld$.child(color.parentNode).map(function(it){return it.classList[it===color?"add":"remove"]("active")});ldcp.setColor(color.style.backgroundColor);return true}}};root.addEventListener("click",function(e){var tgt;tgt=e.target;if(evts.editColor(tgt)){}});this.getPal=function(){var elp,key,name,colors;elp=el.ed.colors.parentNode;key=ld$.attr(elp,"data-key");name=ld$.find(elp,".name",0).textContent||"untitled";colors=ld$.find(el.ed.colors,".color").map(function(it){return{value:ldColor.rgbaStr(it.style.backgroundColor)}});return{colors:colors,name:name,key:key}};editInit({pal:{colors:["#E8614C","#F4A358","#E8DA8D","#2DA88B","#294B59"]}});return this};ldPaletteEditor.prototype=import$(Object.create(Object.prototype),{syncUi:function(){var k,ref$,v,results$=[];for(k in ref$=this.ldrs){v=ref$[k];results$.push(v.update())}return results$}});if(typeof window!="undefined"&&window!==null){return window.ldPaletteEditor=ldPaletteEditor}})();function import$(obj,src){var own={}.hasOwnProperty;for(var key in src)if(own.call(src,key))obj[key]=src[key];return obj}var ldPalette;ldPalette=function(){};ldPalette.convert=function(pal,type){var promise;type==null&&(type="png");return promise=new Promise(function(res,rej){var name,len,blob,rects,i$,i,payload,ref$,iw,ih,dw,dh,canvas,ctx,data,this$=this;name=pal.name||"palette";len=pal.colors.length;if(type==="json"){blob=new Blob([JSON.stringify(pal)],{type:"application/json"});return res({blob:blob,url:URL.createObjectURL(blob),filename:name+".json"})}else if(type==="svg"){rects=[];for(i$=0;i$<len;++i$){i=i$;rects.push('<rect x="'+500*i/len+'" y="0" width="'+500/len+'" height="100" fill="'+ldColor.web(pal.colors[i])+'"/>')}payload=['<?xml version="1.0" encoding="utf-8"?>','<svg xmlns="http://www.w3.org/2000/svg" width="500" height="100" viewbox="0 0 500 100">'].concat(rects,["</svg>"]).join("\n");blob=new Blob([payload],{type:"image/svg+xml"});return res({blob:blob,url:URL.createObjectURL(blob),filename:name+".svg"})}else if(type==="png"){ref$=[500,100,500,100],iw=ref$[0],ih=ref$[1],dw=ref$[2],dh=ref$[3];canvas=document.createElement("canvas");document.body.appendChild(canvas);ref$=canvas.style;ref$.display="block";ref$.opacity=.01;ref$.position="absolute";ref$.zIndex=-1;canvas.width=iw;canvas.height=ih;ctx=canvas.getContext("2d");ctx.fillStyle="#ffffff";ctx.fillRect(0,0,canvas.width,canvas.height);for(i$=0;i$<len;++i$){i=i$;ctx.fillStyle=ldColor.web(pal.colors[i]);ctx.fillRect((iw-dw)*.5+dw*(i/len),(ih-dh)*.5,dw/len,dh)}return canvas.toBlob(function(blob){document.body.removeChild(canvas);return res({blob:blob,url:URL.createObjectURL(blob),filename:name+".png"})})}else if(type==="scss"){data=["$palette-name: '"+name+"'"];for(i$=0;i$<len;++i$){i=i$;data.push("$palette-color"+(i+1)+": "+ldColor.web(pal.colors[i])+";")}blob=new Blob([data.join("\n")],{type:"text/plain"});return res({blob:blob,url:URL.createObjectURL(blob),filename:name+".scss"})}})};ldPalette.download=function(pal,type){type==null&&(type="png");return ldPalette.convert(pal,type).then(function(ret){var a;a=ld$.create({name:"a",attr:{download:ret.filename,href:ret.url},style:{display:"none"}});document.body.appendChild(a);a.click();return document.body.removeChild(a)})};ldPalettePicker.register("loadingio","Attack on Titan,1d0e0b 774023 d88c51 f3e7c9 fff9f5,artwork,gradient\nBleach / ブリーチ,0a0a0a 28292f ffffff f9ae5c e4812f,artwork,diverging\nBig Hero 6,85a2b6 bbcedd dce4eb fdfdfd d69293 be5960 a00d1e,artwork,disney,diverging\nFrozen - Elsa alt,1d3f72 5699d2 d8ebf9 71c2cc 4996a2 785471 e8cdc5 eee7d8,artwork,disney\nFrozen - Elsa,93dbe9 689cc5 5e6fa3 3b4368 191d3a d9dbee b3b7e2,artwork,disney\nFrozen,292664 667395 94a9ce b5ccf1 f5f4fa f2bed1 87434d 552b2f,artwork,disney,diverging\nMaleficent,912623 f0f5f6 a2b4bc 7394a4 32495c 0e151e,artwork,disney\nThe Lion King,290908 491212 831a19 c24229 dd8437 eeb440 d8cea7,artwork,disney,gradient\nThe Little Mermaid,df1317 e4934b e2bb8b e1e7e7 91bcc6 07abcc 0a69aa 194645,artwork,disney\nWinnie the Pooh,220b09 d34c31 e88432 ff312d f5c037 e89788 fd3262 f0c3a9 9d9aca 645481,artwork,disney\nWreck It Ralph,3c0f0f f91a10 e46b43 edb195 2aa7c9 06628d 04284d,artwork,disney\nDragon Ball / ドラゴンボール,1c4595 e76a24 01080a e7e5e8 fbbc42,artwork\nKung Fu Panda,a12d2b be4939 dc6949 080604 f7f6ea 7d8176 f3b63f,artwork,dreamworks\nMadagascar,695b50 9e8978 b5a393 1c1612 fefefe ce611e fdd039 594531 916631 ddb867,artwork,dreamworks\nPenguins of Madagascar,262323 fefefe a24124 e37e44 dae4e5 adbcbf 77868b 53585a,artwork,dreamworks\nPrince of Egypt,2f2926 603417 74411f 8e511c bc8540 d5912e e3ab45,artwork,dreamworks\nShrek - alt,b3c430 4c5630 f7faf8 80aaf3 984f48 539a55,artwork,dreamworks\nEmerald City,985d4e e0dcb8 aca730 4f563b 9db189 60a363 2c8c14 0a4308 607c83 466277,artwork\nNeon Genesis Evangelion / 新世紀エヴァンゲリオン,5f2a62 a976c3 a0de59 466b5a f5c024,artwork,qualitative\nYuu Gi Ou / 遊☆戯☆王,141414 ab3259 dcc75b e8c7ae 082267,artwork\nHappiness and Cyanide,facd9e 389798 459448 f19d3b 923f2b,artwork,qualitative\n涼宮ハルヒ,3e6d8d 4b9bbe eef3ef f9aa47 c93228,artwork,diverging\nMagica Madoka / 魔法少女まどか☆マギカ,ffb6bb ffe691 95d5ee 585872 9e4446,artwork,qualitative\nMinions alt,eb7f19 dfa950 94733c f4edd8 fae127 189ad2 a5b5bc 53697e 2d2a2e,artwork\nMinions,eab145 fad96d 959795 4a6985 3e444e 221a1a 813513 e8e1d6 fdfdfd,artwork\nNaruto / ナルト,fdf4af edb870 f7d8b4 1b2124 06080a e86e38 f72405,artwork\nOne Piece / ワンピース,c8472c 412a1e f8de3c fefefe 58acf4 105edd 0b3075,artwork\nSpirited Away / 千と千尋の神隠し (alt),d2d2cb 4d695d 83a79d dae8e5 30b0e0 a1cde5 bfdeee bc252d,artwork\nSpirited Away / 千と千尋の神隠し,7d5753 e0aa82 1f1418 441a21 7e1f30 db3548 4a4041 2c1d1e,artwork\nYour Name / 君の名は,8cd0e5 376888 826b88 de786a f8b976 fcddc9,artwork\nYour Name / 君の名は,0055a5 45aee7 bda0b2 ce64a6 d8f05b 55ad15,artwork\nChinese Water Color / 中國水墨畫,832f0e 0c0a08 594a40 8e7967 e3c2a0 deaa6e 81947a,artwork\nGreat Wave off Kanagawa / 神奈川沖浪裏,7f745b bfa95b d4c787 82C0AF 29526E 171F40,artwork,diverging\nLiberty Leading the People / La Liberté guidant le peuple,18161b 9e2721 fffed8 1e3049 3f4b58 97876d 7a6c5a 463b32,artwork\nda Vinci / Mona Lisa,322923 513e2e 896038 d7a05b eabe7c cdb590 aa916a 816f53,artwork\nVincent van Gogh / Starry Night over the Rhone,151e2f 2a3e83 dad69f feeb54 a3945d 6d82b1 303f63,artwork\nEdvard Munch / The Scream / Skrik,514134 e35839 d28d4f dbae1d 477187 323a3f,artwork\n500px,0099e5 ff4c4c 34bf49,brand,qualitative\n7-11,f81b24 009553 fe5d27,brand\n7up,215d38 14a651 e9eee8 ec1c2d,brand\nDribbble,ea4c89 c32361,brand\nLego,d01012 f6ec36 ffffff 000000,brand\nNetflix,e50914 221f1f f5f5f1,brand\nReactjs,222222 00d8ff,brand\nACTI,ea3f34 f2982c 52a360 674794 080808,brand,qualitative\nAdobe After Effect,1b0629 dc93f8,brand\nAdobe Illustrator,281300 e26c00,brand\nAdobe Bridge,1d150a edb426,brand\nAdobe Lightroom,182731 a7d4ec,brand\nAdobe Photoshop,0b1d27 72cbfd,brand\nGoogle Adsense,f3b72e 3869c5 4686f4,brand\nGoogle Adwords,4f7abe 0a7142 13a365,brand\nAmazon,000000 fefefe f19a33,brand\nAmerica Express,002663 4d4f53,brand\nArriva,004d73 00334e 007fdb dbebfa 832561 11862f bfca02 848a8c,brand\nAsana,3be8b0 1aafd0 6a67ce ffb900 fc636b,brand,qualitative\nBandai Namco / バンダイナムコ,da3732 e4762f f7be33,brand,gradient\nBest buy,003b64 fff200,brand\nBitly,ee6123 eeca77 7db0dc,brand\nBootstrap,337ab7 5bc0de 5cb85c f0ad4e d9534f,brand,qualitative\nBower,52382b e46547 fecc47 59a82c 27abea,brand,qualitative\nBurger King,ec1c24 fdbd10 0066b2,brand,qualitative\nCarrefour,d63635 00569d,brand\nDomino's Pizza,dc3942 0f6491,brand\nebay,d74946 0069ce f0af31 94b224,brand,qualitative\nElastic Search,d7689d f3d337 a0c443 66b5ae 5da4dc 40769e,brand\nMicrosot Excel,b65955 a5b75c 59aac2 4f83ba 7868a2,brand\nFacebook,456caa 88a2ce c2d2ee fefefe,brand\nFedex,e87033 fefefe 562d94,brand\nFerrari,cc232a fef02d 001c27 ffffff 459a56,brand\nGithub,82bbe4 a3d9ef 211f1f f0ccb4 a66156,brand\nGodaddy,60aa4f edd041 e27a3b,brand\nGoogle Analytics,ee5a30 ffffff f7981e,brand\nGoogle Chart,c44129 ec9332 3e8410 0560bd,brand,qualitative\nGoogle Drive,ffd14f 4ba761 2882fb,brand\nGoogle,c5523f f2b736 499255 1875e5,brand,qualitative\nIkea,f2bc39 033a8b,brand\nInstagram,4658ac e7008a ff003a ff6d00 ffc53f,brand\nIsrael Railways,00aeec 262470 e6a430,brand\nKFC / Kentucky Fried Chicken,c41230 f2d4b7 ffefe0 ffffff 261c02,brand\nKickstarter,020621 2bde73,brand\nKodak,ffb718 ffffff e21d19,brand\nKonami / コナミ,a22e29 f24a3c f7943c,brand\nLivinplay,e6431d,brand\nLocalBitcoins,00599e e77817,brand\nMaster Card,cc0000 ffffff ff9900,brand\nMcDonald,df1a21 ffca00,brand\nMicrosoft,f05125 fdb813 7fbb42 32a0da,brand,qualitative\nNBC,fcb711 f37021 cc004c 6460aa 0089d0 0db14b,brand,qualitative\nNikon / ニコン,ffde35 ffffff 140402,brand\nOktopost,008fd4 001f2d,brand\nOlympic,1386c4 f3c232 000000 47993d d23539,brand,qualitative\nPepsi,ec1e25 04acec 282e92,brand\nPinterest,b83128 ce6260 e9b6ae fefefe,brand,gradient\nPizza Hut,f13e36 fbb238 479705 000000,brand,qualitative\nSalesforce,109ad7 fdfdfe,brand\nShell,dd1d21 fbce07,brand\nSlack,bd4030 e0b83e 7f9626 76be9f 9bcfde 599f8c 36173b 563e58 cc4876 f4f3f1,brand\nsprite,014c86 00a950 6bc048 fad000,brand\nStarbucks,101010 224634 2f6144 416753 869b92 fcfdfe,brand\nSubway,1f5242 ffee36,brand\nTableau,ca1e32 eb7e24 c0c4c9 5c8c9c 3a5487,brand,diverging\nTrivago,2973b8 e37a1f a3171a,brand\nTrulia,52b548 41455f,brand\nTwitter,009ef7 ffffff,brand\nYahoo,65106e ffffff,brand\nZillow,0074e4 ffffff 74c005,brand\nMi / 小米,f47436 ffffff,brand\nWeChat / 微信,346b21 94d137 b3e46e f0f1f2,brand\nAlipay / 支付寶,003c8b 0e9dec ffffff f47735 393737,brand\nTaobao / 淘寶,ff4400 ffffff,brand\nBaidu / 百度,e53a2f ffffff 0733dc,brand\nHUAWEI / 華為,f03d32 ffffff 000000,brand\nAlibaba / 阿里巴巴,db7033 ffffff 1f1a18,brand\nBrown,611f0a 8d4b1f b46f39 d6ae7c f0d9a7,concept,gradient\nRed,7b0000 c34c37 fd7f64 ffbea0 ffece8,gradient,concept\nOrange,905a39 c78d69 fabb95 ffdcb5 fff7ee,gradient,concept\nYellow,79681e a49838 cbbe6c ece3b2 faf7ed,gradient,concept\nGreen,157759 53ab8b 82dbb8 a2fdd9 eafff9,gradient,concept\nCyan,084f5a 38737f 6099a5 88c3cf c2edf7,gradient,concept\nBlue,0051a2 1b75be 408ee0 89bff8 e3f1ff,concept,gradient,concept\nPurple,74007a a53faa da70dc fab0fa ffe9ff,gradient,concept\nGray,6a6a6a 979797 bdbdbd e2e2e2 f8f8f8,gradient,concept\nBlack White,353535 666666 9b9b9b d4d4d4 ffffff,gradient,concept\nTurquoise,1d5167 437f79 7aab92 b0c7a2 e8f2d1,gradient,concept\nPurplish,420457 5a3faa 708adc b0d6f9 e8faff,gradient,concept\nDirt,2c160a 56341b 81572a a97e39 cfa949 f1d75c,gradient,concept\nlime,072824 1b4f3e 3d7a52 6ca55e a9d066 f3f86e,gradient,concept\nteal,15212b 204651 247074 309d8e 55c89d 8df9a2,gradient,concept\nlilac,17232d 343f52 595d7a 867aa2 b9998ca f3b4f0,gradient,concept\nHCL,4d2527 6c4760 617899 38acaf 6fda97 e6f972,qualitative\nBrown,200800 522506 864411 a36316 ce862b,concept\nCool,6252c5 2a9fde 21e499 7ff658,concept\nCyan,00fff5 aafbfb 4cd4cc 049bba 10808b,concept\nDark,9c0404 5a0b0b 290e0e 000000 3f3f3f,concept,gradient\nGold,f4e4c4 ebdaa2 e4c484 d3ab58 aa811e,concept\nGolden Light,eca611 fdc823 fff36a fffeaf fffbd6,concept\nGolden Rose,b49998 9f715a eae1da 936162 d69484 3f4448,concept\nGolden,aaa8a1 f4f2ea e6cb6b b88d17 8d6a14,concept\nGreen,d4ecc9 a2d895 75b34c c3d582 e5eebf,concept\nInferno,140b34 84206b e55c30 f6d746,concept\nOrange,fc4309 ff765c ffb646 ff9900 ff6600,concept\nOrange,f08d43 f6eddc f9d887 ab2f0c 817441,concept\nOrange,f7f7f7 545454 141414 ff7841 d83700,concept\nRed,a80909 d62e2e fc5c5c eeeeee ff0000,concept\nPink,ff727d ffd391 fffbd0 90ffb5 60e7f3,concept,diverging\nPure Light Blue,ffffff f5fdff e7f6ff dbecff d3e6ff,concept,gradient\nPure Light Gray,ffffff f8f8f8 f0f0f0 ebebeb e7e7e7,concept,gradient\nPure Light Green,ffffff f8fff5 ecffe7 e4ffdb d7ffd3,concept,gradient\nPure Light Red,ffffff fff5f5 ffe7e7 ffdbdb ffd3d3,concept,gradient\nPure Light Yellow,ffffff fffef5 fffde7 fff9db fff5d3,concept,gradient\nPurple,e4d8eb caacd4 b06cc5 9e3ea7 75017a,concept,gradient\nRed,a52e0e c94d3a ee7749 eca56c eeceb3,concept,gradient\nSilver,f3f3f3 d8dddf b8babd a3a3ac 727a7e,concept,gradient\nViridis,482173 2e6f8e 29af7f bddf26,concept\nWarm,923db3 f5468e ff803f c6d63c,concept\nYellow,f36100 fa902f ffb856 ffd55d ffff34,concept,gradient\nYellow,089ccc f5b70f cc0505 e7e0c9 9bcc31,concept\nUnder Construction,111111 d60000 ffd914,concept\nWedding Color,ffffcb fac090 ff7c81 c0f6d2 dae4bf,concept\nAntique,a69159 293439 c84445 eceded 959ca0,concept\nDesert,706d5d b4b197 f4efcc e2d07e bfa65f,concept,diverging\nLGBT,fe0000 ff6300 ffff01 008001 4600ff 830189,concept,qualitative\nPaint Palette,ee393d eca05a fce754 8ef16f 3d8bdf,concept,qualitative\nPaint Palette,fff8a1 f3d0bd d99370 dd2f65 449c98,concept\nPop,F5542E F2C327 008B6E 00AEDE 0067AD,concept,qualitative\nTender,F29C98 F5B697 F5E797 A2E4F5 009DD3,concept\nTropical,51CACC 9DF871 E0FF77 DE9DD6 FF708E,concept,qualitative\nWedding Color,f3dcb2 cacbc5 a5a6a0 d3e6ea 89a1a3,concept\nWedding Color,e90c59 fe718d ffe6f5 c2dfd7 46dff0,concept,diverging\nWedding Color,e15b64 f47e60 f8b26a abbd81 849b87,concept\nYoung,f5076a ecec4c f3f2f3 84e2c0 00a1d5,concept,diverging\nKirby's Adventure,dd0459 fd99a7 eb6896 eeeeee 070a0d,artwork\nMario Bros,0058c7 ffffff f0dbb6 df281d 602c18,artwork\nMinecraft,717171 654832 497537 81acff,artwork,qualitative\nTaiko no Tatsujin / 太鼓の達人,f84828 68c0c0 f8f0e0 cba331 7bbab0,artwork\nTaiko no Tatsujin / 太鼓の達人,ff0000 7fb54f 3f4c28 e7006d,artwork,qualitative\nTaiko no tatsujin / 太鼓の達人,fe0d02 feb200 043b42,artwork\nYoshi's Island,6bd34b f7f7f7 f76717 c20909 296516,artwork\nA River Runs Through It,e6f5ce bce1aa 6e8763 475f40 437f64 204342 11292c,artwork\nAlice In Wonderland,46221e 812e23 b7402a 404d2c 6fa12b 49772e 243720 ddc3d1 b8898d,artwork\nAlien,000000 fefefe a7a6a3 a0ac32 194820 141d16,artwork\nAmélie,200c0b 5c1a12 bb260d a58168 71543b ebd8cb f0bc15 076d24 034917 022a0f,artwork\nBig Fish,6477a2 8c8dac cba7a2 ecc3a6 6b524c b0897c b3701b 814c18 392619,artwork\nMarvel / Captain America,9b3430 fefefe aeb7c2 3b5fa4 171b31,artwork\nCobra,d78e8b 190b27 470718 700c1d cc0106 a50206,artwork\nEmerald City,985d4e e0dcb8 aca730 4f563b 9db189 60a363 2c8c14 0a4308 607c83 466277,artwork\nFriday the 13th,fefefe cec9c9 3c302e bb171a,artwork\nInception,1d2830 064d69 7ba6b7 dee7e6 e23046,artwork\nIndiana Jones,97583f 271811 54331d a96d44 de8e49 f9f5e3 b5a185 ebd5a0 efc54d,artwork\nInterstellar,f9b580 fffdf1 fdf3cc c5a8a1 223c44 02121e,artwork\nJurassic Park,781d18 e23123 e5756c d9bcb4 180806 f0b83e 998354 675538 3e1e14,artwork\nLord of the Rings,251d18 402f21 5a452e 72593d 896f4c a0855e b79c71 c9b18a e7d9bd f3ead8,artwork,gradient\nMetropolis,1d0e03 4f3c1e 7f683f c3a470 b29050,artwork\nMinions alt,eb7f19 dfa950 94733c f4edd8 fae127 189ad2 a5b5bc 53697e 2d2a2e,artwork\nMinions,eab145 fad96d 959795 4a6985 3e444e 221a1a 813513 e8e1d6 fdfdfd,artwork\nScarface,868384 090505 f4f3f3 8d0706 cf0805 302e2f,artwork\nSearching for Sugar Man,1d0303 56210b d6750b f7f9f0 e7c385,artwork\nSin City,e50707 fbfbfb c9bbb4 a39b9a 50403f ba8264 21191b,artwork\nMarvel / Spiderman,da5047 822720 030104 abadbf 0648a9 021656,artwork\nStar Wars - Dagobah,ecf1c1 a0a485 525445 34796a 276460 25484f 28333c 1f2731 010102,artwork\nStar Wars - Yoda,d5cfb6 9d9974 3c3c20 616640 75934e,artwork\nThe Endless Summer,7b344f c95182 f25da0 fbdf02 fb9627 8d581b 4f2e1c ec826d,artwork\nThe Hobbit,6c6661 554e49 342d27 ad9376 8c765d 705a47 ccb9a3 9b9792,artwork\nThe Matrix Revolutions,9fb943 607e37 b6c89f 262d1e 345530 3b673f 5a8662,artwork\nThe Shawshank Redemption,261a19 3f2924 663d30 90573b c27945 e7af64 f4d692 f3e8c4 fdfcfa b0a698,artwork\nThe Wolf of Wall Street,b2856d 2f241e e0b799 633c18 9b6527 f6a824 a1a2ae 413f46 6b656a e5e1e3,artwork\nTwilight - Eclipse,4d2e2d 684947 9a7f79 c6a79c 454648 363739 171517,artwork\nUnderworld Evolution,31395a 1d2031 5c607e a8a4b9 c9c5d5 0c0b0d,artwork\nV for Vendetta,000000 701916 ac2c25 ddcebe 8f7f71 4a4641,artwork\nWatchmen,83641d c5b526 faf015 799564 a4d1c1 4ca69d 09908a 0b3231 0d504f 080e0e,artwork\nWay of the Gun,cf3f2d dd8342 f0efee 999794 504c35 a4953d d0ba2b ecd62f 050406,artwork\nRainbow,e6261f eb7532 f7d038 a3e048 49da9a 34bbe6 4355db d23be7,concept,qualitative\nHello Kitty,f90013 ffe700 ffffff 0054ae 251815,concept,diverging\nPom Pom Purin,fefcac ffffff a65c18,concept\nBee,f8f7de f7ea87 d29d30 854d0d 3a200c,concept,gradient\nRose,46300d a00816 e91629 efefe9 188009,concept\n");var ldPage,slice$=[].slice;ldPage=function(opt){var ref$,that;opt==null&&(opt={});if(opt.fetch){this._fetch=opt.fetch;delete opt.fetch}this.evtHandler={};this.data={};this.handle={};this.offset=0;this.running=false;this.end=false;this.disabled=opt.enabled!=null?!opt.enabled:false;this.opt=import$({boundary:0,limit:20,offset:0,scrollDelay:100,fetchDelay:200,fetchOnScroll:false},opt);this.limit=(ref$=this.opt).limit;this.offset=ref$.offset;if(that=this.opt.host){this.setHost(that)}return this};ldPage.prototype=import$(Object.create(Object.prototype),{_fetch:function(){return new Promise(function(res,rej){return res({payload:[]})})},toggle:function(v){return this.disabled=v!=null?!v:!this.disabled},on:function(n,cb){var ref$;return((ref$=this.evtHandler)[n]||(ref$[n]=[])).push(cb)},fire:function(n){var v,i$,ref$,len$,cb,results$=[];v=slice$.call(arguments,1);for(i$=0,len$=(ref$=this.evtHandler[n]||[]).length;i$<len$;++i$){cb=ref$[i$];results$.push(cb.apply(this,v))}return results$},init:function(opt){var k,ref$,v;opt==null&&(opt={});for(k in ref$=this.handle){v=ref$[k];clearTimeout(v)}this.offset=0;this.end=false;if(opt.data){return this.data=opt.data}},fetchable:function(){return!(this.disabled||this.end||this.running)},isEnd:function(){return this.end},setHost:function(host){var f,update,this$=this;if(!host||(host===window||host===document||host===document.body)){host=document.scrollingElement}f=function(e){return this$.onScroll(e)};if(this.host){this.host.removeEventListener("scroll",f)}this.host=typeof host==="string"?document.querySelector(host):host;if(!this.host){this.host=null;return}if(this.opt.fetchOnScroll&&!this.opt.pivot){return this.host.addEventListener("scroll",f)}if(this.opt.pivot){if(this.obs){this.obs.unobserve(this.opt.pivot)}update=function(ns){if(!(ns.map(function(it){return it.isIntersecting}).filter(function(it){return it}).length&&this$.fetchable())){return}return this$.fetch().then(function(it){return this$.fire("scroll.fetch",it)})};this.obs=new IntersectionObserver(update,{});return this.obs.observe(this.opt.pivot)}},onScroll:function(){var this$=this;if(!this.fetchable()){return}clearTimeout(this.handle.scroll);return this.handle.scroll=setTimeout(function(){if(this$.host.scrollHeight-this$.host.scrollTop-this$.host.clientHeight>this$.opt.boundary){return}if(this$.fetchable()){return this$.fetch().then(function(it){return this$.fire("scroll.fetch",it)})}},this.opt.scrollDelay)},setLoader:function(){},parseResult:function(it){return it},fetch:function(opt){var this$=this;opt==null&&(opt={});return new Promise(function(res,rej){if(!this$.fetchable()){return res([])}if(this$.handle.fetch){clearTimeout(this$.handle.fetch)}return this$.handle.fetch=setTimeout(function(){this$.running=true;return this$._fetch().then(function(ret){ret==null&&(ret=[]);ret=this$.parseResult(ret);this$.running=false;this$.offset+=ret.length||0;if(ret.length<this$.limit){this$.fire(!this$.offset?"empty":"finish");this$.end=true}return res(ret)})},opt.delay||this$.opt.fetchDelay||200)})}});function import$(obj,src){var own={}.hasOwnProperty;for(var key in src)if(own.call(src,key))obj[key]=src[key];return obj}var slice$=[].slice;(function(){var debounce;debounce=function(f,o){var ref$,l,ret;if(typeof f==="number"&&!(o!=null)){return new Promise(function(res,rej){return setTimeout(function(){return res()},f)})}if(typeof o==="function"){ref$=[o,f],f=ref$[0],o=ref$[1]}if(!o){o={}}ref$=typeof f==="object"?[f.func,f]:[f,{delay:typeof o==="object"?o.delay||750:o}],f=ref$[0],o=ref$[1];l={};ret=function(){var args,used,p,this$=this;args=slice$.call(arguments);used=false;p=new Promise(function(res,rej){if(used){return}if(l.h){ret.clear()}l.res=res;l.rej=rej;return l.h=setTimeout(function(){var ret;ret=f.apply(this$,args);if(ret&&typeof ret.then==="function"){ret.then(function(){var args;args=slice$.call(arguments);return res.apply(null,args)})}else{res(ret)}return l.res=null,l.rej=null,l.h=0,l},o.delay||750)});p.now=function(){used=true;ret.clear();return f.apply(this$,args)};p.cancel=function(){return ret.clear()};return p};ret.clear=function(){clearTimeout(l.h);if(l.res){l.res(null)}return l.h=0,l.res=null,l.rej=null,l};return ret};if(typeof module!="undefined"&&module!==null){module.exports=debounce}if(typeof window!="undefined"&&window!==null){return window.debounce=debounce}})();var slice$=[].slice;(function(){var vh,pool,polling;vh=function(){if(pool.visible=!document.hidden){return pool.list.map(function(it){return it()})}};pool={inited:false,visible:typeof document!="undefined"&&document!==null?!document.hidden:true,list:[]};polling=function(f,d){var ref$,l,func;d==null&&(d=1e3);if(typeof f==="number"){ref$=[d,f],f=ref$[0],d=ref$[1]}if(typeof document!="undefined"&&document!==null&&!vh.inited){document.addEventListener("visibilitychange",vh,false)}pool.inited=true;l={};func=function(){var args,p,this$=this;args=slice$.call(arguments);if(l.res){return Promise.reject(new Error("polling function re-entry blocked"))}return p=new Promise(function(res,rej){var run;l.res=res;l.rej=rej;l.on=true;pool.list.push(l.run=run=function(){var ret;ret=f.apply(this$,args);if(ret){return func.stop(ret)}if(pool.visible&&l.on){return l.h=setTimeout(run,d)}});return run()})};func.stop=function(p){var res;clearTimeout(l.h);if(pool.list.indexOf(l.run)>=0){pool.list.splice(pool.list.indexOf(l.run),1)}res=l.res;l.res=null;l.rej=null;l.on=false;l.run=null;return res(p)};return func};if(typeof module!="undefined"&&module!==null){module.exports=polling}if(typeof window!="undefined"&&window!==null){return window.polling=polling}})();var slice$=[].slice;(function(){var _,proxise;_=function(q,v,n){return q.splice(0,q.length).map(function(o){o[n](v);if(o.timeout){return clearTimeout(o.timeout)}})};proxise=function(a,b){var ref$,f,timeout,q,ret;ref$=a instanceof Function?[a,b||0]:[b,a||0],f=ref$[0],timeout=ref$[1];q=[];ret=function(){var args,r,pair,handle;args=slice$.call(arguments);if((r=f.apply(this,args))instanceof Promise){return r}else{pair=null;handle=timeout?setTimeout(function(){var idx;if(!(pair&&~(idx=q.indexOf(pair)))){return}q.splice(idx,1);return pair.rej(new Error("timeout"))},timeout):null;return new Promise(function(res,rej){return q.push(pair={res:res,rej:rej,timeout:handle})})}};ret.resolve=function(v){return _(q,v,"res")};ret.reject=function(v){return _(q,v,"rej")};return ret};if(typeof module!="undefined"&&module!==null){module.exports=proxise}if(typeof window!="undefined"&&window!==null){return window.proxise=proxise}})();(function(){var ldLoader;ldLoader=function(opt){var this$=this;opt==null&&(opt={});this.opt=import$({activeClass:"running",baseZ:4e3,autoZ:false,className:"",atomic:true},opt);["root","container"].map(function(n){if(opt[n]){return this$[n]=(Array.isArray(opt[n])?opt[n]:[opt[n]]).map(function(it){var ret;ret=typeof it==="string"?document.querySelector(it):it;if(!ret){console.warn("[ldLoader] warning: no node found for "+it)}return ret})}});if(!this.container){this.container=this.root?this.root.map(function(it){return it.parentNode}):[document.body]}if(!this.root){this.root=this.container.map(function(it){var node;node=document.createElement("div");it.appendChild(node);return node})}this.root.map(function(it){it.classList.add.apply(it.classList,(this$.opt.className||"").split(" ").filter(function(it){return it}));it.classList.remove(opt.activeClass);if(opt.inactiveClass){return it.classList.add(opt.inactiveClass)}});this.running=false;this.count=0;return this};ldLoader.prototype=import$(Object.create(Object.prototype),{isOn:function(){return this.running},on:function(delay){delay==null&&(delay=0);return this.toggle(true,delay)},off:function(delay,force){delay==null&&(delay=0);force==null&&(force=false);return this.toggle(false,delay,force)},cancel:function(v){clearTimeout(this.handle);if(v!=null){return this.toggle(v)}},flash:function(dur,delay){var this$=this;dur==null&&(dur=1e3);delay==null&&(delay=0);return this.toggle(true,delay).then(function(){return this$.toggle(false,dur+delay)})},render:function(){var runid,_,ret,this$=this;if(!(this.running&&this.opt.ctrl&&this.opt.ctrl.step)){return this.render.runid=-1}this.render.runid=runid=Math.random();this.render.start=0;if(this.opt.ctrl.init){this.root.map(function(it){return this$.opt.ctrl.init.call(it)})}_=function(t){if(!this$.render.start){this$.render.start=t}this$.root.map(function(it){return this$.opt.ctrl.step.call(it,t-this$.render.start)});if(this$.render.runid===runid){return requestAnimationFrame(function(it){return _(it)})}else if(this$.opt.ctrl.done){return this$.root.map(function(it){return this$.opt.ctrl.done.call(it,t-this$.render.start)})}};return ret=requestAnimationFrame(function(it){return _(it)})},toggle:function(v,delay,force){var d,this$=this;delay==null&&(delay=0);force==null&&(force=false);d=!(v!=null)?this.root[0].classList.contains(this.opt.activeClass)?-1:1:v?1:-1;if(this.handle){this.cancel()}if(delay){return new Promise(function(res,rej){return this$.handle=setTimeout(function(){return this$.toggle(v).then(function(){return res()})},delay)})}return new Promise(function(res,rej){var running,z,ref$,idx;this$.count+=d;if(!force&&!this$.opt.atomic&&(this$.count>=2||this$.count===1&&d<0)){return res()}this$.root.map(function(it){it.classList.toggle(this$.opt.activeClass,d>0);if(this$.opt.inactiveClass){return it.classList.toggle(this$.opt.inactiveClass,d<0)}});this$.running=running=this$.root[0].classList.contains(this$.opt.activeClass);if(this$.opt.ctrl){this$.render()}if(!this$.opt.autoZ){return res()}if(running){this$.z=z=((ref$=ldLoader.zstack)[ref$.length-1]||0)+this$.opt.baseZ;this$.root.map(function(it){return it.style.zIndex=z});ldLoader.zstack.push(z)}else{if((idx=ldLoader.zstack.indexOf(this$.z))<0){return res()}this$.root.map(function(it){return it.style.zIndex=""});ldLoader.zstack.splice(idx,1)}return res()})}});import$(ldLoader,{zstack:[]});return window.ldLoader=ldLoader})();function import$(obj,src){var own={}.hasOwnProperty;for(var key in src)if(own.call(src,key))obj[key]=src[key];return obj}var ldForm,slice$=[].slice;ldForm=function(opt){var root,fields,status,el,that,check,k,ref$,v,this$=this;opt==null&&(opt={});this.opt=opt;this.root=root=typeof opt.root==="string"?ld$.find(document,opt.root,0):opt.root;this.evtHandler={};this.fields=fields={};this.status=status={all:1};this.el=el={};if(opt.submit!=null){el.submit=typeof opt.submit==="string"?ld$.find(this.root,opt.submit,0):opt.submit}if(!el.submit){if(that=ld$.find(root,"[type=submit]",0)){el.submit=that}}["debounce","verify","names","getFields","afterCheck"].map(function(n){if(opt[n]){return this$[n]=opt[n]}});check=function(e){return this$.check({n:e&&e.target?e.target.getAttribute("name"):undefined,e:e})};this.fields=fields=this.getFields(root);for(k in ref$=opt.values||{}){v=ref$[k];this.fields[k].value=v}for(k in fields){v=fields[k];v.addEventListener("input",check);status[k]=1}this.checkDebounced=debounce(330,function(n,fs,s,res,rej){var names,all,len,that;names=this.names(s);all=s.all;delete s.all;this.afterCheck(s,fs);len=names.map(function(n){return s[n]!=null&&s[n]===0}).filter(function(it){return!it}).length;if(!(s.all!=null)){s.all=!len?0:1}names.map(function(n){var x$;x$=fs[n].classList;x$.toggle("is-invalid",s[n]===2);x$.toggle("is-valid",s[n]<1);return x$});if(all!==s.all){this.fire("readystatechange",s.all===0)}if(that=this.el.submit){that.classList.toggle("disabled",s.all!==0)}return res()});if(opt.init){opt.init.apply(this)}if(this.opt.initCheck){this.checkAll()}return this};ldForm.prototype=import$(Object.create(Object.prototype),{on:function(n,cb){var ref$;return((ref$=this.evtHandler)[n]||(ref$[n]=[])).push(cb)},fire:function(n){var v,i$,ref$,len$,cb,results$=[];v=slice$.call(arguments,1);for(i$=0,len$=(ref$=this.evtHandler[n]||[]).length;i$<len$;++i$){cb=ref$[i$];results$.push(cb.apply(this,v))}return results$},field:function(n){return this.fields[n]},reset:function(){var ref$,s,fs,this$=this;ref$=[this.status,this.fields],s=ref$[0],fs=ref$[1];s.all=1;this.names(s).map(function(n){fs[n].value="";fs[n].classList.remove("is-invalid","is-valid");return s[n]=1});return this.check()},ready:function(){return this.status.all===0},verify:function(n,v,e){return v?0:2},names:function(){var k,results$=[];for(k in this.fields){results$.push(k)}return results$},debounce:function(){return true},afterCheck:function(){},values:function(){var ret,k,ref$,v;ret={};for(k in ref$=this.fields){v=ref$[k];ret[k]=v.getAttribute("type")==="checkbox"?v.checked:v.value}return ret},getfd:function(){var fd,k,ref$,v,i$,to$,i;fd=new FormData;for(k in ref$=this.fields){v=ref$[k];if(v.files&&v.files.length){for(i$=0,to$=v.files.length;i$<to$;++i$){i=i$;fd.append(k+"[]",v.files[i])}}else{fd.append(k,v.value)}}return fd},getFields:function(root){var ret;ret={};ld$.find(this.root,"[name]").map(function(f){return ret[f.getAttribute("name")]=f});return ret},checkAll:function(){var k,v;return Promise.all(function(){var ref$,results$=[];for(k in ref$=this.fields){v=ref$[k];results$.push(this.check({n:k,now:true}))}return results$}.call(this))},check:function(opt){var this$=this;opt==null&&(opt={});return new Promise(function(res,rej){var ref$,n,e,now,fs,s;ref$={n:opt.n,e:opt.e,now:opt.now},n=ref$.n,e=ref$.e,now=ref$.now;if(n&&!in$(n,this$.names(s))){return}if(n!=null&&!this$.fields[n]){return rej(new Error("ldForm.check: field "+n+" not found."))}ref$=[this$.fields,this$.status],fs=ref$[0],s=ref$[1];if(fs[n]){s[n]=this$.verify(n,fs[n].value,fs[n])}if(this$.debounce(n,s)&&!now){return this$.checkDebounced(n,fs,s,res,rej)}else{return this$.checkDebounced(n,fs,s,res,rej).now()}})}});function import$(obj,src){var own={}.hasOwnProperty;for(var key in src)if(own.call(src,key))obj[key]=src[key];return obj}function in$(x,xs){var i=-1,l=xs.length>>>0;while(++i<l)if(x===xs[i])return true;return false}(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){var byteToHex=[];for(var i=0;i<256;++i){byteToHex[i]=(i+256).toString(16).substr(1)}function bytesToUuid(buf,offset){var i=offset||0;var bth=byteToHex;return bth[buf[i++]]+bth[buf[i++]]+bth[buf[i++]]+bth[buf[i++]]+"-"+bth[buf[i++]]+bth[buf[i++]]+"-"+bth[buf[i++]]+bth[buf[i++]]+"-"+bth[buf[i++]]+bth[buf[i++]]+"-"+bth[buf[i++]]+bth[buf[i++]]+bth[buf[i++]]+bth[buf[i++]]+bth[buf[i++]]+bth[buf[i++]]}module.exports=bytesToUuid},{}],2:[function(require,module,exports){var getRandomValues=typeof crypto!="undefined"&&crypto.getRandomValues.bind(crypto)||typeof msCrypto!="undefined"&&msCrypto.getRandomValues.bind(msCrypto);if(getRandomValues){var rnds8=new Uint8Array(16);module.exports=function whatwgRNG(){getRandomValues(rnds8);return rnds8}}else{var rnds=new Array(16);module.exports=function mathRNG(){for(var i=0,r;i<16;i++){if((i&3)===0)r=Math.random()*4294967296;rnds[i]=r>>>((i&3)<<3)&255}return rnds}}},{}],3:[function(require,module,exports){var rng=require("./lib/rng");var bytesToUuid=require("./lib/bytesToUuid");function v4(options,buf,offset){var i=buf&&offset||0;if(typeof options=="string"){buf=options==="binary"?new Array(16):null;options=null}options=options||{};var rnds=options.random||(options.rng||rng)();rnds[6]=rnds[6]&15|64;rnds[8]=rnds[8]&63|128;if(buf){for(var ii=0;ii<16;++ii){buf[i+ii]=rnds[ii]}}return buf||bytesToUuid(rnds)}module.exports=v4},{"./lib/bytesToUuid":1,"./lib/rng":2}],4:[function(require,module,exports){var easingFit,cubic,easing,kitsList,uuid,GBCR,ref$,cos,sin,tan,anikit;easingFit=require("easing-fit");cubic=require("cubic");easing=require("./easing");kitsList=require("./kits-list.gen");uuid=require("uuid/v4");GBCR=function(n){return n.getBoundingClientRect()};if(typeof navigator!="undefined"&&navigator!==null){if(/Firefox\/([0-9.]+)/.exec(navigator.userAgent)){GBCR=function(n){var box,t;box=n.getBoundingClientRect();t=getComputedStyle(n).transform;t=t.trim().substring(7).replace(/[)]/g,"").split(",");if(t.length<6){t=[1,0,0,1,0,0]}t=t.map(function(it){return+it});return box.x=box.x+t[4],box.y=box.y+t[5],box}}}ref$={cos:Math.cos,sin:Math.sin,tan:Math.tan},cos=ref$.cos,sin=ref$.sin,tan=ref$.tan;anikit=function(name,opt){var ref$;opt==null&&(opt={});ref$=anikit.get(name,opt),this.mod=ref$.mod,this.config=ref$.config;ref$=[name,null,uuid()],this.name=ref$[0],this.dom=ref$[1],this.id=ref$[2];this.setConfig(this.config);return this};anikit.prototype=import$(Object.create(Object.prototype),{setConfig:function(c){var ref$;c==null&&(c={});import$(this.config,c);if(this.dom){this.dom.textContent=this.mod.css((ref$=import$({},this.config),ref$.name=this.config.name+"-"+this.id,ref$))}return this.mod.config=this.config},getConfig:function(){return this.config},cls:function(cfg,opt){var prefix,name,css,ref$,re,has,k,js,initValues,n,v,origin,selector,that;cfg==null&&(cfg={});opt==null&&(opt={});if(!this.mod.css){return null}prefix=opt.prefix||"";name=(prefix?prefix+"-":"")+(opt.name||this.config.name||this.mod.name||"unnamed");css=this.mod.css(cfg=(ref$=import$(import$({},this.config),cfg),ref$.name=name,ref$));re={skewX:/skewX\(0(deg)?\)/g,skewY:/skewY\(0(deg)?\)/g,rotate:/rotate\(0(deg)?\)/g,scale:/scale\(1(,1)?\)/g};has={};(function(){var results$=[];for(k in re){results$.push(k)}return results$})().map(function(k){if(new RegExp(k).exec(css.replace(re[k],""))){return}return css=css.replace(re[k],"")});css=css.replace(/\s+;/g,";");if(this.mod.js&&cfg.repeat){js=this.mod.js(0,cfg);initValues=["animation-fill-mode: forwards"].concat(function(){var ref$,results$=[];for(n in ref$=js){v=ref$[n];results$.push(n+": "+v)}return results$}()).join(";")}else{initValues=""}origin=!(cfg.origin!=null)?"":"transform-origin: "+[(ref$=cfg.origin)[0],ref$[1]].map(function(it){return it*100+"%"}).join(" ");selector=((that=opt.alias)?that.map(function(it){return prefix+"-"+it}):[name]).map(function(it){return"."+prefix+"."+it}).join(",");return""+css+"\n"+selector+" {\n  animation: "+name+" "+(cfg.dur||1)+"s "+(cfg.repeat||"infinite")+" linear; "+initValues+"; "+origin+"\n}"},css:function(opt){opt==null&&(opt={});if(this.mod.css){return this.mod.css(import$(import$({},this.config),opt))}else{return{}}},js:function(t,opt){opt==null&&(opt={});if(this.mod.js){return this.mod.js(t,opt=import$(import$({},this.config),opt))}},affine:function(t,opt){opt==null&&(opt={});if(this.mod.affine){return this.mod.affine(t,opt=import$(import$({},this.config),opt))}},getDom:function(){if(!this.dom){document.body.appendChild(this.dom=document.createElement("style"));this.dom.setAttribute("id",this.config.name+"-"+this.id);this.dom.setAttribute("data-anikit","");this.setConfig()}return this.dom},timing:function(t,opt){opt==null&&(opt=this.config);t=t/(opt.dur||1);if(opt.repeat<0){return t}if(opt.repeat&&t>opt.repeat){t=1}if(t!==Math.floor(t)){t=t-Math.floor(t)}return t},animateJs:function(node,t,opt){var that,k,v,origin;opt==null&&(opt={});opt=import$(import$({},this.config),opt);if(that=node.ldStyle){for(k in that){v=that[k];node.style[k]=""}}origin=(that=this.config.origin)?that:[.5,.5,.5];t=this.timing(t,opt);node.ldStyle=this.js(t,opt);import$(node.ldStyle,[origin[0],origin[1]].map(function(it){return it*100+"%"}).join(" "));return import$(node.style,node.ldStyle)},animateThree:function(node,t,opt){var values,box,bbox,ref$,wx,wy,wz,nx,ny,nz,m,mat,gmat,opacity;opt==null&&(opt={});opt=import$(import$({},this.config),opt);t=this.timing(t,opt);values=this.affine(t,opt);if(!values){return}box=(new THREE.Box3).setFromObject(node);node.geometry.computeBoundingBox();bbox=node.geometry.boundingBox;ref$=["x","y","z"].map(function(it){return bbox.max[it]-bbox.min[it]}).map(function(d,i){return((opt.origin||values.transformOrigin||[.5,.5,.5])[i]-.5)*d}),wx=ref$[0],wy=ref$[1],wz=ref$[2];ref$=["x","y","z"].map(function(it){return(bbox.max[it]+bbox.min[it])*.5}),nx=ref$[0],ny=ref$[1],nz=ref$[2];if((nx||ny||nz)&&!node.repos){m=new THREE.Matrix4;m.set(1,0,0,-nx,0,1,0,-ny,0,0,1,-nz,0,0,0,1);node.geometry.applyMatrix(m);node.repos=m.getInverse(m)}node.matrixAutoUpdate=false;mat=values.transform||[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];[3,7,11].map(function(it){return mat[it]=mat[it]/40});gmat=(new THREE.Matrix4).makeTranslation(wx,wy,wz);node.matrix.set.apply(node.matrix,mat);node.matrix.multiply(gmat);node.matrix.premultiply(gmat.getInverse(gmat));if(node.repos){node.matrix.premultiply(node.repos)}opacity=values.opacity!=null?values.opacity:1;if(node.material.uniforms&&node.material.uniforms.alpha){node.material.uniforms.alpha.value=opacity}node.material.transparent=true;return node.material.opacity=opacity},animate:function(node,opt){var that,ref$,dur,rpt,dir,origin;opt==null&&(opt={});opt=import$(import$({},this.config),opt);this.getDom();ref$=[opt.dur||1,(that=opt.repeat)?that:"infinite",opt.animationDir||"normal"],dur=ref$[0],rpt=ref$[1],dir=ref$[2];origin=(that=this.config.origin)?that:[.5,.5,.5];node.style.transformOrigin=[origin[0],origin[1]].map(function(it){return it*100+"%"}).join(" ");node.style.animation=this.config.name+"-"+this.id+" "+dur+"s "+rpt+" linear forwards "+dir;return node.style.animationDelay=(opt.delay||0)+"s"},origin:function(n,h,opt){var x,y,ox,oy,s,that,z,value,ref$;opt==null&&(opt={});x=opt.x,y=opt.y,ox=opt.ox,oy=opt.oy,s=opt.s;if(x!=null&&y!=null){return anikit.util.origin(n,h,x,y,ox,oy,s!=null?s:1)}if(that=this.config.origin){x=that[0],y=that[1],z=that[2]}else if(this.mod.affine){value=this.mod.affine(0,this.config);if(value.transformOrigin){ref$=value.transformOrigin,x=ref$[0],y=ref$[1],z=ref$[2]}}if(!(x!=null)||!(y!=null)){ref$=[.5,.5,.5],x=ref$[0],y=ref$[1],z=ref$[2]}if(n.style){return anikit.util.origin(n,h,x,y,ox,oy,s!=null?s:1)}},statify:function(node){var k,ref$,v;for(k in ref$=node.ldStyle){v=ref$[k];node.style[k]=null}return node.style.animation=node.style.animationDelay=""},destroy:function(){if(this.dom&&this.dom.parentNode){return this.dom.parentNode.removeChild(this.dom)}}});import$(anikit,{util:{m4to3:function(m){return[m[0],m[1],m[4],m[5],m[3],-m[7]].map(function(it){return easingFit.round(it)})},noise:function(t){return(Math.sin(t*43758.5453)+1)*.5},round:easingFit.round,decompose:function(mat,opt){var a,b,c,d,e,f,D,t,ref$,kx,ky,r,s,R,S,u;opt==null&&(opt={});a=mat[0],b=mat[1],c=mat[2],d=mat[3],e=mat[4],f=mat[5];D=a*d-b*c;t=[e,f];ref$=[0,0,0,[0,0]],kx=ref$[0],ky=ref$[1],r=ref$[2],s=ref$[3];if(a||b){R=Math.sqrt(a*a+b*b);r=(b>0?1:-1)*Math.acos(a/R);s=[R,D/R];kx=Math.atan((a*c+b*d)/(R*R))}else if(c||d){S=Math.sqrt(c*c+d*d);r=Math.PI/2-(d>0?Math.acos(-c/s):-Math.acos(c/s));s=[D/s,s];ky=Math.atan(a*c+b*d)/(s*s)}else{s=[0,0]}u=opt.unit||"px";return["translate("+t[0]+u+","+t[1]+u+")","rotate("+r*180/Math.PI+"deg)","scale("+s[0]+","+s[1]+")","skewX("+kx*180/Math.PI+"deg)","skewY("+ky*180/Math.PI+"deg)"].join(" ")},kth:function(n,m,k){if(k>n){k=n}if(m===1){return k}k=k*m+m-1;while(k>=n){k=k-n+Math.floor((k-n)/(m-1))}return k},origin:function(n,h,px,py,ox,oy,s){var ref$,x,y,svg,_,mat,p,abox,rbox,p1,p2,box,nb,hb,this$=this;px==null&&(px=.5);py==null&&(py=.5);ox==null&&(ox=0);oy==null&&(oy=0);s==null&&(s=1);if(typeof h.x===(ref$=typeof h.width)&&ref$==="number"){ref$=[h.x+h.width*px,h.y+h.height*py],x=ref$[0],y=ref$[1];n.style.transformOrigin=x+"px "+y+"px";return[x,y]}else if(n.transform){svg=null;_=function(n){var that;if(n.nodeName.toLowerCase()==="svg"){svg=n;return n.createSVGMatrix()}return _(n.parentNode).multiply((that=n.transform&&n.transform.baseVal.consolidate())?that.matrix:svg.createSVGMatrix())};mat=_(n.parentNode);p=svg.createSVGPoint();abox=n.getBoundingClientRect();rbox=h.getBoundingClientRect();p1=(p.x=abox.x-rbox.x,p.y=abox.y-rbox.y,p).matrixTransform(mat.inverse());p2=(p.x=abox.x+abox.width-rbox.x,p.y=abox.y+abox.height-rbox.y,p).matrixTransform(mat.inverse());box={x:p1.x,y:p1.y,width:p2.x-p1.x,height:p2.y-p1.y};ref$=[box.x+box.width*px,box.y+box.height*py],x=ref$[0],y=ref$[1];n.style.transformOrigin=x+"px "+y+"px";return[x,y]}else{ref$=[n,h].map(function(it){return GBCR(it)}),nb=ref$[0],hb=ref$[1];x=nb.width*px+nb.x-hb.x+ox;y=nb.height*py+nb.y-hb.y+oy;n.style.transformOrigin=x*s+"px "+y*s+"px";return[x,y]}},order:function(i,n,t){t==null&&(t=0);if(t===0){return i}else if(t===1){return n-i-1}else if(t===2){return this.kth(n,n*n+7,i)}},rx:function(t){return[1,0,0,0,0,cos(t),-sin(t),0,0,sin(t),cos(t),0,0,0,0,1]},ry:function(t){return[cos(t),0,sin(t),0,0,1,0,0,-sin(t),0,cos(t),0,0,0,0,1]},rz:function(t){return[cos(t),sin(t),0,0,-sin(t),cos(t),0,0,0,0,1,0,0,0,0,1]},tx:function(t){return[1,0,0,t,0,1,0,0,0,0,1,0,0,0,0,1]},ty:function(t){return[1,0,0,0,0,1,0,-t,0,0,1,0,0,0,0,1]},tz:function(t){return[1,0,0,0,0,1,0,0,0,0,1,t,0,0,0,1]},sx:function(t){return[t,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]},sy:function(t){return[1,0,0,0,0,t,0,0,0,0,1,0,0,0,0,1]},sz:function(t){return[1,0,0,0,0,1,0,0,0,0,t,0,0,0,0,1]},s:function(t){return[t,0,0,0,0,t,0,0,0,0,t,0,0,0,0,1]},kx:function(t){return[1,-tan(t),0,0,0,1,0,0,0,0,1,0,0,0,0,1]},ky:function(t){return[1,0,0,0,tan(t),1,0,0,0,0,1,0,0,0,0,1]}},set:function(name,mod){var k,ref$,v,results$=[];this.mods[name]=mod;if(mod.preset){for(k in ref$=mod.preset){v=ref$[k];results$.push(this.types[k]=name)}return results$}},get:function(name,opt){var config,ret,mod,k,v,ref$,o;opt==null&&(opt={});config={name:name,dur:1,repeat:0};ret=this.types[name]?this.mods[this.types[name]]:this.mods[name];mod={};for(k in ret){v=ret[k];mod[k]=v}mod.edit=JSON.parse(JSON.stringify(mod.edit));if(mod.preset[name]){for(k in ref$=mod.edit){v=ref$[k];o=mod.preset[name][k];if(o&&o["default"]!=null){import$(mod.edit[k],mod.preset[name][k])}}}for(k in ref$=mod.edit){v=ref$[k];config[k]=v["default"]}if(mod.preset[name]){for(k in config){v=config[k];o=mod.preset[name][k];if(typeof o==="undefined"||typeof o==="object"&&o["default"]!=null){continue}config[k]=o}config.prop=(ref$=mod.preset[name]).prop;config.value=ref$.value;config.local=ref$.local;config.origin=ref$.origin}import$(config,opt);return{mod:mod,config:config}},mods:kitsList.mods,types:kitsList.types});if(typeof window!="undefined"&&window!==null){window.easing=easing;window.anikit=anikit;window.easingFit=easingFit;window.cubic=cubic}if(typeof module!="undefined"&&module!==null){import$(module.exports,anikit);module.exports.anikit=anikit}function import$(obj,src){var own={}.hasOwnProperty;for(var key in src)if(own.call(src,key))obj[key]=src[key];return obj}(function(){var ldAnikitPicker;ldAnikitPicker=function(opt){var handler,this$=this;this.opt=opt;this.root=typeof opt.root==="string"?document.querySelector(opt.root):opt.root;this.ldcv=new ldCover({root:this.root});this.input=this.root.querySelector("input");this.item=Array.from(this.root.querySelectorAll(".item"));this.base=this.root.querySelector(".base");this.root.addEventListener("click",function(e){var n,ret;n=e.target;while(n&&n!==this$.root){if(n.classList.contains("item")){break}n=n.parentNode}if(!(n&&n.classList.contains("item"))){return}ret=n.getAttribute("data-value");return this$.ldcv.set({name:ret,info:{limited:n.classList.contains("limited")}})});handler=function(){return this$.item.map(function(it){return it.style.display=!~it.textContent.indexOf(this$.input.value)?"none":"block"})};this.input.addEventListener("keydown",function(e){if(e.keyCode!==27){return e.stopPropagation()}});this.input.addEventListener("input",handler);this.ldcv.on("toggle.on",debounce(250,function(){return this$.input.focus()}));return this};ldAnikitPicker.prototype=import$(Object.create(Object.prototype),{get:function(opt){opt==null&&(opt={});this.pos(opt);return this.ldcv.get()},pos:function(opt){var box;opt==null&&(opt={});if(opt.host){box=opt.host.getBoundingClientRect();return this.base.style.left=box.x+"px"}},applyFilters:function(o){var this$=this;if(o!=null){["disableFilter","defaultFilter"].map(function(it){if(o[it]){return this$.opt[it]=o[it]}})}return ld$.find(this.root,".item").map(function(d,i){var ret;if(this$.opt.disableFilter){ret=this$.opt.disableFilter(d.getAttribute("data-anikit"),i);ld$.cls(d,this$.opt.limitHard?{disabled:ret}:{limited:ret})}if(this$.opt.defaultFilter&&!this$.opt.defaultFilter(d.getAttribute("data-anikit"),i)){return ld$.remove(d)}})}});return window.ldAnikitPicker=ldAnikitPicker})();function import$(obj,src){var own={}.hasOwnProperty;for(var key in src)if(own.call(src,key))obj[key]=src[key];return obj}},{"./easing":5,"./kits-list.gen":6,cubic:37,"easing-fit":38,"uuid/v4":3}],5:[function(require,module,exports){var ref$,js,gl,cb,ret;ref$=[{},{},{}],js=ref$[0],gl=ref$[1],cb=ref$[2];ret={js:js,cb:cb,glsl:gl};js.linear=function(t){return t};cb.linear=function(t){return[.5,.5,.5,.5]};gl.linear="float linear(float t) { return t; }";js.easeInOutQuad=function(t){if(t<.5){return 2*t*t}else{return 4*t-2*t*t-1}};cb.easeInOutQuad=[.455,.03,.515,.955];gl.easeInOutQuad="float easeInOutQuad(float t) { \n  return (t < 0.5 ? 2. * t * t : 4. * t - 2. * t * t - 1.); \n}";js.easeOutQuad=function(t){return t*(2-t)};module.exports=ret},{}],6:[function(require,module,exports){var mods={blink:require("./kits/blink"),"blur-transition":require("./kits/blur-transition"),blur:require("./kits/blur"),"bounce-rigid":require("./kits/bounce-rigid"),"bounce-transition":require("./kits/bounce-transition"),bounce:require("./kits/bounce"),clock:require("./kits/clock"),fade:require("./kits/fade"),flip:require("./kits/flip"),float:require("./kits/float"),heartbeat:require("./kits/heartbeat"),hit:require("./kits/hit"),"jump-transition":require("./kits/jump-transition"),move:require("./kits/move"),orbit:require("./kits/orbit"),patrol:require("./kits/patrol"),power:require("./kits/power"),pulse:require("./kits/pulse"),rubber:require("./kits/rubber"),rush:require("./kits/rush"),skew:require("./kits/skew"),slide:require("./kits/slide"),spin:require("./kits/spin"),squeeze:require("./kits/squeeze"),static:require("./kits/static"),surprise:require("./kits/surprise"),throw:require("./kits/throw"),tremble:require("./kits/tremble"),vortex:require("./kits/vortex"),wrench:require("./kits/wrench")};var types={blink:"blink","blur-in":"blur-transition","blur-out":"blur-transition",blur:"blur",beat:"bounce-rigid",bounceAlt:"bounce-rigid","tick-alt":"bounce-rigid",jump:"bounce-rigid","bounce-alt-out":"bounce-transition","bounce-alt-in":"bounce-transition","bounce-out":"bounce-transition","bounce-in":"bounce-transition","spring-ltr-in":"bounce-transition","spring-rtl-in":"bounce-transition","spring-ttb-in":"bounce-transition","spring-btt-in":"bounce-transition",bounce:"bounce",clock:"clock",fade:"fade",flip:"flip",float:"float",heartbeat:"heartbeat",hit:"hit","jump-alt-in":"jump-transition","jump-alt-out":"jump-transition","jump-in":"jump-transition","jump-out":"jump-transition","zoom-in":"jump-transition","zoom-out":"jump-transition","fade-in":"jump-transition","fade-out":"jump-transition","grow-rtl-in":"jump-transition","grow-rtl-out":"jump-transition","grow-ltr-in":"jump-transition","grow-ltr-out":"jump-transition","grow-ttb-in":"jump-transition","grow-ttb-out":"jump-transition","grow-btt-in":"jump-transition","grow-btt-out":"jump-transition","flip-v-in":"jump-transition","flip-v-out":"jump-transition","flip-h-in":"jump-transition","flip-h-out":"jump-transition","slide-rtl-in":"jump-transition","slide-rtl-out":"jump-transition","slide-ltr-in":"jump-transition","slide-ltr-out":"jump-transition","slide-ttb-in":"jump-transition","slide-ttb-out":"jump-transition","slide-btt-in":"jump-transition","slide-btt-out":"jump-transition","float-rtl-in":"jump-transition","float-rtl-out":"jump-transition","float-ltr-in":"jump-transition","float-ltr-out":"jump-transition","float-ttb-in":"jump-transition","float-ttb-out":"jump-transition","float-btt-in":"jump-transition","float-btt-out":"jump-transition","fall-rtl-in":"jump-transition","fall-ltr-in":"jump-transition","fall-ttb-in":"jump-transition","fall-btt-in":"jump-transition","move-ltr":"move","move-rtl":"move","move-ttb":"move","move-btt":"move","move-fade-ltr":"move","move-fade-rtl":"move","move-fade-ttb":"move","move-fade-btt":"move",orbit:"orbit",breath:"patrol",dim:"patrol",metronome:"patrol",swing:"patrol","wander-v":"patrol","wander-h":"patrol","power-off":"power","power-on":"power",pulse:"pulse",jingle:"rubber","rubber-v":"rubber","rubber-h":"rubber","shake-v":"rubber","shake-h":"rubber",tick:"rubber",smash:"rubber","jelly-alt":"rubber",jelly:"rubber",damage:"rubber","rush-ltr":"rush","rush-rtl":"rush","rush-ttb":"rush","rush-btt":"rush","rush-ltr-in":"rush","rush-rtl-in":"rush","rush-ttb-in":"rush","rush-btt-in":"rush",skew:"skew","skew-alt":"skew","slide-ltr":"slide","slide-rtl":"slide","slide-btt":"slide","slide-ttb":"slide","coin-h":"spin","coin-v":"spin",cycle:"spin","cycle-alt":"spin","flip-h":"spin","flip-v":"spin","spin-fast":"spin",spin:"spin",squeeze:"squeeze",static:"static",surprise:"surprise","throw-ttb-in":"throw","throw-ltr-in":"throw","throw-rtl-in":"throw","throw-btt-in":"throw",measure:"tremble",shiver:"tremble",swim:"tremble",tremble:"tremble",vortex:"vortex","vortex-alt":"vortex","vortex-in":"vortex","vortex-out":"vortex","vortex-alt-in":"vortex","vortex-alt-out":"vortex",wrench:"wrench"};module.exports={mods:mods,types:types}},{"./kits/blink":7,"./kits/blur":9,"./kits/blur-transition":8,"./kits/bounce":12,"./kits/bounce-rigid":10,"./kits/bounce-transition":11,"./kits/clock":13,"./kits/fade":14,"./kits/flip":15,"./kits/float":16,"./kits/heartbeat":17,"./kits/hit":18,"./kits/jump-transition":19,"./kits/move":20,"./kits/orbit":21,"./kits/patrol":22,"./kits/power":23,"./kits/pulse":24,"./kits/rubber":25,"./kits/rush":26,"./kits/skew":27,"./kits/slide":28,"./kits/spin":29,"./kits/squeeze":30,"./kits/static":31,"./kits/surprise":32,"./kits/throw":33,"./kits/tremble":34,"./kits/vortex":35,"./kits/wrench":36}],7:[function(require,module,exports){(function(){var easingFit,cubic,anikit,ret;if(typeof require!="undefined"&&require!==null){easingFit=require("easing-fit");cubic=require("cubic");anikit=require("../anikit")}ret={name:"blink",type:"animation",preset:{blink:{}},edit:{dur:{default:1},showtime:{default:.5,type:"number",min:.01,max:.99,step:.01},transtime:{default:.01,type:"number",min:.01,max:1,step:.01}},css:function(opt){var delta;delta=opt.transtime*opt.showtime*.5;return"@keyframes "+opt.name+" {\n  0% { opacity: 1; }\n  "+anikit.util.round(100*(opt.showtime-delta))+"% { opacity: 1; }\n  "+anikit.util.round(100*(opt.showtime+delta))+"% { opacity: 0; }\n  "+anikit.util.round(100*(1-2*delta))+"% { opacity: 0; }\n  100% { opacity: 1; }\n}"},js:function(t,opt){var delta;delta=opt.transtime*opt.showtime*.5;if(t<opt.showtime-delta){t=1}else if(t<opt.showtime+delta){t=1-(t-(opt.showtime-delta))/(2*delta)}else if(t>1-2*delta){t=(t-(1-2*delta))/(2*delta)}else{t=0}return{opacity:t}},affine:function(t,opt){return this.js(t,opt)}};if(typeof module!="undefined"&&module!==null){module.exports=ret}return ret})()},{"../anikit":4,cubic:37,"easing-fit":38}],8:[function(require,module,exports){(function(){var easingFit,cubic,anikit,ret;if(typeof require!="undefined"&&require!==null){easingFit=require("easing-fit");cubic=require("cubic");anikit=require("../anikit")}ret={name:"blur-transition",type:"animation",preset:{"blur-in":{dir:-1,repeat:1},"blur-out":{dir:1,repeat:1}},edit:{blur:{name:"Blur Amount",default:10,type:"number",unit:"px",units:["px","%"],min:0,max:100,step:1},dir:{default:1,type:"number",min:-1,max:1,step:2,hidden:true},unit:{default:"px",type:"choice",values:["px","%",""]}},css:function(opt){var p;p=opt.dir>0?[0,100]:[100,0];return"@keyframes "+opt.name+" {\n  "+p[0]+"% { filter: blur(0); opacity: 1 }\n  "+p[1]+"% { filter: blur("+opt.blur+opt.unit+"); opacity: 0 }\n}"},js:function(t,opt){if(opt.dir<0){t=1-t}return{filter:"blur("+opt.blur*t+opt.unit+")",opacity:1-t}}};if(typeof module!="undefined"&&module!==null){module.exports=ret}return ret})()},{"../anikit":4,cubic:37,"easing-fit":38}],9:[function(require,module,exports){(function(){var easingFit,cubic,anikit,ret;if(typeof require!="undefined"&&require!==null){easingFit=require("easing-fit");cubic=require("cubic");anikit=require("../anikit")}ret={name:"blur",type:"animation",preset:{blur:{}},edit:{blur:{name:"Blur Amount",default:10,type:"number",unit:"px",units:["px","%"],min:0,max:100,step:1},unit:{default:"px",type:"choice",values:["px",""]}},css:function(opt){return"@keyframes "+opt.name+" {\n  0% { filter: blur(0) }\n  50% { filter: blur("+opt.blur+opt.unit+") }\n  100% { filter: blur(0) }\n}"},js:function(t,opt){return{filter:"blur("+opt.blur*(1-Math.abs(t-.5)*2)+opt.unit+")"}}};if(typeof module!="undefined"&&module!==null){module.exports=ret}return ret})()},{"../anikit":4,cubic:37,"easing-fit":38}],10:[function(require,module,exports){(function(){var easingFit,cubic,anikit,ret;if(typeof require!="undefined"&&require!==null){easingFit=require("easing-fit");cubic=require("cubic");anikit=require("../anikit")}ret={name:"bounce-rigid",type:"animation",preset:{beat:{count:1,decay:.5,unit:"",offset:{name:"Scale Amount",default:.2,min:-1,max:1,step:.01,unit:""},prop:function(f,c){return{transform:"scale("+(1+c.offset*f.value)+")"}},value:function(t,c){return{transform:anikit.util.s(1+t*c.offset)}}},bounceAlt:{count:0,decay:.5,power:0,unit:"px",offset:{name:"Jump Height",default:-14,min:-300,max:300,unit:"px",step:1},prop:function(f,c){return{transform:"translate(0, "+c.offset*f.value+c.unit+")"}},value:function(t,c){return{transform:anikit.util.ty(c.offset*t)}}},"tick-alt":{count:5,unit:"",offset:{name:"Rotate Amount",default:-45,min:-180,max:180,step:1,unit:"deg"},prop:function(f,c){return{transform:"rotate("+f.value*c.offset+"deg)"}},value:function(t,c){return{transform:anikit.util.rz(t*c.offset*Math.PI/180)}}},jump:{count:5,unit:"px",offset:{name:"Jump Height",default:-14,min:-300,max:300,unit:"px",step:1},prop:function(f,c){return{transform:"translate(0,"+f.value*c.offset+c.unit+")"}},value:function(t,c){return{transform:anikit.util.ty(t*c.offset)}}}},edit:{steep:{default:.4,type:"number",min:.3,max:1,step:.01},count:{name:"Bounce Count",default:5,type:"number",min:0,max:10},decay:{name:"Bounce Decay",default:.6,type:"number",min:0,max:1,step:.01},power:{name:"Decay Speed",default:1.1,type:"number",min:0,max:10,step:.01},offset:{name:"Offset",default:-14,type:"number",unit:"px",min:-300,max:300},unit:{default:"px",type:"choice",values:["px","%",""]}},timing:function(t,opt){var p1,p2,R,i$,to$,i,pp,pf,ph,d;p1=[opt.steep,0,1,1-opt.steep];p2=[0,opt.steep,1-opt.steep,1];R=(opt.decay-1)/(Math.pow(opt.decay,opt.count+1)-1);for(i$=0,to$=opt.count;i$<=to$;++i$){i=i$;pp=R*(Math.pow(opt.decay,i)-1)/(opt.decay-1);pf=R*(Math.pow(opt.decay,i+1)-1)/(opt.decay-1);ph=(pf+pp)*.5;d=Math.pow(Math.pow(opt.decay,opt.power),i);if(t<ph){t=(t-pp)/(ph-pp);t=cubic.Bezier.y(cubic.Bezier.t(t,p2),p2)}else if(t<pf){t=(t-ph)/(pf-ph);t=cubic.Bezier.y(cubic.Bezier.t(t,p1),p1);t=1-t}else{continue}return t*d}return 0},css:function(opt){var ref$,ref1$,this$=this;return easingFit.fitToKeyframes(function(it){return this$.timing(it,opt)},(ref$=(ref1$=import$({},opt.local)||{},ref1$.config=opt,ref1$),ref$.name=opt.name,ref$.prop=opt.prop,ref$))},js:function(t,opt){return opt.prop({value:this.timing(t,opt)},opt)},affine:function(t,opt){return opt.value(this.timing(t,opt),opt)}};if(typeof module!="undefined"&&module!==null){module.exports=ret}return ret})();function import$(obj,src){var own={}.hasOwnProperty;for(var key in src)if(own.call(src,key))obj[key]=src[key];return obj}},{"../anikit":4,cubic:37,"easing-fit":38}],11:[function(require,module,exports){(function(){var easingFit,cubic,anikit,easing,spring,ret;if(typeof require!="undefined"&&require!==null){easingFit=require("easing-fit");cubic=require("cubic");anikit=require("../anikit");easing=require("../easing")}spring={prop:function(f,c,d){var value;value=this.value(f.value,c,d,f.percent);return{transform:anikit.util.decompose(anikit.util.m4to3(value.transform),c),opacity:value.opacity}},value:function(t,c,d,p){var sgn,ref$;t=c.dir>0?t:1-t;if(c.dir<0&&t>1){t=1}t>=.01||(t=.01);if(d<3){sgn=d===1?1:-1;return{transform:[1,0,0,c.offset*(1-t)*sgn,0,1,0,0,0,0,1,0,0,0,0,1],opacity:(ref$=p*10)<1?ref$:1}}else{sgn=d===3?1:-1;return{transform:[1,0,0,0,0,1,0,c.offset*(1-t)*sgn,0,0,1,0,0,0,0,1],opacity:(ref$=p*10)<1?ref$:1}}}};ret={name:"bounce-transition",type:"animation",preset:{"bounce-alt-out":{dir:-1,count:3,mag:.1,offset:{default:0,hidden:true}},"bounce-alt-in":{dir:1,count:3,mag:.1,extrude:.5,offset:{default:0,hidden:true}},"bounce-out":{dir:-1,count:4,mag:.2,offset:{default:0,hidden:true}},"bounce-in":{dir:1,count:4,mag:.2,extrude:.5,offset:{default:0,hidden:true},local:{sampleCount:40,errorThreshold:1e-4,segSampleCount:1e3}},"spring-ltr-in":{label:"spring-in (left to right)",dir:1,count:3,mag:.2,extrude:.5,offset:50,prop:function(f,c){return spring.prop(f,c,2)},value:function(t,c,p){return spring.value(t,c,2,p)}},"spring-rtl-in":{label:"spring-in (right to left)",dir:1,count:3,mag:.2,extrude:.5,offset:50,prop:function(f,c){return spring.prop(f,c,1)},value:function(t,c,p){return spring.value(t,c,1,p)}},"spring-ttb-in":{label:"spring-in (top to bottom)",dir:1,count:3,mag:.2,extrude:.5,offset:50,prop:function(f,c){return spring.prop(f,c,3)},value:function(t,c,p){return spring.value(t,c,3,p)}},"spring-btt-in":{label:"spring-in (bottom to top)",dir:1,count:3,mag:.2,extrude:.5,offset:50,prop:function(f,c){return spring.prop(f,c,4)},value:function(t,c,p){return spring.value(t,c,4,p)}}},edit:{dir:{type:"number",default:1,hidden:true,min:-1,max:1,step:2},count:{name:"Bounce Count",type:"number",default:30,min:0,max:50,step:1},mag:{name:"Amount",type:"number",default:.3,min:.01,max:1,step:.01},extrude:{type:"number",default:0,min:0,max:1,step:.01,hidden:true},offset:{type:"number",default:0,min:-500,max:500,step:1},throw:{name:"Throw in?",type:"boolean",default:false,hidden:true},unit:{default:"px",type:"choice",values:["px","%",""]},repeat:{default:1}},local:{prop:function(f,c){var value;value=this.value(f.value,c);return{transform:"matrix("+anikit.util.m4to3(value.transform).join(",")+")",opacity:value.opacity}},value:function(t,c,p){var ref$;t=c.dir>0?t:1-t;if(c.dir<0&&t>1){t=1}t>=.01||(t=.01);return{transform:[t,0,0,0,0,t,0,0,0,0,t,0,0,0,0,1],opacity:(ref$=p*10)<1?ref$:1}}},timing:function(t,opt){var wave,delta;wave=Math.cos(t*6.28*opt.count)*(1-Math.pow(t,opt.mag));delta=1-Math.pow(t,opt.mag*(1-opt.extrude));if(opt["throw"]&&t>.5/opt.count){wave=-Math.abs(wave)}return 1-(wave+delta)},css:function(opt){var local,prop,ret,ref$,ref1$,ref2$,this$=this;local={sampleCount:20,errorThreshold:.001,segSampleCount:1e3};prop=function(f,c){if(opt.prop){return opt.prop(f,c)}else{return this$.local.prop(f,c)}};ret=easingFit.fitToKeyframes(function(it){return this$.timing(it,opt)},(ref$=(ref1$=(ref2$=import$(local,opt.local)||{},ref2$.config=opt,ref2$),ref1$.name=opt.name,ref1$),ref$.prop=prop,ref$));return ret},js:function(t,opt){var value,ret;value=this.affine(t,opt);ret={};if(value.transform){ret.transform="matrix("+anikit.util.m4to3(value.transform).join(",")+")"}return ret},affine:function(t,opt){var ot;ot=t;t=this.timing(t,opt);return opt.value?opt.value(t,opt):this.local.value(t,opt,ot)}};if(typeof module!="undefined"&&module!==null){module.exports=ret}return ret})();function import$(obj,src){var own={}.hasOwnProperty;for(var key in src)if(own.call(src,key))obj[key]=src[key];return obj}},{"../anikit":4,"../easing":5,cubic:37,"easing-fit":38}],12:[function(require,module,exports){(function(){var easingFit,cubic,anikit,ret;if(typeof require!="undefined"&&require!==null){easingFit=require("easing-fit");cubic=require("cubic");anikit=require("../anikit")}ret={name:"bounce",type:"animation",preset:{bounce:{}},edit:{unit:{default:"px",type:"choice",values:["px","%",""]},height:{name:"Bounce Height",default:-40,type:"number",min:-500,max:500},offset:{default:50,type:"number",min:-500,max:500},rate:{default:13/18,type:"number",min:0,max:1,step:.01,hidden:true},deflate:{name:"Scale Amount",default:.6,type:"number",min:0,max:1,step:.01}},step:function(t,opt){var args,y,s;opt==null&&(opt={});args=[opt.height,opt.offset,opt.rate,opt.deflate];if(t<args[2]){t=t/args[2];y=args[0]*(.25-Math.pow(t-.5,2))*4;s=1}else{t=(t-args[2])/(1-args[2]);s=args[3]+(1-args[3])*Math.pow(t-.5,2)/.25;y=args[1]*(1-s)}return[1,0,0,s,0,y]},css:function(opt){var optAlt,ret1,ret2,ret,this$=this;optAlt=JSON.parse(JSON.stringify(opt));optAlt.height=1;ret1=easingFit.fit(function(it){return this$.step(it,optAlt)[5]},{end:opt.rate});ret2=easingFit.fit(function(it){return this$.step(it,optAlt)[3]},{start:opt.rate});ret1.pop();ret=ret1.concat(ret2);ret=easingFit.toKeyframes(ret,{format:"css",prop:function(f,c,idx){var s,y;if(idx<ret1.length){return{transform:"translate(0,"+f.value*c.height+c.unit+") scaleY(1)"}}else{s=f.value;y=(c.offset||50)*(1-s);return{transform:"translate(0,"+y+c.unit+") scaleY("+f.value+")"}}},name:opt.name,config:opt});return ret},js:function(t,opt){var mat;mat=this.step(t,opt);return{transform:"matrix("+mat.join(",")+")"}},affine:function(t,opt){var mat;mat=this.step(t,opt);return{transform:[mat[0],mat[1],0,mat[4],mat[2],mat[3],0,-mat[5],0,0,1,0,0,0,0,1]}}};if(typeof module!="undefined"&&module!==null){module.exports=ret}return ret})()},{"../anikit":4,cubic:37,"easing-fit":38}],13:[function(require,module,exports){(function(){var easingFit,cubic,anikit,ret;if(typeof require!="undefined"&&require!==null){easingFit=require("easing-fit");cubic=require("cubic");anikit=require("../anikit")}ret={name:"clock",type:"animation",preset:{clock:{}},edit:{dur:{default:12},steep:{default:.7,type:"number",min:0,max:1,step:.01},count:{default:12,type:"number",min:1,max:60,step:1}},timing:function(t,opt){var p1,base,next,offset;p1=[0,opt.steep,1-opt.steep,1];base=Math.floor(t*opt.count)/opt.count;next=Math.ceil(t*opt.count)/opt.count;offset=t-base;t=cubic.Bezier.y(cubic.Bezier.t(offset*opt.count,p1),p1);return(next-base)*t+base},css:function(opt){var list,i$,to$,i,p,d;list=[];for(i$=0,to$=opt.count;i$<=to$;++i$){i=i$;p=easingFit.round(i*100/opt.count);d=360*i/opt.count;list.push(""+p+"% {\n  animation-timing-function: cubic-bezier(0,"+opt.steep+","+(1-opt.steep)+",1);\n  transform: rotate("+d+"deg);\n}")}return"@keyframes "+opt.name+" {\n"+list.join("\n")+"\n}"},js:function(t,opt){return{transform:"rotate("+this.timing(t,opt)*360+"deg)"}},affine:function(t,opt){return{transform:anikit.util.rz(this.timing(t,opt)*Math.PI*2)}}};if(typeof module!="undefined"&&module!==null){module.exports=ret}return ret})()},{"../anikit":4,cubic:37,"easing-fit":38}],14:[function(require,module,exports){(function(){var easingFit,cubic,anikit,ret;if(typeof require!="undefined"&&require!==null){easingFit=require("easing-fit");cubic=require("cubic");anikit=require("../anikit")}ret={name:"fade",type:"animation",preset:{fade:{prop:function(f,c){return{opacity:1-f.value}},value:function(t,c){return{opacity:1-t}}}},edit:{dur:{default:1},steep:{default:0,type:"number",min:0,max:.5,step:.01}},timing:function(t,opt){var p1;p1=[opt.steep,.5-opt.steep,.5+opt.steep,1-opt.steep];return t=cubic.Bezier.y(cubic.Bezier.t(t,p1),p1)},css:function(opt){var ref$,ref1$,this$=this;return easingFit.fitToKeyframes(function(it){return this$.timing(it,opt)},(ref$=(ref1$=import$({},opt.local)||{},ref1$.config=opt,ref1$),ref$.name=opt.name,ref$.prop=opt.prop,ref$))},js:function(t,opt){return opt.prop({value:this.timing(t,opt)},opt)},affine:function(t,opt){return opt.value(this.timing(t,opt),opt)}};if(typeof module!="undefined"&&module!==null){module.exports=ret}return ret})();function import$(obj,src){var own={}.hasOwnProperty;for(var key in src)if(own.call(src,key))obj[key]=src[key];return obj}},{"../anikit":4,cubic:37,"easing-fit":38}],15:[function(require,module,exports){(function(){var easingFit,cubic,anikit,ret;if(typeof require!="undefined"&&require!==null){easingFit=require("easing-fit");cubic=require("cubic");anikit=require("../anikit")}ret={name:"flip",type:"animation",preset:{flip:{}},edit:{steep:{default:.4,type:"number",min:0,max:1,step:.01}},css:function(opt){var ds,s,c;ds=1-opt.scale;s=opt.steep;c=opt.dir===0?"X":"Y";return"@keyframes "+opt.name+" {\n  0%, 25%, 50%, 75%, 100% { animation-timing-function: cubic-bezier(0, "+s+","+(1-s)+", 1) }\n    0% { transform: scale(1,1) }\n   25% { transform: scale(-1,1) }\n   50% { transform: scale(-1,-1) }\n   75% { transform: scale(1,-1) }\n  100% { transform: scale(1,1) }\n}"},js:function(t,opt){var v,m;v=this.affine(t,opt);m=anikit.util.m4to3(v.transform);return{transform:"matrix("+m.join(",")+")"}},affine:function(t,opt){var p,phase,ss,ref$,s1,s2,sx,sy;p=[0,opt.steep,1-opt.steep,1];phase=Math.floor(t*4);t=t*4-phase;t=cubic.Bezier.y(cubic.Bezier.t(t,p),p);ss=[[1,1],[-1,1],[-1,-1],[1,-1],[1,1]];ref$=[ss[phase],ss[phase+1]],s1=ref$[0],s2=ref$[1];ref$=[(s2[0]-s1[0])*t+s1[0],(s2[1]-s1[1])*t+s1[1]],sx=ref$[0],sy=ref$[1];return{transform:[sx,0,0,0,0,sy,0,0,0,0,1,0,0,0,0,1]}}};if(typeof module!="undefined"&&module!==null){module.exports=ret}return ret})()},{"../anikit":4,cubic:37,"easing-fit":38}],16:[function(require,module,exports){(function(){var easingFit,cubic,anikit,ret;if(typeof require!="undefined"&&require!==null){easingFit=require("easing-fit");cubic=require("cubic");anikit=require("../anikit")}ret={name:"float",type:"animation",preset:{float:{}},edit:{steep:{default:.4,type:"number",min:0,max:1,step:.01},offset:{name:"Float Height",default:15,type:"number",unit:"px",min:0,max:1e3},zoom:{name:"Min Scale",default:.7,type:"number",min:0,max:1,step:.01},shadow_offset:{name:"Shadow offset",default:23,type:"number",unit:"px",min:0,max:1e3},shadow_blur:{name:"Shadow Blur",default:5,type:"number",unit:"px",min:0,max:100},shadow_expand:{name:"Shadow Expand",default:-15,type:"number",unit:"px",min:-1e3,max:1e3},unit:{default:"px",type:"choice",values:["px","%",""]}},css:function(c){return"@keyframes "+c.name+" {\n  0% {\n    animation-timing-function: cubic-bezier(0,"+c.steep+","+(1-c.steep)+",1);\n    transform: translate(0,0) scale("+c.zoom+");\n    box-shadow: 0 0 0 rgba(0,0,0,.3);\n  }\n  50% {\n    animation-timing-function: cubic-bezier("+c.steep+",0,1,"+(1-c.steep)+");\n    transform: translate(0,"+-c.offset+c.unit+") scale(1);\n    box-shadow: 0 "+c.shadow_offset+c.unit+" "+c.shadow_blur+c.unit+" "+c.shadow_expand+c.unit+" rgba(0,0,0,.2)\n  }\n  100% {\n    transform: translate(0,0) scale("+c.zoom+");\n    box-shadow: 0 0 0 rgba(0,0,0,.3)\n  }\n} "},timing:function(t,opt){var p1,p2;p1=[0,opt.steep,1-opt.steep,1];p2=[opt.steep,0,1,1-opt.steep];if(t===0||t===1){return t}if(t<.5){t=cubic.Bezier.y(cubic.Bezier.t(t*2,p1),p1);t=t*.5}else{t=cubic.Bezier.y(cubic.Bezier.t((t-.5)*2,p2),p2);t=t*.5+.5}return 2*(.5-Math.abs(t-.5))},js:function(t,opt){t=this.timing(t,opt);return{transform:"translate(0,"+t*-opt.offset+opt.unit+") scale("+(t*(1-opt.zoom)+opt.zoom)+")"}},affine:function(t,opt){var s,ty;t=this.timing(t,opt);s=t*(1-opt.zoom)+opt.zoom;ty=t*-opt.offset;return{transform:[s,0,0,0,0,s,0,-ty,0,0,s,0,0,0,0,1]}}};if(typeof module!="undefined"&&module!==null){module.exports=ret}return ret})()},{"../anikit":4,cubic:37,"easing-fit":38}],17:[function(require,module,exports){(function(){var easingFit,cubic,anikit,ret;if(typeof require!="undefined"&&require!==null){easingFit=require("easing-fit");cubic=require("cubic");anikit=require("../anikit")}ret={name:"heartbeat",type:"animation",preset:{heartbeat:{prop:function(f,c){return{transform:"scale("+(1+f.value*c.scale)+")"}},value:function(t,c){return{transform:anikit.util.s(1+t*c.scale)}}}},edit:{dur:{default:1},scale:{default:.3,type:"number",min:0,max:1,step:.01},peak2:{default:.5,type:"number",min:0,max:1,step:.01},decay:{default:2,type:"number",min:.1,max:10,step:.01},span:{default:.3,type:"number",min:.1,max:1,step:.01},len:{default:.5,type:"number",min:.1,max:1,step:.01,hidden:true}},timing:function(t,opt){if(t<opt.span){t=(opt.span-t)/opt.span;t=Math.pow(t,opt.decay)}else{t=(1-t)/(1-opt.span);t=Math.pow(t,opt.decay)*opt.peak2}return t},css:function(opt){var ref$,ref1$,this$=this;return easingFit.fitToKeyframes(function(it){return this$.timing(it,opt)},(ref$=(ref1$=import$({},opt.local)||{},ref1$.config=opt,ref1$),ref$.name=opt.name,ref$.prop=opt.prop,ref$))},js:function(t,opt){return opt.prop({value:this.timing(t,opt)},opt)},affine:function(t,opt){return opt.value(this.timing(t,opt),opt)}};if(typeof module!="undefined"&&module!==null){module.exports=ret}return ret})();function import$(obj,src){var own={}.hasOwnProperty;for(var key in src)if(own.call(src,key))obj[key]=src[key];return obj}},{"../anikit":4,cubic:37,"easing-fit":38}],18:[function(require,module,exports){(function(){var easingFit,cubic,anikit,ret;if(typeof require!="undefined"&&require!==null){easingFit=require("easing-fit");cubic=require("cubic");anikit=require("../anikit")}ret={name:"hit",type:"animation",preset:{hit:{}},edit:{dur:{default:2},steep:{default:.5,type:"number",min:0,max:1,step:.01},zoom:{name:"Scale Amount",default:1,type:"number",min:0,max:2,step:.01},skew:{name:"Skew Amount",default:20,type:"number",unit:"deg",min:-90,max:90,step:.1},offset:{name:"Fall Offset",default:200,type:"number",unit:"px",min:0,max:2e3},fade:{name:"Fade Duration",default:1,type:"number",min:.01,max:1,step:.01},unit:{default:"px",type:"choice",values:["px","%",""]}},timing:function(t,opt){},css:function(opt){return"@keyframes "+opt.name+" {\n  0% {\n    animation-timing-function: cubic-bezier("+opt.steep+",0,1,"+(1-opt.steep)+");\n    transform: scale(0) translate(0,0) skewX(0);\n    opacity: 1;\n  }\n  20% {\n    transform: scale("+opt.zoom+") translate(0,0) skewX("+opt.skew+"deg);\n  }\n  50% {\n    animation-timing-function: cubic-bezier("+opt.steep*1.2+",0,1,"+(1-opt.steep*1.2)+");\n    transform: scale("+opt.zoom+") translate(0,0) skewX("+opt.skew+"deg);\n  }\n  "+(100-opt.fade*50)+"% {\n    opacity: 1;\n  }\n  100% {\n    transform: scale("+opt.zoom+")  translate(0,"+opt.offset+opt.unit+") skewX("+opt.skew+"deg);\n    opacity: 0;\n  }\n} "},js:function(t,opt){var values,m;values=this.affine(t,opt);m=values.transform;m=[m[0],-m[1],m[4],m[5],m[3],-m[7]];return{transform:"matrix("+m.join(void 8)+")",opacity:values.o}},affine:function(t,opt){var p1,ref$,s,p,k,o;p1=[opt.steep,0,1,1-opt.steep];ref$=[opt.zoom,0,opt.skew,1],s=ref$[0],p=ref$[1],k=ref$[2],o=ref$[3];if(t<.2){t=cubic.Bezier.y(cubic.Bezier.t(t/.2,p1),p1);s=t*opt.zoom;k=t*opt.skew}else if(t>=.5){t=cubic.Bezier.y(cubic.Bezier.t((t-.5)*2,p1),p1);p=opt.offset*t;if(t>=1-.5*opt.fade){o=(1-t)/(1-.5*opt.fade)}}return{transform:[s,-Math.tan(k*Math.PI/180),0,0,0,s,0,-p,0,0,1,0,0,0,0,1],opacity:o}}};if(typeof module!="undefined"&&module!==null){module.exports=ret}return ret})()},{"../anikit":4,cubic:37,"easing-fit":38}],19:[function(require,module,exports){(function(){var easingFit,cubic,anikit,easing,noBounce,slide,flip,grow,ret;if(typeof require!="undefined"&&require!==null){easingFit=require("easing-fit");cubic=require("cubic");anikit=require("../anikit");easing=require("../easing")}noBounce={count:{default:1,hidden:true},decay:{default:2,hidden:true},dtime:{default:.7,hidden:true},power:.25};slide={prop:function(f,c,d,o){var value;value=this.value(f.value,c,d,o);return{transform:anikit.util.decompose(anikit.util.m4to3(value.transform),c),opacity:value.opacity}},value:function(t,c,d,o,p){var sgn,ret,ref$;if(c.dir>0){t=1-t}if(t<=.005){t=.005}if(d<3){sgn=d===1?1:-1;ret={transform:[1,0,0,sgn*(1-t)*c.offset,0,1,0,0,0,0,1,0,0,0,0,1]}}else{sgn=d===3?1:-1;ret={transform:[1,0,0,0,0,1,0,sgn*(1-t)*c.offset,0,0,1,0,0,0,0,1]}}if(o!=null){ret.opacity=(ref$=(p!=null?p:t)*10)<1?ref$:1}else{ret.opacity=t<=.005?0:1}return ret}};flip={prop:function(f,c,d){var value;value=this.value(f.value,c,d);return{transform:anikit.util.decompose(anikit.util.m4to3(value.transform),c),opacity:value.opacity}},value:function(t,c,d){var ret;if(c.dir>0){t=1-t}if(t<=.005){t=.005}ret=d===1?{transform:[1,0,0,0,0,t,0,0,0,0,1,0,0,0,0,1]}:{transform:[t,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]};ret.opacity=t<=.005?0:1;return ret}};grow={prop:function(f,c,d){var value,ret;value=this.value(f.value,c,d);ret={transform:anikit.util.decompose(anikit.util.m4to3(value.transform),c)};if(value.opacity!=null){ret.opacity=value.opacity}return ret},value:function(t,c,d){var o,sgn,ret;if(c.dir>0){t=1-t}if(t<=.005){t=.005}o=t<=.005?0:1;if(d<3){sgn=d===1?1:-1;ret={transform:[t,0,0,sgn*(1-t)*c.offset,0,1,0,0,0,0,1,0,0,0,0,1]}}else{sgn=d===3?1:-1;ret={transform:[1,0,0,0,0,t,0,sgn*(1-t)*c.offset,0,0,1,0,0,0,0,1]}}ret.opacity=o;return ret}};ret={name:"jump-transition",type:"animation",preset:{"jump-alt-in":{dir:1,count:9,dtime:.85,decay:.5,local:{sampleCount:40,errorThreshold:1e-4,segSampleCount:1e3}},"jump-alt-out":{dir:-1,count:9,dtime:.85,decay:.5,local:{sampleCount:40,errorThreshold:1e-4,segSampleCount:1e3}},"jump-in":{dir:1,count:3,local:{sampleCount:20,errorThreshold:1e-4,segSampleCount:1e3}},"jump-out":{dir:-1,count:3,local:{sampleCount:40,errorThreshold:1e-4,segSampleCount:1e3}},"zoom-in":{dir:1,count:1,power:.25,local:{sampleCount:40,errorThreshold:.01,segSampleCount:100}},"zoom-out":{dir:-1,count:1,power:.25,local:{sampleCount:40,errorThreshold:.01,segSampleCount:100}},"fade-in":{dir:1,count:1,power:.25,prop:function(f,c){return{opacity:c.dir>0?1-f.value:f.value}},value:function(t,c){return{opacity:c.dir>0?1-t:t}}},"fade-out":{dir:-1,count:1,power:.25,prop:function(f,c){return{opacity:f.value}},value:function(t,c){return{opacity:t}}},"grow-rtl-in":import$({label:"grow-in (right to left)",dir:1,local:{segPtrs:[.02]},prop:function(f,c){return grow.prop(f,c,1)},value:function(t,c){return grow.value(t,c,1)}},noBounce),"grow-rtl-out":import$({label:"grow-out (right to left)",dir:-1,local:{segPtrs:[.97]},prop:function(f,c){return grow.prop(f,c,1)},value:function(t,c){return grow.value(t,c,1)}},noBounce),"grow-ltr-in":import$({label:"grow-in (left to right)",dir:1,local:{segPtrs:[.02]},prop:function(f,c){return grow.prop(f,c,2)},value:function(t,c){return grow.value(t,c,2)}},noBounce),"grow-ltr-out":import$({label:"grow-out (left to right)",dir:-1,local:{segPtrs:[.97]},prop:function(f,c){return grow.prop(f,c,2)},value:function(t,c){return grow.value(t,c,2)}},noBounce),"grow-ttb-in":import$({label:"grow-in (top to bottom)",dir:1,local:{segPtrs:[.02]},prop:function(f,c){return grow.prop(f,c,3)},value:function(t,c){return grow.value(t,c,3)}},noBounce),"grow-ttb-out":import$({label:"grow-out (top to bottom)",dir:-1,local:{segPtrs:[.97]},prop:function(f,c){return grow.prop(f,c,3)},value:function(t,c){return grow.value(t,c,3)}},noBounce),"grow-btt-in":import$({label:"grow-in (bottom to top)",dir:1,local:{segPtrs:[.02]},prop:function(f,c){return grow.prop(f,c,4)},value:function(t,c){return grow.value(t,c,4)}},noBounce),"grow-btt-out":import$({label:"grow-out (bottom to top)",dir:-1,local:{segPtrs:[.97]},prop:function(f,c){return grow.prop(f,c,4)},value:function(t,c){return grow.value(t,c,4)}},noBounce),"flip-v-in":import$({label:"flip-in (vertically)",dir:1,local:{segPtrs:[.02]},prop:function(f,c){return flip.prop(f,c,1)},value:function(t,c){return flip.value(t,c,1)}},noBounce),"flip-v-out":import$({label:"flip-out (vertically)",dir:-1,local:{segPtrs:[.97]},prop:function(f,c){return flip.prop(f,c,1)},value:function(t,c){return flip.value(t,c,1)}},noBounce),"flip-h-in":import$({label:"flip-in (horizontally)",dir:1,local:{segPtrs:[.02]},prop:function(f,c){return flip.prop(f,c,2)},value:function(t,c){return flip.value(t,c,2)}},noBounce),"flip-h-out":import$({label:"flip-out (horizontally)",dir:-1,local:{segPtrs:[.97]},prop:function(f,c){return flip.prop(f,c,2)},value:function(t,c){return flip.value(t,c,2)}},noBounce),"slide-rtl-in":import$({label:"slide-in (right to left)",dir:1,offset:{default:200,hidden:false},local:{segPtrs:[.02]},prop:function(f,c){return slide.prop(f,c,1,1)},value:function(t,c){return slide.value(t,c,1,1)}},noBounce),"slide-rtl-out":import$({label:"slide-out (right to left)",dir:-1,offset:{default:200,hidden:false},local:{segPtrs:[.97]},prop:function(f,c){return slide.prop(f,c,1,1)},value:function(t,c){return slide.value(t,c,1,1)}},noBounce),"slide-ltr-in":import$({label:"slide-in (left to right)",dir:1,offset:{default:200,hidden:false},local:{segPtrs:[.02]},prop:function(f,c){return slide.prop(f,c,2,1)},value:function(t,c){return slide.value(t,c,2,1)}},noBounce),"slide-ltr-out":import$({label:"slide-out (left to right)",dir:-1,offset:{default:200,hidden:false},local:{segPtrs:[.97]},prop:function(f,c){return slide.prop(f,c,2,1)},value:function(t,c){return slide.value(t,c,2,1)}},noBounce),"slide-ttb-in":import$({label:"slide-in (top to bottom)",dir:1,offset:{default:200,hidden:false},local:{segPtrs:[.02]},prop:function(f,c){return slide.prop(f,c,3,1)},value:function(t,c){return slide.value(t,c,3,1)}},noBounce),"slide-ttb-out":import$({label:"slide-out (top to bottom)",dir:-1,offset:{default:200,hidden:false},local:{segPtrs:[.97]},prop:function(f,c){return slide.prop(f,c,3,1)},value:function(t,c){return slide.value(t,c,3,1)}},noBounce),"slide-btt-in":import$({label:"slide-in (bottom to top)",dir:1,offset:{default:200,hidden:false},local:{segPtrs:[.02]},prop:function(f,c){return slide.prop(f,c,4,1)},value:function(t,c){return slide.value(t,c,4,1)}},noBounce),"slide-btt-out":import$({label:"slide-out (bottom to top)",dir:-1,offset:{default:200,hidden:false},local:{segPtrs:[.97]},prop:function(f,c){return slide.prop(f,c,4,1)},value:function(t,c){return slide.value(t,c,4,1)}},noBounce),"float-rtl-in":import$({label:"float-in (right to left)",dir:1,offset:{default:15,hidden:false},prop:function(f,c){return slide.prop(f,c,1,1)},value:function(t,c){return slide.value(t,c,1,1)}},noBounce),"float-rtl-out":import$({label:"float-out (right to left)",dir:-1,offset:{default:15,hidden:false},prop:function(f,c){return slide.prop(f,c,1,1)},value:function(t,c){return slide.value(t,c,1,1)}},noBounce),"float-ltr-in":import$({label:"float-in (left to right)",dir:1,offset:{default:15,hidden:false},prop:function(f,c){return slide.prop(f,c,2,1)},value:function(t,c){return slide.value(t,c,2,1)}},noBounce),"float-ltr-out":import$({label:"float-out (left to right)",dir:-1,offset:{default:15,hidden:false},prop:function(f,c){return slide.prop(f,c,2,1)},value:function(t,c){return slide.value(t,c,2,1)}},noBounce),"float-ttb-in":import$({label:"float-in (top to bottom)",dir:1,offset:{default:15,hidden:false},prop:function(f,c){return slide.prop(f,c,3,1)},value:function(t,c){return slide.value(t,c,3,1)}},noBounce),"float-ttb-out":import$({label:"float-out (top to bottom)",dir:-1,offset:{default:15,hidden:false},prop:function(f,c){return slide.prop(f,c,3,1)},value:function(t,c){return slide.value(t,c,3,1)}},noBounce),"float-btt-in":import$({label:"float-in (bottom to top)",dir:1,offset:{default:15,hidden:false},prop:function(f,c){return slide.prop(f,c,4,1)},value:function(t,c){return slide.value(t,c,4,1)}},noBounce),"float-btt-out":import$({label:"float-out (bottom to top)",dir:-1,offset:{default:15,hidden:false},prop:function(f,c){return slide.prop(f,c,4,1)},value:function(t,c){return slide.value(t,c,4,1)}},noBounce),"fall-rtl-in":{label:"fall-in (right to left)",dir:1,count:3,prop:function(f,c){return slide.prop(f,c,1)},value:function(t,c,p){return slide.value(t,c,1,1,p)}},"fall-ltr-in":{label:"fall-in (left to right)",dir:1,count:3,prop:function(f,c){return slide.prop(f,c,2)},value:function(t,c,p){return slide.value(t,c,2,1,p)}},"fall-ttb-in":{label:"fall-in (top to bottom)",dir:1,count:3,prop:function(f,c){return slide.prop(f,c,3)},value:function(t,c,p){return slide.value(t,c,3,1,p)}},"fall-btt-in":{label:"fall-in (bottom to top)",dir:1,count:3,prop:function(f,c){return slide.prop(f,c,4)},value:function(t,c,p){return slide.value(t,c,4,1,p)}}},edit:{dir:{type:"number",default:1,hidden:true,min:-1,max:1,step:2},count:{name:"Bounce Count",type:"number",default:5,min:1,max:30,step:2},dtime:{name:"Time Decay",type:"number",default:.7,min:0,max:1,step:.01},decay:{name:"Amount Decay",type:"number",default:.4,min:0,max:1,step:.01},power:{type:"number",default:2,min:0,max:10,step:.01,hidden:true},offset:{type:"number",default:50,min:0,max:500,step:1,hidden:true},unit:{default:"px",type:"choice",values:["px","%",""]},repeat:{default:1}},local:{prop:function(f,c){var value;value=this.value(f.value,c);return{transform:"matrix("+anikit.util.m4to3(value.transform).join(",")+")"}},value:function(t,c){if(c.dir>0){t=1-t}t>=.01||(t=.01);return{transform:[t,0,0,0,0,t,0,0,0,0,t,0,0,0,0,1]}}},timing:function(t,opt){var pt,et,i$,to$,i,oet,delta,x;pt=1/(2*((Math.pow(opt.dtime,opt.count)-1)/(opt.dtime-1)-.5));et=0;t=t+pt;for(i$=0,to$=opt.count;i$<to$;++i$){i=i$;oet=et;delta=pt*Math.pow(opt.dtime,i);et=et+2*delta;if(t<=et){x=(1-Math.pow(t-oet-delta,opt.power)/Math.pow(delta,opt.power))*Math.pow(opt.decay,i);return x}}return 0},css:function(opt){var prop,ret,ref$,ref1$,ref2$,this$=this;prop=function(f,c){if(opt.prop){return opt.prop(f,c)}else{return this$.local.prop(f,c)}};ret=easingFit.fitToKeyframes(function(it){return this$.timing(it,opt)},(ref$=(ref1$=(ref2$=import$({},opt.local)||{},ref2$.config=opt,ref2$),ref1$.name=opt.name,ref1$),ref$.prop=prop,ref$));return ret},js:function(t,opt){var value,ret;value=this.affine(t,opt);ret={};if(value.transform){ret.transform="matrix("+anikit.util.m4to3(value.transform).join(",")+")"}if(value.opacity!=null){ret.opacity=value.opacity}return ret},affine:function(t,opt){var t2;t2=this.timing(t,opt);return opt.value?opt.value(t2,opt,t):this.local.value(t2,opt,t)}};if(typeof module!="undefined"&&module!==null){module.exports=ret}return ret})();function import$(obj,src){var own={}.hasOwnProperty;for(var key in src)if(own.call(src,key))obj[key]=src[key];return obj}},{"../anikit":4,"../easing":5,cubic:37,"easing-fit":38}],20:[function(require,module,exports){(function(){var easingFit,cubic,anikit,move,ret;if(typeof require!="undefined"&&require!==null){easingFit=require("easing-fit");cubic=require("cubic");anikit=require("../anikit")}move={prop:function(f,c){var value;value=this.value(f.value,c);value.transform=anikit.util.decompose(anikit.util.m4to3(value.transform),c);return value},value:function(t,c){var ret,ref$;ret={transform:anikit.util[c.dir%2?"tx":"ty"]((c.dir>2?-1:1)*(2*t-((ref$=Math.floor(2*t)*2)<2?ref$:2))*c.offset/2)};if(c.fade){ret.opacity=anikit.util.round((ref$=Math.abs(t-.5)*10)<1?ref$:1)}return ret}};ret={name:"move",type:"animation",preset:{"move-ltr":import$({label:"move (left to right)",offset:100,dir:1},move),"move-rtl":import$({label:"move (right to left)",offset:100,dir:3},move),"move-ttb":import$({label:"move (top to bottom)",offset:100,dir:2},move),"move-btt":import$({label:"move (bottom to top)",offset:100,dir:4},move),"move-fade-ltr":import$({label:"move faded (left to right)",offset:100,dir:1,fade:true},move),"move-fade-rtl":import$({label:"move faded (right to left)",offset:100,dir:3,fade:true},move),"move-fade-ttb":import$({label:"move faded (top to bottom)",offset:100,dir:2,fade:true},move),"move-fade-btt":import$({label:"move faded (bottom to top)",offset:100,dir:4,fade:true},move)},edit:{steep:{default:.3,type:"number",min:.3,max:1,step:.01},offset:{name:"Move Distance",default:100,type:"number",unit:"px",min:0,max:1e3},dir:{default:1,type:"number",hidden:true},unit:{default:"px",type:"choice",values:["px","%",""]},fade:{type:"boolean",default:false}},timing:function(t,opt){return((2*t+1)%2-1)*.5+.5},css:function(opt){var ref$;return easingFit.toKeyframes([{percent:0,value:0},{percent:40,value:.4},{percent:49.99999,value:.4999999},{percent:50,value:.5},{percent:50.00001,value:.5000001},{percent:60,value:.6},{percent:100,value:1}],(ref$={prop:function(f,c){return move.prop(f,c)},config:opt},ref$.name=opt.name,ref$))},js:function(t,opt){return opt.prop({value:t},opt)},affine:function(t,opt){return opt.value(t,opt)}};if(typeof module!="undefined"&&module!==null){module.exports=ret}return ret})();function import$(obj,src){var own={}.hasOwnProperty;for(var key in src)if(own.call(src,key))obj[key]=src[key];return obj}},{"../anikit":4,cubic:37,"easing-fit":38}],21:[function(require,module,exports){(function(){var easingFit,cubic,anikit,ret;if(typeof require!="undefined"&&require!==null){easingFit=require("easing-fit");cubic=require("cubic");anikit=require("../anikit")}ret={name:"orbit",type:"animation",preset:{orbit:{count:12,radius:60,unit:"px"}},edit:{count:{name:"Sample Count",default:8,type:"number",min:4,max:36},radius:{default:60,type:"number",unit:"%",min:0,max:1e3},unit:{default:"px",type:"choice",values:["px","%",""]}},css:function(opt){var list,i$,to$,i,r,a,x,y,p,ref$;list=[];for(i$=0,to$=opt.count;i$<=to$;++i$){i=i$;r=360*i/opt.count;a=Math.PI*2*i/opt.count;x=Math.sin(a)*opt.radius;y=-Math.cos(a)*opt.radius;p=100*i/opt.count;ref$=[x,y,p].map(fn$),x=ref$[0],y=ref$[1],p=ref$[2];list.push(" "+p+"% {\nanimation-timing-function: linear;\ntransform: translate("+x+opt.unit+","+y+opt.unit+") rotate("+r+"deg) } ")}return" @keyframes "+opt.name+" { "+list.join("\n")+" } ";function fn$(it){return anikit.util.round(it)}},js:function(t,opt){var m;m=this.affine(t,opt,true).transform;m=[m[0],-m[1],m[4],-m[5],m[3],-m[7]];return{transform:"matrix("+m.join(",")+")"}},affine:function(t,opt,inverse){var a,x,y;inverse==null&&(inverse=false);a=Math.PI*2*t;x=Math.sin(a)*opt.radius;y=-Math.cos(a)*opt.radius;a=inverse?-a-Math.PI:a;return{transform:[Math.cos(a),Math.sin(a),0,x,-Math.sin(a),Math.cos(a),0,-y,0,0,1,0,0,0,0,1]}}};if(typeof module!="undefined"&&module!==null){module.exports=ret}return ret})()},{"../anikit":4,cubic:37,"easing-fit":38}],22:[function(require,module,exports){(function(){var easingFit,cubic,anikit,ret;if(typeof require!="undefined"&&require!==null){easingFit=require("easing-fit");cubic=require("cubic");anikit=require("../anikit")}ret={name:"patrol",type:"animation",preset:{breath:{offset:{default:.06,min:.01,max:1,step:.01,name:"Scale Amount"},prop:function(f,c){return{transform:"scale("+(1+f.value*c.offset-.03)+")"}},value:function(t,c){return{transform:anikit.util.s(1+t*c.offset-.03)}}},dim:{offset:{default:.5,min:0,max:1,step:.01,name:"Dim Amount"},prop:function(f,c){return{opacity:.5+f.value*c.offset}},value:function(t,c){return{opacity:.5+t*c.offset}}},metronome:{offset:{default:10,min:0,max:90,step:1,name:"Shaking Amount"},local:{errorThreshold:.001,sampleCount:20,segSampleCount:1e3},prop:function(f,c){return{transform:"translate("+f.value*c.offset+c.unit+") rotate("+f.value*c.offset*2+"deg)"}},value:function(t,c){var a;a=t*c.offset*2*Math.PI/180;return{transform:[Math.cos(a),Math.sin(a),0,t*c.offset,-Math.sin(a),Math.cos(a),0,0,0,0,1,0,0,0,0,1]}}},swing:{offset:{default:30,unit:"deg",min:0,max:90,step:1,name:"Rotate Amount"},prop:function(f,c){return{transform:"rotate("+f.value*c.offset+"deg)"}},value:function(t,c){return{transform:anikit.util.rz(t*c.offset*Math.PI/180)}}},"wander-v":{label:"wander (vertically)",offset:{default:10,max:500,step:1,name:"Move Amount"},local:{errorThreshold:1e-4,sampleCount:20,segSampleCount:1e3},unit:"px",prop:function(f,c){return{transform:"translate(0,"+f.value*c.offset+c.unit+")"}},value:function(t,c){return{transform:anikit.util.ty(t*c.offset)}}},"wander-h":{label:"wander (horizontally)",offset:{default:10,max:500,step:1,name:"Move Amount"},local:{errorThreshold:1e-4,sampleCount:20,segSampleCount:1e3},unit:"px",prop:function(f,c){return{transform:"translate("+f.value*c.offset+c.unit+",0)"}},value:function(t,c){return{transform:anikit.util.tx(t*c.offset)}}}},edit:{steep:{default:.6,type:"number",min:.34,max:1,step:.01},offset:{default:10,type:"number",unit:"px",min:0,max:100,step:.01},unit:{default:"px",type:"choice",values:["px","%",""]}},timing:function(t,opt){var p;p=[opt.steep,0,1-opt.steep,1];if(t<.5){t=cubic.Bezier.y(cubic.Bezier.t(t*2,p),p)/2}else{t=cubic.Bezier.y(cubic.Bezier.t((t-.5)*2,p),p)/2+.5}t=1-4*Math.abs(t-.5);return t},css:function(opt){var ref$,ref1$,this$=this;return easingFit.fitToKeyframes(function(it){return this$.timing(it,opt)},(ref$=(ref1$=import$({},opt.local)||{},ref1$.config=opt,ref1$),ref$.name=opt.name,ref$.prop=opt.prop,ref$))},js:function(t,opt){return opt.prop({value:this.timing(t,opt)},opt)},affine:function(t,opt){return opt.value(this.timing(t,opt),opt)}};if(typeof module!="undefined"&&module!==null){module.exports=ret}return ret})();function import$(obj,src){var own={}.hasOwnProperty;for(var key in src)if(own.call(src,key))obj[key]=src[key];return obj}},{"../anikit":4,cubic:37,"easing-fit":38}],23:[function(require,module,exports){(function(){var easingFit,cubic,anikit,easing,ret;if(typeof require!="undefined"&&require!==null){easingFit=require("easing-fit");cubic=require("cubic");anikit=require("../anikit");easing=require("../easing")}ret={name:"power",type:"animation",preset:{"power-off":{dir:-1,repeat:1},"power-on":{dir:1,repeat:1}},edit:{steep:{default:.5,type:"number",min:0,max:1,step:.01},dir:{default:1,hidden:true,min:-1,max:1,step:2}},local:{value:function(t,c){var ref$,x,y,o;if(c.dir>0){if(t<.2){ref$=[t*5,.05],x=ref$[0],y=ref$[1]}else{ref$=[1,1.25*(t-.2)],x=ref$[0],y=ref$[1]}o=t<.01?0:1}else{if(t<.2){ref$=[1,1-5*.95*t],x=ref$[0],y=ref$[1]}else{ref$=[1-1.25*.95*(t-.2),.05],x=ref$[0],y=ref$[1]}o=t>.95?0:1}return{transform:[x,0,0,0,0,y,0,0,0,0,1,0,0,0,0,1],opacity:o}}},timing:function(t,opt){var p;p=[0,opt.steep,1-opt.steep,1];if(t<.2){return t=cubic.Bezier.y(cubic.Bezier.t(t*5,p),p)*.2}else{return t=cubic.Bezier.y(cubic.Bezier.t((t-.2)*1.25,p),p)*.8+.2}},css:function(opt){var ret;ret="@keyframes "+opt.name+" {\n  0%, 20%, 100% {\n    animation-timing-function: cubic-bezier(0,"+opt.steep+","+(1-opt.steep)+",1);\n  }\n  "+(opt.dir>0?0:100)+"% { transform: scale(0,0); opacity: 0}\n  "+(opt.dir>0?1:99)+"% { transform: scale(0.05,0.05); opacity: 1 }\n  "+(opt.dir<0?0:100)+"% { transform: scale(1,1); opacity: 1 }\n  20% { transform: scale(1,0.1); }\n}";return ret},js:function(t,opt){var value,ref$,o,m;value=this.local.value(this.timing(t,opt),opt);ref$=[value.opacity,anikit.util.m4to3(value.transform)],o=ref$[0],m=ref$[1];return{transform:"matrix("+m.join(",")+")",opacity:o}},affine:function(t,opt){return this.local.value(this.timing(t,opt),opt)}};if(typeof module!="undefined"&&module!==null){module.exports=ret}return ret})()},{"../anikit":4,"../easing":5,cubic:37,"easing-fit":38}],24:[function(require,module,exports){(function(){var easingFit,cubic,anikit,ret;if(typeof require!="undefined"&&require!==null){easingFit=require("easing-fit");cubic=require("cubic");anikit=require("../anikit")}ret={name:"pulse",type:"animation",edit:{decay:{name:"Decay",type:"number",default:3,min:1,max:10,step:1},scale:{name:"Scale",type:"number",default:.3,min:.01,max:1,step:.01}},preset:{pulse:{}},track:function(t,opt){t=2*(1-1*t);t=t-Math.floor(t);return Math.pow(t,opt.decay)*opt.scale+(1-opt.scale/2)},local:{prop:function(f,c){return{transform:"scale("+f.value+")"}},value:function(t,c){return{transform:[t,0,0,0,0,t,0,0,0,0,t,0,0,0,0,1]}}},css:function(opt){var ret,this$=this;ret=easingFit.fitToKeyframes(function(it){return this$.track(it,opt)},{config:opt,sampleCount:100,errorThreshold:1e-4,segSampleCount:100,name:opt.name,prop:this.local.prop});return ret},js:function(t,opt){return this.local.prop({value:this.track(t,opt)},opt)},affine:function(t,opt){return this.local.value(this.track(t,opt),opt)}};if(typeof module!="undefined"&&module!==null){module.exports=ret}return ret})()},{"../anikit":4,cubic:37,"easing-fit":38}],25:[function(require,module,exports){(function(){var easingFit,cubic,anikit,easing,ret;if(typeof require!="undefined"&&require!==null){easingFit=require("easing-fit");cubic=require("cubic");anikit=require("../anikit");easing=require("../easing")}ret={name:"rubber",type:"animation",preset:{jingle:{count:7,ratio:.6,delay:.1,unit:"",offset:{default:10,min:-180,max:180,step:1,name:"Rotate Amount"},origin:[.5,0,.5],prop:function(f,c){return{transform:"rotate("+f.value*c.offset+"deg)"}},value:function(t,c){return{transform:anikit.util.rz(t*c.offset*Math.PI/180)}}},"rubber-v":{label:"rubber (vertically)",count:7,ratio:.7,delay:.3,unit:"",offset:{default:.2,min:.01,max:1,step:.01,name:"Scale Amount"},prop:function(f,c){return{transform:"scaleY("+(1+f.value*c.offset)+")"}},value:function(t,c){return{transform:anikit.util.sy(1+t*c.offset)}}},"rubber-h":{label:"rubber (horizontally)",count:7,ratio:.7,delay:.3,unit:"",offset:{default:.2,min:.01,max:1,step:.01,name:"Scale Amount"},prop:function(f,c){return{transform:"scaleX("+(1+f.value*c.offset)+")"}},value:function(t,c){return{transform:anikit.util.sx(1+t*c.offset)}}},"shake-v":{label:"shake (vertically)",count:5,ratio:.6,delay:.3,unit:"px",offset:{default:10,min:0,max:500,step:1,name:"Move Amount"},prop:function(f,c){return{transform:"translate(0,"+f.value*c.offset+c.unit+")"}},value:function(t,c){return{transform:anikit.util.ty(t*c.offset)}}},"shake-h":{label:"shake (horizontally)",count:5,ratio:.7,delay:.3,unit:"px",offset:{default:10,min:0,max:500,step:1,name:"Move Amount"},prop:function(f,c){return{transform:"translate("+f.value*c.offset+c.unit+",0)"}},value:function(t,c){return{transform:anikit.util.tx(t*c.offset)}}},tick:{count:7,ratio:.7,delay:.3,unit:"",offset:{default:20,min:-180,max:180,step:1,name:"Rotate Amount"},prop:function(f,c){return{transform:"rotate("+f.value*c.offset+"deg)"}},value:function(t,c){return{transform:anikit.util.rz(t*c.offset*Math.PI/180)}}},smash:{count:4,ratio:0,delay:.5,unit:"",offset:{default:30,min:-180,max:180,step:1,name:"Rotate Amount"},local:{sampleCount:20,errorThreshold:.001},prop:function(f,c){return{transform:"rotate("+f.value*c.offset+"deg)"}},value:function(t,c){return{transform:anikit.util.rz(t*c.offset*Math.PI/180)}}},"jelly-alt":{count:7,ratio:.7,delay:.3,unit:"",offset:{default:10,min:-180,max:180,step:1,name:"Rotate Amount"},prop:function(f,c){return{transform:"skewX("+f.value*c.offset+"deg)"}},value:function(t,c){return{transform:anikit.util.kx(t*c.offset*Math.PI/180)}}},jelly:{count:5,ratio:.6,delay:.3,unit:"px",offset:{default:10,min:-180,max:180,step:1,name:"Rotate Amount"},prop:function(f,c){return{transform:"translate("+f.value*-c.offset+c.unit+",0) skewX("+f.value*c.offset+"deg)"}},value:function(t,c){return{transform:[1,-Math.tan(t*c.offset*Math.PI/180),0,t*-c.offset,0,1,0,0,0,0,1,0,0,0,0,1]}}},damage:{count:10,ratio:.8,delay:.2,unit:"",offset:{default:1,min:0,max:1,step:.01,name:"Amount"},prop:function(f,c){return{opacity:1-f.value*c.offset}},value:function(t,c){return{opacity:1-t*c.offset}}}},edit:{count:{name:"Bounce Count",default:10,type:"number",min:0,max:50},offset:{default:1,type:"number",min:0,max:100,step:.01,unit:"px"},ratio:{name:"Decay",default:.8,type:"number",min:0,max:1,step:.01},delay:{name:"Prepare Time",default:.2,type:"number",min:0,max:1,step:.01},unit:{default:"px",type:"choice",values:["px","%",""]}},timing:function(t,opt){var len,idx,v1,v2;if(t<opt.delay){return t/opt.delay}len=(1-opt.delay)/opt.count;idx=Math.floor((t-opt.delay)/len);t=(t-(idx*len+opt.delay))/len;t=easing.js.easeOutQuad(t);v1=Math.pow(opt.ratio,idx)*Math.pow(-1,idx);v2=Math.pow(opt.ratio,idx+1)*Math.pow(-1,idx+1);return(v2-v1)*t+v1},css:function(opt){var ref$,ref1$,this$=this;return easingFit.fitToKeyframes(function(it){return this$.timing(it,opt)},(ref$=(ref1$=import$({},opt.local)||{},ref1$.config=opt,ref1$),ref$.name=opt.name,ref$.prop=opt.prop,ref$))},js:function(t,opt){return opt.prop({value:this.timing(t,opt)},opt)},affine:function(t,opt){return opt.value(this.timing(t,opt),opt)}};if(typeof module!="undefined"&&module!==null){module.exports=ret}return ret})();function import$(obj,src){var own={}.hasOwnProperty;for(var key in src)if(own.call(src,key))obj[key]=src[key];return obj}},{"../anikit":4,"../easing":5,cubic:37,"easing-fit":38}],26:[function(require,module,exports){var slice$=[].slice;(function(){var ret;ret={name:"rush",type:"animation",preset:{"rush-ltr":{label:"rush (left to right)",dir:1,repeat:0},"rush-rtl":{label:"rush (right to left)",dir:2,repeat:0},"rush-ttb":{label:"rush (top to bottom)",dir:3,repeat:0},"rush-btt":{label:"rush (bottom to top)",dir:4,repeat:0},"rush-ltr-in":{label:"rush-in (left to right)",dir:1,repeat:1},"rush-rtl-in":{label:"rush-in (right to left)",dir:2,repeat:1},"rush-ttb-in":{label:"rush-in (top to bottom)",dir:3,repeat:1},"rush-btt-in":{label:"rush-in (bottom to top)",dir:4,repeat:1}},edit:{dir:{name:"Direction",type:"Choice",values:[1,2,3,4],default:1},offset:{name:"Offset",default:60,type:"number",min:0,max:1e3},size:{name:"Item Size",default:32,type:"number",min:0,max:1e3},deg:{name:"Skew",default:30,type:"number",unit:"deg",min:0,max:90},flip:{name:"Flip",default:false,type:"boolean"},unit:{default:"px",type:"choice",values:["px","%",""]}},local:{data:function(opt){var RD,deg,offset,size,ds,xs,ts,dc,sgn,flip;RD=Math.PI/180;deg=opt.deg,offset=opt.offset,size=opt.size;ds=[deg,-deg/2,-deg/2,deg/4,-deg/8,0,0,deg];xs=[-offset-size*Math.tan(deg*RD),-offset/10-size*Math.tan(RD*-deg/2),-size*Math.tan(RD*-deg/2),-size*Math.tan(RD*deg/4),-size*Math.tan(RD*-deg/8),0,0,offset];if(opt.repeat){ts=[0,.3,.4,.55,.7,.8,1]}else{ts=[0,.25,.33,.44,.55,.66,.8,1]}dc=opt.dir<=2?"X":"Y";sgn=opt.dir%2?1:-1;flip=opt.flip?-1:1;return{RD:RD,deg:deg,offset:offset,size:size,ds:ds,xs:xs,ts:ts,dc:dc,sgn:sgn,flip:flip}}},css:function(opt){var ref$,RD,deg,offset,size,ds,xs,ts,dc,sgn,flip,fs,i$,to$,i;ref$=this.local.data(opt),RD=ref$.RD,deg=ref$.deg,offset=ref$.offset,size=ref$.size,ds=ref$.ds,xs=ref$.xs,ts=ref$.ts,dc=ref$.dc,sgn=ref$.sgn,flip=ref$.flip;fs="";for(i$=0,to$=ts.length;i$<to$;++i$){i=i$;fs+=ts[i]*100+"% { transform: translate"+dc+"("+sgn*xs[i]+opt.unit+") skew"+dc+"("+flip*sgn*ds[i]+"deg); }\n"}return"@keyframes "+opt.name+" {\n  0% { animation-timing-function: cubic-bezier(0,0.5,0.5,1); opacity: 0 }\n  5% { opacity: 1}\n  "+fs+"\n  100% { opacity: 1}\n}"},js:function(t,opt){var ref$,RD,deg,offset,size,ds,xs,ts,dc,sgn,flip,i$,to$,i,d1,d2,x1,x2,t1,t2,x,d;ref$=this.local.data(opt),RD=ref$.RD,deg=ref$.deg,offset=ref$.offset,size=ref$.size,ds=ref$.ds,xs=ref$.xs,ts=ref$.ts,dc=ref$.dc,sgn=ref$.sgn,flip=ref$.flip;for(i$=0,to$=ts.length;i$<to$;++i$){i=i$;if(t<ts[i]){break}}ref$=slice$.call(ds,i-1,i+1||9e9),d1=ref$[0],d2=ref$[1];ref$=slice$.call(xs,i-1,i+1||9e9),x1=ref$[0],x2=ref$[1];ref$=slice$.call(ts,i-1,i+1||9e9),t1=ref$[0],t2=ref$[1];if(i===1){t=Math.pow(t/ts[1],.5)*ts[1]}x=x1+(x2-x1)*(t-t1)/(t2-t1);d=d1+(d2-d1)*(t-t1)/(t2-t1);return{transform:"translate"+dc+"("+sgn*x+opt.unit+") skew"+dc+"("+flip*sgn*d+"deg)",opacity:(ref$=t*20)<1?ref$:1}},affine:function(t,opt){var ref$,RD,deg,offset,size,ds,xs,ts,dc,sgn,flip,i$,to$,i,d1,d2,x1,x2,t1,t2,x,d,kx,ky,tx,ty;ref$=this.local.data(opt),RD=ref$.RD,deg=ref$.deg,offset=ref$.offset,size=ref$.size,ds=ref$.ds,xs=ref$.xs,ts=ref$.ts,dc=ref$.dc,sgn=ref$.sgn,flip=ref$.flip;for(i$=0,to$=ts.length;i$<to$;++i$){i=i$;if(t<ts[i]){break}}ref$=slice$.call(ds,i-1,i+1||9e9),d1=ref$[0],d2=ref$[1];ref$=slice$.call(xs,i-1,i+1||9e9),x1=ref$[0],x2=ref$[1];ref$=slice$.call(ts,i-1,i+1||9e9),t1=ref$[0],t2=ref$[1];if(i===1){t=Math.pow(t/ts[1],.5)*ts[1]}x=x1+(x2-x1)*(t-t1)/(t2-t1);d=d1+(d2-d1)*(t-t1)/(t2-t1);kx=dc==="X"?-Math.tan(flip*sgn*d*Math.PI/180):0;ky=dc==="Y"?-Math.tan(flip*sgn*d*Math.PI/180):0;tx=dc==="X"?sgn*x:0;ty=dc==="Y"?-sgn*x:0;return{transform:[1,kx,0,tx,ky,1,0,ty,0,0,1,0,0,0,0,1],opacity:(ref$=t*20)<1?ref$:1}}};if(typeof module!="undefined"&&module!==null){module.exports=ret}return ret})()},{}],27:[function(require,module,exports){(function(){var easingFit,cubic,anikit,ret;if(typeof require!="undefined"&&require!==null){easingFit=require("easing-fit");cubic=require("cubic");anikit=require("../anikit")}ret={name:"skew",type:"animation",preset:{skew:{},"skew-alt":{dir:90}},edit:{dir:{type:"number",default:0,min:0,max:90,step:1},deg:{type:"number",default:20,min:0,max:60,step:.1},scale:{type:"number",default:.1,min:0,max:1,step:.01},steep:{default:.4,type:"number",min:0,max:1,step:.01}},css:function(opt){var ds,s,c;ds=1-opt.scale;s=opt.steep;c=opt.dir===0?"X":"Y";return"@keyframes "+opt.name+" {\n  0%, 50%, 100% { animation-timing-function: cubic-bezier("+s+",0,1,"+(1-s)+") }\n  25%, 75% {      animation-timing-function: cubic-bezier(0,"+s+","+(1-s)+",1) }\n    0% { transform: skew"+c+"("+opt.deg+"deg) scale(1) }\n   25% { transform: skew"+c+"(0deg) scale("+ds+") }\n   50% { transform: skew"+c+"(-"+opt.deg+"deg) scale(1) }\n   75% { transform: skew"+c+"(0deg) scale("+ds+") }\n  100% { transform: skew"+c+"("+opt.deg+"deg) scale(1) }\n}"},js:function(t,opt){var v,m;v=this.affine(t,opt,true);m=anikit.util.m4to3(v.transform);return{transform:"matrix("+m.join(",")+")"}},affine:function(t,opt,inverse){var ds,s,p1,p2,phase,dt,p,a,sx,sy;ds=1-opt.scale;s=opt.steep;p1=[s,0,1,1-s];p2=[0,s,1-s,1];phase=Math.floor(t*4);dt=t*4-phase;p=phase%2?p2:p1;t=cubic.Bezier.y(cubic.Bezier.t(dt,p),p);s=phase%2?(1-ds)*t+ds:(ds-1)*t+1;a=(phase%2?opt.deg*t:opt.deg*(1-t))*Math.PI/180;if(phase>=1&&phase<3){a=-a}sx=sy=-Math.tan(a);if(inverse){sx=sy=-sx}if(opt.dir===0){sy=0}else{sx=0}return{transform:[s,sy,0,0,sx,s,0,0,0,0,s,0,0,0,0,1]}}};if(typeof module!="undefined"&&module!==null){module.exports=ret}return ret})()},{"../anikit":4,cubic:37,"easing-fit":38}],28:[function(require,module,exports){(function(){var easingFit,cubic,anikit,slide,ret;if(typeof require!="undefined"&&require!==null){easingFit=require("easing-fit");cubic=require("cubic");anikit=require("../anikit")}slide={prop:function(f,c){var value;value=this.value(f.value,c);return{transform:anikit.util.decompose(anikit.util.m4to3(value.transform),c),opacity:c.fade?value.opacity:1}},value:function(t,c){return{transform:anikit.util[c.dir===1?"tx":"ty"](t*c.offset),opacity:c.fade&&(t<=-.8||t>=.8)?0:1}}};ret={name:"slide",type:"animation",preset:{"slide-ltr":import$({label:"slide (left to right)",offset:200},slide),"slide-rtl":import$({label:"slide (right to left)",offset:-200},slide),"slide-btt":import$({label:"slide (bottom to top)",offset:-200,dir:2},slide),"slide-ttb":import$({label:"slide (top to bottom)",offset:200,dir:2},slide)},edit:{fade:{default:true,type:"boolean",hidden:true},steep:{default:.3,type:"number",min:.3,max:1,step:.01},offset:{name:"Move Distance",default:200,type:"number",unit:"px",min:-2e3,max:2e3},dir:{default:1,type:"number",hidden:true},unit:{default:"px",type:"choice",values:["px","%",""]}},timing:function(t,opt){var p1,p2;p1=[opt.steep,0,1,1-opt.steep];p2=[0,opt.steep,1-opt.steep,1];if(t<.5){t=cubic.Bezier.y(cubic.Bezier.t(t*2,p1),p1)}else{t=cubic.Bezier.y(cubic.Bezier.t((t-.5)*2,p2),p2)/2;t=t*2-1}return t},css:function(opt){var local,prop,ref$,ref1$,this$=this;local={errorThreshold:1e-4,sampleCount:20};prop=function(f,c){return opt.prop(f,c)};return easingFit.fitToKeyframes(function(it){return this$.timing(it,opt)},(ref$=(ref1$=import$(local,opt.local)||{},ref1$.prop=prop,ref1$.config=opt,ref1$),ref$.name=opt.name,ref$))},js:function(t,opt){return opt.prop({value:this.timing(t,opt)},opt)},affine:function(t,opt){return opt.value(this.timing(t,opt),opt)}};if(typeof module!="undefined"&&module!==null){module.exports=ret}return ret})();function import$(obj,src){var own={}.hasOwnProperty;for(var key in src)if(own.call(src,key))obj[key]=src[key];return obj}},{"../anikit":4,cubic:37,"easing-fit":38}],29:[function(require,module,exports){(function(){var easingFit,cubic,anikit,ret;if(typeof require!="undefined"&&require!==null){easingFit=require("easing-fit");cubic=require("cubic");anikit=require("../anikit")}ret={name:"spin",type:"animation",preset:{"coin-h":{label:"coin (horizontally)",cycle:10,dur:2,prop:function(f,c){return{transform:"rotateY("+f.value*c.cycle*360+"deg)"}},value:function(t,c){return{transform:anikit.util.ry(t*c.cycle*Math.PI*2)}}},"coin-v":{label:"coin (vertically)",cycle:10,dur:2,prop:function(f,c){return{transform:"rotateX("+f.value*c.cycle*360+"deg)"}},value:function(t,c){return{transform:anikit.util.rx(t*c.cycle*Math.PI*2)}}},cycle:{steep:0,cycle:1,prop:function(f,c){return{transform:"rotate("+f.value*c.cycle*360+"deg)"}},value:function(t,c){return{transform:anikit.util.rz(t*c.cycle*Math.PI*2)}}},"cycle-alt":{steep:0,cycle:-1,prop:function(f,c){return{transform:"rotate("+f.value*c.cycle*360+"deg)"}},value:function(t,c){return{transform:anikit.util.rz(t*c.cycle*Math.PI*2)}}},"flip-h":{label:"flip (horizontally)",cycle:1,flip:true,prop:function(f,c){return{transform:"rotateY("+f.value*c.cycle*360+"deg)"}},value:function(t,c){return{transform:anikit.util.ry(t*c.cycle*Math.PI*2)}}},"flip-v":{label:"flip (vertically)",cycle:1,flip:true,prop:function(f,c){return{transform:"rotateX("+f.value*c.cycle*360+"deg)"}},value:function(t,c){return{transform:anikit.util.rx(t*c.cycle*Math.PI*2)}}},"spin-fast":{cycle:5,prop:function(f,c){return{transform:"rotate("+f.value*c.cycle*360+"deg)"}},value:function(t,c){return{transform:anikit.util.rz(t*c.cycle*Math.PI*2)}}},spin:{cycle:1,prop:function(f,c){return{transform:"rotate("+f.value*c.cycle*360+"deg)"}},value:function(t,c){return{transform:anikit.util.rz(t*c.cycle*Math.PI*2)}}}},edit:{steep:{default:.4,type:"number",min:0,max:1,step:.01},cycle:{default:1,type:"number",min:-20,max:20,step:1},flip:{default:false,type:"boolean",hidden:true},unit:{default:"px",type:"choice",values:["px","%",""]}},timing:function(t,opt){var p1,p2;p1=[opt.steep,0,1,1-opt.steep];p2=[0,opt.steep,1-opt.steep,1];if(opt.flip){p1=p2}if(t===0||t===1){return t}if(t<.5){t=cubic.Bezier.y(cubic.Bezier.t(t*2,p1),p1);t=t*.5}else{t=cubic.Bezier.y(cubic.Bezier.t((t-.5)*2,p2),p2);t=t*.5+.5}return t},css:function(opt){var local,ref$,ref1$,this$=this;local={errorThreshold:.001,sampleCount:20};return easingFit.fitToKeyframes(function(it){return this$.timing(it,opt)},(ref$=(ref1$=import$(local,opt.local)||{},ref1$.config=opt,ref1$),ref$.name=opt.name,ref$.prop=opt.prop,ref$))},js:function(t,opt){return opt.prop({value:this.timing(t,opt)},opt)},affine:function(t,opt){return opt.value(this.timing(t,opt),opt)}};if(typeof module!="undefined"&&module!==null){module.exports=ret}return ret})();function import$(obj,src){var own={}.hasOwnProperty;for(var key in src)if(own.call(src,key))obj[key]=src[key];return obj}},{"../anikit":4,cubic:37,"easing-fit":38}],30:[function(require,module,exports){(function(){var easingFit,cubic,anikit,ret;if(typeof require!="undefined"&&require!==null){easingFit=require("easing-fit");cubic=require("cubic");anikit=require("../anikit")}ret={name:"squeeze",type:"animation",preset:{squeeze:{local:{sampleCount:20,errorThreshold:.001},prop:function(f,c){var sx,sy;sx=1-2*Math.abs(.5-f.value)*c.zoomx;sy=1-2*(.5-Math.abs(.5-f.value))*c.zoomy;return{transform:"scale("+sx+","+sy+")"}},value:function(t,c){var sx,sy;sx=1-2*Math.abs(.5-t)*c.zoomx;sy=1-2*(.5-Math.abs(.5-t))*c.zoomy;return{transform:[sx,0,0,0,0,sy,0,0,0,0,1,0,0,0,0,1]}}}},edit:{steep:{default:.5,type:"number",min:0,max:1,step:.01},zoomx:{name:"X Scale",default:.5,type:"number",min:0,max:1,step:.01},zoomy:{name:"Y Scale",default:.5,type:"number",min:0,max:1,step:.01}},timing:function(t,opt){var p1,d;p1=[0,opt.steep,1-opt.steep,1];d=(t-Math.floor(t*2)*.5)*2;d=cubic.Bezier.y(cubic.Bezier.t(d,p1),p1)*.5;d=d+Math.floor(t*2)*.5;return d},css:function(opt){var ref$,ref1$,this$=this;return easingFit.fitToKeyframes(function(it){return this$.timing(it,opt)},(ref$=(ref1$=import$({},opt.local)||{},ref1$.config=opt,ref1$),ref$.name=opt.name,ref$.prop=opt.prop,ref$))},js:function(t,opt){return opt.prop({value:this.timing(t,opt)},opt)},affine:function(t,opt){return opt.value(this.timing(t,opt),opt)}};if(typeof module!="undefined"&&module!==null){module.exports=ret}return ret})();function import$(obj,src){var own={}.hasOwnProperty;for(var key in src)if(own.call(src,key))obj[key]=src[key];return obj}},{"../anikit":4,cubic:37,"easing-fit":38}],31:[function(require,module,exports){(function(){var easingFit,cubic,anikit,ret;if(typeof require!="undefined"&&require!==null){easingFit=require("easing-fit");cubic=require("cubic");anikit=require("../anikit")}ret={name:"static",type:"animation",preset:{static:{}},edit:{},css:function(opt){return" @keyframes "+opt.name+" { 0% { } 100% { } } "},js:function(t,opt){return{}},affine:function(t,opt){return{}}};if(typeof module!="undefined"&&module!==null){module.exports=ret}return ret})()},{"../anikit":4,cubic:37,"easing-fit":38}],32:[function(require,module,exports){(function(){var easingFit,cubic,anikit,ret;if(typeof require!="undefined"&&require!==null){easingFit=require("easing-fit");cubic=require("cubic");anikit=require("../anikit")}ret={name:"surprise",type:"animation",preset:{surprise:{}},edit:{zoom_min:{name:"Min Scale",default:.5,type:"number",min:0,max:10,step:.1},zoom_max:{name:"Max Scale",default:1,type:"number",min:0,max:10,step:.1},skew:{name:"Skew Amount",default:25,type:"number",unit:"deg",min:-90,max:90}},css:function(opt){return"@keyframes "+opt.name+" {\n  0% { transform: skewX(0deg) scale(1); }\n  10% { transform: skewX("+-opt.skew+"deg) scale("+opt.zoom_min+"); }\n  20% { transform: skewX("+-opt.skew+"deg) scale("+opt.zoom_min+"); }\n  30% { transform: skewX("+opt.skew+"deg) scale("+opt.zoom_max+"); }\n  40% { transform: skewX("+-opt.skew+"deg) scale("+opt.zoom_max+"); }\n  50% { transform: skewX("+opt.skew+"deg) scale("+opt.zoom_max+"); }\n  60% { transform: skewX("+-opt.skew+"deg) scale("+opt.zoom_max+"); }\n  70% { transform: skewX("+opt.skew+"deg) scale("+opt.zoom_max+"); }\n  80% { transform: skewX("+-opt.skew+"deg) scale("+opt.zoom_max+"); }\n  90% { transform: skewX("+opt.skew+"deg) scale("+opt.zoom_max+"); }\n  100% { transform: skewX("+-opt.skew+"deg) scale("+opt.zoom_max+"); }\n}"},js:function(t,opt){var m;m=this.affine(t,opt).transform;m=[m[0],-m[1],m[4],m[5],m[3],-m[7]];return{transform:"matrix("+m.join(",")+")"}},affine:function(t,opt){var ref$,k1,k2,s1,s2,d,k,s;ref$=[0,0,opt.zoom_min,opt.zoom_min],k1=ref$[0],k2=ref$[1],s1=ref$[2],s2=ref$[3];d=Math.floor(t*10);if(d===0){ref$=[0,-1],k1=ref$[0],k2=ref$[1]}else if(d===1){ref$=[-1,-1],k1=ref$[0],k2=ref$[1]}else{ref$=[Math.pow(-1,d-1),Math.pow(-1,d)],k1=ref$[0],k2=ref$[1]}if(d===0){ref$=[1,opt.zoom_min],s1=ref$[0],s2=ref$[1]}else{if(d>1){s2=opt.zoom_max}if(d>2){s1=opt.zoom_max}}t=10*t-d;k=(k2-k1)*t+k1;s=(s2-s1)*t+s1;return{transform:[s,-Math.tan(k*opt.skew*Math.PI/180),0,0,0,s,0,0,0,0,1,0,0,0,0,1]}}};if(typeof module!="undefined"&&module!==null){module.exports=ret}return ret})()},{"../anikit":4,cubic:37,"easing-fit":38}],33:[function(require,module,exports){(function(){var easingFit,cubic,anikit,value,ref$,h,w,a,ret;if(typeof require!="undefined"&&require!==null){easingFit=require("easing-fit");cubic=require("cubic");anikit=require("../anikit")}value=function(f,c){var ref$,x,y;ref$=[0,0],x=ref$[0],y=ref$[1];if(c.dir===1){y=-f.value}if(c.dir===2){y=f.value}if(c.dir===3){x=f.value}if(c.dir===4){x=-f.value}return{transform:[1,0,0,x*c.height,0,1,0,y*c.height,0,0,1,0,0,0,0,1],opacity:(ref$=f.percent*10)<1?ref$:1}};ref$=[1,1],h=ref$[0],w=ref$[1];a=h/Math.pow(w,2);ret={name:"throw",type:"animation",preset:{"throw-ttb-in":{label:"throw-in (top to bottom)",dir:2,repeat:1},"throw-ltr-in":{label:"throw-in (left to right)",dir:4,repeat:1},"throw-rtl-in":{label:"throw-in (right to left)",dir:3,repeat:1},"throw-btt-in":{label:"throw-in (bottom to top)",dir:1,repeat:1}},edit:{dir:{type:"number",default:1,hidden:true,min:1,max:4,step:1},count:{name:"Bounce Count",type:"number",default:3,min:1,max:10,step:1},height:{name:"Height",type:"number",default:20,min:0,max:1e3,step:1},decay:{name:"Decay",type:"number",default:.3,min:.01,max:.99,step:.01},unit:{default:"px",type:"choice",values:["px","%",""]}},track:function(t,opt){var r,rr,dx,rin,total,x,i$,to$,i,cw,ox,ret;r=opt.decay;rr=Math.sqrt(r);dx=.2;rin=2;total=2*w*(Math.pow(rr,opt.count)-1)/(rr-1);if(t<dx){return rin*2*h*total*dx/w*Math.pow(dx-t,.5)}x=(t-dx)*total/(1-dx);for(i$=1,to$=opt.count;i$<=to$;++i$){i=i$;cw=2*w*(Math.pow(rr,i)-1)/(rr-1);if(x<cw){break}}ox=2*w*(Math.pow(rr,i)-1)/(rr-1)-w*Math.pow(rr,i-1);ret=a*Math.pow(x-ox,2)-h*Math.pow(r,i-1);return ret},local:{prop:function(f,c){var v,m;v=value(f,c);m=anikit.util.m4to3(v.transform);return v.transform="translate("+m[4]+c.unit+","+m[5]+c.unit+")",v}},css:function(opt){var ret,this$=this;ret=easingFit.fitToKeyframes(function(it){return this$.track(it,opt)},{config:opt,sampleCount:100,errorThreshold:1e-6,segSampleCount:100,name:opt.name,prop:this.local.prop});return ret},js:function(t,opt){return this.local.prop({value:this.track(t,opt),percent:t},opt)},affine:function(t,opt){return value({value:this.track(t,opt),percent:t},opt)}};if(typeof module!="undefined"&&module!==null){module.exports=ret}return ret})()},{"../anikit":4,cubic:37,"easing-fit":38}],34:[function(require,module,exports){(function(){var easingFit,cubic,anikit,ret;if(typeof require!="undefined"&&require!==null){easingFit=require("easing-fit");cubic=require("cubic");anikit=require("../anikit")}ret={name:"tremble",type:"animation",preset:{measure:{dur:5,count:30,offset:0,degree:30,zoom:0},shiver:{dur:.5,count:30,offset:0,degree:0,zoom:.1},swim:{dur:10,count:12,offset:12,degree:30,zoom:0,unit:"px"},tremble:{dur:.5,count:30,offset:3,degree:0,zoom:0,unit:"px"}},edit:{count:{name:"Sample Count",default:30,type:"number",min:1,max:99},offset:{name:"Position Variance",default:4,type:"number",unit:"px",min:0,max:30},degree:{name:"Angle Variance",default:0,type:"number",unit:"degree",min:0,max:360},zoom:{name:"Scale Variance",default:0,type:"number",min:0,max:2,step:.01},unit:{default:"px",type:"choice",values:["px","%",""]}},prop:function(f,opt){var ref$,x,y,r,s;ref$=this.calc(f.value,opt).map(function(it){return anikit.util.round(it)}),x=ref$[0],y=ref$[1],r=ref$[2],s=ref$[3];return{transform:"translate("+x+opt.unit+","+y+opt.unit+") rotate("+r+"deg) scale("+s+")"}},css:function(opt){var ret,i$,to$,i,p;ret=["@keyframes "+opt.name+" {","  0% { transform: "+this.prop({value:0},opt).transform+" }"];for(i$=1,to$=opt.count;i$<to$;++i$){i=i$;p=easingFit.round(100*i/opt.count);ret.push("  "+p+"% { transform: "+this.prop({value:p/100},opt).transform+" }")}ret.push("  100% { transform: translate(0,0) rotate(0) scale(1) }");ret.push("}");return ret.join("\n")},calc:function(t,opt){var offset,degree,zoom,x,y,r,s;offset=opt.offset,degree=opt.degree,zoom=opt.zoom;if(t===0||t===1){return[0,0,0,1]}x=anikit.util.noise(t*78779)*offset-offset*.5;y=anikit.util.noise(t*57793)*offset-offset*.5;r=anikit.util.noise(t*19901)*degree-degree*.5;s=1+anikit.util.noise(t+31393)*zoom-zoom*.5;return[x,y,r,s]},js:function(t,opt){var values,mat;values=this.affine(t,opt);mat=values.transform;return{transform:"matrix("+[mat[0],mat[1],mat[4],mat[5],mat[3],mat[7]].join(",")+")"}},affine:function(t,opt){var t1,t2,ref$,x1,y1,r1,s1,x2,y2,r2,s2,x,y,r,s;t1=Math.floor(t*opt.count)/opt.count;t2=Math.ceil(t*opt.count)/opt.count;ref$=this.calc(t1-Math.floor(t1),opt),x1=ref$[0],y1=ref$[1],r1=ref$[2],s1=ref$[3];ref$=this.calc(t2-Math.floor(t2),opt),x2=ref$[0],y2=ref$[1],r2=ref$[2],s2=ref$[3];t=t===0?0:(t-t1)/(t2-t1);x=(x2-x1)*t+x1;y=(y2-y1)*t+y1;r=((r2-r1)*t+r1)*Math.PI/180;s=(s2-s1)*t+s1;return{transform:[s*Math.cos(r),Math.sin(r),0,x,-Math.sin(r),s*Math.cos(r),0,y,0,0,s,0,0,0,0,1]}}};if(typeof module!="undefined"&&module!==null){module.exports=ret}return ret})()},{"../anikit":4,cubic:37,"easing-fit":38}],35:[function(require,module,exports){(function(){var easingFit,cubic,anikit,value,ret;if(typeof require!="undefined"&&require!==null){easingFit=require("easing-fit");cubic=require("cubic");anikit=require("../anikit")}value=function(t,c){var fade,r,s,o,ret;fade=c.fade;if(c.reverse){r=-t*c.rotate*Math.PI*2;s=(c.zoom-1)*t+1;o=1-t;fade=true}else{if(t<.6){r=t*c.rotate/.6*Math.PI*2;s=(1-c.zoom)*(t/.6)+c.zoom;o=t/.6}else{r=c.rotate*Math.PI*2;s=1;o=1-(t-.6)/(1-.6)}if(t<.6){fade=true}}ret={transform:[s*Math.cos(r),s*Math.sin(r),0,0,-s*Math.sin(r),s*Math.cos(r),0,0,0,0,s,0,0,0,0,1]};if(fade){ret.opacity=o}return ret};ret={name:"vortex",type:"animation",preset:{vortex:{zoom:.3},"vortex-alt":{zoom:3},"vortex-in":{zoom:.3,fade:false,repeat:1},"vortex-out":{zoom:.3,repeat:1,reverse:true},"vortex-alt-in":{zoom:3,fade:false,repeat:1},"vortex-alt-out":{zoom:3,repeat:1,reverse:true}},edit:{dur:{default:1},steep:{default:.3,type:"number",min:0,max:.3,step:.01},rotate:{name:"Rotate Times",default:5,type:"number",min:1,max:20},zoom:{name:"Scale",default:3,type:"number",min:0,max:10,step:.1},fade:{default:true,type:"boolean",hidden:true},reverse:{default:false,type:"boolean",hidden:true}},local:{prop:function(f,c){var v,m;v=value(f.value,c);m=anikit.util.m4to3(v.transform);return v.transform="matrix("+m.join(",")+")",v},value:function(t,c){return value(t,c)}},timing:function(t,opt){var p1;p1=[opt.steep,0,1,1-opt.steep];if(opt.reverse){t=cubic.Bezier.y(cubic.Bezier.t(t,p1),p1)}else{if(t===0){return 0}if(t<.6){t=cubic.Bezier.y(cubic.Bezier.t(t/.6,p1),p1)*.6}else{t=cubic.Bezier.y(cubic.Bezier.t((t-.6)/(1-.6),p1),p1)*.4+.6}}return t},css:function(opt){var s,opacity;s=opt.steep;opacity=function(v,force){if(opt.fade||force){return"opacity: "+v+";"}else{return"opacity: 1;"}};if(opt.reverse){return"@keyframes "+opt.name+" {\n  0% {\n    animation-timing-function: cubic-bezier("+s+", 0, 1, "+(1-s)+");\n    transform: rotate(0deg) scale(1);\n    opacity: 1\n  }\n  100% { transform: rotate("+-360*opt.rotate+"deg) scale("+opt.zoom+"); opacity: 0; }\n}"}else{return"@keyframes "+opt.name+" {\n  0%, 60% { animation-timing-function: cubic-bezier("+s+", 0, 1, "+(1-s)+"); }\n  0% { "+opacity(0,1)+" transform: rotate("+-360*opt.rotate+"deg) scale("+opt.zoom+"); }\n  60% { "+opacity(1)+" transform: rotate(0deg) scale(1); }\n  100% { "+opacity(0)+" transform: rotate(0deg) scale(1); }\n}"}},js:function(t,opt){return this.local.prop({value:this.timing(t,opt)},opt)},affine:function(t,opt){return this.local.value(this.timing(t,opt),opt)}};if(typeof module!="undefined"&&module!==null){module.exports=ret}return ret})()},{"../anikit":4,cubic:37,"easing-fit":38}],36:[function(require,module,exports){(function(){var easingFit,cubic,anikit,ret;if(typeof require!="undefined"&&require!==null){easingFit=require("easing-fit");cubic=require("cubic");anikit=require("../anikit")}ret={name:"wrench",type:"animation",preset:{wrench:{}},edit:{dur:{default:1},rotate:{name:"Rotate Degree",default:45,type:"number",min:0,max:360,step:1}},css:function(opt){return"@keyframes "+opt.name+" {\n  20%, 36%, 70%, 86% {\n    transform: rotate(0deg);\n  }\n  0%, 50%, 100% {\n    transform: rotate("+opt.rotate+"deg);\n  }\n}"},js:function(t,opt){var m;m=anikit.util.m4to3(this.affine(t,opt).transform);return{transform:"matrix("+m.join(",")+")"}},affine:function(t,opt){var r;t=(t*2-Math.floor(t*2))*.5;if(t<.2){t=1-t/.2}else if(t>.36){t=(t-.36)/.14}else{t=0}r=t*opt.rotate*Math.PI/180;return{transform:[Math.cos(r),Math.sin(r),0,0,-Math.sin(r),Math.cos(r),0,0,0,0,1,0,0,0,0,1]}}};if(typeof module!="undefined"&&module!==null){module.exports=ret}return ret})()},{"../anikit":4,cubic:37,"easing-fit":38}],37:[function(require,module,exports){var Func,FuncMembers,Bezier,BezierMembers;Func=function(a,b,c,d){this.a=a;this.b=b;this.c=c;this.d=d;return this};Func.prototype=import$(Object.create(Object.prototype),FuncMembers={calc:function(x,a,b,c,d){a==null&&(a=this.a);b==null&&(b=this.b);c==null&&(c=this.c);d==null&&(d=this.d);return a*Math.pow(x,3)+b*Math.pow(x,2)+c*x+d},root:function(y,a,b,c,d){var A,B,C,delta,y1,y2,x1,k,t,theta,x2,x3;y==null&&(y=0);a==null&&(a=this.a);b==null&&(b=this.b);c==null&&(c=this.c);d==null&&(d=this.d);d=d-y;A=b*b-3*a*c;B=b*c-9*a*d;C=c*c-3*b*d;delta=B*B-4*A*C;if(A===B&&B===0){return[-b/(3*a),-c/b,-3*d/c]}if(delta>0){y1=A*b+3*a*(-B+Math.sqrt(B*B-4*A*C))/2;y2=A*b+3*a*(-B-Math.sqrt(B*B-4*A*C))/2;x1=(-b-(Math.cbrt(y1)+Math.cbrt(y2)))/(3*a);return[x1]}if(delta===0){k=B/A;return[-b/a+k,-k/2,-k/2]}if(delta<0){t=(2*A*b-3*a*B)/(2*A*Math.sqrt(A));theta=Math.acos(t);x1=(-b-2*Math.sqrt(A)*Math.cos(theta/3))/(3*a);x2=(-b+Math.sqrt(A)*(Math.cos(theta/3)+Math.sqrt(3)*Math.sin(theta/3)))/(3*a);x3=(-b+Math.sqrt(A)*(Math.cos(theta/3)-Math.sqrt(3)*Math.sin(theta/3)))/(3*a);return[x1,x2,x3]}}});import$(Func,FuncMembers);Func.glsl="float cubic(float x, vec4 p) {\n  return p.x * x * x * x + p.y * x * x + p.z * x + p.w;\n}\n/* 3 roots, 1 for root count */\nvec4 cubicRoot(float y, vec4 p) {\n  float a, b, c, d, A, B, C, D, y1, y2, k, theta, x1, x2, x3;\n  d = d - y;\n  A = b * b - 3. * a * c;\n  B = b * c - 9. * a * d;\n  C = c * c - 3. * b * d;\n  D = B * B - 4. * A * C;\n  if(A==B && B==0.) return vec4(-b / (3. * a), -c / b, -3. * d / c, 3.);\n  if(D > 0) {\n    y1 = A * b + 3. * a * (-B + sqrt(D)) * 0.5;\n    y2 = A * b + 3. * a * (-B - sqrt(D)) * 0.5;\n    return vec4(vec3(-b - (cbrt(y1) + cbrt(y2)) / ( 3. * a)), 1.);\n  } else if(D == 0) {\n    k = B/A;\n    return vec4((-b/a) + k, -k/2., -k/2., 2.);\n  } else if(D < 0) {\n    k = (2. * A * b - 3 * a * B) / (2. * A * sqrt(A));\n    theta = acos(k) / 3.;\n    x1 = (-b - 2. * sqrt(A) * cos(theta)) / (3. * a);\n    x2 = (-b + sqrt(A) * (cos(theta) + sqrt(3.) * sin(theta))) / (3. * a);\n    x3 = (-b + sqrt(A) * (cos(theta) - sqrt(3.) * sin(theta))) / (3. * a);\n    return vec4(x1, x2, x3, 3.);\n  }\n}";Bezier=function(p){var coff;this.p=p;this.coff=coff=[3*p[0]-3*p[2]+1,-6*p[0]+3*p[2],3*p[0],0];this.eq=new Func(coff[0],coff[1],coff[2],coff[3]);return this};Bezier.prototype=import$(Object.create(Object.prototype),BezierMembers={x:function(t,p){p==null&&(p=this.p);return 3*Math.pow(1-t,2)*t*p[0]+3*(1-t)*t*t*p[2]+t*t*t},y:function(t,p){p==null&&(p=this.p);return 3*Math.pow(1-t,2)*t*p[1]+3*(1-t)*t*t*p[3]+t*t*t},t:function(x,p,err){var ret,r;err==null&&(err=1e-6);ret=p?Func.root(x,3*p[0]-3*p[2]+1,-6*p[0]+3*p[2],3*p[0],0):this.eq.root(x);if(err){ret=ret.map(function(it){return Math.round(it/err)*err})}r=ret.filter(function(it){return it>=0&&it<=1})[0];if(!(r!=null)){ret=ret.map(function(it){return[it,Math.min(Math.abs(it),Math.abs(it-1))]});ret.sort(function(a,b){return a[0]-b[0]});return ret[0]}return r}});import$(Bezier,BezierMembers);module.exports={Func:Func,Bezier:Bezier};function import$(obj,src){var own={}.hasOwnProperty;for(var key in src)if(own.call(src,key))obj[key]=src[key];return obj}},{}],38:[function(require,module,exports){var fitCurve,svgPathProperties,round,sampleFunc,fit,toKeyframes,fitToKeyframes,sampleSvg,searchSvgPath,fromSvg,stepFromSvg;fitCurve=require("fit-curve");svgPathProperties=require("svg-path-properties");round=function(n,d){var p,ret;d==null&&(d=5);p=Math.pow(10,d);ret=(Math.round(n*p)/p+"").split(".");return+(ret[0]+(ret[1]?"."+ret[1].substring(0,d):""))};sampleFunc=function(t){return Math.abs(Math.sin(Math.pow(3*t+1.77,2))/(Math.pow(3*t+2,5*t)+1))};fit=function(func,opt){var ref$,ox,oy,dy,count,segments,i$,step$,to$,x,y,p,j$,to1$,i,points,segIdx,seg,cur,py,keyframes,len$,ps,curves,len1$,curve,x1,x2,y1,y2,ncurve,k$,j;opt==null&&(opt={});opt=import$({segSampleCount:100,precision:1e-4,sampleCount:5,errorThreshold:.1,start:0,end:1,segPtrs:[]},opt);ref$=[opt.start,0,1,0,[]],ox=ref$[0],oy=ref$[1],dy=ref$[2],count=ref$[3],segments=ref$[4];for(i$=opt.start,to$=opt.end,step$=1/opt.segSampleCount;step$<0?i$>=to$:i$<=to$;i$+=step$){x=i$;y=func(x);if(count>2&&Math.sign(y-oy)*Math.sign(dy)<0){segments.push([ox,x]);ox=x}p=opt.segPtrs.filter(fn$).filter(fn1$);if(p.length){for(j$=0,to1$=p.length;j$<to1$;++j$){i=j$;segments.push([ox,p[i]]);ox=p[i]}}dy=y-oy;oy=y;count=count+1}segments.push([ox,opt.end]);points=[];for(i$=0,to$=segments.length;i$<to$;++i$){segIdx=i$;seg=segments[segIdx];cur=[];for(j$=seg[0],to1$=seg[1],step$=(seg[1]-seg[0])/opt.sampleCount;step$<0?j$>to1$:j$<to1$;j$+=step$){x=j$;y=Math.round(func(x)*1e3)/1e3;cur.push([Math.round(1e3*x)*.001,Math.round(1e3*y)*.001])}y=Math.round(func(seg[1])*1e3)/1e3;cur.push([Math.round(1e3*seg[1])*.001,Math.round(1e3*y)*.001]);points.push(cur)}py=NaN;keyframes=[];for(i$=0,len$=points.length;i$<len$;++i$){ps=points[i$];curves=fitCurve(ps,opt.errorThreshold);for(j$=0,len1$=curves.length;j$<len1$;++j$){curve=curves[j$];x1=curve[0][0];x2=curve[3][0];y1=curve[0][1];y2=curve[3][1];ncurve=[];if(Math.abs(y1-py)<.5*.01){continue}py=y1;for(k$=0;k$<4;++k$){j=k$;ncurve.push([Math.round((curve[j][0]-x1)/(x2-x1)/opt.precision)*opt.precision,Math.round((curve[j][1]-y1)/(y2-y1)/opt.precision)*opt.precision])}if(isNaN(ncurve[1][1])){ncurve[1][1]=ncurve[1][0]}if(isNaN(ncurve[2][1])){ncurve[2][1]=ncurve[2][0]}keyframes.push({percent:round(x1*100),value:y1,cubicBezier:[ncurve[1][0],ncurve[1][1],ncurve[2][0],ncurve[2][1]].map(fn2$)})}}keyframes.push({percent:opt.end*100,value:y2});return keyframes;function fn$(it){return it>x}function fn1$(it){return it<=x+1/opt.segSampleCount}function fn2$(it){return round(it)}};toKeyframes=function(keyframes,opt){var str,i$,to$,i,keyframe,props,k,v;opt==null&&(opt={});opt=import$({prop:function(f,c){return{content:'"'+f.value+'"'}},name:null,format:"css",config:{}},opt||{});str=opt.name?["@keyframes "+opt.name]:[];if(opt.format==="css"){str=str.concat("{");for(i$=0,to$=keyframes.length;i$<to$;++i$){i=i$;keyframe=keyframes[i];props=fn$().map(fn1$);str=str.concat(["  "+keyframe.percent+"% {",keyframe.cubicBezier?"    animation-timing-function: cubic-bezier("+keyframe.cubicBezier.join(",")+");":void 8].concat(props,["  }"]).filter(fn2$))}str=str.concat("}");str=str.join("\n")}else{for(i$=0,to$=keyframes.length;i$<to$;++i$){i=i$;keyframe=keyframes[i];props=fn3$().map(fn4$);str=str.concat(["  "+keyframe.percent+"%",keyframe.cubicBezier?"    animation-timing-function: cubic-bezier("+keyframe.cubicBezier.join(",")+")":void 8].concat(props).filter(fn5$))}str=str.join("\n")}return str;function fn$(){var ref$,results$=[];for(k in ref$=opt.prop(keyframe,opt.config,i)){v=ref$[k];results$.push([k,v])}return results$}function fn1$(it){return"    "+it[0]+": "+it[1]+";"}function fn2$(it){return it}function fn3$(){var ref$,results$=[];for(k in ref$=opt.prop(keyframe,opt.config,i)){v=ref$[k];results$.push([k,v])}return results$}function fn4$(it){return"    "+it[0]+": "+it[1]}function fn5$(it){return it}};fitToKeyframes=function(step,opt){var ret,ref$;opt==null&&(opt={});ret=fit(step,opt);ret=toKeyframes(ret,{name:(ref$=import$({prop:function(){return{}},format:"css"},opt)).name,prop:ref$.prop,format:ref$.format,config:ref$.config});return ret};sampleSvg="M0,50c0,0,2,0.5,6.7,0c5.6-0.6,3.5-18.1,7.1-18.1s4.2,25.6,8.9,25.6s6.8-10.3,8.4-14c1.9-4.4,7.9-5.4,10.9,0.1C46.7,52.3,100,50,100,50";searchSvgPath=function(p,x,len,err,r,lv){var m,ptr;err==null&&(err=.01);r==null&&(r=[0,1]);lv==null&&(lv=20);m=(r[0]+r[1])*.5;ptr=p.getPointAtLength(m*len);ptr={x:ptr.x*.01,y:ptr.y*.01};if(Math.abs(ptr.x-x)<err||lv<=0){return(.5-ptr.y)*2}if(ptr.x>x){return searchSvgPath(p,x,len,err,[r[0],(r[0]+r[1])*.5],lv-1)}else if(ptr.x<x){return searchSvgPath(p,x,len,err,[(r[0]+r[1])*.5,r[1]],lv-1)}else{return(.5-ptr.y)*2}};fromSvg=function(d,opt){var step;opt==null&&(opt={});step=stepFromSvg(d);return fit(step,opt)};stepFromSvg=function(pathd,opt){var p,len,step,pts,res$,i$,step$,i;opt==null&&(opt={});p=svgPathProperties.svgPathProperties(pathd);len=p.getTotalLength();step=function(t){return searchSvgPath(p,t,len,.001)};if(!opt.presampling){return step}res$=[];for(i$=0,step$=1/opt.sampleCount;step$<0?i$>=1:i$<=1;i$+=step$){i=i$;res$.push(step(i))}pts=res$;return function(t){var idx;t=t*pts.length;idx=Math.floor(t);if(idx===pts.length-1){return pts[idx]}return(pts[idx+1]-pts[idx])*t(-idx)}};module.exports={round:round,sampleFunc:sampleFunc,sampleSvg:sampleSvg,fitToKeyframes:fitToKeyframes,fit:fit,fromSvg:fromSvg,stepFromSvg:stepFromSvg,toKeyframes:toKeyframes};function import$(obj,src){var own={}.hasOwnProperty;for(var key in src)if(own.call(src,key))obj[key]=src[key];return obj}},{"fit-curve":39,"svg-path-properties":40}],39:[function(require,module,exports){(function(global,factory){if(typeof define==="function"&&define.amd){define(["module"],factory)}else if(typeof exports!=="undefined"){factory(module)}else{var mod={exports:{}};factory(mod);global.fitCurve=mod.exports}})(this,function(module){"use strict";function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function fitCurve(points,maxError,progressCallback){if(!Array.isArray(points)){throw new TypeError("First argument should be an array")}points.forEach(function(point){if(!Array.isArray(point)||point.length!==2||typeof point[0]!=="number"||typeof point[1]!=="number"){throw Error("Each point should be an array of two numbers")}});points=points.filter(function(point,i){return i===0||!(point[0]===points[i-1][0]&&point[1]===points[i-1][1])});if(points.length<2){return[]}var len=points.length;var leftTangent=createTangent(points[1],points[0]);var rightTangent=createTangent(points[len-2],points[len-1]);return fitCubic(points,leftTangent,rightTangent,maxError,progressCallback)}function fitCubic(points,leftTangent,rightTangent,error,progressCallback){var MaxIterations=20;var bezCurve,u,uPrime,maxError,prevErr,splitPoint,prevSplit,centerVector,toCenterTangent,fromCenterTangent,beziers,dist,i;if(points.length===2){dist=maths.vectorLen(maths.subtract(points[0],points[1]))/3;bezCurve=[points[0],maths.addArrays(points[0],maths.mulItems(leftTangent,dist)),maths.addArrays(points[1],maths.mulItems(rightTangent,dist)),points[1]];return[bezCurve]}u=chordLengthParameterize(points);var _generateAndReport=generateAndReport(points,u,u,leftTangent,rightTangent,progressCallback);bezCurve=_generateAndReport[0];maxError=_generateAndReport[1];splitPoint=_generateAndReport[2];if(maxError<error){return[bezCurve]}if(maxError<error*error){uPrime=u;prevErr=maxError;prevSplit=splitPoint;for(i=0;i<MaxIterations;i++){uPrime=reparameterize(bezCurve,points,uPrime);var _generateAndReport2=generateAndReport(points,u,uPrime,leftTangent,rightTangent,progressCallback);bezCurve=_generateAndReport2[0];maxError=_generateAndReport2[1];splitPoint=_generateAndReport2[2];if(maxError<error){return[bezCurve]}else if(splitPoint===prevSplit){var errChange=maxError/prevErr;if(errChange>.9999&&errChange<1.0001){break}}prevErr=maxError;prevSplit=splitPoint}}beziers=[];centerVector=maths.subtract(points[splitPoint-1],points[splitPoint+1]);if(centerVector[0]===0&&centerVector[1]===0){centerVector=maths.subtract(points[splitPoint-1],points[splitPoint]).reverse();centerVector[0]=-centerVector[0]}toCenterTangent=maths.normalize(centerVector);fromCenterTangent=maths.mulItems(toCenterTangent,-1);beziers=beziers.concat(fitCubic(points.slice(0,splitPoint+1),leftTangent,toCenterTangent,error,progressCallback));beziers=beziers.concat(fitCubic(points.slice(splitPoint),fromCenterTangent,rightTangent,error,progressCallback));return beziers}function generateAndReport(points,paramsOrig,paramsPrime,leftTangent,rightTangent,progressCallback){var bezCurve,maxError,splitPoint;bezCurve=generateBezier(points,paramsPrime,leftTangent,rightTangent,progressCallback);var _computeMaxError=computeMaxError(points,bezCurve,paramsOrig);maxError=_computeMaxError[0];splitPoint=_computeMaxError[1];if(progressCallback){progressCallback({bez:bezCurve,points:points,params:paramsOrig,maxErr:maxError,maxPoint:splitPoint})}return[bezCurve,maxError,splitPoint]}function generateBezier(points,parameters,leftTangent,rightTangent){var bezCurve,A,a,C,X,det_C0_C1,det_C0_X,det_X_C1,alpha_l,alpha_r,epsilon,segLength,i,len,tmp,u,ux,firstPoint=points[0],lastPoint=points[points.length-1];bezCurve=[firstPoint,null,null,lastPoint];A=maths.zeros_Xx2x2(parameters.length);for(i=0,len=parameters.length;i<len;i++){u=parameters[i];ux=1-u;a=A[i];a[0]=maths.mulItems(leftTangent,3*u*(ux*ux));a[1]=maths.mulItems(rightTangent,3*ux*(u*u))}C=[[0,0],[0,0]];X=[0,0];for(i=0,len=points.length;i<len;i++){u=parameters[i];a=A[i];C[0][0]+=maths.dot(a[0],a[0]);C[0][1]+=maths.dot(a[0],a[1]);C[1][0]+=maths.dot(a[0],a[1]);C[1][1]+=maths.dot(a[1],a[1]);tmp=maths.subtract(points[i],bezier.q([firstPoint,firstPoint,lastPoint,lastPoint],u));X[0]+=maths.dot(a[0],tmp);X[1]+=maths.dot(a[1],tmp)}det_C0_C1=C[0][0]*C[1][1]-C[1][0]*C[0][1];det_C0_X=C[0][0]*X[1]-C[1][0]*X[0];det_X_C1=X[0]*C[1][1]-X[1]*C[0][1];alpha_l=det_C0_C1===0?0:det_X_C1/det_C0_C1;alpha_r=det_C0_C1===0?0:det_C0_X/det_C0_C1;segLength=maths.vectorLen(maths.subtract(firstPoint,lastPoint));epsilon=1e-6*segLength;if(alpha_l<epsilon||alpha_r<epsilon){bezCurve[1]=maths.addArrays(firstPoint,maths.mulItems(leftTangent,segLength/3));bezCurve[2]=maths.addArrays(lastPoint,maths.mulItems(rightTangent,segLength/3))}else{bezCurve[1]=maths.addArrays(firstPoint,maths.mulItems(leftTangent,alpha_l));bezCurve[2]=maths.addArrays(lastPoint,maths.mulItems(rightTangent,alpha_r))}return bezCurve}function reparameterize(bezier,points,parameters){return parameters.map(function(p,i){return newtonRaphsonRootFind(bezier,points[i],p)})}function newtonRaphsonRootFind(bez,point,u){var d=maths.subtract(bezier.q(bez,u),point),qprime=bezier.qprime(bez,u),numerator=maths.mulMatrix(d,qprime),denominator=maths.sum(maths.addItems(maths.squareItems(qprime),maths.mulMatrix(d,bezier.qprimeprime(bez,u))));if(denominator===0){return u}else{return u-numerator/denominator}}function chordLengthParameterize(points){var u=[],currU,prevU,prevP;points.forEach(function(p,i){currU=i?prevU+maths.vectorLen(maths.subtract(p,prevP)):0;u.push(currU);prevU=currU;prevP=p});u=u.map(function(x){return x/prevU});return u}function computeMaxError(points,bez,parameters){var dist,maxDist,splitPoint,v,i,count,point,t;maxDist=0;splitPoint=points.length/2;var t_distMap=mapTtoRelativeDistances(bez,10);for(i=0,count=points.length;i<count;i++){point=points[i];t=find_t(bez,parameters[i],t_distMap,10);v=maths.subtract(bezier.q(bez,t),point);dist=v[0]*v[0]+v[1]*v[1];if(dist>maxDist){maxDist=dist;splitPoint=i}}return[maxDist,splitPoint]}var mapTtoRelativeDistances=function mapTtoRelativeDistances(bez,B_parts){var B_t_curr;var B_t_dist=[0];var B_t_prev=bez[0];var sumLen=0;for(var i=1;i<=B_parts;i++){B_t_curr=bezier.q(bez,i/B_parts);sumLen+=maths.vectorLen(maths.subtract(B_t_curr,B_t_prev));B_t_dist.push(sumLen);B_t_prev=B_t_curr}B_t_dist=B_t_dist.map(function(x){return x/sumLen});return B_t_dist};function find_t(bez,param,t_distMap,B_parts){if(param<0){return 0}if(param>1){return 1}var lenMax,lenMin,tMax,tMin,t;for(var i=1;i<=B_parts;i++){if(param<=t_distMap[i]){tMin=(i-1)/B_parts;tMax=i/B_parts;lenMin=t_distMap[i-1];lenMax=t_distMap[i];t=(param-lenMin)/(lenMax-lenMin)*(tMax-tMin)+tMin;break}}return t}function createTangent(pointA,pointB){return maths.normalize(maths.subtract(pointA,pointB))}var maths=function(){function maths(){_classCallCheck(this,maths)}maths.zeros_Xx2x2=function zeros_Xx2x2(x){var zs=[];while(x--){zs.push([0,0])}return zs};maths.mulItems=function mulItems(items,multiplier){return[items[0]*multiplier,items[1]*multiplier]};maths.mulMatrix=function mulMatrix(m1,m2){return m1[0]*m2[0]+m1[1]*m2[1]};maths.subtract=function subtract(arr1,arr2){return[arr1[0]-arr2[0],arr1[1]-arr2[1]]};maths.addArrays=function addArrays(arr1,arr2){return[arr1[0]+arr2[0],arr1[1]+arr2[1]]};maths.addItems=function addItems(items,addition){return[items[0]+addition,items[1]+addition]};maths.sum=function sum(items){return items.reduce(function(sum,x){return sum+x})};maths.dot=function dot(m1,m2){return maths.mulMatrix(m1,m2)};maths.vectorLen=function vectorLen(v){var a=v[0],b=v[1];return Math.sqrt(a*a+b*b)};maths.divItems=function divItems(items,divisor){return[items[0]/divisor,items[1]/divisor]};maths.squareItems=function squareItems(items){var a=items[0],b=items[1];return[a*a,b*b]};maths.normalize=function normalize(v){return this.divItems(v,this.vectorLen(v))};return maths}();var bezier=function(){function bezier(){_classCallCheck(this,bezier)}bezier.q=function q(ctrlPoly,t){var tx=1-t;var pA=maths.mulItems(ctrlPoly[0],tx*tx*tx),pB=maths.mulItems(ctrlPoly[1],3*tx*tx*t),pC=maths.mulItems(ctrlPoly[2],3*tx*t*t),pD=maths.mulItems(ctrlPoly[3],t*t*t);return maths.addArrays(maths.addArrays(pA,pB),maths.addArrays(pC,pD))};bezier.qprime=function qprime(ctrlPoly,t){var tx=1-t;var pA=maths.mulItems(maths.subtract(ctrlPoly[1],ctrlPoly[0]),3*tx*tx),pB=maths.mulItems(maths.subtract(ctrlPoly[2],ctrlPoly[1]),6*tx*t),pC=maths.mulItems(maths.subtract(ctrlPoly[3],ctrlPoly[2]),3*t*t);return maths.addArrays(maths.addArrays(pA,pB),pC)};bezier.qprimeprime=function qprimeprime(ctrlPoly,t){return maths.addArrays(maths.mulItems(maths.addArrays(maths.subtract(ctrlPoly[2],maths.mulItems(ctrlPoly[1],2)),ctrlPoly[0]),6*(1-t)),maths.mulItems(maths.addArrays(maths.subtract(ctrlPoly[3],maths.mulItems(ctrlPoly[2],2)),ctrlPoly[1]),6*t))};return bezier}();module.exports=fitCurve})},{}],40:[function(require,module,exports){(function(global,factory){typeof exports==="object"&&typeof module!=="undefined"?factory(exports):typeof define==="function"&&define.amd?define(["exports"],factory):factory(global.spp={})})(this,function(exports){"use strict";var length={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0};var segment=/([astvzqmhlc])([^astvzqmhlc]*)/gi;function parse(path){var data=[];path.replace(segment,function(_,command,args){var type=command.toLowerCase();args=parseValues(args);if(type==="m"&&args.length>2){data.push([command].concat(args.splice(0,2)));type="l";command=command==="m"?"l":"L"}while(args.length>=0){if(args.length===length[type]){args.unshift(command);return data.push(args)}if(args.length<length[type]){throw new Error("malformed path data")}data.push([command].concat(args.splice(0,length[type])))}});return data}var number=/-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/gi;function parseValues(args){var numbers=args.match(number);return numbers?numbers.map(Number):[]}function Bezier(ax,ay,bx,by,cx,cy,dx,dy){return new Bezier$1(ax,ay,bx,by,cx,cy,dx,dy)}function Bezier$1(ax,ay,bx,by,cx,cy,dx,dy){this.a={x:ax,y:ay};this.b={x:bx,y:by};this.c={x:cx,y:cy};this.d={x:dx,y:dy};if(dx!==null&&dx!==undefined&&dy!==null&&dy!==undefined){this.getArcLength=getCubicArcLength;this.getPoint=cubicPoint;this.getDerivative=cubicDerivative}else{this.getArcLength=getQuadraticArcLength;this.getPoint=quadraticPoint;this.getDerivative=quadraticDerivative}this.init()}Bezier$1.prototype={constructor:Bezier$1,init:function(){this.length=this.getArcLength([this.a.x,this.b.x,this.c.x,this.d.x],[this.a.y,this.b.y,this.c.y,this.d.y])},getTotalLength:function(){return this.length},getPointAtLength:function(length){var t=t2length(length,this.length,this.getArcLength,[this.a.x,this.b.x,this.c.x,this.d.x],[this.a.y,this.b.y,this.c.y,this.d.y]);return this.getPoint([this.a.x,this.b.x,this.c.x,this.d.x],[this.a.y,this.b.y,this.c.y,this.d.y],t)},getTangentAtLength:function(length){var t=t2length(length,this.length,this.getArcLength,[this.a.x,this.b.x,this.c.x,this.d.x],[this.a.y,this.b.y,this.c.y,this.d.y]);var derivative=this.getDerivative([this.a.x,this.b.x,this.c.x,this.d.x],[this.a.y,this.b.y,this.c.y,this.d.y],t);var mdl=Math.sqrt(derivative.x*derivative.x+derivative.y*derivative.y);var tangent;if(mdl>0){tangent={x:derivative.x/mdl,y:derivative.y/mdl}}else{tangent={x:0,y:0}}return tangent},getPropertiesAtLength:function(length){var t=t2length(length,this.length,this.getArcLength,[this.a.x,this.b.x,this.c.x,this.d.x],[this.a.y,this.b.y,this.c.y,this.d.y]);var derivative=this.getDerivative([this.a.x,this.b.x,this.c.x,this.d.x],[this.a.y,this.b.y,this.c.y,this.d.y],t);var mdl=Math.sqrt(derivative.x*derivative.x+derivative.y*derivative.y);var tangent;if(mdl>0){tangent={x:derivative.x/mdl,y:derivative.y/mdl}}else{tangent={x:0,y:0}}var point=this.getPoint([this.a.x,this.b.x,this.c.x,this.d.x],[this.a.y,this.b.y,this.c.y,this.d.y],t);return{x:point.x,y:point.y,tangentX:tangent.x,tangentY:tangent.y}}};function quadraticDerivative(xs,ys,t){return{x:(1-t)*2*(xs[1]-xs[0])+t*2*(xs[2]-xs[1]),y:(1-t)*2*(ys[1]-ys[0])+t*2*(ys[2]-ys[1])}}function cubicDerivative(xs,ys,t){var derivative=quadraticPoint([3*(xs[1]-xs[0]),3*(xs[2]-xs[1]),3*(xs[3]-xs[2])],[3*(ys[1]-ys[0]),3*(ys[2]-ys[1]),3*(ys[3]-ys[2])],t);return derivative}function t2length(length,total_length,func,xs,ys){var error=1;var t=length/total_length;var step=(length-func(xs,ys,t))/total_length;while(error>.001){var increasedTLength=func(xs,ys,t+step);var decreasedTLength=func(xs,ys,t-step);var increasedTError=Math.abs(length-increasedTLength)/total_length;var decreasedTError=Math.abs(length-decreasedTLength)/total_length;if(increasedTError<error){error=increasedTError;t+=step}else if(decreasedTError<error){error=decreasedTError;t-=step}else{step/=2}}return t}function quadraticPoint(xs,ys,t){var x=(1-t)*(1-t)*xs[0]+2*(1-t)*t*xs[1]+t*t*xs[2];var y=(1-t)*(1-t)*ys[0]+2*(1-t)*t*ys[1]+t*t*ys[2];return{x:x,y:y}}function cubicPoint(xs,ys,t){var x=(1-t)*(1-t)*(1-t)*xs[0]+3*(1-t)*(1-t)*t*xs[1]+3*(1-t)*t*t*xs[2]+t*t*t*xs[3];var y=(1-t)*(1-t)*(1-t)*ys[0]+3*(1-t)*(1-t)*t*ys[1]+3*(1-t)*t*t*ys[2]+t*t*t*ys[3];return{x:x,y:y}}function getQuadraticArcLength(xs,ys,t){if(t===undefined){t=1}var ax=xs[0]-2*xs[1]+xs[2];var ay=ys[0]-2*ys[1]+ys[2];var bx=2*xs[1]-2*xs[0];var by=2*ys[1]-2*ys[0];var A=4*(ax*ax+ay*ay);var B=4*(ax*bx+ay*by);var C=bx*bx+by*by;if(A===0){return t*Math.sqrt(Math.pow(xs[2]-xs[0],2)+Math.pow(ys[2]-ys[0],2))}var b=B/(2*A);var c=C/A;var u=t+b;var k=c-b*b;var uuk=u*u+k>0?Math.sqrt(u*u+k):0;var bbk=b*b+k>0?Math.sqrt(b*b+k):0;var term=b+Math.sqrt(b*b+k)!==0?k*Math.log(Math.abs((u+uuk)/(b+bbk))):0;return Math.sqrt(A)/2*(u*uuk-b*bbk+term)}var tValues=[[],[],[-.5773502691896257,.5773502691896257],[0,-.7745966692414834,.7745966692414834],[-.33998104358485626,.33998104358485626,-.8611363115940526,.8611363115940526],[0,-.5384693101056831,.5384693101056831,-.906179845938664,.906179845938664],[.6612093864662645,-.6612093864662645,-.2386191860831969,.2386191860831969,-.932469514203152,.932469514203152],[0,.4058451513773972,-.4058451513773972,-.7415311855993945,.7415311855993945,-.9491079123427585,.9491079123427585],[-.1834346424956498,.1834346424956498,-.525532409916329,.525532409916329,-.7966664774136267,.7966664774136267,-.9602898564975363,.9602898564975363],[0,-.8360311073266358,.8360311073266358,-.9681602395076261,.9681602395076261,-.3242534234038089,.3242534234038089,-.6133714327005904,.6133714327005904],[-.14887433898163122,.14887433898163122,-.4333953941292472,.4333953941292472,-.6794095682990244,.6794095682990244,-.8650633666889845,.8650633666889845,-.9739065285171717,.9739065285171717],[0,-.26954315595234496,.26954315595234496,-.5190961292068118,.5190961292068118,-.7301520055740494,.7301520055740494,-.8870625997680953,.8870625997680953,-.978228658146057,.978228658146057],[-.1252334085114689,.1252334085114689,-.3678314989981802,.3678314989981802,-.5873179542866175,.5873179542866175,-.7699026741943047,.7699026741943047,-.9041172563704749,.9041172563704749,-.9815606342467192,.9815606342467192],[0,-.2304583159551348,.2304583159551348,-.44849275103644687,.44849275103644687,-.6423493394403402,.6423493394403402,-.8015780907333099,.8015780907333099,-.9175983992229779,.9175983992229779,-.9841830547185881,.9841830547185881],[-.10805494870734367,.10805494870734367,-.31911236892788974,.31911236892788974,-.5152486363581541,.5152486363581541,-.6872929048116855,.6872929048116855,-.827201315069765,.827201315069765,-.9284348836635735,.9284348836635735,-.9862838086968123,.9862838086968123],[0,-.20119409399743451,.20119409399743451,-.3941513470775634,.3941513470775634,-.5709721726085388,.5709721726085388,-.7244177313601701,.7244177313601701,-.8482065834104272,.8482065834104272,-.937273392400706,.937273392400706,-.9879925180204854,.9879925180204854],[-.09501250983763744,.09501250983763744,-.2816035507792589,.2816035507792589,-.45801677765722737,.45801677765722737,-.6178762444026438,.6178762444026438,-.755404408355003,.755404408355003,-.8656312023878318,.8656312023878318,-.9445750230732326,.9445750230732326,-.9894009349916499,.9894009349916499],[0,-.17848418149584785,.17848418149584785,-.3512317634538763,.3512317634538763,-.5126905370864769,.5126905370864769,-.6576711592166907,.6576711592166907,-.7815140038968014,.7815140038968014,-.8802391537269859,.8802391537269859,-.9506755217687678,.9506755217687678,-.9905754753144174,.9905754753144174],[-.0847750130417353,.0847750130417353,-.2518862256915055,.2518862256915055,-.41175116146284263,.41175116146284263,-.5597708310739475,.5597708310739475,-.6916870430603532,.6916870430603532,-.8037049589725231,.8037049589725231,-.8926024664975557,.8926024664975557,-.9558239495713977,.9558239495713977,-.9915651684209309,.9915651684209309],[0,-.16035864564022537,.16035864564022537,-.31656409996362983,.31656409996362983,-.46457074137596094,.46457074137596094,-.600545304661681,.600545304661681,-.7209661773352294,.7209661773352294,-.8227146565371428,.8227146565371428,-.9031559036148179,.9031559036148179,-.96020815213483,.96020815213483,-.9924068438435844,.9924068438435844],[-.07652652113349734,.07652652113349734,-.22778585114164507,.22778585114164507,-.37370608871541955,.37370608871541955,-.5108670019508271,.5108670019508271,-.636053680726515,.636053680726515,-.7463319064601508,.7463319064601508,-.8391169718222188,.8391169718222188,-.912234428251326,.912234428251326,-.9639719272779138,.9639719272779138,-.9931285991850949,.9931285991850949],[0,-.1455618541608951,.1455618541608951,-.2880213168024011,.2880213168024011,-.4243421202074388,.4243421202074388,-.5516188358872198,.5516188358872198,-.6671388041974123,.6671388041974123,-.7684399634756779,.7684399634756779,-.8533633645833173,.8533633645833173,-.9200993341504008,.9200993341504008,-.9672268385663063,.9672268385663063,-.9937521706203895,.9937521706203895],[-.06973927331972223,.06973927331972223,-.20786042668822127,.20786042668822127,-.34193582089208424,.34193582089208424,-.469355837986757,.469355837986757,-.5876404035069116,.5876404035069116,-.6944872631866827,.6944872631866827,-.7878168059792081,.7878168059792081,-.8658125777203002,.8658125777203002,-.926956772187174,.926956772187174,-.9700604978354287,.9700604978354287,-.9942945854823992,.9942945854823992],[0,-.1332568242984661,.1332568242984661,-.26413568097034495,.26413568097034495,-.3903010380302908,.3903010380302908,-.5095014778460075,.5095014778460075,-.6196098757636461,.6196098757636461,-.7186613631319502,.7186613631319502,-.8048884016188399,.8048884016188399,-.8767523582704416,.8767523582704416,-.9329710868260161,.9329710868260161,-.9725424712181152,.9725424712181152,-.9947693349975522,.9947693349975522],[-.06405689286260563,.06405689286260563,-.1911188674736163,.1911188674736163,-.3150426796961634,.3150426796961634,-.4337935076260451,.4337935076260451,-.5454214713888396,.5454214713888396,-.6480936519369755,.6480936519369755,-.7401241915785544,.7401241915785544,-.820001985973903,.820001985973903,-.8864155270044011,.8864155270044011,-.9382745520027328,.9382745520027328,-.9747285559713095,.9747285559713095,-.9951872199970213,.9951872199970213]];var cValues=[[],[],[1,1],[.8888888888888888,.5555555555555556,.5555555555555556],[.6521451548625461,.6521451548625461,.34785484513745385,.34785484513745385],[.5688888888888889,.47862867049936647,.47862867049936647,.23692688505618908,.23692688505618908],[.3607615730481386,.3607615730481386,.46791393457269104,.46791393457269104,.17132449237917036,.17132449237917036],[.4179591836734694,.3818300505051189,.3818300505051189,.27970539148927664,.27970539148927664,.1294849661688697,.1294849661688697],[.362683783378362,.362683783378362,.31370664587788727,.31370664587788727,.22238103445337448,.22238103445337448,.10122853629037626,.10122853629037626],[.3302393550012598,.1806481606948574,.1806481606948574,.08127438836157441,.08127438836157441,.31234707704000286,.31234707704000286,.26061069640293544,.26061069640293544],[.29552422471475287,.29552422471475287,.26926671930999635,.26926671930999635,.21908636251598204,.21908636251598204,.1494513491505806,.1494513491505806,.06667134430868814,.06667134430868814],[.2729250867779006,.26280454451024665,.26280454451024665,.23319376459199048,.23319376459199048,.18629021092773426,.18629021092773426,.1255803694649046,.1255803694649046,.05566856711617366,.05566856711617366],[.24914704581340277,.24914704581340277,.2334925365383548,.2334925365383548,.20316742672306592,.20316742672306592,.16007832854334622,.16007832854334622,.10693932599531843,.10693932599531843,.04717533638651183,.04717533638651183],[.2325515532308739,.22628318026289723,.22628318026289723,.2078160475368885,.2078160475368885,.17814598076194574,.17814598076194574,.13887351021978725,.13887351021978725,.09212149983772845,.09212149983772845,.04048400476531588,.04048400476531588],[.2152638534631578,.2152638534631578,.2051984637212956,.2051984637212956,.18553839747793782,.18553839747793782,.15720316715819355,.15720316715819355,.12151857068790319,.12151857068790319,.08015808715976021,.08015808715976021,.03511946033175186,.03511946033175186],[.2025782419255613,.19843148532711158,.19843148532711158,.1861610000155622,.1861610000155622,.16626920581699392,.16626920581699392,.13957067792615432,.13957067792615432,.10715922046717194,.10715922046717194,.07036604748810812,.07036604748810812,.03075324199611727,.03075324199611727],[.1894506104550685,.1894506104550685,.18260341504492358,.18260341504492358,.16915651939500254,.16915651939500254,.14959598881657674,.14959598881657674,.12462897125553388,.12462897125553388,.09515851168249279,.09515851168249279,.062253523938647894,.062253523938647894,.027152459411754096,.027152459411754096],[.17944647035620653,.17656270536699264,.17656270536699264,.16800410215645004,.16800410215645004,.15404576107681028,.15404576107681028,.13513636846852548,.13513636846852548,.11188384719340397,.11188384719340397,.08503614831717918,.08503614831717918,.0554595293739872,.0554595293739872,.02414830286854793,.02414830286854793],[.1691423829631436,.1691423829631436,.16427648374583273,.16427648374583273,.15468467512626524,.15468467512626524,.14064291467065065,.14064291467065065,.12255520671147846,.12255520671147846,.10094204410628717,.10094204410628717,.07642573025488905,.07642573025488905,.0497145488949698,.0497145488949698,.02161601352648331,.02161601352648331],[.1610544498487837,.15896884339395434,.15896884339395434,.15276604206585967,.15276604206585967,.1426067021736066,.1426067021736066,.12875396253933621,.12875396253933621,.11156664554733399,.11156664554733399,.09149002162245,.09149002162245,.06904454273764123,.06904454273764123,.0448142267656996,.0448142267656996,.019461788229726478,.019461788229726478],[.15275338713072584,.15275338713072584,.14917298647260374,.14917298647260374,.14209610931838204,.14209610931838204,.13168863844917664,.13168863844917664,.11819453196151841,.11819453196151841,.10193011981724044,.10193011981724044,.08327674157670475,.08327674157670475,.06267204833410907,.06267204833410907,.04060142980038694,.04060142980038694,.017614007139152118,.017614007139152118],[.14608113364969041,.14452440398997005,.14452440398997005,.13988739479107315,.13988739479107315,.13226893863333747,.13226893863333747,.12183141605372853,.12183141605372853,.10879729916714838,.10879729916714838,.09344442345603386,.09344442345603386,.0761001136283793,.0761001136283793,.057134425426857205,.057134425426857205,.036953789770852494,.036953789770852494,.016017228257774335,.016017228257774335],[.13925187285563198,.13925187285563198,.13654149834601517,.13654149834601517,.13117350478706238,.13117350478706238,.12325237681051242,.12325237681051242,.11293229608053922,.11293229608053922,.10041414444288096,.10041414444288096,.08594160621706773,.08594160621706773,.06979646842452049,.06979646842452049,.052293335152683286,.052293335152683286,.03377490158481415,.03377490158481415,.0146279952982722,.0146279952982722],[.13365457218610619,.1324620394046966,.1324620394046966,.12890572218808216,.12890572218808216,.12304908430672953,.12304908430672953,.11499664022241136,.11499664022241136,.10489209146454141,.10489209146454141,.09291576606003515,.09291576606003515,.07928141177671895,.07928141177671895,.06423242140852585,.06423242140852585,.04803767173108467,.04803767173108467,.030988005856979445,.030988005856979445,.013411859487141771,.013411859487141771],[.12793819534675216,.12793819534675216,.1258374563468283,.1258374563468283,.12167047292780339,.12167047292780339,.1155056680537256,.1155056680537256,.10744427011596563,.10744427011596563,.09761865210411388,.09761865210411388,.08619016153195327,.08619016153195327,.0733464814110803,.0733464814110803,.05929858491543678,.05929858491543678,.04427743881741981,.04427743881741981,.028531388628933663,.028531388628933663,.0123412297999872,.0123412297999872]];var binomialCoefficients=[[1],[1,1],[1,2,1],[1,3,3,1]];function binomials(n,k){return binomialCoefficients[n][k]}function getDerivative(derivative,t,vs){var n=vs.length-1,_vs,value,k;if(n===0){return 0}if(derivative===0){value=0;for(k=0;k<=n;k++){value+=binomials(n,k)*Math.pow(1-t,n-k)*Math.pow(t,k)*vs[k]}return value}else{_vs=new Array(n);for(k=0;k<n;k++){_vs[k]=n*(vs[k+1]-vs[k])}return getDerivative(derivative-1,t,_vs)}}function B(xs,ys,t){var xbase=getDerivative(1,t,xs);var ybase=getDerivative(1,t,ys);var combined=xbase*xbase+ybase*ybase;return Math.sqrt(combined)}function getCubicArcLength(xs,ys,t){var z,sum,i,correctedT;if(t===undefined){t=1}var n=20;z=t/2;sum=0;for(i=0;i<n;i++){correctedT=z*tValues[n][i]+z;sum+=cValues[n][i]*B(xs,ys,correctedT)}return z*sum}function Arc(x0,y0,rx,ry,xAxisRotate,LargeArcFlag,SweepFlag,x,y){return new Arc$1(x0,y0,rx,ry,xAxisRotate,LargeArcFlag,SweepFlag,x,y)}function Arc$1(x0,y0,rx,ry,xAxisRotate,LargeArcFlag,SweepFlag,x1,y1){this.x0=x0;this.y0=y0;this.rx=rx;this.ry=ry;this.xAxisRotate=xAxisRotate;this.LargeArcFlag=LargeArcFlag;this.SweepFlag=SweepFlag;this.x1=x1;this.y1=y1;var lengthProperties=approximateArcLengthOfCurve(300,function(t){return pointOnEllipticalArc({x:x0,y:y0},rx,ry,xAxisRotate,LargeArcFlag,SweepFlag,{x:x1,y:y1},t)});this.length=lengthProperties.arcLength}Arc$1.prototype={constructor:Arc$1,init:function(){},getTotalLength:function(){return this.length},getPointAtLength:function(fractionLength){if(fractionLength<0){fractionLength=0}else if(fractionLength>this.length){fractionLength=this.length}var position=pointOnEllipticalArc({x:this.x0,y:this.y0},this.rx,this.ry,this.xAxisRotate,this.LargeArcFlag,this.SweepFlag,{x:this.x1,y:this.y1},fractionLength/this.length);return{x:position.x,y:position.y}},getTangentAtLength:function(fractionLength){if(fractionLength<0){fractionLength=0}else if(fractionLength>this.length){fractionLength=this.length}var position=pointOnEllipticalArc({x:this.x0,y:this.y0},this.rx,this.ry,this.xAxisRotate,this.LargeArcFlag,this.SweepFlag,{x:this.x1,y:this.y1},fractionLength/this.length);return{x:position.x,y:position.y}},getPropertiesAtLength:function(fractionLength){var tangent=this.getTangentAtLength(fractionLength);var point=this.getPointAtLength(fractionLength);return{x:point.x,y:point.y,tangentX:tangent.x,tangentY:tangent.y}}};function pointOnEllipticalArc(p0,rx,ry,xAxisRotation,largeArcFlag,sweepFlag,p1,t){rx=Math.abs(rx);ry=Math.abs(ry);xAxisRotation=mod(xAxisRotation,360);var xAxisRotationRadians=toRadians(xAxisRotation);if(p0.x===p1.x&&p0.y===p1.y){return p0}if(rx===0||ry===0){return this.pointOnLine(p0,p1,t)}var dx=(p0.x-p1.x)/2;var dy=(p0.y-p1.y)/2;var transformedPoint={x:Math.cos(xAxisRotationRadians)*dx+Math.sin(xAxisRotationRadians)*dy,y:-Math.sin(xAxisRotationRadians)*dx+Math.cos(xAxisRotationRadians)*dy};var radiiCheck=Math.pow(transformedPoint.x,2)/Math.pow(rx,2)+Math.pow(transformedPoint.y,2)/Math.pow(ry,2);if(radiiCheck>1){rx=Math.sqrt(radiiCheck)*rx;ry=Math.sqrt(radiiCheck)*ry}var cSquareNumerator=Math.pow(rx,2)*Math.pow(ry,2)-Math.pow(rx,2)*Math.pow(transformedPoint.y,2)-Math.pow(ry,2)*Math.pow(transformedPoint.x,2);var cSquareRootDenom=Math.pow(rx,2)*Math.pow(transformedPoint.y,2)+Math.pow(ry,2)*Math.pow(transformedPoint.x,2);var cRadicand=cSquareNumerator/cSquareRootDenom;cRadicand=cRadicand<0?0:cRadicand;var cCoef=(largeArcFlag!==sweepFlag?1:-1)*Math.sqrt(cRadicand);var transformedCenter={x:cCoef*(rx*transformedPoint.y/ry),y:cCoef*(-(ry*transformedPoint.x)/rx)};var center={x:Math.cos(xAxisRotationRadians)*transformedCenter.x-Math.sin(xAxisRotationRadians)*transformedCenter.y+(p0.x+p1.x)/2,y:Math.sin(xAxisRotationRadians)*transformedCenter.x+Math.cos(xAxisRotationRadians)*transformedCenter.y+(p0.y+p1.y)/2};var startVector={x:(transformedPoint.x-transformedCenter.x)/rx,y:(transformedPoint.y-transformedCenter.y)/ry};var startAngle=angleBetween({x:1,y:0},startVector);var endVector={x:(-transformedPoint.x-transformedCenter.x)/rx,y:(-transformedPoint.y-transformedCenter.y)/ry};var sweepAngle=angleBetween(startVector,endVector);if(!sweepFlag&&sweepAngle>0){sweepAngle-=2*Math.PI}else if(sweepFlag&&sweepAngle<0){sweepAngle+=2*Math.PI}sweepAngle%=2*Math.PI;var angle=startAngle+sweepAngle*t;var ellipseComponentX=rx*Math.cos(angle);var ellipseComponentY=ry*Math.sin(angle);var point={x:Math.cos(xAxisRotationRadians)*ellipseComponentX-Math.sin(xAxisRotationRadians)*ellipseComponentY+center.x,y:Math.sin(xAxisRotationRadians)*ellipseComponentX+Math.cos(xAxisRotationRadians)*ellipseComponentY+center.y};point.ellipticalArcStartAngle=startAngle;point.ellipticalArcEndAngle=startAngle+sweepAngle;point.ellipticalArcAngle=angle;point.ellipticalArcCenter=center;point.resultantRx=rx;point.resultantRy=ry;return point}function approximateArcLengthOfCurve(resolution,pointOnCurveFunc){resolution=resolution?resolution:500;var resultantArcLength=0;var arcLengthMap=[];var approximationLines=[];var prevPoint=pointOnCurveFunc(0);var nextPoint;for(var i=0;i<resolution;i++){var t=clamp(i*(1/resolution),0,1);nextPoint=pointOnCurveFunc(t);resultantArcLength+=distance(prevPoint,nextPoint);approximationLines.push([prevPoint,nextPoint]);arcLengthMap.push({t:t,arcLength:resultantArcLength});prevPoint=nextPoint}nextPoint=pointOnCurveFunc(1);approximationLines.push([prevPoint,nextPoint]);resultantArcLength+=distance(prevPoint,nextPoint);arcLengthMap.push({t:1,arcLength:resultantArcLength});return{arcLength:resultantArcLength,arcLengthMap:arcLengthMap,approximationLines:approximationLines}}function mod(x,m){return(x%m+m)%m}function toRadians(angle){return angle*(Math.PI/180)}function distance(p0,p1){return Math.sqrt(Math.pow(p1.x-p0.x,2)+Math.pow(p1.y-p0.y,2))}function clamp(val,min,max){return Math.min(Math.max(val,min),max)}function angleBetween(v0,v1){var p=v0.x*v1.x+v0.y*v1.y;var n=Math.sqrt((Math.pow(v0.x,2)+Math.pow(v0.y,2))*(Math.pow(v1.x,2)+Math.pow(v1.y,2)));var sign=v0.x*v1.y-v0.y*v1.x<0?-1:1;var angle=sign*Math.acos(p/n);return angle}function LinearPosition(x0,x1,y0,y1){return new LinearPosition$1(x0,x1,y0,y1)}function LinearPosition$1(x0,x1,y0,y1){this.x0=x0;this.x1=x1;this.y0=y0;this.y1=y1}LinearPosition$1.prototype.getTotalLength=function(){return Math.sqrt(Math.pow(this.x0-this.x1,2)+Math.pow(this.y0-this.y1,2))};LinearPosition$1.prototype.getPointAtLength=function(pos){var fraction=pos/Math.sqrt(Math.pow(this.x0-this.x1,2)+Math.pow(this.y0-this.y1,2));var newDeltaX=(this.x1-this.x0)*fraction;var newDeltaY=(this.y1-this.y0)*fraction;return{x:this.x0+newDeltaX,y:this.y0+newDeltaY}};LinearPosition$1.prototype.getTangentAtLength=function(){var module=Math.sqrt((this.x1-this.x0)*(this.x1-this.x0)+(this.y1-this.y0)*(this.y1-this.y0));return{x:(this.x1-this.x0)/module,y:(this.y1-this.y0)/module}};LinearPosition$1.prototype.getPropertiesAtLength=function(pos){var point=this.getPointAtLength(pos);var tangent=this.getTangentAtLength();return{x:point.x,y:point.y,tangentX:tangent.x,tangentY:tangent.y}};function pathProperties(svgString){var length=0;var partial_lengths=[];var functions=[];function svgProperties(string){if(!string){return null}var parsed=parse(string);var cur=[0,0];var prev_point=[0,0];var curve;var ringStart;for(var i=0;i<parsed.length;i++){if(parsed[i][0]==="M"){cur=[parsed[i][1],parsed[i][2]];ringStart=[cur[0],cur[1]];functions.push(null)}else if(parsed[i][0]==="m"){cur=[parsed[i][1]+cur[0],parsed[i][2]+cur[1]];ringStart=[cur[0],cur[1]];functions.push(null)}else if(parsed[i][0]==="L"){length=length+Math.sqrt(Math.pow(cur[0]-parsed[i][1],2)+Math.pow(cur[1]-parsed[i][2],2));functions.push(new LinearPosition(cur[0],parsed[i][1],cur[1],parsed[i][2]));cur=[parsed[i][1],parsed[i][2]]}else if(parsed[i][0]==="l"){length=length+Math.sqrt(Math.pow(parsed[i][1],2)+Math.pow(parsed[i][2],2));functions.push(new LinearPosition(cur[0],parsed[i][1]+cur[0],cur[1],parsed[i][2]+cur[1]));cur=[parsed[i][1]+cur[0],parsed[i][2]+cur[1]]}else if(parsed[i][0]==="H"){length=length+Math.abs(cur[0]-parsed[i][1]);functions.push(new LinearPosition(cur[0],parsed[i][1],cur[1],cur[1]));cur[0]=parsed[i][1]}else if(parsed[i][0]==="h"){length=length+Math.abs(parsed[i][1]);functions.push(new LinearPosition(cur[0],cur[0]+parsed[i][1],cur[1],cur[1]));cur[0]=parsed[i][1]+cur[0]}else if(parsed[i][0]==="V"){length=length+Math.abs(cur[1]-parsed[i][1]);functions.push(new LinearPosition(cur[0],cur[0],cur[1],parsed[i][1]));cur[1]=parsed[i][1]}else if(parsed[i][0]==="v"){length=length+Math.abs(parsed[i][1]);functions.push(new LinearPosition(cur[0],cur[0],cur[1],cur[1]+parsed[i][1]));cur[1]=parsed[i][1]+cur[1]}else if(parsed[i][0]==="z"||parsed[i][0]==="Z"){length=length+Math.sqrt(Math.pow(ringStart[0]-cur[0],2)+Math.pow(ringStart[1]-cur[1],2));functions.push(new LinearPosition(cur[0],ringStart[0],cur[1],ringStart[1]));cur=[ringStart[0],ringStart[1]]}else if(parsed[i][0]==="C"){curve=new Bezier(cur[0],cur[1],parsed[i][1],parsed[i][2],parsed[i][3],parsed[i][4],parsed[i][5],parsed[i][6]);length=length+curve.getTotalLength();cur=[parsed[i][5],parsed[i][6]];functions.push(curve)}else if(parsed[i][0]==="c"){curve=new Bezier(cur[0],cur[1],cur[0]+parsed[i][1],cur[1]+parsed[i][2],cur[0]+parsed[i][3],cur[1]+parsed[i][4],cur[0]+parsed[i][5],cur[1]+parsed[i][6]);if(curve.getTotalLength()>0){length=length+curve.getTotalLength();functions.push(curve);cur=[parsed[i][5]+cur[0],parsed[i][6]+cur[1]]}else{functions.push(new LinearPosition(cur[0],cur[0],cur[1],cur[1]))}}else if(parsed[i][0]==="S"){if(i>0&&["C","c","S","s"].indexOf(parsed[i-1][0])>-1){curve=new Bezier(cur[0],cur[1],2*cur[0]-parsed[i-1][parsed[i-1].length-4],2*cur[1]-parsed[i-1][parsed[i-1].length-3],parsed[i][1],parsed[i][2],parsed[i][3],parsed[i][4])}else{curve=new Bezier(cur[0],cur[1],cur[0],cur[1],parsed[i][1],parsed[i][2],parsed[i][3],parsed[i][4])}length=length+curve.getTotalLength();cur=[parsed[i][3],parsed[i][4]];functions.push(curve)}else if(parsed[i][0]==="s"){if(i>0&&["C","c","S","s"].indexOf(parsed[i-1][0])>-1){curve=new Bezier(cur[0],cur[1],cur[0]+curve.d.x-curve.c.x,cur[1]+curve.d.y-curve.c.y,cur[0]+parsed[i][1],cur[1]+parsed[i][2],cur[0]+parsed[i][3],cur[1]+parsed[i][4])}else{curve=new Bezier(cur[0],cur[1],cur[0],cur[1],cur[0]+parsed[i][1],cur[1]+parsed[i][2],cur[0]+parsed[i][3],cur[1]+parsed[i][4])}length=length+curve.getTotalLength();cur=[parsed[i][3]+cur[0],parsed[i][4]+cur[1]];functions.push(curve)}else if(parsed[i][0]==="Q"){if(cur[0]==parsed[i][1]&&cur[1]==parsed[i][2]){curve=new LinearPosition(parsed[i][1],parsed[i][3],parsed[i][2],parsed[i][4])}else{curve=new Bezier(cur[0],cur[1],parsed[i][1],parsed[i][2],parsed[i][3],parsed[i][4])}length=length+curve.getTotalLength();functions.push(curve);cur=[parsed[i][3],parsed[i][4]];prev_point=[parsed[i][1],parsed[i][2]]}else if(parsed[i][0]==="q"){if(!(parsed[i][1]==0&&parsed[i][2]==0)){curve=new Bezier(cur[0],cur[1],cur[0]+parsed[i][1],cur[1]+parsed[i][2],cur[0]+parsed[i][3],cur[1]+parsed[i][4])}else{curve=new LinearPosition(cur[0]+parsed[i][1],cur[0]+parsed[i][3],cur[1]+parsed[i][2],cur[1]+parsed[i][4])}length=length+curve.getTotalLength();prev_point=[cur[0]+parsed[i][1],cur[1]+parsed[i][2]];cur=[parsed[i][3]+cur[0],parsed[i][4]+cur[1]];functions.push(curve)}else if(parsed[i][0]==="T"){if(i>0&&["Q","q","T","t"].indexOf(parsed[i-1][0])>-1){curve=new Bezier(cur[0],cur[1],2*cur[0]-prev_point[0],2*cur[1]-prev_point[1],parsed[i][1],parsed[i][2])}else{curve=new LinearPosition(cur[0],parsed[i][1],cur[1],parsed[i][2])}functions.push(curve);length=length+curve.getTotalLength();prev_point=[2*cur[0]-prev_point[0],2*cur[1]-prev_point[1]];cur=[parsed[i][1],parsed[i][2]]}else if(parsed[i][0]==="t"){if(i>0&&["Q","q","T","t"].indexOf(parsed[i-1][0])>-1){curve=new Bezier(cur[0],cur[1],2*cur[0]-prev_point[0],2*cur[1]-prev_point[1],cur[0]+parsed[i][1],cur[1]+parsed[i][2])}else{curve=new LinearPosition(cur[0],cur[0]+parsed[i][1],cur[1],cur[1]+parsed[i][2])}length=length+curve.getTotalLength();prev_point=[2*cur[0]-prev_point[0],2*cur[1]-prev_point[1]];cur=[parsed[i][1]+cur[0],parsed[i][2]+cur[0]];functions.push(curve)}else if(parsed[i][0]==="A"){curve=new Arc(cur[0],cur[1],parsed[i][1],parsed[i][2],parsed[i][3],parsed[i][4],parsed[i][5],parsed[i][6],parsed[i][7]);length=length+curve.getTotalLength();cur=[parsed[i][6],parsed[i][7]];functions.push(curve)}else if(parsed[i][0]==="a"){curve=new Arc(cur[0],cur[1],parsed[i][1],parsed[i][2],parsed[i][3],parsed[i][4],parsed[i][5],cur[0]+parsed[i][6],cur[1]+parsed[i][7]);length=length+curve.getTotalLength();cur=[cur[0]+parsed[i][6],cur[1]+parsed[i][7]];functions.push(curve)}partial_lengths.push(length)}return svgProperties}svgProperties.getTotalLength=function(){return length};svgProperties.getPointAtLength=function(fractionLength){var fractionPart=getPartAtLength(fractionLength);return functions[fractionPart.i].getPointAtLength(fractionPart.fraction)};svgProperties.getTangentAtLength=function(fractionLength){var fractionPart=getPartAtLength(fractionLength);return functions[fractionPart.i].getTangentAtLength(fractionPart.fraction)};svgProperties.getPropertiesAtLength=function(fractionLength){var fractionPart=getPartAtLength(fractionLength);return functions[fractionPart.i].getPropertiesAtLength(fractionPart.fraction)};svgProperties.getParts=function(){var parts=[];for(var i=0;i<functions.length;i++){if(functions[i]!=null){var properties={};properties["start"]=functions[i].getPointAtLength(0);properties["end"]=functions[i].getPointAtLength(partial_lengths[i]-partial_lengths[i-1]);properties["length"]=partial_lengths[i]-partial_lengths[i-1];(function(func){properties["getPointAtLength"]=function(d){return func.getPointAtLength(d)};properties["getTangentAtLength"]=function(d){return func.getTangentAtLength(d)};properties["getPropertiesAtLength"]=function(d){return func.getPropertiesAtLength(d)}})(functions[i]);parts.push(properties)}}return parts};var getPartAtLength=function(fractionLength){if(fractionLength<0){fractionLength=0}else if(fractionLength>length){fractionLength=length}var i=partial_lengths.length-1;while(partial_lengths[i]>=fractionLength&&partial_lengths[i]>0){i--}i++;return{fraction:fractionLength-partial_lengths[i-1],i:i}};return svgProperties(svgString)}exports.svgPathProperties=pathProperties;exports.parse=parse;exports.Bezier=Bezier;Object.defineProperty(exports,"__esModule",{value:true})})},{}]},{},[4]);var ld$obj,ld$,k,ref$,v,ns,slice$=[].slice;if(!(typeof ld$!="undefined"&&ld$!==null)){ld$obj=function(dom){return import$(dom,ld$obj.prototype)};ld$=function(it){return new ld$obj(it)};ld$obj.prototype={find:function(s,n){var r,ref$,ret,e;if(!(r=this).querySelector){ref$=[document,r.toString(),s],r=ref$[0],s=ref$[1],n=ref$[2]}if(s instanceof HTMLElement){return s}try{if(n===0){return r.querySelector(s)}ret=Array.from(r.querySelectorAll(s));if(n){return ret[n]}else{return ret}}catch(e$){e=e$;console.warn("ld$.find exception: "+s+" / "+n+" under ",r);throw e}},index:function(){return Array.from(this.parentNode.childNodes).indexOf(this)},child:function(){return Array.from(this.childNodes)},parent:function(s,e){var n;e==null&&(e=document);n=this;while(n&&n!==e){n=n.parentNode}if(n!==e){return null}n=this;while(n&&n!==e&&(!n.matches||n.matches&&!n.matches(s))){n=n.parentNode}if(n===e&&(!e.matches||!e.matches(s))){return null}return n},cls:function(o){var k,v,results$=[];for(k in o){v=o[k];results$.push(this.classList[v?"add":"remove"](k))}return results$},attr:function(n,v){var k,results$=[];if(typeof n==="object"){for(k in n){v=n[k];results$.push(this.setAttribute(k,v))}return results$}else if(v==null){return this.getAttribute(n)}else{return this.setAttribute(n,v)}},on:function(n,cb){return this.addEventListener(n,cb)},remove:function(){if(this.parentNode){return this.parentNode.removeChild(this)}},insertAfter:function(n,s){return this.insertBefore(n,s.nextSibling)}};for(k in ref$=ld$obj.prototype){v=ref$[k];fn$(k,v)}ns={svg:"http://www.w3.org/2000/svg"};import$(ld$,{json:function(v){var e;try{return JSON.parse(v)}catch(e$){e=e$;return v}},fetch:function(u,o,opt){o==null&&(o={});opt==null&&(opt={});return new Promise(function(res,rej){var c,that,k,v,h;c=import$({},o);if(opt.json){c.body=JSON.stringify(opt.json);(c.headers||(c.headers={}))["Content-Type"]="application/json; charset=UTF-8"}if(that=opt.params){u=u+("?"+function(){var ref$,results$=[];for(k in ref$=that){v=ref$[k];results$.push(k+"="+encodeURIComponent(v))}return results$}().join("&"))}if(ld$.fetch.headers){import$(c.headers||(c.headers={}),ld$.fetch.headers)}h=setTimeout(function(){var ref$;rej((ref$=new Error("timeout"),ref$.id=1006,ref$.message="timeout",ref$.name="ldError",ref$));return h=null},opt.timeout||20*1e3);return fetch(u,c).then(function(v){if(!h){return}clearTimeout(h);if(!(v&&v.ok)){return v.clone().text().then(function(t){var json,ref$,e;try{json=JSON.parse(t);if(json&&json.name==="ldError"){return rej(import$((ref$=new Error(v.status+" "+t),ref$.data=t,ref$.code=v.status,ref$),json))}}catch(e$){e=e$;json=null}return rej((ref$=new Error(v.status+" "+t),ref$.data=t,ref$.json=json,ref$.id=v.status,ref$.code=v.status,ref$.name="ldError",ref$.message=t,ref$))})}else{return res(opt.type!=null?v[opt.type]():v)}})})},create:function(o){var n,k,v;n=o.ns?document.createElementNS(ns[o.ns]||o.ns,o.name):document.createElement(o.name);if(o.style){import$(n.style,o.style)}if(o.attr){(function(){var ref$,results$=[];for(k in ref$=o.attr){v=ref$[k];results$.push([k,v])}return results$})().map(function(p){return n.setAttribute(p[0],p[1])})}if(o.className){n.classList.add.apply(n.classList,o.className)}if(o.text){n.innerText=o.text}if(o.html){n.innerHTML=o.html}return n}});ld$.fetch.headers={}}function import$(obj,src){var own={}.hasOwnProperty;for(var key in src)if(own.call(src,key))obj[key]=src[key];return obj}function fn$(k,v){return ld$[k]=function(z){var args;args=slice$.call(arguments,1);return v.apply(z,args)}}var ldSlider,slice$=[].slice;ldSlider=function(opt){var root,i$,to$,i,that,handle,el,mouse,this$=this;opt==null&&(opt={});this.evtHandler={};this.opt=import$({min:0,max:100,from:0,step:1},opt);this.root=root=typeof opt.root==="string"?document.querySelector(opt.root):opt.root;if(this.root.tagName==="INPUT"){this.input=this.root;ld$.attr(this.input,"type","hidden");this.root=root=document.createElement("div");this.input.parentNode.insertBefore(this.root,this.input);this.input.classList;for(i$=0,to$=this.input.classList.length;i$<to$;++i$){i=i$;this.root.classList.add(this.input.classList[i])}this.input.setAttribute("class","");if(that=this.input.getAttribute("data-class")){this.input.classList.add.apply(this.input.classList,that.split(" "))}handle=function(){return this$.repos(this$.input.value,true,false,true)};this.input.addEventListener("change",handle);this.input.addEventListener("input",handle)}this.root._ldrs=this;this.root.classList.add("ldrs");this.root.innerHTML='<div class="bar">\n  <div class="cap"></div>\n  <div class="cap"></div>\n  <div class="bar-inner">\n    <div class="bk"></div>\n    <div class="fg"></div>\n    <div class="ptr"></div>\n    <div class="lock-line"></div>\n    <div class="hint p"></div>\n  </div>\n</div>\n<div class="hint l"></div>\n<div class="hint lock"></div>\n<div class="hint r"></div>';this.el=el={b:{fg:ld$.find(root,".fg",0)},p:ld$.find(root,".ptr",0),h:{p:ld$.find(root,".hint.p",0),l:ld$.find(root,".hint.l",0),r:ld$.find(root,".hint.r",0),lock:ld$.find(root,".hint.lock",0),lockLine:ld$.find(root,".lock-line",0)}};mouse={move:function(e){return this$.repos(e.clientX,true,true)},up:function(){document.removeEventListener("mouseup",mouse.up);document.removeEventListener("mousemove",mouse.move);return this$.el.h.p.innerText=this$.label.ptr(Math.round(1e4*this$.value)/1e4)},prepare:function(){document.addEventListener("mousemove",mouse.move);return document.addEventListener("mouseup",mouse.up)}};el.p.addEventListener("mousedown",mouse.prepare);root.addEventListener("click",mouse.move);root.addEventListener("mousedown",mouse.prepare);this.prepare();return this};ldSlider.prototype=import$(Object.create(Object.prototype),{on:function(n,cb){var ref$;return((ref$=this.evtHandler)[n]||(ref$[n]=[])).push(cb)},fire:function(n){var v,i$,ref$,len$,cb,results$=[];v=slice$.call(arguments,1);for(i$=0,len$=(ref$=this.evtHandler[n]||[]).length;i$<len$;++i$){cb=ref$[i$];results$.push(cb.apply(this,v))}return results$},update:function(){return this.set(this.value)},updateInput:function(arg$){var now,this$=this;now=(arg$!=null?arg$:{now:false}).now;clearTimeout(this.debounce);return this.debounce=setTimeout(function(){if(this$.input.value!==this$.value){return this$.input.value=this$.value}},now?0:500)},edit:function(v){if(!this.input){return}if(!(v!=null)){v=this.input.getAttribute("type")==="hidden"}this.input.setAttribute("type",v?"text":"hidden");this.root.style.display=v?"none":"";if(!v){return this.update()}},prepare:function(){var this$=this;if(this.opt.from!=null){this.value=this.opt.from}if(this.opt.exp){this.expFactor=Math.log(this.opt.exp.output||this.opt.max-this.opt.min)/Math.log(this.opt.exp.input)}this.label=import$({ptr:function(it){if(it===this$.opt.min&&this$.label.min!=null){return this$.label.min}else if(it===this$.opt.max&&this$.label.max!=null){return this$.label.max}else{return it}}},this.opt.label||{});this.el.h.l.innerText=this.label.min!=null?this.label.min:this.opt.min;this.el.h.r.innerText=this.label.max!=null?this.label.max:this.opt.max;this.el.h.lock.innerHTML='<i class="i-lock"></i>';this.el.h.p.innerText=this.label.ptr(this.opt.from);this.root.classList[this.opt.limitMax!=null?"add":"remove"]("limit");return this.update()},setConfig:function(opt){opt==null&&(opt={});this.opt=import$({},opt);return this.prepare()},set:function(v,forceNotify){forceNotify==null&&(forceNotify=false);return this.repos(v,forceNotify)},get:function(){return this.value},repos:function(v,forceNotify,isEvent,fromInput){var old,rbox,w06,x,ref$,ref1$,ref2$,dx,ref3$,hbox;forceNotify==null&&(forceNotify=false);isEvent==null&&(isEvent=false);fromInput==null&&(fromInput=false);old=this.value;rbox=this.el.p.parentNode.getBoundingClientRect();w06=rbox.width*.6;if(isEvent){x=(ref$=(ref2$=v-rbox.x)>0?ref2$:0)<(ref1$=rbox.width)?ref$:ref1$;dx=x/rbox.width;if(this.expFactor){dx=Math.pow(dx,this.expFactor)}this.value=this.opt.min+(this.opt.max-this.opt.min)*dx;if(this.opt.limitMax!=null){if(x>w06){this.value=this.opt.limitMax+(this.opt.max-this.opt.limitMax)*(x-w06)/(rbox.width-w06)}else{dx=x/w06;if(this.expFactor){dx=Math.pow(dx,this.expFactor)}this.value=this.opt.min+this.opt.limitMax*dx}}}else{this.value=v}this.value=v=(ref$=(ref2$=this.opt.min+Math.round((this.value-this.opt.min)/this.opt.step)*this.opt.step)>(ref3$=this.opt.min)?ref2$:ref3$)<(ref1$=this.opt.max)?ref$:ref1$;if(this.opt.limitMax!=null){if(v>this.opt.limitMax){x=(v-this.opt.limitMax)/(this.opt.max-this.opt.limitMax)*40+60}else{if(this.expFactor){x=60*Math.pow((v-this.opt.min)/(this.opt.limitMax-this.opt.min),1/this.expFactor)}else{x=60*(v-this.opt.min)/(this.opt.limitMax-this.opt.min)}}}else{if(this.expFactor){x=100*Math.pow((this.value-this.opt.min)/(this.opt.max-this.opt.min),1/this.expFactor)}else{x=100*((this.value-this.opt.min)/(this.opt.max-this.opt.min))}}if(this.opt.limitMax!=null&&this.opt.limitHard){if(x>60){x=60}if(this.value>this.opt.limitMax){this.value=v=this.opt.limitMax}}hbox=this.el.h.p.getBoundingClientRect();this.el.h.p.innerText=this.label.ptr(Math.round(1e4*v)/1e4);this.el.h.p.style.left=100*(.01*x*rbox.width)/rbox.width+"%";this.el.h.p.style.transform="translate(-50%,0)";this.el.p.style.left=x+"%";this.el.b.fg.style.width=x+"%";if(v!==old&&forceNotify){this.fire("change",this.value)}if(this.input){return this.updateInput({now:!fromInput})}}});function import$(obj,src){var own={}.hasOwnProperty;for(var key in src)if(own.call(src,key))obj[key]=src[key];return obj}(function(){var ldLazy;ldLazy=function(opt){var root,debounced,update,this$=this;opt==null&&(opt={});root=opt.root;this.opt=import$({debounce:10},opt);this.root=root=typeof root==="string"?document.querySelector(root):root?root:null;this.pending=[];if(this.opt.debounce&&(typeof debounce!="undefined"&&debounce!==null)){debounced=debounce(this.opt.debounce||10,function(){this$.handle(this$.pending);return this$.pending=[]});update=function(ns){ns.map(function(it){var ref$;return ref$=it.target._lzs,ref$.changed=true,ref$.visible=it.isIntersecting,ref$});this$.pending=this$.pending.concat(ns.map(function(it){return it.target}));return debounced(ns.map(function(it){return it.target}))}}else{update=function(ns){ns.map(function(it){var ref$;return ref$=it.target._lzs,ref$.changed=true,ref$.visible=it.isIntersecting,ref$});return this$.handle(ns.map(function(it){return it.target}))}}this.obs=new IntersectionObserver(update,{root:root});this.list=[];return this};ldLazy.prototype=import$(Object.create(Object.prototype),{add:function(n){var ns,this$=this;ns=Array.isArray(n)?n:[n];return ns.map(function(n){this$.obs.observe(n);this$.list.push(n);return n._lzs={src:n.getAttribute("data-src")}})},remove:function(n){var ns,this$=this;ns=Array.isArray(n)?n:[n];return ns.map(function(n){var ref$;this$.obs.unobserve(n);this$.list.splice(this$.list.indexOf(n),1);return ref$=n._lzs,delete n._lzs,ref$})},handle:function(l){var this$=this;l.map(function(n){var o;o=n._lzs;if(!o.changed){return}else{o.changed=false}if(o.visible){if(o.src){if(n.nodeName==="IMG"){n.setAttribute("src",o.src)}else{n.style.backgroundImage="url("+o.src+")"}delete o.src}n.style.opacity=1;return n.style.visibility="visible"}else{n.style.opacity=0;return n.style.visibility="hidden"}});if(this.opt.toggle){return l.map(function(n){var o;o=n._lzs;if(!o.changed){return}return this$.opt.toggle(n,o.visible)})}}});window.addEventListener("DOMContentLoaded",function(){var _,lzs;_=new ldLazy;lzs=Array.from(document.querySelectorAll(".ldlz"));return lzs.map(function(it){return _.add(it)})});if(typeof module!="undefined"&&module!==null){module.exports=ldLazy}if(window){return window.ldLazy=ldLazy}})();function import$(obj,src){var own={}.hasOwnProperty;for(var key in src)if(own.call(src,key))obj[key]=src[key];return obj}(function(){var idmap,ldError;idmap={0:"unknown error",999:"canceled",1e3:"user not login",1001:"suspicious user",1002:"unknown error",1003:"image process failed",1004:"quota exceeded",1005:"csrftoken mismatch",1006:"timeout",1007:"server down",1008:"unable to parse user data"};ldError=function(opt,id){opt==null&&(opt="");id==null&&(id=0);if(typeof opt==="string"){this.message=opt;this.id=id}else if(opt instanceof Error){(this.stack=opt.stack,this.message=opt.message,this).id=id||0}else if(typeof opt==="object"){import$(this,opt).id=id||0}else if(typeof opt==="number"){this.id=opt}if(!(this.message!=null)){this.message=idmap[this.id||0]}this.stack=(new Error).stack;return this};ldError.prototype=import$(Object.create(Error.prototype),{name:"ldError",toString:function(opt){var obj;opt==null&&(opt={});obj=this.toObject();if(opt.stack!=null&&!opt.stack){delete obj.stack}return JSON.stringify(obj)},toObject:function(){var ref$;return ref$={name:this.name},ref$.id=this.id,ref$.message=this.message,ref$.stack=this.stack,ref$}});if(typeof module!="undefined"&&module!==null){module.exports=ldError}if(typeof window!="undefined"&&window!==null){return window.ldError=ldError}})();function import$(obj,src){var own={}.hasOwnProperty;for(var key in src)if(own.call(src,key))obj[key]=src[key];return obj}(function(){var setEvtHandler,ldView;setEvtHandler=function(d,k,f){return d.node.addEventListener(k,function(evt){return f(import$({evt:evt},d))})};ldView=function(opt){var root,selector,exclusions,all,prefixRE,names,i$,ref$,k,v,len$,list,j$,len1$,it,res$,this$=this;opt==null&&(opt={});this.handler=opt.handler||{};this.action=opt.action||{};this.text=opt.text||{};this.initer=opt.init||{};this.prefix=opt.prefix;this.initRender=opt.initRender!=null?opt.initRender:true;this.root=root=typeof opt.root==="string"?ld$.find(document,opt.root,0):opt.root;if(!this.root){console.warn("[ldView] warning: no node found for root ",opt.root)}if(this.root.setAttribute){this.id="ld-"+Math.random().toString(36).substring(2);this.root.setAttribute("ld-scope-"+this.id,"")}selector=this.prefix?"[ld-each^="+this.prefix+"\\$]":"[ld-each]";exclusions=ld$.find(root,(this.id?"[ld-scope-"+this.id+"] ":"")+("[ld-scope] "+selector));all=ld$.find(root,selector);this.eaches=all.filter(function(it){return!in$(it,exclusions)}).map(function(n){var p,c,i,ret;p=n.parentNode;while(p){if(p===document){break}else{p=p.parentNode}}if(!p){return null}if(ld$.parent(n.parentNode,"*[ld-each]",document)){return null}c=n.parentNode;i=Array.from(c.childNodes).indexOf(n);ret={container:c,idx:i,node:n,name:n.getAttribute("ld-each"),nodes:[]};p=document.createComment(" ld-each="+ret.name+" ");p._data=ret;c.insertBefore(p,n);ret.proxy=p;c.removeChild(n);return ret}).filter(function(it){return it});selector=this.prefix?"[ld^="+this.prefix+"\\$]":"[ld]";exclusions=ld$.find(root,(this.id?"[ld-scope-"+this.id+"] ":"")+("[ld-scope] "+selector));all=ld$.find(root,selector);this.nodes=all.filter(function(it){return!in$(it,exclusions)});prefixRE=this.prefix?new RegExp("^"+this.prefix+"\\$"):null;this.map={nodes:{},eaches:{}};this.nodes.map(function(node){var names;names=(node.getAttribute("ld")||"").split(" ");if(this$.prefix){names=names.map(function(it){return it.replace(prefixRE,"").trim()})}return names.map(function(it){var ref$;return((ref$=this$.map.nodes)[it]||(ref$[it]=[])).push({node:node,names:names,evts:{}})})});this.eaches.map(function(node){var ref$,key$;return((ref$=this$.map.eaches)[key$=node.name]||(ref$[key$]=[])).push(node)});names={};for(i$=0,len$=(ref$=[fn$.call(this)].concat([fn1$.call(this)],[fn2$.call(this)],fn3$.call(this).map(fn4$))).length;i$<len$;++i$){list=ref$[i$];for(j$=0,len1$=list.length;j$<len1$;++j$){it=list[j$];names[it]=true}}res$=[];for(k in names){res$.push(k)}this.names=res$;if(this.initRender){this.render()}return this;function fn$(){var results$=[];for(k in this.initer){results$.push(k)}return results$}function fn1$(){var results$=[];for(k in this.text){results$.push(k)}return results$}function fn2$(){var results$=[];for(k in this.handler){results$.push(k)}return results$}function fn3$(){var ref$,results$=[];for(k in ref$=this.action){v=ref$[k];results$.push(v)}return results$}function fn4$(it){var k,results$=[];for(k in it){results$.push(k)}return results$}};ldView.prototype=import$(Object.create(Object.prototype),{procEach:function(name,data){var list,items,nodes,lastidx,ret,ns,this$=this;list=this.handler[name].list()||[];items=[];nodes=data.nodes.filter(function(it){return it}).map(function(n){if(!in$(n._data,list)){if(n.parentNode){n.parentNode.removeChild(n)}n._data=null}else{items.push(n._data)}return n}).filter(function(it){return it._data});lastidx=0;ret=list.map(function(n,i){var node;if((lastidx=items.indexOf(n))>=0){return nodes[lastidx]}node=data.node.cloneNode(true);node._data=n;node.removeAttribute("ld-each");data.container.insertBefore(node,nodes[lastidx+1]||data.proxy);return node});ns=ret;ns.filter(function(it){return it}).map(function(it,i){return this$.handler[name].handle({node:it,name:name,data:it._data,idx:i})});return data.nodes=ns},get:function(n){return((this.map.nodes[n]||[])[0]||{}).node},getAll:function(n){return(this.map.nodes[n]||[]).map(function(it){return it.node})},render:function(names){var _,i$,ref$,len$,k,this$=this,results$=[];_=function(n){if(this$.map.nodes[n]){this$.map.nodes[n].map(function(d,i){var k,ref$,v,e,results$=[];d.name=n;d.idx=i;try{if(this$.handler[n]){this$.handler[n](d)}if(this$.text[n]){d.node.textContent=typeof this$.text[n]==="function"?this$.text[n](d):this$.text[n]}if(this$.initer[n]&&!(d.inited||(d.inited={}))[n]){this$.initer[n](d);d.inited[n]=true}for(k in ref$=this$.action){v=ref$[k];if(v&&v[n]&&!(d.evts||(d.evts={}))[k]){setEvtHandler(d,k,v[n]);results$.push(d.evts[k]=true)}}return results$}catch(e$){e=e$;console.warn("[ldView] failed when rendering "+n);throw e}})}if(this$.map.eaches[n]&&this$.handler[n]){return this$.map.eaches[n].map(function(it){return this$.procEach(n,it)})}};if(names){return(Array.isArray(names)?names:[names]).map(function(it){return _(it)})}else{for(i$=0,len$=(ref$=this.names).length;i$<len$;++i$){k=ref$[i$];results$.push(_(k))}return results$}}});if(typeof module!="undefined"&&module!==null){module.exports=ldView}if(typeof window!="undefined"&&window!==null){return window.ldView=ldView}})();function import$(obj,src){var own={}.hasOwnProperty;for(var key in src)if(own.call(src,key))obj[key]=src[key];return obj}function in$(x,xs){var i=-1,l=xs.length>>>0;while(++i<l)if(x===xs[i])return true;return false}(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){var presets,simpleStr,wrap,slice$=[].slice,toString$={}.toString;presets=require("./presets").presets;simpleStr=function(arr){return arr.join("")};wrap=function(content){return"data:image/svg+xml;base64,"+btoa(content)};(function(){var make,handler,ldBar;make={head:function(viewBox){return'<?xml version="1.0" encoding="utf-8"?>\n        <svg xmlns="http://www.w3.org/2000/svg" viewBox="'+viewBox+'">'},gradient:function(dir,dur){var colors,ret,len,gx,gy,x,y,i$,i,idx;dir==null&&(dir=45);dur==null&&(dur=1);colors=slice$.call(arguments,2);ret=[this.head("0 0 100 100")];len=colors.length*4+1;dir=dir*Math.PI/180;gx=Math.pow(Math.cos(dir),2);gy=Math.sqrt(gx-Math.pow(gx,2));if(dir>Math.PI*.25){gy=Math.pow(Math.sin(dir),2);gx=Math.sqrt(gy-Math.pow(gy,2))}x=gx*100;y=gy*100;ret.push('<defs><linearGradient id="gradient" x1="0" x2="'+gx+'" y1="0" y2="'+gy+'">');for(i$=0;i$<len;++i$){i=i$;idx=i*100/(len-1);ret.push('<stop offset="'+idx+'%" stop-color="'+colors[i%colors.length]+'"/>')}ret.push('</linearGradient></defs>\n<rect x="0" y="0" width="400" height="400" fill="url(#gradient)">\n<animateTransform attributeName="transform" type="translate" from="-'+x+",-"+y+'"\nto="0,0" dur="'+dur+'s" repeatCount="indefinite"/></rect></svg>');return wrap(ret.join(""))},stripe:function(c1,c2,dur){var ret,i;c1==null&&(c1="#b4b4b4");c2==null&&(c2="#e6e6e6");dur==null&&(dur=1);ret=[this.head("0 0 100 100")];ret=ret.concat(['<rect fill="'+c2+'" width="100" height="100"/>',"<g><g>",function(){var i$,results$=[];for(i$=0;i$<13;++i$){i=i$;results$.push('<polygon fill="'+c1+'" '+('points="'+(-90+i*20)+",100 "+(-100+i*20)+",")+("100 "+(-60+i*20)+",0 "+(-50+i*20)+',0 "/>'))}return results$}().join(""),'</g><animateTransform attributeName="transform" type="translate" ','from="0,0" to="20,0" dur="'+dur+'s" repeatCount="indefinite"/></g></svg>'].join(""));return wrap(ret)},bubble:function(c1,c2,count,dur,size,sw){var ret,i$,i,idx,x,r,d;c1==null&&(c1="#39d");c2==null&&(c2="#9cf");count==null&&(count=15);dur==null&&(dur=1);size==null&&(size=6);sw==null&&(sw=1);ret=[this.head("0 0 200 200"),'<rect x="0" y="0" width="200" height="200" fill="'+c1+'"/>'];for(i$=0;i$<count;++i$){i=i$;idx=-(i/count)*dur;x=Math.random()*184+8;r=(Math.random()*.7+.3)*size;d=dur*(1+Math.random()*.5);ret.push(['<circle cx="'+x+'" cy="0" r="'+r+'" fill="none" stroke="'+c2+'" stroke-width="'+sw+'">','<animate attributeName="cy" values="190;-10" times="0;1" ','dur="'+d+'s" begin="'+idx+'s" repeatCount="indefinite"/>',"</circle>",'<circle cx="'+x+'" cy="0" r="'+r+'" fill="none" stroke="'+c2+'" stroke-width="'+sw+'">','<animate attributeName="cy" values="390;190" times="0;1" ','dur="'+d+'s" begin="'+idx+'s" repeatCount="indefinite"/>',"</circle>"].join(""))}return wrap(ret.join("")+"</svg>")}};handler={queue:{},running:false,main:function(timestamp){var keepon,removed,k,ref$,func,ret,this$=this;keepon=false;removed=[];for(k in ref$=this.queue){func=ref$[k];ret=func(timestamp);if(!ret){removed.push(func)}keepon=keepon||ret}for(k in ref$=this.queue){func=ref$[k];if(removed.indexOf(func)>=0){delete this.queue[k]}}if(keepon){return requestAnimationFrame(function(it){return this$.main(it)})}else{return this.running=false}},add:function(key,f){var this$=this;if(!this.queue[key]){this.queue[key]=f}if(!this.running){this.running=true;return requestAnimationFrame(function(it){return this$.main(it)})}}};window.ldBar=ldBar=function(selector,option){var xmlns,root,cls,idPrefix,id,domTree,newNode,x$,config,attr,that,isStroke,parseRes,dom,svg,text,group,length,path0,path1,patimg,img,ret,size,this$=this;option==null&&(option={});xmlns={xlink:"http://www.w3.org/1999/xlink"};root=toString$.call(selector).slice(8,-1)==="String"?document.querySelector(selector):selector;if(!root.ldBar){root.ldBar=this}else{return root.ldBar}cls=root.getAttribute("class")||"";if(!~cls.indexOf("ldBar")){root.setAttribute("class",cls+" ldBar")}idPrefix="ldBar-"+Math.random().toString(16).substring(2);id={key:idPrefix,clip:idPrefix+"-clip",filter:idPrefix+"-filter",pattern:idPrefix+"-pattern",mask:idPrefix+"-mask",maskPath:idPrefix+"-mask-path"};domTree=function(n,o){var k,v;n=newNode(n);for(k in o){v=o[k];if(k!=="attr"){n.appendChild(domTree(k,v||{}))}}n.attrs(o.attr||{});return n};newNode=function(n){return document.createElementNS("http://www.w3.org/2000/svg",n)};x$=document.body.__proto__.__proto__.__proto__;x$.text=function(t){return this.appendChild(document.createTextNode(t))};x$.attrs=function(o){var k,v,ret,results$=[];for(k in o){v=o[k];ret=/([^:]+):([^:]+)/.exec(k);if(!ret||!xmlns[ret[1]]){results$.push(this.setAttribute(k,v))}else{results$.push(this.setAttributeNS(xmlns[ret[1]],k,v))}}return results$};x$.styles=function(o){var k,v,results$=[];for(k in o){v=o[k];results$.push(this.style[k]=v)}return results$};x$.append=function(n){var r;return this.appendChild(r=document.createElementNS("http://www.w3.og/2000/svg",n))};x$.attr=function(n,v){if(v!=null){return this.setAttribute(n,v)}else{return this.getAttribute(n)}};config={type:"stroke",img:"",path:"M10 10L90 10M90 8M90 12","fill-dir":"btt",fill:"#25b","fill-background":"#ddd","fill-background-extrude":3,"pattern-size":null,"stroke-dir":"normal",stroke:"#25b","stroke-width":"3","stroke-trail":"#ddd","stroke-trail-width":.5,duration:1,easing:"linear",value:0,"img-size":null,bbox:null,"set-dim":true,"aspect-ratio":"xMidYMid","transition-in":false,min:0,max:100,precision:0,padding:undefined};config["preset"]=root.attr("data-preset")||option["preset"];if(config.preset!=null){import$(config,presets[config.preset])}for(attr in config){if(that=that=root.attr("data-"+attr)){config[attr]=that}}import$(config,option);if(config.img){config.path=null}isStroke=config.type==="stroke";parseRes=function(v){var parser,ret;parser=/data:ldbar\/res,([^()]+)\(([^)]+)\)/;ret=parser.exec(v);if(!ret){return v}return ret=make[ret[1]].apply(make,ret[2].split(","))};config.fill=parseRes(config.fill);config.stroke=parseRes(config.stroke);if(config["set-dim"]==="false"){config["set-dim"]=false}dom={attr:{"xmlns:xlink":"http://www.w3.org/1999/xlink",preserveAspectRatio:config["aspect-ratio"],width:"100%",height:"100%"},defs:{filter:{attr:{id:id.filter,x:-1,y:-1,width:3,height:3},feMorphology:{attr:{operator:+config["fill-background-extrude"]>=0?"dilate":"erode",radius:Math.abs(+config["fill-background-extrude"])}},feColorMatrix:{attr:{values:"0 0 0 0 1    0 0 0 0 1    0 0 0 0 1    0 0 0 1 0",result:"cm"}}},mask:{attr:{id:id.mask},image:{attr:{"xlink:href":config.img,filter:"url(#"+id.filter+")",x:0,y:0,width:100,height:100,preserveAspectRatio:config["aspect-ratio"]}}},g:{mask:{attr:{id:id.maskPath},path:{attr:{d:config.path||"",fill:"#fff",stroke:"#fff",filter:"url(#"+id.filter+")"}}}},clipPath:{attr:{id:id.clip},rect:{attr:{class:"mask",fill:"#000"}}},pattern:{attr:{id:id.pattern,patternUnits:"userSpaceOnUse",x:0,y:0,width:300,height:300},image:{attr:{x:0,y:0,width:300,height:300}}}}};svg=domTree("svg",dom);text=document.createElement("div");text.setAttribute("class","ldBar-label");root.appendChild(svg);root.appendChild(text);group=[0,0];length=0;this.fit=function(){var that,box,d,rect;if(that=config["bbox"]){box=that.split(" ").map(function(it){return+it.trim()});box={x:box[0],y:box[1],width:box[2],height:box[3]}}else{box=group[1].getBBox()}if(!box||box.width===0||box.height===0){box={x:0,y:0,width:100,height:100}}d=Math.max.apply(null,["stroke-width","stroke-trail-width","fill-background-extrude"].map(function(it){return config[it]}))*1.5;if(config["padding"]!=null){d=+config["padding"]}svg.attrs({viewBox:[box.x-d,box.y-d,box.width+d*2,box.height+d*2].join(" ")});if(config["set-dim"]){["width","height"].map(function(it){if(!root.style[it]||this$.fit[it]){root.style[it]=box[it]+d*2+"px";return this$.fit[it]=true}})}rect=group[0].querySelector("rect");if(rect){return rect.attrs({x:box.x-d,y:box.y-d,width:box.width+d*2,height:box.height+d*2})}};if(config.path){if(isStroke){group[0]=domTree("g",{path:{attr:{d:config.path,fill:"none",class:"baseline"}}})}else{group[0]=domTree("g",{rect:{attr:{x:0,y:0,width:100,height:100,mask:"url(#"+id.maskPath+")",fill:config["fill-background"],class:"frame"}}})}svg.appendChild(group[0]);group[1]=domTree("g",{path:{attr:{d:config.path,class:isStroke?"mainline":"solid","clip-path":config.type==="fill"?"url(#"+id.clip+")":""}}});svg.appendChild(group[1]);path0=group[0].querySelector(isStroke?"path":"rect");path1=group[1].querySelector("path");if(isStroke){path1.attrs({fill:"none"})}patimg=svg.querySelector("pattern image");img=new Image;img.addEventListener("load",function(){var box,that;box=(that=config["pattern-size"])?{width:+that,height:+that}:img.width&&img.height?{width:img.width,height:img.height}:{width:300,height:300};svg.querySelector("pattern").attrs({width:box.width,height:box.height});return patimg.attrs({width:box.width,height:box.height})});if(/.+\..+|^data:/.exec(!isStroke?config.fill:config.stroke)){img.src=!isStroke?config.fill:config.stroke;patimg.attrs({"xlink:href":img.src})}if(isStroke){path0.attrs({stroke:config["stroke-trail"],"stroke-width":config["stroke-trail-width"]});path1.attrs({"stroke-width":config["stroke-width"],stroke:/.+\..+|^data:/.exec(config.stroke)?"url(#"+id.pattern+")":config.stroke})}if(config.fill&&!isStroke){path1.attrs({fill:/.+\..+|^data:/.exec(config.fill)?"url(#"+id.pattern+")":config.fill})}length=path1.getTotalLength();this.fit();this.inited=true}else if(config.img){if(config["img-size"]){ret=config["img-size"].split(",");size={width:+ret[0],height:+ret[1]}}else{size={width:100,height:100}}group[0]=domTree("g",{rect:{attr:{x:0,y:0,width:100,height:100,mask:"url(#"+id.mask+")",fill:config["fill-background"]}}});svg.querySelector("mask image").attrs({width:size.width,height:size.height});group[1]=domTree("g",{image:{attr:{width:size.width,height:size.height,x:0,y:0,preserveAspectRatio:config["aspect-ratio"],"clip-path":config.type==="fill"?"url(#"+id.clip+")":"","xlink:href":config.img,class:"solid"}}});img=new Image;img.addEventListener("load",function(){var ret,size,v;if(config["img-size"]){ret=config["img-size"].split(",");size={width:+ret[0],height:+ret[1]}}else if(img.width&&img.height){size={width:img.width,height:img.height}}else{size={width:100,height:100}}svg.querySelector("mask image").attrs({width:size.width,height:size.height});group[1].querySelector("image").attrs({width:size.width,height:size.height});this$.fit();v=this$.value;this$.value=undefined;this$.set(v,true);return this$.inited=true});img.src=config.img;svg.appendChild(group[0]);svg.appendChild(group[1])}svg.attrs({width:"100%",height:"100%"});this.transition={value:{src:0,des:0},time:{},ease:function(t,b,c,d){t=t/(d*.5);if(t<1){return c*.5*t*t+b}t=t-1;return-c*.5*(t*(t-2)-1)+b},handler:function(time,doTransition){var ref$,min,max,prec,dv,dt,dur,v,p,node,style,box,dir;doTransition==null&&(doTransition=true);if(this.time.src==null){this.time.src=time}ref$=[config["min"],config["max"],1/config["precision"]],min=ref$[0],max=ref$[1],prec=ref$[2];ref$=[this.value.des-this.value.src,(time-this.time.src)*.001,+config["duration"]||1],dv=ref$[0],dt=ref$[1],dur=ref$[2];v=doTransition?this.ease(dt,this.value.src,dv,dur):this.value.des;if(config.precision){v=Math.round(v*prec)/prec}else if(doTransition){v=Math.round(v)}v>=min||(v=min);v<=max||(v=max);text.textContent=v;p=100*(v-min)/(max-min);if(isStroke){node=path1;style={"stroke-dasharray":config["stroke-dir"]==="reverse"?"0 "+length*(100-p)*.01+" "+length*p*.01+" 0":p*.01*length+" "+((100-p)*.01*length+1)}}else{box=group[1].getBBox();dir=config["fill-dir"];style=dir==="btt"||!dir?{y:box.y+box.height*(100-p)*.01,height:box.height*p*.01,x:box.x,width:box.width}:dir==="ttb"?{y:box.y,height:box.height*p*.01,x:box.x,width:box.width}:dir==="ltr"?{y:box.y,height:box.height,x:box.x,width:box.width*p*.01}:dir==="rtl"?{y:box.y,height:box.height,x:box.x+box.width*(100-p)*.01,width:box.width*p*.01}:void 8;node=svg.querySelector("rect")}node.attrs(style);if(dt>=dur){delete this.time.src;return false}return true},start:function(src,des,doTransition){var ref$,this$=this;ref$=this.value;ref$.src=src;ref$.des=des;!!(root.offsetWidth||root.offsetHeight||root.getClientRects().length);if(!doTransition||!(root.offsetWidth||root.offsetHeight||root.getClientRects().length)){this.time.src=0;this.handler(1e3,false);return}return handler.add(id.key,function(time){return this$.handler(time)})}};this.set=function(v,doTransition){var src,des;doTransition==null&&(doTransition=true);src=this.value||0;if(v!=null){this.value=v}else{v=this.value}des=this.value;return this.transition.start(src,des,doTransition)};this.set(+config.value||0,config["transition-in"])||false;return this};return window.addEventListener("load",function(){var i$,ref$,len$,node,results$=[];for(i$=0,len$=(ref$=document.querySelectorAll(".ldBar")).length;i$<len$;++i$){node=ref$[i$];if(!node.ldBar){results$.push(node.ldBar=new ldBar(node))}}return results$},false)})();module.exports=ldBar;function import$(obj,src){var own={}.hasOwnProperty;for(var key in src)if(own.call(src,key))obj[key]=src[key];return obj}},{"./presets":2}],2:[function(require,module,exports){var presets,out$=typeof exports!="undefined"&&exports||this;out$.presets=presets={rainbow:{type:"stroke",path:"M10 10L90 10",stroke:"data:ldbar/res,gradient(0,1,#a551df,#fd51ad,#ff7f82,#ffb874,#ffeb90)",bbox:"10 10 80 10"},energy:{type:"fill",path:"M15 5L85 5A5 5 0 0 1 85 15L15 15A5 5 0 0 1 15 5",stroke:"#f00",fill:"data:ldbar/res,gradient(45,2,#4e9,#8fb,#4e9)","fill-dir":"ltr","fill-background":"#444","fill-background-extrude":1,bbox:"10 5 80 10"},stripe:{type:"fill",path:"M15 5L85 5A5 5 0 0 1 85 15L15 15A5 5 0 0 1 15 5",stroke:"#f00",fill:"data:ldbar/res,stripe(#25b,#58e,1)","fill-dir":"ltr","fill-background":"#ddd","fill-background-extrude":1,bbox:"10 5 80 10"},text:{type:"fill",img:'data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="70" height="20" viewBox="0 0 70 20"><text x="35" y="10" text-anchor="middle" dominant-baseline="central" font-family="arial">LOADING</text></svg>',"fill-background-extrude":1.3,"pattern-size":100,"fill-dir":"ltr","img-size":"70,20",bbox:"0 0 70 20"},line:{type:"stroke",path:"M10 10L90 10",stroke:"#25b","stroke-width":3,"stroke-trail":"#ddd","stroke-trail-width":1,bbox:"10 10 80 10"},fan:{type:"stroke",path:"M10 90A40 40 0 0 1 90 90","fill-dir":"btt",fill:"#25b","fill-background":"#ddd","fill-background-extrude":3,"stroke-dir":"normal",stroke:"#25b","stroke-width":"3","stroke-trail":"#ddd","stroke-trail-width":.5,bbox:"10 50 80 40"},circle:{type:"stroke",path:"M50 10A40 40 0 0 1 50 90A40 40 0 0 1 50 10","fill-dir":"btt",fill:"#25b","fill-background":"#ddd","fill-background-extrude":3,"stroke-dir":"normal",stroke:"#25b","stroke-width":"3","stroke-trail":"#ddd","stroke-trail-width":.5,bbox:"10 10 80 80"},bubble:{type:"fill",path:"M50 10A40 40 0 0 1 50 90A40 40 0 0 1 50 10","fill-dir":"btt",fill:"data:ldbar/res,bubble(#39d,#cef)","pattern-size":"150","fill-background":"#ddd","fill-background-extrude":2,"stroke-dir":"normal",stroke:"#25b","stroke-width":"3","stroke-trail":"#ddd","stroke-trail-width":.5,bbox:"10 10 80 80"}}},{}]},{},[1]);var slice$=[].slice;(function(){var loadFile,ldFile,this$=this;loadFile=function(f,t,e){t==null&&(t="binary");return new Promise(function(res,rej){var fr;fr=new FileReader;fr.onload=function(){return res({result:fr.result,file:f})};if(t==="dataurl"){return fr.readAsDataURL(f)}else if(t==="text"){return fr.readAsText(f,e||"utf-8")}else if(t==="binary"){return fr.readAsBinaryString(f)}else if(t==="arraybuffer"||t==="blob"){return fr.readAsArrayBuffer(f)}else if(t==="blob"){return res(f)}else if(t==="bloburl"){return res(URL.createObjectURL(f))}else{return rej(new Error("ldFile: un-supported type"))}})};ldFile=function(opt){var root,fromPrompt,this$=this;opt==null&&(opt={});import$(this,{evtHandler:{},opt:opt,root:root=typeof opt.root==="string"?document.querySelector(opt.root):opt.root,type:opt.type||"binary",ldcv:opt.ldcv||null,encoding:opt.forceEncoding});fromPrompt=function(){return new Promise(function(res,rej){var ret;return res(ret=prompt("encoding:","utf-8"))})};this.root.addEventListener("change",function(e){var files,promise;files=e.target.files;if(!files.length){return}promise=this$.type==="text"&&!opt.forceEncoding?(this$.ldcv?this$.ldcv.get():fromPrompt()).then(function(it){return this$.encoding=it}):Promise.resolve();return promise.then(function(){return Promise.all(Array.from(files).map(function(f){return loadFile(f,this$.type,this$.encoding)}))}).then(function(it){return this$.fire("load",it)})});return this};ldFile.prototype=import$(Object.create(Object.prototype),{on:function(n,cb){var ref$;return((ref$=this.evtHandler)[n]||(ref$[n]=[])).push(cb)},fire:function(n){var v,i$,ref$,len$,cb,results$=[];v=slice$.call(arguments,1);for(i$=0,len$=(ref$=this.evtHandler[n]||[]).length;i$<len$;++i$){cb=ref$[i$];results$.push(cb.apply(this,v))}return results$}});import$(ldFile,{fromURL:function(u,t,e){return new Promise(function(res,rej){var r;r=new XMLHttpRequest;r.open("GET",u,true);r.responseType="blob";r.onload=function(){return loadFile(r.response,t,e).then(res)["catch"](rej)};return r.send()})},fromFile:function(f,t,e){return loadFile(f,t,e)}});if(typeof module!="undefined"&&module!==null){module.exports=ldFile}if(window){return window.ldFile=ldFile}})();function import$(obj,src){var own={}.hasOwnProperty;for(var key in src)if(own.call(src,key))obj[key]=src[key];return obj}var ldBoundScroll,scrollto,smoothScroll;ldBoundScroll=function(n){var prevent,handler;prevent=function(e){e.stopPropagation();e.preventDefault();e.returnValue=false;return false};handler=function(e){n.scrollTop-=e.wheelDelta||-e.deltaY||0;return prevent(e)};if(navigator.userAgent.match("CriOS")){return}return["wheel"].map(function(it){return n.addEventListener(it,handler)})};ldBoundScroll.init=function(){var i$,ref$,len$,item,results$=[];for(i$=0,len$=(ref$=document.querySelectorAll(".bound-scroll")).length;i$<len$;++i$){item=ref$[i$];results$.push(ldBoundScroll(item))}return results$};scrollto=function(n,d,offset,h){var e,b,c,s,f;d==null&&(d=500);offset==null&&(offset=-80);n=typeof n==="string"?ld$.find(document.body,n,0):n;if(!(n&&n.getBoundingClientRect)){return}n=n.getBoundingClientRect();e=h||document.scrollingElement||document.documentElement;b=e.scrollTop;c=n.top+b;if(c+window.innerHeight>=e.scrollHeight){c=e.scrollHeight-window.innerHeight}c=c-b+offset;s=0;f=function(t){var o;if(!s){s=t}t=(t-s)/(d/2);o=t<1?c/2*t*t+b:-c/2*((t-1)*(t-3)-1)+b;e.scrollTop=o;if(t<=2){return requestAnimationFrame(f)}};return requestAnimationFrame(f)};smoothScroll=function(opt){var delay,offset;opt==null&&(opt={});delay=opt.delay||500;offset=opt.offset!=null?opt.offset:-80;return ld$.find(document,"*[data-scrollto]").map(function(d,i){var t;t=d.getAttribute("data-scrollto");return d.addEventListener("click",function(e){scrollto(ld$.find(document,t,0),delay,offset);return e.preventDefault()})})};if(document.createEvent||n.fireEvent){ld$.find(document,".form-check-label").map(function(it){var n;n=it.previousSibling;if(!(n.classList&&n.classList.contains("form-check-input"))){return}return it.addEventListener("click",function(){var evt;if(document.createEvent){n.checked=!n.checked;evt=document.createEvent("HTMLEvents");evt.initEvent("input",false,true);return n.dispatchEvent(evt)}else if(n.fireEvent){n.checked=!n.checked;return n.fireEvent("onchange")}})})}var ldNotify;ldNotify=function(opt){var this$=this;opt==null&&(opt={});this.opt={className:["alert","ld"],classIn:["ld-bounce-in"],classOut:["ld-fade-out"],delay:2e3};import$(this.opt,opt);["className","classIn","classOut"].map(function(it){if(typeof this$.opt[it]==="string"){return this$.opt[it]=this$.opt[it].split(" ").filter(function(it){return it.trim()})}});this.root=typeof opt.root==="string"?document.querySelector(opt.root):opt.root;return this};ldNotify.prototype=import$(Object.create(Object.prototype),{send:function(type,msg){var node,this$=this;node=ld$.create({name:"div",className:this.opt.className.concat(this.opt.classIn,["alert-"+type]),text:msg});this.root.insertBefore(node,this.root.childNodes[0]);return setTimeout(function(){node.classList.remove.apply(node.classList,this$.opt.classIn);node.classList.add.apply(node.classList,this$.opt.classOut);return setTimeout(function(){return ld$.remove(node)},this$.opt.delay)},this.opt.delay)}});function import$(obj,src){var own={}.hasOwnProperty;for(var key in src)if(own.call(src,key))obj[key]=src[key];return obj}
  