@pixodesk/svg-animator-web 1.0.30 → 1.0.34
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -9
- package/dist/index.cjs +247 -87
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +247 -87
- package/dist/index.js.map +1 -1
- package/dist/index.min.cjs +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.prerendered-waapi.umd.js +135 -17
- package/dist/index.prerendered-waapi.umd.js.map +1 -1
- package/dist/index.prerendered-waapi.umd.min.js +1 -1
- package/dist/index.prerendered.umd.js +136 -18
- package/dist/index.prerendered.umd.js.map +1 -1
- package/dist/index.prerendered.umd.min.js +1 -1
- package/dist/{index.umd.js → pixodesk-svg-animator.umd.js} +240 -86
- package/dist/pixodesk-svg-animator.umd.js.map +1 -0
- package/dist/pixodesk-svg-animator.umd.min.js +1 -0
- package/package.json +5 -5
- package/dist/index.umd.js.map +0 -1
- package/dist/index.umd.min.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var PixodeskAnimator=(()=>{var n=Object.defineProperty,t=Object.defineProperties,e=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyDescriptors,r=Object.getOwnPropertyNames,l=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,u=Object.prototype.propertyIsEnumerable,c=(t,e,o)=>e in t?n(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o,s=(n,t)=>{for(var e in t||(t={}))i.call(t,e)&&c(n,e,t[e]);if(l)for(var e of l(t))u.call(t,e)&&c(n,e,t[e]);return n},a=(n,e)=>t(n,o(e)),f={};function v(n,t=!1){var e,o,r,l;const i=n.v,u=n.i,c=n.o,s=n.c;if(!i.length)return"";const a=[],f=i.length;a.push("M"+i[0][0]+","+i[0][1]);for(let n=1;n<f;n++){const r=i[n-1],l=null!=(e=null==c?void 0:c[n-1])?e:r,s=null!=(o=null==u?void 0:u[n])?o:i[n],f=i[n];t||l[0]!==r[0]||l[1]!==r[1]||s[0]!==f[0]||s[1]!==f[1]?a.push("C"+l[0]+","+l[1]+","+s[0]+","+s[1]+","+f[0]+","+f[1]):a.push("L"+f[0]+","+f[1])}if(s&&f>0){const n=i[f-1],e=null!=(r=null==c?void 0:c[f-1])?r:n,o=null!=(l=null==u?void 0:u[0])?l:i[0],s=i[0];!t&&e[0]===n[0]&&e[1]===n[1]&&o[0]===s[0]&&o[1]===s[1]||a.push("C"+e[0]+","+e[1]+","+o[0]+","+o[1]+","+s[0]+","+s[1]),a.push("z")}return a.join("")}function d(n,t,e){return n+(t-n)*e}function m(n,t,e){const o=[],r=Math.max(n.length,t.length);for(let l=0;l<r;l++)o[l]=d(n[l]||0,t[l]||0,e);return o}function y(n,t,e){return[d(n[0]||0,t[0]||0,e),d(n[1]||0,t[1]||0,e),d(n[2]||0,t[2]||0,e),d(void 0===n[3]?1:n[3],void 0===t[3]?1:t[3],e)]}function p(n,t,e){const o=Math.max(n.length,t.length),r=[];for(let l=0;l<o;l++)r.push(b(n[l],t[l],e));return r}function b(n,t,e){var o,r,l,i,u,c,s,a,f;if(!n||!t)return n||t||{v:[]};const v=Math.min(Math.max(e,0),1),d=Math.min(n.v.length,t.v.length),y=[],p=[],b=[];for(let e=0;e<d;e++){const f=n.v[e],d=t.v[e];y.push(m(f,d,v));const h=null!=(r=null==(o=n.i)?void 0:o[e])?r:f,g=null!=(i=null==(l=t.i)?void 0:l[e])?i:d;p.push(m(h,g,v));const w=null!=(c=null==(u=n.o)?void 0:u[e])?c:f,A=null!=(a=null==(s=t.o)?void 0:s[e])?a:d;b.push(m(w,A,v))}return{v:y,i:p.length?p:void 0,o:b.length?b:void 0,c:null!=(f=n.c)?f:t.c}}function h(n,t,e){if(e<=0)return 0;if(e>=1)return 1;const o=3*n,r=3*(t-n)-o,l=1-o-r;function i(n){return((l*n+r)*n+o)*n}function u(n){return(3*l*n+2*r)*n+o}let c=e,s=0,a=1;for(let n=0;n<8;n++){const n=i(c)-e;if(Math.abs(n)<1e-6)return c;const t=u(c);if(Math.abs(t)<1e-6)break;c-=n/t}for(c=e;s<a;){const n=i(c);if(Math.abs(n-e)<1e-6)return c;e>n?s=c:a=c,c=(a+s)/2}return c}function g(n){const[t,e,o,r]=n,l=3*e,i=3*(r-e)-l,u=1-l-i;return function(n){return e=h(t,o,n),((u*e+i)*e+l)*e;var e}}function w(n,t,e){return[n[0]+(t[0]-n[0])*e,n[1]+(t[1]-n[1])*e]}function A(n,t){if(!n)return{left:void 0,right:void 0};if(t<=0)return{left:void 0,right:n};if(t>=1)return{left:n,right:void 0};const[e,o,r,l]=n,i=h(e,r,t),u=[e,o],c=[r,l],{left:s,right:a}=function(n,t,e,o,r){const l=w(n,t,r),i=w(t,e,r),u=w(e,o,r),c=w(l,i,r),s=w(i,u,r),a=w(c,s,r);return{left:[n,l,c,a],right:[a,s,u,o]}}([0,0],u,c,[1,1],i),f=s[3][0],v=s[3][1];let d,m;f>1e-9&&Math.abs(v)>1e-9&&(d=[s[1][0]/f,s[1][1]/v,s[2][0]/f,s[2][1]/v]);const y=1-f,p=1-v;return y>1e-9&&Math.abs(p)>1e-9&&(m=[(a[1][0]-f)/y,(a[1][1]-v)/p,(a[2][0]-f)/y,(a[2][1]-v)/p]),{left:d,right:m}}function M(n){if(n)return[1-n[2],1-n[3],1-n[0],1-n[1]]}function k(n){const t=Math.round(255*n[0]),e=Math.round(255*n[1]),o=Math.round(255*n[2]);return 4===n.length?"rgba("+t+","+e+","+o+","+n[3]+")":"rgb("+t+","+e+","+o+")"}function j(n){if(n){if(Array.isArray(n))return n;if("string"==typeof n)return n.startsWith("#")?function(n){const t=n.slice(1),e=t.length<=4,o=e?t[0]+t[0]:t.slice(0,2),r=e?t[1]+t[1]:t.slice(2,4),l=e?t[2]+t[2]:t.slice(4,6),i=4===t.length?t[3]+t[3]:8===t.length?t.slice(6,8):null,u=[parseInt(o,16)/255,parseInt(r,16)/255,parseInt(l,16)/255];return null!==i&&u.push(parseInt(i,16)/255),u}(n):n.startsWith("rgb")?function(n){var t;const e=null==(t=n.match(/rgba?\((.*)\)/))?void 0:t[1];if(!e)throw new Error("Invalid rgb/rgba format");const o=e.split(",").map(n=>+n.trim());return[o[0]/255,o[1]/255,o[2]/255,...void 0!==o[3]?[o[3]]:[]]}(n):void console.warn("Unsupported color format: "+n)}}((t,e)=>{for(var o in e)n(t,o,{get:e[o],enumerable:!0})})(f,{PX_ANIMATOR_DATA_KEY:()=>Yn,createAnimator:()=>Zn,setupAnimationTriggers:()=>Tn});var O=new Set(["color","fill","flood-color","lighting-color","stop-color","stroke"]),x=new Set(["translate","rotate","scale","skew"]),N=new Set(["offset-distance","offsetDistance"]);function S(n,t){var e;if(!n)return"";const o=null==(e=null==t?void 0:t.l)||e,r=[],l=n.translate,i=n.origin,u=n.rotate,c=n.skew,s=n.scale,a=o?"px":"",f=o?"deg":"";return l&&r.push("translate("+l[0]+a+","+l[1]+a+")"),i&&r.push("translate("+i[0]+a+","+i[1]+a+")"),null!=u&&r.push("rotate("+u+f+")"),null!=c&&r.push("skewX("+c+f+")"),s&&r.push("scale("+s[0]+","+s[1]+")"),i&&r.push("translate("+-i[0]+a+","+-i[1]+a+")"),r.join("")}var C=new Set(["offset-distance","offsetDistance"]),T=1e3;function z(n){return!n.includes("-")&&/[a-z][A-Z]/.test(n)}var U=new Set(["viewBox","preserveAspectRatio","gradientUnits","gradientTransform","spreadMethod","patternUnits","patternContentUnits","patternTransform","clipPathUnits","maskUnits","maskContentUnits","markerUnits","markerWidth","markerHeight","refX","refY","textLength","lengthAdjust","startOffset","filterUnits","primitiveUnits","tableValues","stdDeviation","baseFrequency","numOctaves","surfaceScale","diffuseConstant","specularConstant","specularExponent","kernelMatrix","kernelUnitLength","edgeMode","preserveAlpha","targetX","targetY"]);function F(n){return U.has(n)?n:n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}function R(n,t,e){return Math.max(t,Math.min(n,e))}function P(n,t,e,o,r){if(r<=0)return[n[0],n[1]];if(r>=1)return[o[0],o[1]];const l=1-r,i=l*l,u=r*r,c=i*l,s=3*r*i,a=3*u*l,f=u*r;return[c*n[0]+s*t[0]+a*e[0]+f*o[0],c*n[1]+s*t[1]+a*e[1]+f*o[1]]}var I=1e-4;function D(n,t,e,o,r){const l=E(n,t,e,o,r);return 0===l[0]&&0===l[1]?E(n,t,e,o,r<.5?r+I:r-I):l}function E(n,t,e,o,r){const l=1-r,i=3*l*l,u=6*r*l,c=3*r*r;return[i*(t[0]-n[0])+u*(e[0]-t[0])+c*(o[0]-e[0]),i*(t[1]-n[1])+u*(e[1]-t[1])+c*(o[1]-e[1])]}function L(n,t){const{ts:e,ds:o}=n,r=e.length-1;if(t<=e[0])return o[0];if(t>=e[r])return o[r];let l=1,i=r;for(;l<i;){const n=l+i>>>1;e[n]<t?l=n+1:i=n}const u=e[i-1],c=e[i]-u,s=c>0?(t-u)/c:0;return o[i-1]+s*(o[i]-o[i-1])}function _(n){return"scroll"===(null==n?void 0:n.timelineSource)}var q="cover";function K(n,t,e,o){var r;const[l,i]=function(n,t,e){const o=t,r=e;switch(n){case"cover":return[0,o+r];case"entry":return[0,Math.min(o,r)];case"contain":return[Math.min(o,r),Math.max(o,r)];case"exit":return[Math.max(o,r),o+r];case"entry-crossing":return[0,o];case"exit-crossing":return[r,o+r]}}(null!=(r=null==n?void 0:n.phase)?r:q,e,o);return l+("number"==typeof(null==n?void 0:n.fraction)?n.fraction:t)*(i-l)}var V={auto:"auto",waapi:"waapi",frames:"frames"},W={waapi:V.waapi,frames:V.frames},Z={before:"before",after:"after"};function X(n){var t;return(null==n?void 0:n.animator)||(null==(t=null==n?void 0:n.meta)?void 0:t.animator)}function Y(n){var t;const e=null!=(t=n.value)?t:n.v;if(!e)return;if(Array.isArray(e)&&e.length>=2&&"number"==typeof e[0]&&"number"==typeof e[1])return[e[0],e[1]];const o=e.translate;return Array.isArray(o)&&o.length>=2?[o[0],o[1]]:void 0}function G(n){var t,e;return null!=(e=null!=(t=n.time)?t:n.t)?e:0}function H(n){var t;return null!=(t=n.easing)?t:n.e}function $(n){var t,e,o;const r=null!=(t=n.keyframes)?t:n.kfs;if(!Array.isArray(r))return!1;if(n.autoOrient)return!0;for(const n of r)if((null!=(e=n.tangentIn)?e:n.ti)||(null!=(o=n.tangentOut)?o:n.to))return!0;return!1}var B=new WeakMap;function Q(n,t,e,o){var r,l;let i=B.get(n);const u=null==i?void 0:i.get(t);if(u)return u;const c=null!=(r=n.tangentOut)?r:n.to,s=null!=(l=t.tangentIn)?l:t.ti,a=[e[0]+(c?c[0]:0),e[1]+(c?c[1]:0)],f=[o[0]+(s?s[0]:0),o[1]+(s?s[1]:0)],v=function(n,t,e,o,r=100){const l=r+1,i=new Float64Array(l),u=new Float64Array(l);let c=P(n,t,e,o,0);i[0]=0,u[0]=0;let s=0;for(let a=1;a<l;a++){const l=a/r,f=P(n,t,e,o,l),v=f[0]-c[0],d=f[1]-c[1];s+=Math.sqrt(v*v+d*d),i[a]=l,u[a]=s,c=f}return{ts:i,ds:u}}(e,a,f,o),d={P0:e,P1:a,P2:f,P3:o,m:v,h:v.ds[v.ds.length-1]};return i||(i=new WeakMap,B.set(n,i)),i.set(t,d),d}var J=.5,nn=5,tn=32;function en(n,t){var e,o,r,l;if(!$(n))return n;const i=null!=(e=n.keyframes)?e:n.kfs;if(!Array.isArray(i)||i.length<2)return n;const u=!!n.autoOrient,c=null!=(o=null==t?void 0:t.A)?o:J,s=null!=(r=null==t?void 0:t.M)?r:nn,a=null!=(l=null==t?void 0:t.j)?l:tn,f=[],v=Y(i[0]);if(!v)return n;const d=u?function(n,t){const e=Y(n),o=Y(t);if(!e||!o)return 0;const r=Q(n,t,e,o),l=D(r.P0,r.P1,r.P2,r.P3,0);return 180*Math.atan2(l[1],l[0])/Math.PI}(i[0],i[1]):void 0;f.push(on(G(i[0]),un(rn(i[0]),rn(i[0]),0,v,d,u)));for(let n=0;n<i.length-1;n++){const t=i[n],e=i[n+1],o=Y(t),r=Y(e);o&&r?(u&&n>0&&sn(f,t,e,o,r,s),fn(f,t,e,o,r,u,c,s,a)):f.push(on(G(e),un(rn(e),rn(e),1,null!=r?r:[0,0],void 0,u)))}const m=H(i[i.length-1]);m&&(f[f.length-1].e=m),u&&function(n){var t;let e;for(const o of n){const n=null!=(t=o.v)?t:o.value;if(!n||"number"!=typeof n.rotate)continue;if(void 0===e){e=n.rotate;continue}let r=n.rotate;for(;r-e>180;)r-=360;for(;r-e<-180;)r+=360;n.rotate=r,e=r}}(f);const y={kfs:f};return void 0!==n.loop&&(y.loop=n.loop),y}function on(n,t){return{t:n,v:t}}function rn(n){var t;const e=null!=(t=n.value)?t:n.v;if(e&&"object"==typeof e&&!Array.isArray(e))return e}function ln(n,t,e){if(void 0===n)return t;if(void 0===t)return n;if("number"==typeof n&&"number"==typeof t)return n+(t-n)*e;if(Array.isArray(n)&&Array.isArray(t)&&n.length===t.length){const o=new Array(n.length);for(let r=0;r<n.length;r++){const l="number"==typeof n[r]?n[r]:0,i="number"==typeof t[r]?t[r]:0;o[r]=l+(i-l)*e}return o}return e<.5?n:t}function un(n,t,e,o,r,l){const i={translate:o},u=new Set;if(n)for(const t of Object.keys(n))u.add(t);if(t)for(const n of Object.keys(t))u.add(n);for(const o of u){if("translate"===o)continue;if("rotate"===o&&l)continue;const r=null==n?void 0:n[o],u=null==t?void 0:t[o];void 0===r&&void 0===u||(i[o]=ln(r,u,e))}return void 0!==r&&(i.rotate=r+cn(n,t,e)),i}function cn(n,t,e){const o="number"==typeof(null==n?void 0:n.rotate)?n.rotate:void 0,r="number"==typeof(null==t?void 0:t.rotate)?t.rotate:void 0;if(void 0===o&&void 0===r)return 0;const l=ln(o,r,e);return"number"==typeof l?l:0}function sn(n,t,e,o,r,l){var i;const u=n[n.length-1],c=null!=(i=u.v)?i:u.value,s=null==c?void 0:c.rotate;if("number"!=typeof s)return;const a=rn(t),f=s-cn(a,a,0),v=Q(t,e,o,r),d=D(v.P0,v.P1,v.P2,v.P3,0),m=180*Math.atan2(d[1],d[0])/Math.PI,y=function(n,t){let e=n-t;for(;e>180;)e-=360;for(;e<-180;)e+=360;return e}(m,f);if(Math.abs(y)<=l)return;const p=G(t),b=Math.min(p+an,(p+G(e))/2),h=un(rn(t),rn(t),0,o,m,!0);n.push(on(b,h))}var an=.05;function fn(n,t,e,o,r,l,i,u,c){const s=Q(t,e,o,r),a=G(t),f=G(e),v=H(t),d=(m=v)?g([m[1],m[0],m[3],m[2]]):n=>n;var m;const y=rn(t),p=rn(e),b=function(n,t,e,o,r){const l=[];vn(n.P0[0],n.P1[0],n.P2[0],n.P3[0],l),vn(n.P0[1],n.P1[1],n.P2[1],n.P3[1],l),l.sort((n,t)=>n-t);const i=[0];for(const n of l)n>i[i.length-1]+1e-6&&n<.999999&&i.push(n);i.push(1);const u=[],c={O:r-i.length};for(let r=0;r<i.length-1;r++)dn(i[r],i[r+1],u,n,t,e,o,c);return u}(s,l,i,u,c),h=[];for(const n of b){const t=L(s.m,n),e=R(s.h>0?t/s.h:n,0,1),o={u:R(d(e),0,1),p:e,N:P(s.P0,s.P1,s.P2,s.P3,n)};if(l){const t=D(s.P0,s.P1,s.P2,s.P3,n);o.S=180*Math.atan2(t[1],t[0])/Math.PI}h.push(o)}let w=v,M=0;const k=n.length-1;for(let t=0;t<h.length;t++){const e=h[t],o=M<1?R((e.u-M)/(1-M),0,1):1,{left:r,right:i}=A(w,o),u=0===t?k:n.length-1;r?n[u].e=r:delete n[u].e;const c=a+e.u*(f-a),s=un(y,p,e.p,e.N,e.S,l);n.push(on(c,s)),w=i,M=e.u}}function vn(n,t,e,o,r){const l=t-n,i=e-t,u=l-2*i+(o-e),c=2*(i-l),s=l;if(Math.abs(u)<1e-10){if(Math.abs(c)>1e-10){const n=-s/c;n>1e-6&&n<.999999&&r.push(n)}return}const a=c*c-4*u*s;if(a<0)return;const f=Math.sqrt(a),v=(-c-f)/(2*u),d=(-c+f)/(2*u);v>1e-6&&v<.999999&&r.push(v),d>1e-6&&d<.999999&&r.push(d)}function dn(n,t,e,o,r,l,i,u){const c=(n+t)/2,s=P(o.P0,o.P1,o.P2,o.P3,n),a=P(o.P0,o.P1,o.P2,o.P3,t),f=t-n,v=P(o.P0,o.P1,o.P2,o.P3,n+.25*f),d=P(o.P0,o.P1,o.P2,o.P3,c),m=P(o.P0,o.P1,o.P2,o.P3,n+.75*f),y=Math.max(mn(v,s,a),mn(d,s,a),mn(m,s,a));let p=!0;if(r){const e=D(o.P0,o.P1,o.P2,o.P3,n),r=D(o.P0,o.P1,o.P2,o.P3,t),l=180*Math.atan2(e[1],e[0])/Math.PI,u=180*Math.atan2(r[1],r[0])/Math.PI;let c=Math.abs(l-u);c>180&&(c=360-c),c>i&&(p=!1)}y<=l&&p||u.O<=0||f<1e-6?e.push(t):(u.O-=1,dn(n,c,e,o,r,l,i,u),dn(c,t,e,o,r,l,i,u))}function mn(n,t,e){const o=e[0]-t[0],r=e[1]-t[1],l=o*o+r*r;if(l<1e-20){const e=n[0]-t[0],o=n[1]-t[1];return Math.sqrt(e*e+o*o)}const i=(n[0]-t[0])*r-(n[1]-t[1])*o;return Math.abs(i)/Math.sqrt(l)}var yn=1;function pn(n,t){if(n===t)return!0;if(typeof n!=typeof t||null===n||null===t||"object"!=typeof n)return!1;if(Array.isArray(n)!==Array.isArray(t))return!1;const e=Object.keys(n),o=Object.keys(t);return e.length===o.length&&e.every(e=>pn(n[e],t[e]))}function bn(n){const t=[];let e;const o=function(n){const t=n.split(/([MLCZmlcz]|[\s,]+)/).map(n=>n.trim()).filter(n=>n&&","!==n),e=[];let o=null;for(const n of t)if(/[MLCZmlcz]/.test(n))o={type:n,values:[]},e.push(o);else if(o){const t=+n;o.values.push(Number.isNaN(t)?0:t)}return e}(n);for(const n of o){const o=n.type,r=n.values;if("M"===o||"m"===o){const n=r[0]||0,o=r[1]||0;e={v:[[n,o]],i:[[n,o]],o:[[n,o]],c:!1},t.push(e);continue}if(e||(e={v:[[0,0]],i:[[0,0]],o:[[0,0]],c:!1},t.push(e)),"L"===o){const n=r[0]||0,t=r[1]||0;e.v.push([n,t]),e.i.push([n,t]),e.o.push([n,t])}else if("C"===o){const n=r[0]||0,t=r[1]||0,o=r[2]||0,l=r[3]||0,i=r[4]||0,u=r[5]||0;e.o[e.o.length-1]=[n,t],e.v.push([i,u]),e.i.push([o,l]),e.o.push([i,u])}else"Z"===o||"z"===o?e.c=!0:console.warn('Unsupported path command "'+o+'"')}return t}function hn(n){return n.startsWith("path(")&&n.endsWith(")")?n.slice(5,-1):/^[MmZzLlHhVvCcSsQqTtAa]/.test(n)?n:void 0}function gn(n){return"string"==typeof n&&void 0!==hn(n)}function wn(n){if(n&&"object"==typeof n&&"string"==typeof n.path){const t=hn(n.path);return t?{paths:bn(t)}:n}if(n&&"object"==typeof n&&"paths"in n){const t=n.paths;if(Array.isArray(t)&&t.length>0&&gn(t[0])){const n=[];for(const e of t){const t=hn(e);t&&n.push(...bn(t))}return{paths:n}}return n}if(Array.isArray(n)){if(n.length>0&&gn(n[0])){const t=[];for(const e of n){const n=hn(e);n&&t.push(...bn(n))}return{paths:t}}return{paths:n}}return gn(n)?{paths:bn(hn(n))}:n}function An(n,t){var e;if(n)return Array.isArray(n)?n:(null==(e=null==t?void 0:t.easings)?void 0:e[n])?t.easings[n]:void console.warn("Unknown easing name: "+n)}function Mn(n,t){var e;if("string"==typeof n){const o=null==(e=null==t?void 0:t.animations)?void 0:e[n];return o||console.warn("Unknown animation name: "+n),o}return n}function kn(n,t,e,o){var r,l;return"d"===n?{paths:p(null!=(r=null==t?void 0:t.paths)?r:Array.isArray(t)?t:[],null!=(l=null==e?void 0:e.paths)?l:Array.isArray(e)?e:[],o)}:O.has(n)?y(t||[0,0,0,1],e||[0,0,0,1],o):"transform"!==n||"object"!=typeof t||null===t||Array.isArray(t)||"object"!=typeof e||null===e||Array.isArray(e)?"rotate"===n&&"number"==typeof t&&"number"==typeof e?d(t,e,o):x.has(n)||"stroke-dasharray"===n||"strokeDasharray"===n?m(t||[],e||[],o):d(+(t||0),+(e||0),o):function(n,t,e){const o=new Set([...Object.keys(null!=n?n:{}),...Object.keys(null!=t?t:{})]),r={};for(const l of o){const o=null==n?void 0:n[l],i=null==t?void 0:t[l];if("rotate"===l||"skew"===l)r[l]=d(+(null!=o?o:0),+(null!=i?i:0),e);else if("translate"===l||"scale"===l||"origin"===l){const n="scale"===l?[1,1]:[0,0];r[l]=m(o||n,i||n,e)}else r[l]=null!=i?i:o}return r}(t,e,o)}function jn(n,t,e,o){var r,l,i,u,c,f,v;const d=t.keyframes||t.kfs||[],m=[];for(const t of d){const e=null!=(l=null!=(r=t.time)?r:t.t)?l:0;let s=null!=(i=t.value)?i:t.v;const a=null!=(u=t.easing)?u:t.e;"d"===n&&(s=wn(s));const d=z(n)?F(n):n;O.has(d)&&(s=null!=(c=j(s))?c:s);const y={t:e,v:s,e:An(a,o)},p=null!=(f=t.tangentIn)?f:t.ti,b=null!=(v=t.tangentOut)?v:t.to;p&&(y.tangentIn=p),b&&(y.tangentOut=b),m.push(y)}m.sort((n,t)=>{var e,o;return(null!=(e=n.t)?e:0)-(null!=(o=t.t)?o:0)});const y=t.loop,p=!0===y?{}:y||void 0;return p&&m.length>=2?function(n,t,e,o){var r,l,i,u,c;const f=t.length-1,v=R(null!=(r=e.segmentCount)?r:f,1,f);let d;d=e.extend===Z.before?t.slice(0,v+1):t.slice(f-v);const m=null!=(l=t[0].t)?l:0,y=null!=(i=t[t.length-1].t)?i:0;let p,b;e.extend===Z.before?(p=0,b=m):(p=y,b=o);const h=b-p;if(h<=0)return t;const w=null!=(u=d[0].t)?u:0,k=(null!=(c=d[d.length-1].t)?c:0)-w;if(k<=0)return t;const j=d.map(n=>{var t,e;return{C:(n.t-w)/k,v:n.v,e:n.e,tangentIn:null!=(t=n.tangentIn)?t:n.ti,tangentOut:null!=(e=n.tangentOut)?e:n.to}}),O=Math.floor(h/k),x=h-O*k,N=x/k,S=[],C=e.extend!==Z.before,T=t[t.length-1];let z,U=!1;function F(t,e,o){var r;let l;if(e){l=[];for(let n=j.length-1;n>=0;n--)l.push({C:1-j[n].C,v:j[n].v,e:n>0?M(j[n-1].e):void 0,tangentIn:j[n].tangentOut,tangentOut:j[n].tangentIn})}else l=j;const i=void 0!==o?o:1;for(let e=0;e<l.length;e++){const o=l[e];if(o.C>i+1e-9){const r=l[e-1],u=o.C-r.C,c=(i-r.C)/u,s=r.e?g(r.e)(c):c,a=kn(n,r.v,o.v,s),{left:f}=A(r.e,c);return S.length>0&&r.C<=i&&(S[S.length-1].e=f),void S.push({t:t+i*k,v:a,e:void 0})}const u=S.length>0?S[S.length-1]:T,c=C&&0===e&&void 0!==u&&Math.abs((null!=(r=u.t)?r:0)-(t+o.C*k))<1e-9;if(c){if(pn(u.v,o.v)){S.length>0?(u.e=o.e,u.tangentOut=o.tangentOut):(z=o.e,U=!0);continue}S.length>0&&(delete u.tangentIn,delete u.tangentOut)}const s={t:t+o.C*k+(c?yn:0),v:o.v,e:e<l.length-1?o.e:void 0};o.tangentIn&&(s.tangentIn=o.tangentIn),o.tangentOut&&(s.tangentOut=o.tangentOut),S.push(s)}}if(e.extend===Z.before){N>1e-9&&function(t,e,o){let r;if(e){r=[];for(let n=j.length-1;n>=0;n--)r.push({C:1-j[n].C,v:j[n].v,e:n>0?M(j[n-1].e):void 0,tangentIn:j[n].tangentOut,tangentOut:j[n].tangentIn})}else r=j;const l=1-o;for(let e=0;e<r.length;e++){const o=r[e];if(o.C<l-1e-9)continue;const i=r[e-1];if(i&&i.C<l-1e-9&&o.C>l+1e-9){const e=o.C-i.C,r=(l-i.C)/e,u=i.e?g(i.e)(r):r,c=kn(n,i.v,o.v,u),{right:s}=A(i.e,r);S.push({t:t,v:c,e:s})}const u={t:t+(o.C-l)*k,v:o.v,e:e<r.length-1?o.e:void 0};o.tangentIn&&(u.tangentIn=o.tangentIn),o.tangentOut&&(u.tangentOut=o.tangentOut),S.push(u)}}(p,!!e.alternate&&O%2==0,N);for(let n=0;n<O;n++){const t=O-1-n,o=!!e.alternate&&t%2==0;F(p+x+n*k,o)}}else{for(let n=0;n<O;n++){const t=!!e.alternate&&n%2==0;F(p+n*k,t)}if(N>1e-9){const n=!!e.alternate&&O%2==0;F(p+O*k,n,N)}}return e.extend===Z.before?[...S,...t]:U&&t.length>0?[...t.slice(0,-1),a(s({},t[t.length-1]),{e:z}),...S]:[...t,...S]}(n,m,p,e):m}var On=0;function xn(n,t=W.waapi){const e=X(n)||{},o=function(n){var t;if(n)return null==(t=X(n))?void 0:t.definitions}(n),r=e.duration||1e3,l=[],i=(n,e)=>{if(!e)return null;const l=function(n,t){if(!n)return[];const e=[];if("string"==typeof n){const o=Mn(n,t);o&&e.push(o)}else if(Array.isArray(n))for(const o of n){const n=Mn(o,t);n&&e.push(n)}else e.push(n);return e}(e,o);if(0===l.length)return null;const i=function(n,t,e,o=W.waapi){const r={};for(const[l,i]of Object.entries(n)){if("transform"===l&&"offsetPath"===i.T&&void 0!==n.offsetDistance)continue;const u=jn(l,i,t,e);if(u.length>0){const n={kfs:u};void 0!==i.autoOrient&&(n.autoOrient=i.autoOrient),void 0!==i.loop&&(n.loop=i.loop),r[l]=o===W.waapi&&"transform"===l?en(n):n}}return r}(function(n){const t={};for(const e of n)for(const[n,o]of Object.entries(e))t[n]=o;return t}(l),r,o,t);return 0===Object.keys(i).length?null:{id:n,animate:i}},u=function(n){var t;if(!n)return;const e=null==(t=X(n))?void 0:t.animateById;return e?Object.entries(e).map(([n,t])=>({id:n,animate:t})):void 0}(n);if(u)for(const n of u){const t=i(n.id,n.animate);t&&l.push(t)}const c=n=>{const t=n.animate;if(t&&Object.keys(t).length>0){const e=n.id||"_px_el_"+ ++On;n.id=e;const o=i(e,t);o&&l.push(o)}if(n.children)for(let t=0;t<n.children.length;t++)c(n.children[t])};if(n.children)for(let t=0;t<n.children.length;t++)c(n.children[t]);return l}function Nn(n,t,e){var o,r,l,i,u,c,s;const a=t.kfs||t.keyframes||[];if(0===a.length)return null;const{U:f,F:b}=function(n,t){var e,o;const r=n.length-1;let l=n[0],i=n[r>0?1:0];for(let u=0;u<r;u++){const c=null!=(e=n[u].t)?e:0,s=null!=(o=n[u+1].t)?o:0;if(c<=t&&t<=s){l=n[u],i=n[u+1];break}t>s&&u===r-1&&(l=n[r>0?r-1:0],i=n[r])}return{U:l,F:i}}(a,e);let h=f===b?0:(w=e,A=null!=(o=f.t)?o:0,(M=null!=(r=b.t)?r:0)===A?0:0+(w-A)/(M-A)*1);var w,A,M;h=R(h,0,1);const j=null!=(l=f.e)?l:f.easing;if(j&&Array.isArray(j))try{h=g(j)(h)}catch(n){}let x=z(n)?F(n):n,C=null;const T=null!=(i=null==f?void 0:f.v)?i:null==f?void 0:f.value,U=null!=(u=null==b?void 0:b.v)?u:null==b?void 0:b.value;if("d"===x)C=p(null!=(c=null==T?void 0:T.paths)?c:Array.isArray(T)?T:[],null!=(s=null==U?void 0:U.paths)?s:Array.isArray(U)?U:[],h).map(n=>v(n)).join("");else if(O.has(x))C=k(y(T||[0,0,0,1],U||[0,0,0,1],h)),x=n;else if("stroke-dasharray"===x)C=m(T||[],U||[],h).join(" "),x=n;else if("transform"!==x||null===T||"object"!=typeof T||Array.isArray(T))"translate"===x?(C="translate("+m(T||[0,0],U||[0,0],h).join(",")+")",x="transform"):"rotate"===x?(C="rotate("+d(+(T||0),+(U||0),h)+")",x="transform"):"scale"===x?(C="scale("+m(T||[1,1],U||[1,1],h).join(",")+")",x="transform"):C=d(+(T||0),+(U||0),h);else{const n=new Set([...T?Object.keys(T):[],...U?Object.keys(U):[]]),e={};for(const t of n){const n=null==T?void 0:T[t],o=null==U?void 0:U[t];if("rotate"===t||"skew"===t)e[t]=d(+(null!=n?n:0),+(null!=o?o:0),h);else if("translate"===t||"scale"===t||"origin"===t){const r="scale"===t?[1,1]:[0,0],l=m(n||r,o||r,h);e[t]=l}}if($(t)){const n=T.translate,o=U.translate;if(Array.isArray(n)&&Array.isArray(o)){const r=function(n,t,e,o,r,l){const i=Q(n,t,e,o),u=0===i.h?r:function(n,t){const e=t*n.ds[n.ds.length-1],{ts:o,ds:r}=n,l=r.length-1;if(e<=0)return o[0];if(e>=r[l])return o[l];let i=1,u=l;for(;i<u;){const n=i+u>>>1;r[n]<e?i=n+1:u=n}const c=r[u-1],s=r[u]-c,a=s>0?(e-c)/s:0;return o[u-1]+a*(o[u]-o[u-1])}(i.m,r),c=P(i.P0,i.P1,i.P2,i.P3,u);if(!l)return{translate:c};const s=D(i.P0,i.P1,i.P2,i.P3,u);return{translate:c,S:180*Math.atan2(s[1],s[0])/Math.PI}}(f,b,[+n[0],+n[1]],[+o[0],+o[1]],h,!!t.autoOrient);e.translate=[r.translate[0],r.translate[1]],void 0!==r.S&&(e.rotate=r.S)}}C=S(e,{l:!1}),x="transform"}return N.has(x)&&"number"==typeof C&&(C=100*C+"%"),{k:x,v:null===C?"":""+C}}function Sn(n,t){const e={};for(const[o,r]of Object.entries(n)){const n=Nn(o,r,t);n&&(e[n.k]=n.v)}return e}function Cn(n){const t=globalThis;"function"!=typeof t.cancelAnimationFrame?t.clearTimeout(n):t.cancelAnimationFrame(n)}function Tn(n,t){const{startOn:e,outAction:o="continue",scrollIntoViewThreshold:r=0}=t,l=n.getRootElement();if(!l)return console.warn("setupAnimationTriggers: No root element found for animation."),n;let i=!1;const u=()=>{i&&(i=!1,n.setPlaybackRate(1)),n.play()},c=()=>{switch(o){case"pause":n.pause();break;case"reset":n.cancel();break;case"reverse":i=!0,n.setPlaybackRate(-1),n.play()}};switch(e){case"load":{const n=()=>u();"complete"===document.readyState?n():window.addEventListener("load",n,{once:!0});break}case"mouseOver":{let n=!1;const t=()=>{n=!0,u()},e=()=>{n&&c()};l.addEventListener("mouseenter",t),l.addEventListener("mouseleave",e);break}case"click":{const t=()=>{n.isPlaying()?c():u()};l.addEventListener("click",t);break}case"scrollIntoView":{const n=n=>{var t,e;const o=n.boundingClientRect,r=n.intersectionRect;if(!(null==o?void 0:o.height)||!r)return n.intersectionRatio;const l="undefined"!=typeof window&&window.innerHeight?window.innerHeight:1/0,i=null!=(e=null==(t=n.rootBounds)?void 0:t.height)?e:1/0,u=Math.min(l,i),c=Math.min(o.height,Number.isFinite(u)?u:o.height);return c>0?r.height/c:n.intersectionRatio},t=Array.from({length:21},(n,t)=>t/20);let e=!1;new IntersectionObserver(t=>{t.forEach(t=>{t.isIntersecting&&n(t)>=r?(e=!0,u()):e&&(e=!1,c())})},{threshold:t}).observe(l);break}}return n}function zn(n){return"#"+n}function Un(n,t,e,o){const r=X(n)||{};if(!o)if(n.id){const t=zn(n.id);(o=document.querySelector(t))||console.warn("createFrameLoopAnimator: No root element found for selector: ",t)}else console.warn("createFrameLoopAnimator: No root element provided");const l=function(n,t,e){var o;const r=X(n)||{},l=xn(n,W.frames),i=r.iterations;let u=1;"number"==typeof i&&(u=i||1),"infinite"===i&&(u=1/0),u<1&&(u=1);const c=+(r.duration||T),s=c&&u?c*(u===1/0?1/0:u):c?(null!=u?u:1)*c:0,a=r.direction||"normal",f=null!=(o=r.fill)?o:"forwards",v="forwards"===f||"both"===f,d="backwards"===f||"both"===f;let m=null,y=!1,p=-(r.delay||0),b=0,h=1,g=!1;const w=r.frameRate,A=w&&w>0?1e3/w:0;let M=0;const k=()=>{const n=b?(Date.now()-b)*h:0;return p+n},j=()=>{let n=k();return Number.isFinite(s)&&n>s&&(n=s),n<0&&(n=0),n};function O(n){let e=function(){const t=c>0?c:1;let e=0,o=0;c>0?(n=R(n,0,u*t),o=Math.max(0,Math.ceil(n/t)-1),o=Math.min(o,u-1),e=R((n-o*t)/t,0,1)):e=n;const r=a||"normal";let l=e;return"reverse"===r?l=1-e:"alternate"===r?o%2==1&&(l=1-e):"alternate-reverse"===r&&o%2==0&&(l=1-e),l}();for(const n of l||[]){const o=n.animate;if(!o||"object"!=typeof o||Array.isArray(o)){console.warn("Empty or unresolved binding",n);continue}const r=Sn(o,e*c);for(const[e,o]of Object.entries(r))t.setAttribute(n.id,e,o)}}r.delay&&(r.delay<0?O(j()):d&&O(0));const x=()=>!!y&&!!t.isConnected()&&(h<0?k()>0:!(Number.isFinite(s)&&j()>=s)),N=n=>{null!==m&&(Cn(m),m=null),(n||x())&&(m=function(n){const t=globalThis;return"function"==typeof t.requestAnimationFrame?t.requestAnimationFrame(n):t.setTimeout(n,16)}(()=>{m=null,(()=>{var n,o;if(!t.isConnected())return void S();const r=j(),l=k();if(l<0&&h>0)d&&O(0);else{if(h<0&&l<=0)return S(),O(0),void(g||(g=!0,null==(n=null==e?void 0:e.R)||n.call(e)));if(h>0&&s&&Number.isFinite(s)&&r>=s)return S(),O(v?s:0),void(g||(g=!0,null==(o=null==e?void 0:e.R)||o.call(e)));if(A>0){const n=Date.now();if(M&&n-M<A)return;M=n}O(r)}})(),N()}))},S=()=>{if(!y)return;let n=k();Number.isFinite(s)&&n>s&&(n=s),p=n,b=0,y=!1,null!==m&&(Cn(m),m=null),n>=0?O(n):d&&O(0)},C={isReady:()=>!0,getRootElement:()=>null,isPlaying:()=>x(),play:()=>{var n;(()=>{if(!y){if(h>=0)Number.isFinite(s)&&p>=s&&(p=0);else if(p<=0){if(!Number.isFinite(s))return void console.warn("play: cannot start reverse playback of an infinite animation from time 0");p=s}g=!1,y=!0,b=Date.now(),N(!0)}})(),null==(n=null==e?void 0:e.P)||n.call(e)},pause:()=>{var n;S(),null==(n=null==e?void 0:e.I)||n.call(e)},cancel:()=>{var n;S(),p=0,b=0,y=!1,g=!1,O(p),null==(n=null==e?void 0:e.D)||n.call(e)},finish:()=>{((n=!0)=>{var t;p=Number.isFinite(s)?s:j(),b=0,y=!1,null!==m&&(Cn(m),m=null),O(v?p:0),n&&!g&&(g=!0,null==(t=null==e?void 0:e.R)||t.call(e))})(!0)},setPlaybackRate:n=>{if(!isFinite(n)||0===n)return void console.warn("setPlaybackRate: rate must be finite and non-zero");let t=k();Number.isFinite(s)&&t>s&&(t=s),n<0!=h<0&&(g=!1),h=n,p=t,y&&(b=Date.now())},getCurrentTime:()=>j(),setCurrentTime:n=>{n<0&&(n=0),Number.isFinite(s)&&n>s&&(n=s),p=n,y&&(b=Date.now()),(!Number.isFinite(s)||n<s)&&(g=!1),O(j())},destroy:()=>{var n;C.cancel(),null==(n=null==e?void 0:e.L)||n.call(e)}};return C}(n,t||function(n){const t=new Set;return{isConnected:()=>!n||n.isConnected,setAttribute:(e,o,r)=>{o=F(o);const l=zn(e),i=(null==n?void 0:n.querySelectorAll(l))||document.querySelectorAll(l);0!==i.length||t.has(l)||(t.add(l),console.warn('setAttribute: No elements found for selector "'+l+'"'));for(let n=0;n<i.length;n++){const t=i[n],e="transform"===o&&"pattern"===t.tagName?"patternTransform":o;t.setAttribute(e,r),C.has(o)&&(t.style[o]=r)}}}}(o),e),i=a(s({},l),{getRootElement:()=>o||null});return r.trigger&&(_(r)?console.warn("scroll timeline: `animator.trigger` is ignored (triggers do not apply to scroll-driven playback)"):Tn(i,r.trigger)),i}function Fn(n,t,e,o){var r,l;let i=null!=(r=n.v)?r:n.value;const u=null!=(l=n.e)?l:n.easing,c={offset:t,easing:u&&Array.isArray(u)?"cubic-bezier("+u.join(",")+")":void 0};let s,a=e;var f;return O.has(e)&&Array.isArray(i)?s=k(i):"transform"!==e||null===i||"object"!=typeof i||Array.isArray(i)?x.has(e)?(Array.isArray(i)&&("translate"===e&&(i=i.map(n=>n+"px")),i=i.join(",")),"rotate"===e&&(i+="deg"),s=e+"("+i+")",a="transform"):s="d"===e?'path("'+(i&&"object"==typeof i&&Array.isArray(i.paths)?i.paths:[]).map(n=>v(n,!0)).join("")+'")':N.has(e)&&"number"==typeof i?100*i+"%":""+i:(s=S(i,{l:!0}),a="transform"),CSS.supports(F(a),s)||o.add(a),a=(f=a).includes("-")?f.replace(/-([a-z])/g,(n,t)=>t.toUpperCase()):f,c[a]=s,c}function Rn(n,t,e){var o,r,l,i,u;const c=[];for(let f=0;f<t.length;f++){const v=t[f],d=null!=(o=v.t)?o:0;if(d<0){const e=t[f+1];if(e&&(null!=(r=e.t)?r:0)>=0){const t=(0-d)/((null!=(l=e.t)?l:0)-d),o=v.e?g(v.e)(t):t,{right:r}=A(v.e,t);c.push({t:0,v:kn(n,v.v,e.v,o),e:r})}continue}if(d>e){const o=t[f-1];if(o&&(null!=(i=o.t)?i:0)<=e){const t=null!=(u=o.t)?u:0,r=(e-t)/(d-t),l=o.e?g(o.e)(r):r,{left:i}=A(o.e,r);c.length>0&&(c[c.length-1]=a(s({},c[c.length-1]),{e:i})),c.push({t:e,v:kn(n,o.v,v.v,l),e:void 0})}break}c.push(v)}return c}function Pn(n,t,e){var o;const r=new Map;for(const[l,i]of Object.entries(n)){const n=e.duration||1,u=Rn(l,i.kfs||i.keyframes||[],n),c=[];for(let e=0;e<u.length;e++){const r=u[e],i=Fn(r,R((null!=(o=r.t)?o:0)/n,0,1),l,t);0===e&&(i.offset||0)>0&&c.push(a(s({},i),{offset:0})),c.push(i)}c.length>0&&(c[c.length-1].offset||0)<1&&c.push(a(s({},c[c.length-1]),{offset:1})),c.length>0&&r.set(l,c)}return r}function In(n,t,e,o,r){var l;const i=X(n)||{};if(!e)if(n.id){const t=zn(n.id);(e=document.querySelector(t))||console.warn("createFrameLoopAnimator: No root element found for selector: ",t)}else console.warn("createFrameLoopAnimator: No root element provided");const u=xn(n,W.waapi),c=[],s=i.iterations;let a;"number"==typeof s&&(a=s),"infinite"===s&&(a=1/0);const f=new Set;let v=!1,d=!1;(null==u?void 0:u.length)||console.warn("createWebApiAnimator: No animation bindings defined");for(const n of u||[]){const o=n.animate;if(!o||"object"!=typeof o||Array.isArray(o)){console.warn("createWebApiAnimator: Empty or unresolved binding",n);continue}const u=zn(n.id),s=(null==e?void 0:e.querySelectorAll(u))||document.querySelectorAll(u);0===s.length&&console.warn('createWebApiAnimator: No elements found for selector "'+u+'"');const m=Pn(o,f,i),y=i.delay&&i.delay>0?i.delay:void 0;let p;if(i.delay&&i.delay<0&&i.duration){const n=-i.delay;p=a===1/0?n%i.duration:Math.min(n,i.duration*(null!=a?a:1))}const b={duration:i.duration,delay:y,fill:null!=(l=i.fill)?l:"forwards",direction:i.direction,iterations:a};for(let n=0;n<s.length;n++){const e=s[n];for(const[,n]of m)if(n.length>0)try{const o=new KeyframeEffect(e,n,b),l=new Animation(o,r?r.timeline:document.timeline);if(r){const n=l;r.rangeStart&&(n.rangeStart=r.rangeStart),r.rangeEnd&&(n.rangeEnd=r.rangeEnd)}(null==t?void 0:t.R)&&(l.onfinish=()=>{var n;v||(v=!0,null==(n=t.R)||n.call(t))}),(null==t?void 0:t.L)&&(l.onremove=()=>{var n;d||(d=!0,null==(n=t.L)||n.call(t))}),void 0!==p&&(l.currentTime=p),c.push(l)}catch(n){console.warn(n)}}}if(!o&&f.size)return console.warn("Unsupported CSS attrs: "+[...f].join(", ")),null;const m={isReady:()=>!0,getRootElement:()=>e||null,isPlaying:()=>{var n;return"running"===(null==(n=c[0])?void 0:n.playState)},play:()=>{var n;v=!1,c.forEach(n=>n.play()),null==(n=null==t?void 0:t.P)||n.call(t)},pause:()=>{var n;c.forEach(n=>n.pause()),null==(n=null==t?void 0:t.I)||n.call(t)},cancel:()=>{var n;v=!1,c.forEach(n=>n.cancel()),null==(n=null==t?void 0:t.D)||n.call(t)},finish:()=>{var n;for(const t of c)try{(null==(n=t.effect)?void 0:n.getTiming().iterations)===1/0?(t.effect.updateTiming({iterations:1}),t.finish(),t.effect.updateTiming({iterations:1/0})):t.finish()}catch(n){t.cancel()}},setPlaybackRate:n=>(c.forEach(t=>t.playbackRate=n),m),getCurrentTime:()=>{var n,t;const e=null!=(t=null==(n=c[0])?void 0:n.currentTime)?t:null;return null!==e?+e:null},setCurrentTime:n=>{v=!1,c.forEach(t=>{t.currentTime=n})},destroy:()=>{var n;m.cancel(),c.splice(0,c.length),d||(d=!0,null==(n=null==t?void 0:t.L)||n.call(t))}};return i.trigger&&("scroll"===i.timelineSource?console.warn("scroll timeline: `animator.trigger` is ignored (triggers do not apply to scroll-driven playback)"):Tn(m,i.trigger)),r&&c.forEach(n=>n.play()),m}function Dn(n,t,e){var o,r,l;const i="number"==typeof(null==n?void 0:n.fraction)?n.fraction:t,u=null==(r=null==(o=globalThis.CSS)?void 0:o.percent)?void 0:r.call(o,100*i);if(void 0!==u)return e?{_:null!=(l=null==n?void 0:n.phase)?l:"cover",offset:u}:{offset:u}}function En(n,t){const e=document.body,o=document.documentElement;for(let r=n.parentElement;r;r=r.parentElement){if(r===e||r===o)return null;const n=getComputedStyle(r),l="y"===t?n.overflowY:n.overflowX;if("auto"===l||"scroll"===l||"hidden"===l||"overlay"===l)return r}return null}function Ln(){return document.scrollingElement||document.documentElement}var _n="parent",qn="scroller";function Kn(n,t){var e,o;const r=null==t?void 0:t.trim();if(!r)return n;if(r===_n){let t=null;for(let e=n.parentElement;e&&e!==document.body;e=e.parentElement){const n=getComputedStyle(e).position;"sticky"!==n&&"fixed"!==n||(t=e)}return null!=(o=null!=(e=null==t?void 0:t.parentElement)?e:n.parentElement)?o:n}if(r===qn)return En(n,"y")||En(n,"x")||Ln();let l=null;try{l=document.querySelector(r)}catch(t){return console.warn('scroll timeline: subject "'+r+'" is not a valid selector — measuring the SVG itself'),n}return l||(console.warn('scroll timeline: subject "'+r+'" matched no element — measuring the SVG itself'),n)}function Vn(n,t){const e=n;if(!(null==t?void 0:t.pin)||!e.style)return()=>{};const o=e.style,r=o.position,l=o.top;o.position="sticky";const i="center"===t.pinAlign?.5:"bottom"===t.pinAlign?1:0,u=()=>{var e;const r=null!=(e=t.pinTop)?e:0;if(!i)return void(o.top=r+"px");const l=function(n){const t=En(n,"y");return t?t.clientHeight:document.documentElement.clientHeight}(n),u=n.getBoundingClientRect().height;o.top=Math.round((l-u)*i+r)+"px"};u();let c=null;const s=i?u:null;i&&(s&&window.addEventListener("resize",s),"undefined"!=typeof ResizeObserver&&(c=new ResizeObserver(u),c.observe(n)));let a=null;const f=n.parentElement;return t.pinDistance&&t.pinDistance>0&&f&&(a=document.createElement("div"),a.setAttribute("data-px-pin",""),a.style.height=100*t.pinDistance+"vh",f.insertBefore(a,n),a.appendChild(n)),()=>{s&&window.removeEventListener("resize",s),null==c||c.disconnect(),o.position=r,o.top=l,(null==a?void 0:a.parentElement)&&(a.parentElement.insertBefore(n,a),a.remove())}}function Wn(n,t,e){let o,r=t;n.resetOnFinish&&(r=a(s({},t),{R:()=>{var n;null==(n=null==t?void 0:t.R)||n.call(t),null==o||o.cancel()}}));const l=e(r);return o=l,n.debugInstName&&(window[n.debugInstName]=l),l}function Zn(n){return function(n,t,e,o){const r=X(n)||{};return _(r)?Wn(r,e,e=>{var l,i;let u=()=>{};if(r.mode!==V.frames&&"native"===(null==(l=r.scroll)?void 0:l.driver)&&o){u=Vn(o,r.scroll);const t=function(n,t){var e,o,r,l;if(!t||!_(t))return null;const i=t.scroll||{},u=null!=(e=i.kind)?e:"view";if(i.smoothing)return console.warn('scroll timeline: `smoothing` needs the built-in driver — ignoring `driver: "native"`'),null;const c=globalThis,s="view"===u,a=s?c.ViewTimeline:c.ScrollTimeline;if("function"!=typeof a)return null;const f=null!=(o=i.axis)?o:"block";let v;try{v=new a(s?{subject:Kn(n,i.subject),axis:f}:{source:"root"===i.source?Ln():En(n,"y")||En(n,"x")||Ln(),axis:f})}catch(n){return console.warn("scroll timeline: native timeline construction failed — falling back to the custom driver",n),null}return{timeline:v,rangeStart:Dn(null==(r=i.range)?void 0:r.start,0,s),rangeEnd:Dn(null==(l=i.range)?void 0:l.end,1,s)}}(o,r);if(t){const l=In(n,e,o,r.mode===V.waapi,t);if(l){const n=l.destroy.bind(l);return l.destroy=()=>{u(),n()},l}}u(),u=()=>{}}const c=(r.mode!==V.frames?In(n,e,o,r.mode===V.waapi):null)||Un(n,t,e,o),s=(null==(i=c.getRootElement)?void 0:i.call(c))||o;if(s){u=Vn(s,r.scroll);const n=("number"==typeof(null==(a=r)?void 0:a.duration)&&a.duration>0?a.duration:T)*("number"==typeof(null==a?void 0:a.iterations)&&a.iterations>0?a.iterations:1),t=function(n,t,e){var o,r;if(!t||!_(t))return null;const l=t.scroll||{},i=null!=(o=l.kind)?o:"view",u=Kn(n,l.subject),c=En(n,"y")||En(n,"x"),s="scroll"===i&&"root"===l.source?Ln():c||Ln(),a=s===Ln(),f=function(n,t){const e=null!=n?n:"block";if("x"===e||"y"===e)return e;const o=!!t&&t.startsWith("vertical");return"inline"===e?o?"y":"x":o?"x":"y"}(l.axis,getComputedStyle(s).writingMode),v=()=>{if("scroll"===i)return function(n,t,e){var o,r;const l=t>0?R(n/t,0,1):1,i="number"==typeof(null==(o=null==e?void 0:e.start)?void 0:o.fraction)?e.start.fraction:0,u="number"==typeof(null==(r=null==e?void 0:e.end)?void 0:r.fraction)?e.end.fraction:1;return u<=i?l>=u?1:0:R((l-i)/(u-i),0,1)}("y"===f?s.scrollTop:s.scrollLeft,"y"===f?s.scrollHeight-s.clientHeight:s.scrollWidth-s.clientWidth,l.range);const n=u.getBoundingClientRect();let t,e;if(a)t=0,e="y"===f?document.documentElement.clientHeight:document.documentElement.clientWidth;else{const n=s.getBoundingClientRect();t="y"===f?n.top:n.left,e="y"===f?s.clientHeight:s.clientWidth}return function(n,t,e,o){const r=e-n,l=K(null==o?void 0:o.start,0,t,e),i=K(null==o?void 0:o.end,1,t,e);return i<=l?r>=i?1:0:R((r-l)/(i-l),0,1)}(("y"===f?n.top:n.left)-t,"y"===f?n.height:n.width,e,l.range)},d=Math.max(0,null!=(r=l.smoothing)?r:0)/1e3;let m=!1,y=null,p=null,b=0,h=null;const g=()=>{h=null,m||(n=>{if(!d)return void e(n);if(null===y)return y=n,void e(n);if(null!==p)return;b=0;const t=n=>{if(p=null,m)return;const o=b?Math.min(.1,(n-b)/1e3):1/60;b=n;const r=v(),l=1-Math.exp(-o/d);y+=(r-y)*l,Math.abs(r-y)<.001&&(y=r),e(y),y!==r&&(p=requestAnimationFrame(t))};p=requestAnimationFrame(t)})(v())},w=()=>{m||null!==h||(h=requestAnimationFrame(g))},A=a?window:s;let M;A.addEventListener("scroll",w,{passive:!0}),window.addEventListener("resize",w,{passive:!0}),"undefined"!=typeof ResizeObserver&&(M=new ResizeObserver(w),M.observe(u),u!==n&&M.observe(n),a||M.observe(s));const k={destroy:()=>{m||(m=!0,A.removeEventListener("scroll",w),window.removeEventListener("resize",w),null==M||M.disconnect(),null!==h&&(cancelAnimationFrame(h),h=null),null!==p&&(cancelAnimationFrame(p),p=null))},refresh:()=>{m||(y=v(),e(y))}};return k.refresh(),k}(s,r,t=>c.setCurrentTime(t*n));if(t){const n=c.destroy.bind(c);c.destroy=()=>{t.destroy(),u(),n()}}}else console.warn("scroll timeline: no root element to observe — animation will stay at frame 0");var a;return c}):Wn(r,e,e=>r.mode===V.frames?Un(n,t,e,o):In(n,e,o,r.mode===V.waapi)||Un(n,t,e,o))}(function(n){if(!(null==n?void 0:n.data))throw new Error("createAnimator: `data` is required");return n.data}(n),n.q,n.K,null)}var Xn,Yn="data";return Xn=f,((t,o,l,u)=>{if(o&&"object"==typeof o||"function"==typeof o)for(let l of r(o))i.call(t,l)||void 0===l||n(t,l,{get:()=>o[l],enumerable:!(u=e(o,l))||u.enumerable});return t})(n({},"__esModule",{value:!0}),Xn)})();
|
|
1
|
+
"use strict";var PixodeskAnimator=(()=>{var n=Object.defineProperty,t=Object.defineProperties,e=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyDescriptors,r=Object.getOwnPropertyNames,l=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,u=Object.prototype.propertyIsEnumerable,c=(t,e,o)=>e in t?n(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o,s=(n,t)=>{for(var e in t||(t={}))i.call(t,e)&&c(n,e,t[e]);if(l)for(var e of l(t))u.call(t,e)&&c(n,e,t[e]);return n},f=(n,e)=>t(n,o(e)),a=(n,t)=>{var e={};for(var o in n)i.call(n,o)&&t.indexOf(o)<0&&(e[o]=n[o]);if(null!=n&&l)for(var o of l(n))t.indexOf(o)<0&&u.call(n,o)&&(e[o]=n[o]);return e},v={};function d(n,t=!1){var e,o,r,l;const i=n.v,u=n.i,c=n.o,s=n.c;if(!i.length)return"";const f=[],a=i.length;f.push("M"+i[0][0]+","+i[0][1]);for(let n=1;n<a;n++){const r=i[n-1],l=null!=(e=null==c?void 0:c[n-1])?e:r,s=null!=(o=null==u?void 0:u[n])?o:i[n],a=i[n];t||l[0]!==r[0]||l[1]!==r[1]||s[0]!==a[0]||s[1]!==a[1]?f.push("C"+l[0]+","+l[1]+","+s[0]+","+s[1]+","+a[0]+","+a[1]):f.push("L"+a[0]+","+a[1])}if(s&&a>0){const n=i[a-1],e=null!=(r=null==c?void 0:c[a-1])?r:n,o=null!=(l=null==u?void 0:u[0])?l:i[0],s=i[0];!t&&e[0]===n[0]&&e[1]===n[1]&&o[0]===s[0]&&o[1]===s[1]||f.push("C"+e[0]+","+e[1]+","+o[0]+","+o[1]+","+s[0]+","+s[1]),f.push("z")}return f.join("")}function m(n,t,e){return n+(t-n)*e}function y(n,t,e){const o=[],r=Math.max(n.length,t.length);for(let l=0;l<r;l++)o[l]=m(n[l]||0,t[l]||0,e);return o}function b(n,t,e){return[m(n[0]||0,t[0]||0,e),m(n[1]||0,t[1]||0,e),m(n[2]||0,t[2]||0,e),m(void 0===n[3]?1:n[3],void 0===t[3]?1:t[3],e)]}function p(n,t,e){const o=Math.max(n.length,t.length),r=[];for(let l=0;l<o;l++)r.push(h(n[l],t[l],e));return r}function h(n,t,e){var o,r,l,i,u,c,s,f,a;if(!n||!t)return n||t||{v:[]};const v=Math.min(Math.max(e,0),1),d=Math.min(n.v.length,t.v.length),m=[],b=[],p=[];for(let e=0;e<d;e++){const a=n.v[e],d=t.v[e];m.push(y(a,d,v));const h=null!=(r=null==(o=n.i)?void 0:o[e])?r:a,g=null!=(i=null==(l=t.i)?void 0:l[e])?i:d;b.push(y(h,g,v));const w=null!=(c=null==(u=n.o)?void 0:u[e])?c:a,A=null!=(f=null==(s=t.o)?void 0:s[e])?f:d;p.push(y(w,A,v))}return{v:m,i:b.length?b:void 0,o:p.length?p:void 0,c:null!=(a=n.c)?a:t.c}}function g(n,t,e){if(e<=0)return 0;if(e>=1)return 1;const o=3*n,r=3*(t-n)-o,l=1-o-r;function i(n){return((l*n+r)*n+o)*n}function u(n){return(3*l*n+2*r)*n+o}let c=e,s=0,f=1;for(let n=0;n<8;n++){const n=i(c)-e;if(Math.abs(n)<1e-6)return c;const t=u(c);if(Math.abs(t)<1e-6)break;c-=n/t}for(c=e;s<f;){const n=i(c);if(Math.abs(n-e)<1e-6)return c;e>n?s=c:f=c,c=(f+s)/2}return c}function w(n){const[t,e,o,r]=n,l=3*e,i=3*(r-e)-l,u=1-l-i;return function(n){return e=g(t,o,n),((u*e+i)*e+l)*e;var e}}function A(n,t,e){return[n[0]+(t[0]-n[0])*e,n[1]+(t[1]-n[1])*e]}function M(n,t){if(!n)return{left:void 0,right:void 0};if(t<=0)return{left:void 0,right:n};if(t>=1)return{left:n,right:void 0};const[e,o,r,l]=n,i=g(e,r,t),u=[e,o],c=[r,l],{left:s,right:f}=function(n,t,e,o,r){const l=A(n,t,r),i=A(t,e,r),u=A(e,o,r),c=A(l,i,r),s=A(i,u,r),f=A(c,s,r);return{left:[n,l,c,f],right:[f,s,u,o]}}([0,0],u,c,[1,1],i),a=s[3][0],v=s[3][1];let d,m;a>1e-9&&Math.abs(v)>1e-9&&(d=[s[1][0]/a,s[1][1]/v,s[2][0]/a,s[2][1]/v]);const y=1-a,b=1-v;return y>1e-9&&Math.abs(b)>1e-9&&(m=[(f[1][0]-a)/y,(f[1][1]-v)/b,(f[2][0]-a)/y,(f[2][1]-v)/b]),{left:d,right:m}}function k(n){if(n)return[1-n[2],1-n[3],1-n[0],1-n[1]]}function j(n){const t=Math.round(255*n[0]),e=Math.round(255*n[1]),o=Math.round(255*n[2]);return 4===n.length?"rgba("+t+","+e+","+o+","+n[3]+")":"rgb("+t+","+e+","+o+")"}function O(n){if(n){if(Array.isArray(n))return n;if("string"==typeof n)return n.startsWith("#")?function(n){const t=n.slice(1),e=t.length<=4,o=e?t[0]+t[0]:t.slice(0,2),r=e?t[1]+t[1]:t.slice(2,4),l=e?t[2]+t[2]:t.slice(4,6),i=4===t.length?t[3]+t[3]:8===t.length?t.slice(6,8):null,u=[parseInt(o,16)/255,parseInt(r,16)/255,parseInt(l,16)/255];return null!==i&&u.push(parseInt(i,16)/255),u}(n):n.startsWith("rgb")?function(n){var t;const e=null==(t=n.match(/rgba?\((.*)\)/))?void 0:t[1];if(!e)throw new Error("Invalid rgb/rgba format");const o=e.split(",").map(n=>+n.trim());return[o[0]/255,o[1]/255,o[2]/255,...void 0!==o[3]?[o[3]]:[]]}(n):void console.warn("Unsupported color format: "+n)}}((t,e)=>{for(var o in e)n(t,o,{get:e[o],enumerable:!0})})(v,{PX_ANIMATOR_DATA_KEY:()=>Gn,createAnimator:()=>Yn,setupAnimationTriggers:()=>Un});var x=new Set(["color","fill","flood-color","lighting-color","stop-color","stroke"]),N=new Set(["translate","rotate","scale","skew"]),S=new Set(["offset-distance","offsetDistance"]);function z(n,t){var e;if(!n)return"";const o=null==(e=null==t?void 0:t.l)||e,r=[],l=n.translate,i=n.origin,u=n.rotate,c=n.skew,s=n.scale,f=o?"px":"",a=o?"deg":"";return l&&r.push("translate("+l[0]+f+","+l[1]+f+")"),i&&r.push("translate("+i[0]+f+","+i[1]+f+")"),null!=u&&r.push("rotate("+u+a+")"),null!=c&&r.push("skewX("+c+a+")"),s&&r.push("scale("+s[0]+","+s[1]+")"),i&&r.push("translate("+-i[0]+f+","+-i[1]+f+")"),r.join("")}var C=new Set(["offset-distance","offsetDistance"]),T=1e3;function U(n){return!n.includes("-")&&/[a-z][A-Z]/.test(n)}var F=new Set(["viewBox","preserveAspectRatio","gradientUnits","gradientTransform","spreadMethod","patternUnits","patternContentUnits","patternTransform","clipPathUnits","maskUnits","maskContentUnits","markerUnits","markerWidth","markerHeight","refX","refY","textLength","lengthAdjust","startOffset","filterUnits","primitiveUnits","tableValues","stdDeviation","baseFrequency","numOctaves","surfaceScale","diffuseConstant","specularConstant","specularExponent","kernelMatrix","kernelUnitLength","edgeMode","preserveAlpha","targetX","targetY"]);function R(n){return F.has(n)?n:n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}function P(n,t,e){return Math.max(t,Math.min(n,e))}function I(n,t,e,o,r){if(r<=0)return[n[0],n[1]];if(r>=1)return[o[0],o[1]];const l=1-r,i=l*l,u=r*r,c=i*l,s=3*r*i,f=3*u*l,a=u*r;return[c*n[0]+s*t[0]+f*e[0]+a*o[0],c*n[1]+s*t[1]+f*e[1]+a*o[1]]}var D=1e-4;function E(n,t,e,o,r){const l=L(n,t,e,o,r);return 0===l[0]&&0===l[1]?L(n,t,e,o,r<.5?r+D:r-D):l}function L(n,t,e,o,r){const l=1-r,i=3*l*l,u=6*r*l,c=3*r*r;return[i*(t[0]-n[0])+u*(e[0]-t[0])+c*(o[0]-e[0]),i*(t[1]-n[1])+u*(e[1]-t[1])+c*(o[1]-e[1])]}function Z(n,t){const{ts:e,ds:o}=n,r=e.length-1;if(t<=e[0])return o[0];if(t>=e[r])return o[r];let l=1,i=r;for(;l<i;){const n=l+i>>>1;e[n]<t?l=n+1:i=n}const u=e[i-1],c=e[i]-u,s=c>0?(t-u)/c:0;return o[i-1]+s*(o[i]-o[i-1])}function _(n){return"scroll"===(null==n?void 0:n.m)}var W="cover";function q(n,t,e,o){var r;const[l,i]=function(n,t,e){const o=t,r=e;switch(n){case"cover":return[0,o+r];case"entry":return[0,Math.min(o,r)];case"contain":return[Math.min(o,r),Math.max(o,r)];case"exit":return[Math.max(o,r),o+r];case"entry-crossing":return[0,o];case"exit-crossing":return[r,o+r]}}(null!=(r=null==n?void 0:n.phase)?r:W,e,o);return l+("number"==typeof(null==n?void 0:n.fraction)?n.fraction:t)*(i-l)}var K={auto:"auto",waapi:"waapi",frames:"frames"},V={waapi:K.waapi,frames:K.frames},X={before:"before",after:"after"};function Y(n){var t;const e=(null==n?void 0:n.animator)||(null==(t=null==n?void 0:n.meta)?void 0:t.animator);return e?function(n){const t=n.timeline;if(null==t||"object"!=typeof t)return n;const e=B.get(n);if(e)return e;const o=n,{timeline:r}=o,l=a(o,["timeline"]);if("scroll"===t.type||"view"===t.type){l.m="scroll",void 0!==t.duration&&(l.duration=t.duration),void 0!==t.iterations&&(l.iterations=t.iterations);const n=s({},l.scroll||{});n.kind=t.type,void 0!==t.h&&(n.driver=t.h),void 0!==t.axis&&(n.axis=t.axis),void 0!==t.source&&(n.source=t.source),void 0!==t.subject&&(n.subject=t.subject),void 0!==t.smoothing&&(n.smoothing=t.smoothing),void 0!==t.range&&(n.range=t.range);const e=t.pin;"boolean"==typeof e?n.pin=e:e&&"object"==typeof e&&(n.pin=!0,void 0!==e.align&&(n.pinAlign=e.align),void 0!==e.top&&(n.pinTop=e.top),void 0!==e.distance&&(n.pinDistance=e.distance)),l.scroll=n}else{if(void 0!==t.duration&&(l.duration=t.duration),void 0!==t.trigger){const n=t.trigger,{onFinish:e}=n,o=a(n,["onFinish"]);Object.keys(o).length&&(l.trigger=o),void 0!==e&&(l.A="reset"===e)}void 0!==t.delay&&(l.delay=t.delay),void 0!==t.iterations&&(l.iterations=t.iterations),void 0!==t.direction&&(l.direction=t.direction),void 0!==t.fill&&(l.fill=t.fill)}return B.set(n,l),l}(e):void 0}var B=new WeakMap;function G(n){var t;const e=null!=(t=n.value)?t:n.v;if(!e)return;if(Array.isArray(e)&&e.length>=2&&"number"==typeof e[0]&&"number"==typeof e[1])return[e[0],e[1]];const o=e.translate;return Array.isArray(o)&&o.length>=2?[o[0],o[1]]:void 0}function H(n){var t,e;return null!=(e=null!=(t=n.time)?t:n.t)?e:0}function $(n){var t;return null!=(t=n.easing)?t:n.e}function Q(n){var t,e;const o=n.keyframes;if(!Array.isArray(o))return!1;if(n.autoOrient)return!0;for(const n of o)if((null!=(t=n.tangentIn)?t:n.ti)||(null!=(e=n.tangentOut)?e:n.to))return!0;return!1}var J=new WeakMap;function nn(n,t,e,o){var r,l;let i=J.get(n);const u=null==i?void 0:i.get(t);if(u)return u;const c=null!=(r=n.tangentOut)?r:n.to,s=null!=(l=t.tangentIn)?l:t.ti,f=[e[0]+(c?c[0]:0),e[1]+(c?c[1]:0)],a=[o[0]+(s?s[0]:0),o[1]+(s?s[1]:0)],v=function(n,t,e,o,r=100){const l=r+1,i=new Float64Array(l),u=new Float64Array(l);let c=I(n,t,e,o,0);i[0]=0,u[0]=0;let s=0;for(let f=1;f<l;f++){const l=f/r,a=I(n,t,e,o,l),v=a[0]-c[0],d=a[1]-c[1];s+=Math.sqrt(v*v+d*d),i[f]=l,u[f]=s,c=a}return{ts:i,ds:u}}(e,f,a,o),d={P0:e,P1:f,P2:a,P3:o,M:v,j:v.ds[v.ds.length-1]};return i||(i=new WeakMap,J.set(n,i)),i.set(t,d),d}var tn=.5,en=5,on=32;function rn(n,t){var e,o,r;if(!Q(n))return n;const l=n.keyframes;if(!Array.isArray(l)||l.length<2)return n;const i=!!n.autoOrient,u=null!=(e=null==t?void 0:t.O)?e:tn,c=null!=(o=null==t?void 0:t.N)?o:en,s=null!=(r=null==t?void 0:t.S)?r:on,f=[],a=G(l[0]);if(!a)return n;const v=i?function(n,t){const e=G(n),o=G(t);if(!e||!o)return 0;const r=nn(n,t,e,o),l=E(r.P0,r.P1,r.P2,r.P3,0);return 180*Math.atan2(l[1],l[0])/Math.PI}(l[0],l[1]):void 0;f.push(ln(H(l[0]),sn(un(l[0]),un(l[0]),0,a,v,i)));for(let n=0;n<l.length-1;n++){const t=l[n],e=l[n+1],o=G(t),r=G(e);o&&r?(i&&n>0&&an(f,t,e,o,r,c),dn(f,t,e,o,r,i,u,c,s)):f.push(ln(H(e),sn(un(e),un(e),1,null!=r?r:[0,0],void 0,i)))}const d=$(l[l.length-1]);d&&(f[f.length-1].e=d),i&&function(n){var t;let e;for(const o of n){const n=null!=(t=o.v)?t:o.value;if(!n||"number"!=typeof n.rotate)continue;if(void 0===e){e=n.rotate;continue}let r=n.rotate;for(;r-e>180;)r-=360;for(;r-e<-180;)r+=360;n.rotate=r,e=r}}(f);const m={keyframes:f};return void 0!==n.loop&&(m.loop=n.loop),m}function ln(n,t){return{t:n,v:t}}function un(n){var t;const e=null!=(t=n.value)?t:n.v;if(e&&"object"==typeof e&&!Array.isArray(e))return e}function cn(n,t,e){if(void 0===n)return t;if(void 0===t)return n;if("number"==typeof n&&"number"==typeof t)return n+(t-n)*e;if(Array.isArray(n)&&Array.isArray(t)&&n.length===t.length){const o=new Array(n.length);for(let r=0;r<n.length;r++){const l="number"==typeof n[r]?n[r]:0,i="number"==typeof t[r]?t[r]:0;o[r]=l+(i-l)*e}return o}return e<.5?n:t}function sn(n,t,e,o,r,l){const i={translate:o},u=new Set;if(n)for(const t of Object.keys(n))u.add(t);if(t)for(const n of Object.keys(t))u.add(n);for(const o of u){if("translate"===o)continue;if("rotate"===o&&l)continue;const r=null==n?void 0:n[o],u=null==t?void 0:t[o];void 0===r&&void 0===u||(i[o]=cn(r,u,e))}return void 0!==r&&(i.rotate=r+fn(n,t,e)),i}function fn(n,t,e){const o="number"==typeof(null==n?void 0:n.rotate)?n.rotate:void 0,r="number"==typeof(null==t?void 0:t.rotate)?t.rotate:void 0;if(void 0===o&&void 0===r)return 0;const l=cn(o,r,e);return"number"==typeof l?l:0}function an(n,t,e,o,r,l){var i;const u=n[n.length-1],c=null!=(i=u.v)?i:u.value,s=null==c?void 0:c.rotate;if("number"!=typeof s)return;const f=un(t),a=s-fn(f,f,0),v=nn(t,e,o,r),d=E(v.P0,v.P1,v.P2,v.P3,0),m=180*Math.atan2(d[1],d[0])/Math.PI,y=function(n,t){let e=n-t;for(;e>180;)e-=360;for(;e<-180;)e+=360;return e}(m,a);if(Math.abs(y)<=l)return;const b=H(t),p=Math.min(b+vn,(b+H(e))/2),h=sn(un(t),un(t),0,o,m,!0);n.push(ln(p,h))}var vn=.05;function dn(n,t,e,o,r,l,i,u,c){const s=nn(t,e,o,r),f=H(t),a=H(e),v=$(t),d=(m=v)?w([m[1],m[0],m[3],m[2]]):n=>n;var m;const y=un(t),b=un(e),p=function(n,t,e,o,r){const l=[];mn(n.P0[0],n.P1[0],n.P2[0],n.P3[0],l),mn(n.P0[1],n.P1[1],n.P2[1],n.P3[1],l),l.sort((n,t)=>n-t);const i=[0];for(const n of l)n>i[i.length-1]+1e-6&&n<.999999&&i.push(n);i.push(1);const u=[],c={C:r-i.length};for(let r=0;r<i.length-1;r++)yn(i[r],i[r+1],u,n,t,e,o,c);return u}(s,l,i,u,c),h=[];for(const n of p){const t=Z(s.M,n),e=P(s.j>0?t/s.j:n,0,1),o={u:P(d(e),0,1),p:e,T:I(s.P0,s.P1,s.P2,s.P3,n)};if(l){const t=E(s.P0,s.P1,s.P2,s.P3,n);o.U=180*Math.atan2(t[1],t[0])/Math.PI}h.push(o)}let g=v,A=0;const k=n.length-1;for(let t=0;t<h.length;t++){const e=h[t],o=A<1?P((e.u-A)/(1-A),0,1):1,{left:r,right:i}=M(g,o),u=0===t?k:n.length-1;r?n[u].e=r:delete n[u].e;const c=f+e.u*(a-f),s=sn(y,b,e.p,e.T,e.U,l);n.push(ln(c,s)),g=i,A=e.u}}function mn(n,t,e,o,r){const l=t-n,i=e-t,u=l-2*i+(o-e),c=2*(i-l),s=l;if(Math.abs(u)<1e-10){if(Math.abs(c)>1e-10){const n=-s/c;n>1e-6&&n<.999999&&r.push(n)}return}const f=c*c-4*u*s;if(f<0)return;const a=Math.sqrt(f),v=(-c-a)/(2*u),d=(-c+a)/(2*u);v>1e-6&&v<.999999&&r.push(v),d>1e-6&&d<.999999&&r.push(d)}function yn(n,t,e,o,r,l,i,u){const c=(n+t)/2,s=I(o.P0,o.P1,o.P2,o.P3,n),f=I(o.P0,o.P1,o.P2,o.P3,t),a=t-n,v=I(o.P0,o.P1,o.P2,o.P3,n+.25*a),d=I(o.P0,o.P1,o.P2,o.P3,c),m=I(o.P0,o.P1,o.P2,o.P3,n+.75*a),y=Math.max(bn(v,s,f),bn(d,s,f),bn(m,s,f));let b=!0;if(r){const e=E(o.P0,o.P1,o.P2,o.P3,n),r=E(o.P0,o.P1,o.P2,o.P3,t),l=180*Math.atan2(e[1],e[0])/Math.PI,u=180*Math.atan2(r[1],r[0])/Math.PI;let c=Math.abs(l-u);c>180&&(c=360-c),c>i&&(b=!1)}y<=l&&b||u.C<=0||a<1e-6?e.push(t):(u.C-=1,yn(n,c,e,o,r,l,i,u),yn(c,t,e,o,r,l,i,u))}function bn(n,t,e){const o=e[0]-t[0],r=e[1]-t[1],l=o*o+r*r;if(l<1e-20){const e=n[0]-t[0],o=n[1]-t[1];return Math.sqrt(e*e+o*o)}const i=(n[0]-t[0])*r-(n[1]-t[1])*o;return Math.abs(i)/Math.sqrt(l)}var pn=1;function hn(n,t){if(n===t)return!0;if(typeof n!=typeof t||null===n||null===t||"object"!=typeof n)return!1;if(Array.isArray(n)!==Array.isArray(t))return!1;const e=Object.keys(n),o=Object.keys(t);return e.length===o.length&&e.every(e=>hn(n[e],t[e]))}function gn(n){const t=[];let e;const o=function(n){const t=n.split(/([MLCZmlcz]|[\s,]+)/).map(n=>n.trim()).filter(n=>n&&","!==n),e=[];let o=null;for(const n of t)if(/[MLCZmlcz]/.test(n))o={type:n,values:[]},e.push(o);else if(o){const t=+n;o.values.push(Number.isNaN(t)?0:t)}return e}(n);for(const n of o){const o=n.type,r=n.values;if("M"===o||"m"===o){const n=r[0]||0,o=r[1]||0;e={v:[[n,o]],i:[[n,o]],o:[[n,o]],c:!1},t.push(e);continue}if(e||(e={v:[[0,0]],i:[[0,0]],o:[[0,0]],c:!1},t.push(e)),"L"===o){const n=r[0]||0,t=r[1]||0;e.v.push([n,t]),e.i.push([n,t]),e.o.push([n,t])}else if("C"===o){const n=r[0]||0,t=r[1]||0,o=r[2]||0,l=r[3]||0,i=r[4]||0,u=r[5]||0;e.o[e.o.length-1]=[n,t],e.v.push([i,u]),e.i.push([o,l]),e.o.push([i,u])}else"Z"===o||"z"===o?e.c=!0:console.warn('Unsupported path command "'+o+'"')}return t}function wn(n){return n.startsWith("path(")&&n.endsWith(")")?n.slice(5,-1):/^[MmZzLlHhVvCcSsQqTtAa]/.test(n)?n:void 0}function An(n){return"string"==typeof n&&void 0!==wn(n)}function Mn(n){if(n&&"object"==typeof n&&"string"==typeof n.path){const t=wn(n.path);return t?{paths:gn(t)}:n}if(n&&"object"==typeof n&&"paths"in n){const t=n.paths;if(Array.isArray(t)&&t.length>0&&An(t[0])){const n=[];for(const e of t){const t=wn(e);t&&n.push(...gn(t))}return{paths:n}}return n}if(Array.isArray(n)){if(n.length>0&&An(n[0])){const t=[];for(const e of n){const n=wn(e);n&&t.push(...gn(n))}return{paths:t}}return{paths:n}}return An(n)?{paths:gn(wn(n))}:n}function kn(n,t){var e;if(n)return Array.isArray(n)?n:(null==(e=null==t?void 0:t.easings)?void 0:e[n])?t.easings[n]:void console.warn("Unknown easing name: "+n)}function jn(n,t){var e;if("string"==typeof n){const o=null==(e=null==t?void 0:t.animations)?void 0:e[n];return o||console.warn("Unknown animation name: "+n),o}return n}function On(n,t,e,o){var r,l;return"d"===n?{paths:p(null!=(r=null==t?void 0:t.paths)?r:Array.isArray(t)?t:[],null!=(l=null==e?void 0:e.paths)?l:Array.isArray(e)?e:[],o)}:x.has(n)?b(t||[0,0,0,1],e||[0,0,0,1],o):"transform"!==n||"object"!=typeof t||null===t||Array.isArray(t)||"object"!=typeof e||null===e||Array.isArray(e)?"rotate"===n&&"number"==typeof t&&"number"==typeof e?m(t,e,o):N.has(n)||"stroke-dasharray"===n||"strokeDasharray"===n?y(t||[],e||[],o):m(+(t||0),+(e||0),o):function(n,t,e){const o=new Set([...Object.keys(null!=n?n:{}),...Object.keys(null!=t?t:{})]),r={};for(const l of o){const o=null==n?void 0:n[l],i=null==t?void 0:t[l];if("rotate"===l||"skew"===l)r[l]=m(+(null!=o?o:0),+(null!=i?i:0),e);else if("translate"===l||"scale"===l||"origin"===l){const n="scale"===l?[1,1]:[0,0];r[l]=y(o||n,i||n,e)}else r[l]=null!=i?i:o}return r}(t,e,o)}function xn(n,t,e,o){var r,l,i,u,c,a,v;const d=t.keyframes||[],m=[];for(const t of d){const e=null!=(l=null!=(r=t.time)?r:t.t)?l:0;let s=null!=(i=t.value)?i:t.v;const f=null!=(u=t.easing)?u:t.e;"d"===n&&(s=Mn(s));const d=U(n)?R(n):n;x.has(d)&&(s=null!=(c=O(s))?c:s);const y={t:e,v:s,e:kn(f,o)},b=null!=(a=t.tangentIn)?a:t.ti,p=null!=(v=t.tangentOut)?v:t.to;b&&(y.tangentIn=b),p&&(y.tangentOut=p),m.push(y)}m.sort((n,t)=>{var e,o;return(null!=(e=n.t)?e:0)-(null!=(o=t.t)?o:0)});const y=t.loop,b=!0===y?{}:y||void 0;return b&&m.length>=2?function(n,t,e,o){var r,l,i,u,c;const a=t.length-1,v=P(null!=(r=e.segmentCount)?r:a,1,a);let d;d=e.extend===X.before?t.slice(0,v+1):t.slice(a-v);const m=null!=(l=t[0].t)?l:0,y=null!=(i=t[t.length-1].t)?i:0;let b,p;e.extend===X.before?(b=0,p=m):(b=y,p=o);const h=p-b;if(h<=0)return t;const g=null!=(u=d[0].t)?u:0,A=(null!=(c=d[d.length-1].t)?c:0)-g;if(A<=0)return t;const j=d.map(n=>{var t,e;return{F:(n.t-g)/A,v:n.v,e:n.e,tangentIn:null!=(t=n.tangentIn)?t:n.ti,tangentOut:null!=(e=n.tangentOut)?e:n.to}}),O=Math.floor(h/A),x=h-O*A,N=x/A,S=[],z=e.extend!==X.before,C=t[t.length-1];let T,U=!1;function F(t,e,o){var r;let l;if(e){l=[];for(let n=j.length-1;n>=0;n--)l.push({F:1-j[n].F,v:j[n].v,e:n>0?k(j[n-1].e):void 0,tangentIn:j[n].tangentOut,tangentOut:j[n].tangentIn})}else l=j;const i=void 0!==o?o:1;for(let e=0;e<l.length;e++){const o=l[e];if(o.F>i+1e-9){const r=l[e-1],u=o.F-r.F,c=(i-r.F)/u,s=r.e?w(r.e)(c):c,f=On(n,r.v,o.v,s),{left:a}=M(r.e,c);return S.length>0&&r.F<=i&&(S[S.length-1].e=a),void S.push({t:t+i*A,v:f,e:void 0})}const u=S.length>0?S[S.length-1]:C,c=z&&0===e&&void 0!==u&&Math.abs((null!=(r=u.t)?r:0)-(t+o.F*A))<1e-9;if(c){if(hn(u.v,o.v)){S.length>0?(u.e=o.e,u.tangentOut=o.tangentOut):(T=o.e,U=!0);continue}S.length>0&&(delete u.tangentIn,delete u.tangentOut)}const s={t:t+o.F*A+(c?pn:0),v:o.v,e:e<l.length-1?o.e:void 0};o.tangentIn&&(s.tangentIn=o.tangentIn),o.tangentOut&&(s.tangentOut=o.tangentOut),S.push(s)}}if(e.extend===X.before){N>1e-9&&function(t,e,o){let r;if(e){r=[];for(let n=j.length-1;n>=0;n--)r.push({F:1-j[n].F,v:j[n].v,e:n>0?k(j[n-1].e):void 0,tangentIn:j[n].tangentOut,tangentOut:j[n].tangentIn})}else r=j;const l=1-o;for(let e=0;e<r.length;e++){const o=r[e];if(o.F<l-1e-9)continue;const i=r[e-1];if(i&&i.F<l-1e-9&&o.F>l+1e-9){const e=o.F-i.F,r=(l-i.F)/e,u=i.e?w(i.e)(r):r,c=On(n,i.v,o.v,u),{right:s}=M(i.e,r);S.push({t:t,v:c,e:s})}const u={t:t+(o.F-l)*A,v:o.v,e:e<r.length-1?o.e:void 0};o.tangentIn&&(u.tangentIn=o.tangentIn),o.tangentOut&&(u.tangentOut=o.tangentOut),S.push(u)}}(b,!!e.alternate&&O%2==0,N);for(let n=0;n<O;n++){const t=O-1-n,o=!!e.alternate&&t%2==0;F(b+x+n*A,o)}}else{for(let n=0;n<O;n++){const t=!!e.alternate&&n%2==0;F(b+n*A,t)}if(N>1e-9){const n=!!e.alternate&&O%2==0;F(b+O*A,n,N)}}return e.extend===X.before?[...S,...t]:U&&t.length>0?[...t.slice(0,-1),f(s({},t[t.length-1]),{e:T}),...S]:[...t,...S]}(n,m,b,e):m}var Nn=0;function Sn(n,t=V.waapi){const e=Y(n)||{},o=function(n){var t;if(n)return null==(t=Y(n))?void 0:t.definitions}(n),r=e.duration||1e3,l=[],i=(n,e,l)=>{if(!e)return null;const i=function(n,t){if(!n)return[];const e=[];if("string"==typeof n){const o=jn(n,t);o&&e.push(o)}else if(Array.isArray(n))for(const o of n){const n=jn(o,t);n&&e.push(n)}else e.push(n);return e}(e,o);if(0===i.length)return null;const u=function(n,t,e,o=V.waapi){const r={};for(const[l,i]of Object.entries(n)){if("transform"===l&&"offsetPath"===i.R&&void 0!==n.offsetDistance)continue;const u=xn(l,i,t,e);if(u.length>0){const n={keyframes:u};void 0!==i.autoOrient&&(n.autoOrient=i.autoOrient),void 0!==i.loop&&(n.loop=i.loop),r[l]=o===V.waapi&&"transform"===l?rn(n):n}}return r}(function(n,t){if(!n)return n;const e=t&&"object"==typeof t&&!Array.isArray(t)?t:function(n){var t,e;if(!n||"string"!=typeof n)return;const o={},r=/([a-zA-Z]+)\s*\(([^)]*)\)/g,l=["translate","rotate","skewX","scale"];let i,u=-1;for(;null!==(i=r.exec(n));){const n=i[1],r=l.indexOf(n);if(r<0||r<=u)return;u=r;const c=i[2].split(/[\s,]+/).filter(Boolean).map(Number);if(c.some(n=>Number.isNaN(n)))return;if("translate"===n){if(c.length<1||c.length>2)return;o.translate=[c[0],null!=(t=c[1])?t:0]}else if("rotate"===n){if(1!==c.length)return;o.rotate=c[0]}else if("skewX"===n){if(1!==c.length)return;o.skew=c[0]}else{if(c.length<1||c.length>2)return;o.scale=[c[0],null!=(e=c[1])?e:c[0]]}}return n.replace(/([a-zA-Z]+)\s*\(([^)]*)\)/g,"").replace(/[\s,]/g,"").length?void 0:Object.keys(o).length?o:void 0}(t);if(!e||!Object.keys(e).length)return n;const o=n=>n&&"object"==typeof n&&!Array.isArray(n)?s(s({},e),n):n,r=n.transform;if(r&&"object"==typeof r){const t=r;if(Array.isArray(t.keyframes)){const e=f(s({},t),{keyframes:t.keyframes.map(n=>f(s({},n),{value:o(n.value)}))});return void 0!==e.value&&(e.value=o(e.value)),f(s({},n),{transform:e})}return n}const l=Object.keys(n).filter(n=>N.has(n));if(1!==l.length)return n;const i=l[0],u=n[i];if(!u||"object"!=typeof u||!Array.isArray(u.keyframes))return n;const c=f(s({},u),{keyframes:u.keyframes.map(n=>f(s({},n),{value:f(s({},e),{[i]:n.value})}))});void 0!==c.value&&(c.value=f(s({},e),{[i]:c.value}));const a=s({},n);return delete a[i],f(s({},a),{transform:c})}(function(n){const t={};for(const e of n)for(const[n,o]of Object.entries(e))t[n]=o;return t}(i),l),r,o,t);return 0===Object.keys(u).length?null:{id:n,animate:u}},u=function(n){var t;if(!n)return;const e=null==(t=Y(n))?void 0:t.animateById;return e?Object.entries(e).map(([n,t])=>({id:n.startsWith("#")?n.slice(1):n,animate:t})):void 0}(n);if(u)for(const n of u){const t=i(n.id,n.animate);t&&l.push(t)}const c=n=>{const t=n.animate;if(t&&Object.keys(t).length>0){const e=n.id||"_px_el_"+ ++Nn;n.id=e;const o=i(e,t,n.transform);o&&l.push(o)}if(n.children)for(let t=0;t<n.children.length;t++)c(n.children[t])};if(n.children)for(let t=0;t<n.children.length;t++)c(n.children[t]);return l}function zn(n,t,e){var o,r,l,i,u,c,s;const f=t.keyframes||[];if(0===f.length)return null;const{P:a,I:v}=function(n,t){var e,o;const r=n.length-1;let l=n[0],i=n[r>0?1:0];for(let u=0;u<r;u++){const c=null!=(e=n[u].t)?e:0,s=null!=(o=n[u+1].t)?o:0;if(c<=t&&t<=s){l=n[u],i=n[u+1];break}t>s&&u===r-1&&(l=n[r>0?r-1:0],i=n[r])}return{P:l,I:i}}(f,e);let h=a===v?0:(g=e,A=null!=(o=a.t)?o:0,(M=null!=(r=v.t)?r:0)===A?0:0+(g-A)/(M-A)*1);var g,A,M;h=P(h,0,1);const k=null!=(l=a.e)?l:a.easing;if(k&&Array.isArray(k))try{h=w(k)(h)}catch(n){}let O=U(n)?R(n):n,N=null;const C=null!=(i=null==a?void 0:a.v)?i:null==a?void 0:a.value,T=null!=(u=null==v?void 0:v.v)?u:null==v?void 0:v.value;if("d"===O)N=p(null!=(c=null==C?void 0:C.paths)?c:Array.isArray(C)?C:[],null!=(s=null==T?void 0:T.paths)?s:Array.isArray(T)?T:[],h).map(n=>d(n)).join("");else if(x.has(O))N=j(b(C||[0,0,0,1],T||[0,0,0,1],h)),O=n;else if("stroke-dasharray"===O)N=y(C||[],T||[],h).join(" "),O=n;else if("transform"!==O||null===C||"object"!=typeof C||Array.isArray(C))"translate"===O?(N="translate("+y(C||[0,0],T||[0,0],h).join(",")+")",O="transform"):"rotate"===O?(N="rotate("+m(+(C||0),+(T||0),h)+")",O="transform"):"scale"===O?(N="scale("+y(C||[1,1],T||[1,1],h).join(",")+")",O="transform"):N=m(+(C||0),+(T||0),h);else{const n=new Set([...C?Object.keys(C):[],...T?Object.keys(T):[]]),e={};for(const t of n){const n=null==C?void 0:C[t],o=null==T?void 0:T[t];if("rotate"===t||"skew"===t)e[t]=m(+(null!=n?n:0),+(null!=o?o:0),h);else if("translate"===t||"scale"===t||"origin"===t){const r="scale"===t?[1,1]:[0,0],l=y(n||r,o||r,h);e[t]=l}}if(Q(t)){const n=C.translate,o=T.translate;if(Array.isArray(n)&&Array.isArray(o)){const r=function(n,t,e,o,r,l){const i=nn(n,t,e,o),u=0===i.j?r:function(n,t){const e=t*n.ds[n.ds.length-1],{ts:o,ds:r}=n,l=r.length-1;if(e<=0)return o[0];if(e>=r[l])return o[l];let i=1,u=l;for(;i<u;){const n=i+u>>>1;r[n]<e?i=n+1:u=n}const c=r[u-1],s=r[u]-c,f=s>0?(e-c)/s:0;return o[u-1]+f*(o[u]-o[u-1])}(i.M,r),c=I(i.P0,i.P1,i.P2,i.P3,u);if(!l)return{translate:c};const s=E(i.P0,i.P1,i.P2,i.P3,u);return{translate:c,U:180*Math.atan2(s[1],s[0])/Math.PI}}(a,v,[+n[0],+n[1]],[+o[0],+o[1]],h,!!t.autoOrient);e.translate=[r.translate[0],r.translate[1]],void 0!==r.U&&(e.rotate=r.U)}}N=z(e,{l:!1}),O="transform"}return S.has(O)&&"number"==typeof N&&(N=100*N+"%"),{k:O,v:null===N?"":""+N}}function Cn(n,t){const e={};for(const[o,r]of Object.entries(n)){const n=zn(o,r,t);n&&(e[n.k]=n.v)}return e}function Tn(n){const t=globalThis;"function"!=typeof t.cancelAnimationFrame?t.clearTimeout(n):t.cancelAnimationFrame(n)}function Un(n,t){const{startOn:e,outAction:o="continue",scrollIntoViewThreshold:r=0}=t,l=n.getRootElement();if(!l)return console.warn("setupAnimationTriggers: No root element found for animation."),n;let i=!1;const u=()=>{i&&(i=!1,n.setPlaybackRate(1)),n.play()},c=()=>{switch(o){case"pause":n.pause();break;case"reset":n.cancel();break;case"reverse":i=!0,n.setPlaybackRate(-1),n.play()}};switch(e){case"load":{const n=()=>u();"complete"===document.readyState?n():window.addEventListener("load",n,{once:!0});break}case"mouseOver":{let n=!1;const t=()=>{n=!0,u()},e=()=>{n&&c()};l.addEventListener("mouseenter",t),l.addEventListener("mouseleave",e);break}case"click":{const t=()=>{n.isPlaying()?c():u()};l.addEventListener("click",t);break}case"scrollIntoView":{const n=n=>{var t,e;const o=n.boundingClientRect,r=n.intersectionRect;if(!(null==o?void 0:o.height)||!r)return n.intersectionRatio;const l="undefined"!=typeof window&&window.innerHeight?window.innerHeight:1/0,i=null!=(e=null==(t=n.rootBounds)?void 0:t.height)?e:1/0,u=Math.min(l,i),c=Math.min(o.height,Number.isFinite(u)?u:o.height);return c>0?r.height/c:n.intersectionRatio},t=Array.from({length:21},(n,t)=>t/20);let e=!1;new IntersectionObserver(t=>{t.forEach(t=>{t.isIntersecting&&n(t)>=r?(e=!0,u()):e&&(e=!1,c())})},{threshold:t}).observe(l);break}}return n}function Fn(n){return"#"+n}function Rn(n,t,e,o){const r=Y(n)||{};if(!o)if(n.id){const t=Fn(n.id);(o=document.querySelector(t))||console.warn("createFrameLoopAnimator: No root element found for selector: ",t)}else console.warn("createFrameLoopAnimator: No root element provided");const l=function(n,t,e){var o;const r=Y(n)||{},l=Sn(n,V.frames),i=r.iterations;let u=1;"number"==typeof i&&(u=i||1),"infinite"===i&&(u=1/0),u<1&&(u=1);const c=+(r.duration||T),s=c&&u?c*(u===1/0?1/0:u):c?(null!=u?u:1)*c:0,f=r.direction||"normal",a=null!=(o=r.fill)?o:"forwards",v="forwards"===a||"both"===a,d="backwards"===a||"both"===a;let m=null,y=!1,b=-(r.delay||0),p=0,h=1,g=!1;const w=r.frameRate,A=w&&w>0?1e3/w:0;let M=0;const k=()=>{const n=p?(Date.now()-p)*h:0;return b+n},j=()=>{let n=k();return Number.isFinite(s)&&n>s&&(n=s),n<0&&(n=0),n};function O(n){let e=function(){const t=c>0?c:1;let e=0,o=0;c>0?(n=P(n,0,u*t),o=Math.max(0,Math.ceil(n/t)-1),o=Math.min(o,u-1),e=P((n-o*t)/t,0,1)):e=n;const r=f||"normal";let l=e;return"reverse"===r?l=1-e:"alternate"===r?o%2==1&&(l=1-e):"alternate-reverse"===r&&o%2==0&&(l=1-e),l}();for(const n of l||[]){const o=n.animate;if(!o||"object"!=typeof o||Array.isArray(o)){console.warn("Empty or unresolved binding",n);continue}const r=Cn(o,e*c);for(const[e,o]of Object.entries(r))t.setAttribute(n.id,e,o)}}r.delay&&(r.delay<0?O(j()):d&&O(0));const x=()=>!!y&&!!t.isConnected()&&(h<0?k()>0:!(Number.isFinite(s)&&j()>=s)),N=n=>{null!==m&&(Tn(m),m=null),(n||x())&&(m=function(n){const t=globalThis;return"function"==typeof t.requestAnimationFrame?t.requestAnimationFrame(n):t.setTimeout(n,16)}(()=>{m=null,(()=>{var n,o;if(!t.isConnected())return void S();const r=j(),l=k();if(l<0&&h>0)d&&O(0);else{if(h<0&&l<=0)return S(),O(0),void(g||(g=!0,null==(n=null==e?void 0:e.onFinish)||n.call(e)));if(h>0&&s&&Number.isFinite(s)&&r>=s)return S(),O(v?s:0),void(g||(g=!0,null==(o=null==e?void 0:e.onFinish)||o.call(e)));if(A>0){const n=Date.now();if(M&&n-M<A)return;M=n}O(r)}})(),N()}))},S=()=>{if(!y)return;let n=k();Number.isFinite(s)&&n>s&&(n=s),b=n,p=0,y=!1,null!==m&&(Tn(m),m=null),n>=0?O(n):d&&O(0)},z={isReady:()=>!0,getRootElement:()=>null,isPlaying:()=>x(),play:()=>{var n;(()=>{if(!y){if(h>=0)Number.isFinite(s)&&b>=s&&(b=0);else if(b<=0){if(!Number.isFinite(s))return void console.warn("play: cannot start reverse playback of an infinite animation from time 0");b=s}g=!1,y=!0,p=Date.now(),N(!0)}})(),null==(n=null==e?void 0:e.D)||n.call(e)},pause:()=>{var n;S(),null==(n=null==e?void 0:e.L)||n.call(e)},cancel:()=>{var n;S(),b=0,p=0,y=!1,g=!1,O(b),null==(n=null==e?void 0:e.Z)||n.call(e)},finish:()=>{((n=!0)=>{var t;b=Number.isFinite(s)?s:j(),p=0,y=!1,null!==m&&(Tn(m),m=null),O(v?b:0),n&&!g&&(g=!0,null==(t=null==e?void 0:e.onFinish)||t.call(e))})(!0)},setPlaybackRate:n=>{if(!isFinite(n)||0===n)return void console.warn("setPlaybackRate: rate must be finite and non-zero");let t=k();Number.isFinite(s)&&t>s&&(t=s),n<0!=h<0&&(g=!1),h=n,b=t,y&&(p=Date.now())},getCurrentTime:()=>j(),setCurrentTime:n=>{n<0&&(n=0),Number.isFinite(s)&&n>s&&(n=s),b=n,y&&(p=Date.now()),(!Number.isFinite(s)||n<s)&&(g=!1),O(j())},destroy:()=>{var n;z.cancel(),null==(n=null==e?void 0:e._)||n.call(e)}};return z}(n,t||function(n){const t=new Set;return{isConnected:()=>!n||n.isConnected,setAttribute:(e,o,r)=>{o=R(o);const l=Fn(e),i=(null==n?void 0:n.querySelectorAll(l))||document.querySelectorAll(l);0!==i.length||t.has(l)||(t.add(l),console.warn('setAttribute: No elements found for selector "'+l+'"'));for(let n=0;n<i.length;n++){const t=i[n],e="transform"===o&&"pattern"===t.tagName?"patternTransform":o;t.setAttribute(e,r),C.has(o)&&(t.style[o]=r)}}}}(o),e),i=f(s({},l),{getRootElement:()=>o||null});return r.trigger&&(_(r)?console.warn("scroll timeline: `animator.trigger` is ignored (triggers do not apply to scroll-driven playback)"):Un(i,r.trigger)),i}function Pn(n,t,e,o){var r,l;let i=null!=(r=n.v)?r:n.value;const u=null!=(l=n.e)?l:n.easing,c={offset:t,easing:u&&Array.isArray(u)?"cubic-bezier("+u.join(",")+")":void 0};let s,f=e;var a;return x.has(e)&&Array.isArray(i)?s=j(i):"transform"!==e||null===i||"object"!=typeof i||Array.isArray(i)?N.has(e)?(Array.isArray(i)&&("translate"===e&&(i=i.map(n=>n+"px")),i=i.join(",")),"rotate"===e&&(i+="deg"),s=e+"("+i+")",f="transform"):s="d"===e?'path("'+(i&&"object"==typeof i&&Array.isArray(i.paths)?i.paths:[]).map(n=>d(n,!0)).join("")+'")':S.has(e)&&"number"==typeof i?100*i+"%":""+i:(s=z(i,{l:!0}),f="transform"),CSS.supports(R(f),s)||o.add(f),f=(a=f).includes("-")?a.replace(/-([a-z])/g,(n,t)=>t.toUpperCase()):a,c[f]=s,c}function In(n,t,e){var o,r,l,i,u;const c=[];for(let a=0;a<t.length;a++){const v=t[a],d=null!=(o=v.t)?o:0;if(d<0){const e=t[a+1];if(e&&(null!=(r=e.t)?r:0)>=0){const t=(0-d)/((null!=(l=e.t)?l:0)-d),o=v.e?w(v.e)(t):t,{right:r}=M(v.e,t);c.push({t:0,v:On(n,v.v,e.v,o),e:r})}continue}if(d>e){const o=t[a-1];if(o&&(null!=(i=o.t)?i:0)<=e){const t=null!=(u=o.t)?u:0,r=(e-t)/(d-t),l=o.e?w(o.e)(r):r,{left:i}=M(o.e,r);c.length>0&&(c[c.length-1]=f(s({},c[c.length-1]),{e:i})),c.push({t:e,v:On(n,o.v,v.v,l),e:void 0})}break}c.push(v)}return c}function Dn(n,t,e){var o;const r=new Map;for(const[l,i]of Object.entries(n)){const n=e.duration||1,u=In(l,i.keyframes||[],n),c=[];for(let e=0;e<u.length;e++){const r=u[e],i=Pn(r,P((null!=(o=r.t)?o:0)/n,0,1),l,t);0===e&&(i.offset||0)>0&&c.push(f(s({},i),{offset:0})),c.push(i)}c.length>0&&(c[c.length-1].offset||0)<1&&c.push(f(s({},c[c.length-1]),{offset:1})),c.length>0&&r.set(l,c)}return r}function En(n,t,e,o,r){var l;const i=Y(n)||{};if(!e)if(n.id){const t=Fn(n.id);(e=document.querySelector(t))||console.warn("createFrameLoopAnimator: No root element found for selector: ",t)}else console.warn("createFrameLoopAnimator: No root element provided");const u=Sn(n,V.waapi),c=[],s=i.iterations;let f;"number"==typeof s&&(f=s),"infinite"===s&&(f=1/0);const a=new Set;let v=!1,d=!1;(null==u?void 0:u.length)||console.warn("createWebApiAnimator: No animation bindings defined");for(const n of u||[]){const o=n.animate;if(!o||"object"!=typeof o||Array.isArray(o)){console.warn("createWebApiAnimator: Empty or unresolved binding",n);continue}const u=Fn(n.id),s=(null==e?void 0:e.querySelectorAll(u))||document.querySelectorAll(u);0===s.length&&console.warn('createWebApiAnimator: No elements found for selector "'+u+'"');const m=Dn(o,a,i),y=i.delay&&i.delay>0?i.delay:void 0;let b;if(i.delay&&i.delay<0&&i.duration){const n=-i.delay;b=f===1/0?n%i.duration:Math.min(n,i.duration*(null!=f?f:1))}const p={duration:i.duration,delay:y,fill:null!=(l=i.fill)?l:"forwards",direction:i.direction,iterations:f};for(let n=0;n<s.length;n++){const e=s[n];for(const[,n]of m)if(n.length>0)try{const o=new KeyframeEffect(e,n,p),l=new Animation(o,r?r.timeline:document.timeline);if(r){const n=l;r.rangeStart&&(n.rangeStart=r.rangeStart),r.rangeEnd&&(n.rangeEnd=r.rangeEnd)}(null==t?void 0:t.onFinish)&&(l.onfinish=()=>{var n;v||(v=!0,null==(n=t.onFinish)||n.call(t))}),(null==t?void 0:t._)&&(l.onremove=()=>{var n;d||(d=!0,null==(n=t._)||n.call(t))}),void 0!==b&&(l.currentTime=b),c.push(l)}catch(n){console.warn(n)}}}if(!o&&a.size)return console.warn("Unsupported CSS attrs: "+[...a].join(", ")),null;const m={isReady:()=>!0,getRootElement:()=>e||null,isPlaying:()=>{var n;return"running"===(null==(n=c[0])?void 0:n.playState)},play:()=>{var n;v=!1,c.forEach(n=>n.play()),null==(n=null==t?void 0:t.D)||n.call(t)},pause:()=>{var n;c.forEach(n=>n.pause()),null==(n=null==t?void 0:t.L)||n.call(t)},cancel:()=>{var n;v=!1,c.forEach(n=>n.cancel()),null==(n=null==t?void 0:t.Z)||n.call(t)},finish:()=>{var n;for(const t of c)try{(null==(n=t.effect)?void 0:n.getTiming().iterations)===1/0?(t.effect.updateTiming({iterations:1}),t.finish(),t.effect.updateTiming({iterations:1/0})):t.finish()}catch(n){t.cancel()}},setPlaybackRate:n=>(c.forEach(t=>t.playbackRate=n),m),getCurrentTime:()=>{var n,t;const e=null!=(t=null==(n=c[0])?void 0:n.currentTime)?t:null;return null!==e?+e:null},setCurrentTime:n=>{v=!1,c.forEach(t=>{t.currentTime=n})},destroy:()=>{var n;m.cancel(),c.splice(0,c.length),d||(d=!0,null==(n=null==t?void 0:t._)||n.call(t))}};return i.trigger&&("scroll"===i.m?console.warn("scroll timeline: `animator.trigger` is ignored (triggers do not apply to scroll-driven playback)"):Un(m,i.trigger)),r&&c.forEach(n=>n.play()),m}function Ln(n,t,e){var o,r,l;const i="number"==typeof(null==n?void 0:n.fraction)?n.fraction:t,u=null==(r=null==(o=globalThis.CSS)?void 0:o.percent)?void 0:r.call(o,100*i);if(void 0!==u)return e?{W:null!=(l=null==n?void 0:n.phase)?l:"cover",offset:u}:{offset:u}}function Zn(n,t){const e=document.body,o=document.documentElement;for(let r=n.parentElement;r;r=r.parentElement){if(r===e||r===o)return null;const n=getComputedStyle(r),l="y"===t?n.overflowY:n.overflowX;if("auto"===l||"scroll"===l||"hidden"===l||"overlay"===l)return r}return null}function _n(){return document.scrollingElement||document.documentElement}var Wn="parent",qn="scroller";function Kn(n,t){var e,o;const r=null==t?void 0:t.trim();if(!r)return n;if(r===Wn){let t=null;for(let e=n.parentElement;e&&e!==document.body;e=e.parentElement){const n=getComputedStyle(e).position;"sticky"!==n&&"fixed"!==n||(t=e)}return null!=(o=null!=(e=null==t?void 0:t.parentElement)?e:n.parentElement)?o:n}if(r===qn)return Zn(n,"y")||Zn(n,"x")||_n();let l=null;try{l=document.querySelector(r)}catch(t){return console.warn('scroll timeline: subject "'+r+'" is not a valid selector — measuring the SVG itself'),n}return l||(console.warn('scroll timeline: subject "'+r+'" matched no element — measuring the SVG itself'),n)}function Vn(n,t){const e=n;if(!(null==t?void 0:t.pin)||!e.style)return()=>{};const o=e.style,r=o.position,l=o.top;o.position="sticky";const i="center"===t.pinAlign?.5:"bottom"===t.pinAlign?1:0,u=()=>{var e;const r=null!=(e=t.pinTop)?e:0;if(!i)return void(o.top=r+"px");const l=function(n){const t=Zn(n,"y");return t?t.clientHeight:document.documentElement.clientHeight}(n),u=n.getBoundingClientRect().height;o.top=Math.round((l-u)*i+r)+"px"};u();let c=null;const s=i?u:null;i&&(s&&window.addEventListener("resize",s),"undefined"!=typeof ResizeObserver&&(c=new ResizeObserver(u),c.observe(n)));let f=null;const a=n.parentElement;return t.pinDistance&&t.pinDistance>0&&a&&(f=document.createElement("div"),f.setAttribute("data-px-pin",""),f.style.height=100*t.pinDistance+"vh",a.insertBefore(f,n),f.appendChild(n)),()=>{s&&window.removeEventListener("resize",s),null==c||c.disconnect(),o.position=r,o.top=l,(null==f?void 0:f.parentElement)&&(f.parentElement.insertBefore(n,f),f.remove())}}function Xn(n,t,e){let o,r=t;n.A&&(r=f(s({},t),{onFinish:()=>{var n;null==(n=null==t?void 0:t.onFinish)||n.call(t),null==o||o.cancel()}}));const l=e(r);return o=l,n.debugInstName&&(window[n.debugInstName]=l),l}function Yn(n){return function(n,t,e,o){const r=Y(n)||{};return _(r)?Xn(r,e,e=>{var l,i;let u=()=>{};if(r.mode!==K.frames&&"native"===(null==(l=r.scroll)?void 0:l.driver)&&o){u=Vn(o,r.scroll);const t=function(n,t){var e,o,r,l;if(!t||!_(t))return null;const i=t.scroll||{},u=null!=(e=i.kind)?e:"view";if(i.smoothing)return console.warn('scroll timeline: `smoothing` needs the built-in driver — ignoring `driver: "native"`'),null;const c=globalThis,s="view"===u,f=s?c.ViewTimeline:c.ScrollTimeline;if("function"!=typeof f)return null;const a=null!=(o=i.axis)?o:"block";let v;try{v=new f(s?{subject:Kn(n,i.subject),axis:a}:{source:"root"===i.source?_n():Zn(n,"y")||Zn(n,"x")||_n(),axis:a})}catch(n){return console.warn("scroll timeline: native timeline construction failed — falling back to the custom driver",n),null}return{timeline:v,rangeStart:Ln(null==(r=i.range)?void 0:r.start,0,s),rangeEnd:Ln(null==(l=i.range)?void 0:l.end,1,s)}}(o,r);if(t){const l=En(n,e,o,r.mode===K.waapi,t);if(l){const n=l.destroy.bind(l);return l.destroy=()=>{u(),n()},l}}u(),u=()=>{}}const c=(r.mode!==K.frames?En(n,e,o,r.mode===K.waapi):null)||Rn(n,t,e,o),s=(null==(i=c.getRootElement)?void 0:i.call(c))||o;if(s){u=Vn(s,r.scroll);const n=("number"==typeof(null==(f=r)?void 0:f.duration)&&f.duration>0?f.duration:T)*("number"==typeof(null==f?void 0:f.iterations)&&f.iterations>0?f.iterations:1),t=function(n,t,e){var o,r;if(!t||!_(t))return null;const l=t.scroll||{},i=null!=(o=l.kind)?o:"view",u=Kn(n,l.subject),c=Zn(n,"y")||Zn(n,"x"),s="scroll"===i&&"root"===l.source?_n():c||_n(),f=s===_n(),a=function(n,t){const e=null!=n?n:"block";if("x"===e||"y"===e)return e;const o=!!t&&t.startsWith("vertical");return"inline"===e?o?"y":"x":o?"x":"y"}(l.axis,getComputedStyle(s).writingMode),v=()=>{if("scroll"===i)return function(n,t,e){var o,r;const l=t>0?P(n/t,0,1):1,i="number"==typeof(null==(o=null==e?void 0:e.start)?void 0:o.fraction)?e.start.fraction:0,u="number"==typeof(null==(r=null==e?void 0:e.end)?void 0:r.fraction)?e.end.fraction:1;return u<=i?l>=u?1:0:P((l-i)/(u-i),0,1)}("y"===a?s.scrollTop:s.scrollLeft,"y"===a?s.scrollHeight-s.clientHeight:s.scrollWidth-s.clientWidth,l.range);const n=u.getBoundingClientRect();let t,e;if(f)t=0,e="y"===a?document.documentElement.clientHeight:document.documentElement.clientWidth;else{const n=s.getBoundingClientRect();t="y"===a?n.top:n.left,e="y"===a?s.clientHeight:s.clientWidth}return function(n,t,e,o){const r=e-n,l=q(null==o?void 0:o.start,0,t,e),i=q(null==o?void 0:o.end,1,t,e);return i<=l?r>=i?1:0:P((r-l)/(i-l),0,1)}(("y"===a?n.top:n.left)-t,"y"===a?n.height:n.width,e,l.range)},d=Math.max(0,null!=(r=l.smoothing)?r:0)/1e3;let m=!1,y=null,b=null,p=0,h=null;const g=()=>{h=null,m||(n=>{if(!d)return void e(n);if(null===y)return y=n,void e(n);if(null!==b)return;p=0;const t=n=>{if(b=null,m)return;const o=p?Math.min(.1,(n-p)/1e3):1/60;p=n;const r=v(),l=1-Math.exp(-o/d);y+=(r-y)*l,Math.abs(r-y)<.001&&(y=r),e(y),y!==r&&(b=requestAnimationFrame(t))};b=requestAnimationFrame(t)})(v())},w=()=>{m||null!==h||(h=requestAnimationFrame(g))},A=f?window:s;let M;A.addEventListener("scroll",w,{passive:!0}),window.addEventListener("resize",w,{passive:!0}),"undefined"!=typeof ResizeObserver&&(M=new ResizeObserver(w),M.observe(u),u!==n&&M.observe(n),f||M.observe(s));const k={destroy:()=>{m||(m=!0,A.removeEventListener("scroll",w),window.removeEventListener("resize",w),null==M||M.disconnect(),null!==h&&(cancelAnimationFrame(h),h=null),null!==b&&(cancelAnimationFrame(b),b=null))},refresh:()=>{m||(y=v(),e(y))}};return k.refresh(),k}(s,r,t=>c.setCurrentTime(t*n));if(t){const n=c.destroy.bind(c);c.destroy=()=>{t.destroy(),u(),n()}}}else console.warn("scroll timeline: no root element to observe — animation will stay at frame 0");var f;return c}):Xn(r,e,e=>r.mode===K.frames?Rn(n,t,e,o):En(n,e,o,r.mode===K.waapi)||Rn(n,t,e,o))}(function(n){if(!(null==n?void 0:n.data))throw new Error("createAnimator: `data` is required");return n.data}(n),n.q,n.K,null)}var Bn,Gn="data";return Bn=v,((t,o,l,u)=>{if(o&&"object"==typeof o||"function"==typeof o)for(let l of r(o))i.call(t,l)||void 0===l||n(t,l,{get:()=>o[l],enumerable:!(u=e(o,l))||u.enumerable});return t})(n({},"__esModule",{value:!0}),Bn)})();
|