/* Philter v1.5.0 | (c) 2015-2018 Liudas Dzisevicius | MIT License */ !function(){"use strict";function i(e,t,n){switch(t[0]){case"drop-shadow":e[0]=e[0]+t[0]+"("+t[1]+n+" "+t[2]+n+" "+t[3]+n+" rgba(0,0,0,"+.01*t[4]+")) ",t[5]&&t[6]&&t[7]&&t[8]?e[1]=e[1]+t[0]+"("+t[5]+n+" "+t[6]+n+" "+t[7]+n+" rgba(0,0,0,"+.01*t[8]+")) ":e[1]=e[1]+t[0]+"("+t[1]+n+" "+t[2]+n+" "+t[3]+n+" rgba(0,0,0,"+.01*t[4]+")) ";break;case"svg":e[0]=e[0]+"url("+n+t[1]+") ",t[2]?e[1]=e[1]+"url("+n+t[2]+") ":e[1]=e[1]+"url("+n+t[1]+") ";break;case"color":++this.filterCount.color,r.call(this,t[1],t[2],this.filterCount.color),e[0]=e[0]+"url("+n+"color-"+this.filterCount.color+") ",t[3]&&t[4]&&(++this.filterCount.color,r.call(this,t[3],t[4],this.filterCount.color)),e[1]=e[1]+"url("+n+"color-"+this.filterCount.color+") ";break;case"duotone":++this.filterCount.duotone,l.call(this,t[1],t[2],this.filterCount.duotone),e[0]=e[0]+"url("+n+"duotone-"+this.filterCount.duotone+") ",t[3]&&t[4]&&(++this.filterCount.duotone,l.call(this,t[3],t[4],this.filterCount.duotone)),e[1]=e[1]+"url("+n+"duotone-"+this.filterCount.duotone+") ";break;case"vintage":0==this.filterCount["vintage-"+t[1]]&&a.call(this,t[1]),++this.filterCount["vintage-"+t[1]],e[0]=e[0]+"url("+n+"vintage-"+t[1]+") ",t[2]?(0==this.filterCount["vintage-"+t[2]]&&a.call(this,t[2]),++this.filterCount["vintage-"+t[1]],e[1]=e[1]+"url("+n+"vintage-"+t[2]+") "):e[1]=e[1]+"url("+n+"vintage-"+t[1]+") ";break;default:e[0]=e[0]+t[0]+"("+t[1]+n+") ",t[2]?e[1]=e[1]+t[0]+"("+t[2]+n+") ":e[1]=e[1]+t[0]+"("+t[1]+n+") "}return e}function r(e,t,n){var r=document.getElementById("svg");r||((r=document.createElement("div")).setAttribute("id","svg"),r.innerHTML='',document.body.appendChild(r),r=document.getElementById("svg")),t*=.01;var l='';l=l.replace("color","color-"+n),r.querySelector("defs").innerHTML+=l,s(r.querySelector('filter[id="color-'+n+'"]').children[0],{"flood-opacity":t,"flood-color":e})}function l(e,t,n){var r=document.getElementById("svg");r||((r=document.createElement("div")).setAttribute("id","svg"),r.innerHTML='',document.body.appendChild(r),r=document.getElementById("svg")),e=f(e),t=f(t);var l='';l=l.replace("duotone","duotone-"+n),r.querySelector("defs").innerHTML+=l,s(r.querySelector('filter[id="duotone-'+n+'"] fefuncr'),{tableValues:e.r/255+" "+t.r/255}),s(r.querySelector('filter[id="duotone-'+n+'"] fefuncg'),{tableValues:e.g/255+" "+t.g/255}),s(r.querySelector('filter[id="duotone-'+n+'"] fefuncb'),{tableValues:e.b/255+" "+t.b/255})}function a(e){var t=document.getElementById("svg");t||((t=document.createElement("div")).setAttribute("id","svg"),t.innerHTML='',document.body.appendChild(t),t=document.getElementById("svg"));var n="";switch(e){case"1":n='';break;case"2":n='';break;case"3":n='';break;case"4":n='';break;case"5":n='';break;case"6":n=''}t.querySelector("defs").innerHTML+=n}function o(e){var t={blur:"px","hue-rotate":"deg","drop-shadow":"px",svg:"#",color:"#",vintage:"#",duotone:"#",default:"%"};return t[e]?t[e]:t.default}function s(e,t){for(var n in t)e.setAttribute(n,t[n])}function f(e){var t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?{r:parseInt(t[1],16),g:parseInt(t[2],16),b:parseInt(t[3],16)}:null}window.Philter=function(){var e={transitionTime:.5,tag:!0},t=document.createElement("style");this.filterCount={color:0,duotone:0,"vintage-1":0,"vintage-2":0,"vintage-3":0,"vintage-4":0,"vintage-5":0,"vintage-6":0},this.filters=["blur","grayscale","hue-rotate","saturate","sepia","contrast","invert","opacity","brightness","drop-shadow","svg","color","duotone","vintage"],this.elements=[],this.styleString="",this.transitionString="",arguments[0]&&"object"==typeof arguments[0]?this.options=function(e,t){var n;for(n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}(e,arguments[0]):this.options=e,function(){for(var e=0;e