lath
Version:
Seamless connection of pages.
1 lines • 62.4 kB
JavaScript
function convertKeyframes(t,e){var i={},n=getComputedStyle(t);if(Array.isArray(e))return 1<e.length?e:[e[0],e[0]];for(const r in e)Array.isArray(e[r])?i[r]=[e[r][0],e[r][1]]:i[r]=[n[r],e[r]];return i}if(!function(){var r,o,u,O,i,n,a,s,F,l,e,c,h,f,m,L,I,q,d,p,g,z,_,y,b,W,H,v,K,T,j,U,B,G,w,x,V,$,J,A,t,X,Yt={},Zt={},P={},Q=(b=Yt,$="backwards|forwards|both|none".split("|"),J="reverse|alternate|alternate-reverse".split("|"),A=function(t){return t},lt.prototype={_setMember:function(t,e){this["_"+t]=e,this._effect&&(this._effect._timingInput[t]=e,this._effect._timing=b.normalizeTimingInput(this._effect._timingInput),this._effect.activeDuration=b.calculateActiveDuration(this._effect._timing),this._effect._animation)&&this._effect._animation._rebuildUnderlyingAnimation()},get playbackRate(){return this._playbackRate},set delay(t){this._setMember("delay",t)},get delay(){return this._delay},set endDelay(t){this._setMember("endDelay",t)},get endDelay(){return this._endDelay},set fill(t){this._setMember("fill",t)},get fill(){return this._fill},set iterationStart(t){if((isNaN(t)||t<0)&&M())throw new TypeError("iterationStart must be a non-negative number, received: "+t);this._setMember("iterationStart",t)},get iterationStart(){return this._iterationStart},set duration(t){if("auto"!=t&&(isNaN(t)||t<0)&&M())throw new TypeError("duration must be non-negative or auto, received: "+t);this._setMember("duration",t)},get duration(){return this._duration},set direction(t){this._setMember("direction",t)},get direction(){return this._direction},set easing(t){this._easingFunction=ft(ht(t)),this._setMember("easing",t)},get easing(){return this._easing},set iterations(t){if((isNaN(t)||t<0)&&M())throw new TypeError("iterations must be non-negative, received: "+t);this._setMember("iterations",t)},get iterations(){return this._iterations}},K={ease:D(.25,.1,.25,W=1),"ease-in":D(.42,v=0,1,1),"ease-out":D(0,0,.58,1),"ease-in-out":D(.42,0,.58,1),"step-start":C(1,W),"step-middle":C(1,H=.5),"step-end":C(1,v)},T=null,E="\\s*(-?\\d+\\.?\\d*|-?\\.\\d+)\\s*",j=new RegExp("cubic-bezier\\("+E+","+E+","+E+","+E+"\\)"),U=/steps\(\s*(\d+)\s*\)/,B=/steps\(\s*(\d+)\s*,\s*(start|middle|end)\s*\)/,G=0,w=1,x=2,V=3,b.cloneTimingInput=function(t){var e,i;if("number"==typeof t)return t;for(i in e={},t)e[i]=t[i];return e},b.makeTiming=ct,b.numericTimingToObject=function(t){return t="number"==typeof t?isNaN(t)?{duration:0}:{duration:t}:t},b.normalizeTimingInput=function(t,e){return ct(t=b.numericTimingToObject(t),e)},b.calculateActiveDuration=function(t){return Math.abs((0===(e=t).duration||0===e.iterations?0:e.duration*e.iterations)/t.playbackRate);var e},b.calculateIterationProgress=function(t,e,i){var n,r,o,a,s,u=mt(t,e,i);return null===(t=function(t,e,i,n,r){switch(n){case w:return"backwards"==e||"both"==e?0:null;case V:return i-r;case x:return"forwards"==e||"both"==e?t:null;case G:return null}}(t,i.fill,e,u,i.delay))?null:(e=i.duration,r=u,o=i.iterations,a=t,s=i.iterationStart,0===e?r!==w&&(s+=o):s+=a/e,o=r=s,a=i.iterationStart,e=u,s=i.iterations,t=t,n=i.duration,o=a=0!==(a=o===1/0?a%1:o%1)||e!==x||0===s||0===t&&0!==n?a:1,e=i.iterations,s=o,t=r,n=u===x&&e===1/0?1/0:1===s?Math.floor(t)-1:Math.floor(t),a=i.direction,r=n,u=o,"normal"!==(e=a)&&"reverse"!==a&&(r=r,"alternate-reverse"===a&&(r+=1),e=r!==1/0&&r%2!=0?"reverse":"normal"),i._easingFunction("normal"===e?u:1-u))},b.calculatePhase=mt,b.normalizeEasing=ht,b.parseEasingFunction=ft,g=Yt,z={background:["backgroundImage","backgroundPosition","backgroundSize","backgroundRepeat","backgroundAttachment","backgroundOrigin","backgroundClip","backgroundColor"],border:["borderTopColor","borderTopStyle","borderTopWidth","borderRightColor","borderRightStyle","borderRightWidth","borderBottomColor","borderBottomStyle","borderBottomWidth","borderLeftColor","borderLeftStyle","borderLeftWidth"],borderBottom:["borderBottomWidth","borderBottomStyle","borderBottomColor"],borderColor:["borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"],borderLeft:["borderLeftWidth","borderLeftStyle","borderLeftColor"],borderRadius:["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"],borderRight:["borderRightWidth","borderRightStyle","borderRightColor"],borderTop:["borderTopWidth","borderTopStyle","borderTopColor"],borderWidth:["borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth"],flex:["flexGrow","flexShrink","flexBasis"],font:["fontFamily","fontSize","fontStyle","fontVariant","fontWeight","lineHeight"],margin:["marginTop","marginRight","marginBottom","marginLeft"],outline:["outlineColor","outlineStyle","outlineWidth"],padding:["paddingTop","paddingRight","paddingBottom","paddingLeft"]},_=document.createElementNS("http://www.w3.org/1999/xhtml","div"),y={borderBottomWidth:E={thin:"1px",medium:"3px",thick:"5px"},borderLeftWidth:E,borderRightWidth:E,borderTopWidth:E,fontSize:{"xx-small":"60%","x-small":"75%",small:"89%",medium:"100%",large:"120%","x-large":"150%","xx-large":"200%"},fontWeight:{normal:"400",bold:"700"},outlineWidth:E,textShadow:{none:"0px 0px 0px transparent"},boxShadow:{none:"0px 0px 0px 0px transparent"}},g.convertToArrayForm=ut,g.normalizeKeyframes=function(t){var e,i,n,r,o,a,s,u,l,c,h;if(null==t)return[];for(window.Symbol&&Symbol.iterator&&Array.prototype.from&&t[Symbol.iterator]&&(t=Array.from(t)),Array.isArray(t)||(t=ut(t)),e=t.map(function(t){var e,i,n={};for(e in t){if(i=t[e],"offset"==e){if(null!=i){if(i=Number(i),!isFinite(i))throw new TypeError("Keyframe offsets must be numbers.");if(i<0||1<i)throw new TypeError("Keyframe offsets must be between 0 and 1.")}}else if("composite"==e){if("add"==i||"accumulate"==i)throw{type:DOMException.NOT_SUPPORTED_ERR,name:"NotSupportedError",message:"add compositing is not supported"};if("replace"!=i)throw new TypeError("Invalid composite mode "+i+".")}else i="easing"==e?g.normalizeEasing(i):""+i;u=s=a=o=r=h=c=l=void 0;var r,o,a,s,u,l=e,c=i,h=n;if("display"!==(u=l)&&0!==u.lastIndexOf("animation",0)&&0!==u.lastIndexOf("transition",0))if(r=z[l])for(o in _.style[l]=c,r)a=r[o],s=_.style[a],h[a]=st(a,s);else h[l]=st(l,c)}return null==n.offset&&(n.offset=null),null==n.easing&&(n.easing="linear"),n}),i=!0,n=-1/0,r=0;r<e.length;r++)if(null!=(o=e[r].offset)){if(o<n)throw new TypeError("Keyframes are not loosely sorted by offset. Sort or specify offsets.");n=o}else i=!1;if(e=e.filter(function(t){return 0<=t.offset&&t.offset<=1}),!i){h=e.length;for(null==e[h-1].offset&&(e[h-1].offset=1),1<h&&null==e[0].offset&&(e[0].offset=0),s=e[a=0].offset,u=1;u<h;u++)if(null!=(l=e[u].offset)){for(c=1;c<u-a;c++)e[a+c].offset=s+(l-s)*c/(u-a);a=u,s=l}}return e},p={},(d=Yt).isDeprecated=function(t,e,i,n){var n=n?"are":"is",r=new Date,e=new Date(e);return e.setMonth(e.getMonth()+3),!(r<e&&(t in p||console.warn("Web Animations: "+t+" "+n+" deprecated and will stop working on "+e.toDateString()+". "+i),p[t]=!0))},d.deprecated=function(t,e,i,n){var r=n?"are":"is";if(d.isDeprecated(t,e,i,n))throw new Error(t+" "+r+" no longer supported. "+i)},function(){if(document.documentElement.animate){var L=document.documentElement.animate([],0),I=!0;if(L&&(I=!1,"play|currentTime|pause|reverse|playbackRate|cancel|finish|startTime|playState".split("|").forEach(function(t){void 0===L[t]&&(I=!0)})),!I)return}ut=Yt,(lt=Zt).convertEffectInput=function(t){var e=function(t){for(var e,i,n,r,o={},a=0;a<t.length;a++)for(e in t[a])"offset"!=e&&"easing"!=e&&"composite"!=e&&(i={offset:t[a].offset,easing:t[a].easing,value:t[a][e]},o[e]=o[e]||[],o[e].push(i));for(n in o)if(0!=(r=o[n])[0].offset||1!=r[r.length-1].offset)throw{type:DOMException.NOT_SUPPORTED_ERR,name:"NotSupportedError",message:"Partial keyframes are not supported"};return o}(ut.normalizeKeyframes(t)),i=function(t){var e,i,n,r,o,a,s,u,l,c=[];for(e in t)for(i=t[e],n=0;n<i.length-1;n++)u=a=i[r=n].offset,l=s=i[o=n+1].offset,0==n&&(u=-1/0,0==s)&&(o=r),n==i.length-2&&(l=1/0,1==a)&&(r=o),c.push({applyFrom:u,applyTo:l,startOffset:i[r].offset,endOffset:i[o].offset,easingFunction:ut.parseEasingFunction(i[r].easing),property:e,interpolation:lt.propertyInterpolation(e,i[r].value,i[o].value)});return c.sort(function(t,e){return t.startOffset-e.startOffset}),c}(e);return function(n,r){if(null!=r)i.filter(function(t){return r>=t.applyFrom&&r<t.applyTo}).forEach(function(t){var e=r-t.startOffset,i=t.endOffset-t.startOffset,e=0==i?0:t.easingFunction(e/i);lt.apply(n,t.property,t.interpolation(e))});else for(var t in e)"offset"!=t&&"easing"!=t&&"composite"!=t&<.clear(n,t)}},ot=Yt,k={},(at=Zt).addPropertiesHandler=function(t,e,i){for(var n,r,o,a=0;a<i.length;a++)n=t,r=e,o=Qt(i[a]),k[o]=k[o]||[],k[o].push([n,r])},st={backgroundColor:"transparent",backgroundPosition:"0% 0%",borderBottomColor:"currentColor",borderBottomLeftRadius:"0px",borderBottomRightRadius:"0px",borderBottomWidth:"3px",borderLeftColor:"currentColor",borderLeftWidth:"3px",borderRightColor:"currentColor",borderRightWidth:"3px",borderSpacing:"2px",borderTopColor:"currentColor",borderTopLeftRadius:"0px",borderTopRightRadius:"0px",borderTopWidth:"3px",bottom:"auto",clip:"rect(0px, 0px, 0px, 0px)",color:"black",fontSize:"100%",fontWeight:"400",height:"auto",left:"auto",letterSpacing:"normal",lineHeight:"120%",marginBottom:"0px",marginLeft:"0px",marginRight:"0px",marginTop:"0px",maxHeight:"none",maxWidth:"none",minHeight:"0px",minWidth:"0px",opacity:"1.0",outlineColor:"invert",outlineOffset:"0px",outlineWidth:"3px",paddingBottom:"0px",paddingLeft:"0px",paddingRight:"0px",paddingTop:"0px",right:"auto",strokeDasharray:"none",strokeDashoffset:"0px",textIndent:"0px",textShadow:"0px 0px 0px transparent",top:"auto",transform:"",verticalAlign:"0px",visibility:"visible",width:"auto",wordSpacing:"normal",zIndex:"auto"},at.propertyInterpolation=function(t,e,i){var n,r,o,a,s,u,l=t;for(/-/.test(t)&&!ot.isDeprecated("Hyphenated property names","2016-03-22","Use camelCase instead.",!0)&&(l=Qt(t)),"initial"!=e&&"initial"!=i||("initial"==e&&(e=st[l]),"initial"==i&&(i=st[l])),n=e==i?[]:k[l],r=0;n&&r<n.length;r++)if(o=n[r][0](e),a=n[r][0](i),void 0!==o&&void 0!==a&&(s=n[r][1](o,a)))return u=at.Interpolation.apply(null,s),function(t){return 0==t?e:1==t?i:u(t)};return at.Interpolation(!1,!0,function(t){return t?i:e})},nt=Yt,(rt=Zt).KeyframeEffect=function(e,t,i,n){function r(){s(e,o)}var o,a=Xt(nt.normalizeTimingInput(i)),s=rt.convertEffectInput(t);return r._update=function(t){return null!==(o=a(t))},r._clear=function(){s(e,null)},r._hasSameTarget=function(t){return e===t},r._target=e,r._totalDuration=a._totalDuration,r._id=n,r};var o=Zt;function q(t,e,i){i.enumerable=!0,i.configurable=!0,Object.defineProperty(t,e,i)}function a(t){var e,i,n;this._element=t,this._surrogateStyle=document.createElementNS("http://www.w3.org/1999/xhtml","div").style,this._style=t.style,this._length=0,this._isAnimatedProperty={},this._updateSvgTransformAttr=(n=window,!(!(t=t).namespaceURI||-1==t.namespaceURI.indexOf("/svg"))&&(z in n||(n[z]=/Trident|MSIE|IEMobile|Edge|Android 4/i.test(n.navigator.userAgent)),n[z])),this._savedTransformAttr=null;for(e=0;e<this._style.length;e++)i=this._style[e],this._surrogateStyle[i]=this._style[i];this._updateIndices()}var t,e,z="_webAnimationsUpdateSvgTransformAttr",W={cssText:1,length:1,parentRule:1},H={getPropertyCSSValue:1,getPropertyPriority:1,getPropertyValue:1,item:1,removeProperty:1,setProperty:1},K={removeProperty:1,setProperty:1};for(t in a.prototype={get cssText(){return this._surrogateStyle.cssText},set cssText(t){for(var e,i={},n=0;n<this._surrogateStyle.length;n++)i[this._surrogateStyle[n]]=!0;for(this._surrogateStyle.cssText=t,this._updateIndices(),n=0;n<this._surrogateStyle.length;n++)i[this._surrogateStyle[n]]=!0;for(e in i)this._isAnimatedProperty[e]||this._style.setProperty(e,this._surrogateStyle.getPropertyValue(e))},get length(){return this._surrogateStyle.length},get parentRule(){return this._style.parentRule},_updateIndices:function(){for(;this._length<this._surrogateStyle.length;)Object.defineProperty(this,this._length,{configurable:!0,enumerable:!1,get:function(t){return function(){return this._surrogateStyle[t]}}(this._length)}),this._length++;for(;this._length>this._surrogateStyle.length;)this._length--,Object.defineProperty(this,this._length,{configurable:!0,enumerable:!1,value:void 0})},_set:function(t,e){this._style[t]=e,this._isAnimatedProperty[t]=!0,this._updateSvgTransformAttr&&"transform"==o.unprefixedPropertyName(t)&&(null==this._savedTransformAttr&&(this._savedTransformAttr=this._element.getAttribute("transform")),this._element.setAttribute("transform",o.transformToSvgMatrix(e)))},_clear:function(t){this._style[t]=this._surrogateStyle[t],this._updateSvgTransformAttr&&"transform"==o.unprefixedPropertyName(t)&&(this._savedTransformAttr?this._element.setAttribute("transform",this._savedTransformAttr):this._element.removeAttribute("transform"),this._savedTransformAttr=null),delete this._isAnimatedProperty[t]}},H)a.prototype[t]=function(e,i){return function(){var t=this._surrogateStyle[e].apply(this._surrogateStyle,arguments);return i&&(this._isAnimatedProperty[arguments[0]]||this._style[e].apply(this._style,arguments),this._updateIndices()),t}}(t,t in K);for(e in document.documentElement.style)e in W||e in H||function(e){q(a.prototype,e,{get:function(){return this._surrogateStyle[e]},set:function(t){this._surrogateStyle[e]=t,this._updateIndices(),this._isAnimatedProperty[e]||(this._style[e]=t)}})}(e);o.apply=function(t,e,i){var n=t;if(!n._webAnimationsPatchedStyle){var r=new a(n);try{q(n,"style",{get:function(){return r}})}catch(r){n.style._set=function(t,e){n.style[t]=e},n.style._clear=function(t){n.style[t]=""}}n._webAnimationsPatchedStyle=n.style}t.style._set(o.propertyName(e),i)},o.clear=function(t,e){t._webAnimationsPatchedStyle&&t.style._clear(o.propertyName(e))},it=Zt,window.Element.prototype.animate=function(t,e){var i="";return e&&e.id&&(i=e.id),it.timeline._play(it.KeyframeEffect(this,t,e,i))},Zt.Interpolation=function(e,i,n){return function(t){return n(function t(e,i,n){if("number"==typeof e&&"number"==typeof i)return e*(1-n)+i*n;if("boolean"==typeof e&&"boolean"==typeof i)return n<.5?e:i;if(e.length!=i.length)throw"Mismatched interpolation arguments "+e+":"+i;for(var r=[],o=0;o<e.length;o++)r.push(t(e[o],i[o],n));return r}(e,i,t))}},(et=Zt).composeMatrix=function(t,e,i,n,r){for(var o,a,s,u,l,c=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]],h=0;h<4;h++)c[h][3]=r[h];for(h=0;h<3;h++)for(o=0;o<3;o++)c[3][h]+=t[o]*c[o][h];for(a=n[0],s=n[1],l=n[2],n=n[3],(u=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]])[0][0]=1-2*(s*s+l*l),u[0][1]=2*(a*s-l*n),u[0][2]=2*(a*l+s*n),u[1][0]=2*(a*s+l*n),u[1][1]=1-2*(a*a+l*l),u[1][2]=2*(s*l-a*n),u[2][0]=2*(a*l-s*n),u[2][1]=2*(s*l+a*n),u[2][2]=1-2*(a*a+s*s),c=Jt(c,u),l=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]],i[2]&&(l[2][1]=i[2],c=Jt(c,l)),i[1]&&(l[2][1]=0,l[2][0]=i[0],c=Jt(c,l)),i[0]&&(l[2][0]=0,l[1][0]=i[0],c=Jt(c,l)),h=0;h<3;h++)for(o=0;o<3;o++)c[h][o]*=e[h];return 0==(n=c)[0][2]&&0==n[0][3]&&0==n[1][2]&&0==n[1][3]&&0==n[2][0]&&0==n[2][1]&&1==n[2][2]&&0==n[2][3]&&0==n[3][2]&&1==n[3][3]?[c[0][0],c[0][1],c[1][0],c[1][1],c[3][0],c[3][1]]:c[0].concat(c[1],c[2],c[3])},et.quat=function(t,e,i){var n,r,o,a,s,u,l,c=et.dot(t,e);if(s=c,u=-1,n=[],(l=1)===(c=Math.max(Math.min(s,l),u)))n=t;else for(r=Math.acos(c),o=+Math.sin(i*r)/Math.sqrt(1-c*c),a=0;a<4;a++)n.push(t[a]*(Math.cos(i*r)-c*o)+e[a]*o);return n};var j,U,i,B,G,V,s,$,J,x,n,m,d,A,r,u,X,l,c,h,f,p,g,_,y,Q,Y,b,v,T,w,P,E,Z,S,tt,et,it,nt,rt,ot,at,st,k,ut,lt,ct=Yt,R=Zt;function ht(t,e,i){this.target=t,this.currentTime=e,this.timelineTime=i,this.type="finish",this.bubbles=!1,this.cancelable=!1,this.currentTarget=t,this.defaultPrevented=!1,this.eventPhase=Event.AT_TARGET,this.timeStamp=Date.now()}function ft(e,t){t.concat([e]).forEach(function(t){t in document.documentElement.style&&(j[e]=t),U[t]=e})}function mt(t){return s.consumeToken(/^(left|center|right|top|bottom)\b/i,t)||s.consumeLengthOrPercent(t)}function dt(t,e){var e=s.consumeRepeated(mt,/^/,e);if(e&&""==e[1]&&((e=e[0])[0]=e[0]||"center",e[1]=e[1]||"center",3==t&&(e[2]=e[2]||{px:0}),e.length==t)&&((/top|bottom/.test(e[0])||/left|right/.test(e[1]))&&(t=e[0],e[0]=e[1],e[1]=t),/left|right|center|Object/.test(e[0]))&&/top|bottom|center|Object/.test(e[1]))return e.map(function(t){return"object"==typeof t?t:$[t]})}function pt(t){var e,i,n,r,o,a,t=s.consumeRepeated(mt,/^/,t);if(t){for(e=t[0],r=!(i=[{"%":50},{"%":50}]),o=n=0;o<e.length;o++)"string"==typeof(a=e[o])?(r=/bottom|right/.test(a),i[n={left:0,right:0,center:n,top:1,bottom:1}[a]]=$[a],"center"==a&&n++):(r&&((a=function(t){var e,i={};for(e in t)i[e]=-t[e];return i}(a))["%"]=(a["%"]||0)+100),i[n]=a,n++,r=!1);return[i,t[1]]}}function gt(t){return t=100*Math.round(t/100),400===(t=J.clamp(100,900,t))?"normal":700===t?"bold":String(t)}function N(t){return function(e){var i=0;return t.map(function(t){return t===n?e[i++]:t})}}function M(t){return t}function _t(t){var e,i,n,r,o,a,s,u,l,c,h,f;if("none"==(t=t.toLowerCase().trim()))return[];for(i=/\s*(\w+)\(([^)]*)\)/g,n=[],r=0;e=i.exec(t);){if(e.index!=r)return;if(r=e.index+e[0].length,o=e[1],!(a=A[o]))return;if(s=e[2].split(","),(u=a[0]).length<s.length)return;for(l=[],c=0;c<u.length;c++){if(h=s[c],f=u[c],void 0===(h=h?{A:function(t){return"0"==t.trim()?d:x.parseAngle(t)},N:x.parseNumber,T:x.parseLengthOrPercent,L:x.parseLength}[f.toUpperCase()](h):{a:d,n:l[0],t:m}[f]))return;l.push(h)}if(n.push({t:o,d:l}),i.lastIndex==t.length)return n}}function D(t){return t.toFixed(6).replace(".000000","")}function yt(e,i){var n,r;return e.decompositionPair!==i&&(e.decompositionPair=i,n=x.makeMatrixDecomposition(e)),i.decompositionPair!==e&&(i.decompositionPair=e,r=x.makeMatrixDecomposition(i)),null==n[0]||null==r[0]?[[!1],[!0],function(t){return(t?i:e)[0].d}]:(n[0].push(0),r[0].push(1),[n,r,function(t){var e=x.quat(n[0][3],r[0][3],t[5]);return x.composeMatrix(t[0],t[1],t[2],e,t[4]).map(D).join(",")}])}function bt(t){return t.replace(/[xy]/,"")}function vt(t){return t.replace(/(x|y|z|3d)?$/,"3d")}function Tt(t){return r.consumeLengthOrPercent(t)||r.consumeToken(/^auto/,t)}function wt(t){t=r.consumeList([r.ignore(r.consumeToken.bind(null,/^rect/)),r.ignore(r.consumeToken.bind(null,/^\(/)),r.consumeRepeated.bind(null,Tt,/^,/),r.ignore(r.consumeToken.bind(null,/^\)/))],t);if(t&&4==t[0].length)return t[0]}function xt(e){function n(){var t=s.exec(e);a=t?t[0]:void 0}function r(){var t;return"("!==a?(t=Number(a),n(),t):(n(),t=i(),")"!==a?NaN:(n(),t))}function o(){for(var t,e,i=r();"*"===a||"/"===a;)t=a,n(),e=r(),"*"===t?i*=e:i/=e;return i}function i(){for(var t,e,i=o();"+"===a||"-"===a;)t=a,n(),e=o(),"+"===t?i+=e:i-=e;return i}var a,s=/([\+\-\w\.]+|[\(\)\*\/])/g;return n(),i()}function At(t,e){var i,n,r,o,a,s,u;if("0"==(e=e.trim().toLowerCase())&&0<="px".search(t))return{px:0};if(/^[^(]*$|^calc/.test(e)){for(e=e.replace(/calc\(/g,"("),i={},e=e.replace(t,function(t){return i[t]=null,"U"+t}),n="U("+t.source+")",r=e.replace(/[-+]?(\d*\.)?\d+([Ee][-+]?\d+)?/g,"N").replace(new RegExp("N"+n,"g"),"D").replace(/\s[+-]\s/g,"O").replace(/\s/g,""),o=[/N\*(D)/g,/(N|D)[*\/]N/g,/(N|D)O\1/g,/\((N|D)\)/g],a=0;a<o.length;)o[a].test(r)?(r=r.replace(o[a],"$1"),a=0):a++;if("D"==r){for(s in i){if(u=xt(e.replace(new RegExp("U"+s,"g"),"").replace(new RegExp(n,"g"),"*0")),!isFinite(u))return;i[s]=u}return i}}}function Pt(t,e){return Et(t,e,!0)}function Et(e,i,n){var t,r=[];for(t in e)r.push(t);for(t in i)r.indexOf(t)<0&&r.push(t);return e=r.map(function(t){return e[t]||0}),i=r.map(function(t){return i[t]||0}),[e,i,function(i){var t=i.map(function(t,e){return 1==i.length&&n&&(t=Math.max(t,0)),u.numberToString(t)+r[e]}).join(" + ");return 1<i.length?"calc("+t+")":t}]}function St(t){var e;if(t=t.trim(),p.fillStyle="#000",p.fillStyle=t,e=p.fillStyle,p.fillStyle="#fff",p.fillStyle=t,e==p.fillStyle)return p.fillRect(0,0,1,1),t=p.getImageData(0,0,1,1).data,p.clearRect(0,0,1,1),e=t[3]/255,[t[0]*e,t[1]*e,t[2]*e,e]}function kt(t,e){return[t,e,function(t){if(t[3])for(var e=0;e<3;e++)t[e]=Math.round((i=t[e]/t[3],Math.max(0,Math.min(255,i))));var i;return t[3]=f.numberToString(f.clamp(0,1,t[3])),"rgba("+t.join(",")+")"}]}function Rt(t){return t.toFixed(3).replace(/0+$/,"").replace(/\.$/,"")}function Nt(t,e,i){return Math.min(e,Math.max(t,i))}function C(t){if(/^\s*[-+]?(\d*\.)?\d+\s*$/.test(t))return Number(t)}function Mt(i,n){return function(t,e){return[t,e,function(t){return Rt(Nt(i,n,t))}]}}function Dt(t){var e,i,n,r=t.trim().split(/\s*[\s,]\s*/);if(0!==r.length){for(e=[],i=0;i<r.length;i++){if(void 0===(n=C(r[i])))return;e.push(n)}return e}}function Ct(t){var i={inset:!1,lengths:[],color:null},t=g.consumeRepeated(function(t){var e=g.consumeToken(/^inset/i,t);return e?(i.inset=!0,e):(e=g.consumeLengthOrPercent(t))?(i.lengths.push(e[0]),e):(e=g.consumeColor(t))?(i.color=e[0],e):void 0},/^/,t);if(t&&t[0].length)return[i,t[1]]}function Ot(t,e){var i=t.exec(e);if(i)return[i=t.ignoreCase?i[0].toLowerCase():i[0],e.substr(i.length)]}function Ft(t,e){t=t(e=e.replace(/^\s*/,""));if(t)return[t[0],t[1].replace(/^\s*/,"")]}function Lt(e,t,i,n,r){for(var o,a=[],s=[],u=[],l=function(t,e){for(var i=t,n=e;i&&n;)n<i?i%=n:n%=i;return t*e/(i+n)}(n.length,r.length),c=0;c<l;c++){if(!(o=t(n[c%n.length],r[c%r.length])))return;a.push(o[0]),s.push(o[1]),u.push(o[2])}return[a,s,function(t){t=t.map(function(t,e){return u[e](t)}).join(i);return e?e(t):t}]}function O(t,e){for(var i=0,n=0;n<t.length;n++)i+=t[n]*e[n];return i}function It(t,e){return[t[0]*e[0]+t[4]*e[1]+t[8]*e[2]+t[12]*e[3],t[1]*e[0]+t[5]*e[1]+t[9]*e[2]+t[13]*e[3],t[2]*e[0]+t[6]*e[1]+t[10]*e[2]+t[14]*e[3],t[3]*e[0]+t[7]*e[1]+t[11]*e[2]+t[15]*e[3],t[0]*e[4]+t[4]*e[5]+t[8]*e[6]+t[12]*e[7],t[1]*e[4]+t[5]*e[5]+t[9]*e[6]+t[13]*e[7],t[2]*e[4]+t[6]*e[5]+t[10]*e[6]+t[14]*e[7],t[3]*e[4]+t[7]*e[5]+t[11]*e[6]+t[15]*e[7],t[0]*e[8]+t[4]*e[9]+t[8]*e[10]+t[12]*e[11],t[1]*e[8]+t[5]*e[9]+t[9]*e[10]+t[13]*e[11],t[2]*e[8]+t[6]*e[9]+t[10]*e[10]+t[14]*e[11],t[3]*e[8]+t[7]*e[9]+t[11]*e[10]+t[15]*e[11],t[0]*e[12]+t[4]*e[13]+t[8]*e[14]+t[12]*e[15],t[1]*e[12]+t[5]*e[13]+t[9]*e[14]+t[13]*e[15],t[2]*e[12]+t[6]*e[13]+t[10]*e[14]+t[14]*e[15],t[3]*e[12]+t[7]*e[13]+t[11]*e[14]+t[15]*e[15]]}function F(t){var e=t.rad||0;return((t.deg||0)/360+(t.grad||0)/400+(t.turn||0))*(2*Math.PI)+e}function qt(t){var e,i,n,r,o,a;switch(t.t){case"rotatex":return e=F(t.d[0]),[1,0,0,0,0,Math.cos(e),Math.sin(e),0,0,-Math.sin(e),Math.cos(e),0,0,0,0,1];case"rotatey":return e=F(t.d[0]),[Math.cos(e),0,-Math.sin(e),0,0,1,0,0,Math.sin(e),0,Math.cos(e),0,0,0,0,1];case"rotate":case"rotatez":return e=F(t.d[0]),[Math.cos(e),Math.sin(e),0,0,-Math.sin(e),Math.cos(e),0,0,0,0,1,0,0,0,0,1];case"rotate3d":return i=t.d[0],n=t.d[1],r=t.d[2],e=F(t.d[3]),0==(o=i*i+n*n+r*r)?(i=1,r=n=0):1!=o&&(i/=o=Math.sqrt(o),n/=o,r/=o),[1-2*(n*n+r*r)*(a=(o=Math.sin(e/2))*o),2*(i*n*a+r*(o=o*Math.cos(e/2))),2*(i*r*a-n*o),0,2*(i*n*a-r*o),1-2*(i*i+r*r)*a,2*(n*r*a+i*o),0,2*(i*r*a+n*o),2*(n*r*a-i*o),1-2*(i*i+n*n)*a,0,0,0,0,1];case"scale":return[t.d[0],0,0,0,0,t.d[1],0,0,0,0,1,0,0,0,0,1];case"scalex":return[t.d[0],0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];case"scaley":return[1,0,0,0,0,t.d[0],0,0,0,0,1,0,0,0,0,1];case"scalez":return[1,0,0,0,0,1,0,0,0,0,t.d[0],0,0,0,0,1];case"scale3d":return[t.d[0],0,0,0,0,t.d[1],0,0,0,0,t.d[2],0,0,0,0,1];case"skew":return o=F(t.d[0]),a=F(t.d[1]),[1,Math.tan(a),0,0,Math.tan(o),1,0,0,0,0,1,0,0,0,0,1];case"skewx":return e=F(t.d[0]),[1,0,0,0,Math.tan(e),1,0,0,0,0,1,0,0,0,0,1];case"skewy":return e=F(t.d[0]),[1,Math.tan(e),0,0,0,1,0,0,0,0,1,0,0,0,0,1];case"translate":return[1,0,0,0,0,1,0,0,0,0,1,0,i=t.d[0].px||0,n=t.d[1].px||0,0,1];case"translatex":return[1,0,0,0,0,1,0,0,0,0,1,0,i=t.d[0].px||0,0,0,1];case"translatey":return[1,0,0,0,0,1,0,0,0,0,1,0,0,n=t.d[0].px||0,0,1];case"translatez":return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,r=t.d[0].px||0,1];case"translate3d":return[1,0,0,0,0,1,0,0,0,0,1,0,i=t.d[0].px||0,n=t.d[1].px||0,r=t.d[2].px||0,1];case"perspective":return[1,0,0,0,0,1,0,0,0,0,1,t.d[0].px?-1/t.d[0].px:0,0,0,0,1];case"matrix":return[t.d[0],t.d[1],0,0,t.d[2],t.d[3],0,0,0,0,1,0,t.d[4],t.d[5],0,1];case"matrix3d":return t.d}}function zt(t){return 0===t.length?[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]:t.map(qt).reduce(It)}function Wt(t){return t[0][0]*t[1][1]*t[2][2]+t[1][0]*t[2][1]*t[0][2]+t[2][0]*t[0][1]*t[1][2]-t[0][2]*t[1][1]*t[2][0]-t[1][2]*t[2][1]*t[0][0]-t[2][2]*t[0][1]*t[1][0]}function Ht(t){var e=Kt(t);return[t[0]/e,t[1]/e,t[2]/e]}function Kt(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1]+t[2]*t[2])}function jt(t,e,i,n){return[i*t[0]+n*e[0],i*t[1]+n*e[1],i*t[2]+n*e[2]]}function Ut(e){var t=S;S=[],e<E.currentTime&&(e=E.currentTime),E._animations.sort(Bt),E._animations=$t(e,!0,E._animations)[0],t.forEach(function(t){t[1](e)}),Vt()}function Bt(t,e){return t._sequenceNumber-e._sequenceNumber}function Gt(){this._animations=[],this.currentTime=window.performance&&performance.now?performance.now():0}function Vt(){w.forEach(function(t){t()}),w.length=0}function $t(i,n,t){T=!(P=!0),b.timeline.currentTime=i,v=!1;var r=[],o=[],a=[],s=[];return t.forEach(function(t){t._tick(i,n),t._inEffect?(o.push(t._effect),t._markTarget()):(r.push(t._effect),t._unmarkTarget()),t._needsTick&&(v=!0);var e=t._inEffect||t._needsTick;((t._inTimeline=e)?a:s).push(t)}),w.push.apply(w,r),w.push.apply(w,o),v&&requestAnimationFrame(function(){}),P=!1,[a,s]}function Jt(t,e){for(var i,n,r=[[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]],o=0;o<4;o++)for(i=0;i<4;i++)for(n=0;n<4;n++)r[o][i]+=e[o][n]*t[n][i];return r}function Xt(e){function t(t){return nt.calculateIterationProgress(i,t,e)}var i=nt.calculateActiveDuration(e);return t._totalDuration=e.delay+i+e.endDelay,t}function Qt(t){return t.replace(/-(.)/g,function(t,e){return e.toUpperCase()})}ct.sequenceNumber=0,R.Animation=function(t){this.id="",t&&t._id&&(this.id=t._id),this._sequenceNumber=ct.sequenceNumber++,this._currentTime=0,this._startTime=null,this._paused=!1,this._playbackRate=1,this._inTimeline=!0,this._finishedFlag=!0,this.onfinish=null,this._finishHandlers=[],this._effect=t,this._inEffect=this._effect._update(0),this._idle=!0,this._currentTimePending=!1},R.Animation.prototype={_ensureAlive:function(){this.playbackRate<0&&0===this.currentTime?this._inEffect=this._effect._update(-1):this._inEffect=this._effect._update(this.currentTime),this._inTimeline||!this._inEffect&&this._finishedFlag||(this._inTimeline=!0,R.timeline._animations.push(this))},_tickCurrentTime:function(t,e){t!=this._currentTime&&(this._currentTime=t,this._isFinished&&!e&&(this._currentTime=0<this._playbackRate?this._totalDuration:0),this._ensureAlive())},get currentTime(){return this._idle||this._currentTimePending?null:this._currentTime},set currentTime(t){t=+t,isNaN(t)||(R.restart(),this._paused||null==this._startTime||(this._startTime=this._timeline.currentTime-t/this._playbackRate),this._currentTimePending=!1,this._currentTime!=t&&(this._idle&&(this._idle=!1,this._paused=!0),this._tickCurrentTime(t,!0),R.applyDirtiedAnimation(this)))},get startTime(){return this._startTime},set startTime(t){t=+t,isNaN(t)||this._paused||this._idle||(this._startTime=t,this._tickCurrentTime((this._timeline.currentTime-this._startTime)*this.playbackRate),R.applyDirtiedAnimation(this))},get playbackRate(){return this._playbackRate},set playbackRate(t){var e;t!=this._playbackRate&&(e=this.currentTime,this._playbackRate=t,this._startTime=null,"paused"!=this.playState&&"idle"!=this.playState&&(this._finishedFlag=!1,this._idle=!1,this._ensureAlive(),R.applyDirtiedAnimation(this)),null!=e)&&(this.currentTime=e)},get _isFinished(){return!this._idle&&(0<this._playbackRate&&this._currentTime>=this._totalDuration||this._playbackRate<0&&this._currentTime<=0)},get _totalDuration(){return this._effect._totalDuration},get playState(){return this._idle?"idle":null==this._startTime&&!this._paused&&0!=this.playbackRate||this._currentTimePending?"pending":this._paused?"paused":this._isFinished?"finished":"running"},_rewind:function(){if(0<=this._playbackRate)this._currentTime=0;else{if(!(this._totalDuration<1/0))throw new DOMException("Unable to rewind negative playback rate animation with infinite duration","InvalidStateError");this._currentTime=this._totalDuration}},play:function(){this._paused=!1,(this._isFinished||this._idle)&&(this._rewind(),this._startTime=null),this._finishedFlag=!1,this._idle=!1,this._ensureAlive(),R.applyDirtiedAnimation(this)},pause:function(){this._isFinished||this._paused||this._idle?this._idle&&(this._rewind(),this._idle=!1):this._currentTimePending=!0,this._startTime=null,this._paused=!0},finish:function(){this._idle||(this.currentTime=0<this._playbackRate?this._totalDuration:0,this._startTime=this._totalDuration-this.currentTime,this._currentTimePending=!1,R.applyDirtiedAnimation(this))},cancel:function(){this._inEffect&&(this._inEffect=!1,this._idle=!0,this._paused=!1,this._finishedFlag=!0,this._currentTime=0,this._startTime=null,this._effect._update(null),R.applyDirtiedAnimation(this))},reverse:function(){this.playbackRate*=-1,this.play()},addEventListener:function(t,e){"function"==typeof e&&"finish"==t&&this._finishHandlers.push(e)},removeEventListener:function(t,e){"finish"==t&&0<=(t=this._finishHandlers.indexOf(e))&&this._finishHandlers.splice(t,1)},_fireEvents:function(t){var e,i;this._isFinished?this._finishedFlag||(e=new ht(this,this._currentTime,t),i=this._finishHandlers.concat(this.onfinish?[this.onfinish]:[]),setTimeout(function(){i.forEach(function(t){t.call(e.target,e)})},0),this._finishedFlag=!0):this._finishedFlag=!1},_tick:function(t,e){this._idle||this._paused||(null==this._startTime?e&&(this.startTime=t-this._currentTime/this.playbackRate):this._isFinished||this._tickCurrentTime((t-this._startTime)*this.playbackRate)),e&&(this._currentTimePending=!1,this._fireEvents(t))},get _needsTick(){return this.playState in{pending:1,running:1}||!this._finishedFlag},_targetAnimations:function(){var t=this._effect._target;return t._activeAnimations||(t._activeAnimations=[]),t._activeAnimations},_markTarget:function(){var t=this._targetAnimations();-1===t.indexOf(this)&&t.push(this)},_unmarkTarget:function(){var t=this._targetAnimations(),e=t.indexOf(this);-1!==e&&t.splice(e,1)}},Y=Yt,b=Zt,Z=window.requestAnimationFrame,S=[],tt=0,window.requestAnimationFrame=function(t){var e=tt++;return 0==S.length&&Z(Ut),S.push([e,t]),e},window.cancelAnimationFrame=function(e){S.forEach(function(t){t[0]==e&&(t[1]=function(){})})},T=v=!(Gt.prototype={_play:function(t){t._timing=Y.normalizeTimingInput(t.timing);t=new b.Animation(t);return t._idle=!1,(t._timeline=this)._animations.push(t),b.restart(),b.applyDirtiedAnimation(t),t}}),b.restart=function(){return v||(v=!0,requestAnimationFrame(function(){}),T=!0),T},b.applyDirtiedAnimation=function(t){P||(t._markTarget(),(t=t._targetAnimations()).sort(Bt),$t(b.timeline.currentTime,!1,t.slice())[1].forEach(function(t){t=E._animations.indexOf(t);-1!==t&&E._animations.splice(t,1)}),Vt())},P=!(w=[]),E=new Gt,b.timeline=E,Q=function(t){var e,i,n,r,o,a,s,u,l,c=[t.slice(0,4),t.slice(4,8),t.slice(8,12),t.slice(12,16)];if(1!==c[3][3])return null;for(e=[],i=0;i<4;i++)e.push(c[i].slice());for(i=0;i<3;i++)e[i][3]=0;if(0===Wt(e))return null;if(t=[],t=c[0][3]||c[1][3]||c[2][3]?(t.push(c[0][3]),t.push(c[1][3]),t.push(c[2][3]),t.push(c[3][3]),function(t,e){for(var i,n,r=[],o=0;o<4;o++){for(n=i=0;n<4;n++)i+=t[n]*e[n][o];r.push(i)}return r}(t,[[(t=function(t){for(var e,i,n=1/Wt(t),r=t[0][0],o=t[0][1],a=t[0][2],s=t[1][0],u=t[1][1],l=t[1][2],c=t[2][0],h=t[2][1],f=t[2][2],m=[[(u*f-l*h)*n,(a*h-o*f)*n,(o*l-a*u)*n,0],[(l*c-s*f)*n,(r*f-a*c)*n,(a*s-r*l)*n,0],[(s*h-u*c)*n,(c*o-r*h)*n,(r*u-o*s)*n,0]],d=[],p=0;p<3;p++){for(i=e=0;i<3;i++)e+=t[3][i]*m[i][p];d.push(e)}return d.push(1),m.push(d),m}(e))[0][0],t[1][0],t[2][0],t[3][0]],[t[0][1],t[1][1],t[2][1],t[3][1]],[t[0][2],t[1][2],t[2][2],t[3][2]],[t[0][3],t[1][3],t[2][3],t[3][3]]])):[0,0,0,1],n=c[3].slice(0,3),(r=[]).push(c[0].slice(0,3)),(o=[]).push(Kt(r[0])),r[0]=Ht(r[0]),a=[],r.push(c[1].slice(0,3)),a.push(O(r[0],r[1])),r[1]=jt(r[1],r[0],1,-a[0]),o.push(Kt(r[1])),r[1]=Ht(r[1]),a[0]/=o[1],r.push(c[2].slice(0,3)),a.push(O(r[0],r[2])),r[2]=jt(r[2],r[0],1,-a[1]),a.push(O(r[1],r[2])),r[2]=jt(r[2],r[1],1,-a[2]),o.push(Kt(r[2])),r[2]=Ht(r[2]),a[1]/=o[2],a[2]/=o[2],l=r[2],u=[(u=r[1])[1]*l[2]-u[2]*l[1],u[2]*l[0]-u[0]*l[2],u[0]*l[1]-u[1]*l[0]],O(r[0],u)<0)for(i=0;i<3;i++)o[i]*=-1,r[i][0]*=-1,r[i][1]*=-1,r[i][2]*=-1;return[n,o,a,1e-4<(l=r[0][0]+r[1][1]+r[2][2]+1)?(s=.5/Math.sqrt(l),[(r[2][1]-r[1][2])*s,(r[0][2]-r[2][0])*s,(r[1][0]-r[0][1])*s,.25/s]):r[0][0]>r[1][1]&&r[0][0]>r[2][2]?[.25*(s=2*Math.sqrt(1+r[0][0]-r[1][1]-r[2][2])),(r[0][1]+r[1][0])/s,(r[0][2]+r[2][0])/s,(r[2][1]-r[1][2])/s]:r[1][1]>r[2][2]?(s=2*Math.sqrt(1+r[1][1]-r[0][0]-r[2][2]),[(r[0][1]+r[1][0])/s,.25*s,(r[1][2]+r[2][1])/s,(r[0][2]-r[2][0])/s]):(s=2*Math.sqrt(1+r[2][2]-r[0][0]-r[1][1]),[(r[0][2]+r[2][0])/s,(r[1][2]+r[2][1])/s,.25*s,(r[1][0]-r[0][1])/s]),t]},(y=Zt).dot=O,y.makeMatrixDecomposition=function(t){return[Q(zt(t))]},y.transformListToMatrix=zt,(_=Zt).consumeToken=Ot,_.consumeTrimmed=Ft,_.consumeRepeated=function(t,e,i){var n,r;for(t=Ft.bind(null,t),n=[];;){if(!(r=t(i)))return[n,i];if(n.push(r[0]),!(r=Ot(e,i=r[1]))||""==r[1])return[n,i];i=r[1]}},_.consumeParenthesised=function(t,e){for(var i=0,n=0;n<e.length&&(!/\s|,/.test(e[n])||0!=i);n++)if("("==e[n])i++;else if(")"==e[n]&&(0==--i&&n++,i<=0))break;return null==(t=t(e.substr(0,n)))?void 0:[t,e.substr(n)]},_.ignore=function(e){return function(t){t=e(t);return t&&(t[0]=void 0),t}},_.optional=function(e,i){return function(t){return e(t)||[i,t]}},_.consumeList=function(t,e){for(var i,n=[],r=0;r<t.length;r++){if(!(i=_.consumeTrimmed(t[r],e))||""==i[0])return;void 0!==i[0]&&n.push(i[0]),e=i[1]}if(""==e)return n},_.mergeNestedRepeated=Lt.bind(null,null),_.mergeWrappedNestedRepeated=Lt,_.mergeList=function(t,e,i){for(var n,r=[],o=[],a=[],s=0,u=0;u<i.length;u++)"function"==typeof i[u]?(n=i[u](t[s],e[s++]),r.push(n[0]),o.push(n[1]),a.push(n[2])):function(t){r.push(!1),o.push(!1),a.push(function(){return i[t]})}(u);return[r,o,function(t){for(var e="",i=0;i<t.length;i++)e+=a[i](t[i]);return e}]},g=Zt,y=function(t,e,i,n){function r(t){return{inset:t,color:[0,0,0,0],lengths:[{px:0},{px:0},{px:0},{px:0}]}}for(var o,a,s=[],u=[],l=0;l<i.length||l<n.length;l++)o=i[l]||r(n[l].inset),a=n[l]||r(i[l].inset),s.push(o),u.push(a);return g.mergeNestedRepeated(t,e,s,u)}.bind(null,function(n,t){for(var r,o,e,i,a,s,u;n.lengths.length<Math.max(n.lengths.length,t.lengths.length);)n.lengths.push({px:0});for(;t.lengths.length<Math.max(n.lengths.length,t.lengths.length);)t.lengths.push({px:0});if(n.inset==t.inset&&!!n.color==!!t.color){for(o=[],e=[[],0],i=[[],0],a=0;a<n.lengths.length;a++)s=g.mergeDimensions(n.lengths[a],t.lengths[a],2==a),e[0].push(s[0]),i[0].push(s[1]),o.push(s[2]);return n.color&&t.color&&(u=g.mergeColors(n.color,t.color),e[1]=u[0],i[1]=u[1],r=u[2]),[e,i,function(t){for(var e=n.inset?"inset ":" ",i=0;i<o.length;i++)e+=o[i](t[0][i])+" ";return r&&(e+=r(t[1])),e}]}},", "),g.addPropertiesHandler(function(t){if((t=g.consumeRepeated(Ct,/^,/,t))&&""==t[1])return t[0]},y,["box-shadow","text-shadow"]),(y=Zt).clamp=Nt,y.addPropertiesHandler(Dt,function(t,e){if(t.length==e.length)return[t,e,function(t){return t.map(Rt).join(" ")}]},["stroke-dasharray"]),y.addPropertiesHandler(C,Mt(0,1/0),["border-image-width","line-height"]),y.addPropertiesHandler(C,Mt(0,1),["opacity","shape-image-threshold"]),y.addPropertiesHandler(C,function(t,e){if(0!=t)return Mt(0,1/0)(t,e)},["flex-grow","flex-shrink"]),y.addPropertiesHandler(C,function(t,e){return[t,e,function(t){return Math.round(Nt(1,1/0,t))}]},["orphans","widows"]),y.addPropertiesHandler(C,function(t,e){return[t,e,Math.round]},["z-index"]),y.parseNumber=C,y.parseNumberList=Dt,y.mergeNumbers=function(t,e){return[t,e,Rt]},y.numberToString=Rt,Zt.addPropertiesHandler(String,function(e,i){if("visible"==e||"visible"==i)return[0,1,function(t){return t<=0?e:1<=t?i:"visible"}]},["visibility"]),f=Zt,(y=document.createElementNS("http://www.w3.org/1999/xhtml","canvas")).width=y.height=1,p=y.getContext("2d"),f.addPropertiesHandler(St,kt,["background-color","border-bottom-color","border-left-color","border-right-color","border-top-color","color","fill","flood-color","lighting-color","outline-color","stop-color","stroke","text-decoration-color"]),f.consumeColor=f.consumeParenthesised.bind(null,St),f.mergeColors=kt,u=Zt,y="px|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc",c=At.bind(null,new RegExp(y,"g")),y=At.bind(null,new RegExp(y+"|%","g")),h=At.bind(null,/deg|rad|grad|turn/g),u.parseLength=c,u.parseLengthOrPercent=y,u.consumeLengthOrPercent=u.consumeParenthesised.bind(null,y),u.parseAngle=h,u.mergeDimensions=Et,h=u.consumeParenthesised.bind(null,c),c=u.consumeRepeated.bind(void 0,h,/^/),X=u.consumeRepeated.bind(void 0,c,/^,/),u.consumeSizePairList=X,h=function(t){t=X(t);if(t&&""==t[1])return t[0]},c=u.mergeNestedRepeated.bind(void 0,Pt," "),l=u.mergeNestedRepeated.bind(void 0,c,","),u.mergeNonNegativeSizePair=c,u.addPropertiesHandler(h,l,["background-size"]),u.addPropertiesHandler(y,Pt,["border-bottom-width","border-image-width","border-left-width","border-right-width","border-top-width","flex-basis","font-size","height","line-height","max-height","max-width","outline-width","width"]),u.addPropertiesHandler(y,Et,["border-bottom-left-radius","border-bottom-right-radius","border-top-left-radius","border-top-right-radius","bottom","left","letter-spacing","margin-bottom","margin-left","margin-right","margin-top","min-height","min-width","outline-offset","padding-bottom","padding-left","padding-right","padding-top","perspective","right","shape-margin","stroke-dashoffset","text-indent","top","vertical-align","word-spacing"]),c=(r=Zt).mergeWrappedNestedRepeated.bind(null,function(t){return"rect("+t+")"},function(e,i){return"auto"==e||"auto"==i?[!0,!1,function(t){var t=t?e:i;return"auto"==t?"auto":(t=r.mergeDimensions(t,t))[2](t[0])}]:r.mergeDimensions(e,i)},", "),r.parseBox=wt,r.mergeBoxes=c,r.addPropertiesHandler(wt,c,["clip"]),A={matrix:["NNNNNN",[n=null,n,0,0,n,n,0,0,0,0,1,0,n,n,0,1],M],matrix3d:["NNNNNNNNNNNNNNNN",M],rotate:["A"],rotatex:["A"],rotatey:["A"],rotatez:["A"],rotate3d:["NNNA"],perspective:["L"],scale:["Nn",N([n,n,1]),M],scalex:["N",N([n,1,1]),N([n,1])],scaley:["N",N([1,n,1]),N([1,n])],scalez:["N",N([1,1,n])],scale3d:["NNN",M],skew:["Aa",null,M],skewx:["A",null,N([n,d={deg:0}])],skewy:["A",null,N([d,n])],translate:["Tt",N([n,n,m={px:0}]),M],translatex:["T",N([n,m,m]),N([n,m])],translatey:["T",N([m,n,m]),N([m,n])],translatez:["L",N([m,m,n])],translate3d:["TTL",M]},(x=Zt).addPropertiesHandler(_t,function(t,e){var i,n,r,o,a,s,u,l,c,h,f,m,d,p,g,_,y,b,v,T=x.makeMatrixDecomposition&&!0,w=!1;if(!t.length||!e.length)for(t.length||(w=!0,t=e,e=[]),i=0;i<t.length;i++)n=t[i].t,r=t[i].d,o="scale"==n.substr(0,5)?1:0,e.push({t:n,d:r.map(function(t){var e,i;if("number"==typeof t)return o;for(i in e={},t)e[i]=o;return e})});if(a=function(t,e){return"perspective"==t&&"perspective"==e||("matrix"==t||"matrix3d"==t)&&("matrix"==e||"matrix3d"==e)},s=[],u=[],l=[],t.length!=e.length){if(!T)return;s=[(c=yt(t,e))[0]],u=[c[1]],l=[["matrix",[c[2]]]]}else for(i=0;i<t.length;i++)if(h=t[i].t,f=e[i].t,m=t[i].d,d=e[i].d,p=A[h],g=A[f],a(h,f)){if(!T)return;c=yt([t[i]],[e[i]]),s.push(c[0]),u.push(c[1]),l.push(["matrix",[c[2]]])}else{if(h==f)n=h;else if(p[2]&&g[2]&&bt(h)==bt(f))n=bt(h),m=p[2](m),d=g[2](d);else{if(!p[1]||!g[1]||vt(h)!=vt(f)){if(!T)return;s=[(c=yt(t,e))[0]],u=[c[1]],l=[["matrix",[c[2]]]];break}n=vt(h),m=p[1](m),d=g[1](d)}for(_=[],y=[],b=[],v=0;v<m.length;v++)c=("number"==typeof m[v]?x.mergeNumbers:x.mergeDimensions)(m[v],d[v]),_[v]=c[0],y[v]=c[1],b.push(c[2]);s.push(_),u.push(y),l.push([n,b])}return w&&(w=s,s=u,u=w),[s,u,function(t){return t.map(function(t,i){t=t.map(function(t,e){return l[i][1][e](t)}).join(",");return"matrix"==l[i][0]&&16==t.split(",").length&&(l[i][0]="matrix3d"),l[i][0]+"("+t+")"}).join(" ")}]},["transform"]),x.transformToSvgMatrix=function(t){t=x.transformListToMatrix(_t(t));return"matrix("+D(t[0])+" "+D(t[1])+" "+D(t[4])+" "+D(t[5])+" "+D(t[12])+" "+D(t[13])+")"},(J=Zt).addPropertiesHandler(function(t){if(t=Number(t),!(isNaN(t)||t<100||900<t||t%100!=0))return t},function(t,e){return[t,e,gt]},["font-weight"]),$={left:{"%":0},center:{"%":50},right:{"%":100},top:{"%":0},bottom:{"%":100}},h=(s=Zt).mergeNestedRepeated.bind(null,s.mergeDimensions," "),s.addPropertiesHandler(dt.bind(null,3),h,["transform-origin"]),s.addPropertiesHandler(dt.bind(null,2),h,["perspective-origin"]),s.consumePosition=pt,s.mergeOffsetList=h,h=s.mergeNestedRepeated.bind(null,h,", "),s.addPropertiesHandler(function(t){if((t=s.consumeRepeated(pt,/^,/,t))&&""==t[1])return t[0]},h,["background-position","object-position"]),B=(i=Zt).consumeParenthesised.bind(null,i.parseLengthOrPercent),G=i.consumeRepeated.bind(void 0,B,/^/),l=i.mergeNestedRepeated.bind(void 0,i.mergeDimensions," "),V=i.mergeNestedRepeated.bind(void 0,l,","),i.addPropertiesHandler(function(t){var e=i.consumeToken(/^circle/,t);return e&&e[0]?["circle"].concat(i.consumeList([i.ignore(i.consumeToken.bind(void 0,/^\(/)),B,i.ignore(i.consumeToken.bind(void 0,/^at/)),i.consumePosition,i.ignore(i.consumeToken.bind(void 0,/^\)/))],e[1])):(e=i.consumeToken(/^ellipse/,t))&&e[0]?["ellipse"].concat(i.consumeList([i.ignore(i.consumeToken.bind(void 0,/^\(/)),G,i.ignore(i.consumeToken.bind(void 0,/^at/)),i.consumePosition,i.ignore(i.consumeToken.bind(void 0,/^\)/))],e[1])):(e=i.consumeToken(/^polygon/,t))&&e[0]?["polygon"].concat(i.consumeList([i.ignore(i.consumeToken.bind(void 0,/^\(/)),i.optional(i.consumeToken.bind(void 0,/^nonzero\s*,|^evenodd\s*,/),"nonzero,"),i.consumeSizePairList,i.ignore(i.consumeToken.bind(void 0,/^\)/))],e[1])):void 0},function(t,e){if(t[0]===e[0])return"circle"==t[0]?i.mergeList(t.slice(1),e.slice(1),["circle(",i.mergeDimensions," at ",i.mergeOffsetList,")"]):"ellipse"==t[0]?i.mergeList(t.slice(1),e.slice(1),["ellipse(",i.mergeNonNegativeSizePair," at ",i.mergeOffsetList,")"]):"polygon"==t[0]&&t[1]==e[1]?i.mergeList(t.slice(2),e.slice(2),["polygon(",t[1],V,")"]):void 0},["shape-outside"]),y=Zt,j={},U={},ft("transform",["webkitTransform","msTransform"]),ft("transformOrigin",["webkitTransformOrigin"]),ft("perspective",["webkitPerspective"]),ft("perspectiveOrigin",["webkitPerspectiveOrigin"]),y.propertyName=function(t){return j[t]||t},y.unprefixedPropertyName=function(t){return U[t]||t}}(),void 0===document.createElement("div").animate([]).oncancel&&(L=window.performance&&performance.now?function(){return performance.now()}:function(){return Date.now()},I=function(t,e,i){this.target=t,this.currentTime=e,this.timelineTime=i,this.type="cancel",this.bubbles=!1,this.cancelable=!1,this.currentTarget=t,this.defaultPrevented=!1,this.eventPhase=Event.AT_TARGET,this.timeStamp=Date.now()},q=window.Element.prototype.animate,window.Element.prototype.animate=function(t,e){var i,n,r,t=q.call(this,t,e);return t._cancelHandlers=[],t.oncancel=null,i=t.cancel,t.cancel=function(){i.call(this);var e=new I(this,null,L()),t=this._cancelHandlers.concat(this.oncancel?[this.oncancel]:[]);setTimeout(function(){t.forEach(function(t){t.call(e.target,e)})},0)},n=t.addEventListener,t.addEventListener=function(t,e){"function"==typeof e&&"cancel"==t?this._cancelHandlers.push(e):n.call(this,t,e)},r=t.removeEventListener,t.removeEventListener=function(t,e){var i;"cancel"==t?0<=(i=this._cancelHandlers.indexOf(e))&&this._cancelHandlers.splice(i,1):r.call(this,t,e)},t}),Yt),E=document.documentElement,Y=null,Z=!1;try{t="0"==getComputedStyle(E).getPropertyValue("opacity")?"1":"0",(Y=E.animate({opacity:[t,t]},{duration:1})).currentTime=0,Z=getComputedStyle(E).getPropertyValue("opacity")==t}catch(Q){}finally{Y&&Y.cancel()}Z||(X=window.Element.prototype.animate,window.Element.prototype.animate=function(t,e){return window.Symbol&&Symbol.iterator&&Array.prototype.from&&t[Symbol.iterator]&&(t=Array.from(t)),Array.isArray(t)||null===t||(t=Q.convertToArrayForm(t)),X.call(this,t,e)});var S=P;function tt(t){var e=S.timeline;e.currentTime=t,e._discardAnimations(),0==e._animations.length?k=!1:requestAnimationFrame(tt)}var k,R,et=window.requestAnimationFrame;window.requestAnimationFrame=function(e){return et(function(t){S.timeline._updateAnimationsPromises(),e(t),S.timeline._updateAnimationsPromises()})},S.AnimationTimeline=function(){this._animations=[],this.currentTime=void 0},S.AnimationTimeline.prototype={getAnimations:function(){return this._discardAnimations(),this._animations.slice()},_updateAnimationsPromises:function(){S.animationsWithPromises=S.animationsWithPromises.filter(function(t){return t._updatePromises()})},_discardAnimations:function(){this._updateAnimationsPromises(),this._animations=this._animations.filter(function(t){return"finished"!=t.playState&&"idle"!=t.playState})},_play:function(t){t=new S.Animation(t,this);return this._animations.push(t),S.restartWebAnimationsNextTick(),t._updatePromises(),t._animation.play(),t._updatePromises(),t},play:function(t){return t&&t.remove(),this._play(t)}},k=!1,S.restartWebAnimationsNextTick=function(){k||(k=!0,requestAnimationFrame(tt))},R=new S.AnimationTimeline,S.timeline=R;try{Object.defineProperty(window.document,"timeline",{configurable:!0,get:function(){return R}})}catch(t){}try{window.document.timeline=R}catch(t){}function it(t){return t._timing.delay+t.activeDuration+t._timing.endDelay}function N(t,e,i){this._id=i,this._parent=null,this.children=t||[],this._reparent(this.children),e=r.numericTimingToObject(e),this._timingInput=r.cloneTimingInput(e),this._timing=r.normalizeTimingInput(e,!0),this.timing=r.makeTiming(e,!0,this),"auto"===(this.timing._effect=this)._timing.duration&&(this._timing.duration=this.activeDuration)}function nt(t){t._registered||(t._registered=!0,i.push(t),n)||(n=!0,requestAnimationFrame(rt))}function rt(t){var e=i;i=[],e.sort(function(t,e){return t._sequenceNumber-e._sequenceNumber}),e=e.filter(function(t){t();var e=t._animation?t._animation.playState:"idle";return"running"!=e&&"pending"!=e&&(t._registered=!1),t._registered}),i.push.apply(i,e),i.length?(n=!0,requestAnimationFrame(rt)):n=!1}function ot(t){this._frames=a.normalizeKeyframes(t)}function at(){for(var t=!1;e.length;)e.shift()._updateChildren(),t=!0;return t}function st(t,e){return t in y&&y[t][e]||e}function ut(t){var e,i,n,r,o,a=[];for(e in t)if(!(e in["easing","offset","composite"]))for(i=t[e],r=(i=Array.isArray(i)?i:[i]).length,o=0;o<r;o++)(n={}).offset="offset"in t?t.offset:1==r?1:o/(r-1),"easing"in t&&(n.easing=t.easing),"composite"in t&&(n.composite=t.composite),n[e]=i[o],a.push(n);return a.sort(function(t,e){return t.offset-e.offset}),a}function lt(){this._delay=0,this._endDelay=0,this._fill="none",this._iterationStart=0,this._iterations=1,this._duration=0,this._playbackRate=1,this._direction="normal",this._easing="linear",this._easingFunction=A}function M(){return b.isDeprecated("Invalid timing inputs","2016-03-02","TypeError exceptions will be thrown instead.",!0)}function ct(e,t,i){var n=new lt;return t&&(n.fill="both",n.duration="auto"),"number"!=typeof e||isNaN(e)?void 0!==e&&Object.getOwnPropertyNames(e).forEach(function(t){"auto"==e[t]||!("number"!=typeof n[t]&&"duration"!=t||"number"==typeof e[t]&&!isNaN(e[t]))||"fill"==t&&-1==$.indexOf(e[t])||"direction"==t&&-1==J.indexOf(e[t])||"playbackRate"==t&&1!==e[t]&&b.isDeprecated("AnimationEffectTiming.playbackRate","2014-11-28","Use Animation.playbackRate instead.")||(n[t]=e[t])}):n.duration=e,n}function D(s,u,l,c){return s<0||1<s||l<0||1<l?A:function(t){function e(t,e,i){return 3*t*(1-i)*(1-i)*i+3*e*(1-i)*i*i+i*i*i}var i,n,r,o,a;if(t<=0)return(i=0)<s?i=u/s:!u&&0<l&&(i=c/l),i*t;if(1<=t)return i=0,l<1?i=(c-1)/(l-1):1==l&&s<1&&(i=(u-1)/(s-1)),1+i*(t-1);for(n=0,r=1;n<r;){if(a=e(s,l,o=(n+r)/2),Math.abs(t-a)<1e-5)return e(u,c,o);a<t?n=o:r=o}return e(u,c,o)}}function C(i,n){return function(t){var e;return 1<=t?1:(t+=n*(e=1/i))-t%e}}function ht(t){(T=T||document.createElement("div").style).animationTimingFunction="",T.animationTimingFunction=t;var e=T.animationTimingFunction;if(""==e&&M())throw new TypeError(t+" is not a valid value for easing");return e}function ft(t){var e;return"linear"==t?A:(e=j.exec(t))?D.apply(this,e.slice(1).map(Number)):(e=U.exec(t))?C(Number(e[1]),v):(e=B.exec(t))?C(Number(e[1]),{start:W,middle:H,end:v}[e[2]]):K[t]||A}function mt(t,e,i){var n;return null==e?G:(n=i.delay+t+i.endDelay,e<Math.min(i.delay,n)?w:e>=Math.min(i.delay+t,n)?x:V)}f=Yt,(m=P).animationsWithPromises=[],m.Animation=function(t,e){if(this.id="",t&&t._id&&(this.id=t._id),(this.effect=t)&&(t._animation=this),!e)throw new Error("Animation with null timeline is not supported");this._timeline=e,this._sequenceNumber=f.sequenceNumber++,this._holdTime=0,this._paused=!1,this._isGroup=!1,this._animation=null,this._childAnimations=[],this._callback=null,this._oldPlayState="idle",this._rebuildUnderlyingAnimation(),this._animation.cancel(),this._updatePromises()},m.Animation.prototype={_updatePromises:function(){var t=this._oldPlayState,e=this.playState;return this._readyPromise&&e!==t&&("idle"==e?(this._rejectReadyPromise(),this._readyPromise=void 0):"pending"==t?this._resolveReadyPromise():"pending"==e&&(this._readyPromise=void 0)),this._finishedPromise&&e!==t&&("idle"==e?(this._rejectFinishedPromise(),this._finishedPromise=void 0):"finished"==e?this._resolveFinishedPromise():"finished"==t&&(this._finishedPromise=void 0)),this._oldPlayState=this.playState,this._readyPromise||this._finishedPromise},_rebuildUnderlyingAnimation:function(){this._updatePromises();var t,e,i,n,r=!!this._animation;r&&(t=this.playbackRate,e=this._paused,i=this.startTime,n=this.currentTime,this._animation.cancel(),this._animation._wrapper=null,this._animation=null),(!this.effect||this.effect instanceof window.KeyframeEffect)&&(this._animation=m.newUnderlyingAnimationForKeyframeEffect(this.effect),m.bindAnimationForKeyframeEffect(this)),(this.effect instanceof window.SequenceEffect||this.effect instanceof window.GroupEffect)&&(