@pixodesk/svg-animator-web 1.0.19 → 1.0.20

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=Math.pow,c=(t,n,r)=>n in t?e(t,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[n]=r,f=(t,e)=>{for(var n in e||(e={}))s.call(e,n)&&c(t,n,e[n]);if(i)for(var n of i(e))l.call(e,n)&&c(t,n,e[n]);return t},d=(t,e)=>n(t,o(e)),h={};function p(t,e,n){const r={};return"translate"===t?r.translate=e:"rotate"===t?r.rotate=e:r.scale=e,n&&"translate"!==t&&(r.origin=n),r}function m(t){if(void 0===t)return{kind:"absent"};if(Array.isArray(t))return{kind:"static",value:t};if("object"==typeof t){const e=t;if(e.keyframes)return{kind:"animated",keyframes:e.keyframes,autoOrient:e.autoOrient,loop:e.loop};if(void 0!==e.value)return{kind:"static",value:e.value}}return{kind:"static",value:t}}function y(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 g(t,e,n){if(!e)return t;delete t.transform;let r=t;var o;return r=v(r,"skew",e.skew,n),r=b(r,e.origin,!0),r=v(r,"scale",void 0===(o=e.scale)?void 0:Array.isArray(o)?[o[0]/100,o[1]/100]:o,n),r=v(r,"rotate",e.rotate,n),r=b(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=v(r,"translate",e.translate,n):(r=b(r,e.origin,!0),r=v(r,"translate",e.translate,n),r=b(r,e.origin,!1)),r}function v(t,e,n,r){if(void 0===n)return t;if("skew"===e){const e=m(n);return"static"!==e.kind?(r.warnings.push("transformation.skew: only static skew is supported"),t):{type:"g",transform:"skewX("+e.value[0]+")skewY("+e.value[1]+")",children:[t]}}const o=m(n);if("static"===o.kind)return{type:"g",transform:{value:p(e,o.value,void 0)},children:[t]};if("animated"===o.kind){const n={keyframes:o.keyframes.map(t=>y(t,p(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 b(t,e,n){if(void 0===e)return t;const r=m(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=>y(t,{translate:o(t.value)}))};return void 0!==r.loop&&(e.loop=r.loop),{type:"g",animate:{transform:e},children:[t]}}return t}function k(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=t.effects.clone.baseId;"string"==typeof r&&r&&!e.contentRefInnerIds.has(r)&&e.contentRefInnerIds.set(r,n(r))}null==(a=t.children)||a.forEach(t=>k(t,e,n))}function A(t,e,n,r,o){const a=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=x(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&&x((null==(r=t.animate)?void 0:r.transform)||void 0)||i&&x((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=w(a.full),r=w(o.full),i=-n[0],s=-n[1],l=r[0]-i,u=r[1]-s;if(0===l&&0===u)return{rest:t};return{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:delete t.transform:e.translate&&(a.transform=e.translate,e.rest?t.transform=e.rest:delete t.transform)}return a}(t,e);"string"==typeof t.id&&delete t.id;const{outer:i,inner:s}=function(t){if(!t)return{};const e=x(t.translate),n=void 0!==t.rotate||void 0!==t.scale,r={},o={};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);return{outer:Object.keys(r).length?r:void 0,inner:Object.keys(o).length?o:void 0}}(e);let l=t;l=g(l,s,o);let u={type:"g",id:n,children:[{type:"g",id:r,children:[l]}]};return void 0!==a.transform&&(u.transform=a.transform),void 0!==a.animate&&(u.animate=a.animate),i&&(delete u.id,u=g(u,i,o),u.id=n),u}function w(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 x(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 P(t){if(!t.length)return".";let e="";for(const n of t)n.startsWith("[")?e+=n:e+=(e?".":"")+n;return e}((t,n)=>{for(var r in n)e(t,r,{get:n[r],enumerable:!0})})(h,{COLOUR_ATTR_NAMES:()=>Ce,PX_ANIMATOR_DATA_KEY:()=>mo,PX_ANIM_ATTR_NAME:()=>K,PX_ANIM_SRC_ATTR_NAME:()=>G,PX_TRANSFORM_PART_KEYS:()=>et,PxAnimatedSvgDocumentSchema:()=>Ct,PxAnimationDefinitionSchema:()=>ot,PxAnimatorConfigSchema:()=>ct,PxAnimatorEngine:()=>Z,PxAnimatorMode:()=>q,PxAttrValueSchema:()=>dt,PxBezierPathSchema:()=>Ft,PxBindingSchema:()=>ft,PxCloneEffectSchema:()=>kt,PxDefsSchema:()=>ut,PxEasingOrRefSchema:()=>J,PxEffectsSchema:()=>It,PxElementAnimationSchema:()=>at,PxFillGradientEffectSchema:()=>St,PxGradientSpreadMethod:()=>wt,PxGradientStopSchema:()=>Pt,PxGradientType:()=>xt,PxGradientUnits:()=>At,PxKeyframeSchema:()=>H,PxLoopSchema:()=>$,PxMaskedByEffectSchema:()=>gt,PxNodeBase:()=>zt,PxNodeSchema:()=>Et,PxPropertyAnimationSchema:()=>tt,PxRepeaterEffectSchema:()=>yt,PxRetimeEffectSchema:()=>bt,PxStrokeGradientEffectSchema:()=>Ot,PxSvgNodeExtra:()=>Nt,PxTextEffectSchema:()=>_t,PxTextPathEffectSchema:()=>Mt,PxTransformPartsSchema:()=>nt,PxTransformValueSchema:()=>rt,PxTransformationEffectSchema:()=>mt,PxTriggerSchema:()=>it,PxTrimPathEffectSchema:()=>vt,STYLE_ATTR_NAMES:()=>Ue,TRANSFORM_FN_NAMES:()=>Fe,applyPlayerEffects:()=>Nr,calcAnimationValues:()=>vr,camelCaseToKebabWordIfNeeded:()=>Ge,collectSampleTimes:()=>Co,createAnimator:()=>yo,createAnimatorImpl:()=>po,createBasicFrameLoopAnimator:()=>no,createFrameLoopAnimator:()=>ro,createWebApiAnimator:()=>so,describeSchema:()=>B,diffInEffect:()=>Lo,evaluateMotionPathSegment:()=>Vn,extendedPathForBrowser:()=>ln,generateNewIds:()=>fo,getAnimatorConfig:()=>Ut,getBindings:()=>Vt,getChildren:()=>Bt,getDefs:()=>Dt,getNormalizedProps:()=>Hr,isPxElementFileFormat:()=>Lt,isPxElementFileFormatDeep:()=>Rt,jsonElementFactory:()=>cn,loadTagAnimators:()=>go,materialiseAllInTree:()=>Br,materialiseAnimatedUseInstances:()=>Fr,materialiseGlyphText:()=>Nn,materialiseGlyphTextAlongPath:()=>On,materialiseGlyphTextHorizontal:()=>jn,materialiseInternalLoopsInPropAnim:()=>dr,materialiseInternalLoopsInTree:()=>hr,materialiseMotionPathInPropAnim:()=>Kn,materialiseMotionPathsInTree:()=>er,normalizeDocument:()=>yr,propAnimIsMotionPath:()=>Rn,px:()=>W,renderNode:()=>$r,schemaKeys:()=>V,setupAnimationTriggers:()=>to,shiftAnimatable:()=>sn,toRGBA:()=>Ee,validateNodeEffects:()=>Tt,visualModelAt:()=>Fo}),module.exports=(t=h,((t,n,o,i)=>{if(n&&"object"==typeof n||"function"==typeof n)for(let l of a(n))s.call(t,l)||l===o||e(t,l,{get:()=>n[l],enumerable:!(i=r(n,l))||i.enumerable});return t})(e({},"__esModule",{value:!0}),t));var j=class{_canSanitize(t){return this.isValid(t)}optional(){return new S(this)}},S=class extends j{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 j{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 j{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 j{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 j{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)}},T=class extends j{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)}},z=class extends j{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;return!!this.schemas.some(e=>e.isValid(t))||(null==e||e.errors.push(P(null!=n?n:[])+": no union member matched for value "+(null!=(r=JSON.stringify(t))?r:"").slice(0,60)),!1)}_canSanitize(t){return this.schemas.some(e=>e._canSanitize(t))}},E=class extends j{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)}},N=class extends j{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||(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 j{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=f({},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 j{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 j{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)}},R=class extends j{constructor(){super(...arguments),this._default=void 0}sanitize(t){return t}isValid(t,e,n){return!0}_canSanitize(t){return!0}},U=class extends j{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)}},D=class extends j{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 B(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 W={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 T(t,e),union:(t,e)=>new z(t,e),discriminatedUnion:(t,e)=>new E(t,e),object:t=>new N(t),openObject:(t,e)=>new C(t,e),extendedObject:(t,e)=>new N(f(f({},t._shape),e)),array:t=>new F(t),record:t=>new L(t),any:()=>new R,tuple:t=>new D(t),lazy:(t,e)=>new U(t,e)},G="data-px-animation-src",K="_px_animator",q={auto:"auto",webapi:"webapi",frames:"frames"},Z={webapi:q.webapi,frames:q.frames},X="text",Y="textContent",Q=new Set(["type","children","animator","meta","animate",X,Y]),J=W.union([W.string(),W.tuple([W.number(),W.number(),W.number(),W.number()])]),H=(W.union([W.string(),W.number(),W.array(W.number()),W.lazy(()=>nt,{}),W.object({path:W.string()}),W.lazy(()=>W.object({paths:W.array(Ft)}),{paths:[]})]),W.object({time:W.number().optional(),t:W.number().optional(),value:W.any().optional(),v:W.any().optional(),easing:J.optional(),e:J.optional(),tangentOut:W.tuple([W.number(),W.number()]).optional(),to:W.tuple([W.number(),W.number()]).optional(),tangentIn:W.tuple([W.number(),W.number()]).optional(),ti:W.tuple([W.number(),W.number()]).optional(),selected:W.boolean().optional()})),$=W.object({segmentCount:W.number().optional(),before:W.boolean().optional(),alternate:W.boolean().optional()}),tt=W.object({keyframes:W.array(H).optional(),kfs:W.array(H).optional(),loop:W.union([$,W.boolean()]).optional(),autoOrient:W.boolean().optional()}),et=["translate","rotate","scale","origin"],nt=W.object({translate:W.tuple([W.number(),W.number()]).optional(),rotate:W.number().optional(),scale:W.tuple([W.number(),W.number()]).optional(),origin:W.tuple([W.number(),W.number()]).optional()}),rt=W.union([W.string(),W.object({value:nt}),tt]),ot=W.record(tt),at=W.union([W.string(),W.array(W.union([W.string(),ot])),ot]),it=W.object({startOn:W.enum(["load","mouseOver","click","scrollIntoView","programmatic"]).optional(),outAction:W.enum(["continue","pause","reset","reverse"]).optional(),scrollIntoViewThreshold:W.number().optional()}),st=W.object({width:W.number(),d:W.string()}),lt=W.object({fFamily:W.string(),style:W.string(),ascent:W.number(),unitsPerEm:W.number(),glyphs:W.record(st)}),ut=W.object({easings:W.record(W.tuple([W.number(),W.number(),W.number(),W.number()])).optional(),animations:W.record(ot).optional(),styles:W.record(W.any()).optional(),glyphs:W.record(lt).optional()}),ct=W.object({mode:W.enum([q.auto,q.webapi,q.frames]).optional(),duration:W.number().optional(),delay:W.number().optional(),iterations:W.union([W.number(),W.literal("infinite")]).optional(),fill:W.enum(["forwards","backwards","both","none"]).optional(),direction:W.enum(["normal","reverse","alternate","alternate-reverse"]).optional(),frameRate:W.number().optional(),trigger:it.optional(),definitions:ut.optional(),animate:W.record(at).optional(),debug:W.boolean().optional(),debugInstName:W.string().optional()}),ft=W.object({id:W.string(),animate:at}),dt=W.union([W.string(),W.number(),W.object({value:W.any()}),tt]),ht=W.union([W.number(),W.object({value:W.number()}),W.object({keyframes:W.array(H),autoOrient:W.boolean().optional()})]),pt=W.union([W.tuple([W.number(),W.number()]),W.object({value:W.tuple([W.number(),W.number()])}),W.object({keyframes:W.array(H),autoOrient:W.boolean().optional()})]),mt=W.object({translate:pt.optional(),rotate:ht.optional(),scale:pt.optional(),skew:pt.optional(),origin:pt.optional()}),yt=W.object({copies:W.number().optional(),translate:pt.optional(),rotate:ht.optional(),scale:pt.optional(),origin:pt.optional()}),gt=W.object({href:W.string().optional(),maskType:W.string().optional(),maskUnits:W.string().optional(),maskContentUnits:W.string().optional()}),vt=W.object({offset:ht.optional(),range:pt.optional(),trimAllAsOne:W.boolean().optional()}),bt=W.object({baseId:W.string().optional(),start:W.number().optional(),stretch:W.number().optional(),timeCrop:W.tuple([W.number(),W.number()]).optional()}),kt=W.object({type:W.string().optional(),baseId:W.string().optional(),retime:bt.optional()}),At={userSpaceOnUse:"userSpaceOnUse",objectBoundingBox:"objectBoundingBox"},wt={pad:"pad",reflect:"reflect",repeat:"repeat"},xt={linear:"linear",radial:"radial"},Pt=W.object({offset:W.number(),color:W.string()}),jt=W.union([W.array(Pt),W.object({value:W.array(Pt)}),W.object({keyframes:W.array(H)})]),St=W.object({type:W.enum([xt.linear,xt.radial]),p1:W.tuple([W.number(),W.number()]).optional(),p2:W.tuple([W.number(),W.number()]).optional(),c:W.tuple([W.number(),W.number()]).optional(),r:W.number().optional(),fp:W.tuple([W.number(),W.number()]).optional(),stops:jt.optional(),gradientUnits:W.string().optional(),spreadMethod:W.string().optional(),gradientTransform:W.string().optional()}),Ot=St,Mt=W.object({path:W.string(),pathOverflow:W.string().optional(),lengthAdjust:W.string().optional(),method:W.string().optional(),spacing:W.string().optional(),startOffset:ht.optional(),textLength:ht.optional()}),_t=W.object({useGlyphs:W.boolean().optional()}),It=W.object({transformation:mt.optional(),repeater:yt.optional(),maskedBy:gt.optional(),trimPath:vt.optional(),clone:kt.optional(),isCombinedShape:W.boolean().optional(),fillGradient:St.optional(),strokeGradient:Ot.optional(),textPath:Mt.optional(),text:_t.optional()});function Tt(t,e){const n=[],r=(t,o)=>{if(t&&t.effects){const r={errors:[],warnings:[],strict:!!(null==e?void 0:e.strict)};if(!It.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 zt=W.openObject({type:W.string(),id:W.string().optional(),meta:W.any().optional(),effects:It.optional(),animate:at.optional(),style:W.union([W.string(),W.record(W.union([W.string(),W.number()]))]).optional()},dt),Et=W.openObject(d(f({},zt._shape),{children:W.lazy(()=>W.array(Et),[]).optional()}),dt),Nt=W.object({width:W.number().optional(),height:W.number().optional(),viewBox:W.string().optional(),animator:ct.optional()}),Ct=W.openObject(d(f(f({},zt._shape),Nt._shape),{type:W.literal("svg"),children:W.array(Et).optional()}),dt),Ft=W.object({v:W.array(W.array(W.number())),i:W.array(W.array(W.number())).optional(),o:W.array(W.array(W.number())).optional(),c:W.boolean().optional()});function Lt(t){return!(!t||"object"!=typeof t||Array.isArray(t))&&("svg"===t.type||"svg"===t.tagName)}function Rt(t){const e=Ct.isValid(t);return{valid:e,errors:e?[]:["Document failed schema validation"]}}function Ut(t){var e,n;return(null==t?void 0:t.animator)||(null==(e=null==t?void 0:t.meta)?void 0:e.animator)||(null==t?void 0:t.animation)||(null==(n=null==t?void 0:t.meta)?void 0:n.animation)}function Dt(t){var e;if(t)return null==(e=Ut(t))?void 0:e.definitions}function Vt(t){var e;if(!t)return;const n=null==(e=Ut(t))?void 0:e.animate;return n?Object.entries(n).map(([t,e])=>({id:t,animate:e})):void 0}function Bt(t){return null==t?void 0:t.children}function Wt(t){if(null===t||"object"!=typeof t)return t;if(Array.isArray(t))return t.map(Wt);const e={};for(const n of Object.keys(t))e[n]=Wt(t[n]);return e}function Gt(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 Kt(t){const e="number"==typeof t?t:"string"==typeof t?parseFloat(t):NaN;return Number.isFinite(e)?e:0}function qt(t){var e;const n=Kt(t.x),r=Kt(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 Zt(t,e){return"_lw_"+e+"_"+t.nextId++}function Xt(t){return"string"==typeof t?t.replace(/^#/,""):void 0}function Yt(t,e){var n;"string"==typeof t.id&&e.set(t.id,t),null==(n=t.children)||n.forEach(t=>Yt(t,e))}var Qt=Wt;function Jt(t,e,n,r){if(!e)return t;const o=Zt(n,"grad"),a=function(t,e){const n={type:t.type===xt.radial?"radialGradient":"linearGradient",id:e};t.type===xt.linear?(t.p1&&(n.x1=String(t.p1[0]),n.y1=String(t.p1[1])),t.p2&&(n.x2=String(t.p2[0]),n.y2=String(t.p2[1]))):(t.c&&(n.cx=String(t.c[0]),n.cy=String(t.c[1])),void 0!==t.r&&(n.r=String(t.r)),t.fp&&(n.fx=String(t.fp[0]),n.fy=String(t.fp[1])));t.gradientUnits&&(n.gradientUnits=t.gradientUnits);t.spreadMethod&&(n.spreadMethod=t.spreadMethod);t.gradientTransform&&(n.gradientTransform=t.gradientTransform);return n.children=function(t){var e,n,r,o;if(!t)return[];if(Array.isArray(t))return t.map(Ht);if("object"==typeof t&&Array.isArray(t.value))return t.value.map(Ht);const a=t,i=a.keyframes;if(!Array.isArray(i)||!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:$t(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:$t(e,e.indexOf(r),n);if(!p)continue;const m=null!=(u=r.easing)?u:r.e,y={time:o,value:p.color};void 0!==m&&(y.easing=m),c.push(y);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:te(t.offset),stopColor:t.color},p={};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);return h}(t,i,e,0,s))}(t.stops),n}(e,o);return n.defs.push(a),t[r]="url(#"+o+")",t}function Ht(t){return{type:"stop",offset:te(t.offset),stopColor:t.color}}function $t(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 te(t){return Math.round(1e3*t)/10+"%"}function ee(t,e,n,r){if(!e)return t;if(!e.href)return r.errors.push("maskedBy.href missing — cannot build mask"),t;const o=Zt(r,"mask");let a={type:"use",href:"#"+e.href};if(n)a=ne(a,n,r);else if(ae(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,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=y(t,void 0);if(Array.isArray(e.translate)&&i.push(d(f({},r),{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(d(f({},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(d(f({},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 h=t;i.length&&(h={type:"g",animate:{transform:c(i)},children:[h]});s.length&&(h={type:"g",animate:{transform:c(s)},children:[h]});l.length&&(h={type:"g",animate:{transform:c(l)},children:[h]});return h}(a,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 y=[];for(;null!==(m=p.exec(t));){const t=m[2].split(/[\s,]+/).filter(t=>t.length>0).map(Number);y.push({name:m[1],args:t})}if(!y.length)return;const g=y[y.length-1];if("translate"===g.name)for(let t=y.length-2;t>=0;t--){const c=y[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"===y[e].name){const t=null!=(a=y[e].args[0])?a:0,n=null!=(i=y[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<y.length-1;e++){const t=y[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 v,b,k;for(const t of y)if("translate"===t.name){const e=null!=(c=t.args[0])?c:0,n=null!=(f=t.args[1])?f:0;v=v?[v[0]+e,v[1]+n]:[e,n]}else if("rotate"===t.name)b=(null!=b?b:0)+(null!=(d=t.args[0])?d:0);else if("scale"===t.name){const e=null!=(h=t.args[0])?h:1,n=t.args.length>1?t.args[1]:e;k=k?[k[0]*e,k[1]*n]:[e,n]}const A={};v&&(A.translate=v);void 0!==b&&(A.rotate=b);k&&(A.scale=k);return 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}return}(t);e&&(a=ne(a,e,r))}const i=void 0===n&&!function(t){return"string"==typeof t.transform||(!(!t.transform||"object"!=typeof t.transform)||ae(t))}(t);a=function(t,e,n,r,o){const a=r.idMap.get(n),i=r.maskAncestorChains.get(e)||[],s=o?ue(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=ie(l),n=ie(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]}}const f=Array.from(c).sort((t,e)=>t-e);return{type:"g",animate:{transform:{keyframes:f.map(t=>{const e=se(l,t),n=se(u,t);return{time:t,value:{translate:[n[0]-e[0],n[1]-e[1]]}}})}},children:[t]}}(a,t,e.href,r,i);const s={type:"mask",id:o,children:[a]};return e.maskType&&(s.maskType=e.maskType),e.maskUnits&&(s.maskUnits=e.maskUnits),e.maskContentUnits&&(s.maskContentUnits=e.maskContentUnits),r.defs.push(s),t.mask="url(#"+o+")",t}function ne(t,e,n){if(!e)return t;const r=function(t,e){var n;const r=m(t);if("absent"!==r.kind)return"static"===r.kind?r.value:(e.warnings.push("transformation.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=re(o,"translate",e.translate,void 0,n),o=re(o,"rotate",e.rotate,r,n),o=re(o,"scale",e.scale,r,n),o}function re(t,e,n,r,o){if(void 0===n)return t;const a=m("scale"===e&&Array.isArray(n)?[n[0]/100,n[1]/100]:n);if("static"===a.kind)return{type:"g",transform:{value:p(e,oe(e,a.value),r)},children:[t]};if("animated"===a.kind){const n={keyframes:a.keyframes.map(t=>y(t,p(e,oe(e,t.value),r)))};return void 0!==a.loop&&(n.loop=a.loop),{type:"g",animate:{transform:n},children:[t]}}return t}function oe(t,e){return"translate"===t?[-e[0],-e[1]]:"rotate"===t?-e:[1/e[0],1/e[1]]}function ae(t){const e=t.animate&&"object"==typeof t.animate&&!Array.isArray(t.animate)?t.animate:void 0;return!(!e||!e.transform)}function ie(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 se(t,e){let n=0,r=0;for(const o of t)if(o.translateKeyframes&&o.translateKeyframes.length){const t=le(o.translateKeyframes,e);n+=t[0],r+=t[1]}else o.translate&&(n+=o.translate[0],r+=o.translate[1]);return[n,r]}function le(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 ue(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}s&&e.warnings.push("maskedBy ancestor: non-translate transform in string ignored: "+t);return i?[o,a]:void 0}(a,e);t&&(s.translate=t)}else if(a&&"object"==typeof a){const t=a.value;t&&"object"==typeof t&&Array.isArray(t.translate)&&(s.translate=[t.translate[0]||0,t.translate[1]||0]),!t||void 0===t.rotate&&void 0===t.scale&&void 0===t.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 ce="content";function fe(t,e,n){if(!e)return;const r=e.baseId;if(!r)return void(e.type===ce&&n.errors.push("clone: content ref missing baseId"));const o=e.type===ce&&n.contentRefInnerIds.get(r)||r;t.href="#"+o}function de(t,e){const n={};return void 0!==t.translate&&(n.translate=function(t,e){if(Array.isArray(t))return e(t);if(t&&"object"==typeof t){const n=t;if(Array.isArray(n.keyframes))return d(f({},n),{keyframes:n.keyframes.map(t=>t&&void 0!==t.value?d(f({},t),{value:e(t.value)}):t)});if(void 0!==n.value)return d(f({},n),{value:e(n.value)})}return t}(t.translate,t=>[t[0]*e,t[1]*e])),void 0!==t.rotate&&(n.rotate=function(t,e){if("number"==typeof t)return e(t);if(t&&"object"==typeof t){const n=t;if(Array.isArray(n.keyframes))return d(f({},n),{keyframes:n.keyframes.map(t=>t&&void 0!==t.value?d(f({},t),{value:e(t.value)}):t)});if(void 0!==n.value)return d(f({},n),{value:e(n.value)})}return t}(t.rotate,t=>t*e)),void 0!==t.scale&&(n.scale=function(t,e){const n=t=>[Math.pow(t[0]/100,e),Math.pow(t[1]/100,e)],r=t=>[Math.pow(t[0],e),Math.pow(t[1],e)];if(Array.isArray(t))return{value:n(t)};if(t&&"object"==typeof t){const e=t;if(Array.isArray(e.keyframes))return d(f({},e),{keyframes:e.keyframes.map(t=>t&&void 0!==t.value?d(f({},t),{value:r(t.value)}):t)});if(void 0!==e.value)return d(f({},e),{value:n(e.value)})}return t}(t.scale,e)),void 0!==t.origin&&(n.origin=t.origin),Object.keys(n).length?n:void 0}var he=!1;function pe(t){var e,n;return{start:null!=(e=t.start)?e:0,stretch:null!=(n=t.stretch)?n:1}}function me(t,e){return{start:e.start+e.stretch*t.start,stretch:e.stretch*t.stretch}}function ye(t){var e,n;return null==(n=null==(e=t.effects)?void 0:e.clone)?void 0:n.retime}function ge(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 ve(t,e,n){const r=Xt(t.href);if(!r)return void n.errors.push("retime: <use> has no href to follow");const o=be(r,e,n,new Set);if(o)if(he){const e=n.idMap.get(o);t.type="g",delete t.href,t.children=[e],qt(t),n.defs=n.defs.filter(t=>t!==e)}else t.href="#"+o}function be(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=Qt(o);if(function(t,e){Gt(t,()=>Zt(e,"retimed"))}(a,n),"use"===o.type?Ae(a,e.start,e.stretch):ke(a,e.start,e.stretch),ge(a),"use"===o.type&&o.href){const i=Xt(o.href);if(i){const s=ye(o),l=s?me(pe(s),e):e,u=new Set(r);u.add(t);const c=be(i,l,n,u);c&&(a.href="#"+c)}}else!function(t,e,n,r,o){const a=t=>{var i;const s=ye(t);if("use"===t.type&&s&&t.href){const a=Xt(t.href);if(a){const i=me(pe(s),e),l=new Set(r);l.add(o);const u=be(a,i,n,l);u&&(t.href="#"+u)}ge(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 ke(t,e,n){var r;Ae(t,e,n),null==(r=t.children)||r.forEach(t=>ke(t,e,n))}function Ae(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)}}function we(t){var e,n,r,o;const a=t.v,i=t.i,s=t.o,l=t.c;if(!a.length)return"";const u=[],c=a.length;u.push("M"+a[0][0]+","+a[0][1]);for(let t=1;t<c;t++){const r=a[t-1],o=null!=(e=null==s?void 0:s[t-1])?e:r,l=null!=(n=null==i?void 0:i[t])?n:a[t],c=a[t];o[0]===r[0]&&o[1]===r[1]&&l[0]===c[0]&&l[1]===c[1]?u.push("L"+c[0]+","+c[1]):u.push("C"+o[0]+","+o[1]+","+l[0]+","+l[1]+","+c[0]+","+c[1])}if(l&&c>0){const t=a[c-1],e=null!=(r=null==s?void 0:s[c-1])?r:t,n=null!=(o=null==i?void 0:i[0])?o:a[0],l=a[0];e[0]===t[0]&&e[1]===t[1]&&n[0]===l[0]&&n[1]===l[1]||u.push("C"+e[0]+","+e[1]+","+n[0]+","+n[1]+","+l[0]+","+l[1]),u.push("z")}return u.join("")}function xe(t,e,n){return t+(e-t)*n}function Pe(t,e,n){const r=[],o=Math.max(t.length,e.length);for(let a=0;a<o;a++)r[a]=xe(t[a]||0,e[a]||0,n);return r}function je(t,e,n){return[xe(t[0]||0,e[0]||0,n),xe(t[1]||0,e[1]||0,n),xe(t[2]||0,e[2]||0,n),xe(void 0===t[3]?1:t[3],void 0===e[3]?1:e[3],n)]}function Se(t,e,n){const r=Math.max(t.length,e.length),o=[];for(let a=0;a<r;a++)o.push(Oe(t[a],e[a],n));return o}function Oe(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=[],y=[];for(let n=0;n<h;n++){const f=t.v[n],h=e.v[n];p.push(Pe(f,h,d));const g=null!=(o=null==(r=t.i)?void 0:r[n])?o:f,v=null!=(i=null==(a=e.i)?void 0:a[n])?i:h;m.push(Pe(g,v,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;y.push(Pe(b,k,d))}return{v:p,i:m.length?m:void 0,o:y.length?y:void 0,c:null!=(f=t.c)?f:e.c}}function Me(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 _e(t){const[e,n,r,o]=t,a=3*n,i=3*(o-n)-a,s=1-a-i;return function(t){return n=Me(e,r,t),((s*n+i)*n+a)*n;var n}}function Ie(t,e,n){return[t[0]+(e[0]-t[0])*n,t[1]+(e[1]-t[1])*n]}function Te(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=Me(n,o,e),s=[n,r],l=[o,a],{left:u,right:c}=function(t,e,n,r,o){const a=Ie(t,e,o),i=Ie(e,n,o),s=Ie(n,r,o),l=Ie(a,i,o),u=Ie(i,s,o),c=Ie(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,y=1-d;return m>1e-9&&Math.abs(y)>1e-9&&(p=[(c[1][0]-f)/m,(c[1][1]-d)/y,(c[2][0]-f)/m,(c[2][1]-d)/y]),{left:h,right:p}}function ze(t){if(t)return[1-t[2],1-t[3],1-t[0],1-t[1]]}function Ee(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 Ne(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"]),Le=new Set(["offset-distance","offsetDistance"]);function Re(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.scale,u=r?"px":"",c=r?"deg":"";return a&&o.push("translate("+a[0]+u+","+a[1]+u+")"),i&&o.push("translate("+i[0]+u+","+i[1]+u+")"),null!=s&&o.push("rotate("+s+c+")"),l&&o.push("scale("+l[0]+","+l[1]+")"),i&&o.push("translate("+-i[0]+u+","+-i[1]+u+")"),o.join("")}var Ue=new Set(["offset-distance","offsetDistance"]),De=1e3;function Ve(t){return t.includes("-")?t.replace(/-([a-z])/g,(t,e)=>e.toUpperCase()):t}function Be(t){return!t.includes("-")&&/[a-z][A-Z]/.test(t)}var We=new Set(["viewBox","preserveAspectRatio","gradientUnits","gradientTransform","spreadMethod","patternUnits","patternContentUnits","patternTransform","clipPathUnits","maskUnits","maskContentUnits","markerUnits","markerWidth","markerHeight","refX","refY","textLength","lengthAdjust","startOffset","filterUnits","primitiveUnits","stdDeviation","baseFrequency","numOctaves","surfaceScale","diffuseConstant","specularConstant","specularExponent","kernelMatrix","kernelUnitLength","edgeMode","preserveAlpha","targetX","targetY"]);function Ge(t){return We.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 qe(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 Ze=1e-4;function Xe(t,e,n,r,o){const a=Ye(t,e,n,r,o);if(0===a[0]&&0===a[1]){return Ye(t,e,n,r,o<.5?o+Ze:o-Ze)}return a}function Ye(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 Qe(t,e,n,r,o=100){const a=o+1,i=new Float64Array(a),s=new Float64Array(a);let l=qe(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=qe(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 He=48,$e=/[MmLlHhVvCcSsQqTtAaZz]/;function tn(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 en(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=Qe(i,t,e,r,He);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];$e.test(t)?r++:t="M"===d?"L":"m"===d?"l":d;const n=t>="a",y=t.toUpperCase();if("Z"!==y){if("M"===y){const e=h()+(n?o:0),r=h()+(n?a:0);o=e,a=r,i=e,s=r,d=t;continue}if("L"===y)m(h()+(n?o:0),h()+(n?a:0));else if("H"===y)m(h()+(n?o:0),a);else if("V"===y)m(o,h()+(n?a:0));else if("C"===y){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"===y){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"===y){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}=tn([o,a],t,e);p(r,i,e)}else if("T"===y){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}=tn([o,a],t,e);p(r,i,e)}else{if("A"!==y){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]=qe(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&&(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((o=r,(e=t)<(n=0)?n:e>o?o:e));var e,n,o}}}var nn=.15;function rn(t){if("number"==typeof t)return{min:t,max:t};if(t&&"object"==typeof t){const e=t;if("number"==typeof e.value)return{min:e.value,max:e.value};if(Array.isArray(e.keyframes)&&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 on(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 an=t=>Math.round(1e3*t)/1e3;function sn(t,e){if(!e||null==t)return t;if("number"==typeof t)return t+e;const n=t;return"number"==typeof n.value?d(f({},n),{value:n.value+e}):Array.isArray(n.keyframes)?d(f({},n),{keyframes:n.keyframes.map(t=>d(f({},t),{value:(Number(t.value)||0)+e}))}):t}function ln(t,e){var n;if("clip"===e.pathOverflow)return{d:t,startShift:0};const r=en(t);if(!r||r.closed||r.totalLength<=0)return{d:t,startShift:0};const o=r.totalLength,a=nn*o,i=rn(e.startOffset),s=rn(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"+an(e)+","+an(n)+"L"+an(d.x)+","+an(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"+an(t)+","+an(e)}return{d:p,startShift:c}}function un(t,e,n){if(null!=n)if("number"!=typeof n){if("object"==typeof n&&null!==n){const r=n;if(Array.isArray(r.keyframes)){const n=t.animate&&"object"==typeof t.animate&&!Array.isArray(t.animate)?t.animate:void 0,o=f({},n||{}),a={keyframes:r.keyframes};return void 0!==r.loop&&(a.loop=r.loop),o[e]=a,void(t.animate=o)}if("number"==typeof r.value)return void(t[e]=String(r.value))}}else t[e]=String(n)}var cn=(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 fn(t,e){return Math.round(t)===t?""+Math.round(t):t.toFixed(e)}function dn(t,e){let n="";for(let r=0;r<t.length;r++){const o=fn(t[r],e);r>0&&45!==o.charCodeAt(0)&&(n+=" "),n+=o}return n}function hn(t,e,n){return[t[0]*e+t[2]*n+t[4],t[1]*e+t[3]*n+t[5]]}var pn=/([MLCQZ])|(-?\d*\.?\d+(?:e[-+]?\d+)?)/gi;function mn(t,e,n=2){const r=[];let o;for(pn.lastIndex=0;null!==(o=pn.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]=hn(e,s(),s());a+=t+dn([r,o],n)}else if("C"===t){const[t,r]=hn(e,s(),s()),[o,i]=hn(e,s(),s()),[l,u]=hn(e,s(),s());a+="C"+dn([t,r,o,i,l,u],n)}else if("Q"===t){const[t,r]=hn(e,s(),s()),[o,i]=hn(e,s(),s());a+="Q"+dn([t,r,o,i],n)}else"Z"!==t&&"z"!==t||(a+="Z")}return a}var yn=16,gn=["fontFamily","fontSize","fontWeight","fontStyle","textAnchor","letterSpacing","wordSpacing","textDecoration","textTransform","whiteSpace","x","y","dx","dy","lengthAdjust","fill","stroke","strokeWidth","effects",X,Y,"xml:space"];function vn(t){if("number"==typeof t)return t;if("string"==typeof t){const e=parseFloat(t);return isNaN(e)?void 0:e}}function bn(t){return"string"==typeof t?t:void 0}function kn(t,e){var n,r,o,a,i,s,l;return{fontFamily:null!=(n=bn(t.fontFamily))?n:e.fontFamily,fontSize:null!=(r=vn(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=vn(t.letterSpacing))?s:e.letterSpacing,wordSpacing:null!=(l=vn(t.wordSpacing))?l:e.wordSpacing}}function An(t){var e,n,r;return{fontFamily:bn(t.fontFamily),fontSize:null!=(e=vn(t.fontSize))?e:yn,fill:t.fill,stroke:t.stroke,strokeWidth:t.strokeWidth,letterSpacing:null!=(n=vn(t.letterSpacing))?n:0,wordSpacing:null!=(r=vn(t.wordSpacing))?r:0}}function wn(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 xn(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 Pn(t){const e=Object.keys(t);return 1===e.length?t[e[0]]:void 0}function jn(t,e){var n,r,o,a;const{glyphs:i,create:s=cn,warnings:l}=e,u=Pn(i),c={x:null!=(n=vn(t.x))?n:0,y:null!=(r=vn(t.y))?r:0},f=[],d=[{start:c.x,end:c.x}];let h=0;const p=(t,e)=>{const n=xn(e,i,u,l);if(!n)return;const r=e.fontSize/n.unitsPerEm,o=wn(e);for(let a=0;a<t.length;a++){const i=t.charAt(a),s=n.glyphs[i];s&&s.d&&f.push({glyphD:s.d,m:[r,0,0,r,c.x,c.y],paint:o,line:h,x:c.x,y:c.y,scale:r}),c.x+=(s?s.width:0)*r+e.letterSpacing+(" "===i?e.wordSpacing:0),d[h].end=c.x}},m=(t,e)=>{var n,r,o,a;const i=kn(t,e),s=vn(t.x),l=vn(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=vn(t.dx))?n:0,c.y+=null!=(r=vn(t.dy))?r:0;const u=null!=(o=bn(t[X]))?o:bn(t[Y]);if(u&&!(null==(a=t.children)?void 0:a.length)&&p(u,i),t.children)for(const e of t.children)m(e,i)},y=An(t);if(t.children)for(const e of t.children)m(e,y);const g=null!=(o=bn(t[X]))?o:bn(t[Y]);g&&!(null==(a=t.children)?void 0:a.length)&&p(g,y);const v=bn(t.textAnchor);if("middle"===v||"end"===v)for(const t of f){const e=d[t.line].end-d[t.line].start,n="middle"===v?-e/2:-e;t.m=[t.scale,0,0,t.scale,t.x+n,t.y]}return En(t,zn(f,s,l),s)}function Sn(t,e,n,r){const{x:o,y:a,angle:i}=t.sampleAtDistance(e),s=Math.cos(i),l=Math.sin(i),u=r/2;return[n*s,n*l,-n*l,n*s,o-n*s*u,a-n*l*u]}function On(t,e,n,r,o,a){var i;const{glyphs:s,create:l=cn,warnings:u}=r,c=e?en(e):null;if(!c)return null==u||u.push("textGlyphs: unparsable along-path geometry"),null;const h=Pn(s),{cells:p,width:y}=function(t,e,n,r){const o=[];let a=0;const i=(t,s)=>{var l,u;const c=kn(t,s),f=null!=(l=bn(t[X]))?l:bn(t[Y]);if(f&&!(null==(u=t.children)?void 0:u.length)){const t=xn(c,e,n,r);if(t){const e=c.fontSize/t.unitsPerEm,n=wn(c);for(let r=0;r<f.length;r++){const i=f.charAt(r),s=t.glyphs[i],l=(s?s.width:0)*e;s&&s.d&&o.push({glyphD:s.d,widthEm:s.width,scale:e,paint:n,midBase:a+l/2}),a+=l+c.letterSpacing+(" "===i?c.wordSpacing:0)}}}if(t.children)for(const e of t.children)i(e,c)};return i(t,An(t)),{cells:o,width:a}}(t,s,h,u);if(!p.length)return En(t,[],l);if(o&&o>0&&y>0){const t=o/y;for(const e of p)e.midBase*=t}const g="clip"===a&&!c.closed,v=m(n);if("animated"===v.kind&&v.keyframes.length>=2)return En(t,function(t,e,n,r,o,a){const i=Math.max(e.totalLength/Mn,.5),s=t=>Number(t.time)||0,l=t=>Number(t.value)||0,u=t=>t>=0&&t<=e.totalLength,c=[];for(const h of t){const t=[h.scale,0,0,h.scale,-h.scale*(h.widthEm/2),0],p=mn(h.glyphD,t),m=(t,n)=>{const{x:r,y:o,angle:a}=e.sampleAtDistance(t);return{time:n,value:{translate:[In(r,3),In(o,3)],rotate:In(180*a/Math.PI,3)}}},y=[],g=[],v=(t,e)=>{y.push(m(t,e)),a&&g.push({time:e,value:u(t)?1:0})};v(l(n[0])+h.midBase,s(n[0]));for(let t=1;t<n.length;t++){const e=s(n[t-1]),r=s(n[t]),o=l(n[t-1]),a=l(n[t]),u=Math.min(_n,Math.max(1,Math.ceil(Math.abs(a-o)/i)));for(let t=1;t<=u;t++){const n=t/u;v(o+n*(a-o)+h.midBase,e+n*(r-e))}}const b={keyframes:y};void 0!==r&&(b.loop=r);const k={transform:b};if(a&&g.some(t=>0===t.value)){const t={keyframes:g};void 0!==r&&(t.loop=r),k.opacity=t}c.push(o("path",d(f({d:p},Tn(h.paint)),{animate:k}),[]))}return c}(p,c,v.keyframes,v.loop,l,g),l);const b="animated"===v.kind?Number(null==(i=v.keyframes[0])?void 0:i.value)||0:"static"===v.kind&&Number(v.value)||0;return En(t,zn((g?p.filter(t=>{const e=b+t.midBase;return e>=0&&e<=c.totalLength}):p).map(t=>({glyphD:t.glyphD,paint:t.paint,m:Sn(c,b+t.midBase,t.scale,t.widthEm)})),l,u),l)}var Mn=48,_n=64;function In(t,e){const n=u(10,e);return Math.round(t*n)/n}function Tn(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 zn(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=mn(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",f({d:n},Tn(t)),[]));return s}function En(t,e,n){const r={};for(const e of Object.keys(t))"type"!==e&&"children"!==e&&-1===gn.indexOf(e)&&(r[e]=t[e]);if(r.style&&"object"==typeof r.style){const t=f({},r.style);delete t["white-space"],Object.keys(t).length?r.style=t:delete r.style}return n("g",r,e)}function Nn(t,e){return e.alongPath?On(t,e.alongPath.pathD,e.alongPath.startOffset,e,e.alongPath.textLength,e.alongPath.pathOverflow):jn(t,e)}function Cn(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 Fn(t){var e,n;return null!=(n=null!=(e=t.time)?e:t.t)?n:0}function Ln(t){var e;return null!=(e=t.easing)?e:t.e}function Rn(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 Un=new WeakMap;function Dn(t,e,n,r){var o,a;const i=Un.get(t);if(i)return i;const s=null!=(o=t.tangentOut)?o:t.to,l=null!=(a=e.tangentIn)?a:e.ti,u=[n[0]+(s?s[0]:0),n[1]+(s?s[1]:0)],c=[r[0]+(l?l[0]:0),r[1]+(l?l[1]:0)],f=Qe(n,u,c,r),d={P0:n,P1:u,P2:c,P3:r,lut:f,totalArc:f.ds[f.ds.length-1]};return Un.set(t,d),d}function Vn(t,e,n,r,o,a){const i=Dn(t,e,n,r),s=0===i.totalArc?o:function(t,e){const n=t.ds[t.ds.length-1],r=e*n,{ts:o,ds:a}=t,i=a.length-1;if(r<=0)return o[0];if(r>=a[i])return o[i];let s=1,l=i;for(;s<l;){const t=s+l>>>1;a[t]<r?s=t+1:l=t}const u=a[l-1],c=a[l]-u,f=c>0?(r-u)/c:0;return o[l-1]+f*(o[l]-o[l-1])}(i.lut,o),l=qe(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 Bn=.5,Wn=5,Gn=32;function Kn(t,e){var n,r,o,a;if(!Rn(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:Bn,u=null!=(o=null==e?void 0:e.rotationTolerance)?o:Wn,c=null!=(a=null==e?void 0:e.maxSamplesPerSegment)?a:Gn,f=[],d=Cn(i[0]);if(!d)return t;const h=s?function(t,e){const n=Cn(t),r=Cn(e);if(!n||!r)return 0;const o=Dn(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(qn(Fn(i[0]),Yn(Zn(i[0]),Zn(i[0]),0,d,h,s)));for(let t=0;t<i.length-1;t++){const e=i[t],n=i[t+1],r=Cn(e),o=Cn(n);r&&o?(s&&t>0&&Qn(f,e,n,r,o,u),Jn(f,e,n,r,o,s,l,u,c)):f.push(qn(Fn(n),Yn(Zn(n),Zn(n),1,null!=o?o:[0,0],void 0,s)))}const p=Ln(i[i.length-1]);p&&(f[f.length-1].e=p),s&&function(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}}(f);const m={kfs:f};return void 0!==t.loop&&(m.loop=t.loop),m}function qn(t,e){return{t:t,v:e}}function Zn(t){var e;const n=null!=(e=t.value)?e:t.v;if(n&&"object"==typeof n&&!Array.isArray(n))return n}function Xn(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 Yn(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]=Xn(o,s,n))}return void 0!==o&&(i.rotate=o),i}function Qn(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=Dn(e,n,r,o),f=Xe(c.P0,c.P1,c.P2,c.P3,0),d=180*Math.atan2(f[1],f[0])/Math.PI,h=function(t,e){let n=t-e;for(;n>180;)n-=360;for(;n<-180;)n+=360;return n}(d,u);if(Math.abs(h)<=a)return;const p=Yn(Zn(e),Zn(e),0,r,d,!0);t.push(qn(Fn(e),p))}function Jn(t,e,n,r,o,a,i,s,l){const u=Dn(e,n,r,o),c=Fn(e),f=Fn(n),d=Ln(e),h=(p=d)?_e([p[1],p[0],p[3],p[2]]):t=>t;var p;const m=Zn(e),y=Zn(n),g=function(t,e,n,r,o){const a=[];Hn(t.P0[0],t.P1[0],t.P2[0],t.P3[0],a),Hn(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++)$n(i[o],i[o+1],s,t,e,n,r,l);return s}(u,a,i,s,l),v=[];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:qe(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}v.push(r)}let b=d,k=0;const A=t.length-1;for(let e=0;e<v.length;e++){const n=v[e],r=k<1?Ke((n.u-k)/(1-k),0,1):1,{left:o,right:i}=Te(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=Yn(m,y,n.p,n.pos,n.rotateDeg,a);t.push(qn(l,u)),b=i,k=n.u}}function Hn(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 $n(t,e,n,r,o,a,i,s){const l=(t+e)/2,u=qe(r.P0,r.P1,r.P2,r.P3,t),c=qe(r.P0,r.P1,r.P2,r.P3,e),f=e-t,d=qe(r.P0,r.P1,r.P2,r.P3,t+.25*f),h=qe(r.P0,r.P1,r.P2,r.P3,l),p=qe(r.P0,r.P1,r.P2,r.P3,t+.75*f),m=Math.max(tr(d,u,c),tr(h,u,c),tr(p,u,c));let y=!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&&(y=!1)}m<=a&&y||s.remaining<=0||f<1e-6?n.push(e):(s.remaining-=1,$n(t,l,n,r,o,a,i,s),$n(l,e,n,r,o,a,i,s))}function tr(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 er(t,e){const n=nr(t,e);return null!=n?n:t}function nr(t,e){let n,r;if(t.children)for(let r=0;r<t.children.length;r++){const o=nr(t.children[r],e);null!==o&&(n||(n=t.children.slice()),n[r]=o)}const o=t.animate;if(o&&"object"==typeof o&&!Array.isArray(o)){const t=o,n=t.transform;if(n&&"object"==typeof n&&Rn(n)){const o=Kn(n,e);o!==n&&(r=d(f({},t),{transform:o}))}}if(!n&&!r)return null;const a=f({},t);return n&&(a.children=n),r&&(a.animate=r),a}function rr(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 or(t){return t.startsWith("path(")&&t.endsWith(")")?t.slice(5,-1):/^[MmZzLlHhVvCcSsQqTtAa]/.test(t)?t:void 0}function ar(t){return"string"==typeof t&&void 0!==or(t)}function ir(t){if(t&&"object"==typeof t&&"string"==typeof t.path){const e=or(t.path);return e?{paths:rr(e)}:t}if(t&&"object"==typeof t&&"paths"in t){const e=t.paths;if(Array.isArray(e)&&e.length>0&&ar(e[0])){const t=[];for(const n of e){const e=or(n);e&&t.push(...rr(e))}return{paths:t}}return t}if(Array.isArray(t)){if(t.length>0&&ar(t[0])){const e=[];for(const n of t){const t=or(n);t&&e.push(...rr(t))}return{paths:e}}return{paths:t}}if(ar(t)){return{paths:rr(or(t))}}return t}function sr(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 lr(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 ur(t,e,n,r){var o,a;if("d"===t){return{paths:Se(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)}}return Ce.has(t)?je(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?xe(e,n,r):Fe.has(t)||"stroke-dasharray"===t||"strokeDasharray"===t?Pe(e||[],n||[],r):xe(+(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)o[a]=xe(+(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]=Pe(r||t,i||t,n)}else o[a]=null!=i?i:r}return o}(e,n,r)}function cr(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.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.before?(p=0,m=d):(p=h,m=r);const y=m-p;if(y<=0)return e;const g=null!=(s=f[0].t)?s:0,v=(null!=(l=f[f.length-1].t)?l:0)-g;if(v<=0)return e;const b=f.map(t=>{var e,n;return{relT:(t.t-g)/v,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(y/v),A=y-k*v,w=A/v,x=[];function P(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?ze(b[t-1].e):void 0,tangentIn:b[t].tangentOut,tangentOut:b[t].tangentIn})}else o=b;const a=void 0!==r?r:1;for(let n=0;n<o.length;n++){const r=o[n];if(r.relT>a+1e-9){const i=o[n-1],s=r.relT-i.relT,l=(a-i.relT)/s,u=i.e?_e(i.e)(l):l,c=ur(t,i.v,r.v,u),{left:f}=Te(i.e,l);return x.length>0&&i.relT<=a&&(x[x.length-1].e=f),void x.push({t:e+a*v,v:c,e:void 0})}const i={t:e+r.relT*v,v:r.v,e:n<o.length-1?r.e:void 0};r.tangentIn&&(i.tangentIn=r.tangentIn),r.tangentOut&&(i.tangentOut=r.tangentOut),x.push(i)}}if(n.before){if(w>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?ze(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?_e(i.e)(o):o,l=ur(t,i.v,r.v,s),{right:u}=Te(i.e,o);x.push({t:e,v:l,e:u})}const s={t:e+(r.relT-a)*v,v:r.v,e:n<o.length-1?r.e:void 0};r.tangentIn&&(s.tangentIn=r.tangentIn),r.tangentOut&&(s.tangentOut=r.tangentOut),x.push(s)}}(p,!!n.alternate&&k%2==0,w)}for(let t=0;t<k;t++){const e=k-1-t,r=!!n.alternate&&e%2==0;P(p+A+t*v,r)}}else{for(let t=0;t<k;t++){const e=!!n.alternate&&t%2==0;P(p+t*v,e)}if(w>1e-9){const t=!!n.alternate&&k%2==0;P(p+k*v,t,w)}}return n.before?[...x,...e]:[...e,...x]}function fr(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=ir(f));const p=Be(t)?Ge(t):t;Ce.has(p)&&(f=null!=(l=Ne(f))?l:f);const m={t:n,v:f,e:sr(h,r)},y=null!=(u=e.tangentIn)?u:e.ti,g=null!=(c=e.tangentOut)?c:e.to;y&&(m.tangentIn=y),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?cr(t,d,p,n):d}function dr(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=Be(t)?Ge(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=ir(d)),l&&(d=null!=(o=Ne(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:cr(t,u,a,n)};return void 0!==e.autoOrient&&(c.autoOrient=e.autoOrient),c}function hr(t,e){const n=pr(t,e);return null!=n?n:t}function pr(t,e){let n,r;if(t.children)for(let r=0;r<t.children.length;r++){const o=pr(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=dr(n,o,e);a!==o&&(r||(r=f({},t)),r[n]=a)}}if(!n&&!r)return null;const a=f({},t);return n&&(a.children=n),r&&(a.animate=r),a}var mr=0;function yr(t,e=Z.webapi){const n=Ut(t)||{},r=Dt(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=lr(t,e);r&&n.push(r)}else if(Array.isArray(t))for(const r of t){const t=lr(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=Z.webapi){const o={};for(const[a,i]of Object.entries(t)){const t=fr(a,i,e,n);if(t.length>0){const e={kfs:t};void 0!==i.autoOrient&&(e.autoOrient=i.autoOrient),void 0!==i.loop&&(e.loop=i.loop),o[a]=r===Z.webapi&&"transform"===a?Kn(e):e}}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=Vt(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_"+ ++mr;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 gr(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;let o=t[0],a=t[t.length-1];for(let i=0;i<t.length-1;i++){const s=null!=(n=t[i].t)?n:0,l=null!=(r=t[i+1].t)?r:0;if(s<=e&&e<=l){o=t[i],a=t[i+1];break}}return{prevKf:o,nextKf:a}}(c,n);let h=f===d?0:(p=n,m=null!=(r=f.t)?r:0,y=null!=(o=d.t)?o:0,g=0,v=1,y===m?g:g+(p-m)/(y-m)*(v-g));var p,m,y,g,v;h=Ke(h,0,1);const b=null!=(a=f.e)?a:f.easing;if(b&&Array.isArray(b))try{h=_e(b)(h)}catch(t){}let k=Be(t)?Ge(t):t,A=null;const w=null!=(i=null==f?void 0:f.v)?i:null==f?void 0:f.value,x=null!=(s=null==d?void 0:d.v)?s:null==d?void 0:d.value;if("d"===k){A=Se(null!=(l=null==w?void 0:w.paths)?l:Array.isArray(w)?w:[],null!=(u=null==x?void 0:x.paths)?u:Array.isArray(x)?x:[],h).map(t=>we(t)).join("")}else if(Ce.has(k))A=Ee(je(w||[0,0,0,1],x||[0,0,0,1],h)),k=t;else if("stroke-dasharray"===k)A=Pe(w||[],x||[],h).join(" "),k=t;else if("transform"!==k||null===w||"object"!=typeof w||Array.isArray(w))if("translate"===k){A="translate("+Pe(w||[0,0],x||[0,0],h).join(",")+")",k="transform"}else if("rotate"===k){A="rotate("+xe(+(w||0),+(x||0),h)+")",k="transform"}else if("scale"===k){A="scale("+Pe(w||[1,1],x||[1,1],h).join(",")+")",k="transform"}else{A=xe(+(w||0),+(x||0),h)}else{const t=new Set([...w?Object.keys(w):[],...x?Object.keys(x):[]]),n={};for(const e of t){const t=null==w?void 0:w[e],r=null==x?void 0:x[e];if("rotate"===e)n.rotate=xe(+(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=Pe(t||o,r||o,h);n[e]=a}}if(Rn(e)){const t=w.translate,r=x.translate;if(Array.isArray(t)&&Array.isArray(r)){const o=Vn(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)}}A=Re(n,{withUnits:!1}),k="transform"}return Le.has(k)&&"number"==typeof A&&(A=100*A+"%"),{k:k,v:null===A?"":""+A}}function vr(t,e){const n={};for(const[r,o]of Object.entries(t)){const t=gr(r,o,e);t&&(n[t.k]=t.v)}return n}function br(t,e,n,r){if(!e)return t;const o=!!e.trimAllAsOne,a=[],i=t=>{if(Array.isArray(t.children)&&t.children.length>0){for(const e of t.children)i(e);return}const e="string"==typeof t.d?t.d:function(t){var e,n,r,o;if("rect"!==t.type)return;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"}(t);if(void 0===e)return;const n=rr(e);if(!n.length)return;const r={leaf:t,subpaths:[]};for(const t of n){const e=zr(t);r.subpaths.push({subpath:t,lengthPx:e,startOffsetPx:0})}a.push(r)};if(i(t),!a.length)return t;let s=0;const l=o?[...a].reverse():a;for(const t of l)for(const e of t.subpaths)o||(s=0),e.startOffsetPx=s,s+=e.lengthPx;const u=s;if(o&&u<.001)return t;const c=m(e.offset),h="absent"===c.kind?{kind:"static",value:0}:c,p=function(t){const e=m(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=Ir(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=Tr(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=Tr(n,t),r=(e[0]+e[1])/2;a.push({time:t,value:[r,r]})}return{kind:"animated",keyframes:a}}(e.range),y="absent"===p.kind?{kind:"static",value:[0,1]}:p,g=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}(h),v=[g.length?Math.min(...g):0,g.length?Math.max(...g):0];if(1===a.length&&a[0].leaf===t&&1===a[0].subpaths.length){const e=a[0],n=e.subpaths[0],r=o?u:n.lengthPx;if(r<.001)return t;const i=o?n.startOffsetPx/r:0;return function(t,e,n,r,o,a){const i=xr(n,e,r),s=Pr(e,r),l=f({},t);return delete l.effects,Or(l,"strokeDasharray",Sr(a,s)),Or(l,"strokeDashoffset",Sr(o,i)),Or(l,"strokeOpacity",_r(a)),l}(e.leaf,r,i,v,h,y)}const b=new Map;for(const t of a){const e=[];for(const n of t.subpaths){const a=o?u:n.lengthPx;if(a<.001)continue;const i=o?n.startOffsetPx/a:0;e.push(...Ar(t.leaf,n.subpath,a,i,v,h,y,r))}b.set(t.leaf,kr(t.leaf,e))}const k=t=>{const e=b.get(t);return e||(Array.isArray(t.children)&&t.children.length>0?d(f({},t),{children:t.children.map(k)}):t)};return k(t)}function kr(t,e){const n=d(f({},t),{type:"g",children:e});return delete n.d,delete n.strokeDasharray,delete n.strokeDashoffset,delete n.effects,n}function Ar(t,e,n,r,o,a,i,s){const l=xr(r,n,o),u=Pr(n,o),c=Sr(a,l),f=Sr(i,u),d=_r(i),h=function(t){return{type:"path",d:t}}(we(e));return Or(h,"strokeDasharray",f),Or(h,"strokeDashoffset",c),Or(h,"strokeOpacity",d),[h]}var wr=1;function xr(t,e,n){const[r]=jr(n);return n=>e*(-n-r+t)+wr}function Pr(t,e){const[n,r]=jr(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=wr;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+wr),s}}function jr(t){return[Math.floor(Math.min(-t[0],-t[1])),Math.ceil(Math.max(-t[0],-t[1]))]}function Sr(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 Or(t,e,n){var r,o;if(!n)return;if("static"===n.kind)return void(t[e]=n.value);const a=t.animate&&"object"==typeof t.animate&&!Array.isArray(t.animate)?t.animate:void 0,i=f({},a||{}),s={keyframes:n.keyframes};void 0!==n.loop&&(s.loop=n.loop),i[e]=s,t.animate=i;const l=n.keyframes[0];l&&void 0!==(null!=(r=l.value)?r:l.v)&&(t[e]=null!=(o=l.value)?o:l.v)}var Mr=10;function _r(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+Mr,value:1})):!p&&m&&(f.push({time:d-Mr,value:1}),f.push({time:d,value:0}))}return f.length<=1?void 0:{kind:"animated",keyframes:f}}function Ir(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 Tr(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 zr(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+=Er(t,r,r+1);return t.c&&e.length>1&&(n+=Er(t,e.length-1,0)),n}function Er(t,e,n){var r,o,a,i;const s=t.v,l=s[e],u=s[n],c=Qe(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]}function Nr(t){var e,n;const r={defs:[],warnings:[],errors:[],idMap:new Map,nextId:0,contentRefInnerIds:new Map,maskAncestorChains:new Map,engine:(null==(e=Ut(t))?void 0:e.mode)===q.frames?Z.frames:Z.webapi,glyphs:null==(n=Dt(t))?void 0:n.glyphs},o=Qt(t);Yt(o,r.idMap),k(o,r,()=>Zt(r,"inner")),function(t,e){const n=new Set,r=t=>{var o,a;const i=null==(a=null==(o=t.effects)?void 0:o.maskedBy)?void 0:a.href;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=ue(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(),Yt(t,e.idMap);const n=[],r=t=>{var e;ye(t)&&n.push(t),null==(e=t.children)||e.forEach(r)};r(t);for(const t of n){const n=ye(t);n&&(ge(t),ve(t,pe(n),e))}}(t,e),t}(Cr(o,r),r);return function(t,e){if(!e.length)return;(t.children||(t.children=[])).unshift({type:"defs",children:e})}(a,r.defs),{root:a,defs:r.defs,warnings:r.warnings,errors:r.errors}}function Cr(t,e){var n;t.children&&(t.children=t.children.map(t=>Cr(t,e)));const r=t.effects,o="string"==typeof t.id?t.id:void 0,a=o?e.contentRefInnerIds.get(o):void 0;if(!r&&!a)return t;const{transformation:i,repeater:s,maskedBy:l,trimPath:u,clone:c,fillGradient:f,strokeGradient:d,textPath:h,text:p}=null!=r?r:{};null==r||r.isCombinedShape;r&&delete t.effects;let m=t,y=!1;if(null==p?void 0:p.useGlyphs)if(h){const t="string"==typeof h.path?h.path:void 0,r=h.textLength,o="number"==typeof r?r:r&&"object"==typeof r?"number"==typeof r.value?r.value:Array.isArray(r.keyframes)&&r.keyframes.length?Number(null==(n=r.keyframes[0])?void 0:n.value):void 0:void 0,a=function(t,e,n,r,o,a){return e.glyphs?On(t,n,r,{glyphs:e.glyphs,warnings:e.warnings},o,a):(e.warnings.push("textGlyphs: no definitions.glyphs"),null)}(m,e,t,h.startOffset,o,h.pathOverflow);a&&(m=a,y=!0)}else m=function(t,e,n){return(null==e?void 0:e.useGlyphs)?n.glyphs?jn(t,{glyphs:n.glyphs,warnings:n.warnings}):(n.warnings.push("textGlyphs: no definitions.glyphs — left as native <text>"),t):t}(m,p,e),y=!0;return y||(m=function(t,e,n){var r;if(!e||"string"!=typeof e.path||!e.path)return t;const o=Zt(n,"tpath"),{d:a,startShift:i}=ln(e.path,{pathOverflow:e.pathOverflow,startOffset:e.startOffset,textLength:e.textLength,advance:on(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),un(s,"startOffset",sn(e.startOffset,i)),un(s,"textLength",e.textLength),t.children=[s],t}(m,h,e)),m=function(t,e,n){return Jt(t,e,n,"fill")}(m,f,e),m=function(t,e,n){return Jt(t,e,n,"stroke")}(m,d,e),m=br(m,u,0,e),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=Qt(t);delete l.transform,l.animate&&(delete l.animate.transform,0===Object.keys(l.animate).length&&delete l.animate);const u=[l];for(let t=1;t<a;t++){const r=Qt(l),o=de(e,t),a=o?g(r,o,n):r;u.push(a)}const c={type:"g",children:u};return void 0!==i&&(c.transform=i),void 0!==s&&(c.animate={transform:s}),c}(m,s,e),m=ee(m,l,i,e),a?(fe(m,c,e),m=A(m,i,o,a,e)):m=function(t,e,n,r){return fe(t,e,r),g(t,n,r)}(m,c,i,e),(null==c?void 0:c.retime)&&(t.effects={clone:{retime:c.retime}}),o&&e.idMap.set(o,m),m}function Fr(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=Rr(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=Dr(t.viewBox);if(e)return[e[2],e[3]];const n=Lr(t.width),r=Lr(t.height);return void 0!==n&&void 0!==r?[n,r]:[1,1]}(t),i=[],s=Vr(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 d(f({},s),{children:u})}function Lr(t){if("number"==typeof t)return t;if("string"==typeof t){const e=parseFloat(t);return Number.isFinite(e)?e:void 0}}function Rr(t){if("string"==typeof t)return t.startsWith("#")?t.slice(1):t}function Ur(t,e,n,r,o,a,i){var s,l,u,c;const h=Wt(e);Gt(h,o);const p="symbol"===h.type?Dr(h.viewBox):void 0,m=null!=(l=null!=(s=Lr(t.width))?s:null==p?void 0:p[2])?l:i[0],y=null!=(c=null!=(u=Lr(t.height))?u:null==p?void 0:p[3])?c:i[1],g="symbol"===h.type?function(t,e,n,r,o){const a=Dr(t.viewBox),i=d(f({},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,h=u>0&&c>0?Math.min(r/u,o/c):1,p=(r-u*h)/2,m=(o-c*h)/2,y=[];0===p&&0===m||y.push("translate("+p+","+m+")");1!==h&&y.push("scale("+h+")");0===s&&0===l||y.push("translate("+-s+","+-l+")");y.length&&(i.transform=y.join(""));const g=e();return n.push({type:"clipPath",id:g,children:[{type:"rect",x:s,y:l,width:u,height:c}]}),i.clipPath="url(#"+g+")",i}(h,o,a,m,y):h,v=Vr(g,n,r,o,a,i),b=d(f({},t),{type:"g",children:[v]});return delete b.href,delete b.width,delete b.height,qt(b)}function Dr(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 Vr(t,e,n,r,o,a){if("use"===t.type&&"string"==typeof t.href){const i=Rr(t.href);if(i&&n.has(i)){const s=e.get(i);if(s)return Ur(t,s,e,n,r,o,a)}}if(!t.children)return t;let i=!1;const s=t.children.map(t=>{const s=Vr(t,e,n,r,o,a);return s!==t&&(i=!0),s});return i?d(f({},t),{children:s}):t}function Br(t,e,n){var r,o;let a=Nr(t).root;return a=hr(a,null!=(o=null==(r=Ut(a))?void 0:r.duration)?o:De),e===Z.webapi&&(a=er(a,null==n?void 0:n.motionPath),a=Fr(a),a=function(t){const e=t=>t.startsWith("#")?t.slice(1):t,n=(t,e)=>{var r;e(t),null==(r=t.children)||r.forEach(t=>n(t,e))};let r=!0;for(;r;){r=!1;const o=new Set;n(t,t=>{"use"===t.type&&"string"==typeof t.href&&o.add(e(t.href))}),n(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&&!o.has(t.id)))),e=e.filter(t=>!("defs"===t.type&&(!t.children||0===t.children.length))),e.length!==t.children.length&&(t.children=e,r=!0)})}return t}(a)),a}var Wr="http://www.w3.org/2000/svg",Gr=new Set(["script","foreignobject"]),Kr=new Set(["href","xlink:href","src","filter","clippath","mask","markerstart","markermid","markerend"]),qr=new Set(["href","xlink:href","src"]),Zr=/^data:image\/(?:png|jpe?g|gif|webp|bmp);base64,/i,Xr=/^data:image\/svg\+xml(?:;[^,]*)?,/i,Yr=/^data:image\/[^;,]*;base64,([A-Za-z0-9+/]{8})/i,Qr=["iVBORw0K","/9j/","R0lGOD","UklGR","Qk"];function Jr(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(Kr.has(n)){const t=String(e);return t.startsWith("#")||(/^url\(#[^)]+\)$/.test(t)||qr.has(n)&&(Zr.test(t)||Xr.test(t)||function(t){const e=Yr.exec(t);return!!e&&Qr.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 Hr(t){const e={};for(const n of Object.keys(t)){const r=Ve(n);if(Q.has(r))continue;if("style"===r)continue;let o=t[n];Ce.has(r)&&Array.isArray(o)?e[r]=Ee(o):"transform"===r&&null!==o&&"object"==typeof o&&!Array.isArray(o)&&o.value&&"object"==typeof o.value?e.transform=Re(o.value,{withUnits:!1}):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+")"):null!=o&&(e[r]=String(o))}return e}function $r(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=Dt(t)||e,f=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,c);let d;if(o)for(const t of o){const e=$r(t,c);e&&(d||(d=[]),d.push(e))}return function(t,e,n,r,o){if(Gr.has(t.toLowerCase()))return console.warn("SVG tag blocked (dangerous): ",t),null;const a=document.createElementNS(Wr,t);for(const t in e){const n=Jr(t,e[t]);void 0!==n&&a.setAttribute(Ge(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",Hr(u),f,d,u[X]||u[Y])}function to(t,e){const{startOn:n,outAction:r="continue",scrollIntoViewThreshold:o=.5}=e,a=t.getRootElement();if(!a)return console.warn("setupAnimationTriggers: No root element found for animation."),t;const i=()=>{t.play()},s=()=>{switch(r){case"pause":t.pause();break;case"reset":t.cancel();break;case"reverse":t.play()}};switch(n){case"load":{const t=()=>i();"complete"===document.readyState?t():window.addEventListener("load",t,{once:!0});break}case"mouseOver":{const t=()=>i(),e=()=>s();a.addEventListener("mouseenter",t),a.addEventListener("mouseleave",e);break}case"click":{const e=()=>{t.isPlaying()?s():i()};a.addEventListener("click",e);break}case"scrollIntoView":new IntersectionObserver(t=>{t.forEach(t=>{t.isIntersecting&&t.intersectionRatio>=o?i():s()})},{threshold:o}).observe(a);break}return t}function eo(t){return"#"+t}function no(t,e,n){const r=Ut(t)||{},o=yr(t,Z.frames),a=r.iterations;let i=1;"number"==typeof a&&(i=a||1),"infinite"===a&&(i=1/0),i<1&&(i=1);const s=+(r.duration||De),l=s&&i?s*(i===1/0?1/0:i):s?(null!=i?i:1)*s:0,u=r.direction||"normal";let c=null,f=!1,d=r.delay||0,h=0,p=1,m=!1;const y=r.frameRate,g=y&&y>0?1e3/y:0;let v=0;const b=()=>{const t=h?(Date.now()-h)*p:0;let e=d+t;return Number.isFinite(l)&&e>l&&(e=l),e<0&&(e=0),e};function k(t){let n=function(){const e=s>0?s:1;let n=0,r=0;if(s>0){t=Ke(t,0,i*e),r=Math.max(0,Math.ceil(t/e)-1),r=Math.min(r,i-1);n=Ke((t-r*e)/e,0,1)}else n=t;const o=u||"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 o||[]){const r=t.animate;if(!r||"object"!=typeof r||Array.isArray(r)){console.warn("Empty or unresolved binding",t);continue}const o=vr(r,n*s);for(const[n,r]of Object.entries(o))e.setAttribute(t.id,n,r)}}r.delay&&k(b());const A=()=>!!f&&(!!e.isConnected()&&!(Number.isFinite(l)&&b()>=l)),w=t=>{null!==c&&(cancelAnimationFrame(c),c=null),(t||A())&&(c=requestAnimationFrame(()=>{c=null,(()=>{var t;if(!e.isConnected())return void x();const r=b();if(g>0){const t=Date.now();if(v&&t-v<g)return;v=t}if(l&&Number.isFinite(l)&&r>=l)return k(l),m||(m=!0,null==(t=null==n?void 0:n.onFinish)||t.call(n)),void x();k(r)})(),w()}))},x=()=>{f&&(d=b(),h=0,f=!1,null!==c&&(cancelAnimationFrame(c),c=null),k(d))},P={isReady:()=>!0,getRootElement:()=>null,isPlaying:()=>A(),play:()=>{var t;f||(Number.isFinite(l)&&d>=l&&(d=0,m=!1),f=!0,h=Date.now(),w(!0)),null==(t=null==n?void 0:n.onPlay)||t.call(n)},pause:()=>{var t;x(),null==(t=null==n?void 0:n.onPause)||t.call(n)},cancel:()=>{var t;x(),d=0,h=0,f=!1,m=!1,k(d),null==(t=null==n?void 0:n.onCancel)||t.call(n)},finish:()=>{((t=!0)=>{var e;d=Number.isFinite(l)?l:b(),h=0,f=!1,k(d),t&&!m&&(m=!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");const e=b();p=t,d=e,f&&(h=Date.now())},getCurrentTime:()=>b(),setCurrentTime:t=>{t<0&&(t=0),Number.isFinite(l)&&t>l&&(t=l),d=t,f&&(h=Date.now()),k(b())},destroy:()=>{P.cancel()}};return P}function ro(t,e,n,r){const o=Ut(t)||{};if(!r)if(t.id){const e=eo(t.id);(r=document.querySelector(e))||console.warn("createFrameLoopAnimator: No root element found for selector: ",e)}else console.warn("createFrameLoopAnimator: No root element provided");let a=no(t,e||function(t){const e=new Set,n={isConnected:()=>!t||t.isConnected,setAttribute:(n,r,o)=>{r=Ge(r);const a=eo(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];e.setAttribute(r,o),Ue.has(r)&&(e.style[r]=o)}}};return n}(r),n);return a=d(f({},a),{getRootElement:()=>r||null}),o.trigger&&to(a,o.trigger),a}function oo(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=Ee(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=""+i:(u=Re(i,{withUnits:!0}),c="transform"),CSS.supports(c,u)||r.add(c),c=Ve(c),l[c]=u,l}function ao(t,e,n){var r,o,a,i,s;const l=[];for(let u=0;u<e.length;u++){const c=e[u],h=null!=(r=c.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=c.e?_e(c.e)(e):e,{right:o}=Te(c.e,e);l.push({t:0,v:ur(t,c.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?_e(r.e)(o):o,{left:i}=Te(r.e,o);l.length>0&&(l[l.length-1]=d(f({},l[l.length-1]),{e:i})),l.push({t:n,v:ur(t,r.v,c.v,a),e:void 0})}break}l.push(c)}return l}function io(t,e,n){var r;const o=new Map;for(const[a,i]of Object.entries(t)){const t=n.duration||1,s=ao(a,i.kfs||i.keyframes||[],t),l=[];for(let n=0;n<s.length;n++){const o=s[n],i=oo(o,Ke((null!=(r=o.t)?r:0)/t,0,1),a,e);0===n&&(i.offset||0)>0&&l.push(d(f({},i),{offset:0})),l.push(i)}l.length>0&&(l[l.length-1].offset||0)<1&&l.push(d(f({},l[l.length-1]),{offset:1})),l.length>0&&o.set(a,l)}return o}function so(t,e,n,r){var o;const a=Ut(t)||{};if(!n)if(t.id){const e=eo(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=yr(t,Z.webapi),s=[],l=a.iterations;let u;"number"==typeof l&&(u=l),"infinite"===l&&(u=1/0);const c=new Set;(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=eo(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 f=io(r,c,a),d=a.delay&&a.delay>0?a.delay:void 0,h=a.delay&&a.delay<0&&a.duration?-a.delay%a.duration:void 0,p={duration:a.duration,delay:d,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 f)if(t.length>0)try{const r=new KeyframeEffect(n,t,p),o=new Animation(r,document.timeline);(null==e?void 0:e.onFinish)&&(o.onfinish=()=>{var t;return null==(t=e.onFinish)?void 0:t.call(e)}),(null==e?void 0:e.onRemove)&&(o.onremove=()=>{var t;return null==(t=e.onRemove)?void 0:t.call(e)}),h&&(o.currentTime=h),s.push(o)}catch(t){console.warn(t)}}}if(!r&&c.size)return console.warn("Unsupported CSS attrs: "+[...c].join(", ")),null;const f={isReady:()=>!0,getRootElement:()=>n||null,isPlaying:()=>{var t;return"running"===(null==(t=s[0])?void 0:t.playState)},play:()=>{var t;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;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),f),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=>{s.forEach(e=>{e.currentTime=t})},destroy:()=>{f.cancel(),s.splice(0,s.length)}};return a.trigger&&to(f,a.trigger),f}var lo=0;function uo(){return"_px_"+Date.now().toString(36)+(++lo).toString(36)+Math.random().toString(36).substring(2,6)}function co(t){if(null===t||"object"!=typeof t)return t;if(Array.isArray(t))return t.map(t=>co(t));const e=t,n={};for(const t of Object.keys(e))n[t]=co(e[t]);return n}function fo(t){var e,n;const r=co(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(["baseId","targetId","boundElementId"]);!function t(e){if(e&&"object"==typeof e){if(e.id&&"string"==typeof e.id){const t=e.id,n=uo();o.set(t,n),e.id=n}else e.animate&&(e.id=uo());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]=ho(r,o);else if(s.has(n)){const t=o.get(r);t&&(e[n]=t)}else r.includes("url(#")&&(e[n]=ho(r,o));else if("style"===n&&"object"==typeof r&&null!==r)for(const[t,e]of Object.entries(r))"string"==typeof e&&(r[t]=ho(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.animate;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=d(f({},r.animator),{animate:t})}return r}function ho(t,e){return t.replace(/url\(#([^)]+)\)/g,(t,n)=>{const r=e.get(n);return r?"url(#"+r+")":t})}function po(t,e,n,r){const o=Tt(t);for(const t of o)console.warn("[PxAnimator] effects shape warning:",t);const a=Ut(t)||{};a.debug=!0;t=Br(t,a.mode===q.frames?Z.frames:Z.webapi);let i=null;if(r&&t.children){t=fo(t);const e="string"==typeof r?document.querySelector(r):r;e&&(i=$r(t),i&&e.replaceChildren(i))}return function(t,e,n,r){const o=Ut(t)||{};let a;return a=o.mode===q.frames?ro(t,e,n,r):so(t,n,r,o.mode===q.webapi)||ro(t,e,n,r),o.debugInstName&&(window[o.debugInstName]=a),a}(t,e,n,i)}var mo="data";function yo(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 po(n,r,o,a);let i=null;return fetch(e).then(t=>t.json()).then(t=>{Lt(t)?i=po(t,r,o,a):console.error("Invalid animation document format")}),{isReady:()=>!!i,getRootElement:()=>i?i.getRootElement():null,isPlaying:()=>(null==i?void 0:i.isPlaying())||!1,play:()=>{null==i||i.play()},pause:()=>{null==i||i.pause()},cancel:()=>{null==i||i.cancel()},finish:()=>{null==i||i.finish()},setPlaybackRate:t=>{null==i||i.setPlaybackRate(t)},getCurrentTime:()=>(null==i?void 0:i.getCurrentTime())||0,setCurrentTime:t=>{null==i||i.setCurrentTime(t)},destroy:()=>{null==i||i.destroy()}}}function go(){const t=document.querySelectorAll("["+G+"]");for(let e=0;e<t.length;e++){const n=t[e];if(!n[K]){const t=n.getAttribute(G);t&&(n[K]=yo({src:t,container:n}))}}}"undefined"!=typeof window&&(window.loadTagAnimators=go,window.createAnimator=yo,window.setupAnimationTriggers=to);var vo=[1,0,0,1,0,0];function bo(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 ko=(t,e)=>[1,0,0,1,t,e],Ao=(t,e)=>[t,0,0,e,0,0];function wo(t){const e=t*Math.PI/180;return[Math.cos(e),Math.sin(e),-Math.sin(e),Math.cos(e),0,0]}var xo=t=>[1,0,Math.tan(t*Math.PI/180),1,0,0],Po=t=>[1,Math.tan(t*Math.PI/180),0,1,0,0];function jo(t){let e=vo;t.translate&&(e=bo(e,ko(t.translate[0],t.translate[1])));const n=t.origin&&(void 0!==t.rotate||t.scale);return n&&(e=bo(e,ko(t.origin[0],t.origin[1]))),void 0!==t.rotate&&(e=bo(e,wo(t.rotate))),t.scale&&(e=bo(e,Ao(t.scale[0],t.scale[1]))),n&&(e=bo(e,ko(-t.origin[0],-t.origin[1]))),e}function So(t,e,n){return t+(e-t)*n}function Oo(t,e){return null==t?vo:"string"==typeof t?function(t){let e=vo;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=bo(e,ko(n[0]||0,n[1]||0)):"scale"===t?e=bo(e,Ao(n[0],n.length>1?n[1]:n[0])):"rotate"===t?e=bo(e,wo(n[0])):"skewX"===t?e=bo(e,xo(n[0])):"skewY"===t?e=bo(e,Po(n[0])):"matrix"===t&&(e=bo(e,[n[0],n[1],n[2],n[3],n[4],n[5]]))}return e}(t):t.keyframes?jo(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=[So(h.translate[0],p.translate[0],d),So(h.translate[1],p.translate[1],d)]:m.translate=h.translate||p.translate,void 0!==h.rotate&&void 0!==p.rotate?m.rotate=So(h.rotate,p.rotate,d):m.rotate=null!=(l=h.rotate)?l:p.rotate,h.scale&&p.scale?m.scale=[So(h.scale[0],p.scale[0],d),So(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?jo(t.value):vo}var Mo=new Set(["svg","g","symbol"]),_o=new Set(["defs","mask","clipPath","title"]);function Io(t,e){var n;"string"==typeof t.id&&e.set(t.id,t),null==(n=t.children)||n.forEach(t=>Io(t,e))}function To(t){return null==t?0:Number(t)}function zo(t){return Math.round(100*t)/100+0}function Eo(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=zo(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 So(c.value,f.value,d)}return void 0!==e?Number(e):n}(null==(s=t.animate)?void 0:s.opacity,t.opacity,1,n)),d=t.mask?1:0,h=e.map(zo).join(",");return t.type+"|"+function(t){var e;switch(t.type){case"rect":return To(t.width)+","+To(t.height)+","+To(t.x)+","+To(t.y);case"ellipse":return To(t.rx)+","+To(t.ry)+","+To(t.cx)+","+To(t.cy);case"circle":return To(t.r)+","+To(t.cx)+","+To(t.cy);case"path":return String(null!=(e=t.d)?e:"");default:return""}}(t)+"|["+h+"]|f:"+l+"|s:"+u+"|sw:"+(To(c)||"")+"|o:"+f+"|m:"+d}function No(t,e,n,r,o){var a;const i=t.type||"";if(_o.has(i))return;const s=bo(e,function(t,e){return t.animate&&t.animate.transform?Oo(t.animate.transform,e):void 0!==t.transform?Oo(t.transform,e):vo}(t,n));if("use"===i){const e="string"==typeof t.href?t.href.replace(/^#/,""):"",a=r.get(e),i=bo(s,ko(To(t.x),To(t.y)));return void(a?No(a,i,n,r,o):o.push("UNRESOLVED_USE:#"+e))}Mo.has(i)?null==(a=t.children)||a.forEach(t=>No(t,s,n,r,o)):o.push(Eo(t,s,n))}function Co(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=>Co(t,e))}function Fo(t,e){const n=new Map;Io(t,n);const r=[];return No(t,vo,e,n,r),r.sort()}function Lo(t,e){const n=new Set;Co(t,n),Co(e,n);const r=[];for(const o of Array.from(n).sort((t,e)=>t-e)){const n=Fo(t,o),a=Fo(e,o),i=Ro(n,a),s=Ro(a,n);(i.length||s.length)&&r.push({time:o,onlyInA:i,onlyInB:s})}return r}function Ro(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}
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=Math.pow,c=(t,n,r)=>n in t?e(t,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[n]=r,f=(t,e)=>{for(var n in e||(e={}))s.call(e,n)&&c(t,n,e[n]);if(i)for(var n of i(e))l.call(e,n)&&c(t,n,e[n]);return t},d=(t,e)=>n(t,o(e)),h=(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},p={};function m(t,e,n){const r={};return"translate"===t?r.translate=e:"rotate"===t?r.rotate=e:r.scale=e,n&&"translate"!==t&&(r.origin=n),r}function y(t){if(void 0===t)return{kind:"absent"};if(Array.isArray(t))return{kind:"static",value:t};if("object"==typeof t){const e=t;if(e.keyframes)return{kind:"animated",keyframes:e.keyframes,autoOrient:e.autoOrient,loop:e.loop};if(void 0!==e.value)return{kind:"static",value:e.value}}return{kind:"static",value:t}}function g(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 v(t,e,n){if(!e)return t;delete t.transform;let r=t;var o;return r=b(r,"skew",e.skew,n),r=A(r,e.origin,!0),r=b(r,"scale",void 0===(o=e.scale)?void 0:Array.isArray(o)?[o[0]/100,o[1]/100]:o,n),r=b(r,"rotate",e.rotate,n),r=A(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=b(r,"translate",e.translate,n):(r=A(r,e.origin,!0),r=b(r,"translate",e.translate,n),r=A(r,e.origin,!1)),r}function b(t,e,n,r){if(void 0===n)return t;if("skew"===e){const e=y(n);return"static"!==e.kind?(r.warnings.push("transformation.skew: only static skew is supported"),t):{type:"g",transform:"skewX("+e.value[0]+")skewY("+e.value[1]+")",children:[t]}}const o=y(n);if("static"===o.kind)return{type:"g",transform:{value:m(e,o.value,void 0)},children:[t]};if("animated"===o.kind){const n={keyframes:o.keyframes.map(t=>g(t,m(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 A(t,e,n){if(void 0===e)return t;const r=y(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=>g(t,{translate:o(t.value)}))};return void 0!==r.loop&&(e.loop=r.loop),{type:"g",animate:{transform:e},children:[t]}}return t}function k(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=t.effects.clone.baseId;"string"==typeof r&&r&&!e.contentRefInnerIds.has(r)&&e.contentRefInnerIds.set(r,n(r))}null==(a=t.children)||a.forEach(t=>k(t,e,n))}function w(t,e,n,r,o){const a=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=P(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&&P((null==(r=t.animate)?void 0:r.transform)||void 0)||i&&P((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=x(a.full),r=x(o.full),i=-n[0],s=-n[1],l=r[0]-i,u=r[1]-s;if(0===l&&0===u)return{rest:t};return{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:delete t.transform:e.translate&&(a.transform=e.translate,e.rest?t.transform=e.rest:delete t.transform)}return a}(t,e);"string"==typeof t.id&&delete t.id;const{outer:i,inner:s}=function(t){if(!t)return{};const e=P(t.translate),n=void 0!==t.rotate||void 0!==t.scale,r={},o={};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);return{outer:Object.keys(r).length?r:void 0,inner:Object.keys(o).length?o:void 0}}(e);let l=t;l=v(l,s,o);let u={type:"g",id:n,children:[{type:"g",id:r,children:[l]}]};return void 0!==a.transform&&(u.transform=a.transform),void 0!==a.animate&&(u.animate=a.animate),i&&(delete u.id,u=v(u,i,o),u.id=n),u}function x(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 P(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 S(t){if(!t.length)return".";let e="";for(const n of t)n.startsWith("[")?e+=n:e+=(e?".":"")+n;return e}((t,n)=>{for(var r in n)e(t,r,{get:n[r],enumerable:!0})})(p,{COLOUR_ATTR_NAMES:()=>Le,PX_ANIMATOR_DATA_KEY:()=>wo,PX_ANIM_ATTR_NAME:()=>q,PX_ANIM_SRC_ATTR_NAME:()=>K,PX_TRANSFORM_PART_KEYS:()=>nt,PxAnimatedSvgDocumentSchema:()=>Lt,PxAnimationDefinitionSchema:()=>at,PxAnimatorConfigSchema:()=>ft,PxAnimatorEngine:()=>X,PxAnimatorMode:()=>Z,PxAttrValueSchema:()=>ht,PxBezierPathSchema:()=>Dt,PxBindingSchema:()=>dt,PxCloneEffectSchema:()=>wt,PxDefsSchema:()=>ct,PxEasingOrRefSchema:()=>H,PxEffectsSchema:()=>Et,PxElementAnimationSchema:()=>it,PxFillGradientEffectSchema:()=>Mt,PxGradientSpreadMethod:()=>Pt,PxGradientStopSchema:()=>jt,PxGradientType:()=>St,PxGradientUnits:()=>xt,PxKeyframeSchema:()=>$,PxLoopSchema:()=>tt,PxMaskedByEffectSchema:()=>vt,PxNodeBase:()=>Nt,PxNodeSchema:()=>Ct,PxPropertyAnimationSchema:()=>et,PxRepeaterEffectSchema:()=>gt,PxRetimeEffectSchema:()=>kt,PxStrokeGradientEffectSchema:()=>_t,PxSvgNodeExtra:()=>Ft,PxTextEffectSchema:()=>zt,PxTextPathEffectSchema:()=>It,PxTransformPartsSchema:()=>rt,PxTransformValueSchema:()=>ot,PxTransformationEffectSchema:()=>yt,PxTriggerSchema:()=>st,PxTrimPathEffectSchema:()=>At,STYLE_ATTR_NAMES:()=>Ve,TRANSFORM_FN_NAMES:()=>De,applyPlayerEffects:()=>Vr,calcAnimationValues:()=>Sr,camelCaseToKebabWordIfNeeded:()=>qe,collectSampleTimes:()=>Bo,createAnimator:()=>xo,createAnimatorImpl:()=>ko,createBasicFrameLoopAnimator:()=>uo,createFrameLoopAnimator:()=>co,createPathSampler:()=>rn,createWebApiAnimator:()=>mo,describeSchema:()=>W,diffInEffect:()=>Go,evaluateMotionPathSegment:()=>Zn,extendedPathForBrowser:()=>cn,generateNewIds:()=>bo,getAnimatorConfig:()=>Vt,getBindings:()=>Wt,getChildren:()=>Gt,getDefs:()=>Bt,getNormalizedProps:()=>ao,isPxElementFileFormat:()=>Rt,isPxElementFileFormatDeep:()=>Ut,jsonElementFactory:()=>dn,layoutGlyphTextChars:()=>In,loadTagAnimators:()=>Po,materialiseAllInTree:()=>Yr,materialiseAnimatedUseInstances:()=>Wr,materialiseGlyphText:()=>Un,materialiseGlyphTextAlongPath:()=>Tn,materialiseGlyphTextHorizontal:()=>_n,materialiseInternalLoopsInPropAnim:()=>br,materialiseInternalLoopsInTree:()=>Ar,materialiseMotionPathInPropAnim:()=>Jn,materialiseMotionPathsInTree:()=>lr,normalizeDocument:()=>xr,propAnimIsMotionPath:()=>Gn,px:()=>G,renderNode:()=>io,schemaKeys:()=>B,setupAnimationTriggers:()=>so,shiftAnimatable:()=>un,toRGBA:()=>Ce,validateNodeEffects:()=>Tt,visualModelAt:()=>Wo}),module.exports=(t=p,((t,n,o,i)=>{if(n&&"object"==typeof n||"function"==typeof n)for(let l of a(n))s.call(t,l)||l===o||e(t,l,{get:()=>n[l],enumerable:!(i=r(n,l))||i.enumerable});return t})(e({},"__esModule",{value:!0}),t));var j=class{_canSanitize(t){return this.isValid(t)}optional(){return new O(this)}},O=class extends j{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)}},M=class extends j{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(S(null!=n?n:[])+": expected string, got "+typeof t),!1)}},_=class extends j{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(S(null!=n?n:[])+": expected finite number, got "+JSON.stringify(t)),!1)}},I=class extends j{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(S(null!=n?n:[])+": expected boolean, got "+typeof t),!1)}},z=class extends j{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(S(null!=n?n:[])+": expected "+JSON.stringify(this.value)+", got "+JSON.stringify(t)),!1)}},E=class extends j{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(S(null!=n?n:[])+": expected one of "+this.values.map(t=>JSON.stringify(t)).join(" | ")+", got "+JSON.stringify(t)),!1)}},T=class extends j{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;return!!this.schemas.some(e=>e.isValid(t))||(null==e||e.errors.push(S(null!=n?n:[])+": no union member matched for value "+(null!=(r=JSON.stringify(t))?r:"").slice(0,60)),!1)}_canSanitize(t){return this.schemas.some(e=>e._canSanitize(t))}},N=class extends j{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(S(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)}},C=class extends j{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(S(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||(o.push(t),e.errors.push(S(o)+": unexpected extra key"),o.pop(),a=!1);return a}_canSanitize(t){return!!t&&"object"==typeof t&&!Array.isArray(t)}},F=class extends j{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=f({},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(S(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)}},L=class extends j{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(S(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)}},D=class extends j{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(S(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)}},R=class extends j{constructor(){super(...arguments),this._default=void 0}sanitize(t){return t}isValid(t,e,n){return!0}_canSanitize(t){return!0}},U=class extends j{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)}},V=class extends j{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(S(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 B(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 M(t),number:(t=0)=>new _(t),boolean:(t=!1)=>new I(t),literal:t=>new z(t),enum:(t,e)=>new E(t,e),union:(t,e)=>new T(t,e),discriminatedUnion:(t,e)=>new N(t,e),object:t=>new C(t),openObject:(t,e)=>new F(t,e),extendedObject:(t,e)=>new C(f(f({},t._shape),e)),array:t=>new L(t),record:t=>new D(t),any:()=>new R,tuple:t=>new V(t),lazy:(t,e)=>new U(t,e)},K="data-px-animation-src",q="_px_animator",Z={auto:"auto",webapi:"webapi",frames:"frames"},X={webapi:Z.webapi,frames:Z.frames},Y="text",Q="textContent",J=new Set(["type","children","animator","meta","animate",Y,Q]),H=G.union([G.string(),G.tuple([G.number(),G.number(),G.number(),G.number()])]),$=(G.union([G.string(),G.number(),G.array(G.number()),G.lazy(()=>rt,{}),G.object({path:G.string()}),G.lazy(()=>G.object({paths:G.array(Dt)}),{paths:[]})]),G.object({time:G.number().optional(),t:G.number().optional(),value:G.any().optional(),v:G.any().optional(),easing:H.optional(),e:H.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()})),tt=G.object({segmentCount:G.number().optional(),before:G.boolean().optional(),alternate:G.boolean().optional()}),et=G.object({keyframes:G.array($).optional(),kfs:G.array($).optional(),loop:G.union([tt,G.boolean()]).optional(),autoOrient:G.boolean().optional()}),nt=["translate","rotate","scale","origin"],rt=G.object({translate:G.tuple([G.number(),G.number()]).optional(),rotate:G.number().optional(),scale:G.tuple([G.number(),G.number()]).optional(),origin:G.tuple([G.number(),G.number()]).optional()}),ot=G.union([G.string(),G.object({value:rt}),et]),at=G.record(et),it=G.union([G.string(),G.array(G.union([G.string(),at])),at]),st=G.object({startOn:G.enum(["load","mouseOver","click","scrollIntoView","programmatic"]).optional(),outAction:G.enum(["continue","pause","reset","reverse"]).optional(),scrollIntoViewThreshold:G.number().optional()}),lt=G.object({width:G.number(),d:G.string()}),ut=G.object({fFamily:G.string(),style:G.string(),ascent:G.number(),unitsPerEm:G.number(),glyphs:G.record(lt)}),ct=G.object({easings:G.record(G.tuple([G.number(),G.number(),G.number(),G.number()])).optional(),animations:G.record(at).optional(),styles:G.record(G.any()).optional(),glyphs:G.record(ut).optional()}),ft=G.object({mode:G.enum([Z.auto,Z.webapi,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:st.optional(),definitions:ct.optional(),animate:G.record(it).optional(),debug:G.boolean().optional(),debugInstName:G.string().optional()}),dt=G.object({id:G.string(),animate:it}),ht=G.union([G.string(),G.number(),G.object({value:G.any()}),et]),pt=G.union([G.number(),G.object({value:G.number()}),G.object({keyframes:G.array($),autoOrient:G.boolean().optional()})]),mt=G.union([G.tuple([G.number(),G.number()]),G.object({value:G.tuple([G.number(),G.number()])}),G.object({keyframes:G.array($),autoOrient:G.boolean().optional()})]),yt=G.object({translate:mt.optional(),rotate:pt.optional(),scale:mt.optional(),skew:mt.optional(),origin:mt.optional()}),gt=G.object({copies:G.number().optional(),translate:mt.optional(),rotate:pt.optional(),scale:mt.optional(),origin:mt.optional()}),vt=G.object({href:G.string().optional(),maskType:G.string().optional(),maskUnits:G.string().optional(),maskContentUnits:G.string().optional()}),bt=G.object({d:G.string().optional(),animate:et.optional()}),At=G.object({offset:pt.optional(),range:mt.optional(),trimAllAsOne:G.boolean().optional()}),kt=G.object({baseId:G.string().optional(),start:G.number().optional(),stretch:G.number().optional(),timeCrop:G.tuple([G.number(),G.number()]).optional()}),wt=G.object({type:G.string().optional(),baseId:G.string().optional(),retime:kt.optional()}),xt={userSpaceOnUse:"userSpaceOnUse",objectBoundingBox:"objectBoundingBox"},Pt={pad:"pad",reflect:"reflect",repeat:"repeat"},St={linear:"linear",radial:"radial"},jt=G.object({offset:G.number(),color:G.string()}),Ot=G.union([G.array(jt),G.object({value:G.array(jt)}),G.object({keyframes:G.array($)})]),Mt=G.object({type:G.enum([St.linear,St.radial]),p1:G.tuple([G.number(),G.number()]).optional(),p2:G.tuple([G.number(),G.number()]).optional(),c:G.tuple([G.number(),G.number()]).optional(),r:G.number().optional(),fp:G.tuple([G.number(),G.number()]).optional(),stops:Ot.optional(),gradientUnits:G.string().optional(),spreadMethod:G.string().optional(),gradientTransform:G.string().optional()}),_t=Mt,It=G.object({path:G.string(),pathOverflow:G.string().optional(),lengthAdjust:G.string().optional(),method:G.string().optional(),spacing:G.string().optional(),startOffset:pt.optional(),textLength:pt.optional()}),zt=G.object({useGlyphs:G.boolean().optional()}),Et=G.object({transformation:yt.optional(),repeater:gt.optional(),maskedBy:vt.optional(),clipPath:bt.optional(),trimPath:At.optional(),clone:wt.optional(),isCombinedShape:G.boolean().optional(),fillGradient:Mt.optional(),strokeGradient:_t.optional(),textPath:It.optional(),text:zt.optional()});function Tt(t,e){const n=[],r=(t,o)=>{if(t&&t.effects){const r={errors:[],warnings:[],strict:!!(null==e?void 0:e.strict)};if(!Et.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 Nt=G.openObject({type:G.string(),id:G.string().optional(),meta:G.any().optional(),effects:Et.optional(),animate:it.optional(),style:G.union([G.string(),G.record(G.union([G.string(),G.number()]))]).optional()},ht),Ct=G.openObject(d(f({},Nt._shape),{children:G.lazy(()=>G.array(Ct),[]).optional()}),ht),Ft=G.object({width:G.number().optional(),height:G.number().optional(),viewBox:G.string().optional(),animator:ft.optional()}),Lt=G.openObject(d(f(f({},Nt._shape),Ft._shape),{type:G.literal("svg"),children:G.array(Ct).optional()}),ht),Dt=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 Rt(t){return!(!t||"object"!=typeof t||Array.isArray(t))&&("svg"===t.type||"svg"===t.tagName)}function Ut(t){const e=Lt.isValid(t);return{valid:e,errors:e?[]:["Document failed schema validation"]}}function Vt(t){var e,n;return(null==t?void 0:t.animator)||(null==(e=null==t?void 0:t.meta)?void 0:e.animator)||(null==t?void 0:t.animation)||(null==(n=null==t?void 0:t.meta)?void 0:n.animation)}function Bt(t){var e;if(t)return null==(e=Vt(t))?void 0:e.definitions}function Wt(t){var e;if(!t)return;const n=null==(e=Vt(t))?void 0:e.animate;return n?Object.entries(n).map(([t,e])=>({id:t,animate:e})):void 0}function Gt(t){return null==t?void 0:t.children}function Kt(t){if(null===t||"object"!=typeof t)return t;if(Array.isArray(t))return t.map(Kt);const e={};for(const n of Object.keys(t))e[n]=Kt(t[n]);return e}function qt(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 Zt(t){const e="number"==typeof t?t:"string"==typeof t?parseFloat(t):NaN;return Number.isFinite(e)?e:0}function Xt(t){var e;const n=Zt(t.x),r=Zt(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 Yt(t,e){return"_lw_"+e+"_"+t.nextId++}function Qt(t){return"string"==typeof t?t.replace(/^#/,""):void 0}function Jt(t,e){var n;"string"==typeof t.id&&e.set(t.id,t),null==(n=t.children)||n.forEach(t=>Jt(t,e))}var Ht=Kt;function $t(t,e,n,r){if(!e)return t;const o=Yt(n,"grad"),a=function(t,e){const n={type:t.type===St.radial?"radialGradient":"linearGradient",id:e};t.type===St.linear?(t.p1&&(n.x1=String(t.p1[0]),n.y1=String(t.p1[1])),t.p2&&(n.x2=String(t.p2[0]),n.y2=String(t.p2[1]))):(t.c&&(n.cx=String(t.c[0]),n.cy=String(t.c[1])),void 0!==t.r&&(n.r=String(t.r)),t.fp&&(n.fx=String(t.fp[0]),n.fy=String(t.fp[1])));t.gradientUnits&&(n.gradientUnits=t.gradientUnits);t.spreadMethod&&(n.spreadMethod=t.spreadMethod);t.gradientTransform&&(n.gradientTransform=t.gradientTransform);return n.children=function(t){var e,n,r,o;if(!t)return[];if(Array.isArray(t))return t.map(te);if("object"==typeof t&&Array.isArray(t.value))return t.value.map(te);const a=t,i=a.keyframes;if(!Array.isArray(i)||!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:ee(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:ee(e,e.indexOf(r),n);if(!p)continue;const m=null!=(u=r.easing)?u:r.e,y={time:o,value:p.color};void 0!==m&&(y.easing=m),c.push(y);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:ne(t.offset),stopColor:t.color},p={};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);return h}(t,i,e,0,s))}(t.stops),n}(e,o);return n.defs.push(a),t[r]="url(#"+o+")",t}function te(t){return{type:"stop",offset:ne(t.offset),stopColor:t.color}}function ee(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 ne(t){return Math.round(1e3*t)/10+"%"}function re(t,e,n,r){if(!e)return t;if(!e.href)return r.errors.push("maskedBy.href missing — cannot build mask"),t;const o=Yt(r,"mask");let a={type:"use",href:"#"+e.href};if(n)a=oe(a,n,r);else if(se(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,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=g(t,void 0);if(Array.isArray(e.translate)&&i.push(d(f({},r),{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(d(f({},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(d(f({},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 h=t;i.length&&(h={type:"g",animate:{transform:c(i)},children:[h]});s.length&&(h={type:"g",animate:{transform:c(s)},children:[h]});l.length&&(h={type:"g",animate:{transform:c(l)},children:[h]});return h}(a,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 y=[];for(;null!==(m=p.exec(t));){const t=m[2].split(/[\s,]+/).filter(t=>t.length>0).map(Number);y.push({name:m[1],args:t})}if(!y.length)return;const g=y[y.length-1];if("translate"===g.name)for(let t=y.length-2;t>=0;t--){const c=y[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"===y[e].name){const t=null!=(a=y[e].args[0])?a:0,n=null!=(i=y[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<y.length-1;e++){const t=y[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 v,b,A;for(const t of y)if("translate"===t.name){const e=null!=(c=t.args[0])?c:0,n=null!=(f=t.args[1])?f:0;v=v?[v[0]+e,v[1]+n]:[e,n]}else if("rotate"===t.name)b=(null!=b?b:0)+(null!=(d=t.args[0])?d:0);else if("scale"===t.name){const e=null!=(h=t.args[0])?h:1,n=t.args.length>1?t.args[1]:e;A=A?[A[0]*e,A[1]*n]:[e,n]}const k={};v&&(k.translate=v);void 0!==b&&(k.rotate=b);A&&(k.scale=A);return Object.keys(k).length?k: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}return}(t);e&&(a=oe(a,e,r))}const i=void 0===n&&!function(t){return"string"==typeof t.transform||(!(!t.transform||"object"!=typeof t.transform)||se(t))}(t);a=function(t,e,n,r,o){const a=r.idMap.get(n),i=r.maskAncestorChains.get(e)||[],s=o?fe(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=le(l),n=le(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]}}const f=Array.from(c).sort((t,e)=>t-e);return{type:"g",animate:{transform:{keyframes:f.map(t=>{const e=ue(l,t),n=ue(u,t);return{time:t,value:{translate:[n[0]-e[0],n[1]-e[1]]}}})}},children:[t]}}(a,t,e.href,r,i);const s={type:"mask",id:o,children:[a]};return e.maskType&&(s.maskType=e.maskType),e.maskUnits&&(s.maskUnits=e.maskUnits),e.maskContentUnits&&(s.maskContentUnits=e.maskContentUnits),r.defs.push(s),t.mask="url(#"+o+")",t}function oe(t,e,n){if(!e)return t;const r=function(t,e){var n;const r=y(t);if("absent"!==r.kind)return"static"===r.kind?r.value:(e.warnings.push("transformation.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=ae(o,"translate",e.translate,void 0,n),o=ae(o,"rotate",e.rotate,r,n),o=ae(o,"scale",e.scale,r,n),o}function ae(t,e,n,r,o){if(void 0===n)return t;const a=y("scale"===e&&Array.isArray(n)?[n[0]/100,n[1]/100]:n);if("static"===a.kind)return{type:"g",transform:{value:m(e,ie(e,a.value),r)},children:[t]};if("animated"===a.kind){const n={keyframes:a.keyframes.map(t=>g(t,m(e,ie(e,t.value),r)))};return void 0!==a.loop&&(n.loop=a.loop),{type:"g",animate:{transform:n},children:[t]}}return t}function ie(t,e){return"translate"===t?[-e[0],-e[1]]:"rotate"===t?-e:[1/e[0],1/e[1]]}function se(t){const e=t.animate&&"object"==typeof t.animate&&!Array.isArray(t.animate)?t.animate:void 0;return!(!e||!e.transform)}function le(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 ue(t,e){let n=0,r=0;for(const o of t)if(o.translateKeyframes&&o.translateKeyframes.length){const t=ce(o.translateKeyframes,e);n+=t[0],r+=t[1]}else o.translate&&(n+=o.translate[0],r+=o.translate[1]);return[n,r]}function ce(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 fe(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}s&&e.warnings.push("maskedBy ancestor: non-translate transform in string ignored: "+t);return i?[o,a]:void 0}(a,e);t&&(s.translate=t)}else if(a&&"object"==typeof a){const t=a.value;t&&"object"==typeof t&&Array.isArray(t.translate)&&(s.translate=[t.translate[0]||0,t.translate[1]||0]),!t||void 0===t.rotate&&void 0===t.scale&&void 0===t.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 de="content";function he(t,e,n){if(!e)return;const r=e.baseId;if(!r)return void(e.type===de&&n.errors.push("clone: content ref missing baseId"));const o=e.type===de&&n.contentRefInnerIds.get(r)||r;t.href="#"+o}function pe(t,e){const n={};return void 0!==t.translate&&(n.translate=function(t,e){if(Array.isArray(t))return e(t);if(t&&"object"==typeof t){const n=t;if(Array.isArray(n.keyframes))return d(f({},n),{keyframes:n.keyframes.map(t=>t&&void 0!==t.value?d(f({},t),{value:e(t.value)}):t)});if(void 0!==n.value)return d(f({},n),{value:e(n.value)})}return t}(t.translate,t=>[t[0]*e,t[1]*e])),void 0!==t.rotate&&(n.rotate=function(t,e){if("number"==typeof t)return e(t);if(t&&"object"==typeof t){const n=t;if(Array.isArray(n.keyframes))return d(f({},n),{keyframes:n.keyframes.map(t=>t&&void 0!==t.value?d(f({},t),{value:e(t.value)}):t)});if(void 0!==n.value)return d(f({},n),{value:e(n.value)})}return t}(t.rotate,t=>t*e)),void 0!==t.scale&&(n.scale=function(t,e){const n=t=>[Math.pow(t[0]/100,e),Math.pow(t[1]/100,e)],r=t=>[Math.pow(t[0],e),Math.pow(t[1],e)];if(Array.isArray(t))return{value:n(t)};if(t&&"object"==typeof t){const e=t;if(Array.isArray(e.keyframes))return d(f({},e),{keyframes:e.keyframes.map(t=>t&&void 0!==t.value?d(f({},t),{value:r(t.value)}):t)});if(void 0!==e.value)return d(f({},e),{value:n(e.value)})}return t}(t.scale,e)),void 0!==t.origin&&(n.origin=t.origin),Object.keys(n).length?n:void 0}var me=!1;function ye(t){var e,n;return t.timeCrop&&console.warn("retime: `timeCrop` is not supported yet and will be ignored"),{start:null!=(e=t.start)?e:0,stretch:null!=(n=t.stretch)?n:1}}function ge(t,e){return{start:e.start+e.stretch*t.start,stretch:e.stretch*t.stretch}}function ve(t){var e,n;return null==(n=null==(e=t.effects)?void 0:e.clone)?void 0:n.retime}function be(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 Ae(t,e,n){const r=Qt(t.href);if(!r)return void n.errors.push("retime: <use> has no href to follow");const o=ke(r,e,n,new Set);if(o)if(me){const e=n.idMap.get(o);t.type="g",delete t.href,t.children=[e],Xt(t),n.defs=n.defs.filter(t=>t!==e)}else t.href="#"+o}function ke(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=Ht(o);if(function(t,e){qt(t,()=>Yt(e,"retimed"))}(a,n),"use"===o.type?xe(a,e.start,e.stretch):we(a,e.start,e.stretch),be(a),"use"===o.type&&o.href){const i=Qt(o.href);if(i){const s=ve(o),l=s?ge(ye(s),e):e,u=new Set(r);u.add(t);const c=ke(i,l,n,u);c&&(a.href="#"+c)}}else!function(t,e,n,r,o){const a=t=>{var i;const s=ve(t);if("use"===t.type&&s&&t.href){const a=Qt(t.href);if(a){const i=ge(ye(s),e),l=new Set(r);l.add(o);const u=ke(a,i,n,l);u&&(t.href="#"+u)}be(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 we(t,e,n){var r;xe(t,e,n),null==(r=t.children)||r.forEach(t=>we(t,e,n))}function xe(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)}}function Pe(t){var e,n,r,o;const a=t.v,i=t.i,s=t.o,l=t.c;if(!a.length)return"";const u=[],c=a.length;u.push("M"+a[0][0]+","+a[0][1]);for(let t=1;t<c;t++){const r=a[t-1],o=null!=(e=null==s?void 0:s[t-1])?e:r,l=null!=(n=null==i?void 0:i[t])?n:a[t],c=a[t];o[0]===r[0]&&o[1]===r[1]&&l[0]===c[0]&&l[1]===c[1]?u.push("L"+c[0]+","+c[1]):u.push("C"+o[0]+","+o[1]+","+l[0]+","+l[1]+","+c[0]+","+c[1])}if(l&&c>0){const t=a[c-1],e=null!=(r=null==s?void 0:s[c-1])?r:t,n=null!=(o=null==i?void 0:i[0])?o:a[0],l=a[0];e[0]===t[0]&&e[1]===t[1]&&n[0]===l[0]&&n[1]===l[1]||u.push("C"+e[0]+","+e[1]+","+n[0]+","+n[1]+","+l[0]+","+l[1]),u.push("z")}return u.join("")}function Se(t,e,n){return t+(e-t)*n}function je(t,e,n){const r=[],o=Math.max(t.length,e.length);for(let a=0;a<o;a++)r[a]=Se(t[a]||0,e[a]||0,n);return r}function Oe(t,e,n){return[Se(t[0]||0,e[0]||0,n),Se(t[1]||0,e[1]||0,n),Se(t[2]||0,e[2]||0,n),Se(void 0===t[3]?1:t[3],void 0===e[3]?1:e[3],n)]}function Me(t,e,n){const r=Math.max(t.length,e.length),o=[];for(let a=0;a<r;a++)o.push(_e(t[a],e[a],n));return o}function _e(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=[],y=[];for(let n=0;n<h;n++){const f=t.v[n],h=e.v[n];p.push(je(f,h,d));const g=null!=(o=null==(r=t.i)?void 0:r[n])?o:f,v=null!=(i=null==(a=e.i)?void 0:a[n])?i:h;m.push(je(g,v,d));const b=null!=(l=null==(s=t.o)?void 0:s[n])?l:f,A=null!=(c=null==(u=e.o)?void 0:u[n])?c:h;y.push(je(b,A,d))}return{v:p,i:m.length?m:void 0,o:y.length?y:void 0,c:null!=(f=t.c)?f:e.c}}function Ie(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 ze(t){const[e,n,r,o]=t,a=3*n,i=3*(o-n)-a,s=1-a-i;return function(t){return n=Ie(e,r,t),((s*n+i)*n+a)*n;var n}}function Ee(t,e,n){return[t[0]+(e[0]-t[0])*n,t[1]+(e[1]-t[1])*n]}function Te(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=Ie(n,o,e),s=[n,r],l=[o,a],{left:u,right:c}=function(t,e,n,r,o){const a=Ee(t,e,o),i=Ee(e,n,o),s=Ee(n,r,o),l=Ee(a,i,o),u=Ee(i,s,o),c=Ee(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,y=1-d;return m>1e-9&&Math.abs(y)>1e-9&&(p=[(c[1][0]-f)/m,(c[1][1]-d)/y,(c[2][0]-f)/m,(c[2][1]-d)/y]),{left:h,right:p}}function Ne(t){if(t)return[1-t[2],1-t[3],1-t[0],1-t[1]]}function Ce(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 Fe(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 Le=new Set(["color","fill","flood-color","lighting-color","stop-color","stroke"]),De=new Set(["translate","rotate","scale","skew"]),Re=new Set(["offset-distance","offsetDistance"]);function Ue(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.scale,u=r?"px":"",c=r?"deg":"";return a&&o.push("translate("+a[0]+u+","+a[1]+u+")"),i&&o.push("translate("+i[0]+u+","+i[1]+u+")"),null!=s&&o.push("rotate("+s+c+")"),l&&o.push("scale("+l[0]+","+l[1]+")"),i&&o.push("translate("+-i[0]+u+","+-i[1]+u+")"),o.join("")}var Ve=new Set(["offset-distance","offsetDistance"]),Be=1e3;function We(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 Ke=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 qe(t){return Ke.has(t)?t:t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}function Ze(t,e,n){return Math.max(e,Math.min(t,n))}function Xe(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 Ye=1e-4;function Qe(t,e,n,r,o){const a=Je(t,e,n,r,o);if(0===a[0]&&0===a[1]){return Je(t,e,n,r,o<.5?o+Ye:o-Ye)}return a}function Je(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 He(t,e,n,r,o=100){const a=o+1,i=new Float64Array(a),s=new Float64Array(a);let l=Xe(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=Xe(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 $e(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 tn=48,en=/[MmLlHhVvCcSsQqTtAaZz]/;function nn(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 rn(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=He(i,t,e,r,tn);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];en.test(t)?r++:t="M"===d?"L":"m"===d?"l":d;const n=t>="a",y=t.toUpperCase();if("Z"!==y){if("M"===y){const e=h()+(n?o:0),r=h()+(n?a:0);o=e,a=r,i=e,s=r,d=t;continue}if("L"===y)m(h()+(n?o:0),h()+(n?a:0));else if("H"===y)m(h()+(n?o:0),a);else if("V"===y)m(o,h()+(n?a:0));else if("C"===y){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"===y){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"===y){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}=nn([o,a],t,e);p(r,i,e)}else if("T"===y){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}=nn([o,a],t,e);p(r,i,e)}else{if("A"!==y){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]=Xe(o.P0,o.P1,o.P2,o.P3,i),[u,c]=Qe(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((o=r,(e=t)<(n=0)?n:e>o?o:e));var e,n,o}}}var on=.15;function an(t){if("number"==typeof t)return{min:t,max:t};if(t&&"object"==typeof t){const e=t;if("number"==typeof e.value)return{min:e.value,max:e.value};if(Array.isArray(e.keyframes)&&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 sn(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 ln=t=>Math.round(1e3*t)/1e3;function un(t,e){if(!e||null==t)return t;if("number"==typeof t)return t+e;const n=t;return"number"==typeof n.value?d(f({},n),{value:n.value+e}):Array.isArray(n.keyframes)?d(f({},n),{keyframes:n.keyframes.map(t=>d(f({},t),{value:(Number(t.value)||0)+e}))}):t}function cn(t,e){var n;if("clip"===e.pathOverflow)return{d:t,startShift:0};const r=rn(t);if(!r||r.closed||r.totalLength<=0)return{d:t,startShift:0};const o=r.totalLength,a=on*o,i=an(e.startOffset),s=an(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"+ln(e)+","+ln(n)+"L"+ln(d.x)+","+ln(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"+ln(t)+","+ln(e)}return{d:p,startShift:c}}function fn(t,e,n){if(null!=n)if("number"!=typeof n){if("object"==typeof n&&null!==n){const r=n;if(Array.isArray(r.keyframes)){const n=t.animate&&"object"==typeof t.animate&&!Array.isArray(t.animate)?t.animate:void 0,o=f({},n||{}),a={keyframes:r.keyframes};return void 0!==r.loop&&(a.loop=r.loop),o[e]=a,void(t.animate=o)}if("number"==typeof r.value)return void(t[e]=String(r.value))}}else t[e]=String(n)}var dn=(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 hn(t,e){return Math.round(t)===t?""+Math.round(t):t.toFixed(e)}function pn(t,e){let n="";for(let r=0;r<t.length;r++){const o=hn(t[r],e);r>0&&45!==o.charCodeAt(0)&&(n+=" "),n+=o}return n}function mn(t,e,n){return[t[0]*e+t[2]*n+t[4],t[1]*e+t[3]*n+t[5]]}var yn=/([MLCQZ])|(-?\d*\.?\d+(?:e[-+]?\d+)?)/gi;function gn(t,e,n=2){const r=[];let o;for(yn.lastIndex=0;null!==(o=yn.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]=mn(e,s(),s());a+=t+pn([r,o],n)}else if("C"===t){const[t,r]=mn(e,s(),s()),[o,i]=mn(e,s(),s()),[l,u]=mn(e,s(),s());a+="C"+pn([t,r,o,i,l,u],n)}else if("Q"===t){const[t,r]=mn(e,s(),s()),[o,i]=mn(e,s(),s());a+="Q"+pn([t,r,o,i],n)}else"Z"!==t&&"z"!==t||(a+="Z")}return a}var vn=16,bn=["fontFamily","fontSize","fontWeight","fontStyle","textAnchor","letterSpacing","wordSpacing","textDecoration","textTransform","whiteSpace","x","y","dx","dy","lengthAdjust","fill","stroke","strokeWidth","effects",Y,Q,"xml:space"];function An(t){if("number"==typeof t)return t;if("string"==typeof t){const e=parseFloat(t);return isNaN(e)?void 0:e}}function kn(t){return"string"==typeof t?t:void 0}function wn(t,e){var n,r,o,a,i,s,l;return{fontFamily:null!=(n=kn(t.fontFamily))?n:e.fontFamily,fontSize:null!=(r=An(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=An(t.letterSpacing))?s:e.letterSpacing,wordSpacing:null!=(l=An(t.wordSpacing))?l:e.wordSpacing}}function xn(t){var e,n,r;return{fontFamily:kn(t.fontFamily),fontSize:null!=(e=An(t.fontSize))?e:vn,fill:t.fill,stroke:t.stroke,strokeWidth:t.strokeWidth,letterSpacing:null!=(n=An(t.letterSpacing))?n:0,wordSpacing:null!=(r=An(t.wordSpacing))?r:0}}function Pn(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 Sn(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 jn(t){const e=Object.keys(t);return 1===e.length?t[e[0]]:void 0}var On=.6;function Mn(t,e){if(t<=0||e<=0)return"";const n=.08,r=t*n,o=.92*t,a=.92*-e,i=o-r,s=-a,l=Math.max(1,.12*Math.min(i,s)),u="M"+r+" 0L"+o+" 0L"+o+" "+a+"L"+r+" "+a+"Z";if(i<=2*l||s<=2*l)return u;const c=r+l,f=o-l,d=-l,h=a+l;return u+"M"+c+" "+d+"L"+c+" "+h+"L"+f+" "+h+"L"+f+" "+d+"Z"}function _n(t,e){var n,r,o,a;const{glyphs:i,create:s=dn,warnings:l}=e,u=jn(i),c={x:null!=(n=An(t.x))?n:0,y:null!=(r=An(t.y))?r:0},f=[],d=[{start:c.x,end:c.x}];let h=0;const p=(t,e)=>{var n;const r=Sn(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=Pn(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:On*o;f.push({glyphD:Mn(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=wn(t,e),s=An(t.x),l=An(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=An(t.dx))?n:0,c.y+=null!=(r=An(t.dy))?r:0;const u=null!=(o=kn(t[Y]))?o:kn(t[Q]);if(u&&!(null==(a=t.children)?void 0:a.length)&&p(u,i),t.children)for(const e of t.children)m(e,i)},y=xn(t);if(t.children)for(const e of t.children)m(e,y);const g=null!=(o=kn(t[Y]))?o:kn(t[Q]);g&&!(null==(a=t.children)?void 0:a.length)&&p(g,y);const v=kn(t.textAnchor);if("middle"===v||"end"===v)for(const t of f){const e=d[t.line].end-d[t.line].start,n="middle"===v?-e/2:-e;t.m=[t.scale,0,0,t.scale,t.x+n,t.y]}return Rn(t,Dn(f,s,l),s)}function In(t,e){var n,r,o,a,i;if(null==(n=e.alongPath)?void 0:n.pathD)return function(t,e,n){var r;const{glyphs:o,warnings:a,alongPath:i}=n,s=rn(e);if(!s)return null==a||a.push("textGlyphs: unparsable along-path geometry (caret)"),[];const l=jn(o),u=[];let c=0;const f=(t,e)=>{var n,r,i;const s=wn(t,e),d=null!=(n=kn(t[Y]))?n:kn(t[Q]);if(d&&!(null==(r=t.children)?void 0:r.length)){const t=Sn(s,o,l,a),e=(null==t?void 0:t.unitsPerEm)||1e3,n=s.fontSize/e,r=(null!=(i=null==t?void 0:t.ascent)?i:.9*e)*n;for(let e=0;e<d.length;e++){const o=d.charAt(e),a=null==t?void 0:t.glyphs[o],i=(a?a.width:0)*n,l=i+s.letterSpacing+(" "===o?s.wordSpacing:0);u.push({advStart:c,advEnd:c+l,glyphW:i,ascent:r,fontSize:s.fontSize}),c+=l}}if(t.children)for(const e of t.children)f(e,s)};f(t,xn(t));const d=c,h=(null==i?void 0:i.textLength)&&i.textLength>0&&d>0?i.textLength/d:1,p=y(null==i?void 0:i.startOffset),{along:m,perp:g}=En(t),v=m+("animated"===p.kind?Number(null==(r=p.keyframes[0])?void 0:r.value)||0:"static"===p.kind&&Number(p.value)||0),b=t=>({x:t.x-g*Math.sin(t.angle),y:t.y+g*Math.cos(t.angle),angle:t.angle});return u.map(t=>{const e=v+t.advStart*h,n=v+t.advEnd*h,r=b(s.sampleAtDistance(e)),o=b(s.sampleAtDistance(n)),a=s.sampleAtDistance(v+(t.advStart+t.glyphW/2)*h);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:s,warnings:l}=e,u=jn(s),c={x:null!=(r=An(t.x))?r:0,y:null!=(o=An(t.y))?o:0},f=[],d=[{start:c.x,end:c.x}];let p=0;const m=(t,e)=>{var n;const r=Sn(e,s,u,l),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);f.push({x:c.x,y:c.y,width:l,ascent:i,fontSize:e.fontSize,line:p}),c.x+=l,d[p].end=c.x}},g=(t,e)=>{var n,r,o,a;const i=wn(t,e),s=An(t.x),l=An(t.y);void 0!==s&&(c.x=s,p=d.length,d.push({start:c.x,end:c.x})),void 0!==l&&(c.y=l),c.x+=null!=(n=An(t.dx))?n:0,c.y+=null!=(r=An(t.dy))?r:0;const u=null!=(o=kn(t[Y]))?o:kn(t[Q]);if(u&&!(null==(a=t.children)?void 0:a.length)&&m(u,i),t.children)for(const e of t.children)g(e,i)},v=xn(t);if(t.children)for(const e of t.children)g(e,v);const b=null!=(a=kn(t[Y]))?a:kn(t[Q]);b&&!(null==(i=t.children)?void 0:i.length)&&m(b,v);const A=kn(t.textAnchor);if("middle"===A||"end"===A)for(const t of f){const e=d[t.line].end-d[t.line].start;t.x+="middle"===A?-e/2:-e}return f.map(t=>{var e=t,{line:n}=e;return h(e,["line"])})}function zn(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 En(t){var e,n,r;return{along:(null!=(e=An(t.x))?e:0)+(null!=(n=An(t.dx))?n:0),perp:null!=(r=An(t.dy))?r:0}}function Tn(t,e,n,r,o,a){var i;const{glyphs:s,create:l=dn,warnings:u}=r,c=e?rn(e):null;if(!c)return null==u||u.push("textGlyphs: unparsable along-path geometry"),null;const h=jn(s),{cells:p,width:m}=function(t,e,n,r){const o=[];let a=0;const i=(t,s)=>{var l,u,c;const f=wn(t,s),d=null!=(l=kn(t[Y]))?l:kn(t[Q]);if(d&&!(null==(u=t.children)?void 0:u.length)){const t=Sn(f,e,n,r);if(t){const e=f.fontSize/t.unitsPerEm,n=null!=(c=t.ascent)?c:.9*t.unitsPerEm,r=Pn(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:On*t.unitsPerEm,s=i*e;o.push({glyphD:Mn(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,xn(t)),{cells:o,width:a}}(t,s,h,u);if(!p.length)return Rn(t,[],l);const{along:g,perp:v}=En(t);if(o&&o>0&&m>0){const t=o/m;for(const e of p)e.midBase*=t}const b="clip"===a&&!c.closed,A=y(n);if("animated"===A.kind&&A.keyframes.length>=2)return Rn(t,function(t,e,n,r,o,a,i=0,s=0){const l=Math.max(e.totalLength/Nn,.5),u=t=>Number(t.time)||0,c=t=>i+(Number(t.value)||0),h=t=>t>=0&&t<=e.totalLength,p=[];for(const i of t){const t=[i.scale,0,0,i.scale,-i.scale*(i.widthEm/2),0],m=gn(i.glyphD,t),y=(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:[Fn(r-s*l,3),Fn(o+s*i,3)],rotate:Fn(180*a/Math.PI,3)}}},g=[],v=[],b=(t,e)=>{g.push(y(t,e)),a&&v.push({time:e,value:h(t)?1:0})};b(c(n[0])+i.midBase,u(n[0]));for(let t=1;t<n.length;t++){const e=u(n[t-1]),r=u(n[t]),o=c(n[t-1]),a=c(n[t]),s=Math.min(Cn,Math.max(1,Math.ceil(Math.abs(a-o)/l)));for(let t=1;t<=s;t++){const n=t/s;b(o+n*(a-o)+i.midBase,e+n*(r-e))}}const A={keyframes:g};void 0!==r&&(A.loop=r);const k={transform:A};if(a&&v.some(t=>0===t.value)){const t={keyframes:v};void 0!==r&&(t.loop=r),k.opacity=t}p.push(o("path",d(f({d:m},Ln(i.paint)),{animate:k}),[]))}return p}(p,c,A.keyframes,A.loop,l,b,g,v),l);const k=g+("animated"===A.kind?Number(null==(i=A.keyframes[0])?void 0:i.value)||0:"static"===A.kind&&Number(A.value)||0);return Rn(t,Dn((b?p.filter(t=>{const e=k+t.midBase;return e>=0&&e<=c.totalLength}):p).map(t=>({glyphD:t.glyphD,paint:t.paint,m:zn(c,k+t.midBase,t.scale,t.widthEm,v)})),l,u),l)}var Nn=48,Cn=64;function Fn(t,e){const n=u(10,e);return Math.round(t*n)/n}function Ln(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 Dn(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=gn(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",f({d:n},Ln(t)),[]));return s}function Rn(t,e,n){const r={};for(const e of Object.keys(t))"type"!==e&&"children"!==e&&-1===bn.indexOf(e)&&(r[e]=t[e]);if(r.style&&"object"==typeof r.style){const t=f({},r.style);delete t["white-space"],Object.keys(t).length?r.style=t:delete r.style}return n("g",r,e)}function Un(t,e){return e.alongPath?Tn(t,e.alongPath.pathD,e.alongPath.startOffset,e,e.alongPath.textLength,e.alongPath.pathOverflow):_n(t,e)}function Vn(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 Bn(t){var e,n;return null!=(n=null!=(e=t.time)?e:t.t)?n:0}function Wn(t){var e;return null!=(e=t.easing)?e:t.e}function Gn(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 Kn=new WeakMap;function qn(t,e,n,r){var o,a;const i=Kn.get(t);if(i)return i;const s=null!=(o=t.tangentOut)?o:t.to,l=null!=(a=e.tangentIn)?a:e.ti,u=[n[0]+(s?s[0]:0),n[1]+(s?s[1]:0)],c=[r[0]+(l?l[0]:0),r[1]+(l?l[1]:0)],f=He(n,u,c,r),d={P0:n,P1:u,P2:c,P3:r,lut:f,totalArc:f.ds[f.ds.length-1]};return Kn.set(t,d),d}function Zn(t,e,n,r,o,a){const i=qn(t,e,n,r),s=0===i.totalArc?o:function(t,e){const n=t.ds[t.ds.length-1],r=e*n,{ts:o,ds:a}=t,i=a.length-1;if(r<=0)return o[0];if(r>=a[i])return o[i];let s=1,l=i;for(;s<l;){const t=s+l>>>1;a[t]<r?s=t+1:l=t}const u=a[l-1],c=a[l]-u,f=c>0?(r-u)/c:0;return o[l-1]+f*(o[l]-o[l-1])}(i.lut,o),l=Xe(i.P0,i.P1,i.P2,i.P3,s);if(!a)return{translate:l};const u=Qe(i.P0,i.P1,i.P2,i.P3,s);return{translate:l,rotateDeg:180*Math.atan2(u[1],u[0])/Math.PI}}var Xn=.5,Yn=5,Qn=32;function Jn(t,e){var n,r,o,a;if(!Gn(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:Xn,u=null!=(o=null==e?void 0:e.rotationTolerance)?o:Yn,c=null!=(a=null==e?void 0:e.maxSamplesPerSegment)?a:Qn,f=[],d=Vn(i[0]);if(!d)return t;const h=s?function(t,e){const n=Vn(t),r=Vn(e);if(!n||!r)return 0;const o=qn(t,e,n,r),a=Qe(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(Hn(Bn(i[0]),er($n(i[0]),$n(i[0]),0,d,h,s)));for(let t=0;t<i.length-1;t++){const e=i[t],n=i[t+1],r=Vn(e),o=Vn(n);r&&o?(s&&t>0&&rr(f,e,n,r,o,u),or(f,e,n,r,o,s,l,u,c)):f.push(Hn(Bn(n),er($n(n),$n(n),1,null!=o?o:[0,0],void 0,s)))}const p=Wn(i[i.length-1]);p&&(f[f.length-1].e=p),s&&function(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}}(f);const m={kfs:f};return void 0!==t.loop&&(m.loop=t.loop),m}function Hn(t,e){return{t:t,v:e}}function $n(t){var e;const n=null!=(e=t.value)?e:t.v;if(n&&"object"==typeof n&&!Array.isArray(n))return n}function tr(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 er(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]=tr(o,s,n))}return void 0!==o&&(i.rotate=o+nr(t,e,n)),i}function nr(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=tr(r,o,n);return"number"==typeof a?a:0}function rr(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=$n(e),f=u-nr(c,c,0),d=qn(e,n,r,o),h=Qe(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 y=er($n(e),$n(e),0,r,p,!0);t.push(Hn(Bn(e),y))}function or(t,e,n,r,o,a,i,s,l){const u=qn(e,n,r,o),c=Bn(e),f=Bn(n),d=Wn(e),h=(p=d)?ze([p[1],p[0],p[3],p[2]]):t=>t;var p;const m=$n(e),y=$n(n),g=function(t,e,n,r,o){const a=[];ar(t.P0[0],t.P1[0],t.P2[0],t.P3[0],a),ar(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++)ir(i[o],i[o+1],s,t,e,n,r,l);return s}(u,a,i,s,l),v=[];for(const t of g){const e=$e(u.lut,t),n=Ze(u.totalArc>0?e/u.totalArc:t,0,1),r={u:Ze(h(n),0,1),p:n,pos:Xe(u.P0,u.P1,u.P2,u.P3,t)};if(a){const e=Qe(u.P0,u.P1,u.P2,u.P3,t);r.rotateDeg=180*Math.atan2(e[1],e[0])/Math.PI}v.push(r)}let b=d,A=0;const k=t.length-1;for(let e=0;e<v.length;e++){const n=v[e],r=A<1?Ze((n.u-A)/(1-A),0,1):1,{left:o,right:i}=Te(b,r),s=0===e?k:t.length-1;o?t[s].e=o:delete t[s].e;const l=c+n.u*(f-c),u=er(m,y,n.p,n.pos,n.rotateDeg,a);t.push(Hn(l,u)),b=i,A=n.u}}function ar(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 ir(t,e,n,r,o,a,i,s){const l=(t+e)/2,u=Xe(r.P0,r.P1,r.P2,r.P3,t),c=Xe(r.P0,r.P1,r.P2,r.P3,e),f=e-t,d=Xe(r.P0,r.P1,r.P2,r.P3,t+.25*f),h=Xe(r.P0,r.P1,r.P2,r.P3,l),p=Xe(r.P0,r.P1,r.P2,r.P3,t+.75*f),m=Math.max(sr(d,u,c),sr(h,u,c),sr(p,u,c));let y=!0;if(o){const n=Qe(r.P0,r.P1,r.P2,r.P3,t),o=Qe(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&&(y=!1)}m<=a&&y||s.remaining<=0||f<1e-6?n.push(e):(s.remaining-=1,ir(t,l,n,r,o,a,i,s),ir(l,e,n,r,o,a,i,s))}function sr(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 lr(t,e){const n=ur(t,e);return null!=n?n:t}function ur(t,e){let n,r;if(t.children)for(let r=0;r<t.children.length;r++){const o=ur(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&&Gn(n)){const o=Jn(n,e);o!==n&&(r=d(f({},t),{transform:o}))}}if(!n&&!r)return null;const a=f({},t);return n&&(a.children=n),r&&(a.animate=r),a}function cr(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 fr(t){return t.startsWith("path(")&&t.endsWith(")")?t.slice(5,-1):/^[MmZzLlHhVvCcSsQqTtAa]/.test(t)?t:void 0}function dr(t){return"string"==typeof t&&void 0!==fr(t)}function hr(t){if(t&&"object"==typeof t&&"string"==typeof t.path){const e=fr(t.path);return e?{paths:cr(e)}:t}if(t&&"object"==typeof t&&"paths"in t){const e=t.paths;if(Array.isArray(e)&&e.length>0&&dr(e[0])){const t=[];for(const n of e){const e=fr(n);e&&t.push(...cr(e))}return{paths:t}}return t}if(Array.isArray(t)){if(t.length>0&&dr(t[0])){const e=[];for(const n of t){const t=fr(n);t&&e.push(...cr(t))}return{paths:e}}return{paths:t}}if(dr(t)){return{paths:cr(fr(t))}}return t}function pr(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 mr(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 yr(t,e,n,r){var o,a;if("d"===t){return{paths:Me(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)}}return Le.has(t)?Oe(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?Se(e,n,r):De.has(t)||"stroke-dasharray"===t||"strokeDasharray"===t?je(e||[],n||[],r):Se(+(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)o[a]=Se(+(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]=je(r||t,i||t,n)}else o[a]=null!=i?i:r}return o}(e,n,r)}function gr(t,e,n,r){var o,a,i,s,l;const u=e.length-1,c=Ze(null!=(o=n.segmentCount)?o:u,1,u);let f;f=n.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.before?(p=0,m=d):(p=h,m=r);const y=m-p;if(y<=0)return e;const g=null!=(s=f[0].t)?s:0,v=(null!=(l=f[f.length-1].t)?l:0)-g;if(v<=0)return e;const b=f.map(t=>{var e,n;return{relT:(t.t-g)/v,v:t.v,e:t.e,tangentIn:null!=(e=t.tangentIn)?e:t.ti,tangentOut:null!=(n=t.tangentOut)?n:t.to}}),A=Math.floor(y/v),k=y-A*v,w=k/v,x=[];function P(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?Ne(b[t-1].e):void 0,tangentIn:b[t].tangentOut,tangentOut:b[t].tangentIn})}else o=b;const a=void 0!==r?r:1;for(let n=0;n<o.length;n++){const r=o[n];if(r.relT>a+1e-9){const i=o[n-1],s=r.relT-i.relT,l=(a-i.relT)/s,u=i.e?ze(i.e)(l):l,c=yr(t,i.v,r.v,u),{left:f}=Te(i.e,l);return x.length>0&&i.relT<=a&&(x[x.length-1].e=f),void x.push({t:e+a*v,v:c,e:void 0})}const i={t:e+r.relT*v,v:r.v,e:n<o.length-1?r.e:void 0};r.tangentIn&&(i.tangentIn=r.tangentIn),r.tangentOut&&(i.tangentOut=r.tangentOut),x.push(i)}}if(n.before){if(w>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?Ne(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?ze(i.e)(o):o,l=yr(t,i.v,r.v,s),{right:u}=Te(i.e,o);x.push({t:e,v:l,e:u})}const s={t:e+(r.relT-a)*v,v:r.v,e:n<o.length-1?r.e:void 0};r.tangentIn&&(s.tangentIn=r.tangentIn),r.tangentOut&&(s.tangentOut=r.tangentOut),x.push(s)}}(p,!!n.alternate&&A%2==0,w)}for(let t=0;t<A;t++){const e=A-1-t,r=!!n.alternate&&e%2==0;P(p+k+t*v,r)}}else{for(let t=0;t<A;t++){const e=!!n.alternate&&t%2==0;P(p+t*v,e)}if(w>1e-9){const t=!!n.alternate&&A%2==0;P(p+A*v,t,w)}}return n.before?[...x,...e]:[...e,...x]}function vr(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=hr(f));const p=Ge(t)?qe(t):t;Le.has(p)&&(f=null!=(l=Fe(f))?l:f);const m={t:n,v:f,e:pr(h,r)},y=null!=(u=e.tangentIn)?u:e.ti,g=null!=(c=e.tangentOut)?c:e.to;y&&(m.tangentIn=y),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?gr(t,d,p,n):d}function br(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)?qe(t):t,l=Le.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=hr(d)),l&&(d=null!=(o=Fe(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:gr(t,u,a,n)};return void 0!==e.autoOrient&&(c.autoOrient=e.autoOrient),c}function Ar(t,e){const n=kr(t,e);return null!=n?n:t}function kr(t,e){let n,r;if(t.children)for(let r=0;r<t.children.length;r++){const o=kr(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=br(n,o,e);a!==o&&(r||(r=f({},t)),r[n]=a)}}if(!n&&!r)return null;const a=f({},t);return n&&(a.children=n),r&&(a.animate=r),a}var wr=0;function xr(t,e=X.webapi){const n=Vt(t)||{},r=Bt(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=mr(t,e);r&&n.push(r)}else if(Array.isArray(t))for(const r of t){const t=mr(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.webapi){const o={};for(const[a,i]of Object.entries(t)){const t=vr(a,i,e,n);if(t.length>0){const e={kfs:t};void 0!==i.autoOrient&&(e.autoOrient=i.autoOrient),void 0!==i.loop&&(e.loop=i.loop),o[a]=r===X.webapi&&"transform"===a?Jn(e):e}}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=Wt(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_"+ ++wr;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 Pr(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;let o=t[0],a=t[t.length-1];for(let i=0;i<t.length-1;i++){const s=null!=(n=t[i].t)?n:0,l=null!=(r=t[i+1].t)?r:0;if(s<=e&&e<=l){o=t[i],a=t[i+1];break}}return{prevKf:o,nextKf:a}}(c,n);let h=f===d?0:(p=n,m=null!=(r=f.t)?r:0,y=null!=(o=d.t)?o:0,g=0,v=1,y===m?g:g+(p-m)/(y-m)*(v-g));var p,m,y,g,v;h=Ze(h,0,1);const b=null!=(a=f.e)?a:f.easing;if(b&&Array.isArray(b))try{h=ze(b)(h)}catch(t){}let A=Ge(t)?qe(t):t,k=null;const w=null!=(i=null==f?void 0:f.v)?i:null==f?void 0:f.value,x=null!=(s=null==d?void 0:d.v)?s:null==d?void 0:d.value;if("d"===A){k=Me(null!=(l=null==w?void 0:w.paths)?l:Array.isArray(w)?w:[],null!=(u=null==x?void 0:x.paths)?u:Array.isArray(x)?x:[],h).map(t=>Pe(t)).join("")}else if(Le.has(A))k=Ce(Oe(w||[0,0,0,1],x||[0,0,0,1],h)),A=t;else if("stroke-dasharray"===A)k=je(w||[],x||[],h).join(" "),A=t;else if("transform"!==A||null===w||"object"!=typeof w||Array.isArray(w))if("translate"===A){k="translate("+je(w||[0,0],x||[0,0],h).join(",")+")",A="transform"}else if("rotate"===A){k="rotate("+Se(+(w||0),+(x||0),h)+")",A="transform"}else if("scale"===A){k="scale("+je(w||[1,1],x||[1,1],h).join(",")+")",A="transform"}else{k=Se(+(w||0),+(x||0),h)}else{const t=new Set([...w?Object.keys(w):[],...x?Object.keys(x):[]]),n={};for(const e of t){const t=null==w?void 0:w[e],r=null==x?void 0:x[e];if("rotate"===e)n.rotate=Se(+(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=je(t||o,r||o,h);n[e]=a}}if(Gn(e)){const t=w.translate,r=x.translate;if(Array.isArray(t)&&Array.isArray(r)){const o=Zn(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)}}k=Ue(n,{withUnits:!1}),A="transform"}return Re.has(A)&&"number"==typeof k&&(k=100*k+"%"),{k:A,v:null===k?"":""+k}}function Sr(t,e){const n={};for(const[r,o]of Object.entries(t)){const t=Pr(r,o,e);t&&(n[t.k]=t.v)}return n}function jr(t,e,n,r){if(!e)return t;const o=!!e.trimAllAsOne,a=[],i=t=>{if(Array.isArray(t.children)&&t.children.length>0){for(const e of t.children)i(e);return}const e="string"==typeof t.d?t.d:function(t){var e,n,r,o;if("rect"!==t.type)return;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"}(t);if(void 0===e)return;const n=cr(e);if(!n.length)return;const r={leaf:t,subpaths:[]};for(const t of n){const e=Rr(t);r.subpaths.push({subpath:t,lengthPx:e,startOffsetPx:0})}a.push(r)};if(i(t),!a.length)return t;let s=0;const l=o?[...a].reverse():a;for(const t of l)for(const e of t.subpaths)o||(s=0),e.startOffsetPx=s,s+=e.lengthPx;const u=s;if(o&&u<.001)return t;const c=y(e.offset),h="absent"===c.kind?{kind:"static",value:0}:c,p=function(t){const e=y(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=Lr(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=Dr(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=Dr(n,t),r=(e[0]+e[1])/2;a.push({time:t,value:[r,r]})}return{kind:"animated",keyframes:a}}(e.range),m="absent"===p.kind?{kind:"static",value:[0,1]}:p,g=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}(h),v=[g.length?Math.min(...g):0,g.length?Math.max(...g):0];if(1===a.length&&a[0].leaf===t&&1===a[0].subpaths.length){const e=a[0],n=e.subpaths[0],r=o?u:n.lengthPx;if(r<.001)return t;const i=o?n.startOffsetPx/r:0;return function(t,e,n,r,o,a){const i=Ir(n,e,r),s=zr(e,r),l=f({},t);return delete l.effects,Nr(l,"strokeDasharray",Tr(a,s)),Nr(l,"strokeDashoffset",Tr(o,i)),Nr(l,"strokeOpacity",Fr(a)),l}(e.leaf,r,i,v,h,m)}const b=new Map;for(const t of a){const e=[];for(const n of t.subpaths){const a=o?u:n.lengthPx;if(a<.001)continue;const i=o?n.startOffsetPx/a:0;e.push(...Mr(t.leaf,n.subpath,a,i,v,h,m,r))}b.set(t.leaf,Or(t.leaf,e))}const A=t=>{const e=b.get(t);return e||(Array.isArray(t.children)&&t.children.length>0?d(f({},t),{children:t.children.map(A)}):t)};return A(t)}function Or(t,e){const n=d(f({},t),{type:"g",children:e});return delete n.d,delete n.strokeDasharray,delete n.strokeDashoffset,delete n.effects,n}function Mr(t,e,n,r,o,a,i,s){const l=Ir(r,n,o),u=zr(n,o),c=Tr(a,l),f=Tr(i,u),d=Fr(i),h=function(t){return{type:"path",d:t}}(Pe(e));return Nr(h,"strokeDasharray",f),Nr(h,"strokeDashoffset",c),Nr(h,"strokeOpacity",d),[h]}var _r=1;function Ir(t,e,n){const[r]=Er(n);return n=>e*(-n-r+t)+_r}function zr(t,e){const[n,r]=Er(e),o=r-n+1;return e=>{const n=Ze(e[0],0,1),r=Ze(e[1],0,1),a=Math.min(n,r),i=Math.max(n,r),s=[0];let l=_r;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+_r),s}}function Er(t){return[Math.floor(Math.min(-t[0],-t[1])),Math.ceil(Math.max(-t[0],-t[1]))]}function Tr(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 Nr(t,e,n){var r,o;if(!n)return;if("static"===n.kind)return void(t[e]=n.value);const a=t.animate&&"object"==typeof t.animate&&!Array.isArray(t.animate)?t.animate:void 0,i=f({},a||{}),s={keyframes:n.keyframes};void 0!==n.loop&&(s.loop=n.loop),i[e]=s,t.animate=i;const l=n.keyframes[0];l&&void 0!==(null!=(r=l.value)?r:l.v)&&(t[e]=null!=(o=l.value)?o:l.v)}var Cr=10;function Fr(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+Cr,value:1})):!p&&m&&(f.push({time:d-Cr,value:1}),f.push({time:d,value:0}))}return f.length<=1?void 0:{kind:"animated",keyframes:f}}function Lr(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 Dr(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 Rr(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+=Ur(t,r,r+1);return t.c&&e.length>1&&(n+=Ur(t,e.length-1,0)),n}function Ur(t,e,n){var r,o,a,i;const s=t.v,l=s[e],u=s[n],c=He(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]}function Vr(t){var e,n;const r={defs:[],warnings:[],errors:[],idMap:new Map,nextId:0,contentRefInnerIds:new Map,maskAncestorChains:new Map,engine:(null==(e=Vt(t))?void 0:e.mode)===Z.frames?X.frames:X.webapi,glyphs:null==(n=Bt(t))?void 0:n.glyphs},o=Ht(t);Jt(o,r.idMap),k(o,r,()=>Yt(r,"inner")),function(t,e){const n=new Set,r=t=>{var o,a;const i=null==(a=null==(o=t.effects)?void 0:o.maskedBy)?void 0:a.href;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=fe(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(),Jt(t,e.idMap);const n=[],r=t=>{var e;ve(t)&&n.push(t),null==(e=t.children)||e.forEach(r)};r(t);for(const t of n){const n=ve(t);n&&(be(t),Ae(t,ye(n),e))}}(t,e),t}(Br(o,r),r);return function(t,e){if(!e.length)return;(t.children||(t.children=[])).unshift({type:"defs",children:e})}(a,r.defs),{root:a,defs:r.defs,warnings:r.warnings,errors:r.errors}}function Br(t,e){var n;t.children&&(t.children=t.children.map(t=>Br(t,e)));const r=t.effects,o="string"==typeof t.id?t.id:void 0,a=o?e.contentRefInnerIds.get(o):void 0;if(!r&&!a)return t;const{transformation:i,repeater:s,maskedBy:l,clipPath:u,trimPath:c,clone:f,fillGradient:d,strokeGradient:h,textPath:p,text:m}=null!=r?r:{};null==r||r.isCombinedShape;r&&delete t.effects;let y=t,g=!1;if(null==m?void 0:m.useGlyphs)if(p){const t="string"==typeof p.path?p.path:void 0,r=p.textLength,o="number"==typeof r?r:r&&"object"==typeof r?"number"==typeof r.value?r.value:Array.isArray(r.keyframes)&&r.keyframes.length?Number(null==(n=r.keyframes[0])?void 0:n.value):void 0:void 0,a=function(t,e,n,r,o,a){return e.glyphs?Tn(t,n,r,{glyphs:e.glyphs,warnings:e.warnings},o,a):(e.warnings.push("textGlyphs: no definitions.glyphs"),null)}(y,e,t,p.startOffset,o,p.pathOverflow);a&&(y=a,g=!0)}else y=function(t,e,n){return(null==e?void 0:e.useGlyphs)?n.glyphs?_n(t,{glyphs:n.glyphs,warnings:n.warnings}):(n.warnings.push("textGlyphs: no definitions.glyphs — left as native <text>"),t):t}(y,m,e),g=!0;return g||(y=function(t,e,n){var r;if(!e||"string"!=typeof e.path||!e.path)return t;const o=Yt(n,"tpath"),{d:a,startShift:i}=cn(e.path,{pathOverflow:e.pathOverflow,startOffset:e.startOffset,textLength:e.textLength,advance:sn(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),fn(s,"startOffset",un(e.startOffset,i)),fn(s,"textLength",e.textLength),t.children=[s],t}(y,p,e)),y=function(t,e,n){return $t(t,e,n,"fill")}(y,d,e),y=function(t,e,n){return $t(t,e,n,"stroke")}(y,h,e),y=jr(y,c,0,e),y=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=Ht(t);delete l.transform,l.animate&&(delete l.animate.transform,0===Object.keys(l.animate).length&&delete l.animate);const u=[l];for(let t=1;t<a;t++){const r=Ht(l),o=pe(e,t),a=o?v(r,o,n):r;u.push(a)}const c={type:"g",children:u};return void 0!==i&&(c.transform=i),void 0!==s&&(c.animate={transform:s}),c}(y,s,e),y=re(y,l,i,e),y=function(t,e,n){if(!e||!e.d&&!e.animate)return t;const r=Yt(n,"clip"),o={type:"path",d:e.d};return e.animate&&(o.animate={d:e.animate}),n.defs.push({type:"clipPath",id:r,children:[o]}),t.clipPath="url(#"+r+")",t}(y,u,e),a?(he(y,f,e),y=w(y,i,o,a,e)):y=function(t,e,n,r){return he(t,e,r),v(t,n,r)}(y,f,i,e),(null==f?void 0:f.retime)&&(t.effects={clone:{retime:f.retime}}),o&&e.idMap.set(o,y),y}function Wr(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=Kr(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=Zr(t.viewBox);if(e)return[e[2],e[3]];const n=Gr(t.width),r=Gr(t.height);return void 0!==n&&void 0!==r?[n,r]:[1,1]}(t),i=[],s=Xr(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 d(f({},s),{children:u})}function Gr(t){if("number"==typeof t)return t;if("string"==typeof t){const e=parseFloat(t);return Number.isFinite(e)?e:void 0}}function Kr(t){if("string"==typeof t)return t.startsWith("#")?t.slice(1):t}function qr(t,e,n,r,o,a,i){var s,l,u,c;const h=Kt(e);qt(h,o);const p="symbol"===h.type?Zr(h.viewBox):void 0,m=null!=(l=null!=(s=Gr(t.width))?s:null==p?void 0:p[2])?l:i[0],y=null!=(c=null!=(u=Gr(t.height))?u:null==p?void 0:p[3])?c:i[1],g="symbol"===h.type?function(t,e,n,r,o){const a=Zr(t.viewBox),i=d(f({},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,h=u>0&&c>0?Math.min(r/u,o/c):1,p=(r-u*h)/2,m=(o-c*h)/2,y=[];0===p&&0===m||y.push("translate("+p+","+m+")");1!==h&&y.push("scale("+h+")");0===s&&0===l||y.push("translate("+-s+","+-l+")");y.length&&(i.transform=y.join(""));const g=e();return n.push({type:"clipPath",id:g,children:[{type:"rect",x:s,y:l,width:u,height:c}]}),i.clipPath="url(#"+g+")",i}(h,o,a,m,y):h,v=Xr(g,n,r,o,a,i),b=d(f({},t),{type:"g",children:[v]});return delete b.href,delete b.width,delete b.height,Xt(b)}function Zr(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 Xr(t,e,n,r,o,a){if("use"===t.type&&"string"==typeof t.href){const i=Kr(t.href);if(i&&n.has(i)){const s=e.get(i);if(s)return qr(t,s,e,n,r,o,a)}}if(!t.children)return t;let i=!1;const s=t.children.map(t=>{const s=Xr(t,e,n,r,o,a);return s!==t&&(i=!0),s});return i?d(f({},t),{children:s}):t}function Yr(t,e,n){var r,o;let a=Vr(t).root;return a=Ar(a,null!=(o=null==(r=Vt(a))?void 0:r.duration)?o:Be),e===X.webapi&&(a=lr(a,null==n?void 0:n.motionPath),a=Wr(a),a=function(t){const e=t=>t.startsWith("#")?t.slice(1):t,n=(t,e)=>{var r;e(t),null==(r=t.children)||r.forEach(t=>n(t,e))};let r=!0;for(;r;){r=!1;const o=new Set;n(t,t=>{"use"===t.type&&"string"==typeof t.href&&o.add(e(t.href))}),n(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&&!o.has(t.id)))),e=e.filter(t=>!("defs"===t.type&&(!t.children||0===t.children.length))),e.length!==t.children.length&&(t.children=e,r=!0)})}return t}(a)),a}var Qr="http://www.w3.org/2000/svg",Jr=new Set(["script","foreignobject"]),Hr=new Set(["href","xlink:href","src","filter","clippath","mask","markerstart","markermid","markerend"]),$r=new Set(["href","xlink:href","src"]),to=/^data:image\/(?:png|jpe?g|gif|webp|bmp);base64,/i,eo=/^data:image\/svg\+xml(?:;[^,]*)?,/i,no=/^data:image\/[^;,]*;base64,([A-Za-z0-9+/]{8})/i,ro=["iVBORw0K","/9j/","R0lGOD","UklGR","Qk"];function oo(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(Hr.has(n)){const t=String(e);return t.startsWith("#")||(/^url\(#[^)]+\)$/.test(t)||$r.has(n)&&(to.test(t)||eo.test(t)||function(t){const e=no.exec(t);return!!e&&ro.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 ao(t){const e={};for(const n of Object.keys(t)){const r=We(n);if(J.has(r))continue;if("style"===r)continue;let o=t[n];Le.has(r)&&Array.isArray(o)?e[r]=Ce(o):"transform"===r&&null!==o&&"object"==typeof o&&!Array.isArray(o)&&o.value&&"object"==typeof o.value?e.transform=Ue(o.value,{withUnits:!1}):De.has(r)?(Array.isArray(o)&&("translate"===r&&(o=o.map(t=>t+"px")),o=o.join(",")),"rotate"===r&&(o+="deg"),e.transform=r+"("+o+")"):null!=o&&(e[r]=String(o))}return e}function io(t,e){if(!t)return null;const n=t,{type:r,children:o,style:a}=n,i=h(n,["type","children","style"]),s=i.funcType;void 0!==s&&delete i.funcType;const l=Bt(t)||e,u=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,l);let c;if(o)for(const t of o){const e=io(t,l);e&&(c||(c=[]),c.push(e))}const f=function(t,e,n,r,o){if(Jr.has(t.toLowerCase()))return console.warn("SVG tag blocked (dangerous): ",t),null;const a=document.createElementNS(Qr,t);for(const t in e){const n=oo(t,e[t]);void 0!==n&&a.setAttribute(qe(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",ao(i),u,c,i[Y]||i[Q]);return f&&void 0!==s&&f.setAttribute("type",s),f}function so(t,e){const{startOn:n,outAction:r="continue",scrollIntoViewThreshold:o=.5}=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":{const t=()=>s(),e=()=>l();a.addEventListener("mouseenter",t),a.addEventListener("mouseleave",e);break}case"click":{const e=()=>{t.isPlaying()?l():s()};a.addEventListener("click",e);break}case"scrollIntoView":new IntersectionObserver(t=>{t.forEach(t=>{t.isIntersecting&&t.intersectionRatio>=o?s():l()})},{threshold:o}).observe(a);break}return t}function lo(t){return"#"+t}function uo(t,e,n){var r;const o=Vt(t)||{},a=xr(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||Be),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,y=-(o.delay||0),g=0,v=1,b=!1;const A=o.frameRate,k=A&&A>0?1e3/A:0;let w=0;const x=()=>{const t=g?(Date.now()-g)*v:0;return y+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;if(l>0){t=Ze(t,0,s*e),r=Math.max(0,Math.ceil(t/e)-1),r=Math.min(r,s-1);n=Ze((t-r*e)/e,0,1)}else 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=Sr(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()&&(v<0?x()>0:!(Number.isFinite(u)&&P()>=u))),O=t=>{null!==p&&(cancelAnimationFrame(p),p=null),(t||j())&&(p=requestAnimationFrame(()=>{p=null,(()=>{var t,r;if(!e.isConnected())return void M();const o=P(),a=x();if(a<0&&v>0)h&&S(0);else{if(v<0&&a<=0)return M(),S(0),void(b||(b=!0,null==(t=null==n?void 0:n.onFinish)||t.call(n)));if(v>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(k>0){const t=Date.now();if(w&&t-w<k)return;w=t}S(o)}})(),O()}))},M=()=>{if(!m)return;let t=x();Number.isFinite(u)&&t>u&&(t=u),y=t,g=0,m=!1,null!==p&&(cancelAnimationFrame(p),p=null),t>=0?S(t):h&&S(0)},_={isReady:()=>!0,getRootElement:()=>null,isPlaying:()=>j(),play:()=>{var t;(()=>{if(!m){if(v>=0)Number.isFinite(u)&&y>=u&&(y=0);else if(y<=0){if(!Number.isFinite(u))return void console.warn("play: cannot start reverse playback of an infinite animation from time 0");y=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(),y=0,g=0,m=!1,b=!1,S(y),null==(t=null==n?void 0:n.onCancel)||t.call(n)},finish:()=>{((t=!0)=>{var e;y=Number.isFinite(u)?u:P(),g=0,m=!1,null!==p&&(cancelAnimationFrame(p),p=null),S(d?y: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!=v<0&&(b=!1),v=t,y=e,m&&(g=Date.now())},getCurrentTime:()=>P(),setCurrentTime:t=>{t<0&&(t=0),Number.isFinite(u)&&t>u&&(t=u),y=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 _}function co(t,e,n,r){const o=Vt(t)||{};if(!r)if(t.id){const e=lo(t.id);(r=document.querySelector(e))||console.warn("createFrameLoopAnimator: No root element found for selector: ",e)}else console.warn("createFrameLoopAnimator: No root element provided");let a=uo(t,e||function(t){const e=new Set,n={isConnected:()=>!t||t.isConnected,setAttribute:(n,r,o)=>{r=qe(r);const a=lo(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];e.setAttribute(r,o),Ve.has(r)&&(e.style[r]=o)}}};return n}(r),n);return a=d(f({},a),{getRootElement:()=>r||null}),o.trigger&&so(a,o.trigger),a}function fo(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 Le.has(n)&&Array.isArray(i)?u=Ce(i):"transform"!==n||null===i||"object"!=typeof i||Array.isArray(i)?De.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=""+i:(u=Ue(i,{withUnits:!0}),c="transform"),CSS.supports(c,u)||r.add(c),c=We(c),l[c]=u,l}function ho(t,e,n){var r,o,a,i,s;const l=[];for(let u=0;u<e.length;u++){const c=e[u],h=null!=(r=c.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=c.e?ze(c.e)(e):e,{right:o}=Te(c.e,e);l.push({t:0,v:yr(t,c.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?ze(r.e)(o):o,{left:i}=Te(r.e,o);l.length>0&&(l[l.length-1]=d(f({},l[l.length-1]),{e:i})),l.push({t:n,v:yr(t,r.v,c.v,a),e:void 0})}break}l.push(c)}return l}function po(t,e,n){var r;const o=new Map;for(const[a,i]of Object.entries(t)){const t=n.duration||1,s=ho(a,i.kfs||i.keyframes||[],t),l=[];for(let n=0;n<s.length;n++){const o=s[n],i=fo(o,Ze((null!=(r=o.t)?r:0)/t,0,1),a,e);0===n&&(i.offset||0)>0&&l.push(d(f({},i),{offset:0})),l.push(i)}l.length>0&&(l[l.length-1].offset||0)<1&&l.push(d(f({},l[l.length-1]),{offset:1})),l.length>0&&o.set(a,l)}return o}function mo(t,e,n,r){var o;const a=Vt(t)||{};if(!n)if(t.id){const e=lo(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=xr(t,X.webapi),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=lo(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=po(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 y={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,y),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&&so(h,a.trigger),h}var yo=0;function go(){return"_px_"+Date.now().toString(36)+(++yo).toString(36)+Math.random().toString(36).substring(2,6)}function vo(t){if(null===t||"object"!=typeof t)return t;if(Array.isArray(t))return t.map(t=>vo(t));const e=t,n={};for(const t of Object.keys(e))n[t]=vo(e[t]);return n}function bo(t){var e,n;const r=vo(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(["baseId","targetId","boundElementId"]);!function t(e){if(e&&"object"==typeof e){if(e.id&&"string"==typeof e.id){const t=e.id,n=go();o.set(t,n),e.id=n}else e.animate&&(e.id=go());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]=Ao(r,o);else if(s.has(n)){const t=o.get(r);t&&(e[n]=t)}else r.includes("url(#")&&(e[n]=Ao(r,o));else if("style"===n&&"object"==typeof r&&null!==r)for(const[t,e]of Object.entries(r))"string"==typeof e&&(r[t]=Ao(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.animate;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=d(f({},r.animator),{animate:t})}return r}function Ao(t,e){return t.replace(/url\(#([^)]+)\)/g,(t,n)=>{const r=e.get(n);return r?"url(#"+r+")":t})}function ko(t,e,n,r){const o=Tt(t);for(const t of o)console.warn("[PxAnimator] effects shape warning:",t);t=Yr(t,(Vt(t)||{}).mode===Z.frames?X.frames:X.webapi);let a=null;if(r&&t.children){t=bo(t);const e="string"==typeof r?document.querySelector(r):r;e&&(a=io(t),a&&e.replaceChildren(a))}return function(t,e,n,r){const o=Vt(t)||{};let a;return a=o.mode===Z.frames?co(t,e,n,r):mo(t,n,r,o.mode===Z.webapi)||co(t,e,n,r),o.debugInstName&&(window[o.debugInstName]=a),a}(t,e,n,a)}var wo="data";function xo(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 ko(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(Rt(t)){i=ko(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 Po(){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]=xo({src:t,container:n}))}}}"undefined"!=typeof window&&(window.loadTagAnimators=Po,window.createAnimator=xo,window.setupAnimationTriggers=so);var So=[1,0,0,1,0,0];function jo(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 Oo=(t,e)=>[1,0,0,1,t,e],Mo=(t,e)=>[t,0,0,e,0,0];function _o(t){const e=t*Math.PI/180;return[Math.cos(e),Math.sin(e),-Math.sin(e),Math.cos(e),0,0]}var Io=t=>[1,0,Math.tan(t*Math.PI/180),1,0,0],zo=t=>[1,Math.tan(t*Math.PI/180),0,1,0,0];function Eo(t){let e=So;t.translate&&(e=jo(e,Oo(t.translate[0],t.translate[1])));const n=t.origin&&(void 0!==t.rotate||t.scale);return n&&(e=jo(e,Oo(t.origin[0],t.origin[1]))),void 0!==t.rotate&&(e=jo(e,_o(t.rotate))),t.scale&&(e=jo(e,Mo(t.scale[0],t.scale[1]))),n&&(e=jo(e,Oo(-t.origin[0],-t.origin[1]))),e}function To(t,e,n){return t+(e-t)*n}function No(t,e){return null==t?So:"string"==typeof t?function(t){let e=So;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=jo(e,Oo(n[0]||0,n[1]||0)):"scale"===t?e=jo(e,Mo(n[0],n.length>1?n[1]:n[0])):"rotate"===t?e=jo(e,_o(n[0])):"skewX"===t?e=jo(e,Io(n[0])):"skewY"===t?e=jo(e,zo(n[0])):"matrix"===t&&(e=jo(e,[n[0],n[1],n[2],n[3],n[4],n[5]]))}return e}(t):t.keyframes?Eo(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=[To(h.translate[0],p.translate[0],d),To(h.translate[1],p.translate[1],d)]:m.translate=h.translate||p.translate,void 0!==h.rotate&&void 0!==p.rotate?m.rotate=To(h.rotate,p.rotate,d):m.rotate=null!=(l=h.rotate)?l:p.rotate,h.scale&&p.scale?m.scale=[To(h.scale[0],p.scale[0],d),To(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?Eo(t.value):So}var Co=new Set(["svg","g","symbol"]),Fo=new Set(["defs","mask","clipPath","title"]);function Lo(t,e){var n;"string"==typeof t.id&&e.set(t.id,t),null==(n=t.children)||n.forEach(t=>Lo(t,e))}function Do(t){return null==t?0:Number(t)}function Ro(t){return Math.round(100*t)/100+0}function Uo(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=Ro(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 To(c.value,f.value,d)}return void 0!==e?Number(e):n}(null==(s=t.animate)?void 0:s.opacity,t.opacity,1,n)),d=t.mask?1:0,h=e.map(Ro).join(",");return t.type+"|"+function(t){var e;switch(t.type){case"rect":return Do(t.width)+","+Do(t.height)+","+Do(t.x)+","+Do(t.y);case"ellipse":return Do(t.rx)+","+Do(t.ry)+","+Do(t.cx)+","+Do(t.cy);case"circle":return Do(t.r)+","+Do(t.cx)+","+Do(t.cy);case"path":return String(null!=(e=t.d)?e:"");default:return""}}(t)+"|["+h+"]|f:"+l+"|s:"+u+"|sw:"+(Do(c)||"")+"|o:"+f+"|m:"+d}function Vo(t,e,n,r,o){var a;const i=t.type||"";if(Fo.has(i))return;const s=jo(e,function(t,e){return t.animate&&t.animate.transform?No(t.animate.transform,e):void 0!==t.transform?No(t.transform,e):So}(t,n));if("use"===i){const e="string"==typeof t.href?t.href.replace(/^#/,""):"",a=r.get(e),i=jo(s,Oo(Do(t.x),Do(t.y)));return void(a?Vo(a,i,n,r,o):o.push("UNRESOLVED_USE:#"+e))}Co.has(i)?null==(a=t.children)||a.forEach(t=>Vo(t,s,n,r,o)):o.push(Uo(t,s,n))}function Bo(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=>Bo(t,e))}function Wo(t,e){const n=new Map;Lo(t,n);const r=[];return Vo(t,So,e,n,r),r.sort()}function Go(t,e){const n=new Set;Bo(t,n),Bo(e,n);const r=[];for(const o of Array.from(n).sort((t,e)=>t-e)){const n=Wo(t,o),a=Wo(e,o),i=Ko(n,a),s=Ko(a,n);(i.length||s.length)&&r.push({time:o,onlyInA:i,onlyInB:s})}return r}function Ko(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}