h.length?i.length:h.length,g=0;j>g;g++)b=h[g]=h[g]||this.dflt,c=i[g]=i[g]||this.dflt,m&&(k=b.indexOf(m),l=c.indexOf(m),k!==l&&(-1===l?h[g]=h[g].split(m).join(\"\"):-1===k&&(h[g]+=\" \"+m)));b=h.join(\", \"),c=i.join(\", \")}return ra(a,this.p,b,c,this.clrs,this.dflt,d,this.pr,e,f)},j.parse=function(a,b,c,d,f,g,h){return this.parseComplex(a.style,this.format(X(a,this.p,e,!1,this.dflt)),this.format(b),f,g)},g.registerSpecialProp=function(a,b,c){ua(a,{parser:function(a,d,e,f,g,h,i){var j=new pa(a,e,0,0,g,2,e,!1,c);return j.plugin=h,j.setRatio=b(a,d,f._tween,e),j},priority:c})},g.useSVGTransformAttr=m||n;var wa,xa=\"scaleX,scaleY,scaleZ,x,y,z,skewX,skewY,rotation,rotationX,rotationY,perspective,xPercent,yPercent\".split(\",\"),ya=V(\"transform\"),za=T+\"transform\",Aa=V(\"transformOrigin\"),Ba=null!==V(\"perspective\"),Ca=O.Transform=function(){this.perspective=parseFloat(g.defaultTransformPerspective)||0,this.force3D=g.defaultForce3D!==!1&&Ba?g.defaultForce3D||\"auto\":!1},Da=window.SVGElement,Ea=function(a,b,c){var d,e=K.createElementNS(\"http://www.w3.org/2000/svg\",a),f=/([a-z])([A-Z])/g;for(d in c)e.setAttributeNS(null,d.replace(f,\"$1-$2\").toLowerCase(),c[d]);return b.appendChild(e),e},Fa=K.documentElement,Ga=function(){var a,b,c,d=p||/Android/i.test(P)&&!window.chrome;return K.createElementNS&&!d&&(a=Ea(\"svg\",Fa),b=Ea(\"rect\",a,{width:100,height:50,x:100}),c=b.getBoundingClientRect().width,b.style[Aa]=\"50% 50%\",b.style[ya]=\"scaleX(0.5)\",d=c===b.getBoundingClientRect().width&&!(n&&Ba),Fa.removeChild(a)),d}(),Ha=function(a,b,c,d,e){var f,h,i,j,k,l,m,n,o,p,q,r,s,t,u=a._gsTransform,v=Ka(a,!0);u&&(s=u.xOrigin,t=u.yOrigin),(!d||(f=d.split(\" \")).length<2)&&(m=a.getBBox(),b=da(b).split(\" \"),f=[(-1!==b[0].indexOf(\"%\")?parseFloat(b[0])/100*m.width:parseFloat(b[0]))+m.x,(-1!==b[1].indexOf(\"%\")?parseFloat(b[1])/100*m.height:parseFloat(b[1]))+m.y]),c.xOrigin=j=parseFloat(f[0]),c.yOrigin=k=parseFloat(f[1]),d&&v!==Ja&&(l=v[0],m=v[1],n=v[2],o=v[3],p=v[4],q=v[5],r=l*o-m*n,h=j*(o/r)+k*(-n/r)+(n*q-o*p)/r,i=j*(-m/r)+k*(l/r)-(l*q-m*p)/r,j=c.xOrigin=f[0]=h,k=c.yOrigin=f[1]=i),u&&(e||e!==!1&&g.defaultSmoothOrigin!==!1?(h=j-s,i=k-t,u.xOffset+=h*v[0]+i*v[2]-h,u.yOffset+=h*v[1]+i*v[3]-i):u.xOffset=u.yOffset=0),a.setAttribute(\"data-svg-origin\",f.join(\" \"))},Ia=function(a){return!!(Da&&\"function\"==typeof a.getBBox&&a.getCTM&&(!a.parentNode||a.parentNode.getBBox&&a.parentNode.getCTM))},Ja=[1,0,0,1,0,0],Ka=function(a,b){var c,d,e,f,g,h=a._gsTransform||new Ca,i=1e5;if(ya?d=X(a,za,null,!0):a.currentStyle&&(d=a.currentStyle.filter.match(E),d=d&&4===d.length?[d[0].substr(4),Number(d[2].substr(4)),Number(d[1].substr(4)),d[3].substr(4),h.x||0,h.y||0].join(\",\"):\"\"),c=!d||\"none\"===d||\"matrix(1, 0, 0, 1, 0, 0)\"===d,(h.svg||a.getBBox&&Ia(a))&&(c&&-1!==(a.style[ya]+\"\").indexOf(\"matrix\")&&(d=a.style[ya],c=0),e=a.getAttribute(\"transform\"),c&&e&&(-1!==e.indexOf(\"matrix\")?(d=e,c=0):-1!==e.indexOf(\"translate\")&&(d=\"matrix(1,0,0,1,\"+e.match(/(?:\\-|\\b)[\\d\\-\\.e]+\\b/gi).join(\",\")+\")\",c=0))),c)return Ja;for(e=(d||\"\").match(/(?:\\-|\\b)[\\d\\-\\.e]+\\b/gi)||[],sa=e.length;--sa>-1;)f=Number(e[sa]),e[sa]=(g=f-(f|=0))?(g*i+(0>g?-.5:.5)|0)/i+f:f;return b&&e.length>6?[e[0],e[1],e[4],e[5],e[12],e[13]]:e},La=O.getTransform=function(a,c,d,f){if(a._gsTransform&&d&&!f)return a._gsTransform;var h,i,j,k,l,m,n=d?a._gsTransform||new Ca:new Ca,o=n.scaleX<0,p=2e-5,q=1e5,r=Ba?parseFloat(X(a,Aa,c,!1,\"0 0 0\").split(\" \")[2])||n.zOrigin||0:0,s=parseFloat(g.defaultTransformPerspective)||0;if(n.svg=!(!a.getBBox||!Ia(a)),n.svg&&(Ha(a,X(a,Aa,e,!1,\"50% 50%\")+\"\",n,a.getAttribute(\"data-svg-origin\")),wa=g.useSVGTransformAttr||Ga),h=Ka(a),h!==Ja){if(16===h.length){var t,u,v,w,x,y=h[0],z=h[1],A=h[2],B=h[3],C=h[4],D=h[5],E=h[6],F=h[7],G=h[8],H=h[9],J=h[10],K=h[12],L=h[13],M=h[14],N=h[11],O=Math.atan2(E,J);n.zOrigin&&(M=-n.zOrigin,K=G*M-h[12],L=H*M-h[13],M=J*M+n.zOrigin-h[14]),n.rotationX=O*I,O&&(w=Math.cos(-O),x=Math.sin(-O),t=C*w+G*x,u=D*w+H*x,v=E*w+J*x,G=C*-x+G*w,H=D*-x+H*w,J=E*-x+J*w,N=F*-x+N*w,C=t,D=u,E=v),O=Math.atan2(-A,J),n.rotationY=O*I,O&&(w=Math.cos(-O),x=Math.sin(-O),t=y*w-G*x,u=z*w-H*x,v=A*w-J*x,H=z*x+H*w,J=A*x+J*w,N=B*x+N*w,y=t,z=u,A=v),O=Math.atan2(z,y),n.rotation=O*I,O&&(w=Math.cos(-O),x=Math.sin(-O),y=y*w+C*x,u=z*w+D*x,D=z*-x+D*w,E=A*-x+E*w,z=u),n.rotationX&&Math.abs(n.rotationX)+Math.abs(n.rotation)>359.9&&(n.rotationX=n.rotation=0,n.rotationY=180-n.rotationY),n.scaleX=(Math.sqrt(y*y+z*z)*q+.5|0)/q,n.scaleY=(Math.sqrt(D*D+H*H)*q+.5|0)/q,n.scaleZ=(Math.sqrt(E*E+J*J)*q+.5|0)/q,n.skewX=0,n.perspective=N?1/(0>N?-N:N):0,n.x=K,n.y=L,n.z=M,n.svg&&(n.x-=n.xOrigin-(n.xOrigin*y-n.yOrigin*C),n.y-=n.yOrigin-(n.yOrigin*z-n.xOrigin*D))}else if((!Ba||f||!h.length||n.x!==h[4]||n.y!==h[5]||!n.rotationX&&!n.rotationY)&&(void 0===n.x||\"none\"!==X(a,\"display\",c))){var P=h.length>=6,Q=P?h[0]:1,R=h[1]||0,S=h[2]||0,T=P?h[3]:1;n.x=h[4]||0,n.y=h[5]||0,j=Math.sqrt(Q*Q+R*R),k=Math.sqrt(T*T+S*S),l=Q||R?Math.atan2(R,Q)*I:n.rotation||0,m=S||T?Math.atan2(S,T)*I+l:n.skewX||0,Math.abs(m)>90&&Math.abs(m)<270&&(o?(j*=-1,m+=0>=l?180:-180,l+=0>=l?180:-180):(k*=-1,m+=0>=m?180:-180)),n.scaleX=j,n.scaleY=k,n.rotation=l,n.skewX=m,Ba&&(n.rotationX=n.rotationY=n.z=0,n.perspective=s,n.scaleZ=1),n.svg&&(n.x-=n.xOrigin-(n.xOrigin*Q+n.yOrigin*S),n.y-=n.yOrigin-(n.xOrigin*R+n.yOrigin*T))}n.zOrigin=r;for(i in n)n[i]-p&&(n[i]=0)}return d&&(a._gsTransform=n,n.svg&&(wa&&a.style[ya]?b.delayedCall(.001,function(){Pa(a.style,ya)}):!wa&&a.getAttribute(\"transform\")&&b.delayedCall(.001,function(){a.removeAttribute(\"transform\")}))),n},Ma=function(a){var b,c,d=this.data,e=-d.rotation*H,f=e+d.skewX*H,g=1e5,h=(Math.cos(e)*d.scaleX*g|0)/g,i=(Math.sin(e)*d.scaleX*g|0)/g,j=(Math.sin(f)*-d.scaleY*g|0)/g,k=(Math.cos(f)*d.scaleY*g|0)/g,l=this.t.style,m=this.t.currentStyle;if(m){c=i,i=-j,j=-c,b=m.filter,l.filter=\"\";var n,o,q=this.t.offsetWidth,r=this.t.offsetHeight,s=\"absolute\"!==m.position,t=\"progid:DXImageTransform.Microsoft.Matrix(M11=\"+h+\", M12=\"+i+\", M21=\"+j+\", M22=\"+k,w=d.x+q*d.xPercent/100,x=d.y+r*d.yPercent/100;if(null!=d.ox&&(n=(d.oxp?q*d.ox*.01:d.ox)-q/2,o=(d.oyp?r*d.oy*.01:d.oy)-r/2,w+=n-(n*h+o*i),x+=o-(n*j+o*k)),s?(n=q/2,o=r/2,t+=\", Dx=\"+(n-(n*h+o*i)+w)+\", Dy=\"+(o-(n*j+o*k)+x)+\")\"):t+=\", sizingMethod='auto expand')\",-1!==b.indexOf(\"DXImageTransform.Microsoft.Matrix(\")?l.filter=b.replace(F,t):l.filter=t+\" \"+b,(0===a||1===a)&&1===h&&0===i&&0===j&&1===k&&(s&&-1===t.indexOf(\"Dx=0, Dy=0\")||v.test(b)&&100!==parseFloat(RegExp.$1)||-1===b.indexOf(b.indexOf(\"Alpha\"))&&l.removeAttribute(\"filter\")),!s){var y,z,A,B=8>p?1:-1;for(n=d.ieOffsetX||0,o=d.ieOffsetY||0,d.ieOffsetX=Math.round((q-((0>h?-h:h)*q+(0>i?-i:i)*r))/2+w),d.ieOffsetY=Math.round((r-((0>k?-k:k)*r+(0>j?-j:j)*q))/2+x),sa=0;4>sa;sa++)z=ba[sa],y=m[z],c=-1!==y.indexOf(\"px\")?parseFloat(y):Y(this.t,z,parseFloat(y),y.replace(u,\"\"))||0,A=c!==d[z]?2>sa?-d.ieOffsetX:-d.ieOffsetY:2>sa?n-d.ieOffsetX:o-d.ieOffsetY,l[z]=(d[z]=Math.round(c-A*(0===sa||2===sa?1:B)))+\"px\"}}},Na=O.set3DTransformRatio=O.setTransformRatio=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,o,p,q,r,s,t,u,v,w,x,y,z=this.data,A=this.t.style,B=z.rotation,C=z.rotationX,D=z.rotationY,E=z.scaleX,F=z.scaleY,G=z.scaleZ,I=z.x,J=z.y,K=z.z,L=z.svg,M=z.perspective,N=z.force3D;if(((1===a||0===a)&&\"auto\"===N&&(this.tween._totalTime===this.tween._totalDuration||!this.tween._totalTime)||!N)&&!K&&!M&&!D&&!C&&1===G||wa&&L||!Ba)return void(B||z.skewX||L?(B*=H,x=z.skewX*H,y=1e5,b=Math.cos(B)*E,e=Math.sin(B)*E,c=Math.sin(B-x)*-F,f=Math.cos(B-x)*F,x&&\"simple\"===z.skewType&&(s=Math.tan(x),s=Math.sqrt(1+s*s),c*=s,f*=s,z.skewY&&(b*=s,e*=s)),L&&(I+=z.xOrigin-(z.xOrigin*b+z.yOrigin*c)+z.xOffset,J+=z.yOrigin-(z.xOrigin*e+z.yOrigin*f)+z.yOffset,wa&&(z.xPercent||z.yPercent)&&(p=this.t.getBBox(),I+=.01*z.xPercent*p.width,J+=.01*z.yPercent*p.height),p=1e-6,p>I&&I>-p&&(I=0),p>J&&J>-p&&(J=0)),u=(b*y|0)/y+\",\"+(e*y|0)/y+\",\"+(c*y|0)/y+\",\"+(f*y|0)/y+\",\"+I+\",\"+J+\")\",L&&wa?this.t.setAttribute(\"transform\",\"matrix(\"+u):A[ya]=(z.xPercent||z.yPercent?\"translate(\"+z.xPercent+\"%,\"+z.yPercent+\"%) matrix(\":\"matrix(\")+u):A[ya]=(z.xPercent||z.yPercent?\"translate(\"+z.xPercent+\"%,\"+z.yPercent+\"%) matrix(\":\"matrix(\")+E+\",0,0,\"+F+\",\"+I+\",\"+J+\")\");if(n&&(p=1e-4,p>E&&E>-p&&(E=G=2e-5),p>F&&F>-p&&(F=G=2e-5),!M||z.z||z.rotationX||z.rotationY||(M=0)),B||z.skewX)B*=H,q=b=Math.cos(B),r=e=Math.sin(B),z.skewX&&(B-=z.skewX*H,q=Math.cos(B),r=Math.sin(B),\"simple\"===z.skewType&&(s=Math.tan(z.skewX*H),s=Math.sqrt(1+s*s),q*=s,r*=s,z.skewY&&(b*=s,e*=s))),c=-r,f=q;else{if(!(D||C||1!==G||M||L))return void(A[ya]=(z.xPercent||z.yPercent?\"translate(\"+z.xPercent+\"%,\"+z.yPercent+\"%) translate3d(\":\"translate3d(\")+I+\"px,\"+J+\"px,\"+K+\"px)\"+(1!==E||1!==F?\" scale(\"+E+\",\"+F+\")\":\"\"));b=f=1,c=e=0}j=1,d=g=h=i=k=l=0,m=M?-1/M:0,o=z.zOrigin,p=1e-6,v=\",\",w=\"0\",B=D*H,B&&(q=Math.cos(B),r=Math.sin(B),h=-r,k=m*-r,d=b*r,g=e*r,j=q,m*=q,b*=q,e*=q),B=C*H,B&&(q=Math.cos(B),r=Math.sin(B),s=c*q+d*r,t=f*q+g*r,i=j*r,l=m*r,d=c*-r+d*q,g=f*-r+g*q,j*=q,m*=q,c=s,f=t),1!==G&&(d*=G,g*=G,j*=G,m*=G),1!==F&&(c*=F,f*=F,i*=F,l*=F),1!==E&&(b*=E,e*=E,h*=E,k*=E),(o||L)&&(o&&(I+=d*-o,J+=g*-o,K+=j*-o+o),L&&(I+=z.xOrigin-(z.xOrigin*b+z.yOrigin*c)+z.xOffset,J+=z.yOrigin-(z.xOrigin*e+z.yOrigin*f)+z.yOffset),p>I&&I>-p&&(I=w),p>J&&J>-p&&(J=w),p>K&&K>-p&&(K=0)),u=z.xPercent||z.yPercent?\"translate(\"+z.xPercent+\"%,\"+z.yPercent+\"%) matrix3d(\":\"matrix3d(\",u+=(p>b&&b>-p?w:b)+v+(p>e&&e>-p?w:e)+v+(p>h&&h>-p?w:h),u+=v+(p>k&&k>-p?w:k)+v+(p>c&&c>-p?w:c)+v+(p>f&&f>-p?w:f),C||D||1!==G?(u+=v+(p>i&&i>-p?w:i)+v+(p>l&&l>-p?w:l)+v+(p>d&&d>-p?w:d),u+=v+(p>g&&g>-p?w:g)+v+(p>j&&j>-p?w:j)+v+(p>m&&m>-p?w:m)+v):u+=\",0,0,0,0,1,0,\",u+=I+v+J+v+K+v+(M?1+-K/M:1)+\")\",A[ya]=u};j=Ca.prototype,j.x=j.y=j.z=j.skewX=j.skewY=j.rotation=j.rotationX=j.rotationY=j.zOrigin=j.xPercent=j.yPercent=j.xOffset=j.yOffset=0,j.scaleX=j.scaleY=j.scaleZ=1,ua(\"transform,scale,scaleX,scaleY,scaleZ,x,y,z,rotation,rotationX,rotationY,rotationZ,skewX,skewY,shortRotation,shortRotationX,shortRotationY,shortRotationZ,transformOrigin,svgOrigin,transformPerspective,directionalRotation,parseTransform,force3D,skewType,xPercent,yPercent,smoothOrigin\",{parser:function(a,b,c,d,f,h,i){if(d._lastParsedTransform===i)return f;d._lastParsedTransform=i;var j,k,l,m,n,o,p,q,r,s,t=a._gsTransform,u=a.style,v=1e-6,w=xa.length,x=i,y={},z=\"transformOrigin\";if(i.display?(m=X(a,\"display\"),u.display=\"block\",j=La(a,e,!0,i.parseTransform),u.display=m):j=La(a,e,!0,i.parseTransform),d._transform=j,\"string\"==typeof x.transform&&ya)m=M.style,m[ya]=x.transform,m.display=\"block\",m.position=\"absolute\",K.body.appendChild(M),k=La(M,null,!1),K.body.removeChild(M),k.perspective||(k.perspective=j.perspective),null!=x.xPercent&&(k.xPercent=fa(x.xPercent,j.xPercent)),null!=x.yPercent&&(k.yPercent=fa(x.yPercent,j.yPercent));else if(\"object\"==typeof x){if(k={scaleX:fa(null!=x.scaleX?x.scaleX:x.scale,j.scaleX),scaleY:fa(null!=x.scaleY?x.scaleY:x.scale,j.scaleY),scaleZ:fa(x.scaleZ,j.scaleZ),x:fa(x.x,j.x),y:fa(x.y,j.y),z:fa(x.z,j.z),xPercent:fa(x.xPercent,j.xPercent),yPercent:fa(x.yPercent,j.yPercent),perspective:fa(x.transformPerspective,j.perspective)},q=x.directionalRotation,null!=q)if(\"object\"==typeof q)for(m in q)x[m]=q[m];else x.rotation=q;\"string\"==typeof x.x&&-1!==x.x.indexOf(\"%\")&&(k.x=0,k.xPercent=fa(x.x,j.xPercent)),\"string\"==typeof x.y&&-1!==x.y.indexOf(\"%\")&&(k.y=0,k.yPercent=fa(x.y,j.yPercent)),k.rotation=ga(\"rotation\"in x?x.rotation:\"shortRotation\"in x?x.shortRotation+\"_short\":\"rotationZ\"in x?x.rotationZ:j.rotation,j.rotation,\"rotation\",y),Ba&&(k.rotationX=ga(\"rotationX\"in x?x.rotationX:\"shortRotationX\"in x?x.shortRotationX+\"_short\":j.rotationX||0,j.rotationX,\"rotationX\",y),k.rotationY=ga(\"rotationY\"in x?x.rotationY:\"shortRotationY\"in x?x.shortRotationY+\"_short\":j.rotationY||0,j.rotationY,\"rotationY\",y)),k.skewX=null==x.skewX?j.skewX:ga(x.skewX,j.skewX),k.skewY=null==x.skewY?j.skewY:ga(x.skewY,j.skewY),(l=k.skewY-j.skewY)&&(k.skewX+=l,k.rotation+=l)}for(Ba&&null!=x.force3D&&(j.force3D=x.force3D,p=!0),j.skewType=x.skewType||j.skewType||g.defaultSkewType,o=j.force3D||j.z||j.rotationX||j.rotationY||k.z||k.rotationX||k.rotationY||k.perspective,o||null==x.scale||(k.scaleZ=1);--w>-1;)c=xa[w],n=k[c]-j[c],(n>v||-v>n||null!=x[c]||null!=J[c])&&(p=!0,f=new pa(j,c,j[c],n,f),c in y&&(f.e=y[c]),f.xs0=0,f.plugin=h,d._overwriteProps.push(f.n));return n=x.transformOrigin,j.svg&&(n||x.svgOrigin)&&(r=j.xOffset,s=j.yOffset,Ha(a,da(n),k,x.svgOrigin,x.smoothOrigin),f=qa(j,\"xOrigin\",(t?j:k).xOrigin,k.xOrigin,f,z),f=qa(j,\"yOrigin\",(t?j:k).yOrigin,k.yOrigin,f,z),(r!==j.xOffset||s!==j.yOffset)&&(f=qa(j,\"xOffset\",t?r:j.xOffset,j.xOffset,f,z),f=qa(j,\"yOffset\",t?s:j.yOffset,j.yOffset,f,z)),n=wa?null:\"0px 0px\"),(n||Ba&&o&&j.zOrigin)&&(ya?(p=!0,c=Aa,n=(n||X(a,c,e,!1,\"50% 50%\"))+\"\",f=new pa(u,c,0,0,f,-1,z),f.b=u[c],f.plugin=h,Ba?(m=j.zOrigin,n=n.split(\" \"),j.zOrigin=(n.length>2&&(0===m||\"0px\"!==n[2])?parseFloat(n[2]):m)||0,f.xs0=f.e=n[0]+\" \"+(n[1]||\"50%\")+\" 0px\",f=new pa(j,\"zOrigin\",0,0,f,-1,f.n),f.b=m,f.xs0=f.e=j.zOrigin):f.xs0=f.e=n):da(n+\"\",j)),p&&(d._transformType=j.svg&&wa||!o&&3!==this._transformType?2:3),f},prefix:!0}),ua(\"boxShadow\",{defaultValue:\"0px 0px 0px 0px #999\",prefix:!0,color:!0,multi:!0,keyword:\"inset\"}),ua(\"borderRadius\",{defaultValue:\"0px\",parser:function(a,b,c,f,g,h){b=this.format(b);var i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y=[\"borderTopLeftRadius\",\"borderTopRightRadius\",\"borderBottomRightRadius\",\"borderBottomLeftRadius\"],z=a.style;for(q=parseFloat(a.offsetWidth),r=parseFloat(a.offsetHeight),i=b.split(\" \"),j=0;jp?1:0))||\"\"):(p=parseFloat(n),s=n.substr((p+\"\").length)),\"\"===s&&(s=d[c]||t),s!==t&&(v=Y(a,\"borderLeft\",o,t),w=Y(a,\"borderTop\",o,t),\"%\"===s?(m=v/q*100+\"%\",l=w/r*100+\"%\"):\"em\"===s?(x=Y(a,\"borderLeft\",1,\"em\"),m=v/x+\"em\",l=w/x+\"em\"):(m=v+\"px\",l=w+\"px\"),u&&(n=parseFloat(m)+p+s,k=parseFloat(l)+p+s)),g=ra(z,y[j],m+\" \"+l,n+\" \"+k,!1,\"0px\",g);return g},prefix:!0,formatter:ma(\"0px 0px 0px 0px\",!1,!0)}),ua(\"backgroundPosition\",{\r\ndefaultValue:\"0 0\",parser:function(a,b,c,d,f,g){var h,i,j,k,l,m,n=\"background-position\",o=e||W(a,null),q=this.format((o?p?o.getPropertyValue(n+\"-x\")+\" \"+o.getPropertyValue(n+\"-y\"):o.getPropertyValue(n):a.currentStyle.backgroundPositionX+\" \"+a.currentStyle.backgroundPositionY)||\"0 0\"),r=this.format(b);if(-1!==q.indexOf(\"%\")!=(-1!==r.indexOf(\"%\"))&&(m=X(a,\"backgroundImage\").replace(B,\"\"),m&&\"none\"!==m)){for(h=q.split(\" \"),i=r.split(\" \"),N.setAttribute(\"src\",m),j=2;--j>-1;)q=h[j],k=-1!==q.indexOf(\"%\"),k!==(-1!==i[j].indexOf(\"%\"))&&(l=0===j?a.offsetWidth-N.width:a.offsetHeight-N.height,h[j]=k?parseFloat(q)/100*l+\"px\":parseFloat(q)/l*100+\"%\");q=h.join(\" \")}return this.parseComplex(a.style,q,r,f,g)},formatter:da}),ua(\"backgroundSize\",{defaultValue:\"0 0\",formatter:da}),ua(\"perspective\",{defaultValue:\"0px\",prefix:!0}),ua(\"perspectiveOrigin\",{defaultValue:\"50% 50%\",prefix:!0}),ua(\"transformStyle\",{prefix:!0}),ua(\"backfaceVisibility\",{prefix:!0}),ua(\"userSelect\",{prefix:!0}),ua(\"margin\",{parser:na(\"marginTop,marginRight,marginBottom,marginLeft\")}),ua(\"padding\",{parser:na(\"paddingTop,paddingRight,paddingBottom,paddingLeft\")}),ua(\"clip\",{defaultValue:\"rect(0px,0px,0px,0px)\",parser:function(a,b,c,d,f,g){var h,i,j;return 9>p?(i=a.currentStyle,j=8>p?\" \":\",\",h=\"rect(\"+i.clipTop+j+i.clipRight+j+i.clipBottom+j+i.clipLeft+\")\",b=this.format(b).split(\",\").join(j)):(h=this.format(X(a,this.p,e,!1,this.dflt)),b=this.format(b)),this.parseComplex(a.style,h,b,f,g)}}),ua(\"textShadow\",{defaultValue:\"0px 0px 0px #999\",color:!0,multi:!0}),ua(\"autoRound,strictUnits\",{parser:function(a,b,c,d,e){return e}}),ua(\"border\",{defaultValue:\"0px solid #000\",parser:function(a,b,c,d,f,g){return this.parseComplex(a.style,this.format(X(a,\"borderTopWidth\",e,!1,\"0px\")+\" \"+X(a,\"borderTopStyle\",e,!1,\"solid\")+\" \"+X(a,\"borderTopColor\",e,!1,\"#000\")),this.format(b),f,g)},color:!0,formatter:function(a){var b=a.split(\" \");return b[0]+\" \"+(b[1]||\"solid\")+\" \"+(a.match(la)||[\"#000\"])[0]}}),ua(\"borderWidth\",{parser:na(\"borderTopWidth,borderRightWidth,borderBottomWidth,borderLeftWidth\")}),ua(\"float,cssFloat,styleFloat\",{parser:function(a,b,c,d,e,f){var g=a.style,h=\"cssFloat\"in g?\"cssFloat\":\"styleFloat\";return new pa(g,h,0,0,e,-1,c,!1,0,g[h],b)}});var Oa=function(a){var b,c=this.t,d=c.filter||X(this.data,\"filter\")||\"\",e=this.s+this.c*a|0;100===e&&(-1===d.indexOf(\"atrix(\")&&-1===d.indexOf(\"radient(\")&&-1===d.indexOf(\"oader(\")?(c.removeAttribute(\"filter\"),b=!X(this.data,\"filter\")):(c.filter=d.replace(x,\"\"),b=!0)),b||(this.xn1&&(c.filter=d=d||\"alpha(opacity=\"+e+\")\"),-1===d.indexOf(\"pacity\")?0===e&&this.xn1||(c.filter=d+\" alpha(opacity=\"+e+\")\"):c.filter=d.replace(v,\"opacity=\"+e))};ua(\"opacity,alpha,autoAlpha\",{defaultValue:\"1\",parser:function(a,b,c,d,f,g){var h=parseFloat(X(a,\"opacity\",e,!1,\"1\")),i=a.style,j=\"autoAlpha\"===c;return\"string\"==typeof b&&\"=\"===b.charAt(1)&&(b=(\"-\"===b.charAt(0)?-1:1)*parseFloat(b.substr(2))+h),j&&1===h&&\"hidden\"===X(a,\"visibility\",e)&&0!==b&&(h=0),Q?f=new pa(i,\"opacity\",h,b-h,f):(f=new pa(i,\"opacity\",100*h,100*(b-h),f),f.xn1=j?1:0,i.zoom=1,f.type=2,f.b=\"alpha(opacity=\"+f.s+\")\",f.e=\"alpha(opacity=\"+(f.s+f.c)+\")\",f.data=a,f.plugin=g,f.setRatio=Oa),j&&(f=new pa(i,\"visibility\",0,0,f,-1,null,!1,0,0!==h?\"inherit\":\"hidden\",0===b?\"hidden\":\"inherit\"),f.xs0=\"inherit\",d._overwriteProps.push(f.n),d._overwriteProps.push(c)),f}});var Pa=function(a,b){b&&(a.removeProperty?((\"ms\"===b.substr(0,2)||\"webkit\"===b.substr(0,6))&&(b=\"-\"+b),a.removeProperty(b.replace(z,\"-$1\").toLowerCase())):a.removeAttribute(b))},Qa=function(a){if(this.t._gsClassPT=this,1===a||0===a){this.t.setAttribute(\"class\",0===a?this.b:this.e);for(var b=this.data,c=this.t.style;b;)b.v?c[b.p]=b.v:Pa(c,b.p),b=b._next;1===a&&this.t._gsClassPT===this&&(this.t._gsClassPT=null)}else this.t.getAttribute(\"class\")!==this.e&&this.t.setAttribute(\"class\",this.e)};ua(\"className\",{parser:function(a,b,d,f,g,h,i){var j,k,l,m,n,o=a.getAttribute(\"class\")||\"\",p=a.style.cssText;if(g=f._classNamePT=new pa(a,d,0,0,g,2),g.setRatio=Qa,g.pr=-11,c=!0,g.b=o,k=$(a,e),l=a._gsClassPT){for(m={},n=l.data;n;)m[n.p]=1,n=n._next;l.setRatio(1)}return a._gsClassPT=g,g.e=\"=\"!==b.charAt(1)?b:o.replace(new RegExp(\"\\\\s*\\\\b\"+b.substr(2)+\"\\\\b\"),\"\")+(\"+\"===b.charAt(0)?\" \"+b.substr(2):\"\"),a.setAttribute(\"class\",g.e),j=_(a,k,$(a),i,m),a.setAttribute(\"class\",o),g.data=j.firstMPT,a.style.cssText=p,g=g.xfirst=f.parse(a,j.difs,g,h)}});var Ra=function(a){if((1===a||0===a)&&this.data._totalTime===this.data._totalDuration&&\"isFromStart\"!==this.data.data){var b,c,d,e,f,g=this.t.style,h=i.transform.parse;if(\"all\"===this.e)g.cssText=\"\",e=!0;else for(b=this.e.split(\" \").join(\"\").split(\",\"),d=b.length;--d>-1;)c=b[d],i[c]&&(i[c].parse===h?e=!0:c=\"transformOrigin\"===c?Aa:i[c].p),Pa(g,c);e&&(Pa(g,ya),f=this.t._gsTransform,f&&(f.svg&&(this.t.removeAttribute(\"data-svg-origin\"),this.t.removeAttribute(\"transform\")),delete this.t._gsTransform))}};for(ua(\"clearProps\",{parser:function(a,b,d,e,f){return f=new pa(a,d,0,0,f,2),f.setRatio=Ra,f.e=b,f.pr=-10,f.data=e._tween,c=!0,f}}),j=\"bezier,throwProps,physicsProps,physics2D\".split(\",\"),sa=j.length;sa--;)va(j[sa]);j=g.prototype,j._firstPT=j._lastParsedTransform=j._transform=null,j._onInitTween=function(a,b,h){if(!a.nodeType)return!1;this._target=a,this._tween=h,this._vars=b,k=b.autoRound,c=!1,d=b.suffixMap||g.suffixMap,e=W(a,\"\"),f=this._overwriteProps;var j,n,p,q,r,s,t,u,v,x=a.style;if(l&&\"\"===x.zIndex&&(j=X(a,\"zIndex\",e),(\"auto\"===j||\"\"===j)&&this._addLazySet(x,\"zIndex\",0)),\"string\"==typeof b&&(q=x.cssText,j=$(a,e),x.cssText=q+\";\"+b,j=_(a,j,$(a)).difs,!Q&&w.test(b)&&(j.opacity=parseFloat(RegExp.$1)),b=j,x.cssText=q),b.className?this._firstPT=n=i.className.parse(a,b.className,\"className\",this,null,null,b):this._firstPT=n=this.parse(a,b,null),this._transformType){for(v=3===this._transformType,ya?m&&(l=!0,\"\"===x.zIndex&&(t=X(a,\"zIndex\",e),(\"auto\"===t||\"\"===t)&&this._addLazySet(x,\"zIndex\",0)),o&&this._addLazySet(x,\"WebkitBackfaceVisibility\",this._vars.WebkitBackfaceVisibility||(v?\"visible\":\"hidden\"))):x.zoom=1,p=n;p&&p._next;)p=p._next;u=new pa(a,\"transform\",0,0,null,2),this._linkCSSP(u,null,p),u.setRatio=ya?Na:Ma,u.data=this._transform||La(a,e,!0),u.tween=h,u.pr=-1,f.pop()}if(c){for(;n;){for(s=n._next,p=q;p&&p.pr>n.pr;)p=p._next;(n._prev=p?p._prev:r)?n._prev._next=n:q=n,(n._next=p)?p._prev=n:r=n,n=s}this._firstPT=q}return!0},j.parse=function(a,b,c,f){var g,h,j,l,m,n,o,p,q,r,s=a.style;for(g in b)n=b[g],h=i[g],h?c=h.parse(a,n,g,this,c,f,b):(m=X(a,g,e)+\"\",q=\"string\"==typeof n,\"color\"===g||\"fill\"===g||\"stroke\"===g||-1!==g.indexOf(\"Color\")||q&&y.test(n)?(q||(n=ja(n),n=(n.length>3?\"rgba(\":\"rgb(\")+n.join(\",\")+\")\"),c=ra(s,g,m,n,!0,\"transparent\",c,0,f)):!q||-1===n.indexOf(\" \")&&-1===n.indexOf(\",\")?(j=parseFloat(m),o=j||0===j?m.substr((j+\"\").length):\"\",(\"\"===m||\"auto\"===m)&&(\"width\"===g||\"height\"===g?(j=ca(a,g,e),o=\"px\"):\"left\"===g||\"top\"===g?(j=Z(a,g,e),o=\"px\"):(j=\"opacity\"!==g?0:1,o=\"\")),r=q&&\"=\"===n.charAt(1),r?(l=parseInt(n.charAt(0)+\"1\",10),n=n.substr(2),l*=parseFloat(n),p=n.replace(u,\"\")):(l=parseFloat(n),p=q?n.replace(u,\"\"):\"\"),\"\"===p&&(p=g in d?d[g]:o),n=l||0===l?(r?l+j:l)+p:b[g],o!==p&&\"\"!==p&&(l||0===l)&&j&&(j=Y(a,g,j,o),\"%\"===p?(j/=Y(a,g,100,\"%\")/100,b.strictUnits!==!0&&(m=j+\"%\")):\"em\"===p||\"rem\"===p||\"vw\"===p||\"vh\"===p?j/=Y(a,g,1,p):\"px\"!==p&&(l=Y(a,g,l,p),p=\"px\"),r&&(l||0===l)&&(n=l+j+p)),r&&(l+=j),!j&&0!==j||!l&&0!==l?void 0!==s[g]&&(n||n+\"\"!=\"NaN\"&&null!=n)?(c=new pa(s,g,l||j||0,0,c,-1,g,!1,0,m,n),c.xs0=\"none\"!==n||\"display\"!==g&&-1===g.indexOf(\"Style\")?n:m):S(\"invalid \"+g+\" tween value: \"+b[g]):(c=new pa(s,g,j,l-j,c,0,g,k!==!1&&(\"px\"===p||\"zIndex\"===g),0,m,n),c.xs0=p)):c=ra(s,g,m,n,!0,null,c,0,f)),f&&c&&!c.plugin&&(c.plugin=f);return c},j.setRatio=function(a){var b,c,d,e=this._firstPT,f=1e-6;if(1!==a||this._tween._time!==this._tween._duration&&0!==this._tween._time)if(a||this._tween._time!==this._tween._duration&&0!==this._tween._time||this._tween._rawPrevTime===-1e-6)for(;e;){if(b=e.c*a+e.s,e.r?b=Math.round(b):f>b&&b>-f&&(b=0),e.type)if(1===e.type)if(d=e.l,2===d)e.t[e.p]=e.xs0+b+e.xs1+e.xn1+e.xs2;else if(3===d)e.t[e.p]=e.xs0+b+e.xs1+e.xn1+e.xs2+e.xn2+e.xs3;else if(4===d)e.t[e.p]=e.xs0+b+e.xs1+e.xn1+e.xs2+e.xn2+e.xs3+e.xn3+e.xs4;else if(5===d)e.t[e.p]=e.xs0+b+e.xs1+e.xn1+e.xs2+e.xn2+e.xs3+e.xn3+e.xs4+e.xn4+e.xs5;else{for(c=e.xs0+b+e.xs1,d=1;d-1;)Ta(a[e],b,c);else for(d=a.childNodes,e=d.length;--e>-1;)f=d[e],g=f.type,f.style&&(b.push($(f)),c&&c.push(f)),1!==g&&9!==g&&11!==g||!f.childNodes.length||Ta(f,b,c)};return g.cascadeTo=function(a,c,d){var e,f,g,h,i=b.to(a,c,d),j=[i],k=[],l=[],m=[],n=b._internals.reservedProps;for(a=i._targets||i.target,Ta(a,k,m),i.render(c,!0,!0),Ta(a,l),i.render(0,!0,!0),i._enabled(!0),e=m.length;--e>-1;)if(f=_(m[e],k[e],l[e]),f.firstMPT){f=f.difs;for(g in d)n[g]&&(f[g]=d[g]);h={};for(g in f)h[g]=k[e][g];j.push(b.fromTo(m[e],c,h,f))}return j},a.activate([g]),g},!0),function(){var a=_gsScope._gsDefine.plugin({propName:\"roundProps\",version:\"1.5\",priority:-1,API:2,init:function(a,b,c){return this._tween=c,!0}}),b=function(a){for(;a;)a.f||a.blob||(a.r=1),a=a._next},c=a.prototype;c._onInitAllProps=function(){for(var a,c,d,e=this._tween,f=e.vars.roundProps.join?e.vars.roundProps:e.vars.roundProps.split(\",\"),g=f.length,h={},i=e._propLookup.roundProps;--g>-1;)h[f[g]]=1;for(g=f.length;--g>-1;)for(a=f[g],c=e._firstPT;c;)d=c._next,c.pg?c.t._roundProps(h,!0):c.n===a&&(2===c.f&&c.t?b(c.t._firstPT):(this._add(c.t,a,c.s,c.c),d&&(d._prev=c._prev),c._prev?c._prev._next=d:e._firstPT===c&&(e._firstPT=d),c._next=c._prev=null,e._propLookup[a]=i)),c=d;return!1},c._add=function(a,b,c,d){this._addTween(a,b,c,c+d,b,!0),this._overwriteProps.push(b)}}(),function(){_gsScope._gsDefine.plugin({propName:\"attr\",API:2,version:\"0.5.0\",init:function(a,b,c){var d;if(\"function\"!=typeof a.setAttribute)return!1;for(d in b)this._addTween(a,\"setAttribute\",a.getAttribute(d)+\"\",b[d]+\"\",d,!1,d),this._overwriteProps.push(d);return!0}})}(),_gsScope._gsDefine.plugin({propName:\"directionalRotation\",version:\"0.2.1\",API:2,init:function(a,b,c){\"object\"!=typeof b&&(b={rotation:b}),this.finals={};var d,e,f,g,h,i,j=b.useRadians===!0?2*Math.PI:360,k=1e-6;for(d in b)\"useRadians\"!==d&&(i=(b[d]+\"\").split(\"_\"),e=i[0],f=parseFloat(\"function\"!=typeof a[d]?a[d]:a[d.indexOf(\"set\")||\"function\"!=typeof a[\"get\"+d.substr(3)]?d:\"get\"+d.substr(3)]()),g=this.finals[d]=\"string\"==typeof e&&\"=\"===e.charAt(1)?f+parseInt(e.charAt(0)+\"1\",10)*Number(e.substr(2)):Number(e)||0,h=g-f,i.length&&(e=i.join(\"_\"),-1!==e.indexOf(\"short\")&&(h%=j,h!==h%(j/2)&&(h=0>h?h+j:h-j)),-1!==e.indexOf(\"_cw\")&&0>h?h=(h+9999999999*j)%j-(h/j|0)*j:-1!==e.indexOf(\"ccw\")&&h>0&&(h=(h-9999999999*j)%j-(h/j|0)*j)),(h>k||-k>h)&&(this._addTween(a,d,f,f+h,d),this._overwriteProps.push(d)));return!0},set:function(a){var b;if(1!==a)this._super.setRatio.call(this,a);else for(b=this._firstPT;b;)b.f?b.t[b.p](this.finals[b.p]):b.t[b.p]=this.finals[b.p],b=b._next}})._autoCSS=!0,_gsScope._gsDefine(\"easing.Back\",[\"easing.Ease\"],function(a){var b,c,d,e=_gsScope.GreenSockGlobals||_gsScope,f=e.com.greensock,g=2*Math.PI,h=Math.PI/2,i=f._class,j=function(b,c){var d=i(\"easing.\"+b,function(){},!0),e=d.prototype=new a;return e.constructor=d,e.getRatio=c,d},k=a.register||function(){},l=function(a,b,c,d,e){var f=i(\"easing.\"+a,{easeOut:new b,easeIn:new c,easeInOut:new d},!0);return k(f,a),f},m=function(a,b,c){this.t=a,this.v=b,c&&(this.next=c,c.prev=this,this.c=c.v-b,this.gap=c.t-a)},n=function(b,c){var d=i(\"easing.\"+b,function(a){this._p1=a||0===a?a:1.70158,this._p2=1.525*this._p1},!0),e=d.prototype=new a;return e.constructor=d,e.getRatio=c,e.config=function(a){return new d(a)},d},o=l(\"Back\",n(\"BackOut\",function(a){return(a-=1)*a*((this._p1+1)*a+this._p1)+1}),n(\"BackIn\",function(a){return a*a*((this._p1+1)*a-this._p1)}),n(\"BackInOut\",function(a){return(a*=2)<1?.5*a*a*((this._p2+1)*a-this._p2):.5*((a-=2)*a*((this._p2+1)*a+this._p2)+2)})),p=i(\"easing.SlowMo\",function(a,b,c){b=b||0===b?b:.7,null==a?a=.7:a>1&&(a=1),this._p=1!==a?b:0,this._p1=(1-a)/2,this._p2=a,this._p3=this._p1+this._p2,this._calcEnd=c===!0},!0),q=p.prototype=new a;return q.constructor=p,q.getRatio=function(a){var b=a+(.5-a)*this._p;return athis._p3?this._calcEnd?1-(a=(a-this._p3)/this._p1)*a:b+(a-b)*(a=(a-this._p3)/this._p1)*a*a*a:this._calcEnd?1:b},p.ease=new p(.7,.7),q.config=p.config=function(a,b,c){return new p(a,b,c)},b=i(\"easing.SteppedEase\",function(a){a=a||1,this._p1=1/a,this._p2=a+1},!0),q=b.prototype=new a,q.constructor=b,q.getRatio=function(a){return 0>a?a=0:a>=1&&(a=.999999999),(this._p2*a>>0)*this._p1},q.config=b.config=function(a){return new b(a)},c=i(\"easing.RoughEase\",function(b){b=b||{};for(var c,d,e,f,g,h,i=b.taper||\"none\",j=[],k=0,l=0|(b.points||20),n=l,o=b.randomize!==!1,p=b.clamp===!0,q=b.template instanceof a?b.template:null,r=\"number\"==typeof b.strength?.4*b.strength:.4;--n>-1;)c=o?Math.random():1/l*n,d=q?q.getRatio(c):c,\"none\"===i?e=r:\"out\"===i?(f=1-c,e=f*f*r):\"in\"===i?e=c*c*r:.5>c?(f=2*c,e=f*f*.5*r):(f=2*(1-c),e=f*f*.5*r),o?d+=Math.random()*e-.5*e:n%2?d+=.5*e:d-=.5*e,p&&(d>1?d=1:0>d&&(d=0)),j[k++]={x:c,y:d};for(j.sort(function(a,b){return a.x-b.x}),h=new m(1,1,null),n=l;--n>-1;)g=j[n],h=new m(g.x,g.y,h);this._prev=new m(0,0,0!==h.t?h:h.next)},!0),q=c.prototype=new a,q.constructor=c,q.getRatio=function(a){var b=this._prev;if(a>b.t){for(;b.next&&a>=b.t;)b=b.next;b=b.prev}else for(;b.prev&&a<=b.t;)b=b.prev;return this._prev=b,b.v+(a-b.t)/b.gap*b.c},q.config=function(a){return new c(a)},c.ease=new c,l(\"Bounce\",j(\"BounceOut\",function(a){return 1/2.75>a?7.5625*a*a:2/2.75>a?7.5625*(a-=1.5/2.75)*a+.75:2.5/2.75>a?7.5625*(a-=2.25/2.75)*a+.9375:7.5625*(a-=2.625/2.75)*a+.984375}),j(\"BounceIn\",function(a){return(a=1-a)<1/2.75?1-7.5625*a*a:2/2.75>a?1-(7.5625*(a-=1.5/2.75)*a+.75):2.5/2.75>a?1-(7.5625*(a-=2.25/2.75)*a+.9375):1-(7.5625*(a-=2.625/2.75)*a+.984375)}),j(\"BounceInOut\",function(a){var b=.5>a;return a=b?1-2*a:2*a-1,a=1/2.75>a?7.5625*a*a:2/2.75>a?7.5625*(a-=1.5/2.75)*a+.75:2.5/2.75>a?7.5625*(a-=2.25/2.75)*a+.9375:7.5625*(a-=2.625/2.75)*a+.984375,b?.5*(1-a):.5*a+.5})),l(\"Circ\",j(\"CircOut\",function(a){return Math.sqrt(1-(a-=1)*a)}),j(\"CircIn\",function(a){return-(Math.sqrt(1-a*a)-1)}),j(\"CircInOut\",function(a){return(a*=2)<1?-.5*(Math.sqrt(1-a*a)-1):.5*(Math.sqrt(1-(a-=2)*a)+1)})),d=function(b,c,d){var e=i(\"easing.\"+b,function(a,b){this._p1=a>=1?a:1,this._p2=(b||d)/(1>a?a:1),this._p3=this._p2/g*(Math.asin(1/this._p1)||0),this._p2=g/this._p2},!0),f=e.prototype=new a;return f.constructor=e,f.getRatio=c,f.config=function(a,b){return new e(a,b)},e},l(\"Elastic\",d(\"ElasticOut\",function(a){return this._p1*Math.pow(2,-10*a)*Math.sin((a-this._p3)*this._p2)+1},.3),d(\"ElasticIn\",function(a){return-(this._p1*Math.pow(2,10*(a-=1))*Math.sin((a-this._p3)*this._p2))},.3),d(\"ElasticInOut\",function(a){return(a*=2)<1?-.5*(this._p1*Math.pow(2,10*(a-=1))*Math.sin((a-this._p3)*this._p2)):this._p1*Math.pow(2,-10*(a-=1))*Math.sin((a-this._p3)*this._p2)*.5+1},.45)),l(\"Expo\",j(\"ExpoOut\",function(a){return 1-Math.pow(2,-10*a)}),j(\"ExpoIn\",function(a){return Math.pow(2,10*(a-1))-.001}),j(\"ExpoInOut\",function(a){return(a*=2)<1?.5*Math.pow(2,10*(a-1)):.5*(2-Math.pow(2,-10*(a-1)))})),l(\"Sine\",j(\"SineOut\",function(a){return Math.sin(a*h)}),j(\"SineIn\",function(a){return-Math.cos(a*h)+1}),j(\"SineInOut\",function(a){return-.5*(Math.cos(Math.PI*a)-1)})),i(\"easing.EaseLookup\",{find:function(b){return a.map[b]}},!0),k(e.SlowMo,\"SlowMo\",\"ease,\"),k(c,\"RoughEase\",\"ease,\"),k(b,\"SteppedEase\",\"ease,\"),o},!0)}),_gsScope._gsDefine&&_gsScope._gsQueue.pop()(),function(a,b){\"use strict\";var c=a.GreenSockGlobals=a.GreenSockGlobals||a;if(!c.TweenLite){var d,e,f,g,h,i=function(a){var b,d=a.split(\".\"),e=c;for(b=0;b-1;)(k=o[e[r]]||new p(e[r],[])).gsClass?(h[r]=k.gsClass,s--):j&&k.sc.push(this);if(0===s&&f)for(l=(\"com.greensock.\"+d).split(\".\"),m=l.pop(),n=i(l.join(\".\"))[m]=this.gsClass=f.apply(f,h),g&&(c[m]=n,q=\"undefined\"!=typeof module&&module.exports,!q&&\"function\"==typeof define&&define.amd?define((a.GreenSockAMDPath?a.GreenSockAMDPath+\"/\":\"\")+d.split(\".\").pop(),[],function(){return n}):d===b&&q&&(module.exports=n)),r=0;r-1;)for(f=i[k],e=d?r(\"easing.\"+f,null,!0):j.easing[f]||{},g=l.length;--g>-1;)h=l[g],v[f+\".\"+h]=v[h+f]=e[h]=a.getRatio?a:a[h]||new a};for(f=u.prototype,f._calcEnd=!1,f.getRatio=function(a){if(this._func)return this._params[0]=a,this._func.apply(null,this._params);var b=this._type,c=this._power,d=1===b?1-a:2===b?a:.5>a?2*a:2*(1-a);return 1===c?d*=d:2===c?d*=d*d:3===c?d*=d*d*d:4===c&&(d*=d*d*d*d),1===b?1-d:2===b?d:.5>a?d/2:1-d/2},d=[\"Linear\",\"Quad\",\"Cubic\",\"Quart\",\"Quint,Strong\"],e=d.length;--e>-1;)f=d[e]+\",Power\"+e,w(new u(null,null,1,e),f,\"easeOut\",!0),w(new u(null,null,2,e),f,\"easeIn\"+(0===e?\",easeNone\":\"\")),w(new u(null,null,3,e),f,\"easeInOut\");v.linear=j.easing.Linear.easeIn,v.swing=j.easing.Quad.easeInOut;var x=r(\"events.EventDispatcher\",function(a){this._listeners={},this._eventTarget=a||this});f=x.prototype,f.addEventListener=function(a,b,c,d,e){e=e||0;var f,i,j=this._listeners[a],k=0;for(null==j&&(this._listeners[a]=j=[]),i=j.length;--i>-1;)f=j[i],f.c===b&&f.s===c?j.splice(i,1):0===k&&f.pr-1;)if(d[c].c===b)return void d.splice(c,1)},f.dispatchEvent=function(a){var b,c,d,e=this._listeners[a];if(e)for(b=e.length,c=this._eventTarget;--b>-1;)d=e[b],d&&(d.up?d.c.call(d.s||c,{type:a,target:c}):d.c.call(d.s||c))};var y=a.requestAnimationFrame,z=a.cancelAnimationFrame,A=Date.now||function(){return(new Date).getTime()},B=A();for(d=[\"ms\",\"moz\",\"webkit\",\"o\"],e=d.length;--e>-1&&!y;)y=a[d[e]+\"RequestAnimationFrame\"],z=a[d[e]+\"CancelAnimationFrame\"]||a[d[e]+\"CancelRequestAnimationFrame\"];r(\"Ticker\",function(a,b){var c,d,e,f,i,j=this,l=A(),n=b!==!1&&y?\"auto\":!1,o=500,p=33,q=\"tick\",r=function(a){var b,g,h=A()-B;h>o&&(l+=h-p),B+=h,j.time=(B-l)/1e3,b=j.time-i,(!c||b>0||a===!0)&&(j.frame++,i+=b+(b>=f?.004:f-b),g=!0),a!==!0&&(e=d(r)),g&&j.dispatchEvent(q)};x.call(j),j.time=j.frame=0,j.tick=function(){r(!0)},j.lagSmoothing=function(a,b){o=a||1/k,p=Math.min(b,o,0)},j.sleep=function(){null!=e&&(n&&z?z(e):clearTimeout(e),d=m,e=null,j===g&&(h=!1))},j.wake=function(a){null!==e?j.sleep():a?l+=-B+(B=A()):j.frame>10&&(B=A()-o+5),d=0===c?m:n&&y?y:function(a){return setTimeout(a,1e3*(i-j.time)+1|0)},j===g&&(h=!0),r(2)},j.fps=function(a){return arguments.length?(c=a,f=1/(c||60),i=this.time+f,void j.wake()):c},j.useRAF=function(a){return arguments.length?(j.sleep(),n=a,void j.fps(c)):n},j.fps(a),setTimeout(function(){\"auto\"===n&&j.frame<5&&\"hidden\"!==document.visibilityState&&j.useRAF(!1)},1500)}),f=j.Ticker.prototype=new j.events.EventDispatcher,f.constructor=j.Ticker;var C=r(\"core.Animation\",function(a,b){if(this.vars=b=b||{},this._duration=this._totalDuration=a||0,this._delay=Number(b.delay)||0,this._timeScale=1,this._active=b.immediateRender===!0,this.data=b.data,this._reversed=b.reversed===!0,V){h||g.wake();var c=this.vars.useFrames?U:V;c.add(this,c._time),this.vars.paused&&this.paused(!0)}});g=C.ticker=new j.Ticker,f=C.prototype,f._dirty=f._gc=f._initted=f._paused=!1,f._totalTime=f._time=0,f._rawPrevTime=-1,f._next=f._last=f._onUpdate=f._timeline=f.timeline=null,f._paused=!1;var D=function(){h&&A()-B>2e3&&g.wake(),setTimeout(D,2e3)};D(),f.play=function(a,b){return null!=a&&this.seek(a,b),this.reversed(!1).paused(!1)},f.pause=function(a,b){return null!=a&&this.seek(a,b),this.paused(!0)},f.resume=function(a,b){return null!=a&&this.seek(a,b),this.paused(!1)},f.seek=function(a,b){return this.totalTime(Number(a),b!==!1)},f.restart=function(a,b){return this.reversed(!1).paused(!1).totalTime(a?-this._delay:0,b!==!1,!0)},f.reverse=function(a,b){return null!=a&&this.seek(a||this.totalDuration(),b),this.reversed(!0).paused(!1)},f.render=function(a,b,c){},f.invalidate=function(){return this._time=this._totalTime=0,this._initted=this._gc=!1,this._rawPrevTime=-1,(this._gc||!this.timeline)&&this._enabled(!0),this},f.isActive=function(){var a,b=this._timeline,c=this._startTime;return!b||!this._gc&&!this._paused&&b.isActive()&&(a=b.rawTime())>=c&&a-1;)\"{self}\"===a[b]&&(c[b]=this);return c},f._callback=function(a){var b=this.vars;b[a].apply(b[a+\"Scope\"]||b.callbackScope||this,b[a+\"Params\"]||t)},f.eventCallback=function(a,b,c,d){if(\"on\"===(a||\"\").substr(0,2)){var e=this.vars;if(1===arguments.length)return e[a];null==b?delete e[a]:(e[a]=b,e[a+\"Params\"]=n(c)&&-1!==c.join(\"\").indexOf(\"{self}\")?this._swapSelfInParams(c):c,e[a+\"Scope\"]=d),\"onUpdate\"===a&&(this._onUpdate=b)}return this},f.delay=function(a){return arguments.length?(this._timeline.smoothChildTiming&&this.startTime(this._startTime+a-this._delay),this._delay=a,this):this._delay},f.duration=function(a){return arguments.length?(this._duration=this._totalDuration=a,this._uncache(!0),this._timeline.smoothChildTiming&&this._time>0&&this._timethis._duration?this._duration:a,b)):this._time},f.totalTime=function(a,b,c){if(h||g.wake(),!arguments.length)return this._totalTime;if(this._timeline){if(0>a&&!c&&(a+=this.totalDuration()),this._timeline.smoothChildTiming){this._dirty&&this.totalDuration();var d=this._totalDuration,e=this._timeline;if(a>d&&!c&&(a=d),this._startTime=(this._paused?this._pauseTime:e._time)-(this._reversed?d-a:a)/this._timeScale,e._dirty||this._uncache(!1),e._timeline)for(;e._timeline;)e._timeline._time!==(e._startTime+e._totalTime)/e._timeScale&&e.totalTime(e._totalTime,!0),e=e._timeline}this._gc&&this._enabled(!0,!1),(this._totalTime!==a||0===this._duration)&&(I.length&&X(),this.render(a,b,!1),I.length&&X())}return this},f.progress=f.totalProgress=function(a,b){var c=this.duration();return arguments.length?this.totalTime(c*a,b):c?this._time/c:this.ratio},f.startTime=function(a){return arguments.length?(a!==this._startTime&&(this._startTime=a,this.timeline&&this.timeline._sortChildren&&this.timeline.add(this,a-this._delay)),this):this._startTime},f.endTime=function(a){return this._startTime+(0!=a?this.totalDuration():this.duration())/this._timeScale},f.timeScale=function(a){if(!arguments.length)return this._timeScale;if(a=a||k,this._timeline&&this._timeline.smoothChildTiming){var b=this._pauseTime,c=b||0===b?b:this._timeline.totalTime();this._startTime=c-(c-this._startTime)*this._timeScale/a}return this._timeScale=a,this._uncache(!1)},f.reversed=function(a){return arguments.length?(a!=this._reversed&&(this._reversed=a,this.totalTime(this._timeline&&!this._timeline.smoothChildTiming?this.totalDuration()-this._totalTime:this._totalTime,!0)),this):this._reversed},f.paused=function(a){if(!arguments.length)return this._paused;var b,c,d=this._timeline;return a!=this._paused&&d&&(h||a||g.wake(),b=d.rawTime(),c=b-this._pauseTime,!a&&d.smoothChildTiming&&(this._startTime+=c,this._uncache(!1)),this._pauseTime=a?b:null,this._paused=a,this._active=this.isActive(),!a&&0!==c&&this._initted&&this.duration()&&(b=d.smoothChildTiming?this._totalTime:(b-this._startTime)/this._timeScale,this.render(b,b===this._totalTime,!0))),this._gc&&!a&&this._enabled(!0,!1),this};var E=r(\"core.SimpleTimeline\",function(a){C.call(this,0,a),this.autoRemoveChildren=this.smoothChildTiming=!0});f=E.prototype=new C,f.constructor=E,f.kill()._gc=!1,f._first=f._last=f._recent=null,f._sortChildren=!1,f.add=f.insert=function(a,b,c,d){var e,f;if(a._startTime=Number(b||0)+a._delay,a._paused&&this!==a._timeline&&(a._pauseTime=a._startTime+(this.rawTime()-a._startTime)/a._timeScale),a.timeline&&a.timeline._remove(a,!0),a.timeline=a._timeline=this,a._gc&&a._enabled(!0,!0),e=this._last,this._sortChildren)for(f=a._startTime;e&&e._startTime>f;)e=e._prev;return e?(a._next=e._next,e._next=a):(a._next=this._first,this._first=a),a._next?a._next._prev=a:this._last=a,a._prev=e,this._recent=a,this._timeline&&this._uncache(!0),this},f._remove=function(a,b){return a.timeline===this&&(b||a._enabled(!1,!0),a._prev?a._prev._next=a._next:this._first===a&&(this._first=a._next),a._next?a._next._prev=a._prev:this._last===a&&(this._last=a._prev),a._next=a._prev=a.timeline=null,a===this._recent&&(this._recent=this._last),this._timeline&&this._uncache(!0)),this},f.render=function(a,b,c){var d,e=this._first;for(this._totalTime=this._time=this._rawPrevTime=a;e;)d=e._next,(e._active||a>=e._startTime&&!e._paused)&&(e._reversed?e.render((e._dirty?e.totalDuration():e._totalDuration)-(a-e._startTime)*e._timeScale,b,c):e.render((a-e._startTime)*e._timeScale,b,c)),e=d},f.rawTime=function(){return h||g.wake(),this._totalTime};var F=r(\"TweenLite\",function(b,c,d){if(C.call(this,c,d),this.render=F.prototype.render,null==b)throw\"Cannot tween a null target.\";this.target=b=\"string\"!=typeof b?b:F.selector(b)||b;var e,f,g,h=b.jquery||b.length&&b!==a&&b[0]&&(b[0]===a||b[0].nodeType&&b[0].style&&!b.nodeType),i=this.vars.overwrite;if(this._overwrite=i=null==i?T[F.defaultOverwrite]:\"number\"==typeof i?i>>0:T[i],(h||b instanceof Array||b.push&&n(b))&&\"number\"!=typeof b[0])for(this._targets=g=l(b),this._propLookup=[],this._siblings=[],e=0;e1&&$(f,this,null,1,this._siblings[e])):(f=g[e--]=F.selector(f),\"string\"==typeof f&&g.splice(e+1,1)):g.splice(e--,1);else this._propLookup={},this._siblings=Y(b,this,!1),1===i&&this._siblings.length>1&&$(b,this,null,1,this._siblings);(this.vars.immediateRender||0===c&&0===this._delay&&this.vars.immediateRender!==!1)&&(this._time=-k,this.render(-this._delay))},!0),G=function(b){return b&&b.length&&b!==a&&b[0]&&(b[0]===a||b[0].nodeType&&b[0].style&&!b.nodeType)},H=function(a,b){var c,d={};for(c in a)S[c]||c in b&&\"transform\"!==c&&\"x\"!==c&&\"y\"!==c&&\"width\"!==c&&\"height\"!==c&&\"className\"!==c&&\"border\"!==c||!(!P[c]||P[c]&&P[c]._autoCSS)||(d[c]=a[c],delete a[c]);a.css=d};f=F.prototype=new C,f.constructor=F,f.kill()._gc=!1,f.ratio=0,f._firstPT=f._targets=f._overwrittenProps=f._startAt=null,f._notifyPluginsOfEnabled=f._lazy=!1,F.version=\"1.18.2\",F.defaultEase=f._ease=new u(null,null,1,1),F.defaultOverwrite=\"auto\",F.ticker=g,F.autoSleep=120,F.lagSmoothing=function(a,b){g.lagSmoothing(a,b)},F.selector=a.$||a.jQuery||function(b){var c=a.$||a.jQuery;return c?(F.selector=c,c(b)):\"undefined\"==typeof document?b:document.querySelectorAll?document.querySelectorAll(b):document.getElementById(\"#\"===b.charAt(0)?b.substr(1):b)};var I=[],J={},K=/(?:(-|-=|\\+=)?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?)[0-9]/gi,L=function(a){for(var b,c=this._firstPT,d=1e-6;c;)b=c.blob?a?this.join(\"\"):this.start:c.c*a+c.s,c.r?b=Math.round(b):d>b&&b>-d&&(b=0),c.f?c.fp?c.t[c.p](c.fp,b):c.t[c.p](b):c.t[c.p]=b,c=c._next},M=function(a,b,c,d){var e,f,g,h,i,j,k,l=[a,b],m=0,n=\"\",o=0;for(l.start=a,c&&(c(l),a=l[0],b=l[1]),l.length=0,e=a.match(K)||[],f=b.match(K)||[],d&&(d._next=null,d.blob=1,l._firstPT=d),i=f.length,h=0;i>h;h++)k=f[h],j=b.substr(m,b.indexOf(k,m)-m),n+=j||!h?j:\",\",m+=j.length,o?o=(o+1)%5:\"rgba(\"===j.substr(-5)&&(o=1),k===e[h]||e.length<=h?n+=k:(n&&(l.push(n),n=\"\"),g=parseFloat(e[h]),l.push(g),l._firstPT={_next:l._firstPT,t:l,p:l.length-1,s:g,c:(\"=\"===k.charAt(1)?parseInt(k.charAt(0)+\"1\",10)*parseFloat(k.substr(2)):parseFloat(k)-g)||0,f:0,r:o&&4>o}),m+=k.length;return n+=b.substr(m),n&&l.push(n),l.setRatio=L,l},N=function(a,b,c,d,e,f,g,h){var i,j,k=\"get\"===c?a[b]:c,l=typeof a[b],m=\"string\"==typeof d&&\"=\"===d.charAt(1),n={t:a,p:b,s:k,f:\"function\"===l,pg:0,n:e||b,r:f,pr:0,c:m?parseInt(d.charAt(0)+\"1\",10)*parseFloat(d.substr(2)):parseFloat(d)-k||0};return\"number\"!==l&&(\"function\"===l&&\"get\"===c&&(j=b.indexOf(\"set\")||\"function\"!=typeof a[\"get\"+b.substr(3)]?b:\"get\"+b.substr(3),n.s=k=g?a[j](g):a[j]()),\"string\"==typeof k&&(g||isNaN(k))?(n.fp=g,i=M(k,d,h||F.defaultStringFilter,n),n={t:i,p:\"setRatio\",s:0,c:1,f:2,pg:0,n:e||b,pr:0}):m||(n.s=parseFloat(k),n.c=parseFloat(d)-n.s||0)),n.c?((n._next=this._firstPT)&&(n._next._prev=n),this._firstPT=n,n):void 0},O=F._internals={isArray:n,isSelector:G,lazyTweens:I,blobDif:M},P=F._plugins={},Q=O.tweenLookup={},R=0,S=O.reservedProps={ease:1,delay:1,overwrite:1,onComplete:1,onCompleteParams:1,onCompleteScope:1,useFrames:1,runBackwards:1,startAt:1,onUpdate:1,onUpdateParams:1,onUpdateScope:1,onStart:1,onStartParams:1,onStartScope:1,onReverseComplete:1,onReverseCompleteParams:1,onReverseCompleteScope:1,onRepeat:1,onRepeatParams:1,onRepeatScope:1,easeParams:1,yoyo:1,immediateRender:1,repeat:1,repeatDelay:1,data:1,paused:1,reversed:1,autoCSS:1,lazy:1,onOverwrite:1,callbackScope:1,stringFilter:1},T={none:0,all:1,auto:2,concurrent:3,allOnStart:4,preexisting:5,\"true\":1,\"false\":0},U=C._rootFramesTimeline=new E,V=C._rootTimeline=new E,W=30,X=O.lazyRender=function(){\r\nvar a,b=I.length;for(J={};--b>-1;)a=I[b],a&&a._lazy!==!1&&(a.render(a._lazy[0],a._lazy[1],!0),a._lazy=!1);I.length=0};V._startTime=g.time,U._startTime=g.frame,V._active=U._active=!0,setTimeout(X,1),C._updateRoot=F.render=function(){var a,b,c;if(I.length&&X(),V.render((g.time-V._startTime)*V._timeScale,!1,!1),U.render((g.frame-U._startTime)*U._timeScale,!1,!1),I.length&&X(),g.frame>=W){W=g.frame+(parseInt(F.autoSleep,10)||120);for(c in Q){for(b=Q[c].tweens,a=b.length;--a>-1;)b[a]._gc&&b.splice(a,1);0===b.length&&delete Q[c]}if(c=V._first,(!c||c._paused)&&F.autoSleep&&!U._first&&1===g._listeners.tick.length){for(;c&&c._paused;)c=c._next;c||g.sleep()}}},g.addEventListener(\"tick\",C._updateRoot);var Y=function(a,b,c){var d,e,f=a._gsTweenID;if(Q[f||(a._gsTweenID=f=\"t\"+R++)]||(Q[f]={target:a,tweens:[]}),b&&(d=Q[f].tweens,d[e=d.length]=b,c))for(;--e>-1;)d[e]===b&&d.splice(e,1);return Q[f].tweens},Z=function(a,b,c,d){var e,f,g=a.vars.onOverwrite;return g&&(e=g(a,b,c,d)),g=F.onOverwrite,g&&(f=g(a,b,c,d)),e!==!1&&f!==!1},$=function(a,b,c,d,e){var f,g,h,i;if(1===d||d>=4){for(i=e.length,f=0;i>f;f++)if((h=e[f])!==b)h._gc||h._kill(null,a,b)&&(g=!0);else if(5===d)break;return g}var j,l=b._startTime+k,m=[],n=0,o=0===b._duration;for(f=e.length;--f>-1;)(h=e[f])===b||h._gc||h._paused||(h._timeline!==b._timeline?(j=j||_(b,0,o),0===_(h,j,o)&&(m[n++]=h)):h._startTime<=l&&h._startTime+h.totalDuration()/h._timeScale>l&&((o||!h._initted)&&l-h._startTime<=2e-10||(m[n++]=h)));for(f=n;--f>-1;)if(h=m[f],2===d&&h._kill(c,a,b)&&(g=!0),2!==d||!h._firstPT&&h._initted){if(2!==d&&!Z(h,b))continue;h._enabled(!1,!1)&&(g=!0)}return g},_=function(a,b,c){for(var d=a._timeline,e=d._timeScale,f=a._startTime;d._timeline;){if(f+=d._startTime,e*=d._timeScale,d._paused)return-100;d=d._timeline}return f/=e,f>b?f-b:c&&f===b||!a._initted&&2*k>f-b?k:(f+=a.totalDuration()/a._timeScale/e)>b+k?0:f-b-k};f._init=function(){var a,b,c,d,e,f=this.vars,g=this._overwrittenProps,h=this._duration,i=!!f.immediateRender,j=f.ease;if(f.startAt){this._startAt&&(this._startAt.render(-1,!0),this._startAt.kill()),e={};for(d in f.startAt)e[d]=f.startAt[d];if(e.overwrite=!1,e.immediateRender=!0,e.lazy=i&&f.lazy!==!1,e.startAt=e.delay=null,this._startAt=F.to(this.target,0,e),i)if(this._time>0)this._startAt=null;else if(0!==h)return}else if(f.runBackwards&&0!==h)if(this._startAt)this._startAt.render(-1,!0),this._startAt.kill(),this._startAt=null;else{0!==this._time&&(i=!1),c={};for(d in f)S[d]&&\"autoCSS\"!==d||(c[d]=f[d]);if(c.overwrite=0,c.data=\"isFromStart\",c.lazy=i&&f.lazy!==!1,c.immediateRender=i,this._startAt=F.to(this.target,0,c),i){if(0===this._time)return}else this._startAt._init(),this._startAt._enabled(!1),this.vars.immediateRender&&(this._startAt=null)}if(this._ease=j=j?j instanceof u?j:\"function\"==typeof j?new u(j,f.easeParams):v[j]||F.defaultEase:F.defaultEase,f.easeParams instanceof Array&&j.config&&(this._ease=j.config.apply(j,f.easeParams)),this._easeType=this._ease._type,this._easePower=this._ease._power,this._firstPT=null,this._targets)for(a=this._targets.length;--a>-1;)this._initProps(this._targets[a],this._propLookup[a]={},this._siblings[a],g?g[a]:null)&&(b=!0);else b=this._initProps(this.target,this._propLookup,this._siblings,g);if(b&&F._onPluginEvent(\"_onInitAllProps\",this),g&&(this._firstPT||\"function\"!=typeof this.target&&this._enabled(!1,!1)),f.runBackwards)for(c=this._firstPT;c;)c.s+=c.c,c.c=-c.c,c=c._next;this._onUpdate=f.onUpdate,this._initted=!0},f._initProps=function(b,c,d,e){var f,g,h,i,j,k;if(null==b)return!1;J[b._gsTweenID]&&X(),this.vars.css||b.style&&b!==a&&b.nodeType&&P.css&&this.vars.autoCSS!==!1&&H(this.vars,b);for(f in this.vars)if(k=this.vars[f],S[f])k&&(k instanceof Array||k.push&&n(k))&&-1!==k.join(\"\").indexOf(\"{self}\")&&(this.vars[f]=k=this._swapSelfInParams(k,this));else if(P[f]&&(i=new P[f])._onInitTween(b,this.vars[f],this)){for(this._firstPT=j={_next:this._firstPT,t:i,p:\"setRatio\",s:0,c:1,f:1,n:f,pg:1,pr:i._priority},g=i._overwriteProps.length;--g>-1;)c[i._overwriteProps[g]]=this._firstPT;(i._priority||i._onInitAllProps)&&(h=!0),(i._onDisable||i._onEnable)&&(this._notifyPluginsOfEnabled=!0),j._next&&(j._next._prev=j)}else c[f]=N.call(this,b,f,\"get\",k,f,0,null,this.vars.stringFilter);return e&&this._kill(e,b)?this._initProps(b,c,d,e):this._overwrite>1&&this._firstPT&&d.length>1&&$(b,this,c,this._overwrite,d)?(this._kill(c,b),this._initProps(b,c,d,e)):(this._firstPT&&(this.vars.lazy!==!1&&this._duration||this.vars.lazy&&!this._duration)&&(J[b._gsTweenID]=!0),h)},f.render=function(a,b,c){var d,e,f,g,h=this._time,i=this._duration,j=this._rawPrevTime;if(a>=i-1e-7)this._totalTime=this._time=i,this.ratio=this._ease._calcEnd?this._ease.getRatio(1):1,this._reversed||(d=!0,e=\"onComplete\",c=c||this._timeline.autoRemoveChildren),0===i&&(this._initted||!this.vars.lazy||c)&&(this._startTime===this._timeline._duration&&(a=0),(0>j||0>=a&&a>=-1e-7||j===k&&\"isPause\"!==this.data)&&j!==a&&(c=!0,j>k&&(e=\"onReverseComplete\")),this._rawPrevTime=g=!b||a||j===a?a:k);else if(1e-7>a)this._totalTime=this._time=0,this.ratio=this._ease._calcEnd?this._ease.getRatio(0):0,(0!==h||0===i&&j>0)&&(e=\"onReverseComplete\",d=this._reversed),0>a&&(this._active=!1,0===i&&(this._initted||!this.vars.lazy||c)&&(j>=0&&(j!==k||\"isPause\"!==this.data)&&(c=!0),this._rawPrevTime=g=!b||a||j===a?a:k)),this._initted||(c=!0);else if(this._totalTime=this._time=a,this._easeType){var l=a/i,m=this._easeType,n=this._easePower;(1===m||3===m&&l>=.5)&&(l=1-l),3===m&&(l*=2),1===n?l*=l:2===n?l*=l*l:3===n?l*=l*l*l:4===n&&(l*=l*l*l*l),1===m?this.ratio=1-l:2===m?this.ratio=l:.5>a/i?this.ratio=l/2:this.ratio=1-l/2}else this.ratio=this._ease.getRatio(a/i);if(this._time!==h||c){if(!this._initted){if(this._init(),!this._initted||this._gc)return;if(!c&&this._firstPT&&(this.vars.lazy!==!1&&this._duration||this.vars.lazy&&!this._duration))return this._time=this._totalTime=h,this._rawPrevTime=j,I.push(this),void(this._lazy=[a,b]);this._time&&!d?this.ratio=this._ease.getRatio(this._time/i):d&&this._ease._calcEnd&&(this.ratio=this._ease.getRatio(0===this._time?0:1))}for(this._lazy!==!1&&(this._lazy=!1),this._active||!this._paused&&this._time!==h&&a>=0&&(this._active=!0),0===h&&(this._startAt&&(a>=0?this._startAt.render(a,b,c):e||(e=\"_dummyGS\")),this.vars.onStart&&(0!==this._time||0===i)&&(b||this._callback(\"onStart\"))),f=this._firstPT;f;)f.f?f.t[f.p](f.c*this.ratio+f.s):f.t[f.p]=f.c*this.ratio+f.s,f=f._next;this._onUpdate&&(0>a&&this._startAt&&a!==-1e-4&&this._startAt.render(a,b,c),b||(this._time!==h||d)&&this._callback(\"onUpdate\")),e&&(!this._gc||c)&&(0>a&&this._startAt&&!this._onUpdate&&a!==-1e-4&&this._startAt.render(a,b,c),d&&(this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!b&&this.vars[e]&&this._callback(e),0===i&&this._rawPrevTime===k&&g!==k&&(this._rawPrevTime=0))}},f._kill=function(a,b,c){if(\"all\"===a&&(a=null),null==a&&(null==b||b===this.target))return this._lazy=!1,this._enabled(!1,!1);b=\"string\"!=typeof b?b||this._targets||this.target:F.selector(b)||b;var d,e,f,g,h,i,j,k,l,m=c&&this._time&&c._startTime===this._startTime&&this._timeline===c._timeline;if((n(b)||G(b))&&\"number\"!=typeof b[0])for(d=b.length;--d>-1;)this._kill(a,b[d],c)&&(i=!0);else{if(this._targets){for(d=this._targets.length;--d>-1;)if(b===this._targets[d]){h=this._propLookup[d]||{},this._overwrittenProps=this._overwrittenProps||[],e=this._overwrittenProps[d]=a?this._overwrittenProps[d]||{}:\"all\";break}}else{if(b!==this.target)return!1;h=this._propLookup,e=this._overwrittenProps=a?this._overwrittenProps||{}:\"all\"}if(h){if(j=a||h,k=a!==e&&\"all\"!==e&&a!==h&&(\"object\"!=typeof a||!a._tempKill),c&&(F.onOverwrite||this.vars.onOverwrite)){for(f in j)h[f]&&(l||(l=[]),l.push(f));if((l||!a)&&!Z(this,c,b,l))return!1}for(f in j)(g=h[f])&&(m&&(g.f?g.t[g.p](g.s):g.t[g.p]=g.s,i=!0),g.pg&&g.t._kill(j)&&(i=!0),g.pg&&0!==g.t._overwriteProps.length||(g._prev?g._prev._next=g._next:g===this._firstPT&&(this._firstPT=g._next),g._next&&(g._next._prev=g._prev),g._next=g._prev=null),delete h[f]),k&&(e[f]=1);!this._firstPT&&this._initted&&this._enabled(!1,!1)}}return i},f.invalidate=function(){return this._notifyPluginsOfEnabled&&F._onPluginEvent(\"_onDisable\",this),this._firstPT=this._overwrittenProps=this._startAt=this._onUpdate=null,this._notifyPluginsOfEnabled=this._active=this._lazy=!1,this._propLookup=this._targets?{}:[],C.prototype.invalidate.call(this),this.vars.immediateRender&&(this._time=-k,this.render(-this._delay)),this},f._enabled=function(a,b){if(h||g.wake(),a&&this._gc){var c,d=this._targets;if(d)for(c=d.length;--c>-1;)this._siblings[c]=Y(d[c],this,!0);else this._siblings=Y(this.target,this,!0)}return C.prototype._enabled.call(this,a,b),this._notifyPluginsOfEnabled&&this._firstPT?F._onPluginEvent(a?\"_onEnable\":\"_onDisable\",this):!1},F.to=function(a,b,c){return new F(a,b,c)},F.from=function(a,b,c){return c.runBackwards=!0,c.immediateRender=0!=c.immediateRender,new F(a,b,c)},F.fromTo=function(a,b,c,d){return d.startAt=c,d.immediateRender=0!=d.immediateRender&&0!=c.immediateRender,new F(a,b,d)},F.delayedCall=function(a,b,c,d,e){return new F(b,0,{delay:a,onComplete:b,onCompleteParams:c,callbackScope:d,onReverseComplete:b,onReverseCompleteParams:c,immediateRender:!1,lazy:!1,useFrames:e,overwrite:0})},F.set=function(a,b){return new F(a,0,b)},F.getTweensOf=function(a,b){if(null==a)return[];a=\"string\"!=typeof a?a:F.selector(a)||a;var c,d,e,f;if((n(a)||G(a))&&\"number\"!=typeof a[0]){for(c=a.length,d=[];--c>-1;)d=d.concat(F.getTweensOf(a[c],b));for(c=d.length;--c>-1;)for(f=d[c],e=c;--e>-1;)f===d[e]&&d.splice(c,1)}else for(d=Y(a).concat(),c=d.length;--c>-1;)(d[c]._gc||b&&!d[c].isActive())&&d.splice(c,1);return d},F.killTweensOf=F.killDelayedCallsTo=function(a,b,c){\"object\"==typeof b&&(c=b,b=!1);for(var d=F.getTweensOf(a,b),e=d.length;--e>-1;)d[e]._kill(c,a)};var aa=r(\"plugins.TweenPlugin\",function(a,b){this._overwriteProps=(a||\"\").split(\",\"),this._propName=this._overwriteProps[0],this._priority=b||0,this._super=aa.prototype},!0);if(f=aa.prototype,aa.version=\"1.18.0\",aa.API=2,f._firstPT=null,f._addTween=N,f.setRatio=L,f._kill=function(a){var b,c=this._overwriteProps,d=this._firstPT;if(null!=a[this._propName])this._overwriteProps=[];else for(b=c.length;--b>-1;)null!=a[c[b]]&&c.splice(b,1);for(;d;)null!=a[d.n]&&(d._next&&(d._next._prev=d._prev),d._prev?(d._prev._next=d._next,d._prev=null):this._firstPT===d&&(this._firstPT=d._next)),d=d._next;return!1},f._roundProps=function(a,b){for(var c=this._firstPT;c;)(a[this._propName]||null!=c.n&&a[c.n.split(this._propName+\"_\").join(\"\")])&&(c.r=b),c=c._next},F._onPluginEvent=function(a,b){var c,d,e,f,g,h=b._firstPT;if(\"_onInitAllProps\"===a){for(;h;){for(g=h._next,d=e;d&&d.pr>h.pr;)d=d._next;(h._prev=d?d._prev:f)?h._prev._next=h:e=h,(h._next=d)?d._prev=h:f=h,h=g}h=b._firstPT=e}for(;h;)h.pg&&\"function\"==typeof h.t[a]&&h.t[a]()&&(c=!0),h=h._next;return c},aa.activate=function(a){for(var b=a.length;--b>-1;)a[b].API===aa.API&&(P[(new a[b])._propName]=a[b]);return!0},q.plugin=function(a){if(!(a&&a.propName&&a.init&&a.API))throw\"illegal plugin definition.\";var b,c=a.propName,d=a.priority||0,e=a.overwriteProps,f={init:\"_onInitTween\",set:\"setRatio\",kill:\"_kill\",round:\"_roundProps\",initAll:\"_onInitAllProps\"},g=r(\"plugins.\"+c.charAt(0).toUpperCase()+c.substr(1)+\"Plugin\",function(){aa.call(this,c,d),this._overwriteProps=e||[]},a.global===!0),h=g.prototype=new aa(c);h.constructor=g,g.API=a.API;for(b in f)\"function\"==typeof a[b]&&(h[f[b]]=a[b]);return g.version=a.version,aa.activate([g]),g},d=a._gsQueue){for(e=0;ep;p++)\"zIndex\"in h[p]&&(l.push(h[p].zIndex),h[p].zIndex<0&&(m[h[p].zIndex]=h[p]));for(l.sort(i);l[j]<0;)if(e=m[l[j++]],n.push(e.apply(d,g)),c)return c=f,n;for(p=0;q>p;p++)if(e=h[p],\"zIndex\"in e)if(e.zIndex==l[j]){if(n.push(e.apply(d,g)),c)break;do if(j++,e=m[l[j]],e&&n.push(e.apply(d,g)),c)break;while(e)}else m[e.zIndex]=e;else if(n.push(e.apply(d,g)),c)break;return c=f,b=o,n.length?n:null};k._events=j,k.listeners=function(a){var b,c,d,e,h,i,k,l,m=a.split(f),n=j,o=[n],p=[];for(e=0,h=m.length;h>e;e++){for(l=[],i=0,k=o.length;k>i;i++)for(n=o[i].n,c=[n[m[e]],n[g]],d=2;d--;)b=c[d],b&&(l.push(b),p=p.concat(b.f||[]));o=l}return p},k.on=function(a,b){if(a=String(a),\"function\"!=typeof b)return function(){};for(var c=a.split(f),d=j,e=0,g=c.length;g>e;e++)d=d.n,d=d.hasOwnProperty(c[e])&&d[c[e]]||(d[c[e]]={n:{}});for(d.f=d.f||[],e=0,g=d.f.length;g>e;e++)if(d.f[e]==b)return h;return d.f.push(b),function(a){+a==+a&&(b.zIndex=+a)}},k.f=function(a){var b=[].slice.call(arguments,1);return function(){k.apply(null,[a,null].concat(b).concat([].slice.call(arguments,0)))}},k.stop=function(){c=1},k.nt=function(a){return a?new RegExp(\"(?:\\\\.|\\\\/|^)\"+a+\"(?:\\\\.|\\\\/|$)\").test(b):b},k.nts=function(){return b.split(f)},k.off=k.unbind=function(a,b){if(!a)return k._events=j={n:{}},void 0;var c,d,h,i,l,m,n,o=a.split(f),p=[j];for(i=0,l=o.length;l>i;i++)for(m=0;mi;i++)for(c=p[i];c.n;){if(b){if(c.f){for(m=0,n=c.f.length;n>m;m++)if(c.f[m]==b){c.f.splice(m,1);break}!c.f.length&&delete c.f}for(d in c.n)if(c.n[e](d)&&c.n[d].f){var q=c.n[d].f;for(m=0,n=q.length;n>m;m++)if(q[m]==b){q.splice(m,1);break}!q.length&&delete c.n[d].f}}else{delete c.f;for(d in c.n)c.n[e](d)&&c.n[d].f&&delete c.n[d].f}c=c.n}},k.once=function(a,b){var c=function(){return k.unbind(a,c),b.apply(this,arguments)};return k.on(a,c)},k.version=d,k.toString=function(){return\"You are running Eve \"+d},\"undefined\"!=typeof module&&module.exports?module.exports=k:\"undefined\"!=typeof define?define(\"eve\",[],function(){return k}):a.eve=k}(this),function(a,b){\"function\"==typeof define&&define.amd?define([\"eve\"],function(c){return b(a,c)}):b(a,a.eve)}(this,function(a,b){var c=function(b){var c={},d=a.requestAnimationFrame||a.webkitRequestAnimationFrame||a.mozRequestAnimationFrame||a.oRequestAnimationFrame||a.msRequestAnimationFrame||function(a){setTimeout(a,16)},e=Array.isArray||function(a){return a instanceof Array||\"[object Array]\"==Object.prototype.toString.call(a)},f=0,g=\"M\"+(+new Date).toString(36),h=function(){return g+(f++).toString(36)},i=function(){return+new Date},j=function(a){var b=this;if(null==a)return b.s;var c=b.s-a;b.b+=b.dur*c,b.B+=b.dur*c,b.s=a},k=function(a){var b=this;return null==a?b.spd:(b.spd=a,void 0)},l=function(a){var b=this;return null==a?b.dur:(b.s=b.s*a/b.dur,b.dur=a,void 0)},m=function(){var a=this;delete c[a.id],b(\"mina.stop.\"+a.id,a)},n=function(){var a=this;a.pdif||(delete c[a.id],a.pdif=a.get()-a.b)},o=function(){var a=this;a.pdif&&(a.b=a.get()-a.pdif,delete a.pdif,c[a.id]=a)},p=function(){var a=0;for(var f in c)if(c.hasOwnProperty(f)){var g,h=c[f],i=h.get();if(a++,h.s=(i-h.b)/(h.dur/h.spd),h.s>=1&&(delete c[f],h.s=1,a--),e(h.start)){g=[];for(var j=0,k=h.start.length;k>j;j++)g[j]=h.start[j]+(h.end[j]-h.start[j])*h.easing(h.s)}else g=h.start+(h.end-h.start)*h.easing(h.s);h.set(g),1==h.s&&b(\"mina.finish.\"+h.id,h)}a&&d(p)},q=function(a,b,e,f,g,i,r){var s={id:h(),start:a,end:b,b:e,s:0,dur:f-e,spd:1,get:g,set:i,easing:r||q.linear,status:j,speed:k,duration:l,stop:m,pause:n,resume:o};c[s.id]=s;var t,u=0;for(t in c)if(c.hasOwnProperty(t)&&(u++,2==u))break;return 1==u&&d(p),s};return q.time=i,q.getById=function(a){return c[a]||null},q.linear=function(a){return a},q.easeout=function(a){return Math.pow(a,1.7)},q.easein=function(a){return Math.pow(a,.48)},q.easeinout=function(a){if(1==a)return 1;if(0==a)return 0;var b=.48-a/1.04,c=Math.sqrt(.1734+b*b),d=c-b,e=Math.pow(Math.abs(d),1/3)*(0>d?-1:1),f=-c-b,g=Math.pow(Math.abs(f),1/3)*(0>f?-1:1),h=e+g+.5;return 3*(1-h)*h*h+h*h*h},q.backin=function(a){if(1==a)return 1;var b=1.70158;return a*a*((b+1)*a-b)},q.backout=function(a){if(0==a)return 0;a-=1;var b=1.70158;return a*a*((b+1)*a+b)+1},q.elastic=function(a){return a==!!a?a:Math.pow(2,-10*a)*Math.sin((a-.075)*2*Math.PI/.3)+1},q.bounce=function(a){var b,c=7.5625,d=2.75;return 1/d>a?b=c*a*a:2/d>a?(a-=1.5/d,b=c*a*a+.75):2.5/d>a?(a-=2.25/d,b=c*a*a+.9375):(a-=2.625/d,b=c*a*a+.984375),b},a.mina=q,q}(\"undefined\"==typeof b?function(){}:b);!function(){function a(a){a=a||Object(a);for(var b,d,e=1,f=a.length+1,h=c(a,0);f>e;e++)b=d,d=h,h=c(a,e),this.raw+=d,g.call(this,d,h,b);return this._beforeEnd=function(){g.call(this,\"\",\"\",d)},this}function c(a,b){return a&&(a.charAt?a.charAt(b):a[b])}function d(a,b){this.events=this.events||{},this.events[a]=this.events[a]||[],this.events[a].push(b)}function e(a,c,d){\"function\"==typeof b&&b(\"elemental.\"+a+(c?\".\"+c:\"\"),null,c,d||\"\",this.raw);for(var e=this.events&&this.events[a],f=e&&e.length;f--;)try{this.events[a][f](c,d||\"\",this.raw)}catch(g){}this.raw=\"\"}function f(){g.call(this,\"eof\"),this.event(\"eof\")}function g(a,b,c){\"\\n\"==a&&this.event(\"newline\"),m[this.mode].call(this,a,b,c)}function h(b,c){var g=function(a){g.parse(a)};return g.mode=\"text\",g.type=String(b||\"html\").toLowerCase(),g.textchunk=\"\",g.raw=\"\",g.parse=a,g.on=d,g.event=e,g.end=f,c&&(i=c),g}var i={lt:60,\"lt;\":60,\"AMP;\":38,AMP:38,\"GT;\":62,GT:62,\"QUOT;\":34,QUOT:34,\"apos;\":39,\"bull;\":8226,\"bullet;\":8226,\"copy;\":169,copy:169,\"deg;\":176,deg:176},j=/[\\x09\\x0a\\x0b\\x0c\\x0d\\x20\\xa0\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u2028\\u2029\\u202f\\u205f\\u3000]/,k=function(a){var b;return\"#\"==a.charAt()&&(b=\"x\"==a.charAt(1).toLowerCase()?parseInt(a.substring(2),16):parseInt(a.substring(1),10)),b=i[a],b?String.fromCharCode(b):\"&\"+a},l=function(){for(var a in this.attr)this.attr.hasOwnProperty(a)&&this.event(\"attr\",a,{value:this.attr[a],tagname:this.tagname,attr:this.attr})},m={text:function(a){switch(a){case\"<\":case\"eof\":this.nodename=\"\",this.attr={},this.mode=\"tag name start\",this.raw=this.raw.slice(0,-1),this.textchunk&&this.event(\"text\",this.textchunk),this.raw+=a,this.textchunk=\"\";break;case\"&\":this.mode=\"entity\",this.entity=\"\";break;default:this.textchunk+=a}},entity:function(a){j.test(a)?(this.textchunk+=k(this.entity),this.mode=\"text\"):\";\"==a?(this.textchunk+=k(this.entity+a),this.mode=\"text\"):this.entity+=a},special:function(a,b,c){return\"!\"==c&&\"-\"==a&&\"-\"==b?(this.mode=\"comment start\",void 0):\"[CDATA\"==this.textchunk&&\"[\"==a?(this.mode=\"cdata\",this.textchunk=\"\",void 0):\">\"==a||\"eof\"==a?(this.event(\"special\",this.textchunk),this.mode=\"text\",this.textchunk=\"\",void 0):(this.textchunk+=a,void 0)},cdata:function(a,b,c){return\"]\"==c&&\"]\"==a&&\">\"==b?(this.mode=\"cdata end\",this.textchunk=this.textchunk.slice(0,-1),void 0):(\"eof\"==a&&m[\"cdata end\"].call(this),this.textchunk+=a,void 0)},\"cdata end\":function(){this.event(\"cdata\",this.textchunk),this.textchunk=\"\",this.mode=\"text\"},\"comment start\":function(a,b){\">\"==b||\"eof\"==a?(this.event(\"comment\",\"\"),this.mode=\"skip\"):this.mode=\"comment\"},skip:function(){this.mode=\"text\"},comment:function(a,b,c){\"-\"==a&&\"-\"==c&&\">\"==b?(this.mode=\"comment end\",this.textchunk=this.textchunk.slice(0,-1)):\"eof\"==a?this.event(\"comment\",this.textchunk):this.textchunk+=a},\"comment end\":function(){this.event(\"comment\",this.textchunk),this.textchunk=\"\",this.mode=\"text\"},declaration:function(a,b){return\"?\"==a&&\">\"==b?(this.mode=\"declaration end\",void 0):(\"eof\"==a&&this.event(\"comment\",this.textchunk),this.textchunk+=a,void 0)},\"declaration end\":function(){this.event(\"comment\",this.textchunk),this.textchunk=\"\",this.mode=\"text\"},\"tag name start\":function(a,b,c){if(\"eof\"==a)return this.event(\"text\",\"<\"),void 0;if(!j.test(a)){if(this.mode=\"tag name\",\"/\"==a)return this.mode=\"close tag name start\",void 0;if(\"!\"==a)return this.mode=\"special\",this.textchunk=\"\",void 0;if(\"?\"==a)return this.mode=\"declaration\",void 0;m[this.mode].call(this,a,b,c)}},\"close tag name start\":function(a,b,c){j.test(a)||(this.mode=\"close tag name\",this.tagname=\"\",this.nodename=\"\",m[this.mode].call(this,a,b,c))},\"close tag name\":function(a){if(j.test(a))this.tagname=this.nodename;else switch(a){case\">\":this.event(\"/tag\",this.tagname||this.nodename),this.mode=\"text\";break;default:!this.tagname&&(this.nodename+=a)}},\"tag name\":function(a,b){if(j.test(a))this.tagname=this.nodename,this.nodename=\"\",this.mode=\"attr start\";else switch(a){case\">\":this.event(\"tag\",this.nodename),this.mode=\"text\";break;case\"/\":this.raw+=b,this.event(\"tag\",this.nodename),this.event(\"/tag\",this.nodename),this.mode=\"skip\";break;default:this.nodename+=a}},\"attr start\":function(a,b,c){j.test(a)||(this.mode=\"attr\",this.nodename=\"\",m[this.mode].call(this,a,b,c))},attr:function(a){if(j.test(a)||\"=\"==a)this.attr[this.nodename]=\"\",this.mode=\"attr value start\";else switch(a){case\">\":\"/\"==this.nodename?(delete this.attr[\"/\"],this.event(\"tag\",this.tagname,this.attr),l.call(this),this.event(\"/tag\",this.tagname,!0)):(this.nodename&&(this.attr[this.nodename]=\"\"),this.event(\"tag\",this.tagname,this.attr),l.call(this)),this.mode=\"text\";break;default:this.nodename+=a}},\"attr value start\":function(a,b,c){if(!j.test(a)){if(this.mode=\"attr value\",this.quote=!1,\"'\"==a||'\"'==a)return this.quote=a,void 0;m[this.mode].call(this,a,b,c)}},\"attr value\":function(a,b,c){if(j.test(a)&&!this.quote)this.mode=\"attr start\";else if(\">\"!=a||this.quote)switch(a){case'\"':case\"'\":this.quote==a&&\"\\\\\"!=c&&(this.mode=\"attr start\");break;default:this.attr[this.nodename]+=a}else this.event(\"tag\",this.tagname,this.attr),this.mode=\"text\"}};h.version=\"0.2.4\",(\"undefined\"==typeof exports?this:exports).elemental=h}();var d=function(){function d(a,b){if(a){if(a.tagName)return z(a);if(a instanceof u)return a;if(null==b)return a=I.doc.querySelector(a),z(a)}return a=null==a?\"100%\":a,b=null==b?\"100%\":b,new y(a,b)}function e(a,b){if(b){if(\"string\"==typeof a&&(a=e(a)),\"string\"==typeof b)return\"xlink:\"==b.substring(0,6)?a.getAttributeNS(gb,b.substring(6)):a.getAttribute(b);for(var c in b)if(b[J](c)){var d=K(b[c]);d?\"xlink:\"==c.substring(0,6)?a.setAttributeNS(gb,c.substring(6),d):a.setAttribute(c,d):a.removeAttribute(c)}}else a=I.doc.createElementNS(\"http://www.w3.org/2000/svg\",a);return a}function f(a,b){return b=K.prototype.toLowerCase.call(b),\"finite\"==b?!W[J](+a):\"array\"==b&&(a instanceof Array||Array.isArray&&Array.isArray(a))?!0:\"null\"==b&&null===a||b==typeof a&&null!==a||\"object\"==b&&a===Object(a)||U.call(a).slice(8,-1).toLowerCase()==b}function g(a){if(\"function\"==typeof a||Object(a)!==a)return a;var b=new a.constructor;for(var c in a)a[J](c)&&(b[c]=g(a[c]));return b}function h(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return a.push(a.splice(c,1)[0])}function i(a,b,c){function d(){var e=Array.prototype.slice.call(arguments,0),f=e.join(\"␀\"),g=d.cache=d.cache||{},i=d.count=d.count||[];return g[J](f)?(h(i,f),c?c(g[f]):g[f]):(i.length>=1e3&&delete g[i.shift()],i.push(f),g[f]=a.apply(b,e),c?c(g[f]):g[f])}return d}function j(a,b,c,d,e,f){if(null==e){var g=a-c,h=b-d;return g||h?(180+180*N.atan2(-h,-g)/R+360)%360:0}return j(a,b,e,f)-j(c,d,e,f)}function k(a){return a%360*R/180}function l(a){return 180*a/R%360}function m(){return this.x+T+this.y+T+this.width+\" × \"+this.height}function n(a,b,c,d,e,f){return null==b&&\"[object SVGMatrix]\"==U.call(a)?(this.a=a.a,this.b=a.b,this.c=a.c,this.d=a.d,this.e=a.e,this.f=a.f,void 0):(null!=a?(this.a=+a,this.b=+b,this.c=+c,this.d=+d,this.e=+e,this.f=+f):(this.a=1,this.b=0,this.c=0,this.d=1,this.e=0,this.f=0),void 0)}function o(a){var b=[];return a=a.replace(/(?:^|\\s)(\\w+)\\(([^)]+)\\)/g,function(a,c,d){return d=d.split(/\\s*,\\s*/),\"rotate\"==c&&1==d.length&&d.push(0,0),\"scale\"==c&&(2==d.length&&d.push(0,0),1==d.length&&d.push(d[0],0,0)),\"skewX\"==c?b.push([\"m\",1,0,N.tan(k(d[0])),1,0,0]):\"skewY\"==c?b.push([\"m\",1,N.tan(k(d[0])),0,1,0,0]):b.push([c.charAt(0)].concat(d)),a}),b}function p(a,b){var c=pb(a),d=new n;if(c)for(var e=0,f=c.length;f>e;e++){var g,h,i,j,k,l=c[e],m=l.length,o=K(l[0]).toLowerCase(),p=l[0]!=o,q=p?d.invert():0;\"t\"==o&&3==m?p?(g=q.x(0,0),h=q.y(0,0),i=q.x(l[1],l[2]),j=q.y(l[1],l[2]),d.translate(i-g,j-h)):d.translate(l[1],l[2]):\"r\"==o?2==m?(k=k||b,d.rotate(l[1],k.x+k.width/2,k.y+k.height/2)):4==m&&(p?(i=q.x(l[2],l[3]),j=q.y(l[2],l[3]),d.rotate(l[1],i,j)):d.rotate(l[1],l[2],l[3])):\"s\"==o?2==m||3==m?(k=k||b,d.scale(l[1],l[m-1],k.x+k.width/2,k.y+k.height/2)):4==m?p?(i=q.x(l[2],l[3]),j=q.y(l[2],l[3]),d.scale(l[1],l[1],i,j)):d.scale(l[1],l[1],l[2],l[3]):5==m&&(p?(i=q.x(l[3],l[4]),j=q.y(l[3],l[4]),d.scale(l[1],l[2],i,j)):d.scale(l[1],l[2],l[3],l[4])):\"m\"==o&&7==m&&d.add(l[1],l[2],l[3],l[4],l[5],l[6])}return d}function q(a,b){if(null==b){var c=!0;if(b=\"linearGradient\"==a.type||\"radialGradient\"==a.type?a.node.getAttribute(\"gradientTransform\"):\"pattern\"==a.type?a.node.getAttribute(\"patternTransform\"):a.node.getAttribute(\"transform\"),!b)return new n;b=o(b)}else b=qb.test(b)?K(b).replace(/\\.{3}|\\u2026/g,a._.transform||S):o(b),f(b,\"array\")&&(b=d.path?d.path.toString.call(b):K(b)),a._.transform=b;var e=p(b,a.getBBox(1));return c?e:(a.matrix=e,void 0)}function r(a){if(d._.someDefs)return d._.someDefs;var b=a.paper||a.node.parentNode&&d(a.node.parentNode)||d.select(\"svg\")||d(0,0),c=b.select(\"defs\").node;return c||(c=x(\"defs\",b.node).node),d._.someDefs=c,c}function s(a,b,c){function d(a){return null==a?S:a==+a?a:(e(j,{width:a}),j.getBBox().width)}function f(a){return null==a?S:a==+a?a:(e(j,{height:a}),j.getBBox().height)}function g(d,e){null==b?i[d]=e(a.attr(d)):d==b&&(i=e(null==c?a.attr(d):c))}var h=r(a),i={},j=h.querySelector(\".svg---mgr\");switch(j||(j=e(\"rect\"),e(j,{width:10,height:10,\"class\":\"svg---mgr\"}),h.appendChild(j)),a.type){case\"rect\":g(\"rx\",d),g(\"ry\",f);case\"image\":g(\"width\",d),g(\"height\",f);case\"text\":g(\"x\",d),g(\"y\",f);break;case\"circle\":g(\"cx\",d),g(\"cy\",f),g(\"r\",d);break;case\"ellipse\":g(\"cx\",d),g(\"cy\",f),g(\"rx\",d),g(\"ry\",f);break;case\"line\":g(\"x1\",d),g(\"x2\",d),g(\"y1\",f),g(\"y2\",f);break;case\"marker\":g(\"refX\",d),g(\"markerWidth\",d),g(\"refY\",f),g(\"markerHeight\",f);break;case\"radialGradient\":g(\"fx\",d),g(\"fy\",f);break;case\"tspan\":g(\"dx\",d),g(\"dy\",f);break;default:g(b,d)}return i}function t(a){f(a,\"array\")||(a=Array.prototype.slice.call(arguments,0));for(var b=0,c=0,d=this.node;this[b];)delete this[b++];for(b=0;bc;c++)if(b=b||a[c])return b}function w(a){this.node=a}function x(a,b){var c=e(a);b.appendChild(c);var d=z(c);return d.type=a,d}function y(a,b){var c,d,f,g=y.prototype;if(a&&\"svg\"==a.tagName){if(a.snap in hb)return hb[a.snap];c=new u(a),d=a.getElementsByTagName(\"desc\")[0],f=a.getElementsByTagName(\"defs\")[0],d||(d=e(\"desc\"),d.appendChild(I.doc.createTextNode(\"Created with Snap\")),c.node.appendChild(d)),f||(f=e(\"defs\"),c.node.appendChild(f)),c.defs=f;for(var h in g)g[J](h)&&(c[h]=g[h]);c.paper=c.root=c}else c=x(\"svg\",I.doc.body),e(c.node,{height:b,version:1.1,width:a,xmlns:\"http://www.w3.org/2000/svg\"});return c}function z(a){return a?a instanceof u||a instanceof w?a:\"svg\"==a.tagName?new y(a):new u(a):a}function A(){return this.selectAll(\"stop\")}function B(a,b){var c=e(\"stop\"),f={offset:+b+\"%\"};return a=d.color(a),f[\"stop-color\"]=a.hex,a.opacity<1&&(f[\"stop-opacity\"]=a.opacity),e(c,f),this.node.appendChild(c),this}function C(){if(\"linearGradient\"==this.type){var a=e(this.node,\"x1\")||0,b=e(this.node,\"x2\")||1,c=e(this.node,\"y1\")||0,f=e(this.node,\"y2\")||0;return d._.box(a,c,N.abs(b-a),N.abs(f-c))}var g=this.node.cx||.5,h=this.node.cy||.5,i=this.node.r||0;return d._.box(g-i,h-i,2*i,2*i)}function D(a,c){function d(a,b){for(var c=(b-j)/(a-k),d=k;a>d;d++)h[d].offset=+(+j+c*(d-k)).toFixed(2);k=a,j=b}var f,g=v(b(\"snap.util.grad.parse\",null,c));if(!g)return null;g.params.unshift(a),f=\"l\"==g.type.toLowerCase()?E.apply(0,g.params):F.apply(0,g.params),g.type!=g.type.toLowerCase()&&e(f.node,{gradientUnits:\"userSpaceOnUse\"});var h=g.stops,i=h.length,j=0,k=0;i--;for(var l=0;i>l;l++)\"offset\"in h[l]&&d(l,h[l].offset);for(h[i].offset=h[i].offset||100,d(i,h[i].offset),l=0;i>=l;l++){var m=h[l];f.addStop(m.color,m.offset)}return f}function E(a,b,c,d,f){var g=x(\"linearGradient\",a);return g.stops=A,g.addStop=B,g.getBBox=C,null!=b&&e(g.node,{x1:b,y1:c,x2:d,y2:f}),g}function F(a,b,c,d,f,g){var h=x(\"radialGradient\",a);return h.stops=A,h.addStop=B,h.getBBox=C,null!=b&&e(h.node,{cx:b,cy:c,r:d}),null!=f&&null!=g&&e(h.node,{fx:f,fy:g}),h}function G(a){return function(c){if(b.stop(),c instanceof w&&1==c.node.childNodes.length&&(\"radialGradient\"==c.node.firstChild.tagName||\"linearGradient\"==c.node.firstChild.tagName||\"pattern\"==c.node.firstChild.tagName)&&(c=c.node.firstChild,r(this).appendChild(c),c=z(c)),c instanceof u)if(\"radialGradient\"==c.type||\"linearGradient\"==c.type||\"pattern\"==c.type){c.node.id||e(c.node,{id:c.id});var f=\"url(#\"+c.node.id+\")\"}else f=c.attr(a);else if(f=d.color(c),f.error){var g=D(r(this),c);g?(g.node.id||e(g.node,{id:g.id}),f=\"url(#\"+g.node.id+\")\"):f=c}else f=K(f);var h={};h[a]=f,e(this.node,h),this.node.style[a]=S}}function H(a){for(var b=[],c=a.childNodes,d=0,e=c.length;e>d;d++){var f=c[d];3==f.nodeType&&b.push(f.nodeValue),\"tspan\"==f.tagName&&(1==f.childNodes.length&&3==f.firstChild.nodeType?b.push(f.firstChild.nodeValue):b.push(H(f)))}return b}d.version=\"0.1.0\",d.toString=function(){return\"Snap v\"+this.version},d._={};var I={win:a,doc:a.document};d._.glob=I;var J=\"hasOwnProperty\",K=String,L=parseFloat,M=parseInt,N=Math,O=N.max,P=N.min,Q=N.abs,R=(N.pow,N.PI),S=(N.round,\"\"),T=\" \",U=Object.prototype.toString,V=/^\\s*((#[a-f\\d]{6})|(#[a-f\\d]{3})|rgba?\\(\\s*([\\d\\.]+%?\\s*,\\s*[\\d\\.]+%?\\s*,\\s*[\\d\\.]+%?(?:\\s*,\\s*[\\d\\.]+%?)?)\\s*\\)|hsba?\\(\\s*([\\d\\.]+(?:deg|\\xb0|%)?\\s*,\\s*[\\d\\.]+%?\\s*,\\s*[\\d\\.]+(?:%?\\s*,\\s*[\\d\\.]+)?%?)\\s*\\)|hsla?\\(\\s*([\\d\\.]+(?:deg|\\xb0|%)?\\s*,\\s*[\\d\\.]+%?\\s*,\\s*[\\d\\.]+(?:%?\\s*,\\s*[\\d\\.]+)?%?)\\s*\\))\\s*$/i,W={NaN:1,Infinity:1,\"-Infinity\":1},X=/^url\\(#?([^)]+)\\)$/,Y=\"\t\\n\u000b\\f\\r \\u2028\\u2029\",Z=new RegExp(\"[,\"+Y+\"]+\"),$=(new RegExp(\"[\"+Y+\"]\",\"g\"),new RegExp(\"[\"+Y+\"]*,[\"+Y+\"]*\")),_={hs:1,rg:1},ab=new RegExp(\"([a-z])[\"+Y+\",]*((-?\\\\d*\\\\.?\\\\d*(?:e[\\\\-+]?\\\\d+)?[\"+Y+\"]*,?[\"+Y+\"]*)+)\",\"ig\"),bb=new RegExp(\"([rstm])[\"+Y+\",]*((-?\\\\d*\\\\.?\\\\d*(?:e[\\\\-+]?\\\\d+)?[\"+Y+\"]*,?[\"+Y+\"]*)+)\",\"ig\"),cb=new RegExp(\"(-?\\\\d*\\\\.?\\\\d*(?:e[\\\\-+]?\\\\d+)?)[\"+Y+\"]*,?[\"+Y+\"]*\",\"ig\"),db=0,eb=\"S\"+(+new Date).toString(36),fb=function(){return eb+(db++).toString(36)},gb=\"http://www.w3.org/1999/xlink\",hb={};d._.$=e,d._.id=fb,d.format=function(){var a=/\\{([^\\}]+)\\}/g,b=/(?:(?:^|\\.)(.+?)(?=\\[|\\.|$|\\()|\\[('|\")(.+?)\\2\\])(\\(\\))?/g,c=function(a,c,d){var e=d;return c.replace(b,function(a,b,c,d,f){b=b||d,e&&(b in e&&(e=e[b]),\"function\"==typeof e&&f&&(e=e()))}),e=(null==e||e==d?a:e)+\"\"};return function(b,d){return K(b).replace(a,function(a,b){return c(a,b,d)})}}();var ib=function(){function a(){this.parentNode.removeChild(this)}return function(b,c){var d=I.doc.createElement(\"img\"),e=I.doc.body;d.style.cssText=\"position:absolute;left:-9999em;top:-9999em\",d.onload=function(){c.call(d),d.onload=d.onerror=null,e.removeChild(d)},d.onerror=a,e.appendChild(d),d.src=b}}();d._.clone=g,d._.cacher=i,d.rad=k,d.deg=l,d.angle=j,d.is=f,d.snapTo=function(a,b,c){if(c=f(c,\"finite\")?c:10,f(a,\"array\")){for(var d=a.length;d--;)if(Q(a[d]-b)<=c)return a[d]}else{a=+a;var e=b%a;if(c>e)return b-e;if(e>a-c)return b-e+a}return b},function(a){function b(a){return a[0]*a[0]+a[1]*a[1]}function c(a){var c=N.sqrt(b(a));a[0]&&(a[0]/=c),a[1]&&(a[1]/=c)}a.add=function(a,b,c,d,e,f){var g,h,i,j,k=[[],[],[]],l=[[this.a,this.c,this.e],[this.b,this.d,this.f],[0,0,1]],m=[[a,c,e],[b,d,f],[0,0,1]];for(a&&a instanceof n&&(m=[[a.a,a.c,a.e],[a.b,a.d,a.f],[0,0,1]]),g=0;3>g;g++)for(h=0;3>h;h++){for(j=0,i=0;3>i;i++)j+=l[g][i]*m[i][h];k[g][h]=j}return this.a=k[0][0],this.b=k[1][0],this.c=k[0][1],this.d=k[1][1],this.e=k[0][2],this.f=k[1][2],this},a.invert=function(){var a=this,b=a.a*a.d-a.b*a.c;return new n(a.d/b,-a.b/b,-a.c/b,a.a/b,(a.c*a.f-a.d*a.e)/b,(a.b*a.e-a.a*a.f)/b)},a.clone=function(){return new n(this.a,this.b,this.c,this.d,this.e,this.f)},a.translate=function(a,b){return this.add(1,0,0,1,a,b)},a.scale=function(a,b,c,d){return null==b&&(b=a),(c||d)&&this.add(1,0,0,1,c,d),this.add(a,0,0,b,0,0),(c||d)&&this.add(1,0,0,1,-c,-d),this},a.rotate=function(a,b,c){a=k(a),b=b||0,c=c||0;var d=+N.cos(a).toFixed(9),e=+N.sin(a).toFixed(9);return this.add(d,e,-e,d,b,c),this.add(1,0,0,1,-b,-c)},a.x=function(a,b){return a*this.a+b*this.c+this.e},a.y=function(a,b){return a*this.b+b*this.d+this.f},a.get=function(a){return+this[K.fromCharCode(97+a)].toFixed(4)},a.toString=function(){return\"matrix(\"+[this.get(0),this.get(1),this.get(2),this.get(3),this.get(4),this.get(5)].join()+\")\"},a.offset=function(){return[this.e.toFixed(4),this.f.toFixed(4)]},a.split=function(){var a={};a.dx=this.e,a.dy=this.f;var d=[[this.a,this.c],[this.b,this.d]];a.scalex=N.sqrt(b(d[0])),c(d[0]),a.shear=d[0][0]*d[1][0]+d[0][1]*d[1][1],d[1]=[d[1][0]-d[0][0]*a.shear,d[1][1]-d[0][1]*a.shear],a.scaley=N.sqrt(b(d[1])),c(d[1]),a.shear/=a.scaley;var e=-d[0][1],f=d[1][1];return 0>f?(a.rotate=l(N.acos(f)),0>e&&(a.rotate=360-a.rotate)):a.rotate=l(N.asin(e)),a.isSimple=!(+a.shear.toFixed(9)||a.scalex.toFixed(9)!=a.scaley.toFixed(9)&&a.rotate),a.isSuperSimple=!+a.shear.toFixed(9)&&a.scalex.toFixed(9)==a.scaley.toFixed(9)&&!a.rotate,a.noRotation=!+a.shear.toFixed(9)&&!a.rotate,a},a.toTransformString=function(a){var b=a||this.split();return b.isSimple?(b.scalex=+b.scalex.toFixed(4),b.scaley=+b.scaley.toFixed(4),b.rotate=+b.rotate.toFixed(4),(b.dx||b.dy?\"t\"+[+b.dx.toFixed(4),+b.dy.toFixed(4)]:S)+(1!=b.scalex||1!=b.scaley?\"s\"+[b.scalex,b.scaley,0,0]:S)+(b.rotate?\"r\"+[+b.rotate.toFixed(4),0,0]:S)):\"m\"+[this.get(0),this.get(1),this.get(2),this.get(3),this.get(4),this.get(5)]}}(n.prototype),d.Matrix=n,d.getRGB=i(function(a){if(!a||(a=K(a)).indexOf(\"-\")+1)return{r:-1,g:-1,b:-1,hex:\"none\",error:1,toString:mb};if(\"none\"==a)return{r:-1,g:-1,b:-1,hex:\"none\",toString:mb};if(!(_[J](a.toLowerCase().substring(0,2))||\"#\"==a.charAt())&&(a=jb(a)),!a)return{r:-1,g:-1,b:-1,hex:\"none\",error:1,toString:mb};var b,c,e,g,h,i,j=a.match(V);return j?(j[2]&&(e=M(j[2].substring(5),16),c=M(j[2].substring(3,5),16),b=M(j[2].substring(1,3),16)),j[3]&&(e=M((h=j[3].charAt(3))+h,16),c=M((h=j[3].charAt(2))+h,16),b=M((h=j[3].charAt(1))+h,16)),j[4]&&(i=j[4].split($),b=L(i[0]),\"%\"==i[0].slice(-1)&&(b*=2.55),c=L(i[1]),\"%\"==i[1].slice(-1)&&(c*=2.55),e=L(i[2]),\"%\"==i[2].slice(-1)&&(e*=2.55),\"rgba\"==j[1].toLowerCase().slice(0,4)&&(g=L(i[3])),i[3]&&\"%\"==i[3].slice(-1)&&(g/=100)),j[5]?(i=j[5].split($),b=L(i[0]),\"%\"==i[0].slice(-1)&&(b/=100),c=L(i[1]),\"%\"==i[1].slice(-1)&&(c/=100),e=L(i[2]),\"%\"==i[2].slice(-1)&&(e/=100),(\"deg\"==i[0].slice(-3)||\"°\"==i[0].slice(-1))&&(b/=360),\"hsba\"==j[1].toLowerCase().slice(0,4)&&(g=L(i[3])),i[3]&&\"%\"==i[3].slice(-1)&&(g/=100),d.hsb2rgb(b,c,e,g)):j[6]?(i=j[6].split($),b=L(i[0]),\"%\"==i[0].slice(-1)&&(b/=100),c=L(i[1]),\"%\"==i[1].slice(-1)&&(c/=100),e=L(i[2]),\"%\"==i[2].slice(-1)&&(e/=100),(\"deg\"==i[0].slice(-3)||\"°\"==i[0].slice(-1))&&(b/=360),\"hsla\"==j[1].toLowerCase().slice(0,4)&&(g=L(i[3])),i[3]&&\"%\"==i[3].slice(-1)&&(g/=100),d.hsl2rgb(b,c,e,g)):(b=P(N.round(b),255),c=P(N.round(c),255),e=P(N.round(e),255),g=P(O(g,0),1),j={r:b,g:c,b:e,toString:mb},j.hex=\"#\"+(16777216|e|c<<8|b<<16).toString(16).slice(1),j.opacity=f(g,\"finite\")?g:1,j)):{r:-1,g:-1,b:-1,hex:\"none\",error:1,toString:mb}},d),d.hsb=i(function(a,b,c){return d.hsb2rgb(a,b,c).hex}),d.hsl=i(function(a,b,c){return d.hsl2rgb(a,b,c).hex}),d.rgb=i(function(a,b,c,d){if(f(d,\"finite\")){var e=N.round;return\"rgba(\"+[e(a),e(b),e(c),+d.toFixed(2)]+\")\"}return\"#\"+(16777216|c|b<<8|a<<16).toString(16).slice(1)});var jb=function(a){var b=I.doc.getElementsByTagName(\"head\")[0],c=\"rgb(255, 0, 0)\";return jb=i(function(a){if(\"red\"==a.toLowerCase())return c;b.style.color=c,b.style.color=a;var d=I.doc.defaultView.getComputedStyle(b,S).getPropertyValue(\"color\");return d==c?null:d}),jb(a)},kb=function(){return\"hsb(\"+[this.h,this.s,this.b]+\")\"},lb=function(){return\"hsl(\"+[this.h,this.s,this.l]+\")\"},mb=function(){return 1==this.opacity||null==this.opacity?this.hex:\"rgba(\"+[this.r,this.g,this.b,this.opacity]+\")\"},nb=function(a,b,c){if(null==b&&f(a,\"object\")&&\"r\"in a&&\"g\"in a&&\"b\"in a&&(c=a.b,b=a.g,a=a.r),null==b&&f(a,string)){var e=d.getRGB(a);a=e.r,b=e.g,c=e.b}return(a>1||b>1||c>1)&&(a/=255,b/=255,c/=255),[a,b,c]},ob=function(a,b,c,e){a=N.round(255*a),b=N.round(255*b),c=N.round(255*c);var g={r:a,g:b,b:c,opacity:f(e,\"finite\")?e:1,hex:d.rgb(a,b,c),toString:mb};return f(e,\"finite\")&&(g.opacity=e),g};d.color=function(a){var b;return f(a,\"object\")&&\"h\"in a&&\"s\"in a&&\"b\"in a?(b=d.hsb2rgb(a),a.r=b.r,a.g=b.g,a.b=b.b,a.opacity=1,a.hex=b.hex):f(a,\"object\")&&\"h\"in a&&\"s\"in a&&\"l\"in a?(b=d.hsl2rgb(a),a.r=b.r,a.g=b.g,a.b=b.b,a.opacity=1,a.hex=b.hex):(f(a,\"string\")&&(a=d.getRGB(a)),f(a,\"object\")&&\"r\"in a&&\"g\"in a&&\"b\"in a&&!(\"error\"in a)?(b=d.rgb2hsl(a),a.h=b.h,a.s=b.s,a.l=b.l,b=d.rgb2hsb(a),a.v=b.b):(a={hex:\"none\"},a.r=a.g=a.b=a.h=a.s=a.v=a.l=-1,a.error=1)),a.toString=mb,a},d.hsb2rgb=function(a,b,c,d){f(a,\"object\")&&\"h\"in a&&\"s\"in a&&\"b\"in a&&(c=a.b,b=a.s,a=a.h,d=a.o),a*=360;var e,g,h,i,j;return a=a%360/60,j=c*b,i=j*(1-Q(a%2-1)),e=g=h=c-j,a=~~a,e+=[j,i,0,0,i,j][a],g+=[i,j,j,i,0,0][a],h+=[0,0,i,j,j,i][a],ob(e,g,h,d)},d.hsl2rgb=function(a,b,c,d){f(a,\"object\")&&\"h\"in a&&\"s\"in a&&\"l\"in a&&(c=a.l,b=a.s,a=a.h),(a>1||b>1||c>1)&&(a/=360,b/=100,c/=100),a*=360;var e,g,h,i,j;return a=a%360/60,j=2*b*(.5>c?c:1-c),i=j*(1-Q(a%2-1)),e=g=h=c-j/2,a=~~a,e+=[j,i,0,0,i,j][a],g+=[i,j,j,i,0,0][a],h+=[0,0,i,j,j,i][a],ob(e,g,h,d)},d.rgb2hsb=function(a,b,c){c=nb(a,b,c),a=c[0],b=c[1],c=c[2];var d,e,f,g;return f=O(a,b,c),g=f-P(a,b,c),d=0==g?null:f==a?(b-c)/g:f==b?(c-a)/g+2:(a-b)/g+4,d=60*((d+360)%6)/360,e=0==g?0:g/f,{h:d,s:e,b:f,toString:kb}},d.rgb2hsl=function(a,b,c){c=nb(a,b,c),a=c[0],b=c[1],c=c[2];var d,e,f,g,h,i;return g=O(a,b,c),h=P(a,b,c),i=g-h,d=0==i?null:g==a?(b-c)/i:g==b?(c-a)/i+2:(a-b)/i+4,d=60*((d+360)%6)/360,f=(g+h)/2,e=0==i?0:.5>f?i/(2*f):i/(2-2*f),{h:d,s:e,l:f,toString:lb}},d.parsePathString=function(a){if(!a)return null;var b=d.path(a);if(b.arr)return d.path.clone(b.arr);var c={a:7,c:6,o:2,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,u:3,z:0},e=[];return f(a,\"array\")&&f(a[0],\"array\")&&(e=d.path.clone(a)),e.length||K(a).replace(ab,function(a,b,d){var f=[],g=b.toLowerCase();if(d.replace(cb,function(a,b){b&&f.push(+b)}),\"m\"==g&&f.length>2&&(e.push([b].concat(f.splice(0,2))),g=\"l\",b=\"m\"==b?\"l\":\"L\"),\"o\"==g&&1==f.length&&e.push([b,f[0]]),\"r\"==g)e.push([b].concat(f));else for(;f.length>=c[g]&&(e.push([b].concat(f.splice(0,c[g]))),c[g]););}),e.toString=d.path.toString,b.arr=d.path.clone(e),e};var pb=d.parseTransformString=function(a){if(!a)return null;var b=[];return f(a,\"array\")&&f(a[0],\"array\")&&(b=d.path.clone(a)),b.length||K(a).replace(bb,function(a,c,d){var e=[];c.toLowerCase(),d.replace(cb,function(a,b){b&&e.push(+b)}),b.push([c].concat(e))}),b.toString=d.path.toString,b},qb=new RegExp(\"^[a-z][\"+Y+\"]*-?\\\\.?\\\\d\");d._.transform2matrix=p,d._unit2px=s,d._.getSomeDefs=r,d.select=function(a){return z(I.doc.querySelector(a))},d.selectAll=function(a){for(var b=I.doc.querySelectorAll(a),c=(d.set||Array)(),e=0;ej;j++){d=f[j],b(d,\"fill\"),b(d,\"stroke\"),b(d,\"filter\"),b(d,\"mask\"),b(d,\"clip-path\"),c(d);var l=e(d.node,\"id\");l&&(e(d.node,{id:d.id}),h.push({old:l,id:d.id}))}for(j=0,k=h.length;k>j;j++){var m=i[h[j].old];if(m)for(var n=0,o=m.length;o>n;n++)m[n](h[j].id)}}function h(a,b,c){return function(d){var e=d.slice(a,b);return 1==e.length&&(e=e[0]),c?c(e):e}}function i(a){return function(){var b=a?\"<\"+this.type:\"\",c=this.node.attributes,d=this.node.childNodes;if(a)for(var e=0,f=c.length;f>e;e++)b+=\" \"+c[e].name+'=\"'+c[e].value.replace(/\"/g,'\\\\\"')+'\"';if(d.length){for(a&&(b+=\">\"),e=0,f=d.length;f>e;e++)3==d[e].nodeType?b+=d[e].nodeValue:1==d[e].nodeType&&(b+=z(d[e]).toString());a&&(b+=\"\"+this.type+\">\")}else a&&(b+=\"/>\");return b}}a.attr=function(a,c){var d=this;if(d.node,!a)return d;if(f(a,\"string\")){if(!(arguments.length>1))return v(b(\"snap.util.getattr.\"+a,d));var e={};e[a]=c,a=e}for(var g in a)a[J](g)&&b(\"snap.util.attr.\"+g,d,a[g]);return d},a.getBBox=function(a){var b=this;if(\"use\"==b.type&&(b=b.original),b.removed)return{};var c=b._;return a?((c.dirty||!c.bboxwt)&&(b.realPath=d.path.get[b.type](b),c.bboxwt=d.path.getBBox(b.realPath),c.bboxwt.toString=m,c.dirty=0),d._.box(c.bboxwt)):((c.dirty||c.dirtyT||!c.bbox)&&((c.dirty||!b.realPath)&&(c.bboxwt=0,b.realPath=d.path.get[b.type](b)),c.bbox=d.path.getBBox(d.path.map(b.realPath,b.matrix)),c.bbox.toString=m,c.dirty=c.dirtyT=0),d._.box(c.bbox))};var j=function(){return this.string};a.transform=function(a){var b=this._;if(null==a){var c=new n(this.node.getCTM()),d=q(this),f=d.toTransformString(),g=K(d)==K(this.matrix)?b.transform:f;return{string:g,globalMatrix:c,localMatrix:d,diffMatrix:c.clone().add(d.invert()),global:c.toTransformString(),local:f,toString:j}}return a instanceof n&&(a=a.toTransformString()),q(this,a),this.node&&(\"linearGradient\"==this.type||\"radialGradient\"==this.type?e(this.node,{gradientTransform:this.matrix}):\"pattern\"==this.type?e(this.node,{patternTransform:this.matrix}):e(this.node,{transform:this.matrix})),this},a.parent=function(){return z(this.node.parentNode)},a.append=a.add=function(a){if(\"set\"==a.type){var b=this;return a.forEach(function(a){b.append(a)}),this}return a=z(a),this.node.appendChild(a.node),a.paper=this.paper,this},a.prepend=function(a){return a=z(a),this.node.insertBefore(a.node,this.node.firstChild),a.paper=this.paper,this},a.before=function(a){return a=z(a),this.node.parentNode.insertBefore(a.node,this.node),a.paper=this.paper,this},a.after=function(a){return a=z(a),this.node.parentNode.insertBefore(a.node,this.node.nextSibling),a.paper=this.paper,this},a.insertBefore=function(a){return a=z(a),a.node.parentNode.insertBefore(this.node,a.node),this.paper=a.paper,this},a.insertAfter=function(a){return a=z(a),a.node.parentNode.insertBefore(this.node,a.node.nextSibling),this.paper=a.paper,this},a.remove=function(){return this.node.parentNode&&this.node.parentNode.removeChild(this.node),delete this.paper,this.removed=!0,this},a.select=function(a){return z(this.node.querySelector(a))},a.selectAll=function(a){for(var b=this.node.querySelectorAll(a),c=(d.set||Array)(),e=0;eb;b++)a[b].stop();return this},a.animate=function(a,d,e,g){\"function\"!=typeof e||e.length||(g=e,e=c.linear),a instanceof k&&(g=a.callback,e=a.easing,d=e.dur,a=a.attr);var i,j,l,m,n=[],o=[],p={},q=this;for(var r in a)if(a[J](r)){q.equal?(m=q.equal(r,K(a[r])),i=m.from,j=m.to,l=m.f):(i=+q.attr(r),j=+a[r]);var s=f(i,\"array\")?i.length:1;p[r]=h(n.length,n.length+s,l),n=n.concat(i),o=o.concat(j)}var t=c.time(),u=c(n,o,t,t+d,c.time,function(a){var b={};for(var c in p)p[J](c)&&(b[c]=p[c](a));q.attr(b)},e);return q.anims[u.id]=u,u._attrs=a,u._callback=g,b.once(\"mina.finish.\"+u.id,function(){delete q.anims[u.id],g&&g.call(q)}),b.once(\"mina.stop.\"+u.id,function(){delete q.anims[u.id]}),q};var l={};a.data=function(a,c){var e=l[this.id]=l[this.id]||{};if(1==arguments.length){if(d.is(a,\"object\")){for(var f in a)a[J](f)&&this.data(f,a[f]);return this}return b(\"snap.data.get.\"+this.id,this,e[a],a),e[a]}return e[a]=c,b(\"snap.data.set.\"+this.id,this,c,a),this},a.removeData=function(a){return null==a?l[this.id]={}:l[this.id]&&delete l[this.id][a],this},a.toString=i(1),a.innerSVG=i()}(u.prototype),d.parse=function(a){var c=I.doc.createDocumentFragment(),d=c;return b.on(\"elemental.tag\",function(a,b){var c=e(a);b&&e(c,b),d.appendChild(c),d=c}),b.on(\"elemental.text\",function(a){d.appendChild(I.doc.createTextNode(a))}),b.on(\"elemental./tag\",function(){d=d.parentNode}),b.on(\"elemental.eof\",function(){b.off(\"elemental.*\"),b(\"snap.parsed\",c)}),elemental().parse(a).end(),new w(c)},w.prototype.select=u.prototype.select,w.prototype.selectAll=u.prototype.selectAll,d.fragment=function(){for(var a=Array.prototype.slice.call(arguments,0),b=I.doc.createDocumentFragment(),c=0,e=a.length;e>c;c++){var f=a[c];f.node&&f.node.nodeType&&b.appendChild(f.node),f.nodeType&&b.appendChild(f),\"string\"==typeof f&&b.appendChild(d.parse(f).node)}return new w(b)},function(a){a.el=function(a,b){return x(a,this.node).attr(b)},a.rect=function(a,b,c,d,e,g){var h=x(\"rect\",this.node);return null==g&&(g=e),f(a,\"object\")&&\"x\"in a?h.attr(a):null!=a&&(h.attr({x:a,y:b,width:c,height:d}),null!=e&&h.attr({rx:e,ry:g})),h},a.circle=function(a,b,c){var d=x(\"circle\",this.node);return f(a,\"object\")&&\"cx\"in a?d.attr(a):null!=a&&d.attr({cx:a,cy:b,r:c}),d},a.image=function(a,b,c,d,g){var h=x(\"image\",this.node);if(f(a,\"object\")&&\"src\"in a)h.attr(a);else if(null!=a){var i={\"xlink:href\":a,preserveAspectRatio:\"none\"};null!=b&&null!=c&&(i.x=b,i.y=c),null!=d&&null!=g?(i.width=d,i.height=g):ib(a,function(){e(h.node,{width:this.offsetWidth,height:this.offsetHeight})}),e(h.node,i)}return h},a.ellipse=function(a,b,c,d){var e=x(\"ellipse\",this.node);return f(a,\"object\")&&\"cx\"in a?e.attr(a):null!=a&&e.attr({cx:a,cy:b,rx:c,ry:d}),e},a.path=function(a){var b=x(\"path\",this.node);return f(a,\"object\")&&!f(a,\"array\")?b.attr(a):a&&b.attr({d:a}),b},a.group=a.g=function(b){var c=x(\"g\",this.node);c.add=t;for(var d in a)a[J](d)&&(c[d]=a[d]);return 1==arguments.length&&b&&!b.type?c.attr(b):arguments.length&&c.add(Array.prototype.slice.call(arguments,0)),c},a.text=function(a,b,c){var d=x(\"text\",this.node);return f(a,\"object\")?d.attr(a):null!=a&&d.attr({x:a,y:b,text:c||\"\"}),d},a.line=function(a,b,c,d){var e=x(\"line\",this.node);return f(a,\"object\")?e.attr(a):null!=a&&e.attr({x1:a,x2:c,y1:b,y2:d}),e},a.polyline=function(a){arguments.length>1&&(a=Array.prototype.slice.call(arguments,0));var b=x(\"polyline\",this.node);return f(a,\"object\")&&!f(a,\"array\")?b.attr(a):null!=a&&b.attr({points:a}),b},a.polygon=function(a){arguments.length>1&&(a=Array.prototype.slice.call(arguments,0));var b=x(\"polygon\",this.node);return f(a,\"object\")&&!f(a,\"array\")?b.attr(a):null!=a&&b.attr({points:a}),b},function(){a.gradient=function(a){return D(this.defs,a)},a.gradientLinear=function(a,b,c,d){return E(this.defs,a,b,c,d)},a.gradientRadial=function(a,b,c,d,e){return F(this.defs,a,b,c,d,e)},a.toString=function(){var a,b=I.doc.createDocumentFragment(),c=I.doc.createElement(\"div\"),d=this.node.cloneNode(!0);return b.appendChild(c),c.appendChild(d),e(d,{xmlns:\"http://www.w3.org/2000/svg\"}),a=c.innerHTML,b.removeChild(b.firstChild),a},a.clear=function(){for(var a,b=this.node.firstChild;b;)a=b.nextSibling,\"defs\"!=b.tagName&&b.parentNode.removeChild(b),b=a}}()}(y.prototype),d.ajax=function(a,c,d,e){var g=new XMLHttpRequest,h=fb();if(g){if(f(c,\"function\"))e=d,d=c,c=null;else if(f(c,\"object\")){var i=[];for(var j in c)c.hasOwnProperty(j)&&i.push(encodeURIComponent(j)+\"=\"+encodeURIComponent(c[j]));c=i.join(\"&\")}return g.open(c?\"POST\":\"GET\",a,!0),g.setRequestHeader(\"X-Requested-With\",\"XMLHttpRequest\"),c&&g.setRequestHeader(\"Content-type\",\"application/x-www-form-urlencoded\"),d&&(b.once(\"snap.ajax.\"+h+\".0\",d),b.once(\"snap.ajax.\"+h+\".200\",d),b.once(\"snap.ajax.\"+h+\".304\",d)),g.onreadystatechange=function(){4==g.readyState&&b(\"snap.ajax.\"+h+\".\"+g.status,e,g)},4==g.readyState?g:(g.send(c),g)}},d.load=function(a,b,c){d.ajax(a,function(a){var e=d.parse(a.responseText);c?b.call(c,e):b(e)})},b.on(\"snap.util.attr.mask\",function(a){if(a instanceof u||a instanceof w){if(b.stop(),a instanceof w&&1==a.node.childNodes.length&&(a=a.node.firstChild,r(this).appendChild(a),a=z(a)),\"mask\"==a.type)var c=a;else c=x(\"mask\",r(this)),c.node.appendChild(a.node),!c.node.id&&e(c.node,{id:c.id});e(this.node,{mask:\"url(#\"+c.id+\")\"})}}),function(a){b.on(\"snap.util.attr.clip\",a),b.on(\"snap.util.attr.clip-path\",a),b.on(\"snap.util.attr.clipPath\",a)}(function(a){if(a instanceof u||a instanceof w){if(b.stop(),\"clipPath\"==a.type)var c=a;else c=x(\"clipPath\",r(this)),c.node.appendChild(a.node),!c.node.id&&e(c.node,{id:c.id});e(this.node,{\"clip-path\":\"url(#\"+c.id+\")\"})}}),b.on(\"snap.util.attr.fill\",G(\"fill\")),b.on(\"snap.util.attr.stroke\",G(\"stroke\"));var rb=/^([lr])(?:\\(([^)]*)\\))?(.*)$/i;b.on(\"snap.util.grad.parse\",function(a){a=K(a);var b=a.match(rb);if(!b)return null;var c=b[1],d=b[2],e=b[3];return d=d.split(/\\s*,\\s*/).map(function(a){return+a==a?+a:a}),1==d.length&&0==d[0]&&(d=[]),e=e.split(\"-\"),e=e.map(function(a){a=a.split(\":\");var b={color:a[0]};return a[1]&&(b.offset=a[1]),b}),{type:c,params:d,stops:e}}),b.on(\"snap.util.attr.d\",function(a){b.stop(),f(a,\"array\")&&f(a[0],\"array\")&&(a=d.path.toString.call(a)),a=K(a),a.match(/[ruo]/i)&&(a=d.path.toAbsolute(a)),e(this.node,{d:a})})(-1),b.on(\"snap.util.attr.#text\",function(a){b.stop(),a=K(a);for(var c=I.doc.createTextNode(a);this.node.firstChild;)this.node.removeChild(this.node.firstChild);this.node.appendChild(c)})(-1),b.on(\"snap.util.attr.path\",function(a){b.stop(),this.attr({d:a})})(-1),b.on(\"snap.util.attr.viewBox\",function(a){var c;c=f(a,\"object\")&&\"x\"in a?[a.x,a.y,a.width,a.height].join(\" \"):f(a,\"array\")?a.join(\" \"):a,e(this.node,{viewBox:c}),b.stop()})(-1),b.on(\"snap.util.attr.transform\",function(a){this.transform(a),b.stop()})(-1),b.on(\"snap.util.attr.r\",function(a){\"rect\"==this.type&&(b.stop(),e(this.node,{rx:a,ry:a}))})(-1),b.on(\"snap.util.attr.text\",function(a){if(\"text\"==this.type){for(var c=this.node,d=function(a){var b=e(\"tspan\");if(f(a,\"array\"))for(var c=0;cr;r++){if(l=a[r],\"M\"==l[0])j=+l[1],k=+l[2];else{if(m=g(j,k,l[1],l[2],l[3],l[4],l[5],l[6]),q+m>f){if(d&&!p.start){if(n=g(j,k,l[1],l[2],l[3],l[4],l[5],l[6],f-q),o+=[\"C\"+e(n.start.x),e(n.start.y),e(n.m.x),e(n.m.y),e(n.x),e(n.y)],h)return o;p.start=o,o=[\"M\"+e(n.x),e(n.y)+\"C\"+e(n.n.x),e(n.n.y),e(n.end.x),e(n.end.y),e(l[5]),e(l[6])].join(),q+=m,j=+l[5],k=+l[6];continue}if(!c&&!d)return n=g(j,k,l[1],l[2],l[3],l[4],l[5],l[6],f-q)}q+=m,j=+l[5],k=+l[6]}o+=l.shift()+l}return p.end=o,n=c?q:d?p:i(j,k,l[0],l[1],l[2],l[3],l[4],l[5],1)},null,a._.clone)}function i(a,b,c,d,e,f,g,h,i){var j=1-i,k=S(j,3),l=S(j,2),m=i*i,n=m*i,o=k*a+3*l*i*c+3*j*i*i*e+n*g,p=k*b+3*l*i*d+3*j*i*i*f+n*h,q=a+2*i*(c-a)+m*(e-2*c+a),r=b+2*i*(d-b)+m*(f-2*d+b),s=c+2*i*(e-c)+m*(g-2*e+c),t=d+2*i*(f-d)+m*(h-2*f+d),u=j*a+i*c,v=j*b+i*d,w=j*e+i*g,x=j*f+i*h,y=90-180*O.atan2(q-s,r-t)/P;return{x:o,y:p,m:{x:q,y:r},n:{x:s,y:t},start:{x:u,y:v},end:{x:w,y:x},alpha:y}}function j(b,c,e,f,g,h,i,j){a.is(b,\"array\")||(b=[b,c,e,f,g,h,i,j]);var k=E.apply(null,b);return d(k.min.x,k.min.y,k.max.x-k.min.x,k.max.y-k.min.y)}function k(a,b,c){return b>=a.x&&b<=a.x+a.width&&c>=a.y&&c<=a.y+a.height}function l(a,b){return a=d(a),b=d(b),k(b,a.x,a.y)||k(b,a.x2,a.y)||k(b,a.x,a.y2)||k(b,a.x2,a.y2)||k(a,b.x,b.y)||k(a,b.x2,b.y)||k(a,b.x,b.y2)||k(a,b.x2,b.y2)||(a.xb.x||b.xa.x)&&(a.yb.y||b.ya.y)}function m(a,b,c,d,e){var f=-3*b+9*c-9*d+3*e,g=a*f+6*b-12*c+6*d;return a*g-3*b+3*c}function n(a,b,c,d,e,f,g,h,i){null==i&&(i=1),i=i>1?1:0>i?0:i;for(var j=i/2,k=12,l=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],n=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],o=0,p=0;k>p;p++){var q=j*l[p]+j,r=m(q,a,c,e,g),s=m(q,b,d,f,h),t=r*r+s*s;o+=n[p]*O.sqrt(t)}return j*o}function o(a,b,c,d,e,f,g,h,i){if(!(0>i||n(a,b,c,d,e,f,g,h)o;)l/=2,m+=(i>j?1:-1)*l,j=n(a,b,c,d,e,f,g,h,m);return m}}function p(a,b,c,d,e,f,g,h){if(!(R(a,c)R(e,g)||R(b,d)R(f,h))){var i=(a*d-b*c)*(e-g)-(a-c)*(e*h-f*g),j=(a*d-b*c)*(f-h)-(b-d)*(e*h-f*g),k=(a-c)*(f-h)-(b-d)*(e-g);if(k){var l=i/k,m=j/k,n=+l.toFixed(2),o=+m.toFixed(2);if(!(n<+Q(a,c).toFixed(2)||n>+R(a,c).toFixed(2)||n<+Q(e,g).toFixed(2)||n>+R(e,g).toFixed(2)||o<+Q(b,d).toFixed(2)||o>+R(b,d).toFixed(2)||o<+Q(f,h).toFixed(2)||o>+R(f,h).toFixed(2)))return{x:l,y:m}}}}function q(a,b,c){var d=j(a),e=j(b);if(!l(d,e))return c?0:[];for(var f=n.apply(0,a),g=n.apply(0,b),h=~~(f/5),k=~~(g/5),m=[],o=[],q={},r=c?0:[],s=0;h+1>s;s++){var t=i.apply(0,a.concat(s/h));m.push({x:t.x,y:t.y,t:s/h})}for(s=0;k+1>s;s++)t=i.apply(0,b.concat(s/k)),o.push({x:t.x,y:t.y,t:s/k});for(s=0;h>s;s++)for(var u=0;k>u;u++){var v=m[s],w=m[s+1],x=o[u],y=o[u+1],z=T(w.x-v.x)<.001?\"y\":\"x\",A=T(y.x-x.x)<.001?\"y\":\"x\",B=p(v.x,v.y,w.x,w.y,x.x,x.y,y.x,y.y);if(B){if(q[B.x.toFixed(4)]==B.y.toFixed(4))continue;q[B.x.toFixed(4)]=B.y.toFixed(4);var C=v.t+T((B[z]-v[z])/(w[z]-v[z]))*(w.t-v.t),D=x.t+T((B[A]-x[A])/(y[A]-x[A]))*(y.t-x.t);C>=0&&1>=C&&D>=0&&1>=D&&(c?r++:r.push({x:B.x,y:B.y,t1:C,t2:D}))}}return r}function r(a,b){return t(a,b)}function s(a,b){return t(a,b,1)}function t(a,b,c){a=F(a),b=F(b);for(var d,e,f,g,h,i,j,k,l,m,n=c?0:[],o=0,p=a.length;p>o;o++){var r=a[o];if(\"M\"==r[0])d=h=r[1],e=i=r[2];else{\"C\"==r[0]?(l=[d,e].concat(r.slice(1)),d=l[6],e=l[7]):(l=[d,e,d,e,h,i,h,i],d=h,e=i);for(var s=0,t=b.length;t>s;s++){var u=b[s];if(\"M\"==u[0])f=j=u[1],g=k=u[2];else{\"C\"==u[0]?(m=[f,g].concat(u.slice(1)),f=m[6],g=m[7]):(m=[f,g,f,g,j,k,j,k],f=j,g=k);var v=q(l,m,c);if(c)n+=v;else{for(var w=0,x=v.length;x>w;w++)v[w].segment1=o,v[w].segment2=s,v[w].bez1=l,v[w].bez2=m;n=n.concat(v)}}}}}return n}function u(a,b,c){var d=v(a);return k(d,b,c)&&1==t(a,[[\"M\",b,c],[\"H\",d.x2+10]],1)%2}function v(a){var b=c(a);if(b.bbox)return K(b.bbox);if(!a)return d();a=F(a);for(var e,f=0,g=0,h=[],i=[],j=0,k=a.length;k>j;j++)if(e=a[j],\"M\"==e[0])f=e[1],g=e[2],h.push(f),i.push(g);else{var l=E(f,g,e[1],e[2],e[3],e[4],e[5],e[6]);h=h.concat(l.min.x,l.max.x),i=i.concat(l.min.y,l.max.y),f=e[5],g=e[6]}var m=Q.apply(0,h),n=Q.apply(0,i),o=R.apply(0,h),p=R.apply(0,i),q=d(m,n,o-m,p-n);return b.bbox=K(q),q}function w(a,b,c,d,f){if(f)return[[\"M\",a+f,b],[\"l\",c-2*f,0],[\"a\",f,f,0,0,1,f,f],[\"l\",0,d-2*f],[\"a\",f,f,0,0,1,-f,f],[\"l\",2*f-c,0],[\"a\",f,f,0,0,1,-f,-f],[\"l\",0,2*f-d],[\"a\",f,f,0,0,1,f,-f],[\"z\"]];var g=[[\"M\",a,b],[\"l\",c,0],[\"l\",0,d],[\"l\",-c,0],[\"z\"]];return g.toString=e,g}function x(a,b,c,d,f){if(null==f&&null==d&&(d=c),null!=f)var g=Math.PI/180,h=a+c*Math.cos(-d*g),i=a+c*Math.cos(-f*g),j=b+c*Math.sin(-d*g),k=b+c*Math.sin(-f*g),l=[[\"M\",h,j],[\"A\",c,c,0,+(f-d>180),0,i,k]];else l=[[\"M\",a,b],[\"m\",0,-d],[\"a\",c,d,0,1,1,0,2*d],[\"a\",c,d,0,1,1,0,-2*d],[\"z\"]];return l.toString=e,l}function y(b){var d=c(b),g=String.prototype.toLowerCase;if(d.rel)return f(d.rel);a.is(b,\"array\")&&a.is(b&&b[0],\"array\")||(b=a.parsePathString(b));var h=[],i=0,j=0,k=0,l=0,m=0;\"M\"==b[0][0]&&(i=b[0][1],j=b[0][2],k=i,l=j,m++,h.push([\"M\",i,j]));for(var n=m,o=b.length;o>n;n++){var p=h[n]=[],q=b[n];if(q[0]!=g.call(q[0]))switch(p[0]=g.call(q[0]),p[0]){case\"a\":p[1]=q[1],p[2]=q[2],p[3]=q[3],p[4]=q[4],p[5]=q[5],p[6]=+(q[6]-i).toFixed(3),p[7]=+(q[7]-j).toFixed(3);break;case\"v\":p[1]=+(q[1]-j).toFixed(3);break;case\"m\":k=q[1],l=q[2];default:for(var r=1,s=q.length;s>r;r++)p[r]=+(q[r]-(r%2?i:j)).toFixed(3)}else{p=h[n]=[],\"m\"==q[0]&&(k=q[1]+i,l=q[2]+j);for(var t=0,u=q.length;u>t;t++)h[n][t]=q[t]}var v=h[n].length;switch(h[n][0]){case\"z\":i=k,j=l;break;case\"h\":i+=+h[n][v-1];break;case\"v\":j+=+h[n][v-1];break;default:i+=+h[n][v-2],j+=+h[n][v-1]}}return h.toString=e,d.rel=f(h),h}function z(b){var d=c(b);if(d.abs)return f(d.abs);if(J(b,\"array\")&&J(b&&b[0],\"array\")||(b=a.parsePathString(b)),!b||!b.length)return[[\"M\",0,0]];var g,h=[],i=0,j=0,k=0,l=0,m=0;\"M\"==b[0][0]&&(i=+b[0][1],j=+b[0][2],k=i,l=j,m++,h[0]=[\"M\",i,j]);for(var n,o,p=3==b.length&&\"M\"==b[0][0]&&\"R\"==b[1][0].toUpperCase()&&\"Z\"==b[2][0].toUpperCase(),q=m,r=b.length;r>q;q++){if(h.push(n=[]),o=b[q],g=o[0],g!=g.toUpperCase())switch(n[0]=g.toUpperCase(),n[0]){case\"A\":n[1]=o[1],n[2]=o[2],n[3]=o[3],n[4]=o[4],n[5]=o[5],n[6]=+(o[6]+i),n[7]=+(o[7]+j);break;case\"V\":n[1]=+o[1]+j;break;case\"H\":n[1]=+o[1]+i;break;case\"R\":for(var s=[i,j].concat(o.slice(1)),t=2,u=s.length;u>t;t++)s[t]=+s[t]+i,s[++t]=+s[t]+j;h.pop(),h=h.concat(H(s,p));break;case\"O\":h.pop(),s=x(i,j,o[1],o[2]),s.push(s[0]),h=h.concat(s);break;case\"U\":h.pop(),h=h.concat(x(i,j,o[1],o[2],o[3])),n=[\"U\"].concat(h[h.length-1].slice(-2));break;case\"M\":k=+o[1]+i,l=+o[2]+j;default:for(t=1,u=o.length;u>t;t++)n[t]=+o[t]+(t%2?i:j)}else if(\"R\"==g)s=[i,j].concat(o.slice(1)),h.pop(),h=h.concat(H(s,p)),n=[\"R\"].concat(o.slice(-2));else if(\"O\"==g)h.pop(),s=x(i,j,o[1],o[2]),s.push(s[0]),h=h.concat(s);else if(\"U\"==g)h.pop(),h=h.concat(x(i,j,o[1],o[2],o[3])),n=[\"U\"].concat(h[h.length-1].slice(-2));else for(var v=0,w=o.length;w>v;v++)n[v]=o[v];if(g=g.toUpperCase(),\"O\"!=g)switch(n[0]){case\"Z\":i=k,j=l;break;case\"H\":i=n[1];break;case\"V\":j=n[1];break;case\"M\":k=n[n.length-2],l=n[n.length-1];default:i=n[n.length-2],j=n[n.length-1]}}return h.toString=e,d.abs=f(h),h}function A(a,b,c,d){return[a,b,c,d,c,d]}function B(a,b,c,d,e,f){var g=1/3,h=2/3;return[g*a+h*c,g*b+h*d,g*e+h*c,g*f+h*d,e,f]}function C(b,c,d,e,f,g,h,i,j,k){var l,m=120*P/180,n=P/180*(+f||0),o=[],p=a._.cacher(function(a,b,c){var d=a*O.cos(c)-b*O.sin(c),e=a*O.sin(c)+b*O.cos(c);return{x:d,y:e}});if(k)y=k[0],z=k[1],w=k[2],x=k[3];else{l=p(b,c,-n),b=l.x,c=l.y,l=p(i,j,-n),i=l.x,j=l.y;var q=(O.cos(P/180*f),O.sin(P/180*f),(b-i)/2),r=(c-j)/2,s=q*q/(d*d)+r*r/(e*e);s>1&&(s=O.sqrt(s),d=s*d,e=s*e);var t=d*d,u=e*e,v=(g==h?-1:1)*O.sqrt(T((t*u-t*r*r-u*q*q)/(t*r*r+u*q*q))),w=v*d*r/e+(b+i)/2,x=v*-e*q/d+(c+j)/2,y=O.asin(((c-x)/e).toFixed(9)),z=O.asin(((j-x)/e).toFixed(9));y=w>b?P-y:y,z=w>i?P-z:z,0>y&&(y=2*P+y),0>z&&(z=2*P+z),h&&y>z&&(y-=2*P),!h&&z>y&&(z-=2*P)}var A=z-y;if(T(A)>m){var B=z,D=i,E=j;z=y+m*(h&&z>y?1:-1),i=w+d*O.cos(z),j=x+e*O.sin(z),o=C(i,j,d,e,f,0,h,D,E,[z,B,w,x])}A=z-y;var F=O.cos(y),G=O.sin(y),H=O.cos(z),I=O.sin(z),J=O.tan(A/4),K=4/3*d*J,L=4/3*e*J,M=[b,c],N=[b+K*G,c-L*F],Q=[i+K*I,j-L*H],R=[i,j];if(N[0]=2*M[0]-N[0],N[1]=2*M[1]-N[1],k)return[N,Q,R].concat(o);o=[N,Q,R].concat(o).join().split(\",\");for(var S=[],U=0,V=o.length;V>U;U++)S[U]=U%2?p(o[U-1],o[U],n).y:p(o[U],o[U+1],n).x;return S}function D(a,b,c,d,e,f,g,h,i){var j=1-i;return{x:S(j,3)*a+3*S(j,2)*i*c+3*j*i*i*e+S(i,3)*g,y:S(j,3)*b+3*S(j,2)*i*d+3*j*i*i*f+S(i,3)*h}}function E(a,b,c,d,e,f,g,h){var i,j=e-2*c+a-(g-2*e+c),k=2*(c-a)-2*(e-c),l=a-c,m=(-k+O.sqrt(k*k-4*j*l))/2/j,n=(-k-O.sqrt(k*k-4*j*l))/2/j,o=[b,h],p=[a,g];return T(m)>\"1e12\"&&(m=.5),T(n)>\"1e12\"&&(n=.5),m>0&&1>m&&(i=D(a,b,c,d,e,f,g,h,m),p.push(i.x),o.push(i.y)),n>0&&1>n&&(i=D(a,b,c,d,e,f,g,h,n),p.push(i.x),o.push(i.y)),j=f-2*d+b-(h-2*f+d),k=2*(d-b)-2*(f-d),l=b-d,m=(-k+O.sqrt(k*k-4*j*l))/2/j,n=(-k-O.sqrt(k*k-4*j*l))/2/j,T(m)>\"1e12\"&&(m=.5),T(n)>\"1e12\"&&(n=.5),m>0&&1>m&&(i=D(a,b,c,d,e,f,g,h,m),p.push(i.x),o.push(i.y)),n>0&&1>n&&(i=D(a,b,c,d,e,f,g,h,n),p.push(i.x),o.push(i.y)),{min:{x:Q.apply(0,p),y:Q.apply(0,o)},max:{x:R.apply(0,p),y:R.apply(0,o)}}}function F(a,b){var d=!b&&c(a);if(!b&&d.curve)return f(d.curve);for(var e=z(a),g=b&&z(b),h={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},i={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},j=(function(a,b){var c,d;if(!a)return[\"C\",b.x,b.y,b.x,b.y,b.x,b.y];switch(!(a[0]in{T:1,Q:1})&&(b.qx=b.qy=null),a[0]){case\"M\":b.X=a[1],b.Y=a[2];break;case\"A\":a=[\"C\"].concat(C.apply(0,[b.x,b.y].concat(a.slice(1))));break;case\"S\":c=b.x+(b.x-(b.bx||b.x)),d=b.y+(b.y-(b.by||b.y)),a=[\"C\",c,d].concat(a.slice(1));break;case\"T\":b.qx=b.x+(b.x-(b.qx||b.x)),b.qy=b.y+(b.y-(b.qy||b.y)),a=[\"C\"].concat(B(b.x,b.y,b.qx,b.qy,a[1],a[2]));break;case\"Q\":b.qx=a[1],b.qy=a[2],a=[\"C\"].concat(B(b.x,b.y,a[1],a[2],a[3],a[4]));break;case\"L\":a=[\"C\"].concat(A(b.x,b.y,a[1],a[2]));break;case\"H\":a=[\"C\"].concat(A(b.x,b.y,a[1],b.y));break;case\"V\":a=[\"C\"].concat(A(b.x,b.y,b.x,a[1]));break;case\"Z\":a=[\"C\"].concat(A(b.x,b.y,b.X,b.Y))}return a}),k=function(a,b){if(a[b].length>7){a[b].shift();for(var c=a[b];c.length;)a.splice(b++,0,[\"C\"].concat(c.splice(0,6)));a.splice(b,1),n=R(e.length,g&&g.length||0)}},l=function(a,b,c,d,f){a&&b&&\"M\"==a[f][0]&&\"M\"!=b[f][0]&&(b.splice(f,0,[\"M\",d.x,d.y]),c.bx=0,c.by=0,c.x=a[f][1],c.y=a[f][2],n=R(e.length,g&&g.length||0))},m=0,n=R(e.length,g&&g.length||0);n>m;m++){e[m]=j(e[m],h),k(e,m),g&&(g[m]=j(g[m],i)),g&&k(g,m),l(e,g,h,i,m),l(g,e,i,h,m);var o=e[m],p=g&&g[m],q=o.length,r=g&&p.length;h.x=o[q-2],h.y=o[q-1],h.bx=N(o[q-4])||h.x,h.by=N(o[q-3])||h.y,i.bx=g&&(N(p[r-4])||i.x),i.by=g&&(N(p[r-3])||i.y),i.x=g&&p[r-2],i.y=g&&p[r-1]}return g||(d.curve=f(e)),g?[e,g]:e}function G(a,b){if(!b)return a;var c,d,e,f,g,h,i;for(a=F(a),e=0,g=a.length;g>e;e++)for(i=a[e],f=1,h=i.length;h>f;f+=2)c=b.x(i[f],i[f+1]),d=b.y(i[f],i[f+1]),i[f]=c,i[f+1]=d;return a}function H(a,b){for(var c=[],d=0,e=a.length;e-2*!b>d;d+=2){var f=[{x:+a[d-2],y:+a[d-1]},{x:+a[d],y:+a[d+1]},{x:+a[d+2],y:+a[d+3]},{x:+a[d+4],y:+a[d+5]}];b?d?e-4==d?f[3]={x:+a[0],y:+a[1]}:e-2==d&&(f[2]={x:+a[0],y:+a[1]},f[3]={x:+a[2],y:+a[3]}):f[0]={x:+a[e-2],y:+a[e-1]}:e-4==d?f[3]=f[2]:d||(f[0]={x:+a[d],y:+a[d+1]}),c.push([\"C\",(-f[0].x+6*f[1].x+f[2].x)/6,(-f[0].y+6*f[1].y+f[2].y)/6,(f[1].x+6*f[2].x-f[3].x)/6,(f[1].y+6*f[2].y-f[3].y)/6,f[2].x,f[2].y])}return c}var I=b.prototype,J=a.is,K=a._.clone,L=\"hasOwnProperty\",M=/,?([a-z]),?/gi,N=parseFloat,O=Math,P=O.PI,Q=O.min,R=O.max,S=O.pow,T=O.abs,U=h(1),V=h(),W=h(0,1),X=a._unit2px,Y={path:function(a){return a.attr(\"path\")},circle:function(a){var b=X(a);return x(b.cx,b.cy,b.r)},ellipse:function(a){var b=X(a);return x(b.cx,b.cy,b.rx,b.ry)},rect:function(a){var b=X(a);return w(b.x,b.y,b.width,b.height,b.rx,b.ry)},image:function(a){var b=X(a);return w(b.x,b.y,b.width,b.height)},text:function(a){var b=a.node.getBBox();return w(b.x,b.y,b.width,b.height)},g:function(a){var b=a.node.getBBox();return w(b.x,b.y,b.width,b.height)},symbol:function(a){var b=a.getBBox();return w(b.x,b.y,b.width,b.height)},polyline:function(a){return\"M\"+a.attr(\"points\")},polygon:function(a){return\"M\"+a.attr(\"points\")+\"z\"}};a.path=c,a.path.getTotalLength=U,a.path.getPointAtLength=V,a.path.getSubpath=function(a,b,c){if(this.getTotalLength(a)-c<1e-6)return W(a,b).end;var d=W(a,c,1);return b?W(d,b).end:d},I.getTotalLength=function(){return this.node.getTotalLength?this.node.getTotalLength():void 0},I.getPointAtLength=function(a){return V(this.attr(\"d\"),a)},I.getSubpath=function(b,c){return a.path.getSubpath(this.attr(\"d\"),b,c)},a._.box=d,a.path.findDotsAtSegment=i,a.path.bezierBBox=j,a.path.isPointInsideBBox=k,a.path.isBBoxIntersect=l,a.path.intersection=r,a.path.intersectionNumber=s,a.path.isPointInside=u,a.path.getBBox=v,a.path.get=Y,a.path.toRelative=y,a.path.toAbsolute=z,a.path.toCubic=F,a.path.map=G,a.path.toString=e,a.path.clone=f}),d.plugin(function(a){var b=Math.max,c=Math.min,d=function(a){if(this.items=[],this.length=0,this.type=\"set\",a)for(var b=0,c=a.length;c>b;b++)a[b]&&(this[this.items.length]=this.items[this.items.length]=a[b],this.length++)},e=d.prototype;e.push=function(){for(var a,b,c=0,d=arguments.length;d>c;c++)a=arguments[c],a&&(b=this.items.length,this[b]=this.items[b]=a,this.length++);return this},e.pop=function(){return this.length&&delete this[this.length--],this.items.pop()},e.forEach=function(a,b){for(var c=0,d=this.items.length;d>c;c++)if(a.call(b,this.items[c],c)===!1)return this;return this},e.attr=function(a){for(var b=0,c=this.items.length;c>b;b++)this.items[b].attr(a);return this},e.clear=function(){for(;this.length;)this.pop()},e.splice=function(a,e){a=0>a?b(this.length+a,0):a,e=b(0,c(this.length-a,e));var f,g=[],h=[],i=[];for(f=2;ff;f++)h.push(this[a+f]);for(;ff?i[f]:g[f-j];for(f=this.items.length=this.length-=e-j;this[f];)delete this[f++];return new d(h)},e.exclude=function(a){for(var b=0,c=this.length;c>b;b++)if(this[b]==a)return this.splice(b,1),!0;return!1},e.insertAfter=function(a){for(var b=this.items.length;b--;)this.items[b].insertAfter(a);return this},e.getBBox=function(){for(var a=[],d=[],e=[],f=[],g=this.items.length;g--;)if(!this.items[g].removed){var h=this.items[g].getBBox();a.push(h.x),d.push(h.y),e.push(h.x+h.width),f.push(h.y+h.height)}return a=c.apply(0,a),d=c.apply(0,d),e=b.apply(0,e),f=b.apply(0,f),{x:a,y:d,x2:e,y2:f,width:e-a,height:f-d,cx:a+(e-a)/2,cy:d+(f-d)/2}},e.clone=function(a){a=new d;for(var b=0,c=this.items.length;c>b;b++)a.push(this.items[b].clone());return a},e.toString=function(){return\"Snap‘s set\"},e.type=\"set\",a.set=function(){var a=new d;return arguments.length&&a.push.apply(a,Array.prototype.slice.call(arguments,0)),a}}),d.plugin(function(a,b){function c(a){var b=a[0];switch(b.toLowerCase()){case\"t\":return[b,0,0];case\"m\":return[b,1,0,0,1,0,0];case\"r\":return 4==a.length?[b,0,a[2],a[3]]:[b,0];case\"s\":return 5==a.length?[b,1,1,a[3],a[4]]:3==a.length?[b,1,1]:[b,1]}}function d(b,d,e){d=l(d).replace(/\\.{3}|\\u2026/g,b),b=a.parseTransformString(b)||[],d=a.parseTransformString(d)||[];for(var f,g,j,k,m=Math.max(b.length,d.length),n=[],o=[],p=0;m>p;p++){if(j=b[p]||c(d[p]),k=d[p]||c(j),j[0]!=k[0]||\"r\"==j[0].toLowerCase()&&(j[2]!=k[2]||j[3]!=k[3])||\"s\"==j[0].toLowerCase()&&(j[3]!=k[3]||j[4]!=k[4])){b=a._.transform2matrix(b,e()),d=a._.transform2matrix(d,e()),n=[[\"m\",b.a,b.b,b.c,b.d,b.e,b.f]],o=[[\"m\",d.a,d.b,d.c,d.d,d.e,d.f]];break}for(n[p]=[],o[p]=[],f=0,g=Math.max(j.length,k.length);g>f;f++)f in j&&(n[p][f]=j[f]),f in k&&(o[p][f]=k[f])}return{from:i(n),to:i(o),f:h(n)}}function e(a){return a}function f(a){return function(b){return+b.toFixed(3)+a}}function g(b){return a.rgb(b[0],b[1],b[2])}function h(a){var b,c,d,e,f,g,h=0,i=[];for(b=0,c=a.length;c>b;b++){for(f=\"[\",g=['\"'+a[b][0]+'\"'],d=1,e=a[b].length;e>d;d++)g[d]=\"val[\"+h++ +\"]\";f+=g+\"]\",i[b]=f}return Function(\"val\",\"return Snap.path.toString.call([\"+i+\"])\")}function i(a){for(var b=[],c=0,d=a.length;d>c;c++)for(var e=1,f=a[c].length;f>e;e++)b.push(a[c][e]);return b}var j={},k=/[a-z]+$/i,l=String;j.stroke=j.fill=\"colour\",b.prototype.equal=function(b,c){var m,n,o=l(this.attr(b)||\"\"),p=this;if(o==+o&&c==+c)return{from:+o,to:+c,f:e};if(\"colour\"==j[b])return m=a.color(o),n=a.color(c),{from:[m.r,m.g,m.b,m.opacity],to:[n.r,n.g,n.b,n.opacity],f:g};if(\"transform\"==b||\"gradientTransform\"==b||\"patternTransform\"==b)return d(o,c,function(){return p.getBBox(1)});if(\"d\"==b||\"path\"==b)return m=a.path.toCubic(o,c),{from:i(m[0]),to:i(m[1]),f:h(m[0])};var q=o.match(k),r=c.match(k);return q&&q==r?{from:parseFloat(o),to:parseFloat(c),f:f(q)}:{from:this.asPX(b),to:this.asPX(b,c),f:e}}}),d.plugin(function(a,c,d,e){for(var f=c.prototype,g=\"hasOwnProperty\",h=(\"createTouch\"in e.doc),i=[\"click\",\"dblclick\",\"mousedown\",\"mousemove\",\"mouseout\",\"mouseover\",\"mouseup\",\"touchstart\",\"touchmove\",\"touchend\",\"touchcancel\"],j={mousedown:\"touchstart\",mousemove:\"touchmove\",mouseup:\"touchend\"},k=function(a){var b=\"y\"==a?\"scrollTop\":\"scrollLeft\";\r\nreturn e.doc.documentElement[b]||e.doc.body[b]},l=function(){this.returnValue=!1},m=function(){return this.originalEvent.preventDefault()},n=function(){this.cancelBubble=!0},o=function(){return this.originalEvent.stopPropagation()},p=function(){return e.doc.addEventListener?function(a,b,c,d){var e=h&&j[b]?j[b]:b,f=function(e){var f=k(\"y\"),i=k(\"x\"),l=e.clientX+i,n=e.clientY+f;if(h&&j[g](b))for(var p=0,q=e.targetTouches&&e.targetTouches.length;q>p;p++)if(e.targetTouches[p].target==a){var r=e;e=e.targetTouches[p],e.originalEvent=r,e.preventDefault=m,e.stopPropagation=o;break}return c.call(d,e,l,n)};return a.addEventListener(e,f,!1),function(){return a.removeEventListener(e,f,!1),!0}}:e.doc.attachEvent?function(a,b,c,d){var f=function(a){a=a||e.win.event;var b=k(\"y\"),f=k(\"x\"),g=a.clientX+f,h=a.clientY+b;return a.preventDefault=a.preventDefault||l,a.stopPropagation=a.stopPropagation||n,c.call(d,a,g,h)};a.attachEvent(\"on\"+b,f);var g=function(){return a.detachEvent(\"on\"+b,f),!0};return g}:void 0}(),q=[],r=function(c){for(var d,e=c.clientX,f=c.clientY,g=k(\"y\"),i=k(\"x\"),j=q.length;j--;){if(d=q[j],h){for(var l,m=c.touches.length;m--;)if(l=c.touches[m],l.identifier==d.el._drag.id){e=l.clientX,f=l.clientY,(c.originalEvent?c.originalEvent:c).preventDefault();break}}else c.preventDefault();var n=d.el.node;a._.glob,n.nextSibling,n.parentNode,n.style.display,e+=i,f+=g,b(\"snap.drag.move.\"+d.el.id,d.move_scope||d.el,e-d.el._drag.x,f-d.el._drag.y,e,f,c)}},s=function(c){a.unmousemove(r).unmouseup(s);for(var d,e=q.length;e--;)d=q[e],d.el._drag={},b(\"snap.drag.end.\"+d.el.id,d.end_scope||d.start_scope||d.move_scope||d.el,c);q=[]},t=i.length;t--;)!function(b){a[b]=f[b]=function(c,d){return a.is(c,\"function\")&&(this.events=this.events||[],this.events.push({name:b,f:c,unbind:p(this.shape||this.node||e.doc,b,c,d||this)})),this},a[\"un\"+b]=f[\"un\"+b]=function(a){for(var c=this.events||[],d=c.length;d--;)if(c[d].name==b&&(c[d].f==a||!a))return c[d].unbind(),c.splice(d,1),!c.length&&delete this.events,this;return this}}(i[t]);f.hover=function(a,b,c,d){return this.mouseover(a,c).mouseout(b,d||c)},f.unhover=function(a,b){return this.unmouseover(a).unmouseout(b)};var u=[];f.drag=function(c,d,e,f,g,h){function i(i){(i.originalEvent||i).preventDefault();var j=k(\"y\"),l=k(\"x\");this._drag.x=i.clientX+l,this._drag.y=i.clientY+j,this._drag.id=i.identifier,!q.length&&a.mousemove(r).mouseup(s),q.push({el:this,move_scope:f,start_scope:g,end_scope:h}),d&&b.on(\"snap.drag.start.\"+this.id,d),c&&b.on(\"snap.drag.move.\"+this.id,c),e&&b.on(\"snap.drag.end.\"+this.id,e),b(\"snap.drag.start.\"+this.id,g||f||this,i.clientX+l,i.clientY+j,i)}if(!arguments.length){var j;return this.drag(function(a,b){this.attr({transform:j+(j?\"T\":\"t\")+[a,b]})},function(){j=this.transform().local})}return this._drag={},u.push({el:this,start:i}),this.mousedown(i),this},f.undrag=function(){for(var c=u.length;c--;)u[c].el==this&&(this.unmousedown(u[c].start),u.splice(c,1),b.unbind(\"snap.drag.*.\"+this.id));return!u.length&&a.unmousemove(r).unmouseup(s),this}}),d.plugin(function(a,c,d){var e=(c.prototype,d.prototype),f=/^\\s*url\\((.+)\\)/,g=String,h=a._.$;a.filter={},e.filter=function(b){var d=this;\"svg\"!=d.type&&(d=d.paper);var e=a.parse(g(b)),f=a._.id(),i=d.node.offsetWidth,j=d.node.offsetHeight,k=h(\"filter\");return h(k,{id:f,filterUnits:\"userSpaceOnUse\",x:0,y:0,width:i,height:j}),k.appendChild(e.node),d.defs.appendChild(k),new c(k)},b.on(\"snap.util.getattr.filter\",function(){b.stop();var c=h(this.node,\"filter\");if(c){var d=g(c).match(f);return d&&a.select(d[1])}}),b.on(\"snap.util.attr.filter\",function(a){if(a instanceof c&&\"filter\"==a.type){b.stop();var d=a.node.id;d||(h(a.node,{id:a.id}),d=a.id),h(this.node,{filter:\"url(#\"+d+\")\"})}a&&\"none\"!=a||(b.stop(),this.node.removeAttribute(\"filter\"))}),a.filter.blur=function(b,c){null==b&&(b=2);var d=null==c?b:[b,c];return a.format('',{def:d})},a.filter.blur.toString=function(){return this()},a.filter.shadow=function(b,c,d,e){return e=e||\"#000\",null==d&&(d=4),\"string\"==typeof d&&(e=d,d=4),null==b&&(b=0,c=2),null==c&&(c=b),e=a.color(e),a.format('',{color:e,dx:b,dy:c,blur:d})},a.filter.shadow.toString=function(){return this()},a.filter.grayscale=function(b){return null==b&&(b=1),a.format('',{a:.2126+.7874*(1-b),b:.7152-.7152*(1-b),c:.0722-.0722*(1-b),d:.2126-.2126*(1-b),e:.7152+.2848*(1-b),f:.0722-.0722*(1-b),g:.2126-.2126*(1-b),h:.0722+.9278*(1-b)})},a.filter.grayscale.toString=function(){return this()},a.filter.sepia=function(b){return null==b&&(b=1),a.format('',{a:.393+.607*(1-b),b:.769-.769*(1-b),c:.189-.189*(1-b),d:.349-.349*(1-b),e:.686+.314*(1-b),f:.168-.168*(1-b),g:.272-.272*(1-b),h:.534-.534*(1-b),i:.131+.869*(1-b)})},a.filter.sepia.toString=function(){return this()},a.filter.saturate=function(b){return null==b&&(b=1),a.format('',{amount:1-b})},a.filter.saturate.toString=function(){return this()},a.filter.hueRotate=function(b){return b=b||0,a.format('',{angle:b})},a.filter.hueRotate.toString=function(){return this()},a.filter.invert=function(b){return null==b&&(b=1),a.format('',{amount:b,amount2:1-b})},a.filter.invert.toString=function(){return this()},a.filter.brightness=function(b){return null==b&&(b=1),a.format('',{amount:b})},a.filter.brightness.toString=function(){return this()},a.filter.contrast=function(b){return null==b&&(b=1),a.format('',{amount:b,amount2:.5-b/2})},a.filter.contrast.toString=function(){return this()}}),d});","/*!\n * State-based routing for AngularJS\n * @version v1.0.0-beta.1\n * @link https://ui-router.github.io\n * @license MIT License, http://www.opensource.org/licenses/MIT\n */\n(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"angular-ui-router\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"angular-ui-router\"] = factory();\n\telse\n\t\troot[\"angular-ui-router\"] = factory();\n})(this, function() {\nreturn /******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId])\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\texports: {},\n/******/ \t\t\tid: moduleId,\n/******/ \t\t\tloaded: false\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.loaded = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(0);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/**\n\t * Main entry point for angular 1.x build\n\t * @module ng1\n\t */\n\t/** for typedoc */\n\t\"use strict\";\n\tfunction __export(m) {\n\t for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n\t}\n\t__export(__webpack_require__(1));\n\t__export(__webpack_require__(53));\n\t__export(__webpack_require__(55));\n\t__webpack_require__(58);\n\t__webpack_require__(59);\n\t__webpack_require__(60);\n\t__webpack_require__(61);\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\texports.default = \"ui.router\";\n\n\n/***/ },\n/* 1 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/** @module common */ /** */\n\t\"use strict\";\n\tfunction __export(m) {\n\t for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n\t}\n\t__export(__webpack_require__(2));\n\t__export(__webpack_require__(46));\n\t__export(__webpack_require__(47));\n\t__export(__webpack_require__(48));\n\t__export(__webpack_require__(49));\n\t__export(__webpack_require__(50));\n\t__export(__webpack_require__(51));\n\t__export(__webpack_require__(52));\n\t__export(__webpack_require__(44));\n\tvar router_1 = __webpack_require__(26);\n\texports.UIRouter = router_1.UIRouter;\n\n\n/***/ },\n/* 2 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\tfunction __export(m) {\n\t for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n\t}\n\t/** @module common */ /** for typedoc */\n\t__export(__webpack_require__(3));\n\t__export(__webpack_require__(6));\n\t__export(__webpack_require__(7));\n\t__export(__webpack_require__(5));\n\t__export(__webpack_require__(4));\n\t__export(__webpack_require__(8));\n\t__export(__webpack_require__(9));\n\t__export(__webpack_require__(12));\n\n\n/***/ },\n/* 3 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/**\n\t * Random utility functions used in the UI-Router code\n\t *\n\t * @preferred @module common\n\t */ /** for typedoc */\n\t\"use strict\";\n\tvar predicates_1 = __webpack_require__(4);\n\tvar hof_1 = __webpack_require__(5);\n\tvar coreservices_1 = __webpack_require__(6);\n\tvar w = typeof window === 'undefined' ? {} : window;\n\tvar angular = w.angular || {};\n\texports.fromJson = angular.fromJson || JSON.parse.bind(JSON);\n\texports.toJson = angular.toJson || JSON.stringify.bind(JSON);\n\texports.copy = angular.copy || _copy;\n\texports.forEach = angular.forEach || _forEach;\n\texports.extend = angular.extend || _extend;\n\texports.equals = angular.equals || _equals;\n\texports.identity = function (x) { return x; };\n\texports.noop = function () { return undefined; };\n\texports.abstractKey = 'abstract';\n\t/**\n\t * Binds and copies functions onto an object\n\t *\n\t * Takes functions from the 'from' object, binds those functions to the _this object, and puts the bound functions\n\t * on the 'to' object.\n\t *\n\t * This example creates an new class instance whose functions are prebound to the new'd object.\n\t * @example\n\t * ```\n\t *\n\t * class Foo {\n\t * constructor(data) {\n\t * // Binds all functions from Foo.prototype to 'this',\n\t * // then copies them to 'this'\n\t * bindFunctions(Foo.prototype, this, this);\n\t * this.data = data;\n\t * }\n\t *\n\t * log() {\n\t * console.log(this.data);\n\t * }\n\t * }\n\t *\n\t * let myFoo = new Foo([1,2,3]);\n\t * var logit = myFoo.log;\n\t * logit(); // logs [1, 2, 3] from the myFoo 'this' instance\n\t * ```\n\t *\n\t * This example creates a bound version of a service function, and copies it to another object\n\t * @example\n\t * ```\n\t *\n\t * var SomeService = {\n\t * this.data = [3, 4, 5];\n\t * this.log = function() {\n\t * console.log(this.data);\n\t * }\n\t * }\n\t *\n\t * // Constructor fn\n\t * function OtherThing() {\n\t * // Binds all functions from SomeService to SomeService,\n\t * // then copies them to 'this'\n\t * bindFunctions(SomeService, this, SomeService);\n\t * }\n\t *\n\t * let myOtherThing = new OtherThing();\n\t * myOtherThing.log(); // logs [3, 4, 5] from SomeService's 'this'\n\t * ```\n\t *\n\t * @param from The object which contains the functions to be bound\n\t * @param to The object which will receive the bound functions\n\t * @param bindTo The object which the functions will be bound to\n\t * @param fnNames The function names which will be bound (Defaults to all the functions found on the 'from' object)\n\t */\n\tfunction bindFunctions(from, to, bindTo, fnNames) {\n\t if (fnNames === void 0) { fnNames = Object.keys(from); }\n\t return fnNames.filter(function (name) { return typeof from[name] === 'function'; })\n\t .forEach(function (name) { return to[name] = from[name].bind(bindTo); });\n\t}\n\texports.bindFunctions = bindFunctions;\n\t/**\n\t * prototypal inheritance helper.\n\t * Creates a new object which has `parent` object as its prototype, and then copies the properties from `extra` onto it\n\t */\n\texports.inherit = function (parent, extra) {\n\t return exports.extend(new (exports.extend(function () { }, { prototype: parent }))(), extra);\n\t};\n\t/**\n\t * Given an arguments object, converts the arguments at index idx and above to an array.\n\t * This is similar to es6 rest parameters.\n\t *\n\t * Optionally, the argument at index idx may itself already be an array.\n\t *\n\t * For example,\n\t * given either:\n\t * arguments = [ obj, \"foo\", \"bar\" ]\n\t * or:\n\t * arguments = [ obj, [\"foo\", \"bar\"] ]\n\t * then:\n\t * restArgs(arguments, 1) == [\"foo\", \"bar\"]\n\t *\n\t * This allows functions like pick() to be implemented such that it allows either a bunch\n\t * of string arguments (like es6 rest parameters), or a single array of strings:\n\t *\n\t * given:\n\t * var obj = { foo: 1, bar: 2, baz: 3 };\n\t * then:\n\t * pick(obj, \"foo\", \"bar\"); // returns { foo: 1, bar: 2 }\n\t * pick(obj, [\"foo\", \"bar\"]); // returns { foo: 1, bar: 2 }\n\t */\n\tvar restArgs = function (args, idx) {\n\t if (idx === void 0) { idx = 0; }\n\t return Array.prototype.concat.apply(Array.prototype, Array.prototype.slice.call(args, idx));\n\t};\n\t/** Given an array, returns true if the object is found in the array, (using indexOf) */\n\texports.inArray = function (array, obj) { return array.indexOf(obj) !== -1; };\n\t/** Given an array, and an item, if the item is found in the array, it removes it (in-place). The same array is returned */\n\texports.removeFrom = hof_1.curry(function (array, obj) {\n\t var idx = array.indexOf(obj);\n\t if (idx >= 0)\n\t array.splice(idx, 1);\n\t return array;\n\t});\n\t/**\n\t * Applies a set of defaults to an options object. The options object is filtered\n\t * to only those properties of the objects in the defaultsList.\n\t * Earlier objects in the defaultsList take precedence when applying defaults.\n\t */\n\tfunction defaults(opts) {\n\t if (opts === void 0) { opts = {}; }\n\t var defaultsList = [];\n\t for (var _i = 1; _i < arguments.length; _i++) {\n\t defaultsList[_i - 1] = arguments[_i];\n\t }\n\t var defaults = merge.apply(null, [{}].concat(defaultsList));\n\t return exports.extend({}, defaults, pick(opts || {}, Object.keys(defaults)));\n\t}\n\texports.defaults = defaults;\n\t/**\n\t * Merges properties from the list of objects to the destination object.\n\t * If a property already exists in the destination object, then it is not overwritten.\n\t */\n\tfunction merge(dst) {\n\t var objs = [];\n\t for (var _i = 1; _i < arguments.length; _i++) {\n\t objs[_i - 1] = arguments[_i];\n\t }\n\t exports.forEach(objs, function (obj) {\n\t exports.forEach(obj, function (value, key) {\n\t if (!dst.hasOwnProperty(key))\n\t dst[key] = value;\n\t });\n\t });\n\t return dst;\n\t}\n\texports.merge = merge;\n\t/** Reduce function that merges each element of the list into a single object, using extend */\n\texports.mergeR = function (memo, item) { return exports.extend(memo, item); };\n\t/**\n\t * Finds the common ancestor path between two states.\n\t *\n\t * @param {Object} first The first state.\n\t * @param {Object} second The second state.\n\t * @return {Array} Returns an array of state names in descending order, not including the root.\n\t */\n\tfunction ancestors(first, second) {\n\t var path = [];\n\t for (var n in first.path) {\n\t if (first.path[n] !== second.path[n])\n\t break;\n\t path.push(first.path[n]);\n\t }\n\t return path;\n\t}\n\texports.ancestors = ancestors;\n\t/**\n\t * Performs a non-strict comparison of the subset of two objects, defined by a list of keys.\n\t *\n\t * @param {Object} a The first object.\n\t * @param {Object} b The second object.\n\t * @param {Array} keys The list of keys within each object to compare. If the list is empty or not specified,\n\t * it defaults to the list of keys in `a`.\n\t * @return {Boolean} Returns `true` if the keys match, otherwise `false`.\n\t */\n\tfunction equalForKeys(a, b, keys) {\n\t if (keys === void 0) { keys = Object.keys(a); }\n\t for (var i = 0; i < keys.length; i++) {\n\t var k = keys[i];\n\t if (a[k] != b[k])\n\t return false; // Not '===', values aren't necessarily normalized\n\t }\n\t return true;\n\t}\n\texports.equalForKeys = equalForKeys;\n\tfunction pickOmitImpl(predicate, obj) {\n\t var objCopy = {}, keys = restArgs(arguments, 2);\n\t for (var key in obj) {\n\t if (predicate(keys, key))\n\t objCopy[key] = obj[key];\n\t }\n\t return objCopy;\n\t}\n\t/** Return a copy of the object only containing the whitelisted properties. */\n\tfunction pick(obj) { return pickOmitImpl.apply(null, [exports.inArray].concat(restArgs(arguments))); }\n\texports.pick = pick;\n\t/** Return a copy of the object omitting the blacklisted properties. */\n\tfunction omit(obj) { return pickOmitImpl.apply(null, [hof_1.not(exports.inArray)].concat(restArgs(arguments))); }\n\texports.omit = omit;\n\t/**\n\t * Maps an array, or object to a property (by name)\n\t */\n\tfunction pluck(collection, propName) {\n\t return map(collection, hof_1.prop(propName));\n\t}\n\texports.pluck = pluck;\n\t/** Filters an Array or an Object's properties based on a predicate */\n\tfunction filter(collection, callback) {\n\t var arr = predicates_1.isArray(collection), result = arr ? [] : {};\n\t var accept = arr ? function (x) { return result.push(x); } : function (x, key) { return result[key] = x; };\n\t exports.forEach(collection, function (item, i) {\n\t if (callback(item, i))\n\t accept(item, i);\n\t });\n\t return result;\n\t}\n\texports.filter = filter;\n\t/** Finds an object from an array, or a property of an object, that matches a predicate */\n\tfunction find(collection, callback) {\n\t var result;\n\t exports.forEach(collection, function (item, i) {\n\t if (result)\n\t return;\n\t if (callback(item, i))\n\t result = item;\n\t });\n\t return result;\n\t}\n\texports.find = find;\n\t/** Given an object, returns a new object, where each property is transformed by the callback function */\n\texports.mapObj = map;\n\t/** Maps an array or object properties using a callback function */\n\tfunction map(collection, callback) {\n\t var result = predicates_1.isArray(collection) ? [] : {};\n\t exports.forEach(collection, function (item, i) { return result[i] = callback(item, i); });\n\t return result;\n\t}\n\texports.map = map;\n\t/**\n\t * Given an object, return its enumerable property values\n\t *\n\t * @example\n\t * ```\n\t *\n\t * let foo = { a: 1, b: 2, c: 3 }\n\t * let vals = values(foo); // [ 1, 2, 3 ]\n\t * ```\n\t */\n\texports.values = function (obj) { return Object.keys(obj).map(function (key) { return obj[key]; }); };\n\t/**\n\t * Reduce function that returns true if all of the values are truthy.\n\t *\n\t * @example\n\t * ```\n\t *\n\t * let vals = [ 1, true, {}, \"hello world\"];\n\t * vals.reduce(allTrueR, true); // true\n\t *\n\t * vals.push(0);\n\t * vals.reduce(allTrueR, true); // false\n\t * ```\n\t */\n\texports.allTrueR = function (memo, elem) { return memo && elem; };\n\t/**\n\t * Reduce function that returns true if any of the values are truthy.\n\t *\n\t * * @example\n\t * ```\n\t *\n\t * let vals = [ 0, null, undefined ];\n\t * vals.reduce(anyTrueR, true); // false\n\t *\n\t * vals.push(\"hello world\");\n\t * vals.reduce(anyTrueR, true); // true\n\t * ```\n\t */\n\texports.anyTrueR = function (memo, elem) { return memo || elem; };\n\t/**\n\t * Reduce function which un-nests a single level of arrays\n\t * @example\n\t * ```\n\t *\n\t * let input = [ [ \"a\", \"b\" ], [ \"c\", \"d\" ], [ [ \"double\", \"nested\" ] ] ];\n\t * input.reduce(unnestR, []) // [ \"a\", \"b\", \"c\", \"d\", [ \"double, \"nested\" ] ]\n\t * ```\n\t */\n\texports.unnestR = function (memo, elem) { return memo.concat(elem); };\n\t/**\n\t * Reduce function which recursively un-nests all arrays\n\t *\n\t * @example\n\t * ```\n\t *\n\t * let input = [ [ \"a\", \"b\" ], [ \"c\", \"d\" ], [ [ \"double\", \"nested\" ] ] ];\n\t * input.reduce(unnestR, []) // [ \"a\", \"b\", \"c\", \"d\", \"double, \"nested\" ]\n\t * ```\n\t */\n\texports.flattenR = function (memo, elem) { return predicates_1.isArray(elem) ? memo.concat(elem.reduce(exports.flattenR, [])) : pushR(memo, elem); };\n\t/** Reduce function that pushes an object to an array, then returns the array. Mostly just for [[flattenR]] */\n\tfunction pushR(arr, obj) { arr.push(obj); return arr; }\n\texports.pushR = pushR;\n\t/** Reduce function that filters out duplicates */\n\texports.uniqR = function (acc, token) { return exports.inArray(acc, token) ? acc : pushR(acc, token); };\n\t/**\n\t * Return a new array with a single level of arrays unnested.\n\t *\n\t * @example\n\t * ```\n\t *\n\t * let input = [ [ \"a\", \"b\" ], [ \"c\", \"d\" ], [ [ \"double\", \"nested\" ] ] ];\n\t * unnest(input) // [ \"a\", \"b\", \"c\", \"d\", [ \"double, \"nested\" ] ]\n\t * ```\n\t */\n\texports.unnest = function (arr) { return arr.reduce(exports.unnestR, []); };\n\t/**\n\t * Return a completely flattened version of an array.\n\t *\n\t * @example\n\t * ```\n\t *\n\t * let input = [ [ \"a\", \"b\" ], [ \"c\", \"d\" ], [ [ \"double\", \"nested\" ] ] ];\n\t * flatten(input) // [ \"a\", \"b\", \"c\", \"d\", \"double, \"nested\" ]\n\t * ```\n\t */\n\texports.flatten = function (arr) { return arr.reduce(exports.flattenR, []); };\n\t/**\n\t * Given a .filter Predicate, builds a .filter Predicate which throws an error if any elements do not pass.\n\t * @example\n\t * ```\n\t *\n\t * let isNumber = (obj) => typeof(obj) === 'number';\n\t * let allNumbers = [ 1, 2, 3, 4, 5 ];\n\t * allNumbers.filter(assertPredicate(isNumber)); //OK\n\t *\n\t * let oneString = [ 1, 2, 3, 4, \"5\" ];\n\t * oneString.filter(assertPredicate(isNumber, \"Not all numbers\")); // throws Error(\"\"Not all numbers\"\");\n\t * ```\n\t */\n\tfunction assertPredicate(predicate, errMsg) {\n\t if (errMsg === void 0) { errMsg = \"assert failure\"; }\n\t return function (obj) {\n\t if (!predicate(obj)) {\n\t throw new Error(predicates_1.isFunction(errMsg) ? errMsg(obj) : errMsg);\n\t }\n\t return true;\n\t };\n\t}\n\texports.assertPredicate = assertPredicate;\n\t/**\n\t * Like _.pairs: Given an object, returns an array of key/value pairs\n\t *\n\t * @example\n\t * ```\n\t *\n\t * pairs({ foo: \"FOO\", bar: \"BAR }) // [ [ \"foo\", \"FOO\" ], [ \"bar\": \"BAR\" ] ]\n\t * ```\n\t */\n\texports.pairs = function (object) { return Object.keys(object).map(function (key) { return [key, object[key]]; }); };\n\t/**\n\t * Given two or more parallel arrays, returns an array of tuples where\n\t * each tuple is composed of [ a[i], b[i], ... z[i] ]\n\t *\n\t * @example\n\t * ```\n\t *\n\t * let foo = [ 0, 2, 4, 6 ];\n\t * let bar = [ 1, 3, 5, 7 ];\n\t * let baz = [ 10, 30, 50, 70 ];\n\t * arrayTuples(foo, bar); // [ [0, 1], [2, 3], [4, 5], [6, 7] ]\n\t * arrayTuples(foo, bar, baz); // [ [0, 1, 10], [2, 3, 30], [4, 5, 50], [6, 7, 70] ]\n\t * ```\n\t */\n\tfunction arrayTuples() {\n\t var arrayArgs = [];\n\t for (var _i = 0; _i < arguments.length; _i++) {\n\t arrayArgs[_i - 0] = arguments[_i];\n\t }\n\t if (arrayArgs.length === 0)\n\t return [];\n\t var length = arrayArgs.reduce(function (min, arr) { return Math.min(arr.length, min); }, 9007199254740991); // aka 2^53 − 1 aka Number.MAX_SAFE_INTEGER\n\t return Array.apply(null, Array(length)).map(function (ignored, idx) { return arrayArgs.map(function (arr) { return arr[idx]; }); });\n\t}\n\texports.arrayTuples = arrayTuples;\n\t/**\n\t * Reduce function which builds an object from an array of [key, value] pairs.\n\t *\n\t * Each iteration sets the key/val pair on the memo object, then returns the memo for the next iteration.\n\t *\n\t * Each keyValueTuple should be an array with values [ key: string, value: any ]\n\t *\n\t * @example\n\t * ```\n\t *\n\t * var pairs = [ [\"fookey\", \"fooval\"], [\"barkey\", \"barval\"] ]\n\t *\n\t * var pairsToObj = pairs.reduce((memo, pair) => applyPairs(memo, pair), {})\n\t * // pairsToObj == { fookey: \"fooval\", barkey: \"barval\" }\n\t *\n\t * // Or, more simply:\n\t * var pairsToObj = pairs.reduce(applyPairs, {})\n\t * // pairsToObj == { fookey: \"fooval\", barkey: \"barval\" }\n\t * ```\n\t */\n\tfunction applyPairs(memo, keyValTuple) {\n\t var key, value;\n\t if (predicates_1.isArray(keyValTuple))\n\t key = keyValTuple[0], value = keyValTuple[1];\n\t if (!predicates_1.isString(key))\n\t throw new Error(\"invalid parameters to applyPairs\");\n\t memo[key] = value;\n\t return memo;\n\t}\n\texports.applyPairs = applyPairs;\n\t/** Get the last element of an array */\n\tfunction tail(arr) {\n\t return arr.length && arr[arr.length - 1] || undefined;\n\t}\n\texports.tail = tail;\n\t/**\n\t * shallow copy from src to dest\n\t *\n\t * note: This is a shallow copy, while angular.copy is a deep copy.\n\t * ui-router uses `copy` only to make copies of state parameters.\n\t */\n\tfunction _copy(src, dest) {\n\t if (dest)\n\t Object.keys(dest).forEach(function (key) { return delete dest[key]; });\n\t if (!dest)\n\t dest = {};\n\t return exports.extend(dest, src);\n\t}\n\tfunction _forEach(obj, cb, _this) {\n\t if (predicates_1.isArray(obj))\n\t return obj.forEach(cb, _this);\n\t Object.keys(obj).forEach(function (key) { return cb(obj[key], key); });\n\t}\n\tfunction _copyProps(to, from) { Object.keys(from).forEach(function (key) { return to[key] = from[key]; }); return to; }\n\tfunction _extend(toObj, rest) {\n\t return restArgs(arguments, 1).filter(exports.identity).reduce(_copyProps, toObj);\n\t}\n\tfunction _equals(o1, o2) {\n\t if (o1 === o2)\n\t return true;\n\t if (o1 === null || o2 === null)\n\t return false;\n\t if (o1 !== o1 && o2 !== o2)\n\t return true; // NaN === NaN\n\t var t1 = typeof o1, t2 = typeof o2;\n\t if (t1 !== t2 || t1 !== 'object')\n\t return false;\n\t var tup = [o1, o2];\n\t if (hof_1.all(predicates_1.isArray)(tup))\n\t return _arraysEq(o1, o2);\n\t if (hof_1.all(predicates_1.isDate)(tup))\n\t return o1.getTime() === o2.getTime();\n\t if (hof_1.all(predicates_1.isRegExp)(tup))\n\t return o1.toString() === o2.toString();\n\t if (hof_1.all(predicates_1.isFunction)(tup))\n\t return true; // meh\n\t var predicates = [predicates_1.isFunction, predicates_1.isArray, predicates_1.isDate, predicates_1.isRegExp];\n\t if (predicates.map(hof_1.any).reduce(function (b, fn) { return b || !!fn(tup); }, false))\n\t return false;\n\t var key, keys = {};\n\t for (key in o1) {\n\t if (!_equals(o1[key], o2[key]))\n\t return false;\n\t keys[key] = true;\n\t }\n\t for (key in o2) {\n\t if (!keys[key])\n\t return false;\n\t }\n\t return true;\n\t}\n\tfunction _arraysEq(a1, a2) {\n\t if (a1.length !== a2.length)\n\t return false;\n\t return arrayTuples(a1, a2).reduce(function (b, t) { return b && _equals(t[0], t[1]); }, true);\n\t}\n\t// issue #2676\n\texports.silenceUncaughtInPromise = function (promise) {\n\t return promise.catch(function (e) { return 0; }) && promise;\n\t};\n\texports.silentRejection = function (error) {\n\t return exports.silenceUncaughtInPromise(coreservices_1.services.$q.reject(error));\n\t};\n\n\n/***/ },\n/* 4 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\t/** Predicates @module common_predicates */ /** */\n\tvar hof_1 = __webpack_require__(5);\n\tvar toStr = Object.prototype.toString;\n\tvar tis = function (t) { return function (x) { return typeof (x) === t; }; };\n\texports.isUndefined = tis('undefined');\n\texports.isDefined = hof_1.not(exports.isUndefined);\n\texports.isNull = function (o) { return o === null; };\n\texports.isFunction = tis('function');\n\texports.isNumber = tis('number');\n\texports.isString = tis('string');\n\texports.isObject = function (x) { return x !== null && typeof x === 'object'; };\n\texports.isArray = Array.isArray;\n\texports.isDate = (function (x) { return toStr.call(x) === '[object Date]'; });\n\texports.isRegExp = (function (x) { return toStr.call(x) === '[object RegExp]'; });\n\t/**\n\t * Predicate which checks if a value is injectable\n\t *\n\t * A value is \"injectable\" if it is a function, or if it is an ng1 array-notation-style array\n\t * where all the elements in the array are Strings, except the last one, which is a Function\n\t */\n\tfunction isInjectable(val) {\n\t if (exports.isArray(val) && val.length) {\n\t var head = val.slice(0, -1), tail = val.slice(-1);\n\t return !(head.filter(hof_1.not(exports.isString)).length || tail.filter(hof_1.not(exports.isFunction)).length);\n\t }\n\t return exports.isFunction(val);\n\t}\n\texports.isInjectable = isInjectable;\n\t/**\n\t * Predicate which checks if a value looks like a Promise\n\t *\n\t * It is probably a Promise if it's an object, and it has a `then` property which is a Function\n\t */\n\texports.isPromise = hof_1.and(exports.isObject, hof_1.pipe(hof_1.prop('then'), exports.isFunction));\n\n\n/***/ },\n/* 5 */\n/***/ function(module, exports) {\n\n\t/**\n\t * Higher order functions\n\t *\n\t * @module common_hof\n\t */ /** */\n\t\"use strict\";\n\t/**\n\t * Returns a new function for [Partial Application](https://en.wikipedia.org/wiki/Partial_application) of the original function.\n\t *\n\t * Given a function with N parameters, returns a new function that supports partial application.\n\t * The new function accepts anywhere from 1 to N parameters. When that function is called with M parameters,\n\t * where M is less than N, it returns a new function that accepts the remaining parameters. It continues to\n\t * accept more parameters until all N parameters have been supplied.\n\t *\n\t *\n\t * This contrived example uses a partially applied function as an predicate, which returns true\n\t * if an object is found in both arrays.\n\t * @example\n\t * ```\n\t * // returns true if an object is in both of the two arrays\n\t * function inBoth(array1, array2, object) {\n\t * return array1.indexOf(object) !== -1 &&\n\t * array2.indexOf(object) !== 1;\n\t * }\n\t * let obj1, obj2, obj3, obj4, obj5, obj6, obj7\n\t * let foos = [obj1, obj3]\n\t * let bars = [obj3, obj4, obj5]\n\t *\n\t * // A curried \"copy\" of inBoth\n\t * let curriedInBoth = curry(inBoth);\n\t * // Partially apply both the array1 and array2\n\t * let inFoosAndBars = curriedInBoth(foos, bars);\n\t *\n\t * // Supply the final argument; since all arguments are\n\t * // supplied, the original inBoth function is then called.\n\t * let obj1InBoth = inFoosAndBars(obj1); // false\n\t *\n\t * // Use the inFoosAndBars as a predicate.\n\t * // Filter, on each iteration, supplies the final argument\n\t * let allObjs = [ obj1, obj2, obj3, obj4, obj5, obj6, obj7 ];\n\t * let foundInBoth = allObjs.filter(inFoosAndBars); // [ obj3 ]\n\t *\n\t * ```\n\t *\n\t * Stolen from: http://stackoverflow.com/questions/4394747/javascript-curry-function\n\t *\n\t * @param fn\n\t * @returns {*|function(): (*|any)}\n\t */\n\tfunction curry(fn) {\n\t var initial_args = [].slice.apply(arguments, [1]);\n\t var func_args_length = fn.length;\n\t function curried(args) {\n\t if (args.length >= func_args_length)\n\t return fn.apply(null, args);\n\t return function () {\n\t return curried(args.concat([].slice.apply(arguments)));\n\t };\n\t }\n\t return curried(initial_args);\n\t}\n\texports.curry = curry;\n\t/**\n\t * Given a varargs list of functions, returns a function that composes the argument functions, right-to-left\n\t * given: f(x), g(x), h(x)\n\t * let composed = compose(f,g,h)\n\t * then, composed is: f(g(h(x)))\n\t */\n\tfunction compose() {\n\t var args = arguments;\n\t var start = args.length - 1;\n\t return function () {\n\t var i = start, result = args[start].apply(this, arguments);\n\t while (i--)\n\t result = args[i].call(this, result);\n\t return result;\n\t };\n\t}\n\texports.compose = compose;\n\t/**\n\t * Given a varargs list of functions, returns a function that is composes the argument functions, left-to-right\n\t * given: f(x), g(x), h(x)\n\t * let piped = pipe(f,g,h);\n\t * then, piped is: h(g(f(x)))\n\t */\n\tfunction pipe() {\n\t var funcs = [];\n\t for (var _i = 0; _i < arguments.length; _i++) {\n\t funcs[_i - 0] = arguments[_i];\n\t }\n\t return compose.apply(null, [].slice.call(arguments).reverse());\n\t}\n\texports.pipe = pipe;\n\t/**\n\t * Given a property name, returns a function that returns that property from an object\n\t * let obj = { foo: 1, name: \"blarg\" };\n\t * let getName = prop(\"name\");\n\t * getName(obj) === \"blarg\"\n\t */\n\texports.prop = function (name) { return function (obj) { return obj && obj[name]; }; };\n\t/**\n\t * Given a property name and a value, returns a function that returns a boolean based on whether\n\t * the passed object has a property that matches the value\n\t * let obj = { foo: 1, name: \"blarg\" };\n\t * let getName = propEq(\"name\", \"blarg\");\n\t * getName(obj) === true\n\t */\n\texports.propEq = curry(function (name, val, obj) { return obj && obj[name] === val; });\n\t/**\n\t * Given a dotted property name, returns a function that returns a nested property from an object, or undefined\n\t * let obj = { id: 1, nestedObj: { foo: 1, name: \"blarg\" }, };\n\t * let getName = prop(\"nestedObj.name\");\n\t * getName(obj) === \"blarg\"\n\t * let propNotFound = prop(\"this.property.doesnt.exist\");\n\t * propNotFound(obj) === undefined\n\t */\n\texports.parse = function (name) { return pipe.apply(null, name.split(\".\").map(exports.prop)); };\n\t/**\n\t * Given a function that returns a truthy or falsey value, returns a\n\t * function that returns the opposite (falsey or truthy) value given the same inputs\n\t */\n\texports.not = function (fn) { return function () {\n\t var args = [];\n\t for (var _i = 0; _i < arguments.length; _i++) {\n\t args[_i - 0] = arguments[_i];\n\t }\n\t return !fn.apply(null, args);\n\t}; };\n\t/**\n\t * Given two functions that return truthy or falsey values, returns a function that returns truthy\n\t * if both functions return truthy for the given arguments\n\t */\n\tfunction and(fn1, fn2) {\n\t return function () {\n\t var args = [];\n\t for (var _i = 0; _i < arguments.length; _i++) {\n\t args[_i - 0] = arguments[_i];\n\t }\n\t return fn1.apply(null, args) && fn2.apply(null, args);\n\t };\n\t}\n\texports.and = and;\n\t/**\n\t * Given two functions that return truthy or falsey values, returns a function that returns truthy\n\t * if at least one of the functions returns truthy for the given arguments\n\t */\n\tfunction or(fn1, fn2) {\n\t return function () {\n\t var args = [];\n\t for (var _i = 0; _i < arguments.length; _i++) {\n\t args[_i - 0] = arguments[_i];\n\t }\n\t return fn1.apply(null, args) || fn2.apply(null, args);\n\t };\n\t}\n\texports.or = or;\n\t/**\n\t * Check if all the elements of an array match a predicate function\n\t *\n\t * @param fn1 a predicate function `fn1`\n\t * @returns a function which takes an array and returns true if `fn1` is true for all elements of the array\n\t */\n\texports.all = function (fn1) { return function (arr) { return arr.reduce(function (b, x) { return b && !!fn1(x); }, true); }; };\n\texports.any = function (fn1) { return function (arr) { return arr.reduce(function (b, x) { return b || !!fn1(x); }, false); }; };\n\texports.none = exports.not(exports.any);\n\t/** Given a class, returns a Predicate function that returns true if the object is of that class */\n\texports.is = function (ctor) { return function (obj) { return (obj != null && obj.constructor === ctor || obj instanceof ctor); }; };\n\t/** Given a value, returns a Predicate function that returns true if another value is === equal to the original value */\n\texports.eq = function (val) { return function (other) { return val === other; }; };\n\t/** Given a value, returns a function which returns the value */\n\texports.val = function (v) { return function () { return v; }; };\n\tfunction invoke(fnName, args) {\n\t return function (obj) { return obj[fnName].apply(obj, args); };\n\t}\n\texports.invoke = invoke;\n\t/**\n\t * Sorta like Pattern Matching (a functional programming conditional construct)\n\t *\n\t * See http://c2.com/cgi/wiki?PatternMatching\n\t *\n\t * This is a conditional construct which allows a series of predicates and output functions\n\t * to be checked and then applied. Each predicate receives the input. If the predicate\n\t * returns truthy, then its matching output function (mapping function) is provided with\n\t * the input and, then the result is returned.\n\t *\n\t * Each combination (2-tuple) of predicate + output function should be placed in an array\n\t * of size 2: [ predicate, mapFn ]\n\t *\n\t * These 2-tuples should be put in an outer array.\n\t *\n\t * @example\n\t * ```\n\t *\n\t * // Here's a 2-tuple where the first element is the isString predicate\n\t * // and the second element is a function that returns a description of the input\n\t * let firstTuple = [ angular.isString, (input) => `Heres your string ${input}` ];\n\t *\n\t * // Second tuple: predicate \"isNumber\", mapfn returns a description\n\t * let secondTuple = [ angular.isNumber, (input) => `(${input}) That's a number!` ];\n\t *\n\t * let third = [ (input) => input === null, (input) => `Oh, null...` ];\n\t *\n\t * let fourth = [ (input) => input === undefined, (input) => `notdefined` ];\n\t *\n\t * let descriptionOf = pattern([ firstTuple, secondTuple, third, fourth ]);\n\t *\n\t * console.log(descriptionOf(undefined)); // 'notdefined'\n\t * console.log(descriptionOf(55)); // '(55) That's a number!'\n\t * console.log(descriptionOf(\"foo\")); // 'Here's your string foo'\n\t * ```\n\t *\n\t * @param struct A 2D array. Each element of the array should be an array, a 2-tuple,\n\t * with a Predicate and a mapping/output function\n\t * @returns {function(any): *}\n\t */\n\tfunction pattern(struct) {\n\t return function (x) {\n\t for (var i = 0; i < struct.length; i++) {\n\t if (struct[i][0](x))\n\t return struct[i][1](x);\n\t }\n\t };\n\t}\n\texports.pattern = pattern;\n\n\n/***/ },\n/* 6 */\n/***/ function(module, exports) {\n\n\t/**\n\t * This module is a stub for core services such as Dependency Injection or Browser Location.\n\t * Core services may be implemented by a specific framework, such as ng1 or ng2, or be pure javascript.\n\t *\n\t * @module common\n\t */\n\t\"use strict\";\n\t/** for typedoc */\n\t//import {IQService} from \"angular\";\n\t//import {IInjectorService} from \"angular\";\n\tvar notImplemented = function (fnname) { return function () {\n\t throw new Error(fnname + \"(): No coreservices implementation for UI-Router is loaded. You should include one of: ['angular1.js']\");\n\t}; };\n\tvar services = {\n\t $q: undefined,\n\t $injector: undefined,\n\t location: {},\n\t locationConfig: {},\n\t template: {}\n\t};\n\texports.services = services;\n\t[\"replace\", \"url\", \"path\", \"search\", \"hash\", \"onChange\"]\n\t .forEach(function (key) { return services.location[key] = notImplemented(key); });\n\t[\"port\", \"protocol\", \"host\", \"baseHref\", \"html5Mode\", \"hashPrefix\"]\n\t .forEach(function (key) { return services.locationConfig[key] = notImplemented(key); });\n\n\n/***/ },\n/* 7 */\n/***/ function(module, exports) {\n\n\t\"use strict\";\n\t/** @module common */\n\t/**\n\t * Matches state names using glob-like patterns.\n\t *\n\t * See: [[StateService.includes]]\n\t */\n\tvar Glob = (function () {\n\t function Glob(text) {\n\t this.text = text;\n\t this.glob = text.split('.');\n\t }\n\t Glob.prototype.matches = function (name) {\n\t var segments = name.split('.');\n\t // match single stars\n\t for (var i = 0, l = this.glob.length; i < l; i++) {\n\t if (this.glob[i] === '*')\n\t segments[i] = '*';\n\t }\n\t // match greedy starts\n\t if (this.glob[0] === '**') {\n\t segments = segments.slice(segments.indexOf(this.glob[1]));\n\t segments.unshift('**');\n\t }\n\t // match greedy ends\n\t if (this.glob[this.glob.length - 1] === '**') {\n\t segments.splice(segments.indexOf(this.glob[this.glob.length - 2]) + 1, Number.MAX_VALUE);\n\t segments.push('**');\n\t }\n\t if (this.glob.length != segments.length)\n\t return false;\n\t return segments.join('') === this.glob.join('');\n\t };\n\t Glob.is = function (text) {\n\t return text.indexOf('*') > -1;\n\t };\n\t Glob.fromString = function (text) {\n\t if (!this.is(text))\n\t return null;\n\t return new Glob(text);\n\t };\n\t return Glob;\n\t}());\n\texports.Glob = Glob;\n\n\n/***/ },\n/* 8 */\n/***/ function(module, exports) {\n\n\t/** @module common */ /** for typedoc */\n\t\"use strict\";\n\tvar Queue = (function () {\n\t function Queue(_items, _limit) {\n\t if (_items === void 0) { _items = []; }\n\t if (_limit === void 0) { _limit = null; }\n\t this._items = _items;\n\t this._limit = _limit;\n\t }\n\t Queue.prototype.enqueue = function (item) {\n\t var items = this._items;\n\t items.push(item);\n\t if (this._limit && items.length > this._limit)\n\t items.shift();\n\t return item;\n\t };\n\t Queue.prototype.dequeue = function () {\n\t if (this.size())\n\t return this._items.splice(0, 1)[0];\n\t };\n\t Queue.prototype.clear = function () {\n\t var current = this._items;\n\t this._items = [];\n\t return current;\n\t };\n\t Queue.prototype.size = function () {\n\t return this._items.length;\n\t };\n\t Queue.prototype.remove = function (item) {\n\t var idx = this._items.indexOf(item);\n\t return idx > -1 && this._items.splice(idx, 1)[0];\n\t };\n\t Queue.prototype.peekTail = function () {\n\t return this._items[this._items.length - 1];\n\t };\n\t Queue.prototype.peekHead = function () {\n\t if (this.size())\n\t return this._items[0];\n\t };\n\t return Queue;\n\t}());\n\texports.Queue = Queue;\n\n\n/***/ },\n/* 9 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/** @module common_strings */ /** */\n\t\"use strict\";\n\tvar predicates_1 = __webpack_require__(4);\n\tvar rejectFactory_1 = __webpack_require__(10);\n\tvar common_1 = __webpack_require__(3);\n\tvar hof_1 = __webpack_require__(5);\n\tvar transition_1 = __webpack_require__(11);\n\tvar resolvable_1 = __webpack_require__(19);\n\t/**\n\t * Returns a string shortened to a maximum length\n\t *\n\t * If the string is already less than the `max` length, return the string.\n\t * Else return the string, shortened to `max - 3` and append three dots (\"...\").\n\t *\n\t * @param max the maximum length of the string to return\n\t * @param str the input string\n\t */\n\tfunction maxLength(max, str) {\n\t if (str.length <= max)\n\t return str;\n\t return str.substr(0, max - 3) + \"...\";\n\t}\n\texports.maxLength = maxLength;\n\t/**\n\t * Returns a string, with spaces added to the end, up to a desired str length\n\t *\n\t * If the string is already longer than the desired length, return the string.\n\t * Else returns the string, with extra spaces on the end, such that it reaches `length` characters.\n\t *\n\t * @param length the desired length of the string to return\n\t * @param str the input string\n\t */\n\tfunction padString(length, str) {\n\t while (str.length < length)\n\t str += \" \";\n\t return str;\n\t}\n\texports.padString = padString;\n\tfunction kebobString(camelCase) {\n\t return camelCase\n\t .replace(/^([A-Z])/, function ($1) { return $1.toLowerCase(); }) // replace first char\n\t .replace(/([A-Z])/g, function ($1) { return \"-\" + $1.toLowerCase(); }); // replace rest\n\t}\n\texports.kebobString = kebobString;\n\tfunction _toJson(obj) {\n\t return JSON.stringify(obj);\n\t}\n\tfunction _fromJson(json) {\n\t return predicates_1.isString(json) ? JSON.parse(json) : json;\n\t}\n\tfunction promiseToString(p) {\n\t return \"Promise(\" + JSON.stringify(p) + \")\";\n\t}\n\tfunction functionToString(fn) {\n\t var fnStr = fnToString(fn);\n\t var namedFunctionMatch = fnStr.match(/^(function [^ ]+\\([^)]*\\))/);\n\t return namedFunctionMatch ? namedFunctionMatch[1] : fnStr;\n\t}\n\texports.functionToString = functionToString;\n\tfunction fnToString(fn) {\n\t var _fn = predicates_1.isArray(fn) ? fn.slice(-1)[0] : fn;\n\t return _fn && _fn.toString() || \"undefined\";\n\t}\n\texports.fnToString = fnToString;\n\tvar stringifyPatternFn = null;\n\tvar stringifyPattern = function (value) {\n\t var isTransitionRejectionPromise = rejectFactory_1.Rejection.isTransitionRejectionPromise;\n\t stringifyPatternFn = stringifyPatternFn || hof_1.pattern([\n\t [hof_1.not(predicates_1.isDefined), hof_1.val(\"undefined\")],\n\t [predicates_1.isNull, hof_1.val(\"null\")],\n\t [predicates_1.isPromise, hof_1.val(\"[Promise]\")],\n\t [isTransitionRejectionPromise, function (x) { return x._transitionRejection.toString(); }],\n\t [hof_1.is(rejectFactory_1.Rejection), hof_1.invoke(\"toString\")],\n\t [hof_1.is(transition_1.Transition), hof_1.invoke(\"toString\")],\n\t [hof_1.is(resolvable_1.Resolvable), hof_1.invoke(\"toString\")],\n\t [predicates_1.isInjectable, functionToString],\n\t [hof_1.val(true), common_1.identity]\n\t ]);\n\t return stringifyPatternFn(value);\n\t};\n\tfunction stringify(o) {\n\t var seen = [];\n\t function format(val) {\n\t if (predicates_1.isObject(val)) {\n\t if (seen.indexOf(val) !== -1)\n\t return '[circular ref]';\n\t seen.push(val);\n\t }\n\t return stringifyPattern(val);\n\t }\n\t return JSON.stringify(o, function (key, val) { return format(val); }).replace(/\\\\\"/g, '\"');\n\t}\n\texports.stringify = stringify;\n\t/** Returns a function that splits a string on a character or substring */\n\texports.beforeAfterSubstr = function (char) { return function (str) {\n\t if (!str)\n\t return [\"\", \"\"];\n\t var idx = str.indexOf(char);\n\t if (idx === -1)\n\t return [str, \"\"];\n\t return [str.substr(0, idx), str.substr(idx + 1)];\n\t}; };\n\n\n/***/ },\n/* 10 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/** @module transition */ /** for typedoc */\n\t\"use strict\";\n\tvar common_1 = __webpack_require__(3);\n\tvar strings_1 = __webpack_require__(9);\n\t(function (RejectType) {\n\t RejectType[RejectType[\"SUPERSEDED\"] = 2] = \"SUPERSEDED\";\n\t RejectType[RejectType[\"ABORTED\"] = 3] = \"ABORTED\";\n\t RejectType[RejectType[\"INVALID\"] = 4] = \"INVALID\";\n\t RejectType[RejectType[\"IGNORED\"] = 5] = \"IGNORED\";\n\t RejectType[RejectType[\"ERROR\"] = 6] = \"ERROR\";\n\t})(exports.RejectType || (exports.RejectType = {}));\n\tvar RejectType = exports.RejectType;\n\tvar Rejection = (function () {\n\t function Rejection(type, message, detail) {\n\t this.type = type;\n\t this.message = message;\n\t this.detail = detail;\n\t }\n\t Rejection.prototype.toString = function () {\n\t var detailString = function (d) { return d && d.toString !== Object.prototype.toString ? d.toString() : strings_1.stringify(d); };\n\t var type = this.type, message = this.message, detail = detailString(this.detail);\n\t return \"TransitionRejection(type: \" + type + \", message: \" + message + \", detail: \" + detail + \")\";\n\t };\n\t Rejection.prototype.toPromise = function () {\n\t return common_1.extend(common_1.silentRejection(this), { _transitionRejection: this });\n\t };\n\t /** Returns true if the obj is a rejected promise created from the `asPromise` factory */\n\t Rejection.isTransitionRejectionPromise = function (obj) {\n\t return obj && (typeof obj.then === 'function') && obj._transitionRejection instanceof Rejection;\n\t };\n\t /** Returns a TransitionRejection due to transition superseded */\n\t Rejection.superseded = function (detail, options) {\n\t var message = \"The transition has been superseded by a different transition (see detail).\";\n\t var rejection = new Rejection(RejectType.SUPERSEDED, message, detail);\n\t if (options && options.redirected) {\n\t rejection.redirected = true;\n\t }\n\t return rejection;\n\t };\n\t /** Returns a TransitionRejection due to redirected transition */\n\t Rejection.redirected = function (detail) {\n\t return Rejection.superseded(detail, { redirected: true });\n\t };\n\t /** Returns a TransitionRejection due to invalid transition */\n\t Rejection.invalid = function (detail) {\n\t var message = \"This transition is invalid (see detail)\";\n\t return new Rejection(RejectType.INVALID, message, detail);\n\t };\n\t /** Returns a TransitionRejection due to ignored transition */\n\t Rejection.ignored = function (detail) {\n\t var message = \"The transition was ignored.\";\n\t return new Rejection(RejectType.IGNORED, message, detail);\n\t };\n\t /** Returns a TransitionRejection due to aborted transition */\n\t Rejection.aborted = function (detail) {\n\t // TODO think about how to encapsulate an Error() object\n\t var message = \"The transition has been aborted.\";\n\t return new Rejection(RejectType.ABORTED, message, detail);\n\t };\n\t /** Returns a TransitionRejection due to aborted transition */\n\t Rejection.errored = function (detail) {\n\t // TODO think about how to encapsulate an Error() object\n\t var message = \"The transition errored.\";\n\t return new Rejection(RejectType.ERROR, message, detail);\n\t };\n\t return Rejection;\n\t}());\n\texports.Rejection = Rejection;\n\n\n/***/ },\n/* 11 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\t/** @module transition */ /** for typedoc */\n\tvar trace_1 = __webpack_require__(12);\n\tvar coreservices_1 = __webpack_require__(6);\n\tvar common_1 = __webpack_require__(3);\n\tvar predicates_1 = __webpack_require__(4);\n\tvar hof_1 = __webpack_require__(5);\n\tvar transitionHook_1 = __webpack_require__(13);\n\tvar hookRegistry_1 = __webpack_require__(15);\n\tvar hookBuilder_1 = __webpack_require__(16);\n\tvar node_1 = __webpack_require__(21);\n\tvar pathFactory_1 = __webpack_require__(20);\n\tvar targetState_1 = __webpack_require__(14);\n\tvar param_1 = __webpack_require__(22);\n\tvar resolvable_1 = __webpack_require__(19);\n\tvar rejectFactory_1 = __webpack_require__(10);\n\tvar resolveContext_1 = __webpack_require__(17);\n\tvar router_1 = __webpack_require__(26);\n\tvar transitionCount = 0;\n\tvar stateSelf = hof_1.prop(\"self\");\n\t/**\n\t * Represents a transition between two states.\n\t *\n\t * When navigating to a state, we are transitioning **from** the current state **to** the new state.\n\t *\n\t * This object contains all contextual information about the to/from states, parameters, resolves.\n\t * It has information about all states being entered and exited as a result of the transition.\n\t */\n\tvar Transition = (function () {\n\t /**\n\t * Creates a new Transition object.\n\t *\n\t * If the target state is not valid, an error is thrown.\n\t *\n\t * @param fromPath The path of [[PathNode]]s from which the transition is leaving. The last node in the `fromPath`\n\t * encapsulates the \"from state\".\n\t * @param targetState The target state and parameters being transitioned to (also, the transition options)\n\t * @param router The [[UIRouter]] instance\n\t */\n\t function Transition(fromPath, targetState, router) {\n\t var _this = this;\n\t /** @hidden */\n\t this._deferred = coreservices_1.services.$q.defer();\n\t /**\n\t * This promise is resolved or rejected based on the outcome of the Transition.\n\t *\n\t * When the transition is successful, the promise is resolved\n\t * When the transition is unsuccessful, the promise is rejected with the [[TransitionRejection]] or javascript error\n\t */\n\t this.promise = this._deferred.promise;\n\t this.treeChanges = function () { return _this._treeChanges; };\n\t this.isActive = function () { return _this === _this._options.current(); };\n\t this.router = router;\n\t if (!targetState.valid()) {\n\t throw new Error(targetState.error());\n\t }\n\t // Makes the Transition instance a hook registry (onStart, etc)\n\t hookRegistry_1.HookRegistry.mixin(new hookRegistry_1.HookRegistry(), this);\n\t // current() is assumed to come from targetState.options, but provide a naive implementation otherwise.\n\t this._options = common_1.extend({ current: hof_1.val(this) }, targetState.options());\n\t this.$id = transitionCount++;\n\t var toPath = pathFactory_1.PathFactory.buildToPath(fromPath, targetState);\n\t this._treeChanges = pathFactory_1.PathFactory.treeChanges(fromPath, toPath, this._options.reloadState);\n\t var enteringStates = this._treeChanges.entering.map(function (node) { return node.state; });\n\t pathFactory_1.PathFactory.applyViewConfigs(router.transitionService.$view, this._treeChanges.to, enteringStates);\n\t var rootResolvables = [\n\t new resolvable_1.Resolvable(router_1.UIRouter, function () { return router; }, [], undefined, router),\n\t new resolvable_1.Resolvable(Transition, function () { return _this; }, [], undefined, this),\n\t new resolvable_1.Resolvable('$transition$', function () { return _this; }, [], undefined, this),\n\t new resolvable_1.Resolvable('$stateParams', function () { return _this.params(); }, [], undefined, this.params())\n\t ];\n\t var rootNode = this._treeChanges.to[0];\n\t var context = new resolveContext_1.ResolveContext(this._treeChanges.to);\n\t context.addResolvables(rootResolvables, rootNode.state);\n\t }\n\t /** @inheritdoc */\n\t Transition.prototype.onBefore = function (matchCriteria, callback, options) { throw \"\"; };\n\t ;\n\t /** @inheritdoc */\n\t Transition.prototype.onStart = function (matchCriteria, callback, options) { throw \"\"; };\n\t ;\n\t /** @inheritdoc */\n\t Transition.prototype.onExit = function (matchCriteria, callback, options) { throw \"\"; };\n\t ;\n\t /** @inheritdoc */\n\t Transition.prototype.onRetain = function (matchCriteria, callback, options) { throw \"\"; };\n\t ;\n\t /** @inheritdoc */\n\t Transition.prototype.onEnter = function (matchCriteria, callback, options) { throw \"\"; };\n\t ;\n\t /** @inheritdoc */\n\t Transition.prototype.onFinish = function (matchCriteria, callback, options) { throw \"\"; };\n\t ;\n\t /** @inheritdoc */\n\t Transition.prototype.onSuccess = function (matchCriteria, callback, options) { throw \"\"; };\n\t ;\n\t /** @inheritdoc */\n\t Transition.prototype.onError = function (matchCriteria, callback, options) { throw \"\"; };\n\t ;\n\t Transition.prototype.$from = function () {\n\t return common_1.tail(this._treeChanges.from).state;\n\t };\n\t Transition.prototype.$to = function () {\n\t return common_1.tail(this._treeChanges.to).state;\n\t };\n\t /**\n\t * Returns the \"from state\"\n\t *\n\t * @returns The state object for the Transition's \"from state\".\n\t */\n\t Transition.prototype.from = function () {\n\t return this.$from().self;\n\t };\n\t /**\n\t * Returns the \"to state\"\n\t *\n\t * @returns The state object for the Transition's target state (\"to state\").\n\t */\n\t Transition.prototype.to = function () {\n\t return this.$to().self;\n\t };\n\t /**\n\t * Determines whether two transitions are equivalent.\n\t */\n\t Transition.prototype.is = function (compare) {\n\t if (compare instanceof Transition) {\n\t // TODO: Also compare parameters\n\t return this.is({ to: compare.$to().name, from: compare.$from().name });\n\t }\n\t return !((compare.to && !hookRegistry_1.matchState(this.$to(), compare.to)) ||\n\t (compare.from && !hookRegistry_1.matchState(this.$from(), compare.from)));\n\t };\n\t /**\n\t * Gets transition parameter values\n\t *\n\t * @param pathname Pick which treeChanges path to get parameters for:\n\t * (`'to'`, `'from'`, `'entering'`, `'exiting'`, `'retained'`)\n\t * @returns transition parameter values for the desired path.\n\t */\n\t Transition.prototype.params = function (pathname) {\n\t if (pathname === void 0) { pathname = \"to\"; }\n\t return this._treeChanges[pathname].map(hof_1.prop(\"paramValues\")).reduce(common_1.mergeR, {});\n\t };\n\t /**\n\t * Creates a [[UIInjector]] Dependency Injector\n\t *\n\t * Returns a Dependency Injector for the Transition's target state (to state).\n\t * The injector provides resolve values which the target state has access to.\n\t *\n\t * The `UIInjector` can also provide values from the native root/global injector (ng1/ng2).\n\t *\n\t * If a `state` is provided, the injector that is returned will be limited to resolve values that the provided state has access to.\n\t *\n\t * @param state Limits the resolves provided to only the resolves the provided state has access to.\n\t * @returns a [[UIInjector]]\n\t */\n\t Transition.prototype.injector = function (state) {\n\t var path = this.treeChanges().to;\n\t if (state)\n\t path = pathFactory_1.PathFactory.subPath(path, function (node) { return node.state === state || node.state.name === state; });\n\t return new resolveContext_1.ResolveContext(path).injector();\n\t };\n\t /**\n\t * Gets all available resolve tokens (keys)\n\t *\n\t * This method can be used in conjunction with [[getResolve]] to inspect the resolve values\n\t * available to the Transition.\n\t *\n\t * The returned tokens include those defined on [[StateDeclaration.resolve]] blocks, for the states\n\t * in the Transition's [[TreeChanges.to]] path.\n\t *\n\t * @returns an array of resolve tokens (keys)\n\t */\n\t Transition.prototype.getResolveTokens = function () {\n\t return new resolveContext_1.ResolveContext(this._treeChanges.to).getTokens();\n\t };\n\t /**\n\t * Gets resolved values\n\t *\n\t * This method can be used in conjunction with [[getResolveTokens]] to inspect what resolve values\n\t * are available to the Transition.\n\t *\n\t * Given a token, returns the resolved data for that token.\n\t * Given an array of tokens, returns an array of resolved data for those tokens.\n\t *\n\t * If a resolvable hasn't yet been fetched, returns `undefined` for that token\n\t * If a resolvable doesn't exist for the token, throws an error.\n\t *\n\t * @param token the token (or array of tokens)\n\t *\n\t * @returns an array of resolve tokens (keys)\n\t */\n\t Transition.prototype.getResolveValue = function (token) {\n\t var resolveContext = new resolveContext_1.ResolveContext(this._treeChanges.to);\n\t var getData = function (token) {\n\t var resolvable = resolveContext.getResolvable(token);\n\t if (resolvable === undefined) {\n\t throw new Error(\"Dependency Injection token not found: ${stringify(token)}\");\n\t }\n\t return resolvable.data;\n\t };\n\t if (predicates_1.isArray(token)) {\n\t return token.map(getData);\n\t }\n\t return getData(token);\n\t };\n\t /**\n\t * Dynamically adds a new [[Resolvable]] (`resolve`) to this transition.\n\t *\n\t * @param resolvable an [[Resolvable]] object\n\t * @param state the state in the \"to path\" which should receive the new resolve (otherwise, the root state)\n\t */\n\t Transition.prototype.addResolvable = function (resolvable, state) {\n\t if (state === void 0) { state = \"\"; }\n\t var stateName = (typeof state === \"string\") ? state : state.name;\n\t var topath = this._treeChanges.to;\n\t var targetNode = common_1.find(topath, function (node) { return node.state.name === stateName; });\n\t var resolveContext = new resolveContext_1.ResolveContext(topath);\n\t resolveContext.addResolvables([resolvable], targetNode.state);\n\t };\n\t /**\n\t * Gets the previous transition, from which this transition was redirected.\n\t *\n\t * @returns The previous Transition, or null if this Transition is not the result of a redirection\n\t */\n\t Transition.prototype.previous = function () {\n\t return this._options.previous || null;\n\t };\n\t /**\n\t * Get the transition options\n\t *\n\t * @returns the options for this Transition.\n\t */\n\t Transition.prototype.options = function () {\n\t return this._options;\n\t };\n\t /**\n\t * Gets the states being entered.\n\t *\n\t * @returns an array of states that will be entered during this transition.\n\t */\n\t Transition.prototype.entering = function () {\n\t return common_1.map(this._treeChanges.entering, hof_1.prop('state')).map(stateSelf);\n\t };\n\t /**\n\t * Gets the states being exited.\n\t *\n\t * @returns an array of states that will be exited during this transition.\n\t */\n\t Transition.prototype.exiting = function () {\n\t return common_1.map(this._treeChanges.exiting, hof_1.prop('state')).map(stateSelf).reverse();\n\t };\n\t /**\n\t * Gets the states being retained.\n\t *\n\t * @returns an array of states that are already entered from a previous Transition, that will not be\n\t * exited during this Transition\n\t */\n\t Transition.prototype.retained = function () {\n\t return common_1.map(this._treeChanges.retained, hof_1.prop('state')).map(stateSelf);\n\t };\n\t /**\n\t * Get the [[ViewConfig]]s associated with this Transition\n\t *\n\t * Each state can define one or more views (template/controller), which are encapsulated as `ViewConfig` objects.\n\t * This method fetches the `ViewConfigs` for a given path in the Transition (e.g., \"to\" or \"entering\").\n\t *\n\t * @param pathname the name of the path to fetch views for:\n\t * (`'to'`, `'from'`, `'entering'`, `'exiting'`, `'retained'`)\n\t * @param state If provided, only returns the `ViewConfig`s for a single state in the path\n\t *\n\t * @returns a list of ViewConfig objects for the given path.\n\t */\n\t Transition.prototype.views = function (pathname, state) {\n\t if (pathname === void 0) { pathname = \"entering\"; }\n\t var path = this._treeChanges[pathname];\n\t path = !state ? path : path.filter(hof_1.propEq('state', state));\n\t return path.map(hof_1.prop(\"views\")).filter(common_1.identity).reduce(common_1.unnestR, []);\n\t };\n\t /**\n\t * Creates a new transition that is a redirection of the current one.\n\t *\n\t * This transition can be returned from a [[TransitionService]] hook to\n\t * redirect a transition to a new state and/or set of parameters.\n\t *\n\t * @returns Returns a new [[Transition]] instance.\n\t */\n\t Transition.prototype.redirect = function (targetState) {\n\t var newOptions = common_1.extend({}, this.options(), targetState.options(), { previous: this });\n\t targetState = new targetState_1.TargetState(targetState.identifier(), targetState.$state(), targetState.params(), newOptions);\n\t var newTransition = this.router.transitionService.create(this._treeChanges.from, targetState);\n\t var originalEnteringNodes = this.treeChanges().entering;\n\t var redirectEnteringNodes = newTransition.treeChanges().entering;\n\t // --- Re-use resolve data from original transition ---\n\t // When redirecting from a parent state to a child state where the parent parameter values haven't changed\n\t // (because of the redirect), the resolves fetched by the original transition are still valid in the\n\t // redirected transition.\n\t //\n\t // This allows you to define a redirect on a parent state which depends on an async resolve value.\n\t // You can wait for the resolve, then redirect to a child state based on the result.\n\t // The redirected transition does not have to re-fetch the resolve.\n\t // ---------------------------------------------------------\n\t var nodeIsReloading = function (reloadState) { return function (node) {\n\t return reloadState && node.state.includes[reloadState.name];\n\t }; };\n\t // Find any \"entering\" nodes in the redirect path that match the original path and aren't being reloaded\n\t var matchingEnteringNodes = node_1.PathNode.matching(redirectEnteringNodes, originalEnteringNodes)\n\t .filter(hof_1.not(nodeIsReloading(targetState.options().reloadState)));\n\t // Use the existing (possibly pre-resolved) resolvables for the matching entering nodes.\n\t matchingEnteringNodes.forEach(function (node, idx) {\n\t node.resolvables = originalEnteringNodes[idx].resolvables;\n\t });\n\t return newTransition;\n\t };\n\t /** @hidden If a transition doesn't exit/enter any states, returns any [[Param]] whose value changed */\n\t Transition.prototype._changedParams = function () {\n\t var _a = this._treeChanges, to = _a.to, from = _a.from;\n\t if (this._options.reload || common_1.tail(to).state !== common_1.tail(from).state)\n\t return undefined;\n\t var nodeSchemas = to.map(function (node) { return node.paramSchema; });\n\t var _b = [to, from].map(function (path) { return path.map(function (x) { return x.paramValues; }); }), toValues = _b[0], fromValues = _b[1];\n\t var tuples = common_1.arrayTuples(nodeSchemas, toValues, fromValues);\n\t return tuples.map(function (_a) {\n\t var schema = _a[0], toVals = _a[1], fromVals = _a[2];\n\t return param_1.Param.changed(schema, toVals, fromVals);\n\t }).reduce(common_1.unnestR, []);\n\t };\n\t /**\n\t * Returns true if the transition is dynamic.\n\t *\n\t * A transition is dynamic if no states are entered nor exited, but at least one dynamic parameter has changed.\n\t *\n\t * @returns true if the Transition is dynamic\n\t */\n\t Transition.prototype.dynamic = function () {\n\t var changes = this._changedParams();\n\t return !changes ? false : changes.map(function (x) { return x.dynamic; }).reduce(common_1.anyTrueR, false);\n\t };\n\t /**\n\t * Returns true if the transition is ignored.\n\t *\n\t * A transition is ignored if no states are entered nor exited, and no parameter values have changed.\n\t *\n\t * @returns true if the Transition is ignored.\n\t */\n\t Transition.prototype.ignored = function () {\n\t var changes = this._changedParams();\n\t return !changes ? false : changes.length === 0;\n\t };\n\t /**\n\t * @hidden\n\t */\n\t Transition.prototype.hookBuilder = function () {\n\t return new hookBuilder_1.HookBuilder(this.router.transitionService, this, {\n\t transition: this,\n\t current: this._options.current\n\t });\n\t };\n\t /**\n\t * Runs the transition\n\t *\n\t * This method is generally called from the [[StateService.transitionTo]]\n\t *\n\t * @returns a promise for a successful transition.\n\t */\n\t Transition.prototype.run = function () {\n\t var _this = this;\n\t var runSynchronousHooks = transitionHook_1.TransitionHook.runSynchronousHooks;\n\t var hookBuilder = this.hookBuilder();\n\t var globals = this.router.globals;\n\t globals.transitionHistory.enqueue(this);\n\t var syncResult = runSynchronousHooks(hookBuilder.getOnBeforeHooks());\n\t if (rejectFactory_1.Rejection.isTransitionRejectionPromise(syncResult)) {\n\t syncResult.catch(function () { return 0; }); // issue #2676\n\t var rejectReason = syncResult._transitionRejection;\n\t this._deferred.reject(rejectReason);\n\t return this.promise;\n\t }\n\t if (!this.valid()) {\n\t var error = new Error(this.error());\n\t this._deferred.reject(error);\n\t return this.promise;\n\t }\n\t if (this.ignored()) {\n\t trace_1.trace.traceTransitionIgnored(this);\n\t this._deferred.reject(rejectFactory_1.Rejection.ignored());\n\t return this.promise;\n\t }\n\t // When the chain is complete, then resolve or reject the deferred\n\t var transitionSuccess = function () {\n\t trace_1.trace.traceSuccess(_this.$to(), _this);\n\t _this.success = true;\n\t _this._deferred.resolve(_this.to());\n\t runSynchronousHooks(hookBuilder.getOnSuccessHooks(), true);\n\t };\n\t var transitionError = function (error) {\n\t trace_1.trace.traceError(error, _this);\n\t _this.success = false;\n\t _this._deferred.reject(error);\n\t runSynchronousHooks(hookBuilder.getOnErrorHooks(), true);\n\t };\n\t trace_1.trace.traceTransitionStart(this);\n\t // Chain the next hook off the previous\n\t var appendHookToChain = function (prev, nextHook) {\n\t return prev.then(function () { return nextHook.invokeHook(); });\n\t };\n\t // Run the hooks, then resolve or reject the overall deferred in the .then() handler\n\t hookBuilder.asyncHooks()\n\t .reduce(appendHookToChain, syncResult)\n\t .then(transitionSuccess, transitionError);\n\t return this.promise;\n\t };\n\t /**\n\t * Checks if the Transition is valid\n\t *\n\t * @returns true if the Transition is valid\n\t */\n\t Transition.prototype.valid = function () {\n\t return !this.error();\n\t };\n\t /**\n\t * The reason the Transition is invalid\n\t *\n\t * @returns an error message explaining why the transition is invalid\n\t */\n\t Transition.prototype.error = function () {\n\t var state = this.$to();\n\t if (state.self[common_1.abstractKey])\n\t return \"Cannot transition to abstract state '\" + state.name + \"'\";\n\t if (!param_1.Param.validates(state.parameters(), this.params()))\n\t return \"Param values not valid for state '\" + state.name + \"'\";\n\t };\n\t /**\n\t * A string representation of the Transition\n\t *\n\t * @returns A string representation of the Transition\n\t */\n\t Transition.prototype.toString = function () {\n\t var fromStateOrName = this.from();\n\t var toStateOrName = this.to();\n\t var avoidEmptyHash = function (params) {\n\t return (params[\"#\"] !== null && params[\"#\"] !== undefined) ? params : common_1.omit(params, \"#\");\n\t };\n\t // (X) means the to state is invalid.\n\t var id = this.$id, from = predicates_1.isObject(fromStateOrName) ? fromStateOrName.name : fromStateOrName, fromParams = common_1.toJson(avoidEmptyHash(this._treeChanges.from.map(hof_1.prop('paramValues')).reduce(common_1.mergeR, {}))), toValid = this.valid() ? \"\" : \"(X) \", to = predicates_1.isObject(toStateOrName) ? toStateOrName.name : toStateOrName, toParams = common_1.toJson(avoidEmptyHash(this.params()));\n\t return \"Transition#\" + id + \"( '\" + from + \"'\" + fromParams + \" -> \" + toValid + \"'\" + to + \"'\" + toParams + \" )\";\n\t };\n\t Transition.diToken = Transition;\n\t return Transition;\n\t}());\n\texports.Transition = Transition;\n\n\n/***/ },\n/* 12 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\t/**\n\t * UI-Router Transition Tracing\n\t *\n\t * Enable transition tracing to print transition information to the console, in order to help debug your application.\n\t * Tracing logs detailed information about each Transition to your console.\n\t *\n\t * To enable tracing, import the [[trace]] singleton and enable one or more categories.\n\t *\n\t * ES6\n\t * ```\n\t *\n\t * import {trace} from \"ui-router-ng2\"; // or \"angular-ui-router\"\n\t * trace.enable(1, 5); // TRANSITION and VIEWCONFIG\n\t * ```\n\t *\n\t * CJS\n\t * ```\n\t *\n\t * let trace = require(\"angular-ui-router\").trace; // or \"ui-router-ng2\"\n\t * trace.enable(\"TRANSITION\", \"VIEWCONFIG\");\n\t * ```\n\t *\n\t * Globals\n\t * ```\n\t *\n\t * let trace = window[\"angular-ui-router\"].trace; // or \"ui-router-ng2\"\n\t * trace.enable(); // Trace everything (very verbose)\n\t * ```\n\t *\n\t * @module trace\n\t */ /** for typedoc */\n\tvar hof_1 = __webpack_require__(5);\n\tvar predicates_1 = __webpack_require__(4);\n\tvar strings_1 = __webpack_require__(9);\n\t/** @hidden */\n\tfunction uiViewString(viewData) {\n\t if (!viewData)\n\t return 'ui-view (defunct)';\n\t return (\"[ui-view#\" + viewData.id + \" tag \") +\n\t (\"in template from '\" + (viewData.creationContext && viewData.creationContext.name || '(root)') + \"' state]: \") +\n\t (\"fqn: '\" + viewData.fqn + \"', \") +\n\t (\"name: '\" + viewData.name + \"@\" + viewData.creationContext + \"')\");\n\t}\n\t/** @hidden */\n\tvar viewConfigString = function (viewConfig) {\n\t return (\"[ViewConfig#\" + viewConfig.$id + \" from '\" + (viewConfig.viewDecl.$context.name || '(root)') + \"' state]: target ui-view: '\" + viewConfig.viewDecl.$uiViewName + \"@\" + viewConfig.viewDecl.$uiViewContextAnchor + \"'\");\n\t};\n\t/** @hidden */\n\tfunction normalizedCat(input) {\n\t return predicates_1.isNumber(input) ? Category[input] : Category[Category[input]];\n\t}\n\t/**\n\t * Trace categories\n\t *\n\t * [[Trace.enable]] or [[Trace.disable]] a category\n\t *\n\t * `trace.enable(Category.TRANSITION)`\n\t *\n\t * These can also be provided using a matching string, or position ordinal\n\t *\n\t * `trace.enable(\"TRANSITION\")`\n\t *\n\t * `trace.enable(1)`\n\t */\n\t(function (Category) {\n\t Category[Category[\"RESOLVE\"] = 0] = \"RESOLVE\";\n\t Category[Category[\"TRANSITION\"] = 1] = \"TRANSITION\";\n\t Category[Category[\"HOOK\"] = 2] = \"HOOK\";\n\t Category[Category[\"INVOKE\"] = 3] = \"INVOKE\";\n\t Category[Category[\"UIVIEW\"] = 4] = \"UIVIEW\";\n\t Category[Category[\"VIEWCONFIG\"] = 5] = \"VIEWCONFIG\";\n\t})(exports.Category || (exports.Category = {}));\n\tvar Category = exports.Category;\n\t/**\n\t * Prints UI-Router Transition trace information to the console.\n\t */\n\tvar Trace = (function () {\n\t function Trace() {\n\t /** @hidden */\n\t this._enabled = {};\n\t this.approximateDigests = 0;\n\t }\n\t /** @hidden */\n\t Trace.prototype._set = function (enabled, categories) {\n\t var _this = this;\n\t if (!categories.length) {\n\t categories = Object.keys(Category)\n\t .filter(function (k) { return isNaN(parseInt(k, 10)); })\n\t .map(function (key) { return Category[key]; });\n\t }\n\t categories.map(normalizedCat).forEach(function (category) { return _this._enabled[category] = enabled; });\n\t };\n\t /**\n\t * Enables a trace [[Category]]\n\t *\n\t * ```\n\t * trace.enable(\"TRANSITION\");\n\t * ```\n\t *\n\t * @param categories categories to enable. If `categories` is omitted, all categories are enabled.\n\t * Also takes strings (category name) or ordinal (category position)\n\t */\n\t Trace.prototype.enable = function () {\n\t var categories = [];\n\t for (var _i = 0; _i < arguments.length; _i++) {\n\t categories[_i - 0] = arguments[_i];\n\t }\n\t this._set(true, categories);\n\t };\n\t /**\n\t * Disables a trace [[Category]]\n\t *\n\t * ```\n\t * trace.disable(\"VIEWCONFIG\");\n\t * ```\n\t *\n\t * @param categories categories to disable. If `categories` is omitted, all categories are disabled.\n\t * Also takes strings (category name) or ordinal (category position)\n\t */\n\t Trace.prototype.disable = function () {\n\t var categories = [];\n\t for (var _i = 0; _i < arguments.length; _i++) {\n\t categories[_i - 0] = arguments[_i];\n\t }\n\t this._set(false, categories);\n\t };\n\t /**\n\t * Retrieves the enabled stateus of a [[Category]]\n\t *\n\t * ```\n\t * trace.enabled(\"VIEWCONFIG\"); // true or false\n\t * ```\n\t *\n\t * @returns boolean true if the category is enabled\n\t */\n\t Trace.prototype.enabled = function (category) {\n\t return !!this._enabled[normalizedCat(category)];\n\t };\n\t /** called by ui-router code */\n\t Trace.prototype.traceTransitionStart = function (transition) {\n\t if (!this.enabled(Category.TRANSITION))\n\t return;\n\t var tid = transition.$id, digest = this.approximateDigests, transitionStr = strings_1.stringify(transition);\n\t console.log(\"Transition #\" + tid + \" Digest #\" + digest + \": Started -> \" + transitionStr);\n\t };\n\t /** called by ui-router code */\n\t Trace.prototype.traceTransitionIgnored = function (trans) {\n\t if (!this.enabled(Category.TRANSITION))\n\t return;\n\t var tid = trans && trans.$id, digest = this.approximateDigests, transitionStr = strings_1.stringify(trans);\n\t console.log(\"Transition #\" + tid + \" Digest #\" + digest + \": Ignored <> \" + transitionStr);\n\t };\n\t /** called by ui-router code */\n\t Trace.prototype.traceHookInvocation = function (step, options) {\n\t if (!this.enabled(Category.HOOK))\n\t return;\n\t var tid = hof_1.parse(\"transition.$id\")(options), digest = this.approximateDigests, event = hof_1.parse(\"traceData.hookType\")(options) || \"internal\", context = hof_1.parse(\"traceData.context.state.name\")(options) || hof_1.parse(\"traceData.context\")(options) || \"unknown\", name = strings_1.functionToString(step.fn);\n\t console.log(\"Transition #\" + tid + \" Digest #\" + digest + \": Hook -> \" + event + \" context: \" + context + \", \" + strings_1.maxLength(200, name));\n\t };\n\t /** called by ui-router code */\n\t Trace.prototype.traceHookResult = function (hookResult, transitionResult, transitionOptions) {\n\t if (!this.enabled(Category.HOOK))\n\t return;\n\t var tid = hof_1.parse(\"transition.$id\")(transitionOptions), digest = this.approximateDigests, hookResultStr = strings_1.stringify(hookResult), transitionResultStr = strings_1.stringify(transitionResult);\n\t console.log(\"Transition #\" + tid + \" Digest #\" + digest + \": <- Hook returned: \" + strings_1.maxLength(200, hookResultStr) + \", transition result: \" + strings_1.maxLength(200, transitionResultStr));\n\t };\n\t /** called by ui-router code */\n\t Trace.prototype.traceResolvePath = function (path, when, trans) {\n\t if (!this.enabled(Category.RESOLVE))\n\t return;\n\t var tid = trans && trans.$id, digest = this.approximateDigests, pathStr = path && path.toString();\n\t console.log(\"Transition #\" + tid + \" Digest #\" + digest + \": Resolving \" + pathStr + \" (\" + when + \")\");\n\t };\n\t /** called by ui-router code */\n\t Trace.prototype.traceResolvableResolved = function (resolvable, trans) {\n\t if (!this.enabled(Category.RESOLVE))\n\t return;\n\t var tid = trans && trans.$id, digest = this.approximateDigests, resolvableStr = resolvable && resolvable.toString(), result = strings_1.stringify(resolvable.data);\n\t console.log(\"Transition #\" + tid + \" Digest #\" + digest + \": <- Resolved \" + resolvableStr + \" to: \" + strings_1.maxLength(200, result));\n\t };\n\t /** called by ui-router code */\n\t Trace.prototype.traceError = function (error, trans) {\n\t if (!this.enabled(Category.TRANSITION))\n\t return;\n\t var tid = trans && trans.$id, digest = this.approximateDigests, transitionStr = strings_1.stringify(trans);\n\t console.log(\"Transition #\" + tid + \" Digest #\" + digest + \": <- Rejected \" + transitionStr + \", reason: \" + error);\n\t };\n\t /** called by ui-router code */\n\t Trace.prototype.traceSuccess = function (finalState, trans) {\n\t if (!this.enabled(Category.TRANSITION))\n\t return;\n\t var tid = trans && trans.$id, digest = this.approximateDigests, state = finalState.name, transitionStr = strings_1.stringify(trans);\n\t console.log(\"Transition #\" + tid + \" Digest #\" + digest + \": <- Success \" + transitionStr + \", final state: \" + state);\n\t };\n\t /** called by ui-router code */\n\t Trace.prototype.traceUIViewEvent = function (event, viewData, extra) {\n\t if (extra === void 0) { extra = \"\"; }\n\t if (!this.enabled(Category.UIVIEW))\n\t return;\n\t console.log(\"ui-view: \" + strings_1.padString(30, event) + \" \" + uiViewString(viewData) + extra);\n\t };\n\t /** called by ui-router code */\n\t Trace.prototype.traceUIViewConfigUpdated = function (viewData, context) {\n\t if (!this.enabled(Category.UIVIEW))\n\t return;\n\t this.traceUIViewEvent(\"Updating\", viewData, \" with ViewConfig from context='\" + context + \"'\");\n\t };\n\t /** called by ui-router code */\n\t Trace.prototype.traceUIViewScopeCreated = function (viewData, newScope) {\n\t if (!this.enabled(Category.UIVIEW))\n\t return;\n\t this.traceUIViewEvent(\"Created scope for\", viewData, \", scope #\" + newScope.$id);\n\t };\n\t /** called by ui-router code */\n\t Trace.prototype.traceUIViewFill = function (viewData, html) {\n\t if (!this.enabled(Category.UIVIEW))\n\t return;\n\t this.traceUIViewEvent(\"Fill\", viewData, \" with: \" + strings_1.maxLength(200, html));\n\t };\n\t /** called by ui-router code */\n\t Trace.prototype.traceViewServiceEvent = function (event, viewConfig) {\n\t if (!this.enabled(Category.VIEWCONFIG))\n\t return;\n\t console.log(\"VIEWCONFIG: \" + event + \" \" + viewConfigString(viewConfig));\n\t };\n\t /** called by ui-router code */\n\t Trace.prototype.traceViewServiceUIViewEvent = function (event, viewData) {\n\t if (!this.enabled(Category.VIEWCONFIG))\n\t return;\n\t console.log(\"VIEWCONFIG: \" + event + \" \" + uiViewString(viewData));\n\t };\n\t return Trace;\n\t}());\n\texports.Trace = Trace;\n\t/**\n\t * The [[Trace]] singleton\n\t *\n\t * @example\n\t * ```js\n\t *\n\t * import {trace} from \"angular-ui-router\";\n\t * trace.enable(1, 5);\n\t * ```\n\t */\n\tvar trace = new Trace();\n\texports.trace = trace;\n\n\n/***/ },\n/* 13 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\tvar common_1 = __webpack_require__(3);\n\tvar strings_1 = __webpack_require__(9);\n\tvar predicates_1 = __webpack_require__(4);\n\tvar hof_1 = __webpack_require__(5);\n\tvar trace_1 = __webpack_require__(12);\n\tvar coreservices_1 = __webpack_require__(6);\n\tvar rejectFactory_1 = __webpack_require__(10);\n\tvar targetState_1 = __webpack_require__(14);\n\tvar defaultOptions = {\n\t async: true,\n\t rejectIfSuperseded: true,\n\t current: common_1.noop,\n\t transition: null,\n\t traceData: {},\n\t bind: null\n\t};\n\t/** @hidden */\n\tvar TransitionHook = (function () {\n\t function TransitionHook(transition, stateContext, hookFn, resolveContext, options) {\n\t var _this = this;\n\t this.transition = transition;\n\t this.stateContext = stateContext;\n\t this.hookFn = hookFn;\n\t this.resolveContext = resolveContext;\n\t this.options = options;\n\t this.isSuperseded = function () { return _this.options.current() !== _this.options.transition; };\n\t this.options = common_1.defaults(options, defaultOptions);\n\t }\n\t TransitionHook.prototype.invokeHook = function () {\n\t var _a = this, options = _a.options, hookFn = _a.hookFn, resolveContext = _a.resolveContext;\n\t trace_1.trace.traceHookInvocation(this, options);\n\t if (options.rejectIfSuperseded && this.isSuperseded()) {\n\t return rejectFactory_1.Rejection.superseded(options.current()).toPromise();\n\t }\n\t var hookResult = hookFn.call(options.bind, this.transition, this.stateContext);\n\t return this.handleHookResult(hookResult);\n\t };\n\t /**\n\t * This method handles the return value of a Transition Hook.\n\t *\n\t * A hook can return false, a redirect (TargetState), or a promise (which may resolve to false or a redirect)\n\t */\n\t TransitionHook.prototype.handleHookResult = function (hookResult) {\n\t var _this = this;\n\t if (!predicates_1.isDefined(hookResult))\n\t return undefined;\n\t /**\n\t * Handles transition superseded, transition aborted and transition redirect.\n\t */\n\t var mapHookResult = hof_1.pattern([\n\t // Transition is no longer current\n\t [this.isSuperseded, function () { return rejectFactory_1.Rejection.superseded(_this.options.current()).toPromise(); }],\n\t // If the hook returns false, abort the current Transition\n\t [hof_1.eq(false), function () { return rejectFactory_1.Rejection.aborted(\"Hook aborted transition\").toPromise(); }],\n\t // If the hook returns a Transition, halt the current Transition and redirect to that Transition.\n\t [hof_1.is(targetState_1.TargetState), function (target) { return rejectFactory_1.Rejection.redirected(target).toPromise(); }],\n\t // A promise was returned, wait for the promise and then chain another hookHandler\n\t [predicates_1.isPromise, function (promise) { return promise.then(_this.handleHookResult.bind(_this)); }]\n\t ]);\n\t var transitionResult = mapHookResult(hookResult);\n\t if (transitionResult)\n\t trace_1.trace.traceHookResult(hookResult, transitionResult, this.options);\n\t return transitionResult;\n\t };\n\t TransitionHook.prototype.toString = function () {\n\t var _a = this, options = _a.options, hookFn = _a.hookFn;\n\t var event = hof_1.parse(\"traceData.hookType\")(options) || \"internal\", context = hof_1.parse(\"traceData.context.state.name\")(options) || hof_1.parse(\"traceData.context\")(options) || \"unknown\", name = strings_1.fnToString(hookFn);\n\t return event + \" context: \" + context + \", \" + strings_1.maxLength(200, name);\n\t };\n\t /**\n\t * Given an array of TransitionHooks, runs each one synchronously and sequentially.\n\t *\n\t * Returns a promise chain composed of any promises returned from each hook.invokeStep() call\n\t */\n\t TransitionHook.runSynchronousHooks = function (hooks, swallowExceptions) {\n\t if (swallowExceptions === void 0) { swallowExceptions = false; }\n\t var results = [];\n\t for (var i = 0; i < hooks.length; i++) {\n\t try {\n\t results.push(hooks[i].invokeHook());\n\t }\n\t catch (exception) {\n\t if (!swallowExceptions) {\n\t return rejectFactory_1.Rejection.errored(exception).toPromise();\n\t }\n\t console.error(\"Swallowed exception during synchronous hook handler: \" + exception); // TODO: What to do here?\n\t }\n\t }\n\t var rejections = results.filter(rejectFactory_1.Rejection.isTransitionRejectionPromise);\n\t if (rejections.length)\n\t return rejections[0];\n\t return results\n\t .filter(predicates_1.isPromise)\n\t .reduce(function (chain, promise) { return chain.then(hof_1.val(promise)); }, coreservices_1.services.$q.when());\n\t };\n\t return TransitionHook;\n\t}());\n\texports.TransitionHook = TransitionHook;\n\n\n/***/ },\n/* 14 */\n/***/ function(module, exports) {\n\n\t/** @module state */ /** for typedoc */\n\t\"use strict\";\n\t/**\n\t * @ngdoc object\n\t * @name ui.router.state.type:TargetState\n\t *\n\t * @description\n\t * Encapsulate the desired target of a transition.\n\t * Wraps an identifier for a state, a set of parameters, and transition options with the definition of the state.\n\t *\n\t * @param {StateOrName} _identifier An identifier for a state. Either a fully-qualified path, or the object\n\t * used to define the state.\n\t * @param {IState} _definition The `State` object definition.\n\t * @param {ParamsOrArray} _params Parameters for the target state\n\t * @param {TransitionOptions} _options Transition options.\n\t */\n\tvar TargetState = (function () {\n\t function TargetState(_identifier, _definition, _params, _options) {\n\t if (_params === void 0) { _params = {}; }\n\t if (_options === void 0) { _options = {}; }\n\t this._identifier = _identifier;\n\t this._definition = _definition;\n\t this._options = _options;\n\t this._params = _params || {};\n\t }\n\t TargetState.prototype.name = function () {\n\t return this._definition && this._definition.name || this._identifier;\n\t };\n\t TargetState.prototype.identifier = function () {\n\t return this._identifier;\n\t };\n\t TargetState.prototype.params = function () {\n\t return this._params;\n\t };\n\t TargetState.prototype.$state = function () {\n\t return this._definition;\n\t };\n\t TargetState.prototype.state = function () {\n\t return this._definition && this._definition.self;\n\t };\n\t TargetState.prototype.options = function () {\n\t return this._options;\n\t };\n\t TargetState.prototype.exists = function () {\n\t return !!(this._definition && this._definition.self);\n\t };\n\t TargetState.prototype.valid = function () {\n\t return !this.error();\n\t };\n\t TargetState.prototype.error = function () {\n\t var base = this.options().relative;\n\t if (!this._definition && !!base) {\n\t var stateName = base.name ? base.name : base;\n\t return \"Could not resolve '\" + this.name() + \"' from state '\" + stateName + \"'\";\n\t }\n\t if (!this._definition)\n\t return \"No such state '\" + this.name() + \"'\";\n\t if (!this._definition.self)\n\t return \"State '\" + this.name() + \"' has an invalid definition\";\n\t };\n\t return TargetState;\n\t}());\n\texports.TargetState = TargetState;\n\n\n/***/ },\n/* 15 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\t/** @module transition */ /** for typedoc */\n\tvar common_1 = __webpack_require__(3);\n\tvar predicates_1 = __webpack_require__(4);\n\tvar glob_1 = __webpack_require__(7);\n\t/**\n\t * Determines if the given state matches the matchCriteria\n\t *\n\t * @hidden\n\t *\n\t * @param state a State Object to test against\n\t * @param criterion\n\t * - If a string, matchState uses the string as a glob-matcher against the state name\n\t * - If an array (of strings), matchState uses each string in the array as a glob-matchers against the state name\n\t * and returns a positive match if any of the globs match.\n\t * - If a function, matchState calls the function with the state and returns true if the function's result is truthy.\n\t * @returns {boolean}\n\t */\n\tfunction matchState(state, criterion) {\n\t var toMatch = predicates_1.isString(criterion) ? [criterion] : criterion;\n\t function matchGlobs(_state) {\n\t var globStrings = toMatch;\n\t for (var i = 0; i < globStrings.length; i++) {\n\t var glob = glob_1.Glob.fromString(globStrings[i]);\n\t if ((glob && glob.matches(_state.name)) || (!glob && globStrings[i] === _state.name)) {\n\t return true;\n\t }\n\t }\n\t return false;\n\t }\n\t var matchFn = (predicates_1.isFunction(toMatch) ? toMatch : matchGlobs);\n\t return !!matchFn(state);\n\t}\n\texports.matchState = matchState;\n\t/** @hidden */\n\tvar EventHook = (function () {\n\t function EventHook(matchCriteria, callback, options) {\n\t if (options === void 0) { options = {}; }\n\t this.callback = callback;\n\t this.matchCriteria = common_1.extend({ to: true, from: true, exiting: true, retained: true, entering: true }, matchCriteria);\n\t this.priority = options.priority || 0;\n\t this.bind = options.bind || null;\n\t }\n\t EventHook._matchingNodes = function (nodes, criterion) {\n\t if (criterion === true)\n\t return nodes;\n\t var matching = nodes.filter(function (node) { return matchState(node.state, criterion); });\n\t return matching.length ? matching : null;\n\t };\n\t /**\n\t * Determines if this hook's [[matchCriteria]] match the given [[TreeChanges]]\n\t *\n\t * @returns an IMatchingNodes object, or null. If an IMatchingNodes object is returned, its values\n\t * are the matching [[PathNode]]s for each [[HookMatchCriterion]] (to, from, exiting, retained, entering)\n\t */\n\t EventHook.prototype.matches = function (treeChanges) {\n\t var mc = this.matchCriteria, _matchingNodes = EventHook._matchingNodes;\n\t var matches = {\n\t to: _matchingNodes([common_1.tail(treeChanges.to)], mc.to),\n\t from: _matchingNodes([common_1.tail(treeChanges.from)], mc.from),\n\t exiting: _matchingNodes(treeChanges.exiting, mc.exiting),\n\t retained: _matchingNodes(treeChanges.retained, mc.retained),\n\t entering: _matchingNodes(treeChanges.entering, mc.entering),\n\t };\n\t // Check if all the criteria matched the TreeChanges object\n\t var allMatched = [\"to\", \"from\", \"exiting\", \"retained\", \"entering\"]\n\t .map(function (prop) { return matches[prop]; })\n\t .reduce(common_1.allTrueR, true);\n\t return allMatched ? matches : null;\n\t };\n\t return EventHook;\n\t}());\n\texports.EventHook = EventHook;\n\t/** @hidden Return a registration function of the requested type. */\n\tfunction makeHookRegistrationFn(hooks, name) {\n\t return function (matchObject, callback, options) {\n\t if (options === void 0) { options = {}; }\n\t var eventHook = new EventHook(matchObject, callback, options);\n\t hooks[name].push(eventHook);\n\t return function deregisterEventHook() {\n\t common_1.removeFrom(hooks[name])(eventHook);\n\t };\n\t };\n\t}\n\t/**\n\t * Mixin class acts as a Transition Hook registry.\n\t *\n\t * Holds the registered [[HookFn]] objects.\n\t * Exposes functions to register new hooks.\n\t *\n\t * This is a Mixin class which can be applied to other objects.\n\t *\n\t * The hook registration functions are [[onBefore]], [[onStart]], [[onEnter]], [[onRetain]], [[onExit]], [[onFinish]], [[onSuccess]], [[onError]].\n\t *\n\t * This class is mixed into both the [[TransitionService]] and every [[Transition]] object.\n\t * Global hooks are added to the [[TransitionService]].\n\t * Since each [[Transition]] is itself a `HookRegistry`, hooks can also be added to individual Transitions\n\t * (note: the hook criteria still must match the Transition).\n\t */\n\tvar HookRegistry = (function () {\n\t function HookRegistry() {\n\t var _this = this;\n\t this._transitionEvents = {\n\t onBefore: [], onStart: [], onEnter: [], onRetain: [], onExit: [], onFinish: [], onSuccess: [], onError: []\n\t };\n\t this.getHooks = function (name) { return _this._transitionEvents[name]; };\n\t /** @inheritdoc */\n\t this.onBefore = makeHookRegistrationFn(this._transitionEvents, \"onBefore\");\n\t /** @inheritdoc */\n\t this.onStart = makeHookRegistrationFn(this._transitionEvents, \"onStart\");\n\t /** @inheritdoc */\n\t this.onEnter = makeHookRegistrationFn(this._transitionEvents, \"onEnter\");\n\t /** @inheritdoc */\n\t this.onRetain = makeHookRegistrationFn(this._transitionEvents, \"onRetain\");\n\t /** @inheritdoc */\n\t this.onExit = makeHookRegistrationFn(this._transitionEvents, \"onExit\");\n\t /** @inheritdoc */\n\t this.onFinish = makeHookRegistrationFn(this._transitionEvents, \"onFinish\");\n\t /** @inheritdoc */\n\t this.onSuccess = makeHookRegistrationFn(this._transitionEvents, \"onSuccess\");\n\t /** @inheritdoc */\n\t this.onError = makeHookRegistrationFn(this._transitionEvents, \"onError\");\n\t }\n\t HookRegistry.mixin = function (source, target) {\n\t Object.keys(source._transitionEvents).concat([\"getHooks\"]).forEach(function (key) { return target[key] = source[key]; });\n\t };\n\t return HookRegistry;\n\t}());\n\texports.HookRegistry = HookRegistry;\n\n\n/***/ },\n/* 16 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/** @module transition */ /** for typedoc */\n\t\"use strict\";\n\tvar common_1 = __webpack_require__(3);\n\tvar predicates_1 = __webpack_require__(4);\n\tvar transitionHook_1 = __webpack_require__(13);\n\tvar resolveContext_1 = __webpack_require__(17);\n\t/**\n\t * This class returns applicable TransitionHooks for a specific Transition instance.\n\t *\n\t * Hooks (IEventHook) may be registered globally, e.g., $transitions.onEnter(...), or locally, e.g.\n\t * myTransition.onEnter(...). The HookBuilder finds matching IEventHooks (where the match criteria is\n\t * determined by the type of hook)\n\t *\n\t * The HookBuilder also converts IEventHooks objects to TransitionHook objects, which are used to run a Transition.\n\t *\n\t * The HookBuilder constructor is given the $transitions service and a Transition instance. Thus, a HookBuilder\n\t * instance may only be used for one specific Transition object. (side note: the _treeChanges accessor is private\n\t * in the Transition class, so we must also provide the Transition's _treeChanges)\n\t *\n\t */\n\tvar HookBuilder = (function () {\n\t function HookBuilder($transitions, transition, baseHookOptions) {\n\t var _this = this;\n\t this.$transitions = $transitions;\n\t this.transition = transition;\n\t this.baseHookOptions = baseHookOptions;\n\t this.getOnBeforeHooks = function () { return _this._buildNodeHooks(\"onBefore\", \"to\", tupleSort(), { async: false }); };\n\t this.getOnStartHooks = function () { return _this._buildNodeHooks(\"onStart\", \"to\", tupleSort()); };\n\t this.getOnExitHooks = function () { return _this._buildNodeHooks(\"onExit\", \"exiting\", tupleSort(true), { stateHook: true }); };\n\t this.getOnRetainHooks = function () { return _this._buildNodeHooks(\"onRetain\", \"retained\", tupleSort(false), { stateHook: true }); };\n\t this.getOnEnterHooks = function () { return _this._buildNodeHooks(\"onEnter\", \"entering\", tupleSort(false), { stateHook: true }); };\n\t this.getOnFinishHooks = function () { return _this._buildNodeHooks(\"onFinish\", \"to\", tupleSort()); };\n\t this.getOnSuccessHooks = function () { return _this._buildNodeHooks(\"onSuccess\", \"to\", tupleSort(), { async: false, rejectIfSuperseded: false }); };\n\t this.getOnErrorHooks = function () { return _this._buildNodeHooks(\"onError\", \"to\", tupleSort(), { async: false, rejectIfSuperseded: false }); };\n\t this.treeChanges = transition.treeChanges();\n\t this.toState = common_1.tail(this.treeChanges.to).state;\n\t this.fromState = common_1.tail(this.treeChanges.from).state;\n\t this.transitionOptions = transition.options();\n\t }\n\t HookBuilder.prototype.asyncHooks = function () {\n\t var onStartHooks = this.getOnStartHooks();\n\t var onExitHooks = this.getOnExitHooks();\n\t var onRetainHooks = this.getOnRetainHooks();\n\t var onEnterHooks = this.getOnEnterHooks();\n\t var onFinishHooks = this.getOnFinishHooks();\n\t var asyncHooks = [onStartHooks, onExitHooks, onRetainHooks, onEnterHooks, onFinishHooks];\n\t return asyncHooks.reduce(common_1.unnestR, []).filter(common_1.identity);\n\t };\n\t /**\n\t * Returns an array of newly built TransitionHook objects.\n\t *\n\t * - Finds all IEventHooks registered for the given `hookType` which matched the transition's [[TreeChanges]].\n\t * - Finds [[PathNode]] (or `PathNode[]`) to use as the TransitionHook context(s)\n\t * - For each of the [[PathNode]]s, creates a TransitionHook\n\t *\n\t * @param hookType the name of the hook registration function, e.g., 'onEnter', 'onFinish'.\n\t * @param matchingNodesProp selects which [[PathNode]]s from the [[IMatchingNodes]] object to create hooks for.\n\t * @param getLocals a function which accepts a [[PathNode]] and returns additional locals to provide to the hook as injectables\n\t * @param sortHooksFn a function which compares two HookTuple and returns <1, 0, or >1\n\t * @param options any specific Transition Hook Options\n\t */\n\t HookBuilder.prototype._buildNodeHooks = function (hookType, matchingNodesProp, sortHooksFn, options) {\n\t var _this = this;\n\t // Find all the matching registered hooks for a given hook type\n\t var matchingHooks = this._matchingHooks(hookType, this.treeChanges);\n\t if (!matchingHooks)\n\t return [];\n\t var makeTransitionHooks = function (hook) {\n\t // Fetch the Nodes that caused this hook to match.\n\t var matches = hook.matches(_this.treeChanges);\n\t // Select the PathNode[] that will be used as TransitionHook context objects\n\t var matchingNodes = matches[matchingNodesProp];\n\t // When invoking 'exiting' hooks, give them the \"from path\" for resolve data.\n\t // Everything else gets the \"to path\"\n\t var resolvePath = matchingNodesProp === 'exiting' ? _this.treeChanges.from : _this.treeChanges.to;\n\t var resolveContext = new resolveContext_1.ResolveContext(resolvePath);\n\t // Return an array of HookTuples\n\t return matchingNodes.map(function (node) {\n\t var _options = common_1.extend({ bind: hook.bind, traceData: { hookType: hookType, context: node } }, _this.baseHookOptions, options);\n\t var state = _options.stateHook ? node.state : null;\n\t var context = resolveContext.subContext(node.state);\n\t var transitionHook = new transitionHook_1.TransitionHook(_this.transition, state, hook.callback, context, _options);\n\t return { hook: hook, node: node, transitionHook: transitionHook };\n\t });\n\t };\n\t return matchingHooks.map(makeTransitionHooks)\n\t .reduce(common_1.unnestR, [])\n\t .sort(sortHooksFn)\n\t .map(function (tuple) { return tuple.transitionHook; });\n\t };\n\t /**\n\t * Finds all IEventHooks from:\n\t * - The Transition object instance hook registry\n\t * - The TransitionService ($transitions) global hook registry\n\t *\n\t * which matched:\n\t * - the eventType\n\t * - the matchCriteria (to, from, exiting, retained, entering)\n\t *\n\t * @returns an array of matched [[IEventHook]]s\n\t */\n\t HookBuilder.prototype._matchingHooks = function (hookName, treeChanges) {\n\t return [this.transition, this.$transitions] // Instance and Global hook registries\n\t .map(function (reg) { return reg.getHooks(hookName); }) // Get named hooks from registries\n\t .filter(common_1.assertPredicate(predicates_1.isArray, \"broken event named: \" + hookName)) // Sanity check\n\t .reduce(common_1.unnestR, []) // Un-nest IEventHook[][] to IEventHook[] array\n\t .filter(function (hook) { return hook.matches(treeChanges); }); // Only those satisfying matchCriteria\n\t };\n\t return HookBuilder;\n\t}());\n\texports.HookBuilder = HookBuilder;\n\t/**\n\t * A factory for a sort function for HookTuples.\n\t *\n\t * The sort function first compares the PathNode depth (how deep in the state tree a node is), then compares\n\t * the EventHook priority.\n\t *\n\t * @param reverseDepthSort a boolean, when true, reverses the sort order for the node depth\n\t * @returns a tuple sort function\n\t */\n\tfunction tupleSort(reverseDepthSort) {\n\t if (reverseDepthSort === void 0) { reverseDepthSort = false; }\n\t return function nodeDepthThenPriority(l, r) {\n\t var factor = reverseDepthSort ? -1 : 1;\n\t var depthDelta = (l.node.state.path.length - r.node.state.path.length) * factor;\n\t return depthDelta !== 0 ? depthDelta : r.hook.priority - l.hook.priority;\n\t };\n\t}\n\n\n/***/ },\n/* 17 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\t/** @module resolve */ /** for typedoc */\n\tvar common_1 = __webpack_require__(3);\n\tvar hof_1 = __webpack_require__(5);\n\tvar trace_1 = __webpack_require__(12);\n\tvar coreservices_1 = __webpack_require__(6);\n\tvar interface_1 = __webpack_require__(18);\n\tvar resolvable_1 = __webpack_require__(19);\n\tvar pathFactory_1 = __webpack_require__(20);\n\tvar strings_1 = __webpack_require__(9);\n\tvar when = interface_1.resolvePolicies.when;\n\tvar ALL_WHENS = [when.EAGER, when.LAZY];\n\tvar EAGER_WHENS = [when.EAGER];\n\t/**\n\t * Encapsulates Depenency Injection for a path of nodes\n\t *\n\t * UI-Router states are organized as a tree.\n\t * A nested state has a path of ancestors to the root of the tree.\n\t * When a state is being activated, each element in the path is wrapped as a [[PathNode]].\n\t * A `PathNode` is a stateful object that holds things like parameters and resolvables for the state being activated.\n\t *\n\t * The ResolveContext closes over the [[PathNode]]s, and provides DI for the last node in the path.\n\t */\n\tvar ResolveContext = (function () {\n\t function ResolveContext(_path) {\n\t this._path = _path;\n\t }\n\t /** Gets all the tokens found in the resolve context, de-duplicated */\n\t ResolveContext.prototype.getTokens = function () {\n\t return this._path.reduce(function (acc, node) { return acc.concat(node.resolvables.map(function (r) { return r.token; })); }, []).reduce(common_1.uniqR, []);\n\t };\n\t /**\n\t * Gets the Resolvable that matches the token\n\t *\n\t * Gets the last Resolvable that matches the token in this context, or undefined.\n\t * Throws an error if it doesn't exist in the ResolveContext\n\t */\n\t ResolveContext.prototype.getResolvable = function (token) {\n\t var matching = this._path.map(function (node) { return node.resolvables; })\n\t .reduce(common_1.unnestR, [])\n\t .filter(function (r) { return r.token === token; });\n\t return common_1.tail(matching);\n\t };\n\t /**\n\t * Returns a ResolveContext that includes a portion of this one\n\t *\n\t * Given a state, this method creates a new ResolveContext from this one.\n\t * The new context starts at the first node (root) and stops at the node for the `state` parameter.\n\t *\n\t * #### Why\n\t *\n\t * When a transition is created, the nodes in the \"To Path\" are injected from a ResolveContext.\n\t * A ResolveContext closes over a path of [[PathNode]]s and processes the resolvables.\n\t * The \"To State\" can inject values from its own resolvables, as well as those from all its ancestor state's (node's).\n\t * This method is used to create a narrower context when injecting ancestor nodes.\n\t *\n\t * @example\n\t * `let ABCD = new ResolveContext([A, B, C, D]);`\n\t *\n\t * Given a path `[A, B, C, D]`, where `A`, `B`, `C` and `D` are nodes for states `a`, `b`, `c`, `d`:\n\t * When injecting `D`, `D` should have access to all resolvables from `A`, `B`, `C`, `D`.\n\t * However, `B` should only be able to access resolvables from `A`, `B`.\n\t *\n\t * When resolving for the `B` node, first take the full \"To Path\" Context `[A,B,C,D]` and limit to the subpath `[A,B]`.\n\t * `let AB = ABCD.subcontext(a)`\n\t */\n\t ResolveContext.prototype.subContext = function (state) {\n\t return new ResolveContext(pathFactory_1.PathFactory.subPath(this._path, function (node) { return node.state === state; }));\n\t };\n\t /**\n\t * Adds Resolvables to the node that matches the state\n\t *\n\t * This adds a [[Resolvable]] (generally one created on the fly; not declared on a [[StateDeclaration.resolve]] block).\n\t * The resolvable is added to the node matching the `state` parameter.\n\t *\n\t * These new resolvables are not automatically fetched.\n\t * The calling code should either fetch them, fetch something that depends on them,\n\t * or rely on [[resolvePath]] being called when some state is being entered.\n\t *\n\t * Note: each resolvable's [[ResolvePolicy]] is merged with the state's policy, and the global default.\n\t *\n\t * @param newResolvables the new Resolvables\n\t * @param state Used to find the node to put the resolvable on\n\t */\n\t ResolveContext.prototype.addResolvables = function (newResolvables, state) {\n\t var node = common_1.find(this._path, hof_1.propEq('state', state));\n\t var keys = newResolvables.map(function (r) { return r.token; });\n\t node.resolvables = node.resolvables.filter(function (r) { return keys.indexOf(r.token) === -1; }).concat(newResolvables);\n\t };\n\t /**\n\t * Returns a promise for an array of resolved path Element promises\n\t *\n\t * @param when\n\t * @param trans\n\t * @returns {Promise|any}\n\t */\n\t ResolveContext.prototype.resolvePath = function (when, trans) {\n\t var _this = this;\n\t if (when === void 0) { when = \"LAZY\"; }\n\t // This option determines which 'when' policy Resolvables we are about to fetch.\n\t var whenOption = common_1.inArray(ALL_WHENS, when) ? when : \"LAZY\";\n\t // If the caller specified EAGER, only the EAGER Resolvables are fetched.\n\t // if the caller specified LAZY, both EAGER and LAZY Resolvables are fetched.`\n\t var matchedWhens = whenOption === interface_1.resolvePolicies.when.EAGER ? EAGER_WHENS : ALL_WHENS;\n\t // get the subpath to the state argument, if provided\n\t trace_1.trace.traceResolvePath(this._path, when, trans);\n\t var promises = this._path.reduce(function (acc, node) {\n\t var matchesRequestedPolicy = function (resolvable) {\n\t return common_1.inArray(matchedWhens, resolvable.getPolicy(node.state).when);\n\t };\n\t var nodeResolvables = node.resolvables.filter(matchesRequestedPolicy);\n\t var subContext = _this.subContext(node.state);\n\t // For the matching Resolvables, start their async fetch process.\n\t var getResult = function (r) { return r.get(subContext, trans)\n\t .then(function (value) { return ({ token: r.token, value: value }); }); };\n\t return acc.concat(nodeResolvables.map(getResult));\n\t }, []);\n\t return coreservices_1.services.$q.all(promises);\n\t };\n\t ResolveContext.prototype.injector = function () {\n\t return new UIInjectorImpl(this);\n\t };\n\t ResolveContext.prototype.findNode = function (resolvable) {\n\t return common_1.find(this._path, function (node) { return common_1.inArray(node.resolvables, resolvable); });\n\t };\n\t /**\n\t * Gets the async dependencies of a Resolvable\n\t *\n\t * Given a Resolvable, returns its dependencies as a Resolvable[]\n\t */\n\t ResolveContext.prototype.getDependencies = function (resolvable) {\n\t var node = this.findNode(resolvable);\n\t // Find which other resolvables are \"visible\" to the `resolvable` argument\n\t // subpath stopping at resolvable's node, or the whole path (if the resolvable isn't in the path)\n\t var subPath = pathFactory_1.PathFactory.subPath(this._path, function (x) { return x === node; }) || this._path;\n\t var availableResolvables = subPath\n\t .reduce(function (acc, node) { return acc.concat(node.resolvables); }, []) //all of subpath's resolvables\n\t .filter(function (res) { return res !== resolvable; }); // filter out the `resolvable` argument\n\t var getDependency = function (token) {\n\t var matching = availableResolvables.filter(function (r) { return r.token === token; });\n\t if (matching.length)\n\t return common_1.tail(matching);\n\t var fromInjector = coreservices_1.services.$injector.get(token);\n\t if (!fromInjector) {\n\t throw new Error(\"Could not find Dependency Injection token: \" + strings_1.stringify(token));\n\t }\n\t return new resolvable_1.Resolvable(token, function () { return fromInjector; }, [], fromInjector);\n\t };\n\t return resolvable.deps.map(getDependency);\n\t };\n\t return ResolveContext;\n\t}());\n\texports.ResolveContext = ResolveContext;\n\tvar UIInjectorImpl = (function () {\n\t function UIInjectorImpl(context) {\n\t this.context = context;\n\t /** The native injector ($injector on ng1, Root Injector on ng2, justjs injector for everything else) */\n\t this.native = coreservices_1.services.$injector;\n\t }\n\t UIInjectorImpl.prototype.get = function (token) {\n\t var resolvable = this.context.getResolvable(token);\n\t if (resolvable) {\n\t if (!resolvable.resolved) {\n\t throw new Error(\"Resolvable async .get() not complete:\" + strings_1.stringify(resolvable.token));\n\t }\n\t return resolvable.data;\n\t }\n\t return coreservices_1.services.$injector.get(token);\n\t };\n\t UIInjectorImpl.prototype.getAsync = function (token) {\n\t var resolvable = this.context.getResolvable(token);\n\t if (resolvable)\n\t return resolvable.get(this.context);\n\t return coreservices_1.services.$q.when(coreservices_1.services.$injector.get(token));\n\t };\n\t return UIInjectorImpl;\n\t}());\n\n\n/***/ },\n/* 18 */\n/***/ function(module, exports) {\n\n\t\"use strict\";\n\texports.resolvePolicies = {\n\t when: {\n\t LAZY: \"LAZY\",\n\t EAGER: \"EAGER\"\n\t },\n\t async: {\n\t WAIT: \"WAIT\",\n\t NOWAIT: \"NOWAIT\",\n\t RXWAIT: \"RXWAIT\"\n\t }\n\t};\n\n\n/***/ },\n/* 19 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\t/** @module resolve */ /** for typedoc */\n\tvar common_1 = __webpack_require__(3);\n\tvar coreservices_1 = __webpack_require__(6);\n\tvar trace_1 = __webpack_require__(12);\n\tvar strings_1 = __webpack_require__(9);\n\tvar predicates_1 = __webpack_require__(4);\n\t// TODO: explicitly make this user configurable\n\texports.defaultResolvePolicy = {\n\t when: \"LAZY\",\n\t async: \"WAIT\"\n\t};\n\t/**\n\t * The basic building block for the resolve system.\n\t *\n\t * Resolvables encapsulate a state's resolve's resolveFn, the resolveFn's declared dependencies, the wrapped (.promise),\n\t * and the unwrapped-when-complete (.data) result of the resolveFn.\n\t *\n\t * Resolvable.get() either retrieves the Resolvable's existing promise, or else invokes resolve() (which invokes the\n\t * resolveFn) and returns the resulting promise.\n\t *\n\t * Resolvable.get() and Resolvable.resolve() both execute within a context path, which is passed as the first\n\t * parameter to those fns.\n\t */\n\tvar Resolvable = (function () {\n\t function Resolvable(arg1, resolveFn, deps, policy, data) {\n\t this.resolved = false;\n\t this.promise = undefined;\n\t if (arg1 instanceof Resolvable) {\n\t common_1.extend(this, arg1);\n\t }\n\t else if (predicates_1.isFunction(resolveFn)) {\n\t if (arg1 == null || arg1 == undefined)\n\t throw new Error(\"new Resolvable(): token argument is required\");\n\t if (!predicates_1.isFunction(resolveFn))\n\t throw new Error(\"new Resolvable(): resolveFn argument must be a function\");\n\t this.token = arg1;\n\t this.policy = policy;\n\t this.resolveFn = resolveFn;\n\t this.deps = deps || [];\n\t this.data = data;\n\t this.resolved = data !== undefined;\n\t this.promise = this.resolved ? coreservices_1.services.$q.when(this.data) : undefined;\n\t }\n\t else if (predicates_1.isObject(arg1) && arg1.token && predicates_1.isFunction(arg1.resolveFn)) {\n\t var literal = arg1;\n\t return new Resolvable(literal.token, literal.resolveFn, literal.deps, literal.policy, literal.data);\n\t }\n\t }\n\t Resolvable.prototype.getPolicy = function (state) {\n\t var thisPolicy = this.policy || {};\n\t var statePolicy = state && state.resolvePolicy || {};\n\t return {\n\t when: thisPolicy.when || statePolicy.when || exports.defaultResolvePolicy.when,\n\t async: thisPolicy.async || statePolicy.async || exports.defaultResolvePolicy.async,\n\t };\n\t };\n\t /**\n\t * Asynchronously resolve this Resolvable's data\n\t *\n\t * Given a ResolveContext that this Resolvable is found in:\n\t * Wait for this Resolvable's dependencies, then invoke this Resolvable's function\n\t * and update the Resolvable's state\n\t */\n\t Resolvable.prototype.resolve = function (resolveContext, trans) {\n\t var _this = this;\n\t var $q = coreservices_1.services.$q;\n\t // Gets all dependencies from ResolveContext and wait for them to be resolved\n\t var getResolvableDependencies = function () {\n\t return $q.all(resolveContext.getDependencies(_this).map(function (r) {\n\t return r.get(resolveContext, trans);\n\t }));\n\t };\n\t // Invokes the resolve function passing the resolved dependencies as arguments\n\t var invokeResolveFn = function (resolvedDeps) {\n\t return _this.resolveFn.apply(null, resolvedDeps);\n\t };\n\t /**\n\t * For RXWAIT policy:\n\t *\n\t * Given an observable returned from a resolve function:\n\t * - enables .cache() mode (this allows multicast subscribers)\n\t * - then calls toPromise() (this triggers subscribe() and thus fetches)\n\t * - Waits for the promise, then return the cached observable (not the first emitted value).\n\t */\n\t var waitForRx = function (observable$) {\n\t var cached = observable$.cache();\n\t return cached.toPromise().then(function () { return cached; });\n\t };\n\t // If the resolve policy is RXWAIT, wait for the observable to emit something. otherwise pass through.\n\t var node = resolveContext.findNode(this);\n\t var state = node && node.state;\n\t var maybeWaitForRx = this.getPolicy(state).async === \"RXWAIT\" ? waitForRx : function (x) { return x; };\n\t // After the final value has been resolved, update the state of the Resolvable\n\t var applyResolvedValue = function (resolvedValue) {\n\t _this.data = resolvedValue;\n\t _this.resolved = true;\n\t trace_1.trace.traceResolvableResolved(_this, trans);\n\t return _this.data;\n\t };\n\t // Sets the promise property first, then getsResolvableDependencies in the context of the promise chain. Always waits one tick.\n\t return this.promise = $q.when()\n\t .then(getResolvableDependencies)\n\t .then(invokeResolveFn)\n\t .then(maybeWaitForRx)\n\t .then(applyResolvedValue);\n\t };\n\t /**\n\t * Gets a promise for this Resolvable's data.\n\t *\n\t * Fetches the data and returns a promise.\n\t * Returns the existing promise if it has already been fetched once.\n\t */\n\t Resolvable.prototype.get = function (resolveContext, trans) {\n\t return this.promise || this.resolve(resolveContext, trans);\n\t };\n\t Resolvable.prototype.toString = function () {\n\t return \"Resolvable(token: \" + strings_1.stringify(this.token) + \", requires: [\" + this.deps.map(strings_1.stringify) + \"])\";\n\t };\n\t Resolvable.prototype.clone = function () {\n\t return new Resolvable(this);\n\t };\n\t return Resolvable;\n\t}());\n\texports.Resolvable = Resolvable;\n\n\n/***/ },\n/* 20 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/** @module path */ /** for typedoc */\n\t\"use strict\";\n\tvar common_1 = __webpack_require__(3);\n\tvar hof_1 = __webpack_require__(5);\n\tvar targetState_1 = __webpack_require__(14);\n\tvar node_1 = __webpack_require__(21);\n\t/**\n\t * This class contains functions which convert TargetStates, Nodes and paths from one type to another.\n\t */\n\tvar PathFactory = (function () {\n\t function PathFactory() {\n\t }\n\t /** Given a PathNode[], create an TargetState */\n\t PathFactory.makeTargetState = function (path) {\n\t var state = common_1.tail(path).state;\n\t return new targetState_1.TargetState(state, state, path.map(hof_1.prop(\"paramValues\")).reduce(common_1.mergeR, {}));\n\t };\n\t PathFactory.buildPath = function (targetState) {\n\t var toParams = targetState.params();\n\t return targetState.$state().path.map(function (state) { return new node_1.PathNode(state).applyRawParams(toParams); });\n\t };\n\t /** Given a fromPath: PathNode[] and a TargetState, builds a toPath: PathNode[] */\n\t PathFactory.buildToPath = function (fromPath, targetState) {\n\t var toPath = PathFactory.buildPath(targetState);\n\t if (targetState.options().inherit) {\n\t return PathFactory.inheritParams(fromPath, toPath, Object.keys(targetState.params()));\n\t }\n\t return toPath;\n\t };\n\t /**\n\t * Creates ViewConfig objects and adds to nodes.\n\t *\n\t * On each [[PathNode]], creates ViewConfig objects from the views: property of the node's state\n\t */\n\t PathFactory.applyViewConfigs = function ($view, path, states) {\n\t // Only apply the viewConfigs to the nodes for the given states\n\t path.filter(function (node) { return common_1.inArray(states, node.state); }).forEach(function (node) {\n\t var viewDecls = common_1.values(node.state.views || {});\n\t var subPath = PathFactory.subPath(path, function (n) { return n === node; });\n\t var viewConfigs = viewDecls.map(function (view) { return $view.createViewConfig(subPath, view); });\n\t node.views = viewConfigs.reduce(common_1.unnestR, []);\n\t });\n\t };\n\t /**\n\t * Given a fromPath and a toPath, returns a new to path which inherits parameters from the fromPath\n\t *\n\t * For a parameter in a node to be inherited from the from path:\n\t * - The toPath's node must have a matching node in the fromPath (by state).\n\t * - The parameter name must not be found in the toKeys parameter array.\n\t *\n\t * Note: the keys provided in toKeys are intended to be those param keys explicitly specified by some\n\t * caller, for instance, $state.transitionTo(..., toParams). If a key was found in toParams,\n\t * it is not inherited from the fromPath.\n\t */\n\t PathFactory.inheritParams = function (fromPath, toPath, toKeys) {\n\t if (toKeys === void 0) { toKeys = []; }\n\t function nodeParamVals(path, state) {\n\t var node = common_1.find(path, hof_1.propEq('state', state));\n\t return common_1.extend({}, node && node.paramValues);\n\t }\n\t /**\n\t * Given an [[PathNode]] \"toNode\", return a new [[PathNode]] with param values inherited from the\n\t * matching node in fromPath. Only inherit keys that aren't found in \"toKeys\" from the node in \"fromPath\"\"\n\t */\n\t function makeInheritedParamsNode(toNode) {\n\t // All param values for the node (may include default key/vals, when key was not found in toParams)\n\t var toParamVals = common_1.extend({}, toNode && toNode.paramValues);\n\t // limited to only those keys found in toParams\n\t var incomingParamVals = common_1.pick(toParamVals, toKeys);\n\t toParamVals = common_1.omit(toParamVals, toKeys);\n\t var fromParamVals = nodeParamVals(fromPath, toNode.state) || {};\n\t // extend toParamVals with any fromParamVals, then override any of those those with incomingParamVals\n\t var ownParamVals = common_1.extend(toParamVals, fromParamVals, incomingParamVals);\n\t return new node_1.PathNode(toNode.state).applyRawParams(ownParamVals);\n\t }\n\t // The param keys specified by the incoming toParams\n\t return toPath.map(makeInheritedParamsNode);\n\t };\n\t /**\n\t * Computes the tree changes (entering, exiting) between a fromPath and toPath.\n\t */\n\t PathFactory.treeChanges = function (fromPath, toPath, reloadState) {\n\t var keep = 0, max = Math.min(fromPath.length, toPath.length);\n\t var staticParams = function (state) { return state.parameters({ inherit: false }).filter(hof_1.not(hof_1.prop('dynamic'))).map(hof_1.prop('id')); };\n\t var nodesMatch = function (node1, node2) { return node1.equals(node2, staticParams(node1.state)); };\n\t while (keep < max && fromPath[keep].state !== reloadState && nodesMatch(fromPath[keep], toPath[keep])) {\n\t keep++;\n\t }\n\t /** Given a retained node, return a new node which uses the to node's param values */\n\t function applyToParams(retainedNode, idx) {\n\t var cloned = node_1.PathNode.clone(retainedNode);\n\t cloned.paramValues = toPath[idx].paramValues;\n\t return cloned;\n\t }\n\t var from, retained, exiting, entering, to;\n\t from = fromPath;\n\t retained = from.slice(0, keep);\n\t exiting = from.slice(keep);\n\t // Create a new retained path (with shallow copies of nodes) which have the params of the toPath mapped\n\t var retainedWithToParams = retained.map(applyToParams);\n\t entering = toPath.slice(keep);\n\t to = (retainedWithToParams).concat(entering);\n\t return { from: from, to: to, retained: retained, exiting: exiting, entering: entering };\n\t };\n\t /**\n\t * Return a subpath of a path, which stops at the first matching node\n\t *\n\t * Given an array of nodes, returns a subset of the array starting from the first node,\n\t * stopping when the first node matches the predicate.\n\t *\n\t * @param path a path of [[PathNode]]s\n\t * @param predicate a [[Predicate]] fn that matches [[PathNode]]s\n\t * @returns a subpath up to the matching node, or undefined if no match is found\n\t */\n\t PathFactory.subPath = function (path, predicate) {\n\t var node = common_1.find(path, predicate);\n\t var elementIdx = path.indexOf(node);\n\t return elementIdx === -1 ? undefined : path.slice(0, elementIdx + 1);\n\t };\n\t /** Gets the raw parameter values from a path */\n\t PathFactory.paramValues = function (path) { return path.reduce(function (acc, node) { return common_1.extend(acc, node.paramValues); }, {}); };\n\t return PathFactory;\n\t}());\n\texports.PathFactory = PathFactory;\n\n\n/***/ },\n/* 21 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\t/** @module path */ /** for typedoc */\n\tvar common_1 = __webpack_require__(3);\n\tvar hof_1 = __webpack_require__(5);\n\tvar param_1 = __webpack_require__(22);\n\t/**\n\t * A node in a [[TreeChanges]] path\n\t *\n\t * For a [[TreeChanges]] path, this class holds the stateful information for a single node in the path.\n\t * Each PathNode corresponds to a state being entered, exited, or retained.\n\t * The stateful information includes parameter values and resolve data.\n\t */\n\tvar PathNode = (function () {\n\t function PathNode(state) {\n\t if (state instanceof PathNode) {\n\t var node = state;\n\t this.state = node.state;\n\t this.paramSchema = node.paramSchema.slice();\n\t this.paramValues = common_1.extend({}, node.paramValues);\n\t this.resolvables = node.resolvables.slice();\n\t this.views = node.views && node.views.slice();\n\t }\n\t else {\n\t this.state = state;\n\t this.paramSchema = state.parameters({ inherit: false });\n\t this.paramValues = {};\n\t this.resolvables = state.resolvables.map(function (res) { return res.clone(); });\n\t }\n\t }\n\t /** Sets [[paramValues]] for the node, from the values of an object hash */\n\t PathNode.prototype.applyRawParams = function (params) {\n\t var getParamVal = function (paramDef) { return [paramDef.id, paramDef.value(params[paramDef.id])]; };\n\t this.paramValues = this.paramSchema.reduce(function (memo, pDef) { return common_1.applyPairs(memo, getParamVal(pDef)); }, {});\n\t return this;\n\t };\n\t /** Gets a specific [[Param]] metadata that belongs to the node */\n\t PathNode.prototype.parameter = function (name) {\n\t return common_1.find(this.paramSchema, hof_1.propEq(\"id\", name));\n\t };\n\t /**\n\t * @returns true if the state and parameter values for another PathNode are\n\t * equal to the state and param values for this PathNode\n\t */\n\t PathNode.prototype.equals = function (node, keys) {\n\t var _this = this;\n\t if (keys === void 0) { keys = this.paramSchema.map(hof_1.prop('id')); }\n\t var paramValsEq = function (key) { return _this.parameter(key).type.equals(_this.paramValues[key], node.paramValues[key]); };\n\t return this.state === node.state && keys.map(paramValsEq).reduce(common_1.allTrueR, true);\n\t };\n\t /** Returns a clone of the PathNode */\n\t PathNode.clone = function (node) {\n\t return new PathNode(node);\n\t };\n\t /**\n\t * Returns a new path which is a subpath of the first path which matched the second path.\n\t *\n\t * The new path starts from root and contains any nodes that match the nodes in the second path.\n\t * Nodes are compared using their state property and parameter values.\n\t */\n\t PathNode.matching = function (pathA, pathB) {\n\t var matching = [];\n\t for (var i = 0; i < pathA.length && i < pathB.length; i++) {\n\t var a = pathA[i], b = pathB[i];\n\t if (a.state !== b.state)\n\t break;\n\t if (!param_1.Param.equals(a.paramSchema, a.paramValues, b.paramValues))\n\t break;\n\t matching.push(a);\n\t }\n\t return matching;\n\t };\n\t return PathNode;\n\t}());\n\texports.PathNode = PathNode;\n\n\n/***/ },\n/* 22 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\t/** @module params */ /** for typedoc */\n\tvar common_1 = __webpack_require__(3);\n\tvar hof_1 = __webpack_require__(5);\n\tvar predicates_1 = __webpack_require__(4);\n\tvar coreservices_1 = __webpack_require__(6);\n\tvar urlMatcherConfig_1 = __webpack_require__(23);\n\tvar type_1 = __webpack_require__(24);\n\tvar paramTypes_1 = __webpack_require__(25);\n\tvar hasOwn = Object.prototype.hasOwnProperty;\n\tvar isShorthand = function (cfg) { return [\"value\", \"type\", \"squash\", \"array\", \"dynamic\"].filter(hasOwn.bind(cfg || {})).length === 0; };\n\t(function (DefType) {\n\t DefType[DefType[\"PATH\"] = 0] = \"PATH\";\n\t DefType[DefType[\"SEARCH\"] = 1] = \"SEARCH\";\n\t DefType[DefType[\"CONFIG\"] = 2] = \"CONFIG\";\n\t})(exports.DefType || (exports.DefType = {}));\n\tvar DefType = exports.DefType;\n\tfunction unwrapShorthand(cfg) {\n\t cfg = isShorthand(cfg) && { value: cfg } || cfg;\n\t return common_1.extend(cfg, {\n\t $$fn: predicates_1.isInjectable(cfg.value) ? cfg.value : function () { return cfg.value; }\n\t });\n\t}\n\tfunction getType(cfg, urlType, location, id) {\n\t if (cfg.type && urlType && urlType.name !== 'string')\n\t throw new Error(\"Param '\" + id + \"' has two type configurations.\");\n\t if (cfg.type && urlType && urlType.name === 'string' && paramTypes_1.paramTypes.type(cfg.type))\n\t return paramTypes_1.paramTypes.type(cfg.type);\n\t if (urlType)\n\t return urlType;\n\t if (!cfg.type)\n\t return (location === DefType.CONFIG ? paramTypes_1.paramTypes.type(\"any\") : paramTypes_1.paramTypes.type(\"string\"));\n\t return cfg.type instanceof type_1.ParamType ? cfg.type : paramTypes_1.paramTypes.type(cfg.type);\n\t}\n\t/**\n\t * returns false, true, or the squash value to indicate the \"default parameter url squash policy\".\n\t */\n\tfunction getSquashPolicy(config, isOptional) {\n\t var squash = config.squash;\n\t if (!isOptional || squash === false)\n\t return false;\n\t if (!predicates_1.isDefined(squash) || squash == null)\n\t return urlMatcherConfig_1.matcherConfig.defaultSquashPolicy();\n\t if (squash === true || predicates_1.isString(squash))\n\t return squash;\n\t throw new Error(\"Invalid squash policy: '\" + squash + \"'. Valid policies: false, true, or arbitrary string\");\n\t}\n\tfunction getReplace(config, arrayMode, isOptional, squash) {\n\t var replace, configuredKeys, defaultPolicy = [\n\t { from: \"\", to: (isOptional || arrayMode ? undefined : \"\") },\n\t { from: null, to: (isOptional || arrayMode ? undefined : \"\") }\n\t ];\n\t replace = predicates_1.isArray(config.replace) ? config.replace : [];\n\t if (predicates_1.isString(squash))\n\t replace.push({ from: squash, to: undefined });\n\t configuredKeys = common_1.map(replace, hof_1.prop(\"from\"));\n\t return common_1.filter(defaultPolicy, function (item) { return configuredKeys.indexOf(item.from) === -1; }).concat(replace);\n\t}\n\tvar Param = (function () {\n\t function Param(id, type, config, location) {\n\t config = unwrapShorthand(config);\n\t type = getType(config, type, location, id);\n\t var arrayMode = getArrayMode();\n\t type = arrayMode ? type.$asArray(arrayMode, location === DefType.SEARCH) : type;\n\t var isOptional = config.value !== undefined;\n\t var dynamic = predicates_1.isDefined(config.dynamic) ? !!config.dynamic : !!type.dynamic;\n\t var squash = getSquashPolicy(config, isOptional);\n\t var replace = getReplace(config, arrayMode, isOptional, squash);\n\t // array config: param name (param[]) overrides default settings. explicit config overrides param name.\n\t function getArrayMode() {\n\t var arrayDefaults = { array: (location === DefType.SEARCH ? \"auto\" : false) };\n\t var arrayParamNomenclature = id.match(/\\[\\]$/) ? { array: true } : {};\n\t return common_1.extend(arrayDefaults, arrayParamNomenclature, config).array;\n\t }\n\t common_1.extend(this, { id: id, type: type, location: location, squash: squash, replace: replace, isOptional: isOptional, dynamic: dynamic, config: config, array: arrayMode });\n\t }\n\t Param.prototype.isDefaultValue = function (value) {\n\t return this.isOptional && this.type.equals(this.value(), value);\n\t };\n\t /**\n\t * [Internal] Gets the decoded representation of a value if the value is defined, otherwise, returns the\n\t * default value, which may be the result of an injectable function.\n\t */\n\t Param.prototype.value = function (value) {\n\t var _this = this;\n\t /**\n\t * [Internal] Get the default value of a parameter, which may be an injectable function.\n\t */\n\t var $$getDefaultValue = function () {\n\t if (!coreservices_1.services.$injector)\n\t throw new Error(\"Injectable functions cannot be called at configuration time\");\n\t var defaultValue = coreservices_1.services.$injector.invoke(_this.config.$$fn);\n\t if (defaultValue !== null && defaultValue !== undefined && !_this.type.is(defaultValue))\n\t throw new Error(\"Default value (\" + defaultValue + \") for parameter '\" + _this.id + \"' is not an instance of ParamType (\" + _this.type.name + \")\");\n\t return defaultValue;\n\t };\n\t var $replace = function (val) {\n\t var replacement = common_1.map(common_1.filter(_this.replace, hof_1.propEq('from', val)), hof_1.prop(\"to\"));\n\t return replacement.length ? replacement[0] : val;\n\t };\n\t value = $replace(value);\n\t return !predicates_1.isDefined(value) ? $$getDefaultValue() : this.type.$normalize(value);\n\t };\n\t Param.prototype.isSearch = function () {\n\t return this.location === DefType.SEARCH;\n\t };\n\t Param.prototype.validates = function (value) {\n\t // There was no parameter value, but the param is optional\n\t if ((!predicates_1.isDefined(value) || value === null) && this.isOptional)\n\t return true;\n\t // The value was not of the correct ParamType, and could not be decoded to the correct ParamType\n\t var normalized = this.type.$normalize(value);\n\t if (!this.type.is(normalized))\n\t return false;\n\t // The value was of the correct type, but when encoded, did not match the ParamType's regexp\n\t var encoded = this.type.encode(normalized);\n\t return !(predicates_1.isString(encoded) && !this.type.pattern.exec(encoded));\n\t };\n\t Param.prototype.toString = function () {\n\t return \"{Param:\" + this.id + \" \" + this.type + \" squash: '\" + this.squash + \"' optional: \" + this.isOptional + \"}\";\n\t };\n\t /** Creates a new [[Param]] from a CONFIG block */\n\t Param.fromConfig = function (id, type, config) {\n\t return new Param(id, type, config, DefType.CONFIG);\n\t };\n\t /** Creates a new [[Param]] from a url PATH */\n\t Param.fromPath = function (id, type, config) {\n\t return new Param(id, type, config, DefType.PATH);\n\t };\n\t /** Creates a new [[Param]] from a url SEARCH */\n\t Param.fromSearch = function (id, type, config) {\n\t return new Param(id, type, config, DefType.SEARCH);\n\t };\n\t Param.values = function (params, values) {\n\t if (values === void 0) { values = {}; }\n\t return params.map(function (param) { return [param.id, param.value(values[param.id])]; }).reduce(common_1.applyPairs, {});\n\t };\n\t /**\n\t * Finds [[Param]] objects which have different param values\n\t *\n\t * Filters a list of [[Param]] objects to only those whose parameter values differ in two param value objects\n\t *\n\t * @param params: The list of Param objects to filter\n\t * @param values1: The first set of parameter values\n\t * @param values2: the second set of parameter values\n\t *\n\t * @returns any Param objects whose values were different between values1 and values2\n\t */\n\t Param.changed = function (params, values1, values2) {\n\t if (values1 === void 0) { values1 = {}; }\n\t if (values2 === void 0) { values2 = {}; }\n\t return params.filter(function (param) { return !param.type.equals(values1[param.id], values2[param.id]); });\n\t };\n\t /**\n\t * Checks if two param value objects are equal (for a set of [[Param]] objects)\n\t *\n\t * @param params The list of [[Param]] objects to check\n\t * @param values1 The first set of param values\n\t * @param values2 The second set of param values\n\t *\n\t * @returns true if the param values in values1 and values2 are equal\n\t */\n\t Param.equals = function (params, values1, values2) {\n\t if (values1 === void 0) { values1 = {}; }\n\t if (values2 === void 0) { values2 = {}; }\n\t return Param.changed(params, values1, values2).length === 0;\n\t };\n\t /** Returns true if a the parameter values are valid, according to the Param definitions */\n\t Param.validates = function (params, values) {\n\t if (values === void 0) { values = {}; }\n\t return params.map(function (param) { return param.validates(values[param.id]); }).reduce(common_1.allTrueR, true);\n\t };\n\t return Param;\n\t}());\n\texports.Param = Param;\n\n\n/***/ },\n/* 23 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\t/** @module url */ /** for typedoc */\n\tvar predicates_1 = __webpack_require__(4);\n\tvar MatcherConfig = (function () {\n\t function MatcherConfig() {\n\t this._isCaseInsensitive = false;\n\t this._isStrictMode = true;\n\t this._defaultSquashPolicy = false;\n\t }\n\t MatcherConfig.prototype.caseInsensitive = function (value) {\n\t return this._isCaseInsensitive = predicates_1.isDefined(value) ? value : this._isCaseInsensitive;\n\t };\n\t MatcherConfig.prototype.strictMode = function (value) {\n\t return this._isStrictMode = predicates_1.isDefined(value) ? value : this._isStrictMode;\n\t };\n\t MatcherConfig.prototype.defaultSquashPolicy = function (value) {\n\t if (predicates_1.isDefined(value) && value !== true && value !== false && !predicates_1.isString(value))\n\t throw new Error(\"Invalid squash policy: \" + value + \". Valid policies: false, true, arbitrary-string\");\n\t return this._defaultSquashPolicy = predicates_1.isDefined(value) ? value : this._defaultSquashPolicy;\n\t };\n\t return MatcherConfig;\n\t}());\n\texports.MatcherConfig = MatcherConfig;\n\t// TODO: Do not export global instance; create one in UIRouter() constructor\n\texports.matcherConfig = new MatcherConfig();\n\n\n/***/ },\n/* 24 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\t/** @module params */ /** for typedoc */\n\tvar common_1 = __webpack_require__(3);\n\tvar predicates_1 = __webpack_require__(4);\n\t/**\n\t * Wraps up a `ParamType` object to handle array values.\n\t */\n\tfunction ArrayType(type, mode) {\n\t var _this = this;\n\t // Wrap non-array value as array\n\t function arrayWrap(val) { return predicates_1.isArray(val) ? val : (predicates_1.isDefined(val) ? [val] : []); }\n\t // Unwrap array value for \"auto\" mode. Return undefined for empty array.\n\t function arrayUnwrap(val) {\n\t switch (val.length) {\n\t case 0: return undefined;\n\t case 1: return mode === \"auto\" ? val[0] : val;\n\t default: return val;\n\t }\n\t }\n\t // Wraps type (.is/.encode/.decode) functions to operate on each value of an array\n\t function arrayHandler(callback, allTruthyMode) {\n\t return function handleArray(val) {\n\t if (predicates_1.isArray(val) && val.length === 0)\n\t return val;\n\t var arr = arrayWrap(val);\n\t var result = common_1.map(arr, callback);\n\t return (allTruthyMode === true) ? common_1.filter(result, function (x) { return !x; }).length === 0 : arrayUnwrap(result);\n\t };\n\t }\n\t // Wraps type (.equals) functions to operate on each value of an array\n\t function arrayEqualsHandler(callback) {\n\t return function handleArray(val1, val2) {\n\t var left = arrayWrap(val1), right = arrayWrap(val2);\n\t if (left.length !== right.length)\n\t return false;\n\t for (var i = 0; i < left.length; i++) {\n\t if (!callback(left[i], right[i]))\n\t return false;\n\t }\n\t return true;\n\t };\n\t }\n\t ['encode', 'decode', 'equals', '$normalize'].map(function (name) {\n\t _this[name] = (name === 'equals' ? arrayEqualsHandler : arrayHandler)(type[name].bind(type));\n\t });\n\t common_1.extend(this, {\n\t dynamic: type.dynamic,\n\t name: type.name,\n\t pattern: type.pattern,\n\t is: arrayHandler(type.is.bind(type), true),\n\t $arrayMode: mode\n\t });\n\t}\n\t/**\n\t * A class that implements Custom Parameter Type functionality.\n\t *\n\t * This class has naive implementations for all the [[ParamTypeDefinition]] methods.\n\t *\n\t * An instance of this class is created when a custom [[ParamTypeDefinition]] object is registered with the [[UrlMatcherFactory.type]].\n\t *\n\t * Used by [[UrlMatcher]] when matching or formatting URLs, or comparing and validating parameter values.\n\t *\n\t * @example\n\t * ```\n\t *\n\t * {\n\t * decode: function(val) { return parseInt(val, 10); },\n\t * encode: function(val) { return val && val.toString(); },\n\t * equals: function(a, b) { return this.is(a) && a === b; },\n\t * is: function(val) { return angular.isNumber(val) && isFinite(val) && val % 1 === 0; },\n\t * pattern: /\\d+/\n\t * }\n\t * ```\n\t */\n\tvar ParamType = (function () {\n\t /**\n\t * @param def A configuration object which contains the custom type definition. The object's\n\t * properties will override the default methods and/or pattern in `ParamType`'s public interface.\n\t * @returns a new ParamType object\n\t */\n\t function ParamType(def) {\n\t this.pattern = /.*/;\n\t common_1.extend(this, def);\n\t }\n\t // consider these four methods to be \"abstract methods\" that should be overridden\n\t /** @inheritdoc */\n\t ParamType.prototype.is = function (val, key) { return true; };\n\t /** @inheritdoc */\n\t ParamType.prototype.encode = function (val, key) { return val; };\n\t /** @inheritdoc */\n\t ParamType.prototype.decode = function (val, key) { return val; };\n\t /** @inheritdoc */\n\t ParamType.prototype.equals = function (a, b) { return a == b; };\n\t ParamType.prototype.$subPattern = function () {\n\t var sub = this.pattern.toString();\n\t return sub.substr(1, sub.length - 2);\n\t };\n\t ParamType.prototype.toString = function () {\n\t return \"{ParamType:\" + this.name + \"}\";\n\t };\n\t /** Given an encoded string, or a decoded object, returns a decoded object */\n\t ParamType.prototype.$normalize = function (val) {\n\t return this.is(val) ? val : this.decode(val);\n\t };\n\t /**\n\t * Wraps an existing custom ParamType as an array of ParamType, depending on 'mode'.\n\t * e.g.:\n\t * - urlmatcher pattern \"/path?{queryParam[]:int}\"\n\t * - url: \"/path?queryParam=1&queryParam=2\n\t * - $stateParams.queryParam will be [1, 2]\n\t * if `mode` is \"auto\", then\n\t * - url: \"/path?queryParam=1 will create $stateParams.queryParam: 1\n\t * - url: \"/path?queryParam=1&queryParam=2 will create $stateParams.queryParam: [1, 2]\n\t */\n\t ParamType.prototype.$asArray = function (mode, isSearch) {\n\t if (!mode)\n\t return this;\n\t if (mode === \"auto\" && !isSearch)\n\t throw new Error(\"'auto' array mode is for query parameters only\");\n\t return new ArrayType(this, mode);\n\t };\n\t return ParamType;\n\t}());\n\texports.ParamType = ParamType;\n\n\n/***/ },\n/* 25 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\t/** @module params */ /** for typedoc */\n\tvar common_1 = __webpack_require__(3);\n\tvar predicates_1 = __webpack_require__(4);\n\tvar hof_1 = __webpack_require__(5);\n\tvar coreservices_1 = __webpack_require__(6);\n\tvar type_1 = __webpack_require__(24);\n\t// Use tildes to pre-encode slashes.\n\t// If the slashes are simply URLEncoded, the browser can choose to pre-decode them,\n\t// and bidirectional encoding/decoding fails.\n\t// Tilde was chosen because it's not a RFC 3986 section 2.2 Reserved Character\n\tfunction valToString(val) { return val != null ? val.toString().replace(/~/g, \"~~\").replace(/\\//g, \"~2F\") : val; }\n\tfunction valFromString(val) { return val != null ? val.toString().replace(/~2F/g, \"/\").replace(/~~/g, \"~\") : val; }\n\tvar ParamTypes = (function () {\n\t function ParamTypes() {\n\t this.enqueue = true;\n\t this.typeQueue = [];\n\t this.defaultTypes = {\n\t \"hash\": {\n\t encode: valToString,\n\t decode: valFromString,\n\t is: hof_1.is(String),\n\t pattern: /.*/,\n\t equals: function (a, b) { return a == b; } // allow coersion for null/undefined/\"\"\n\t },\n\t \"string\": {\n\t encode: valToString,\n\t decode: valFromString,\n\t is: hof_1.is(String),\n\t pattern: /[^/]*/\n\t },\n\t \"int\": {\n\t encode: valToString,\n\t decode: function (val) { return parseInt(val, 10); },\n\t is: function (val) { return predicates_1.isDefined(val) && this.decode(val.toString()) === val; },\n\t pattern: /-?\\d+/\n\t },\n\t \"bool\": {\n\t encode: function (val) { return val && 1 || 0; },\n\t decode: function (val) { return parseInt(val, 10) !== 0; },\n\t is: hof_1.is(Boolean),\n\t pattern: /0|1/\n\t },\n\t \"date\": {\n\t encode: function (val) {\n\t return !this.is(val) ? undefined : [\n\t val.getFullYear(),\n\t ('0' + (val.getMonth() + 1)).slice(-2),\n\t ('0' + val.getDate()).slice(-2)\n\t ].join(\"-\");\n\t },\n\t decode: function (val) {\n\t if (this.is(val))\n\t return val;\n\t var match = this.capture.exec(val);\n\t return match ? new Date(match[1], match[2] - 1, match[3]) : undefined;\n\t },\n\t is: function (val) { return val instanceof Date && !isNaN(val.valueOf()); },\n\t equals: function (l, r) {\n\t return ['getFullYear', 'getMonth', 'getDate']\n\t .reduce(function (acc, fn) { return acc && l[fn]() === r[fn](); }, true);\n\t },\n\t pattern: /[0-9]{4}-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])/,\n\t capture: /([0-9]{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])/\n\t },\n\t \"json\": {\n\t encode: common_1.toJson,\n\t decode: common_1.fromJson,\n\t is: hof_1.is(Object),\n\t equals: common_1.equals,\n\t pattern: /[^/]*/\n\t },\n\t \"any\": {\n\t encode: common_1.identity,\n\t decode: common_1.identity,\n\t equals: common_1.equals,\n\t pattern: /.*/\n\t }\n\t };\n\t // Register default types. Store them in the prototype of this.types.\n\t var makeType = function (definition, name) { return new type_1.ParamType(common_1.extend({ name: name }, definition)); };\n\t this.types = common_1.inherit(common_1.map(this.defaultTypes, makeType), {});\n\t }\n\t ParamTypes.prototype.type = function (name, definition, definitionFn) {\n\t if (!predicates_1.isDefined(definition))\n\t return this.types[name];\n\t if (this.types.hasOwnProperty(name))\n\t throw new Error(\"A type named '\" + name + \"' has already been defined.\");\n\t this.types[name] = new type_1.ParamType(common_1.extend({ name: name }, definition));\n\t if (definitionFn) {\n\t this.typeQueue.push({ name: name, def: definitionFn });\n\t if (!this.enqueue)\n\t this._flushTypeQueue();\n\t }\n\t return this;\n\t };\n\t ParamTypes.prototype._flushTypeQueue = function () {\n\t while (this.typeQueue.length) {\n\t var type = this.typeQueue.shift();\n\t if (type.pattern)\n\t throw new Error(\"You cannot override a type's .pattern at runtime.\");\n\t common_1.extend(this.types[type.name], coreservices_1.services.$injector.invoke(type.def));\n\t }\n\t };\n\t return ParamTypes;\n\t}());\n\texports.ParamTypes = ParamTypes;\n\texports.paramTypes = new ParamTypes();\n\n\n/***/ },\n/* 26 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\t/** @module core */ /** */\n\tvar urlMatcherFactory_1 = __webpack_require__(27);\n\tvar urlRouter_1 = __webpack_require__(29);\n\tvar state_1 = __webpack_require__(30);\n\tvar urlRouter_2 = __webpack_require__(29);\n\tvar transitionService_1 = __webpack_require__(31);\n\tvar view_1 = __webpack_require__(37);\n\tvar stateRegistry_1 = __webpack_require__(38);\n\tvar stateService_1 = __webpack_require__(43);\n\tvar globals_1 = __webpack_require__(44);\n\t/**\n\t * The master class used to instantiate an instance of UI-Router.\n\t *\n\t * This class instantiates and wires the global UI-Router services.\n\t *\n\t * After instantiating a new instance of the Router class, configure it for your app. For instance, register\n\t * your app states with the [[stateRegistry]] (and set url options using ...). Then, tell UI-Router to monitor\n\t * the URL by calling `urlRouter.listen()` ([[URLRouter.listen]])\n\t */\n\tvar UIRouter = (function () {\n\t function UIRouter() {\n\t this.viewService = new view_1.ViewService();\n\t this.transitionService = new transitionService_1.TransitionService(this);\n\t this.globals = new globals_1.Globals(this.transitionService);\n\t this.urlMatcherFactory = new urlMatcherFactory_1.UrlMatcherFactory();\n\t this.urlRouterProvider = new urlRouter_1.UrlRouterProvider(this.urlMatcherFactory, this.globals.params);\n\t this.urlRouter = new urlRouter_2.UrlRouter(this.urlRouterProvider);\n\t this.stateRegistry = new stateRegistry_1.StateRegistry(this.urlMatcherFactory, this.urlRouterProvider);\n\t /** @hidden TODO: move this to ng1.ts */\n\t this.stateProvider = new state_1.StateProvider(this.stateRegistry);\n\t this.stateService = new stateService_1.StateService(this);\n\t this.viewService.rootContext(this.stateRegistry.root());\n\t this.globals.$current = this.stateRegistry.root();\n\t this.globals.current = this.globals.$current.self;\n\t }\n\t return UIRouter;\n\t}());\n\texports.UIRouter = UIRouter;\n\n\n/***/ },\n/* 27 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\t/** @module url */ /** for typedoc */\n\tvar common_1 = __webpack_require__(3);\n\tvar predicates_1 = __webpack_require__(4);\n\tvar urlMatcher_1 = __webpack_require__(28);\n\tvar urlMatcherConfig_1 = __webpack_require__(23);\n\tvar param_1 = __webpack_require__(22);\n\tvar paramTypes_1 = __webpack_require__(25);\n\t/** @hidden */\n\tfunction getDefaultConfig() {\n\t return {\n\t strict: urlMatcherConfig_1.matcherConfig.strictMode(),\n\t caseInsensitive: urlMatcherConfig_1.matcherConfig.caseInsensitive()\n\t };\n\t}\n\t/**\n\t * Factory for [[UrlMatcher]] instances.\n\t *\n\t * The factory is available to ng1 services as\n\t * `$urlMatcherFactor` or ng1 providers as `$urlMatcherFactoryProvider`.\n\t */\n\tvar UrlMatcherFactory = (function () {\n\t function UrlMatcherFactory() {\n\t common_1.extend(this, { UrlMatcher: urlMatcher_1.UrlMatcher, Param: param_1.Param });\n\t }\n\t /**\n\t * Defines whether URL matching should be case sensitive (the default behavior), or not.\n\t *\n\t * @param value `false` to match URL in a case sensitive manner; otherwise `true`;\n\t * @returns the current value of caseInsensitive\n\t */\n\t UrlMatcherFactory.prototype.caseInsensitive = function (value) {\n\t return urlMatcherConfig_1.matcherConfig.caseInsensitive(value);\n\t };\n\t /**\n\t * Defines whether URLs should match trailing slashes, or not (the default behavior).\n\t *\n\t * @param value `false` to match trailing slashes in URLs, otherwise `true`.\n\t * @returns the current value of strictMode\n\t */\n\t UrlMatcherFactory.prototype.strictMode = function (value) {\n\t return urlMatcherConfig_1.matcherConfig.strictMode(value);\n\t };\n\t /**\n\t * Sets the default behavior when generating or matching URLs with default parameter values.\n\t *\n\t * @param value A string that defines the default parameter URL squashing behavior.\n\t * - `nosquash`: When generating an href with a default parameter value, do not squash the parameter value from the URL\n\t * - `slash`: When generating an href with a default parameter value, squash (remove) the parameter value, and, if the\n\t * parameter is surrounded by slashes, squash (remove) one slash from the URL\n\t * - any other string, e.g. \"~\": When generating an href with a default parameter value, squash (remove)\n\t * the parameter value from the URL and replace it with this string.\n\t * @returns the current value of defaultSquashPolicy\n\t */\n\t UrlMatcherFactory.prototype.defaultSquashPolicy = function (value) {\n\t return urlMatcherConfig_1.matcherConfig.defaultSquashPolicy(value);\n\t };\n\t /**\n\t * Creates a [[UrlMatcher]] for the specified pattern.\n\t *\n\t * @param pattern The URL pattern.\n\t * @param config The config object hash.\n\t * @returns The UrlMatcher.\n\t */\n\t UrlMatcherFactory.prototype.compile = function (pattern, config) {\n\t return new urlMatcher_1.UrlMatcher(pattern, common_1.extend(getDefaultConfig(), config));\n\t };\n\t /**\n\t * Returns true if the specified object is a [[UrlMatcher]], or false otherwise.\n\t *\n\t * @param object The object to perform the type check against.\n\t * @returns `true` if the object matches the `UrlMatcher` interface, by\n\t * implementing all the same methods.\n\t */\n\t UrlMatcherFactory.prototype.isMatcher = function (object) {\n\t // TODO: typeof?\n\t if (!predicates_1.isObject(object))\n\t return false;\n\t var result = true;\n\t common_1.forEach(urlMatcher_1.UrlMatcher.prototype, function (val, name) {\n\t if (predicates_1.isFunction(val))\n\t result = result && (predicates_1.isDefined(object[name]) && predicates_1.isFunction(object[name]));\n\t });\n\t return result;\n\t };\n\t ;\n\t /**\n\t * Creates and registers a custom [[ParamType]] object that can be used to generate URLs with typed parameters.\n\t *\n\t * @param name The type name.\n\t * @param definition The type definition. See [[ParamTypeDefinition]] for information on the values accepted.\n\t * @param definitionFn A function that is injected before the app\n\t * runtime starts. The result of this function is merged into the existing `definition`.\n\t * See [[ParamType]] for information on the values accepted.\n\t *\n\t * @returns - if a type was registered: the [[UrlMatcherFactory]]\n\t * - if only the `name` parameter was specified: the currently registered [[ParamType]] object, or undefined\n\t *\n\t * This is a simple example of a custom type that encodes and decodes items from an\n\t * array, using the array index as the URL-encoded value:\n\t */\n\t UrlMatcherFactory.prototype.type = function (name, definition, definitionFn) {\n\t var type = paramTypes_1.paramTypes.type(name, definition, definitionFn);\n\t return !predicates_1.isDefined(definition) ? type : this;\n\t };\n\t ;\n\t /** @hidden */\n\t UrlMatcherFactory.prototype.$get = function () {\n\t paramTypes_1.paramTypes.enqueue = false;\n\t paramTypes_1.paramTypes._flushTypeQueue();\n\t return this;\n\t };\n\t ;\n\t return UrlMatcherFactory;\n\t}());\n\texports.UrlMatcherFactory = UrlMatcherFactory;\n\n\n/***/ },\n/* 28 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\t/** @module url */ /** for typedoc */\n\tvar common_1 = __webpack_require__(3);\n\tvar hof_1 = __webpack_require__(5);\n\tvar predicates_1 = __webpack_require__(4);\n\tvar param_1 = __webpack_require__(22);\n\tvar paramTypes_1 = __webpack_require__(25);\n\tvar predicates_2 = __webpack_require__(4);\n\tvar param_2 = __webpack_require__(22);\n\tvar common_2 = __webpack_require__(3);\n\tvar common_3 = __webpack_require__(3);\n\t/** @hidden */\n\tfunction quoteRegExp(string, param) {\n\t var surroundPattern = ['', ''], result = string.replace(/[\\\\\\[\\]\\^$*+?.()|{}]/g, \"\\\\$&\");\n\t if (!param)\n\t return result;\n\t switch (param.squash) {\n\t case false:\n\t surroundPattern = ['(', ')' + (param.isOptional ? '?' : '')];\n\t break;\n\t case true:\n\t result = result.replace(/\\/$/, '');\n\t surroundPattern = ['(?:\\/(', ')|\\/)?'];\n\t break;\n\t default:\n\t surroundPattern = [(\"(\" + param.squash + \"|\"), ')?'];\n\t break;\n\t }\n\t return result + surroundPattern[0] + param.type.pattern.source + surroundPattern[1];\n\t}\n\t/** @hidden */\n\tvar memoizeTo = function (obj, prop, fn) { return obj[prop] = obj[prop] || fn(); };\n\t/**\n\t * Matches URLs against patterns.\n\t *\n\t * Matches URLs against patterns and extracts named parameters from the path or the search\n\t * part of the URL.\n\t *\n\t * A URL pattern consists of a path pattern, optionally followed by '?' and a list of search (query)\n\t * parameters. Multiple search parameter names are separated by '&'. Search parameters\n\t * do not influence whether or not a URL is matched, but their values are passed through into\n\t * the matched parameters returned by [[UrlMatcher.exec]].\n\t *\n\t * - *Path parameters* are defined using curly brace placeholders (`/somepath/{param}`)\n\t * or colon placeholders (`/somePath/:param`).\n\t *\n\t * - *A parameter RegExp* may be defined for a param after a colon\n\t * (`/somePath/{param:[a-zA-Z0-9]+}`) in a curly brace placeholder.\n\t * The regexp must match for the url to be matched.\n\t * Should the regexp itself contain curly braces, they must be in matched pairs or escaped with a backslash.\n\t *\n\t * - *Custom parameter types* may also be specified after a colon (`/somePath/{param:int}`)\n\t * in curly brace parameters. See [[UrlMatcherFactory.type]] for more information.\n\t *\n\t * - *Catch-all parameters* are defined using an asterisk placeholder (`/somepath/*catchallparam`). A catch-all\n\t * parameter value will contain the remainder of the URL.\n\t *\n\t * ---\n\t *\n\t * Parameter names may contain only word characters (latin letters, digits, and underscore) and\n\t * must be unique within the pattern (across both path and search parameters).\n\t * A path parameter matches any number of characters other than '/'. For catch-all\n\t * placeholders the path parameter matches any number of characters.\n\t *\n\t * Examples:\n\t *\n\t * * `'/hello/'` - Matches only if the path is exactly '/hello/'. There is no special treatment for\n\t * trailing slashes, and patterns have to match the entire path, not just a prefix.\n\t * * `'/user/:id'` - Matches '/user/bob' or '/user/1234!!!' or even '/user/' but not '/user' or\n\t * '/user/bob/details'. The second path segment will be captured as the parameter 'id'.\n\t * * `'/user/{id}'` - Same as the previous example, but using curly brace syntax.\n\t * * `'/user/{id:[^/]*}'` - Same as the previous example.\n\t * * `'/user/{id:[0-9a-fA-F]{1,8}}'` - Similar to the previous example, but only matches if the id\n\t * parameter consists of 1 to 8 hex digits.\n\t * * `'/files/{path:.*}'` - Matches any URL starting with '/files/' and captures the rest of the\n\t * path into the parameter 'path'.\n\t * * `'/files/*path'` - ditto.\n\t * * `'/calendar/{start:date}'` - Matches \"/calendar/2014-11-12\" (because the pattern defined\n\t * in the built-in `date` ParamType matches `2014-11-12`) and provides a Date object in $stateParams.start\n\t *\n\t */\n\tvar UrlMatcher = (function () {\n\t /**\n\t * @param pattern The pattern to compile into a matcher.\n\t * @param config A configuration object hash\n\t * * `caseInsensitive` - `true` if URL matching should be case insensitive, otherwise `false`, the default value (for backward compatibility) is `false`.\n\t * * `strict` - `false` if matching against a URL with a trailing slash should be treated as equivalent to a URL without a trailing slash, the default value is `true`.\n\t *\n\t * @property {string} pattern The pattern that was passed into the constructor\n\t */\n\t function UrlMatcher(pattern, config) {\n\t var _this = this;\n\t this.config = config;\n\t /** @hidden */\n\t this._cache = { path: [], pattern: null };\n\t /** @hidden */\n\t this._children = [];\n\t /** @hidden */\n\t this._params = [];\n\t /** @hidden */\n\t this._segments = [];\n\t /** @hidden */\n\t this._compiled = [];\n\t this.pattern = pattern;\n\t this.config = common_1.defaults(this.config, {\n\t params: {},\n\t strict: true,\n\t caseInsensitive: false,\n\t paramMap: common_1.identity\n\t });\n\t // Find all placeholders and create a compiled pattern, using either classic or curly syntax:\n\t // '*' name\n\t // ':' name\n\t // '{' name '}'\n\t // '{' name ':' regexp '}'\n\t // The regular expression is somewhat complicated due to the need to allow curly braces\n\t // inside the regular expression. The placeholder regexp breaks down as follows:\n\t // ([:*])([\\w\\[\\]]+) - classic placeholder ($1 / $2) (search version has - for snake-case)\n\t // \\{([\\w\\[\\]]+)(?:\\:\\s*( ... ))?\\} - curly brace placeholder ($3) with optional regexp/type ... ($4) (search version has - for snake-case\n\t // (?: ... | ... | ... )+ - the regexp consists of any number of atoms, an atom being either\n\t // [^{}\\\\]+ - anything other than curly braces or backslash\n\t // \\\\. - a backslash escape\n\t // \\{(?:[^{}\\\\]+|\\\\.)*\\} - a matched set of curly braces containing other atoms\n\t var placeholder = /([:*])([\\w\\[\\]]+)|\\{([\\w\\[\\]]+)(?:\\:\\s*((?:[^{}\\\\]+|\\\\.|\\{(?:[^{}\\\\]+|\\\\.)*\\})+))?\\}/g, searchPlaceholder = /([:]?)([\\w\\[\\].-]+)|\\{([\\w\\[\\].-]+)(?:\\:\\s*((?:[^{}\\\\]+|\\\\.|\\{(?:[^{}\\\\]+|\\\\.)*\\})+))?\\}/g, last = 0, m, patterns = [];\n\t var checkParamErrors = function (id) {\n\t if (!UrlMatcher.nameValidator.test(id))\n\t throw new Error(\"Invalid parameter name '\" + id + \"' in pattern '\" + pattern + \"'\");\n\t if (common_1.find(_this._params, hof_1.propEq('id', id)))\n\t throw new Error(\"Duplicate parameter name '\" + id + \"' in pattern '\" + pattern + \"'\");\n\t };\n\t // Split into static segments separated by path parameter placeholders.\n\t // The number of segments is always 1 more than the number of parameters.\n\t var matchDetails = function (m, isSearch) {\n\t // IE[78] returns '' for unmatched groups instead of null\n\t var id = m[2] || m[3], regexp = isSearch ? m[4] : m[4] || (m[1] === '*' ? '.*' : null);\n\t return {\n\t id: id,\n\t regexp: regexp,\n\t cfg: _this.config.params[id],\n\t segment: pattern.substring(last, m.index),\n\t type: !regexp ? null : paramTypes_1.paramTypes.type(regexp || \"string\") || common_1.inherit(paramTypes_1.paramTypes.type(\"string\"), {\n\t pattern: new RegExp(regexp, _this.config.caseInsensitive ? 'i' : undefined)\n\t })\n\t };\n\t };\n\t var p, segment;\n\t while ((m = placeholder.exec(pattern))) {\n\t p = matchDetails(m, false);\n\t if (p.segment.indexOf('?') >= 0)\n\t break; // we're into the search part\n\t checkParamErrors(p.id);\n\t this._params.push(param_1.Param.fromPath(p.id, p.type, this.config.paramMap(p.cfg, false)));\n\t this._segments.push(p.segment);\n\t patterns.push([p.segment, common_1.tail(this._params)]);\n\t last = placeholder.lastIndex;\n\t }\n\t segment = pattern.substring(last);\n\t // Find any search parameter names and remove them from the last segment\n\t var i = segment.indexOf('?');\n\t if (i >= 0) {\n\t var search = segment.substring(i);\n\t segment = segment.substring(0, i);\n\t if (search.length > 0) {\n\t last = 0;\n\t while ((m = searchPlaceholder.exec(search))) {\n\t p = matchDetails(m, true);\n\t checkParamErrors(p.id);\n\t this._params.push(param_1.Param.fromSearch(p.id, p.type, this.config.paramMap(p.cfg, true)));\n\t last = placeholder.lastIndex;\n\t }\n\t }\n\t }\n\t this._segments.push(segment);\n\t common_1.extend(this, {\n\t _compiled: patterns.map(function (pattern) { return quoteRegExp.apply(null, pattern); }).concat(quoteRegExp(segment)),\n\t prefix: this._segments[0]\n\t });\n\t Object.freeze(this);\n\t }\n\t /**\n\t * Creates a new concatenated UrlMatcher\n\t *\n\t * Builds a new UrlMatcher by appending another UrlMatcher to this one.\n\t *\n\t * @param url A `UrlMatcher` instance to append as a child of the current `UrlMatcher`.\n\t */\n\t UrlMatcher.prototype.append = function (url) {\n\t this._children.push(url);\n\t common_1.forEach(url._cache, function (val, key) { return url._cache[key] = predicates_1.isArray(val) ? [] : null; });\n\t url._cache.path = this._cache.path.concat(this);\n\t return url;\n\t };\n\t /** @hidden */\n\t UrlMatcher.prototype.isRoot = function () {\n\t return this._cache.path.length === 0;\n\t };\n\t /** Returns the input pattern string */\n\t UrlMatcher.prototype.toString = function () {\n\t return this.pattern;\n\t };\n\t /**\n\t * Tests the specified url/path against this matcher.\n\t *\n\t * Tests if the given url matches this matcher's pattern, and returns an object containing the captured\n\t * parameter values. Returns null if the path does not match.\n\t *\n\t * The returned object contains the values\n\t * of any search parameters that are mentioned in the pattern, but their value may be null if\n\t * they are not present in `search`. This means that search parameters are always treated\n\t * as optional.\n\t *\n\t * @example\n\t * ```js\n\t *\n\t * new UrlMatcher('/user/{id}?q&r').exec('/user/bob', {\n\t * x: '1', q: 'hello'\n\t * });\n\t * // returns { id: 'bob', q: 'hello', r: null }\n\t * ```\n\t *\n\t * @param path The URL path to match, e.g. `$location.path()`.\n\t * @param search URL search parameters, e.g. `$location.search()`.\n\t * @param hash URL hash e.g. `$location.hash()`.\n\t * @param options\n\t *\n\t * @returns The captured parameter values.\n\t */\n\t UrlMatcher.prototype.exec = function (path, search, hash, options) {\n\t var _this = this;\n\t if (search === void 0) { search = {}; }\n\t if (options === void 0) { options = {}; }\n\t var match = memoizeTo(this._cache, 'pattern', function () {\n\t return new RegExp([\n\t '^',\n\t common_1.unnest(_this._cache.path.concat(_this).map(hof_1.prop('_compiled'))).join(''),\n\t _this.config.strict === false ? '\\/?' : '',\n\t '$'\n\t ].join(''), _this.config.caseInsensitive ? 'i' : undefined);\n\t }).exec(path);\n\t if (!match)\n\t return null;\n\t //options = defaults(options, { isolate: false });\n\t var allParams = this.parameters(), pathParams = allParams.filter(function (param) { return !param.isSearch(); }), searchParams = allParams.filter(function (param) { return param.isSearch(); }), nPathSegments = this._cache.path.concat(this).map(function (urlm) { return urlm._segments.length - 1; }).reduce(function (a, x) { return a + x; }), values = {};\n\t if (nPathSegments !== match.length - 1)\n\t throw new Error(\"Unbalanced capture group in route '\" + this.pattern + \"'\");\n\t function decodePathArray(string) {\n\t var reverseString = function (str) { return str.split(\"\").reverse().join(\"\"); };\n\t var unquoteDashes = function (str) { return str.replace(/\\\\-/g, \"-\"); };\n\t var split = reverseString(string).split(/-(?!\\\\)/);\n\t var allReversed = common_1.map(split, reverseString);\n\t return common_1.map(allReversed, unquoteDashes).reverse();\n\t }\n\t for (var i = 0; i < nPathSegments; i++) {\n\t var param = pathParams[i];\n\t var value = match[i + 1];\n\t // if the param value matches a pre-replace pair, replace the value before decoding.\n\t for (var j = 0; j < param.replace.length; j++) {\n\t if (param.replace[j].from === value)\n\t value = param.replace[j].to;\n\t }\n\t if (value && param.array === true)\n\t value = decodePathArray(value);\n\t if (predicates_2.isDefined(value))\n\t value = param.type.decode(value);\n\t values[param.id] = param.value(value);\n\t }\n\t common_1.forEach(searchParams, function (param) {\n\t var value = search[param.id];\n\t for (var j = 0; j < param.replace.length; j++) {\n\t if (param.replace[j].from === value)\n\t value = param.replace[j].to;\n\t }\n\t if (predicates_2.isDefined(value))\n\t value = param.type.decode(value);\n\t values[param.id] = param.value(value);\n\t });\n\t if (hash)\n\t values[\"#\"] = hash;\n\t return values;\n\t };\n\t /**\n\t * @hidden\n\t * Returns all the [[Param]] objects of all path and search parameters of this pattern in order of appearance.\n\t *\n\t * @returns {Array.} An array of [[Param]] objects. Must be treated as read-only. If the\n\t * pattern has no parameters, an empty array is returned.\n\t */\n\t UrlMatcher.prototype.parameters = function (opts) {\n\t if (opts === void 0) { opts = {}; }\n\t if (opts.inherit === false)\n\t return this._params;\n\t return common_1.unnest(this._cache.path.concat(this).map(hof_1.prop('_params')));\n\t };\n\t /**\n\t * @hidden\n\t * Returns a single parameter from this UrlMatcher by id\n\t *\n\t * @param id\n\t * @param opts\n\t * @returns {T|Param|any|boolean|UrlMatcher|null}\n\t */\n\t UrlMatcher.prototype.parameter = function (id, opts) {\n\t if (opts === void 0) { opts = {}; }\n\t var parent = common_1.tail(this._cache.path);\n\t return (common_1.find(this._params, hof_1.propEq('id', id)) ||\n\t (opts.inherit !== false && parent && parent.parameter(id)) ||\n\t null);\n\t };\n\t /**\n\t * Validates the input parameter values against this UrlMatcher\n\t *\n\t * Checks an object hash of parameters to validate their correctness according to the parameter\n\t * types of this `UrlMatcher`.\n\t *\n\t * @param params The object hash of parameters to validate.\n\t * @returns Returns `true` if `params` validates, otherwise `false`.\n\t */\n\t UrlMatcher.prototype.validates = function (params) {\n\t var _this = this;\n\t var validParamVal = function (param, val) { return !param || param.validates(val); };\n\t return common_1.pairs(params || {}).map(function (_a) {\n\t var key = _a[0], val = _a[1];\n\t return validParamVal(_this.parameter(key), val);\n\t }).reduce(common_1.allTrueR, true);\n\t };\n\t /**\n\t * Given a set of parameter values, creates a URL from this UrlMatcher.\n\t *\n\t * Creates a URL that matches this pattern by substituting the specified values\n\t * for the path and search parameters.\n\t *\n\t * @example\n\t * ```js\n\t *\n\t * new UrlMatcher('/user/{id}?q').format({ id:'bob', q:'yes' });\n\t * // returns '/user/bob?q=yes'\n\t * ```\n\t *\n\t * @param values the values to substitute for the parameters in this pattern.\n\t * @returns the formatted URL (path and optionally search part).\n\t */\n\t UrlMatcher.prototype.format = function (values) {\n\t if (values === void 0) { values = {}; }\n\t if (!this.validates(values))\n\t return null;\n\t // Build the full path of UrlMatchers (including all parent UrlMatchers)\n\t var urlMatchers = this._cache.path.slice().concat(this);\n\t // Extract all the static segments and Params into an ordered array\n\t var pathSegmentsAndParams = urlMatchers.map(UrlMatcher.pathSegmentsAndParams).reduce(common_2.unnestR, []);\n\t // Extract the query params into a separate array\n\t var queryParams = urlMatchers.map(UrlMatcher.queryParams).reduce(common_2.unnestR, []);\n\t /**\n\t * Given a Param,\n\t * Applies the parameter value, then returns details about it\n\t */\n\t function getDetails(param) {\n\t // Normalize to typed value\n\t var value = param.value(values[param.id]);\n\t var isDefaultValue = param.isDefaultValue(value);\n\t // Check if we're in squash mode for the parameter\n\t var squash = isDefaultValue ? param.squash : false;\n\t // Allow the Parameter's Type to encode the value\n\t var encoded = param.type.encode(value);\n\t return { param: param, value: value, isDefaultValue: isDefaultValue, squash: squash, encoded: encoded };\n\t }\n\t // Build up the path-portion from the list of static segments and parameters\n\t var pathString = pathSegmentsAndParams.reduce(function (acc, x) {\n\t // The element is a static segment (a raw string); just append it\n\t if (predicates_1.isString(x))\n\t return acc + x;\n\t // Otherwise, it's a Param. Fetch details about the parameter value\n\t var _a = getDetails(x), squash = _a.squash, encoded = _a.encoded, param = _a.param;\n\t // If squash is === true, try to remove a slash from the path\n\t if (squash === true)\n\t return (acc.match(/\\/$/)) ? acc.slice(0, -1) : acc;\n\t // If squash is a string, use the string for the param value\n\t if (predicates_1.isString(squash))\n\t return acc + squash;\n\t if (squash !== false)\n\t return acc; // ?\n\t if (encoded == null)\n\t return acc;\n\t // If this parameter value is an array, encode the value using encodeDashes\n\t if (predicates_1.isArray(encoded))\n\t return acc + common_1.map(encoded, UrlMatcher.encodeDashes).join(\"-\");\n\t // If the parameter type is \"raw\", then do not encodeURIComponent\n\t if (param.type.raw)\n\t return acc + encoded;\n\t // Encode the value\n\t return acc + encodeURIComponent(encoded);\n\t }, \"\");\n\t // Build the query string by applying parameter values (array or regular)\n\t // then mapping to key=value, then flattening and joining using \"&\"\n\t var queryString = queryParams.map(function (param) {\n\t var _a = getDetails(param), squash = _a.squash, encoded = _a.encoded, isDefaultValue = _a.isDefaultValue;\n\t if (encoded == null || (isDefaultValue && squash !== false))\n\t return;\n\t if (!predicates_1.isArray(encoded))\n\t encoded = [encoded];\n\t if (encoded.length === 0)\n\t return;\n\t if (!param.type.raw)\n\t encoded = common_1.map(encoded, encodeURIComponent);\n\t return encoded.map(function (val) { return (param.id + \"=\" + val); });\n\t }).filter(common_1.identity).reduce(common_2.unnestR, []).join(\"&\");\n\t // Concat the pathstring with the queryString (if exists) and the hashString (if exists)\n\t return pathString + (queryString ? \"?\" + queryString : \"\") + (values[\"#\"] ? \"#\" + values[\"#\"] : \"\");\n\t };\n\t /** @hidden */\n\t UrlMatcher.encodeDashes = function (str) {\n\t return encodeURIComponent(str).replace(/-/g, function (c) { return (\"%5C%\" + c.charCodeAt(0).toString(16).toUpperCase()); });\n\t };\n\t /** @hidden Given a matcher, return an array with the matcher's path segments and path params, in order */\n\t UrlMatcher.pathSegmentsAndParams = function (matcher) {\n\t var staticSegments = matcher._segments;\n\t var pathParams = matcher._params.filter(function (p) { return p.location === param_2.DefType.PATH; });\n\t return common_3.arrayTuples(staticSegments, pathParams.concat(undefined)).reduce(common_2.unnestR, []).filter(function (x) { return x !== \"\" && predicates_2.isDefined(x); });\n\t };\n\t /** @hidden Given a matcher, return an array with the matcher's query params */\n\t UrlMatcher.queryParams = function (matcher) {\n\t return matcher._params.filter(function (p) { return p.location === param_2.DefType.SEARCH; });\n\t };\n\t /** @hidden */\n\t UrlMatcher.nameValidator = /^\\w+([-.]+\\w+)*(?:\\[\\])?$/;\n\t return UrlMatcher;\n\t}());\n\texports.UrlMatcher = UrlMatcher;\n\n\n/***/ },\n/* 29 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\t/** @module url */ /** for typedoc */\n\tvar common_1 = __webpack_require__(3);\n\tvar predicates_1 = __webpack_require__(4);\n\tvar coreservices_1 = __webpack_require__(6);\n\t/** @hidden */\n\tvar $location = coreservices_1.services.location;\n\t/** @hidden Returns a string that is a prefix of all strings matching the RegExp */\n\tfunction regExpPrefix(re) {\n\t var prefix = /^\\^((?:\\\\[^a-zA-Z0-9]|[^\\\\\\[\\]\\^$*+?.()|{}]+)*)/.exec(re.source);\n\t return (prefix != null) ? prefix[1].replace(/\\\\(.)/g, \"$1\") : '';\n\t}\n\t/** @hidden Interpolates matched values into a String.replace()-style pattern */\n\tfunction interpolate(pattern, match) {\n\t return pattern.replace(/\\$(\\$|\\d{1,2})/, function (m, what) {\n\t return match[what === '$' ? 0 : Number(what)];\n\t });\n\t}\n\t/** @hidden */\n\tfunction handleIfMatch($injector, $stateParams, handler, match) {\n\t if (!match)\n\t return false;\n\t var result = $injector.invoke(handler, handler, { $match: match, $stateParams: $stateParams });\n\t return predicates_1.isDefined(result) ? result : true;\n\t}\n\t/** @hidden */\n\tfunction appendBasePath(url, isHtml5, absolute) {\n\t var baseHref = coreservices_1.services.locationConfig.baseHref();\n\t if (baseHref === '/')\n\t return url;\n\t if (isHtml5)\n\t return baseHref.slice(0, -1) + url;\n\t if (absolute)\n\t return baseHref.slice(1) + url;\n\t return url;\n\t}\n\t// TODO: Optimize groups of rules with non-empty prefix into some sort of decision tree\n\t/** @hidden */\n\tfunction update(rules, otherwiseFn, evt) {\n\t if (evt && evt.defaultPrevented)\n\t return;\n\t function check(rule) {\n\t var handled = rule(coreservices_1.services.$injector, $location);\n\t if (!handled)\n\t return false;\n\t if (predicates_1.isString(handled)) {\n\t $location.replace();\n\t $location.url(handled);\n\t }\n\t return true;\n\t }\n\t var n = rules.length, i;\n\t for (i = 0; i < n; i++) {\n\t if (check(rules[i]))\n\t return;\n\t }\n\t // always check otherwise last to allow dynamic updates to the set of rules\n\t if (otherwiseFn)\n\t check(otherwiseFn);\n\t}\n\t/**\n\t * Manages rules for client-side URL\n\t *\n\t * This class manages the router rules for what to do when the URL changes.\n\t */\n\tvar UrlRouterProvider = (function () {\n\t function UrlRouterProvider($urlMatcherFactory, $stateParams) {\n\t /** @hidden */\n\t this.rules = [];\n\t /** @hidden */\n\t this.interceptDeferred = false;\n\t this.$urlMatcherFactory = $urlMatcherFactory;\n\t this.$stateParams = $stateParams;\n\t }\n\t /**\n\t * Registers a url handler function.\n\t *\n\t * Registers a low level url handler (a `rule`). A rule detects specific URL patterns and returns\n\t * a redirect, or performs some action.\n\t *\n\t * If a rule returns a string, the URL is replaced with the string, and all rules are fired again.\n\t *\n\t * @example\n\t * ```js\n\t *\n\t * var app = angular.module('app', ['ui.router.router']);\n\t *\n\t * app.config(function ($urlRouterProvider) {\n\t * // Here's an example of how you might allow case insensitive urls\n\t * $urlRouterProvider.rule(function ($injector, $location) {\n\t * var path = $location.path(),\n\t * normalized = path.toLowerCase();\n\t *\n\t * if (path !== normalized) {\n\t * return normalized;\n\t * }\n\t * });\n\t * });\n\t * ```\n\t *\n\t * @param rule\n\t * Handler function that takes `$injector` and `$location` services as arguments.\n\t * You can use them to detect a url and return a different url as a string.\n\t *\n\t * @return [[$urlRouterProvider]] (`this`)\n\t */\n\t UrlRouterProvider.prototype.rule = function (rule) {\n\t if (!predicates_1.isFunction(rule))\n\t throw new Error(\"'rule' must be a function\");\n\t this.rules.push(rule);\n\t return this;\n\t };\n\t ;\n\t /**\n\t * Defines the path or behavior to use when no url can be matched.\n\t *\n\t * @example\n\t * ```js\n\t *\n\t * var app = angular.module('app', ['ui.router.router']);\n\t *\n\t * app.config(function ($urlRouterProvider) {\n\t * // if the path doesn't match any of the urls you configured\n\t * // otherwise will take care of routing the user to the\n\t * // specified url\n\t * $urlRouterProvider.otherwise('/index');\n\t *\n\t * // Example of using function rule as param\n\t * $urlRouterProvider.otherwise(function ($injector, $location) {\n\t * return '/a/valid/url';\n\t * });\n\t * });\n\t * ```\n\t *\n\t * @param rule\n\t * The url path you want to redirect to or a function rule that returns the url path or performs a `$state.go()`.\n\t * The function version is passed two params: `$injector` and `$location` services, and should return a url string.\n\t *\n\t * @return {object} `$urlRouterProvider` - `$urlRouterProvider` instance\n\t */\n\t UrlRouterProvider.prototype.otherwise = function (rule) {\n\t if (!predicates_1.isFunction(rule) && !predicates_1.isString(rule))\n\t throw new Error(\"'rule' must be a string or function\");\n\t this.otherwiseFn = predicates_1.isString(rule) ? function () { return rule; } : rule;\n\t return this;\n\t };\n\t ;\n\t /**\n\t * Registers a handler for a given url matching.\n\t *\n\t * If the handler is a string, it is\n\t * treated as a redirect, and is interpolated according to the syntax of match\n\t * (i.e. like `String.replace()` for `RegExp`, or like a `UrlMatcher` pattern otherwise).\n\t *\n\t * If the handler is a function, it is injectable.\n\t * It gets invoked if `$location` matches.\n\t * You have the option of inject the match object as `$match`.\n\t *\n\t * The handler can return\n\t *\n\t * - **falsy** to indicate that the rule didn't match after all, then `$urlRouter`\n\t * will continue trying to find another one that matches.\n\t * - **string** which is treated as a redirect and passed to `$location.url()`\n\t * - **void** or any **truthy** value tells `$urlRouter` that the url was handled.\n\t *\n\t * @example\n\t * ```js\n\t *\n\t * var app = angular.module('app', ['ui.router.router']);\n\t *\n\t * app.config(function ($urlRouterProvider) {\n\t * $urlRouterProvider.when($state.url, function ($match, $stateParams) {\n\t * if ($state.$current.navigable !== state ||\n\t * !equalForKeys($match, $stateParams) {\n\t * $state.transitionTo(state, $match, false);\n\t * }\n\t * });\n\t * });\n\t * ```\n\t *\n\t * @param what A pattern string to match, compiled as a [[UrlMatcher]].\n\t * @param handler The path (or function that returns a path) that you want to redirect your user to.\n\t *\n\t * Note: the handler may also invoke arbitrary code, such as `$state.go()`\n\t */\n\t UrlRouterProvider.prototype.when = function (what, handler) {\n\t var _a = this, $urlMatcherFactory = _a.$urlMatcherFactory, $stateParams = _a.$stateParams;\n\t var redirect, handlerIsString = predicates_1.isString(handler);\n\t // @todo Queue this\n\t if (predicates_1.isString(what))\n\t what = $urlMatcherFactory.compile(what);\n\t if (!handlerIsString && !predicates_1.isFunction(handler) && !predicates_1.isArray(handler))\n\t throw new Error(\"invalid 'handler' in when()\");\n\t var strategies = {\n\t matcher: function (_what, _handler) {\n\t if (handlerIsString) {\n\t redirect = $urlMatcherFactory.compile(_handler);\n\t _handler = ['$match', redirect.format.bind(redirect)];\n\t }\n\t return common_1.extend(function () {\n\t return handleIfMatch(coreservices_1.services.$injector, $stateParams, _handler, _what.exec($location.path(), $location.search(), $location.hash()));\n\t }, {\n\t prefix: predicates_1.isString(_what.prefix) ? _what.prefix : ''\n\t });\n\t },\n\t regex: function (_what, _handler) {\n\t if (_what.global || _what.sticky)\n\t throw new Error(\"when() RegExp must not be global or sticky\");\n\t if (handlerIsString) {\n\t redirect = _handler;\n\t _handler = ['$match', function ($match) { return interpolate(redirect, $match); }];\n\t }\n\t return common_1.extend(function () {\n\t return handleIfMatch(coreservices_1.services.$injector, $stateParams, _handler, _what.exec($location.path()));\n\t }, {\n\t prefix: regExpPrefix(_what)\n\t });\n\t }\n\t };\n\t var check = {\n\t matcher: $urlMatcherFactory.isMatcher(what),\n\t regex: what instanceof RegExp\n\t };\n\t for (var n in check) {\n\t if (check[n])\n\t return this.rule(strategies[n](what, handler));\n\t }\n\t throw new Error(\"invalid 'what' in when()\");\n\t };\n\t ;\n\t /**\n\t * Disables monitoring of the URL.\n\t *\n\t * Call this method before UI-Router has bootstrapped.\n\t * It will stop UI-Router from performing the initial url sync.\n\t *\n\t * This can be useful to perform some asynchronous initialization before the router starts.\n\t * Once the initialization is complete, call [[listen]] to tell UI-Router to start watching and synchronizing the URL.\n\t *\n\t * @example\n\t * ```js\n\t *\n\t * var app = angular.module('app', ['ui.router']);\n\t *\n\t * app.config(function ($urlRouterProvider) {\n\t * // Prevent $urlRouter from automatically intercepting URL changes;\n\t * $urlRouterProvider.deferIntercept();\n\t * })\n\t *\n\t * app.run(function (MyService, $urlRouter, $http) {\n\t * $http.get(\"/stuff\").then(function(resp) {\n\t * MyService.doStuff(resp.data);\n\t * $urlRouter.listen();\n\t * $urlRouter.sync();\n\t * });\n\t * });\n\t * ```\n\t *\n\t * @param defer Indicates whether to defer location change interception. Passing\n\t * no parameter is equivalent to `true`.\n\t */\n\t UrlRouterProvider.prototype.deferIntercept = function (defer) {\n\t if (defer === undefined)\n\t defer = true;\n\t this.interceptDeferred = defer;\n\t };\n\t ;\n\t return UrlRouterProvider;\n\t}());\n\texports.UrlRouterProvider = UrlRouterProvider;\n\tvar UrlRouter = (function () {\n\t /** @hidden */\n\t function UrlRouter(urlRouterProvider) {\n\t this.urlRouterProvider = urlRouterProvider;\n\t common_1.bindFunctions(UrlRouter.prototype, this, this);\n\t }\n\t /**\n\t * Checks the current URL for a matching rule\n\t *\n\t * Triggers an update; the same update that happens when the address bar url changes, aka `$locationChangeSuccess`.\n\t * This method is useful when you need to use `preventDefault()` on the `$locationChangeSuccess` event,\n\t * perform some custom logic (route protection, auth, config, redirection, etc) and then finally proceed\n\t * with the transition by calling `$urlRouter.sync()`.\n\t *\n\t * @example\n\t * ```js\n\t *\n\t * angular.module('app', ['ui.router'])\n\t * .run(function($rootScope, $urlRouter) {\n\t * $rootScope.$on('$locationChangeSuccess', function(evt) {\n\t * // Halt state change from even starting\n\t * evt.preventDefault();\n\t * // Perform custom logic\n\t * var meetsRequirement = ...\n\t * // Continue with the update and state transition if logic allows\n\t * if (meetsRequirement) $urlRouter.sync();\n\t * });\n\t * });\n\t * ```\n\t */\n\t UrlRouter.prototype.sync = function () {\n\t update(this.urlRouterProvider.rules, this.urlRouterProvider.otherwiseFn);\n\t };\n\t /**\n\t * Starts listening for URL changes\n\t *\n\t * Call this sometime after calling [[deferIntercept]] to start monitoring the url.\n\t * This causes [[UrlRouter]] to start listening for changes to the URL, if it wasn't already listening.\n\t */\n\t UrlRouter.prototype.listen = function () {\n\t var _this = this;\n\t return this.listener = this.listener || $location.onChange(function (evt) { return update(_this.urlRouterProvider.rules, _this.urlRouterProvider.otherwiseFn, evt); });\n\t };\n\t /**\n\t * Internal API.\n\t */\n\t UrlRouter.prototype.update = function (read) {\n\t if (read) {\n\t this.location = $location.url();\n\t return;\n\t }\n\t if ($location.url() === this.location)\n\t return;\n\t $location.url(this.location);\n\t $location.replace();\n\t };\n\t /**\n\t * Internal API.\n\t *\n\t * Pushes a new location to the browser history.\n\t *\n\t * @param urlMatcher\n\t * @param params\n\t * @param options\n\t */\n\t UrlRouter.prototype.push = function (urlMatcher, params, options) {\n\t $location.url(urlMatcher.format(params || {}));\n\t if (options && options.replace)\n\t $location.replace();\n\t };\n\t /**\n\t * Builds and returns a URL with interpolated parameters\n\t *\n\t * @example\n\t * ```js\n\t *\n\t * $bob = $urlRouter.href(new UrlMatcher(\"/about/:person\"), {\n\t * person: \"bob\"\n\t * });\n\t * // $bob == \"/about/bob\";\n\t * ```\n\t *\n\t * @param urlMatcher The [[UrlMatcher]] object which is used as the template of the URL to generate.\n\t * @param params An object of parameter values to fill the matcher's required parameters.\n\t * @param options Options object. The options are:\n\t *\n\t * - **`absolute`** - {boolean=false}, If true will generate an absolute url, e.g. \"http://www.example.com/fullurl\".\n\t *\n\t * @returns Returns the fully compiled URL, or `null` if `params` fail validation against `urlMatcher`\n\t */\n\t UrlRouter.prototype.href = function (urlMatcher, params, options) {\n\t if (!urlMatcher.validates(params))\n\t return null;\n\t var url = urlMatcher.format(params);\n\t options = options || { absolute: false };\n\t var cfg = coreservices_1.services.locationConfig;\n\t var isHtml5 = cfg.html5Mode();\n\t if (!isHtml5 && url !== null) {\n\t url = \"#\" + cfg.hashPrefix() + url;\n\t }\n\t url = appendBasePath(url, isHtml5, options.absolute);\n\t if (!options.absolute || !url) {\n\t return url;\n\t }\n\t var slash = (!isHtml5 && url ? '/' : ''), port = cfg.port();\n\t port = (port === 80 || port === 443 ? '' : ':' + port);\n\t return [cfg.protocol(), '://', cfg.host(), port, slash, url].join('');\n\t };\n\t return UrlRouter;\n\t}());\n\texports.UrlRouter = UrlRouter;\n\n\n/***/ },\n/* 30 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\t/** @module state */ /** for typedoc */\n\tvar predicates_1 = __webpack_require__(4);\n\tvar common_1 = __webpack_require__(3);\n\t/**\n\t * @ngdoc object\n\t * @name ui.router.state.$stateProvider\n\t *\n\t * @requires ui.router.router.$urlRouterProvider\n\t * @requires ui.router.util.$urlMatcherFactoryProvider\n\t *\n\t * @description\n\t * The new `$stateProvider` works similar to Angular's v1 router, but it focuses purely\n\t * on state.\n\t *\n\t * A state corresponds to a \"place\" in the application in terms of the overall UI and\n\t * navigation. A state describes (via the controller / template / view properties) what\n\t * the UI looks like and does at that place.\n\t *\n\t * States often have things in common, and the primary way of factoring out these\n\t * commonalities in this model is via the state hierarchy, i.e. parent/child states aka\n\t * nested states.\n\t *\n\t * The `$stateProvider` provides interfaces to declare these states for your app.\n\t */\n\tvar StateProvider = (function () {\n\t function StateProvider(stateRegistry) {\n\t this.stateRegistry = stateRegistry;\n\t this.invalidCallbacks = [];\n\t common_1.bindFunctions(StateProvider.prototype, this, this);\n\t }\n\t /**\n\t * @ngdoc function\n\t * @name ui.router.state.$stateProvider#decorator\n\t * @methodOf ui.router.state.$stateProvider\n\t *\n\t * @description\n\t * Allows you to extend (carefully) or override (at your own peril) the\n\t * `stateBuilder` object used internally by `$stateProvider`. This can be used\n\t * to add custom functionality to ui-router, for example inferring templateUrl\n\t * based on the state name.\n\t *\n\t * When passing only a name, it returns the current (original or decorated) builder\n\t * function that matches `name`.\n\t *\n\t * The builder functions that can be decorated are listed below. Though not all\n\t * necessarily have a good use case for decoration, that is up to you to decide.\n\t *\n\t * In addition, users can attach custom decorators, which will generate new\n\t * properties within the state's internal definition. There is currently no clear\n\t * use-case for this beyond accessing internal states (i.e. $state.$current),\n\t * however, expect this to become increasingly relevant as we introduce additional\n\t * meta-programming features.\n\t *\n\t * **Warning**: Decorators should not be interdependent because the order of\n\t * execution of the builder functions in non-deterministic. Builder functions\n\t * should only be dependent on the state definition object and super function.\n\t *\n\t *\n\t * Existing builder functions and current return values:\n\t *\n\t * - **parent** `{object}` - returns the parent state object.\n\t * - **data** `{object}` - returns state data, including any inherited data that is not\n\t * overridden by own values (if any).\n\t * - **url** `{object}` - returns a {@link ui.router.util.type:UrlMatcher UrlMatcher}\n\t * or `null`.\n\t * - **navigable** `{object}` - returns closest ancestor state that has a URL (aka is\n\t * navigable).\n\t * - **params** `{object}` - returns an array of state params that are ensured to\n\t * be a super-set of parent's params.\n\t * - **views** `{object}` - returns a views object where each key is an absolute view\n\t * name (i.e. \"viewName@stateName\") and each value is the config object\n\t * (template, controller) for the view. Even when you don't use the views object\n\t * explicitly on a state config, one is still created for you internally.\n\t * So by decorating this builder function you have access to decorating template\n\t * and controller properties.\n\t * - **ownParams** `{object}` - returns an array of params that belong to the state,\n\t * not including any params defined by ancestor states.\n\t * - **path** `{string}` - returns the full path from the root down to this state.\n\t * Needed for state activation.\n\t * - **includes** `{object}` - returns an object that includes every state that\n\t * would pass a `$state.includes()` test.\n\t *\n\t * @example\n\t * \n\t * // Override the internal 'views' builder with a function that takes the state\n\t * // definition, and a reference to the internal function being overridden:\n\t * $stateProvider.decorator('views', function (state, parent) {\n\t * let result = {},\n\t * views = parent(state);\n\t *\n\t * angular.forEach(views, function (config, name) {\n\t * let autoName = (state.name + '.' + name).replace('.', '/');\n\t * config.templateUrl = config.templateUrl || '/partials/' + autoName + '.html';\n\t * result[name] = config;\n\t * });\n\t * return result;\n\t * });\n\t *\n\t * $stateProvider.state('home', {\n\t * views: {\n\t * 'contact.list': { controller: 'ListController' },\n\t * 'contact.item': { controller: 'ItemController' }\n\t * }\n\t * });\n\t *\n\t * // ...\n\t *\n\t * $state.go('home');\n\t * // Auto-populates list and item views with /partials/home/contact/list.html,\n\t * // and /partials/home/contact/item.html, respectively.\n\t *
\n\t *\n\t * @param {string} name The name of the builder function to decorate.\n\t * @param {object} func A function that is responsible for decorating the original\n\t * builder function. The function receives two parameters:\n\t *\n\t * - `{object}` - state - The state config object.\n\t * - `{object}` - super - The original builder function.\n\t *\n\t * @return {object} $stateProvider - $stateProvider instance\n\t */\n\t StateProvider.prototype.decorator = function (name, func) {\n\t return this.stateRegistry.decorator(name, func) || this;\n\t };\n\t /**\n\t * @ngdoc function\n\t * @name ui.router.state.$stateProvider#state\n\t * @methodOf ui.router.state.$stateProvider\n\t *\n\t * @description\n\t * Registers a state configuration under a given state name. The stateConfig object\n\t * has the following acceptable properties.\n\t *\n\t * \n\t *\n\t * - **`template`** - {string|function=} - html template as a string or a function that returns\n\t * an html template as a string which should be used by the uiView directives. This property\n\t * takes precedence over templateUrl.\n\t *\n\t * If `template` is a function, it will be called with the following parameters:\n\t *\n\t * - {array.<object>} - state parameters extracted from the current $location.path() by\n\t * applying the current state\n\t *\n\t * \n\t *\n\t * - **`templateUrl`** - {string|function=} - path or function that returns a path to an html\n\t * template that should be used by uiView.\n\t *\n\t * If `templateUrl` is a function, it will be called with the following parameters:\n\t *\n\t * - {array.<object>} - state parameters extracted from the current $location.path() by\n\t * applying the current state\n\t *\n\t * \n\t *\n\t * - **`templateProvider`** - {function=} - Provider function that returns HTML content\n\t * string.\n\t *\n\t * \n\t *\n\t * - **`controller`** - {string|function=} - Controller fn that should be associated with newly\n\t * related scope or the name of a registered controller if passed as a string.\n\t *\n\t * \n\t *\n\t * - **`controllerProvider`** - {function=} - Injectable provider function that returns\n\t * the actual controller or string.\n\t *\n\t * \n\t *\n\t * - **`controllerAs`** – {string=} – A controller alias name. If present the controller will be\n\t * published to scope under the controllerAs name.\n\t *\n\t * \n\t *\n\t * - **`resolve`** - {object.<string, function>=} - An optional map of dependencies which\n\t * should be injected into the controller. If any of these dependencies are promises,\n\t * the router will wait for them all to be resolved or one to be rejected before the\n\t * controller is instantiated. If all the promises are resolved successfully, the values\n\t * of the resolved promises are injected and $stateChangeSuccess event is fired. If any\n\t * of the promises are rejected the $stateChangeError event is fired. The map object is:\n\t *\n\t * - key - {string}: name of dependency to be injected into controller\n\t * - factory - {string|function}: If string then it is alias for service. Otherwise if function,\n\t * it is injected and return value it treated as dependency. If result is a promise, it is\n\t * resolved before its value is injected into controller.\n\t *\n\t * \n\t *\n\t * - **`url`** - {string=} - A url with optional parameters. When a state is navigated or\n\t * transitioned to, the `$stateParams` service will be populated with any\n\t * parameters that were passed.\n\t *\n\t * \n\t *\n\t * - **`params`** - {object=} - An array of parameter names or regular expressions. Only\n\t * use this within a state if you are not using url. Otherwise you can specify your\n\t * parameters within the url. When a state is navigated or transitioned to, the\n\t * $stateParams service will be populated with any parameters that were passed.\n\t *\n\t * \n\t *\n\t * - **`views`** - {object=} - Use the views property to set up multiple views or to target views\n\t * manually/explicitly.\n\t *\n\t * \n\t *\n\t * - **`abstract`** - {boolean=} - An abstract state will never be directly activated,\n\t * but can provide inherited properties to its common children states.\n\t *\n\t * \n\t *\n\t * - **`onEnter`** - {object=} - Callback function for when a state is entered. Good way\n\t * to trigger an action or dispatch an event, such as opening a dialog.\n\t * If minifying your scripts, make sure to use the `['injection1', 'injection2', function(injection1, injection2){}]` syntax.\n\t *\n\t * \n\t *\n\t * - **`onExit`** - {object=} - Callback function for when a state is exited. Good way to\n\t * trigger an action or dispatch an event, such as opening a dialog.\n\t * If minifying your scripts, make sure to use the `['injection1', 'injection2', function(injection1, injection2){}]` syntax.\n\t *\n\t * \n\t *\n\t * - **`reloadOnSearch = true`** - {boolean=} - If `false`, will not retrigger the same state\n\t * just because a search/query parameter has changed (via $location.search() or $location.hash()).\n\t * Useful for when you'd like to modify $location.search() without triggering a reload.\n\t *\n\t * \n\t *\n\t * - **`data`** - {object=} - Arbitrary data object, useful for custom configuration.\n\t *\n\t * @example\n\t * \n\t * // Some state name examples\n\t *\n\t * // stateName can be a single top-level name (must be unique).\n\t * $stateProvider.state(\"home\", {});\n\t *\n\t * // Or it can be a nested state name. This state is a child of the\n\t * // above \"home\" state.\n\t * $stateProvider.state(\"home.newest\", {});\n\t *\n\t * // Nest states as deeply as needed.\n\t * $stateProvider.state(\"home.newest.abc.xyz.inception\", {});\n\t *\n\t * // state() returns $stateProvider, so you can chain state declarations.\n\t * $stateProvider\n\t * .state(\"home\", {})\n\t * .state(\"about\", {})\n\t * .state(\"contacts\", {});\n\t *
\n\t *\n\t * @param {string} name A unique state name, e.g. \"home\", \"about\", \"contacts\".\n\t * To create a parent/child state use a dot, e.g. \"about.sales\", \"home.newest\".\n\t * @param {object} definition State configuration object.\n\t */\n\t StateProvider.prototype.state = function (name, definition) {\n\t if (predicates_1.isObject(name)) {\n\t definition = name;\n\t }\n\t else {\n\t definition.name = name;\n\t }\n\t this.stateRegistry.register(definition);\n\t return this;\n\t };\n\t /**\n\t * Registers an invalid state handler\n\t *\n\t * Registers a function to be injected and invoked when [[StateService.transitionTo]] has been called with an invalid\n\t * state reference parameter\n\t *\n\t * This function can be injected with one some special values:\n\t * - **`$to$`**: TargetState\n\t * - **`$from$`**: TargetState\n\t *\n\t * Note: This API is subject to change.\n\t * Replacement of dependency injection support with some alternative is likely.\n\t *\n\t * @param {function} callback\n\t * The function which will be injected and invoked, when a matching transition is started.\n\t * The function may optionally return a {TargetState} or a Promise for a TargetState. If one\n\t * is returned, it is treated as a redirect.\n\t */\n\t StateProvider.prototype.onInvalid = function (callback) {\n\t this.invalidCallbacks.push(callback);\n\t };\n\t return StateProvider;\n\t}());\n\texports.StateProvider = StateProvider;\n\n\n/***/ },\n/* 31 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\tvar transition_1 = __webpack_require__(11);\n\tvar hookRegistry_1 = __webpack_require__(15);\n\tvar resolve_1 = __webpack_require__(32);\n\tvar views_1 = __webpack_require__(33);\n\tvar url_1 = __webpack_require__(34);\n\tvar redirectTo_1 = __webpack_require__(35);\n\tvar onEnterExitRetain_1 = __webpack_require__(36);\n\tvar hof_1 = __webpack_require__(5);\n\t/**\n\t * The default [[Transition]] options.\n\t *\n\t * Include this object when applying custom defaults:\n\t * let reloadOpts = { reload: true, notify: true }\n\t * let options = defaults(theirOpts, customDefaults, defaultOptions);\n\t */\n\texports.defaultTransOpts = {\n\t location: true,\n\t relative: null,\n\t inherit: false,\n\t notify: true,\n\t reload: false,\n\t custom: {},\n\t current: function () { return null; }\n\t};\n\t/**\n\t * This class provides services related to Transitions.\n\t *\n\t * - Most importantly, it allows global Transition Hooks to be registered.\n\t * - It allows the default transition error handler to be set.\n\t * - It also has a factory function for creating new [[Transition]] objects, (used internally by the [[StateService]]).\n\t *\n\t * At bootstrap, [[UIRouter]] creates a single instance (singleton) of this class.\n\t */\n\tvar TransitionService = (function () {\n\t function TransitionService(_router) {\n\t this._router = _router;\n\t this.$view = _router.viewService;\n\t hookRegistry_1.HookRegistry.mixin(new hookRegistry_1.HookRegistry(), this);\n\t this._deregisterHookFns = {};\n\t this.registerTransitionHooks();\n\t }\n\t /** @hidden */\n\t TransitionService.prototype.registerTransitionHooks = function () {\n\t var fns = this._deregisterHookFns;\n\t // Wire up redirectTo hook\n\t fns.redirectTo = this.onStart({ to: function (state) { return !!state.redirectTo; } }, redirectTo_1.redirectToHook);\n\t // Wire up onExit/Retain/Enter state hooks\n\t fns.onExit = this.onExit({ exiting: function (state) { return !!state.onExit; } }, onEnterExitRetain_1.onExitHook);\n\t fns.onRetain = this.onRetain({ retained: function (state) { return !!state.onRetain; } }, onEnterExitRetain_1.onRetainHook);\n\t fns.onEnter = this.onEnter({ entering: function (state) { return !!state.onEnter; } }, onEnterExitRetain_1.onEnterHook);\n\t // Wire up Resolve hooks\n\t fns.eagerResolve = this.onStart({}, resolve_1.eagerResolvePath, { priority: 1000 });\n\t fns.lazyResolve = this.onEnter({ entering: hof_1.val(true) }, resolve_1.lazyResolveState, { priority: 1000 });\n\t // Wire up the View management hooks\n\t fns.loadViews = this.onStart({}, views_1.loadEnteringViews);\n\t fns.activateViews = this.onSuccess({}, views_1.activateViews);\n\t // After globals.current is updated at priority: 10000\n\t fns.updateUrl = this.onSuccess({}, url_1.updateUrl, { priority: 9999 });\n\t };\n\t /** @inheritdoc */\n\t TransitionService.prototype.onBefore = function (matchCriteria, callback, options) { throw \"\"; };\n\t ;\n\t /** @inheritdoc */\n\t TransitionService.prototype.onStart = function (matchCriteria, callback, options) { throw \"\"; };\n\t ;\n\t /** @inheritdoc */\n\t TransitionService.prototype.onExit = function (matchCriteria, callback, options) { throw \"\"; };\n\t ;\n\t /** @inheritdoc */\n\t TransitionService.prototype.onRetain = function (matchCriteria, callback, options) { throw \"\"; };\n\t ;\n\t /** @inheritdoc */\n\t TransitionService.prototype.onEnter = function (matchCriteria, callback, options) { throw \"\"; };\n\t ;\n\t /** @inheritdoc */\n\t TransitionService.prototype.onFinish = function (matchCriteria, callback, options) { throw \"\"; };\n\t ;\n\t /** @inheritdoc */\n\t TransitionService.prototype.onSuccess = function (matchCriteria, callback, options) { throw \"\"; };\n\t ;\n\t /** @inheritdoc */\n\t TransitionService.prototype.onError = function (matchCriteria, callback, options) { throw \"\"; };\n\t ;\n\t /**\n\t * Creates a new [[Transition]] object\n\t *\n\t * This is a factory function for creating new Transition objects.\n\t * It is used internally by the [[StateService]] and should generally not be called by application code.\n\t *\n\t * @param fromPath the path to the current state (the from state)\n\t * @param targetState the target state (destination)\n\t * @returns a Transition\n\t */\n\t TransitionService.prototype.create = function (fromPath, targetState) {\n\t return new transition_1.Transition(fromPath, targetState, this._router);\n\t };\n\t return TransitionService;\n\t}());\n\texports.TransitionService = TransitionService;\n\n\n/***/ },\n/* 32 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\t/** @module hooks */ /** for typedoc */\n\tvar common_1 = __webpack_require__(3);\n\tvar resolveContext_1 = __webpack_require__(17);\n\t/**\n\t * A [[TransitionHookFn]] which resolves all EAGER Resolvables in the To Path\n\t *\n\t * Registered using `transitionService.onStart({}, eagerResolvePath);`\n\t *\n\t * When a Transition starts, this hook resolves all the EAGER Resolvables, which the transition then waits for.\n\t *\n\t * See [[StateDeclaration.resolve]]\n\t */\n\texports.eagerResolvePath = function (trans) {\n\t return new resolveContext_1.ResolveContext(trans.treeChanges().to)\n\t .resolvePath(\"EAGER\", trans)\n\t .then(common_1.noop);\n\t};\n\t/**\n\t * A [[TransitionHookFn]] which resolves all LAZY Resolvables for the state (and all its ancestors) in the To Path\n\t *\n\t * Registered using `transitionService.onEnter({ entering: () => true }, lazyResolveState);`\n\t *\n\t * When a State is being entered, this hook resolves all the Resolvables for this state, which the transition then waits for.\n\t *\n\t * See [[StateDeclaration.resolve]]\n\t */\n\texports.lazyResolveState = function (trans, state) {\n\t return new resolveContext_1.ResolveContext(trans.treeChanges().to)\n\t .subContext(state)\n\t .resolvePath(\"LAZY\", trans)\n\t .then(common_1.noop);\n\t};\n\n\n/***/ },\n/* 33 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\t/** @module hooks */ /** for typedoc */\n\tvar common_1 = __webpack_require__(3);\n\tvar coreservices_1 = __webpack_require__(6);\n\t/**\n\t * A [[TransitionHookFn]] which waits for the views to load\n\t *\n\t * Registered using `transitionService.onStart({}, loadEnteringViews);`\n\t *\n\t * Allows the views to do async work in [[ViewConfig.load]] before the transition continues.\n\t * In angular 1, this includes loading the templates.\n\t */\n\tfunction loadEnteringViews(transition) {\n\t var enteringViews = transition.views(\"entering\");\n\t if (!enteringViews.length)\n\t return;\n\t return coreservices_1.services.$q.all(enteringViews.map(function (view) { return view.load(); })).then(common_1.noop);\n\t}\n\texports.loadEnteringViews = loadEnteringViews;\n\t/**\n\t * A [[TransitionHookFn]] which activates the new views when a transition is successful.\n\t *\n\t * Registered using `transitionService.onSuccess({}, activateViews);`\n\t *\n\t * After a transition is complete, this hook deactivates the old views from the previous state,\n\t * and activates the new views from the destination state.\n\t *\n\t * See [[ViewService]]\n\t */\n\tfunction activateViews(transition) {\n\t var enteringViews = transition.views(\"entering\");\n\t var exitingViews = transition.views(\"exiting\");\n\t if (!enteringViews.length && !exitingViews.length)\n\t return;\n\t var $view = transition.router.viewService;\n\t exitingViews.forEach(function (vc) { return $view.deactivateViewConfig(vc); });\n\t enteringViews.forEach(function (vc) { return $view.activateViewConfig(vc); });\n\t $view.sync();\n\t}\n\texports.activateViews = activateViews;\n\n\n/***/ },\n/* 34 */\n/***/ function(module, exports) {\n\n\t\"use strict\";\n\t/**\n\t * A [[TransitionHookFn]] which updates the URL after a successful transition\n\t *\n\t * Registered using `transitionService.onSuccess({}, updateUrl);`\n\t */\n\tfunction updateUrl(transition) {\n\t var options = transition.options();\n\t var $state = transition.router.stateService;\n\t var $urlRouter = transition.router.urlRouter;\n\t if (options.location && $state.$current.navigable) {\n\t var urlOptions = { replace: options.location === 'replace' };\n\t $urlRouter.push($state.$current.navigable.url, $state.params, urlOptions);\n\t }\n\t $urlRouter.update(true);\n\t}\n\texports.updateUrl = updateUrl;\n\n\n/***/ },\n/* 35 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\t/** @module hooks */ /** */\n\tvar predicates_1 = __webpack_require__(4);\n\tvar coreservices_1 = __webpack_require__(6);\n\tvar targetState_1 = __webpack_require__(14);\n\t/**\n\t * A [[TransitionHookFn]] that redirects to a different state or params\n\t *\n\t * Registered using `transitionService.onStart({ to: (state) => !!state.redirectTo }, redirectHook);`\n\t *\n\t * See [[StateDeclaration.redirectTo]]\n\t */\n\texports.redirectToHook = function (trans) {\n\t var redirect = trans.to().redirectTo;\n\t if (!redirect)\n\t return;\n\t function handleResult(result) {\n\t var $state = trans.router.stateService;\n\t if (result instanceof targetState_1.TargetState)\n\t return result;\n\t if (predicates_1.isString(result))\n\t return $state.target(result, trans.params(), trans.options());\n\t if (result['state'] || result['params'])\n\t return $state.target(result['state'] || trans.to(), result['params'] || trans.params(), trans.options());\n\t }\n\t if (predicates_1.isFunction(redirect)) {\n\t return coreservices_1.services.$q.when(redirect(trans)).then(handleResult);\n\t }\n\t return handleResult(redirect);\n\t};\n\n\n/***/ },\n/* 36 */\n/***/ function(module, exports) {\n\n\t\"use strict\";\n\t/**\n\t * A factory which creates an onEnter, onExit or onRetain transition hook function\n\t *\n\t * The returned function invokes the (for instance) state.onEnter hook when the\n\t * state is being entered.\n\t *\n\t * @hidden\n\t */\n\tfunction makeEnterExitRetainHook(hookName) {\n\t return function (transition, state) {\n\t return state[hookName](transition, state);\n\t };\n\t}\n\t/**\n\t * The [[TransitionStateHookFn]] for onExit\n\t *\n\t * When the state is being exited, the state's .onExit function is invoked.\n\t *\n\t * Registered using `transitionService.onExit({ exiting: (state) => !!state.onExit }, onExitHook);`\n\t */\n\texports.onExitHook = makeEnterExitRetainHook('onExit');\n\t/**\n\t * The [[TransitionStateHookFn]] for onRetain\n\t *\n\t * When the state is being exited, the state's .onRetain function is invoked.\n\t *\n\t * Registered using `transitionService.onRetain({ retained: (state) => !!state.onRetain }, onRetainHook);`\n\t */\n\texports.onRetainHook = makeEnterExitRetainHook('onRetain');\n\t/**\n\t * The [[TransitionStateHookFn]] for onEnter\n\t *\n\t * When the state is being exited, the state's .onEnter function is invoked.\n\t *\n\t * Registered using `transitionService.onEnter({ entering: (state) => !!state.onEnter }, onEnterHook);`\n\t */\n\texports.onEnterHook = makeEnterExitRetainHook('onEnter');\n\n\n/***/ },\n/* 37 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\t/** @module view */ /** for typedoc */\n\tvar common_1 = __webpack_require__(3);\n\tvar hof_1 = __webpack_require__(5);\n\tvar predicates_1 = __webpack_require__(4);\n\tvar trace_1 = __webpack_require__(12);\n\tvar match = function (obj1) {\n\t var keys = [];\n\t for (var _i = 1; _i < arguments.length; _i++) {\n\t keys[_i - 1] = arguments[_i];\n\t }\n\t return function (obj2) { return keys.reduce(function (memo, key) { return memo && obj1[key] === obj2[key]; }, true); };\n\t};\n\t/**\n\t * The View service\n\t */\n\tvar ViewService = (function () {\n\t function ViewService() {\n\t var _this = this;\n\t this.uiViews = [];\n\t this.viewConfigs = [];\n\t this._viewConfigFactories = {};\n\t this.sync = function () {\n\t var uiViewsByFqn = _this.uiViews.map(function (uiv) { return [uiv.fqn, uiv]; }).reduce(common_1.applyPairs, {});\n\t /**\n\t * Given a ui-view and a ViewConfig, determines if they \"match\".\n\t *\n\t * A ui-view has a fully qualified name (fqn) and a context object. The fqn is built from its overall location in\n\t * the DOM, describing its nesting relationship to any parent ui-view tags it is nested inside of.\n\t *\n\t * A ViewConfig has a target ui-view name and a context anchor. The ui-view name can be a simple name, or\n\t * can be a segmented ui-view path, describing a portion of a ui-view fqn.\n\t *\n\t * In order for a ui-view to match ViewConfig, ui-view's $type must match the ViewConfig's $type\n\t *\n\t * If the ViewConfig's target ui-view name is a simple name (no dots), then a ui-view matches if:\n\t * - the ui-view's name matches the ViewConfig's target name\n\t * - the ui-view's context matches the ViewConfig's anchor\n\t *\n\t * If the ViewConfig's target ui-view name is a segmented name (with dots), then a ui-view matches if:\n\t * - There exists a parent ui-view where:\n\t * - the parent ui-view's name matches the first segment (index 0) of the ViewConfig's target name\n\t * - the parent ui-view's context matches the ViewConfig's anchor\n\t * - And the remaining segments (index 1..n) of the ViewConfig's target name match the tail of the ui-view's fqn\n\t *\n\t * Example:\n\t *\n\t * DOM:\n\t * \n\t *\n\t * uiViews: [\n\t * { fqn: \"$default\", creationContext: { name: \"\" } },\n\t * { fqn: \"$default.foo\", creationContext: { name: \"A\" } },\n\t * { fqn: \"$default.foo.$default\", creationContext: { name: \"A.B\" } }\n\t * { fqn: \"$default.foo.$default.bar\", creationContext: { name: \"A.B.C\" } }\n\t * ]\n\t *\n\t * These four view configs all match the ui-view with the fqn: \"$default.foo.$default.bar\":\n\t *\n\t * - ViewConfig1: { uiViewName: \"bar\", uiViewContextAnchor: \"A.B.C\" }\n\t * - ViewConfig2: { uiViewName: \"$default.bar\", uiViewContextAnchor: \"A.B\" }\n\t * - ViewConfig3: { uiViewName: \"foo.$default.bar\", uiViewContextAnchor: \"A\" }\n\t * - ViewConfig4: { uiViewName: \"$default.foo.$default.bar\", uiViewContextAnchor: \"\" }\n\t *\n\t * Using ViewConfig3 as an example, it matches the ui-view with fqn \"$default.foo.$default.bar\" because:\n\t * - The ViewConfig's segmented target name is: [ \"foo\", \"$default\", \"bar\" ]\n\t * - There exists a parent ui-view (which has fqn: \"$default.foo\") where:\n\t * - the parent ui-view's name \"foo\" matches the first segment \"foo\" of the ViewConfig's target name\n\t * - the parent ui-view's context \"A\" matches the ViewConfig's anchor context \"A\"\n\t * - And the remaining segments [ \"$default\", \"bar\" ].join(\".\"_ of the ViewConfig's target name match\n\t * the tail of the ui-view's fqn \"default.bar\"\n\t */\n\t var matches = function (uiView) { return function (viewConfig) {\n\t // Don't supply an ng1 ui-view with an ng2 ViewConfig, etc\n\t if (uiView.$type !== viewConfig.viewDecl.$type)\n\t return false;\n\t // Split names apart from both viewConfig and uiView into segments\n\t var vc = viewConfig.viewDecl;\n\t var vcSegments = vc.$uiViewName.split(\".\");\n\t var uivSegments = uiView.fqn.split(\".\");\n\t // Check if the tails of the segment arrays match. ex, these arrays' tails match:\n\t // vc: [\"foo\", \"bar\"], uiv fqn: [\"$default\", \"foo\", \"bar\"]\n\t if (!common_1.equals(vcSegments, uivSegments.slice(0 - vcSegments.length)))\n\t return false;\n\t // Now check if the fqn ending at the first segment of the viewConfig matches the context:\n\t // [\"$default\", \"foo\"].join(\".\") == \"$default.foo\", does the ui-view $default.foo context match?\n\t var negOffset = (1 - vcSegments.length) || undefined;\n\t var fqnToFirstSegment = uivSegments.slice(0, negOffset).join(\".\");\n\t var uiViewContext = uiViewsByFqn[fqnToFirstSegment].creationContext;\n\t return vc.$uiViewContextAnchor === (uiViewContext && uiViewContext.name);\n\t }; };\n\t // Return the number of dots in the fully qualified name\n\t function uiViewDepth(uiView) {\n\t return uiView.fqn.split(\".\").length;\n\t }\n\t // Return the ViewConfig's context's depth in the context tree.\n\t function viewConfigDepth(config) {\n\t var context = config.viewDecl.$context, count = 0;\n\t while (++count && context.parent)\n\t context = context.parent;\n\t return count;\n\t }\n\t // Given a depth function, returns a compare function which can return either ascending or descending order\n\t var depthCompare = hof_1.curry(function (depthFn, posNeg, left, right) { return posNeg * (depthFn(left) - depthFn(right)); });\n\t var matchingConfigPair = function (uiView) {\n\t var matchingConfigs = _this.viewConfigs.filter(matches(uiView));\n\t if (matchingConfigs.length > 1)\n\t matchingConfigs.sort(depthCompare(viewConfigDepth, -1)); // descending\n\t return [uiView, matchingConfigs[0]];\n\t };\n\t var configureUIView = function (_a) {\n\t var uiView = _a[0], viewConfig = _a[1];\n\t // If a parent ui-view is reconfigured, it could destroy child ui-views.\n\t // Before configuring a child ui-view, make sure it's still in the active uiViews array.\n\t if (_this.uiViews.indexOf(uiView) !== -1)\n\t uiView.configUpdated(viewConfig);\n\t };\n\t _this.uiViews.sort(depthCompare(uiViewDepth, 1)).map(matchingConfigPair).forEach(configureUIView);\n\t };\n\t }\n\t ViewService.prototype.rootContext = function (context) {\n\t return this._rootContext = context || this._rootContext;\n\t };\n\t ;\n\t ViewService.prototype.viewConfigFactory = function (viewType, factory) {\n\t this._viewConfigFactories[viewType] = factory;\n\t };\n\t ViewService.prototype.createViewConfig = function (path, decl) {\n\t var cfgFactory = this._viewConfigFactories[decl.$type];\n\t if (!cfgFactory)\n\t throw new Error(\"ViewService: No view config factory registered for type \" + decl.$type);\n\t var cfgs = cfgFactory(path, decl);\n\t return predicates_1.isArray(cfgs) ? cfgs : [cfgs];\n\t };\n\t /**\n\t * De-registers a ViewConfig.\n\t *\n\t * @param viewConfig The ViewConfig view to deregister.\n\t */\n\t ViewService.prototype.deactivateViewConfig = function (viewConfig) {\n\t trace_1.trace.traceViewServiceEvent(\"<- Removing\", viewConfig);\n\t common_1.removeFrom(this.viewConfigs, viewConfig);\n\t };\n\t ;\n\t ViewService.prototype.activateViewConfig = function (viewConfig) {\n\t trace_1.trace.traceViewServiceEvent(\"-> Registering\", viewConfig);\n\t this.viewConfigs.push(viewConfig);\n\t };\n\t ;\n\t /**\n\t * Allows a `ui-view` element to register its canonical name with a callback that allows it to\n\t * be updated with a template, controller, and local variables.\n\t *\n\t * @param {String} name The fully-qualified name of the `ui-view` object being registered.\n\t * @param {Function} configUpdatedCallback A callback that receives updates to the content & configuration\n\t * of the view.\n\t * @return {Function} Returns a de-registration function used when the view is destroyed.\n\t */\n\t ViewService.prototype.registerUIView = function (uiView) {\n\t trace_1.trace.traceViewServiceUIViewEvent(\"-> Registering\", uiView);\n\t var uiViews = this.uiViews;\n\t var fqnMatches = function (uiv) { return uiv.fqn === uiView.fqn; };\n\t if (uiViews.filter(fqnMatches).length)\n\t trace_1.trace.traceViewServiceUIViewEvent(\"!!!! duplicate uiView named:\", uiView);\n\t uiViews.push(uiView);\n\t this.sync();\n\t return function () {\n\t var idx = uiViews.indexOf(uiView);\n\t if (idx <= 0) {\n\t trace_1.trace.traceViewServiceUIViewEvent(\"Tried removing non-registered uiView\", uiView);\n\t return;\n\t }\n\t trace_1.trace.traceViewServiceUIViewEvent(\"<- Deregistering\", uiView);\n\t common_1.removeFrom(uiViews)(uiView);\n\t };\n\t };\n\t ;\n\t /**\n\t * Returns the list of views currently available on the page, by fully-qualified name.\n\t *\n\t * @return {Array} Returns an array of fully-qualified view names.\n\t */\n\t ViewService.prototype.available = function () {\n\t return this.uiViews.map(hof_1.prop(\"fqn\"));\n\t };\n\t /**\n\t * Returns the list of views on the page containing loaded content.\n\t *\n\t * @return {Array} Returns an array of fully-qualified view names.\n\t */\n\t ViewService.prototype.active = function () {\n\t return this.uiViews.filter(hof_1.prop(\"$config\")).map(hof_1.prop(\"name\"));\n\t };\n\t /**\n\t * Normalizes a view's name from a state.views configuration block.\n\t *\n\t * @param context the context object (state declaration) that the view belongs to\n\t * @param rawViewName the name of the view, as declared in the [[StateDeclaration.views]]\n\t *\n\t * @returns the normalized uiViewName and uiViewContextAnchor that the view targets\n\t */\n\t ViewService.normalizeUIViewTarget = function (context, rawViewName) {\n\t if (rawViewName === void 0) { rawViewName = \"\"; }\n\t // TODO: Validate incoming view name with a regexp to allow:\n\t // ex: \"view.name@foo.bar\" , \"^.^.view.name\" , \"view.name@^.^\" , \"\" ,\n\t // \"@\" , \"$default@^\" , \"!$default.$default\" , \"!foo.bar\"\n\t var viewAtContext = rawViewName.split(\"@\");\n\t var uiViewName = viewAtContext[0] || \"$default\"; // default to unnamed view\n\t var uiViewContextAnchor = predicates_1.isString(viewAtContext[1]) ? viewAtContext[1] : \"^\"; // default to parent context\n\t // Handle relative view-name sugar syntax.\n\t // Matches rawViewName \"^.^.^.foo.bar\" into array: [\"^.^.^.foo.bar\", \"^.^.^\", \"foo.bar\"],\n\t var relativeViewNameSugar = /^(\\^(?:\\.\\^)*)\\.(.*$)/.exec(uiViewName);\n\t if (relativeViewNameSugar) {\n\t // Clobbers existing contextAnchor (rawViewName validation will fix this)\n\t uiViewContextAnchor = relativeViewNameSugar[1]; // set anchor to \"^.^.^\"\n\t uiViewName = relativeViewNameSugar[2]; // set view-name to \"foo.bar\"\n\t }\n\t if (uiViewName.charAt(0) === '!') {\n\t uiViewName = uiViewName.substr(1);\n\t uiViewContextAnchor = \"\"; // target absolutely from root\n\t }\n\t // handle parent relative targeting \"^.^.^\"\n\t var relativeMatch = /^(\\^(?:\\.\\^)*)$/;\n\t if (relativeMatch.exec(uiViewContextAnchor)) {\n\t var anchor = uiViewContextAnchor.split(\".\").reduce((function (anchor, x) { return anchor.parent; }), context);\n\t uiViewContextAnchor = anchor.name;\n\t }\n\t return { uiViewName: uiViewName, uiViewContextAnchor: uiViewContextAnchor };\n\t };\n\t return ViewService;\n\t}());\n\texports.ViewService = ViewService;\n\n\n/***/ },\n/* 38 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/** @module state */ /** for typedoc */\n\t\"use strict\";\n\tvar stateMatcher_1 = __webpack_require__(39);\n\tvar stateBuilder_1 = __webpack_require__(40);\n\tvar stateQueueManager_1 = __webpack_require__(41);\n\tvar StateRegistry = (function () {\n\t function StateRegistry(urlMatcherFactory, urlRouterProvider) {\n\t this.states = {};\n\t this.matcher = new stateMatcher_1.StateMatcher(this.states);\n\t this.builder = new stateBuilder_1.StateBuilder(this.matcher, urlMatcherFactory);\n\t this.stateQueue = new stateQueueManager_1.StateQueueManager(this.states, this.builder, urlRouterProvider);\n\t var rootStateDef = {\n\t name: '',\n\t url: '^',\n\t views: null,\n\t params: {\n\t '#': { value: null, type: 'hash', dynamic: true }\n\t },\n\t abstract: true\n\t };\n\t var _root = this._root = this.stateQueue.register(rootStateDef);\n\t _root.navigable = null;\n\t }\n\t StateRegistry.prototype.root = function () {\n\t return this._root;\n\t };\n\t StateRegistry.prototype.register = function (stateDefinition) {\n\t return this.stateQueue.register(stateDefinition);\n\t };\n\t StateRegistry.prototype.get = function (stateOrName, base) {\n\t var _this = this;\n\t if (arguments.length === 0)\n\t return Object.keys(this.states).map(function (name) { return _this.states[name].self; });\n\t var found = this.matcher.find(stateOrName, base);\n\t return found && found.self || null;\n\t };\n\t StateRegistry.prototype.decorator = function (name, func) {\n\t return this.builder.builder(name, func);\n\t };\n\t return StateRegistry;\n\t}());\n\texports.StateRegistry = StateRegistry;\n\n\n/***/ },\n/* 39 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\t/** @module state */ /** for typedoc */\n\tvar predicates_1 = __webpack_require__(4);\n\tvar StateMatcher = (function () {\n\t function StateMatcher(_states) {\n\t this._states = _states;\n\t }\n\t StateMatcher.prototype.isRelative = function (stateName) {\n\t stateName = stateName || \"\";\n\t return stateName.indexOf(\".\") === 0 || stateName.indexOf(\"^\") === 0;\n\t };\n\t StateMatcher.prototype.find = function (stateOrName, base) {\n\t if (!stateOrName && stateOrName !== \"\")\n\t return undefined;\n\t var isStr = predicates_1.isString(stateOrName);\n\t var name = isStr ? stateOrName : stateOrName.name;\n\t if (this.isRelative(name))\n\t name = this.resolvePath(name, base);\n\t var state = this._states[name];\n\t if (state && (isStr || (!isStr && (state === stateOrName || state.self === stateOrName)))) {\n\t return state;\n\t }\n\t return undefined;\n\t };\n\t StateMatcher.prototype.resolvePath = function (name, base) {\n\t if (!base)\n\t throw new Error(\"No reference point given for path '\" + name + \"'\");\n\t var baseState = this.find(base);\n\t var splitName = name.split(\".\"), i = 0, pathLength = splitName.length, current = baseState;\n\t for (; i < pathLength; i++) {\n\t if (splitName[i] === \"\" && i === 0) {\n\t current = baseState;\n\t continue;\n\t }\n\t if (splitName[i] === \"^\") {\n\t if (!current.parent)\n\t throw new Error(\"Path '\" + name + \"' not valid for state '\" + baseState.name + \"'\");\n\t current = current.parent;\n\t continue;\n\t }\n\t break;\n\t }\n\t var relName = splitName.slice(i).join(\".\");\n\t return current.name + (current.name && relName ? \".\" : \"\") + relName;\n\t };\n\t return StateMatcher;\n\t}());\n\texports.StateMatcher = StateMatcher;\n\n\n/***/ },\n/* 40 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\t/** @module state */ /** for typedoc */\n\tvar common_1 = __webpack_require__(3);\n\tvar predicates_1 = __webpack_require__(4);\n\tvar strings_1 = __webpack_require__(9);\n\tvar hof_1 = __webpack_require__(5);\n\tvar param_1 = __webpack_require__(22);\n\tvar resolvable_1 = __webpack_require__(19);\n\tvar coreservices_1 = __webpack_require__(6);\n\tvar parseUrl = function (url) {\n\t if (!predicates_1.isString(url))\n\t return false;\n\t var root = url.charAt(0) === '^';\n\t return { val: root ? url.substring(1) : url, root: root };\n\t};\n\tfunction selfBuilder(state) {\n\t state.self.$$state = function () { return state; };\n\t return state.self;\n\t}\n\tfunction dataBuilder(state) {\n\t if (state.parent && state.parent.data) {\n\t state.data = state.self.data = common_1.inherit(state.parent.data, state.data);\n\t }\n\t return state.data;\n\t}\n\tvar getUrlBuilder = function ($urlMatcherFactoryProvider, root) {\n\t return function urlBuilder(state) {\n\t var stateDec = state;\n\t var parsed = parseUrl(stateDec.url), parent = state.parent;\n\t var url = !parsed ? stateDec.url : $urlMatcherFactoryProvider.compile(parsed.val, {\n\t params: state.params || {},\n\t paramMap: function (paramConfig, isSearch) {\n\t if (stateDec.reloadOnSearch === false && isSearch)\n\t paramConfig = common_1.extend(paramConfig || {}, { dynamic: true });\n\t return paramConfig;\n\t }\n\t });\n\t if (!url)\n\t return null;\n\t if (!$urlMatcherFactoryProvider.isMatcher(url))\n\t throw new Error(\"Invalid url '\" + url + \"' in state '\" + state + \"'\");\n\t return (parsed && parsed.root) ? url : ((parent && parent.navigable) || root()).url.append(url);\n\t };\n\t};\n\tvar getNavigableBuilder = function (isRoot) {\n\t return function navigableBuilder(state) {\n\t return !isRoot(state) && state.url ? state : (state.parent ? state.parent.navigable : null);\n\t };\n\t};\n\tfunction paramsBuilder(state) {\n\t var makeConfigParam = function (config, id) { return param_1.Param.fromConfig(id, null, config); };\n\t var urlParams = (state.url && state.url.parameters({ inherit: false })) || [];\n\t var nonUrlParams = common_1.values(common_1.map(common_1.omit(state.params || {}, urlParams.map(hof_1.prop('id'))), makeConfigParam));\n\t return urlParams.concat(nonUrlParams).map(function (p) { return [p.id, p]; }).reduce(common_1.applyPairs, {});\n\t}\n\tfunction pathBuilder(state) {\n\t return state.parent ? state.parent.path.concat(state) : [state];\n\t}\n\tfunction includesBuilder(state) {\n\t var includes = state.parent ? common_1.extend({}, state.parent.includes) : {};\n\t includes[state.name] = true;\n\t return includes;\n\t}\n\t/**\n\t * This is a [[StateBuilder.builder]] function for the `resolve:` block on a [[StateDeclaration]].\n\t *\n\t * When the [[StateBuilder]] builds a [[State]] object from a raw [[StateDeclaration]], this builder\n\t * validates the `resolve` property and converts it to a [[Resolvable]] array.\n\t *\n\t * resolve: input value can be:\n\t *\n\t * {\n\t * // analyzed but not injected\n\t * myFooResolve: function() { return \"myFooData\"; },\n\t *\n\t * // function.toString() parsed, \"DependencyName\" dep as string (not min-safe)\n\t * myBarResolve: function(DependencyName) { return DependencyName.fetchSomethingAsPromise() },\n\t *\n\t * // Array split; \"DependencyName\" dep as string\n\t * myBazResolve: [ \"DependencyName\", function(dep) { return dep.fetchSomethingAsPromise() },\n\t *\n\t * // Array split; DependencyType dep as token (compared using ===)\n\t * myQuxResolve: [ DependencyType, function(dep) { return dep.fetchSometingAsPromise() },\n\t *\n\t * // val.$inject used as deps\n\t * // where:\n\t * // corgeResolve.$inject = [\"DependencyName\"];\n\t * // function corgeResolve(dep) { dep.fetchSometingAsPromise() }\n\t * // then \"DependencyName\" dep as string\n\t * myCorgeResolve: corgeResolve,\n\t *\n\t * // inject service by name\n\t * // When a string is found, desugar creating a resolve that injects the named service\n\t * myGraultResolve: \"SomeService\"\n\t * }\n\t *\n\t * or:\n\t *\n\t * [\n\t * new Resolvable(\"myFooResolve\", function() { return \"myFooData\" }),\n\t * new Resolvable(\"myBarResolve\", function(dep) { return dep.fetchSomethingAsPromise() }, [ \"DependencyName\" ]),\n\t * { provide: \"myBazResolve\", useFactory: function(dep) { dep.fetchSomethingAsPromise() }, deps: [ \"DependencyName\" ] }\n\t * ]\n\t */\n\tfunction resolvablesBuilder(state) {\n\t /** convert a resolve: {} object to an array of tuples */\n\t var obj2Tuples = function (obj) { return Object.keys(obj || {}).map(function (token) { return ({ token: token, val: obj[token], deps: undefined }); }); };\n\t /** fetch DI annotations from a function or ng1-style array */\n\t var annotate = function (fn) { return fn.$inject || coreservices_1.services.$injector.annotate(fn, coreservices_1.services.$injector.strictDi); };\n\t /** true if the object has both `token` and `resolveFn`, and is probably a [[ResolveLiteral]] */\n\t var isResolveLiteral = function (obj) { return !!(obj.token && obj.resolveFn); };\n\t /** true if the object looks like a provide literal, or a ng2 Provider */\n\t var isLikeNg2Provider = function (obj) { return !!((obj.provide || obj.token) && (obj.useValue || obj.useFactory || obj.useExisting || obj.useClass)); };\n\t /** true if the object looks like a tuple from obj2Tuples */\n\t var isTupleFromObj = function (obj) { return !!(obj && obj.val && (predicates_1.isString(obj.val) || predicates_1.isArray(obj.val) || predicates_1.isFunction(obj.val))); };\n\t /** extracts the token from a Provider or provide literal */\n\t var token = function (p) { return p.provide || p.token; };\n\t /** Given a literal resolve or provider object, returns a Resolvable */\n\t var literal2Resolvable = hof_1.pattern([\n\t [hof_1.prop('resolveFn'), function (p) { return new resolvable_1.Resolvable(token(p), p.resolveFn, p.deps, p.policy); }],\n\t [hof_1.prop('useFactory'), function (p) { return new resolvable_1.Resolvable(token(p), p.useFactory, (p.deps || p.dependencies), p.policy); }],\n\t [hof_1.prop('useClass'), function (p) { return new resolvable_1.Resolvable(token(p), function () { return new p.useClass(); }, [], p.policy); }],\n\t [hof_1.prop('useValue'), function (p) { return new resolvable_1.Resolvable(token(p), function () { return p.useValue; }, [], p.policy, p.useValue); }],\n\t [hof_1.prop('useExisting'), function (p) { return new resolvable_1.Resolvable(token(p), function (x) { return x; }, [p.useExisting], p.policy); }],\n\t ]);\n\t var tuple2Resolvable = hof_1.pattern([\n\t [hof_1.pipe(hof_1.prop(\"val\"), predicates_1.isString), function (tuple) { return new resolvable_1.Resolvable(tuple.token, function (x) { return x; }, [tuple.val], tuple.policy); }],\n\t [hof_1.pipe(hof_1.prop(\"val\"), predicates_1.isArray), function (tuple) { return new resolvable_1.Resolvable(tuple.token, common_1.tail(tuple.val), tuple.val.slice(0, -1), tuple.policy); }],\n\t [hof_1.pipe(hof_1.prop(\"val\"), predicates_1.isFunction), function (tuple) { return new resolvable_1.Resolvable(tuple.token, tuple.val, annotate(tuple.val), tuple.policy); }],\n\t ]);\n\t var item2Resolvable = hof_1.pattern([\n\t [hof_1.is(resolvable_1.Resolvable), function (r) { return r; }],\n\t [isResolveLiteral, literal2Resolvable],\n\t [isLikeNg2Provider, literal2Resolvable],\n\t [isTupleFromObj, tuple2Resolvable],\n\t [hof_1.val(true), function (tuple) { throw new Error(\"Invalid resolve value: \" + strings_1.stringify(tuple)); }]\n\t ]);\n\t // If resolveBlock is already an array, use it as-is.\n\t // Otherwise, assume it's an object and convert to an Array of tuples\n\t var decl = state.resolve;\n\t var items = predicates_1.isArray(decl) ? decl : obj2Tuples(decl);\n\t return items.map(item2Resolvable);\n\t}\n\texports.resolvablesBuilder = resolvablesBuilder;\n\t/**\n\t * @internalapi A internal global service\n\t *\n\t * StateBuilder is a factory for the internal [[State]] objects.\n\t *\n\t * When you register a state with the [[StateRegistry]], you register a plain old javascript object which\n\t * conforms to the [[StateDeclaration]] interface. This factory takes that object and builds the corresponding\n\t * [[State]] object, which has an API and is used internally.\n\t *\n\t * Custom properties or API may be added to the internal [[State]] object by registering a decorator function\n\t * using the [[builder]] method.\n\t */\n\tvar StateBuilder = (function () {\n\t function StateBuilder(matcher, $urlMatcherFactoryProvider) {\n\t this.matcher = matcher;\n\t var self = this;\n\t var root = function () { return matcher.find(\"\"); };\n\t var isRoot = function (state) { return state.name === \"\"; };\n\t function parentBuilder(state) {\n\t if (isRoot(state))\n\t return null;\n\t return matcher.find(self.parentName(state)) || root();\n\t }\n\t this.builders = {\n\t self: [selfBuilder],\n\t parent: [parentBuilder],\n\t data: [dataBuilder],\n\t // Build a URLMatcher if necessary, either via a relative or absolute URL\n\t url: [getUrlBuilder($urlMatcherFactoryProvider, root)],\n\t // Keep track of the closest ancestor state that has a URL (i.e. is navigable)\n\t navigable: [getNavigableBuilder(isRoot)],\n\t params: [paramsBuilder],\n\t // Each framework-specific ui-router implementation should define its own `views` builder\n\t // e.g., src/ng1/statebuilders/views.ts\n\t views: [],\n\t // Keep a full path from the root down to this state as this is needed for state activation.\n\t path: [pathBuilder],\n\t // Speed up $state.includes() as it's used a lot\n\t includes: [includesBuilder],\n\t resolvables: [resolvablesBuilder]\n\t };\n\t }\n\t /**\n\t * Registers a [[BuilderFunction]] for a specific [[State]] property (e.g., `parent`, `url`, or `path`).\n\t * More than one BuilderFunction can be registered for a given property.\n\t *\n\t * The BuilderFunction(s) will be used to define the property on any subsequently built [[State]] objects.\n\t *\n\t * @param name The name of the State property being registered for.\n\t * @param fn The BuilderFunction which will be used to build the State property\n\t * @returns a function which deregisters the BuilderFunction\n\t */\n\t StateBuilder.prototype.builder = function (name, fn) {\n\t var builders = this.builders;\n\t var array = builders[name] || [];\n\t // Backwards compat: if only one builder exists, return it, else return whole arary.\n\t if (predicates_1.isString(name) && !predicates_1.isDefined(fn))\n\t return array.length > 1 ? array : array[0];\n\t if (!predicates_1.isString(name) || !predicates_1.isFunction(fn))\n\t return;\n\t builders[name] = array;\n\t builders[name].push(fn);\n\t return function () { return builders[name].splice(builders[name].indexOf(fn, 1)) && null; };\n\t };\n\t /**\n\t * Builds all of the properties on an essentially blank State object, returning a State object which has all its\n\t * properties and API built.\n\t *\n\t * @param state an uninitialized State object\n\t * @returns the built State object\n\t */\n\t StateBuilder.prototype.build = function (state) {\n\t var _a = this, matcher = _a.matcher, builders = _a.builders;\n\t var parent = this.parentName(state);\n\t if (parent && !matcher.find(parent))\n\t return null;\n\t for (var key in builders) {\n\t if (!builders.hasOwnProperty(key))\n\t continue;\n\t var chain = builders[key].reduce(function (parentFn, step) { return function (_state) { return step(_state, parentFn); }; }, common_1.noop);\n\t state[key] = chain(state);\n\t }\n\t return state;\n\t };\n\t StateBuilder.prototype.parentName = function (state) {\n\t var name = state.name || \"\";\n\t if (name.indexOf('.') !== -1)\n\t return name.substring(0, name.lastIndexOf('.'));\n\t if (!state.parent)\n\t return \"\";\n\t return predicates_1.isString(state.parent) ? state.parent : state.parent.name;\n\t };\n\t StateBuilder.prototype.name = function (state) {\n\t var name = state.name;\n\t if (name.indexOf('.') !== -1 || !state.parent)\n\t return name;\n\t var parentName = predicates_1.isString(state.parent) ? state.parent : state.parent.name;\n\t return parentName ? parentName + \".\" + name : name;\n\t };\n\t return StateBuilder;\n\t}());\n\texports.StateBuilder = StateBuilder;\n\n\n/***/ },\n/* 41 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\t/** @module state */ /** for typedoc */\n\tvar common_1 = __webpack_require__(3);\n\tvar predicates_1 = __webpack_require__(4);\n\tvar stateObject_1 = __webpack_require__(42);\n\tvar StateQueueManager = (function () {\n\t function StateQueueManager(states, builder, $urlRouterProvider) {\n\t this.states = states;\n\t this.builder = builder;\n\t this.$urlRouterProvider = $urlRouterProvider;\n\t this.queue = [];\n\t }\n\t StateQueueManager.prototype.register = function (config) {\n\t var _a = this, states = _a.states, queue = _a.queue, $state = _a.$state;\n\t // Wrap a new object around the state so we can store our private details easily.\n\t // @TODO: state = new State(extend({}, config, { ... }))\n\t var state = common_1.inherit(new stateObject_1.State(), common_1.extend({}, config, {\n\t self: config,\n\t resolve: config.resolve || [],\n\t toString: function () { return config.name; }\n\t }));\n\t if (!predicates_1.isString(state.name))\n\t throw new Error(\"State must have a valid name\");\n\t if (states.hasOwnProperty(state.name) || common_1.pluck(queue, 'name').indexOf(state.name) !== -1)\n\t throw new Error(\"State '\" + state.name + \"' is already defined\");\n\t queue.push(state);\n\t if (this.$state) {\n\t this.flush($state);\n\t }\n\t return state;\n\t };\n\t StateQueueManager.prototype.flush = function ($state) {\n\t var _a = this, queue = _a.queue, states = _a.states, builder = _a.builder;\n\t var result, state, orphans = [], orphanIdx, previousQueueLength = {};\n\t while (queue.length > 0) {\n\t state = queue.shift();\n\t result = builder.build(state);\n\t orphanIdx = orphans.indexOf(state);\n\t if (result) {\n\t if (states.hasOwnProperty(state.name))\n\t throw new Error(\"State '\" + name + \"' is already defined\");\n\t states[state.name] = state;\n\t this.attachRoute($state, state);\n\t if (orphanIdx >= 0)\n\t orphans.splice(orphanIdx, 1);\n\t continue;\n\t }\n\t var prev = previousQueueLength[state.name];\n\t previousQueueLength[state.name] = queue.length;\n\t if (orphanIdx >= 0 && prev === queue.length) {\n\t // Wait until two consecutive iterations where no additional states were dequeued successfully.\n\t // throw new Error(`Cannot register orphaned state '${state.name}'`);\n\t return states;\n\t }\n\t else if (orphanIdx < 0) {\n\t orphans.push(state);\n\t }\n\t queue.push(state);\n\t }\n\t return states;\n\t };\n\t StateQueueManager.prototype.autoFlush = function ($state) {\n\t this.$state = $state;\n\t this.flush($state);\n\t };\n\t StateQueueManager.prototype.attachRoute = function ($state, state) {\n\t var $urlRouterProvider = this.$urlRouterProvider;\n\t if (state[common_1.abstractKey] || !state.url)\n\t return;\n\t $urlRouterProvider.when(state.url, ['$match', '$stateParams', function ($match, $stateParams) {\n\t if ($state.$current.navigable !== state || !common_1.equalForKeys($match, $stateParams)) {\n\t $state.transitionTo(state, $match, { inherit: true, location: false });\n\t }\n\t }]);\n\t };\n\t return StateQueueManager;\n\t}());\n\texports.StateQueueManager = StateQueueManager;\n\n\n/***/ },\n/* 42 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/** @module state */ /** for typedoc */\n\t\"use strict\";\n\tvar common_1 = __webpack_require__(3);\n\tvar hof_1 = __webpack_require__(5);\n\t/**\n\t * @ngdoc object\n\t * @name ui.router.state.type:State\n\t *\n\t * @description\n\t * Definition object for states. Includes methods for manipulating the state heirarchy.\n\t *\n\t * @param {Object} config A configuration object hash that includes the results of user-supplied\n\t * values, as well as values from `StateBuilder`.\n\t *\n\t * @returns {Object} Returns a new `State` object.\n\t */\n\tvar State = (function () {\n\t function State(config) {\n\t common_1.extend(this, config);\n\t // Object.freeze(this);\n\t }\n\t /**\n\t * @ngdoc function\n\t * @name ui.router.state.type:State#is\n\t * @methodOf ui.router.state.type:State\n\t *\n\t * @description\n\t * Compares the identity of the state against the passed value, which is either an object\n\t * reference to the actual `State` instance, the original definition object passed to\n\t * `$stateProvider.state()`, or the fully-qualified name.\n\t *\n\t * @param {Object} ref Can be one of (a) a `State` instance, (b) an object that was passed\n\t * into `$stateProvider.state()`, (c) the fully-qualified name of a state as a string.\n\t * @returns {boolean} Returns `true` if `ref` matches the current `State` instance.\n\t */\n\t State.prototype.is = function (ref) {\n\t return this === ref || this.self === ref || this.fqn() === ref;\n\t };\n\t /**\n\t * @ngdoc function\n\t * @name ui.router.state.type:State#fqn\n\t * @methodOf ui.router.state.type:State\n\t *\n\t * @description\n\t * Returns the fully-qualified name of the state, based on its current position in the tree.\n\t *\n\t * @returns {string} Returns a dot-separated name of the state.\n\t */\n\t State.prototype.fqn = function () {\n\t if (!this.parent || !(this.parent instanceof this.constructor))\n\t return this.name;\n\t var name = this.parent.fqn();\n\t return name ? name + \".\" + this.name : this.name;\n\t };\n\t /**\n\t * @ngdoc function\n\t * @name ui.router.state.type:State#root\n\t * @methodOf ui.router.state.type:State\n\t *\n\t * @description\n\t * Returns the root node of this state's tree.\n\t *\n\t * @returns {State} The root of this state's tree.\n\t */\n\t State.prototype.root = function () {\n\t return this.parent && this.parent.root() || this;\n\t };\n\t State.prototype.parameters = function (opts) {\n\t opts = common_1.defaults(opts, { inherit: true });\n\t var inherited = opts.inherit && this.parent && this.parent.parameters() || [];\n\t return inherited.concat(common_1.values(this.params));\n\t };\n\t State.prototype.parameter = function (id, opts) {\n\t if (opts === void 0) { opts = {}; }\n\t return (this.url && this.url.parameter(id, opts) ||\n\t common_1.find(common_1.values(this.params), hof_1.propEq('id', id)) ||\n\t opts.inherit && this.parent && this.parent.parameter(id));\n\t };\n\t State.prototype.toString = function () {\n\t return this.fqn();\n\t };\n\t return State;\n\t}());\n\texports.State = State;\n\n\n/***/ },\n/* 43 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\t/** @module state */ /** */\n\tvar common_1 = __webpack_require__(3);\n\tvar predicates_1 = __webpack_require__(4);\n\tvar queue_1 = __webpack_require__(8);\n\tvar coreservices_1 = __webpack_require__(6);\n\tvar pathFactory_1 = __webpack_require__(20);\n\tvar node_1 = __webpack_require__(21);\n\tvar transitionService_1 = __webpack_require__(31);\n\tvar rejectFactory_1 = __webpack_require__(10);\n\tvar targetState_1 = __webpack_require__(14);\n\tvar param_1 = __webpack_require__(22);\n\tvar glob_1 = __webpack_require__(7);\n\tvar common_2 = __webpack_require__(3);\n\tvar common_3 = __webpack_require__(3);\n\tvar StateService = (function () {\n\t /** @hidden */\n\t function StateService(router) {\n\t this.router = router;\n\t /** @hidden */\n\t this._defaultErrorHandler = function $defaultErrorHandler($error$) {\n\t if ($error$ instanceof Error && $error$.stack) {\n\t console.error($error$.stack);\n\t }\n\t else if ($error$ instanceof rejectFactory_1.Rejection) {\n\t console.error($error$);\n\t if ($error$.detail && $error$.detail.stack)\n\t console.error($error$.detail.stack);\n\t }\n\t else {\n\t console.error($error$);\n\t }\n\t };\n\t var getters = ['current', '$current', 'params', 'transition'];\n\t var boundFns = Object.keys(StateService.prototype).filter(function (key) { return getters.indexOf(key) === -1; });\n\t common_3.bindFunctions(StateService.prototype, this, this, boundFns);\n\t }\n\t Object.defineProperty(StateService.prototype, \"transition\", {\n\t get: function () { return this.router.globals.transition; },\n\t enumerable: true,\n\t configurable: true\n\t });\n\t Object.defineProperty(StateService.prototype, \"params\", {\n\t get: function () { return this.router.globals.params; },\n\t enumerable: true,\n\t configurable: true\n\t });\n\t Object.defineProperty(StateService.prototype, \"current\", {\n\t get: function () { return this.router.globals.current; },\n\t enumerable: true,\n\t configurable: true\n\t });\n\t Object.defineProperty(StateService.prototype, \"$current\", {\n\t get: function () { return this.router.globals.$current; },\n\t enumerable: true,\n\t configurable: true\n\t });\n\t /**\n\t * Handler for when [[transitionTo]] is called with an invalid state.\n\t *\n\t * Invokes the [[onInvalid]] callbacks, in natural order.\n\t * Each callback's return value is checked in sequence until one of them returns an instance of TargetState.\n\t * The results of the callbacks are wrapped in $q.when(), so the callbacks may return promises.\n\t *\n\t * If a callback returns an TargetState, then it is used as arguments to $state.transitionTo() and the result returned.\n\t */\n\t StateService.prototype._handleInvalidTargetState = function (fromPath, $to$) {\n\t var _this = this;\n\t var globals = this.router.globals;\n\t var latestThing = function () { return globals.transitionHistory.peekTail(); };\n\t var latest = latestThing();\n\t var $from$ = pathFactory_1.PathFactory.makeTargetState(fromPath);\n\t var callbackQueue = new queue_1.Queue([].concat(this.router.stateProvider.invalidCallbacks));\n\t var $q = coreservices_1.services.$q, $injector = coreservices_1.services.$injector;\n\t var invokeCallback = function (callback) { return $q.when($injector.invoke(callback, null, { $to$: $to$, $from$: $from$ })); };\n\t var checkForRedirect = function (result) {\n\t if (!(result instanceof targetState_1.TargetState)) {\n\t return;\n\t }\n\t var target = result;\n\t // Recreate the TargetState, in case the state is now defined.\n\t target = _this.target(target.identifier(), target.params(), target.options());\n\t if (!target.valid())\n\t return rejectFactory_1.Rejection.invalid(target.error()).toPromise();\n\t if (latestThing() !== latest)\n\t return rejectFactory_1.Rejection.superseded().toPromise();\n\t return _this.transitionTo(target.identifier(), target.params(), target.options());\n\t };\n\t function invokeNextCallback() {\n\t var nextCallback = callbackQueue.dequeue();\n\t if (nextCallback === undefined)\n\t return rejectFactory_1.Rejection.invalid($to$.error()).toPromise();\n\t return invokeCallback(nextCallback).then(checkForRedirect).then(function (result) { return result || invokeNextCallback(); });\n\t }\n\t return invokeNextCallback();\n\t };\n\t /**\n\t * @ngdoc function\n\t * @name ui.router.state.$state#reload\n\t * @methodOf ui.router.state.$state\n\t *\n\t * @description\n\t * A method that force reloads the current state, or a partial state hierarchy. All resolves are re-resolved,\n\t * controllers reinstantiated, and events re-fired.\n\t *\n\t * @example\n\t * \n\t * let app angular.module('app', ['ui.router']);\n\t *\n\t * app.controller('ctrl', function ($scope, $state) {\n\t * $scope.reload = function(){\n\t * $state.reload();\n\t * }\n\t * });\n\t *
\n\t *\n\t * `reload()` is just an alias for:\n\t * \n\t * $state.transitionTo($state.current, $stateParams, {\n\t * reload: true, inherit: false, notify: true\n\t * });\n\t *
\n\t *\n\t * @param {string=|object=} reloadState - A state name or a state object, which is the root of the resolves to be re-resolved.\n\t * @example\n\t * \n\t * //assuming app application consists of 3 states: 'contacts', 'contacts.detail', 'contacts.detail.item'\n\t * //and current state is 'contacts.detail.item'\n\t * let app angular.module('app', ['ui.router']);\n\t *\n\t * app.controller('ctrl', function ($scope, $state) {\n\t * $scope.reload = function(){\n\t * //will reload 'contact.detail' and nested 'contact.detail.item' states\n\t * $state.reload('contact.detail');\n\t * }\n\t * });\n\t *
\n\t *\n\t * @returns {promise} A promise representing the state of the new transition. See\n\t * {@link ui.router.state.$state#methods_go $state.go}.\n\t */\n\t StateService.prototype.reload = function (reloadState) {\n\t return this.transitionTo(this.current, this.params, {\n\t reload: predicates_1.isDefined(reloadState) ? reloadState : true,\n\t inherit: false,\n\t notify: false\n\t });\n\t };\n\t ;\n\t /**\n\t * @ngdoc function\n\t * @name ui.router.state.$state#go\n\t * @methodOf ui.router.state.$state\n\t *\n\t * @description\n\t * Convenience method for transitioning to a new state. `$state.go` calls\n\t * `$state.transitionTo` internally but automatically sets options to\n\t * `{ location: true, inherit: true, relative: $state.$current, notify: true }`.\n\t * This allows you to easily use an absolute or relative to path and specify\n\t * only the parameters you'd like to update (while letting unspecified parameters\n\t * inherit from the currently active ancestor states).\n\t *\n\t * @example\n\t * \n\t * let app = angular.module('app', ['ui.router']);\n\t *\n\t * app.controller('ctrl', function ($scope, $state) {\n\t * $scope.changeState = function () {\n\t * $state.go('contact.detail');\n\t * };\n\t * });\n\t *
\n\t *
\n\t *\n\t * @param {string} to Absolute state name or relative state path. Some examples:\n\t *\n\t * - `$state.go('contact.detail')` - will go to the `contact.detail` state\n\t * - `$state.go('^')` - will go to a parent state\n\t * - `$state.go('^.sibling')` - will go to a sibling state\n\t * - `$state.go('.child.grandchild')` - will go to grandchild state\n\t *\n\t * @param {object=} params A map of the parameters that will be sent to the state,\n\t * will populate $stateParams. Any parameters that are not specified will be inherited from currently\n\t * defined parameters. This allows, for example, going to a sibling state that shares parameters\n\t * specified in a parent state. Parameter inheritance only works between common ancestor states, I.e.\n\t * transitioning to a sibling will get you the parameters for all parents, transitioning to a child\n\t * will get you all current parameters, etc.\n\t * @param {object=} options Options object. The options are:\n\t *\n\t * - **`location`** - {boolean=true|string=} - If `true` will update the url in the location bar, if `false`\n\t * will not. If string, must be `\"replace\"`, which will update url and also replace last history record.\n\t * - **`inherit`** - {boolean=true}, If `true` will inherit url parameters from current url.\n\t * - **`relative`** - {object=$state.$current}, When transitioning with relative path (e.g '^'),\n\t * defines which state to be relative from.\n\t * - **`notify`** - {boolean=true}, If `true` will broadcast $stateChangeStart and $stateChangeSuccess events.\n\t * - **`reload`** (v0.2.5) - {boolean=false}, If `true` will force transition even if the state or params\n\t * have not changed, aka a reload of the same state. It differs from reloadOnSearch because you'd\n\t * use this when you want to force a reload when *everything* is the same, including search params.\n\t *\n\t * @returns {promise} A promise representing the state of the new transition.\n\t *\n\t * Possible success values:\n\t *\n\t * - $state.current\n\t *\n\t *
Possible rejection values:\n\t *\n\t * - 'transition superseded' - when a newer transition has been started after this one\n\t * - 'transition prevented' - when `event.preventDefault()` has been called in a `$stateChangeStart` listener\n\t * - 'transition aborted' - when `event.preventDefault()` has been called in a `$stateNotFound` listener or\n\t * when a `$stateNotFound` `event.retry` promise errors.\n\t * - 'transition failed' - when a state has been unsuccessfully found after 2 tries.\n\t * - *resolve error* - when an error has occurred with a `resolve`\n\t *\n\t */\n\t StateService.prototype.go = function (to, params, options) {\n\t var defautGoOpts = { relative: this.$current, inherit: true };\n\t var transOpts = common_1.defaults(options, defautGoOpts, transitionService_1.defaultTransOpts);\n\t return this.transitionTo(to, params, transOpts);\n\t };\n\t ;\n\t /** Factory method for creating a TargetState */\n\t StateService.prototype.target = function (identifier, params, options) {\n\t if (options === void 0) { options = {}; }\n\t // If we're reloading, find the state object to reload from\n\t if (predicates_1.isObject(options.reload) && !options.reload.name)\n\t throw new Error('Invalid reload state object');\n\t var reg = this.router.stateRegistry;\n\t options.reloadState = options.reload === true ? reg.root() : reg.matcher.find(options.reload, options.relative);\n\t if (options.reload && !options.reloadState)\n\t throw new Error(\"No such reload state '\" + (predicates_1.isString(options.reload) ? options.reload : options.reload.name) + \"'\");\n\t var stateDefinition = reg.matcher.find(identifier, options.relative);\n\t return new targetState_1.TargetState(identifier, stateDefinition, params, options);\n\t };\n\t ;\n\t /**\n\t * @ngdoc function\n\t * @name ui.router.state.$state#transitionTo\n\t * @methodOf ui.router.state.$state\n\t *\n\t * @description\n\t * Low-level method for transitioning to a new state. {@link ui.router.state.$state#methods_go $state.go}\n\t * uses `transitionTo` internally. `$state.go` is recommended in most situations.\n\t *\n\t * @example\n\t * \n\t * let app = angular.module('app', ['ui.router']);\n\t *\n\t * app.controller('ctrl', function ($scope, $state) {\n\t * $scope.changeState = function () {\n\t * $state.transitionTo('contact.detail');\n\t * };\n\t * });\n\t *
\n\t *\n\t * @param {string} to State name.\n\t * @param {object=} toParams A map of the parameters that will be sent to the state,\n\t * will populate $stateParams.\n\t * @param {object=} options Options object. The options are:\n\t *\n\t * - **`location`** - {boolean=true|string=} - If `true` will update the url in the location bar, if `false`\n\t * will not. If string, must be `\"replace\"`, which will update url and also replace last history record.\n\t * - **`inherit`** - {boolean=false}, If `true` will inherit url parameters from current url.\n\t * - **`relative`** - {object=}, When transitioning with relative path (e.g '^'),\n\t * defines which state to be relative from.\n\t * - **`notify`** - {boolean=true}, If `true` will broadcast $stateChangeStart and $stateChangeSuccess events.\n\t * - **`reload`** (v0.2.5) - {boolean=false}, If `true` will force transition even if the state or params\n\t * have not changed, aka a reload of the same state. It differs from reloadOnSearch because you'd\n\t * use this when you want to force a reload when *everything* is the same, including search params.\n\t *\n\t * @returns {promise} A promise representing the state of the new transition. See\n\t * {@link ui.router.state.$state#methods_go $state.go}.\n\t */\n\t StateService.prototype.transitionTo = function (to, toParams, options) {\n\t var _this = this;\n\t if (toParams === void 0) { toParams = {}; }\n\t if (options === void 0) { options = {}; }\n\t var router = this.router;\n\t var globals = router.globals;\n\t var transHistory = globals.transitionHistory;\n\t options = common_1.defaults(options, transitionService_1.defaultTransOpts);\n\t options = common_1.extend(options, { current: transHistory.peekTail.bind(transHistory) });\n\t var ref = this.target(to, toParams, options);\n\t var latestSuccess = globals.successfulTransitions.peekTail();\n\t var rootPath = function () { return [new node_1.PathNode(_this.router.stateRegistry.root())]; };\n\t var currentPath = latestSuccess ? latestSuccess.treeChanges().to : rootPath();\n\t if (!ref.exists())\n\t return this._handleInvalidTargetState(currentPath, ref);\n\t if (!ref.valid())\n\t return common_1.silentRejection(ref.error());\n\t /**\n\t * Special handling for Ignored, Aborted, and Redirected transitions\n\t *\n\t * The semantics for the transition.run() promise and the StateService.transitionTo()\n\t * promise differ. For instance, the run() promise may be rejected because it was\n\t * IGNORED, but the transitionTo() promise is resolved because from the user perspective\n\t * no error occurred. Likewise, the transition.run() promise may be rejected because of\n\t * a Redirect, but the transitionTo() promise is chained to the new Transition's promise.\n\t */\n\t var rejectedTransitionHandler = function (transition) { return function (error) {\n\t if (error instanceof rejectFactory_1.Rejection) {\n\t if (error.type === rejectFactory_1.RejectType.IGNORED) {\n\t router.urlRouter.update();\n\t return globals.current;\n\t }\n\t if (error.type === rejectFactory_1.RejectType.SUPERSEDED && error.redirected && error.detail instanceof targetState_1.TargetState) {\n\t var redirect = transition.redirect(error.detail);\n\t return redirect.run().catch(rejectedTransitionHandler(redirect));\n\t }\n\t if (error.type === rejectFactory_1.RejectType.ABORTED) {\n\t router.urlRouter.update();\n\t return coreservices_1.services.$q.reject(error);\n\t }\n\t }\n\t var errorHandler = _this.defaultErrorHandler();\n\t errorHandler(error);\n\t return coreservices_1.services.$q.reject(error);\n\t }; };\n\t var transition = this.router.transitionService.create(currentPath, ref);\n\t var transitionToPromise = transition.run().catch(rejectedTransitionHandler(transition));\n\t common_1.silenceUncaughtInPromise(transitionToPromise); // issue #2676\n\t // Return a promise for the transition, which also has the transition object on it.\n\t return common_1.extend(transitionToPromise, { transition: transition });\n\t };\n\t ;\n\t /**\n\t * @ngdoc function\n\t * @name ui.router.state.$state#is\n\t * @methodOf ui.router.state.$state\n\t *\n\t * @description\n\t * Similar to {@link ui.router.state.$state#methods_includes $state.includes},\n\t * but only checks for the full state name. If params is supplied then it will be\n\t * tested for strict equality against the current active params object, so all params\n\t * must match with none missing and no extras.\n\t *\n\t * @example\n\t * \n\t * $state.$current.name = 'contacts.details.item';\n\t *\n\t * // absolute name\n\t * $state.is('contact.details.item'); // returns true\n\t * $state.is(contactDetailItemStateObject); // returns true\n\t *\n\t * // relative name (. and ^), typically from a template\n\t * // E.g. from the 'contacts.details' template\n\t * Item
\n\t *
\n\t *\n\t * @param {string|object} stateOrName The state name (absolute or relative) or state object you'd like to check.\n\t * @param {object=} params A param object, e.g. `{sectionId: section.id}`, that you'd like\n\t * to test against the current active state.\n\t * @param {object=} options An options object. The options are:\n\t *\n\t * - **`relative`** - {string|object} - If `stateOrName` is a relative state name and `options.relative` is set, .is will\n\t * test relative to `options.relative` state (or name).\n\t *\n\t * @returns {boolean} Returns true if it is the state.\n\t */\n\t StateService.prototype.is = function (stateOrName, params, options) {\n\t options = common_1.defaults(options, { relative: this.$current });\n\t var state = this.router.stateRegistry.matcher.find(stateOrName, options.relative);\n\t if (!predicates_1.isDefined(state))\n\t return undefined;\n\t if (this.$current !== state)\n\t return false;\n\t return predicates_1.isDefined(params) && params !== null ? param_1.Param.equals(state.parameters(), this.params, params) : true;\n\t };\n\t ;\n\t /**\n\t * @ngdoc function\n\t * @name ui.router.state.$state#includes\n\t * @methodOf ui.router.state.$state\n\t *\n\t * @description\n\t * A method to determine if the current active state is equal to or is the child of the\n\t * state stateName. If any params are passed then they will be tested for a match as well.\n\t * Not all the parameters need to be passed, just the ones you'd like to test for equality.\n\t *\n\t * @example\n\t * Partial and relative names\n\t * \n\t * $state.$current.name = 'contacts.details.item';\n\t *\n\t * // Using partial names\n\t * $state.includes(\"contacts\"); // returns true\n\t * $state.includes(\"contacts.details\"); // returns true\n\t * $state.includes(\"contacts.details.item\"); // returns true\n\t * $state.includes(\"contacts.list\"); // returns false\n\t * $state.includes(\"about\"); // returns false\n\t *\n\t * // Using relative names (. and ^), typically from a template\n\t * // E.g. from the 'contacts.details' template\n\t * Item
\n\t *
\n\t *\n\t * Basic globbing patterns\n\t * \n\t * $state.$current.name = 'contacts.details.item.url';\n\t *\n\t * $state.includes(\"*.details.*.*\"); // returns true\n\t * $state.includes(\"*.details.**\"); // returns true\n\t * $state.includes(\"**.item.**\"); // returns true\n\t * $state.includes(\"*.details.item.url\"); // returns true\n\t * $state.includes(\"*.details.*.url\"); // returns true\n\t * $state.includes(\"*.details.*\"); // returns false\n\t * $state.includes(\"item.**\"); // returns false\n\t *
\n\t *\n\t * @param {string} stateOrName A partial name, relative name, or glob pattern\n\t * to be searched for within the current state name.\n\t * @param {object=} params A param object, e.g. `{sectionId: section.id}`,\n\t * that you'd like to test against the current active state.\n\t * @param {object=} options An options object. The options are:\n\t *\n\t * - **`relative`** - {string|object=} - If `stateOrName` is a relative state reference and `options.relative` is set,\n\t * .includes will test relative to `options.relative` state (or name).\n\t *\n\t * @returns {boolean} Returns true if it does include the state\n\t */\n\t StateService.prototype.includes = function (stateOrName, params, options) {\n\t options = common_1.defaults(options, { relative: this.$current });\n\t var glob = predicates_1.isString(stateOrName) && glob_1.Glob.fromString(stateOrName);\n\t if (glob) {\n\t if (!glob.matches(this.$current.name))\n\t return false;\n\t stateOrName = this.$current.name;\n\t }\n\t var state = this.router.stateRegistry.matcher.find(stateOrName, options.relative), include = this.$current.includes;\n\t if (!predicates_1.isDefined(state))\n\t return undefined;\n\t if (!predicates_1.isDefined(include[state.name]))\n\t return false;\n\t // @TODO Replace with Param.equals() ?\n\t return params ? common_2.equalForKeys(param_1.Param.values(state.parameters(), params), this.params, Object.keys(params)) : true;\n\t };\n\t ;\n\t /**\n\t * @ngdoc function\n\t * @name ui.router.state.$state#href\n\t * @methodOf ui.router.state.$state\n\t *\n\t * @description\n\t * A url generation method that returns the compiled url for the given state populated with the given params.\n\t *\n\t * @example\n\t * \n\t * expect($state.href(\"about.person\", { person: \"bob\" })).toEqual(\"/about/bob\");\n\t *
\n\t *\n\t * @param {string|object} stateOrName The state name or state object you'd like to generate a url from.\n\t * @param {object=} params An object of parameter values to fill the state's required parameters.\n\t * @param {object=} options Options object. The options are:\n\t *\n\t * - **`lossy`** - {boolean=true} - If true, and if there is no url associated with the state provided in the\n\t * first parameter, then the constructed href url will be built from the first navigable ancestor (aka\n\t * ancestor with a valid url).\n\t * - **`inherit`** - {boolean=true}, If `true` will inherit url parameters from current url.\n\t * - **`relative`** - {object=$state.$current}, When transitioning with relative path (e.g '^'),\n\t * defines which state to be relative from.\n\t * - **`absolute`** - {boolean=false}, If true will generate an absolute url, e.g. \"http://www.example.com/fullurl\".\n\t *\n\t * @returns {string} compiled state url\n\t */\n\t StateService.prototype.href = function (stateOrName, params, options) {\n\t var defaultHrefOpts = {\n\t lossy: true,\n\t inherit: true,\n\t absolute: false,\n\t relative: this.$current\n\t };\n\t options = common_1.defaults(options, defaultHrefOpts);\n\t var state = this.router.stateRegistry.matcher.find(stateOrName, options.relative);\n\t if (!predicates_1.isDefined(state))\n\t return null;\n\t if (options.inherit)\n\t params = this.params.$inherit(params || {}, this.$current, state);\n\t var nav = (state && options.lossy) ? state.navigable : state;\n\t if (!nav || nav.url === undefined || nav.url === null) {\n\t return null;\n\t }\n\t return this.router.urlRouter.href(nav.url, param_1.Param.values(state.parameters(), params), {\n\t absolute: options.absolute\n\t });\n\t };\n\t ;\n\t /**\n\t * Sets or gets the default [[transitionTo]] error handler.\n\t *\n\t * The error handler is called when a [[Transition]] is rejected or when any error occurred during the Transition.\n\t * This includes errors caused by resolves and transition hooks.\n\t *\n\t * The built-in default error handler logs the error to the console.\n\t *\n\t * You can provide your own custom handler.\n\t *\n\t * @example\n\t * ```js\n\t *\n\t * stateService.defaultErrorHandler(function() {\n\t * // Do not log transitionTo errors\n\t * });\n\t * ```\n\t *\n\t * @param handler a global error handler function\n\t * @returns the current global error handler\n\t */\n\t StateService.prototype.defaultErrorHandler = function (handler) {\n\t return this._defaultErrorHandler = handler || this._defaultErrorHandler;\n\t };\n\t StateService.prototype.get = function (stateOrName, base) {\n\t var reg = this.router.stateRegistry;\n\t if (arguments.length === 0)\n\t return reg.get();\n\t return reg.get(stateOrName, base || this.$current);\n\t };\n\t return StateService;\n\t}());\n\texports.StateService = StateService;\n\n\n/***/ },\n/* 44 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\t/** @module core */ /** */\n\tvar stateParams_1 = __webpack_require__(45);\n\tvar queue_1 = __webpack_require__(8);\n\tvar common_1 = __webpack_require__(3);\n\t/**\n\t * Global mutable state\n\t */\n\tvar Globals = (function () {\n\t function Globals(transitionService) {\n\t var _this = this;\n\t this.params = new stateParams_1.StateParams();\n\t this.transitionHistory = new queue_1.Queue([], 1);\n\t this.successfulTransitions = new queue_1.Queue([], 1);\n\t var beforeNewTransition = function ($transition$) {\n\t _this.transition = $transition$;\n\t _this.transitionHistory.enqueue($transition$);\n\t var updateGlobalState = function () {\n\t _this.successfulTransitions.enqueue($transition$);\n\t _this.$current = $transition$.$to();\n\t _this.current = _this.$current.self;\n\t common_1.copy($transition$.params(), _this.params);\n\t };\n\t $transition$.onSuccess({}, updateGlobalState, { priority: 10000 });\n\t var clearCurrentTransition = function () { if (_this.transition === $transition$)\n\t _this.transition = null; };\n\t $transition$.promise.then(clearCurrentTransition, clearCurrentTransition);\n\t };\n\t transitionService.onBefore({}, beforeNewTransition);\n\t }\n\t return Globals;\n\t}());\n\texports.Globals = Globals;\n\n\n/***/ },\n/* 45 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\t/** @module params */ /** for typedoc */\n\tvar common_1 = __webpack_require__(3);\n\tvar StateParams = (function () {\n\t function StateParams(params) {\n\t if (params === void 0) { params = {}; }\n\t common_1.extend(this, params);\n\t }\n\t /**\n\t * Merges a set of parameters with all parameters inherited between the common parents of the\n\t * current state and a given destination state.\n\t *\n\t * @param {Object} newParams The set of parameters which will be composited with inherited params.\n\t * @param {Object} $current Internal definition of object representing the current state.\n\t * @param {Object} $to Internal definition of object representing state to transition to.\n\t */\n\t StateParams.prototype.$inherit = function (newParams, $current, $to) {\n\t var parents = common_1.ancestors($current, $to), parentParams, inherited = {}, inheritList = [];\n\t for (var i in parents) {\n\t if (!parents[i] || !parents[i].params)\n\t continue;\n\t parentParams = Object.keys(parents[i].params);\n\t if (!parentParams.length)\n\t continue;\n\t for (var j in parentParams) {\n\t if (inheritList.indexOf(parentParams[j]) >= 0)\n\t continue;\n\t inheritList.push(parentParams[j]);\n\t inherited[parentParams[j]] = this[parentParams[j]];\n\t }\n\t }\n\t return common_1.extend({}, inherited, newParams);\n\t };\n\t ;\n\t return StateParams;\n\t}());\n\texports.StateParams = StateParams;\n\n\n/***/ },\n/* 46 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\tfunction __export(m) {\n\t for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n\t}\n\t/**\n\t * This module contains code for State Parameters.\n\t *\n\t * See [[ParamDeclaration]]\n\t * @module params\n\t * @preferred doc\n\t */\n\t/** for typedoc */\n\t__export(__webpack_require__(22));\n\t__export(__webpack_require__(25));\n\t__export(__webpack_require__(45));\n\t__export(__webpack_require__(24));\n\n\n/***/ },\n/* 47 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\tfunction __export(m) {\n\t for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n\t}\n\t/** @module path */ /** for typedoc */\n\t__export(__webpack_require__(21));\n\t__export(__webpack_require__(20));\n\n\n/***/ },\n/* 48 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\tfunction __export(m) {\n\t for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n\t}\n\t/** @module resolve */ /** for typedoc */\n\t__export(__webpack_require__(18));\n\t__export(__webpack_require__(19));\n\t__export(__webpack_require__(17));\n\n\n/***/ },\n/* 49 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\tfunction __export(m) {\n\t for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n\t}\n\t/** @module state */ /** for typedoc */\n\t__export(__webpack_require__(30));\n\t__export(__webpack_require__(40));\n\t__export(__webpack_require__(42));\n\t__export(__webpack_require__(39));\n\t__export(__webpack_require__(41));\n\t__export(__webpack_require__(38));\n\t__export(__webpack_require__(43));\n\t__export(__webpack_require__(14));\n\n\n/***/ },\n/* 50 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\tfunction __export(m) {\n\t for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n\t}\n\t/**\n\t * This module contains APIs related to a Transition.\n\t *\n\t * See [[Transition]], [[$transitions]]\n\t *\n\t * @module transition\n\t * @preferred\n\t */\n\t/** for typedoc */\n\t__export(__webpack_require__(16));\n\t__export(__webpack_require__(15));\n\t__export(__webpack_require__(10));\n\t__export(__webpack_require__(11));\n\t__export(__webpack_require__(13));\n\t__export(__webpack_require__(31));\n\n\n/***/ },\n/* 51 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\tfunction __export(m) {\n\t for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n\t}\n\t/** @module url */ /** for typedoc */\n\t__export(__webpack_require__(28));\n\t__export(__webpack_require__(23));\n\t__export(__webpack_require__(27));\n\t__export(__webpack_require__(29));\n\n\n/***/ },\n/* 52 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\tfunction __export(m) {\n\t for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n\t}\n\t/** @module view */ /** for typedoc */\n\t__export(__webpack_require__(37));\n\n\n/***/ },\n/* 53 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/**\n\t * # UI-Router for Angular 1\n\t *\n\t * - Provides an implementation for the [[CoreServices]] API, based on angular 1 services.\n\t * - Also registers some services with the angular 1 injector.\n\t * - Creates and bootstraps a new [[UIRouter]] object. Ties it to the the angular 1 lifecycle.\n\t *\n\t * @module ng1\n\t * @preferred\n\t */\n\t\"use strict\";\n\t/** for typedoc */\n\tvar router_1 = __webpack_require__(26);\n\tvar coreservices_1 = __webpack_require__(6);\n\tvar common_1 = __webpack_require__(3);\n\tvar hof_1 = __webpack_require__(5);\n\tvar predicates_1 = __webpack_require__(4);\n\tvar resolveService_1 = __webpack_require__(54);\n\tvar trace_1 = __webpack_require__(12);\n\tvar views_1 = __webpack_require__(55);\n\tvar templateFactory_1 = __webpack_require__(56);\n\tvar onEnterExitRetain_1 = __webpack_require__(57);\n\t/** @hidden */\n\tvar app = angular.module(\"ui.router.angular1\", []);\n\t/**\n\t * @ngdoc overview\n\t * @name ui.router.util\n\t *\n\t * @description\n\t * # ui.router.util sub-module\n\t *\n\t * This module is a dependency of other sub-modules. Do not include this module as a dependency\n\t * in your angular app (use {@link ui.router} module instead).\n\t *\n\t */\n\tangular.module('ui.router.util', ['ng', 'ui.router.init']);\n\t/**\n\t * @ngdoc overview\n\t * @name ui.router.router\n\t *\n\t * @requires ui.router.util\n\t *\n\t * @description\n\t * # ui.router.router sub-module\n\t *\n\t * This module is a dependency of other sub-modules. Do not include this module as a dependency\n\t * in your angular app (use {@link ui.router} module instead).\n\t */\n\tangular.module('ui.router.router', ['ui.router.util']);\n\t/**\n\t * @ngdoc overview\n\t * @name ui.router.state\n\t *\n\t * @requires ui.router.router\n\t * @requires ui.router.util\n\t *\n\t * @description\n\t * # ui.router.state sub-module\n\t *\n\t * This module is a dependency of the main ui.router module. Do not include this module as a dependency\n\t * in your angular app (use {@link ui.router} module instead).\n\t *\n\t */\n\tangular.module('ui.router.state', ['ui.router.router', 'ui.router.util', 'ui.router.angular1']);\n\t/**\n\t * @ngdoc overview\n\t * @name ui.router\n\t *\n\t * @requires ui.router.state\n\t *\n\t * @description\n\t * # ui.router\n\t *\n\t * ## The main module for ui.router\n\t * There are several sub-modules included with the ui.router module, however only this module is needed\n\t * as a dependency within your angular app. The other modules are for organization purposes.\n\t *\n\t * The modules are:\n\t * * ui.router - the main \"umbrella\" module\n\t * * ui.router.router -\n\t *\n\t * *You'll need to include **only** this module as the dependency within your angular app.*\n\t *\n\t * \n\t * \n\t * \n\t * \n\t * \n\t * \n\t * \n\t * \n\t * \n\t * \n\t * \n\t * \n\t *
\n\t */\n\tangular.module('ui.router', ['ui.router.init', 'ui.router.state', 'ui.router.angular1']);\n\tangular.module('ui.router.compat', ['ui.router']);\n\t/**\n\t * Annotates a controller expression (may be a controller function(), a \"controllername\",\n\t * or \"controllername as name\")\n\t *\n\t * - Temporarily decorates $injector.instantiate.\n\t * - Invokes $controller() service\n\t * - Calls $injector.instantiate with controller constructor\n\t * - Annotate constructor\n\t * - Undecorate $injector\n\t *\n\t * returns an array of strings, which are the arguments of the controller expression\n\t */\n\tfunction annotateController(controllerExpression) {\n\t var $injector = coreservices_1.services.$injector;\n\t var $controller = $injector.get(\"$controller\");\n\t var oldInstantiate = $injector.instantiate;\n\t try {\n\t var deps_1;\n\t $injector.instantiate = function fakeInstantiate(constructorFunction) {\n\t $injector.instantiate = oldInstantiate; // Un-decorate ASAP\n\t deps_1 = $injector.annotate(constructorFunction);\n\t };\n\t $controller(controllerExpression, { $scope: {} });\n\t return deps_1;\n\t }\n\t finally {\n\t $injector.instantiate = oldInstantiate;\n\t }\n\t}\n\texports.annotateController = annotateController;\n\trunBlock.$inject = ['$injector', '$q'];\n\tfunction runBlock($injector, $q) {\n\t coreservices_1.services.$injector = $injector;\n\t coreservices_1.services.$q = $q;\n\t}\n\tapp.run(runBlock);\n\tvar router = null;\n\tng1UIRouter.$inject = ['$locationProvider'];\n\t/** This angular 1 provider instantiates a Router and exposes its services via the angular injector */\n\tfunction ng1UIRouter($locationProvider) {\n\t // Create a new instance of the Router when the ng1UIRouterProvider is initialized\n\t router = new router_1.UIRouter();\n\t // Apply ng1 specific StateBuilder code for `views`, `resolve`, and `onExit/Retain/Enter` properties\n\t router.stateRegistry.decorator(\"views\", views_1.ng1ViewsBuilder);\n\t router.stateRegistry.decorator(\"onExit\", onEnterExitRetain_1.getStateHookBuilder(\"onExit\"));\n\t router.stateRegistry.decorator(\"onRetain\", onEnterExitRetain_1.getStateHookBuilder(\"onRetain\"));\n\t router.stateRegistry.decorator(\"onEnter\", onEnterExitRetain_1.getStateHookBuilder(\"onEnter\"));\n\t router.viewService.viewConfigFactory('ng1', views_1.ng1ViewConfigFactory);\n\t // Bind LocationConfig.hashPrefix to $locationProvider.hashPrefix\n\t common_1.bindFunctions($locationProvider, coreservices_1.services.locationConfig, $locationProvider, ['hashPrefix']);\n\t // Create a LocationService.onChange registry\n\t var urlListeners = [];\n\t coreservices_1.services.location.onChange = function (callback) {\n\t urlListeners.push(callback);\n\t return function () { return common_1.removeFrom(urlListeners)(callback); };\n\t };\n\t this.$get = $get;\n\t $get.$inject = ['$location', '$browser', '$sniffer', '$rootScope', '$http', '$templateCache'];\n\t function $get($location, $browser, $sniffer, $rootScope, $http, $templateCache) {\n\t // Bind $locationChangeSuccess to the listeners registered in LocationService.onChange\n\t $rootScope.$on(\"$locationChangeSuccess\", function (evt) { return urlListeners.forEach(function (fn) { return fn(evt); }); });\n\t // Bind LocationConfig.html5Mode to $locationProvider.html5Mode and $sniffer.history\n\t coreservices_1.services.locationConfig.html5Mode = function () {\n\t var html5Mode = $locationProvider.html5Mode();\n\t html5Mode = predicates_1.isObject(html5Mode) ? html5Mode.enabled : html5Mode;\n\t return html5Mode && $sniffer.history;\n\t };\n\t coreservices_1.services.template.get = function (url) {\n\t return $http.get(url, { cache: $templateCache, headers: { Accept: 'text/html' } }).then(hof_1.prop(\"data\"));\n\t };\n\t // Bind these LocationService functions to $location\n\t common_1.bindFunctions($location, coreservices_1.services.location, $location, [\"replace\", \"url\", \"path\", \"search\", \"hash\"]);\n\t // Bind these LocationConfig functions to $location\n\t common_1.bindFunctions($location, coreservices_1.services.locationConfig, $location, ['port', 'protocol', 'host']);\n\t // Bind these LocationConfig functions to $browser\n\t common_1.bindFunctions($browser, coreservices_1.services.locationConfig, $browser, ['baseHref']);\n\t return router;\n\t }\n\t}\n\tfunction $stateParamsFactory(ng1UIRouter) {\n\t return ng1UIRouter.globals.params;\n\t}\n\t// The 'ui.router' ng1 module depends on 'ui.router.init' module.\n\tangular.module('ui.router.init', []).provider(\"ng1UIRouter\", ng1UIRouter);\n\t// This effectively calls $get() to init when we enter runtime\n\tangular.module('ui.router.init').run(['ng1UIRouter', function (ng1UIRouter) { }]);\n\t// $urlMatcherFactory service and $urlMatcherFactoryProvider\n\tangular.module('ui.router.util').provider('$urlMatcherFactory', ['ng1UIRouterProvider', function () { return router.urlMatcherFactory; }]);\n\tangular.module('ui.router.util').run(['$urlMatcherFactory', function ($urlMatcherFactory) { }]);\n\t// $urlRouter service and $urlRouterProvider\n\tfunction getUrlRouterProvider() {\n\t router.urlRouterProvider[\"$get\"] = function () {\n\t router.urlRouter.update(true);\n\t if (!this.interceptDeferred)\n\t router.urlRouter.listen();\n\t return router.urlRouter;\n\t };\n\t return router.urlRouterProvider;\n\t}\n\tangular.module('ui.router.router').provider('$urlRouter', ['ng1UIRouterProvider', getUrlRouterProvider]);\n\tangular.module('ui.router.router').run(['$urlRouter', function ($urlRouter) { }]);\n\t// $state service and $stateProvider\n\t// $urlRouter service and $urlRouterProvider\n\tfunction getStateProvider() {\n\t router.stateProvider[\"$get\"] = function () {\n\t // Autoflush once we are in runtime\n\t router.stateRegistry.stateQueue.autoFlush(router.stateService);\n\t return router.stateService;\n\t };\n\t return router.stateProvider;\n\t}\n\tangular.module('ui.router.state').provider('$state', ['ng1UIRouterProvider', getStateProvider]);\n\tangular.module('ui.router.state').run(['$state', function ($state) { }]);\n\t// $stateParams service\n\tangular.module('ui.router.state').factory('$stateParams', ['ng1UIRouter', function (ng1UIRouter) {\n\t return ng1UIRouter.globals.params;\n\t }]);\n\t// $transitions service and $transitionsProvider\n\tfunction getTransitionsProvider() {\n\t router.transitionService[\"$get\"] = function () { return router.transitionService; };\n\t return router.transitionService;\n\t}\n\tangular.module('ui.router.state').provider('$transitions', ['ng1UIRouterProvider', getTransitionsProvider]);\n\t// $templateFactory service\n\tangular.module('ui.router.util').factory('$templateFactory', ['ng1UIRouter', function () { return new templateFactory_1.TemplateFactory(); }]);\n\t// The $view service\n\tangular.module('ui.router').factory('$view', function () { return router.viewService; });\n\t// The old $resolve service\n\tangular.module('ui.router').factory('$resolve', resolveService_1.resolveFactory);\n\t// $trace service\n\tangular.module(\"ui.router\").service(\"$trace\", function () { return trace_1.trace; });\n\twatchDigests.$inject = ['$rootScope'];\n\tfunction watchDigests($rootScope) {\n\t $rootScope.$watch(function () { trace_1.trace.approximateDigests++; });\n\t}\n\texports.watchDigests = watchDigests;\n\tangular.module(\"ui.router\").run(watchDigests);\n\texports.getLocals = function (ctx) {\n\t var tokens = ctx.getTokens().filter(predicates_1.isString);\n\t var tuples = tokens.map(function (key) { return [key, ctx.getResolvable(key).data]; });\n\t return tuples.reduce(common_1.applyPairs, {});\n\t};\n\t/** Injectable services */\n\t/**\n\t * An injectable service object which has the current state parameters\n\t *\n\t * This angular service (singleton object) holds the current state parameters.\n\t * The values in `$stateParams` are not updated until *after* a [[Transition]] successfully completes.\n\t *\n\t * This object can be injected into other services.\n\t *\n\t * @example\n\t * ```js\n\t *\n\t * SomeService.$inject = ['$http', '$stateParams'];\n\t * function SomeService($http, $stateParams) {\n\t * return {\n\t * getUser: function() {\n\t * return $http.get('/api/users/' + $stateParams.username);\n\t * }\n\t * }\n\t * };\n\t * angular.service('SomeService', SomeService);\n\t * ```\n\t *\n\t * ### Deprecation warning:\n\t *\n\t * When `$stateParams` is injected into transition hooks, resolves and view controllers, they receive a different\n\t * object than this global service object. In those cases, the injected object has the parameter values for the\n\t * *pending* Transition.\n\t *\n\t * Because of these confusing details, this service is deprecated.\n\t *\n\t * @deprecated Instead of using `$stateParams, inject the current [[Transition]] as `$transition$` and use [[Transition.params]]\n\t * ```js\n\t * MyController.$inject = ['$transition$'];\n\t * function MyController($transition$) {\n\t * var username = $transition$.params().username;\n\t * // .. do something with username\n\t * }\n\t * ```\n\t */\n\tvar $stateParams;\n\t/**\n\t * An injectable service primarily used to register transition hooks\n\t *\n\t * This angular service exposes the [[TransitionService]] singleton, which is primarily used to add transition hooks.\n\t *\n\t * The same object is also exposed as [[$transitionsProvider]] for injection during angular config time.\n\t */\n\tvar $transitions;\n\t/**\n\t * A config-time injectable provider primarily used to register transition hooks\n\t *\n\t * This angular provider exposes the [[TransitionService]] singleton, which is primarily used to add transition hooks.\n\t *\n\t * The same object is also exposed as [[$transitions]] for injection at runtime.\n\t */\n\tvar $transitionsProvider;\n\t/**\n\t * An injectable service used to query for current state information.\n\t *\n\t * This angular service exposes the [[StateService]] singleton.\n\t */\n\tvar $state;\n\t/**\n\t * A config-time injectable provider used to register states.\n\t *\n\t * This angular service exposes the [[StateProvider]] singleton.\n\t */\n\tvar $stateProvider;\n\t/**\n\t * A config-time injectable provider used to manage the URL.\n\t *\n\t * This angular service exposes the [[UrlRouterProvider]] singleton.\n\t */\n\tvar $urlRouterProvider;\n\t/**\n\t * An injectable service used to configure URL redirects.\n\t *\n\t * This angular service exposes the [[UrlRouter]] singleton.\n\t */\n\tvar $urlRouter;\n\t/**\n\t * An injectable service used to configure the URL.\n\t *\n\t * This service is used to set url mapping options, and create [[UrlMatcher]] objects.\n\t *\n\t * This angular service exposes the [[UrlMatcherFactory]] singleton.\n\t * The singleton is also exposed at config-time as the [[$urlMatcherFactoryProvider]].\n\t */\n\tvar $urlMatcherFactory;\n\t/**\n\t * An injectable service used to configure the URL.\n\t *\n\t * This service is used to set url mapping options, and create [[UrlMatcher]] objects.\n\t *\n\t * This angular service exposes the [[UrlMatcherFactory]] singleton at config-time.\n\t * The singleton is also exposed at runtime as the [[$urlMatcherFactory]].\n\t */\n\tvar $urlMatcherFactoryProvider;\n\n\n/***/ },\n/* 54 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\t/** @module ng1 */ /** */\n\tvar stateObject_1 = __webpack_require__(42);\n\tvar node_1 = __webpack_require__(21);\n\tvar resolveContext_1 = __webpack_require__(17);\n\tvar common_1 = __webpack_require__(3);\n\tvar stateBuilder_1 = __webpack_require__(40);\n\t/**\n\t * Implementation of the legacy `$resolve` service for angular 1.\n\t */\n\tvar $resolve = {\n\t /**\n\t * Asynchronously injects a resolve block.\n\t *\n\t * This emulates most of the behavior of the ui-router 0.2.x $resolve.resolve() service API.\n\t *\n\t * Given an object `invocables`, where keys are strings and values are injectable functions,\n\t * injects each function, and waits for the resulting promise to resolve.\n\t * When all resulting promises are resolved, returns the results as an object.\n\t *\n\t * @example\n\t * ```js\n\t *\n\t * let invocables = {\n\t * foo: [ '$http', ($http) =>\n\t * $http.get('/api/foo').then(resp => resp.data) ],\n\t * bar: [ 'foo', '$http', (foo, $http) =>\n\t * $http.get('/api/bar/' + foo.barId).then(resp => resp.data) ]\n\t * }\n\t * $resolve.resolve(invocables)\n\t * .then(results => console.log(results.foo, results.bar))\n\t * // Logs foo and bar:\n\t * // { id: 123, barId: 456, fooData: 'foo data' }\n\t * // { id: 456, barData: 'bar data' }\n\t * ```\n\t *\n\t * @param invocables an object which looks like an [[StateDefinition.resolve]] object; keys are resolve names and values are injectable functions\n\t * @param locals key/value pre-resolved data (locals)\n\t * @param parent a promise for a \"parent resolve\"\n\t */\n\t resolve: function (invocables, locals, parent) {\n\t if (locals === void 0) { locals = {}; }\n\t var parentNode = new node_1.PathNode(new stateObject_1.State({ params: {}, resolvables: [] }));\n\t var node = new node_1.PathNode(new stateObject_1.State({ params: {}, resolvables: [] }));\n\t var context = new resolveContext_1.ResolveContext([parentNode, node]);\n\t context.addResolvables(stateBuilder_1.resolvablesBuilder({ resolve: invocables }), node.state);\n\t var resolveData = function (parentLocals) {\n\t var rewrap = function (_locals) { return stateBuilder_1.resolvablesBuilder({ resolve: common_1.map(_locals, function (local) { return function () { return local; }; }) }); };\n\t context.addResolvables(rewrap(parentLocals), parentNode.state);\n\t context.addResolvables(rewrap(locals), node.state);\n\t var tuples2ObjR = function (acc, tuple) {\n\t acc[tuple.token] = tuple.value;\n\t return acc;\n\t };\n\t return context.resolvePath().then(function (results) { return results.reduce(tuples2ObjR, {}); });\n\t };\n\t return parent ? parent.then(resolveData) : resolveData({});\n\t }\n\t};\n\t/** @hidden */\n\texports.resolveFactory = function () { return $resolve; };\n\n\n/***/ },\n/* 55 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\tvar common_1 = __webpack_require__(3);\n\tvar strings_1 = __webpack_require__(9);\n\tvar view_1 = __webpack_require__(37);\n\tvar predicates_1 = __webpack_require__(4);\n\tvar coreservices_1 = __webpack_require__(6);\n\tvar trace_1 = __webpack_require__(12);\n\tvar templateFactory_1 = __webpack_require__(56);\n\tvar resolveContext_1 = __webpack_require__(17);\n\tvar resolvable_1 = __webpack_require__(19);\n\texports.ng1ViewConfigFactory = function (path, view) { return new Ng1ViewConfig(path, view); };\n\t/**\n\t * This is a [[StateBuilder.builder]] function for angular1 `views`.\n\t *\n\t * When the [[StateBuilder]] builds a [[State]] object from a raw [[StateDeclaration]], this builder\n\t * handles the `views` property with logic specific to angular-ui-router (ng1).\n\t *\n\t * If no `views: {}` property exists on the [[StateDeclaration]], then it creates the `views` object\n\t * and applies the state-level configuration to a view named `$default`.\n\t */\n\tfunction ng1ViewsBuilder(state) {\n\t var tplKeys = ['templateProvider', 'templateUrl', 'template', 'notify', 'async'], ctrlKeys = ['controller', 'controllerProvider', 'controllerAs', 'resolveAs'], compKeys = ['component', 'bindings'], nonCompKeys = tplKeys.concat(ctrlKeys), allKeys = compKeys.concat(nonCompKeys);\n\t var views = {}, viewsObject = state.views || { \"$default\": common_1.pick(state, allKeys) };\n\t common_1.forEach(viewsObject, function (config, name) {\n\t // Account for views: { \"\": { template... } }\n\t name = name || \"$default\";\n\t // Account for views: { header: \"headerComponent\" }\n\t if (predicates_1.isString(config))\n\t config = { component: config };\n\t if (!Object.keys(config).length)\n\t return;\n\t // Configure this view for routing to an angular 1.5+ style .component (or any directive, really)\n\t if (config.component) {\n\t if (nonCompKeys.map(function (key) { return predicates_1.isDefined(config[key]); }).reduce(common_1.anyTrueR, false)) {\n\t throw new Error(\"Cannot combine: \" + compKeys.join(\"|\") + \" with: \" + nonCompKeys.join(\"|\") + \" in stateview: 'name@\" + state.name + \"'\");\n\t }\n\t // Dynamically build a template like \"\"\n\t config.templateProvider = ['$injector', function ($injector) {\n\t var resolveFor = function (key) { return config.bindings && config.bindings[key] || key; };\n\t var prefix = angular.version.minor >= 3 ? \"::\" : \"\";\n\t var attributeTpl = function (input) {\n\t var attrName = strings_1.kebobString(input.name);\n\t var resolveName = resolveFor(input.name);\n\t if (input.type === '@')\n\t return attrName + \"='{{\" + prefix + \"$resolve.\" + resolveName + \"}}'\";\n\t return attrName + \"='\" + prefix + \"$resolve.\" + resolveName + \"'\";\n\t };\n\t var attrs = getComponentInputs($injector, config.component).map(attributeTpl).join(\" \");\n\t var kebobName = strings_1.kebobString(config.component);\n\t return \"<\" + kebobName + \" \" + attrs + \">\" + kebobName + \">\";\n\t }];\n\t }\n\t config.resolveAs = config.resolveAs || '$resolve';\n\t config.$type = \"ng1\";\n\t config.$context = state;\n\t config.$name = name;\n\t var normalized = view_1.ViewService.normalizeUIViewTarget(config.$context, config.$name);\n\t config.$uiViewName = normalized.uiViewName;\n\t config.$uiViewContextAnchor = normalized.uiViewContextAnchor;\n\t views[name] = config;\n\t });\n\t return views;\n\t}\n\texports.ng1ViewsBuilder = ng1ViewsBuilder;\n\t// for ng 1.2 style, process the scope: { input: \"=foo\" }\n\t// for ng 1.3 through ng 1.5, process the component's bindToController: { input: \"=foo\" } object\n\tvar scopeBindings = function (bindingsObj) { return Object.keys(bindingsObj || {})\n\t .map(function (key) { return [key, /^([=<@])[?]?(.*)/.exec(bindingsObj[key])]; }) // [ 'input', [ '=foo', '=', 'foo' ] ]\n\t .filter(function (tuple) { return predicates_1.isDefined(tuple) && predicates_1.isDefined(tuple[1]); }) // skip malformed values\n\t .map(function (tuple) { return ({ name: tuple[1][2] || tuple[0], type: tuple[1][1] }); }); }; // { name: ('foo' || 'input'), type: '=' }\n\t// Given a directive definition, find its object input attributes\n\t// Use different properties, depending on the type of directive (component, bindToController, normal)\n\tvar getBindings = function (def) {\n\t if (predicates_1.isObject(def.bindToController))\n\t return scopeBindings(def.bindToController);\n\t return scopeBindings(def.scope);\n\t};\n\t// Gets all the directive(s)' inputs ('@', '=', and '<')\n\tfunction getComponentInputs($injector, name) {\n\t var cmpDefs = $injector.get(name + \"Directive\"); // could be multiple\n\t if (!cmpDefs || !cmpDefs.length)\n\t throw new Error(\"Unable to find component named '\" + name + \"'\");\n\t return cmpDefs.map(getBindings).reduce(common_1.unnestR, []);\n\t}\n\tvar id = 0;\n\tvar Ng1ViewConfig = (function () {\n\t function Ng1ViewConfig(path, viewDecl) {\n\t this.path = path;\n\t this.viewDecl = viewDecl;\n\t this.$id = id++;\n\t this.loaded = false;\n\t }\n\t Ng1ViewConfig.prototype.load = function () {\n\t var _this = this;\n\t var $q = coreservices_1.services.$q;\n\t if (!this.hasTemplate())\n\t throw new Error(\"No template configuration specified for '\" + this.viewDecl.$uiViewName + \"@\" + this.viewDecl.$uiViewContextAnchor + \"'\");\n\t var context = new resolveContext_1.ResolveContext(this.path);\n\t var params = this.path.reduce(function (acc, node) { return common_1.extend(acc, node.paramValues); }, {});\n\t var promises = {\n\t template: $q.when(this.getTemplate(params, new templateFactory_1.TemplateFactory(), context)),\n\t controller: $q.when(this.getController(context))\n\t };\n\t return $q.all(promises).then(function (results) {\n\t trace_1.trace.traceViewServiceEvent(\"Loaded\", _this);\n\t _this.controller = results.controller;\n\t _this.template = results.template;\n\t });\n\t };\n\t /**\n\t * Checks a view configuration to ensure that it specifies a template.\n\t *\n\t * @return {boolean} Returns `true` if the configuration contains a valid template, otherwise `false`.\n\t */\n\t Ng1ViewConfig.prototype.hasTemplate = function () {\n\t return !!(this.viewDecl.template || this.viewDecl.templateUrl || this.viewDecl.templateProvider);\n\t };\n\t Ng1ViewConfig.prototype.getTemplate = function (params, $factory, context) {\n\t return $factory.fromConfig(this.viewDecl, params, context);\n\t };\n\t /**\n\t * Gets the controller for a view configuration.\n\t *\n\t * @returns {Function|Promise.} Returns a controller, or a promise that resolves to a controller.\n\t */\n\t Ng1ViewConfig.prototype.getController = function (context) {\n\t var provider = this.viewDecl.controllerProvider;\n\t if (!predicates_1.isInjectable(provider))\n\t return this.viewDecl.controller;\n\t var deps = coreservices_1.services.$injector.annotate(provider);\n\t var providerFn = predicates_1.isArray(provider) ? common_1.tail(provider) : provider;\n\t var resolvable = new resolvable_1.Resolvable(\"\", providerFn, deps);\n\t return resolvable.get(context);\n\t };\n\t return Ng1ViewConfig;\n\t}());\n\texports.Ng1ViewConfig = Ng1ViewConfig;\n\n\n/***/ },\n/* 56 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\t/** @module view */ /** for typedoc */\n\tvar predicates_1 = __webpack_require__(4);\n\tvar coreservices_1 = __webpack_require__(6);\n\tvar common_1 = __webpack_require__(3);\n\tvar resolvable_1 = __webpack_require__(19);\n\t/**\n\t * Service which manages loading of templates from a ViewConfig.\n\t */\n\tvar TemplateFactory = (function () {\n\t function TemplateFactory() {\n\t }\n\t /**\n\t * Creates a template from a configuration object.\n\t *\n\t * @param config Configuration object for which to load a template.\n\t * The following properties are search in the specified order, and the first one\n\t * that is defined is used to create the template:\n\t *\n\t * @param params Parameters to pass to the template function.\n\t * @param context The resolve context associated with the template's view\n\t *\n\t * @return {string|object} The template html as a string, or a promise for\n\t * that string,or `null` if no template is configured.\n\t */\n\t TemplateFactory.prototype.fromConfig = function (config, params, context) {\n\t return (predicates_1.isDefined(config.template) ? this.fromString(config.template, params) :\n\t predicates_1.isDefined(config.templateUrl) ? this.fromUrl(config.templateUrl, params) :\n\t predicates_1.isDefined(config.templateProvider) ? this.fromProvider(config.templateProvider, params, context) :\n\t null);\n\t };\n\t ;\n\t /**\n\t * Creates a template from a string or a function returning a string.\n\t *\n\t * @param template html template as a string or function that returns an html template as a string.\n\t * @param params Parameters to pass to the template function.\n\t *\n\t * @return {string|object} The template html as a string, or a promise for that\n\t * string.\n\t */\n\t TemplateFactory.prototype.fromString = function (template, params) {\n\t return predicates_1.isFunction(template) ? template(params) : template;\n\t };\n\t ;\n\t /**\n\t * Loads a template from the a URL via `$http` and `$templateCache`.\n\t *\n\t * @param {string|Function} url url of the template to load, or a function\n\t * that returns a url.\n\t * @param {Object} params Parameters to pass to the url function.\n\t * @return {string|Promise.} The template html as a string, or a promise\n\t * for that string.\n\t */\n\t TemplateFactory.prototype.fromUrl = function (url, params) {\n\t if (predicates_1.isFunction(url))\n\t url = url(params);\n\t if (url == null)\n\t return null;\n\t return coreservices_1.services.template.get(url);\n\t };\n\t ;\n\t /**\n\t * Creates a template by invoking an injectable provider function.\n\t *\n\t * @param provider Function to invoke via `locals`\n\t * @param {Function} injectFn a function used to invoke the template provider\n\t * @return {string|Promise.} The template html as a string, or a promise\n\t * for that string.\n\t */\n\t TemplateFactory.prototype.fromProvider = function (provider, params, context) {\n\t var deps = coreservices_1.services.$injector.annotate(provider);\n\t var providerFn = predicates_1.isArray(provider) ? common_1.tail(provider) : provider;\n\t var resolvable = new resolvable_1.Resolvable(\"\", providerFn, deps);\n\t return resolvable.get(context);\n\t };\n\t ;\n\t return TemplateFactory;\n\t}());\n\texports.TemplateFactory = TemplateFactory;\n\n\n/***/ },\n/* 57 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\tvar coreservices_1 = __webpack_require__(6);\n\tvar services_1 = __webpack_require__(53);\n\tvar resolveContext_1 = __webpack_require__(17);\n\tvar common_1 = __webpack_require__(3);\n\t/**\n\t * This is a [[StateBuilder.builder]] function for angular1 `onEnter`, `onExit`,\n\t * `onRetain` callback hooks on a [[Ng1StateDeclaration]].\n\t *\n\t * When the [[StateBuilder]] builds a [[State]] object from a raw [[StateDeclaration]], this builder\n\t * ensures that those hooks are injectable for angular-ui-router (ng1).\n\t */\n\texports.getStateHookBuilder = function (hookName) {\n\t return function stateHookBuilder(state, parentFn) {\n\t var hook = state[hookName];\n\t function decoratedNg1Hook(trans, state) {\n\t var resolveContext = new resolveContext_1.ResolveContext(trans.treeChanges().to);\n\t return coreservices_1.services.$injector.invoke(hook, this, common_1.extend({ $state$: state }, services_1.getLocals(resolveContext)));\n\t }\n\t return hook ? decoratedNg1Hook : undefined;\n\t };\n\t};\n\n\n/***/ },\n/* 58 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\t/**\n\t * These are the UI-Router angular 1 directives.\n\t *\n\t * These directives are used in templates to create viewports and navigate to states\n\t *\n\t * @preferred @module ng1_directives\n\t */ /** for typedoc */\n\tvar common_1 = __webpack_require__(3);\n\tvar predicates_1 = __webpack_require__(4);\n\tvar hof_1 = __webpack_require__(5);\n\t/** @hidden */\n\tfunction parseStateRef(ref, current) {\n\t var preparsed = ref.match(/^\\s*({[^}]*})\\s*$/), parsed;\n\t if (preparsed)\n\t ref = current + '(' + preparsed[1] + ')';\n\t parsed = ref.replace(/\\n/g, \" \").match(/^([^(]+?)\\s*(\\((.*)\\))?$/);\n\t if (!parsed || parsed.length !== 4)\n\t throw new Error(\"Invalid state ref '\" + ref + \"'\");\n\t return { state: parsed[1], paramExpr: parsed[3] || null };\n\t}\n\t/** @hidden */\n\tfunction stateContext(el) {\n\t var $uiView = el.parent().inheritedData('$uiView');\n\t var path = hof_1.parse('$cfg.path')($uiView);\n\t return path ? common_1.tail(path).state.name : undefined;\n\t}\n\t/** @hidden */\n\tfunction getTypeInfo(el) {\n\t // SVGAElement does not use the href attribute, but rather the 'xlinkHref' attribute.\n\t var isSvg = Object.prototype.toString.call(el.prop('href')) === '[object SVGAnimatedString]';\n\t var isForm = el[0].nodeName === \"FORM\";\n\t return {\n\t attr: isForm ? \"action\" : (isSvg ? 'xlink:href' : 'href'),\n\t isAnchor: el.prop(\"tagName\").toUpperCase() === \"A\",\n\t clickable: !isForm\n\t };\n\t}\n\t/** @hidden */\n\tfunction clickHook(el, $state, $timeout, type, current) {\n\t return function (e) {\n\t var button = e.which || e.button, target = current();\n\t if (!(button > 1 || e.ctrlKey || e.metaKey || e.shiftKey || el.attr('target'))) {\n\t // HACK: This is to allow ng-clicks to be processed before the transition is initiated:\n\t var transition = $timeout(function () {\n\t $state.go(target.state, target.params, target.options);\n\t });\n\t e.preventDefault();\n\t // if the state has no URL, ignore one preventDefault from the directive.\n\t var ignorePreventDefaultCount = type.isAnchor && !target.href ? 1 : 0;\n\t e.preventDefault = function () {\n\t if (ignorePreventDefaultCount-- <= 0)\n\t $timeout.cancel(transition);\n\t };\n\t }\n\t };\n\t}\n\t/** @hidden */\n\tfunction defaultOpts(el, $state) {\n\t return { relative: stateContext(el) || $state.$current, inherit: true };\n\t}\n\t/**\n\t * `ui-sref`: A directive for linking to a state\n\t *\n\t * A directive that binds a link (`` tag) to a state.\n\t * If the state has an associated URL, the directive will automatically generate and\n\t * update the `href` attribute via the [[StateService.href]] method.\n\t * Clicking the link will trigger a state transition with optional parameters.\n\t *\n\t * Also middle-clicking, right-clicking, and ctrl-clicking on the link will be\n\t * handled natively by the browser.\n\t *\n\t * You can also use relative state paths within ui-sref, just like the relative\n\t * paths passed to `$state.go()`.\n\t * You just need to be aware that the path is relative to the state that the link lives in.\n\t * In other words, the state that created the view containing the link.\n\t *\n\t * You can specify options to pass to [[StateService.go]] using the `ui-sref-opts` attribute.\n\t * Options are restricted to `location`, `inherit`, and `reload`.\n\t *\n\t * Here's an example of how you'd use ui-sref and how it would compile.\n\t * If you have the following template:\n\t *\n\t * @example\n\t * ```html\n\t *\n\t * \n\t * Home | About | Next page\n\t *\n\t *
\n\t * \n\t * ```\n\t *\n\t * Then the compiled html would be (assuming Html5Mode is off and current state is contacts):\n\t *\n\t * ```html\n\t *\n\t * \n\t * Home | About | Next page\n\t *\n\t *
\n\t * - \n\t * Joe\n\t *
\n\t * - \n\t * Alice\n\t *
\n\t * - \n\t * Bob\n\t *
\n\t *
\n\t *\n\t * Home\n\t * \n\t * ```\n\t *\n\t * @param {string} ui-sref 'stateName' can be any valid absolute or relative state\n\t * @param {Object} ui-sref-opts options to pass to [[StateService.go]]\n\t */\n\tvar uiSref = ['$state', '$timeout',\n\t function $StateRefDirective($state, $timeout) {\n\t return {\n\t restrict: 'A',\n\t require: ['?^uiSrefActive', '?^uiSrefActiveEq'],\n\t link: function (scope, element, attrs, uiSrefActive) {\n\t var ref = parseStateRef(attrs.uiSref, $state.current.name);\n\t var def = { state: ref.state, href: null, params: null, options: null };\n\t var type = getTypeInfo(element);\n\t var active = uiSrefActive[1] || uiSrefActive[0];\n\t var unlinkInfoFn = null;\n\t def.options = common_1.extend(defaultOpts(element, $state), attrs.uiSrefOpts ? scope.$eval(attrs.uiSrefOpts) : {});\n\t var update = function (val) {\n\t if (val)\n\t def.params = angular.copy(val);\n\t def.href = $state.href(ref.state, def.params, def.options);\n\t if (unlinkInfoFn)\n\t unlinkInfoFn();\n\t if (active)\n\t unlinkInfoFn = active.$$addStateInfo(ref.state, def.params);\n\t if (def.href !== null)\n\t attrs.$set(type.attr, def.href);\n\t };\n\t if (ref.paramExpr) {\n\t scope.$watch(ref.paramExpr, function (val) { if (val !== def.params)\n\t update(val); }, true);\n\t def.params = angular.copy(scope.$eval(ref.paramExpr));\n\t }\n\t update();\n\t if (!type.clickable)\n\t return;\n\t element.bind(\"click\", clickHook(element, $state, $timeout, type, function () { return def; }));\n\t }\n\t };\n\t }];\n\t/**\n\t * `ui-state`: A dynamic version of `ui-sref`\n\t *\n\t * Much like ui-sref, but will accept named $scope properties to evaluate for a state definition,\n\t * params and override options.\n\t *\n\t * @example\n\t * ```html\n\t *\n\t * \n\t * {{nav.description}}\n\t * \n\t *\n\t * @param {string} ui-state 'stateName' can be any valid absolute or relative state\n\t * @param {Object} ui-state-params params to pass to [[StateService.href]]\n\t * @param {Object} ui-state-opts options to pass to [[StateService.go]]\n\t */\n\tvar uiState = ['$state', '$timeout',\n\t function $StateRefDynamicDirective($state, $timeout) {\n\t return {\n\t restrict: 'A',\n\t require: ['?^uiSrefActive', '?^uiSrefActiveEq'],\n\t link: function (scope, element, attrs, uiSrefActive) {\n\t var type = getTypeInfo(element);\n\t var active = uiSrefActive[1] || uiSrefActive[0];\n\t var group = [attrs.uiState, attrs.uiStateParams || null, attrs.uiStateOpts || null];\n\t var watch = '[' + group.map(function (val) { return val || 'null'; }).join(', ') + ']';\n\t var def = { state: null, params: null, options: null, href: null };\n\t var unlinkInfoFn = null;\n\t function runStateRefLink(group) {\n\t def.state = group[0];\n\t def.params = group[1];\n\t def.options = group[2];\n\t def.href = $state.href(def.state, def.params, def.options);\n\t if (unlinkInfoFn)\n\t unlinkInfoFn();\n\t if (active)\n\t unlinkInfoFn = active.$$addStateInfo(def.state, def.params);\n\t if (def.href)\n\t attrs.$set(type.attr, def.href);\n\t }\n\t scope.$watch(watch, runStateRefLink, true);\n\t runStateRefLink(scope.$eval(watch));\n\t if (!type.clickable)\n\t return;\n\t element.bind(\"click\", clickHook(element, $state, $timeout, type, function () { return def; }));\n\t }\n\t };\n\t }];\n\t/**\n\t * `ui-sref-active` and `ui-sref-active-eq`: A directive that adds a CSS class when a `ui-sref` is active\n\t *\n\t * A directive working alongside ui-sref to add classes to an element when the\n\t * related ui-sref directive's state is active, and removing them when it is inactive.\n\t * The primary use-case is to simplify the special appearance of navigation menus\n\t * relying on `ui-sref`, by having the \"active\" state's menu button appear different,\n\t * distinguishing it from the inactive menu items.\n\t *\n\t * ui-sref-active can live on the same element as ui-sref or on a parent element. The first\n\t * ui-sref-active found at the same level or above the ui-sref will be used.\n\t *\n\t * Will activate when the ui-sref's target state or any child state is active. If you\n\t * need to activate only when the ui-sref target state is active and *not* any of\n\t * it's children, then you will use ui-sref-active-eq\n\t *\n\t * Given the following template:\n\t * @example\n\t * ```html\n\t *\n\t * \n\t *
\n\t * \n\t * ```\n\t *\n\t *\n\t * When the app state is \"app.user\" (or any children states), and contains the state parameter \"user\" with value \"bilbobaggins\",\n\t * the resulting HTML will appear as (note the 'active' class):\n\t *\n\t * ```html\n\t *\n\t * \n\t *
\n\t * \n\t * ```\n\t *\n\t * The class name is interpolated **once** during the directives link time (any further changes to the\n\t * interpolated value are ignored).\n\t *\n\t * Multiple classes may be specified in a space-separated format:\n\t *\n\t * ```html\n\t * \n\t *
\n\t * - \n\t * link\n\t *
\n\t *
\n\t * \n\t * ```\n\t *\n\t * It is also possible to pass ui-sref-active an expression that evaluates\n\t * to an object hash, whose keys represent active class names and whose\n\t * values represent the respective state names/globs.\n\t * ui-sref-active will match if the current active state **includes** any of\n\t * the specified state names/globs, even the abstract ones.\n\t *\n\t * Given the following template, with \"admin\" being an abstract state:\n\t * @example\n\t * ```html\n\t *\n\t * \n\t * \n\t *
\n\t * ```\n\t *\n\t * When the current state is \"admin.roles\" the \"active\" class will be applied\n\t * to both the and
elements. It is important to note that the state\n\t * names/globs passed to ui-sref-active shadow the state provided by ui-sref.\n\t */\n\tvar uiSrefActive = ['$state', '$stateParams', '$interpolate', '$transitions',\n\t function $StateRefActiveDirective($state, $stateParams, $interpolate, $transitions) {\n\t return {\n\t restrict: \"A\",\n\t controller: ['$scope', '$element', '$attrs', '$timeout', function ($scope, $element, $attrs, $timeout) {\n\t var states = [], activeClasses = {}, activeEqClass, uiSrefActive;\n\t // There probably isn't much point in $observing this\n\t // uiSrefActive and uiSrefActiveEq share the same directive object with some\n\t // slight difference in logic routing\n\t activeEqClass = $interpolate($attrs.uiSrefActiveEq || '', false)($scope);\n\t try {\n\t uiSrefActive = $scope.$eval($attrs.uiSrefActive);\n\t }\n\t catch (e) {\n\t }\n\t uiSrefActive = uiSrefActive || $interpolate($attrs.uiSrefActive || '', false)($scope);\n\t if (predicates_1.isObject(uiSrefActive)) {\n\t common_1.forEach(uiSrefActive, function (stateOrName, activeClass) {\n\t if (predicates_1.isString(stateOrName)) {\n\t var ref = parseStateRef(stateOrName, $state.current.name);\n\t addState(ref.state, $scope.$eval(ref.paramExpr), activeClass);\n\t }\n\t });\n\t }\n\t // Allow uiSref to communicate with uiSrefActive[Equals]\n\t this.$$addStateInfo = function (newState, newParams) {\n\t // we already got an explicit state provided by ui-sref-active, so we\n\t // shadow the one that comes from ui-sref\n\t if (predicates_1.isObject(uiSrefActive) && states.length > 0) {\n\t return;\n\t }\n\t var deregister = addState(newState, newParams, uiSrefActive);\n\t update();\n\t return deregister;\n\t };\n\t $scope.$on('$stateChangeSuccess', update);\n\t $scope.$on('$destroy', $transitions.onStart({}, function (trans) { return trans.promise.then(update) && null; }));\n\t function addState(stateName, stateParams, activeClass) {\n\t var state = $state.get(stateName, stateContext($element));\n\t var stateHash = createStateHash(stateName, stateParams);\n\t var stateInfo = {\n\t state: state || { name: stateName },\n\t params: stateParams,\n\t hash: stateHash\n\t };\n\t states.push(stateInfo);\n\t activeClasses[stateHash] = activeClass;\n\t return function removeState() {\n\t var idx = states.indexOf(stateInfo);\n\t if (idx !== -1)\n\t states.splice(idx, 1);\n\t };\n\t }\n\t /**\n\t * @param {string} state\n\t * @param {Object|string} [params]\n\t * @return {string}\n\t */\n\t function createStateHash(state, params) {\n\t if (!predicates_1.isString(state)) {\n\t throw new Error('state should be a string');\n\t }\n\t if (predicates_1.isObject(params)) {\n\t return state + common_1.toJson(params);\n\t }\n\t params = $scope.$eval(params);\n\t if (predicates_1.isObject(params)) {\n\t return state + common_1.toJson(params);\n\t }\n\t return state;\n\t }\n\t // Update route state\n\t function update() {\n\t for (var i = 0; i < states.length; i++) {\n\t if (anyMatch(states[i].state, states[i].params)) {\n\t addClass($element, activeClasses[states[i].hash]);\n\t }\n\t else {\n\t removeClass($element, activeClasses[states[i].hash]);\n\t }\n\t if (exactMatch(states[i].state, states[i].params)) {\n\t addClass($element, activeEqClass);\n\t }\n\t else {\n\t removeClass($element, activeEqClass);\n\t }\n\t }\n\t }\n\t function addClass(el, className) { $timeout(function () { el.addClass(className); }); }\n\t function removeClass(el, className) { el.removeClass(className); }\n\t function anyMatch(state, params) { return $state.includes(state.name, params); }\n\t function exactMatch(state, params) { return $state.is(state.name, params); }\n\t update();\n\t }]\n\t };\n\t }];\n\tangular.module('ui.router.state')\n\t .directive('uiSref', uiSref)\n\t .directive('uiSrefActive', uiSrefActive)\n\t .directive('uiSrefActiveEq', uiSrefActive)\n\t .directive('uiState', uiState);\n\n\n/***/ },\n/* 59 */\n/***/ function(module, exports) {\n\n\t/** @module state */ /** for typedoc */\n\t\"use strict\";\n\t/**\n\t * @ngdoc filter\n\t * @name ui.router.state.filter:isState\n\t *\n\t * @requires ui.router.state.$state\n\t *\n\t * @description\n\t * Translates to {@link ui.router.state.$state#methods_is $state.is(\"stateName\")}.\n\t */\n\t$IsStateFilter.$inject = ['$state'];\n\tfunction $IsStateFilter($state) {\n\t var isFilter = function (state, params, options) {\n\t return $state.is(state, params, options);\n\t };\n\t isFilter.$stateful = true;\n\t return isFilter;\n\t}\n\texports.$IsStateFilter = $IsStateFilter;\n\t/**\n\t * @ngdoc filter\n\t * @name ui.router.state.filter:includedByState\n\t *\n\t * @requires ui.router.state.$state\n\t *\n\t * @description\n\t * Translates to {@link ui.router.state.$state#methods_includes $state.includes('fullOrPartialStateName')}.\n\t */\n\t$IncludedByStateFilter.$inject = ['$state'];\n\tfunction $IncludedByStateFilter($state) {\n\t var includesFilter = function (state, params, options) {\n\t return $state.includes(state, params, options);\n\t };\n\t includesFilter.$stateful = true;\n\t return includesFilter;\n\t}\n\texports.$IncludedByStateFilter = $IncludedByStateFilter;\n\tangular.module('ui.router.state')\n\t .filter('isState', $IsStateFilter)\n\t .filter('includedByState', $IncludedByStateFilter);\n\n\n/***/ },\n/* 60 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/** @module ng1_directives */ /** for typedoc */\n\t\"use strict\";\n\tvar common_1 = __webpack_require__(3);\n\tvar predicates_1 = __webpack_require__(4);\n\tvar trace_1 = __webpack_require__(12);\n\tvar views_1 = __webpack_require__(55);\n\tvar hof_1 = __webpack_require__(5);\n\tvar resolveContext_1 = __webpack_require__(17);\n\tvar strings_1 = __webpack_require__(9);\n\tvar services_1 = __webpack_require__(53);\n\t/**\n\t * `ui-view`: A viewport directive which is filled in by a view from the active state.\n\t *\n\t * @param {string=} name A view name. The name should be unique amongst the other views in the\n\t * same state. You can have views of the same name that live in different states.\n\t *\n\t * @param {string=} autoscroll It allows you to set the scroll behavior of the browser window\n\t * when a view is populated. By default, $anchorScroll is overridden by ui-router's custom scroll\n\t * service, {@link ui.router.state.$uiViewScroll}. This custom service let's you\n\t * scroll ui-view elements into view when they are populated during a state activation.\n\t *\n\t * *Note: To revert back to old [`$anchorScroll`](http://docs.angularjs.org/api/ng.$anchorScroll)\n\t * functionality, call `$uiViewScrollProvider.useAnchorScroll()`.*\n\t *\n\t * @param {string=} onload Expression to evaluate whenever the view updates.\n\t *\n\t * A view can be unnamed or named.\n\t * @example\n\t * ```html\n\t *\n\t * \n\t * \n\t *\n\t * \n\t * \n\t * ```\n\t *\n\t * You can only have one unnamed view within any template (or root html). If you are only using a\n\t * single view and it is unnamed then you can populate it like so:\n\t * ```\n\t *\n\t * \n\t * $stateProvider.state(\"home\", {\n\t * template: \"HELLO!
\"\n\t * })\n\t * ```\n\t *\n\t * The above is a convenient shortcut equivalent to specifying your view explicitly with the {@link ui.router.state.$stateProvider#views `views`}\n\t * config property, by name, in this case an empty name:\n\t * ```js\n\t *\n\t * $stateProvider.state(\"home\", {\n\t * views: {\n\t * \"\": {\n\t * template: \"HELLO!
\"\n\t * }\n\t * }\n\t * })\n\t * ```\n\t *\n\t * But typically you'll only use the views property if you name your view or have more than one view\n\t * in the same template. There's not really a compelling reason to name a view if its the only one,\n\t * but you could if you wanted, like so:\n\t *\n\t * ```html\n\t *\n\t * \n\t * ```\n\t *\n\t * ```js\n\t *\n\t * $stateProvider.state(\"home\", {\n\t * views: {\n\t * \"main\": {\n\t * template: \"HELLO!
\"\n\t * }\n\t * }\n\t * })\n\t * ```\n\t *\n\t * Really though, you'll use views to set up multiple views:\n\t * ```html\n\t *\n\t * \n\t * \n\t * \n\t * ```\n\t *\n\t * ```js\n\t * $stateProvider.state(\"home\", {\n\t * views: {\n\t * \"\": {\n\t * template: \"HELLO!
\"\n\t * },\n\t * \"chart\": {\n\t * template: \"\"\n\t * },\n\t * \"data\": {\n\t * template: \"\"\n\t * }\n\t * }\n\t * })\n\t * ```\n\t *\n\t * Examples for `autoscroll`:\n\t *\n\t * ```html\n\t *\n\t * \n\t * \n\t *\n\t * \n\t * \n\t * \n\t * \n\t * ```\n\t *\n\t * Resolve data:\n\t *\n\t * The resolved data from the state's `resolve` block is placed on the scope as `$resolve` (this\n\t * can be customized using [[ViewDeclaration.resolveAs]]). This can be then accessed from the template.\n\t *\n\t * Note that when `controllerAs` is being used, `$resolve` is set on the controller instance *after* the\n\t * controller is instantiated. The `$onInit()` hook can be used to perform initialization code which\n\t * depends on `$resolve` data.\n\t *\n\t * @example\n\t * ```js\n\t *\n\t * $stateProvider.state('home', {\n\t * template: '',\n\t * resolve: {\n\t * user: function(UserService) { return UserService.fetchUser(); }\n\t * }\n\t * });\n\t * ```\n\t */\n\tvar uiView = ['$view', '$animate', '$uiViewScroll', '$interpolate', '$q',\n\t function $ViewDirective($view, $animate, $uiViewScroll, $interpolate, $q) {\n\t function getRenderer(attrs, scope) {\n\t return {\n\t enter: function (element, target, cb) {\n\t if (angular.version.minor > 2) {\n\t $animate.enter(element, null, target).then(cb);\n\t }\n\t else {\n\t $animate.enter(element, null, target, cb);\n\t }\n\t },\n\t leave: function (element, cb) {\n\t if (angular.version.minor > 2) {\n\t $animate.leave(element).then(cb);\n\t }\n\t else {\n\t $animate.leave(element, cb);\n\t }\n\t }\n\t };\n\t }\n\t function configsEqual(config1, config2) {\n\t return config1 === config2;\n\t }\n\t var rootData = {\n\t $cfg: { viewDecl: { $context: $view.rootContext() } },\n\t $uiView: {}\n\t };\n\t var directive = {\n\t count: 0,\n\t restrict: 'ECA',\n\t terminal: true,\n\t priority: 400,\n\t transclude: 'element',\n\t compile: function (tElement, tAttrs, $transclude) {\n\t return function (scope, $element, attrs) {\n\t var previousEl, currentEl, currentScope, unregister, onloadExp = attrs.onload || '', autoScrollExp = attrs.autoscroll, renderer = getRenderer(attrs, scope), viewConfig = undefined, inherited = $element.inheritedData('$uiView') || rootData, name = $interpolate(attrs.uiView || attrs.name || '')(scope) || '$default';\n\t var activeUIView = {\n\t $type: 'ng1',\n\t id: directive.count++,\n\t name: name,\n\t fqn: inherited.$uiView.fqn ? inherited.$uiView.fqn + \".\" + name : name,\n\t config: null,\n\t configUpdated: configUpdatedCallback,\n\t get creationContext() {\n\t return hof_1.parse('$cfg.viewDecl.$context')(inherited);\n\t }\n\t };\n\t trace_1.trace.traceUIViewEvent(\"Linking\", activeUIView);\n\t function configUpdatedCallback(config) {\n\t if (config && !(config instanceof views_1.Ng1ViewConfig))\n\t return;\n\t if (configsEqual(viewConfig, config))\n\t return;\n\t trace_1.trace.traceUIViewConfigUpdated(activeUIView, config && config.viewDecl && config.viewDecl.$context);\n\t viewConfig = config;\n\t updateView(config);\n\t }\n\t $element.data('$uiView', { $uiView: activeUIView });\n\t updateView();\n\t unregister = $view.registerUIView(activeUIView);\n\t scope.$on(\"$destroy\", function () {\n\t trace_1.trace.traceUIViewEvent(\"Destroying/Unregistering\", activeUIView);\n\t unregister();\n\t });\n\t function cleanupLastView() {\n\t if (previousEl) {\n\t trace_1.trace.traceUIViewEvent(\"Removing (previous) el\", previousEl.data('$uiView'));\n\t previousEl.remove();\n\t previousEl = null;\n\t }\n\t if (currentScope) {\n\t trace_1.trace.traceUIViewEvent(\"Destroying scope\", activeUIView);\n\t currentScope.$destroy();\n\t currentScope = null;\n\t }\n\t if (currentEl) {\n\t var _viewData_1 = currentEl.data('$uiView');\n\t trace_1.trace.traceUIViewEvent(\"Animate out\", _viewData_1);\n\t renderer.leave(currentEl, function () {\n\t _viewData_1.$$animLeave.resolve();\n\t previousEl = null;\n\t });\n\t previousEl = currentEl;\n\t currentEl = null;\n\t }\n\t }\n\t function updateView(config) {\n\t var newScope = scope.$new();\n\t trace_1.trace.traceUIViewScopeCreated(activeUIView, newScope);\n\t var animEnter = $q.defer(), animLeave = $q.defer();\n\t var $uiViewData = {\n\t $cfg: config,\n\t $uiView: activeUIView,\n\t $animEnter: animEnter.promise,\n\t $animLeave: animLeave.promise,\n\t $$animLeave: animLeave\n\t };\n\t var cloned = $transclude(newScope, function (clone) {\n\t renderer.enter(clone.data('$uiView', $uiViewData), $element, function onUIViewEnter() {\n\t animEnter.resolve();\n\t if (currentScope)\n\t currentScope.$emit('$viewContentAnimationEnded');\n\t if (predicates_1.isDefined(autoScrollExp) && !autoScrollExp || scope.$eval(autoScrollExp)) {\n\t $uiViewScroll(clone);\n\t }\n\t });\n\t cleanupLastView();\n\t });\n\t currentEl = cloned;\n\t currentScope = newScope;\n\t /**\n\t * @ngdoc event\n\t * @name ui.router.state.directive:ui-view#$viewContentLoaded\n\t * @eventOf ui.router.state.directive:ui-view\n\t * @eventType emits on ui-view directive scope\n\t * @description *\n\t * Fired once the view is **loaded**, *after* the DOM is rendered.\n\t *\n\t * @param {Object} event Event object.\n\t */\n\t currentScope.$emit('$viewContentLoaded', config || viewConfig);\n\t currentScope.$eval(onloadExp);\n\t }\n\t };\n\t }\n\t };\n\t return directive;\n\t }];\n\t$ViewDirectiveFill.$inject = ['$compile', '$controller', '$transitions', '$view', '$timeout'];\n\t/** @hidden */\n\tfunction $ViewDirectiveFill($compile, $controller, $transitions, $view, $timeout) {\n\t var getControllerAs = hof_1.parse('viewDecl.controllerAs');\n\t var getResolveAs = hof_1.parse('viewDecl.resolveAs');\n\t return {\n\t restrict: 'ECA',\n\t priority: -400,\n\t compile: function (tElement) {\n\t var initial = tElement.html();\n\t return function (scope, $element) {\n\t var data = $element.data('$uiView');\n\t if (!data)\n\t return;\n\t var cfg = data.$cfg || { viewDecl: {} };\n\t $element.html(cfg.template || initial);\n\t trace_1.trace.traceUIViewFill(data.$uiView, $element.html());\n\t var link = $compile($element.contents());\n\t var controller = cfg.controller;\n\t var controllerAs = getControllerAs(cfg);\n\t var resolveAs = getResolveAs(cfg);\n\t var resolveCtx = cfg.path && new resolveContext_1.ResolveContext(cfg.path);\n\t var locals = resolveCtx && services_1.getLocals(resolveCtx);\n\t scope[resolveAs] = locals;\n\t if (controller) {\n\t var controllerInstance = $controller(controller, common_1.extend({}, locals, { $scope: scope, $element: $element }));\n\t if (controllerAs) {\n\t scope[controllerAs] = controllerInstance;\n\t scope[controllerAs][resolveAs] = locals;\n\t }\n\t // TODO: Use $view service as a central point for registering component-level hooks\n\t // Then, when a component is created, tell the $view service, so it can invoke hooks\n\t // $view.componentLoaded(controllerInstance, { $scope: scope, $element: $element });\n\t // scope.$on('$destroy', () => $view.componentUnloaded(controllerInstance, { $scope: scope, $element: $element }));\n\t $element.data('$ngControllerController', controllerInstance);\n\t $element.children().data('$ngControllerController', controllerInstance);\n\t registerControllerCallbacks($transitions, controllerInstance, scope, cfg);\n\t }\n\t // Wait for the component to appear in the DOM\n\t if (predicates_1.isString(cfg.viewDecl.component)) {\n\t var cmp_1 = cfg.viewDecl.component;\n\t var kebobName_1 = strings_1.kebobString(cmp_1);\n\t var getComponentController = function () {\n\t var directiveEl = [].slice.call($element[0].children)\n\t .filter(function (el) { return el && el.tagName && el.tagName.toLowerCase() === kebobName_1; });\n\t return directiveEl && angular.element(directiveEl).data(\"$\" + cmp_1 + \"Controller\");\n\t };\n\t var deregisterWatch_1 = scope.$watch(getComponentController, function (ctrlInstance) {\n\t if (!ctrlInstance)\n\t return;\n\t registerControllerCallbacks($transitions, ctrlInstance, scope, cfg);\n\t deregisterWatch_1();\n\t });\n\t }\n\t link(scope);\n\t };\n\t }\n\t };\n\t}\n\t/** @hidden */\n\tvar hasComponentImpl = typeof angular.module('ui.router')['component'] === 'function';\n\t/** @hidden TODO: move these callbacks to $view and/or `/hooks/components.ts` or something */\n\tfunction registerControllerCallbacks($transitions, controllerInstance, $scope, cfg) {\n\t // Call $onInit() ASAP\n\t if (predicates_1.isFunction(controllerInstance.$onInit) && !(cfg.viewDecl.component && hasComponentImpl))\n\t controllerInstance.$onInit();\n\t var viewState = common_1.tail(cfg.path).state.self;\n\t var hookOptions = { bind: controllerInstance };\n\t // Add component-level hook for onParamsChange\n\t if (predicates_1.isFunction(controllerInstance.uiOnParamsChanged)) {\n\t var resolveContext = new resolveContext_1.ResolveContext(cfg.path);\n\t var viewCreationTrans_1 = resolveContext.getResolvable('$transition$').data;\n\t // Fire callback on any successful transition\n\t var paramsUpdated = function ($transition$) {\n\t // Exit early if the $transition$ is the same as the view was created within.\n\t // Exit early if the $transition$ will exit the state the view is for.\n\t if ($transition$ === viewCreationTrans_1 || $transition$.exiting().indexOf(viewState) !== -1)\n\t return;\n\t var toParams = $transition$.params(\"to\");\n\t var fromParams = $transition$.params(\"from\");\n\t var toSchema = $transition$.treeChanges().to.map(function (node) { return node.paramSchema; }).reduce(common_1.unnestR, []);\n\t var fromSchema = $transition$.treeChanges().from.map(function (node) { return node.paramSchema; }).reduce(common_1.unnestR, []);\n\t // Find the to params that have different values than the from params\n\t var changedToParams = toSchema.filter(function (param) {\n\t var idx = fromSchema.indexOf(param);\n\t return idx === -1 || !fromSchema[idx].type.equals(toParams[param.id], fromParams[param.id]);\n\t });\n\t // Only trigger callback if a to param has changed or is new\n\t if (changedToParams.length) {\n\t var changedKeys_1 = changedToParams.map(function (x) { return x.id; });\n\t // Filter the params to only changed/new to params. `$transition$.params()` may be used to get all params.\n\t controllerInstance.uiOnParamsChanged(common_1.filter(toParams, function (val, key) { return changedKeys_1.indexOf(key) !== -1; }), $transition$);\n\t }\n\t };\n\t $scope.$on('$destroy', $transitions.onSuccess({}, paramsUpdated, hookOptions));\n\t }\n\t // Add component-level hook for uiCanExit\n\t if (predicates_1.isFunction(controllerInstance.uiCanExit)) {\n\t var criteria = { exiting: viewState.name };\n\t $scope.$on('$destroy', $transitions.onBefore(criteria, controllerInstance.uiCanExit, hookOptions));\n\t }\n\t}\n\tangular.module('ui.router.state').directive('uiView', uiView);\n\tangular.module('ui.router.state').directive('uiView', $ViewDirectiveFill);\n\n\n/***/ },\n/* 61 */\n/***/ function(module, exports) {\n\n\t\"use strict\";\n\t/**\n\t * @ngdoc object\n\t * @name ui.router.state.$uiViewScrollProvider\n\t *\n\t * @description\n\t * Provider that returns the {@link ui.router.state.$uiViewScroll} service function.\n\t */\n\tfunction $ViewScrollProvider() {\n\t var useAnchorScroll = false;\n\t /**\n\t * @ngdoc function\n\t * @name ui.router.state.$uiViewScrollProvider#useAnchorScroll\n\t * @methodOf ui.router.state.$uiViewScrollProvider\n\t *\n\t * @description\n\t * Reverts back to using the core [`$anchorScroll`](http://docs.angularjs.org/api/ng.$anchorScroll) service for\n\t * scrolling based on the url anchor.\n\t */\n\t this.useAnchorScroll = function () {\n\t useAnchorScroll = true;\n\t };\n\t /**\n\t * @ngdoc object\n\t * @name ui.router.state.$uiViewScroll\n\t *\n\t * @requires $anchorScroll\n\t * @requires $timeout\n\t *\n\t * @description\n\t * When called with a jqLite element, it scrolls the element into view (after a\n\t * `$timeout` so the DOM has time to refresh).\n\t *\n\t * If you prefer to rely on `$anchorScroll` to scroll the view to the anchor,\n\t * this can be enabled by calling {@link ui.router.state.$uiViewScrollProvider#methods_useAnchorScroll `$uiViewScrollProvider.useAnchorScroll()`}.\n\t */\n\t this.$get = ['$anchorScroll', '$timeout', function ($anchorScroll, $timeout) {\n\t if (useAnchorScroll) {\n\t return $anchorScroll;\n\t }\n\t return function ($element) {\n\t return $timeout(function () {\n\t $element[0].scrollIntoView();\n\t }, 0, false);\n\t };\n\t }];\n\t}\n\tangular.module('ui.router.state').provider('$uiViewScroll', $ViewScrollProvider);\n\n\n/***/ }\n/******/ ])\n});\n;\n//# sourceMappingURL=angular-ui-router.js.map","!function(t){function e(n){if(i[n])return i[n].exports;var s=i[n]={i:n,l:!1,exports:{}};return t[n].call(s.exports,s,s.exports,e),s.l=!0,s.exports}var i={};e.m=t,e.c=i,e.i=function(t){return t},e.d=function(t,i,n){e.o(t,i)||Object.defineProperty(t,i,{configurable:!1,enumerable:!0,get:n})},e.n=function(t){var i=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(i,\"a\",i),i},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p=\"\",e(e.s=36)}([function(t,e){t.exports=jQuery},function(t,e,i){\"use strict\";function n(){return\"rtl\"===r()(\"html\").attr(\"dir\")}function s(t,e){return t=t||6,Math.round(Math.pow(36,t+1)-Math.random()*Math.pow(36,t)).toString(36).slice(1)+(e?\"-\"+e:\"\")}function o(t){var e,i={transition:\"transitionend\",WebkitTransition:\"webkitTransitionEnd\",MozTransition:\"transitionend\",OTransition:\"otransitionend\"},n=document.createElement(\"div\");for(var s in i)void 0!==n.style[s]&&(e=i[s]);return e||(e=setTimeout(function(){t.triggerHandler(\"transitionend\",[t])},1),\"transitionend\")}i.d(e,\"a\",function(){return n}),i.d(e,\"b\",function(){return s}),i.d(e,\"c\",function(){return o});var a=i(0),r=i.n(a)},function(t,e,i){\"use strict\";function n(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}function s(t){return t.replace(/([a-z])([A-Z])/g,\"$1-$2\").toLowerCase()}function o(t){return s(void 0!==t.constructor.name?t.constructor.name:t.className)}i.d(e,\"a\",function(){return u});var a=i(0),r=(i.n(a),i(1)),l=function(){function t(t,e){for(var i=0;i').appendTo(document.head);var e,i=o()(\".foundation-mq\").css(\"font-family\");e=n(i);for(var s in e)e.hasOwnProperty(s)&&t.queries.push({name:s,value:\"only screen and (min-width: \"+e[s]+\")\"});this.current=this._getCurrentSize(),this._watcher()},atLeast:function(t){var e=this.get(t);return!!e&&a(e).matches},is:function(t){return t=t.trim().split(\" \"),t.length>1&&\"only\"===t[1]?t[0]===this._getCurrentSize():this.atLeast(t[0])},get:function(t){for(var e in this.queries)if(this.queries.hasOwnProperty(e)){var i=this.queries[e];if(t===i.name)return i.value}return null},_getCurrentSize:function(){for(var t,e=0;e1&&void 0!==arguments[1]?arguments[1]:\"zf\";t.attr(\"role\",\"menubar\");var i=t.find(\"li\").attr({role:\"menuitem\"}),n=\"is-\"+e+\"-submenu\",o=n+\"-item\",a=\"is-\"+e+\"-submenu-parent\",r=\"accordion\"!==e;i.each(function(){var t=s()(this),i=t.children(\"ul\");i.length&&(t.addClass(a),i.addClass(\"submenu \"+n).attr({\"data-submenu\":\"\"}),r&&(t.attr({\"aria-haspopup\":!0,\"aria-label\":t.children(\"a:first\").text()}),\"drilldown\"===e&&t.attr({\"aria-expanded\":!1})),i.addClass(\"submenu \"+n).attr({\"data-submenu\":\"\",role:\"menu\"}),\"drilldown\"===e&&i.attr({\"aria-hidden\":!0})),t.parent(\"[data-submenu]\").length&&t.addClass(\"is-submenu-item \"+o)})},Burn:function(t,e){var i=\"is-\"+e+\"-submenu\",n=i+\"-item\",s=\"is-\"+e+\"-submenu-parent\";t.find(\">li, .menu, .menu > li\").removeClass(i+\" \"+n+\" \"+s+\" is-submenu-item submenu is-active\").removeAttr(\"data-submenu\").css(\"display\",\"\")}}},function(t,e,i){\"use strict\";function n(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}function s(){this.removeEventListener(\"touchmove\",o),this.removeEventListener(\"touchend\",s),g=!1}function o(t){if(f.a.spotSwipe.preventDefault&&t.preventDefault(),g){var e,i=t.touches[0].pageX,n=(t.touches[0].pageY,l-i);h=(new Date).getTime()-c,Math.abs(n)>=f.a.spotSwipe.moveThreshold&&h<=f.a.spotSwipe.timeThreshold&&(e=n>0?\"left\":\"right\"),e&&(t.preventDefault(),s.call(this),f()(this).trigger(\"swipe\",e).trigger(\"swipe\"+e))}}function a(t){1==t.touches.length&&(l=t.touches[0].pageX,u=t.touches[0].pageY,g=!0,c=(new Date).getTime(),this.addEventListener(\"touchmove\",o,!1),this.addEventListener(\"touchend\",s,!1))}function r(){this.addEventListener&&this.addEventListener(\"touchstart\",a,!1)}i.d(e,\"a\",function(){return m});var l,u,c,h,d=i(0),f=i.n(d),p=function(){function t(t,e){for(var i=0;i\")):n.attr({\"aria-controls\":o,\"aria-expanded\":a,id:e}),s.attr({\"aria-labelledby\":e,\"aria-hidden\":!a,role:\"group\",id:o})}),this.$element.find(\"li\").attr({role:\"treeitem\"});var e=this.$element.find(\".is-active\");if(e.length){var t=this;e.each(function(){t.down(r()(this))})}this._events()}},{key:\"_events\",value:function(){var t=this;this.$element.find(\"li\").each(function(){var e=r()(this).children(\"[data-submenu]\");e.length&&(t.options.submenuToggle?r()(this).children(\".submenu-toggle\").off(\"click.zf.accordionMenu\").on(\"click.zf.accordionMenu\",function(i){t.toggle(e)}):r()(this).children(\"a\").off(\"click.zf.accordionMenu\").on(\"click.zf.accordionMenu\",function(i){i.preventDefault(),t.toggle(e)}))}).on(\"keydown.zf.accordionmenu\",function(e){var i,n,s=r()(this),o=s.parent(\"ul\").children(\"li\"),a=s.children(\"[data-submenu]\");o.each(function(t){if(r()(this).is(s))return i=o.eq(Math.max(0,t-1)).find(\"a\").first(),n=o.eq(Math.min(t+1,o.length-1)).find(\"a\").first(),r()(this).children(\"[data-submenu]:visible\").length&&(n=s.find(\"li:first-child\").find(\"a\").first()),r()(this).is(\":first-child\")?i=s.parents(\"li\").first().find(\"a\").first():i.parents(\"li\").first().children(\"[data-submenu]:visible\").length&&(i=i.parents(\"li\").find(\"li:last-child\").find(\"a\").first()),void(r()(this).is(\":last-child\")&&(n=s.parents(\"li\").first().next(\"li\").find(\"a\").first()))}),l.a.handleKey(e,\"AccordionMenu\",{open:function(){a.is(\":hidden\")&&(t.down(a),a.find(\"li\").first().find(\"a\").first().focus())},close:function(){a.length&&!a.is(\":hidden\")?t.up(a):s.parent(\"[data-submenu]\").length&&(t.up(s.parent(\"[data-submenu]\")),s.parents(\"li\").first().find(\"a\").first().focus())},up:function(){return i.focus(),!0},down:function(){return n.focus(),!0},toggle:function(){return!t.options.submenuToggle&&(s.children(\"[data-submenu]\").length?(t.toggle(s.children(\"[data-submenu]\")),!0):void 0)},closeAll:function(){t.hideAll()},handled:function(t){t&&e.preventDefault(),e.stopImmediatePropagation()}})})}},{key:\"hideAll\",value:function(){this.up(this.$element.find(\"[data-submenu]\"))}},{key:\"showAll\",value:function(){this.down(this.$element.find(\"[data-submenu]\"))}},{key:\"toggle\",value:function(t){t.is(\":animated\")||(t.is(\":hidden\")?this.down(t):this.up(t))}},{key:\"down\",value:function(t){var e=this;this.options.multiOpen||this.up(this.$element.find(\".is-active\").not(t.parentsUntil(this.$element).add(t))),t.addClass(\"is-active\").attr({\"aria-hidden\":!1}),this.options.submenuToggle?t.prev(\".submenu-toggle\").attr({\"aria-expanded\":!0}):t.parent(\".is-accordion-submenu-parent\").attr({\"aria-expanded\":!0}),t.slideDown(e.options.slideSpeed,function(){e.$element.trigger(\"down.zf.accordionMenu\",[t])})}},{key:\"up\",value:function(t){var e=this;t.slideUp(e.options.slideSpeed,function(){e.$element.trigger(\"up.zf.accordionMenu\",[t])});var i=t.find(\"[data-submenu]\").slideUp(0).addBack().attr(\"aria-hidden\",!0);this.options.submenuToggle?i.prev(\".submenu-toggle\").attr(\"aria-expanded\",!1):i.parent(\".is-accordion-submenu-parent\").attr(\"aria-expanded\",!1)}},{key:\"_destroy\",value:function(){this.$element.find(\"[data-submenu]\").slideDown(0).css(\"display\",\"\"),this.$element.find(\"a\").off(\"click.zf.accordionMenu\"),this.options.submenuToggle&&(this.$element.find(\".has-submenu-toggle\").removeClass(\"has-submenu-toggle\"),this.$element.find(\".submenu-toggle\").remove()),u.a.Burn(this.$element,\"accordion\")}}]),e}(h.a);f.defaults={slideSpeed:250,submenuToggle:!1,submenuToggleText:\"Toggle menu\",multiOpen:!0}},function(t,e,i){\"use strict\";function n(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}function s(t,e){if(!t)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return!e||\"object\"!=typeof e&&\"function\"!=typeof e?t:e}function o(t,e){if(\"function\"!=typeof e&&null!==e)throw new TypeError(\"Super expression must either be null or a function, not \"+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}i.d(e,\"a\",function(){return p});var a=i(0),r=i.n(a),l=i(3),u=i(9),c=i(1),h=i(7),d=i(2),f=function(){function t(t,e){for(var i=0;i \").addClass(\"reveal-overlay\"+t).appendTo(this.options.appendTo)}},{key:\"_updatePosition\",value:function(){var t,e,i=this.$element.outerWidth(),n=c()(window).width(),s=this.$element.outerHeight(),o=c()(window).height();t=\"auto\"===this.options.hOffset?parseInt((n-i)/2,10):parseInt(this.options.hOffset,10),e=\"auto\"===this.options.vOffset?s>o?parseInt(Math.min(100,o/10),10):parseInt((o-s)/4,10):parseInt(this.options.vOffset,10),this.$element.css({top:e+\"px\"}),this.$overlay&&\"auto\"===this.options.hOffset||(this.$element.css({left:t+\"px\"}),this.$element.css({margin:\"0px\"}))}},{key:\"_events\",value:function(){var t=this,e=this;this.$element.on({\"open.zf.trigger\":this.open.bind(this),\"close.zf.trigger\":function(i,n){if(i.target===e.$element[0]||c()(i.target).parents(\"[data-closable]\")[0]===n)return t.close.apply(t)},\"toggle.zf.trigger\":this.toggle.bind(this),\"resizeme.zf.trigger\":function(){e._updatePosition()}}),this.options.closeOnClick&&this.options.overlay&&this.$overlay.off(\".zf.reveal\").on(\"click.zf.reveal\",function(t){t.target!==e.$element[0]&&!c.a.contains(e.$element[0],t.target)&&c.a.contains(document,t.target)&&e.close()}),this.options.deepLink&&c()(window).on(\"popstate.zf.reveal:\"+this.id,this._handleState.bind(this))}},{key:\"_handleState\",value:function(t){window.location.hash!==\"#\"+this.id||this.isActive?this.close():this.open()}},{key:\"open\",value:function(){function t(){n.isMobile?(n.originalScrollPos||(n.originalScrollPos=window.pageYOffset),c()(\"html, body\").addClass(\"is-reveal-open\")):c()(\"body\").addClass(\"is-reveal-open\")}var e=this;if(this.options.deepLink){var i=\"#\"+this.id;window.history.pushState?this.options.updateHistory?window.history.pushState({},\"\",i):window.history.replaceState({},\"\",i):window.location.hash=i}this.isActive=!0,this.$element.css({visibility:\"hidden\"}).show().scrollTop(0),this.options.overlay&&this.$overlay.css({visibility:\"hidden\"}).show(),this._updatePosition(),this.$element.hide().css({visibility:\"\"}),this.$overlay&&(this.$overlay.css({visibility:\"\"}).hide(),this.$element.hasClass(\"fast\")?this.$overlay.addClass(\"fast\"):this.$element.hasClass(\"slow\")&&this.$overlay.addClass(\"slow\")),this.options.multipleOpened||this.$element.trigger(\"closeme.zf.reveal\",this.id);var n=this;if(this.options.animationIn){var s=function(){n.$element.attr({\"aria-hidden\":!1,tabindex:-1}).focus(),t(),h.a.trapFocus(n.$element)};this.options.overlay&&f.a.animateIn(this.$overlay,\"fade-in\"),f.a.animateIn(this.$element,this.options.animationIn,function(){e.$element&&(e.focusableElements=h.a.findFocusable(e.$element),s())})}else this.options.overlay&&this.$overlay.show(0),this.$element.show(this.options.showDelay);this.$element.attr({\"aria-hidden\":!1,tabindex:-1}).focus(),h.a.trapFocus(this.$element),t(),this._extraHandlers(),this.$element.trigger(\"open.zf.reveal\")}},{key:\"_extraHandlers\",value:function(){var t=this;this.$element&&(this.focusableElements=h.a.findFocusable(this.$element),this.options.overlay||!this.options.closeOnClick||this.options.fullScreen||c()(\"body\").on(\"click.zf.reveal\",function(e){e.target!==t.$element[0]&&!c.a.contains(t.$element[0],e.target)&&c.a.contains(document,e.target)&&t.close()}),this.options.closeOnEsc&&c()(window).on(\"keydown.zf.reveal\",function(e){h.a.handleKey(e,\"Reveal\",{close:function(){t.options.closeOnEsc&&t.close()}})}))}},{key:\"close\",value:function(){function t(){e.isMobile?(0===c()(\".reveal:visible\").length&&c()(\"html, body\").removeClass(\"is-reveal-open\"),e.originalScrollPos&&(c()(\"body\").scrollTop(e.originalScrollPos),e.originalScrollPos=null)):0===c()(\".reveal:visible\").length&&c()(\"body\").removeClass(\"is-reveal-open\"),h.a.releaseFocus(e.$element),e.$element.attr(\"aria-hidden\",!0),e.$element.trigger(\"closed.zf.reveal\")}if(!this.isActive||!this.$element.is(\":visible\"))return!1;var e=this;this.options.animationOut?(this.options.overlay&&f.a.animateOut(this.$overlay,\"fade-out\"),f.a.animateOut(this.$element,this.options.animationOut,t)):(this.$element.hide(this.options.hideDelay),this.options.overlay?this.$overlay.hide(0,t):t()),this.options.closeOnEsc&&c()(window).off(\"keydown.zf.reveal\"),!this.options.overlay&&this.options.closeOnClick&&c()(\"body\").off(\"click.zf.reveal\"),this.$element.off(\"keydown.zf.reveal\"),this.options.resetOnClose&&this.$element.html(this.$element.html()),this.isActive=!1,e.options.deepLink&&(window.history.replaceState?window.history.replaceState(\"\",document.title,window.location.href.replace(\"#\"+this.id,\"\")):window.location.hash=\"\"),this.$anchor.focus()}},{key:\"toggle\",value:function(){this.isActive?this.close():this.open()}},{key:\"_destroy\",value:function(){this.options.overlay&&(this.$element.appendTo(c()(this.options.appendTo)),this.$overlay.hide().off().remove()),this.$element.hide().off(),this.$anchor.off(\".zf\"),c()(window).off(\".zf.reveal:\"+this.id)}}]),e}(p.a);v.defaults={animationIn:\"\",animationOut:\"\",showDelay:0,hideDelay:0,closeOnClick:!0,closeOnEsc:!0,multipleOpened:!1,vOffset:\"auto\",hOffset:\"auto\",fullScreen:!1,btmOffsetPct:10,overlay:!0,resetOnClose:!1,deepLink:!1,updateHistory:!1,appendTo:\"body\",additionalOverlayClasses:\"\"}},function(t,e,i){\"use strict\";function n(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}function s(t,e){if(!t)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return!e||\"object\"!=typeof e&&\"function\"!=typeof e?t:e}function o(t,e){if(\"function\"!=typeof e&&null!==e)throw new TypeError(\"Super expression must either be null or a function, not \"+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function a(t,e){return t/e}function r(t,e,i,n){return Math.abs(t.position()[e]+t[n]()/2-i)}function l(t,e){return Math.log(e)/Math.log(t)}i.d(e,\"a\",function(){return b});var u=i(0),c=i.n(u),h=i(3),d=i(6),f=i(1),p=i(2),m=i(10),g=i(5),v=function(){function t(t,e){for(var i=0;i1?this.inputs.eq(1):c()(\"#\"+this.$handle2.attr(\"aria-controls\")),this.inputs[1]||(this.inputs=this.inputs.add(this.$input2)),!0,this._setInitAttr(1)),this.setHandles(),this._events()}},{key:\"setHandles\",value:function(){var t=this;this.handles[1]?this._setHandlePos(this.$handle,this.inputs.eq(0).val(),!0,function(){t._setHandlePos(t.$handle2,t.inputs.eq(1).val(),!0)}):this._setHandlePos(this.$handle,this.inputs.eq(0).val(),!0)}},{key:\"_reflow\",value:function(){this.setHandles()}},{key:\"_pctOfBar\",value:function(t){var e=a(t-this.options.start,this.options.end-this.options.start);switch(this.options.positionValueFunction){case\"pow\":e=this._logTransform(e);break;case\"log\":e=this._powTransform(e)}return e.toFixed(2)}},{key:\"_value\",value:function(t){switch(this.options.positionValueFunction){case\"pow\":t=this._powTransform(t);break;case\"log\":t=this._logTransform(t)}\nreturn(this.options.end-this.options.start)*t+this.options.start}},{key:\"_logTransform\",value:function(t){return l(this.options.nonLinearBase,t*(this.options.nonLinearBase-1)+1)}},{key:\"_powTransform\",value:function(t){return(Math.pow(this.options.nonLinearBase,t)-1)/(this.options.nonLinearBase-1)}},{key:\"_setHandlePos\",value:function(t,e,n,s){if(!this.$element.hasClass(this.options.disabledClass)){e=parseFloat(e),ethis.options.end&&(e=this.options.end);var o=this.options.doubleSided;if(this.options.vertical&&!n&&(e=this.options.end-e),o)if(0===this.handles.index(t)){var r=parseFloat(this.$handle2.attr(\"aria-valuenow\"));e=e>=r?r-this.options.step:e}else{var l=parseFloat(this.$handle.attr(\"aria-valuenow\"));e=e<=l?l+this.options.step:e}var u=this,c=this.options.vertical,h=c?\"height\":\"width\",f=c?\"top\":\"left\",p=t[0].getBoundingClientRect()[h],m=this.$element[0].getBoundingClientRect()[h],g=this._pctOfBar(e),v=(m-p)*g,b=(100*a(v,m)).toFixed(this.options.decimal);e=parseFloat(e.toFixed(this.options.decimal));var y={};if(this._setValues(t,e),o){var w,_=0===this.handles.index(t),$=~~(100*a(p,m));if(_)y[f]=b+\"%\",w=parseFloat(this.$handle2[0].style[f])-b+$,s&&\"function\"==typeof s&&s();else{var k=parseFloat(this.$handle[0].style[f]);w=b-(isNaN(k)?(this.options.initialStart-this.options.start)/((this.options.end-this.options.start)/100):k)+$}y[\"min-\"+h]=w+\"%\"}this.$element.one(\"finished.zf.animate\",function(){u.$element.trigger(\"moved.zf.slider\",[t])});var C=this.$element.data(\"dragging\")?1e3/60:this.options.moveTime;i.i(d.b)(C,t,function(){isNaN(b)?t.css(f,100*g+\"%\"):t.css(f,b+\"%\"),u.options.doubleSided?u.$fill.css(y):u.$fill.css(h,100*g+\"%\")}),clearTimeout(u.timeout),u.timeout=setTimeout(function(){u.$element.trigger(\"changed.zf.slider\",[t])},u.options.changedDelay)}}},{key:\"_setInitAttr\",value:function(t){var e=0===t?this.options.initialStart:this.options.initialEnd,n=this.inputs.eq(t).attr(\"id\")||i.i(f.b)(6,\"slider\");this.inputs.eq(t).attr({id:n,max:this.options.end,min:this.options.start,step:this.options.step}),this.inputs.eq(t).val(e),this.handles.eq(t).attr({role:\"slider\",\"aria-controls\":n,\"aria-valuemax\":this.options.end,\"aria-valuemin\":this.options.start,\"aria-valuenow\":e,\"aria-orientation\":this.options.vertical?\"vertical\":\"horizontal\",tabindex:0})}},{key:\"_setValues\",value:function(t,e){var i=this.options.doubleSided?this.handles.index(t):0;this.inputs.eq(i).val(e),t.attr(\"aria-valuenow\",e)}},{key:\"_handleEvent\",value:function(t,e,n){var s,o;if(n)s=this._adjustValue(null,n),o=!0;else{t.preventDefault();var l=this,u=this.options.vertical,h=u?\"height\":\"width\",d=u?\"top\":\"left\",p=u?t.pageY:t.pageX,m=(this.$handle[0].getBoundingClientRect()[h],this.$element[0].getBoundingClientRect()[h]),g=u?c()(window).scrollTop():c()(window).scrollLeft(),v=this.$element.offset()[d];t.clientY===t.pageY&&(p+=g);var b,y=p-v;b=y<0?0:y>m?m:y;var w=a(b,m);if(s=this._value(w),i.i(f.a)()&&!this.options.vertical&&(s=this.options.end-s),s=l._adjustValue(null,s),o=!1,!e){e=r(this.$handle,d,b,h)<=r(this.$handle2,d,b,h)?this.$handle:this.$handle2}}this._setHandlePos(e,s,o)}},{key:\"_adjustValue\",value:function(t,e){var i,n,s,o,a=this.options.step,r=parseFloat(a/2);return i=t?parseFloat(t.attr(\"aria-valuenow\")):e,n=i%a,s=i-n,o=s+a,0===n?i:i=i>=s+r?o:s}},{key:\"_events\",value:function(){this._eventsForHandle(this.$handle),this.handles[1]&&this._eventsForHandle(this.$handle2)}},{key:\"_eventsForHandle\",value:function(t){var e,i=this;if(this.inputs.off(\"change.zf.slider\").on(\"change.zf.slider\",function(t){var e=i.inputs.index(c()(this));i._handleEvent(t,i.handles.eq(e),c()(this).val())}),this.options.clickSelect&&this.$element.off(\"click.zf.slider\").on(\"click.zf.slider\",function(t){if(i.$element.data(\"dragging\"))return!1;c()(t.target).is(\"[data-slider-handle]\")||(i.options.doubleSided?i._handleEvent(t):i._handleEvent(t,i.$handle))}),this.options.draggable){this.handles.addTouch();var n=c()(\"body\");t.off(\"mousedown.zf.slider\").on(\"mousedown.zf.slider\",function(s){t.addClass(\"is-dragging\"),i.$fill.addClass(\"is-dragging\"),i.$element.data(\"dragging\",!0),e=c()(s.currentTarget),n.on(\"mousemove.zf.slider\",function(t){t.preventDefault(),i._handleEvent(t,e)}).on(\"mouseup.zf.slider\",function(s){i._handleEvent(s,e),t.removeClass(\"is-dragging\"),i.$fill.removeClass(\"is-dragging\"),i.$element.data(\"dragging\",!1),n.off(\"mousemove.zf.slider mouseup.zf.slider\")})}).on(\"selectstart.zf.slider touchmove.zf.slider\",function(t){t.preventDefault()})}t.off(\"keydown.zf.slider\").on(\"keydown.zf.slider\",function(t){var e,n=c()(this),s=i.options.doubleSided?i.handles.index(n):0,o=parseFloat(i.inputs.eq(s).val());h.a.handleKey(t,\"Slider\",{decrease:function(){e=o-i.options.step},increase:function(){e=o+i.options.step},decrease_fast:function(){e=o-10*i.options.step},increase_fast:function(){e=o+10*i.options.step},min:function(){e=i.options.start},max:function(){e=i.options.end},handled:function(){t.preventDefault(),i._setHandlePos(n,e,!0)}})})}},{key:\"_destroy\",value:function(){this.handles.off(\".zf.slider\"),this.inputs.off(\".zf.slider\"),this.$element.off(\".zf.slider\"),clearTimeout(this.timeout)}}]),e}(p.a);b.defaults={start:0,end:100,step:1,initialStart:0,initialEnd:100,binding:!1,clickSelect:!0,vertical:!1,draggable:!0,disabled:!1,doubleSided:!1,decimal:2,moveTime:200,disabledClass:\"disabled\",invertVertical:!1,changedDelay:500,nonLinearBase:5,positionValueFunction:\"linear\"}},function(t,e,i){\"use strict\";function n(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}function s(t,e){if(!t)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return!e||\"object\"!=typeof e&&\"function\"!=typeof e?t:e}function o(t,e){if(\"function\"!=typeof e&&null!==e)throw new TypeError(\"Super expression must either be null or a function, not \"+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function a(t){return parseInt(window.getComputedStyle(document.body,null).fontSize,10)*t}i.d(e,\"a\",function(){return p});var r=i(0),l=i.n(r),u=i(1),c=i(4),h=i(2),d=i(5),f=function(){function t(t,e){for(var i=0;i=n.topPoint))}),n._events(e.split(\"-\").reverse().join(\"-\"))})}},{key:\"_parsePoints\",value:function(){for(var t=\"\"==this.options.topAnchor?1:this.options.topAnchor,e=\"\"==this.options.btmAnchor?document.documentElement.scrollHeight:this.options.btmAnchor,i=[t,e],n={},s=0,o=i.length;s=this.topPoint?e<=this.bottomPoint?this.isStuck||this._setSticky():this.isStuck&&this._removeSticky(!1):this.isStuck&&this._removeSticky(!0)}},{key:\"_setSticky\",value:function(){var t=this,e=this.options.stickTo,i=\"top\"===e?\"marginTop\":\"marginBottom\",n=\"top\"===e?\"bottom\":\"top\",s={};s[i]=this.options[i]+\"em\",s[e]=0,s[n]=\"auto\",this.isStuck=!0,this.$element.removeClass(\"is-anchored is-at-\"+n).addClass(\"is-stuck is-at-\"+e).css(s).trigger(\"sticky.zf.stuckto:\"+e),this.$element.on(\"transitionend webkitTransitionEnd oTransitionEnd otransitionend MSTransitionEnd\",function(){t._setSizes()})}},{key:\"_removeSticky\",value:function(t){var e=this.options.stickTo,i=\"top\"===e,n={},s=(this.points?this.points[1]-this.points[0]:this.anchorHeight)-this.elemHeight,o=i?\"marginTop\":\"marginBottom\",a=t?\"top\":\"bottom\";n[o]=0,n.bottom=\"auto\",n.top=t?0:s,this.isStuck=!1,this.$element.removeClass(\"is-stuck is-at-\"+e).addClass(\"is-anchored is-at-\"+a).css(n).trigger(\"sticky.zf.unstuckfrom:\"+a)}},{key:\"_setSizes\",value:function(t){this.canStick=c.a.is(this.options.stickyOn),this.canStick||t&&\"function\"==typeof t&&t();var e=this.$container[0].getBoundingClientRect().width,i=window.getComputedStyle(this.$container[0]),n=parseInt(i[\"padding-left\"],10),s=parseInt(i[\"padding-right\"],10);this.$anchor&&this.$anchor.length?this.anchorHeight=this.$anchor[0].getBoundingClientRect().height:this._parsePoints(),this.$element.css({\"max-width\":e-n-s+\"px\"});var o=this.$element[0].getBoundingClientRect().height||this.containerHeight;if(\"none\"==this.$element.css(\"display\")&&(o=0),this.containerHeight=o,this.$container.css({height:o}),this.elemHeight=o,!this.isStuck&&this.$element.hasClass(\"is-at-bottom\")){var a=(this.points?this.points[1]-this.$container.offset().top:this.anchorHeight)-this.elemHeight;this.$element.css(\"top\",a)}this._setBreakPoints(o,function(){t&&\"function\"==typeof t&&t()})}},{key:\"_setBreakPoints\",value:function(t,e){if(!this.canStick){if(!e||\"function\"!=typeof e)return!1;e()}var i=a(this.options.marginTop),n=a(this.options.marginBottom),s=this.points?this.points[0]:this.$anchor.offset().top,o=this.points?this.points[1]:s+this.anchorHeight,r=window.innerHeight;\"top\"===this.options.stickTo?(s-=i,o-=t+i):\"bottom\"===this.options.stickTo&&(s-=r-(t+n),o-=r-n),this.topPoint=s,this.bottomPoint=o,e&&\"function\"==typeof e&&e()}},{key:\"_destroy\",value:function(){this._removeSticky(!0),this.$element.removeClass(this.options.stickyClass+\" is-anchored is-at-top\").css({height:\"\",top:\"\",bottom:\"\",\"max-width\":\"\"}).off(\"resizeme.zf.trigger\").off(\"mutateme.zf.trigger\"),this.$anchor&&this.$anchor.length&&this.$anchor.off(\"change.zf.sticky\"),l()(window).off(this.scrollListener),this.wasWrapped?this.$element.unwrap():this.$container.removeClass(this.options.containerClass).css({height:\"\"})}}]),e}(h.a);p.defaults={container:\"\",stickTo:\"top\",anchor:\"\",topAnchor:\"\",btmAnchor:\"\",marginTop:1,marginBottom:1,stickyOn:\"medium\",stickyClass:\"sticky\",containerClass:\"sticky-container\",checkEvery:-1}},function(t,e,i){\"use strict\";function n(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}function s(t,e){if(!t)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return!e||\"object\"!=typeof e&&\"function\"!=typeof e?t:e}function o(t,e){if(\"function\"!=typeof e&&null!==e)throw new TypeError(\"Super expression must either be null or a function, not \"+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}i.d(e,\"a\",function(){return d});var a=i(0),r=i.n(a),l=i(6),u=i(2),c=i(5),h=function(){function t(t,e){for(var i=0;i\").addClass(e).attr({role:\"tooltip\",\"aria-hidden\":!0,\"data-is-active\":!1,\"data-is-focus\":!1,id:t})}},{key:\"_setPosition\",value:function(){f(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),\"_setPosition\",this).call(this,this.$element,this.template)}},{key:\"show\",value:function(){if(\"all\"!==this.options.showOn&&!u.a.is(this.options.showOn))return!1;var t=this;this.template.css(\"visibility\",\"hidden\").show(),this._setPosition(),this.template.removeClass(\"top bottom left right\").addClass(this.position),this.template.removeClass(\"align-top align-bottom align-left align-right align-center\").addClass(\"align-\"+this.alignment),this.$element.trigger(\"closeme.zf.tooltip\",this.template.attr(\"id\")),this.template.attr({\"data-is-active\":!0,\"aria-hidden\":!1}),t.isActive=!0,this.template.stop().hide().css(\"visibility\",\"\").fadeIn(this.options.fadeInDuration,function(){}),this.$element.trigger(\"show.zf.tooltip\")}},{key:\"hide\",value:function(){var t=this;this.template.stop().attr({\"aria-hidden\":!0,\"data-is-active\":!1}).fadeOut(this.options.fadeOutDuration,function(){t.isActive=!1,t.isClick=!1}),this.$element.trigger(\"hide.zf.tooltip\")}},{key:\"_events\",value:function(){var t=this,e=(this.template,!1);this.options.disableHover||this.$element.on(\"mouseenter.zf.tooltip\",function(e){t.isActive||(t.timeout=setTimeout(function(){t.show()},t.options.hoverDelay))}).on(\"mouseleave.zf.tooltip\",function(i){clearTimeout(t.timeout),(!e||t.isClick&&!t.options.clickOpen)&&t.hide()}),this.options.clickOpen?this.$element.on(\"mousedown.zf.tooltip\",function(e){e.stopImmediatePropagation(),t.isClick||(t.isClick=!0,!t.options.disableHover&&t.$element.attr(\"tabindex\")||t.isActive||t.show())}):this.$element.on(\"mousedown.zf.tooltip\",function(e){e.stopImmediatePropagation(),t.isClick=!0}),this.options.disableForTouch||this.$element.on(\"tap.zf.tooltip touchend.zf.tooltip\",function(e){t.isActive?t.hide():t.show()}),this.$element.on({\"close.zf.trigger\":this.hide.bind(this)}),this.$element.on(\"focus.zf.tooltip\",function(i){if(e=!0,t.isClick)return t.options.clickOpen||(e=!1),!1;t.show()}).on(\"focusout.zf.tooltip\",function(i){e=!1,t.isClick=!1,t.hide()}).on(\"resizeme.zf.trigger\",function(){t.isActive&&t._setPosition()})}},{key:\"toggle\",value:function(){this.isActive?this.hide():this.show()}},{key:\"_destroy\",value:function(){this.$element.attr(\"title\",this.template.text()).off(\".zf.trigger .zf.tooltip\").removeClass(\"has-tip top right left\").removeAttr(\"aria-describedby aria-haspopup data-disable-hover data-resize data-toggle data-tooltip data-yeti-box\"),this.template.remove()}}]),e}(h.a);p.defaults={disableForTouch:!1,hoverDelay:200,fadeInDuration:150,fadeOutDuration:150,disableHover:!1,templateClasses:\"\",tooltipClass:\"tooltip\",triggerClass:\"has-tip\",showOn:\"small\",template:\"\",tipText:\"\",touchCloseText:\"Tap to close.\",clickOpen:!0,positionClass:\"\",position:\"auto\",alignment:\"auto\",allowOverlap:!1,allowBottomOverlap:!1,vOffset:0,hOffset:0,tooltipHeight:14,tooltipWidth:12,allowHtml:!1}},function(t,e,i){t.exports=i(19)}]);","(function () {\r\n angular.module('utility', ['ngSanitize'])\r\n .factory('bmgLogger', bmgLogger)\r\n .filter('trustAsResourceUrl', trustAsResourceUrl)\r\n .filter('trustAsMarkup', trustAsMarkup)\r\n .filter('toBackground', toBackground)\r\n .filter('checkboxSet', checkboxSet)\r\n .filter('dateSuffix', dateSuffix)\r\n .filter('getCropUrl', getCropUrl)\r\n .filter('trimNumber', trimNumber)\r\n .filter('hasActive', hasActive)\r\n .filter('wrapMatches', wrapMatches)\r\n .filter('groupBy', groupBy)\r\n .directive('bmgSrc', bmgSrc)\r\n .directive('onError', onError)\r\n .directive('onEnter', onEnter)\r\n .directive('capHeight', capHeight)\r\n .filter('toMonth', toMonth);\r\n trustAsResourceUrl.$inject = ['$sce'];\r\n dateSuffix.$inject = ['$filter'];\r\n\r\n function groupBy() {\r\n return function (items, group) { \r\n return items.filter(function (element, index, array) {\r\n return element.groupName == group;\r\n });\r\n }\r\n }\r\n\r\n function trustAsResourceUrl($sce) {\r\n return function (val) {\r\n return $sce.trustAsResourceUrl(val);\r\n }\r\n }\r\n trustAsMarkup.$inject = ['$sce'];\r\n function trustAsMarkup($sce) {\r\n return function (val) {\r\n if (!!val) {\r\n val = val.replace(/style=\"float\\: left;\"/g, 'class=\"left rte\"');\r\n val = val.replace(/style=\"float\\: right;\"/g, 'class=\"right rte\"');\r\n val = val.replace(/