@pixodesk/svg-animator-web 1.0.34 → 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 +25 -7
- package/dist/index.cjs +724 -462
- 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 +714 -460
- 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 +981 -85
- 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 +1006 -105
- package/dist/index.prerendered.umd.js.map +1 -1
- package/dist/index.prerendered.umd.min.js +1 -1
- package/dist/pixodesk-svg-animator.umd.js +512 -270
- package/dist/pixodesk-svg-animator.umd.js.map +1 -1
- package/dist/pixodesk-svg-animator.umd.min.js +1 -1
- package/mangle-reserved.json +232 -0
- package/package.json +7 -4
package/dist/index.min.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var t,e=Object.defineProperty,n=Object.defineProperties,r=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyDescriptors,i=Object.getOwnPropertyNames,a=Object.getOwnPropertySymbols,s=Object.prototype.hasOwnProperty,l=Object.prototype.propertyIsEnumerable,u=(t,n,r)=>n in t?e(t,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[n]=r,c=(t,e)=>{for(var n in e||(e={}))s.call(e,n)&&u(t,n,e[n]);if(a)for(var n of a(e))l.call(e,n)&&u(t,n,e[n]);return t},f=(t,e)=>n(t,o(e)),d={};((t,n)=>{for(var r in n)e(t,r,{get:n[r],enumerable:!0})})(d,{COLOUR_ATTR_NAMES:()=>L,MISSING_GLYPH_CLASS_NAME:()=>Ao,PX_ANIMATOR_DATA_KEY:()=>Xi,PX_ANIM_ATTR_NAME:()=>jt,PX_ANIM_SRC_ATTR_NAME:()=>St,PX_TRANSFORM_PART_KEYS:()=>Ct,PxAnimatedSvgDocumentSchema:()=>Fe,PxAnimationDefinitionSchema:()=>Jt,PxAnimatorConfigSchema:()=>de,PxAnimatorEngine:()=>Ot,PxAnimatorMode:()=>Pt,PxAttrValueSchema:()=>me,PxBezierPathSchema:()=>Le,PxBindingSchema:()=>he,PxCloneEffectSchema:()=>Se,PxDefsSchema:()=>re,PxEasingOrRefSchema:()=>qt,PxEffectsSchema:()=>Ie,PxElementAnimationSchema:()=>$t,PxFillGradientEffectSchema:()=>Oe,PxGradientSpreadMethod:()=>Lt,PxGradientStopSchema:()=>je,PxGradientType:()=>Dt,PxGradientUnits:()=>Ft,PxKeyframeSchema:()=>Zt,PxKeyframeValueSchema:()=>Kt,PxLoopSchema:()=>Xt,PxMaskedByEffectSchema:()=>ke,PxNodeBase:()=>Te,PxNodeSchema:()=>Ne,PxPropertyAnimationSchema:()=>Ht,PxRepeaterEffectSchema:()=>be,PxRetimeEffectSchema:()=>xe,PxStrokeGradientEffectSchema:()=>Me,PxStrokeTrimEffectSchema:()=>we,PxSvgNodeExtra:()=>Ce,PxTextEffectSchema:()=>Ee,PxTextPathEffectSchema:()=>_e,PxTransformByEffectSchema:()=>ye,PxTransformPartsSchema:()=>Yt,PxTransformValueSchema:()=>Qt,PxTriggerSchema:()=>te,STYLE_ATTR_NAMES:()=>U,TRANSFORM_FN_NAMES:()=>D,applyPlayerEffects:()=>Jo,calcAnimationValues:()=>Wn,camelCaseToKebabWordIfNeeded:()=>K,collectSampleTimes:()=>Oi,createAnimator:()=>Yi,createAnimatorImpl:()=>Hi,createBasicFrameLoopAnimator:()=>ci,createFrameLoopAnimator:()=>Ti,createPathSampler:()=>Zr,createWebApiAnimator:()=>Li,describeSchema:()=>wt,diffInEffect:()=>_i,evaluateMotionPathSegment:()=>sn,extendedPathForBrowser:()=>$r,generateNewIds:()=>Ve,getAnimatorConfig:()=>Bt,getBindings:()=>Wt,getChildren:()=>Gt,getDefs:()=>Vt,getNormalizedProps:()=>$e,isPxElementFileFormat:()=>Rt,isPxElementFileFormatDeep:()=>De,jsonElementFactory:()=>eo,layoutGlyphTextChars:()=>So,loadTagAnimators:()=>Qi,materialiseAllInTree:()=>li,materialiseAnimatedUseInstances:()=>Xn,materialiseGlyphText:()=>Fo,materialiseGlyphTextAlongPath:()=>Oo,materialiseGlyphTextHorizontal:()=>xo,materialiseInternalLoopsInPropAnim:()=>Ln,materialiseInternalLoopsInTree:()=>Dn,materialiseMotionPathInPropAnim:()=>fn,materialiseMotionPathsInTree:()=>Sn,normalizeDocument:()=>Un,propAnimIsMotionPath:()=>rn,px:()=>xt,renderNode:()=>Zi,schemaKeys:()=>At,setupAnimationTriggers:()=>Ii,shiftAnimatable:()=>Jr,toRGBA:()=>C,validateNodeEffects:()=>ze,visualModelAt:()=>Mi}),module.exports=(t=d,((t,n,o,a)=>{if(n&&"object"==typeof n||"function"==typeof n)for(let o of i(n))s.call(t,o)||void 0===o||e(t,o,{get:()=>n[o],enumerable:!(a=r(n,o))||a.enumerable});return t})(e({},"__esModule",{value:!0}),t));var h=Object.defineProperty,m=Object.defineProperties,p=Object.getOwnPropertyDescriptors,v=Object.getOwnPropertySymbols,g=Object.prototype.hasOwnProperty,y=Object.prototype.propertyIsEnumerable,b=Math.pow,k=(t,e,n)=>e in t?h(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,A=(t,e)=>{for(var n in e||(e={}))g.call(e,n)&&k(t,n,e[n]);if(v)for(var n of v(e))y.call(e,n)&&k(t,n,e[n]);return t},w=(t,e)=>m(t,p(e)),x=(t,e)=>{var n={};for(var r in t)g.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&v)for(var r of v(t))e.indexOf(r)<0&&y.call(t,r)&&(n[r]=t[r]);return n};function S(t,e=!1){var n,r,o,i;const a=t.v,s=t.i,l=t.o,u=t.c;if(!a.length)return"";const c=[],f=a.length;c.push("M"+a[0][0]+","+a[0][1]);for(let t=1;t<f;t++){const o=a[t-1],i=null!=(n=null==l?void 0:l[t-1])?n:o,u=null!=(r=null==s?void 0:s[t])?r:a[t],f=a[t];e||i[0]!==o[0]||i[1]!==o[1]||u[0]!==f[0]||u[1]!==f[1]?c.push("C"+i[0]+","+i[1]+","+u[0]+","+u[1]+","+f[0]+","+f[1]):c.push("L"+f[0]+","+f[1])}if(u&&f>0){const t=a[f-1],n=null!=(o=null==l?void 0:l[f-1])?o:t,r=null!=(i=null==s?void 0:s[0])?i:a[0],u=a[0];!e&&n[0]===t[0]&&n[1]===t[1]&&r[0]===u[0]&&r[1]===u[1]||c.push("C"+n[0]+","+n[1]+","+r[0]+","+r[1]+","+u[0]+","+u[1]),c.push("z")}return c.join("")}function j(t,e,n){return t+(e-t)*n}function P(t,e,n){const r=[],o=Math.max(t.length,e.length);for(let i=0;i<o;i++)r[i]=j(t[i]||0,e[i]||0,n);return r}function O(t,e,n){return[j(t[0]||0,e[0]||0,n),j(t[1]||0,e[1]||0,n),j(t[2]||0,e[2]||0,n),j(void 0===t[3]?1:t[3],void 0===e[3]?1:e[3],n)]}function M(t,e,n){const r=Math.max(t.length,e.length),o=[];for(let i=0;i<r;i++)o.push(_(t[i],e[i],n));return o}function _(t,e,n){var r,o,i,a,s,l,u,c,f;if(!t||!e)return t||e||{v:[]};const d=Math.min(Math.max(n,0),1),h=Math.min(t.v.length,e.v.length),m=[],p=[],v=[];for(let n=0;n<h;n++){const f=t.v[n],h=e.v[n];m.push(P(f,h,d));const g=null!=(o=null==(r=t.i)?void 0:r[n])?o:f,y=null!=(a=null==(i=e.i)?void 0:i[n])?a:h;p.push(P(g,y,d));const b=null!=(l=null==(s=t.o)?void 0:s[n])?l:f,k=null!=(c=null==(u=e.o)?void 0:u[n])?c:h;v.push(P(b,k,d))}return{v:m,i:p.length?p:void 0,o:v.length?v:void 0,c:null!=(f=t.c)?f:e.c}}function E(t,e,n){if(n<=0)return 0;if(n>=1)return 1;const r=3*t,o=3*(e-t)-r,i=1-r-o;function a(t){return((i*t+o)*t+r)*t}function s(t){return(3*i*t+2*o)*t+r}let l=n,u=0,c=1;for(let t=0;t<8;t++){const t=a(l)-n;if(Math.abs(t)<1e-6)return l;const e=s(l);if(Math.abs(e)<1e-6)break;l-=t/e}for(l=n;u<c;){const t=a(l);if(Math.abs(t-n)<1e-6)return l;n>t?u=l:c=l,l=(c+u)/2}return l}function I(t){const[e,n,r,o]=t,i=3*n,a=3*(o-n)-i,s=1-i-a;return function(t){return n=E(e,r,t),((s*n+a)*n+i)*n;var n}}function z(t,e,n){return[t[0]+(e[0]-t[0])*n,t[1]+(e[1]-t[1])*n]}function T(t,e){if(!t)return{left:void 0,right:void 0};if(e<=0)return{left:void 0,right:t};if(e>=1)return{left:t,right:void 0};const[n,r,o,i]=t,a=E(n,o,e),s=[n,r],l=[o,i],{left:u,right:c}=function(t,e,n,r,o){const i=z(t,e,o),a=z(e,n,o),s=z(n,r,o),l=z(i,a,o),u=z(a,s,o),c=z(l,u,o);return{left:[t,i,l,c],right:[c,u,s,r]}}([0,0],s,l,[1,1],a),f=u[3][0],d=u[3][1];let h,m;f>1e-9&&Math.abs(d)>1e-9&&(h=[u[1][0]/f,u[1][1]/d,u[2][0]/f,u[2][1]/d]);const p=1-f,v=1-d;return p>1e-9&&Math.abs(v)>1e-9&&(m=[(c[1][0]-f)/p,(c[1][1]-d)/v,(c[2][0]-f)/p,(c[2][1]-d)/v]),{left:h,right:m}}function N(t){if(t)return[1-t[2],1-t[3],1-t[0],1-t[1]]}function C(t){const e=Math.round(255*t[0]),n=Math.round(255*t[1]),r=Math.round(255*t[2]);return 4===t.length?"rgba("+e+","+n+","+r+","+t[3]+")":"rgb("+e+","+n+","+r+")"}function F(t){if(t){if(Array.isArray(t))return t;if("string"==typeof t)return t.startsWith("#")?function(t){const e=t.slice(1),n=e.length<=4,r=n?e[0]+e[0]:e.slice(0,2),o=n?e[1]+e[1]:e.slice(2,4),i=n?e[2]+e[2]:e.slice(4,6),a=4===e.length?e[3]+e[3]:8===e.length?e.slice(6,8):null,s=[parseInt(r,16)/255,parseInt(o,16)/255,parseInt(i,16)/255];return null!==a&&s.push(parseInt(a,16)/255),s}(t):t.startsWith("rgb")?function(t){var e;const n=null==(e=t.match(/rgba?\((.*)\)/))?void 0:e[1];if(!n)throw new Error("Invalid rgb/rgba format");const r=n.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)}}var L=new Set(["color","fill","flood-color","lighting-color","stop-color","stroke"]),D=new Set(["translate","rotate","scale","skew"]),R=new Set(["offset-distance","offsetDistance"]);function B(t,e){var n;if(!t)return"";const r=null==(n=null==e?void 0:e.withUnits)||n,o=[],i=t.translate,a=t.origin,s=t.rotate,l=t.skew,u=t.scale,c=r?"px":"",f=r?"deg":"";return i&&o.push("translate("+i[0]+c+","+i[1]+c+")"),a&&o.push("translate("+a[0]+c+","+a[1]+c+")"),null!=s&&o.push("rotate("+s+f+")"),null!=l&&o.push("skewX("+l+f+")"),u&&o.push("scale("+u[0]+","+u[1]+")"),a&&o.push("translate("+-a[0]+c+","+-a[1]+c+")"),o.join("")}var U=new Set(["offset-distance","offsetDistance"]),V=1e3;function W(t){return t.includes("-")?t.replace(/-([a-z])/g,(t,e)=>e.toUpperCase()):t}function G(t){return!t.includes("-")&&/[a-z][A-Z]/.test(t)}var q=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 K(t){return q.has(t)?t:t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}function Z(t,e,n){return Math.max(e,Math.min(t,n))}function X(t,e,n,r,o){if(o<=0)return[t[0],t[1]];if(o>=1)return[r[0],r[1]];const i=1-o,a=i*i,s=o*o,l=a*i,u=3*o*a,c=3*s*i,f=s*o;return[l*t[0]+u*e[0]+c*n[0]+f*r[0],l*t[1]+u*e[1]+c*n[1]+f*r[1]]}var H=1e-4;function Y(t,e,n,r,o){const i=Q(t,e,n,r,o);return 0===i[0]&&0===i[1]?Q(t,e,n,r,o<.5?o+H:o-H):i}function Q(t,e,n,r,o){const i=1-o,a=3*i*i,s=6*o*i,l=3*o*o;return[a*(e[0]-t[0])+s*(n[0]-e[0])+l*(r[0]-n[0]),a*(e[1]-t[1])+s*(n[1]-e[1])+l*(r[1]-n[1])]}function J(t,e,n,r,o=100){const i=o+1,a=new Float64Array(i),s=new Float64Array(i);let l=X(t,e,n,r,0);a[0]=0,s[0]=0;let u=0;for(let c=1;c<i;c++){const i=c/o,f=X(t,e,n,r,i),d=f[0]-l[0],h=f[1]-l[1];u+=Math.sqrt(d*d+h*h),a[c]=i,s[c]=u,l=f}return{ts:a,ds:s}}function $(t,e){const{ts:n,ds:r}=t,o=n.length-1;if(e<=n[0])return r[0];if(e>=n[o])return r[o];let i=1,a=o;for(;i<a;){const t=i+a>>>1;n[t]<e?i=t+1:a=t}const s=n[a-1],l=n[a]-s,u=l>0?(e-s)/l:0;return r[a-1]+u*(r[a]-r[a-1])}function tt(t){return"scroll"===(null==t?void 0:t.timelineSource)}var et="cover";function nt(t,e,n,r){var o;const[i,a]=function(t,e,n){const r=e,o=n;switch(t){case"cover":return[0,r+o];case"entry":return[0,Math.min(r,o)];case"contain":return[Math.min(r,o),Math.max(r,o)];case"exit":return[Math.max(r,o),r+o];case"entry-crossing":return[0,r];case"exit-crossing":return[o,r+o]}}(null!=(o=null==t?void 0:t.phase)?o:et,n,r);return i+("number"==typeof(null==t?void 0:t.fraction)?t.fraction:e)*(a-i)}function rt(t){if(!t.length)return".";let e="";for(const n of t)n.startsWith("[")?e+=n:e+=(e?".":"")+n;return e}var ot=class{_canSanitize(t){return this.isValid(t)}optional(){return new it(this)}},it=class extends ot{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,e,n){return null==t||this.inner.isValid(t,e,n)}_canSanitize(t){return null==t||this.inner._canSanitize(t)}},at=class extends ot{constructor(t=""){super(),this._default=t}sanitize(t){return"string"==typeof t?t:this._default}isValid(t,e,n){return"string"==typeof t||(null==e||e.errors.push(rt(null!=n?n:[])+": expected string, got "+typeof t),!1)}},st=class extends ot{constructor(t=0){super(),this._default=t}sanitize(t){return"number"==typeof t&&isFinite(t)?t:this._default}isValid(t,e,n){return!("number"!=typeof t||!isFinite(t))||(null==e||e.errors.push(rt(null!=n?n:[])+": expected finite number, got "+JSON.stringify(t)),!1)}},lt=class extends ot{constructor(t=!1){super(),this._default=t}sanitize(t){return"boolean"==typeof t?t:this._default}isValid(t,e,n){return"boolean"==typeof t||(null==e||e.errors.push(rt(null!=n?n:[])+": expected boolean, got "+typeof t),!1)}},ut=class extends ot{constructor(t){super(),this.value=t,this._default=t}sanitize(t){return t===this.value?this.value:this._default}isValid(t,e,n){return t===this.value||(null==e||e.errors.push(rt(null!=n?n:[])+": expected "+JSON.stringify(this.value)+", got "+JSON.stringify(t)),!1)}},ct=class extends ot{constructor(t,e){super(),this.values=t,this._default=null!=e?e:t[0]}sanitize(t){return this.values.includes(t)?t:this._default}isValid(t,e,n){return!!this.values.includes(t)||(null==e||e.errors.push(rt(null!=n?n:[])+": expected one of "+this.values.map(t=>JSON.stringify(t)).join(" | ")+", got "+JSON.stringify(t)),!1)}},ft=class extends ot{constructor(t,e){super(),this.schemas=t,this._kind="union",this._default=null!=e?e:t[0]._default}sanitize(t){for(const e of this.schemas)if(e.isValid(t))return e.sanitize(t);return this._default}isValid(t,e,n){var r;const o=e&&{errors:[],warnings:[],strict:e.strict};return!!this.schemas.some(e=>e.isValid(t,o,n?[...n]:void 0))||(null==e||e.errors.push(rt(null!=n?n:[])+": no union member matched for value "+(null!=(r=JSON.stringify(t))?r:"").slice(0,240)),!1)}_canSanitize(t){return this.schemas.some(e=>e._canSanitize(t))}},dt=class extends ot{constructor(t,e,n){super(),this._key=t,this._schemas=e,this._kind="discriminatedUnion",this._default=null!=n?n:e[0]._default,this._map=new Map;for(const n of e){const e=n._shape[t];e&&this._map.set(e._default,n)}}_findSchema(t){if(null===t||"object"!=typeof t||Array.isArray(t))return;const e=t[this._key];return null!=e?this._map.get(e):void 0}sanitize(t){var e;return(null!=(e=this._findSchema(t))?e:this._schemas[0]).sanitize(t)}isValid(t,e,n){const r=this._findSchema(t);if(!r){const r=null===t||"object"!=typeof t||Array.isArray(t)?void 0:t[this._key];return null==e||e.errors.push(rt(null!=n?n:[])+": no discriminated union member matched "+this._key+"="+JSON.stringify(r)),!1}return r.isValid(t,e,n)}_canSanitize(t){if(null===t||"object"!=typeof t||Array.isArray(t))return!1;const e=this._findSchema(t);return e?e._canSanitize(t):this._schemas[0]._canSanitize(t)}},ht=class extends ot{constructor(t){super(),this._shape=t;const e={};for(const n of Object.keys(t))e[n]=t[n]._default;this._default=e}sanitize(t){const e=t&&"object"==typeof t&&!Array.isArray(t)?t:{},n={};for(const t of Object.keys(this._shape))n[t]=this._shape[t].sanitize(e[t]);return n}isValid(t,e,n){if(!t||"object"!=typeof t||Array.isArray(t))return null==e||e.errors.push(rt(null!=n?n:[])+": expected object, got "+(Array.isArray(t)?"array":typeof t)),!1;const r=t,o=null!=n?n:[];let i=!0;for(const t of Object.keys(this._shape))o.push(t),this._shape[t].isValid(r[t],e,o)||(i=!1),o.pop();if(null==e?void 0:e.strict)for(const t of Object.keys(r))t in this._shape||void 0!==r[t]&&(o.push(t),e.errors.push(rt(o)+": unexpected extra key"),o.pop(),i=!1);return i}_canSanitize(t){return!!t&&"object"==typeof t&&!Array.isArray(t)}},mt=class extends ot{constructor(t,e){super(),this._shape=t,this._openSchema=e;const n={};for(const e of Object.keys(t))n[e]=t[e]._default;this._default=n}sanitize(t){const e=t&&"object"==typeof t&&!Array.isArray(t)?t:{},n=A({},e);for(const t of Object.keys(this._shape))n[t]=this._shape[t].sanitize(e[t]);if(this._openSchema)for(const t of Object.keys(e))t in this._shape||(n[t]=this._openSchema.sanitize(e[t]));return n}isValid(t,e,n){if(!t||"object"!=typeof t||Array.isArray(t))return null==e||e.errors.push(rt(null!=n?n:[])+": expected object, got "+(Array.isArray(t)?"array":typeof t)),!1;const r=t,o=null!=n?n:[];let i=!0;for(const t of Object.keys(this._shape))o.push(t),this._shape[t].isValid(r[t],e,o)||(i=!1),o.pop();if(this._openSchema)for(const t of Object.keys(r))t in this._shape||(o.push(t),this._openSchema.isValid(r[t],e,o)||(i=!1),o.pop());return i}_canSanitize(t){return!!t&&"object"==typeof t&&!Array.isArray(t)}},pt=class extends ot{constructor(t){super(),this.item=t,this._default=[]}sanitize(t){if(!Array.isArray(t))return[];const e=[];for(const n of t)this.item._canSanitize(n)&&e.push(this.item.sanitize(n));return e}isValid(t,e,n){if(!Array.isArray(t))return null==e||e.errors.push(rt(null!=n?n:[])+": expected array, got "+typeof t),!1;const r=null!=n?n:[];let o=!0;for(let n=0;n<t.length;n++)r.push("["+n+"]"),this.item.isValid(t[n],e,r)||(o=!1),r.pop();return o}_canSanitize(t){return Array.isArray(t)}},vt=class extends ot{constructor(t){super(),this.value=t,this._kind="record",this._default={}}sanitize(t){if(!t||"object"!=typeof t||Array.isArray(t))return{};const e={};for(const[n,r]of Object.entries(t))this.value._canSanitize(r)&&(e[n]=this.value.sanitize(r));return e}isValid(t,e,n){if(!t||"object"!=typeof t||Array.isArray(t))return null==e||e.errors.push(rt(null!=n?n:[])+": expected object/record, got "+(Array.isArray(t)?"array":typeof t)),!1;const r=null!=n?n:[];let o=!0;for(const[n,i]of Object.entries(t))r.push(n),this.value.isValid(i,e,r)||(o=!1),r.pop();return o}_canSanitize(t){return!!t&&"object"==typeof t&&!Array.isArray(t)}},gt=class extends ot{constructor(){super(...arguments),this._default=void 0}sanitize(t){return t}isValid(t,e,n){return!0}_canSanitize(t){return!0}},yt=class extends ot{constructor(){super(...arguments),this._default=void 0}sanitize(t){return t}isValid(t,e,n){return void 0!==t||(null==e||e.errors.push(rt(null!=n?n:[])+": required value is missing"),!1)}_canSanitize(t){return void 0!==t}},bt=class extends ot{constructor(t,e){super(),this.fn=t,this._default=e,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,e,n){return this.schema.isValid(t,e,n)}_canSanitize(t){return this.schema._canSanitize(t)}},kt=class extends ot{constructor(t){super(),this.schemas=t,this._kind="tuple",this._default=t.map(t=>t._default)}sanitize(t){return Array.isArray(t)&&t.length===this.schemas.length?this.schemas.map((e,n)=>e.sanitize(t[n])):this._default}isValid(t,e,n){if(!Array.isArray(t)||t.length!==this.schemas.length)return null==e||e.errors.push(rt(null!=n?n:[])+": expected tuple of length "+this.schemas.length+", got "+(Array.isArray(t)?"array["+t.length+"]":typeof t)),!1;const r=null!=n?n:[];let o=!0;for(let n=0;n<this.schemas.length;n++)r.push("["+n+"]"),this.schemas[n].isValid(t[n],e,r)||(o=!1),r.pop();return o}_canSanitize(t){return Array.isArray(t)&&t.length===this.schemas.length}};function At(t){return Object.fromEntries(Object.keys(t._shape).map(t=>[t,t]))}function wt(t){var e;const n=t;switch(n._kind){case"union":return{kind:"union",members:n.schemas};case"discriminatedUnion":return{kind:"discriminatedUnion",key:n._key,members:n._schemas};case"record":return{kind:"record",value:n.value};case"tuple":return{kind:"tuple",items:n.schemas}}return"_shape"in n?{kind:"shape",shape:n._shape,openValue:n._openSchema}:"item"in n?{kind:"array",item:n.item}:"inner"in n?{kind:"optional",inner:n.inner}:"fn"in n?{kind:"lazy",resolved:null!=(e=n.resolved)?e:n.resolved=n.fn()}:{kind:"leaf"}}var xt={string:(t="")=>new at(t),number:(t=0)=>new st(t),boolean:(t=!1)=>new lt(t),literal:t=>new ut(t),enum:(t,e)=>new ct(t,e),union:(t,e)=>new ft(t,e),discriminatedUnion:(t,e)=>new dt(t,e),object:t=>new ht(t),openObject:(t,e)=>new mt(t,e),extendedObject:(t,e)=>new ht(A(A({},t._shape),e)),array:t=>new pt(t),record:t=>new vt(t),any:()=>new gt,defined:()=>new yt,tuple:t=>new kt(t),lazy:(t,e)=>new bt(t,e)},St="data-px-animation-src",jt="_px_animator",Pt={auto:"auto",waapi:"waapi",frames:"frames"},Ot={waapi:Pt.waapi,frames:Pt.frames},Mt={before:"before",after:"after"},_t="userSpaceOnUse",Et="objectBoundingBox",It={separate:"separate",combined:"combined"},zt="text",Tt="textContent",Nt=new Set(["type","children","animator","meta","animate","effects",zt,Tt]),Ct=["translate","rotate","scale","origin"],Ft={userSpaceOnUse:"userSpaceOnUse",objectBoundingBox:"objectBoundingBox"},Lt={pad:"pad",reflect:"reflect",repeat:"repeat"},Dt={linear:"linear",radial:"radial"};function Rt(t){return!(!t||"object"!=typeof t||Array.isArray(t))&&"svg"===t.type}function Bt(t){var e;const n=(null==t?void 0:t.animator)||(null==(e=null==t?void 0:t.meta)?void 0:e.animator);return n?function(t){const e=t.timeline;if(null==e||"object"!=typeof e)return t;const n=Ut.get(t);if(n)return n;const r=t,{timeline:o}=r,i=x(r,["timeline"]);if("scroll"===e.type||"view"===e.type){i.timelineSource="scroll",void 0!==e.duration&&(i.duration=e.duration),void 0!==e.iterations&&(i.iterations=e.iterations);const t=A({},i.scroll||{});t.kind=e.type,void 0!==e.engine&&(t.driver=e.engine),void 0!==e.axis&&(t.axis=e.axis),void 0!==e.source&&(t.source=e.source),void 0!==e.subject&&(t.subject=e.subject),void 0!==e.smoothing&&(t.smoothing=e.smoothing),void 0!==e.range&&(t.range=e.range);const n=e.pin;"boolean"==typeof n?t.pin=n:n&&"object"==typeof n&&(t.pin=!0,void 0!==n.align&&(t.pinAlign=n.align),void 0!==n.top&&(t.pinTop=n.top),void 0!==n.distance&&(t.pinDistance=n.distance)),i.scroll=t}else{if(void 0!==e.duration&&(i.duration=e.duration),void 0!==e.trigger){const t=e.trigger,{onFinish:n}=t,r=x(t,["onFinish"]);Object.keys(r).length&&(i.trigger=r),void 0!==n&&(i.resetOnFinish="reset"===n)}void 0!==e.delay&&(i.delay=e.delay),void 0!==e.iterations&&(i.iterations=e.iterations),void 0!==e.direction&&(i.direction=e.direction),void 0!==e.fill&&(i.fill=e.fill)}return Ut.set(t,i),i}(n):void 0}var Ut=new WeakMap;function Vt(t){var e;if(t)return null==(e=Bt(t))?void 0:e.definitions}function Wt(t){var e;if(!t)return;const n=null==(e=Bt(t))?void 0:e.animateById;return n?Object.entries(n).map(([t,e])=>({id:t.startsWith("#")?t.slice(1):t,animate:e})):void 0}function Gt(t){return null==t?void 0:t.children}var qt=xt.union([xt.string(),xt.tuple([xt.number(),xt.number(),xt.number(),xt.number()])]),Kt=xt.union([xt.string(),xt.number(),xt.array(xt.number()),xt.object({path:xt.string()}),xt.lazy(()=>xt.object({paths:xt.array(Le)}),{paths:[]}),xt.lazy(()=>xt.array(je),[]),xt.lazy(()=>Yt,{})]),Zt=xt.object({time:xt.number().optional(),value:Kt.optional(),easing:qt.optional(),tangentOut:xt.tuple([xt.number(),xt.number()]).optional(),tangentIn:xt.tuple([xt.number(),xt.number()]).optional()}),Xt=xt.object({segmentCount:xt.number().optional(),extend:xt.enum([Mt.before,Mt.after]).optional(),alternate:xt.boolean().optional()}),Ht=xt.object({value:Kt.optional(),keyframes:xt.array(Zt).optional(),loop:xt.union([Xt,xt.boolean()]).optional(),autoOrient:xt.boolean().optional()}),Yt=xt.object({translate:xt.tuple([xt.number(),xt.number()]).optional(),rotate:xt.number().optional(),skew:xt.number().optional(),scale:xt.tuple([xt.number(),xt.number()]).optional(),origin:xt.tuple([xt.number(),xt.number()]).optional()}),Qt=xt.union([xt.string(),Yt,xt.object({value:Yt}),Ht]),Jt=xt.record(Ht),$t=xt.union([xt.string(),xt.array(xt.union([xt.string(),Jt])),Jt]),te=xt.object({startOn:xt.enum(["load","mouseOver","click","scrollIntoView","programmatic"]).optional(),outAction:xt.enum(["continue","pause","reset","reverse"]).optional(),onFinish:xt.enum(["hold","reset"]).optional(),scrollIntoViewThreshold:xt.number().optional()}),ee=xt.object({width:xt.number(),d:xt.string()}),ne=xt.object({fontFamily:xt.string(),fontStyle:xt.string(),ascent:xt.number(),unitsPerEm:xt.number(),glyphs:xt.record(ee)}),re=xt.object({easings:xt.record(xt.tuple([xt.number(),xt.number(),xt.number(),xt.number()])).optional(),animations:xt.record(Jt).optional(),styles:xt.record(xt.record(xt.union([xt.string(),xt.number()]))).optional(),glyphs:xt.record(ne).optional()}),oe=xt.object({phase:xt.enum(["cover","contain","entry","exit","entry-crossing","exit-crossing"]).optional(),fraction:xt.number().optional()}),ie=xt.object({start:oe.optional(),end:oe.optional()}),ae=(xt.object({driver:xt.enum(["custom","native"]).optional(),kind:xt.enum(["view","scroll"]).optional(),axis:xt.enum(["block","inline","x","y"]).optional(),source:xt.enum(["nearest","root"]).optional(),subject:xt.string().optional(),smoothing:xt.number().optional(),pin:xt.boolean().optional(),pinAlign:xt.enum(["top","center","bottom"]).optional(),pinTop:xt.number().optional(),pinDistance:xt.number().optional(),range:ie.optional()}),xt.object({align:xt.enum(["top","center","bottom"]).optional(),top:xt.number().optional(),distance:xt.number().optional()})),se=xt.object({type:xt.literal("clock"),duration:xt.number().optional(),trigger:te.optional(),delay:xt.number().optional(),iterations:xt.union([xt.number(),xt.literal("infinite")]).optional(),fill:xt.enum(["forwards","backwards","both","none"]).optional(),direction:xt.enum(["normal","reverse","alternate","alternate-reverse"]).optional()}),le={duration:xt.number().optional(),iterations:xt.number().optional(),engine:xt.enum(["custom","native"]).optional(),axis:xt.enum(["block","inline","x","y"]).optional(),source:xt.enum(["nearest","root"]).optional(),subject:xt.string().optional(),smoothing:xt.number().optional(),pin:xt.union([xt.boolean(),ae]).optional(),range:ie.optional()},ue=xt.object(A({type:xt.literal("scroll")},le)),ce=xt.object(A({type:xt.literal("view")},le)),fe=xt.discriminatedUnion("type",[se,ue,ce]),de=xt.object({mode:xt.enum([Pt.auto,Pt.waapi,Pt.frames]).optional(),frameRate:xt.number().optional(),timeline:fe.optional(),definitions:re.optional(),animateById:xt.record($t).optional(),debugInstName:xt.string().optional()}),he=xt.object({id:xt.string(),animate:$t}),me=xt.union([xt.string(),xt.number(),xt.array(xt.number()),xt.object({value:xt.defined()}),Yt]),pe=xt.union([xt.number(),Ht,xt.object({value:xt.number()})]),ve=xt.union([xt.tuple([xt.number(),xt.number()]),Ht,xt.object({value:xt.tuple([xt.number(),xt.number()])})]),ge=xt.union([xt.string(),Ht,xt.object({value:xt.string()})]),ye=xt.object({translate:ve.optional(),rotate:pe.optional(),scale:ve.optional(),skew:pe.optional(),origin:ve.optional()}),be=xt.object({copies:xt.number().optional(),translate:ve.optional(),rotate:pe.optional(),skew:pe.optional(),scale:ve.optional(),origin:ve.optional()}),ke=xt.object({sourceId:xt.string().optional(),maskType:xt.enum(["luminance","alpha"]).optional(),maskUnits:xt.enum([_t,Et]).optional(),maskContentUnits:xt.enum([_t,Et]).optional(),x:xt.number().optional(),y:xt.number().optional(),width:xt.number().optional(),height:xt.number().optional()}),Ae=xt.object({d:ge.optional()}),we=xt.object({offset:pe.optional(),range:ve.optional(),subPaths:xt.enum([It.separate,It.combined]).optional()}),xe=xt.object({start:xt.number().optional(),stretch:xt.number().optional(),timeCrop:xt.tuple([xt.number(),xt.number()]).optional()}),Se=xt.object({type:xt.enum(["content"]).optional(),sourceId:xt.string().optional(),retime:xe.optional()}),je=xt.object({offset:xt.number(),color:xt.string()}),Pe=xt.union([xt.array(je),xt.object({value:xt.array(je)}),Ht]),Oe=xt.object({type:xt.enum([Dt.linear,Dt.radial]),start:ve.optional(),end:ve.optional(),center:ve.optional(),radius:pe.optional(),focal:ve.optional(),stops:Pe.optional(),gradientUnits:xt.enum([Ft.userSpaceOnUse,Ft.objectBoundingBox]).optional(),spreadMethod:xt.enum([Lt.pad,Lt.reflect,Lt.repeat]).optional(),gradientTransform:xt.string().optional()}),Me=Oe,_e=xt.object({path:xt.string(),pathOverflow:xt.enum(["clip","extend"]).optional(),lengthAdjust:xt.enum(["spacing","spacingAndGlyphs"]).optional(),method:xt.enum(["align","stretch"]).optional(),spacing:xt.enum(["auto","exact"]).optional(),startOffset:pe.optional(),textLength:pe.optional()}),Ee=xt.object({useGlyphs:xt.boolean().optional()}),Ie=xt.object({transformBy:ye.optional(),repeater:be.optional(),maskedBy:ke.optional(),clipPath:Ae.optional(),strokeTrim:we.optional(),clone:Se.optional(),fillGradient:Oe.optional(),strokeGradient:Me.optional(),textPath:_e.optional(),text:Ee.optional()});function ze(t,e){const n=[],r=(t,o)=>{if(t&&t.effects){const r={errors:[],warnings:[],strict:!!(null==e?void 0:e.strict)};if(!Ie.isValid(t.effects,r,[o+".effects"]))for(const t of r.errors)n.push(t)}t&&Array.isArray(t.children)&&t.children.forEach((t,e)=>r(t,o+".children["+e+"]"))};return r(t,"root"),n}var Te=xt.openObject({type:xt.string(),id:xt.string().optional(),meta:xt.any().optional(),effects:Ie.optional(),animate:$t.optional(),style:xt.union([xt.string(),xt.record(xt.union([xt.string(),xt.number()]))]).optional()},me),Ne=xt.openObject(w(A({},Te._shape),{children:xt.lazy(()=>xt.array(Ne),[]).optional()}),me),Ce=xt.object({width:xt.union([xt.number(),xt.string()]).optional(),height:xt.union([xt.number(),xt.string()]).optional(),viewBox:xt.string().optional(),animator:de.optional()}),Fe=xt.openObject(w(A(A({},Te._shape),Ce._shape),{type:xt.literal("svg"),children:xt.array(Ne).optional()}),me),Le=xt.object({v:xt.array(xt.array(xt.number())),i:xt.array(xt.array(xt.number())).optional(),o:xt.array(xt.array(xt.number())).optional(),c:xt.boolean().optional()});function De(t){const e=Fe.isValid(t);return{valid:e,errors:e?[]:["Document failed schema validation"]}}var Re=0;function Be(){return"_px_"+Date.now().toString(36)+(++Re).toString(36)+Math.random().toString(36).substring(2,6)}function Ue(t){if(null===t||"object"!=typeof t)return t;if(Array.isArray(t))return t.map(t=>Ue(t));const e=t,n={};for(const t of Object.keys(e))n[t]=Ue(e[t]);return n}function Ve(t){var e,n;const r=Ue(t),o=new Map,i=new Set(["href","xlink:href"]),a=new Set(["fill","stroke","clip-path","clipPath","mask","marker","marker-start","marker-mid","marker-end","filter","flood-color","lighting-color"]),s=new Set(["sourceId","targetId","boundElementId"]);!function t(e){if(e&&"object"==typeof e){if(e.id&&"string"==typeof e.id){const t=e.id,n=Be();o.set(t,n),e.id=n}else e.animate&&(e.id=Be());if(Array.isArray(e.children))for(const n of e.children)t(n)}}(r),function t(e){if(e&&"object"==typeof e)for(const[n,r]of Object.entries(e))if("children"!==n)if("string"==typeof r)if(i.has(n)&&r.startsWith("#")){const t=r.slice(1),i=o.get(t);i&&(e[n]="#"+i)}else if(a.has(n))e[n]=We(r,o);else if(s.has(n)){const t=r.startsWith("#"),i=o.get(t?r.slice(1):r);i&&(e[n]=t?"#"+i:i)}else r.includes("url(#")&&(e[n]=We(r,o));else if("style"===n&&"object"==typeof r&&null!==r)for(const[t,e]of Object.entries(r))"string"==typeof e&&(r[t]=We(e,o));else"object"==typeof r&&null!==r&&t(r);else if(Array.isArray(r))for(const e of r)t(e)}(r);const l=null==(e=r.animator)?void 0:e.animateById;if(l&&"object"==typeof l){const t={};for(const[e,r]of Object.entries(l)){const i=e.startsWith("#"),a=i?e.slice(1):e,s=null!=(n=o.get(a))?n:a;t[i?"#"+s:s]=r}r.animator=w(A({},r.animator),{animateById:t})}return r}function We(t,e){return t.replace(/url\(#([^)]+)\)/g,(t,n)=>{const r=e.get(n);return r?"url(#"+r+")":t})}var Ge=new Set(["script","foreignobject"]),qe=new Set(["href","xlink:href","src","filter","clippath","mask","markerstart","markermid","markerend"]),Ke=new Set(["href","xlink:href","src"]),Ze=new Set(["mixBlendMode","isolation"]),Xe=/^data:image\/(?:png|jpe?g|gif|webp|bmp);base64,/i,He=/^data:image\/svg\+xml(?:;[^,]*)?,/i,Ye=/^data:image\/[^;,]*;base64,([A-Za-z0-9+/]{8})/i,Qe=["iVBORw0K","/9j/","R0lGOD","UklGR","Qk"];function Je(t,e){const n=t.toLowerCase();if(!function(t){return!!t.startsWith("on")}(n)){if("fill"===n||"stroke"===n||"stopcolor"===n){const t=String(e);return t.includes("url(")&&!/^url\(#[^)]+\)$/.test(t)?void console.warn('Attribute "'+n+'" blocked: url() must be internal url(#id), got:',e):e}if(qe.has(n)){const t=String(e);return t.startsWith("#")||/^url\(#[^)]+\)$/.test(t)||Ke.has(n)&&(Xe.test(t)||He.test(t)||function(t){const e=Ye.exec(t);return!!e&&Qe.some(t=>e[1].startsWith(t))}(t))?e:void console.warn('Attribute "'+n+'" blocked: must be #id, url(#id), or data:image/… URI, got:',e)}return e}console.warn("Attribute blocked (event handler / dangerous): ",n)}function $e(t){const e={};for(const n of Object.keys(t)){const r=W(n);if(Nt.has(r))continue;if("style"===r)continue;let o=t[n];if(L.has(r)&&Array.isArray(o))e[r]=C(o);else if("transform"!==r||null===o||"object"!=typeof o||Array.isArray(o)||o.keyframes)D.has(r)?(Array.isArray(o)&&("translate"===r&&(o=o.map(t=>t+"px")),o=o.join(",")),"rotate"===r&&(o+="deg"),e.transform=r+"("+o+")"):Array.isArray(o)?e[r]=o.join(","):null!=o&&(e[r]=String(o));else{const t=o.value&&"object"==typeof o.value?o.value:o;e.transform=B(t,{withUnits:!1})}}return e}function tn(t){var e;const n=null!=(e=t.value)?e:t.v;if(!n)return;if(Array.isArray(n)&&n.length>=2&&"number"==typeof n[0]&&"number"==typeof n[1])return[n[0],n[1]];const r=n.translate;return Array.isArray(r)&&r.length>=2?[r[0],r[1]]:void 0}function en(t){var e,n;return null!=(n=null!=(e=t.time)?e:t.t)?n:0}function nn(t){var e;return null!=(e=t.easing)?e:t.e}function rn(t){var e,n;const r=t.keyframes;if(!Array.isArray(r))return!1;if(t.autoOrient)return!0;for(const t of r)if((null!=(e=t.tangentIn)?e:t.ti)||(null!=(n=t.tangentOut)?n:t.to))return!0;return!1}var on=new WeakMap;function an(t,e,n,r){var o,i;let a=on.get(t);const s=null==a?void 0:a.get(e);if(s)return s;const l=null!=(o=t.tangentOut)?o:t.to,u=null!=(i=e.tangentIn)?i:e.ti,c=[n[0]+(l?l[0]:0),n[1]+(l?l[1]:0)],f=[r[0]+(u?u[0]:0),r[1]+(u?u[1]:0)],d=J(n,c,f,r),h={P0:n,P1:c,P2:f,P3:r,lut:d,totalArc:d.ds[d.ds.length-1]};return a||(a=new WeakMap,on.set(t,a)),a.set(e,h),h}function sn(t,e,n,r,o,i){const a=an(t,e,n,r),s=0===a.totalArc?o:function(t,e){const n=e*t.ds[t.ds.length-1],{ts:r,ds:o}=t,i=o.length-1;if(n<=0)return r[0];if(n>=o[i])return r[i];let a=1,s=i;for(;a<s;){const t=a+s>>>1;o[t]<n?a=t+1:s=t}const l=o[s-1],u=o[s]-l,c=u>0?(n-l)/u:0;return r[s-1]+c*(r[s]-r[s-1])}(a.lut,o),l=X(a.P0,a.P1,a.P2,a.P3,s);if(!i)return{translate:l};const u=Y(a.P0,a.P1,a.P2,a.P3,s);return{translate:l,rotateDeg:180*Math.atan2(u[1],u[0])/Math.PI}}var ln=.5,un=5,cn=32;function fn(t,e){var n,r,o;if(!rn(t))return t;const i=t.keyframes;if(!Array.isArray(i)||i.length<2)return t;const a=!!t.autoOrient,s=null!=(n=null==e?void 0:e.flatnessTolerance)?n:ln,l=null!=(r=null==e?void 0:e.rotationTolerance)?r:un,u=null!=(o=null==e?void 0:e.maxSamplesPerSegment)?o:cn,c=[],f=tn(i[0]);if(!f)return t;const d=a?function(t,e){const n=tn(t),r=tn(e);if(!n||!r)return 0;const o=an(t,e,n,r),i=Y(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;c.push(hn(en(i[0]),vn(mn(i[0]),mn(i[0]),0,f,d,a)));for(let t=0;t<i.length-1;t++){const e=i[t],n=i[t+1],r=tn(e),o=tn(n);r&&o?(a&&t>0&&yn(c,e,n,r,o,l),kn(c,e,n,r,o,a,s,l,u)):c.push(hn(en(n),vn(mn(n),mn(n),1,null!=o?o:[0,0],void 0,a)))}const h=nn(i[i.length-1]);h&&(c[c.length-1].e=h),a&&dn(c);const m={keyframes:c};return void 0!==t.loop&&(m.loop=t.loop),m}function dn(t){var e;let n;for(const r of t){const t=null!=(e=r.v)?e:r.value;if(!t||"number"!=typeof t.rotate)continue;if(void 0===n){n=t.rotate;continue}let o=t.rotate;for(;o-n>180;)o-=360;for(;o-n<-180;)o+=360;t.rotate=o,n=o}}function hn(t,e){return{t:t,v:e}}function mn(t){var e;const n=null!=(e=t.value)?e:t.v;if(n&&"object"==typeof n&&!Array.isArray(n))return n}function pn(t,e,n){if(void 0===t)return e;if(void 0===e)return t;if("number"==typeof t&&"number"==typeof e)return t+(e-t)*n;if(Array.isArray(t)&&Array.isArray(e)&&t.length===e.length){const r=new Array(t.length);for(let o=0;o<t.length;o++){const i="number"==typeof t[o]?t[o]:0,a="number"==typeof e[o]?e[o]:0;r[o]=i+(a-i)*n}return r}return n<.5?t:e}function vn(t,e,n,r,o,i){const a={translate:r},s=new Set;if(t)for(const e of Object.keys(t))s.add(e);if(e)for(const t of Object.keys(e))s.add(t);for(const r of s){if("translate"===r)continue;if("rotate"===r&&i)continue;const o=null==t?void 0:t[r],s=null==e?void 0:e[r];void 0===o&&void 0===s||(a[r]=pn(o,s,n))}return void 0!==o&&(a.rotate=o+gn(t,e,n)),a}function gn(t,e,n){const r="number"==typeof(null==t?void 0:t.rotate)?t.rotate:void 0,o="number"==typeof(null==e?void 0:e.rotate)?e.rotate:void 0;if(void 0===r&&void 0===o)return 0;const i=pn(r,o,n);return"number"==typeof i?i:0}function yn(t,e,n,r,o,i){var a;const s=t[t.length-1],l=null!=(a=s.v)?a:s.value,u=null==l?void 0:l.rotate;if("number"!=typeof u)return;const c=mn(e),f=u-gn(c,c,0),d=an(e,n,r,o),h=Y(d.P0,d.P1,d.P2,d.P3,0),m=180*Math.atan2(h[1],h[0])/Math.PI,p=function(t,e){let n=t-e;for(;n>180;)n-=360;for(;n<-180;)n+=360;return n}(m,f);if(Math.abs(p)<=i)return;const v=en(e),g=Math.min(v+bn,(v+en(n))/2),y=vn(mn(e),mn(e),0,r,m,!0);t.push(hn(g,y))}var bn=.05;function kn(t,e,n,r,o,i,a,s,l){const u=an(e,n,r,o),c=en(e),f=en(n),d=nn(e),h=(m=d)?I([m[1],m[0],m[3],m[2]]):t=>t;var m;const p=mn(e),v=mn(n),g=function(t,e,n,r,o){const i=[];An(t.P0[0],t.P1[0],t.P2[0],t.P3[0],i),An(t.P0[1],t.P1[1],t.P2[1],t.P3[1],i),i.sort((t,e)=>t-e);const a=[0];for(const t of i)t>a[a.length-1]+1e-6&&t<.999999&&a.push(t);a.push(1);const s=[],l={remaining:o-a.length};for(let o=0;o<a.length-1;o++)wn(a[o],a[o+1],s,t,e,n,r,l);return s}(u,i,a,s,l),y=[];for(const t of g){const e=$(u.lut,t),n=Z(u.totalArc>0?e/u.totalArc:t,0,1),r={u:Z(h(n),0,1),p:n,pos:X(u.P0,u.P1,u.P2,u.P3,t)};if(i){const e=Y(u.P0,u.P1,u.P2,u.P3,t);r.rotateDeg=180*Math.atan2(e[1],e[0])/Math.PI}y.push(r)}let b=d,k=0;const A=t.length-1;for(let e=0;e<y.length;e++){const n=y[e],r=k<1?Z((n.u-k)/(1-k),0,1):1,{left:o,right:a}=T(b,r),s=0===e?A:t.length-1;o?t[s].e=o:delete t[s].e;const l=c+n.u*(f-c),u=vn(p,v,n.p,n.pos,n.rotateDeg,i);t.push(hn(l,u)),b=a,k=n.u}}function An(t,e,n,r,o){const i=e-t,a=n-e,s=i-2*a+(r-n),l=2*(a-i),u=i;if(Math.abs(s)<1e-10){if(Math.abs(l)>1e-10){const t=-u/l;t>1e-6&&t<.999999&&o.push(t)}return}const c=l*l-4*s*u;if(c<0)return;const f=Math.sqrt(c),d=(-l-f)/(2*s),h=(-l+f)/(2*s);d>1e-6&&d<.999999&&o.push(d),h>1e-6&&h<.999999&&o.push(h)}function wn(t,e,n,r,o,i,a,s){const l=(t+e)/2,u=X(r.P0,r.P1,r.P2,r.P3,t),c=X(r.P0,r.P1,r.P2,r.P3,e),f=e-t,d=X(r.P0,r.P1,r.P2,r.P3,t+.25*f),h=X(r.P0,r.P1,r.P2,r.P3,l),m=X(r.P0,r.P1,r.P2,r.P3,t+.75*f),p=Math.max(xn(d,u,c),xn(h,u,c),xn(m,u,c));let v=!0;if(o){const n=Y(r.P0,r.P1,r.P2,r.P3,t),o=Y(r.P0,r.P1,r.P2,r.P3,e),i=180*Math.atan2(n[1],n[0])/Math.PI,s=180*Math.atan2(o[1],o[0])/Math.PI;let l=Math.abs(i-s);l>180&&(l=360-l),l>a&&(v=!1)}p<=i&&v||s.remaining<=0||f<1e-6?n.push(e):(s.remaining-=1,wn(t,l,n,r,o,i,a,s),wn(l,e,n,r,o,i,a,s))}function xn(t,e,n){const r=n[0]-e[0],o=n[1]-e[1],i=r*r+o*o;if(i<1e-20){const n=t[0]-e[0],r=t[1]-e[1];return Math.sqrt(n*n+r*r)}const a=(t[0]-e[0])*o-(t[1]-e[1])*r;return Math.abs(a)/Math.sqrt(i)}function Sn(t,e){const n=jn(t,e);return null!=n?n:t}function jn(t,e){let n,r;if(t.children)for(let r=0;r<t.children.length;r++){const o=jn(t.children[r],e);null!==o&&(n||(n=t.children.slice()),n[r]=o)}const o=t.animate;if(o&&"object"==typeof o&&!Array.isArray(o)){const t=o,n=t.transform;if(n&&"object"==typeof n&&rn(n)){const o=fn(n,e);o!==n&&(r=w(A({},t),{transform:o}))}}if(!n&&!r)return null;const i=A({},t);return n&&(i.children=n),r&&(i.animate=r),i}var Pn=1;function On(t,e){if(t===e)return!0;if(typeof t!=typeof e||null===t||null===e||"object"!=typeof t)return!1;if(Array.isArray(t)!==Array.isArray(e))return!1;const n=Object.keys(t),r=Object.keys(e);return n.length===r.length&&n.every(n=>On(t[n],e[n]))}function Mn(t){const e=[];let n;const r=function(t){const e=t.split(/([MLCZmlcz]|[\s,]+)/).map(t=>t.trim()).filter(t=>t&&","!==t),n=[];let r=null;for(const t of e)if(/[MLCZmlcz]/.test(t))r={type:t,values:[]},n.push(r);else if(r){const e=+t;r.values.push(Number.isNaN(e)?0:e)}return n}(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;n={v:[[t,r]],i:[[t,r]],o:[[t,r]],c:!1},e.push(n);continue}if(n||(n={v:[[0,0]],i:[[0,0]],o:[[0,0]],c:!1},e.push(n)),"L"===r){const t=o[0]||0,e=o[1]||0;n.v.push([t,e]),n.i.push([t,e]),n.o.push([t,e])}else if("C"===r){const t=o[0]||0,e=o[1]||0,r=o[2]||0,i=o[3]||0,a=o[4]||0,s=o[5]||0;n.o[n.o.length-1]=[t,e],n.v.push([a,s]),n.i.push([r,i]),n.o.push([a,s])}else"Z"===r||"z"===r?n.c=!0:console.warn('Unsupported path command "'+r+'"')}return e}function _n(t){return t.startsWith("path(")&&t.endsWith(")")?t.slice(5,-1):/^[MmZzLlHhVvCcSsQqTtAa]/.test(t)?t:void 0}function En(t){return"string"==typeof t&&void 0!==_n(t)}function In(t){if(t&&"object"==typeof t&&"string"==typeof t.path){const e=_n(t.path);return e?{paths:Mn(e)}:t}if(t&&"object"==typeof t&&"paths"in t){const e=t.paths;if(Array.isArray(e)&&e.length>0&&En(e[0])){const t=[];for(const n of e){const e=_n(n);e&&t.push(...Mn(e))}return{paths:t}}return t}if(Array.isArray(t)){if(t.length>0&&En(t[0])){const e=[];for(const n of t){const t=_n(n);t&&e.push(...Mn(t))}return{paths:e}}return{paths:t}}return En(t)?{paths:Mn(_n(t))}:t}function zn(t,e){var n;if(t)return Array.isArray(t)?t:(null==(n=null==e?void 0:e.easings)?void 0:n[t])?e.easings[t]:void console.warn("Unknown easing name: "+t)}function Tn(t,e){var n;if("string"==typeof t){const r=null==(n=null==e?void 0:e.animations)?void 0:n[t];return r||console.warn("Unknown animation name: "+t),r}return t}function Nn(t,e,n,r){var o,i;return"d"===t?{paths:M(null!=(o=null==e?void 0:e.paths)?o:Array.isArray(e)?e:[],null!=(i=null==n?void 0:n.paths)?i:Array.isArray(n)?n:[],r)}:L.has(t)?O(e||[0,0,0,1],n||[0,0,0,1],r):"transform"!==t||"object"!=typeof e||null===e||Array.isArray(e)||"object"!=typeof n||null===n||Array.isArray(n)?"rotate"===t&&"number"==typeof e&&"number"==typeof n?j(e,n,r):D.has(t)||"stroke-dasharray"===t||"strokeDasharray"===t?P(e||[],n||[],r):j(+(e||0),+(n||0),r):function(t,e,n){const r=new Set([...Object.keys(null!=t?t:{}),...Object.keys(null!=e?e:{})]),o={};for(const i of r){const r=null==t?void 0:t[i],a=null==e?void 0:e[i];if("rotate"===i||"skew"===i)o[i]=j(+(null!=r?r:0),+(null!=a?a:0),n);else if("translate"===i||"scale"===i||"origin"===i){const t="scale"===i?[1,1]:[0,0];o[i]=P(r||t,a||t,n)}else o[i]=null!=a?a:r}return o}(e,n,r)}function Cn(t,e,n,r){var o,i,a,s,l;const u=e.length-1,c=Z(null!=(o=n.segmentCount)?o:u,1,u);let f;f=n.extend===Mt.before?e.slice(0,c+1):e.slice(u-c);const d=null!=(i=e[0].t)?i:0,h=null!=(a=e[e.length-1].t)?a:0;let m,p;n.extend===Mt.before?(m=0,p=d):(m=h,p=r);const v=p-m;if(v<=0)return e;const g=null!=(s=f[0].t)?s:0,y=(null!=(l=f[f.length-1].t)?l:0)-g;if(y<=0)return e;const b=f.map(t=>{var e,n;return{relT:(t.t-g)/y,v:t.v,e:t.e,tangentIn:null!=(e=t.tangentIn)?e:t.ti,tangentOut:null!=(n=t.tangentOut)?n:t.to}}),k=Math.floor(v/y),x=v-k*y,S=x/y,j=[],P=n.extend!==Mt.before,O=e[e.length-1];let M,_=!1;function E(e,n,r){var o;let i;if(n){i=[];for(let t=b.length-1;t>=0;t--)i.push({relT:1-b[t].relT,v:b[t].v,e:t>0?N(b[t-1].e):void 0,tangentIn:b[t].tangentOut,tangentOut:b[t].tangentIn})}else i=b;const a=void 0!==r?r:1;for(let n=0;n<i.length;n++){const r=i[n];if(r.relT>a+1e-9){const o=i[n-1],s=r.relT-o.relT,l=(a-o.relT)/s,u=o.e?I(o.e)(l):l,c=Nn(t,o.v,r.v,u),{left:f}=T(o.e,l);return j.length>0&&o.relT<=a&&(j[j.length-1].e=f),void j.push({t:e+a*y,v:c,e:void 0})}const s=j.length>0?j[j.length-1]:O,l=P&&0===n&&void 0!==s&&Math.abs((null!=(o=s.t)?o:0)-(e+r.relT*y))<1e-9;if(l){if(On(s.v,r.v)){j.length>0?(s.e=r.e,s.tangentOut=r.tangentOut):(M=r.e,_=!0);continue}j.length>0&&(delete s.tangentIn,delete s.tangentOut)}const u={t:e+r.relT*y+(l?Pn:0),v:r.v,e:n<i.length-1?r.e:void 0};r.tangentIn&&(u.tangentIn=r.tangentIn),r.tangentOut&&(u.tangentOut=r.tangentOut),j.push(u)}}if(n.extend===Mt.before){S>1e-9&&function(e,n,r){let o;if(n){o=[];for(let t=b.length-1;t>=0;t--)o.push({relT:1-b[t].relT,v:b[t].v,e:t>0?N(b[t-1].e):void 0,tangentIn:b[t].tangentOut,tangentOut:b[t].tangentIn})}else o=b;const i=1-r;for(let n=0;n<o.length;n++){const r=o[n];if(r.relT<i-1e-9)continue;const a=o[n-1];if(a&&a.relT<i-1e-9&&r.relT>i+1e-9){const n=r.relT-a.relT,o=(i-a.relT)/n,s=a.e?I(a.e)(o):o,l=Nn(t,a.v,r.v,s),{right:u}=T(a.e,o);j.push({t:e,v:l,e:u})}const s={t:e+(r.relT-i)*y,v:r.v,e:n<o.length-1?r.e:void 0};r.tangentIn&&(s.tangentIn=r.tangentIn),r.tangentOut&&(s.tangentOut=r.tangentOut),j.push(s)}}(m,!!n.alternate&&k%2==0,S);for(let t=0;t<k;t++){const e=k-1-t,r=!!n.alternate&&e%2==0;E(m+x+t*y,r)}}else{for(let t=0;t<k;t++){const e=!!n.alternate&&t%2==0;E(m+t*y,e)}if(S>1e-9){const t=!!n.alternate&&k%2==0;E(m+k*y,t,S)}}return n.extend===Mt.before?[...j,...e]:_&&e.length>0?[...e.slice(0,-1),w(A({},e[e.length-1]),{e:M}),...j]:[...e,...j]}function Fn(t,e,n,r){var o,i,a,s,l,u,c;const f=e.keyframes||[],d=[];for(const e of f){const n=null!=(i=null!=(o=e.time)?o:e.t)?i:0;let f=null!=(a=e.value)?a:e.v;const h=null!=(s=e.easing)?s:e.e;"d"===t&&(f=In(f));const m=G(t)?K(t):t;L.has(m)&&(f=null!=(l=F(f))?l:f);const p={t:n,v:f,e:zn(h,r)},v=null!=(u=e.tangentIn)?u:e.ti,g=null!=(c=e.tangentOut)?c:e.to;v&&(p.tangentIn=v),g&&(p.tangentOut=g),d.push(p)}d.sort((t,e)=>{var n,r;return(null!=(n=t.t)?n:0)-(null!=(r=e.t)?r:0)});const h=e.loop,m=!0===h?{}:h||void 0;return m&&d.length>=2?Cn(t,d,m,n):d}function Ln(t,e,n){const r=e.loop;if(null==r||!1===r)return e;const o=!0===r?{}:r,i=e.keyframes;if(!Array.isArray(i)||i.length<2)return e;const a=G(t)?K(t):t,s=L.has(a),l=i.map(e=>{var n,r,o,i,a,l,u,c;const f=null!=(n=e.t)?n:e.time;let d=null!=(r=e.v)?r:e.value;"d"===t&&(d=In(d)),s&&(d=null!=(o=F(d))?o:d);const h={t:f,v:d,e:null!=(i=e.e)?i:e.easing};return(null!=(a=e.tangentIn)?a:e.ti)&&(h.tangentIn=null!=(l=e.tangentIn)?l:e.ti),(null!=(u=e.tangentOut)?u:e.to)&&(h.tangentOut=null!=(c=e.tangentOut)?c:e.to),h}),u={keyframes:Cn(t,l,o,n)};return void 0!==e.autoOrient&&(u.autoOrient=e.autoOrient),u}function Dn(t,e){const n=Rn(t,e);return null!=n?n:t}function Rn(t,e){let n,r;if(t.children)for(let r=0;r<t.children.length;r++){const o=Rn(t.children[r],e);null!==o&&(n||(n=t.children.slice()),n[r]=o)}const o=t.animate;if(o&&"object"==typeof o&&!Array.isArray(o)){const t=o;for(const n of Object.keys(t)){const o=t[n],i=Ln(n,o,e);i!==o&&(r||(r=A({},t)),r[n]=i)}}if(!n&&!r)return null;const i=A({},t);return n&&(i.children=n),r&&(i.animate=r),i}var Bn=0;function Un(t,e=Ot.waapi){const n=Bt(t)||{},r=Vt(t),o=n.duration||1e3,i=[],a=(t,n,i)=>{if(!n)return null;const a=function(t,e){if(!t)return[];const n=[];if("string"==typeof t){const r=Tn(t,e);r&&n.push(r)}else if(Array.isArray(t))for(const r of t){const t=Tn(r,e);t&&n.push(t)}else n.push(t);return n}(n,r);if(0===a.length)return null;const s=function(t,e,n,r=Ot.waapi){const o={};for(const[i,a]of Object.entries(t)){if("transform"===i&&"offsetPath"===a.alongPathMode&&void 0!==t.offsetDistance)continue;const s=Fn(i,a,e,n);if(s.length>0){const t={keyframes:s};void 0!==a.autoOrient&&(t.autoOrient=a.autoOrient),void 0!==a.loop&&(t.loop=a.loop),o[i]=r===Ot.waapi&&"transform"===i?fn(t):t}}return o}(function(t,e){if(!t)return t;const n=e&&"object"==typeof e&&!Array.isArray(e)?e:function(t){var e,n;if(!t||"string"!=typeof t)return;const r={},o=/([a-zA-Z]+)\s*\(([^)]*)\)/g,i=["translate","rotate","skewX","scale"];let a,s=-1;for(;null!==(a=o.exec(t));){const t=a[1],o=i.indexOf(t);if(o<0||o<=s)return;s=o;const l=a[2].split(/[\s,]+/).filter(Boolean).map(Number);if(l.some(t=>Number.isNaN(t)))return;if("translate"===t){if(l.length<1||l.length>2)return;r.translate=[l[0],null!=(e=l[1])?e:0]}else if("rotate"===t){if(1!==l.length)return;r.rotate=l[0]}else if("skewX"===t){if(1!==l.length)return;r.skew=l[0]}else{if(l.length<1||l.length>2)return;r.scale=[l[0],null!=(n=l[1])?n:l[0]]}}return t.replace(/([a-zA-Z]+)\s*\(([^)]*)\)/g,"").replace(/[\s,]/g,"").length?void 0:Object.keys(r).length?r:void 0}(e);if(!n||!Object.keys(n).length)return t;const r=t=>t&&"object"==typeof t&&!Array.isArray(t)?A(A({},n),t):t,o=t.transform;if(o&&"object"==typeof o){const e=o;if(Array.isArray(e.keyframes)){const n=w(A({},e),{keyframes:e.keyframes.map(t=>w(A({},t),{value:r(t.value)}))});return void 0!==n.value&&(n.value=r(n.value)),w(A({},t),{transform:n})}return t}const i=Object.keys(t).filter(t=>D.has(t));if(1!==i.length)return t;const a=i[0],s=t[a];if(!s||"object"!=typeof s||!Array.isArray(s.keyframes))return t;const l=w(A({},s),{keyframes:s.keyframes.map(t=>w(A({},t),{value:w(A({},n),{[a]:t.value})}))});void 0!==l.value&&(l.value=w(A({},n),{[a]:l.value}));const u=A({},t);return delete u[a],w(A({},u),{transform:l})}(function(t){const e={};for(const n of t)for(const[t,r]of Object.entries(n))e[t]=r;return e}(a),i),o,r,e);return 0===Object.keys(s).length?null:{id:t,animate:s}},s=Wt(t);if(s)for(const t of s){const e=a(t.id,t.animate);e&&i.push(e)}const l=t=>{const e=t.animate;if(e&&Object.keys(e).length>0){const n=t.id||"_px_el_"+ ++Bn;t.id=n;const r=a(n,e,t.transform);r&&i.push(r)}if(t.children)for(let e=0;e<t.children.length;e++)l(t.children[e])};if(t.children)for(let e=0;e<t.children.length;e++)l(t.children[e]);return i}function Vn(t,e,n){var r,o,i,a,s,l,u;const c=e.keyframes||[];if(0===c.length)return null;const{prevKf:f,nextKf:d}=function(t,e){var n,r;const o=t.length-1;let i=t[0],a=t[o>0?1:0];for(let s=0;s<o;s++){const l=null!=(n=t[s].t)?n:0,u=null!=(r=t[s+1].t)?r:0;if(l<=e&&e<=u){i=t[s],a=t[s+1];break}e>u&&s===o-1&&(i=t[o>0?o-1:0],a=t[o])}return{prevKf:i,nextKf:a}}(c,n);let h=f===d?0:(m=n,p=null!=(r=f.t)?r:0,(v=null!=(o=d.t)?o:0)===p?0:0+(m-p)/(v-p)*1);var m,p,v;h=Z(h,0,1);const g=null!=(i=f.e)?i:f.easing;if(g&&Array.isArray(g))try{h=I(g)(h)}catch(t){}let y=G(t)?K(t):t,b=null;const k=null!=(a=null==f?void 0:f.v)?a:null==f?void 0:f.value,A=null!=(s=null==d?void 0:d.v)?s:null==d?void 0:d.value;if("d"===y)b=M(null!=(l=null==k?void 0:k.paths)?l:Array.isArray(k)?k:[],null!=(u=null==A?void 0:A.paths)?u:Array.isArray(A)?A:[],h).map(t=>S(t)).join("");else if(L.has(y))b=C(O(k||[0,0,0,1],A||[0,0,0,1],h)),y=t;else if("stroke-dasharray"===y)b=P(k||[],A||[],h).join(" "),y=t;else if("transform"!==y||null===k||"object"!=typeof k||Array.isArray(k))"translate"===y?(b="translate("+P(k||[0,0],A||[0,0],h).join(",")+")",y="transform"):"rotate"===y?(b="rotate("+j(+(k||0),+(A||0),h)+")",y="transform"):"scale"===y?(b="scale("+P(k||[1,1],A||[1,1],h).join(",")+")",y="transform"):b=j(+(k||0),+(A||0),h);else{const t=new Set([...k?Object.keys(k):[],...A?Object.keys(A):[]]),n={};for(const e of t){const t=null==k?void 0:k[e],r=null==A?void 0:A[e];if("rotate"===e||"skew"===e)n[e]=j(+(null!=t?t:0),+(null!=r?r:0),h);else if("translate"===e||"scale"===e||"origin"===e){const o="scale"===e?[1,1]:[0,0],i=P(t||o,r||o,h);n[e]=i}}if(rn(e)){const t=k.translate,r=A.translate;if(Array.isArray(t)&&Array.isArray(r)){const o=sn(f,d,[+t[0],+t[1]],[+r[0],+r[1]],h,!!e.autoOrient);n.translate=[o.translate[0],o.translate[1]],void 0!==o.rotateDeg&&(n.rotate=o.rotateDeg)}}b=B(n,{withUnits:!1}),y="transform"}return R.has(y)&&"number"==typeof b&&(b=100*b+"%"),{k:y,v:null===b?"":""+b}}function Wn(t,e){const n={};for(const[r,o]of Object.entries(t)){const t=Vn(r,o,e);t&&(n[t.k]=t.v)}return n}function Gn(t){if(null===t||"object"!=typeof t)return t;if(Array.isArray(t))return t.map(Gn);const e={};for(const n of Object.keys(t))e[n]=Gn(t[n]);return e}function qn(t,e){const n=new Map,r=t=>{var o;if("string"==typeof t.id){const r=e();n.set(t.id,r),t.id=r}null==(o=t.children)||o.forEach(r)};r(t);const o=t=>t.replace(/url\(#([^)]+)\)/g,(t,e)=>{const r=n.get(e);return r?"url(#"+r+")":t}),i=t=>{var e;if("string"==typeof t.href&&t.href.startsWith("#")){const e=n.get(t.href.slice(1));e&&(t.href="#"+e)}for(const e of Object.keys(t)){if("children"===e||"effects"===e||"meta"===e||"animate"===e||"href"===e||"id"===e)continue;const n=t[e];"string"==typeof n&&-1!==n.indexOf("url(#")&&(t[e]=o(n))}null==(e=t.children)||e.forEach(i)};return i(t),n}function Kn(t){const e="number"==typeof t?t:"string"==typeof t?parseFloat(t):NaN;return Number.isFinite(e)?e:0}function Zn(t){var e;const n=Kn(t.x),r=Kn(t.y);if(delete t.x,delete t.y,!n&&!r)return t;const o="translate("+n+","+r+")";if(void 0!==t.transform||void 0!==t.animate){const n={type:"g",transform:o,children:null!=(e=t.children)?e:[]};t.children=[n]}else t.transform=o;return t}function Xn(t){var e;const n=function(t){const e=new Map,n=t=>{var r;"string"==typeof t.id&&e.set(t.id,t),null==(r=t.children)||r.forEach(n)};return n(t),e}(t),r=function(t,e){const n=new WeakMap,r=new Set,o=(t,r)=>{const i=n.get(t);if(void 0!==i)return i;if(r.has(t))return!1;r.add(t);let a=!1;if(t.animate&&"object"==typeof t.animate&&!Array.isArray(t.animate))for(const e in t.animate){a=!0;break}if(!a&&t.children)for(const e of t.children)if(o(e,r)){a=!0;break}if(!a&&"use"===t.type&&"string"==typeof t.href){const n=Yn(t.href),i=n?e.get(n):void 0;i&&(a=o(i,r))}return r.delete(t),n.set(t,a),a};for(const[t,n]of e)o(n,new Set)&&r.add(t);return r}(0,n);if(0===r.size)return t;let o=0;const i=function(t){const e=Qn(t.viewBox);if(e)return[e[2],e[3]];const n=Hn(t.width),r=Hn(t.height);return void 0!==n&&void 0!==r?[n,r]:[1,1]}(t),a=[],s=Jn(t,n,r,()=>"_lw_use_mat_"+ ++o,a,i);if(0===a.length)return s;const l={type:"defs",children:a},u=[...null!=(e=s.children)?e:[],l];return w(A({},s),{children:u})}function Hn(t){if("number"==typeof t)return t;if("string"==typeof t){const e=parseFloat(t);return Number.isFinite(e)?e:void 0}}function Yn(t){if("string"==typeof t)return t.startsWith("#")?t.slice(1):t}function Qn(t){if("string"!=typeof t)return;const e=t.trim().split(/[\s,]+/).map(Number);return e.length<4||e.some(t=>!Number.isFinite(t))?void 0:[e[0],e[1],e[2],e[3]]}function Jn(t,e,n,r,o,i){if("use"===t.type&&"string"==typeof t.href){const a=Yn(t.href);if(a&&n.has(a)){const s=e.get(a);if(s)return function(t,e,n,r,o,i,a){var s,l,u,c;const f=Gn(e);qn(f,o);const d="symbol"===f.type?Qn(f.viewBox):void 0,h=null!=(l=null!=(s=Hn(t.width))?s:null==d?void 0:d[2])?l:a[0],m=null!=(c=null!=(u=Hn(t.height))?u:null==d?void 0:d[3])?c:a[1],p="symbol"===f.type?function(t,e,n,r,o){const i=Qn(t.viewBox),a=w(A({},t),{type:"g"});if(delete a.viewBox,delete a.preserveAspectRatio,delete a.width,delete a.height,!i)return a;const[s,l,u,c]=i,f=u>0&&c>0?Math.min(r/u,o/c):1,d=(r-u*f)/2,h=(o-c*f)/2,m=[];0===d&&0===h||m.push("translate("+d+","+h+")"),1!==f&&m.push("scale("+f+")"),0===s&&0===l||m.push("translate("+-s+","+-l+")"),m.length&&(a.transform=m.join(""));const p=e();return n.push({type:"clipPath",id:p,children:[{type:"rect",x:s,y:l,width:u,height:c}]}),a.clipPath="url(#"+p+")",a}(f,o,i,h,m):f,v=Jn(p,n,r,o,i,a),g=w(A({},t),{type:"g",children:[v]});return delete g.href,delete g.width,delete g.height,Zn(g)}(t,s,e,n,r,o,i)}}if(!t.children)return t;let a=!1;const s=t.children.map(t=>{const s=Jn(t,e,n,r,o,i);return s!==t&&(a=!0),s});return a?w(A({},t),{children:s}):t}function $n(t,e,n){const r={};return"translate"===t?r.translate=e:"rotate"===t?r.rotate=e:"skew"===t?r.skew=e:r.scale=e,n&&"translate"!==t&&(r.origin=n),r}function tr(t){var e,n,r;if(void 0===t)return{kind:"absent"};if(Array.isArray(t))return{kind:"static",value:t};if("object"==typeof t){const o=t,i=null!=(e=o.keyframes)?e:o.kfs;if(i){const t={kind:"animated",keyframes:i.map(nr),autoOrient:o.autoOrient,loop:o.loop},e=null!=(n=o.value)?n:o.v;return void 0!==e&&"animated"===t.kind&&(t.base=e),t}const a=null!=(r=o.value)?r:o.v;if(void 0!==a)return{kind:"static",value:a}}return{kind:"static",value:t}}function er(t,e,n,r){var o,i,a,s;const l=t=>(null==r?void 0:r.asString)&&null!=t?String(t):t;if("absent"===n.kind)return;if("static"===n.kind)return void(t[e]=l(n.value));const u=t.animate&&"object"==typeof t.animate&&!Array.isArray(t.animate)?t.animate:void 0,c=A({},u||{}),f={keyframes:n.keyframes};void 0!==n.loop&&(f.loop=n.loop),void 0!==n.autoOrient&&(f.autoOrient=n.autoOrient),c[e]=f,t.animate=c;const d=null!=(s=null!=(i=n.base)?i:null==(o=n.keyframes[0])?void 0:o.value)?s:null==(a=n.keyframes[0])?void 0:a.v;void 0!==d&&(t[e]=l(d))}function nr(t){if(!t||"object"!=typeof t)return t;const e=t;if(void 0===e.t&&void 0===e.v&&void 0===e.e&&void 0===e.to&&void 0===e.ti)return t;const n=A({},e);return void 0===n.time&&void 0!==e.t&&(n.time=e.t),void 0===n.value&&void 0!==e.v&&(n.value=e.v),void 0===n.easing&&void 0!==e.e&&(n.easing=e.e),void 0===n.tangentOut&&void 0!==e.to&&(n.tangentOut=e.to),void 0===n.tangentIn&&void 0!==e.ti&&(n.tangentIn=e.ti),n}function rr(t,e){const n={value:e};return void 0!==t.time&&(n.time=t.time),void 0!==t.easing&&(n.easing=t.easing),void 0!==t.tangentOut&&(n.tangentOut=t.tangentOut),void 0!==t.tangentIn&&(n.tangentIn=t.tangentIn),n}function or(t,e,n){if(!e)return t;delete t.transform;let r=t;return r=ar(r,e.origin,!0),r=ir(r,"scale",e.scale),r=ir(r,"skew",e.skew),r=ir(r,"rotate",e.rotate),r=ar(r,e.origin,!1),function(t){if(!t||"object"!=typeof t)return!1;const e=t;return!!e.autoOrient||Array.isArray(e.keyframes)&&e.keyframes.some(t=>t.tangentOut||t.tangentIn)}(e.translate)?(r=ar(r,e.origin,!0),r=ir(r,"translate",e.translate),r=ar(r,e.origin,!1)):r=ir(r,"translate",e.translate),r!==t&&t.id&&(r.id=t.id,delete t.id),r}function ir(t,e,n,r){if(void 0===n)return t;const o=tr(n);if("static"===o.kind)return{type:"g",transform:{value:$n(e,o.value,void 0)},children:[t]};if("animated"===o.kind){const n={keyframes:o.keyframes.map(t=>rr(t,$n(e,t.value,void 0)))};return o.autoOrient&&(n.autoOrient=!0),void 0!==o.loop&&(n.loop=o.loop),{type:"g",animate:{transform:n},children:[t]}}return t}function ar(t,e,n){if(void 0===e)return t;const r=tr(e),o=t=>n?[-t[0],-t[1]]:t;if("absent"===r.kind)return t;if("static"===r.kind)return 0===r.value[0]&&0===r.value[1]?t:{type:"g",transform:{value:{translate:o(r.value)}},children:[t]};if("animated"===r.kind){const e={keyframes:r.keyframes.map(t=>rr(t,{translate:o(t.value)}))};return void 0!==r.loop&&(e.loop=r.loop),{type:"g",animate:{transform:e},children:[t]}}return t}function sr(t,e){return"_lw_"+e+"_"+t.nextId++}function lr(t){return"string"==typeof t?t.replace(/^#/,""):void 0}function ur(t,e){var n;"string"==typeof t.id&&e.set(t.id,t),null==(n=t.children)||n.forEach(t=>ur(t,e))}var cr=Gn;function fr(t,e,n){var r,o,i;if("use"===t.type&&"content"===(null==(o=null==(r=t.effects)?void 0:r.clone)?void 0:o.type)){const r=lr(t.effects.clone.sourceId);"string"==typeof r&&r&&!e.contentRefInnerIds.has(r)&&e.contentRefInnerIds.set(r,n(r))}null==(i=t.children)||i.forEach(t=>fr(t,e,n))}function dr(t){const e=/translate\(([^)]*)\)/.exec(t);if(!e)return[0,0];const n=e[1].split(/[\s,]+/).filter(Boolean).map(Number);return[n[0]||0,n[1]||0]}function hr(t){if(!t||"object"!=typeof t)return!1;const e=t;return!!e.autoOrient||!!Array.isArray(e.keyframes)&&e.keyframes.some(t=>t.tangentOut||t.tangentIn)}function mr(t,e,n,r){if(!e)return t;const o=sr(n,"grad"),i=function(t,e){const n={type:t.type===Dt.radial?"radialGradient":"linearGradient",id:e};return t.type===Dt.linear?(pr(n,"x1","y1",t.start),pr(n,"x2","y2",t.end)):(pr(n,"cx","cy",t.center),function(t,e,n){const r=tr(n);"absent"!==r.kind&&er(t,"r",r,{asString:!0})}(n,0,t.radius),pr(n,"fx","fy",t.focal)),t.gradientUnits&&(n.gradientUnits=t.gradientUnits),t.spreadMethod&&(n.spreadMethod=t.spreadMethod),t.gradientTransform&&(n.gradientTransform=t.gradientTransform),n.children=function(t){var e,n,r,o;if(!t)return[];const i=tr(t);if("absent"===i.kind)return[];if("static"===i.kind)return Array.isArray(i.value)?i.value.map(vr):[];const a=i.keyframes;if(!a.length)return[];const s=i.loop;let l=0;for(const t of a){const n=null!=(e=t.value)?e:t.v;Array.isArray(n)&&n.length>l&&(l=n.length)}if(!l)return[];const u=null!=(n=a[0].value)?n:a[0].v,c=[];for(let t=0;t<l;t++){const e=null!=(o=null!=(r=null==u?void 0:u[t])?r:gr(a,0,t))?o:{offset:t/Math.max(1,l-1),color:"#000000"};c.push({offset:e.offset,color:e.color})}return c.map((t,e)=>function(t,e,n,r,o){var i,a,s,l,u;const c=[],f=[];let d=!1;for(const r of e){const o=null!=(a=null!=(i=r.time)?i:r.t)?a:0,h=null!=(s=r.value)?s:r.v,m=null!=(l=null==h?void 0:h[n])?l:gr(e,e.indexOf(r),n);if(!m)continue;const p=null!=(u=r.easing)?u:r.e,v={time:o,value:m.color};void 0!==p&&(v.easing=p),c.push(v);const g={time:o,value:m.offset};void 0!==p&&(g.easing=p),f.push(g),m.offset!==t.offset&&(d=!0)}const h={type:"stop",offset:yr(t.offset),stopColor:t.color},m={};return c.length&&(m.stopColor={keyframes:c},void 0!==o&&(m.stopColor.loop=o)),d&&f.length&&(m.offset={keyframes:f},void 0!==o&&(m.offset.loop=o)),Object.keys(m).length&&(h.animate=m),h}(t,a,e,0,s))}(t.stops),n}(e,o);return n.defs.push(i),t[r]="url(#"+o+")",t}function pr(t,e,n,r){var o,i,a;const s=tr(r);if("absent"===s.kind)return;if("static"===s.kind)return t[e]=String(s.value[0]),void(t[n]=String(s.value[1]));const l=t=>{const e={keyframes:s.keyframes.map(e=>{const n={time:e.time,value:Array.isArray(e.value)?e.value[t]:void 0};return void 0!==e.easing&&(n.easing=e.easing),n})};return void 0!==s.loop&&(e.loop=s.loop),e},u=null!=(o=t.animate)?o:{};u[e]=l(0),u[n]=l(1),t.animate=u;const c=null!=(a=s.base)?a:null==(i=s.keyframes[0])?void 0:i.value;Array.isArray(c)&&(t[e]=String(c[0]),t[n]=String(c[1]))}function vr(t){return{type:"stop",offset:yr(t.offset),stopColor:t.color}}function gr(t,e,n){var r,o;for(let o=e;o>=0;o--){const e=null!=(r=t[o].value)?r:t[o].v;if(null==e?void 0:e[n])return e[n]}for(let r=e+1;r<t.length;r++){const e=null!=(o=t[r].value)?o:t[r].v;if(null==e?void 0:e[n])return e[n]}}function yr(t){return Math.round(1e3*t)/10+"%"}function br(t){return"string"==typeof t?t:t&&"object"==typeof t&&"string"==typeof t.path?t.path:void 0}function kr(t,e,n){if(!e)return t;const r=function(t,e){var n;const r=tr(t);if("absent"!==r.kind)return"static"===r.kind?r.value:(e.warnings.push("transformBy.origin: animated origin approximated by its first keyframe"),null==(n=r.keyframes[0])?void 0:n.value)}(e.origin,n);let o=t;return o=Ar(o,"translate",e.translate,void 0),o=Ar(o,"rotate",e.rotate,r),o=Ar(o,"scale",e.scale,r),o}function Ar(t,e,n,r,o){if(void 0===n)return t;const i=tr("scale"===e&&Array.isArray(n)?[n[0]/100,n[1]/100]:n);if("static"===i.kind)return{type:"g",transform:{value:$n(e,wr(e,i.value),r)},children:[t]};if("animated"===i.kind){const n={keyframes:i.keyframes.map(t=>{const n=rr(t,$n(e,wr(e,t.value),r));return"translate"===e?A(A({},n),xr(t)):n})};return void 0!==i.loop&&(n.loop=i.loop),{type:"g",animate:{transform:n},children:[t]}}return t}function wr(t,e){return"translate"===t?[-e[0],-e[1]]:"rotate"===t?-e:[1/e[0],1/e[1]]}function xr(t){var e,n;const r={},o=null!=(e=t.tangentOut)?e:t.to,i=null!=(n=t.tangentIn)?n:t.ti;return Array.isArray(o)&&(r.tangentOut=[-o[0],-o[1]]),Array.isArray(i)&&(r.tangentIn=[-i[0],-i[1]]),r}function Sr(t){const e=t.animate&&"object"==typeof t.animate&&!Array.isArray(t.animate)?t.animate:void 0;return!(!e||!e.transform)}function jr(t){let e=0,n=0;for(const r of t)r.translate&&(e+=r.translate[0],n+=r.translate[1]);return[e,n]}function Pr(t,e){let n=0,r=0;for(const o of t)if(o.translateKeyframes&&o.translateKeyframes.length){const t=Or(o.translateKeyframes,e);n+=t[0],r+=t[1]}else o.translate&&(n+=o.translate[0],r+=o.translate[1]);return[n,r]}function Or(t,e){if(e<=t[0].time)return t[0].value;if(e>=t[t.length-1].time)return t[t.length-1].value;for(let n=1;n<t.length;n++)if(e<=t[n].time){const r=t[n-1],o=t[n],i=(e-r.time)/(o.time-r.time);return[r.value[0]+(o.value[0]-r.value[0])*i,r.value[1]+(o.value[1]-r.value[1])*i]}return t[t.length-1].value}function Mr(t,e){var n,r,o;const i=t.transform,a=t.animate&&"object"==typeof t.animate&&!Array.isArray(t.animate)?t.animate.transform:void 0;if(void 0===i&&!a)return;const s={};if("string"==typeof i){const t=function(t,e){const n=/([a-zA-Z]+)\s*\(([^)]*)\)/g;let r,o=0,i=0,a=!1,s=!1;for(;null!==(r=n.exec(t));){const t=r[1],e=r[2].split(/[\s,]+/).filter(t=>t.length>0).map(Number);"translate"===t?(o+=e[0]||0,i+=e[1]||0,a=!0):s=!0}return s&&e.warnings.push("maskedBy ancestor: non-translate transform in string ignored: "+t),a?[o,i]:void 0}(i,e);t&&(s.translate=t)}else if(i&&"object"==typeof i&&!i.keyframes&&!i.kfs){const t=i.value,n=t&&"object"==typeof t?t:i;n&&"object"==typeof n&&Array.isArray(n.translate)&&(s.translate=[n.translate[0]||0,n.translate[1]||0]),!n||void 0===n.rotate&&void 0===n.scale&&void 0===n.skew||e.warnings.push("maskedBy ancestor: non-translate transform parts ignored (rotate/scale not yet supported)")}if(a&&Array.isArray(a.keyframes)){const t=a.keyframes,i=[];for(const a of t){const t=null!=(n=a.value)?n:a.v,s=null!=(o=null!=(r=a.time)?r:a.t)?o:0;t&&"object"==typeof t&&Array.isArray(t.translate)&&(i.push({time:s,value:[t.translate[0]||0,t.translate[1]||0]}),void 0===t.rotate&&void 0===t.scale&&void 0===t.skew||e.warnings.push("maskedBy ancestor: animated non-translate parts ignored"))}i.length&&(s.translateKeyframes=i)}return s.translate||s.translateKeyframes?s:void 0}var _r="content";function Er(t,e,n){if(!e)return;const r=lr(e.sourceId);if(!r)return void(e.type===_r&&n.errors.push("clone: content ref missing sourceId"));const o=e.type===_r&&n.contentRefInnerIds.get(r)||r;t.href="#"+o}function Ir(t,e){const n={};return void 0!==t.translate&&(n.translate=zr(t.translate,t=>[t[0]*e,t[1]*e])),void 0!==t.rotate&&(n.rotate=zr(t.rotate,t=>t*e)),void 0!==t.skew&&(n.skew=zr(t.skew,t=>t*e)),void 0!==t.scale&&(n.scale=function(t,e){return zr(t,t=>[Math.pow(t[0],e),Math.pow(t[1],e)],!0)}(t.scale,e)),void 0!==t.origin&&(n.origin=t.origin),Object.keys(n).length?n:void 0}function zr(t,e,n=!1){const r=tr(t);if("absent"===r.kind)return t;if("static"===r.kind){const o=e(r.value);return"number"!=typeof t&&!Array.isArray(t)||n?{value:o}:o}const o={keyframes:r.keyframes.map(t=>t&&void 0!==t.value?w(A({},t),{value:e(t.value)}):t)};return void 0!==r.loop&&(o.loop=r.loop),void 0!==r.autoOrient&&(o.autoOrient=r.autoOrient),void 0!==r.base&&(o.value=e(r.base)),o}var Tr=!1;function Nr(t){var e,n;return{start:null!=(e=t.start)?e:0,stretch:null!=(n=t.stretch)?n:1}}var Cr=1;function Fr(t,e,n){const[r,o]=e;if(!Number.isFinite(r)||!Number.isFinite(o))return void n.warnings.push("retime: timeCrop is not a pair of finite numbers — ignored");const i=o<=r?[{time:0,value:0}]:[...r>0?[{time:Math.max(0,r-Cr),value:0}]:[],{time:Math.max(0,r),value:1},{time:o,value:1},{time:o+Cr,value:0}],a=A({},t);for(const e of Object.keys(t))delete t[e];t.type="g",t.children=[a],t.animate={opacity:{keyframes:i}}}function Lr(t,e){return{start:e.start+e.stretch*t.start,stretch:e.stretch*t.stretch}}function Dr(t){var e,n;return null==(n=null==(e=t.effects)?void 0:e.clone)?void 0:n.retime}function Rr(t){var e;const n=null==(e=t.effects)?void 0:e.clone;n&&(delete n.retime,0===Object.keys(n).length&&delete t.effects.clone,t.effects&&0===Object.keys(t.effects).length&&delete t.effects)}function Br(t,e,n){const r=lr(t.href);if(!r)return void n.errors.push("retime: <use> has no href to follow");const o=Ur(r,e,n,new Set);if(o)if(Tr){const e=n.idMap.get(o);t.type="g",delete t.href,t.children=[e],Zn(t),n.defs=n.defs.filter(t=>t!==e)}else t.href="#"+o}function Ur(t,e,n,r){if(r.has(t))return void n.errors.push('retime: loop via "'+t+'"');const o=n.idMap.get(t);if(!o)return void n.warnings.push('retime: target "'+t+'" not found');const i=cr(o);if(function(t,e){qn(t,()=>sr(e,"retimed"))}(i,n),"use"===o.type?Wr(i,e.start,e.stretch):Vr(i,e.start,e.stretch),Rr(i),"use"===o.type&&o.href){const a=lr(o.href);if(a){const s=Dr(o),l=s?Lr(Nr(s),e):e,u=new Set(r);u.add(t);const c=Ur(a,l,n,u);c&&(i.href="#"+c)}}else!function(t,e,n,r,o){const i=t=>{var a;const s=Dr(t);if("use"===t.type&&s&&t.href){const i=lr(t.href);if(i){const a=Lr(Nr(s),e),l=new Set(r);l.add(o);const u=Ur(i,a,n,l);u&&(t.href="#"+u)}Rr(t)}null==(a=t.children)||a.forEach(i)};i(t)}(i,e,n,r,t);return n.defs.push(i),"string"==typeof i.id&&n.idMap.set(i.id,i),"string"==typeof i.id?i.id:void 0}function Vr(t,e,n){var r;Wr(t,e,n),null==(r=t.children)||r.forEach(t=>Vr(t,e,n))}function Wr(t,e,n){const r=t=>{for(const r of t)"number"==typeof r.time&&(r.time=e+r.time*n)};if(t.transform&&"object"==typeof t.transform&&Array.isArray(t.transform.keyframes)&&r(t.transform.keyframes),t.animate&&"object"==typeof t.animate)for(const e of Object.keys(t.animate)){const n=t.animate[e];n&&Array.isArray(n.keyframes)&&r(n.keyframes)}}var Gr=48,qr=/[MmLlHhVvCcSsQqTtAaZz]/;function Kr(t,e,n){return{P1:[t[0]+2/3*(e[0]-t[0]),t[1]+2/3*(e[1]-t[1])],P2:[n[0]+2/3*(e[0]-n[0]),n[1]+2/3*(e[1]-n[1])]}}function Zr(t){const e=function(t){const e=function(t){const e=[],n=/([MmLlHhVvCcSsQqTtAaZz])|(-?\d*\.?\d+(?:[eE][-+]?\d+)?)/g;let r;for(;null!==(r=n.exec(t));)e.push(r[0]);return e}(t),n=[];let r=0,o=0,i=0,a=0,s=0,l=0,u=0,c=0,f=0,d="";const h=()=>parseFloat(e[r++]),m=(t,e,r)=>{const a=[o,i],s=J(a,t,e,r,Gr);n.push({P0:a,P1:t,P2:e,P3:r,lut:s,len:s.ds[s.ds.length-1]}),o=r[0],i=r[1]},p=(t,e)=>{m([o+(t-o)/3,i+(e-i)/3],[o+2*(t-o)/3,i+2*(e-i)/3],[t,e])};for(;r<e.length;){let t=e[r];qr.test(t)?r++:t="M"===d?"L":"m"===d?"l":d;const n=t>="a",v=t.toUpperCase();if("Z"!==v){if("M"===v){const e=h()+(n?o:0),r=h()+(n?i:0);o=e,i=r,a=e,s=r,d=t;continue}if("L"===v)p(h()+(n?o:0),h()+(n?i:0));else if("H"===v)p(h()+(n?o:0),i);else if("V"===v)p(o,h()+(n?i:0));else if("C"===v){const t=[h()+(n?o:0),h()+(n?i:0)],e=[h()+(n?o:0),h()+(n?i:0)],r=[h()+(n?o:0),h()+(n?i:0)];l=e[0],u=e[1],m(t,e,r)}else if("S"===v){const t="C"===d.toUpperCase()||"S"===d.toUpperCase()?[2*o-l,2*i-u]:[o,i],e=[h()+(n?o:0),h()+(n?i:0)],r=[h()+(n?o:0),h()+(n?i:0)];l=e[0],u=e[1],m(t,e,r)}else if("Q"===v){const t=[h()+(n?o:0),h()+(n?i:0)],e=[h()+(n?o:0),h()+(n?i:0)];c=t[0],f=t[1];const{P1:r,P2:a}=Kr([o,i],t,e);m(r,a,e)}else if("T"===v){const t="Q"===d.toUpperCase()||"T"===d.toUpperCase()?[2*o-c,2*i-f]:[o,i],e=[h()+(n?o:0),h()+(n?i:0)];c=t[0],f=t[1];const{P1:r,P2:a}=Kr([o,i],t,e);m(r,a,e)}else{if("A"!==v){r++;continue}r+=5,p(h()+(n?o:0),h()+(n?i:0))}d=t}else p(a,s),o=a,i=s,d=t}return n.length?n:null}(t);if(!e)return null;const n=new Float64Array(e.length+1);for(let t=0;t<e.length;t++)n[t+1]=n[t]+e[t].len;const r=n[e.length],o=e[0].P0,i=e[e.length-1].P3,a=Math.hypot(i[0]-o[0],i[1]-o[1])<.001,s=t=>{let r=0;for(;r<e.length-1&&t>n[r+1];)r++;const o=e[r],i=t-n[r],a=o.len>0?function(t,e){const{ts:n,ds:r}=t,o=r.length-1;if(e<=0)return n[0];if(e>=r[o])return n[o];let i=1,a=o;for(;i<a;){const t=i+a>>>1;r[t]<e?i=t+1:a=t}const s=r[a-1],l=r[a]-s,u=l>0?(e-s)/l:0;return n[a-1]+u*(n[a]-n[a-1])}(o.lut,i):0,[s,l]=X(o.P0,o.P1,o.P2,o.P3,a),[u,c]=Y(o.P0,o.P1,o.P2,o.P3,a);return{x:s,y:l,angle:Math.atan2(c,u)}};return{totalLength:r,closed:a,sampleAtDistance(t){if(a&&r>0&&(t<0||t>r))return s((t%r+r)%r);if(!a&&(t<0||t>r)){const e=t<0?0:r,n=s(e),o=t-e;return{x:n.x+Math.cos(n.angle)*o,y:n.y+Math.sin(n.angle)*o,angle:n.angle}}return s((n=r,(e=t)<0?0:e>n?n:e));var e,n}}}var Xr=.15;function Hr(t){const e=tr(t);if("static"===e.kind&&"number"==typeof e.value)return{min:e.value,max:e.value};if("animated"===e.kind&&e.keyframes.length){const t=e.keyframes.map(t=>Number(t.value)||0);return{min:Math.min(...t),max:Math.max(...t)}}return{min:0,max:0}}function Yr(t){let e=0,n=16;const r=t=>{var o,i;const a=parseFloat(String(null!=(o=t.fontSize)?o:""))||0;a&&(n=Math.max(n,a));const s=null!=(i=t.text)?i:t.textContent;if("string"==typeof s&&(e+=s.length),t.children)for(const e of t.children)r(e)};return r(t),e*n}var Qr=t=>Math.round(1e3*t)/1e3;function Jr(t,e){if(!e||null==t)return t;const n=tr(t);if("absent"===n.kind)return t;if("static"===n.kind)return"number"==typeof t?n.value+e:{value:n.value+e};const r={keyframes:n.keyframes.map(t=>w(A({},t),{value:(Number(t.value)||0)+e}))};return void 0!==n.loop&&(r.loop=n.loop),void 0!==n.autoOrient&&(r.autoOrient=n.autoOrient),void 0!==n.base&&(r.value=n.base+e),r}function $r(t,e){var n;if("clip"===e.pathOverflow)return{d:t,startShift:0};const r=Zr(t);if(!r||r.closed||r.totalLength<=0)return{d:t,startShift:0};const o=r.totalLength,i=Xr*o,a=Hr(e.startOffset),s=Hr(e.textLength).max||(null!=(n=e.advance)?n:0),l=Math.max(0,-a.min),u=Math.max(0,a.max+s-o),c=l>0?l+i:0,f=u>0?u+i:0;if(f<=0&&c<=0)return{d:t,startShift:0};const d=r.sampleAtDistance(0),h=r.sampleAtDistance(o);let m=t;if(c>0){const e=d.x-Math.cos(d.angle)*c,n=d.y-Math.sin(d.angle)*c,r=t.replace(/^\s*[Mm]\s*-?[\d.]+[\s,]+-?[\d.]+/,"");m="M"+Qr(e)+","+Qr(n)+"L"+Qr(d.x)+","+Qr(d.y)+r}if(f>0){const t=h.x+Math.cos(h.angle)*f,e=h.y+Math.sin(h.angle)*f;m+="L"+Qr(t)+","+Qr(e)}return{d:m,startShift:c}}function to(t,e,n){null!=n&&er(t,e,tr(n),{asString:!0})}var eo=(t,e,n)=>{const r={type:t};for(const t in e)void 0!==e[t]&&(r[t]=e[t]);const o=Array.isArray(n)?n.filter(t=>null!=t):null!=n?[n]:[];return o.length&&(r.children=o),r};function no(t,e){return Math.round(t)===t?""+Math.round(t):t.toFixed(e)}function ro(t,e){let n="";for(let r=0;r<t.length;r++){const o=no(t[r],e);r>0&&45!==o.charCodeAt(0)&&(n+=" "),n+=o}return n}function oo(t,e,n){return[t[0]*e+t[2]*n+t[4],t[1]*e+t[3]*n+t[5]]}var io=/([MLCQZ])|(-?\d*\.?\d+(?:e[-+]?\d+)?)/gi;function ao(t,e,n=2){const r=[];let o;for(io.lastIndex=0;null!==(o=io.exec(t));)r.push(o[0]);let i="",a=0;const s=()=>parseFloat(r[a++]);for(;a<r.length;){const t=r[a++];if("M"===t||"L"===t){const[r,o]=oo(e,s(),s());i+=t+ro([r,o],n)}else if("C"===t){const[t,r]=oo(e,s(),s()),[o,a]=oo(e,s(),s()),[l,u]=oo(e,s(),s());i+="C"+ro([t,r,o,a,l,u],n)}else if("Q"===t){const[t,r]=oo(e,s(),s()),[o,a]=oo(e,s(),s());i+="Q"+ro([t,r,o,a],n)}else"Z"!==t&&"z"!==t||(i+="Z")}return i}var so=16,lo=["fontFamily","fontSize","fontWeight","fontStyle","textAnchor","letterSpacing","wordSpacing","textDecoration","textTransform","whiteSpace","x","y","dx","dy","lengthAdjust","fill","stroke","strokeWidth","effects",zt,Tt,"xml:space"],uo=["fillOpacity","fillRule","strokeOpacity","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","mixBlendMode","filter"],co=["fill","stroke","strokeWidth","opacity","fillOpacity","strokeOpacity","strokeDasharray","strokeDashoffset"];function fo(t){if("number"==typeof t)return t;if("string"==typeof t){const e=parseFloat(t);return isNaN(e)?void 0:e}}function ho(t){return"string"==typeof t?t:void 0}function mo(t){const e=t.animate;if(!e||"object"!=typeof e)return;let n;for(const t of co)void 0!==e[t]&&((null!=n?n:n={})[t]=e[t]);return n}function po(t,e){var n,r,o,i,a,s,l,u,c,f;const d="text"===t.type,h=t.style,m=e=>{var n;return d?void 0:null!=(n=t[e])?n:null==h?void 0:h[e]},p={fontFamily:null!=(n=ho(t.fontFamily))?n:e.fontFamily,fontSize:null!=(r=fo(t.fontSize))?r:e.fontSize,fill:null!=(o=t.fill)?o:e.fill,stroke:null!=(i=t.stroke)?i:e.stroke,strokeWidth:null!=(a=t.strokeWidth)?a:e.strokeWidth,letterSpacing:null!=(s=fo(t.letterSpacing))?s:e.letterSpacing,wordSpacing:null!=(l=fo(t.wordSpacing))?l:e.wordSpacing,opacity:null!=(u=fo(m("opacity")))?u:e.opacity,animate:null!=(c=d?void 0:mo(t))?c:e.animate};for(const t of uo){const n=null!=(f=m(t))?f:e[t];void 0!==n&&(p[t]=n)}return p}function vo(t){var e,n,r;return{fontFamily:ho(t.fontFamily),fontSize:null!=(e=fo(t.fontSize))?e:so,fill:t.fill,stroke:t.stroke,strokeWidth:t.strokeWidth,letterSpacing:null!=(n=fo(t.letterSpacing))?n:0,wordSpacing:null!=(r=fo(t.wordSpacing))?r:0}}function go(t){const e={};void 0!==t.fill&&(e.fill=t.fill),void 0!==t.stroke&&(e.stroke=t.stroke),void 0!==t.strokeWidth&&(e.strokeWidth=t.strokeWidth),void 0!==t.opacity&&1!==t.opacity&&(e.opacity=t.opacity);for(const n of uo)void 0!==t[n]&&(e[n]=t[n]);return void 0!==t.animate&&(e.animate=t.animate),e}function yo(t,e,n,r){var o;const i=t.fontFamily?e[t.fontFamily]:n;return i||null==r||r.push('textGlyphs: no glyphs for font "'+(null!=(o=t.fontFamily)?o:"")+'"'),i}function bo(t){const e=Object.keys(t);return 1===e.length?t[e[0]]:void 0}var ko=.6,Ao="px-missing-glyph";function wo(t,e){if(t<=0||e<=0)return"";const n=.08*t,r=.92*t,o=.92*-e,i=r-n,a=-o,s=Math.max(1,.12*Math.min(i,a)),l="M"+n+" 0L"+r+" 0L"+r+" "+o+"L"+n+" "+o+"Z";if(i<=2*s||a<=2*s)return l;const u=n+s,c=r-s,f=-s,d=o+s;return l+"M"+u+" "+f+"L"+u+" "+d+"L"+c+" "+d+"L"+c+" "+f+"Z"}function xo(t,e){var n,r,o,i;const{glyphs:a,create:s=eo,warnings:l}=e,u=bo(a),c={x:null!=(n=fo(t.x))?n:0,y:null!=(r=fo(t.y))?r:0},f=[],d=[{start:c.x,end:c.x}];let h=0;const m=(t,e)=>{var n;const r=yo(e,a,u,l),o=(null==r?void 0:r.unitsPerEm)||1e3,i=e.fontSize/o,s=null!=(n=null==r?void 0:r.ascent)?n:.9*o,m=go(e);for(let n=0;n<t.length;n++){const a=t.charAt(n),l=null==r?void 0:r.glyphs[a];if(l&&l.d)f.push({glyphD:l.d,m:[i,0,0,i,c.x,c.y],paint:m,line:h,x:c.x,y:c.y,scale:i}),c.x+=l.width*i;else if(/\S/.test(a)){const t=l&&l.width>0?l.width:ko*o;f.push({glyphD:wo(t,s),m:[i,0,0,i,c.x,c.y],paint:m,isMissing:!0,line:h,x:c.x,y:c.y,scale:i}),c.x+=t*i}else c.x+=(l?l.width:0)*i;c.x+=e.letterSpacing+(" "===a?e.wordSpacing:0),d[h].end=c.x}},p=(t,e)=>{var n,r,o,i;const a=po(t,e),s=fo(t.x),l=fo(t.y);void 0!==s&&(c.x=s,h=d.length,d.push({start:c.x,end:c.x})),void 0!==l&&(c.y=l),c.x+=null!=(n=fo(t.dx))?n:0,c.y+=null!=(r=fo(t.dy))?r:0;const u=null!=(o=ho(t[Tt]))?o:ho(t[zt]);if(u&&!(null==(i=t.children)?void 0:i.length)&&m(u,a),t.children)for(const e of t.children)p(e,a)},v=vo(t);if(t.children)for(const e of t.children)p(e,v);const g=null!=(o=ho(t[Tt]))?o:ho(t[zt]);g&&!(null==(i=t.children)?void 0:i.length)&&m(g,v);const y=ho(t.textAnchor);if("middle"===y||"end"===y)for(const t of f){const e=d[t.line].end-d[t.line].start,n="middle"===y?-e/2:-e;t.m=[t.scale,0,0,t.scale,t.x+n,t.y]}return Co(t,No(f,s,l),s)}function So(t,e){var n,r,o,i,a,s;if(null==(n=e.alongPath)?void 0:n.pathD)return function(t,e,n){var r,o;const{glyphs:i,warnings:a,alongPath:s}=n,l=Zr(e);if(!l)return null==a||a.push("textGlyphs: unparsable along-path geometry (caret)"),[];const u=bo(i),c=[];let f=0;const d=(t,e)=>{var n,r,o;const s=po(t,e),l=null!=(n=ho(t[Tt]))?n:ho(t[zt]);if(l&&!(null==(r=t.children)?void 0:r.length)){const t=yo(s,i,u,a),e=(null==t?void 0:t.unitsPerEm)||1e3,n=s.fontSize/e,r=(null!=(o=null==t?void 0:t.ascent)?o:.9*e)*n;for(let e=0;e<l.length;e++){const o=l.charAt(e),i=null==t?void 0:t.glyphs[o],a=(i?i.width:0)*n,u=a+s.letterSpacing+(" "===o?s.wordSpacing:0);c.push({advStart:f,advEnd:f+u,glyphW:a,ascent:r,fontSize:s.fontSize}),f+=u}}if(t.children)for(const e of t.children)d(e,s)};d(t,vo(t));const h=f,m=tr(null==s?void 0:s.textLength),p="animated"===m.kind?Number(null==(r=m.keyframes[0])?void 0:r.value)||0:"static"===m.kind&&Number(m.value)||0,v=p>0&&h>0?p/h:1,g=tr(null==s?void 0:s.startOffset),{along:y,perp:b}=Po(t),k=y+("animated"===g.kind?Number(null==(o=g.keyframes[0])?void 0:o.value)||0:"static"===g.kind&&Number(g.value)||0),A=t=>({x:t.x-b*Math.sin(t.angle),y:t.y+b*Math.cos(t.angle),angle:t.angle});return c.map(t=>{const e=k+t.advStart*v,n=k+t.advEnd*v,r=A(l.sampleAtDistance(e)),o=A(l.sampleAtDistance(n)),i=l.sampleAtDistance(k+(t.advStart+t.glyphW/2)*v);return{x:r.x,y:r.y,width:t.advEnd-t.advStart,ascent:t.ascent,fontSize:t.fontSize,endX:o.x,endY:o.y,rotation:180*i.angle/Math.PI}})}(t,e.alongPath.pathD,e);const{glyphs:l,warnings:u}=e,c=bo(l),f={x:null!=(r=fo(t.x))?r:0,y:null!=(o=fo(t.y))?o:0},d=[],h=[{start:f.x,end:f.x}];let m=0;const p=(t,e)=>{var n;const r=yo(e,l,c,u),o=(null==r?void 0:r.unitsPerEm)||1e3,i=e.fontSize/o,a=(null!=(n=null==r?void 0:r.ascent)?n:.9*o)*i;for(let n=0;n<t.length;n++){const o=t.charAt(n),s=null==r?void 0:r.glyphs[o],l=(s?s.width:0)*i+e.letterSpacing+(" "===o?e.wordSpacing:0);d.push({x:f.x,y:f.y,width:l,ascent:a,fontSize:e.fontSize,line:m}),f.x+=l,h[m].end=f.x}},v=(t,e)=>{var n,r,o,i;const a=po(t,e),s=fo(t.x),l=fo(t.y);void 0!==s&&(f.x=s,m=h.length,h.push({start:f.x,end:f.x})),void 0!==l&&(f.y=l),f.x+=null!=(n=fo(t.dx))?n:0,f.y+=null!=(r=fo(t.dy))?r:0;const u=null!=(o=ho(t[Tt]))?o:ho(t[zt]);if(u&&!(null==(i=t.children)?void 0:i.length)&&p(u,a),t.children)for(const e of t.children)v(e,a)},g=vo(t);if(t.children)for(const e of t.children){const t=d.length;if(v(e,g),d.length===t){const t=po(e,g),n=yo(t,l,c),r=(null==n?void 0:n.unitsPerEm)||1e3;d.push({x:f.x,y:f.y,width:0,ascent:(null!=(i=null==n?void 0:n.ascent)?i:.9*r)*(t.fontSize/r),fontSize:t.fontSize,line:m})}}const y=null!=(a=ho(t[Tt]))?a:ho(t[zt]);y&&!(null==(s=t.children)?void 0:s.length)&&p(y,g);const b=ho(t.textAnchor);if("middle"===b||"end"===b)for(const t of d){const e=h[t.line].end-h[t.line].start;t.x+="middle"===b?-e/2:-e}return d.map(t=>{var e=t,{line:n}=e;return x(e,["line"])})}function jo(t,e,n,r,o=0){const{x:i,y:a,angle:s}=t.sampleAtDistance(e),l=Math.cos(s),u=Math.sin(s),c=r/2;return[n*l,n*u,-n*u,n*l,i-n*l*c-o*u,a-n*u*c+o*l]}function Po(t){var e,n,r;return{along:(null!=(e=fo(t.x))?e:0)+(null!=(n=fo(t.dx))?n:0),perp:null!=(r=fo(t.dy))?r:0}}function Oo(t,e,n,r,o,i){const{glyphs:a,create:s=eo,warnings:l}=r,u=e?Zr(e):null;if(!u)return null==l||l.push("textGlyphs: unparsable along-path geometry"),null;const c=bo(a),{cells:f,width:d}=function(t,e,n,r){const o=[];let i=0;const a=(t,s)=>{var l,u,c;const f=po(t,s),d=null!=(l=ho(t[Tt]))?l:ho(t[zt]);if(d&&!(null==(u=t.children)?void 0:u.length)){const t=yo(f,e,n,r);if(t){const e=f.fontSize/t.unitsPerEm,n=null!=(c=t.ascent)?c:.9*t.unitsPerEm,r=go(f);for(let a=0;a<d.length;a++){const s=d.charAt(a),l=t.glyphs[s];if(l&&l.d){const t=l.width*e;o.push({glyphD:l.d,widthEm:l.width,scale:e,paint:r,midBase:i+t/2}),i+=t}else if(/\S/.test(s)){const a=l&&l.width>0?l.width:ko*t.unitsPerEm,s=a*e;o.push({glyphD:wo(a,n),widthEm:a,scale:e,paint:r,isMissing:!0,midBase:i+s/2}),i+=s}else i+=(l?l.width:0)*e;i+=f.letterSpacing+(" "===s?f.wordSpacing:0)}}}if(t.children)for(const e of t.children)a(e,f)};return a(t,vo(t)),{cells:o,width:i}}(t,a,c,l);if(!f.length)return Co(t,[],s);const{along:h,perp:m}=Po(t),p=Mo(n),v=Mo(o),g=t=>t>0&&d>0?t/d:1,y="clip"===i&&!u.closed;if(p.animated||v.animated){const e=function(t,e){const n=[...t,...e].sort((t,e)=>t-e),r=[];for(const t of n)r.length&&t===r[r.length-1]||r.push(t);return r}(p.times,v.times),n=(t,e)=>h+p.at(e)+g(v.at(e))*t.midBase,r=p.animated?p.loop:v.loop;return Co(t,function(t,e,n,r,o,i,a,s=0){const l=Math.max(e.totalLength/_o,.5),u=t=>t>=0&&t<=e.totalLength,c=[];for(const f of t){const t=[f.scale,0,0,f.scale,-f.scale*(f.widthEm/2),0],d=ao(f.glyphD,t),h=(t,n)=>{const{x:r,y:o,angle:i}=e.sampleAtDistance(t),a=Math.cos(i),l=Math.sin(i);return{time:n,value:{translate:[Io(r-s*l,3),Io(o+s*a,3)],rotate:Io(180*i/Math.PI,3)}}},m=[],p=[],v=(t,e)=>{m.push(h(t,e)),a&&p.push({time:e,value:u(t)?1:0})};v(n(f,r[0]),r[0]);for(let t=1;t<r.length;t++){const e=r[t-1],o=r[t],i=n(f,e),a=n(f,o),s=Math.min(Eo,Math.max(1,Math.ceil(Math.abs(a-i)/l)));for(let t=1;t<=s;t++){const r=e+t/s*(o-e);v(n(f,r),r)}}dn(m);const g={keyframes:m};void 0!==o&&(g.loop=o);const y={transform:g};if(f.paint.animate&&Object.assign(y,f.paint.animate),a&&p.some(t=>0===t.value)){const t={keyframes:p};void 0!==o&&(t.loop=o),y.opacity=t}c.push(i("path",w(A(A({d:d},zo(f.paint)),To(f.isMissing)),{animate:y}),[]))}return c}(f,u,n,e,r,s,y,m),s)}const b=g(v.at(0)),k=h+p.at(0);return Co(t,No((y?f.filter(t=>{const e=k+t.midBase*b;return e>=0&&e<=u.totalLength}):f).map(t=>({glyphD:t.glyphD,paint:t.paint,isMissing:t.isMissing,m:jo(u,k+t.midBase*b,t.scale,t.widthEm,m)})),s,l),s)}function Mo(t){var e;const n=tr(t);if("animated"===n.kind&&n.keyframes.length>=2){const t=[...n.keyframes].sort((t,e)=>(Number(t.time)||0)-(Number(e.time)||0)),e=t.map(t=>Number(t.time)||0),r=t.map(t=>Number(t.value)||0);return{animated:!0,times:e,loop:n.loop,at(t){if(t<=e[0])return r[0];for(let n=1;n<e.length;n++)if(t<=e[n]){const o=e[n]-e[n-1],i=o>0?(t-e[n-1])/o:1;return r[n-1]+i*(r[n]-r[n-1])}return r[r.length-1]}}}const r="animated"===n.kind?Number(null==(e=n.keyframes[0])?void 0:e.value)||0:"static"===n.kind&&Number(n.value)||0;return{animated:!1,times:[],at:()=>r}}var _o=48,Eo=64;function Io(t,e){const n=b(10,e);return Math.round(t*n)/n}function zo(t){const e={};void 0!==t.fill&&(e.fill=t.fill),void 0!==t.stroke&&(e.stroke=t.stroke),void 0!==t.strokeWidth&&(e.strokeWidth=t.strokeWidth),void 0!==t.opacity&&(e.opacity=t.opacity);for(const n of uo)void 0!==t[n]&&(e[n]=t[n]);return e}function To(t){return t?{class:Ao}:{}}function No(t,e,n){if(!t.length)return null==n||n.push("textGlyphs: nothing to render"),[];const r=new Map;for(const e of t){const t=JSON.stringify([e.paint,!!e.isMissing]),n=ao(e.glyphD,e.m),o=r.get(t);o?o.d+=n:r.set(t,{paint:e.paint,d:n,isMissing:e.isMissing})}const o=[];for(const{paint:t,d:n,isMissing:i}of r.values())o.push(e("path",A(A(A({d:n},zo(t)),To(i)),void 0!==t.animate?{animate:A({},t.animate)}:{}),[]));return o}function Co(t,e,n){const r={};for(const e of Object.keys(t))"type"!==e&&"children"!==e&&-1===lo.indexOf(e)&&(r[e]=t[e]);if(r.style&&"object"==typeof r.style){const t=A({},r.style);delete t["white-space"],Object.keys(t).length?r.style=t:delete r.style}return n("g",r,e)}function Fo(t,e){return e.alongPath?Oo(t,e.alongPath.pathD,e.alongPath.startOffset,e,e.alongPath.textLength,e.alongPath.pathOverflow):xo(t,e)}function Lo(t,e){const n=w(A({},t),{type:"g",children:e});return delete n.d,delete n.strokeDasharray,delete n.strokeDashoffset,delete n.effects,n}function Do(t,e,n,r,o,i,a,s){const l=Bo(r,n,o),u=Uo(n,o),c=Wo(i,l),f=Wo(a,u),d=Ko(a),h={type:"path",d:S(e)};return Go(h,"strokeDasharray",f),Go(h,"strokeDashoffset",c),Go(h,"strokeOpacity",d),[h]}var Ro=1;function Bo(t,e,n){const[r]=Vo(n);return n=>e*(-n-r+t)+Ro}function Uo(t,e){const[n,r]=Vo(e),o=r-n+1;return e=>{const n=Z(e[0],0,1),r=Z(e[1],0,1),i=Math.min(n,r),a=Math.max(n,r),s=[0];let l=Ro;for(let e=0;e<o;e++)s.push(l+i*t),s.push((a-i)*t),l=(1-a)*t;return s.push(l+Ro),s}}function Vo(t){return[Math.floor(Math.min(-t[0],-t[1])),Math.ceil(Math.max(-t[0],-t[1]))]}function Wo(t,e){if("absent"!==t.kind)return"static"===t.kind?{kind:"static",value:e(t.value)}:{kind:"animated",keyframes:t.keyframes.map(t=>{var n,r,o,i;return{time:null!=(r=null!=(n=t.time)?n:t.t)?r:0,value:e(null!=(o=t.value)?o:t.v),easing:null!=(i=t.easing)?i:t.e}}),loop:t.loop}}function Go(t,e,n){n&&er(t,e,n)}var qo=10;function Ko(t){var e,n,r,o,i,a;const s=t=>t[0]===t[1];if("absent"===t.kind)return;if("static"===t.kind)return s(t.value)?{kind:"static",value:0}:void 0;const l=t.keyframes;let u=!1,c=!0;for(const t of l)s(null!=(e=t.value)?e:t.v)?u=!0:c=!1;if(!u)return;if(c)return{kind:"static",value:0};const f=[];for(let t=0;t<l.length;t++){const e=l[t],u=t>0?l[t-1]:void 0,c=t<l.length-1?l[t+1]:void 0,d=null!=(r=null!=(n=e.time)?n:e.t)?r:0,h=s(null!=(o=e.value)?o:e.v),m=u?h&&s(null!=(i=u.value)?i:u.v):h,p=c?h&&s(null!=(a=c.value)?a:c.v):h;m&&!p?(f.push({time:d,value:0}),f.push({time:d+qo,value:1})):!m&&p&&(f.push({time:d-qo,value:1}),f.push({time:d,value:0}))}return f.length<=1?void 0:{kind:"animated",keyframes:f}}function Zo(t,e){const n=n=>{const r=(n-t.time)/(e.time-t.time),o=t.value[0]+(e.value[0]-t.value[0])*r;return t.value[1]+(e.value[1]-t.value[1])*r-o};let r=t.time,o=e.time,i=n(r);if(0===i)return r;const a=n(o);if(0===a)return o;if(i*a>0)return null;for(let t=0;t<100;t++){const t=(r+o)/2,e=n(t);if(0===e||Math.abs(o-r)<1e-4)return t;i*e<0?o=t:(r=t,i=e)}return(r+o)/2}function Xo(t,e){if(e<=t[0].time)return t[0].value;if(e>=t[t.length-1].time)return t[t.length-1].value;for(let n=1;n<t.length;n++)if(e<=t[n].time){const r=t[n-1],o=t[n],i=(e-r.time)/(o.time-r.time);return[r.value[0]+(o.value[0]-r.value[0])*i,r.value[1]+(o.value[1]-r.value[1])*i]}return t[t.length-1].value}function Ho(t){const e=t.v;if(!e||e.length<2)return 0;let n=0;for(let r=0;r<e.length-1;r++)n+=Yo(t,r,r+1);return t.c&&e.length>1&&(n+=Yo(t,e.length-1,0)),n}function Yo(t,e,n){var r,o,i,a;const s=t.v,l=s[e],u=s[n],c=J(l,null!=(o=null==(r=t.o)?void 0:r[e])?o:l,null!=(a=null==(i=t.i)?void 0:i[n])?a:u,u);return c.ds[c.ds.length-1]}var Qo=.5522847498307936;function Jo(t){var e,n;const r={defs:[],warnings:[],errors:[],idMap:new Map,nextId:0,contentRefInnerIds:new Map,maskAncestorChains:new Map,engine:(null==(e=Bt(t))?void 0:e.mode)===Pt.frames?Ot.frames:Ot.waapi,glyphs:null==(n=Vt(t))?void 0:n.glyphs},o=cr(t);ur(o,r.idMap),fr(o,r,()=>sr(r,"inner")),function(t,e){const n=new Set,r=t=>{var o,i;const a=lr(null==(i=null==(o=t.effects)?void 0:o.maskedBy)?void 0:i.sourceId);if("string"==typeof a){n.add(t);const r=e.idMap.get(a);r&&n.add(r)}if(Array.isArray(t.children))for(const e of t.children)r(e)};if(r(t),0===n.size)return;const o=(t,r)=>{if(n.has(t)&&e.maskAncestorChains.set(t,r),Array.isArray(t.children)){const n=Mr(t,e),i=n?[...r,n]:r;for(const e of t.children)o(e,i)}};o(t,[])}(o,r);const i=function(t,e){return function(t,e){e.idMap.clear(),ur(t,e.idMap);const n=[],r=t=>{var e;Dr(t)&&n.push(t),null==(e=t.children)||e.forEach(r)};r(t);const o=new Map;for(const t of n){let n=0;const r=new Set,i=o=>{var a;if(o){if(o!==t&&Dr(o)&&n++,"use"===o.type&&o.href){const t=lr(o.href);t&&!r.has(t)&&(r.add(t),i(e.idMap.get(t)))}null==(a=o.children)||a.forEach(i)}},a=lr(t.href);a&&(r.add(a),i(e.idMap.get(a))),o.set(t,n)}n.sort((t,e)=>{var n,r;return(null!=(n=o.get(e))?n:0)-(null!=(r=o.get(t))?r:0)});for(const t of n){const n=Dr(t);if(!n)continue;const r=n.timeCrop;Rr(t),Br(t,Nr(n),e),r&&Fr(t,r,e)}}(t,e),t}($o(o,r),r);return function(t,e){e.length&&(t.children||(t.children=[])).unshift({type:"defs",children:e})}(i,r.defs),{root:i,defs:r.defs,warnings:r.warnings,errors:r.errors}}function $o(t,e){t.children&&(t.children=t.children.map(t=>$o(t,e)));const n=t.effects,r="string"==typeof t.id?t.id:void 0,o=r?e.contentRefInnerIds.get(r):void 0;if(!n&&!o)return t;const{transformBy:i,repeater:a,maskedBy:s,clipPath:l,strokeTrim:u,clone:c,fillGradient:f,strokeGradient:d,textPath:h,text:m}=null!=n?n:{};n&&delete t.effects;let p=t,v=!1;if(null==m?void 0:m.useGlyphs)if(h){const t="string"==typeof h.path?h.path:void 0,n=function(t,e,n,r,o,i){return e.glyphs?Oo(t,n,r,{glyphs:e.glyphs,warnings:e.warnings},o,i):(e.warnings.push("textGlyphs: no definitions.glyphs"),null)}(p,e,t,h.startOffset,h.textLength,h.pathOverflow);n&&(p=n,v=!0)}else p=function(t,e,n){return(null==e?void 0:e.useGlyphs)?n.glyphs?xo(t,{glyphs:n.glyphs,warnings:n.warnings}):(n.warnings.push("textGlyphs: no definitions.glyphs — left as native <text>"),t):t}(p,m,e),v=!0;return v||(p=function(t,e,n){var r;if(!e||"string"!=typeof e.path||!e.path)return t;const o=sr(n,"tpath"),{d:i,startShift:a}=$r(e.path,{pathOverflow:e.pathOverflow,startOffset:e.startOffset,textLength:e.textLength,advance:Yr(t)});n.defs.push({type:"path",id:o,d:i});const s={type:"textPath",href:"#"+o,children:null!=(r=t.children)?r:[]};return void 0!==e.lengthAdjust&&(s.lengthAdjust=e.lengthAdjust),void 0!==e.method&&(s.method=e.method),void 0!==e.spacing&&(s.spacing=e.spacing),to(s,"startOffset",Jr(e.startOffset,a)),to(s,"textLength",e.textLength),t.children=[s],t}(p,h,e)),p=function(t,e,n){return mr(t,e,n,"fill")}(p,f,e),p=function(t,e,n){return mr(t,e,n,"stroke")}(p,d,e),p=function(t,e){if(!e)return t;const n=e.subPaths===It.combined,r=[],o=t=>{if(Array.isArray(t.children)&&t.children.length>0){for(const e of t.children)o(e);return}const e="string"==typeof t.d?t.d:function(t){var e,n,r,o,i,a,s,l,u,c;if("rect"===t.type){const i=Number(null!=(e=t.x)?e:0),a=Number(null!=(n=t.y)?n:0),s=Number(null!=(r=t.width)?r:0),l=Number(null!=(o=t.height)?o:0);return"M"+(i+s)+","+a+"L"+(i+s)+","+(a+l)+"L"+i+","+(a+l)+"L"+i+","+a+"L"+(i+s)+","+a+"z"}if("ellipse"===t.type||"circle"===t.type){const e=Number(null!=(i=t.cx)?i:0),n=Number(null!=(a=t.cy)?a:0),r="circle"===t.type?Number(null!=(s=t.r)?s:0):Number(null!=(l=t.rx)?l:0),o="circle"===t.type?Number(null!=(u=t.r)?u:0):Number(null!=(c=t.ry)?c:0);if(!(r>0&&o>0))return;const f=r*Qo,d=o*Qo,h=(t,e,n,r,o,i)=>"C"+t+","+e+" "+n+","+r+" "+o+","+i;return"M"+(e+r)+","+n+h(e+r,n+d,e+f,n+o,e,n+o)+h(e-f,n+o,e-r,n+d,e-r,n)+h(e-r,n-d,e-f,n-o,e,n-o)+h(e+f,n-o,e+r,n-d,e+r,n)+"z"}}(t);if(void 0===e)return;const n=Mn(e);if(!n.length)return;const i={leaf:t,subpaths:[]};for(const t of n){const e=Ho(t);i.subpaths.push({subpath:t,lengthPx:e,startOffsetPx:0})}r.push(i)};if(o(t),!r.length)return t;let i=0;const a=n?[...r].reverse():r;for(const t of a)for(const e of t.subpaths)n||(i=0),e.startOffsetPx=i,i+=e.lengthPx;const s=i;if(n&&s<.001)return t;const l=tr(e.offset),u="absent"===l.kind?{kind:"static",value:0}:l,c=function(t){const e=tr(t);if("animated"!==e.kind)return e;const n=e.keyframes.map(t=>{var e,n,r,o;return{time:null!=(n=null!=(e=t.time)?e:t.t)?n:0,value:null!=(r=t.value)?r:t.v,easing:null!=(o=t.easing)?o:t.e}});if(!n.some(t=>t.value[0]>t.value[1]))return{kind:"animated",keyframes:n.map(t=>({time:t.time,value:t.value,easing:t.easing}))};const r=[];for(let t=1;t<n.length;t++){const e=n[t-1],o=n[t];if((e.value[1]-e.value[0])*(o.value[1]-o.value[0])<0){const t=Zo(e,o);null!==t&&t>e.time&&t<o.time&&r.push(Math.round(t))}}const o=Array.from(new Set(r)).sort((t,e)=>t-e),i=[];let a=0;for(const t of n){for(;a<o.length&&o[a]<t.time;){const t=o[a++],e=Xo(n,t),r=(e[0]+e[1])/2;i.push({time:t,value:[r,r]})}const e=t.value[0]>t.value[1]?[t.value[1],t.value[0]]:t.value;i.push({time:t.time,value:e,easing:t.easing})}for(;a<o.length;){const t=o[a++],e=Xo(n,t),r=(e[0]+e[1])/2;i.push({time:t,value:[r,r]})}return{kind:"animated",keyframes:i}}(e.range),f="absent"===c.kind?{kind:"static",value:[0,1]}:c,d=function(t){var e;if("absent"===t.kind)return[];if("static"===t.kind)return[t.value];const n=[];for(const r of t.keyframes){const t=null!=(e=r.value)?e:r.v;"number"==typeof t&&n.push(t)}return n}(u),h=[d.length?Math.min(...d):0,d.length?Math.max(...d):0];if(1===r.length&&r[0].leaf===t&&1===r[0].subpaths.length){const e=r[0],o=e.subpaths[0],i=n?s:o.lengthPx;if(i<.001)return t;const a=n?o.startOffsetPx/i:0;return function(t,e,n,r,o,i){const a=Bo(n,e,r),s=Uo(e,r),l=A({},t);return delete l.effects,Go(l,"strokeDasharray",Wo(i,s)),Go(l,"strokeDashoffset",Wo(o,a)),Go(l,"strokeOpacity",Ko(i)),l}(e.leaf,i,a,h,u,f)}const m=new Map;for(const t of r){const e=[];for(const r of t.subpaths){const o=n?s:r.lengthPx;if(o<.001)continue;const i=n?r.startOffsetPx/o:0;e.push(...Do(t.leaf,r.subpath,o,i,h,u,f))}m.set(t.leaf,Lo(t.leaf,e))}const p=t=>m.get(t)||(Array.isArray(t.children)&&t.children.length>0?w(A({},t),{children:t.children.map(p)}):t);return p(t)}(p,u),p=function(t,e,n){var r,o;if(!e)return t;const i=null!=(r=e.copies)?r:1;if(i<1)return n.errors.push("repeater.copies invalid: "+e.copies),t;const a=t.transform,s=null==(o=t.animate)?void 0:o.transform,l=cr(t);delete l.transform,l.animate&&(delete l.animate.transform,0===Object.keys(l.animate).length&&delete l.animate),delete l.id;const u=[l];for(let t=1;t<i;t++){const n=cr(l),r=Ir(e,t),o=r?or(n,r):n;u.push(o)}const c={type:"g",children:u};return t.id&&(c.id=t.id),void 0!==a&&(c.transform=a),void 0!==s&&(c.animate={transform:s}),c}(p,a,e),p=function(t,e,n,r){if(!e)return t;const o=lr(e.sourceId);if(!o)return r.errors.push("maskedBy.sourceId missing — cannot build mask"),t;const i=sr(r,"mask");let a={type:"use",href:"#"+o};if(n)a=kr(a,n,r);else if(Sr(t))a=function(t,e){var n;const r=e.animate&&"object"==typeof e.animate&&!Array.isArray(e.animate)?e.animate:void 0,o=null==r?void 0:r.transform,i=o&&"object"==typeof o&&Array.isArray(o.keyframes)?o.keyframes:void 0;if(!i||!i.length)return t;const a=[],s=[],l=[];for(const t of i){const e=(null!=(n=t.value)?n:t.v)||{},r=rr(t,void 0);if(Array.isArray(e.translate)&&a.push(w(A(A({},r),xr(t)),{value:{translate:[-e.translate[0],-e.translate[1]]}})),"number"==typeof e.rotate){const t={rotate:-e.rotate};Array.isArray(e.origin)&&(t.origin=[e.origin[0],e.origin[1]]),s.push(w(A({},r),{value:t}))}if(Array.isArray(e.scale)){const t={scale:[1/e.scale[0],1/e.scale[1]]};Array.isArray(e.origin)&&(t.origin=[e.origin[0],e.origin[1]]),l.push(w(A({},r),{value:t}))}}const u=null==o?void 0:o.loop,c=t=>{const e={keyframes:t};return void 0!==u&&(e.loop=u),e};let f=t;return a.length&&(f={type:"g",animate:{transform:c(a)},children:[f]}),s.length&&(f={type:"g",animate:{transform:c(s)},children:[f]}),l.length&&(f={type:"g",animate:{transform:c(l)},children:[f]}),f}(a,t);else{const e=function(t){if("string"==typeof t.transform){const e=function(t){var e,n,r,o,i,a,s,l,u,c,f,d,h;const m=/([a-zA-Z]+)\s*\(([^)]*)\)/g;let p;const v=[];for(;null!==(p=m.exec(t));){const t=p[2].split(/[\s,]+/).filter(t=>t.length>0).map(Number);v.push({name:p[1],args:t})}if(!v.length)return;const g=v[v.length-1];if("translate"===g.name)for(let t=v.length-2;t>=0;t--){const c=v[t];if("translate"!==c.name)continue;const f=null!=(e=c.args[0])?e:0,d=null!=(n=c.args[1])?n:0,h=null!=(r=g.args[0])?r:0,m=null!=(o=g.args[1])?o:0;if(h!==-f||m!==-d)continue;const p={};p.origin=[f,d];for(let e=0;e<t;e++)if("translate"===v[e].name){const t=null!=(i=v[e].args[0])?i:0,n=null!=(a=v[e].args[1])?a:0;p.translate=p.translate?[p.translate[0]+t,p.translate[1]+n]:[t,n]}for(let e=t+1;e<v.length-1;e++){const t=v[e];if("rotate"===t.name)p.rotate=(null!=(s=p.rotate)?s:0)+(null!=(l=t.args[0])?l:0);else if("scale"===t.name){const e=null!=(u=t.args[0])?u:1,n=t.args.length>1?t.args[1]:e;p.scale=p.scale?[p.scale[0]*e,p.scale[1]*n]:[e,n]}}return p}let y,b,k;for(const t of v)if("translate"===t.name){const e=null!=(c=t.args[0])?c:0,n=null!=(f=t.args[1])?f:0;y=y?[y[0]+e,y[1]+n]:[e,n]}else if("rotate"===t.name)b=(null!=b?b:0)+(null!=(d=t.args[0])?d:0);else if("scale"===t.name){const e=null!=(h=t.args[0])?h:1,n=t.args.length>1?t.args[1]:e;k=k?[k[0]*e,k[1]*n]:[e,n]}const A={};return y&&(A.translate=y),void 0!==b&&(A.rotate=b),k&&(A.scale=k),Object.keys(A).length?A:void 0}(t.transform);if(!e)return;const n={};return e.translate&&(n.translate=e.translate),void 0!==e.rotate&&(n.rotate=e.rotate),e.scale&&(n.scale={value:e.scale}),e.origin&&(n.origin=e.origin),Object.keys(n).length?n:void 0}if(t.transform&&"object"==typeof t.transform&&!t.transform.keyframes){const e=t.transform.value,n=e&&"object"==typeof e?e:t.transform;if(n&&"object"==typeof n){const t={};return Array.isArray(n.translate)&&(t.translate=n.translate),"number"==typeof n.rotate&&(t.rotate=n.rotate),"number"==typeof n.skew&&(t.skew=n.skew),Array.isArray(n.scale)&&(t.scale={value:n.scale}),Array.isArray(n.origin)&&(t.origin=n.origin),Object.keys(t).length?t:void 0}}}(t);e&&(a=kr(a,e,r))}const s=void 0===n&&!function(t){return"string"==typeof t.transform||!(!t.transform||"object"!=typeof t.transform)||Sr(t)}(t);a=function(t,e,n,r,o){const i=r.idMap.get(n),a=r.maskAncestorChains.get(e)||[],s=o?Mr(e,r):void 0,l=s?[...a,s]:a,u=i&&r.maskAncestorChains.get(i)||[];if(!l.length&&!u.length)return t;const c=new Set;for(const t of l)if(t.translateKeyframes)for(const e of t.translateKeyframes)c.add(e.time);for(const t of u)if(t.translateKeyframes)for(const e of t.translateKeyframes)c.add(e.time);if(!(c.size>0)){const e=jr(l),n=jr(u),r=n[0]-e[0],o=n[1]-e[1];return 0===r&&0===o?t:{type:"g",transform:"translate("+r+","+o+")",children:[t]}}return{type:"g",animate:{transform:{keyframes:Array.from(c).sort((t,e)=>t-e).map(t=>{const e=Pr(l,t),n=Pr(u,t);return{time:t,value:{translate:[n[0]-e[0],n[1]-e[1]]}}})}},children:[t]}}(a,t,o,r,s);const l={type:"mask",id:i,children:[a]};return e.maskType&&(l.maskType=e.maskType),e.maskUnits&&(l.maskUnits=e.maskUnits),e.maskContentUnits&&(l.maskContentUnits=e.maskContentUnits),void 0!==e.x&&(l.x=String(e.x)),void 0!==e.y&&(l.y=String(e.y)),void 0!==e.width&&(l.width=String(e.width)),void 0!==e.height&&(l.height=String(e.height)),r.defs.push(l),t.mask="url(#"+i+")",t}(p,s,i,e),p=function(t,e,n){if(!(null==e?void 0:e.d))return t;const r=sr(n,"clip"),o={type:"path"},i=tr(e.d);return"absent"!==i.kind&&("static"===i.kind?o.d=br(i.value):(er(o,"d",i),void 0!==o.d&&(o.d=br(o.d)))),n.defs.push({type:"clipPath",id:r,children:[o]}),t.clipPath="url(#"+r+")",t}(p,l,e),o?(Er(p,c,e),p=function(t,e,n,r){const o=function(t,e){var n,r,o;const i={};let a=!1;const s=null==(n=t.animate)?void 0:n.transform;if(s&&"object"==typeof s&&Array.isArray(s.keyframes)){const e=s.keyframes;if(e.some(t=>t.value&&t.value.translate)){const n=hr(s),r={keyframes:e.map(t=>{const e=t.value||{},r={};void 0!==e.translate&&(r.translate=e.translate),n&&void 0!==e.origin&&(r.origin=e.origin);const o={value:r};return void 0!==t.time&&(o.time=t.time),void 0!==t.easing&&(o.easing=t.easing),void 0!==t.tangentOut&&(o.tangentOut=t.tangentOut),void 0!==t.tangentIn&&(o.tangentIn=t.tangentIn),o})};s.autoOrient&&(r.autoOrient=!0);const o=s.loop;void 0!==o&&(r.loop=o),i.animate={transform:r};const l=e.some(t=>{const e=t.value||{};return void 0!==e.rotate||void 0!==e.scale}),u=e.map(t=>{const e=t.value||{},r={};void 0!==e.rotate&&(r.rotate=e.rotate),void 0!==e.scale&&(r.scale=e.scale),void 0===e.origin||n&&!l||(r.origin=e.origin);const o={value:r};return void 0!==t.time&&(o.time=t.time),void 0!==t.easing&&(o.easing=t.easing),o});if(u.every(t=>0===Object.keys(t.value).length))delete t.animate.transform,t.animate&&0===Object.keys(t.animate).length&&delete t.animate;else{const e={keyframes:u};void 0!==o&&(e.loop=o),t.animate.transform=e}a=!0}}const l=void 0!==(null==e?void 0:e.translate),u=a||l,c=a&&hr((null==(r=t.animate)?void 0:r.transform)||void 0)||a&&hr((null==(o=i.animate)?void 0:o.transform)||void 0);if("string"==typeof t.transform){const e=function(t){const e=[],n=/(translate|rotate|scale|matrix|skewX|skewY)\(([^)]*)\)/g;let r;for(;r=n.exec(t);)e.push({name:r[1],full:r[0]});if(!e.length)return{rest:t||void 0};if(e.every(t=>"translate"===t.name))return{translate:e.map(t=>t.full).join("")};const o=e[0],i=e[e.length-1];if("translate"===i.name&&"translate"===o.name){const n=dr(i.full),r=dr(o.full),a=-n[0],s=-n[1],l=r[0]-a,u=r[1]-s;return 0===l&&0===u?{rest:t}:{translate:"translate("+l+","+u+")",rest:"translate("+a+","+s+")"+e.slice(1).map(t=>t.full).join("")}}if("translate"===i.name)return{rest:t};const a=[];let s=0;for(;s<e.length&&"translate"===e[s].name;)a.push(e[s].full),s++;if(!a.length)return{rest:t};const l=e.slice(s).map(t=>t.full).join("");return{translate:a.join(""),rest:l||void 0}}(t.transform);u?void 0!==e.translate?e.rest?t.transform=e.rest:delete t.transform:(function(t){const e=/(translate|rotate|scale|matrix|skewX|skewY)\(([^)]*)\)/g,n=[];let r;for(;r=e.exec(t);)n.push({name:r[1],full:r[0]});if(1!==n.length)return!1;if("translate"===n[0].name)return!0;if("matrix"!==n[0].name)return!1;const o=/matrix\(([^)]*)\)/.exec(n[0].full);if(!o)return!1;const i=o[1].split(/[\s,]+/).filter(Boolean).map(Number);return i.length>=4&&1===i[0]&&0===i[1]&&0===i[2]&&1===i[3]}(t.transform)||c&&function(t){const e=/(translate|rotate|scale|matrix|skewX|skewY)\(([^)]*)\)/g;let n,r=0,o=!1;for(;n=e.exec(t);)r++,"matrix"===n[1]&&(o=!0);return 1===r&&o}(t.transform))&&delete t.transform:e.translate&&(i.transform=e.translate,e.rest?t.transform=e.rest:delete t.transform)}else if(t.transform&&"object"==typeof t.transform&&!Array.isArray(t.transform)&&!t.transform.keyframes){const e=t.transform.value,n=!(!e||"object"!=typeof e),r=n?e:t.transform,o=t=>n?{value:t}:t;if(Array.isArray(r.translate)){const e=A({},r);delete e.translate;const n=Object.keys(e).length>0;u||(i.transform=o({translate:r.translate})),n?t.transform=o(e):delete t.transform}}return i}(t,e);"string"==typeof t.id&&delete t.id;const{outer:i,inner:a}=function(t){if(!t)return{};const e=hr(t.translate),n=void 0!==t.rotate||void 0!==t.scale,r={},o={};return void 0!==t.translate&&(r.translate=t.translate),e&&void 0!==t.origin&&(r.origin=t.origin),void 0!==t.rotate&&(o.rotate=t.rotate),void 0!==t.scale&&(o.scale=t.scale),void 0!==t.skew&&(o.skew=t.skew),void 0===t.origin||e&&!n||(o.origin=t.origin),{outer:Object.keys(r).length?r:void 0,inner:Object.keys(o).length?o:void 0}}(e);let s=t;s=or(s,a);let l={type:"g",id:n,children:[{type:"g",id:r,children:[s]}]};return void 0!==o.transform&&(l.transform=o.transform),void 0!==o.animate&&(l.animate=o.animate),i&&(delete l.id,l=or(l,i),l.id=n),l}(p,i,r,o)):p=function(t,e,n,r){return Er(t,e,r),or(t,n)}(p,c,i,e),(null==c?void 0:c.retime)&&(t.effects={clone:{retime:c.retime}}),r&&e.idMap.set(r,p),p}var ti=t=>{var e,n;return null!=(n=null!=(e=t.t)?e:t.time)?n:0},ei=t=>{var e;return null!=(e=t.v)?e:t.value},ni=t=>{var e;return null!=(e=t.e)?e:t.easing},ri=t=>{var e;return null!=(e=t.tangentIn)?e:t.ti},oi=t=>{var e;return null!=(e=t.tangentOut)?e:t.to};function ii(t,e,n,r,o){const i=1-o,a=i*i*i,s=3*i*i*o,l=3*i*o*o,u=o*o*o;return[a*t[0]+s*e[0]+l*n[0]+u*r[0],a*t[1]+s*e[1]+l*n[1]+u*r[1]]}function ai(t,e,n,r,o=64){let i=0,a=t;for(let s=1;s<=o;s++){const l=ii(t,e,n,r,s/o);i+=Math.hypot(l[0]-a[0],l[1]-a[1]),a=l}return i}var si=t=>{const e=Math.round(1e4*t)/1e4;return Object.is(e,-0)?"0":String(e)};function li(t,e,n){var r,o;let i=Jo(t).root;return i=function(t){const e=t=>{var n;let r=t;const o=t.animate,i=null==o?void 0:o.transform;if(i){const e=function(t){var e,n,r;if("offsetPath"!==t.alongPathMode)return;const o=t.keyframes;if(!o||o.length<2)return;const i=ei(o[0]),a=(null==i?void 0:i.origin)&&i.origin.length>=2?[i.origin[0],i.origin[1]]:[0,0],s=[];for(const t of o){const n=ei(t),r=null==n?void 0:n.translate;if(!r||r.length<2)return;if(Object.keys(n).some(t=>"translate"!==t&&"origin"!==t))return;const o=null!=(e=null==n?void 0:n.origin)?e:[0,0];if(o[0]!==a[0]||o[1]!==a[1])return;s.push([r[0]+a[0],r[1]+a[1]])}if(!o.some(t=>ri(t)||oi(t)))return;let l="M"+si(s[0][0])+","+si(s[0][1]);const u=[];for(let t=0;t<s.length-1;t++){const e=s[t],i=s[t+1],a=null!=(n=oi(o[t]))?n:[0,0],c=null!=(r=ri(o[t+1]))?r:[0,0],f=[e[0]+a[0],e[1]+a[1]],d=[i[0]+c[0],i[1]+c[1]];l+="C"+si(f[0])+","+si(f[1])+","+si(d[0])+","+si(d[1])+","+si(i[0])+","+si(i[1]),u.push(ai(e,f,d,i))}const c=u.reduce((t,e)=>t+e,0);if(!(c>0))return;const f=[];let d=0;for(let t=0;t<o.length;t++){t>0&&(d+=u[t-1]);const e={t:ti(o[t]),v:d/c},n=ni(o[t]);void 0!==n&&(e.e=n),f.push(e)}return{pathStr:l,distanceKfs:f,autoOrient:!!t.autoOrient,anchor:a}}(i);if(e){const n=A({},o);delete n.transform;const a={keyframes:e.distanceKfs};void 0!==i.loop&&(a.loop=i.loop),n.offsetDistance=a;const s=t.transform;let l=s;if(s&&"object"==typeof s){const t=A({},s);delete t.translate,delete t.origin,l=Object.keys(t).length?t:void 0}r=w(A({},t),{animate:n,style:w(A({},t.style),{offsetPath:"path('"+e.pathStr+"')",offsetAnchor:si(e.anchor[0])+"px "+si(e.anchor[1])+"px",offsetRotate:e.autoOrient?"auto":"0deg",offsetDistance:"0%"})}),void 0!==l?r.transform=l:delete r.transform}}if(null==(n=r.children)?void 0:n.length){const t=r.children.map(e);t.some((t,e)=>t!==r.children[e])&&(r=w(A({},r),{children:t}))}return r};return e(t)}(i),i=Dn(i,null!=(o=null==(r=Bt(i))?void 0:r.duration)?o:V),e===Ot.waapi&&(i=Sn(i,null==n?void 0:n.motionPath),i=Xn(i),i=function(t){const e=(t,n)=>{var r;n(t),null==(r=t.children)||r.forEach(t=>e(t,n))};let n=!0;for(;n;){n=!1;const r=new Set;e(t,t=>{var e;"use"===t.type&&"string"==typeof t.href&&r.add((e=t.href).startsWith("#")?e.slice(1):e)}),e(t,t=>{if(!t.children)return;let e=t.children;"defs"===t.type&&(e=e.filter(t=>!(("g"===t.type||"symbol"===t.type)&&"string"==typeof t.id&&!r.has(t.id)))),e=e.filter(t=>!("defs"===t.type&&(!t.children||0===t.children.length))),e.length!==t.children.length&&(t.children=e,n=!0)})}return t}(i)),i}function ui(t){const e=globalThis;"function"!=typeof e.cancelAnimationFrame?e.clearTimeout(t):e.cancelAnimationFrame(t)}function ci(t,e,n){var r;const o=Bt(t)||{},i=Un(t,Ot.frames),a=o.iterations;let s=1;"number"==typeof a&&(s=a||1),"infinite"===a&&(s=1/0),s<1&&(s=1);const l=+(o.duration||V),u=l&&s?l*(s===1/0?1/0:s):l?(null!=s?s:1)*l:0,c=o.direction||"normal",f=null!=(r=o.fill)?r:"forwards",d="forwards"===f||"both"===f,h="backwards"===f||"both"===f;let m=null,p=!1,v=-(o.delay||0),g=0,y=1,b=!1;const k=o.frameRate,A=k&&k>0?1e3/k:0;let w=0;const x=()=>{const t=g?(Date.now()-g)*y:0;return v+t},S=()=>{let t=x();return Number.isFinite(u)&&t>u&&(t=u),t<0&&(t=0),t};function j(t){let n=function(){const e=l>0?l:1;let n=0,r=0;l>0?(t=Z(t,0,s*e),r=Math.max(0,Math.ceil(t/e)-1),r=Math.min(r,s-1),n=Z((t-r*e)/e,0,1)):n=t;const o=c||"normal";let i=n;return"reverse"===o?i=1-n:"alternate"===o?r%2==1&&(i=1-n):"alternate-reverse"===o&&r%2==0&&(i=1-n),i}();for(const t of i||[]){const r=t.animate;if(!r||"object"!=typeof r||Array.isArray(r)){console.warn("Empty or unresolved binding",t);continue}const o=Wn(r,n*l);for(const[n,r]of Object.entries(o))e.setAttribute(t.id,n,r)}}o.delay&&(o.delay<0?j(S()):h&&j(0));const P=()=>!!p&&!!e.isConnected()&&(y<0?x()>0:!(Number.isFinite(u)&&S()>=u)),O=t=>{null!==m&&(ui(m),m=null),(t||P())&&(m=function(t){const e=globalThis;return"function"==typeof e.requestAnimationFrame?e.requestAnimationFrame(t):e.setTimeout(t,16)}(()=>{m=null,(()=>{var t,r;if(!e.isConnected())return void M();const o=S(),i=x();if(i<0&&y>0)h&&j(0);else{if(y<0&&i<=0)return M(),j(0),void(b||(b=!0,null==(t=null==n?void 0:n.onFinish)||t.call(n)));if(y>0&&u&&Number.isFinite(u)&&o>=u)return M(),j(d?u:0),void(b||(b=!0,null==(r=null==n?void 0:n.onFinish)||r.call(n)));if(A>0){const t=Date.now();if(w&&t-w<A)return;w=t}j(o)}})(),O()}))},M=()=>{if(!p)return;let t=x();Number.isFinite(u)&&t>u&&(t=u),v=t,g=0,p=!1,null!==m&&(ui(m),m=null),t>=0?j(t):h&&j(0)},_={isReady:()=>!0,getRootElement:()=>null,isPlaying:()=>P(),play:()=>{var t;(()=>{if(!p){if(y>=0)Number.isFinite(u)&&v>=u&&(v=0);else if(v<=0){if(!Number.isFinite(u))return void console.warn("play: cannot start reverse playback of an infinite animation from time 0");v=u}b=!1,p=!0,g=Date.now(),O(!0)}})(),null==(t=null==n?void 0:n.onPlay)||t.call(n)},pause:()=>{var t;M(),null==(t=null==n?void 0:n.onPause)||t.call(n)},cancel:()=>{var t;M(),v=0,g=0,p=!1,b=!1,j(v),null==(t=null==n?void 0:n.onCancel)||t.call(n)},finish:()=>{((t=!0)=>{var e;v=Number.isFinite(u)?u:S(),g=0,p=!1,null!==m&&(ui(m),m=null),j(d?v:0),t&&!b&&(b=!0,null==(e=null==n?void 0:n.onFinish)||e.call(n))})(!0)},setPlaybackRate:t=>{if(!isFinite(t)||0===t)return void console.warn("setPlaybackRate: rate must be finite and non-zero");let e=x();Number.isFinite(u)&&e>u&&(e=u),t<0!=y<0&&(b=!1),y=t,v=e,p&&(g=Date.now())},getCurrentTime:()=>S(),setCurrentTime:t=>{t<0&&(t=0),Number.isFinite(u)&&t>u&&(t=u),v=t,p&&(g=Date.now()),(!Number.isFinite(u)||t<u)&&(b=!1),j(S())},destroy:()=>{var t;_.cancel(),null==(t=null==n?void 0:n.onRemove)||t.call(n)}};return _}var fi=[1,0,0,1,0,0];function di(t,e){return[t[0]*e[0]+t[2]*e[1],t[1]*e[0]+t[3]*e[1],t[0]*e[2]+t[2]*e[3],t[1]*e[2]+t[3]*e[3],t[0]*e[4]+t[2]*e[5]+t[4],t[1]*e[4]+t[3]*e[5]+t[5]]}var hi=(t,e)=>[1,0,0,1,t,e],mi=(t,e)=>[t,0,0,e,0,0];function pi(t){const e=t*Math.PI/180;return[Math.cos(e),Math.sin(e),-Math.sin(e),Math.cos(e),0,0]}var vi=t=>[1,0,Math.tan(t*Math.PI/180),1,0,0],gi=t=>[1,Math.tan(t*Math.PI/180),0,1,0,0];function yi(t){let e=fi;t.translate&&(e=di(e,hi(t.translate[0],t.translate[1])));const n=t.origin&&(void 0!==t.rotate||t.scale);return n&&(e=di(e,hi(t.origin[0],t.origin[1]))),void 0!==t.rotate&&(e=di(e,pi(t.rotate))),t.scale&&(e=di(e,mi(t.scale[0],t.scale[1]))),n&&(e=di(e,hi(-t.origin[0],-t.origin[1]))),e}function bi(t,e,n){return t+(e-t)*n}function ki(t,e){return null==t?fi:"string"==typeof t?function(t){let e=fi;const n=/(translate|rotate|scale|matrix|skewX|skewY)\(([^)]*)\)/g;let r;for(;r=n.exec(t);){const t=r[1],n=r[2].split(/[\s,]+/).filter(Boolean).map(Number);"translate"===t?e=di(e,hi(n[0]||0,n[1]||0)):"scale"===t?e=di(e,mi(n[0],n.length>1?n[1]:n[0])):"rotate"===t?e=di(e,pi(n[0])):"skewX"===t?e=di(e,vi(n[0])):"skewY"===t?e=di(e,gi(n[0])):"matrix"===t&&(e=di(e,[n[0],n[1],n[2],n[3],n[4],n[5]]))}return e}(t):t.keyframes?yi(function(t,e){var n,r,o,i,a,s,l;if(!t.length)return{};if(e<=(null!=(n=t[0].time)?n:0))return t[0].value||{};if(e>=(null!=(r=t[t.length-1].time)?r:0))return t[t.length-1].value||{};let u=0;for(;u<t.length-1&&(null!=(o=t[u+1].time)?o:0)<e;)u++;const c=t[u],f=t[u+1],d=(e-(null!=(i=c.time)?i:0))/((null!=(a=f.time)?a:0)-(null!=(s=c.time)?s:0)||1),h=c.value||{},m=f.value||{},p={};return h.translate&&m.translate?p.translate=[bi(h.translate[0],m.translate[0],d),bi(h.translate[1],m.translate[1],d)]:p.translate=h.translate||m.translate,void 0!==h.rotate&&void 0!==m.rotate?p.rotate=bi(h.rotate,m.rotate,d):p.rotate=null!=(l=h.rotate)?l:m.rotate,h.scale&&m.scale?p.scale=[bi(h.scale[0],m.scale[0],d),bi(h.scale[1],m.scale[1],d)]:p.scale=h.scale||m.scale,p.origin=h.origin||m.origin,p}(t.keyframes,e)):t.value?yi(t.value):"object"!=typeof t||Array.isArray(t)?fi:yi(t)}var Ai=new Set(["svg","g","symbol"]),wi=new Set(["defs","mask","clipPath","title"]);function xi(t,e){var n;"string"==typeof t.id&&e.set(t.id,t),null==(n=t.children)||n.forEach(t=>xi(t,e))}function Si(t){return null==t?0:Number(t)}function ji(t){return Math.round(100*t)/100+0}function Pi(t,e,n,r,o){var i;const a=t.type||"";if(wi.has(a))return;const s=di(e,function(t,e){return t.animate&&t.animate.transform?ki(t.animate.transform,e):void 0!==t.transform?ki(t.transform,e):fi}(t,n));if("use"===a){const e="string"==typeof t.href?t.href.replace(/^#/,""):"",i=r.get(e),a=di(s,hi(Si(t.x),Si(t.y)));return void(i?Pi(i,a,n,r,o):o.push("UNRESOLVED_USE:#"+e))}Ai.has(a)?null==(i=t.children)||i.forEach(t=>Pi(t,s,n,r,o)):o.push(function(t,e,n){var r,o,i,a,s;const l=null!=(r=t.fill)?r:"",u=null!=(o=t.stroke)?o:"",c=null!=(a=null!=(i=t["stroke-width"])?i:t.strokeWidth)?a:"",f=ji(function(t,e,n,r){var o,i,a,s,l,u;if(t&&t.keyframes&&t.keyframes.length){const e=t.keyframes;if(r<=(null!=(o=e[0].time)?o:0))return e[0].value;if(r>=(null!=(i=e[e.length-1].time)?i:0))return e[e.length-1].value;let n=0;for(;n<e.length-1&&(null!=(a=e[n+1].time)?a:0)<r;)n++;const c=e[n],f=e[n+1],d=(r-(null!=(s=c.time)?s:0))/((null!=(l=f.time)?l:0)-(null!=(u=c.time)?u:0)||1);return bi(c.value,f.value,d)}return void 0!==e?Number(e):1}(null==(s=t.animate)?void 0:s.opacity,t.opacity,0,n)),d=t.mask?1:0,h=e.map(ji).join(",");return t.type+"|"+function(t){var e;switch(t.type){case"rect":return Si(t.width)+","+Si(t.height)+","+Si(t.x)+","+Si(t.y);case"ellipse":return Si(t.rx)+","+Si(t.ry)+","+Si(t.cx)+","+Si(t.cy);case"circle":return Si(t.r)+","+Si(t.cx)+","+Si(t.cy);case"path":return String(null!=(e=t.d)?e:"");default:return""}}(t)+"|["+h+"]|f:"+l+"|s:"+u+"|sw:"+(Si(c)||"")+"|o:"+f+"|m:"+d}(t,s,n))}function Oi(t,e){var n;e.add(0),(t=>{var n;if(t&&"object"==typeof t)for(const r of Object.keys(t)){const o=null==(n=t[r])?void 0:n.keyframes;Array.isArray(o)&&o.forEach(t=>{var n;return e.add(null!=(n=t.time)?n:0)})}})(t.animate),t.transform&&"object"==typeof t.transform&&t.transform.keyframes&&t.transform.keyframes.forEach(t=>{var n;return e.add(null!=(n=t.time)?n:0)}),null==(n=t.children)||n.forEach(t=>Oi(t,e))}function Mi(t,e){const n=new Map;xi(t,n);const r=[];return Pi(t,fi,e,n,r),r.sort()}function _i(t,e){const n=new Set;Oi(t,n),Oi(e,n);const r=[];for(const o of Array.from(n).sort((t,e)=>t-e)){const n=Mi(t,o),i=Mi(e,o),a=Ei(n,i),s=Ei(i,n);(a.length||s.length)&&r.push({time:o,onlyInA:a,onlyInB:s})}return r}function Ei(t,e){const n=new Map;for(const t of e)n.set(t,(n.get(t)||0)+1);const r=[];for(const e of t){const t=n.get(e)||0;t>0?n.set(e,t-1):r.push(e)}return r}function Ii(t,e){const{startOn:n,outAction:r="continue",scrollIntoViewThreshold:o=0}=e,i=t.getRootElement();if(!i)return console.warn("setupAnimationTriggers: No root element found for animation."),t;let a=!1;const s=()=>{a&&(a=!1,t.setPlaybackRate(1)),t.play()},l=()=>{switch(r){case"pause":t.pause();break;case"reset":t.cancel();break;case"reverse":a=!0,t.setPlaybackRate(-1),t.play()}};switch(n){case"load":{const t=()=>s();"complete"===document.readyState?t():window.addEventListener("load",t,{once:!0});break}case"mouseOver":{let t=!1;const e=()=>{t=!0,s()},n=()=>{t&&l()};i.addEventListener("mouseenter",e),i.addEventListener("mouseleave",n);break}case"click":{const e=()=>{t.isPlaying()?l():s()};i.addEventListener("click",e);break}case"scrollIntoView":{const t=t=>{var e,n;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,a=null!=(n=null==(e=t.rootBounds)?void 0:e.height)?n:1/0,s=Math.min(i,a),l=Math.min(r.height,Number.isFinite(s)?s:r.height);return l>0?o.height/l:t.intersectionRatio},e=Array.from({length:21},(t,e)=>e/20);let n=!1;new IntersectionObserver(e=>{e.forEach(e=>{e.isIntersecting&&t(e)>=o?(n=!0,s()):n&&(n=!1,l())})},{threshold:e}).observe(i);break}}return t}function zi(t){return"#"+t}function Ti(t,e,n,r){const o=Bt(t)||{};if(!r)if(t.id){const e=zi(t.id);(r=document.querySelector(e))||console.warn("createFrameLoopAnimator: No root element found for selector: ",e)}else console.warn("createFrameLoopAnimator: No root element provided");const i=ci(t,e||function(t){const e=new Set;return{isConnected:()=>!t||t.isConnected,setAttribute:(n,r,o)=>{r=K(r);const i=zi(n),a=(null==t?void 0:t.querySelectorAll(i))||document.querySelectorAll(i);0!==a.length||e.has(i)||(e.add(i),console.warn('setAttribute: No elements found for selector "'+i+'"'));for(let t=0;t<a.length;t++){const e=a[t],n="transform"===r&&"pattern"===e.tagName?"patternTransform":r;e.setAttribute(n,o),U.has(r)&&(e.style[r]=o)}}}}(r),n),a=f(c({},i),{getRootElement:()=>r||null});return o.trigger&&(tt(o)?console.warn("scroll timeline: `animator.trigger` is ignored (triggers do not apply to scroll-driven playback)"):Ii(a,o.trigger)),a}function Ni(t,e,n,r){var o,i;let a=null!=(o=t.v)?o:t.value;const s=null!=(i=t.e)?i:t.easing,l={offset:e,easing:s&&Array.isArray(s)?"cubic-bezier("+s.join(",")+")":void 0};let u,c=n;return L.has(n)&&Array.isArray(a)?u=C(a):"transform"!==n||null===a||"object"!=typeof a||Array.isArray(a)?D.has(n)?(Array.isArray(a)&&("translate"===n&&(a=a.map(t=>t+"px")),a=a.join(",")),"rotate"===n&&(a+="deg"),u=n+"("+a+")",c="transform"):u="d"===n?'path("'+(a&&"object"==typeof a&&Array.isArray(a.paths)?a.paths:[]).map(t=>S(t,!0)).join("")+'")':R.has(n)&&"number"==typeof a?100*a+"%":""+a:(u=B(a,{withUnits:!0}),c="transform"),CSS.supports(K(c),u)||r.add(c),c=W(c),l[c]=u,l}function Ci(t,e,n){var r,o,i,a,s;const l=[];for(let u=0;u<e.length;u++){const d=e[u],h=null!=(r=d.t)?r:0;if(h<0){const n=e[u+1];if(n&&(null!=(o=n.t)?o:0)>=0){const e=(0-h)/((null!=(i=n.t)?i:0)-h),r=d.e?I(d.e)(e):e,{right:o}=T(d.e,e);l.push({t:0,v:Nn(t,d.v,n.v,r),e:o})}continue}if(h>n){const r=e[u-1];if(r&&(null!=(a=r.t)?a:0)<=n){const e=null!=(s=r.t)?s:0,o=(n-e)/(h-e),i=r.e?I(r.e)(o):o,{left:a}=T(r.e,o);l.length>0&&(l[l.length-1]=f(c({},l[l.length-1]),{e:a})),l.push({t:n,v:Nn(t,r.v,d.v,i),e:void 0})}break}l.push(d)}return l}function Fi(t,e,n){var r;const o=new Map;for(const[i,a]of Object.entries(t)){const t=n.duration||1,s=Ci(i,a.keyframes||[],t),l=[];for(let n=0;n<s.length;n++){const o=s[n],a=Ni(o,Z((null!=(r=o.t)?r:0)/t,0,1),i,e);0===n&&(a.offset||0)>0&&l.push(f(c({},a),{offset:0})),l.push(a)}l.length>0&&(l[l.length-1].offset||0)<1&&l.push(f(c({},l[l.length-1]),{offset:1})),l.length>0&&o.set(i,l)}return o}function Li(t,e,n,r,o){var i;const a=Bt(t)||{};if(!n)if(t.id){const e=zi(t.id);(n=document.querySelector(e))||console.warn("createFrameLoopAnimator: No root element found for selector: ",e)}else console.warn("createFrameLoopAnimator: No root element provided");const s=Un(t,Ot.waapi),l=[],u=a.iterations;let c;"number"==typeof u&&(c=u),"infinite"===u&&(c=1/0);const f=new Set;let d=!1,h=!1;(null==s?void 0:s.length)||console.warn("createWebApiAnimator: No animation bindings defined");for(const t of s||[]){const r=t.animate;if(!r||"object"!=typeof r||Array.isArray(r)){console.warn("createWebApiAnimator: Empty or unresolved binding",t);continue}const s=zi(t.id),u=(null==n?void 0:n.querySelectorAll(s))||document.querySelectorAll(s);0===u.length&&console.warn('createWebApiAnimator: No elements found for selector "'+s+'"');const m=Fi(r,f,a),p=a.delay&&a.delay>0?a.delay:void 0;let v;if(a.delay&&a.delay<0&&a.duration){const t=-a.delay;v=c===1/0?t%a.duration:Math.min(t,a.duration*(null!=c?c:1))}const g={duration:a.duration,delay:p,fill:null!=(i=a.fill)?i:"forwards",direction:a.direction,iterations:c};for(let t=0;t<u.length;t++){const n=u[t];for(const[,t]of m)if(t.length>0)try{const r=new KeyframeEffect(n,t,g),i=new Animation(r,o?o.timeline:document.timeline);if(o){const t=i;o.rangeStart&&(t.rangeStart=o.rangeStart),o.rangeEnd&&(t.rangeEnd=o.rangeEnd)}(null==e?void 0:e.onFinish)&&(i.onfinish=()=>{var t;d||(d=!0,null==(t=e.onFinish)||t.call(e))}),(null==e?void 0:e.onRemove)&&(i.onremove=()=>{var t;h||(h=!0,null==(t=e.onRemove)||t.call(e))}),void 0!==v&&(i.currentTime=v),l.push(i)}catch(t){console.warn(t)}}}if(!r&&f.size)return console.warn("Unsupported CSS attrs: "+[...f].join(", ")),null;const m={isReady:()=>!0,getRootElement:()=>n||null,isPlaying:()=>{var t;return"running"===(null==(t=l[0])?void 0:t.playState)},play:()=>{var t;d=!1,l.forEach(t=>t.play()),null==(t=null==e?void 0:e.onPlay)||t.call(e)},pause:()=>{var t;l.forEach(t=>t.pause()),null==(t=null==e?void 0:e.onPause)||t.call(e)},cancel:()=>{var t;d=!1,l.forEach(t=>t.cancel()),null==(t=null==e?void 0:e.onCancel)||t.call(e)},finish:()=>{var t;for(const e of l)try{(null==(t=e.effect)?void 0:t.getTiming().iterations)===1/0?(e.effect.updateTiming({iterations:1}),e.finish(),e.effect.updateTiming({iterations:1/0})):e.finish()}catch(t){e.cancel()}},setPlaybackRate:t=>(l.forEach(e=>e.playbackRate=t),m),getCurrentTime:()=>{var t,e;const n=null!=(e=null==(t=l[0])?void 0:t.currentTime)?e:null;return null!==n?+n:null},setCurrentTime:t=>{d=!1,l.forEach(e=>{e.currentTime=t})},destroy:()=>{var t;m.cancel(),l.splice(0,l.length),h||(h=!0,null==(t=null==e?void 0:e.onRemove)||t.call(e))}};return a.trigger&&("scroll"===a.timelineSource?console.warn("scroll timeline: `animator.trigger` is ignored (triggers do not apply to scroll-driven playback)"):Ii(m,a.trigger)),o&&l.forEach(t=>t.play()),m}function Di(t,e,n){var r,o,i;const a="number"==typeof(null==t?void 0:t.fraction)?t.fraction:e,s=null==(o=null==(r=globalThis.CSS)?void 0:r.percent)?void 0:o.call(r,100*a);if(void 0!==s)return n?{rangeName:null!=(i=null==t?void 0:t.phase)?i:"cover",offset:s}:{offset:s}}function Ri(t,e){const n=document.body,r=document.documentElement;for(let o=t.parentElement;o;o=o.parentElement){if(o===n||o===r)return null;const t=getComputedStyle(o),i="y"===e?t.overflowY:t.overflowX;if("auto"===i||"scroll"===i||"hidden"===i||"overlay"===i)return o}return null}function Bi(){return document.scrollingElement||document.documentElement}var Ui="parent",Vi="scroller";function Wi(t,e){var n,r;const o=null==e?void 0:e.trim();if(!o)return t;if(o===Ui){let e=null;for(let n=t.parentElement;n&&n!==document.body;n=n.parentElement){const t=getComputedStyle(n).position;"sticky"!==t&&"fixed"!==t||(e=n)}return null!=(r=null!=(n=null==e?void 0:e.parentElement)?n:t.parentElement)?r:t}if(o===Vi)return Ri(t,"y")||Ri(t,"x")||Bi();let i=null;try{i=document.querySelector(o)}catch(e){return console.warn('scroll timeline: subject "'+o+'" is not a valid selector — measuring the SVG itself'),t}return i||(console.warn('scroll timeline: subject "'+o+'" matched no element — measuring the SVG itself'),t)}function Gi(t,e){const n=t;if(!(null==e?void 0:e.pin)||!n.style)return()=>{};const r=n.style,o=r.position,i=r.top;r.position="sticky";const a="center"===e.pinAlign?.5:"bottom"===e.pinAlign?1:0,s=()=>{var n;const o=null!=(n=e.pinTop)?n:0;if(!a)return void(r.top=o+"px");const i=function(t){const e=Ri(t,"y");return e?e.clientHeight:document.documentElement.clientHeight}(t),s=t.getBoundingClientRect().height;r.top=Math.round((i-s)*a+o)+"px"};s();let l=null;const u=a?s:null;a&&(u&&window.addEventListener("resize",u),"undefined"!=typeof ResizeObserver&&(l=new ResizeObserver(s),l.observe(t)));let c=null;const f=t.parentElement;return e.pinDistance&&e.pinDistance>0&&f&&(c=document.createElement("div"),c.setAttribute("data-px-pin",""),c.style.height=100*e.pinDistance+"vh",f.insertBefore(c,t),c.appendChild(t)),()=>{u&&window.removeEventListener("resize",u),null==l||l.disconnect(),r.position=o,r.top=i,(null==c?void 0:c.parentElement)&&(c.parentElement.insertBefore(t,c),c.remove())}}function qi(t,e,n){let r,o=e;t.resetOnFinish&&(o=f(c({},e),{onFinish:()=>{var t;null==(t=null==e?void 0:e.onFinish)||t.call(e),null==r||r.cancel()}}));const i=n(o);return r=i,t.debugInstName&&(window[t.debugInstName]=i),i}var Ki="http://www.w3.org/2000/svg";function Zi(t,e){if(!t)return null;const n=t,{type:r,children:o,style:i}=n,u=((t,e)=>{var n={};for(var r in t)s.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&a)for(var r of a(t))e.indexOf(r)<0&&l.call(t,r)&&(n[r]=t[r]);return n})(n,["type","children","style"]),c=u.domType;void 0!==c&&delete u.domType;const f=Vt(t)||e,d=function(t,e){var n;if(t)return"string"==typeof t?null==(n=null==e?void 0:e.styles)?void 0:n[t]:t}(i,f);let h;if(o)for(const t of o){const e=Zi(t,f);e&&(h||(h=[]),h.push(e))}const m=function(t,e,n,r,o){if(Ge.has(t.toLowerCase()))return console.warn("SVG tag blocked (dangerous): ",t),null;const i=document.createElementNS(Ki,t);for(const t in e){const n=Je(t,e[t]);void 0!==n&&(Ze.has(t)?i.style[t]=String(n):i.setAttribute(K(t),n))}if(n)for(const t in n)i.style[t]=String(n[t]);if(r)for(const t of r)i.appendChild(t);return o&&(i.textContent=o),i}(r||"g",$e(u),d,h,u[Tt]||u[zt]);return m&&void 0!==c&&m.setAttribute("type",c),m}var Xi="data";function Hi(t,e,n,r){const o=ze(t);for(const t of o)console.warn("[PxAnimator] effects shape warning:",t);t=li(t,(Bt(t)||{}).mode===Pt.frames?Ot.frames:Ot.waapi);let i=null;if(r){t=Ve(t);const e="string"==typeof r?document.querySelector(r):r;e&&(i=Zi(t),i&&e.replaceChildren(i))}const a=function(t,e,n,r){return function(t,e,n,r){const o=Bt(t)||{};return tt(o)?qi(o,n,n=>{var i,a;let s=()=>{};if(o.mode!==Pt.frames&&"native"===(null==(i=o.scroll)?void 0:i.driver)&&r){s=Gi(r,o.scroll);const e=function(t,e){var n,r,o,i;if(!e||!tt(e))return null;const a=e.scroll||{},s=null!=(n=a.kind)?n:"view";if(a.smoothing)return console.warn('scroll timeline: `smoothing` needs the built-in driver — ignoring `driver: "native"`'),null;const l=globalThis,u="view"===s,c=u?l.ViewTimeline:l.ScrollTimeline;if("function"!=typeof c)return null;const f=null!=(r=a.axis)?r:"block";let d;try{d=new c(u?{subject:Wi(t,a.subject),axis:f}:{source:"root"===a.source?Bi():Ri(t,"y")||Ri(t,"x")||Bi(),axis:f})}catch(t){return console.warn("scroll timeline: native timeline construction failed — falling back to the custom driver",t),null}return{timeline:d,rangeStart:Di(null==(o=a.range)?void 0:o.start,0,u),rangeEnd:Di(null==(i=a.range)?void 0:i.end,1,u)}}(r,o);if(e){const i=Li(t,n,r,o.mode===Pt.waapi,e);if(i){const t=i.destroy.bind(i);return i.destroy=()=>{s(),t()},i}}s(),s=()=>{}}const l=(o.mode!==Pt.frames?Li(t,n,r,o.mode===Pt.waapi):null)||Ti(t,e,n,r),u=(null==(a=l.getRootElement)?void 0:a.call(l))||r;if(u){s=Gi(u,o.scroll);const t=("number"==typeof(null==(c=o)?void 0:c.duration)&&c.duration>0?c.duration:V)*("number"==typeof(null==c?void 0:c.iterations)&&c.iterations>0?c.iterations:1),e=function(t,e,n){var r,o;if(!e||!tt(e))return null;const i=e.scroll||{},a=null!=(r=i.kind)?r:"view",s=Wi(t,i.subject),l=Ri(t,"y")||Ri(t,"x"),u="scroll"===a&&"root"===i.source?Bi():l||Bi(),c=u===Bi(),f=function(t,e){const n=null!=t?t:"block";if("x"===n||"y"===n)return n;const r=!!e&&e.startsWith("vertical");return"inline"===n?r?"y":"x":r?"x":"y"}(i.axis,getComputedStyle(u).writingMode),d=()=>{if("scroll"===a)return function(t,e,n){var r,o;const i=e>0?Z(t/e,0,1):1,a="number"==typeof(null==(r=null==n?void 0:n.start)?void 0:r.fraction)?n.start.fraction:0,s="number"==typeof(null==(o=null==n?void 0:n.end)?void 0:o.fraction)?n.end.fraction:1;return s<=a?i>=s?1:0:Z((i-a)/(s-a),0,1)}("y"===f?u.scrollTop:u.scrollLeft,"y"===f?u.scrollHeight-u.clientHeight:u.scrollWidth-u.clientWidth,i.range);const t=s.getBoundingClientRect();let e,n;if(c)e=0,n="y"===f?document.documentElement.clientHeight:document.documentElement.clientWidth;else{const t=u.getBoundingClientRect();e="y"===f?t.top:t.left,n="y"===f?u.clientHeight:u.clientWidth}return function(t,e,n,r){const o=n-t,i=nt(null==r?void 0:r.start,0,e,n),a=nt(null==r?void 0:r.end,1,e,n);return a<=i?o>=a?1:0:Z((o-i)/(a-i),0,1)}(("y"===f?t.top:t.left)-e,"y"===f?t.height:t.width,n,i.range)},h=Math.max(0,null!=(o=i.smoothing)?o:0)/1e3;let m=!1,p=null,v=null,g=0,y=null;const b=()=>{y=null,m||(t=>{if(!h)return void n(t);if(null===p)return p=t,void n(t);if(null!==v)return;g=0;const e=t=>{if(v=null,m)return;const r=g?Math.min(.1,(t-g)/1e3):1/60;g=t;const o=d(),i=1-Math.exp(-r/h);p+=(o-p)*i,Math.abs(o-p)<.001&&(p=o),n(p),p!==o&&(v=requestAnimationFrame(e))};v=requestAnimationFrame(e)})(d())},k=()=>{m||null!==y||(y=requestAnimationFrame(b))},A=c?window:u;let w;A.addEventListener("scroll",k,{passive:!0}),window.addEventListener("resize",k,{passive:!0}),"undefined"!=typeof ResizeObserver&&(w=new ResizeObserver(k),w.observe(s),s!==t&&w.observe(t),c||w.observe(u));const x={destroy:()=>{m||(m=!0,A.removeEventListener("scroll",k),window.removeEventListener("resize",k),null==w||w.disconnect(),null!==y&&(cancelAnimationFrame(y),y=null),null!==v&&(cancelAnimationFrame(v),v=null))},refresh:()=>{m||(p=d(),n(p))}};return x.refresh(),x}(u,o,e=>l.setCurrentTime(e*t));if(e){const t=l.destroy.bind(l);l.destroy=()=>{e.destroy(),s(),t()}}}else console.warn("scroll timeline: no root element to observe — animation will stay at frame 0");var c;return l}):qi(o,n,n=>o.mode===Pt.frames?Ti(t,e,n,r):Li(t,n,r,o.mode===Pt.waapi)||Ti(t,e,n,r))}(t,e,n,r)}(t,e,n,i);if(r&&i){const t=i,e=a.destroy.bind(a);a.destroy=()=>{e(),t.remove()}}return a}function Yi(t){const{src:e,data:n,adapter:r,callbacks:o,container:i}=t;if(void 0!==n&&void 0!==e)throw new Error("createAnimator: provide either `src` or `data`, not both");if(void 0===n&&void 0===e)throw new Error("createAnimator: either `src` or `data` is required");if(void 0!==n)return Hi(n,r,o,i);let a=null,s=[],l=!1;const u=t=>{a?t(a):s&&s.push(t)};return fetch(e).then(t=>t.json()).then(t=>{if(!l)if(Rt(t)){a=Hi(t,r,o,i);const e=s;s=null,null==e||e.forEach(t=>t(a))}else console.error('createAnimator: invalid animation document format at "'+e+'"')}).catch(t=>{s=null,console.error('createAnimator: failed to load "'+e+'"',t)}),{isReady:()=>!!a,getRootElement:()=>a?a.getRootElement():null,isPlaying:()=>(null==a?void 0:a.isPlaying())||!1,play:()=>{u(t=>t.play())},pause:()=>{u(t=>t.pause())},cancel:()=>{u(t=>t.cancel())},finish:()=>{u(t=>t.finish())},setPlaybackRate:t=>{u(e=>e.setPlaybackRate(t))},getCurrentTime:()=>a?a.getCurrentTime():null,setCurrentTime:t=>{u(e=>e.setCurrentTime(t))},destroy:()=>{l=!0,s=null,null==a||a.destroy()}}}function Qi(){const t=document.querySelectorAll("["+St+"]");for(let e=0;e<t.length;e++){const n=t[e];if(!n[jt]){const t=n.getAttribute(St);t&&(n[jt]=Yi({src:t,container:n}))}}}"undefined"!=typeof window&&(window.loadTagAnimators=Qi,window.createAnimator=Yi,window.setupAnimationTriggers=Ii);
|
|
1
|
+
var t,e=Object.defineProperty,n=Object.defineProperties,r=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyDescriptors,i=Object.getOwnPropertyNames,a=Object.getOwnPropertySymbols,s=Object.prototype.hasOwnProperty,l=Object.prototype.propertyIsEnumerable,c=(t,n,r)=>n in t?e(t,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[n]=r,u=(t,e)=>{for(var n in e||(e={}))s.call(e,n)&&c(t,n,e[n]);if(a)for(var n of a(e))l.call(e,n)&&c(t,n,e[n]);return t},f=(t,e)=>n(t,o(e)),d={};((t,n)=>{for(var r in n)e(t,r,{get:n[r],enumerable:!0})})(d,{COLOUR_ATTR_NAMES:()=>F,MISSING_GLYPH_CLASS_NAME:()=>Ro,PX_ANIMATOR_DATA_KEY:()=>ba,PX_ANIM_ATTR_NAME:()=>Pt,PX_ANIM_SRC_ATTR_NAME:()=>St,PX_TRANSFORM_PART_KEYS:()=>Kt,PxAnimatedSvgDocumentSchema:()=>tn,PxAnimationDefinitionSchema:()=>me,PxAnimatorConfigSchema:()=>_e,PxAttrValueSchema:()=>Te,PxBezierPathSchema:()=>en,PxBindingSchema:()=>Ee,PxCloneEffectSchema:()=>Ue,PxCloneWithout:()=>Ft,PxDefsSchema:()=>be,PxEasingOrRefSchema:()=>ne,PxEffectsSchema:()=>Xe,PxElementAnimationSchema:()=>pe,PxFillGradientEffectSchema:()=>Ge,PxGradientSpreadMethod:()=>Xt,PxGradientStopSchema:()=>Ve,PxGradientType:()=>Ht,PxGradientUnits:()=>Zt,PxKeyframeSchema:()=>oe,PxKeyframeValueSchema:()=>re,PxLoopDirection:()=>It,PxLoopRepeatAt:()=>zt,PxLoopSchema:()=>ue,PxMaskedByEffectSchema:()=>Fe,PxNodeBase:()=>Je,PxNodeSchema:()=>Qe,PxPropertyAnimationSchema:()=>fe,PxRepeaterEffectSchema:()=>De,PxRetimeEffectSchema:()=>Be,PxStrokeGradientEffectSchema:()=>qe,PxStrokeTrimEffectSchema:()=>Le,PxStrokeTrimSubPaths:()=>Rt,PxSvgNodeExtra:()=>$e,PxTextEffectSchema:()=>Ze,PxTextPathEffectSchema:()=>Ke,PxTimelineEngine:()=>_t,PxTimelineEngineExtra:()=>Et,PxTransformByEffectSchema:()=>Ce,PxTransformPartsSchema:()=>de,PxTransformValueSchema:()=>he,PxTriggerSchema:()=>ge,STYLE_ATTR_NAMES:()=>U,TRANSFORM_FN_NAMES:()=>R,applyAnimatorConfig:()=>Qi,applyPlayerEffects:()=>pi,calcAnimationValues:()=>sr,camelCaseToKebabWordIfNeeded:()=>K,collectSampleTimes:()=>Li,createAnimator:()=>Aa,createAnimatorImpl:()=>ka,createBasicFrameLoopAnimator:()=>wi,createFrameLoopAnimator:()=>oa,createPathSampler:()=>uo,createWebApiAnimator:()=>la,describeSchema:()=>wt,diffInEffect:()=>Ui,evaluateMotionPathSegment:()=>Sn,extendedPathForBrowser:()=>yo,foldAnimatorConfigShortcuts:()=>Yi,generateNewIds:()=>sn,getAnimatorConfig:()=>Jt,getBindings:()=>te,getChildren:()=>ee,getDefs:()=>$t,getNormalizedProps:()=>vn,isPxElementFileFormat:()=>Yt,isPxElementFileFormatDeep:()=>nn,jsonElementFactory:()=>bo,layoutGlyphTextChars:()=>Uo,loadTagAnimators:()=>wa,materialiseAllInTree:()=>ki,materialiseAnimatedUseInstances:()=>dr,materialiseGlyphText:()=>$o,materialiseGlyphTextAlongPath:()=>Go,materialiseGlyphTextHorizontal:()=>Bo,materialiseInternalLoopsInPropAnim:()=>er,materialiseInternalLoopsInTree:()=>nr,materialiseMotionPathInPropAnim:()=>_n,materialiseMotionPathsInTree:()=>Vn,mergeAnimatorConfig:()=>Ji,normalizeDocument:()=>ir,propAnimIsMotionPath:()=>wn,px:()=>xt,renderNode:()=>va,schemaKeys:()=>At,setupAnimationTriggers:()=>na,shiftAnimatable:()=>go,toRGBA:()=>C,validateDocument:()=>Ye,validateNodeEffects:()=>He,visualModelAt:()=>Bi}),module.exports=(t=d,((t,n,o,a)=>{if(n&&"object"==typeof n||"function"==typeof n)for(let o of i(n))s.call(t,o)||void 0===o||e(t,o,{get:()=>n[o],enumerable:!(a=r(n,o))||a.enumerable});return t})(e({},"__esModule",{value:!0}),t));var h=Object.defineProperty,m=Object.defineProperties,p=Object.getOwnPropertyDescriptors,g=Object.getOwnPropertySymbols,y=Object.prototype.hasOwnProperty,v=Object.prototype.propertyIsEnumerable,b=Math.pow,k=(t,e,n)=>e in t?h(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,A=(t,e)=>{for(var n in e||(e={}))y.call(e,n)&&k(t,n,e[n]);if(g)for(var n of g(e))v.call(e,n)&&k(t,n,e[n]);return t},w=(t,e)=>m(t,p(e)),x=(t,e)=>{var n={};for(var r in t)y.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&g)for(var r of g(t))e.indexOf(r)<0&&v.call(t,r)&&(n[r]=t[r]);return n};function j(t,e=!1){var n,r,o,i;const a=t.v,s=t.i,l=t.o,c=t.c;if(!a.length)return"";const u=[],f=a.length;u.push("M"+a[0][0]+","+a[0][1]);for(let t=1;t<f;t++){const o=a[t-1],i=null!=(n=null==l?void 0:l[t-1])?n:o,c=null!=(r=null==s?void 0:s[t])?r:a[t],f=a[t];e||i[0]!==o[0]||i[1]!==o[1]||c[0]!==f[0]||c[1]!==f[1]?u.push("C"+i[0]+","+i[1]+","+c[0]+","+c[1]+","+f[0]+","+f[1]):u.push("L"+f[0]+","+f[1])}if(c&&f>0){const t=a[f-1],n=null!=(o=null==l?void 0:l[f-1])?o:t,r=null!=(i=null==s?void 0:s[0])?i:a[0],c=a[0];!e&&n[0]===t[0]&&n[1]===t[1]&&r[0]===c[0]&&r[1]===c[1]||u.push("C"+n[0]+","+n[1]+","+r[0]+","+r[1]+","+c[0]+","+c[1]),u.push("z")}return u.join("")}function S(t,e,n){return t+(e-t)*n}function P(t,e,n){const r=[],o=Math.max(t.length,e.length);for(let i=0;i<o;i++)r[i]=S(t[i]||0,e[i]||0,n);return r}function O(t,e,n){return[S(t[0]||0,e[0]||0,n),S(t[1]||0,e[1]||0,n),S(t[2]||0,e[2]||0,n),S(void 0===t[3]?1:t[3],void 0===e[3]?1:e[3],n)]}function M(t,e,n){const r=Math.max(t.length,e.length),o=[];for(let i=0;i<r;i++)o.push(_(t[i],e[i],n));return o}function _(t,e,n){var r,o,i,a,s,l,c,u,f;if(!t||!e)return t||e||{v:[]};const d=Math.min(Math.max(n,0),1),h=Math.min(t.v.length,e.v.length),m=[],p=[],g=[];for(let n=0;n<h;n++){const f=t.v[n],h=e.v[n];m.push(P(f,h,d));const y=null!=(o=null==(r=t.i)?void 0:r[n])?o:f,v=null!=(a=null==(i=e.i)?void 0:i[n])?a:h;p.push(P(y,v,d));const b=null!=(l=null==(s=t.o)?void 0:s[n])?l:f,k=null!=(u=null==(c=e.o)?void 0:c[n])?u:h;g.push(P(b,k,d))}return{v:m,i:p.length?p:void 0,o:g.length?g:void 0,c:null!=(f=t.c)?f:e.c}}function E(t,e,n){if(n<=0)return 0;if(n>=1)return 1;const r=3*t,o=3*(e-t)-r,i=1-r-o;function a(t){return((i*t+o)*t+r)*t}function s(t){return(3*i*t+2*o)*t+r}let l=n,c=0,u=1;for(let t=0;t<8;t++){const t=a(l)-n;if(Math.abs(t)<1e-6)return l;const e=s(l);if(Math.abs(e)<1e-6)break;l-=t/e}for(l=n;c<u;){const t=a(l);if(Math.abs(t-n)<1e-6)return l;n>t?c=l:u=l,l=(u+c)/2}return l}function T(t){const[e,n,r,o]=t,i=3*n,a=3*(o-n)-i,s=1-i-a;return function(t){return n=E(e,r,t),((s*n+a)*n+i)*n;var n}}function N(t,e,n){return[t[0]+(e[0]-t[0])*n,t[1]+(e[1]-t[1])*n]}function z(t,e){if(!t)return{left:void 0,right:void 0};if(e<=0)return{left:void 0,right:t};if(e>=1)return{left:t,right:void 0};const[n,r,o,i]=t,a=E(n,o,e),s=[n,r],l=[o,i],{left:c,right:u}=function(t,e,n,r,o){const i=N(t,e,o),a=N(e,n,o),s=N(n,r,o),l=N(i,a,o),c=N(a,s,o),u=N(l,c,o);return{left:[t,i,l,u],right:[u,c,s,r]}}([0,0],s,l,[1,1],a),f=c[3][0],d=c[3][1];let h,m;f>1e-9&&Math.abs(d)>1e-9&&(h=[c[1][0]/f,c[1][1]/d,c[2][0]/f,c[2][1]/d]);const p=1-f,g=1-d;return p>1e-9&&Math.abs(g)>1e-9&&(m=[(u[1][0]-f)/p,(u[1][1]-d)/g,(u[2][0]-f)/p,(u[2][1]-d)/g]),{left:h,right:m}}function I(t){if(t)return[1-t[2],1-t[3],1-t[0],1-t[1]]}function C(t){const e=Math.round(255*t[0]),n=Math.round(255*t[1]),r=Math.round(255*t[2]);return 4===t.length?"rgba("+e+","+n+","+r+","+t[3]+")":"rgb("+e+","+n+","+r+")"}function D(t){if(t){if(Array.isArray(t))return t;if("string"==typeof t)return t.startsWith("#")?function(t){const e=t.slice(1),n=e.length<=4,r=n?e[0]+e[0]:e.slice(0,2),o=n?e[1]+e[1]:e.slice(2,4),i=n?e[2]+e[2]:e.slice(4,6),a=4===e.length?e[3]+e[3]:8===e.length?e.slice(6,8):null,s=[parseInt(r,16)/255,parseInt(o,16)/255,parseInt(i,16)/255];return null!==a&&s.push(parseInt(a,16)/255),s}(t):t.startsWith("rgb")?function(t){var e;const n=null==(e=t.match(/rgba?\((.*)\)/))?void 0:e[1];if(!n)throw new Error("Invalid rgb/rgba format");const r=n.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)}}var F=new Set(["color","fill","flood-color","lighting-color","stop-color","stroke"]),R=new Set(["translate","rotate","scale","skew"]),L=new Set(["offset-distance","offsetDistance"]);function B(t,e){var n;if(!t)return"";const r=null==(n=null==e?void 0:e.withUnits)||n,o=[],i=t.translate,a=t.origin,s=t.rotate,l=t.skew,c=t.scale,u=r?"px":"",f=r?"deg":"";return i&&o.push("translate("+i[0]+u+","+i[1]+u+")"),a&&o.push("translate("+a[0]+u+","+a[1]+u+")"),null!=s&&o.push("rotate("+s+f+")"),null!=l&&o.push("skewX("+l+f+")"),c&&o.push("scale("+c[0]+","+c[1]+")"),a&&o.push("translate("+-a[0]+u+","+-a[1]+u+")"),o.join("")}var U=new Set(["offset-distance","offsetDistance"]),V=1e3;function W(t){return t.includes("-")?t.replace(/-([a-z])/g,(t,e)=>e.toUpperCase()):t}function G(t){return!t.includes("-")&&/[a-z][A-Z]/.test(t)}var q=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 K(t){return q.has(t)?t:t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}function Z(t,e,n){return Math.max(e,Math.min(t,n))}function X(t,e,n,r,o){if(o<=0)return[t[0],t[1]];if(o>=1)return[r[0],r[1]];const i=1-o,a=i*i,s=o*o,l=a*i,c=3*o*a,u=3*s*i,f=s*o;return[l*t[0]+c*e[0]+u*n[0]+f*r[0],l*t[1]+c*e[1]+u*n[1]+f*r[1]]}var H=1e-4;function Y(t,e,n,r,o){const i=J(t,e,n,r,o);return 0===i[0]&&0===i[1]?J(t,e,n,r,o<.5?o+H:o-H):i}function J(t,e,n,r,o){const i=1-o,a=3*i*i,s=6*o*i,l=3*o*o;return[a*(e[0]-t[0])+s*(n[0]-e[0])+l*(r[0]-n[0]),a*(e[1]-t[1])+s*(n[1]-e[1])+l*(r[1]-n[1])]}function Q(t,e,n,r,o=100){const i=o+1,a=new Float64Array(i),s=new Float64Array(i);let l=X(t,e,n,r,0);a[0]=0,s[0]=0;let c=0;for(let u=1;u<i;u++){const i=u/o,f=X(t,e,n,r,i),d=f[0]-l[0],h=f[1]-l[1];c+=Math.sqrt(d*d+h*h),a[u]=i,s[u]=c,l=f}return{ts:a,ds:s}}function $(t,e){const{ts:n,ds:r}=t,o=n.length-1;if(e<=n[0])return r[0];if(e>=n[o])return r[o];let i=1,a=o;for(;i<a;){const t=i+a>>>1;n[t]<e?i=t+1:a=t}const s=n[a-1],l=n[a]-s,c=l>0?(e-s)/l:0;return r[a-1]+c*(r[a]-r[a-1])}function tt(t){return"scroll"===(null==t?void 0:t.timelineSource)}var et="cover";function nt(t,e,n,r){var o;const[i,a]=function(t,e,n){const r=e,o=n;switch(t){case"cover":return[0,r+o];case"entry":return[0,Math.min(r,o)];case"contain":return[Math.min(r,o),Math.max(r,o)];case"exit":return[Math.max(r,o),r+o];case"entry-crossing":return[0,r];case"exit-crossing":return[o,r+o]}}(null!=(o=null==t?void 0:t.phase)?o:et,n,r);return i+("number"==typeof(null==t?void 0:t.fraction)?t.fraction:e)*(a-i)}function rt(t){if(!t.length)return".";let e="";for(const n of t)n.startsWith("[")?e+=n:e+=(e?".":"")+n;return e}var ot=class{_canSanitize(t){return this.isValid(t)}optional(){return new it(this)}},it=class extends ot{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,e,n){return null==t||this.inner.isValid(t,e,n)}_canSanitize(t){return null==t||this.inner._canSanitize(t)}},at=class extends ot{constructor(t=""){super(),this._default=t}sanitize(t){return"string"==typeof t?t:this._default}isValid(t,e,n){return"string"==typeof t||(null==e||e.errors.push(rt(null!=n?n:[])+": expected string, got "+typeof t),!1)}},st=class extends ot{constructor(t=0){super(),this._default=t}sanitize(t){return"number"==typeof t&&isFinite(t)?t:this._default}isValid(t,e,n){return!("number"!=typeof t||!isFinite(t))||(null==e||e.errors.push(rt(null!=n?n:[])+": expected finite number, got "+JSON.stringify(t)),!1)}},lt=class extends ot{constructor(t=!1){super(),this._default=t}sanitize(t){return"boolean"==typeof t?t:this._default}isValid(t,e,n){return"boolean"==typeof t||(null==e||e.errors.push(rt(null!=n?n:[])+": expected boolean, got "+typeof t),!1)}},ct=class extends ot{constructor(t){super(),this.value=t,this._default=t}sanitize(t){return t===this.value?this.value:this._default}isValid(t,e,n){return t===this.value||(null==e||e.errors.push(rt(null!=n?n:[])+": expected "+JSON.stringify(this.value)+", got "+JSON.stringify(t)),!1)}},ut=class extends ot{constructor(t,e){super(),this.values=t,this._default=null!=e?e:t[0]}sanitize(t){return this.values.includes(t)?t:this._default}isValid(t,e,n){return!!this.values.includes(t)||(null==e||e.errors.push(rt(null!=n?n:[])+": expected one of "+this.values.map(t=>JSON.stringify(t)).join(" | ")+", got "+JSON.stringify(t)),!1)}},ft=class extends ot{constructor(t,e){super(),this.schemas=t,this._kind="union",this._default=null!=e?e:t[0]._default}sanitize(t){for(const e of this.schemas)if(e.isValid(t))return e.sanitize(t);return this._default}isValid(t,e,n){var r;const o=e&&{errors:[],warnings:[],strict:e.strict};return!!this.schemas.some(e=>e.isValid(t,o,n?[...n]:void 0))||(null==e||e.errors.push(rt(null!=n?n:[])+": no union member matched for value "+(null!=(r=JSON.stringify(t))?r:"").slice(0,240)),!1)}_canSanitize(t){return this.schemas.some(e=>e._canSanitize(t))}},dt=class extends ot{constructor(t,e,n){var r;super(),this._key=t,this._schemas=e,this._kind="discriminatedUnion",this._default=null!=n?n:e[0]._default,this._map=new Map;for(const n of e){const e=n._shape[t];if(!e)continue;const o=null!=(r=e.inner)?r:e;this._map.set(o._default,n),e.inner&&(this._absentMember=n)}}_findSchema(t){if(null===t||"object"!=typeof t||Array.isArray(t))return;const e=t[this._key];return null==e?this._absentMember:this._map.get(e)}sanitize(t){var e;return(null!=(e=this._findSchema(t))?e:this._schemas[0]).sanitize(t)}isValid(t,e,n){const r=this._findSchema(t);if(!r){const r=null===t||"object"!=typeof t||Array.isArray(t)?void 0:t[this._key];return null==e||e.errors.push(rt(null!=n?n:[])+": no discriminated union member matched "+this._key+"="+JSON.stringify(r)),!1}return r.isValid(t,e,n)}_canSanitize(t){if(null===t||"object"!=typeof t||Array.isArray(t))return!1;const e=this._findSchema(t);return e?e._canSanitize(t):this._schemas[0]._canSanitize(t)}},ht=class extends ot{constructor(t){super(),this._shape=t;const e={};for(const n of Object.keys(t))e[n]=t[n]._default;this._default=e}sanitize(t){const e=t&&"object"==typeof t&&!Array.isArray(t)?t:{},n={};for(const t of Object.keys(this._shape)){const r=this._shape[t].sanitize(e[t]);void 0!==r&&(n[t]=r)}return n}isValid(t,e,n){if(!t||"object"!=typeof t||Array.isArray(t))return null==e||e.errors.push(rt(null!=n?n:[])+": expected object, got "+(Array.isArray(t)?"array":typeof t)),!1;const r=t,o=null!=n?n:[];let i=!0;for(const t of Object.keys(this._shape))o.push(t),this._shape[t].isValid(r[t],e,o)||(i=!1),o.pop();if(null==e?void 0:e.strict)for(const t of Object.keys(r))t in this._shape||void 0!==r[t]&&(o.push(t),e.errors.push(rt(o)+": unexpected extra key"),o.pop(),i=!1);return i}_canSanitize(t){return!!t&&"object"==typeof t&&!Array.isArray(t)}},mt=class extends ot{constructor(t,e){super(),this._shape=t,this._openSchema=e;const n={};for(const e of Object.keys(t))n[e]=t[e]._default;this._default=n}sanitize(t){const e=t&&"object"==typeof t&&!Array.isArray(t)?t:{},n=A({},e);for(const t of Object.keys(this._shape)){const r=this._shape[t].sanitize(e[t]);void 0!==r&&(n[t]=r)}if(this._openSchema)for(const t of Object.keys(e))t in this._shape||(n[t]=this._openSchema.sanitize(e[t]));return n}isValid(t,e,n){if(!t||"object"!=typeof t||Array.isArray(t))return null==e||e.errors.push(rt(null!=n?n:[])+": expected object, got "+(Array.isArray(t)?"array":typeof t)),!1;const r=t,o=null!=n?n:[];let i=!0;for(const t of Object.keys(this._shape))o.push(t),this._shape[t].isValid(r[t],e,o)||(i=!1),o.pop();if(this._openSchema)for(const t of Object.keys(r))t in this._shape||(o.push(t),this._openSchema.isValid(r[t],e,o)||(i=!1),o.pop());return i}_canSanitize(t){return!!t&&"object"==typeof t&&!Array.isArray(t)}},pt=class extends ot{constructor(t){super(),this.item=t,this._default=[]}sanitize(t){if(!Array.isArray(t))return[];const e=[];for(const n of t)this.item._canSanitize(n)&&e.push(this.item.sanitize(n));return e}isValid(t,e,n){if(!Array.isArray(t))return null==e||e.errors.push(rt(null!=n?n:[])+": expected array, got "+typeof t),!1;const r=null!=n?n:[];let o=!0;for(let n=0;n<t.length;n++)r.push("["+n+"]"),this.item.isValid(t[n],e,r)||(o=!1),r.pop();return o}_canSanitize(t){return Array.isArray(t)}},gt=class extends ot{constructor(t){super(),this.value=t,this._kind="record",this._default={}}sanitize(t){if(!t||"object"!=typeof t||Array.isArray(t))return{};const e={};for(const[n,r]of Object.entries(t))this.value._canSanitize(r)&&(e[n]=this.value.sanitize(r));return e}isValid(t,e,n){if(!t||"object"!=typeof t||Array.isArray(t))return null==e||e.errors.push(rt(null!=n?n:[])+": expected object/record, got "+(Array.isArray(t)?"array":typeof t)),!1;const r=null!=n?n:[];let o=!0;for(const[n,i]of Object.entries(t))r.push(n),this.value.isValid(i,e,r)||(o=!1),r.pop();return o}_canSanitize(t){return!!t&&"object"==typeof t&&!Array.isArray(t)}},yt=class extends ot{constructor(){super(...arguments),this._default=void 0}sanitize(t){return t}isValid(t,e,n){return!0}_canSanitize(t){return!0}},vt=class extends ot{constructor(){super(...arguments),this._default=void 0}sanitize(t){return t}isValid(t,e,n){return void 0!==t||(null==e||e.errors.push(rt(null!=n?n:[])+": required value is missing"),!1)}_canSanitize(t){return void 0!==t}},bt=class extends ot{constructor(t,e){super(),this.fn=t,this._default=e,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,e,n){return this.schema.isValid(t,e,n)}_canSanitize(t){return this.schema._canSanitize(t)}},kt=class extends ot{constructor(t){super(),this.schemas=t,this._kind="tuple",this._default=t.map(t=>t._default)}sanitize(t){return Array.isArray(t)&&t.length===this.schemas.length?this.schemas.map((e,n)=>e.sanitize(t[n])):this._default}isValid(t,e,n){if(!Array.isArray(t)||t.length!==this.schemas.length)return null==e||e.errors.push(rt(null!=n?n:[])+": expected tuple of length "+this.schemas.length+", got "+(Array.isArray(t)?"array["+t.length+"]":typeof t)),!1;const r=null!=n?n:[];let o=!0;for(let n=0;n<this.schemas.length;n++)r.push("["+n+"]"),this.schemas[n].isValid(t[n],e,r)||(o=!1),r.pop();return o}_canSanitize(t){return Array.isArray(t)&&t.length===this.schemas.length}};function At(t){return Object.fromEntries(Object.keys(t._shape).map(t=>[t,t]))}function wt(t){var e;const n=t;switch(n._kind){case"union":return{kind:"union",members:n.schemas};case"discriminatedUnion":return{kind:"discriminatedUnion",key:n._key,members:n._schemas};case"record":return{kind:"record",value:n.value};case"tuple":return{kind:"tuple",items:n.schemas}}return"_shape"in n?{kind:"shape",shape:n._shape,openValue:n._openSchema}:"item"in n?{kind:"array",item:n.item}:"inner"in n?{kind:"optional",inner:n.inner}:"fn"in n?{kind:"lazy",resolved:null!=(e=n.resolved)?e:n.resolved=n.fn()}:{kind:"leaf"}}var xt={string:(t="")=>new at(t),number:(t=0)=>new st(t),boolean:(t=!1)=>new lt(t),literal:t=>new ct(t),enum:(t,e)=>new ut(t,e),union:(t,e)=>new ft(t,e),discriminatedUnion:(t,e)=>new dt(t,e),object:t=>new ht(t),openObject:(t,e)=>new mt(t,e),extendedObject:(t,e)=>new ht(A(A({},t._shape),e)),array:t=>new pt(t),record:t=>new gt(t),any:()=>new yt,defined:()=>new vt,tuple:t=>new kt(t),lazy:(t,e)=>new bt(t,e)},jt=/^(\d+)\.(\d+)(?:\.(\d+))?$/;!function(){const t=jt.exec("1.1".trim());t&&(Number(t[1]),Number(t[2]),void 0===t[3]||Number(t[3]))}();var St="data-px-animation-src",Pt="_px_animator",Ot=["duration","iterations","engine","frameRate"],Mt=["trigger","delay","fillMode","direction"],_t={native:"native",js:"js"},Et=w(A({},_t),{auto:"auto"});function Tt(t){return t===Et.js?_t.js:_t.native}function Nt(t){return t===Et.native}var zt={start:"start",end:"end"},It={normal:"normal",alternate:"alternate"},Ct="userSpaceOnUse",Dt="objectBoundingBox",Ft={translate:"translate"},Rt={separate:"separate",combined:"combined"},Lt="text",Bt="textContent",Ut="class",Vt="transform",Wt="offsetDistance",Gt=new Set(["type","children","animator","meta","animate","effects",Lt,Bt]),qt={translate:"translate",rotate:"rotate",scale:"scale",origin:"origin"},Kt=[qt.translate,qt.rotate,qt.scale,qt.origin],Zt={userSpaceOnUse:"userSpaceOnUse",objectBoundingBox:"objectBoundingBox"},Xt={pad:"pad",reflect:"reflect",repeat:"repeat"},Ht={linear:"linear",radial:"radial"};function Yt(t){return!(!t||"object"!=typeof t||Array.isArray(t))&&"svg"===t.type}function Jt(t){var e;const n=(null==t?void 0:t.animator)||(null==(e=null==t?void 0:t.meta)?void 0:e.animator);return n?function(t){const e=t.timeline;if(null==e||"object"!=typeof e)return t;const n=Qt.get(t);if(n)return n;const r=t,{timeline:o}=r,i=x(r,["timeline"]);if(void 0!==e.engine&&(i.engine=e.engine),void 0!==e.frameRate&&(i.frameRate=e.frameRate),"scroll"===e.type||"view"===e.type){i.timelineSource="scroll",void 0!==e.duration&&(i.duration=e.duration),void 0!==e.iterations&&(i.iterations=e.iterations);const t=A({},i.scroll||{});t.kind=e.type,void 0!==e.axis&&(t.axis=e.axis),void 0!==e.source&&(t.source=e.source),void 0!==e.subject&&(t.subject=e.subject),void 0!==e.smoothing&&(t.smoothing=e.smoothing),void 0!==e.range&&(t.range=e.range);const n=e.pin;"boolean"==typeof n?t.pin=n:n&&"object"==typeof n&&(t.pin=!0,void 0!==n.align&&(t.pinAlign=n.align),void 0!==n.top&&(t.pinTop=n.top),void 0!==n.distance&&(t.pinDistance=n.distance)),i.scroll=t}else{if(void 0!==e.duration&&(i.duration=e.duration),void 0!==e.trigger){const t=e.trigger,{finishAction:n}=t,r=x(t,["finishAction"]);Object.keys(r).length&&(i.trigger=r),void 0!==n&&(i.resetOnFinish="reset"===n)}void 0!==e.delay&&(i.delay=e.delay),void 0!==e.iterations&&(i.iterations=e.iterations),void 0!==e.direction&&(i.direction=e.direction),void 0!==e.fillMode&&(i.fill=e.fillMode)}return Qt.set(t,i),i}(n):void 0}var Qt=new WeakMap;function $t(t){var e;if(t)return null==(e=Jt(t))?void 0:e.definitions}function te(t){var e;if(!t)return;const n=null==(e=Jt(t))?void 0:e.animateById;return n?Object.entries(n).map(([t,e])=>({id:t.startsWith("#")?t.slice(1):t,animate:e})):void 0}function ee(t){return null==t?void 0:t.children}var ne=xt.union([xt.string(),xt.tuple([xt.number(),xt.number(),xt.number(),xt.number()])]),re=xt.union([xt.string(),xt.number(),xt.array(xt.number()),xt.object({path:xt.string()}),xt.lazy(()=>xt.object({paths:xt.array(en)}),{paths:[]}),xt.lazy(()=>xt.array(Ve),[]),xt.lazy(()=>de,{})]),oe=xt.object({time:xt.number().optional(),value:re.optional(),easing:ne.optional(),tangentOut:xt.tuple([xt.number(),xt.number()]).optional(),tangentIn:xt.tuple([xt.number(),xt.number()]).optional()}),ie=t=>{var e,n;return null!=(n=null!=(e=t.time)?e:t.t)?n:0},ae=t=>{var e;return null!=(e=t.value)?e:t.v},se=t=>{var e;return null!=(e=t.easing)?e:t.e},le=t=>t.tangentIn,ce=t=>t.tangentOut,ue=xt.object({segmentCount:xt.number().optional(),repeatAt:xt.enum([zt.start,zt.end]).optional(),direction:xt.enum([It.normal,It.alternate]).optional()}),fe=xt.object({value:re.optional(),keyframes:xt.array(oe).optional(),loop:xt.union([ue,xt.boolean()]).optional(),autoOrient:xt.boolean().optional(),alongPathMode:xt.enum(["sampled","offsetPath"]).optional()}),de=xt.object({translate:xt.tuple([xt.number(),xt.number()]).optional(),rotate:xt.number().optional(),skew:xt.number().optional(),scale:xt.tuple([xt.number(),xt.number()]).optional(),origin:xt.tuple([xt.number(),xt.number()]).optional()}),he=xt.union([xt.string(),de,xt.object({value:de}),fe]),me=xt.record(fe),pe=xt.union([xt.string(),xt.array(xt.union([xt.string(),me])),me]),ge=xt.object({startOn:xt.enum(["load","mouseOver","click","scrollIntoView","programmatic"]).optional(),outAction:xt.enum(["continue","pause","reset","reverse"]).optional(),finishAction:xt.enum(["hold","reset"]).optional(),scrollIntoViewThreshold:xt.number().optional()}),ye=xt.object({width:xt.number(),d:xt.string()}),ve=xt.object({fontFamily:xt.string(),fontStyle:xt.string(),ascent:xt.number(),unitsPerEm:xt.number(),glyphs:xt.record(ye)}),be=xt.object({easings:xt.record(xt.tuple([xt.number(),xt.number(),xt.number(),xt.number()])).optional(),animations:xt.record(me).optional(),styles:xt.record(xt.record(xt.union([xt.string(),xt.number()]))).optional(),fonts:xt.record(ve).optional()}),ke=xt.object({phase:xt.enum(["cover","contain","entry","exit","entry-crossing","exit-crossing"]).optional(),fraction:xt.number().optional()}),Ae=xt.object({start:ke.optional(),end:ke.optional()}),we=(xt.object({kind:xt.enum(["view","scroll"]).optional(),axis:xt.enum(["block","inline","x","y"]).optional(),source:xt.enum(["nearest","root"]).optional(),subject:xt.string().optional(),smoothing:xt.number().optional(),pin:xt.boolean().optional(),pinAlign:xt.enum(["top","center","bottom"]).optional(),pinTop:xt.number().optional(),pinDistance:xt.number().optional(),range:Ae.optional()}),xt.object({align:xt.enum(["top","center","bottom"]).optional(),top:xt.number().optional(),distance:xt.number().optional()})),xe=xt.enum([Et.auto,Et.native,Et.js]).optional(),je=xt.object({type:xt.literal("time").optional(),engine:xe,frameRate:xt.number().optional(),duration:xt.number().optional(),trigger:ge.optional(),delay:xt.number().optional(),iterations:xt.union([xt.number(),xt.literal("infinite")]).optional(),fillMode:xt.enum(["forwards","backwards","both","none"]).optional(),direction:xt.enum(["normal","reverse","alternate","alternate-reverse"]).optional()}),Se={duration:xt.number().optional(),iterations:xt.number().optional(),engine:xe,frameRate:xt.number().optional(),axis:xt.enum(["block","inline","x","y"]).optional(),source:xt.enum(["nearest","root"]).optional(),subject:xt.string().optional(),smoothing:xt.number().optional(),pin:xt.union([xt.boolean(),we]).optional(),range:Ae.optional()},Pe=xt.object(A({type:xt.literal("scroll")},Se)),Oe=xt.object(A({type:xt.literal("view")},Se)),Me=xt.discriminatedUnion("type",[je,Pe,Oe]),_e=xt.object({timeline:Me.optional(),definitions:be.optional(),animateById:xt.record(pe).optional(),debugGlobalName:xt.string().optional(),version:xt.string().optional()}),Ee=xt.object({id:xt.string(),animate:pe}),Te=xt.union([xt.string(),xt.number(),xt.array(xt.number()),xt.object({value:xt.defined()}),de]),Ne=xt.union([xt.number(),fe,xt.object({value:xt.number()})]),ze=xt.union([xt.tuple([xt.number(),xt.number()]),fe,xt.object({value:xt.tuple([xt.number(),xt.number()])})]),Ie=xt.union([xt.string(),fe,xt.object({value:xt.string()})]),Ce=xt.object({translate:ze.optional(),rotate:Ne.optional(),scale:ze.optional(),skew:Ne.optional(),origin:ze.optional()}),De=xt.object({copies:xt.number().optional(),translate:ze.optional(),rotate:Ne.optional(),skew:Ne.optional(),scale:ze.optional(),origin:ze.optional()}),Fe=xt.object({source:xt.string().optional(),maskType:xt.enum(["luminance","alpha"]).optional(),maskUnits:xt.enum([Ct,Dt]).optional(),maskContentUnits:xt.enum([Ct,Dt]).optional(),x:xt.number().optional(),y:xt.number().optional(),width:xt.number().optional(),height:xt.number().optional()}),Re=xt.object({d:Ie.optional()}),Le=xt.object({offset:Ne.optional(),range:ze.optional(),subPaths:xt.enum([Rt.separate,Rt.combined]).optional()}),Be=xt.object({start:xt.number().optional(),stretch:xt.number().optional(),timeCrop:xt.tuple([xt.number(),xt.number()]).optional()}),Ue=xt.object({without:xt.enum([Ft.translate]).optional(),source:xt.string().optional(),retime:Be.optional()}),Ve=xt.object({offset:xt.number(),color:xt.string()}),We=xt.union([xt.array(Ve),xt.object({value:xt.array(Ve)}),fe]),Ge=xt.object({type:xt.enum([Ht.linear,Ht.radial]),start:ze.optional(),end:ze.optional(),center:ze.optional(),radius:Ne.optional(),focal:ze.optional(),stops:We.optional(),gradientUnits:xt.enum([Zt.userSpaceOnUse,Zt.objectBoundingBox]).optional(),spreadMethod:xt.enum([Xt.pad,Xt.reflect,Xt.repeat]).optional(),gradientTransform:xt.string().optional()}),qe=Ge,Ke=xt.object({pathData:xt.string(),pathOverflow:xt.enum(["clip","extend"]).optional(),lengthAdjust:xt.enum(["spacing","spacingAndGlyphs"]).optional(),method:xt.enum(["align","stretch"]).optional(),spacing:xt.enum(["auto","exact"]).optional(),startOffset:Ne.optional(),textLength:Ne.optional()}),Ze=xt.object({useGlyphs:xt.boolean().optional()}),Xe=xt.object({transformBy:Ce.optional(),repeater:De.optional(),maskedBy:Fe.optional(),clipPath:Re.optional(),strokeTrim:Le.optional(),clone:Ue.optional(),fillGradient:Ge.optional(),strokeGradient:qe.optional(),textPath:Ke.optional(),text:Ze.optional()});function He(t,e){const n=[],r=(t,o)=>{if(t&&t.effects){const r={errors:[],warnings:[],strict:!!(null==e?void 0:e.strict)};if(!Xe.isValid(t.effects,r,[o+".effects"]))for(const t of r.errors)n.push(t)}t&&Array.isArray(t.children)&&t.children.forEach((t,e)=>r(t,o+".children["+e+"]"))};return r(t,"root"),n}function Ye(t){const e={errors:[],warnings:[],strict:!0},n=tn.isValid(t,e,["root"])?[]:[...e.errors];if(t&&"object"==typeof t)for(const e of He(t,{strict:!0}))n.includes(e)||n.push(e);return n}var Je=xt.openObject({type:xt.string(),domType:xt.string().optional(),id:xt.string().optional(),meta:xt.any().optional(),effects:Xe.optional(),animate:pe.optional(),style:xt.union([xt.string(),xt.record(xt.union([xt.string(),xt.number()]))]).optional()},Te),Qe=xt.openObject(w(A({},Je._shape),{children:xt.lazy(()=>xt.array(Qe),[]).optional()}),Te),$e=xt.object({width:xt.union([xt.number(),xt.string()]).optional(),height:xt.union([xt.number(),xt.string()]).optional(),viewBox:xt.string().optional(),animator:_e.optional()}),tn=xt.openObject(w(A(A({},Je._shape),$e._shape),{type:xt.literal("svg"),children:xt.array(Qe).optional()}),Te),en=xt.object({v:xt.array(xt.array(xt.number())),i:xt.array(xt.array(xt.number())).optional(),o:xt.array(xt.array(xt.number())).optional(),c:xt.boolean().optional()});function nn(t){const e=tn.isValid(t);return{valid:e,errors:e?[]:["Document failed schema validation"]}}var rn=0;function on(){return"_px_"+Date.now().toString(36)+(++rn).toString(36)+Math.random().toString(36).substring(2,6)}function an(t){if(null===t||"object"!=typeof t)return t;if(Array.isArray(t))return t.map(t=>an(t));const e=t,n={};for(const t of Object.keys(e))n[t]=an(e[t]);return n}function sn(t){var e,n;const r=an(t),o=new Map,i=new Set(["href","xlink:href"]),a=new Set(["fill","stroke","clip-path","clipPath","mask","marker","marker-start","marker-mid","marker-end","filter","flood-color","lighting-color"]),s=new Set(["targetId","boundElementId"]),l=(t,e)=>"source"===t&&("maskedBy"===e||"clone"===e);!function t(e){if(e&&"object"==typeof e){if(e.id&&"string"==typeof e.id){const t=e.id,n=on();o.set(t,n),e.id=n}else e.animate&&(e.id=on());if(Array.isArray(e.children))for(const n of e.children)t(n)}}(r),function t(e,n){if(e&&"object"==typeof e)for(const[r,c]of Object.entries(e))if("children"!==r)if("string"==typeof c)if(i.has(r)&&c.startsWith("#")){const t=c.slice(1),n=o.get(t);n&&(e[r]="#"+n)}else if(a.has(r))e[r]=ln(c,o);else if(s.has(r)||l(r,n)){const t=c.startsWith("#"),n=o.get(t?c.slice(1):c);n&&(e[r]=t?"#"+n:n)}else c.includes("url(#")&&(e[r]=ln(c,o));else if("style"===r&&"object"==typeof c&&null!==c)for(const[t,e]of Object.entries(c))"string"==typeof e&&(c[t]=ln(e,o));else"object"==typeof c&&null!==c&&t(c,r);else if(Array.isArray(c))for(const e of c)t(e)}(r);const c=null==(e=r.animator)?void 0:e.animateById;if(c&&"object"==typeof c){const t={};for(const[e,r]of Object.entries(c)){const i=e.startsWith("#"),a=i?e.slice(1):e,s=null!=(n=o.get(a))?n:a;t[i?"#"+s:s]=r}r.animator=w(A({},r.animator),{animateById:t})}return r}function ln(t,e){return t.replace(/url\(#([^)]+)\)/g,(t,n)=>{const r=e.get(n);return r?"url(#"+r+")":t})}var cn=new Set(["script","foreignobject"]),un=new Set(["href","xlink:href","src","filter","clippath","mask","markerstart","markermid","markerend"]),fn=new Set(["href","xlink:href","src"]),dn=new Set(["mixBlendMode","isolation"]),hn=/^data:image\/(?:png|jpe?g|gif|webp|bmp);base64,/i,mn=/^data:image\/svg\+xml(?:;[^,]*)?,/i,pn=/^data:image\/[^;,]*;base64,([A-Za-z0-9+/]{8})/i,gn=["iVBORw0K","/9j/","R0lGOD","UklGR","Qk"];function yn(t,e){const n=t.toLowerCase();if(!function(t){return!!t.startsWith("on")}(n)){if("fill"===n||"stroke"===n||"stopcolor"===n){const t=String(e);return t.includes("url(")&&!/^url\(#[^)]+\)$/.test(t)?void console.warn('Attribute "'+n+'" blocked: url() must be internal url(#id), got:',e):e}if(un.has(n)){const t=String(e);return t.startsWith("#")||/^url\(#[^)]+\)$/.test(t)||fn.has(n)&&(hn.test(t)||mn.test(t)||function(t){const e=pn.exec(t);return!!e&&gn.some(t=>e[1].startsWith(t))}(t))?e:void console.warn('Attribute "'+n+'" blocked: must be #id, url(#id), or data:image/… URI, got:',e)}return e}console.warn("Attribute blocked (event handler / dangerous): ",n)}function vn(t){const e={};for(const n of Object.keys(t)){const r=W(n);if(Gt.has(r))continue;if("style"===r)continue;let o=t[n];if(F.has(r)&&Array.isArray(o))e[r]=C(o);else if("transform"!==r||null===o||"object"!=typeof o||Array.isArray(o)||o.keyframes)R.has(r)?(Array.isArray(o)&&("translate"===r&&(o=o.map(t=>t+"px")),o=o.join(",")),"rotate"===r&&(o+="deg"),e[Vt]=r+"("+o+")"):Array.isArray(o)?e[r]=o.join(","):null!=o&&(e[r]=String(o));else{const t=o.value&&"object"==typeof o.value?o.value:o;e[Vt]=B(t,{withUnits:!1})}}return e}function bn(t){const e=ae(t);if(!e)return;if(Array.isArray(e)&&e.length>=2&&"number"==typeof e[0]&&"number"==typeof e[1])return[e[0],e[1]];const n=e.translate;return Array.isArray(n)&&n.length>=2?[n[0],n[1]]:void 0}function kn(t){return ie(t)}function An(t){return se(t)}function wn(t){const e=t.keyframes;if(!Array.isArray(e))return!1;if(t.autoOrient)return!0;for(const t of e)if(le(t)||ce(t))return!0;return!1}var xn=new WeakMap;function jn(t,e,n,r){let o=xn.get(t);const i=null==o?void 0:o.get(e);if(i)return i;const a=ce(t),s=le(e),l=[n[0]+(a?a[0]:0),n[1]+(a?a[1]:0)],c=[r[0]+(s?s[0]:0),r[1]+(s?s[1]:0)],u=Q(n,l,c,r),f={P0:n,P1:l,P2:c,P3:r,lut:u,totalArc:u.ds[u.ds.length-1]};return o||(o=new WeakMap,xn.set(t,o)),o.set(e,f),f}function Sn(t,e,n,r,o,i){const a=jn(t,e,n,r),s=0===a.totalArc?o:function(t,e){const n=e*t.ds[t.ds.length-1],{ts:r,ds:o}=t,i=o.length-1;if(n<=0)return r[0];if(n>=o[i])return r[i];let a=1,s=i;for(;a<s;){const t=a+s>>>1;o[t]<n?a=t+1:s=t}const l=o[s-1],c=o[s]-l,u=c>0?(n-l)/c:0;return r[s-1]+u*(r[s]-r[s-1])}(a.lut,o),l=X(a.P0,a.P1,a.P2,a.P3,s);if(!i)return{translate:l};const c=Y(a.P0,a.P1,a.P2,a.P3,s);return{translate:l,rotateDeg:180*Math.atan2(c[1],c[0])/Math.PI}}var Pn=.5,On=5,Mn=32;function _n(t,e){var n,r,o;if(!wn(t))return t;const i=t.keyframes;if(!Array.isArray(i)||i.length<2)return t;const a=!!t.autoOrient,s=null!=(n=null==e?void 0:e.flatnessTolerance)?n:Pn,l=null!=(r=null==e?void 0:e.rotationTolerance)?r:On,c=null!=(o=null==e?void 0:e.maxSamplesPerSegment)?o:Mn,u=[],f=bn(i[0]);if(!f)return t;const d=a?function(t,e){const n=bn(t),r=bn(e);if(!n||!r)return 0;const o=jn(t,e,n,r),i=Y(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;u.push(Tn(kn(i[0]),In(Nn(i[0]),Nn(i[0]),0,f,d,a)));for(let t=0;t<i.length-1;t++){const e=i[t],n=i[t+1],r=bn(e),o=bn(n);r&&o?(a&&t>0&&Dn(u,e,n,r,o,l),Rn(u,e,n,r,o,a,s,l,c)):u.push(Tn(kn(n),In(Nn(n),Nn(n),1,null!=o?o:[0,0],void 0,a)))}const h=An(i[i.length-1]);h&&(u[u.length-1].e=h),a&&En(u);const m={keyframes:u};return void 0!==t.loop&&(m.loop=t.loop),m}function En(t){let e;for(const n of t){const t=ae(n);if(!t||"number"!=typeof t.rotate)continue;if(void 0===e){e=t.rotate;continue}let r=t.rotate;for(;r-e>180;)r-=360;for(;r-e<-180;)r+=360;t.rotate=r,e=r}}function Tn(t,e){return{t:t,v:e}}function Nn(t){const e=ae(t);if(e&&"object"==typeof e&&!Array.isArray(e))return e}function zn(t,e,n){if(void 0===t)return e;if(void 0===e)return t;if("number"==typeof t&&"number"==typeof e)return t+(e-t)*n;if(Array.isArray(t)&&Array.isArray(e)&&t.length===e.length){const r=new Array(t.length);for(let o=0;o<t.length;o++){const i="number"==typeof t[o]?t[o]:0,a="number"==typeof e[o]?e[o]:0;r[o]=i+(a-i)*n}return r}return n<.5?t:e}function In(t,e,n,r,o,i){const a={translate:r},s=new Set;if(t)for(const e of Object.keys(t))s.add(e);if(e)for(const t of Object.keys(e))s.add(t);for(const r of s){if("translate"===r)continue;if("rotate"===r&&i)continue;const o=null==t?void 0:t[r],s=null==e?void 0:e[r];void 0===o&&void 0===s||(a[r]=zn(o,s,n))}return void 0!==o&&(a.rotate=o+Cn(t,e,n)),a}function Cn(t,e,n){const r="number"==typeof(null==t?void 0:t.rotate)?t.rotate:void 0,o="number"==typeof(null==e?void 0:e.rotate)?e.rotate:void 0;if(void 0===r&&void 0===o)return 0;const i=zn(r,o,n);return"number"==typeof i?i:0}function Dn(t,e,n,r,o,i){const a=t[t.length-1],s=ae(a),l=null==s?void 0:s.rotate;if("number"!=typeof l)return;const c=Nn(e),u=l-Cn(c,c,0),f=jn(e,n,r,o),d=Y(f.P0,f.P1,f.P2,f.P3,0),h=180*Math.atan2(d[1],d[0])/Math.PI,m=function(t,e){let n=t-e;for(;n>180;)n-=360;for(;n<-180;)n+=360;return n}(h,u);if(Math.abs(m)<=i)return;const p=kn(e),g=Math.min(p+Fn,(p+kn(n))/2),y=In(Nn(e),Nn(e),0,r,h,!0);t.push(Tn(g,y))}var Fn=.05;function Rn(t,e,n,r,o,i,a,s,l){const c=jn(e,n,r,o),u=kn(e),f=kn(n),d=An(e),h=(m=d)?T([m[1],m[0],m[3],m[2]]):t=>t;var m;const p=Nn(e),g=Nn(n),y=function(t,e,n,r,o){const i=[];Ln(t.P0[0],t.P1[0],t.P2[0],t.P3[0],i),Ln(t.P0[1],t.P1[1],t.P2[1],t.P3[1],i),i.sort((t,e)=>t-e);const a=[0];for(const t of i)t>a[a.length-1]+1e-6&&t<.999999&&a.push(t);a.push(1);const s=[],l={remaining:o-a.length};for(let o=0;o<a.length-1;o++)Bn(a[o],a[o+1],s,t,e,n,r,l);return s}(c,i,a,s,l),v=[];for(const t of y){const e=$(c.lut,t),n=Z(c.totalArc>0?e/c.totalArc:t,0,1),r={u:Z(h(n),0,1),p:n,pos:X(c.P0,c.P1,c.P2,c.P3,t)};if(i){const e=Y(c.P0,c.P1,c.P2,c.P3,t);r.rotateDeg=180*Math.atan2(e[1],e[0])/Math.PI}v.push(r)}let b=d,k=0;const A=t.length-1;for(let e=0;e<v.length;e++){const n=v[e],r=k<1?Z((n.u-k)/(1-k),0,1):1,{left:o,right:a}=z(b,r),s=0===e?A:t.length-1;o?t[s].e=o:delete t[s].e;const l=u+n.u*(f-u),c=In(p,g,n.p,n.pos,n.rotateDeg,i);t.push(Tn(l,c)),b=a,k=n.u}}function Ln(t,e,n,r,o){const i=e-t,a=n-e,s=i-2*a+(r-n),l=2*(a-i),c=i;if(Math.abs(s)<1e-10){if(Math.abs(l)>1e-10){const t=-c/l;t>1e-6&&t<.999999&&o.push(t)}return}const u=l*l-4*s*c;if(u<0)return;const f=Math.sqrt(u),d=(-l-f)/(2*s),h=(-l+f)/(2*s);d>1e-6&&d<.999999&&o.push(d),h>1e-6&&h<.999999&&o.push(h)}function Bn(t,e,n,r,o,i,a,s){const l=(t+e)/2,c=X(r.P0,r.P1,r.P2,r.P3,t),u=X(r.P0,r.P1,r.P2,r.P3,e),f=e-t,d=X(r.P0,r.P1,r.P2,r.P3,t+.25*f),h=X(r.P0,r.P1,r.P2,r.P3,l),m=X(r.P0,r.P1,r.P2,r.P3,t+.75*f),p=Math.max(Un(d,c,u),Un(h,c,u),Un(m,c,u));let g=!0;if(o){const n=Y(r.P0,r.P1,r.P2,r.P3,t),o=Y(r.P0,r.P1,r.P2,r.P3,e),i=180*Math.atan2(n[1],n[0])/Math.PI,s=180*Math.atan2(o[1],o[0])/Math.PI;let l=Math.abs(i-s);l>180&&(l=360-l),l>a&&(g=!1)}p<=i&&g||s.remaining<=0||f<1e-6?n.push(e):(s.remaining-=1,Bn(t,l,n,r,o,i,a,s),Bn(l,e,n,r,o,i,a,s))}function Un(t,e,n){const r=n[0]-e[0],o=n[1]-e[1],i=r*r+o*o;if(i<1e-20){const n=t[0]-e[0],r=t[1]-e[1];return Math.sqrt(n*n+r*r)}const a=(t[0]-e[0])*o-(t[1]-e[1])*r;return Math.abs(a)/Math.sqrt(i)}function Vn(t,e){const n=Wn(t,e);return null!=n?n:t}function Wn(t,e){let n,r;if(t.children)for(let r=0;r<t.children.length;r++){const o=Wn(t.children[r],e);null!==o&&(n||(n=t.children.slice()),n[r]=o)}const o=t.animate;if(o&&"object"==typeof o&&!Array.isArray(o)){const t=o,n=t.transform;if(n&&"object"==typeof n&&wn(n)){const o=_n(n,e);o!==n&&(r=w(A({},t),{transform:o}))}}if(!n&&!r)return null;const i=A({},t);return n&&(i.children=n),r&&(i.animate=r),i}var Gn=1;function qn(t,e){if(t===e)return!0;if(typeof t!=typeof e||null===t||null===e||"object"!=typeof t)return!1;if(Array.isArray(t)!==Array.isArray(e))return!1;const n=Object.keys(t),r=Object.keys(e);return n.length===r.length&&n.every(n=>qn(t[n],e[n]))}function Kn(t){const e=[];let n;const r=function(t){const e=t.split(/([MLCZmlcz]|[\s,]+)/).map(t=>t.trim()).filter(t=>t&&","!==t),n=[];let r=null;for(const t of e)if(/[MLCZmlcz]/.test(t))r={type:t,values:[]},n.push(r);else if(r){const e=+t;r.values.push(Number.isNaN(e)?0:e)}return n}(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;n={v:[[t,r]],i:[[t,r]],o:[[t,r]],c:!1},e.push(n);continue}if(n||(n={v:[[0,0]],i:[[0,0]],o:[[0,0]],c:!1},e.push(n)),"L"===r){const t=o[0]||0,e=o[1]||0;n.v.push([t,e]),n.i.push([t,e]),n.o.push([t,e])}else if("C"===r){const t=o[0]||0,e=o[1]||0,r=o[2]||0,i=o[3]||0,a=o[4]||0,s=o[5]||0;n.o[n.o.length-1]=[t,e],n.v.push([a,s]),n.i.push([r,i]),n.o.push([a,s])}else"Z"===r||"z"===r?n.c=!0:console.warn('Unsupported path command "'+r+'"')}return e}function Zn(t){return t.startsWith("path(")&&t.endsWith(")")?t.slice(5,-1):/^[MmZzLlHhVvCcSsQqTtAa]/.test(t)?t:void 0}function Xn(t){return"string"==typeof t&&void 0!==Zn(t)}function Hn(t){if(t&&"object"==typeof t&&"string"==typeof t.path){const e=Zn(t.path);return e?{paths:Kn(e)}:t}if(t&&"object"==typeof t&&"paths"in t){const e=t.paths;if(Array.isArray(e)&&e.length>0&&Xn(e[0])){const t=[];for(const n of e){const e=Zn(n);e&&t.push(...Kn(e))}return{paths:t}}return t}if(Array.isArray(t)){if(t.length>0&&Xn(t[0])){const e=[];for(const n of t){const t=Zn(n);t&&e.push(...Kn(t))}return{paths:e}}return{paths:t}}return Xn(t)?{paths:Kn(Zn(t))}:t}function Yn(t,e){var n;if(t)return Array.isArray(t)?t:(null==(n=null==e?void 0:e.easings)?void 0:n[t])?e.easings[t]:void console.warn("Unknown easing name: "+t)}function Jn(t,e){var n;if("string"==typeof t){const r=null==(n=null==e?void 0:e.animations)?void 0:n[t];return r||console.warn("Unknown animation name: "+t),r}return t}function Qn(t,e,n,r){var o,i;return"d"===t?{paths:M(null!=(o=null==e?void 0:e.paths)?o:Array.isArray(e)?e:[],null!=(i=null==n?void 0:n.paths)?i:Array.isArray(n)?n:[],r)}:F.has(t)?O(e||[0,0,0,1],n||[0,0,0,1],r):"transform"!==t||"object"!=typeof e||null===e||Array.isArray(e)||"object"!=typeof n||null===n||Array.isArray(n)?"rotate"===t&&"number"==typeof e&&"number"==typeof n?S(e,n,r):R.has(t)||"stroke-dasharray"===t||"strokeDasharray"===t?P(e||[],n||[],r):S(+(e||0),+(n||0),r):function(t,e,n){const r=new Set([...Object.keys(null!=t?t:{}),...Object.keys(null!=e?e:{})]),o={};for(const i of r){const r=null==t?void 0:t[i],a=null==e?void 0:e[i];if("rotate"===i||"skew"===i)o[i]=S(+(null!=r?r:0),+(null!=a?a:0),n);else if("translate"===i||"scale"===i||"origin"===i){const t="scale"===i?[1,1]:[0,0];o[i]=P(r||t,a||t,n)}else o[i]=null!=a?a:r}return o}(e,n,r)}function $n(t,e,n,r){var o,i,a,s,l;const c=e.length-1,u=Z(null!=(o=n.segmentCount)?o:c,1,c);let f;f=n.repeatAt===zt.start?e.slice(0,u+1):e.slice(c-u);const d=null!=(i=e[0].t)?i:0,h=null!=(a=e[e.length-1].t)?a:0;let m,p;n.repeatAt===zt.start?(m=0,p=d):(m=h,p=r);const g=p-m;if(g<=0)return e;const y=null!=(s=f[0].t)?s:0,v=(null!=(l=f[f.length-1].t)?l:0)-y;if(v<=0)return e;const b=f.map(t=>({relT:(t.t-y)/v,v:t.v,e:t.e,tangentIn:le(t),tangentOut:ce(t)})),k=Math.floor(g/v),x=g-k*v,j=x/v,S=[],P=n.repeatAt!==zt.start,O=e[e.length-1];let M,_=!1;function E(e,n,r){var o;let i;if(n){i=[];for(let t=b.length-1;t>=0;t--)i.push({relT:1-b[t].relT,v:b[t].v,e:t>0?I(b[t-1].e):void 0,tangentIn:b[t].tangentOut,tangentOut:b[t].tangentIn})}else i=b;const a=void 0!==r?r:1;for(let n=0;n<i.length;n++){const r=i[n];if(r.relT>a+1e-9){const o=i[n-1],s=r.relT-o.relT,l=(a-o.relT)/s,c=o.e?T(o.e)(l):l,u=Qn(t,o.v,r.v,c),{left:f}=z(o.e,l);return S.length>0&&o.relT<=a&&(S[S.length-1].e=f),void S.push({t:e+a*v,v:u,e:void 0})}const s=S.length>0?S[S.length-1]:O,l=P&&0===n&&void 0!==s&&Math.abs((null!=(o=s.t)?o:0)-(e+r.relT*v))<1e-9;if(l){if(qn(s.v,r.v)){S.length>0?(s.e=r.e,s.tangentOut=r.tangentOut):(M=r.e,_=!0);continue}S.length>0&&(delete s.tangentIn,delete s.tangentOut)}const c={t:e+r.relT*v+(l?Gn:0),v:r.v,e:n<i.length-1?r.e:void 0};r.tangentIn&&(c.tangentIn=r.tangentIn),r.tangentOut&&(c.tangentOut=r.tangentOut),S.push(c)}}if(n.repeatAt===zt.start){j>1e-9&&function(e,n,r){let o;if(n){o=[];for(let t=b.length-1;t>=0;t--)o.push({relT:1-b[t].relT,v:b[t].v,e:t>0?I(b[t-1].e):void 0,tangentIn:b[t].tangentOut,tangentOut:b[t].tangentIn})}else o=b;const i=1-r;for(let n=0;n<o.length;n++){const r=o[n];if(r.relT<i-1e-9)continue;const a=o[n-1];if(a&&a.relT<i-1e-9&&r.relT>i+1e-9){const n=r.relT-a.relT,o=(i-a.relT)/n,s=a.e?T(a.e)(o):o,l=Qn(t,a.v,r.v,s),{right:c}=z(a.e,o);S.push({t:e,v:l,e:c})}const s={t:e+(r.relT-i)*v,v:r.v,e:n<o.length-1?r.e:void 0};r.tangentIn&&(s.tangentIn=r.tangentIn),r.tangentOut&&(s.tangentOut=r.tangentOut),S.push(s)}}(m,n.direction===It.alternate&&k%2==0,j);for(let t=0;t<k;t++){const e=k-1-t,r=n.direction===It.alternate&&e%2==0;E(m+x+t*v,r)}}else{for(let t=0;t<k;t++){const e=n.direction===It.alternate&&t%2==0;E(m+t*v,e)}if(j>1e-9){const t=n.direction===It.alternate&&k%2==0;E(m+k*v,t,j)}}return n.repeatAt===zt.start?[...S,...e]:_&&e.length>0?[...e.slice(0,-1),w(A({},e[e.length-1]),{e:M}),...S]:[...e,...S]}function tr(t,e,n,r){var o;const i=e.keyframes||[],a=[];for(const e of i){const n=ie(e);let i=ae(e);const s=se(e);"d"===t&&(i=Hn(i));const l=G(t)?K(t):t;F.has(l)&&(i=null!=(o=D(i))?o:i);const c={t:n,v:i,e:Yn(s,r)},u=le(e),f=ce(e);u&&(c.tangentIn=u),f&&(c.tangentOut=f),a.push(c)}a.sort((t,e)=>{var n,r;return(null!=(n=t.t)?n:0)-(null!=(r=e.t)?r:0)});const s=e.loop,l=!0===s?{}:s||void 0;return l&&a.length>=2?$n(t,a,l,n):a}function er(t,e,n){const r=e.loop;if(null==r||!1===r)return e;const o=!0===r?{}:r,i=e.keyframes;if(!Array.isArray(i)||i.length<2)return e;const a=G(t)?K(t):t,s=F.has(a),l=i.map(e=>{var n;const r=ie(e);let o=ae(e);"d"===t&&(o=Hn(o)),s&&(o=null!=(n=D(o))?n:o);const i={t:r,v:o,e:se(e)},a=le(e),l=ce(e);return a&&(i.tangentIn=a),l&&(i.tangentOut=l),i}),c={keyframes:$n(t,l,o,n)};return void 0!==e.autoOrient&&(c.autoOrient=e.autoOrient),c}function nr(t,e){const n=rr(t,e);return null!=n?n:t}function rr(t,e){let n,r;if(t.children)for(let r=0;r<t.children.length;r++){const o=rr(t.children[r],e);null!==o&&(n||(n=t.children.slice()),n[r]=o)}const o=t.animate;if(o&&"object"==typeof o&&!Array.isArray(o)){const t=o;for(const n of Object.keys(t)){const o=t[n],i=er(n,o,e);i!==o&&(r||(r=A({},t)),r[n]=i)}}if(!n&&!r)return null;const i=A({},t);return n&&(i.children=n),r&&(i.animate=r),i}var or=0;function ir(t,e=_t.native){const n=Jt(t)||{},r=$t(t),o=n.duration||1e3,i=[],a=(t,n,i)=>{if(!n)return null;const a=function(t,e){if(!t)return[];const n=[];if("string"==typeof t){const r=Jn(t,e);r&&n.push(r)}else if(Array.isArray(t))for(const r of t){const t=Jn(r,e);t&&n.push(t)}else n.push(t);return n}(n,r);if(0===a.length)return null;const s=function(t,e,n,r=_t.native){const o={};for(const[i,a]of Object.entries(t)){if("transform"===i&&"offsetPath"===a.alongPathMode&&void 0!==t.offsetDistance)continue;const s=tr(i,a,e,n);if(s.length>0){const t={keyframes:s};void 0!==a.autoOrient&&(t.autoOrient=a.autoOrient),void 0!==a.loop&&(t.loop=a.loop),o[i]=r===_t.native&&"transform"===i?_n(t):t}}return o}(function(t,e){if(!t)return t;const n=e&&"object"==typeof e&&!Array.isArray(e)?e:function(t){var e,n;if(!t||"string"!=typeof t)return;const r={},o=/([a-zA-Z]+)\s*\(([^)]*)\)/g,i=["translate","rotate","skewX","scale"];let a,s=-1;for(;null!==(a=o.exec(t));){const t=a[1],o=i.indexOf(t);if(o<0||o<=s)return;s=o;const l=a[2].split(/[\s,]+/).filter(Boolean).map(Number);if(l.some(t=>Number.isNaN(t)))return;if("translate"===t){if(l.length<1||l.length>2)return;r.translate=[l[0],null!=(e=l[1])?e:0]}else if("rotate"===t){if(1!==l.length)return;r.rotate=l[0]}else if("skewX"===t){if(1!==l.length)return;r.skew=l[0]}else{if(l.length<1||l.length>2)return;r.scale=[l[0],null!=(n=l[1])?n:l[0]]}}return t.replace(/([a-zA-Z]+)\s*\(([^)]*)\)/g,"").replace(/[\s,]/g,"").length?void 0:Object.keys(r).length?r:void 0}(e);if(!n||!Object.keys(n).length)return t;const r=t=>t&&"object"==typeof t&&!Array.isArray(t)?A(A({},n),t):t,o=t[Vt];if(o&&"object"==typeof o){const e=o;if(Array.isArray(e.keyframes)){const n=w(A({},e),{keyframes:e.keyframes.map(t=>w(A({},t),{value:r(t.value)}))});return void 0!==n.value&&(n.value=r(n.value)),w(A({},t),{transform:n})}return t}const i=Object.keys(t).filter(t=>R.has(t));if(1!==i.length)return t;const a=i[0],s=t[a];if(!s||"object"!=typeof s||!Array.isArray(s.keyframes))return t;const l=w(A({},s),{keyframes:s.keyframes.map(t=>w(A({},t),{value:w(A({},n),{[a]:t.value})}))});void 0!==l.value&&(l.value=w(A({},n),{[a]:l.value}));const c=A({},t);return delete c[a],w(A({},c),{transform:l})}(function(t){const e={};for(const n of t)for(const[t,r]of Object.entries(n))e[t]=r;return e}(a),i),o,r,e);return 0===Object.keys(s).length?null:{id:t,animate:s}},s=te(t);if(s)for(const t of s){const e=a(t.id,t.animate);e&&i.push(e)}const l=t=>{const e=t.animate;if(e&&Object.keys(e).length>0){const n=t.id||"_px_el_"+ ++or;t.id=n;const r=a(n,e,t.transform);r&&i.push(r)}if(t.children)for(let e=0;e<t.children.length;e++)l(t.children[e])};if(t.children)for(let e=0;e<t.children.length;e++)l(t.children[e]);return i}function ar(t,e,n){var r,o,i,a;const s=e.keyframes||[];if(0===s.length)return null;const{prevKf:l,nextKf:c}=function(t,e){var n,r;const o=t.length-1;let i=t[0],a=t[o>0?1:0];for(let s=0;s<o;s++){const l=null!=(n=t[s].t)?n:0,c=null!=(r=t[s+1].t)?r:0;if(l<=e&&e<=c){i=t[s],a=t[s+1];break}e>c&&s===o-1&&(i=t[o>0?o-1:0],a=t[o])}return{prevKf:i,nextKf:a}}(s,n);let u=l===c?0:(f=n,d=null!=(r=l.t)?r:0,(h=null!=(o=c.t)?o:0)===d?0:0+(f-d)/(h-d)*1);var f,d,h;u=Z(u,0,1);const m=se(l);if(m&&Array.isArray(m))try{u=T(m)(u)}catch(t){}let p=G(t)?K(t):t,g=null;const y=null==l?void 0:l.v,v=null==c?void 0:c.v;if("d"===p)g=M(null!=(i=null==y?void 0:y.paths)?i:Array.isArray(y)?y:[],null!=(a=null==v?void 0:v.paths)?a:Array.isArray(v)?v:[],u).map(t=>j(t)).join("");else if(F.has(p))g=C(O(y||[0,0,0,1],v||[0,0,0,1],u)),p=t;else if("stroke-dasharray"===p)g=P(y||[],v||[],u).join(" "),p=t;else if("transform"!==p||null===y||"object"!=typeof y||Array.isArray(y))"translate"===p?(g="translate("+P(y||[0,0],v||[0,0],u).join(",")+")",p="transform"):"rotate"===p?(g="rotate("+S(+(y||0),+(v||0),u)+")",p="transform"):"scale"===p?(g="scale("+P(y||[1,1],v||[1,1],u).join(",")+")",p="transform"):g=S(+(y||0),+(v||0),u);else{const t=new Set([...y?Object.keys(y):[],...v?Object.keys(v):[]]),n={};for(const e of t){const t=null==y?void 0:y[e],r=null==v?void 0:v[e];if("rotate"===e||"skew"===e)n[e]=S(+(null!=t?t:0),+(null!=r?r:0),u);else if("translate"===e||"scale"===e||"origin"===e){const o="scale"===e?[1,1]:[0,0],i=P(t||o,r||o,u);n[e]=i}}if(wn(e)){const t=y.translate,r=v.translate;if(Array.isArray(t)&&Array.isArray(r)){const o=Sn(l,c,[+t[0],+t[1]],[+r[0],+r[1]],u,!!e.autoOrient);n.translate=[o.translate[0],o.translate[1]],void 0!==o.rotateDeg&&(n.rotate=o.rotateDeg)}}g=B(n,{withUnits:!1}),p="transform"}return L.has(p)&&"number"==typeof g&&(g=100*g+"%"),{k:p,v:null===g?"":""+g}}function sr(t,e){const n={};for(const[r,o]of Object.entries(t)){const t=ar(r,o,e);t&&(n[t.k]=t.v)}return n}function lr(t){if(null===t||"object"!=typeof t)return t;if(Array.isArray(t))return t.map(lr);const e={};for(const n of Object.keys(t))e[n]=lr(t[n]);return e}function cr(t,e){const n=new Map,r=t=>{var o;if("string"==typeof t.id){const r=e();n.set(t.id,r),t.id=r}null==(o=t.children)||o.forEach(r)};r(t);const o=t=>t.replace(/url\(#([^)]+)\)/g,(t,e)=>{const r=n.get(e);return r?"url(#"+r+")":t}),i=t=>{var e;if("string"==typeof t.href&&t.href.startsWith("#")){const e=n.get(t.href.slice(1));e&&(t.href="#"+e)}for(const e of Object.keys(t)){if("children"===e||"effects"===e||"meta"===e||"animate"===e||"href"===e||"id"===e)continue;const n=t[e];"string"==typeof n&&-1!==n.indexOf("url(#")&&(t[e]=o(n))}null==(e=t.children)||e.forEach(i)};return i(t),n}function ur(t){const e="number"==typeof t?t:"string"==typeof t?parseFloat(t):NaN;return Number.isFinite(e)?e:0}function fr(t){var e;const n=ur(t.x),r=ur(t.y);if(delete t.x,delete t.y,!n&&!r)return t;const o="translate("+n+","+r+")";if(void 0!==t.transform||void 0!==t.animate){const n={type:"g",transform:o,children:null!=(e=t.children)?e:[]};t.children=[n]}else t.transform=o;return t}function dr(t){var e;const n=function(t){const e=new Map,n=t=>{var r;"string"==typeof t.id&&e.set(t.id,t),null==(r=t.children)||r.forEach(n)};return n(t),e}(t),r=function(t,e){const n=new WeakMap,r=new Set,o=(t,r)=>{const i=n.get(t);if(void 0!==i)return i;if(r.has(t))return!1;r.add(t);let a=!1;if(t.animate&&"object"==typeof t.animate&&!Array.isArray(t.animate))for(const e in t.animate){a=!0;break}if(!a&&t.children)for(const e of t.children)if(o(e,r)){a=!0;break}if(!a&&"use"===t.type&&"string"==typeof t.href){const n=mr(t.href),i=n?e.get(n):void 0;i&&(a=o(i,r))}return r.delete(t),n.set(t,a),a};for(const[t,n]of e)o(n,new Set)&&r.add(t);return r}(0,n);if(0===r.size)return t;let o=0;const i=function(t){const e=pr(t.viewBox);if(e)return[e[2],e[3]];const n=hr(t.width),r=hr(t.height);return void 0!==n&&void 0!==r?[n,r]:[1,1]}(t),a=[],s=gr(t,n,r,()=>"_lw_use_mat_"+ ++o,a,i);if(0===a.length)return s;const l={type:"defs",children:a},c=[...null!=(e=s.children)?e:[],l];return w(A({},s),{children:c})}function hr(t){if("number"==typeof t)return t;if("string"==typeof t){const e=parseFloat(t);return Number.isFinite(e)?e:void 0}}function mr(t){if("string"==typeof t)return t.startsWith("#")?t.slice(1):t}function pr(t){if("string"!=typeof t)return;const e=t.trim().split(/[\s,]+/).map(Number);return e.length<4||e.some(t=>!Number.isFinite(t))?void 0:[e[0],e[1],e[2],e[3]]}function gr(t,e,n,r,o,i){if("use"===t.type&&"string"==typeof t.href){const a=mr(t.href);if(a&&n.has(a)){const s=e.get(a);if(s)return function(t,e,n,r,o,i,a){var s,l,c,u;const f=lr(e);cr(f,o);const d="symbol"===f.type?pr(f.viewBox):void 0,h=null!=(l=null!=(s=hr(t.width))?s:null==d?void 0:d[2])?l:a[0],m=null!=(u=null!=(c=hr(t.height))?c:null==d?void 0:d[3])?u:a[1],p="symbol"===f.type?function(t,e,n,r,o){const i=pr(t.viewBox),a=w(A({},t),{type:"g"});if(delete a.viewBox,delete a.preserveAspectRatio,delete a.width,delete a.height,!i)return a;const[s,l,c,u]=i,f=c>0&&u>0?Math.min(r/c,o/u):1,d=(r-c*f)/2,h=(o-u*f)/2,m=[];0===d&&0===h||m.push("translate("+d+","+h+")"),1!==f&&m.push("scale("+f+")"),0===s&&0===l||m.push("translate("+-s+","+-l+")"),m.length&&(a.transform=m.join(""));const p=e();return n.push({type:"clipPath",id:p,children:[{type:"rect",x:s,y:l,width:c,height:u}]}),a.clipPath="url(#"+p+")",a}(f,o,i,h,m):f,g=gr(p,n,r,o,i,a),y=w(A({},t),{type:"g",children:[g]});return delete y.href,delete y.width,delete y.height,fr(y)}(t,s,e,n,r,o,i)}}if(!t.children)return t;let a=!1;const s=t.children.map(t=>{const s=gr(t,e,n,r,o,i);return s!==t&&(a=!0),s});return a?w(A({},t),{children:s}):t}function yr(t,e,n){const r={};return"translate"===t?r.translate=e:"rotate"===t?r.rotate=e:"skew"===t?r.skew=e:r.scale=e,n&&"translate"!==t&&(r.origin=n),r}function vr(t){var e,n;if(void 0===t)return{kind:"absent"};if(Array.isArray(t))return{kind:"static",value:t};if("object"==typeof t){const r=t,o=r.keyframes;if(o){const t={kind:"animated",keyframes:o.map(kr),autoOrient:r.autoOrient,loop:r.loop},n=null!=(e=r.value)?e:r.v;return void 0!==n&&"animated"===t.kind&&(t.base=n),t}const i=null!=(n=r.value)?n:r.v;if(void 0!==i)return{kind:"static",value:i}}return{kind:"static",value:t}}function br(t,e,n,r){var o,i,a,s;const l=t=>(null==r?void 0:r.asString)&&null!=t?String(t):t;if("absent"===n.kind)return;if("static"===n.kind)return void(t[e]=l(n.value));const c=t.animate&&"object"==typeof t.animate&&!Array.isArray(t.animate)?t.animate:void 0,u=A({},c||{}),f={keyframes:n.keyframes};void 0!==n.loop&&(f.loop=n.loop),void 0!==n.autoOrient&&(f.autoOrient=n.autoOrient),u[e]=f,t.animate=u;const d=null!=(s=null!=(i=n.base)?i:null==(o=n.keyframes[0])?void 0:o.value)?s:null==(a=n.keyframes[0])?void 0:a.v;void 0!==d&&(t[e]=l(d))}function kr(t){if(!t||"object"!=typeof t)return t;const e=t;if(void 0===e.t&&void 0===e.v&&void 0===e.e&&void 0===e.to&&void 0===e.ti)return t;const n=A({},e);return void 0===n.time&&void 0!==e.t&&(n.time=e.t),void 0===n.value&&void 0!==e.v&&(n.value=e.v),void 0===n.easing&&void 0!==e.e&&(n.easing=e.e),void 0===n.tangentOut&&void 0!==e.to&&(n.tangentOut=e.to),void 0===n.tangentIn&&void 0!==e.ti&&(n.tangentIn=e.ti),n}function Ar(t,e){const n={value:e};return void 0!==t.time&&(n.time=t.time),void 0!==t.easing&&(n.easing=t.easing),void 0!==t.tangentOut&&(n.tangentOut=t.tangentOut),void 0!==t.tangentIn&&(n.tangentIn=t.tangentIn),n}function wr(t,e,n){if(!e)return t;delete t.transform;let r=t;return r=jr(r,e.origin,!0),r=xr(r,"scale",e.scale),r=xr(r,"skew",e.skew),r=xr(r,"rotate",e.rotate),r=jr(r,e.origin,!1),function(t){if(!t||"object"!=typeof t)return!1;const e=t;return!!e.autoOrient||Array.isArray(e.keyframes)&&e.keyframes.some(t=>t.tangentOut||t.tangentIn)}(e.translate)?(r=jr(r,e.origin,!0),r=xr(r,"translate",e.translate),r=jr(r,e.origin,!1)):r=xr(r,"translate",e.translate),r!==t&&t.id&&(r.id=t.id,delete t.id),r}function xr(t,e,n,r){if(void 0===n)return t;const o=vr(n);if("static"===o.kind)return{type:"g",transform:{value:yr(e,o.value,void 0)},children:[t]};if("animated"===o.kind){const n={keyframes:o.keyframes.map(t=>Ar(t,yr(e,t.value,void 0)))};return o.autoOrient&&(n.autoOrient=!0),void 0!==o.loop&&(n.loop=o.loop),{type:"g",animate:{transform:n},children:[t]}}return t}function jr(t,e,n){if(void 0===e)return t;const r=vr(e),o=t=>n?[-t[0],-t[1]]:t;if("absent"===r.kind)return t;if("static"===r.kind)return 0===r.value[0]&&0===r.value[1]?t:{type:"g",transform:{value:{translate:o(r.value)}},children:[t]};if("animated"===r.kind){const e={keyframes:r.keyframes.map(t=>Ar(t,{translate:o(t.value)}))};return void 0!==r.loop&&(e.loop=r.loop),{type:"g",animate:{transform:e},children:[t]}}return t}function Sr(t,e){return"_lw_"+e+"_"+t.nextId++}function Pr(t){return"string"==typeof t?t.replace(/^#/,""):void 0}function Or(t,e){var n;"string"==typeof t.id&&e.set(t.id,t),null==(n=t.children)||n.forEach(t=>Or(t,e))}var Mr=lr;function _r(t,e,n){var r,o,i;if("use"===t.type&&"translate"===(null==(o=null==(r=t.effects)?void 0:r.clone)?void 0:o.without)){const r=Pr(t.effects.clone.source);"string"==typeof r&&r&&!e.contentRefInnerIds.has(r)&&e.contentRefInnerIds.set(r,n(r))}null==(i=t.children)||i.forEach(t=>_r(t,e,n))}function Er(t){const e=/translate\(([^)]*)\)/.exec(t);if(!e)return[0,0];const n=e[1].split(/[\s,]+/).filter(Boolean).map(Number);return[n[0]||0,n[1]||0]}function Tr(t){if(!t||"object"!=typeof t)return!1;const e=t;return!!e.autoOrient||!!Array.isArray(e.keyframes)&&e.keyframes.some(t=>t.tangentOut||t.tangentIn)}function Nr(t,e,n,r){if(!e)return t;const o=Sr(n,"grad"),i=function(t,e){const n={type:t.type===Ht.radial?"radialGradient":"linearGradient",id:e};return t.type===Ht.linear?(zr(n,"x1","y1",t.start),zr(n,"x2","y2",t.end)):(zr(n,"cx","cy",t.center),function(t,e,n){const r=vr(n);"absent"!==r.kind&&br(t,"r",r,{asString:!0})}(n,0,t.radius),zr(n,"fx","fy",t.focal)),t.gradientUnits&&(n.gradientUnits=t.gradientUnits),t.spreadMethod&&(n.spreadMethod=t.spreadMethod),t.gradientTransform&&(n.gradientTransform=t.gradientTransform),n.children=function(t){var e,n;if(!t)return[];const r=vr(t);if("absent"===r.kind)return[];if("static"===r.kind)return Array.isArray(r.value)?r.value.map(Ir):[];const o=r.keyframes;if(!o.length)return[];const i=r.loop;let a=0;for(const t of o){const e=ae(t);Array.isArray(e)&&e.length>a&&(a=e.length)}if(!a)return[];const s=ae(o[0]),l=[];for(let t=0;t<a;t++){const r=null!=(n=null!=(e=null==s?void 0:s[t])?e:Cr(o,0,t))?n:{offset:t/Math.max(1,a-1),color:"#000000"};l.push({offset:r.offset,color:r.color})}return l.map((t,e)=>function(t,e,n,r,o){var i;const a=[],s=[];let l=!1;for(const r of e){const o=ie(r),c=ae(r),u=null!=(i=null==c?void 0:c[n])?i:Cr(e,e.indexOf(r),n);if(!u)continue;const f=se(r),d={time:o,value:u.color};void 0!==f&&(d.easing=f),a.push(d);const h={time:o,value:u.offset};void 0!==f&&(h.easing=f),s.push(h),u.offset!==t.offset&&(l=!0)}const c={type:"stop",offset:Dr(t.offset),stopColor:t.color},u={};return a.length&&(u.stopColor={keyframes:a},void 0!==o&&(u.stopColor.loop=o)),l&&s.length&&(u.offset={keyframes:s},void 0!==o&&(u.offset.loop=o)),Object.keys(u).length&&(c.animate=u),c}(t,o,e,0,i))}(t.stops),n}(e,o);return n.defs.push(i),t[r]="url(#"+o+")",t}function zr(t,e,n,r){var o,i,a;const s=vr(r);if("absent"===s.kind)return;if("static"===s.kind)return t[e]=String(s.value[0]),void(t[n]=String(s.value[1]));const l=t=>{const e={keyframes:s.keyframes.map(e=>{const n={time:e.time,value:Array.isArray(e.value)?e.value[t]:void 0};return void 0!==e.easing&&(n.easing=e.easing),n})};return void 0!==s.loop&&(e.loop=s.loop),e},c=null!=(o=t.animate)?o:{};c[e]=l(0),c[n]=l(1),t.animate=c;const u=null!=(a=s.base)?a:null==(i=s.keyframes[0])?void 0:i.value;Array.isArray(u)&&(t[e]=String(u[0]),t[n]=String(u[1]))}function Ir(t){return{type:"stop",offset:Dr(t.offset),stopColor:t.color}}function Cr(t,e,n){for(let r=e;r>=0;r--){const e=ae(t[r]);if(null==e?void 0:e[n])return e[n]}for(let r=e+1;r<t.length;r++){const e=ae(t[r]);if(null==e?void 0:e[n])return e[n]}}function Dr(t){return Math.round(1e3*t)/10+"%"}function Fr(t){return"string"==typeof t?t:t&&"object"==typeof t&&"string"==typeof t.path?t.path:void 0}function Rr(t,e,n){if(!e)return t;const r=function(t,e){var n;const r=vr(t);if("absent"!==r.kind)return"static"===r.kind?r.value:(e.warnings.push("transformBy.origin: animated origin approximated by its first keyframe"),null==(n=r.keyframes[0])?void 0:n.value)}(e.origin,n);let o=t;return o=Lr(o,"translate",e.translate,void 0),o=Lr(o,"rotate",e.rotate,r),o=Lr(o,"scale",e.scale,r),o}function Lr(t,e,n,r,o){if(void 0===n)return t;const i=vr("scale"===e&&Array.isArray(n)?[n[0]/100,n[1]/100]:n);if("static"===i.kind)return{type:"g",transform:{value:yr(e,Br(e,i.value),r)},children:[t]};if("animated"===i.kind){const n={keyframes:i.keyframes.map(t=>{const n=Ar(t,yr(e,Br(e,t.value),r));return"translate"===e?A(A({},n),Ur(t)):n})};return void 0!==i.loop&&(n.loop=i.loop),{type:"g",animate:{transform:n},children:[t]}}return t}function Br(t,e){return"translate"===t?[-e[0],-e[1]]:"rotate"===t?-e:[1/e[0],1/e[1]]}function Ur(t){var e,n;const r={},o=null!=(e=t.tangentOut)?e:t.to,i=null!=(n=t.tangentIn)?n:t.ti;return Array.isArray(o)&&(r.tangentOut=[-o[0],-o[1]]),Array.isArray(i)&&(r.tangentIn=[-i[0],-i[1]]),r}function Vr(t){const e=t.animate&&"object"==typeof t.animate&&!Array.isArray(t.animate)?t.animate:void 0;return!(!e||!e.transform)}function Wr(t){let e=0,n=0;for(const r of t)r.translate&&(e+=r.translate[0],n+=r.translate[1]);return[e,n]}function Gr(t,e){let n=0,r=0;for(const o of t)if(o.translateKeyframes&&o.translateKeyframes.length){const t=qr(o.translateKeyframes,e);n+=t[0],r+=t[1]}else o.translate&&(n+=o.translate[0],r+=o.translate[1]);return[n,r]}function qr(t,e){if(e<=t[0].time)return t[0].value;if(e>=t[t.length-1].time)return t[t.length-1].value;for(let n=1;n<t.length;n++)if(e<=t[n].time){const r=t[n-1],o=t[n],i=(e-r.time)/(o.time-r.time);return[r.value[0]+(o.value[0]-r.value[0])*i,r.value[1]+(o.value[1]-r.value[1])*i]}return t[t.length-1].value}function Kr(t,e){var n,r,o;const i=t.transform,a=t.animate&&"object"==typeof t.animate&&!Array.isArray(t.animate)?t.animate.transform:void 0;if(void 0===i&&!a)return;const s={};if("string"==typeof i){const t=function(t,e){const n=/([a-zA-Z]+)\s*\(([^)]*)\)/g;let r,o=0,i=0,a=!1,s=!1;for(;null!==(r=n.exec(t));){const t=r[1],e=r[2].split(/[\s,]+/).filter(t=>t.length>0).map(Number);"translate"===t?(o+=e[0]||0,i+=e[1]||0,a=!0):s=!0}return s&&e.warnings.push("maskedBy ancestor: non-translate transform in string ignored: "+t),a?[o,i]:void 0}(i,e);t&&(s.translate=t)}else if(i&&"object"==typeof i&&!i.keyframes){const t=i.value,n=t&&"object"==typeof t?t:i;n&&"object"==typeof n&&Array.isArray(n.translate)&&(s.translate=[n.translate[0]||0,n.translate[1]||0]),!n||void 0===n.rotate&&void 0===n.scale&&void 0===n.skew||e.warnings.push("maskedBy ancestor: non-translate transform parts ignored (rotate/scale not yet supported)")}if(a&&Array.isArray(a.keyframes)){const t=a.keyframes,i=[];for(const a of t){const t=null!=(n=a.value)?n:a.v,s=null!=(o=null!=(r=a.time)?r:a.t)?o:0;t&&"object"==typeof t&&Array.isArray(t.translate)&&(i.push({time:s,value:[t.translate[0]||0,t.translate[1]||0]}),void 0===t.rotate&&void 0===t.scale&&void 0===t.skew||e.warnings.push("maskedBy ancestor: animated non-translate parts ignored"))}i.length&&(s.translateKeyframes=i)}return s.translate||s.translateKeyframes?s:void 0}function Zr(t,e,n){if(!e)return;const r=Pr(e.source);if(!r)return void(e.without===Ft.translate&&n.errors.push("clone: content ref missing `source`"));const o=e.without===Ft.translate&&n.contentRefInnerIds.get(r)||r;t.href="#"+o}function Xr(t,e){const n={};return void 0!==t.translate&&(n.translate=Hr(t.translate,t=>[t[0]*e,t[1]*e])),void 0!==t.rotate&&(n.rotate=Hr(t.rotate,t=>t*e)),void 0!==t.skew&&(n.skew=Hr(t.skew,t=>t*e)),void 0!==t.scale&&(n.scale=function(t,e){return Hr(t,t=>[Math.pow(t[0],e),Math.pow(t[1],e)],!0)}(t.scale,e)),void 0!==t.origin&&(n.origin=t.origin),Object.keys(n).length?n:void 0}function Hr(t,e,n=!1){const r=vr(t);if("absent"===r.kind)return t;if("static"===r.kind){const o=e(r.value);return"number"!=typeof t&&!Array.isArray(t)||n?{value:o}:o}const o={keyframes:r.keyframes.map(t=>t&&void 0!==t.value?w(A({},t),{value:e(t.value)}):t)};return void 0!==r.loop&&(o.loop=r.loop),void 0!==r.autoOrient&&(o.autoOrient=r.autoOrient),void 0!==r.base&&(o.value=e(r.base)),o}var Yr=!1;function Jr(t){var e,n;return{start:null!=(e=t.start)?e:0,stretch:null!=(n=t.stretch)?n:1}}var Qr=1;function $r(t,e,n){const[r,o]=e;if(!Number.isFinite(r)||!Number.isFinite(o))return void n.warnings.push("retime: timeCrop is not a pair of finite numbers — ignored");const i=o<=r?[{time:0,value:0}]:[...r>0?[{time:Math.max(0,r-Qr),value:0}]:[],{time:Math.max(0,r),value:1},{time:o,value:1},{time:o+Qr,value:0}],a=A({},t);for(const e of Object.keys(t))delete t[e];t.type="g",t.children=[a],t.animate={opacity:{keyframes:i}}}function to(t,e){return{start:e.start+e.stretch*t.start,stretch:e.stretch*t.stretch}}function eo(t){var e,n;return null==(n=null==(e=t.effects)?void 0:e.clone)?void 0:n.retime}function no(t){var e;const n=null==(e=t.effects)?void 0:e.clone;n&&(delete n.retime,0===Object.keys(n).length&&delete t.effects.clone,t.effects&&0===Object.keys(t.effects).length&&delete t.effects)}function ro(t,e,n){const r=Pr(t.href);if(!r)return void n.errors.push("retime: <use> has no href to follow");const o=oo(r,e,n,new Set);if(o)if(Yr){const e=n.idMap.get(o);t.type="g",delete t.href,t.children=[e],fr(t),n.defs=n.defs.filter(t=>t!==e)}else t.href="#"+o}function oo(t,e,n,r){if(r.has(t))return void n.errors.push('retime: loop via "'+t+'"');const o=n.idMap.get(t);if(!o)return void n.warnings.push('retime: target "'+t+'" not found');const i=Mr(o);if(function(t,e){cr(t,()=>Sr(e,"retimed"))}(i,n),"use"===o.type?ao(i,e.start,e.stretch):io(i,e.start,e.stretch),no(i),"use"===o.type&&o.href){const a=Pr(o.href);if(a){const s=eo(o),l=s?to(Jr(s),e):e,c=new Set(r);c.add(t);const u=oo(a,l,n,c);u&&(i.href="#"+u)}}else!function(t,e,n,r,o){const i=t=>{var a;const s=eo(t);if("use"===t.type&&s&&t.href){const i=Pr(t.href);if(i){const a=to(Jr(s),e),l=new Set(r);l.add(o);const c=oo(i,a,n,l);c&&(t.href="#"+c)}no(t)}null==(a=t.children)||a.forEach(i)};i(t)}(i,e,n,r,t);return n.defs.push(i),"string"==typeof i.id&&n.idMap.set(i.id,i),"string"==typeof i.id?i.id:void 0}function io(t,e,n){var r;ao(t,e,n),null==(r=t.children)||r.forEach(t=>io(t,e,n))}function ao(t,e,n){const r=t=>{for(const r of t)"number"==typeof r.time&&(r.time=e+r.time*n)};if(t.transform&&"object"==typeof t.transform&&Array.isArray(t.transform.keyframes)&&r(t.transform.keyframes),t.animate&&"object"==typeof t.animate)for(const e of Object.keys(t.animate)){const n=t.animate[e];n&&Array.isArray(n.keyframes)&&r(n.keyframes)}}var so=48,lo=/[MmLlHhVvCcSsQqTtAaZz]/;function co(t,e,n){return{P1:[t[0]+2/3*(e[0]-t[0]),t[1]+2/3*(e[1]-t[1])],P2:[n[0]+2/3*(e[0]-n[0]),n[1]+2/3*(e[1]-n[1])]}}function uo(t){const e=function(t){const e=function(t){const e=[],n=/([MmLlHhVvCcSsQqTtAaZz])|(-?\d*\.?\d+(?:[eE][-+]?\d+)?)/g;let r;for(;null!==(r=n.exec(t));)e.push(r[0]);return e}(t),n=[];let r=0,o=0,i=0,a=0,s=0,l=0,c=0,u=0,f=0,d="";const h=()=>parseFloat(e[r++]),m=(t,e,r)=>{const a=[o,i],s=Q(a,t,e,r,so);n.push({P0:a,P1:t,P2:e,P3:r,lut:s,len:s.ds[s.ds.length-1]}),o=r[0],i=r[1]},p=(t,e)=>{m([o+(t-o)/3,i+(e-i)/3],[o+2*(t-o)/3,i+2*(e-i)/3],[t,e])};for(;r<e.length;){let t=e[r];lo.test(t)?r++:t="M"===d?"L":"m"===d?"l":d;const n=t>="a",g=t.toUpperCase();if("Z"!==g){if("M"===g){const e=h()+(n?o:0),r=h()+(n?i:0);o=e,i=r,a=e,s=r,d=t;continue}if("L"===g)p(h()+(n?o:0),h()+(n?i:0));else if("H"===g)p(h()+(n?o:0),i);else if("V"===g)p(o,h()+(n?i:0));else if("C"===g){const t=[h()+(n?o:0),h()+(n?i:0)],e=[h()+(n?o:0),h()+(n?i:0)],r=[h()+(n?o:0),h()+(n?i:0)];l=e[0],c=e[1],m(t,e,r)}else if("S"===g){const t="C"===d.toUpperCase()||"S"===d.toUpperCase()?[2*o-l,2*i-c]:[o,i],e=[h()+(n?o:0),h()+(n?i:0)],r=[h()+(n?o:0),h()+(n?i:0)];l=e[0],c=e[1],m(t,e,r)}else if("Q"===g){const t=[h()+(n?o:0),h()+(n?i:0)],e=[h()+(n?o:0),h()+(n?i:0)];u=t[0],f=t[1];const{P1:r,P2:a}=co([o,i],t,e);m(r,a,e)}else if("T"===g){const t="Q"===d.toUpperCase()||"T"===d.toUpperCase()?[2*o-u,2*i-f]:[o,i],e=[h()+(n?o:0),h()+(n?i:0)];u=t[0],f=t[1];const{P1:r,P2:a}=co([o,i],t,e);m(r,a,e)}else{if("A"!==g){r++;continue}r+=5,p(h()+(n?o:0),h()+(n?i:0))}d=t}else p(a,s),o=a,i=s,d=t}return n.length?n:null}(t);if(!e)return null;const n=new Float64Array(e.length+1);for(let t=0;t<e.length;t++)n[t+1]=n[t]+e[t].len;const r=n[e.length],o=e[0].P0,i=e[e.length-1].P3,a=Math.hypot(i[0]-o[0],i[1]-o[1])<.001,s=t=>{let r=0;for(;r<e.length-1&&t>n[r+1];)r++;const o=e[r],i=t-n[r],a=o.len>0?function(t,e){const{ts:n,ds:r}=t,o=r.length-1;if(e<=0)return n[0];if(e>=r[o])return n[o];let i=1,a=o;for(;i<a;){const t=i+a>>>1;r[t]<e?i=t+1:a=t}const s=r[a-1],l=r[a]-s,c=l>0?(e-s)/l:0;return n[a-1]+c*(n[a]-n[a-1])}(o.lut,i):0,[s,l]=X(o.P0,o.P1,o.P2,o.P3,a),[c,u]=Y(o.P0,o.P1,o.P2,o.P3,a);return{x:s,y:l,angle:Math.atan2(u,c)}};return{totalLength:r,closed:a,sampleAtDistance(t){if(a&&r>0&&(t<0||t>r))return s((t%r+r)%r);if(!a&&(t<0||t>r)){const e=t<0?0:r,n=s(e),o=t-e;return{x:n.x+Math.cos(n.angle)*o,y:n.y+Math.sin(n.angle)*o,angle:n.angle}}return s((n=r,(e=t)<0?0:e>n?n:e));var e,n}}}var fo=.15;function ho(t){const e=vr(t);if("static"===e.kind&&"number"==typeof e.value)return{min:e.value,max:e.value};if("animated"===e.kind&&e.keyframes.length){const t=e.keyframes.map(t=>Number(t.value)||0);return{min:Math.min(...t),max:Math.max(...t)}}return{min:0,max:0}}function mo(t){let e=0,n=16;const r=t=>{var o,i;const a=parseFloat(String(null!=(o=t.fontSize)?o:""))||0;a&&(n=Math.max(n,a));const s=null!=(i=t.text)?i:t.textContent;if("string"==typeof s&&(e+=s.length),t.children)for(const e of t.children)r(e)};return r(t),e*n}var po=t=>Math.round(1e3*t)/1e3;function go(t,e){if(!e||null==t)return t;const n=vr(t);if("absent"===n.kind)return t;if("static"===n.kind)return"number"==typeof t?n.value+e:{value:n.value+e};const r={keyframes:n.keyframes.map(t=>w(A({},t),{value:(Number(t.value)||0)+e}))};return void 0!==n.loop&&(r.loop=n.loop),void 0!==n.autoOrient&&(r.autoOrient=n.autoOrient),void 0!==n.base&&(r.value=n.base+e),r}function yo(t,e){var n;if("clip"===e.pathOverflow)return{d:t,startShift:0};const r=uo(t);if(!r||r.closed||r.totalLength<=0)return{d:t,startShift:0};const o=r.totalLength,i=fo*o,a=ho(e.startOffset),s=ho(e.textLength).max||(null!=(n=e.advance)?n:0),l=Math.max(0,-a.min),c=Math.max(0,a.max+s-o),u=l>0?l+i:0,f=c>0?c+i:0;if(f<=0&&u<=0)return{d:t,startShift:0};const d=r.sampleAtDistance(0),h=r.sampleAtDistance(o);let m=t;if(u>0){const e=d.x-Math.cos(d.angle)*u,n=d.y-Math.sin(d.angle)*u,r=t.replace(/^\s*[Mm]\s*-?[\d.]+[\s,]+-?[\d.]+/,"");m="M"+po(e)+","+po(n)+"L"+po(d.x)+","+po(d.y)+r}if(f>0){const t=h.x+Math.cos(h.angle)*f,e=h.y+Math.sin(h.angle)*f;m+="L"+po(t)+","+po(e)}return{d:m,startShift:u}}function vo(t,e,n){null!=n&&br(t,e,vr(n),{asString:!0})}var bo=(t,e,n)=>{const r={type:t};for(const t in e)void 0!==e[t]&&(r[t]=e[t]);const o=Array.isArray(n)?n.filter(t=>null!=t):null!=n?[n]:[];return o.length&&(r.children=o),r};function ko(t,e){return Math.round(t)===t?""+Math.round(t):t.toFixed(e)}function Ao(t,e){let n="";for(let r=0;r<t.length;r++){const o=ko(t[r],e);r>0&&45!==o.charCodeAt(0)&&(n+=" "),n+=o}return n}function wo(t,e,n){return[t[0]*e+t[2]*n+t[4],t[1]*e+t[3]*n+t[5]]}var xo=/([MLCQZ])|(-?\d*\.?\d+(?:e[-+]?\d+)?)/gi;function jo(t,e,n=2){const r=[];let o;for(xo.lastIndex=0;null!==(o=xo.exec(t));)r.push(o[0]);let i="",a=0;const s=()=>parseFloat(r[a++]);for(;a<r.length;){const t=r[a++];if("M"===t||"L"===t){const[r,o]=wo(e,s(),s());i+=t+Ao([r,o],n)}else if("C"===t){const[t,r]=wo(e,s(),s()),[o,a]=wo(e,s(),s()),[l,c]=wo(e,s(),s());i+="C"+Ao([t,r,o,a,l,c],n)}else if("Q"===t){const[t,r]=wo(e,s(),s()),[o,a]=wo(e,s(),s());i+="Q"+Ao([t,r,o,a],n)}else"Z"!==t&&"z"!==t||(i+="Z")}return i}var So=16,Po=["fontFamily","fontSize","fontWeight","fontStyle","textAnchor","letterSpacing","wordSpacing","textDecoration","textTransform","whiteSpace","x","y","dx","dy","lengthAdjust","fill","stroke","strokeWidth","effects",Lt,Bt,"xml:space"],Oo=["fillOpacity","fillRule","strokeOpacity","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","mixBlendMode","filter"],Mo=["fill","stroke","strokeWidth","opacity","fillOpacity","strokeOpacity","strokeDasharray","strokeDashoffset"];function _o(t){if("number"==typeof t)return t;if("string"==typeof t){const e=parseFloat(t);return isNaN(e)?void 0:e}}function Eo(t){return"string"==typeof t?t:void 0}function To(t){const e=t.animate;if(!e||"object"!=typeof e)return;let n;for(const t of Mo)void 0!==e[t]&&((null!=n?n:n={})[t]=e[t]);return n}function No(t,e){var n,r,o,i,a,s,l,c,u,f;const d="text"===t.type,h=t.style,m=e=>{var n;return d?void 0:null!=(n=t[e])?n:null==h?void 0:h[e]},p={fontFamily:null!=(n=Eo(t.fontFamily))?n:e.fontFamily,fontSize:null!=(r=_o(t.fontSize))?r:e.fontSize,fill:null!=(o=t.fill)?o:e.fill,stroke:null!=(i=t.stroke)?i:e.stroke,strokeWidth:null!=(a=t.strokeWidth)?a:e.strokeWidth,letterSpacing:null!=(s=_o(t.letterSpacing))?s:e.letterSpacing,wordSpacing:null!=(l=_o(t.wordSpacing))?l:e.wordSpacing,opacity:null!=(c=_o(m("opacity")))?c:e.opacity,animate:null!=(u=d?void 0:To(t))?u:e.animate};for(const t of Oo){const n=null!=(f=m(t))?f:e[t];void 0!==n&&(p[t]=n)}return p}function zo(t){var e,n,r;return{fontFamily:Eo(t.fontFamily),fontSize:null!=(e=_o(t.fontSize))?e:So,fill:t.fill,stroke:t.stroke,strokeWidth:t.strokeWidth,letterSpacing:null!=(n=_o(t.letterSpacing))?n:0,wordSpacing:null!=(r=_o(t.wordSpacing))?r:0}}function Io(t){const e={};void 0!==t.fill&&(e.fill=t.fill),void 0!==t.stroke&&(e.stroke=t.stroke),void 0!==t.strokeWidth&&(e.strokeWidth=t.strokeWidth),void 0!==t.opacity&&1!==t.opacity&&(e.opacity=t.opacity);for(const n of Oo)void 0!==t[n]&&(e[n]=t[n]);return void 0!==t.animate&&(e.animate=t.animate),e}function Co(t,e,n,r){var o;const i=t.fontFamily?e[t.fontFamily]:n;return i||null==r||r.push('textGlyphs: no glyphs for font "'+(null!=(o=t.fontFamily)?o:"")+'"'),i}function Do(t){const e=Object.keys(t);return 1===e.length?t[e[0]]:void 0}var Fo=.6,Ro="px-missing-glyph";function Lo(t,e){if(t<=0||e<=0)return"";const n=.08*t,r=.92*t,o=.92*-e,i=r-n,a=-o,s=Math.max(1,.12*Math.min(i,a)),l="M"+n+" 0L"+r+" 0L"+r+" "+o+"L"+n+" "+o+"Z";if(i<=2*s||a<=2*s)return l;const c=n+s,u=r-s,f=-s,d=o+s;return l+"M"+c+" "+f+"L"+c+" "+d+"L"+u+" "+d+"L"+u+" "+f+"Z"}function Bo(t,e){var n,r,o,i;const{glyphs:a,create:s=bo,warnings:l}=e,c=Do(a),u={x:null!=(n=_o(t.x))?n:0,y:null!=(r=_o(t.y))?r:0},f=[],d=[{start:u.x,end:u.x}];let h=0;const m=(t,e)=>{var n;const r=Co(e,a,c,l),o=(null==r?void 0:r.unitsPerEm)||1e3,i=e.fontSize/o,s=null!=(n=null==r?void 0:r.ascent)?n:.9*o,m=Io(e);for(let n=0;n<t.length;n++){const a=t.charAt(n),l=null==r?void 0:r.glyphs[a];if(l&&l.d)f.push({glyphD:l.d,m:[i,0,0,i,u.x,u.y],paint:m,line:h,x:u.x,y:u.y,scale:i}),u.x+=l.width*i;else if(/\S/.test(a)){const t=l&&l.width>0?l.width:Fo*o;f.push({glyphD:Lo(t,s),m:[i,0,0,i,u.x,u.y],paint:m,isMissing:!0,line:h,x:u.x,y:u.y,scale:i}),u.x+=t*i}else u.x+=(l?l.width:0)*i;u.x+=e.letterSpacing+(" "===a?e.wordSpacing:0),d[h].end=u.x}},p=(t,e)=>{var n,r,o,i;const a=No(t,e),s=_o(t.x),l=_o(t.y);void 0!==s&&(u.x=s,h=d.length,d.push({start:u.x,end:u.x})),void 0!==l&&(u.y=l),u.x+=null!=(n=_o(t.dx))?n:0,u.y+=null!=(r=_o(t.dy))?r:0;const c=null!=(o=Eo(t[Bt]))?o:Eo(t[Lt]);if(c&&!(null==(i=t.children)?void 0:i.length)&&m(c,a),t.children)for(const e of t.children)p(e,a)},g=zo(t);if(t.children)for(const e of t.children)p(e,g);const y=null!=(o=Eo(t[Bt]))?o:Eo(t[Lt]);y&&!(null==(i=t.children)?void 0:i.length)&&m(y,g);const v=Eo(t.textAnchor);if("middle"===v||"end"===v)for(const t of f){const e=d[t.line].end-d[t.line].start,n="middle"===v?-e/2:-e;t.m=[t.scale,0,0,t.scale,t.x+n,t.y]}return Qo(t,Jo(f,s,l),s)}function Uo(t,e){var n,r,o,i,a,s;if(null==(n=e.alongPath)?void 0:n.pathD)return function(t,e,n){var r,o;const{glyphs:i,warnings:a,alongPath:s}=n,l=uo(e);if(!l)return null==a||a.push("textGlyphs: unparsable along-path geometry (caret)"),[];const c=Do(i),u=[];let f=0;const d=(t,e)=>{var n,r,o;const s=No(t,e),l=null!=(n=Eo(t[Bt]))?n:Eo(t[Lt]);if(l&&!(null==(r=t.children)?void 0:r.length)){const t=Co(s,i,c,a),e=(null==t?void 0:t.unitsPerEm)||1e3,n=s.fontSize/e,r=(null!=(o=null==t?void 0:t.ascent)?o:.9*e)*n;for(let e=0;e<l.length;e++){const o=l.charAt(e),i=null==t?void 0:t.glyphs[o],a=(i?i.width:0)*n,c=a+s.letterSpacing+(" "===o?s.wordSpacing:0);u.push({advStart:f,advEnd:f+c,glyphW:a,ascent:r,fontSize:s.fontSize}),f+=c}}if(t.children)for(const e of t.children)d(e,s)};d(t,zo(t));const h=f,m=vr(null==s?void 0:s.textLength),p="animated"===m.kind?Number(null==(r=m.keyframes[0])?void 0:r.value)||0:"static"===m.kind&&Number(m.value)||0,g=p>0&&h>0?p/h:1,y=vr(null==s?void 0:s.startOffset),{along:v,perp:b}=Wo(t),k=v+("animated"===y.kind?Number(null==(o=y.keyframes[0])?void 0:o.value)||0:"static"===y.kind&&Number(y.value)||0),A=t=>({x:t.x-b*Math.sin(t.angle),y:t.y+b*Math.cos(t.angle),angle:t.angle});return u.map(t=>{const e=k+t.advStart*g,n=k+t.advEnd*g,r=A(l.sampleAtDistance(e)),o=A(l.sampleAtDistance(n)),i=l.sampleAtDistance(k+(t.advStart+t.glyphW/2)*g);return{x:r.x,y:r.y,width:t.advEnd-t.advStart,ascent:t.ascent,fontSize:t.fontSize,endX:o.x,endY:o.y,rotation:180*i.angle/Math.PI}})}(t,e.alongPath.pathD,e);const{glyphs:l,warnings:c}=e,u=Do(l),f={x:null!=(r=_o(t.x))?r:0,y:null!=(o=_o(t.y))?o:0},d=[],h=[{start:f.x,end:f.x}];let m=0;const p=(t,e)=>{var n;const r=Co(e,l,u,c),o=(null==r?void 0:r.unitsPerEm)||1e3,i=e.fontSize/o,a=(null!=(n=null==r?void 0:r.ascent)?n:.9*o)*i;for(let n=0;n<t.length;n++){const o=t.charAt(n),s=null==r?void 0:r.glyphs[o],l=(s?s.width:0)*i+e.letterSpacing+(" "===o?e.wordSpacing:0);d.push({x:f.x,y:f.y,width:l,ascent:a,fontSize:e.fontSize,line:m}),f.x+=l,h[m].end=f.x}},g=(t,e)=>{var n,r,o,i;const a=No(t,e),s=_o(t.x),l=_o(t.y);void 0!==s&&(f.x=s,m=h.length,h.push({start:f.x,end:f.x})),void 0!==l&&(f.y=l),f.x+=null!=(n=_o(t.dx))?n:0,f.y+=null!=(r=_o(t.dy))?r:0;const c=null!=(o=Eo(t[Bt]))?o:Eo(t[Lt]);if(c&&!(null==(i=t.children)?void 0:i.length)&&p(c,a),t.children)for(const e of t.children)g(e,a)},y=zo(t);if(t.children)for(const e of t.children){const t=d.length;if(g(e,y),d.length===t){const t=No(e,y),n=Co(t,l,u),r=(null==n?void 0:n.unitsPerEm)||1e3;d.push({x:f.x,y:f.y,width:0,ascent:(null!=(i=null==n?void 0:n.ascent)?i:.9*r)*(t.fontSize/r),fontSize:t.fontSize,line:m})}}const v=null!=(a=Eo(t[Bt]))?a:Eo(t[Lt]);v&&!(null==(s=t.children)?void 0:s.length)&&p(v,y);const b=Eo(t.textAnchor);if("middle"===b||"end"===b)for(const t of d){const e=h[t.line].end-h[t.line].start;t.x+="middle"===b?-e/2:-e}return d.map(t=>{var e=t,{line:n}=e;return x(e,["line"])})}function Vo(t,e,n,r,o=0){const{x:i,y:a,angle:s}=t.sampleAtDistance(e),l=Math.cos(s),c=Math.sin(s),u=r/2;return[n*l,n*c,-n*c,n*l,i-n*l*u-o*c,a-n*c*u+o*l]}function Wo(t){var e,n,r;return{along:(null!=(e=_o(t.x))?e:0)+(null!=(n=_o(t.dx))?n:0),perp:null!=(r=_o(t.dy))?r:0}}function Go(t,e,n,r,o,i){const{glyphs:a,create:s=bo,warnings:l}=r,c=e?uo(e):null;if(!c)return null==l||l.push("textGlyphs: unparsable along-path geometry"),null;const u=Do(a),{cells:f,width:d}=function(t,e,n,r){const o=[];let i=0;const a=(t,s)=>{var l,c,u;const f=No(t,s),d=null!=(l=Eo(t[Bt]))?l:Eo(t[Lt]);if(d&&!(null==(c=t.children)?void 0:c.length)){const t=Co(f,e,n,r);if(t){const e=f.fontSize/t.unitsPerEm,n=null!=(u=t.ascent)?u:.9*t.unitsPerEm,r=Io(f);for(let a=0;a<d.length;a++){const s=d.charAt(a),l=t.glyphs[s];if(l&&l.d){const t=l.width*e;o.push({glyphD:l.d,widthEm:l.width,scale:e,paint:r,midBase:i+t/2}),i+=t}else if(/\S/.test(s)){const a=l&&l.width>0?l.width:Fo*t.unitsPerEm,s=a*e;o.push({glyphD:Lo(a,n),widthEm:a,scale:e,paint:r,isMissing:!0,midBase:i+s/2}),i+=s}else i+=(l?l.width:0)*e;i+=f.letterSpacing+(" "===s?f.wordSpacing:0)}}}if(t.children)for(const e of t.children)a(e,f)};return a(t,zo(t)),{cells:o,width:i}}(t,a,u,l);if(!f.length)return Qo(t,[],s);const{along:h,perp:m}=Wo(t),p=qo(n),g=qo(o),y=t=>t>0&&d>0?t/d:1,v="clip"===i&&!c.closed;if(p.animated||g.animated){const e=function(t,e){const n=[...t,...e].sort((t,e)=>t-e),r=[];for(const t of n)r.length&&t===r[r.length-1]||r.push(t);return r}(p.times,g.times),n=(t,e)=>h+p.at(e)+y(g.at(e))*t.midBase,r=p.animated?p.loop:g.loop;return Qo(t,function(t,e,n,r,o,i,a,s=0){const l=Math.max(e.totalLength/Ko,.5),c=t=>t>=0&&t<=e.totalLength,u=[];for(const f of t){const t=[f.scale,0,0,f.scale,-f.scale*(f.widthEm/2),0],d=jo(f.glyphD,t),h=(t,n)=>{const{x:r,y:o,angle:i}=e.sampleAtDistance(t),a=Math.cos(i),l=Math.sin(i);return{time:n,value:{translate:[Xo(r-s*l,3),Xo(o+s*a,3)],rotate:Xo(180*i/Math.PI,3)}}},m=[],p=[],g=(t,e)=>{m.push(h(t,e)),a&&p.push({time:e,value:c(t)?1:0})};g(n(f,r[0]),r[0]);for(let t=1;t<r.length;t++){const e=r[t-1],o=r[t],i=n(f,e),a=n(f,o),s=Math.min(Zo,Math.max(1,Math.ceil(Math.abs(a-i)/l)));for(let t=1;t<=s;t++){const r=e+t/s*(o-e);g(n(f,r),r)}}En(m);const y={keyframes:m};void 0!==o&&(y.loop=o);const v={transform:y};if(f.paint.animate&&Object.assign(v,f.paint.animate),a&&p.some(t=>0===t.value)){const t={keyframes:p};void 0!==o&&(t.loop=o),v.opacity=t}u.push(i("path",w(A(A({d:d},Ho(f.paint)),Yo(f.isMissing)),{animate:v}),[]))}return u}(f,c,n,e,r,s,v,m),s)}const b=y(g.at(0)),k=h+p.at(0);return Qo(t,Jo((v?f.filter(t=>{const e=k+t.midBase*b;return e>=0&&e<=c.totalLength}):f).map(t=>({glyphD:t.glyphD,paint:t.paint,isMissing:t.isMissing,m:Vo(c,k+t.midBase*b,t.scale,t.widthEm,m)})),s,l),s)}function qo(t){var e;const n=vr(t);if("animated"===n.kind&&n.keyframes.length>=2){const t=[...n.keyframes].sort((t,e)=>(Number(t.time)||0)-(Number(e.time)||0)),e=t.map(t=>Number(t.time)||0),r=t.map(t=>Number(t.value)||0);return{animated:!0,times:e,loop:n.loop,at(t){if(t<=e[0])return r[0];for(let n=1;n<e.length;n++)if(t<=e[n]){const o=e[n]-e[n-1],i=o>0?(t-e[n-1])/o:1;return r[n-1]+i*(r[n]-r[n-1])}return r[r.length-1]}}}const r="animated"===n.kind?Number(null==(e=n.keyframes[0])?void 0:e.value)||0:"static"===n.kind&&Number(n.value)||0;return{animated:!1,times:[],at:()=>r}}var Ko=48,Zo=64;function Xo(t,e){const n=b(10,e);return Math.round(t*n)/n}function Ho(t){const e={};void 0!==t.fill&&(e.fill=t.fill),void 0!==t.stroke&&(e.stroke=t.stroke),void 0!==t.strokeWidth&&(e.strokeWidth=t.strokeWidth),void 0!==t.opacity&&(e.opacity=t.opacity);for(const n of Oo)void 0!==t[n]&&(e[n]=t[n]);return e}function Yo(t){return t?{[Ut]:Ro}:{}}function Jo(t,e,n){if(!t.length)return null==n||n.push("textGlyphs: nothing to render"),[];const r=new Map;for(const e of t){const t=JSON.stringify([e.paint,!!e.isMissing]),n=jo(e.glyphD,e.m),o=r.get(t);o?o.d+=n:r.set(t,{paint:e.paint,d:n,isMissing:e.isMissing})}const o=[];for(const{paint:t,d:n,isMissing:i}of r.values())o.push(e("path",A(A(A({d:n},Ho(t)),Yo(i)),void 0!==t.animate?{animate:A({},t.animate)}:{}),[]));return o}function Qo(t,e,n){const r={};for(const e of Object.keys(t))"type"!==e&&"children"!==e&&-1===Po.indexOf(e)&&(r[e]=t[e]);if(r.style&&"object"==typeof r.style){const t=A({},r.style);delete t["white-space"],Object.keys(t).length?r.style=t:delete r.style}return n("g",r,e)}function $o(t,e){return e.alongPath?Go(t,e.alongPath.pathD,e.alongPath.startOffset,e,e.alongPath.textLength,e.alongPath.pathOverflow):Bo(t,e)}function ti(t,e){const n=w(A({},t),{type:"g",children:e});return delete n.d,delete n.strokeDasharray,delete n.strokeDashoffset,delete n.effects,n}function ei(t,e,n,r,o,i,a,s){const l=ri(r,n,o),c=oi(n,o),u=ai(i,l),f=ai(a,c),d=ci(a),h={type:"path",d:j(e)};return si(h,"strokeDasharray",f),si(h,"strokeDashoffset",u),si(h,"strokeOpacity",d),[h]}var ni=1;function ri(t,e,n){const[r]=ii(n);return n=>e*(-n-r+t)+ni}function oi(t,e){const[n,r]=ii(e),o=r-n+1;return e=>{const n=Z(e[0],0,1),r=Z(e[1],0,1),i=Math.min(n,r),a=Math.max(n,r),s=[0];let l=ni;for(let e=0;e<o;e++)s.push(l+i*t),s.push((a-i)*t),l=(1-a)*t;return s.push(l+ni),s}}function ii(t){return[Math.floor(Math.min(-t[0],-t[1])),Math.ceil(Math.max(-t[0],-t[1]))]}function ai(t,e){if("absent"!==t.kind)return"static"===t.kind?{kind:"static",value:e(t.value)}:{kind:"animated",keyframes:t.keyframes.map(t=>({time:ie(t),value:e(ae(t)),easing:se(t)})),loop:t.loop}}function si(t,e,n){n&&br(t,e,n)}var li=10;function ci(t){const e=t=>t[0]===t[1];if("absent"===t.kind)return;if("static"===t.kind)return e(t.value)?{kind:"static",value:0}:void 0;const n=t.keyframes;let r=!1,o=!0;for(const t of n)e(ae(t))?r=!0:o=!1;if(!r)return;if(o)return{kind:"static",value:0};const i=[];for(let t=0;t<n.length;t++){const r=n[t],o=t>0?n[t-1]:void 0,a=t<n.length-1?n[t+1]:void 0,s=ie(r),l=e(ae(r)),c=o?l&&e(ae(o)):l,u=a?l&&e(ae(a)):l;c&&!u?(i.push({time:s,value:0}),i.push({time:s+li,value:1})):!c&&u&&(i.push({time:s-li,value:1}),i.push({time:s,value:0}))}return i.length<=1?void 0:{kind:"animated",keyframes:i}}function ui(t,e){const n=n=>{const r=(n-t.time)/(e.time-t.time),o=t.value[0]+(e.value[0]-t.value[0])*r;return t.value[1]+(e.value[1]-t.value[1])*r-o};let r=t.time,o=e.time,i=n(r);if(0===i)return r;const a=n(o);if(0===a)return o;if(i*a>0)return null;for(let t=0;t<100;t++){const t=(r+o)/2,e=n(t);if(0===e||Math.abs(o-r)<1e-4)return t;i*e<0?o=t:(r=t,i=e)}return(r+o)/2}function fi(t,e){if(e<=t[0].time)return t[0].value;if(e>=t[t.length-1].time)return t[t.length-1].value;for(let n=1;n<t.length;n++)if(e<=t[n].time){const r=t[n-1],o=t[n],i=(e-r.time)/(o.time-r.time);return[r.value[0]+(o.value[0]-r.value[0])*i,r.value[1]+(o.value[1]-r.value[1])*i]}return t[t.length-1].value}function di(t){const e=t.v;if(!e||e.length<2)return 0;let n=0;for(let r=0;r<e.length-1;r++)n+=hi(t,r,r+1);return t.c&&e.length>1&&(n+=hi(t,e.length-1,0)),n}function hi(t,e,n){var r,o,i,a;const s=t.v,l=s[e],c=s[n],u=Q(l,null!=(o=null==(r=t.o)?void 0:r[e])?o:l,null!=(a=null==(i=t.i)?void 0:i[n])?a:c,c);return u.ds[u.ds.length-1]}var mi=.5522847498307936;function pi(t){var e,n;const r={defs:[],warnings:[],errors:[],idMap:new Map,nextId:0,contentRefInnerIds:new Map,maskAncestorChains:new Map,engine:Tt(null==(e=Jt(t))?void 0:e.engine),glyphs:null==(n=$t(t))?void 0:n.fonts},o=Mr(t);Or(o,r.idMap),_r(o,r,()=>Sr(r,"inner")),function(t,e){const n=new Set,r=t=>{var o,i;const a=Pr(null==(i=null==(o=t.effects)?void 0:o.maskedBy)?void 0:i.source);if("string"==typeof a){n.add(t);const r=e.idMap.get(a);r&&n.add(r)}if(Array.isArray(t.children))for(const e of t.children)r(e)};if(r(t),0===n.size)return;const o=(t,r)=>{if(n.has(t)&&e.maskAncestorChains.set(t,r),Array.isArray(t.children)){const n=Kr(t,e),i=n?[...r,n]:r;for(const e of t.children)o(e,i)}};o(t,[])}(o,r);const i=function(t,e){return function(t,e){e.idMap.clear(),Or(t,e.idMap);const n=[],r=t=>{var e;eo(t)&&n.push(t),null==(e=t.children)||e.forEach(r)};r(t);const o=new Map;for(const t of n){let n=0;const r=new Set,i=o=>{var a;if(o){if(o!==t&&eo(o)&&n++,"use"===o.type&&o.href){const t=Pr(o.href);t&&!r.has(t)&&(r.add(t),i(e.idMap.get(t)))}null==(a=o.children)||a.forEach(i)}},a=Pr(t.href);a&&(r.add(a),i(e.idMap.get(a))),o.set(t,n)}n.sort((t,e)=>{var n,r;return(null!=(n=o.get(e))?n:0)-(null!=(r=o.get(t))?r:0)});for(const t of n){const n=eo(t);if(!n)continue;const r=n.timeCrop;no(t),ro(t,Jr(n),e),r&&$r(t,r,e)}}(t,e),t}(gi(o,r),r);return function(t,e){e.length&&(t.children||(t.children=[])).unshift({type:"defs",children:e})}(i,r.defs),{root:i,defs:r.defs,warnings:r.warnings,errors:r.errors}}function gi(t,e){t.children&&(t.children=t.children.map(t=>gi(t,e)));const n=t.effects,r="string"==typeof t.id?t.id:void 0,o=r?e.contentRefInnerIds.get(r):void 0;if(!n&&!o)return t;const{transformBy:i,repeater:a,maskedBy:s,clipPath:l,strokeTrim:c,clone:u,fillGradient:f,strokeGradient:d,textPath:h,text:m}=null!=n?n:{};n&&delete t.effects;let p=t,g=!1;if(null==m?void 0:m.useGlyphs)if(h){const t="string"==typeof h.pathData?h.pathData:void 0,n=function(t,e,n,r,o,i){return e.glyphs?Go(t,n,r,{glyphs:e.glyphs,warnings:e.warnings},o,i):(e.warnings.push("textGlyphs: no definitions.fonts"),null)}(p,e,t,h.startOffset,h.textLength,h.pathOverflow);n&&(p=n,g=!0)}else p=function(t,e,n){return(null==e?void 0:e.useGlyphs)?n.glyphs?Bo(t,{glyphs:n.glyphs,warnings:n.warnings}):(n.warnings.push("textGlyphs: no definitions.fonts — left as native <text>"),t):t}(p,m,e),g=!0;return g||(p=function(t,e,n){var r;if(!e||"string"!=typeof e.pathData||!e.pathData)return t;const o=Sr(n,"tpath"),{d:i,startShift:a}=yo(e.pathData,{pathOverflow:e.pathOverflow,startOffset:e.startOffset,textLength:e.textLength,advance:mo(t)});n.defs.push({type:"path",id:o,d:i});const s={type:"textPath",href:"#"+o,children:null!=(r=t.children)?r:[]};return void 0!==e.lengthAdjust&&(s.lengthAdjust=e.lengthAdjust),void 0!==e.method&&(s.method=e.method),void 0!==e.spacing&&(s.spacing=e.spacing),vo(s,"startOffset",go(e.startOffset,a)),vo(s,"textLength",e.textLength),t.children=[s],t}(p,h,e)),p=function(t,e,n){return Nr(t,e,n,"fill")}(p,f,e),p=function(t,e,n){return Nr(t,e,n,"stroke")}(p,d,e),p=function(t,e){if(!e)return t;const n=e.subPaths===Rt.combined,r=[],o=t=>{if(Array.isArray(t.children)&&t.children.length>0){for(const e of t.children)o(e);return}const e="string"==typeof t.d?t.d:function(t){var e,n,r,o,i,a,s,l,c,u;if("rect"===t.type){const i=Number(null!=(e=t.x)?e:0),a=Number(null!=(n=t.y)?n:0),s=Number(null!=(r=t.width)?r:0),l=Number(null!=(o=t.height)?o:0);return"M"+(i+s)+","+a+"L"+(i+s)+","+(a+l)+"L"+i+","+(a+l)+"L"+i+","+a+"L"+(i+s)+","+a+"z"}if("ellipse"===t.type||"circle"===t.type){const e=Number(null!=(i=t.cx)?i:0),n=Number(null!=(a=t.cy)?a:0),r="circle"===t.type?Number(null!=(s=t.r)?s:0):Number(null!=(l=t.rx)?l:0),o="circle"===t.type?Number(null!=(c=t.r)?c:0):Number(null!=(u=t.ry)?u:0);if(!(r>0&&o>0))return;const f=r*mi,d=o*mi,h=(t,e,n,r,o,i)=>"C"+t+","+e+" "+n+","+r+" "+o+","+i;return"M"+(e+r)+","+n+h(e+r,n+d,e+f,n+o,e,n+o)+h(e-f,n+o,e-r,n+d,e-r,n)+h(e-r,n-d,e-f,n-o,e,n-o)+h(e+f,n-o,e+r,n-d,e+r,n)+"z"}}(t);if(void 0===e)return;const n=Kn(e);if(!n.length)return;const i={leaf:t,subpaths:[]};for(const t of n){const e=di(t);i.subpaths.push({subpath:t,lengthPx:e,startOffsetPx:0})}r.push(i)};if(o(t),!r.length)return t;let i=0;const a=n?[...r].reverse():r;for(const t of a)for(const e of t.subpaths)n||(i=0),e.startOffsetPx=i,i+=e.lengthPx;const s=i;if(n&&s<.001)return t;const l=vr(e.offset),c="absent"===l.kind?{kind:"static",value:0}:l,u=function(t){const e=vr(t);if("animated"!==e.kind)return e;const n=e.keyframes.map(t=>({time:ie(t),value:ae(t),easing:se(t)}));if(!n.some(t=>t.value[0]>t.value[1]))return{kind:"animated",keyframes:n.map(t=>({time:t.time,value:t.value,easing:t.easing}))};const r=[];for(let t=1;t<n.length;t++){const e=n[t-1],o=n[t];if((e.value[1]-e.value[0])*(o.value[1]-o.value[0])<0){const t=ui(e,o);null!==t&&t>e.time&&t<o.time&&r.push(Math.round(t))}}const o=Array.from(new Set(r)).sort((t,e)=>t-e),i=[];let a=0;for(const t of n){for(;a<o.length&&o[a]<t.time;){const t=o[a++],e=fi(n,t),r=(e[0]+e[1])/2;i.push({time:t,value:[r,r]})}const e=t.value[0]>t.value[1]?[t.value[1],t.value[0]]:t.value;i.push({time:t.time,value:e,easing:t.easing})}for(;a<o.length;){const t=o[a++],e=fi(n,t),r=(e[0]+e[1])/2;i.push({time:t,value:[r,r]})}return{kind:"animated",keyframes:i}}(e.range),f="absent"===u.kind?{kind:"static",value:[0,1]}:u,d=function(t){if("absent"===t.kind)return[];if("static"===t.kind)return[t.value];const e=[];for(const n of t.keyframes){const t=ae(n);"number"==typeof t&&e.push(t)}return e}(c),h=[d.length?Math.min(...d):0,d.length?Math.max(...d):0];if(1===r.length&&r[0].leaf===t&&1===r[0].subpaths.length){const e=r[0],o=e.subpaths[0],i=n?s:o.lengthPx;if(i<.001)return t;const a=n?o.startOffsetPx/i:0;return function(t,e,n,r,o,i){const a=ri(n,e,r),s=oi(e,r),l=A({},t);return delete l.effects,si(l,"strokeDasharray",ai(i,s)),si(l,"strokeDashoffset",ai(o,a)),si(l,"strokeOpacity",ci(i)),l}(e.leaf,i,a,h,c,f)}const m=new Map;for(const t of r){const e=[];for(const r of t.subpaths){const o=n?s:r.lengthPx;if(o<.001)continue;const i=n?r.startOffsetPx/o:0;e.push(...ei(t.leaf,r.subpath,o,i,h,c,f))}m.set(t.leaf,ti(t.leaf,e))}const p=t=>m.get(t)||(Array.isArray(t.children)&&t.children.length>0?w(A({},t),{children:t.children.map(p)}):t);return p(t)}(p,c),p=function(t,e,n){var r,o;if(!e)return t;const i=null!=(r=e.copies)?r:1;if(i<1)return n.errors.push("repeater.copies invalid: "+e.copies),t;const a=t.transform,s=null==(o=t.animate)?void 0:o.transform,l=Mr(t);delete l.transform,l.animate&&(delete l.animate.transform,0===Object.keys(l.animate).length&&delete l.animate),delete l.id;const c=[l];for(let t=1;t<i;t++){const n=Mr(l),r=Xr(e,t),o=r?wr(n,r):n;c.push(o)}const u={type:"g",children:c};return t.id&&(u.id=t.id),void 0!==a&&(u.transform=a),void 0!==s&&(u.animate={transform:s}),u}(p,a,e),p=function(t,e,n,r){if(!e)return t;const o=Pr(e.source);if(!o)return r.errors.push("maskedBy.source missing — cannot build mask"),t;const i=Sr(r,"mask");let a={type:"use",href:"#"+o};if(n)a=Rr(a,n,r);else if(Vr(t))a=function(t,e){var n;const r=e.animate&&"object"==typeof e.animate&&!Array.isArray(e.animate)?e.animate:void 0,o=null==r?void 0:r.transform,i=o&&"object"==typeof o&&Array.isArray(o.keyframes)?o.keyframes:void 0;if(!i||!i.length)return t;const a=[],s=[],l=[];for(const t of i){const e=(null!=(n=t.value)?n:t.v)||{},r=Ar(t,void 0);if(Array.isArray(e.translate)&&a.push(w(A(A({},r),Ur(t)),{value:{translate:[-e.translate[0],-e.translate[1]]}})),"number"==typeof e.rotate){const t={rotate:-e.rotate};Array.isArray(e.origin)&&(t.origin=[e.origin[0],e.origin[1]]),s.push(w(A({},r),{value:t}))}if(Array.isArray(e.scale)){const t={scale:[1/e.scale[0],1/e.scale[1]]};Array.isArray(e.origin)&&(t.origin=[e.origin[0],e.origin[1]]),l.push(w(A({},r),{value:t}))}}const c=null==o?void 0:o.loop,u=t=>{const e={keyframes:t};return void 0!==c&&(e.loop=c),e};let f=t;return a.length&&(f={type:"g",animate:{transform:u(a)},children:[f]}),s.length&&(f={type:"g",animate:{transform:u(s)},children:[f]}),l.length&&(f={type:"g",animate:{transform:u(l)},children:[f]}),f}(a,t);else{const e=function(t){if("string"==typeof t.transform){const e=function(t){var e,n,r,o,i,a,s,l,c,u,f,d,h;const m=/([a-zA-Z]+)\s*\(([^)]*)\)/g;let p;const g=[];for(;null!==(p=m.exec(t));){const t=p[2].split(/[\s,]+/).filter(t=>t.length>0).map(Number);g.push({name:p[1],args:t})}if(!g.length)return;const y=g[g.length-1];if("translate"===y.name)for(let t=g.length-2;t>=0;t--){const u=g[t];if("translate"!==u.name)continue;const f=null!=(e=u.args[0])?e:0,d=null!=(n=u.args[1])?n:0,h=null!=(r=y.args[0])?r:0,m=null!=(o=y.args[1])?o:0;if(h!==-f||m!==-d)continue;const p={};p.origin=[f,d];for(let e=0;e<t;e++)if("translate"===g[e].name){const t=null!=(i=g[e].args[0])?i:0,n=null!=(a=g[e].args[1])?a:0;p.translate=p.translate?[p.translate[0]+t,p.translate[1]+n]:[t,n]}for(let e=t+1;e<g.length-1;e++){const t=g[e];if("rotate"===t.name)p.rotate=(null!=(s=p.rotate)?s:0)+(null!=(l=t.args[0])?l:0);else if("scale"===t.name){const e=null!=(c=t.args[0])?c:1,n=t.args.length>1?t.args[1]:e;p.scale=p.scale?[p.scale[0]*e,p.scale[1]*n]:[e,n]}}return p}let v,b,k;for(const t of g)if("translate"===t.name){const e=null!=(u=t.args[0])?u:0,n=null!=(f=t.args[1])?f:0;v=v?[v[0]+e,v[1]+n]:[e,n]}else if("rotate"===t.name)b=(null!=b?b:0)+(null!=(d=t.args[0])?d:0);else if("scale"===t.name){const e=null!=(h=t.args[0])?h:1,n=t.args.length>1?t.args[1]:e;k=k?[k[0]*e,k[1]*n]:[e,n]}const A={};return v&&(A.translate=v),void 0!==b&&(A.rotate=b),k&&(A.scale=k),Object.keys(A).length?A:void 0}(t.transform);if(!e)return;const n={};return e.translate&&(n.translate=e.translate),void 0!==e.rotate&&(n.rotate=e.rotate),e.scale&&(n.scale={value:e.scale}),e.origin&&(n.origin=e.origin),Object.keys(n).length?n:void 0}if(t.transform&&"object"==typeof t.transform&&!t.transform.keyframes){const e=t.transform.value,n=e&&"object"==typeof e?e:t.transform;if(n&&"object"==typeof n){const t={};return Array.isArray(n.translate)&&(t.translate=n.translate),"number"==typeof n.rotate&&(t.rotate=n.rotate),"number"==typeof n.skew&&(t.skew=n.skew),Array.isArray(n.scale)&&(t.scale={value:n.scale}),Array.isArray(n.origin)&&(t.origin=n.origin),Object.keys(t).length?t:void 0}}}(t);e&&(a=Rr(a,e,r))}const s=void 0===n&&!function(t){return"string"==typeof t.transform||!(!t.transform||"object"!=typeof t.transform)||Vr(t)}(t);a=function(t,e,n,r,o){const i=r.idMap.get(n),a=r.maskAncestorChains.get(e)||[],s=o?Kr(e,r):void 0,l=s?[...a,s]:a,c=i&&r.maskAncestorChains.get(i)||[];if(!l.length&&!c.length)return t;const u=new Set;for(const t of l)if(t.translateKeyframes)for(const e of t.translateKeyframes)u.add(e.time);for(const t of c)if(t.translateKeyframes)for(const e of t.translateKeyframes)u.add(e.time);if(!(u.size>0)){const e=Wr(l),n=Wr(c),r=n[0]-e[0],o=n[1]-e[1];return 0===r&&0===o?t:{type:"g",transform:"translate("+r+","+o+")",children:[t]}}return{type:"g",animate:{transform:{keyframes:Array.from(u).sort((t,e)=>t-e).map(t=>{const e=Gr(l,t),n=Gr(c,t);return{time:t,value:{translate:[n[0]-e[0],n[1]-e[1]]}}})}},children:[t]}}(a,t,o,r,s);const l={type:"mask",id:i,children:[a]};return e.maskType&&(l.maskType=e.maskType),e.maskUnits&&(l.maskUnits=e.maskUnits),e.maskContentUnits&&(l.maskContentUnits=e.maskContentUnits),void 0!==e.x&&(l.x=String(e.x)),void 0!==e.y&&(l.y=String(e.y)),void 0!==e.width&&(l.width=String(e.width)),void 0!==e.height&&(l.height=String(e.height)),r.defs.push(l),t.mask="url(#"+i+")",t}(p,s,i,e),p=function(t,e,n){if(!(null==e?void 0:e.d))return t;const r=Sr(n,"clip"),o={type:"path"},i=vr(e.d);return"absent"!==i.kind&&("static"===i.kind?o.d=Fr(i.value):(br(o,"d",i),void 0!==o.d&&(o.d=Fr(o.d)))),n.defs.push({type:"clipPath",id:r,children:[o]}),t.clipPath="url(#"+r+")",t}(p,l,e),o?(Zr(p,u,e),p=function(t,e,n,r){const o=function(t,e){var n,r,o;const i={};let a=!1;const s=null==(n=t.animate)?void 0:n.transform;if(s&&"object"==typeof s&&Array.isArray(s.keyframes)){const e=s.keyframes;if(e.some(t=>t.value&&t.value.translate)){const n=Tr(s),r={keyframes:e.map(t=>{const e=t.value||{},r={};void 0!==e.translate&&(r.translate=e.translate),n&&void 0!==e.origin&&(r.origin=e.origin);const o={value:r};return void 0!==t.time&&(o.time=t.time),void 0!==t.easing&&(o.easing=t.easing),void 0!==t.tangentOut&&(o.tangentOut=t.tangentOut),void 0!==t.tangentIn&&(o.tangentIn=t.tangentIn),o})};s.autoOrient&&(r.autoOrient=!0);const o=s.loop;void 0!==o&&(r.loop=o),i.animate={transform:r};const l=e.some(t=>{const e=t.value||{};return void 0!==e.rotate||void 0!==e.scale}),c=e.map(t=>{const e=t.value||{},r={};void 0!==e.rotate&&(r.rotate=e.rotate),void 0!==e.scale&&(r.scale=e.scale),void 0===e.origin||n&&!l||(r.origin=e.origin);const o={value:r};return void 0!==t.time&&(o.time=t.time),void 0!==t.easing&&(o.easing=t.easing),o});if(c.every(t=>0===Object.keys(t.value).length))delete t.animate.transform,t.animate&&0===Object.keys(t.animate).length&&delete t.animate;else{const e={keyframes:c};void 0!==o&&(e.loop=o),t.animate.transform=e}a=!0}}const l=void 0!==(null==e?void 0:e.translate),c=a||l,u=a&&Tr((null==(r=t.animate)?void 0:r.transform)||void 0)||a&&Tr((null==(o=i.animate)?void 0:o.transform)||void 0);if("string"==typeof t.transform){const e=function(t){const e=[],n=/(translate|rotate|scale|matrix|skewX|skewY)\(([^)]*)\)/g;let r;for(;r=n.exec(t);)e.push({name:r[1],full:r[0]});if(!e.length)return{rest:t||void 0};if(e.every(t=>"translate"===t.name))return{translate:e.map(t=>t.full).join("")};const o=e[0],i=e[e.length-1];if("translate"===i.name&&"translate"===o.name){const n=Er(i.full),r=Er(o.full),a=-n[0],s=-n[1],l=r[0]-a,c=r[1]-s;return 0===l&&0===c?{rest:t}:{translate:"translate("+l+","+c+")",rest:"translate("+a+","+s+")"+e.slice(1).map(t=>t.full).join("")}}if("translate"===i.name)return{rest:t};const a=[];let s=0;for(;s<e.length&&"translate"===e[s].name;)a.push(e[s].full),s++;if(!a.length)return{rest:t};const l=e.slice(s).map(t=>t.full).join("");return{translate:a.join(""),rest:l||void 0}}(t.transform);c?void 0!==e.translate?e.rest?t.transform=e.rest:delete t.transform:(function(t){const e=/(translate|rotate|scale|matrix|skewX|skewY)\(([^)]*)\)/g,n=[];let r;for(;r=e.exec(t);)n.push({name:r[1],full:r[0]});if(1!==n.length)return!1;if("translate"===n[0].name)return!0;if("matrix"!==n[0].name)return!1;const o=/matrix\(([^)]*)\)/.exec(n[0].full);if(!o)return!1;const i=o[1].split(/[\s,]+/).filter(Boolean).map(Number);return i.length>=4&&1===i[0]&&0===i[1]&&0===i[2]&&1===i[3]}(t.transform)||u&&function(t){const e=/(translate|rotate|scale|matrix|skewX|skewY)\(([^)]*)\)/g;let n,r=0,o=!1;for(;n=e.exec(t);)r++,"matrix"===n[1]&&(o=!0);return 1===r&&o}(t.transform))&&delete t.transform:e.translate&&(i.transform=e.translate,e.rest?t.transform=e.rest:delete t.transform)}else if(t.transform&&"object"==typeof t.transform&&!Array.isArray(t.transform)&&!t.transform.keyframes){const e=t.transform.value,n=!(!e||"object"!=typeof e),r=n?e:t.transform,o=t=>n?{value:t}:t;if(Array.isArray(r.translate)){const e=A({},r);delete e.translate;const n=Object.keys(e).length>0;c||(i.transform=o({translate:r.translate})),n?t.transform=o(e):delete t.transform}}return i}(t,e);"string"==typeof t.id&&delete t.id;const{outer:i,inner:a}=function(t){if(!t)return{};const e=Tr(t.translate),n=void 0!==t.rotate||void 0!==t.scale,r={},o={};return void 0!==t.translate&&(r.translate=t.translate),e&&void 0!==t.origin&&(r.origin=t.origin),void 0!==t.rotate&&(o.rotate=t.rotate),void 0!==t.scale&&(o.scale=t.scale),void 0!==t.skew&&(o.skew=t.skew),void 0===t.origin||e&&!n||(o.origin=t.origin),{outer:Object.keys(r).length?r:void 0,inner:Object.keys(o).length?o:void 0}}(e);let s=t;s=wr(s,a);let l={type:"g",id:n,children:[{type:"g",id:r,children:[s]}]};return void 0!==o.transform&&(l.transform=o.transform),void 0!==o.animate&&(l.animate=o.animate),i&&(delete l.id,l=wr(l,i),l.id=n),l}(p,i,r,o)):p=function(t,e,n,r){return Zr(t,e,r),wr(t,n)}(p,u,i,e),(null==u?void 0:u.retime)&&(t.effects={clone:{retime:u.retime}}),r&&e.idMap.set(r,p),p}function yi(t,e,n,r,o){const i=1-o,a=i*i*i,s=3*i*i*o,l=3*i*o*o,c=o*o*o;return[a*t[0]+s*e[0]+l*n[0]+c*r[0],a*t[1]+s*e[1]+l*n[1]+c*r[1]]}function vi(t,e,n,r,o=64){let i=0,a=t;for(let s=1;s<=o;s++){const l=yi(t,e,n,r,s/o);i+=Math.hypot(l[0]-a[0],l[1]-a[1]),a=l}return i}var bi=t=>{const e=Math.round(1e4*t)/1e4;return Object.is(e,-0)?"0":String(e)};function ki(t,e,n){var r,o;let i=pi(t).root;return i=function(t){const e=t=>{var n;let r=t;const o=t.animate,i=null==o?void 0:o.transform;if(i){const e=function(t){var e,n,r;if("offsetPath"!==t.alongPathMode)return;const o=t.keyframes;if(!o||o.length<2)return;const i=ae(o[0]),a=(null==i?void 0:i.origin)&&i.origin.length>=2?[i.origin[0],i.origin[1]]:[0,0],s=[];for(const t of o){const n=ae(t),r=null==n?void 0:n.translate;if(!r||r.length<2)return;if(Object.keys(n).some(t=>"translate"!==t&&"origin"!==t))return;const o=null!=(e=null==n?void 0:n.origin)?e:[0,0];if(o[0]!==a[0]||o[1]!==a[1])return;s.push([r[0]+a[0],r[1]+a[1]])}if(!o.some(t=>le(t)||ce(t)))return;let l="M"+bi(s[0][0])+","+bi(s[0][1]);const c=[];for(let t=0;t<s.length-1;t++){const e=s[t],i=s[t+1],a=null!=(n=ce(o[t]))?n:[0,0],u=null!=(r=le(o[t+1]))?r:[0,0],f=[e[0]+a[0],e[1]+a[1]],d=[i[0]+u[0],i[1]+u[1]];l+="C"+bi(f[0])+","+bi(f[1])+","+bi(d[0])+","+bi(d[1])+","+bi(i[0])+","+bi(i[1]),c.push(vi(e,f,d,i))}const u=c.reduce((t,e)=>t+e,0);if(!(u>0))return;const f=[];let d=0;for(let t=0;t<o.length;t++){t>0&&(d+=c[t-1]);const e={t:ie(o[t]),v:d/u},n=se(o[t]);void 0!==n&&(e.e=n),f.push(e)}return{pathStr:l,distanceKfs:f,autoOrient:!!t.autoOrient,anchor:a}}(i);if(e){const n=A({},o);delete n[Vt];const a={keyframes:e.distanceKfs};void 0!==i.loop&&(a.loop=i.loop),n[Wt]=a;const s=t.transform;let l=s;if(s&&"object"==typeof s){const t=A({},s);delete t[qt.translate],delete t[qt.origin],l=Object.keys(t).length?t:void 0}r=w(A({},t),{animate:n,style:w(A({},t.style),{offsetPath:"path('"+e.pathStr+"')",offsetAnchor:bi(e.anchor[0])+"px "+bi(e.anchor[1])+"px",offsetRotate:e.autoOrient?"auto":"0deg",offsetDistance:"0%"})}),void 0!==l?r.transform=l:delete r.transform}}if(null==(n=r.children)?void 0:n.length){const t=r.children.map(e);t.some((t,e)=>t!==r.children[e])&&(r=w(A({},r),{children:t}))}return r};return e(t)}(i),i=nr(i,null!=(o=null==(r=Jt(i))?void 0:r.duration)?o:V),e===_t.native&&(i=Vn(i,null==n?void 0:n.motionPath),i=dr(i),i=function(t){const e=(t,n)=>{var r;n(t),null==(r=t.children)||r.forEach(t=>e(t,n))};let n=!0;for(;n;){n=!1;const r=new Set;e(t,t=>{var e;"use"===t.type&&"string"==typeof t.href&&r.add((e=t.href).startsWith("#")?e.slice(1):e)}),e(t,t=>{if(!t.children)return;let e=t.children;"defs"===t.type&&(e=e.filter(t=>!(("g"===t.type||"symbol"===t.type)&&"string"==typeof t.id&&!r.has(t.id)))),e=e.filter(t=>!("defs"===t.type&&(!t.children||0===t.children.length))),e.length!==t.children.length&&(t.children=e,n=!0)})}return t}(i)),i}function Ai(t){const e=globalThis;"function"!=typeof e.cancelAnimationFrame?e.clearTimeout(t):e.cancelAnimationFrame(t)}function wi(t,e,n){var r;const o=Jt(t)||{},i=ir(t,_t.js),a=o.iterations;let s=1;"number"==typeof a&&(s=a||1),"infinite"===a&&(s=1/0),s<1&&(s=1);const l=+(o.duration||V),c=l&&s?l*(s===1/0?1/0:s):l?(null!=s?s:1)*l:0,u=o.direction||"normal",f=null!=(r=o.fill)?r:"forwards",d="forwards"===f||"both"===f,h="backwards"===f||"both"===f;let m=null,p=!1,g=-(o.delay||0),y=0,v=1,b=!1;const k=o.frameRate,A=k&&k>0?1e3/k:0;let w=0;const x=()=>{const t=y?(Date.now()-y)*v:0;return g+t},j=()=>{let t=x();return Number.isFinite(c)&&t>c&&(t=c),t<0&&(t=0),t};function S(t){let n=function(){const e=l>0?l:1;let n=0,r=0;l>0?(t=Z(t,0,s*e),r=Math.max(0,Math.ceil(t/e)-1),r=Math.min(r,s-1),n=Z((t-r*e)/e,0,1)):n=t;const o=u||"normal";let i=n;return"reverse"===o?i=1-n:"alternate"===o?r%2==1&&(i=1-n):"alternate-reverse"===o&&r%2==0&&(i=1-n),i}();for(const t of i||[]){const r=t.animate;if(!r||"object"!=typeof r||Array.isArray(r)){console.warn("Empty or unresolved binding",t);continue}const o=sr(r,n*l);for(const[n,r]of Object.entries(o))e.setAttribute(t.id,n,r)}}o.delay&&(o.delay<0?S(j()):h&&S(0));const P=()=>!!p&&!!e.isConnected()&&(v<0?x()>0:!(Number.isFinite(c)&&j()>=c)),O=t=>{null!==m&&(Ai(m),m=null),(t||P())&&(m=function(t){const e=globalThis;return"function"==typeof e.requestAnimationFrame?e.requestAnimationFrame(t):e.setTimeout(t,16)}(()=>{m=null,(()=>{var t,r;if(!e.isConnected())return void M();const o=j(),i=x();if(i<0&&v>0)h&&S(0);else{if(v<0&&i<=0)return M(),S(0),void(b||(b=!0,null==(t=null==n?void 0:n.onFinish)||t.call(n)));if(v>0&&c&&Number.isFinite(c)&&o>=c)return M(),S(d?c:0),void(b||(b=!0,null==(r=null==n?void 0:n.onFinish)||r.call(n)));if(A>0){const t=Date.now();if(w&&t-w<A)return;w=t}S(o)}})(),O()}))},M=()=>{if(!p)return;let t=x();Number.isFinite(c)&&t>c&&(t=c),g=t,y=0,p=!1,null!==m&&(Ai(m),m=null),t>=0?S(t):h&&S(0)},_={isReady:()=>!0,getRootElement:()=>null,isPlaying:()=>P(),play:()=>{var t;(()=>{if(!p){if(v>=0)Number.isFinite(c)&&g>=c&&(g=0);else if(g<=0){if(!Number.isFinite(c))return void console.warn("play: cannot start reverse playback of an infinite animation from time 0");g=c}b=!1,p=!0,y=Date.now(),O(!0)}})(),null==(t=null==n?void 0:n.onPlay)||t.call(n)},pause:()=>{var t;M(),null==(t=null==n?void 0:n.onPause)||t.call(n)},cancel:()=>{var t;M(),g=0,y=0,p=!1,b=!1,S(g),null==(t=null==n?void 0:n.onCancel)||t.call(n)},finish:()=>{((t=!0)=>{var e;g=Number.isFinite(c)?c:j(),y=0,p=!1,null!==m&&(Ai(m),m=null),S(d?g:0),t&&!b&&(b=!0,null==(e=null==n?void 0:n.onFinish)||e.call(n))})(!0)},setPlaybackRate:t=>{if(!isFinite(t)||0===t)return void console.warn("setPlaybackRate: rate must be finite and non-zero");let e=x();Number.isFinite(c)&&e>c&&(e=c),t<0!=v<0&&(b=!1),v=t,g=e,p&&(y=Date.now())},getCurrentTime:()=>j(),setCurrentTime:t=>{t<0&&(t=0),Number.isFinite(c)&&t>c&&(t=c),g=t,p&&(y=Date.now()),(!Number.isFinite(c)||t<c)&&(b=!1),S(j())},destroy:()=>{var t;_.cancel(),null==(t=null==n?void 0:n.onRemove)||t.call(n)}};return _}var xi=[1,0,0,1,0,0];function ji(t,e){return[t[0]*e[0]+t[2]*e[1],t[1]*e[0]+t[3]*e[1],t[0]*e[2]+t[2]*e[3],t[1]*e[2]+t[3]*e[3],t[0]*e[4]+t[2]*e[5]+t[4],t[1]*e[4]+t[3]*e[5]+t[5]]}var Si=(t,e)=>[1,0,0,1,t,e],Pi=(t,e)=>[t,0,0,e,0,0];function Oi(t){const e=t*Math.PI/180;return[Math.cos(e),Math.sin(e),-Math.sin(e),Math.cos(e),0,0]}var Mi=t=>[1,0,Math.tan(t*Math.PI/180),1,0,0],_i=t=>[1,Math.tan(t*Math.PI/180),0,1,0,0];function Ei(t){let e=xi;t.translate&&(e=ji(e,Si(t.translate[0],t.translate[1])));const n=t.origin&&(void 0!==t.rotate||t.scale);return n&&(e=ji(e,Si(t.origin[0],t.origin[1]))),void 0!==t.rotate&&(e=ji(e,Oi(t.rotate))),t.scale&&(e=ji(e,Pi(t.scale[0],t.scale[1]))),n&&(e=ji(e,Si(-t.origin[0],-t.origin[1]))),e}function Ti(t,e,n){return t+(e-t)*n}function Ni(t,e){return null==t?xi:"string"==typeof t?function(t){let e=xi;const n=/(translate|rotate|scale|matrix|skewX|skewY)\(([^)]*)\)/g;let r;for(;r=n.exec(t);){const t=r[1],n=r[2].split(/[\s,]+/).filter(Boolean).map(Number);"translate"===t?e=ji(e,Si(n[0]||0,n[1]||0)):"scale"===t?e=ji(e,Pi(n[0],n.length>1?n[1]:n[0])):"rotate"===t?e=ji(e,Oi(n[0])):"skewX"===t?e=ji(e,Mi(n[0])):"skewY"===t?e=ji(e,_i(n[0])):"matrix"===t&&(e=ji(e,[n[0],n[1],n[2],n[3],n[4],n[5]]))}return e}(t):t.keyframes?Ei(function(t,e){var n,r,o,i,a,s,l;if(!t.length)return{};if(e<=(null!=(n=t[0].time)?n:0))return t[0].value||{};if(e>=(null!=(r=t[t.length-1].time)?r:0))return t[t.length-1].value||{};let c=0;for(;c<t.length-1&&(null!=(o=t[c+1].time)?o:0)<e;)c++;const u=t[c],f=t[c+1],d=(e-(null!=(i=u.time)?i:0))/((null!=(a=f.time)?a:0)-(null!=(s=u.time)?s:0)||1),h=u.value||{},m=f.value||{},p={};return h.translate&&m.translate?p.translate=[Ti(h.translate[0],m.translate[0],d),Ti(h.translate[1],m.translate[1],d)]:p.translate=h.translate||m.translate,void 0!==h.rotate&&void 0!==m.rotate?p.rotate=Ti(h.rotate,m.rotate,d):p.rotate=null!=(l=h.rotate)?l:m.rotate,h.scale&&m.scale?p.scale=[Ti(h.scale[0],m.scale[0],d),Ti(h.scale[1],m.scale[1],d)]:p.scale=h.scale||m.scale,p.origin=h.origin||m.origin,p}(t.keyframes,e)):t.value?Ei(t.value):"object"!=typeof t||Array.isArray(t)?xi:Ei(t)}var zi=new Set(["svg","g","symbol"]),Ii=new Set(["defs","mask","clipPath","title"]);function Ci(t,e){var n;"string"==typeof t.id&&e.set(t.id,t),null==(n=t.children)||n.forEach(t=>Ci(t,e))}function Di(t){return null==t?0:Number(t)}function Fi(t){return Math.round(100*t)/100+0}function Ri(t,e,n,r,o){var i;const a=t.type||"";if(Ii.has(a))return;const s=ji(e,function(t,e){return t.animate&&t.animate.transform?Ni(t.animate.transform,e):void 0!==t.transform?Ni(t.transform,e):xi}(t,n));if("use"===a){const e="string"==typeof t.href?t.href.replace(/^#/,""):"",i=r.get(e),a=ji(s,Si(Di(t.x),Di(t.y)));return void(i?Ri(i,a,n,r,o):o.push("UNRESOLVED_USE:#"+e))}zi.has(a)?null==(i=t.children)||i.forEach(t=>Ri(t,s,n,r,o)):o.push(function(t,e,n){var r,o,i,a,s;const l=null!=(r=t.fill)?r:"",c=null!=(o=t.stroke)?o:"",u=null!=(a=null!=(i=t["stroke-width"])?i:t.strokeWidth)?a:"",f=Fi(function(t,e,n,r){var o,i,a,s,l,c;if(t&&t.keyframes&&t.keyframes.length){const e=t.keyframes;if(r<=(null!=(o=e[0].time)?o:0))return e[0].value;if(r>=(null!=(i=e[e.length-1].time)?i:0))return e[e.length-1].value;let n=0;for(;n<e.length-1&&(null!=(a=e[n+1].time)?a:0)<r;)n++;const u=e[n],f=e[n+1],d=(r-(null!=(s=u.time)?s:0))/((null!=(l=f.time)?l:0)-(null!=(c=u.time)?c:0)||1);return Ti(u.value,f.value,d)}return void 0!==e?Number(e):1}(null==(s=t.animate)?void 0:s.opacity,t.opacity,0,n)),d=t.mask?1:0,h=e.map(Fi).join(",");return t.type+"|"+function(t){var e;switch(t.type){case"rect":return Di(t.width)+","+Di(t.height)+","+Di(t.x)+","+Di(t.y);case"ellipse":return Di(t.rx)+","+Di(t.ry)+","+Di(t.cx)+","+Di(t.cy);case"circle":return Di(t.r)+","+Di(t.cx)+","+Di(t.cy);case"path":return String(null!=(e=t.d)?e:"");default:return""}}(t)+"|["+h+"]|f:"+l+"|s:"+c+"|sw:"+(Di(u)||"")+"|o:"+f+"|m:"+d}(t,s,n))}function Li(t,e){var n;e.add(0),(t=>{var n;if(t&&"object"==typeof t)for(const r of Object.keys(t)){const o=null==(n=t[r])?void 0:n.keyframes;Array.isArray(o)&&o.forEach(t=>{var n;return e.add(null!=(n=t.time)?n:0)})}})(t.animate),t.transform&&"object"==typeof t.transform&&t.transform.keyframes&&t.transform.keyframes.forEach(t=>{var n;return e.add(null!=(n=t.time)?n:0)}),null==(n=t.children)||n.forEach(t=>Li(t,e))}function Bi(t,e){const n=new Map;Ci(t,n);const r=[];return Ri(t,xi,e,n,r),r.sort()}function Ui(t,e){const n=new Set;Li(t,n),Li(e,n);const r=[];for(const o of Array.from(n).sort((t,e)=>t-e)){const n=Bi(t,o),i=Bi(e,o),a=Vi(n,i),s=Vi(i,n);(a.length||s.length)&&r.push({time:o,onlyInA:a,onlyInB:s})}return r}function Vi(t,e){const n=new Map;for(const t of e)n.set(t,(n.get(t)||0)+1);const r=[];for(const e of t){const t=n.get(e)||0;t>0?n.set(e,t-1):r.push(e)}return r}var Wi=["timelineSource","scroll","trigger","delay","iterations","direction","fill","resetOnFinish","duration","mode","frameRate"],Gi=["definitions","animateById"],qi=t=>!!t&&"object"==typeof t&&!Array.isArray(t),Ki=t=>qi(t)&&"string"==typeof t.type?t.type:"time",Zi=t=>"scroll"===t||"view"===t;function Xi(t,e){const n=qi(t)?A({},t):{};for(const t of Object.keys(e)){const r=e[t];null!==r?qi(r)?n[t]=Xi(n[t],r):n[t]=r:delete n[t]}return n}function Hi(t,e,n){const r=Ki(t),o=qi(e)&&"string"==typeof e.type?String(e.type):r;let i;if(o!==r){const n={};if(qi(t))for(const e of Ot)void 0!==t[e]&&(n[e]=t[e]);i=Xi(n,e)}else i=Xi(t,e);if(Zi(o)){for(const t of Mt)void 0!==i[t]&&(n("animator.timeline."+t+": no slot on a '"+o+"' timeline — dropped"),delete i[t]);"infinite"===i.iterations&&(n("animator.timeline.iterations: 'infinite' cannot map onto a scroll range — dropped"),delete i.iterations)}return i}function Yi(t,e){let n;if("string"==typeof t)try{n=JSON.parse(t)}catch(t){console.warn("animator config: not valid JSON — ignored",t),n=void 0}else n=null!=t?t:void 0;const{duration:r,delay:o,iterations:i,startOn:a}=e;if(void 0===r&&void 0===o&&void 0===i&&void 0===a)return n;const s=qi(n)?A({},n):{},l=A({},s.timeline);return void 0!==r&&(l.duration=r),void 0!==o&&(l.delay=o),void 0!==i&&(l.iterations=i),void 0!==a&&(l.trigger=w(A({},l.trigger),{startOn:a})),s.timeline=l,s}function Ji(t,e){const n=[],r=t=>n.push(t);if(null===e)return{config:void 0,warnings:n};if(!qi(e)||0===Object.keys(e).length)return{config:t,warnings:n};const o=qi(t)?Wi.filter(e=>void 0!==t[e]):[];o.length&&r("animator: the base carries the flat runtime spelling ("+o.join(", ")+"); the patch merges the wire spelling only");const i=qi(t)?A({},t):{};for(const t of Object.keys(e)){const n=e[t];null!==n?"timeline"!==t?qi(n)?i[t]=Xi(i[t],n):i[t]=n:i.timeline=qi(n)?Hi(i.timeline,n,r):n:delete i[t]}return{config:i,warnings:n}}function Qi(t,e,n){var r,o;const i=!!(null==n?void 0:n.resetDefaults);if(!t||void 0===e||!(i||null!==e&&qi(e)&&Object.keys(e).length))return{doc:t,warnings:[]};const a=t,s=qi(a.animator),l=!s&&qi(null==(r=a.meta)?void 0:r.animator),c=s?a.animator:l?a.meta.animator:void 0,u=[];s&&qi(null==(o=a.meta)?void 0:o.animator)&&u.push("animator: doc.meta.animator is shadowed by doc.animator and was not patched");let f=c;if(i){const t={};for(const e of Gi)qi(c)&&void 0!==c[e]&&(t[e]=c[e]);f=t}const d=Ji(f,null!=e?e:{});return u.push(...d.warnings),d.config===c?{doc:t,warnings:u}:l?{doc:w(A({},a),{meta:w(A({},a.meta),{animator:d.config})}),warnings:u}:{doc:w(A({},a),{animator:d.config}),warnings:u}}var $i=6,ta=[...Ot,...Mt,"fill","resetOnFinish","timelineSource","scroll"],ea=t=>ta.some(e=>t.indexOf("animator."+e+":")>=0);function na(t,e){const{startOn:n,outAction:r="continue",scrollIntoViewThreshold:o=0}=e,i=t.getRootElement();if(!i)return console.warn("setupAnimationTriggers: No root element found for animation."),t;let a=!1;const s=()=>{a&&(a=!1,t.setPlaybackRate(1)),t.play()},l=()=>{switch(r){case"pause":t.pause();break;case"reset":t.cancel();break;case"reverse":a=!0,t.setPlaybackRate(-1),t.play()}};switch(n){case"load":{const t=()=>s();"complete"===document.readyState?t():window.addEventListener("load",t,{once:!0});break}case"mouseOver":{let t=!1;const e=()=>{t=!0,s()},n=()=>{t&&l()};i.addEventListener("mouseenter",e),i.addEventListener("mouseleave",n);break}case"click":{const e=()=>{t.isPlaying()?l():s()};i.addEventListener("click",e);break}case"scrollIntoView":{const t=t=>{var e,n;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,a=null!=(n=null==(e=t.rootBounds)?void 0:e.height)?n:1/0,s=Math.min(i,a),l=Math.min(r.height,Number.isFinite(s)?s:r.height);return l>0?o.height/l:t.intersectionRatio},e=Array.from({length:21},(t,e)=>e/20);let n=!1;new IntersectionObserver(e=>{e.forEach(e=>{e.isIntersecting&&t(e)>=o?(n=!0,s()):n&&(n=!1,l())})},{threshold:e}).observe(i);break}}return t}function ra(t){return"#"+t}function oa(t,e,n,r){const o=Jt(t)||{};if(!r)if(t.id){const e=ra(t.id);(r=document.querySelector(e))||console.warn("createFrameLoopAnimator: No root element found for selector: ",e)}else console.warn("createFrameLoopAnimator: No root element provided");const i=wi(t,e||function(t){const e=new Set;return{isConnected:()=>!t||t.isConnected,setAttribute:(n,r,o)=>{r=K(r);const i=ra(n),a=(null==t?void 0:t.querySelectorAll(i))||document.querySelectorAll(i);0!==a.length||e.has(i)||(e.add(i),console.warn('setAttribute: No elements found for selector "'+i+'"'));for(let t=0;t<a.length;t++){const e=a[t],n="transform"===r&&"pattern"===e.tagName?"patternTransform":r;e.setAttribute(n,o),U.has(r)&&(e.style[r]=o)}}}}(r),n),a=f(u({},i),{getRootElement:()=>r||null});return o.trigger&&(tt(o)?console.warn("scroll timeline: `animator.trigger` is ignored (triggers do not apply to scroll-driven playback)"):na(a,o.trigger)),a}function ia(t,e,n,r){let o=ae(t);const i=se(t),a={offset:e,easing:i&&Array.isArray(i)?"cubic-bezier("+i.join(",")+")":void 0};let s,l=n;return F.has(n)&&Array.isArray(o)?s=C(o):"transform"!==n||null===o||"object"!=typeof o||Array.isArray(o)?R.has(n)?(Array.isArray(o)&&("translate"===n&&(o=o.map(t=>t+"px")),o=o.join(",")),"rotate"===n&&(o+="deg"),s=n+"("+o+")",l="transform"):s="d"===n?'path("'+(o&&"object"==typeof o&&Array.isArray(o.paths)?o.paths:[]).map(t=>j(t,!0)).join("")+'")':L.has(n)&&"number"==typeof o?100*o+"%":""+o:(s=B(o,{withUnits:!0}),l="transform"),CSS.supports(K(l),s)||r.add(l),l=W(l),a[l]=s,a}function aa(t,e,n){var r,o,i,a,s;const l=[];for(let c=0;c<e.length;c++){const d=e[c],h=null!=(r=d.t)?r:0;if(h<0){const n=e[c+1];if(n&&(null!=(o=n.t)?o:0)>=0){const e=(0-h)/((null!=(i=n.t)?i:0)-h),r=d.e?T(d.e)(e):e,{right:o}=z(d.e,e);l.push({t:0,v:Qn(t,d.v,n.v,r),e:o})}continue}if(h>n){const r=e[c-1];if(r&&(null!=(a=r.t)?a:0)<=n){const e=null!=(s=r.t)?s:0,o=(n-e)/(h-e),i=r.e?T(r.e)(o):o,{left:a}=z(r.e,o);l.length>0&&(l[l.length-1]=f(u({},l[l.length-1]),{e:a})),l.push({t:n,v:Qn(t,r.v,d.v,i),e:void 0})}break}l.push(d)}return l}function sa(t,e,n){var r;const o=new Map;for(const[i,a]of Object.entries(t)){const t=n.duration||1,s=aa(i,a.keyframes||[],t),l=[];for(let n=0;n<s.length;n++){const o=s[n],a=ia(o,Z((null!=(r=o.t)?r:0)/t,0,1),i,e);0===n&&(a.offset||0)>0&&l.push(f(u({},a),{offset:0})),l.push(a)}l.length>0&&(l[l.length-1].offset||0)<1&&l.push(f(u({},l[l.length-1]),{offset:1})),l.length>0&&o.set(i,l)}return o}function la(t,e,n,r,o){var i;const a=Jt(t)||{};if(!n)if(t.id){const e=ra(t.id);(n=document.querySelector(e))||console.warn("createFrameLoopAnimator: No root element found for selector: ",e)}else console.warn("createFrameLoopAnimator: No root element provided");const s=ir(t,_t.native),l=[],c=a.iterations;let u;"number"==typeof c&&(u=c),"infinite"===c&&(u=1/0);const f=new Set;let d=!1,h=!1;(null==s?void 0:s.length)||console.warn("createWebApiAnimator: No animation bindings defined");for(const t of s||[]){const r=t.animate;if(!r||"object"!=typeof r||Array.isArray(r)){console.warn("createWebApiAnimator: Empty or unresolved binding",t);continue}const s=ra(t.id),c=(null==n?void 0:n.querySelectorAll(s))||document.querySelectorAll(s);0===c.length&&console.warn('createWebApiAnimator: No elements found for selector "'+s+'"');const m=sa(r,f,a),p=a.delay&&a.delay>0?a.delay:void 0;let g;if(a.delay&&a.delay<0&&a.duration){const t=-a.delay;g=u===1/0?t%a.duration:Math.min(t,a.duration*(null!=u?u:1))}const y={duration:a.duration,delay:p,fill:null!=(i=a.fill)?i:"forwards",direction:a.direction,iterations:u};for(let t=0;t<c.length;t++){const n=c[t];for(const[,t]of m)if(t.length>0)try{const r=new KeyframeEffect(n,t,y),i=new Animation(r,o?o.timeline:document.timeline);if(o){const t=i;o.rangeStart&&(t.rangeStart=o.rangeStart),o.rangeEnd&&(t.rangeEnd=o.rangeEnd)}(null==e?void 0:e.onFinish)&&(i.onfinish=()=>{var t;d||(d=!0,null==(t=e.onFinish)||t.call(e))}),(null==e?void 0:e.onRemove)&&(i.onremove=()=>{var t;h||(h=!0,null==(t=e.onRemove)||t.call(e))}),void 0!==g&&(i.currentTime=g),l.push(i)}catch(t){console.warn(t)}}}if(!r&&f.size)return console.warn("Unsupported CSS attrs: "+[...f].join(", ")),null;const m={isReady:()=>!0,getRootElement:()=>n||null,isPlaying:()=>{var t;return"running"===(null==(t=l[0])?void 0:t.playState)},play:()=>{var t;d=!1,l.forEach(t=>t.play()),null==(t=null==e?void 0:e.onPlay)||t.call(e)},pause:()=>{var t;l.forEach(t=>t.pause()),null==(t=null==e?void 0:e.onPause)||t.call(e)},cancel:()=>{var t;d=!1,l.forEach(t=>t.cancel()),null==(t=null==e?void 0:e.onCancel)||t.call(e)},finish:()=>{var t;for(const e of l)try{(null==(t=e.effect)?void 0:t.getTiming().iterations)===1/0?(e.effect.updateTiming({iterations:1}),e.finish(),e.effect.updateTiming({iterations:1/0})):e.finish()}catch(t){e.cancel()}},setPlaybackRate:t=>(l.forEach(e=>e.playbackRate=t),m),getCurrentTime:()=>{var t,e;const n=null!=(e=null==(t=l[0])?void 0:t.currentTime)?e:null;return null!==n?+n:null},setCurrentTime:t=>{d=!1,l.forEach(e=>{e.currentTime=t})},destroy:()=>{var t;m.cancel(),l.splice(0,l.length),h||(h=!0,null==(t=null==e?void 0:e.onRemove)||t.call(e))}};return a.trigger&&("scroll"===a.timelineSource?console.warn("scroll timeline: `animator.trigger` is ignored (triggers do not apply to scroll-driven playback)"):na(m,a.trigger)),o&&l.forEach(t=>t.play()),m}function ca(t,e,n){var r,o,i;const a="number"==typeof(null==t?void 0:t.fraction)?t.fraction:e,s=null==(o=null==(r=globalThis.CSS)?void 0:r.percent)?void 0:o.call(r,100*a);if(void 0!==s)return n?{rangeName:null!=(i=null==t?void 0:t.phase)?i:"cover",offset:s}:{offset:s}}function ua(t,e){const n=document.body,r=document.documentElement;for(let o=t.parentElement;o;o=o.parentElement){if(o===n||o===r)return null;const t=getComputedStyle(o),i="y"===e?t.overflowY:t.overflowX;if("auto"===i||"scroll"===i||"hidden"===i||"overlay"===i)return o}return null}function fa(){return document.scrollingElement||document.documentElement}var da="parent",ha="scroller";function ma(t,e){var n,r;const o=null==e?void 0:e.trim();if(!o)return t;if(o===da){let e=null;for(let n=t.parentElement;n&&n!==document.body;n=n.parentElement){const t=getComputedStyle(n).position;"sticky"!==t&&"fixed"!==t||(e=n)}return null!=(r=null!=(n=null==e?void 0:e.parentElement)?n:t.parentElement)?r:t}if(o===ha)return ua(t,"y")||ua(t,"x")||fa();let i=null;try{i=document.querySelector(o)}catch(e){return console.warn('scroll timeline: subject "'+o+'" is not a valid selector — measuring the SVG itself'),t}return i||(console.warn('scroll timeline: subject "'+o+'" matched no element — measuring the SVG itself'),t)}function pa(t,e){const n=t;if(!(null==e?void 0:e.pin)||!n.style)return()=>{};const r=n.style,o=r.position,i=r.top;r.position="sticky";const a="center"===e.pinAlign?.5:"bottom"===e.pinAlign?1:0,s=()=>{var n;const o=null!=(n=e.pinTop)?n:0;if(!a)return void(r.top=o+"px");const i=function(t){const e=ua(t,"y");return e?e.clientHeight:document.documentElement.clientHeight}(t),s=t.getBoundingClientRect().height;r.top=Math.round((i-s)*a+o)+"px"};s();let l=null;const c=a?s:null;a&&(c&&window.addEventListener("resize",c),"undefined"!=typeof ResizeObserver&&(l=new ResizeObserver(s),l.observe(t)));let u=null;const f=t.parentElement;return e.pinDistance&&e.pinDistance>0&&f&&(u=document.createElement("div"),u.setAttribute("data-px-pin",""),u.style.height=100*e.pinDistance+"vh",f.insertBefore(u,t),u.appendChild(t)),()=>{c&&window.removeEventListener("resize",c),null==l||l.disconnect(),r.position=o,r.top=i,(null==u?void 0:u.parentElement)&&(u.parentElement.insertBefore(t,u),u.remove())}}function ga(t,e,n){let r,o=e;t.resetOnFinish&&(o=f(u({},e),{onFinish:()=>{var t;null==(t=null==e?void 0:e.onFinish)||t.call(e),null==r||r.cancel()}}));const i=n(o);return r=i,t.debugGlobalName&&(window[t.debugGlobalName]=i),i}var ya="http://www.w3.org/2000/svg";function va(t,e){if(!t)return null;const n=t,{type:r,children:o,style:i}=n,c=((t,e)=>{var n={};for(var r in t)s.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&a)for(var r of a(t))e.indexOf(r)<0&&l.call(t,r)&&(n[r]=t[r]);return n})(n,["type","children","style"]),u=c.domType;void 0!==u&&delete c.domType;const f=$t(t)||e,d=function(t,e){var n;if(t)return"string"==typeof t?null==(n=null==e?void 0:e.styles)?void 0:n[t]:t}(i,f);let h;if(o)for(const t of o){const e=va(t,f);e&&(h||(h=[]),h.push(e))}const m=function(t,e,n,r,o){if(cn.has(t.toLowerCase()))return console.warn("SVG tag blocked (dangerous): ",t),null;const i=document.createElementNS(ya,t);for(const t in e){const n=yn(t,e[t]);void 0!==n&&(dn.has(t)?i.style[t]=String(n):i.setAttribute(K(t),n))}if(n)for(const t in n)i.style[t]=String(n[t]);if(r)for(const t of r)i.appendChild(t);return o&&(i.textContent=o),i}(r||"g",vn(c),d,h,c[Bt]||c[Lt]);return m&&void 0!==u&&m.setAttribute("type",u),m}var ba="data";function ka(t,e,n,r,o,i){const a=He(t);for(const t of a)console.warn("[PxAnimator] effects shape warning:",t);if(function(t){const{problems:e}=function(t){let e;try{e=Ye(t)}catch(t){return{problems:[],legacy:[]}}const n=[],r=[];for(const t of e)(ea(t)?r:n).push(t);return{problems:n,legacy:r}}(t);if(!e.length)return;const n=e.slice(0,$i),r=e.length-n.length;console.warn("[PxAnimator] createAnimator: this document does not match the animation schema in "+e.length+" place"+(1===e.length?"":"s")+".\n"+n.map(t=>" - "+t).join("\n")+(r>0?"\n … and "+r+" more":"")+"\n\nIf you did not author these keys, the usual cause is a build that MANGLES PROPERTY NAMES. An animation document is data loaded at runtime, so renaming the property reads inside the player stops them matching the keys in the JSON, and the animation silently does nothing. Feed the published reserved-name list to your minifier — @pixodesk/svg-animator-web/mangle-reserved.json — see docs/library/minification.md.")}(t),void 0!==o||i){const e=Qi(t,null!=o?o:{},{resetDefaults:!!i});for(const t of e.warnings)console.warn("[PxAnimator] config override:",t);t=e.doc}t=ki(t,Tt((Jt(t)||{}).engine));let s=null;if(r){t=sn(t);const e="string"==typeof r?document.querySelector(r):r;e&&(s=va(t),s&&e.replaceChildren(s))}const l=function(t,e,n,r){return function(t,e,n,r){const o=Jt(t)||{};return tt(o)?ga(o,n,n=>{var i;let a=()=>{};if(o.engine!==Et.js&&r){a=pa(r,o.scroll);const e=function(t,e){var n,r,o,i;if(!e||!tt(e))return null;const a=e.scroll||{},s=null!=(n=a.kind)?n:"view";if(a.smoothing)return console.warn("scroll timeline: `smoothing` needs the built-in driver — using the built-in driver instead of the browser timeline"),null;const l=globalThis,c="view"===s,u=c?l.ViewTimeline:l.ScrollTimeline;if("function"!=typeof u)return null;const f=null!=(r=a.axis)?r:"block";let d;try{d=new u(c?{subject:ma(t,a.subject),axis:f}:{source:"root"===a.source?fa():ua(t,"y")||ua(t,"x")||fa(),axis:f})}catch(t){return console.warn("scroll timeline: native timeline construction failed — falling back to the player measuring progress itself",t),null}return{timeline:d,rangeStart:ca(null==(o=a.range)?void 0:o.start,0,c),rangeEnd:ca(null==(i=a.range)?void 0:i.end,1,c)}}(r,o);if(e){const i=la(t,n,r,Nt(o.engine),e);if(i){const t=i.destroy.bind(i);return i.destroy=()=>{a(),t()},i}}a(),a=()=>{}}const s=(o.engine!==Et.js?la(t,n,r,Nt(o.engine)):null)||oa(t,e,n,r),l=(null==(i=s.getRootElement)?void 0:i.call(s))||r;if(l){a=pa(l,o.scroll);const t=("number"==typeof(null==(c=o)?void 0:c.duration)&&c.duration>0?c.duration:V)*("number"==typeof(null==c?void 0:c.iterations)&&c.iterations>0?c.iterations:1),e=function(t,e,n){var r,o;if(!e||!tt(e))return null;const i=e.scroll||{},a=null!=(r=i.kind)?r:"view",s=ma(t,i.subject),l=ua(t,"y")||ua(t,"x"),c="scroll"===a&&"root"===i.source?fa():l||fa(),u=c===fa(),f=function(t,e){const n=null!=t?t:"block";if("x"===n||"y"===n)return n;const r=!!e&&e.startsWith("vertical");return"inline"===n?r?"y":"x":r?"x":"y"}(i.axis,getComputedStyle(c).writingMode),d=()=>{if("scroll"===a)return function(t,e,n){var r,o;const i=e>0?Z(t/e,0,1):1,a="number"==typeof(null==(r=null==n?void 0:n.start)?void 0:r.fraction)?n.start.fraction:0,s="number"==typeof(null==(o=null==n?void 0:n.end)?void 0:o.fraction)?n.end.fraction:1;return s<=a?i>=s?1:0:Z((i-a)/(s-a),0,1)}("y"===f?c.scrollTop:c.scrollLeft,"y"===f?c.scrollHeight-c.clientHeight:c.scrollWidth-c.clientWidth,i.range);const t=s.getBoundingClientRect();let e,n;if(u)e=0,n="y"===f?document.documentElement.clientHeight:document.documentElement.clientWidth;else{const t=c.getBoundingClientRect();e="y"===f?t.top:t.left,n="y"===f?c.clientHeight:c.clientWidth}return function(t,e,n,r){const o=n-t,i=nt(null==r?void 0:r.start,0,e,n),a=nt(null==r?void 0:r.end,1,e,n);return a<=i?o>=a?1:0:Z((o-i)/(a-i),0,1)}(("y"===f?t.top:t.left)-e,"y"===f?t.height:t.width,n,i.range)},h=Math.max(0,null!=(o=i.smoothing)?o:0)/1e3;let m=!1,p=null,g=null,y=0,v=null;const b=()=>{v=null,m||(t=>{if(!h)return void n(t);if(null===p)return p=t,void n(t);if(null!==g)return;y=0;const e=t=>{if(g=null,m)return;const r=y?Math.min(.1,(t-y)/1e3):1/60;y=t;const o=d(),i=1-Math.exp(-r/h);p+=(o-p)*i,Math.abs(o-p)<.001&&(p=o),n(p),p!==o&&(g=requestAnimationFrame(e))};g=requestAnimationFrame(e)})(d())},k=()=>{m||null!==v||(v=requestAnimationFrame(b))},A=u?window:c;let w;A.addEventListener("scroll",k,{passive:!0}),window.addEventListener("resize",k,{passive:!0}),"undefined"!=typeof ResizeObserver&&(w=new ResizeObserver(k),w.observe(s),s!==t&&w.observe(t),u||w.observe(c));const x={destroy:()=>{m||(m=!0,A.removeEventListener("scroll",k),window.removeEventListener("resize",k),null==w||w.disconnect(),null!==v&&(cancelAnimationFrame(v),v=null),null!==g&&(cancelAnimationFrame(g),g=null))},refresh:()=>{m||(p=d(),n(p))}};return x.refresh(),x}(l,o,e=>s.setCurrentTime(e*t));if(e){const t=s.destroy.bind(s);s.destroy=()=>{e.destroy(),a(),t()}}}else console.warn("scroll timeline: no root element to observe — animation will stay at frame 0");var c;return s}):ga(o,n,n=>o.engine===Et.js?oa(t,e,n,r):la(t,n,r,Nt(o.engine))||oa(t,e,n,r))}(t,e,n,r)}(t,e,n,s);if(r&&s){const t=s,e=l.destroy.bind(l);l.destroy=()=>{e(),t.remove()}}return l}function Aa(t){const{src:e,data:n,adapter:r,callbacks:o,container:i,resetDocDefaults:a}=t,s=function(t){const{config:e,duration:n,delay:r,iterations:o,startOn:i}=t;return Yi(e,{duration:n,delay:r,iterations:o,startOn:i})}(t);if(void 0!==n&&void 0!==e)throw new Error("createAnimator: provide either `src` or `data`, not both");if(void 0===n&&void 0===e)throw new Error("createAnimator: either `src` or `data` is required");if(void 0!==n)return ka(n,r,o,i,s,a);let l=null,c=[],u=!1;const f=t=>{l?t(l):c&&c.push(t)};return fetch(e).then(t=>t.json()).then(t=>{if(!u)if(Yt(t)){l=ka(t,r,o,i,s,a);const e=c;c=null,null==e||e.forEach(t=>t(l))}else console.error('createAnimator: invalid animation document format at "'+e+'"')}).catch(t=>{c=null,console.error('createAnimator: failed to load "'+e+'"',t)}),{isReady:()=>!!l,getRootElement:()=>l?l.getRootElement():null,isPlaying:()=>(null==l?void 0:l.isPlaying())||!1,play:()=>{f(t=>t.play())},pause:()=>{f(t=>t.pause())},cancel:()=>{f(t=>t.cancel())},finish:()=>{f(t=>t.finish())},setPlaybackRate:t=>{f(e=>e.setPlaybackRate(t))},getCurrentTime:()=>l?l.getCurrentTime():null,setCurrentTime:t=>{f(e=>e.setCurrentTime(t))},destroy:()=>{u=!0,c=null,null==l||l.destroy()}}}function wa(){const t=document.querySelectorAll("["+St+"]");for(let e=0;e<t.length;e++){const n=t[e];if(!n[Pt]){const t=n.getAttribute(St);t&&(n[Pt]=Aa({src:t,container:n}))}}}"undefined"!=typeof window&&(window.loadTagAnimators=wa,window.createAnimator=Aa,window.setupAnimationTriggers=na);
|