@pixodesk/svg-animator-web 1.0.26 → 1.0.28

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.
@@ -1 +1 @@
1
- "use strict";var t,e=Object.defineProperty,n=Object.defineProperties,r=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyDescriptors,a=Object.getOwnPropertyNames,i=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(i)for(var n of i(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:()=>ce,PX_ANIMATOR_DATA_KEY:()=>xa,PX_ANIM_ATTR_NAME:()=>q,PX_ANIM_SRC_ATTR_NAME:()=>K,PX_TRANSFORM_PART_KEYS:()=>nt,PxAnimatedSvgDocumentSchema:()=>Xt,PxAnimationDefinitionSchema:()=>yt,PxAnimatorConfigSchema:()=>Pt,PxAnimatorEngine:()=>X,PxAnimatorMode:()=>Z,PxAttrValueSchema:()=>jt,PxBezierPathSchema:()=>Yt,PxBindingSchema:()=>St,PxCloneEffectSchema:()=>Ft,PxDefsSchema:()=>xt,PxEasingOrRefSchema:()=>ft,PxEffectsSchema:()=>Wt,PxElementAnimationSchema:()=>bt,PxFillGradientEffectSchema:()=>Rt,PxGradientSpreadMethod:()=>ot,PxGradientStopSchema:()=>Lt,PxGradientType:()=>at,PxGradientUnits:()=>rt,PxKeyframeSchema:()=>ht,PxKeyframeValueSchema:()=>dt,PxLoopSchema:()=>pt,PxMaskedByEffectSchema:()=>Tt,PxNodeBase:()=>Kt,PxNodeSchema:()=>qt,PxPropertyAnimationSchema:()=>mt,PxRepeaterEffectSchema:()=>zt,PxRetimeEffectSchema:()=>Ct,PxStrokeGradientEffectSchema:()=>Bt,PxSvgNodeExtra:()=>Zt,PxTextEffectSchema:()=>Vt,PxTextPathEffectSchema:()=>Ut,PxTransformByEffectSchema:()=>It,PxTransformPartsSchema:()=>vt,PxTransformValueSchema:()=>gt,PxTriggerSchema:()=>kt,PxTrimPathEffectSchema:()=>Et,STYLE_ATTR_NAMES:()=>pe,TRANSFORM_FN_NAMES:()=>fe,applyPlayerEffects:()=>Co,calcAnimationValues:()=>zn,camelCaseToKebabWordIfNeeded:()=>be,collectSampleTimes:()=>ca,createAnimator:()=>Sa,createAnimatorImpl:()=>Pa,createBasicFrameLoopAnimator:()=>Zo,createFrameLoopAnimator:()=>va,createPathSampler:()=>Cr,createWebApiAnimator:()=>ka,describeSchema:()=>W,diffInEffect:()=>da,evaluateMotionPathSegment:()=>Xe,extendedPathForBrowser:()=>Ur,generateNewIds:()=>Ie,getAnimatorConfig:()=>st,getBindings:()=>ut,getChildren:()=>ct,getDefs:()=>lt,getNormalizedProps:()=>Ue,isPxElementFileFormat:()=>it,isPxElementFileFormatDeep:()=>Qt,jsonElementFactory:()=>Wr,layoutGlyphTextChars:()=>so,loadTagAnimators:()=>ja,materialiseAllInTree:()=>Ko,materialiseAnimatedUseInstances:()=>Fn,materialiseGlyphText:()=>bo,materialiseGlyphTextAlongPath:()=>co,materialiseGlyphTextHorizontal:()=>io,materialiseInternalLoopsInPropAnim:()=>Sn,materialiseInternalLoopsInTree:()=>jn,materialiseMotionPathInPropAnim:()=>Je,materialiseMotionPathsInTree:()=>dn,normalizeDocument:()=>_n,propAnimIsMotionPath:()=>Ke,px:()=>G,renderNode:()=>wa,schemaKeys:()=>V,setupAnimationTriggers:()=>pa,shiftAnimatable:()=>Br,toRGBA:()=>le,validateNodeEffects:()=>Gt,visualModelAt:()=>fa}),module.exports=(t=d,((t,n,o,i)=>{if(n&&"object"==typeof n||"function"==typeof n)for(let o of a(n))s.call(t,o)||void 0===o||e(t,o,{get:()=>n[o],enumerable:!(i=r(n,o))||i.enumerable});return t})(e({},"__esModule",{value:!0}),t));var h=Object.defineProperty,p=Object.defineProperties,m=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)=>p(t,m(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 P(t){if(!t.length)return".";let e="";for(const n of t)n.startsWith("[")?e+=n:e+=(e?".":"")+n;return e}var S=class{_canSanitize(t){return this.isValid(t)}optional(){return new j(this)}},j=class extends S{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)}},O=class extends S{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(P(null!=n?n:[])+": expected string, got "+typeof t),!1)}},M=class extends S{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(P(null!=n?n:[])+": expected finite number, got "+JSON.stringify(t)),!1)}},_=class extends S{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(P(null!=n?n:[])+": expected boolean, got "+typeof t),!1)}},I=class extends S{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(P(null!=n?n:[])+": expected "+JSON.stringify(this.value)+", got "+JSON.stringify(t)),!1)}},z=class extends S{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(P(null!=n?n:[])+": expected one of "+this.values.map(t=>JSON.stringify(t)).join(" | ")+", got "+JSON.stringify(t)),!1)}},T=class extends S{constructor(t,e){super(),this.schemas=t,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(P(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))}},N=class extends S{constructor(t,e,n){super(),this._key=t,this._schemas=e,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(P(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)}},E=class extends S{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(P(null!=n?n:[])+": expected object, got "+(Array.isArray(t)?"array":typeof t)),!1;const r=t,o=null!=n?n:[];let a=!0;for(const t of Object.keys(this._shape))o.push(t),this._shape[t].isValid(r[t],e,o)||(a=!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(P(o)+": unexpected extra key"),o.pop(),a=!1);return a}_canSanitize(t){return!!t&&"object"==typeof t&&!Array.isArray(t)}},C=class extends S{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(P(null!=n?n:[])+": expected object, got "+(Array.isArray(t)?"array":typeof t)),!1;const r=t,o=null!=n?n:[];let a=!0;for(const t of Object.keys(this._shape))o.push(t),this._shape[t].isValid(r[t],e,o)||(a=!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)||(a=!1),o.pop());return a}_canSanitize(t){return!!t&&"object"==typeof t&&!Array.isArray(t)}},F=class extends S{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(P(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)}},L=class extends S{constructor(t){super(),this.value=t,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(P(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,a]of Object.entries(t))r.push(n),this.value.isValid(a,e,r)||(o=!1),r.pop();return o}_canSanitize(t){return!!t&&"object"==typeof t&&!Array.isArray(t)}},D=class extends S{constructor(){super(...arguments),this._default=void 0}sanitize(t){return t}isValid(t,e,n){return!0}_canSanitize(t){return!0}},R=class extends S{constructor(){super(...arguments),this._default=void 0}sanitize(t){return t}isValid(t,e,n){return void 0!==t||(null==e||e.errors.push(P(null!=n?n:[])+": required value is missing"),!1)}_canSanitize(t){return void 0!==t}},B=class extends S{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)}},U=class extends S{constructor(t){super(),this.schemas=t,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(P(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 V(t){return Object.fromEntries(Object.keys(t._shape).map(t=>[t,t]))}function W(t){var e;const n=t;return"_shape"in n?{kind:"shape",shape:n._shape}:"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.fn()}:{kind:"leaf"}}var G={string:(t="")=>new O(t),number:(t=0)=>new M(t),boolean:(t=!1)=>new _(t),literal:t=>new I(t),enum:(t,e)=>new z(t,e),union:(t,e)=>new T(t,e),discriminatedUnion:(t,e)=>new N(t,e),object:t=>new E(t),openObject:(t,e)=>new C(t,e),extendedObject:(t,e)=>new E(A(A({},t._shape),e)),array:t=>new F(t),record:t=>new L(t),any:()=>new D,defined:()=>new R,tuple:t=>new U(t),lazy:(t,e)=>new B(t,e)},K="data-px-animation-src",q="_px_animator",Z={auto:"auto",waapi:"waapi",frames:"frames"},X={waapi:Z.waapi,frames:Z.frames},Y={before:"before",after:"after"},Q="userSpaceOnUse",H="objectBoundingBox",J={separate:"separate",combined:"combined"},$="text",tt="textContent",et=new Set(["type","children","animator","meta","animate","effects",$,tt]),nt=["translate","rotate","scale","origin"],rt={userSpaceOnUse:"userSpaceOnUse",objectBoundingBox:"objectBoundingBox"},ot={pad:"pad",reflect:"reflect",repeat:"repeat"},at={linear:"linear",radial:"radial"};function it(t){return!(!t||"object"!=typeof t||Array.isArray(t))&&"svg"===t.type}function st(t){var e;return(null==t?void 0:t.animator)||(null==(e=null==t?void 0:t.meta)?void 0:e.animator)}function lt(t){var e;if(t)return null==(e=st(t))?void 0:e.definitions}function ut(t){var e;if(!t)return;const n=null==(e=st(t))?void 0:e.animateById;return n?Object.entries(n).map(([t,e])=>({id:t,animate:e})):void 0}function ct(t){return null==t?void 0:t.children}var ft=G.union([G.string(),G.tuple([G.number(),G.number(),G.number(),G.number()])]),dt=G.union([G.string(),G.number(),G.array(G.number()),G.lazy(()=>vt,{}),G.object({path:G.string()}),G.lazy(()=>G.object({paths:G.array(Yt)}),{paths:[]}),G.lazy(()=>G.array(Lt),[])]),ht=G.object({time:G.number().optional(),t:G.number().optional(),value:dt.optional(),v:dt.optional(),easing:ft.optional(),e:ft.optional(),tangentOut:G.tuple([G.number(),G.number()]).optional(),to:G.tuple([G.number(),G.number()]).optional(),tangentIn:G.tuple([G.number(),G.number()]).optional(),ti:G.tuple([G.number(),G.number()]).optional(),selected:G.boolean().optional()}),pt=G.object({segmentCount:G.number().optional(),extend:G.enum([Y.before,Y.after]).optional(),alternate:G.boolean().optional()}),mt=G.object({value:dt.optional(),keyframes:G.array(ht).optional(),kfs:G.array(ht).optional(),loop:G.union([pt,G.boolean()]).optional(),autoOrient:G.boolean().optional()}),vt=G.object({translate:G.tuple([G.number(),G.number()]).optional(),rotate:G.number().optional(),skew:G.number().optional(),scale:G.tuple([G.number(),G.number()]).optional(),origin:G.tuple([G.number(),G.number()]).optional()}),gt=G.union([G.string(),vt,G.object({value:vt}),mt]),yt=G.record(mt),bt=G.union([G.string(),G.array(G.union([G.string(),yt])),yt]),kt=G.object({startOn:G.enum(["load","mouseOver","click","scrollIntoView","programmatic"]).optional(),outAction:G.enum(["continue","pause","reset","reverse"]).optional(),scrollIntoViewThreshold:G.number().optional()}),At=G.object({width:G.number(),d:G.string()}),wt=G.object({fFamily:G.string(),style:G.string(),ascent:G.number(),unitsPerEm:G.number(),glyphs:G.record(At)}),xt=G.object({easings:G.record(G.tuple([G.number(),G.number(),G.number(),G.number()])).optional(),animations:G.record(yt).optional(),styles:G.record(G.any()).optional(),glyphs:G.record(wt).optional()}),Pt=G.object({mode:G.enum([Z.auto,Z.waapi,Z.frames]).optional(),duration:G.number().optional(),delay:G.number().optional(),iterations:G.union([G.number(),G.literal("infinite")]).optional(),fill:G.enum(["forwards","backwards","both","none"]).optional(),direction:G.enum(["normal","reverse","alternate","alternate-reverse"]).optional(),frameRate:G.number().optional(),trigger:kt.optional(),resetOnFinish:G.boolean().optional(),definitions:xt.optional(),animateById:G.record(bt).optional(),timelineSource:G.string().optional(),debugInstName:G.string().optional()}),St=G.object({id:G.string(),animate:bt}),jt=G.union([G.string(),G.number(),G.array(G.number()),G.object({value:G.defined()}),vt]),Ot=G.union([G.number(),G.object({value:G.number()}),mt]),Mt=G.union([G.tuple([G.number(),G.number()]),G.object({value:G.tuple([G.number(),G.number()])}),mt]),_t=G.union([G.string(),G.object({value:G.string()}),mt]),It=G.object({translate:Mt.optional(),rotate:Ot.optional(),scale:Mt.optional(),skew:Ot.optional(),origin:Mt.optional()}),zt=G.object({copies:G.number().optional(),translate:Mt.optional(),rotate:Ot.optional(),skew:Ot.optional(),scale:Mt.optional(),origin:Mt.optional()}),Tt=G.object({sourceId:G.string().optional(),maskType:G.enum(["luminance","alpha"]).optional(),maskUnits:G.enum([Q,H]).optional(),maskContentUnits:G.enum([Q,H]).optional(),x:G.number().optional(),y:G.number().optional(),width:G.number().optional(),height:G.number().optional()}),Nt=G.object({d:_t.optional(),animate:mt.optional()}),Et=G.object({offset:Ot.optional(),range:Mt.optional(),subPaths:G.enum([J.separate,J.combined]).optional()}),Ct=G.object({sourceId:G.string().optional(),start:G.number().optional(),stretch:G.number().optional(),timeCrop:G.tuple([G.number(),G.number()]).optional()}),Ft=G.object({type:G.enum(["content"]).optional(),sourceId:G.string().optional(),retime:Ct.optional()}),Lt=G.object({offset:G.number(),color:G.string()}),Dt=G.union([G.array(Lt),G.object({value:G.array(Lt)}),mt]),Rt=G.object({type:G.enum([at.linear,at.radial]),p1:Mt.optional(),p2:Mt.optional(),c:Mt.optional(),r:Ot.optional(),fp:Mt.optional(),stops:Dt.optional(),gradientUnits:G.enum([rt.userSpaceOnUse,rt.objectBoundingBox]).optional(),spreadMethod:G.enum([ot.pad,ot.reflect,ot.repeat]).optional(),gradientTransform:G.string().optional()}),Bt=Rt,Ut=G.object({path:G.string(),pathOverflow:G.enum(["clip","extend"]).optional(),lengthAdjust:G.enum(["spacing","spacingAndGlyphs"]).optional(),method:G.enum(["align","stretch"]).optional(),spacing:G.enum(["auto","exact"]).optional(),startOffset:Ot.optional(),textLength:Ot.optional()}),Vt=G.object({useGlyphs:G.boolean().optional()}),Wt=G.object({transformBy:It.optional(),repeater:zt.optional(),maskedBy:Tt.optional(),clipPath:Nt.optional(),trimPath:Et.optional(),clone:Ft.optional(),fillGradient:Rt.optional(),strokeGradient:Bt.optional(),textPath:Ut.optional(),text:Vt.optional()});function Gt(t,e){const n=[],r=(t,o)=>{if(t&&t.effects){const r={errors:[],warnings:[],strict:!!(null==e?void 0:e.strict)};if(!Wt.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 Kt=G.openObject({type:G.string(),id:G.string().optional(),meta:G.any().optional(),effects:Wt.optional(),animate:bt.optional(),style:G.union([G.string(),G.record(G.union([G.string(),G.number()]))]).optional()},jt),qt=G.openObject(w(A({},Kt._shape),{children:G.lazy(()=>G.array(qt),[]).optional()}),jt),Zt=G.object({width:G.union([G.number(),G.string()]).optional(),height:G.union([G.number(),G.string()]).optional(),viewBox:G.string().optional(),animator:Pt.optional()}),Xt=G.openObject(w(A(A({},Kt._shape),Zt._shape),{type:G.literal("svg"),children:G.array(qt).optional()}),jt),Yt=G.object({v:G.array(G.array(G.number())),i:G.array(G.array(G.number())).optional(),o:G.array(G.array(G.number())).optional(),c:G.boolean().optional()});function Qt(t){const e=Xt.isValid(t);return{valid:e,errors:e?[]:["Document failed schema validation"]}}function Ht(t,e=!1){var n,r,o,a;const i=t.v,s=t.i,l=t.o,u=t.c;if(!i.length)return"";const c=[],f=i.length;c.push("M"+i[0][0]+","+i[0][1]);for(let t=1;t<f;t++){const o=i[t-1],a=null!=(n=null==l?void 0:l[t-1])?n:o,u=null!=(r=null==s?void 0:s[t])?r:i[t],f=i[t];e||a[0]!==o[0]||a[1]!==o[1]||u[0]!==f[0]||u[1]!==f[1]?c.push("C"+a[0]+","+a[1]+","+u[0]+","+u[1]+","+f[0]+","+f[1]):c.push("L"+f[0]+","+f[1])}if(u&&f>0){const t=i[f-1],n=null!=(o=null==l?void 0:l[f-1])?o:t,r=null!=(a=null==s?void 0:s[0])?a:i[0],u=i[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 Jt(t,e,n){return t+(e-t)*n}function $t(t,e,n){const r=[],o=Math.max(t.length,e.length);for(let a=0;a<o;a++)r[a]=Jt(t[a]||0,e[a]||0,n);return r}function te(t,e,n){return[Jt(t[0]||0,e[0]||0,n),Jt(t[1]||0,e[1]||0,n),Jt(t[2]||0,e[2]||0,n),Jt(void 0===t[3]?1:t[3],void 0===e[3]?1:e[3],n)]}function ee(t,e,n){const r=Math.max(t.length,e.length),o=[];for(let a=0;a<r;a++)o.push(ne(t[a],e[a],n));return o}function ne(t,e,n){var r,o,a,i,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),p=[],m=[],v=[];for(let n=0;n<h;n++){const f=t.v[n],h=e.v[n];p.push($t(f,h,d));const g=null!=(o=null==(r=t.i)?void 0:r[n])?o:f,y=null!=(i=null==(a=e.i)?void 0:a[n])?i:h;m.push($t(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($t(b,k,d))}return{v:p,i:m.length?m:void 0,o:v.length?v:void 0,c:null!=(f=t.c)?f:e.c}}function re(t,e,n){if(n<=0)return 0;if(n>=1)return 1;const r=3*t,o=3*(e-t)-r,a=1-r-o;function i(t){return((a*t+o)*t+r)*t}function s(t){return(3*a*t+2*o)*t+r}let l=n,u=0,c=1;for(let t=0;t<8;t++){const t=i(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=i(l);if(Math.abs(t-n)<1e-6)return l;n>t?u=l:c=l,l=(c+u)/2}return l}function oe(t){const[e,n,r,o]=t,a=3*n,i=3*(o-n)-a,s=1-a-i;return function(t){return n=re(e,r,t),((s*n+i)*n+a)*n;var n}}function ae(t,e,n){return[t[0]+(e[0]-t[0])*n,t[1]+(e[1]-t[1])*n]}function ie(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,a]=t,i=re(n,o,e),s=[n,r],l=[o,a],{left:u,right:c}=function(t,e,n,r,o){const a=ae(t,e,o),i=ae(e,n,o),s=ae(n,r,o),l=ae(a,i,o),u=ae(i,s,o),c=ae(l,u,o);return{left:[t,a,l,c],right:[c,u,s,r]}}([0,0],s,l,[1,1],i),f=u[3][0],d=u[3][1];let h,p;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 m=1-f,v=1-d;return m>1e-9&&Math.abs(v)>1e-9&&(p=[(c[1][0]-f)/m,(c[1][1]-d)/v,(c[2][0]-f)/m,(c[2][1]-d)/v]),{left:h,right:p}}function se(t){if(t)return[1-t[2],1-t[3],1-t[0],1-t[1]]}function le(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 ue(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),a=n?e[2]+e[2]:e.slice(4,6),i=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(a,16)/255];return null!==i&&s.push(parseInt(i,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 ce=new Set(["color","fill","flood-color","lighting-color","stop-color","stroke"]),fe=new Set(["translate","rotate","scale","skew"]),de=new Set(["offset-distance","offsetDistance"]);function he(t,e){var n;if(!t)return"";const r=null==(n=null==e?void 0:e.withUnits)||n,o=[],a=t.translate,i=t.origin,s=t.rotate,l=t.skew,u=t.scale,c=r?"px":"",f=r?"deg":"";return a&&o.push("translate("+a[0]+c+","+a[1]+c+")"),i&&o.push("translate("+i[0]+c+","+i[1]+c+")"),null!=s&&o.push("rotate("+s+f+")"),null!=l&&o.push("skewX("+l+f+")"),u&&o.push("scale("+u[0]+","+u[1]+")"),i&&o.push("translate("+-i[0]+c+","+-i[1]+c+")"),o.join("")}var pe=new Set(["offset-distance","offsetDistance"]),me=1e3;function ve(t){return t.includes("-")?t.replace(/-([a-z])/g,(t,e)=>e.toUpperCase()):t}function ge(t){return!t.includes("-")&&/[a-z][A-Z]/.test(t)}var ye=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 be(t){return ye.has(t)?t:t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}function ke(t,e,n){return Math.max(e,Math.min(t,n))}function Ae(t,e,n,r,o){if(o<=0)return[t[0],t[1]];if(o>=1)return[r[0],r[1]];const a=1-o,i=a*a,s=o*o,l=i*a,u=3*o*i,c=3*s*a,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 we=1e-4;function xe(t,e,n,r,o){const a=Pe(t,e,n,r,o);return 0===a[0]&&0===a[1]?Pe(t,e,n,r,o<.5?o+we:o-we):a}function Pe(t,e,n,r,o){const a=1-o,i=3*a*a,s=6*o*a,l=3*o*o;return[i*(e[0]-t[0])+s*(n[0]-e[0])+l*(r[0]-n[0]),i*(e[1]-t[1])+s*(n[1]-e[1])+l*(r[1]-n[1])]}function Se(t,e,n,r,o=100){const a=o+1,i=new Float64Array(a),s=new Float64Array(a);let l=Ae(t,e,n,r,0);i[0]=0,s[0]=0;let u=0;for(let c=1;c<a;c++){const a=c/o,f=Ae(t,e,n,r,a),d=f[0]-l[0],h=f[1]-l[1];u+=Math.sqrt(d*d+h*h),i[c]=a,s[c]=u,l=f}return{ts:i,ds:s}}function je(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 a=1,i=o;for(;a<i;){const t=a+i>>>1;n[t]<e?a=t+1:i=t}const s=n[i-1],l=n[i]-s,u=l>0?(e-s)/l:0;return r[i-1]+u*(r[i]-r[i-1])}var Oe=0;function Me(){return"_px_"+Date.now().toString(36)+(++Oe).toString(36)+Math.random().toString(36).substring(2,6)}function _e(t){if(null===t||"object"!=typeof t)return t;if(Array.isArray(t))return t.map(t=>_e(t));const e=t,n={};for(const t of Object.keys(e))n[t]=_e(e[t]);return n}function Ie(t){var e,n;const r=_e(t),o=new Map,a=new Set(["href","xlink:href"]),i=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=Me();o.set(t,n),e.id=n}else e.animate&&(e.id=Me());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(a.has(n)&&r.startsWith("#")){const t=r.slice(1),a=o.get(t);a&&(e[n]="#"+a)}else if(i.has(n))e[n]=ze(r,o);else if(s.has(n)){const t=r.startsWith("#"),a=o.get(t?r.slice(1):r);a&&(e[n]=t?"#"+a:a)}else r.includes("url(#")&&(e[n]=ze(r,o));else if("style"===n&&"object"==typeof r&&null!==r)for(const[t,e]of Object.entries(r))"string"==typeof e&&(r[t]=ze(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))t[null!=(n=o.get(e))?n:e]=r;r.animator=w(A({},r.animator),{animateById:t})}return r}function ze(t,e){return t.replace(/url\(#([^)]+)\)/g,(t,n)=>{const r=e.get(n);return r?"url(#"+r+")":t})}var Te=new Set(["script","foreignobject"]),Ne=new Set(["href","xlink:href","src","filter","clippath","mask","markerstart","markermid","markerend"]),Ee=new Set(["href","xlink:href","src"]),Ce=new Set(["mixBlendMode","isolation"]),Fe=/^data:image\/(?:png|jpe?g|gif|webp|bmp);base64,/i,Le=/^data:image\/svg\+xml(?:;[^,]*)?,/i,De=/^data:image\/[^;,]*;base64,([A-Za-z0-9+/]{8})/i,Re=["iVBORw0K","/9j/","R0lGOD","UklGR","Qk"];function Be(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(Ne.has(n)){const t=String(e);return t.startsWith("#")||/^url\(#[^)]+\)$/.test(t)||Ee.has(n)&&(Fe.test(t)||Le.test(t)||function(t){const e=De.exec(t);return!!e&&Re.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 Ue(t){const e={};for(const n of Object.keys(t)){const r=ve(n);if(et.has(r))continue;if("style"===r)continue;let o=t[n];if(ce.has(r)&&Array.isArray(o))e[r]=le(o);else if("transform"!==r||null===o||"object"!=typeof o||Array.isArray(o)||o.keyframes||o.kfs)fe.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=he(t,{withUnits:!1})}}return e}function Ve(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 We(t){var e,n;return null!=(n=null!=(e=t.time)?e:t.t)?n:0}function Ge(t){var e;return null!=(e=t.easing)?e:t.e}function Ke(t){var e,n,r;const o=null!=(e=t.keyframes)?e:t.kfs;if(!Array.isArray(o))return!1;if(t.autoOrient)return!0;for(const t of o)if((null!=(n=t.tangentIn)?n:t.ti)||(null!=(r=t.tangentOut)?r:t.to))return!0;return!1}var qe=new WeakMap;function Ze(t,e,n,r){var o,a;let i=qe.get(t);const s=null==i?void 0:i.get(e);if(s)return s;const l=null!=(o=t.tangentOut)?o:t.to,u=null!=(a=e.tangentIn)?a: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=Se(n,c,f,r),h={P0:n,P1:c,P2:f,P3:r,lut:d,totalArc:d.ds[d.ds.length-1]};return i||(i=new WeakMap,qe.set(t,i)),i.set(e,h),h}function Xe(t,e,n,r,o,a){const i=Ze(t,e,n,r),s=0===i.totalArc?o:function(t,e){const n=e*t.ds[t.ds.length-1],{ts:r,ds:o}=t,a=o.length-1;if(n<=0)return r[0];if(n>=o[a])return r[a];let i=1,s=a;for(;i<s;){const t=i+s>>>1;o[t]<n?i=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])}(i.lut,o),l=Ae(i.P0,i.P1,i.P2,i.P3,s);if(!a)return{translate:l};const u=xe(i.P0,i.P1,i.P2,i.P3,s);return{translate:l,rotateDeg:180*Math.atan2(u[1],u[0])/Math.PI}}var Ye=.5,Qe=5,He=32;function Je(t,e){var n,r,o,a;if(!Ke(t))return t;const i=null!=(n=t.keyframes)?n:t.kfs;if(!Array.isArray(i)||i.length<2)return t;const s=!!t.autoOrient,l=null!=(r=null==e?void 0:e.flatnessTolerance)?r:Ye,u=null!=(o=null==e?void 0:e.rotationTolerance)?o:Qe,c=null!=(a=null==e?void 0:e.maxSamplesPerSegment)?a:He,f=[],d=Ve(i[0]);if(!d)return t;const h=s?function(t,e){const n=Ve(t),r=Ve(e);if(!n||!r)return 0;const o=Ze(t,e,n,r),a=xe(o.P0,o.P1,o.P2,o.P3,0);return 180*Math.atan2(a[1],a[0])/Math.PI}(i[0],i[1]):void 0;f.push(tn(We(i[0]),rn(en(i[0]),en(i[0]),0,d,h,s)));for(let t=0;t<i.length-1;t++){const e=i[t],n=i[t+1],r=Ve(e),o=Ve(n);r&&o?(s&&t>0&&an(f,e,n,r,o,u),ln(f,e,n,r,o,s,l,u,c)):f.push(tn(We(n),rn(en(n),en(n),1,null!=o?o:[0,0],void 0,s)))}const p=Ge(i[i.length-1]);p&&(f[f.length-1].e=p),s&&$e(f);const m={kfs:f};return void 0!==t.loop&&(m.loop=t.loop),m}function $e(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 tn(t,e){return{t:t,v:e}}function en(t){var e;const n=null!=(e=t.value)?e:t.v;if(n&&"object"==typeof n&&!Array.isArray(n))return n}function nn(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 a="number"==typeof t[o]?t[o]:0,i="number"==typeof e[o]?e[o]:0;r[o]=a+(i-a)*n}return r}return n<.5?t:e}function rn(t,e,n,r,o,a){const i={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&&a)continue;const o=null==t?void 0:t[r],s=null==e?void 0:e[r];void 0===o&&void 0===s||(i[r]=nn(o,s,n))}return void 0!==o&&(i.rotate=o+on(t,e,n)),i}function on(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 a=nn(r,o,n);return"number"==typeof a?a:0}function an(t,e,n,r,o,a){var i;const s=t[t.length-1],l=null!=(i=s.v)?i:s.value,u=null==l?void 0:l.rotate;if("number"!=typeof u)return;const c=en(e),f=u-on(c,c,0),d=Ze(e,n,r,o),h=xe(d.P0,d.P1,d.P2,d.P3,0),p=180*Math.atan2(h[1],h[0])/Math.PI,m=function(t,e){let n=t-e;for(;n>180;)n-=360;for(;n<-180;)n+=360;return n}(p,f);if(Math.abs(m)<=a)return;const v=We(e),g=Math.min(v+sn,(v+We(n))/2),y=rn(en(e),en(e),0,r,p,!0);t.push(tn(g,y))}var sn=.05;function ln(t,e,n,r,o,a,i,s,l){const u=Ze(e,n,r,o),c=We(e),f=We(n),d=Ge(e),h=(p=d)?oe([p[1],p[0],p[3],p[2]]):t=>t;var p;const m=en(e),v=en(n),g=function(t,e,n,r,o){const a=[];un(t.P0[0],t.P1[0],t.P2[0],t.P3[0],a),un(t.P0[1],t.P1[1],t.P2[1],t.P3[1],a),a.sort((t,e)=>t-e);const i=[0];for(const t of a)t>i[i.length-1]+1e-6&&t<.999999&&i.push(t);i.push(1);const s=[],l={remaining:o-i.length};for(let o=0;o<i.length-1;o++)cn(i[o],i[o+1],s,t,e,n,r,l);return s}(u,a,i,s,l),y=[];for(const t of g){const e=je(u.lut,t),n=ke(u.totalArc>0?e/u.totalArc:t,0,1),r={u:ke(h(n),0,1),p:n,pos:Ae(u.P0,u.P1,u.P2,u.P3,t)};if(a){const e=xe(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?ke((n.u-k)/(1-k),0,1):1,{left:o,right:i}=ie(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=rn(m,v,n.p,n.pos,n.rotateDeg,a);t.push(tn(l,u)),b=i,k=n.u}}function un(t,e,n,r,o){const a=e-t,i=n-e,s=a-2*i+(r-n),l=2*(i-a),u=a;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 cn(t,e,n,r,o,a,i,s){const l=(t+e)/2,u=Ae(r.P0,r.P1,r.P2,r.P3,t),c=Ae(r.P0,r.P1,r.P2,r.P3,e),f=e-t,d=Ae(r.P0,r.P1,r.P2,r.P3,t+.25*f),h=Ae(r.P0,r.P1,r.P2,r.P3,l),p=Ae(r.P0,r.P1,r.P2,r.P3,t+.75*f),m=Math.max(fn(d,u,c),fn(h,u,c),fn(p,u,c));let v=!0;if(o){const n=xe(r.P0,r.P1,r.P2,r.P3,t),o=xe(r.P0,r.P1,r.P2,r.P3,e),a=180*Math.atan2(n[1],n[0])/Math.PI,s=180*Math.atan2(o[1],o[0])/Math.PI;let l=Math.abs(a-s);l>180&&(l=360-l),l>i&&(v=!1)}m<=a&&v||s.remaining<=0||f<1e-6?n.push(e):(s.remaining-=1,cn(t,l,n,r,o,a,i,s),cn(l,e,n,r,o,a,i,s))}function fn(t,e,n){const r=n[0]-e[0],o=n[1]-e[1],a=r*r+o*o;if(a<1e-20){const n=t[0]-e[0],r=t[1]-e[1];return Math.sqrt(n*n+r*r)}const i=(t[0]-e[0])*o-(t[1]-e[1])*r;return Math.abs(i)/Math.sqrt(a)}function dn(t,e){const n=hn(t,e);return null!=n?n:t}function hn(t,e){let n,r;if(t.children)for(let r=0;r<t.children.length;r++){const o=hn(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&&Ke(n)){const o=Je(n,e);o!==n&&(r=w(A({},t),{transform:o}))}}if(!n&&!r)return null;const a=A({},t);return n&&(a.children=n),r&&(a.animate=r),a}var pn=1;function mn(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=>mn(t[n],e[n]))}function vn(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,a=o[3]||0,i=o[4]||0,s=o[5]||0;n.o[n.o.length-1]=[t,e],n.v.push([i,s]),n.i.push([r,a]),n.o.push([i,s])}else"Z"===r||"z"===r?n.c=!0:console.warn('Unsupported path command "'+r+'"')}return e}function gn(t){return t.startsWith("path(")&&t.endsWith(")")?t.slice(5,-1):/^[MmZzLlHhVvCcSsQqTtAa]/.test(t)?t:void 0}function yn(t){return"string"==typeof t&&void 0!==gn(t)}function bn(t){if(t&&"object"==typeof t&&"string"==typeof t.path){const e=gn(t.path);return e?{paths:vn(e)}:t}if(t&&"object"==typeof t&&"paths"in t){const e=t.paths;if(Array.isArray(e)&&e.length>0&&yn(e[0])){const t=[];for(const n of e){const e=gn(n);e&&t.push(...vn(e))}return{paths:t}}return t}if(Array.isArray(t)){if(t.length>0&&yn(t[0])){const e=[];for(const n of t){const t=gn(n);t&&e.push(...vn(t))}return{paths:e}}return{paths:t}}return yn(t)?{paths:vn(gn(t))}:t}function kn(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 An(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 wn(t,e,n,r){var o,a;return"d"===t?{paths:ee(null!=(o=null==e?void 0:e.paths)?o:Array.isArray(e)?e:[],null!=(a=null==n?void 0:n.paths)?a:Array.isArray(n)?n:[],r)}:ce.has(t)?te(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?Jt(e,n,r):fe.has(t)||"stroke-dasharray"===t||"strokeDasharray"===t?$t(e||[],n||[],r):Jt(+(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 a of r){const r=null==t?void 0:t[a],i=null==e?void 0:e[a];if("rotate"===a||"skew"===a)o[a]=Jt(+(null!=r?r:0),+(null!=i?i:0),n);else if("translate"===a||"scale"===a||"origin"===a){const t="scale"===a?[1,1]:[0,0];o[a]=$t(r||t,i||t,n)}else o[a]=null!=i?i:r}return o}(e,n,r)}function xn(t,e,n,r){var o,a,i,s,l;const u=e.length-1,c=ke(null!=(o=n.segmentCount)?o:u,1,u);let f;f=n.extend===Y.before?e.slice(0,c+1):e.slice(u-c);const d=null!=(a=e[0].t)?a:0,h=null!=(i=e[e.length-1].t)?i:0;let p,m;n.extend===Y.before?(p=0,m=d):(p=h,m=r);const v=m-p;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,P=x/y,S=[],j=n.extend!==Y.before,O=e[e.length-1];let M,_=!1;function I(e,n,r){var o;let a;if(n){a=[];for(let t=b.length-1;t>=0;t--)a.push({relT:1-b[t].relT,v:b[t].v,e:t>0?se(b[t-1].e):void 0,tangentIn:b[t].tangentOut,tangentOut:b[t].tangentIn})}else a=b;const i=void 0!==r?r:1;for(let n=0;n<a.length;n++){const r=a[n];if(r.relT>i+1e-9){const o=a[n-1],s=r.relT-o.relT,l=(i-o.relT)/s,u=o.e?oe(o.e)(l):l,c=wn(t,o.v,r.v,u),{left:f}=ie(o.e,l);return S.length>0&&o.relT<=i&&(S[S.length-1].e=f),void S.push({t:e+i*y,v:c,e:void 0})}const s=S.length>0?S[S.length-1]:O,l=j&&0===n&&void 0!==s&&Math.abs((null!=(o=s.t)?o:0)-(e+r.relT*y))<1e-9;if(l){if(mn(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 u={t:e+r.relT*y+(l?pn:0),v:r.v,e:n<a.length-1?r.e:void 0};r.tangentIn&&(u.tangentIn=r.tangentIn),r.tangentOut&&(u.tangentOut=r.tangentOut),S.push(u)}}if(n.extend===Y.before){P>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?se(b[t-1].e):void 0,tangentIn:b[t].tangentOut,tangentOut:b[t].tangentIn})}else o=b;const a=1-r;for(let n=0;n<o.length;n++){const r=o[n];if(r.relT<a-1e-9)continue;const i=o[n-1];if(i&&i.relT<a-1e-9&&r.relT>a+1e-9){const n=r.relT-i.relT,o=(a-i.relT)/n,s=i.e?oe(i.e)(o):o,l=wn(t,i.v,r.v,s),{right:u}=ie(i.e,o);S.push({t:e,v:l,e:u})}const s={t:e+(r.relT-a)*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),S.push(s)}}(p,!!n.alternate&&k%2==0,P);for(let t=0;t<k;t++){const e=k-1-t,r=!!n.alternate&&e%2==0;I(p+x+t*y,r)}}else{for(let t=0;t<k;t++){const e=!!n.alternate&&t%2==0;I(p+t*y,e)}if(P>1e-9){const t=!!n.alternate&&k%2==0;I(p+k*y,t,P)}}return n.extend===Y.before?[...S,...e]:_&&e.length>0?[...e.slice(0,-1),w(A({},e[e.length-1]),{e:M}),...S]:[...e,...S]}function Pn(t,e,n,r){var o,a,i,s,l,u,c;const f=e.keyframes||e.kfs||[],d=[];for(const e of f){const n=null!=(a=null!=(o=e.time)?o:e.t)?a:0;let f=null!=(i=e.value)?i:e.v;const h=null!=(s=e.easing)?s:e.e;"d"===t&&(f=bn(f));const p=ge(t)?be(t):t;ce.has(p)&&(f=null!=(l=ue(f))?l:f);const m={t:n,v:f,e:kn(h,r)},v=null!=(u=e.tangentIn)?u:e.ti,g=null!=(c=e.tangentOut)?c:e.to;v&&(m.tangentIn=v),g&&(m.tangentOut=g),d.push(m)}d.sort((t,e)=>{var n,r;return(null!=(n=t.t)?n:0)-(null!=(r=e.t)?r:0)});const h=e.loop,p=!0===h?{}:h||void 0;return p&&d.length>=2?xn(t,d,p,n):d}function Sn(t,e,n){var r;const o=e.loop;if(null==o||!1===o)return e;const a=!0===o?{}:o,i=null!=(r=e.keyframes)?r:e.kfs;if(!Array.isArray(i)||i.length<2)return e;const s=ge(t)?be(t):t,l=ce.has(s),u=i.map(e=>{var n,r,o,a,i,s,u,c;const f=null!=(n=e.t)?n:e.time;let d=null!=(r=e.v)?r:e.value;"d"===t&&(d=bn(d)),l&&(d=null!=(o=ue(d))?o:d);const h={t:f,v:d,e:null!=(a=e.e)?a:e.easing};return(null!=(i=e.tangentIn)?i:e.ti)&&(h.tangentIn=null!=(s=e.tangentIn)?s:e.ti),(null!=(u=e.tangentOut)?u:e.to)&&(h.tangentOut=null!=(c=e.tangentOut)?c:e.to),h}),c={kfs:xn(t,u,a,n)};return void 0!==e.autoOrient&&(c.autoOrient=e.autoOrient),c}function jn(t,e){const n=On(t,e);return null!=n?n:t}function On(t,e){let n,r;if(t.children)for(let r=0;r<t.children.length;r++){const o=On(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],a=Sn(n,o,e);a!==o&&(r||(r=A({},t)),r[n]=a)}}if(!n&&!r)return null;const a=A({},t);return n&&(a.children=n),r&&(a.animate=r),a}var Mn=0;function _n(t,e=X.waapi){const n=st(t)||{},r=lt(t),o=n.duration||1e3,a=[],i=(t,n)=>{if(!n)return null;const a=function(t,e){if(!t)return[];const n=[];if("string"==typeof t){const r=An(t,e);r&&n.push(r)}else if(Array.isArray(t))for(const r of t){const t=An(r,e);t&&n.push(t)}else n.push(t);return n}(n,r);if(0===a.length)return null;const i=function(t,e,n,r=X.waapi){const o={};for(const[a,i]of Object.entries(t)){if("transform"===a&&"offsetPath"===i.alongPathMode&&void 0!==t.offsetDistance)continue;const s=Pn(a,i,e,n);if(s.length>0){const t={kfs:s};void 0!==i.autoOrient&&(t.autoOrient=i.autoOrient),void 0!==i.loop&&(t.loop=i.loop),o[a]=r===X.waapi&&"transform"===a?Je(t):t}}return o}(function(t){const e={};for(const n of t)for(const[t,r]of Object.entries(n))e[t]=r;return e}(a),o,r,e);return 0===Object.keys(i).length?null:{id:t,animate:i}},s=ut(t);if(s)for(const t of s){const e=i(t.id,t.animate);e&&a.push(e)}const l=t=>{const e=t.animate;if(e&&Object.keys(e).length>0){const n=t.id||"_px_el_"+ ++Mn;t.id=n;const r=i(n,e);r&&a.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 a}function In(t,e,n){var r,o,a,i,s,l,u;const c=e.kfs||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 a=t[0],i=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){a=t[s],i=t[s+1];break}e>u&&s===o-1&&(a=t[o>0?o-1:0],i=t[o])}return{prevKf:a,nextKf:i}}(c,n);let h=f===d?0:(p=n,m=null!=(r=f.t)?r:0,(v=null!=(o=d.t)?o:0)===m?0:0+(p-m)/(v-m)*1);var p,m,v;h=ke(h,0,1);const g=null!=(a=f.e)?a:f.easing;if(g&&Array.isArray(g))try{h=oe(g)(h)}catch(t){}let y=ge(t)?be(t):t,b=null;const k=null!=(i=null==f?void 0:f.v)?i: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=ee(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=>Ht(t)).join("");else if(ce.has(y))b=le(te(k||[0,0,0,1],A||[0,0,0,1],h)),y=t;else if("stroke-dasharray"===y)b=$t(k||[],A||[],h).join(" "),y=t;else if("transform"!==y||null===k||"object"!=typeof k||Array.isArray(k))"translate"===y?(b="translate("+$t(k||[0,0],A||[0,0],h).join(",")+")",y="transform"):"rotate"===y?(b="rotate("+Jt(+(k||0),+(A||0),h)+")",y="transform"):"scale"===y?(b="scale("+$t(k||[1,1],A||[1,1],h).join(",")+")",y="transform"):b=Jt(+(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]=Jt(+(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],a=$t(t||o,r||o,h);n[e]=a}}if(Ke(e)){const t=k.translate,r=A.translate;if(Array.isArray(t)&&Array.isArray(r)){const o=Xe(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=he(n,{withUnits:!1}),y="transform"}return de.has(y)&&"number"==typeof b&&(b=100*b+"%"),{k:y,v:null===b?"":""+b}}function zn(t,e){const n={};for(const[r,o]of Object.entries(t)){const t=In(r,o,e);t&&(n[t.k]=t.v)}return n}function Tn(t){if(null===t||"object"!=typeof t)return t;if(Array.isArray(t))return t.map(Tn);const e={};for(const n of Object.keys(t))e[n]=Tn(t[n]);return e}function Nn(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}),a=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(a)};return a(t),n}function En(t){const e="number"==typeof t?t:"string"==typeof t?parseFloat(t):NaN;return Number.isFinite(e)?e:0}function Cn(t){var e;const n=En(t.x),r=En(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 Fn(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 a=n.get(t);if(void 0!==a)return a;if(r.has(t))return!1;r.add(t);let i=!1;if(t.animate&&"object"==typeof t.animate&&!Array.isArray(t.animate))for(const e in t.animate){i=!0;break}if(!i&&t.children)for(const e of t.children)if(o(e,r)){i=!0;break}if(!i&&"use"===t.type&&"string"==typeof t.href){const n=Dn(t.href),a=n?e.get(n):void 0;a&&(i=o(a,r))}return r.delete(t),n.set(t,i),i};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 a=function(t){const e=Rn(t.viewBox);if(e)return[e[2],e[3]];const n=Ln(t.width),r=Ln(t.height);return void 0!==n&&void 0!==r?[n,r]:[1,1]}(t),i=[],s=Bn(t,n,r,()=>"_lw_use_mat_"+ ++o,i,a);if(0===i.length)return s;const l={type:"defs",children:i},u=[...null!=(e=s.children)?e:[],l];return w(A({},s),{children:u})}function Ln(t){if("number"==typeof t)return t;if("string"==typeof t){const e=parseFloat(t);return Number.isFinite(e)?e:void 0}}function Dn(t){if("string"==typeof t)return t.startsWith("#")?t.slice(1):t}function Rn(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 Bn(t,e,n,r,o,a){if("use"===t.type&&"string"==typeof t.href){const i=Dn(t.href);if(i&&n.has(i)){const s=e.get(i);if(s)return function(t,e,n,r,o,a,i){var s,l,u,c;const f=Tn(e);Nn(f,o);const d="symbol"===f.type?Rn(f.viewBox):void 0,h=null!=(l=null!=(s=Ln(t.width))?s:null==d?void 0:d[2])?l:i[0],p=null!=(c=null!=(u=Ln(t.height))?u:null==d?void 0:d[3])?c:i[1],m="symbol"===f.type?function(t,e,n,r,o){const a=Rn(t.viewBox),i=w(A({},t),{type:"g"});if(delete i.viewBox,delete i.preserveAspectRatio,delete i.width,delete i.height,!a)return i;const[s,l,u,c]=a,f=u>0&&c>0?Math.min(r/u,o/c):1,d=(r-u*f)/2,h=(o-c*f)/2,p=[];0===d&&0===h||p.push("translate("+d+","+h+")"),1!==f&&p.push("scale("+f+")"),0===s&&0===l||p.push("translate("+-s+","+-l+")"),p.length&&(i.transform=p.join(""));const m=e();return n.push({type:"clipPath",id:m,children:[{type:"rect",x:s,y:l,width:u,height:c}]}),i.clipPath="url(#"+m+")",i}(f,o,a,h,p):f,v=Bn(m,n,r,o,a,i),g=w(A({},t),{type:"g",children:[v]});return delete g.href,delete g.width,delete g.height,Cn(g)}(t,s,e,n,r,o,a)}}if(!t.children)return t;let i=!1;const s=t.children.map(t=>{const s=Bn(t,e,n,r,o,a);return s!==t&&(i=!0),s});return i?w(A({},t),{children:s}):t}function Un(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 Vn(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,a=null!=(e=o.keyframes)?e:o.kfs;if(a){const t={kind:"animated",keyframes:a.map(Gn),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 i=null!=(r=o.value)?r:o.v;if(void 0!==i)return{kind:"static",value:i}}return{kind:"static",value:t}}function Wn(t,e,n,r){var o,a,i,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!=(a=n.base)?a:null==(o=n.keyframes[0])?void 0:o.value)?s:null==(i=n.keyframes[0])?void 0:i.v;void 0!==d&&(t[e]=l(d))}function Gn(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 Kn(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 qn(t,e,n){if(!e)return t;delete t.transform;let r=t;return r=Xn(r,e.origin,!0),r=Zn(r,"scale",e.scale),r=Zn(r,"skew",e.skew),r=Zn(r,"rotate",e.rotate),r=Xn(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=Xn(r,e.origin,!0),r=Zn(r,"translate",e.translate),r=Xn(r,e.origin,!1)):r=Zn(r,"translate",e.translate),r!==t&&t.id&&(r.id=t.id,delete t.id),r}function Zn(t,e,n,r){if(void 0===n)return t;const o=Vn(n);if("static"===o.kind)return{type:"g",transform:{value:Un(e,o.value,void 0)},children:[t]};if("animated"===o.kind){const n={keyframes:o.keyframes.map(t=>Kn(t,Un(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 Xn(t,e,n){if(void 0===e)return t;const r=Vn(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=>Kn(t,{translate:o(t.value)}))};return void 0!==r.loop&&(e.loop=r.loop),{type:"g",animate:{transform:e},children:[t]}}return t}function Yn(t,e){return"_lw_"+e+"_"+t.nextId++}function Qn(t){return"string"==typeof t?t.replace(/^#/,""):void 0}function Hn(t,e){var n;"string"==typeof t.id&&e.set(t.id,t),null==(n=t.children)||n.forEach(t=>Hn(t,e))}var Jn=Tn;function $n(t,e,n){var r,o,a;if("use"===t.type&&"content"===(null==(o=null==(r=t.effects)?void 0:r.clone)?void 0:o.type)){const r=Qn(t.effects.clone.sourceId);"string"==typeof r&&r&&!e.contentRefInnerIds.has(r)&&e.contentRefInnerIds.set(r,n(r))}null==(a=t.children)||a.forEach(t=>$n(t,e,n))}function tr(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 er(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=Yn(n,"grad"),a=function(t,e){const n={type:t.type===at.radial?"radialGradient":"linearGradient",id:e};return t.type===at.linear?(rr(n,"x1","y1",t.p1),rr(n,"x2","y2",t.p2)):(rr(n,"cx","cy",t.c),function(t,e,n){const r=Vn(n);"absent"!==r.kind&&Wn(t,"r",r,{asString:!0})}(n,0,t.r),rr(n,"fx","fy",t.fp)),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 a=Vn(t);if("absent"===a.kind)return[];if("static"===a.kind)return Array.isArray(a.value)?a.value.map(or):[];const i=a.keyframes;if(!i.length)return[];const s=a.loop;let l=0;for(const t of i){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=i[0].value)?n:i[0].v,c=[];for(let t=0;t<l;t++){const e=null!=(o=null!=(r=null==u?void 0:u[t])?r:ar(i,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 a,i,s,l,u;const c=[],f=[];let d=!1;for(const r of e){const o=null!=(i=null!=(a=r.time)?a:r.t)?i:0,h=null!=(s=r.value)?s:r.v,p=null!=(l=null==h?void 0:h[n])?l:ar(e,e.indexOf(r),n);if(!p)continue;const m=null!=(u=r.easing)?u:r.e,v={time:o,value:p.color};void 0!==m&&(v.easing=m),c.push(v);const g={time:o,value:p.offset};void 0!==m&&(g.easing=m),f.push(g),p.offset!==t.offset&&(d=!0)}const h={type:"stop",offset:ir(t.offset),stopColor:t.color},p={};return c.length&&(p.stopColor={keyframes:c},void 0!==o&&(p.stopColor.loop=o)),d&&f.length&&(p.offset={keyframes:f},void 0!==o&&(p.offset.loop=o)),Object.keys(p).length&&(h.animate=p),h}(t,i,e,0,s))}(t.stops),n}(e,o);return n.defs.push(a),t[r]="url(#"+o+")",t}function rr(t,e,n,r){var o,a,i;const s=Vn(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!=(i=s.base)?i:null==(a=s.keyframes[0])?void 0:a.value;Array.isArray(c)&&(t[e]=String(c[0]),t[n]=String(c[1]))}function or(t){return{type:"stop",offset:ir(t.offset),stopColor:t.color}}function ar(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 ir(t){return Math.round(1e3*t)/10+"%"}function sr(t){return"string"==typeof t?t:t&&"object"==typeof t&&"string"==typeof t.path?t.path:void 0}function lr(t,e,n){if(!e)return t;const r=function(t,e){var n;const r=Vn(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=ur(o,"translate",e.translate,void 0),o=ur(o,"rotate",e.rotate,r),o=ur(o,"scale",e.scale,r),o}function ur(t,e,n,r,o){if(void 0===n)return t;const a=Vn("scale"===e&&Array.isArray(n)?[n[0]/100,n[1]/100]:n);if("static"===a.kind)return{type:"g",transform:{value:Un(e,cr(e,a.value),r)},children:[t]};if("animated"===a.kind){const n={keyframes:a.keyframes.map(t=>{const n=Kn(t,Un(e,cr(e,t.value),r));return"translate"===e?A(A({},n),fr(t)):n})};return void 0!==a.loop&&(n.loop=a.loop),{type:"g",animate:{transform:n},children:[t]}}return t}function cr(t,e){return"translate"===t?[-e[0],-e[1]]:"rotate"===t?-e:[1/e[0],1/e[1]]}function fr(t){var e,n;const r={},o=null!=(e=t.tangentOut)?e:t.to,a=null!=(n=t.tangentIn)?n:t.ti;return Array.isArray(o)&&(r.tangentOut=[-o[0],-o[1]]),Array.isArray(a)&&(r.tangentIn=[-a[0],-a[1]]),r}function dr(t){const e=t.animate&&"object"==typeof t.animate&&!Array.isArray(t.animate)?t.animate:void 0;return!(!e||!e.transform)}function hr(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=mr(o.translateKeyframes,e);n+=t[0],r+=t[1]}else o.translate&&(n+=o.translate[0],r+=o.translate[1]);return[n,r]}function mr(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],a=(e-r.time)/(o.time-r.time);return[r.value[0]+(o.value[0]-r.value[0])*a,r.value[1]+(o.value[1]-r.value[1])*a]}return t[t.length-1].value}function vr(t,e){var n,r,o;const a=t.transform,i=t.animate&&"object"==typeof t.animate&&!Array.isArray(t.animate)?t.animate.transform:void 0;if(void 0===a&&!i)return;const s={};if("string"==typeof a){const t=function(t,e){const n=/([a-zA-Z]+)\s*\(([^)]*)\)/g;let r,o=0,a=0,i=!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,a+=e[1]||0,i=!0):s=!0}return s&&e.warnings.push("maskedBy ancestor: non-translate transform in string ignored: "+t),i?[o,a]:void 0}(a,e);t&&(s.translate=t)}else if(a&&"object"==typeof a&&!a.keyframes&&!a.kfs){const t=a.value,n=t&&"object"==typeof t?t:a;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(i&&Array.isArray(i.keyframes)){const t=i.keyframes,a=[];for(const i of t){const t=null!=(n=i.value)?n:i.v,s=null!=(o=null!=(r=i.time)?r:i.t)?o:0;t&&"object"==typeof t&&Array.isArray(t.translate)&&(a.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"))}a.length&&(s.translateKeyframes=a)}return s.translate||s.translateKeyframes?s:void 0}var gr="content";function yr(t,e,n){if(!e)return;const r=Qn(e.sourceId);if(!r)return void(e.type===gr&&n.errors.push("clone: content ref missing sourceId"));const o=e.type===gr&&n.contentRefInnerIds.get(r)||r;t.href="#"+o}function br(t,e){const n={};return void 0!==t.translate&&(n.translate=kr(t.translate,t=>[t[0]*e,t[1]*e])),void 0!==t.rotate&&(n.rotate=kr(t.rotate,t=>t*e)),void 0!==t.skew&&(n.skew=kr(t.skew,t=>t*e)),void 0!==t.scale&&(n.scale=function(t,e){return kr(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 kr(t,e,n=!1){const r=Vn(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 Ar=!1;function wr(t){var e,n;return{start:null!=(e=t.start)?e:0,stretch:null!=(n=t.stretch)?n:1}}var xr=1;function Pr(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 a=o<=r?[{time:0,value:0}]:[...r>0?[{time:Math.max(0,r-xr),value:0}]:[],{time:Math.max(0,r),value:1},{time:o,value:1},{time:o+xr,value:0}],i=A({},t);for(const e of Object.keys(t))delete t[e];t.type="g",t.children=[i],t.animate={opacity:{keyframes:a}}}function Sr(t,e){return{start:e.start+e.stretch*t.start,stretch:e.stretch*t.stretch}}function jr(t){var e,n;return null==(n=null==(e=t.effects)?void 0:e.clone)?void 0:n.retime}function Or(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 Mr(t,e,n){const r=Qn(t.href);if(!r)return void n.errors.push("retime: <use> has no href to follow");const o=_r(r,e,n,new Set);if(o)if(Ar){const e=n.idMap.get(o);t.type="g",delete t.href,t.children=[e],Cn(t),n.defs=n.defs.filter(t=>t!==e)}else t.href="#"+o}function _r(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 a=Jn(o);if(function(t,e){Nn(t,()=>Yn(e,"retimed"))}(a,n),"use"===o.type?zr(a,e.start,e.stretch):Ir(a,e.start,e.stretch),Or(a),"use"===o.type&&o.href){const i=Qn(o.href);if(i){const s=jr(o),l=s?Sr(wr(s),e):e,u=new Set(r);u.add(t);const c=_r(i,l,n,u);c&&(a.href="#"+c)}}else!function(t,e,n,r,o){const a=t=>{var i;const s=jr(t);if("use"===t.type&&s&&t.href){const a=Qn(t.href);if(a){const i=Sr(wr(s),e),l=new Set(r);l.add(o);const u=_r(a,i,n,l);u&&(t.href="#"+u)}Or(t)}null==(i=t.children)||i.forEach(a)};a(t)}(a,e,n,r,t);return n.defs.push(a),"string"==typeof a.id&&n.idMap.set(a.id,a),"string"==typeof a.id?a.id:void 0}function Ir(t,e,n){var r;zr(t,e,n),null==(r=t.children)||r.forEach(t=>Ir(t,e,n))}function zr(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 Tr=48,Nr=/[MmLlHhVvCcSsQqTtAaZz]/;function Er(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 Cr(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,a=0,i=0,s=0,l=0,u=0,c=0,f=0,d="";const h=()=>parseFloat(e[r++]),p=(t,e,r)=>{const i=[o,a],s=Se(i,t,e,r,Tr);n.push({P0:i,P1:t,P2:e,P3:r,lut:s,len:s.ds[s.ds.length-1]}),o=r[0],a=r[1]},m=(t,e)=>{p([o+(t-o)/3,a+(e-a)/3],[o+2*(t-o)/3,a+2*(e-a)/3],[t,e])};for(;r<e.length;){let t=e[r];Nr.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?a:0);o=e,a=r,i=e,s=r,d=t;continue}if("L"===v)m(h()+(n?o:0),h()+(n?a:0));else if("H"===v)m(h()+(n?o:0),a);else if("V"===v)m(o,h()+(n?a:0));else if("C"===v){const t=[h()+(n?o:0),h()+(n?a:0)],e=[h()+(n?o:0),h()+(n?a:0)],r=[h()+(n?o:0),h()+(n?a:0)];l=e[0],u=e[1],p(t,e,r)}else if("S"===v){const t="C"===d.toUpperCase()||"S"===d.toUpperCase()?[2*o-l,2*a-u]:[o,a],e=[h()+(n?o:0),h()+(n?a:0)],r=[h()+(n?o:0),h()+(n?a:0)];l=e[0],u=e[1],p(t,e,r)}else if("Q"===v){const t=[h()+(n?o:0),h()+(n?a:0)],e=[h()+(n?o:0),h()+(n?a:0)];c=t[0],f=t[1];const{P1:r,P2:i}=Er([o,a],t,e);p(r,i,e)}else if("T"===v){const t="Q"===d.toUpperCase()||"T"===d.toUpperCase()?[2*o-c,2*a-f]:[o,a],e=[h()+(n?o:0),h()+(n?a:0)];c=t[0],f=t[1];const{P1:r,P2:i}=Er([o,a],t,e);p(r,i,e)}else{if("A"!==v){r++;continue}r+=5,m(h()+(n?o:0),h()+(n?a:0))}d=t}else m(i,s),o=i,a=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,a=e[e.length-1].P3,i=Math.hypot(a[0]-o[0],a[1]-o[1])<.001,s=t=>{let r=0;for(;r<e.length-1&&t>n[r+1];)r++;const o=e[r],a=t-n[r],i=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 a=1,i=o;for(;a<i;){const t=a+i>>>1;r[t]<e?a=t+1:i=t}const s=r[i-1],l=r[i]-s,u=l>0?(e-s)/l:0;return n[i-1]+u*(n[i]-n[i-1])}(o.lut,a):0,[s,l]=Ae(o.P0,o.P1,o.P2,o.P3,i),[u,c]=xe(o.P0,o.P1,o.P2,o.P3,i);return{x:s,y:l,angle:Math.atan2(c,u)}};return{totalLength:r,closed:i,sampleAtDistance(t){if(i&&r>0&&(t<0||t>r))return s((t%r+r)%r);if(!i&&(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 Fr=.15;function Lr(t){const e=Vn(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 Dr(t){let e=0,n=16;const r=t=>{var o,a;const i=parseFloat(String(null!=(o=t.fontSize)?o:""))||0;i&&(n=Math.max(n,i));const s=null!=(a=t.text)?a: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 Rr=t=>Math.round(1e3*t)/1e3;function Br(t,e){if(!e||null==t)return t;const n=Vn(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 Ur(t,e){var n;if("clip"===e.pathOverflow)return{d:t,startShift:0};const r=Cr(t);if(!r||r.closed||r.totalLength<=0)return{d:t,startShift:0};const o=r.totalLength,a=Fr*o,i=Lr(e.startOffset),s=Lr(e.textLength).max||(null!=(n=e.advance)?n:0),l=Math.max(0,-i.min),u=Math.max(0,i.max+s-o),c=l>0?l+a:0,f=u>0?u+a:0;if(f<=0&&c<=0)return{d:t,startShift:0};const d=r.sampleAtDistance(0),h=r.sampleAtDistance(o);let p=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.]+/,"");p="M"+Rr(e)+","+Rr(n)+"L"+Rr(d.x)+","+Rr(d.y)+r}if(f>0){const t=h.x+Math.cos(h.angle)*f,e=h.y+Math.sin(h.angle)*f;p+="L"+Rr(t)+","+Rr(e)}return{d:p,startShift:c}}function Vr(t,e,n){null!=n&&Wn(t,e,Vn(n),{asString:!0})}var Wr=(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 Gr(t,e){return Math.round(t)===t?""+Math.round(t):t.toFixed(e)}function Kr(t,e){let n="";for(let r=0;r<t.length;r++){const o=Gr(t[r],e);r>0&&45!==o.charCodeAt(0)&&(n+=" "),n+=o}return n}function qr(t,e,n){return[t[0]*e+t[2]*n+t[4],t[1]*e+t[3]*n+t[5]]}var Zr=/([MLCQZ])|(-?\d*\.?\d+(?:e[-+]?\d+)?)/gi;function Xr(t,e,n=2){const r=[];let o;for(Zr.lastIndex=0;null!==(o=Zr.exec(t));)r.push(o[0]);let a="",i=0;const s=()=>parseFloat(r[i++]);for(;i<r.length;){const t=r[i++];if("M"===t||"L"===t){const[r,o]=qr(e,s(),s());a+=t+Kr([r,o],n)}else if("C"===t){const[t,r]=qr(e,s(),s()),[o,i]=qr(e,s(),s()),[l,u]=qr(e,s(),s());a+="C"+Kr([t,r,o,i,l,u],n)}else if("Q"===t){const[t,r]=qr(e,s(),s()),[o,i]=qr(e,s(),s());a+="Q"+Kr([t,r,o,i],n)}else"Z"!==t&&"z"!==t||(a+="Z")}return a}var Yr=16,Qr=["fontFamily","fontSize","fontWeight","fontStyle","textAnchor","letterSpacing","wordSpacing","textDecoration","textTransform","whiteSpace","x","y","dx","dy","lengthAdjust","fill","stroke","strokeWidth","effects",$,tt,"xml:space"];function Hr(t){if("number"==typeof t)return t;if("string"==typeof t){const e=parseFloat(t);return isNaN(e)?void 0:e}}function Jr(t){return"string"==typeof t?t:void 0}function $r(t,e){var n,r,o,a,i,s,l;return{fontFamily:null!=(n=Jr(t.fontFamily))?n:e.fontFamily,fontSize:null!=(r=Hr(t.fontSize))?r:e.fontSize,fill:null!=(o=t.fill)?o:e.fill,stroke:null!=(a=t.stroke)?a:e.stroke,strokeWidth:null!=(i=t.strokeWidth)?i:e.strokeWidth,letterSpacing:null!=(s=Hr(t.letterSpacing))?s:e.letterSpacing,wordSpacing:null!=(l=Hr(t.wordSpacing))?l:e.wordSpacing}}function to(t){var e,n,r;return{fontFamily:Jr(t.fontFamily),fontSize:null!=(e=Hr(t.fontSize))?e:Yr,fill:t.fill,stroke:t.stroke,strokeWidth:t.strokeWidth,letterSpacing:null!=(n=Hr(t.letterSpacing))?n:0,wordSpacing:null!=(r=Hr(t.wordSpacing))?r:0}}function eo(t){const e={};return void 0!==t.fill&&(e.fill=t.fill),void 0!==t.stroke&&(e.stroke=t.stroke),void 0!==t.strokeWidth&&(e.strokeWidth=t.strokeWidth),e}function no(t,e,n,r){var o;const a=t.fontFamily?e[t.fontFamily]:n;return a||null==r||r.push('textGlyphs: no glyphs for font "'+(null!=(o=t.fontFamily)?o:"")+'"'),a}function ro(t){const e=Object.keys(t);return 1===e.length?t[e[0]]:void 0}var oo=.6;function ao(t,e){if(t<=0||e<=0)return"";const n=.08*t,r=.92*t,o=.92*-e,a=r-n,i=-o,s=Math.max(1,.12*Math.min(a,i)),l="M"+n+" 0L"+r+" 0L"+r+" "+o+"L"+n+" "+o+"Z";if(a<=2*s||i<=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 io(t,e){var n,r,o,a;const{glyphs:i,create:s=Wr,warnings:l}=e,u=ro(i),c={x:null!=(n=Hr(t.x))?n:0,y:null!=(r=Hr(t.y))?r:0},f=[],d=[{start:c.x,end:c.x}];let h=0;const p=(t,e)=>{var n;const r=no(e,i,u,l),o=(null==r?void 0:r.unitsPerEm)||1e3,a=e.fontSize/o,s=null!=(n=null==r?void 0:r.ascent)?n:.9*o,p=eo(e);for(let n=0;n<t.length;n++){const i=t.charAt(n),l=null==r?void 0:r.glyphs[i];if(l&&l.d)f.push({glyphD:l.d,m:[a,0,0,a,c.x,c.y],paint:p,line:h,x:c.x,y:c.y,scale:a}),c.x+=l.width*a;else if(/\S/.test(i)){const t=l&&l.width>0?l.width:oo*o;f.push({glyphD:ao(t,s),m:[a,0,0,a,c.x,c.y],paint:p,line:h,x:c.x,y:c.y,scale:a}),c.x+=t*a}else c.x+=(l?l.width:0)*a;c.x+=e.letterSpacing+(" "===i?e.wordSpacing:0),d[h].end=c.x}},m=(t,e)=>{var n,r,o,a;const i=$r(t,e),s=Hr(t.x),l=Hr(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=Hr(t.dx))?n:0,c.y+=null!=(r=Hr(t.dy))?r:0;const u=null!=(o=Jr(t[tt]))?o:Jr(t[$]);if(u&&!(null==(a=t.children)?void 0:a.length)&&p(u,i),t.children)for(const e of t.children)m(e,i)},v=to(t);if(t.children)for(const e of t.children)m(e,v);const g=null!=(o=Jr(t[tt]))?o:Jr(t[$]);g&&!(null==(a=t.children)?void 0:a.length)&&p(g,v);const y=Jr(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 yo(t,go(f,s,l),s)}function so(t,e){var n,r,o,a,i,s;if(null==(n=e.alongPath)?void 0:n.pathD)return function(t,e,n){var r,o;const{glyphs:a,warnings:i,alongPath:s}=n,l=Cr(e);if(!l)return null==i||i.push("textGlyphs: unparsable along-path geometry (caret)"),[];const u=ro(a),c=[];let f=0;const d=(t,e)=>{var n,r,o;const s=$r(t,e),l=null!=(n=Jr(t[tt]))?n:Jr(t[$]);if(l&&!(null==(r=t.children)?void 0:r.length)){const t=no(s,a,u,i),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),a=null==t?void 0:t.glyphs[o],i=(a?a.width:0)*n,u=i+s.letterSpacing+(" "===o?s.wordSpacing:0);c.push({advStart:f,advEnd:f+u,glyphW:i,ascent:r,fontSize:s.fontSize}),f+=u}}if(t.children)for(const e of t.children)d(e,s)};d(t,to(t));const h=f,p=Vn(null==s?void 0:s.textLength),m="animated"===p.kind?Number(null==(r=p.keyframes[0])?void 0:r.value)||0:"static"===p.kind&&Number(p.value)||0,v=m>0&&h>0?m/h:1,g=Vn(null==s?void 0:s.startOffset),{along:y,perp:b}=uo(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)),a=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*a.angle/Math.PI}})}(t,e.alongPath.pathD,e);const{glyphs:l,warnings:u}=e,c=ro(l),f={x:null!=(r=Hr(t.x))?r:0,y:null!=(o=Hr(t.y))?o:0},d=[],h=[{start:f.x,end:f.x}];let p=0;const m=(t,e)=>{var n;const r=no(e,l,c,u),o=(null==r?void 0:r.unitsPerEm)||1e3,a=e.fontSize/o,i=(null!=(n=null==r?void 0:r.ascent)?n:.9*o)*a;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)*a+e.letterSpacing+(" "===o?e.wordSpacing:0);d.push({x:f.x,y:f.y,width:l,ascent:i,fontSize:e.fontSize,line:p}),f.x+=l,h[p].end=f.x}},v=(t,e)=>{var n,r,o,a;const i=$r(t,e),s=Hr(t.x),l=Hr(t.y);void 0!==s&&(f.x=s,p=h.length,h.push({start:f.x,end:f.x})),void 0!==l&&(f.y=l),f.x+=null!=(n=Hr(t.dx))?n:0,f.y+=null!=(r=Hr(t.dy))?r:0;const u=null!=(o=Jr(t[tt]))?o:Jr(t[$]);if(u&&!(null==(a=t.children)?void 0:a.length)&&m(u,i),t.children)for(const e of t.children)v(e,i)},g=to(t);if(t.children)for(const e of t.children){const t=d.length;if(v(e,g),d.length===t){const t=$r(e,g),n=no(t,l,c),r=(null==n?void 0:n.unitsPerEm)||1e3;d.push({x:f.x,y:f.y,width:0,ascent:(null!=(a=null==n?void 0:n.ascent)?a:.9*r)*(t.fontSize/r),fontSize:t.fontSize,line:p})}}const y=null!=(i=Jr(t[tt]))?i:Jr(t[$]);y&&!(null==(s=t.children)?void 0:s.length)&&m(y,g);const b=Jr(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 lo(t,e,n,r,o=0){const{x:a,y:i,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,a-n*l*c-o*u,i-n*u*c+o*l]}function uo(t){var e,n,r;return{along:(null!=(e=Hr(t.x))?e:0)+(null!=(n=Hr(t.dx))?n:0),perp:null!=(r=Hr(t.dy))?r:0}}function co(t,e,n,r,o,a){const{glyphs:i,create:s=Wr,warnings:l}=r,u=e?Cr(e):null;if(!u)return null==l||l.push("textGlyphs: unparsable along-path geometry"),null;const c=ro(i),{cells:f,width:d}=function(t,e,n,r){const o=[];let a=0;const i=(t,s)=>{var l,u,c;const f=$r(t,s),d=null!=(l=Jr(t[tt]))?l:Jr(t[$]);if(d&&!(null==(u=t.children)?void 0:u.length)){const t=no(f,e,n,r);if(t){const e=f.fontSize/t.unitsPerEm,n=null!=(c=t.ascent)?c:.9*t.unitsPerEm,r=eo(f);for(let i=0;i<d.length;i++){const s=d.charAt(i),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:a+t/2}),a+=t}else if(/\S/.test(s)){const i=l&&l.width>0?l.width:oo*t.unitsPerEm,s=i*e;o.push({glyphD:ao(i,n),widthEm:i,scale:e,paint:r,midBase:a+s/2}),a+=s}else a+=(l?l.width:0)*e;a+=f.letterSpacing+(" "===s?f.wordSpacing:0)}}}if(t.children)for(const e of t.children)i(e,f)};return i(t,to(t)),{cells:o,width:a}}(t,i,c,l);if(!f.length)return yo(t,[],s);const{along:h,perp:p}=uo(t),m=fo(n),v=fo(o),g=t=>t>0&&d>0?t/d:1,y="clip"===a&&!u.closed;if(m.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}(m.times,v.times),n=(t,e)=>h+m.at(e)+g(v.at(e))*t.midBase,r=m.animated?m.loop:v.loop;return yo(t,function(t,e,n,r,o,a,i,s=0){const l=Math.max(e.totalLength/ho,.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=Xr(f.glyphD,t),h=(t,n)=>{const{x:r,y:o,angle:a}=e.sampleAtDistance(t),i=Math.cos(a),l=Math.sin(a);return{time:n,value:{translate:[mo(r-s*l,3),mo(o+s*i,3)],rotate:mo(180*a/Math.PI,3)}}},p=[],m=[],v=(t,e)=>{p.push(h(t,e)),i&&m.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],a=n(f,e),i=n(f,o),s=Math.min(po,Math.max(1,Math.ceil(Math.abs(i-a)/l)));for(let t=1;t<=s;t++){const r=e+t/s*(o-e);v(n(f,r),r)}}$e(p);const g={keyframes:p};void 0!==o&&(g.loop=o);const y={transform:g};if(i&&m.some(t=>0===t.value)){const t={keyframes:m};void 0!==o&&(t.loop=o),y.opacity=t}c.push(a("path",w(A({d:d},vo(f.paint)),{animate:y}),[]))}return c}(f,u,n,e,r,s,y,p),s)}const b=g(v.at(0)),k=h+m.at(0);return yo(t,go((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,m:lo(u,k+t.midBase*b,t.scale,t.widthEm,p)})),s,l),s)}function fo(t){var e;const n=Vn(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],a=o>0?(t-e[n-1])/o:1;return r[n-1]+a*(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 ho=48,po=64;function mo(t,e){const n=b(10,e);return Math.round(t*n)/n}function vo(t){const e={};return void 0!==t.fill&&(e.fill=t.fill),void 0!==t.stroke&&(e.stroke=t.stroke),void 0!==t.strokeWidth&&(e.strokeWidth=t.strokeWidth),e}function go(t,e,n){var r,o,a;if(!t.length)return null==n||n.push("textGlyphs: nothing to render"),[];const i=new Map;for(const e of t){const t=JSON.stringify([null!=(r=e.paint.fill)?r:null,null!=(o=e.paint.stroke)?o:null,null!=(a=e.paint.strokeWidth)?a:null]),n=Xr(e.glyphD,e.m),s=i.get(t);s?s.d+=n:i.set(t,{paint:e.paint,d:n})}const s=[];for(const{paint:t,d:n}of i.values())s.push(e("path",A({d:n},vo(t)),[]));return s}function yo(t,e,n){const r={};for(const e of Object.keys(t))"type"!==e&&"children"!==e&&-1===Qr.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 bo(t,e){return e.alongPath?co(t,e.alongPath.pathD,e.alongPath.startOffset,e,e.alongPath.textLength,e.alongPath.pathOverflow):io(t,e)}function ko(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 Ao(t,e,n,r,o,a,i,s){const l=xo(r,n,o),u=Po(n,o),c=jo(a,l),f=jo(i,u),d=_o(i),h={type:"path",d:Ht(e)};return Oo(h,"strokeDasharray",f),Oo(h,"strokeDashoffset",c),Oo(h,"strokeOpacity",d),[h]}var wo=1;function xo(t,e,n){const[r]=So(n);return n=>e*(-n-r+t)+wo}function Po(t,e){const[n,r]=So(e),o=r-n+1;return e=>{const n=ke(e[0],0,1),r=ke(e[1],0,1),a=Math.min(n,r),i=Math.max(n,r),s=[0];let l=wo;for(let e=0;e<o;e++)s.push(l+a*t),s.push((i-a)*t),l=(1-i)*t;return s.push(l+wo),s}}function So(t){return[Math.floor(Math.min(-t[0],-t[1])),Math.ceil(Math.max(-t[0],-t[1]))]}function jo(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,a;return{time:null!=(r=null!=(n=t.time)?n:t.t)?r:0,value:e(null!=(o=t.value)?o:t.v),easing:null!=(a=t.easing)?a:t.e}}),loop:t.loop}}function Oo(t,e,n){n&&Wn(t,e,n)}var Mo=10;function _o(t){var e,n,r,o,a,i;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),p=u?h&&s(null!=(a=u.value)?a:u.v):h,m=c?h&&s(null!=(i=c.value)?i:c.v):h;p&&!m?(f.push({time:d,value:0}),f.push({time:d+Mo,value:1})):!p&&m&&(f.push({time:d-Mo,value:1}),f.push({time:d,value:0}))}return f.length<=1?void 0:{kind:"animated",keyframes:f}}function Io(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,a=n(r);if(0===a)return r;const i=n(o);if(0===i)return o;if(a*i>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;a*e<0?o=t:(r=t,a=e)}return(r+o)/2}function zo(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],a=(e-r.time)/(o.time-r.time);return[r.value[0]+(o.value[0]-r.value[0])*a,r.value[1]+(o.value[1]-r.value[1])*a]}return t[t.length-1].value}function To(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+=No(t,r,r+1);return t.c&&e.length>1&&(n+=No(t,e.length-1,0)),n}function No(t,e,n){var r,o,a,i;const s=t.v,l=s[e],u=s[n],c=Se(l,null!=(o=null==(r=t.o)?void 0:r[e])?o:l,null!=(i=null==(a=t.i)?void 0:a[n])?i:u,u);return c.ds[c.ds.length-1]}var Eo=.5522847498307936;function Co(t){var e,n;const r={defs:[],warnings:[],errors:[],idMap:new Map,nextId:0,contentRefInnerIds:new Map,maskAncestorChains:new Map,engine:(null==(e=st(t))?void 0:e.mode)===Z.frames?X.frames:X.waapi,glyphs:null==(n=lt(t))?void 0:n.glyphs},o=Jn(t);Hn(o,r.idMap),$n(o,r,()=>Yn(r,"inner")),function(t,e){const n=new Set,r=t=>{var o,a;const i=Qn(null==(a=null==(o=t.effects)?void 0:o.maskedBy)?void 0:a.sourceId);if("string"==typeof i){n.add(t);const r=e.idMap.get(i);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=vr(t,e),a=n?[...r,n]:r;for(const e of t.children)o(e,a)}};o(t,[])}(o,r);const a=function(t,e){return function(t,e){e.idMap.clear(),Hn(t,e.idMap);const n=[],r=t=>{var e;jr(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,a=o=>{var i;if(o){if(o!==t&&jr(o)&&n++,"use"===o.type&&o.href){const t=Qn(o.href);t&&!r.has(t)&&(r.add(t),a(e.idMap.get(t)))}null==(i=o.children)||i.forEach(a)}},i=Qn(t.href);i&&(r.add(i),a(e.idMap.get(i))),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=jr(t);if(!n)continue;const r=n.timeCrop;Or(t),Mr(t,wr(n),e),r&&Pr(t,r,e)}}(t,e),t}(Fo(o,r),r);return function(t,e){e.length&&(t.children||(t.children=[])).unshift({type:"defs",children:e})}(a,r.defs),{root:a,defs:r.defs,warnings:r.warnings,errors:r.errors}}function Fo(t,e){t.children&&(t.children=t.children.map(t=>Fo(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:a,repeater:i,maskedBy:s,clipPath:l,trimPath:u,clone:c,fillGradient:f,strokeGradient:d,textPath:h,text:p}=null!=n?n:{};n&&delete t.effects;let m=t,v=!1;if(null==p?void 0:p.useGlyphs)if(h){const t="string"==typeof h.path?h.path:void 0,n=function(t,e,n,r,o,a){return e.glyphs?co(t,n,r,{glyphs:e.glyphs,warnings:e.warnings},o,a):(e.warnings.push("textGlyphs: no definitions.glyphs"),null)}(m,e,t,h.startOffset,h.textLength,h.pathOverflow);n&&(m=n,v=!0)}else m=function(t,e,n){return(null==e?void 0:e.useGlyphs)?n.glyphs?io(t,{glyphs:n.glyphs,warnings:n.warnings}):(n.warnings.push("textGlyphs: no definitions.glyphs — left as native <text>"),t):t}(m,p,e),v=!0;return v||(m=function(t,e,n){var r;if(!e||"string"!=typeof e.path||!e.path)return t;const o=Yn(n,"tpath"),{d:a,startShift:i}=Ur(e.path,{pathOverflow:e.pathOverflow,startOffset:e.startOffset,textLength:e.textLength,advance:Dr(t)});n.defs.push({type:"path",id:o,d:a});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),Vr(s,"startOffset",Br(e.startOffset,i)),Vr(s,"textLength",e.textLength),t.children=[s],t}(m,h,e)),m=function(t,e,n){return nr(t,e,n,"fill")}(m,f,e),m=function(t,e,n){return nr(t,e,n,"stroke")}(m,d,e),m=function(t,e){if(!e)return t;const n=e.subPaths===J.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,a,i,s,l,u,c;if("rect"===t.type){const a=Number(null!=(e=t.x)?e:0),i=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"+(a+s)+","+i+"L"+(a+s)+","+(i+l)+"L"+a+","+(i+l)+"L"+a+","+i+"L"+(a+s)+","+i+"z"}if("ellipse"===t.type||"circle"===t.type){const e=Number(null!=(a=t.cx)?a:0),n=Number(null!=(i=t.cy)?i: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*Eo,d=o*Eo,h=(t,e,n,r,o,a)=>"C"+t+","+e+" "+n+","+r+" "+o+","+a;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=vn(e);if(!n.length)return;const a={leaf:t,subpaths:[]};for(const t of n){const e=To(t);a.subpaths.push({subpath:t,lengthPx:e,startOffsetPx:0})}r.push(a)};if(o(t),!r.length)return t;let a=0;const i=n?[...r].reverse():r;for(const t of i)for(const e of t.subpaths)n||(a=0),e.startOffsetPx=a,a+=e.lengthPx;const s=a;if(n&&s<.001)return t;const l=Vn(e.offset),u="absent"===l.kind?{kind:"static",value:0}:l,c=function(t){const e=Vn(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=Io(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),a=[];let i=0;for(const t of n){for(;i<o.length&&o[i]<t.time;){const t=o[i++],e=zo(n,t),r=(e[0]+e[1])/2;a.push({time:t,value:[r,r]})}const e=t.value[0]>t.value[1]?[t.value[1],t.value[0]]:t.value;a.push({time:t.time,value:e,easing:t.easing})}for(;i<o.length;){const t=o[i++],e=zo(n,t),r=(e[0]+e[1])/2;a.push({time:t,value:[r,r]})}return{kind:"animated",keyframes:a}}(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],a=n?s:o.lengthPx;if(a<.001)return t;const i=n?o.startOffsetPx/a:0;return function(t,e,n,r,o,a){const i=xo(n,e,r),s=Po(e,r),l=A({},t);return delete l.effects,Oo(l,"strokeDasharray",jo(a,s)),Oo(l,"strokeDashoffset",jo(o,i)),Oo(l,"strokeOpacity",_o(a)),l}(e.leaf,a,i,h,u,f)}const p=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 a=n?r.startOffsetPx/o:0;e.push(...Ao(t.leaf,r.subpath,o,a,h,u,f))}p.set(t.leaf,ko(t.leaf,e))}const m=t=>p.get(t)||(Array.isArray(t.children)&&t.children.length>0?w(A({},t),{children:t.children.map(m)}):t);return m(t)}(m,u),m=function(t,e,n){var r,o;if(!e)return t;const a=null!=(r=e.copies)?r:1;if(a<1)return n.errors.push("repeater.copies invalid: "+e.copies),t;const i=t.transform,s=null==(o=t.animate)?void 0:o.transform,l=Jn(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<a;t++){const n=Jn(l),r=br(e,t),o=r?qn(n,r):n;u.push(o)}const c={type:"g",children:u};return t.id&&(c.id=t.id),void 0!==i&&(c.transform=i),void 0!==s&&(c.animate={transform:s}),c}(m,i,e),m=function(t,e,n,r){if(!e)return t;const o=Qn(e.sourceId);if(!o)return r.errors.push("maskedBy.sourceId missing — cannot build mask"),t;const a=Yn(r,"mask");let i={type:"use",href:"#"+o};if(n)i=lr(i,n,r);else if(dr(t))i=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,a=o&&"object"==typeof o&&Array.isArray(o.keyframes)?o.keyframes:void 0;if(!a||!a.length)return t;const i=[],s=[],l=[];for(const t of a){const e=(null!=(n=t.value)?n:t.v)||{},r=Kn(t,void 0);if(Array.isArray(e.translate)&&i.push(w(A(A({},r),fr(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 i.length&&(f={type:"g",animate:{transform:c(i)},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}(i,t);else{const e=function(t){if("string"==typeof t.transform){const e=function(t){var e,n,r,o,a,i,s,l,u,c,f,d,h;const p=/([a-zA-Z]+)\s*\(([^)]*)\)/g;let m;const v=[];for(;null!==(m=p.exec(t));){const t=m[2].split(/[\s,]+/).filter(t=>t.length>0).map(Number);v.push({name:m[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,p=null!=(o=g.args[1])?o:0;if(h!==-f||p!==-d)continue;const m={};m.origin=[f,d];for(let e=0;e<t;e++)if("translate"===v[e].name){const t=null!=(a=v[e].args[0])?a:0,n=null!=(i=v[e].args[1])?i:0;m.translate=m.translate?[m.translate[0]+t,m.translate[1]+n]:[t,n]}for(let e=t+1;e<v.length-1;e++){const t=v[e];if("rotate"===t.name)m.rotate=(null!=(s=m.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;m.scale=m.scale?[m.scale[0]*e,m.scale[1]*n]:[e,n]}}return m}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&&!t.transform.kfs){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&&(i=lr(i,e,r))}const s=void 0===n&&!function(t){return"string"==typeof t.transform||!(!t.transform||"object"!=typeof t.transform)||dr(t)}(t);i=function(t,e,n,r,o){const a=r.idMap.get(n),i=r.maskAncestorChains.get(e)||[],s=o?vr(e,r):void 0,l=s?[...i,s]:i,u=a&&r.maskAncestorChains.get(a)||[];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=hr(l),n=hr(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]}}(i,t,o,r,s);const l={type:"mask",id:a,children:[i]};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(#"+a+")",t}(m,s,a,e),m=function(t,e,n){var r,o;if(!e||!e.d&&!e.animate)return t;const a=Yn(n,"clip"),i={type:"path"},s=Vn(e.d);if("absent"!==s.kind&&("static"===s.kind?i.d=sr(s.value):(Wn(i,"d",s),void 0!==i.d&&(i.d=sr(i.d)))),e.animate&&!(null==(r=i.animate)?void 0:r.d)){const t=null!=(o=i.animate)?o:{};t.d=e.animate,i.animate=t}return n.defs.push({type:"clipPath",id:a,children:[i]}),t.clipPath="url(#"+a+")",t}(m,l,e),o?(yr(m,c,e),m=function(t,e,n,r){const o=function(t,e){var n,r,o;const a={};let i=!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=er(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),a.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}i=!0}}const l=void 0!==(null==e?void 0:e.translate),u=i||l,c=i&&er((null==(r=t.animate)?void 0:r.transform)||void 0)||i&&er((null==(o=a.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],a=e[e.length-1];if("translate"===a.name&&"translate"===o.name){const n=tr(a.full),r=tr(o.full),i=-n[0],s=-n[1],l=r[0]-i,u=r[1]-s;return 0===l&&0===u?{rest:t}:{translate:"translate("+l+","+u+")",rest:"translate("+i+","+s+")"+e.slice(1).map(t=>t.full).join("")}}if("translate"===a.name)return{rest:t};const i=[];let s=0;for(;s<e.length&&"translate"===e[s].name;)i.push(e[s].full),s++;if(!i.length)return{rest:t};const l=e.slice(s).map(t=>t.full).join("");return{translate:i.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 a=o[1].split(/[\s,]+/).filter(Boolean).map(Number);return a.length>=4&&1===a[0]&&0===a[1]&&0===a[2]&&1===a[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&&(a.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&&!t.transform.kfs){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||(a.transform=o({translate:r.translate})),n?t.transform=o(e):delete t.transform}}return a}(t,e);"string"==typeof t.id&&delete t.id;const{outer:a,inner:i}=function(t){if(!t)return{};const e=er(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=qn(s,i);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),a&&(delete l.id,l=qn(l,a),l.id=n),l}(m,a,r,o)):m=function(t,e,n,r){return yr(t,e,r),qn(t,n)}(m,c,a,e),(null==c?void 0:c.retime)&&(t.effects={clone:{retime:c.retime}}),r&&e.idMap.set(r,m),m}var Lo=t=>{var e,n;return null!=(n=null!=(e=t.t)?e:t.time)?n:0},Do=t=>{var e;return null!=(e=t.v)?e:t.value},Ro=t=>{var e;return null!=(e=t.e)?e:t.easing},Bo=t=>{var e;return null!=(e=t.tangentIn)?e:t.ti},Uo=t=>{var e;return null!=(e=t.tangentOut)?e:t.to};function Vo(t,e,n,r,o){const a=1-o,i=a*a*a,s=3*a*a*o,l=3*a*o*o,u=o*o*o;return[i*t[0]+s*e[0]+l*n[0]+u*r[0],i*t[1]+s*e[1]+l*n[1]+u*r[1]]}function Wo(t,e,n,r,o=64){let a=0,i=t;for(let s=1;s<=o;s++){const l=Vo(t,e,n,r,s/o);a+=Math.hypot(l[0]-i[0],l[1]-i[1]),i=l}return a}var Go=t=>{const e=Math.round(1e4*t)/1e4;return Object.is(e,-0)?"0":String(e)};function Ko(t,e,n){var r,o;let a=Co(t).root;return a=function(t){const e=t=>{var n;let r=t;const o=t.animate,a=null==o?void 0:o.transform;if(a){const e=function(t){var e,n,r,o;if("offsetPath"!==t.alongPathMode)return;const a=null!=(e=t.keyframes)?e:t.kfs;if(!a||a.length<2)return;const i=Do(a[0]),s=(null==i?void 0:i.origin)&&i.origin.length>=2?[i.origin[0],i.origin[1]]:[0,0],l=[];for(const t of a){const e=Do(t),r=null==e?void 0:e.translate;if(!r||r.length<2)return;if(Object.keys(e).some(t=>"translate"!==t&&"origin"!==t))return;const o=null!=(n=null==e?void 0:e.origin)?n:[0,0];if(o[0]!==s[0]||o[1]!==s[1])return;l.push([r[0]+s[0],r[1]+s[1]])}if(!a.some(t=>Bo(t)||Uo(t)))return;let u="M"+Go(l[0][0])+","+Go(l[0][1]);const c=[];for(let t=0;t<l.length-1;t++){const e=l[t],n=l[t+1],i=null!=(r=Uo(a[t]))?r:[0,0],s=null!=(o=Bo(a[t+1]))?o:[0,0],f=[e[0]+i[0],e[1]+i[1]],d=[n[0]+s[0],n[1]+s[1]];u+="C"+Go(f[0])+","+Go(f[1])+","+Go(d[0])+","+Go(d[1])+","+Go(n[0])+","+Go(n[1]),c.push(Wo(e,f,d,n))}const f=c.reduce((t,e)=>t+e,0);if(!(f>0))return;const d=[];let h=0;for(let t=0;t<a.length;t++){t>0&&(h+=c[t-1]);const e={t:Lo(a[t]),v:h/f},n=Ro(a[t]);void 0!==n&&(e.e=n),d.push(e)}return{pathStr:u,distanceKfs:d,autoOrient:!!t.autoOrient,anchor:s}}(a);if(e){const n=A({},o);delete n.transform;const i={keyframes:e.distanceKfs};void 0!==a.loop&&(i.loop=a.loop),n.offsetDistance=i;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:Go(e.anchor[0])+"px "+Go(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)}(a),a=jn(a,null!=(o=null==(r=st(a))?void 0:r.duration)?o:me),e===X.waapi&&(a=dn(a,null==n?void 0:n.motionPath),a=Fn(a),a=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}(a)),a}function qo(t){const e=globalThis;"function"!=typeof e.cancelAnimationFrame?e.clearTimeout(t):e.cancelAnimationFrame(t)}function Zo(t,e,n){var r;const o=st(t)||{},a=_n(t,X.frames),i=o.iterations;let s=1;"number"==typeof i&&(s=i||1),"infinite"===i&&(s=1/0),s<1&&(s=1);const l=+(o.duration||me),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 p=null,m=!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},P=()=>{let t=x();return Number.isFinite(u)&&t>u&&(t=u),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=ke(t,0,s*e),r=Math.max(0,Math.ceil(t/e)-1),r=Math.min(r,s-1),n=ke((t-r*e)/e,0,1)):n=t;const o=c||"normal";let a=n;return"reverse"===o?a=1-n:"alternate"===o?r%2==1&&(a=1-n):"alternate-reverse"===o&&r%2==0&&(a=1-n),a}();for(const t of a||[]){const r=t.animate;if(!r||"object"!=typeof r||Array.isArray(r)){console.warn("Empty or unresolved binding",t);continue}const o=zn(r,n*l);for(const[n,r]of Object.entries(o))e.setAttribute(t.id,n,r)}}o.delay&&(o.delay<0?S(P()):h&&S(0));const j=()=>!!m&&!!e.isConnected()&&(y<0?x()>0:!(Number.isFinite(u)&&P()>=u)),O=t=>{null!==p&&(qo(p),p=null),(t||j())&&(p=function(t){const e=globalThis;return"function"==typeof e.requestAnimationFrame?e.requestAnimationFrame(t):e.setTimeout(t,16)}(()=>{p=null,(()=>{var t,r;if(!e.isConnected())return void M();const o=P(),a=x();if(a<0&&y>0)h&&S(0);else{if(y<0&&a<=0)return M(),S(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(),S(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}S(o)}})(),O()}))},M=()=>{if(!m)return;let t=x();Number.isFinite(u)&&t>u&&(t=u),v=t,g=0,m=!1,null!==p&&(qo(p),p=null),t>=0?S(t):h&&S(0)},_={isReady:()=>!0,getRootElement:()=>null,isPlaying:()=>j(),play:()=>{var t;(()=>{if(!m){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,m=!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,m=!1,b=!1,S(v),null==(t=null==n?void 0:n.onCancel)||t.call(n)},finish:()=>{((t=!0)=>{var e;v=Number.isFinite(u)?u:P(),g=0,m=!1,null!==p&&(qo(p),p=null),S(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,m&&(g=Date.now())},getCurrentTime:()=>P(),setCurrentTime:t=>{t<0&&(t=0),Number.isFinite(u)&&t>u&&(t=u),v=t,m&&(g=Date.now()),(!Number.isFinite(u)||t<u)&&(b=!1),S(P())},destroy:()=>{var t;_.cancel(),null==(t=null==n?void 0:n.onRemove)||t.call(n)}};return _}var Xo=[1,0,0,1,0,0];function Yo(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 Qo=(t,e)=>[1,0,0,1,t,e],Ho=(t,e)=>[t,0,0,e,0,0];function Jo(t){const e=t*Math.PI/180;return[Math.cos(e),Math.sin(e),-Math.sin(e),Math.cos(e),0,0]}var $o=t=>[1,0,Math.tan(t*Math.PI/180),1,0,0],ta=t=>[1,Math.tan(t*Math.PI/180),0,1,0,0];function ea(t){let e=Xo;t.translate&&(e=Yo(e,Qo(t.translate[0],t.translate[1])));const n=t.origin&&(void 0!==t.rotate||t.scale);return n&&(e=Yo(e,Qo(t.origin[0],t.origin[1]))),void 0!==t.rotate&&(e=Yo(e,Jo(t.rotate))),t.scale&&(e=Yo(e,Ho(t.scale[0],t.scale[1]))),n&&(e=Yo(e,Qo(-t.origin[0],-t.origin[1]))),e}function na(t,e,n){return t+(e-t)*n}function ra(t,e){return null==t?Xo:"string"==typeof t?function(t){let e=Xo;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=Yo(e,Qo(n[0]||0,n[1]||0)):"scale"===t?e=Yo(e,Ho(n[0],n.length>1?n[1]:n[0])):"rotate"===t?e=Yo(e,Jo(n[0])):"skewX"===t?e=Yo(e,$o(n[0])):"skewY"===t?e=Yo(e,ta(n[0])):"matrix"===t&&(e=Yo(e,[n[0],n[1],n[2],n[3],n[4],n[5]]))}return e}(t):t.keyframes?ea(function(t,e){var n,r,o,a,i,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!=(a=c.time)?a:0))/((null!=(i=f.time)?i:0)-(null!=(s=c.time)?s:0)||1),h=c.value||{},p=f.value||{},m={};return h.translate&&p.translate?m.translate=[na(h.translate[0],p.translate[0],d),na(h.translate[1],p.translate[1],d)]:m.translate=h.translate||p.translate,void 0!==h.rotate&&void 0!==p.rotate?m.rotate=na(h.rotate,p.rotate,d):m.rotate=null!=(l=h.rotate)?l:p.rotate,h.scale&&p.scale?m.scale=[na(h.scale[0],p.scale[0],d),na(h.scale[1],p.scale[1],d)]:m.scale=h.scale||p.scale,m.origin=h.origin||p.origin,m}(t.keyframes,e)):t.value?ea(t.value):"object"!=typeof t||Array.isArray(t)?Xo:ea(t)}var oa=new Set(["svg","g","symbol"]),aa=new Set(["defs","mask","clipPath","title"]);function ia(t,e){var n;"string"==typeof t.id&&e.set(t.id,t),null==(n=t.children)||n.forEach(t=>ia(t,e))}function sa(t){return null==t?0:Number(t)}function la(t){return Math.round(100*t)/100+0}function ua(t,e,n,r,o){var a;const i=t.type||"";if(aa.has(i))return;const s=Yo(e,function(t,e){return t.animate&&t.animate.transform?ra(t.animate.transform,e):void 0!==t.transform?ra(t.transform,e):Xo}(t,n));if("use"===i){const e="string"==typeof t.href?t.href.replace(/^#/,""):"",a=r.get(e),i=Yo(s,Qo(sa(t.x),sa(t.y)));return void(a?ua(a,i,n,r,o):o.push("UNRESOLVED_USE:#"+e))}oa.has(i)?null==(a=t.children)||a.forEach(t=>ua(t,s,n,r,o)):o.push(function(t,e,n){var r,o,a,i,s;const l=null!=(r=t.fill)?r:"",u=null!=(o=t.stroke)?o:"",c=null!=(i=null!=(a=t["stroke-width"])?a:t.strokeWidth)?i:"",f=la(function(t,e,n,r){var o,a,i,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!=(a=e[e.length-1].time)?a:0))return e[e.length-1].value;let n=0;for(;n<e.length-1&&(null!=(i=e[n+1].time)?i: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 na(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(la).join(",");return t.type+"|"+function(t){var e;switch(t.type){case"rect":return sa(t.width)+","+sa(t.height)+","+sa(t.x)+","+sa(t.y);case"ellipse":return sa(t.rx)+","+sa(t.ry)+","+sa(t.cx)+","+sa(t.cy);case"circle":return sa(t.r)+","+sa(t.cx)+","+sa(t.cy);case"path":return String(null!=(e=t.d)?e:"");default:return""}}(t)+"|["+h+"]|f:"+l+"|s:"+u+"|sw:"+(sa(c)||"")+"|o:"+f+"|m:"+d}(t,s,n))}function ca(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=>ca(t,e))}function fa(t,e){const n=new Map;ia(t,n);const r=[];return ua(t,Xo,e,n,r),r.sort()}function da(t,e){const n=new Set;ca(t,n),ca(e,n);const r=[];for(const o of Array.from(n).sort((t,e)=>t-e)){const n=fa(t,o),a=fa(e,o),i=ha(n,a),s=ha(a,n);(i.length||s.length)&&r.push({time:o,onlyInA:i,onlyInB:s})}return r}function ha(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 pa(t,e){const{startOn:n,outAction:r="continue",scrollIntoViewThreshold:o=0}=e,a=t.getRootElement();if(!a)return console.warn("setupAnimationTriggers: No root element found for animation."),t;let i=!1;const s=()=>{i&&(i=!1,t.setPlaybackRate(1)),t.play()},l=()=>{switch(r){case"pause":t.pause();break;case"reset":t.cancel();break;case"reverse":i=!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()};a.addEventListener("mouseenter",e),a.addEventListener("mouseleave",n);break}case"click":{const e=()=>{t.isPlaying()?l():s()};a.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 a="undefined"!=typeof window&&window.innerHeight?window.innerHeight:1/0,i=null!=(n=null==(e=t.rootBounds)?void 0:e.height)?n:1/0,s=Math.min(a,i),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(a);break}}return t}function ma(t){return"#"+t}function va(t,e,n,r){const o=st(t)||{};if(!r)if(t.id){const e=ma(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 a=Zo(t,e||function(t){const e=new Set;return{isConnected:()=>!t||t.isConnected,setAttribute:(n,r,o)=>{r=be(r);const a=ma(n),i=(null==t?void 0:t.querySelectorAll(a))||document.querySelectorAll(a);0!==i.length||e.has(a)||(e.add(a),console.warn('setAttribute: No elements found for selector "'+a+'"'));for(let t=0;t<i.length;t++){const e=i[t],n="transform"===r&&"pattern"===e.tagName?"patternTransform":r;e.setAttribute(n,o),pe.has(r)&&(e.style[r]=o)}}}}(r),n),i=f(c({},a),{getRootElement:()=>r||null});return o.trigger&&pa(i,o.trigger),i}function ga(t,e,n,r){var o,a;let i=null!=(o=t.v)?o:t.value;const s=null!=(a=t.e)?a:t.easing,l={offset:e,easing:s&&Array.isArray(s)?"cubic-bezier("+s.join(",")+")":void 0};let u,c=n;return ce.has(n)&&Array.isArray(i)?u=le(i):"transform"!==n||null===i||"object"!=typeof i||Array.isArray(i)?fe.has(n)?(Array.isArray(i)&&("translate"===n&&(i=i.map(t=>t+"px")),i=i.join(",")),"rotate"===n&&(i+="deg"),u=n+"("+i+")",c="transform"):u="d"===n?'path("'+(i&&"object"==typeof i&&Array.isArray(i.paths)?i.paths:[]).map(t=>Ht(t,!0)).join("")+'")':de.has(n)&&"number"==typeof i?100*i+"%":""+i:(u=he(i,{withUnits:!0}),c="transform"),CSS.supports(be(c),u)||r.add(c),c=ve(c),l[c]=u,l}function ya(t,e,n){var r,o,a,i,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!=(a=n.t)?a:0)-h),r=d.e?oe(d.e)(e):e,{right:o}=ie(d.e,e);l.push({t:0,v:wn(t,d.v,n.v,r),e:o})}continue}if(h>n){const r=e[u-1];if(r&&(null!=(i=r.t)?i:0)<=n){const e=null!=(s=r.t)?s:0,o=(n-e)/(h-e),a=r.e?oe(r.e)(o):o,{left:i}=ie(r.e,o);l.length>0&&(l[l.length-1]=f(c({},l[l.length-1]),{e:i})),l.push({t:n,v:wn(t,r.v,d.v,a),e:void 0})}break}l.push(d)}return l}function ba(t,e,n){var r;const o=new Map;for(const[a,i]of Object.entries(t)){const t=n.duration||1,s=ya(a,i.kfs||i.keyframes||[],t),l=[];for(let n=0;n<s.length;n++){const o=s[n],i=ga(o,ke((null!=(r=o.t)?r:0)/t,0,1),a,e);0===n&&(i.offset||0)>0&&l.push(f(c({},i),{offset:0})),l.push(i)}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(a,l)}return o}function ka(t,e,n,r){var o;const a=st(t)||{};if(!n)if(t.id){const e=ma(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 i=_n(t,X.waapi),s=[],l=a.iterations;let u;"number"==typeof l&&(u=l),"infinite"===l&&(u=1/0);const c=new Set;let f=!1,d=!1;(null==i?void 0:i.length)||console.warn("createWebApiAnimator: No animation bindings defined");for(const t of i||[]){const r=t.animate;if(!r||"object"!=typeof r||Array.isArray(r)){console.warn("createWebApiAnimator: Empty or unresolved binding",t);continue}const i=ma(t.id),l=(null==n?void 0:n.querySelectorAll(i))||document.querySelectorAll(i);0===l.length&&console.warn('createWebApiAnimator: No elements found for selector "'+i+'"');const h=ba(r,c,a),p=a.delay&&a.delay>0?a.delay:void 0;let m;if(a.delay&&a.delay<0&&a.duration){const t=-a.delay;m=u===1/0?t%a.duration:Math.min(t,a.duration*(null!=u?u:1))}const v={duration:a.duration,delay:p,fill:null!=(o=a.fill)?o:"forwards",direction:a.direction,iterations:u};for(let t=0;t<l.length;t++){const n=l[t];for(const[,t]of h)if(t.length>0)try{const r=new KeyframeEffect(n,t,v),o=new Animation(r,document.timeline);(null==e?void 0:e.onFinish)&&(o.onfinish=()=>{var t;f||(f=!0,null==(t=e.onFinish)||t.call(e))}),(null==e?void 0:e.onRemove)&&(o.onremove=()=>{var t;d||(d=!0,null==(t=e.onRemove)||t.call(e))}),void 0!==m&&(o.currentTime=m),s.push(o)}catch(t){console.warn(t)}}}if(!r&&c.size)return console.warn("Unsupported CSS attrs: "+[...c].join(", ")),null;const h={isReady:()=>!0,getRootElement:()=>n||null,isPlaying:()=>{var t;return"running"===(null==(t=s[0])?void 0:t.playState)},play:()=>{var t;f=!1,s.forEach(t=>t.play()),null==(t=null==e?void 0:e.onPlay)||t.call(e)},pause:()=>{var t;s.forEach(t=>t.pause()),null==(t=null==e?void 0:e.onPause)||t.call(e)},cancel:()=>{var t;f=!1,s.forEach(t=>t.cancel()),null==(t=null==e?void 0:e.onCancel)||t.call(e)},finish:()=>{var t;for(const e of s)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=>(s.forEach(e=>e.playbackRate=t),h),getCurrentTime:()=>{var t,e;const n=null!=(e=null==(t=s[0])?void 0:t.currentTime)?e:null;return null!==n?+n:null},setCurrentTime:t=>{f=!1,s.forEach(e=>{e.currentTime=t})},destroy:()=>{var t;h.cancel(),s.splice(0,s.length),d||(d=!0,null==(t=null==e?void 0:e.onRemove)||t.call(e))}};return a.trigger&&pa(h,a.trigger),h}var Aa="http://www.w3.org/2000/svg";function wa(t,e){if(!t)return null;const n=t,{type:r,children:o,style:a}=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&&i)for(var r of i(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=lt(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}(a,f);let h;if(o)for(const t of o){const e=wa(t,f);e&&(h||(h=[]),h.push(e))}const p=function(t,e,n,r,o){if(Te.has(t.toLowerCase()))return console.warn("SVG tag blocked (dangerous): ",t),null;const a=document.createElementNS(Aa,t);for(const t in e){const n=Be(t,e[t]);void 0!==n&&(Ce.has(t)?a.style[t]=String(n):a.setAttribute(be(t),n))}if(n)for(const t in n)a.style[t]=String(n[t]);if(r)for(const t of r)a.appendChild(t);return o&&(a.textContent=o),a}(r||"g",Ue(u),d,h,u[tt]||u[$]);return p&&void 0!==c&&p.setAttribute("type",c),p}var xa="data";function Pa(t,e,n,r){const o=Gt(t);for(const t of o)console.warn("[PxAnimator] effects shape warning:",t);t=Ko(t,(st(t)||{}).mode===Z.frames?X.frames:X.waapi);let a=null;if(r){t=Ie(t);const e="string"==typeof r?document.querySelector(r):r;e&&(a=wa(t),a&&e.replaceChildren(a))}return function(t,e,n,r){return function(t,e,n,r){const o=st(t)||{};return function(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 a=n(o);return r=a,t.debugInstName&&(window[t.debugInstName]=a),a}(o,n,n=>o.mode===Z.frames?va(t,e,n,r):ka(t,n,r,o.mode===Z.waapi)||va(t,e,n,r))}(t,e,n,r)}(t,e,n,a)}function Sa(t){const{src:e,data:n,adapter:r,callbacks:o,container:a}=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 Pa(n,r,o,a);let i=null,s=[],l=!1;const u=t=>{i?t(i):s&&s.push(t)};return fetch(e).then(t=>t.json()).then(t=>{if(!l)if(it(t)){i=Pa(t,r,o,a);const e=s;s=null,null==e||e.forEach(t=>t(i))}else console.error('createAnimator: invalid animation document format at "'+e+'"')}).catch(t=>{s=null,console.error('createAnimator: failed to load "'+e+'"',t)}),{isReady:()=>!!i,getRootElement:()=>i?i.getRootElement():null,isPlaying:()=>(null==i?void 0:i.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:()=>i?i.getCurrentTime():null,setCurrentTime:t=>{u(e=>e.setCurrentTime(t))},destroy:()=>{l=!0,s=null,null==i||i.destroy()}}}function ja(){const t=document.querySelectorAll("["+K+"]");for(let e=0;e<t.length;e++){const n=t[e];if(!n[q]){const t=n.getAttribute(K);t&&(n[q]=Sa({src:t,container:n}))}}}"undefined"!=typeof window&&(window.loadTagAnimators=ja,window.createAnimator=Sa,window.setupAnimationTriggers=pa);
1
+ var t,e=Object.defineProperty,n=Object.defineProperties,r=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyDescriptors,i=Object.getOwnPropertyNames,a=Object.getOwnPropertySymbols,l=Object.prototype.hasOwnProperty,s=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={}))l.call(e,n)&&u(t,n,e[n]);if(a)for(var n of a(e))s.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,PX_ANIMATOR_DATA_KEY:()=>Li,PX_ANIM_ATTR_NAME:()=>Pt,PX_ANIM_SRC_ATTR_NAME:()=>St,PX_TRANSFORM_PART_KEYS:()=>Ct,PxAnimatedSvgDocumentSchema:()=>Ee,PxAnimationDefinitionSchema:()=>Qt,PxAnimatorConfigSchema:()=>ae,PxAnimatorEngine:()=>Ot,PxAnimatorMode:()=>jt,PxAttrValueSchema:()=>se,PxBezierPathSchema:()=>Ie,PxBindingSchema:()=>le,PxCloneEffectSchema:()=>ye,PxDefsSchema:()=>ne,PxEasingOrRefSchema:()=>Gt,PxEffectsSchema:()=>Pe,PxElementAnimationSchema:()=>Jt,PxFillGradientEffectSchema:()=>Ae,PxGradientSpreadMethod:()=>Lt,PxGradientStopSchema:()=>be,PxGradientType:()=>Dt,PxGradientUnits:()=>Ft,PxKeyframeSchema:()=>Kt,PxKeyframeValueSchema:()=>qt,PxLoopSchema:()=>Zt,PxMaskedByEffectSchema:()=>me,PxNodeBase:()=>Oe,PxNodeSchema:()=>Me,PxPropertyAnimationSchema:()=>Xt,PxRepeaterEffectSchema:()=>he,PxRetimeEffectSchema:()=>ge,PxStrokeGradientEffectSchema:()=>we,PxSvgNodeExtra:()=>_e,PxTextEffectSchema:()=>Se,PxTextPathEffectSchema:()=>xe,PxTransformByEffectSchema:()=>de,PxTransformPartsSchema:()=>Ht,PxTransformValueSchema:()=>Yt,PxTriggerSchema:()=>$t,PxTrimPathEffectSchema:()=>ve,STYLE_ATTR_NAMES:()=>U,TRANSFORM_FN_NAMES:()=>D,applyPlayerEffects:()=>Uo,calcAnimationValues:()=>Ln,camelCaseToKebabWordIfNeeded:()=>K,collectSampleTimes:()=>vi,createAnimator:()=>Ri,createAnimatorImpl:()=>Di,createBasicFrameLoopAnimator:()=>$o,createFrameLoopAnimator:()=>wi,createPathSampler:()=>Ur,createWebApiAnimator:()=>ji,describeSchema:()=>wt,diffInEffect:()=>yi,evaluateMotionPathSegment:()=>tn,extendedPathForBrowser:()=>Zr,generateNewIds:()=>Fe,getAnimatorConfig:()=>Bt,getBindings:()=>Vt,getChildren:()=>Wt,getDefs:()=>Ut,getNormalizedProps:()=>Ze,isPxElementFileFormat:()=>Rt,isPxElementFileFormatDeep:()=>Te,jsonElementFactory:()=>Hr,layoutGlyphTextChars:()=>mo,loadTagAnimators:()=>Bi,materialiseAllInTree:()=>Qo,materialiseAnimatedUseInstances:()=>Vn,materialiseGlyphText:()=>Po,materialiseGlyphTextAlongPath:()=>go,materialiseGlyphTextHorizontal:()=>ho,materialiseInternalLoopsInPropAnim:()=>In,materialiseInternalLoopsInTree:()=>Tn,materialiseMotionPathInPropAnim:()=>on,materialiseMotionPathsInTree:()=>yn,normalizeDocument:()=>Cn,propAnimIsMotionPath:()=>Qe,px:()=>xt,renderNode:()=>Fi,schemaKeys:()=>At,setupAnimationTriggers:()=>ki,shiftAnimatable:()=>Kr,toRGBA:()=>C,validateNodeEffects:()=>je,visualModelAt:()=>gi}),module.exports=(t=d,((t,n,o,a)=>{if(n&&"object"==typeof n||"function"==typeof n)for(let o of i(n))l.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,l=t.i,s=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==s?void 0:s[t-1])?n:o,u=null!=(r=null==l?void 0:l[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==s?void 0:s[f-1])?o:t,r=null!=(i=null==l?void 0:l[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 P(t,e,n){return t+(e-t)*n}function j(t,e,n){const r=[],o=Math.max(t.length,e.length);for(let i=0;i<o;i++)r[i]=P(t[i]||0,e[i]||0,n);return r}function O(t,e,n){return[P(t[0]||0,e[0]||0,n),P(t[1]||0,e[1]||0,n),P(t[2]||0,e[2]||0,n),P(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,l,s,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(j(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(j(g,y,d));const b=null!=(s=null==(l=t.o)?void 0:l[n])?s:f,k=null!=(c=null==(u=e.o)?void 0:u[n])?c:h;v.push(j(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 l(t){return(3*i*t+2*o)*t+r}let s=n,u=0,c=1;for(let t=0;t<8;t++){const t=a(s)-n;if(Math.abs(t)<1e-6)return s;const e=l(s);if(Math.abs(e)<1e-6)break;s-=t/e}for(s=n;u<c;){const t=a(s);if(Math.abs(t-n)<1e-6)return s;n>t?u=s:c=s,s=(c+u)/2}return s}function I(t){const[e,n,r,o]=t,i=3*n,a=3*(o-n)-i,l=1-i-a;return function(t){return n=E(e,r,t),((l*n+a)*n+i)*n;var n}}function T(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),l=[n,r],s=[o,i],{left:u,right:c}=function(t,e,n,r,o){const i=T(t,e,o),a=T(e,n,o),l=T(n,r,o),s=T(i,a,o),u=T(a,l,o),c=T(s,u,o);return{left:[t,i,s,c],right:[c,u,l,r]}}([0,0],l,s,[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,l=[parseInt(r,16)/255,parseInt(o,16)/255,parseInt(i,16)/255];return null!==a&&l.push(parseInt(a,16)/255),l}(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,l=t.rotate,s=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!=l&&o.push("rotate("+l+f+")"),null!=s&&o.push("skewX("+s+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,l=o*o,s=a*i,u=3*o*a,c=3*l*i,f=l*o;return[s*t[0]+u*e[0]+c*n[0]+f*r[0],s*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,l=6*o*i,s=3*o*o;return[a*(e[0]-t[0])+l*(n[0]-e[0])+s*(r[0]-n[0]),a*(e[1]-t[1])+l*(n[1]-e[1])+s*(r[1]-n[1])]}function J(t,e,n,r,o=100){const i=o+1,a=new Float64Array(i),l=new Float64Array(i);let s=X(t,e,n,r,0);a[0]=0,l[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]-s[0],h=f[1]-s[1];u+=Math.sqrt(d*d+h*h),a[c]=i,l[c]=u,s=f}return{ts:a,ds:l}}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 l=n[a-1],s=n[a]-l,u=s>0?(e-l)/s: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)}},lt=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)}},st=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._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._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._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._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;return"_shape"in n?{kind:"shape",shape:n._shape}:"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.fn()}:{kind:"leaf"}}var xt={string:(t="")=>new at(t),number:(t=0)=>new lt(t),boolean:(t=!1)=>new st(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",Pt="_px_animator",jt={auto:"auto",waapi:"waapi",frames:"frames"},Ot={waapi:jt.waapi,frames:jt.frames},Mt={before:"before",after:"after"},_t="userSpaceOnUse",Et="objectBoundingBox",It={separate:"separate",combined:"combined"},Tt="text",zt="textContent",Nt=new Set(["type","children","animator","meta","animate","effects",Tt,zt]),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;return(null==t?void 0:t.animator)||(null==(e=null==t?void 0:t.meta)?void 0:e.animator)}function Ut(t){var e;if(t)return null==(e=Bt(t))?void 0:e.definitions}function Vt(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,animate:e})):void 0}function Wt(t){return null==t?void 0:t.children}var Gt=xt.union([xt.string(),xt.tuple([xt.number(),xt.number(),xt.number(),xt.number()])]),qt=xt.union([xt.string(),xt.number(),xt.array(xt.number()),xt.lazy(()=>Ht,{}),xt.object({path:xt.string()}),xt.lazy(()=>xt.object({paths:xt.array(Ie)}),{paths:[]}),xt.lazy(()=>xt.array(be),[])]),Kt=xt.object({time:xt.number().optional(),t:xt.number().optional(),value:qt.optional(),v:qt.optional(),easing:Gt.optional(),e:Gt.optional(),tangentOut:xt.tuple([xt.number(),xt.number()]).optional(),to:xt.tuple([xt.number(),xt.number()]).optional(),tangentIn:xt.tuple([xt.number(),xt.number()]).optional(),ti:xt.tuple([xt.number(),xt.number()]).optional(),selected:xt.boolean().optional()}),Zt=xt.object({segmentCount:xt.number().optional(),extend:xt.enum([Mt.before,Mt.after]).optional(),alternate:xt.boolean().optional()}),Xt=xt.object({value:qt.optional(),keyframes:xt.array(Kt).optional(),kfs:xt.array(Kt).optional(),loop:xt.union([Zt,xt.boolean()]).optional(),autoOrient:xt.boolean().optional()}),Ht=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()}),Yt=xt.union([xt.string(),Ht,xt.object({value:Ht}),Xt]),Qt=xt.record(Xt),Jt=xt.union([xt.string(),xt.array(xt.union([xt.string(),Qt])),Qt]),$t=xt.object({startOn:xt.enum(["load","mouseOver","click","scrollIntoView","programmatic"]).optional(),outAction:xt.enum(["continue","pause","reset","reverse"]).optional(),scrollIntoViewThreshold:xt.number().optional()}),te=xt.object({width:xt.number(),d:xt.string()}),ee=xt.object({fFamily:xt.string(),style:xt.string(),ascent:xt.number(),unitsPerEm:xt.number(),glyphs:xt.record(te)}),ne=xt.object({easings:xt.record(xt.tuple([xt.number(),xt.number(),xt.number(),xt.number()])).optional(),animations:xt.record(Qt).optional(),styles:xt.record(xt.any()).optional(),glyphs:xt.record(ee).optional()}),re=xt.object({phase:xt.enum(["cover","contain","entry","exit","entry-crossing","exit-crossing"]).optional(),fraction:xt.number().optional()}),oe=xt.object({start:re.optional(),end:re.optional()}),ie=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(),pinTop:xt.number().optional(),pinDistance:xt.number().optional(),range:oe.optional()}),ae=xt.object({mode:xt.enum([jt.auto,jt.waapi,jt.frames]).optional(),duration:xt.number().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(),frameRate:xt.number().optional(),trigger:$t.optional(),resetOnFinish:xt.boolean().optional(),definitions:ne.optional(),animateById:xt.record(Jt).optional(),timelineSource:xt.string().optional(),scroll:ie.optional(),debugInstName:xt.string().optional()}),le=xt.object({id:xt.string(),animate:Jt}),se=xt.union([xt.string(),xt.number(),xt.array(xt.number()),xt.object({value:xt.defined()}),Ht]),ue=xt.union([xt.number(),xt.object({value:xt.number()}),Xt]),ce=xt.union([xt.tuple([xt.number(),xt.number()]),xt.object({value:xt.tuple([xt.number(),xt.number()])}),Xt]),fe=xt.union([xt.string(),xt.object({value:xt.string()}),Xt]),de=xt.object({translate:ce.optional(),rotate:ue.optional(),scale:ce.optional(),skew:ue.optional(),origin:ce.optional()}),he=xt.object({copies:xt.number().optional(),translate:ce.optional(),rotate:ue.optional(),skew:ue.optional(),scale:ce.optional(),origin:ce.optional()}),me=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()}),pe=xt.object({d:fe.optional(),animate:Xt.optional()}),ve=xt.object({offset:ue.optional(),range:ce.optional(),subPaths:xt.enum([It.separate,It.combined]).optional()}),ge=xt.object({sourceId:xt.string().optional(),start:xt.number().optional(),stretch:xt.number().optional(),timeCrop:xt.tuple([xt.number(),xt.number()]).optional()}),ye=xt.object({type:xt.enum(["content"]).optional(),sourceId:xt.string().optional(),retime:ge.optional()}),be=xt.object({offset:xt.number(),color:xt.string()}),ke=xt.union([xt.array(be),xt.object({value:xt.array(be)}),Xt]),Ae=xt.object({type:xt.enum([Dt.linear,Dt.radial]),p1:ce.optional(),p2:ce.optional(),c:ce.optional(),r:ue.optional(),fp:ce.optional(),stops:ke.optional(),gradientUnits:xt.enum([Ft.userSpaceOnUse,Ft.objectBoundingBox]).optional(),spreadMethod:xt.enum([Lt.pad,Lt.reflect,Lt.repeat]).optional(),gradientTransform:xt.string().optional()}),we=Ae,xe=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:ue.optional(),textLength:ue.optional()}),Se=xt.object({useGlyphs:xt.boolean().optional()}),Pe=xt.object({transformBy:de.optional(),repeater:he.optional(),maskedBy:me.optional(),clipPath:pe.optional(),trimPath:ve.optional(),clone:ye.optional(),fillGradient:Ae.optional(),strokeGradient:we.optional(),textPath:xe.optional(),text:Se.optional()});function je(t,e){const n=[],r=(t,o)=>{if(t&&t.effects){const r={errors:[],warnings:[],strict:!!(null==e?void 0:e.strict)};if(!Pe.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 Oe=xt.openObject({type:xt.string(),id:xt.string().optional(),meta:xt.any().optional(),effects:Pe.optional(),animate:Jt.optional(),style:xt.union([xt.string(),xt.record(xt.union([xt.string(),xt.number()]))]).optional()},se),Me=xt.openObject(w(A({},Oe._shape),{children:xt.lazy(()=>xt.array(Me),[]).optional()}),se),_e=xt.object({width:xt.union([xt.number(),xt.string()]).optional(),height:xt.union([xt.number(),xt.string()]).optional(),viewBox:xt.string().optional(),animator:ae.optional()}),Ee=xt.openObject(w(A(A({},Oe._shape),_e._shape),{type:xt.literal("svg"),children:xt.array(Me).optional()}),se),Ie=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 Te(t){const e=Ee.isValid(t);return{valid:e,errors:e?[]:["Document failed schema validation"]}}var ze=0;function Ne(){return"_px_"+Date.now().toString(36)+(++ze).toString(36)+Math.random().toString(36).substring(2,6)}function Ce(t){if(null===t||"object"!=typeof t)return t;if(Array.isArray(t))return t.map(t=>Ce(t));const e=t,n={};for(const t of Object.keys(e))n[t]=Ce(e[t]);return n}function Fe(t){var e,n;const r=Ce(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"]),l=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=Ne();o.set(t,n),e.id=n}else e.animate&&(e.id=Ne());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]=Le(r,o);else if(l.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]=Le(r,o));else if("style"===n&&"object"==typeof r&&null!==r)for(const[t,e]of Object.entries(r))"string"==typeof e&&(r[t]=Le(e,o));else"object"==typeof r&&null!==r&&t(r);else if(Array.isArray(r))for(const e of r)t(e)}(r);const s=null==(e=r.animator)?void 0:e.animateById;if(s&&"object"==typeof s){const t={};for(const[e,r]of Object.entries(s))t[null!=(n=o.get(e))?n:e]=r;r.animator=w(A({},r.animator),{animateById:t})}return r}function Le(t,e){return t.replace(/url\(#([^)]+)\)/g,(t,n)=>{const r=e.get(n);return r?"url(#"+r+")":t})}var De=new Set(["script","foreignobject"]),Re=new Set(["href","xlink:href","src","filter","clippath","mask","markerstart","markermid","markerend"]),Be=new Set(["href","xlink:href","src"]),Ue=new Set(["mixBlendMode","isolation"]),Ve=/^data:image\/(?:png|jpe?g|gif|webp|bmp);base64,/i,We=/^data:image\/svg\+xml(?:;[^,]*)?,/i,Ge=/^data:image\/[^;,]*;base64,([A-Za-z0-9+/]{8})/i,qe=["iVBORw0K","/9j/","R0lGOD","UklGR","Qk"];function Ke(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(Re.has(n)){const t=String(e);return t.startsWith("#")||/^url\(#[^)]+\)$/.test(t)||Be.has(n)&&(Ve.test(t)||We.test(t)||function(t){const e=Ge.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 Ze(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||o.kfs)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 Xe(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 He(t){var e,n;return null!=(n=null!=(e=t.time)?e:t.t)?n:0}function Ye(t){var e;return null!=(e=t.easing)?e:t.e}function Qe(t){var e,n,r;const o=null!=(e=t.keyframes)?e:t.kfs;if(!Array.isArray(o))return!1;if(t.autoOrient)return!0;for(const t of o)if((null!=(n=t.tangentIn)?n:t.ti)||(null!=(r=t.tangentOut)?r:t.to))return!0;return!1}var Je=new WeakMap;function $e(t,e,n,r){var o,i;let a=Je.get(t);const l=null==a?void 0:a.get(e);if(l)return l;const s=null!=(o=t.tangentOut)?o:t.to,u=null!=(i=e.tangentIn)?i:e.ti,c=[n[0]+(s?s[0]:0),n[1]+(s?s[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,Je.set(t,a)),a.set(e,h),h}function tn(t,e,n,r,o,i){const a=$e(t,e,n,r),l=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,l=i;for(;a<l;){const t=a+l>>>1;o[t]<n?a=t+1:l=t}const s=o[l-1],u=o[l]-s,c=u>0?(n-s)/u:0;return r[l-1]+c*(r[l]-r[l-1])}(a.lut,o),s=X(a.P0,a.P1,a.P2,a.P3,l);if(!i)return{translate:s};const u=Y(a.P0,a.P1,a.P2,a.P3,l);return{translate:s,rotateDeg:180*Math.atan2(u[1],u[0])/Math.PI}}var en=.5,nn=5,rn=32;function on(t,e){var n,r,o,i;if(!Qe(t))return t;const a=null!=(n=t.keyframes)?n:t.kfs;if(!Array.isArray(a)||a.length<2)return t;const l=!!t.autoOrient,s=null!=(r=null==e?void 0:e.flatnessTolerance)?r:en,u=null!=(o=null==e?void 0:e.rotationTolerance)?o:nn,c=null!=(i=null==e?void 0:e.maxSamplesPerSegment)?i:rn,f=[],d=Xe(a[0]);if(!d)return t;const h=l?function(t,e){const n=Xe(t),r=Xe(e);if(!n||!r)return 0;const o=$e(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}(a[0],a[1]):void 0;f.push(ln(He(a[0]),cn(sn(a[0]),sn(a[0]),0,d,h,l)));for(let t=0;t<a.length-1;t++){const e=a[t],n=a[t+1],r=Xe(e),o=Xe(n);r&&o?(l&&t>0&&dn(f,e,n,r,o,u),mn(f,e,n,r,o,l,s,u,c)):f.push(ln(He(n),cn(sn(n),sn(n),1,null!=o?o:[0,0],void 0,l)))}const m=Ye(a[a.length-1]);m&&(f[f.length-1].e=m),l&&an(f);const p={kfs:f};return void 0!==t.loop&&(p.loop=t.loop),p}function an(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 ln(t,e){return{t:t,v:e}}function sn(t){var e;const n=null!=(e=t.value)?e:t.v;if(n&&"object"==typeof n&&!Array.isArray(n))return n}function un(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 cn(t,e,n,r,o,i){const a={translate:r},l=new Set;if(t)for(const e of Object.keys(t))l.add(e);if(e)for(const t of Object.keys(e))l.add(t);for(const r of l){if("translate"===r)continue;if("rotate"===r&&i)continue;const o=null==t?void 0:t[r],l=null==e?void 0:e[r];void 0===o&&void 0===l||(a[r]=un(o,l,n))}return void 0!==o&&(a.rotate=o+fn(t,e,n)),a}function fn(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=un(r,o,n);return"number"==typeof i?i:0}function dn(t,e,n,r,o,i){var a;const l=t[t.length-1],s=null!=(a=l.v)?a:l.value,u=null==s?void 0:s.rotate;if("number"!=typeof u)return;const c=sn(e),f=u-fn(c,c,0),d=$e(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=He(e),g=Math.min(v+hn,(v+He(n))/2),y=cn(sn(e),sn(e),0,r,m,!0);t.push(ln(g,y))}var hn=.05;function mn(t,e,n,r,o,i,a,l,s){const u=$e(e,n,r,o),c=He(e),f=He(n),d=Ye(e),h=(m=d)?I([m[1],m[0],m[3],m[2]]):t=>t;var m;const p=sn(e),v=sn(n),g=function(t,e,n,r,o){const i=[];pn(t.P0[0],t.P1[0],t.P2[0],t.P3[0],i),pn(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 l=[],s={remaining:o-a.length};for(let o=0;o<a.length-1;o++)vn(a[o],a[o+1],l,t,e,n,r,s);return l}(u,i,a,l,s),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}=z(b,r),l=0===e?A:t.length-1;o?t[l].e=o:delete t[l].e;const s=c+n.u*(f-c),u=cn(p,v,n.p,n.pos,n.rotateDeg,i);t.push(ln(s,u)),b=a,k=n.u}}function pn(t,e,n,r,o){const i=e-t,a=n-e,l=i-2*a+(r-n),s=2*(a-i),u=i;if(Math.abs(l)<1e-10){if(Math.abs(s)>1e-10){const t=-u/s;t>1e-6&&t<.999999&&o.push(t)}return}const c=s*s-4*l*u;if(c<0)return;const f=Math.sqrt(c),d=(-s-f)/(2*l),h=(-s+f)/(2*l);d>1e-6&&d<.999999&&o.push(d),h>1e-6&&h<.999999&&o.push(h)}function vn(t,e,n,r,o,i,a,l){const s=(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,s),m=X(r.P0,r.P1,r.P2,r.P3,t+.75*f),p=Math.max(gn(d,u,c),gn(h,u,c),gn(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,l=180*Math.atan2(o[1],o[0])/Math.PI;let s=Math.abs(i-l);s>180&&(s=360-s),s>a&&(v=!1)}p<=i&&v||l.remaining<=0||f<1e-6?n.push(e):(l.remaining-=1,vn(t,s,n,r,o,i,a,l),vn(s,e,n,r,o,i,a,l))}function gn(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 yn(t,e){const n=bn(t,e);return null!=n?n:t}function bn(t,e){let n,r;if(t.children)for(let r=0;r<t.children.length;r++){const o=bn(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&&Qe(n)){const o=on(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 kn=1;function An(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=>An(t[n],e[n]))}function wn(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,l=o[5]||0;n.o[n.o.length-1]=[t,e],n.v.push([a,l]),n.i.push([r,i]),n.o.push([a,l])}else"Z"===r||"z"===r?n.c=!0:console.warn('Unsupported path command "'+r+'"')}return e}function xn(t){return t.startsWith("path(")&&t.endsWith(")")?t.slice(5,-1):/^[MmZzLlHhVvCcSsQqTtAa]/.test(t)?t:void 0}function Sn(t){return"string"==typeof t&&void 0!==xn(t)}function Pn(t){if(t&&"object"==typeof t&&"string"==typeof t.path){const e=xn(t.path);return e?{paths:wn(e)}:t}if(t&&"object"==typeof t&&"paths"in t){const e=t.paths;if(Array.isArray(e)&&e.length>0&&Sn(e[0])){const t=[];for(const n of e){const e=xn(n);e&&t.push(...wn(e))}return{paths:t}}return t}if(Array.isArray(t)){if(t.length>0&&Sn(t[0])){const e=[];for(const n of t){const t=xn(n);t&&e.push(...wn(t))}return{paths:e}}return{paths:t}}return Sn(t)?{paths:wn(xn(t))}:t}function jn(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 On(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 Mn(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?P(e,n,r):D.has(t)||"stroke-dasharray"===t||"strokeDasharray"===t?j(e||[],n||[],r):P(+(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]=P(+(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]=j(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,l,s;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!=(l=f[0].t)?l:0,y=(null!=(s=f[f.length-1].t)?s: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,P=[],j=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],l=r.relT-o.relT,s=(a-o.relT)/l,u=o.e?I(o.e)(s):s,c=Mn(t,o.v,r.v,u),{left:f}=z(o.e,s);return P.length>0&&o.relT<=a&&(P[P.length-1].e=f),void P.push({t:e+a*y,v:c,e:void 0})}const l=P.length>0?P[P.length-1]:O,s=j&&0===n&&void 0!==l&&Math.abs((null!=(o=l.t)?o:0)-(e+r.relT*y))<1e-9;if(s){if(An(l.v,r.v)){P.length>0?(l.e=r.e,l.tangentOut=r.tangentOut):(M=r.e,_=!0);continue}P.length>0&&(delete l.tangentIn,delete l.tangentOut)}const u={t:e+r.relT*y+(s?kn: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),P.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,l=a.e?I(a.e)(o):o,s=Mn(t,a.v,r.v,l),{right:u}=z(a.e,o);P.push({t:e,v:s,e:u})}const l={t:e+(r.relT-i)*y,v:r.v,e:n<o.length-1?r.e:void 0};r.tangentIn&&(l.tangentIn=r.tangentIn),r.tangentOut&&(l.tangentOut=r.tangentOut),P.push(l)}}(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?[...P,...e]:_&&e.length>0?[...e.slice(0,-1),w(A({},e[e.length-1]),{e:M}),...P]:[...e,...P]}function En(t,e,n,r){var o,i,a,l,s,u,c;const f=e.keyframes||e.kfs||[],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!=(l=e.easing)?l:e.e;"d"===t&&(f=Pn(f));const m=G(t)?K(t):t;L.has(m)&&(f=null!=(s=F(f))?s:f);const p={t:n,v:f,e:jn(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?_n(t,d,m,n):d}function In(t,e,n){var r;const o=e.loop;if(null==o||!1===o)return e;const i=!0===o?{}:o,a=null!=(r=e.keyframes)?r:e.kfs;if(!Array.isArray(a)||a.length<2)return e;const l=G(t)?K(t):t,s=L.has(l),u=a.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=Pn(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}),c={kfs:_n(t,u,i,n)};return void 0!==e.autoOrient&&(c.autoOrient=e.autoOrient),c}function Tn(t,e){const n=zn(t,e);return null!=n?n:t}function zn(t,e){let n,r;if(t.children)for(let r=0;r<t.children.length;r++){const o=zn(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=In(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 Nn=0;function Cn(t,e=Ot.waapi){const n=Bt(t)||{},r=Ut(t),o=n.duration||1e3,i=[],a=(t,n)=>{if(!n)return null;const i=function(t,e){if(!t)return[];const n=[];if("string"==typeof t){const r=On(t,e);r&&n.push(r)}else if(Array.isArray(t))for(const r of t){const t=On(r,e);t&&n.push(t)}else n.push(t);return n}(n,r);if(0===i.length)return null;const a=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 l=En(i,a,e,n);if(l.length>0){const t={kfs:l};void 0!==a.autoOrient&&(t.autoOrient=a.autoOrient),void 0!==a.loop&&(t.loop=a.loop),o[i]=r===Ot.waapi&&"transform"===i?on(t):t}}return o}(function(t){const e={};for(const n of t)for(const[t,r]of Object.entries(n))e[t]=r;return e}(i),o,r,e);return 0===Object.keys(a).length?null:{id:t,animate:a}},l=Vt(t);if(l)for(const t of l){const e=a(t.id,t.animate);e&&i.push(e)}const s=t=>{const e=t.animate;if(e&&Object.keys(e).length>0){const n=t.id||"_px_el_"+ ++Nn;t.id=n;const r=a(n,e);r&&i.push(r)}if(t.children)for(let e=0;e<t.children.length;e++)s(t.children[e])};if(t.children)for(let e=0;e<t.children.length;e++)s(t.children[e]);return i}function Fn(t,e,n){var r,o,i,a,l,s,u;const c=e.kfs||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 l=0;l<o;l++){const s=null!=(n=t[l].t)?n:0,u=null!=(r=t[l+1].t)?r:0;if(s<=e&&e<=u){i=t[l],a=t[l+1];break}e>u&&l===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!=(l=null==d?void 0:d.v)?l:null==d?void 0:d.value;if("d"===y)b=M(null!=(s=null==k?void 0:k.paths)?s: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=j(k||[],A||[],h).join(" "),y=t;else if("transform"!==y||null===k||"object"!=typeof k||Array.isArray(k))"translate"===y?(b="translate("+j(k||[0,0],A||[0,0],h).join(",")+")",y="transform"):"rotate"===y?(b="rotate("+P(+(k||0),+(A||0),h)+")",y="transform"):"scale"===y?(b="scale("+j(k||[1,1],A||[1,1],h).join(",")+")",y="transform"):b=P(+(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]=P(+(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=j(t||o,r||o,h);n[e]=i}}if(Qe(e)){const t=k.translate,r=A.translate;if(Array.isArray(t)&&Array.isArray(r)){const o=tn(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 Ln(t,e){const n={};for(const[r,o]of Object.entries(t)){const t=Fn(r,o,e);t&&(n[t.k]=t.v)}return n}function Dn(t){if(null===t||"object"!=typeof t)return t;if(Array.isArray(t))return t.map(Dn);const e={};for(const n of Object.keys(t))e[n]=Dn(t[n]);return e}function Rn(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 Bn(t){const e="number"==typeof t?t:"string"==typeof t?parseFloat(t):NaN;return Number.isFinite(e)?e:0}function Un(t){var e;const n=Bn(t.x),r=Bn(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 Vn(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=Gn(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=Wn(t.width),r=Wn(t.height);return void 0!==n&&void 0!==r?[n,r]:[1,1]}(t),a=[],l=Kn(t,n,r,()=>"_lw_use_mat_"+ ++o,a,i);if(0===a.length)return l;const s={type:"defs",children:a},u=[...null!=(e=l.children)?e:[],s];return w(A({},l),{children:u})}function Wn(t){if("number"==typeof t)return t;if("string"==typeof t){const e=parseFloat(t);return Number.isFinite(e)?e:void 0}}function Gn(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 Kn(t,e,n,r,o,i){if("use"===t.type&&"string"==typeof t.href){const a=Gn(t.href);if(a&&n.has(a)){const l=e.get(a);if(l)return function(t,e,n,r,o,i,a){var l,s,u,c;const f=Dn(e);Rn(f,o);const d="symbol"===f.type?qn(f.viewBox):void 0,h=null!=(s=null!=(l=Wn(t.width))?l:null==d?void 0:d[2])?s:a[0],m=null!=(c=null!=(u=Wn(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[l,s,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===l&&0===s||m.push("translate("+-l+","+-s+")"),m.length&&(a.transform=m.join(""));const p=e();return n.push({type:"clipPath",id:p,children:[{type:"rect",x:l,y:s,width:u,height:c}]}),a.clipPath="url(#"+p+")",a}(f,o,i,h,m):f,v=Kn(p,n,r,o,i,a),g=w(A({},t),{type:"g",children:[v]});return delete g.href,delete g.width,delete g.height,Un(g)}(t,l,e,n,r,o,i)}}if(!t.children)return t;let a=!1;const l=t.children.map(t=>{const l=Kn(t,e,n,r,o,i);return l!==t&&(a=!0),l});return a?w(A({},t),{children:l}):t}function Zn(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 Xn(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(Yn),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 Hn(t,e,n,r){var o,i,a,l;const s=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]=s(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!=(l=null!=(i=n.base)?i:null==(o=n.keyframes[0])?void 0:o.value)?l:null==(a=n.keyframes[0])?void 0:a.v;void 0!==d&&(t[e]=s(d))}function Yn(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 Qn(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 Jn(t,e,n){if(!e)return t;delete t.transform;let r=t;return r=tr(r,e.origin,!0),r=$n(r,"scale",e.scale),r=$n(r,"skew",e.skew),r=$n(r,"rotate",e.rotate),r=tr(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=tr(r,e.origin,!0),r=$n(r,"translate",e.translate),r=tr(r,e.origin,!1)):r=$n(r,"translate",e.translate),r!==t&&t.id&&(r.id=t.id,delete t.id),r}function $n(t,e,n,r){if(void 0===n)return t;const o=Xn(n);if("static"===o.kind)return{type:"g",transform:{value:Zn(e,o.value,void 0)},children:[t]};if("animated"===o.kind){const n={keyframes:o.keyframes.map(t=>Qn(t,Zn(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 tr(t,e,n){if(void 0===e)return t;const r=Xn(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=>Qn(t,{translate:o(t.value)}))};return void 0!==r.loop&&(e.loop=r.loop),{type:"g",animate:{transform:e},children:[t]}}return t}function er(t,e){return"_lw_"+e+"_"+t.nextId++}function nr(t){return"string"==typeof t?t.replace(/^#/,""):void 0}function rr(t,e){var n;"string"==typeof t.id&&e.set(t.id,t),null==(n=t.children)||n.forEach(t=>rr(t,e))}var or=Dn;function ir(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=nr(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=>ir(t,e,n))}function ar(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 lr(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 sr(t,e,n,r){if(!e)return t;const o=er(n,"grad"),i=function(t,e){const n={type:t.type===Dt.radial?"radialGradient":"linearGradient",id:e};return t.type===Dt.linear?(ur(n,"x1","y1",t.p1),ur(n,"x2","y2",t.p2)):(ur(n,"cx","cy",t.c),function(t,e,n){const r=Xn(n);"absent"!==r.kind&&Hn(t,"r",r,{asString:!0})}(n,0,t.r),ur(n,"fx","fy",t.fp)),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=Xn(t);if("absent"===i.kind)return[];if("static"===i.kind)return Array.isArray(i.value)?i.value.map(cr):[];const a=i.keyframes;if(!a.length)return[];const l=i.loop;let s=0;for(const t of a){const n=null!=(e=t.value)?e:t.v;Array.isArray(n)&&n.length>s&&(s=n.length)}if(!s)return[];const u=null!=(n=a[0].value)?n:a[0].v,c=[];for(let t=0;t<s;t++){const e=null!=(o=null!=(r=null==u?void 0:u[t])?r:fr(a,0,t))?o:{offset:t/Math.max(1,s-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,l,s,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!=(l=r.value)?l:r.v,m=null!=(s=null==h?void 0:h[n])?s:fr(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:dr(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,l))}(t.stops),n}(e,o);return n.defs.push(i),t[r]="url(#"+o+")",t}function ur(t,e,n,r){var o,i,a;const l=Xn(r);if("absent"===l.kind)return;if("static"===l.kind)return t[e]=String(l.value[0]),void(t[n]=String(l.value[1]));const s=t=>{const e={keyframes:l.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!==l.loop&&(e.loop=l.loop),e},u=null!=(o=t.animate)?o:{};u[e]=s(0),u[n]=s(1),t.animate=u;const c=null!=(a=l.base)?a:null==(i=l.keyframes[0])?void 0:i.value;Array.isArray(c)&&(t[e]=String(c[0]),t[n]=String(c[1]))}function cr(t){return{type:"stop",offset:dr(t.offset),stopColor:t.color}}function fr(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 dr(t){return Math.round(1e3*t)/10+"%"}function hr(t){return"string"==typeof t?t:t&&"object"==typeof t&&"string"==typeof t.path?t.path:void 0}function mr(t,e,n){if(!e)return t;const r=function(t,e){var n;const r=Xn(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=pr(o,"translate",e.translate,void 0),o=pr(o,"rotate",e.rotate,r),o=pr(o,"scale",e.scale,r),o}function pr(t,e,n,r,o){if(void 0===n)return t;const i=Xn("scale"===e&&Array.isArray(n)?[n[0]/100,n[1]/100]:n);if("static"===i.kind)return{type:"g",transform:{value:Zn(e,vr(e,i.value),r)},children:[t]};if("animated"===i.kind){const n={keyframes:i.keyframes.map(t=>{const n=Qn(t,Zn(e,vr(e,t.value),r));return"translate"===e?A(A({},n),gr(t)):n})};return void 0!==i.loop&&(n.loop=i.loop),{type:"g",animate:{transform:n},children:[t]}}return t}function vr(t,e){return"translate"===t?[-e[0],-e[1]]:"rotate"===t?-e:[1/e[0],1/e[1]]}function gr(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 yr(t){const e=t.animate&&"object"==typeof t.animate&&!Array.isArray(t.animate)?t.animate:void 0;return!(!e||!e.transform)}function br(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 kr(t,e){let n=0,r=0;for(const o of t)if(o.translateKeyframes&&o.translateKeyframes.length){const t=Ar(o.translateKeyframes,e);n+=t[0],r+=t[1]}else o.translate&&(n+=o.translate[0],r+=o.translate[1]);return[n,r]}function Ar(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 wr(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 l={};if("string"==typeof i){const t=function(t,e){const n=/([a-zA-Z]+)\s*\(([^)]*)\)/g;let r,o=0,i=0,a=!1,l=!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):l=!0}return l&&e.warnings.push("maskedBy ancestor: non-translate transform in string ignored: "+t),a?[o,i]:void 0}(i,e);t&&(l.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)&&(l.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,l=null!=(o=null!=(r=a.time)?r:a.t)?o:0;t&&"object"==typeof t&&Array.isArray(t.translate)&&(i.push({time:l,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&&(l.translateKeyframes=i)}return l.translate||l.translateKeyframes?l:void 0}var xr="content";function Sr(t,e,n){if(!e)return;const r=nr(e.sourceId);if(!r)return void(e.type===xr&&n.errors.push("clone: content ref missing sourceId"));const o=e.type===xr&&n.contentRefInnerIds.get(r)||r;t.href="#"+o}function Pr(t,e){const n={};return void 0!==t.translate&&(n.translate=jr(t.translate,t=>[t[0]*e,t[1]*e])),void 0!==t.rotate&&(n.rotate=jr(t.rotate,t=>t*e)),void 0!==t.skew&&(n.skew=jr(t.skew,t=>t*e)),void 0!==t.scale&&(n.scale=function(t,e){return jr(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 jr(t,e,n=!1){const r=Xn(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 Or=!1;function Mr(t){var e,n;return{start:null!=(e=t.start)?e:0,stretch:null!=(n=t.stretch)?n:1}}var _r=1;function Er(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-_r),value:0}]:[],{time:Math.max(0,r),value:1},{time:o,value:1},{time:o+_r,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 Ir(t,e){return{start:e.start+e.stretch*t.start,stretch:e.stretch*t.stretch}}function Tr(t){var e,n;return null==(n=null==(e=t.effects)?void 0:e.clone)?void 0:n.retime}function zr(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 Nr(t,e,n){const r=nr(t.href);if(!r)return void n.errors.push("retime: <use> has no href to follow");const o=Cr(r,e,n,new Set);if(o)if(Or){const e=n.idMap.get(o);t.type="g",delete t.href,t.children=[e],Un(t),n.defs=n.defs.filter(t=>t!==e)}else t.href="#"+o}function Cr(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=or(o);if(function(t,e){Rn(t,()=>er(e,"retimed"))}(i,n),"use"===o.type?Lr(i,e.start,e.stretch):Fr(i,e.start,e.stretch),zr(i),"use"===o.type&&o.href){const a=nr(o.href);if(a){const l=Tr(o),s=l?Ir(Mr(l),e):e,u=new Set(r);u.add(t);const c=Cr(a,s,n,u);c&&(i.href="#"+c)}}else!function(t,e,n,r,o){const i=t=>{var a;const l=Tr(t);if("use"===t.type&&l&&t.href){const i=nr(t.href);if(i){const a=Ir(Mr(l),e),s=new Set(r);s.add(o);const u=Cr(i,a,n,s);u&&(t.href="#"+u)}zr(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 Fr(t,e,n){var r;Lr(t,e,n),null==(r=t.children)||r.forEach(t=>Fr(t,e,n))}function Lr(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 Dr=48,Rr=/[MmLlHhVvCcSsQqTtAaZz]/;function Br(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 Ur(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,l=0,s=0,u=0,c=0,f=0,d="";const h=()=>parseFloat(e[r++]),m=(t,e,r)=>{const a=[o,i],l=J(a,t,e,r,Dr);n.push({P0:a,P1:t,P2:e,P3:r,lut:l,len:l.ds[l.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];Rr.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,l=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)];s=e[0],u=e[1],m(t,e,r)}else if("S"===v){const t="C"===d.toUpperCase()||"S"===d.toUpperCase()?[2*o-s,2*i-u]:[o,i],e=[h()+(n?o:0),h()+(n?i:0)],r=[h()+(n?o:0),h()+(n?i:0)];s=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}=Br([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}=Br([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,l),o=a,i=l,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,l=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 l=r[a-1],s=r[a]-l,u=s>0?(e-l)/s:0;return n[a-1]+u*(n[a]-n[a-1])}(o.lut,i):0,[l,s]=X(o.P0,o.P1,o.P2,o.P3,a),[u,c]=Y(o.P0,o.P1,o.P2,o.P3,a);return{x:l,y:s,angle:Math.atan2(c,u)}};return{totalLength:r,closed:a,sampleAtDistance(t){if(a&&r>0&&(t<0||t>r))return l((t%r+r)%r);if(!a&&(t<0||t>r)){const e=t<0?0:r,n=l(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 l((n=r,(e=t)<0?0:e>n?n:e));var e,n}}}var Vr=.15;function Wr(t){const e=Xn(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 Gr(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 l=null!=(i=t.text)?i:t.textContent;if("string"==typeof l&&(e+=l.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 Kr(t,e){if(!e||null==t)return t;const n=Xn(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 Zr(t,e){var n;if("clip"===e.pathOverflow)return{d:t,startShift:0};const r=Ur(t);if(!r||r.closed||r.totalLength<=0)return{d:t,startShift:0};const o=r.totalLength,i=Vr*o,a=Wr(e.startOffset),l=Wr(e.textLength).max||(null!=(n=e.advance)?n:0),s=Math.max(0,-a.min),u=Math.max(0,a.max+l-o),c=s>0?s+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 Xr(t,e,n){null!=n&&Hn(t,e,Xn(n),{asString:!0})}var Hr=(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 Yr(t,e){return Math.round(t)===t?""+Math.round(t):t.toFixed(e)}function Qr(t,e){let n="";for(let r=0;r<t.length;r++){const o=Yr(t[r],e);r>0&&45!==o.charCodeAt(0)&&(n+=" "),n+=o}return n}function Jr(t,e,n){return[t[0]*e+t[2]*n+t[4],t[1]*e+t[3]*n+t[5]]}var $r=/([MLCQZ])|(-?\d*\.?\d+(?:e[-+]?\d+)?)/gi;function to(t,e,n=2){const r=[];let o;for($r.lastIndex=0;null!==(o=$r.exec(t));)r.push(o[0]);let i="",a=0;const l=()=>parseFloat(r[a++]);for(;a<r.length;){const t=r[a++];if("M"===t||"L"===t){const[r,o]=Jr(e,l(),l());i+=t+Qr([r,o],n)}else if("C"===t){const[t,r]=Jr(e,l(),l()),[o,a]=Jr(e,l(),l()),[s,u]=Jr(e,l(),l());i+="C"+Qr([t,r,o,a,s,u],n)}else if("Q"===t){const[t,r]=Jr(e,l(),l()),[o,a]=Jr(e,l(),l());i+="Q"+Qr([t,r,o,a],n)}else"Z"!==t&&"z"!==t||(i+="Z")}return i}var eo=16,no=["fontFamily","fontSize","fontWeight","fontStyle","textAnchor","letterSpacing","wordSpacing","textDecoration","textTransform","whiteSpace","x","y","dx","dy","lengthAdjust","fill","stroke","strokeWidth","effects",Tt,zt,"xml:space"];function ro(t){if("number"==typeof t)return t;if("string"==typeof t){const e=parseFloat(t);return isNaN(e)?void 0:e}}function oo(t){return"string"==typeof t?t:void 0}function io(t,e){var n,r,o,i,a,l,s;return{fontFamily:null!=(n=oo(t.fontFamily))?n:e.fontFamily,fontSize:null!=(r=ro(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!=(l=ro(t.letterSpacing))?l:e.letterSpacing,wordSpacing:null!=(s=ro(t.wordSpacing))?s:e.wordSpacing}}function ao(t){var e,n,r;return{fontFamily:oo(t.fontFamily),fontSize:null!=(e=ro(t.fontSize))?e:eo,fill:t.fill,stroke:t.stroke,strokeWidth:t.strokeWidth,letterSpacing:null!=(n=ro(t.letterSpacing))?n:0,wordSpacing:null!=(r=ro(t.wordSpacing))?r:0}}function lo(t){const e={};return void 0!==t.fill&&(e.fill=t.fill),void 0!==t.stroke&&(e.stroke=t.stroke),void 0!==t.strokeWidth&&(e.strokeWidth=t.strokeWidth),e}function so(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 uo(t){const e=Object.keys(t);return 1===e.length?t[e[0]]:void 0}var co=.6;function fo(t,e){if(t<=0||e<=0)return"";const n=.08*t,r=.92*t,o=.92*-e,i=r-n,a=-o,l=Math.max(1,.12*Math.min(i,a)),s="M"+n+" 0L"+r+" 0L"+r+" "+o+"L"+n+" "+o+"Z";if(i<=2*l||a<=2*l)return s;const u=n+l,c=r-l,f=-l,d=o+l;return s+"M"+u+" "+f+"L"+u+" "+d+"L"+c+" "+d+"L"+c+" "+f+"Z"}function ho(t,e){var n,r,o,i;const{glyphs:a,create:l=Hr,warnings:s}=e,u=uo(a),c={x:null!=(n=ro(t.x))?n:0,y:null!=(r=ro(t.y))?r:0},f=[],d=[{start:c.x,end:c.x}];let h=0;const m=(t,e)=>{var n;const r=so(e,a,u,s),o=(null==r?void 0:r.unitsPerEm)||1e3,i=e.fontSize/o,l=null!=(n=null==r?void 0:r.ascent)?n:.9*o,m=lo(e);for(let n=0;n<t.length;n++){const a=t.charAt(n),s=null==r?void 0:r.glyphs[a];if(s&&s.d)f.push({glyphD:s.d,m:[i,0,0,i,c.x,c.y],paint:m,line:h,x:c.x,y:c.y,scale:i}),c.x+=s.width*i;else if(/\S/.test(a)){const t=s&&s.width>0?s.width:co*o;f.push({glyphD:fo(t,l),m:[i,0,0,i,c.x,c.y],paint:m,line:h,x:c.x,y:c.y,scale:i}),c.x+=t*i}else c.x+=(s?s.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=io(t,e),l=ro(t.x),s=ro(t.y);void 0!==l&&(c.x=l,h=d.length,d.push({start:c.x,end:c.x})),void 0!==s&&(c.y=s),c.x+=null!=(n=ro(t.dx))?n:0,c.y+=null!=(r=ro(t.dy))?r:0;const u=null!=(o=oo(t[zt]))?o:oo(t[Tt]);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=ao(t);if(t.children)for(const e of t.children)p(e,v);const g=null!=(o=oo(t[zt]))?o:oo(t[Tt]);g&&!(null==(i=t.children)?void 0:i.length)&&m(g,v);const y=oo(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 So(t,xo(f,l,s),l)}function mo(t,e){var n,r,o,i,a,l;if(null==(n=e.alongPath)?void 0:n.pathD)return function(t,e,n){var r,o;const{glyphs:i,warnings:a,alongPath:l}=n,s=Ur(e);if(!s)return null==a||a.push("textGlyphs: unparsable along-path geometry (caret)"),[];const u=uo(i),c=[];let f=0;const d=(t,e)=>{var n,r,o;const l=io(t,e),s=null!=(n=oo(t[zt]))?n:oo(t[Tt]);if(s&&!(null==(r=t.children)?void 0:r.length)){const t=so(l,i,u,a),e=(null==t?void 0:t.unitsPerEm)||1e3,n=l.fontSize/e,r=(null!=(o=null==t?void 0:t.ascent)?o:.9*e)*n;for(let e=0;e<s.length;e++){const o=s.charAt(e),i=null==t?void 0:t.glyphs[o],a=(i?i.width:0)*n,u=a+l.letterSpacing+(" "===o?l.wordSpacing:0);c.push({advStart:f,advEnd:f+u,glyphW:a,ascent:r,fontSize:l.fontSize}),f+=u}}if(t.children)for(const e of t.children)d(e,l)};d(t,ao(t));const h=f,m=Xn(null==l?void 0:l.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=Xn(null==l?void 0:l.startOffset),{along:y,perp:b}=vo(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(s.sampleAtDistance(e)),o=A(s.sampleAtDistance(n)),i=s.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:s,warnings:u}=e,c=uo(s),f={x:null!=(r=ro(t.x))?r:0,y:null!=(o=ro(t.y))?o:0},d=[],h=[{start:f.x,end:f.x}];let m=0;const p=(t,e)=>{var n;const r=so(e,s,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),l=null==r?void 0:r.glyphs[o],s=(l?l.width:0)*i+e.letterSpacing+(" "===o?e.wordSpacing:0);d.push({x:f.x,y:f.y,width:s,ascent:a,fontSize:e.fontSize,line:m}),f.x+=s,h[m].end=f.x}},v=(t,e)=>{var n,r,o,i;const a=io(t,e),l=ro(t.x),s=ro(t.y);void 0!==l&&(f.x=l,m=h.length,h.push({start:f.x,end:f.x})),void 0!==s&&(f.y=s),f.x+=null!=(n=ro(t.dx))?n:0,f.y+=null!=(r=ro(t.dy))?r:0;const u=null!=(o=oo(t[zt]))?o:oo(t[Tt]);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=ao(t);if(t.children)for(const e of t.children){const t=d.length;if(v(e,g),d.length===t){const t=io(e,g),n=so(t,s,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=oo(t[zt]))?a:oo(t[Tt]);y&&!(null==(l=t.children)?void 0:l.length)&&p(y,g);const b=oo(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 po(t,e,n,r,o=0){const{x:i,y:a,angle:l}=t.sampleAtDistance(e),s=Math.cos(l),u=Math.sin(l),c=r/2;return[n*s,n*u,-n*u,n*s,i-n*s*c-o*u,a-n*u*c+o*s]}function vo(t){var e,n,r;return{along:(null!=(e=ro(t.x))?e:0)+(null!=(n=ro(t.dx))?n:0),perp:null!=(r=ro(t.dy))?r:0}}function go(t,e,n,r,o,i){const{glyphs:a,create:l=Hr,warnings:s}=r,u=e?Ur(e):null;if(!u)return null==s||s.push("textGlyphs: unparsable along-path geometry"),null;const c=uo(a),{cells:f,width:d}=function(t,e,n,r){const o=[];let i=0;const a=(t,l)=>{var s,u,c;const f=io(t,l),d=null!=(s=oo(t[zt]))?s:oo(t[Tt]);if(d&&!(null==(u=t.children)?void 0:u.length)){const t=so(f,e,n,r);if(t){const e=f.fontSize/t.unitsPerEm,n=null!=(c=t.ascent)?c:.9*t.unitsPerEm,r=lo(f);for(let a=0;a<d.length;a++){const l=d.charAt(a),s=t.glyphs[l];if(s&&s.d){const t=s.width*e;o.push({glyphD:s.d,widthEm:s.width,scale:e,paint:r,midBase:i+t/2}),i+=t}else if(/\S/.test(l)){const a=s&&s.width>0?s.width:co*t.unitsPerEm,l=a*e;o.push({glyphD:fo(a,n),widthEm:a,scale:e,paint:r,midBase:i+l/2}),i+=l}else i+=(s?s.width:0)*e;i+=f.letterSpacing+(" "===l?f.wordSpacing:0)}}}if(t.children)for(const e of t.children)a(e,f)};return a(t,ao(t)),{cells:o,width:i}}(t,a,c,s);if(!f.length)return So(t,[],l);const{along:h,perp:m}=vo(t),p=yo(n),v=yo(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 So(t,function(t,e,n,r,o,i,a,l=0){const s=Math.max(e.totalLength/bo,.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=to(f.glyphD,t),h=(t,n)=>{const{x:r,y:o,angle:i}=e.sampleAtDistance(t),a=Math.cos(i),s=Math.sin(i);return{time:n,value:{translate:[Ao(r-l*s,3),Ao(o+l*a,3)],rotate:Ao(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),l=Math.min(ko,Math.max(1,Math.ceil(Math.abs(a-i)/s)));for(let t=1;t<=l;t++){const r=e+t/l*(o-e);v(n(f,r),r)}}an(m);const g={keyframes:m};void 0!==o&&(g.loop=o);const y={transform:g};if(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({d:d},wo(f.paint)),{animate:y}),[]))}return c}(f,u,n,e,r,l,y,m),l)}const b=g(v.at(0)),k=h+p.at(0);return So(t,xo((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,m:po(u,k+t.midBase*b,t.scale,t.widthEm,m)})),l,s),l)}function yo(t){var e;const n=Xn(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 bo=48,ko=64;function Ao(t,e){const n=b(10,e);return Math.round(t*n)/n}function wo(t){const e={};return void 0!==t.fill&&(e.fill=t.fill),void 0!==t.stroke&&(e.stroke=t.stroke),void 0!==t.strokeWidth&&(e.strokeWidth=t.strokeWidth),e}function xo(t,e,n){var r,o,i;if(!t.length)return null==n||n.push("textGlyphs: nothing to render"),[];const a=new Map;for(const e of t){const t=JSON.stringify([null!=(r=e.paint.fill)?r:null,null!=(o=e.paint.stroke)?o:null,null!=(i=e.paint.strokeWidth)?i:null]),n=to(e.glyphD,e.m),l=a.get(t);l?l.d+=n:a.set(t,{paint:e.paint,d:n})}const l=[];for(const{paint:t,d:n}of a.values())l.push(e("path",A({d:n},wo(t)),[]));return l}function So(t,e,n){const r={};for(const e of Object.keys(t))"type"!==e&&"children"!==e&&-1===no.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 Po(t,e){return e.alongPath?go(t,e.alongPath.pathD,e.alongPath.startOffset,e,e.alongPath.textLength,e.alongPath.pathOverflow):ho(t,e)}function jo(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 Oo(t,e,n,r,o,i,a,l){const s=_o(r,n,o),u=Eo(n,o),c=To(i,s),f=To(a,u),d=Co(a),h={type:"path",d:S(e)};return zo(h,"strokeDasharray",f),zo(h,"strokeDashoffset",c),zo(h,"strokeOpacity",d),[h]}var Mo=1;function _o(t,e,n){const[r]=Io(n);return n=>e*(-n-r+t)+Mo}function Eo(t,e){const[n,r]=Io(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),l=[0];let s=Mo;for(let e=0;e<o;e++)l.push(s+i*t),l.push((a-i)*t),s=(1-a)*t;return l.push(s+Mo),l}}function Io(t){return[Math.floor(Math.min(-t[0],-t[1])),Math.ceil(Math.max(-t[0],-t[1]))]}function To(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 zo(t,e,n){n&&Hn(t,e,n)}var No=10;function Co(t){var e,n,r,o,i,a;const l=t=>t[0]===t[1];if("absent"===t.kind)return;if("static"===t.kind)return l(t.value)?{kind:"static",value:0}:void 0;const s=t.keyframes;let u=!1,c=!0;for(const t of s)l(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<s.length;t++){const e=s[t],u=t>0?s[t-1]:void 0,c=t<s.length-1?s[t+1]:void 0,d=null!=(r=null!=(n=e.time)?n:e.t)?r:0,h=l(null!=(o=e.value)?o:e.v),m=u?h&&l(null!=(i=u.value)?i:u.v):h,p=c?h&&l(null!=(a=c.value)?a:c.v):h;m&&!p?(f.push({time:d,value:0}),f.push({time:d+No,value:1})):!m&&p&&(f.push({time:d-No,value:1}),f.push({time:d,value:0}))}return f.length<=1?void 0:{kind:"animated",keyframes:f}}function Fo(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 Lo(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 Do(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+=Ro(t,r,r+1);return t.c&&e.length>1&&(n+=Ro(t,e.length-1,0)),n}function Ro(t,e,n){var r,o,i,a;const l=t.v,s=l[e],u=l[n],c=J(s,null!=(o=null==(r=t.o)?void 0:r[e])?o:s,null!=(a=null==(i=t.i)?void 0:i[n])?a:u,u);return c.ds[c.ds.length-1]}var Bo=.5522847498307936;function Uo(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)===jt.frames?Ot.frames:Ot.waapi,glyphs:null==(n=Ut(t))?void 0:n.glyphs},o=or(t);rr(o,r.idMap),ir(o,r,()=>er(r,"inner")),function(t,e){const n=new Set,r=t=>{var o,i;const a=nr(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=wr(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(),rr(t,e.idMap);const n=[],r=t=>{var e;Tr(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&&Tr(o)&&n++,"use"===o.type&&o.href){const t=nr(o.href);t&&!r.has(t)&&(r.add(t),i(e.idMap.get(t)))}null==(a=o.children)||a.forEach(i)}},a=nr(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=Tr(t);if(!n)continue;const r=n.timeCrop;zr(t),Nr(t,Mr(n),e),r&&Er(t,r,e)}}(t,e),t}(Vo(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 Vo(t,e){t.children&&(t.children=t.children.map(t=>Vo(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:l,clipPath:s,trimPath: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?go(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?ho(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=er(n,"tpath"),{d:i,startShift:a}=Zr(e.path,{pathOverflow:e.pathOverflow,startOffset:e.startOffset,textLength:e.textLength,advance:Gr(t)});n.defs.push({type:"path",id:o,d:i});const l={type:"textPath",href:"#"+o,children:null!=(r=t.children)?r:[]};return void 0!==e.lengthAdjust&&(l.lengthAdjust=e.lengthAdjust),void 0!==e.method&&(l.method=e.method),void 0!==e.spacing&&(l.spacing=e.spacing),Xr(l,"startOffset",Kr(e.startOffset,a)),Xr(l,"textLength",e.textLength),t.children=[l],t}(p,h,e)),p=function(t,e,n){return sr(t,e,n,"fill")}(p,f,e),p=function(t,e,n){return sr(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,l,s,u,c;if("rect"===t.type){const i=Number(null!=(e=t.x)?e:0),a=Number(null!=(n=t.y)?n:0),l=Number(null!=(r=t.width)?r:0),s=Number(null!=(o=t.height)?o:0);return"M"+(i+l)+","+a+"L"+(i+l)+","+(a+s)+"L"+i+","+(a+s)+"L"+i+","+a+"L"+(i+l)+","+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!=(l=t.r)?l:0):Number(null!=(s=t.rx)?s: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*Bo,d=o*Bo,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=wn(e);if(!n.length)return;const i={leaf:t,subpaths:[]};for(const t of n){const e=Do(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 l=i;if(n&&l<.001)return t;const s=Xn(e.offset),u="absent"===s.kind?{kind:"static",value:0}:s,c=function(t){const e=Xn(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=Fo(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=Lo(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=Lo(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?l:o.lengthPx;if(i<.001)return t;const a=n?o.startOffsetPx/i:0;return function(t,e,n,r,o,i){const a=_o(n,e,r),l=Eo(e,r),s=A({},t);return delete s.effects,zo(s,"strokeDasharray",To(i,l)),zo(s,"strokeDashoffset",To(o,a)),zo(s,"strokeOpacity",Co(i)),s}(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?l:r.lengthPx;if(o<.001)continue;const i=n?r.startOffsetPx/o:0;e.push(...Oo(t.leaf,r.subpath,o,i,h,u,f))}m.set(t.leaf,jo(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,l=null==(o=t.animate)?void 0:o.transform,s=or(t);delete s.transform,s.animate&&(delete s.animate.transform,0===Object.keys(s.animate).length&&delete s.animate),delete s.id;const u=[s];for(let t=1;t<i;t++){const n=or(s),r=Pr(e,t),o=r?Jn(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!==l&&(c.animate={transform:l}),c}(p,a,e),p=function(t,e,n,r){if(!e)return t;const o=nr(e.sourceId);if(!o)return r.errors.push("maskedBy.sourceId missing — cannot build mask"),t;const i=er(r,"mask");let a={type:"use",href:"#"+o};if(n)a=mr(a,n,r);else if(yr(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=[],l=[],s=[];for(const t of i){const e=(null!=(n=t.value)?n:t.v)||{},r=Qn(t,void 0);if(Array.isArray(e.translate)&&a.push(w(A(A({},r),gr(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]]),l.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]]),s.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]}),l.length&&(f={type:"g",animate:{transform:c(l)},children:[f]}),s.length&&(f={type:"g",animate:{transform:c(s)},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,l,s,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!=(l=p.rotate)?l:0)+(null!=(s=t.args[0])?s: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&&!t.transform.kfs){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=mr(a,e,r))}const l=void 0===n&&!function(t){return"string"==typeof t.transform||!(!t.transform||"object"!=typeof t.transform)||yr(t)}(t);a=function(t,e,n,r,o){const i=r.idMap.get(n),a=r.maskAncestorChains.get(e)||[],l=o?wr(e,r):void 0,s=l?[...a,l]:a,u=i&&r.maskAncestorChains.get(i)||[];if(!s.length&&!u.length)return t;const c=new Set;for(const t of s)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=br(s),n=br(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=kr(s,t),n=kr(u,t);return{time:t,value:{translate:[n[0]-e[0],n[1]-e[1]]}}})}},children:[t]}}(a,t,o,r,l);const s={type:"mask",id:i,children:[a]};return e.maskType&&(s.maskType=e.maskType),e.maskUnits&&(s.maskUnits=e.maskUnits),e.maskContentUnits&&(s.maskContentUnits=e.maskContentUnits),void 0!==e.x&&(s.x=String(e.x)),void 0!==e.y&&(s.y=String(e.y)),void 0!==e.width&&(s.width=String(e.width)),void 0!==e.height&&(s.height=String(e.height)),r.defs.push(s),t.mask="url(#"+i+")",t}(p,l,i,e),p=function(t,e,n){var r,o;if(!e||!e.d&&!e.animate)return t;const i=er(n,"clip"),a={type:"path"},l=Xn(e.d);if("absent"!==l.kind&&("static"===l.kind?a.d=hr(l.value):(Hn(a,"d",l),void 0!==a.d&&(a.d=hr(a.d)))),e.animate&&!(null==(r=a.animate)?void 0:r.d)){const t=null!=(o=a.animate)?o:{};t.d=e.animate,a.animate=t}return n.defs.push({type:"clipPath",id:i,children:[a]}),t.clipPath="url(#"+i+")",t}(p,s,e),o?(Sr(p,c,e),p=function(t,e,n,r){const o=function(t,e){var n,r,o;const i={};let a=!1;const l=null==(n=t.animate)?void 0:n.transform;if(l&&"object"==typeof l&&Array.isArray(l.keyframes)){const e=l.keyframes;if(e.some(t=>t.value&&t.value.translate)){const n=lr(l),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})};l.autoOrient&&(r.autoOrient=!0);const o=l.loop;void 0!==o&&(r.loop=o),i.animate={transform:r};const s=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&&!s||(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 s=void 0!==(null==e?void 0:e.translate),u=a||s,c=a&&lr((null==(r=t.animate)?void 0:r.transform)||void 0)||a&&lr((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=ar(i.full),r=ar(o.full),a=-n[0],l=-n[1],s=r[0]-a,u=r[1]-l;return 0===s&&0===u?{rest:t}:{translate:"translate("+s+","+u+")",rest:"translate("+a+","+l+")"+e.slice(1).map(t=>t.full).join("")}}if("translate"===i.name)return{rest:t};const a=[];let l=0;for(;l<e.length&&"translate"===e[l].name;)a.push(e[l].full),l++;if(!a.length)return{rest:t};const s=e.slice(l).map(t=>t.full).join("");return{translate:a.join(""),rest:s||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&&!t.transform.kfs){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=lr(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 l=t;l=Jn(l,a);let s={type:"g",id:n,children:[{type:"g",id:r,children:[l]}]};return void 0!==o.transform&&(s.transform=o.transform),void 0!==o.animate&&(s.animate=o.animate),i&&(delete s.id,s=Jn(s,i),s.id=n),s}(p,i,r,o)):p=function(t,e,n,r){return Sr(t,e,r),Jn(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 Wo=t=>{var e,n;return null!=(n=null!=(e=t.t)?e:t.time)?n:0},Go=t=>{var e;return null!=(e=t.v)?e:t.value},qo=t=>{var e;return null!=(e=t.e)?e:t.easing},Ko=t=>{var e;return null!=(e=t.tangentIn)?e:t.ti},Zo=t=>{var e;return null!=(e=t.tangentOut)?e:t.to};function Xo(t,e,n,r,o){const i=1-o,a=i*i*i,l=3*i*i*o,s=3*i*o*o,u=o*o*o;return[a*t[0]+l*e[0]+s*n[0]+u*r[0],a*t[1]+l*e[1]+s*n[1]+u*r[1]]}function Ho(t,e,n,r,o=64){let i=0,a=t;for(let l=1;l<=o;l++){const s=Xo(t,e,n,r,l/o);i+=Math.hypot(s[0]-a[0],s[1]-a[1]),a=s}return i}var Yo=t=>{const e=Math.round(1e4*t)/1e4;return Object.is(e,-0)?"0":String(e)};function Qo(t,e,n){var r,o;let i=Uo(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,o;if("offsetPath"!==t.alongPathMode)return;const i=null!=(e=t.keyframes)?e:t.kfs;if(!i||i.length<2)return;const a=Go(i[0]),l=(null==a?void 0:a.origin)&&a.origin.length>=2?[a.origin[0],a.origin[1]]:[0,0],s=[];for(const t of i){const e=Go(t),r=null==e?void 0:e.translate;if(!r||r.length<2)return;if(Object.keys(e).some(t=>"translate"!==t&&"origin"!==t))return;const o=null!=(n=null==e?void 0:e.origin)?n:[0,0];if(o[0]!==l[0]||o[1]!==l[1])return;s.push([r[0]+l[0],r[1]+l[1]])}if(!i.some(t=>Ko(t)||Zo(t)))return;let u="M"+Yo(s[0][0])+","+Yo(s[0][1]);const c=[];for(let t=0;t<s.length-1;t++){const e=s[t],n=s[t+1],a=null!=(r=Zo(i[t]))?r:[0,0],l=null!=(o=Ko(i[t+1]))?o:[0,0],f=[e[0]+a[0],e[1]+a[1]],d=[n[0]+l[0],n[1]+l[1]];u+="C"+Yo(f[0])+","+Yo(f[1])+","+Yo(d[0])+","+Yo(d[1])+","+Yo(n[0])+","+Yo(n[1]),c.push(Ho(e,f,d,n))}const f=c.reduce((t,e)=>t+e,0);if(!(f>0))return;const d=[];let h=0;for(let t=0;t<i.length;t++){t>0&&(h+=c[t-1]);const e={t:Wo(i[t]),v:h/f},n=qo(i[t]);void 0!==n&&(e.e=n),d.push(e)}return{pathStr:u,distanceKfs:d,autoOrient:!!t.autoOrient,anchor:l}}(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 l=t.transform;let s=l;if(l&&"object"==typeof l){const t=A({},l);delete t.translate,delete t.origin,s=Object.keys(t).length?t:void 0}r=w(A({},t),{animate:n,style:w(A({},t.style),{offsetPath:"path('"+e.pathStr+"')",offsetAnchor:Yo(e.anchor[0])+"px "+Yo(e.anchor[1])+"px",offsetRotate:e.autoOrient?"auto":"0deg",offsetDistance:"0%"})}),void 0!==s?r.transform=s: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=Tn(i,null!=(o=null==(r=Bt(i))?void 0:r.duration)?o:V),e===Ot.waapi&&(i=yn(i,null==n?void 0:n.motionPath),i=Vn(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 Jo(t){const e=globalThis;"function"!=typeof e.cancelAnimationFrame?e.clearTimeout(t):e.cancelAnimationFrame(t)}function $o(t,e,n){var r;const o=Bt(t)||{},i=Cn(t,Ot.frames),a=o.iterations;let l=1;"number"==typeof a&&(l=a||1),"infinite"===a&&(l=1/0),l<1&&(l=1);const s=+(o.duration||V),u=s&&l?s*(l===1/0?1/0:l):s?(null!=l?l:1)*s: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 P(t){let n=function(){const e=s>0?s:1;let n=0,r=0;s>0?(t=Z(t,0,l*e),r=Math.max(0,Math.ceil(t/e)-1),r=Math.min(r,l-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=Ln(r,n*s);for(const[n,r]of Object.entries(o))e.setAttribute(t.id,n,r)}}o.delay&&(o.delay<0?P(S()):h&&P(0));const j=()=>!!p&&!!e.isConnected()&&(y<0?x()>0:!(Number.isFinite(u)&&S()>=u)),O=t=>{null!==m&&(Jo(m),m=null),(t||j())&&(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&&P(0);else{if(y<0&&i<=0)return M(),P(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(),P(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}P(o)}})(),O()}))},M=()=>{if(!p)return;let t=x();Number.isFinite(u)&&t>u&&(t=u),v=t,g=0,p=!1,null!==m&&(Jo(m),m=null),t>=0?P(t):h&&P(0)},_={isReady:()=>!0,getRootElement:()=>null,isPlaying:()=>j(),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,P(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&&(Jo(m),m=null),P(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),P(S())},destroy:()=>{var t;_.cancel(),null==(t=null==n?void 0:n.onRemove)||t.call(n)}};return _}var ti=[1,0,0,1,0,0];function ei(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 ni=(t,e)=>[1,0,0,1,t,e],ri=(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 ii=t=>[1,0,Math.tan(t*Math.PI/180),1,0,0],ai=t=>[1,Math.tan(t*Math.PI/180),0,1,0,0];function li(t){let e=ti;t.translate&&(e=ei(e,ni(t.translate[0],t.translate[1])));const n=t.origin&&(void 0!==t.rotate||t.scale);return n&&(e=ei(e,ni(t.origin[0],t.origin[1]))),void 0!==t.rotate&&(e=ei(e,oi(t.rotate))),t.scale&&(e=ei(e,ri(t.scale[0],t.scale[1]))),n&&(e=ei(e,ni(-t.origin[0],-t.origin[1]))),e}function si(t,e,n){return t+(e-t)*n}function ui(t,e){return null==t?ti:"string"==typeof t?function(t){let e=ti;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=ei(e,ni(n[0]||0,n[1]||0)):"scale"===t?e=ei(e,ri(n[0],n.length>1?n[1]:n[0])):"rotate"===t?e=ei(e,oi(n[0])):"skewX"===t?e=ei(e,ii(n[0])):"skewY"===t?e=ei(e,ai(n[0])):"matrix"===t&&(e=ei(e,[n[0],n[1],n[2],n[3],n[4],n[5]]))}return e}(t):t.keyframes?li(function(t,e){var n,r,o,i,a,l,s;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!=(l=c.time)?l:0)||1),h=c.value||{},m=f.value||{},p={};return h.translate&&m.translate?p.translate=[si(h.translate[0],m.translate[0],d),si(h.translate[1],m.translate[1],d)]:p.translate=h.translate||m.translate,void 0!==h.rotate&&void 0!==m.rotate?p.rotate=si(h.rotate,m.rotate,d):p.rotate=null!=(s=h.rotate)?s:m.rotate,h.scale&&m.scale?p.scale=[si(h.scale[0],m.scale[0],d),si(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?li(t.value):"object"!=typeof t||Array.isArray(t)?ti:li(t)}var ci=new Set(["svg","g","symbol"]),fi=new Set(["defs","mask","clipPath","title"]);function di(t,e){var n;"string"==typeof t.id&&e.set(t.id,t),null==(n=t.children)||n.forEach(t=>di(t,e))}function hi(t){return null==t?0:Number(t)}function mi(t){return Math.round(100*t)/100+0}function pi(t,e,n,r,o){var i;const a=t.type||"";if(fi.has(a))return;const l=ei(e,function(t,e){return t.animate&&t.animate.transform?ui(t.animate.transform,e):void 0!==t.transform?ui(t.transform,e):ti}(t,n));if("use"===a){const e="string"==typeof t.href?t.href.replace(/^#/,""):"",i=r.get(e),a=ei(l,ni(hi(t.x),hi(t.y)));return void(i?pi(i,a,n,r,o):o.push("UNRESOLVED_USE:#"+e))}ci.has(a)?null==(i=t.children)||i.forEach(t=>pi(t,l,n,r,o)):o.push(function(t,e,n){var r,o,i,a,l;const s=null!=(r=t.fill)?r:"",u=null!=(o=t.stroke)?o:"",c=null!=(a=null!=(i=t["stroke-width"])?i:t.strokeWidth)?a:"",f=mi(function(t,e,n,r){var o,i,a,l,s,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!=(l=c.time)?l:0))/((null!=(s=f.time)?s:0)-(null!=(u=c.time)?u:0)||1);return si(c.value,f.value,d)}return void 0!==e?Number(e):1}(null==(l=t.animate)?void 0:l.opacity,t.opacity,0,n)),d=t.mask?1:0,h=e.map(mi).join(",");return t.type+"|"+function(t){var e;switch(t.type){case"rect":return hi(t.width)+","+hi(t.height)+","+hi(t.x)+","+hi(t.y);case"ellipse":return hi(t.rx)+","+hi(t.ry)+","+hi(t.cx)+","+hi(t.cy);case"circle":return hi(t.r)+","+hi(t.cx)+","+hi(t.cy);case"path":return String(null!=(e=t.d)?e:"");default:return""}}(t)+"|["+h+"]|f:"+s+"|s:"+u+"|sw:"+(hi(c)||"")+"|o:"+f+"|m:"+d}(t,l,n))}function vi(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=>vi(t,e))}function gi(t,e){const n=new Map;di(t,n);const r=[];return pi(t,ti,e,n,r),r.sort()}function yi(t,e){const n=new Set;vi(t,n),vi(e,n);const r=[];for(const o of Array.from(n).sort((t,e)=>t-e)){const n=gi(t,o),i=gi(e,o),a=bi(n,i),l=bi(i,n);(a.length||l.length)&&r.push({time:o,onlyInA:a,onlyInB:l})}return r}function bi(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 ki(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 l=()=>{a&&(a=!1,t.setPlaybackRate(1)),t.play()},s=()=>{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=()=>l();"complete"===document.readyState?t():window.addEventListener("load",t,{once:!0});break}case"mouseOver":{let t=!1;const e=()=>{t=!0,l()},n=()=>{t&&s()};i.addEventListener("mouseenter",e),i.addEventListener("mouseleave",n);break}case"click":{const e=()=>{t.isPlaying()?s():l()};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,l=Math.min(i,a),s=Math.min(r.height,Number.isFinite(l)?l:r.height);return s>0?o.height/s: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,l()):n&&(n=!1,s())})},{threshold:e}).observe(i);break}}return t}function Ai(t){return"#"+t}function wi(t,e,n,r){const o=Bt(t)||{};if(!r)if(t.id){const e=Ai(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=$o(t,e||function(t){const e=new Set;return{isConnected:()=>!t||t.isConnected,setAttribute:(n,r,o)=>{r=K(r);const i=Ai(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)"):ki(a,o.trigger)),a}function xi(t,e,n,r){var o,i;let a=null!=(o=t.v)?o:t.value;const l=null!=(i=t.e)?i:t.easing,s={offset:e,easing:l&&Array.isArray(l)?"cubic-bezier("+l.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),s[c]=u,s}function Si(t,e,n){var r,o,i,a,l;const s=[];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}=z(d.e,e);s.push({t:0,v:Mn(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!=(l=r.t)?l:0,o=(n-e)/(h-e),i=r.e?I(r.e)(o):o,{left:a}=z(r.e,o);s.length>0&&(s[s.length-1]=f(c({},s[s.length-1]),{e:a})),s.push({t:n,v:Mn(t,r.v,d.v,i),e:void 0})}break}s.push(d)}return s}function Pi(t,e,n){var r;const o=new Map;for(const[i,a]of Object.entries(t)){const t=n.duration||1,l=Si(i,a.kfs||a.keyframes||[],t),s=[];for(let n=0;n<l.length;n++){const o=l[n],a=xi(o,Z((null!=(r=o.t)?r:0)/t,0,1),i,e);0===n&&(a.offset||0)>0&&s.push(f(c({},a),{offset:0})),s.push(a)}s.length>0&&(s[s.length-1].offset||0)<1&&s.push(f(c({},s[s.length-1]),{offset:1})),s.length>0&&o.set(i,s)}return o}function ji(t,e,n,r,o){var i;const a=Bt(t)||{};if(!n)if(t.id){const e=Ai(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 l=Cn(t,Ot.waapi),s=[],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==l?void 0:l.length)||console.warn("createWebApiAnimator: No animation bindings defined");for(const t of l||[]){const r=t.animate;if(!r||"object"!=typeof r||Array.isArray(r)){console.warn("createWebApiAnimator: Empty or unresolved binding",t);continue}const l=Ai(t.id),u=(null==n?void 0:n.querySelectorAll(l))||document.querySelectorAll(l);0===u.length&&console.warn('createWebApiAnimator: No elements found for selector "'+l+'"');const m=Pi(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),s.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=s[0])?void 0:t.playState)},play:()=>{var t;d=!1,s.forEach(t=>t.play()),null==(t=null==e?void 0:e.onPlay)||t.call(e)},pause:()=>{var t;s.forEach(t=>t.pause()),null==(t=null==e?void 0:e.onPause)||t.call(e)},cancel:()=>{var t;d=!1,s.forEach(t=>t.cancel()),null==(t=null==e?void 0:e.onCancel)||t.call(e)},finish:()=>{var t;for(const e of s)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=>(s.forEach(e=>e.playbackRate=t),m),getCurrentTime:()=>{var t,e;const n=null!=(e=null==(t=s[0])?void 0:t.currentTime)?e:null;return null!==n?+n:null},setCurrentTime:t=>{d=!1,s.forEach(e=>{e.currentTime=t})},destroy:()=>{var t;m.cancel(),s.splice(0,s.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)"):ki(m,a.trigger)),o&&s.forEach(t=>t.play()),m}function Oi(t,e,n){var r,o,i;const a="number"==typeof(null==t?void 0:t.fraction)?t.fraction:e,l=null==(o=null==(r=globalThis.CSS)?void 0:r.percent)?void 0:o.call(r,100*a);if(void 0!==l)return n?{rangeName:null!=(i=null==t?void 0:t.phase)?i:"cover",offset:l}:{offset:l}}function Mi(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 _i(){return document.scrollingElement||document.documentElement}var Ei="parent",Ii="scroller";function Ti(t,e){var n,r;const o=null==e?void 0:e.trim();if(!o)return t;if(o===Ei){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===Ii)return Mi(t,"y")||Mi(t,"x")||_i();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 zi(t,e){var n;const r=t;if(!(null==e?void 0:e.pin)||!r.style)return()=>{};const o=r.style,i=o.position,a=o.top;o.position="sticky",o.top=(null!=(n=e.pinTop)?n:0)+"px";let l=null;const s=t.parentElement;return e.pinDistance&&e.pinDistance>0&&s&&(l=document.createElement("div"),l.setAttribute("data-px-pin",""),l.style.height=100*e.pinDistance+"vh",s.insertBefore(l,t),l.appendChild(t)),()=>{o.position=i,o.top=a,(null==l?void 0:l.parentElement)&&(l.parentElement.insertBefore(t,l),l.remove())}}function Ni(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 Ci="http://www.w3.org/2000/svg";function Fi(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)l.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&&s.call(t,r)&&(n[r]=t[r]);return n})(n,["type","children","style"]),c=u.domType;void 0!==c&&delete u.domType;const f=Ut(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=Fi(t,f);e&&(h||(h=[]),h.push(e))}const m=function(t,e,n,r,o){if(De.has(t.toLowerCase()))return console.warn("SVG tag blocked (dangerous): ",t),null;const i=document.createElementNS(Ci,t);for(const t in e){const n=Ke(t,e[t]);void 0!==n&&(Ue.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",Ze(u),d,h,u[zt]||u[Tt]);return m&&void 0!==c&&m.setAttribute("type",c),m}var Li="data";function Di(t,e,n,r){const o=je(t);for(const t of o)console.warn("[PxAnimator] effects shape warning:",t);t=Qo(t,(Bt(t)||{}).mode===jt.frames?Ot.frames:Ot.waapi);let i=null;if(r){t=Fe(t);const e="string"==typeof r?document.querySelector(r):r;e&&(i=Fi(t),i&&e.replaceChildren(i))}return function(t,e,n,r){return function(t,e,n,r){const o=Bt(t)||{};return tt(o)?Ni(o,n,n=>{var i,a;let l=()=>{};if(o.mode!==jt.frames&&"native"===(null==(i=o.scroll)?void 0:i.driver)&&r){l=zi(r,o.scroll);const e=function(t,e){var n,r,o,i;if(!e||!tt(e))return null;const a=e.scroll||{},l=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 s=globalThis,u="view"===l,c=u?s.ViewTimeline:s.ScrollTimeline;if("function"!=typeof c)return null;const f=null!=(r=a.axis)?r:"block";let d;try{d=new c(u?{subject:Ti(t,a.subject),axis:f}:{source:"root"===a.source?_i():Mi(t,"y")||Mi(t,"x")||_i(),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:Oi(null==(o=a.range)?void 0:o.start,0,u),rangeEnd:Oi(null==(i=a.range)?void 0:i.end,1,u)}}(r,o);if(e){const i=ji(t,n,r,o.mode===jt.waapi,e);if(i){const t=i.destroy.bind(i);return i.destroy=()=>{l(),t()},i}}l(),l=()=>{}}const s=(o.mode!==jt.frames?ji(t,n,r,o.mode===jt.waapi):null)||wi(t,e,n,r),u=(null==(a=s.getRootElement)?void 0:a.call(s))||r;if(u){l=zi(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",l=Ti(t,i.subject),s=Mi(t,"y")||Mi(t,"x"),u="scroll"===a&&"root"===i.source?_i():s||_i(),c=u===_i(),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,l="number"==typeof(null==(o=null==n?void 0:n.end)?void 0:o.fraction)?n.end.fraction:1;return l<=a?i>=l?1:0:Z((i-a)/(l-a),0,1)}("y"===f?u.scrollTop:u.scrollLeft,"y"===f?u.scrollHeight-u.clientHeight:u.scrollWidth-u.clientWidth,i.range);const t=l.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(l),l!==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=>s.setCurrentTime(e*t));if(e){const t=s.destroy.bind(s);s.destroy=()=>{e.destroy(),l(),t()}}}else console.warn("scroll timeline: no root element to observe — animation will stay at frame 0");var c;return s}):Ni(o,n,n=>o.mode===jt.frames?wi(t,e,n,r):ji(t,n,r,o.mode===jt.waapi)||wi(t,e,n,r))}(t,e,n,r)}(t,e,n,i)}function Ri(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 Di(n,r,o,i);let a=null,l=[],s=!1;const u=t=>{a?t(a):l&&l.push(t)};return fetch(e).then(t=>t.json()).then(t=>{if(!s)if(Rt(t)){a=Di(t,r,o,i);const e=l;l=null,null==e||e.forEach(t=>t(a))}else console.error('createAnimator: invalid animation document format at "'+e+'"')}).catch(t=>{l=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:()=>{s=!0,l=null,null==a||a.destroy()}}}function Bi(){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]=Ri({src:t,container:n}))}}}"undefined"!=typeof window&&(window.loadTagAnimators=Bi,window.createAnimator=Ri,window.setupAnimationTriggers=ki);