@pixodesk/svg-animator-web 1.0.30 → 1.0.35
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 +35 -15
- package/dist/index.cjs +936 -514
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +29 -4
- package/dist/index.d.ts +29 -4
- package/dist/index.js +926 -512
- 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 +1109 -95
- 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 +1135 -116
- 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} +726 -330
- package/dist/pixodesk-svg-animator.umd.js.map +1 -0
- package/dist/pixodesk-svg-animator.umd.min.js +1 -0
- package/mangle-reserved.json +232 -0
- package/package.json +10 -7
- 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,o=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyDescriptors,e=Object.getOwnPropertyNames,l=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,u=Object.prototype.propertyIsEnumerable,c=(t,o,r)=>o in t?n(t,o,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[o]=r,s=(n,t)=>{for(var o in t||(t={}))i.call(t,o)&&c(n,o,t[o]);if(l)for(var o of l(t))u.call(t,o)&&c(n,o,t[o]);return n},f=(n,o)=>t(n,r(o)),a={};function v(n,t,o){return n+(t-n)*o}function d(n,t,o){const r=[],e=Math.max(n.length,t.length);for(let l=0;l<e;l++)r[l]=v(n[l]||0,t[l]||0,o);return r}function p(n,t,o){const r=Math.max(n.length,t.length),e=[];for(let l=0;l<r;l++)e.push(h(n[l],t[l],o));return e}function h(n,t,o){var r,e,l,i,u,c,s,f,a;if(!n||!t)return n||t||{v:[]};const v=Math.min(Math.max(o,0),1),p=Math.min(n.v.length,t.v.length),h=[],m=[],b=[];for(let o=0;o<p;o++){const a=n.v[o],p=t.v[o];h.push(d(a,p,v));const y=null!=(e=null==(r=n.i)?void 0:r[o])?e:a,g=null!=(i=null==(l=t.i)?void 0:l[o])?i:p;m.push(d(y,g,v));const A=null!=(c=null==(u=n.o)?void 0:u[o])?c:a,M=null!=(f=null==(s=t.o)?void 0:s[o])?f:p;b.push(d(A,M,v))}return{v:h,i:m.length?m:void 0,o:b.length?b:void 0,c:null!=(a=n.c)?a:t.c}}function m(n,t,o){if(o<=0)return 0;if(o>=1)return 1;const r=3*n,e=3*(t-n)-r,l=1-r-e;function i(n){return((l*n+e)*n+r)*n}function u(n){return(3*l*n+2*e)*n+r}let c=o,s=0,f=1;for(let n=0;n<8;n++){const n=i(c)-o;if(Math.abs(n)<1e-6)return c;const t=u(c);if(Math.abs(t)<1e-6)break;c-=n/t}for(c=o;s<f;){const n=i(c);if(Math.abs(n-o)<1e-6)return c;o>n?s=c:f=c,c=(f+s)/2}return c}function b(n){const[t,o,r,e]=n,l=3*o,i=3*(e-o)-l,u=1-l-i;return function(n){return o=m(t,r,n),((u*o+i)*o+l)*o;var o}}function y(n,t,o){return[n[0]+(t[0]-n[0])*o,n[1]+(t[1]-n[1])*o]}function g(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[o,r,e,l]=n,i=m(o,e,t),u=[o,r],c=[e,l],{left:s,right:f}=function(n,t,o,r,e){const l=y(n,t,e),i=y(t,o,e),u=y(o,r,e),c=y(l,i,e),s=y(i,u,e),f=y(c,s,e);return{left:[n,l,c,f],right:[f,s,u,r]}}([0,0],u,c,[1,1],i),a=s[3][0],v=s[3][1];let d,p;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 h=1-a,b=1-v;return h>1e-9&&Math.abs(b)>1e-9&&(p=[(f[1][0]-a)/h,(f[1][1]-v)/b,(f[2][0]-a)/h,(f[2][1]-v)/b]),{left:d,right:p}}function A(n){if(n)return[1-n[2],1-n[3],1-n[0],1-n[1]]}function M(n){if(n){if(Array.isArray(n))return n;if("string"==typeof n)return n.startsWith("#")?function(n){const t=n.slice(1),o=t.length<=4,r=o?t[0]+t[0]:t.slice(0,2),e=o?t[1]+t[1]:t.slice(2,4),l=o?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(r,16)/255,parseInt(e,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 o=null==(t=n.match(/rgba?\((.*)\)/))?void 0:t[1];if(!o)throw new Error("Invalid rgb/rgba format");const r=o.split(",").map(n=>+n.trim());return[r[0]/255,r[1]/255,r[2]/255,...void 0!==r[3]?[r[3]]:[]]}(n):void console.warn("Unsupported color format: "+n)}}((t,o)=>{for(var r in o)n(t,r,{get:o[r],enumerable:!0})})(a,{PX_ANIMATOR_DATA_KEY:()=>wn,createAnimator:()=>An,setupAnimationTriggers:()=>hn});var w=new Set(["color","fill","flood-color","lighting-color","stop-color","stroke"]),k=new Set(["translate","rotate","scale","skew"]),j=new Set(["offset-distance","offsetDistance"]);function O(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 C(n){return U.has(n)?n:n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}function T(n,t,o){return Math.max(t,Math.min(n,o))}function I(n,t,o,r,e){if(e<=0)return[n[0],n[1]];if(e>=1)return[r[0],r[1]];const l=1-e,i=l*l,u=e*e,c=i*l,s=3*e*i,f=3*u*l,a=u*e;return[c*n[0]+s*t[0]+f*o[0]+a*r[0],c*n[1]+s*t[1]+f*o[1]+a*r[1]]}var S=1e-4;function P(n,t,o,r,e){const l=z(n,t,o,r,e);return 0===l[0]&&0===l[1]?z(n,t,o,r,e<.5?e+S:e-S):l}function z(n,t,o,r,e){const l=1-e,i=3*l*l,u=6*e*l,c=3*e*e;return[i*(t[0]-n[0])+u*(o[0]-t[0])+c*(r[0]-o[0]),i*(t[1]-n[1])+u*(o[1]-t[1])+c*(r[1]-o[1])]}function L(n,t){const{ts:o,ds:r}=n,e=o.length-1;if(t<=o[0])return r[0];if(t>=o[e])return r[e];let l=1,i=e;for(;l<i;){const n=l+i>>>1;o[n]<t?l=n+1:i=n}const u=o[i-1],c=o[i]-u,s=c>0?(t-u)/c:0;return r[i-1]+s*(r[i]-r[i-1])}var x={waapi:"waapi",frames:"frames"},N={before:"before",after:"after"};function _(n){var t;return(null==n?void 0:n.animator)||(null==(t=null==n?void 0:n.meta)?void 0:t.animator)}function E(n){var t;const o=null!=(t=n.value)?t:n.v;if(!o)return;if(Array.isArray(o)&&o.length>=2&&"number"==typeof o[0]&&"number"==typeof o[1])return[o[0],o[1]];const r=o.translate;return Array.isArray(r)&&r.length>=2?[r[0],r[1]]:void 0}function F(n){var t,o;return null!=(o=null!=(t=n.time)?t:n.t)?o:0}function W(n){var t;return null!=(t=n.easing)?t:n.e}var Z=new WeakMap;function R(n,t,o,r){var e,l;let i=Z.get(n);const u=null==i?void 0:i.get(t);if(u)return u;const c=null!=(e=n.tangentOut)?e:n.to,s=null!=(l=t.tangentIn)?l:t.ti,f=[o[0]+(c?c[0]:0),o[1]+(c?c[1]:0)],a=[r[0]+(s?s[0]:0),r[1]+(s?s[1]:0)],v=function(n,t,o,r,e=100){const l=e+1,i=new Float64Array(l),u=new Float64Array(l);let c=I(n,t,o,r,0);i[0]=0,u[0]=0;let s=0;for(let f=1;f<l;f++){const l=f/e,a=I(n,t,o,r,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}}(o,f,a,r),d={P0:o,P1:f,P2:a,P3:r,l:v,h:v.ds[v.ds.length-1]};return i||(i=new WeakMap,Z.set(n,i)),i.set(t,d),d}var D=.5,V=5,X=32;function q(n,t){var o,r,e,l;if(!function(n){var t,o,r;const e=null!=(t=n.keyframes)?t:n.kfs;if(!Array.isArray(e))return!1;if(n.autoOrient)return!0;for(const n of e)if((null!=(o=n.tangentIn)?o:n.ti)||(null!=(r=n.tangentOut)?r:n.to))return!0;return!1}(n))return n;const i=null!=(o=n.keyframes)?o:n.kfs;if(!Array.isArray(i)||i.length<2)return n;const u=!!n.autoOrient,c=null!=(r=null==t?void 0:t.m)?r:D,s=null!=(e=null==t?void 0:t.A)?e:V,f=null!=(l=null==t?void 0:t.M)?l:X,a=[],v=E(i[0]);if(!v)return n;const d=u?function(n,t){const o=E(n),r=E(t);if(!o||!r)return 0;const e=R(n,t,o,r),l=P(e.P0,e.P1,e.P2,e.P3,0);return 180*Math.atan2(l[1],l[0])/Math.PI}(i[0],i[1]):void 0;a.push(Y(F(i[0]),$(H(i[0]),H(i[0]),0,v,d,u)));for(let n=0;n<i.length-1;n++){const t=i[n],o=i[n+1],r=E(t),e=E(o);r&&e?(u&&n>0&&Q(a,t,o,r,e,s),J(a,t,o,r,e,u,c,s,f)):a.push(Y(F(o),$(H(o),H(o),1,null!=e?e:[0,0],void 0,u)))}const p=W(i[i.length-1]);p&&(a[a.length-1].e=p),u&&function(n){var t;let o;for(const r of n){const n=null!=(t=r.v)?t:r.value;if(!n||"number"!=typeof n.rotate)continue;if(void 0===o){o=n.rotate;continue}let e=n.rotate;for(;e-o>180;)e-=360;for(;e-o<-180;)e+=360;n.rotate=e,o=e}}(a);const h={kfs:a};return void 0!==n.loop&&(h.loop=n.loop),h}function Y(n,t){return{t:n,v:t}}function H(n){var t;const o=null!=(t=n.value)?t:n.v;if(o&&"object"==typeof o&&!Array.isArray(o))return o}function K(n,t,o){if(void 0===n)return t;if(void 0===t)return n;if("number"==typeof n&&"number"==typeof t)return n+(t-n)*o;if(Array.isArray(n)&&Array.isArray(t)&&n.length===t.length){const r=new Array(n.length);for(let e=0;e<n.length;e++){const l="number"==typeof n[e]?n[e]:0,i="number"==typeof t[e]?t[e]:0;r[e]=l+(i-l)*o}return r}return o<.5?n:t}function $(n,t,o,r,e,l){const i={translate:r},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 r of u){if("translate"===r)continue;if("rotate"===r&&l)continue;const e=null==n?void 0:n[r],u=null==t?void 0:t[r];void 0===e&&void 0===u||(i[r]=K(e,u,o))}return void 0!==e&&(i.rotate=e+B(n,t,o)),i}function B(n,t,o){const r="number"==typeof(null==n?void 0:n.rotate)?n.rotate:void 0,e="number"==typeof(null==t?void 0:t.rotate)?t.rotate:void 0;if(void 0===r&&void 0===e)return 0;const l=K(r,e,o);return"number"==typeof l?l:0}function Q(n,t,o,r,e,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=H(t),a=s-B(f,f,0),v=R(t,o,r,e),d=P(v.P0,v.P1,v.P2,v.P3,0),p=180*Math.atan2(d[1],d[0])/Math.PI,h=function(n,t){let o=n-t;for(;o>180;)o-=360;for(;o<-180;)o+=360;return o}(p,a);if(Math.abs(h)<=l)return;const m=F(t),b=Math.min(m+G,(m+F(o))/2),y=$(H(t),H(t),0,r,p,!0);n.push(Y(b,y))}var G=.05;function J(n,t,o,r,e,l,i,u,c){const s=R(t,o,r,e),f=F(t),a=F(o),v=W(t),d=(p=v)?b([p[1],p[0],p[3],p[2]]):n=>n;var p;const h=H(t),m=H(o),y=function(n,t,o,r,e){const l=[];nn(n.P0[0],n.P1[0],n.P2[0],n.P3[0],l),nn(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={k:e-i.length};for(let e=0;e<i.length-1;e++)tn(i[e],i[e+1],u,n,t,o,r,c);return u}(s,l,i,u,c),A=[];for(const n of y){const t=L(s.l,n),o=T(s.h>0?t/s.h:n,0,1),r={u:T(d(o),0,1),p:o,j:I(s.P0,s.P1,s.P2,s.P3,n)};if(l){const t=P(s.P0,s.P1,s.P2,s.P3,n);r.O=180*Math.atan2(t[1],t[0])/Math.PI}A.push(r)}let M=v,w=0;const k=n.length-1;for(let t=0;t<A.length;t++){const o=A[t],r=w<1?T((o.u-w)/(1-w),0,1):1,{left:e,right:i}=g(M,r),u=0===t?k:n.length-1;e?n[u].e=e:delete n[u].e;const c=f+o.u*(a-f),s=$(h,m,o.p,o.j,o.O,l);n.push(Y(c,s)),M=i,w=o.u}}function nn(n,t,o,r,e){const l=t-n,i=o-t,u=l-2*i+(r-o),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&&e.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&&e.push(v),d>1e-6&&d<.999999&&e.push(d)}function tn(n,t,o,r,e,l,i,u){const c=(n+t)/2,s=I(r.P0,r.P1,r.P2,r.P3,n),f=I(r.P0,r.P1,r.P2,r.P3,t),a=t-n,v=I(r.P0,r.P1,r.P2,r.P3,n+.25*a),d=I(r.P0,r.P1,r.P2,r.P3,c),p=I(r.P0,r.P1,r.P2,r.P3,n+.75*a),h=Math.max(on(v,s,f),on(d,s,f),on(p,s,f));let m=!0;if(e){const o=P(r.P0,r.P1,r.P2,r.P3,n),e=P(r.P0,r.P1,r.P2,r.P3,t),l=180*Math.atan2(o[1],o[0])/Math.PI,u=180*Math.atan2(e[1],e[0])/Math.PI;let c=Math.abs(l-u);c>180&&(c=360-c),c>i&&(m=!1)}h<=l&&m||u.k<=0||a<1e-6?o.push(t):(u.k-=1,tn(n,c,o,r,e,l,i,u),tn(c,t,o,r,e,l,i,u))}function on(n,t,o){const r=o[0]-t[0],e=o[1]-t[1],l=r*r+e*e;if(l<1e-20){const o=n[0]-t[0],r=n[1]-t[1];return Math.sqrt(o*o+r*r)}const i=(n[0]-t[0])*e-(n[1]-t[1])*r;return Math.abs(i)/Math.sqrt(l)}var rn=1;function en(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 o=Object.keys(n),r=Object.keys(t);return o.length===r.length&&o.every(o=>en(n[o],t[o]))}function ln(n){const t=[];let o;const r=function(n){const t=n.split(/([MLCZmlcz]|[\s,]+)/).map(n=>n.trim()).filter(n=>n&&","!==n),o=[];let r=null;for(const n of t)if(/[MLCZmlcz]/.test(n))r={type:n,values:[]},o.push(r);else if(r){const t=+n;r.values.push(Number.isNaN(t)?0:t)}return o}(n);for(const n of r){const r=n.type,e=n.values;if("M"===r||"m"===r){const n=e[0]||0,r=e[1]||0;o={v:[[n,r]],i:[[n,r]],o:[[n,r]],c:!1},t.push(o);continue}if(o||(o={v:[[0,0]],i:[[0,0]],o:[[0,0]],c:!1},t.push(o)),"L"===r){const n=e[0]||0,t=e[1]||0;o.v.push([n,t]),o.i.push([n,t]),o.o.push([n,t])}else if("C"===r){const n=e[0]||0,t=e[1]||0,r=e[2]||0,l=e[3]||0,i=e[4]||0,u=e[5]||0;o.o[o.o.length-1]=[n,t],o.v.push([i,u]),o.i.push([r,l]),o.o.push([i,u])}else"Z"===r||"z"===r?o.c=!0:console.warn('Unsupported path command "'+r+'"')}return t}function un(n){return n.startsWith("path(")&&n.endsWith(")")?n.slice(5,-1):/^[MmZzLlHhVvCcSsQqTtAa]/.test(n)?n:void 0}function cn(n){return"string"==typeof n&&void 0!==un(n)}function sn(n){if(n&&"object"==typeof n&&"string"==typeof n.path){const t=un(n.path);return t?{paths:ln(t)}:n}if(n&&"object"==typeof n&&"paths"in n){const t=n.paths;if(Array.isArray(t)&&t.length>0&&cn(t[0])){const n=[];for(const o of t){const t=un(o);t&&n.push(...ln(t))}return{paths:n}}return n}if(Array.isArray(n)){if(n.length>0&&cn(n[0])){const t=[];for(const o of n){const n=un(o);n&&t.push(...ln(n))}return{paths:t}}return{paths:n}}return cn(n)?{paths:ln(un(n))}:n}function fn(n,t){var o;if(n)return Array.isArray(n)?n:(null==(o=null==t?void 0:t.easings)?void 0:o[n])?t.easings[n]:void console.warn("Unknown easing name: "+n)}function an(n,t){var o;if("string"==typeof n){const r=null==(o=null==t?void 0:t.animations)?void 0:o[n];return r||console.warn("Unknown animation name: "+n),r}return n}function vn(n,t,o,r){var e,l;return"d"===n?{paths:p(null!=(e=null==t?void 0:t.paths)?e:Array.isArray(t)?t:[],null!=(l=null==o?void 0:o.paths)?l:Array.isArray(o)?o:[],r)}:w.has(n)?function(n,t,o){return[v(n[0]||0,t[0]||0,o),v(n[1]||0,t[1]||0,o),v(n[2]||0,t[2]||0,o),v(void 0===n[3]?1:n[3],void 0===t[3]?1:t[3],o)]}(t||[0,0,0,1],o||[0,0,0,1],r):"transform"!==n||"object"!=typeof t||null===t||Array.isArray(t)||"object"!=typeof o||null===o||Array.isArray(o)?"rotate"===n&&"number"==typeof t&&"number"==typeof o?v(t,o,r):k.has(n)||"stroke-dasharray"===n||"strokeDasharray"===n?d(t||[],o||[],r):v(+(t||0),+(o||0),r):function(n,t,o){const r=new Set([...Object.keys(null!=n?n:{}),...Object.keys(null!=t?t:{})]),e={};for(const l of r){const r=null==n?void 0:n[l],i=null==t?void 0:t[l];if("rotate"===l||"skew"===l)e[l]=v(+(null!=r?r:0),+(null!=i?i:0),o);else if("translate"===l||"scale"===l||"origin"===l){const n="scale"===l?[1,1]:[0,0];e[l]=d(r||n,i||n,o)}else e[l]=null!=i?i:r}return e}(t,o,r)}function dn(n,t,o,r){var e,l,i,u,c,a,v;const d=t.keyframes||t.kfs||[],p=[];for(const t of d){const o=null!=(l=null!=(e=t.time)?e: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=sn(s));const d=O(n)?C(n):n;w.has(d)&&(s=null!=(c=M(s))?c:s);const h={t:o,v:s,e:fn(f,r)},m=null!=(a=t.tangentIn)?a:t.ti,b=null!=(v=t.tangentOut)?v:t.to;m&&(h.tangentIn=m),b&&(h.tangentOut=b),p.push(h)}p.sort((n,t)=>{var o,r;return(null!=(o=n.t)?o:0)-(null!=(r=t.t)?r:0)});const h=t.loop,m=!0===h?{}:h||void 0;return m&&p.length>=2?function(n,t,o,r){var e,l,i,u,c;const a=t.length-1,v=T(null!=(e=o.segmentCount)?e:a,1,a);let d;d=o.extend===N.before?t.slice(0,v+1):t.slice(a-v);const p=null!=(l=t[0].t)?l:0,h=null!=(i=t[t.length-1].t)?i:0;let m,y;o.extend===N.before?(m=0,y=p):(m=h,y=r);const M=y-m;if(M<=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,o;return{U:(n.t-w)/k,v:n.v,e:n.e,tangentIn:null!=(t=n.tangentIn)?t:n.ti,tangentOut:null!=(o=n.tangentOut)?o:n.to}}),O=Math.floor(M/k),U=M-O*k,C=U/k,I=[],S=o.extend!==N.before,P=t[t.length-1];let z,L=!1;function x(t,o,r){var e;let l;if(o){l=[];for(let n=j.length-1;n>=0;n--)l.push({U:1-j[n].U,v:j[n].v,e:n>0?A(j[n-1].e):void 0,tangentIn:j[n].tangentOut,tangentOut:j[n].tangentIn})}else l=j;const i=void 0!==r?r:1;for(let o=0;o<l.length;o++){const r=l[o];if(r.U>i+1e-9){const e=l[o-1],u=r.U-e.U,c=(i-e.U)/u,s=e.e?b(e.e)(c):c,f=vn(n,e.v,r.v,s),{left:a}=g(e.e,c);return I.length>0&&e.U<=i&&(I[I.length-1].e=a),void I.push({t:t+i*k,v:f,e:void 0})}const u=I.length>0?I[I.length-1]:P,c=S&&0===o&&void 0!==u&&Math.abs((null!=(e=u.t)?e:0)-(t+r.U*k))<1e-9;if(c){if(en(u.v,r.v)){I.length>0?(u.e=r.e,u.tangentOut=r.tangentOut):(z=r.e,L=!0);continue}I.length>0&&(delete u.tangentIn,delete u.tangentOut)}const s={t:t+r.U*k+(c?rn:0),v:r.v,e:o<l.length-1?r.e:void 0};r.tangentIn&&(s.tangentIn=r.tangentIn),r.tangentOut&&(s.tangentOut=r.tangentOut),I.push(s)}}if(o.extend===N.before){C>1e-9&&function(t,o,r){let e;if(o){e=[];for(let n=j.length-1;n>=0;n--)e.push({U:1-j[n].U,v:j[n].v,e:n>0?A(j[n-1].e):void 0,tangentIn:j[n].tangentOut,tangentOut:j[n].tangentIn})}else e=j;const l=1-r;for(let o=0;o<e.length;o++){const r=e[o];if(r.U<l-1e-9)continue;const i=e[o-1];if(i&&i.U<l-1e-9&&r.U>l+1e-9){const o=r.U-i.U,e=(l-i.U)/o,u=i.e?b(i.e)(e):e,c=vn(n,i.v,r.v,u),{right:s}=g(i.e,e);I.push({t:t,v:c,e:s})}const u={t:t+(r.U-l)*k,v:r.v,e:o<e.length-1?r.e:void 0};r.tangentIn&&(u.tangentIn=r.tangentIn),r.tangentOut&&(u.tangentOut=r.tangentOut),I.push(u)}}(m,!!o.alternate&&O%2==0,C);for(let n=0;n<O;n++){const t=O-1-n,r=!!o.alternate&&t%2==0;x(m+U+n*k,r)}}else{for(let n=0;n<O;n++){const t=!!o.alternate&&n%2==0;x(m+n*k,t)}if(C>1e-9){const n=!!o.alternate&&O%2==0;x(m+O*k,n,C)}}return o.extend===N.before?[...I,...t]:L&&t.length>0?[...t.slice(0,-1),f(s({},t[t.length-1]),{e:z}),...I]:[...t,...I]}(n,p,m,o):p}var pn=0;function hn(n,t){const{startOn:o,outAction:r="continue",scrollIntoViewThreshold:e=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(r){case"pause":n.pause();break;case"reset":n.cancel();break;case"reverse":i=!0,n.setPlaybackRate(-1),n.play()}};switch(o){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()},o=()=>{n&&c()};l.addEventListener("mouseenter",t),l.addEventListener("mouseleave",o);break}case"click":{const t=()=>{n.isPlaying()?c():u()};l.addEventListener("click",t);break}case"scrollIntoView":{const n=n=>{var t,o;const r=n.boundingClientRect,e=n.intersectionRect;if(!(null==r?void 0:r.height)||!e)return n.intersectionRatio;const l="undefined"!=typeof window&&window.innerHeight?window.innerHeight:1/0,i=null!=(o=null==(t=n.rootBounds)?void 0:t.height)?o:1/0,u=Math.min(l,i),c=Math.min(r.height,Number.isFinite(u)?u:r.height);return c>0?e.height/c:n.intersectionRatio},t=Array.from({length:21},(n,t)=>t/20);let o=!1;new IntersectionObserver(t=>{t.forEach(t=>{t.isIntersecting&&n(t)>=e?(o=!0,u()):o&&(o=!1,c())})},{threshold:t}).observe(l);break}}return n}function mn(n){return"#"+n}function bn(n,t,o,r){var e,l;let i=null!=(e=n.v)?e: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=o;var a;return w.has(o)&&Array.isArray(i)?s=function(n){const t=Math.round(255*n[0]),o=Math.round(255*n[1]),r=Math.round(255*n[2]);return 4===n.length?"rgba("+t+","+o+","+r+","+n[3]+")":"rgb("+t+","+o+","+r+")"}(i):"transform"!==o||null===i||"object"!=typeof i||Array.isArray(i)?k.has(o)?(Array.isArray(i)&&("translate"===o&&(i=i.map(n=>n+"px")),i=i.join(",")),"rotate"===o&&(i+="deg"),s=o+"("+i+")",f="transform"):s="d"===o?'path("'+(i&&"object"==typeof i&&Array.isArray(i.paths)?i.paths:[]).map(n=>function(n,t=!1){var o,r,e,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 e=i[n-1],l=null!=(o=null==c?void 0:c[n-1])?o:e,s=null!=(r=null==u?void 0:u[n])?r:i[n],a=i[n];t||l[0]!==e[0]||l[1]!==e[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],o=null!=(e=null==c?void 0:c[a-1])?e:n,r=null!=(l=null==u?void 0:u[0])?l:i[0],s=i[0];!t&&o[0]===n[0]&&o[1]===n[1]&&r[0]===s[0]&&r[1]===s[1]||f.push("C"+o[0]+","+o[1]+","+r[0]+","+r[1]+","+s[0]+","+s[1]),f.push("z")}return f.join("")}(n,!0)).join("")+'")':j.has(o)&&"number"==typeof i?100*i+"%":""+i:(s=function(n,t){var o;if(!n)return"";const r=null==(o=null==t?void 0:t.C)||o,e=[],l=n.translate,i=n.origin,u=n.rotate,c=n.skew,s=n.scale,f=r?"px":"",a=r?"deg":"";return l&&e.push("translate("+l[0]+f+","+l[1]+f+")"),i&&e.push("translate("+i[0]+f+","+i[1]+f+")"),null!=u&&e.push("rotate("+u+a+")"),null!=c&&e.push("skewX("+c+a+")"),s&&e.push("scale("+s[0]+","+s[1]+")"),i&&e.push("translate("+-i[0]+f+","+-i[1]+f+")"),e.join("")}(i,{C:!0}),f="transform"),CSS.supports(C(f),s)||r.add(f),f=(a=f).includes("-")?a.replace(/-([a-z])/g,(n,t)=>t.toUpperCase()):a,c[f]=s,c}function yn(n,t,o){var r,e,l,i,u;const c=[];for(let a=0;a<t.length;a++){const v=t[a],d=null!=(r=v.t)?r:0;if(d<0){const o=t[a+1];if(o&&(null!=(e=o.t)?e:0)>=0){const t=(0-d)/((null!=(l=o.t)?l:0)-d),r=v.e?b(v.e)(t):t,{right:e}=g(v.e,t);c.push({t:0,v:vn(n,v.v,o.v,r),e:e})}continue}if(d>o){const r=t[a-1];if(r&&(null!=(i=r.t)?i:0)<=o){const t=null!=(u=r.t)?u:0,e=(o-t)/(d-t),l=r.e?b(r.e)(e):e,{left:i}=g(r.e,e);c.length>0&&(c[c.length-1]=f(s({},c[c.length-1]),{e:i})),c.push({t:o,v:vn(n,r.v,v.v,l),e:void 0})}break}c.push(v)}return c}function gn(n,t,o){var r;const e=new Map;for(const[l,i]of Object.entries(n)){const n=o.duration||1,u=yn(l,i.kfs||i.keyframes||[],n),c=[];for(let o=0;o<u.length;o++){const e=u[o],i=bn(e,T((null!=(r=e.t)?r:0)/n,0,1),l,t);0===o&&(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&&e.set(l,c)}return e}function An(n){const t=function(n){if(!(null==n?void 0:n.data))throw new Error("createAnimator: `data` is required");return n.data}(n);return function(n,o){let r,e=o;n.resetOnFinish&&(e=f(s({},o),{T:()=>{var n;null==(n=null==o?void 0:o.T)||n.call(o),null==r||r.cancel()}}));const l=function(n,t,o,r,e){var l;const i=_(n)||{};if(!o)if(n.id){const t=mn(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 u=function(n,t=x.waapi){const o=_(n)||{},r=function(n){var t;if(n)return null==(t=_(n))?void 0:t.definitions}(n),e=o.duration||1e3,l=[],i=(n,o)=>{if(!o)return null;const l=function(n,t){if(!n)return[];const o=[];if("string"==typeof n){const r=an(n,t);r&&o.push(r)}else if(Array.isArray(n))for(const r of n){const n=an(r,t);n&&o.push(n)}else o.push(n);return o}(o,r);if(0===l.length)return null;const i=function(n,t,o,r=x.waapi){const e={};for(const[l,i]of Object.entries(n)){if("transform"===l&&"offsetPath"===i.I&&void 0!==n.offsetDistance)continue;const u=dn(l,i,t,o);if(u.length>0){const n={kfs:u};void 0!==i.autoOrient&&(n.autoOrient=i.autoOrient),void 0!==i.loop&&(n.loop=i.loop),e[l]=r===x.waapi&&"transform"===l?q(n):n}}return e}(function(n){const t={};for(const o of n)for(const[n,r]of Object.entries(o))t[n]=r;return t}(l),e,r,t);return 0===Object.keys(i).length?null:{id:n,animate:i}},u=function(n){var t;if(!n)return;const o=null==(t=_(n))?void 0:t.animateById;return o?Object.entries(o).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 o=n.id||"_px_el_"+ ++pn;n.id=o;const r=i(o,t);r&&l.push(r)}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}(n,x.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 r=n.animate;if(!r||"object"!=typeof r||Array.isArray(r)){console.warn("createWebApiAnimator: Empty or unresolved binding",n);continue}const u=mn(n.id),s=(null==o?void 0:o.querySelectorAll(u))||document.querySelectorAll(u);0===s.length&&console.warn('createWebApiAnimator: No elements found for selector "'+u+'"');const p=gn(r,a,i),h=i.delay&&i.delay>0?i.delay:void 0;let m;if(i.delay&&i.delay<0&&i.duration){const n=-i.delay;m=f===1/0?n%i.duration:Math.min(n,i.duration*(null!=f?f:1))}const b={duration:i.duration,delay:h,fill:null!=(l=i.fill)?l:"forwards",direction:i.direction,iterations:f};for(let n=0;n<s.length;n++){const o=s[n];for(const[,n]of p)if(n.length>0)try{const r=new KeyframeEffect(o,n,b),l=new Animation(r,document.timeline);e,(null==t?void 0:t.T)&&(l.onfinish=()=>{var n;v||(v=!0,null==(n=t.T)||n.call(t))}),(null==t?void 0:t.S)&&(l.onremove=()=>{var n;d||(d=!0,null==(n=t.S)||n.call(t))}),void 0!==m&&(l.currentTime=m),c.push(l)}catch(n){console.warn(n)}}}const p={isReady:()=>!0,getRootElement:()=>o||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.L)||n.call(t)},cancel:()=>{var n;v=!1,c.forEach(n=>n.cancel()),null==(n=null==t?void 0:t.N)||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),p),getCurrentTime:()=>{var n,t;const o=null!=(t=null==(n=c[0])?void 0:n.currentTime)?t:null;return null!==o?+o:null},setCurrentTime:n=>{v=!1,c.forEach(t=>{t.currentTime=n})},destroy:()=>{var n;p.cancel(),c.splice(0,c.length),d||(d=!0,null==(n=null==t?void 0:t.S)||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)"):hn(p,i.trigger)),p}(t,e,null);return r=l,n.debugInstName&&(window[n.debugInstName]=l),l}(_(t)||{},n._)}var Mn,wn="data";return Mn=a,((t,r,l,u)=>{if(r&&"object"==typeof r||"function"==typeof r)for(let l of e(r))i.call(t,l)||void 0===l||n(t,l,{get:()=>r[l],enumerable:!(u=o(r,l))||u.enumerable});return t})(n({},"__esModule",{value:!0}),Mn)})();
|
|
1
|
+
"use strict";var PixodeskAnimator=(()=>{var t=Object.defineProperty,n=Object.defineProperties,e=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyDescriptors,o=Object.getOwnPropertyNames,i=Object.getOwnPropertySymbols,s=Object.prototype.hasOwnProperty,l=Object.prototype.propertyIsEnumerable,c=(n,e,r)=>e in n?t(n,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):n[e]=r,u=(t,n)=>{for(var e in n||(n={}))s.call(n,e)&&c(t,e,n[e]);if(i)for(var e of i(n))l.call(n,e)&&c(t,e,n[e]);return t},a=(t,e)=>n(t,r(e)),f=(t,n)=>{var e={};for(var r in t)s.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(null!=t&&i)for(var r of i(t))n.indexOf(r)<0&&l.call(t,r)&&(e[r]=t[r]);return e},d={};function v(t,n,e){return t+(n-t)*e}function h(t,n,e){const r=[],o=Math.max(t.length,n.length);for(let i=0;i<o;i++)r[i]=v(t[i]||0,n[i]||0,e);return r}function p(t,n,e){const r=Math.max(t.length,n.length),o=[];for(let i=0;i<r;i++)o.push(y(t[i],n[i],e));return o}function y(t,n,e){var r,o,i,s,l,c,u,a,f;if(!t||!n)return t||n||{v:[]};const d=Math.min(Math.max(e,0),1),v=Math.min(t.v.length,n.v.length),p=[],y=[],m=[];for(let e=0;e<v;e++){const f=t.v[e],v=n.v[e];p.push(h(f,v,d));const b=null!=(o=null==(r=t.i)?void 0:r[e])?o:f,g=null!=(s=null==(i=n.i)?void 0:i[e])?s:v;y.push(h(b,g,d));const A=null!=(c=null==(l=t.o)?void 0:l[e])?c:f,w=null!=(a=null==(u=n.o)?void 0:u[e])?a:v;m.push(h(A,w,d))}return{v:p,i:y.length?y:void 0,o:m.length?m:void 0,c:null!=(f=t.c)?f:n.c}}function m(t,n,e){if(e<=0)return 0;if(e>=1)return 1;const r=3*t,o=3*(n-t)-r,i=1-r-o;function s(t){return((i*t+o)*t+r)*t}function l(t){return(3*i*t+2*o)*t+r}let c=e,u=0,a=1;for(let t=0;t<8;t++){const t=s(c)-e;if(Math.abs(t)<1e-6)return c;const n=l(c);if(Math.abs(n)<1e-6)break;c-=t/n}for(c=e;u<a;){const t=s(c);if(Math.abs(t-e)<1e-6)return c;e>t?u=c:a=c,c=(a+u)/2}return c}function b(t){const[n,e,r,o]=t,i=3*e,s=3*(o-e)-i,l=1-i-s;return function(t){return e=m(n,r,t),((l*e+s)*e+i)*e;var e}}function g(t,n,e){return[t[0]+(n[0]-t[0])*e,t[1]+(n[1]-t[1])*e]}function A(t,n){if(!t)return{left:void 0,right:void 0};if(n<=0)return{left:void 0,right:t};if(n>=1)return{left:t,right:void 0};const[e,r,o,i]=t,s=m(e,o,n),l=[e,r],c=[o,i],{left:u,right:a}=function(t,n,e,r,o){const i=g(t,n,o),s=g(n,e,o),l=g(e,r,o),c=g(i,s,o),u=g(s,l,o),a=g(c,u,o);return{left:[t,i,c,a],right:[a,u,l,r]}}([0,0],l,c,[1,1],s),f=u[3][0],d=u[3][1];let v,h;f>1e-9&&Math.abs(d)>1e-9&&(v=[u[1][0]/f,u[1][1]/d,u[2][0]/f,u[2][1]/d]);const p=1-f,y=1-d;return p>1e-9&&Math.abs(y)>1e-9&&(h=[(a[1][0]-f)/p,(a[1][1]-d)/y,(a[2][0]-f)/p,(a[2][1]-d)/y]),{left:v,right:h}}function w(t){if(t)return[1-t[2],1-t[3],1-t[0],1-t[1]]}function j(t){if(t){if(Array.isArray(t))return t;if("string"==typeof t)return t.startsWith("#")?function(t){const n=t.slice(1),e=n.length<=4,r=e?n[0]+n[0]:n.slice(0,2),o=e?n[1]+n[1]:n.slice(2,4),i=e?n[2]+n[2]:n.slice(4,6),s=4===n.length?n[3]+n[3]:8===n.length?n.slice(6,8):null,l=[parseInt(r,16)/255,parseInt(o,16)/255,parseInt(i,16)/255];return null!==s&&l.push(parseInt(s,16)/255),l}(t):t.startsWith("rgb")?function(t){var n;const e=null==(n=t.match(/rgba?\((.*)\)/))?void 0:n[1];if(!e)throw new Error("Invalid rgb/rgba format");const r=e.split(",").map(t=>+t.trim());return[r[0]/255,r[1]/255,r[2]/255,...void 0!==r[3]?[r[3]]:[]]}(t):void console.warn("Unsupported color format: "+t)}}((n,e)=>{for(var r in e)t(n,r,{get:e[r],enumerable:!0})})(d,{PX_ANIMATOR_DATA_KEY:()=>Hn,createAnimator:()=>qn,setupAnimationTriggers:()=>Rn});var M=new Set(["color","fill","flood-color","lighting-color","stop-color","stroke"]),O=new Set(["translate","rotate","scale","skew"]),k=new Set(["offset-distance","offsetDistance"]);function x(t){return!t.includes("-")&&/[a-z][A-Z]/.test(t)}var z=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 S(t){return z.has(t)?t:t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}function V(t,n,e){return Math.max(n,Math.min(t,e))}function U(t,n,e,r,o){if(o<=0)return[t[0],t[1]];if(o>=1)return[r[0],r[1]];const i=1-o,s=i*i,l=o*o,c=s*i,u=3*o*s,a=3*l*i,f=l*o;return[c*t[0]+u*n[0]+a*e[0]+f*r[0],c*t[1]+u*n[1]+a*e[1]+f*r[1]]}var _=1e-4;function T(t,n,e,r,o){const i=N(t,n,e,r,o);return 0===i[0]&&0===i[1]?N(t,n,e,r,o<.5?o+_:o-_):i}function N(t,n,e,r,o){const i=1-o,s=3*i*i,l=6*o*i,c=3*o*o;return[s*(n[0]-t[0])+l*(e[0]-n[0])+c*(r[0]-e[0]),s*(n[1]-t[1])+l*(e[1]-n[1])+c*(r[1]-e[1])]}function C(t,n){const{ts:e,ds:r}=t,o=e.length-1;if(n<=e[0])return r[0];if(n>=e[o])return r[o];let i=1,s=o;for(;i<s;){const t=i+s>>>1;e[t]<n?i=t+1:s=t}const l=e[s-1],c=e[s]-l,u=c>0?(n-l)/c:0;return r[s-1]+u*(r[s]-r[s-1])}function I(t){if(!t.length)return".";let n="";for(const e of t)e.startsWith("[")?n+=e:n+=(n?".":"")+e;return n}var P=class{_canSanitize(t){return this.isValid(t)}optional(){return new B(this)}},B=class extends P{constructor(t){super(),this.inner=t,this._default=void 0}sanitize(t){if(null!=t)return this.inner._canSanitize(t)?this.inner.sanitize(t):void 0}isValid(t,n,e){return null==t||this.inner.isValid(t,n,e)}_canSanitize(t){return null==t||this.inner._canSanitize(t)}},L=class extends P{constructor(t=""){super(),this._default=t}sanitize(t){return"string"==typeof t?t:this._default}isValid(t,n,e){return"string"==typeof t||(null==n||n.errors.push(I(null!=e?e:[])+": expected string, got "+typeof t),!1)}},F=class extends P{constructor(t=0){super(),this._default=t}sanitize(t){return"number"==typeof t&&isFinite(t)?t:this._default}isValid(t,n,e){return!("number"!=typeof t||!isFinite(t))||(null==n||n.errors.push(I(null!=e?e:[])+": expected finite number, got "+JSON.stringify(t)),!1)}},E=class extends P{constructor(t=!1){super(),this._default=t}sanitize(t){return"boolean"==typeof t?t:this._default}isValid(t,n,e){return"boolean"==typeof t||(null==n||n.errors.push(I(null!=e?e:[])+": expected boolean, got "+typeof t),!1)}},Z=class extends P{constructor(t){super(),this.value=t,this._default=t}sanitize(t){return t===this.value?this.value:this._default}isValid(t,n,e){return t===this.value||(null==n||n.errors.push(I(null!=e?e:[])+": expected "+JSON.stringify(this.value)+", got "+JSON.stringify(t)),!1)}},J=class extends P{constructor(t,n){super(),this.values=t,this._default=null!=n?n:t[0]}sanitize(t){return this.values.includes(t)?t:this._default}isValid(t,n,e){return!!this.values.includes(t)||(null==n||n.errors.push(I(null!=e?e:[])+": expected one of "+this.values.map(t=>JSON.stringify(t)).join(" | ")+", got "+JSON.stringify(t)),!1)}},R=class extends P{constructor(t,n){super(),this.l=t,this.h="union",this._default=null!=n?n:t[0]._default}sanitize(t){for(const n of this.l)if(n.isValid(t))return n.sanitize(t);return this._default}isValid(t,n,e){var r;const o=n&&{errors:[],warnings:[],strict:n.strict};return!!this.l.some(n=>n.isValid(t,o,e?[...e]:void 0))||(null==n||n.errors.push(I(null!=e?e:[])+": no union member matched for value "+(null!=(r=JSON.stringify(t))?r:"").slice(0,240)),!1)}_canSanitize(t){return this.l.some(n=>n._canSanitize(t))}},W=class extends P{constructor(t){super(),this._shape=t;const n={};for(const e of Object.keys(t))n[e]=t[e]._default;this._default=n}sanitize(t){const n=t&&"object"==typeof t&&!Array.isArray(t)?t:{},e={};for(const t of Object.keys(this._shape)){const r=this._shape[t].sanitize(n[t]);void 0!==r&&(e[t]=r)}return e}isValid(t,n,e){if(!t||"object"!=typeof t||Array.isArray(t))return null==n||n.errors.push(I(null!=e?e:[])+": expected object, got "+(Array.isArray(t)?"array":typeof t)),!1;const r=t,o=null!=e?e:[];let i=!0;for(const t of Object.keys(this._shape))o.push(t),this._shape[t].isValid(r[t],n,o)||(i=!1),o.pop();if(null==n?void 0:n.strict)for(const t of Object.keys(r))t in this._shape||void 0!==r[t]&&(o.push(t),n.errors.push(I(o)+": unexpected extra key"),o.pop(),i=!1);return i}_canSanitize(t){return!!t&&"object"==typeof t&&!Array.isArray(t)}},D=class extends P{constructor(t,n){super(),this._shape=t,this.m=n;const e={};for(const n of Object.keys(t))e[n]=t[n]._default;this._default=e}sanitize(t){const n=t&&"object"==typeof t&&!Array.isArray(t)?t:{},e=u({},n);for(const t of Object.keys(this._shape)){const r=this._shape[t].sanitize(n[t]);void 0!==r&&(e[t]=r)}if(this.m)for(const t of Object.keys(n))t in this._shape||(e[t]=this.m.sanitize(n[t]));return e}isValid(t,n,e){if(!t||"object"!=typeof t||Array.isArray(t))return null==n||n.errors.push(I(null!=e?e:[])+": expected object, got "+(Array.isArray(t)?"array":typeof t)),!1;const r=t,o=null!=e?e:[];let i=!0;for(const t of Object.keys(this._shape))o.push(t),this._shape[t].isValid(r[t],n,o)||(i=!1),o.pop();if(this.m)for(const t of Object.keys(r))t in this._shape||(o.push(t),this.m.isValid(r[t],n,o)||(i=!1),o.pop());return i}_canSanitize(t){return!!t&&"object"==typeof t&&!Array.isArray(t)}},X=class extends P{constructor(t){super(),this.item=t,this._default=[]}sanitize(t){if(!Array.isArray(t))return[];const n=[];for(const e of t)this.item._canSanitize(e)&&n.push(this.item.sanitize(e));return n}isValid(t,n,e){if(!Array.isArray(t))return null==n||n.errors.push(I(null!=e?e:[])+": expected array, got "+typeof t),!1;const r=null!=e?e:[];let o=!0;for(let e=0;e<t.length;e++)r.push("["+e+"]"),this.item.isValid(t[e],n,r)||(o=!1),r.pop();return o}_canSanitize(t){return Array.isArray(t)}},G=class extends P{constructor(t){super(),this.value=t,this.h="record",this._default={}}sanitize(t){if(!t||"object"!=typeof t||Array.isArray(t))return{};const n={};for(const[e,r]of Object.entries(t))this.value._canSanitize(r)&&(n[e]=this.value.sanitize(r));return n}isValid(t,n,e){if(!t||"object"!=typeof t||Array.isArray(t))return null==n||n.errors.push(I(null!=e?e:[])+": expected object/record, got "+(Array.isArray(t)?"array":typeof t)),!1;const r=null!=e?e:[];let o=!0;for(const[e,i]of Object.entries(t))r.push(e),this.value.isValid(i,n,r)||(o=!1),r.pop();return o}_canSanitize(t){return!!t&&"object"==typeof t&&!Array.isArray(t)}},q=class extends P{constructor(t,n){super(),this.fn=t,this._default=n,this.resolved=null}get schema(){var t;return null!=(t=this.resolved)?t:this.resolved=this.fn()}sanitize(t){return this.schema.sanitize(t)}isValid(t,n,e){return this.schema.isValid(t,n,e)}_canSanitize(t){return this.schema._canSanitize(t)}},Y=class extends P{constructor(t){super(),this.l=t,this.h="tuple",this._default=t.map(t=>t._default)}sanitize(t){return Array.isArray(t)&&t.length===this.l.length?this.l.map((n,e)=>n.sanitize(t[e])):this._default}isValid(t,n,e){if(!Array.isArray(t)||t.length!==this.l.length)return null==n||n.errors.push(I(null!=e?e:[])+": expected tuple of length "+this.l.length+", got "+(Array.isArray(t)?"array["+t.length+"]":typeof t)),!1;const r=null!=e?e:[];let o=!0;for(let e=0;e<this.l.length;e++)r.push("["+e+"]"),this.l[e].isValid(t[e],n,r)||(o=!1),r.pop();return o}_canSanitize(t){return Array.isArray(t)&&t.length===this.l.length}},H=(t="")=>new L(t),K=(t=0)=>new F(t),$=(t=!1)=>new E(t),Q=t=>new Z(t),tt=(t,n)=>new J(t,n),nt=(t,n)=>new R(t,n),et=t=>new W(t),rt=(t,n)=>new D(t,n),ot=t=>new X(t),it=t=>new G(t),st=t=>new Y(t),lt=(t,n)=>new q(t,n),ct={native:"native",js:"js"},ut=a(u({},ct),{auto:"auto"}),at={start:"start",end:"end"},ft={normal:"normal",alternate:"alternate"},dt="userSpaceOnUse",vt="objectBoundingBox",ht="transform";function pt(t){var n;const e=(null==t?void 0:t.animator)||(null==(n=null==t?void 0:t.meta)?void 0:n.animator);return e?function(t){const n=t.timeline;if(null==n||"object"!=typeof n)return t;const e=mt.get(t);if(e)return e;const r=t,{timeline:o}=r,i=f(r,["timeline"]);if(void 0!==n.engine&&(i.engine=n.engine),void 0!==n.frameRate&&(i.frameRate=n.frameRate),"scroll"===n.type||"view"===n.type){i.timelineSource="scroll",void 0!==n.duration&&(i.duration=n.duration),void 0!==n.iterations&&(i.iterations=n.iterations);const t=u({},i.scroll||{});t.kind=n.type,void 0!==n.axis&&(t.axis=n.axis),void 0!==n.source&&(t.source=n.source),void 0!==n.subject&&(t.subject=n.subject),void 0!==n.smoothing&&(t.smoothing=n.smoothing),void 0!==n.range&&(t.range=n.range);const e=n.pin;"boolean"==typeof e?t.pin=e:e&&"object"==typeof e&&(t.pin=!0,void 0!==e.align&&(t.pinAlign=e.align),void 0!==e.top&&(t.pinTop=e.top),void 0!==e.distance&&(t.pinDistance=e.distance)),i.scroll=t}else{if(void 0!==n.duration&&(i.duration=n.duration),void 0!==n.trigger){const t=n.trigger,{finishAction:e}=t,r=f(t,["finishAction"]);Object.keys(r).length&&(i.trigger=r),void 0!==e&&(i.resetOnFinish="reset"===e)}void 0!==n.delay&&(i.delay=n.delay),void 0!==n.iterations&&(i.iterations=n.iterations),void 0!==n.direction&&(i.direction=n.direction),void 0!==n.fillMode&&(i.fill=n.fillMode)}return mt.set(t,i),i}(e):void 0}var yt,mt=new WeakMap,bt=nt([H(),st([K(),K(),K(),K()])]),gt=nt([H(),K(),ot(K()),et({path:H()}),lt(()=>et({paths:ot(fn)}),{paths:[]}),lt(()=>ot(tn),[]),lt(()=>St,{})]),At=et({time:K().optional(),value:gt.optional(),easing:bt.optional(),tangentOut:st([K(),K()]).optional(),tangentIn:st([K(),K()]).optional()}),wt=t=>{var n,e;return null!=(e=null!=(n=t.time)?n:t.t)?e:0},jt=t=>{var n;return null!=(n=t.value)?n:t.v},Mt=t=>{var n;return null!=(n=t.easing)?n:t.e},Ot=t=>t.tangentIn,kt=t=>t.tangentOut,xt=et({segmentCount:K().optional(),repeatAt:tt([at.start,at.end]).optional(),direction:tt([ft.normal,ft.alternate]).optional()}),zt=et({value:gt.optional(),keyframes:ot(At).optional(),loop:nt([xt,$()]).optional(),autoOrient:$().optional(),alongPathMode:tt(["sampled","offsetPath"]).optional()}),St=et({translate:st([K(),K()]).optional(),rotate:K().optional(),skew:K().optional(),scale:st([K(),K()]).optional(),origin:st([K(),K()]).optional()}),Vt=(nt([H(),St,et({value:St}),zt]),it(zt)),Ut=nt([H(),ot(nt([H(),Vt])),Vt]),_t=et({startOn:tt(["load","mouseOver","click","scrollIntoView","programmatic"]).optional(),outAction:tt(["continue","pause","reset","reverse"]).optional(),finishAction:tt(["hold","reset"]).optional(),scrollIntoViewThreshold:K().optional()}),Tt=et({width:K(),d:H()}),Nt=et({fontFamily:H(),fontStyle:H(),ascent:K(),unitsPerEm:K(),glyphs:it(Tt)}),Ct=et({easings:it(st([K(),K(),K(),K()])).optional(),animations:it(Vt).optional(),styles:it(it(nt([H(),K()]))).optional(),fonts:it(Nt).optional()}),It=et({phase:tt(["cover","contain","entry","exit","entry-crossing","exit-crossing"]).optional(),fraction:K().optional()}),Pt=et({start:It.optional(),end:It.optional()}),Bt=(et({kind:tt(["view","scroll"]).optional(),axis:tt(["block","inline","x","y"]).optional(),source:tt(["nearest","root"]).optional(),subject:H().optional(),smoothing:K().optional(),pin:$().optional(),pinAlign:tt(["top","center","bottom"]).optional(),pinTop:K().optional(),pinDistance:K().optional(),range:Pt.optional()}),et({align:tt(["top","center","bottom"]).optional(),top:K().optional(),distance:K().optional()})),Lt=tt([ut.auto,ut.native,ut.js]).optional(),Ft=et({type:Q("time").optional(),engine:Lt,frameRate:K().optional(),duration:K().optional(),trigger:_t.optional(),delay:K().optional(),iterations:nt([K(),Q("infinite")]).optional(),fillMode:tt(["forwards","backwards","both","none"]).optional(),direction:tt(["normal","reverse","alternate","alternate-reverse"]).optional()}),Et={duration:K().optional(),iterations:K().optional(),engine:Lt,frameRate:K().optional(),axis:tt(["block","inline","x","y"]).optional(),source:tt(["nearest","root"]).optional(),subject:H().optional(),smoothing:K().optional(),pin:nt([$(),Bt]).optional(),range:Pt.optional()},Zt=(yt=[Ft,et(u({type:Q("scroll")},Et)),et(u({type:Q("view")},Et))],new class extends P{constructor(t,n,e){var r;super(),this.A=t,this.j=n,this.h="discriminatedUnion",this._default=null!=e?e:n[0]._default,this.M=new Map;for(const e of n){const n=e._shape[t];if(!n)continue;const o=null!=(r=n.inner)?r:n;this.M.set(o._default,e),n.inner&&(this.O=e)}}k(t){if(null===t||"object"!=typeof t||Array.isArray(t))return;const n=t[this.A];return null==n?this.O:this.M.get(n)}sanitize(t){var n;return(null!=(n=this.k(t))?n:this.j[0]).sanitize(t)}isValid(t,n,e){const r=this.k(t);if(!r){const r=null===t||"object"!=typeof t||Array.isArray(t)?void 0:t[this.A];return null==n||n.errors.push(I(null!=e?e:[])+": no discriminated union member matched "+this.A+"="+JSON.stringify(r)),!1}return r.isValid(t,n,e)}_canSanitize(t){if(null===t||"object"!=typeof t||Array.isArray(t))return!1;const n=this.k(t);return n?n._canSanitize(t):this.j[0]._canSanitize(t)}}("type",yt)),Jt=et({timeline:Zt.optional(),definitions:Ct.optional(),animateById:it(Ut).optional(),debugGlobalName:H().optional(),version:H().optional()}),Rt=(et({id:H(),animate:Ut}),nt([H(),K(),ot(K()),et({value:new class extends P{constructor(){super(...arguments),this._default=void 0}sanitize(t){return t}isValid(t,n,e){return void 0!==t||(null==n||n.errors.push(I(null!=e?e:[])+": required value is missing"),!1)}_canSanitize(t){return void 0!==t}}}),St])),Wt=nt([K(),zt,et({value:K()})]),Dt=nt([st([K(),K()]),zt,et({value:st([K(),K()])})]),Xt=nt([H(),zt,et({value:H()})]),Gt=et({translate:Dt.optional(),rotate:Wt.optional(),scale:Dt.optional(),skew:Wt.optional(),origin:Dt.optional()}),qt=et({copies:K().optional(),translate:Dt.optional(),rotate:Wt.optional(),skew:Wt.optional(),scale:Dt.optional(),origin:Dt.optional()}),Yt=et({source:H().optional(),maskType:tt(["luminance","alpha"]).optional(),maskUnits:tt([dt,vt]).optional(),maskContentUnits:tt([dt,vt]).optional(),x:K().optional(),y:K().optional(),width:K().optional(),height:K().optional()}),Ht=et({d:Xt.optional()}),Kt=et({offset:Wt.optional(),range:Dt.optional(),subPaths:tt(["separate","combined"]).optional()}),$t=et({start:K().optional(),stretch:K().optional(),timeCrop:st([K(),K()]).optional()}),Qt=et({without:tt(["translate"]).optional(),source:H().optional(),retime:$t.optional()}),tn=et({offset:K(),color:H()}),nn=nt([ot(tn),et({value:ot(tn)}),zt]),en=et({type:tt(["linear","radial"]),start:Dt.optional(),end:Dt.optional(),center:Dt.optional(),radius:Wt.optional(),focal:Dt.optional(),stops:nn.optional(),gradientUnits:tt(["userSpaceOnUse","objectBoundingBox"]).optional(),spreadMethod:tt(["pad","reflect","repeat"]).optional(),gradientTransform:H().optional()}),rn=en,on=et({pathData:H(),pathOverflow:tt(["clip","extend"]).optional(),lengthAdjust:tt(["spacing","spacingAndGlyphs"]).optional(),method:tt(["align","stretch"]).optional(),spacing:tt(["auto","exact"]).optional(),startOffset:Wt.optional(),textLength:Wt.optional()}),sn=et({useGlyphs:$().optional()}),ln=et({transformBy:Gt.optional(),repeater:qt.optional(),maskedBy:Yt.optional(),clipPath:Ht.optional(),strokeTrim:Kt.optional(),clone:Qt.optional(),fillGradient:en.optional(),strokeGradient:rn.optional(),textPath:on.optional(),text:sn.optional()}),cn=rt({type:H(),domType:H().optional(),id:H().optional(),meta:(new class extends P{constructor(){super(...arguments),this._default=void 0}sanitize(t){return t}isValid(t,n,e){return!0}_canSanitize(t){return!0}}).optional(),effects:ln.optional(),animate:Ut.optional(),style:nt([H(),it(nt([H(),K()]))]).optional()},Rt),un=rt(a(u({},cn._shape),{children:lt(()=>ot(un),[]).optional()}),Rt),an=et({width:nt([K(),H()]).optional(),height:nt([K(),H()]).optional(),viewBox:H().optional(),animator:Jt.optional()}),fn=(rt(a(u(u({},cn._shape),an._shape),{type:Q("svg"),children:ot(un).optional()}),Rt),et({v:ot(ot(K())),i:ot(ot(K())).optional(),o:ot(ot(K())).optional(),c:$().optional()}));function dn(t){const n=jt(t);if(!n)return;if(Array.isArray(n)&&n.length>=2&&"number"==typeof n[0]&&"number"==typeof n[1])return[n[0],n[1]];const e=n.translate;return Array.isArray(e)&&e.length>=2?[e[0],e[1]]:void 0}function vn(t){return wt(t)}function hn(t){return Mt(t)}var pn=new WeakMap;function yn(t,n,e,r){let o=pn.get(t);const i=null==o?void 0:o.get(n);if(i)return i;const s=kt(t),l=Ot(n),c=[e[0]+(s?s[0]:0),e[1]+(s?s[1]:0)],u=[r[0]+(l?l[0]:0),r[1]+(l?l[1]:0)],a=function(t,n,e,r,o=100){const i=o+1,s=new Float64Array(i),l=new Float64Array(i);let c=U(t,n,e,r,0);s[0]=0,l[0]=0;let u=0;for(let a=1;a<i;a++){const i=a/o,f=U(t,n,e,r,i),d=f[0]-c[0],v=f[1]-c[1];u+=Math.sqrt(d*d+v*v),s[a]=i,l[a]=u,c=f}return{ts:s,ds:l}}(e,c,u,r),f={P0:e,P1:c,P2:u,P3:r,S:a,V:a.ds[a.ds.length-1]};return o||(o=new WeakMap,pn.set(t,o)),o.set(n,f),f}var mn=.5,bn=5,gn=32;function An(t,n){var e,r,o;if(!function(t){const n=t.keyframes;if(!Array.isArray(n))return!1;if(t.autoOrient)return!0;for(const t of n)if(Ot(t)||kt(t))return!0;return!1}(t))return t;const i=t.keyframes;if(!Array.isArray(i)||i.length<2)return t;const s=!!t.autoOrient,l=null!=(e=null==n?void 0:n.flatnessTolerance)?e:mn,c=null!=(r=null==n?void 0:n.rotationTolerance)?r:bn,u=null!=(o=null==n?void 0:n.maxSamplesPerSegment)?o:gn,a=[],f=dn(i[0]);if(!f)return t;const d=s?function(t,n){const e=dn(t),r=dn(n);if(!e||!r)return 0;const o=yn(t,n,e,r),i=T(o.P0,o.P1,o.P2,o.P3,0);return 180*Math.atan2(i[1],i[0])/Math.PI}(i[0],i[1]):void 0;a.push(wn(vn(i[0]),On(jn(i[0]),jn(i[0]),0,f,d,s)));for(let t=0;t<i.length-1;t++){const n=i[t],e=i[t+1],r=dn(n),o=dn(e);r&&o?(s&&t>0&&xn(a,n,e,r,o,c),Sn(a,n,e,r,o,s,l,c,u)):a.push(wn(vn(e),On(jn(e),jn(e),1,null!=o?o:[0,0],void 0,s)))}const v=hn(i[i.length-1]);v&&(a[a.length-1].e=v),s&&function(t){let n;for(const e of t){const t=jt(e);if(!t||"number"!=typeof t.rotate)continue;if(void 0===n){n=t.rotate;continue}let r=t.rotate;for(;r-n>180;)r-=360;for(;r-n<-180;)r+=360;t.rotate=r,n=r}}(a);const h={keyframes:a};return void 0!==t.loop&&(h.loop=t.loop),h}function wn(t,n){return{t:t,v:n}}function jn(t){const n=jt(t);if(n&&"object"==typeof n&&!Array.isArray(n))return n}function Mn(t,n,e){if(void 0===t)return n;if(void 0===n)return t;if("number"==typeof t&&"number"==typeof n)return t+(n-t)*e;if(Array.isArray(t)&&Array.isArray(n)&&t.length===n.length){const r=new Array(t.length);for(let o=0;o<t.length;o++){const i="number"==typeof t[o]?t[o]:0,s="number"==typeof n[o]?n[o]:0;r[o]=i+(s-i)*e}return r}return e<.5?t:n}function On(t,n,e,r,o,i){const s={translate:r},l=new Set;if(t)for(const n of Object.keys(t))l.add(n);if(n)for(const t of Object.keys(n))l.add(t);for(const r of l){if("translate"===r)continue;if("rotate"===r&&i)continue;const o=null==t?void 0:t[r],l=null==n?void 0:n[r];void 0===o&&void 0===l||(s[r]=Mn(o,l,e))}return void 0!==o&&(s.rotate=o+kn(t,n,e)),s}function kn(t,n,e){const r="number"==typeof(null==t?void 0:t.rotate)?t.rotate:void 0,o="number"==typeof(null==n?void 0:n.rotate)?n.rotate:void 0;if(void 0===r&&void 0===o)return 0;const i=Mn(r,o,e);return"number"==typeof i?i:0}function xn(t,n,e,r,o,i){const s=t[t.length-1],l=jt(s),c=null==l?void 0:l.rotate;if("number"!=typeof c)return;const u=jn(n),a=c-kn(u,u,0),f=yn(n,e,r,o),d=T(f.P0,f.P1,f.P2,f.P3,0),v=180*Math.atan2(d[1],d[0])/Math.PI,h=function(t,n){let e=t-n;for(;e>180;)e-=360;for(;e<-180;)e+=360;return e}(v,a);if(Math.abs(h)<=i)return;const p=vn(n),y=Math.min(p+zn,(p+vn(e))/2),m=On(jn(n),jn(n),0,r,v,!0);t.push(wn(y,m))}var zn=.05;function Sn(t,n,e,r,o,i,s,l,c){const u=yn(n,e,r,o),a=vn(n),f=vn(e),d=hn(n),v=(h=d)?b([h[1],h[0],h[3],h[2]]):t=>t;var h;const p=jn(n),y=jn(e),m=function(t,n,e,r,o){const i=[];Vn(t.P0[0],t.P1[0],t.P2[0],t.P3[0],i),Vn(t.P0[1],t.P1[1],t.P2[1],t.P3[1],i),i.sort((t,n)=>t-n);const s=[0];for(const t of i)t>s[s.length-1]+1e-6&&t<.999999&&s.push(t);s.push(1);const l=[],c={U:o-s.length};for(let o=0;o<s.length-1;o++)Un(s[o],s[o+1],l,t,n,e,r,c);return l}(u,i,s,l,c),g=[];for(const t of m){const n=C(u.S,t),e=V(u.V>0?n/u.V:t,0,1),r={u:V(v(e),0,1),p:e,_:U(u.P0,u.P1,u.P2,u.P3,t)};if(i){const n=T(u.P0,u.P1,u.P2,u.P3,t);r.rotateDeg=180*Math.atan2(n[1],n[0])/Math.PI}g.push(r)}let w=d,j=0;const M=t.length-1;for(let n=0;n<g.length;n++){const e=g[n],r=j<1?V((e.u-j)/(1-j),0,1):1,{left:o,right:s}=A(w,r),l=0===n?M:t.length-1;o?t[l].e=o:delete t[l].e;const c=a+e.u*(f-a),u=On(p,y,e.p,e._,e.rotateDeg,i);t.push(wn(c,u)),w=s,j=e.u}}function Vn(t,n,e,r,o){const i=n-t,s=e-n,l=i-2*s+(r-e),c=2*(s-i),u=i;if(Math.abs(l)<1e-10){if(Math.abs(c)>1e-10){const t=-u/c;t>1e-6&&t<.999999&&o.push(t)}return}const a=c*c-4*l*u;if(a<0)return;const f=Math.sqrt(a),d=(-c-f)/(2*l),v=(-c+f)/(2*l);d>1e-6&&d<.999999&&o.push(d),v>1e-6&&v<.999999&&o.push(v)}function Un(t,n,e,r,o,i,s,l){const c=(t+n)/2,u=U(r.P0,r.P1,r.P2,r.P3,t),a=U(r.P0,r.P1,r.P2,r.P3,n),f=n-t,d=U(r.P0,r.P1,r.P2,r.P3,t+.25*f),v=U(r.P0,r.P1,r.P2,r.P3,c),h=U(r.P0,r.P1,r.P2,r.P3,t+.75*f),p=Math.max(_n(d,u,a),_n(v,u,a),_n(h,u,a));let y=!0;if(o){const e=T(r.P0,r.P1,r.P2,r.P3,t),o=T(r.P0,r.P1,r.P2,r.P3,n),i=180*Math.atan2(e[1],e[0])/Math.PI,l=180*Math.atan2(o[1],o[0])/Math.PI;let c=Math.abs(i-l);c>180&&(c=360-c),c>s&&(y=!1)}p<=i&&y||l.U<=0||f<1e-6?e.push(n):(l.U-=1,Un(t,c,e,r,o,i,s,l),Un(c,n,e,r,o,i,s,l))}function _n(t,n,e){const r=e[0]-n[0],o=e[1]-n[1],i=r*r+o*o;if(i<1e-20){const e=t[0]-n[0],r=t[1]-n[1];return Math.sqrt(e*e+r*r)}const s=(t[0]-n[0])*o-(t[1]-n[1])*r;return Math.abs(s)/Math.sqrt(i)}var Tn=1;function Nn(t,n){if(t===n)return!0;if(typeof t!=typeof n||null===t||null===n||"object"!=typeof t)return!1;if(Array.isArray(t)!==Array.isArray(n))return!1;const e=Object.keys(t),r=Object.keys(n);return e.length===r.length&&e.every(e=>Nn(t[e],n[e]))}function Cn(t){const n=[];let e;const r=function(t){const n=t.split(/([MLCZmlcz]|[\s,]+)/).map(t=>t.trim()).filter(t=>t&&","!==t),e=[];let r=null;for(const t of n)if(/[MLCZmlcz]/.test(t))r={type:t,values:[]},e.push(r);else if(r){const n=+t;r.values.push(Number.isNaN(n)?0:n)}return e}(t);for(const t of r){const r=t.type,o=t.values;if("M"===r||"m"===r){const t=o[0]||0,r=o[1]||0;e={v:[[t,r]],i:[[t,r]],o:[[t,r]],c:!1},n.push(e);continue}if(e||(e={v:[[0,0]],i:[[0,0]],o:[[0,0]],c:!1},n.push(e)),"L"===r){const t=o[0]||0,n=o[1]||0;e.v.push([t,n]),e.i.push([t,n]),e.o.push([t,n])}else if("C"===r){const t=o[0]||0,n=o[1]||0,r=o[2]||0,i=o[3]||0,s=o[4]||0,l=o[5]||0;e.o[e.o.length-1]=[t,n],e.v.push([s,l]),e.i.push([r,i]),e.o.push([s,l])}else"Z"===r||"z"===r?e.c=!0:console.warn('Unsupported path command "'+r+'"')}return n}function In(t){return t.startsWith("path(")&&t.endsWith(")")?t.slice(5,-1):/^[MmZzLlHhVvCcSsQqTtAa]/.test(t)?t:void 0}function Pn(t){return"string"==typeof t&&void 0!==In(t)}function Bn(t){if(t&&"object"==typeof t&&"string"==typeof t.path){const n=In(t.path);return n?{paths:Cn(n)}:t}if(t&&"object"==typeof t&&"paths"in t){const n=t.paths;if(Array.isArray(n)&&n.length>0&&Pn(n[0])){const t=[];for(const e of n){const n=In(e);n&&t.push(...Cn(n))}return{paths:t}}return t}if(Array.isArray(t)){if(t.length>0&&Pn(t[0])){const n=[];for(const e of t){const t=In(e);t&&n.push(...Cn(t))}return{paths:n}}return{paths:t}}return Pn(t)?{paths:Cn(In(t))}:t}function Ln(t,n){var e;if(t)return Array.isArray(t)?t:(null==(e=null==n?void 0:n.easings)?void 0:e[t])?n.easings[t]:void console.warn("Unknown easing name: "+t)}function Fn(t,n){var e;if("string"==typeof t){const r=null==(e=null==n?void 0:n.animations)?void 0:e[t];return r||console.warn("Unknown animation name: "+t),r}return t}function En(t,n,e,r){var o,i;return"d"===t?{paths:p(null!=(o=null==n?void 0:n.paths)?o:Array.isArray(n)?n:[],null!=(i=null==e?void 0:e.paths)?i:Array.isArray(e)?e:[],r)}:M.has(t)?function(t,n,e){return[v(t[0]||0,n[0]||0,e),v(t[1]||0,n[1]||0,e),v(t[2]||0,n[2]||0,e),v(void 0===t[3]?1:t[3],void 0===n[3]?1:n[3],e)]}(n||[0,0,0,1],e||[0,0,0,1],r):"transform"!==t||"object"!=typeof n||null===n||Array.isArray(n)||"object"!=typeof e||null===e||Array.isArray(e)?"rotate"===t&&"number"==typeof n&&"number"==typeof e?v(n,e,r):O.has(t)||"stroke-dasharray"===t||"strokeDasharray"===t?h(n||[],e||[],r):v(+(n||0),+(e||0),r):function(t,n,e){const r=new Set([...Object.keys(null!=t?t:{}),...Object.keys(null!=n?n:{})]),o={};for(const i of r){const r=null==t?void 0:t[i],s=null==n?void 0:n[i];if("rotate"===i||"skew"===i)o[i]=v(+(null!=r?r:0),+(null!=s?s:0),e);else if("translate"===i||"scale"===i||"origin"===i){const t="scale"===i?[1,1]:[0,0];o[i]=h(r||t,s||t,e)}else o[i]=null!=s?s:r}return o}(n,e,r)}function Zn(t,n,e,r){var o;const i=n.keyframes||[],s=[];for(const n of i){const e=wt(n);let i=jt(n);const l=Mt(n);"d"===t&&(i=Bn(i));const c=x(t)?S(t):t;M.has(c)&&(i=null!=(o=j(i))?o:i);const u={t:e,v:i,e:Ln(l,r)},a=Ot(n),f=kt(n);a&&(u.tangentIn=a),f&&(u.tangentOut=f),s.push(u)}s.sort((t,n)=>{var e,r;return(null!=(e=t.t)?e:0)-(null!=(r=n.t)?r:0)});const l=n.loop,c=!0===l?{}:l||void 0;return c&&s.length>=2?function(t,n,e,r){var o,i,s,l,c;const f=n.length-1,d=V(null!=(o=e.segmentCount)?o:f,1,f);let v;v=e.repeatAt===at.start?n.slice(0,d+1):n.slice(f-d);const h=null!=(i=n[0].t)?i:0,p=null!=(s=n[n.length-1].t)?s:0;let y,m;e.repeatAt===at.start?(y=0,m=h):(y=p,m=r);const g=m-y;if(g<=0)return n;const j=null!=(l=v[0].t)?l:0,M=(null!=(c=v[v.length-1].t)?c:0)-j;if(M<=0)return n;const O=v.map(t=>({T:(t.t-j)/M,v:t.v,e:t.e,tangentIn:Ot(t),tangentOut:kt(t)})),k=Math.floor(g/M),x=g-k*M,z=x/M,S=[],U=e.repeatAt!==at.start,_=n[n.length-1];let T,N=!1;function C(n,e,r){var o;let i;if(e){i=[];for(let t=O.length-1;t>=0;t--)i.push({T:1-O[t].T,v:O[t].v,e:t>0?w(O[t-1].e):void 0,tangentIn:O[t].tangentOut,tangentOut:O[t].tangentIn})}else i=O;const s=void 0!==r?r:1;for(let e=0;e<i.length;e++){const r=i[e];if(r.T>s+1e-9){const o=i[e-1],l=r.T-o.T,c=(s-o.T)/l,u=o.e?b(o.e)(c):c,a=En(t,o.v,r.v,u),{left:f}=A(o.e,c);return S.length>0&&o.T<=s&&(S[S.length-1].e=f),void S.push({t:n+s*M,v:a,e:void 0})}const l=S.length>0?S[S.length-1]:_,c=U&&0===e&&void 0!==l&&Math.abs((null!=(o=l.t)?o:0)-(n+r.T*M))<1e-9;if(c){if(Nn(l.v,r.v)){S.length>0?(l.e=r.e,l.tangentOut=r.tangentOut):(T=r.e,N=!0);continue}S.length>0&&(delete l.tangentIn,delete l.tangentOut)}const u={t:n+r.T*M+(c?Tn:0),v:r.v,e:e<i.length-1?r.e:void 0};r.tangentIn&&(u.tangentIn=r.tangentIn),r.tangentOut&&(u.tangentOut=r.tangentOut),S.push(u)}}if(e.repeatAt===at.start){z>1e-9&&function(n,e,r){let o;if(e){o=[];for(let t=O.length-1;t>=0;t--)o.push({T:1-O[t].T,v:O[t].v,e:t>0?w(O[t-1].e):void 0,tangentIn:O[t].tangentOut,tangentOut:O[t].tangentIn})}else o=O;const i=1-r;for(let e=0;e<o.length;e++){const r=o[e];if(r.T<i-1e-9)continue;const s=o[e-1];if(s&&s.T<i-1e-9&&r.T>i+1e-9){const e=r.T-s.T,o=(i-s.T)/e,l=s.e?b(s.e)(o):o,c=En(t,s.v,r.v,l),{right:u}=A(s.e,o);S.push({t:n,v:c,e:u})}const l={t:n+(r.T-i)*M,v:r.v,e:e<o.length-1?r.e:void 0};r.tangentIn&&(l.tangentIn=r.tangentIn),r.tangentOut&&(l.tangentOut=r.tangentOut),S.push(l)}}(y,e.direction===ft.alternate&&k%2==0,z);for(let t=0;t<k;t++){const n=k-1-t,r=e.direction===ft.alternate&&n%2==0;C(y+x+t*M,r)}}else{for(let t=0;t<k;t++){const n=e.direction===ft.alternate&&t%2==0;C(y+t*M,n)}if(z>1e-9){const t=e.direction===ft.alternate&&k%2==0;C(y+k*M,t,z)}}return e.repeatAt===at.start?[...S,...n]:N&&n.length>0?[...n.slice(0,-1),a(u({},n[n.length-1]),{e:T}),...S]:[...n,...S]}(t,s,c,e):s}var Jn=0;function Rn(t,n){const{startOn:e,outAction:r="continue",scrollIntoViewThreshold:o=0}=n,i=t.getRootElement();if(!i)return console.warn("setupAnimationTriggers: No root element found for animation."),t;let s=!1;const l=()=>{s&&(s=!1,t.setPlaybackRate(1)),t.play()},c=()=>{switch(r){case"pause":t.pause();break;case"reset":t.cancel();break;case"reverse":s=!0,t.setPlaybackRate(-1),t.play()}};switch(e){case"load":{const t=()=>l();"complete"===document.readyState?t():window.addEventListener("load",t,{once:!0});break}case"mouseOver":{let t=!1;const n=()=>{t=!0,l()},e=()=>{t&&c()};i.addEventListener("mouseenter",n),i.addEventListener("mouseleave",e);break}case"click":{const n=()=>{t.isPlaying()?c():l()};i.addEventListener("click",n);break}case"scrollIntoView":{const t=t=>{var n,e;const r=t.boundingClientRect,o=t.intersectionRect;if(!(null==r?void 0:r.height)||!o)return t.intersectionRatio;const i="undefined"!=typeof window&&window.innerHeight?window.innerHeight:1/0,s=null!=(e=null==(n=t.rootBounds)?void 0:n.height)?e:1/0,l=Math.min(i,s),c=Math.min(r.height,Number.isFinite(l)?l:r.height);return c>0?o.height/c:t.intersectionRatio},n=Array.from({length:21},(t,n)=>n/20);let e=!1;new IntersectionObserver(n=>{n.forEach(n=>{n.isIntersecting&&t(n)>=o?(e=!0,l()):e&&(e=!1,c())})},{threshold:n}).observe(i);break}}return t}function Wn(t){return"#"+t}function Dn(t,n,e,r){let o=jt(t);const i=Mt(t),s={offset:n,easing:i&&Array.isArray(i)?"cubic-bezier("+i.join(",")+")":void 0};let l,c=e;var u;return M.has(e)&&Array.isArray(o)?l=function(t){const n=Math.round(255*t[0]),e=Math.round(255*t[1]),r=Math.round(255*t[2]);return 4===t.length?"rgba("+n+","+e+","+r+","+t[3]+")":"rgb("+n+","+e+","+r+")"}(o):"transform"!==e||null===o||"object"!=typeof o||Array.isArray(o)?O.has(e)?(Array.isArray(o)&&("translate"===e&&(o=o.map(t=>t+"px")),o=o.join(",")),"rotate"===e&&(o+="deg"),l=e+"("+o+")",c="transform"):l="d"===e?'path("'+(o&&"object"==typeof o&&Array.isArray(o.paths)?o.paths:[]).map(t=>function(t,n=!1){var e,r,o,i;const s=t.v,l=t.i,c=t.o,u=t.c;if(!s.length)return"";const a=[],f=s.length;a.push("M"+s[0][0]+","+s[0][1]);for(let t=1;t<f;t++){const o=s[t-1],i=null!=(e=null==c?void 0:c[t-1])?e:o,u=null!=(r=null==l?void 0:l[t])?r:s[t],f=s[t];n||i[0]!==o[0]||i[1]!==o[1]||u[0]!==f[0]||u[1]!==f[1]?a.push("C"+i[0]+","+i[1]+","+u[0]+","+u[1]+","+f[0]+","+f[1]):a.push("L"+f[0]+","+f[1])}if(u&&f>0){const t=s[f-1],e=null!=(o=null==c?void 0:c[f-1])?o:t,r=null!=(i=null==l?void 0:l[0])?i:s[0],u=s[0];!n&&e[0]===t[0]&&e[1]===t[1]&&r[0]===u[0]&&r[1]===u[1]||a.push("C"+e[0]+","+e[1]+","+r[0]+","+r[1]+","+u[0]+","+u[1]),a.push("z")}return a.join("")}(t,!0)).join("")+'")':k.has(e)&&"number"==typeof o?100*o+"%":""+o:(l=function(t,n){var e;if(!t)return"";const r=null==(e=null==n?void 0:n.N)||e,o=[],i=t.translate,s=t.origin,l=t.rotate,c=t.skew,u=t.scale,a=r?"px":"",f=r?"deg":"";return i&&o.push("translate("+i[0]+a+","+i[1]+a+")"),s&&o.push("translate("+s[0]+a+","+s[1]+a+")"),null!=l&&o.push("rotate("+l+f+")"),null!=c&&o.push("skewX("+c+f+")"),u&&o.push("scale("+u[0]+","+u[1]+")"),s&&o.push("translate("+-s[0]+a+","+-s[1]+a+")"),o.join("")}(o,{N:!0}),c="transform"),CSS.supports(S(c),l)||r.add(c),c=(u=c).includes("-")?u.replace(/-([a-z])/g,(t,n)=>n.toUpperCase()):u,s[c]=l,s}function Xn(t,n,e){var r,o,i,s,l;const c=[];for(let f=0;f<n.length;f++){const d=n[f],v=null!=(r=d.t)?r:0;if(v<0){const e=n[f+1];if(e&&(null!=(o=e.t)?o:0)>=0){const n=(0-v)/((null!=(i=e.t)?i:0)-v),r=d.e?b(d.e)(n):n,{right:o}=A(d.e,n);c.push({t:0,v:En(t,d.v,e.v,r),e:o})}continue}if(v>e){const r=n[f-1];if(r&&(null!=(s=r.t)?s:0)<=e){const n=null!=(l=r.t)?l:0,o=(e-n)/(v-n),i=r.e?b(r.e)(o):o,{left:s}=A(r.e,o);c.length>0&&(c[c.length-1]=a(u({},c[c.length-1]),{e:s})),c.push({t:e,v:En(t,r.v,d.v,i),e:void 0})}break}c.push(d)}return c}function Gn(t,n,e){var r;const o=new Map;for(const[i,s]of Object.entries(t)){const t=e.duration||1,l=Xn(i,s.keyframes||[],t),c=[];for(let e=0;e<l.length;e++){const o=l[e],s=Dn(o,V((null!=(r=o.t)?r:0)/t,0,1),i,n);0===e&&(s.offset||0)>0&&c.push(a(u({},s),{offset:0})),c.push(s)}c.length>0&&(c[c.length-1].offset||0)<1&&c.push(a(u({},c[c.length-1]),{offset:1})),c.length>0&&o.set(i,c)}return o}function qn(t){const n=function(t){if(!(null==t?void 0:t.data))throw new Error("createAnimator: `data` is required");return t.data}(t);return function(t,e){let r,o=e;t.resetOnFinish&&(o=a(u({},e),{onFinish:()=>{var t;null==(t=null==e?void 0:e.onFinish)||t.call(e),null==r||r.cancel()}}));const i=function(t,n,e,r,o){var i;const s=pt(t)||{};if(!e)if(t.id){const n=Wn(t.id);(e=document.querySelector(n))||console.warn("createFrameLoopAnimator: No root element found for selector: ",n)}else console.warn("createFrameLoopAnimator: No root element provided");const l=function(t,n=ct.native){const e=pt(t)||{},r=function(t){var n;if(t)return null==(n=pt(t))?void 0:n.definitions}(t),o=e.duration||1e3,i=[],s=(t,e,i)=>{if(!e)return null;const s=function(t,n){if(!t)return[];const e=[];if("string"==typeof t){const r=Fn(t,n);r&&e.push(r)}else if(Array.isArray(t))for(const r of t){const t=Fn(r,n);t&&e.push(t)}else e.push(t);return e}(e,r);if(0===s.length)return null;const l=function(t,n,e,r=ct.native){const o={};for(const[i,s]of Object.entries(t)){if("transform"===i&&"offsetPath"===s.alongPathMode&&void 0!==t.offsetDistance)continue;const l=Zn(i,s,n,e);if(l.length>0){const t={keyframes:l};void 0!==s.autoOrient&&(t.autoOrient=s.autoOrient),void 0!==s.loop&&(t.loop=s.loop),o[i]=r===ct.native&&"transform"===i?An(t):t}}return o}(function(t,n){if(!t)return t;const e=n&&"object"==typeof n&&!Array.isArray(n)?n:function(t){var n,e;if(!t||"string"!=typeof t)return;const r={},o=/([a-zA-Z]+)\s*\(([^)]*)\)/g,i=["translate","rotate","skewX","scale"];let s,l=-1;for(;null!==(s=o.exec(t));){const t=s[1],o=i.indexOf(t);if(o<0||o<=l)return;l=o;const c=s[2].split(/[\s,]+/).filter(Boolean).map(Number);if(c.some(t=>Number.isNaN(t)))return;if("translate"===t){if(c.length<1||c.length>2)return;r.translate=[c[0],null!=(n=c[1])?n:0]}else if("rotate"===t){if(1!==c.length)return;r.rotate=c[0]}else if("skewX"===t){if(1!==c.length)return;r.skew=c[0]}else{if(c.length<1||c.length>2)return;r.scale=[c[0],null!=(e=c[1])?e:c[0]]}}return t.replace(/([a-zA-Z]+)\s*\(([^)]*)\)/g,"").replace(/[\s,]/g,"").length?void 0:Object.keys(r).length?r:void 0}(n);if(!e||!Object.keys(e).length)return t;const r=t=>t&&"object"==typeof t&&!Array.isArray(t)?u(u({},e),t):t,o=t[ht];if(o&&"object"==typeof o){const n=o;if(Array.isArray(n.keyframes)){const e=a(u({},n),{keyframes:n.keyframes.map(t=>a(u({},t),{value:r(t.value)}))});return void 0!==e.value&&(e.value=r(e.value)),a(u({},t),{transform:e})}return t}const i=Object.keys(t).filter(t=>O.has(t));if(1!==i.length)return t;const s=i[0],l=t[s];if(!l||"object"!=typeof l||!Array.isArray(l.keyframes))return t;const c=a(u({},l),{keyframes:l.keyframes.map(t=>a(u({},t),{value:a(u({},e),{[s]:t.value})}))});void 0!==c.value&&(c.value=a(u({},e),{[s]:c.value}));const f=u({},t);return delete f[s],a(u({},f),{transform:c})}(function(t){const n={};for(const e of t)for(const[t,r]of Object.entries(e))n[t]=r;return n}(s),i),o,r,n);return 0===Object.keys(l).length?null:{id:t,animate:l}},l=function(t){var n;if(!t)return;const e=null==(n=pt(t))?void 0:n.animateById;return e?Object.entries(e).map(([t,n])=>({id:t.startsWith("#")?t.slice(1):t,animate:n})):void 0}(t);if(l)for(const t of l){const n=s(t.id,t.animate);n&&i.push(n)}const c=t=>{const n=t.animate;if(n&&Object.keys(n).length>0){const e=t.id||"_px_el_"+ ++Jn;t.id=e;const r=s(e,n,t.transform);r&&i.push(r)}if(t.children)for(let n=0;n<t.children.length;n++)c(t.children[n])};if(t.children)for(let n=0;n<t.children.length;n++)c(t.children[n]);return i}(t,ct.native),c=[],f=s.iterations;let d;"number"==typeof f&&(d=f),"infinite"===f&&(d=1/0);const v=new Set;let h=!1,p=!1;(null==l?void 0:l.length)||console.warn("createWebApiAnimator: No animation bindings defined");for(const t of l||[]){const r=t.animate;if(!r||"object"!=typeof r||Array.isArray(r)){console.warn("createWebApiAnimator: Empty or unresolved binding",t);continue}const l=Wn(t.id),u=(null==e?void 0:e.querySelectorAll(l))||document.querySelectorAll(l);0===u.length&&console.warn('createWebApiAnimator: No elements found for selector "'+l+'"');const a=Gn(r,v,s),f=s.delay&&s.delay>0?s.delay:void 0;let y;if(s.delay&&s.delay<0&&s.duration){const t=-s.delay;y=d===1/0?t%s.duration:Math.min(t,s.duration*(null!=d?d:1))}const m={duration:s.duration,delay:f,fill:null!=(i=s.fill)?i:"forwards",direction:s.direction,iterations:d};for(let t=0;t<u.length;t++){const e=u[t];for(const[,t]of a)if(t.length>0)try{const r=new KeyframeEffect(e,t,m),i=new Animation(r,document.timeline);o,(null==n?void 0:n.onFinish)&&(i.onfinish=()=>{var t;h||(h=!0,null==(t=n.onFinish)||t.call(n))}),(null==n?void 0:n.onRemove)&&(i.onremove=()=>{var t;p||(p=!0,null==(t=n.onRemove)||t.call(n))}),void 0!==y&&(i.currentTime=y),c.push(i)}catch(t){console.warn(t)}}}const y={isReady:()=>!0,getRootElement:()=>e||null,isPlaying:()=>{var t;return"running"===(null==(t=c[0])?void 0:t.playState)},play:()=>{var t;h=!1,c.forEach(t=>t.play()),null==(t=null==n?void 0:n.onPlay)||t.call(n)},pause:()=>{var t;c.forEach(t=>t.pause()),null==(t=null==n?void 0:n.onPause)||t.call(n)},cancel:()=>{var t;h=!1,c.forEach(t=>t.cancel()),null==(t=null==n?void 0:n.onCancel)||t.call(n)},finish:()=>{var t;for(const n of c)try{(null==(t=n.effect)?void 0:t.getTiming().iterations)===1/0?(n.effect.updateTiming({iterations:1}),n.finish(),n.effect.updateTiming({iterations:1/0})):n.finish()}catch(t){n.cancel()}},setPlaybackRate:t=>(c.forEach(n=>n.playbackRate=t),y),getCurrentTime:()=>{var t,n;const e=null!=(n=null==(t=c[0])?void 0:t.currentTime)?n:null;return null!==e?+e:null},setCurrentTime:t=>{h=!1,c.forEach(n=>{n.currentTime=t})},destroy:()=>{var t;y.cancel(),c.splice(0,c.length),p||(p=!0,null==(t=null==n?void 0:n.onRemove)||t.call(n))}};return s.trigger&&("scroll"===s.timelineSource?console.warn("scroll timeline: `animator.trigger` is ignored (triggers do not apply to scroll-driven playback)"):Rn(y,s.trigger)),y}(n,o,null);return r=i,t.debugGlobalName&&(window[t.debugGlobalName]=i),i}(pt(n)||{},t.callbacks)}var Yn,Hn="data";return Yn=d,((n,r,i,l)=>{if(r&&"object"==typeof r||"function"==typeof r)for(let i of o(r))s.call(n,i)||void 0===i||t(n,i,{get:()=>r[i],enumerable:!(l=e(r,i))||l.enumerable});return n})(t({},"__esModule",{value:!0}),Yn)})();
|