@cliquify.me/transitions 0.11.2 → 0.11.4

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.
@@ -0,0 +1,131 @@
1
+ (function(ee,f){typeof exports=="object"&&typeof module<"u"?f(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],f):(ee=typeof globalThis<"u"?globalThis:ee||self,f(ee.transitions={},ee.React,ee.ReactDOM))})(this,function(ee,f,si){"use strict";var ke=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},vr={exports:{}},Ge={};/**
2
+ * @license React
3
+ * react-jsx-runtime.production.min.js
4
+ *
5
+ * Copyright (c) Facebook, Inc. and its affiliates.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */var yn;function ui(){if(yn)return Ge;yn=1;var e=f,t=Symbol.for("react.element"),r=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,i=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function l(a,u,c){var p,h={},s=null,y=null;c!==void 0&&(s=""+c),u.key!==void 0&&(s=""+u.key),u.ref!==void 0&&(y=u.ref);for(p in u)n.call(u,p)&&!o.hasOwnProperty(p)&&(h[p]=u[p]);if(a&&a.defaultProps)for(p in u=a.defaultProps,u)h[p]===void 0&&(h[p]=u[p]);return{$$typeof:t,type:a,key:s,ref:y,props:h,_owner:i.current}}return Ge.Fragment=r,Ge.jsx=l,Ge.jsxs=l,Ge}var et={};/**
10
+ * @license React
11
+ * react-jsx-runtime.development.js
12
+ *
13
+ * Copyright (c) Facebook, Inc. and its affiliates.
14
+ *
15
+ * This source code is licensed under the MIT license found in the
16
+ * LICENSE file in the root directory of this source tree.
17
+ */var mn;function li(){return mn||(mn=1,process.env.NODE_ENV!=="production"&&function(){var e=f,t=Symbol.for("react.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),a=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),p=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),s=Symbol.for("react.lazy"),y=Symbol.for("react.offscreen"),g=Symbol.iterator,P="@@iterator";function w(m){if(m===null||typeof m!="object")return null;var $=g&&m[g]||m[P];return typeof $=="function"?$:null}var v=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function d(m){{for(var $=arguments.length,M=new Array($>1?$-1:0),L=1;L<$;L++)M[L-1]=arguments[L];x("error",m,M)}}function x(m,$,M){{var L=v.ReactDebugCurrentFrame,B=L.getStackAddendum();B!==""&&($+="%s",M=M.concat([B]));var q=M.map(function(D){return String(D)});q.unshift("Warning: "+$),Function.prototype.apply.call(console[m],console,q)}}var E=!1,_=!1,T=!1,I=!1,S=!1,j;j=Symbol.for("react.module.reference");function C(m){return!!(typeof m=="string"||typeof m=="function"||m===n||m===o||S||m===i||m===c||m===p||I||m===y||E||_||T||typeof m=="object"&&m!==null&&(m.$$typeof===s||m.$$typeof===h||m.$$typeof===l||m.$$typeof===a||m.$$typeof===u||m.$$typeof===j||m.getModuleId!==void 0))}function F(m,$,M){var L=m.displayName;if(L)return L;var B=$.displayName||$.name||"";return B!==""?M+"("+B+")":M}function V(m){return m.displayName||"Context"}function k(m){if(m==null)return null;if(typeof m.tag=="number"&&d("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof m=="function")return m.displayName||m.name||null;if(typeof m=="string")return m;switch(m){case n:return"Fragment";case r:return"Portal";case o:return"Profiler";case i:return"StrictMode";case c:return"Suspense";case p:return"SuspenseList"}if(typeof m=="object")switch(m.$$typeof){case a:var $=m;return V($)+".Consumer";case l:var M=m;return V(M._context)+".Provider";case u:return F(m,m.render,"ForwardRef");case h:var L=m.displayName||null;return L!==null?L:k(m.type)||"Memo";case s:{var B=m,q=B._payload,D=B._init;try{return k(D(q))}catch{return null}}}return null}var N=Object.assign,R=0,A,te,W,H,Z,Y,re;function Qe(){}Qe.__reactDisabledLog=!0;function Je(){{if(R===0){A=console.log,te=console.info,W=console.warn,H=console.error,Z=console.group,Y=console.groupCollapsed,re=console.groupEnd;var m={configurable:!0,enumerable:!0,value:Qe,writable:!0};Object.defineProperties(console,{info:m,log:m,warn:m,error:m,group:m,groupCollapsed:m,groupEnd:m})}R++}}function z(){{if(R--,R===0){var m={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:N({},m,{value:A}),info:N({},m,{value:te}),warn:N({},m,{value:W}),error:N({},m,{value:H}),group:N({},m,{value:Z}),groupCollapsed:N({},m,{value:Y}),groupEnd:N({},m,{value:re})})}R<0&&d("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var he=v.ReactCurrentDispatcher,be;function ye(m,$,M){{if(be===void 0)try{throw Error()}catch(B){var L=B.stack.trim().match(/\n( *(at )?)/);be=L&&L[1]||""}return`
18
+ `+be+m}}var un=!1,yr;{var nl=typeof WeakMap=="function"?WeakMap:Map;yr=new nl}function Yo(m,$){if(!m||un)return"";{var M=yr.get(m);if(M!==void 0)return M}var L;un=!0;var B=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var q;q=he.current,he.current=null,Je();try{if($){var D=function(){throw Error()};if(Object.defineProperty(D.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(D,[])}catch(se){L=se}Reflect.construct(m,[],D)}else{try{D.call()}catch(se){L=se}m.call(D.prototype)}}else{try{throw Error()}catch(se){L=se}m()}}catch(se){if(se&&L&&typeof se.stack=="string"){for(var O=se.stack.split(`
19
+ `),ie=L.stack.split(`
20
+ `),Q=O.length-1,X=ie.length-1;Q>=1&&X>=0&&O[Q]!==ie[X];)X--;for(;Q>=1&&X>=0;Q--,X--)if(O[Q]!==ie[X]){if(Q!==1||X!==1)do if(Q--,X--,X<0||O[Q]!==ie[X]){var ce=`
21
+ `+O[Q].replace(" at new "," at ");return m.displayName&&ce.includes("<anonymous>")&&(ce=ce.replace("<anonymous>",m.displayName)),typeof m=="function"&&yr.set(m,ce),ce}while(Q>=1&&X>=0);break}}}finally{un=!1,he.current=q,z(),Error.prepareStackTrace=B}var Ke=m?m.displayName||m.name:"",Fe=Ke?ye(Ke):"";return typeof m=="function"&&yr.set(m,Fe),Fe}function ol(m,$,M){return Yo(m,!1)}function il(m){var $=m.prototype;return!!($&&$.isReactComponent)}function mr(m,$,M){if(m==null)return"";if(typeof m=="function")return Yo(m,il(m));if(typeof m=="string")return ye(m);switch(m){case c:return ye("Suspense");case p:return ye("SuspenseList")}if(typeof m=="object")switch(m.$$typeof){case u:return ol(m.render);case h:return mr(m.type,$,M);case s:{var L=m,B=L._payload,q=L._init;try{return mr(q(B),$,M)}catch{}}}return""}var vt=Object.prototype.hasOwnProperty,Zo={},Qo=v.ReactDebugCurrentFrame;function gr(m){if(m){var $=m._owner,M=mr(m.type,m._source,$?$.type:null);Qo.setExtraStackFrame(M)}else Qo.setExtraStackFrame(null)}function al(m,$,M,L,B){{var q=Function.call.bind(vt);for(var D in m)if(q(m,D)){var O=void 0;try{if(typeof m[D]!="function"){var ie=Error((L||"React class")+": "+M+" type `"+D+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof m[D]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw ie.name="Invariant Violation",ie}O=m[D]($,D,L,M,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(Q){O=Q}O&&!(O instanceof Error)&&(gr(B),d("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",L||"React class",M,D,typeof O),gr(null)),O instanceof Error&&!(O.message in Zo)&&(Zo[O.message]=!0,gr(B),d("Failed %s type: %s",M,O.message),gr(null))}}}var sl=Array.isArray;function ln(m){return sl(m)}function ul(m){{var $=typeof Symbol=="function"&&Symbol.toStringTag,M=$&&m[Symbol.toStringTag]||m.constructor.name||"Object";return M}}function ll(m){try{return Jo(m),!1}catch{return!0}}function Jo(m){return""+m}function Xo(m){if(ll(m))return d("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",ul(m)),Jo(m)}var wt=v.ReactCurrentOwner,cl={key:!0,ref:!0,__self:!0,__source:!0},Ko,Go,cn;cn={};function dl(m){if(vt.call(m,"ref")){var $=Object.getOwnPropertyDescriptor(m,"ref").get;if($&&$.isReactWarning)return!1}return m.ref!==void 0}function fl(m){if(vt.call(m,"key")){var $=Object.getOwnPropertyDescriptor(m,"key").get;if($&&$.isReactWarning)return!1}return m.key!==void 0}function pl(m,$){if(typeof m.ref=="string"&&wt.current&&$&&wt.current.stateNode!==$){var M=k(wt.current.type);cn[M]||(d('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',k(wt.current.type),m.ref),cn[M]=!0)}}function hl(m,$){{var M=function(){Ko||(Ko=!0,d("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",$))};M.isReactWarning=!0,Object.defineProperty(m,"key",{get:M,configurable:!0})}}function yl(m,$){{var M=function(){Go||(Go=!0,d("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",$))};M.isReactWarning=!0,Object.defineProperty(m,"ref",{get:M,configurable:!0})}}var ml=function(m,$,M,L,B,q,D){var O={$$typeof:t,type:m,key:$,ref:M,props:D,_owner:q};return O._store={},Object.defineProperty(O._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(O,"_self",{configurable:!1,enumerable:!1,writable:!1,value:L}),Object.defineProperty(O,"_source",{configurable:!1,enumerable:!1,writable:!1,value:B}),Object.freeze&&(Object.freeze(O.props),Object.freeze(O)),O};function gl(m,$,M,L,B){{var q,D={},O=null,ie=null;M!==void 0&&(Xo(M),O=""+M),fl($)&&(Xo($.key),O=""+$.key),dl($)&&(ie=$.ref,pl($,B));for(q in $)vt.call($,q)&&!cl.hasOwnProperty(q)&&(D[q]=$[q]);if(m&&m.defaultProps){var Q=m.defaultProps;for(q in Q)D[q]===void 0&&(D[q]=Q[q])}if(O||ie){var X=typeof m=="function"?m.displayName||m.name||"Unknown":m;O&&hl(D,X),ie&&yl(D,X)}return ml(m,O,ie,B,L,wt.current,D)}}var dn=v.ReactCurrentOwner,ei=v.ReactDebugCurrentFrame;function Xe(m){if(m){var $=m._owner,M=mr(m.type,m._source,$?$.type:null);ei.setExtraStackFrame(M)}else ei.setExtraStackFrame(null)}var fn;fn=!1;function pn(m){return typeof m=="object"&&m!==null&&m.$$typeof===t}function ti(){{if(dn.current){var m=k(dn.current.type);if(m)return`
22
+
23
+ Check the render method of \``+m+"`."}return""}}function vl(m){return""}var ri={};function wl(m){{var $=ti();if(!$){var M=typeof m=="string"?m:m.displayName||m.name;M&&($=`
24
+
25
+ Check the top-level render call using <`+M+">.")}return $}}function ni(m,$){{if(!m._store||m._store.validated||m.key!=null)return;m._store.validated=!0;var M=wl($);if(ri[M])return;ri[M]=!0;var L="";m&&m._owner&&m._owner!==dn.current&&(L=" It was passed a child from "+k(m._owner.type)+"."),Xe(m),d('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',M,L),Xe(null)}}function oi(m,$){{if(typeof m!="object")return;if(ln(m))for(var M=0;M<m.length;M++){var L=m[M];pn(L)&&ni(L,$)}else if(pn(m))m._store&&(m._store.validated=!0);else if(m){var B=w(m);if(typeof B=="function"&&B!==m.entries)for(var q=B.call(m),D;!(D=q.next()).done;)pn(D.value)&&ni(D.value,$)}}}function xl(m){{var $=m.type;if($==null||typeof $=="string")return;var M;if(typeof $=="function")M=$.propTypes;else if(typeof $=="object"&&($.$$typeof===u||$.$$typeof===h))M=$.propTypes;else return;if(M){var L=k($);al(M,m.props,"prop",L,m)}else if($.PropTypes!==void 0&&!fn){fn=!0;var B=k($);d("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",B||"Unknown")}typeof $.getDefaultProps=="function"&&!$.getDefaultProps.isReactClassApproved&&d("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function bl(m){{for(var $=Object.keys(m.props),M=0;M<$.length;M++){var L=$[M];if(L!=="children"&&L!=="key"){Xe(m),d("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",L),Xe(null);break}}m.ref!==null&&(Xe(m),d("Invalid attribute `ref` supplied to `React.Fragment`."),Xe(null))}}var ii={};function ai(m,$,M,L,B,q){{var D=C(m);if(!D){var O="";(m===void 0||typeof m=="object"&&m!==null&&Object.keys(m).length===0)&&(O+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var ie=vl();ie?O+=ie:O+=ti();var Q;m===null?Q="null":ln(m)?Q="array":m!==void 0&&m.$$typeof===t?(Q="<"+(k(m.type)||"Unknown")+" />",O=" Did you accidentally export a JSX literal instead of a component?"):Q=typeof m,d("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Q,O)}var X=gl(m,$,M,B,q);if(X==null)return X;if(D){var ce=$.children;if(ce!==void 0)if(L)if(ln(ce)){for(var Ke=0;Ke<ce.length;Ke++)oi(ce[Ke],m);Object.freeze&&Object.freeze(ce)}else d("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else oi(ce,m)}if(vt.call($,"key")){var Fe=k(m),se=Object.keys($).filter(function(Tl){return Tl!=="key"}),hn=se.length>0?"{key: someKey, "+se.join(": ..., ")+": ...}":"{key: someKey}";if(!ii[Fe+hn]){var Cl=se.length>0?"{"+se.join(": ..., ")+": ...}":"{}";d(`A props object containing a "key" prop is being spread into JSX:
26
+ let props = %s;
27
+ <%s {...props} />
28
+ React keys must be passed directly to JSX without using spread:
29
+ let props = %s;
30
+ <%s key={someKey} {...props} />`,hn,Fe,Cl,Fe),ii[Fe+hn]=!0}}return m===n?bl(X):xl(X),X}}function _l(m,$,M){return ai(m,$,M,!0)}function Pl(m,$,M){return ai(m,$,M,!1)}var El=Pl,$l=_l;et.Fragment=n,et.jsx=El,et.jsxs=$l}()),et}process.env.NODE_ENV==="production"?vr.exports=ui():vr.exports=li();var b=vr.exports,ci=Object.defineProperty,gn=(e,t)=>{for(var r in t)ci(e,r,{get:t[r],enumerable:!0,configurable:!0,set:n=>t[r]=()=>n})};if(typeof f.createContext!="function"){const e=['Remotion requires React.createContext, but it is "undefined".','If you are in a React Server Component, turn it into a client component by adding "use client" at the top of the file.',"","Before:",' import {useCurrentFrame} from "remotion";',"","After:",' "use client";',' import {useCurrentFrame} from "remotion";'];throw new Error(e.join(`
31
+ `))}var xt=f.createContext({setClipRegion:()=>{throw new Error("NativeLayers not set")},clipRegion:null}),vn=({children:e})=>{const[t,r]=f.useState(null),n=f.useMemo(()=>({setClipRegion:r,clipRegion:t}),[t,r]);return typeof window<"u"&&f.useLayoutEffect(()=>{window.remotion_getClipRegion=()=>t},[t,r]),b.jsx(xt.Provider,{value:n,children:e})};function wn(){return["NOD","E_EN","V"].join("")}var xn=()=>["e","nv"].join(""),K=()=>{const e=typeof window<"u"&&window.remotion_isPlayer,t=typeof window<"u"&&typeof window.process<"u"&&typeof window.process.env<"u"&&(window.process[xn()][wn()]==="test"||window.process[xn()][wn()]==="production"&&typeof window<"u"&&typeof window.remotion_puppeteerTimeout<"u");return{isStudio:typeof window<"u"&&window.remotion_isStudio,isRendering:t,isPlayer:e}},di=f.createElement,bn=[],_n=()=>{if(!K().isStudio)return;const e=new Proxy(di,{apply(t,r,n){if(bn.includes(n[0])){const[i,o,...l]=n,a={...o??{},stack:new Error().stack};return Reflect.apply(t,r,[i,a,...l])}return Reflect.apply(t,r,n)}});f.createElement=e},tt=e=>{bn.push(e),_n()},Pn=f.createContext(!1),fi=({children:e})=>b.jsx(Pn.Provider,{value:!0,children:e}),En=()=>f.useContext(Pn);function wr(e){return!!e}var bt="4.0.221",pi=()=>{if(typeof globalThis>"u")return;const e=globalThis.remotion_imported||typeof window<"u"&&window.remotion_imported;if(e){if(e===bt)return;throw new TypeError(`🚨 Multiple versions of Remotion detected: ${[bt,typeof e=="string"?e:"an older version"].filter(wr).join(" and ")}. This will cause things to break in an unexpected way.
32
+ Check that all your Remotion packages are on the same version. If your dependencies depend on Remotion, make them peer dependencies. You can also run \`npx remotion versions\` from your terminal to see which versions are mismatching.`)}globalThis.remotion_imported=bt,typeof window<"u"&&(window.remotion_imported=bt)},hi=(e,t)=>{const{style:r,...n}=e,i=f.useMemo(()=>({position:"absolute",top:0,left:0,right:0,bottom:0,width:"100%",height:"100%",display:"flex",flexDirection:"column",...r}),[r]);return b.jsx("div",{ref:t,style:i,...n})},U=f.forwardRef(hi),ne=f.createContext(null),je=f.createContext({registerSequence:()=>{throw new Error("SequenceManagerContext not initialized")},unregisterSequence:()=>{throw new Error("SequenceManagerContext not initialized")},sequences:[]}),rt=f.createContext({hidden:{},setHidden:()=>{throw new Error("SequenceVisibilityToggle not initialized")}}),yi=({children:e})=>{const[t,r]=f.useState([]),[n,i]=f.useState({}),o=f.useCallback(c=>{r(p=>[...p,c])},[]),l=f.useCallback(c=>{r(p=>p.filter(h=>h.id!==c))},[]),a=f.useMemo(()=>({registerSequence:o,sequences:t,unregisterSequence:l}),[o,t,l]),u=f.useMemo(()=>({hidden:n,setHidden:i}),[n]);return b.jsx(je.Provider,{value:a,children:b.jsx(rt.Provider,{value:u,children:e})})},Le=f.createContext({getNonce:()=>0,fastRefreshes:0}),$n=()=>{const e=f.useContext(Le),[t,r]=f.useState(()=>e.getNonce()),n=f.useRef(e);return f.useEffect(()=>{n.current!==e&&(n.current=e,r(e.getNonce))},[e]),t},Cn={};gn(Cn,{useTimelineSetFrame:()=>qn,useTimelinePosition:()=>Oe,usePlayingState:()=>Cr,persistCurrentFrame:()=>zn,getInitialFrameState:()=>Rn,getFrameForComposition:()=>Wn,TimelineContext:()=>de,SetTimelineContext:()=>Ve});var Ee=f.createContext({compositions:[],registerComposition:()=>{},unregisterComposition:()=>{},registerFolder:()=>{},unregisterFolder:()=>{},setCurrentCompositionMetadata:()=>{},updateCompositionDefaultProps:()=>{},folders:[],currentCompositionMetadata:null,canvasContent:null,setCanvasContent:()=>{}}),_t=f.createContext({props:{},updateProps:()=>{throw new Error("Not implemented")},resetUnsaved:()=>{throw new Error("Not implemented")}}),Tn=f.createRef(),Sn=({children:e})=>{const[t,r]=f.useState({}),n=f.useCallback(({defaultProps:l,id:a,newProps:u})=>{r(c=>({...c,[a]:typeof u=="function"?u(c[a]??l):u}))},[]),i=f.useCallback(()=>{r({})},[]);f.useImperativeHandle(Tn,()=>({getProps:()=>t,setProps:r}),[t]);const o=f.useMemo(()=>({props:t,updateProps:n,resetUnsaved:i}),[t,i,n]);return b.jsx(_t.Provider,{value:o,children:e})},mi={"%3A":":","%2F":"/","%3F":"?","%23":"#","%5B":"[","%5D":"]","%40":"@","%21":"!","%24":"$","%26":"&","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";"},Mn={},gi=e=>{Mn[e]||(console.warn(e),Mn[e]=!0)},vi=e=>{for(const t of Object.keys(mi))if(e.includes(t))return{containsHex:!0,hexCode:t};return{containsHex:!1}},xr=e=>e.startsWith("/")?xr(e.substring(1)):e,wi=e=>{if(typeof window<"u"&&window.remotion_staticBase){if(e.startsWith(window.remotion_staticBase))throw new Error(`The value "${e}" is already prefixed with the static base ${window.remotion_staticBase}. You don't need to call staticFile() on it.`);return`${window.remotion_staticBase}/${xr(e)}`}return`/${xr(e)}`},xi=e=>e.split("/").map(i=>encodeURIComponent(i)).join("/"),bi=e=>{if(e.startsWith("http://")||e.startsWith("https://"))throw new TypeError(`staticFile() does not support remote URLs - got "${e}". Instead, pass the URL without wrapping it in staticFile(). See: https://remotion.dev/docs/staticfile-remote-urls`);if(e.startsWith("..")||e.startsWith("./"))throw new TypeError(`staticFile() does not support relative paths - got "${e}". Instead, pass the name of a file that is inside the public/ folder. See: https://remotion.dev/docs/staticfile-relative-paths`);if(e.startsWith("/Users")||e.startsWith("/home")||e.startsWith("/tmp")||e.startsWith("/etc")||e.startsWith("/opt")||e.startsWith("/var")||e.startsWith("C:")||e.startsWith("D:")||e.startsWith("E:"))throw new TypeError(`staticFile() does not support absolute paths - got "${e}". Instead, pass the name of a file that is inside the public/ folder. See: https://remotion.dev/docs/staticfile-relative-paths`);if(e.startsWith("public/"))throw new TypeError(`Do not include the public/ prefix when using staticFile() - got "${e}". See: https://remotion.dev/docs/staticfile-relative-paths`);const t=vi(e);t.containsHex&&gi(`WARNING: You seem to pass an already encoded path (path contains ${t.hexCode}). Since Remotion 4.0, the encoding is done by staticFile() itself. You may want to remove a encodeURIComponent() wrapping.`);const r=xi(e),n=wi(r);return n.startsWith("/")?n:`/${n}`},br="remotion-date:",_r="remotion-file:",_i=({data:e,indent:t,staticBase:r})=>{let n=!1,i=!1,o=!1,l=!1;try{return{serializedString:JSON.stringify(e,function(u,c){const p=this[u];return p instanceof Date?(n=!0,`${br}${p.toISOString()}`):p instanceof Map?(o=!0,c):p instanceof Set?(l=!0,c):typeof p=="string"&&r!==null&&p.startsWith(r)?(i=!0,`${_r}${p.replace(r+"/","")}`):c},t),customDateUsed:n,customFileUsed:i,mapUsed:o,setUsed:l}}catch(a){throw new Error("Could not serialize the passed input props to JSON: "+a.message)}},In=e=>JSON.parse(e,(t,r)=>typeof r=="string"&&r.startsWith(br)?new Date(r.replace(br,"")):typeof r=="string"&&r.startsWith(_r)?bi(r.replace(_r,"")):r),Ae=e=>K().isStudio?In(_i({data:e,indent:2,staticBase:window.remotion_staticBase}).serializedString):e,Fn=!1,Pi=()=>{Fn||(Fn=!0,console.warn("Called `getInputProps()` on the server. This function is not available server-side and has returned an empty object."),console.warn("To hide this warning, don't call this function on the server:"),console.warn(" typeof window === 'undefined' ? {} : getInputProps()"))},kn=()=>{if(typeof window>"u")return Pi(),{};if(K().isPlayer)throw new Error("You cannot call `getInputProps()` from a <Player>. Instead, the props are available as React props from component that you passed as `component` prop.");const e=window.remotion_inputProps;return e?In(e):{}},jn=["h264","h265","vp8","vp9","mp3","aac","wav","prores","h264-mkv","h264-ts","gif"];function Ei(e,t){if(!(typeof e>"u")){if(typeof e!="string")throw new TypeError(`The "defaultCodec" prop ${t} must be a string, but you passed a value of type ${typeof e}.`);if(!jn.includes(e))throw new Error(`The "defaultCodec" prop ${t} must be one of ${jn.join(", ")}, but you passed ${e}.`)}}function Pt(e,t,r){if(typeof e!="number")throw new Error(`The "${t}" prop ${r} must be a number, but you passed a value of type ${typeof e}`);if(isNaN(e))throw new TypeError(`The "${t}" prop ${r} must not be NaN, but is NaN.`);if(!Number.isFinite(e))throw new TypeError(`The "${t}" prop ${r} must be finite, but is ${e}.`);if(e%1!==0)throw new TypeError(`The "${t}" prop ${r} must be an integer, but is ${e}.`);if(e<=0)throw new TypeError(`The "${t}" prop ${r} must be positive, but got ${e}.`)}function Pr(e,t){const{allowFloats:r,component:n}=t;if(typeof e>"u")throw new Error(`The "durationInFrames" prop ${n} is missing.`);if(typeof e!="number")throw new Error(`The "durationInFrames" prop ${n} must be a number, but you passed a value of type ${typeof e}`);if(e<=0)throw new TypeError(`The "durationInFrames" prop ${n} must be positive, but got ${e}.`);if(!r&&e%1!==0)throw new TypeError(`The "durationInFrames" prop ${n} must be an integer, but got ${e}.`);if(!Number.isFinite(e))throw new TypeError(`The "durationInFrames" prop ${n} must be finite, but got ${e}.`)}function Ln(e,t,r){if(typeof e!="number")throw new Error(`"fps" must be a number, but you passed a value of type ${typeof e} ${t}`);if(!Number.isFinite(e))throw new Error(`"fps" must be a finite, but you passed ${e} ${t}`);if(isNaN(e))throw new Error(`"fps" must not be NaN, but got ${e} ${t}`);if(e<=0)throw new TypeError(`"fps" must be positive, but got ${e} ${t}`)}var An=({calculated:e,compositionId:t,compositionFps:r,compositionHeight:n,compositionWidth:i,compositionDurationInFrames:o})=>{const l=`calculated by calculateMetadata() for the composition "${t}"`,a=`of the "<Composition />" component with the id "${t}"`,u=(e==null?void 0:e.width)??i??void 0;Pt(u,"width",e!=null&&e.width?l:a);const c=(e==null?void 0:e.height)??n??void 0;Pt(c,"height",e!=null&&e.height?l:a);const p=(e==null?void 0:e.fps)??r??null;Ln(p,e!=null&&e.fps?l:a);const h=(e==null?void 0:e.durationInFrames)??o??null;Pr(h,{allowFloats:!1,component:`of the "<Composition />" component with the id "${t}"`});const s=e==null?void 0:e.defaultCodec;return Ei(s,l),{width:u,height:c,fps:p,durationInFrames:h,defaultCodec:s}},Vn=({calculateMetadata:e,signal:t,defaultProps:r,originalProps:n,compositionId:i,compositionDurationInFrames:o,compositionFps:l,compositionHeight:a,compositionWidth:u})=>{const c=e?e({defaultProps:r,props:n,abortSignal:t,compositionId:i}):null;if(c!==null&&typeof c=="object"&&"then"in c)return c.then(h=>{const{height:s,width:y,durationInFrames:g,fps:P,defaultCodec:w}=An({calculated:h,compositionDurationInFrames:o,compositionFps:l,compositionHeight:a,compositionWidth:u,compositionId:i});return{width:y,height:s,fps:P,durationInFrames:g,id:i,defaultProps:Ae(r),props:Ae(h.props??n),defaultCodec:w??null}});const p=An({calculated:c,compositionDurationInFrames:o,compositionFps:l,compositionHeight:a,compositionWidth:u,compositionId:i});return c===null?{...p,id:i,defaultProps:Ae(r??{}),props:Ae(n),defaultCodec:null}:{...p,id:i,defaultProps:Ae(r??{}),props:Ae(c.props??n),defaultCodec:c.defaultCodec??null}},$i=e=>{try{return{type:"success",result:Vn(e)}}catch(t){return{type:"error",error:t}}},Et=f.createContext(null),On=f.createRef(),Nn=e=>!!e.calculateMetadata,Ci="remotion.propsUpdatedExternally",Dn=({children:e})=>{const[t,r]=f.useState(null),{compositions:n,canvasContent:i,currentCompositionMetadata:o}=f.useContext(Ee),{fastRefreshes:l}=f.useContext(Le),a=f.useMemo(()=>n.find(S=>i&&i.type==="composition"&&i.compositionId===S.id),[i,n]),u=n.find(S=>S.id===t),{props:c}=f.useContext(_t),p=f.useMemo(()=>typeof window>"u"||K().isPlayer?{}:kn()??{},[]),[h,s]=f.useState({}),y=f.useMemo(()=>a?c[a.id]??{}:{},[c,a]),g=f.useMemo(()=>u?c[u.id]??{}:{},[c,u]),P=!!o,w=f.useCallback(({calculateMetadata:S,combinedProps:j,compositionDurationInFrames:C,compositionFps:F,compositionHeight:V,compositionId:k,compositionWidth:N,defaultProps:R})=>{const A=new AbortController;if(P)return A;const{signal:te}=A,W=$i({compositionId:k,calculateMetadata:S,originalProps:j,signal:te,defaultProps:R,compositionDurationInFrames:C,compositionFps:F,compositionHeight:V,compositionWidth:N});if(W.type==="error")return s(Z=>({...Z,[k]:{type:"error",error:W.error}})),A;const H=W.result;return typeof H=="object"&&"then"in H?(s(Z=>{const Y=Z[k];return(Y==null?void 0:Y.type)==="success"||(Y==null?void 0:Y.type)==="success-and-refreshing"?{...Z,[k]:{type:"success-and-refreshing",result:Y.result}}:{...Z,[k]:{type:"loading"}}}),H.then(Z=>{A.signal.aborted||s(Y=>({...Y,[k]:{type:"success",result:Z}}))}).catch(Z=>{A.signal.aborted||s(Y=>({...Y,[k]:{type:"error",error:Z}}))})):s(Z=>({...Z,[k]:{type:"success",result:H}})),A},[P]),v=(i==null?void 0:i.type)==="composition"?i.compositionId:null;f.useImperativeHandle(On,()=>({setCurrentRenderModalComposition:S=>{r(S)},reloadCurrentlySelectedComposition:()=>{if(!v)return;const S=n.find(V=>V.id===v);if(!S)throw new Error(`Could not find composition with id ${v}`);const j=c[v]??{},C={...S.defaultProps??{},...j??{}},F={...C,...p??{}};w({defaultProps:C,calculateMetadata:S.calculateMetadata,combinedProps:F,compositionDurationInFrames:S.durationInFrames??null,compositionFps:S.fps??null,compositionHeight:S.height??null,compositionWidth:S.width??null,compositionId:S.id})}}),[c,n,v,w,p]);const d=(a==null?void 0:a.id)===(u==null?void 0:u.id),x=f.useMemo(()=>({...(a==null?void 0:a.defaultProps)??{},...y??{}}),[a==null?void 0:a.defaultProps,y]),E=f.useMemo(()=>({...x,...p??{}}),[x,p]),_=a&&Nn(a),T=typeof window<"u"&&window.remotion_ignoreFastRefreshUpdate&&l<=window.remotion_ignoreFastRefreshUpdate;f.useEffect(()=>{if(!T&&_){const S=w({calculateMetadata:a.calculateMetadata,combinedProps:E,compositionDurationInFrames:a.durationInFrames??null,compositionFps:a.fps??null,compositionHeight:a.height??null,compositionWidth:a.width??null,defaultProps:x,compositionId:a.id});return()=>{S.abort()}}},[_,x,w,E,a==null?void 0:a.calculateMetadata,a==null?void 0:a.durationInFrames,a==null?void 0:a.fps,a==null?void 0:a.height,a==null?void 0:a.id,a==null?void 0:a.width,T]),f.useEffect(()=>{T||window.dispatchEvent(new CustomEvent("remotion.propsUpdatedExternally"))},[l]),f.useEffect(()=>{if(u&&!d){const S={...u.defaultProps??{},...g??{},...p??{}},j=w({calculateMetadata:u.calculateMetadata,compositionDurationInFrames:u.durationInFrames??null,compositionFps:u.fps??null,compositionHeight:u.height??null,compositionId:u.id,compositionWidth:u.width??null,defaultProps:x,combinedProps:S});return()=>{j.abort()}}},[x,w,p,d,u,g]);const I=f.useMemo(()=>{const S=n.filter(j=>j.calculateMetadata===null);return{...h,...S.reduce((j,C)=>({...j,[C.id]:{type:"success",result:{...C,defaultProps:C.defaultProps??{}}}}),{})}},[n,h]);return b.jsx(Et.Provider,{value:I,children:e})},Bn=e=>{const t=f.useContext(Et),{props:r}=f.useContext(_t),{compositions:n,canvasContent:i,currentCompositionMetadata:o}=f.useContext(Ee),l=(i==null?void 0:i.type)==="composition"?i.compositionId:null,a=e??l,u=n.find(p=>p.id===a),c=f.useMemo(()=>u?r[u.id]??{}:{},[r,u]);return f.useMemo(()=>u?o?{type:"success",result:{...o,id:u.id,props:o.props,defaultProps:u.defaultProps??{},defaultCodec:o.defaultCodec}}:Nn(u)?t[u.id]?t[u.id]:null:(Pr(u.durationInFrames,{allowFloats:!1,component:`in <Composition id="${u.id}">`}),Ln(u.fps,`in <Composition id="${u.id}">`),Pt(u.width,"width",`in <Composition id="${u.id}">`),Pt(u.height,"height",`in <Composition id="${u.id}">`),{type:"success",result:{width:u.width,height:u.height,fps:u.fps,id:u.id,durationInFrames:u.durationInFrames,defaultProps:u.defaultProps??{},props:{...u.defaultProps??{},...c??{},...typeof window>"u"||K().isPlayer?{}:kn()??{}},defaultCodec:null}}):null,[u,t,o,c])},Er=()=>{const{canvasContent:e,compositions:t,currentCompositionMetadata:r}=f.useContext(Ee),n=t.find(o=>(e==null?void 0:e.type)==="composition"&&o.id===e.compositionId),i=Bn((n==null?void 0:n.id)??null);return f.useMemo(()=>!i||i.type==="error"||i.type==="loading"||!n?null:{...i.result,defaultProps:n.defaultProps??{},id:n.id,...r??{},component:n.component},[r,i,n])},de=f.createContext({frame:{},playing:!1,playbackRate:1,rootId:"",imperativePlaying:{current:!1},setPlaybackRate:()=>{throw new Error("default")},audioAndVideoTags:{current:[]}}),Ve=f.createContext({setFrame:()=>{throw new Error("default")},setPlaying:()=>{throw new Error("default")}}),$r=()=>"remotion.time-all",zn=e=>{localStorage.setItem($r(),JSON.stringify(e))},Rn=()=>{const e=localStorage.getItem($r())??"{}";return JSON.parse(e)},Wn=e=>{const t=localStorage.getItem($r())??"{}",r=JSON.parse(t);return r[e]!==void 0?Number(r[e]):typeof window>"u"?0:window.remotion_initialFrame??0},Oe=()=>{const e=Er(),t=f.useContext(de);if(!e)return typeof window>"u"?0:window.remotion_initialFrame??0;const r=t.frame[e.id]??(K().isPlayer?0:Wn(e.id));return Math.min(e.durationInFrames-1,r)},qn=()=>{const{setFrame:e}=f.useContext(Ve);return e},Cr=()=>{const{playing:e,imperativePlaying:t}=f.useContext(de),{setPlaying:r}=f.useContext(Ve);return f.useMemo(()=>[e,r,t],[t,e,r])},Ne=f.createContext(!1),Ti=({children:e})=>b.jsx(Ne.Provider,{value:!0,children:e}),Tr=()=>{const e=f.useContext(ne),t=(e==null?void 0:e.width)??null,r=(e==null?void 0:e.height)??null,n=(e==null?void 0:e.durationInFrames)??null,i=Er();return f.useMemo(()=>{if(!i)return null;const{id:o,durationInFrames:l,fps:a,height:u,width:c,defaultProps:p,props:h,defaultCodec:s}=i;return{id:o,width:t??c,height:r??u,fps:a,durationInFrames:n??l,defaultProps:p,props:h,defaultCodec:s}},[n,r,t,i])},we=()=>{const e=Tr(),t=f.useContext(Ne),r=En();if(!e)throw typeof window<"u"&&window.remotion_isPlayer||r?new Error(["No video config found. Likely reasons:","- You are probably calling useVideoConfig() from outside the component passed to <Player />. See https://www.remotion.dev/docs/player/examples for how to set up the Player correctly.","- You have multiple versions of Remotion installed which causes the React context to get lost."].join("-")):new Error("No video config found. You are probably calling useVideoConfig() from a component which has not been registered as a <Composition />. See https://www.remotion.dev/docs/the-fundamentals#defining-compositions for more information.");if(!t)throw new Error("Called useVideoConfig() outside a Remotion composition.");return e},_e=()=>{if(!f.useContext(Ne))throw K().isPlayer?new Error("useCurrentFrame can only be called inside a component that was passed to <Player>. See: https://www.remotion.dev/docs/player/examples"):new Error("useCurrentFrame() can only be called inside a component that was registered as a composition. See https://www.remotion.dev/docs/the-fundamentals#defining-compositions");const t=Oe(),r=f.useContext(ne),n=r?r.cumulatedFrom+r.relativeFrom:0;return t-n},Si=({frame:e,children:t,active:r=!0})=>{const n=_e(),i=we();if(typeof e>"u")throw new Error("The <Freeze /> component requires a 'frame' prop, but none was passed.");if(typeof e!="number")throw new Error(`The 'frame' prop of <Freeze /> must be a number, but is of type ${typeof e}`);if(Number.isNaN(e))throw new Error("The 'frame' prop of <Freeze /> must be a real number, but it is NaN.");if(!Number.isFinite(e))throw new Error(`The 'frame' prop of <Freeze /> must be a finite number, but it is ${e}.`);const o=f.useMemo(()=>{if(typeof r=="boolean")return r;if(typeof r=="function")return r(n)},[r,n]),l=f.useContext(de),a=f.useContext(ne),u=(a==null?void 0:a.relativeFrom)??0,c=f.useMemo(()=>o?{...l,playing:!1,imperativePlaying:{current:!1},frame:{[i.id]:e+u}}:l,[o,l,i.id,e,u]);return b.jsx(de.Provider,{value:c,children:t})},Mi=({from:e=0,durationInFrames:t=1/0,children:r,name:n,height:i,width:o,showInTimeline:l=!0,_remotionInternalLoopDisplay:a,_remotionInternalStack:u,_remotionInternalPremountDisplay:c,...p},h)=>{const{layout:s="absolute-fill"}=p,[y]=f.useState(()=>String(Math.random())),g=f.useContext(ne),{rootId:P}=f.useContext(de),w=g?g.cumulatedFrom+g.relativeFrom:0,v=$n();if(s!=="absolute-fill"&&s!=="none")throw new TypeError(`The layout prop of <Sequence /> expects either "absolute-fill" or "none", but you passed: ${s}`);if(s==="none"&&typeof p.style<"u")throw new TypeError('If layout="none", you may not pass a style.');if(typeof t!="number")throw new TypeError(`You passed to durationInFrames an argument of type ${typeof t}, but it must be a number.`);if(t<=0)throw new TypeError(`durationInFrames must be positive, but got ${t}`);if(typeof e!="number")throw new TypeError(`You passed to the "from" props of your <Sequence> an argument of type ${typeof e}, but it must be a number.`);if(!Number.isFinite(e))throw new TypeError(`The "from" prop of a sequence must be finite, but got ${e}.`);const d=Oe(),x=we(),E=g?Math.min(g.durationInFrames-e,t):t,_=Math.max(0,Math.min(x.durationInFrames-e,E)),{registerSequence:T,unregisterSequence:I}=f.useContext(je),{hidden:S}=f.useContext(rt),j=f.useMemo(()=>(g==null?void 0:g.premounting)??!!p._remotionInternalIsPremounting,[p._remotionInternalIsPremounting,g==null?void 0:g.premounting]),C=f.useMemo(()=>({cumulatedFrom:w,relativeFrom:e,durationInFrames:_,parentFrom:(g==null?void 0:g.relativeFrom)??0,id:y,height:i??(g==null?void 0:g.height)??null,width:o??(g==null?void 0:g.width)??null,premounting:j}),[w,e,_,g,y,i,o,j]),F=f.useMemo(()=>n??"",[n]);f.useEffect(()=>{if(K().isStudio)return T({from:e,duration:_,id:y,displayName:F,parent:(g==null?void 0:g.id)??null,type:"sequence",rootId:P,showInTimeline:l,nonce:v,loopDisplay:a,stack:u??null,premountDisplay:c??null}),()=>{I(y)}},[t,y,n,T,F,I,g==null?void 0:g.id,_,P,e,l,v,a,u,c]);const V=Math.ceil(w+e+t-1),k=d<w+e||d>V?null:r,N=p.layout==="none"?void 0:p.style,R=f.useMemo(()=>({flexDirection:void 0,...o?{width:o}:{},...i?{height:i}:{},...N??{}}),[i,N,o]);if(h!==null&&s==="none")throw new TypeError('It is not supported to pass both a `ref` and `layout="none"` to <Sequence />.');return S[y]??!1?null:b.jsx(ne.Provider,{value:C,children:k===null?null:p.layout==="none"?k:b.jsx(U,{ref:h,style:R,className:p.className,children:k})})},Ii=f.forwardRef(Mi),Fi=(e,t)=>{const r=_e();if(e.layout==="none")throw new Error('`<Sequence>` with `premountFor` prop does not support layout="none"');const{style:n,from:i=0,premountFor:o=0,...l}=e,a=r<i&&r>=i-o,u=f.useMemo(()=>({...n,opacity:a?0:1,pointerEvents:a?"none":(n==null?void 0:n.pointerEvents)??void 0}),[a,n]);return b.jsx(Si,{frame:i,active:a,children:b.jsx(me,{ref:t,from:i,style:u,_remotionInternalPremountDisplay:o,_remotionInternalIsPremounting:a,...l})})},ki=f.forwardRef(Fi),ji=(e,t)=>e.layout!=="none"&&e.premountFor&&!K().isRendering?b.jsx(ki,{...e,ref:t}):b.jsx(Ii,{...e,ref:t}),me=f.forwardRef(ji),Li=e=>{if(typeof e!="string")throw new TypeError(`The "filename" must be a string, but you passed a value of type ${typeof e}`);if(e.trim()==="")throw new Error("The `filename` must not be empty");if(!e.match(/^([0-9a-zA-Z-!_.*'()/:&$@=;+,?]+)/g))throw new Error('The `filename` must match "/^([0-9a-zA-Z-!_.*\'()/:&$@=;+,?]+)/g". Use forward slashes only, even on Windows.')},Ai=e=>{if(typeof e!="string"&&!(e instanceof Uint8Array))throw new TypeError(`The "content" must be a string or Uint8Array, but you passed a value of type ${typeof e}`);if(typeof e=="string"&&e.trim()==="")throw new Error("The `content` must not be empty")},Un=e=>{e.type==="artifact"&&(Li(e.filename),Ai(e.content))},De=f.createContext({registerRenderAsset:()=>{},unregisterRenderAsset:()=>{},renderAssets:[]}),Vi=({children:e})=>{const[t,r]=f.useState([]),n=f.useCallback(l=>{Un(l),r(a=>[...a,l])},[]),i=f.useCallback(l=>{r(a=>a.filter(u=>u.id!==l))},[]);f.useLayoutEffect(()=>{typeof window<"u"&&(window.remotion_collectAssets=()=>(r([]),t))},[t]);const o=f.useMemo(()=>({registerRenderAsset:n,unregisterRenderAsset:i,renderAssets:t}),[t,n,i]);return b.jsx(De.Provider,{value:o,children:e})},$e=e=>typeof window>"u"?e:new URL(e,window.origin).href,Hn=({endAt:e,mediaDuration:t,playbackRate:r,startFrom:n})=>{let i=t;typeof e<"u"&&(i=e),typeof n<"u"&&(i-=n);const o=i/r;return Math.floor(o)};function Sr(e){let t;throw Oi(e)?(t=e,t.stack||(t.stack=new Error(t.message).stack)):typeof e=="string"?t=Error(e):t=Error("Rendering was cancelled"),window.remotion_cancelledError=t.stack,t}var Oi=e=>e instanceof Error?!0:!(e===null||typeof e!="object"||!("stack"in e)||typeof e.stack!="string"||!("message"in e)||typeof e.message!="string"),Yn=f.createContext(null),Ni=()=>f.useContext(Yn),$t=({durationInFrames:e,times:t=1/0,children:r,name:n,...i})=>{const o=_e(),{durationInFrames:l}=we();if(Pr(e,{component:"of the <Loop /> component",allowFloats:!0}),typeof t!="number")throw new TypeError(`You passed to "times" an argument of type ${typeof t}, but it must be a number.`);if(t!==1/0&&t%1!==0)throw new TypeError(`The "times" prop of a loop must be an integer, but got ${t}.`);if(t<0)throw new TypeError(`The "times" prop of a loop must be at least 0, but got ${t}`);const a=Math.ceil(l/e),u=Math.min(a,t),c=i.layout==="none"?void 0:i.style,p=e*(u-1),s=Math.floor(o/e)*e,y=Math.min(s,p),g=f.useMemo(()=>({numberOfTimes:u,startOffset:-y,durationInFrames:e}),[u,e,y]),P=f.useMemo(()=>({iteration:Math.floor(o/e),durationInFrames:e}),[o,e]);return b.jsx(Yn.Provider,{value:P,children:b.jsx(me,{durationInFrames:e,from:y,name:n??"<Loop>",_remotionInternalLoopDisplay:g,layout:i.layout,style:c,children:r})})};$t.useLoop=Ni;var Ct=f.createContext({}),Zn={},Mr=[],Qn=({children:e})=>{const[t,r]=f.useState(()=>Zn);return f.useEffect(()=>{const n=()=>{r(Zn)};return Mr.push(n),()=>{Mr=Mr.filter(i=>i!==n)}},[]),b.jsx(Ct.Provider,{value:t,children:e})},Be=e=>f.useContext(Ct)[e]??e,Jn=(e,t)=>{if(typeof e.volume!="number"&&typeof e.volume!="function"&&typeof e.volume<"u")throw new TypeError(`You have passed a volume of type ${typeof e.volume} to your <${t} /> component. Volume must be a number or a function with the signature '(frame: number) => number' undefined.`);if(typeof e.volume=="number"&&e.volume<0)throw new TypeError(`You have passed a volume below 0 to your <${t} /> component. Volume must be between 0 and 1`);if(typeof e.playbackRate!="number"&&typeof e.playbackRate<"u")throw new TypeError(`You have passed a playbackRate of type ${typeof e.playbackRate} to your <${t} /> component. Playback rate must a real number or undefined.`);if(typeof e.playbackRate=="number"&&(isNaN(e.playbackRate)||!Number.isFinite(e.playbackRate)||e.playbackRate<=0))throw new TypeError(`You have passed a playbackRate of ${e.playbackRate} to your <${t} /> component. Playback rate must be a real number above 0.`)},Xn=(e,t)=>{if(typeof e<"u"){if(typeof e!="number")throw new TypeError(`type of startFrom prop must be a number, instead got type ${typeof e}.`);if(isNaN(e)||e===1/0)throw new TypeError("startFrom prop can not be NaN or Infinity.");if(e<0)throw new TypeError(`startFrom must be greater than equal to 0 instead got ${e}.`)}if(typeof t<"u"){if(typeof t!="number")throw new TypeError(`type of endAt prop must be a number, instead got type ${typeof t}.`);if(isNaN(t))throw new TypeError("endAt prop can not be NaN.");if(t<=0)throw new TypeError(`endAt must be a positive number, instead got ${t}.`)}if(t<e)throw new TypeError("endAt prop must be greater than startFrom prop.")},Di=(e,t)=>{switch(t.type){case"got-duration":{const r=$e(t.src);return e[r]===t.durationInSeconds?e:{...e,[r]:t.durationInSeconds}}default:return e}},Ir=f.createContext({durations:{},setDurations:()=>{throw new Error("context missing")}}),Kn=({children:e})=>{const[t,r]=f.useReducer(Di,{}),n=f.useMemo(()=>({durations:t,setDurations:r}),[t]);return b.jsx(Ir.Provider,{value:n,children:e})};function Gn(e){let t=e+1831565813;return t=Math.imul(t^t>>>15,t|1),t^=t+Math.imul(t^t>>>7,t|61),((t^t>>>14)>>>0)/4294967296}function Bi(e){let t=0,r=0,n=0;for(t=0;t<e.length;t++)r=e.charCodeAt(t),n=(n<<5)-n+r,n|=0;return n}var ge=(e,t)=>{if(e===null)return Math.random();if(typeof e=="string")return Gn(Bi(e));if(typeof e=="number")return Gn(e*1e10);throw new Error("random() argument must be a number or a string")},nt=()=>{const e=f.useContext(ne);return Math.min(0,(e==null?void 0:e.relativeFrom)??0)},Tt=e=>{const t=$t.useLoop(),r=_e(),n=nt();return e==="repeat"||t===null?r+n:r+n+t.durationInFrames*t.iteration},zi=e=>{if(/data:|blob:/.test(e.substring(0,5)))return"Data URL";const t=e.split("/").map(r=>r.split("\\")).flat(1);return t[t.length-1]},St=(e,t,r)=>{const{current:n}=e;if(!n)return;const i=n.play();i.catch&&i.catch(o=>{if(n&&!o.message.includes("request was interrupted by a call to pause")&&!o.message.includes("The operation was aborted.")&&!o.message.includes("The fetching process for the media resource was aborted by the user agent")&&!o.message.includes("request was interrupted by a new load request")&&!o.message.includes("because the media was removed from the document")&&(console.log(`Could not play ${t} due to following error: `,o),!n.muted)){if(r){r();return}console.log("The video will be muted and we'll retry playing it."),t==="video"&&K().isPlayer&&console.log("Use onAutoPlayError() to handle this error yourself."),n.muted=!0,n.play()}})},ot=({frame:e,volume:t,mediaVolume:r=1,allowAmplificationDuringRender:n})=>{const i=n?1/0:1;if(typeof t=="number")return Math.min(i,t*r);if(typeof t>"u")return Number(r);const o=t(e)*r;if(typeof o!="number")throw new TypeError(`You passed in a a function to the volume prop but it did not return a number but a value of type ${typeof o} for frame ${e}`);if(Number.isNaN(o))throw new TypeError(`You passed in a function to the volume prop but it returned NaN for frame ${e}.`);if(!Number.isFinite(o))throw new TypeError(`You passed in a function to the volume prop but it returned a non-finite number for frame ${e}.`);return Math.max(0,Math.min(i,o))},eo={},Ri=e=>{eo[e]||(console.warn(e),eo[e]=!0)},to=({volume:e,mediaVolume:t,mediaRef:r,src:n,mediaType:i,playbackRate:o,displayName:l,id:a,stack:u,showInTimeline:c,premountDisplay:p,onAutoPlayError:h})=>{const s=we(),{rootId:y,audioAndVideoTags:g}=f.useContext(de),P=f.useContext(ne),w=P?P.relativeFrom+P.cumulatedFrom:0,[v]=Cr(),d=nt(),{registerSequence:x,unregisterSequence:E}=f.useContext(je),[_]=f.useState(()=>e),T=$n(),I=P?Math.min(P.durationInFrames,s.durationInFrames):s.durationInFrames,S=typeof e=="function",j=f.useMemo(()=>typeof e=="number"?e:new Array(Math.floor(Math.max(0,I+d))).fill(!0).map((C,F)=>ot({frame:F+d,volume:e,mediaVolume:t,allowAmplificationDuringRender:!1})).join(","),[I,d,e,t]);f.useEffect(()=>{typeof e=="number"&&e!==_&&Ri(`Remotion: The ${i} with src ${n} has changed it's volume. Prefer the callback syntax for setting volume to get better timeline display: https://www.remotion.dev/docs/using-audio/#controlling-volume`)},[_,i,n,e]),f.useEffect(()=>{var C,F;if(r.current){if(!n)throw new Error("No src passed");if(!(!K().isStudio&&((F=(C=window.process)==null?void 0:C.env)==null?void 0:F.NODE_ENV)!=="test")&&c)return x({type:i,src:n,id:a,duration:I,from:0,parent:(P==null?void 0:P.id)??null,displayName:l??zi(n),rootId:y,volume:j,showInTimeline:!0,nonce:T,startMediaFrom:0-d,doesVolumeChange:S,loopDisplay:void 0,playbackRate:o,stack:u,premountDisplay:p}),()=>{E(a)}}},[w,I,a,P,n,x,y,E,s,j,S,T,r,i,d,o,l,u,c,p]),f.useEffect(()=>{const C={id:a,play:()=>{if(v)return St(r,i,h)}};return g.current.push(C),()=>{g.current=g.current.filter(F=>F.id!==a)}},[g,a,r,i,h,v])},Wi=()=>{const[e,t]=f.useState([]),[r,n]=f.useState([]),[i,o]=f.useState([]),l=f.useRef(!1),a=f.useCallback(p=>(t(h=>[...h,p]),{unblock:()=>{t(h=>{const s=h.filter(y=>y!==p);return s.length===h.length?h:s})}}),[]),u=f.useCallback(p=>(n(h=>[...h,p]),{remove:()=>{n(h=>h.filter(s=>s!==p))}}),[]),c=f.useCallback(p=>(o(h=>[...h,p]),{remove:()=>{o(h=>h.filter(s=>s!==p))}}),[]);return f.useEffect(()=>{e.length>0&&r.forEach(p=>p())},[e]),f.useEffect(()=>{e.length===0&&i.forEach(p=>p())},[e]),f.useMemo(()=>({addBlock:a,listenForBuffering:u,listenForResume:c,buffering:l}),[a,l,u,c])},ze=f.createContext(null),ro=({children:e})=>{const t=Wi();return b.jsx(ze.Provider,{value:t,children:e})},qi=e=>{const[t,r]=f.useState(e.buffering.current);return f.useEffect(()=>{const n=()=>{r(!0)},i=()=>{r(!1)};return e.listenForBuffering(n),e.listenForResume(i),()=>{e.listenForBuffering(()=>{}),e.listenForResume(()=>{})}},[e]),t},Fr=()=>{const e=f.useContext(ze),t=e?e.addBlock:null;return f.useMemo(()=>({delayPlayback:()=>{if(!t)throw new Error("Tried to enable the buffering state, but a Remotion context was not found. This API can only be called in a component that was passed to the Remotion Player or a <Composition>. Or you might have experienced a version mismatch - run `npx remotion versions` and ensure all packages have the same version. This error is thrown by the buffer state https://remotion.dev/docs/player/buffer-state");const{unblock:r}=t({id:String(Math.random())});return{unblock:r}}}),[t])},Ui=({mediaRef:e,mediaType:t,onVariableFpsVideoDetected:r,pauseWhenBuffering:n})=>{const i=f.useRef(!1),{delayPlayback:o}=Fr(),l=f.useCallback(a=>{if(t!=="video"||!n)return;const u=e.current;if(!u||!u.requestVideoFrameCallback)return;i.current=!0;const c=o(),p=()=>{c.unblock(),u.removeEventListener("ended",p,{once:!0}),u.removeEventListener("pause",p,{once:!0}),i.current=!1},h=()=>{p()};u.requestVideoFrameCallback((s,y)=>{Math.abs(y.mediaTime-a)>.5&&r(),p()}),u.addEventListener("ended",h,{once:!0}),u.addEventListener("pause",h,{once:!0}),u.addEventListener("canplay",h,{once:!0})},[o,e,t,r,n]);return f.useMemo(()=>({isBuffering:()=>i.current,bufferUntilFirstFrame:l}),[l])},Hi=({element:e,shouldBuffer:t,isPremounting:r})=>{const n=Fr(),[i,o]=f.useState(!1);return f.useEffect(()=>{let l=[];const{current:a}=e;if(!a||!t||r)return;const u=()=>{l.forEach(h=>h()),l=[],o(!1)},c=()=>{o(!0);const{unblock:h}=n.delayPlayback(),s=()=>{u(),p()},y=()=>{u(),p()};a.addEventListener("canplay",s,{once:!0}),l.push(()=>{a.removeEventListener("canplay",s)}),a.addEventListener("error",y,{once:!0}),l.push(()=>{a.removeEventListener("error",y)}),l.push(()=>{h()})},p=()=>{a.readyState<a.HAVE_FUTURE_DATA?(c(),navigator.userAgent.includes("Firefox/")||a.load()):(a.addEventListener("waiting",c),l.push(()=>{a.removeEventListener("waiting",c)}))};return p(),()=>{u()}},[n,e,r,t]),i},Yi=({mediaRef:e,mediaType:t,lastSeek:r,onVariableFpsVideoDetected:n})=>{const i=f.useRef(null);return f.useEffect(()=>{const{current:o}=e;if(o)i.current=o.currentTime;else{i.current=null;return}if(t!=="video"){i.current=null;return}const l=o;if(!l.requestVideoFrameCallback)return;let a=()=>{};const u=()=>{if(!l)return;const c=l.requestVideoFrameCallback((p,h)=>{if(i.current!==null){const s=Math.abs(i.current-h.mediaTime),y=Math.abs(r.current===null?1/0:h.mediaTime-r.current);s>.5&&y>.5&&h.mediaTime>i.current&&n()}i.current=h.mediaTime,u()});a=()=>{l.cancelVideoFrameCallback(c),a=()=>{}}};return u(),()=>{a()}},[r,e,t,n]),i};function Zi(e,t,r,n){const{extrapolateLeft:i,extrapolateRight:o,easing:l}=n;let a=e;const[u,c]=t,[p,h]=r;if(a<u){if(i==="identity")return a;if(i==="clamp")a=u;else if(i==="wrap"){const s=c-u;a=((a-u)%s+s)%s+u}}if(a>c){if(o==="identity")return a;if(o==="clamp")a=c;else if(o==="wrap"){const s=c-u;a=((a-u)%s+s)%s+u}}return p===h?p:(a=(a-u)/(c-u),a=l(a),a=a*(h-p)+p,a)}function Qi(e,t){let r;for(r=1;r<t.length-1&&!(t[r]>=e);++r);return r-1}function Ji(e){for(let t=1;t<e.length;++t)if(!(e[t]>e[t-1]))throw new Error(`inputRange must be strictly monotonically increasing but got [${e.join(",")}]`)}function no(e,t){if(t.length<2)throw new Error(e+" must have at least 2 elements");for(const r of t){if(typeof r!="number")throw new Error(`${e} must contain only numbers`);if(!Number.isFinite(r))throw new Error(`${e} must contain only finite numbers, but got [${t.join(",")}]`)}}function Mt(e,t,r,n){if(typeof e>"u")throw new Error("input can not be undefined");if(typeof t>"u")throw new Error("inputRange can not be undefined");if(typeof r>"u")throw new Error("outputRange can not be undefined");if(t.length!==r.length)throw new Error("inputRange ("+t.length+") and outputRange ("+r.length+") must have the same length");no("inputRange",t),no("outputRange",r),Ji(t);const i=(n==null?void 0:n.easing)??(u=>u);let o="extend";(n==null?void 0:n.extrapolateLeft)!==void 0&&(o=n.extrapolateLeft);let l="extend";if((n==null?void 0:n.extrapolateRight)!==void 0&&(l=n.extrapolateRight),typeof e!="number")throw new TypeError("Cannot interpolate an input which is not a number");const a=Qi(e,t);return Zi(e,[t[a],t[a+1]],[r[a],r[a+1]],{easing:i,extrapolateLeft:o,extrapolateRight:l})}var Xi=({frame:e,playbackRate:t,startFrom:r})=>Mt(e,[-1,r,r+1],[-1,r,r+t]),oo=({fps:e,frame:t,playbackRate:r,startFrom:n})=>{const i=Xi({frame:t,playbackRate:r,startFrom:n}),o=1e3/e;return i*o/1e3},io=(e,t)=>Math.round(e/t*100)/100,It=()=>{if(typeof window>"u")return!1;const e=/iP(ad|od|hone)/i.test(window.navigator.userAgent),t=/AppleWebKit/.test(window.navigator.userAgent);return e&&t},Ki=e=>It()&&e.startsWith("blob:"),kr=({actualFrom:e,fps:t})=>io(Math.max(0,-e),t),jr=({duration:e,fps:t})=>io(e,t),Gi=({actualSrc:e,actualFrom:t,duration:r,fps:n})=>{if(Ki(e)||e.startsWith("data:")||!!new URL(e,(typeof window>"u"?null:window.location.href)??"http://localhost:3000").hash||!Number.isFinite(t))return e;const o=`${e}#t=${kr({actualFrom:t,fps:n})}`;return Number.isFinite(r)?`${o},${jr({duration:r,fps:n})}`:o},ea=({prevStartFrom:e,newStartFrom:t,prevDuration:r,newDuration:n,fps:i})=>{const o=kr({actualFrom:e,fps:i}),l=kr({actualFrom:t,fps:i}),a=jr({duration:r,fps:i}),u=jr({duration:n,fps:i});return!(l<o||u>a)},ta=({actualSrc:e,actualFrom:t,duration:r,fps:n})=>{const i=f.useRef(t),o=f.useRef(r),l=f.useRef(e);return(!ea({prevStartFrom:i.current,newStartFrom:t,prevDuration:o.current,newDuration:r,fps:n})||e!==l.current)&&(i.current=t,o.current=r,l.current=e),Gi({actualSrc:l.current,actualFrom:i.current,duration:o.current,fps:n})},ao={},ra=(e,t)=>{if(e===null||e.seekable.length===0||e.seekable.length>1||ao[e.src])return;const r={start:e.seekable.start(0),end:e.seekable.end(0)};if(r.start===0&&r.end===0){const n=[`The media ${e.src} cannot be seeked. This could be one of few reasons:`,"1) The media resource was replaced while the video is playing but it was not loaded yet.","2) The media does not support seeking.","3) The media was loaded with security headers prventing it from being included.","Please see https://remotion.dev/docs/non-seekable-media for assistance."].join(`
33
+ `);if(t==="console-error")console.error(n);else if(t==="console-warning")console.warn(`The media ${e.src} does not support seeking. The video will render fine, but may not play correctly in the Remotion Studio and in the <Player>. See https://remotion.dev/docs/non-seekable-media for an explanation.`);else throw new Error(n);ao[e.src]=!0}},Lr=.45,Ar=(e,t)=>{if(!e.current)return;const r=It()?Number(t.toFixed(1)):t;e.current.currentTime=r},so=({mediaRef:e,src:t,mediaType:r,playbackRate:n,onlyWarnForMediaSeekingError:i,acceptableTimeshift:o,pauseWhenBuffering:l,isPremounting:a,debugSeeking:u,onAutoPlayError:c})=>{const{playbackRate:p}=f.useContext(de),h=_e(),s=Oe(),[y]=Cr(),g=f.useContext(ze),{fps:P}=we(),w=nt(),v=f.useRef(null),d=f.useRef(null);if(!g)throw new Error("useMediaPlayback must be used inside a <BufferingContext>");const x=f.useRef({}),E=f.useCallback(()=>{t&&(u&&console.log(`Detected ${t} as a variable FPS video. Disabling buffering while seeking.`),x.current[t]=!0)},[u,t]),_=Yi({mediaRef:e,mediaType:r,lastSeek:d,onVariableFpsVideoDetected:E}),T=oo({frame:h,playbackRate:n,startFrom:-w,fps:P}),I=Hi({element:e,shouldBuffer:l,isPremounting:a}),{bufferUntilFirstFrame:S,isBuffering:j}=Ui({mediaRef:e,mediaType:r,onVariableFpsVideoDetected:E,pauseWhenBuffering:l}),C=n*p,F=(()=>{var k;return(k=e.current)!=null&&k.duration?Math.min(e.current.duration,o??Lr):o})(),V=qi(g);f.useEffect(()=>{var N,R;if(!y){(N=e.current)==null||N.pause();return}const k=I||j();V&&!k&&((R=e.current)==null||R.pause())},[j,I,V,e,y]),f.useEffect(()=>{const k=r==="audio"?"<Audio>":"<Video>";if(!e.current)throw new Error(`No ${r} ref found`);if(!t)throw new Error(`No 'src' attribute was passed to the ${k} element.`);const N=Math.max(0,C);e.current.playbackRate!==N&&(e.current.playbackRate=N);const{duration:R}=e.current,A=!Number.isNaN(R)&&Number.isFinite(R)?Math.min(R,T):T,te=e.current.currentTime,W=_.current??null,H=x.current[t],Z=Math.abs(A-te),Y=W?Math.abs(A-W):null,re=Y&&!H?Y:Z;if(u&&console.log({mediaTagTime:te,rvcTime:W,shouldBeTime:A,state:e.current.readyState,playing:!e.current.paused,isVariableFpsVideo:H}),re>F&&v.current!==A){u&&console.log("Seeking",{shouldBeTime:A,isTime:te,rvcTime:W,timeShift:re,isVariableFpsVideo:H}),Ar(e,A),d.current=A,v.current=A,y&&!H&&(C>0&&S(A),e.current.paused&&St(e,r,c)),i||ra(e.current,i?"console-warning":"console-error");return}const Qe=y?.15:1e-5,Je=Math.abs(e.current.currentTime-A)>Qe,z=I||j(),he=g.buffering.current&&!z;if(!y||he){Je&&(Ar(e,A),d.current=A);return}(e.current.paused&&!e.current.ended||s===0)&&(Je&&(Ar(e,A),d.current=A),St(e,r,c),H||C>0&&S(A))},[s,F,S,g.buffering,_,u,T,j,I,e,r,i,C,y,t,c])},uo=e=>{const[t,r]=f.useState(1);return f.useEffect(()=>{const n=e.current;if(!n)return;const i=()=>{r(n.volume)};return n.addEventListener("volumechange",i),()=>n.removeEventListener("volumechange",i)},[e]),f.useEffect(()=>{const n=e.current;n&&n.volume!==t&&r(n.volume)},[t,e]),t},na=1e-5,lo=(e,t)=>Math.abs(e-t)<na,co=({volumePropFrame:e,actualVolume:t,volume:r,mediaVolume:n,mediaRef:i})=>{f.useEffect(()=>{const o=ot({frame:e,volume:r,mediaVolume:n,allowAmplificationDuringRender:!1});!lo(o,t)&&i.current&&(i.current.volume=o)},[t,e,i,r,n])},Vr=f.createContext({mediaMuted:!1,mediaVolume:1}),Or=f.createContext({setMediaMuted:()=>{throw new Error("default")},setMediaVolume:()=>{throw new Error("default")}}),Nr=()=>{const{mediaVolume:e}=f.useContext(Vr),{setMediaVolume:t}=f.useContext(Or);return f.useMemo(()=>[e,t],[e,t])},Dr=()=>{const{mediaMuted:e}=f.useContext(Vr),{setMediaMuted:t}=f.useContext(Or);return f.useMemo(()=>[e,t],[e,t])},fo="data:audio/mp3;base64,/+MYxAAJcAV8AAgAABn//////+/gQ5BAMA+D4Pg+BAQBAEAwD4Pg+D4EBAEAQDAPg++hYBH///hUFQVBUFREDQNHmf///////+MYxBUGkAGIMAAAAP/29Xt6lUxBTUUzLjEwMFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV/+MYxDUAAANIAAAAAFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV",oa=(e,t)=>{const r=Object.keys(e).sort(),n=Object.keys(t).sort();if(r.length!==n.length)return!1;for(let i=0;i<r.length;i++)if(r[i]!==n[i]||e[r[i]]!==t[n[i]])return!1;return!0},ia=(e,t,r)=>e==="src"&&!r.startsWith("data:")&&!t.startsWith("data:")?new URL(r,window.origin).toString()!==new URL(t,window.origin).toString():r!==t,Ft=f.createContext(null),po=({children:e,numberOfAudioTags:t,component:r})=>{const n=f.useRef([]),[i]=f.useState(t);if(t!==i)throw new Error("The number of shared audio tags has changed dynamically. Once you have set this property, you cannot change it afterwards.");const o=f.useMemo(()=>new Array(t).fill(!0).map(()=>({id:Math.random(),ref:f.createRef()})),[t]),l=f.useRef(new Array(t).fill(!1)),a=f.useCallback(()=>{o.forEach(({ref:g,id:P})=>{var d;const w=(d=n.current)==null?void 0:d.find(x=>x.id===P),{current:v}=g;if(v){if(w===void 0){v.src=fo;return}if(!w)throw new TypeError("Expected audio data to be there");Object.keys(w.props).forEach(x=>{ia(x,w.props[x],v[x])&&(v[x]=w.props[x])})}})},[o]),u=f.useCallback((g,P)=>{var T,I;const w=(T=n.current)==null?void 0:T.find(S=>S.audioId===P);if(w)return w;const v=l.current.findIndex(S=>S===!1);if(v===-1)throw new Error(`Tried to simultaneously mount ${t+1} <Audio /> tags at the same time. With the current settings, the maximum amount of <Audio /> tags is limited to ${t} at the same time. Remotion pre-mounts silent audio tags to help avoid browser autoplay restrictions. See https://remotion.dev/docs/player/autoplay#use-the-numberofsharedaudiotags-property for more information on how to increase this limit.`);const{id:d,ref:x}=o[v],E=[...l.current];E[v]=d,l.current=E;const _={props:g,id:d,el:x,audioId:P};return(I=n.current)==null||I.push(_),a(),_},[t,o,a]),c=f.useCallback(g=>{var v;const P=[...l.current],w=o.findIndex(d=>d.id===g);if(w===-1)throw new TypeError("Error occured in ");P[w]=!1,l.current=P,n.current=(v=n.current)==null?void 0:v.filter(d=>d.id!==g),a()},[o,a]),p=f.useCallback(({aud:g,audioId:P,id:w})=>{var d;let v=!1;n.current=(d=n.current)==null?void 0:d.map(x=>x.id===w?oa(g,x.props)?x:(v=!0,{...x,props:g,audioId:P}):x),v&&a()},[a]),h=f.useCallback(()=>{o.forEach(g=>{St(g.ref,"audio",null)})},[o]),s=f.useMemo(()=>({registerAudio:u,unregisterAudio:c,updateAudio:p,playAllAudios:h,numberOfAudioTags:t}),[t,h,u,c,p]),y=f.useCallback(()=>{l.current=new Array(t).fill(!1),n.current=[],a()},[t,a]);return f.useEffect(()=>()=>{y()},[r,y]),b.jsxs(Ft.Provider,{value:s,children:[o.map(({id:g,ref:P})=>b.jsx("audio",{ref:P,preload:"metadata",src:fo},g)),e]})},aa=(e,t)=>{const r=f.useContext(Ft),[n]=f.useState(()=>r&&r.numberOfAudioTags>0?r.registerAudio(e,t):{el:f.createRef(),id:Math.random(),props:e,audioId:t}),i=f.useInsertionEffect??f.useLayoutEffect;return typeof document<"u"&&(i(()=>{r&&r.numberOfAudioTags>0&&r.updateAudio({id:n.id,aud:e,audioId:t})},[e,r,n.id,t]),i(()=>()=>{r&&r.numberOfAudioTags>0&&r.unregisterAudio(n.id)},[r,n.id])),n},sa=(e,t)=>{const[r]=f.useState(e.shouldPreMountAudioTags);if(e.shouldPreMountAudioTags!==r)throw new Error("Cannot change the behavior for pre-mounting audio tags dynamically.");const{volume:n,muted:i,playbackRate:o,shouldPreMountAudioTags:l,src:a,onDuration:u,acceptableTimeShiftInSeconds:c,_remotionInternalNeedsDurationCalculation:p,_remotionInternalNativeLoopPassed:h,_remotionInternalStack:s,_remotionDebugSeeking:y,allowAmplificationDuringRender:g,name:P,pauseWhenBuffering:w,showInTimeline:v,loopVolumeCurveBehavior:d,stack:x,...E}=e,[_]=Nr(),[T]=Dr(),I=Tt(d??"repeat"),{hidden:S}=f.useContext(rt);if(!a)throw new TypeError("No 'src' was passed to <Audio>.");const j=Be(a),C=f.useContext(ne),[F]=f.useState(()=>String(Math.random())),V=S[F]??!1,k=ot({frame:I,volume:n,mediaVolume:_,allowAmplificationDuringRender:!1}),N=f.useMemo(()=>({muted:i||T||V||k<=0,src:j,loop:h,...E}),[h,V,T,i,E,j,k]),R=f.useMemo(()=>`audio-${ge(a??"")}-${C==null?void 0:C.relativeFrom}-${C==null?void 0:C.cumulatedFrom}-${C==null?void 0:C.durationInFrames}-muted:${e.muted}-loop:${e.loop}`,[a,C==null?void 0:C.relativeFrom,C==null?void 0:C.cumulatedFrom,C==null?void 0:C.durationInFrames,e.muted,e.loop]),A=aa(N,R).el,te=uo(A);co({volumePropFrame:I,actualVolume:te,volume:n,mediaVolume:_,mediaRef:A}),to({volume:n,mediaVolume:_,mediaRef:A,src:a,mediaType:"audio",playbackRate:o??1,displayName:P??null,id:F,stack:s,showInTimeline:v,premountDisplay:null,onAutoPlayError:null}),so({mediaRef:A,src:a,mediaType:"audio",playbackRate:o??1,onlyWarnForMediaSeekingError:!1,acceptableTimeshift:c??Lr,isPremounting:!!(C!=null&&C.premounting),pauseWhenBuffering:w,debugSeeking:y,onAutoPlayError:null}),f.useImperativeHandle(t,()=>A.current,[A]);const W=f.useRef();return W.current=u,f.useEffect(()=>{var Y;const{current:H}=A;if(!H)return;if(H.duration){(Y=W.current)==null||Y.call(W,H.src,H.duration);return}const Z=()=>{var re;(re=W.current)==null||re.call(W,H.src,H.duration)};return H.addEventListener("loadedmetadata",Z),()=>{H.removeEventListener("loadedmetadata",Z)}},[A,a]),r?null:b.jsx("audio",{ref:A,preload:"metadata",...N})},ua=f.forwardRef(sa);typeof window<"u"&&(window.remotion_renderReady=!1);var kt=[];typeof window<"u"&&(window.remotion_delayRenderTimeouts={});var la="The delayRender was called:",ca="Retries left: ",da="- Rendering the frame will be retried.",ho=3e4,Re=(e,t)=>{var i;if(typeof e!="string"&&typeof e<"u")throw new Error("The label parameter of delayRender() must be a string or undefined, got: "+JSON.stringify(e));const r=Math.random();kt.push(r);const n=((i=Error().stack)==null?void 0:i.replace(/^Error/g,""))??"";if(K().isRendering){const o=((t==null?void 0:t.timeoutInMilliseconds)??(typeof window>"u"?ho:window.remotion_puppeteerTimeout??ho))-2e3;if(typeof window<"u"){const l=((t==null?void 0:t.retries)??0)-(window.remotion_attempt-1);window.remotion_delayRenderTimeouts[r]={label:e??null,timeout:setTimeout(()=>{const a=["A delayRender()",e?`"${e}"`:null,`was called but not cleared after ${o}ms. See https://remotion.dev/docs/timeout for help.`,l>0?ca+l:null,l>0?da:null,la,n].filter(wr).join(" ");Sr(Error(a))},o)}}}return typeof window<"u"&&(window.remotion_renderReady=!1),r},G=e=>{if(typeof e>"u")throw new TypeError("The continueRender() method must be called with a parameter that is the return value of delayRender(). No value was passed.");if(typeof e!="number")throw new TypeError("The parameter passed into continueRender() must be the return value of delayRender() which is a number. Got: "+JSON.stringify(e));kt=kt.filter(t=>t===e?(K().isRendering&&(clearTimeout(window.remotion_delayRenderTimeouts[e].timeout),delete window.remotion_delayRenderTimeouts[e]),!1):!0),kt.length===0&&typeof window<"u"&&(window.remotion_renderReady=!0)},fa=(e,t)=>{const r=f.useRef(null),{volume:n,playbackRate:i,allowAmplificationDuringRender:o,onDuration:l,toneFrequency:a,_remotionInternalNeedsDurationCalculation:u,_remotionInternalNativeLoopPassed:c,acceptableTimeShiftInSeconds:p,name:h,onError:s,delayRenderRetries:y,delayRenderTimeoutInMilliseconds:g,loopVolumeCurveBehavior:P,pauseWhenBuffering:w,...v}=e,d=Oe(),x=Tt(P??"repeat"),E=_e(),_=f.useContext(ne),{registerRenderAsset:T,unregisterRenderAsset:I}=f.useContext(De),S=f.useMemo(()=>`audio-${ge(e.src??"")}-${_==null?void 0:_.relativeFrom}-${_==null?void 0:_.cumulatedFrom}-${_==null?void 0:_.durationInFrames}`,[e.src,_==null?void 0:_.relativeFrom,_==null?void 0:_.cumulatedFrom,_==null?void 0:_.durationInFrames]),j=ot({volume:n,frame:x,mediaVolume:1,allowAmplificationDuringRender:o??!1});f.useImperativeHandle(t,()=>r.current,[]),f.useEffect(()=>{if(!e.src)throw new Error("No src passed");if(window.remotion_audioEnabled&&!e.muted&&!(j<=0))return T({type:"audio",src:$e(e.src),id:S,frame:d,volume:j,mediaFrame:E,playbackRate:e.playbackRate??1,allowAmplificationDuringRender:o??!1,toneFrequency:a??null,audioStartFrame:Math.max(0,-((_==null?void 0:_.relativeFrom)??0))}),()=>I(S)},[e.muted,e.src,T,d,S,I,j,x,E,i,e.playbackRate,o,a,_==null?void 0:_.relativeFrom]);const{src:C}=e,F=t||u;return f.useLayoutEffect(()=>{var R,A;if(((A=(R=window.process)==null?void 0:R.env)==null?void 0:A.NODE_ENV)==="test"||!F)return;const V=Re("Loading <Audio> duration with src="+C,{retries:y??void 0,timeoutInMilliseconds:g??void 0}),{current:k}=r,N=()=>{k!=null&&k.duration&&l(k.src,k.duration),G(V)};return k!=null&&k.duration?(l(k.src,k.duration),G(V)):k==null||k.addEventListener("loadedmetadata",N,{once:!0}),()=>{k==null||k.removeEventListener("loadedmetadata",N),G(V)}},[C,l,F,y,g]),F?b.jsx("audio",{ref:r,...v}):null},pa=f.forwardRef(fa),ha=(e,t)=>{const r=f.useContext(Ft),{startFrom:n,endAt:i,name:o,stack:l,pauseWhenBuffering:a,showInTimeline:u,_remotionDebugSeeking:c,...p}=e,{loop:h,...s}=e,{fps:y}=we(),g=K(),{durations:P,setDurations:w}=f.useContext(Ir);if(typeof e.src!="string")throw new TypeError(`The \`<Audio>\` tag requires a string for \`src\`, but got ${JSON.stringify(e.src)} instead.`);const v=Be(e.src),d=f.useCallback(_=>{console.log(_.currentTarget.error);const T=`Could not play audio with src ${v}: ${_.currentTarget.error}. See https://remotion.dev/docs/media-playback-error for help.`;h?Sr(new Error(T)):console.warn(T)},[h,v]),x=f.useCallback((_,T)=>{w({type:"got-duration",durationInSeconds:T,src:_})},[w]),E=P[$e(v)]??P[$e(e.src)];if(h&&E!==void 0){const _=E*y;return b.jsx($t,{layout:"none",durationInFrames:Hn({endAt:i,mediaDuration:_,playbackRate:e.playbackRate??1,startFrom:n}),children:b.jsx(Br,{...s,ref:t,_remotionInternalNativeLoopPassed:!0})})}if(typeof n<"u"||typeof i<"u"){Xn(n,i);const _=n??0,T=i??1/0;return b.jsx(me,{layout:"none",from:0-_,showInTimeline:!1,durationInFrames:T,name:o,children:b.jsx(Br,{_remotionInternalNeedsDurationCalculation:!!h,pauseWhenBuffering:a??!1,...p,ref:t})})}return Jn(e,"Audio"),g.isRendering?b.jsx(pa,{onDuration:x,...e,ref:t,onError:d,_remotionInternalNeedsDurationCalculation:!!h}):b.jsx(ua,{_remotionInternalNativeLoopPassed:e._remotionInternalNativeLoopPassed??!1,_remotionDebugSeeking:c??!1,_remotionInternalStack:l??null,shouldPreMountAudioTags:r!==null&&r.numberOfAudioTags>0,...e,ref:t,onError:d,onDuration:x,pauseWhenBuffering:a??!1,_remotionInternalNeedsDurationCalculation:!!h,showInTimeline:u??!0})},Br=f.forwardRef(ha);tt(Br),f.createContext({folderName:null,parentName:null});var ue=null,ya=()=>{if(!ue){if(typeof document>"u")throw new Error("Tried to call an API that only works in the browser from outside the browser");ue=document.createElement("div"),ue.style.position="absolute",ue.style.top="0px",ue.style.left="0px",ue.style.right="0px",ue.style.bottom="0px",ue.style.width="100%",ue.style.height="100%",ue.style.display="flex",ue.style.flexDirection="column";const e=document.createElement("div");e.style.position="fixed",e.style.top="-999999px",e.appendChild(ue),document.body.appendChild(e)}return ue},ma=e=>f.useMemo(()=>{if("lazyComponent"in e&&typeof e.lazyComponent<"u")return f.lazy(e.lazyComponent);if("component"in e)return typeof document>"u"?e.component:f.lazy(()=>Promise.resolve({default:e.component}));throw new Error("You must pass either 'component' or 'lazyComponent'")},[e.component,e.lazyComponent]),yo=()=>/^([a-zA-Z0-9-\u4E00-\u9FFF])+$/g,ga=e=>e.match(yo()),va=`Composition ID must match ${String(yo())}`,wa=({children:e})=>{const{clipRegion:t}=f.useContext(xt),r=f.useMemo(()=>({display:"flex",flexDirection:"row",opacity:t==="hide"?0:1,clipPath:t&&t!=="hide"?`polygon(${t.x}px ${t.y}px, ${t.x}px ${t.height+t.y}px, ${t.width+t.x}px ${t.height+t.y}px, ${t.width+t.x}px ${t.y}px)`:void 0}),[t]);return b.jsx(U,{style:r,children:e})},mo=f.createRef(),xa=({children:e,numberOfAudioTags:t})=>{const[r,n]=f.useState([]),i=f.useRef(r),[o,l]=f.useState([]),[a,u]=f.useState(null),[c,p]=f.useState(null),h=f.useCallback(x=>{n(E=>{const _=x(E);return i.current=_,_})},[]),s=f.useCallback(x=>{h(E=>{if(E.find(T=>T.id===x.id))throw new Error(`Multiple composition with id ${x.id} are registered.`);return[...E,x].slice().sort((T,I)=>T.nonce-I.nonce)})},[h]),y=f.useCallback(x=>{n(E=>E.filter(_=>_.id!==x))},[]),g=f.useCallback((x,E)=>{l(_=>[..._,{name:x,parent:E}])},[]),P=f.useCallback((x,E)=>{l(_=>_.filter(T=>!(T.name===x&&T.parent===E)))},[]);f.useImperativeHandle(mo,()=>({getCompositions:()=>i.current}),[]);const w=r.find(x=>(a==null?void 0:a.type)==="composition"?x.id===a.compositionId:null),v=f.useCallback((x,E)=>{n(_=>_.map(I=>I.id===x?{...I,defaultProps:E}:I))},[]),d=f.useMemo(()=>({compositions:r,registerComposition:s,unregisterComposition:y,folders:o,registerFolder:g,unregisterFolder:P,currentCompositionMetadata:c,setCurrentCompositionMetadata:p,canvasContent:a,setCanvasContent:u,updateCompositionDefaultProps:v}),[r,s,y,o,g,P,c,a,v]);return b.jsx(Ee.Provider,{value:d,children:b.jsx(yi,{children:b.jsx(Vi,{children:b.jsx(Dn,{children:b.jsx(po,{numberOfAudioTags:t,component:(w==null?void 0:w.component)??null,children:e})})})})})},ba=({onLoad:e,onError:t,delayRenderRetries:r,delayRenderTimeoutInMilliseconds:n,...i},o)=>{const[l]=f.useState(()=>Re(`Loading <IFrame> with source ${i.src}`,{retries:r??void 0,timeoutInMilliseconds:n??void 0})),a=f.useCallback(c=>{G(l),e==null||e(c)},[l,e]),u=f.useCallback(c=>{G(l),t?t(c):console.error("Error loading iframe:",c,"Handle the event using the onError() prop to make this message disappear.")},[l,t]);return b.jsx("iframe",{...i,ref:o,onError:u,onLoad:a})};f.forwardRef(ba);function _a(e){return 1e3*2**(e-1)}var Pa=({onError:e,maxRetries:t=2,src:r,pauseWhenLoading:n,delayRenderRetries:i,delayRenderTimeoutInMilliseconds:o,onImageFrame:l,...a},u)=>{const c=f.useRef(null),p=f.useRef({}),{delayPlayback:h}=Fr(),s=f.useContext(ne);if(!r)throw new Error('No "src" prop was passed to <Img>.');f.useImperativeHandle(u,()=>c.current,[]);const y=Be(r),g=f.useCallback(w=>{if(!c.current)return;const v=c.current.src;setTimeout(()=>{var x;if(!c.current)return;const d=(x=c.current)==null?void 0:x.src;d===v&&(c.current.removeAttribute("src"),c.current.setAttribute("src",d))},w)},[]),P=f.useCallback(w=>{var v,d,x,E,_,T,I;if(p.current){if(p.current[(v=c.current)==null?void 0:v.src]=(p.current[(d=c.current)==null?void 0:d.src]??0)+1,e&&(p.current[(x=c.current)==null?void 0:x.src]??0)>t){e(w);return}if((p.current[(E=c.current)==null?void 0:E.src]??0)<=t){const S=_a(p.current[(_=c.current)==null?void 0:_.src]??0);console.warn(`Could not load image with source ${(T=c.current)==null?void 0:T.src}, retrying again in ${S}ms`),g(S);return}Sr("Error loading image with src: "+((I=c.current)==null?void 0:I.src))}},[t,e,g]);if(typeof window<"u"){const w=!!(s!=null&&s.premounting);f.useLayoutEffect(()=>{var I,S;if(((S=(I=window.process)==null?void 0:I.env)==null?void 0:S.NODE_ENV)==="test"){c.current&&(c.current.src=y);return}const v=Re("Loading <Img> with src="+y,{retries:i??void 0,timeoutInMilliseconds:o??void 0}),d=n&&!w?h().unblock:()=>{},{current:x}=c;let E=!1;const _=()=>{var j,C,F;E||((p.current[(j=c.current)==null?void 0:j.src]??0)>0&&(delete p.current[(C=c.current)==null?void 0:C.src],console.info(`Retry successful - ${(F=c.current)==null?void 0:F.src} is now loaded`)),x&&(x.src=y,l==null||l(x)),d(),G(v))},T=new Image;return T.src=y,T.decode().then(_).catch(j=>{console.warn(j),T.complete?_():T.addEventListener("load",_)}),()=>{E=!0,T.removeEventListener("load",_),d(),G(v)}},[y,h,i,o,n,w,l])}return b.jsx("img",{...a,ref:c,onError:P})};f.forwardRef(Pa);var go={};gn(go,{makeDefaultPreviewCSS:()=>$a,injectCSS:()=>Ea,OFFTHREAD_VIDEO_CLASS_NAME:()=>zr});var vo={},Ea=e=>{if(typeof document>"u"||vo[e])return;const t=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.appendChild(document.createTextNode(e)),t.prepend(r),vo[e]=!0},zr="__remotion_offthreadvideo",$a=(e,t)=>e?`
34
+ ${e} * {
35
+ box-sizing: border-box;
36
+ }
37
+ ${e} *:-webkit-full-screen {
38
+ width: 100%;
39
+ height: 100%;
40
+ }
41
+ ${e} .${zr} {
42
+ object-fit: contain;
43
+ }
44
+ `:`
45
+ * {
46
+ box-sizing: border-box;
47
+ }
48
+ body {
49
+ margin: 0;
50
+ background-color: ${t};
51
+ }
52
+ .${zr} {
53
+ object-fit: contain;
54
+ }
55
+ `,wo="__remotion-studio-container",Ca=()=>document.getElementById(wo),Ta=null,Rr=[],Sa=()=>Ta,Ma=e=>(Rr.push(e),()=>{Rr=Rr.filter(t=>t!==e)}),Ia=({children:e,numberOfAudioTags:t})=>{const[r]=f.useState(()=>String(ge(null))),[n,i]=f.useState(()=>Rn()),[o,l]=f.useState(!1),a=f.useRef(!1),[u,c]=f.useState(0),[p,h]=f.useState(1),s=f.useRef([]);typeof window<"u"&&f.useLayoutEffect(()=>{window.remotion_setFrame=(w,v,d)=>{window.remotion_attempt=d;const x=Re(`Setting the current frame to ${w}`);let E=!0;i(_=>(_[v]??window.remotion_initialFrame)===w?(E=!1,_):{..._,[v]:w}),E?requestAnimationFrame(()=>G(x)):G(x)},window.remotion_isPlayer=!1},[]);const y=f.useMemo(()=>({frame:n,playing:o,imperativePlaying:a,rootId:r,playbackRate:p,setPlaybackRate:h,audioAndVideoTags:s}),[n,p,o,r]),g=f.useMemo(()=>({setFrame:i,setPlaying:l}),[]),P=f.useMemo(()=>{let w=0;return{getNonce:()=>w++,fastRefreshes:u}},[u]);return f.useEffect(()=>{typeof __webpack_module__<"u"&&__webpack_module__.hot&&__webpack_module__.hot.addStatusHandler(w=>{w==="idle"&&c(v=>v+1)})},[]),b.jsx(Le.Provider,{value:P,children:b.jsx(de.Provider,{value:y,children:b.jsx(Ve.Provider,{value:g,children:b.jsx(Sn,{children:b.jsx(Qn,{children:b.jsx(vn,{children:b.jsx(xa,{numberOfAudioTags:t,children:b.jsx(Kn,{children:b.jsx(ro,{children:e})})})})})})})})})},Fa=()=>{if(K().isRendering){const e=window.remotion_envVariables;return e?{...JSON.parse(e),NODE_ENV:"production"}:{}}return{NODE_ENV:"production"}},ka=()=>{const e=Fa();window.process||(window.process={}),window.process.env||(window.process.env={}),Object.keys(e).forEach(t=>{window.process.env[t]=e[t]})},ja=f.createContext(null),La=f.createContext({setSize:()=>{},size:{size:"auto",translation:{x:0,y:0}}}),Aa=({canvasSize:e,compositionHeight:t,compositionWidth:r,previewSize:n})=>{const i=e.height/t,o=e.width/r,l=Math.min(i,o);return n==="auto"?l:Number(n)},Va="remotion_staticFilesChanged";function Oa(){const e=f.useContext(Ee),t=f.useContext(de),r=f.useContext(Ve),n=f.useContext(ne),i=f.useContext(Le),o=f.useContext(Ne),l=f.useContext(xt),a=f.useContext(Ct),u=f.useContext(Et),c=f.useContext(De),p=f.useContext(je),h=f.useContext(ze);return f.useMemo(()=>({compositionManagerCtx:e,timelineContext:t,setTimelineContext:r,sequenceContext:n,nonceContext:i,canUseRemotionHooksContext:o,nativeLayersContext:l,preloadContext:a,resolveCompositionContext:u,renderAssetManagerContext:c,sequenceManagerContext:p,bufferManagerContext:h}),[e,i,n,r,t,o,l,a,u,c,p,h])}var Na=e=>{const{children:t,contexts:r}=e;return b.jsx(Ne.Provider,{value:r.canUseRemotionHooksContext,children:b.jsx(Le.Provider,{value:r.nonceContext,children:b.jsx(xt.Provider,{value:r.nativeLayersContext,children:b.jsx(Ct.Provider,{value:r.preloadContext,children:b.jsx(Ee.Provider,{value:r.compositionManagerCtx,children:b.jsx(je.Provider,{value:r.sequenceManagerContext,children:b.jsx(De.Provider,{value:r.renderAssetManagerContext,children:b.jsx(Et.Provider,{value:r.resolveCompositionContext,children:b.jsx(de.Provider,{value:r.timelineContext,children:b.jsx(Ve.Provider,{value:r.setTimelineContext,children:b.jsx(ne.Provider,{value:r.sequenceContext,children:b.jsx(ze.Provider,{value:r.bufferManagerContext,children:t})})})})})})})})})})})})},xo={useUnsafeVideoConfig:Tr,Timeline:Cn,CompositionManager:Ee,SequenceManager:je,SequenceVisibilityToggleContext:rt,RemotionRoot:Ia,useVideo:Er,getRoot:Sa,useMediaVolumeState:Nr,useMediaMutedState:Dr,useLazyComponent:ma,truthy:wr,SequenceContext:ne,useRemotionContexts:Oa,RemotionContextProvider:Na,CSSUtils:go,setupEnvVariables:ka,MediaVolumeContext:Vr,SetMediaVolumeContext:Or,getRemotionEnvironment:K,SharedAudioContext:Ft,SharedAudioContextProvider:po,invalidCompositionErrorMessage:va,isCompositionIdValid:ga,getPreviewDomElement:Ca,compositionsRef:mo,portalNode:ya,waitForRoot:Ma,CanUseRemotionHooksProvider:Ti,CanUseRemotionHooks:Ne,PrefetchProvider:Qn,DurationsContextProvider:Kn,IsPlayerContextProvider:fi,useIsPlayer:En,EditorPropsProvider:Sn,EditorPropsContext:_t,usePreload:Be,NonceContext:Le,resolveVideoConfig:Vn,useResolvedVideoConfig:Bn,resolveCompositionsRef:On,ResolveCompositionConfig:Dn,REMOTION_STUDIO_CONTAINER_ELEMENT:wo,RenderAssetManager:De,persistCurrentFrame:zn,useTimelineSetFrame:qn,NativeLayersProvider:vn,ClipComposition:wa,isIosSafari:It,WATCH_REMOTION_STATIC_FILES:Va,addSequenceStackTraces:tt,useMediaStartsAt:nt,BufferingProvider:ro,BufferingContextReact:ze,enableSequenceStackTraces:_n,CurrentScaleContext:ja,PreviewSizeContext:La,calculateScale:Aa,editorPropsProviderRef:Tn,PROPS_UPDATED_EXTERNALLY:Ci,validateRenderAsset:Un},bo=f.createContext(!1),Da=({children:e})=>b.jsx(bo.Provider,{value:!1,children:e}),Ba=()=>{if(!f.useContext(bo))throw new Error("This component must be inside a <Series /> component.")},za=({children:e},t)=>(Ba(),b.jsx(Da,{children:e})),Ra=f.forwardRef(za);tt(Ra);var Wa=({ref:e,onVideoFrame:t})=>{f.useEffect(()=>{const{current:r}=e;if(!r||!t)return;let n=0;const i=()=>{e.current&&(t(e.current),n=e.current.requestVideoFrameCallback(i))};return i(),()=>{r.cancelVideoFrameCallback(n)}},[t,e])},qa=(e,t)=>{const r=f.useRef(null),{volume:n,muted:i,playbackRate:o,onlyWarnForMediaSeekingError:l,src:a,onDuration:u,acceptableTimeShift:c,acceptableTimeShiftInSeconds:p,toneFrequency:h,name:s,_remotionInternalNativeLoopPassed:y,_remotionInternalStack:g,_remotionDebugSeeking:P,style:w,pauseWhenBuffering:v,showInTimeline:d,loopVolumeCurveBehavior:x,onError:E,onAutoPlayError:_,onVideoFrame:T,crossOrigin:I,...S}=e,j=Tt(x??"repeat"),{fps:C,durationInFrames:F}=we(),V=f.useContext(ne),{hidden:k}=f.useContext(rt),[N]=f.useState(()=>String(Math.random())),R=k[N]??!1;if(typeof c<"u")throw new Error("acceptableTimeShift has been removed. Use acceptableTimeShiftInSeconds instead.");const A=uo(r),[te]=Nr(),[W]=Dr();to({mediaRef:r,volume:n,mediaVolume:te,mediaType:"video",src:a,playbackRate:e.playbackRate??1,displayName:s??null,id:N,stack:g,showInTimeline:d,premountDisplay:null,onAutoPlayError:_??null}),co({volumePropFrame:j,actualVolume:A,volume:n,mediaVolume:te,mediaRef:r}),so({mediaRef:r,src:a,mediaType:"video",playbackRate:e.playbackRate??1,onlyWarnForMediaSeekingError:l,acceptableTimeshift:p??Lr,isPremounting:!!(V!=null&&V.premounting),pauseWhenBuffering:v,debugSeeking:P,onAutoPlayError:_??null});const H=V?V.relativeFrom:0,Z=V?Math.min(V.durationInFrames,F):F,Y=ta({actualSrc:Be(a),actualFrom:H,duration:Z,fps:C});f.useImperativeHandle(t,()=>r.current,[]),f.useEffect(()=>{const{current:z}=r;if(!z)return;const he=()=>{var be;if(z.error){if(console.error("Error occurred in video",z==null?void 0:z.error),E){const ye=new Error(`Code ${z.error.code}: ${z.error.message}`);E(ye);return}throw new Error(`The browser threw an error while playing the video ${a}: Code ${z.error.code} - ${(be=z==null?void 0:z.error)==null?void 0:be.message}. See https://remotion.dev/docs/media-playback-error for help. Pass an onError() prop to handle the error.`)}else{if(E){const ye=new Error(`The browser threw an error while playing the video ${a}`);E(ye);return}throw new Error("The browser threw an error while playing the video")}};return z.addEventListener("error",he,{once:!0}),()=>{z.removeEventListener("error",he)}},[E,a]);const re=f.useRef();re.current=u,Wa({ref:r,onVideoFrame:T}),f.useEffect(()=>{var be;const{current:z}=r;if(!z)return;if(z.duration){(be=re.current)==null||be.call(re,a,z.duration);return}const he=()=>{var ye;(ye=re.current)==null||ye.call(re,a,z.duration)};return z.addEventListener("loadedmetadata",he),()=>{z.removeEventListener("loadedmetadata",he)}},[a]),f.useEffect(()=>{const{current:z}=r;z&&(It()?z.preload="metadata":z.preload="auto")},[]);const Qe=f.useMemo(()=>({...w,opacity:R?0:(w==null?void 0:w.opacity)??1}),[R,w]),Je=I??(T?"anonymous":void 0);return b.jsx("video",{ref:r,muted:i||W,playsInline:!0,src:Y,loop:y,style:Qe,disableRemotePlayback:!0,crossOrigin:Je,...S})},Ua=f.forwardRef(qa),_o=e=>Math.round(e*1e5)/1e5,Wr=(e,t)=>{e.currentTime=t;let r,n=null;const i=new Promise(l=>{r=e.requestVideoFrameCallback((a,u)=>{const c=u.expectedDisplayTime-a;if(c<=0){l(u.mediaTime);return}setTimeout(()=>{l(u.mediaTime)},c+150)})}),o=new Promise(l=>{const a=()=>{l()};e.addEventListener("seeked",a,{once:!0}),n=()=>{e.removeEventListener("seeked",a)}});return{wait:Promise.all([i,o]).then(([l])=>l),cancel:()=>{n==null||n(),e.cancelVideoFrameCallback(r)}}},Ha=(e,t,r)=>{const n=1/r/2;let i=()=>{};return Number.isFinite(e.duration)&&e.currentTime>=e.duration&&t>=e.duration?{prom:Promise.resolve(),cancel:()=>{}}:{prom:new Promise((l,a)=>{const u=Wr(e,t+n);u.wait.then(c=>{if(Math.abs(t-c)<=n)return l();const h=t>c?1:-1,s=Wr(e,c+n*h);i=s.cancel,s.wait.then(y=>{const g=Math.abs(t-y);if(_o(g)<=_o(n))return l();const P=Wr(e,t+n);return i=P.cancel,P.wait.then(()=>{l()}).catch(w=>{a(w)})}).catch(y=>{a(y)})}),i=u.cancel}),cancel:()=>{i()}}},Ya=({onError:e,volume:t,allowAmplificationDuringRender:r,playbackRate:n,onDuration:i,toneFrequency:o,name:l,acceptableTimeShiftInSeconds:a,delayRenderRetries:u,delayRenderTimeoutInMilliseconds:c,loopVolumeCurveBehavior:p,...h},s)=>{const y=Oe(),g=_e(),P=Tt(p??"repeat"),w=Tr(),v=f.useRef(null),d=f.useContext(ne),x=nt(),E=K(),{registerRenderAsset:_,unregisterRenderAsset:T}=f.useContext(De),I=f.useMemo(()=>`video-${ge(h.src??"")}-${d==null?void 0:d.cumulatedFrom}-${d==null?void 0:d.relativeFrom}-${d==null?void 0:d.durationInFrames}`,[h.src,d==null?void 0:d.cumulatedFrom,d==null?void 0:d.relativeFrom,d==null?void 0:d.durationInFrames]);if(!w)throw new Error("No video config found");const S=ot({volume:t,frame:P,mediaVolume:1,allowAmplificationDuringRender:r??!1});f.useEffect(()=>{if(!h.src)throw new Error("No src passed");if(!h.muted&&!(S<=0)&&window.remotion_audioEnabled)return _({type:"video",src:$e(h.src),id:I,frame:y,volume:S,mediaFrame:g,playbackRate:n??1,allowAmplificationDuringRender:r??!1,toneFrequency:o??null,audioStartFrame:Math.max(0,-((d==null?void 0:d.relativeFrom)??0))}),()=>T(I)},[h.muted,h.src,_,I,T,S,g,y,n,r,o,d==null?void 0:d.relativeFrom]),f.useImperativeHandle(s,()=>v.current,[]),f.useEffect(()=>{var A,te;if(!window.remotion_videoEnabled)return;const{current:C}=v;if(!C)return;const F=oo({frame:g,playbackRate:n||1,startFrom:-x,fps:w.fps}),V=Re(`Rendering <Video /> with src="${h.src}"`,{retries:u??void 0,timeoutInMilliseconds:c??void 0});if(((te=(A=window.process)==null?void 0:A.env)==null?void 0:te.NODE_ENV)==="test"){G(V);return}if(lo(C.currentTime,F)){if(C.readyState>=2){G(V);return}const W=()=>{G(V)};return C.addEventListener("loadeddata",W,{once:!0}),()=>{C.removeEventListener("loadeddata",W)}}const k=()=>{G(V)},N=Ha(C,F,w.fps);N.prom.then(()=>{G(V)}),C.addEventListener("ended",k,{once:!0});const R=()=>{var W;if(C!=null&&C.error){if(console.error("Error occurred in video",C==null?void 0:C.error),e)return;throw new Error(`The browser threw an error while playing the video ${h.src}: Code ${C.error.code} - ${(W=C==null?void 0:C.error)==null?void 0:W.message}. See https://remotion.dev/docs/media-playback-error for help. Pass an onError() prop to handle the error.`)}else throw new Error("The browser threw an error")};return C.addEventListener("error",R,{once:!0}),()=>{N.cancel(),C.removeEventListener("ended",k),C.removeEventListener("error",R),G(V)}},[P,h.src,n,w.fps,g,x,e,u,c]);const{src:j}=h;return E.isRendering&&f.useLayoutEffect(()=>{var k,N;if(((N=(k=window.process)==null?void 0:k.env)==null?void 0:N.NODE_ENV)==="test")return;const C=Re("Loading <Video> duration with src="+j,{retries:u??void 0,timeoutInMilliseconds:c??void 0}),{current:F}=v,V=()=>{F!=null&&F.duration&&i(j,F.duration),G(C)};return F!=null&&F.duration?(i(j,F.duration),G(C)):F==null||F.addEventListener("loadedmetadata",V,{once:!0}),()=>{F==null||F.removeEventListener("loadedmetadata",V),G(C)}},[j,i,u,c]),b.jsx("video",{ref:v,...h})},Za=f.forwardRef(Ya),Qa=(e,t)=>{const{startFrom:r,endAt:n,name:i,pauseWhenBuffering:o,stack:l,_remotionInternalNativeLoopPassed:a,showInTimeline:u,onAutoPlayError:c,...p}=e,{loop:h,_remotionDebugSeeking:s,...y}=e,{fps:g}=we(),P=K(),{durations:w,setDurations:v}=f.useContext(Ir);if(typeof t=="string")throw new Error("string refs are not supported");if(typeof e.src!="string")throw new TypeError(`The \`<Video>\` tag requires a string for \`src\`, but got ${JSON.stringify(e.src)} instead.`);const d=Be(e.src),x=f.useCallback((T,I)=>{v({type:"got-duration",durationInSeconds:I,src:T})},[v]),E=f.useCallback(()=>{},[]),_=w[$e(d)]??w[$e(e.src)];if(h&&_!==void 0){const T=_*g;return b.jsx($t,{durationInFrames:Hn({endAt:n,mediaDuration:T,playbackRate:e.playbackRate??1,startFrom:r}),layout:"none",name:i,children:b.jsx(qr,{...y,ref:t,_remotionInternalNativeLoopPassed:!0})})}if(typeof r<"u"||typeof n<"u"){Xn(r,n);const T=r??0,I=n??1/0;return b.jsx(me,{layout:"none",from:0-T,showInTimeline:!1,durationInFrames:I,name:i,children:b.jsx(qr,{pauseWhenBuffering:o??!1,...p,ref:t})})}return Jn(e,"Video"),P.isRendering?b.jsx(Za,{onDuration:x,onVideoFrame:E??null,...p,ref:t}):b.jsx(Ua,{onlyWarnForMediaSeekingError:!1,...p,ref:t,onVideoFrame:null,pauseWhenBuffering:o??!1,onDuration:x,_remotionInternalStack:l??null,_remotionInternalNativeLoopPassed:a??!1,_remotionDebugSeeking:s??!1,showInTimeline:u??!0,onAutoPlayError:c??void 0})},qr=f.forwardRef(Qa);tt(qr),pi();var Ja={},Xa=new Proxy(Ja,{get(e,t){return t==="Bundling"||t==="Rendering"||t==="Log"||t==="Puppeteer"||t==="Output"?Xa:()=>{console.warn("⚠️ The CLI configuration has been extracted from Remotion Core."),console.warn("Update the import from the config file:"),console.warn(),console.warn("- Delete:"),console.warn('import {Config} from "remotion";'),console.warn("+ Replace:"),console.warn('import {Config} from "@remotion/cli/config";'),console.warn(),console.warn("For more information, see https://www.remotion.dev/docs/4-0-migration."),process.exit(1)}}});tt(me);function Ka(e,t,r,n){const{extrapolateLeft:i,extrapolateRight:o,easing:l}=n;let a=e;const[u,c]=t,[p,h]=r;if(a<u){if(i==="identity")return a;if(i==="clamp")a=u;else if(i==="wrap"){const s=c-u;a=((a-u)%s+s)%s+u}}if(a>c){if(o==="identity")return a;if(o==="clamp")a=c;else if(o==="wrap"){const s=c-u;a=((a-u)%s+s)%s+u}}return p===h?p:(a=(a-u)/(c-u),a=l(a),a=a*(h-p)+p,a)}function Ga(e,t){let r;for(r=1;r<t.length-1&&!(t[r]>=e);++r);return r-1}function es(e){for(let t=1;t<e.length;++t)if(!(e[t]>e[t-1]))throw new Error(`inputRange must be strictly monotonically increasing but got [${e.join(",")}]`)}function Po(e,t){if(t.length<2)throw new Error(e+" must have at least 2 elements");for(const r of t){if(typeof r!="number")throw new Error(`${e} must contain only numbers`);if(!Number.isFinite(r))throw new Error(`${e} must contain only finite numbers, but got [${t.join(",")}]`)}}function ts(e,t,r,n){if(typeof e>"u")throw new Error("input can not be undefined");if(typeof t>"u")throw new Error("inputRange can not be undefined");if(typeof r>"u")throw new Error("outputRange can not be undefined");if(t.length!==r.length)throw new Error("inputRange ("+t.length+") and outputRange ("+r.length+") must have the same length");Po("inputRange",t),Po("outputRange",r),es(t);const i=u=>u;let o="extend",l="extend";if(typeof e!="number")throw new TypeError("Cannot interpolate an input which is not a number");const a=Ga(e,t);return Ka(e,[t[a],t[a+1]],[r[a],r[a+1]],{easing:i,extrapolateLeft:o,extrapolateRight:l})}function rs(e){return!!e}typeof window<"u"&&(window.remotion_renderReady=!1),typeof window<"u"&&(window.remotion_delayRenderTimeouts={});var ns="The delayRender was called:",os="Retries left: ",is="- Rendering the frame will be retried.",as={"%3A":":","%2F":"/","%3F":"?","%23":"#","%5B":"[","%5D":"]","%40":"@","%21":"!","%24":"$","%26":"&","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";"},Eo={},ss=e=>{Eo[e]||(console.warn(e),Eo[e]=!0)},us=e=>{for(const t of Object.keys(as))if(e.includes(t))return{containsHex:!0,hexCode:t};return{containsHex:!1}},Ur=e=>e.startsWith("/")?Ur(e.substring(1)):e,ls=e=>{if(typeof window<"u"&&window.remotion_staticBase){if(e.startsWith(window.remotion_staticBase))throw new Error(`The value "${e}" is already prefixed with the static base ${window.remotion_staticBase}. You don't need to call staticFile() on it.`);return`${window.remotion_staticBase}/${Ur(e)}`}return`/${Ur(e)}`},cs=e=>e.split("/").map(i=>encodeURIComponent(i)).join("/"),ds=e=>{if(e.startsWith("http://")||e.startsWith("https://"))throw new TypeError(`staticFile() does not support remote URLs - got "${e}". Instead, pass the URL without wrapping it in staticFile(). See: https://remotion.dev/docs/staticfile-remote-urls`);if(e.startsWith("..")||e.startsWith("./"))throw new TypeError(`staticFile() does not support relative paths - got "${e}". Instead, pass the name of a file that is inside the public/ folder. See: https://remotion.dev/docs/staticfile-relative-paths`);if(e.startsWith("/Users")||e.startsWith("/home")||e.startsWith("/tmp")||e.startsWith("/etc")||e.startsWith("/opt")||e.startsWith("/var")||e.startsWith("C:")||e.startsWith("D:")||e.startsWith("E:"))throw new TypeError(`staticFile() does not support absolute paths - got "${e}". Instead, pass the name of a file that is inside the public/ folder. See: https://remotion.dev/docs/staticfile-relative-paths`);if(e.startsWith("public/"))throw new TypeError(`Do not include the public/ prefix when using staticFile() - got "${e}". See: https://remotion.dev/docs/staticfile-relative-paths`);const t=us(e);t.containsHex&&ss(`WARNING: You seem to pass an already encoded path (path contains ${t.hexCode}). Since Remotion 4.0, the encoding is done by staticFile() itself. You may want to remove a encodeURIComponent() wrapping.`);const r=cs(e),n=ls(r);return n.startsWith("/")?n:`/${n}`},jt="remotion-date:",Lt="remotion-file:",fs=({data:e,indent:t,staticBase:r})=>{let n=!1,i=!1,o=!1,l=!1;try{return{serializedString:JSON.stringify(e,function(u,c){const p=this[u];return p instanceof Date?(n=!0,`${jt}${p.toISOString()}`):p instanceof Map?(o=!0,c):p instanceof Set?(l=!0,c):typeof p=="string"&&r!==null&&p.startsWith(r)?(i=!0,`${Lt}${p.replace(r+"/","")}`):c},t),customDateUsed:n,customFileUsed:i,mapUsed:o,setUsed:l}}catch(a){throw new Error("Could not serialize the passed input props to JSON: "+a.message)}},ps=e=>JSON.parse(e,(t,r)=>typeof r=="string"&&r.startsWith(jt)?new Date(r.replace(jt,"")):typeof r=="string"&&r.startsWith(Lt)?ds(r.replace(Lt,"")):r);function At(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}function hs(){const e={rgb:void 0,rgba:void 0,hsl:void 0,hsla:void 0,hex3:void 0,hex4:void 0,hex5:void 0,hex6:void 0,hex8:void 0};return e.rgb===void 0&&(e.rgb=new RegExp("rgb"+At(fe,fe,fe)),e.rgba=new RegExp("rgba"+At(fe,fe,fe,fe)),e.hsl=new RegExp("hsl"+At(fe,Ot,Ot)),e.hsla=new RegExp("hsla"+At(fe,Ot,Ot,fe)),e.hex3=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,e.hex4=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,e.hex6=/^#([0-9a-fA-F]{6})$/,e.hex8=/^#([0-9a-fA-F]{8})$/),e}function Hr(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function $o(e,t,r){const n=r<.5?r*(1+t):r+t-r*t,i=2*r-n,o=Hr(i,n,e+1/3),l=Hr(i,n,e),a=Hr(i,n,e-1/3);return Math.round(o*255)<<24|Math.round(l*255)<<16|Math.round(a*255)<<8}function We(e){const t=Number.parseInt(e,10);return t<0?0:t>255?255:t}function Co(e){return(Number.parseFloat(e)%360+360)%360/360}function To(e){const t=Number.parseFloat(e);return t<0?0:t>1?255:Math.round(t*255)}function Vt(e){const t=Number.parseFloat(e);return t<0?0:t>100?1:t/100}function ys(e){const t=hs();let r;if(t.hex6&&(r=t.hex6.exec(e)))return Number.parseInt(r[1]+"ff",16)>>>0;if(Yr[e]!==void 0)return Yr[e];if(t.rgb&&(r=t.rgb.exec(e)))return(We(r[1])<<24|We(r[2])<<16|We(r[3])<<8|255)>>>0;if(t.rgba&&(r=t.rgba.exec(e)))return(We(r[1])<<24|We(r[2])<<16|We(r[3])<<8|To(r[4]))>>>0;if(t.hex3&&(r=t.hex3.exec(e)))return Number.parseInt(r[1]+r[1]+r[2]+r[2]+r[3]+r[3]+"ff",16)>>>0;if(t.hex8&&(r=t.hex8.exec(e)))return Number.parseInt(r[1],16)>>>0;if(t.hex4&&(r=t.hex4.exec(e)))return Number.parseInt(r[1]+r[1]+r[2]+r[2]+r[3]+r[3]+r[4]+r[4],16)>>>0;if(t.hsl&&(r=t.hsl.exec(e)))return($o(Co(r[1]),Vt(r[2]),Vt(r[3]))|255)>>>0;if(t.hsla&&(r=t.hsla.exec(e)))return($o(Co(r[1]),Vt(r[2]),Vt(r[3]))|To(r[4]))>>>0;throw new Error(`invalid color string ${e} provided`)}function ms(e){const t=ys(e);return(t<<24|t>>>8)>>>0}var fe="[-+]?\\d*\\.?\\d+",Ot=fe+"%",Yr={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199},gs=!1,vs=({allowFloats:e,durationInFrames:t,frame:r})=>{if(typeof r>"u")throw new TypeError('Argument missing for parameter "frame"');if(typeof r!="number")throw new TypeError(`Argument passed for "frame" is not a number: ${r}`);if(!Number.isFinite(r))throw new RangeError(`Frame ${r} is not finite`);if(r%1!==0&&!e)throw new RangeError(`Argument for frame must be an integer, but got ${r}`);if(r<0&&r<-t)throw new RangeError(`Cannot use frame ${r}: Duration of composition is ${t}, therefore the lowest frame that can be rendered is ${-t}`);if(r>t-1)throw new RangeError(`Cannot use frame ${r}: Duration of composition is ${t}, therefore the highest frame that can be rendered is ${t-1}`)},ws=(e,t,r)=>{if(e){if(typeof e!="object")throw new Error(`"${t}" must be an object, but you passed a value of type ${typeof e}`);if(Array.isArray(e))throw new Error(`"${t}" must be an object, an array was passed ${r?`for composition "${r}"`:""}`)}};function xs(e,t,r){if(typeof e!="number")throw new Error(`The "${t}" prop ${r} must be a number, but you passed a value of type ${typeof e}`);if(isNaN(e))throw new TypeError(`The "${t}" prop ${r} must not be NaN, but is NaN.`);if(!Number.isFinite(e))throw new TypeError(`The "${t}" prop ${r} must be finite, but is ${e}.`);if(e%1!==0)throw new TypeError(`The "${t}" prop ${r} must be an integer, but is ${e}.`);if(e<=0)throw new TypeError(`The "${t}" prop ${r} must be positive, but got ${e}.`)}function bs(e,t){const{allowFloats:r,component:n}=t;if(typeof e>"u")throw new Error(`The "durationInFrames" prop ${n} is missing.`);if(typeof e!="number")throw new Error(`The "durationInFrames" prop ${n} must be a number, but you passed a value of type ${typeof e}`);if(e<=0)throw new TypeError(`The "durationInFrames" prop ${n} must be positive, but got ${e}.`);if(!r&&e%1!==0)throw new TypeError(`The "durationInFrames" prop ${n} must be an integer, but got ${e}.`);if(!Number.isFinite(e))throw new TypeError(`The "durationInFrames" prop ${n} must be finite, but got ${e}.`)}function _s(e,t,r){if(typeof e!="number")throw new Error(`"fps" must be a number, but you passed a value of type ${typeof e} ${t}`);if(!Number.isFinite(e))throw new Error(`"fps" must be a finite, but you passed ${e} ${t}`);if(isNaN(e))throw new Error(`"fps" must not be NaN, but got ${e} ${t}`);if(e<=0)throw new TypeError(`"fps" must be positive, but got ${e} ${t}`);if(r&&e>50)throw new TypeError("The FPS for a GIF cannot be higher than 50. Use the --every-nth-frame option to lower the FPS: https://remotion.dev/docs/render-as-gif")}var Ps=({frame:e,playbackRate:t,startFrom:r})=>ts(e,[-1,r,r+1],[-1,r,r+t]),Es=e=>typeof window>"u"?e:new URL(e,window.origin).href,$s=({src:e,transparent:t,currentTime:r,toneMapped:n})=>`http://localhost:${window.remotion_proxyPort}/proxy?src=${encodeURIComponent(Es(e))}&time=${encodeURIComponent(r)}&transparent=${String(t)}&toneMapped=${String(n)}`,Cs={processColor:ms,truthy:rs,validateFps:_s,validateDimension:xs,validateDurationInFrames:bs,validateDefaultAndInputProps:ws,validateFrame:vs,serializeJSONWithDate:fs,bundleName:"bundle.js",bundleMapName:"bundle.js.map",deserializeJSONWithCustomFields:ps,DELAY_RENDER_CALLSTACK_TOKEN:ns,DELAY_RENDER_RETRY_TOKEN:is,DELAY_RENDER_ATTEMPT_TOKEN:os,getOffthreadVideoSource:$s,getExpectedMediaFrameUncorrected:Ps,ENABLE_V5_BREAKING_CHANGES:gs,MIN_NODE_VERSION:16,MIN_BUN_VERSION:"1.0.3",colorNames:Yr,DATE_TOKEN:jt,FILE_TOKEN:Lt},Ts=.01,Ss=({children:e,presentationProgress:t,presentationDirection:r,passedProps:{direction:n="from-left",enterStyle:i,exitStyle:o}})=>{const l=f.useMemo(()=>{const u=t===1?t*100:t*100-Ts;if(r==="exiting")switch(n){case"from-left":return{transform:`translateX(${u}%)`};case"from-right":return{transform:`translateX(${-t*100}%)`};case"from-top":return{transform:`translateY(${u}%)`};case"from-bottom":return{transform:`translateY(${-t*100}%)`};default:throw new Error(`Invalid direction: ${n}`)}switch(n){case"from-left":return{transform:`translateX(${-100+t*100}%)`};case"from-right":return{transform:`translateX(${100-u}%)`};case"from-top":return{transform:`translateY(${-100+t*100}%)`};case"from-bottom":return{transform:`translateY(${100-u}%)`};default:throw new Error(`Invalid direction: ${n}`)}},[r,t,n]),a=f.useMemo(()=>({width:"100%",height:"100%",justifyContent:"center",alignItems:"center",...l,...r==="entering"?i:o}),[l,i,o,r]);return b.jsx(U,{style:a,children:e})},Nt=e=>({component:Ss,props:{}}),Ms=e=>({getDurationInFrames:()=>e.durationInFrames,getProgress:({frame:t})=>Mt(t,[0,e.durationInFrames],[0,1],{easing:e.easing,extrapolateLeft:"clamp",extrapolateRight:"clamp"})}),Is=f.createContext(null),Fs=f.createContext(null),So=({presentationProgress:e,children:t})=>{const r=f.useMemo(()=>({enteringProgress:e}),[e]);return b.jsx(Is.Provider,{value:r,children:t})},Mo=({presentationProgress:e,children:t})=>{const r=f.useMemo(()=>({exitingProgress:e}),[e]);return b.jsx(Fs.Provider,{value:r,children:t})},Io=e=>f.Children.toArray(e).reduce((r,n)=>n.type===f.Fragment?r.concat(Io(n.props.children)):(r.push(n),r),[]),ks=Cs.validateDurationInFrames,it=function(e){return null},Zr=({children:e})=>b.jsx(b.Fragment,{children:e}),js=({children:e})=>{const{fps:t}=we(),r=_e(),n=f.useMemo(()=>{let i=0,o=0;const l=Io(e);return f.Children.map(l,(a,u)=>{const c=a;if(typeof c=="string"){if(c.trim()==="")return null;throw new TypeError(`The <TransitionSeries /> component only accepts a list of <TransitionSeries.Sequence /> components as its children, but you passed a string "${c}"`)}const p=l[u-1],h=l[u+1],s=typeof p=="string"||typeof p>"u"?null:p.type===it?p:null,y=typeof h=="string"||typeof h>"u"?null:h.type===it?h:null,g=typeof p=="string"||typeof p>"u"?!1:p.type===it;if(c.type===it){if(g)throw new TypeError(`A <TransitionSeries.Transition /> component must not be followed by another <TransitionSeries.Transition /> component (nth children = ${u-1} and ${u})`);return null}if(c.type!==Zr)throw new TypeError(`The <TransitionSeries /> component only accepts a list of <TransitionSeries.Sequence /> and <TransitionSeries.Transition /> components as its children, but got ${c} instead`);const P=c,w=`index = ${u}, duration = ${P.props.durationInFrames}`;if(!(P!=null&&P.props.children))throw new TypeError(`A <TransitionSeries.Sequence /> component (${w}) was detected to not have any children. Delete it to fix this error.`);const v=P.props.durationInFrames,{durationInFrames:d,children:x,...E}=P.props;ks(v,{component:"of a <TransitionSeries.Sequence /> component",allowFloats:!0});const _=P.props.offset??0;if(Number.isNaN(_))throw new TypeError(`The "offset" property of a <TransitionSeries.Sequence /> must not be NaN, but got NaN (${w}).`);if(!Number.isFinite(_))throw new TypeError(`The "offset" property of a <TransitionSeries.Sequence /> must be finite, but got ${_} (${w}).`);if(_%1!==0)throw new TypeError(`The "offset" property of a <TransitionSeries.Sequence /> must be finite, but got ${_} (${w}).`);const T=o+_;let I=0;s&&(I=s.props.timing.getDurationInFrames({fps:t}),i-=I);let S=T+i;o+=v+_,S<0&&(o-=S,S=0);const j=y?y.props.timing.getProgress({frame:r-S-d+y.props.timing.getDurationInFrames({fps:t}),fps:t}):null,C=s?s.props.timing.getProgress({frame:r-S,fps:t}):null;if(y&&v<y.props.timing.getDurationInFrames({fps:t}))throw new Error(`The duration of a <TransitionSeries.Sequence /> must not be shorter than the duration of the next <TransitionSeries.Transition />. The transition is ${y.props.timing.getDurationInFrames({fps:t})} frames long, but the sequence is only ${v} frames long (${w})`);if(s&&v<s.props.timing.getDurationInFrames({fps:t}))throw new Error(`The duration of a <TransitionSeries.Sequence /> must not be shorter than the duration of the previous <TransitionSeries.Transition />. The transition is ${s.props.timing.getDurationInFrames({fps:t})} frames long, but the sequence is only ${v} frames long (${w})`);if(y&&s&&j!==null&&C!==null){const F=y.props.presentation??Nt(),V=s.props.presentation??Nt(),k=F.component,N=V.component;return b.jsx(me,{from:Math.floor(S),durationInFrames:v,...E,name:E.name||"<TS.Sequence>",children:b.jsx(k,{passedProps:F.props??{},presentationDirection:"exiting",presentationProgress:j,presentationDurationInFrames:y.props.timing.getDurationInFrames({fps:t}),children:b.jsx(Mo,{presentationProgress:j,children:b.jsx(N,{passedProps:V.props??{},presentationDirection:"entering",presentationProgress:C,presentationDurationInFrames:s.props.timing.getDurationInFrames({fps:t}),children:b.jsx(So,{presentationProgress:C,children:a})})})})},u)}if(C!==null&&s){const F=s.props.presentation??Nt(),V=F.component;return b.jsx(me,{from:Math.floor(S),durationInFrames:v,...E,name:E.name||"<TS.Sequence>",children:b.jsx(V,{passedProps:F.props??{},presentationDirection:"entering",presentationProgress:C,presentationDurationInFrames:s.props.timing.getDurationInFrames({fps:t}),children:b.jsx(So,{presentationProgress:C,children:a})})},u)}if(j!==null&&y){const F=y.props.presentation??Nt(),V=F.component;return b.jsx(me,{from:Math.floor(S),durationInFrames:v,...E,name:E.name||"<TS.Sequence>",children:b.jsx(V,{passedProps:F.props??{},presentationDirection:"exiting",presentationProgress:j,presentationDurationInFrames:y.props.timing.getDurationInFrames({fps:t}),children:b.jsx(Mo,{presentationProgress:j,children:a})})},u)}return b.jsx(me,{from:Math.floor(S),durationInFrames:v,...E,name:E.name||"<TS.Sequence>",children:a},u)})},[e,t,r]);return b.jsx(b.Fragment,{children:n})},Qr=({children:e,name:t,layout:r,...n})=>{const i=t??"<TransitionSeries>",o=r??"absolute-fill";return b.jsx(me,{name:i,layout:o,...n,children:b.jsx(js,{children:e})})};Qr.Sequence=Zr,Qr.Transition=it,xo.addSequenceStackTraces(Qr),xo.addSequenceStackTraces(Zr);var Ls=({children:e,presentationDirection:t,presentationProgress:r,passedProps:n})=>{const i=t==="entering",o=f.useMemo(()=>({opacity:i?r:n.shouldFadeOutExitingScene?1-r:1,...t==="entering"?n.enterStyle:n.exitStyle}),[i,n.enterStyle,n.exitStyle,n.shouldFadeOutExitingScene,t,r]);return b.jsx(U,{style:o,children:e})},As=e=>({component:Ls,props:e??{}}),Vs=.01,Os=({children:e,presentationProgress:t,presentationDirection:r,passedProps:{direction:n="from-left",enterStyle:i,exitStyle:o}})=>{const l=f.useMemo(()=>{const u=t===1?t*100:t*100-Vs;if(r==="exiting")switch(n){case"from-left":return{transform:`translateX(${u}%)`};case"from-right":return{transform:`translateX(${-t*100}%)`};case"from-top":return{transform:`translateY(${u}%)`};case"from-bottom":return{transform:`translateY(${-t*100}%)`};default:throw new Error(`Invalid direction: ${n}`)}switch(n){case"from-left":return{transform:`translateX(${-100+t*100}%)`};case"from-right":return{transform:`translateX(${100-u}%)`};case"from-top":return{transform:`translateY(${-100+t*100}%)`};case"from-bottom":return{transform:`translateY(${100-u}%)`};default:throw new Error(`Invalid direction: ${n}`)}},[r,t,n]),a=f.useMemo(()=>({width:"100%",height:"100%",justifyContent:"center",alignItems:"center",...l,...r==="entering"?i:o}),[l,i,o,r]);return b.jsx(U,{style:a,children:e})},Ns=e=>({component:Os,props:e??{}}),Ds=(e,t)=>{switch(t){case"from-left":return`
56
+ M 0 0
57
+ L ${e} 0
58
+ L ${e} 1
59
+ L 0 1
60
+ Z`;case"from-top-left":return`
61
+ M 0 0
62
+ L ${e*2} 0
63
+ L 0 ${e*2}
64
+ Z`;case"from-top":return`
65
+ M 0 0
66
+ L 1 0
67
+ L 1 ${e}
68
+ L 0 ${e}
69
+ Z`;case"from-top-right":return`
70
+ M 1 0
71
+ L ${1-e*2} 0
72
+ L 1 ${e*2}
73
+ Z`;case"from-right":return`
74
+ M 1 0
75
+ L 1 1
76
+ L ${1-e} 1
77
+ L ${1-e} 0
78
+ Z`;case"from-bottom-right":return`
79
+ M 1 1
80
+ L ${1-e*2} 1
81
+ L 1 ${1-e*2}
82
+ Z`;case"from-bottom":return`
83
+ M 0 1
84
+ L 1 1
85
+ L 1 ${1-e}
86
+ L 0 ${1-e}
87
+ Z`;case"from-bottom-left":return`
88
+ M 0 1
89
+ L 0 ${1-e*2}
90
+ L ${e*2} 1
91
+ Z`;default:throw new Error(`Unknown direction ${JSON.stringify(t)}`)}},Bs=(e,t)=>{switch(t){case"from-left":return`
92
+ M 1 1
93
+ L ${1-e} 1
94
+ L ${1-e} 0
95
+ L 1 0
96
+ Z`;case"from-top-left":return`
97
+ M 1 1
98
+ L ${1-2*e} 1
99
+ L 1 ${1-2*e}
100
+ Z`;case"from-top":return`
101
+ M 1 1
102
+ L 0 1
103
+ L 0 ${1-e}
104
+ L 1 ${1-e}
105
+ Z`;case"from-top-right":return`
106
+ M 0 1
107
+ L ${e*2} 1
108
+ L 0 ${1-e*2}
109
+ Z`;case"from-right":return`
110
+ M 0 0
111
+ L ${e} 0
112
+ L ${e} 1
113
+ L 0 1
114
+ Z`;case"from-bottom-right":return`
115
+ M 0 0
116
+ L ${e*2} 0
117
+ L 0 ${e*2}
118
+ Z`;case"from-bottom":return`
119
+ M 1 0
120
+ L 0 0
121
+ L 0 ${e}
122
+ L 1 ${e}
123
+ Z`;case"from-bottom-left":return`
124
+ M 1 0
125
+ L ${1-e*2} 0
126
+ L 1 ${e*2}
127
+ Z`;default:throw new Error(`Unknown direction ${JSON.stringify(t)}`)}},zs=({children:e,presentationProgress:t,presentationDirection:r,passedProps:{direction:n="from-left",innerEnterStyle:i,innerExitStyle:o,outerEnterStyle:l,outerExitStyle:a}})=>{const[u]=f.useState(()=>String(ge(null))),c=r==="entering"?t:1-t,p=r==="entering"?Ds(c,n):Bs(c,n),h=f.useMemo(()=>({width:"100%",height:"100%",justifyContent:"center",alignItems:"center",clipPath:`url(#${u})`,...r==="entering"?i:o}),[u,i,o,r]),s=f.useMemo(()=>r==="entering"?l:a,[l,a,r]),y=f.useMemo(()=>({width:"100%",height:"100%",pointerEvents:"none"}),[]);return b.jsxs(U,{style:s,children:[b.jsx(U,{style:h,children:e}),b.jsx(U,{children:b.jsx("svg",{viewBox:"0 0 1 1",style:y,children:b.jsx("defs",{children:b.jsx("clipPath",{id:u,clipPathUnits:"objectBoundingBox",children:b.jsx("path",{d:p,fill:"black"})})})})})]})},Rs=e=>({component:zs,props:e??{}}),Ws=({children:e,presentationDirection:t,presentationProgress:r,passedProps:{direction:n="from-left",perspective:i=1e3,innerEnterStyle:o,innerExitStyle:l,outerEnterStyle:a,outerExitStyle:u}})=>{const c=f.useMemo(()=>{const y=t==="entering"?Mt(r,[0,1],[n==="from-right"||n==="from-top"?180:-180,0]):Mt(r,[0,1],[0,n==="from-right"||n==="from-top"?-180:180]);return{width:"100%",height:"100%",transform:`${n==="from-top"||n==="from-bottom"?"rotateX":"rotateY"}(${y}deg)`,backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",...t==="entering"?o:l}},[n,o,l,t,r]),p=f.useMemo(()=>({perspective:i,transformStyle:"preserve-3d",...t==="entering"?a:u}),[a,u,i,t]);return b.jsx(U,{style:p,children:b.jsx(U,{style:c,children:e})})},qs=e=>({component:Ws,props:e??{}}),pe={},Dt={},at={};Object.defineProperty(at,"__esModule",{value:!0}),at.cutInstruction=void 0,at.cutCInstruction=Fo;const Us=({instruction:e,lastPoint:t,progress:r})=>{const n=t.x+(e.x-t.x)*r,i=t.y+(e.y-t.y)*r;return{type:"L",x:n,y:i}};function qe(e,t,r){return{x:e.x+(t.x-e.x)*r,y:e.y+(t.y-e.y)*r}}function Fo({progress:e,lastPoint:t,instruction:r}){const n=e,i={x:t.x,y:t.y},o={x:r.cp1x,y:r.cp1y},l={x:r.cp2x,y:r.cp2y},a={x:r.x,y:r.y},u=qe(i,o,n),c=qe(o,l,n),p=qe(l,a,n),h=qe(u,c,n),s=qe(c,p,n),y=qe(h,s,n);return{type:"C",cp1x:u.x,cp1y:u.y,cp2x:h.x,cp2y:h.y,x:y.x,y:y.y}}const Hs=({instruction:e,lastPoint:t,progress:r})=>{if(e.type==="M")return e;if(e.type==="L")return Us({instruction:e,lastPoint:t,progress:r});if(e.type==="C")return Fo({instruction:e,lastPoint:t,progress:r});if(e.type==="Z")return e;throw new TypeError(`${e.type} is not supported.`)};at.cutInstruction=Hs;var Bt={},Ce={},ko={},Pe={};Object.defineProperty(Pe,"__esModule",{value:!0}),Pe.binomialCoefficients=Pe.cValues=Pe.tValues=void 0,Pe.tValues=[[],[],[-.5773502691896257,.5773502691896257],[0,-.7745966692414834,.7745966692414834],[-.33998104358485626,.33998104358485626,-.8611363115940526,.8611363115940526],[0,-.5384693101056831,.5384693101056831,-.906179845938664,.906179845938664],[.6612093864662645,-.6612093864662645,-.2386191860831969,.2386191860831969,-.932469514203152,.932469514203152],[0,.4058451513773972,-.4058451513773972,-.7415311855993945,.7415311855993945,-.9491079123427585,.9491079123427585],[-.1834346424956498,.1834346424956498,-.525532409916329,.525532409916329,-.7966664774136267,.7966664774136267,-.9602898564975363,.9602898564975363],[0,-.8360311073266358,.8360311073266358,-.9681602395076261,.9681602395076261,-.3242534234038089,.3242534234038089,-.6133714327005904,.6133714327005904],[-.14887433898163122,.14887433898163122,-.4333953941292472,.4333953941292472,-.6794095682990244,.6794095682990244,-.8650633666889845,.8650633666889845,-.9739065285171717,.9739065285171717],[0,-.26954315595234496,.26954315595234496,-.5190961292068118,.5190961292068118,-.7301520055740494,.7301520055740494,-.8870625997680953,.8870625997680953,-.978228658146057,.978228658146057],[-.1252334085114689,.1252334085114689,-.3678314989981802,.3678314989981802,-.5873179542866175,.5873179542866175,-.7699026741943047,.7699026741943047,-.9041172563704749,.9041172563704749,-.9815606342467192,.9815606342467192],[0,-.2304583159551348,.2304583159551348,-.44849275103644687,.44849275103644687,-.6423493394403402,.6423493394403402,-.8015780907333099,.8015780907333099,-.9175983992229779,.9175983992229779,-.9841830547185881,.9841830547185881],[-.10805494870734367,.10805494870734367,-.31911236892788974,.31911236892788974,-.5152486363581541,.5152486363581541,-.6872929048116855,.6872929048116855,-.827201315069765,.827201315069765,-.9284348836635735,.9284348836635735,-.9862838086968123,.9862838086968123],[0,-.20119409399743451,.20119409399743451,-.3941513470775634,.3941513470775634,-.5709721726085388,.5709721726085388,-.7244177313601701,.7244177313601701,-.8482065834104272,.8482065834104272,-.937273392400706,.937273392400706,-.9879925180204854,.9879925180204854],[-.09501250983763744,.09501250983763744,-.2816035507792589,.2816035507792589,-.45801677765722737,.45801677765722737,-.6178762444026438,.6178762444026438,-.755404408355003,.755404408355003,-.8656312023878318,.8656312023878318,-.9445750230732326,.9445750230732326,-.9894009349916499,.9894009349916499],[0,-.17848418149584785,.17848418149584785,-.3512317634538763,.3512317634538763,-.5126905370864769,.5126905370864769,-.6576711592166907,.6576711592166907,-.7815140038968014,.7815140038968014,-.8802391537269859,.8802391537269859,-.9506755217687678,.9506755217687678,-.9905754753144174,.9905754753144174],[-.0847750130417353,.0847750130417353,-.2518862256915055,.2518862256915055,-.41175116146284263,.41175116146284263,-.5597708310739475,.5597708310739475,-.6916870430603532,.6916870430603532,-.8037049589725231,.8037049589725231,-.8926024664975557,.8926024664975557,-.9558239495713977,.9558239495713977,-.9915651684209309,.9915651684209309],[0,-.16035864564022537,.16035864564022537,-.31656409996362983,.31656409996362983,-.46457074137596094,.46457074137596094,-.600545304661681,.600545304661681,-.7209661773352294,.7209661773352294,-.8227146565371428,.8227146565371428,-.9031559036148179,.9031559036148179,-.96020815213483,.96020815213483,-.9924068438435844,.9924068438435844],[-.07652652113349734,.07652652113349734,-.22778585114164507,.22778585114164507,-.37370608871541955,.37370608871541955,-.5108670019508271,.5108670019508271,-.636053680726515,.636053680726515,-.7463319064601508,.7463319064601508,-.8391169718222188,.8391169718222188,-.912234428251326,.912234428251326,-.9639719272779138,.9639719272779138,-.9931285991850949,.9931285991850949],[0,-.1455618541608951,.1455618541608951,-.2880213168024011,.2880213168024011,-.4243421202074388,.4243421202074388,-.5516188358872198,.5516188358872198,-.6671388041974123,.6671388041974123,-.7684399634756779,.7684399634756779,-.8533633645833173,.8533633645833173,-.9200993341504008,.9200993341504008,-.9672268385663063,.9672268385663063,-.9937521706203895,.9937521706203895],[-.06973927331972223,.06973927331972223,-.20786042668822127,.20786042668822127,-.34193582089208424,.34193582089208424,-.469355837986757,.469355837986757,-.5876404035069116,.5876404035069116,-.6944872631866827,.6944872631866827,-.7878168059792081,.7878168059792081,-.8658125777203002,.8658125777203002,-.926956772187174,.926956772187174,-.9700604978354287,.9700604978354287,-.9942945854823992,.9942945854823992],[0,-.1332568242984661,.1332568242984661,-.26413568097034495,.26413568097034495,-.3903010380302908,.3903010380302908,-.5095014778460075,.5095014778460075,-.6196098757636461,.6196098757636461,-.7186613631319502,.7186613631319502,-.8048884016188399,.8048884016188399,-.8767523582704416,.8767523582704416,-.9329710868260161,.9329710868260161,-.9725424712181152,.9725424712181152,-.9947693349975522,.9947693349975522],[-.06405689286260563,.06405689286260563,-.1911188674736163,.1911188674736163,-.3150426796961634,.3150426796961634,-.4337935076260451,.4337935076260451,-.5454214713888396,.5454214713888396,-.6480936519369755,.6480936519369755,-.7401241915785544,.7401241915785544,-.820001985973903,.820001985973903,-.8864155270044011,.8864155270044011,-.9382745520027328,.9382745520027328,-.9747285559713095,.9747285559713095,-.9951872199970213,.9951872199970213]],Pe.cValues=[[],[],[1,1],[.8888888888888888,.5555555555555556,.5555555555555556],[.6521451548625461,.6521451548625461,.34785484513745385,.34785484513745385],[.5688888888888889,.47862867049936647,.47862867049936647,.23692688505618908,.23692688505618908],[.3607615730481386,.3607615730481386,.46791393457269104,.46791393457269104,.17132449237917036,.17132449237917036],[.4179591836734694,.3818300505051189,.3818300505051189,.27970539148927664,.27970539148927664,.1294849661688697,.1294849661688697],[.362683783378362,.362683783378362,.31370664587788727,.31370664587788727,.22238103445337448,.22238103445337448,.10122853629037626,.10122853629037626],[.3302393550012598,.1806481606948574,.1806481606948574,.08127438836157441,.08127438836157441,.31234707704000286,.31234707704000286,.26061069640293544,.26061069640293544],[.29552422471475287,.29552422471475287,.26926671930999635,.26926671930999635,.21908636251598204,.21908636251598204,.1494513491505806,.1494513491505806,.06667134430868814,.06667134430868814],[.2729250867779006,.26280454451024665,.26280454451024665,.23319376459199048,.23319376459199048,.18629021092773426,.18629021092773426,.1255803694649046,.1255803694649046,.05566856711617366,.05566856711617366],[.24914704581340277,.24914704581340277,.2334925365383548,.2334925365383548,.20316742672306592,.20316742672306592,.16007832854334622,.16007832854334622,.10693932599531843,.10693932599531843,.04717533638651183,.04717533638651183],[.2325515532308739,.22628318026289723,.22628318026289723,.2078160475368885,.2078160475368885,.17814598076194574,.17814598076194574,.13887351021978725,.13887351021978725,.09212149983772845,.09212149983772845,.04048400476531588,.04048400476531588],[.2152638534631578,.2152638534631578,.2051984637212956,.2051984637212956,.18553839747793782,.18553839747793782,.15720316715819355,.15720316715819355,.12151857068790319,.12151857068790319,.08015808715976021,.08015808715976021,.03511946033175186,.03511946033175186],[.2025782419255613,.19843148532711158,.19843148532711158,.1861610000155622,.1861610000155622,.16626920581699392,.16626920581699392,.13957067792615432,.13957067792615432,.10715922046717194,.10715922046717194,.07036604748810812,.07036604748810812,.03075324199611727,.03075324199611727],[.1894506104550685,.1894506104550685,.18260341504492358,.18260341504492358,.16915651939500254,.16915651939500254,.14959598881657674,.14959598881657674,.12462897125553388,.12462897125553388,.09515851168249279,.09515851168249279,.062253523938647894,.062253523938647894,.027152459411754096,.027152459411754096],[.17944647035620653,.17656270536699264,.17656270536699264,.16800410215645004,.16800410215645004,.15404576107681028,.15404576107681028,.13513636846852548,.13513636846852548,.11188384719340397,.11188384719340397,.08503614831717918,.08503614831717918,.0554595293739872,.0554595293739872,.02414830286854793,.02414830286854793],[.1691423829631436,.1691423829631436,.16427648374583273,.16427648374583273,.15468467512626524,.15468467512626524,.14064291467065065,.14064291467065065,.12255520671147846,.12255520671147846,.10094204410628717,.10094204410628717,.07642573025488905,.07642573025488905,.0497145488949698,.0497145488949698,.02161601352648331,.02161601352648331],[.1610544498487837,.15896884339395434,.15896884339395434,.15276604206585967,.15276604206585967,.1426067021736066,.1426067021736066,.12875396253933621,.12875396253933621,.11156664554733399,.11156664554733399,.09149002162245,.09149002162245,.06904454273764123,.06904454273764123,.0448142267656996,.0448142267656996,.019461788229726478,.019461788229726478],[.15275338713072584,.15275338713072584,.14917298647260374,.14917298647260374,.14209610931838204,.14209610931838204,.13168863844917664,.13168863844917664,.11819453196151841,.11819453196151841,.10193011981724044,.10193011981724044,.08327674157670475,.08327674157670475,.06267204833410907,.06267204833410907,.04060142980038694,.04060142980038694,.017614007139152118,.017614007139152118],[.14608113364969041,.14452440398997005,.14452440398997005,.13988739479107315,.13988739479107315,.13226893863333747,.13226893863333747,.12183141605372853,.12183141605372853,.10879729916714838,.10879729916714838,.09344442345603386,.09344442345603386,.0761001136283793,.0761001136283793,.057134425426857205,.057134425426857205,.036953789770852494,.036953789770852494,.016017228257774335,.016017228257774335],[.13925187285563198,.13925187285563198,.13654149834601517,.13654149834601517,.13117350478706238,.13117350478706238,.12325237681051242,.12325237681051242,.11293229608053922,.11293229608053922,.10041414444288096,.10041414444288096,.08594160621706773,.08594160621706773,.06979646842452049,.06979646842452049,.052293335152683286,.052293335152683286,.03377490158481415,.03377490158481415,.0146279952982722,.0146279952982722],[.13365457218610619,.1324620394046966,.1324620394046966,.12890572218808216,.12890572218808216,.12304908430672953,.12304908430672953,.11499664022241136,.11499664022241136,.10489209146454141,.10489209146454141,.09291576606003515,.09291576606003515,.07928141177671895,.07928141177671895,.06423242140852585,.06423242140852585,.04803767173108467,.04803767173108467,.030988005856979445,.030988005856979445,.013411859487141771,.013411859487141771],[.12793819534675216,.12793819534675216,.1258374563468283,.1258374563468283,.12167047292780339,.12167047292780339,.1155056680537256,.1155056680537256,.10744427011596563,.10744427011596563,.09761865210411388,.09761865210411388,.08619016153195327,.08619016153195327,.0733464814110803,.0733464814110803,.05929858491543678,.05929858491543678,.04427743881741981,.04427743881741981,.028531388628933663,.028531388628933663,.0123412297999872,.0123412297999872]],Pe.binomialCoefficients=[[1],[1,1],[1,2,1],[1,3,3,1]],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.t2length=e.quadraticDerivative=e.getQuadraticArcLength=e.cubicDerivative=e.quadraticPoint=e.getCubicArcLength=e.cubicPoint=void 0;const t=Pe,r=(h,s,y)=>{const g=(1-y)*(1-y)*(1-y)*h[0]+3*(1-y)*(1-y)*y*h[1]+3*(1-y)*y*y*h[2]+y*y*y*h[3],P=(1-y)*(1-y)*(1-y)*s[0]+3*(1-y)*(1-y)*y*s[1]+3*(1-y)*y*y*s[2]+y*y*y*s[3];return{x:g,y:P}};e.cubicPoint=r;const n=(h,s,y)=>{const g=y.length-1;let P;if(g===0)return 0;if(h===0){P=0;for(let v=0;v<=g;v++)P+=t.binomialCoefficients[g][v]*(1-s)**(g-v)*s**v*y[v];return P}const w=new Array(g);for(let v=0;v<g;v++)w[v]=g*(y[v+1]-y[v]);return n(h-1,s,w)};function i(h,s,y){const g=n(1,y,h),P=n(1,y,s),w=g*g+P*P;return Math.sqrt(w)}const o=({sx:h,sy:s,t:y})=>{let g;const w=y/2;let v=0;for(let d=0;d<20;d++)g=w*t.tValues[20][d]+w,v+=t.cValues[20][d]*i(h,s,g);return w*v};e.getCubicArcLength=o;const l=(h,s,y)=>{const g=(1-y)*(1-y)*h[0]+2*(1-y)*y*h[1]+y*y*h[2],P=(1-y)*(1-y)*s[0]+2*(1-y)*y*s[1]+y*y*s[2];return{x:g,y:P}};e.quadraticPoint=l;const a=(h,s,y)=>(0,e.quadraticPoint)([3*(h[1]-h[0]),3*(h[2]-h[1]),3*(h[3]-h[2])],[3*(s[1]-s[0]),3*(s[2]-s[1]),3*(s[3]-s[2])],y);e.cubicDerivative=a;const u=(h,s,y)=>{y===void 0&&(y=1);const g=h[0]-2*h[1]+h[2],P=s[0]-2*s[1]+s[2],w=2*h[1]-2*h[0],v=2*s[1]-2*s[0],d=4*(g*g+P*P),x=4*(g*w+P*v),E=w*w+v*v;if(d===0)return y*Math.sqrt((h[2]-h[0])**2+(s[2]-s[0])**2);const _=x/(2*d),T=E/d,I=y+_,S=T-_*_,j=I*I+S>0?Math.sqrt(I*I+S):0,C=_*_+S>0?Math.sqrt(_*_+S):0,F=_+Math.sqrt(_*_+S)===0?0:S*Math.log(Math.abs((I+j)/(_+C)));return Math.sqrt(d)/2*(I*j-_*C+F)};e.getQuadraticArcLength=u;const c=(h,s,y)=>({x:(1-y)*2*(h[1]-h[0])+y*2*(h[2]-h[1]),y:(1-y)*2*(s[1]-s[0])+y*2*(s[2]-s[1])});e.quadraticDerivative=c;const p=({length:h,totalLength:s,func:y})=>{let g=1,P=h/s,w=(h-y(P))/s,v=0;for(;g>.001;){const d=y(P+w),x=Math.abs(h-d)/s;if(x<g)g=x,P+=w;else{const E=y(P-w),_=Math.abs(h-E)/s;_<g?(g=_,P-=w):w/=2}if(v++,v>500)break}return P};e.t2length=p}(ko),Object.defineProperty(Ce,"__esModule",{value:!0}),Ce.makeCubic=Ce.makeQuadratic=void 0;const ae=ko,Ys=({startX:e,startY:t,cpx:r,cpy:n,x:i,y:o})=>{const l={x:e,y:t},a={x:r,y:n},u={x:i,y:o},c=(0,ae.getQuadraticArcLength)([l.x,a.x,u.x,0],[l.y,a.y,u.y,0],1);return{getPointAtLength:g=>{const P=[l.x,a.x,u.x,0],w=[l.y,a.y,u.y,0],v=(0,ae.t2length)({length:g,totalLength:c,func:d=>(0,ae.getQuadraticArcLength)(P,w,d)});return(0,ae.quadraticPoint)(P,w,v)},getTangentAtLength:g=>{const P=[l.x,a.x,u.x,0],w=[l.y,a.y,u.y,0],v=(0,ae.t2length)({length:g,totalLength:c,func:_=>(0,ae.getQuadraticArcLength)(P,w,_)}),d=(0,ae.quadraticDerivative)(P,w,v),x=Math.sqrt(d.x*d.x+d.y*d.y);let E;return x>0?E={x:d.x/x,y:d.y/x}:E={x:0,y:0},E},getTotalLength:()=>c,getC:()=>u,type:"quadratic-bezier",getD:()=>({x:0,y:0})}};Ce.makeQuadratic=Ys;const Zs=({startX:e,startY:t,cp1x:r,cp1y:n,cp2x:i,cp2y:o,x:l,y:a})=>{const u={x:e,y:t},c={x:r,y:n},p={x:i,y:o},h={x:l,y:a},s=(0,ae.getCubicArcLength)({sx:[u.x,c.x,p.x,h.x],sy:[u.y,c.y,p.y,h.y],t:1});return{getPointAtLength:d=>{const x=[u.x,c.x,p.x,h.x],E=[u.y,c.y,p.y,h.y],_=(0,ae.t2length)({length:d,totalLength:s,func:T=>(0,ae.getCubicArcLength)({sx:x,sy:E,t:T})});return(0,ae.cubicPoint)(x,E,_)},getTangentAtLength:d=>{const x=[u.x,c.x,p.x,h.x],E=[u.y,c.y,p.y,h.y],_=(0,ae.t2length)({length:d,totalLength:s,func:j=>(0,ae.getCubicArcLength)({sx:x,sy:E,t:j})}),T=(0,ae.cubicDerivative)(x,E,_),I=Math.sqrt(T.x*T.x+T.y*T.y);let S;return I>0?S={x:T.x/I,y:T.y/I}:S={x:0,y:0},S},getTotalLength:()=>s,getC:()=>p,getD:()=>h,type:"cubic-bezier"}};Ce.makeCubic=Zs;var st={};Object.defineProperty(st,"__esModule",{value:!0}),st.makeLinearPosition=void 0;const Qs=({x0:e,x1:t,y0:r,y1:n})=>({getTotalLength:()=>Math.sqrt((e-t)**2+(r-n)**2),getPointAtLength:i=>{let o=i/Math.sqrt((e-t)**2+(r-n)**2);o=Number.isNaN(o)?1:o;const l=(t-e)*o,a=(n-r)*o;return{x:e+l,y:r+a}},getTangentAtLength:()=>{const i=Math.sqrt((t-e)*(t-e)+(n-r)*(n-r));return{x:(t-e)/i,y:(n-r)/i}},type:"linear"});st.makeLinearPosition=Qs,Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.conductAnalysis=void 0;const Js=Ce,jo=st,Xs=e=>{let t={x:0,y:0},r={x:0,y:0};const n=[];for(let i=0;i<e.length;i++){const o=e[i];if(o.type==="M"&&(t={x:o.x,y:o.y},r={x:t.x,y:t.y},n.push({startPoint:{x:o.x,y:o.y},instructionsAndInfo:[{instruction:o,function:null,length:0,startPoint:t}]})),o.type==="L"){if(n.length>0){const l=Math.sqrt((t.x-o.x)**2+(t.y-o.y)**2);n[n.length-1].instructionsAndInfo.push({instruction:o,length:l,function:(0,jo.makeLinearPosition)({x0:t.x,x1:o.x,y0:t.y,y1:o.y}),startPoint:t})}t={x:o.x,y:o.y}}if(o.type==="Z"){if(n.length>0){const l=Math.sqrt((n[n.length-1].startPoint.x-t.x)**2+(n[n.length-1].startPoint.y-t.y)**2);n[n.length-1].instructionsAndInfo.push({instruction:o,function:(0,jo.makeLinearPosition)({x0:t.x,x1:r.x,y0:t.y,y1:r.y}),length:l,startPoint:{...t}})}t={x:r.x,y:r.y}}if(o.type==="C"){const l=(0,Js.makeCubic)({startX:t.x,startY:t.y,cp1x:o.cp1x,cp1y:o.cp1y,cp2x:o.cp2x,cp2y:o.cp2y,x:o.x,y:o.y}),a=l.getTotalLength();n.length>0&&n[n.length-1].instructionsAndInfo.push({instruction:o,length:a,function:l,startPoint:{...t}}),t={x:o.x,y:o.y}}}return n};Bt.conductAnalysis=Xs;var oe={};Object.defineProperty(oe,"__esModule",{value:!0}),oe.parsePath=void 0;const Lo={a:7,A:7,C:6,c:6,H:1,h:1,L:2,l:2,M:2,m:2,Q:4,q:4,S:4,s:4,T:2,t:2,V:1,v:1,Z:0,z:0},Ks=(e,t)=>{const r=[],n=Lo[t];if(e.length%n!==0)throw new Error(`Expected number of arguments of SVG instruction "${t} ${e.join(" ")}" to be a multiple of ${n}`);for(let i=0;i<e.length;i+=n)r.push(e.slice(i,i+n));return r},J=(e,t,r)=>Ks(e,t).map(n=>r(n)),Gs=/([astvzqmhlc])([^astvzqmhlc]*)/gi,eu=/-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/gi,tu=(e,t)=>{const r=e.match(eu);if(!r){if(t==="Z"||t==="z")return[];throw new Error(`Malformed path data: ${t} was expected to have numbers afterwards`)}const n=Lo[t];if(r.length%n!==0)throw new Error(`Malformed path data: ${t} was expected to have a multiple of ${n} numbers, but got "${t} ${r.join(" ")} instead"`);return r.map(Number)},ru=e=>{if(!e)throw new Error("No path provided");const t=e.match(Gs);if(!t)throw new Error(`No path elements found in string ${e}`);return t.map(r=>{const n=r.charAt(0),i=tu(r.substring(1),n);if(n==="M"&&i.length>2){const o=[];return o.push({type:n,x:i[0],y:i[1]}),o.push(...J(i.slice(2),"L",l=>({type:"L",x:l[0],y:l[1]}))),o}if(n==="m"&&i.length>2){const o=[];return o.push({type:n,dx:i[0],dy:i[1]}),o.push(...J(i.slice(2),"l",l=>({type:"l",dx:l[0],dy:l[1]}))),o}if(n==="Z"||n==="z")return[{type:"Z"}];if(n==="A")return J(i,n,o=>({type:n,rx:o[0],ry:o[1],xAxisRotation:o[2],largeArcFlag:o[3]===1,sweepFlag:o[4]===1,x:o[5],y:o[6]}));if(n==="a")return J(i,n,o=>({type:n,rx:o[0],ry:o[1],xAxisRotation:o[2],largeArcFlag:o[3]===1,sweepFlag:o[4]===1,dx:o[5],dy:o[6]}));if(n==="C")return J(i,n,o=>({type:n,cp1x:o[0],cp1y:o[1],cp2x:o[2],cp2y:o[3],x:o[4],y:o[5]}));if(n==="c")return J(i,n,o=>({type:n,cp1dx:o[0],cp1dy:o[1],cp2dx:o[2],cp2dy:o[3],dx:o[4],dy:o[5]}));if(n==="S")return J(i,n,o=>({type:n,cpx:o[0],cpy:o[1],x:o[2],y:o[3]}));if(n==="s")return J(i,n,o=>({type:n,cpdx:o[0],cpdy:o[1],dx:o[2],dy:o[3]}));if(n==="H")return J(i,n,o=>({type:n,x:o[0]}));if(n==="h")return J(i,n,o=>({type:n,dx:o[0]}));if(n==="V")return J(i,n,o=>({type:n,y:o[0]}));if(n==="v")return J(i,n,o=>({type:n,dy:o[0]}));if(n==="L")return J(i,n,o=>({type:n,x:o[0],y:o[1]}));if(n==="M")return J(i,n,o=>({type:n,x:o[0],y:o[1]}));if(n==="m")return J(i,n,o=>({type:n,dx:o[0],dy:o[1]}));if(n==="l")return J(i,n,o=>({type:n,dx:o[0],dy:o[1]}));if(n==="Q")return J(i,n,o=>({type:n,cpx:o[0],cpy:o[1],x:o[2],y:o[3]}));if(n==="q")return J(i,n,o=>({type:n,cpdx:o[0],cpdy:o[1],dx:o[2],dy:o[3]}));if(n==="T")return J(i,n,o=>({type:n,x:o[0],y:o[1]}));if(n==="t")return J(i,n,o=>({type:n,dx:o[0],dy:o[1]}));throw new Error(`Invalid path element ${r}`)},[]).flat(1)};oe.parsePath=ru;var xe={},ut={},Ue={};Object.defineProperty(Ue,"__esModule",{value:!0}),Ue.convertQToCInstruction=void 0;const nu=(e,t)=>{const r=t.x+.6666666666666666*(e.cpx-t.x),n=t.y+2/3*(e.cpy-t.y),i=e.x+2/3*(e.cpx-e.x),o=e.y+2/3*(e.cpy-e.y);return{type:"C",cp1x:r,cp1y:n,cp2x:i,cp2y:o,x:e.x,y:e.y}};Ue.convertQToCInstruction=nu;var zt={};Object.defineProperty(zt,"__esModule",{value:!0}),zt.iterateOverSegments=void 0;const ou=({segments:e,iterate:t})=>{let r=0,n=0,i=0,o=0,l=null,a=null;return e.map((c,p)=>{var h;const s=t({segment:c,x:r,y:n,prevSegment:(h=e[p-1])!==null&&h!==void 0?h:null,initialX:i,initialY:o,cpX:l,cpY:a});switch(c.type){case"M":i=c.x,o=c.y,r=c.x,n=c.y,l=null,a=null;break;case"Q":r=c.x,n=c.y,l=c.cpx,a=c.cpy;break;case"A":r=c.x,n=c.y,l=null,a=null;break;case"C":r=c.x,n=c.y,l=c.cp2x,a=c.cp2y;break;case"S":r=c.x,n=c.y,l=c.cpx,a=c.cpy;break;case"T":l!==null&&a!==null&&(l=r-(l-r),a=n-(a-n)),r=c.x,n=c.y;break;case"L":r=c.x,n=c.y,l=null,a=null;break;case"V":n=c.y,l=null,a=null;break;case"H":r=c.x,l=null,a=null;break;case"Z":r=i,n=o,l=null,a=null;break;default:throw new Error(`Unexpected instruction ${c.type}`)}return s}).flat(1)};zt.iterateOverSegments=ou,Object.defineProperty(ut,"__esModule",{value:!0}),ut.removeATSHVQInstructions=void 0;const Ao=Ue,iu=zt,lt=Math.PI*2;function au(e,t){const r=1.3333333333333333*Math.tan(t/4),n=Math.cos(e),i=Math.sin(e),o=Math.cos(e+t),l=Math.sin(e+t);return[n,i,n-i*r,i+n*r,o+l*r,l-o*r,o,l]}function Vo(e,t,r,n){const i=e*n-t*r<0?-1:1;let o=e*r+t*n;return o>1&&(o=1),o<-1&&(o=-1),i*Math.acos(o)}function su({x1:e,y1:t,x2:r,y2:n,largeArcFlag:i,sweepFlag:o,rx:l,ry:a,sin_phi:u,cos_phi:c}){const p=c*(e-r)/2+u*(t-n)/2,h=-u*(e-r)/2+c*(t-n)/2,s=l*l,y=a*a,g=p*p,P=h*h;let w=s*y-s*P-y*g;w<0&&(w=0),w/=s*P+y*g,w=Math.sqrt(w)*(i===o?-1:1);const v=w*l/a*h,d=w*-a/l*p,x=c*v-u*d+(e+r)/2,E=u*v+c*d+(t+n)/2,_=(p-v)/l,T=(h-d)/a,I=(-p-v)/l,S=(-h-d)/a,j=Vo(1,0,_,T);let C=Vo(_,T,I,S);return o===!1&&C>0&&(C-=lt),o===!0&&C<0&&(C+=lt),[x,E,j,C]}function uu({x1:e,y1:t,x2:r,y2:n,largeArcFlag:i,sweepFlag:o,rx:l,ry:a,phi:u}){const c=Math.sin(u*lt/360),p=Math.cos(u*lt/360),h=p*(e-r)/2+c*(t-n)/2,s=-c*(e-r)/2+p*(t-n)/2;if(h===0&&s===0)return[];if(l===0||a===0)return[];l=Math.abs(l),a=Math.abs(a);const y=h*h/(l*l)+s*s/(a*a);y>1&&(l*=Math.sqrt(y),a*=Math.sqrt(y));const g=su({x1:e,y1:t,x2:r,y2:n,largeArcFlag:i,sweepFlag:o,rx:l,ry:a,sin_phi:c,cos_phi:p}),P=[];let w=g[2],v=g[3];const d=Math.max(Math.ceil(Math.abs(v)/(lt/4)),1);v/=d;for(let x=0;x<d;x++)P.push(au(w,v)),w+=v;return P.map(x=>{for(let E=0;E<x.length;E+=2){let _=x[E+0],T=x[E+1];_*=l,T*=a;const I=p*_-c*T,S=c*_+p*T;x[E+0]=I+g[0],x[E+1]=S+g[1]}return x})}const lu=e=>(0,iu.iterateOverSegments)({segments:e,iterate:({segment:t,prevSegment:r,x:n,y:i,cpX:o,cpY:l})=>{if(t.type==="H")return[{type:"L",x:t.x,y:i}];if(t.type==="V")return[{type:"L",x:n,y:t.y}];if(t.type==="A"){const a=t.x,u=t.y,c=uu({x1:n,y1:i,x2:a,y2:u,largeArcFlag:t.largeArcFlag,sweepFlag:t.sweepFlag,rx:t.rx,ry:t.ry,phi:t.xAxisRotation});return c.length===0?[{type:"L",x:t.x,y:t.y}]:c.map(h=>({type:"C",cp1x:h[2],cp1y:h[3],cp2x:h[4],cp2y:h[5],x:h[6],y:h[7]}))}if(t.type==="T"){let a=0,u=0;r&&(r.type==="Q"||r.type==="T")?(a=o,u=l):(a=n,u=i);const c=a-n,p=u-i,h=n-c,s=i-p;return[(0,Ao.convertQToCInstruction)({type:"Q",cpx:h,cpy:s,x:t.x,y:t.y},{x:n,y:i})]}if(t.type==="S"){let a=0,u=0;r&&r.type==="C"?(a=r.cp2x,u=r.cp2y):r&&r.type==="S"?(a=r.cpx,u=r.cpy):(a=n,u=i);const c=a-n,p=u-i,h=n-c,s=i-p;return[{type:"C",cp1x:h,cp1y:s,cp2x:t.cpx,cp2y:t.cpy,x:t.x,y:t.y}]}return t.type==="Q"?[(0,Ao.convertQToCInstruction)(t,{x:n,y:i})]:[t]}});ut.removeATSHVQInstructions=lu;var He={},le={};Object.defineProperty(le,"__esModule",{value:!0}),le.serializeInstructions=void 0;const cu=e=>{if(e.type==="A")return`A ${e.rx} ${e.ry} ${e.xAxisRotation} ${Number(e.largeArcFlag)} ${Number(e.sweepFlag)} ${e.x} ${e.y}`;if(e.type==="a")return`a ${e.rx} ${e.ry} ${e.xAxisRotation} ${Number(e.largeArcFlag)} ${Number(e.sweepFlag)} ${e.dx} ${e.dy}`;if(e.type==="C")return`C ${e.cp1x} ${e.cp1y} ${e.cp2x} ${e.cp2y} ${e.x} ${e.y}`;if(e.type==="c")return`c ${e.cp1dx} ${e.cp1dy} ${e.cp2dx} ${e.cp2dy} ${e.dx} ${e.dy}`;if(e.type==="S")return`S ${e.cpx} ${e.cpy} ${e.x} ${e.y}`;if(e.type==="s")return`s ${e.cpdx} ${e.cpdy} ${e.dx} ${e.dy}`;if(e.type==="Q")return`Q ${e.cpx} ${e.cpy} ${e.x} ${e.y}`;if(e.type==="q")return`q ${e.cpdx} ${e.cpdy} ${e.dx} ${e.dy}`;if(e.type==="Z")return"Z";if(e.type==="H")return`H ${e.x}`;if(e.type==="h")return`h ${e.dx}`;if(e.type==="V")return`V ${e.y}`;if(e.type==="v")return`v ${e.dy}`;if(e.type==="L")return`L ${e.x} ${e.y}`;if(e.type==="l")return`l ${e.dx} ${e.dy}`;if(e.type==="M")return`M ${e.x} ${e.y}`;if(e.type==="m")return`m ${e.dx} ${e.dy}`;if(e.type==="T")return`T ${e.x} ${e.y}`;if(e.type==="t")return`t ${e.dx} ${e.dy}`;throw new Error(`Unknown instruction type: ${e.type}`)},du=e=>e.map(t=>cu(t)).join(" ");le.serializeInstructions=du,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.normalizePath=e.normalizeInstructions=void 0;const t=oe,r=le,n=o=>{const l=[];let a=0,u=0,c=0,p=0;for(let h=0;h<o.length;h++){const s=o[h];if(s.type==="M"?(c=s.x,p=s.y):s.type==="m"&&(c+=s.dx,p+=s.dy),s.type==="A"||s.type==="C"||s.type==="L"||s.type==="M"||s.type==="Q"||s.type==="S"||s.type==="T"){l.push(s),a=s.x,u=s.y;continue}if(s.type==="a"||s.type==="c"||s.type==="l"||s.type==="m"||s.type==="q"||s.type==="s"||s.type==="t"){const y=a,g=u;if(a+=s.dx,u+=s.dy,s.type==="a"){l.push({type:"A",largeArcFlag:s.largeArcFlag,rx:s.rx,ry:s.ry,sweepFlag:s.sweepFlag,xAxisRotation:s.xAxisRotation,x:a,y:u});continue}if(s.type==="c"){l.push({type:"C",cp1x:s.cp1dx+y,cp1y:s.cp1dy+g,cp2x:s.cp2dx+y,cp2y:s.cp2dy+g,x:a,y:u});continue}if(s.type==="l"){l.push({type:"L",x:a,y:u});continue}if(s.type==="m"){l.push({type:"M",x:a,y:u});continue}if(s.type==="q"){l.push({type:"Q",cpx:s.cpdx+y,cpy:s.cpdy+g,x:a,y:u});continue}if(s.type==="s"){l.push({type:"S",cpx:s.cpdx+y,cpy:s.cpdy+g,x:a,y:u});continue}if(s.type==="t"){l.push({type:"T",x:a,y:u});continue}}if(s.type==="H"){l.push(s),a=s.x;continue}if(s.type==="V"){l.push(s),u=s.y;continue}if(s.type==="Z"){l.push(s),a=c,u=p;continue}if(s.type==="h"){a+=s.dx,l.push({type:"H",x:a});continue}if(s.type==="v"){u+=s.dy,l.push({type:"V",y:u});continue}throw new Error("Unknown instruction type: "+s.type)}return l};e.normalizeInstructions=n;const i=o=>{const l=(0,t.parsePath)(o),a=(0,e.normalizeInstructions)(l);return(0,r.serializeInstructions)(a)};e.normalizePath=i}(He),Object.defineProperty(xe,"__esModule",{value:!0}),xe.reduceInstructions=void 0;const fu=ut,pu=He,hu=e=>{const t=(0,pu.normalizeInstructions)(e);return(0,fu.removeATSHVQInstructions)(t)};xe.reduceInstructions=hu,Object.defineProperty(Dt,"__esModule",{value:!0}),Dt.cutPath=void 0;const yu=at,mu=Bt,gu=oe,vu=xe,Jr=le,wu=(e,t)=>{const r=(0,gu.parsePath)(e),n=(0,vu.reduceInstructions)(r),i=(0,mu.conductAnalysis)(n),o=[];let l=0;for(const a of i)for(const u of a.instructionsAndInfo){if(l+u.length>t){const p=(t-l)/u.length,h=(0,yu.cutInstruction)({instruction:u.instruction,lastPoint:u.startPoint,progress:p});return o.push(h),(0,Jr.serializeInstructions)(o)}if(l+=u.length,o.push(u.instruction),l===t)return(0,Jr.serializeInstructions)(o)}return(0,Jr.serializeInstructions)(o)};Dt.cutPath=wu;var Rt={};Object.defineProperty(Rt,"__esModule",{value:!0}),Rt.debugPath=void 0;const xu=He,bu=oe,_u=le,Pu=e=>{const t=(0,xu.normalizeInstructions)((0,bu.parsePath)(e));return t.map((r,n)=>{if(r.type==="Z"||r.type==="H"||r.type==="V")return null;const i=[r.x-5,r.y-5],o=[r.x+5,r.y-5],l=[r.x-5,r.y+5],a=[r.x+5,r.y+5],u=[{type:"M",x:i[0],y:i[1]},{type:"L",x:o[0],y:o[1]},{type:"L",x:a[0],y:a[1]},{type:"L",x:l[0],y:l[1]},{type:"Z"}];return{d:(0,_u.serializeInstructions)(u),color:n===t.length-1?"red":r.type==="M"?"blue":"green"}}).filter(Boolean)};Rt.debugPath=Pu;var Ye={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getBoundingBox=e.getBoundingBoxFromInstructions=void 0;const t=ut,r=He,n=oe,i=1e-8;function o(c){const p=Math.min(c[0],c[2]),h=Math.max(c[0],c[2]);if(c[1]>c[0]?c[2]>=c[1]:c[2]<=c[1])return[p,h];const s=(c[0]*c[2]-c[1]*c[1])/(c[0]-2*c[1]+c[2]);return s<p?[s,h]:[p,s]}function l(c){const p=c[0]-3*c[1]+3*c[2]-c[3];if(Math.abs(p)<i)return c[0]===c[3]&&c[0]===c[1]?[c[0],c[3]]:o([c[0],-.5*c[0]+1.5*c[1],c[0]-3*c[1]+3*c[2]]);const h=-c[0]*c[2]+c[0]*c[3]-c[1]*c[2]-c[1]*c[3]+c[1]*c[1]+c[2]*c[2];if(h<=0)return[Math.min(c[0],c[3]),Math.max(c[0],c[3])];const s=Math.sqrt(h);let y=Math.min(c[0],c[3]),g=Math.max(c[0],c[3]);const P=c[0]-2*c[1]+c[2];for(let w=(P+s)/p,v=1;v<=2;w=(P-s)/p,v++)if(w>0&&w<1){const d=c[0]*(1-w)*(1-w)*(1-w)+c[1]*3*(1-w)*(1-w)*w+c[2]*3*(1-w)*w*w+c[3]*w*w*w;d<y&&(y=d),d>g&&(g=d)}return[y,g]}const a=c=>{let p=1/0,h=1/0,s=-1/0,y=-1/0,g=0,P=0,w=0,v=0;for(const d of c)switch(d.type){case"M":{w=d.x,v=d.y,p>d.x&&(p=d.x),h>d.y&&(h=d.y),s<d.x&&(s=d.x),y<d.y&&(y=d.y),g=d.x,P=d.y;break}case"L":{p>d.x&&(p=d.x),h>d.y&&(h=d.y),s<d.x&&(s=d.x),y<d.y&&(y=d.y),g=d.x,P=d.y;break}case"C":{const x=l([g,d.cp1x,d.cp2x,d.x]);p>x[0]&&(p=x[0]),s<x[1]&&(s=x[1]);const E=l([P,d.cp1y,d.cp2y,d.y]);h>E[0]&&(h=E[0]),y<E[1]&&(y=E[1]),g=d.x,P=d.y;break}case"Z":g=w,P=v;break;default:throw new Error(`Unknown instruction ${d.type}`)}return{x1:p,y1:h,x2:s,y2:y,viewBox:`${p} ${h} ${s-p} ${y-h}`,width:s-p,height:y-h}};e.getBoundingBoxFromInstructions=a;const u=c=>{const p=(0,n.parsePath)(c),h=(0,t.removeATSHVQInstructions)((0,r.normalizeInstructions)(p));return(0,e.getBoundingBoxFromInstructions)(h)};e.getBoundingBox=u})(Ye);var Wt={},ct={},Te={},qt={};Object.defineProperty(qt,"__esModule",{value:!0}),qt.makeArc=void 0;const Eu=(e,t)=>(e%t+t)%t,$u=e=>e*(Math.PI/180),Oo=(e,t)=>Math.sqrt((t.x-e.x)**2+(t.y-e.y)**2),Cu=(e,t,r)=>Math.min(Math.max(e,t),r),No=(e,t)=>{const r=e.x*t.x+e.y*t.y,n=Math.sqrt((e.x**2+e.y**2)*(t.x**2+t.y**2));return(e.x*t.y-e.y*t.x<0?-1:1)*Math.acos(r/n)},Do=({p0:e,rx:t,ry:r,xAxisRotation:n,largeArcFlag:i,sweepFlag:o,p1:l,t:a})=>{t=Math.abs(t),r=Math.abs(r),n=Eu(n,360);const u=$u(n);if(e.x===l.x&&e.y===l.y)return{x:e.x,y:e.y,ellipticalArcAngle:0};if(t===0||r===0)return{x:0,y:0,ellipticalArcAngle:0};const c=(e.x-l.x)/2,p=(e.y-l.y)/2,h={x:Math.cos(u)*c+Math.sin(u)*p,y:-Math.sin(u)*c+Math.cos(u)*p},s=h.x**2/t**2+h.y**2/r**2;s>1&&(t*=Math.sqrt(s),r*=Math.sqrt(s));const y=t**2*r**2-t**2*h.y**2-r**2*h.x**2,g=t**2*h.y**2+r**2*h.x**2;let P=y/g;P=P<0?0:P;const w=(i===o?-1:1)*Math.sqrt(P),v={x:w*(t*h.y/r),y:w*(-(r*h.x)/t)},d={x:Math.cos(u)*v.x-Math.sin(u)*v.y+(e.x+l.x)/2,y:Math.sin(u)*v.x+Math.cos(u)*v.y+(e.y+l.y)/2},x={x:(h.x-v.x)/t,y:(h.y-v.y)/r},E=No({x:1,y:0},x),_={x:(-h.x-v.x)/t,y:(-h.y-v.y)/r};let T=No(x,_);!o&&T>0?T-=2*Math.PI:o&&T<0&&(T+=2*Math.PI),T%=2*Math.PI;const I=E+T*a,S=t*Math.cos(I),j=r*Math.sin(I);return{x:Math.cos(u)*S-Math.sin(u)*j+d.x,y:Math.sin(u)*S+Math.cos(u)*j+d.y,ellipticalArcStartAngle:E,ellipticalArcEndAngle:E+T,ellipticalArcAngle:I,ellipticalArcCenter:d,resultantRx:t,resultantRy:r}},Tu=(e,t)=>{e=e||500;let r=0;const n=[],i=[];let o=t(0),l;for(let a=0;a<e;a++){const u=Cu(a*(1/e),0,1);l=t(u),r+=Oo(o,l),i.push([o,l]),n.push({t:u,arcLength:r}),o=l}return l=t(1),i.push([o,l]),r+=Oo(o,l),n.push({t:1,arcLength:r}),{arcLength:r,arcLengthMap:n,approximationLines:i}},Su=({x0:e,y0:t,rx:r,ry:n,xAxisRotate:i,LargeArcFlag:o,SweepFlag:l,x1:a,y1:u})=>{const p=Tu(300,s=>Do({p0:{x:e,y:t},rx:r,ry:n,xAxisRotation:i,largeArcFlag:o,sweepFlag:l,p1:{x:a,y:u},t:s})).arcLength,h=s=>{s<0?s=0:s>p&&(s=p);const y=Do({p0:{x:e,y:t},rx:r,ry:n,xAxisRotation:i,largeArcFlag:o,sweepFlag:l,p1:{x:a,y:u},t:s/p});return{x:y.x,y:y.y}};return{getPointAtLength:h,getTangentAtLength:s=>{s<0?s=0:s>p&&(s=p);const y=.05,g=h(s);let P;s<0?s=0:s>p&&(s=p),s<p-y?P=h(s+y):P=h(s-y);const w=P.x-g.x,v=P.y-g.y,d=Math.sqrt(w*w+v*v);return s<p-y?{x:-w/d,y:-v/d}:{x:w/d,y:v/d}},getTotalLength:()=>p,type:"arc"}};qt.makeArc=Su,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.construct=e.constructFromInstructions=void 0;const t=oe,r=qt,n=Ce,i=st,o=a=>{let u=0;const c=[],p=[];let h=null,s=[0,0],y=[0,0],g,P=[0,0];const w=[];for(let v=0;v<a.length;v++){const d=a[v];if(d.type!=="m"&&d.type!=="M"&&w.length>0&&w[w.length-1].push(d),d.type==="M"&&(s=[d.x,d.y],P=[s[0],s[1]],w.push([d]),p.push(null),v===0&&(h={x:d.x,y:d.y})),d.type==="m"&&(s=[d.dx+s[0],d.dy+s[1]],P=[s[0],s[1]],w.push([{type:"M",x:s[0],y:s[1]}]),p.push(null)),d.type==="L"&&(u+=Math.sqrt((s[0]-d.x)**2+(s[1]-d.y)**2),p.push((0,i.makeLinearPosition)({x0:s[0],x1:d.x,y0:s[1],y1:d.y})),s=[d.x,d.y]),d.type==="l"&&(u+=Math.sqrt(d.dx**2+d.dy**2),p.push((0,i.makeLinearPosition)({x0:s[0],x1:d.dx+s[0],y0:s[1],y1:d.dy+s[1]})),s=[d.dx+s[0],d.dy+s[1]]),d.type==="H"&&(u+=Math.abs(s[0]-d.x),p.push((0,i.makeLinearPosition)({x0:s[0],x1:d.x,y0:s[1],y1:s[1]})),s[0]=d.x),d.type==="h"?(u+=Math.abs(d.dx),p.push((0,i.makeLinearPosition)({x0:s[0],x1:s[0]+d.dx,y0:s[1],y1:s[1]})),s[0]=d.dx+s[0]):d.type==="V"&&(u+=Math.abs(s[1]-d.y),p.push((0,i.makeLinearPosition)({x0:s[0],x1:s[0],y0:s[1],y1:d.y})),s[1]=d.y),d.type==="v"?(u+=Math.abs(d.dy),p.push((0,i.makeLinearPosition)({x0:s[0],x1:s[0],y0:s[1],y1:s[1]+d.dy})),s[1]=d.dy+s[1]):d.type==="Z"&&(u+=Math.sqrt((P[0]-s[0])**2+(P[1]-s[1])**2),p.push((0,i.makeLinearPosition)({x0:s[0],x1:P[0],y0:s[1],y1:P[1]})),s=[P[0],P[1]]),d.type==="C"?(g=(0,n.makeCubic)({startX:s[0],startY:s[1],cp1x:d.cp1x,cp1y:d.cp1y,cp2x:d.cp2x,cp2y:d.cp2y,x:d.x,y:d.y}),u+=g.getTotalLength(),s=[d.x,d.y],p.push(g)):d.type==="c"&&(g=(0,n.makeCubic)({startX:s[0],startY:s[1],cp1x:s[0]+d.cp1dx,cp1y:s[1]+d.cp1dy,cp2x:s[0]+d.cp2dx,cp2y:s[1]+d.cp2dy,x:s[0]+d.dx,y:s[1]+d.dy}),g.getTotalLength()>0?(u+=g.getTotalLength(),p.push(g),s=[d.dx+s[0],d.dy+s[1]]):p.push((0,i.makeLinearPosition)({x0:s[0],x1:s[0],y0:s[1],y1:s[1]}))),d.type==="S"){const x=a[v-1],E=x.type==="C"||x.type==="c"||x.type==="S"||x.type==="s";if(v>0&&E){if(g){const _=g.getC();g=(0,n.makeCubic)({startX:s[0],startY:s[1],cp1x:2*s[0]-_.x,cp1y:2*s[1]-_.y,cp2x:d.cpx,cp2y:d.cpy,x:d.x,y:d.y})}}else g=(0,n.makeCubic)({startX:s[0],startY:s[1],cp1x:s[0],cp1y:s[1],cp2x:d.cpx,cp2y:d.cpy,x:d.x,y:d.y});g&&(u+=g.getTotalLength(),s=[d.x,d.y],p.push(g))}if(d.type==="s"){const x=a[v-1],E=x.type==="C"||x.type==="c"||x.type==="S"||x.type==="s";if(v>0&&E){if(g){const _=g.getC(),T=g.getD();g=(0,n.makeCubic)({startX:s[0],startY:s[1],cp1x:s[0]+T.x-_.x,cp1y:s[1]+T.y-_.y,cp2x:s[0]+d.cpdx,cp2y:s[1]+d.cpdy,x:s[0]+d.dx,y:s[1]+d.dy})}}else g=(0,n.makeCubic)({startX:s[0],startY:s[1],cp1x:s[0],cp1y:s[1],cp2x:s[0]+d.cpdx,cp2y:s[1]+d.cpdy,x:s[0]+d.dx,y:s[1]+d.dy});g&&(u+=g.getTotalLength(),s=[d.dx+s[0],d.dy+s[1]],p.push(g))}if(d.type==="Q"){if(s[0]===d.cpx&&s[1]===d.cpy){const x=(0,i.makeLinearPosition)({x0:d.cpx,x1:d.x,y0:d.cpy,y1:d.y});u+=x.getTotalLength(),p.push(x)}else g=(0,n.makeQuadratic)({startX:s[0],startY:s[1],cpx:d.cpx,cpy:d.cpy,x:d.x,y:d.y}),u+=g.getTotalLength(),p.push(g);s=[d.x,d.y],y=[d.cpx,d.cpy]}if(d.type==="q"){if(d.cpdx===0&&d.cpdy===0){const x=(0,i.makeLinearPosition)({x0:s[0]+d.cpdx,x1:s[0]+d.cpdy,y0:s[1]+d.dx,y1:s[1]+d.dy});u+=x.getTotalLength(),p.push(x)}else g=(0,n.makeQuadratic)({startX:s[0],startY:s[1],cpx:s[0]+d.cpdx,cpy:s[1]+d.cpdy,x:s[0]+d.dx,y:s[1]+d.dy}),u+=g.getTotalLength(),p.push(g);y=[s[0]+d.cpdx,s[1]+d.cpdy],s=[d.dx+s[0],d.dy+s[1]]}if(d.type==="T"){const x=a[v-1],E=x.type==="Q"||x.type==="q"||x.type==="T"||x.type==="t";if(v>0&&E)g=(0,n.makeQuadratic)({startX:s[0],startY:s[1],cpx:2*s[0]-y[0],cpy:2*s[1]-y[1],x:d.x,y:d.y}),p.push(g),u+=g.getTotalLength();else{const _=(0,i.makeLinearPosition)({x0:s[0],x1:d.x,y0:s[1],y1:d.y});p.push(_),u+=_.getTotalLength()}y=[2*s[0]-y[0],2*s[1]-y[1]],s=[d.x,d.y]}if(d.type==="t"){const x=a[v-1],E=x.type==="Q"||x.type==="q"||x.type==="T"||x.type==="t";if(v>0&&E)g=(0,n.makeQuadratic)({startX:s[0],startY:s[1],cpx:2*s[0]-y[0],cpy:2*s[1]-y[1],x:s[0]+d.dx,y:s[1]+d.dy}),u+=g.getTotalLength(),p.push(g);else{const _=(0,i.makeLinearPosition)({x0:s[0],x1:s[0]+d.dx,y0:s[1],y1:s[1]+d.dy});u+=_.getTotalLength(),p.push(_)}y=[2*s[0]-y[0],2*s[1]-y[1]],s=[d.dx+s[0],d.dy+s[1]]}if(d.type==="A"){const x=(0,r.makeArc)({x0:s[0],y0:s[1],rx:d.rx,ry:d.ry,xAxisRotate:d.xAxisRotation,LargeArcFlag:d.largeArcFlag,SweepFlag:d.sweepFlag,x1:d.x,y1:d.y});u+=x.getTotalLength(),s=[d.x,d.y],p.push(x)}if(d.type==="a"){const x=(0,r.makeArc)({x0:s[0],y0:s[1],rx:d.rx,ry:d.ry,xAxisRotate:d.xAxisRotation,LargeArcFlag:d.largeArcFlag,SweepFlag:d.sweepFlag,x1:s[0]+d.dx,y1:s[1]+d.dy});u+=x.getTotalLength(),s=[s[0]+d.dx,s[1]+d.dy],p.push(x)}c.push(u)}return{segments:w,initialPoint:h,totalLength:u,partialLengths:c,functions:p}};e.constructFromInstructions=o;const l=a=>{const u=(0,t.parsePath)(a);return(0,e.constructFromInstructions)(u)};e.construct=l}(Te),Object.defineProperty(ct,"__esModule",{value:!0}),ct.getLength=void 0;const Mu=Te,Iu=e=>(0,Mu.construct)(e).totalLength;ct.getLength=Iu,Object.defineProperty(Wt,"__esModule",{value:!0}),Wt.evolvePath=void 0;const Fu=ct,ku=(e,t)=>{const r=(0,Fu.getLength)(t);if(e===0){const o=r*1.5;return{strokeDasharray:`${o} ${o}`,strokeDashoffset:o}}const n=`${r} ${r}`,i=r-e*r;return{strokeDasharray:n,strokeDashoffset:i}};Wt.evolvePath=ku;var Ut={};Object.defineProperty(Ut,"__esModule",{value:!0}),Ut.extendViewBox=void 0;const ju=(e,t)=>{const r=t-1,n=e.split(" ").map(u=>u.trim()).filter(u=>u!=="").map(Number);if(n.length!==4)throw new Error(`currentViewBox must be 4 valid numbers, but got "${e}"`);for(const u of n){if(Number.isNaN(u))throw new Error(`currentViewBox must be 4 valid numbers, but got "${e}"`);if(!Number.isFinite(u))throw new Error(`currentViewBox must be 4 valid numbers, but got "${e}"`)}const[i,o,l,a]=n;return[i-r*l/2,o-r*a/2,l+r*l,a+r*a].join(" ")};Ut.extendViewBox=ju;var Ht={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getInstructionIndexAtLength=e.getInstructionIndexAtLengthFromConstructed=void 0;const t=Te,r=(i,o)=>{if(o<0)throw new Error("Length less than 0 was passed");o>i.totalLength&&(o=i.totalLength);let l=i.partialLengths.length-1;for(;i.partialLengths[l]>=o&&l>0;)l--;return{lengthIntoInstruction:o-i.partialLengths[l],index:l}};e.getInstructionIndexAtLengthFromConstructed=r;const n=(i,o)=>{const l=(0,t.construct)(i);if(o>l.totalLength)throw new Error(`A length of ${o} was passed to getInstructionIndexAtLength() but the total length of the path is only ${l.totalLength}`);return(0,e.getInstructionIndexAtLengthFromConstructed)(l,o)};e.getInstructionIndexAtLength=n})(Ht);var Yt={};Object.defineProperty(Yt,"__esModule",{value:!0}),Yt.getPointAtLength=void 0;const Lu=Ht,Au=Te,Vu=(e,t)=>{const r=(0,Au.construct)(e),n=(0,Lu.getInstructionIndexAtLengthFromConstructed)(r,t),i=r.functions[n.index+1];if(i)return i.getPointAtLength(n.lengthIntoInstruction);if(r.initialPoint)return r.initialPoint;throw new Error("Wrong function at this part.")};Yt.getPointAtLength=Vu;var Zt={};Object.defineProperty(Zt,"__esModule",{value:!0}),Zt.getSubpaths=void 0;const Ou=Te,Nu=oe,Du=le,Bu=e=>{const t=(0,Nu.parsePath)(e),{segments:r}=(0,Ou.constructFromInstructions)(t);return r.map(n=>(0,Du.serializeInstructions)(n))};Zt.getSubpaths=Bu;var Qt={};Object.defineProperty(Qt,"__esModule",{value:!0}),Qt.getTangentAtLength=void 0;const zu=Ht,Ru=Te,Wu=(e,t)=>{const r=(0,Ru.construct)(e),n=(0,zu.getInstructionIndexAtLengthFromConstructed)(r,t),i=r.functions[n.index+1];if(i)return i.getTangentAtLength(n.lengthIntoInstruction);if(r.initialPoint)return{x:0,y:0};throw new Error("Wrong function at this part.")};Qt.getTangentAtLength=Wu;var Jt={},Xr={},Xt={};Object.defineProperty(Xt,"__esModule",{value:!0}),Xt.getEndPosition=void 0;const qu=e=>{let t=0,r=0,n=0,i=0;for(let o=0;o<e.length;o++){const l=e[o];if(l.type==="M"?(n=l.x,i=l.y):l.type==="m"&&(n+=l.dx,i+=l.dy),l.type==="A"||l.type==="C"||l.type==="L"||l.type==="M"||l.type==="Q"||l.type==="S"||l.type==="T"){t=l.x,r=l.y;continue}if(l.type==="a"||l.type==="c"||l.type==="l"||l.type==="m"||l.type==="q"||l.type==="s"||l.type==="t"){t+=l.dx,r+=l.dy;continue}if(l.type==="H"){t=l.x;continue}if(l.type==="V"){r=l.y;continue}if(l.type==="Z"){t=n,r=i;continue}if(l.type==="h"){t+=l.dx;continue}if(l.type==="v"){r+=l.dy;continue}throw new Error("Unknown instruction type: "+l.type)}return{x:t,y:r}};Xt.getEndPosition=qu;var Kr={};Object.defineProperty(Kr,"__esModule",{value:!0}),Kr.convertToSameInstructionType=Yu;const Uu=e=>{if(e.type==="M"||e.type==="L"||e.type==="Z")throw new Error("unexpected");return{type:"L",x:e.x,y:e.y}},Hu=(e,t)=>{if(e.type==="M"||e.type==="C"||e.type==="Z")throw new Error("unexpected");if(e.type==="L")return{type:"C",cp1x:t.x,cp1y:t.y,cp2x:e.x,cp2y:e.y,x:e.x,y:e.y};throw new Error("all types should be handled")};function Yu(e,t,r){if(e.type==="M"||t.type==="M")return{...e};if(e.type===t.type)return{...e};if(t.type==="C")return Hu(e,r);if(t.type==="L")return Uu(e);if(t.type==="Z")return{type:"Z"};throw new TypeError("unhandled")}var Gr={},en={},Kt={},tn={};Object.defineProperty(tn,"__esModule",{value:!0}),tn.pointsToInstruction=Qu;const Zu=Ue;function Qu(e){const t=e[e.length-1][0],r=e[e.length-1][1];if(e.length===4){const n=e[1][0],i=e[1][1],o=e[2][0],l=e[2][1];return{type:"C",cp1x:n,cp1y:i,cp2x:o,cp2y:l,x:t,y:r}}if(e.length===3){const n=e[1][0],i=e[1][1];return(0,Zu.convertQToCInstruction)({type:"Q",cpx:n,cpy:i,x:t,y:r},{x:e[0][0],y:e[0][1]})}return{type:"L",x:t,y:r}}var rn={},nn={};Object.defineProperty(nn,"__esModule",{value:!0}),nn.decasteljau=Ju;function Ju(e,t){const r=[],n=[];function i(o,l){if(o.length===1)r.push(o[0]),n.push(o[0]);else{const a=Array(o.length-1);for(let u=0;u<a.length;u++)u===0&&r.push(o[0]),u===a.length-1&&n.push(o[u+1]),a[u]=[(1-l)*o[u][0]+l*o[u+1][0],(1-l)*o[u][1]+l*o[u+1][1]];i(a,l)}}return e.length&&i(e,t),{left:r,right:n.reverse()}}Object.defineProperty(rn,"__esModule",{value:!0}),rn.splitCurveAsPoints=Ku;const Xu=nn;function Ku(e,t=2){const r=[];let n=e;const i=1/t;for(let o=0;o<t-1;o++){const l=i/(1-i*o),a=(0,Xu.decasteljau)(n,l);r.push(a.left),n=a.right}return r.push(n),r}Object.defineProperty(Kt,"__esModule",{value:!0}),Kt.splitCurveInstructions=void 0;const Gu=tn,e0=rn,t0=(e,t,r,n)=>{const i=[[e,t]];return r.type==="Q"&&i.push([r.cpx,r.cpy]),r.type==="C"&&(i.push([r.cp1x,r.cp1y]),i.push([r.cp2x,r.cp2y])),i.push([r.x,r.y]),(0,e0.splitCurveAsPoints)(i,n).map(o=>(0,Gu.pointsToInstruction)(o))};Kt.splitCurveInstructions=t0,Object.defineProperty(en,"__esModule",{value:!0}),en.splitSegmentInstructions=n0;const r0=Kt;function n0(e,t,r){let n=[];if(t.type==="L"||t.type==="C")e.type!=="Z"&&(n=n.concat((0,r0.splitCurveInstructions)(e.x,e.y,t,r)));else{const i=e.type==="M"?{type:"L",x:e.x,y:e.y}:e;n=n.concat(new Array(r-1).fill(!0).map(()=>i)),n.push(t)}return n}Object.defineProperty(Gr,"__esModule",{value:!0}),Gr.extendInstruction=i0;const o0=en;function i0(e,t){const r=e.length-1,n=t.length-1,i=r/n,l=new Array(n).fill(void 0).reduce((a,u,c)=>{const p=Math.floor(i*c);return a[p]=(a[p]||0)+1,a},[]).reduce((a,u,c)=>{if(c===e.length-1){const p=new Array(u).fill({...e[e.length-1]});return p[0].type==="M"&&p.forEach(h=>{h.type="L"}),a.concat(p)}return a.concat((0,o0.splitSegmentInstructions)(e[c],e[c+1],u))},[]);return l.unshift(e[0]),l}var Gt={};Object.defineProperty(Gt,"__esModule",{value:!0}),Gt.interpolateInstructionOfSameKind=void 0;const a0=(e,t,r)=>({type:"L",x:(1-e)*t.x+e*r.x,y:(1-e)*t.y+e*r.y}),s0=(e,t,r)=>({type:"C",cp1x:(1-e)*t.cp1x+e*r.cp1x,cp2x:(1-e)*t.cp2x+e*r.cp2x,cp1y:(1-e)*t.cp1y+e*r.cp1y,cp2y:(1-e)*t.cp2y+e*r.cp2y,x:(1-e)*t.x+e*r.x,y:(1-e)*t.y+e*r.y}),u0=(e,t,r)=>({type:"M",x:(1-e)*t.x+e*r.x,y:(1-e)*t.y+e*r.y}),l0=(e,t,r)=>{if(t.type==="L"){if(r.type!=="L")throw new Error("mismatch");return a0(e,t,r)}if(t.type==="C"){if(r.type!=="C")throw new Error("mismatch");return s0(e,t,r)}if(t.type==="M"){if(r.type!=="M")throw new Error("mismatch");return u0(e,t,r)}if(t.type==="Z"){if(r.type!=="Z")throw new Error("mismatch");return{type:"Z"}}throw new Error("mismatch")};Gt.interpolateInstructionOfSameKind=l0,Object.defineProperty(Xr,"__esModule",{value:!0}),Xr.interpolateInstructions=p0;const c0=Xt,d0=Kr,Bo=Gr,f0=Gt;function p0(e,t){let r=e.slice(),n=t.slice();if(!r.length&&!n.length)return function(){return[]};const i=(r.length===0||r[r.length-1].type==="Z")&&(n.length===0||n[n.length-1].type==="Z");r.length>0&&r[r.length-1].type==="Z"&&r.pop(),n.length>0&&n[n.length-1].type==="Z"&&n.pop(),r.length?n.length||n.push(r[0]):r.push(n[0]),Math.abs(n.length-r.length)!==0&&(n.length>r.length?r=(0,Bo.extendInstruction)(r,n):n.length<r.length&&(n=(0,Bo.extendInstruction)(n,r)));const l=r.map((u,c)=>{const p=r.slice(0,c),h=(0,c0.getEndPosition)(p);return(0,d0.convertToSameInstructionType)(u,n[c],h)}),a=[];return i&&(l.push({type:"Z"}),n.push({type:"Z"})),function(u){if(u===1)return t;if(u===0)return l;for(let c=0;c<l.length;++c)a.push((0,f0.interpolateInstructionOfSameKind)(u,l[c],n[c]));return a}}Object.defineProperty(Jt,"__esModule",{value:!0}),Jt.interpolatePath=void 0;const zo=oe,Ro=xe,h0=le,y0=Xr,m0=(e,t,r)=>{if(e===1)return r;if(e===0)return t;const n=(0,Ro.reduceInstructions)((0,zo.parsePath)(t));if(n.length===0)throw new TypeError(`SVG Path "${t}" is not valid`);const i=(0,Ro.reduceInstructions)((0,zo.parsePath)(r));if(i.length===0)throw new TypeError(`SVG Path "${r}" is not valid`);const o=(0,y0.interpolateInstructions)(n,i);return(0,h0.serializeInstructions)(o(e))};Jt.interpolatePath=m0;var er={},tr={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.translatePath=e.translateSegments=void 0;const t=oe,r=le,n=(o,l,a)=>o.map(u=>{if(u.type==="a"||u.type==="c"||u.type==="v"||u.type==="s"||u.type==="h"||u.type==="l"||u.type==="m"||u.type==="q"||u.type==="t")return u;if(u.type==="V")return{type:"V",y:u.y+a};if(u.type==="H")return{type:"H",x:u.x+l};if(u.type==="A")return{type:"A",rx:u.rx,ry:u.ry,largeArcFlag:u.largeArcFlag,sweepFlag:u.sweepFlag,xAxisRotation:u.xAxisRotation,x:u.x+l,y:u.y+a};if(u.type==="Z")return u;if(u.type==="C")return{type:"C",cp1x:u.cp1x+l,cp1y:u.cp1y+a,cp2x:u.cp2x+l,cp2y:u.cp2y+a,x:u.x+l,y:u.y+a};if(u.type==="Q")return{type:"Q",cpx:u.cpx+l,cpy:u.cpy+a,x:u.x+l,y:u.y+a};if(u.type==="S")return{type:"S",cpx:u.cpx+l,cpy:u.cpy+a,x:u.x+l,y:u.y+a};if(u.type==="T")return{type:"T",x:u.x+l,y:u.y+a};if(u.type==="L")return{type:"L",x:u.x+l,y:u.y+a};if(u.type==="M")return{type:"M",x:u.x+l,y:u.y+a};throw new Error(`Unknown segment type: ${u.type}`)});e.translateSegments=n;const i=(o,l,a)=>(0,r.serializeInstructions)((0,e.translateSegments)((0,t.parsePath)(o),l,a));e.translatePath=i})(tr),Object.defineProperty(er,"__esModule",{value:!0}),er.resetPath=void 0;const g0=Ye,v0=tr,w0=e=>{const t=(0,g0.getBoundingBox)(e);return(0,v0.translatePath)(e,-t.x1,-t.y1)};er.resetPath=w0;var rr={};Object.defineProperty(rr,"__esModule",{value:!0}),rr.reversePath=void 0;const x0=Te,b0=He,_0=oe,P0=xe,E0=le;function $0(e){const t=[];let r=0,n=0;for(const o of e){if(o.type==="A")t.unshift({type:"A",largeArcFlag:o.largeArcFlag,rx:o.rx,ry:o.ry,xAxisRotation:o.xAxisRotation,sweepFlag:!o.sweepFlag,x:r,y:n});else if(o.type==="C")t.unshift({type:"C",cp1x:o.cp2x,cp1y:o.cp2y,cp2x:o.cp1x,cp2y:o.cp1y,x:r,y:n});else if(o.type==="Q")t.unshift({type:"Q",cpx:o.cpx,cpy:o.cpy,x:r,y:n});else if(o.type==="L")t.unshift({type:"L",x:r,y:n});else if(o.type!=="M"){if(o.type!=="Z")throw new Error("unnormalized instruction "+o.type)}o.type!=="Z"&&(r=o.x,n=o.y)}t.unshift({type:"M",x:r,y:n});let i=(0,E0.serializeInstructions)(t);return e[e.length-1].type==="Z"&&(i+="Z"),i=i.replace(/M M/g,"Z M"),i}const C0=e=>{const t=(0,_0.parsePath)(e),r=(0,b0.normalizeInstructions)(t),n=(0,P0.reduceInstructions)(r),{segments:i}=(0,x0.constructFromInstructions)(n);return i.map(o=>$0(o)).join(" ").replace(/ +/g," ").trim()};rr.reversePath=C0;var nr={};Object.defineProperty(nr,"__esModule",{value:!0}),nr.scalePath=void 0;const T0=Ye,S0=oe,M0=xe,I0=le,Wo=tr,F0=(e,t,r)=>{const n=(0,M0.reduceInstructions)((0,S0.parsePath)(e)),i=(0,T0.getBoundingBoxFromInstructions)(n),l=(0,Wo.translateSegments)(n,-i.x1,-i.y1).map(a=>{if(a.type==="L")return{type:"L",x:t*a.x,y:r*a.y};if(a.type==="C")return{type:"C",x:t*a.x,y:r*a.y,cp1x:t*a.cp1x,cp1y:r*a.cp1y,cp2x:t*a.cp2x,cp2y:r*a.cp2y};if(a.type==="M")return{type:"M",x:t*a.x,y:r*a.y};if(a.type==="Q")return{type:"Q",x:t*a.x,y:r*a.y,cpx:t*a.cpx,cpy:r*a.cpy};if(a.type==="Z")return{type:"Z"};if(a.type==="A")return{type:"A",largeArcFlag:a.largeArcFlag,rx:t*a.rx,ry:r*a.ry,sweepFlag:a.sweepFlag,xAxisRotation:a.xAxisRotation,x:t*a.x,y:r*a.y};if(a.type==="H")return{type:"H",x:t*a.x};if(a.type==="S")return{type:"S",cpx:t*a.cpx,cpy:r*a.cpy,x:t*a.x,y:r*a.y};if(a.type==="T")return{type:"T",x:t*a.x,y:r*a.y};if(a.type==="V")return{type:"V",y:r*a.y};if(a.type==="a")return{type:"a",dx:t*a.dx,dy:r*a.dy,largeArcFlag:a.largeArcFlag,rx:t*a.rx,ry:r*a.ry,sweepFlag:a.sweepFlag,xAxisRotation:a.xAxisRotation};if(a.type==="c")return{type:"c",cp1dx:t*a.cp1dx,cp1dy:r*a.cp1dy,cp2dx:t*a.cp2dx,cp2dy:r*a.cp2dy,dx:t*a.dx,dy:r*a.dy};if(a.type==="h")return{type:"h",dx:t*a.dx};if(a.type==="l")return{type:"l",dx:t*a.dx,dy:r*a.dy};if(a.type==="m")return{type:"m",dx:t*a.dx,dy:r*a.dy};if(a.type==="q")return{type:"q",cpdx:t*a.cpdx,cpdy:r*a.cpdy,dx:t*a.dx,dy:r*a.dy};if(a.type==="s")return{type:"s",cpdx:t*a.cpdx,cpdy:r*a.cpdy,dx:t*a.dx,dy:r*a.dy};if(a.type==="t")return{type:"t",dx:t*a.dx,dy:r*a.dy};if(a.type==="v")return{type:"v",dy:r*a.dy};throw new Error("unexpected function")});return(0,I0.serializeInstructions)((0,Wo.translateSegments)(l,i.x1,i.y1))};nr.scalePath=F0;var or={},Se={};Object.defineProperty(Se,"__esModule",{value:!0}),Se.fixZInstruction=Se.warpTransform=void 0,Se.svgPathInterpolate=O0;const k0=Ue,qo=e=>{const t=e[0],r=e[e.length-1];let n=0;for(let i=0;i<t.length;i++){const o=r[i]-t[i];n+=o**2}return Math.sqrt(n)};function j0(e,t=.5){const r=[],n=[],i=[e];for(;i.length<e.length;){const o=i[i.length-1],l=[];for(let a=1;a<o.length;a++){const u=o[a-1],c=o[a],p=[],h=Math.max(u.length,c.length);for(let s=0;s<h;s++){const y=u[s]||0,g=c[s]||0;p.push(y+(g-y)*t)}l.push(p)}i.push(l)}for(let o=0;o<i.length;o++)r.push(i[o][0]),n.push(i[i.length-1-o][o]);return[r,n]}function L0(e,t,r=qo){const n=[e],i=[];for(;n.length>0;){const o=n.pop();if(r(o)>t){const l=j0(o);for(let a=l.length-1;a>=0;a--)n.push(l[a])}else i.push(o)}return i}function A0(e){switch(e.length){case 2:return{type:"L",x:e[1][0],y:e[1][1]};case 3:return(0,k0.convertQToCInstruction)({type:"Q",cpx:e[1][0],cpy:e[1][1],x:e[2][0],y:e[2][1]},{x:e[0][0],y:e[0][1]});case 4:return{type:"C",cp1x:e[1][0],cp1y:e[1][1],cp2x:e[2][0],cp2y:e[2][1],x:e[3][0],y:e[3][1]};default:throw new Error("Expected 2, 3 or 4 points for a line segment, got "+e.length)}}function V0(e,t,r){let n=0,i=0;return e.map(o=>{const l=[[n,i]];return o.type!=="Z"&&(n=o.x,i=o.y),o.type==="C"&&(l.push([o.cp1x,o.cp1y]),l.push([o.cp2x,o.cp2y]),l.push([o.x,o.y])),o.type==="L"&&l.push([o.x,o.y]),o.type==="C"||o.type==="L"?L0(l,t,r).map(a=>A0(a)):[o]}).flat(1)}function O0(e,t){return V0(e,t,n=>{const i=[n[0].slice(0,2),n[n.length-1].slice(0,2)];return qo(i)})}const N0=(e,t)=>e.map(r=>{if(r.type==="L"){const{x:n,y:i}=t({x:r.x,y:r.y});return[{type:"L",x:n,y:i}]}if(r.type==="C"){const{x:n,y:i}=t({x:r.x,y:r.y}),{x:o,y:l}=t({x:r.cp1x,y:r.cp1y}),{x:a,y:u}=t({x:r.cp2x,y:r.cp2y});return[{type:"C",x:n,y:i,cp1x:o,cp1y:l,cp2x:a,cp2y:u}]}if(r.type==="M"){const{x:n,y:i}=t({x:r.x,y:r.y});return[{type:"M",x:n,y:i}]}return[r]}).flat(1);Se.warpTransform=N0;const D0=e=>{let t=0,r=0;return e.map(n=>n.type==="Z"?[{type:"L",x:t,y:r},{type:"Z"}]:(n.type==="M"&&(t=n.x,r=n.y),[n])).flat(1)};Se.fixZInstruction=D0,Object.defineProperty(or,"__esModule",{value:!0}),or.warpPath=void 0;const B0=Ye,z0=oe,R0=xe,W0=le,on=Se,q0=e=>{const t=(0,B0.getBoundingBoxFromInstructions)(e);return Math.max(t.y2-t.y1,t.x2-t.x1)*.01},U0=(e,t,r)=>{var n;const i=(0,R0.reduceInstructions)((0,z0.parsePath)(e)),o=(0,on.fixZInstruction)(i),l=(0,on.svgPathInterpolate)(o,(n=r==null?void 0:r.interpolationThreshold)!==null&&n!==void 0?n:q0(o));return(0,W0.serializeInstructions)((0,on.warpTransform)(l,t))};or.warpPath=U0,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PathInternals=e.warpPath=e.translatePath=e.serializeInstructions=e.scalePath=e.reversePath=e.resetPath=e.reduceInstructions=e.parsePath=e.normalizePath=e.interpolatePath=e.getTangentAtLength=e.getSubpaths=e.getPointAtLength=e.getLength=e.getInstructionIndexAtLength=e.getBoundingBox=e.extendViewBox=e.evolvePath=void 0;const t=Dt,r=Rt,n=Ye;var i=Wt;Object.defineProperty(e,"evolvePath",{enumerable:!0,get:function(){return i.evolvePath}});var o=Ut;Object.defineProperty(e,"extendViewBox",{enumerable:!0,get:function(){return o.extendViewBox}});var l=Ye;Object.defineProperty(e,"getBoundingBox",{enumerable:!0,get:function(){return l.getBoundingBox}});var a=Ht;Object.defineProperty(e,"getInstructionIndexAtLength",{enumerable:!0,get:function(){return a.getInstructionIndexAtLength}});var u=ct;Object.defineProperty(e,"getLength",{enumerable:!0,get:function(){return u.getLength}});var c=Yt;Object.defineProperty(e,"getPointAtLength",{enumerable:!0,get:function(){return c.getPointAtLength}});var p=Zt;Object.defineProperty(e,"getSubpaths",{enumerable:!0,get:function(){return p.getSubpaths}});var h=Qt;Object.defineProperty(e,"getTangentAtLength",{enumerable:!0,get:function(){return h.getTangentAtLength}});var s=Jt;Object.defineProperty(e,"interpolatePath",{enumerable:!0,get:function(){return s.interpolatePath}});var y=He;Object.defineProperty(e,"normalizePath",{enumerable:!0,get:function(){return y.normalizePath}});var g=oe;Object.defineProperty(e,"parsePath",{enumerable:!0,get:function(){return g.parsePath}});var P=xe;Object.defineProperty(e,"reduceInstructions",{enumerable:!0,get:function(){return P.reduceInstructions}});var w=er;Object.defineProperty(e,"resetPath",{enumerable:!0,get:function(){return w.resetPath}});var v=rr;Object.defineProperty(e,"reversePath",{enumerable:!0,get:function(){return v.reversePath}});var d=nr;Object.defineProperty(e,"scalePath",{enumerable:!0,get:function(){return d.scalePath}});var x=le;Object.defineProperty(e,"serializeInstructions",{enumerable:!0,get:function(){return x.serializeInstructions}});var E=tr;Object.defineProperty(e,"translatePath",{enumerable:!0,get:function(){return E.translatePath}});var _=or;Object.defineProperty(e,"warpPath",{enumerable:!0,get:function(){return _.warpPath}}),e.PathInternals={getBoundingBoxFromInstructions:n.getBoundingBoxFromInstructions,debugPath:r.debugPath,cutPath:t.cutPath}}(pe);var an={},ir={},dt={};Object.defineProperty(dt,"__esModule",{value:!0}),dt.makeCircle=void 0;const H0=pe,Y0=({radius:e})=>{const t=[{type:"M",x:e,y:0},{type:"a",rx:e,ry:e,xAxisRotation:0,largeArcFlag:!0,sweepFlag:!0,dx:0,dy:e*2},{type:"a",rx:e,ry:e,xAxisRotation:0,largeArcFlag:!0,sweepFlag:!0,dx:0,dy:-e*2},{type:"Z"}],r=(0,H0.serializeInstructions)(t);return{height:e*2,width:e*2,path:r,instructions:t,transformOrigin:`${e} ${e}`}};dt.makeCircle=Y0;var ve={},ar={};Object.defineProperty(ar,"__esModule",{value:!0}),ar.doesReactSupportTransformOriginProperty=void 0;const Z0=e=>{if(e.includes("canary")||e.includes("experimental"))return parseInt(e.slice(-8),10)>20230209;const[t]=e.split(".").map(Number);return t>18};ar.doesReactSupportTransformOriginProperty=Z0;var Q0=ke&&ke.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),J0=ke&&ke.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),X0=ke&&ke.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&Q0(t,e,r);return J0(t,e),t};Object.defineProperty(ve,"__esModule",{value:!0}),ve.RenderSvg=void 0;const Me=b,sn=X0(f),K0=si,G0=ar,e1=({width:e,height:t,path:r,style:n,pathStyle:i,transformOrigin:o,debug:l,instructions:a,...u})=>{const c=(0,sn.useMemo)(()=>({overflow:"visible",...n??{}}),[n]),p=(0,sn.useMemo)(()=>({transformBox:"fill-box",...i??{}}),[i]),h=(0,G0.doesReactSupportTransformOriginProperty)(K0.version);return(0,Me.jsxs)("svg",{width:e,height:t,viewBox:`0 0 ${e} ${t}`,xmlns:"http://www.w3.org/2000/svg",style:c,children:[(0,Me.jsx)("path",{...h?{transformOrigin:o}:{"transform-origin":o},d:r,style:p,...u}),l?a.map((s,y)=>{if(s.type==="C"){const g=y===0?a[a.length-1]:a[y-1];if(g.type==="V"||g.type==="H"||g.type==="a"||g.type==="Z"||g.type==="t"||g.type==="q"||g.type==="l"||g.type==="c"||g.type==="m"||g.type==="h"||g.type==="s"||g.type==="v")return null;const P=g.x,w=g.y;return(0,Me.jsxs)(sn.default.Fragment,{children:[(0,Me.jsx)("path",{d:`M ${P} ${w} ${s.cp1x} ${s.cp1y}`,strokeWidth:2,stroke:"rgba(0, 0, 0, 0.4)"}),(0,Me.jsx)("path",{d:`M ${s.x} ${s.y} ${s.cp2x} ${s.cp2y}`,strokeWidth:2,stroke:"rgba(0, 0, 0, 0.4)"}),(0,Me.jsx)("circle",{cx:s.cp1x,cy:s.cp1y,r:3,fill:"white",strokeWidth:2,stroke:"black"}),(0,Me.jsx)("circle",{cx:s.cp2x,cy:s.cp2y,r:3,strokeWidth:2,fill:"white",stroke:"black"})]},y)}return null}):null]})};ve.RenderSvg=e1,Object.defineProperty(ir,"__esModule",{value:!0}),ir.Circle=void 0;const t1=b,r1=dt,n1=ve,o1=({radius:e,...t})=>(0,t1.jsx)(n1.RenderSvg,{...(0,r1.makeCircle)({radius:e}),...t});ir.Circle=o1;var sr={},ft={};Object.defineProperty(ft,"__esModule",{value:!0}),ft.makeEllipse=void 0;const i1=pe,a1=({rx:e,ry:t})=>{const r=[{type:"M",x:e,y:0},{type:"a",rx:e,ry:t,xAxisRotation:0,largeArcFlag:!0,sweepFlag:!1,dx:1,dy:0},{type:"Z"}],n=(0,i1.serializeInstructions)(r);return{width:e*2,height:t*2,path:n,instructions:r,transformOrigin:`${e} ${t}`}};ft.makeEllipse=a1,Object.defineProperty(sr,"__esModule",{value:!0}),sr.Ellipse=void 0;const s1=b,u1=ft,l1=ve,c1=({rx:e,ry:t,...r})=>(0,s1.jsx)(l1.RenderSvg,{...(0,u1.makeEllipse)({rx:e,ry:t}),...r});sr.Ellipse=c1;var ur={},pt={};Object.defineProperty(pt,"__esModule",{value:!0}),pt.makePie=void 0;const d1=pe,Ze=({counterClockwise:e,actualProgress:t,rotation:r,radius:n,coord:i})=>{const o=e?-1:1,l=Math[i==="x"?"cos":"sin"](o*t*Math.PI*2+Math.PI*1.5+r)*n+n;return Math.round(l*1e5)/1e5},f1=({progress:e,radius:t,closePath:r=!0,counterClockwise:n=!1,rotation:i=0})=>{const o=Math.min(Math.max(e,0),1),l=Ze({actualProgress:o,coord:"x",counterClockwise:n,radius:t,rotation:i}),a=Ze({actualProgress:o,coord:"y",counterClockwise:n,radius:t,rotation:i}),u={x:Ze({actualProgress:0,coord:"x",counterClockwise:n,radius:t,rotation:i}),y:Ze({actualProgress:0,coord:"y",counterClockwise:n,radius:t,rotation:i})},c={x:l,y:a},p=[{type:"M",...u},{type:"A",rx:t,ry:t,xAxisRotation:0,largeArcFlag:!1,sweepFlag:!n,x:o<=.5?l:Ze({actualProgress:.5,coord:"x",counterClockwise:n,radius:t,rotation:i}),y:o<=.5?a:Ze({actualProgress:.5,coord:"y",counterClockwise:n,radius:t,rotation:i})},o>.5?{type:"A",rx:t,ry:t,xAxisRotation:0,largeArcFlag:!1,sweepFlag:!n,...c}:null,o>0&&o<1&&r?{type:"L",x:t,y:t}:null,r?{type:"Z"}:null].filter(Boolean),h=(0,d1.serializeInstructions)(p);return{height:t*2,width:t*2,path:h,instructions:p,transformOrigin:`${t} ${t}`}};pt.makePie=f1,Object.defineProperty(ur,"__esModule",{value:!0}),ur.Pie=void 0;const p1=b,h1=pt,y1=ve,m1=({radius:e,progress:t,closePath:r,counterClockwise:n,rotation:i,...o})=>(0,p1.jsx)(y1.RenderSvg,{...(0,h1.makePie)({radius:e,progress:t,closePath:r,counterClockwise:n,rotation:i}),...o});ur.Pie=m1;var lr={},ht={},Ie={};Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.joinPoints=void 0;const Uo=(e,t)=>{const[r,n]=e,i=Math.sqrt(r*r+n*n),o=(i-t)/i;return[r*o,n*o]},Ho=(e,t)=>{const[r,n]=e,i=Math.sqrt(r*r+n*n),o=t/i;return[r*o,n*o]},g1=(e,{edgeRoundness:t,cornerRadius:r,roundCornerStrategy:n})=>e.map(([i,o],l)=>{const a=l===0?e.length-2:l-1,u=e[a],c=l===e.length-1?1:l+1,p=e[c],h=[(i+p[0])/2,(o+p[1])/2],s=[(i+u[0])/2,(o+u[1])/2],y=[i-u[0],o-u[1]],g=[p[0]-i,p[1]-o];if(l===0){if(t!==null)return[{type:"M",x:h[0],y:h[1]}];if(r!==0){const v=Uo(g,r);return[{type:"M",x:v[0]+i,y:v[1]+o}]}return[{type:"M",x:i,y:o}]}if(r&&t!==null)throw new Error('"cornerRadius" and "edgeRoundness" cannot be specified at the same time.');if(t===null){if(r===0)return[{type:"L",x:i,y:o}];const v=Uo(y,r),d=Ho(y,r),x=Ho(g,r),E=[u[0]+v[0],u[1]+v[1]];return[{type:"L",x:E[0],y:E[1]},n==="arc"?{type:"a",rx:r,ry:r,xAxisRotation:0,dx:d[0]+x[0],dy:d[1]+x[1],largeArcFlag:!1,sweepFlag:!0}:{type:"C",x:E[0]+d[0]+x[0],y:E[1]+d[1]+x[1],cp1x:i,cp1y:o,cp2x:i,cp2y:o}]}const P=[s[0]+y[0]*t*.5,s[1]+y[1]*t*.5],w=[h[0]-g[0]*t*.5,h[1]-g[1]*t*.5];return[{type:"C",cp1x:P[0],cp1y:P[1],cp2x:w[0],cp2y:w[1],x:h[0],y:h[1]}]}).flat(1);Ie.joinPoints=g1,Object.defineProperty(ht,"__esModule",{value:!0}),ht.makePolygon=void 0;const cr=pe,v1=Ie;function w1({points:e,radius:t,centerX:r,centerY:n,cornerRadius:i,edgeRoundness:o}){const l=Math.PI*2/e,a=new Array(e).fill(0).map((u,c)=>{const p=l*c-Math.PI/2,h={x:r+t*Math.cos(p),y:n+t*Math.sin(p)};return[h.x,h.y]});return(0,v1.joinPoints)([...a,a[0]],{edgeRoundness:o,cornerRadius:i,roundCornerStrategy:i>0?"bezier":"arc"})}const x1=({points:e,radius:t,cornerRadius:r=0,edgeRoundness:n=null})=>{if(e<3)throw new Error(`"points" should be minimum 3, got ${e}`);const i=2*t,o=2*t,l=i/2,a=o/2,u=w1({points:e,radius:t,centerX:l,centerY:a,cornerRadius:r,edgeRoundness:n}),c=(0,cr.reduceInstructions)(u),p=(0,cr.resetPath)((0,cr.serializeInstructions)(c)),h=cr.PathInternals.getBoundingBoxFromInstructions(c);return{path:p,width:h.width,height:h.height,transformOrigin:`${l} ${a}`,instructions:u}};ht.makePolygon=x1,Object.defineProperty(lr,"__esModule",{value:!0}),lr.Polygon=void 0;const b1=b,_1=ht,P1=ve,E1=({points:e,radius:t,cornerRadius:r,edgeRoundness:n,...i})=>(0,b1.jsx)(P1.RenderSvg,{...(0,_1.makePolygon)({points:e,cornerRadius:r,edgeRoundness:n,radius:t}),...i});lr.Polygon=E1;var dr={},yt={};Object.defineProperty(yt,"__esModule",{value:!0}),yt.makeRect=void 0;const $1=pe,C1=Ie,T1=({width:e,height:t,edgeRoundness:r=null,cornerRadius:n=0})=>{const i=[e/2,t/2],o=[...(0,C1.joinPoints)([[n,0],[e,0],[e,t],[0,t],[0,0]],{edgeRoundness:r,cornerRadius:n,roundCornerStrategy:"arc"}),{type:"Z"}],l=(0,$1.serializeInstructions)(o);return{width:e,height:t,instructions:o,path:l,transformOrigin:i.join(" ")}};yt.makeRect=T1,Object.defineProperty(dr,"__esModule",{value:!0}),dr.Rect=void 0;const S1=b,M1=yt,I1=ve,F1=({width:e,edgeRoundness:t,height:r,cornerRadius:n,...i})=>(0,S1.jsx)(I1.RenderSvg,{...(0,M1.makeRect)({height:r,width:e,edgeRoundness:t,cornerRadius:n}),...i});dr.Rect=F1;var fr={},mt={};Object.defineProperty(mt,"__esModule",{value:!0}),mt.makeStar=void 0;const pr=pe,k1=Ie,j1=({centerX:e,centerY:t,points:r,innerRadius:n,outerRadius:i,cornerRadius:o,edgeRoundness:l})=>{const a=Math.PI*2/(r*2),u=new Array(r*2).fill(!0).map((c,p)=>{const h=p%2===0?i:n,s=a*p-Math.PI/2,y={x:e+h*Math.cos(s),y:t+h*Math.sin(s)};return[y.x,y.y]});return[...(0,k1.joinPoints)([...u,u[0]],{edgeRoundness:l,cornerRadius:o,roundCornerStrategy:o>0?"bezier":"arc"}),{type:"Z"}]},L1=({points:e,innerRadius:t,outerRadius:r,cornerRadius:n=0,edgeRoundness:i=null})=>{const o=r*2,l=r*2,a=o/2,u=l/2,c=j1({centerX:a,centerY:u,points:e,innerRadius:t,outerRadius:r,cornerRadius:n,edgeRoundness:i}),p=(0,pr.reduceInstructions)(c),h=(0,pr.resetPath)((0,pr.serializeInstructions)(p)),s=pr.PathInternals.getBoundingBoxFromInstructions(p);return{path:h,width:s.width,height:s.height,transformOrigin:`${a} ${u}`,instructions:c}};mt.makeStar=L1,Object.defineProperty(fr,"__esModule",{value:!0}),fr.Star=void 0;const A1=b,V1=mt,O1=ve,N1=({innerRadius:e,outerRadius:t,points:r,cornerRadius:n,edgeRoundness:i,...o})=>(0,A1.jsx)(O1.RenderSvg,{...(0,V1.makeStar)({innerRadius:e,outerRadius:t,points:r,cornerRadius:n,edgeRoundness:i}),...o});fr.Star=N1;var hr={},gt={};Object.defineProperty(gt,"__esModule",{value:!0}),gt.makeTriangle=void 0;const D1=pe,B1=Ie,z1=({length:e,direction:t="right",edgeRoundness:r=null,cornerRadius:n=0})=>{if(typeof e!="number")throw new Error(`"length" of a triangle must be a number, got ${JSON.stringify(e)}`);const i=e,o=Math.sqrt(e**2*.75),l={up:[[i/2,0],[0,o],[i,o],[i/2,0]],right:[[0,0],[0,i],[o,i/2],[0,0]],down:[[0,0],[i,0],[i/2,o],[0,0]],left:[[o,0],[o,i],[0,i/2],[o,0]]},a={left:o/3*2,right:o/3,up:i/2,down:i/2}[t],u={up:o/3*2,down:o/3,left:i/2,right:i/2}[t],c=[...(0,B1.joinPoints)(l[t],{edgeRoundness:r,cornerRadius:n,roundCornerStrategy:"bezier"}),{type:"Z"}];return{path:(0,D1.serializeInstructions)(c),instructions:c,width:t==="up"||t==="down"?e:o,height:t==="up"||t==="down"?o:e,transformOrigin:`${a} ${u}`}};gt.makeTriangle=z1,Object.defineProperty(hr,"__esModule",{value:!0}),hr.Triangle=void 0;const R1=b,W1=gt,q1=ve,U1=({length:e,direction:t,edgeRoundness:r,cornerRadius:n,...i})=>(0,R1.jsx)(q1.RenderSvg,{...(0,W1.makeTriangle)({length:e,direction:t,edgeRoundness:r,cornerRadius:n}),...i});hr.Triangle=U1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.makeTriangle=e.makeStar=e.makeRect=e.makePolygon=e.makePie=e.makeEllipse=e.makeCircle=e.Triangle=e.Star=e.Rect=e.Polygon=e.Pie=e.Ellipse=e.Circle=void 0;var t=ir;Object.defineProperty(e,"Circle",{enumerable:!0,get:function(){return t.Circle}});var r=sr;Object.defineProperty(e,"Ellipse",{enumerable:!0,get:function(){return r.Ellipse}});var n=ur;Object.defineProperty(e,"Pie",{enumerable:!0,get:function(){return n.Pie}});var i=lr;Object.defineProperty(e,"Polygon",{enumerable:!0,get:function(){return i.Polygon}});var o=dr;Object.defineProperty(e,"Rect",{enumerable:!0,get:function(){return o.Rect}});var l=fr;Object.defineProperty(e,"Star",{enumerable:!0,get:function(){return l.Star}});var a=hr;Object.defineProperty(e,"Triangle",{enumerable:!0,get:function(){return a.Triangle}});var u=dt;Object.defineProperty(e,"makeCircle",{enumerable:!0,get:function(){return u.makeCircle}});var c=ft;Object.defineProperty(e,"makeEllipse",{enumerable:!0,get:function(){return c.makeEllipse}});var p=pt;Object.defineProperty(e,"makePie",{enumerable:!0,get:function(){return p.makePie}});var h=ht;Object.defineProperty(e,"makePolygon",{enumerable:!0,get:function(){return h.makePolygon}});var s=yt;Object.defineProperty(e,"makeRect",{enumerable:!0,get:function(){return s.makeRect}});var y=mt;Object.defineProperty(e,"makeStar",{enumerable:!0,get:function(){return y.makeStar}});var g=gt;Object.defineProperty(e,"makeTriangle",{enumerable:!0,get:function(){return g.makeTriangle}})}(an);var H1=({children:e,presentationDirection:t,presentationProgress:r,passedProps:n})=>{const i=Math.sqrt(n.width**2+n.height**2)/2,{path:o}=an.makePie({radius:i,progress:r}),l=pe.translatePath(o,-(i*2-n.width)/2,-(i*2-n.height)/2),[a]=f.useState(()=>String(ge(null))),u=f.useMemo(()=>({width:"100%",height:"100%",clipPath:t==="exiting"?void 0:`url(#${a})`,...t==="entering"?n.innerEnterStyle:n.innerExitStyle}),[a,n.innerEnterStyle,n.innerExitStyle,t]),c=f.useMemo(()=>t==="entering"?n.outerEnterStyle:n.outerExitStyle,[n.outerEnterStyle,n.outerExitStyle,t]);return b.jsxs(U,{style:c,children:[b.jsx(U,{style:u,children:e}),t==="exiting"?null:b.jsx(U,{children:b.jsx("svg",{children:b.jsx("defs",{children:b.jsx("clipPath",{id:a,children:b.jsx("path",{d:l,fill:"black"})})})})})]})},Y1=e=>({component:H1,props:e??{}});const Z1=({children:e,presentationDirection:t,presentationProgress:r,passedProps:n})=>{const o=Math.sqrt(n.width**2+n.height**2)/2*r,l=J1(n.width/2,n.height/2,o),[a]=f.useState(()=>String(ge(null))),u=f.useMemo(()=>({width:"100%",height:"100%",clipPath:t==="exiting"?void 0:`url(#${a})`}),[a,t]);return b.jsxs(U,{children:[b.jsx(U,{style:u,children:e}),t==="exiting"?null:b.jsx(U,{children:b.jsx("svg",{width:n.width,height:n.height,children:b.jsx("defs",{children:b.jsx("clipPath",{id:a,children:b.jsx("path",{d:l,fill:"black"})})})})})]})},Q1=e=>({component:Z1,props:e}),J1=(e,t,r)=>`M ${e}, ${t}
128
+ m -${r}, 0
129
+ a ${r},${r} 0 1,0 ${r*2},0
130
+ a ${r},${r} 0 1,0 -${r*2},0`,X1=({children:e,presentationDirection:t,presentationProgress:r,passedProps:n})=>{const{width:i,height:o}=n,l=i*r,a=o*r,u=i/2-l/2,c=o/2-a/2,[p]=f.useState(()=>String(ge(null))),h=f.useMemo(()=>({width:"100%",height:"100%",clipPath:t==="exiting"?void 0:`url(#${p})`}),[p,t]);return b.jsxs(U,{children:[b.jsx(U,{style:h,children:e}),t==="exiting"?null:b.jsx(U,{children:b.jsx("svg",{children:b.jsx("defs",{children:b.jsx("clipPath",{id:p,children:b.jsx("rect",{x:u,y:c,width:l,height:a,fill:"black"})})})})})]})},K1=e=>({component:X1,props:e}),G1=({children:e,presentationDirection:t,presentationProgress:r,passedProps:n})=>{const i=Math.sqrt(n.width**2+n.height**2)/2,o=i*r,l=i*2*r,{path:a}=an.makeStar({innerRadius:o,outerRadius:l,points:5}),u=pe.getBoundingBox(a),c=pe.translatePath(a,n.width/2-u.width/2,n.height/2-u.height/2),[p]=f.useState(()=>String(ge(null))),h=f.useMemo(()=>({width:"100%",height:"100%",clipPath:t==="exiting"?void 0:`url(#${p})`}),[p,t]);return b.jsxs(U,{children:[b.jsx(U,{style:h,children:e}),t==="exiting"?null:b.jsx(U,{children:b.jsx("svg",{children:b.jsx("defs",{children:b.jsx("clipPath",{id:p,children:b.jsx("path",{d:c,fill:"black"})})})})})]})},el=e=>({component:G1,props:e}),tl=({children:e,presentationDirection:t,presentationProgress:r,passedProps:n})=>{const{width:i,height:o}=n,l=i*r,a=i/2-l/2,[u]=f.useState(()=>String(ge(null))),c=f.useMemo(()=>({width:"100%",height:"100%",clipPath:t==="exiting"?void 0:`url(#${u})`}),[u,t]);return b.jsxs(U,{children:[b.jsx(U,{style:c,children:e}),t==="exiting"?null:b.jsx(U,{children:b.jsx("svg",{children:b.jsx("defs",{children:b.jsx("clipPath",{id:u,children:b.jsx("rect",{x:a,y:0,width:l,height:o,fill:"black"})})})})})]})},rl=e=>({component:tl,props:e});ee.circle=Q1,ee.clockWipe=Y1,ee.fade=As,ee.flip=qs,ee.linearTiming=Ms,ee.rectangle=K1,ee.slide=Ns,ee.slidingDoors=rl,ee.star=el,ee.wipe=Rs,Object.defineProperty(ee,Symbol.toStringTag,{value:"Module"})});
131
+ //# sourceMappingURL=index.umd.js.map