randmarcomps 1.94.0 → 1.96.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/randmarcomps.d.ts +40 -5
- package/dist/randmarcomps.js +3085 -2825
- package/dist/randmarcomps.umd.cjs +41 -21
- package/package.json +4 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(e,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("react/jsx-runtime"),require("react"),require("react-dom"),require("react-router-dom")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","react-dom","react-router-dom"],t):(e=typeof globalThis<"u"?globalThis:e||self,t(e.randmarcomps={},e.jsxRuntime,e.React,e.ReactDOM,e["react-router-dom"]))})(this,function(exports,jsxRuntime,React,ReactDOM,reactRouterDom){"use strict";var je=Object.defineProperty;var Ne=(e,t,n)=>t in e?je(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Ie=(e,t,n)=>Ne(e,typeof t!="symbol"?t+"":t,n);function _interopNamespaceDefault(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,i.get?i:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const React__namespace=_interopNamespaceDefault(React),ReactDOM__namespace=_interopNamespaceDefault(ReactDOM);var Bt=Object.defineProperty,At=Object.defineProperties,kt=Object.getOwnPropertyDescriptors,Y=Object.getOwnPropertySymbols,gt=Object.prototype.hasOwnProperty,Et=Object.prototype.propertyIsEnumerable,vt=(e,t,n)=>t in e?Bt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,St=(e,t)=>{for(var n in t||(t={}))gt.call(t,n)&&vt(e,n,t[n]);if(Y)for(var n of Y(t))Et.call(t,n)&&vt(e,n,t[n]);return e},bt=(e,t)=>At(e,kt(t)),Pt=(e,t)=>{var n={};for(var i in e)gt.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(e!=null&&Y)for(var i of Y(e))t.indexOf(i)<0&&Et.call(e,i)&&(n[i]=e[i]);return n};function ht(e){let t=setTimeout(e,0),n=setTimeout(e,10),i=setTimeout(e,50);return[t,n,i]}function _t(e){let t=React__namespace.useRef();return React__namespace.useEffect(()=>{t.current=e}),t.current}var Ot=18,wt=40,Gt=`${wt}px`,xt=["[data-lastpass-icon-root]","com-1password-button","[data-dashlanecreated]",'[style$="2147483647 !important;"]'].join(",");function Tt({containerRef:e,inputRef:t,pushPasswordManagerStrategy:n,isFocused:i}){let[o,l]=React__namespace.useState(!1),[u,d]=React__namespace.useState(!1),[f,p]=React__namespace.useState(!1),m=React__namespace.useMemo(()=>n==="none"?!1:(n==="increase-width"||n==="experimental-no-flickering")&&o&&u,[o,u,n]),g=React__namespace.useCallback(()=>{let b=e.current,_=t.current;if(!b||!_||f||n==="none")return;let R=b,E=R.getBoundingClientRect().left+R.offsetWidth,S=R.getBoundingClientRect().top+R.offsetHeight/2,C=E-Ot,T=S;document.querySelectorAll(xt).length===0&&document.elementFromPoint(C,T)===b||(l(!0),p(!0))},[e,t,f,n]);return React__namespace.useEffect(()=>{let b=e.current;if(!b||n==="none")return;function _(){let E=window.innerWidth-b.getBoundingClientRect().right;d(E>=wt)}_();let R=setInterval(_,1e3);return()=>{clearInterval(R)}},[e,n]),React__namespace.useEffect(()=>{let b=i||document.activeElement===t.current;if(n==="none"||!b)return;let _=setTimeout(g,0),R=setTimeout(g,2e3),E=setTimeout(g,5e3),S=setTimeout(()=>{p(!0)},6e3);return()=>{clearTimeout(_),clearTimeout(R),clearTimeout(E),clearTimeout(S)}},[t,i,n,g]),{hasPWMBadge:o,willPushPWMBadge:m,PWM_BADGE_SPACE_WIDTH:Gt}}var jt=React__namespace.createContext({}),Lt=React__namespace.forwardRef((e,t)=>{var n=e,{value:i,onChange:o,maxLength:l,textAlign:u="left",pattern:d,placeholder:f,inputMode:p="numeric",onComplete:m,pushPasswordManagerStrategy:g="increase-width",pasteTransformer:b,containerClassName:_,noScriptCSSFallback:R=Nt,render:E,children:S}=n,C=Pt(n,["value","onChange","maxLength","textAlign","pattern","placeholder","inputMode","onComplete","pushPasswordManagerStrategy","pasteTransformer","containerClassName","noScriptCSSFallback","render","children"]),T,A,M,I,O;let[N,j]=React__namespace.useState(typeof C.defaultValue=="string"?C.defaultValue:""),D=i??N,F=_t(D),L=React__namespace.useCallback(te=>{o==null||o(te),j(te)},[o]),B=React__namespace.useMemo(()=>d?typeof d=="string"?new RegExp(d):d:null,[d]),V=React__namespace.useRef(null),H=React__namespace.useRef(null),z=React__namespace.useRef({value:D,onChange:L,isIOS:typeof window<"u"&&((A=(T=window==null?void 0:window.CSS)==null?void 0:T.supports)==null?void 0:A.call(T,"-webkit-touch-callout","none"))}),U=React__namespace.useRef({prev:[(M=V.current)==null?void 0:M.selectionStart,(I=V.current)==null?void 0:I.selectionEnd,(O=V.current)==null?void 0:O.selectionDirection]});React__namespace.useImperativeHandle(t,()=>V.current,[]),React__namespace.useEffect(()=>{let te=V.current,de=H.current;if(!te||!de)return;z.current.value!==te.value&&z.current.onChange(te.value),U.current.prev=[te.selectionStart,te.selectionEnd,te.selectionDirection];function pe(){if(document.activeElement!==te){J(null),ne(null);return}let he=te.selectionStart,ge=te.selectionEnd,Se=te.selectionDirection,ve=te.maxLength,_e=te.value,xe=U.current.prev,be=-1,Re=-1,Pe;if(_e.length!==0&&he!==null&&ge!==null){let Me=he===ge,Oe=he===_e.length&&_e.length<ve;if(Me&&!Oe){let Ce=he;if(Ce===0)be=0,Re=1,Pe="forward";else if(Ce===ve)be=Ce-1,Re=Ce,Pe="backward";else if(ve>1&&_e.length>1){let Ae=0;if(xe[0]!==null&&xe[1]!==null){Pe=Ce<xe[1]?"backward":"forward";let $e=xe[0]===xe[1]&&xe[0]<ve;Pe==="backward"&&!$e&&(Ae=-1)}be=Ae+Ce,Re=Ae+Ce+1}}be!==-1&&Re!==-1&&be!==Re&&V.current.setSelectionRange(be,Re,Pe)}let Ee=be!==-1?be:he,we=Re!==-1?Re:ge,Te=Pe??Se;J(Ee),ne(we),U.current.prev=[Ee,we,Te]}if(document.addEventListener("selectionchange",pe,{capture:!0}),pe(),document.activeElement===te&&G(!0),!document.getElementById("input-otp-style")){let he=document.createElement("style");if(he.id="input-otp-style",document.head.appendChild(he),he.sheet){let ge="background: transparent !important; color: transparent !important; border-color: transparent !important; opacity: 0 !important; box-shadow: none !important; -webkit-box-shadow: none !important; -webkit-text-fill-color: transparent !important;";$(he.sheet,"[data-input-otp]::selection { background: transparent !important; color: transparent !important; }"),$(he.sheet,`[data-input-otp]:autofill { ${ge} }`),$(he.sheet,`[data-input-otp]:-webkit-autofill { ${ge} }`),$(he.sheet,"@supports (-webkit-touch-callout: none) { [data-input-otp] { letter-spacing: -.6em !important; font-weight: 100 !important; font-stretch: ultra-condensed; font-optical-sizing: none !important; left: -1px !important; right: 1px !important; } }"),$(he.sheet,"[data-input-otp] + * { pointer-events: all !important; }")}}let me=()=>{de&&de.style.setProperty("--root-height",`${te.clientHeight}px`)};me();let ye=new ResizeObserver(me);return ye.observe(te),()=>{document.removeEventListener("selectionchange",pe,{capture:!0}),ye.disconnect()}},[]);let[Q,q]=React__namespace.useState(!1),[W,G]=React__namespace.useState(!1),[K,J]=React__namespace.useState(null),[ee,ne]=React__namespace.useState(null);React__namespace.useEffect(()=>{ht(()=>{var te,de,pe,me;(te=V.current)==null||te.dispatchEvent(new Event("input"));let ye=(de=V.current)==null?void 0:de.selectionStart,he=(pe=V.current)==null?void 0:pe.selectionEnd,ge=(me=V.current)==null?void 0:me.selectionDirection;ye!==null&&he!==null&&(J(ye),ne(he),U.current.prev=[ye,he,ge])})},[D,W]),React__namespace.useEffect(()=>{F!==void 0&&D!==F&&F.length<l&&D.length===l&&(m==null||m(D))},[l,m,F,D]);let ae=Tt({containerRef:H,inputRef:V,pushPasswordManagerStrategy:g,isFocused:W}),oe=React__namespace.useCallback(te=>{let de=te.currentTarget.value.slice(0,l);if(de.length>0&&B&&!B.test(de)){te.preventDefault();return}typeof F=="string"&&de.length<F.length&&document.dispatchEvent(new Event("selectionchange")),L(de)},[l,L,F,B]),se=React__namespace.useCallback(()=>{var te;if(V.current){let de=Math.min(V.current.value.length,l-1),pe=V.current.value.length;(te=V.current)==null||te.setSelectionRange(de,pe),J(de),ne(pe)}G(!0)},[l]),ce=React__namespace.useCallback(te=>{var de,pe;let me=V.current;if(!b&&(!z.current.isIOS||!te.clipboardData||!me))return;let ye=te.clipboardData.getData("text/plain"),he=b?b(ye):ye;te.preventDefault();let ge=(de=V.current)==null?void 0:de.selectionStart,Se=(pe=V.current)==null?void 0:pe.selectionEnd,ve=(ge!==Se?D.slice(0,ge)+he+D.slice(Se):D.slice(0,ge)+he+D.slice(ge)).slice(0,l);if(ve.length>0&&B&&!B.test(ve))return;me.value=ve,L(ve);let _e=Math.min(ve.length,l-1),xe=ve.length;me.setSelectionRange(_e,xe),J(_e),ne(xe)},[l,L,B,D]),ie=React__namespace.useMemo(()=>({position:"relative",cursor:C.disabled?"default":"text",userSelect:"none",WebkitUserSelect:"none",pointerEvents:"none"}),[C.disabled]),ue=React__namespace.useMemo(()=>({position:"absolute",inset:0,width:ae.willPushPWMBadge?`calc(100% + ${ae.PWM_BADGE_SPACE_WIDTH})`:"100%",clipPath:ae.willPushPWMBadge?`inset(0 ${ae.PWM_BADGE_SPACE_WIDTH} 0 0)`:void 0,height:"100%",display:"flex",textAlign:u,opacity:"1",color:"transparent",pointerEvents:"all",background:"transparent",caretColor:"transparent",border:"0 solid transparent",outline:"0 solid transparent",boxShadow:"none",lineHeight:"1",letterSpacing:"-.5em",fontSize:"var(--root-height)",fontFamily:"monospace",fontVariantNumeric:"tabular-nums"}),[ae.PWM_BADGE_SPACE_WIDTH,ae.willPushPWMBadge,u]),le=React__namespace.useMemo(()=>React__namespace.createElement("input",bt(St({autoComplete:C.autoComplete||"one-time-code"},C),{"data-input-otp":!0,"data-input-otp-placeholder-shown":D.length===0||void 0,"data-input-otp-mss":K,"data-input-otp-mse":ee,inputMode:p,pattern:B==null?void 0:B.source,"aria-placeholder":f,style:ue,maxLength:l,value:D,ref:V,onPaste:te=>{var de;ce(te),(de=C.onPaste)==null||de.call(C,te)},onChange:oe,onMouseOver:te=>{var de;q(!0),(de=C.onMouseOver)==null||de.call(C,te)},onMouseLeave:te=>{var de;q(!1),(de=C.onMouseLeave)==null||de.call(C,te)},onFocus:te=>{var de;se(),(de=C.onFocus)==null||de.call(C,te)},onBlur:te=>{var de;G(!1),(de=C.onBlur)==null||de.call(C,te)}})),[oe,se,ce,p,ue,l,ee,K,C,B==null?void 0:B.source,D]),Z=React__namespace.useMemo(()=>({slots:Array.from({length:l}).map((te,de)=>{var pe;let me=W&&K!==null&&ee!==null&&(K===ee&&de===K||de>=K&&de<ee),ye=D[de]!==void 0?D[de]:null,he=D[0]!==void 0?null:(pe=f==null?void 0:f[de])!=null?pe:null;return{char:ye,placeholderChar:he,isActive:me,hasFakeCaret:me&&ye===null}}),isFocused:W,isHovering:!C.disabled&&Q}),[W,Q,l,ee,K,C.disabled,D]),fe=React__namespace.useMemo(()=>E?E(Z):React__namespace.createElement(jt.Provider,{value:Z},S),[S,Z,E]);return React__namespace.createElement(React__namespace.Fragment,null,R!==null&&React__namespace.createElement("noscript",null,React__namespace.createElement("style",null,R)),React__namespace.createElement("div",{ref:H,"data-input-otp-container":!0,style:ie,className:_},fe,React__namespace.createElement("div",{style:{position:"absolute",inset:0,pointerEvents:"none"}},le)))});Lt.displayName="Input";function $(e,t){try{e.insertRule(t)}catch{console.error("input-otp could not insert CSS rule:",t)}}var Nt=`
|
|
1
|
+
(function(e,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("react/jsx-runtime"),require("react"),require("react-dom"),require("react-router-dom")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","react-dom","react-router-dom"],t):(e=typeof globalThis<"u"?globalThis:e||self,t(e.randmarcomps={},e.jsxRuntime,e.React,e.ReactDOM,e["react-router-dom"]))})(this,function(exports,jsxRuntime,React,ReactDOM,reactRouterDom){"use strict";var je=Object.defineProperty;var Ne=(e,t,n)=>t in e?je(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Ie=(e,t,n)=>Ne(e,typeof t!="symbol"?t+"":t,n);function _interopNamespaceDefault(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,i.get?i:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const React__namespace=_interopNamespaceDefault(React),ReactDOM__namespace=_interopNamespaceDefault(ReactDOM);var Bt=Object.defineProperty,At=Object.defineProperties,kt=Object.getOwnPropertyDescriptors,Y=Object.getOwnPropertySymbols,gt=Object.prototype.hasOwnProperty,Et=Object.prototype.propertyIsEnumerable,vt=(e,t,n)=>t in e?Bt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,St=(e,t)=>{for(var n in t||(t={}))gt.call(t,n)&&vt(e,n,t[n]);if(Y)for(var n of Y(t))Et.call(t,n)&&vt(e,n,t[n]);return e},bt=(e,t)=>At(e,kt(t)),Pt=(e,t)=>{var n={};for(var i in e)gt.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(e!=null&&Y)for(var i of Y(e))t.indexOf(i)<0&&Et.call(e,i)&&(n[i]=e[i]);return n};function ht(e){let t=setTimeout(e,0),n=setTimeout(e,10),i=setTimeout(e,50);return[t,n,i]}function _t(e){let t=React__namespace.useRef();return React__namespace.useEffect(()=>{t.current=e}),t.current}var Ot=18,wt=40,Gt=`${wt}px`,xt=["[data-lastpass-icon-root]","com-1password-button","[data-dashlanecreated]",'[style$="2147483647 !important;"]'].join(",");function Tt({containerRef:e,inputRef:t,pushPasswordManagerStrategy:n,isFocused:i}){let[o,l]=React__namespace.useState(!1),[u,d]=React__namespace.useState(!1),[f,p]=React__namespace.useState(!1),m=React__namespace.useMemo(()=>n==="none"?!1:(n==="increase-width"||n==="experimental-no-flickering")&&o&&u,[o,u,n]),g=React__namespace.useCallback(()=>{let b=e.current,_=t.current;if(!b||!_||f||n==="none")return;let R=b,E=R.getBoundingClientRect().left+R.offsetWidth,S=R.getBoundingClientRect().top+R.offsetHeight/2,C=E-Ot,T=S;document.querySelectorAll(xt).length===0&&document.elementFromPoint(C,T)===b||(l(!0),p(!0))},[e,t,f,n]);return React__namespace.useEffect(()=>{let b=e.current;if(!b||n==="none")return;function _(){let E=window.innerWidth-b.getBoundingClientRect().right;d(E>=wt)}_();let R=setInterval(_,1e3);return()=>{clearInterval(R)}},[e,n]),React__namespace.useEffect(()=>{let b=i||document.activeElement===t.current;if(n==="none"||!b)return;let _=setTimeout(g,0),R=setTimeout(g,2e3),E=setTimeout(g,5e3),S=setTimeout(()=>{p(!0)},6e3);return()=>{clearTimeout(_),clearTimeout(R),clearTimeout(E),clearTimeout(S)}},[t,i,n,g]),{hasPWMBadge:o,willPushPWMBadge:m,PWM_BADGE_SPACE_WIDTH:Gt}}var jt=React__namespace.createContext({}),Lt=React__namespace.forwardRef((e,t)=>{var n=e,{value:i,onChange:o,maxLength:l,textAlign:u="left",pattern:d,placeholder:f,inputMode:p="numeric",onComplete:m,pushPasswordManagerStrategy:g="increase-width",pasteTransformer:b,containerClassName:_,noScriptCSSFallback:R=Nt,render:E,children:S}=n,C=Pt(n,["value","onChange","maxLength","textAlign","pattern","placeholder","inputMode","onComplete","pushPasswordManagerStrategy","pasteTransformer","containerClassName","noScriptCSSFallback","render","children"]),T,A,M,I,O;let[N,j]=React__namespace.useState(typeof C.defaultValue=="string"?C.defaultValue:""),D=i??N,F=_t(D),L=React__namespace.useCallback(te=>{o==null||o(te),j(te)},[o]),B=React__namespace.useMemo(()=>d?typeof d=="string"?new RegExp(d):d:null,[d]),V=React__namespace.useRef(null),H=React__namespace.useRef(null),z=React__namespace.useRef({value:D,onChange:L,isIOS:typeof window<"u"&&((A=(T=window==null?void 0:window.CSS)==null?void 0:T.supports)==null?void 0:A.call(T,"-webkit-touch-callout","none"))}),U=React__namespace.useRef({prev:[(M=V.current)==null?void 0:M.selectionStart,(I=V.current)==null?void 0:I.selectionEnd,(O=V.current)==null?void 0:O.selectionDirection]});React__namespace.useImperativeHandle(t,()=>V.current,[]),React__namespace.useEffect(()=>{let te=V.current,de=H.current;if(!te||!de)return;z.current.value!==te.value&&z.current.onChange(te.value),U.current.prev=[te.selectionStart,te.selectionEnd,te.selectionDirection];function pe(){if(document.activeElement!==te){J(null),ne(null);return}let he=te.selectionStart,ge=te.selectionEnd,Se=te.selectionDirection,ve=te.maxLength,_e=te.value,xe=U.current.prev,be=-1,Re=-1,Pe;if(_e.length!==0&&he!==null&&ge!==null){let Me=he===ge,Oe=he===_e.length&&_e.length<ve;if(Me&&!Oe){let Ce=he;if(Ce===0)be=0,Re=1,Pe="forward";else if(Ce===ve)be=Ce-1,Re=Ce,Pe="backward";else if(ve>1&&_e.length>1){let Ae=0;if(xe[0]!==null&&xe[1]!==null){Pe=Ce<xe[1]?"backward":"forward";let $e=xe[0]===xe[1]&&xe[0]<ve;Pe==="backward"&&!$e&&(Ae=-1)}be=Ae+Ce,Re=Ae+Ce+1}}be!==-1&&Re!==-1&&be!==Re&&V.current.setSelectionRange(be,Re,Pe)}let we=be!==-1?be:he,Ee=Re!==-1?Re:ge,Te=Pe??Se;J(we),ne(Ee),U.current.prev=[we,Ee,Te]}if(document.addEventListener("selectionchange",pe,{capture:!0}),pe(),document.activeElement===te&&G(!0),!document.getElementById("input-otp-style")){let he=document.createElement("style");if(he.id="input-otp-style",document.head.appendChild(he),he.sheet){let ge="background: transparent !important; color: transparent !important; border-color: transparent !important; opacity: 0 !important; box-shadow: none !important; -webkit-box-shadow: none !important; -webkit-text-fill-color: transparent !important;";$(he.sheet,"[data-input-otp]::selection { background: transparent !important; color: transparent !important; }"),$(he.sheet,`[data-input-otp]:autofill { ${ge} }`),$(he.sheet,`[data-input-otp]:-webkit-autofill { ${ge} }`),$(he.sheet,"@supports (-webkit-touch-callout: none) { [data-input-otp] { letter-spacing: -.6em !important; font-weight: 100 !important; font-stretch: ultra-condensed; font-optical-sizing: none !important; left: -1px !important; right: 1px !important; } }"),$(he.sheet,"[data-input-otp] + * { pointer-events: all !important; }")}}let me=()=>{de&&de.style.setProperty("--root-height",`${te.clientHeight}px`)};me();let ye=new ResizeObserver(me);return ye.observe(te),()=>{document.removeEventListener("selectionchange",pe,{capture:!0}),ye.disconnect()}},[]);let[Q,q]=React__namespace.useState(!1),[W,G]=React__namespace.useState(!1),[K,J]=React__namespace.useState(null),[ee,ne]=React__namespace.useState(null);React__namespace.useEffect(()=>{ht(()=>{var te,de,pe,me;(te=V.current)==null||te.dispatchEvent(new Event("input"));let ye=(de=V.current)==null?void 0:de.selectionStart,he=(pe=V.current)==null?void 0:pe.selectionEnd,ge=(me=V.current)==null?void 0:me.selectionDirection;ye!==null&&he!==null&&(J(ye),ne(he),U.current.prev=[ye,he,ge])})},[D,W]),React__namespace.useEffect(()=>{F!==void 0&&D!==F&&F.length<l&&D.length===l&&(m==null||m(D))},[l,m,F,D]);let ae=Tt({containerRef:H,inputRef:V,pushPasswordManagerStrategy:g,isFocused:W}),oe=React__namespace.useCallback(te=>{let de=te.currentTarget.value.slice(0,l);if(de.length>0&&B&&!B.test(de)){te.preventDefault();return}typeof F=="string"&&de.length<F.length&&document.dispatchEvent(new Event("selectionchange")),L(de)},[l,L,F,B]),se=React__namespace.useCallback(()=>{var te;if(V.current){let de=Math.min(V.current.value.length,l-1),pe=V.current.value.length;(te=V.current)==null||te.setSelectionRange(de,pe),J(de),ne(pe)}G(!0)},[l]),ce=React__namespace.useCallback(te=>{var de,pe;let me=V.current;if(!b&&(!z.current.isIOS||!te.clipboardData||!me))return;let ye=te.clipboardData.getData("text/plain"),he=b?b(ye):ye;te.preventDefault();let ge=(de=V.current)==null?void 0:de.selectionStart,Se=(pe=V.current)==null?void 0:pe.selectionEnd,ve=(ge!==Se?D.slice(0,ge)+he+D.slice(Se):D.slice(0,ge)+he+D.slice(ge)).slice(0,l);if(ve.length>0&&B&&!B.test(ve))return;me.value=ve,L(ve);let _e=Math.min(ve.length,l-1),xe=ve.length;me.setSelectionRange(_e,xe),J(_e),ne(xe)},[l,L,B,D]),ie=React__namespace.useMemo(()=>({position:"relative",cursor:C.disabled?"default":"text",userSelect:"none",WebkitUserSelect:"none",pointerEvents:"none"}),[C.disabled]),ue=React__namespace.useMemo(()=>({position:"absolute",inset:0,width:ae.willPushPWMBadge?`calc(100% + ${ae.PWM_BADGE_SPACE_WIDTH})`:"100%",clipPath:ae.willPushPWMBadge?`inset(0 ${ae.PWM_BADGE_SPACE_WIDTH} 0 0)`:void 0,height:"100%",display:"flex",textAlign:u,opacity:"1",color:"transparent",pointerEvents:"all",background:"transparent",caretColor:"transparent",border:"0 solid transparent",outline:"0 solid transparent",boxShadow:"none",lineHeight:"1",letterSpacing:"-.5em",fontSize:"var(--root-height)",fontFamily:"monospace",fontVariantNumeric:"tabular-nums"}),[ae.PWM_BADGE_SPACE_WIDTH,ae.willPushPWMBadge,u]),le=React__namespace.useMemo(()=>React__namespace.createElement("input",bt(St({autoComplete:C.autoComplete||"one-time-code"},C),{"data-input-otp":!0,"data-input-otp-placeholder-shown":D.length===0||void 0,"data-input-otp-mss":K,"data-input-otp-mse":ee,inputMode:p,pattern:B==null?void 0:B.source,"aria-placeholder":f,style:ue,maxLength:l,value:D,ref:V,onPaste:te=>{var de;ce(te),(de=C.onPaste)==null||de.call(C,te)},onChange:oe,onMouseOver:te=>{var de;q(!0),(de=C.onMouseOver)==null||de.call(C,te)},onMouseLeave:te=>{var de;q(!1),(de=C.onMouseLeave)==null||de.call(C,te)},onFocus:te=>{var de;se(),(de=C.onFocus)==null||de.call(C,te)},onBlur:te=>{var de;G(!1),(de=C.onBlur)==null||de.call(C,te)}})),[oe,se,ce,p,ue,l,ee,K,C,B==null?void 0:B.source,D]),Z=React__namespace.useMemo(()=>({slots:Array.from({length:l}).map((te,de)=>{var pe;let me=W&&K!==null&&ee!==null&&(K===ee&&de===K||de>=K&&de<ee),ye=D[de]!==void 0?D[de]:null,he=D[0]!==void 0?null:(pe=f==null?void 0:f[de])!=null?pe:null;return{char:ye,placeholderChar:he,isActive:me,hasFakeCaret:me&&ye===null}}),isFocused:W,isHovering:!C.disabled&&Q}),[W,Q,l,ee,K,C.disabled,D]),fe=React__namespace.useMemo(()=>E?E(Z):React__namespace.createElement(jt.Provider,{value:Z},S),[S,Z,E]);return React__namespace.createElement(React__namespace.Fragment,null,R!==null&&React__namespace.createElement("noscript",null,React__namespace.createElement("style",null,R)),React__namespace.createElement("div",{ref:H,"data-input-otp-container":!0,style:ie,className:_},fe,React__namespace.createElement("div",{style:{position:"absolute",inset:0,pointerEvents:"none"}},le)))});Lt.displayName="Input";function $(e,t){try{e.insertRule(t)}catch{console.error("input-otp could not insert CSS rule:",t)}}var Nt=`
|
|
2
2
|
[data-input-otp] {
|
|
3
3
|
--nojs-bg: white !important;
|
|
4
4
|
--nojs-fg: black !important;
|
|
@@ -42,82 +42,102 @@
|
|
|
42
42
|
*
|
|
43
43
|
* This source code is licensed under the ISC license.
|
|
44
44
|
* See the LICENSE file in the root directory of this source tree.
|
|
45
|
-
*/const __iconNode$
|
|
45
|
+
*/const __iconNode$u=[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]],Bot=createLucideIcon("Bot",__iconNode$u);/**
|
|
46
46
|
* @license lucide-react v0.479.0 - ISC
|
|
47
47
|
*
|
|
48
48
|
* This source code is licensed under the ISC license.
|
|
49
49
|
* See the LICENSE file in the root directory of this source tree.
|
|
50
|
-
*/const __iconNode$
|
|
50
|
+
*/const __iconNode$t=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Check=createLucideIcon("Check",__iconNode$t);/**
|
|
51
51
|
* @license lucide-react v0.479.0 - ISC
|
|
52
52
|
*
|
|
53
53
|
* This source code is licensed under the ISC license.
|
|
54
54
|
* See the LICENSE file in the root directory of this source tree.
|
|
55
|
-
*/const __iconNode$
|
|
55
|
+
*/const __iconNode$s=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],ChevronRight=createLucideIcon("ChevronRight",__iconNode$s);/**
|
|
56
56
|
* @license lucide-react v0.479.0 - ISC
|
|
57
57
|
*
|
|
58
58
|
* This source code is licensed under the ISC license.
|
|
59
59
|
* See the LICENSE file in the root directory of this source tree.
|
|
60
|
-
*/const __iconNode$
|
|
60
|
+
*/const __iconNode$r=[["path",{d:"M10.1 2.182a10 10 0 0 1 3.8 0",key:"5ilxe3"}],["path",{d:"M13.9 21.818a10 10 0 0 1-3.8 0",key:"11zvb9"}],["path",{d:"M17.609 3.721a10 10 0 0 1 2.69 2.7",key:"1iw5b2"}],["path",{d:"M2.182 13.9a10 10 0 0 1 0-3.8",key:"c0bmvh"}],["path",{d:"M20.279 17.609a10 10 0 0 1-2.7 2.69",key:"1ruxm7"}],["path",{d:"M21.818 10.1a10 10 0 0 1 0 3.8",key:"qkgqxc"}],["path",{d:"M3.721 6.391a10 10 0 0 1 2.7-2.69",key:"1mcia2"}],["path",{d:"M6.391 20.279a10 10 0 0 1-2.69-2.7",key:"1fvljs"}]],CircleDashed=createLucideIcon("CircleDashed",__iconNode$r);/**
|
|
61
61
|
* @license lucide-react v0.479.0 - ISC
|
|
62
62
|
*
|
|
63
63
|
* This source code is licensed under the ISC license.
|
|
64
64
|
* See the LICENSE file in the root directory of this source tree.
|
|
65
|
-
*/const __iconNode$
|
|
65
|
+
*/const __iconNode$q=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],Circle=createLucideIcon("Circle",__iconNode$q);/**
|
|
66
66
|
* @license lucide-react v0.479.0 - ISC
|
|
67
67
|
*
|
|
68
68
|
* This source code is licensed under the ISC license.
|
|
69
69
|
* See the LICENSE file in the root directory of this source tree.
|
|
70
|
-
*/const __iconNode$
|
|
70
|
+
*/const __iconNode$p=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],Copy=createLucideIcon("Copy",__iconNode$p);/**
|
|
71
71
|
* @license lucide-react v0.479.0 - ISC
|
|
72
72
|
*
|
|
73
73
|
* This source code is licensed under the ISC license.
|
|
74
74
|
* See the LICENSE file in the root directory of this source tree.
|
|
75
|
-
*/const __iconNode$
|
|
75
|
+
*/const __iconNode$o=[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]],Download=createLucideIcon("Download",__iconNode$o);/**
|
|
76
76
|
* @license lucide-react v0.479.0 - ISC
|
|
77
77
|
*
|
|
78
78
|
* This source code is licensed under the ISC license.
|
|
79
79
|
* See the LICENSE file in the root directory of this source tree.
|
|
80
|
-
*/const __iconNode$
|
|
80
|
+
*/const __iconNode$n=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}]],EllipsisVertical=createLucideIcon("EllipsisVertical",__iconNode$n);/**
|
|
81
81
|
* @license lucide-react v0.479.0 - ISC
|
|
82
82
|
*
|
|
83
83
|
* This source code is licensed under the ISC license.
|
|
84
84
|
* See the LICENSE file in the root directory of this source tree.
|
|
85
|
-
*/const __iconNode$
|
|
85
|
+
*/const __iconNode$m=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],Ellipsis=createLucideIcon("Ellipsis",__iconNode$m);/**
|
|
86
86
|
* @license lucide-react v0.479.0 - ISC
|
|
87
87
|
*
|
|
88
88
|
* This source code is licensed under the ISC license.
|
|
89
89
|
* See the LICENSE file in the root directory of this source tree.
|
|
90
|
-
*/const __iconNode$
|
|
90
|
+
*/const __iconNode$l=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],Eye=createLucideIcon("Eye",__iconNode$l);/**
|
|
91
91
|
* @license lucide-react v0.479.0 - ISC
|
|
92
92
|
*
|
|
93
93
|
* This source code is licensed under the ISC license.
|
|
94
94
|
* See the LICENSE file in the root directory of this source tree.
|
|
95
|
-
*/const __iconNode$
|
|
95
|
+
*/const __iconNode$k=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],Globe=createLucideIcon("Globe",__iconNode$k);/**
|
|
96
96
|
* @license lucide-react v0.479.0 - ISC
|
|
97
97
|
*
|
|
98
98
|
* This source code is licensed under the ISC license.
|
|
99
99
|
* See the LICENSE file in the root directory of this source tree.
|
|
100
|
-
*/const __iconNode$
|
|
100
|
+
*/const __iconNode$j=[["path",{d:"m11 17 2 2a1 1 0 1 0 3-3",key:"efffak"}],["path",{d:"m14 14 2.5 2.5a1 1 0 1 0 3-3l-3.88-3.88a3 3 0 0 0-4.24 0l-.88.88a1 1 0 1 1-3-3l2.81-2.81a5.79 5.79 0 0 1 7.06-.87l.47.28a2 2 0 0 0 1.42.25L21 4",key:"9pr0kb"}],["path",{d:"m21 3 1 11h-2",key:"1tisrp"}],["path",{d:"M3 3 2 14l6.5 6.5a1 1 0 1 0 3-3",key:"1uvwmv"}],["path",{d:"M3 4h8",key:"1ep09j"}]],Handshake=createLucideIcon("Handshake",__iconNode$j);/**
|
|
101
101
|
* @license lucide-react v0.479.0 - ISC
|
|
102
102
|
*
|
|
103
103
|
* This source code is licensed under the ISC license.
|
|
104
104
|
* See the LICENSE file in the root directory of this source tree.
|
|
105
|
-
*/const __iconNode$
|
|
105
|
+
*/const __iconNode$i=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],LoaderCircle=createLucideIcon("LoaderCircle",__iconNode$i);/**
|
|
106
106
|
* @license lucide-react v0.479.0 - ISC
|
|
107
107
|
*
|
|
108
108
|
* This source code is licensed under the ISC license.
|
|
109
109
|
* See the LICENSE file in the root directory of this source tree.
|
|
110
|
-
*/const __iconNode$
|
|
110
|
+
*/const __iconNode$h=[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]],LogOut=createLucideIcon("LogOut",__iconNode$h);/**
|
|
111
111
|
* @license lucide-react v0.479.0 - ISC
|
|
112
112
|
*
|
|
113
113
|
* This source code is licensed under the ISC license.
|
|
114
114
|
* See the LICENSE file in the root directory of this source tree.
|
|
115
|
-
*/const __iconNode$
|
|
115
|
+
*/const __iconNode$g=[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]],Mail=createLucideIcon("Mail",__iconNode$g);/**
|
|
116
116
|
* @license lucide-react v0.479.0 - ISC
|
|
117
117
|
*
|
|
118
118
|
* This source code is licensed under the ISC license.
|
|
119
119
|
* See the LICENSE file in the root directory of this source tree.
|
|
120
|
-
*/const __iconNode$
|
|
120
|
+
*/const __iconNode$f=[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]],Menu$1=createLucideIcon("Menu",__iconNode$f);/**
|
|
121
|
+
* @license lucide-react v0.479.0 - ISC
|
|
122
|
+
*
|
|
123
|
+
* This source code is licensed under the ISC license.
|
|
124
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
125
|
+
*/const __iconNode$e=[["path",{d:"M19 15v-2a2 2 0 1 0-4 0v2",key:"h3d1vz"}],["path",{d:"M9 17H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v3.5",key:"xsnnhn"}],["rect",{x:"13",y:"15",width:"8",height:"5",rx:"1",key:"1ccwuk"}]],MessageSquareLock=createLucideIcon("MessageSquareLock",__iconNode$e);/**
|
|
126
|
+
* @license lucide-react v0.479.0 - ISC
|
|
127
|
+
*
|
|
128
|
+
* This source code is licensed under the ISC license.
|
|
129
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
130
|
+
*/const __iconNode$d=[["path",{d:"M5 12h14",key:"1ays0h"}]],Minus=createLucideIcon("Minus",__iconNode$d);/**
|
|
131
|
+
* @license lucide-react v0.479.0 - ISC
|
|
132
|
+
*
|
|
133
|
+
* This source code is licensed under the ISC license.
|
|
134
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
135
|
+
*/const __iconNode$c=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],PanelLeft=createLucideIcon("PanelLeft",__iconNode$c);/**
|
|
136
|
+
* @license lucide-react v0.479.0 - ISC
|
|
137
|
+
*
|
|
138
|
+
* This source code is licensed under the ISC license.
|
|
139
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
140
|
+
*/const __iconNode$b=[["path",{d:"M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z",key:"foiqr5"}]],Phone=createLucideIcon("Phone",__iconNode$b);/**
|
|
121
141
|
* @license lucide-react v0.479.0 - ISC
|
|
122
142
|
*
|
|
123
143
|
* This source code is licensed under the ISC license.
|
|
@@ -216,7 +236,7 @@
|
|
|
216
236
|
|
|
217
237
|
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
218
238
|
|
|
219
|
-
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return React__namespace.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},DESCRIPTION_WARNING_NAME="DialogDescriptionWarning",DescriptionWarning=({contentRef:e,descriptionId:t})=>{const i=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${useWarningContext(DESCRIPTION_WARNING_NAME).contentName}}.`;return React__namespace.useEffect(()=>{var l;const o=(l=e.current)==null?void 0:l.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(i))},[i,e,t]),null},Root$7=Dialog$1,Trigger$3=DialogTrigger$1,Portal$2=DialogPortal$1,Overlay=DialogOverlay$1,Content$2=DialogContent$1,Title$1=DialogTitle$1,Description$1=DialogDescription$1,Close$1=DialogClose$1;const Dialog=({modal:e=!1,...t})=>jsxRuntime.jsx(Root$7,{modal:e,...t});Dialog.displayName=Root$7.displayName;const DialogTrigger=Trigger$3,DialogPortal=Portal$2,DialogClose=Close$1,DialogOverlay=React__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx(Overlay,{ref:n,className:cn("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));DialogOverlay.displayName=Overlay.displayName;const DialogContent=React__namespace.forwardRef(({className:e,children:t,animateExit:n=!0,...i},o)=>jsxRuntime.jsxs(DialogPortal,{forceMount:i.forceMount,children:[jsxRuntime.jsx(DialogOverlay,{}),jsxRuntime.jsxs(Content$2,{ref:o,className:cn("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-2xl shadow-primary duration-200 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",n&&"data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%]",e),...i,children:[t,jsxRuntime.jsxs(Close$1,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[jsxRuntime.jsx(X,{className:"h-4 w-4"}),jsxRuntime.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));DialogContent.displayName=Content$2.displayName;const DialogHeader=({className:e,...t})=>jsxRuntime.jsx("div",{className:cn("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});DialogHeader.displayName="DialogHeader";const DialogFooter=({className:e,...t})=>jsxRuntime.jsx("div",{className:cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});DialogFooter.displayName="DialogFooter";const DialogTitle=React__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx(Title$1,{ref:n,className:cn("text-lg font-semibold leading-none tracking-tight",e),...t}));DialogTitle.displayName=Title$1.displayName;const DialogDescription=React__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx(Description$1,{ref:n,className:cn("text-sm text-muted-foreground",e),...t}));DialogDescription.displayName=Description$1.displayName;function createCollection(e){const t=e+"CollectionProvider",[n,i]=createContextScope(t),[o,l]=n(t,{collectionRef:{current:null},itemMap:new Map}),u=E=>{const{scope:S,children:C}=E,T=React.useRef(null),A=React.useRef(new Map).current;return jsxRuntime.jsx(o,{scope:S,itemMap:A,collectionRef:T,children:C})};u.displayName=t;const d=e+"CollectionSlot",f=createSlot(d),p=React.forwardRef((E,S)=>{const{scope:C,children:T}=E,A=l(d,C),M=useComposedRefs(S,A.collectionRef);return jsxRuntime.jsx(f,{ref:M,children:T})});p.displayName=d;const m=e+"CollectionItemSlot",g="data-radix-collection-item",b=createSlot(m),_=React.forwardRef((E,S)=>{const{scope:C,children:T,...A}=E,M=React.useRef(null),I=useComposedRefs(S,M),O=l(m,C);return React.useEffect(()=>(O.itemMap.set(M,{ref:M,...A}),()=>void O.itemMap.delete(M))),jsxRuntime.jsx(b,{[g]:"",ref:I,children:T})});_.displayName=m;function R(E){const S=l(e+"CollectionConsumer",E);return React.useCallback(()=>{const T=S.collectionRef.current;if(!T)return[];const A=Array.from(T.querySelectorAll(`[${g}]`));return Array.from(S.itemMap.values()).sort((O,N)=>A.indexOf(O.ref.current)-A.indexOf(N.ref.current))},[S.collectionRef,S.itemMap])}return[{Provider:u,Slot:p,ItemSlot:_},R,i]}var DirectionContext=React__namespace.createContext(void 0);function useDirection(e){const t=React__namespace.useContext(DirectionContext);return e||t||"ltr"}const sides=["top","right","bottom","left"],min$2=Math.min,max$2=Math.max,round$1=Math.round,floor=Math.floor,createCoords=e=>({x:e,y:e}),oppositeSideMap={left:"right",right:"left",bottom:"top",top:"bottom"},oppositeAlignmentMap={start:"end",end:"start"};function clamp$1(e,t,n){return max$2(e,min$2(t,n))}function evaluate(e,t){return typeof e=="function"?e(t):e}function getSide(e){return e.split("-")[0]}function getAlignment(e){return e.split("-")[1]}function getOppositeAxis(e){return e==="x"?"y":"x"}function getAxisLength(e){return e==="y"?"height":"width"}function getSideAxis(e){return["top","bottom"].includes(getSide(e))?"y":"x"}function getAlignmentAxis(e){return getOppositeAxis(getSideAxis(e))}function getAlignmentSides(e,t,n){n===void 0&&(n=!1);const i=getAlignment(e),o=getAlignmentAxis(e),l=getAxisLength(o);let u=o==="x"?i===(n?"end":"start")?"right":"left":i==="start"?"bottom":"top";return t.reference[l]>t.floating[l]&&(u=getOppositePlacement(u)),[u,getOppositePlacement(u)]}function getExpandedPlacements(e){const t=getOppositePlacement(e);return[getOppositeAlignmentPlacement(e),t,getOppositeAlignmentPlacement(t)]}function getOppositeAlignmentPlacement(e){return e.replace(/start|end/g,t=>oppositeAlignmentMap[t])}function getSideList(e,t,n){const i=["left","right"],o=["right","left"],l=["top","bottom"],u=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:i:t?i:o;case"left":case"right":return t?l:u;default:return[]}}function getOppositeAxisPlacements(e,t,n,i){const o=getAlignment(e);let l=getSideList(getSide(e),n==="start",i);return o&&(l=l.map(u=>u+"-"+o),t&&(l=l.concat(l.map(getOppositeAlignmentPlacement)))),l}function getOppositePlacement(e){return e.replace(/left|right|bottom|top/g,t=>oppositeSideMap[t])}function expandPaddingObject(e){return{top:0,right:0,bottom:0,left:0,...e}}function getPaddingObject(e){return typeof e!="number"?expandPaddingObject(e):{top:e,right:e,bottom:e,left:e}}function rectToClientRect(e){const{x:t,y:n,width:i,height:o}=e;return{width:i,height:o,top:n,left:t,right:t+i,bottom:n+o,x:t,y:n}}function computeCoordsFromPlacement(e,t,n){let{reference:i,floating:o}=e;const l=getSideAxis(t),u=getAlignmentAxis(t),d=getAxisLength(u),f=getSide(t),p=l==="y",m=i.x+i.width/2-o.width/2,g=i.y+i.height/2-o.height/2,b=i[d]/2-o[d]/2;let _;switch(f){case"top":_={x:m,y:i.y-o.height};break;case"bottom":_={x:m,y:i.y+i.height};break;case"right":_={x:i.x+i.width,y:g};break;case"left":_={x:i.x-o.width,y:g};break;default:_={x:i.x,y:i.y}}switch(getAlignment(t)){case"start":_[u]-=b*(n&&p?-1:1);break;case"end":_[u]+=b*(n&&p?-1:1);break}return _}const computePosition$1=async(e,t,n)=>{const{placement:i="bottom",strategy:o="absolute",middleware:l=[],platform:u}=n,d=l.filter(Boolean),f=await(u.isRTL==null?void 0:u.isRTL(t));let p=await u.getElementRects({reference:e,floating:t,strategy:o}),{x:m,y:g}=computeCoordsFromPlacement(p,i,f),b=i,_={},R=0;for(let E=0;E<d.length;E++){const{name:S,fn:C}=d[E],{x:T,y:A,data:M,reset:I}=await C({x:m,y:g,initialPlacement:i,placement:b,strategy:o,middlewareData:_,rects:p,platform:u,elements:{reference:e,floating:t}});m=T??m,g=A??g,_={..._,[S]:{..._[S],...M}},I&&R<=50&&(R++,typeof I=="object"&&(I.placement&&(b=I.placement),I.rects&&(p=I.rects===!0?await u.getElementRects({reference:e,floating:t,strategy:o}):I.rects),{x:m,y:g}=computeCoordsFromPlacement(p,b,f)),E=-1)}return{x:m,y:g,placement:b,strategy:o,middlewareData:_}};async function detectOverflow(e,t){var n;t===void 0&&(t={});const{x:i,y:o,platform:l,rects:u,elements:d,strategy:f}=e,{boundary:p="clippingAncestors",rootBoundary:m="viewport",elementContext:g="floating",altBoundary:b=!1,padding:_=0}=evaluate(t,e),R=getPaddingObject(_),S=d[b?g==="floating"?"reference":"floating":g],C=rectToClientRect(await l.getClippingRect({element:(n=await(l.isElement==null?void 0:l.isElement(S)))==null||n?S:S.contextElement||await(l.getDocumentElement==null?void 0:l.getDocumentElement(d.floating)),boundary:p,rootBoundary:m,strategy:f})),T=g==="floating"?{x:i,y:o,width:u.floating.width,height:u.floating.height}:u.reference,A=await(l.getOffsetParent==null?void 0:l.getOffsetParent(d.floating)),M=await(l.isElement==null?void 0:l.isElement(A))?await(l.getScale==null?void 0:l.getScale(A))||{x:1,y:1}:{x:1,y:1},I=rectToClientRect(l.convertOffsetParentRelativeRectToViewportRelativeRect?await l.convertOffsetParentRelativeRectToViewportRelativeRect({elements:d,rect:T,offsetParent:A,strategy:f}):T);return{top:(C.top-I.top+R.top)/M.y,bottom:(I.bottom-C.bottom+R.bottom)/M.y,left:(C.left-I.left+R.left)/M.x,right:(I.right-C.right+R.right)/M.x}}const arrow$3=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:i,placement:o,rects:l,platform:u,elements:d,middlewareData:f}=t,{element:p,padding:m=0}=evaluate(e,t)||{};if(p==null)return{};const g=getPaddingObject(m),b={x:n,y:i},_=getAlignmentAxis(o),R=getAxisLength(_),E=await u.getDimensions(p),S=_==="y",C=S?"top":"left",T=S?"bottom":"right",A=S?"clientHeight":"clientWidth",M=l.reference[R]+l.reference[_]-b[_]-l.floating[R],I=b[_]-l.reference[_],O=await(u.getOffsetParent==null?void 0:u.getOffsetParent(p));let N=O?O[A]:0;(!N||!await(u.isElement==null?void 0:u.isElement(O)))&&(N=d.floating[A]||l.floating[R]);const j=M/2-I/2,D=N/2-E[R]/2-1,F=min$2(g[C],D),L=min$2(g[T],D),B=F,V=N-E[R]-L,H=N/2-E[R]/2+j,z=clamp$1(B,H,V),U=!f.arrow&&getAlignment(o)!=null&&H!==z&&l.reference[R]/2-(H<B?F:L)-E[R]/2<0,Q=U?H<B?H-B:H-V:0;return{[_]:b[_]+Q,data:{[_]:z,centerOffset:H-z-Q,...U&&{alignmentOffset:Q}},reset:U}}}),flip$2=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,i;const{placement:o,middlewareData:l,rects:u,initialPlacement:d,platform:f,elements:p}=t,{mainAxis:m=!0,crossAxis:g=!0,fallbackPlacements:b,fallbackStrategy:_="bestFit",fallbackAxisSideDirection:R="none",flipAlignment:E=!0,...S}=evaluate(e,t);if((n=l.arrow)!=null&&n.alignmentOffset)return{};const C=getSide(o),T=getSideAxis(d),A=getSide(d)===d,M=await(f.isRTL==null?void 0:f.isRTL(p.floating)),I=b||(A||!E?[getOppositePlacement(d)]:getExpandedPlacements(d)),O=R!=="none";!b&&O&&I.push(...getOppositeAxisPlacements(d,E,R,M));const N=[d,...I],j=await detectOverflow(t,S),D=[];let F=((i=l.flip)==null?void 0:i.overflows)||[];if(m&&D.push(j[C]),g){const H=getAlignmentSides(o,u,M);D.push(j[H[0]],j[H[1]])}if(F=[...F,{placement:o,overflows:D}],!D.every(H=>H<=0)){var L,B;const H=(((L=l.flip)==null?void 0:L.index)||0)+1,z=N[H];if(z)return{data:{index:H,overflows:F},reset:{placement:z}};let U=(B=F.filter(Q=>Q.overflows[0]<=0).sort((Q,q)=>Q.overflows[1]-q.overflows[1])[0])==null?void 0:B.placement;if(!U)switch(_){case"bestFit":{var V;const Q=(V=F.filter(q=>{if(O){const W=getSideAxis(q.placement);return W===T||W==="y"}return!0}).map(q=>[q.placement,q.overflows.filter(W=>W>0).reduce((W,G)=>W+G,0)]).sort((q,W)=>q[1]-W[1])[0])==null?void 0:V[0];Q&&(U=Q);break}case"initialPlacement":U=d;break}if(o!==U)return{reset:{placement:U}}}return{}}}};function getSideOffsets(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function isAnySideFullyClipped(e){return sides.some(t=>e[t]>=0)}const hide$2=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:i="referenceHidden",...o}=evaluate(e,t);switch(i){case"referenceHidden":{const l=await detectOverflow(t,{...o,elementContext:"reference"}),u=getSideOffsets(l,n.reference);return{data:{referenceHiddenOffsets:u,referenceHidden:isAnySideFullyClipped(u)}}}case"escaped":{const l=await detectOverflow(t,{...o,altBoundary:!0}),u=getSideOffsets(l,n.floating);return{data:{escapedOffsets:u,escaped:isAnySideFullyClipped(u)}}}default:return{}}}}};async function convertValueToCoords(e,t){const{placement:n,platform:i,elements:o}=e,l=await(i.isRTL==null?void 0:i.isRTL(o.floating)),u=getSide(n),d=getAlignment(n),f=getSideAxis(n)==="y",p=["left","top"].includes(u)?-1:1,m=l&&f?-1:1,g=evaluate(t,e);let{mainAxis:b,crossAxis:_,alignmentAxis:R}=typeof g=="number"?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:g.mainAxis||0,crossAxis:g.crossAxis||0,alignmentAxis:g.alignmentAxis};return d&&typeof R=="number"&&(_=d==="end"?R*-1:R),f?{x:_*m,y:b*p}:{x:b*p,y:_*m}}const offset$2=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,i;const{x:o,y:l,placement:u,middlewareData:d}=t,f=await convertValueToCoords(t,e);return u===((n=d.offset)==null?void 0:n.placement)&&(i=d.arrow)!=null&&i.alignmentOffset?{}:{x:o+f.x,y:l+f.y,data:{...f,placement:u}}}}},shift$2=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:i,placement:o}=t,{mainAxis:l=!0,crossAxis:u=!1,limiter:d={fn:S=>{let{x:C,y:T}=S;return{x:C,y:T}}},...f}=evaluate(e,t),p={x:n,y:i},m=await detectOverflow(t,f),g=getSideAxis(getSide(o)),b=getOppositeAxis(g);let _=p[b],R=p[g];if(l){const S=b==="y"?"top":"left",C=b==="y"?"bottom":"right",T=_+m[S],A=_-m[C];_=clamp$1(T,_,A)}if(u){const S=g==="y"?"top":"left",C=g==="y"?"bottom":"right",T=R+m[S],A=R-m[C];R=clamp$1(T,R,A)}const E=d.fn({...t,[b]:_,[g]:R});return{...E,data:{x:E.x-n,y:E.y-i,enabled:{[b]:l,[g]:u}}}}}},limitShift$2=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:i,placement:o,rects:l,middlewareData:u}=t,{offset:d=0,mainAxis:f=!0,crossAxis:p=!0}=evaluate(e,t),m={x:n,y:i},g=getSideAxis(o),b=getOppositeAxis(g);let _=m[b],R=m[g];const E=evaluate(d,t),S=typeof E=="number"?{mainAxis:E,crossAxis:0}:{mainAxis:0,crossAxis:0,...E};if(f){const A=b==="y"?"height":"width",M=l.reference[b]-l.floating[A]+S.mainAxis,I=l.reference[b]+l.reference[A]-S.mainAxis;_<M?_=M:_>I&&(_=I)}if(p){var C,T;const A=b==="y"?"width":"height",M=["top","left"].includes(getSide(o)),I=l.reference[g]-l.floating[A]+(M&&((C=u.offset)==null?void 0:C[g])||0)+(M?0:S.crossAxis),O=l.reference[g]+l.reference[A]+(M?0:((T=u.offset)==null?void 0:T[g])||0)-(M?S.crossAxis:0);R<I?R=I:R>O&&(R=O)}return{[b]:_,[g]:R}}}},size$2=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,i;const{placement:o,rects:l,platform:u,elements:d}=t,{apply:f=()=>{},...p}=evaluate(e,t),m=await detectOverflow(t,p),g=getSide(o),b=getAlignment(o),_=getSideAxis(o)==="y",{width:R,height:E}=l.floating;let S,C;g==="top"||g==="bottom"?(S=g,C=b===(await(u.isRTL==null?void 0:u.isRTL(d.floating))?"start":"end")?"left":"right"):(C=g,S=b==="end"?"top":"bottom");const T=E-m.top-m.bottom,A=R-m.left-m.right,M=min$2(E-m[S],T),I=min$2(R-m[C],A),O=!t.middlewareData.shift;let N=M,j=I;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(j=A),(i=t.middlewareData.shift)!=null&&i.enabled.y&&(N=T),O&&!b){const F=max$2(m.left,0),L=max$2(m.right,0),B=max$2(m.top,0),V=max$2(m.bottom,0);_?j=R-2*(F!==0||L!==0?F+L:max$2(m.left,m.right)):N=E-2*(B!==0||V!==0?B+V:max$2(m.top,m.bottom))}await f({...t,availableWidth:j,availableHeight:N});const D=await u.getDimensions(d.floating);return R!==D.width||E!==D.height?{reset:{rects:!0}}:{}}}};function hasWindow(){return typeof window<"u"}function getNodeName(e){return isNode(e)?(e.nodeName||"").toLowerCase():"#document"}function getWindow(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function getDocumentElement(e){var t;return(t=(isNode(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function isNode(e){return hasWindow()?e instanceof Node||e instanceof getWindow(e).Node:!1}function isElement(e){return hasWindow()?e instanceof Element||e instanceof getWindow(e).Element:!1}function isHTMLElement$1(e){return hasWindow()?e instanceof HTMLElement||e instanceof getWindow(e).HTMLElement:!1}function isShadowRoot(e){return!hasWindow()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof getWindow(e).ShadowRoot}function isOverflowElement(e){const{overflow:t,overflowX:n,overflowY:i,display:o}=getComputedStyle$1(e);return/auto|scroll|overlay|hidden|clip/.test(t+i+n)&&!["inline","contents"].includes(o)}function isTableElement(e){return["table","td","th"].includes(getNodeName(e))}function isTopLayer(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function isContainingBlock(e){const t=isWebKit(),n=isElement(e)?getComputedStyle$1(e):e;return["transform","translate","scale","rotate","perspective"].some(i=>n[i]?n[i]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(i=>(n.willChange||"").includes(i))||["paint","layout","strict","content"].some(i=>(n.contain||"").includes(i))}function getContainingBlock(e){let t=getParentNode(e);for(;isHTMLElement$1(t)&&!isLastTraversableNode(t);){if(isContainingBlock(t))return t;if(isTopLayer(t))return null;t=getParentNode(t)}return null}function isWebKit(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function isLastTraversableNode(e){return["html","body","#document"].includes(getNodeName(e))}function getComputedStyle$1(e){return getWindow(e).getComputedStyle(e)}function getNodeScroll(e){return isElement(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function getParentNode(e){if(getNodeName(e)==="html")return e;const t=e.assignedSlot||e.parentNode||isShadowRoot(e)&&e.host||getDocumentElement(e);return isShadowRoot(t)?t.host:t}function getNearestOverflowAncestor(e){const t=getParentNode(e);return isLastTraversableNode(t)?e.ownerDocument?e.ownerDocument.body:e.body:isHTMLElement$1(t)&&isOverflowElement(t)?t:getNearestOverflowAncestor(t)}function getOverflowAncestors(e,t,n){var i;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=getNearestOverflowAncestor(e),l=o===((i=e.ownerDocument)==null?void 0:i.body),u=getWindow(o);if(l){const d=getFrameElement(u);return t.concat(u,u.visualViewport||[],isOverflowElement(o)?o:[],d&&n?getOverflowAncestors(d):[])}return t.concat(o,getOverflowAncestors(o,[],n))}function getFrameElement(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function getCssDimensions(e){const t=getComputedStyle$1(e);let n=parseFloat(t.width)||0,i=parseFloat(t.height)||0;const o=isHTMLElement$1(e),l=o?e.offsetWidth:n,u=o?e.offsetHeight:i,d=round$1(n)!==l||round$1(i)!==u;return d&&(n=l,i=u),{width:n,height:i,$:d}}function unwrapElement(e){return isElement(e)?e:e.contextElement}function getScale(e){const t=unwrapElement(e);if(!isHTMLElement$1(t))return createCoords(1);const n=t.getBoundingClientRect(),{width:i,height:o,$:l}=getCssDimensions(t);let u=(l?round$1(n.width):n.width)/i,d=(l?round$1(n.height):n.height)/o;return(!u||!Number.isFinite(u))&&(u=1),(!d||!Number.isFinite(d))&&(d=1),{x:u,y:d}}const noOffsets=createCoords(0);function getVisualOffsets(e){const t=getWindow(e);return!isWebKit()||!t.visualViewport?noOffsets:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function shouldAddVisualOffsets(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==getWindow(e)?!1:t}function getBoundingClientRect(e,t,n,i){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),l=unwrapElement(e);let u=createCoords(1);t&&(i?isElement(i)&&(u=getScale(i)):u=getScale(e));const d=shouldAddVisualOffsets(l,n,i)?getVisualOffsets(l):createCoords(0);let f=(o.left+d.x)/u.x,p=(o.top+d.y)/u.y,m=o.width/u.x,g=o.height/u.y;if(l){const b=getWindow(l),_=i&&isElement(i)?getWindow(i):i;let R=b,E=getFrameElement(R);for(;E&&i&&_!==R;){const S=getScale(E),C=E.getBoundingClientRect(),T=getComputedStyle$1(E),A=C.left+(E.clientLeft+parseFloat(T.paddingLeft))*S.x,M=C.top+(E.clientTop+parseFloat(T.paddingTop))*S.y;f*=S.x,p*=S.y,m*=S.x,g*=S.y,f+=A,p+=M,R=getWindow(E),E=getFrameElement(R)}}return rectToClientRect({width:m,height:g,x:f,y:p})}function getWindowScrollBarX(e,t){const n=getNodeScroll(e).scrollLeft;return t?t.left+n:getBoundingClientRect(getDocumentElement(e)).left+n}function getHTMLOffset(e,t,n){n===void 0&&(n=!1);const i=e.getBoundingClientRect(),o=i.left+t.scrollLeft-(n?0:getWindowScrollBarX(e,i)),l=i.top+t.scrollTop;return{x:o,y:l}}function convertOffsetParentRelativeRectToViewportRelativeRect(e){let{elements:t,rect:n,offsetParent:i,strategy:o}=e;const l=o==="fixed",u=getDocumentElement(i),d=t?isTopLayer(t.floating):!1;if(i===u||d&&l)return n;let f={scrollLeft:0,scrollTop:0},p=createCoords(1);const m=createCoords(0),g=isHTMLElement$1(i);if((g||!g&&!l)&&((getNodeName(i)!=="body"||isOverflowElement(u))&&(f=getNodeScroll(i)),isHTMLElement$1(i))){const _=getBoundingClientRect(i);p=getScale(i),m.x=_.x+i.clientLeft,m.y=_.y+i.clientTop}const b=u&&!g&&!l?getHTMLOffset(u,f,!0):createCoords(0);return{width:n.width*p.x,height:n.height*p.y,x:n.x*p.x-f.scrollLeft*p.x+m.x+b.x,y:n.y*p.y-f.scrollTop*p.y+m.y+b.y}}function getClientRects(e){return Array.from(e.getClientRects())}function getDocumentRect(e){const t=getDocumentElement(e),n=getNodeScroll(e),i=e.ownerDocument.body,o=max$2(t.scrollWidth,t.clientWidth,i.scrollWidth,i.clientWidth),l=max$2(t.scrollHeight,t.clientHeight,i.scrollHeight,i.clientHeight);let u=-n.scrollLeft+getWindowScrollBarX(e);const d=-n.scrollTop;return getComputedStyle$1(i).direction==="rtl"&&(u+=max$2(t.clientWidth,i.clientWidth)-o),{width:o,height:l,x:u,y:d}}function getViewportRect(e,t){const n=getWindow(e),i=getDocumentElement(e),o=n.visualViewport;let l=i.clientWidth,u=i.clientHeight,d=0,f=0;if(o){l=o.width,u=o.height;const p=isWebKit();(!p||p&&t==="fixed")&&(d=o.offsetLeft,f=o.offsetTop)}return{width:l,height:u,x:d,y:f}}function getInnerBoundingClientRect(e,t){const n=getBoundingClientRect(e,!0,t==="fixed"),i=n.top+e.clientTop,o=n.left+e.clientLeft,l=isHTMLElement$1(e)?getScale(e):createCoords(1),u=e.clientWidth*l.x,d=e.clientHeight*l.y,f=o*l.x,p=i*l.y;return{width:u,height:d,x:f,y:p}}function getClientRectFromClippingAncestor(e,t,n){let i;if(t==="viewport")i=getViewportRect(e,n);else if(t==="document")i=getDocumentRect(getDocumentElement(e));else if(isElement(t))i=getInnerBoundingClientRect(t,n);else{const o=getVisualOffsets(e);i={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return rectToClientRect(i)}function hasFixedPositionAncestor(e,t){const n=getParentNode(e);return n===t||!isElement(n)||isLastTraversableNode(n)?!1:getComputedStyle$1(n).position==="fixed"||hasFixedPositionAncestor(n,t)}function getClippingElementAncestors(e,t){const n=t.get(e);if(n)return n;let i=getOverflowAncestors(e,[],!1).filter(d=>isElement(d)&&getNodeName(d)!=="body"),o=null;const l=getComputedStyle$1(e).position==="fixed";let u=l?getParentNode(e):e;for(;isElement(u)&&!isLastTraversableNode(u);){const d=getComputedStyle$1(u),f=isContainingBlock(u);!f&&d.position==="fixed"&&(o=null),(l?!f&&!o:!f&&d.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||isOverflowElement(u)&&!f&&hasFixedPositionAncestor(e,u))?i=i.filter(m=>m!==u):o=d,u=getParentNode(u)}return t.set(e,i),i}function getClippingRect(e){let{element:t,boundary:n,rootBoundary:i,strategy:o}=e;const u=[...n==="clippingAncestors"?isTopLayer(t)?[]:getClippingElementAncestors(t,this._c):[].concat(n),i],d=u[0],f=u.reduce((p,m)=>{const g=getClientRectFromClippingAncestor(t,m,o);return p.top=max$2(g.top,p.top),p.right=min$2(g.right,p.right),p.bottom=min$2(g.bottom,p.bottom),p.left=max$2(g.left,p.left),p},getClientRectFromClippingAncestor(t,d,o));return{width:f.right-f.left,height:f.bottom-f.top,x:f.left,y:f.top}}function getDimensions(e){const{width:t,height:n}=getCssDimensions(e);return{width:t,height:n}}function getRectRelativeToOffsetParent(e,t,n){const i=isHTMLElement$1(t),o=getDocumentElement(t),l=n==="fixed",u=getBoundingClientRect(e,!0,l,t);let d={scrollLeft:0,scrollTop:0};const f=createCoords(0);if(i||!i&&!l)if((getNodeName(t)!=="body"||isOverflowElement(o))&&(d=getNodeScroll(t)),i){const b=getBoundingClientRect(t,!0,l,t);f.x=b.x+t.clientLeft,f.y=b.y+t.clientTop}else o&&(f.x=getWindowScrollBarX(o));const p=o&&!i&&!l?getHTMLOffset(o,d):createCoords(0),m=u.left+d.scrollLeft-f.x-p.x,g=u.top+d.scrollTop-f.y-p.y;return{x:m,y:g,width:u.width,height:u.height}}function isStaticPositioned(e){return getComputedStyle$1(e).position==="static"}function getTrueOffsetParent(e,t){if(!isHTMLElement$1(e)||getComputedStyle$1(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return getDocumentElement(e)===n&&(n=n.ownerDocument.body),n}function getOffsetParent(e,t){const n=getWindow(e);if(isTopLayer(e))return n;if(!isHTMLElement$1(e)){let o=getParentNode(e);for(;o&&!isLastTraversableNode(o);){if(isElement(o)&&!isStaticPositioned(o))return o;o=getParentNode(o)}return n}let i=getTrueOffsetParent(e,t);for(;i&&isTableElement(i)&&isStaticPositioned(i);)i=getTrueOffsetParent(i,t);return i&&isLastTraversableNode(i)&&isStaticPositioned(i)&&!isContainingBlock(i)?n:i||getContainingBlock(e)||n}const getElementRects=async function(e){const t=this.getOffsetParent||getOffsetParent,n=this.getDimensions,i=await n(e.floating);return{reference:getRectRelativeToOffsetParent(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function isRTL(e){return getComputedStyle$1(e).direction==="rtl"}const platform={convertOffsetParentRelativeRectToViewportRelativeRect,getDocumentElement,getClippingRect,getOffsetParent,getElementRects,getClientRects,getDimensions,getScale,isElement,isRTL};function rectsAreEqual(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function observeMove(e,t){let n=null,i;const o=getDocumentElement(e);function l(){var d;clearTimeout(i),(d=n)==null||d.disconnect(),n=null}function u(d,f){d===void 0&&(d=!1),f===void 0&&(f=1),l();const p=e.getBoundingClientRect(),{left:m,top:g,width:b,height:_}=p;if(d||t(),!b||!_)return;const R=floor(g),E=floor(o.clientWidth-(m+b)),S=floor(o.clientHeight-(g+_)),C=floor(m),A={rootMargin:-R+"px "+-E+"px "+-S+"px "+-C+"px",threshold:max$2(0,min$2(1,f))||1};let M=!0;function I(O){const N=O[0].intersectionRatio;if(N!==f){if(!M)return u();N?u(!1,N):i=setTimeout(()=>{u(!1,1e-7)},1e3)}N===1&&!rectsAreEqual(p,e.getBoundingClientRect())&&u(),M=!1}try{n=new IntersectionObserver(I,{...A,root:o.ownerDocument})}catch{n=new IntersectionObserver(I,A)}n.observe(e)}return u(!0),l}function autoUpdate(e,t,n,i){i===void 0&&(i={});const{ancestorScroll:o=!0,ancestorResize:l=!0,elementResize:u=typeof ResizeObserver=="function",layoutShift:d=typeof IntersectionObserver=="function",animationFrame:f=!1}=i,p=unwrapElement(e),m=o||l?[...p?getOverflowAncestors(p):[],...getOverflowAncestors(t)]:[];m.forEach(C=>{o&&C.addEventListener("scroll",n,{passive:!0}),l&&C.addEventListener("resize",n)});const g=p&&d?observeMove(p,n):null;let b=-1,_=null;u&&(_=new ResizeObserver(C=>{let[T]=C;T&&T.target===p&&_&&(_.unobserve(t),cancelAnimationFrame(b),b=requestAnimationFrame(()=>{var A;(A=_)==null||A.observe(t)})),n()}),p&&!f&&_.observe(p),_.observe(t));let R,E=f?getBoundingClientRect(e):null;f&&S();function S(){const C=getBoundingClientRect(e);E&&!rectsAreEqual(E,C)&&n(),E=C,R=requestAnimationFrame(S)}return n(),()=>{var C;m.forEach(T=>{o&&T.removeEventListener("scroll",n),l&&T.removeEventListener("resize",n)}),g==null||g(),(C=_)==null||C.disconnect(),_=null,f&&cancelAnimationFrame(R)}}const offset$1=offset$2,shift$1=shift$2,flip$1=flip$2,size$1=size$2,hide$1=hide$2,arrow$2=arrow$3,limitShift$1=limitShift$2,computePosition=(e,t,n)=>{const i=new Map,o={platform,...n},l={...o.platform,_c:i};return computePosition$1(e,t,{...o,platform:l})};var index=typeof document<"u"?React.useLayoutEffect:React.useEffect;function deepEqual$1(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,i,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(i=n;i--!==0;)if(!deepEqual$1(e[i],t[i]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(i=n;i--!==0;)if(!{}.hasOwnProperty.call(t,o[i]))return!1;for(i=n;i--!==0;){const l=o[i];if(!(l==="_owner"&&e.$$typeof)&&!deepEqual$1(e[l],t[l]))return!1}return!0}return e!==e&&t!==t}function getDPR(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function roundByDPR(e,t){const n=getDPR(e);return Math.round(t*n)/n}function useLatestRef(e){const t=React__namespace.useRef(e);return index(()=>{t.current=e}),t}function useFloating(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:i=[],platform:o,elements:{reference:l,floating:u}={},transform:d=!0,whileElementsMounted:f,open:p}=e,[m,g]=React__namespace.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[b,_]=React__namespace.useState(i);deepEqual$1(b,i)||_(i);const[R,E]=React__namespace.useState(null),[S,C]=React__namespace.useState(null),T=React__namespace.useCallback(q=>{q!==O.current&&(O.current=q,E(q))},[]),A=React__namespace.useCallback(q=>{q!==N.current&&(N.current=q,C(q))},[]),M=l||R,I=u||S,O=React__namespace.useRef(null),N=React__namespace.useRef(null),j=React__namespace.useRef(m),D=f!=null,F=useLatestRef(f),L=useLatestRef(o),B=useLatestRef(p),V=React__namespace.useCallback(()=>{if(!O.current||!N.current)return;const q={placement:t,strategy:n,middleware:b};L.current&&(q.platform=L.current),computePosition(O.current,N.current,q).then(W=>{const G={...W,isPositioned:B.current!==!1};H.current&&!deepEqual$1(j.current,G)&&(j.current=G,ReactDOM__namespace.flushSync(()=>{g(G)}))})},[b,t,n,L,B]);index(()=>{p===!1&&j.current.isPositioned&&(j.current.isPositioned=!1,g(q=>({...q,isPositioned:!1})))},[p]);const H=React__namespace.useRef(!1);index(()=>(H.current=!0,()=>{H.current=!1}),[]),index(()=>{if(M&&(O.current=M),I&&(N.current=I),M&&I){if(F.current)return F.current(M,I,V);V()}},[M,I,V,F,D]);const z=React__namespace.useMemo(()=>({reference:O,floating:N,setReference:T,setFloating:A}),[T,A]),U=React__namespace.useMemo(()=>({reference:M,floating:I}),[M,I]),Q=React__namespace.useMemo(()=>{const q={position:n,left:0,top:0};if(!U.floating)return q;const W=roundByDPR(U.floating,m.x),G=roundByDPR(U.floating,m.y);return d?{...q,transform:"translate("+W+"px, "+G+"px)",...getDPR(U.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:W,top:G}},[n,d,U.floating,m.x,m.y]);return React__namespace.useMemo(()=>({...m,update:V,refs:z,elements:U,floatingStyles:Q}),[m,V,z,U,Q])}const arrow$1=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:i,padding:o}=typeof e=="function"?e(n):e;return i&&t(i)?i.current!=null?arrow$2({element:i.current,padding:o}).fn(n):{}:i?arrow$2({element:i,padding:o}).fn(n):{}}}},offset=(e,t)=>({...offset$1(e),options:[e,t]}),shift=(e,t)=>({...shift$1(e),options:[e,t]}),limitShift=(e,t)=>({...limitShift$1(e),options:[e,t]}),flip=(e,t)=>({...flip$1(e),options:[e,t]}),size=(e,t)=>({...size$1(e),options:[e,t]}),hide=(e,t)=>({...hide$1(e),options:[e,t]}),arrow=(e,t)=>({...arrow$1(e),options:[e,t]});var NAME$3="Arrow",Arrow$1=React__namespace.forwardRef((e,t)=>{const{children:n,width:i=10,height:o=5,...l}=e;return jsxRuntime.jsx(Primitive.svg,{...l,ref:t,width:i,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:jsxRuntime.jsx("polygon",{points:"0,0 30,0 15,10"})})});Arrow$1.displayName=NAME$3;var Root$6=Arrow$1;function useSize(e){const[t,n]=React__namespace.useState(void 0);return useLayoutEffect2(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const i=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const l=o[0];let u,d;if("borderBoxSize"in l){const f=l.borderBoxSize,p=Array.isArray(f)?f[0]:f;u=p.inlineSize,d=p.blockSize}else u=e.offsetWidth,d=e.offsetHeight;n({width:u,height:d})});return i.observe(e,{box:"border-box"}),()=>i.unobserve(e)}else n(void 0)},[e]),t}var POPPER_NAME="Popper",[createPopperContext,createPopperScope]=createContextScope(POPPER_NAME),[PopperProvider,usePopperContext]=createPopperContext(POPPER_NAME),Popper=e=>{const{__scopePopper:t,children:n}=e,[i,o]=React__namespace.useState(null);return jsxRuntime.jsx(PopperProvider,{scope:t,anchor:i,onAnchorChange:o,children:n})};Popper.displayName=POPPER_NAME;var ANCHOR_NAME$1="PopperAnchor",PopperAnchor=React__namespace.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:i,...o}=e,l=usePopperContext(ANCHOR_NAME$1,n),u=React__namespace.useRef(null),d=useComposedRefs(t,u);return React__namespace.useEffect(()=>{l.onAnchorChange((i==null?void 0:i.current)||u.current)}),i?null:jsxRuntime.jsx(Primitive.div,{...o,ref:d})});PopperAnchor.displayName=ANCHOR_NAME$1;var CONTENT_NAME$4="PopperContent",[PopperContentProvider,useContentContext]=createPopperContext(CONTENT_NAME$4),PopperContent=React__namespace.forwardRef((e,t)=>{var se,ce,ie,ue,le,Z;const{__scopePopper:n,side:i="bottom",sideOffset:o=0,align:l="center",alignOffset:u=0,arrowPadding:d=0,avoidCollisions:f=!0,collisionBoundary:p=[],collisionPadding:m=0,sticky:g="partial",hideWhenDetached:b=!1,updatePositionStrategy:_="optimized",onPlaced:R,...E}=e,S=usePopperContext(CONTENT_NAME$4,n),[C,T]=React__namespace.useState(null),A=useComposedRefs(t,fe=>T(fe)),[M,I]=React__namespace.useState(null),O=useSize(M),N=(O==null?void 0:O.width)??0,j=(O==null?void 0:O.height)??0,D=i+(l!=="center"?"-"+l:""),F=typeof m=="number"?m:{top:0,right:0,bottom:0,left:0,...m},L=Array.isArray(p)?p:[p],B=L.length>0,V={padding:F,boundary:L.filter(isNotNull),altBoundary:B},{refs:H,floatingStyles:z,placement:U,isPositioned:Q,middlewareData:q}=useFloating({strategy:"fixed",placement:D,whileElementsMounted:(...fe)=>autoUpdate(...fe,{animationFrame:_==="always"}),elements:{reference:S.anchor},middleware:[offset({mainAxis:o+j,alignmentAxis:u}),f&&shift({mainAxis:!0,crossAxis:!1,limiter:g==="partial"?limitShift():void 0,...V}),f&&flip({...V}),size({...V,apply:({elements:fe,rects:te,availableWidth:de,availableHeight:pe})=>{const{width:me,height:ye}=te.reference,he=fe.floating.style;he.setProperty("--radix-popper-available-width",`${de}px`),he.setProperty("--radix-popper-available-height",`${pe}px`),he.setProperty("--radix-popper-anchor-width",`${me}px`),he.setProperty("--radix-popper-anchor-height",`${ye}px`)}}),M&&arrow({element:M,padding:d}),transformOrigin({arrowWidth:N,arrowHeight:j}),b&&hide({strategy:"referenceHidden",...V})]}),[W,G]=getSideAndAlignFromPlacement(U),K=useCallbackRef$1(R);useLayoutEffect2(()=>{Q&&(K==null||K())},[Q,K]);const J=(se=q.arrow)==null?void 0:se.x,ee=(ce=q.arrow)==null?void 0:ce.y,ne=((ie=q.arrow)==null?void 0:ie.centerOffset)!==0,[ae,oe]=React__namespace.useState();return useLayoutEffect2(()=>{C&&oe(window.getComputedStyle(C).zIndex)},[C]),jsxRuntime.jsx("div",{ref:H.setFloating,"data-radix-popper-content-wrapper":"",style:{...z,transform:Q?z.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ae,"--radix-popper-transform-origin":[(ue=q.transformOrigin)==null?void 0:ue.x,(le=q.transformOrigin)==null?void 0:le.y].join(" "),...((Z=q.hide)==null?void 0:Z.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:jsxRuntime.jsx(PopperContentProvider,{scope:n,placedSide:W,onArrowChange:I,arrowX:J,arrowY:ee,shouldHideArrow:ne,children:jsxRuntime.jsx(Primitive.div,{"data-side":W,"data-align":G,...E,ref:A,style:{...E.style,animation:Q?void 0:"none"}})})})});PopperContent.displayName=CONTENT_NAME$4;var ARROW_NAME$3="PopperArrow",OPPOSITE_SIDE={top:"bottom",right:"left",bottom:"top",left:"right"},PopperArrow=React__namespace.forwardRef(function(t,n){const{__scopePopper:i,...o}=t,l=useContentContext(ARROW_NAME$3,i),u=OPPOSITE_SIDE[l.placedSide];return jsxRuntime.jsx("span",{ref:l.onArrowChange,style:{position:"absolute",left:l.arrowX,top:l.arrowY,[u]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[l.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[l.placedSide],visibility:l.shouldHideArrow?"hidden":void 0},children:jsxRuntime.jsx(Root$6,{...o,ref:n,style:{...o.style,display:"block"}})})});PopperArrow.displayName=ARROW_NAME$3;function isNotNull(e){return e!==null}var transformOrigin=e=>({name:"transformOrigin",options:e,fn(t){var S,C,T;const{placement:n,rects:i,middlewareData:o}=t,u=((S=o.arrow)==null?void 0:S.centerOffset)!==0,d=u?0:e.arrowWidth,f=u?0:e.arrowHeight,[p,m]=getSideAndAlignFromPlacement(n),g={start:"0%",center:"50%",end:"100%"}[m],b=(((C=o.arrow)==null?void 0:C.x)??0)+d/2,_=(((T=o.arrow)==null?void 0:T.y)??0)+f/2;let R="",E="";return p==="bottom"?(R=u?g:`${b}px`,E=`${-f}px`):p==="top"?(R=u?g:`${b}px`,E=`${i.floating.height+f}px`):p==="right"?(R=`${-f}px`,E=u?g:`${_}px`):p==="left"&&(R=`${i.floating.width+f}px`,E=u?g:`${_}px`),{data:{x:R,y:E}}}});function getSideAndAlignFromPlacement(e){const[t,n="center"]=e.split("-");return[t,n]}var Root2$3=Popper,Anchor=PopperAnchor,Content$1=PopperContent,Arrow=PopperArrow,ENTRY_FOCUS="rovingFocusGroup.onEntryFocus",EVENT_OPTIONS={bubbles:!1,cancelable:!0},GROUP_NAME$2="RovingFocusGroup",[Collection$2,useCollection$2,createCollectionScope$2]=createCollection(GROUP_NAME$2),[createRovingFocusGroupContext,createRovingFocusGroupScope]=createContextScope(GROUP_NAME$2,[createCollectionScope$2]),[RovingFocusProvider,useRovingFocusContext]=createRovingFocusGroupContext(GROUP_NAME$2),RovingFocusGroup=React__namespace.forwardRef((e,t)=>jsxRuntime.jsx(Collection$2.Provider,{scope:e.__scopeRovingFocusGroup,children:jsxRuntime.jsx(Collection$2.Slot,{scope:e.__scopeRovingFocusGroup,children:jsxRuntime.jsx(RovingFocusGroupImpl,{...e,ref:t})})}));RovingFocusGroup.displayName=GROUP_NAME$2;var RovingFocusGroupImpl=React__namespace.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:i,loop:o=!1,dir:l,currentTabStopId:u,defaultCurrentTabStopId:d,onCurrentTabStopIdChange:f,onEntryFocus:p,preventScrollOnEntryFocus:m=!1,...g}=e,b=React__namespace.useRef(null),_=useComposedRefs(t,b),R=useDirection(l),[E=null,S]=useControllableState({prop:u,defaultProp:d,onChange:f}),[C,T]=React__namespace.useState(!1),A=useCallbackRef$1(p),M=useCollection$2(n),I=React__namespace.useRef(!1),[O,N]=React__namespace.useState(0);return React__namespace.useEffect(()=>{const j=b.current;if(j)return j.addEventListener(ENTRY_FOCUS,A),()=>j.removeEventListener(ENTRY_FOCUS,A)},[A]),jsxRuntime.jsx(RovingFocusProvider,{scope:n,orientation:i,dir:R,loop:o,currentTabStopId:E,onItemFocus:React__namespace.useCallback(j=>S(j),[S]),onItemShiftTab:React__namespace.useCallback(()=>T(!0),[]),onFocusableItemAdd:React__namespace.useCallback(()=>N(j=>j+1),[]),onFocusableItemRemove:React__namespace.useCallback(()=>N(j=>j-1),[]),children:jsxRuntime.jsx(Primitive.div,{tabIndex:C||O===0?-1:0,"data-orientation":i,...g,ref:_,style:{outline:"none",...e.style},onMouseDown:composeEventHandlers(e.onMouseDown,()=>{I.current=!0}),onFocus:composeEventHandlers(e.onFocus,j=>{const D=!I.current;if(j.target===j.currentTarget&&D&&!C){const F=new CustomEvent(ENTRY_FOCUS,EVENT_OPTIONS);if(j.currentTarget.dispatchEvent(F),!F.defaultPrevented){const L=M().filter(U=>U.focusable),B=L.find(U=>U.active),V=L.find(U=>U.id===E),z=[B,V,...L].filter(Boolean).map(U=>U.ref.current);focusFirst$2(z,m)}}I.current=!1}),onBlur:composeEventHandlers(e.onBlur,()=>T(!1))})})}),ITEM_NAME$2="RovingFocusGroupItem",RovingFocusGroupItem=React__namespace.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:i=!0,active:o=!1,tabStopId:l,...u}=e,d=useId(),f=l||d,p=useRovingFocusContext(ITEM_NAME$2,n),m=p.currentTabStopId===f,g=useCollection$2(n),{onFocusableItemAdd:b,onFocusableItemRemove:_}=p;return React__namespace.useEffect(()=>{if(i)return b(),()=>_()},[i,b,_]),jsxRuntime.jsx(Collection$2.ItemSlot,{scope:n,id:f,focusable:i,active:o,children:jsxRuntime.jsx(Primitive.span,{tabIndex:m?0:-1,"data-orientation":p.orientation,...u,ref:t,onMouseDown:composeEventHandlers(e.onMouseDown,R=>{i?p.onItemFocus(f):R.preventDefault()}),onFocus:composeEventHandlers(e.onFocus,()=>p.onItemFocus(f)),onKeyDown:composeEventHandlers(e.onKeyDown,R=>{if(R.key==="Tab"&&R.shiftKey){p.onItemShiftTab();return}if(R.target!==R.currentTarget)return;const E=getFocusIntent(R,p.orientation,p.dir);if(E!==void 0){if(R.metaKey||R.ctrlKey||R.altKey||R.shiftKey)return;R.preventDefault();let C=g().filter(T=>T.focusable).map(T=>T.ref.current);if(E==="last")C.reverse();else if(E==="prev"||E==="next"){E==="prev"&&C.reverse();const T=C.indexOf(R.currentTarget);C=p.loop?wrapArray$1(C,T+1):C.slice(T+1)}setTimeout(()=>focusFirst$2(C))}})})})});RovingFocusGroupItem.displayName=ITEM_NAME$2;var MAP_KEY_TO_FOCUS_INTENT={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function getDirectionAwareKey(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function getFocusIntent(e,t,n){const i=getDirectionAwareKey(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(i))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(i)))return MAP_KEY_TO_FOCUS_INTENT[i]}function focusFirst$2(e,t=!1){const n=document.activeElement;for(const i of e)if(i===n||(i.focus({preventScroll:t}),document.activeElement!==n))return}function wrapArray$1(e,t){return e.map((n,i)=>e[(t+i)%e.length])}var Root$5=RovingFocusGroup,Item=RovingFocusGroupItem,SELECTION_KEYS=["Enter"," "],FIRST_KEYS=["ArrowDown","PageUp","Home"],LAST_KEYS=["ArrowUp","PageDown","End"],FIRST_LAST_KEYS=[...FIRST_KEYS,...LAST_KEYS],SUB_OPEN_KEYS={ltr:[...SELECTION_KEYS,"ArrowRight"],rtl:[...SELECTION_KEYS,"ArrowLeft"]},SUB_CLOSE_KEYS={ltr:["ArrowLeft"],rtl:["ArrowRight"]},MENU_NAME="Menu",[Collection$1,useCollection$1,createCollectionScope$1]=createCollection(MENU_NAME),[createMenuContext,createMenuScope]=createContextScope(MENU_NAME,[createCollectionScope$1,createPopperScope,createRovingFocusGroupScope]),usePopperScope$1=createPopperScope(),useRovingFocusGroupScope$1=createRovingFocusGroupScope(),[MenuProvider,useMenuContext]=createMenuContext(MENU_NAME),[MenuRootProvider,useMenuRootContext]=createMenuContext(MENU_NAME),Menu=e=>{const{__scopeMenu:t,open:n=!1,children:i,dir:o,onOpenChange:l,modal:u=!0}=e,d=usePopperScope$1(t),[f,p]=React__namespace.useState(null),m=React__namespace.useRef(!1),g=useCallbackRef$1(l),b=useDirection(o);return React__namespace.useEffect(()=>{const _=()=>{m.current=!0,document.addEventListener("pointerdown",R,{capture:!0,once:!0}),document.addEventListener("pointermove",R,{capture:!0,once:!0})},R=()=>m.current=!1;return document.addEventListener("keydown",_,{capture:!0}),()=>{document.removeEventListener("keydown",_,{capture:!0}),document.removeEventListener("pointerdown",R,{capture:!0}),document.removeEventListener("pointermove",R,{capture:!0})}},[]),jsxRuntime.jsx(Root2$3,{...d,children:jsxRuntime.jsx(MenuProvider,{scope:t,open:n,onOpenChange:g,content:f,onContentChange:p,children:jsxRuntime.jsx(MenuRootProvider,{scope:t,onClose:React__namespace.useCallback(()=>g(!1),[g]),isUsingKeyboardRef:m,dir:b,modal:u,children:i})})})};Menu.displayName=MENU_NAME;var ANCHOR_NAME="MenuAnchor",MenuAnchor=React__namespace.forwardRef((e,t)=>{const{__scopeMenu:n,...i}=e,o=usePopperScope$1(n);return jsxRuntime.jsx(Anchor,{...o,...i,ref:t})});MenuAnchor.displayName=ANCHOR_NAME;var PORTAL_NAME$2="MenuPortal",[PortalProvider$1,usePortalContext$1]=createMenuContext(PORTAL_NAME$2,{forceMount:void 0}),MenuPortal=e=>{const{__scopeMenu:t,forceMount:n,children:i,container:o}=e,l=useMenuContext(PORTAL_NAME$2,t);return jsxRuntime.jsx(PortalProvider$1,{scope:t,forceMount:n,children:jsxRuntime.jsx(Presence,{present:n||l.open,children:jsxRuntime.jsx(Portal$3,{asChild:!0,container:o,children:i})})})};MenuPortal.displayName=PORTAL_NAME$2;var CONTENT_NAME$3="MenuContent",[MenuContentProvider,useMenuContentContext]=createMenuContext(CONTENT_NAME$3),MenuContent=React__namespace.forwardRef((e,t)=>{const n=usePortalContext$1(CONTENT_NAME$3,e.__scopeMenu),{forceMount:i=n.forceMount,...o}=e,l=useMenuContext(CONTENT_NAME$3,e.__scopeMenu),u=useMenuRootContext(CONTENT_NAME$3,e.__scopeMenu);return jsxRuntime.jsx(Collection$1.Provider,{scope:e.__scopeMenu,children:jsxRuntime.jsx(Presence,{present:i||l.open,children:jsxRuntime.jsx(Collection$1.Slot,{scope:e.__scopeMenu,children:u.modal?jsxRuntime.jsx(MenuRootContentModal,{...o,ref:t}):jsxRuntime.jsx(MenuRootContentNonModal,{...o,ref:t})})})})}),MenuRootContentModal=React__namespace.forwardRef((e,t)=>{const n=useMenuContext(CONTENT_NAME$3,e.__scopeMenu),i=React__namespace.useRef(null),o=useComposedRefs(t,i);return React__namespace.useEffect(()=>{const l=i.current;if(l)return hideOthers(l)},[]),jsxRuntime.jsx(MenuContentImpl,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:composeEventHandlers(e.onFocusOutside,l=>l.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),MenuRootContentNonModal=React__namespace.forwardRef((e,t)=>{const n=useMenuContext(CONTENT_NAME$3,e.__scopeMenu);return jsxRuntime.jsx(MenuContentImpl,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),Slot=createSlot("MenuContent.ScrollLock"),MenuContentImpl=React__namespace.forwardRef((e,t)=>{const{__scopeMenu:n,loop:i=!1,trapFocus:o,onOpenAutoFocus:l,onCloseAutoFocus:u,disableOutsidePointerEvents:d,onEntryFocus:f,onEscapeKeyDown:p,onPointerDownOutside:m,onFocusOutside:g,onInteractOutside:b,onDismiss:_,disableOutsideScroll:R,...E}=e,S=useMenuContext(CONTENT_NAME$3,n),C=useMenuRootContext(CONTENT_NAME$3,n),T=usePopperScope$1(n),A=useRovingFocusGroupScope$1(n),M=useCollection$1(n),[I,O]=React__namespace.useState(null),N=React__namespace.useRef(null),j=useComposedRefs(t,N,S.onContentChange),D=React__namespace.useRef(0),F=React__namespace.useRef(""),L=React__namespace.useRef(0),B=React__namespace.useRef(null),V=React__namespace.useRef("right"),H=React__namespace.useRef(0),z=R?ReactRemoveScroll:React__namespace.Fragment,U=R?{as:Slot,allowPinchZoom:!0}:void 0,Q=W=>{var se,ce;const G=F.current+W,K=M().filter(ie=>!ie.disabled),J=document.activeElement,ee=(se=K.find(ie=>ie.ref.current===J))==null?void 0:se.textValue,ne=K.map(ie=>ie.textValue),ae=getNextMatch(ne,G,ee),oe=(ce=K.find(ie=>ie.textValue===ae))==null?void 0:ce.ref.current;(function ie(ue){F.current=ue,window.clearTimeout(D.current),ue!==""&&(D.current=window.setTimeout(()=>ie(""),1e3))})(G),oe&&setTimeout(()=>oe.focus())};React__namespace.useEffect(()=>()=>window.clearTimeout(D.current),[]),useFocusGuards();const q=React__namespace.useCallback(W=>{var K,J;return V.current===((K=B.current)==null?void 0:K.side)&&isPointerInGraceArea(W,(J=B.current)==null?void 0:J.area)},[]);return jsxRuntime.jsx(MenuContentProvider,{scope:n,searchRef:F,onItemEnter:React__namespace.useCallback(W=>{q(W)&&W.preventDefault()},[q]),onItemLeave:React__namespace.useCallback(W=>{var G;q(W)||((G=N.current)==null||G.focus(),O(null))},[q]),onTriggerLeave:React__namespace.useCallback(W=>{q(W)&&W.preventDefault()},[q]),pointerGraceTimerRef:L,onPointerGraceIntentChange:React__namespace.useCallback(W=>{B.current=W},[]),children:jsxRuntime.jsx(z,{...U,children:jsxRuntime.jsx(FocusScope,{asChild:!0,trapped:o,onMountAutoFocus:composeEventHandlers(l,W=>{var G;W.preventDefault(),(G=N.current)==null||G.focus({preventScroll:!0})}),onUnmountAutoFocus:u,children:jsxRuntime.jsx(DismissableLayer,{asChild:!0,disableOutsidePointerEvents:d,onEscapeKeyDown:p,onPointerDownOutside:m,onFocusOutside:g,onInteractOutside:b,onDismiss:_,children:jsxRuntime.jsx(Root$5,{asChild:!0,...A,dir:C.dir,orientation:"vertical",loop:i,currentTabStopId:I,onCurrentTabStopIdChange:O,onEntryFocus:composeEventHandlers(f,W=>{C.isUsingKeyboardRef.current||W.preventDefault()}),preventScrollOnEntryFocus:!0,children:jsxRuntime.jsx(Content$1,{role:"menu","aria-orientation":"vertical","data-state":getOpenState(S.open),"data-radix-menu-content":"",dir:C.dir,...T,...E,ref:j,style:{outline:"none",...E.style},onKeyDown:composeEventHandlers(E.onKeyDown,W=>{const K=W.target.closest("[data-radix-menu-content]")===W.currentTarget,J=W.ctrlKey||W.altKey||W.metaKey,ee=W.key.length===1;K&&(W.key==="Tab"&&W.preventDefault(),!J&&ee&&Q(W.key));const ne=N.current;if(W.target!==ne||!FIRST_LAST_KEYS.includes(W.key))return;W.preventDefault();const oe=M().filter(se=>!se.disabled).map(se=>se.ref.current);LAST_KEYS.includes(W.key)&&oe.reverse(),focusFirst$1(oe)}),onBlur:composeEventHandlers(e.onBlur,W=>{W.currentTarget.contains(W.target)||(window.clearTimeout(D.current),F.current="")}),onPointerMove:composeEventHandlers(e.onPointerMove,whenMouse(W=>{const G=W.target,K=H.current!==W.clientX;if(W.currentTarget.contains(G)&&K){const J=W.clientX>H.current?"right":"left";V.current=J,H.current=W.clientX}}))})})})})})})});MenuContent.displayName=CONTENT_NAME$3;var GROUP_NAME$1="MenuGroup",MenuGroup=React__namespace.forwardRef((e,t)=>{const{__scopeMenu:n,...i}=e;return jsxRuntime.jsx(Primitive.div,{role:"group",...i,ref:t})});MenuGroup.displayName=GROUP_NAME$1;var LABEL_NAME$1="MenuLabel",MenuLabel=React__namespace.forwardRef((e,t)=>{const{__scopeMenu:n,...i}=e;return jsxRuntime.jsx(Primitive.div,{...i,ref:t})});MenuLabel.displayName=LABEL_NAME$1;var ITEM_NAME$1="MenuItem",ITEM_SELECT="menu.itemSelect",MenuItem=React__namespace.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:i,...o}=e,l=React__namespace.useRef(null),u=useMenuRootContext(ITEM_NAME$1,e.__scopeMenu),d=useMenuContentContext(ITEM_NAME$1,e.__scopeMenu),f=useComposedRefs(t,l),p=React__namespace.useRef(!1),m=()=>{const g=l.current;if(!n&&g){const b=new CustomEvent(ITEM_SELECT,{bubbles:!0,cancelable:!0});g.addEventListener(ITEM_SELECT,_=>i==null?void 0:i(_),{once:!0}),dispatchDiscreteCustomEvent(g,b),b.defaultPrevented?p.current=!1:u.onClose()}};return jsxRuntime.jsx(MenuItemImpl,{...o,ref:f,disabled:n,onClick:composeEventHandlers(e.onClick,m),onPointerDown:g=>{var b;(b=e.onPointerDown)==null||b.call(e,g),p.current=!0},onPointerUp:composeEventHandlers(e.onPointerUp,g=>{var b;p.current||(b=g.currentTarget)==null||b.click()}),onKeyDown:composeEventHandlers(e.onKeyDown,g=>{const b=d.searchRef.current!=="";n||b&&g.key===" "||SELECTION_KEYS.includes(g.key)&&(g.currentTarget.click(),g.preventDefault())})})});MenuItem.displayName=ITEM_NAME$1;var MenuItemImpl=React__namespace.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:i=!1,textValue:o,...l}=e,u=useMenuContentContext(ITEM_NAME$1,n),d=useRovingFocusGroupScope$1(n),f=React__namespace.useRef(null),p=useComposedRefs(t,f),[m,g]=React__namespace.useState(!1),[b,_]=React__namespace.useState("");return React__namespace.useEffect(()=>{const R=f.current;R&&_((R.textContent??"").trim())},[l.children]),jsxRuntime.jsx(Collection$1.ItemSlot,{scope:n,disabled:i,textValue:o??b,children:jsxRuntime.jsx(Item,{asChild:!0,...d,focusable:!i,children:jsxRuntime.jsx(Primitive.div,{role:"menuitem","data-highlighted":m?"":void 0,"aria-disabled":i||void 0,"data-disabled":i?"":void 0,...l,ref:p,onPointerMove:composeEventHandlers(e.onPointerMove,whenMouse(R=>{i?u.onItemLeave(R):(u.onItemEnter(R),R.defaultPrevented||R.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:composeEventHandlers(e.onPointerLeave,whenMouse(R=>u.onItemLeave(R))),onFocus:composeEventHandlers(e.onFocus,()=>g(!0)),onBlur:composeEventHandlers(e.onBlur,()=>g(!1))})})})}),CHECKBOX_ITEM_NAME$1="MenuCheckboxItem",MenuCheckboxItem=React__namespace.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:i,...o}=e;return jsxRuntime.jsx(ItemIndicatorProvider,{scope:e.__scopeMenu,checked:n,children:jsxRuntime.jsx(MenuItem,{role:"menuitemcheckbox","aria-checked":isIndeterminate(n)?"mixed":n,...o,ref:t,"data-state":getCheckedState(n),onSelect:composeEventHandlers(o.onSelect,()=>i==null?void 0:i(isIndeterminate(n)?!0:!n),{checkForDefaultPrevented:!1})})})});MenuCheckboxItem.displayName=CHECKBOX_ITEM_NAME$1;var RADIO_GROUP_NAME$1="MenuRadioGroup",[RadioGroupProvider,useRadioGroupContext]=createMenuContext(RADIO_GROUP_NAME$1,{value:void 0,onValueChange:()=>{}}),MenuRadioGroup=React__namespace.forwardRef((e,t)=>{const{value:n,onValueChange:i,...o}=e,l=useCallbackRef$1(i);return jsxRuntime.jsx(RadioGroupProvider,{scope:e.__scopeMenu,value:n,onValueChange:l,children:jsxRuntime.jsx(MenuGroup,{...o,ref:t})})});MenuRadioGroup.displayName=RADIO_GROUP_NAME$1;var RADIO_ITEM_NAME$1="MenuRadioItem",MenuRadioItem=React__namespace.forwardRef((e,t)=>{const{value:n,...i}=e,o=useRadioGroupContext(RADIO_ITEM_NAME$1,e.__scopeMenu),l=n===o.value;return jsxRuntime.jsx(ItemIndicatorProvider,{scope:e.__scopeMenu,checked:l,children:jsxRuntime.jsx(MenuItem,{role:"menuitemradio","aria-checked":l,...i,ref:t,"data-state":getCheckedState(l),onSelect:composeEventHandlers(i.onSelect,()=>{var u;return(u=o.onValueChange)==null?void 0:u.call(o,n)},{checkForDefaultPrevented:!1})})})});MenuRadioItem.displayName=RADIO_ITEM_NAME$1;var ITEM_INDICATOR_NAME="MenuItemIndicator",[ItemIndicatorProvider,useItemIndicatorContext]=createMenuContext(ITEM_INDICATOR_NAME,{checked:!1}),MenuItemIndicator=React__namespace.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:i,...o}=e,l=useItemIndicatorContext(ITEM_INDICATOR_NAME,n);return jsxRuntime.jsx(Presence,{present:i||isIndeterminate(l.checked)||l.checked===!0,children:jsxRuntime.jsx(Primitive.span,{...o,ref:t,"data-state":getCheckedState(l.checked)})})});MenuItemIndicator.displayName=ITEM_INDICATOR_NAME;var SEPARATOR_NAME$1="MenuSeparator",MenuSeparator=React__namespace.forwardRef((e,t)=>{const{__scopeMenu:n,...i}=e;return jsxRuntime.jsx(Primitive.div,{role:"separator","aria-orientation":"horizontal",...i,ref:t})});MenuSeparator.displayName=SEPARATOR_NAME$1;var ARROW_NAME$2="MenuArrow",MenuArrow=React__namespace.forwardRef((e,t)=>{const{__scopeMenu:n,...i}=e,o=usePopperScope$1(n);return jsxRuntime.jsx(Arrow,{...o,...i,ref:t})});MenuArrow.displayName=ARROW_NAME$2;var SUB_NAME="MenuSub",[MenuSubProvider,useMenuSubContext]=createMenuContext(SUB_NAME),MenuSub=e=>{const{__scopeMenu:t,children:n,open:i=!1,onOpenChange:o}=e,l=useMenuContext(SUB_NAME,t),u=usePopperScope$1(t),[d,f]=React__namespace.useState(null),[p,m]=React__namespace.useState(null),g=useCallbackRef$1(o);return React__namespace.useEffect(()=>(l.open===!1&&g(!1),()=>g(!1)),[l.open,g]),jsxRuntime.jsx(Root2$3,{...u,children:jsxRuntime.jsx(MenuProvider,{scope:t,open:i,onOpenChange:g,content:p,onContentChange:m,children:jsxRuntime.jsx(MenuSubProvider,{scope:t,contentId:useId(),triggerId:useId(),trigger:d,onTriggerChange:f,children:n})})})};MenuSub.displayName=SUB_NAME;var SUB_TRIGGER_NAME$1="MenuSubTrigger",MenuSubTrigger=React__namespace.forwardRef((e,t)=>{const n=useMenuContext(SUB_TRIGGER_NAME$1,e.__scopeMenu),i=useMenuRootContext(SUB_TRIGGER_NAME$1,e.__scopeMenu),o=useMenuSubContext(SUB_TRIGGER_NAME$1,e.__scopeMenu),l=useMenuContentContext(SUB_TRIGGER_NAME$1,e.__scopeMenu),u=React__namespace.useRef(null),{pointerGraceTimerRef:d,onPointerGraceIntentChange:f}=l,p={__scopeMenu:e.__scopeMenu},m=React__namespace.useCallback(()=>{u.current&&window.clearTimeout(u.current),u.current=null},[]);return React__namespace.useEffect(()=>m,[m]),React__namespace.useEffect(()=>{const g=d.current;return()=>{window.clearTimeout(g),f(null)}},[d,f]),jsxRuntime.jsx(MenuAnchor,{asChild:!0,...p,children:jsxRuntime.jsx(MenuItemImpl,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":getOpenState(n.open),...e,ref:composeRefs(t,o.onTriggerChange),onClick:g=>{var b;(b=e.onClick)==null||b.call(e,g),!(e.disabled||g.defaultPrevented)&&(g.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:composeEventHandlers(e.onPointerMove,whenMouse(g=>{l.onItemEnter(g),!g.defaultPrevented&&!e.disabled&&!n.open&&!u.current&&(l.onPointerGraceIntentChange(null),u.current=window.setTimeout(()=>{n.onOpenChange(!0),m()},100))})),onPointerLeave:composeEventHandlers(e.onPointerLeave,whenMouse(g=>{var _,R;m();const b=(_=n.content)==null?void 0:_.getBoundingClientRect();if(b){const E=(R=n.content)==null?void 0:R.dataset.side,S=E==="right",C=S?-5:5,T=b[S?"left":"right"],A=b[S?"right":"left"];l.onPointerGraceIntentChange({area:[{x:g.clientX+C,y:g.clientY},{x:T,y:b.top},{x:A,y:b.top},{x:A,y:b.bottom},{x:T,y:b.bottom}],side:E}),window.clearTimeout(d.current),d.current=window.setTimeout(()=>l.onPointerGraceIntentChange(null),300)}else{if(l.onTriggerLeave(g),g.defaultPrevented)return;l.onPointerGraceIntentChange(null)}})),onKeyDown:composeEventHandlers(e.onKeyDown,g=>{var _;const b=l.searchRef.current!=="";e.disabled||b&&g.key===" "||SUB_OPEN_KEYS[i.dir].includes(g.key)&&(n.onOpenChange(!0),(_=n.content)==null||_.focus(),g.preventDefault())})})})});MenuSubTrigger.displayName=SUB_TRIGGER_NAME$1;var SUB_CONTENT_NAME$1="MenuSubContent",MenuSubContent=React__namespace.forwardRef((e,t)=>{const n=usePortalContext$1(CONTENT_NAME$3,e.__scopeMenu),{forceMount:i=n.forceMount,...o}=e,l=useMenuContext(CONTENT_NAME$3,e.__scopeMenu),u=useMenuRootContext(CONTENT_NAME$3,e.__scopeMenu),d=useMenuSubContext(SUB_CONTENT_NAME$1,e.__scopeMenu),f=React__namespace.useRef(null),p=useComposedRefs(t,f);return jsxRuntime.jsx(Collection$1.Provider,{scope:e.__scopeMenu,children:jsxRuntime.jsx(Presence,{present:i||l.open,children:jsxRuntime.jsx(Collection$1.Slot,{scope:e.__scopeMenu,children:jsxRuntime.jsx(MenuContentImpl,{id:d.contentId,"aria-labelledby":d.triggerId,...o,ref:p,align:"start",side:u.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:m=>{var g;u.isUsingKeyboardRef.current&&((g=f.current)==null||g.focus()),m.preventDefault()},onCloseAutoFocus:m=>m.preventDefault(),onFocusOutside:composeEventHandlers(e.onFocusOutside,m=>{m.target!==d.trigger&&l.onOpenChange(!1)}),onEscapeKeyDown:composeEventHandlers(e.onEscapeKeyDown,m=>{u.onClose(),m.preventDefault()}),onKeyDown:composeEventHandlers(e.onKeyDown,m=>{var _;const g=m.currentTarget.contains(m.target),b=SUB_CLOSE_KEYS[u.dir].includes(m.key);g&&b&&(l.onOpenChange(!1),(_=d.trigger)==null||_.focus(),m.preventDefault())})})})})})});MenuSubContent.displayName=SUB_CONTENT_NAME$1;function getOpenState(e){return e?"open":"closed"}function isIndeterminate(e){return e==="indeterminate"}function getCheckedState(e){return isIndeterminate(e)?"indeterminate":e?"checked":"unchecked"}function focusFirst$1(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function wrapArray(e,t){return e.map((n,i)=>e[(t+i)%e.length])}function getNextMatch(e,t,n){const o=t.length>1&&Array.from(t).every(p=>p===t[0])?t[0]:t,l=n?e.indexOf(n):-1;let u=wrapArray(e,Math.max(l,0));o.length===1&&(u=u.filter(p=>p!==n));const f=u.find(p=>p.toLowerCase().startsWith(o.toLowerCase()));return f!==n?f:void 0}function isPointInPolygon$1(e,t){const{x:n,y:i}=e;let o=!1;for(let l=0,u=t.length-1;l<t.length;u=l++){const d=t[l].x,f=t[l].y,p=t[u].x,m=t[u].y;f>i!=m>i&&n<(p-d)*(i-f)/(m-f)+d&&(o=!o)}return o}function isPointerInGraceArea(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return isPointInPolygon$1(n,t)}function whenMouse(e){return t=>t.pointerType==="mouse"?e(t):void 0}var Root3$1=Menu,Anchor2=MenuAnchor,Portal$1=MenuPortal,Content2$2=MenuContent,Group=MenuGroup,Label$3=MenuLabel,Item2$1=MenuItem,CheckboxItem=MenuCheckboxItem,RadioGroup=MenuRadioGroup,RadioItem=MenuRadioItem,ItemIndicator=MenuItemIndicator,Separator$2=MenuSeparator,Arrow2=MenuArrow,Sub=MenuSub,SubTrigger=MenuSubTrigger,SubContent=MenuSubContent,DROPDOWN_MENU_NAME="DropdownMenu",[createDropdownMenuContext,createDropdownMenuScope]=createContextScope(DROPDOWN_MENU_NAME,[createMenuScope]),useMenuScope=createMenuScope(),[DropdownMenuProvider,useDropdownMenuContext]=createDropdownMenuContext(DROPDOWN_MENU_NAME),DropdownMenu$1=e=>{const{__scopeDropdownMenu:t,children:n,dir:i,open:o,defaultOpen:l,onOpenChange:u,modal:d=!0}=e,f=useMenuScope(t),p=React__namespace.useRef(null),[m=!1,g]=useControllableState({prop:o,defaultProp:l,onChange:u});return jsxRuntime.jsx(DropdownMenuProvider,{scope:t,triggerId:useId(),triggerRef:p,contentId:useId(),open:m,onOpenChange:g,onOpenToggle:React__namespace.useCallback(()=>g(b=>!b),[g]),modal:d,children:jsxRuntime.jsx(Root3$1,{...f,open:m,onOpenChange:g,dir:i,modal:d,children:n})})};DropdownMenu$1.displayName=DROPDOWN_MENU_NAME;var TRIGGER_NAME$2="DropdownMenuTrigger",DropdownMenuTrigger$1=React__namespace.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:i=!1,...o}=e,l=useDropdownMenuContext(TRIGGER_NAME$2,n),u=useMenuScope(n);return jsxRuntime.jsx(Anchor2,{asChild:!0,...u,children:jsxRuntime.jsx(Primitive.button,{type:"button",id:l.triggerId,"aria-haspopup":"menu","aria-expanded":l.open,"aria-controls":l.open?l.contentId:void 0,"data-state":l.open?"open":"closed","data-disabled":i?"":void 0,disabled:i,...o,ref:composeRefs(t,l.triggerRef),onPointerDown:composeEventHandlers(e.onPointerDown,d=>{!i&&d.button===0&&d.ctrlKey===!1&&(l.onOpenToggle(),l.open||d.preventDefault())}),onKeyDown:composeEventHandlers(e.onKeyDown,d=>{i||(["Enter"," "].includes(d.key)&&l.onOpenToggle(),d.key==="ArrowDown"&&l.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(d.key)&&d.preventDefault())})})})});DropdownMenuTrigger$1.displayName=TRIGGER_NAME$2;var PORTAL_NAME$1="DropdownMenuPortal",DropdownMenuPortal$1=e=>{const{__scopeDropdownMenu:t,...n}=e,i=useMenuScope(t);return jsxRuntime.jsx(Portal$1,{...i,...n})};DropdownMenuPortal$1.displayName=PORTAL_NAME$1;var CONTENT_NAME$2="DropdownMenuContent",DropdownMenuContent$1=React__namespace.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...i}=e,o=useDropdownMenuContext(CONTENT_NAME$2,n),l=useMenuScope(n),u=React__namespace.useRef(!1);return jsxRuntime.jsx(Content2$2,{id:o.contentId,"aria-labelledby":o.triggerId,...l,...i,ref:t,onCloseAutoFocus:composeEventHandlers(e.onCloseAutoFocus,d=>{var f;u.current||(f=o.triggerRef.current)==null||f.focus(),u.current=!1,d.preventDefault()}),onInteractOutside:composeEventHandlers(e.onInteractOutside,d=>{const f=d.detail.originalEvent,p=f.button===0&&f.ctrlKey===!0,m=f.button===2||p;(!o.modal||m)&&(u.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});DropdownMenuContent$1.displayName=CONTENT_NAME$2;var GROUP_NAME="DropdownMenuGroup",DropdownMenuGroup$1=React__namespace.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...i}=e,o=useMenuScope(n);return jsxRuntime.jsx(Group,{...o,...i,ref:t})});DropdownMenuGroup$1.displayName=GROUP_NAME;var LABEL_NAME="DropdownMenuLabel",DropdownMenuLabel$1=React__namespace.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...i}=e,o=useMenuScope(n);return jsxRuntime.jsx(Label$3,{...o,...i,ref:t})});DropdownMenuLabel$1.displayName=LABEL_NAME;var ITEM_NAME="DropdownMenuItem",DropdownMenuItem$1=React__namespace.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...i}=e,o=useMenuScope(n);return jsxRuntime.jsx(Item2$1,{...o,...i,ref:t})});DropdownMenuItem$1.displayName=ITEM_NAME;var CHECKBOX_ITEM_NAME="DropdownMenuCheckboxItem",DropdownMenuCheckboxItem$1=React__namespace.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...i}=e,o=useMenuScope(n);return jsxRuntime.jsx(CheckboxItem,{...o,...i,ref:t})});DropdownMenuCheckboxItem$1.displayName=CHECKBOX_ITEM_NAME;var RADIO_GROUP_NAME="DropdownMenuRadioGroup",DropdownMenuRadioGroup$1=React__namespace.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...i}=e,o=useMenuScope(n);return jsxRuntime.jsx(RadioGroup,{...o,...i,ref:t})});DropdownMenuRadioGroup$1.displayName=RADIO_GROUP_NAME;var RADIO_ITEM_NAME="DropdownMenuRadioItem",DropdownMenuRadioItem$1=React__namespace.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...i}=e,o=useMenuScope(n);return jsxRuntime.jsx(RadioItem,{...o,...i,ref:t})});DropdownMenuRadioItem$1.displayName=RADIO_ITEM_NAME;var INDICATOR_NAME="DropdownMenuItemIndicator",DropdownMenuItemIndicator=React__namespace.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...i}=e,o=useMenuScope(n);return jsxRuntime.jsx(ItemIndicator,{...o,...i,ref:t})});DropdownMenuItemIndicator.displayName=INDICATOR_NAME;var SEPARATOR_NAME="DropdownMenuSeparator",DropdownMenuSeparator$1=React__namespace.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...i}=e,o=useMenuScope(n);return jsxRuntime.jsx(Separator$2,{...o,...i,ref:t})});DropdownMenuSeparator$1.displayName=SEPARATOR_NAME;var ARROW_NAME$1="DropdownMenuArrow",DropdownMenuArrow=React__namespace.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...i}=e,o=useMenuScope(n);return jsxRuntime.jsx(Arrow2,{...o,...i,ref:t})});DropdownMenuArrow.displayName=ARROW_NAME$1;var DropdownMenuSub$1=e=>{const{__scopeDropdownMenu:t,children:n,open:i,onOpenChange:o,defaultOpen:l}=e,u=useMenuScope(t),[d=!1,f]=useControllableState({prop:i,defaultProp:l,onChange:o});return jsxRuntime.jsx(Sub,{...u,open:d,onOpenChange:f,children:n})},SUB_TRIGGER_NAME="DropdownMenuSubTrigger",DropdownMenuSubTrigger$1=React__namespace.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...i}=e,o=useMenuScope(n);return jsxRuntime.jsx(SubTrigger,{...o,...i,ref:t})});DropdownMenuSubTrigger$1.displayName=SUB_TRIGGER_NAME;var SUB_CONTENT_NAME="DropdownMenuSubContent",DropdownMenuSubContent$1=React__namespace.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...i}=e,o=useMenuScope(n);return jsxRuntime.jsx(SubContent,{...o,...i,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});DropdownMenuSubContent$1.displayName=SUB_CONTENT_NAME;var Root2$2=DropdownMenu$1,Trigger$2=DropdownMenuTrigger$1,Portal2=DropdownMenuPortal$1,Content2$1=DropdownMenuContent$1,Group2=DropdownMenuGroup$1,Label2=DropdownMenuLabel$1,Item2=DropdownMenuItem$1,CheckboxItem2=DropdownMenuCheckboxItem$1,RadioGroup2=DropdownMenuRadioGroup$1,RadioItem2=DropdownMenuRadioItem$1,ItemIndicator2=DropdownMenuItemIndicator,Separator2=DropdownMenuSeparator$1,Sub2=DropdownMenuSub$1,SubTrigger2=DropdownMenuSubTrigger$1,SubContent2=DropdownMenuSubContent$1;const DropdownMenu=Root2$2,DropdownMenuTrigger=Trigger$2,DropdownMenuGroup=Group2,DropdownMenuPortal=Portal2,DropdownMenuSub=Sub2,DropdownMenuRadioGroup=RadioGroup2,DropdownMenuSubTrigger=React__namespace.forwardRef(({className:e,inset:t,children:n,...i},o)=>jsxRuntime.jsxs(SubTrigger2,{ref:o,className:cn("flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",e),...i,children:[n,jsxRuntime.jsx(ChevronRight,{className:"ml-auto"})]}));DropdownMenuSubTrigger.displayName=SubTrigger2.displayName;const DropdownMenuSubContent=React__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx(SubContent2,{ref:n,className:cn("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin]",e),...t}));DropdownMenuSubContent.displayName=SubContent2.displayName;const DropdownMenuContent=React__namespace.forwardRef(({className:e,sideOffset:t=4,...n},i)=>jsxRuntime.jsx(Portal2,{children:jsxRuntime.jsx(Content2$1,{ref:i,sideOffset:t,className:cn("z-50 max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin]",e),...n})}));DropdownMenuContent.displayName=Content2$1.displayName;const DropdownMenuItem=React__namespace.forwardRef(({className:e,inset:t,...n},i)=>jsxRuntime.jsx(Item2,{ref:i,className:cn("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",t&&"pl-8",e),...n}));DropdownMenuItem.displayName=Item2.displayName;const DropdownMenuCheckboxItem=React__namespace.forwardRef(({className:e,children:t,checked:n,...i},o)=>jsxRuntime.jsxs(CheckboxItem2,{ref:o,className:cn("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:n,...i,children:[jsxRuntime.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:jsxRuntime.jsx(ItemIndicator2,{children:jsxRuntime.jsx(Check,{className:"h-4 w-4"})})}),t]}));DropdownMenuCheckboxItem.displayName=CheckboxItem2.displayName;const DropdownMenuRadioItem=React__namespace.forwardRef(({className:e,children:t,...n},i)=>jsxRuntime.jsxs(RadioItem2,{ref:i,className:cn("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[jsxRuntime.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:jsxRuntime.jsx(ItemIndicator2,{children:jsxRuntime.jsx(Circle,{className:"h-2 w-2 fill-current"})})}),t]}));DropdownMenuRadioItem.displayName=RadioItem2.displayName;const DropdownMenuLabel=React__namespace.forwardRef(({className:e,inset:t,...n},i)=>jsxRuntime.jsx(Label2,{ref:i,className:cn("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n}));DropdownMenuLabel.displayName=Label2.displayName;const DropdownMenuSeparator=React__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx(Separator2,{ref:n,className:cn("-mx-1 my-1 h-px bg-muted",e),...t}));DropdownMenuSeparator.displayName=Separator2.displayName;const DropdownMenuShortcut=({className:e,...t})=>jsxRuntime.jsx("span",{className:cn("ml-auto text-xs tracking-widest opacity-60",e),...t});DropdownMenuShortcut.displayName="DropdownMenuShortcut";function ProductInventoryGrid({inventory:e,showBinLocation:t}){const n=(C,T,A=!1,M=!0)=>jsxRuntime.jsxs("div",{className:`p-3 text-sm ${M&&T>0?"border-t":""} ${A?"border-r":""}`,children:[jsxRuntime.jsxs("div",{className:"flex justify-between font-medium",children:[jsxRuntime.jsx("span",{children:C.Name}),jsxRuntime.jsx("span",{children:C.AvailableQuantity})]}),jsxRuntime.jsxs("div",{className:"flex justify-between mt-1 text-xs text-gray-600",children:[jsxRuntime.jsx("span",{children:"Expecting"}),jsxRuntime.jsx("span",{children:C.PurchaseOrderQuantity||"-"})]}),t&&jsxRuntime.jsxs("div",{className:"flex justify-between mt-1 text-xs text-gray-600",children:[jsxRuntime.jsx("span",{children:"Bin Location"}),jsxRuntime.jsx("span",{children:C.BinLocation||"-"})]})]},`warehouse-${C.WarehouseId}`),i=["MTL","TOR"],o=["VAN","EDM"],l=[...e].sort((C,T)=>(C.Name||"").localeCompare(T.Name||"")),u=l.filter(C=>C.Country==="US"),d=l.filter(C=>C.Country==="CA"),f=l.filter(C=>o.includes(C.WarehouseId||"")),p=l.filter(C=>i.includes(C.WarehouseId||"")),m=d.filter(C=>!i.includes(C.WarehouseId||"")&&!o.includes(C.WarehouseId||"")),g=C=>C.reduce((T,A)=>T+(A.AvailableQuantity||0),0),b=g(d),_=g(p),R=g(f),E=g(u),S=b+E;return jsxRuntime.jsxs("div",{className:"border rounded-md overflow-hidden",children:[d.length>0&&u.length>0&&jsxRuntime.jsxs("div",{className:"grid grid-cols-2 border-b",children:[jsxRuntime.jsxs("div",{className:"p-3 font-semibold text-sm flex justify-between",children:[jsxRuntime.jsx("span",{children:"Total"}),jsxRuntime.jsx("span",{children:S})]}),jsxRuntime.jsx("div",{className:"p-3"})]}),d.length>0&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs("div",{className:"grid grid-cols-2 border-b bg-gray-50",children:[jsxRuntime.jsxs("div",{className:"p-3 font-semibold text-sm flex justify-between",children:[jsxRuntime.jsx("span",{children:"Canada"}),jsxRuntime.jsx("span",{children:b})]}),jsxRuntime.jsx("div",{className:"p-3"})]}),jsxRuntime.jsxs("div",{className:"grid grid-cols-2",children:[jsxRuntime.jsxs("div",{className:"border-r",children:[jsxRuntime.jsxs("div",{className:"p-3 font-semibold text-sm flex justify-between",children:[jsxRuntime.jsx("span",{children:"West"}),jsxRuntime.jsx("span",{children:R})]}),f.map((C,T)=>n(C,T))]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("div",{className:"p-3 font-semibold text-sm flex justify-between",children:[jsxRuntime.jsx("span",{children:"East"}),jsxRuntime.jsx("span",{children:_})]}),p.map((C,T)=>n(C,T))]})]}),m.length>0&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("div",{className:"border-t p-3 font-semibold text-sm",children:jsxRuntime.jsx("span",{children:"Other"})}),jsxRuntime.jsx("div",{className:"grid grid-cols-2",children:m.map((C,T)=>n(C,T,T%2===0,!0))})]})]}),u.length>0&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs("div",{className:"grid grid-cols-2 border-t bg-gray-50",children:[jsxRuntime.jsxs("div",{className:"p-3 font-semibold text-sm flex justify-between",children:[jsxRuntime.jsx("span",{children:"United States"}),jsxRuntime.jsx("span",{children:E})]}),jsxRuntime.jsx("div",{className:"p-3"})]}),jsxRuntime.jsx("div",{className:"grid grid-cols-2",children:u.map((C,T)=>n(C,T,T%2===0,!0))})]}),e.length===0&&jsxRuntime.jsx("div",{className:"p-6 text-center text-gray-500",children:"No inventory information available"})]})}const falsyToString=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,cx=clsx,cva=(e,t)=>n=>{var i;if((t==null?void 0:t.variants)==null)return cx(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:l}=t,u=Object.keys(o).map(p=>{const m=n==null?void 0:n[p],g=l==null?void 0:l[p];if(m===null)return null;const b=falsyToString(m)||falsyToString(g);return o[p][b]}),d=n&&Object.entries(n).reduce((p,m)=>{let[g,b]=m;return b===void 0||(p[g]=b),p},{}),f=t==null||(i=t.compoundVariants)===null||i===void 0?void 0:i.reduce((p,m)=>{let{class:g,className:b,..._}=m;return Object.entries(_).every(R=>{let[E,S]=R;return Array.isArray(S)?S.includes({...l,...d}[E]):{...l,...d}[E]===S})?[...p,g,b]:p},[]);return cx(e,u,f,n==null?void 0:n.class,n==null?void 0:n.className)},buttonVariants=cva("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 cursor-pointer",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-sm hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-xs hover:bg-destructive/90",outline:"border border-input text-foreground bg-background shadow-xs hover:bg-accent hover:text-accent-foreground",defaultOutline:"border border-red-600/30 text-red-600 bg-background shadow-xs hover:bg-red-600/5 ",secondary:"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline",blue:"bg-randmar-blue text-gray-100 shadow-sm hover:bg-randmar-blue/90",red:"bg-randmar-red text-gray-100 shadow-sm hover:bg-randmar-red/90",none:""},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),Button=React__namespace.forwardRef(({className:e,variant:t,size:n,asChild:i=!1,confirmationDialog:o,onClick:l,...u},d)=>{const f=i?Slot$2:"button";if(!o)return jsxRuntime.jsx(f,{className:cn(buttonVariants({variant:t,size:n,className:e})),ref:d,onClick:l,...u});l&&console.warn("Button: You provided both onClick and confirmationDialog props. The onClick prop will be ignored. Use the onConfirm callback in confirmationDialog instead.");const{title:p,content:m,onConfirm:g,confirmText:b="Confirm",cancelText:_="Cancel"}=o,R=()=>{g()};return jsxRuntime.jsxs(Dialog,{children:[jsxRuntime.jsx(DialogTrigger,{asChild:!0,children:jsxRuntime.jsx(f,{className:cn(buttonVariants({variant:t,size:n,className:e})),ref:d,...u})}),jsxRuntime.jsxs(DialogContent,{children:[jsxRuntime.jsxs(DialogHeader,{children:[jsxRuntime.jsx(DialogTitle,{children:p}),jsxRuntime.jsx(DialogDescription,{children:m})]}),jsxRuntime.jsxs(DialogFooter,{className:"flex justify-end gap-2 pt-4",children:[jsxRuntime.jsx(DialogClose,{asChild:!0,children:jsxRuntime.jsx(Button,{variant:"outline",children:_})}),jsxRuntime.jsx(DialogClose,{asChild:!0,children:jsxRuntime.jsx(Button,{onClick:R,children:b})})]})]})]})});Button.displayName="Button";var NAME$2="VisuallyHidden",VisuallyHidden=React__namespace.forwardRef((e,t)=>jsxRuntime.jsx(Primitive.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));VisuallyHidden.displayName=NAME$2;var Root$4=VisuallyHidden,[createTooltipContext,createTooltipScope]=createContextScope("Tooltip",[createPopperScope]),usePopperScope=createPopperScope(),PROVIDER_NAME$1="TooltipProvider",DEFAULT_DELAY_DURATION=700,TOOLTIP_OPEN="tooltip.open",[TooltipProviderContextProvider,useTooltipProviderContext]=createTooltipContext(PROVIDER_NAME$1),TooltipProvider$1=e=>{const{__scopeTooltip:t,delayDuration:n=DEFAULT_DELAY_DURATION,skipDelayDuration:i=300,disableHoverableContent:o=!1,children:l}=e,u=React__namespace.useRef(!0),d=React__namespace.useRef(!1),f=React__namespace.useRef(0);return React__namespace.useEffect(()=>{const p=f.current;return()=>window.clearTimeout(p)},[]),jsxRuntime.jsx(TooltipProviderContextProvider,{scope:t,isOpenDelayedRef:u,delayDuration:n,onOpen:React__namespace.useCallback(()=>{window.clearTimeout(f.current),u.current=!1},[]),onClose:React__namespace.useCallback(()=>{window.clearTimeout(f.current),f.current=window.setTimeout(()=>u.current=!0,i)},[i]),isPointerInTransitRef:d,onPointerInTransitChange:React__namespace.useCallback(p=>{d.current=p},[]),disableHoverableContent:o,children:l})};TooltipProvider$1.displayName=PROVIDER_NAME$1;var TOOLTIP_NAME="Tooltip",[TooltipContextProvider,useTooltipContext]=createTooltipContext(TOOLTIP_NAME),Tooltip$2=e=>{const{__scopeTooltip:t,children:n,open:i,defaultOpen:o=!1,onOpenChange:l,disableHoverableContent:u,delayDuration:d}=e,f=useTooltipProviderContext(TOOLTIP_NAME,e.__scopeTooltip),p=usePopperScope(t),[m,g]=React__namespace.useState(null),b=useId(),_=React__namespace.useRef(0),R=u??f.disableHoverableContent,E=d??f.delayDuration,S=React__namespace.useRef(!1),[C=!1,T]=useControllableState({prop:i,defaultProp:o,onChange:N=>{N?(f.onOpen(),document.dispatchEvent(new CustomEvent(TOOLTIP_OPEN))):f.onClose(),l==null||l(N)}}),A=React__namespace.useMemo(()=>C?S.current?"delayed-open":"instant-open":"closed",[C]),M=React__namespace.useCallback(()=>{window.clearTimeout(_.current),_.current=0,S.current=!1,T(!0)},[T]),I=React__namespace.useCallback(()=>{window.clearTimeout(_.current),_.current=0,T(!1)},[T]),O=React__namespace.useCallback(()=>{window.clearTimeout(_.current),_.current=window.setTimeout(()=>{S.current=!0,T(!0),_.current=0},E)},[E,T]);return React__namespace.useEffect(()=>()=>{_.current&&(window.clearTimeout(_.current),_.current=0)},[]),jsxRuntime.jsx(Root2$3,{...p,children:jsxRuntime.jsx(TooltipContextProvider,{scope:t,contentId:b,open:C,stateAttribute:A,trigger:m,onTriggerChange:g,onTriggerEnter:React__namespace.useCallback(()=>{f.isOpenDelayedRef.current?O():M()},[f.isOpenDelayedRef,O,M]),onTriggerLeave:React__namespace.useCallback(()=>{R?I():(window.clearTimeout(_.current),_.current=0)},[I,R]),onOpen:M,onClose:I,disableHoverableContent:R,children:n})})};Tooltip$2.displayName=TOOLTIP_NAME;var TRIGGER_NAME$1="TooltipTrigger",TooltipTrigger$1=React__namespace.forwardRef((e,t)=>{const{__scopeTooltip:n,...i}=e,o=useTooltipContext(TRIGGER_NAME$1,n),l=useTooltipProviderContext(TRIGGER_NAME$1,n),u=usePopperScope(n),d=React__namespace.useRef(null),f=useComposedRefs(t,d,o.onTriggerChange),p=React__namespace.useRef(!1),m=React__namespace.useRef(!1),g=React__namespace.useCallback(()=>p.current=!1,[]);return React__namespace.useEffect(()=>()=>document.removeEventListener("pointerup",g),[g]),jsxRuntime.jsx(Anchor,{asChild:!0,...u,children:jsxRuntime.jsx(Primitive.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...i,ref:f,onPointerMove:composeEventHandlers(e.onPointerMove,b=>{b.pointerType!=="touch"&&!m.current&&!l.isPointerInTransitRef.current&&(o.onTriggerEnter(),m.current=!0)}),onPointerLeave:composeEventHandlers(e.onPointerLeave,()=>{o.onTriggerLeave(),m.current=!1}),onPointerDown:composeEventHandlers(e.onPointerDown,()=>{o.open&&o.onClose(),p.current=!0,document.addEventListener("pointerup",g,{once:!0})}),onFocus:composeEventHandlers(e.onFocus,()=>{p.current||o.onOpen()}),onBlur:composeEventHandlers(e.onBlur,o.onClose),onClick:composeEventHandlers(e.onClick,o.onClose)})})});TooltipTrigger$1.displayName=TRIGGER_NAME$1;var PORTAL_NAME="TooltipPortal",[PortalProvider,usePortalContext]=createTooltipContext(PORTAL_NAME,{forceMount:void 0}),TooltipPortal=e=>{const{__scopeTooltip:t,forceMount:n,children:i,container:o}=e,l=useTooltipContext(PORTAL_NAME,t);return jsxRuntime.jsx(PortalProvider,{scope:t,forceMount:n,children:jsxRuntime.jsx(Presence,{present:n||l.open,children:jsxRuntime.jsx(Portal$3,{asChild:!0,container:o,children:i})})})};TooltipPortal.displayName=PORTAL_NAME;var CONTENT_NAME$1="TooltipContent",TooltipContent$1=React__namespace.forwardRef((e,t)=>{const n=usePortalContext(CONTENT_NAME$1,e.__scopeTooltip),{forceMount:i=n.forceMount,side:o="top",...l}=e,u=useTooltipContext(CONTENT_NAME$1,e.__scopeTooltip);return jsxRuntime.jsx(Presence,{present:i||u.open,children:u.disableHoverableContent?jsxRuntime.jsx(TooltipContentImpl,{side:o,...l,ref:t}):jsxRuntime.jsx(TooltipContentHoverable,{side:o,...l,ref:t})})}),TooltipContentHoverable=React__namespace.forwardRef((e,t)=>{const n=useTooltipContext(CONTENT_NAME$1,e.__scopeTooltip),i=useTooltipProviderContext(CONTENT_NAME$1,e.__scopeTooltip),o=React__namespace.useRef(null),l=useComposedRefs(t,o),[u,d]=React__namespace.useState(null),{trigger:f,onClose:p}=n,m=o.current,{onPointerInTransitChange:g}=i,b=React__namespace.useCallback(()=>{d(null),g(!1)},[g]),_=React__namespace.useCallback((R,E)=>{const S=R.currentTarget,C={x:R.clientX,y:R.clientY},T=getExitSideFromRect(C,S.getBoundingClientRect()),A=getPaddedExitPoints(C,T),M=getPointsFromRect(E.getBoundingClientRect()),I=getHull([...A,...M]);d(I),g(!0)},[g]);return React__namespace.useEffect(()=>()=>b(),[b]),React__namespace.useEffect(()=>{if(f&&m){const R=S=>_(S,m),E=S=>_(S,f);return f.addEventListener("pointerleave",R),m.addEventListener("pointerleave",E),()=>{f.removeEventListener("pointerleave",R),m.removeEventListener("pointerleave",E)}}},[f,m,_,b]),React__namespace.useEffect(()=>{if(u){const R=E=>{const S=E.target,C={x:E.clientX,y:E.clientY},T=(f==null?void 0:f.contains(S))||(m==null?void 0:m.contains(S)),A=!isPointInPolygon(C,u);T?b():A&&(b(),p())};return document.addEventListener("pointermove",R),()=>document.removeEventListener("pointermove",R)}},[f,m,u,p,b]),jsxRuntime.jsx(TooltipContentImpl,{...e,ref:l})}),[VisuallyHiddenContentContextProvider,useVisuallyHiddenContentContext]=createTooltipContext(TOOLTIP_NAME,{isInside:!1}),Slottable=createSlottable("TooltipContent"),TooltipContentImpl=React__namespace.forwardRef((e,t)=>{const{__scopeTooltip:n,children:i,"aria-label":o,onEscapeKeyDown:l,onPointerDownOutside:u,...d}=e,f=useTooltipContext(CONTENT_NAME$1,n),p=usePopperScope(n),{onClose:m}=f;return React__namespace.useEffect(()=>(document.addEventListener(TOOLTIP_OPEN,m),()=>document.removeEventListener(TOOLTIP_OPEN,m)),[m]),React__namespace.useEffect(()=>{if(f.trigger){const g=b=>{const _=b.target;_!=null&&_.contains(f.trigger)&&m()};return window.addEventListener("scroll",g,{capture:!0}),()=>window.removeEventListener("scroll",g,{capture:!0})}},[f.trigger,m]),jsxRuntime.jsx(DismissableLayer,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:g=>g.preventDefault(),onDismiss:m,children:jsxRuntime.jsxs(Content$1,{"data-state":f.stateAttribute,...p,...d,ref:t,style:{...d.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[jsxRuntime.jsx(Slottable,{children:i}),jsxRuntime.jsx(VisuallyHiddenContentContextProvider,{scope:n,isInside:!0,children:jsxRuntime.jsx(Root$4,{id:f.contentId,role:"tooltip",children:o||i})})]})})});TooltipContent$1.displayName=CONTENT_NAME$1;var ARROW_NAME="TooltipArrow",TooltipArrow=React__namespace.forwardRef((e,t)=>{const{__scopeTooltip:n,...i}=e,o=usePopperScope(n);return useVisuallyHiddenContentContext(ARROW_NAME,n).isInside?null:jsxRuntime.jsx(Arrow,{...o,...i,ref:t})});TooltipArrow.displayName=ARROW_NAME;function getExitSideFromRect(e,t){const n=Math.abs(t.top-e.y),i=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),l=Math.abs(t.left-e.x);switch(Math.min(n,i,o,l)){case l:return"left";case o:return"right";case n:return"top";case i:return"bottom";default:throw new Error("unreachable")}}function getPaddedExitPoints(e,t,n=5){const i=[];switch(t){case"top":i.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":i.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":i.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":i.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return i}function getPointsFromRect(e){const{top:t,right:n,bottom:i,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:i},{x:o,y:i}]}function isPointInPolygon(e,t){const{x:n,y:i}=e;let o=!1;for(let l=0,u=t.length-1;l<t.length;u=l++){const d=t[l].x,f=t[l].y,p=t[u].x,m=t[u].y;f>i!=m>i&&n<(p-d)*(i-f)/(m-f)+d&&(o=!o)}return o}function getHull(e){const t=e.slice();return t.sort((n,i)=>n.x<i.x?-1:n.x>i.x?1:n.y<i.y?-1:n.y>i.y?1:0),getHullPresorted(t)}function getHullPresorted(e){if(e.length<=1)return e.slice();const t=[];for(let i=0;i<e.length;i++){const o=e[i];for(;t.length>=2;){const l=t[t.length-1],u=t[t.length-2];if((l.x-u.x)*(o.y-u.y)>=(l.y-u.y)*(o.x-u.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let i=e.length-1;i>=0;i--){const o=e[i];for(;n.length>=2;){const l=n[n.length-1],u=n[n.length-2];if((l.x-u.x)*(o.y-u.y)>=(l.y-u.y)*(o.x-u.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var Provider$1=TooltipProvider$1,Root3=Tooltip$2,Trigger$1=TooltipTrigger$1,Portal=TooltipPortal,Content2=TooltipContent$1;const TooltipProvider=Provider$1,Tooltip$1=Root3,TooltipTrigger=Trigger$1,TooltipContent=React__namespace.forwardRef(({className:e,sideOffset:t=4,...n},i)=>jsxRuntime.jsx(Portal,{children:jsxRuntime.jsx(Content2,{ref:i,sideOffset:t,className:cn("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n})}));TooltipContent.displayName=Content2.displayName;const Input=React__namespace.forwardRef(({className:e,type:t,mask:n,onChange:i,placeholder:o,...l},u)=>{const[d,f]=React__namespace.useState(!1),p=React__namespace.useRef(null),g=o||(n==="phone"?"(999) 999-9999":n==="postal-code-ca"?"A9A 9A9":n==="zip-code-us"?"99999":""),b=()=>n==="phone"?"Only enter numbers. Formatting will be added automatically.":n==="postal-code-ca"?"Enter letters and numbers only. Spacing will be applied automatically.":n==="zip-code-us"?"Only enter numbers. Formatting will be added automatically.":"",_=()=>{f(!0),p.current&&clearTimeout(p.current),p.current=setTimeout(()=>{f(!1)},3e3)};React__namespace.useEffect(()=>()=>{p.current&&clearTimeout(p.current)},[]);const R=E=>{if(n){const S=E.target.value;let C=S;if(S.length>0){const T=S[S.length-1];/[^a-zA-Z0-9]/.test(T)&&(console.log("Non-alphanumeric detected:",T),_())}if(n==="phone"){const T=S.replace(/\D/g,"");T.length<=3?C=T:T.length<=6?C=`(${T.slice(0,3)}) ${T.slice(3)}`:C=`(${T.slice(0,3)}) ${T.slice(3,6)}-${T.slice(6,10)}`}else if(n==="postal-code-ca"){const T=S.replace(/[^a-zA-Z0-9]/g,"").toUpperCase();let A="";for(let M=0;M<Math.min(T.length,6);M++){const I=T[M];M===0||M===2||M===4?/[A-Z]/.test(I)&&(A+=I):(M===1||M===3||M===5)&&/[0-9]/.test(I)&&(A+=I)}A.length<=3?C=A:C=`${A.slice(0,3)} ${A.slice(3,6)}`}else if(n==="zip-code-us"){const T=S.replace(/\D/g,"");T.length<=5?C=T:C=`${T.slice(0,5)}-${T.slice(5,9)}`}E.target.value=C}i==null||i(E)};return jsxRuntime.jsx(TooltipProvider,{children:jsxRuntime.jsxs(Tooltip$1,{open:d&&!!n,children:[jsxRuntime.jsx(TooltipTrigger,{asChild:!0,children:jsxRuntime.jsx("input",{type:t,className:cn("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-xs transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),onChange:R,placeholder:g,ref:u,...l})}),jsxRuntime.jsx(TooltipContent,{side:"top",className:"bg-sidebar text-sidebar-foreground",children:b()})]})})});Input.displayName="Input";var NAME$1="Separator",DEFAULT_ORIENTATION="horizontal",ORIENTATIONS=["horizontal","vertical"],Separator$1=React__namespace.forwardRef((e,t)=>{const{decorative:n,orientation:i=DEFAULT_ORIENTATION,...o}=e,l=isValidOrientation(i)?i:DEFAULT_ORIENTATION,d=n?{role:"none"}:{"aria-orientation":l==="vertical"?l:void 0,role:"separator"};return jsxRuntime.jsx(Primitive.div,{"data-orientation":l,...d,...o,ref:t})});Separator$1.displayName=NAME$1;function isValidOrientation(e){return ORIENTATIONS.includes(e)}var Root$3=Separator$1;const Separator=React__namespace.forwardRef(({className:e,orientation:t="horizontal",decorative:n=!0,...i},o)=>jsxRuntime.jsx(Root$3,{ref:o,decorative:n,orientation:t,className:cn("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...i}));Separator.displayName=Root$3.displayName;const Sheet=Root$7,SheetTrigger=Trigger$3,SheetClose=Close$1,SheetPortal=Portal$2,SheetOverlay=React__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx(Overlay,{className:cn("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:n}));SheetOverlay.displayName=Overlay.displayName;const sheetVariants=cva("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500 data-[state=open]:animate-in data-[state=closed]:animate-out",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),SheetContent=React__namespace.forwardRef(({side:e="right",className:t,children:n,...i},o)=>jsxRuntime.jsxs(SheetPortal,{children:[jsxRuntime.jsx(SheetOverlay,{}),jsxRuntime.jsxs(Content$2,{ref:o,className:cn(sheetVariants({side:e}),t),...i,children:[jsxRuntime.jsxs(Close$1,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[jsxRuntime.jsx(X,{className:"h-4 w-4"}),jsxRuntime.jsx("span",{className:"sr-only",children:"Close"})]}),n]})]}));SheetContent.displayName=Content$2.displayName;const SheetHeader=({className:e,...t})=>jsxRuntime.jsx("div",{className:cn("flex flex-col space-y-2 text-center sm:text-left",e),...t});SheetHeader.displayName="SheetHeader";const SheetFooter=({className:e,...t})=>jsxRuntime.jsx("div",{className:cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});SheetFooter.displayName="SheetFooter";const SheetTitle=React__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx(Title$1,{ref:n,className:cn("text-lg font-semibold text-foreground",e),...t}));SheetTitle.displayName=Title$1.displayName;const SheetDescription=React__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx(Description$1,{ref:n,className:cn("text-sm text-muted-foreground",e),...t}));SheetDescription.displayName=Description$1.displayName;function AvatarFooter({onClick:e,publicName:t,applicationName:n,partnerId:i}){const o=`https://api.randmar.io/v4/Partner/${i}/Account/Logo?height=72&width=72`,[l,u]=React.useState(!1),d=()=>{u(!0)};return jsxRuntime.jsxs("div",{className:"flex items-center gap-3",children:[jsxRuntime.jsx("div",{className:"flex h-9 w-9 items-center justify-center rounded-lg bg-muted "+(e!==void 0?"cursor-pointer":""),children:l?jsxRuntime.jsx(Button,{asChild:!0,size:"icon",onClick:e,children:jsxRuntime.jsx(TriangleAlert,{className:"h-5 w-5 text-muted-foreground !bg-sidebar"})}):jsxRuntime.jsx(Button,{asChild:!0,size:"icon",onClick:e,children:jsxRuntime.jsx("img",{src:o,alt:"Partner logo",className:"h-9 w-9 object-cover !bg-sidebar",onError:d})})}),jsxRuntime.jsxs("div",{className:"flex flex-1 flex-col",children:[jsxRuntime.jsx("span",{className:"text-sm font-medium",children:t||"Partner"}),jsxRuntime.jsx("span",{className:"text-xs text-neutral-400",children:n})]})]})}var NAME="Label",Label$2=React__namespace.forwardRef((e,t)=>jsxRuntime.jsx(Primitive.label,{...e,ref:t,onMouseDown:n=>{var o;n.target.closest("button, input, select, textarea")||((o=e.onMouseDown)==null||o.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));Label$2.displayName=NAME;var Root$2=Label$2;function Label$1({className:e,...t}){return jsxRuntime.jsx(Root$2,{"data-slot":"label",className:cn("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...t})}const MOBILE_BREAKPOINT=1024;function useIsMobile(){const[e,t]=React__namespace.useState(void 0);return React__namespace.useEffect(()=>{const n=window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT-1}px)`),i=()=>{t(window.innerWidth<MOBILE_BREAKPOINT)};return n.addEventListener("change",i),t(window.innerWidth<MOBILE_BREAKPOINT),()=>n.removeEventListener("change",i)},[]),!!e}function Skeleton({className:e,...t}){return jsxRuntime.jsx("div",{className:cn("animate-pulse rounded-md bg-primary/20",e),...t})}const SIDEBAR_COOKIE_NAME="sidebar:state",SIDEBAR_COOKIE_MAX_AGE=60*60*24*7,SIDEBAR_WIDTH="16rem",SIDEBAR_WIDTH_MOBILE="18rem",SIDEBAR_WIDTH_ICON="3rem",SIDEBAR_KEYBOARD_SHORTCUT="b",SidebarContext=React__namespace.createContext(null);function useSidebar(){const e=React__namespace.useContext(SidebarContext);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}const SidebarProvider=React__namespace.forwardRef(({defaultOpen:e=!0,open:t,onOpenChange:n,className:i,style:o,children:l,...u},d)=>{const f=useIsMobile(),[p,m]=React__namespace.useState(!1),[g,b]=React__namespace.useState(e),_=t??g,R=React__namespace.useCallback(T=>{const A=typeof T=="function"?T(_):T;n?n(A):b(A),document.cookie=`${SIDEBAR_COOKIE_NAME}=${A}; path=/; max-age=${SIDEBAR_COOKIE_MAX_AGE}`},[n,_]),E=React__namespace.useCallback(()=>f?m(T=>!T):R(T=>!T),[f,R,m]);React__namespace.useEffect(()=>{const T=A=>{A.key===SIDEBAR_KEYBOARD_SHORTCUT&&(A.metaKey||A.ctrlKey)&&(A.preventDefault(),E())};return window.addEventListener("keydown",T),()=>window.removeEventListener("keydown",T)},[E]);const S=_?"expanded":"collapsed",C=React__namespace.useMemo(()=>({state:S,open:_,setOpen:R,isMobile:f,openMobile:p,setOpenMobile:m,toggleSidebar:E}),[S,_,R,f,p,m,E]);return jsxRuntime.jsx(SidebarContext.Provider,{value:C,children:jsxRuntime.jsx(TooltipProvider,{delayDuration:0,children:jsxRuntime.jsx("div",{style:{"--sidebar-width":SIDEBAR_WIDTH,"--sidebar-width-icon":SIDEBAR_WIDTH_ICON,...o},className:cn("group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar",i),ref:d,...u,children:l})})})});SidebarProvider.displayName="SidebarProvider";const Sidebar=React__namespace.forwardRef(({side:e="left",variant:t="sidebar",collapsible:n="offcanvas",className:i,children:o,...l},u)=>{const{isMobile:d,state:f,openMobile:p,setOpenMobile:m}=useSidebar();return n==="none"?jsxRuntime.jsx("div",{className:cn("flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground",i),ref:u,...l,children:o}):d?jsxRuntime.jsx(Sheet,{open:p,onOpenChange:m,...l,children:jsxRuntime.jsx(SheetContent,{"data-sidebar":"sidebar","data-mobile":"true",className:"w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":SIDEBAR_WIDTH_MOBILE},side:e,children:jsxRuntime.jsx("div",{className:"flex h-full w-full flex-col",children:o})})}):jsxRuntime.jsxs("div",{ref:u,className:"group peer hidden md:block text-sidebar-foreground","data-state":f,"data-collapsible":f==="collapsed"?n:"","data-variant":t,"data-side":e,children:[jsxRuntime.jsx("div",{className:cn("duration-200 relative h-svh w-(--sidebar-width) bg-transparent transition-[width] ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",t==="floating"||t==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)")}),jsxRuntime.jsx("div",{className:cn("duration-200 fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] ease-linear md:flex",e==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",t==="floating"||t==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l",i),...l,children:jsxRuntime.jsx("div",{"data-sidebar":"sidebar",className:"flex h-full w-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow-sm",children:o})})]})});Sidebar.displayName="Sidebar";const SidebarTrigger=React__namespace.forwardRef(({className:e,onClick:t,...n},i)=>{const{toggleSidebar:o}=useSidebar();return jsxRuntime.jsxs(Button,{ref:i,"data-sidebar":"trigger",variant:"ghost",size:"icon",className:cn("h-7 w-7 text-sidebar-foreground",e),onClick:l=>{t==null||t(l),o()},...n,children:[jsxRuntime.jsx(PanelLeft,{}),jsxRuntime.jsx("span",{className:"sr-only",children:"Toggle Sidebar"})]})});SidebarTrigger.displayName="SidebarTrigger";const SidebarRail=React__namespace.forwardRef(({className:e,...t},n)=>{const{toggleSidebar:i}=useSidebar();return jsxRuntime.jsx("button",{ref:n,"data-sidebar":"rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:i,title:"Toggle Sidebar",className:cn("absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex","in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize","group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full hover:group-data-[collapsible=offcanvas]:bg-sidebar","[[data-side=left][data-collapsible=offcanvas]_&]:-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",e),...t})});SidebarRail.displayName="SidebarRail";const SidebarInset=React__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("main",{ref:n,className:cn("relative flex min-h-svh flex-1 flex-col bg-background","peer-data-[variant=inset]:min-h-[calc(100svh-(--spacing(4)))] md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm",e),...t}));SidebarInset.displayName="SidebarInset";const SidebarInput=React__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx(Input,{ref:n,"data-sidebar":"input",className:cn("h-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",e),...t}));SidebarInput.displayName="SidebarInput";const SidebarHeader=React__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("div",{ref:n,"data-sidebar":"header",className:cn("flex flex-col gap-2 p-2",e),...t}));SidebarHeader.displayName="SidebarHeader";const SidebarFooter=React__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("div",{ref:n,"data-sidebar":"footer",className:cn("flex flex-col gap-2 p-2",e),...t}));SidebarFooter.displayName="SidebarFooter";const SidebarSeparator=React__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx(Separator,{ref:n,"data-sidebar":"separator",className:cn("mx-2 w-auto bg-sidebar-border",e),...t}));SidebarSeparator.displayName="SidebarSeparator";const SidebarContent=React__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("div",{ref:n,"data-sidebar":"content",className:cn("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...t}));SidebarContent.displayName="SidebarContent";const SidebarGroup=React__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("div",{ref:n,"data-sidebar":"group",className:cn("relative flex w-full min-w-0 flex-col p-2",e),...t}));SidebarGroup.displayName="SidebarGroup";const SidebarGroupLabel=React__namespace.forwardRef(({className:e,asChild:t=!1,...n},i)=>{const o=t?Slot$2:"div";return jsxRuntime.jsx(o,{ref:i,"data-sidebar":"group-label",className:cn("duration-200 flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 outline-hidden ring-sidebar-ring transition-[margin,opa] ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",e),...n})});SidebarGroupLabel.displayName="SidebarGroupLabel";const SidebarGroupAction=React__namespace.forwardRef(({className:e,asChild:t=!1,...n},i)=>{const o=t?Slot$2:"button";return jsxRuntime.jsx(o,{ref:i,"data-sidebar":"group-action",className:cn("absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-hidden ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 md:after:hidden","group-data-[collapsible=icon]:hidden",e),...n})});SidebarGroupAction.displayName="SidebarGroupAction";const SidebarGroupContent=React__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("div",{ref:n,"data-sidebar":"group-content",className:cn("w-full text-sm",e),...t}));SidebarGroupContent.displayName="SidebarGroupContent";const SidebarMenu=React__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("ul",{ref:n,"data-sidebar":"menu",className:cn("flex w-full min-w-0 flex-col gap-1",e),...t}));SidebarMenu.displayName="SidebarMenu";const SidebarMenuItem=React__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("li",{ref:n,"data-sidebar":"menu-item",className:cn("group/menu-item relative",e),...t}));SidebarMenuItem.displayName="SidebarMenuItem";const sidebarMenuButtonVariants=cva("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-hidden ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:p-0!"}},defaultVariants:{variant:"default",size:"default"}}),SidebarMenuButton=React__namespace.forwardRef(({asChild:e=!1,isActive:t=!1,variant:n="default",size:i="default",tooltip:o,className:l,...u},d)=>{const f=e?Slot$2:"button",{isMobile:p,state:m}=useSidebar(),g=jsxRuntime.jsx(f,{ref:d,"data-sidebar":"menu-button","data-size":i,"data-active":t,className:cn(sidebarMenuButtonVariants({variant:n,size:i}),l),...u});return o?(typeof o=="string"&&(o={children:o}),jsxRuntime.jsxs(Tooltip$1,{children:[jsxRuntime.jsx(TooltipTrigger,{asChild:!0,children:g}),jsxRuntime.jsx(TooltipContent,{side:"right",align:"center",hidden:m!=="collapsed"||p,...o})]})):g});SidebarMenuButton.displayName="SidebarMenuButton";const SidebarMenuAction=React__namespace.forwardRef(({className:e,asChild:t=!1,showOnHover:n=!1,...i},o)=>{const l=t?Slot$2:"button";return jsxRuntime.jsx(l,{ref:o,"data-sidebar":"menu-action",className:cn("absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-hidden ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 md:after:hidden","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",n&&"group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground md:opacity-0",e),...i})});SidebarMenuAction.displayName="SidebarMenuAction";const SidebarMenuBadge=React__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("div",{ref:n,"data-sidebar":"menu-badge",className:cn("absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums text-sidebar-foreground select-none pointer-events-none","peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",e),...t}));SidebarMenuBadge.displayName="SidebarMenuBadge";const SidebarMenuSkeleton=React__namespace.forwardRef(({className:e,showIcon:t=!1,...n},i)=>{const o=React__namespace.useMemo(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return jsxRuntime.jsxs("div",{ref:i,"data-sidebar":"menu-skeleton",className:cn("rounded-md h-8 flex gap-2 px-2 items-center",e),...n,children:[t&&jsxRuntime.jsx(Skeleton,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),jsxRuntime.jsx(Skeleton,{className:"h-4 flex-1 max-w-(--skeleton-width)","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":o}})]})});SidebarMenuSkeleton.displayName="SidebarMenuSkeleton";const SidebarMenuSub=React__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("ul",{ref:n,"data-sidebar":"menu-sub",className:cn("mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5","group-data-[collapsible=icon]:hidden",e),...t}));SidebarMenuSub.displayName="SidebarMenuSub";const SidebarMenuSubItem=React__namespace.forwardRef(({...e},t)=>jsxRuntime.jsx("li",{ref:t,...e}));SidebarMenuSubItem.displayName="SidebarMenuSubItem";const SidebarMenuSubButton=React__namespace.forwardRef(({asChild:e=!1,size:t="md",isActive:n,className:i,...o},l)=>{const u=e?Slot$2:"a";return jsxRuntime.jsx(u,{ref:l,"data-sidebar":"menu-sub-button","data-size":t,"data-active":n,className:cn("flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground outline-hidden ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground","data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",t==="sm"&&"text-xs",t==="md"&&"text-sm","group-data-[collapsible=icon]:hidden",i),...o})});SidebarMenuSubButton.displayName="SidebarMenuSubButton";var PROVIDER_NAME="ToastProvider",[Collection,useCollection,createCollectionScope]=createCollection("Toast"),[createToastContext,createToastScope]=createContextScope("Toast",[createCollectionScope]),[ToastProviderProvider,useToastProviderContext]=createToastContext(PROVIDER_NAME),ToastProvider$1=e=>{const{__scopeToast:t,label:n="Notification",duration:i=5e3,swipeDirection:o="right",swipeThreshold:l=50,children:u}=e,[d,f]=React__namespace.useState(null),[p,m]=React__namespace.useState(0),g=React__namespace.useRef(!1),b=React__namespace.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${PROVIDER_NAME}\`. Expected non-empty \`string\`.`),jsxRuntime.jsx(Collection.Provider,{scope:t,children:jsxRuntime.jsx(ToastProviderProvider,{scope:t,label:n,duration:i,swipeDirection:o,swipeThreshold:l,toastCount:p,viewport:d,onViewportChange:f,onToastAdd:React__namespace.useCallback(()=>m(_=>_+1),[]),onToastRemove:React__namespace.useCallback(()=>m(_=>_-1),[]),isFocusedToastEscapeKeyDownRef:g,isClosePausedRef:b,children:u})})};ToastProvider$1.displayName=PROVIDER_NAME;var VIEWPORT_NAME$1="ToastViewport",VIEWPORT_DEFAULT_HOTKEY=["F8"],VIEWPORT_PAUSE="toast.viewportPause",VIEWPORT_RESUME="toast.viewportResume",ToastViewport$1=React__namespace.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:i=VIEWPORT_DEFAULT_HOTKEY,label:o="Notifications ({hotkey})",...l}=e,u=useToastProviderContext(VIEWPORT_NAME$1,n),d=useCollection(n),f=React__namespace.useRef(null),p=React__namespace.useRef(null),m=React__namespace.useRef(null),g=React__namespace.useRef(null),b=useComposedRefs(t,g,u.onViewportChange),_=i.join("+").replace(/Key/g,"").replace(/Digit/g,""),R=u.toastCount>0;React__namespace.useEffect(()=>{const S=C=>{var A;i.length!==0&&i.every(M=>C[M]||C.code===M)&&((A=g.current)==null||A.focus())};return document.addEventListener("keydown",S),()=>document.removeEventListener("keydown",S)},[i]),React__namespace.useEffect(()=>{const S=f.current,C=g.current;if(R&&S&&C){const T=()=>{if(!u.isClosePausedRef.current){const O=new CustomEvent(VIEWPORT_PAUSE);C.dispatchEvent(O),u.isClosePausedRef.current=!0}},A=()=>{if(u.isClosePausedRef.current){const O=new CustomEvent(VIEWPORT_RESUME);C.dispatchEvent(O),u.isClosePausedRef.current=!1}},M=O=>{!S.contains(O.relatedTarget)&&A()},I=()=>{S.contains(document.activeElement)||A()};return S.addEventListener("focusin",T),S.addEventListener("focusout",M),S.addEventListener("pointermove",T),S.addEventListener("pointerleave",I),window.addEventListener("blur",T),window.addEventListener("focus",A),()=>{S.removeEventListener("focusin",T),S.removeEventListener("focusout",M),S.removeEventListener("pointermove",T),S.removeEventListener("pointerleave",I),window.removeEventListener("blur",T),window.removeEventListener("focus",A)}}},[R,u.isClosePausedRef]);const E=React__namespace.useCallback(({tabbingDirection:S})=>{const T=d().map(A=>{const M=A.ref.current,I=[M,...getTabbableCandidates(M)];return S==="forwards"?I:I.reverse()});return(S==="forwards"?T.reverse():T).flat()},[d]);return React__namespace.useEffect(()=>{const S=g.current;if(S){const C=T=>{var I,O,N;const A=T.altKey||T.ctrlKey||T.metaKey;if(T.key==="Tab"&&!A){const j=document.activeElement,D=T.shiftKey;if(T.target===S&&D){(I=p.current)==null||I.focus();return}const B=E({tabbingDirection:D?"backwards":"forwards"}),V=B.findIndex(H=>H===j);focusFirst(B.slice(V+1))?T.preventDefault():D?(O=p.current)==null||O.focus():(N=m.current)==null||N.focus()}};return S.addEventListener("keydown",C),()=>S.removeEventListener("keydown",C)}},[d,E]),jsxRuntime.jsxs(Branch,{ref:f,role:"region","aria-label":o.replace("{hotkey}",_),tabIndex:-1,style:{pointerEvents:R?void 0:"none"},children:[R&&jsxRuntime.jsx(FocusProxy,{ref:p,onFocusFromOutsideViewport:()=>{const S=E({tabbingDirection:"forwards"});focusFirst(S)}}),jsxRuntime.jsx(Collection.Slot,{scope:n,children:jsxRuntime.jsx(Primitive.ol,{tabIndex:-1,...l,ref:b})}),R&&jsxRuntime.jsx(FocusProxy,{ref:m,onFocusFromOutsideViewport:()=>{const S=E({tabbingDirection:"backwards"});focusFirst(S)}})]})});ToastViewport$1.displayName=VIEWPORT_NAME$1;var FOCUS_PROXY_NAME="ToastFocusProxy",FocusProxy=React__namespace.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:i,...o}=e,l=useToastProviderContext(FOCUS_PROXY_NAME,n);return jsxRuntime.jsx(VisuallyHidden,{"aria-hidden":!0,tabIndex:0,...o,ref:t,style:{position:"fixed"},onFocus:u=>{var p;const d=u.relatedTarget;!((p=l.viewport)!=null&&p.contains(d))&&i()}})});FocusProxy.displayName=FOCUS_PROXY_NAME;var TOAST_NAME="Toast",TOAST_SWIPE_START="toast.swipeStart",TOAST_SWIPE_MOVE="toast.swipeMove",TOAST_SWIPE_CANCEL="toast.swipeCancel",TOAST_SWIPE_END="toast.swipeEnd",Toast$1=React__namespace.forwardRef((e,t)=>{const{forceMount:n,open:i,defaultOpen:o,onOpenChange:l,...u}=e,[d=!0,f]=useControllableState({prop:i,defaultProp:o,onChange:l});return jsxRuntime.jsx(Presence,{present:n||d,children:jsxRuntime.jsx(ToastImpl,{open:d,...u,ref:t,onClose:()=>f(!1),onPause:useCallbackRef$1(e.onPause),onResume:useCallbackRef$1(e.onResume),onSwipeStart:composeEventHandlers(e.onSwipeStart,p=>{p.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:composeEventHandlers(e.onSwipeMove,p=>{const{x:m,y:g}=p.detail.delta;p.currentTarget.setAttribute("data-swipe","move"),p.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${m}px`),p.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${g}px`)}),onSwipeCancel:composeEventHandlers(e.onSwipeCancel,p=>{p.currentTarget.setAttribute("data-swipe","cancel"),p.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),p.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),p.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),p.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:composeEventHandlers(e.onSwipeEnd,p=>{const{x:m,y:g}=p.detail.delta;p.currentTarget.setAttribute("data-swipe","end"),p.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),p.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),p.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${m}px`),p.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${g}px`),f(!1)})})})});Toast$1.displayName=TOAST_NAME;var[ToastInteractiveProvider,useToastInteractiveContext]=createToastContext(TOAST_NAME,{onClose(){}}),ToastImpl=React__namespace.forwardRef((e,t)=>{const{__scopeToast:n,type:i="foreground",duration:o,open:l,onClose:u,onEscapeKeyDown:d,onPause:f,onResume:p,onSwipeStart:m,onSwipeMove:g,onSwipeCancel:b,onSwipeEnd:_,...R}=e,E=useToastProviderContext(TOAST_NAME,n),[S,C]=React__namespace.useState(null),T=useComposedRefs(t,H=>C(H)),A=React__namespace.useRef(null),M=React__namespace.useRef(null),I=o||E.duration,O=React__namespace.useRef(0),N=React__namespace.useRef(I),j=React__namespace.useRef(0),{onToastAdd:D,onToastRemove:F}=E,L=useCallbackRef$1(()=>{var z;(S==null?void 0:S.contains(document.activeElement))&&((z=E.viewport)==null||z.focus()),u()}),B=React__namespace.useCallback(H=>{!H||H===1/0||(window.clearTimeout(j.current),O.current=new Date().getTime(),j.current=window.setTimeout(L,H))},[L]);React__namespace.useEffect(()=>{const H=E.viewport;if(H){const z=()=>{B(N.current),p==null||p()},U=()=>{const Q=new Date().getTime()-O.current;N.current=N.current-Q,window.clearTimeout(j.current),f==null||f()};return H.addEventListener(VIEWPORT_PAUSE,U),H.addEventListener(VIEWPORT_RESUME,z),()=>{H.removeEventListener(VIEWPORT_PAUSE,U),H.removeEventListener(VIEWPORT_RESUME,z)}}},[E.viewport,I,f,p,B]),React__namespace.useEffect(()=>{l&&!E.isClosePausedRef.current&&B(I)},[l,I,E.isClosePausedRef,B]),React__namespace.useEffect(()=>(D(),()=>F()),[D,F]);const V=React__namespace.useMemo(()=>S?getAnnounceTextContent(S):null,[S]);return E.viewport?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[V&&jsxRuntime.jsx(ToastAnnounce,{__scopeToast:n,role:"status","aria-live":i==="foreground"?"assertive":"polite","aria-atomic":!0,children:V}),jsxRuntime.jsx(ToastInteractiveProvider,{scope:n,onClose:L,children:ReactDOM__namespace.createPortal(jsxRuntime.jsx(Collection.ItemSlot,{scope:n,children:jsxRuntime.jsx(Root$8,{asChild:!0,onEscapeKeyDown:composeEventHandlers(d,()=>{E.isFocusedToastEscapeKeyDownRef.current||L(),E.isFocusedToastEscapeKeyDownRef.current=!1}),children:jsxRuntime.jsx(Primitive.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":l?"open":"closed","data-swipe-direction":E.swipeDirection,...R,ref:T,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:composeEventHandlers(e.onKeyDown,H=>{H.key==="Escape"&&(d==null||d(H.nativeEvent),H.nativeEvent.defaultPrevented||(E.isFocusedToastEscapeKeyDownRef.current=!0,L()))}),onPointerDown:composeEventHandlers(e.onPointerDown,H=>{H.button===0&&(A.current={x:H.clientX,y:H.clientY})}),onPointerMove:composeEventHandlers(e.onPointerMove,H=>{if(!A.current)return;const z=H.clientX-A.current.x,U=H.clientY-A.current.y,Q=!!M.current,q=["left","right"].includes(E.swipeDirection),W=["left","up"].includes(E.swipeDirection)?Math.min:Math.max,G=q?W(0,z):0,K=q?0:W(0,U),J=H.pointerType==="touch"?10:2,ee={x:G,y:K},ne={originalEvent:H,delta:ee};Q?(M.current=ee,handleAndDispatchCustomEvent(TOAST_SWIPE_MOVE,g,ne,{discrete:!1})):isDeltaInDirection(ee,E.swipeDirection,J)?(M.current=ee,handleAndDispatchCustomEvent(TOAST_SWIPE_START,m,ne,{discrete:!1}),H.target.setPointerCapture(H.pointerId)):(Math.abs(z)>J||Math.abs(U)>J)&&(A.current=null)}),onPointerUp:composeEventHandlers(e.onPointerUp,H=>{const z=M.current,U=H.target;if(U.hasPointerCapture(H.pointerId)&&U.releasePointerCapture(H.pointerId),M.current=null,A.current=null,z){const Q=H.currentTarget,q={originalEvent:H,delta:z};isDeltaInDirection(z,E.swipeDirection,E.swipeThreshold)?handleAndDispatchCustomEvent(TOAST_SWIPE_END,_,q,{discrete:!0}):handleAndDispatchCustomEvent(TOAST_SWIPE_CANCEL,b,q,{discrete:!0}),Q.addEventListener("click",W=>W.preventDefault(),{once:!0})}})})})}),E.viewport)})]}):null}),ToastAnnounce=e=>{const{__scopeToast:t,children:n,...i}=e,o=useToastProviderContext(TOAST_NAME,t),[l,u]=React__namespace.useState(!1),[d,f]=React__namespace.useState(!1);return useNextFrame(()=>u(!0)),React__namespace.useEffect(()=>{const p=window.setTimeout(()=>f(!0),1e3);return()=>window.clearTimeout(p)},[]),d?null:jsxRuntime.jsx(Portal$3,{asChild:!0,children:jsxRuntime.jsx(VisuallyHidden,{...i,children:l&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[o.label," ",n]})})})},TITLE_NAME="ToastTitle",ToastTitle$1=React__namespace.forwardRef((e,t)=>{const{__scopeToast:n,...i}=e;return jsxRuntime.jsx(Primitive.div,{...i,ref:t})});ToastTitle$1.displayName=TITLE_NAME;var DESCRIPTION_NAME="ToastDescription",ToastDescription$1=React__namespace.forwardRef((e,t)=>{const{__scopeToast:n,...i}=e;return jsxRuntime.jsx(Primitive.div,{...i,ref:t})});ToastDescription$1.displayName=DESCRIPTION_NAME;var ACTION_NAME="ToastAction",ToastAction$1=React__namespace.forwardRef((e,t)=>{const{altText:n,...i}=e;return n.trim()?jsxRuntime.jsx(ToastAnnounceExclude,{altText:n,asChild:!0,children:jsxRuntime.jsx(ToastClose$1,{...i,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${ACTION_NAME}\`. Expected non-empty \`string\`.`),null)});ToastAction$1.displayName=ACTION_NAME;var CLOSE_NAME="ToastClose",ToastClose$1=React__namespace.forwardRef((e,t)=>{const{__scopeToast:n,...i}=e,o=useToastInteractiveContext(CLOSE_NAME,n);return jsxRuntime.jsx(ToastAnnounceExclude,{asChild:!0,children:jsxRuntime.jsx(Primitive.button,{type:"button",...i,ref:t,onClick:composeEventHandlers(e.onClick,o.onClose)})})});ToastClose$1.displayName=CLOSE_NAME;var ToastAnnounceExclude=React__namespace.forwardRef((e,t)=>{const{__scopeToast:n,altText:i,...o}=e;return jsxRuntime.jsx(Primitive.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":i||void 0,...o,ref:t})});function getAnnounceTextContent(e){const t=[];return Array.from(e.childNodes).forEach(i=>{if(i.nodeType===i.TEXT_NODE&&i.textContent&&t.push(i.textContent),isHTMLElement(i)){const o=i.ariaHidden||i.hidden||i.style.display==="none",l=i.dataset.radixToastAnnounceExclude==="";if(!o)if(l){const u=i.dataset.radixToastAnnounceAlt;u&&t.push(u)}else t.push(...getAnnounceTextContent(i))}}),t}function handleAndDispatchCustomEvent(e,t,n,{discrete:i}){const o=n.originalEvent.currentTarget,l=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),i?dispatchDiscreteCustomEvent(o,l):o.dispatchEvent(l)}var isDeltaInDirection=(e,t,n=0)=>{const i=Math.abs(e.x),o=Math.abs(e.y),l=i>o;return t==="left"||t==="right"?l&&i>n:!l&&o>n};function useNextFrame(e=()=>{}){const t=useCallbackRef$1(e);useLayoutEffect2(()=>{let n=0,i=0;return n=window.requestAnimationFrame(()=>i=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(i)}},[t])}function isHTMLElement(e){return e.nodeType===e.ELEMENT_NODE}function getTabbableCandidates(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:i=>{const o=i.tagName==="INPUT"&&i.type==="hidden";return i.disabled||i.hidden||o?NodeFilter.FILTER_SKIP:i.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function focusFirst(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var Provider=ToastProvider$1,Viewport$1=ToastViewport$1,Root2$1=Toast$1,Title=ToastTitle$1,Description=ToastDescription$1,Action=ToastAction$1,Close=ToastClose$1;const ToastProvider=Provider,ToastViewport=React__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx(Viewport$1,{ref:n,className:cn("fixed top-0 z-100 flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e),...t}));ToastViewport.displayName=Viewport$1.displayName;const toastVariants=cva("group pointer-events-auto relative flex w-full items-center justify-between space-x-2 overflow-hidden rounded-md border p-4 pr-6 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full sm:data-[state=open]:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground",success:"border-green-600 bg-green-600 text-white",warning:"border-yellow-500 bg-yellow-500 text-white",info:"border-blue-500 bg-blue-500 text-white",secondary:"border-secondary bg-secondary text-secondary-foreground",outline:"border-input bg-background text-foreground hover:bg-accent hover:text-accent-foreground"}},defaultVariants:{variant:"default"}}),Toast=React__namespace.forwardRef(({className:e,variant:t,...n},i)=>jsxRuntime.jsx(Root2$1,{ref:i,className:cn(toastVariants({variant:t}),e),...n}));Toast.displayName=Root2$1.displayName;const ToastAction=React__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx(Action,{ref:n,className:cn("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium transition-colors hover:bg-secondary focus:outline-hidden focus:ring-1 focus:ring-ring disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 hover:group-[.destructive]:border-destructive/30 hover:group-[.destructive]:bg-destructive hover:group-[.destructive]:text-destructive-foreground focus:group-[.destructive]:ring-destructive",e),...t}));ToastAction.displayName=Action.displayName;const ToastClose=React__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx(Close,{ref:n,className:cn("absolute right-1 top-1 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-hidden focus:ring-1 group-hover:opacity-100 group-[.destructive]:text-red-300 hover:group-[.destructive]:text-red-50 focus:group-[.destructive]:ring-red-400 focus:group-[.destructive]:ring-offset-red-600",e),"toast-close":"",...t,children:jsxRuntime.jsx(X,{className:"h-4 w-4"})}));ToastClose.displayName=Close.displayName;const ToastTitle=React__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx(Title,{ref:n,className:cn("text-sm font-semibold [&+div]:text-xs",e),...t}));ToastTitle.displayName=Title.displayName;const ToastDescription=React__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx(Description,{ref:n,className:cn("text-sm opacity-90",e),...t}));ToastDescription.displayName=Description.displayName;const TOAST_LIMIT=1,TOAST_REMOVE_DELAY=1e6;let count=0;function genId(){return count=(count+1)%Number.MAX_SAFE_INTEGER,count.toString()}const toastTimeouts=new Map,addToRemoveQueue=e=>{if(toastTimeouts.has(e))return;const t=setTimeout(()=>{toastTimeouts.delete(e),dispatch({type:"REMOVE_TOAST",toastId:e})},TOAST_REMOVE_DELAY);toastTimeouts.set(e,t)},reducer=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,TOAST_LIMIT)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(n=>n.id===t.toast.id?{...n,...t.toast}:n)};case"DISMISS_TOAST":{const{toastId:n}=t;return n?addToRemoveQueue(n):e.toasts.forEach(i=>addToRemoveQueue(i.id)),{...e,toasts:e.toasts.map(i=>i.id===n||n===void 0?{...i,open:!1}:i)}}case"REMOVE_TOAST":return{...e,toasts:t.toastId?e.toasts.filter(n=>n.id!==t.toastId):[]}}},listeners=[];let memoryState={toasts:[]};function dispatch(e){memoryState=reducer(memoryState,e),listeners.forEach(t=>t(memoryState))}function toast({...e}){const t=genId(),n=o=>dispatch({type:"UPDATE_TOAST",toast:{...o,id:t}}),i=()=>dispatch({type:"DISMISS_TOAST",toastId:t});return dispatch({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:o=>{o||i()}}}),{id:t,dismiss:i,update:n}}function useToast(){const[e,t]=React__namespace.useState(memoryState);return React__namespace.useEffect(()=>(listeners.push(t),()=>{const n=listeners.indexOf(t);n>-1&&listeners.splice(n,1)}),[]),{...e,toast,dismiss:n=>dispatch({type:"DISMISS_TOAST",toastId:n})}}function Toaster(){const{toasts:e}=useToast();return jsxRuntime.jsxs(ToastProvider,{children:[e.map(function({id:t,title:n,description:i,action:o,...l}){return jsxRuntime.jsxs(Toast,{...l,children:[jsxRuntime.jsxs("div",{className:"grid gap-1",children:[n&&jsxRuntime.jsx(ToastTitle,{children:n}),i&&jsxRuntime.jsx(ToastDescription,{children:i})]}),o,jsxRuntime.jsx(ToastClose,{})]},t)}),jsxRuntime.jsx(ToastViewport,{})]})}var commonjsGlobal=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function getDefaultExportFromCjs(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var isArray_1,hasRequiredIsArray;function requireIsArray(){if(hasRequiredIsArray)return isArray_1;hasRequiredIsArray=1;var e=Array.isArray;return isArray_1=e,isArray_1}var _freeGlobal,hasRequired_freeGlobal;function require_freeGlobal(){if(hasRequired_freeGlobal)return _freeGlobal;hasRequired_freeGlobal=1;var e=typeof commonjsGlobal=="object"&&commonjsGlobal&&commonjsGlobal.Object===Object&&commonjsGlobal;return _freeGlobal=e,_freeGlobal}var _root,hasRequired_root;function require_root(){if(hasRequired_root)return _root;hasRequired_root=1;var e=require_freeGlobal(),t=typeof self=="object"&&self&&self.Object===Object&&self,n=e||t||Function("return this")();return _root=n,_root}var _Symbol,hasRequired_Symbol;function require_Symbol(){if(hasRequired_Symbol)return _Symbol;hasRequired_Symbol=1;var e=require_root(),t=e.Symbol;return _Symbol=t,_Symbol}var _getRawTag,hasRequired_getRawTag;function require_getRawTag(){if(hasRequired_getRawTag)return _getRawTag;hasRequired_getRawTag=1;var e=require_Symbol(),t=Object.prototype,n=t.hasOwnProperty,i=t.toString,o=e?e.toStringTag:void 0;function l(u){var d=n.call(u,o),f=u[o];try{u[o]=void 0;var p=!0}catch{}var m=i.call(u);return p&&(d?u[o]=f:delete u[o]),m}return _getRawTag=l,_getRawTag}var _objectToString,hasRequired_objectToString;function require_objectToString(){if(hasRequired_objectToString)return _objectToString;hasRequired_objectToString=1;var e=Object.prototype,t=e.toString;function n(i){return t.call(i)}return _objectToString=n,_objectToString}var _baseGetTag,hasRequired_baseGetTag;function require_baseGetTag(){if(hasRequired_baseGetTag)return _baseGetTag;hasRequired_baseGetTag=1;var e=require_Symbol(),t=require_getRawTag(),n=require_objectToString(),i="[object Null]",o="[object Undefined]",l=e?e.toStringTag:void 0;function u(d){return d==null?d===void 0?o:i:l&&l in Object(d)?t(d):n(d)}return _baseGetTag=u,_baseGetTag}var isObjectLike_1,hasRequiredIsObjectLike;function requireIsObjectLike(){if(hasRequiredIsObjectLike)return isObjectLike_1;hasRequiredIsObjectLike=1;function e(t){return t!=null&&typeof t=="object"}return isObjectLike_1=e,isObjectLike_1}var isSymbol_1,hasRequiredIsSymbol;function requireIsSymbol(){if(hasRequiredIsSymbol)return isSymbol_1;hasRequiredIsSymbol=1;var e=require_baseGetTag(),t=requireIsObjectLike(),n="[object Symbol]";function i(o){return typeof o=="symbol"||t(o)&&e(o)==n}return isSymbol_1=i,isSymbol_1}var _isKey,hasRequired_isKey;function require_isKey(){if(hasRequired_isKey)return _isKey;hasRequired_isKey=1;var e=requireIsArray(),t=requireIsSymbol(),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,i=/^\w*$/;function o(l,u){if(e(l))return!1;var d=typeof l;return d=="number"||d=="symbol"||d=="boolean"||l==null||t(l)?!0:i.test(l)||!n.test(l)||u!=null&&l in Object(u)}return _isKey=o,_isKey}var isObject_1,hasRequiredIsObject;function requireIsObject(){if(hasRequiredIsObject)return isObject_1;hasRequiredIsObject=1;function e(t){var n=typeof t;return t!=null&&(n=="object"||n=="function")}return isObject_1=e,isObject_1}var isFunction_1,hasRequiredIsFunction;function requireIsFunction(){if(hasRequiredIsFunction)return isFunction_1;hasRequiredIsFunction=1;var e=require_baseGetTag(),t=requireIsObject(),n="[object AsyncFunction]",i="[object Function]",o="[object GeneratorFunction]",l="[object Proxy]";function u(d){if(!t(d))return!1;var f=e(d);return f==i||f==o||f==n||f==l}return isFunction_1=u,isFunction_1}var _coreJsData,hasRequired_coreJsData;function require_coreJsData(){if(hasRequired_coreJsData)return _coreJsData;hasRequired_coreJsData=1;var e=require_root(),t=e["__core-js_shared__"];return _coreJsData=t,_coreJsData}var _isMasked,hasRequired_isMasked;function require_isMasked(){if(hasRequired_isMasked)return _isMasked;hasRequired_isMasked=1;var e=require_coreJsData(),t=function(){var i=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||"");return i?"Symbol(src)_1."+i:""}();function n(i){return!!t&&t in i}return _isMasked=n,_isMasked}var _toSource,hasRequired_toSource;function require_toSource(){if(hasRequired_toSource)return _toSource;hasRequired_toSource=1;var e=Function.prototype,t=e.toString;function n(i){if(i!=null){try{return t.call(i)}catch{}try{return i+""}catch{}}return""}return _toSource=n,_toSource}var _baseIsNative,hasRequired_baseIsNative;function require_baseIsNative(){if(hasRequired_baseIsNative)return _baseIsNative;hasRequired_baseIsNative=1;var e=requireIsFunction(),t=require_isMasked(),n=requireIsObject(),i=require_toSource(),o=/[\\^$.*+?()[\]{}|]/g,l=/^\[object .+?Constructor\]$/,u=Function.prototype,d=Object.prototype,f=u.toString,p=d.hasOwnProperty,m=RegExp("^"+f.call(p).replace(o,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function g(b){if(!n(b)||t(b))return!1;var _=e(b)?m:l;return _.test(i(b))}return _baseIsNative=g,_baseIsNative}var _getValue,hasRequired_getValue;function require_getValue(){if(hasRequired_getValue)return _getValue;hasRequired_getValue=1;function e(t,n){return t==null?void 0:t[n]}return _getValue=e,_getValue}var _getNative,hasRequired_getNative;function require_getNative(){if(hasRequired_getNative)return _getNative;hasRequired_getNative=1;var e=require_baseIsNative(),t=require_getValue();function n(i,o){var l=t(i,o);return e(l)?l:void 0}return _getNative=n,_getNative}var _nativeCreate,hasRequired_nativeCreate;function require_nativeCreate(){if(hasRequired_nativeCreate)return _nativeCreate;hasRequired_nativeCreate=1;var e=require_getNative(),t=e(Object,"create");return _nativeCreate=t,_nativeCreate}var _hashClear,hasRequired_hashClear;function require_hashClear(){if(hasRequired_hashClear)return _hashClear;hasRequired_hashClear=1;var e=require_nativeCreate();function t(){this.__data__=e?e(null):{},this.size=0}return _hashClear=t,_hashClear}var _hashDelete,hasRequired_hashDelete;function require_hashDelete(){if(hasRequired_hashDelete)return _hashDelete;hasRequired_hashDelete=1;function e(t){var n=this.has(t)&&delete this.__data__[t];return this.size-=n?1:0,n}return _hashDelete=e,_hashDelete}var _hashGet,hasRequired_hashGet;function require_hashGet(){if(hasRequired_hashGet)return _hashGet;hasRequired_hashGet=1;var e=require_nativeCreate(),t="__lodash_hash_undefined__",n=Object.prototype,i=n.hasOwnProperty;function o(l){var u=this.__data__;if(e){var d=u[l];return d===t?void 0:d}return i.call(u,l)?u[l]:void 0}return _hashGet=o,_hashGet}var _hashHas,hasRequired_hashHas;function require_hashHas(){if(hasRequired_hashHas)return _hashHas;hasRequired_hashHas=1;var e=require_nativeCreate(),t=Object.prototype,n=t.hasOwnProperty;function i(o){var l=this.__data__;return e?l[o]!==void 0:n.call(l,o)}return _hashHas=i,_hashHas}var _hashSet,hasRequired_hashSet;function require_hashSet(){if(hasRequired_hashSet)return _hashSet;hasRequired_hashSet=1;var e=require_nativeCreate(),t="__lodash_hash_undefined__";function n(i,o){var l=this.__data__;return this.size+=this.has(i)?0:1,l[i]=e&&o===void 0?t:o,this}return _hashSet=n,_hashSet}var _Hash,hasRequired_Hash;function require_Hash(){if(hasRequired_Hash)return _Hash;hasRequired_Hash=1;var e=require_hashClear(),t=require_hashDelete(),n=require_hashGet(),i=require_hashHas(),o=require_hashSet();function l(u){var d=-1,f=u==null?0:u.length;for(this.clear();++d<f;){var p=u[d];this.set(p[0],p[1])}}return l.prototype.clear=e,l.prototype.delete=t,l.prototype.get=n,l.prototype.has=i,l.prototype.set=o,_Hash=l,_Hash}var _listCacheClear,hasRequired_listCacheClear;function require_listCacheClear(){if(hasRequired_listCacheClear)return _listCacheClear;hasRequired_listCacheClear=1;function e(){this.__data__=[],this.size=0}return _listCacheClear=e,_listCacheClear}var eq_1,hasRequiredEq;function requireEq(){if(hasRequiredEq)return eq_1;hasRequiredEq=1;function e(t,n){return t===n||t!==t&&n!==n}return eq_1=e,eq_1}var _assocIndexOf,hasRequired_assocIndexOf;function require_assocIndexOf(){if(hasRequired_assocIndexOf)return _assocIndexOf;hasRequired_assocIndexOf=1;var e=requireEq();function t(n,i){for(var o=n.length;o--;)if(e(n[o][0],i))return o;return-1}return _assocIndexOf=t,_assocIndexOf}var _listCacheDelete,hasRequired_listCacheDelete;function require_listCacheDelete(){if(hasRequired_listCacheDelete)return _listCacheDelete;hasRequired_listCacheDelete=1;var e=require_assocIndexOf(),t=Array.prototype,n=t.splice;function i(o){var l=this.__data__,u=e(l,o);if(u<0)return!1;var d=l.length-1;return u==d?l.pop():n.call(l,u,1),--this.size,!0}return _listCacheDelete=i,_listCacheDelete}var _listCacheGet,hasRequired_listCacheGet;function require_listCacheGet(){if(hasRequired_listCacheGet)return _listCacheGet;hasRequired_listCacheGet=1;var e=require_assocIndexOf();function t(n){var i=this.__data__,o=e(i,n);return o<0?void 0:i[o][1]}return _listCacheGet=t,_listCacheGet}var _listCacheHas,hasRequired_listCacheHas;function require_listCacheHas(){if(hasRequired_listCacheHas)return _listCacheHas;hasRequired_listCacheHas=1;var e=require_assocIndexOf();function t(n){return e(this.__data__,n)>-1}return _listCacheHas=t,_listCacheHas}var _listCacheSet,hasRequired_listCacheSet;function require_listCacheSet(){if(hasRequired_listCacheSet)return _listCacheSet;hasRequired_listCacheSet=1;var e=require_assocIndexOf();function t(n,i){var o=this.__data__,l=e(o,n);return l<0?(++this.size,o.push([n,i])):o[l][1]=i,this}return _listCacheSet=t,_listCacheSet}var _ListCache,hasRequired_ListCache;function require_ListCache(){if(hasRequired_ListCache)return _ListCache;hasRequired_ListCache=1;var e=require_listCacheClear(),t=require_listCacheDelete(),n=require_listCacheGet(),i=require_listCacheHas(),o=require_listCacheSet();function l(u){var d=-1,f=u==null?0:u.length;for(this.clear();++d<f;){var p=u[d];this.set(p[0],p[1])}}return l.prototype.clear=e,l.prototype.delete=t,l.prototype.get=n,l.prototype.has=i,l.prototype.set=o,_ListCache=l,_ListCache}var _Map,hasRequired_Map;function require_Map(){if(hasRequired_Map)return _Map;hasRequired_Map=1;var e=require_getNative(),t=require_root(),n=e(t,"Map");return _Map=n,_Map}var _mapCacheClear,hasRequired_mapCacheClear;function require_mapCacheClear(){if(hasRequired_mapCacheClear)return _mapCacheClear;hasRequired_mapCacheClear=1;var e=require_Hash(),t=require_ListCache(),n=require_Map();function i(){this.size=0,this.__data__={hash:new e,map:new(n||t),string:new e}}return _mapCacheClear=i,_mapCacheClear}var _isKeyable,hasRequired_isKeyable;function require_isKeyable(){if(hasRequired_isKeyable)return _isKeyable;hasRequired_isKeyable=1;function e(t){var n=typeof t;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?t!=="__proto__":t===null}return _isKeyable=e,_isKeyable}var _getMapData,hasRequired_getMapData;function require_getMapData(){if(hasRequired_getMapData)return _getMapData;hasRequired_getMapData=1;var e=require_isKeyable();function t(n,i){var o=n.__data__;return e(i)?o[typeof i=="string"?"string":"hash"]:o.map}return _getMapData=t,_getMapData}var _mapCacheDelete,hasRequired_mapCacheDelete;function require_mapCacheDelete(){if(hasRequired_mapCacheDelete)return _mapCacheDelete;hasRequired_mapCacheDelete=1;var e=require_getMapData();function t(n){var i=e(this,n).delete(n);return this.size-=i?1:0,i}return _mapCacheDelete=t,_mapCacheDelete}var _mapCacheGet,hasRequired_mapCacheGet;function require_mapCacheGet(){if(hasRequired_mapCacheGet)return _mapCacheGet;hasRequired_mapCacheGet=1;var e=require_getMapData();function t(n){return e(this,n).get(n)}return _mapCacheGet=t,_mapCacheGet}var _mapCacheHas,hasRequired_mapCacheHas;function require_mapCacheHas(){if(hasRequired_mapCacheHas)return _mapCacheHas;hasRequired_mapCacheHas=1;var e=require_getMapData();function t(n){return e(this,n).has(n)}return _mapCacheHas=t,_mapCacheHas}var _mapCacheSet,hasRequired_mapCacheSet;function require_mapCacheSet(){if(hasRequired_mapCacheSet)return _mapCacheSet;hasRequired_mapCacheSet=1;var e=require_getMapData();function t(n,i){var o=e(this,n),l=o.size;return o.set(n,i),this.size+=o.size==l?0:1,this}return _mapCacheSet=t,_mapCacheSet}var _MapCache,hasRequired_MapCache;function require_MapCache(){if(hasRequired_MapCache)return _MapCache;hasRequired_MapCache=1;var e=require_mapCacheClear(),t=require_mapCacheDelete(),n=require_mapCacheGet(),i=require_mapCacheHas(),o=require_mapCacheSet();function l(u){var d=-1,f=u==null?0:u.length;for(this.clear();++d<f;){var p=u[d];this.set(p[0],p[1])}}return l.prototype.clear=e,l.prototype.delete=t,l.prototype.get=n,l.prototype.has=i,l.prototype.set=o,_MapCache=l,_MapCache}var memoize_1,hasRequiredMemoize;function requireMemoize(){if(hasRequiredMemoize)return memoize_1;hasRequiredMemoize=1;var e=require_MapCache(),t="Expected a function";function n(i,o){if(typeof i!="function"||o!=null&&typeof o!="function")throw new TypeError(t);var l=function(){var u=arguments,d=o?o.apply(this,u):u[0],f=l.cache;if(f.has(d))return f.get(d);var p=i.apply(this,u);return l.cache=f.set(d,p)||f,p};return l.cache=new(n.Cache||e),l}return n.Cache=e,memoize_1=n,memoize_1}var _memoizeCapped,hasRequired_memoizeCapped;function require_memoizeCapped(){if(hasRequired_memoizeCapped)return _memoizeCapped;hasRequired_memoizeCapped=1;var e=requireMemoize(),t=500;function n(i){var o=e(i,function(u){return l.size===t&&l.clear(),u}),l=o.cache;return o}return _memoizeCapped=n,_memoizeCapped}var _stringToPath,hasRequired_stringToPath;function require_stringToPath(){if(hasRequired_stringToPath)return _stringToPath;hasRequired_stringToPath=1;var e=require_memoizeCapped(),t=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,n=/\\(\\)?/g,i=e(function(o){var l=[];return o.charCodeAt(0)===46&&l.push(""),o.replace(t,function(u,d,f,p){l.push(f?p.replace(n,"$1"):d||u)}),l});return _stringToPath=i,_stringToPath}var _arrayMap,hasRequired_arrayMap;function require_arrayMap(){if(hasRequired_arrayMap)return _arrayMap;hasRequired_arrayMap=1;function e(t,n){for(var i=-1,o=t==null?0:t.length,l=Array(o);++i<o;)l[i]=n(t[i],i,t);return l}return _arrayMap=e,_arrayMap}var _baseToString,hasRequired_baseToString;function require_baseToString(){if(hasRequired_baseToString)return _baseToString;hasRequired_baseToString=1;var e=require_Symbol(),t=require_arrayMap(),n=requireIsArray(),i=requireIsSymbol(),o=e?e.prototype:void 0,l=o?o.toString:void 0;function u(d){if(typeof d=="string")return d;if(n(d))return t(d,u)+"";if(i(d))return l?l.call(d):"";var f=d+"";return f=="0"&&1/d==-1/0?"-0":f}return _baseToString=u,_baseToString}var toString_1,hasRequiredToString;function requireToString(){if(hasRequiredToString)return toString_1;hasRequiredToString=1;var e=require_baseToString();function t(n){return n==null?"":e(n)}return toString_1=t,toString_1}var _castPath,hasRequired_castPath;function require_castPath(){if(hasRequired_castPath)return _castPath;hasRequired_castPath=1;var e=requireIsArray(),t=require_isKey(),n=require_stringToPath(),i=requireToString();function o(l,u){return e(l)?l:t(l,u)?[l]:n(i(l))}return _castPath=o,_castPath}var _toKey,hasRequired_toKey;function require_toKey(){if(hasRequired_toKey)return _toKey;hasRequired_toKey=1;var e=requireIsSymbol();function t(n){if(typeof n=="string"||e(n))return n;var i=n+"";return i=="0"&&1/n==-1/0?"-0":i}return _toKey=t,_toKey}var _baseGet,hasRequired_baseGet;function require_baseGet(){if(hasRequired_baseGet)return _baseGet;hasRequired_baseGet=1;var e=require_castPath(),t=require_toKey();function n(i,o){o=e(o,i);for(var l=0,u=o.length;i!=null&&l<u;)i=i[t(o[l++])];return l&&l==u?i:void 0}return _baseGet=n,_baseGet}var get_1,hasRequiredGet;function requireGet(){if(hasRequiredGet)return get_1;hasRequiredGet=1;var e=require_baseGet();function t(n,i,o){var l=n==null?void 0:e(n,i);return l===void 0?o:l}return get_1=t,get_1}var getExports=requireGet();const get$1=getDefaultExportFromCjs(getExports);var isNil_1,hasRequiredIsNil;function requireIsNil(){if(hasRequiredIsNil)return isNil_1;hasRequiredIsNil=1;function e(t){return t==null}return isNil_1=e,isNil_1}var isNilExports=requireIsNil();const isNil=getDefaultExportFromCjs(isNilExports);var isString_1,hasRequiredIsString;function requireIsString(){if(hasRequiredIsString)return isString_1;hasRequiredIsString=1;var e=require_baseGetTag(),t=requireIsArray(),n=requireIsObjectLike(),i="[object String]";function o(l){return typeof l=="string"||!t(l)&&n(l)&&e(l)==i}return isString_1=o,isString_1}var isStringExports=requireIsString();const isString=getDefaultExportFromCjs(isStringExports);var isFunctionExports=requireIsFunction();const isFunction$1=getDefaultExportFromCjs(isFunctionExports);var isObjectExports=requireIsObject();const isObject=getDefaultExportFromCjs(isObjectExports);var reactIs$1={exports:{}},reactIs_production_min$1={};/**
|
|
239
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return React__namespace.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},DESCRIPTION_WARNING_NAME="DialogDescriptionWarning",DescriptionWarning=({contentRef:e,descriptionId:t})=>{const i=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${useWarningContext(DESCRIPTION_WARNING_NAME).contentName}}.`;return React__namespace.useEffect(()=>{var l;const o=(l=e.current)==null?void 0:l.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(i))},[i,e,t]),null},Root$7=Dialog$1,Trigger$3=DialogTrigger$1,Portal$2=DialogPortal$1,Overlay=DialogOverlay$1,Content$2=DialogContent$1,Title$1=DialogTitle$1,Description$1=DialogDescription$1,Close$1=DialogClose$1;const Dialog=({modal:e=!1,...t})=>jsxRuntime.jsx(Root$7,{modal:e,...t});Dialog.displayName=Root$7.displayName;const DialogTrigger=Trigger$3,DialogPortal=Portal$2,DialogClose=Close$1,DialogOverlay=React__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx(Overlay,{ref:n,className:cn("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));DialogOverlay.displayName=Overlay.displayName;const DialogContent=React__namespace.forwardRef(({className:e,children:t,animateExit:n=!0,...i},o)=>jsxRuntime.jsxs(DialogPortal,{forceMount:i.forceMount,children:[jsxRuntime.jsx(DialogOverlay,{}),jsxRuntime.jsxs(Content$2,{ref:o,className:cn("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-2xl shadow-primary duration-200 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",n&&"data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%]",e),...i,children:[t,jsxRuntime.jsxs(Close$1,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[jsxRuntime.jsx(X,{className:"h-4 w-4"}),jsxRuntime.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));DialogContent.displayName=Content$2.displayName;const DialogHeader=({className:e,...t})=>jsxRuntime.jsx("div",{className:cn("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});DialogHeader.displayName="DialogHeader";const DialogFooter=({className:e,...t})=>jsxRuntime.jsx("div",{className:cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});DialogFooter.displayName="DialogFooter";const DialogTitle=React__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx(Title$1,{ref:n,className:cn("text-lg font-semibold leading-none tracking-tight",e),...t}));DialogTitle.displayName=Title$1.displayName;const DialogDescription=React__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx(Description$1,{ref:n,className:cn("text-sm text-muted-foreground",e),...t}));DialogDescription.displayName=Description$1.displayName;function createCollection(e){const t=e+"CollectionProvider",[n,i]=createContextScope(t),[o,l]=n(t,{collectionRef:{current:null},itemMap:new Map}),u=E=>{const{scope:S,children:C}=E,T=React.useRef(null),A=React.useRef(new Map).current;return jsxRuntime.jsx(o,{scope:S,itemMap:A,collectionRef:T,children:C})};u.displayName=t;const d=e+"CollectionSlot",f=createSlot(d),p=React.forwardRef((E,S)=>{const{scope:C,children:T}=E,A=l(d,C),M=useComposedRefs(S,A.collectionRef);return jsxRuntime.jsx(f,{ref:M,children:T})});p.displayName=d;const m=e+"CollectionItemSlot",g="data-radix-collection-item",b=createSlot(m),_=React.forwardRef((E,S)=>{const{scope:C,children:T,...A}=E,M=React.useRef(null),I=useComposedRefs(S,M),O=l(m,C);return React.useEffect(()=>(O.itemMap.set(M,{ref:M,...A}),()=>void O.itemMap.delete(M))),jsxRuntime.jsx(b,{[g]:"",ref:I,children:T})});_.displayName=m;function R(E){const S=l(e+"CollectionConsumer",E);return React.useCallback(()=>{const T=S.collectionRef.current;if(!T)return[];const A=Array.from(T.querySelectorAll(`[${g}]`));return Array.from(S.itemMap.values()).sort((O,N)=>A.indexOf(O.ref.current)-A.indexOf(N.ref.current))},[S.collectionRef,S.itemMap])}return[{Provider:u,Slot:p,ItemSlot:_},R,i]}var DirectionContext=React__namespace.createContext(void 0);function useDirection(e){const t=React__namespace.useContext(DirectionContext);return e||t||"ltr"}const sides=["top","right","bottom","left"],min$2=Math.min,max$2=Math.max,round$1=Math.round,floor=Math.floor,createCoords=e=>({x:e,y:e}),oppositeSideMap={left:"right",right:"left",bottom:"top",top:"bottom"},oppositeAlignmentMap={start:"end",end:"start"};function clamp$1(e,t,n){return max$2(e,min$2(t,n))}function evaluate(e,t){return typeof e=="function"?e(t):e}function getSide(e){return e.split("-")[0]}function getAlignment(e){return e.split("-")[1]}function getOppositeAxis(e){return e==="x"?"y":"x"}function getAxisLength(e){return e==="y"?"height":"width"}function getSideAxis(e){return["top","bottom"].includes(getSide(e))?"y":"x"}function getAlignmentAxis(e){return getOppositeAxis(getSideAxis(e))}function getAlignmentSides(e,t,n){n===void 0&&(n=!1);const i=getAlignment(e),o=getAlignmentAxis(e),l=getAxisLength(o);let u=o==="x"?i===(n?"end":"start")?"right":"left":i==="start"?"bottom":"top";return t.reference[l]>t.floating[l]&&(u=getOppositePlacement(u)),[u,getOppositePlacement(u)]}function getExpandedPlacements(e){const t=getOppositePlacement(e);return[getOppositeAlignmentPlacement(e),t,getOppositeAlignmentPlacement(t)]}function getOppositeAlignmentPlacement(e){return e.replace(/start|end/g,t=>oppositeAlignmentMap[t])}function getSideList(e,t,n){const i=["left","right"],o=["right","left"],l=["top","bottom"],u=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:i:t?i:o;case"left":case"right":return t?l:u;default:return[]}}function getOppositeAxisPlacements(e,t,n,i){const o=getAlignment(e);let l=getSideList(getSide(e),n==="start",i);return o&&(l=l.map(u=>u+"-"+o),t&&(l=l.concat(l.map(getOppositeAlignmentPlacement)))),l}function getOppositePlacement(e){return e.replace(/left|right|bottom|top/g,t=>oppositeSideMap[t])}function expandPaddingObject(e){return{top:0,right:0,bottom:0,left:0,...e}}function getPaddingObject(e){return typeof e!="number"?expandPaddingObject(e):{top:e,right:e,bottom:e,left:e}}function rectToClientRect(e){const{x:t,y:n,width:i,height:o}=e;return{width:i,height:o,top:n,left:t,right:t+i,bottom:n+o,x:t,y:n}}function computeCoordsFromPlacement(e,t,n){let{reference:i,floating:o}=e;const l=getSideAxis(t),u=getAlignmentAxis(t),d=getAxisLength(u),f=getSide(t),p=l==="y",m=i.x+i.width/2-o.width/2,g=i.y+i.height/2-o.height/2,b=i[d]/2-o[d]/2;let _;switch(f){case"top":_={x:m,y:i.y-o.height};break;case"bottom":_={x:m,y:i.y+i.height};break;case"right":_={x:i.x+i.width,y:g};break;case"left":_={x:i.x-o.width,y:g};break;default:_={x:i.x,y:i.y}}switch(getAlignment(t)){case"start":_[u]-=b*(n&&p?-1:1);break;case"end":_[u]+=b*(n&&p?-1:1);break}return _}const computePosition$1=async(e,t,n)=>{const{placement:i="bottom",strategy:o="absolute",middleware:l=[],platform:u}=n,d=l.filter(Boolean),f=await(u.isRTL==null?void 0:u.isRTL(t));let p=await u.getElementRects({reference:e,floating:t,strategy:o}),{x:m,y:g}=computeCoordsFromPlacement(p,i,f),b=i,_={},R=0;for(let E=0;E<d.length;E++){const{name:S,fn:C}=d[E],{x:T,y:A,data:M,reset:I}=await C({x:m,y:g,initialPlacement:i,placement:b,strategy:o,middlewareData:_,rects:p,platform:u,elements:{reference:e,floating:t}});m=T??m,g=A??g,_={..._,[S]:{..._[S],...M}},I&&R<=50&&(R++,typeof I=="object"&&(I.placement&&(b=I.placement),I.rects&&(p=I.rects===!0?await u.getElementRects({reference:e,floating:t,strategy:o}):I.rects),{x:m,y:g}=computeCoordsFromPlacement(p,b,f)),E=-1)}return{x:m,y:g,placement:b,strategy:o,middlewareData:_}};async function detectOverflow(e,t){var n;t===void 0&&(t={});const{x:i,y:o,platform:l,rects:u,elements:d,strategy:f}=e,{boundary:p="clippingAncestors",rootBoundary:m="viewport",elementContext:g="floating",altBoundary:b=!1,padding:_=0}=evaluate(t,e),R=getPaddingObject(_),S=d[b?g==="floating"?"reference":"floating":g],C=rectToClientRect(await l.getClippingRect({element:(n=await(l.isElement==null?void 0:l.isElement(S)))==null||n?S:S.contextElement||await(l.getDocumentElement==null?void 0:l.getDocumentElement(d.floating)),boundary:p,rootBoundary:m,strategy:f})),T=g==="floating"?{x:i,y:o,width:u.floating.width,height:u.floating.height}:u.reference,A=await(l.getOffsetParent==null?void 0:l.getOffsetParent(d.floating)),M=await(l.isElement==null?void 0:l.isElement(A))?await(l.getScale==null?void 0:l.getScale(A))||{x:1,y:1}:{x:1,y:1},I=rectToClientRect(l.convertOffsetParentRelativeRectToViewportRelativeRect?await l.convertOffsetParentRelativeRectToViewportRelativeRect({elements:d,rect:T,offsetParent:A,strategy:f}):T);return{top:(C.top-I.top+R.top)/M.y,bottom:(I.bottom-C.bottom+R.bottom)/M.y,left:(C.left-I.left+R.left)/M.x,right:(I.right-C.right+R.right)/M.x}}const arrow$3=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:i,placement:o,rects:l,platform:u,elements:d,middlewareData:f}=t,{element:p,padding:m=0}=evaluate(e,t)||{};if(p==null)return{};const g=getPaddingObject(m),b={x:n,y:i},_=getAlignmentAxis(o),R=getAxisLength(_),E=await u.getDimensions(p),S=_==="y",C=S?"top":"left",T=S?"bottom":"right",A=S?"clientHeight":"clientWidth",M=l.reference[R]+l.reference[_]-b[_]-l.floating[R],I=b[_]-l.reference[_],O=await(u.getOffsetParent==null?void 0:u.getOffsetParent(p));let N=O?O[A]:0;(!N||!await(u.isElement==null?void 0:u.isElement(O)))&&(N=d.floating[A]||l.floating[R]);const j=M/2-I/2,D=N/2-E[R]/2-1,F=min$2(g[C],D),L=min$2(g[T],D),B=F,V=N-E[R]-L,H=N/2-E[R]/2+j,z=clamp$1(B,H,V),U=!f.arrow&&getAlignment(o)!=null&&H!==z&&l.reference[R]/2-(H<B?F:L)-E[R]/2<0,Q=U?H<B?H-B:H-V:0;return{[_]:b[_]+Q,data:{[_]:z,centerOffset:H-z-Q,...U&&{alignmentOffset:Q}},reset:U}}}),flip$2=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,i;const{placement:o,middlewareData:l,rects:u,initialPlacement:d,platform:f,elements:p}=t,{mainAxis:m=!0,crossAxis:g=!0,fallbackPlacements:b,fallbackStrategy:_="bestFit",fallbackAxisSideDirection:R="none",flipAlignment:E=!0,...S}=evaluate(e,t);if((n=l.arrow)!=null&&n.alignmentOffset)return{};const C=getSide(o),T=getSideAxis(d),A=getSide(d)===d,M=await(f.isRTL==null?void 0:f.isRTL(p.floating)),I=b||(A||!E?[getOppositePlacement(d)]:getExpandedPlacements(d)),O=R!=="none";!b&&O&&I.push(...getOppositeAxisPlacements(d,E,R,M));const N=[d,...I],j=await detectOverflow(t,S),D=[];let F=((i=l.flip)==null?void 0:i.overflows)||[];if(m&&D.push(j[C]),g){const H=getAlignmentSides(o,u,M);D.push(j[H[0]],j[H[1]])}if(F=[...F,{placement:o,overflows:D}],!D.every(H=>H<=0)){var L,B;const H=(((L=l.flip)==null?void 0:L.index)||0)+1,z=N[H];if(z)return{data:{index:H,overflows:F},reset:{placement:z}};let U=(B=F.filter(Q=>Q.overflows[0]<=0).sort((Q,q)=>Q.overflows[1]-q.overflows[1])[0])==null?void 0:B.placement;if(!U)switch(_){case"bestFit":{var V;const Q=(V=F.filter(q=>{if(O){const W=getSideAxis(q.placement);return W===T||W==="y"}return!0}).map(q=>[q.placement,q.overflows.filter(W=>W>0).reduce((W,G)=>W+G,0)]).sort((q,W)=>q[1]-W[1])[0])==null?void 0:V[0];Q&&(U=Q);break}case"initialPlacement":U=d;break}if(o!==U)return{reset:{placement:U}}}return{}}}};function getSideOffsets(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function isAnySideFullyClipped(e){return sides.some(t=>e[t]>=0)}const hide$2=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:i="referenceHidden",...o}=evaluate(e,t);switch(i){case"referenceHidden":{const l=await detectOverflow(t,{...o,elementContext:"reference"}),u=getSideOffsets(l,n.reference);return{data:{referenceHiddenOffsets:u,referenceHidden:isAnySideFullyClipped(u)}}}case"escaped":{const l=await detectOverflow(t,{...o,altBoundary:!0}),u=getSideOffsets(l,n.floating);return{data:{escapedOffsets:u,escaped:isAnySideFullyClipped(u)}}}default:return{}}}}};async function convertValueToCoords(e,t){const{placement:n,platform:i,elements:o}=e,l=await(i.isRTL==null?void 0:i.isRTL(o.floating)),u=getSide(n),d=getAlignment(n),f=getSideAxis(n)==="y",p=["left","top"].includes(u)?-1:1,m=l&&f?-1:1,g=evaluate(t,e);let{mainAxis:b,crossAxis:_,alignmentAxis:R}=typeof g=="number"?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:g.mainAxis||0,crossAxis:g.crossAxis||0,alignmentAxis:g.alignmentAxis};return d&&typeof R=="number"&&(_=d==="end"?R*-1:R),f?{x:_*m,y:b*p}:{x:b*p,y:_*m}}const offset$2=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,i;const{x:o,y:l,placement:u,middlewareData:d}=t,f=await convertValueToCoords(t,e);return u===((n=d.offset)==null?void 0:n.placement)&&(i=d.arrow)!=null&&i.alignmentOffset?{}:{x:o+f.x,y:l+f.y,data:{...f,placement:u}}}}},shift$2=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:i,placement:o}=t,{mainAxis:l=!0,crossAxis:u=!1,limiter:d={fn:S=>{let{x:C,y:T}=S;return{x:C,y:T}}},...f}=evaluate(e,t),p={x:n,y:i},m=await detectOverflow(t,f),g=getSideAxis(getSide(o)),b=getOppositeAxis(g);let _=p[b],R=p[g];if(l){const S=b==="y"?"top":"left",C=b==="y"?"bottom":"right",T=_+m[S],A=_-m[C];_=clamp$1(T,_,A)}if(u){const S=g==="y"?"top":"left",C=g==="y"?"bottom":"right",T=R+m[S],A=R-m[C];R=clamp$1(T,R,A)}const E=d.fn({...t,[b]:_,[g]:R});return{...E,data:{x:E.x-n,y:E.y-i,enabled:{[b]:l,[g]:u}}}}}},limitShift$2=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:i,placement:o,rects:l,middlewareData:u}=t,{offset:d=0,mainAxis:f=!0,crossAxis:p=!0}=evaluate(e,t),m={x:n,y:i},g=getSideAxis(o),b=getOppositeAxis(g);let _=m[b],R=m[g];const E=evaluate(d,t),S=typeof E=="number"?{mainAxis:E,crossAxis:0}:{mainAxis:0,crossAxis:0,...E};if(f){const A=b==="y"?"height":"width",M=l.reference[b]-l.floating[A]+S.mainAxis,I=l.reference[b]+l.reference[A]-S.mainAxis;_<M?_=M:_>I&&(_=I)}if(p){var C,T;const A=b==="y"?"width":"height",M=["top","left"].includes(getSide(o)),I=l.reference[g]-l.floating[A]+(M&&((C=u.offset)==null?void 0:C[g])||0)+(M?0:S.crossAxis),O=l.reference[g]+l.reference[A]+(M?0:((T=u.offset)==null?void 0:T[g])||0)-(M?S.crossAxis:0);R<I?R=I:R>O&&(R=O)}return{[b]:_,[g]:R}}}},size$2=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,i;const{placement:o,rects:l,platform:u,elements:d}=t,{apply:f=()=>{},...p}=evaluate(e,t),m=await detectOverflow(t,p),g=getSide(o),b=getAlignment(o),_=getSideAxis(o)==="y",{width:R,height:E}=l.floating;let S,C;g==="top"||g==="bottom"?(S=g,C=b===(await(u.isRTL==null?void 0:u.isRTL(d.floating))?"start":"end")?"left":"right"):(C=g,S=b==="end"?"top":"bottom");const T=E-m.top-m.bottom,A=R-m.left-m.right,M=min$2(E-m[S],T),I=min$2(R-m[C],A),O=!t.middlewareData.shift;let N=M,j=I;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(j=A),(i=t.middlewareData.shift)!=null&&i.enabled.y&&(N=T),O&&!b){const F=max$2(m.left,0),L=max$2(m.right,0),B=max$2(m.top,0),V=max$2(m.bottom,0);_?j=R-2*(F!==0||L!==0?F+L:max$2(m.left,m.right)):N=E-2*(B!==0||V!==0?B+V:max$2(m.top,m.bottom))}await f({...t,availableWidth:j,availableHeight:N});const D=await u.getDimensions(d.floating);return R!==D.width||E!==D.height?{reset:{rects:!0}}:{}}}};function hasWindow(){return typeof window<"u"}function getNodeName(e){return isNode(e)?(e.nodeName||"").toLowerCase():"#document"}function getWindow(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function getDocumentElement(e){var t;return(t=(isNode(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function isNode(e){return hasWindow()?e instanceof Node||e instanceof getWindow(e).Node:!1}function isElement(e){return hasWindow()?e instanceof Element||e instanceof getWindow(e).Element:!1}function isHTMLElement$1(e){return hasWindow()?e instanceof HTMLElement||e instanceof getWindow(e).HTMLElement:!1}function isShadowRoot(e){return!hasWindow()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof getWindow(e).ShadowRoot}function isOverflowElement(e){const{overflow:t,overflowX:n,overflowY:i,display:o}=getComputedStyle$1(e);return/auto|scroll|overlay|hidden|clip/.test(t+i+n)&&!["inline","contents"].includes(o)}function isTableElement(e){return["table","td","th"].includes(getNodeName(e))}function isTopLayer(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function isContainingBlock(e){const t=isWebKit(),n=isElement(e)?getComputedStyle$1(e):e;return["transform","translate","scale","rotate","perspective"].some(i=>n[i]?n[i]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(i=>(n.willChange||"").includes(i))||["paint","layout","strict","content"].some(i=>(n.contain||"").includes(i))}function getContainingBlock(e){let t=getParentNode(e);for(;isHTMLElement$1(t)&&!isLastTraversableNode(t);){if(isContainingBlock(t))return t;if(isTopLayer(t))return null;t=getParentNode(t)}return null}function isWebKit(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function isLastTraversableNode(e){return["html","body","#document"].includes(getNodeName(e))}function getComputedStyle$1(e){return getWindow(e).getComputedStyle(e)}function getNodeScroll(e){return isElement(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function getParentNode(e){if(getNodeName(e)==="html")return e;const t=e.assignedSlot||e.parentNode||isShadowRoot(e)&&e.host||getDocumentElement(e);return isShadowRoot(t)?t.host:t}function getNearestOverflowAncestor(e){const t=getParentNode(e);return isLastTraversableNode(t)?e.ownerDocument?e.ownerDocument.body:e.body:isHTMLElement$1(t)&&isOverflowElement(t)?t:getNearestOverflowAncestor(t)}function getOverflowAncestors(e,t,n){var i;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=getNearestOverflowAncestor(e),l=o===((i=e.ownerDocument)==null?void 0:i.body),u=getWindow(o);if(l){const d=getFrameElement(u);return t.concat(u,u.visualViewport||[],isOverflowElement(o)?o:[],d&&n?getOverflowAncestors(d):[])}return t.concat(o,getOverflowAncestors(o,[],n))}function getFrameElement(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function getCssDimensions(e){const t=getComputedStyle$1(e);let n=parseFloat(t.width)||0,i=parseFloat(t.height)||0;const o=isHTMLElement$1(e),l=o?e.offsetWidth:n,u=o?e.offsetHeight:i,d=round$1(n)!==l||round$1(i)!==u;return d&&(n=l,i=u),{width:n,height:i,$:d}}function unwrapElement(e){return isElement(e)?e:e.contextElement}function getScale(e){const t=unwrapElement(e);if(!isHTMLElement$1(t))return createCoords(1);const n=t.getBoundingClientRect(),{width:i,height:o,$:l}=getCssDimensions(t);let u=(l?round$1(n.width):n.width)/i,d=(l?round$1(n.height):n.height)/o;return(!u||!Number.isFinite(u))&&(u=1),(!d||!Number.isFinite(d))&&(d=1),{x:u,y:d}}const noOffsets=createCoords(0);function getVisualOffsets(e){const t=getWindow(e);return!isWebKit()||!t.visualViewport?noOffsets:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function shouldAddVisualOffsets(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==getWindow(e)?!1:t}function getBoundingClientRect(e,t,n,i){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),l=unwrapElement(e);let u=createCoords(1);t&&(i?isElement(i)&&(u=getScale(i)):u=getScale(e));const d=shouldAddVisualOffsets(l,n,i)?getVisualOffsets(l):createCoords(0);let f=(o.left+d.x)/u.x,p=(o.top+d.y)/u.y,m=o.width/u.x,g=o.height/u.y;if(l){const b=getWindow(l),_=i&&isElement(i)?getWindow(i):i;let R=b,E=getFrameElement(R);for(;E&&i&&_!==R;){const S=getScale(E),C=E.getBoundingClientRect(),T=getComputedStyle$1(E),A=C.left+(E.clientLeft+parseFloat(T.paddingLeft))*S.x,M=C.top+(E.clientTop+parseFloat(T.paddingTop))*S.y;f*=S.x,p*=S.y,m*=S.x,g*=S.y,f+=A,p+=M,R=getWindow(E),E=getFrameElement(R)}}return rectToClientRect({width:m,height:g,x:f,y:p})}function getWindowScrollBarX(e,t){const n=getNodeScroll(e).scrollLeft;return t?t.left+n:getBoundingClientRect(getDocumentElement(e)).left+n}function getHTMLOffset(e,t,n){n===void 0&&(n=!1);const i=e.getBoundingClientRect(),o=i.left+t.scrollLeft-(n?0:getWindowScrollBarX(e,i)),l=i.top+t.scrollTop;return{x:o,y:l}}function convertOffsetParentRelativeRectToViewportRelativeRect(e){let{elements:t,rect:n,offsetParent:i,strategy:o}=e;const l=o==="fixed",u=getDocumentElement(i),d=t?isTopLayer(t.floating):!1;if(i===u||d&&l)return n;let f={scrollLeft:0,scrollTop:0},p=createCoords(1);const m=createCoords(0),g=isHTMLElement$1(i);if((g||!g&&!l)&&((getNodeName(i)!=="body"||isOverflowElement(u))&&(f=getNodeScroll(i)),isHTMLElement$1(i))){const _=getBoundingClientRect(i);p=getScale(i),m.x=_.x+i.clientLeft,m.y=_.y+i.clientTop}const b=u&&!g&&!l?getHTMLOffset(u,f,!0):createCoords(0);return{width:n.width*p.x,height:n.height*p.y,x:n.x*p.x-f.scrollLeft*p.x+m.x+b.x,y:n.y*p.y-f.scrollTop*p.y+m.y+b.y}}function getClientRects(e){return Array.from(e.getClientRects())}function getDocumentRect(e){const t=getDocumentElement(e),n=getNodeScroll(e),i=e.ownerDocument.body,o=max$2(t.scrollWidth,t.clientWidth,i.scrollWidth,i.clientWidth),l=max$2(t.scrollHeight,t.clientHeight,i.scrollHeight,i.clientHeight);let u=-n.scrollLeft+getWindowScrollBarX(e);const d=-n.scrollTop;return getComputedStyle$1(i).direction==="rtl"&&(u+=max$2(t.clientWidth,i.clientWidth)-o),{width:o,height:l,x:u,y:d}}function getViewportRect(e,t){const n=getWindow(e),i=getDocumentElement(e),o=n.visualViewport;let l=i.clientWidth,u=i.clientHeight,d=0,f=0;if(o){l=o.width,u=o.height;const p=isWebKit();(!p||p&&t==="fixed")&&(d=o.offsetLeft,f=o.offsetTop)}return{width:l,height:u,x:d,y:f}}function getInnerBoundingClientRect(e,t){const n=getBoundingClientRect(e,!0,t==="fixed"),i=n.top+e.clientTop,o=n.left+e.clientLeft,l=isHTMLElement$1(e)?getScale(e):createCoords(1),u=e.clientWidth*l.x,d=e.clientHeight*l.y,f=o*l.x,p=i*l.y;return{width:u,height:d,x:f,y:p}}function getClientRectFromClippingAncestor(e,t,n){let i;if(t==="viewport")i=getViewportRect(e,n);else if(t==="document")i=getDocumentRect(getDocumentElement(e));else if(isElement(t))i=getInnerBoundingClientRect(t,n);else{const o=getVisualOffsets(e);i={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return rectToClientRect(i)}function hasFixedPositionAncestor(e,t){const n=getParentNode(e);return n===t||!isElement(n)||isLastTraversableNode(n)?!1:getComputedStyle$1(n).position==="fixed"||hasFixedPositionAncestor(n,t)}function getClippingElementAncestors(e,t){const n=t.get(e);if(n)return n;let i=getOverflowAncestors(e,[],!1).filter(d=>isElement(d)&&getNodeName(d)!=="body"),o=null;const l=getComputedStyle$1(e).position==="fixed";let u=l?getParentNode(e):e;for(;isElement(u)&&!isLastTraversableNode(u);){const d=getComputedStyle$1(u),f=isContainingBlock(u);!f&&d.position==="fixed"&&(o=null),(l?!f&&!o:!f&&d.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||isOverflowElement(u)&&!f&&hasFixedPositionAncestor(e,u))?i=i.filter(m=>m!==u):o=d,u=getParentNode(u)}return t.set(e,i),i}function getClippingRect(e){let{element:t,boundary:n,rootBoundary:i,strategy:o}=e;const u=[...n==="clippingAncestors"?isTopLayer(t)?[]:getClippingElementAncestors(t,this._c):[].concat(n),i],d=u[0],f=u.reduce((p,m)=>{const g=getClientRectFromClippingAncestor(t,m,o);return p.top=max$2(g.top,p.top),p.right=min$2(g.right,p.right),p.bottom=min$2(g.bottom,p.bottom),p.left=max$2(g.left,p.left),p},getClientRectFromClippingAncestor(t,d,o));return{width:f.right-f.left,height:f.bottom-f.top,x:f.left,y:f.top}}function getDimensions(e){const{width:t,height:n}=getCssDimensions(e);return{width:t,height:n}}function getRectRelativeToOffsetParent(e,t,n){const i=isHTMLElement$1(t),o=getDocumentElement(t),l=n==="fixed",u=getBoundingClientRect(e,!0,l,t);let d={scrollLeft:0,scrollTop:0};const f=createCoords(0);if(i||!i&&!l)if((getNodeName(t)!=="body"||isOverflowElement(o))&&(d=getNodeScroll(t)),i){const b=getBoundingClientRect(t,!0,l,t);f.x=b.x+t.clientLeft,f.y=b.y+t.clientTop}else o&&(f.x=getWindowScrollBarX(o));const p=o&&!i&&!l?getHTMLOffset(o,d):createCoords(0),m=u.left+d.scrollLeft-f.x-p.x,g=u.top+d.scrollTop-f.y-p.y;return{x:m,y:g,width:u.width,height:u.height}}function isStaticPositioned(e){return getComputedStyle$1(e).position==="static"}function getTrueOffsetParent(e,t){if(!isHTMLElement$1(e)||getComputedStyle$1(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return getDocumentElement(e)===n&&(n=n.ownerDocument.body),n}function getOffsetParent(e,t){const n=getWindow(e);if(isTopLayer(e))return n;if(!isHTMLElement$1(e)){let o=getParentNode(e);for(;o&&!isLastTraversableNode(o);){if(isElement(o)&&!isStaticPositioned(o))return o;o=getParentNode(o)}return n}let i=getTrueOffsetParent(e,t);for(;i&&isTableElement(i)&&isStaticPositioned(i);)i=getTrueOffsetParent(i,t);return i&&isLastTraversableNode(i)&&isStaticPositioned(i)&&!isContainingBlock(i)?n:i||getContainingBlock(e)||n}const getElementRects=async function(e){const t=this.getOffsetParent||getOffsetParent,n=this.getDimensions,i=await n(e.floating);return{reference:getRectRelativeToOffsetParent(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function isRTL(e){return getComputedStyle$1(e).direction==="rtl"}const platform={convertOffsetParentRelativeRectToViewportRelativeRect,getDocumentElement,getClippingRect,getOffsetParent,getElementRects,getClientRects,getDimensions,getScale,isElement,isRTL};function rectsAreEqual(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function observeMove(e,t){let n=null,i;const o=getDocumentElement(e);function l(){var d;clearTimeout(i),(d=n)==null||d.disconnect(),n=null}function u(d,f){d===void 0&&(d=!1),f===void 0&&(f=1),l();const p=e.getBoundingClientRect(),{left:m,top:g,width:b,height:_}=p;if(d||t(),!b||!_)return;const R=floor(g),E=floor(o.clientWidth-(m+b)),S=floor(o.clientHeight-(g+_)),C=floor(m),A={rootMargin:-R+"px "+-E+"px "+-S+"px "+-C+"px",threshold:max$2(0,min$2(1,f))||1};let M=!0;function I(O){const N=O[0].intersectionRatio;if(N!==f){if(!M)return u();N?u(!1,N):i=setTimeout(()=>{u(!1,1e-7)},1e3)}N===1&&!rectsAreEqual(p,e.getBoundingClientRect())&&u(),M=!1}try{n=new IntersectionObserver(I,{...A,root:o.ownerDocument})}catch{n=new IntersectionObserver(I,A)}n.observe(e)}return u(!0),l}function autoUpdate(e,t,n,i){i===void 0&&(i={});const{ancestorScroll:o=!0,ancestorResize:l=!0,elementResize:u=typeof ResizeObserver=="function",layoutShift:d=typeof IntersectionObserver=="function",animationFrame:f=!1}=i,p=unwrapElement(e),m=o||l?[...p?getOverflowAncestors(p):[],...getOverflowAncestors(t)]:[];m.forEach(C=>{o&&C.addEventListener("scroll",n,{passive:!0}),l&&C.addEventListener("resize",n)});const g=p&&d?observeMove(p,n):null;let b=-1,_=null;u&&(_=new ResizeObserver(C=>{let[T]=C;T&&T.target===p&&_&&(_.unobserve(t),cancelAnimationFrame(b),b=requestAnimationFrame(()=>{var A;(A=_)==null||A.observe(t)})),n()}),p&&!f&&_.observe(p),_.observe(t));let R,E=f?getBoundingClientRect(e):null;f&&S();function S(){const C=getBoundingClientRect(e);E&&!rectsAreEqual(E,C)&&n(),E=C,R=requestAnimationFrame(S)}return n(),()=>{var C;m.forEach(T=>{o&&T.removeEventListener("scroll",n),l&&T.removeEventListener("resize",n)}),g==null||g(),(C=_)==null||C.disconnect(),_=null,f&&cancelAnimationFrame(R)}}const offset$1=offset$2,shift$1=shift$2,flip$1=flip$2,size$1=size$2,hide$1=hide$2,arrow$2=arrow$3,limitShift$1=limitShift$2,computePosition=(e,t,n)=>{const i=new Map,o={platform,...n},l={...o.platform,_c:i};return computePosition$1(e,t,{...o,platform:l})};var index=typeof document<"u"?React.useLayoutEffect:React.useEffect;function deepEqual$1(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,i,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(i=n;i--!==0;)if(!deepEqual$1(e[i],t[i]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(i=n;i--!==0;)if(!{}.hasOwnProperty.call(t,o[i]))return!1;for(i=n;i--!==0;){const l=o[i];if(!(l==="_owner"&&e.$$typeof)&&!deepEqual$1(e[l],t[l]))return!1}return!0}return e!==e&&t!==t}function getDPR(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function roundByDPR(e,t){const n=getDPR(e);return Math.round(t*n)/n}function useLatestRef(e){const t=React__namespace.useRef(e);return index(()=>{t.current=e}),t}function useFloating(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:i=[],platform:o,elements:{reference:l,floating:u}={},transform:d=!0,whileElementsMounted:f,open:p}=e,[m,g]=React__namespace.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[b,_]=React__namespace.useState(i);deepEqual$1(b,i)||_(i);const[R,E]=React__namespace.useState(null),[S,C]=React__namespace.useState(null),T=React__namespace.useCallback(q=>{q!==O.current&&(O.current=q,E(q))},[]),A=React__namespace.useCallback(q=>{q!==N.current&&(N.current=q,C(q))},[]),M=l||R,I=u||S,O=React__namespace.useRef(null),N=React__namespace.useRef(null),j=React__namespace.useRef(m),D=f!=null,F=useLatestRef(f),L=useLatestRef(o),B=useLatestRef(p),V=React__namespace.useCallback(()=>{if(!O.current||!N.current)return;const q={placement:t,strategy:n,middleware:b};L.current&&(q.platform=L.current),computePosition(O.current,N.current,q).then(W=>{const G={...W,isPositioned:B.current!==!1};H.current&&!deepEqual$1(j.current,G)&&(j.current=G,ReactDOM__namespace.flushSync(()=>{g(G)}))})},[b,t,n,L,B]);index(()=>{p===!1&&j.current.isPositioned&&(j.current.isPositioned=!1,g(q=>({...q,isPositioned:!1})))},[p]);const H=React__namespace.useRef(!1);index(()=>(H.current=!0,()=>{H.current=!1}),[]),index(()=>{if(M&&(O.current=M),I&&(N.current=I),M&&I){if(F.current)return F.current(M,I,V);V()}},[M,I,V,F,D]);const z=React__namespace.useMemo(()=>({reference:O,floating:N,setReference:T,setFloating:A}),[T,A]),U=React__namespace.useMemo(()=>({reference:M,floating:I}),[M,I]),Q=React__namespace.useMemo(()=>{const q={position:n,left:0,top:0};if(!U.floating)return q;const W=roundByDPR(U.floating,m.x),G=roundByDPR(U.floating,m.y);return d?{...q,transform:"translate("+W+"px, "+G+"px)",...getDPR(U.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:W,top:G}},[n,d,U.floating,m.x,m.y]);return React__namespace.useMemo(()=>({...m,update:V,refs:z,elements:U,floatingStyles:Q}),[m,V,z,U,Q])}const arrow$1=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:i,padding:o}=typeof e=="function"?e(n):e;return i&&t(i)?i.current!=null?arrow$2({element:i.current,padding:o}).fn(n):{}:i?arrow$2({element:i,padding:o}).fn(n):{}}}},offset=(e,t)=>({...offset$1(e),options:[e,t]}),shift=(e,t)=>({...shift$1(e),options:[e,t]}),limitShift=(e,t)=>({...limitShift$1(e),options:[e,t]}),flip=(e,t)=>({...flip$1(e),options:[e,t]}),size=(e,t)=>({...size$1(e),options:[e,t]}),hide=(e,t)=>({...hide$1(e),options:[e,t]}),arrow=(e,t)=>({...arrow$1(e),options:[e,t]});var NAME$3="Arrow",Arrow$1=React__namespace.forwardRef((e,t)=>{const{children:n,width:i=10,height:o=5,...l}=e;return jsxRuntime.jsx(Primitive.svg,{...l,ref:t,width:i,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:jsxRuntime.jsx("polygon",{points:"0,0 30,0 15,10"})})});Arrow$1.displayName=NAME$3;var Root$6=Arrow$1;function useSize(e){const[t,n]=React__namespace.useState(void 0);return useLayoutEffect2(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const i=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const l=o[0];let u,d;if("borderBoxSize"in l){const f=l.borderBoxSize,p=Array.isArray(f)?f[0]:f;u=p.inlineSize,d=p.blockSize}else u=e.offsetWidth,d=e.offsetHeight;n({width:u,height:d})});return i.observe(e,{box:"border-box"}),()=>i.unobserve(e)}else n(void 0)},[e]),t}var POPPER_NAME="Popper",[createPopperContext,createPopperScope]=createContextScope(POPPER_NAME),[PopperProvider,usePopperContext]=createPopperContext(POPPER_NAME),Popper=e=>{const{__scopePopper:t,children:n}=e,[i,o]=React__namespace.useState(null);return jsxRuntime.jsx(PopperProvider,{scope:t,anchor:i,onAnchorChange:o,children:n})};Popper.displayName=POPPER_NAME;var ANCHOR_NAME$1="PopperAnchor",PopperAnchor=React__namespace.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:i,...o}=e,l=usePopperContext(ANCHOR_NAME$1,n),u=React__namespace.useRef(null),d=useComposedRefs(t,u);return React__namespace.useEffect(()=>{l.onAnchorChange((i==null?void 0:i.current)||u.current)}),i?null:jsxRuntime.jsx(Primitive.div,{...o,ref:d})});PopperAnchor.displayName=ANCHOR_NAME$1;var CONTENT_NAME$4="PopperContent",[PopperContentProvider,useContentContext]=createPopperContext(CONTENT_NAME$4),PopperContent=React__namespace.forwardRef((e,t)=>{var se,ce,ie,ue,le,Z;const{__scopePopper:n,side:i="bottom",sideOffset:o=0,align:l="center",alignOffset:u=0,arrowPadding:d=0,avoidCollisions:f=!0,collisionBoundary:p=[],collisionPadding:m=0,sticky:g="partial",hideWhenDetached:b=!1,updatePositionStrategy:_="optimized",onPlaced:R,...E}=e,S=usePopperContext(CONTENT_NAME$4,n),[C,T]=React__namespace.useState(null),A=useComposedRefs(t,fe=>T(fe)),[M,I]=React__namespace.useState(null),O=useSize(M),N=(O==null?void 0:O.width)??0,j=(O==null?void 0:O.height)??0,D=i+(l!=="center"?"-"+l:""),F=typeof m=="number"?m:{top:0,right:0,bottom:0,left:0,...m},L=Array.isArray(p)?p:[p],B=L.length>0,V={padding:F,boundary:L.filter(isNotNull),altBoundary:B},{refs:H,floatingStyles:z,placement:U,isPositioned:Q,middlewareData:q}=useFloating({strategy:"fixed",placement:D,whileElementsMounted:(...fe)=>autoUpdate(...fe,{animationFrame:_==="always"}),elements:{reference:S.anchor},middleware:[offset({mainAxis:o+j,alignmentAxis:u}),f&&shift({mainAxis:!0,crossAxis:!1,limiter:g==="partial"?limitShift():void 0,...V}),f&&flip({...V}),size({...V,apply:({elements:fe,rects:te,availableWidth:de,availableHeight:pe})=>{const{width:me,height:ye}=te.reference,he=fe.floating.style;he.setProperty("--radix-popper-available-width",`${de}px`),he.setProperty("--radix-popper-available-height",`${pe}px`),he.setProperty("--radix-popper-anchor-width",`${me}px`),he.setProperty("--radix-popper-anchor-height",`${ye}px`)}}),M&&arrow({element:M,padding:d}),transformOrigin({arrowWidth:N,arrowHeight:j}),b&&hide({strategy:"referenceHidden",...V})]}),[W,G]=getSideAndAlignFromPlacement(U),K=useCallbackRef$1(R);useLayoutEffect2(()=>{Q&&(K==null||K())},[Q,K]);const J=(se=q.arrow)==null?void 0:se.x,ee=(ce=q.arrow)==null?void 0:ce.y,ne=((ie=q.arrow)==null?void 0:ie.centerOffset)!==0,[ae,oe]=React__namespace.useState();return useLayoutEffect2(()=>{C&&oe(window.getComputedStyle(C).zIndex)},[C]),jsxRuntime.jsx("div",{ref:H.setFloating,"data-radix-popper-content-wrapper":"",style:{...z,transform:Q?z.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ae,"--radix-popper-transform-origin":[(ue=q.transformOrigin)==null?void 0:ue.x,(le=q.transformOrigin)==null?void 0:le.y].join(" "),...((Z=q.hide)==null?void 0:Z.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:jsxRuntime.jsx(PopperContentProvider,{scope:n,placedSide:W,onArrowChange:I,arrowX:J,arrowY:ee,shouldHideArrow:ne,children:jsxRuntime.jsx(Primitive.div,{"data-side":W,"data-align":G,...E,ref:A,style:{...E.style,animation:Q?void 0:"none"}})})})});PopperContent.displayName=CONTENT_NAME$4;var ARROW_NAME$3="PopperArrow",OPPOSITE_SIDE={top:"bottom",right:"left",bottom:"top",left:"right"},PopperArrow=React__namespace.forwardRef(function(t,n){const{__scopePopper:i,...o}=t,l=useContentContext(ARROW_NAME$3,i),u=OPPOSITE_SIDE[l.placedSide];return jsxRuntime.jsx("span",{ref:l.onArrowChange,style:{position:"absolute",left:l.arrowX,top:l.arrowY,[u]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[l.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[l.placedSide],visibility:l.shouldHideArrow?"hidden":void 0},children:jsxRuntime.jsx(Root$6,{...o,ref:n,style:{...o.style,display:"block"}})})});PopperArrow.displayName=ARROW_NAME$3;function isNotNull(e){return e!==null}var transformOrigin=e=>({name:"transformOrigin",options:e,fn(t){var S,C,T;const{placement:n,rects:i,middlewareData:o}=t,u=((S=o.arrow)==null?void 0:S.centerOffset)!==0,d=u?0:e.arrowWidth,f=u?0:e.arrowHeight,[p,m]=getSideAndAlignFromPlacement(n),g={start:"0%",center:"50%",end:"100%"}[m],b=(((C=o.arrow)==null?void 0:C.x)??0)+d/2,_=(((T=o.arrow)==null?void 0:T.y)??0)+f/2;let R="",E="";return p==="bottom"?(R=u?g:`${b}px`,E=`${-f}px`):p==="top"?(R=u?g:`${b}px`,E=`${i.floating.height+f}px`):p==="right"?(R=`${-f}px`,E=u?g:`${_}px`):p==="left"&&(R=`${i.floating.width+f}px`,E=u?g:`${_}px`),{data:{x:R,y:E}}}});function getSideAndAlignFromPlacement(e){const[t,n="center"]=e.split("-");return[t,n]}var Root2$3=Popper,Anchor=PopperAnchor,Content$1=PopperContent,Arrow=PopperArrow,ENTRY_FOCUS="rovingFocusGroup.onEntryFocus",EVENT_OPTIONS={bubbles:!1,cancelable:!0},GROUP_NAME$2="RovingFocusGroup",[Collection$2,useCollection$2,createCollectionScope$2]=createCollection(GROUP_NAME$2),[createRovingFocusGroupContext,createRovingFocusGroupScope]=createContextScope(GROUP_NAME$2,[createCollectionScope$2]),[RovingFocusProvider,useRovingFocusContext]=createRovingFocusGroupContext(GROUP_NAME$2),RovingFocusGroup=React__namespace.forwardRef((e,t)=>jsxRuntime.jsx(Collection$2.Provider,{scope:e.__scopeRovingFocusGroup,children:jsxRuntime.jsx(Collection$2.Slot,{scope:e.__scopeRovingFocusGroup,children:jsxRuntime.jsx(RovingFocusGroupImpl,{...e,ref:t})})}));RovingFocusGroup.displayName=GROUP_NAME$2;var RovingFocusGroupImpl=React__namespace.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:i,loop:o=!1,dir:l,currentTabStopId:u,defaultCurrentTabStopId:d,onCurrentTabStopIdChange:f,onEntryFocus:p,preventScrollOnEntryFocus:m=!1,...g}=e,b=React__namespace.useRef(null),_=useComposedRefs(t,b),R=useDirection(l),[E=null,S]=useControllableState({prop:u,defaultProp:d,onChange:f}),[C,T]=React__namespace.useState(!1),A=useCallbackRef$1(p),M=useCollection$2(n),I=React__namespace.useRef(!1),[O,N]=React__namespace.useState(0);return React__namespace.useEffect(()=>{const j=b.current;if(j)return j.addEventListener(ENTRY_FOCUS,A),()=>j.removeEventListener(ENTRY_FOCUS,A)},[A]),jsxRuntime.jsx(RovingFocusProvider,{scope:n,orientation:i,dir:R,loop:o,currentTabStopId:E,onItemFocus:React__namespace.useCallback(j=>S(j),[S]),onItemShiftTab:React__namespace.useCallback(()=>T(!0),[]),onFocusableItemAdd:React__namespace.useCallback(()=>N(j=>j+1),[]),onFocusableItemRemove:React__namespace.useCallback(()=>N(j=>j-1),[]),children:jsxRuntime.jsx(Primitive.div,{tabIndex:C||O===0?-1:0,"data-orientation":i,...g,ref:_,style:{outline:"none",...e.style},onMouseDown:composeEventHandlers(e.onMouseDown,()=>{I.current=!0}),onFocus:composeEventHandlers(e.onFocus,j=>{const D=!I.current;if(j.target===j.currentTarget&&D&&!C){const F=new CustomEvent(ENTRY_FOCUS,EVENT_OPTIONS);if(j.currentTarget.dispatchEvent(F),!F.defaultPrevented){const L=M().filter(U=>U.focusable),B=L.find(U=>U.active),V=L.find(U=>U.id===E),z=[B,V,...L].filter(Boolean).map(U=>U.ref.current);focusFirst$2(z,m)}}I.current=!1}),onBlur:composeEventHandlers(e.onBlur,()=>T(!1))})})}),ITEM_NAME$2="RovingFocusGroupItem",RovingFocusGroupItem=React__namespace.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:i=!0,active:o=!1,tabStopId:l,...u}=e,d=useId(),f=l||d,p=useRovingFocusContext(ITEM_NAME$2,n),m=p.currentTabStopId===f,g=useCollection$2(n),{onFocusableItemAdd:b,onFocusableItemRemove:_}=p;return React__namespace.useEffect(()=>{if(i)return b(),()=>_()},[i,b,_]),jsxRuntime.jsx(Collection$2.ItemSlot,{scope:n,id:f,focusable:i,active:o,children:jsxRuntime.jsx(Primitive.span,{tabIndex:m?0:-1,"data-orientation":p.orientation,...u,ref:t,onMouseDown:composeEventHandlers(e.onMouseDown,R=>{i?p.onItemFocus(f):R.preventDefault()}),onFocus:composeEventHandlers(e.onFocus,()=>p.onItemFocus(f)),onKeyDown:composeEventHandlers(e.onKeyDown,R=>{if(R.key==="Tab"&&R.shiftKey){p.onItemShiftTab();return}if(R.target!==R.currentTarget)return;const E=getFocusIntent(R,p.orientation,p.dir);if(E!==void 0){if(R.metaKey||R.ctrlKey||R.altKey||R.shiftKey)return;R.preventDefault();let C=g().filter(T=>T.focusable).map(T=>T.ref.current);if(E==="last")C.reverse();else if(E==="prev"||E==="next"){E==="prev"&&C.reverse();const T=C.indexOf(R.currentTarget);C=p.loop?wrapArray$1(C,T+1):C.slice(T+1)}setTimeout(()=>focusFirst$2(C))}})})})});RovingFocusGroupItem.displayName=ITEM_NAME$2;var MAP_KEY_TO_FOCUS_INTENT={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function getDirectionAwareKey(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function getFocusIntent(e,t,n){const i=getDirectionAwareKey(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(i))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(i)))return MAP_KEY_TO_FOCUS_INTENT[i]}function focusFirst$2(e,t=!1){const n=document.activeElement;for(const i of e)if(i===n||(i.focus({preventScroll:t}),document.activeElement!==n))return}function wrapArray$1(e,t){return e.map((n,i)=>e[(t+i)%e.length])}var Root$5=RovingFocusGroup,Item=RovingFocusGroupItem,SELECTION_KEYS=["Enter"," "],FIRST_KEYS=["ArrowDown","PageUp","Home"],LAST_KEYS=["ArrowUp","PageDown","End"],FIRST_LAST_KEYS=[...FIRST_KEYS,...LAST_KEYS],SUB_OPEN_KEYS={ltr:[...SELECTION_KEYS,"ArrowRight"],rtl:[...SELECTION_KEYS,"ArrowLeft"]},SUB_CLOSE_KEYS={ltr:["ArrowLeft"],rtl:["ArrowRight"]},MENU_NAME="Menu",[Collection$1,useCollection$1,createCollectionScope$1]=createCollection(MENU_NAME),[createMenuContext,createMenuScope]=createContextScope(MENU_NAME,[createCollectionScope$1,createPopperScope,createRovingFocusGroupScope]),usePopperScope$1=createPopperScope(),useRovingFocusGroupScope$1=createRovingFocusGroupScope(),[MenuProvider,useMenuContext]=createMenuContext(MENU_NAME),[MenuRootProvider,useMenuRootContext]=createMenuContext(MENU_NAME),Menu=e=>{const{__scopeMenu:t,open:n=!1,children:i,dir:o,onOpenChange:l,modal:u=!0}=e,d=usePopperScope$1(t),[f,p]=React__namespace.useState(null),m=React__namespace.useRef(!1),g=useCallbackRef$1(l),b=useDirection(o);return React__namespace.useEffect(()=>{const _=()=>{m.current=!0,document.addEventListener("pointerdown",R,{capture:!0,once:!0}),document.addEventListener("pointermove",R,{capture:!0,once:!0})},R=()=>m.current=!1;return document.addEventListener("keydown",_,{capture:!0}),()=>{document.removeEventListener("keydown",_,{capture:!0}),document.removeEventListener("pointerdown",R,{capture:!0}),document.removeEventListener("pointermove",R,{capture:!0})}},[]),jsxRuntime.jsx(Root2$3,{...d,children:jsxRuntime.jsx(MenuProvider,{scope:t,open:n,onOpenChange:g,content:f,onContentChange:p,children:jsxRuntime.jsx(MenuRootProvider,{scope:t,onClose:React__namespace.useCallback(()=>g(!1),[g]),isUsingKeyboardRef:m,dir:b,modal:u,children:i})})})};Menu.displayName=MENU_NAME;var ANCHOR_NAME="MenuAnchor",MenuAnchor=React__namespace.forwardRef((e,t)=>{const{__scopeMenu:n,...i}=e,o=usePopperScope$1(n);return jsxRuntime.jsx(Anchor,{...o,...i,ref:t})});MenuAnchor.displayName=ANCHOR_NAME;var PORTAL_NAME$2="MenuPortal",[PortalProvider$1,usePortalContext$1]=createMenuContext(PORTAL_NAME$2,{forceMount:void 0}),MenuPortal=e=>{const{__scopeMenu:t,forceMount:n,children:i,container:o}=e,l=useMenuContext(PORTAL_NAME$2,t);return jsxRuntime.jsx(PortalProvider$1,{scope:t,forceMount:n,children:jsxRuntime.jsx(Presence,{present:n||l.open,children:jsxRuntime.jsx(Portal$3,{asChild:!0,container:o,children:i})})})};MenuPortal.displayName=PORTAL_NAME$2;var CONTENT_NAME$3="MenuContent",[MenuContentProvider,useMenuContentContext]=createMenuContext(CONTENT_NAME$3),MenuContent=React__namespace.forwardRef((e,t)=>{const n=usePortalContext$1(CONTENT_NAME$3,e.__scopeMenu),{forceMount:i=n.forceMount,...o}=e,l=useMenuContext(CONTENT_NAME$3,e.__scopeMenu),u=useMenuRootContext(CONTENT_NAME$3,e.__scopeMenu);return jsxRuntime.jsx(Collection$1.Provider,{scope:e.__scopeMenu,children:jsxRuntime.jsx(Presence,{present:i||l.open,children:jsxRuntime.jsx(Collection$1.Slot,{scope:e.__scopeMenu,children:u.modal?jsxRuntime.jsx(MenuRootContentModal,{...o,ref:t}):jsxRuntime.jsx(MenuRootContentNonModal,{...o,ref:t})})})})}),MenuRootContentModal=React__namespace.forwardRef((e,t)=>{const n=useMenuContext(CONTENT_NAME$3,e.__scopeMenu),i=React__namespace.useRef(null),o=useComposedRefs(t,i);return React__namespace.useEffect(()=>{const l=i.current;if(l)return hideOthers(l)},[]),jsxRuntime.jsx(MenuContentImpl,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:composeEventHandlers(e.onFocusOutside,l=>l.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),MenuRootContentNonModal=React__namespace.forwardRef((e,t)=>{const n=useMenuContext(CONTENT_NAME$3,e.__scopeMenu);return jsxRuntime.jsx(MenuContentImpl,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),Slot=createSlot("MenuContent.ScrollLock"),MenuContentImpl=React__namespace.forwardRef((e,t)=>{const{__scopeMenu:n,loop:i=!1,trapFocus:o,onOpenAutoFocus:l,onCloseAutoFocus:u,disableOutsidePointerEvents:d,onEntryFocus:f,onEscapeKeyDown:p,onPointerDownOutside:m,onFocusOutside:g,onInteractOutside:b,onDismiss:_,disableOutsideScroll:R,...E}=e,S=useMenuContext(CONTENT_NAME$3,n),C=useMenuRootContext(CONTENT_NAME$3,n),T=usePopperScope$1(n),A=useRovingFocusGroupScope$1(n),M=useCollection$1(n),[I,O]=React__namespace.useState(null),N=React__namespace.useRef(null),j=useComposedRefs(t,N,S.onContentChange),D=React__namespace.useRef(0),F=React__namespace.useRef(""),L=React__namespace.useRef(0),B=React__namespace.useRef(null),V=React__namespace.useRef("right"),H=React__namespace.useRef(0),z=R?ReactRemoveScroll:React__namespace.Fragment,U=R?{as:Slot,allowPinchZoom:!0}:void 0,Q=W=>{var se,ce;const G=F.current+W,K=M().filter(ie=>!ie.disabled),J=document.activeElement,ee=(se=K.find(ie=>ie.ref.current===J))==null?void 0:se.textValue,ne=K.map(ie=>ie.textValue),ae=getNextMatch(ne,G,ee),oe=(ce=K.find(ie=>ie.textValue===ae))==null?void 0:ce.ref.current;(function ie(ue){F.current=ue,window.clearTimeout(D.current),ue!==""&&(D.current=window.setTimeout(()=>ie(""),1e3))})(G),oe&&setTimeout(()=>oe.focus())};React__namespace.useEffect(()=>()=>window.clearTimeout(D.current),[]),useFocusGuards();const q=React__namespace.useCallback(W=>{var K,J;return V.current===((K=B.current)==null?void 0:K.side)&&isPointerInGraceArea(W,(J=B.current)==null?void 0:J.area)},[]);return jsxRuntime.jsx(MenuContentProvider,{scope:n,searchRef:F,onItemEnter:React__namespace.useCallback(W=>{q(W)&&W.preventDefault()},[q]),onItemLeave:React__namespace.useCallback(W=>{var G;q(W)||((G=N.current)==null||G.focus(),O(null))},[q]),onTriggerLeave:React__namespace.useCallback(W=>{q(W)&&W.preventDefault()},[q]),pointerGraceTimerRef:L,onPointerGraceIntentChange:React__namespace.useCallback(W=>{B.current=W},[]),children:jsxRuntime.jsx(z,{...U,children:jsxRuntime.jsx(FocusScope,{asChild:!0,trapped:o,onMountAutoFocus:composeEventHandlers(l,W=>{var G;W.preventDefault(),(G=N.current)==null||G.focus({preventScroll:!0})}),onUnmountAutoFocus:u,children:jsxRuntime.jsx(DismissableLayer,{asChild:!0,disableOutsidePointerEvents:d,onEscapeKeyDown:p,onPointerDownOutside:m,onFocusOutside:g,onInteractOutside:b,onDismiss:_,children:jsxRuntime.jsx(Root$5,{asChild:!0,...A,dir:C.dir,orientation:"vertical",loop:i,currentTabStopId:I,onCurrentTabStopIdChange:O,onEntryFocus:composeEventHandlers(f,W=>{C.isUsingKeyboardRef.current||W.preventDefault()}),preventScrollOnEntryFocus:!0,children:jsxRuntime.jsx(Content$1,{role:"menu","aria-orientation":"vertical","data-state":getOpenState(S.open),"data-radix-menu-content":"",dir:C.dir,...T,...E,ref:j,style:{outline:"none",...E.style},onKeyDown:composeEventHandlers(E.onKeyDown,W=>{const K=W.target.closest("[data-radix-menu-content]")===W.currentTarget,J=W.ctrlKey||W.altKey||W.metaKey,ee=W.key.length===1;K&&(W.key==="Tab"&&W.preventDefault(),!J&&ee&&Q(W.key));const ne=N.current;if(W.target!==ne||!FIRST_LAST_KEYS.includes(W.key))return;W.preventDefault();const oe=M().filter(se=>!se.disabled).map(se=>se.ref.current);LAST_KEYS.includes(W.key)&&oe.reverse(),focusFirst$1(oe)}),onBlur:composeEventHandlers(e.onBlur,W=>{W.currentTarget.contains(W.target)||(window.clearTimeout(D.current),F.current="")}),onPointerMove:composeEventHandlers(e.onPointerMove,whenMouse(W=>{const G=W.target,K=H.current!==W.clientX;if(W.currentTarget.contains(G)&&K){const J=W.clientX>H.current?"right":"left";V.current=J,H.current=W.clientX}}))})})})})})})});MenuContent.displayName=CONTENT_NAME$3;var GROUP_NAME$1="MenuGroup",MenuGroup=React__namespace.forwardRef((e,t)=>{const{__scopeMenu:n,...i}=e;return jsxRuntime.jsx(Primitive.div,{role:"group",...i,ref:t})});MenuGroup.displayName=GROUP_NAME$1;var LABEL_NAME$1="MenuLabel",MenuLabel=React__namespace.forwardRef((e,t)=>{const{__scopeMenu:n,...i}=e;return jsxRuntime.jsx(Primitive.div,{...i,ref:t})});MenuLabel.displayName=LABEL_NAME$1;var ITEM_NAME$1="MenuItem",ITEM_SELECT="menu.itemSelect",MenuItem=React__namespace.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:i,...o}=e,l=React__namespace.useRef(null),u=useMenuRootContext(ITEM_NAME$1,e.__scopeMenu),d=useMenuContentContext(ITEM_NAME$1,e.__scopeMenu),f=useComposedRefs(t,l),p=React__namespace.useRef(!1),m=()=>{const g=l.current;if(!n&&g){const b=new CustomEvent(ITEM_SELECT,{bubbles:!0,cancelable:!0});g.addEventListener(ITEM_SELECT,_=>i==null?void 0:i(_),{once:!0}),dispatchDiscreteCustomEvent(g,b),b.defaultPrevented?p.current=!1:u.onClose()}};return jsxRuntime.jsx(MenuItemImpl,{...o,ref:f,disabled:n,onClick:composeEventHandlers(e.onClick,m),onPointerDown:g=>{var b;(b=e.onPointerDown)==null||b.call(e,g),p.current=!0},onPointerUp:composeEventHandlers(e.onPointerUp,g=>{var b;p.current||(b=g.currentTarget)==null||b.click()}),onKeyDown:composeEventHandlers(e.onKeyDown,g=>{const b=d.searchRef.current!=="";n||b&&g.key===" "||SELECTION_KEYS.includes(g.key)&&(g.currentTarget.click(),g.preventDefault())})})});MenuItem.displayName=ITEM_NAME$1;var MenuItemImpl=React__namespace.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:i=!1,textValue:o,...l}=e,u=useMenuContentContext(ITEM_NAME$1,n),d=useRovingFocusGroupScope$1(n),f=React__namespace.useRef(null),p=useComposedRefs(t,f),[m,g]=React__namespace.useState(!1),[b,_]=React__namespace.useState("");return React__namespace.useEffect(()=>{const R=f.current;R&&_((R.textContent??"").trim())},[l.children]),jsxRuntime.jsx(Collection$1.ItemSlot,{scope:n,disabled:i,textValue:o??b,children:jsxRuntime.jsx(Item,{asChild:!0,...d,focusable:!i,children:jsxRuntime.jsx(Primitive.div,{role:"menuitem","data-highlighted":m?"":void 0,"aria-disabled":i||void 0,"data-disabled":i?"":void 0,...l,ref:p,onPointerMove:composeEventHandlers(e.onPointerMove,whenMouse(R=>{i?u.onItemLeave(R):(u.onItemEnter(R),R.defaultPrevented||R.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:composeEventHandlers(e.onPointerLeave,whenMouse(R=>u.onItemLeave(R))),onFocus:composeEventHandlers(e.onFocus,()=>g(!0)),onBlur:composeEventHandlers(e.onBlur,()=>g(!1))})})})}),CHECKBOX_ITEM_NAME$1="MenuCheckboxItem",MenuCheckboxItem=React__namespace.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:i,...o}=e;return jsxRuntime.jsx(ItemIndicatorProvider,{scope:e.__scopeMenu,checked:n,children:jsxRuntime.jsx(MenuItem,{role:"menuitemcheckbox","aria-checked":isIndeterminate(n)?"mixed":n,...o,ref:t,"data-state":getCheckedState(n),onSelect:composeEventHandlers(o.onSelect,()=>i==null?void 0:i(isIndeterminate(n)?!0:!n),{checkForDefaultPrevented:!1})})})});MenuCheckboxItem.displayName=CHECKBOX_ITEM_NAME$1;var RADIO_GROUP_NAME$1="MenuRadioGroup",[RadioGroupProvider,useRadioGroupContext]=createMenuContext(RADIO_GROUP_NAME$1,{value:void 0,onValueChange:()=>{}}),MenuRadioGroup=React__namespace.forwardRef((e,t)=>{const{value:n,onValueChange:i,...o}=e,l=useCallbackRef$1(i);return jsxRuntime.jsx(RadioGroupProvider,{scope:e.__scopeMenu,value:n,onValueChange:l,children:jsxRuntime.jsx(MenuGroup,{...o,ref:t})})});MenuRadioGroup.displayName=RADIO_GROUP_NAME$1;var RADIO_ITEM_NAME$1="MenuRadioItem",MenuRadioItem=React__namespace.forwardRef((e,t)=>{const{value:n,...i}=e,o=useRadioGroupContext(RADIO_ITEM_NAME$1,e.__scopeMenu),l=n===o.value;return jsxRuntime.jsx(ItemIndicatorProvider,{scope:e.__scopeMenu,checked:l,children:jsxRuntime.jsx(MenuItem,{role:"menuitemradio","aria-checked":l,...i,ref:t,"data-state":getCheckedState(l),onSelect:composeEventHandlers(i.onSelect,()=>{var u;return(u=o.onValueChange)==null?void 0:u.call(o,n)},{checkForDefaultPrevented:!1})})})});MenuRadioItem.displayName=RADIO_ITEM_NAME$1;var ITEM_INDICATOR_NAME="MenuItemIndicator",[ItemIndicatorProvider,useItemIndicatorContext]=createMenuContext(ITEM_INDICATOR_NAME,{checked:!1}),MenuItemIndicator=React__namespace.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:i,...o}=e,l=useItemIndicatorContext(ITEM_INDICATOR_NAME,n);return jsxRuntime.jsx(Presence,{present:i||isIndeterminate(l.checked)||l.checked===!0,children:jsxRuntime.jsx(Primitive.span,{...o,ref:t,"data-state":getCheckedState(l.checked)})})});MenuItemIndicator.displayName=ITEM_INDICATOR_NAME;var SEPARATOR_NAME$1="MenuSeparator",MenuSeparator=React__namespace.forwardRef((e,t)=>{const{__scopeMenu:n,...i}=e;return jsxRuntime.jsx(Primitive.div,{role:"separator","aria-orientation":"horizontal",...i,ref:t})});MenuSeparator.displayName=SEPARATOR_NAME$1;var ARROW_NAME$2="MenuArrow",MenuArrow=React__namespace.forwardRef((e,t)=>{const{__scopeMenu:n,...i}=e,o=usePopperScope$1(n);return jsxRuntime.jsx(Arrow,{...o,...i,ref:t})});MenuArrow.displayName=ARROW_NAME$2;var SUB_NAME="MenuSub",[MenuSubProvider,useMenuSubContext]=createMenuContext(SUB_NAME),MenuSub=e=>{const{__scopeMenu:t,children:n,open:i=!1,onOpenChange:o}=e,l=useMenuContext(SUB_NAME,t),u=usePopperScope$1(t),[d,f]=React__namespace.useState(null),[p,m]=React__namespace.useState(null),g=useCallbackRef$1(o);return React__namespace.useEffect(()=>(l.open===!1&&g(!1),()=>g(!1)),[l.open,g]),jsxRuntime.jsx(Root2$3,{...u,children:jsxRuntime.jsx(MenuProvider,{scope:t,open:i,onOpenChange:g,content:p,onContentChange:m,children:jsxRuntime.jsx(MenuSubProvider,{scope:t,contentId:useId(),triggerId:useId(),trigger:d,onTriggerChange:f,children:n})})})};MenuSub.displayName=SUB_NAME;var SUB_TRIGGER_NAME$1="MenuSubTrigger",MenuSubTrigger=React__namespace.forwardRef((e,t)=>{const n=useMenuContext(SUB_TRIGGER_NAME$1,e.__scopeMenu),i=useMenuRootContext(SUB_TRIGGER_NAME$1,e.__scopeMenu),o=useMenuSubContext(SUB_TRIGGER_NAME$1,e.__scopeMenu),l=useMenuContentContext(SUB_TRIGGER_NAME$1,e.__scopeMenu),u=React__namespace.useRef(null),{pointerGraceTimerRef:d,onPointerGraceIntentChange:f}=l,p={__scopeMenu:e.__scopeMenu},m=React__namespace.useCallback(()=>{u.current&&window.clearTimeout(u.current),u.current=null},[]);return React__namespace.useEffect(()=>m,[m]),React__namespace.useEffect(()=>{const g=d.current;return()=>{window.clearTimeout(g),f(null)}},[d,f]),jsxRuntime.jsx(MenuAnchor,{asChild:!0,...p,children:jsxRuntime.jsx(MenuItemImpl,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":getOpenState(n.open),...e,ref:composeRefs(t,o.onTriggerChange),onClick:g=>{var b;(b=e.onClick)==null||b.call(e,g),!(e.disabled||g.defaultPrevented)&&(g.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:composeEventHandlers(e.onPointerMove,whenMouse(g=>{l.onItemEnter(g),!g.defaultPrevented&&!e.disabled&&!n.open&&!u.current&&(l.onPointerGraceIntentChange(null),u.current=window.setTimeout(()=>{n.onOpenChange(!0),m()},100))})),onPointerLeave:composeEventHandlers(e.onPointerLeave,whenMouse(g=>{var _,R;m();const b=(_=n.content)==null?void 0:_.getBoundingClientRect();if(b){const E=(R=n.content)==null?void 0:R.dataset.side,S=E==="right",C=S?-5:5,T=b[S?"left":"right"],A=b[S?"right":"left"];l.onPointerGraceIntentChange({area:[{x:g.clientX+C,y:g.clientY},{x:T,y:b.top},{x:A,y:b.top},{x:A,y:b.bottom},{x:T,y:b.bottom}],side:E}),window.clearTimeout(d.current),d.current=window.setTimeout(()=>l.onPointerGraceIntentChange(null),300)}else{if(l.onTriggerLeave(g),g.defaultPrevented)return;l.onPointerGraceIntentChange(null)}})),onKeyDown:composeEventHandlers(e.onKeyDown,g=>{var _;const b=l.searchRef.current!=="";e.disabled||b&&g.key===" "||SUB_OPEN_KEYS[i.dir].includes(g.key)&&(n.onOpenChange(!0),(_=n.content)==null||_.focus(),g.preventDefault())})})})});MenuSubTrigger.displayName=SUB_TRIGGER_NAME$1;var SUB_CONTENT_NAME$1="MenuSubContent",MenuSubContent=React__namespace.forwardRef((e,t)=>{const n=usePortalContext$1(CONTENT_NAME$3,e.__scopeMenu),{forceMount:i=n.forceMount,...o}=e,l=useMenuContext(CONTENT_NAME$3,e.__scopeMenu),u=useMenuRootContext(CONTENT_NAME$3,e.__scopeMenu),d=useMenuSubContext(SUB_CONTENT_NAME$1,e.__scopeMenu),f=React__namespace.useRef(null),p=useComposedRefs(t,f);return jsxRuntime.jsx(Collection$1.Provider,{scope:e.__scopeMenu,children:jsxRuntime.jsx(Presence,{present:i||l.open,children:jsxRuntime.jsx(Collection$1.Slot,{scope:e.__scopeMenu,children:jsxRuntime.jsx(MenuContentImpl,{id:d.contentId,"aria-labelledby":d.triggerId,...o,ref:p,align:"start",side:u.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:m=>{var g;u.isUsingKeyboardRef.current&&((g=f.current)==null||g.focus()),m.preventDefault()},onCloseAutoFocus:m=>m.preventDefault(),onFocusOutside:composeEventHandlers(e.onFocusOutside,m=>{m.target!==d.trigger&&l.onOpenChange(!1)}),onEscapeKeyDown:composeEventHandlers(e.onEscapeKeyDown,m=>{u.onClose(),m.preventDefault()}),onKeyDown:composeEventHandlers(e.onKeyDown,m=>{var _;const g=m.currentTarget.contains(m.target),b=SUB_CLOSE_KEYS[u.dir].includes(m.key);g&&b&&(l.onOpenChange(!1),(_=d.trigger)==null||_.focus(),m.preventDefault())})})})})})});MenuSubContent.displayName=SUB_CONTENT_NAME$1;function getOpenState(e){return e?"open":"closed"}function isIndeterminate(e){return e==="indeterminate"}function getCheckedState(e){return isIndeterminate(e)?"indeterminate":e?"checked":"unchecked"}function focusFirst$1(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function wrapArray(e,t){return e.map((n,i)=>e[(t+i)%e.length])}function getNextMatch(e,t,n){const o=t.length>1&&Array.from(t).every(p=>p===t[0])?t[0]:t,l=n?e.indexOf(n):-1;let u=wrapArray(e,Math.max(l,0));o.length===1&&(u=u.filter(p=>p!==n));const f=u.find(p=>p.toLowerCase().startsWith(o.toLowerCase()));return f!==n?f:void 0}function isPointInPolygon$1(e,t){const{x:n,y:i}=e;let o=!1;for(let l=0,u=t.length-1;l<t.length;u=l++){const d=t[l].x,f=t[l].y,p=t[u].x,m=t[u].y;f>i!=m>i&&n<(p-d)*(i-f)/(m-f)+d&&(o=!o)}return o}function isPointerInGraceArea(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return isPointInPolygon$1(n,t)}function whenMouse(e){return t=>t.pointerType==="mouse"?e(t):void 0}var Root3$1=Menu,Anchor2=MenuAnchor,Portal$1=MenuPortal,Content2$2=MenuContent,Group=MenuGroup,Label$3=MenuLabel,Item2$1=MenuItem,CheckboxItem=MenuCheckboxItem,RadioGroup=MenuRadioGroup,RadioItem=MenuRadioItem,ItemIndicator=MenuItemIndicator,Separator$2=MenuSeparator,Arrow2=MenuArrow,Sub=MenuSub,SubTrigger=MenuSubTrigger,SubContent=MenuSubContent,DROPDOWN_MENU_NAME="DropdownMenu",[createDropdownMenuContext,createDropdownMenuScope]=createContextScope(DROPDOWN_MENU_NAME,[createMenuScope]),useMenuScope=createMenuScope(),[DropdownMenuProvider,useDropdownMenuContext]=createDropdownMenuContext(DROPDOWN_MENU_NAME),DropdownMenu$1=e=>{const{__scopeDropdownMenu:t,children:n,dir:i,open:o,defaultOpen:l,onOpenChange:u,modal:d=!0}=e,f=useMenuScope(t),p=React__namespace.useRef(null),[m=!1,g]=useControllableState({prop:o,defaultProp:l,onChange:u});return jsxRuntime.jsx(DropdownMenuProvider,{scope:t,triggerId:useId(),triggerRef:p,contentId:useId(),open:m,onOpenChange:g,onOpenToggle:React__namespace.useCallback(()=>g(b=>!b),[g]),modal:d,children:jsxRuntime.jsx(Root3$1,{...f,open:m,onOpenChange:g,dir:i,modal:d,children:n})})};DropdownMenu$1.displayName=DROPDOWN_MENU_NAME;var TRIGGER_NAME$2="DropdownMenuTrigger",DropdownMenuTrigger$1=React__namespace.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:i=!1,...o}=e,l=useDropdownMenuContext(TRIGGER_NAME$2,n),u=useMenuScope(n);return jsxRuntime.jsx(Anchor2,{asChild:!0,...u,children:jsxRuntime.jsx(Primitive.button,{type:"button",id:l.triggerId,"aria-haspopup":"menu","aria-expanded":l.open,"aria-controls":l.open?l.contentId:void 0,"data-state":l.open?"open":"closed","data-disabled":i?"":void 0,disabled:i,...o,ref:composeRefs(t,l.triggerRef),onPointerDown:composeEventHandlers(e.onPointerDown,d=>{!i&&d.button===0&&d.ctrlKey===!1&&(l.onOpenToggle(),l.open||d.preventDefault())}),onKeyDown:composeEventHandlers(e.onKeyDown,d=>{i||(["Enter"," "].includes(d.key)&&l.onOpenToggle(),d.key==="ArrowDown"&&l.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(d.key)&&d.preventDefault())})})})});DropdownMenuTrigger$1.displayName=TRIGGER_NAME$2;var PORTAL_NAME$1="DropdownMenuPortal",DropdownMenuPortal$1=e=>{const{__scopeDropdownMenu:t,...n}=e,i=useMenuScope(t);return jsxRuntime.jsx(Portal$1,{...i,...n})};DropdownMenuPortal$1.displayName=PORTAL_NAME$1;var CONTENT_NAME$2="DropdownMenuContent",DropdownMenuContent$1=React__namespace.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...i}=e,o=useDropdownMenuContext(CONTENT_NAME$2,n),l=useMenuScope(n),u=React__namespace.useRef(!1);return jsxRuntime.jsx(Content2$2,{id:o.contentId,"aria-labelledby":o.triggerId,...l,...i,ref:t,onCloseAutoFocus:composeEventHandlers(e.onCloseAutoFocus,d=>{var f;u.current||(f=o.triggerRef.current)==null||f.focus(),u.current=!1,d.preventDefault()}),onInteractOutside:composeEventHandlers(e.onInteractOutside,d=>{const f=d.detail.originalEvent,p=f.button===0&&f.ctrlKey===!0,m=f.button===2||p;(!o.modal||m)&&(u.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});DropdownMenuContent$1.displayName=CONTENT_NAME$2;var GROUP_NAME="DropdownMenuGroup",DropdownMenuGroup$1=React__namespace.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...i}=e,o=useMenuScope(n);return jsxRuntime.jsx(Group,{...o,...i,ref:t})});DropdownMenuGroup$1.displayName=GROUP_NAME;var LABEL_NAME="DropdownMenuLabel",DropdownMenuLabel$1=React__namespace.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...i}=e,o=useMenuScope(n);return jsxRuntime.jsx(Label$3,{...o,...i,ref:t})});DropdownMenuLabel$1.displayName=LABEL_NAME;var ITEM_NAME="DropdownMenuItem",DropdownMenuItem$1=React__namespace.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...i}=e,o=useMenuScope(n);return jsxRuntime.jsx(Item2$1,{...o,...i,ref:t})});DropdownMenuItem$1.displayName=ITEM_NAME;var CHECKBOX_ITEM_NAME="DropdownMenuCheckboxItem",DropdownMenuCheckboxItem$1=React__namespace.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...i}=e,o=useMenuScope(n);return jsxRuntime.jsx(CheckboxItem,{...o,...i,ref:t})});DropdownMenuCheckboxItem$1.displayName=CHECKBOX_ITEM_NAME;var RADIO_GROUP_NAME="DropdownMenuRadioGroup",DropdownMenuRadioGroup$1=React__namespace.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...i}=e,o=useMenuScope(n);return jsxRuntime.jsx(RadioGroup,{...o,...i,ref:t})});DropdownMenuRadioGroup$1.displayName=RADIO_GROUP_NAME;var RADIO_ITEM_NAME="DropdownMenuRadioItem",DropdownMenuRadioItem$1=React__namespace.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...i}=e,o=useMenuScope(n);return jsxRuntime.jsx(RadioItem,{...o,...i,ref:t})});DropdownMenuRadioItem$1.displayName=RADIO_ITEM_NAME;var INDICATOR_NAME="DropdownMenuItemIndicator",DropdownMenuItemIndicator=React__namespace.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...i}=e,o=useMenuScope(n);return jsxRuntime.jsx(ItemIndicator,{...o,...i,ref:t})});DropdownMenuItemIndicator.displayName=INDICATOR_NAME;var SEPARATOR_NAME="DropdownMenuSeparator",DropdownMenuSeparator$1=React__namespace.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...i}=e,o=useMenuScope(n);return jsxRuntime.jsx(Separator$2,{...o,...i,ref:t})});DropdownMenuSeparator$1.displayName=SEPARATOR_NAME;var ARROW_NAME$1="DropdownMenuArrow",DropdownMenuArrow=React__namespace.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...i}=e,o=useMenuScope(n);return jsxRuntime.jsx(Arrow2,{...o,...i,ref:t})});DropdownMenuArrow.displayName=ARROW_NAME$1;var DropdownMenuSub$1=e=>{const{__scopeDropdownMenu:t,children:n,open:i,onOpenChange:o,defaultOpen:l}=e,u=useMenuScope(t),[d=!1,f]=useControllableState({prop:i,defaultProp:l,onChange:o});return jsxRuntime.jsx(Sub,{...u,open:d,onOpenChange:f,children:n})},SUB_TRIGGER_NAME="DropdownMenuSubTrigger",DropdownMenuSubTrigger$1=React__namespace.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...i}=e,o=useMenuScope(n);return jsxRuntime.jsx(SubTrigger,{...o,...i,ref:t})});DropdownMenuSubTrigger$1.displayName=SUB_TRIGGER_NAME;var SUB_CONTENT_NAME="DropdownMenuSubContent",DropdownMenuSubContent$1=React__namespace.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...i}=e,o=useMenuScope(n);return jsxRuntime.jsx(SubContent,{...o,...i,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});DropdownMenuSubContent$1.displayName=SUB_CONTENT_NAME;var Root2$2=DropdownMenu$1,Trigger$2=DropdownMenuTrigger$1,Portal2=DropdownMenuPortal$1,Content2$1=DropdownMenuContent$1,Group2=DropdownMenuGroup$1,Label2=DropdownMenuLabel$1,Item2=DropdownMenuItem$1,CheckboxItem2=DropdownMenuCheckboxItem$1,RadioGroup2=DropdownMenuRadioGroup$1,RadioItem2=DropdownMenuRadioItem$1,ItemIndicator2=DropdownMenuItemIndicator,Separator2=DropdownMenuSeparator$1,Sub2=DropdownMenuSub$1,SubTrigger2=DropdownMenuSubTrigger$1,SubContent2=DropdownMenuSubContent$1;const DropdownMenu=Root2$2,DropdownMenuTrigger=Trigger$2,DropdownMenuGroup=Group2,DropdownMenuPortal=Portal2,DropdownMenuSub=Sub2,DropdownMenuRadioGroup=RadioGroup2,DropdownMenuSubTrigger=React__namespace.forwardRef(({className:e,inset:t,children:n,...i},o)=>jsxRuntime.jsxs(SubTrigger2,{ref:o,className:cn("flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",e),...i,children:[n,jsxRuntime.jsx(ChevronRight,{className:"ml-auto"})]}));DropdownMenuSubTrigger.displayName=SubTrigger2.displayName;const DropdownMenuSubContent=React__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx(SubContent2,{ref:n,className:cn("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin]",e),...t}));DropdownMenuSubContent.displayName=SubContent2.displayName;const DropdownMenuContent=React__namespace.forwardRef(({className:e,sideOffset:t=4,...n},i)=>jsxRuntime.jsx(Portal2,{children:jsxRuntime.jsx(Content2$1,{ref:i,sideOffset:t,className:cn("z-50 max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin]",e),...n})}));DropdownMenuContent.displayName=Content2$1.displayName;const DropdownMenuItem=React__namespace.forwardRef(({className:e,inset:t,...n},i)=>jsxRuntime.jsx(Item2,{ref:i,className:cn("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",t&&"pl-8",e),...n}));DropdownMenuItem.displayName=Item2.displayName;const DropdownMenuCheckboxItem=React__namespace.forwardRef(({className:e,children:t,checked:n,...i},o)=>jsxRuntime.jsxs(CheckboxItem2,{ref:o,className:cn("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:n,...i,children:[jsxRuntime.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:jsxRuntime.jsx(ItemIndicator2,{children:jsxRuntime.jsx(Check,{className:"h-4 w-4"})})}),t]}));DropdownMenuCheckboxItem.displayName=CheckboxItem2.displayName;const DropdownMenuRadioItem=React__namespace.forwardRef(({className:e,children:t,...n},i)=>jsxRuntime.jsxs(RadioItem2,{ref:i,className:cn("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[jsxRuntime.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:jsxRuntime.jsx(ItemIndicator2,{children:jsxRuntime.jsx(Circle,{className:"h-2 w-2 fill-current"})})}),t]}));DropdownMenuRadioItem.displayName=RadioItem2.displayName;const DropdownMenuLabel=React__namespace.forwardRef(({className:e,inset:t,...n},i)=>jsxRuntime.jsx(Label2,{ref:i,className:cn("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n}));DropdownMenuLabel.displayName=Label2.displayName;const DropdownMenuSeparator=React__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx(Separator2,{ref:n,className:cn("-mx-1 my-1 h-px bg-muted",e),...t}));DropdownMenuSeparator.displayName=Separator2.displayName;const DropdownMenuShortcut=({className:e,...t})=>jsxRuntime.jsx("span",{className:cn("ml-auto text-xs tracking-widest opacity-60",e),...t});DropdownMenuShortcut.displayName="DropdownMenuShortcut";function ProductInventoryGrid({inventory:e,showBinLocation:t}){const n=(C,T,A=!1,M=!0)=>jsxRuntime.jsxs("div",{className:`p-3 text-sm ${M&&T>0?"border-t":""} ${A?"border-r":""}`,children:[jsxRuntime.jsxs("div",{className:"flex justify-between font-medium",children:[jsxRuntime.jsx("span",{children:C.Name}),jsxRuntime.jsx("span",{children:C.AvailableQuantity})]}),jsxRuntime.jsxs("div",{className:"flex justify-between mt-1 text-xs text-gray-600",children:[jsxRuntime.jsx("span",{children:"Expecting"}),jsxRuntime.jsx("span",{children:C.PurchaseOrderQuantity||"-"})]}),t&&jsxRuntime.jsxs("div",{className:"flex justify-between mt-1 text-xs text-gray-600",children:[jsxRuntime.jsx("span",{children:"Bin Location"}),jsxRuntime.jsx("span",{children:C.BinLocation||"-"})]})]},`warehouse-${C.WarehouseId}`),i=["MTL","TOR"],o=["VAN","EDM"],l=[...e].sort((C,T)=>(C.Name||"").localeCompare(T.Name||"")),u=l.filter(C=>C.Country==="US"),d=l.filter(C=>C.Country==="CA"),f=l.filter(C=>o.includes(C.WarehouseId||"")),p=l.filter(C=>i.includes(C.WarehouseId||"")),m=d.filter(C=>!i.includes(C.WarehouseId||"")&&!o.includes(C.WarehouseId||"")),g=C=>C.reduce((T,A)=>T+(A.AvailableQuantity||0),0),b=g(d),_=g(p),R=g(f),E=g(u),S=b+E;return jsxRuntime.jsxs("div",{className:"border rounded-md overflow-hidden",children:[d.length>0&&u.length>0&&jsxRuntime.jsxs("div",{className:"grid grid-cols-2 border-b",children:[jsxRuntime.jsxs("div",{className:"p-3 font-semibold text-sm flex justify-between",children:[jsxRuntime.jsx("span",{children:"Total"}),jsxRuntime.jsx("span",{children:S})]}),jsxRuntime.jsx("div",{className:"p-3"})]}),d.length>0&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs("div",{className:"grid grid-cols-2 border-b bg-gray-50",children:[jsxRuntime.jsxs("div",{className:"p-3 font-semibold text-sm flex justify-between",children:[jsxRuntime.jsx("span",{children:"Canada"}),jsxRuntime.jsx("span",{children:b})]}),jsxRuntime.jsx("div",{className:"p-3"})]}),jsxRuntime.jsxs("div",{className:"grid grid-cols-2",children:[jsxRuntime.jsxs("div",{className:"border-r",children:[jsxRuntime.jsxs("div",{className:"p-3 font-semibold text-sm flex justify-between",children:[jsxRuntime.jsx("span",{children:"West"}),jsxRuntime.jsx("span",{children:R})]}),f.map((C,T)=>n(C,T))]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("div",{className:"p-3 font-semibold text-sm flex justify-between",children:[jsxRuntime.jsx("span",{children:"East"}),jsxRuntime.jsx("span",{children:_})]}),p.map((C,T)=>n(C,T))]})]}),m.length>0&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("div",{className:"border-t p-3 font-semibold text-sm",children:jsxRuntime.jsx("span",{children:"Other"})}),jsxRuntime.jsx("div",{className:"grid grid-cols-2",children:m.map((C,T)=>n(C,T,T%2===0,!0))})]})]}),u.length>0&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs("div",{className:"grid grid-cols-2 border-t bg-gray-50",children:[jsxRuntime.jsxs("div",{className:"p-3 font-semibold text-sm flex justify-between",children:[jsxRuntime.jsx("span",{children:"United States"}),jsxRuntime.jsx("span",{children:E})]}),jsxRuntime.jsx("div",{className:"p-3"})]}),jsxRuntime.jsx("div",{className:"grid grid-cols-2",children:u.map((C,T)=>n(C,T,T%2===0,!0))})]}),e.length===0&&jsxRuntime.jsx("div",{className:"p-6 text-center text-gray-500",children:"No inventory information available"})]})}const falsyToString=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,cx=clsx,cva=(e,t)=>n=>{var i;if((t==null?void 0:t.variants)==null)return cx(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:l}=t,u=Object.keys(o).map(p=>{const m=n==null?void 0:n[p],g=l==null?void 0:l[p];if(m===null)return null;const b=falsyToString(m)||falsyToString(g);return o[p][b]}),d=n&&Object.entries(n).reduce((p,m)=>{let[g,b]=m;return b===void 0||(p[g]=b),p},{}),f=t==null||(i=t.compoundVariants)===null||i===void 0?void 0:i.reduce((p,m)=>{let{class:g,className:b,..._}=m;return Object.entries(_).every(R=>{let[E,S]=R;return Array.isArray(S)?S.includes({...l,...d}[E]):{...l,...d}[E]===S})?[...p,g,b]:p},[]);return cx(e,u,f,n==null?void 0:n.class,n==null?void 0:n.className)},buttonVariants=cva("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 cursor-pointer",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-sm hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-xs hover:bg-destructive/90",outline:"border border-input text-foreground bg-background shadow-xs hover:bg-accent hover:text-accent-foreground",defaultOutline:"border border-red-600/30 text-red-600 bg-background shadow-xs hover:bg-red-600/5 ",secondary:"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline",blue:"bg-randmar-blue text-gray-100 shadow-sm hover:bg-randmar-blue/90",red:"bg-randmar-red text-gray-100 shadow-sm hover:bg-randmar-red/90",purple:"bg-randmar-purple text-gray-100 shadow-sm hover:bg-randmar-purple/90",none:""},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),Button=React__namespace.forwardRef(({className:e,variant:t,size:n,asChild:i=!1,confirmationDialog:o,onClick:l,...u},d)=>{const f=i?Slot$2:"button";if(!o)return jsxRuntime.jsx(f,{className:cn(buttonVariants({variant:t,size:n,className:e})),ref:d,onClick:l,...u});l&&console.warn("Button: You provided both onClick and confirmationDialog props. The onClick prop will be ignored. Use the onConfirm callback in confirmationDialog instead.");const{title:p,content:m,onConfirm:g,confirmText:b="Confirm",cancelText:_="Cancel"}=o,R=()=>{g()};return jsxRuntime.jsxs(Dialog,{children:[jsxRuntime.jsx(DialogTrigger,{asChild:!0,children:jsxRuntime.jsx(f,{className:cn(buttonVariants({variant:t,size:n,className:e})),ref:d,...u})}),jsxRuntime.jsxs(DialogContent,{children:[jsxRuntime.jsxs(DialogHeader,{children:[jsxRuntime.jsx(DialogTitle,{children:p}),jsxRuntime.jsx(DialogDescription,{children:m})]}),jsxRuntime.jsxs(DialogFooter,{className:"flex justify-end gap-2 pt-4",children:[jsxRuntime.jsx(DialogClose,{asChild:!0,children:jsxRuntime.jsx(Button,{variant:"outline",children:_})}),jsxRuntime.jsx(DialogClose,{asChild:!0,children:jsxRuntime.jsx(Button,{onClick:R,children:b})})]})]})]})});Button.displayName="Button";var NAME$2="VisuallyHidden",VisuallyHidden=React__namespace.forwardRef((e,t)=>jsxRuntime.jsx(Primitive.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));VisuallyHidden.displayName=NAME$2;var Root$4=VisuallyHidden,[createTooltipContext,createTooltipScope]=createContextScope("Tooltip",[createPopperScope]),usePopperScope=createPopperScope(),PROVIDER_NAME$1="TooltipProvider",DEFAULT_DELAY_DURATION=700,TOOLTIP_OPEN="tooltip.open",[TooltipProviderContextProvider,useTooltipProviderContext]=createTooltipContext(PROVIDER_NAME$1),TooltipProvider$1=e=>{const{__scopeTooltip:t,delayDuration:n=DEFAULT_DELAY_DURATION,skipDelayDuration:i=300,disableHoverableContent:o=!1,children:l}=e,u=React__namespace.useRef(!0),d=React__namespace.useRef(!1),f=React__namespace.useRef(0);return React__namespace.useEffect(()=>{const p=f.current;return()=>window.clearTimeout(p)},[]),jsxRuntime.jsx(TooltipProviderContextProvider,{scope:t,isOpenDelayedRef:u,delayDuration:n,onOpen:React__namespace.useCallback(()=>{window.clearTimeout(f.current),u.current=!1},[]),onClose:React__namespace.useCallback(()=>{window.clearTimeout(f.current),f.current=window.setTimeout(()=>u.current=!0,i)},[i]),isPointerInTransitRef:d,onPointerInTransitChange:React__namespace.useCallback(p=>{d.current=p},[]),disableHoverableContent:o,children:l})};TooltipProvider$1.displayName=PROVIDER_NAME$1;var TOOLTIP_NAME="Tooltip",[TooltipContextProvider,useTooltipContext]=createTooltipContext(TOOLTIP_NAME),Tooltip$2=e=>{const{__scopeTooltip:t,children:n,open:i,defaultOpen:o=!1,onOpenChange:l,disableHoverableContent:u,delayDuration:d}=e,f=useTooltipProviderContext(TOOLTIP_NAME,e.__scopeTooltip),p=usePopperScope(t),[m,g]=React__namespace.useState(null),b=useId(),_=React__namespace.useRef(0),R=u??f.disableHoverableContent,E=d??f.delayDuration,S=React__namespace.useRef(!1),[C=!1,T]=useControllableState({prop:i,defaultProp:o,onChange:N=>{N?(f.onOpen(),document.dispatchEvent(new CustomEvent(TOOLTIP_OPEN))):f.onClose(),l==null||l(N)}}),A=React__namespace.useMemo(()=>C?S.current?"delayed-open":"instant-open":"closed",[C]),M=React__namespace.useCallback(()=>{window.clearTimeout(_.current),_.current=0,S.current=!1,T(!0)},[T]),I=React__namespace.useCallback(()=>{window.clearTimeout(_.current),_.current=0,T(!1)},[T]),O=React__namespace.useCallback(()=>{window.clearTimeout(_.current),_.current=window.setTimeout(()=>{S.current=!0,T(!0),_.current=0},E)},[E,T]);return React__namespace.useEffect(()=>()=>{_.current&&(window.clearTimeout(_.current),_.current=0)},[]),jsxRuntime.jsx(Root2$3,{...p,children:jsxRuntime.jsx(TooltipContextProvider,{scope:t,contentId:b,open:C,stateAttribute:A,trigger:m,onTriggerChange:g,onTriggerEnter:React__namespace.useCallback(()=>{f.isOpenDelayedRef.current?O():M()},[f.isOpenDelayedRef,O,M]),onTriggerLeave:React__namespace.useCallback(()=>{R?I():(window.clearTimeout(_.current),_.current=0)},[I,R]),onOpen:M,onClose:I,disableHoverableContent:R,children:n})})};Tooltip$2.displayName=TOOLTIP_NAME;var TRIGGER_NAME$1="TooltipTrigger",TooltipTrigger$1=React__namespace.forwardRef((e,t)=>{const{__scopeTooltip:n,...i}=e,o=useTooltipContext(TRIGGER_NAME$1,n),l=useTooltipProviderContext(TRIGGER_NAME$1,n),u=usePopperScope(n),d=React__namespace.useRef(null),f=useComposedRefs(t,d,o.onTriggerChange),p=React__namespace.useRef(!1),m=React__namespace.useRef(!1),g=React__namespace.useCallback(()=>p.current=!1,[]);return React__namespace.useEffect(()=>()=>document.removeEventListener("pointerup",g),[g]),jsxRuntime.jsx(Anchor,{asChild:!0,...u,children:jsxRuntime.jsx(Primitive.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...i,ref:f,onPointerMove:composeEventHandlers(e.onPointerMove,b=>{b.pointerType!=="touch"&&!m.current&&!l.isPointerInTransitRef.current&&(o.onTriggerEnter(),m.current=!0)}),onPointerLeave:composeEventHandlers(e.onPointerLeave,()=>{o.onTriggerLeave(),m.current=!1}),onPointerDown:composeEventHandlers(e.onPointerDown,()=>{o.open&&o.onClose(),p.current=!0,document.addEventListener("pointerup",g,{once:!0})}),onFocus:composeEventHandlers(e.onFocus,()=>{p.current||o.onOpen()}),onBlur:composeEventHandlers(e.onBlur,o.onClose),onClick:composeEventHandlers(e.onClick,o.onClose)})})});TooltipTrigger$1.displayName=TRIGGER_NAME$1;var PORTAL_NAME="TooltipPortal",[PortalProvider,usePortalContext]=createTooltipContext(PORTAL_NAME,{forceMount:void 0}),TooltipPortal=e=>{const{__scopeTooltip:t,forceMount:n,children:i,container:o}=e,l=useTooltipContext(PORTAL_NAME,t);return jsxRuntime.jsx(PortalProvider,{scope:t,forceMount:n,children:jsxRuntime.jsx(Presence,{present:n||l.open,children:jsxRuntime.jsx(Portal$3,{asChild:!0,container:o,children:i})})})};TooltipPortal.displayName=PORTAL_NAME;var CONTENT_NAME$1="TooltipContent",TooltipContent$1=React__namespace.forwardRef((e,t)=>{const n=usePortalContext(CONTENT_NAME$1,e.__scopeTooltip),{forceMount:i=n.forceMount,side:o="top",...l}=e,u=useTooltipContext(CONTENT_NAME$1,e.__scopeTooltip);return jsxRuntime.jsx(Presence,{present:i||u.open,children:u.disableHoverableContent?jsxRuntime.jsx(TooltipContentImpl,{side:o,...l,ref:t}):jsxRuntime.jsx(TooltipContentHoverable,{side:o,...l,ref:t})})}),TooltipContentHoverable=React__namespace.forwardRef((e,t)=>{const n=useTooltipContext(CONTENT_NAME$1,e.__scopeTooltip),i=useTooltipProviderContext(CONTENT_NAME$1,e.__scopeTooltip),o=React__namespace.useRef(null),l=useComposedRefs(t,o),[u,d]=React__namespace.useState(null),{trigger:f,onClose:p}=n,m=o.current,{onPointerInTransitChange:g}=i,b=React__namespace.useCallback(()=>{d(null),g(!1)},[g]),_=React__namespace.useCallback((R,E)=>{const S=R.currentTarget,C={x:R.clientX,y:R.clientY},T=getExitSideFromRect(C,S.getBoundingClientRect()),A=getPaddedExitPoints(C,T),M=getPointsFromRect(E.getBoundingClientRect()),I=getHull([...A,...M]);d(I),g(!0)},[g]);return React__namespace.useEffect(()=>()=>b(),[b]),React__namespace.useEffect(()=>{if(f&&m){const R=S=>_(S,m),E=S=>_(S,f);return f.addEventListener("pointerleave",R),m.addEventListener("pointerleave",E),()=>{f.removeEventListener("pointerleave",R),m.removeEventListener("pointerleave",E)}}},[f,m,_,b]),React__namespace.useEffect(()=>{if(u){const R=E=>{const S=E.target,C={x:E.clientX,y:E.clientY},T=(f==null?void 0:f.contains(S))||(m==null?void 0:m.contains(S)),A=!isPointInPolygon(C,u);T?b():A&&(b(),p())};return document.addEventListener("pointermove",R),()=>document.removeEventListener("pointermove",R)}},[f,m,u,p,b]),jsxRuntime.jsx(TooltipContentImpl,{...e,ref:l})}),[VisuallyHiddenContentContextProvider,useVisuallyHiddenContentContext]=createTooltipContext(TOOLTIP_NAME,{isInside:!1}),Slottable=createSlottable("TooltipContent"),TooltipContentImpl=React__namespace.forwardRef((e,t)=>{const{__scopeTooltip:n,children:i,"aria-label":o,onEscapeKeyDown:l,onPointerDownOutside:u,...d}=e,f=useTooltipContext(CONTENT_NAME$1,n),p=usePopperScope(n),{onClose:m}=f;return React__namespace.useEffect(()=>(document.addEventListener(TOOLTIP_OPEN,m),()=>document.removeEventListener(TOOLTIP_OPEN,m)),[m]),React__namespace.useEffect(()=>{if(f.trigger){const g=b=>{const _=b.target;_!=null&&_.contains(f.trigger)&&m()};return window.addEventListener("scroll",g,{capture:!0}),()=>window.removeEventListener("scroll",g,{capture:!0})}},[f.trigger,m]),jsxRuntime.jsx(DismissableLayer,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:g=>g.preventDefault(),onDismiss:m,children:jsxRuntime.jsxs(Content$1,{"data-state":f.stateAttribute,...p,...d,ref:t,style:{...d.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[jsxRuntime.jsx(Slottable,{children:i}),jsxRuntime.jsx(VisuallyHiddenContentContextProvider,{scope:n,isInside:!0,children:jsxRuntime.jsx(Root$4,{id:f.contentId,role:"tooltip",children:o||i})})]})})});TooltipContent$1.displayName=CONTENT_NAME$1;var ARROW_NAME="TooltipArrow",TooltipArrow=React__namespace.forwardRef((e,t)=>{const{__scopeTooltip:n,...i}=e,o=usePopperScope(n);return useVisuallyHiddenContentContext(ARROW_NAME,n).isInside?null:jsxRuntime.jsx(Arrow,{...o,...i,ref:t})});TooltipArrow.displayName=ARROW_NAME;function getExitSideFromRect(e,t){const n=Math.abs(t.top-e.y),i=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),l=Math.abs(t.left-e.x);switch(Math.min(n,i,o,l)){case l:return"left";case o:return"right";case n:return"top";case i:return"bottom";default:throw new Error("unreachable")}}function getPaddedExitPoints(e,t,n=5){const i=[];switch(t){case"top":i.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":i.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":i.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":i.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return i}function getPointsFromRect(e){const{top:t,right:n,bottom:i,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:i},{x:o,y:i}]}function isPointInPolygon(e,t){const{x:n,y:i}=e;let o=!1;for(let l=0,u=t.length-1;l<t.length;u=l++){const d=t[l].x,f=t[l].y,p=t[u].x,m=t[u].y;f>i!=m>i&&n<(p-d)*(i-f)/(m-f)+d&&(o=!o)}return o}function getHull(e){const t=e.slice();return t.sort((n,i)=>n.x<i.x?-1:n.x>i.x?1:n.y<i.y?-1:n.y>i.y?1:0),getHullPresorted(t)}function getHullPresorted(e){if(e.length<=1)return e.slice();const t=[];for(let i=0;i<e.length;i++){const o=e[i];for(;t.length>=2;){const l=t[t.length-1],u=t[t.length-2];if((l.x-u.x)*(o.y-u.y)>=(l.y-u.y)*(o.x-u.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let i=e.length-1;i>=0;i--){const o=e[i];for(;n.length>=2;){const l=n[n.length-1],u=n[n.length-2];if((l.x-u.x)*(o.y-u.y)>=(l.y-u.y)*(o.x-u.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var Provider$1=TooltipProvider$1,Root3=Tooltip$2,Trigger$1=TooltipTrigger$1,Portal=TooltipPortal,Content2=TooltipContent$1;const TooltipProvider=Provider$1,Tooltip$1=Root3,TooltipTrigger=Trigger$1,TooltipContent=React__namespace.forwardRef(({className:e,sideOffset:t=4,...n},i)=>jsxRuntime.jsx(Portal,{children:jsxRuntime.jsx(Content2,{ref:i,sideOffset:t,className:cn("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n})}));TooltipContent.displayName=Content2.displayName;const Input=React__namespace.forwardRef(({className:e,type:t,mask:n,onChange:i,placeholder:o,...l},u)=>{const[d,f]=React__namespace.useState(!1),p=React__namespace.useRef(null),g=o||(n==="phone"?"(999) 999-9999":n==="postal-code-ca"?"A9A 9A9":n==="zip-code-us"?"99999":""),b=()=>n==="phone"?"Only enter numbers. Formatting will be added automatically.":n==="postal-code-ca"?"Enter letters and numbers only. Spacing will be applied automatically.":n==="zip-code-us"?"Only enter numbers. Formatting will be added automatically.":"",_=()=>{f(!0),p.current&&clearTimeout(p.current),p.current=setTimeout(()=>{f(!1)},3e3)};React__namespace.useEffect(()=>()=>{p.current&&clearTimeout(p.current)},[]);const R=E=>{if(n){const S=E.target.value;let C=S;if(S.length>0){const T=S[S.length-1];/[^a-zA-Z0-9]/.test(T)&&(console.log("Non-alphanumeric detected:",T),_())}if(n==="phone"){const T=S.replace(/\D/g,"");T.length<=3?C=T:T.length<=6?C=`(${T.slice(0,3)}) ${T.slice(3)}`:C=`(${T.slice(0,3)}) ${T.slice(3,6)}-${T.slice(6,10)}`}else if(n==="postal-code-ca"){const T=S.replace(/[^a-zA-Z0-9]/g,"").toUpperCase();let A="";for(let M=0;M<Math.min(T.length,6);M++){const I=T[M];M===0||M===2||M===4?/[A-Z]/.test(I)&&(A+=I):(M===1||M===3||M===5)&&/[0-9]/.test(I)&&(A+=I)}A.length<=3?C=A:C=`${A.slice(0,3)} ${A.slice(3,6)}`}else if(n==="zip-code-us"){const T=S.replace(/\D/g,"");T.length<=5?C=T:C=`${T.slice(0,5)}-${T.slice(5,9)}`}E.target.value=C}i==null||i(E)};return jsxRuntime.jsx(TooltipProvider,{children:jsxRuntime.jsxs(Tooltip$1,{open:d&&!!n,children:[jsxRuntime.jsx(TooltipTrigger,{asChild:!0,children:jsxRuntime.jsx("input",{type:t,className:cn("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-xs transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),onChange:R,placeholder:g,ref:u,...l})}),jsxRuntime.jsx(TooltipContent,{side:"top",className:"bg-sidebar text-sidebar-foreground",children:b()})]})})});Input.displayName="Input";var NAME$1="Separator",DEFAULT_ORIENTATION="horizontal",ORIENTATIONS=["horizontal","vertical"],Separator$1=React__namespace.forwardRef((e,t)=>{const{decorative:n,orientation:i=DEFAULT_ORIENTATION,...o}=e,l=isValidOrientation(i)?i:DEFAULT_ORIENTATION,d=n?{role:"none"}:{"aria-orientation":l==="vertical"?l:void 0,role:"separator"};return jsxRuntime.jsx(Primitive.div,{"data-orientation":l,...d,...o,ref:t})});Separator$1.displayName=NAME$1;function isValidOrientation(e){return ORIENTATIONS.includes(e)}var Root$3=Separator$1;const Separator=React__namespace.forwardRef(({className:e,orientation:t="horizontal",decorative:n=!0,...i},o)=>jsxRuntime.jsx(Root$3,{ref:o,decorative:n,orientation:t,className:cn("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...i}));Separator.displayName=Root$3.displayName;const Sheet=Root$7,SheetTrigger=Trigger$3,SheetClose=Close$1,SheetPortal=Portal$2,SheetOverlay=React__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx(Overlay,{className:cn("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:n}));SheetOverlay.displayName=Overlay.displayName;const sheetVariants=cva("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500 data-[state=open]:animate-in data-[state=closed]:animate-out",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),SheetContent=React__namespace.forwardRef(({side:e="right",className:t,children:n,...i},o)=>jsxRuntime.jsxs(SheetPortal,{children:[jsxRuntime.jsx(SheetOverlay,{}),jsxRuntime.jsxs(Content$2,{ref:o,className:cn(sheetVariants({side:e}),t),...i,children:[jsxRuntime.jsxs(Close$1,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[jsxRuntime.jsx(X,{className:"h-4 w-4"}),jsxRuntime.jsx("span",{className:"sr-only",children:"Close"})]}),n]})]}));SheetContent.displayName=Content$2.displayName;const SheetHeader=({className:e,...t})=>jsxRuntime.jsx("div",{className:cn("flex flex-col space-y-2 text-center sm:text-left",e),...t});SheetHeader.displayName="SheetHeader";const SheetFooter=({className:e,...t})=>jsxRuntime.jsx("div",{className:cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});SheetFooter.displayName="SheetFooter";const SheetTitle=React__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx(Title$1,{ref:n,className:cn("text-lg font-semibold text-foreground",e),...t}));SheetTitle.displayName=Title$1.displayName;const SheetDescription=React__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx(Description$1,{ref:n,className:cn("text-sm text-muted-foreground",e),...t}));SheetDescription.displayName=Description$1.displayName;function AvatarFooter({onClick:e,publicName:t,applicationName:n,partnerId:i}){const o=`https://api.randmar.io/v4/Partner/${i}/Account/Logo?height=72&width=72`,[l,u]=React.useState(!1),d=()=>{u(!0)};return jsxRuntime.jsxs("div",{className:"flex items-center gap-3",children:[jsxRuntime.jsx("div",{className:"flex h-9 w-9 items-center justify-center rounded-lg bg-muted "+(e!==void 0?"cursor-pointer":""),children:l?jsxRuntime.jsx(Button,{asChild:!0,size:"icon",onClick:e,children:jsxRuntime.jsx(TriangleAlert,{className:"h-5 w-5 text-muted-foreground !bg-sidebar"})}):jsxRuntime.jsx(Button,{asChild:!0,size:"icon",onClick:e,children:jsxRuntime.jsx("img",{src:o,alt:"Partner logo",className:"h-9 w-9 object-cover !bg-sidebar",onError:d})})}),jsxRuntime.jsxs("div",{className:"flex flex-1 flex-col",children:[jsxRuntime.jsx("span",{className:"text-sm font-medium",children:t||"Partner"}),jsxRuntime.jsx("span",{className:"text-xs text-neutral-400",children:n})]})]})}var NAME="Label",Label$2=React__namespace.forwardRef((e,t)=>jsxRuntime.jsx(Primitive.label,{...e,ref:t,onMouseDown:n=>{var o;n.target.closest("button, input, select, textarea")||((o=e.onMouseDown)==null||o.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));Label$2.displayName=NAME;var Root$2=Label$2;function Label$1({className:e,...t}){return jsxRuntime.jsx(Root$2,{"data-slot":"label",className:cn("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...t})}const MOBILE_BREAKPOINT=1024;function useIsMobile(){const[e,t]=React__namespace.useState(void 0);return React__namespace.useEffect(()=>{const n=window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT-1}px)`),i=()=>{t(window.innerWidth<MOBILE_BREAKPOINT)};return n.addEventListener("change",i),t(window.innerWidth<MOBILE_BREAKPOINT),()=>n.removeEventListener("change",i)},[]),!!e}function Skeleton({className:e,...t}){return jsxRuntime.jsx("div",{className:cn("animate-pulse rounded-md bg-primary/20",e),...t})}const SIDEBAR_COOKIE_NAME="sidebar:state",SIDEBAR_COOKIE_MAX_AGE=60*60*24*7,SIDEBAR_WIDTH="16rem",SIDEBAR_WIDTH_MOBILE="18rem",SIDEBAR_WIDTH_ICON="3rem",SIDEBAR_KEYBOARD_SHORTCUT="b",SidebarContext=React__namespace.createContext(null);function useSidebar(){const e=React__namespace.useContext(SidebarContext);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}const SidebarProvider=React__namespace.forwardRef(({defaultOpen:e=!0,open:t,onOpenChange:n,className:i,style:o,children:l,...u},d)=>{const f=useIsMobile(),[p,m]=React__namespace.useState(!1),[g,b]=React__namespace.useState(e),_=t??g,R=React__namespace.useCallback(T=>{const A=typeof T=="function"?T(_):T;n?n(A):b(A),document.cookie=`${SIDEBAR_COOKIE_NAME}=${A}; path=/; max-age=${SIDEBAR_COOKIE_MAX_AGE}`},[n,_]),E=React__namespace.useCallback(()=>f?m(T=>!T):R(T=>!T),[f,R,m]);React__namespace.useEffect(()=>{const T=A=>{A.key===SIDEBAR_KEYBOARD_SHORTCUT&&(A.metaKey||A.ctrlKey)&&(A.preventDefault(),E())};return window.addEventListener("keydown",T),()=>window.removeEventListener("keydown",T)},[E]);const S=_?"expanded":"collapsed",C=React__namespace.useMemo(()=>({state:S,open:_,setOpen:R,isMobile:f,openMobile:p,setOpenMobile:m,toggleSidebar:E}),[S,_,R,f,p,m,E]);return jsxRuntime.jsx(SidebarContext.Provider,{value:C,children:jsxRuntime.jsx(TooltipProvider,{delayDuration:0,children:jsxRuntime.jsx("div",{style:{"--sidebar-width":SIDEBAR_WIDTH,"--sidebar-width-icon":SIDEBAR_WIDTH_ICON,...o},className:cn("group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar",i),ref:d,...u,children:l})})})});SidebarProvider.displayName="SidebarProvider";const Sidebar=React__namespace.forwardRef(({side:e="left",variant:t="sidebar",collapsible:n="offcanvas",className:i,children:o,...l},u)=>{const{isMobile:d,state:f,openMobile:p,setOpenMobile:m}=useSidebar();return n==="none"?jsxRuntime.jsx("div",{className:cn("flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground",i),ref:u,...l,children:o}):d?jsxRuntime.jsx(Sheet,{open:p,onOpenChange:m,...l,children:jsxRuntime.jsx(SheetContent,{"data-sidebar":"sidebar","data-mobile":"true",className:"w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":SIDEBAR_WIDTH_MOBILE},side:e,children:jsxRuntime.jsx("div",{className:"flex h-full w-full flex-col",children:o})})}):jsxRuntime.jsxs("div",{ref:u,className:"group peer hidden md:block text-sidebar-foreground","data-state":f,"data-collapsible":f==="collapsed"?n:"","data-variant":t,"data-side":e,children:[jsxRuntime.jsx("div",{className:cn("duration-200 relative h-svh w-(--sidebar-width) bg-transparent transition-[width] ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",t==="floating"||t==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)")}),jsxRuntime.jsx("div",{className:cn("duration-200 fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] ease-linear md:flex",e==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",t==="floating"||t==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l",i),...l,children:jsxRuntime.jsx("div",{"data-sidebar":"sidebar",className:"flex h-full w-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow-sm",children:o})})]})});Sidebar.displayName="Sidebar";const SidebarTrigger=React__namespace.forwardRef(({className:e,onClick:t,...n},i)=>{const{toggleSidebar:o}=useSidebar();return jsxRuntime.jsxs(Button,{ref:i,"data-sidebar":"trigger",variant:"ghost",size:"icon",className:cn("h-7 w-7 text-sidebar-foreground",e),onClick:l=>{t==null||t(l),o()},...n,children:[jsxRuntime.jsx(PanelLeft,{}),jsxRuntime.jsx("span",{className:"sr-only",children:"Toggle Sidebar"})]})});SidebarTrigger.displayName="SidebarTrigger";const SidebarRail=React__namespace.forwardRef(({className:e,...t},n)=>{const{toggleSidebar:i}=useSidebar();return jsxRuntime.jsx("button",{ref:n,"data-sidebar":"rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:i,title:"Toggle Sidebar",className:cn("absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex","in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize","group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full hover:group-data-[collapsible=offcanvas]:bg-sidebar","[[data-side=left][data-collapsible=offcanvas]_&]:-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",e),...t})});SidebarRail.displayName="SidebarRail";const SidebarInset=React__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("main",{ref:n,className:cn("relative flex min-h-svh flex-1 flex-col bg-background","peer-data-[variant=inset]:min-h-[calc(100svh-(--spacing(4)))] md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm",e),...t}));SidebarInset.displayName="SidebarInset";const SidebarInput=React__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx(Input,{ref:n,"data-sidebar":"input",className:cn("h-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",e),...t}));SidebarInput.displayName="SidebarInput";const SidebarHeader=React__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("div",{ref:n,"data-sidebar":"header",className:cn("flex flex-col gap-2 p-2",e),...t}));SidebarHeader.displayName="SidebarHeader";const SidebarFooter=React__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("div",{ref:n,"data-sidebar":"footer",className:cn("flex flex-col gap-2 p-2",e),...t}));SidebarFooter.displayName="SidebarFooter";const SidebarSeparator=React__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx(Separator,{ref:n,"data-sidebar":"separator",className:cn("mx-2 w-auto bg-sidebar-border",e),...t}));SidebarSeparator.displayName="SidebarSeparator";const SidebarContent=React__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("div",{ref:n,"data-sidebar":"content",className:cn("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...t}));SidebarContent.displayName="SidebarContent";const SidebarGroup=React__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("div",{ref:n,"data-sidebar":"group",className:cn("relative flex w-full min-w-0 flex-col p-2",e),...t}));SidebarGroup.displayName="SidebarGroup";const SidebarGroupLabel=React__namespace.forwardRef(({className:e,asChild:t=!1,...n},i)=>{const o=t?Slot$2:"div";return jsxRuntime.jsx(o,{ref:i,"data-sidebar":"group-label",className:cn("duration-200 flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 outline-hidden ring-sidebar-ring transition-[margin,opa] ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",e),...n})});SidebarGroupLabel.displayName="SidebarGroupLabel";const SidebarGroupAction=React__namespace.forwardRef(({className:e,asChild:t=!1,...n},i)=>{const o=t?Slot$2:"button";return jsxRuntime.jsx(o,{ref:i,"data-sidebar":"group-action",className:cn("absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-hidden ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 md:after:hidden","group-data-[collapsible=icon]:hidden",e),...n})});SidebarGroupAction.displayName="SidebarGroupAction";const SidebarGroupContent=React__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("div",{ref:n,"data-sidebar":"group-content",className:cn("w-full text-sm",e),...t}));SidebarGroupContent.displayName="SidebarGroupContent";const SidebarMenu=React__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("ul",{ref:n,"data-sidebar":"menu",className:cn("flex w-full min-w-0 flex-col gap-1",e),...t}));SidebarMenu.displayName="SidebarMenu";const SidebarMenuItem=React__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("li",{ref:n,"data-sidebar":"menu-item",className:cn("group/menu-item relative",e),...t}));SidebarMenuItem.displayName="SidebarMenuItem";const sidebarMenuButtonVariants=cva("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-hidden ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:p-0!"}},defaultVariants:{variant:"default",size:"default"}}),SidebarMenuButton=React__namespace.forwardRef(({asChild:e=!1,isActive:t=!1,variant:n="default",size:i="default",tooltip:o,className:l,...u},d)=>{const f=e?Slot$2:"button",{isMobile:p,state:m}=useSidebar(),g=jsxRuntime.jsx(f,{ref:d,"data-sidebar":"menu-button","data-size":i,"data-active":t,className:cn(sidebarMenuButtonVariants({variant:n,size:i}),l),...u});return o?(typeof o=="string"&&(o={children:o}),jsxRuntime.jsxs(Tooltip$1,{children:[jsxRuntime.jsx(TooltipTrigger,{asChild:!0,children:g}),jsxRuntime.jsx(TooltipContent,{side:"right",align:"center",hidden:m!=="collapsed"||p,...o})]})):g});SidebarMenuButton.displayName="SidebarMenuButton";const SidebarMenuAction=React__namespace.forwardRef(({className:e,asChild:t=!1,showOnHover:n=!1,...i},o)=>{const l=t?Slot$2:"button";return jsxRuntime.jsx(l,{ref:o,"data-sidebar":"menu-action",className:cn("absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-hidden ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 md:after:hidden","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",n&&"group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground md:opacity-0",e),...i})});SidebarMenuAction.displayName="SidebarMenuAction";const SidebarMenuBadge=React__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("div",{ref:n,"data-sidebar":"menu-badge",className:cn("absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums text-sidebar-foreground select-none pointer-events-none","peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",e),...t}));SidebarMenuBadge.displayName="SidebarMenuBadge";const SidebarMenuSkeleton=React__namespace.forwardRef(({className:e,showIcon:t=!1,...n},i)=>{const o=React__namespace.useMemo(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return jsxRuntime.jsxs("div",{ref:i,"data-sidebar":"menu-skeleton",className:cn("rounded-md h-8 flex gap-2 px-2 items-center",e),...n,children:[t&&jsxRuntime.jsx(Skeleton,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),jsxRuntime.jsx(Skeleton,{className:"h-4 flex-1 max-w-(--skeleton-width)","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":o}})]})});SidebarMenuSkeleton.displayName="SidebarMenuSkeleton";const SidebarMenuSub=React__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("ul",{ref:n,"data-sidebar":"menu-sub",className:cn("mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5","group-data-[collapsible=icon]:hidden",e),...t}));SidebarMenuSub.displayName="SidebarMenuSub";const SidebarMenuSubItem=React__namespace.forwardRef(({...e},t)=>jsxRuntime.jsx("li",{ref:t,...e}));SidebarMenuSubItem.displayName="SidebarMenuSubItem";const SidebarMenuSubButton=React__namespace.forwardRef(({asChild:e=!1,size:t="md",isActive:n,className:i,...o},l)=>{const u=e?Slot$2:"a";return jsxRuntime.jsx(u,{ref:l,"data-sidebar":"menu-sub-button","data-size":t,"data-active":n,className:cn("flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground outline-hidden ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground","data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",t==="sm"&&"text-xs",t==="md"&&"text-sm","group-data-[collapsible=icon]:hidden",i),...o})});SidebarMenuSubButton.displayName="SidebarMenuSubButton";var PROVIDER_NAME="ToastProvider",[Collection,useCollection,createCollectionScope]=createCollection("Toast"),[createToastContext,createToastScope]=createContextScope("Toast",[createCollectionScope]),[ToastProviderProvider,useToastProviderContext]=createToastContext(PROVIDER_NAME),ToastProvider$1=e=>{const{__scopeToast:t,label:n="Notification",duration:i=5e3,swipeDirection:o="right",swipeThreshold:l=50,children:u}=e,[d,f]=React__namespace.useState(null),[p,m]=React__namespace.useState(0),g=React__namespace.useRef(!1),b=React__namespace.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${PROVIDER_NAME}\`. Expected non-empty \`string\`.`),jsxRuntime.jsx(Collection.Provider,{scope:t,children:jsxRuntime.jsx(ToastProviderProvider,{scope:t,label:n,duration:i,swipeDirection:o,swipeThreshold:l,toastCount:p,viewport:d,onViewportChange:f,onToastAdd:React__namespace.useCallback(()=>m(_=>_+1),[]),onToastRemove:React__namespace.useCallback(()=>m(_=>_-1),[]),isFocusedToastEscapeKeyDownRef:g,isClosePausedRef:b,children:u})})};ToastProvider$1.displayName=PROVIDER_NAME;var VIEWPORT_NAME$1="ToastViewport",VIEWPORT_DEFAULT_HOTKEY=["F8"],VIEWPORT_PAUSE="toast.viewportPause",VIEWPORT_RESUME="toast.viewportResume",ToastViewport$1=React__namespace.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:i=VIEWPORT_DEFAULT_HOTKEY,label:o="Notifications ({hotkey})",...l}=e,u=useToastProviderContext(VIEWPORT_NAME$1,n),d=useCollection(n),f=React__namespace.useRef(null),p=React__namespace.useRef(null),m=React__namespace.useRef(null),g=React__namespace.useRef(null),b=useComposedRefs(t,g,u.onViewportChange),_=i.join("+").replace(/Key/g,"").replace(/Digit/g,""),R=u.toastCount>0;React__namespace.useEffect(()=>{const S=C=>{var A;i.length!==0&&i.every(M=>C[M]||C.code===M)&&((A=g.current)==null||A.focus())};return document.addEventListener("keydown",S),()=>document.removeEventListener("keydown",S)},[i]),React__namespace.useEffect(()=>{const S=f.current,C=g.current;if(R&&S&&C){const T=()=>{if(!u.isClosePausedRef.current){const O=new CustomEvent(VIEWPORT_PAUSE);C.dispatchEvent(O),u.isClosePausedRef.current=!0}},A=()=>{if(u.isClosePausedRef.current){const O=new CustomEvent(VIEWPORT_RESUME);C.dispatchEvent(O),u.isClosePausedRef.current=!1}},M=O=>{!S.contains(O.relatedTarget)&&A()},I=()=>{S.contains(document.activeElement)||A()};return S.addEventListener("focusin",T),S.addEventListener("focusout",M),S.addEventListener("pointermove",T),S.addEventListener("pointerleave",I),window.addEventListener("blur",T),window.addEventListener("focus",A),()=>{S.removeEventListener("focusin",T),S.removeEventListener("focusout",M),S.removeEventListener("pointermove",T),S.removeEventListener("pointerleave",I),window.removeEventListener("blur",T),window.removeEventListener("focus",A)}}},[R,u.isClosePausedRef]);const E=React__namespace.useCallback(({tabbingDirection:S})=>{const T=d().map(A=>{const M=A.ref.current,I=[M,...getTabbableCandidates(M)];return S==="forwards"?I:I.reverse()});return(S==="forwards"?T.reverse():T).flat()},[d]);return React__namespace.useEffect(()=>{const S=g.current;if(S){const C=T=>{var I,O,N;const A=T.altKey||T.ctrlKey||T.metaKey;if(T.key==="Tab"&&!A){const j=document.activeElement,D=T.shiftKey;if(T.target===S&&D){(I=p.current)==null||I.focus();return}const B=E({tabbingDirection:D?"backwards":"forwards"}),V=B.findIndex(H=>H===j);focusFirst(B.slice(V+1))?T.preventDefault():D?(O=p.current)==null||O.focus():(N=m.current)==null||N.focus()}};return S.addEventListener("keydown",C),()=>S.removeEventListener("keydown",C)}},[d,E]),jsxRuntime.jsxs(Branch,{ref:f,role:"region","aria-label":o.replace("{hotkey}",_),tabIndex:-1,style:{pointerEvents:R?void 0:"none"},children:[R&&jsxRuntime.jsx(FocusProxy,{ref:p,onFocusFromOutsideViewport:()=>{const S=E({tabbingDirection:"forwards"});focusFirst(S)}}),jsxRuntime.jsx(Collection.Slot,{scope:n,children:jsxRuntime.jsx(Primitive.ol,{tabIndex:-1,...l,ref:b})}),R&&jsxRuntime.jsx(FocusProxy,{ref:m,onFocusFromOutsideViewport:()=>{const S=E({tabbingDirection:"backwards"});focusFirst(S)}})]})});ToastViewport$1.displayName=VIEWPORT_NAME$1;var FOCUS_PROXY_NAME="ToastFocusProxy",FocusProxy=React__namespace.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:i,...o}=e,l=useToastProviderContext(FOCUS_PROXY_NAME,n);return jsxRuntime.jsx(VisuallyHidden,{"aria-hidden":!0,tabIndex:0,...o,ref:t,style:{position:"fixed"},onFocus:u=>{var p;const d=u.relatedTarget;!((p=l.viewport)!=null&&p.contains(d))&&i()}})});FocusProxy.displayName=FOCUS_PROXY_NAME;var TOAST_NAME="Toast",TOAST_SWIPE_START="toast.swipeStart",TOAST_SWIPE_MOVE="toast.swipeMove",TOAST_SWIPE_CANCEL="toast.swipeCancel",TOAST_SWIPE_END="toast.swipeEnd",Toast$1=React__namespace.forwardRef((e,t)=>{const{forceMount:n,open:i,defaultOpen:o,onOpenChange:l,...u}=e,[d=!0,f]=useControllableState({prop:i,defaultProp:o,onChange:l});return jsxRuntime.jsx(Presence,{present:n||d,children:jsxRuntime.jsx(ToastImpl,{open:d,...u,ref:t,onClose:()=>f(!1),onPause:useCallbackRef$1(e.onPause),onResume:useCallbackRef$1(e.onResume),onSwipeStart:composeEventHandlers(e.onSwipeStart,p=>{p.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:composeEventHandlers(e.onSwipeMove,p=>{const{x:m,y:g}=p.detail.delta;p.currentTarget.setAttribute("data-swipe","move"),p.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${m}px`),p.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${g}px`)}),onSwipeCancel:composeEventHandlers(e.onSwipeCancel,p=>{p.currentTarget.setAttribute("data-swipe","cancel"),p.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),p.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),p.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),p.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:composeEventHandlers(e.onSwipeEnd,p=>{const{x:m,y:g}=p.detail.delta;p.currentTarget.setAttribute("data-swipe","end"),p.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),p.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),p.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${m}px`),p.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${g}px`),f(!1)})})})});Toast$1.displayName=TOAST_NAME;var[ToastInteractiveProvider,useToastInteractiveContext]=createToastContext(TOAST_NAME,{onClose(){}}),ToastImpl=React__namespace.forwardRef((e,t)=>{const{__scopeToast:n,type:i="foreground",duration:o,open:l,onClose:u,onEscapeKeyDown:d,onPause:f,onResume:p,onSwipeStart:m,onSwipeMove:g,onSwipeCancel:b,onSwipeEnd:_,...R}=e,E=useToastProviderContext(TOAST_NAME,n),[S,C]=React__namespace.useState(null),T=useComposedRefs(t,H=>C(H)),A=React__namespace.useRef(null),M=React__namespace.useRef(null),I=o||E.duration,O=React__namespace.useRef(0),N=React__namespace.useRef(I),j=React__namespace.useRef(0),{onToastAdd:D,onToastRemove:F}=E,L=useCallbackRef$1(()=>{var z;(S==null?void 0:S.contains(document.activeElement))&&((z=E.viewport)==null||z.focus()),u()}),B=React__namespace.useCallback(H=>{!H||H===1/0||(window.clearTimeout(j.current),O.current=new Date().getTime(),j.current=window.setTimeout(L,H))},[L]);React__namespace.useEffect(()=>{const H=E.viewport;if(H){const z=()=>{B(N.current),p==null||p()},U=()=>{const Q=new Date().getTime()-O.current;N.current=N.current-Q,window.clearTimeout(j.current),f==null||f()};return H.addEventListener(VIEWPORT_PAUSE,U),H.addEventListener(VIEWPORT_RESUME,z),()=>{H.removeEventListener(VIEWPORT_PAUSE,U),H.removeEventListener(VIEWPORT_RESUME,z)}}},[E.viewport,I,f,p,B]),React__namespace.useEffect(()=>{l&&!E.isClosePausedRef.current&&B(I)},[l,I,E.isClosePausedRef,B]),React__namespace.useEffect(()=>(D(),()=>F()),[D,F]);const V=React__namespace.useMemo(()=>S?getAnnounceTextContent(S):null,[S]);return E.viewport?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[V&&jsxRuntime.jsx(ToastAnnounce,{__scopeToast:n,role:"status","aria-live":i==="foreground"?"assertive":"polite","aria-atomic":!0,children:V}),jsxRuntime.jsx(ToastInteractiveProvider,{scope:n,onClose:L,children:ReactDOM__namespace.createPortal(jsxRuntime.jsx(Collection.ItemSlot,{scope:n,children:jsxRuntime.jsx(Root$8,{asChild:!0,onEscapeKeyDown:composeEventHandlers(d,()=>{E.isFocusedToastEscapeKeyDownRef.current||L(),E.isFocusedToastEscapeKeyDownRef.current=!1}),children:jsxRuntime.jsx(Primitive.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":l?"open":"closed","data-swipe-direction":E.swipeDirection,...R,ref:T,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:composeEventHandlers(e.onKeyDown,H=>{H.key==="Escape"&&(d==null||d(H.nativeEvent),H.nativeEvent.defaultPrevented||(E.isFocusedToastEscapeKeyDownRef.current=!0,L()))}),onPointerDown:composeEventHandlers(e.onPointerDown,H=>{H.button===0&&(A.current={x:H.clientX,y:H.clientY})}),onPointerMove:composeEventHandlers(e.onPointerMove,H=>{if(!A.current)return;const z=H.clientX-A.current.x,U=H.clientY-A.current.y,Q=!!M.current,q=["left","right"].includes(E.swipeDirection),W=["left","up"].includes(E.swipeDirection)?Math.min:Math.max,G=q?W(0,z):0,K=q?0:W(0,U),J=H.pointerType==="touch"?10:2,ee={x:G,y:K},ne={originalEvent:H,delta:ee};Q?(M.current=ee,handleAndDispatchCustomEvent(TOAST_SWIPE_MOVE,g,ne,{discrete:!1})):isDeltaInDirection(ee,E.swipeDirection,J)?(M.current=ee,handleAndDispatchCustomEvent(TOAST_SWIPE_START,m,ne,{discrete:!1}),H.target.setPointerCapture(H.pointerId)):(Math.abs(z)>J||Math.abs(U)>J)&&(A.current=null)}),onPointerUp:composeEventHandlers(e.onPointerUp,H=>{const z=M.current,U=H.target;if(U.hasPointerCapture(H.pointerId)&&U.releasePointerCapture(H.pointerId),M.current=null,A.current=null,z){const Q=H.currentTarget,q={originalEvent:H,delta:z};isDeltaInDirection(z,E.swipeDirection,E.swipeThreshold)?handleAndDispatchCustomEvent(TOAST_SWIPE_END,_,q,{discrete:!0}):handleAndDispatchCustomEvent(TOAST_SWIPE_CANCEL,b,q,{discrete:!0}),Q.addEventListener("click",W=>W.preventDefault(),{once:!0})}})})})}),E.viewport)})]}):null}),ToastAnnounce=e=>{const{__scopeToast:t,children:n,...i}=e,o=useToastProviderContext(TOAST_NAME,t),[l,u]=React__namespace.useState(!1),[d,f]=React__namespace.useState(!1);return useNextFrame(()=>u(!0)),React__namespace.useEffect(()=>{const p=window.setTimeout(()=>f(!0),1e3);return()=>window.clearTimeout(p)},[]),d?null:jsxRuntime.jsx(Portal$3,{asChild:!0,children:jsxRuntime.jsx(VisuallyHidden,{...i,children:l&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[o.label," ",n]})})})},TITLE_NAME="ToastTitle",ToastTitle$1=React__namespace.forwardRef((e,t)=>{const{__scopeToast:n,...i}=e;return jsxRuntime.jsx(Primitive.div,{...i,ref:t})});ToastTitle$1.displayName=TITLE_NAME;var DESCRIPTION_NAME="ToastDescription",ToastDescription$1=React__namespace.forwardRef((e,t)=>{const{__scopeToast:n,...i}=e;return jsxRuntime.jsx(Primitive.div,{...i,ref:t})});ToastDescription$1.displayName=DESCRIPTION_NAME;var ACTION_NAME="ToastAction",ToastAction$1=React__namespace.forwardRef((e,t)=>{const{altText:n,...i}=e;return n.trim()?jsxRuntime.jsx(ToastAnnounceExclude,{altText:n,asChild:!0,children:jsxRuntime.jsx(ToastClose$1,{...i,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${ACTION_NAME}\`. Expected non-empty \`string\`.`),null)});ToastAction$1.displayName=ACTION_NAME;var CLOSE_NAME="ToastClose",ToastClose$1=React__namespace.forwardRef((e,t)=>{const{__scopeToast:n,...i}=e,o=useToastInteractiveContext(CLOSE_NAME,n);return jsxRuntime.jsx(ToastAnnounceExclude,{asChild:!0,children:jsxRuntime.jsx(Primitive.button,{type:"button",...i,ref:t,onClick:composeEventHandlers(e.onClick,o.onClose)})})});ToastClose$1.displayName=CLOSE_NAME;var ToastAnnounceExclude=React__namespace.forwardRef((e,t)=>{const{__scopeToast:n,altText:i,...o}=e;return jsxRuntime.jsx(Primitive.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":i||void 0,...o,ref:t})});function getAnnounceTextContent(e){const t=[];return Array.from(e.childNodes).forEach(i=>{if(i.nodeType===i.TEXT_NODE&&i.textContent&&t.push(i.textContent),isHTMLElement(i)){const o=i.ariaHidden||i.hidden||i.style.display==="none",l=i.dataset.radixToastAnnounceExclude==="";if(!o)if(l){const u=i.dataset.radixToastAnnounceAlt;u&&t.push(u)}else t.push(...getAnnounceTextContent(i))}}),t}function handleAndDispatchCustomEvent(e,t,n,{discrete:i}){const o=n.originalEvent.currentTarget,l=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),i?dispatchDiscreteCustomEvent(o,l):o.dispatchEvent(l)}var isDeltaInDirection=(e,t,n=0)=>{const i=Math.abs(e.x),o=Math.abs(e.y),l=i>o;return t==="left"||t==="right"?l&&i>n:!l&&o>n};function useNextFrame(e=()=>{}){const t=useCallbackRef$1(e);useLayoutEffect2(()=>{let n=0,i=0;return n=window.requestAnimationFrame(()=>i=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(i)}},[t])}function isHTMLElement(e){return e.nodeType===e.ELEMENT_NODE}function getTabbableCandidates(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:i=>{const o=i.tagName==="INPUT"&&i.type==="hidden";return i.disabled||i.hidden||o?NodeFilter.FILTER_SKIP:i.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function focusFirst(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var Provider=ToastProvider$1,Viewport$1=ToastViewport$1,Root2$1=Toast$1,Title=ToastTitle$1,Description=ToastDescription$1,Action=ToastAction$1,Close=ToastClose$1;const ToastProvider=Provider,ToastViewport=React__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx(Viewport$1,{ref:n,className:cn("fixed top-0 z-100 flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e),...t}));ToastViewport.displayName=Viewport$1.displayName;const toastVariants=cva("group pointer-events-auto relative flex w-full items-center justify-between space-x-2 overflow-hidden rounded-md border p-4 pr-6 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full sm:data-[state=open]:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground",success:"border-green-600 bg-green-600 text-white",warning:"border-yellow-500 bg-yellow-500 text-white",info:"border-blue-500 bg-blue-500 text-white",secondary:"border-secondary bg-secondary text-secondary-foreground",outline:"border-input bg-background text-foreground hover:bg-accent hover:text-accent-foreground"}},defaultVariants:{variant:"default"}}),Toast=React__namespace.forwardRef(({className:e,variant:t,...n},i)=>jsxRuntime.jsx(Root2$1,{ref:i,className:cn(toastVariants({variant:t}),e),...n}));Toast.displayName=Root2$1.displayName;const ToastAction=React__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx(Action,{ref:n,className:cn("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium transition-colors hover:bg-secondary focus:outline-hidden focus:ring-1 focus:ring-ring disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 hover:group-[.destructive]:border-destructive/30 hover:group-[.destructive]:bg-destructive hover:group-[.destructive]:text-destructive-foreground focus:group-[.destructive]:ring-destructive",e),...t}));ToastAction.displayName=Action.displayName;const ToastClose=React__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx(Close,{ref:n,className:cn("absolute right-1 top-1 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-hidden focus:ring-1 group-hover:opacity-100 group-[.destructive]:text-red-300 hover:group-[.destructive]:text-red-50 focus:group-[.destructive]:ring-red-400 focus:group-[.destructive]:ring-offset-red-600",e),"toast-close":"",...t,children:jsxRuntime.jsx(X,{className:"h-4 w-4"})}));ToastClose.displayName=Close.displayName;const ToastTitle=React__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx(Title,{ref:n,className:cn("text-sm font-semibold [&+div]:text-xs",e),...t}));ToastTitle.displayName=Title.displayName;const ToastDescription=React__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx(Description,{ref:n,className:cn("text-sm opacity-90",e),...t}));ToastDescription.displayName=Description.displayName;const TOAST_LIMIT=1,TOAST_REMOVE_DELAY=1e6;let count=0;function genId(){return count=(count+1)%Number.MAX_SAFE_INTEGER,count.toString()}const toastTimeouts=new Map,addToRemoveQueue=e=>{if(toastTimeouts.has(e))return;const t=setTimeout(()=>{toastTimeouts.delete(e),dispatch({type:"REMOVE_TOAST",toastId:e})},TOAST_REMOVE_DELAY);toastTimeouts.set(e,t)},reducer=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,TOAST_LIMIT)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(n=>n.id===t.toast.id?{...n,...t.toast}:n)};case"DISMISS_TOAST":{const{toastId:n}=t;return n?addToRemoveQueue(n):e.toasts.forEach(i=>addToRemoveQueue(i.id)),{...e,toasts:e.toasts.map(i=>i.id===n||n===void 0?{...i,open:!1}:i)}}case"REMOVE_TOAST":return{...e,toasts:t.toastId?e.toasts.filter(n=>n.id!==t.toastId):[]}}},listeners=[];let memoryState={toasts:[]};function dispatch(e){memoryState=reducer(memoryState,e),listeners.forEach(t=>t(memoryState))}function toast({...e}){const t=genId(),n=o=>dispatch({type:"UPDATE_TOAST",toast:{...o,id:t}}),i=()=>dispatch({type:"DISMISS_TOAST",toastId:t});return dispatch({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:o=>{o||i()}}}),{id:t,dismiss:i,update:n}}function useToast(){const[e,t]=React__namespace.useState(memoryState);return React__namespace.useEffect(()=>(listeners.push(t),()=>{const n=listeners.indexOf(t);n>-1&&listeners.splice(n,1)}),[]),{...e,toast,dismiss:n=>dispatch({type:"DISMISS_TOAST",toastId:n})}}function Toaster(){const{toasts:e}=useToast();return jsxRuntime.jsxs(ToastProvider,{children:[e.map(function({id:t,title:n,description:i,action:o,...l}){return jsxRuntime.jsxs(Toast,{...l,children:[jsxRuntime.jsxs("div",{className:"grid gap-1",children:[n&&jsxRuntime.jsx(ToastTitle,{children:n}),i&&jsxRuntime.jsx(ToastDescription,{children:i})]}),o,jsxRuntime.jsx(ToastClose,{})]},t)}),jsxRuntime.jsx(ToastViewport,{})]})}var commonjsGlobal=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function getDefaultExportFromCjs(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var isArray_1,hasRequiredIsArray;function requireIsArray(){if(hasRequiredIsArray)return isArray_1;hasRequiredIsArray=1;var e=Array.isArray;return isArray_1=e,isArray_1}var _freeGlobal,hasRequired_freeGlobal;function require_freeGlobal(){if(hasRequired_freeGlobal)return _freeGlobal;hasRequired_freeGlobal=1;var e=typeof commonjsGlobal=="object"&&commonjsGlobal&&commonjsGlobal.Object===Object&&commonjsGlobal;return _freeGlobal=e,_freeGlobal}var _root,hasRequired_root;function require_root(){if(hasRequired_root)return _root;hasRequired_root=1;var e=require_freeGlobal(),t=typeof self=="object"&&self&&self.Object===Object&&self,n=e||t||Function("return this")();return _root=n,_root}var _Symbol,hasRequired_Symbol;function require_Symbol(){if(hasRequired_Symbol)return _Symbol;hasRequired_Symbol=1;var e=require_root(),t=e.Symbol;return _Symbol=t,_Symbol}var _getRawTag,hasRequired_getRawTag;function require_getRawTag(){if(hasRequired_getRawTag)return _getRawTag;hasRequired_getRawTag=1;var e=require_Symbol(),t=Object.prototype,n=t.hasOwnProperty,i=t.toString,o=e?e.toStringTag:void 0;function l(u){var d=n.call(u,o),f=u[o];try{u[o]=void 0;var p=!0}catch{}var m=i.call(u);return p&&(d?u[o]=f:delete u[o]),m}return _getRawTag=l,_getRawTag}var _objectToString,hasRequired_objectToString;function require_objectToString(){if(hasRequired_objectToString)return _objectToString;hasRequired_objectToString=1;var e=Object.prototype,t=e.toString;function n(i){return t.call(i)}return _objectToString=n,_objectToString}var _baseGetTag,hasRequired_baseGetTag;function require_baseGetTag(){if(hasRequired_baseGetTag)return _baseGetTag;hasRequired_baseGetTag=1;var e=require_Symbol(),t=require_getRawTag(),n=require_objectToString(),i="[object Null]",o="[object Undefined]",l=e?e.toStringTag:void 0;function u(d){return d==null?d===void 0?o:i:l&&l in Object(d)?t(d):n(d)}return _baseGetTag=u,_baseGetTag}var isObjectLike_1,hasRequiredIsObjectLike;function requireIsObjectLike(){if(hasRequiredIsObjectLike)return isObjectLike_1;hasRequiredIsObjectLike=1;function e(t){return t!=null&&typeof t=="object"}return isObjectLike_1=e,isObjectLike_1}var isSymbol_1,hasRequiredIsSymbol;function requireIsSymbol(){if(hasRequiredIsSymbol)return isSymbol_1;hasRequiredIsSymbol=1;var e=require_baseGetTag(),t=requireIsObjectLike(),n="[object Symbol]";function i(o){return typeof o=="symbol"||t(o)&&e(o)==n}return isSymbol_1=i,isSymbol_1}var _isKey,hasRequired_isKey;function require_isKey(){if(hasRequired_isKey)return _isKey;hasRequired_isKey=1;var e=requireIsArray(),t=requireIsSymbol(),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,i=/^\w*$/;function o(l,u){if(e(l))return!1;var d=typeof l;return d=="number"||d=="symbol"||d=="boolean"||l==null||t(l)?!0:i.test(l)||!n.test(l)||u!=null&&l in Object(u)}return _isKey=o,_isKey}var isObject_1,hasRequiredIsObject;function requireIsObject(){if(hasRequiredIsObject)return isObject_1;hasRequiredIsObject=1;function e(t){var n=typeof t;return t!=null&&(n=="object"||n=="function")}return isObject_1=e,isObject_1}var isFunction_1,hasRequiredIsFunction;function requireIsFunction(){if(hasRequiredIsFunction)return isFunction_1;hasRequiredIsFunction=1;var e=require_baseGetTag(),t=requireIsObject(),n="[object AsyncFunction]",i="[object Function]",o="[object GeneratorFunction]",l="[object Proxy]";function u(d){if(!t(d))return!1;var f=e(d);return f==i||f==o||f==n||f==l}return isFunction_1=u,isFunction_1}var _coreJsData,hasRequired_coreJsData;function require_coreJsData(){if(hasRequired_coreJsData)return _coreJsData;hasRequired_coreJsData=1;var e=require_root(),t=e["__core-js_shared__"];return _coreJsData=t,_coreJsData}var _isMasked,hasRequired_isMasked;function require_isMasked(){if(hasRequired_isMasked)return _isMasked;hasRequired_isMasked=1;var e=require_coreJsData(),t=function(){var i=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||"");return i?"Symbol(src)_1."+i:""}();function n(i){return!!t&&t in i}return _isMasked=n,_isMasked}var _toSource,hasRequired_toSource;function require_toSource(){if(hasRequired_toSource)return _toSource;hasRequired_toSource=1;var e=Function.prototype,t=e.toString;function n(i){if(i!=null){try{return t.call(i)}catch{}try{return i+""}catch{}}return""}return _toSource=n,_toSource}var _baseIsNative,hasRequired_baseIsNative;function require_baseIsNative(){if(hasRequired_baseIsNative)return _baseIsNative;hasRequired_baseIsNative=1;var e=requireIsFunction(),t=require_isMasked(),n=requireIsObject(),i=require_toSource(),o=/[\\^$.*+?()[\]{}|]/g,l=/^\[object .+?Constructor\]$/,u=Function.prototype,d=Object.prototype,f=u.toString,p=d.hasOwnProperty,m=RegExp("^"+f.call(p).replace(o,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function g(b){if(!n(b)||t(b))return!1;var _=e(b)?m:l;return _.test(i(b))}return _baseIsNative=g,_baseIsNative}var _getValue,hasRequired_getValue;function require_getValue(){if(hasRequired_getValue)return _getValue;hasRequired_getValue=1;function e(t,n){return t==null?void 0:t[n]}return _getValue=e,_getValue}var _getNative,hasRequired_getNative;function require_getNative(){if(hasRequired_getNative)return _getNative;hasRequired_getNative=1;var e=require_baseIsNative(),t=require_getValue();function n(i,o){var l=t(i,o);return e(l)?l:void 0}return _getNative=n,_getNative}var _nativeCreate,hasRequired_nativeCreate;function require_nativeCreate(){if(hasRequired_nativeCreate)return _nativeCreate;hasRequired_nativeCreate=1;var e=require_getNative(),t=e(Object,"create");return _nativeCreate=t,_nativeCreate}var _hashClear,hasRequired_hashClear;function require_hashClear(){if(hasRequired_hashClear)return _hashClear;hasRequired_hashClear=1;var e=require_nativeCreate();function t(){this.__data__=e?e(null):{},this.size=0}return _hashClear=t,_hashClear}var _hashDelete,hasRequired_hashDelete;function require_hashDelete(){if(hasRequired_hashDelete)return _hashDelete;hasRequired_hashDelete=1;function e(t){var n=this.has(t)&&delete this.__data__[t];return this.size-=n?1:0,n}return _hashDelete=e,_hashDelete}var _hashGet,hasRequired_hashGet;function require_hashGet(){if(hasRequired_hashGet)return _hashGet;hasRequired_hashGet=1;var e=require_nativeCreate(),t="__lodash_hash_undefined__",n=Object.prototype,i=n.hasOwnProperty;function o(l){var u=this.__data__;if(e){var d=u[l];return d===t?void 0:d}return i.call(u,l)?u[l]:void 0}return _hashGet=o,_hashGet}var _hashHas,hasRequired_hashHas;function require_hashHas(){if(hasRequired_hashHas)return _hashHas;hasRequired_hashHas=1;var e=require_nativeCreate(),t=Object.prototype,n=t.hasOwnProperty;function i(o){var l=this.__data__;return e?l[o]!==void 0:n.call(l,o)}return _hashHas=i,_hashHas}var _hashSet,hasRequired_hashSet;function require_hashSet(){if(hasRequired_hashSet)return _hashSet;hasRequired_hashSet=1;var e=require_nativeCreate(),t="__lodash_hash_undefined__";function n(i,o){var l=this.__data__;return this.size+=this.has(i)?0:1,l[i]=e&&o===void 0?t:o,this}return _hashSet=n,_hashSet}var _Hash,hasRequired_Hash;function require_Hash(){if(hasRequired_Hash)return _Hash;hasRequired_Hash=1;var e=require_hashClear(),t=require_hashDelete(),n=require_hashGet(),i=require_hashHas(),o=require_hashSet();function l(u){var d=-1,f=u==null?0:u.length;for(this.clear();++d<f;){var p=u[d];this.set(p[0],p[1])}}return l.prototype.clear=e,l.prototype.delete=t,l.prototype.get=n,l.prototype.has=i,l.prototype.set=o,_Hash=l,_Hash}var _listCacheClear,hasRequired_listCacheClear;function require_listCacheClear(){if(hasRequired_listCacheClear)return _listCacheClear;hasRequired_listCacheClear=1;function e(){this.__data__=[],this.size=0}return _listCacheClear=e,_listCacheClear}var eq_1,hasRequiredEq;function requireEq(){if(hasRequiredEq)return eq_1;hasRequiredEq=1;function e(t,n){return t===n||t!==t&&n!==n}return eq_1=e,eq_1}var _assocIndexOf,hasRequired_assocIndexOf;function require_assocIndexOf(){if(hasRequired_assocIndexOf)return _assocIndexOf;hasRequired_assocIndexOf=1;var e=requireEq();function t(n,i){for(var o=n.length;o--;)if(e(n[o][0],i))return o;return-1}return _assocIndexOf=t,_assocIndexOf}var _listCacheDelete,hasRequired_listCacheDelete;function require_listCacheDelete(){if(hasRequired_listCacheDelete)return _listCacheDelete;hasRequired_listCacheDelete=1;var e=require_assocIndexOf(),t=Array.prototype,n=t.splice;function i(o){var l=this.__data__,u=e(l,o);if(u<0)return!1;var d=l.length-1;return u==d?l.pop():n.call(l,u,1),--this.size,!0}return _listCacheDelete=i,_listCacheDelete}var _listCacheGet,hasRequired_listCacheGet;function require_listCacheGet(){if(hasRequired_listCacheGet)return _listCacheGet;hasRequired_listCacheGet=1;var e=require_assocIndexOf();function t(n){var i=this.__data__,o=e(i,n);return o<0?void 0:i[o][1]}return _listCacheGet=t,_listCacheGet}var _listCacheHas,hasRequired_listCacheHas;function require_listCacheHas(){if(hasRequired_listCacheHas)return _listCacheHas;hasRequired_listCacheHas=1;var e=require_assocIndexOf();function t(n){return e(this.__data__,n)>-1}return _listCacheHas=t,_listCacheHas}var _listCacheSet,hasRequired_listCacheSet;function require_listCacheSet(){if(hasRequired_listCacheSet)return _listCacheSet;hasRequired_listCacheSet=1;var e=require_assocIndexOf();function t(n,i){var o=this.__data__,l=e(o,n);return l<0?(++this.size,o.push([n,i])):o[l][1]=i,this}return _listCacheSet=t,_listCacheSet}var _ListCache,hasRequired_ListCache;function require_ListCache(){if(hasRequired_ListCache)return _ListCache;hasRequired_ListCache=1;var e=require_listCacheClear(),t=require_listCacheDelete(),n=require_listCacheGet(),i=require_listCacheHas(),o=require_listCacheSet();function l(u){var d=-1,f=u==null?0:u.length;for(this.clear();++d<f;){var p=u[d];this.set(p[0],p[1])}}return l.prototype.clear=e,l.prototype.delete=t,l.prototype.get=n,l.prototype.has=i,l.prototype.set=o,_ListCache=l,_ListCache}var _Map,hasRequired_Map;function require_Map(){if(hasRequired_Map)return _Map;hasRequired_Map=1;var e=require_getNative(),t=require_root(),n=e(t,"Map");return _Map=n,_Map}var _mapCacheClear,hasRequired_mapCacheClear;function require_mapCacheClear(){if(hasRequired_mapCacheClear)return _mapCacheClear;hasRequired_mapCacheClear=1;var e=require_Hash(),t=require_ListCache(),n=require_Map();function i(){this.size=0,this.__data__={hash:new e,map:new(n||t),string:new e}}return _mapCacheClear=i,_mapCacheClear}var _isKeyable,hasRequired_isKeyable;function require_isKeyable(){if(hasRequired_isKeyable)return _isKeyable;hasRequired_isKeyable=1;function e(t){var n=typeof t;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?t!=="__proto__":t===null}return _isKeyable=e,_isKeyable}var _getMapData,hasRequired_getMapData;function require_getMapData(){if(hasRequired_getMapData)return _getMapData;hasRequired_getMapData=1;var e=require_isKeyable();function t(n,i){var o=n.__data__;return e(i)?o[typeof i=="string"?"string":"hash"]:o.map}return _getMapData=t,_getMapData}var _mapCacheDelete,hasRequired_mapCacheDelete;function require_mapCacheDelete(){if(hasRequired_mapCacheDelete)return _mapCacheDelete;hasRequired_mapCacheDelete=1;var e=require_getMapData();function t(n){var i=e(this,n).delete(n);return this.size-=i?1:0,i}return _mapCacheDelete=t,_mapCacheDelete}var _mapCacheGet,hasRequired_mapCacheGet;function require_mapCacheGet(){if(hasRequired_mapCacheGet)return _mapCacheGet;hasRequired_mapCacheGet=1;var e=require_getMapData();function t(n){return e(this,n).get(n)}return _mapCacheGet=t,_mapCacheGet}var _mapCacheHas,hasRequired_mapCacheHas;function require_mapCacheHas(){if(hasRequired_mapCacheHas)return _mapCacheHas;hasRequired_mapCacheHas=1;var e=require_getMapData();function t(n){return e(this,n).has(n)}return _mapCacheHas=t,_mapCacheHas}var _mapCacheSet,hasRequired_mapCacheSet;function require_mapCacheSet(){if(hasRequired_mapCacheSet)return _mapCacheSet;hasRequired_mapCacheSet=1;var e=require_getMapData();function t(n,i){var o=e(this,n),l=o.size;return o.set(n,i),this.size+=o.size==l?0:1,this}return _mapCacheSet=t,_mapCacheSet}var _MapCache,hasRequired_MapCache;function require_MapCache(){if(hasRequired_MapCache)return _MapCache;hasRequired_MapCache=1;var e=require_mapCacheClear(),t=require_mapCacheDelete(),n=require_mapCacheGet(),i=require_mapCacheHas(),o=require_mapCacheSet();function l(u){var d=-1,f=u==null?0:u.length;for(this.clear();++d<f;){var p=u[d];this.set(p[0],p[1])}}return l.prototype.clear=e,l.prototype.delete=t,l.prototype.get=n,l.prototype.has=i,l.prototype.set=o,_MapCache=l,_MapCache}var memoize_1,hasRequiredMemoize;function requireMemoize(){if(hasRequiredMemoize)return memoize_1;hasRequiredMemoize=1;var e=require_MapCache(),t="Expected a function";function n(i,o){if(typeof i!="function"||o!=null&&typeof o!="function")throw new TypeError(t);var l=function(){var u=arguments,d=o?o.apply(this,u):u[0],f=l.cache;if(f.has(d))return f.get(d);var p=i.apply(this,u);return l.cache=f.set(d,p)||f,p};return l.cache=new(n.Cache||e),l}return n.Cache=e,memoize_1=n,memoize_1}var _memoizeCapped,hasRequired_memoizeCapped;function require_memoizeCapped(){if(hasRequired_memoizeCapped)return _memoizeCapped;hasRequired_memoizeCapped=1;var e=requireMemoize(),t=500;function n(i){var o=e(i,function(u){return l.size===t&&l.clear(),u}),l=o.cache;return o}return _memoizeCapped=n,_memoizeCapped}var _stringToPath,hasRequired_stringToPath;function require_stringToPath(){if(hasRequired_stringToPath)return _stringToPath;hasRequired_stringToPath=1;var e=require_memoizeCapped(),t=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,n=/\\(\\)?/g,i=e(function(o){var l=[];return o.charCodeAt(0)===46&&l.push(""),o.replace(t,function(u,d,f,p){l.push(f?p.replace(n,"$1"):d||u)}),l});return _stringToPath=i,_stringToPath}var _arrayMap,hasRequired_arrayMap;function require_arrayMap(){if(hasRequired_arrayMap)return _arrayMap;hasRequired_arrayMap=1;function e(t,n){for(var i=-1,o=t==null?0:t.length,l=Array(o);++i<o;)l[i]=n(t[i],i,t);return l}return _arrayMap=e,_arrayMap}var _baseToString,hasRequired_baseToString;function require_baseToString(){if(hasRequired_baseToString)return _baseToString;hasRequired_baseToString=1;var e=require_Symbol(),t=require_arrayMap(),n=requireIsArray(),i=requireIsSymbol(),o=e?e.prototype:void 0,l=o?o.toString:void 0;function u(d){if(typeof d=="string")return d;if(n(d))return t(d,u)+"";if(i(d))return l?l.call(d):"";var f=d+"";return f=="0"&&1/d==-1/0?"-0":f}return _baseToString=u,_baseToString}var toString_1,hasRequiredToString;function requireToString(){if(hasRequiredToString)return toString_1;hasRequiredToString=1;var e=require_baseToString();function t(n){return n==null?"":e(n)}return toString_1=t,toString_1}var _castPath,hasRequired_castPath;function require_castPath(){if(hasRequired_castPath)return _castPath;hasRequired_castPath=1;var e=requireIsArray(),t=require_isKey(),n=require_stringToPath(),i=requireToString();function o(l,u){return e(l)?l:t(l,u)?[l]:n(i(l))}return _castPath=o,_castPath}var _toKey,hasRequired_toKey;function require_toKey(){if(hasRequired_toKey)return _toKey;hasRequired_toKey=1;var e=requireIsSymbol();function t(n){if(typeof n=="string"||e(n))return n;var i=n+"";return i=="0"&&1/n==-1/0?"-0":i}return _toKey=t,_toKey}var _baseGet,hasRequired_baseGet;function require_baseGet(){if(hasRequired_baseGet)return _baseGet;hasRequired_baseGet=1;var e=require_castPath(),t=require_toKey();function n(i,o){o=e(o,i);for(var l=0,u=o.length;i!=null&&l<u;)i=i[t(o[l++])];return l&&l==u?i:void 0}return _baseGet=n,_baseGet}var get_1,hasRequiredGet;function requireGet(){if(hasRequiredGet)return get_1;hasRequiredGet=1;var e=require_baseGet();function t(n,i,o){var l=n==null?void 0:e(n,i);return l===void 0?o:l}return get_1=t,get_1}var getExports=requireGet();const get$1=getDefaultExportFromCjs(getExports);var isNil_1,hasRequiredIsNil;function requireIsNil(){if(hasRequiredIsNil)return isNil_1;hasRequiredIsNil=1;function e(t){return t==null}return isNil_1=e,isNil_1}var isNilExports=requireIsNil();const isNil=getDefaultExportFromCjs(isNilExports);var isString_1,hasRequiredIsString;function requireIsString(){if(hasRequiredIsString)return isString_1;hasRequiredIsString=1;var e=require_baseGetTag(),t=requireIsArray(),n=requireIsObjectLike(),i="[object String]";function o(l){return typeof l=="string"||!t(l)&&n(l)&&e(l)==i}return isString_1=o,isString_1}var isStringExports=requireIsString();const isString=getDefaultExportFromCjs(isStringExports);var isFunctionExports=requireIsFunction();const isFunction$1=getDefaultExportFromCjs(isFunctionExports);var isObjectExports=requireIsObject();const isObject=getDefaultExportFromCjs(isObjectExports);var reactIs$1={exports:{}},reactIs_production_min$1={};/**
|
|
220
240
|
* @license React
|
|
221
241
|
* react-is.production.min.js
|
|
222
242
|
*
|
|
@@ -324,7 +344,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
324
344
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
325
345
|
PERFORMANCE OF THIS SOFTWARE.
|
|
326
346
|
***************************************************************************** */var extendStatics=function(e,t){return(extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])})(e,t)};function __extends(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}extendStatics(e,t),e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var __assign=function(){return(__assign=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function __awaiter(e,t,n,i){return new(n||(n=Promise))(function(o,l){function u(p){try{f(i.next(p))}catch(m){l(m)}}function d(p){try{f(i.throw(p))}catch(m){l(m)}}function f(p){var m;p.done?o(p.value):(m=p.value,m instanceof n?m:new n(function(g){g(m)})).then(u,d)}f((i=i.apply(e,[])).next())})}function __generator(e,t){var n,i,o,l,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return l={next:d(0),throw:d(1),return:d(2)},typeof Symbol=="function"&&(l[Symbol.iterator]=function(){return this}),l;function d(f){return function(p){return function(m){if(n)throw new TypeError("Generator is already executing.");for(;u;)try{if(n=1,i&&(o=2&m[0]?i.return:m[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,m[1])).done)return o;switch(i=0,o&&(m=[2&m[0],o.value]),m[0]){case 0:case 1:o=m;break;case 4:return u.label++,{value:m[1],done:!1};case 5:u.label++,i=m[1],m=[0];continue;case 7:m=u.ops.pop(),u.trys.pop();continue;default:if(o=u.trys,!((o=o.length>0&&o[o.length-1])||m[0]!==6&&m[0]!==2)){u=0;continue}if(m[0]===3&&(!o||m[1]>o[0]&&m[1]<o[3])){u.label=m[1];break}if(m[0]===6&&u.label<o[1]){u.label=o[1],o=m;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(m);break}o[2]&&u.ops.pop(),u.trys.pop();continue}m=t.call(e,u)}catch(g){m=[6,g],i=0}finally{n=o=0}if(5&m[0])throw m[1];return{value:m[0]?m[1]:void 0,done:!0}}([f,p])}}}function createCommonjsModule(e,t){return e(t={exports:{}},t.exports),t.exports}var lottie=createCommonjsModule(function(module,exports){typeof navigator<"u"&&function(e,t){module.exports=t()}(0,function(){var svgNS="http://www.w3.org/2000/svg",locationHref="",_useWebWorker=!1,initialDefaultFrame=-999999,setWebWorker=function(e){_useWebWorker=!!e},getWebWorker=function(){return _useWebWorker},setLocationHref=function(e){locationHref=e},getLocationHref=function(){return locationHref};function createTag(e){return document.createElement(e)}function extendPrototype(e,t){var n,i,o=e.length;for(n=0;n<o;n+=1)for(var l in i=e[n].prototype)Object.prototype.hasOwnProperty.call(i,l)&&(t.prototype[l]=i[l])}function getDescriptor(e,t){return Object.getOwnPropertyDescriptor(e,t)}function createProxyFunction(e){function t(){}return t.prototype=e,t}var audioControllerFactory=function(){function e(t){this.audios=[],this.audioFactory=t,this._volume=1,this._isMuted=!1}return e.prototype={addAudio:function(t){this.audios.push(t)},pause:function(){var t,n=this.audios.length;for(t=0;t<n;t+=1)this.audios[t].pause()},resume:function(){var t,n=this.audios.length;for(t=0;t<n;t+=1)this.audios[t].resume()},setRate:function(t){var n,i=this.audios.length;for(n=0;n<i;n+=1)this.audios[n].setRate(t)},createAudio:function(t){return this.audioFactory?this.audioFactory(t):window.Howl?new window.Howl({src:[t]}):{isPlaying:!1,play:function(){this.isPlaying=!0},seek:function(){this.isPlaying=!1},playing:function(){},rate:function(){},setVolume:function(){}}},setAudioFactory:function(t){this.audioFactory=t},setVolume:function(t){this._volume=t,this._updateVolume()},mute:function(){this._isMuted=!0,this._updateVolume()},unmute:function(){this._isMuted=!1,this._updateVolume()},getVolume:function(){return this._volume},_updateVolume:function(){var t,n=this.audios.length;for(t=0;t<n;t+=1)this.audios[t].volume(this._volume*(this._isMuted?0:1))}},function(){return new e}}(),createTypedArray=function(){function e(t,n){var i,o=0,l=[];switch(t){case"int16":case"uint8c":i=1;break;default:i=1.1}for(o=0;o<n;o+=1)l.push(i);return l}return typeof Uint8ClampedArray=="function"&&typeof Float32Array=="function"?function(t,n){return t==="float32"?new Float32Array(n):t==="int16"?new Int16Array(n):t==="uint8c"?new Uint8ClampedArray(n):e(t,n)}:e}();function createSizedArray(e){return Array.apply(null,{length:e})}function _typeof$6(e){return(_typeof$6=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}var subframeEnabled=!0,expressionsPlugin=null,expressionsInterfaces=null,idPrefix$1="",isSafari=/^((?!chrome|android).)*safari/i.test(navigator.userAgent),bmPow=Math.pow,bmSqrt=Math.sqrt,bmFloor=Math.floor,bmMax=Math.max,bmMin=Math.min,BMMath={};(function(){var e,t=["abs","acos","acosh","asin","asinh","atan","atanh","atan2","ceil","cbrt","expm1","clz32","cos","cosh","exp","floor","fround","hypot","imul","log","log1p","log2","log10","max","min","pow","random","round","sign","sin","sinh","sqrt","tan","tanh","trunc","E","LN10","LN2","LOG10E","LOG2E","PI","SQRT1_2","SQRT2"],n=t.length;for(e=0;e<n;e+=1)BMMath[t[e]]=Math[t[e]]})(),BMMath.random=Math.random,BMMath.abs=function(e){if(_typeof$6(e)==="object"&&e.length){var t,n=createSizedArray(e.length),i=e.length;for(t=0;t<i;t+=1)n[t]=Math.abs(e[t]);return n}return Math.abs(e)};var defaultCurveSegments=150,degToRads=Math.PI/180,roundCorner=.5519;function styleDiv(e){e.style.position="absolute",e.style.top=0,e.style.left=0,e.style.display="block",e.style.transformOrigin="0 0",e.style.webkitTransformOrigin="0 0",e.style.backfaceVisibility="visible",e.style.webkitBackfaceVisibility="visible",e.style.transformStyle="preserve-3d",e.style.webkitTransformStyle="preserve-3d",e.style.mozTransformStyle="preserve-3d"}function BMEnterFrameEvent(e,t,n,i){this.type=e,this.currentTime=t,this.totalTime=n,this.direction=i<0?-1:1}function BMCompleteEvent(e,t){this.type=e,this.direction=t<0?-1:1}function BMCompleteLoopEvent(e,t,n,i){this.type=e,this.currentLoop=n,this.totalLoops=t,this.direction=i<0?-1:1}function BMSegmentStartEvent(e,t,n){this.type=e,this.firstFrame=t,this.totalFrames=n}function BMDestroyEvent(e,t){this.type=e,this.target=t}function BMRenderFrameErrorEvent(e,t){this.type="renderFrameError",this.nativeError=e,this.currentTime=t}function BMConfigErrorEvent(e){this.type="configError",this.nativeError=e}var createElementID=(_count=0,function(){return idPrefix$1+"__lottie_element_"+(_count+=1)}),_count;function HSVtoRGB(e,t,n){var i,o,l,u,d,f,p,m;switch(f=n*(1-t),p=n*(1-(d=6*e-(u=Math.floor(6*e)))*t),m=n*(1-(1-d)*t),u%6){case 0:i=n,o=m,l=f;break;case 1:i=p,o=n,l=f;break;case 2:i=f,o=n,l=m;break;case 3:i=f,o=p,l=n;break;case 4:i=m,o=f,l=n;break;case 5:i=n,o=f,l=p}return[i,o,l]}function RGBtoHSV(e,t,n){var i,o=Math.max(e,t,n),l=Math.min(e,t,n),u=o-l,d=o===0?0:u/o,f=o/255;switch(o){case l:i=0;break;case e:i=t-n+u*(t<n?6:0),i/=6*u;break;case t:i=n-e+2*u,i/=6*u;break;case n:i=e-t+4*u,i/=6*u}return[i,d,f]}function addSaturationToRGB(e,t){var n=RGBtoHSV(255*e[0],255*e[1],255*e[2]);return n[1]+=t,n[1]>1?n[1]=1:n[1]<=0&&(n[1]=0),HSVtoRGB(n[0],n[1],n[2])}function addBrightnessToRGB(e,t){var n=RGBtoHSV(255*e[0],255*e[1],255*e[2]);return n[2]+=t,n[2]>1?n[2]=1:n[2]<0&&(n[2]=0),HSVtoRGB(n[0],n[1],n[2])}function addHueToRGB(e,t){var n=RGBtoHSV(255*e[0],255*e[1],255*e[2]);return n[0]+=t/360,n[0]>1?n[0]-=1:n[0]<0&&(n[0]+=1),HSVtoRGB(n[0],n[1],n[2])}var rgbToHex=function(){var e,t,n=[];for(e=0;e<256;e+=1)t=e.toString(16),n[e]=t.length===1?"0"+t:t;return function(i,o,l){return i<0&&(i=0),o<0&&(o=0),l<0&&(l=0),"#"+n[i]+n[o]+n[l]}}(),setSubframeEnabled=function(e){subframeEnabled=!!e},getSubframeEnabled=function(){return subframeEnabled},setExpressionsPlugin=function(e){expressionsPlugin=e},getExpressionsPlugin=function(){return expressionsPlugin},setExpressionInterfaces=function(e){expressionsInterfaces=e},getExpressionInterfaces=function(){return expressionsInterfaces},setDefaultCurveSegments=function(e){defaultCurveSegments=e},getDefaultCurveSegments=function(){return defaultCurveSegments},setIdPrefix=function(e){idPrefix$1=e};function createNS(e){return document.createElementNS(svgNS,e)}function _typeof$5(e){return(_typeof$5=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}var dataManager=function(){var e,t,n=1,i=[],o={onmessage:function(){},postMessage:function(f){e({data:f})}},l={postMessage:function(f){o.onmessage({data:f})}};function u(){t||((t=function(f){if(window.Worker&&window.Blob&&getWebWorker()){var p=new Blob(["var _workerSelf = self; self.onmessage = ",f.toString()],{type:"text/javascript"}),m=URL.createObjectURL(p);return new Worker(m)}return e=f,o}(function(f){if(l.dataManager||(l.dataManager=function(){function m(N,j){var D,F,L,B,V,H,z=N.length;for(F=0;F<z;F+=1)if("ks"in(D=N[F])&&!D.completed){if(D.completed=!0,D.hasMask){var U=D.masksProperties;for(B=U.length,L=0;L<B;L+=1)if(U[L].pt.k.i)_(U[L].pt.k);else for(H=U[L].pt.k.length,V=0;V<H;V+=1)U[L].pt.k[V].s&&_(U[L].pt.k[V].s[0]),U[L].pt.k[V].e&&_(U[L].pt.k[V].e[0])}D.ty===0?(D.layers=g(D.refId,j),m(D.layers,j)):D.ty===4?b(D.shapes):D.ty===5&&I(D)}}function g(N,j){var D=function(F,L){for(var B=0,V=L.length;B<V;){if(L[B].id===F)return L[B];B+=1}return null}(N,j);return D?D.layers.__used?JSON.parse(JSON.stringify(D.layers)):(D.layers.__used=!0,D.layers):null}function b(N){var j,D,F;for(j=N.length-1;j>=0;j-=1)if(N[j].ty==="sh")if(N[j].ks.k.i)_(N[j].ks.k);else for(F=N[j].ks.k.length,D=0;D<F;D+=1)N[j].ks.k[D].s&&_(N[j].ks.k[D].s[0]),N[j].ks.k[D].e&&_(N[j].ks.k[D].e[0]);else N[j].ty==="gr"&&b(N[j].it)}function _(N){var j,D=N.i.length;for(j=0;j<D;j+=1)N.i[j][0]+=N.v[j][0],N.i[j][1]+=N.v[j][1],N.o[j][0]+=N.v[j][0],N.o[j][1]+=N.v[j][1]}function R(N,j){var D=j?j.split("."):[100,100,100];return N[0]>D[0]||!(D[0]>N[0])&&(N[1]>D[1]||!(D[1]>N[1])&&(N[2]>D[2]||!(D[2]>N[2])&&null))}var E,S=function(){var N=[4,4,14];function j(D){var F,L,B,V=D.length;for(F=0;F<V;F+=1)D[F].ty===5&&(L=D[F],B=void 0,B=L.t.d,L.t.d={k:[{s:B,t:0}]})}return function(D){if(R(N,D.v)&&(j(D.layers),D.assets)){var F,L=D.assets.length;for(F=0;F<L;F+=1)D.assets[F].layers&&j(D.assets[F].layers)}}}(),C=(E=[4,7,99],function(N){if(N.chars&&!R(E,N.v)){var j,D=N.chars.length;for(j=0;j<D;j+=1){var F=N.chars[j];F.data&&F.data.shapes&&(b(F.data.shapes),F.data.ip=0,F.data.op=99999,F.data.st=0,F.data.sr=1,F.data.ks={p:{k:[0,0],a:0},s:{k:[100,100],a:0},a:{k:[0,0],a:0},r:{k:0,a:0},o:{k:100,a:0}},N.chars[j].t||(F.data.shapes.push({ty:"no"}),F.data.shapes[0].it.push({p:{k:[0,0],a:0},s:{k:[100,100],a:0},a:{k:[0,0],a:0},r:{k:0,a:0},o:{k:100,a:0},sk:{k:0,a:0},sa:{k:0,a:0},ty:"tr"})))}}}),T=function(){var N=[5,7,15];function j(D){var F,L,B,V=D.length;for(F=0;F<V;F+=1)D[F].ty===5&&(L=D[F],B=void 0,typeof(B=L.t.p).a=="number"&&(B.a={a:0,k:B.a}),typeof B.p=="number"&&(B.p={a:0,k:B.p}),typeof B.r=="number"&&(B.r={a:0,k:B.r}))}return function(D){if(R(N,D.v)&&(j(D.layers),D.assets)){var F,L=D.assets.length;for(F=0;F<L;F+=1)D.assets[F].layers&&j(D.assets[F].layers)}}}(),A=function(){var N=[4,1,9];function j(F){var L,B,V,H=F.length;for(L=0;L<H;L+=1)if(F[L].ty==="gr")j(F[L].it);else if(F[L].ty==="fl"||F[L].ty==="st")if(F[L].c.k&&F[L].c.k[0].i)for(V=F[L].c.k.length,B=0;B<V;B+=1)F[L].c.k[B].s&&(F[L].c.k[B].s[0]/=255,F[L].c.k[B].s[1]/=255,F[L].c.k[B].s[2]/=255,F[L].c.k[B].s[3]/=255),F[L].c.k[B].e&&(F[L].c.k[B].e[0]/=255,F[L].c.k[B].e[1]/=255,F[L].c.k[B].e[2]/=255,F[L].c.k[B].e[3]/=255);else F[L].c.k[0]/=255,F[L].c.k[1]/=255,F[L].c.k[2]/=255,F[L].c.k[3]/=255}function D(F){var L,B=F.length;for(L=0;L<B;L+=1)F[L].ty===4&&j(F[L].shapes)}return function(F){if(R(N,F.v)&&(D(F.layers),F.assets)){var L,B=F.assets.length;for(L=0;L<B;L+=1)F.assets[L].layers&&D(F.assets[L].layers)}}}(),M=function(){var N=[4,4,18];function j(F){var L,B,V;for(L=F.length-1;L>=0;L-=1)if(F[L].ty==="sh")if(F[L].ks.k.i)F[L].ks.k.c=F[L].closed;else for(V=F[L].ks.k.length,B=0;B<V;B+=1)F[L].ks.k[B].s&&(F[L].ks.k[B].s[0].c=F[L].closed),F[L].ks.k[B].e&&(F[L].ks.k[B].e[0].c=F[L].closed);else F[L].ty==="gr"&&j(F[L].it)}function D(F){var L,B,V,H,z,U,Q=F.length;for(B=0;B<Q;B+=1){if((L=F[B]).hasMask){var q=L.masksProperties;for(H=q.length,V=0;V<H;V+=1)if(q[V].pt.k.i)q[V].pt.k.c=q[V].cl;else for(U=q[V].pt.k.length,z=0;z<U;z+=1)q[V].pt.k[z].s&&(q[V].pt.k[z].s[0].c=q[V].cl),q[V].pt.k[z].e&&(q[V].pt.k[z].e[0].c=q[V].cl)}L.ty===4&&j(L.shapes)}}return function(F){if(R(N,F.v)&&(D(F.layers),F.assets)){var L,B=F.assets.length;for(L=0;L<B;L+=1)F.assets[L].layers&&D(F.assets[L].layers)}}}();function I(N){N.t.a.length===0&&N.t.p}var O={completeData:function(N){N.__complete||(A(N),S(N),C(N),T(N),M(N),m(N.layers,N.assets),function(j,D){if(j){var F=0,L=j.length;for(F=0;F<L;F+=1)j[F].t===1&&(j[F].data.layers=g(j[F].data.refId,D),m(j[F].data.layers,D))}}(N.chars,N.assets),N.__complete=!0)}};return O.checkColors=A,O.checkChars=C,O.checkPathProperties=T,O.checkShapes=M,O.completeLayers=m,O}()),l.assetLoader||(l.assetLoader=function(){function m(g){var b=g.getResponseHeader("content-type");return b&&g.responseType==="json"&&b.indexOf("json")!==-1||g.response&&_typeof$5(g.response)==="object"?g.response:g.response&&typeof g.response=="string"?JSON.parse(g.response):g.responseText?JSON.parse(g.responseText):null}return{load:function(g,b,_,R){var E,S=new XMLHttpRequest;try{S.responseType="json"}catch{}S.onreadystatechange=function(){if(S.readyState===4)if(S.status===200)E=m(S),_(E);else try{E=m(S),_(E)}catch(C){R&&R(C)}};try{S.open(["G","E","T"].join(""),g,!0)}catch{S.open(["G","E","T"].join(""),b+"/"+g,!0)}S.send()}}}()),f.data.type==="loadAnimation")l.assetLoader.load(f.data.path,f.data.fullPath,function(m){l.dataManager.completeData(m),l.postMessage({id:f.data.id,payload:m,status:"success"})},function(){l.postMessage({id:f.data.id,status:"error"})});else if(f.data.type==="complete"){var p=f.data.animation;l.dataManager.completeData(p),l.postMessage({id:f.data.id,payload:p,status:"success"})}else f.data.type==="loadData"&&l.assetLoader.load(f.data.path,f.data.fullPath,function(m){l.postMessage({id:f.data.id,payload:m,status:"success"})},function(){l.postMessage({id:f.data.id,status:"error"})})})).onmessage=function(f){var p=f.data,m=p.id,g=i[m];i[m]=null,p.status==="success"?g.onComplete(p.payload):g.onError&&g.onError()})}function d(f,p){var m="processId_"+(n+=1);return i[m]={onComplete:f,onError:p},m}return{loadAnimation:function(f,p,m){u();var g=d(p,m);t.postMessage({type:"loadAnimation",path:f,fullPath:window.location.origin+window.location.pathname,id:g})},loadData:function(f,p,m){u();var g=d(p,m);t.postMessage({type:"loadData",path:f,fullPath:window.location.origin+window.location.pathname,id:g})},completeAnimation:function(f,p,m){u();var g=d(p,m);t.postMessage({type:"complete",animation:f,id:g})}}}(),ImagePreloader=function(){var e=function(){var d=createTag("canvas");d.width=1,d.height=1;var f=d.getContext("2d");return f.fillStyle="rgba(0,0,0,0)",f.fillRect(0,0,1,1),d}();function t(){this.loadedAssets+=1,this.loadedAssets===this.totalImages&&this.loadedFootagesCount===this.totalFootages&&this.imagesLoadedCb&&this.imagesLoadedCb(null)}function n(){this.loadedFootagesCount+=1,this.loadedAssets===this.totalImages&&this.loadedFootagesCount===this.totalFootages&&this.imagesLoadedCb&&this.imagesLoadedCb(null)}function i(d,f,p){var m="";if(d.e)m=d.p;else if(f){var g=d.p;g.indexOf("images/")!==-1&&(g=g.split("/")[1]),m=f+g}else m=p,m+=d.u?d.u:"",m+=d.p;return m}function o(d){var f=0,p=setInterval((function(){(d.getBBox().width||f>500)&&(this._imageLoaded(),clearInterval(p)),f+=1}).bind(this),50)}function l(d){var f={assetData:d},p=i(d,this.assetsPath,this.path);return dataManager.loadData(p,(function(m){f.img=m,this._footageLoaded()}).bind(this),(function(){f.img={},this._footageLoaded()}).bind(this)),f}function u(){this._imageLoaded=t.bind(this),this._footageLoaded=n.bind(this),this.testImageLoaded=o.bind(this),this.createFootageData=l.bind(this),this.assetsPath="",this.path="",this.totalImages=0,this.totalFootages=0,this.loadedAssets=0,this.loadedFootagesCount=0,this.imagesLoadedCb=null,this.images=[]}return u.prototype={loadAssets:function(d,f){var p;this.imagesLoadedCb=f;var m=d.length;for(p=0;p<m;p+=1)d[p].layers||(d[p].t&&d[p].t!=="seq"?d[p].t===3&&(this.totalFootages+=1,this.images.push(this.createFootageData(d[p]))):(this.totalImages+=1,this.images.push(this._createImageData(d[p]))))},setAssetsPath:function(d){this.assetsPath=d||""},setPath:function(d){this.path=d||""},loadedImages:function(){return this.totalImages===this.loadedAssets},loadedFootages:function(){return this.totalFootages===this.loadedFootagesCount},destroy:function(){this.imagesLoadedCb=null,this.images.length=0},getAsset:function(d){for(var f=0,p=this.images.length;f<p;){if(this.images[f].assetData===d)return this.images[f].img;f+=1}return null},createImgData:function(d){var f=i(d,this.assetsPath,this.path),p=createTag("img");p.crossOrigin="anonymous",p.addEventListener("load",this._imageLoaded,!1),p.addEventListener("error",(function(){m.img=e,this._imageLoaded()}).bind(this),!1),p.src=f;var m={img:p,assetData:d};return m},createImageData:function(d){var f=i(d,this.assetsPath,this.path),p=createNS("image");isSafari?this.testImageLoaded(p):p.addEventListener("load",this._imageLoaded,!1),p.addEventListener("error",(function(){m.img=e,this._imageLoaded()}).bind(this),!1),p.setAttributeNS("http://www.w3.org/1999/xlink","href",f),this._elementHelper.append?this._elementHelper.append(p):this._elementHelper.appendChild(p);var m={img:p,assetData:d};return m},imageLoaded:t,footageLoaded:n,setCacheType:function(d,f){d==="svg"?(this._elementHelper=f,this._createImageData=this.createImageData.bind(this)):this._createImageData=this.createImgData.bind(this)}},u}();function BaseEvent(){}BaseEvent.prototype={triggerEvent:function(e,t){if(this._cbs[e])for(var n=this._cbs[e],i=0;i<n.length;i+=1)n[i](t)},addEventListener:function(e,t){return this._cbs[e]||(this._cbs[e]=[]),this._cbs[e].push(t),(function(){this.removeEventListener(e,t)}).bind(this)},removeEventListener:function(e,t){if(t){if(this._cbs[e]){for(var n=0,i=this._cbs[e].length;n<i;)this._cbs[e][n]===t&&(this._cbs[e].splice(n,1),n-=1,i-=1),n+=1;this._cbs[e].length||(this._cbs[e]=null)}}else this._cbs[e]=null}};var markerParser=function(){function e(t){for(var n,i=t.split(`\r
|
|
327
|
-
`),o={},l=0,u=0;u<i.length;u+=1)(n=i[u].split(":")).length===2&&(o[n[0]]=n[1].trim(),l+=1);if(l===0)throw new Error;return o}return function(t){for(var n=[],i=0;i<t.length;i+=1){var o=t[i],l={time:o.tm,duration:o.dr};try{l.payload=JSON.parse(t[i].cm)}catch{try{l.payload=e(t[i].cm)}catch{l.payload={name:t[i].cm}}}n.push(l)}return n}}(),ProjectInterface=function(){function e(t){this.compositions.push(t)}return function(){function t(n){for(var i=0,o=this.compositions.length;i<o;){if(this.compositions[i].data&&this.compositions[i].data.nm===n)return this.compositions[i].prepareFrame&&this.compositions[i].data.xt&&this.compositions[i].prepareFrame(this.currentFrame),this.compositions[i].compInterface;i+=1}return null}return t.compositions=[],t.currentFrame=0,t.registerComposition=e,t}}(),renderers={},registerRenderer=function(e,t){renderers[e]=t};function getRenderer(e){return renderers[e]}function getRegisteredRenderer(){if(renderers.canvas)return"canvas";for(var e in renderers)if(renderers[e])return e;return""}function _typeof$4(e){return(_typeof$4=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}var AnimationItem=function(){this._cbs=[],this.name="",this.path="",this.isLoaded=!1,this.currentFrame=0,this.currentRawFrame=0,this.firstFrame=0,this.totalFrames=0,this.frameRate=0,this.frameMult=0,this.playSpeed=1,this.playDirection=1,this.playCount=0,this.animationData={},this.assets=[],this.isPaused=!0,this.autoplay=!1,this.loop=!0,this.renderer=null,this.animationID=createElementID(),this.assetsPath="",this.timeCompleted=0,this.segmentPos=0,this.isSubframeEnabled=getSubframeEnabled(),this.segments=[],this._idle=!0,this._completedLoop=!1,this.projectInterface=ProjectInterface(),this.imagePreloader=new ImagePreloader,this.audioController=audioControllerFactory(),this.markers=[],this.configAnimation=this.configAnimation.bind(this),this.onSetupError=this.onSetupError.bind(this),this.onSegmentComplete=this.onSegmentComplete.bind(this),this.drawnFrameEvent=new BMEnterFrameEvent("drawnFrame",0,0,0),this.expressionsPlugin=getExpressionsPlugin()};extendPrototype([BaseEvent],AnimationItem),AnimationItem.prototype.setParams=function(e){(e.wrapper||e.container)&&(this.wrapper=e.wrapper||e.container);var t="svg";e.animType?t=e.animType:e.renderer&&(t=e.renderer);var n=getRenderer(t);this.renderer=new n(this,e.rendererSettings),this.imagePreloader.setCacheType(t,this.renderer.globalData.defs),this.renderer.setProjectInterface(this.projectInterface),this.animType=t,e.loop===""||e.loop===null||e.loop===void 0||e.loop===!0?this.loop=!0:e.loop===!1?this.loop=!1:this.loop=parseInt(e.loop,10),this.autoplay=!("autoplay"in e)||e.autoplay,this.name=e.name?e.name:"",this.autoloadSegments=!Object.prototype.hasOwnProperty.call(e,"autoloadSegments")||e.autoloadSegments,this.assetsPath=e.assetsPath,this.initialSegment=e.initialSegment,e.audioFactory&&this.audioController.setAudioFactory(e.audioFactory),e.animationData?this.setupAnimation(e.animationData):e.path&&(e.path.lastIndexOf("\\")!==-1?this.path=e.path.substr(0,e.path.lastIndexOf("\\")+1):this.path=e.path.substr(0,e.path.lastIndexOf("/")+1),this.fileName=e.path.substr(e.path.lastIndexOf("/")+1),this.fileName=this.fileName.substr(0,this.fileName.lastIndexOf(".json")),dataManager.loadAnimation(e.path,this.configAnimation,this.onSetupError))},AnimationItem.prototype.onSetupError=function(){this.trigger("data_failed")},AnimationItem.prototype.setupAnimation=function(e){dataManager.completeAnimation(e,this.configAnimation)},AnimationItem.prototype.setData=function(e,t){t&&_typeof$4(t)!=="object"&&(t=JSON.parse(t));var n={wrapper:e,animationData:t},i=e.attributes;n.path=i.getNamedItem("data-animation-path")?i.getNamedItem("data-animation-path").value:i.getNamedItem("data-bm-path")?i.getNamedItem("data-bm-path").value:i.getNamedItem("bm-path")?i.getNamedItem("bm-path").value:"",n.animType=i.getNamedItem("data-anim-type")?i.getNamedItem("data-anim-type").value:i.getNamedItem("data-bm-type")?i.getNamedItem("data-bm-type").value:i.getNamedItem("bm-type")?i.getNamedItem("bm-type").value:i.getNamedItem("data-bm-renderer")?i.getNamedItem("data-bm-renderer").value:i.getNamedItem("bm-renderer")?i.getNamedItem("bm-renderer").value:getRegisteredRenderer()||"canvas";var o=i.getNamedItem("data-anim-loop")?i.getNamedItem("data-anim-loop").value:i.getNamedItem("data-bm-loop")?i.getNamedItem("data-bm-loop").value:i.getNamedItem("bm-loop")?i.getNamedItem("bm-loop").value:"";o==="false"?n.loop=!1:o==="true"?n.loop=!0:o!==""&&(n.loop=parseInt(o,10));var l=i.getNamedItem("data-anim-autoplay")?i.getNamedItem("data-anim-autoplay").value:i.getNamedItem("data-bm-autoplay")?i.getNamedItem("data-bm-autoplay").value:!i.getNamedItem("bm-autoplay")||i.getNamedItem("bm-autoplay").value;n.autoplay=l!=="false",n.name=i.getNamedItem("data-name")?i.getNamedItem("data-name").value:i.getNamedItem("data-bm-name")?i.getNamedItem("data-bm-name").value:i.getNamedItem("bm-name")?i.getNamedItem("bm-name").value:"",(i.getNamedItem("data-anim-prerender")?i.getNamedItem("data-anim-prerender").value:i.getNamedItem("data-bm-prerender")?i.getNamedItem("data-bm-prerender").value:i.getNamedItem("bm-prerender")?i.getNamedItem("bm-prerender").value:"")==="false"&&(n.prerender=!1),n.path?this.setParams(n):this.trigger("destroy")},AnimationItem.prototype.includeLayers=function(e){e.op>this.animationData.op&&(this.animationData.op=e.op,this.totalFrames=Math.floor(e.op-this.animationData.ip));var t,n,i=this.animationData.layers,o=i.length,l=e.layers,u=l.length;for(n=0;n<u;n+=1)for(t=0;t<o;){if(i[t].id===l[n].id){i[t]=l[n];break}t+=1}if((e.chars||e.fonts)&&(this.renderer.globalData.fontManager.addChars(e.chars),this.renderer.globalData.fontManager.addFonts(e.fonts,this.renderer.globalData.defs)),e.assets)for(o=e.assets.length,t=0;t<o;t+=1)this.animationData.assets.push(e.assets[t]);this.animationData.__complete=!1,dataManager.completeAnimation(this.animationData,this.onSegmentComplete)},AnimationItem.prototype.onSegmentComplete=function(e){this.animationData=e;var t=getExpressionsPlugin();t&&t.initExpressions(this),this.loadNextSegment()},AnimationItem.prototype.loadNextSegment=function(){var e=this.animationData.segments;if(!e||e.length===0||!this.autoloadSegments)return this.trigger("data_ready"),void(this.timeCompleted=this.totalFrames);var t=e.shift();this.timeCompleted=t.time*this.frameRate;var n=this.path+this.fileName+"_"+this.segmentPos+".json";this.segmentPos+=1,dataManager.loadData(n,this.includeLayers.bind(this),(function(){this.trigger("data_failed")}).bind(this))},AnimationItem.prototype.loadSegments=function(){this.animationData.segments||(this.timeCompleted=this.totalFrames),this.loadNextSegment()},AnimationItem.prototype.imagesLoaded=function(){this.trigger("loaded_images"),this.checkLoaded()},AnimationItem.prototype.preloadImages=function(){this.imagePreloader.setAssetsPath(this.assetsPath),this.imagePreloader.setPath(this.path),this.imagePreloader.loadAssets(this.animationData.assets,this.imagesLoaded.bind(this))},AnimationItem.prototype.configAnimation=function(e){if(this.renderer)try{this.animationData=e,this.initialSegment?(this.totalFrames=Math.floor(this.initialSegment[1]-this.initialSegment[0]),this.firstFrame=Math.round(this.initialSegment[0])):(this.totalFrames=Math.floor(this.animationData.op-this.animationData.ip),this.firstFrame=Math.round(this.animationData.ip)),this.renderer.configAnimation(e),e.assets||(e.assets=[]),this.assets=this.animationData.assets,this.frameRate=this.animationData.fr,this.frameMult=this.animationData.fr/1e3,this.renderer.searchExtraCompositions(e.assets),this.markers=markerParser(e.markers||[]),this.trigger("config_ready"),this.preloadImages(),this.loadSegments(),this.updaFrameModifier(),this.waitForFontsLoaded(),this.isPaused&&this.audioController.pause()}catch(t){this.triggerConfigError(t)}},AnimationItem.prototype.waitForFontsLoaded=function(){this.renderer&&(this.renderer.globalData.fontManager.isLoaded?this.checkLoaded():setTimeout(this.waitForFontsLoaded.bind(this),20))},AnimationItem.prototype.checkLoaded=function(){if(!this.isLoaded&&this.renderer.globalData.fontManager.isLoaded&&(this.imagePreloader.loadedImages()||this.renderer.rendererType!=="canvas")&&this.imagePreloader.loadedFootages()){this.isLoaded=!0;var e=getExpressionsPlugin();e&&e.initExpressions(this),this.renderer.initItems(),setTimeout((function(){this.trigger("DOMLoaded")}).bind(this),0),this.gotoFrame(),this.autoplay&&this.play()}},AnimationItem.prototype.resize=function(e,t){var n=typeof e=="number"?e:void 0,i=typeof t=="number"?t:void 0;this.renderer.updateContainerSize(n,i)},AnimationItem.prototype.setSubframe=function(e){this.isSubframeEnabled=!!e},AnimationItem.prototype.gotoFrame=function(){this.currentFrame=this.isSubframeEnabled?this.currentRawFrame:~~this.currentRawFrame,this.timeCompleted!==this.totalFrames&&this.currentFrame>this.timeCompleted&&(this.currentFrame=this.timeCompleted),this.trigger("enterFrame"),this.renderFrame(),this.trigger("drawnFrame")},AnimationItem.prototype.renderFrame=function(){if(this.isLoaded!==!1&&this.renderer)try{this.expressionsPlugin&&this.expressionsPlugin.resetFrame(),this.renderer.renderFrame(this.currentFrame+this.firstFrame)}catch(e){this.triggerRenderFrameError(e)}},AnimationItem.prototype.play=function(e){e&&this.name!==e||this.isPaused===!0&&(this.isPaused=!1,this.trigger("_play"),this.audioController.resume(),this._idle&&(this._idle=!1,this.trigger("_active")))},AnimationItem.prototype.pause=function(e){e&&this.name!==e||this.isPaused===!1&&(this.isPaused=!0,this.trigger("_pause"),this._idle=!0,this.trigger("_idle"),this.audioController.pause())},AnimationItem.prototype.togglePause=function(e){e&&this.name!==e||(this.isPaused===!0?this.play():this.pause())},AnimationItem.prototype.stop=function(e){e&&this.name!==e||(this.pause(),this.playCount=0,this._completedLoop=!1,this.setCurrentRawFrameValue(0))},AnimationItem.prototype.getMarkerData=function(e){for(var t,n=0;n<this.markers.length;n+=1)if((t=this.markers[n]).payload&&t.payload.name===e)return t;return null},AnimationItem.prototype.goToAndStop=function(e,t,n){if(!n||this.name===n){var i=Number(e);if(isNaN(i)){var o=this.getMarkerData(e);o&&this.goToAndStop(o.time,!0)}else t?this.setCurrentRawFrameValue(e):this.setCurrentRawFrameValue(e*this.frameModifier);this.pause()}},AnimationItem.prototype.goToAndPlay=function(e,t,n){if(!n||this.name===n){var i=Number(e);if(isNaN(i)){var o=this.getMarkerData(e);o&&(o.duration?this.playSegments([o.time,o.time+o.duration],!0):this.goToAndStop(o.time,!0))}else this.goToAndStop(i,t,n);this.play()}},AnimationItem.prototype.advanceTime=function(e){if(this.isPaused!==!0&&this.isLoaded!==!1){var t=this.currentRawFrame+e*this.frameModifier,n=!1;t>=this.totalFrames-1&&this.frameModifier>0?this.loop&&this.playCount!==this.loop?t>=this.totalFrames?(this.playCount+=1,this.checkSegments(t%this.totalFrames)||(this.setCurrentRawFrameValue(t%this.totalFrames),this._completedLoop=!0,this.trigger("loopComplete"))):this.setCurrentRawFrameValue(t):this.checkSegments(t>this.totalFrames?t%this.totalFrames:0)||(n=!0,t=this.totalFrames-1):t<0?this.checkSegments(t%this.totalFrames)||(!this.loop||this.playCount--<=0&&this.loop!==!0?(n=!0,t=0):(this.setCurrentRawFrameValue(this.totalFrames+t%this.totalFrames),this._completedLoop?this.trigger("loopComplete"):this._completedLoop=!0)):this.setCurrentRawFrameValue(t),n&&(this.setCurrentRawFrameValue(t),this.pause(),this.trigger("complete"))}},AnimationItem.prototype.adjustSegment=function(e,t){this.playCount=0,e[1]<e[0]?(this.frameModifier>0&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(-1)),this.totalFrames=e[0]-e[1],this.timeCompleted=this.totalFrames,this.firstFrame=e[1],this.setCurrentRawFrameValue(this.totalFrames-.001-t)):e[1]>e[0]&&(this.frameModifier<0&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(1)),this.totalFrames=e[1]-e[0],this.timeCompleted=this.totalFrames,this.firstFrame=e[0],this.setCurrentRawFrameValue(.001+t)),this.trigger("segmentStart")},AnimationItem.prototype.setSegment=function(e,t){var n=-1;this.isPaused&&(this.currentRawFrame+this.firstFrame<e?n=e:this.currentRawFrame+this.firstFrame>t&&(n=t-e)),this.firstFrame=e,this.totalFrames=t-e,this.timeCompleted=this.totalFrames,n!==-1&&this.goToAndStop(n,!0)},AnimationItem.prototype.playSegments=function(e,t){if(t&&(this.segments.length=0),_typeof$4(e[0])==="object"){var n,i=e.length;for(n=0;n<i;n+=1)this.segments.push(e[n])}else this.segments.push(e);this.segments.length&&t&&this.adjustSegment(this.segments.shift(),0),this.isPaused&&this.play()},AnimationItem.prototype.resetSegments=function(e){this.segments.length=0,this.segments.push([this.animationData.ip,this.animationData.op]),e&&this.checkSegments(0)},AnimationItem.prototype.checkSegments=function(e){return!!this.segments.length&&(this.adjustSegment(this.segments.shift(),e),!0)},AnimationItem.prototype.destroy=function(e){e&&this.name!==e||!this.renderer||(this.renderer.destroy(),this.imagePreloader.destroy(),this.trigger("destroy"),this._cbs=null,this.onEnterFrame=null,this.onLoopComplete=null,this.onComplete=null,this.onSegmentStart=null,this.onDestroy=null,this.renderer=null,this.expressionsPlugin=null,this.imagePreloader=null,this.projectInterface=null)},AnimationItem.prototype.setCurrentRawFrameValue=function(e){this.currentRawFrame=e,this.gotoFrame()},AnimationItem.prototype.setSpeed=function(e){this.playSpeed=e,this.updaFrameModifier()},AnimationItem.prototype.setDirection=function(e){this.playDirection=e<0?-1:1,this.updaFrameModifier()},AnimationItem.prototype.setLoop=function(e){this.loop=e},AnimationItem.prototype.setVolume=function(e,t){t&&this.name!==t||this.audioController.setVolume(e)},AnimationItem.prototype.getVolume=function(){return this.audioController.getVolume()},AnimationItem.prototype.mute=function(e){e&&this.name!==e||this.audioController.mute()},AnimationItem.prototype.unmute=function(e){e&&this.name!==e||this.audioController.unmute()},AnimationItem.prototype.updaFrameModifier=function(){this.frameModifier=this.frameMult*this.playSpeed*this.playDirection,this.audioController.setRate(this.playSpeed*this.playDirection)},AnimationItem.prototype.getPath=function(){return this.path},AnimationItem.prototype.getAssetsPath=function(e){var t="";if(e.e)t=e.p;else if(this.assetsPath){var n=e.p;n.indexOf("images/")!==-1&&(n=n.split("/")[1]),t=this.assetsPath+n}else t=this.path,t+=e.u?e.u:"",t+=e.p;return t},AnimationItem.prototype.getAssetData=function(e){for(var t=0,n=this.assets.length;t<n;){if(e===this.assets[t].id)return this.assets[t];t+=1}return null},AnimationItem.prototype.hide=function(){this.renderer.hide()},AnimationItem.prototype.show=function(){this.renderer.show()},AnimationItem.prototype.getDuration=function(e){return e?this.totalFrames:this.totalFrames/this.frameRate},AnimationItem.prototype.updateDocumentData=function(e,t,n){try{this.renderer.getElementByPath(e).updateDocumentData(t,n)}catch{}},AnimationItem.prototype.trigger=function(e){if(this._cbs&&this._cbs[e])switch(e){case"enterFrame":this.triggerEvent(e,new BMEnterFrameEvent(e,this.currentFrame,this.totalFrames,this.frameModifier));break;case"drawnFrame":this.drawnFrameEvent.currentTime=this.currentFrame,this.drawnFrameEvent.totalTime=this.totalFrames,this.drawnFrameEvent.direction=this.frameModifier,this.triggerEvent(e,this.drawnFrameEvent);break;case"loopComplete":this.triggerEvent(e,new BMCompleteLoopEvent(e,this.loop,this.playCount,this.frameMult));break;case"complete":this.triggerEvent(e,new BMCompleteEvent(e,this.frameMult));break;case"segmentStart":this.triggerEvent(e,new BMSegmentStartEvent(e,this.firstFrame,this.totalFrames));break;case"destroy":this.triggerEvent(e,new BMDestroyEvent(e,this));break;default:this.triggerEvent(e)}e==="enterFrame"&&this.onEnterFrame&&this.onEnterFrame.call(this,new BMEnterFrameEvent(e,this.currentFrame,this.totalFrames,this.frameMult)),e==="loopComplete"&&this.onLoopComplete&&this.onLoopComplete.call(this,new BMCompleteLoopEvent(e,this.loop,this.playCount,this.frameMult)),e==="complete"&&this.onComplete&&this.onComplete.call(this,new BMCompleteEvent(e,this.frameMult)),e==="segmentStart"&&this.onSegmentStart&&this.onSegmentStart.call(this,new BMSegmentStartEvent(e,this.firstFrame,this.totalFrames)),e==="destroy"&&this.onDestroy&&this.onDestroy.call(this,new BMDestroyEvent(e,this))},AnimationItem.prototype.triggerRenderFrameError=function(e){var t=new BMRenderFrameErrorEvent(e,this.currentFrame);this.triggerEvent("error",t),this.onError&&this.onError.call(this,t)},AnimationItem.prototype.triggerConfigError=function(e){var t=new BMConfigErrorEvent(e,this.currentFrame);this.triggerEvent("error",t),this.onError&&this.onError.call(this,t)};var animationManager=function(){var e={},t=[],n=0,i=0,o=0,l=!0,u=!1;function d(E){for(var S=0,C=E.target;S<i;)t[S].animation===C&&(t.splice(S,1),S-=1,i-=1,C.isPaused||m()),S+=1}function f(E,S){if(!E)return null;for(var C=0;C<i;){if(t[C].elem===E&&t[C].elem!==null)return t[C].animation;C+=1}var T=new AnimationItem;return g(T,E),T.setData(E,S),T}function p(){o+=1,R()}function m(){o-=1}function g(E,S){E.addEventListener("destroy",d),E.addEventListener("_active",p),E.addEventListener("_idle",m),t.push({elem:S,animation:E}),i+=1}function b(E){var S,C=E-n;for(S=0;S<i;S+=1)t[S].animation.advanceTime(C);n=E,o&&!u?window.requestAnimationFrame(b):l=!0}function _(E){n=E,window.requestAnimationFrame(b)}function R(){!u&&o&&l&&(window.requestAnimationFrame(_),l=!1)}return e.registerAnimation=f,e.loadAnimation=function(E){var S=new AnimationItem;return g(S,null),S.setParams(E),S},e.setSpeed=function(E,S){var C;for(C=0;C<i;C+=1)t[C].animation.setSpeed(E,S)},e.setDirection=function(E,S){var C;for(C=0;C<i;C+=1)t[C].animation.setDirection(E,S)},e.play=function(E){var S;for(S=0;S<i;S+=1)t[S].animation.play(E)},e.pause=function(E){var S;for(S=0;S<i;S+=1)t[S].animation.pause(E)},e.stop=function(E){var S;for(S=0;S<i;S+=1)t[S].animation.stop(E)},e.togglePause=function(E){var S;for(S=0;S<i;S+=1)t[S].animation.togglePause(E)},e.searchAnimations=function(E,S,C){var T,A=[].concat([].slice.call(document.getElementsByClassName("lottie")),[].slice.call(document.getElementsByClassName("bodymovin"))),M=A.length;for(T=0;T<M;T+=1)C&&A[T].setAttribute("data-bm-type",C),f(A[T],E);if(S&&M===0){C||(C="svg");var I=document.getElementsByTagName("body")[0];I.innerText="";var O=createTag("div");O.style.width="100%",O.style.height="100%",O.setAttribute("data-bm-type",C),I.appendChild(O),f(O,E)}},e.resize=function(){var E;for(E=0;E<i;E+=1)t[E].animation.resize()},e.goToAndStop=function(E,S,C){var T;for(T=0;T<i;T+=1)t[T].animation.goToAndStop(E,S,C)},e.destroy=function(E){var S;for(S=i-1;S>=0;S-=1)t[S].animation.destroy(E)},e.freeze=function(){u=!0},e.unfreeze=function(){u=!1,R()},e.setVolume=function(E,S){var C;for(C=0;C<i;C+=1)t[C].animation.setVolume(E,S)},e.mute=function(E){var S;for(S=0;S<i;S+=1)t[S].animation.mute(E)},e.unmute=function(E){var S;for(S=0;S<i;S+=1)t[S].animation.unmute(E)},e.getRegisteredAnimations=function(){var E,S=t.length,C=[];for(E=0;E<S;E+=1)C.push(t[E].animation);return C},e}(),BezierFactory=function(){var e={getBezierEasing:function(p,m,g,b,_){var R=_||("bez_"+p+"_"+m+"_"+g+"_"+b).replace(/\./g,"p");if(t[R])return t[R];var E=new f([p,m,g,b]);return t[R]=E,E}},t={},n=typeof Float32Array=="function";function i(p,m){return 1-3*m+3*p}function o(p,m){return 3*m-6*p}function l(p){return 3*p}function u(p,m,g){return((i(m,g)*p+o(m,g))*p+l(m))*p}function d(p,m,g){return 3*i(m,g)*p*p+2*o(m,g)*p+l(m)}function f(p){this._p=p,this._mSampleValues=n?new Float32Array(11):new Array(11),this._precomputed=!1,this.get=this.get.bind(this)}return f.prototype={get:function(p){var m=this._p[0],g=this._p[1],b=this._p[2],_=this._p[3];return this._precomputed||this._precompute(),m===g&&b===_?p:p===0?0:p===1?1:u(this._getTForX(p),g,_)},_precompute:function(){var p=this._p[0],m=this._p[1],g=this._p[2],b=this._p[3];this._precomputed=!0,p===m&&g===b||this._calcSampleValues()},_calcSampleValues:function(){for(var p=this._p[0],m=this._p[2],g=0;g<11;++g)this._mSampleValues[g]=u(.1*g,p,m)},_getTForX:function(p){for(var m=this._p[0],g=this._p[2],b=this._mSampleValues,_=0,R=1;R!==10&&b[R]<=p;++R)_+=.1;var E=_+.1*((p-b[--R])/(b[R+1]-b[R])),S=d(E,m,g);return S>=.001?function(C,T,A,M){for(var I=0;I<4;++I){var O=d(T,A,M);if(O===0)return T;T-=(u(T,A,M)-C)/O}return T}(p,E,m,g):S===0?E:function(C,T,A,M,I){var O,N,j=0;do(O=u(N=T+(A-T)/2,M,I)-C)>0?A=N:T=N;while(Math.abs(O)>1e-7&&++j<10);return N}(p,_,_+.1,m,g)}},e}(),pooling={double:function(e){return e.concat(createSizedArray(e.length))}},poolFactory=function(e,t,n){var i=0,o=e,l=createSizedArray(o);return{newElement:function(){return i?l[i-=1]:t()},release:function(u){i===o&&(l=pooling.double(l),o*=2),n&&n(u),l[i]=u,i+=1}}},bezierLengthPool=poolFactory(8,function(){return{addedLength:0,percents:createTypedArray("float32",getDefaultCurveSegments()),lengths:createTypedArray("float32",getDefaultCurveSegments())}}),segmentsLengthPool=poolFactory(8,function(){return{lengths:[],totalLength:0}},function(e){var t,n=e.lengths.length;for(t=0;t<n;t+=1)bezierLengthPool.release(e.lengths[t]);e.lengths.length=0});function bezFunction(){var e=Math;function t(p,m,g,b,_,R){var E=p*b+m*_+g*R-_*b-R*p-g*m;return E>-.001&&E<.001}var n=function(p,m,g,b){var _,R,E,S,C,T,A=getDefaultCurveSegments(),M=0,I=[],O=[],N=bezierLengthPool.newElement();for(E=g.length,_=0;_<A;_+=1){for(C=_/(A-1),T=0,R=0;R<E;R+=1)S=bmPow(1-C,3)*p[R]+3*bmPow(1-C,2)*C*g[R]+3*(1-C)*bmPow(C,2)*b[R]+bmPow(C,3)*m[R],I[R]=S,O[R]!==null&&(T+=bmPow(I[R]-O[R],2)),O[R]=I[R];T&&(M+=T=bmSqrt(T)),N.percents[_]=C,N.lengths[_]=M}return N.addedLength=M,N};function i(p){this.segmentLength=0,this.points=new Array(p)}function o(p,m){this.partialLength=p,this.point=m}var l,u=(l={},function(p,m,g,b){var _=(p[0]+"_"+p[1]+"_"+m[0]+"_"+m[1]+"_"+g[0]+"_"+g[1]+"_"+b[0]+"_"+b[1]).replace(/\./g,"p");if(!l[_]){var R,E,S,C,T,A,M,I=getDefaultCurveSegments(),O=0,N=null;p.length===2&&(p[0]!==m[0]||p[1]!==m[1])&&t(p[0],p[1],m[0],m[1],p[0]+g[0],p[1]+g[1])&&t(p[0],p[1],m[0],m[1],m[0]+b[0],m[1]+b[1])&&(I=2);var j=new i(I);for(S=g.length,R=0;R<I;R+=1){for(M=createSizedArray(S),T=R/(I-1),A=0,E=0;E<S;E+=1)C=bmPow(1-T,3)*p[E]+3*bmPow(1-T,2)*T*(p[E]+g[E])+3*(1-T)*bmPow(T,2)*(m[E]+b[E])+bmPow(T,3)*m[E],M[E]=C,N!==null&&(A+=bmPow(M[E]-N[E],2));O+=A=bmSqrt(A),j.points[R]=new o(A,M),N=M}j.segmentLength=O,l[_]=j}return l[_]});function d(p,m){var g=m.percents,b=m.lengths,_=g.length,R=bmFloor((_-1)*p),E=p*m.addedLength,S=0;if(R===_-1||R===0||E===b[R])return g[R];for(var C=b[R]>E?-1:1,T=!0;T;)if(b[R]<=E&&b[R+1]>E?(S=(E-b[R])/(b[R+1]-b[R]),T=!1):R+=C,R<0||R>=_-1){if(R===_-1)return g[R];T=!1}return g[R]+(g[R+1]-g[R])*S}var f=createTypedArray("float32",8);return{getSegmentsLength:function(p){var m,g=segmentsLengthPool.newElement(),b=p.c,_=p.v,R=p.o,E=p.i,S=p._length,C=g.lengths,T=0;for(m=0;m<S-1;m+=1)C[m]=n(_[m],_[m+1],R[m],E[m+1]),T+=C[m].addedLength;return b&&S&&(C[m]=n(_[m],_[0],R[m],E[0]),T+=C[m].addedLength),g.totalLength=T,g},getNewSegment:function(p,m,g,b,_,R,E){_<0?_=0:_>1&&(_=1);var S,C=d(_,E),T=d(R=R>1?1:R,E),A=p.length,M=1-C,I=1-T,O=M*M*M,N=C*M*M*3,j=C*C*M*3,D=C*C*C,F=M*M*I,L=C*M*I+M*C*I+M*M*T,B=C*C*I+M*C*T+C*M*T,V=C*C*T,H=M*I*I,z=C*I*I+M*T*I+M*I*T,U=C*T*I+M*T*T+C*I*T,Q=C*T*T,q=I*I*I,W=T*I*I+I*T*I+I*I*T,G=T*T*I+I*T*T+T*I*T,K=T*T*T;for(S=0;S<A;S+=1)f[4*S]=e.round(1e3*(O*p[S]+N*g[S]+j*b[S]+D*m[S]))/1e3,f[4*S+1]=e.round(1e3*(F*p[S]+L*g[S]+B*b[S]+V*m[S]))/1e3,f[4*S+2]=e.round(1e3*(H*p[S]+z*g[S]+U*b[S]+Q*m[S]))/1e3,f[4*S+3]=e.round(1e3*(q*p[S]+W*g[S]+G*b[S]+K*m[S]))/1e3;return f},getPointInSegment:function(p,m,g,b,_,R){var E=d(_,R),S=1-E;return[e.round(1e3*(S*S*S*p[0]+(E*S*S+S*E*S+S*S*E)*g[0]+(E*E*S+S*E*E+E*S*E)*b[0]+E*E*E*m[0]))/1e3,e.round(1e3*(S*S*S*p[1]+(E*S*S+S*E*S+S*S*E)*g[1]+(E*E*S+S*E*E+E*S*E)*b[1]+E*E*E*m[1]))/1e3]},buildBezierData:u,pointOnLine2D:t,pointOnLine3D:function(p,m,g,b,_,R,E,S,C){if(g===0&&R===0&&C===0)return t(p,m,b,_,E,S);var T,A=e.sqrt(e.pow(b-p,2)+e.pow(_-m,2)+e.pow(R-g,2)),M=e.sqrt(e.pow(E-p,2)+e.pow(S-m,2)+e.pow(C-g,2)),I=e.sqrt(e.pow(E-b,2)+e.pow(S-_,2)+e.pow(C-R,2));return(T=A>M?A>I?A-M-I:I-M-A:I>M?I-M-A:M-A-I)>-1e-4&&T<1e-4}}}var bez=bezFunction(),initFrame=initialDefaultFrame,mathAbs=Math.abs;function interpolateValue(e,t){var n,i=this.offsetTime;this.propType==="multidimensional"&&(n=createTypedArray("float32",this.pv.length));for(var o,l,u,d,f,p,m,g,b,_=t.lastIndex,R=_,E=this.keyframes.length-1,S=!0;S;){if(o=this.keyframes[R],l=this.keyframes[R+1],R===E-1&&e>=l.t-i){o.h&&(o=l),_=0;break}if(l.t-i>e){_=R;break}R<E-1?R+=1:(_=0,S=!1)}u=this.keyframesMetadata[R]||{};var C,T=l.t-i,A=o.t-i;if(o.to){u.bezierData||(u.bezierData=bez.buildBezierData(o.s,l.s||o.e,o.to,o.ti));var M=u.bezierData;if(e>=T||e<A){var I=e>=T?M.points.length-1:0;for(f=M.points[I].point.length,d=0;d<f;d+=1)n[d]=M.points[I].point[d]}else{u.__fnct?b=u.__fnct:(b=BezierFactory.getBezierEasing(o.o.x,o.o.y,o.i.x,o.i.y,o.n).get,u.__fnct=b),p=b((e-A)/(T-A));var O,N=M.segmentLength*p,j=t.lastFrame<e&&t._lastKeyframeIndex===R?t._lastAddedLength:0;for(g=t.lastFrame<e&&t._lastKeyframeIndex===R?t._lastPoint:0,S=!0,m=M.points.length;S;){if(j+=M.points[g].partialLength,N===0||p===0||g===M.points.length-1){for(f=M.points[g].point.length,d=0;d<f;d+=1)n[d]=M.points[g].point[d];break}if(N>=j&&N<j+M.points[g+1].partialLength){for(O=(N-j)/M.points[g+1].partialLength,f=M.points[g].point.length,d=0;d<f;d+=1)n[d]=M.points[g].point[d]+(M.points[g+1].point[d]-M.points[g].point[d])*O;break}g<m-1?g+=1:S=!1}t._lastPoint=g,t._lastAddedLength=j-M.points[g].partialLength,t._lastKeyframeIndex=R}}else{var D,F,L,B,V;if(E=o.s.length,C=l.s||o.e,this.sh&&o.h!==1)e>=T?(n[0]=C[0],n[1]=C[1],n[2]=C[2]):e<=A?(n[0]=o.s[0],n[1]=o.s[1],n[2]=o.s[2]):quaternionToEuler(n,slerp(createQuaternion(o.s),createQuaternion(C),(e-A)/(T-A)));else for(R=0;R<E;R+=1)o.h!==1&&(e>=T?p=1:e<A?p=0:(o.o.x.constructor===Array?(u.__fnct||(u.__fnct=[]),u.__fnct[R]?b=u.__fnct[R]:(D=o.o.x[R]===void 0?o.o.x[0]:o.o.x[R],F=o.o.y[R]===void 0?o.o.y[0]:o.o.y[R],L=o.i.x[R]===void 0?o.i.x[0]:o.i.x[R],B=o.i.y[R]===void 0?o.i.y[0]:o.i.y[R],b=BezierFactory.getBezierEasing(D,F,L,B).get,u.__fnct[R]=b)):u.__fnct?b=u.__fnct:(D=o.o.x,F=o.o.y,L=o.i.x,B=o.i.y,b=BezierFactory.getBezierEasing(D,F,L,B).get,o.keyframeMetadata=b),p=b((e-A)/(T-A)))),C=l.s||o.e,V=o.h===1?o.s[R]:o.s[R]+(C[R]-o.s[R])*p,this.propType==="multidimensional"?n[R]=V:n=V}return t.lastIndex=_,n}function slerp(e,t,n){var i,o,l,u,d,f=[],p=e[0],m=e[1],g=e[2],b=e[3],_=t[0],R=t[1],E=t[2],S=t[3];return(o=p*_+m*R+g*E+b*S)<0&&(o=-o,_=-_,R=-R,E=-E,S=-S),1-o>1e-6?(i=Math.acos(o),l=Math.sin(i),u=Math.sin((1-n)*i)/l,d=Math.sin(n*i)/l):(u=1-n,d=n),f[0]=u*p+d*_,f[1]=u*m+d*R,f[2]=u*g+d*E,f[3]=u*b+d*S,f}function quaternionToEuler(e,t){var n=t[0],i=t[1],o=t[2],l=t[3],u=Math.atan2(2*i*l-2*n*o,1-2*i*i-2*o*o),d=Math.asin(2*n*i+2*o*l),f=Math.atan2(2*n*l-2*i*o,1-2*n*n-2*o*o);e[0]=u/degToRads,e[1]=d/degToRads,e[2]=f/degToRads}function createQuaternion(e){var t=e[0]*degToRads,n=e[1]*degToRads,i=e[2]*degToRads,o=Math.cos(t/2),l=Math.cos(n/2),u=Math.cos(i/2),d=Math.sin(t/2),f=Math.sin(n/2),p=Math.sin(i/2);return[d*f*u+o*l*p,d*l*u+o*f*p,o*f*u-d*l*p,o*l*u-d*f*p]}function getValueAtCurrentTime(){var e=this.comp.renderedFrame-this.offsetTime,t=this.keyframes[0].t-this.offsetTime,n=this.keyframes[this.keyframes.length-1].t-this.offsetTime;if(!(e===this._caching.lastFrame||this._caching.lastFrame!==initFrame&&(this._caching.lastFrame>=n&&e>=n||this._caching.lastFrame<t&&e<t))){this._caching.lastFrame>=e&&(this._caching._lastKeyframeIndex=-1,this._caching.lastIndex=0);var i=this.interpolateValue(e,this._caching);this.pv=i}return this._caching.lastFrame=e,this.pv}function setVValue(e){var t;if(this.propType==="unidimensional")t=e*this.mult,mathAbs(this.v-t)>1e-5&&(this.v=t,this._mdf=!0);else for(var n=0,i=this.v.length;n<i;)t=e[n]*this.mult,mathAbs(this.v[n]-t)>1e-5&&(this.v[n]=t,this._mdf=!0),n+=1}function processEffectsSequence(){if(this.elem.globalData.frameId!==this.frameId&&this.effectsSequence.length)if(this.lock)this.setVValue(this.pv);else{var e;this.lock=!0,this._mdf=this._isFirstFrame;var t=this.effectsSequence.length,n=this.kf?this.pv:this.data.k;for(e=0;e<t;e+=1)n=this.effectsSequence[e](n);this.setVValue(n),this._isFirstFrame=!1,this.lock=!1,this.frameId=this.elem.globalData.frameId}}function addEffect(e){this.effectsSequence.push(e),this.container.addDynamicProperty(this)}function ValueProperty(e,t,n,i){this.propType="unidimensional",this.mult=n||1,this.data=t,this.v=n?t.k*n:t.k,this.pv=t.k,this._mdf=!1,this.elem=e,this.container=i,this.comp=e.comp,this.k=!1,this.kf=!1,this.vel=0,this.effectsSequence=[],this._isFirstFrame=!0,this.getValue=processEffectsSequence,this.setVValue=setVValue,this.addEffect=addEffect}function MultiDimensionalProperty(e,t,n,i){var o;this.propType="multidimensional",this.mult=n||1,this.data=t,this._mdf=!1,this.elem=e,this.container=i,this.comp=e.comp,this.k=!1,this.kf=!1,this.frameId=-1;var l=t.k.length;for(this.v=createTypedArray("float32",l),this.pv=createTypedArray("float32",l),this.vel=createTypedArray("float32",l),o=0;o<l;o+=1)this.v[o]=t.k[o]*this.mult,this.pv[o]=t.k[o];this._isFirstFrame=!0,this.effectsSequence=[],this.getValue=processEffectsSequence,this.setVValue=setVValue,this.addEffect=addEffect}function KeyframedValueProperty(e,t,n,i){this.propType="unidimensional",this.keyframes=t.k,this.keyframesMetadata=[],this.offsetTime=e.data.st,this.frameId=-1,this._caching={lastFrame:initFrame,lastIndex:0,value:0,_lastKeyframeIndex:-1},this.k=!0,this.kf=!0,this.data=t,this.mult=n||1,this.elem=e,this.container=i,this.comp=e.comp,this.v=initFrame,this.pv=initFrame,this._isFirstFrame=!0,this.getValue=processEffectsSequence,this.setVValue=setVValue,this.interpolateValue=interpolateValue,this.effectsSequence=[getValueAtCurrentTime.bind(this)],this.addEffect=addEffect}function KeyframedMultidimensionalProperty(e,t,n,i){var o;this.propType="multidimensional";var l,u,d,f,p=t.k.length;for(o=0;o<p-1;o+=1)t.k[o].to&&t.k[o].s&&t.k[o+1]&&t.k[o+1].s&&(l=t.k[o].s,u=t.k[o+1].s,d=t.k[o].to,f=t.k[o].ti,(l.length===2&&(l[0]!==u[0]||l[1]!==u[1])&&bez.pointOnLine2D(l[0],l[1],u[0],u[1],l[0]+d[0],l[1]+d[1])&&bez.pointOnLine2D(l[0],l[1],u[0],u[1],u[0]+f[0],u[1]+f[1])||l.length===3&&(l[0]!==u[0]||l[1]!==u[1]||l[2]!==u[2])&&bez.pointOnLine3D(l[0],l[1],l[2],u[0],u[1],u[2],l[0]+d[0],l[1]+d[1],l[2]+d[2])&&bez.pointOnLine3D(l[0],l[1],l[2],u[0],u[1],u[2],u[0]+f[0],u[1]+f[1],u[2]+f[2]))&&(t.k[o].to=null,t.k[o].ti=null),l[0]===u[0]&&l[1]===u[1]&&d[0]===0&&d[1]===0&&f[0]===0&&f[1]===0&&(l.length===2||l[2]===u[2]&&d[2]===0&&f[2]===0)&&(t.k[o].to=null,t.k[o].ti=null));this.effectsSequence=[getValueAtCurrentTime.bind(this)],this.data=t,this.keyframes=t.k,this.keyframesMetadata=[],this.offsetTime=e.data.st,this.k=!0,this.kf=!0,this._isFirstFrame=!0,this.mult=n||1,this.elem=e,this.container=i,this.comp=e.comp,this.getValue=processEffectsSequence,this.setVValue=setVValue,this.interpolateValue=interpolateValue,this.frameId=-1;var m=t.k[0].s.length;for(this.v=createTypedArray("float32",m),this.pv=createTypedArray("float32",m),o=0;o<m;o+=1)this.v[o]=initFrame,this.pv[o]=initFrame;this._caching={lastFrame:initFrame,lastIndex:0,value:createTypedArray("float32",m)},this.addEffect=addEffect}var PropertyFactory={getProp:function(e,t,n,i,o){var l;if(t.sid&&(t=e.globalData.slotManager.getProp(t)),t.k.length)if(typeof t.k[0]=="number")l=new MultiDimensionalProperty(e,t,i,o);else switch(n){case 0:l=new KeyframedValueProperty(e,t,i,o);break;case 1:l=new KeyframedMultidimensionalProperty(e,t,i,o)}else l=new ValueProperty(e,t,i,o);return l.effectsSequence.length&&o.addDynamicProperty(l),l}};function DynamicPropertyContainer(){}DynamicPropertyContainer.prototype={addDynamicProperty:function(e){this.dynamicProperties.indexOf(e)===-1&&(this.dynamicProperties.push(e),this.container.addDynamicProperty(this),this._isAnimated=!0)},iterateDynamicProperties:function(){var e;this._mdf=!1;var t=this.dynamicProperties.length;for(e=0;e<t;e+=1)this.dynamicProperties[e].getValue(),this.dynamicProperties[e]._mdf&&(this._mdf=!0)},initDynamicPropertyContainer:function(e){this.container=e,this.dynamicProperties=[],this._mdf=!1,this._isAnimated=!1}};var pointPool=poolFactory(8,function(){return createTypedArray("float32",2)});function ShapePath(){this.c=!1,this._length=0,this._maxLength=8,this.v=createSizedArray(this._maxLength),this.o=createSizedArray(this._maxLength),this.i=createSizedArray(this._maxLength)}ShapePath.prototype.setPathData=function(e,t){this.c=e,this.setLength(t);for(var n=0;n<t;)this.v[n]=pointPool.newElement(),this.o[n]=pointPool.newElement(),this.i[n]=pointPool.newElement(),n+=1},ShapePath.prototype.setLength=function(e){for(;this._maxLength<e;)this.doubleArrayLength();this._length=e},ShapePath.prototype.doubleArrayLength=function(){this.v=this.v.concat(createSizedArray(this._maxLength)),this.i=this.i.concat(createSizedArray(this._maxLength)),this.o=this.o.concat(createSizedArray(this._maxLength)),this._maxLength*=2},ShapePath.prototype.setXYAt=function(e,t,n,i,o){var l;switch(this._length=Math.max(this._length,i+1),this._length>=this._maxLength&&this.doubleArrayLength(),n){case"v":l=this.v;break;case"i":l=this.i;break;case"o":l=this.o;break;default:l=[]}(!l[i]||l[i]&&!o)&&(l[i]=pointPool.newElement()),l[i][0]=e,l[i][1]=t},ShapePath.prototype.setTripleAt=function(e,t,n,i,o,l,u,d){this.setXYAt(e,t,"v",u,d),this.setXYAt(n,i,"o",u,d),this.setXYAt(o,l,"i",u,d)},ShapePath.prototype.reverse=function(){var e=new ShapePath;e.setPathData(this.c,this._length);var t=this.v,n=this.o,i=this.i,o=0;this.c&&(e.setTripleAt(t[0][0],t[0][1],i[0][0],i[0][1],n[0][0],n[0][1],0,!1),o=1);var l,u=this._length-1,d=this._length;for(l=o;l<d;l+=1)e.setTripleAt(t[u][0],t[u][1],i[u][0],i[u][1],n[u][0],n[u][1],l,!1),u-=1;return e},ShapePath.prototype.length=function(){return this._length};var shapePool=(factory=poolFactory(4,function(){return new ShapePath},function(e){var t,n=e._length;for(t=0;t<n;t+=1)pointPool.release(e.v[t]),pointPool.release(e.i[t]),pointPool.release(e.o[t]),e.v[t]=null,e.i[t]=null,e.o[t]=null;e._length=0,e.c=!1}),factory.clone=function(e){var t,n=factory.newElement(),i=e._length===void 0?e.v.length:e._length;for(n.setLength(i),n.c=e.c,t=0;t<i;t+=1)n.setTripleAt(e.v[t][0],e.v[t][1],e.o[t][0],e.o[t][1],e.i[t][0],e.i[t][1],t);return n},factory),factory;function ShapeCollection(){this._length=0,this._maxLength=4,this.shapes=createSizedArray(this._maxLength)}ShapeCollection.prototype.addShape=function(e){this._length===this._maxLength&&(this.shapes=this.shapes.concat(createSizedArray(this._maxLength)),this._maxLength*=2),this.shapes[this._length]=e,this._length+=1},ShapeCollection.prototype.releaseShapes=function(){var e;for(e=0;e<this._length;e+=1)shapePool.release(this.shapes[e]);this._length=0};var shapeCollectionPool=(ob={newShapeCollection:function(){return _length?pool[_length-=1]:new ShapeCollection},release:function(e){var t,n=e._length;for(t=0;t<n;t+=1)shapePool.release(e.shapes[t]);e._length=0,_length===_maxLength&&(pool=pooling.double(pool),_maxLength*=2),pool[_length]=e,_length+=1}},_length=0,_maxLength=4,pool=createSizedArray(_maxLength),ob),ob,_length,_maxLength,pool,ShapePropertyFactory=function(){function e(b,_,R){var E,S,C,T,A,M,I,O,N,j=R.lastIndex,D=this.keyframes;if(b<D[0].t-this.offsetTime)E=D[0].s[0],C=!0,j=0;else if(b>=D[D.length-1].t-this.offsetTime)E=D[D.length-1].s?D[D.length-1].s[0]:D[D.length-2].e[0],C=!0;else{for(var F,L,B,V=j,H=D.length-1,z=!0;z&&(F=D[V],!((L=D[V+1]).t-this.offsetTime>b));)V<H-1?V+=1:z=!1;if(B=this.keyframesMetadata[V]||{},j=V,!(C=F.h===1)){if(b>=L.t-this.offsetTime)O=1;else if(b<F.t-this.offsetTime)O=0;else{var U;B.__fnct?U=B.__fnct:(U=BezierFactory.getBezierEasing(F.o.x,F.o.y,F.i.x,F.i.y).get,B.__fnct=U),O=U((b-(F.t-this.offsetTime))/(L.t-this.offsetTime-(F.t-this.offsetTime)))}S=L.s?L.s[0]:F.e[0]}E=F.s[0]}for(M=_._length,I=E.i[0].length,R.lastIndex=j,T=0;T<M;T+=1)for(A=0;A<I;A+=1)N=C?E.i[T][A]:E.i[T][A]+(S.i[T][A]-E.i[T][A])*O,_.i[T][A]=N,N=C?E.o[T][A]:E.o[T][A]+(S.o[T][A]-E.o[T][A])*O,_.o[T][A]=N,N=C?E.v[T][A]:E.v[T][A]+(S.v[T][A]-E.v[T][A])*O,_.v[T][A]=N}function t(){var b=this.comp.renderedFrame-this.offsetTime,_=this.keyframes[0].t-this.offsetTime,R=this.keyframes[this.keyframes.length-1].t-this.offsetTime,E=this._caching.lastFrame;return E!==-999999&&(E<_&&b<_||E>R&&b>R)||(this._caching.lastIndex=E<b?this._caching.lastIndex:0,this.interpolateShape(b,this.pv,this._caching)),this._caching.lastFrame=b,this.pv}function n(){this.paths=this.localShapeCollection}function i(b){(function(_,R){if(_._length!==R._length||_.c!==R.c)return!1;var E,S=_._length;for(E=0;E<S;E+=1)if(_.v[E][0]!==R.v[E][0]||_.v[E][1]!==R.v[E][1]||_.o[E][0]!==R.o[E][0]||_.o[E][1]!==R.o[E][1]||_.i[E][0]!==R.i[E][0]||_.i[E][1]!==R.i[E][1])return!1;return!0})(this.v,b)||(this.v=shapePool.clone(b),this.localShapeCollection.releaseShapes(),this.localShapeCollection.addShape(this.v),this._mdf=!0,this.paths=this.localShapeCollection)}function o(){if(this.elem.globalData.frameId!==this.frameId)if(this.effectsSequence.length)if(this.lock)this.setVValue(this.pv);else{var b,_;this.lock=!0,this._mdf=!1,b=this.kf?this.pv:this.data.ks?this.data.ks.k:this.data.pt.k;var R=this.effectsSequence.length;for(_=0;_<R;_+=1)b=this.effectsSequence[_](b);this.setVValue(b),this.lock=!1,this.frameId=this.elem.globalData.frameId}else this._mdf=!1}function l(b,_,R){this.propType="shape",this.comp=b.comp,this.container=b,this.elem=b,this.data=_,this.k=!1,this.kf=!1,this._mdf=!1;var E=R===3?_.pt.k:_.ks.k;this.v=shapePool.clone(E),this.pv=shapePool.clone(this.v),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.paths=this.localShapeCollection,this.paths.addShape(this.v),this.reset=n,this.effectsSequence=[]}function u(b){this.effectsSequence.push(b),this.container.addDynamicProperty(this)}function d(b,_,R){this.propType="shape",this.comp=b.comp,this.elem=b,this.container=b,this.offsetTime=b.data.st,this.keyframes=R===3?_.pt.k:_.ks.k,this.keyframesMetadata=[],this.k=!0,this.kf=!0;var E=this.keyframes[0].s[0].i.length;this.v=shapePool.newElement(),this.v.setPathData(this.keyframes[0].s[0].c,E),this.pv=shapePool.clone(this.v),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.paths=this.localShapeCollection,this.paths.addShape(this.v),this.lastFrame=-999999,this.reset=n,this._caching={lastFrame:-999999,lastIndex:0},this.effectsSequence=[t.bind(this)]}l.prototype.interpolateShape=e,l.prototype.getValue=o,l.prototype.setVValue=i,l.prototype.addEffect=u,d.prototype.getValue=o,d.prototype.interpolateShape=e,d.prototype.setVValue=i,d.prototype.addEffect=u;var f=function(){var b=roundCorner;function _(R,E){this.v=shapePool.newElement(),this.v.setPathData(!0,4),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.paths=this.localShapeCollection,this.localShapeCollection.addShape(this.v),this.d=E.d,this.elem=R,this.comp=R.comp,this.frameId=-1,this.initDynamicPropertyContainer(R),this.p=PropertyFactory.getProp(R,E.p,1,0,this),this.s=PropertyFactory.getProp(R,E.s,1,0,this),this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertEllToPath())}return _.prototype={reset:n,getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertEllToPath())},convertEllToPath:function(){var R=this.p.v[0],E=this.p.v[1],S=this.s.v[0]/2,C=this.s.v[1]/2,T=this.d!==3,A=this.v;A.v[0][0]=R,A.v[0][1]=E-C,A.v[1][0]=T?R+S:R-S,A.v[1][1]=E,A.v[2][0]=R,A.v[2][1]=E+C,A.v[3][0]=T?R-S:R+S,A.v[3][1]=E,A.i[0][0]=T?R-S*b:R+S*b,A.i[0][1]=E-C,A.i[1][0]=T?R+S:R-S,A.i[1][1]=E-C*b,A.i[2][0]=T?R+S*b:R-S*b,A.i[2][1]=E+C,A.i[3][0]=T?R-S:R+S,A.i[3][1]=E+C*b,A.o[0][0]=T?R+S*b:R-S*b,A.o[0][1]=E-C,A.o[1][0]=T?R+S:R-S,A.o[1][1]=E+C*b,A.o[2][0]=T?R-S*b:R+S*b,A.o[2][1]=E+C,A.o[3][0]=T?R-S:R+S,A.o[3][1]=E-C*b}},extendPrototype([DynamicPropertyContainer],_),_}(),p=function(){function b(_,R){this.v=shapePool.newElement(),this.v.setPathData(!0,0),this.elem=_,this.comp=_.comp,this.data=R,this.frameId=-1,this.d=R.d,this.initDynamicPropertyContainer(_),R.sy===1?(this.ir=PropertyFactory.getProp(_,R.ir,0,0,this),this.is=PropertyFactory.getProp(_,R.is,0,.01,this),this.convertToPath=this.convertStarToPath):this.convertToPath=this.convertPolygonToPath,this.pt=PropertyFactory.getProp(_,R.pt,0,0,this),this.p=PropertyFactory.getProp(_,R.p,1,0,this),this.r=PropertyFactory.getProp(_,R.r,0,degToRads,this),this.or=PropertyFactory.getProp(_,R.or,0,0,this),this.os=PropertyFactory.getProp(_,R.os,0,.01,this),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.localShapeCollection.addShape(this.v),this.paths=this.localShapeCollection,this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertToPath())}return b.prototype={reset:n,getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertToPath())},convertStarToPath:function(){var _,R,E,S,C=2*Math.floor(this.pt.v),T=2*Math.PI/C,A=!0,M=this.or.v,I=this.ir.v,O=this.os.v,N=this.is.v,j=2*Math.PI*M/(2*C),D=2*Math.PI*I/(2*C),F=-Math.PI/2;F+=this.r.v;var L=this.data.d===3?-1:1;for(this.v._length=0,_=0;_<C;_+=1){E=A?O:N,S=A?j:D;var B=(R=A?M:I)*Math.cos(F),V=R*Math.sin(F),H=B===0&&V===0?0:V/Math.sqrt(B*B+V*V),z=B===0&&V===0?0:-B/Math.sqrt(B*B+V*V);B+=+this.p.v[0],V+=+this.p.v[1],this.v.setTripleAt(B,V,B-H*S*E*L,V-z*S*E*L,B+H*S*E*L,V+z*S*E*L,_,!0),A=!A,F+=T*L}},convertPolygonToPath:function(){var _,R=Math.floor(this.pt.v),E=2*Math.PI/R,S=this.or.v,C=this.os.v,T=2*Math.PI*S/(4*R),A=.5*-Math.PI,M=this.data.d===3?-1:1;for(A+=this.r.v,this.v._length=0,_=0;_<R;_+=1){var I=S*Math.cos(A),O=S*Math.sin(A),N=I===0&&O===0?0:O/Math.sqrt(I*I+O*O),j=I===0&&O===0?0:-I/Math.sqrt(I*I+O*O);I+=+this.p.v[0],O+=+this.p.v[1],this.v.setTripleAt(I,O,I-N*T*C*M,O-j*T*C*M,I+N*T*C*M,O+j*T*C*M,_,!0),A+=E*M}this.paths.length=0,this.paths[0]=this.v}},extendPrototype([DynamicPropertyContainer],b),b}(),m=function(){function b(_,R){this.v=shapePool.newElement(),this.v.c=!0,this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.localShapeCollection.addShape(this.v),this.paths=this.localShapeCollection,this.elem=_,this.comp=_.comp,this.frameId=-1,this.d=R.d,this.initDynamicPropertyContainer(_),this.p=PropertyFactory.getProp(_,R.p,1,0,this),this.s=PropertyFactory.getProp(_,R.s,1,0,this),this.r=PropertyFactory.getProp(_,R.r,0,0,this),this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertRectToPath())}return b.prototype={convertRectToPath:function(){var _=this.p.v[0],R=this.p.v[1],E=this.s.v[0]/2,S=this.s.v[1]/2,C=bmMin(E,S,this.r.v),T=C*(1-roundCorner);this.v._length=0,this.d===2||this.d===1?(this.v.setTripleAt(_+E,R-S+C,_+E,R-S+C,_+E,R-S+T,0,!0),this.v.setTripleAt(_+E,R+S-C,_+E,R+S-T,_+E,R+S-C,1,!0),C!==0?(this.v.setTripleAt(_+E-C,R+S,_+E-C,R+S,_+E-T,R+S,2,!0),this.v.setTripleAt(_-E+C,R+S,_-E+T,R+S,_-E+C,R+S,3,!0),this.v.setTripleAt(_-E,R+S-C,_-E,R+S-C,_-E,R+S-T,4,!0),this.v.setTripleAt(_-E,R-S+C,_-E,R-S+T,_-E,R-S+C,5,!0),this.v.setTripleAt(_-E+C,R-S,_-E+C,R-S,_-E+T,R-S,6,!0),this.v.setTripleAt(_+E-C,R-S,_+E-T,R-S,_+E-C,R-S,7,!0)):(this.v.setTripleAt(_-E,R+S,_-E+T,R+S,_-E,R+S,2),this.v.setTripleAt(_-E,R-S,_-E,R-S+T,_-E,R-S,3))):(this.v.setTripleAt(_+E,R-S+C,_+E,R-S+T,_+E,R-S+C,0,!0),C!==0?(this.v.setTripleAt(_+E-C,R-S,_+E-C,R-S,_+E-T,R-S,1,!0),this.v.setTripleAt(_-E+C,R-S,_-E+T,R-S,_-E+C,R-S,2,!0),this.v.setTripleAt(_-E,R-S+C,_-E,R-S+C,_-E,R-S+T,3,!0),this.v.setTripleAt(_-E,R+S-C,_-E,R+S-T,_-E,R+S-C,4,!0),this.v.setTripleAt(_-E+C,R+S,_-E+C,R+S,_-E+T,R+S,5,!0),this.v.setTripleAt(_+E-C,R+S,_+E-T,R+S,_+E-C,R+S,6,!0),this.v.setTripleAt(_+E,R+S-C,_+E,R+S-C,_+E,R+S-T,7,!0)):(this.v.setTripleAt(_-E,R-S,_-E+T,R-S,_-E,R-S,1,!0),this.v.setTripleAt(_-E,R+S,_-E,R+S-T,_-E,R+S,2,!0),this.v.setTripleAt(_+E,R+S,_+E-T,R+S,_+E,R+S,3,!0)))},getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertRectToPath())},reset:n},extendPrototype([DynamicPropertyContainer],b),b}(),g={getShapeProp:function(b,_,R){var E;return R===3||R===4?E=(R===3?_.pt:_.ks).k.length?new d(b,_,R):new l(b,_,R):R===5?E=new m(b,_):R===6?E=new f(b,_):R===7&&(E=new p(b,_)),E.k&&b.addDynamicProperty(E),E},getConstructorFunction:function(){return l},getKeyframedConstructorFunction:function(){return d}};return g}(),Matrix=function(){var e=Math.cos,t=Math.sin,n=Math.tan,i=Math.round;function o(){return this.props[0]=1,this.props[1]=0,this.props[2]=0,this.props[3]=0,this.props[4]=0,this.props[5]=1,this.props[6]=0,this.props[7]=0,this.props[8]=0,this.props[9]=0,this.props[10]=1,this.props[11]=0,this.props[12]=0,this.props[13]=0,this.props[14]=0,this.props[15]=1,this}function l(q){if(q===0)return this;var W=e(q),G=t(q);return this._t(W,-G,0,0,G,W,0,0,0,0,1,0,0,0,0,1)}function u(q){if(q===0)return this;var W=e(q),G=t(q);return this._t(1,0,0,0,0,W,-G,0,0,G,W,0,0,0,0,1)}function d(q){if(q===0)return this;var W=e(q),G=t(q);return this._t(W,0,G,0,0,1,0,0,-G,0,W,0,0,0,0,1)}function f(q){if(q===0)return this;var W=e(q),G=t(q);return this._t(W,-G,0,0,G,W,0,0,0,0,1,0,0,0,0,1)}function p(q,W){return this._t(1,W,q,1,0,0)}function m(q,W){return this.shear(n(q),n(W))}function g(q,W){var G=e(W),K=t(W);return this._t(G,K,0,0,-K,G,0,0,0,0,1,0,0,0,0,1)._t(1,0,0,0,n(q),1,0,0,0,0,1,0,0,0,0,1)._t(G,-K,0,0,K,G,0,0,0,0,1,0,0,0,0,1)}function b(q,W,G){return G||G===0||(G=1),q===1&&W===1&&G===1?this:this._t(q,0,0,0,0,W,0,0,0,0,G,0,0,0,0,1)}function _(q,W,G,K,J,ee,ne,ae,oe,se,ce,ie,ue,le,Z,fe){return this.props[0]=q,this.props[1]=W,this.props[2]=G,this.props[3]=K,this.props[4]=J,this.props[5]=ee,this.props[6]=ne,this.props[7]=ae,this.props[8]=oe,this.props[9]=se,this.props[10]=ce,this.props[11]=ie,this.props[12]=ue,this.props[13]=le,this.props[14]=Z,this.props[15]=fe,this}function R(q,W,G){return G=G||0,q!==0||W!==0||G!==0?this._t(1,0,0,0,0,1,0,0,0,0,1,0,q,W,G,1):this}function E(q,W,G,K,J,ee,ne,ae,oe,se,ce,ie,ue,le,Z,fe){var te=this.props;if(q===1&&W===0&&G===0&&K===0&&J===0&&ee===1&&ne===0&&ae===0&&oe===0&&se===0&&ce===1&&ie===0)return te[12]=te[12]*q+te[15]*ue,te[13]=te[13]*ee+te[15]*le,te[14]=te[14]*ce+te[15]*Z,te[15]*=fe,this._identityCalculated=!1,this;var de=te[0],pe=te[1],me=te[2],ye=te[3],he=te[4],ge=te[5],Se=te[6],ve=te[7],_e=te[8],xe=te[9],be=te[10],Re=te[11],Pe=te[12],Ee=te[13],we=te[14],Te=te[15];return te[0]=de*q+pe*J+me*oe+ye*ue,te[1]=de*W+pe*ee+me*se+ye*le,te[2]=de*G+pe*ne+me*ce+ye*Z,te[3]=de*K+pe*ae+me*ie+ye*fe,te[4]=he*q+ge*J+Se*oe+ve*ue,te[5]=he*W+ge*ee+Se*se+ve*le,te[6]=he*G+ge*ne+Se*ce+ve*Z,te[7]=he*K+ge*ae+Se*ie+ve*fe,te[8]=_e*q+xe*J+be*oe+Re*ue,te[9]=_e*W+xe*ee+be*se+Re*le,te[10]=_e*G+xe*ne+be*ce+Re*Z,te[11]=_e*K+xe*ae+be*ie+Re*fe,te[12]=Pe*q+Ee*J+we*oe+Te*ue,te[13]=Pe*W+Ee*ee+we*se+Te*le,te[14]=Pe*G+Ee*ne+we*ce+Te*Z,te[15]=Pe*K+Ee*ae+we*ie+Te*fe,this._identityCalculated=!1,this}function S(q){var W=q.props;return this.transform(W[0],W[1],W[2],W[3],W[4],W[5],W[6],W[7],W[8],W[9],W[10],W[11],W[12],W[13],W[14],W[15])}function C(){return this._identityCalculated||(this._identity=!(this.props[0]!==1||this.props[1]!==0||this.props[2]!==0||this.props[3]!==0||this.props[4]!==0||this.props[5]!==1||this.props[6]!==0||this.props[7]!==0||this.props[8]!==0||this.props[9]!==0||this.props[10]!==1||this.props[11]!==0||this.props[12]!==0||this.props[13]!==0||this.props[14]!==0||this.props[15]!==1),this._identityCalculated=!0),this._identity}function T(q){for(var W=0;W<16;){if(q.props[W]!==this.props[W])return!1;W+=1}return!0}function A(q){var W;for(W=0;W<16;W+=1)q.props[W]=this.props[W];return q}function M(q){var W;for(W=0;W<16;W+=1)this.props[W]=q[W]}function I(q,W,G){return{x:q*this.props[0]+W*this.props[4]+G*this.props[8]+this.props[12],y:q*this.props[1]+W*this.props[5]+G*this.props[9]+this.props[13],z:q*this.props[2]+W*this.props[6]+G*this.props[10]+this.props[14]}}function O(q,W,G){return q*this.props[0]+W*this.props[4]+G*this.props[8]+this.props[12]}function N(q,W,G){return q*this.props[1]+W*this.props[5]+G*this.props[9]+this.props[13]}function j(q,W,G){return q*this.props[2]+W*this.props[6]+G*this.props[10]+this.props[14]}function D(){var q=this.props[0]*this.props[5]-this.props[1]*this.props[4],W=this.props[5]/q,G=-this.props[1]/q,K=-this.props[4]/q,J=this.props[0]/q,ee=(this.props[4]*this.props[13]-this.props[5]*this.props[12])/q,ne=-(this.props[0]*this.props[13]-this.props[1]*this.props[12])/q,ae=new Matrix;return ae.props[0]=W,ae.props[1]=G,ae.props[4]=K,ae.props[5]=J,ae.props[12]=ee,ae.props[13]=ne,ae}function F(q){return this.getInverseMatrix().applyToPointArray(q[0],q[1],q[2]||0)}function L(q){var W,G=q.length,K=[];for(W=0;W<G;W+=1)K[W]=F(q[W]);return K}function B(q,W,G){var K=createTypedArray("float32",6);if(this.isIdentity())K[0]=q[0],K[1]=q[1],K[2]=W[0],K[3]=W[1],K[4]=G[0],K[5]=G[1];else{var J=this.props[0],ee=this.props[1],ne=this.props[4],ae=this.props[5],oe=this.props[12],se=this.props[13];K[0]=q[0]*J+q[1]*ne+oe,K[1]=q[0]*ee+q[1]*ae+se,K[2]=W[0]*J+W[1]*ne+oe,K[3]=W[0]*ee+W[1]*ae+se,K[4]=G[0]*J+G[1]*ne+oe,K[5]=G[0]*ee+G[1]*ae+se}return K}function V(q,W,G){return this.isIdentity()?[q,W,G]:[q*this.props[0]+W*this.props[4]+G*this.props[8]+this.props[12],q*this.props[1]+W*this.props[5]+G*this.props[9]+this.props[13],q*this.props[2]+W*this.props[6]+G*this.props[10]+this.props[14]]}function H(q,W){if(this.isIdentity())return q+","+W;var G=this.props;return Math.round(100*(q*G[0]+W*G[4]+G[12]))/100+","+Math.round(100*(q*G[1]+W*G[5]+G[13]))/100}function z(){for(var q=0,W=this.props,G="matrix3d(";q<16;)G+=i(1e4*W[q])/1e4,G+=q===15?")":",",q+=1;return G}function U(q){return q<1e-6&&q>0||q>-1e-6&&q<0?i(1e4*q)/1e4:q}function Q(){var q=this.props;return"matrix("+U(q[0])+","+U(q[1])+","+U(q[4])+","+U(q[5])+","+U(q[12])+","+U(q[13])+")"}return function(){this.reset=o,this.rotate=l,this.rotateX=u,this.rotateY=d,this.rotateZ=f,this.skew=m,this.skewFromAxis=g,this.shear=p,this.scale=b,this.setTransform=_,this.translate=R,this.transform=E,this.multiply=S,this.applyToPoint=I,this.applyToX=O,this.applyToY=N,this.applyToZ=j,this.applyToPointArray=V,this.applyToTriplePoints=B,this.applyToPointStringified=H,this.toCSS=z,this.to2dCSS=Q,this.clone=A,this.cloneFromProps=M,this.equals=T,this.inversePoints=L,this.inversePoint=F,this.getInverseMatrix=D,this._t=this.transform,this.isIdentity=C,this._identity=!0,this._identityCalculated=!1,this.props=createTypedArray("float32",16),this.reset()}}();function _typeof$3(e){return(_typeof$3=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}var lottie={};function setLocation(e){setLocationHref(e)}function searchAnimations(){animationManager.searchAnimations()}function setSubframeRendering(e){setSubframeEnabled(e)}function setPrefix(e){setIdPrefix(e)}function loadAnimation(e){return animationManager.loadAnimation(e)}function setQuality(e){if(typeof e=="string")switch(e){case"high":setDefaultCurveSegments(200);break;default:case"medium":setDefaultCurveSegments(50);break;case"low":setDefaultCurveSegments(10)}else!isNaN(e)&&e>1&&setDefaultCurveSegments(e)}function inBrowser(){return typeof navigator<"u"}function installPlugin(e,t){e==="expressions"&&setExpressionsPlugin(t)}function getFactory(e){switch(e){case"propertyFactory":return PropertyFactory;case"shapePropertyFactory":return ShapePropertyFactory;case"matrix":return Matrix;default:return null}}function checkReady(){document.readyState==="complete"&&(clearInterval(readyStateCheckInterval),searchAnimations())}function getQueryVariable(e){for(var t=queryString.split("&"),n=0;n<t.length;n+=1){var i=t[n].split("=");if(decodeURIComponent(i[0])==e)return decodeURIComponent(i[1])}return null}lottie.play=animationManager.play,lottie.pause=animationManager.pause,lottie.setLocationHref=setLocation,lottie.togglePause=animationManager.togglePause,lottie.setSpeed=animationManager.setSpeed,lottie.setDirection=animationManager.setDirection,lottie.stop=animationManager.stop,lottie.searchAnimations=searchAnimations,lottie.registerAnimation=animationManager.registerAnimation,lottie.loadAnimation=loadAnimation,lottie.setSubframeRendering=setSubframeRendering,lottie.resize=animationManager.resize,lottie.goToAndStop=animationManager.goToAndStop,lottie.destroy=animationManager.destroy,lottie.setQuality=setQuality,lottie.inBrowser=inBrowser,lottie.installPlugin=installPlugin,lottie.freeze=animationManager.freeze,lottie.unfreeze=animationManager.unfreeze,lottie.setVolume=animationManager.setVolume,lottie.mute=animationManager.mute,lottie.unmute=animationManager.unmute,lottie.getRegisteredAnimations=animationManager.getRegisteredAnimations,lottie.useWebWorker=setWebWorker,lottie.setIDPrefix=setPrefix,lottie.__getFactory=getFactory,lottie.version="5.12.2";var queryString="";{var scripts=document.getElementsByTagName("script"),index=scripts.length-1,myScript=scripts[index]||{src:""};queryString=myScript.src?myScript.src.replace(/^[^\?]+\??/,""):"",getQueryVariable("renderer")}var readyStateCheckInterval=setInterval(checkReady,100);try{_typeof$3(exports)!=="object"&&(window.bodymovin=lottie)}catch(e){}var ShapeModifiers=function(){var e={},t={};return e.registerModifier=function(n,i){t[n]||(t[n]=i)},e.getModifier=function(n,i,o){return new t[n](i,o)},e}();function ShapeModifier(){}function TrimModifier(){}function PuckerAndBloatModifier(){}ShapeModifier.prototype.initModifierProperties=function(){},ShapeModifier.prototype.addShapeToModifier=function(){},ShapeModifier.prototype.addShape=function(e){if(!this.closed){e.sh.container.addDynamicProperty(e.sh);var t={shape:e.sh,data:e,localShapeCollection:shapeCollectionPool.newShapeCollection()};this.shapes.push(t),this.addShapeToModifier(t),this._isAnimated&&e.setAsAnimated()}},ShapeModifier.prototype.init=function(e,t){this.shapes=[],this.elem=e,this.initDynamicPropertyContainer(e),this.initModifierProperties(e,t),this.frameId=initialDefaultFrame,this.closed=!1,this.k=!1,this.dynamicProperties.length?this.k=!0:this.getValue(!0)},ShapeModifier.prototype.processKeys=function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties())},extendPrototype([DynamicPropertyContainer],ShapeModifier),extendPrototype([ShapeModifier],TrimModifier),TrimModifier.prototype.initModifierProperties=function(e,t){this.s=PropertyFactory.getProp(e,t.s,0,.01,this),this.e=PropertyFactory.getProp(e,t.e,0,.01,this),this.o=PropertyFactory.getProp(e,t.o,0,0,this),this.sValue=0,this.eValue=0,this.getValue=this.processKeys,this.m=t.m,this._isAnimated=!!this.s.effectsSequence.length||!!this.e.effectsSequence.length||!!this.o.effectsSequence.length},TrimModifier.prototype.addShapeToModifier=function(e){e.pathsData=[]},TrimModifier.prototype.calculateShapeEdges=function(e,t,n,i,o){var l=[];t<=1?l.push({s:e,e:t}):e>=1?l.push({s:e-1,e:t-1}):(l.push({s:e,e:1}),l.push({s:0,e:t-1}));var u,d,f=[],p=l.length;for(u=0;u<p;u+=1){var m,g;(d=l[u]).e*o<i||d.s*o>i+n||(m=d.s*o<=i?0:(d.s*o-i)/n,g=d.e*o>=i+n?1:(d.e*o-i)/n,f.push([m,g]))}return f.length||f.push([0,0]),f},TrimModifier.prototype.releasePathsData=function(e){var t,n=e.length;for(t=0;t<n;t+=1)segmentsLengthPool.release(e[t]);return e.length=0,e},TrimModifier.prototype.processShapes=function(e){var t,n,i,o;if(this._mdf||e){var l=this.o.v%360/360;if(l<0&&(l+=1),(t=this.s.v>1?1+l:this.s.v<0?0+l:this.s.v+l)>(n=this.e.v>1?1+l:this.e.v<0?0+l:this.e.v+l)){var u=t;t=n,n=u}t=1e-4*Math.round(1e4*t),n=1e-4*Math.round(1e4*n),this.sValue=t,this.eValue=n}else t=this.sValue,n=this.eValue;var d,f,p,m,g,b=this.shapes.length,_=0;if(n===t)for(o=0;o<b;o+=1)this.shapes[o].localShapeCollection.releaseShapes(),this.shapes[o].shape._mdf=!0,this.shapes[o].shape.paths=this.shapes[o].localShapeCollection,this._mdf&&(this.shapes[o].pathsData.length=0);else if(n===1&&t===0||n===0&&t===1){if(this._mdf)for(o=0;o<b;o+=1)this.shapes[o].pathsData.length=0,this.shapes[o].shape._mdf=!0}else{var R,E,S=[];for(o=0;o<b;o+=1)if((R=this.shapes[o]).shape._mdf||this._mdf||e||this.m===2){if(f=(i=R.shape.paths)._length,g=0,!R.shape._mdf&&R.pathsData.length)g=R.totalShapeLength;else{for(p=this.releasePathsData(R.pathsData),d=0;d<f;d+=1)m=bez.getSegmentsLength(i.shapes[d]),p.push(m),g+=m.totalLength;R.totalShapeLength=g,R.pathsData=p}_+=g,R.shape._mdf=!0}else R.shape.paths=R.localShapeCollection;var C,T=t,A=n,M=0;for(o=b-1;o>=0;o-=1)if((R=this.shapes[o]).shape._mdf){for((E=R.localShapeCollection).releaseShapes(),this.m===2&&b>1?(C=this.calculateShapeEdges(t,n,R.totalShapeLength,M,_),M+=R.totalShapeLength):C=[[T,A]],f=C.length,d=0;d<f;d+=1){T=C[d][0],A=C[d][1],S.length=0,A<=1?S.push({s:R.totalShapeLength*T,e:R.totalShapeLength*A}):T>=1?S.push({s:R.totalShapeLength*(T-1),e:R.totalShapeLength*(A-1)}):(S.push({s:R.totalShapeLength*T,e:R.totalShapeLength}),S.push({s:0,e:R.totalShapeLength*(A-1)}));var I=this.addShapes(R,S[0]);if(S[0].s!==S[0].e){if(S.length>1)if(R.shape.paths.shapes[R.shape.paths._length-1].c){var O=I.pop();this.addPaths(I,E),I=this.addShapes(R,S[1],O)}else this.addPaths(I,E),I=this.addShapes(R,S[1]);this.addPaths(I,E)}}R.shape.paths=E}}},TrimModifier.prototype.addPaths=function(e,t){var n,i=e.length;for(n=0;n<i;n+=1)t.addShape(e[n])},TrimModifier.prototype.addSegment=function(e,t,n,i,o,l,u){o.setXYAt(t[0],t[1],"o",l),o.setXYAt(n[0],n[1],"i",l+1),u&&o.setXYAt(e[0],e[1],"v",l),o.setXYAt(i[0],i[1],"v",l+1)},TrimModifier.prototype.addSegmentFromArray=function(e,t,n,i){t.setXYAt(e[1],e[5],"o",n),t.setXYAt(e[2],e[6],"i",n+1),i&&t.setXYAt(e[0],e[4],"v",n),t.setXYAt(e[3],e[7],"v",n+1)},TrimModifier.prototype.addShapes=function(e,t,n){var i,o,l,u,d,f,p,m,g=e.pathsData,b=e.shape.paths.shapes,_=e.shape.paths._length,R=0,E=[],S=!0;for(n?(d=n._length,m=n._length):(n=shapePool.newElement(),d=0,m=0),E.push(n),i=0;i<_;i+=1){for(f=g[i].lengths,n.c=b[i].c,l=b[i].c?f.length:f.length+1,o=1;o<l;o+=1)if(R+(u=f[o-1]).addedLength<t.s)R+=u.addedLength,n.c=!1;else{if(R>t.e){n.c=!1;break}t.s<=R&&t.e>=R+u.addedLength?(this.addSegment(b[i].v[o-1],b[i].o[o-1],b[i].i[o],b[i].v[o],n,d,S),S=!1):(p=bez.getNewSegment(b[i].v[o-1],b[i].v[o],b[i].o[o-1],b[i].i[o],(t.s-R)/u.addedLength,(t.e-R)/u.addedLength,f[o-1]),this.addSegmentFromArray(p,n,d,S),S=!1,n.c=!1),R+=u.addedLength,d+=1}if(b[i].c&&f.length){if(u=f[o-1],R<=t.e){var C=f[o-1].addedLength;t.s<=R&&t.e>=R+C?(this.addSegment(b[i].v[o-1],b[i].o[o-1],b[i].i[0],b[i].v[0],n,d,S),S=!1):(p=bez.getNewSegment(b[i].v[o-1],b[i].v[0],b[i].o[o-1],b[i].i[0],(t.s-R)/C,(t.e-R)/C,f[o-1]),this.addSegmentFromArray(p,n,d,S),S=!1,n.c=!1)}else n.c=!1;R+=u.addedLength,d+=1}if(n._length&&(n.setXYAt(n.v[m][0],n.v[m][1],"i",m),n.setXYAt(n.v[n._length-1][0],n.v[n._length-1][1],"o",n._length-1)),R>t.e)break;i<_-1&&(n=shapePool.newElement(),S=!0,E.push(n),d=0)}return E},extendPrototype([ShapeModifier],PuckerAndBloatModifier),PuckerAndBloatModifier.prototype.initModifierProperties=function(e,t){this.getValue=this.processKeys,this.amount=PropertyFactory.getProp(e,t.a,0,null,this),this._isAnimated=!!this.amount.effectsSequence.length},PuckerAndBloatModifier.prototype.processPath=function(e,t){var n=t/100,i=[0,0],o=e._length,l=0;for(l=0;l<o;l+=1)i[0]+=e.v[l][0],i[1]+=e.v[l][1];i[0]/=o,i[1]/=o;var u,d,f,p,m,g,b=shapePool.newElement();for(b.c=e.c,l=0;l<o;l+=1)u=e.v[l][0]+(i[0]-e.v[l][0])*n,d=e.v[l][1]+(i[1]-e.v[l][1])*n,f=e.o[l][0]+(i[0]-e.o[l][0])*-n,p=e.o[l][1]+(i[1]-e.o[l][1])*-n,m=e.i[l][0]+(i[0]-e.i[l][0])*-n,g=e.i[l][1]+(i[1]-e.i[l][1])*-n,b.setTripleAt(u,d,f,p,m,g,l);return b},PuckerAndBloatModifier.prototype.processShapes=function(e){var t,n,i,o,l,u,d=this.shapes.length,f=this.amount.v;if(f!==0)for(n=0;n<d;n+=1){if(u=(l=this.shapes[n]).localShapeCollection,l.shape._mdf||this._mdf||e)for(u.releaseShapes(),l.shape._mdf=!0,t=l.shape.paths.shapes,o=l.shape.paths._length,i=0;i<o;i+=1)u.addShape(this.processPath(t[i],f));l.shape.paths=l.localShapeCollection}this.dynamicProperties.length||(this._mdf=!1)};var TransformPropertyFactory=function(){var e=[0,0];function t(n,i,o){if(this.elem=n,this.frameId=-1,this.propType="transform",this.data=i,this.v=new Matrix,this.pre=new Matrix,this.appliedTransformations=0,this.initDynamicPropertyContainer(o||n),i.p&&i.p.s?(this.px=PropertyFactory.getProp(n,i.p.x,0,0,this),this.py=PropertyFactory.getProp(n,i.p.y,0,0,this),i.p.z&&(this.pz=PropertyFactory.getProp(n,i.p.z,0,0,this))):this.p=PropertyFactory.getProp(n,i.p||{k:[0,0,0]},1,0,this),i.rx){if(this.rx=PropertyFactory.getProp(n,i.rx,0,degToRads,this),this.ry=PropertyFactory.getProp(n,i.ry,0,degToRads,this),this.rz=PropertyFactory.getProp(n,i.rz,0,degToRads,this),i.or.k[0].ti){var l,u=i.or.k.length;for(l=0;l<u;l+=1)i.or.k[l].to=null,i.or.k[l].ti=null}this.or=PropertyFactory.getProp(n,i.or,1,degToRads,this),this.or.sh=!0}else this.r=PropertyFactory.getProp(n,i.r||{k:0},0,degToRads,this);i.sk&&(this.sk=PropertyFactory.getProp(n,i.sk,0,degToRads,this),this.sa=PropertyFactory.getProp(n,i.sa,0,degToRads,this)),this.a=PropertyFactory.getProp(n,i.a||{k:[0,0,0]},1,0,this),this.s=PropertyFactory.getProp(n,i.s||{k:[100,100,100]},1,.01,this),i.o?this.o=PropertyFactory.getProp(n,i.o,0,.01,n):this.o={_mdf:!1,v:1},this._isDirty=!0,this.dynamicProperties.length||this.getValue(!0)}return t.prototype={applyToMatrix:function(n){var i=this._mdf;this.iterateDynamicProperties(),this._mdf=this._mdf||i,this.a&&n.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.s&&n.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.sk&&n.skewFromAxis(-this.sk.v,this.sa.v),this.r?n.rotate(-this.r.v):n.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]),this.data.p.s?this.data.p.z?n.translate(this.px.v,this.py.v,-this.pz.v):n.translate(this.px.v,this.py.v,0):n.translate(this.p.v[0],this.p.v[1],-this.p.v[2])},getValue:function(n){if(this.elem.globalData.frameId!==this.frameId){if(this._isDirty&&(this.precalculateMatrix(),this._isDirty=!1),this.iterateDynamicProperties(),this._mdf||n){var i;if(this.v.cloneFromProps(this.pre.props),this.appliedTransformations<1&&this.v.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.appliedTransformations<2&&this.v.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.sk&&this.appliedTransformations<3&&this.v.skewFromAxis(-this.sk.v,this.sa.v),this.r&&this.appliedTransformations<4?this.v.rotate(-this.r.v):!this.r&&this.appliedTransformations<4&&this.v.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]),this.autoOriented){var o,l;if(i=this.elem.globalData.frameRate,this.p&&this.p.keyframes&&this.p.getValueAtTime)this.p._caching.lastFrame+this.p.offsetTime<=this.p.keyframes[0].t?(o=this.p.getValueAtTime((this.p.keyframes[0].t+.01)/i,0),l=this.p.getValueAtTime(this.p.keyframes[0].t/i,0)):this.p._caching.lastFrame+this.p.offsetTime>=this.p.keyframes[this.p.keyframes.length-1].t?(o=this.p.getValueAtTime(this.p.keyframes[this.p.keyframes.length-1].t/i,0),l=this.p.getValueAtTime((this.p.keyframes[this.p.keyframes.length-1].t-.05)/i,0)):(o=this.p.pv,l=this.p.getValueAtTime((this.p._caching.lastFrame+this.p.offsetTime-.01)/i,this.p.offsetTime));else if(this.px&&this.px.keyframes&&this.py.keyframes&&this.px.getValueAtTime&&this.py.getValueAtTime){o=[],l=[];var u=this.px,d=this.py;u._caching.lastFrame+u.offsetTime<=u.keyframes[0].t?(o[0]=u.getValueAtTime((u.keyframes[0].t+.01)/i,0),o[1]=d.getValueAtTime((d.keyframes[0].t+.01)/i,0),l[0]=u.getValueAtTime(u.keyframes[0].t/i,0),l[1]=d.getValueAtTime(d.keyframes[0].t/i,0)):u._caching.lastFrame+u.offsetTime>=u.keyframes[u.keyframes.length-1].t?(o[0]=u.getValueAtTime(u.keyframes[u.keyframes.length-1].t/i,0),o[1]=d.getValueAtTime(d.keyframes[d.keyframes.length-1].t/i,0),l[0]=u.getValueAtTime((u.keyframes[u.keyframes.length-1].t-.01)/i,0),l[1]=d.getValueAtTime((d.keyframes[d.keyframes.length-1].t-.01)/i,0)):(o=[u.pv,d.pv],l[0]=u.getValueAtTime((u._caching.lastFrame+u.offsetTime-.01)/i,u.offsetTime),l[1]=d.getValueAtTime((d._caching.lastFrame+d.offsetTime-.01)/i,d.offsetTime))}else o=l=e;this.v.rotate(-Math.atan2(o[1]-l[1],o[0]-l[0]))}this.data.p&&this.data.p.s?this.data.p.z?this.v.translate(this.px.v,this.py.v,-this.pz.v):this.v.translate(this.px.v,this.py.v,0):this.v.translate(this.p.v[0],this.p.v[1],-this.p.v[2])}this.frameId=this.elem.globalData.frameId}},precalculateMatrix:function(){if(this.appliedTransformations=0,this.pre.reset(),!this.a.effectsSequence.length&&(this.pre.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.appliedTransformations=1,!this.s.effectsSequence.length)){if(this.pre.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.appliedTransformations=2,this.sk){if(this.sk.effectsSequence.length||this.sa.effectsSequence.length)return;this.pre.skewFromAxis(-this.sk.v,this.sa.v),this.appliedTransformations=3}this.r?this.r.effectsSequence.length||(this.pre.rotate(-this.r.v),this.appliedTransformations=4):this.rz.effectsSequence.length||this.ry.effectsSequence.length||this.rx.effectsSequence.length||this.or.effectsSequence.length||(this.pre.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]),this.appliedTransformations=4)}},autoOrient:function(){}},extendPrototype([DynamicPropertyContainer],t),t.prototype.addDynamicProperty=function(n){this._addDynamicProperty(n),this.elem.addDynamicProperty(n),this._isDirty=!0},t.prototype._addDynamicProperty=DynamicPropertyContainer.prototype.addDynamicProperty,{getTransformProperty:function(n,i,o){return new t(n,i,o)}}}();function RepeaterModifier(){}function RoundCornersModifier(){}function floatEqual(e,t){return 1e5*Math.abs(e-t)<=Math.min(Math.abs(e),Math.abs(t))}function floatZero(e){return Math.abs(e)<=1e-5}function lerp(e,t,n){return e*(1-n)+t*n}function lerpPoint(e,t,n){return[lerp(e[0],t[0],n),lerp(e[1],t[1],n)]}function quadRoots(e,t,n){if(e===0)return[];var i=t*t-4*e*n;if(i<0)return[];var o=-t/(2*e);if(i===0)return[o];var l=Math.sqrt(i)/(2*e);return[o-l,o+l]}function polynomialCoefficients(e,t,n,i){return[3*t-e-3*n+i,3*e-6*t+3*n,-3*e+3*t,e]}function singlePoint(e){return new PolynomialBezier(e,e,e,e,!1)}function PolynomialBezier(e,t,n,i,o){o&&pointEqual(e,t)&&(t=lerpPoint(e,i,1/3)),o&&pointEqual(n,i)&&(n=lerpPoint(e,i,2/3));var l=polynomialCoefficients(e[0],t[0],n[0],i[0]),u=polynomialCoefficients(e[1],t[1],n[1],i[1]);this.a=[l[0],u[0]],this.b=[l[1],u[1]],this.c=[l[2],u[2]],this.d=[l[3],u[3]],this.points=[e,t,n,i]}function extrema(e,t){var n=e.points[0][t],i=e.points[e.points.length-1][t];if(n>i){var o=i;i=n,n=o}for(var l=quadRoots(3*e.a[t],2*e.b[t],e.c[t]),u=0;u<l.length;u+=1)if(l[u]>0&&l[u]<1){var d=e.point(l[u])[t];d<n?n=d:d>i&&(i=d)}return{min:n,max:i}}function intersectData(e,t,n){var i=e.boundingBox();return{cx:i.cx,cy:i.cy,width:i.width,height:i.height,bez:e,t:(t+n)/2,t1:t,t2:n}}function splitData(e){var t=e.bez.split(.5);return[intersectData(t[0],e.t1,e.t),intersectData(t[1],e.t,e.t2)]}function boxIntersect(e,t){return 2*Math.abs(e.cx-t.cx)<e.width+t.width&&2*Math.abs(e.cy-t.cy)<e.height+t.height}function intersectsImpl(e,t,n,i,o,l){if(boxIntersect(e,t))if(n>=l||e.width<=i&&e.height<=i&&t.width<=i&&t.height<=i)o.push([e.t,t.t]);else{var u=splitData(e),d=splitData(t);intersectsImpl(u[0],d[0],n+1,i,o,l),intersectsImpl(u[0],d[1],n+1,i,o,l),intersectsImpl(u[1],d[0],n+1,i,o,l),intersectsImpl(u[1],d[1],n+1,i,o,l)}}function crossProduct(e,t){return[e[1]*t[2]-e[2]*t[1],e[2]*t[0]-e[0]*t[2],e[0]*t[1]-e[1]*t[0]]}function lineIntersection(e,t,n,i){var o=[e[0],e[1],1],l=[t[0],t[1],1],u=[n[0],n[1],1],d=[i[0],i[1],1],f=crossProduct(crossProduct(o,l),crossProduct(u,d));return floatZero(f[2])?null:[f[0]/f[2],f[1]/f[2]]}function polarOffset(e,t,n){return[e[0]+Math.cos(t)*n,e[1]-Math.sin(t)*n]}function pointDistance(e,t){return Math.hypot(e[0]-t[0],e[1]-t[1])}function pointEqual(e,t){return floatEqual(e[0],t[0])&&floatEqual(e[1],t[1])}function ZigZagModifier(){}function setPoint(e,t,n,i,o,l,u){var d=n-Math.PI/2,f=n+Math.PI/2,p=t[0]+Math.cos(n)*i*o,m=t[1]-Math.sin(n)*i*o;e.setTripleAt(p,m,p+Math.cos(d)*l,m-Math.sin(d)*l,p+Math.cos(f)*u,m-Math.sin(f)*u,e.length())}function getPerpendicularVector(e,t){var n=[t[0]-e[0],t[1]-e[1]],i=.5*-Math.PI;return[Math.cos(i)*n[0]-Math.sin(i)*n[1],Math.sin(i)*n[0]+Math.cos(i)*n[1]]}function getProjectingAngle(e,t){var n=t===0?e.length()-1:t-1,i=(t+1)%e.length(),o=getPerpendicularVector(e.v[n],e.v[i]);return Math.atan2(0,1)-Math.atan2(o[1],o[0])}function zigZagCorner(e,t,n,i,o,l,u){var d=getProjectingAngle(t,n),f=t.v[n%t._length],p=t.v[n===0?t._length-1:n-1],m=t.v[(n+1)%t._length],g=l===2?Math.sqrt(Math.pow(f[0]-p[0],2)+Math.pow(f[1]-p[1],2)):0,b=l===2?Math.sqrt(Math.pow(f[0]-m[0],2)+Math.pow(f[1]-m[1],2)):0;setPoint(e,t.v[n%t._length],d,u,i,b/(2*(o+1)),g/(2*(o+1)))}function zigZagSegment(e,t,n,i,o,l){for(var u=0;u<i;u+=1){var d=(u+1)/(i+1),f=o===2?Math.sqrt(Math.pow(t.points[3][0]-t.points[0][0],2)+Math.pow(t.points[3][1]-t.points[0][1],2)):0,p=t.normalAngle(d);setPoint(e,t.point(d),p,l,n,f/(2*(i+1)),f/(2*(i+1))),l=-l}return l}function linearOffset(e,t,n){var i=Math.atan2(t[0]-e[0],t[1]-e[1]);return[polarOffset(e,i,n),polarOffset(t,i,n)]}function offsetSegment(e,t){var n,i,o,l,u,d,f;n=(f=linearOffset(e.points[0],e.points[1],t))[0],i=f[1],o=(f=linearOffset(e.points[1],e.points[2],t))[0],l=f[1],u=(f=linearOffset(e.points[2],e.points[3],t))[0],d=f[1];var p=lineIntersection(n,i,o,l);p===null&&(p=i);var m=lineIntersection(u,d,o,l);return m===null&&(m=u),new PolynomialBezier(n,p,m,d)}function joinLines(e,t,n,i,o){var l=t.points[3],u=n.points[0];if(i===3||pointEqual(l,u))return l;if(i===2){var d=-t.tangentAngle(1),f=-n.tangentAngle(0)+Math.PI,p=lineIntersection(l,polarOffset(l,d+Math.PI/2,100),u,polarOffset(u,d+Math.PI/2,100)),m=p?pointDistance(p,l):pointDistance(l,u)/2,g=polarOffset(l,d,2*m*roundCorner);return e.setXYAt(g[0],g[1],"o",e.length()-1),g=polarOffset(u,f,2*m*roundCorner),e.setTripleAt(u[0],u[1],u[0],u[1],g[0],g[1],e.length()),u}var b=lineIntersection(pointEqual(l,t.points[2])?t.points[0]:t.points[2],l,u,pointEqual(u,n.points[1])?n.points[3]:n.points[1]);return b&&pointDistance(b,l)<o?(e.setTripleAt(b[0],b[1],b[0],b[1],b[0],b[1],e.length()),b):l}function getIntersection(e,t){var n=e.intersections(t);return n.length&&floatEqual(n[0][0],1)&&n.shift(),n.length?n[0]:null}function pruneSegmentIntersection(e,t){var n=e.slice(),i=t.slice(),o=getIntersection(e[e.length-1],t[0]);return o&&(n[e.length-1]=e[e.length-1].split(o[0])[0],i[0]=t[0].split(o[1])[1]),e.length>1&&t.length>1&&(o=getIntersection(e[0],t[t.length-1]))?[[e[0].split(o[0])[0]],[t[t.length-1].split(o[1])[1]]]:[n,i]}function pruneIntersections(e){for(var t,n=1;n<e.length;n+=1)t=pruneSegmentIntersection(e[n-1],e[n]),e[n-1]=t[0],e[n]=t[1];return e.length>1&&(t=pruneSegmentIntersection(e[e.length-1],e[0]),e[e.length-1]=t[0],e[0]=t[1]),e}function offsetSegmentSplit(e,t){var n,i,o,l,u=e.inflectionPoints();if(u.length===0)return[offsetSegment(e,t)];if(u.length===1||floatEqual(u[1],1))return n=(o=e.split(u[0]))[0],i=o[1],[offsetSegment(n,t),offsetSegment(i,t)];n=(o=e.split(u[0]))[0];var d=(u[1]-u[0])/(1-u[0]);return l=(o=o[1].split(d))[0],i=o[1],[offsetSegment(n,t),offsetSegment(l,t),offsetSegment(i,t)]}function OffsetPathModifier(){}function getFontProperties(e){for(var t=e.fStyle?e.fStyle.split(" "):[],n="normal",i="normal",o=t.length,l=0;l<o;l+=1)switch(t[l].toLowerCase()){case"italic":i="italic";break;case"bold":n="700";break;case"black":n="900";break;case"medium":n="500";break;case"regular":case"normal":n="400";break;case"light":case"thin":n="200"}return{style:i,weight:e.fWeight||n}}extendPrototype([ShapeModifier],RepeaterModifier),RepeaterModifier.prototype.initModifierProperties=function(e,t){this.getValue=this.processKeys,this.c=PropertyFactory.getProp(e,t.c,0,null,this),this.o=PropertyFactory.getProp(e,t.o,0,null,this),this.tr=TransformPropertyFactory.getTransformProperty(e,t.tr,this),this.so=PropertyFactory.getProp(e,t.tr.so,0,.01,this),this.eo=PropertyFactory.getProp(e,t.tr.eo,0,.01,this),this.data=t,this.dynamicProperties.length||this.getValue(!0),this._isAnimated=!!this.dynamicProperties.length,this.pMatrix=new Matrix,this.rMatrix=new Matrix,this.sMatrix=new Matrix,this.tMatrix=new Matrix,this.matrix=new Matrix},RepeaterModifier.prototype.applyTransforms=function(e,t,n,i,o,l){var u=l?-1:1,d=i.s.v[0]+(1-i.s.v[0])*(1-o),f=i.s.v[1]+(1-i.s.v[1])*(1-o);e.translate(i.p.v[0]*u*o,i.p.v[1]*u*o,i.p.v[2]),t.translate(-i.a.v[0],-i.a.v[1],i.a.v[2]),t.rotate(-i.r.v*u*o),t.translate(i.a.v[0],i.a.v[1],i.a.v[2]),n.translate(-i.a.v[0],-i.a.v[1],i.a.v[2]),n.scale(l?1/d:d,l?1/f:f),n.translate(i.a.v[0],i.a.v[1],i.a.v[2])},RepeaterModifier.prototype.init=function(e,t,n,i){for(this.elem=e,this.arr=t,this.pos=n,this.elemsData=i,this._currentCopies=0,this._elements=[],this._groups=[],this.frameId=-1,this.initDynamicPropertyContainer(e),this.initModifierProperties(e,t[n]);n>0;)n-=1,this._elements.unshift(t[n]);this.dynamicProperties.length?this.k=!0:this.getValue(!0)},RepeaterModifier.prototype.resetElements=function(e){var t,n=e.length;for(t=0;t<n;t+=1)e[t]._processed=!1,e[t].ty==="gr"&&this.resetElements(e[t].it)},RepeaterModifier.prototype.cloneElements=function(e){var t=JSON.parse(JSON.stringify(e));return this.resetElements(t),t},RepeaterModifier.prototype.changeGroupRender=function(e,t){var n,i=e.length;for(n=0;n<i;n+=1)e[n]._render=t,e[n].ty==="gr"&&this.changeGroupRender(e[n].it,t)},RepeaterModifier.prototype.processShapes=function(e){var t,n,i,o,l,u=!1;if(this._mdf||e){var d,f=Math.ceil(this.c.v);if(this._groups.length<f){for(;this._groups.length<f;){var p={it:this.cloneElements(this._elements),ty:"gr"};p.it.push({a:{a:0,ix:1,k:[0,0]},nm:"Transform",o:{a:0,ix:7,k:100},p:{a:0,ix:2,k:[0,0]},r:{a:1,ix:6,k:[{s:0,e:0,t:0},{s:0,e:0,t:1}]},s:{a:0,ix:3,k:[100,100]},sa:{a:0,ix:5,k:0},sk:{a:0,ix:4,k:0},ty:"tr"}),this.arr.splice(0,0,p),this._groups.splice(0,0,p),this._currentCopies+=1}this.elem.reloadShapes(),u=!0}for(l=0,i=0;i<=this._groups.length-1;i+=1){if(d=l<f,this._groups[i]._render=d,this.changeGroupRender(this._groups[i].it,d),!d){var m=this.elemsData[i].it,g=m[m.length-1];g.transform.op.v!==0?(g.transform.op._mdf=!0,g.transform.op.v=0):g.transform.op._mdf=!1}l+=1}this._currentCopies=f;var b=this.o.v,_=b%1,R=b>0?Math.floor(b):Math.ceil(b),E=this.pMatrix.props,S=this.rMatrix.props,C=this.sMatrix.props;this.pMatrix.reset(),this.rMatrix.reset(),this.sMatrix.reset(),this.tMatrix.reset(),this.matrix.reset();var T,A,M=0;if(b>0){for(;M<R;)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!1),M+=1;_&&(this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,_,!1),M+=_)}else if(b<0){for(;M>R;)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!0),M-=1;_&&(this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,-_,!0),M-=_)}for(i=this.data.m===1?0:this._currentCopies-1,o=this.data.m===1?1:-1,l=this._currentCopies;l;){if(A=(n=(t=this.elemsData[i].it)[t.length-1].transform.mProps.v.props).length,t[t.length-1].transform.mProps._mdf=!0,t[t.length-1].transform.op._mdf=!0,t[t.length-1].transform.op.v=this._currentCopies===1?this.so.v:this.so.v+(this.eo.v-this.so.v)*(i/(this._currentCopies-1)),M!==0){for((i!==0&&o===1||i!==this._currentCopies-1&&o===-1)&&this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!1),this.matrix.transform(S[0],S[1],S[2],S[3],S[4],S[5],S[6],S[7],S[8],S[9],S[10],S[11],S[12],S[13],S[14],S[15]),this.matrix.transform(C[0],C[1],C[2],C[3],C[4],C[5],C[6],C[7],C[8],C[9],C[10],C[11],C[12],C[13],C[14],C[15]),this.matrix.transform(E[0],E[1],E[2],E[3],E[4],E[5],E[6],E[7],E[8],E[9],E[10],E[11],E[12],E[13],E[14],E[15]),T=0;T<A;T+=1)n[T]=this.matrix.props[T];this.matrix.reset()}else for(this.matrix.reset(),T=0;T<A;T+=1)n[T]=this.matrix.props[T];M+=1,l-=1,i+=o}}else for(l=this._currentCopies,i=0,o=1;l;)n=(t=this.elemsData[i].it)[t.length-1].transform.mProps.v.props,t[t.length-1].transform.mProps._mdf=!1,t[t.length-1].transform.op._mdf=!1,l-=1,i+=o;return u},RepeaterModifier.prototype.addShape=function(){},extendPrototype([ShapeModifier],RoundCornersModifier),RoundCornersModifier.prototype.initModifierProperties=function(e,t){this.getValue=this.processKeys,this.rd=PropertyFactory.getProp(e,t.r,0,null,this),this._isAnimated=!!this.rd.effectsSequence.length},RoundCornersModifier.prototype.processPath=function(e,t){var n,i=shapePool.newElement();i.c=e.c;var o,l,u,d,f,p,m,g,b,_,R,E,S=e._length,C=0;for(n=0;n<S;n+=1)o=e.v[n],u=e.o[n],l=e.i[n],o[0]===u[0]&&o[1]===u[1]&&o[0]===l[0]&&o[1]===l[1]?n!==0&&n!==S-1||e.c?(d=n===0?e.v[S-1]:e.v[n-1],p=(f=Math.sqrt(Math.pow(o[0]-d[0],2)+Math.pow(o[1]-d[1],2)))?Math.min(f/2,t)/f:0,m=R=o[0]+(d[0]-o[0])*p,g=E=o[1]-(o[1]-d[1])*p,b=m-(m-o[0])*roundCorner,_=g-(g-o[1])*roundCorner,i.setTripleAt(m,g,b,_,R,E,C),C+=1,d=n===S-1?e.v[0]:e.v[n+1],p=(f=Math.sqrt(Math.pow(o[0]-d[0],2)+Math.pow(o[1]-d[1],2)))?Math.min(f/2,t)/f:0,m=b=o[0]+(d[0]-o[0])*p,g=_=o[1]+(d[1]-o[1])*p,R=m-(m-o[0])*roundCorner,E=g-(g-o[1])*roundCorner,i.setTripleAt(m,g,b,_,R,E,C),C+=1):(i.setTripleAt(o[0],o[1],u[0],u[1],l[0],l[1],C),C+=1):(i.setTripleAt(e.v[n][0],e.v[n][1],e.o[n][0],e.o[n][1],e.i[n][0],e.i[n][1],C),C+=1);return i},RoundCornersModifier.prototype.processShapes=function(e){var t,n,i,o,l,u,d=this.shapes.length,f=this.rd.v;if(f!==0)for(n=0;n<d;n+=1){if(u=(l=this.shapes[n]).localShapeCollection,l.shape._mdf||this._mdf||e)for(u.releaseShapes(),l.shape._mdf=!0,t=l.shape.paths.shapes,o=l.shape.paths._length,i=0;i<o;i+=1)u.addShape(this.processPath(t[i],f));l.shape.paths=l.localShapeCollection}this.dynamicProperties.length||(this._mdf=!1)},PolynomialBezier.prototype.point=function(e){return[((this.a[0]*e+this.b[0])*e+this.c[0])*e+this.d[0],((this.a[1]*e+this.b[1])*e+this.c[1])*e+this.d[1]]},PolynomialBezier.prototype.derivative=function(e){return[(3*e*this.a[0]+2*this.b[0])*e+this.c[0],(3*e*this.a[1]+2*this.b[1])*e+this.c[1]]},PolynomialBezier.prototype.tangentAngle=function(e){var t=this.derivative(e);return Math.atan2(t[1],t[0])},PolynomialBezier.prototype.normalAngle=function(e){var t=this.derivative(e);return Math.atan2(t[0],t[1])},PolynomialBezier.prototype.inflectionPoints=function(){var e=this.a[1]*this.b[0]-this.a[0]*this.b[1];if(floatZero(e))return[];var t=-.5*(this.a[1]*this.c[0]-this.a[0]*this.c[1])/e,n=t*t-1/3*(this.b[1]*this.c[0]-this.b[0]*this.c[1])/e;if(n<0)return[];var i=Math.sqrt(n);return floatZero(i)?i>0&&i<1?[t]:[]:[t-i,t+i].filter(function(o){return o>0&&o<1})},PolynomialBezier.prototype.split=function(e){if(e<=0)return[singlePoint(this.points[0]),this];if(e>=1)return[this,singlePoint(this.points[this.points.length-1])];var t=lerpPoint(this.points[0],this.points[1],e),n=lerpPoint(this.points[1],this.points[2],e),i=lerpPoint(this.points[2],this.points[3],e),o=lerpPoint(t,n,e),l=lerpPoint(n,i,e),u=lerpPoint(o,l,e);return[new PolynomialBezier(this.points[0],t,o,u,!0),new PolynomialBezier(u,l,i,this.points[3],!0)]},PolynomialBezier.prototype.bounds=function(){return{x:extrema(this,0),y:extrema(this,1)}},PolynomialBezier.prototype.boundingBox=function(){var e=this.bounds();return{left:e.x.min,right:e.x.max,top:e.y.min,bottom:e.y.max,width:e.x.max-e.x.min,height:e.y.max-e.y.min,cx:(e.x.max+e.x.min)/2,cy:(e.y.max+e.y.min)/2}},PolynomialBezier.prototype.intersections=function(e,t,n){t===void 0&&(t=2),n===void 0&&(n=7);var i=[];return intersectsImpl(intersectData(this,0,1),intersectData(e,0,1),0,t,i,n),i},PolynomialBezier.shapeSegment=function(e,t){var n=(t+1)%e.length();return new PolynomialBezier(e.v[t],e.o[t],e.i[n],e.v[n],!0)},PolynomialBezier.shapeSegmentInverted=function(e,t){var n=(t+1)%e.length();return new PolynomialBezier(e.v[n],e.i[n],e.o[t],e.v[t],!0)},extendPrototype([ShapeModifier],ZigZagModifier),ZigZagModifier.prototype.initModifierProperties=function(e,t){this.getValue=this.processKeys,this.amplitude=PropertyFactory.getProp(e,t.s,0,null,this),this.frequency=PropertyFactory.getProp(e,t.r,0,null,this),this.pointsType=PropertyFactory.getProp(e,t.pt,0,null,this),this._isAnimated=this.amplitude.effectsSequence.length!==0||this.frequency.effectsSequence.length!==0||this.pointsType.effectsSequence.length!==0},ZigZagModifier.prototype.processPath=function(e,t,n,i){var o=e._length,l=shapePool.newElement();if(l.c=e.c,e.c||(o-=1),o===0)return l;var u=-1,d=PolynomialBezier.shapeSegment(e,0);zigZagCorner(l,e,0,t,n,i,u);for(var f=0;f<o;f+=1)u=zigZagSegment(l,d,t,n,i,-u),d=f!==o-1||e.c?PolynomialBezier.shapeSegment(e,(f+1)%o):null,zigZagCorner(l,e,f+1,t,n,i,u);return l},ZigZagModifier.prototype.processShapes=function(e){var t,n,i,o,l,u,d=this.shapes.length,f=this.amplitude.v,p=Math.max(0,Math.round(this.frequency.v)),m=this.pointsType.v;if(f!==0)for(n=0;n<d;n+=1){if(u=(l=this.shapes[n]).localShapeCollection,l.shape._mdf||this._mdf||e)for(u.releaseShapes(),l.shape._mdf=!0,t=l.shape.paths.shapes,o=l.shape.paths._length,i=0;i<o;i+=1)u.addShape(this.processPath(t[i],f,p,m));l.shape.paths=l.localShapeCollection}this.dynamicProperties.length||(this._mdf=!1)},extendPrototype([ShapeModifier],OffsetPathModifier),OffsetPathModifier.prototype.initModifierProperties=function(e,t){this.getValue=this.processKeys,this.amount=PropertyFactory.getProp(e,t.a,0,null,this),this.miterLimit=PropertyFactory.getProp(e,t.ml,0,null,this),this.lineJoin=t.lj,this._isAnimated=this.amount.effectsSequence.length!==0},OffsetPathModifier.prototype.processPath=function(e,t,n,i){var o=shapePool.newElement();o.c=e.c;var l,u,d,f=e.length();e.c||(f-=1);var p=[];for(l=0;l<f;l+=1)d=PolynomialBezier.shapeSegment(e,l),p.push(offsetSegmentSplit(d,t));if(!e.c)for(l=f-1;l>=0;l-=1)d=PolynomialBezier.shapeSegmentInverted(e,l),p.push(offsetSegmentSplit(d,t));p=pruneIntersections(p);var m=null,g=null;for(l=0;l<p.length;l+=1){var b=p[l];for(g&&(m=joinLines(o,g,b[0],n,i)),g=b[b.length-1],u=0;u<b.length;u+=1)d=b[u],m&&pointEqual(d.points[0],m)?o.setXYAt(d.points[1][0],d.points[1][1],"o",o.length()-1):o.setTripleAt(d.points[0][0],d.points[0][1],d.points[1][0],d.points[1][1],d.points[0][0],d.points[0][1],o.length()),o.setTripleAt(d.points[3][0],d.points[3][1],d.points[3][0],d.points[3][1],d.points[2][0],d.points[2][1],o.length()),m=d.points[3]}return p.length&&joinLines(o,g,p[0][0],n,i),o},OffsetPathModifier.prototype.processShapes=function(e){var t,n,i,o,l,u,d=this.shapes.length,f=this.amount.v,p=this.miterLimit.v,m=this.lineJoin;if(f!==0)for(n=0;n<d;n+=1){if(u=(l=this.shapes[n]).localShapeCollection,l.shape._mdf||this._mdf||e)for(u.releaseShapes(),l.shape._mdf=!0,t=l.shape.paths.shapes,o=l.shape.paths._length,i=0;i<o;i+=1)u.addShape(this.processPath(t[i],f,m,p));l.shape.paths=l.localShapeCollection}this.dynamicProperties.length||(this._mdf=!1)};var FontManager=function(){var e={w:0,size:0,shapes:[],data:{shapes:[]}},t=[];t=t.concat([2304,2305,2306,2307,2362,2363,2364,2364,2366,2367,2368,2369,2370,2371,2372,2373,2374,2375,2376,2377,2378,2379,2380,2381,2382,2383,2387,2388,2389,2390,2391,2402,2403]);var n=["d83cdffb","d83cdffc","d83cdffd","d83cdffe","d83cdfff"];function i(f,p){var m=createTag("span");m.setAttribute("aria-hidden",!0),m.style.fontFamily=p;var g=createTag("span");g.innerText="giItT1WQy@!-/#",m.style.position="absolute",m.style.left="-10000px",m.style.top="-10000px",m.style.fontSize="300px",m.style.fontVariant="normal",m.style.fontStyle="normal",m.style.fontWeight="normal",m.style.letterSpacing="0",m.appendChild(g),document.body.appendChild(m);var b=g.offsetWidth;return g.style.fontFamily=function(_){var R,E=_.split(","),S=E.length,C=[];for(R=0;R<S;R+=1)E[R]!=="sans-serif"&&E[R]!=="monospace"&&C.push(E[R]);return C.join(",")}(f)+", "+p,{node:g,w:b,parent:m}}function o(f,p){var m,g=document.body&&p?"svg":"canvas",b=getFontProperties(f);if(g==="svg"){var _=createNS("text");_.style.fontSize="100px",_.setAttribute("font-family",f.fFamily),_.setAttribute("font-style",b.style),_.setAttribute("font-weight",b.weight),_.textContent="1",f.fClass?(_.style.fontFamily="inherit",_.setAttribute("class",f.fClass)):_.style.fontFamily=f.fFamily,p.appendChild(_),m=_}else{var R=new OffscreenCanvas(500,500).getContext("2d");R.font=b.style+" "+b.weight+" 100px "+f.fFamily,m=R}return{measureText:function(E){return g==="svg"?(m.textContent=E,m.getComputedTextLength()):m.measureText(E).width}}}function l(f){var p=0,m=f.charCodeAt(0);if(m>=55296&&m<=56319){var g=f.charCodeAt(1);g>=56320&&g<=57343&&(p=1024*(m-55296)+g-56320+65536)}return p}function u(f){var p=l(f);return p>=127462&&p<=127487}var d=function(){this.fonts=[],this.chars=null,this.typekitLoaded=0,this.isLoaded=!1,this._warned=!1,this.initTime=Date.now(),this.setIsLoadedBinded=this.setIsLoaded.bind(this),this.checkLoadedFontsBinded=this.checkLoadedFonts.bind(this)};return d.isModifier=function(f,p){var m=f.toString(16)+p.toString(16);return n.indexOf(m)!==-1},d.isZeroWidthJoiner=function(f){return f===8205},d.isFlagEmoji=function(f){return u(f.substr(0,2))&&u(f.substr(2,2))},d.isRegionalCode=u,d.isCombinedCharacter=function(f){return t.indexOf(f)!==-1},d.isRegionalFlag=function(f,p){var m=l(f.substr(p,2));if(m!==127988)return!1;var g=0;for(p+=2;g<5;){if((m=l(f.substr(p,2)))<917601||m>917626)return!1;g+=1,p+=2}return l(f.substr(p,2))===917631},d.isVariationSelector=function(f){return f===65039},d.BLACK_FLAG_CODE_POINT=127988,d.prototype={addChars:function(f){if(f){var p;this.chars||(this.chars=[]);var m,g,b=f.length,_=this.chars.length;for(p=0;p<b;p+=1){for(m=0,g=!1;m<_;)this.chars[m].style===f[p].style&&this.chars[m].fFamily===f[p].fFamily&&this.chars[m].ch===f[p].ch&&(g=!0),m+=1;g||(this.chars.push(f[p]),_+=1)}}},addFonts:function(f,p){if(f){if(this.chars)return this.isLoaded=!0,void(this.fonts=f.list);if(!document.body)return this.isLoaded=!0,f.list.forEach(function(M){M.helper=o(M),M.cache={}}),void(this.fonts=f.list);var m,g=f.list,b=g.length,_=b;for(m=0;m<b;m+=1){var R,E,S=!0;if(g[m].loaded=!1,g[m].monoCase=i(g[m].fFamily,"monospace"),g[m].sansCase=i(g[m].fFamily,"sans-serif"),g[m].fPath){if(g[m].fOrigin==="p"||g[m].origin===3){if((R=document.querySelectorAll('style[f-forigin="p"][f-family="'+g[m].fFamily+'"], style[f-origin="3"][f-family="'+g[m].fFamily+'"]')).length>0&&(S=!1),S){var C=createTag("style");C.setAttribute("f-forigin",g[m].fOrigin),C.setAttribute("f-origin",g[m].origin),C.setAttribute("f-family",g[m].fFamily),C.type="text/css",C.innerText="@font-face {font-family: "+g[m].fFamily+"; font-style: normal; src: url('"+g[m].fPath+"');}",p.appendChild(C)}}else if(g[m].fOrigin==="g"||g[m].origin===1){for(R=document.querySelectorAll('link[f-forigin="g"], link[f-origin="1"]'),E=0;E<R.length;E+=1)R[E].href.indexOf(g[m].fPath)!==-1&&(S=!1);if(S){var T=createTag("link");T.setAttribute("f-forigin",g[m].fOrigin),T.setAttribute("f-origin",g[m].origin),T.type="text/css",T.rel="stylesheet",T.href=g[m].fPath,document.body.appendChild(T)}}else if(g[m].fOrigin==="t"||g[m].origin===2){for(R=document.querySelectorAll('script[f-forigin="t"], script[f-origin="2"]'),E=0;E<R.length;E+=1)g[m].fPath===R[E].src&&(S=!1);if(S){var A=createTag("link");A.setAttribute("f-forigin",g[m].fOrigin),A.setAttribute("f-origin",g[m].origin),A.setAttribute("rel","stylesheet"),A.setAttribute("href",g[m].fPath),p.appendChild(A)}}}else g[m].loaded=!0,_-=1;g[m].helper=o(g[m],p),g[m].cache={},this.fonts.push(g[m])}_===0?this.isLoaded=!0:setTimeout(this.checkLoadedFonts.bind(this),100)}else this.isLoaded=!0},getCharData:function(f,p,m){for(var g=0,b=this.chars.length;g<b;){if(this.chars[g].ch===f&&this.chars[g].style===p&&this.chars[g].fFamily===m)return this.chars[g];g+=1}return(typeof f=="string"&&f.charCodeAt(0)!==13||!f)&&console&&console.warn&&!this._warned&&(this._warned=!0),e},getFontByName:function(f){for(var p=0,m=this.fonts.length;p<m;){if(this.fonts[p].fName===f)return this.fonts[p];p+=1}return this.fonts[0]},measureText:function(f,p,m){var g=this.getFontByName(p),b=f;if(!g.cache[b]){var _=g.helper;if(f===" "){var R=_.measureText("|"+f+"|"),E=_.measureText("||");g.cache[b]=(R-E)/100}else g.cache[b]=_.measureText(f)/100}return g.cache[b]*m},checkLoadedFonts:function(){var f,p,m,g=this.fonts.length,b=g;for(f=0;f<g;f+=1)this.fonts[f].loaded?b-=1:this.fonts[f].fOrigin==="n"||this.fonts[f].origin===0?this.fonts[f].loaded=!0:(p=this.fonts[f].monoCase.node,m=this.fonts[f].monoCase.w,p.offsetWidth!==m?(b-=1,this.fonts[f].loaded=!0):(p=this.fonts[f].sansCase.node,m=this.fonts[f].sansCase.w,p.offsetWidth!==m&&(b-=1,this.fonts[f].loaded=!0)),this.fonts[f].loaded&&(this.fonts[f].sansCase.parent.parentNode.removeChild(this.fonts[f].sansCase.parent),this.fonts[f].monoCase.parent.parentNode.removeChild(this.fonts[f].monoCase.parent)));b!==0&&Date.now()-this.initTime<5e3?setTimeout(this.checkLoadedFontsBinded,20):setTimeout(this.setIsLoadedBinded,10)},setIsLoaded:function(){this.isLoaded=!0}},d}();function SlotManager(e){this.animationData=e}function slotFactory(e){return new SlotManager(e)}function RenderableElement(){}SlotManager.prototype.getProp=function(e){return this.animationData.slots&&this.animationData.slots[e.sid]?Object.assign(e,this.animationData.slots[e.sid].p):e},RenderableElement.prototype={initRenderable:function(){this.isInRange=!1,this.hidden=!1,this.isTransparent=!1,this.renderableComponents=[]},addRenderableComponent:function(e){this.renderableComponents.indexOf(e)===-1&&this.renderableComponents.push(e)},removeRenderableComponent:function(e){this.renderableComponents.indexOf(e)!==-1&&this.renderableComponents.splice(this.renderableComponents.indexOf(e),1)},prepareRenderableFrame:function(e){this.checkLayerLimits(e)},checkTransparency:function(){this.finalTransform.mProp.o.v<=0?!this.isTransparent&&this.globalData.renderConfig.hideOnTransparent&&(this.isTransparent=!0,this.hide()):this.isTransparent&&(this.isTransparent=!1,this.show())},checkLayerLimits:function(e){this.data.ip-this.data.st<=e&&this.data.op-this.data.st>e?this.isInRange!==!0&&(this.globalData._mdf=!0,this._mdf=!0,this.isInRange=!0,this.show()):this.isInRange!==!1&&(this.globalData._mdf=!0,this.isInRange=!1,this.hide())},renderRenderable:function(){var e,t=this.renderableComponents.length;for(e=0;e<t;e+=1)this.renderableComponents[e].renderFrame(this._isFirstFrame)},sourceRectAtTime:function(){return{top:0,left:0,width:100,height:100}},getLayerSize:function(){return this.data.ty===5?{w:this.data.textData.width,h:this.data.textData.height}:{w:this.data.width,h:this.data.height}}};var getBlendMode=(blendModeEnums={0:"source-over",1:"multiply",2:"screen",3:"overlay",4:"darken",5:"lighten",6:"color-dodge",7:"color-burn",8:"hard-light",9:"soft-light",10:"difference",11:"exclusion",12:"hue",13:"saturation",14:"color",15:"luminosity"},function(e){return blendModeEnums[e]||""}),blendModeEnums;function SliderEffect(e,t,n){this.p=PropertyFactory.getProp(t,e.v,0,0,n)}function AngleEffect(e,t,n){this.p=PropertyFactory.getProp(t,e.v,0,0,n)}function ColorEffect(e,t,n){this.p=PropertyFactory.getProp(t,e.v,1,0,n)}function PointEffect(e,t,n){this.p=PropertyFactory.getProp(t,e.v,1,0,n)}function LayerIndexEffect(e,t,n){this.p=PropertyFactory.getProp(t,e.v,0,0,n)}function MaskIndexEffect(e,t,n){this.p=PropertyFactory.getProp(t,e.v,0,0,n)}function CheckboxEffect(e,t,n){this.p=PropertyFactory.getProp(t,e.v,0,0,n)}function NoValueEffect(){this.p={}}function EffectsManager(e,t){var n,i=e.ef||[];this.effectElements=[];var o,l=i.length;for(n=0;n<l;n+=1)o=new GroupEffect(i[n],t),this.effectElements.push(o)}function GroupEffect(e,t){this.init(e,t)}function BaseElement(){}function FrameElement(){}function FootageElement(e,t,n){this.initFrame(),this.initRenderable(),this.assetData=t.getAssetData(e.refId),this.footageData=t.imageLoader.getAsset(this.assetData),this.initBaseData(e,t,n)}function AudioElement(e,t,n){this.initFrame(),this.initRenderable(),this.assetData=t.getAssetData(e.refId),this.initBaseData(e,t,n),this._isPlaying=!1,this._canPlay=!1;var i=this.globalData.getAssetsPath(this.assetData);this.audio=this.globalData.audioController.createAudio(i),this._currentTime=0,this.globalData.audioController.addAudio(this),this._volumeMultiplier=1,this._volume=1,this._previousVolume=null,this.tm=e.tm?PropertyFactory.getProp(this,e.tm,0,t.frameRate,this):{_placeholder:!0},this.lv=PropertyFactory.getProp(this,e.au&&e.au.lv?e.au.lv:{k:[100]},1,.01,this)}function BaseRenderer(){}extendPrototype([DynamicPropertyContainer],GroupEffect),GroupEffect.prototype.getValue=GroupEffect.prototype.iterateDynamicProperties,GroupEffect.prototype.init=function(e,t){var n;this.data=e,this.effectElements=[],this.initDynamicPropertyContainer(t);var i,o=this.data.ef.length,l=this.data.ef;for(n=0;n<o;n+=1){switch(i=null,l[n].ty){case 0:i=new SliderEffect(l[n],t,this);break;case 1:i=new AngleEffect(l[n],t,this);break;case 2:i=new ColorEffect(l[n],t,this);break;case 3:i=new PointEffect(l[n],t,this);break;case 4:case 7:i=new CheckboxEffect(l[n],t,this);break;case 10:i=new LayerIndexEffect(l[n],t,this);break;case 11:i=new MaskIndexEffect(l[n],t,this);break;case 5:i=new EffectsManager(l[n],t);break;default:i=new NoValueEffect(l[n])}i&&this.effectElements.push(i)}},BaseElement.prototype={checkMasks:function(){if(!this.data.hasMask)return!1;for(var e=0,t=this.data.masksProperties.length;e<t;){if(this.data.masksProperties[e].mode!=="n"&&this.data.masksProperties[e].cl!==!1)return!0;e+=1}return!1},initExpressions:function(){var e=getExpressionInterfaces();if(e){var t=e("layer"),n=e("effects"),i=e("shape"),o=e("text"),l=e("comp");this.layerInterface=t(this),this.data.hasMask&&this.maskManager&&this.layerInterface.registerMaskInterface(this.maskManager);var u=n.createEffectsInterface(this,this.layerInterface);this.layerInterface.registerEffectsInterface(u),this.data.ty===0||this.data.xt?this.compInterface=l(this):this.data.ty===4?(this.layerInterface.shapeInterface=i(this.shapesData,this.itemsData,this.layerInterface),this.layerInterface.content=this.layerInterface.shapeInterface):this.data.ty===5&&(this.layerInterface.textInterface=o(this),this.layerInterface.text=this.layerInterface.textInterface)}},setBlendMode:function(){var e=getBlendMode(this.data.bm);(this.baseElement||this.layerElement).style["mix-blend-mode"]=e},initBaseData:function(e,t,n){this.globalData=t,this.comp=n,this.data=e,this.layerId=createElementID(),this.data.sr||(this.data.sr=1),this.effectsManager=new EffectsManager(this.data,this,this.dynamicProperties)},getType:function(){return this.type},sourceRectAtTime:function(){}},FrameElement.prototype={initFrame:function(){this._isFirstFrame=!1,this.dynamicProperties=[],this._mdf=!1},prepareProperties:function(e,t){var n,i=this.dynamicProperties.length;for(n=0;n<i;n+=1)(t||this._isParent&&this.dynamicProperties[n].propType==="transform")&&(this.dynamicProperties[n].getValue(),this.dynamicProperties[n]._mdf&&(this.globalData._mdf=!0,this._mdf=!0))},addDynamicProperty:function(e){this.dynamicProperties.indexOf(e)===-1&&this.dynamicProperties.push(e)}},FootageElement.prototype.prepareFrame=function(){},extendPrototype([RenderableElement,BaseElement,FrameElement],FootageElement),FootageElement.prototype.getBaseElement=function(){return null},FootageElement.prototype.renderFrame=function(){},FootageElement.prototype.destroy=function(){},FootageElement.prototype.initExpressions=function(){var e=getExpressionInterfaces();if(e){var t=e("footage");this.layerInterface=t(this)}},FootageElement.prototype.getFootageData=function(){return this.footageData},AudioElement.prototype.prepareFrame=function(e){if(this.prepareRenderableFrame(e,!0),this.prepareProperties(e,!0),this.tm._placeholder)this._currentTime=e/this.data.sr;else{var t=this.tm.v;this._currentTime=t}this._volume=this.lv.v[0];var n=this._volume*this._volumeMultiplier;this._previousVolume!==n&&(this._previousVolume=n,this.audio.volume(n))},extendPrototype([RenderableElement,BaseElement,FrameElement],AudioElement),AudioElement.prototype.renderFrame=function(){this.isInRange&&this._canPlay&&(this._isPlaying?(!this.audio.playing()||Math.abs(this._currentTime/this.globalData.frameRate-this.audio.seek())>.1)&&this.audio.seek(this._currentTime/this.globalData.frameRate):(this.audio.play(),this.audio.seek(this._currentTime/this.globalData.frameRate),this._isPlaying=!0))},AudioElement.prototype.show=function(){},AudioElement.prototype.hide=function(){this.audio.pause(),this._isPlaying=!1},AudioElement.prototype.pause=function(){this.audio.pause(),this._isPlaying=!1,this._canPlay=!1},AudioElement.prototype.resume=function(){this._canPlay=!0},AudioElement.prototype.setRate=function(e){this.audio.rate(e)},AudioElement.prototype.volume=function(e){this._volumeMultiplier=e,this._previousVolume=e*this._volume,this.audio.volume(this._previousVolume)},AudioElement.prototype.getBaseElement=function(){return null},AudioElement.prototype.destroy=function(){},AudioElement.prototype.sourceRectAtTime=function(){},AudioElement.prototype.initExpressions=function(){},BaseRenderer.prototype.checkLayers=function(e){var t,n,i=this.layers.length;for(this.completeLayers=!0,t=i-1;t>=0;t-=1)this.elements[t]||(n=this.layers[t]).ip-n.st<=e-this.layers[t].st&&n.op-n.st>e-this.layers[t].st&&this.buildItem(t),this.completeLayers=!!this.elements[t]&&this.completeLayers;this.checkPendingElements()},BaseRenderer.prototype.createItem=function(e){switch(e.ty){case 2:return this.createImage(e);case 0:return this.createComp(e);case 1:return this.createSolid(e);case 3:return this.createNull(e);case 4:return this.createShape(e);case 5:return this.createText(e);case 6:return this.createAudio(e);case 13:return this.createCamera(e);case 15:return this.createFootage(e);default:return this.createNull(e)}},BaseRenderer.prototype.createCamera=function(){throw new Error("You're using a 3d camera. Try the html renderer.")},BaseRenderer.prototype.createAudio=function(e){return new AudioElement(e,this.globalData,this)},BaseRenderer.prototype.createFootage=function(e){return new FootageElement(e,this.globalData,this)},BaseRenderer.prototype.buildAllItems=function(){var e,t=this.layers.length;for(e=0;e<t;e+=1)this.buildItem(e);this.checkPendingElements()},BaseRenderer.prototype.includeLayers=function(e){var t;this.completeLayers=!1;var n,i=e.length,o=this.layers.length;for(t=0;t<i;t+=1)for(n=0;n<o;){if(this.layers[n].id===e[t].id){this.layers[n]=e[t];break}n+=1}},BaseRenderer.prototype.setProjectInterface=function(e){this.globalData.projectInterface=e},BaseRenderer.prototype.initItems=function(){this.globalData.progressiveLoad||this.buildAllItems()},BaseRenderer.prototype.buildElementParenting=function(e,t,n){for(var i=this.elements,o=this.layers,l=0,u=o.length;l<u;)o[l].ind==t&&(i[l]&&i[l]!==!0?(n.push(i[l]),i[l].setAsParent(),o[l].parent!==void 0?this.buildElementParenting(e,o[l].parent,n):e.setHierarchy(n)):(this.buildItem(l),this.addPendingElement(e))),l+=1},BaseRenderer.prototype.addPendingElement=function(e){this.pendingElements.push(e)},BaseRenderer.prototype.searchExtraCompositions=function(e){var t,n=e.length;for(t=0;t<n;t+=1)if(e[t].xt){var i=this.createComp(e[t]);i.initExpressions(),this.globalData.projectInterface.registerComposition(i)}},BaseRenderer.prototype.getElementById=function(e){var t,n=this.elements.length;for(t=0;t<n;t+=1)if(this.elements[t].data.ind===e)return this.elements[t];return null},BaseRenderer.prototype.getElementByPath=function(e){var t,n=e.shift();if(typeof n=="number")t=this.elements[n];else{var i,o=this.elements.length;for(i=0;i<o;i+=1)if(this.elements[i].data.nm===n){t=this.elements[i];break}}return e.length===0?t:t.getElementByPath(e)},BaseRenderer.prototype.setupGlobalData=function(e,t){this.globalData.fontManager=new FontManager,this.globalData.slotManager=slotFactory(e),this.globalData.fontManager.addChars(e.chars),this.globalData.fontManager.addFonts(e.fonts,t),this.globalData.getAssetData=this.animationItem.getAssetData.bind(this.animationItem),this.globalData.getAssetsPath=this.animationItem.getAssetsPath.bind(this.animationItem),this.globalData.imageLoader=this.animationItem.imagePreloader,this.globalData.audioController=this.animationItem.audioController,this.globalData.frameId=0,this.globalData.frameRate=e.fr,this.globalData.nm=e.nm,this.globalData.compSize={w:e.w,h:e.h}};var effectTypes={TRANSFORM_EFFECT:"transformEFfect"};function TransformElement(){}function MaskElement(e,t,n){this.data=e,this.element=t,this.globalData=n,this.storedData=[],this.masksProperties=this.data.masksProperties||[],this.maskElement=null;var i,o,l=this.globalData.defs,u=this.masksProperties?this.masksProperties.length:0;this.viewData=createSizedArray(u),this.solidPath="";var d,f,p,m,g,b,_=this.masksProperties,R=0,E=[],S=createElementID(),C="clipPath",T="clip-path";for(i=0;i<u;i+=1)if((_[i].mode!=="a"&&_[i].mode!=="n"||_[i].inv||_[i].o.k!==100||_[i].o.x)&&(C="mask",T="mask"),_[i].mode!=="s"&&_[i].mode!=="i"||R!==0?p=null:((p=createNS("rect")).setAttribute("fill","#ffffff"),p.setAttribute("width",this.element.comp.data.w||0),p.setAttribute("height",this.element.comp.data.h||0),E.push(p)),o=createNS("path"),_[i].mode==="n")this.viewData[i]={op:PropertyFactory.getProp(this.element,_[i].o,0,.01,this.element),prop:ShapePropertyFactory.getShapeProp(this.element,_[i],3),elem:o,lastPath:""},l.appendChild(o);else{var A;if(R+=1,o.setAttribute("fill",_[i].mode==="s"?"#000000":"#ffffff"),o.setAttribute("clip-rule","nonzero"),_[i].x.k!==0?(C="mask",T="mask",b=PropertyFactory.getProp(this.element,_[i].x,0,null,this.element),A=createElementID(),(m=createNS("filter")).setAttribute("id",A),(g=createNS("feMorphology")).setAttribute("operator","erode"),g.setAttribute("in","SourceGraphic"),g.setAttribute("radius","0"),m.appendChild(g),l.appendChild(m),o.setAttribute("stroke",_[i].mode==="s"?"#000000":"#ffffff")):(g=null,b=null),this.storedData[i]={elem:o,x:b,expan:g,lastPath:"",lastOperator:"",filterId:A,lastRadius:0},_[i].mode==="i"){f=E.length;var M=createNS("g");for(d=0;d<f;d+=1)M.appendChild(E[d]);var I=createNS("mask");I.setAttribute("mask-type","alpha"),I.setAttribute("id",S+"_"+R),I.appendChild(o),l.appendChild(I),M.setAttribute("mask","url("+getLocationHref()+"#"+S+"_"+R+")"),E.length=0,E.push(M)}else E.push(o);_[i].inv&&!this.solidPath&&(this.solidPath=this.createLayerSolidPath()),this.viewData[i]={elem:o,lastPath:"",op:PropertyFactory.getProp(this.element,_[i].o,0,.01,this.element),prop:ShapePropertyFactory.getShapeProp(this.element,_[i],3),invRect:p},this.viewData[i].prop.k||this.drawPath(_[i],this.viewData[i].prop.v,this.viewData[i])}for(this.maskElement=createNS(C),u=E.length,i=0;i<u;i+=1)this.maskElement.appendChild(E[i]);R>0&&(this.maskElement.setAttribute("id",S),this.element.maskedElement.setAttribute(T,"url("+getLocationHref()+"#"+S+")"),l.appendChild(this.maskElement)),this.viewData.length&&this.element.addRenderableComponent(this)}TransformElement.prototype={initTransform:function(){var e=new Matrix;this.finalTransform={mProp:this.data.ks?TransformPropertyFactory.getTransformProperty(this,this.data.ks,this):{o:0},_matMdf:!1,_localMatMdf:!1,_opMdf:!1,mat:e,localMat:e,localOpacity:1},this.data.ao&&(this.finalTransform.mProp.autoOriented=!0),this.data.ty},renderTransform:function(){if(this.finalTransform._opMdf=this.finalTransform.mProp.o._mdf||this._isFirstFrame,this.finalTransform._matMdf=this.finalTransform.mProp._mdf||this._isFirstFrame,this.hierarchy){var e,t=this.finalTransform.mat,n=0,i=this.hierarchy.length;if(!this.finalTransform._matMdf)for(;n<i;){if(this.hierarchy[n].finalTransform.mProp._mdf){this.finalTransform._matMdf=!0;break}n+=1}if(this.finalTransform._matMdf)for(e=this.finalTransform.mProp.v.props,t.cloneFromProps(e),n=0;n<i;n+=1)t.multiply(this.hierarchy[n].finalTransform.mProp.v)}this.finalTransform._matMdf&&(this.finalTransform._localMatMdf=this.finalTransform._matMdf),this.finalTransform._opMdf&&(this.finalTransform.localOpacity=this.finalTransform.mProp.o.v)},renderLocalTransform:function(){if(this.localTransforms){var e=0,t=this.localTransforms.length;if(this.finalTransform._localMatMdf=this.finalTransform._matMdf,!this.finalTransform._localMatMdf||!this.finalTransform._opMdf)for(;e<t;)this.localTransforms[e]._mdf&&(this.finalTransform._localMatMdf=!0),this.localTransforms[e]._opMdf&&!this.finalTransform._opMdf&&(this.finalTransform.localOpacity=this.finalTransform.mProp.o.v,this.finalTransform._opMdf=!0),e+=1;if(this.finalTransform._localMatMdf){var n=this.finalTransform.localMat;for(this.localTransforms[0].matrix.clone(n),e=1;e<t;e+=1){var i=this.localTransforms[e].matrix;n.multiply(i)}n.multiply(this.finalTransform.mat)}if(this.finalTransform._opMdf){var o=this.finalTransform.localOpacity;for(e=0;e<t;e+=1)o*=.01*this.localTransforms[e].opacity;this.finalTransform.localOpacity=o}}},searchEffectTransforms:function(){if(this.renderableEffectsManager){var e=this.renderableEffectsManager.getEffects(effectTypes.TRANSFORM_EFFECT);if(e.length){this.localTransforms=[],this.finalTransform.localMat=new Matrix;var t=0,n=e.length;for(t=0;t<n;t+=1)this.localTransforms.push(e[t])}}},globalToLocal:function(e){var t=[];t.push(this.finalTransform);for(var n,i=!0,o=this.comp;i;)o.finalTransform?(o.data.hasMask&&t.splice(0,0,o.finalTransform),o=o.comp):i=!1;var l,u=t.length;for(n=0;n<u;n+=1)l=t[n].mat.applyToPointArray(0,0,0),e=[e[0]-l[0],e[1]-l[1],0];return e},mHelper:new Matrix},MaskElement.prototype.getMaskProperty=function(e){return this.viewData[e].prop},MaskElement.prototype.renderFrame=function(e){var t,n=this.element.finalTransform.mat,i=this.masksProperties.length;for(t=0;t<i;t+=1)if((this.viewData[t].prop._mdf||e)&&this.drawPath(this.masksProperties[t],this.viewData[t].prop.v,this.viewData[t]),(this.viewData[t].op._mdf||e)&&this.viewData[t].elem.setAttribute("fill-opacity",this.viewData[t].op.v),this.masksProperties[t].mode!=="n"&&(this.viewData[t].invRect&&(this.element.finalTransform.mProp._mdf||e)&&this.viewData[t].invRect.setAttribute("transform",n.getInverseMatrix().to2dCSS()),this.storedData[t].x&&(this.storedData[t].x._mdf||e))){var o=this.storedData[t].expan;this.storedData[t].x.v<0?(this.storedData[t].lastOperator!=="erode"&&(this.storedData[t].lastOperator="erode",this.storedData[t].elem.setAttribute("filter","url("+getLocationHref()+"#"+this.storedData[t].filterId+")")),o.setAttribute("radius",-this.storedData[t].x.v)):(this.storedData[t].lastOperator!=="dilate"&&(this.storedData[t].lastOperator="dilate",this.storedData[t].elem.setAttribute("filter",null)),this.storedData[t].elem.setAttribute("stroke-width",2*this.storedData[t].x.v))}},MaskElement.prototype.getMaskelement=function(){return this.maskElement},MaskElement.prototype.createLayerSolidPath=function(){var e="M0,0 ";return e+=" h"+this.globalData.compSize.w,e+=" v"+this.globalData.compSize.h,e+=" h-"+this.globalData.compSize.w,e+=" v-"+this.globalData.compSize.h+" "},MaskElement.prototype.drawPath=function(e,t,n){var i,o,l=" M"+t.v[0][0]+","+t.v[0][1];for(o=t._length,i=1;i<o;i+=1)l+=" C"+t.o[i-1][0]+","+t.o[i-1][1]+" "+t.i[i][0]+","+t.i[i][1]+" "+t.v[i][0]+","+t.v[i][1];if(t.c&&o>1&&(l+=" C"+t.o[i-1][0]+","+t.o[i-1][1]+" "+t.i[0][0]+","+t.i[0][1]+" "+t.v[0][0]+","+t.v[0][1]),n.lastPath!==l){var u="";n.elem&&(t.c&&(u=e.inv?this.solidPath+l:l),n.elem.setAttribute("d",u)),n.lastPath=l}},MaskElement.prototype.destroy=function(){this.element=null,this.globalData=null,this.maskElement=null,this.data=null,this.masksProperties=null};var filtersFactory=function(){var e={};return e.createFilter=function(t,n){var i=createNS("filter");return i.setAttribute("id",t),n!==!0&&(i.setAttribute("filterUnits","objectBoundingBox"),i.setAttribute("x","0%"),i.setAttribute("y","0%"),i.setAttribute("width","100%"),i.setAttribute("height","100%")),i},e.createAlphaToLuminanceFilter=function(){var t=createNS("feColorMatrix");return t.setAttribute("type","matrix"),t.setAttribute("color-interpolation-filters","sRGB"),t.setAttribute("values","0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 1"),t},e}(),featureSupport=function(){var e={maskType:!0,svgLumaHidden:!0,offscreenCanvas:typeof OffscreenCanvas<"u"};return(/MSIE 10/i.test(navigator.userAgent)||/MSIE 9/i.test(navigator.userAgent)||/rv:11.0/i.test(navigator.userAgent)||/Edge\/\d./i.test(navigator.userAgent))&&(e.maskType=!1),/firefox/i.test(navigator.userAgent)&&(e.svgLumaHidden=!1),e}(),registeredEffects$1={},idPrefix="filter_result_";function SVGEffects(e){var t,n,i="SourceGraphic",o=e.data.ef?e.data.ef.length:0,l=createElementID(),u=filtersFactory.createFilter(l,!0),d=0;for(this.filters=[],t=0;t<o;t+=1){n=null;var f=e.data.ef[t].ty;registeredEffects$1[f]&&(n=new registeredEffects$1[f].effect(u,e.effectsManager.effectElements[t],e,idPrefix+d,i),i=idPrefix+d,registeredEffects$1[f].countsAsEffect&&(d+=1)),n&&this.filters.push(n)}d&&(e.globalData.defs.appendChild(u),e.layerElement.setAttribute("filter","url("+getLocationHref()+"#"+l+")")),this.filters.length&&e.addRenderableComponent(this)}function registerEffect$1(e,t,n){registeredEffects$1[e]={effect:t,countsAsEffect:n}}function SVGBaseElement(){}function HierarchyElement(){}function RenderableDOMElement(){}function IImageElement(e,t,n){this.assetData=t.getAssetData(e.refId),this.assetData&&this.assetData.sid&&(this.assetData=t.slotManager.getProp(this.assetData)),this.initElement(e,t,n),this.sourceRect={top:0,left:0,width:this.assetData.w,height:this.assetData.h}}function ProcessedElement(e,t){this.elem=e,this.pos=t}function IShapeElement(){}SVGEffects.prototype.renderFrame=function(e){var t,n=this.filters.length;for(t=0;t<n;t+=1)this.filters[t].renderFrame(e)},SVGEffects.prototype.getEffects=function(e){var t,n=this.filters.length,i=[];for(t=0;t<n;t+=1)this.filters[t].type===e&&i.push(this.filters[t]);return i},SVGBaseElement.prototype={initRendererElement:function(){this.layerElement=createNS("g")},createContainerElements:function(){this.matteElement=createNS("g"),this.transformedElement=this.layerElement,this.maskedElement=this.layerElement,this._sizeChanged=!1;var e=null;if(this.data.td){this.matteMasks={};var t=createNS("g");t.setAttribute("id",this.layerId),t.appendChild(this.layerElement),e=t,this.globalData.defs.appendChild(t)}else this.data.tt?(this.matteElement.appendChild(this.layerElement),e=this.matteElement,this.baseElement=this.matteElement):this.baseElement=this.layerElement;if(this.data.ln&&this.layerElement.setAttribute("id",this.data.ln),this.data.cl&&this.layerElement.setAttribute("class",this.data.cl),this.data.ty===0&&!this.data.hd){var n=createNS("clipPath"),i=createNS("path");i.setAttribute("d","M0,0 L"+this.data.w+",0 L"+this.data.w+","+this.data.h+" L0,"+this.data.h+"z");var o=createElementID();if(n.setAttribute("id",o),n.appendChild(i),this.globalData.defs.appendChild(n),this.checkMasks()){var l=createNS("g");l.setAttribute("clip-path","url("+getLocationHref()+"#"+o+")"),l.appendChild(this.layerElement),this.transformedElement=l,e?e.appendChild(this.transformedElement):this.baseElement=this.transformedElement}else this.layerElement.setAttribute("clip-path","url("+getLocationHref()+"#"+o+")")}this.data.bm!==0&&this.setBlendMode()},renderElement:function(){this.finalTransform._localMatMdf&&this.transformedElement.setAttribute("transform",this.finalTransform.localMat.to2dCSS()),this.finalTransform._opMdf&&this.transformedElement.setAttribute("opacity",this.finalTransform.localOpacity)},destroyBaseElement:function(){this.layerElement=null,this.matteElement=null,this.maskManager.destroy()},getBaseElement:function(){return this.data.hd?null:this.baseElement},createRenderableComponents:function(){this.maskManager=new MaskElement(this.data,this,this.globalData),this.renderableEffectsManager=new SVGEffects(this),this.searchEffectTransforms()},getMatte:function(e){if(this.matteMasks||(this.matteMasks={}),!this.matteMasks[e]){var t,n,i,o,l=this.layerId+"_"+e;if(e===1||e===3){var u=createNS("mask");u.setAttribute("id",l),u.setAttribute("mask-type",e===3?"luminance":"alpha"),(i=createNS("use")).setAttributeNS("http://www.w3.org/1999/xlink","href","#"+this.layerId),u.appendChild(i),this.globalData.defs.appendChild(u),featureSupport.maskType||e!==1||(u.setAttribute("mask-type","luminance"),t=createElementID(),n=filtersFactory.createFilter(t),this.globalData.defs.appendChild(n),n.appendChild(filtersFactory.createAlphaToLuminanceFilter()),(o=createNS("g")).appendChild(i),u.appendChild(o),o.setAttribute("filter","url("+getLocationHref()+"#"+t+")"))}else if(e===2){var d=createNS("mask");d.setAttribute("id",l),d.setAttribute("mask-type","alpha");var f=createNS("g");d.appendChild(f),t=createElementID(),n=filtersFactory.createFilter(t);var p=createNS("feComponentTransfer");p.setAttribute("in","SourceGraphic"),n.appendChild(p);var m=createNS("feFuncA");m.setAttribute("type","table"),m.setAttribute("tableValues","1.0 0.0"),p.appendChild(m),this.globalData.defs.appendChild(n);var g=createNS("rect");g.setAttribute("width",this.comp.data.w),g.setAttribute("height",this.comp.data.h),g.setAttribute("x","0"),g.setAttribute("y","0"),g.setAttribute("fill","#ffffff"),g.setAttribute("opacity","0"),f.setAttribute("filter","url("+getLocationHref()+"#"+t+")"),f.appendChild(g),(i=createNS("use")).setAttributeNS("http://www.w3.org/1999/xlink","href","#"+this.layerId),f.appendChild(i),featureSupport.maskType||(d.setAttribute("mask-type","luminance"),n.appendChild(filtersFactory.createAlphaToLuminanceFilter()),o=createNS("g"),f.appendChild(g),o.appendChild(this.layerElement),f.appendChild(o)),this.globalData.defs.appendChild(d)}this.matteMasks[e]=l}return this.matteMasks[e]},setMatte:function(e){this.matteElement&&this.matteElement.setAttribute("mask","url("+getLocationHref()+"#"+e+")")}},HierarchyElement.prototype={initHierarchy:function(){this.hierarchy=[],this._isParent=!1,this.checkParenting()},setHierarchy:function(e){this.hierarchy=e},setAsParent:function(){this._isParent=!0},checkParenting:function(){this.data.parent!==void 0&&this.comp.buildElementParenting(this,this.data.parent,[])}},extendPrototype([RenderableElement,createProxyFunction({initElement:function(e,t,n){this.initFrame(),this.initBaseData(e,t,n),this.initTransform(e,t,n),this.initHierarchy(),this.initRenderable(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),this.createContent(),this.hide()},hide:function(){this.hidden||this.isInRange&&!this.isTransparent||((this.baseElement||this.layerElement).style.display="none",this.hidden=!0)},show:function(){this.isInRange&&!this.isTransparent&&(this.data.hd||((this.baseElement||this.layerElement).style.display="block"),this.hidden=!1,this._isFirstFrame=!0)},renderFrame:function(){this.data.hd||this.hidden||(this.renderTransform(),this.renderRenderable(),this.renderLocalTransform(),this.renderElement(),this.renderInnerContent(),this._isFirstFrame&&(this._isFirstFrame=!1))},renderInnerContent:function(){},prepareFrame:function(e){this._mdf=!1,this.prepareRenderableFrame(e),this.prepareProperties(e,this.isInRange),this.checkTransparency()},destroy:function(){this.innerElem=null,this.destroyBaseElement()}})],RenderableDOMElement),extendPrototype([BaseElement,TransformElement,SVGBaseElement,HierarchyElement,FrameElement,RenderableDOMElement],IImageElement),IImageElement.prototype.createContent=function(){var e=this.globalData.getAssetsPath(this.assetData);this.innerElem=createNS("image"),this.innerElem.setAttribute("width",this.assetData.w+"px"),this.innerElem.setAttribute("height",this.assetData.h+"px"),this.innerElem.setAttribute("preserveAspectRatio",this.assetData.pr||this.globalData.renderConfig.imagePreserveAspectRatio),this.innerElem.setAttributeNS("http://www.w3.org/1999/xlink","href",e),this.layerElement.appendChild(this.innerElem)},IImageElement.prototype.sourceRectAtTime=function(){return this.sourceRect},IShapeElement.prototype={addShapeToModifiers:function(e){var t,n=this.shapeModifiers.length;for(t=0;t<n;t+=1)this.shapeModifiers[t].addShape(e)},isShapeInAnimatedModifiers:function(e){for(var t=this.shapeModifiers.length;0<t;)if(this.shapeModifiers[0].isAnimatedWithShape(e))return!0;return!1},renderModifiers:function(){if(this.shapeModifiers.length){var e,t=this.shapes.length;for(e=0;e<t;e+=1)this.shapes[e].sh.reset();for(e=(t=this.shapeModifiers.length)-1;e>=0&&!this.shapeModifiers[e].processShapes(this._isFirstFrame);e-=1);}},searchProcessedElement:function(e){for(var t=this.processedElements,n=0,i=t.length;n<i;){if(t[n].elem===e)return t[n].pos;n+=1}return 0},addProcessedElement:function(e,t){for(var n=this.processedElements,i=n.length;i;)if(n[i-=1].elem===e)return void(n[i].pos=t);n.push(new ProcessedElement(e,t))},prepareFrame:function(e){this.prepareRenderableFrame(e),this.prepareProperties(e,this.isInRange)}};var lineCapEnum={1:"butt",2:"round",3:"square"},lineJoinEnum={1:"miter",2:"round",3:"bevel"};function SVGShapeData(e,t,n){this.caches=[],this.styles=[],this.transformers=e,this.lStr="",this.sh=n,this.lvl=t,this._isAnimated=!!n.k;for(var i=0,o=e.length;i<o;){if(e[i].mProps.dynamicProperties.length){this._isAnimated=!0;break}i+=1}}function SVGStyleData(e,t){this.data=e,this.type=e.ty,this.d="",this.lvl=t,this._mdf=!1,this.closed=e.hd===!0,this.pElem=createNS("path"),this.msElem=null}function DashProperty(e,t,n,i){var o;this.elem=e,this.frameId=-1,this.dataProps=createSizedArray(t.length),this.renderer=n,this.k=!1,this.dashStr="",this.dashArray=createTypedArray("float32",t.length?t.length-1:0),this.dashoffset=createTypedArray("float32",1),this.initDynamicPropertyContainer(i);var l,u=t.length||0;for(o=0;o<u;o+=1)l=PropertyFactory.getProp(e,t[o].v,0,0,this),this.k=l.k||this.k,this.dataProps[o]={n:t[o].n,p:l};this.k||this.getValue(!0),this._isAnimated=this.k}function SVGStrokeStyleData(e,t,n){this.initDynamicPropertyContainer(e),this.getValue=this.iterateDynamicProperties,this.o=PropertyFactory.getProp(e,t.o,0,.01,this),this.w=PropertyFactory.getProp(e,t.w,0,null,this),this.d=new DashProperty(e,t.d||{},"svg",this),this.c=PropertyFactory.getProp(e,t.c,1,255,this),this.style=n,this._isAnimated=!!this._isAnimated}function SVGFillStyleData(e,t,n){this.initDynamicPropertyContainer(e),this.getValue=this.iterateDynamicProperties,this.o=PropertyFactory.getProp(e,t.o,0,.01,this),this.c=PropertyFactory.getProp(e,t.c,1,255,this),this.style=n}function SVGNoStyleData(e,t,n){this.initDynamicPropertyContainer(e),this.getValue=this.iterateDynamicProperties,this.style=n}function GradientProperty(e,t,n){this.data=t,this.c=createTypedArray("uint8c",4*t.p);var i=t.k.k[0].s?t.k.k[0].s.length-4*t.p:t.k.k.length-4*t.p;this.o=createTypedArray("float32",i),this._cmdf=!1,this._omdf=!1,this._collapsable=this.checkCollapsable(),this._hasOpacity=i,this.initDynamicPropertyContainer(n),this.prop=PropertyFactory.getProp(e,t.k,1,null,this),this.k=this.prop.k,this.getValue(!0)}function SVGGradientFillStyleData(e,t,n){this.initDynamicPropertyContainer(e),this.getValue=this.iterateDynamicProperties,this.initGradientData(e,t,n)}function SVGGradientStrokeStyleData(e,t,n){this.initDynamicPropertyContainer(e),this.getValue=this.iterateDynamicProperties,this.w=PropertyFactory.getProp(e,t.w,0,null,this),this.d=new DashProperty(e,t.d||{},"svg",this),this.initGradientData(e,t,n),this._isAnimated=!!this._isAnimated}function ShapeGroupData(){this.it=[],this.prevViewData=[],this.gr=createNS("g")}function SVGTransformData(e,t,n){this.transform={mProps:e,op:t,container:n},this.elements=[],this._isAnimated=this.transform.mProps.dynamicProperties.length||this.transform.op.effectsSequence.length}SVGShapeData.prototype.setAsAnimated=function(){this._isAnimated=!0},SVGStyleData.prototype.reset=function(){this.d="",this._mdf=!1},DashProperty.prototype.getValue=function(e){if((this.elem.globalData.frameId!==this.frameId||e)&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf=this._mdf||e,this._mdf)){var t=0,n=this.dataProps.length;for(this.renderer==="svg"&&(this.dashStr=""),t=0;t<n;t+=1)this.dataProps[t].n!=="o"?this.renderer==="svg"?this.dashStr+=" "+this.dataProps[t].p.v:this.dashArray[t]=this.dataProps[t].p.v:this.dashoffset[0]=this.dataProps[t].p.v}},extendPrototype([DynamicPropertyContainer],DashProperty),extendPrototype([DynamicPropertyContainer],SVGStrokeStyleData),extendPrototype([DynamicPropertyContainer],SVGFillStyleData),extendPrototype([DynamicPropertyContainer],SVGNoStyleData),GradientProperty.prototype.comparePoints=function(e,t){for(var n=0,i=this.o.length/2;n<i;){if(Math.abs(e[4*n]-e[4*t+2*n])>.01)return!1;n+=1}return!0},GradientProperty.prototype.checkCollapsable=function(){if(this.o.length/2!=this.c.length/4)return!1;if(this.data.k.k[0].s)for(var e=0,t=this.data.k.k.length;e<t;){if(!this.comparePoints(this.data.k.k[e].s,this.data.p))return!1;e+=1}else if(!this.comparePoints(this.data.k.k,this.data.p))return!1;return!0},GradientProperty.prototype.getValue=function(e){if(this.prop.getValue(),this._mdf=!1,this._cmdf=!1,this._omdf=!1,this.prop._mdf||e){var t,n,i,o=4*this.data.p;for(t=0;t<o;t+=1)n=t%4==0?100:255,i=Math.round(this.prop.v[t]*n),this.c[t]!==i&&(this.c[t]=i,this._cmdf=!e);if(this.o.length)for(o=this.prop.v.length,t=4*this.data.p;t<o;t+=1)n=t%2==0?100:1,i=t%2==0?Math.round(100*this.prop.v[t]):this.prop.v[t],this.o[t-4*this.data.p]!==i&&(this.o[t-4*this.data.p]=i,this._omdf=!e);this._mdf=!e}},extendPrototype([DynamicPropertyContainer],GradientProperty),SVGGradientFillStyleData.prototype.initGradientData=function(e,t,n){this.o=PropertyFactory.getProp(e,t.o,0,.01,this),this.s=PropertyFactory.getProp(e,t.s,1,null,this),this.e=PropertyFactory.getProp(e,t.e,1,null,this),this.h=PropertyFactory.getProp(e,t.h||{k:0},0,.01,this),this.a=PropertyFactory.getProp(e,t.a||{k:0},0,degToRads,this),this.g=new GradientProperty(e,t.g,this),this.style=n,this.stops=[],this.setGradientData(n.pElem,t),this.setGradientOpacity(t,n),this._isAnimated=!!this._isAnimated},SVGGradientFillStyleData.prototype.setGradientData=function(e,t){var n=createElementID(),i=createNS(t.t===1?"linearGradient":"radialGradient");i.setAttribute("id",n),i.setAttribute("spreadMethod","pad"),i.setAttribute("gradientUnits","userSpaceOnUse");var o,l,u,d=[];for(u=4*t.g.p,l=0;l<u;l+=4)o=createNS("stop"),i.appendChild(o),d.push(o);e.setAttribute(t.ty==="gf"?"fill":"stroke","url("+getLocationHref()+"#"+n+")"),this.gf=i,this.cst=d},SVGGradientFillStyleData.prototype.setGradientOpacity=function(e,t){if(this.g._hasOpacity&&!this.g._collapsable){var n,i,o,l=createNS("mask"),u=createNS("path");l.appendChild(u);var d=createElementID(),f=createElementID();l.setAttribute("id",f);var p=createNS(e.t===1?"linearGradient":"radialGradient");p.setAttribute("id",d),p.setAttribute("spreadMethod","pad"),p.setAttribute("gradientUnits","userSpaceOnUse"),o=e.g.k.k[0].s?e.g.k.k[0].s.length:e.g.k.k.length;var m=this.stops;for(i=4*e.g.p;i<o;i+=2)(n=createNS("stop")).setAttribute("stop-color","rgb(255,255,255)"),p.appendChild(n),m.push(n);u.setAttribute(e.ty==="gf"?"fill":"stroke","url("+getLocationHref()+"#"+d+")"),e.ty==="gs"&&(u.setAttribute("stroke-linecap",lineCapEnum[e.lc||2]),u.setAttribute("stroke-linejoin",lineJoinEnum[e.lj||2]),e.lj===1&&u.setAttribute("stroke-miterlimit",e.ml)),this.of=p,this.ms=l,this.ost=m,this.maskId=f,t.msElem=u}},extendPrototype([DynamicPropertyContainer],SVGGradientFillStyleData),extendPrototype([SVGGradientFillStyleData,DynamicPropertyContainer],SVGGradientStrokeStyleData);var buildShapeString=function(e,t,n,i){if(t===0)return"";var o,l=e.o,u=e.i,d=e.v,f=" M"+i.applyToPointStringified(d[0][0],d[0][1]);for(o=1;o<t;o+=1)f+=" C"+i.applyToPointStringified(l[o-1][0],l[o-1][1])+" "+i.applyToPointStringified(u[o][0],u[o][1])+" "+i.applyToPointStringified(d[o][0],d[o][1]);return n&&t&&(f+=" C"+i.applyToPointStringified(l[o-1][0],l[o-1][1])+" "+i.applyToPointStringified(u[0][0],u[0][1])+" "+i.applyToPointStringified(d[0][0],d[0][1]),f+="z"),f},SVGElementsRenderer=function(){var e=new Matrix,t=new Matrix;function n(p,m,g){(g||m.transform.op._mdf)&&m.transform.container.setAttribute("opacity",m.transform.op.v),(g||m.transform.mProps._mdf)&&m.transform.container.setAttribute("transform",m.transform.mProps.v.to2dCSS())}function i(){}function o(p,m,g){var b,_,R,E,S,C,T,A,M,I,O=m.styles.length,N=m.lvl;for(C=0;C<O;C+=1){if(E=m.sh._mdf||g,m.styles[C].lvl<N){for(A=t.reset(),M=N-m.styles[C].lvl,I=m.transformers.length-1;!E&&M>0;)E=m.transformers[I].mProps._mdf||E,M-=1,I-=1;if(E)for(M=N-m.styles[C].lvl,I=m.transformers.length-1;M>0;)A.multiply(m.transformers[I].mProps.v),M-=1,I-=1}else A=e;if(_=(T=m.sh.paths)._length,E){for(R="",b=0;b<_;b+=1)(S=T.shapes[b])&&S._length&&(R+=buildShapeString(S,S._length,S.c,A));m.caches[C]=R}else R=m.caches[C];m.styles[C].d+=p.hd===!0?"":R,m.styles[C]._mdf=E||m.styles[C]._mdf}}function l(p,m,g){var b=m.style;(m.c._mdf||g)&&b.pElem.setAttribute("fill","rgb("+bmFloor(m.c.v[0])+","+bmFloor(m.c.v[1])+","+bmFloor(m.c.v[2])+")"),(m.o._mdf||g)&&b.pElem.setAttribute("fill-opacity",m.o.v)}function u(p,m,g){d(p,m,g),f(p,m,g)}function d(p,m,g){var b,_,R,E,S,C=m.gf,T=m.g._hasOpacity,A=m.s.v,M=m.e.v;if(m.o._mdf||g){var I=p.ty==="gf"?"fill-opacity":"stroke-opacity";m.style.pElem.setAttribute(I,m.o.v)}if(m.s._mdf||g){var O=p.t===1?"x1":"cx",N=O==="x1"?"y1":"cy";C.setAttribute(O,A[0]),C.setAttribute(N,A[1]),T&&!m.g._collapsable&&(m.of.setAttribute(O,A[0]),m.of.setAttribute(N,A[1]))}if(m.g._cmdf||g){b=m.cst;var j=m.g.c;for(R=b.length,_=0;_<R;_+=1)(E=b[_]).setAttribute("offset",j[4*_]+"%"),E.setAttribute("stop-color","rgb("+j[4*_+1]+","+j[4*_+2]+","+j[4*_+3]+")")}if(T&&(m.g._omdf||g)){var D=m.g.o;for(R=(b=m.g._collapsable?m.cst:m.ost).length,_=0;_<R;_+=1)E=b[_],m.g._collapsable||E.setAttribute("offset",D[2*_]+"%"),E.setAttribute("stop-opacity",D[2*_+1])}if(p.t===1)(m.e._mdf||g)&&(C.setAttribute("x2",M[0]),C.setAttribute("y2",M[1]),T&&!m.g._collapsable&&(m.of.setAttribute("x2",M[0]),m.of.setAttribute("y2",M[1])));else if((m.s._mdf||m.e._mdf||g)&&(S=Math.sqrt(Math.pow(A[0]-M[0],2)+Math.pow(A[1]-M[1],2)),C.setAttribute("r",S),T&&!m.g._collapsable&&m.of.setAttribute("r",S)),m.e._mdf||m.h._mdf||m.a._mdf||g){S||(S=Math.sqrt(Math.pow(A[0]-M[0],2)+Math.pow(A[1]-M[1],2)));var F=Math.atan2(M[1]-A[1],M[0]-A[0]),L=m.h.v;L>=1?L=.99:L<=-1&&(L=-.99);var B=S*L,V=Math.cos(F+m.a.v)*B+A[0],H=Math.sin(F+m.a.v)*B+A[1];C.setAttribute("fx",V),C.setAttribute("fy",H),T&&!m.g._collapsable&&(m.of.setAttribute("fx",V),m.of.setAttribute("fy",H))}}function f(p,m,g){var b=m.style,_=m.d;_&&(_._mdf||g)&&_.dashStr&&(b.pElem.setAttribute("stroke-dasharray",_.dashStr),b.pElem.setAttribute("stroke-dashoffset",_.dashoffset[0])),m.c&&(m.c._mdf||g)&&b.pElem.setAttribute("stroke","rgb("+bmFloor(m.c.v[0])+","+bmFloor(m.c.v[1])+","+bmFloor(m.c.v[2])+")"),(m.o._mdf||g)&&b.pElem.setAttribute("stroke-opacity",m.o.v),(m.w._mdf||g)&&(b.pElem.setAttribute("stroke-width",m.w.v),b.msElem&&b.msElem.setAttribute("stroke-width",m.w.v))}return{createRenderFunction:function(p){switch(p.ty){case"fl":return l;case"gf":return d;case"gs":return u;case"st":return f;case"sh":case"el":case"rc":case"sr":return o;case"tr":return n;case"no":return i;default:return null}}}}();function SVGShapeElement(e,t,n){this.shapes=[],this.shapesData=e.shapes,this.stylesList=[],this.shapeModifiers=[],this.itemsData=[],this.processedElements=[],this.animatedContents=[],this.initElement(e,t,n),this.prevViewData=[]}function LetterProps(e,t,n,i,o,l){this.o=e,this.sw=t,this.sc=n,this.fc=i,this.m=o,this.p=l,this._mdf={o:!0,sw:!!t,sc:!!n,fc:!!i,m:!0,p:!0}}function TextProperty(e,t){this._frameId=initialDefaultFrame,this.pv="",this.v="",this.kf=!1,this._isFirstFrame=!0,this._mdf=!1,t.d&&t.d.sid&&(t.d=e.globalData.slotManager.getProp(t.d)),this.data=t,this.elem=e,this.comp=this.elem.comp,this.keysIndex=0,this.canResize=!1,this.minimumFontSize=1,this.effectsSequence=[],this.currentData={ascent:0,boxWidth:this.defaultBoxWidth,f:"",fStyle:"",fWeight:"",fc:"",j:"",justifyOffset:"",l:[],lh:0,lineWidths:[],ls:"",of:"",s:"",sc:"",sw:0,t:0,tr:0,sz:0,ps:null,fillColorAnim:!1,strokeColorAnim:!1,strokeWidthAnim:!1,yOffset:0,finalSize:0,finalText:[],finalLineHeight:0,__complete:!1},this.copyData(this.currentData,this.data.d.k[0].s),this.searchProperty()||this.completeTextData(this.currentData)}extendPrototype([BaseElement,TransformElement,SVGBaseElement,IShapeElement,HierarchyElement,FrameElement,RenderableDOMElement],SVGShapeElement),SVGShapeElement.prototype.initSecondaryElement=function(){},SVGShapeElement.prototype.identityMatrix=new Matrix,SVGShapeElement.prototype.buildExpressionInterface=function(){},SVGShapeElement.prototype.createContent=function(){this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.layerElement,0,[],!0),this.filterUniqueShapes()},SVGShapeElement.prototype.filterUniqueShapes=function(){var e,t,n,i,o=this.shapes.length,l=this.stylesList.length,u=[],d=!1;for(n=0;n<l;n+=1){for(i=this.stylesList[n],d=!1,u.length=0,e=0;e<o;e+=1)(t=this.shapes[e]).styles.indexOf(i)!==-1&&(u.push(t),d=t._isAnimated||d);u.length>1&&d&&this.setShapesAsAnimated(u)}},SVGShapeElement.prototype.setShapesAsAnimated=function(e){var t,n=e.length;for(t=0;t<n;t+=1)e[t].setAsAnimated()},SVGShapeElement.prototype.createStyleElement=function(e,t){var n,i=new SVGStyleData(e,t),o=i.pElem;return e.ty==="st"?n=new SVGStrokeStyleData(this,e,i):e.ty==="fl"?n=new SVGFillStyleData(this,e,i):e.ty==="gf"||e.ty==="gs"?(n=new(e.ty==="gf"?SVGGradientFillStyleData:SVGGradientStrokeStyleData)(this,e,i),this.globalData.defs.appendChild(n.gf),n.maskId&&(this.globalData.defs.appendChild(n.ms),this.globalData.defs.appendChild(n.of),o.setAttribute("mask","url("+getLocationHref()+"#"+n.maskId+")"))):e.ty==="no"&&(n=new SVGNoStyleData(this,e,i)),e.ty!=="st"&&e.ty!=="gs"||(o.setAttribute("stroke-linecap",lineCapEnum[e.lc||2]),o.setAttribute("stroke-linejoin",lineJoinEnum[e.lj||2]),o.setAttribute("fill-opacity","0"),e.lj===1&&o.setAttribute("stroke-miterlimit",e.ml)),e.r===2&&o.setAttribute("fill-rule","evenodd"),e.ln&&o.setAttribute("id",e.ln),e.cl&&o.setAttribute("class",e.cl),e.bm&&(o.style["mix-blend-mode"]=getBlendMode(e.bm)),this.stylesList.push(i),this.addToAnimatedContents(e,n),n},SVGShapeElement.prototype.createGroupElement=function(e){var t=new ShapeGroupData;return e.ln&&t.gr.setAttribute("id",e.ln),e.cl&&t.gr.setAttribute("class",e.cl),e.bm&&(t.gr.style["mix-blend-mode"]=getBlendMode(e.bm)),t},SVGShapeElement.prototype.createTransformElement=function(e,t){var n=TransformPropertyFactory.getTransformProperty(this,e,this),i=new SVGTransformData(n,n.o,t);return this.addToAnimatedContents(e,i),i},SVGShapeElement.prototype.createShapeElement=function(e,t,n){var i=4;e.ty==="rc"?i=5:e.ty==="el"?i=6:e.ty==="sr"&&(i=7);var o=new SVGShapeData(t,n,ShapePropertyFactory.getShapeProp(this,e,i,this));return this.shapes.push(o),this.addShapeToModifiers(o),this.addToAnimatedContents(e,o),o},SVGShapeElement.prototype.addToAnimatedContents=function(e,t){for(var n=0,i=this.animatedContents.length;n<i;){if(this.animatedContents[n].element===t)return;n+=1}this.animatedContents.push({fn:SVGElementsRenderer.createRenderFunction(e),element:t,data:e})},SVGShapeElement.prototype.setElementStyles=function(e){var t,n=e.styles,i=this.stylesList.length;for(t=0;t<i;t+=1)this.stylesList[t].closed||n.push(this.stylesList[t])},SVGShapeElement.prototype.reloadShapes=function(){var e;this._isFirstFrame=!0;var t=this.itemsData.length;for(e=0;e<t;e+=1)this.prevViewData[e]=this.itemsData[e];for(this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.layerElement,0,[],!0),this.filterUniqueShapes(),t=this.dynamicProperties.length,e=0;e<t;e+=1)this.dynamicProperties[e].getValue();this.renderModifiers()},SVGShapeElement.prototype.searchShapes=function(e,t,n,i,o,l,u){var d,f,p,m,g,b,_=[].concat(l),R=e.length-1,E=[],S=[];for(d=R;d>=0;d-=1){if((b=this.searchProcessedElement(e[d]))?t[d]=n[b-1]:e[d]._render=u,e[d].ty==="fl"||e[d].ty==="st"||e[d].ty==="gf"||e[d].ty==="gs"||e[d].ty==="no")b?t[d].style.closed=!1:t[d]=this.createStyleElement(e[d],o),e[d]._render&&t[d].style.pElem.parentNode!==i&&i.appendChild(t[d].style.pElem),E.push(t[d].style);else if(e[d].ty==="gr"){if(b)for(p=t[d].it.length,f=0;f<p;f+=1)t[d].prevViewData[f]=t[d].it[f];else t[d]=this.createGroupElement(e[d]);this.searchShapes(e[d].it,t[d].it,t[d].prevViewData,t[d].gr,o+1,_,u),e[d]._render&&t[d].gr.parentNode!==i&&i.appendChild(t[d].gr)}else e[d].ty==="tr"?(b||(t[d]=this.createTransformElement(e[d],i)),m=t[d].transform,_.push(m)):e[d].ty==="sh"||e[d].ty==="rc"||e[d].ty==="el"||e[d].ty==="sr"?(b||(t[d]=this.createShapeElement(e[d],_,o)),this.setElementStyles(t[d])):e[d].ty==="tm"||e[d].ty==="rd"||e[d].ty==="ms"||e[d].ty==="pb"||e[d].ty==="zz"||e[d].ty==="op"?(b?(g=t[d]).closed=!1:((g=ShapeModifiers.getModifier(e[d].ty)).init(this,e[d]),t[d]=g,this.shapeModifiers.push(g)),S.push(g)):e[d].ty==="rp"&&(b?(g=t[d]).closed=!0:(g=ShapeModifiers.getModifier(e[d].ty),t[d]=g,g.init(this,e,d,t),this.shapeModifiers.push(g),u=!1),S.push(g));this.addProcessedElement(e[d],d+1)}for(R=E.length,d=0;d<R;d+=1)E[d].closed=!0;for(R=S.length,d=0;d<R;d+=1)S[d].closed=!0},SVGShapeElement.prototype.renderInnerContent=function(){var e;this.renderModifiers();var t=this.stylesList.length;for(e=0;e<t;e+=1)this.stylesList[e].reset();for(this.renderShape(),e=0;e<t;e+=1)(this.stylesList[e]._mdf||this._isFirstFrame)&&(this.stylesList[e].msElem&&(this.stylesList[e].msElem.setAttribute("d",this.stylesList[e].d),this.stylesList[e].d="M0 0"+this.stylesList[e].d),this.stylesList[e].pElem.setAttribute("d",this.stylesList[e].d||"M0 0"))},SVGShapeElement.prototype.renderShape=function(){var e,t,n=this.animatedContents.length;for(e=0;e<n;e+=1)t=this.animatedContents[e],(this._isFirstFrame||t.element._isAnimated)&&t.data!==!0&&t.fn(t.data,t.element,this._isFirstFrame)},SVGShapeElement.prototype.destroy=function(){this.destroyBaseElement(),this.shapesData=null,this.itemsData=null},LetterProps.prototype.update=function(e,t,n,i,o,l){this._mdf.o=!1,this._mdf.sw=!1,this._mdf.sc=!1,this._mdf.fc=!1,this._mdf.m=!1,this._mdf.p=!1;var u=!1;return this.o!==e&&(this.o=e,this._mdf.o=!0,u=!0),this.sw!==t&&(this.sw=t,this._mdf.sw=!0,u=!0),this.sc!==n&&(this.sc=n,this._mdf.sc=!0,u=!0),this.fc!==i&&(this.fc=i,this._mdf.fc=!0,u=!0),this.m!==o&&(this.m=o,this._mdf.m=!0,u=!0),!l.length||this.p[0]===l[0]&&this.p[1]===l[1]&&this.p[4]===l[4]&&this.p[5]===l[5]&&this.p[12]===l[12]&&this.p[13]===l[13]||(this.p=l,this._mdf.p=!0,u=!0),u},TextProperty.prototype.defaultBoxWidth=[0,0],TextProperty.prototype.copyData=function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},TextProperty.prototype.setCurrentData=function(e){e.__complete||this.completeTextData(e),this.currentData=e,this.currentData.boxWidth=this.currentData.boxWidth||this.defaultBoxWidth,this._mdf=!0},TextProperty.prototype.searchProperty=function(){return this.searchKeyframes()},TextProperty.prototype.searchKeyframes=function(){return this.kf=this.data.d.k.length>1,this.kf&&this.addEffect(this.getKeyframeValue.bind(this)),this.kf},TextProperty.prototype.addEffect=function(e){this.effectsSequence.push(e),this.elem.addDynamicProperty(this)},TextProperty.prototype.getValue=function(e){if(this.elem.globalData.frameId!==this.frameId&&this.effectsSequence.length||e){this.currentData.t=this.data.d.k[this.keysIndex].s.t;var t=this.currentData,n=this.keysIndex;if(this.lock)this.setCurrentData(this.currentData);else{var i;this.lock=!0,this._mdf=!1;var o=this.effectsSequence.length,l=e||this.data.d.k[this.keysIndex].s;for(i=0;i<o;i+=1)l=n!==this.keysIndex?this.effectsSequence[i](l,l.t):this.effectsSequence[i](this.currentData,l.t);t!==l&&this.setCurrentData(l),this.v=this.currentData,this.pv=this.v,this.lock=!1,this.frameId=this.elem.globalData.frameId}}},TextProperty.prototype.getKeyframeValue=function(){for(var e=this.data.d.k,t=this.elem.comp.renderedFrame,n=0,i=e.length;n<=i-1&&!(n===i-1||e[n+1].t>t);)n+=1;return this.keysIndex!==n&&(this.keysIndex=n),this.data.d.k[this.keysIndex].s},TextProperty.prototype.buildFinalText=function(e){for(var t,n,i=[],o=0,l=e.length,u=!1,d=!1,f="";o<l;)u=d,d=!1,t=e.charCodeAt(o),f=e.charAt(o),FontManager.isCombinedCharacter(t)?u=!0:t>=55296&&t<=56319?FontManager.isRegionalFlag(e,o)?f=e.substr(o,14):(n=e.charCodeAt(o+1))>=56320&&n<=57343&&(FontManager.isModifier(t,n)?(f=e.substr(o,2),u=!0):f=FontManager.isFlagEmoji(e.substr(o,4))?e.substr(o,4):e.substr(o,2)):t>56319?(n=e.charCodeAt(o+1),FontManager.isVariationSelector(t)&&(u=!0)):FontManager.isZeroWidthJoiner(t)&&(u=!0,d=!0),u?(i[i.length-1]+=f,u=!1):i.push(f),o+=f.length;return i},TextProperty.prototype.completeTextData=function(e){e.__complete=!0;var t,n,i,o,l,u,d,f=this.elem.globalData.fontManager,p=this.data,m=[],g=0,b=p.m.g,_=0,R=0,E=0,S=[],C=0,T=0,A=f.getFontByName(e.f),M=0,I=getFontProperties(A);e.fWeight=I.weight,e.fStyle=I.style,e.finalSize=e.s,e.finalText=this.buildFinalText(e.t),n=e.finalText.length,e.finalLineHeight=e.lh;var O,N=e.tr/1e3*e.finalSize;if(e.sz)for(var j,D,F=!0,L=e.sz[0],B=e.sz[1];F;){j=0,C=0,n=(D=this.buildFinalText(e.t)).length,N=e.tr/1e3*e.finalSize;var V=-1;for(t=0;t<n;t+=1)O=D[t].charCodeAt(0),i=!1,D[t]===" "?V=t:O!==13&&O!==3||(C=0,i=!0,j+=e.finalLineHeight||1.2*e.finalSize),f.chars?(d=f.getCharData(D[t],A.fStyle,A.fFamily),M=i?0:d.w*e.finalSize/100):M=f.measureText(D[t],e.f,e.finalSize),C+M>L&&D[t]!==" "?(V===-1?n+=1:t=V,j+=e.finalLineHeight||1.2*e.finalSize,D.splice(t,V===t?1:0,"\r"),V=-1,C=0):(C+=M,C+=N);j+=A.ascent*e.finalSize/100,this.canResize&&e.finalSize>this.minimumFontSize&&B<j?(e.finalSize-=1,e.finalLineHeight=e.finalSize*e.lh/e.s):(e.finalText=D,n=e.finalText.length,F=!1)}C=-N,M=0;var H,z=0;for(t=0;t<n;t+=1)if(i=!1,(O=(H=e.finalText[t]).charCodeAt(0))===13||O===3?(z=0,S.push(C),T=C>T?C:T,C=-2*N,o="",i=!0,E+=1):o=H,f.chars?(d=f.getCharData(H,A.fStyle,f.getFontByName(e.f).fFamily),M=i?0:d.w*e.finalSize/100):M=f.measureText(o,e.f,e.finalSize),H===" "?z+=M+N:(C+=M+N+z,z=0),m.push({l:M,an:M,add:_,n:i,anIndexes:[],val:o,line:E,animatorJustifyOffset:0}),b==2){if(_+=M,o===""||o===" "||t===n-1){for(o!==""&&o!==" "||(_-=M);R<=t;)m[R].an=_,m[R].ind=g,m[R].extra=M,R+=1;g+=1,_=0}}else if(b==3){if(_+=M,o===""||t===n-1){for(o===""&&(_-=M);R<=t;)m[R].an=_,m[R].ind=g,m[R].extra=M,R+=1;_=0,g+=1}}else m[g].ind=g,m[g].extra=0,g+=1;if(e.l=m,T=C>T?C:T,S.push(C),e.sz)e.boxWidth=e.sz[0],e.justifyOffset=0;else switch(e.boxWidth=T,e.j){case 1:e.justifyOffset=-e.boxWidth;break;case 2:e.justifyOffset=-e.boxWidth/2;break;default:e.justifyOffset=0}e.lineWidths=S;var U,Q,q,W,G=p.a;u=G.length;var K=[];for(l=0;l<u;l+=1){for((U=G[l]).a.sc&&(e.strokeColorAnim=!0),U.a.sw&&(e.strokeWidthAnim=!0),(U.a.fc||U.a.fh||U.a.fs||U.a.fb)&&(e.fillColorAnim=!0),W=0,q=U.s.b,t=0;t<n;t+=1)(Q=m[t]).anIndexes[l]=W,(q==1&&Q.val!==""||q==2&&Q.val!==""&&Q.val!==" "||q==3&&(Q.n||Q.val==" "||t==n-1)||q==4&&(Q.n||t==n-1))&&(U.s.rn===1&&K.push(W),W+=1);p.a[l].s.totalChars=W;var J,ee=-1;if(U.s.rn===1)for(t=0;t<n;t+=1)ee!=(Q=m[t]).anIndexes[l]&&(ee=Q.anIndexes[l],J=K.splice(Math.floor(Math.random()*K.length),1)[0]),Q.anIndexes[l]=J}e.yOffset=e.finalLineHeight||1.2*e.finalSize,e.ls=e.ls||0,e.ascent=A.ascent*e.finalSize/100},TextProperty.prototype.updateDocumentData=function(e,t){t=t===void 0?this.keysIndex:t;var n=this.copyData({},this.data.d.k[t].s);n=this.copyData(n,e),this.data.d.k[t].s=n,this.recalculate(t),this.setCurrentData(n),this.elem.addDynamicProperty(this)},TextProperty.prototype.recalculate=function(e){var t=this.data.d.k[e].s;t.__complete=!1,this.keysIndex=0,this._isFirstFrame=!0,this.getValue(t)},TextProperty.prototype.canResizeFont=function(e){this.canResize=e,this.recalculate(this.keysIndex),this.elem.addDynamicProperty(this)},TextProperty.prototype.setMinimumFontSize=function(e){this.minimumFontSize=Math.floor(e)||1,this.recalculate(this.keysIndex),this.elem.addDynamicProperty(this)};var TextSelectorProp=function(){var e=Math.max,t=Math.min,n=Math.floor;function i(o,l){this._currentTextLength=-1,this.k=!1,this.data=l,this.elem=o,this.comp=o.comp,this.finalS=0,this.finalE=0,this.initDynamicPropertyContainer(o),this.s=PropertyFactory.getProp(o,l.s||{k:0},0,0,this),this.e="e"in l?PropertyFactory.getProp(o,l.e,0,0,this):{v:100},this.o=PropertyFactory.getProp(o,l.o||{k:0},0,0,this),this.xe=PropertyFactory.getProp(o,l.xe||{k:0},0,0,this),this.ne=PropertyFactory.getProp(o,l.ne||{k:0},0,0,this),this.sm=PropertyFactory.getProp(o,l.sm||{k:100},0,0,this),this.a=PropertyFactory.getProp(o,l.a,0,.01,this),this.dynamicProperties.length||this.getValue()}return i.prototype={getMult:function(o){this._currentTextLength!==this.elem.textProperty.currentData.l.length&&this.getValue();var l=0,u=0,d=1,f=1;this.ne.v>0?l=this.ne.v/100:u=-this.ne.v/100,this.xe.v>0?d=1-this.xe.v/100:f=1+this.xe.v/100;var p=BezierFactory.getBezierEasing(l,u,d,f).get,m=0,g=this.finalS,b=this.finalE,_=this.data.sh;if(_===2)m=p(m=b===g?o>=b?1:0:e(0,t(.5/(b-g)+(o-g)/(b-g),1)));else if(_===3)m=p(m=b===g?o>=b?0:1:1-e(0,t(.5/(b-g)+(o-g)/(b-g),1)));else if(_===4)b===g?m=0:(m=e(0,t(.5/(b-g)+(o-g)/(b-g),1)))<.5?m*=2:m=1-2*(m-.5),m=p(m);else if(_===5){if(b===g)m=0;else{var R=b-g,E=-R/2+(o=t(e(0,o+.5-g),b-g)),S=R/2;m=Math.sqrt(1-E*E/(S*S))}m=p(m)}else _===6?(b===g?m=0:(o=t(e(0,o+.5-g),b-g),m=(1+Math.cos(Math.PI+2*Math.PI*o/(b-g)))/2),m=p(m)):(o>=n(g)&&(m=e(0,t(o-g<0?t(b,1)-(g-o):b-o,1))),m=p(m));if(this.sm.v!==100){var C=.01*this.sm.v;C===0&&(C=1e-8);var T=.5-.5*C;m<T?m=0:(m=(m-T)/C)>1&&(m=1)}return m*this.a.v},getValue:function(o){this.iterateDynamicProperties(),this._mdf=o||this._mdf,this._currentTextLength=this.elem.textProperty.currentData.l.length||0,o&&this.data.r===2&&(this.e.v=this._currentTextLength);var l=this.data.r===2?1:100/this.data.totalChars,u=this.o.v/l,d=this.s.v/l+u,f=this.e.v/l+u;if(d>f){var p=d;d=f,f=p}this.finalS=d,this.finalE=f}},extendPrototype([DynamicPropertyContainer],i),{getTextSelectorProp:function(o,l,u){return new i(o,l)}}}();function TextAnimatorDataProperty(e,t,n){var i={propType:!1},o=PropertyFactory.getProp,l=t.a;this.a={r:l.r?o(e,l.r,0,degToRads,n):i,rx:l.rx?o(e,l.rx,0,degToRads,n):i,ry:l.ry?o(e,l.ry,0,degToRads,n):i,sk:l.sk?o(e,l.sk,0,degToRads,n):i,sa:l.sa?o(e,l.sa,0,degToRads,n):i,s:l.s?o(e,l.s,1,.01,n):i,a:l.a?o(e,l.a,1,0,n):i,o:l.o?o(e,l.o,0,.01,n):i,p:l.p?o(e,l.p,1,0,n):i,sw:l.sw?o(e,l.sw,0,0,n):i,sc:l.sc?o(e,l.sc,1,0,n):i,fc:l.fc?o(e,l.fc,1,0,n):i,fh:l.fh?o(e,l.fh,0,0,n):i,fs:l.fs?o(e,l.fs,0,.01,n):i,fb:l.fb?o(e,l.fb,0,.01,n):i,t:l.t?o(e,l.t,0,0,n):i},this.s=TextSelectorProp.getTextSelectorProp(e,t.s,n),this.s.t=t.s.t}function TextAnimatorProperty(e,t,n){this._isFirstFrame=!0,this._hasMaskedPath=!1,this._frameId=-1,this._textData=e,this._renderType=t,this._elem=n,this._animatorsData=createSizedArray(this._textData.a.length),this._pathData={},this._moreOptions={alignment:{}},this.renderedLetters=[],this.lettersChangedFlag=!1,this.initDynamicPropertyContainer(n)}function ITextElement(){}TextAnimatorProperty.prototype.searchProperties=function(){var e,t,n=this._textData.a.length,i=PropertyFactory.getProp;for(e=0;e<n;e+=1)t=this._textData.a[e],this._animatorsData[e]=new TextAnimatorDataProperty(this._elem,t,this);this._textData.p&&"m"in this._textData.p?(this._pathData={a:i(this._elem,this._textData.p.a,0,0,this),f:i(this._elem,this._textData.p.f,0,0,this),l:i(this._elem,this._textData.p.l,0,0,this),r:i(this._elem,this._textData.p.r,0,0,this),p:i(this._elem,this._textData.p.p,0,0,this),m:this._elem.maskManager.getMaskProperty(this._textData.p.m)},this._hasMaskedPath=!0):this._hasMaskedPath=!1,this._moreOptions.alignment=i(this._elem,this._textData.m.a,1,0,this)},TextAnimatorProperty.prototype.getMeasures=function(e,t){if(this.lettersChangedFlag=t,this._mdf||this._isFirstFrame||t||this._hasMaskedPath&&this._pathData.m._mdf){this._isFirstFrame=!1;var n,i,o,l,u,d,f,p,m,g,b,_,R,E,S,C,T,A,M,I=this._moreOptions.alignment.v,O=this._animatorsData,N=this._textData,j=this.mHelper,D=this._renderType,F=this.renderedLetters.length,L=e.l;if(this._hasMaskedPath){if(M=this._pathData.m,!this._pathData.n||this._pathData._mdf){var B,V=M.v;for(this._pathData.r.v&&(V=V.reverse()),u={tLength:0,segments:[]},l=V._length-1,C=0,o=0;o<l;o+=1)B=bez.buildBezierData(V.v[o],V.v[o+1],[V.o[o][0]-V.v[o][0],V.o[o][1]-V.v[o][1]],[V.i[o+1][0]-V.v[o+1][0],V.i[o+1][1]-V.v[o+1][1]]),u.tLength+=B.segmentLength,u.segments.push(B),C+=B.segmentLength;o=l,M.v.c&&(B=bez.buildBezierData(V.v[o],V.v[0],[V.o[o][0]-V.v[o][0],V.o[o][1]-V.v[o][1]],[V.i[0][0]-V.v[0][0],V.i[0][1]-V.v[0][1]]),u.tLength+=B.segmentLength,u.segments.push(B),C+=B.segmentLength),this._pathData.pi=u}if(u=this._pathData.pi,d=this._pathData.f.v,b=0,g=1,p=0,m=!0,E=u.segments,d<0&&M.v.c)for(u.tLength<Math.abs(d)&&(d=-Math.abs(d)%u.tLength),g=(R=E[b=E.length-1].points).length-1;d<0;)d+=R[g].partialLength,(g-=1)<0&&(g=(R=E[b-=1].points).length-1);_=(R=E[b].points)[g-1],S=(f=R[g]).partialLength}l=L.length,n=0,i=0;var H,z,U,Q,q,W=1.2*e.finalSize*.714,G=!0;U=O.length;var K,J,ee,ne,ae,oe,se,ce,ie,ue,le,Z,fe=-1,te=d,de=b,pe=g,me=-1,ye="",he=this.defaultPropsArray;if(e.j===2||e.j===1){var ge=0,Se=0,ve=e.j===2?-.5:-1,_e=0,xe=!0;for(o=0;o<l;o+=1)if(L[o].n){for(ge&&(ge+=Se);_e<o;)L[_e].animatorJustifyOffset=ge,_e+=1;ge=0,xe=!0}else{for(z=0;z<U;z+=1)(H=O[z].a).t.propType&&(xe&&e.j===2&&(Se+=H.t.v*ve),(q=O[z].s.getMult(L[o].anIndexes[z],N.a[z].s.totalChars)).length?ge+=H.t.v*q[0]*ve:ge+=H.t.v*q*ve);xe=!1}for(ge&&(ge+=Se);_e<o;)L[_e].animatorJustifyOffset=ge,_e+=1}for(o=0;o<l;o+=1){if(j.reset(),ne=1,L[o].n)n=0,i+=e.yOffset,i+=G?1:0,d=te,G=!1,this._hasMaskedPath&&(g=pe,_=(R=E[b=de].points)[g-1],S=(f=R[g]).partialLength,p=0),ye="",le="",ie="",Z="",he=this.defaultPropsArray;else{if(this._hasMaskedPath){if(me!==L[o].line){switch(e.j){case 1:d+=C-e.lineWidths[L[o].line];break;case 2:d+=(C-e.lineWidths[L[o].line])/2}me=L[o].line}fe!==L[o].ind&&(L[fe]&&(d+=L[fe].extra),d+=L[o].an/2,fe=L[o].ind),d+=I[0]*L[o].an*.005;var be=0;for(z=0;z<U;z+=1)(H=O[z].a).p.propType&&((q=O[z].s.getMult(L[o].anIndexes[z],N.a[z].s.totalChars)).length?be+=H.p.v[0]*q[0]:be+=H.p.v[0]*q),H.a.propType&&((q=O[z].s.getMult(L[o].anIndexes[z],N.a[z].s.totalChars)).length?be+=H.a.v[0]*q[0]:be+=H.a.v[0]*q);for(m=!0,this._pathData.a.v&&(d=.5*L[0].an+(C-this._pathData.f.v-.5*L[0].an-.5*L[L.length-1].an)*fe/(l-1),d+=this._pathData.f.v);m;)p+S>=d+be||!R?(T=(d+be-p)/f.partialLength,J=_.point[0]+(f.point[0]-_.point[0])*T,ee=_.point[1]+(f.point[1]-_.point[1])*T,j.translate(-I[0]*L[o].an*.005,-I[1]*W*.01),m=!1):R&&(p+=f.partialLength,(g+=1)>=R.length&&(g=0,E[b+=1]?R=E[b].points:M.v.c?(g=0,R=E[b=0].points):(p-=f.partialLength,R=null)),R&&(_=f,S=(f=R[g]).partialLength));K=L[o].an/2-L[o].add,j.translate(-K,0,0)}else K=L[o].an/2-L[o].add,j.translate(-K,0,0),j.translate(-I[0]*L[o].an*.005,-I[1]*W*.01,0);for(z=0;z<U;z+=1)(H=O[z].a).t.propType&&(q=O[z].s.getMult(L[o].anIndexes[z],N.a[z].s.totalChars),n===0&&e.j===0||(this._hasMaskedPath?q.length?d+=H.t.v*q[0]:d+=H.t.v*q:q.length?n+=H.t.v*q[0]:n+=H.t.v*q));for(e.strokeWidthAnim&&(oe=e.sw||0),e.strokeColorAnim&&(ae=e.sc?[e.sc[0],e.sc[1],e.sc[2]]:[0,0,0]),e.fillColorAnim&&e.fc&&(se=[e.fc[0],e.fc[1],e.fc[2]]),z=0;z<U;z+=1)(H=O[z].a).a.propType&&((q=O[z].s.getMult(L[o].anIndexes[z],N.a[z].s.totalChars)).length?j.translate(-H.a.v[0]*q[0],-H.a.v[1]*q[1],H.a.v[2]*q[2]):j.translate(-H.a.v[0]*q,-H.a.v[1]*q,H.a.v[2]*q));for(z=0;z<U;z+=1)(H=O[z].a).s.propType&&((q=O[z].s.getMult(L[o].anIndexes[z],N.a[z].s.totalChars)).length?j.scale(1+(H.s.v[0]-1)*q[0],1+(H.s.v[1]-1)*q[1],1):j.scale(1+(H.s.v[0]-1)*q,1+(H.s.v[1]-1)*q,1));for(z=0;z<U;z+=1){if(H=O[z].a,q=O[z].s.getMult(L[o].anIndexes[z],N.a[z].s.totalChars),H.sk.propType&&(q.length?j.skewFromAxis(-H.sk.v*q[0],H.sa.v*q[1]):j.skewFromAxis(-H.sk.v*q,H.sa.v*q)),H.r.propType&&(q.length?j.rotateZ(-H.r.v*q[2]):j.rotateZ(-H.r.v*q)),H.ry.propType&&(q.length?j.rotateY(H.ry.v*q[1]):j.rotateY(H.ry.v*q)),H.rx.propType&&(q.length?j.rotateX(H.rx.v*q[0]):j.rotateX(H.rx.v*q)),H.o.propType&&(q.length?ne+=(H.o.v*q[0]-ne)*q[0]:ne+=(H.o.v*q-ne)*q),e.strokeWidthAnim&&H.sw.propType&&(q.length?oe+=H.sw.v*q[0]:oe+=H.sw.v*q),e.strokeColorAnim&&H.sc.propType)for(ce=0;ce<3;ce+=1)q.length?ae[ce]+=(H.sc.v[ce]-ae[ce])*q[0]:ae[ce]+=(H.sc.v[ce]-ae[ce])*q;if(e.fillColorAnim&&e.fc){if(H.fc.propType)for(ce=0;ce<3;ce+=1)q.length?se[ce]+=(H.fc.v[ce]-se[ce])*q[0]:se[ce]+=(H.fc.v[ce]-se[ce])*q;H.fh.propType&&(se=q.length?addHueToRGB(se,H.fh.v*q[0]):addHueToRGB(se,H.fh.v*q)),H.fs.propType&&(se=q.length?addSaturationToRGB(se,H.fs.v*q[0]):addSaturationToRGB(se,H.fs.v*q)),H.fb.propType&&(se=q.length?addBrightnessToRGB(se,H.fb.v*q[0]):addBrightnessToRGB(se,H.fb.v*q))}}for(z=0;z<U;z+=1)(H=O[z].a).p.propType&&(q=O[z].s.getMult(L[o].anIndexes[z],N.a[z].s.totalChars),this._hasMaskedPath?q.length?j.translate(0,H.p.v[1]*q[0],-H.p.v[2]*q[1]):j.translate(0,H.p.v[1]*q,-H.p.v[2]*q):q.length?j.translate(H.p.v[0]*q[0],H.p.v[1]*q[1],-H.p.v[2]*q[2]):j.translate(H.p.v[0]*q,H.p.v[1]*q,-H.p.v[2]*q));if(e.strokeWidthAnim&&(ie=oe<0?0:oe),e.strokeColorAnim&&(ue="rgb("+Math.round(255*ae[0])+","+Math.round(255*ae[1])+","+Math.round(255*ae[2])+")"),e.fillColorAnim&&e.fc&&(le="rgb("+Math.round(255*se[0])+","+Math.round(255*se[1])+","+Math.round(255*se[2])+")"),this._hasMaskedPath){if(j.translate(0,-e.ls),j.translate(0,I[1]*W*.01+i,0),this._pathData.p.v){A=(f.point[1]-_.point[1])/(f.point[0]-_.point[0]);var Re=180*Math.atan(A)/Math.PI;f.point[0]<_.point[0]&&(Re+=180),j.rotate(-Re*Math.PI/180)}j.translate(J,ee,0),d-=I[0]*L[o].an*.005,L[o+1]&&fe!==L[o+1].ind&&(d+=L[o].an/2,d+=.001*e.tr*e.finalSize)}else{switch(j.translate(n,i,0),e.ps&&j.translate(e.ps[0],e.ps[1]+e.ascent,0),e.j){case 1:j.translate(L[o].animatorJustifyOffset+e.justifyOffset+(e.boxWidth-e.lineWidths[L[o].line]),0,0);break;case 2:j.translate(L[o].animatorJustifyOffset+e.justifyOffset+(e.boxWidth-e.lineWidths[L[o].line])/2,0,0)}j.translate(0,-e.ls),j.translate(K,0,0),j.translate(I[0]*L[o].an*.005,I[1]*W*.01,0),n+=L[o].l+.001*e.tr*e.finalSize}D==="html"?ye=j.toCSS():D==="svg"?ye=j.to2dCSS():he=[j.props[0],j.props[1],j.props[2],j.props[3],j.props[4],j.props[5],j.props[6],j.props[7],j.props[8],j.props[9],j.props[10],j.props[11],j.props[12],j.props[13],j.props[14],j.props[15]],Z=ne}F<=o?(Q=new LetterProps(Z,ie,ue,le,ye,he),this.renderedLetters.push(Q),F+=1,this.lettersChangedFlag=!0):(Q=this.renderedLetters[o],this.lettersChangedFlag=Q.update(Z,ie,ue,le,ye,he)||this.lettersChangedFlag)}}},TextAnimatorProperty.prototype.getValue=function(){this._elem.globalData.frameId!==this._frameId&&(this._frameId=this._elem.globalData.frameId,this.iterateDynamicProperties())},TextAnimatorProperty.prototype.mHelper=new Matrix,TextAnimatorProperty.prototype.defaultPropsArray=[],extendPrototype([DynamicPropertyContainer],TextAnimatorProperty),ITextElement.prototype.initElement=function(e,t,n){this.lettersChangedFlag=!0,this.initFrame(),this.initBaseData(e,t,n),this.textProperty=new TextProperty(this,e.t,this.dynamicProperties),this.textAnimator=new TextAnimatorProperty(e.t,this.renderType,this),this.initTransform(e,t,n),this.initHierarchy(),this.initRenderable(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),this.createContent(),this.hide(),this.textAnimator.searchProperties(this.dynamicProperties)},ITextElement.prototype.prepareFrame=function(e){this._mdf=!1,this.prepareRenderableFrame(e),this.prepareProperties(e,this.isInRange)},ITextElement.prototype.createPathShape=function(e,t){var n,i,o=t.length,l="";for(n=0;n<o;n+=1)t[n].ty==="sh"&&(i=t[n].ks.k,l+=buildShapeString(i,i.i.length,!0,e));return l},ITextElement.prototype.updateDocumentData=function(e,t){this.textProperty.updateDocumentData(e,t)},ITextElement.prototype.canResizeFont=function(e){this.textProperty.canResizeFont(e)},ITextElement.prototype.setMinimumFontSize=function(e){this.textProperty.setMinimumFontSize(e)},ITextElement.prototype.applyTextPropertiesToMatrix=function(e,t,n,i,o){switch(e.ps&&t.translate(e.ps[0],e.ps[1]+e.ascent,0),t.translate(0,-e.ls,0),e.j){case 1:t.translate(e.justifyOffset+(e.boxWidth-e.lineWidths[n]),0,0);break;case 2:t.translate(e.justifyOffset+(e.boxWidth-e.lineWidths[n])/2,0,0)}t.translate(i,o,0)},ITextElement.prototype.buildColor=function(e){return"rgb("+Math.round(255*e[0])+","+Math.round(255*e[1])+","+Math.round(255*e[2])+")"},ITextElement.prototype.emptyProp=new LetterProps,ITextElement.prototype.destroy=function(){},ITextElement.prototype.validateText=function(){(this.textProperty._mdf||this.textProperty._isFirstFrame)&&(this.buildNewText(),this.textProperty._isFirstFrame=!1,this.textProperty._mdf=!1)};var emptyShapeData={shapes:[]};function SVGTextLottieElement(e,t,n){this.textSpans=[],this.renderType="svg",this.initElement(e,t,n)}function ISolidElement(e,t,n){this.initElement(e,t,n)}function NullElement(e,t,n){this.initFrame(),this.initBaseData(e,t,n),this.initFrame(),this.initTransform(e,t,n),this.initHierarchy()}function SVGRendererBase(){}function ICompElement(){}function SVGCompElement(e,t,n){this.layers=e.layers,this.supports3d=!0,this.completeLayers=!1,this.pendingElements=[],this.elements=this.layers?createSizedArray(this.layers.length):[],this.initElement(e,t,n),this.tm=e.tm?PropertyFactory.getProp(this,e.tm,0,t.frameRate,this):{_placeholder:!0}}function SVGRenderer(e,t){this.animationItem=e,this.layers=null,this.renderedFrame=-1,this.svgElement=createNS("svg");var n="";if(t&&t.title){var i=createNS("title"),o=createElementID();i.setAttribute("id",o),i.textContent=t.title,this.svgElement.appendChild(i),n+=o}if(t&&t.description){var l=createNS("desc"),u=createElementID();l.setAttribute("id",u),l.textContent=t.description,this.svgElement.appendChild(l),n+=" "+u}n&&this.svgElement.setAttribute("aria-labelledby",n);var d=createNS("defs");this.svgElement.appendChild(d);var f=createNS("g");this.svgElement.appendChild(f),this.layerElement=f,this.renderConfig={preserveAspectRatio:t&&t.preserveAspectRatio||"xMidYMid meet",imagePreserveAspectRatio:t&&t.imagePreserveAspectRatio||"xMidYMid slice",contentVisibility:t&&t.contentVisibility||"visible",progressiveLoad:t&&t.progressiveLoad||!1,hideOnTransparent:!(t&&t.hideOnTransparent===!1),viewBoxOnly:t&&t.viewBoxOnly||!1,viewBoxSize:t&&t.viewBoxSize||!1,className:t&&t.className||"",id:t&&t.id||"",focusable:t&&t.focusable,filterSize:{width:t&&t.filterSize&&t.filterSize.width||"100%",height:t&&t.filterSize&&t.filterSize.height||"100%",x:t&&t.filterSize&&t.filterSize.x||"0%",y:t&&t.filterSize&&t.filterSize.y||"0%"},width:t&&t.width,height:t&&t.height,runExpressions:!t||t.runExpressions===void 0||t.runExpressions},this.globalData={_mdf:!1,frameNum:-1,defs:d,renderConfig:this.renderConfig},this.elements=[],this.pendingElements=[],this.destroyed=!1,this.rendererType="svg"}function ShapeTransformManager(){this.sequences={},this.sequenceList=[],this.transform_key_count=0}extendPrototype([BaseElement,TransformElement,SVGBaseElement,HierarchyElement,FrameElement,RenderableDOMElement,ITextElement],SVGTextLottieElement),SVGTextLottieElement.prototype.createContent=function(){this.data.singleShape&&!this.globalData.fontManager.chars&&(this.textContainer=createNS("text"))},SVGTextLottieElement.prototype.buildTextContents=function(e){for(var t=0,n=e.length,i=[],o="";t<n;)e[t]==="\r"||e[t]===""?(i.push(o),o=""):o+=e[t],t+=1;return i.push(o),i},SVGTextLottieElement.prototype.buildShapeData=function(e,t){if(e.shapes&&e.shapes.length){var n=e.shapes[0];if(n.it){var i=n.it[n.it.length-1];i.s&&(i.s.k[0]=t,i.s.k[1]=t)}}return e},SVGTextLottieElement.prototype.buildNewText=function(){var e,t;this.addDynamicProperty(this);var n=this.textProperty.currentData;this.renderedLetters=createSizedArray(n?n.l.length:0),n.fc?this.layerElement.setAttribute("fill",this.buildColor(n.fc)):this.layerElement.setAttribute("fill","rgba(0,0,0,0)"),n.sc&&(this.layerElement.setAttribute("stroke",this.buildColor(n.sc)),this.layerElement.setAttribute("stroke-width",n.sw)),this.layerElement.setAttribute("font-size",n.finalSize);var i=this.globalData.fontManager.getFontByName(n.f);if(i.fClass)this.layerElement.setAttribute("class",i.fClass);else{this.layerElement.setAttribute("font-family",i.fFamily);var o=n.fWeight,l=n.fStyle;this.layerElement.setAttribute("font-style",l),this.layerElement.setAttribute("font-weight",o)}this.layerElement.setAttribute("aria-label",n.t);var u,d=n.l||[],f=!!this.globalData.fontManager.chars;t=d.length;var p=this.mHelper,m=this.data.singleShape,g=0,b=0,_=!0,R=.001*n.tr*n.finalSize;if(!m||f||n.sz){var E,S=this.textSpans.length;for(e=0;e<t;e+=1){if(this.textSpans[e]||(this.textSpans[e]={span:null,childSpan:null,glyph:null}),!f||!m||e===0){if(u=S>e?this.textSpans[e].span:createNS(f?"g":"text"),S<=e){if(u.setAttribute("stroke-linecap","butt"),u.setAttribute("stroke-linejoin","round"),u.setAttribute("stroke-miterlimit","4"),this.textSpans[e].span=u,f){var C=createNS("g");u.appendChild(C),this.textSpans[e].childSpan=C}this.textSpans[e].span=u,this.layerElement.appendChild(u)}u.style.display="inherit"}if(p.reset(),m&&(d[e].n&&(g=-R,b+=n.yOffset,b+=_?1:0,_=!1),this.applyTextPropertiesToMatrix(n,p,d[e].line,g,b),g+=d[e].l||0,g+=R),f){var T;if((E=this.globalData.fontManager.getCharData(n.finalText[e],i.fStyle,this.globalData.fontManager.getFontByName(n.f).fFamily)).t===1)T=new SVGCompElement(E.data,this.globalData,this);else{var A=emptyShapeData;E.data&&E.data.shapes&&(A=this.buildShapeData(E.data,n.finalSize)),T=new SVGShapeElement(A,this.globalData,this)}if(this.textSpans[e].glyph){var M=this.textSpans[e].glyph;this.textSpans[e].childSpan.removeChild(M.layerElement),M.destroy()}this.textSpans[e].glyph=T,T._debug=!0,T.prepareFrame(0),T.renderFrame(),this.textSpans[e].childSpan.appendChild(T.layerElement),E.t===1&&this.textSpans[e].childSpan.setAttribute("transform","scale("+n.finalSize/100+","+n.finalSize/100+")")}else m&&u.setAttribute("transform","translate("+p.props[12]+","+p.props[13]+")"),u.textContent=d[e].val,u.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve")}m&&u&&u.setAttribute("d","")}else{var I=this.textContainer,O="start";switch(n.j){case 1:O="end";break;case 2:O="middle";break;default:O="start"}I.setAttribute("text-anchor",O),I.setAttribute("letter-spacing",R);var N=this.buildTextContents(n.finalText);for(t=N.length,b=n.ps?n.ps[1]+n.ascent:0,e=0;e<t;e+=1)(u=this.textSpans[e].span||createNS("tspan")).textContent=N[e],u.setAttribute("x",0),u.setAttribute("y",b),u.style.display="inherit",I.appendChild(u),this.textSpans[e]||(this.textSpans[e]={span:null,glyph:null}),this.textSpans[e].span=u,b+=n.finalLineHeight;this.layerElement.appendChild(I)}for(;e<this.textSpans.length;)this.textSpans[e].span.style.display="none",e+=1;this._sizeChanged=!0},SVGTextLottieElement.prototype.sourceRectAtTime=function(){if(this.prepareFrame(this.comp.renderedFrame-this.data.st),this.renderInnerContent(),this._sizeChanged){this._sizeChanged=!1;var e=this.layerElement.getBBox();this.bbox={top:e.y,left:e.x,width:e.width,height:e.height}}return this.bbox},SVGTextLottieElement.prototype.getValue=function(){var e,t,n=this.textSpans.length;for(this.renderedFrame=this.comp.renderedFrame,e=0;e<n;e+=1)(t=this.textSpans[e].glyph)&&(t.prepareFrame(this.comp.renderedFrame-this.data.st),t._mdf&&(this._mdf=!0))},SVGTextLottieElement.prototype.renderInnerContent=function(){if(this.validateText(),(!this.data.singleShape||this._mdf)&&(this.textAnimator.getMeasures(this.textProperty.currentData,this.lettersChangedFlag),this.lettersChangedFlag||this.textAnimator.lettersChangedFlag)){var e,t;this._sizeChanged=!0;var n,i,o,l=this.textAnimator.renderedLetters,u=this.textProperty.currentData.l;for(t=u.length,e=0;e<t;e+=1)u[e].n||(n=l[e],i=this.textSpans[e].span,(o=this.textSpans[e].glyph)&&o.renderFrame(),n._mdf.m&&i.setAttribute("transform",n.m),n._mdf.o&&i.setAttribute("opacity",n.o),n._mdf.sw&&i.setAttribute("stroke-width",n.sw),n._mdf.sc&&i.setAttribute("stroke",n.sc),n._mdf.fc&&i.setAttribute("fill",n.fc))}},extendPrototype([IImageElement],ISolidElement),ISolidElement.prototype.createContent=function(){var e=createNS("rect");e.setAttribute("width",this.data.sw),e.setAttribute("height",this.data.sh),e.setAttribute("fill",this.data.sc),this.layerElement.appendChild(e)},NullElement.prototype.prepareFrame=function(e){this.prepareProperties(e,!0)},NullElement.prototype.renderFrame=function(){},NullElement.prototype.getBaseElement=function(){return null},NullElement.prototype.destroy=function(){},NullElement.prototype.sourceRectAtTime=function(){},NullElement.prototype.hide=function(){},extendPrototype([BaseElement,TransformElement,HierarchyElement,FrameElement],NullElement),extendPrototype([BaseRenderer],SVGRendererBase),SVGRendererBase.prototype.createNull=function(e){return new NullElement(e,this.globalData,this)},SVGRendererBase.prototype.createShape=function(e){return new SVGShapeElement(e,this.globalData,this)},SVGRendererBase.prototype.createText=function(e){return new SVGTextLottieElement(e,this.globalData,this)},SVGRendererBase.prototype.createImage=function(e){return new IImageElement(e,this.globalData,this)},SVGRendererBase.prototype.createSolid=function(e){return new ISolidElement(e,this.globalData,this)},SVGRendererBase.prototype.configAnimation=function(e){this.svgElement.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.svgElement.setAttribute("xmlns:xlink","http://www.w3.org/1999/xlink"),this.renderConfig.viewBoxSize?this.svgElement.setAttribute("viewBox",this.renderConfig.viewBoxSize):this.svgElement.setAttribute("viewBox","0 0 "+e.w+" "+e.h),this.renderConfig.viewBoxOnly||(this.svgElement.setAttribute("width",e.w),this.svgElement.setAttribute("height",e.h),this.svgElement.style.width="100%",this.svgElement.style.height="100%",this.svgElement.style.transform="translate3d(0,0,0)",this.svgElement.style.contentVisibility=this.renderConfig.contentVisibility),this.renderConfig.width&&this.svgElement.setAttribute("width",this.renderConfig.width),this.renderConfig.height&&this.svgElement.setAttribute("height",this.renderConfig.height),this.renderConfig.className&&this.svgElement.setAttribute("class",this.renderConfig.className),this.renderConfig.id&&this.svgElement.setAttribute("id",this.renderConfig.id),this.renderConfig.focusable!==void 0&&this.svgElement.setAttribute("focusable",this.renderConfig.focusable),this.svgElement.setAttribute("preserveAspectRatio",this.renderConfig.preserveAspectRatio),this.animationItem.wrapper.appendChild(this.svgElement);var t=this.globalData.defs;this.setupGlobalData(e,t),this.globalData.progressiveLoad=this.renderConfig.progressiveLoad,this.data=e;var n=createNS("clipPath"),i=createNS("rect");i.setAttribute("width",e.w),i.setAttribute("height",e.h),i.setAttribute("x",0),i.setAttribute("y",0);var o=createElementID();n.setAttribute("id",o),n.appendChild(i),this.layerElement.setAttribute("clip-path","url("+getLocationHref()+"#"+o+")"),t.appendChild(n),this.layers=e.layers,this.elements=createSizedArray(e.layers.length)},SVGRendererBase.prototype.destroy=function(){var e;this.animationItem.wrapper&&(this.animationItem.wrapper.innerText=""),this.layerElement=null,this.globalData.defs=null;var t=this.layers?this.layers.length:0;for(e=0;e<t;e+=1)this.elements[e]&&this.elements[e].destroy&&this.elements[e].destroy();this.elements.length=0,this.destroyed=!0,this.animationItem=null},SVGRendererBase.prototype.updateContainerSize=function(){},SVGRendererBase.prototype.findIndexByInd=function(e){var t=0,n=this.layers.length;for(t=0;t<n;t+=1)if(this.layers[t].ind===e)return t;return-1},SVGRendererBase.prototype.buildItem=function(e){var t=this.elements;if(!t[e]&&this.layers[e].ty!==99){t[e]=!0;var n=this.createItem(this.layers[e]);if(t[e]=n,getExpressionsPlugin()&&(this.layers[e].ty===0&&this.globalData.projectInterface.registerComposition(n),n.initExpressions()),this.appendElementInPos(n,e),this.layers[e].tt){var i="tp"in this.layers[e]?this.findIndexByInd(this.layers[e].tp):e-1;if(i===-1)return;if(this.elements[i]&&this.elements[i]!==!0){var o=t[i].getMatte(this.layers[e].tt);n.setMatte(o)}else this.buildItem(i),this.addPendingElement(n)}}},SVGRendererBase.prototype.checkPendingElements=function(){for(;this.pendingElements.length;){var e=this.pendingElements.pop();if(e.checkParenting(),e.data.tt)for(var t=0,n=this.elements.length;t<n;){if(this.elements[t]===e){var i="tp"in e.data?this.findIndexByInd(e.data.tp):t-1,o=this.elements[i].getMatte(this.layers[t].tt);e.setMatte(o);break}t+=1}}},SVGRendererBase.prototype.renderFrame=function(e){if(this.renderedFrame!==e&&!this.destroyed){var t;e===null?e=this.renderedFrame:this.renderedFrame=e,this.globalData.frameNum=e,this.globalData.frameId+=1,this.globalData.projectInterface.currentFrame=e,this.globalData._mdf=!1;var n=this.layers.length;for(this.completeLayers||this.checkLayers(e),t=n-1;t>=0;t-=1)(this.completeLayers||this.elements[t])&&this.elements[t].prepareFrame(e-this.layers[t].st);if(this.globalData._mdf)for(t=0;t<n;t+=1)(this.completeLayers||this.elements[t])&&this.elements[t].renderFrame()}},SVGRendererBase.prototype.appendElementInPos=function(e,t){var n=e.getBaseElement();if(n){for(var i,o=0;o<t;)this.elements[o]&&this.elements[o]!==!0&&this.elements[o].getBaseElement()&&(i=this.elements[o].getBaseElement()),o+=1;i?this.layerElement.insertBefore(n,i):this.layerElement.appendChild(n)}},SVGRendererBase.prototype.hide=function(){this.layerElement.style.display="none"},SVGRendererBase.prototype.show=function(){this.layerElement.style.display="block"},extendPrototype([BaseElement,TransformElement,HierarchyElement,FrameElement,RenderableDOMElement],ICompElement),ICompElement.prototype.initElement=function(e,t,n){this.initFrame(),this.initBaseData(e,t,n),this.initTransform(e,t,n),this.initRenderable(),this.initHierarchy(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),!this.data.xt&&t.progressiveLoad||this.buildAllItems(),this.hide()},ICompElement.prototype.prepareFrame=function(e){if(this._mdf=!1,this.prepareRenderableFrame(e),this.prepareProperties(e,this.isInRange),this.isInRange||this.data.xt){if(this.tm._placeholder)this.renderedFrame=e/this.data.sr;else{var t=this.tm.v;t===this.data.op&&(t=this.data.op-1),this.renderedFrame=t}var n,i=this.elements.length;for(this.completeLayers||this.checkLayers(this.renderedFrame),n=i-1;n>=0;n-=1)(this.completeLayers||this.elements[n])&&(this.elements[n].prepareFrame(this.renderedFrame-this.layers[n].st),this.elements[n]._mdf&&(this._mdf=!0))}},ICompElement.prototype.renderInnerContent=function(){var e,t=this.layers.length;for(e=0;e<t;e+=1)(this.completeLayers||this.elements[e])&&this.elements[e].renderFrame()},ICompElement.prototype.setElements=function(e){this.elements=e},ICompElement.prototype.getElements=function(){return this.elements},ICompElement.prototype.destroyElements=function(){var e,t=this.layers.length;for(e=0;e<t;e+=1)this.elements[e]&&this.elements[e].destroy()},ICompElement.prototype.destroy=function(){this.destroyElements(),this.destroyBaseElement()},extendPrototype([SVGRendererBase,ICompElement,SVGBaseElement],SVGCompElement),SVGCompElement.prototype.createComp=function(e){return new SVGCompElement(e,this.globalData,this)},extendPrototype([SVGRendererBase],SVGRenderer),SVGRenderer.prototype.createComp=function(e){return new SVGCompElement(e,this.globalData,this)},ShapeTransformManager.prototype={addTransformSequence:function(e){var t,n=e.length,i="_";for(t=0;t<n;t+=1)i+=e[t].transform.key+"_";var o=this.sequences[i];return o||(o={transforms:[].concat(e),finalTransform:new Matrix,_mdf:!1},this.sequences[i]=o,this.sequenceList.push(o)),o},processSequence:function(e,t){for(var n=0,i=e.transforms.length,o=t;n<i&&!t;){if(e.transforms[n].transform.mProps._mdf){o=!0;break}n+=1}if(o)for(e.finalTransform.reset(),n=i-1;n>=0;n-=1)e.finalTransform.multiply(e.transforms[n].transform.mProps.v);e._mdf=o},processSequences:function(e){var t,n=this.sequenceList.length;for(t=0;t<n;t+=1)this.processSequence(this.sequenceList[t],e)},getNewKey:function(){return this.transform_key_count+=1,"_"+this.transform_key_count}};var lumaLoader=function(){var e="__lottie_element_luma_buffer",t=null,n=null,i=null;function o(){var l,u,d;t||(l=createNS("svg"),u=createNS("filter"),d=createNS("feColorMatrix"),u.setAttribute("id",e),d.setAttribute("type","matrix"),d.setAttribute("color-interpolation-filters","sRGB"),d.setAttribute("values","0.3, 0.3, 0.3, 0, 0, 0.3, 0.3, 0.3, 0, 0, 0.3, 0.3, 0.3, 0, 0, 0.3, 0.3, 0.3, 0, 0"),u.appendChild(d),l.appendChild(u),l.setAttribute("id",e+"_svg"),featureSupport.svgLumaHidden&&(l.style.display="none"),i=l,document.body.appendChild(i),t=createTag("canvas"),(n=t.getContext("2d")).filter="url(#"+e+")",n.fillStyle="rgba(0,0,0,0)",n.fillRect(0,0,1,1))}return{load:o,get:function(l){return t||o(),t.width=l.width,t.height=l.height,n.filter="url(#"+e+")",t}}};function createCanvas(e,t){if(featureSupport.offscreenCanvas)return new OffscreenCanvas(e,t);var n=createTag("canvas");return n.width=e,n.height=t,n}var assetLoader={loadLumaCanvas:lumaLoader.load,getLumaCanvas:lumaLoader.get,createCanvas},registeredEffects={};function CVEffects(e){var t,n,i=e.data.ef?e.data.ef.length:0;for(this.filters=[],t=0;t<i;t+=1){n=null;var o=e.data.ef[t].ty;registeredEffects[o]&&(n=new registeredEffects[o].effect(e.effectsManager.effectElements[t],e)),n&&this.filters.push(n)}this.filters.length&&e.addRenderableComponent(this)}function registerEffect(e,t){registeredEffects[e]={effect:t}}function CVMaskElement(e,t){var n;this.data=e,this.element=t,this.masksProperties=this.data.masksProperties||[],this.viewData=createSizedArray(this.masksProperties.length);var i=this.masksProperties.length,o=!1;for(n=0;n<i;n+=1)this.masksProperties[n].mode!=="n"&&(o=!0),this.viewData[n]=ShapePropertyFactory.getShapeProp(this.element,this.masksProperties[n],3);this.hasMasks=o,o&&this.element.addRenderableComponent(this)}function CVBaseElement(){}CVEffects.prototype.renderFrame=function(e){var t,n=this.filters.length;for(t=0;t<n;t+=1)this.filters[t].renderFrame(e)},CVEffects.prototype.getEffects=function(e){var t,n=this.filters.length,i=[];for(t=0;t<n;t+=1)this.filters[t].type===e&&i.push(this.filters[t]);return i},CVMaskElement.prototype.renderFrame=function(){if(this.hasMasks){var e,t,n,i,o=this.element.finalTransform.mat,l=this.element.canvasContext,u=this.masksProperties.length;for(l.beginPath(),e=0;e<u;e+=1)if(this.masksProperties[e].mode!=="n"){var d;this.masksProperties[e].inv&&(l.moveTo(0,0),l.lineTo(this.element.globalData.compSize.w,0),l.lineTo(this.element.globalData.compSize.w,this.element.globalData.compSize.h),l.lineTo(0,this.element.globalData.compSize.h),l.lineTo(0,0)),i=this.viewData[e].v,t=o.applyToPointArray(i.v[0][0],i.v[0][1],0),l.moveTo(t[0],t[1]);var f=i._length;for(d=1;d<f;d+=1)n=o.applyToTriplePoints(i.o[d-1],i.i[d],i.v[d]),l.bezierCurveTo(n[0],n[1],n[2],n[3],n[4],n[5]);n=o.applyToTriplePoints(i.o[d-1],i.i[0],i.v[0]),l.bezierCurveTo(n[0],n[1],n[2],n[3],n[4],n[5])}this.element.globalData.renderer.save(!0),l.clip()}},CVMaskElement.prototype.getMaskProperty=MaskElement.prototype.getMaskProperty,CVMaskElement.prototype.destroy=function(){this.element=null};var operationsMap={1:"source-in",2:"source-out",3:"source-in",4:"source-out"};function CVShapeData(e,t,n,i){this.styledShapes=[],this.tr=[0,0,0,0,0,0];var o,l=4;t.ty==="rc"?l=5:t.ty==="el"?l=6:t.ty==="sr"&&(l=7),this.sh=ShapePropertyFactory.getShapeProp(e,t,l,e);var u,d=n.length;for(o=0;o<d;o+=1)n[o].closed||(u={transforms:i.addTransformSequence(n[o].transforms),trNodes:[]},this.styledShapes.push(u),n[o].elements.push(u))}function CVShapeElement(e,t,n){this.shapes=[],this.shapesData=e.shapes,this.stylesList=[],this.itemsData=[],this.prevViewData=[],this.shapeModifiers=[],this.processedElements=[],this.transformsManager=new ShapeTransformManager,this.initElement(e,t,n)}function CVTextElement(e,t,n){this.textSpans=[],this.yOffset=0,this.fillColorAnim=!1,this.strokeColorAnim=!1,this.strokeWidthAnim=!1,this.stroke=!1,this.fill=!1,this.justifyOffset=0,this.currentRender=null,this.renderType="canvas",this.values={fill:"rgba(0,0,0,0)",stroke:"rgba(0,0,0,0)",sWidth:0,fValue:""},this.initElement(e,t,n)}function CVImageElement(e,t,n){this.assetData=t.getAssetData(e.refId),this.img=t.imageLoader.getAsset(this.assetData),this.initElement(e,t,n)}function CVSolidElement(e,t,n){this.initElement(e,t,n)}function CanvasRendererBase(){}function CanvasContext(){this.opacity=-1,this.transform=createTypedArray("float32",16),this.fillStyle="",this.strokeStyle="",this.lineWidth="",this.lineCap="",this.lineJoin="",this.miterLimit="",this.id=Math.random()}function CVContextData(){var e;for(this.stack=[],this.cArrPos=0,this.cTr=new Matrix,e=0;e<15;e+=1){var t=new CanvasContext;this.stack[e]=t}this._length=15,this.nativeContext=null,this.transformMat=new Matrix,this.currentOpacity=1,this.currentFillStyle="",this.appliedFillStyle="",this.currentStrokeStyle="",this.appliedStrokeStyle="",this.currentLineWidth="",this.appliedLineWidth="",this.currentLineCap="",this.appliedLineCap="",this.currentLineJoin="",this.appliedLineJoin="",this.appliedMiterLimit="",this.currentMiterLimit=""}function CVCompElement(e,t,n){this.completeLayers=!1,this.layers=e.layers,this.pendingElements=[],this.elements=createSizedArray(this.layers.length),this.initElement(e,t,n),this.tm=e.tm?PropertyFactory.getProp(this,e.tm,0,t.frameRate,this):{_placeholder:!0}}function CanvasRenderer(e,t){this.animationItem=e,this.renderConfig={clearCanvas:!t||t.clearCanvas===void 0||t.clearCanvas,context:t&&t.context||null,progressiveLoad:t&&t.progressiveLoad||!1,preserveAspectRatio:t&&t.preserveAspectRatio||"xMidYMid meet",imagePreserveAspectRatio:t&&t.imagePreserveAspectRatio||"xMidYMid slice",contentVisibility:t&&t.contentVisibility||"visible",className:t&&t.className||"",id:t&&t.id||"",runExpressions:!t||t.runExpressions===void 0||t.runExpressions},this.renderConfig.dpr=t&&t.dpr||1,this.animationItem.wrapper&&(this.renderConfig.dpr=t&&t.dpr||window.devicePixelRatio||1),this.renderedFrame=-1,this.globalData={frameNum:-1,_mdf:!1,renderConfig:this.renderConfig,currentGlobalAlpha:-1},this.contextData=new CVContextData,this.elements=[],this.pendingElements=[],this.transformMat=new Matrix,this.completeLayers=!1,this.rendererType="canvas",this.renderConfig.clearCanvas&&(this.ctxTransform=this.contextData.transform.bind(this.contextData),this.ctxOpacity=this.contextData.opacity.bind(this.contextData),this.ctxFillStyle=this.contextData.fillStyle.bind(this.contextData),this.ctxStrokeStyle=this.contextData.strokeStyle.bind(this.contextData),this.ctxLineWidth=this.contextData.lineWidth.bind(this.contextData),this.ctxLineCap=this.contextData.lineCap.bind(this.contextData),this.ctxLineJoin=this.contextData.lineJoin.bind(this.contextData),this.ctxMiterLimit=this.contextData.miterLimit.bind(this.contextData),this.ctxFill=this.contextData.fill.bind(this.contextData),this.ctxFillRect=this.contextData.fillRect.bind(this.contextData),this.ctxStroke=this.contextData.stroke.bind(this.contextData),this.save=this.contextData.save.bind(this.contextData))}function HBaseElement(){}function HSolidElement(e,t,n){this.initElement(e,t,n)}function HShapeElement(e,t,n){this.shapes=[],this.shapesData=e.shapes,this.stylesList=[],this.shapeModifiers=[],this.itemsData=[],this.processedElements=[],this.animatedContents=[],this.shapesContainer=createNS("g"),this.initElement(e,t,n),this.prevViewData=[],this.currentBBox={x:999999,y:-999999,h:0,w:0}}function HTextElement(e,t,n){this.textSpans=[],this.textPaths=[],this.currentBBox={x:999999,y:-999999,h:0,w:0},this.renderType="svg",this.isMasked=!1,this.initElement(e,t,n)}function HCameraElement(e,t,n){this.initFrame(),this.initBaseData(e,t,n),this.initHierarchy();var i=PropertyFactory.getProp;if(this.pe=i(this,e.pe,0,0,this),e.ks.p.s?(this.px=i(this,e.ks.p.x,1,0,this),this.py=i(this,e.ks.p.y,1,0,this),this.pz=i(this,e.ks.p.z,1,0,this)):this.p=i(this,e.ks.p,1,0,this),e.ks.a&&(this.a=i(this,e.ks.a,1,0,this)),e.ks.or.k.length&&e.ks.or.k[0].to){var o,l=e.ks.or.k.length;for(o=0;o<l;o+=1)e.ks.or.k[o].to=null,e.ks.or.k[o].ti=null}this.or=i(this,e.ks.or,1,degToRads,this),this.or.sh=!0,this.rx=i(this,e.ks.rx,0,degToRads,this),this.ry=i(this,e.ks.ry,0,degToRads,this),this.rz=i(this,e.ks.rz,0,degToRads,this),this.mat=new Matrix,this._prevMat=new Matrix,this._isFirstFrame=!0,this.finalTransform={mProp:this}}function HImageElement(e,t,n){this.assetData=t.getAssetData(e.refId),this.initElement(e,t,n)}function HybridRendererBase(e,t){this.animationItem=e,this.layers=null,this.renderedFrame=-1,this.renderConfig={className:t&&t.className||"",imagePreserveAspectRatio:t&&t.imagePreserveAspectRatio||"xMidYMid slice",hideOnTransparent:!(t&&t.hideOnTransparent===!1),filterSize:{width:t&&t.filterSize&&t.filterSize.width||"400%",height:t&&t.filterSize&&t.filterSize.height||"400%",x:t&&t.filterSize&&t.filterSize.x||"-100%",y:t&&t.filterSize&&t.filterSize.y||"-100%"}},this.globalData={_mdf:!1,frameNum:-1,renderConfig:this.renderConfig},this.pendingElements=[],this.elements=[],this.threeDElements=[],this.destroyed=!1,this.camera=null,this.supports3d=!0,this.rendererType="html"}function HCompElement(e,t,n){this.layers=e.layers,this.supports3d=!e.hasMask,this.completeLayers=!1,this.pendingElements=[],this.elements=this.layers?createSizedArray(this.layers.length):[],this.initElement(e,t,n),this.tm=e.tm?PropertyFactory.getProp(this,e.tm,0,t.frameRate,this):{_placeholder:!0}}function HybridRenderer(e,t){this.animationItem=e,this.layers=null,this.renderedFrame=-1,this.renderConfig={className:t&&t.className||"",imagePreserveAspectRatio:t&&t.imagePreserveAspectRatio||"xMidYMid slice",hideOnTransparent:!(t&&t.hideOnTransparent===!1),filterSize:{width:t&&t.filterSize&&t.filterSize.width||"400%",height:t&&t.filterSize&&t.filterSize.height||"400%",x:t&&t.filterSize&&t.filterSize.x||"-100%",y:t&&t.filterSize&&t.filterSize.y||"-100%"},runExpressions:!t||t.runExpressions===void 0||t.runExpressions},this.globalData={_mdf:!1,frameNum:-1,renderConfig:this.renderConfig},this.pendingElements=[],this.elements=[],this.threeDElements=[],this.destroyed=!1,this.camera=null,this.supports3d=!0,this.rendererType="html"}CVBaseElement.prototype={createElements:function(){},initRendererElement:function(){},createContainerElements:function(){if(this.data.tt>=1){this.buffers=[];var e=this.globalData.canvasContext,t=assetLoader.createCanvas(e.canvas.width,e.canvas.height);this.buffers.push(t);var n=assetLoader.createCanvas(e.canvas.width,e.canvas.height);this.buffers.push(n),this.data.tt>=3&&!document._isProxy&&assetLoader.loadLumaCanvas()}this.canvasContext=this.globalData.canvasContext,this.transformCanvas=this.globalData.transformCanvas,this.renderableEffectsManager=new CVEffects(this),this.searchEffectTransforms()},createContent:function(){},setBlendMode:function(){var e=this.globalData;if(e.blendMode!==this.data.bm){e.blendMode=this.data.bm;var t=getBlendMode(this.data.bm);e.canvasContext.globalCompositeOperation=t}},createRenderableComponents:function(){this.maskManager=new CVMaskElement(this.data,this),this.transformEffects=this.renderableEffectsManager.getEffects(effectTypes.TRANSFORM_EFFECT)},hideElement:function(){this.hidden||this.isInRange&&!this.isTransparent||(this.hidden=!0)},showElement:function(){this.isInRange&&!this.isTransparent&&(this.hidden=!1,this._isFirstFrame=!0,this.maskManager._isFirstFrame=!0)},clearCanvas:function(e){e.clearRect(this.transformCanvas.tx,this.transformCanvas.ty,this.transformCanvas.w*this.transformCanvas.sx,this.transformCanvas.h*this.transformCanvas.sy)},prepareLayer:function(){if(this.data.tt>=1){var e=this.buffers[0].getContext("2d");this.clearCanvas(e),e.drawImage(this.canvasContext.canvas,0,0),this.currentTransform=this.canvasContext.getTransform(),this.canvasContext.setTransform(1,0,0,1,0,0),this.clearCanvas(this.canvasContext),this.canvasContext.setTransform(this.currentTransform)}},exitLayer:function(){if(this.data.tt>=1){var e=this.buffers[1],t=e.getContext("2d");if(this.clearCanvas(t),t.drawImage(this.canvasContext.canvas,0,0),this.canvasContext.setTransform(1,0,0,1,0,0),this.clearCanvas(this.canvasContext),this.canvasContext.setTransform(this.currentTransform),this.comp.getElementById("tp"in this.data?this.data.tp:this.data.ind-1).renderFrame(!0),this.canvasContext.setTransform(1,0,0,1,0,0),this.data.tt>=3&&!document._isProxy){var n=assetLoader.getLumaCanvas(this.canvasContext.canvas);n.getContext("2d").drawImage(this.canvasContext.canvas,0,0),this.clearCanvas(this.canvasContext),this.canvasContext.drawImage(n,0,0)}this.canvasContext.globalCompositeOperation=operationsMap[this.data.tt],this.canvasContext.drawImage(e,0,0),this.canvasContext.globalCompositeOperation="destination-over",this.canvasContext.drawImage(this.buffers[0],0,0),this.canvasContext.setTransform(this.currentTransform),this.canvasContext.globalCompositeOperation="source-over"}},renderFrame:function(e){if(!this.hidden&&!this.data.hd&&(this.data.td!==1||e)){this.renderTransform(),this.renderRenderable(),this.renderLocalTransform(),this.setBlendMode();var t=this.data.ty===0;this.prepareLayer(),this.globalData.renderer.save(t),this.globalData.renderer.ctxTransform(this.finalTransform.localMat.props),this.globalData.renderer.ctxOpacity(this.finalTransform.localOpacity),this.renderInnerContent(),this.globalData.renderer.restore(t),this.exitLayer(),this.maskManager.hasMasks&&this.globalData.renderer.restore(!0),this._isFirstFrame&&(this._isFirstFrame=!1)}},destroy:function(){this.canvasContext=null,this.data=null,this.globalData=null,this.maskManager.destroy()},mHelper:new Matrix},CVBaseElement.prototype.hide=CVBaseElement.prototype.hideElement,CVBaseElement.prototype.show=CVBaseElement.prototype.showElement,CVShapeData.prototype.setAsAnimated=SVGShapeData.prototype.setAsAnimated,extendPrototype([BaseElement,TransformElement,CVBaseElement,IShapeElement,HierarchyElement,FrameElement,RenderableElement],CVShapeElement),CVShapeElement.prototype.initElement=RenderableDOMElement.prototype.initElement,CVShapeElement.prototype.transformHelper={opacity:1,_opMdf:!1},CVShapeElement.prototype.dashResetter=[],CVShapeElement.prototype.createContent=function(){this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,!0,[])},CVShapeElement.prototype.createStyleElement=function(e,t){var n={data:e,type:e.ty,preTransforms:this.transformsManager.addTransformSequence(t),transforms:[],elements:[],closed:e.hd===!0},i={};if(e.ty==="fl"||e.ty==="st"?(i.c=PropertyFactory.getProp(this,e.c,1,255,this),i.c.k||(n.co="rgb("+bmFloor(i.c.v[0])+","+bmFloor(i.c.v[1])+","+bmFloor(i.c.v[2])+")")):e.ty!=="gf"&&e.ty!=="gs"||(i.s=PropertyFactory.getProp(this,e.s,1,null,this),i.e=PropertyFactory.getProp(this,e.e,1,null,this),i.h=PropertyFactory.getProp(this,e.h||{k:0},0,.01,this),i.a=PropertyFactory.getProp(this,e.a||{k:0},0,degToRads,this),i.g=new GradientProperty(this,e.g,this)),i.o=PropertyFactory.getProp(this,e.o,0,.01,this),e.ty==="st"||e.ty==="gs"){if(n.lc=lineCapEnum[e.lc||2],n.lj=lineJoinEnum[e.lj||2],e.lj==1&&(n.ml=e.ml),i.w=PropertyFactory.getProp(this,e.w,0,null,this),i.w.k||(n.wi=i.w.v),e.d){var o=new DashProperty(this,e.d,"canvas",this);i.d=o,i.d.k||(n.da=i.d.dashArray,n.do=i.d.dashoffset[0])}}else n.r=e.r===2?"evenodd":"nonzero";return this.stylesList.push(n),i.style=n,i},CVShapeElement.prototype.createGroupElement=function(){return{it:[],prevViewData:[]}},CVShapeElement.prototype.createTransformElement=function(e){return{transform:{opacity:1,_opMdf:!1,key:this.transformsManager.getNewKey(),op:PropertyFactory.getProp(this,e.o,0,.01,this),mProps:TransformPropertyFactory.getTransformProperty(this,e,this)}}},CVShapeElement.prototype.createShapeElement=function(e){var t=new CVShapeData(this,e,this.stylesList,this.transformsManager);return this.shapes.push(t),this.addShapeToModifiers(t),t},CVShapeElement.prototype.reloadShapes=function(){var e;this._isFirstFrame=!0;var t=this.itemsData.length;for(e=0;e<t;e+=1)this.prevViewData[e]=this.itemsData[e];for(this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,!0,[]),t=this.dynamicProperties.length,e=0;e<t;e+=1)this.dynamicProperties[e].getValue();this.renderModifiers(),this.transformsManager.processSequences(this._isFirstFrame)},CVShapeElement.prototype.addTransformToStyleList=function(e){var t,n=this.stylesList.length;for(t=0;t<n;t+=1)this.stylesList[t].closed||this.stylesList[t].transforms.push(e)},CVShapeElement.prototype.removeTransformFromStyleList=function(){var e,t=this.stylesList.length;for(e=0;e<t;e+=1)this.stylesList[e].closed||this.stylesList[e].transforms.pop()},CVShapeElement.prototype.closeStyles=function(e){var t,n=e.length;for(t=0;t<n;t+=1)e[t].closed=!0},CVShapeElement.prototype.searchShapes=function(e,t,n,i,o){var l,u,d,f,p,m,g=e.length-1,b=[],_=[],R=[].concat(o);for(l=g;l>=0;l-=1){if((f=this.searchProcessedElement(e[l]))?t[l]=n[f-1]:e[l]._shouldRender=i,e[l].ty==="fl"||e[l].ty==="st"||e[l].ty==="gf"||e[l].ty==="gs")f?t[l].style.closed=!1:t[l]=this.createStyleElement(e[l],R),b.push(t[l].style);else if(e[l].ty==="gr"){if(f)for(d=t[l].it.length,u=0;u<d;u+=1)t[l].prevViewData[u]=t[l].it[u];else t[l]=this.createGroupElement(e[l]);this.searchShapes(e[l].it,t[l].it,t[l].prevViewData,i,R)}else e[l].ty==="tr"?(f||(m=this.createTransformElement(e[l]),t[l]=m),R.push(t[l]),this.addTransformToStyleList(t[l])):e[l].ty==="sh"||e[l].ty==="rc"||e[l].ty==="el"||e[l].ty==="sr"?f||(t[l]=this.createShapeElement(e[l])):e[l].ty==="tm"||e[l].ty==="rd"||e[l].ty==="pb"||e[l].ty==="zz"||e[l].ty==="op"?(f?(p=t[l]).closed=!1:((p=ShapeModifiers.getModifier(e[l].ty)).init(this,e[l]),t[l]=p,this.shapeModifiers.push(p)),_.push(p)):e[l].ty==="rp"&&(f?(p=t[l]).closed=!0:(p=ShapeModifiers.getModifier(e[l].ty),t[l]=p,p.init(this,e,l,t),this.shapeModifiers.push(p),i=!1),_.push(p));this.addProcessedElement(e[l],l+1)}for(this.removeTransformFromStyleList(),this.closeStyles(b),g=_.length,l=0;l<g;l+=1)_[l].closed=!0},CVShapeElement.prototype.renderInnerContent=function(){this.transformHelper.opacity=1,this.transformHelper._opMdf=!1,this.renderModifiers(),this.transformsManager.processSequences(this._isFirstFrame),this.renderShape(this.transformHelper,this.shapesData,this.itemsData,!0)},CVShapeElement.prototype.renderShapeTransform=function(e,t){(e._opMdf||t.op._mdf||this._isFirstFrame)&&(t.opacity=e.opacity,t.opacity*=t.op.v,t._opMdf=!0)},CVShapeElement.prototype.drawLayer=function(){var e,t,n,i,o,l,u,d,f,p=this.stylesList.length,m=this.globalData.renderer,g=this.globalData.canvasContext;for(e=0;e<p;e+=1)if(((d=(f=this.stylesList[e]).type)!=="st"&&d!=="gs"||f.wi!==0)&&f.data._shouldRender&&f.coOp!==0&&this.globalData.currentGlobalAlpha!==0){for(m.save(),l=f.elements,d==="st"||d==="gs"?(m.ctxStrokeStyle(d==="st"?f.co:f.grd),m.ctxLineWidth(f.wi),m.ctxLineCap(f.lc),m.ctxLineJoin(f.lj),m.ctxMiterLimit(f.ml||0)):m.ctxFillStyle(d==="fl"?f.co:f.grd),m.ctxOpacity(f.coOp),d!=="st"&&d!=="gs"&&g.beginPath(),m.ctxTransform(f.preTransforms.finalTransform.props),n=l.length,t=0;t<n;t+=1){for(d!=="st"&&d!=="gs"||(g.beginPath(),f.da&&(g.setLineDash(f.da),g.lineDashOffset=f.do)),o=(u=l[t].trNodes).length,i=0;i<o;i+=1)u[i].t==="m"?g.moveTo(u[i].p[0],u[i].p[1]):u[i].t==="c"?g.bezierCurveTo(u[i].pts[0],u[i].pts[1],u[i].pts[2],u[i].pts[3],u[i].pts[4],u[i].pts[5]):g.closePath();d!=="st"&&d!=="gs"||(m.ctxStroke(),f.da&&g.setLineDash(this.dashResetter))}d!=="st"&&d!=="gs"&&this.globalData.renderer.ctxFill(f.r),m.restore()}},CVShapeElement.prototype.renderShape=function(e,t,n,i){var o,l;for(l=e,o=t.length-1;o>=0;o-=1)t[o].ty==="tr"?(l=n[o].transform,this.renderShapeTransform(e,l)):t[o].ty==="sh"||t[o].ty==="el"||t[o].ty==="rc"||t[o].ty==="sr"?this.renderPath(t[o],n[o]):t[o].ty==="fl"?this.renderFill(t[o],n[o],l):t[o].ty==="st"?this.renderStroke(t[o],n[o],l):t[o].ty==="gf"||t[o].ty==="gs"?this.renderGradientFill(t[o],n[o],l):t[o].ty==="gr"?this.renderShape(l,t[o].it,n[o].it):t[o].ty;i&&this.drawLayer()},CVShapeElement.prototype.renderStyledShape=function(e,t){if(this._isFirstFrame||t._mdf||e.transforms._mdf){var n,i,o,l=e.trNodes,u=t.paths,d=u._length;l.length=0;var f=e.transforms.finalTransform;for(o=0;o<d;o+=1){var p=u.shapes[o];if(p&&p.v){for(i=p._length,n=1;n<i;n+=1)n===1&&l.push({t:"m",p:f.applyToPointArray(p.v[0][0],p.v[0][1],0)}),l.push({t:"c",pts:f.applyToTriplePoints(p.o[n-1],p.i[n],p.v[n])});i===1&&l.push({t:"m",p:f.applyToPointArray(p.v[0][0],p.v[0][1],0)}),p.c&&i&&(l.push({t:"c",pts:f.applyToTriplePoints(p.o[n-1],p.i[0],p.v[0])}),l.push({t:"z"}))}}e.trNodes=l}},CVShapeElement.prototype.renderPath=function(e,t){if(e.hd!==!0&&e._shouldRender){var n,i=t.styledShapes.length;for(n=0;n<i;n+=1)this.renderStyledShape(t.styledShapes[n],t.sh)}},CVShapeElement.prototype.renderFill=function(e,t,n){var i=t.style;(t.c._mdf||this._isFirstFrame)&&(i.co="rgb("+bmFloor(t.c.v[0])+","+bmFloor(t.c.v[1])+","+bmFloor(t.c.v[2])+")"),(t.o._mdf||n._opMdf||this._isFirstFrame)&&(i.coOp=t.o.v*n.opacity)},CVShapeElement.prototype.renderGradientFill=function(e,t,n){var i,o=t.style;if(!o.grd||t.g._mdf||t.s._mdf||t.e._mdf||e.t!==1&&(t.h._mdf||t.a._mdf)){var l,u=this.globalData.canvasContext,d=t.s.v,f=t.e.v;if(e.t===1)i=u.createLinearGradient(d[0],d[1],f[0],f[1]);else{var p=Math.sqrt(Math.pow(d[0]-f[0],2)+Math.pow(d[1]-f[1],2)),m=Math.atan2(f[1]-d[1],f[0]-d[0]),g=t.h.v;g>=1?g=.99:g<=-1&&(g=-.99);var b=p*g,_=Math.cos(m+t.a.v)*b+d[0],R=Math.sin(m+t.a.v)*b+d[1];i=u.createRadialGradient(_,R,0,d[0],d[1],p)}var E=e.g.p,S=t.g.c,C=1;for(l=0;l<E;l+=1)t.g._hasOpacity&&t.g._collapsable&&(C=t.g.o[2*l+1]),i.addColorStop(S[4*l]/100,"rgba("+S[4*l+1]+","+S[4*l+2]+","+S[4*l+3]+","+C+")");o.grd=i}o.coOp=t.o.v*n.opacity},CVShapeElement.prototype.renderStroke=function(e,t,n){var i=t.style,o=t.d;o&&(o._mdf||this._isFirstFrame)&&(i.da=o.dashArray,i.do=o.dashoffset[0]),(t.c._mdf||this._isFirstFrame)&&(i.co="rgb("+bmFloor(t.c.v[0])+","+bmFloor(t.c.v[1])+","+bmFloor(t.c.v[2])+")"),(t.o._mdf||n._opMdf||this._isFirstFrame)&&(i.coOp=t.o.v*n.opacity),(t.w._mdf||this._isFirstFrame)&&(i.wi=t.w.v)},CVShapeElement.prototype.destroy=function(){this.shapesData=null,this.globalData=null,this.canvasContext=null,this.stylesList.length=0,this.itemsData.length=0},extendPrototype([BaseElement,TransformElement,CVBaseElement,HierarchyElement,FrameElement,RenderableElement,ITextElement],CVTextElement),CVTextElement.prototype.tHelper=createTag("canvas").getContext("2d"),CVTextElement.prototype.buildNewText=function(){var e=this.textProperty.currentData;this.renderedLetters=createSizedArray(e.l?e.l.length:0);var t=!1;e.fc?(t=!0,this.values.fill=this.buildColor(e.fc)):this.values.fill="rgba(0,0,0,0)",this.fill=t;var n=!1;e.sc&&(n=!0,this.values.stroke=this.buildColor(e.sc),this.values.sWidth=e.sw);var i,o,l,u,d,f,p,m,g,b,_,R,E=this.globalData.fontManager.getFontByName(e.f),S=e.l,C=this.mHelper;this.stroke=n,this.values.fValue=e.finalSize+"px "+this.globalData.fontManager.getFontByName(e.f).fFamily,o=e.finalText.length;var T=this.data.singleShape,A=.001*e.tr*e.finalSize,M=0,I=0,O=!0,N=0;for(i=0;i<o;i+=1){u=(l=this.globalData.fontManager.getCharData(e.finalText[i],E.fStyle,this.globalData.fontManager.getFontByName(e.f).fFamily))&&l.data||{},C.reset(),T&&S[i].n&&(M=-A,I+=e.yOffset,I+=O?1:0,O=!1),g=(p=u.shapes?u.shapes[0].it:[]).length,C.scale(e.finalSize/100,e.finalSize/100),T&&this.applyTextPropertiesToMatrix(e,C,S[i].line,M,I),_=createSizedArray(g-1);var j=0;for(m=0;m<g;m+=1)if(p[m].ty==="sh"){for(f=p[m].ks.k.i.length,b=p[m].ks.k,R=[],d=1;d<f;d+=1)d===1&&R.push(C.applyToX(b.v[0][0],b.v[0][1],0),C.applyToY(b.v[0][0],b.v[0][1],0)),R.push(C.applyToX(b.o[d-1][0],b.o[d-1][1],0),C.applyToY(b.o[d-1][0],b.o[d-1][1],0),C.applyToX(b.i[d][0],b.i[d][1],0),C.applyToY(b.i[d][0],b.i[d][1],0),C.applyToX(b.v[d][0],b.v[d][1],0),C.applyToY(b.v[d][0],b.v[d][1],0));R.push(C.applyToX(b.o[d-1][0],b.o[d-1][1],0),C.applyToY(b.o[d-1][0],b.o[d-1][1],0),C.applyToX(b.i[0][0],b.i[0][1],0),C.applyToY(b.i[0][0],b.i[0][1],0),C.applyToX(b.v[0][0],b.v[0][1],0),C.applyToY(b.v[0][0],b.v[0][1],0)),_[j]=R,j+=1}T&&(M+=S[i].l,M+=A),this.textSpans[N]?this.textSpans[N].elem=_:this.textSpans[N]={elem:_},N+=1}},CVTextElement.prototype.renderInnerContent=function(){var e,t,n,i,o,l;this.validateText(),this.canvasContext.font=this.values.fValue,this.globalData.renderer.ctxLineCap("butt"),this.globalData.renderer.ctxLineJoin("miter"),this.globalData.renderer.ctxMiterLimit(4),this.data.singleShape||this.textAnimator.getMeasures(this.textProperty.currentData,this.lettersChangedFlag);var u,d=this.textAnimator.renderedLetters,f=this.textProperty.currentData.l;t=f.length;var p,m,g=null,b=null,_=null,R=this.globalData.renderer;for(e=0;e<t;e+=1)if(!f[e].n){if((u=d[e])&&(R.save(),R.ctxTransform(u.p),R.ctxOpacity(u.o)),this.fill){for(u&&u.fc?g!==u.fc&&(R.ctxFillStyle(u.fc),g=u.fc):g!==this.values.fill&&(g=this.values.fill,R.ctxFillStyle(this.values.fill)),i=(p=this.textSpans[e].elem).length,this.globalData.canvasContext.beginPath(),n=0;n<i;n+=1)for(l=(m=p[n]).length,this.globalData.canvasContext.moveTo(m[0],m[1]),o=2;o<l;o+=6)this.globalData.canvasContext.bezierCurveTo(m[o],m[o+1],m[o+2],m[o+3],m[o+4],m[o+5]);this.globalData.canvasContext.closePath(),R.ctxFill()}if(this.stroke){for(u&&u.sw?_!==u.sw&&(_=u.sw,R.ctxLineWidth(u.sw)):_!==this.values.sWidth&&(_=this.values.sWidth,R.ctxLineWidth(this.values.sWidth)),u&&u.sc?b!==u.sc&&(b=u.sc,R.ctxStrokeStyle(u.sc)):b!==this.values.stroke&&(b=this.values.stroke,R.ctxStrokeStyle(this.values.stroke)),i=(p=this.textSpans[e].elem).length,this.globalData.canvasContext.beginPath(),n=0;n<i;n+=1)for(l=(m=p[n]).length,this.globalData.canvasContext.moveTo(m[0],m[1]),o=2;o<l;o+=6)this.globalData.canvasContext.bezierCurveTo(m[o],m[o+1],m[o+2],m[o+3],m[o+4],m[o+5]);this.globalData.canvasContext.closePath(),R.ctxStroke()}u&&this.globalData.renderer.restore()}},extendPrototype([BaseElement,TransformElement,CVBaseElement,HierarchyElement,FrameElement,RenderableElement],CVImageElement),CVImageElement.prototype.initElement=SVGShapeElement.prototype.initElement,CVImageElement.prototype.prepareFrame=IImageElement.prototype.prepareFrame,CVImageElement.prototype.createContent=function(){if(this.img.width&&(this.assetData.w!==this.img.width||this.assetData.h!==this.img.height)){var e=createTag("canvas");e.width=this.assetData.w,e.height=this.assetData.h;var t,n,i=e.getContext("2d"),o=this.img.width,l=this.img.height,u=o/l,d=this.assetData.w/this.assetData.h,f=this.assetData.pr||this.globalData.renderConfig.imagePreserveAspectRatio;u>d&&f==="xMidYMid slice"||u<d&&f!=="xMidYMid slice"?t=(n=l)*d:n=(t=o)/d,i.drawImage(this.img,(o-t)/2,(l-n)/2,t,n,0,0,this.assetData.w,this.assetData.h),this.img=e}},CVImageElement.prototype.renderInnerContent=function(){this.canvasContext.drawImage(this.img,0,0)},CVImageElement.prototype.destroy=function(){this.img=null},extendPrototype([BaseElement,TransformElement,CVBaseElement,HierarchyElement,FrameElement,RenderableElement],CVSolidElement),CVSolidElement.prototype.initElement=SVGShapeElement.prototype.initElement,CVSolidElement.prototype.prepareFrame=IImageElement.prototype.prepareFrame,CVSolidElement.prototype.renderInnerContent=function(){this.globalData.renderer.ctxFillStyle(this.data.sc),this.globalData.renderer.ctxFillRect(0,0,this.data.sw,this.data.sh)},extendPrototype([BaseRenderer],CanvasRendererBase),CanvasRendererBase.prototype.createShape=function(e){return new CVShapeElement(e,this.globalData,this)},CanvasRendererBase.prototype.createText=function(e){return new CVTextElement(e,this.globalData,this)},CanvasRendererBase.prototype.createImage=function(e){return new CVImageElement(e,this.globalData,this)},CanvasRendererBase.prototype.createSolid=function(e){return new CVSolidElement(e,this.globalData,this)},CanvasRendererBase.prototype.createNull=SVGRenderer.prototype.createNull,CanvasRendererBase.prototype.ctxTransform=function(e){e[0]===1&&e[1]===0&&e[4]===0&&e[5]===1&&e[12]===0&&e[13]===0||this.canvasContext.transform(e[0],e[1],e[4],e[5],e[12],e[13])},CanvasRendererBase.prototype.ctxOpacity=function(e){this.canvasContext.globalAlpha*=e<0?0:e},CanvasRendererBase.prototype.ctxFillStyle=function(e){this.canvasContext.fillStyle=e},CanvasRendererBase.prototype.ctxStrokeStyle=function(e){this.canvasContext.strokeStyle=e},CanvasRendererBase.prototype.ctxLineWidth=function(e){this.canvasContext.lineWidth=e},CanvasRendererBase.prototype.ctxLineCap=function(e){this.canvasContext.lineCap=e},CanvasRendererBase.prototype.ctxLineJoin=function(e){this.canvasContext.lineJoin=e},CanvasRendererBase.prototype.ctxMiterLimit=function(e){this.canvasContext.miterLimit=e},CanvasRendererBase.prototype.ctxFill=function(e){this.canvasContext.fill(e)},CanvasRendererBase.prototype.ctxFillRect=function(e,t,n,i){this.canvasContext.fillRect(e,t,n,i)},CanvasRendererBase.prototype.ctxStroke=function(){this.canvasContext.stroke()},CanvasRendererBase.prototype.reset=function(){this.renderConfig.clearCanvas?this.contextData.reset():this.canvasContext.restore()},CanvasRendererBase.prototype.save=function(){this.canvasContext.save()},CanvasRendererBase.prototype.restore=function(e){this.renderConfig.clearCanvas?(e&&(this.globalData.blendMode="source-over"),this.contextData.restore(e)):this.canvasContext.restore()},CanvasRendererBase.prototype.configAnimation=function(e){if(this.animationItem.wrapper){this.animationItem.container=createTag("canvas");var t=this.animationItem.container.style;t.width="100%",t.height="100%";var n="0px 0px 0px";t.transformOrigin=n,t.mozTransformOrigin=n,t.webkitTransformOrigin=n,t["-webkit-transform"]=n,t.contentVisibility=this.renderConfig.contentVisibility,this.animationItem.wrapper.appendChild(this.animationItem.container),this.canvasContext=this.animationItem.container.getContext("2d"),this.renderConfig.className&&this.animationItem.container.setAttribute("class",this.renderConfig.className),this.renderConfig.id&&this.animationItem.container.setAttribute("id",this.renderConfig.id)}else this.canvasContext=this.renderConfig.context;this.contextData.setContext(this.canvasContext),this.data=e,this.layers=e.layers,this.transformCanvas={w:e.w,h:e.h,sx:0,sy:0,tx:0,ty:0},this.setupGlobalData(e,document.body),this.globalData.canvasContext=this.canvasContext,this.globalData.renderer=this,this.globalData.isDashed=!1,this.globalData.progressiveLoad=this.renderConfig.progressiveLoad,this.globalData.transformCanvas=this.transformCanvas,this.elements=createSizedArray(e.layers.length),this.updateContainerSize()},CanvasRendererBase.prototype.updateContainerSize=function(e,t){var n,i,o,l;if(this.reset(),e?(n=e,i=t,this.canvasContext.canvas.width=n,this.canvasContext.canvas.height=i):(this.animationItem.wrapper&&this.animationItem.container?(n=this.animationItem.wrapper.offsetWidth,i=this.animationItem.wrapper.offsetHeight):(n=this.canvasContext.canvas.width,i=this.canvasContext.canvas.height),this.canvasContext.canvas.width=n*this.renderConfig.dpr,this.canvasContext.canvas.height=i*this.renderConfig.dpr),this.renderConfig.preserveAspectRatio.indexOf("meet")!==-1||this.renderConfig.preserveAspectRatio.indexOf("slice")!==-1){var u=this.renderConfig.preserveAspectRatio.split(" "),d=u[1]||"meet",f=u[0]||"xMidYMid",p=f.substr(0,4),m=f.substr(4);o=n/i,(l=this.transformCanvas.w/this.transformCanvas.h)>o&&d==="meet"||l<o&&d==="slice"?(this.transformCanvas.sx=n/(this.transformCanvas.w/this.renderConfig.dpr),this.transformCanvas.sy=n/(this.transformCanvas.w/this.renderConfig.dpr)):(this.transformCanvas.sx=i/(this.transformCanvas.h/this.renderConfig.dpr),this.transformCanvas.sy=i/(this.transformCanvas.h/this.renderConfig.dpr)),this.transformCanvas.tx=p==="xMid"&&(l<o&&d==="meet"||l>o&&d==="slice")?(n-this.transformCanvas.w*(i/this.transformCanvas.h))/2*this.renderConfig.dpr:p==="xMax"&&(l<o&&d==="meet"||l>o&&d==="slice")?(n-this.transformCanvas.w*(i/this.transformCanvas.h))*this.renderConfig.dpr:0,this.transformCanvas.ty=m==="YMid"&&(l>o&&d==="meet"||l<o&&d==="slice")?(i-this.transformCanvas.h*(n/this.transformCanvas.w))/2*this.renderConfig.dpr:m==="YMax"&&(l>o&&d==="meet"||l<o&&d==="slice")?(i-this.transformCanvas.h*(n/this.transformCanvas.w))*this.renderConfig.dpr:0}else this.renderConfig.preserveAspectRatio==="none"?(this.transformCanvas.sx=n/(this.transformCanvas.w/this.renderConfig.dpr),this.transformCanvas.sy=i/(this.transformCanvas.h/this.renderConfig.dpr),this.transformCanvas.tx=0,this.transformCanvas.ty=0):(this.transformCanvas.sx=this.renderConfig.dpr,this.transformCanvas.sy=this.renderConfig.dpr,this.transformCanvas.tx=0,this.transformCanvas.ty=0);this.transformCanvas.props=[this.transformCanvas.sx,0,0,0,0,this.transformCanvas.sy,0,0,0,0,1,0,this.transformCanvas.tx,this.transformCanvas.ty,0,1],this.ctxTransform(this.transformCanvas.props),this.canvasContext.beginPath(),this.canvasContext.rect(0,0,this.transformCanvas.w,this.transformCanvas.h),this.canvasContext.closePath(),this.canvasContext.clip(),this.renderFrame(this.renderedFrame,!0)},CanvasRendererBase.prototype.destroy=function(){var e;for(this.renderConfig.clearCanvas&&this.animationItem.wrapper&&(this.animationItem.wrapper.innerText=""),e=(this.layers?this.layers.length:0)-1;e>=0;e-=1)this.elements[e]&&this.elements[e].destroy&&this.elements[e].destroy();this.elements.length=0,this.globalData.canvasContext=null,this.animationItem.container=null,this.destroyed=!0},CanvasRendererBase.prototype.renderFrame=function(e,t){if((this.renderedFrame!==e||this.renderConfig.clearCanvas!==!0||t)&&!this.destroyed&&e!==-1){var n;this.renderedFrame=e,this.globalData.frameNum=e-this.animationItem._isFirstFrame,this.globalData.frameId+=1,this.globalData._mdf=!this.renderConfig.clearCanvas||t,this.globalData.projectInterface.currentFrame=e;var i=this.layers.length;for(this.completeLayers||this.checkLayers(e),n=i-1;n>=0;n-=1)(this.completeLayers||this.elements[n])&&this.elements[n].prepareFrame(e-this.layers[n].st);if(this.globalData._mdf){for(this.renderConfig.clearCanvas===!0?this.canvasContext.clearRect(0,0,this.transformCanvas.w,this.transformCanvas.h):this.save(),n=i-1;n>=0;n-=1)(this.completeLayers||this.elements[n])&&this.elements[n].renderFrame();this.renderConfig.clearCanvas!==!0&&this.restore()}}},CanvasRendererBase.prototype.buildItem=function(e){var t=this.elements;if(!t[e]&&this.layers[e].ty!==99){var n=this.createItem(this.layers[e],this,this.globalData);t[e]=n,n.initExpressions()}},CanvasRendererBase.prototype.checkPendingElements=function(){for(;this.pendingElements.length;)this.pendingElements.pop().checkParenting()},CanvasRendererBase.prototype.hide=function(){this.animationItem.container.style.display="none"},CanvasRendererBase.prototype.show=function(){this.animationItem.container.style.display="block"},CVContextData.prototype.duplicate=function(){var e=2*this._length,t=0;for(t=this._length;t<e;t+=1)this.stack[t]=new CanvasContext;this._length=e},CVContextData.prototype.reset=function(){this.cArrPos=0,this.cTr.reset(),this.stack[this.cArrPos].opacity=1},CVContextData.prototype.restore=function(e){this.cArrPos-=1;var t,n=this.stack[this.cArrPos],i=n.transform,o=this.cTr.props;for(t=0;t<16;t+=1)o[t]=i[t];if(e){this.nativeContext.restore();var l=this.stack[this.cArrPos+1];this.appliedFillStyle=l.fillStyle,this.appliedStrokeStyle=l.strokeStyle,this.appliedLineWidth=l.lineWidth,this.appliedLineCap=l.lineCap,this.appliedLineJoin=l.lineJoin,this.appliedMiterLimit=l.miterLimit}this.nativeContext.setTransform(i[0],i[1],i[4],i[5],i[12],i[13]),(e||n.opacity!==-1&&this.currentOpacity!==n.opacity)&&(this.nativeContext.globalAlpha=n.opacity,this.currentOpacity=n.opacity),this.currentFillStyle=n.fillStyle,this.currentStrokeStyle=n.strokeStyle,this.currentLineWidth=n.lineWidth,this.currentLineCap=n.lineCap,this.currentLineJoin=n.lineJoin,this.currentMiterLimit=n.miterLimit},CVContextData.prototype.save=function(e){e&&this.nativeContext.save();var t=this.cTr.props;this._length<=this.cArrPos&&this.duplicate();var n,i=this.stack[this.cArrPos];for(n=0;n<16;n+=1)i.transform[n]=t[n];this.cArrPos+=1;var o=this.stack[this.cArrPos];o.opacity=i.opacity,o.fillStyle=i.fillStyle,o.strokeStyle=i.strokeStyle,o.lineWidth=i.lineWidth,o.lineCap=i.lineCap,o.lineJoin=i.lineJoin,o.miterLimit=i.miterLimit},CVContextData.prototype.setOpacity=function(e){this.stack[this.cArrPos].opacity=e},CVContextData.prototype.setContext=function(e){this.nativeContext=e},CVContextData.prototype.fillStyle=function(e){this.stack[this.cArrPos].fillStyle!==e&&(this.currentFillStyle=e,this.stack[this.cArrPos].fillStyle=e)},CVContextData.prototype.strokeStyle=function(e){this.stack[this.cArrPos].strokeStyle!==e&&(this.currentStrokeStyle=e,this.stack[this.cArrPos].strokeStyle=e)},CVContextData.prototype.lineWidth=function(e){this.stack[this.cArrPos].lineWidth!==e&&(this.currentLineWidth=e,this.stack[this.cArrPos].lineWidth=e)},CVContextData.prototype.lineCap=function(e){this.stack[this.cArrPos].lineCap!==e&&(this.currentLineCap=e,this.stack[this.cArrPos].lineCap=e)},CVContextData.prototype.lineJoin=function(e){this.stack[this.cArrPos].lineJoin!==e&&(this.currentLineJoin=e,this.stack[this.cArrPos].lineJoin=e)},CVContextData.prototype.miterLimit=function(e){this.stack[this.cArrPos].miterLimit!==e&&(this.currentMiterLimit=e,this.stack[this.cArrPos].miterLimit=e)},CVContextData.prototype.transform=function(e){this.transformMat.cloneFromProps(e);var t=this.cTr;this.transformMat.multiply(t),t.cloneFromProps(this.transformMat.props);var n=t.props;this.nativeContext.setTransform(n[0],n[1],n[4],n[5],n[12],n[13])},CVContextData.prototype.opacity=function(e){var t=this.stack[this.cArrPos].opacity;t*=e<0?0:e,this.stack[this.cArrPos].opacity!==t&&(this.currentOpacity!==e&&(this.nativeContext.globalAlpha=e,this.currentOpacity=e),this.stack[this.cArrPos].opacity=t)},CVContextData.prototype.fill=function(e){this.appliedFillStyle!==this.currentFillStyle&&(this.appliedFillStyle=this.currentFillStyle,this.nativeContext.fillStyle=this.appliedFillStyle),this.nativeContext.fill(e)},CVContextData.prototype.fillRect=function(e,t,n,i){this.appliedFillStyle!==this.currentFillStyle&&(this.appliedFillStyle=this.currentFillStyle,this.nativeContext.fillStyle=this.appliedFillStyle),this.nativeContext.fillRect(e,t,n,i)},CVContextData.prototype.stroke=function(){this.appliedStrokeStyle!==this.currentStrokeStyle&&(this.appliedStrokeStyle=this.currentStrokeStyle,this.nativeContext.strokeStyle=this.appliedStrokeStyle),this.appliedLineWidth!==this.currentLineWidth&&(this.appliedLineWidth=this.currentLineWidth,this.nativeContext.lineWidth=this.appliedLineWidth),this.appliedLineCap!==this.currentLineCap&&(this.appliedLineCap=this.currentLineCap,this.nativeContext.lineCap=this.appliedLineCap),this.appliedLineJoin!==this.currentLineJoin&&(this.appliedLineJoin=this.currentLineJoin,this.nativeContext.lineJoin=this.appliedLineJoin),this.appliedMiterLimit!==this.currentMiterLimit&&(this.appliedMiterLimit=this.currentMiterLimit,this.nativeContext.miterLimit=this.appliedMiterLimit),this.nativeContext.stroke()},extendPrototype([CanvasRendererBase,ICompElement,CVBaseElement],CVCompElement),CVCompElement.prototype.renderInnerContent=function(){var e,t=this.canvasContext;for(t.beginPath(),t.moveTo(0,0),t.lineTo(this.data.w,0),t.lineTo(this.data.w,this.data.h),t.lineTo(0,this.data.h),t.lineTo(0,0),t.clip(),e=this.layers.length-1;e>=0;e-=1)(this.completeLayers||this.elements[e])&&this.elements[e].renderFrame()},CVCompElement.prototype.destroy=function(){var e;for(e=this.layers.length-1;e>=0;e-=1)this.elements[e]&&this.elements[e].destroy();this.layers=null,this.elements=null},CVCompElement.prototype.createComp=function(e){return new CVCompElement(e,this.globalData,this)},extendPrototype([CanvasRendererBase],CanvasRenderer),CanvasRenderer.prototype.createComp=function(e){return new CVCompElement(e,this.globalData,this)},HBaseElement.prototype={checkBlendMode:function(){},initRendererElement:function(){this.baseElement=createTag(this.data.tg||"div"),this.data.hasMask?(this.svgElement=createNS("svg"),this.layerElement=createNS("g"),this.maskedElement=this.layerElement,this.svgElement.appendChild(this.layerElement),this.baseElement.appendChild(this.svgElement)):this.layerElement=this.baseElement,styleDiv(this.baseElement)},createContainerElements:function(){this.renderableEffectsManager=new CVEffects(this),this.transformedElement=this.baseElement,this.maskedElement=this.layerElement,this.data.ln&&this.layerElement.setAttribute("id",this.data.ln),this.data.cl&&this.layerElement.setAttribute("class",this.data.cl),this.data.bm!==0&&this.setBlendMode()},renderElement:function(){var e=this.transformedElement?this.transformedElement.style:{};if(this.finalTransform._matMdf){var t=this.finalTransform.mat.toCSS();e.transform=t,e.webkitTransform=t}this.finalTransform._opMdf&&(e.opacity=this.finalTransform.mProp.o.v)},renderFrame:function(){this.data.hd||this.hidden||(this.renderTransform(),this.renderRenderable(),this.renderElement(),this.renderInnerContent(),this._isFirstFrame&&(this._isFirstFrame=!1))},destroy:function(){this.layerElement=null,this.transformedElement=null,this.matteElement&&(this.matteElement=null),this.maskManager&&(this.maskManager.destroy(),this.maskManager=null)},createRenderableComponents:function(){this.maskManager=new MaskElement(this.data,this,this.globalData)},addEffects:function(){},setMatte:function(){}},HBaseElement.prototype.getBaseElement=SVGBaseElement.prototype.getBaseElement,HBaseElement.prototype.destroyBaseElement=HBaseElement.prototype.destroy,HBaseElement.prototype.buildElementParenting=BaseRenderer.prototype.buildElementParenting,extendPrototype([BaseElement,TransformElement,HBaseElement,HierarchyElement,FrameElement,RenderableDOMElement],HSolidElement),HSolidElement.prototype.createContent=function(){var e;this.data.hasMask?((e=createNS("rect")).setAttribute("width",this.data.sw),e.setAttribute("height",this.data.sh),e.setAttribute("fill",this.data.sc),this.svgElement.setAttribute("width",this.data.sw),this.svgElement.setAttribute("height",this.data.sh)):((e=createTag("div")).style.width=this.data.sw+"px",e.style.height=this.data.sh+"px",e.style.backgroundColor=this.data.sc),this.layerElement.appendChild(e)},extendPrototype([BaseElement,TransformElement,HSolidElement,SVGShapeElement,HBaseElement,HierarchyElement,FrameElement,RenderableElement],HShapeElement),HShapeElement.prototype._renderShapeFrame=HShapeElement.prototype.renderInnerContent,HShapeElement.prototype.createContent=function(){var e;if(this.baseElement.style.fontSize=0,this.data.hasMask)this.layerElement.appendChild(this.shapesContainer),e=this.svgElement;else{e=createNS("svg");var t=this.comp.data?this.comp.data:this.globalData.compSize;e.setAttribute("width",t.w),e.setAttribute("height",t.h),e.appendChild(this.shapesContainer),this.layerElement.appendChild(e)}this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.shapesContainer,0,[],!0),this.filterUniqueShapes(),this.shapeCont=e},HShapeElement.prototype.getTransformedPoint=function(e,t){var n,i=e.length;for(n=0;n<i;n+=1)t=e[n].mProps.v.applyToPointArray(t[0],t[1],0);return t},HShapeElement.prototype.calculateShapeBoundingBox=function(e,t){var n,i,o,l,u,d=e.sh.v,f=e.transformers,p=d._length;if(!(p<=1)){for(n=0;n<p-1;n+=1)i=this.getTransformedPoint(f,d.v[n]),o=this.getTransformedPoint(f,d.o[n]),l=this.getTransformedPoint(f,d.i[n+1]),u=this.getTransformedPoint(f,d.v[n+1]),this.checkBounds(i,o,l,u,t);d.c&&(i=this.getTransformedPoint(f,d.v[n]),o=this.getTransformedPoint(f,d.o[n]),l=this.getTransformedPoint(f,d.i[0]),u=this.getTransformedPoint(f,d.v[0]),this.checkBounds(i,o,l,u,t))}},HShapeElement.prototype.checkBounds=function(e,t,n,i,o){this.getBoundsOfCurve(e,t,n,i);var l=this.shapeBoundingBox;o.x=bmMin(l.left,o.x),o.xMax=bmMax(l.right,o.xMax),o.y=bmMin(l.top,o.y),o.yMax=bmMax(l.bottom,o.yMax)},HShapeElement.prototype.shapeBoundingBox={left:0,right:0,top:0,bottom:0},HShapeElement.prototype.tempBoundingBox={x:0,xMax:0,y:0,yMax:0,width:0,height:0},HShapeElement.prototype.getBoundsOfCurve=function(e,t,n,i){for(var o,l,u,d,f,p,m,g=[[e[0],i[0]],[e[1],i[1]]],b=0;b<2;++b)l=6*e[b]-12*t[b]+6*n[b],o=-3*e[b]+9*t[b]-9*n[b]+3*i[b],u=3*t[b]-3*e[b],l|=0,u|=0,(o|=0)===0&&l===0||(o===0?(d=-u/l)>0&&d<1&&g[b].push(this.calculateF(d,e,t,n,i,b)):(f=l*l-4*u*o)>=0&&((p=(-l+bmSqrt(f))/(2*o))>0&&p<1&&g[b].push(this.calculateF(p,e,t,n,i,b)),(m=(-l-bmSqrt(f))/(2*o))>0&&m<1&&g[b].push(this.calculateF(m,e,t,n,i,b))));this.shapeBoundingBox.left=bmMin.apply(null,g[0]),this.shapeBoundingBox.top=bmMin.apply(null,g[1]),this.shapeBoundingBox.right=bmMax.apply(null,g[0]),this.shapeBoundingBox.bottom=bmMax.apply(null,g[1])},HShapeElement.prototype.calculateF=function(e,t,n,i,o,l){return bmPow(1-e,3)*t[l]+3*bmPow(1-e,2)*e*n[l]+3*(1-e)*bmPow(e,2)*i[l]+bmPow(e,3)*o[l]},HShapeElement.prototype.calculateBoundingBox=function(e,t){var n,i=e.length;for(n=0;n<i;n+=1)e[n]&&e[n].sh?this.calculateShapeBoundingBox(e[n],t):e[n]&&e[n].it?this.calculateBoundingBox(e[n].it,t):e[n]&&e[n].style&&e[n].w&&this.expandStrokeBoundingBox(e[n].w,t)},HShapeElement.prototype.expandStrokeBoundingBox=function(e,t){var n=0;if(e.keyframes){for(var i=0;i<e.keyframes.length;i+=1){var o=e.keyframes[i].s;o>n&&(n=o)}n*=e.mult}else n=e.v*e.mult;t.x-=n,t.xMax+=n,t.y-=n,t.yMax+=n},HShapeElement.prototype.currentBoxContains=function(e){return this.currentBBox.x<=e.x&&this.currentBBox.y<=e.y&&this.currentBBox.width+this.currentBBox.x>=e.x+e.width&&this.currentBBox.height+this.currentBBox.y>=e.y+e.height},HShapeElement.prototype.renderInnerContent=function(){if(this._renderShapeFrame(),!this.hidden&&(this._isFirstFrame||this._mdf)){var e=this.tempBoundingBox,t=999999;if(e.x=t,e.xMax=-t,e.y=t,e.yMax=-t,this.calculateBoundingBox(this.itemsData,e),e.width=e.xMax<e.x?0:e.xMax-e.x,e.height=e.yMax<e.y?0:e.yMax-e.y,this.currentBoxContains(e))return;var n=!1;if(this.currentBBox.w!==e.width&&(this.currentBBox.w=e.width,this.shapeCont.setAttribute("width",e.width),n=!0),this.currentBBox.h!==e.height&&(this.currentBBox.h=e.height,this.shapeCont.setAttribute("height",e.height),n=!0),n||this.currentBBox.x!==e.x||this.currentBBox.y!==e.y){this.currentBBox.w=e.width,this.currentBBox.h=e.height,this.currentBBox.x=e.x,this.currentBBox.y=e.y,this.shapeCont.setAttribute("viewBox",this.currentBBox.x+" "+this.currentBBox.y+" "+this.currentBBox.w+" "+this.currentBBox.h);var i=this.shapeCont.style,o="translate("+this.currentBBox.x+"px,"+this.currentBBox.y+"px)";i.transform=o,i.webkitTransform=o}}},extendPrototype([BaseElement,TransformElement,HBaseElement,HierarchyElement,FrameElement,RenderableDOMElement,ITextElement],HTextElement),HTextElement.prototype.createContent=function(){if(this.isMasked=this.checkMasks(),this.isMasked){this.renderType="svg",this.compW=this.comp.data.w,this.compH=this.comp.data.h,this.svgElement.setAttribute("width",this.compW),this.svgElement.setAttribute("height",this.compH);var e=createNS("g");this.maskedElement.appendChild(e),this.innerElem=e}else this.renderType="html",this.innerElem=this.layerElement;this.checkParenting()},HTextElement.prototype.buildNewText=function(){var e=this.textProperty.currentData;this.renderedLetters=createSizedArray(e.l?e.l.length:0);var t=this.innerElem.style,n=e.fc?this.buildColor(e.fc):"rgba(0,0,0,0)";t.fill=n,t.color=n,e.sc&&(t.stroke=this.buildColor(e.sc),t.strokeWidth=e.sw+"px");var i,o,l=this.globalData.fontManager.getFontByName(e.f);if(!this.globalData.fontManager.chars)if(t.fontSize=e.finalSize+"px",t.lineHeight=e.finalSize+"px",l.fClass)this.innerElem.className=l.fClass;else{t.fontFamily=l.fFamily;var u=e.fWeight,d=e.fStyle;t.fontStyle=d,t.fontWeight=u}var f,p,m,g=e.l;o=g.length;var b,_=this.mHelper,R="",E=0;for(i=0;i<o;i+=1){if(this.globalData.fontManager.chars?(this.textPaths[E]?f=this.textPaths[E]:((f=createNS("path")).setAttribute("stroke-linecap",lineCapEnum[1]),f.setAttribute("stroke-linejoin",lineJoinEnum[2]),f.setAttribute("stroke-miterlimit","4")),this.isMasked||(this.textSpans[E]?m=(p=this.textSpans[E]).children[0]:((p=createTag("div")).style.lineHeight=0,(m=createNS("svg")).appendChild(f),styleDiv(p)))):this.isMasked?f=this.textPaths[E]?this.textPaths[E]:createNS("text"):this.textSpans[E]?(p=this.textSpans[E],f=this.textPaths[E]):(styleDiv(p=createTag("span")),styleDiv(f=createTag("span")),p.appendChild(f)),this.globalData.fontManager.chars){var S,C=this.globalData.fontManager.getCharData(e.finalText[i],l.fStyle,this.globalData.fontManager.getFontByName(e.f).fFamily);if(S=C?C.data:null,_.reset(),S&&S.shapes&&S.shapes.length&&(b=S.shapes[0].it,_.scale(e.finalSize/100,e.finalSize/100),R=this.createPathShape(_,b),f.setAttribute("d",R)),this.isMasked)this.innerElem.appendChild(f);else{if(this.innerElem.appendChild(p),S&&S.shapes){document.body.appendChild(m);var T=m.getBBox();m.setAttribute("width",T.width+2),m.setAttribute("height",T.height+2),m.setAttribute("viewBox",T.x-1+" "+(T.y-1)+" "+(T.width+2)+" "+(T.height+2));var A=m.style,M="translate("+(T.x-1)+"px,"+(T.y-1)+"px)";A.transform=M,A.webkitTransform=M,g[i].yOffset=T.y-1}else m.setAttribute("width",1),m.setAttribute("height",1);p.appendChild(m)}}else if(f.textContent=g[i].val,f.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),this.isMasked)this.innerElem.appendChild(f);else{this.innerElem.appendChild(p);var I=f.style,O="translate3d(0,"+-e.finalSize/1.2+"px,0)";I.transform=O,I.webkitTransform=O}this.isMasked?this.textSpans[E]=f:this.textSpans[E]=p,this.textSpans[E].style.display="block",this.textPaths[E]=f,E+=1}for(;E<this.textSpans.length;)this.textSpans[E].style.display="none",E+=1},HTextElement.prototype.renderInnerContent=function(){var e;if(this.validateText(),this.data.singleShape){if(!this._isFirstFrame&&!this.lettersChangedFlag)return;if(this.isMasked&&this.finalTransform._matMdf){this.svgElement.setAttribute("viewBox",-this.finalTransform.mProp.p.v[0]+" "+-this.finalTransform.mProp.p.v[1]+" "+this.compW+" "+this.compH),e=this.svgElement.style;var t="translate("+-this.finalTransform.mProp.p.v[0]+"px,"+-this.finalTransform.mProp.p.v[1]+"px)";e.transform=t,e.webkitTransform=t}}if(this.textAnimator.getMeasures(this.textProperty.currentData,this.lettersChangedFlag),this.lettersChangedFlag||this.textAnimator.lettersChangedFlag){var n,i,o,l,u,d=0,f=this.textAnimator.renderedLetters,p=this.textProperty.currentData.l;for(i=p.length,n=0;n<i;n+=1)p[n].n?d+=1:(l=this.textSpans[n],u=this.textPaths[n],o=f[d],d+=1,o._mdf.m&&(this.isMasked?l.setAttribute("transform",o.m):(l.style.webkitTransform=o.m,l.style.transform=o.m)),l.style.opacity=o.o,o.sw&&o._mdf.sw&&u.setAttribute("stroke-width",o.sw),o.sc&&o._mdf.sc&&u.setAttribute("stroke",o.sc),o.fc&&o._mdf.fc&&(u.setAttribute("fill",o.fc),u.style.color=o.fc));if(this.innerElem.getBBox&&!this.hidden&&(this._isFirstFrame||this._mdf)){var m=this.innerElem.getBBox();if(this.currentBBox.w!==m.width&&(this.currentBBox.w=m.width,this.svgElement.setAttribute("width",m.width)),this.currentBBox.h!==m.height&&(this.currentBBox.h=m.height,this.svgElement.setAttribute("height",m.height)),this.currentBBox.w!==m.width+2||this.currentBBox.h!==m.height+2||this.currentBBox.x!==m.x-1||this.currentBBox.y!==m.y-1){this.currentBBox.w=m.width+2,this.currentBBox.h=m.height+2,this.currentBBox.x=m.x-1,this.currentBBox.y=m.y-1,this.svgElement.setAttribute("viewBox",this.currentBBox.x+" "+this.currentBBox.y+" "+this.currentBBox.w+" "+this.currentBBox.h),e=this.svgElement.style;var g="translate("+this.currentBBox.x+"px,"+this.currentBBox.y+"px)";e.transform=g,e.webkitTransform=g}}}},extendPrototype([BaseElement,FrameElement,HierarchyElement],HCameraElement),HCameraElement.prototype.setup=function(){var e,t,n,i,o=this.comp.threeDElements.length;for(e=0;e<o;e+=1)if((t=this.comp.threeDElements[e]).type==="3d"){n=t.perspectiveElem.style,i=t.container.style;var l=this.pe.v+"px",u="matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)";n.perspective=l,n.webkitPerspective=l,i.transformOrigin="0px 0px 0px",i.mozTransformOrigin="0px 0px 0px",i.webkitTransformOrigin="0px 0px 0px",n.transform=u,n.webkitTransform=u}},HCameraElement.prototype.createElements=function(){},HCameraElement.prototype.hide=function(){},HCameraElement.prototype.renderFrame=function(){var e,t,n=this._isFirstFrame;if(this.hierarchy)for(t=this.hierarchy.length,e=0;e<t;e+=1)n=this.hierarchy[e].finalTransform.mProp._mdf||n;if(n||this.pe._mdf||this.p&&this.p._mdf||this.px&&(this.px._mdf||this.py._mdf||this.pz._mdf)||this.rx._mdf||this.ry._mdf||this.rz._mdf||this.or._mdf||this.a&&this.a._mdf){if(this.mat.reset(),this.hierarchy)for(e=t=this.hierarchy.length-1;e>=0;e-=1){var i=this.hierarchy[e].finalTransform.mProp;this.mat.translate(-i.p.v[0],-i.p.v[1],i.p.v[2]),this.mat.rotateX(-i.or.v[0]).rotateY(-i.or.v[1]).rotateZ(i.or.v[2]),this.mat.rotateX(-i.rx.v).rotateY(-i.ry.v).rotateZ(i.rz.v),this.mat.scale(1/i.s.v[0],1/i.s.v[1],1/i.s.v[2]),this.mat.translate(i.a.v[0],i.a.v[1],i.a.v[2])}if(this.p?this.mat.translate(-this.p.v[0],-this.p.v[1],this.p.v[2]):this.mat.translate(-this.px.v,-this.py.v,this.pz.v),this.a){var o;o=this.p?[this.p.v[0]-this.a.v[0],this.p.v[1]-this.a.v[1],this.p.v[2]-this.a.v[2]]:[this.px.v-this.a.v[0],this.py.v-this.a.v[1],this.pz.v-this.a.v[2]];var l=Math.sqrt(Math.pow(o[0],2)+Math.pow(o[1],2)+Math.pow(o[2],2)),u=[o[0]/l,o[1]/l,o[2]/l],d=Math.sqrt(u[2]*u[2]+u[0]*u[0]),f=Math.atan2(u[1],d),p=Math.atan2(u[0],-u[2]);this.mat.rotateY(p).rotateX(-f)}this.mat.rotateX(-this.rx.v).rotateY(-this.ry.v).rotateZ(this.rz.v),this.mat.rotateX(-this.or.v[0]).rotateY(-this.or.v[1]).rotateZ(this.or.v[2]),this.mat.translate(this.globalData.compSize.w/2,this.globalData.compSize.h/2,0),this.mat.translate(0,0,this.pe.v);var m=!this._prevMat.equals(this.mat);if((m||this.pe._mdf)&&this.comp.threeDElements){var g,b,_;for(t=this.comp.threeDElements.length,e=0;e<t;e+=1)if((g=this.comp.threeDElements[e]).type==="3d"){if(m){var R=this.mat.toCSS();(_=g.container.style).transform=R,_.webkitTransform=R}this.pe._mdf&&((b=g.perspectiveElem.style).perspective=this.pe.v+"px",b.webkitPerspective=this.pe.v+"px")}this.mat.clone(this._prevMat)}}this._isFirstFrame=!1},HCameraElement.prototype.prepareFrame=function(e){this.prepareProperties(e,!0)},HCameraElement.prototype.destroy=function(){},HCameraElement.prototype.getBaseElement=function(){return null},extendPrototype([BaseElement,TransformElement,HBaseElement,HSolidElement,HierarchyElement,FrameElement,RenderableElement],HImageElement),HImageElement.prototype.createContent=function(){var e=this.globalData.getAssetsPath(this.assetData),t=new Image;this.data.hasMask?(this.imageElem=createNS("image"),this.imageElem.setAttribute("width",this.assetData.w+"px"),this.imageElem.setAttribute("height",this.assetData.h+"px"),this.imageElem.setAttributeNS("http://www.w3.org/1999/xlink","href",e),this.layerElement.appendChild(this.imageElem),this.baseElement.setAttribute("width",this.assetData.w),this.baseElement.setAttribute("height",this.assetData.h)):this.layerElement.appendChild(t),t.crossOrigin="anonymous",t.src=e,this.data.ln&&this.baseElement.setAttribute("id",this.data.ln)},extendPrototype([BaseRenderer],HybridRendererBase),HybridRendererBase.prototype.buildItem=SVGRenderer.prototype.buildItem,HybridRendererBase.prototype.checkPendingElements=function(){for(;this.pendingElements.length;)this.pendingElements.pop().checkParenting()},HybridRendererBase.prototype.appendElementInPos=function(e,t){var n=e.getBaseElement();if(n){var i=this.layers[t];if(i.ddd&&this.supports3d)this.addTo3dContainer(n,t);else if(this.threeDElements)this.addTo3dContainer(n,t);else{for(var o,l,u=0;u<t;)this.elements[u]&&this.elements[u]!==!0&&this.elements[u].getBaseElement&&(l=this.elements[u],o=(this.layers[u].ddd?this.getThreeDContainerByPos(u):l.getBaseElement())||o),u+=1;o?i.ddd&&this.supports3d||this.layerElement.insertBefore(n,o):i.ddd&&this.supports3d||this.layerElement.appendChild(n)}}},HybridRendererBase.prototype.createShape=function(e){return this.supports3d?new HShapeElement(e,this.globalData,this):new SVGShapeElement(e,this.globalData,this)},HybridRendererBase.prototype.createText=function(e){return this.supports3d?new HTextElement(e,this.globalData,this):new SVGTextLottieElement(e,this.globalData,this)},HybridRendererBase.prototype.createCamera=function(e){return this.camera=new HCameraElement(e,this.globalData,this),this.camera},HybridRendererBase.prototype.createImage=function(e){return this.supports3d?new HImageElement(e,this.globalData,this):new IImageElement(e,this.globalData,this)},HybridRendererBase.prototype.createSolid=function(e){return this.supports3d?new HSolidElement(e,this.globalData,this):new ISolidElement(e,this.globalData,this)},HybridRendererBase.prototype.createNull=SVGRenderer.prototype.createNull,HybridRendererBase.prototype.getThreeDContainerByPos=function(e){for(var t=0,n=this.threeDElements.length;t<n;){if(this.threeDElements[t].startPos<=e&&this.threeDElements[t].endPos>=e)return this.threeDElements[t].perspectiveElem;t+=1}return null},HybridRendererBase.prototype.createThreeDContainer=function(e,t){var n,i,o=createTag("div");styleDiv(o);var l=createTag("div");if(styleDiv(l),t==="3d"){(n=o.style).width=this.globalData.compSize.w+"px",n.height=this.globalData.compSize.h+"px",n.webkitTransformOrigin="50% 50%",n.mozTransformOrigin="50% 50%",n.transformOrigin="50% 50%";var u="matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)";(i=l.style).transform=u,i.webkitTransform=u}o.appendChild(l);var d={container:l,perspectiveElem:o,startPos:e,endPos:e,type:t};return this.threeDElements.push(d),d},HybridRendererBase.prototype.build3dContainers=function(){var e,t,n=this.layers.length,i="";for(e=0;e<n;e+=1)this.layers[e].ddd&&this.layers[e].ty!==3?(i!=="3d"&&(i="3d",t=this.createThreeDContainer(e,"3d")),t.endPos=Math.max(t.endPos,e)):(i!=="2d"&&(i="2d",t=this.createThreeDContainer(e,"2d")),t.endPos=Math.max(t.endPos,e));for(e=(n=this.threeDElements.length)-1;e>=0;e-=1)this.resizerElem.appendChild(this.threeDElements[e].perspectiveElem)},HybridRendererBase.prototype.addTo3dContainer=function(e,t){for(var n=0,i=this.threeDElements.length;n<i;){if(t<=this.threeDElements[n].endPos){for(var o,l=this.threeDElements[n].startPos;l<t;)this.elements[l]&&this.elements[l].getBaseElement&&(o=this.elements[l].getBaseElement()),l+=1;o?this.threeDElements[n].container.insertBefore(e,o):this.threeDElements[n].container.appendChild(e);break}n+=1}},HybridRendererBase.prototype.configAnimation=function(e){var t=createTag("div"),n=this.animationItem.wrapper,i=t.style;i.width=e.w+"px",i.height=e.h+"px",this.resizerElem=t,styleDiv(t),i.transformStyle="flat",i.mozTransformStyle="flat",i.webkitTransformStyle="flat",this.renderConfig.className&&t.setAttribute("class",this.renderConfig.className),n.appendChild(t),i.overflow="hidden";var o=createNS("svg");o.setAttribute("width","1"),o.setAttribute("height","1"),styleDiv(o),this.resizerElem.appendChild(o);var l=createNS("defs");o.appendChild(l),this.data=e,this.setupGlobalData(e,o),this.globalData.defs=l,this.layers=e.layers,this.layerElement=this.resizerElem,this.build3dContainers(),this.updateContainerSize()},HybridRendererBase.prototype.destroy=function(){var e;this.animationItem.wrapper&&(this.animationItem.wrapper.innerText=""),this.animationItem.container=null,this.globalData.defs=null;var t=this.layers?this.layers.length:0;for(e=0;e<t;e+=1)this.elements[e]&&this.elements[e].destroy&&this.elements[e].destroy();this.elements.length=0,this.destroyed=!0,this.animationItem=null},HybridRendererBase.prototype.updateContainerSize=function(){var e,t,n,i,o=this.animationItem.wrapper.offsetWidth,l=this.animationItem.wrapper.offsetHeight,u=o/l;this.globalData.compSize.w/this.globalData.compSize.h>u?(e=o/this.globalData.compSize.w,t=o/this.globalData.compSize.w,n=0,i=(l-this.globalData.compSize.h*(o/this.globalData.compSize.w))/2):(e=l/this.globalData.compSize.h,t=l/this.globalData.compSize.h,n=(o-this.globalData.compSize.w*(l/this.globalData.compSize.h))/2,i=0);var d=this.resizerElem.style;d.webkitTransform="matrix3d("+e+",0,0,0,0,"+t+",0,0,0,0,1,0,"+n+","+i+",0,1)",d.transform=d.webkitTransform},HybridRendererBase.prototype.renderFrame=SVGRenderer.prototype.renderFrame,HybridRendererBase.prototype.hide=function(){this.resizerElem.style.display="none"},HybridRendererBase.prototype.show=function(){this.resizerElem.style.display="block"},HybridRendererBase.prototype.initItems=function(){if(this.buildAllItems(),this.camera)this.camera.setup();else{var e,t=this.globalData.compSize.w,n=this.globalData.compSize.h,i=this.threeDElements.length;for(e=0;e<i;e+=1){var o=this.threeDElements[e].perspectiveElem.style;o.webkitPerspective=Math.sqrt(Math.pow(t,2)+Math.pow(n,2))+"px",o.perspective=o.webkitPerspective}}},HybridRendererBase.prototype.searchExtraCompositions=function(e){var t,n=e.length,i=createTag("div");for(t=0;t<n;t+=1)if(e[t].xt){var o=this.createComp(e[t],i,this.globalData.comp,null);o.initExpressions(),this.globalData.projectInterface.registerComposition(o)}},extendPrototype([HybridRendererBase,ICompElement,HBaseElement],HCompElement),HCompElement.prototype._createBaseContainerElements=HCompElement.prototype.createContainerElements,HCompElement.prototype.createContainerElements=function(){this._createBaseContainerElements(),this.data.hasMask?(this.svgElement.setAttribute("width",this.data.w),this.svgElement.setAttribute("height",this.data.h),this.transformedElement=this.baseElement):this.transformedElement=this.layerElement},HCompElement.prototype.addTo3dContainer=function(e,t){for(var n,i=0;i<t;)this.elements[i]&&this.elements[i].getBaseElement&&(n=this.elements[i].getBaseElement()),i+=1;n?this.layerElement.insertBefore(e,n):this.layerElement.appendChild(e)},HCompElement.prototype.createComp=function(e){return this.supports3d?new HCompElement(e,this.globalData,this):new SVGCompElement(e,this.globalData,this)},extendPrototype([HybridRendererBase],HybridRenderer),HybridRenderer.prototype.createComp=function(e){return this.supports3d?new HCompElement(e,this.globalData,this):new SVGCompElement(e,this.globalData,this)};var CompExpressionInterface=function(e){function t(n){for(var i=0,o=e.layers.length;i<o;){if(e.layers[i].nm===n||e.layers[i].ind===n)return e.elements[i].layerInterface;i+=1}return null}return Object.defineProperty(t,"_name",{value:e.data.nm}),t.layer=t,t.pixelAspect=1,t.height=e.data.h||e.globalData.compSize.h,t.width=e.data.w||e.globalData.compSize.w,t.pixelAspect=1,t.frameDuration=1/e.globalData.frameRate,t.displayStartTime=0,t.numLayers=e.layers.length,t};function _typeof$2(e){return(_typeof$2=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}function seedRandom(e,t){var n=this,i=t.pow(256,6),o=t.pow(2,52),l=2*o;function u(m){var g,b=m.length,_=this,R=0,E=_.i=_.j=0,S=_.S=[];for(b||(m=[b++]);R<256;)S[R]=R++;for(R=0;R<256;R++)S[R]=S[E=255&E+m[R%b]+(g=S[R])],S[E]=g;_.g=function(C){for(var T,A=0,M=_.i,I=_.j,O=_.S;C--;)T=O[M=255&M+1],A=256*A+O[255&(O[M]=O[I=255&I+T])+(O[I]=T)];return _.i=M,_.j=I,A}}function d(m,g){return g.i=m.i,g.j=m.j,g.S=m.S.slice(),g}function f(m,g){for(var b,_=m+"",R=0;R<_.length;)g[255&R]=255&(b^=19*g[255&R])+_.charCodeAt(R++);return p(g)}function p(m){return String.fromCharCode.apply(0,m)}t.seedrandom=function(m,g,b){var _=[],R=f(function C(T,A){var M,I=[],O=_typeof$2(T);if(A&&O=="object")for(M in T)try{I.push(C(T[M],A-1))}catch{}return I.length?I:O=="string"?T:T+"\0"}((g=g===!0?{entropy:!0}:g||{}).entropy?[m,p(e)]:m===null?function(){try{var C=new Uint8Array(256);return(n.crypto||n.msCrypto).getRandomValues(C),p(C)}catch{var T=n.navigator,A=T&&T.plugins;return[+new Date,n,A,n.screen,p(e)]}}():m,3),_),E=new u(_),S=function(){for(var C=E.g(6),T=i,A=0;C<o;)C=256*(C+A),T*=256,A=E.g(1);for(;C>=l;)C/=2,T/=2,A>>>=1;return(C+A)/T};return S.int32=function(){return 0|E.g(4)},S.quick=function(){return E.g(4)/4294967296},S.double=S,f(p(E.S),e),(g.pass||b||function(C,T,A,M){return M&&(M.S&&d(M,E),C.state=function(){return d(E,{})}),A?(t.random=C,T):C})(S,R,"global"in g?g.global:this==t,g.state)},f(t.random(),e)}function initialize$2(e){seedRandom([],e)}var propTypes={SHAPE:"shape"};function _typeof$1(e){return(_typeof$1=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}var ExpressionManager=function(){var ob={},Math=BMMath,window=null,document=null,XMLHttpRequest=null,fetch=null,frames=null,_lottieGlobal={};function resetFrame(){_lottieGlobal={}}function $bm_isInstanceOfArray(e){return e.constructor===Array||e.constructor===Float32Array}function isNumerable(e,t){return e==="number"||t instanceof Number||e==="boolean"||e==="string"}function $bm_neg(e){var t=_typeof$1(e);if(t==="number"||e instanceof Number||t==="boolean")return-e;if($bm_isInstanceOfArray(e)){var n,i=e.length,o=[];for(n=0;n<i;n+=1)o[n]=-e[n];return o}return e.propType?e.v:-e}initialize$2(BMMath);var easeInBez=BezierFactory.getBezierEasing(.333,0,.833,.833,"easeIn").get,easeOutBez=BezierFactory.getBezierEasing(.167,.167,.667,1,"easeOut").get,easeInOutBez=BezierFactory.getBezierEasing(.33,0,.667,1,"easeInOut").get;function sum(e,t){var n=_typeof$1(e),i=_typeof$1(t);if(isNumerable(n,e)&&isNumerable(i,t)||n==="string"||i==="string")return e+t;if($bm_isInstanceOfArray(e)&&isNumerable(i,t))return(e=e.slice(0))[0]+=t,e;if(isNumerable(n,e)&&$bm_isInstanceOfArray(t))return(t=t.slice(0))[0]=e+t[0],t;if($bm_isInstanceOfArray(e)&&$bm_isInstanceOfArray(t)){for(var o=0,l=e.length,u=t.length,d=[];o<l||o<u;)(typeof e[o]=="number"||e[o]instanceof Number)&&(typeof t[o]=="number"||t[o]instanceof Number)?d[o]=e[o]+t[o]:d[o]=t[o]===void 0?e[o]:e[o]||t[o],o+=1;return d}return 0}var add=sum;function sub(e,t){var n=_typeof$1(e),i=_typeof$1(t);if(isNumerable(n,e)&&isNumerable(i,t))return n==="string"&&(e=parseInt(e,10)),i==="string"&&(t=parseInt(t,10)),e-t;if($bm_isInstanceOfArray(e)&&isNumerable(i,t))return(e=e.slice(0))[0]-=t,e;if(isNumerable(n,e)&&$bm_isInstanceOfArray(t))return(t=t.slice(0))[0]=e-t[0],t;if($bm_isInstanceOfArray(e)&&$bm_isInstanceOfArray(t)){for(var o=0,l=e.length,u=t.length,d=[];o<l||o<u;)(typeof e[o]=="number"||e[o]instanceof Number)&&(typeof t[o]=="number"||t[o]instanceof Number)?d[o]=e[o]-t[o]:d[o]=t[o]===void 0?e[o]:e[o]||t[o],o+=1;return d}return 0}function mul(e,t){var n,i,o,l=_typeof$1(e),u=_typeof$1(t);if(isNumerable(l,e)&&isNumerable(u,t))return e*t;if($bm_isInstanceOfArray(e)&&isNumerable(u,t)){for(o=e.length,n=createTypedArray("float32",o),i=0;i<o;i+=1)n[i]=e[i]*t;return n}if(isNumerable(l,e)&&$bm_isInstanceOfArray(t)){for(o=t.length,n=createTypedArray("float32",o),i=0;i<o;i+=1)n[i]=e*t[i];return n}return 0}function div(e,t){var n,i,o,l=_typeof$1(e),u=_typeof$1(t);if(isNumerable(l,e)&&isNumerable(u,t))return e/t;if($bm_isInstanceOfArray(e)&&isNumerable(u,t)){for(o=e.length,n=createTypedArray("float32",o),i=0;i<o;i+=1)n[i]=e[i]/t;return n}if(isNumerable(l,e)&&$bm_isInstanceOfArray(t)){for(o=t.length,n=createTypedArray("float32",o),i=0;i<o;i+=1)n[i]=e/t[i];return n}return 0}function mod(e,t){return typeof e=="string"&&(e=parseInt(e,10)),typeof t=="string"&&(t=parseInt(t,10)),e%t}var $bm_sum=sum,$bm_sub=sub,$bm_mul=mul,$bm_div=div,$bm_mod=mod;function clamp(e,t,n){if(t>n){var i=n;n=t,t=i}return Math.min(Math.max(e,t),n)}function radiansToDegrees(e){return e/degToRads}var radians_to_degrees=radiansToDegrees;function degreesToRadians(e){return e*degToRads}var degrees_to_radians=radiansToDegrees,helperLengthArray=[0,0,0,0,0,0];function length(e,t){if(typeof e=="number"||e instanceof Number)return t=t||0,Math.abs(e-t);var n;t||(t=helperLengthArray);var i=Math.min(e.length,t.length),o=0;for(n=0;n<i;n+=1)o+=Math.pow(t[n]-e[n],2);return Math.sqrt(o)}function normalize(e){return div(e,length(e))}function rgbToHsl(e){var t,n,i=e[0],o=e[1],l=e[2],u=Math.max(i,o,l),d=Math.min(i,o,l),f=(u+d)/2;if(u===d)t=0,n=0;else{var p=u-d;switch(n=f>.5?p/(2-u-d):p/(u+d),u){case i:t=(o-l)/p+(o<l?6:0);break;case o:t=(l-i)/p+2;break;case l:t=(i-o)/p+4}t/=6}return[t,n,f,e[3]]}function hue2rgb(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function hslToRgb(e){var t,n,i,o=e[0],l=e[1],u=e[2];if(l===0)t=u,i=u,n=u;else{var d=u<.5?u*(1+l):u+l-u*l,f=2*u-d;t=hue2rgb(f,d,o+1/3),n=hue2rgb(f,d,o),i=hue2rgb(f,d,o-1/3)}return[t,n,i,e[3]]}function linear(e,t,n,i,o){if(i!==void 0&&o!==void 0||(i=t,o=n,t=0,n=1),n<t){var l=n;n=t,t=l}if(e<=t)return i;if(e>=n)return o;var u,d=n===t?0:(e-t)/(n-t);if(!i.length)return i+(o-i)*d;var f=i.length,p=createTypedArray("float32",f);for(u=0;u<f;u+=1)p[u]=i[u]+(o[u]-i[u])*d;return p}function random(e,t){if(t===void 0&&(e===void 0?(e=0,t=1):(t=e,e=void 0)),t.length){var n,i=t.length;e||(e=createTypedArray("float32",i));var o=createTypedArray("float32",i),l=BMMath.random();for(n=0;n<i;n+=1)o[n]=e[n]+l*(t[n]-e[n]);return o}return e===void 0&&(e=0),e+BMMath.random()*(t-e)}function createPath(e,t,n,i){var o,l=e.length,u=shapePool.newElement();u.setPathData(!!i,l);var d,f,p=[0,0];for(o=0;o<l;o+=1)d=t&&t[o]?t[o]:p,f=n&&n[o]?n[o]:p,u.setTripleAt(e[o][0],e[o][1],f[0]+e[o][0],f[1]+e[o][1],d[0]+e[o][0],d[1]+e[o][1],o,!0);return u}function initiateExpression(elem,data,property){function noOp(e){return e}if(!elem.globalData.renderConfig.runExpressions)return noOp;var val=data.x,needsVelocity=/velocity(?![\w\d])/.test(val),_needsRandom=val.indexOf("random")!==-1,elemType=elem.data.ty,transform,$bm_transform,content,effect,thisProperty=property;thisProperty.valueAtTime=thisProperty.getValueAtTime,Object.defineProperty(thisProperty,"value",{get:function(){return thisProperty.v}}),elem.comp.frameDuration=1/elem.comp.globalData.frameRate,elem.comp.displayStartTime=0;var inPoint=elem.data.ip/elem.comp.globalData.frameRate,outPoint=elem.data.op/elem.comp.globalData.frameRate,width=elem.data.sw?elem.data.sw:0,height=elem.data.sh?elem.data.sh:0,name=elem.data.nm,loopIn,loop_in,loopOut,loop_out,smooth,toWorld,fromWorld,fromComp,toComp,fromCompToSurface,position,rotation,anchorPoint,scale,thisLayer,thisComp,mask,valueAtTime,velocityAtTime,scoped_bm_rt,expression_function=eval("[function _expression_function(){"+val+";scoped_bm_rt=$bm_rt}]")[0],numKeys=property.kf?data.k.length:0,active=!this.data||this.data.hd!==!0,wiggle=(function(e,t){var n,i,o=this.pv.length?this.pv.length:1,l=createTypedArray("float32",o),u=Math.floor(5*time);for(n=0,i=0;n<u;){for(i=0;i<o;i+=1)l[i]+=-t+2*t*BMMath.random();n+=1}var d=5*time,f=d-Math.floor(d),p=createTypedArray("float32",o);if(o>1){for(i=0;i<o;i+=1)p[i]=this.pv[i]+l[i]+(-t+2*t*BMMath.random())*f;return p}return this.pv+l[0]+(-t+2*t*BMMath.random())*f}).bind(this);function loopInDuration(e,t){return loopIn(e,t,!0)}function loopOutDuration(e,t){return loopOut(e,t,!0)}thisProperty.loopIn&&(loopIn=thisProperty.loopIn.bind(thisProperty),loop_in=loopIn),thisProperty.loopOut&&(loopOut=thisProperty.loopOut.bind(thisProperty),loop_out=loopOut),thisProperty.smooth&&(smooth=thisProperty.smooth.bind(thisProperty)),this.getValueAtTime&&(valueAtTime=this.getValueAtTime.bind(this)),this.getVelocityAtTime&&(velocityAtTime=this.getVelocityAtTime.bind(this));var comp=elem.comp.globalData.projectInterface.bind(elem.comp.globalData.projectInterface),time,velocity,value,text,textIndex,textTotal,selectorValue;function lookAt(e,t){var n=[t[0]-e[0],t[1]-e[1],t[2]-e[2]],i=Math.atan2(n[0],Math.sqrt(n[1]*n[1]+n[2]*n[2]))/degToRads;return[-Math.atan2(n[1],n[2])/degToRads,i,0]}function easeOut(e,t,n,i,o){return applyEase(easeOutBez,e,t,n,i,o)}function easeIn(e,t,n,i,o){return applyEase(easeInBez,e,t,n,i,o)}function ease(e,t,n,i,o){return applyEase(easeInOutBez,e,t,n,i,o)}function applyEase(e,t,n,i,o,l){o===void 0?(o=n,l=i):t=(t-n)/(i-n),t>1?t=1:t<0&&(t=0);var u=e(t);if($bm_isInstanceOfArray(o)){var d,f=o.length,p=createTypedArray("float32",f);for(d=0;d<f;d+=1)p[d]=(l[d]-o[d])*u+o[d];return p}return(l-o)*u+o}function nearestKey(e){var t,n,i,o=data.k.length;if(data.k.length&&typeof data.k[0]!="number")if(n=-1,(e*=elem.comp.globalData.frameRate)<data.k[0].t)n=1,i=data.k[0].t;else{for(t=0;t<o-1;t+=1){if(e===data.k[t].t){n=t+1,i=data.k[t].t;break}if(e>data.k[t].t&&e<data.k[t+1].t){e-data.k[t].t>data.k[t+1].t-e?(n=t+2,i=data.k[t+1].t):(n=t+1,i=data.k[t].t);break}}n===-1&&(n=t+1,i=data.k[t].t)}else n=0,i=0;var l={};return l.index=n,l.time=i/elem.comp.globalData.frameRate,l}function key(e){var t,n,i;if(!data.k.length||typeof data.k[0]=="number")throw new Error("The property has no keyframe at index "+e);e-=1,t={time:data.k[e].t/elem.comp.globalData.frameRate,value:[]};var o=Object.prototype.hasOwnProperty.call(data.k[e],"s")?data.k[e].s:data.k[e-1].e;for(i=o.length,n=0;n<i;n+=1)t[n]=o[n],t.value[n]=o[n];return t}function framesToTime(e,t){return t||(t=elem.comp.globalData.frameRate),e/t}function timeToFrames(e,t){return e||e===0||(e=time),t||(t=elem.comp.globalData.frameRate),e*t}function seedRandom(e){BMMath.seedrandom(randSeed+e)}function sourceRectAtTime(){return elem.sourceRectAtTime()}function substring(e,t){return typeof value=="string"?t===void 0?value.substring(e):value.substring(e,t):""}function substr(e,t){return typeof value=="string"?t===void 0?value.substr(e):value.substr(e,t):""}function posterizeTime(e){time=e===0?0:Math.floor(time*e)/e,value=valueAtTime(time)}var index=elem.data.ind;!elem.hierarchy||elem.hierarchy.length;var parent,randSeed=Math.floor(1e6*Math.random()),globalData=elem.globalData;function executeExpression(e){return value=e,this.frameExpressionId===elem.globalData.frameId&&this.propType!=="textSelector"?value:(this.propType==="textSelector"&&(textIndex=this.textIndex,textTotal=this.textTotal,selectorValue=this.selectorValue),thisLayer||(text=elem.layerInterface.text,thisLayer=elem.layerInterface,thisComp=elem.comp.compInterface,toWorld=thisLayer.toWorld.bind(thisLayer),fromWorld=thisLayer.fromWorld.bind(thisLayer),fromComp=thisLayer.fromComp.bind(thisLayer),toComp=thisLayer.toComp.bind(thisLayer),mask=thisLayer.mask?thisLayer.mask.bind(thisLayer):null,fromCompToSurface=fromComp),transform||(transform=elem.layerInterface("ADBE Transform Group"),$bm_transform=transform,transform&&(anchorPoint=transform.anchorPoint)),elemType!==4||content||(content=thisLayer("ADBE Root Vectors Group")),effect||(effect=thisLayer(4)),!(!elem.hierarchy||!elem.hierarchy.length)&&!parent&&(parent=elem.hierarchy[0].layerInterface),time=this.comp.renderedFrame/this.comp.globalData.frameRate,_needsRandom&&seedRandom(randSeed+time),needsVelocity&&(velocity=velocityAtTime(time)),expression_function(),this.frameExpressionId=elem.globalData.frameId,scoped_bm_rt=scoped_bm_rt.propType===propTypes.SHAPE?scoped_bm_rt.v:scoped_bm_rt)}return executeExpression.__preventDeadCodeRemoval=[$bm_transform,anchorPoint,time,velocity,inPoint,outPoint,width,height,name,loop_in,loop_out,smooth,toComp,fromCompToSurface,toWorld,fromWorld,mask,position,rotation,scale,thisComp,numKeys,active,wiggle,loopInDuration,loopOutDuration,comp,lookAt,easeOut,easeIn,ease,nearestKey,key,text,textIndex,textTotal,selectorValue,framesToTime,timeToFrames,sourceRectAtTime,substring,substr,posterizeTime,index,globalData],executeExpression}return ob.initiateExpression=initiateExpression,ob.__preventDeadCodeRemoval=[window,document,XMLHttpRequest,fetch,frames,$bm_neg,add,$bm_sum,$bm_sub,$bm_mul,$bm_div,$bm_mod,clamp,radians_to_degrees,degreesToRadians,degrees_to_radians,normalize,rgbToHsl,hslToRgb,linear,random,createPath,_lottieGlobal],ob.resetFrame=resetFrame,ob}(),Expressions=function(){var e={};return e.initExpressions=function(t){var n=0,i=[];t.renderer.compInterface=CompExpressionInterface(t.renderer),t.renderer.globalData.projectInterface.registerComposition(t.renderer),t.renderer.globalData.pushExpression=function(){n+=1},t.renderer.globalData.popExpression=function(){(n-=1)===0&&function(){var o,l=i.length;for(o=0;o<l;o+=1)i[o].release();i.length=0}()},t.renderer.globalData.registerExpressionProperty=function(o){i.indexOf(o)===-1&&i.push(o)}},e.resetFrame=ExpressionManager.resetFrame,e}(),MaskManagerInterface=function(){function e(t,n){this._mask=t,this._data=n}return Object.defineProperty(e.prototype,"maskPath",{get:function(){return this._mask.prop.k&&this._mask.prop.getValue(),this._mask.prop}}),Object.defineProperty(e.prototype,"maskOpacity",{get:function(){return this._mask.op.k&&this._mask.op.getValue(),100*this._mask.op.v}}),function(t){var n,i=createSizedArray(t.viewData.length),o=t.viewData.length;for(n=0;n<o;n+=1)i[n]=new e(t.viewData[n],t.masksProperties[n]);return function(l){for(n=0;n<o;){if(t.masksProperties[n].nm===l)return i[n];n+=1}return null}}}(),ExpressionPropertyInterface=function(){var e={pv:0,v:0,mult:1},t={pv:[0,0,0],v:[0,0,0],mult:1};function n(o,l,u){Object.defineProperty(o,"velocity",{get:function(){return l.getVelocityAtTime(l.comp.currentFrame)}}),o.numKeys=l.keyframes?l.keyframes.length:0,o.key=function(d){if(!o.numKeys)return 0;var f="";f="s"in l.keyframes[d-1]?l.keyframes[d-1].s:"e"in l.keyframes[d-2]?l.keyframes[d-2].e:l.keyframes[d-2].s;var p=u==="unidimensional"?new Number(f):Object.assign({},f);return p.time=l.keyframes[d-1].t/l.elem.comp.globalData.frameRate,p.value=u==="unidimensional"?f[0]:f,p},o.valueAtTime=l.getValueAtTime,o.speedAtTime=l.getSpeedAtTime,o.velocityAtTime=l.getVelocityAtTime,o.propertyGroup=l.propertyGroup}function i(){return e}return function(o){return o?o.propType==="unidimensional"?function(l){l&&"pv"in l||(l=e);var u=1/l.mult,d=l.pv*u,f=new Number(d);return f.value=d,n(f,l,"unidimensional"),function(){return l.k&&l.getValue(),d=l.v*u,f.value!==d&&((f=new Number(d)).value=d,n(f,l,"unidimensional")),f}}(o):function(l){l&&"pv"in l||(l=t);var u=1/l.mult,d=l.data&&l.data.l||l.pv.length,f=createTypedArray("float32",d),p=createTypedArray("float32",d);return f.value=p,n(f,l,"multidimensional"),function(){l.k&&l.getValue();for(var m=0;m<d;m+=1)p[m]=l.v[m]*u,f[m]=p[m];return f}}(o):i}}(),TransformExpressionInterface=function(e){function t(u){switch(u){case"scale":case"Scale":case"ADBE Scale":case 6:return t.scale;case"rotation":case"Rotation":case"ADBE Rotation":case"ADBE Rotate Z":case 10:return t.rotation;case"ADBE Rotate X":return t.xRotation;case"ADBE Rotate Y":return t.yRotation;case"position":case"Position":case"ADBE Position":case 2:return t.position;case"ADBE Position_0":return t.xPosition;case"ADBE Position_1":return t.yPosition;case"ADBE Position_2":return t.zPosition;case"anchorPoint":case"AnchorPoint":case"Anchor Point":case"ADBE AnchorPoint":case 1:return t.anchorPoint;case"opacity":case"Opacity":case 11:return t.opacity;default:return null}}var n,i,o,l;return Object.defineProperty(t,"rotation",{get:ExpressionPropertyInterface(e.r||e.rz)}),Object.defineProperty(t,"zRotation",{get:ExpressionPropertyInterface(e.rz||e.r)}),Object.defineProperty(t,"xRotation",{get:ExpressionPropertyInterface(e.rx)}),Object.defineProperty(t,"yRotation",{get:ExpressionPropertyInterface(e.ry)}),Object.defineProperty(t,"scale",{get:ExpressionPropertyInterface(e.s)}),e.p?l=ExpressionPropertyInterface(e.p):(n=ExpressionPropertyInterface(e.px),i=ExpressionPropertyInterface(e.py),e.pz&&(o=ExpressionPropertyInterface(e.pz))),Object.defineProperty(t,"position",{get:function(){return e.p?l():[n(),i(),o?o():0]}}),Object.defineProperty(t,"xPosition",{get:ExpressionPropertyInterface(e.px)}),Object.defineProperty(t,"yPosition",{get:ExpressionPropertyInterface(e.py)}),Object.defineProperty(t,"zPosition",{get:ExpressionPropertyInterface(e.pz)}),Object.defineProperty(t,"anchorPoint",{get:ExpressionPropertyInterface(e.a)}),Object.defineProperty(t,"opacity",{get:ExpressionPropertyInterface(e.o)}),Object.defineProperty(t,"skew",{get:ExpressionPropertyInterface(e.sk)}),Object.defineProperty(t,"skewAxis",{get:ExpressionPropertyInterface(e.sa)}),Object.defineProperty(t,"orientation",{get:ExpressionPropertyInterface(e.or)}),t},LayerExpressionInterface=function(){function e(p){var m=new Matrix;return p!==void 0?this._elem.finalTransform.mProp.getValueAtTime(p).clone(m):this._elem.finalTransform.mProp.applyToMatrix(m),m}function t(p,m){var g=this.getMatrix(m);return g.props[12]=0,g.props[13]=0,g.props[14]=0,this.applyPoint(g,p)}function n(p,m){var g=this.getMatrix(m);return this.applyPoint(g,p)}function i(p,m){var g=this.getMatrix(m);return g.props[12]=0,g.props[13]=0,g.props[14]=0,this.invertPoint(g,p)}function o(p,m){var g=this.getMatrix(m);return this.invertPoint(g,p)}function l(p,m){if(this._elem.hierarchy&&this._elem.hierarchy.length){var g,b=this._elem.hierarchy.length;for(g=0;g<b;g+=1)this._elem.hierarchy[g].finalTransform.mProp.applyToMatrix(p)}return p.applyToPointArray(m[0],m[1],m[2]||0)}function u(p,m){if(this._elem.hierarchy&&this._elem.hierarchy.length){var g,b=this._elem.hierarchy.length;for(g=0;g<b;g+=1)this._elem.hierarchy[g].finalTransform.mProp.applyToMatrix(p)}return p.inversePoint(m)}function d(p){var m=new Matrix;if(m.reset(),this._elem.finalTransform.mProp.applyToMatrix(m),this._elem.hierarchy&&this._elem.hierarchy.length){var g,b=this._elem.hierarchy.length;for(g=0;g<b;g+=1)this._elem.hierarchy[g].finalTransform.mProp.applyToMatrix(m);return m.inversePoint(p)}return m.inversePoint(p)}function f(){return[1,1,1,1]}return function(p){var m;function g(_){switch(_){case"ADBE Root Vectors Group":case"Contents":case 2:return g.shapeInterface;case 1:case 6:case"Transform":case"transform":case"ADBE Transform Group":return m;case 4:case"ADBE Effect Parade":case"effects":case"Effects":return g.effect;case"ADBE Text Properties":return g.textInterface;default:return null}}g.getMatrix=e,g.invertPoint=u,g.applyPoint=l,g.toWorld=n,g.toWorldVec=t,g.fromWorld=o,g.fromWorldVec=i,g.toComp=n,g.fromComp=d,g.sampleImage=f,g.sourceRectAtTime=p.sourceRectAtTime.bind(p),g._elem=p;var b=getDescriptor(m=TransformExpressionInterface(p.finalTransform.mProp),"anchorPoint");return Object.defineProperties(g,{hasParent:{get:function(){return p.hierarchy.length}},parent:{get:function(){return p.hierarchy[0].layerInterface}},rotation:getDescriptor(m,"rotation"),scale:getDescriptor(m,"scale"),position:getDescriptor(m,"position"),opacity:getDescriptor(m,"opacity"),anchorPoint:b,anchor_point:b,transform:{get:function(){return m}},active:{get:function(){return p.isInRange}}}),g.startTime=p.data.st,g.index=p.data.ind,g.source=p.data.refId,g.height=p.data.ty===0?p.data.h:100,g.width=p.data.ty===0?p.data.w:100,g.inPoint=p.data.ip/p.comp.globalData.frameRate,g.outPoint=p.data.op/p.comp.globalData.frameRate,g._name=p.data.nm,g.registerMaskInterface=function(_){g.mask=new MaskManagerInterface(_,p)},g.registerEffectsInterface=function(_){g.effect=_},g}}(),propertyGroupFactory=function(e,t){return function(n){return(n=n===void 0?1:n)<=0?e:t(n-1)}},PropertyInterface=function(e,t){var n={_name:e};return function(i){return(i=i===void 0?1:i)<=0?n:t(i-1)}},EffectsExpressionInterface=function(){function e(n,i,o,l){function u(g){for(var b=n.ef,_=0,R=b.length;_<R;){if(g===b[_].nm||g===b[_].mn||g===b[_].ix)return b[_].ty===5?p[_]:p[_]();_+=1}throw new Error}var d,f=propertyGroupFactory(u,o),p=[],m=n.ef.length;for(d=0;d<m;d+=1)n.ef[d].ty===5?p.push(e(n.ef[d],i.effectElements[d],i.effectElements[d].propertyGroup,l)):p.push(t(i.effectElements[d],n.ef[d].ty,l,f));return n.mn==="ADBE Color Control"&&Object.defineProperty(u,"color",{get:function(){return p[0]()}}),Object.defineProperties(u,{numProperties:{get:function(){return n.np}},_name:{value:n.nm},propertyGroup:{value:f}}),u.enabled=n.en!==0,u.active=u.enabled,u}function t(n,i,o,l){var u=ExpressionPropertyInterface(n.p);return n.p.setGroupProperty&&n.p.setGroupProperty(PropertyInterface("",l)),function(){return i===10?o.comp.compInterface(n.p.v):u()}}return{createEffectsInterface:function(n,i){if(n.effectsManager){var o,l=[],u=n.data.ef,d=n.effectsManager.effectElements.length;for(o=0;o<d;o+=1)l.push(e(u[o],n.effectsManager.effectElements[o],i,n));var f=n.data.ef||[],p=function(m){for(o=0,d=f.length;o<d;){if(m===f[o].nm||m===f[o].mn||m===f[o].ix)return l[o];o+=1}return null};return Object.defineProperty(p,"numProperties",{get:function(){return f.length}}),p}return null}}}(),ShapePathInterface=function(e,t,n){var i=t.sh;function o(u){return u==="Shape"||u==="shape"||u==="Path"||u==="path"||u==="ADBE Vector Shape"||u===2?o.path:null}var l=propertyGroupFactory(o,n);return i.setGroupProperty(PropertyInterface("Path",l)),Object.defineProperties(o,{path:{get:function(){return i.k&&i.getValue(),i}},shape:{get:function(){return i.k&&i.getValue(),i}},_name:{value:e.nm},ix:{value:e.ix},propertyIndex:{value:e.ix},mn:{value:e.mn},propertyGroup:{value:n}}),o},ShapeExpressionInterface=function(){function e(_,R,E){var S,C=[],T=_?_.length:0;for(S=0;S<T;S+=1)_[S].ty==="gr"?C.push(t(_[S],R[S],E)):_[S].ty==="fl"?C.push(n(_[S],R[S],E)):_[S].ty==="st"?C.push(l(_[S],R[S],E)):_[S].ty==="tm"?C.push(u(_[S],R[S],E)):_[S].ty==="tr"||(_[S].ty==="el"?C.push(f(_[S],R[S],E)):_[S].ty==="sr"?C.push(p(_[S],R[S],E)):_[S].ty==="sh"?C.push(ShapePathInterface(_[S],R[S],E)):_[S].ty==="rc"?C.push(m(_[S],R[S],E)):_[S].ty==="rd"?C.push(g(_[S],R[S],E)):_[S].ty==="rp"?C.push(b(_[S],R[S],E)):_[S].ty==="gf"?C.push(i(_[S],R[S],E)):C.push(o(_[S],R[S])));return C}function t(_,R,E){var S=function(A){switch(A){case"ADBE Vectors Group":case"Contents":case 2:return S.content;default:return S.transform}};S.propertyGroup=propertyGroupFactory(S,E);var C=function(A,M,I){var O,N=function(D){for(var F=0,L=O.length;F<L;){if(O[F]._name===D||O[F].mn===D||O[F].propertyIndex===D||O[F].ix===D||O[F].ind===D)return O[F];F+=1}return typeof D=="number"?O[D-1]:null};N.propertyGroup=propertyGroupFactory(N,I),O=e(A.it,M.it,N.propertyGroup),N.numProperties=O.length;var j=d(A.it[A.it.length-1],M.it[M.it.length-1],N.propertyGroup);return N.transform=j,N.propertyIndex=A.cix,N._name=A.nm,N}(_,R,S.propertyGroup),T=d(_.it[_.it.length-1],R.it[R.it.length-1],S.propertyGroup);return S.content=C,S.transform=T,Object.defineProperty(S,"_name",{get:function(){return _.nm}}),S.numProperties=_.np,S.propertyIndex=_.ix,S.nm=_.nm,S.mn=_.mn,S}function n(_,R,E){function S(C){return C==="Color"||C==="color"?S.color:C==="Opacity"||C==="opacity"?S.opacity:null}return Object.defineProperties(S,{color:{get:ExpressionPropertyInterface(R.c)},opacity:{get:ExpressionPropertyInterface(R.o)},_name:{value:_.nm},mn:{value:_.mn}}),R.c.setGroupProperty(PropertyInterface("Color",E)),R.o.setGroupProperty(PropertyInterface("Opacity",E)),S}function i(_,R,E){function S(C){return C==="Start Point"||C==="start point"?S.startPoint:C==="End Point"||C==="end point"?S.endPoint:C==="Opacity"||C==="opacity"?S.opacity:null}return Object.defineProperties(S,{startPoint:{get:ExpressionPropertyInterface(R.s)},endPoint:{get:ExpressionPropertyInterface(R.e)},opacity:{get:ExpressionPropertyInterface(R.o)},type:{get:function(){return"a"}},_name:{value:_.nm},mn:{value:_.mn}}),R.s.setGroupProperty(PropertyInterface("Start Point",E)),R.e.setGroupProperty(PropertyInterface("End Point",E)),R.o.setGroupProperty(PropertyInterface("Opacity",E)),S}function o(){return function(){return null}}function l(_,R,E){var S,C=propertyGroupFactory(O,E),T=propertyGroupFactory(I,C);function A(N){Object.defineProperty(I,_.d[N].nm,{get:ExpressionPropertyInterface(R.d.dataProps[N].p)})}var M=_.d?_.d.length:0,I={};for(S=0;S<M;S+=1)A(S),R.d.dataProps[S].p.setGroupProperty(T);function O(N){return N==="Color"||N==="color"?O.color:N==="Opacity"||N==="opacity"?O.opacity:N==="Stroke Width"||N==="stroke width"?O.strokeWidth:null}return Object.defineProperties(O,{color:{get:ExpressionPropertyInterface(R.c)},opacity:{get:ExpressionPropertyInterface(R.o)},strokeWidth:{get:ExpressionPropertyInterface(R.w)},dash:{get:function(){return I}},_name:{value:_.nm},mn:{value:_.mn}}),R.c.setGroupProperty(PropertyInterface("Color",C)),R.o.setGroupProperty(PropertyInterface("Opacity",C)),R.w.setGroupProperty(PropertyInterface("Stroke Width",C)),O}function u(_,R,E){function S(T){return T===_.e.ix||T==="End"||T==="end"?S.end:T===_.s.ix?S.start:T===_.o.ix?S.offset:null}var C=propertyGroupFactory(S,E);return S.propertyIndex=_.ix,R.s.setGroupProperty(PropertyInterface("Start",C)),R.e.setGroupProperty(PropertyInterface("End",C)),R.o.setGroupProperty(PropertyInterface("Offset",C)),S.propertyIndex=_.ix,S.propertyGroup=E,Object.defineProperties(S,{start:{get:ExpressionPropertyInterface(R.s)},end:{get:ExpressionPropertyInterface(R.e)},offset:{get:ExpressionPropertyInterface(R.o)},_name:{value:_.nm}}),S.mn=_.mn,S}function d(_,R,E){function S(T){return _.a.ix===T||T==="Anchor Point"?S.anchorPoint:_.o.ix===T||T==="Opacity"?S.opacity:_.p.ix===T||T==="Position"?S.position:_.r.ix===T||T==="Rotation"||T==="ADBE Vector Rotation"?S.rotation:_.s.ix===T||T==="Scale"?S.scale:_.sk&&_.sk.ix===T||T==="Skew"?S.skew:_.sa&&_.sa.ix===T||T==="Skew Axis"?S.skewAxis:null}var C=propertyGroupFactory(S,E);return R.transform.mProps.o.setGroupProperty(PropertyInterface("Opacity",C)),R.transform.mProps.p.setGroupProperty(PropertyInterface("Position",C)),R.transform.mProps.a.setGroupProperty(PropertyInterface("Anchor Point",C)),R.transform.mProps.s.setGroupProperty(PropertyInterface("Scale",C)),R.transform.mProps.r.setGroupProperty(PropertyInterface("Rotation",C)),R.transform.mProps.sk&&(R.transform.mProps.sk.setGroupProperty(PropertyInterface("Skew",C)),R.transform.mProps.sa.setGroupProperty(PropertyInterface("Skew Angle",C))),R.transform.op.setGroupProperty(PropertyInterface("Opacity",C)),Object.defineProperties(S,{opacity:{get:ExpressionPropertyInterface(R.transform.mProps.o)},position:{get:ExpressionPropertyInterface(R.transform.mProps.p)},anchorPoint:{get:ExpressionPropertyInterface(R.transform.mProps.a)},scale:{get:ExpressionPropertyInterface(R.transform.mProps.s)},rotation:{get:ExpressionPropertyInterface(R.transform.mProps.r)},skew:{get:ExpressionPropertyInterface(R.transform.mProps.sk)},skewAxis:{get:ExpressionPropertyInterface(R.transform.mProps.sa)},_name:{value:_.nm}}),S.ty="tr",S.mn=_.mn,S.propertyGroup=E,S}function f(_,R,E){function S(A){return _.p.ix===A?S.position:_.s.ix===A?S.size:null}var C=propertyGroupFactory(S,E);S.propertyIndex=_.ix;var T=R.sh.ty==="tm"?R.sh.prop:R.sh;return T.s.setGroupProperty(PropertyInterface("Size",C)),T.p.setGroupProperty(PropertyInterface("Position",C)),Object.defineProperties(S,{size:{get:ExpressionPropertyInterface(T.s)},position:{get:ExpressionPropertyInterface(T.p)},_name:{value:_.nm}}),S.mn=_.mn,S}function p(_,R,E){function S(A){return _.p.ix===A?S.position:_.r.ix===A?S.rotation:_.pt.ix===A?S.points:_.or.ix===A||A==="ADBE Vector Star Outer Radius"?S.outerRadius:_.os.ix===A?S.outerRoundness:!_.ir||_.ir.ix!==A&&A!=="ADBE Vector Star Inner Radius"?_.is&&_.is.ix===A?S.innerRoundness:null:S.innerRadius}var C=propertyGroupFactory(S,E),T=R.sh.ty==="tm"?R.sh.prop:R.sh;return S.propertyIndex=_.ix,T.or.setGroupProperty(PropertyInterface("Outer Radius",C)),T.os.setGroupProperty(PropertyInterface("Outer Roundness",C)),T.pt.setGroupProperty(PropertyInterface("Points",C)),T.p.setGroupProperty(PropertyInterface("Position",C)),T.r.setGroupProperty(PropertyInterface("Rotation",C)),_.ir&&(T.ir.setGroupProperty(PropertyInterface("Inner Radius",C)),T.is.setGroupProperty(PropertyInterface("Inner Roundness",C))),Object.defineProperties(S,{position:{get:ExpressionPropertyInterface(T.p)},rotation:{get:ExpressionPropertyInterface(T.r)},points:{get:ExpressionPropertyInterface(T.pt)},outerRadius:{get:ExpressionPropertyInterface(T.or)},outerRoundness:{get:ExpressionPropertyInterface(T.os)},innerRadius:{get:ExpressionPropertyInterface(T.ir)},innerRoundness:{get:ExpressionPropertyInterface(T.is)},_name:{value:_.nm}}),S.mn=_.mn,S}function m(_,R,E){function S(A){return _.p.ix===A?S.position:_.r.ix===A?S.roundness:_.s.ix===A||A==="Size"||A==="ADBE Vector Rect Size"?S.size:null}var C=propertyGroupFactory(S,E),T=R.sh.ty==="tm"?R.sh.prop:R.sh;return S.propertyIndex=_.ix,T.p.setGroupProperty(PropertyInterface("Position",C)),T.s.setGroupProperty(PropertyInterface("Size",C)),T.r.setGroupProperty(PropertyInterface("Rotation",C)),Object.defineProperties(S,{position:{get:ExpressionPropertyInterface(T.p)},roundness:{get:ExpressionPropertyInterface(T.r)},size:{get:ExpressionPropertyInterface(T.s)},_name:{value:_.nm}}),S.mn=_.mn,S}function g(_,R,E){function S(A){return _.r.ix===A||A==="Round Corners 1"?S.radius:null}var C=propertyGroupFactory(S,E),T=R;return S.propertyIndex=_.ix,T.rd.setGroupProperty(PropertyInterface("Radius",C)),Object.defineProperties(S,{radius:{get:ExpressionPropertyInterface(T.rd)},_name:{value:_.nm}}),S.mn=_.mn,S}function b(_,R,E){function S(A){return _.c.ix===A||A==="Copies"?S.copies:_.o.ix===A||A==="Offset"?S.offset:null}var C=propertyGroupFactory(S,E),T=R;return S.propertyIndex=_.ix,T.c.setGroupProperty(PropertyInterface("Copies",C)),T.o.setGroupProperty(PropertyInterface("Offset",C)),Object.defineProperties(S,{copies:{get:ExpressionPropertyInterface(T.c)},offset:{get:ExpressionPropertyInterface(T.o)},_name:{value:_.nm}}),S.mn=_.mn,S}return function(_,R,E){var S;function C(T){if(typeof T=="number")return(T=T===void 0?1:T)===0?E:S[T-1];for(var A=0,M=S.length;A<M;){if(S[A]._name===T)return S[A];A+=1}return null}return C.propertyGroup=propertyGroupFactory(C,function(){return E}),S=e(_,R,C.propertyGroup),C.numProperties=S.length,C._name="Contents",C}}(),TextExpressionInterface=function(e){var t;function n(i){switch(i){case"ADBE Text Document":return n.sourceText;default:return null}}return Object.defineProperty(n,"sourceText",{get:function(){e.textProperty.getValue();var i=e.textProperty.currentData.t;return t&&i===t.value||((t=new String(i)).value=i||new String(i),Object.defineProperty(t,"style",{get:function(){return{fillColor:e.textProperty.currentData.fc}}})),t}}),n};function _typeof(e){return(_typeof=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}var FootageInterface=(dataInterfaceFactory=function(e){function t(n){return n==="Outline"?t.outlineInterface():null}return t._name="Outline",t.outlineInterface=function(n){var i="",o=n.getFootageData();function l(u){if(o[u])return i=u,_typeof(o=o[u])==="object"?l:o;var d=u.indexOf(i);if(d!==-1){var f=parseInt(u.substr(d+i.length),10);return _typeof(o=o[f])==="object"?l:o}return""}return function(){return i="",o=n.getFootageData(),l}}(e),t},function(e){function t(n){return n==="Data"?t.dataInterface:null}return t._name="Data",t.dataInterface=dataInterfaceFactory(e),t}),dataInterfaceFactory,interfaces={layer:LayerExpressionInterface,effects:EffectsExpressionInterface,comp:CompExpressionInterface,shape:ShapeExpressionInterface,text:TextExpressionInterface,footage:FootageInterface};function getInterface(e){return interfaces[e]||null}var expressionHelpers={searchExpressions:function(e,t,n){t.x&&(n.k=!0,n.x=!0,n.initiateExpression=ExpressionManager.initiateExpression,n.effectsSequence.push(n.initiateExpression(e,t,n).bind(n)))},getSpeedAtTime:function(e){var t=this.getValueAtTime(e),n=this.getValueAtTime(e+-.01),i=0;if(t.length){var o;for(o=0;o<t.length;o+=1)i+=Math.pow(n[o]-t[o],2);i=100*Math.sqrt(i)}else i=0;return i},getVelocityAtTime:function(e){if(this.vel!==void 0)return this.vel;var t,n,i=this.getValueAtTime(e),o=this.getValueAtTime(e+-.001);if(i.length)for(t=createTypedArray("float32",i.length),n=0;n<i.length;n+=1)t[n]=(o[n]-i[n])/-.001;else t=(o-i)/-.001;return t},getValueAtTime:function(e){return e*=this.elem.globalData.frameRate,(e-=this.offsetTime)!==this._cachingAtTime.lastFrame&&(this._cachingAtTime.lastIndex=this._cachingAtTime.lastFrame<e?this._cachingAtTime.lastIndex:0,this._cachingAtTime.value=this.interpolateValue(e,this._cachingAtTime),this._cachingAtTime.lastFrame=e),this._cachingAtTime.value},getStaticValueAtTime:function(){return this.pv},setGroupProperty:function(e){this.propertyGroup=e}};function addPropertyDecorator(){function e(g,b,_){if(!this.k||!this.keyframes)return this.pv;g=g?g.toLowerCase():"";var R,E,S,C,T,A=this.comp.renderedFrame,M=this.keyframes,I=M[M.length-1].t;if(A<=I)return this.pv;if(_?E=I-(R=b?Math.abs(I-this.elem.comp.globalData.frameRate*b):Math.max(0,I-this.elem.data.ip)):((!b||b>M.length-1)&&(b=M.length-1),R=I-(E=M[M.length-1-b].t)),g==="pingpong"){if(Math.floor((A-E)/R)%2!=0)return this.getValueAtTime((R-(A-E)%R+E)/this.comp.globalData.frameRate,0)}else{if(g==="offset"){var O=this.getValueAtTime(E/this.comp.globalData.frameRate,0),N=this.getValueAtTime(I/this.comp.globalData.frameRate,0),j=this.getValueAtTime(((A-E)%R+E)/this.comp.globalData.frameRate,0),D=Math.floor((A-E)/R);if(this.pv.length){for(C=(T=new Array(O.length)).length,S=0;S<C;S+=1)T[S]=(N[S]-O[S])*D+j[S];return T}return(N-O)*D+j}if(g==="continue"){var F=this.getValueAtTime(I/this.comp.globalData.frameRate,0),L=this.getValueAtTime((I-.001)/this.comp.globalData.frameRate,0);if(this.pv.length){for(C=(T=new Array(F.length)).length,S=0;S<C;S+=1)T[S]=F[S]+(F[S]-L[S])*((A-I)/this.comp.globalData.frameRate)/5e-4;return T}return F+(A-I)/.001*(F-L)}}return this.getValueAtTime(((A-E)%R+E)/this.comp.globalData.frameRate,0)}function t(g,b,_){if(!this.k)return this.pv;g=g?g.toLowerCase():"";var R,E,S,C,T,A=this.comp.renderedFrame,M=this.keyframes,I=M[0].t;if(A>=I)return this.pv;if(_?E=I+(R=b?Math.abs(this.elem.comp.globalData.frameRate*b):Math.max(0,this.elem.data.op-I)):((!b||b>M.length-1)&&(b=M.length-1),R=(E=M[b].t)-I),g==="pingpong"){if(Math.floor((I-A)/R)%2==0)return this.getValueAtTime(((I-A)%R+I)/this.comp.globalData.frameRate,0)}else{if(g==="offset"){var O=this.getValueAtTime(I/this.comp.globalData.frameRate,0),N=this.getValueAtTime(E/this.comp.globalData.frameRate,0),j=this.getValueAtTime((R-(I-A)%R+I)/this.comp.globalData.frameRate,0),D=Math.floor((I-A)/R)+1;if(this.pv.length){for(C=(T=new Array(O.length)).length,S=0;S<C;S+=1)T[S]=j[S]-(N[S]-O[S])*D;return T}return j-(N-O)*D}if(g==="continue"){var F=this.getValueAtTime(I/this.comp.globalData.frameRate,0),L=this.getValueAtTime((I+.001)/this.comp.globalData.frameRate,0);if(this.pv.length){for(C=(T=new Array(F.length)).length,S=0;S<C;S+=1)T[S]=F[S]+(F[S]-L[S])*(I-A)/.001;return T}return F+(F-L)*(I-A)/.001}}return this.getValueAtTime((R-((I-A)%R+I))/this.comp.globalData.frameRate,0)}function n(g,b){if(!this.k)return this.pv;if(g=.5*(g||.4),(b=Math.floor(b||5))<=1)return this.pv;var _,R,E=this.comp.renderedFrame/this.comp.globalData.frameRate,S=E-g,C=b>1?(E+g-S)/(b-1):1,T=0,A=0;for(_=this.pv.length?createTypedArray("float32",this.pv.length):0;T<b;){if(R=this.getValueAtTime(S+T*C),this.pv.length)for(A=0;A<this.pv.length;A+=1)_[A]+=R[A];else _+=R;T+=1}if(this.pv.length)for(A=0;A<this.pv.length;A+=1)_[A]/=b;else _/=b;return _}function i(g){this._transformCachingAtTime||(this._transformCachingAtTime={v:new Matrix});var b=this._transformCachingAtTime.v;if(b.cloneFromProps(this.pre.props),this.appliedTransformations<1){var _=this.a.getValueAtTime(g);b.translate(-_[0]*this.a.mult,-_[1]*this.a.mult,_[2]*this.a.mult)}if(this.appliedTransformations<2){var R=this.s.getValueAtTime(g);b.scale(R[0]*this.s.mult,R[1]*this.s.mult,R[2]*this.s.mult)}if(this.sk&&this.appliedTransformations<3){var E=this.sk.getValueAtTime(g),S=this.sa.getValueAtTime(g);b.skewFromAxis(-E*this.sk.mult,S*this.sa.mult)}if(this.r&&this.appliedTransformations<4){var C=this.r.getValueAtTime(g);b.rotate(-C*this.r.mult)}else if(!this.r&&this.appliedTransformations<4){var T=this.rz.getValueAtTime(g),A=this.ry.getValueAtTime(g),M=this.rx.getValueAtTime(g),I=this.or.getValueAtTime(g);b.rotateZ(-T*this.rz.mult).rotateY(A*this.ry.mult).rotateX(M*this.rx.mult).rotateZ(-I[2]*this.or.mult).rotateY(I[1]*this.or.mult).rotateX(I[0]*this.or.mult)}if(this.data.p&&this.data.p.s){var O=this.px.getValueAtTime(g),N=this.py.getValueAtTime(g);if(this.data.p.z){var j=this.pz.getValueAtTime(g);b.translate(O*this.px.mult,N*this.py.mult,-j*this.pz.mult)}else b.translate(O*this.px.mult,N*this.py.mult,0)}else{var D=this.p.getValueAtTime(g);b.translate(D[0]*this.p.mult,D[1]*this.p.mult,-D[2]*this.p.mult)}return b}function o(){return this.v.clone(new Matrix)}var l=TransformPropertyFactory.getTransformProperty;TransformPropertyFactory.getTransformProperty=function(g,b,_){var R=l(g,b,_);return R.dynamicProperties.length?R.getValueAtTime=i.bind(R):R.getValueAtTime=o.bind(R),R.setGroupProperty=expressionHelpers.setGroupProperty,R};var u=PropertyFactory.getProp;PropertyFactory.getProp=function(g,b,_,R,E){var S=u(g,b,_,R,E);S.kf?S.getValueAtTime=expressionHelpers.getValueAtTime.bind(S):S.getValueAtTime=expressionHelpers.getStaticValueAtTime.bind(S),S.setGroupProperty=expressionHelpers.setGroupProperty,S.loopOut=e,S.loopIn=t,S.smooth=n,S.getVelocityAtTime=expressionHelpers.getVelocityAtTime.bind(S),S.getSpeedAtTime=expressionHelpers.getSpeedAtTime.bind(S),S.numKeys=b.a===1?b.k.length:0,S.propertyIndex=b.ix;var C=0;return _!==0&&(C=createTypedArray("float32",b.a===1?b.k[0].s.length:b.k.length)),S._cachingAtTime={lastFrame:initialDefaultFrame,lastIndex:0,value:C},expressionHelpers.searchExpressions(g,b,S),S.k&&E.addDynamicProperty(S),S};var d=ShapePropertyFactory.getConstructorFunction(),f=ShapePropertyFactory.getKeyframedConstructorFunction();function p(){}p.prototype={vertices:function(g,b){this.k&&this.getValue();var _,R=this.v;b!==void 0&&(R=this.getValueAtTime(b,0));var E=R._length,S=R[g],C=R.v,T=createSizedArray(E);for(_=0;_<E;_+=1)T[_]=g==="i"||g==="o"?[S[_][0]-C[_][0],S[_][1]-C[_][1]]:[S[_][0],S[_][1]];return T},points:function(g){return this.vertices("v",g)},inTangents:function(g){return this.vertices("i",g)},outTangents:function(g){return this.vertices("o",g)},isClosed:function(){return this.v.c},pointOnPath:function(g,b){var _=this.v;b!==void 0&&(_=this.getValueAtTime(b,0)),this._segmentsLength||(this._segmentsLength=bez.getSegmentsLength(_));for(var R,E=this._segmentsLength,S=E.lengths,C=E.totalLength*g,T=0,A=S.length,M=0;T<A;){if(M+S[T].addedLength>C){var I=T,O=_.c&&T===A-1?0:T+1,N=(C-M)/S[T].addedLength;R=bez.getPointInSegment(_.v[I],_.v[O],_.o[I],_.i[O],N,S[T]);break}M+=S[T].addedLength,T+=1}return R||(R=_.c?[_.v[0][0],_.v[0][1]]:[_.v[_._length-1][0],_.v[_._length-1][1]]),R},vectorOnPath:function(g,b,_){g==1?g=this.v.c:g==0&&(g=.999);var R=this.pointOnPath(g,b),E=this.pointOnPath(g+.001,b),S=E[0]-R[0],C=E[1]-R[1],T=Math.sqrt(Math.pow(S,2)+Math.pow(C,2));return T===0?[0,0]:_==="tangent"?[S/T,C/T]:[-C/T,S/T]},tangentOnPath:function(g,b){return this.vectorOnPath(g,b,"tangent")},normalOnPath:function(g,b){return this.vectorOnPath(g,b,"normal")},setGroupProperty:expressionHelpers.setGroupProperty,getValueAtTime:expressionHelpers.getStaticValueAtTime},extendPrototype([p],d),extendPrototype([p],f),f.prototype.getValueAtTime=function(g){return this._cachingAtTime||(this._cachingAtTime={shapeValue:shapePool.clone(this.pv),lastIndex:0,lastTime:initialDefaultFrame}),g*=this.elem.globalData.frameRate,(g-=this.offsetTime)!==this._cachingAtTime.lastTime&&(this._cachingAtTime.lastIndex=this._cachingAtTime.lastTime<g?this._caching.lastIndex:0,this._cachingAtTime.lastTime=g,this.interpolateShape(g,this._cachingAtTime.shapeValue,this._cachingAtTime)),this._cachingAtTime.shapeValue},f.prototype.initiateExpression=ExpressionManager.initiateExpression;var m=ShapePropertyFactory.getShapeProp;ShapePropertyFactory.getShapeProp=function(g,b,_,R,E){var S=m(g,b,_,R,E);return S.propertyIndex=b.ix,S.lock=!1,_===3?expressionHelpers.searchExpressions(g,b.pt,S):_===4&&expressionHelpers.searchExpressions(g,b.ks,S),S.k&&g.addDynamicProperty(S),S}}function initialize$1(){addPropertyDecorator()}function addDecorator(){TextProperty.prototype.getExpressionValue=function(e,t){var n=this.calculateExpression(t);if(e.t!==n){var i={};return this.copyData(i,e),i.t=n.toString(),i.__complete=!1,i}return e},TextProperty.prototype.searchProperty=function(){var e=this.searchKeyframes(),t=this.searchExpressions();return this.kf=e||t,this.kf},TextProperty.prototype.searchExpressions=function(){return this.data.d.x?(this.calculateExpression=ExpressionManager.initiateExpression.bind(this)(this.elem,this.data.d,this),this.addEffect(this.getExpressionValue.bind(this)),!0):null}}function initialize(){addDecorator()}function SVGComposableEffect(){}SVGComposableEffect.prototype={createMergeNode:function(e,t){var n,i,o=createNS("feMerge");for(o.setAttribute("result",e),i=0;i<t.length;i+=1)(n=createNS("feMergeNode")).setAttribute("in",t[i]),o.appendChild(n),o.appendChild(n);return o}};var linearFilterValue="0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0";function SVGTintFilter(e,t,n,i,o){this.filterManager=t;var l=createNS("feColorMatrix");l.setAttribute("type","matrix"),l.setAttribute("color-interpolation-filters","linearRGB"),l.setAttribute("values",linearFilterValue+" 1 0"),this.linearFilter=l,l.setAttribute("result",i+"_tint_1"),e.appendChild(l),(l=createNS("feColorMatrix")).setAttribute("type","matrix"),l.setAttribute("color-interpolation-filters","sRGB"),l.setAttribute("values","1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"),l.setAttribute("result",i+"_tint_2"),e.appendChild(l),this.matrixFilter=l;var u=this.createMergeNode(i,[o,i+"_tint_1",i+"_tint_2"]);e.appendChild(u)}function SVGFillFilter(e,t,n,i){this.filterManager=t;var o=createNS("feColorMatrix");o.setAttribute("type","matrix"),o.setAttribute("color-interpolation-filters","sRGB"),o.setAttribute("values","1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"),o.setAttribute("result",i),e.appendChild(o),this.matrixFilter=o}function SVGStrokeEffect(e,t,n){this.initialized=!1,this.filterManager=t,this.elem=n,this.paths=[]}function SVGTritoneFilter(e,t,n,i){this.filterManager=t;var o=createNS("feColorMatrix");o.setAttribute("type","matrix"),o.setAttribute("color-interpolation-filters","linearRGB"),o.setAttribute("values","0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0"),e.appendChild(o);var l=createNS("feComponentTransfer");l.setAttribute("color-interpolation-filters","sRGB"),l.setAttribute("result",i),this.matrixFilter=l;var u=createNS("feFuncR");u.setAttribute("type","table"),l.appendChild(u),this.feFuncR=u;var d=createNS("feFuncG");d.setAttribute("type","table"),l.appendChild(d),this.feFuncG=d;var f=createNS("feFuncB");f.setAttribute("type","table"),l.appendChild(f),this.feFuncB=f,e.appendChild(l)}function SVGProLevelsFilter(e,t,n,i){this.filterManager=t;var o=this.filterManager.effectElements,l=createNS("feComponentTransfer");(o[10].p.k||o[10].p.v!==0||o[11].p.k||o[11].p.v!==1||o[12].p.k||o[12].p.v!==1||o[13].p.k||o[13].p.v!==0||o[14].p.k||o[14].p.v!==1)&&(this.feFuncR=this.createFeFunc("feFuncR",l)),(o[17].p.k||o[17].p.v!==0||o[18].p.k||o[18].p.v!==1||o[19].p.k||o[19].p.v!==1||o[20].p.k||o[20].p.v!==0||o[21].p.k||o[21].p.v!==1)&&(this.feFuncG=this.createFeFunc("feFuncG",l)),(o[24].p.k||o[24].p.v!==0||o[25].p.k||o[25].p.v!==1||o[26].p.k||o[26].p.v!==1||o[27].p.k||o[27].p.v!==0||o[28].p.k||o[28].p.v!==1)&&(this.feFuncB=this.createFeFunc("feFuncB",l)),(o[31].p.k||o[31].p.v!==0||o[32].p.k||o[32].p.v!==1||o[33].p.k||o[33].p.v!==1||o[34].p.k||o[34].p.v!==0||o[35].p.k||o[35].p.v!==1)&&(this.feFuncA=this.createFeFunc("feFuncA",l)),(this.feFuncR||this.feFuncG||this.feFuncB||this.feFuncA)&&(l.setAttribute("color-interpolation-filters","sRGB"),e.appendChild(l)),(o[3].p.k||o[3].p.v!==0||o[4].p.k||o[4].p.v!==1||o[5].p.k||o[5].p.v!==1||o[6].p.k||o[6].p.v!==0||o[7].p.k||o[7].p.v!==1)&&((l=createNS("feComponentTransfer")).setAttribute("color-interpolation-filters","sRGB"),l.setAttribute("result",i),e.appendChild(l),this.feFuncRComposed=this.createFeFunc("feFuncR",l),this.feFuncGComposed=this.createFeFunc("feFuncG",l),this.feFuncBComposed=this.createFeFunc("feFuncB",l))}function SVGDropShadowEffect(e,t,n,i,o){var l=t.container.globalData.renderConfig.filterSize,u=t.data.fs||l;e.setAttribute("x",u.x||l.x),e.setAttribute("y",u.y||l.y),e.setAttribute("width",u.width||l.width),e.setAttribute("height",u.height||l.height),this.filterManager=t;var d=createNS("feGaussianBlur");d.setAttribute("in","SourceAlpha"),d.setAttribute("result",i+"_drop_shadow_1"),d.setAttribute("stdDeviation","0"),this.feGaussianBlur=d,e.appendChild(d);var f=createNS("feOffset");f.setAttribute("dx","25"),f.setAttribute("dy","0"),f.setAttribute("in",i+"_drop_shadow_1"),f.setAttribute("result",i+"_drop_shadow_2"),this.feOffset=f,e.appendChild(f);var p=createNS("feFlood");p.setAttribute("flood-color","#00ff00"),p.setAttribute("flood-opacity","1"),p.setAttribute("result",i+"_drop_shadow_3"),this.feFlood=p,e.appendChild(p);var m=createNS("feComposite");m.setAttribute("in",i+"_drop_shadow_3"),m.setAttribute("in2",i+"_drop_shadow_2"),m.setAttribute("operator","in"),m.setAttribute("result",i+"_drop_shadow_4"),e.appendChild(m);var g=this.createMergeNode(i,[i+"_drop_shadow_4",o]);e.appendChild(g)}extendPrototype([SVGComposableEffect],SVGTintFilter),SVGTintFilter.prototype.renderFrame=function(e){if(e||this.filterManager._mdf){var t=this.filterManager.effectElements[0].p.v,n=this.filterManager.effectElements[1].p.v,i=this.filterManager.effectElements[2].p.v/100;this.linearFilter.setAttribute("values",linearFilterValue+" "+i+" 0"),this.matrixFilter.setAttribute("values",n[0]-t[0]+" 0 0 0 "+t[0]+" "+(n[1]-t[1])+" 0 0 0 "+t[1]+" "+(n[2]-t[2])+" 0 0 0 "+t[2]+" 0 0 0 1 0")}},SVGFillFilter.prototype.renderFrame=function(e){if(e||this.filterManager._mdf){var t=this.filterManager.effectElements[2].p.v,n=this.filterManager.effectElements[6].p.v;this.matrixFilter.setAttribute("values","0 0 0 0 "+t[0]+" 0 0 0 0 "+t[1]+" 0 0 0 0 "+t[2]+" 0 0 0 "+n+" 0")}},SVGStrokeEffect.prototype.initialize=function(){var e,t,n,i,o=this.elem.layerElement.children||this.elem.layerElement.childNodes;for(this.filterManager.effectElements[1].p.v===1?(i=this.elem.maskManager.masksProperties.length,n=0):i=(n=this.filterManager.effectElements[0].p.v-1)+1,(t=createNS("g")).setAttribute("fill","none"),t.setAttribute("stroke-linecap","round"),t.setAttribute("stroke-dashoffset",1);n<i;n+=1)e=createNS("path"),t.appendChild(e),this.paths.push({p:e,m:n});if(this.filterManager.effectElements[10].p.v===3){var l=createNS("mask"),u=createElementID();l.setAttribute("id",u),l.setAttribute("mask-type","alpha"),l.appendChild(t),this.elem.globalData.defs.appendChild(l);var d=createNS("g");for(d.setAttribute("mask","url("+getLocationHref()+"#"+u+")");o[0];)d.appendChild(o[0]);this.elem.layerElement.appendChild(d),this.masker=l,t.setAttribute("stroke","#fff")}else if(this.filterManager.effectElements[10].p.v===1||this.filterManager.effectElements[10].p.v===2){if(this.filterManager.effectElements[10].p.v===2)for(o=this.elem.layerElement.children||this.elem.layerElement.childNodes;o.length;)this.elem.layerElement.removeChild(o[0]);this.elem.layerElement.appendChild(t),this.elem.layerElement.removeAttribute("mask"),t.setAttribute("stroke","#fff")}this.initialized=!0,this.pathMasker=t},SVGStrokeEffect.prototype.renderFrame=function(e){var t;this.initialized||this.initialize();var n,i,o=this.paths.length;for(t=0;t<o;t+=1)if(this.paths[t].m!==-1&&(n=this.elem.maskManager.viewData[this.paths[t].m],i=this.paths[t].p,(e||this.filterManager._mdf||n.prop._mdf)&&i.setAttribute("d",n.lastPath),e||this.filterManager.effectElements[9].p._mdf||this.filterManager.effectElements[4].p._mdf||this.filterManager.effectElements[7].p._mdf||this.filterManager.effectElements[8].p._mdf||n.prop._mdf)){var l;if(this.filterManager.effectElements[7].p.v!==0||this.filterManager.effectElements[8].p.v!==100){var u=.01*Math.min(this.filterManager.effectElements[7].p.v,this.filterManager.effectElements[8].p.v),d=.01*Math.max(this.filterManager.effectElements[7].p.v,this.filterManager.effectElements[8].p.v),f=i.getTotalLength();l="0 0 0 "+f*u+" ";var p,m=f*(d-u),g=1+2*this.filterManager.effectElements[4].p.v*this.filterManager.effectElements[9].p.v*.01,b=Math.floor(m/g);for(p=0;p<b;p+=1)l+="1 "+2*this.filterManager.effectElements[4].p.v*this.filterManager.effectElements[9].p.v*.01+" ";l+="0 "+10*f+" 0 0"}else l="1 "+2*this.filterManager.effectElements[4].p.v*this.filterManager.effectElements[9].p.v*.01;i.setAttribute("stroke-dasharray",l)}if((e||this.filterManager.effectElements[4].p._mdf)&&this.pathMasker.setAttribute("stroke-width",2*this.filterManager.effectElements[4].p.v),(e||this.filterManager.effectElements[6].p._mdf)&&this.pathMasker.setAttribute("opacity",this.filterManager.effectElements[6].p.v),(this.filterManager.effectElements[10].p.v===1||this.filterManager.effectElements[10].p.v===2)&&(e||this.filterManager.effectElements[3].p._mdf)){var _=this.filterManager.effectElements[3].p.v;this.pathMasker.setAttribute("stroke","rgb("+bmFloor(255*_[0])+","+bmFloor(255*_[1])+","+bmFloor(255*_[2])+")")}},SVGTritoneFilter.prototype.renderFrame=function(e){if(e||this.filterManager._mdf){var t=this.filterManager.effectElements[0].p.v,n=this.filterManager.effectElements[1].p.v,i=this.filterManager.effectElements[2].p.v,o=i[0]+" "+n[0]+" "+t[0],l=i[1]+" "+n[1]+" "+t[1],u=i[2]+" "+n[2]+" "+t[2];this.feFuncR.setAttribute("tableValues",o),this.feFuncG.setAttribute("tableValues",l),this.feFuncB.setAttribute("tableValues",u)}},SVGProLevelsFilter.prototype.createFeFunc=function(e,t){var n=createNS(e);return n.setAttribute("type","table"),t.appendChild(n),n},SVGProLevelsFilter.prototype.getTableValue=function(e,t,n,i,o){for(var l,u,d=0,f=Math.min(e,t),p=Math.max(e,t),m=Array.call(null,{length:256}),g=0,b=o-i,_=t-e;d<=256;)u=(l=d/256)<=f?_<0?o:i:l>=p?_<0?i:o:i+b*Math.pow((l-e)/_,1/n),m[g]=u,g+=1,d+=256/255;return m.join(" ")},SVGProLevelsFilter.prototype.renderFrame=function(e){if(e||this.filterManager._mdf){var t,n=this.filterManager.effectElements;this.feFuncRComposed&&(e||n[3].p._mdf||n[4].p._mdf||n[5].p._mdf||n[6].p._mdf||n[7].p._mdf)&&(t=this.getTableValue(n[3].p.v,n[4].p.v,n[5].p.v,n[6].p.v,n[7].p.v),this.feFuncRComposed.setAttribute("tableValues",t),this.feFuncGComposed.setAttribute("tableValues",t),this.feFuncBComposed.setAttribute("tableValues",t)),this.feFuncR&&(e||n[10].p._mdf||n[11].p._mdf||n[12].p._mdf||n[13].p._mdf||n[14].p._mdf)&&(t=this.getTableValue(n[10].p.v,n[11].p.v,n[12].p.v,n[13].p.v,n[14].p.v),this.feFuncR.setAttribute("tableValues",t)),this.feFuncG&&(e||n[17].p._mdf||n[18].p._mdf||n[19].p._mdf||n[20].p._mdf||n[21].p._mdf)&&(t=this.getTableValue(n[17].p.v,n[18].p.v,n[19].p.v,n[20].p.v,n[21].p.v),this.feFuncG.setAttribute("tableValues",t)),this.feFuncB&&(e||n[24].p._mdf||n[25].p._mdf||n[26].p._mdf||n[27].p._mdf||n[28].p._mdf)&&(t=this.getTableValue(n[24].p.v,n[25].p.v,n[26].p.v,n[27].p.v,n[28].p.v),this.feFuncB.setAttribute("tableValues",t)),this.feFuncA&&(e||n[31].p._mdf||n[32].p._mdf||n[33].p._mdf||n[34].p._mdf||n[35].p._mdf)&&(t=this.getTableValue(n[31].p.v,n[32].p.v,n[33].p.v,n[34].p.v,n[35].p.v),this.feFuncA.setAttribute("tableValues",t))}},extendPrototype([SVGComposableEffect],SVGDropShadowEffect),SVGDropShadowEffect.prototype.renderFrame=function(e){if(e||this.filterManager._mdf){if((e||this.filterManager.effectElements[4].p._mdf)&&this.feGaussianBlur.setAttribute("stdDeviation",this.filterManager.effectElements[4].p.v/4),e||this.filterManager.effectElements[0].p._mdf){var t=this.filterManager.effectElements[0].p.v;this.feFlood.setAttribute("flood-color",rgbToHex(Math.round(255*t[0]),Math.round(255*t[1]),Math.round(255*t[2])))}if((e||this.filterManager.effectElements[1].p._mdf)&&this.feFlood.setAttribute("flood-opacity",this.filterManager.effectElements[1].p.v/255),e||this.filterManager.effectElements[2].p._mdf||this.filterManager.effectElements[3].p._mdf){var n=this.filterManager.effectElements[3].p.v,i=(this.filterManager.effectElements[2].p.v-90)*degToRads,o=n*Math.cos(i),l=n*Math.sin(i);this.feOffset.setAttribute("dx",o),this.feOffset.setAttribute("dy",l)}}};var _svgMatteSymbols=[];function SVGMatte3Effect(e,t,n){this.initialized=!1,this.filterManager=t,this.filterElem=e,this.elem=n,n.matteElement=createNS("g"),n.matteElement.appendChild(n.layerElement),n.matteElement.appendChild(n.transformedElement),n.baseElement=n.matteElement}function SVGGaussianBlurEffect(e,t,n,i){e.setAttribute("x","-100%"),e.setAttribute("y","-100%"),e.setAttribute("width","300%"),e.setAttribute("height","300%"),this.filterManager=t;var o=createNS("feGaussianBlur");o.setAttribute("result",i),e.appendChild(o),this.feGaussianBlur=o}function TransformEffect(){}function SVGTransformEffect(e,t){this.init(t)}function CVTransformEffect(e){this.init(e)}return SVGMatte3Effect.prototype.findSymbol=function(e){for(var t=0,n=_svgMatteSymbols.length;t<n;){if(_svgMatteSymbols[t]===e)return _svgMatteSymbols[t];t+=1}return null},SVGMatte3Effect.prototype.replaceInParent=function(e,t){var n=e.layerElement.parentNode;if(n){for(var i,o=n.children,l=0,u=o.length;l<u&&o[l]!==e.layerElement;)l+=1;l<=u-2&&(i=o[l+1]);var d=createNS("use");d.setAttribute("href","#"+t),i?n.insertBefore(d,i):n.appendChild(d)}},SVGMatte3Effect.prototype.setElementAsMask=function(e,t){if(!this.findSymbol(t)){var n=createElementID(),i=createNS("mask");i.setAttribute("id",t.layerId),i.setAttribute("mask-type","alpha"),_svgMatteSymbols.push(t);var o=e.globalData.defs;o.appendChild(i);var l=createNS("symbol");l.setAttribute("id",n),this.replaceInParent(t,n),l.appendChild(t.layerElement),o.appendChild(l);var u=createNS("use");u.setAttribute("href","#"+n),i.appendChild(u),t.data.hd=!1,t.show()}e.setMatte(t.layerId)},SVGMatte3Effect.prototype.initialize=function(){for(var e=this.filterManager.effectElements[0].p.v,t=this.elem.comp.elements,n=0,i=t.length;n<i;)t[n]&&t[n].data.ind===e&&this.setElementAsMask(this.elem,t[n]),n+=1;this.initialized=!0},SVGMatte3Effect.prototype.renderFrame=function(){this.initialized||this.initialize()},SVGGaussianBlurEffect.prototype.renderFrame=function(e){if(e||this.filterManager._mdf){var t=.3*this.filterManager.effectElements[0].p.v,n=this.filterManager.effectElements[1].p.v,i=n==3?0:t,o=n==2?0:t;this.feGaussianBlur.setAttribute("stdDeviation",i+" "+o);var l=this.filterManager.effectElements[2].p.v==1?"wrap":"duplicate";this.feGaussianBlur.setAttribute("edgeMode",l)}},TransformEffect.prototype.init=function(e){this.effectsManager=e,this.type=effectTypes.TRANSFORM_EFFECT,this.matrix=new Matrix,this.opacity=-1,this._mdf=!1,this._opMdf=!1},TransformEffect.prototype.renderFrame=function(e){if(this._opMdf=!1,this._mdf=!1,e||this.effectsManager._mdf){var t=this.effectsManager.effectElements,n=t[0].p.v,i=t[1].p.v,o=t[2].p.v===1,l=t[3].p.v,u=o?l:t[4].p.v,d=t[5].p.v,f=t[6].p.v,p=t[7].p.v;this.matrix.reset(),this.matrix.translate(-n[0],-n[1],n[2]),this.matrix.scale(.01*u,.01*l,1),this.matrix.rotate(-p*degToRads),this.matrix.skewFromAxis(-d*degToRads,(f+90)*degToRads),this.matrix.translate(i[0],i[1],0),this._mdf=!0,this.opacity!==t[8].p.v&&(this.opacity=t[8].p.v,this._opMdf=!0)}},extendPrototype([TransformEffect],SVGTransformEffect),extendPrototype([TransformEffect],CVTransformEffect),registerRenderer("canvas",CanvasRenderer),registerRenderer("html",HybridRenderer),registerRenderer("svg",SVGRenderer),ShapeModifiers.registerModifier("tm",TrimModifier),ShapeModifiers.registerModifier("pb",PuckerAndBloatModifier),ShapeModifiers.registerModifier("rp",RepeaterModifier),ShapeModifiers.registerModifier("rd",RoundCornersModifier),ShapeModifiers.registerModifier("zz",ZigZagModifier),ShapeModifiers.registerModifier("op",OffsetPathModifier),setExpressionsPlugin(Expressions),setExpressionInterfaces(getInterface),initialize$1(),initialize(),registerEffect$1(20,SVGTintFilter,!0),registerEffect$1(21,SVGFillFilter,!0),registerEffect$1(22,SVGStrokeEffect,!1),registerEffect$1(23,SVGTritoneFilter,!0),registerEffect$1(24,SVGProLevelsFilter,!0),registerEffect$1(25,SVGDropShadowEffect,!0),registerEffect$1(28,SVGMatte3Effect,!1),registerEffect$1(29,SVGGaussianBlurEffect,!0),registerEffect$1(35,SVGTransformEffect,!1),registerEffect(35,CVTransformEffect),lottie})}),REACT_LOTTIE_PLAYER_VERSION="3.6.0",LOTTIE_WEB_VERSION="^5.12.2",PlayerState,PlayerEvent;function parseSrc(e){if(typeof e=="object")return e;try{return JSON.parse(e)}catch{}try{return new URL(e).toString()}catch{}return e}(function(e){e.Loading="loading",e.Playing="playing",e.Paused="paused",e.Stopped="stopped",e.Frozen="frozen",e.Error="error"})(PlayerState||(PlayerState={})),function(e){e.Load="load",e.InstanceSaved="instanceSaved",e.Error="error",e.Ready="ready",e.Play="play",e.Pause="pause",e.Stop="stop",e.Freeze="freeze",e.Loop="loop",e.Complete="complete",e.Frame="frame"}(PlayerEvent||(PlayerEvent={}));var defaultOptions={clearCanvas:!1,hideOnTransparent:!0,progressiveLoad:!0},Player=function(e){function t(n){var i=e.call(this,n)||this;return i.container=null,i.unmounted=!1,i.handleBgChange=function(o){i.setState({background:o})},i.triggerDownload=function(o,l){var u=document.createElement("a");u.href=o,u.download=l,document.body.appendChild(u),u.click(),document.body.removeChild(u)},i.snapshot=function(o){var l;o===void 0&&(o=!0);var u=i.props.id?i.props.id:"lottie",d=document.getElementById(u);if(i.props.renderer==="svg"){if(d){var f=d.querySelector("svg");if(f){var p=new XMLSerializer().serializeToString(f);l="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(p)}}o&&i.triggerDownload(l,"snapshot.svg")}else if(i.props.renderer==="canvas"){if(d){var m=d.querySelector("canvas");m&&(l=m.toDataURL("image/png"))}o&&i.triggerDownload(l,"snapshot.png")}return l},typeof window<"u"&&(window.lottie=lottie),i.state={animationData:null,background:"transparent",containerRef:React__namespace.createRef(),debug:!0,instance:null,playerState:PlayerState.Loading,seeker:0},i}return __extends(t,e),t.getDerivedStateFromProps=function(n,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return n.background!==i.background?[2,{background:n.background}]:[2,null]})})},t.prototype.getVersions=function(){return{lottieWebVersion:LOTTIE_WEB_VERSION,lottiePlayerVersion:REACT_LOTTIE_PLAYER_VERSION}},t.prototype.componentDidMount=function(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(n){switch(n.label){case 0:return this.unmounted?[3,2]:[4,this.createLottie()];case 1:n.sent(),n.label=2;case 2:return[2]}})})},t.prototype.componentWillUnmount=function(){this.unmounted=!0,this.state.instance&&this.state.instance.destroy()},t.prototype.componentDidUpdate=function(n){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){switch(i.label){case 0:return this.props.src===n.src?[3,2]:(this.state.instance&&this.state.instance.destroy(),[4,this.createLottie()]);case 1:i.sent(),i.label=2;case 2:return[2]}})})},t.prototype.render=function(){var n=this,i=this.props,o=i.children,l=i.loop,u=i.style,d=i.onBackgroundChange,f=i.className,p=this.state,m=p.animationData,g=p.instance,b=p.playerState,_=p.seeker,R=p.debug,E=p.background;return React__namespace.createElement("div",{className:"lf-player-container"},this.state.playerState===PlayerState.Error?React__namespace.createElement("div",{className:"lf-error"},React__namespace.createElement("span",{"aria-label":"error-symbol",role:"img"},"⚠️")):React__namespace.createElement("div",{id:this.props.id?this.props.id:"lottie",ref:function(S){return n.container=S},style:__assign({background:E,margin:"0 auto",outline:"none",overflow:"hidden"},u),className:f}),React__namespace.Children.map(o,function(S){return React__namespace.isValidElement(S)?React__namespace.cloneElement(S,{animationData:m,background:E,debug:R,instance:g,loop:l,pause:function(){return n.pause()},play:function(){return n.play()},playerState:b,seeker:_,setBackground:function(C){n.setState({background:C}),typeof d=="function"&&d(C)},setSeeker:function(C,T){return n.setSeeker(C,T)},stop:function(){return n.stop()},toggleDebug:function(){return n.toggleDebug()},setLoop:function(C){return n.setLoop(C)},colorChangedEvent:function(C){n.handleBgChange(C)},snapshot:function(){n.snapshot()}}):null}))},t.prototype.toggleDebug=function(){this.setState({debug:!this.state.debug})},t.prototype.createLottie=function(){return __awaiter(this,void 0,void 0,function(){var n,i,o,l,u,d,f,p,m,g,b,_,R,E,S=this;return __generator(this,function(C){switch(C.label){case 0:if(n=this.props,i=n.autoplay,o=n.direction,l=n.loop,u=n.lottieRef,d=n.renderer,f=n.speed,p=n.src,m=n.background,g=n.rendererSettings,b=n.hover,_=this.state.instance,!p||!this.container)return[2];C.label=1;case 1:return C.trys.push([1,5,,6]),typeof(R=parseSrc(p))!="string"?[3,4]:[4,fetch(R).catch(function(){throw S.setState({playerState:PlayerState.Error}),S.triggerEvent(PlayerEvent.Error),new Error("@LottieFiles/lottie-react: Animation data could not be fetched.")})];case 2:return[4,C.sent().json().catch(function(){throw S.setState({playerState:PlayerState.Error}),S.triggerEvent(PlayerEvent.Error),new Error("@LottieFiles/lottie-react: Animation data could not be fetched.")})];case 3:R=C.sent(),C.label=4;case 4:return _&&_.destroy(),E=lottie.loadAnimation({rendererSettings:g||defaultOptions,animationData:R,autoplay:i||!1,container:this.container,loop:l||!1,renderer:d}),f&&E.setSpeed(f),this.setState({animationData:R}),this.setState({instance:E},function(){S.triggerEvent(PlayerEvent.InstanceSaved),typeof u=="function"&&u(E),i&&S.play()}),E.addEventListener("enterFrame",function(){S.triggerEvent(PlayerEvent.Frame),S.setState({seeker:Math.floor(E.currentFrame)})}),E.addEventListener("DOMLoaded",function(){S.triggerEvent(PlayerEvent.Load)}),E.addEventListener("data_ready",function(){S.triggerEvent(PlayerEvent.Ready)}),E.addEventListener("data_failed",function(){S.setState({playerState:PlayerState.Error}),S.triggerEvent(PlayerEvent.Error)}),E.addEventListener("loopComplete",function(){S.triggerEvent(PlayerEvent.Loop)}),E.addEventListener("complete",function(){S.triggerEvent(PlayerEvent.Complete),S.setState({playerState:PlayerState.Paused}),S.props.keepLastFrame&&!S.props.loop||S.setSeeker(0)}),this.container&&(this.container.addEventListener("mouseenter",function(){b&&S.state.playerState!==PlayerState.Playing&&(S.props.keepLastFrame&&S.stop(),S.play())}),this.container.addEventListener("mouseleave",function(){b&&S.state.playerState===PlayerState.Playing&&S.stop()})),f&&this.setPlayerSpeed(f),o&&this.setPlayerDirection(o),m&&this.setState({background:m}),[3,6];case 5:return C.sent(),this.setState({playerState:PlayerState.Error}),this.triggerEvent(PlayerEvent.Error),[3,6];case 6:return[2]}})})},t.prototype.play=function(){var n=this.state.instance;n&&(this.triggerEvent(PlayerEvent.Play),n.play(),this.setState({playerState:PlayerState.Playing}))},t.prototype.pause=function(){var n=this.state.instance;n&&(this.triggerEvent(PlayerEvent.Pause),n.pause(),this.setState({playerState:PlayerState.Paused}))},t.prototype.stop=function(){var n=this.state.instance;n&&(this.triggerEvent(PlayerEvent.Stop),n.stop(),this.setState({playerState:PlayerState.Stopped}))},t.prototype.setPlayerSpeed=function(n){var i=this.state.instance;i&&i.setSpeed(n)},t.prototype.setPlayerDirection=function(n){var i=this.state.instance;i&&i.setDirection(n)},t.prototype.setSeeker=function(n,i){i===void 0&&(i=!1);var o=this.state,l=o.instance,u=o.playerState;l&&(i&&u===PlayerState.Playing?l.goToAndPlay(n,!0):(l.goToAndStop(n,!0),this.triggerEvent(PlayerEvent.Pause),this.setState({playerState:PlayerState.Paused})))},t.prototype.setLoop=function(n){var i=this.state.instance;i&&(i.loop=n,this.setState({instance:i}))},t.prototype.triggerEvent=function(n){var i=this.props.onEvent;i&&i(n)},t.defaultProps={loop:!1},t}(React__namespace.Component);function styleInject(e,t){t===void 0&&(t={});var n=t.insertAt;if(typeof document<"u"){var i=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css",n==="top"&&i.firstChild?i.insertBefore(o,i.firstChild):i.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}var css_248z=`.lf-progress {
|
|
347
|
+
`),o={},l=0,u=0;u<i.length;u+=1)(n=i[u].split(":")).length===2&&(o[n[0]]=n[1].trim(),l+=1);if(l===0)throw new Error;return o}return function(t){for(var n=[],i=0;i<t.length;i+=1){var o=t[i],l={time:o.tm,duration:o.dr};try{l.payload=JSON.parse(t[i].cm)}catch{try{l.payload=e(t[i].cm)}catch{l.payload={name:t[i].cm}}}n.push(l)}return n}}(),ProjectInterface=function(){function e(t){this.compositions.push(t)}return function(){function t(n){for(var i=0,o=this.compositions.length;i<o;){if(this.compositions[i].data&&this.compositions[i].data.nm===n)return this.compositions[i].prepareFrame&&this.compositions[i].data.xt&&this.compositions[i].prepareFrame(this.currentFrame),this.compositions[i].compInterface;i+=1}return null}return t.compositions=[],t.currentFrame=0,t.registerComposition=e,t}}(),renderers={},registerRenderer=function(e,t){renderers[e]=t};function getRenderer(e){return renderers[e]}function getRegisteredRenderer(){if(renderers.canvas)return"canvas";for(var e in renderers)if(renderers[e])return e;return""}function _typeof$4(e){return(_typeof$4=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}var AnimationItem=function(){this._cbs=[],this.name="",this.path="",this.isLoaded=!1,this.currentFrame=0,this.currentRawFrame=0,this.firstFrame=0,this.totalFrames=0,this.frameRate=0,this.frameMult=0,this.playSpeed=1,this.playDirection=1,this.playCount=0,this.animationData={},this.assets=[],this.isPaused=!0,this.autoplay=!1,this.loop=!0,this.renderer=null,this.animationID=createElementID(),this.assetsPath="",this.timeCompleted=0,this.segmentPos=0,this.isSubframeEnabled=getSubframeEnabled(),this.segments=[],this._idle=!0,this._completedLoop=!1,this.projectInterface=ProjectInterface(),this.imagePreloader=new ImagePreloader,this.audioController=audioControllerFactory(),this.markers=[],this.configAnimation=this.configAnimation.bind(this),this.onSetupError=this.onSetupError.bind(this),this.onSegmentComplete=this.onSegmentComplete.bind(this),this.drawnFrameEvent=new BMEnterFrameEvent("drawnFrame",0,0,0),this.expressionsPlugin=getExpressionsPlugin()};extendPrototype([BaseEvent],AnimationItem),AnimationItem.prototype.setParams=function(e){(e.wrapper||e.container)&&(this.wrapper=e.wrapper||e.container);var t="svg";e.animType?t=e.animType:e.renderer&&(t=e.renderer);var n=getRenderer(t);this.renderer=new n(this,e.rendererSettings),this.imagePreloader.setCacheType(t,this.renderer.globalData.defs),this.renderer.setProjectInterface(this.projectInterface),this.animType=t,e.loop===""||e.loop===null||e.loop===void 0||e.loop===!0?this.loop=!0:e.loop===!1?this.loop=!1:this.loop=parseInt(e.loop,10),this.autoplay=!("autoplay"in e)||e.autoplay,this.name=e.name?e.name:"",this.autoloadSegments=!Object.prototype.hasOwnProperty.call(e,"autoloadSegments")||e.autoloadSegments,this.assetsPath=e.assetsPath,this.initialSegment=e.initialSegment,e.audioFactory&&this.audioController.setAudioFactory(e.audioFactory),e.animationData?this.setupAnimation(e.animationData):e.path&&(e.path.lastIndexOf("\\")!==-1?this.path=e.path.substr(0,e.path.lastIndexOf("\\")+1):this.path=e.path.substr(0,e.path.lastIndexOf("/")+1),this.fileName=e.path.substr(e.path.lastIndexOf("/")+1),this.fileName=this.fileName.substr(0,this.fileName.lastIndexOf(".json")),dataManager.loadAnimation(e.path,this.configAnimation,this.onSetupError))},AnimationItem.prototype.onSetupError=function(){this.trigger("data_failed")},AnimationItem.prototype.setupAnimation=function(e){dataManager.completeAnimation(e,this.configAnimation)},AnimationItem.prototype.setData=function(e,t){t&&_typeof$4(t)!=="object"&&(t=JSON.parse(t));var n={wrapper:e,animationData:t},i=e.attributes;n.path=i.getNamedItem("data-animation-path")?i.getNamedItem("data-animation-path").value:i.getNamedItem("data-bm-path")?i.getNamedItem("data-bm-path").value:i.getNamedItem("bm-path")?i.getNamedItem("bm-path").value:"",n.animType=i.getNamedItem("data-anim-type")?i.getNamedItem("data-anim-type").value:i.getNamedItem("data-bm-type")?i.getNamedItem("data-bm-type").value:i.getNamedItem("bm-type")?i.getNamedItem("bm-type").value:i.getNamedItem("data-bm-renderer")?i.getNamedItem("data-bm-renderer").value:i.getNamedItem("bm-renderer")?i.getNamedItem("bm-renderer").value:getRegisteredRenderer()||"canvas";var o=i.getNamedItem("data-anim-loop")?i.getNamedItem("data-anim-loop").value:i.getNamedItem("data-bm-loop")?i.getNamedItem("data-bm-loop").value:i.getNamedItem("bm-loop")?i.getNamedItem("bm-loop").value:"";o==="false"?n.loop=!1:o==="true"?n.loop=!0:o!==""&&(n.loop=parseInt(o,10));var l=i.getNamedItem("data-anim-autoplay")?i.getNamedItem("data-anim-autoplay").value:i.getNamedItem("data-bm-autoplay")?i.getNamedItem("data-bm-autoplay").value:!i.getNamedItem("bm-autoplay")||i.getNamedItem("bm-autoplay").value;n.autoplay=l!=="false",n.name=i.getNamedItem("data-name")?i.getNamedItem("data-name").value:i.getNamedItem("data-bm-name")?i.getNamedItem("data-bm-name").value:i.getNamedItem("bm-name")?i.getNamedItem("bm-name").value:"",(i.getNamedItem("data-anim-prerender")?i.getNamedItem("data-anim-prerender").value:i.getNamedItem("data-bm-prerender")?i.getNamedItem("data-bm-prerender").value:i.getNamedItem("bm-prerender")?i.getNamedItem("bm-prerender").value:"")==="false"&&(n.prerender=!1),n.path?this.setParams(n):this.trigger("destroy")},AnimationItem.prototype.includeLayers=function(e){e.op>this.animationData.op&&(this.animationData.op=e.op,this.totalFrames=Math.floor(e.op-this.animationData.ip));var t,n,i=this.animationData.layers,o=i.length,l=e.layers,u=l.length;for(n=0;n<u;n+=1)for(t=0;t<o;){if(i[t].id===l[n].id){i[t]=l[n];break}t+=1}if((e.chars||e.fonts)&&(this.renderer.globalData.fontManager.addChars(e.chars),this.renderer.globalData.fontManager.addFonts(e.fonts,this.renderer.globalData.defs)),e.assets)for(o=e.assets.length,t=0;t<o;t+=1)this.animationData.assets.push(e.assets[t]);this.animationData.__complete=!1,dataManager.completeAnimation(this.animationData,this.onSegmentComplete)},AnimationItem.prototype.onSegmentComplete=function(e){this.animationData=e;var t=getExpressionsPlugin();t&&t.initExpressions(this),this.loadNextSegment()},AnimationItem.prototype.loadNextSegment=function(){var e=this.animationData.segments;if(!e||e.length===0||!this.autoloadSegments)return this.trigger("data_ready"),void(this.timeCompleted=this.totalFrames);var t=e.shift();this.timeCompleted=t.time*this.frameRate;var n=this.path+this.fileName+"_"+this.segmentPos+".json";this.segmentPos+=1,dataManager.loadData(n,this.includeLayers.bind(this),(function(){this.trigger("data_failed")}).bind(this))},AnimationItem.prototype.loadSegments=function(){this.animationData.segments||(this.timeCompleted=this.totalFrames),this.loadNextSegment()},AnimationItem.prototype.imagesLoaded=function(){this.trigger("loaded_images"),this.checkLoaded()},AnimationItem.prototype.preloadImages=function(){this.imagePreloader.setAssetsPath(this.assetsPath),this.imagePreloader.setPath(this.path),this.imagePreloader.loadAssets(this.animationData.assets,this.imagesLoaded.bind(this))},AnimationItem.prototype.configAnimation=function(e){if(this.renderer)try{this.animationData=e,this.initialSegment?(this.totalFrames=Math.floor(this.initialSegment[1]-this.initialSegment[0]),this.firstFrame=Math.round(this.initialSegment[0])):(this.totalFrames=Math.floor(this.animationData.op-this.animationData.ip),this.firstFrame=Math.round(this.animationData.ip)),this.renderer.configAnimation(e),e.assets||(e.assets=[]),this.assets=this.animationData.assets,this.frameRate=this.animationData.fr,this.frameMult=this.animationData.fr/1e3,this.renderer.searchExtraCompositions(e.assets),this.markers=markerParser(e.markers||[]),this.trigger("config_ready"),this.preloadImages(),this.loadSegments(),this.updaFrameModifier(),this.waitForFontsLoaded(),this.isPaused&&this.audioController.pause()}catch(t){this.triggerConfigError(t)}},AnimationItem.prototype.waitForFontsLoaded=function(){this.renderer&&(this.renderer.globalData.fontManager.isLoaded?this.checkLoaded():setTimeout(this.waitForFontsLoaded.bind(this),20))},AnimationItem.prototype.checkLoaded=function(){if(!this.isLoaded&&this.renderer.globalData.fontManager.isLoaded&&(this.imagePreloader.loadedImages()||this.renderer.rendererType!=="canvas")&&this.imagePreloader.loadedFootages()){this.isLoaded=!0;var e=getExpressionsPlugin();e&&e.initExpressions(this),this.renderer.initItems(),setTimeout((function(){this.trigger("DOMLoaded")}).bind(this),0),this.gotoFrame(),this.autoplay&&this.play()}},AnimationItem.prototype.resize=function(e,t){var n=typeof e=="number"?e:void 0,i=typeof t=="number"?t:void 0;this.renderer.updateContainerSize(n,i)},AnimationItem.prototype.setSubframe=function(e){this.isSubframeEnabled=!!e},AnimationItem.prototype.gotoFrame=function(){this.currentFrame=this.isSubframeEnabled?this.currentRawFrame:~~this.currentRawFrame,this.timeCompleted!==this.totalFrames&&this.currentFrame>this.timeCompleted&&(this.currentFrame=this.timeCompleted),this.trigger("enterFrame"),this.renderFrame(),this.trigger("drawnFrame")},AnimationItem.prototype.renderFrame=function(){if(this.isLoaded!==!1&&this.renderer)try{this.expressionsPlugin&&this.expressionsPlugin.resetFrame(),this.renderer.renderFrame(this.currentFrame+this.firstFrame)}catch(e){this.triggerRenderFrameError(e)}},AnimationItem.prototype.play=function(e){e&&this.name!==e||this.isPaused===!0&&(this.isPaused=!1,this.trigger("_play"),this.audioController.resume(),this._idle&&(this._idle=!1,this.trigger("_active")))},AnimationItem.prototype.pause=function(e){e&&this.name!==e||this.isPaused===!1&&(this.isPaused=!0,this.trigger("_pause"),this._idle=!0,this.trigger("_idle"),this.audioController.pause())},AnimationItem.prototype.togglePause=function(e){e&&this.name!==e||(this.isPaused===!0?this.play():this.pause())},AnimationItem.prototype.stop=function(e){e&&this.name!==e||(this.pause(),this.playCount=0,this._completedLoop=!1,this.setCurrentRawFrameValue(0))},AnimationItem.prototype.getMarkerData=function(e){for(var t,n=0;n<this.markers.length;n+=1)if((t=this.markers[n]).payload&&t.payload.name===e)return t;return null},AnimationItem.prototype.goToAndStop=function(e,t,n){if(!n||this.name===n){var i=Number(e);if(isNaN(i)){var o=this.getMarkerData(e);o&&this.goToAndStop(o.time,!0)}else t?this.setCurrentRawFrameValue(e):this.setCurrentRawFrameValue(e*this.frameModifier);this.pause()}},AnimationItem.prototype.goToAndPlay=function(e,t,n){if(!n||this.name===n){var i=Number(e);if(isNaN(i)){var o=this.getMarkerData(e);o&&(o.duration?this.playSegments([o.time,o.time+o.duration],!0):this.goToAndStop(o.time,!0))}else this.goToAndStop(i,t,n);this.play()}},AnimationItem.prototype.advanceTime=function(e){if(this.isPaused!==!0&&this.isLoaded!==!1){var t=this.currentRawFrame+e*this.frameModifier,n=!1;t>=this.totalFrames-1&&this.frameModifier>0?this.loop&&this.playCount!==this.loop?t>=this.totalFrames?(this.playCount+=1,this.checkSegments(t%this.totalFrames)||(this.setCurrentRawFrameValue(t%this.totalFrames),this._completedLoop=!0,this.trigger("loopComplete"))):this.setCurrentRawFrameValue(t):this.checkSegments(t>this.totalFrames?t%this.totalFrames:0)||(n=!0,t=this.totalFrames-1):t<0?this.checkSegments(t%this.totalFrames)||(!this.loop||this.playCount--<=0&&this.loop!==!0?(n=!0,t=0):(this.setCurrentRawFrameValue(this.totalFrames+t%this.totalFrames),this._completedLoop?this.trigger("loopComplete"):this._completedLoop=!0)):this.setCurrentRawFrameValue(t),n&&(this.setCurrentRawFrameValue(t),this.pause(),this.trigger("complete"))}},AnimationItem.prototype.adjustSegment=function(e,t){this.playCount=0,e[1]<e[0]?(this.frameModifier>0&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(-1)),this.totalFrames=e[0]-e[1],this.timeCompleted=this.totalFrames,this.firstFrame=e[1],this.setCurrentRawFrameValue(this.totalFrames-.001-t)):e[1]>e[0]&&(this.frameModifier<0&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(1)),this.totalFrames=e[1]-e[0],this.timeCompleted=this.totalFrames,this.firstFrame=e[0],this.setCurrentRawFrameValue(.001+t)),this.trigger("segmentStart")},AnimationItem.prototype.setSegment=function(e,t){var n=-1;this.isPaused&&(this.currentRawFrame+this.firstFrame<e?n=e:this.currentRawFrame+this.firstFrame>t&&(n=t-e)),this.firstFrame=e,this.totalFrames=t-e,this.timeCompleted=this.totalFrames,n!==-1&&this.goToAndStop(n,!0)},AnimationItem.prototype.playSegments=function(e,t){if(t&&(this.segments.length=0),_typeof$4(e[0])==="object"){var n,i=e.length;for(n=0;n<i;n+=1)this.segments.push(e[n])}else this.segments.push(e);this.segments.length&&t&&this.adjustSegment(this.segments.shift(),0),this.isPaused&&this.play()},AnimationItem.prototype.resetSegments=function(e){this.segments.length=0,this.segments.push([this.animationData.ip,this.animationData.op]),e&&this.checkSegments(0)},AnimationItem.prototype.checkSegments=function(e){return!!this.segments.length&&(this.adjustSegment(this.segments.shift(),e),!0)},AnimationItem.prototype.destroy=function(e){e&&this.name!==e||!this.renderer||(this.renderer.destroy(),this.imagePreloader.destroy(),this.trigger("destroy"),this._cbs=null,this.onEnterFrame=null,this.onLoopComplete=null,this.onComplete=null,this.onSegmentStart=null,this.onDestroy=null,this.renderer=null,this.expressionsPlugin=null,this.imagePreloader=null,this.projectInterface=null)},AnimationItem.prototype.setCurrentRawFrameValue=function(e){this.currentRawFrame=e,this.gotoFrame()},AnimationItem.prototype.setSpeed=function(e){this.playSpeed=e,this.updaFrameModifier()},AnimationItem.prototype.setDirection=function(e){this.playDirection=e<0?-1:1,this.updaFrameModifier()},AnimationItem.prototype.setLoop=function(e){this.loop=e},AnimationItem.prototype.setVolume=function(e,t){t&&this.name!==t||this.audioController.setVolume(e)},AnimationItem.prototype.getVolume=function(){return this.audioController.getVolume()},AnimationItem.prototype.mute=function(e){e&&this.name!==e||this.audioController.mute()},AnimationItem.prototype.unmute=function(e){e&&this.name!==e||this.audioController.unmute()},AnimationItem.prototype.updaFrameModifier=function(){this.frameModifier=this.frameMult*this.playSpeed*this.playDirection,this.audioController.setRate(this.playSpeed*this.playDirection)},AnimationItem.prototype.getPath=function(){return this.path},AnimationItem.prototype.getAssetsPath=function(e){var t="";if(e.e)t=e.p;else if(this.assetsPath){var n=e.p;n.indexOf("images/")!==-1&&(n=n.split("/")[1]),t=this.assetsPath+n}else t=this.path,t+=e.u?e.u:"",t+=e.p;return t},AnimationItem.prototype.getAssetData=function(e){for(var t=0,n=this.assets.length;t<n;){if(e===this.assets[t].id)return this.assets[t];t+=1}return null},AnimationItem.prototype.hide=function(){this.renderer.hide()},AnimationItem.prototype.show=function(){this.renderer.show()},AnimationItem.prototype.getDuration=function(e){return e?this.totalFrames:this.totalFrames/this.frameRate},AnimationItem.prototype.updateDocumentData=function(e,t,n){try{this.renderer.getElementByPath(e).updateDocumentData(t,n)}catch{}},AnimationItem.prototype.trigger=function(e){if(this._cbs&&this._cbs[e])switch(e){case"enterFrame":this.triggerEvent(e,new BMEnterFrameEvent(e,this.currentFrame,this.totalFrames,this.frameModifier));break;case"drawnFrame":this.drawnFrameEvent.currentTime=this.currentFrame,this.drawnFrameEvent.totalTime=this.totalFrames,this.drawnFrameEvent.direction=this.frameModifier,this.triggerEvent(e,this.drawnFrameEvent);break;case"loopComplete":this.triggerEvent(e,new BMCompleteLoopEvent(e,this.loop,this.playCount,this.frameMult));break;case"complete":this.triggerEvent(e,new BMCompleteEvent(e,this.frameMult));break;case"segmentStart":this.triggerEvent(e,new BMSegmentStartEvent(e,this.firstFrame,this.totalFrames));break;case"destroy":this.triggerEvent(e,new BMDestroyEvent(e,this));break;default:this.triggerEvent(e)}e==="enterFrame"&&this.onEnterFrame&&this.onEnterFrame.call(this,new BMEnterFrameEvent(e,this.currentFrame,this.totalFrames,this.frameMult)),e==="loopComplete"&&this.onLoopComplete&&this.onLoopComplete.call(this,new BMCompleteLoopEvent(e,this.loop,this.playCount,this.frameMult)),e==="complete"&&this.onComplete&&this.onComplete.call(this,new BMCompleteEvent(e,this.frameMult)),e==="segmentStart"&&this.onSegmentStart&&this.onSegmentStart.call(this,new BMSegmentStartEvent(e,this.firstFrame,this.totalFrames)),e==="destroy"&&this.onDestroy&&this.onDestroy.call(this,new BMDestroyEvent(e,this))},AnimationItem.prototype.triggerRenderFrameError=function(e){var t=new BMRenderFrameErrorEvent(e,this.currentFrame);this.triggerEvent("error",t),this.onError&&this.onError.call(this,t)},AnimationItem.prototype.triggerConfigError=function(e){var t=new BMConfigErrorEvent(e,this.currentFrame);this.triggerEvent("error",t),this.onError&&this.onError.call(this,t)};var animationManager=function(){var e={},t=[],n=0,i=0,o=0,l=!0,u=!1;function d(E){for(var S=0,C=E.target;S<i;)t[S].animation===C&&(t.splice(S,1),S-=1,i-=1,C.isPaused||m()),S+=1}function f(E,S){if(!E)return null;for(var C=0;C<i;){if(t[C].elem===E&&t[C].elem!==null)return t[C].animation;C+=1}var T=new AnimationItem;return g(T,E),T.setData(E,S),T}function p(){o+=1,R()}function m(){o-=1}function g(E,S){E.addEventListener("destroy",d),E.addEventListener("_active",p),E.addEventListener("_idle",m),t.push({elem:S,animation:E}),i+=1}function b(E){var S,C=E-n;for(S=0;S<i;S+=1)t[S].animation.advanceTime(C);n=E,o&&!u?window.requestAnimationFrame(b):l=!0}function _(E){n=E,window.requestAnimationFrame(b)}function R(){!u&&o&&l&&(window.requestAnimationFrame(_),l=!1)}return e.registerAnimation=f,e.loadAnimation=function(E){var S=new AnimationItem;return g(S,null),S.setParams(E),S},e.setSpeed=function(E,S){var C;for(C=0;C<i;C+=1)t[C].animation.setSpeed(E,S)},e.setDirection=function(E,S){var C;for(C=0;C<i;C+=1)t[C].animation.setDirection(E,S)},e.play=function(E){var S;for(S=0;S<i;S+=1)t[S].animation.play(E)},e.pause=function(E){var S;for(S=0;S<i;S+=1)t[S].animation.pause(E)},e.stop=function(E){var S;for(S=0;S<i;S+=1)t[S].animation.stop(E)},e.togglePause=function(E){var S;for(S=0;S<i;S+=1)t[S].animation.togglePause(E)},e.searchAnimations=function(E,S,C){var T,A=[].concat([].slice.call(document.getElementsByClassName("lottie")),[].slice.call(document.getElementsByClassName("bodymovin"))),M=A.length;for(T=0;T<M;T+=1)C&&A[T].setAttribute("data-bm-type",C),f(A[T],E);if(S&&M===0){C||(C="svg");var I=document.getElementsByTagName("body")[0];I.innerText="";var O=createTag("div");O.style.width="100%",O.style.height="100%",O.setAttribute("data-bm-type",C),I.appendChild(O),f(O,E)}},e.resize=function(){var E;for(E=0;E<i;E+=1)t[E].animation.resize()},e.goToAndStop=function(E,S,C){var T;for(T=0;T<i;T+=1)t[T].animation.goToAndStop(E,S,C)},e.destroy=function(E){var S;for(S=i-1;S>=0;S-=1)t[S].animation.destroy(E)},e.freeze=function(){u=!0},e.unfreeze=function(){u=!1,R()},e.setVolume=function(E,S){var C;for(C=0;C<i;C+=1)t[C].animation.setVolume(E,S)},e.mute=function(E){var S;for(S=0;S<i;S+=1)t[S].animation.mute(E)},e.unmute=function(E){var S;for(S=0;S<i;S+=1)t[S].animation.unmute(E)},e.getRegisteredAnimations=function(){var E,S=t.length,C=[];for(E=0;E<S;E+=1)C.push(t[E].animation);return C},e}(),BezierFactory=function(){var e={getBezierEasing:function(p,m,g,b,_){var R=_||("bez_"+p+"_"+m+"_"+g+"_"+b).replace(/\./g,"p");if(t[R])return t[R];var E=new f([p,m,g,b]);return t[R]=E,E}},t={},n=typeof Float32Array=="function";function i(p,m){return 1-3*m+3*p}function o(p,m){return 3*m-6*p}function l(p){return 3*p}function u(p,m,g){return((i(m,g)*p+o(m,g))*p+l(m))*p}function d(p,m,g){return 3*i(m,g)*p*p+2*o(m,g)*p+l(m)}function f(p){this._p=p,this._mSampleValues=n?new Float32Array(11):new Array(11),this._precomputed=!1,this.get=this.get.bind(this)}return f.prototype={get:function(p){var m=this._p[0],g=this._p[1],b=this._p[2],_=this._p[3];return this._precomputed||this._precompute(),m===g&&b===_?p:p===0?0:p===1?1:u(this._getTForX(p),g,_)},_precompute:function(){var p=this._p[0],m=this._p[1],g=this._p[2],b=this._p[3];this._precomputed=!0,p===m&&g===b||this._calcSampleValues()},_calcSampleValues:function(){for(var p=this._p[0],m=this._p[2],g=0;g<11;++g)this._mSampleValues[g]=u(.1*g,p,m)},_getTForX:function(p){for(var m=this._p[0],g=this._p[2],b=this._mSampleValues,_=0,R=1;R!==10&&b[R]<=p;++R)_+=.1;var E=_+.1*((p-b[--R])/(b[R+1]-b[R])),S=d(E,m,g);return S>=.001?function(C,T,A,M){for(var I=0;I<4;++I){var O=d(T,A,M);if(O===0)return T;T-=(u(T,A,M)-C)/O}return T}(p,E,m,g):S===0?E:function(C,T,A,M,I){var O,N,j=0;do(O=u(N=T+(A-T)/2,M,I)-C)>0?A=N:T=N;while(Math.abs(O)>1e-7&&++j<10);return N}(p,_,_+.1,m,g)}},e}(),pooling={double:function(e){return e.concat(createSizedArray(e.length))}},poolFactory=function(e,t,n){var i=0,o=e,l=createSizedArray(o);return{newElement:function(){return i?l[i-=1]:t()},release:function(u){i===o&&(l=pooling.double(l),o*=2),n&&n(u),l[i]=u,i+=1}}},bezierLengthPool=poolFactory(8,function(){return{addedLength:0,percents:createTypedArray("float32",getDefaultCurveSegments()),lengths:createTypedArray("float32",getDefaultCurveSegments())}}),segmentsLengthPool=poolFactory(8,function(){return{lengths:[],totalLength:0}},function(e){var t,n=e.lengths.length;for(t=0;t<n;t+=1)bezierLengthPool.release(e.lengths[t]);e.lengths.length=0});function bezFunction(){var e=Math;function t(p,m,g,b,_,R){var E=p*b+m*_+g*R-_*b-R*p-g*m;return E>-.001&&E<.001}var n=function(p,m,g,b){var _,R,E,S,C,T,A=getDefaultCurveSegments(),M=0,I=[],O=[],N=bezierLengthPool.newElement();for(E=g.length,_=0;_<A;_+=1){for(C=_/(A-1),T=0,R=0;R<E;R+=1)S=bmPow(1-C,3)*p[R]+3*bmPow(1-C,2)*C*g[R]+3*(1-C)*bmPow(C,2)*b[R]+bmPow(C,3)*m[R],I[R]=S,O[R]!==null&&(T+=bmPow(I[R]-O[R],2)),O[R]=I[R];T&&(M+=T=bmSqrt(T)),N.percents[_]=C,N.lengths[_]=M}return N.addedLength=M,N};function i(p){this.segmentLength=0,this.points=new Array(p)}function o(p,m){this.partialLength=p,this.point=m}var l,u=(l={},function(p,m,g,b){var _=(p[0]+"_"+p[1]+"_"+m[0]+"_"+m[1]+"_"+g[0]+"_"+g[1]+"_"+b[0]+"_"+b[1]).replace(/\./g,"p");if(!l[_]){var R,E,S,C,T,A,M,I=getDefaultCurveSegments(),O=0,N=null;p.length===2&&(p[0]!==m[0]||p[1]!==m[1])&&t(p[0],p[1],m[0],m[1],p[0]+g[0],p[1]+g[1])&&t(p[0],p[1],m[0],m[1],m[0]+b[0],m[1]+b[1])&&(I=2);var j=new i(I);for(S=g.length,R=0;R<I;R+=1){for(M=createSizedArray(S),T=R/(I-1),A=0,E=0;E<S;E+=1)C=bmPow(1-T,3)*p[E]+3*bmPow(1-T,2)*T*(p[E]+g[E])+3*(1-T)*bmPow(T,2)*(m[E]+b[E])+bmPow(T,3)*m[E],M[E]=C,N!==null&&(A+=bmPow(M[E]-N[E],2));O+=A=bmSqrt(A),j.points[R]=new o(A,M),N=M}j.segmentLength=O,l[_]=j}return l[_]});function d(p,m){var g=m.percents,b=m.lengths,_=g.length,R=bmFloor((_-1)*p),E=p*m.addedLength,S=0;if(R===_-1||R===0||E===b[R])return g[R];for(var C=b[R]>E?-1:1,T=!0;T;)if(b[R]<=E&&b[R+1]>E?(S=(E-b[R])/(b[R+1]-b[R]),T=!1):R+=C,R<0||R>=_-1){if(R===_-1)return g[R];T=!1}return g[R]+(g[R+1]-g[R])*S}var f=createTypedArray("float32",8);return{getSegmentsLength:function(p){var m,g=segmentsLengthPool.newElement(),b=p.c,_=p.v,R=p.o,E=p.i,S=p._length,C=g.lengths,T=0;for(m=0;m<S-1;m+=1)C[m]=n(_[m],_[m+1],R[m],E[m+1]),T+=C[m].addedLength;return b&&S&&(C[m]=n(_[m],_[0],R[m],E[0]),T+=C[m].addedLength),g.totalLength=T,g},getNewSegment:function(p,m,g,b,_,R,E){_<0?_=0:_>1&&(_=1);var S,C=d(_,E),T=d(R=R>1?1:R,E),A=p.length,M=1-C,I=1-T,O=M*M*M,N=C*M*M*3,j=C*C*M*3,D=C*C*C,F=M*M*I,L=C*M*I+M*C*I+M*M*T,B=C*C*I+M*C*T+C*M*T,V=C*C*T,H=M*I*I,z=C*I*I+M*T*I+M*I*T,U=C*T*I+M*T*T+C*I*T,Q=C*T*T,q=I*I*I,W=T*I*I+I*T*I+I*I*T,G=T*T*I+I*T*T+T*I*T,K=T*T*T;for(S=0;S<A;S+=1)f[4*S]=e.round(1e3*(O*p[S]+N*g[S]+j*b[S]+D*m[S]))/1e3,f[4*S+1]=e.round(1e3*(F*p[S]+L*g[S]+B*b[S]+V*m[S]))/1e3,f[4*S+2]=e.round(1e3*(H*p[S]+z*g[S]+U*b[S]+Q*m[S]))/1e3,f[4*S+3]=e.round(1e3*(q*p[S]+W*g[S]+G*b[S]+K*m[S]))/1e3;return f},getPointInSegment:function(p,m,g,b,_,R){var E=d(_,R),S=1-E;return[e.round(1e3*(S*S*S*p[0]+(E*S*S+S*E*S+S*S*E)*g[0]+(E*E*S+S*E*E+E*S*E)*b[0]+E*E*E*m[0]))/1e3,e.round(1e3*(S*S*S*p[1]+(E*S*S+S*E*S+S*S*E)*g[1]+(E*E*S+S*E*E+E*S*E)*b[1]+E*E*E*m[1]))/1e3]},buildBezierData:u,pointOnLine2D:t,pointOnLine3D:function(p,m,g,b,_,R,E,S,C){if(g===0&&R===0&&C===0)return t(p,m,b,_,E,S);var T,A=e.sqrt(e.pow(b-p,2)+e.pow(_-m,2)+e.pow(R-g,2)),M=e.sqrt(e.pow(E-p,2)+e.pow(S-m,2)+e.pow(C-g,2)),I=e.sqrt(e.pow(E-b,2)+e.pow(S-_,2)+e.pow(C-R,2));return(T=A>M?A>I?A-M-I:I-M-A:I>M?I-M-A:M-A-I)>-1e-4&&T<1e-4}}}var bez=bezFunction(),initFrame=initialDefaultFrame,mathAbs=Math.abs;function interpolateValue(e,t){var n,i=this.offsetTime;this.propType==="multidimensional"&&(n=createTypedArray("float32",this.pv.length));for(var o,l,u,d,f,p,m,g,b,_=t.lastIndex,R=_,E=this.keyframes.length-1,S=!0;S;){if(o=this.keyframes[R],l=this.keyframes[R+1],R===E-1&&e>=l.t-i){o.h&&(o=l),_=0;break}if(l.t-i>e){_=R;break}R<E-1?R+=1:(_=0,S=!1)}u=this.keyframesMetadata[R]||{};var C,T=l.t-i,A=o.t-i;if(o.to){u.bezierData||(u.bezierData=bez.buildBezierData(o.s,l.s||o.e,o.to,o.ti));var M=u.bezierData;if(e>=T||e<A){var I=e>=T?M.points.length-1:0;for(f=M.points[I].point.length,d=0;d<f;d+=1)n[d]=M.points[I].point[d]}else{u.__fnct?b=u.__fnct:(b=BezierFactory.getBezierEasing(o.o.x,o.o.y,o.i.x,o.i.y,o.n).get,u.__fnct=b),p=b((e-A)/(T-A));var O,N=M.segmentLength*p,j=t.lastFrame<e&&t._lastKeyframeIndex===R?t._lastAddedLength:0;for(g=t.lastFrame<e&&t._lastKeyframeIndex===R?t._lastPoint:0,S=!0,m=M.points.length;S;){if(j+=M.points[g].partialLength,N===0||p===0||g===M.points.length-1){for(f=M.points[g].point.length,d=0;d<f;d+=1)n[d]=M.points[g].point[d];break}if(N>=j&&N<j+M.points[g+1].partialLength){for(O=(N-j)/M.points[g+1].partialLength,f=M.points[g].point.length,d=0;d<f;d+=1)n[d]=M.points[g].point[d]+(M.points[g+1].point[d]-M.points[g].point[d])*O;break}g<m-1?g+=1:S=!1}t._lastPoint=g,t._lastAddedLength=j-M.points[g].partialLength,t._lastKeyframeIndex=R}}else{var D,F,L,B,V;if(E=o.s.length,C=l.s||o.e,this.sh&&o.h!==1)e>=T?(n[0]=C[0],n[1]=C[1],n[2]=C[2]):e<=A?(n[0]=o.s[0],n[1]=o.s[1],n[2]=o.s[2]):quaternionToEuler(n,slerp(createQuaternion(o.s),createQuaternion(C),(e-A)/(T-A)));else for(R=0;R<E;R+=1)o.h!==1&&(e>=T?p=1:e<A?p=0:(o.o.x.constructor===Array?(u.__fnct||(u.__fnct=[]),u.__fnct[R]?b=u.__fnct[R]:(D=o.o.x[R]===void 0?o.o.x[0]:o.o.x[R],F=o.o.y[R]===void 0?o.o.y[0]:o.o.y[R],L=o.i.x[R]===void 0?o.i.x[0]:o.i.x[R],B=o.i.y[R]===void 0?o.i.y[0]:o.i.y[R],b=BezierFactory.getBezierEasing(D,F,L,B).get,u.__fnct[R]=b)):u.__fnct?b=u.__fnct:(D=o.o.x,F=o.o.y,L=o.i.x,B=o.i.y,b=BezierFactory.getBezierEasing(D,F,L,B).get,o.keyframeMetadata=b),p=b((e-A)/(T-A)))),C=l.s||o.e,V=o.h===1?o.s[R]:o.s[R]+(C[R]-o.s[R])*p,this.propType==="multidimensional"?n[R]=V:n=V}return t.lastIndex=_,n}function slerp(e,t,n){var i,o,l,u,d,f=[],p=e[0],m=e[1],g=e[2],b=e[3],_=t[0],R=t[1],E=t[2],S=t[3];return(o=p*_+m*R+g*E+b*S)<0&&(o=-o,_=-_,R=-R,E=-E,S=-S),1-o>1e-6?(i=Math.acos(o),l=Math.sin(i),u=Math.sin((1-n)*i)/l,d=Math.sin(n*i)/l):(u=1-n,d=n),f[0]=u*p+d*_,f[1]=u*m+d*R,f[2]=u*g+d*E,f[3]=u*b+d*S,f}function quaternionToEuler(e,t){var n=t[0],i=t[1],o=t[2],l=t[3],u=Math.atan2(2*i*l-2*n*o,1-2*i*i-2*o*o),d=Math.asin(2*n*i+2*o*l),f=Math.atan2(2*n*l-2*i*o,1-2*n*n-2*o*o);e[0]=u/degToRads,e[1]=d/degToRads,e[2]=f/degToRads}function createQuaternion(e){var t=e[0]*degToRads,n=e[1]*degToRads,i=e[2]*degToRads,o=Math.cos(t/2),l=Math.cos(n/2),u=Math.cos(i/2),d=Math.sin(t/2),f=Math.sin(n/2),p=Math.sin(i/2);return[d*f*u+o*l*p,d*l*u+o*f*p,o*f*u-d*l*p,o*l*u-d*f*p]}function getValueAtCurrentTime(){var e=this.comp.renderedFrame-this.offsetTime,t=this.keyframes[0].t-this.offsetTime,n=this.keyframes[this.keyframes.length-1].t-this.offsetTime;if(!(e===this._caching.lastFrame||this._caching.lastFrame!==initFrame&&(this._caching.lastFrame>=n&&e>=n||this._caching.lastFrame<t&&e<t))){this._caching.lastFrame>=e&&(this._caching._lastKeyframeIndex=-1,this._caching.lastIndex=0);var i=this.interpolateValue(e,this._caching);this.pv=i}return this._caching.lastFrame=e,this.pv}function setVValue(e){var t;if(this.propType==="unidimensional")t=e*this.mult,mathAbs(this.v-t)>1e-5&&(this.v=t,this._mdf=!0);else for(var n=0,i=this.v.length;n<i;)t=e[n]*this.mult,mathAbs(this.v[n]-t)>1e-5&&(this.v[n]=t,this._mdf=!0),n+=1}function processEffectsSequence(){if(this.elem.globalData.frameId!==this.frameId&&this.effectsSequence.length)if(this.lock)this.setVValue(this.pv);else{var e;this.lock=!0,this._mdf=this._isFirstFrame;var t=this.effectsSequence.length,n=this.kf?this.pv:this.data.k;for(e=0;e<t;e+=1)n=this.effectsSequence[e](n);this.setVValue(n),this._isFirstFrame=!1,this.lock=!1,this.frameId=this.elem.globalData.frameId}}function addEffect(e){this.effectsSequence.push(e),this.container.addDynamicProperty(this)}function ValueProperty(e,t,n,i){this.propType="unidimensional",this.mult=n||1,this.data=t,this.v=n?t.k*n:t.k,this.pv=t.k,this._mdf=!1,this.elem=e,this.container=i,this.comp=e.comp,this.k=!1,this.kf=!1,this.vel=0,this.effectsSequence=[],this._isFirstFrame=!0,this.getValue=processEffectsSequence,this.setVValue=setVValue,this.addEffect=addEffect}function MultiDimensionalProperty(e,t,n,i){var o;this.propType="multidimensional",this.mult=n||1,this.data=t,this._mdf=!1,this.elem=e,this.container=i,this.comp=e.comp,this.k=!1,this.kf=!1,this.frameId=-1;var l=t.k.length;for(this.v=createTypedArray("float32",l),this.pv=createTypedArray("float32",l),this.vel=createTypedArray("float32",l),o=0;o<l;o+=1)this.v[o]=t.k[o]*this.mult,this.pv[o]=t.k[o];this._isFirstFrame=!0,this.effectsSequence=[],this.getValue=processEffectsSequence,this.setVValue=setVValue,this.addEffect=addEffect}function KeyframedValueProperty(e,t,n,i){this.propType="unidimensional",this.keyframes=t.k,this.keyframesMetadata=[],this.offsetTime=e.data.st,this.frameId=-1,this._caching={lastFrame:initFrame,lastIndex:0,value:0,_lastKeyframeIndex:-1},this.k=!0,this.kf=!0,this.data=t,this.mult=n||1,this.elem=e,this.container=i,this.comp=e.comp,this.v=initFrame,this.pv=initFrame,this._isFirstFrame=!0,this.getValue=processEffectsSequence,this.setVValue=setVValue,this.interpolateValue=interpolateValue,this.effectsSequence=[getValueAtCurrentTime.bind(this)],this.addEffect=addEffect}function KeyframedMultidimensionalProperty(e,t,n,i){var o;this.propType="multidimensional";var l,u,d,f,p=t.k.length;for(o=0;o<p-1;o+=1)t.k[o].to&&t.k[o].s&&t.k[o+1]&&t.k[o+1].s&&(l=t.k[o].s,u=t.k[o+1].s,d=t.k[o].to,f=t.k[o].ti,(l.length===2&&(l[0]!==u[0]||l[1]!==u[1])&&bez.pointOnLine2D(l[0],l[1],u[0],u[1],l[0]+d[0],l[1]+d[1])&&bez.pointOnLine2D(l[0],l[1],u[0],u[1],u[0]+f[0],u[1]+f[1])||l.length===3&&(l[0]!==u[0]||l[1]!==u[1]||l[2]!==u[2])&&bez.pointOnLine3D(l[0],l[1],l[2],u[0],u[1],u[2],l[0]+d[0],l[1]+d[1],l[2]+d[2])&&bez.pointOnLine3D(l[0],l[1],l[2],u[0],u[1],u[2],u[0]+f[0],u[1]+f[1],u[2]+f[2]))&&(t.k[o].to=null,t.k[o].ti=null),l[0]===u[0]&&l[1]===u[1]&&d[0]===0&&d[1]===0&&f[0]===0&&f[1]===0&&(l.length===2||l[2]===u[2]&&d[2]===0&&f[2]===0)&&(t.k[o].to=null,t.k[o].ti=null));this.effectsSequence=[getValueAtCurrentTime.bind(this)],this.data=t,this.keyframes=t.k,this.keyframesMetadata=[],this.offsetTime=e.data.st,this.k=!0,this.kf=!0,this._isFirstFrame=!0,this.mult=n||1,this.elem=e,this.container=i,this.comp=e.comp,this.getValue=processEffectsSequence,this.setVValue=setVValue,this.interpolateValue=interpolateValue,this.frameId=-1;var m=t.k[0].s.length;for(this.v=createTypedArray("float32",m),this.pv=createTypedArray("float32",m),o=0;o<m;o+=1)this.v[o]=initFrame,this.pv[o]=initFrame;this._caching={lastFrame:initFrame,lastIndex:0,value:createTypedArray("float32",m)},this.addEffect=addEffect}var PropertyFactory={getProp:function(e,t,n,i,o){var l;if(t.sid&&(t=e.globalData.slotManager.getProp(t)),t.k.length)if(typeof t.k[0]=="number")l=new MultiDimensionalProperty(e,t,i,o);else switch(n){case 0:l=new KeyframedValueProperty(e,t,i,o);break;case 1:l=new KeyframedMultidimensionalProperty(e,t,i,o)}else l=new ValueProperty(e,t,i,o);return l.effectsSequence.length&&o.addDynamicProperty(l),l}};function DynamicPropertyContainer(){}DynamicPropertyContainer.prototype={addDynamicProperty:function(e){this.dynamicProperties.indexOf(e)===-1&&(this.dynamicProperties.push(e),this.container.addDynamicProperty(this),this._isAnimated=!0)},iterateDynamicProperties:function(){var e;this._mdf=!1;var t=this.dynamicProperties.length;for(e=0;e<t;e+=1)this.dynamicProperties[e].getValue(),this.dynamicProperties[e]._mdf&&(this._mdf=!0)},initDynamicPropertyContainer:function(e){this.container=e,this.dynamicProperties=[],this._mdf=!1,this._isAnimated=!1}};var pointPool=poolFactory(8,function(){return createTypedArray("float32",2)});function ShapePath(){this.c=!1,this._length=0,this._maxLength=8,this.v=createSizedArray(this._maxLength),this.o=createSizedArray(this._maxLength),this.i=createSizedArray(this._maxLength)}ShapePath.prototype.setPathData=function(e,t){this.c=e,this.setLength(t);for(var n=0;n<t;)this.v[n]=pointPool.newElement(),this.o[n]=pointPool.newElement(),this.i[n]=pointPool.newElement(),n+=1},ShapePath.prototype.setLength=function(e){for(;this._maxLength<e;)this.doubleArrayLength();this._length=e},ShapePath.prototype.doubleArrayLength=function(){this.v=this.v.concat(createSizedArray(this._maxLength)),this.i=this.i.concat(createSizedArray(this._maxLength)),this.o=this.o.concat(createSizedArray(this._maxLength)),this._maxLength*=2},ShapePath.prototype.setXYAt=function(e,t,n,i,o){var l;switch(this._length=Math.max(this._length,i+1),this._length>=this._maxLength&&this.doubleArrayLength(),n){case"v":l=this.v;break;case"i":l=this.i;break;case"o":l=this.o;break;default:l=[]}(!l[i]||l[i]&&!o)&&(l[i]=pointPool.newElement()),l[i][0]=e,l[i][1]=t},ShapePath.prototype.setTripleAt=function(e,t,n,i,o,l,u,d){this.setXYAt(e,t,"v",u,d),this.setXYAt(n,i,"o",u,d),this.setXYAt(o,l,"i",u,d)},ShapePath.prototype.reverse=function(){var e=new ShapePath;e.setPathData(this.c,this._length);var t=this.v,n=this.o,i=this.i,o=0;this.c&&(e.setTripleAt(t[0][0],t[0][1],i[0][0],i[0][1],n[0][0],n[0][1],0,!1),o=1);var l,u=this._length-1,d=this._length;for(l=o;l<d;l+=1)e.setTripleAt(t[u][0],t[u][1],i[u][0],i[u][1],n[u][0],n[u][1],l,!1),u-=1;return e},ShapePath.prototype.length=function(){return this._length};var shapePool=(factory=poolFactory(4,function(){return new ShapePath},function(e){var t,n=e._length;for(t=0;t<n;t+=1)pointPool.release(e.v[t]),pointPool.release(e.i[t]),pointPool.release(e.o[t]),e.v[t]=null,e.i[t]=null,e.o[t]=null;e._length=0,e.c=!1}),factory.clone=function(e){var t,n=factory.newElement(),i=e._length===void 0?e.v.length:e._length;for(n.setLength(i),n.c=e.c,t=0;t<i;t+=1)n.setTripleAt(e.v[t][0],e.v[t][1],e.o[t][0],e.o[t][1],e.i[t][0],e.i[t][1],t);return n},factory),factory;function ShapeCollection(){this._length=0,this._maxLength=4,this.shapes=createSizedArray(this._maxLength)}ShapeCollection.prototype.addShape=function(e){this._length===this._maxLength&&(this.shapes=this.shapes.concat(createSizedArray(this._maxLength)),this._maxLength*=2),this.shapes[this._length]=e,this._length+=1},ShapeCollection.prototype.releaseShapes=function(){var e;for(e=0;e<this._length;e+=1)shapePool.release(this.shapes[e]);this._length=0};var shapeCollectionPool=(ob={newShapeCollection:function(){return _length?pool[_length-=1]:new ShapeCollection},release:function(e){var t,n=e._length;for(t=0;t<n;t+=1)shapePool.release(e.shapes[t]);e._length=0,_length===_maxLength&&(pool=pooling.double(pool),_maxLength*=2),pool[_length]=e,_length+=1}},_length=0,_maxLength=4,pool=createSizedArray(_maxLength),ob),ob,_length,_maxLength,pool,ShapePropertyFactory=function(){function e(b,_,R){var E,S,C,T,A,M,I,O,N,j=R.lastIndex,D=this.keyframes;if(b<D[0].t-this.offsetTime)E=D[0].s[0],C=!0,j=0;else if(b>=D[D.length-1].t-this.offsetTime)E=D[D.length-1].s?D[D.length-1].s[0]:D[D.length-2].e[0],C=!0;else{for(var F,L,B,V=j,H=D.length-1,z=!0;z&&(F=D[V],!((L=D[V+1]).t-this.offsetTime>b));)V<H-1?V+=1:z=!1;if(B=this.keyframesMetadata[V]||{},j=V,!(C=F.h===1)){if(b>=L.t-this.offsetTime)O=1;else if(b<F.t-this.offsetTime)O=0;else{var U;B.__fnct?U=B.__fnct:(U=BezierFactory.getBezierEasing(F.o.x,F.o.y,F.i.x,F.i.y).get,B.__fnct=U),O=U((b-(F.t-this.offsetTime))/(L.t-this.offsetTime-(F.t-this.offsetTime)))}S=L.s?L.s[0]:F.e[0]}E=F.s[0]}for(M=_._length,I=E.i[0].length,R.lastIndex=j,T=0;T<M;T+=1)for(A=0;A<I;A+=1)N=C?E.i[T][A]:E.i[T][A]+(S.i[T][A]-E.i[T][A])*O,_.i[T][A]=N,N=C?E.o[T][A]:E.o[T][A]+(S.o[T][A]-E.o[T][A])*O,_.o[T][A]=N,N=C?E.v[T][A]:E.v[T][A]+(S.v[T][A]-E.v[T][A])*O,_.v[T][A]=N}function t(){var b=this.comp.renderedFrame-this.offsetTime,_=this.keyframes[0].t-this.offsetTime,R=this.keyframes[this.keyframes.length-1].t-this.offsetTime,E=this._caching.lastFrame;return E!==-999999&&(E<_&&b<_||E>R&&b>R)||(this._caching.lastIndex=E<b?this._caching.lastIndex:0,this.interpolateShape(b,this.pv,this._caching)),this._caching.lastFrame=b,this.pv}function n(){this.paths=this.localShapeCollection}function i(b){(function(_,R){if(_._length!==R._length||_.c!==R.c)return!1;var E,S=_._length;for(E=0;E<S;E+=1)if(_.v[E][0]!==R.v[E][0]||_.v[E][1]!==R.v[E][1]||_.o[E][0]!==R.o[E][0]||_.o[E][1]!==R.o[E][1]||_.i[E][0]!==R.i[E][0]||_.i[E][1]!==R.i[E][1])return!1;return!0})(this.v,b)||(this.v=shapePool.clone(b),this.localShapeCollection.releaseShapes(),this.localShapeCollection.addShape(this.v),this._mdf=!0,this.paths=this.localShapeCollection)}function o(){if(this.elem.globalData.frameId!==this.frameId)if(this.effectsSequence.length)if(this.lock)this.setVValue(this.pv);else{var b,_;this.lock=!0,this._mdf=!1,b=this.kf?this.pv:this.data.ks?this.data.ks.k:this.data.pt.k;var R=this.effectsSequence.length;for(_=0;_<R;_+=1)b=this.effectsSequence[_](b);this.setVValue(b),this.lock=!1,this.frameId=this.elem.globalData.frameId}else this._mdf=!1}function l(b,_,R){this.propType="shape",this.comp=b.comp,this.container=b,this.elem=b,this.data=_,this.k=!1,this.kf=!1,this._mdf=!1;var E=R===3?_.pt.k:_.ks.k;this.v=shapePool.clone(E),this.pv=shapePool.clone(this.v),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.paths=this.localShapeCollection,this.paths.addShape(this.v),this.reset=n,this.effectsSequence=[]}function u(b){this.effectsSequence.push(b),this.container.addDynamicProperty(this)}function d(b,_,R){this.propType="shape",this.comp=b.comp,this.elem=b,this.container=b,this.offsetTime=b.data.st,this.keyframes=R===3?_.pt.k:_.ks.k,this.keyframesMetadata=[],this.k=!0,this.kf=!0;var E=this.keyframes[0].s[0].i.length;this.v=shapePool.newElement(),this.v.setPathData(this.keyframes[0].s[0].c,E),this.pv=shapePool.clone(this.v),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.paths=this.localShapeCollection,this.paths.addShape(this.v),this.lastFrame=-999999,this.reset=n,this._caching={lastFrame:-999999,lastIndex:0},this.effectsSequence=[t.bind(this)]}l.prototype.interpolateShape=e,l.prototype.getValue=o,l.prototype.setVValue=i,l.prototype.addEffect=u,d.prototype.getValue=o,d.prototype.interpolateShape=e,d.prototype.setVValue=i,d.prototype.addEffect=u;var f=function(){var b=roundCorner;function _(R,E){this.v=shapePool.newElement(),this.v.setPathData(!0,4),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.paths=this.localShapeCollection,this.localShapeCollection.addShape(this.v),this.d=E.d,this.elem=R,this.comp=R.comp,this.frameId=-1,this.initDynamicPropertyContainer(R),this.p=PropertyFactory.getProp(R,E.p,1,0,this),this.s=PropertyFactory.getProp(R,E.s,1,0,this),this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertEllToPath())}return _.prototype={reset:n,getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertEllToPath())},convertEllToPath:function(){var R=this.p.v[0],E=this.p.v[1],S=this.s.v[0]/2,C=this.s.v[1]/2,T=this.d!==3,A=this.v;A.v[0][0]=R,A.v[0][1]=E-C,A.v[1][0]=T?R+S:R-S,A.v[1][1]=E,A.v[2][0]=R,A.v[2][1]=E+C,A.v[3][0]=T?R-S:R+S,A.v[3][1]=E,A.i[0][0]=T?R-S*b:R+S*b,A.i[0][1]=E-C,A.i[1][0]=T?R+S:R-S,A.i[1][1]=E-C*b,A.i[2][0]=T?R+S*b:R-S*b,A.i[2][1]=E+C,A.i[3][0]=T?R-S:R+S,A.i[3][1]=E+C*b,A.o[0][0]=T?R+S*b:R-S*b,A.o[0][1]=E-C,A.o[1][0]=T?R+S:R-S,A.o[1][1]=E+C*b,A.o[2][0]=T?R-S*b:R+S*b,A.o[2][1]=E+C,A.o[3][0]=T?R-S:R+S,A.o[3][1]=E-C*b}},extendPrototype([DynamicPropertyContainer],_),_}(),p=function(){function b(_,R){this.v=shapePool.newElement(),this.v.setPathData(!0,0),this.elem=_,this.comp=_.comp,this.data=R,this.frameId=-1,this.d=R.d,this.initDynamicPropertyContainer(_),R.sy===1?(this.ir=PropertyFactory.getProp(_,R.ir,0,0,this),this.is=PropertyFactory.getProp(_,R.is,0,.01,this),this.convertToPath=this.convertStarToPath):this.convertToPath=this.convertPolygonToPath,this.pt=PropertyFactory.getProp(_,R.pt,0,0,this),this.p=PropertyFactory.getProp(_,R.p,1,0,this),this.r=PropertyFactory.getProp(_,R.r,0,degToRads,this),this.or=PropertyFactory.getProp(_,R.or,0,0,this),this.os=PropertyFactory.getProp(_,R.os,0,.01,this),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.localShapeCollection.addShape(this.v),this.paths=this.localShapeCollection,this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertToPath())}return b.prototype={reset:n,getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertToPath())},convertStarToPath:function(){var _,R,E,S,C=2*Math.floor(this.pt.v),T=2*Math.PI/C,A=!0,M=this.or.v,I=this.ir.v,O=this.os.v,N=this.is.v,j=2*Math.PI*M/(2*C),D=2*Math.PI*I/(2*C),F=-Math.PI/2;F+=this.r.v;var L=this.data.d===3?-1:1;for(this.v._length=0,_=0;_<C;_+=1){E=A?O:N,S=A?j:D;var B=(R=A?M:I)*Math.cos(F),V=R*Math.sin(F),H=B===0&&V===0?0:V/Math.sqrt(B*B+V*V),z=B===0&&V===0?0:-B/Math.sqrt(B*B+V*V);B+=+this.p.v[0],V+=+this.p.v[1],this.v.setTripleAt(B,V,B-H*S*E*L,V-z*S*E*L,B+H*S*E*L,V+z*S*E*L,_,!0),A=!A,F+=T*L}},convertPolygonToPath:function(){var _,R=Math.floor(this.pt.v),E=2*Math.PI/R,S=this.or.v,C=this.os.v,T=2*Math.PI*S/(4*R),A=.5*-Math.PI,M=this.data.d===3?-1:1;for(A+=this.r.v,this.v._length=0,_=0;_<R;_+=1){var I=S*Math.cos(A),O=S*Math.sin(A),N=I===0&&O===0?0:O/Math.sqrt(I*I+O*O),j=I===0&&O===0?0:-I/Math.sqrt(I*I+O*O);I+=+this.p.v[0],O+=+this.p.v[1],this.v.setTripleAt(I,O,I-N*T*C*M,O-j*T*C*M,I+N*T*C*M,O+j*T*C*M,_,!0),A+=E*M}this.paths.length=0,this.paths[0]=this.v}},extendPrototype([DynamicPropertyContainer],b),b}(),m=function(){function b(_,R){this.v=shapePool.newElement(),this.v.c=!0,this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.localShapeCollection.addShape(this.v),this.paths=this.localShapeCollection,this.elem=_,this.comp=_.comp,this.frameId=-1,this.d=R.d,this.initDynamicPropertyContainer(_),this.p=PropertyFactory.getProp(_,R.p,1,0,this),this.s=PropertyFactory.getProp(_,R.s,1,0,this),this.r=PropertyFactory.getProp(_,R.r,0,0,this),this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertRectToPath())}return b.prototype={convertRectToPath:function(){var _=this.p.v[0],R=this.p.v[1],E=this.s.v[0]/2,S=this.s.v[1]/2,C=bmMin(E,S,this.r.v),T=C*(1-roundCorner);this.v._length=0,this.d===2||this.d===1?(this.v.setTripleAt(_+E,R-S+C,_+E,R-S+C,_+E,R-S+T,0,!0),this.v.setTripleAt(_+E,R+S-C,_+E,R+S-T,_+E,R+S-C,1,!0),C!==0?(this.v.setTripleAt(_+E-C,R+S,_+E-C,R+S,_+E-T,R+S,2,!0),this.v.setTripleAt(_-E+C,R+S,_-E+T,R+S,_-E+C,R+S,3,!0),this.v.setTripleAt(_-E,R+S-C,_-E,R+S-C,_-E,R+S-T,4,!0),this.v.setTripleAt(_-E,R-S+C,_-E,R-S+T,_-E,R-S+C,5,!0),this.v.setTripleAt(_-E+C,R-S,_-E+C,R-S,_-E+T,R-S,6,!0),this.v.setTripleAt(_+E-C,R-S,_+E-T,R-S,_+E-C,R-S,7,!0)):(this.v.setTripleAt(_-E,R+S,_-E+T,R+S,_-E,R+S,2),this.v.setTripleAt(_-E,R-S,_-E,R-S+T,_-E,R-S,3))):(this.v.setTripleAt(_+E,R-S+C,_+E,R-S+T,_+E,R-S+C,0,!0),C!==0?(this.v.setTripleAt(_+E-C,R-S,_+E-C,R-S,_+E-T,R-S,1,!0),this.v.setTripleAt(_-E+C,R-S,_-E+T,R-S,_-E+C,R-S,2,!0),this.v.setTripleAt(_-E,R-S+C,_-E,R-S+C,_-E,R-S+T,3,!0),this.v.setTripleAt(_-E,R+S-C,_-E,R+S-T,_-E,R+S-C,4,!0),this.v.setTripleAt(_-E+C,R+S,_-E+C,R+S,_-E+T,R+S,5,!0),this.v.setTripleAt(_+E-C,R+S,_+E-T,R+S,_+E-C,R+S,6,!0),this.v.setTripleAt(_+E,R+S-C,_+E,R+S-C,_+E,R+S-T,7,!0)):(this.v.setTripleAt(_-E,R-S,_-E+T,R-S,_-E,R-S,1,!0),this.v.setTripleAt(_-E,R+S,_-E,R+S-T,_-E,R+S,2,!0),this.v.setTripleAt(_+E,R+S,_+E-T,R+S,_+E,R+S,3,!0)))},getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertRectToPath())},reset:n},extendPrototype([DynamicPropertyContainer],b),b}(),g={getShapeProp:function(b,_,R){var E;return R===3||R===4?E=(R===3?_.pt:_.ks).k.length?new d(b,_,R):new l(b,_,R):R===5?E=new m(b,_):R===6?E=new f(b,_):R===7&&(E=new p(b,_)),E.k&&b.addDynamicProperty(E),E},getConstructorFunction:function(){return l},getKeyframedConstructorFunction:function(){return d}};return g}(),Matrix=function(){var e=Math.cos,t=Math.sin,n=Math.tan,i=Math.round;function o(){return this.props[0]=1,this.props[1]=0,this.props[2]=0,this.props[3]=0,this.props[4]=0,this.props[5]=1,this.props[6]=0,this.props[7]=0,this.props[8]=0,this.props[9]=0,this.props[10]=1,this.props[11]=0,this.props[12]=0,this.props[13]=0,this.props[14]=0,this.props[15]=1,this}function l(q){if(q===0)return this;var W=e(q),G=t(q);return this._t(W,-G,0,0,G,W,0,0,0,0,1,0,0,0,0,1)}function u(q){if(q===0)return this;var W=e(q),G=t(q);return this._t(1,0,0,0,0,W,-G,0,0,G,W,0,0,0,0,1)}function d(q){if(q===0)return this;var W=e(q),G=t(q);return this._t(W,0,G,0,0,1,0,0,-G,0,W,0,0,0,0,1)}function f(q){if(q===0)return this;var W=e(q),G=t(q);return this._t(W,-G,0,0,G,W,0,0,0,0,1,0,0,0,0,1)}function p(q,W){return this._t(1,W,q,1,0,0)}function m(q,W){return this.shear(n(q),n(W))}function g(q,W){var G=e(W),K=t(W);return this._t(G,K,0,0,-K,G,0,0,0,0,1,0,0,0,0,1)._t(1,0,0,0,n(q),1,0,0,0,0,1,0,0,0,0,1)._t(G,-K,0,0,K,G,0,0,0,0,1,0,0,0,0,1)}function b(q,W,G){return G||G===0||(G=1),q===1&&W===1&&G===1?this:this._t(q,0,0,0,0,W,0,0,0,0,G,0,0,0,0,1)}function _(q,W,G,K,J,ee,ne,ae,oe,se,ce,ie,ue,le,Z,fe){return this.props[0]=q,this.props[1]=W,this.props[2]=G,this.props[3]=K,this.props[4]=J,this.props[5]=ee,this.props[6]=ne,this.props[7]=ae,this.props[8]=oe,this.props[9]=se,this.props[10]=ce,this.props[11]=ie,this.props[12]=ue,this.props[13]=le,this.props[14]=Z,this.props[15]=fe,this}function R(q,W,G){return G=G||0,q!==0||W!==0||G!==0?this._t(1,0,0,0,0,1,0,0,0,0,1,0,q,W,G,1):this}function E(q,W,G,K,J,ee,ne,ae,oe,se,ce,ie,ue,le,Z,fe){var te=this.props;if(q===1&&W===0&&G===0&&K===0&&J===0&&ee===1&&ne===0&&ae===0&&oe===0&&se===0&&ce===1&&ie===0)return te[12]=te[12]*q+te[15]*ue,te[13]=te[13]*ee+te[15]*le,te[14]=te[14]*ce+te[15]*Z,te[15]*=fe,this._identityCalculated=!1,this;var de=te[0],pe=te[1],me=te[2],ye=te[3],he=te[4],ge=te[5],Se=te[6],ve=te[7],_e=te[8],xe=te[9],be=te[10],Re=te[11],Pe=te[12],we=te[13],Ee=te[14],Te=te[15];return te[0]=de*q+pe*J+me*oe+ye*ue,te[1]=de*W+pe*ee+me*se+ye*le,te[2]=de*G+pe*ne+me*ce+ye*Z,te[3]=de*K+pe*ae+me*ie+ye*fe,te[4]=he*q+ge*J+Se*oe+ve*ue,te[5]=he*W+ge*ee+Se*se+ve*le,te[6]=he*G+ge*ne+Se*ce+ve*Z,te[7]=he*K+ge*ae+Se*ie+ve*fe,te[8]=_e*q+xe*J+be*oe+Re*ue,te[9]=_e*W+xe*ee+be*se+Re*le,te[10]=_e*G+xe*ne+be*ce+Re*Z,te[11]=_e*K+xe*ae+be*ie+Re*fe,te[12]=Pe*q+we*J+Ee*oe+Te*ue,te[13]=Pe*W+we*ee+Ee*se+Te*le,te[14]=Pe*G+we*ne+Ee*ce+Te*Z,te[15]=Pe*K+we*ae+Ee*ie+Te*fe,this._identityCalculated=!1,this}function S(q){var W=q.props;return this.transform(W[0],W[1],W[2],W[3],W[4],W[5],W[6],W[7],W[8],W[9],W[10],W[11],W[12],W[13],W[14],W[15])}function C(){return this._identityCalculated||(this._identity=!(this.props[0]!==1||this.props[1]!==0||this.props[2]!==0||this.props[3]!==0||this.props[4]!==0||this.props[5]!==1||this.props[6]!==0||this.props[7]!==0||this.props[8]!==0||this.props[9]!==0||this.props[10]!==1||this.props[11]!==0||this.props[12]!==0||this.props[13]!==0||this.props[14]!==0||this.props[15]!==1),this._identityCalculated=!0),this._identity}function T(q){for(var W=0;W<16;){if(q.props[W]!==this.props[W])return!1;W+=1}return!0}function A(q){var W;for(W=0;W<16;W+=1)q.props[W]=this.props[W];return q}function M(q){var W;for(W=0;W<16;W+=1)this.props[W]=q[W]}function I(q,W,G){return{x:q*this.props[0]+W*this.props[4]+G*this.props[8]+this.props[12],y:q*this.props[1]+W*this.props[5]+G*this.props[9]+this.props[13],z:q*this.props[2]+W*this.props[6]+G*this.props[10]+this.props[14]}}function O(q,W,G){return q*this.props[0]+W*this.props[4]+G*this.props[8]+this.props[12]}function N(q,W,G){return q*this.props[1]+W*this.props[5]+G*this.props[9]+this.props[13]}function j(q,W,G){return q*this.props[2]+W*this.props[6]+G*this.props[10]+this.props[14]}function D(){var q=this.props[0]*this.props[5]-this.props[1]*this.props[4],W=this.props[5]/q,G=-this.props[1]/q,K=-this.props[4]/q,J=this.props[0]/q,ee=(this.props[4]*this.props[13]-this.props[5]*this.props[12])/q,ne=-(this.props[0]*this.props[13]-this.props[1]*this.props[12])/q,ae=new Matrix;return ae.props[0]=W,ae.props[1]=G,ae.props[4]=K,ae.props[5]=J,ae.props[12]=ee,ae.props[13]=ne,ae}function F(q){return this.getInverseMatrix().applyToPointArray(q[0],q[1],q[2]||0)}function L(q){var W,G=q.length,K=[];for(W=0;W<G;W+=1)K[W]=F(q[W]);return K}function B(q,W,G){var K=createTypedArray("float32",6);if(this.isIdentity())K[0]=q[0],K[1]=q[1],K[2]=W[0],K[3]=W[1],K[4]=G[0],K[5]=G[1];else{var J=this.props[0],ee=this.props[1],ne=this.props[4],ae=this.props[5],oe=this.props[12],se=this.props[13];K[0]=q[0]*J+q[1]*ne+oe,K[1]=q[0]*ee+q[1]*ae+se,K[2]=W[0]*J+W[1]*ne+oe,K[3]=W[0]*ee+W[1]*ae+se,K[4]=G[0]*J+G[1]*ne+oe,K[5]=G[0]*ee+G[1]*ae+se}return K}function V(q,W,G){return this.isIdentity()?[q,W,G]:[q*this.props[0]+W*this.props[4]+G*this.props[8]+this.props[12],q*this.props[1]+W*this.props[5]+G*this.props[9]+this.props[13],q*this.props[2]+W*this.props[6]+G*this.props[10]+this.props[14]]}function H(q,W){if(this.isIdentity())return q+","+W;var G=this.props;return Math.round(100*(q*G[0]+W*G[4]+G[12]))/100+","+Math.round(100*(q*G[1]+W*G[5]+G[13]))/100}function z(){for(var q=0,W=this.props,G="matrix3d(";q<16;)G+=i(1e4*W[q])/1e4,G+=q===15?")":",",q+=1;return G}function U(q){return q<1e-6&&q>0||q>-1e-6&&q<0?i(1e4*q)/1e4:q}function Q(){var q=this.props;return"matrix("+U(q[0])+","+U(q[1])+","+U(q[4])+","+U(q[5])+","+U(q[12])+","+U(q[13])+")"}return function(){this.reset=o,this.rotate=l,this.rotateX=u,this.rotateY=d,this.rotateZ=f,this.skew=m,this.skewFromAxis=g,this.shear=p,this.scale=b,this.setTransform=_,this.translate=R,this.transform=E,this.multiply=S,this.applyToPoint=I,this.applyToX=O,this.applyToY=N,this.applyToZ=j,this.applyToPointArray=V,this.applyToTriplePoints=B,this.applyToPointStringified=H,this.toCSS=z,this.to2dCSS=Q,this.clone=A,this.cloneFromProps=M,this.equals=T,this.inversePoints=L,this.inversePoint=F,this.getInverseMatrix=D,this._t=this.transform,this.isIdentity=C,this._identity=!0,this._identityCalculated=!1,this.props=createTypedArray("float32",16),this.reset()}}();function _typeof$3(e){return(_typeof$3=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}var lottie={};function setLocation(e){setLocationHref(e)}function searchAnimations(){animationManager.searchAnimations()}function setSubframeRendering(e){setSubframeEnabled(e)}function setPrefix(e){setIdPrefix(e)}function loadAnimation(e){return animationManager.loadAnimation(e)}function setQuality(e){if(typeof e=="string")switch(e){case"high":setDefaultCurveSegments(200);break;default:case"medium":setDefaultCurveSegments(50);break;case"low":setDefaultCurveSegments(10)}else!isNaN(e)&&e>1&&setDefaultCurveSegments(e)}function inBrowser(){return typeof navigator<"u"}function installPlugin(e,t){e==="expressions"&&setExpressionsPlugin(t)}function getFactory(e){switch(e){case"propertyFactory":return PropertyFactory;case"shapePropertyFactory":return ShapePropertyFactory;case"matrix":return Matrix;default:return null}}function checkReady(){document.readyState==="complete"&&(clearInterval(readyStateCheckInterval),searchAnimations())}function getQueryVariable(e){for(var t=queryString.split("&"),n=0;n<t.length;n+=1){var i=t[n].split("=");if(decodeURIComponent(i[0])==e)return decodeURIComponent(i[1])}return null}lottie.play=animationManager.play,lottie.pause=animationManager.pause,lottie.setLocationHref=setLocation,lottie.togglePause=animationManager.togglePause,lottie.setSpeed=animationManager.setSpeed,lottie.setDirection=animationManager.setDirection,lottie.stop=animationManager.stop,lottie.searchAnimations=searchAnimations,lottie.registerAnimation=animationManager.registerAnimation,lottie.loadAnimation=loadAnimation,lottie.setSubframeRendering=setSubframeRendering,lottie.resize=animationManager.resize,lottie.goToAndStop=animationManager.goToAndStop,lottie.destroy=animationManager.destroy,lottie.setQuality=setQuality,lottie.inBrowser=inBrowser,lottie.installPlugin=installPlugin,lottie.freeze=animationManager.freeze,lottie.unfreeze=animationManager.unfreeze,lottie.setVolume=animationManager.setVolume,lottie.mute=animationManager.mute,lottie.unmute=animationManager.unmute,lottie.getRegisteredAnimations=animationManager.getRegisteredAnimations,lottie.useWebWorker=setWebWorker,lottie.setIDPrefix=setPrefix,lottie.__getFactory=getFactory,lottie.version="5.12.2";var queryString="";{var scripts=document.getElementsByTagName("script"),index=scripts.length-1,myScript=scripts[index]||{src:""};queryString=myScript.src?myScript.src.replace(/^[^\?]+\??/,""):"",getQueryVariable("renderer")}var readyStateCheckInterval=setInterval(checkReady,100);try{_typeof$3(exports)!=="object"&&(window.bodymovin=lottie)}catch(e){}var ShapeModifiers=function(){var e={},t={};return e.registerModifier=function(n,i){t[n]||(t[n]=i)},e.getModifier=function(n,i,o){return new t[n](i,o)},e}();function ShapeModifier(){}function TrimModifier(){}function PuckerAndBloatModifier(){}ShapeModifier.prototype.initModifierProperties=function(){},ShapeModifier.prototype.addShapeToModifier=function(){},ShapeModifier.prototype.addShape=function(e){if(!this.closed){e.sh.container.addDynamicProperty(e.sh);var t={shape:e.sh,data:e,localShapeCollection:shapeCollectionPool.newShapeCollection()};this.shapes.push(t),this.addShapeToModifier(t),this._isAnimated&&e.setAsAnimated()}},ShapeModifier.prototype.init=function(e,t){this.shapes=[],this.elem=e,this.initDynamicPropertyContainer(e),this.initModifierProperties(e,t),this.frameId=initialDefaultFrame,this.closed=!1,this.k=!1,this.dynamicProperties.length?this.k=!0:this.getValue(!0)},ShapeModifier.prototype.processKeys=function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties())},extendPrototype([DynamicPropertyContainer],ShapeModifier),extendPrototype([ShapeModifier],TrimModifier),TrimModifier.prototype.initModifierProperties=function(e,t){this.s=PropertyFactory.getProp(e,t.s,0,.01,this),this.e=PropertyFactory.getProp(e,t.e,0,.01,this),this.o=PropertyFactory.getProp(e,t.o,0,0,this),this.sValue=0,this.eValue=0,this.getValue=this.processKeys,this.m=t.m,this._isAnimated=!!this.s.effectsSequence.length||!!this.e.effectsSequence.length||!!this.o.effectsSequence.length},TrimModifier.prototype.addShapeToModifier=function(e){e.pathsData=[]},TrimModifier.prototype.calculateShapeEdges=function(e,t,n,i,o){var l=[];t<=1?l.push({s:e,e:t}):e>=1?l.push({s:e-1,e:t-1}):(l.push({s:e,e:1}),l.push({s:0,e:t-1}));var u,d,f=[],p=l.length;for(u=0;u<p;u+=1){var m,g;(d=l[u]).e*o<i||d.s*o>i+n||(m=d.s*o<=i?0:(d.s*o-i)/n,g=d.e*o>=i+n?1:(d.e*o-i)/n,f.push([m,g]))}return f.length||f.push([0,0]),f},TrimModifier.prototype.releasePathsData=function(e){var t,n=e.length;for(t=0;t<n;t+=1)segmentsLengthPool.release(e[t]);return e.length=0,e},TrimModifier.prototype.processShapes=function(e){var t,n,i,o;if(this._mdf||e){var l=this.o.v%360/360;if(l<0&&(l+=1),(t=this.s.v>1?1+l:this.s.v<0?0+l:this.s.v+l)>(n=this.e.v>1?1+l:this.e.v<0?0+l:this.e.v+l)){var u=t;t=n,n=u}t=1e-4*Math.round(1e4*t),n=1e-4*Math.round(1e4*n),this.sValue=t,this.eValue=n}else t=this.sValue,n=this.eValue;var d,f,p,m,g,b=this.shapes.length,_=0;if(n===t)for(o=0;o<b;o+=1)this.shapes[o].localShapeCollection.releaseShapes(),this.shapes[o].shape._mdf=!0,this.shapes[o].shape.paths=this.shapes[o].localShapeCollection,this._mdf&&(this.shapes[o].pathsData.length=0);else if(n===1&&t===0||n===0&&t===1){if(this._mdf)for(o=0;o<b;o+=1)this.shapes[o].pathsData.length=0,this.shapes[o].shape._mdf=!0}else{var R,E,S=[];for(o=0;o<b;o+=1)if((R=this.shapes[o]).shape._mdf||this._mdf||e||this.m===2){if(f=(i=R.shape.paths)._length,g=0,!R.shape._mdf&&R.pathsData.length)g=R.totalShapeLength;else{for(p=this.releasePathsData(R.pathsData),d=0;d<f;d+=1)m=bez.getSegmentsLength(i.shapes[d]),p.push(m),g+=m.totalLength;R.totalShapeLength=g,R.pathsData=p}_+=g,R.shape._mdf=!0}else R.shape.paths=R.localShapeCollection;var C,T=t,A=n,M=0;for(o=b-1;o>=0;o-=1)if((R=this.shapes[o]).shape._mdf){for((E=R.localShapeCollection).releaseShapes(),this.m===2&&b>1?(C=this.calculateShapeEdges(t,n,R.totalShapeLength,M,_),M+=R.totalShapeLength):C=[[T,A]],f=C.length,d=0;d<f;d+=1){T=C[d][0],A=C[d][1],S.length=0,A<=1?S.push({s:R.totalShapeLength*T,e:R.totalShapeLength*A}):T>=1?S.push({s:R.totalShapeLength*(T-1),e:R.totalShapeLength*(A-1)}):(S.push({s:R.totalShapeLength*T,e:R.totalShapeLength}),S.push({s:0,e:R.totalShapeLength*(A-1)}));var I=this.addShapes(R,S[0]);if(S[0].s!==S[0].e){if(S.length>1)if(R.shape.paths.shapes[R.shape.paths._length-1].c){var O=I.pop();this.addPaths(I,E),I=this.addShapes(R,S[1],O)}else this.addPaths(I,E),I=this.addShapes(R,S[1]);this.addPaths(I,E)}}R.shape.paths=E}}},TrimModifier.prototype.addPaths=function(e,t){var n,i=e.length;for(n=0;n<i;n+=1)t.addShape(e[n])},TrimModifier.prototype.addSegment=function(e,t,n,i,o,l,u){o.setXYAt(t[0],t[1],"o",l),o.setXYAt(n[0],n[1],"i",l+1),u&&o.setXYAt(e[0],e[1],"v",l),o.setXYAt(i[0],i[1],"v",l+1)},TrimModifier.prototype.addSegmentFromArray=function(e,t,n,i){t.setXYAt(e[1],e[5],"o",n),t.setXYAt(e[2],e[6],"i",n+1),i&&t.setXYAt(e[0],e[4],"v",n),t.setXYAt(e[3],e[7],"v",n+1)},TrimModifier.prototype.addShapes=function(e,t,n){var i,o,l,u,d,f,p,m,g=e.pathsData,b=e.shape.paths.shapes,_=e.shape.paths._length,R=0,E=[],S=!0;for(n?(d=n._length,m=n._length):(n=shapePool.newElement(),d=0,m=0),E.push(n),i=0;i<_;i+=1){for(f=g[i].lengths,n.c=b[i].c,l=b[i].c?f.length:f.length+1,o=1;o<l;o+=1)if(R+(u=f[o-1]).addedLength<t.s)R+=u.addedLength,n.c=!1;else{if(R>t.e){n.c=!1;break}t.s<=R&&t.e>=R+u.addedLength?(this.addSegment(b[i].v[o-1],b[i].o[o-1],b[i].i[o],b[i].v[o],n,d,S),S=!1):(p=bez.getNewSegment(b[i].v[o-1],b[i].v[o],b[i].o[o-1],b[i].i[o],(t.s-R)/u.addedLength,(t.e-R)/u.addedLength,f[o-1]),this.addSegmentFromArray(p,n,d,S),S=!1,n.c=!1),R+=u.addedLength,d+=1}if(b[i].c&&f.length){if(u=f[o-1],R<=t.e){var C=f[o-1].addedLength;t.s<=R&&t.e>=R+C?(this.addSegment(b[i].v[o-1],b[i].o[o-1],b[i].i[0],b[i].v[0],n,d,S),S=!1):(p=bez.getNewSegment(b[i].v[o-1],b[i].v[0],b[i].o[o-1],b[i].i[0],(t.s-R)/C,(t.e-R)/C,f[o-1]),this.addSegmentFromArray(p,n,d,S),S=!1,n.c=!1)}else n.c=!1;R+=u.addedLength,d+=1}if(n._length&&(n.setXYAt(n.v[m][0],n.v[m][1],"i",m),n.setXYAt(n.v[n._length-1][0],n.v[n._length-1][1],"o",n._length-1)),R>t.e)break;i<_-1&&(n=shapePool.newElement(),S=!0,E.push(n),d=0)}return E},extendPrototype([ShapeModifier],PuckerAndBloatModifier),PuckerAndBloatModifier.prototype.initModifierProperties=function(e,t){this.getValue=this.processKeys,this.amount=PropertyFactory.getProp(e,t.a,0,null,this),this._isAnimated=!!this.amount.effectsSequence.length},PuckerAndBloatModifier.prototype.processPath=function(e,t){var n=t/100,i=[0,0],o=e._length,l=0;for(l=0;l<o;l+=1)i[0]+=e.v[l][0],i[1]+=e.v[l][1];i[0]/=o,i[1]/=o;var u,d,f,p,m,g,b=shapePool.newElement();for(b.c=e.c,l=0;l<o;l+=1)u=e.v[l][0]+(i[0]-e.v[l][0])*n,d=e.v[l][1]+(i[1]-e.v[l][1])*n,f=e.o[l][0]+(i[0]-e.o[l][0])*-n,p=e.o[l][1]+(i[1]-e.o[l][1])*-n,m=e.i[l][0]+(i[0]-e.i[l][0])*-n,g=e.i[l][1]+(i[1]-e.i[l][1])*-n,b.setTripleAt(u,d,f,p,m,g,l);return b},PuckerAndBloatModifier.prototype.processShapes=function(e){var t,n,i,o,l,u,d=this.shapes.length,f=this.amount.v;if(f!==0)for(n=0;n<d;n+=1){if(u=(l=this.shapes[n]).localShapeCollection,l.shape._mdf||this._mdf||e)for(u.releaseShapes(),l.shape._mdf=!0,t=l.shape.paths.shapes,o=l.shape.paths._length,i=0;i<o;i+=1)u.addShape(this.processPath(t[i],f));l.shape.paths=l.localShapeCollection}this.dynamicProperties.length||(this._mdf=!1)};var TransformPropertyFactory=function(){var e=[0,0];function t(n,i,o){if(this.elem=n,this.frameId=-1,this.propType="transform",this.data=i,this.v=new Matrix,this.pre=new Matrix,this.appliedTransformations=0,this.initDynamicPropertyContainer(o||n),i.p&&i.p.s?(this.px=PropertyFactory.getProp(n,i.p.x,0,0,this),this.py=PropertyFactory.getProp(n,i.p.y,0,0,this),i.p.z&&(this.pz=PropertyFactory.getProp(n,i.p.z,0,0,this))):this.p=PropertyFactory.getProp(n,i.p||{k:[0,0,0]},1,0,this),i.rx){if(this.rx=PropertyFactory.getProp(n,i.rx,0,degToRads,this),this.ry=PropertyFactory.getProp(n,i.ry,0,degToRads,this),this.rz=PropertyFactory.getProp(n,i.rz,0,degToRads,this),i.or.k[0].ti){var l,u=i.or.k.length;for(l=0;l<u;l+=1)i.or.k[l].to=null,i.or.k[l].ti=null}this.or=PropertyFactory.getProp(n,i.or,1,degToRads,this),this.or.sh=!0}else this.r=PropertyFactory.getProp(n,i.r||{k:0},0,degToRads,this);i.sk&&(this.sk=PropertyFactory.getProp(n,i.sk,0,degToRads,this),this.sa=PropertyFactory.getProp(n,i.sa,0,degToRads,this)),this.a=PropertyFactory.getProp(n,i.a||{k:[0,0,0]},1,0,this),this.s=PropertyFactory.getProp(n,i.s||{k:[100,100,100]},1,.01,this),i.o?this.o=PropertyFactory.getProp(n,i.o,0,.01,n):this.o={_mdf:!1,v:1},this._isDirty=!0,this.dynamicProperties.length||this.getValue(!0)}return t.prototype={applyToMatrix:function(n){var i=this._mdf;this.iterateDynamicProperties(),this._mdf=this._mdf||i,this.a&&n.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.s&&n.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.sk&&n.skewFromAxis(-this.sk.v,this.sa.v),this.r?n.rotate(-this.r.v):n.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]),this.data.p.s?this.data.p.z?n.translate(this.px.v,this.py.v,-this.pz.v):n.translate(this.px.v,this.py.v,0):n.translate(this.p.v[0],this.p.v[1],-this.p.v[2])},getValue:function(n){if(this.elem.globalData.frameId!==this.frameId){if(this._isDirty&&(this.precalculateMatrix(),this._isDirty=!1),this.iterateDynamicProperties(),this._mdf||n){var i;if(this.v.cloneFromProps(this.pre.props),this.appliedTransformations<1&&this.v.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.appliedTransformations<2&&this.v.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.sk&&this.appliedTransformations<3&&this.v.skewFromAxis(-this.sk.v,this.sa.v),this.r&&this.appliedTransformations<4?this.v.rotate(-this.r.v):!this.r&&this.appliedTransformations<4&&this.v.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]),this.autoOriented){var o,l;if(i=this.elem.globalData.frameRate,this.p&&this.p.keyframes&&this.p.getValueAtTime)this.p._caching.lastFrame+this.p.offsetTime<=this.p.keyframes[0].t?(o=this.p.getValueAtTime((this.p.keyframes[0].t+.01)/i,0),l=this.p.getValueAtTime(this.p.keyframes[0].t/i,0)):this.p._caching.lastFrame+this.p.offsetTime>=this.p.keyframes[this.p.keyframes.length-1].t?(o=this.p.getValueAtTime(this.p.keyframes[this.p.keyframes.length-1].t/i,0),l=this.p.getValueAtTime((this.p.keyframes[this.p.keyframes.length-1].t-.05)/i,0)):(o=this.p.pv,l=this.p.getValueAtTime((this.p._caching.lastFrame+this.p.offsetTime-.01)/i,this.p.offsetTime));else if(this.px&&this.px.keyframes&&this.py.keyframes&&this.px.getValueAtTime&&this.py.getValueAtTime){o=[],l=[];var u=this.px,d=this.py;u._caching.lastFrame+u.offsetTime<=u.keyframes[0].t?(o[0]=u.getValueAtTime((u.keyframes[0].t+.01)/i,0),o[1]=d.getValueAtTime((d.keyframes[0].t+.01)/i,0),l[0]=u.getValueAtTime(u.keyframes[0].t/i,0),l[1]=d.getValueAtTime(d.keyframes[0].t/i,0)):u._caching.lastFrame+u.offsetTime>=u.keyframes[u.keyframes.length-1].t?(o[0]=u.getValueAtTime(u.keyframes[u.keyframes.length-1].t/i,0),o[1]=d.getValueAtTime(d.keyframes[d.keyframes.length-1].t/i,0),l[0]=u.getValueAtTime((u.keyframes[u.keyframes.length-1].t-.01)/i,0),l[1]=d.getValueAtTime((d.keyframes[d.keyframes.length-1].t-.01)/i,0)):(o=[u.pv,d.pv],l[0]=u.getValueAtTime((u._caching.lastFrame+u.offsetTime-.01)/i,u.offsetTime),l[1]=d.getValueAtTime((d._caching.lastFrame+d.offsetTime-.01)/i,d.offsetTime))}else o=l=e;this.v.rotate(-Math.atan2(o[1]-l[1],o[0]-l[0]))}this.data.p&&this.data.p.s?this.data.p.z?this.v.translate(this.px.v,this.py.v,-this.pz.v):this.v.translate(this.px.v,this.py.v,0):this.v.translate(this.p.v[0],this.p.v[1],-this.p.v[2])}this.frameId=this.elem.globalData.frameId}},precalculateMatrix:function(){if(this.appliedTransformations=0,this.pre.reset(),!this.a.effectsSequence.length&&(this.pre.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.appliedTransformations=1,!this.s.effectsSequence.length)){if(this.pre.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.appliedTransformations=2,this.sk){if(this.sk.effectsSequence.length||this.sa.effectsSequence.length)return;this.pre.skewFromAxis(-this.sk.v,this.sa.v),this.appliedTransformations=3}this.r?this.r.effectsSequence.length||(this.pre.rotate(-this.r.v),this.appliedTransformations=4):this.rz.effectsSequence.length||this.ry.effectsSequence.length||this.rx.effectsSequence.length||this.or.effectsSequence.length||(this.pre.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]),this.appliedTransformations=4)}},autoOrient:function(){}},extendPrototype([DynamicPropertyContainer],t),t.prototype.addDynamicProperty=function(n){this._addDynamicProperty(n),this.elem.addDynamicProperty(n),this._isDirty=!0},t.prototype._addDynamicProperty=DynamicPropertyContainer.prototype.addDynamicProperty,{getTransformProperty:function(n,i,o){return new t(n,i,o)}}}();function RepeaterModifier(){}function RoundCornersModifier(){}function floatEqual(e,t){return 1e5*Math.abs(e-t)<=Math.min(Math.abs(e),Math.abs(t))}function floatZero(e){return Math.abs(e)<=1e-5}function lerp(e,t,n){return e*(1-n)+t*n}function lerpPoint(e,t,n){return[lerp(e[0],t[0],n),lerp(e[1],t[1],n)]}function quadRoots(e,t,n){if(e===0)return[];var i=t*t-4*e*n;if(i<0)return[];var o=-t/(2*e);if(i===0)return[o];var l=Math.sqrt(i)/(2*e);return[o-l,o+l]}function polynomialCoefficients(e,t,n,i){return[3*t-e-3*n+i,3*e-6*t+3*n,-3*e+3*t,e]}function singlePoint(e){return new PolynomialBezier(e,e,e,e,!1)}function PolynomialBezier(e,t,n,i,o){o&&pointEqual(e,t)&&(t=lerpPoint(e,i,1/3)),o&&pointEqual(n,i)&&(n=lerpPoint(e,i,2/3));var l=polynomialCoefficients(e[0],t[0],n[0],i[0]),u=polynomialCoefficients(e[1],t[1],n[1],i[1]);this.a=[l[0],u[0]],this.b=[l[1],u[1]],this.c=[l[2],u[2]],this.d=[l[3],u[3]],this.points=[e,t,n,i]}function extrema(e,t){var n=e.points[0][t],i=e.points[e.points.length-1][t];if(n>i){var o=i;i=n,n=o}for(var l=quadRoots(3*e.a[t],2*e.b[t],e.c[t]),u=0;u<l.length;u+=1)if(l[u]>0&&l[u]<1){var d=e.point(l[u])[t];d<n?n=d:d>i&&(i=d)}return{min:n,max:i}}function intersectData(e,t,n){var i=e.boundingBox();return{cx:i.cx,cy:i.cy,width:i.width,height:i.height,bez:e,t:(t+n)/2,t1:t,t2:n}}function splitData(e){var t=e.bez.split(.5);return[intersectData(t[0],e.t1,e.t),intersectData(t[1],e.t,e.t2)]}function boxIntersect(e,t){return 2*Math.abs(e.cx-t.cx)<e.width+t.width&&2*Math.abs(e.cy-t.cy)<e.height+t.height}function intersectsImpl(e,t,n,i,o,l){if(boxIntersect(e,t))if(n>=l||e.width<=i&&e.height<=i&&t.width<=i&&t.height<=i)o.push([e.t,t.t]);else{var u=splitData(e),d=splitData(t);intersectsImpl(u[0],d[0],n+1,i,o,l),intersectsImpl(u[0],d[1],n+1,i,o,l),intersectsImpl(u[1],d[0],n+1,i,o,l),intersectsImpl(u[1],d[1],n+1,i,o,l)}}function crossProduct(e,t){return[e[1]*t[2]-e[2]*t[1],e[2]*t[0]-e[0]*t[2],e[0]*t[1]-e[1]*t[0]]}function lineIntersection(e,t,n,i){var o=[e[0],e[1],1],l=[t[0],t[1],1],u=[n[0],n[1],1],d=[i[0],i[1],1],f=crossProduct(crossProduct(o,l),crossProduct(u,d));return floatZero(f[2])?null:[f[0]/f[2],f[1]/f[2]]}function polarOffset(e,t,n){return[e[0]+Math.cos(t)*n,e[1]-Math.sin(t)*n]}function pointDistance(e,t){return Math.hypot(e[0]-t[0],e[1]-t[1])}function pointEqual(e,t){return floatEqual(e[0],t[0])&&floatEqual(e[1],t[1])}function ZigZagModifier(){}function setPoint(e,t,n,i,o,l,u){var d=n-Math.PI/2,f=n+Math.PI/2,p=t[0]+Math.cos(n)*i*o,m=t[1]-Math.sin(n)*i*o;e.setTripleAt(p,m,p+Math.cos(d)*l,m-Math.sin(d)*l,p+Math.cos(f)*u,m-Math.sin(f)*u,e.length())}function getPerpendicularVector(e,t){var n=[t[0]-e[0],t[1]-e[1]],i=.5*-Math.PI;return[Math.cos(i)*n[0]-Math.sin(i)*n[1],Math.sin(i)*n[0]+Math.cos(i)*n[1]]}function getProjectingAngle(e,t){var n=t===0?e.length()-1:t-1,i=(t+1)%e.length(),o=getPerpendicularVector(e.v[n],e.v[i]);return Math.atan2(0,1)-Math.atan2(o[1],o[0])}function zigZagCorner(e,t,n,i,o,l,u){var d=getProjectingAngle(t,n),f=t.v[n%t._length],p=t.v[n===0?t._length-1:n-1],m=t.v[(n+1)%t._length],g=l===2?Math.sqrt(Math.pow(f[0]-p[0],2)+Math.pow(f[1]-p[1],2)):0,b=l===2?Math.sqrt(Math.pow(f[0]-m[0],2)+Math.pow(f[1]-m[1],2)):0;setPoint(e,t.v[n%t._length],d,u,i,b/(2*(o+1)),g/(2*(o+1)))}function zigZagSegment(e,t,n,i,o,l){for(var u=0;u<i;u+=1){var d=(u+1)/(i+1),f=o===2?Math.sqrt(Math.pow(t.points[3][0]-t.points[0][0],2)+Math.pow(t.points[3][1]-t.points[0][1],2)):0,p=t.normalAngle(d);setPoint(e,t.point(d),p,l,n,f/(2*(i+1)),f/(2*(i+1))),l=-l}return l}function linearOffset(e,t,n){var i=Math.atan2(t[0]-e[0],t[1]-e[1]);return[polarOffset(e,i,n),polarOffset(t,i,n)]}function offsetSegment(e,t){var n,i,o,l,u,d,f;n=(f=linearOffset(e.points[0],e.points[1],t))[0],i=f[1],o=(f=linearOffset(e.points[1],e.points[2],t))[0],l=f[1],u=(f=linearOffset(e.points[2],e.points[3],t))[0],d=f[1];var p=lineIntersection(n,i,o,l);p===null&&(p=i);var m=lineIntersection(u,d,o,l);return m===null&&(m=u),new PolynomialBezier(n,p,m,d)}function joinLines(e,t,n,i,o){var l=t.points[3],u=n.points[0];if(i===3||pointEqual(l,u))return l;if(i===2){var d=-t.tangentAngle(1),f=-n.tangentAngle(0)+Math.PI,p=lineIntersection(l,polarOffset(l,d+Math.PI/2,100),u,polarOffset(u,d+Math.PI/2,100)),m=p?pointDistance(p,l):pointDistance(l,u)/2,g=polarOffset(l,d,2*m*roundCorner);return e.setXYAt(g[0],g[1],"o",e.length()-1),g=polarOffset(u,f,2*m*roundCorner),e.setTripleAt(u[0],u[1],u[0],u[1],g[0],g[1],e.length()),u}var b=lineIntersection(pointEqual(l,t.points[2])?t.points[0]:t.points[2],l,u,pointEqual(u,n.points[1])?n.points[3]:n.points[1]);return b&&pointDistance(b,l)<o?(e.setTripleAt(b[0],b[1],b[0],b[1],b[0],b[1],e.length()),b):l}function getIntersection(e,t){var n=e.intersections(t);return n.length&&floatEqual(n[0][0],1)&&n.shift(),n.length?n[0]:null}function pruneSegmentIntersection(e,t){var n=e.slice(),i=t.slice(),o=getIntersection(e[e.length-1],t[0]);return o&&(n[e.length-1]=e[e.length-1].split(o[0])[0],i[0]=t[0].split(o[1])[1]),e.length>1&&t.length>1&&(o=getIntersection(e[0],t[t.length-1]))?[[e[0].split(o[0])[0]],[t[t.length-1].split(o[1])[1]]]:[n,i]}function pruneIntersections(e){for(var t,n=1;n<e.length;n+=1)t=pruneSegmentIntersection(e[n-1],e[n]),e[n-1]=t[0],e[n]=t[1];return e.length>1&&(t=pruneSegmentIntersection(e[e.length-1],e[0]),e[e.length-1]=t[0],e[0]=t[1]),e}function offsetSegmentSplit(e,t){var n,i,o,l,u=e.inflectionPoints();if(u.length===0)return[offsetSegment(e,t)];if(u.length===1||floatEqual(u[1],1))return n=(o=e.split(u[0]))[0],i=o[1],[offsetSegment(n,t),offsetSegment(i,t)];n=(o=e.split(u[0]))[0];var d=(u[1]-u[0])/(1-u[0]);return l=(o=o[1].split(d))[0],i=o[1],[offsetSegment(n,t),offsetSegment(l,t),offsetSegment(i,t)]}function OffsetPathModifier(){}function getFontProperties(e){for(var t=e.fStyle?e.fStyle.split(" "):[],n="normal",i="normal",o=t.length,l=0;l<o;l+=1)switch(t[l].toLowerCase()){case"italic":i="italic";break;case"bold":n="700";break;case"black":n="900";break;case"medium":n="500";break;case"regular":case"normal":n="400";break;case"light":case"thin":n="200"}return{style:i,weight:e.fWeight||n}}extendPrototype([ShapeModifier],RepeaterModifier),RepeaterModifier.prototype.initModifierProperties=function(e,t){this.getValue=this.processKeys,this.c=PropertyFactory.getProp(e,t.c,0,null,this),this.o=PropertyFactory.getProp(e,t.o,0,null,this),this.tr=TransformPropertyFactory.getTransformProperty(e,t.tr,this),this.so=PropertyFactory.getProp(e,t.tr.so,0,.01,this),this.eo=PropertyFactory.getProp(e,t.tr.eo,0,.01,this),this.data=t,this.dynamicProperties.length||this.getValue(!0),this._isAnimated=!!this.dynamicProperties.length,this.pMatrix=new Matrix,this.rMatrix=new Matrix,this.sMatrix=new Matrix,this.tMatrix=new Matrix,this.matrix=new Matrix},RepeaterModifier.prototype.applyTransforms=function(e,t,n,i,o,l){var u=l?-1:1,d=i.s.v[0]+(1-i.s.v[0])*(1-o),f=i.s.v[1]+(1-i.s.v[1])*(1-o);e.translate(i.p.v[0]*u*o,i.p.v[1]*u*o,i.p.v[2]),t.translate(-i.a.v[0],-i.a.v[1],i.a.v[2]),t.rotate(-i.r.v*u*o),t.translate(i.a.v[0],i.a.v[1],i.a.v[2]),n.translate(-i.a.v[0],-i.a.v[1],i.a.v[2]),n.scale(l?1/d:d,l?1/f:f),n.translate(i.a.v[0],i.a.v[1],i.a.v[2])},RepeaterModifier.prototype.init=function(e,t,n,i){for(this.elem=e,this.arr=t,this.pos=n,this.elemsData=i,this._currentCopies=0,this._elements=[],this._groups=[],this.frameId=-1,this.initDynamicPropertyContainer(e),this.initModifierProperties(e,t[n]);n>0;)n-=1,this._elements.unshift(t[n]);this.dynamicProperties.length?this.k=!0:this.getValue(!0)},RepeaterModifier.prototype.resetElements=function(e){var t,n=e.length;for(t=0;t<n;t+=1)e[t]._processed=!1,e[t].ty==="gr"&&this.resetElements(e[t].it)},RepeaterModifier.prototype.cloneElements=function(e){var t=JSON.parse(JSON.stringify(e));return this.resetElements(t),t},RepeaterModifier.prototype.changeGroupRender=function(e,t){var n,i=e.length;for(n=0;n<i;n+=1)e[n]._render=t,e[n].ty==="gr"&&this.changeGroupRender(e[n].it,t)},RepeaterModifier.prototype.processShapes=function(e){var t,n,i,o,l,u=!1;if(this._mdf||e){var d,f=Math.ceil(this.c.v);if(this._groups.length<f){for(;this._groups.length<f;){var p={it:this.cloneElements(this._elements),ty:"gr"};p.it.push({a:{a:0,ix:1,k:[0,0]},nm:"Transform",o:{a:0,ix:7,k:100},p:{a:0,ix:2,k:[0,0]},r:{a:1,ix:6,k:[{s:0,e:0,t:0},{s:0,e:0,t:1}]},s:{a:0,ix:3,k:[100,100]},sa:{a:0,ix:5,k:0},sk:{a:0,ix:4,k:0},ty:"tr"}),this.arr.splice(0,0,p),this._groups.splice(0,0,p),this._currentCopies+=1}this.elem.reloadShapes(),u=!0}for(l=0,i=0;i<=this._groups.length-1;i+=1){if(d=l<f,this._groups[i]._render=d,this.changeGroupRender(this._groups[i].it,d),!d){var m=this.elemsData[i].it,g=m[m.length-1];g.transform.op.v!==0?(g.transform.op._mdf=!0,g.transform.op.v=0):g.transform.op._mdf=!1}l+=1}this._currentCopies=f;var b=this.o.v,_=b%1,R=b>0?Math.floor(b):Math.ceil(b),E=this.pMatrix.props,S=this.rMatrix.props,C=this.sMatrix.props;this.pMatrix.reset(),this.rMatrix.reset(),this.sMatrix.reset(),this.tMatrix.reset(),this.matrix.reset();var T,A,M=0;if(b>0){for(;M<R;)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!1),M+=1;_&&(this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,_,!1),M+=_)}else if(b<0){for(;M>R;)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!0),M-=1;_&&(this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,-_,!0),M-=_)}for(i=this.data.m===1?0:this._currentCopies-1,o=this.data.m===1?1:-1,l=this._currentCopies;l;){if(A=(n=(t=this.elemsData[i].it)[t.length-1].transform.mProps.v.props).length,t[t.length-1].transform.mProps._mdf=!0,t[t.length-1].transform.op._mdf=!0,t[t.length-1].transform.op.v=this._currentCopies===1?this.so.v:this.so.v+(this.eo.v-this.so.v)*(i/(this._currentCopies-1)),M!==0){for((i!==0&&o===1||i!==this._currentCopies-1&&o===-1)&&this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!1),this.matrix.transform(S[0],S[1],S[2],S[3],S[4],S[5],S[6],S[7],S[8],S[9],S[10],S[11],S[12],S[13],S[14],S[15]),this.matrix.transform(C[0],C[1],C[2],C[3],C[4],C[5],C[6],C[7],C[8],C[9],C[10],C[11],C[12],C[13],C[14],C[15]),this.matrix.transform(E[0],E[1],E[2],E[3],E[4],E[5],E[6],E[7],E[8],E[9],E[10],E[11],E[12],E[13],E[14],E[15]),T=0;T<A;T+=1)n[T]=this.matrix.props[T];this.matrix.reset()}else for(this.matrix.reset(),T=0;T<A;T+=1)n[T]=this.matrix.props[T];M+=1,l-=1,i+=o}}else for(l=this._currentCopies,i=0,o=1;l;)n=(t=this.elemsData[i].it)[t.length-1].transform.mProps.v.props,t[t.length-1].transform.mProps._mdf=!1,t[t.length-1].transform.op._mdf=!1,l-=1,i+=o;return u},RepeaterModifier.prototype.addShape=function(){},extendPrototype([ShapeModifier],RoundCornersModifier),RoundCornersModifier.prototype.initModifierProperties=function(e,t){this.getValue=this.processKeys,this.rd=PropertyFactory.getProp(e,t.r,0,null,this),this._isAnimated=!!this.rd.effectsSequence.length},RoundCornersModifier.prototype.processPath=function(e,t){var n,i=shapePool.newElement();i.c=e.c;var o,l,u,d,f,p,m,g,b,_,R,E,S=e._length,C=0;for(n=0;n<S;n+=1)o=e.v[n],u=e.o[n],l=e.i[n],o[0]===u[0]&&o[1]===u[1]&&o[0]===l[0]&&o[1]===l[1]?n!==0&&n!==S-1||e.c?(d=n===0?e.v[S-1]:e.v[n-1],p=(f=Math.sqrt(Math.pow(o[0]-d[0],2)+Math.pow(o[1]-d[1],2)))?Math.min(f/2,t)/f:0,m=R=o[0]+(d[0]-o[0])*p,g=E=o[1]-(o[1]-d[1])*p,b=m-(m-o[0])*roundCorner,_=g-(g-o[1])*roundCorner,i.setTripleAt(m,g,b,_,R,E,C),C+=1,d=n===S-1?e.v[0]:e.v[n+1],p=(f=Math.sqrt(Math.pow(o[0]-d[0],2)+Math.pow(o[1]-d[1],2)))?Math.min(f/2,t)/f:0,m=b=o[0]+(d[0]-o[0])*p,g=_=o[1]+(d[1]-o[1])*p,R=m-(m-o[0])*roundCorner,E=g-(g-o[1])*roundCorner,i.setTripleAt(m,g,b,_,R,E,C),C+=1):(i.setTripleAt(o[0],o[1],u[0],u[1],l[0],l[1],C),C+=1):(i.setTripleAt(e.v[n][0],e.v[n][1],e.o[n][0],e.o[n][1],e.i[n][0],e.i[n][1],C),C+=1);return i},RoundCornersModifier.prototype.processShapes=function(e){var t,n,i,o,l,u,d=this.shapes.length,f=this.rd.v;if(f!==0)for(n=0;n<d;n+=1){if(u=(l=this.shapes[n]).localShapeCollection,l.shape._mdf||this._mdf||e)for(u.releaseShapes(),l.shape._mdf=!0,t=l.shape.paths.shapes,o=l.shape.paths._length,i=0;i<o;i+=1)u.addShape(this.processPath(t[i],f));l.shape.paths=l.localShapeCollection}this.dynamicProperties.length||(this._mdf=!1)},PolynomialBezier.prototype.point=function(e){return[((this.a[0]*e+this.b[0])*e+this.c[0])*e+this.d[0],((this.a[1]*e+this.b[1])*e+this.c[1])*e+this.d[1]]},PolynomialBezier.prototype.derivative=function(e){return[(3*e*this.a[0]+2*this.b[0])*e+this.c[0],(3*e*this.a[1]+2*this.b[1])*e+this.c[1]]},PolynomialBezier.prototype.tangentAngle=function(e){var t=this.derivative(e);return Math.atan2(t[1],t[0])},PolynomialBezier.prototype.normalAngle=function(e){var t=this.derivative(e);return Math.atan2(t[0],t[1])},PolynomialBezier.prototype.inflectionPoints=function(){var e=this.a[1]*this.b[0]-this.a[0]*this.b[1];if(floatZero(e))return[];var t=-.5*(this.a[1]*this.c[0]-this.a[0]*this.c[1])/e,n=t*t-1/3*(this.b[1]*this.c[0]-this.b[0]*this.c[1])/e;if(n<0)return[];var i=Math.sqrt(n);return floatZero(i)?i>0&&i<1?[t]:[]:[t-i,t+i].filter(function(o){return o>0&&o<1})},PolynomialBezier.prototype.split=function(e){if(e<=0)return[singlePoint(this.points[0]),this];if(e>=1)return[this,singlePoint(this.points[this.points.length-1])];var t=lerpPoint(this.points[0],this.points[1],e),n=lerpPoint(this.points[1],this.points[2],e),i=lerpPoint(this.points[2],this.points[3],e),o=lerpPoint(t,n,e),l=lerpPoint(n,i,e),u=lerpPoint(o,l,e);return[new PolynomialBezier(this.points[0],t,o,u,!0),new PolynomialBezier(u,l,i,this.points[3],!0)]},PolynomialBezier.prototype.bounds=function(){return{x:extrema(this,0),y:extrema(this,1)}},PolynomialBezier.prototype.boundingBox=function(){var e=this.bounds();return{left:e.x.min,right:e.x.max,top:e.y.min,bottom:e.y.max,width:e.x.max-e.x.min,height:e.y.max-e.y.min,cx:(e.x.max+e.x.min)/2,cy:(e.y.max+e.y.min)/2}},PolynomialBezier.prototype.intersections=function(e,t,n){t===void 0&&(t=2),n===void 0&&(n=7);var i=[];return intersectsImpl(intersectData(this,0,1),intersectData(e,0,1),0,t,i,n),i},PolynomialBezier.shapeSegment=function(e,t){var n=(t+1)%e.length();return new PolynomialBezier(e.v[t],e.o[t],e.i[n],e.v[n],!0)},PolynomialBezier.shapeSegmentInverted=function(e,t){var n=(t+1)%e.length();return new PolynomialBezier(e.v[n],e.i[n],e.o[t],e.v[t],!0)},extendPrototype([ShapeModifier],ZigZagModifier),ZigZagModifier.prototype.initModifierProperties=function(e,t){this.getValue=this.processKeys,this.amplitude=PropertyFactory.getProp(e,t.s,0,null,this),this.frequency=PropertyFactory.getProp(e,t.r,0,null,this),this.pointsType=PropertyFactory.getProp(e,t.pt,0,null,this),this._isAnimated=this.amplitude.effectsSequence.length!==0||this.frequency.effectsSequence.length!==0||this.pointsType.effectsSequence.length!==0},ZigZagModifier.prototype.processPath=function(e,t,n,i){var o=e._length,l=shapePool.newElement();if(l.c=e.c,e.c||(o-=1),o===0)return l;var u=-1,d=PolynomialBezier.shapeSegment(e,0);zigZagCorner(l,e,0,t,n,i,u);for(var f=0;f<o;f+=1)u=zigZagSegment(l,d,t,n,i,-u),d=f!==o-1||e.c?PolynomialBezier.shapeSegment(e,(f+1)%o):null,zigZagCorner(l,e,f+1,t,n,i,u);return l},ZigZagModifier.prototype.processShapes=function(e){var t,n,i,o,l,u,d=this.shapes.length,f=this.amplitude.v,p=Math.max(0,Math.round(this.frequency.v)),m=this.pointsType.v;if(f!==0)for(n=0;n<d;n+=1){if(u=(l=this.shapes[n]).localShapeCollection,l.shape._mdf||this._mdf||e)for(u.releaseShapes(),l.shape._mdf=!0,t=l.shape.paths.shapes,o=l.shape.paths._length,i=0;i<o;i+=1)u.addShape(this.processPath(t[i],f,p,m));l.shape.paths=l.localShapeCollection}this.dynamicProperties.length||(this._mdf=!1)},extendPrototype([ShapeModifier],OffsetPathModifier),OffsetPathModifier.prototype.initModifierProperties=function(e,t){this.getValue=this.processKeys,this.amount=PropertyFactory.getProp(e,t.a,0,null,this),this.miterLimit=PropertyFactory.getProp(e,t.ml,0,null,this),this.lineJoin=t.lj,this._isAnimated=this.amount.effectsSequence.length!==0},OffsetPathModifier.prototype.processPath=function(e,t,n,i){var o=shapePool.newElement();o.c=e.c;var l,u,d,f=e.length();e.c||(f-=1);var p=[];for(l=0;l<f;l+=1)d=PolynomialBezier.shapeSegment(e,l),p.push(offsetSegmentSplit(d,t));if(!e.c)for(l=f-1;l>=0;l-=1)d=PolynomialBezier.shapeSegmentInverted(e,l),p.push(offsetSegmentSplit(d,t));p=pruneIntersections(p);var m=null,g=null;for(l=0;l<p.length;l+=1){var b=p[l];for(g&&(m=joinLines(o,g,b[0],n,i)),g=b[b.length-1],u=0;u<b.length;u+=1)d=b[u],m&&pointEqual(d.points[0],m)?o.setXYAt(d.points[1][0],d.points[1][1],"o",o.length()-1):o.setTripleAt(d.points[0][0],d.points[0][1],d.points[1][0],d.points[1][1],d.points[0][0],d.points[0][1],o.length()),o.setTripleAt(d.points[3][0],d.points[3][1],d.points[3][0],d.points[3][1],d.points[2][0],d.points[2][1],o.length()),m=d.points[3]}return p.length&&joinLines(o,g,p[0][0],n,i),o},OffsetPathModifier.prototype.processShapes=function(e){var t,n,i,o,l,u,d=this.shapes.length,f=this.amount.v,p=this.miterLimit.v,m=this.lineJoin;if(f!==0)for(n=0;n<d;n+=1){if(u=(l=this.shapes[n]).localShapeCollection,l.shape._mdf||this._mdf||e)for(u.releaseShapes(),l.shape._mdf=!0,t=l.shape.paths.shapes,o=l.shape.paths._length,i=0;i<o;i+=1)u.addShape(this.processPath(t[i],f,m,p));l.shape.paths=l.localShapeCollection}this.dynamicProperties.length||(this._mdf=!1)};var FontManager=function(){var e={w:0,size:0,shapes:[],data:{shapes:[]}},t=[];t=t.concat([2304,2305,2306,2307,2362,2363,2364,2364,2366,2367,2368,2369,2370,2371,2372,2373,2374,2375,2376,2377,2378,2379,2380,2381,2382,2383,2387,2388,2389,2390,2391,2402,2403]);var n=["d83cdffb","d83cdffc","d83cdffd","d83cdffe","d83cdfff"];function i(f,p){var m=createTag("span");m.setAttribute("aria-hidden",!0),m.style.fontFamily=p;var g=createTag("span");g.innerText="giItT1WQy@!-/#",m.style.position="absolute",m.style.left="-10000px",m.style.top="-10000px",m.style.fontSize="300px",m.style.fontVariant="normal",m.style.fontStyle="normal",m.style.fontWeight="normal",m.style.letterSpacing="0",m.appendChild(g),document.body.appendChild(m);var b=g.offsetWidth;return g.style.fontFamily=function(_){var R,E=_.split(","),S=E.length,C=[];for(R=0;R<S;R+=1)E[R]!=="sans-serif"&&E[R]!=="monospace"&&C.push(E[R]);return C.join(",")}(f)+", "+p,{node:g,w:b,parent:m}}function o(f,p){var m,g=document.body&&p?"svg":"canvas",b=getFontProperties(f);if(g==="svg"){var _=createNS("text");_.style.fontSize="100px",_.setAttribute("font-family",f.fFamily),_.setAttribute("font-style",b.style),_.setAttribute("font-weight",b.weight),_.textContent="1",f.fClass?(_.style.fontFamily="inherit",_.setAttribute("class",f.fClass)):_.style.fontFamily=f.fFamily,p.appendChild(_),m=_}else{var R=new OffscreenCanvas(500,500).getContext("2d");R.font=b.style+" "+b.weight+" 100px "+f.fFamily,m=R}return{measureText:function(E){return g==="svg"?(m.textContent=E,m.getComputedTextLength()):m.measureText(E).width}}}function l(f){var p=0,m=f.charCodeAt(0);if(m>=55296&&m<=56319){var g=f.charCodeAt(1);g>=56320&&g<=57343&&(p=1024*(m-55296)+g-56320+65536)}return p}function u(f){var p=l(f);return p>=127462&&p<=127487}var d=function(){this.fonts=[],this.chars=null,this.typekitLoaded=0,this.isLoaded=!1,this._warned=!1,this.initTime=Date.now(),this.setIsLoadedBinded=this.setIsLoaded.bind(this),this.checkLoadedFontsBinded=this.checkLoadedFonts.bind(this)};return d.isModifier=function(f,p){var m=f.toString(16)+p.toString(16);return n.indexOf(m)!==-1},d.isZeroWidthJoiner=function(f){return f===8205},d.isFlagEmoji=function(f){return u(f.substr(0,2))&&u(f.substr(2,2))},d.isRegionalCode=u,d.isCombinedCharacter=function(f){return t.indexOf(f)!==-1},d.isRegionalFlag=function(f,p){var m=l(f.substr(p,2));if(m!==127988)return!1;var g=0;for(p+=2;g<5;){if((m=l(f.substr(p,2)))<917601||m>917626)return!1;g+=1,p+=2}return l(f.substr(p,2))===917631},d.isVariationSelector=function(f){return f===65039},d.BLACK_FLAG_CODE_POINT=127988,d.prototype={addChars:function(f){if(f){var p;this.chars||(this.chars=[]);var m,g,b=f.length,_=this.chars.length;for(p=0;p<b;p+=1){for(m=0,g=!1;m<_;)this.chars[m].style===f[p].style&&this.chars[m].fFamily===f[p].fFamily&&this.chars[m].ch===f[p].ch&&(g=!0),m+=1;g||(this.chars.push(f[p]),_+=1)}}},addFonts:function(f,p){if(f){if(this.chars)return this.isLoaded=!0,void(this.fonts=f.list);if(!document.body)return this.isLoaded=!0,f.list.forEach(function(M){M.helper=o(M),M.cache={}}),void(this.fonts=f.list);var m,g=f.list,b=g.length,_=b;for(m=0;m<b;m+=1){var R,E,S=!0;if(g[m].loaded=!1,g[m].monoCase=i(g[m].fFamily,"monospace"),g[m].sansCase=i(g[m].fFamily,"sans-serif"),g[m].fPath){if(g[m].fOrigin==="p"||g[m].origin===3){if((R=document.querySelectorAll('style[f-forigin="p"][f-family="'+g[m].fFamily+'"], style[f-origin="3"][f-family="'+g[m].fFamily+'"]')).length>0&&(S=!1),S){var C=createTag("style");C.setAttribute("f-forigin",g[m].fOrigin),C.setAttribute("f-origin",g[m].origin),C.setAttribute("f-family",g[m].fFamily),C.type="text/css",C.innerText="@font-face {font-family: "+g[m].fFamily+"; font-style: normal; src: url('"+g[m].fPath+"');}",p.appendChild(C)}}else if(g[m].fOrigin==="g"||g[m].origin===1){for(R=document.querySelectorAll('link[f-forigin="g"], link[f-origin="1"]'),E=0;E<R.length;E+=1)R[E].href.indexOf(g[m].fPath)!==-1&&(S=!1);if(S){var T=createTag("link");T.setAttribute("f-forigin",g[m].fOrigin),T.setAttribute("f-origin",g[m].origin),T.type="text/css",T.rel="stylesheet",T.href=g[m].fPath,document.body.appendChild(T)}}else if(g[m].fOrigin==="t"||g[m].origin===2){for(R=document.querySelectorAll('script[f-forigin="t"], script[f-origin="2"]'),E=0;E<R.length;E+=1)g[m].fPath===R[E].src&&(S=!1);if(S){var A=createTag("link");A.setAttribute("f-forigin",g[m].fOrigin),A.setAttribute("f-origin",g[m].origin),A.setAttribute("rel","stylesheet"),A.setAttribute("href",g[m].fPath),p.appendChild(A)}}}else g[m].loaded=!0,_-=1;g[m].helper=o(g[m],p),g[m].cache={},this.fonts.push(g[m])}_===0?this.isLoaded=!0:setTimeout(this.checkLoadedFonts.bind(this),100)}else this.isLoaded=!0},getCharData:function(f,p,m){for(var g=0,b=this.chars.length;g<b;){if(this.chars[g].ch===f&&this.chars[g].style===p&&this.chars[g].fFamily===m)return this.chars[g];g+=1}return(typeof f=="string"&&f.charCodeAt(0)!==13||!f)&&console&&console.warn&&!this._warned&&(this._warned=!0),e},getFontByName:function(f){for(var p=0,m=this.fonts.length;p<m;){if(this.fonts[p].fName===f)return this.fonts[p];p+=1}return this.fonts[0]},measureText:function(f,p,m){var g=this.getFontByName(p),b=f;if(!g.cache[b]){var _=g.helper;if(f===" "){var R=_.measureText("|"+f+"|"),E=_.measureText("||");g.cache[b]=(R-E)/100}else g.cache[b]=_.measureText(f)/100}return g.cache[b]*m},checkLoadedFonts:function(){var f,p,m,g=this.fonts.length,b=g;for(f=0;f<g;f+=1)this.fonts[f].loaded?b-=1:this.fonts[f].fOrigin==="n"||this.fonts[f].origin===0?this.fonts[f].loaded=!0:(p=this.fonts[f].monoCase.node,m=this.fonts[f].monoCase.w,p.offsetWidth!==m?(b-=1,this.fonts[f].loaded=!0):(p=this.fonts[f].sansCase.node,m=this.fonts[f].sansCase.w,p.offsetWidth!==m&&(b-=1,this.fonts[f].loaded=!0)),this.fonts[f].loaded&&(this.fonts[f].sansCase.parent.parentNode.removeChild(this.fonts[f].sansCase.parent),this.fonts[f].monoCase.parent.parentNode.removeChild(this.fonts[f].monoCase.parent)));b!==0&&Date.now()-this.initTime<5e3?setTimeout(this.checkLoadedFontsBinded,20):setTimeout(this.setIsLoadedBinded,10)},setIsLoaded:function(){this.isLoaded=!0}},d}();function SlotManager(e){this.animationData=e}function slotFactory(e){return new SlotManager(e)}function RenderableElement(){}SlotManager.prototype.getProp=function(e){return this.animationData.slots&&this.animationData.slots[e.sid]?Object.assign(e,this.animationData.slots[e.sid].p):e},RenderableElement.prototype={initRenderable:function(){this.isInRange=!1,this.hidden=!1,this.isTransparent=!1,this.renderableComponents=[]},addRenderableComponent:function(e){this.renderableComponents.indexOf(e)===-1&&this.renderableComponents.push(e)},removeRenderableComponent:function(e){this.renderableComponents.indexOf(e)!==-1&&this.renderableComponents.splice(this.renderableComponents.indexOf(e),1)},prepareRenderableFrame:function(e){this.checkLayerLimits(e)},checkTransparency:function(){this.finalTransform.mProp.o.v<=0?!this.isTransparent&&this.globalData.renderConfig.hideOnTransparent&&(this.isTransparent=!0,this.hide()):this.isTransparent&&(this.isTransparent=!1,this.show())},checkLayerLimits:function(e){this.data.ip-this.data.st<=e&&this.data.op-this.data.st>e?this.isInRange!==!0&&(this.globalData._mdf=!0,this._mdf=!0,this.isInRange=!0,this.show()):this.isInRange!==!1&&(this.globalData._mdf=!0,this.isInRange=!1,this.hide())},renderRenderable:function(){var e,t=this.renderableComponents.length;for(e=0;e<t;e+=1)this.renderableComponents[e].renderFrame(this._isFirstFrame)},sourceRectAtTime:function(){return{top:0,left:0,width:100,height:100}},getLayerSize:function(){return this.data.ty===5?{w:this.data.textData.width,h:this.data.textData.height}:{w:this.data.width,h:this.data.height}}};var getBlendMode=(blendModeEnums={0:"source-over",1:"multiply",2:"screen",3:"overlay",4:"darken",5:"lighten",6:"color-dodge",7:"color-burn",8:"hard-light",9:"soft-light",10:"difference",11:"exclusion",12:"hue",13:"saturation",14:"color",15:"luminosity"},function(e){return blendModeEnums[e]||""}),blendModeEnums;function SliderEffect(e,t,n){this.p=PropertyFactory.getProp(t,e.v,0,0,n)}function AngleEffect(e,t,n){this.p=PropertyFactory.getProp(t,e.v,0,0,n)}function ColorEffect(e,t,n){this.p=PropertyFactory.getProp(t,e.v,1,0,n)}function PointEffect(e,t,n){this.p=PropertyFactory.getProp(t,e.v,1,0,n)}function LayerIndexEffect(e,t,n){this.p=PropertyFactory.getProp(t,e.v,0,0,n)}function MaskIndexEffect(e,t,n){this.p=PropertyFactory.getProp(t,e.v,0,0,n)}function CheckboxEffect(e,t,n){this.p=PropertyFactory.getProp(t,e.v,0,0,n)}function NoValueEffect(){this.p={}}function EffectsManager(e,t){var n,i=e.ef||[];this.effectElements=[];var o,l=i.length;for(n=0;n<l;n+=1)o=new GroupEffect(i[n],t),this.effectElements.push(o)}function GroupEffect(e,t){this.init(e,t)}function BaseElement(){}function FrameElement(){}function FootageElement(e,t,n){this.initFrame(),this.initRenderable(),this.assetData=t.getAssetData(e.refId),this.footageData=t.imageLoader.getAsset(this.assetData),this.initBaseData(e,t,n)}function AudioElement(e,t,n){this.initFrame(),this.initRenderable(),this.assetData=t.getAssetData(e.refId),this.initBaseData(e,t,n),this._isPlaying=!1,this._canPlay=!1;var i=this.globalData.getAssetsPath(this.assetData);this.audio=this.globalData.audioController.createAudio(i),this._currentTime=0,this.globalData.audioController.addAudio(this),this._volumeMultiplier=1,this._volume=1,this._previousVolume=null,this.tm=e.tm?PropertyFactory.getProp(this,e.tm,0,t.frameRate,this):{_placeholder:!0},this.lv=PropertyFactory.getProp(this,e.au&&e.au.lv?e.au.lv:{k:[100]},1,.01,this)}function BaseRenderer(){}extendPrototype([DynamicPropertyContainer],GroupEffect),GroupEffect.prototype.getValue=GroupEffect.prototype.iterateDynamicProperties,GroupEffect.prototype.init=function(e,t){var n;this.data=e,this.effectElements=[],this.initDynamicPropertyContainer(t);var i,o=this.data.ef.length,l=this.data.ef;for(n=0;n<o;n+=1){switch(i=null,l[n].ty){case 0:i=new SliderEffect(l[n],t,this);break;case 1:i=new AngleEffect(l[n],t,this);break;case 2:i=new ColorEffect(l[n],t,this);break;case 3:i=new PointEffect(l[n],t,this);break;case 4:case 7:i=new CheckboxEffect(l[n],t,this);break;case 10:i=new LayerIndexEffect(l[n],t,this);break;case 11:i=new MaskIndexEffect(l[n],t,this);break;case 5:i=new EffectsManager(l[n],t);break;default:i=new NoValueEffect(l[n])}i&&this.effectElements.push(i)}},BaseElement.prototype={checkMasks:function(){if(!this.data.hasMask)return!1;for(var e=0,t=this.data.masksProperties.length;e<t;){if(this.data.masksProperties[e].mode!=="n"&&this.data.masksProperties[e].cl!==!1)return!0;e+=1}return!1},initExpressions:function(){var e=getExpressionInterfaces();if(e){var t=e("layer"),n=e("effects"),i=e("shape"),o=e("text"),l=e("comp");this.layerInterface=t(this),this.data.hasMask&&this.maskManager&&this.layerInterface.registerMaskInterface(this.maskManager);var u=n.createEffectsInterface(this,this.layerInterface);this.layerInterface.registerEffectsInterface(u),this.data.ty===0||this.data.xt?this.compInterface=l(this):this.data.ty===4?(this.layerInterface.shapeInterface=i(this.shapesData,this.itemsData,this.layerInterface),this.layerInterface.content=this.layerInterface.shapeInterface):this.data.ty===5&&(this.layerInterface.textInterface=o(this),this.layerInterface.text=this.layerInterface.textInterface)}},setBlendMode:function(){var e=getBlendMode(this.data.bm);(this.baseElement||this.layerElement).style["mix-blend-mode"]=e},initBaseData:function(e,t,n){this.globalData=t,this.comp=n,this.data=e,this.layerId=createElementID(),this.data.sr||(this.data.sr=1),this.effectsManager=new EffectsManager(this.data,this,this.dynamicProperties)},getType:function(){return this.type},sourceRectAtTime:function(){}},FrameElement.prototype={initFrame:function(){this._isFirstFrame=!1,this.dynamicProperties=[],this._mdf=!1},prepareProperties:function(e,t){var n,i=this.dynamicProperties.length;for(n=0;n<i;n+=1)(t||this._isParent&&this.dynamicProperties[n].propType==="transform")&&(this.dynamicProperties[n].getValue(),this.dynamicProperties[n]._mdf&&(this.globalData._mdf=!0,this._mdf=!0))},addDynamicProperty:function(e){this.dynamicProperties.indexOf(e)===-1&&this.dynamicProperties.push(e)}},FootageElement.prototype.prepareFrame=function(){},extendPrototype([RenderableElement,BaseElement,FrameElement],FootageElement),FootageElement.prototype.getBaseElement=function(){return null},FootageElement.prototype.renderFrame=function(){},FootageElement.prototype.destroy=function(){},FootageElement.prototype.initExpressions=function(){var e=getExpressionInterfaces();if(e){var t=e("footage");this.layerInterface=t(this)}},FootageElement.prototype.getFootageData=function(){return this.footageData},AudioElement.prototype.prepareFrame=function(e){if(this.prepareRenderableFrame(e,!0),this.prepareProperties(e,!0),this.tm._placeholder)this._currentTime=e/this.data.sr;else{var t=this.tm.v;this._currentTime=t}this._volume=this.lv.v[0];var n=this._volume*this._volumeMultiplier;this._previousVolume!==n&&(this._previousVolume=n,this.audio.volume(n))},extendPrototype([RenderableElement,BaseElement,FrameElement],AudioElement),AudioElement.prototype.renderFrame=function(){this.isInRange&&this._canPlay&&(this._isPlaying?(!this.audio.playing()||Math.abs(this._currentTime/this.globalData.frameRate-this.audio.seek())>.1)&&this.audio.seek(this._currentTime/this.globalData.frameRate):(this.audio.play(),this.audio.seek(this._currentTime/this.globalData.frameRate),this._isPlaying=!0))},AudioElement.prototype.show=function(){},AudioElement.prototype.hide=function(){this.audio.pause(),this._isPlaying=!1},AudioElement.prototype.pause=function(){this.audio.pause(),this._isPlaying=!1,this._canPlay=!1},AudioElement.prototype.resume=function(){this._canPlay=!0},AudioElement.prototype.setRate=function(e){this.audio.rate(e)},AudioElement.prototype.volume=function(e){this._volumeMultiplier=e,this._previousVolume=e*this._volume,this.audio.volume(this._previousVolume)},AudioElement.prototype.getBaseElement=function(){return null},AudioElement.prototype.destroy=function(){},AudioElement.prototype.sourceRectAtTime=function(){},AudioElement.prototype.initExpressions=function(){},BaseRenderer.prototype.checkLayers=function(e){var t,n,i=this.layers.length;for(this.completeLayers=!0,t=i-1;t>=0;t-=1)this.elements[t]||(n=this.layers[t]).ip-n.st<=e-this.layers[t].st&&n.op-n.st>e-this.layers[t].st&&this.buildItem(t),this.completeLayers=!!this.elements[t]&&this.completeLayers;this.checkPendingElements()},BaseRenderer.prototype.createItem=function(e){switch(e.ty){case 2:return this.createImage(e);case 0:return this.createComp(e);case 1:return this.createSolid(e);case 3:return this.createNull(e);case 4:return this.createShape(e);case 5:return this.createText(e);case 6:return this.createAudio(e);case 13:return this.createCamera(e);case 15:return this.createFootage(e);default:return this.createNull(e)}},BaseRenderer.prototype.createCamera=function(){throw new Error("You're using a 3d camera. Try the html renderer.")},BaseRenderer.prototype.createAudio=function(e){return new AudioElement(e,this.globalData,this)},BaseRenderer.prototype.createFootage=function(e){return new FootageElement(e,this.globalData,this)},BaseRenderer.prototype.buildAllItems=function(){var e,t=this.layers.length;for(e=0;e<t;e+=1)this.buildItem(e);this.checkPendingElements()},BaseRenderer.prototype.includeLayers=function(e){var t;this.completeLayers=!1;var n,i=e.length,o=this.layers.length;for(t=0;t<i;t+=1)for(n=0;n<o;){if(this.layers[n].id===e[t].id){this.layers[n]=e[t];break}n+=1}},BaseRenderer.prototype.setProjectInterface=function(e){this.globalData.projectInterface=e},BaseRenderer.prototype.initItems=function(){this.globalData.progressiveLoad||this.buildAllItems()},BaseRenderer.prototype.buildElementParenting=function(e,t,n){for(var i=this.elements,o=this.layers,l=0,u=o.length;l<u;)o[l].ind==t&&(i[l]&&i[l]!==!0?(n.push(i[l]),i[l].setAsParent(),o[l].parent!==void 0?this.buildElementParenting(e,o[l].parent,n):e.setHierarchy(n)):(this.buildItem(l),this.addPendingElement(e))),l+=1},BaseRenderer.prototype.addPendingElement=function(e){this.pendingElements.push(e)},BaseRenderer.prototype.searchExtraCompositions=function(e){var t,n=e.length;for(t=0;t<n;t+=1)if(e[t].xt){var i=this.createComp(e[t]);i.initExpressions(),this.globalData.projectInterface.registerComposition(i)}},BaseRenderer.prototype.getElementById=function(e){var t,n=this.elements.length;for(t=0;t<n;t+=1)if(this.elements[t].data.ind===e)return this.elements[t];return null},BaseRenderer.prototype.getElementByPath=function(e){var t,n=e.shift();if(typeof n=="number")t=this.elements[n];else{var i,o=this.elements.length;for(i=0;i<o;i+=1)if(this.elements[i].data.nm===n){t=this.elements[i];break}}return e.length===0?t:t.getElementByPath(e)},BaseRenderer.prototype.setupGlobalData=function(e,t){this.globalData.fontManager=new FontManager,this.globalData.slotManager=slotFactory(e),this.globalData.fontManager.addChars(e.chars),this.globalData.fontManager.addFonts(e.fonts,t),this.globalData.getAssetData=this.animationItem.getAssetData.bind(this.animationItem),this.globalData.getAssetsPath=this.animationItem.getAssetsPath.bind(this.animationItem),this.globalData.imageLoader=this.animationItem.imagePreloader,this.globalData.audioController=this.animationItem.audioController,this.globalData.frameId=0,this.globalData.frameRate=e.fr,this.globalData.nm=e.nm,this.globalData.compSize={w:e.w,h:e.h}};var effectTypes={TRANSFORM_EFFECT:"transformEFfect"};function TransformElement(){}function MaskElement(e,t,n){this.data=e,this.element=t,this.globalData=n,this.storedData=[],this.masksProperties=this.data.masksProperties||[],this.maskElement=null;var i,o,l=this.globalData.defs,u=this.masksProperties?this.masksProperties.length:0;this.viewData=createSizedArray(u),this.solidPath="";var d,f,p,m,g,b,_=this.masksProperties,R=0,E=[],S=createElementID(),C="clipPath",T="clip-path";for(i=0;i<u;i+=1)if((_[i].mode!=="a"&&_[i].mode!=="n"||_[i].inv||_[i].o.k!==100||_[i].o.x)&&(C="mask",T="mask"),_[i].mode!=="s"&&_[i].mode!=="i"||R!==0?p=null:((p=createNS("rect")).setAttribute("fill","#ffffff"),p.setAttribute("width",this.element.comp.data.w||0),p.setAttribute("height",this.element.comp.data.h||0),E.push(p)),o=createNS("path"),_[i].mode==="n")this.viewData[i]={op:PropertyFactory.getProp(this.element,_[i].o,0,.01,this.element),prop:ShapePropertyFactory.getShapeProp(this.element,_[i],3),elem:o,lastPath:""},l.appendChild(o);else{var A;if(R+=1,o.setAttribute("fill",_[i].mode==="s"?"#000000":"#ffffff"),o.setAttribute("clip-rule","nonzero"),_[i].x.k!==0?(C="mask",T="mask",b=PropertyFactory.getProp(this.element,_[i].x,0,null,this.element),A=createElementID(),(m=createNS("filter")).setAttribute("id",A),(g=createNS("feMorphology")).setAttribute("operator","erode"),g.setAttribute("in","SourceGraphic"),g.setAttribute("radius","0"),m.appendChild(g),l.appendChild(m),o.setAttribute("stroke",_[i].mode==="s"?"#000000":"#ffffff")):(g=null,b=null),this.storedData[i]={elem:o,x:b,expan:g,lastPath:"",lastOperator:"",filterId:A,lastRadius:0},_[i].mode==="i"){f=E.length;var M=createNS("g");for(d=0;d<f;d+=1)M.appendChild(E[d]);var I=createNS("mask");I.setAttribute("mask-type","alpha"),I.setAttribute("id",S+"_"+R),I.appendChild(o),l.appendChild(I),M.setAttribute("mask","url("+getLocationHref()+"#"+S+"_"+R+")"),E.length=0,E.push(M)}else E.push(o);_[i].inv&&!this.solidPath&&(this.solidPath=this.createLayerSolidPath()),this.viewData[i]={elem:o,lastPath:"",op:PropertyFactory.getProp(this.element,_[i].o,0,.01,this.element),prop:ShapePropertyFactory.getShapeProp(this.element,_[i],3),invRect:p},this.viewData[i].prop.k||this.drawPath(_[i],this.viewData[i].prop.v,this.viewData[i])}for(this.maskElement=createNS(C),u=E.length,i=0;i<u;i+=1)this.maskElement.appendChild(E[i]);R>0&&(this.maskElement.setAttribute("id",S),this.element.maskedElement.setAttribute(T,"url("+getLocationHref()+"#"+S+")"),l.appendChild(this.maskElement)),this.viewData.length&&this.element.addRenderableComponent(this)}TransformElement.prototype={initTransform:function(){var e=new Matrix;this.finalTransform={mProp:this.data.ks?TransformPropertyFactory.getTransformProperty(this,this.data.ks,this):{o:0},_matMdf:!1,_localMatMdf:!1,_opMdf:!1,mat:e,localMat:e,localOpacity:1},this.data.ao&&(this.finalTransform.mProp.autoOriented=!0),this.data.ty},renderTransform:function(){if(this.finalTransform._opMdf=this.finalTransform.mProp.o._mdf||this._isFirstFrame,this.finalTransform._matMdf=this.finalTransform.mProp._mdf||this._isFirstFrame,this.hierarchy){var e,t=this.finalTransform.mat,n=0,i=this.hierarchy.length;if(!this.finalTransform._matMdf)for(;n<i;){if(this.hierarchy[n].finalTransform.mProp._mdf){this.finalTransform._matMdf=!0;break}n+=1}if(this.finalTransform._matMdf)for(e=this.finalTransform.mProp.v.props,t.cloneFromProps(e),n=0;n<i;n+=1)t.multiply(this.hierarchy[n].finalTransform.mProp.v)}this.finalTransform._matMdf&&(this.finalTransform._localMatMdf=this.finalTransform._matMdf),this.finalTransform._opMdf&&(this.finalTransform.localOpacity=this.finalTransform.mProp.o.v)},renderLocalTransform:function(){if(this.localTransforms){var e=0,t=this.localTransforms.length;if(this.finalTransform._localMatMdf=this.finalTransform._matMdf,!this.finalTransform._localMatMdf||!this.finalTransform._opMdf)for(;e<t;)this.localTransforms[e]._mdf&&(this.finalTransform._localMatMdf=!0),this.localTransforms[e]._opMdf&&!this.finalTransform._opMdf&&(this.finalTransform.localOpacity=this.finalTransform.mProp.o.v,this.finalTransform._opMdf=!0),e+=1;if(this.finalTransform._localMatMdf){var n=this.finalTransform.localMat;for(this.localTransforms[0].matrix.clone(n),e=1;e<t;e+=1){var i=this.localTransforms[e].matrix;n.multiply(i)}n.multiply(this.finalTransform.mat)}if(this.finalTransform._opMdf){var o=this.finalTransform.localOpacity;for(e=0;e<t;e+=1)o*=.01*this.localTransforms[e].opacity;this.finalTransform.localOpacity=o}}},searchEffectTransforms:function(){if(this.renderableEffectsManager){var e=this.renderableEffectsManager.getEffects(effectTypes.TRANSFORM_EFFECT);if(e.length){this.localTransforms=[],this.finalTransform.localMat=new Matrix;var t=0,n=e.length;for(t=0;t<n;t+=1)this.localTransforms.push(e[t])}}},globalToLocal:function(e){var t=[];t.push(this.finalTransform);for(var n,i=!0,o=this.comp;i;)o.finalTransform?(o.data.hasMask&&t.splice(0,0,o.finalTransform),o=o.comp):i=!1;var l,u=t.length;for(n=0;n<u;n+=1)l=t[n].mat.applyToPointArray(0,0,0),e=[e[0]-l[0],e[1]-l[1],0];return e},mHelper:new Matrix},MaskElement.prototype.getMaskProperty=function(e){return this.viewData[e].prop},MaskElement.prototype.renderFrame=function(e){var t,n=this.element.finalTransform.mat,i=this.masksProperties.length;for(t=0;t<i;t+=1)if((this.viewData[t].prop._mdf||e)&&this.drawPath(this.masksProperties[t],this.viewData[t].prop.v,this.viewData[t]),(this.viewData[t].op._mdf||e)&&this.viewData[t].elem.setAttribute("fill-opacity",this.viewData[t].op.v),this.masksProperties[t].mode!=="n"&&(this.viewData[t].invRect&&(this.element.finalTransform.mProp._mdf||e)&&this.viewData[t].invRect.setAttribute("transform",n.getInverseMatrix().to2dCSS()),this.storedData[t].x&&(this.storedData[t].x._mdf||e))){var o=this.storedData[t].expan;this.storedData[t].x.v<0?(this.storedData[t].lastOperator!=="erode"&&(this.storedData[t].lastOperator="erode",this.storedData[t].elem.setAttribute("filter","url("+getLocationHref()+"#"+this.storedData[t].filterId+")")),o.setAttribute("radius",-this.storedData[t].x.v)):(this.storedData[t].lastOperator!=="dilate"&&(this.storedData[t].lastOperator="dilate",this.storedData[t].elem.setAttribute("filter",null)),this.storedData[t].elem.setAttribute("stroke-width",2*this.storedData[t].x.v))}},MaskElement.prototype.getMaskelement=function(){return this.maskElement},MaskElement.prototype.createLayerSolidPath=function(){var e="M0,0 ";return e+=" h"+this.globalData.compSize.w,e+=" v"+this.globalData.compSize.h,e+=" h-"+this.globalData.compSize.w,e+=" v-"+this.globalData.compSize.h+" "},MaskElement.prototype.drawPath=function(e,t,n){var i,o,l=" M"+t.v[0][0]+","+t.v[0][1];for(o=t._length,i=1;i<o;i+=1)l+=" C"+t.o[i-1][0]+","+t.o[i-1][1]+" "+t.i[i][0]+","+t.i[i][1]+" "+t.v[i][0]+","+t.v[i][1];if(t.c&&o>1&&(l+=" C"+t.o[i-1][0]+","+t.o[i-1][1]+" "+t.i[0][0]+","+t.i[0][1]+" "+t.v[0][0]+","+t.v[0][1]),n.lastPath!==l){var u="";n.elem&&(t.c&&(u=e.inv?this.solidPath+l:l),n.elem.setAttribute("d",u)),n.lastPath=l}},MaskElement.prototype.destroy=function(){this.element=null,this.globalData=null,this.maskElement=null,this.data=null,this.masksProperties=null};var filtersFactory=function(){var e={};return e.createFilter=function(t,n){var i=createNS("filter");return i.setAttribute("id",t),n!==!0&&(i.setAttribute("filterUnits","objectBoundingBox"),i.setAttribute("x","0%"),i.setAttribute("y","0%"),i.setAttribute("width","100%"),i.setAttribute("height","100%")),i},e.createAlphaToLuminanceFilter=function(){var t=createNS("feColorMatrix");return t.setAttribute("type","matrix"),t.setAttribute("color-interpolation-filters","sRGB"),t.setAttribute("values","0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 1"),t},e}(),featureSupport=function(){var e={maskType:!0,svgLumaHidden:!0,offscreenCanvas:typeof OffscreenCanvas<"u"};return(/MSIE 10/i.test(navigator.userAgent)||/MSIE 9/i.test(navigator.userAgent)||/rv:11.0/i.test(navigator.userAgent)||/Edge\/\d./i.test(navigator.userAgent))&&(e.maskType=!1),/firefox/i.test(navigator.userAgent)&&(e.svgLumaHidden=!1),e}(),registeredEffects$1={},idPrefix="filter_result_";function SVGEffects(e){var t,n,i="SourceGraphic",o=e.data.ef?e.data.ef.length:0,l=createElementID(),u=filtersFactory.createFilter(l,!0),d=0;for(this.filters=[],t=0;t<o;t+=1){n=null;var f=e.data.ef[t].ty;registeredEffects$1[f]&&(n=new registeredEffects$1[f].effect(u,e.effectsManager.effectElements[t],e,idPrefix+d,i),i=idPrefix+d,registeredEffects$1[f].countsAsEffect&&(d+=1)),n&&this.filters.push(n)}d&&(e.globalData.defs.appendChild(u),e.layerElement.setAttribute("filter","url("+getLocationHref()+"#"+l+")")),this.filters.length&&e.addRenderableComponent(this)}function registerEffect$1(e,t,n){registeredEffects$1[e]={effect:t,countsAsEffect:n}}function SVGBaseElement(){}function HierarchyElement(){}function RenderableDOMElement(){}function IImageElement(e,t,n){this.assetData=t.getAssetData(e.refId),this.assetData&&this.assetData.sid&&(this.assetData=t.slotManager.getProp(this.assetData)),this.initElement(e,t,n),this.sourceRect={top:0,left:0,width:this.assetData.w,height:this.assetData.h}}function ProcessedElement(e,t){this.elem=e,this.pos=t}function IShapeElement(){}SVGEffects.prototype.renderFrame=function(e){var t,n=this.filters.length;for(t=0;t<n;t+=1)this.filters[t].renderFrame(e)},SVGEffects.prototype.getEffects=function(e){var t,n=this.filters.length,i=[];for(t=0;t<n;t+=1)this.filters[t].type===e&&i.push(this.filters[t]);return i},SVGBaseElement.prototype={initRendererElement:function(){this.layerElement=createNS("g")},createContainerElements:function(){this.matteElement=createNS("g"),this.transformedElement=this.layerElement,this.maskedElement=this.layerElement,this._sizeChanged=!1;var e=null;if(this.data.td){this.matteMasks={};var t=createNS("g");t.setAttribute("id",this.layerId),t.appendChild(this.layerElement),e=t,this.globalData.defs.appendChild(t)}else this.data.tt?(this.matteElement.appendChild(this.layerElement),e=this.matteElement,this.baseElement=this.matteElement):this.baseElement=this.layerElement;if(this.data.ln&&this.layerElement.setAttribute("id",this.data.ln),this.data.cl&&this.layerElement.setAttribute("class",this.data.cl),this.data.ty===0&&!this.data.hd){var n=createNS("clipPath"),i=createNS("path");i.setAttribute("d","M0,0 L"+this.data.w+",0 L"+this.data.w+","+this.data.h+" L0,"+this.data.h+"z");var o=createElementID();if(n.setAttribute("id",o),n.appendChild(i),this.globalData.defs.appendChild(n),this.checkMasks()){var l=createNS("g");l.setAttribute("clip-path","url("+getLocationHref()+"#"+o+")"),l.appendChild(this.layerElement),this.transformedElement=l,e?e.appendChild(this.transformedElement):this.baseElement=this.transformedElement}else this.layerElement.setAttribute("clip-path","url("+getLocationHref()+"#"+o+")")}this.data.bm!==0&&this.setBlendMode()},renderElement:function(){this.finalTransform._localMatMdf&&this.transformedElement.setAttribute("transform",this.finalTransform.localMat.to2dCSS()),this.finalTransform._opMdf&&this.transformedElement.setAttribute("opacity",this.finalTransform.localOpacity)},destroyBaseElement:function(){this.layerElement=null,this.matteElement=null,this.maskManager.destroy()},getBaseElement:function(){return this.data.hd?null:this.baseElement},createRenderableComponents:function(){this.maskManager=new MaskElement(this.data,this,this.globalData),this.renderableEffectsManager=new SVGEffects(this),this.searchEffectTransforms()},getMatte:function(e){if(this.matteMasks||(this.matteMasks={}),!this.matteMasks[e]){var t,n,i,o,l=this.layerId+"_"+e;if(e===1||e===3){var u=createNS("mask");u.setAttribute("id",l),u.setAttribute("mask-type",e===3?"luminance":"alpha"),(i=createNS("use")).setAttributeNS("http://www.w3.org/1999/xlink","href","#"+this.layerId),u.appendChild(i),this.globalData.defs.appendChild(u),featureSupport.maskType||e!==1||(u.setAttribute("mask-type","luminance"),t=createElementID(),n=filtersFactory.createFilter(t),this.globalData.defs.appendChild(n),n.appendChild(filtersFactory.createAlphaToLuminanceFilter()),(o=createNS("g")).appendChild(i),u.appendChild(o),o.setAttribute("filter","url("+getLocationHref()+"#"+t+")"))}else if(e===2){var d=createNS("mask");d.setAttribute("id",l),d.setAttribute("mask-type","alpha");var f=createNS("g");d.appendChild(f),t=createElementID(),n=filtersFactory.createFilter(t);var p=createNS("feComponentTransfer");p.setAttribute("in","SourceGraphic"),n.appendChild(p);var m=createNS("feFuncA");m.setAttribute("type","table"),m.setAttribute("tableValues","1.0 0.0"),p.appendChild(m),this.globalData.defs.appendChild(n);var g=createNS("rect");g.setAttribute("width",this.comp.data.w),g.setAttribute("height",this.comp.data.h),g.setAttribute("x","0"),g.setAttribute("y","0"),g.setAttribute("fill","#ffffff"),g.setAttribute("opacity","0"),f.setAttribute("filter","url("+getLocationHref()+"#"+t+")"),f.appendChild(g),(i=createNS("use")).setAttributeNS("http://www.w3.org/1999/xlink","href","#"+this.layerId),f.appendChild(i),featureSupport.maskType||(d.setAttribute("mask-type","luminance"),n.appendChild(filtersFactory.createAlphaToLuminanceFilter()),o=createNS("g"),f.appendChild(g),o.appendChild(this.layerElement),f.appendChild(o)),this.globalData.defs.appendChild(d)}this.matteMasks[e]=l}return this.matteMasks[e]},setMatte:function(e){this.matteElement&&this.matteElement.setAttribute("mask","url("+getLocationHref()+"#"+e+")")}},HierarchyElement.prototype={initHierarchy:function(){this.hierarchy=[],this._isParent=!1,this.checkParenting()},setHierarchy:function(e){this.hierarchy=e},setAsParent:function(){this._isParent=!0},checkParenting:function(){this.data.parent!==void 0&&this.comp.buildElementParenting(this,this.data.parent,[])}},extendPrototype([RenderableElement,createProxyFunction({initElement:function(e,t,n){this.initFrame(),this.initBaseData(e,t,n),this.initTransform(e,t,n),this.initHierarchy(),this.initRenderable(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),this.createContent(),this.hide()},hide:function(){this.hidden||this.isInRange&&!this.isTransparent||((this.baseElement||this.layerElement).style.display="none",this.hidden=!0)},show:function(){this.isInRange&&!this.isTransparent&&(this.data.hd||((this.baseElement||this.layerElement).style.display="block"),this.hidden=!1,this._isFirstFrame=!0)},renderFrame:function(){this.data.hd||this.hidden||(this.renderTransform(),this.renderRenderable(),this.renderLocalTransform(),this.renderElement(),this.renderInnerContent(),this._isFirstFrame&&(this._isFirstFrame=!1))},renderInnerContent:function(){},prepareFrame:function(e){this._mdf=!1,this.prepareRenderableFrame(e),this.prepareProperties(e,this.isInRange),this.checkTransparency()},destroy:function(){this.innerElem=null,this.destroyBaseElement()}})],RenderableDOMElement),extendPrototype([BaseElement,TransformElement,SVGBaseElement,HierarchyElement,FrameElement,RenderableDOMElement],IImageElement),IImageElement.prototype.createContent=function(){var e=this.globalData.getAssetsPath(this.assetData);this.innerElem=createNS("image"),this.innerElem.setAttribute("width",this.assetData.w+"px"),this.innerElem.setAttribute("height",this.assetData.h+"px"),this.innerElem.setAttribute("preserveAspectRatio",this.assetData.pr||this.globalData.renderConfig.imagePreserveAspectRatio),this.innerElem.setAttributeNS("http://www.w3.org/1999/xlink","href",e),this.layerElement.appendChild(this.innerElem)},IImageElement.prototype.sourceRectAtTime=function(){return this.sourceRect},IShapeElement.prototype={addShapeToModifiers:function(e){var t,n=this.shapeModifiers.length;for(t=0;t<n;t+=1)this.shapeModifiers[t].addShape(e)},isShapeInAnimatedModifiers:function(e){for(var t=this.shapeModifiers.length;0<t;)if(this.shapeModifiers[0].isAnimatedWithShape(e))return!0;return!1},renderModifiers:function(){if(this.shapeModifiers.length){var e,t=this.shapes.length;for(e=0;e<t;e+=1)this.shapes[e].sh.reset();for(e=(t=this.shapeModifiers.length)-1;e>=0&&!this.shapeModifiers[e].processShapes(this._isFirstFrame);e-=1);}},searchProcessedElement:function(e){for(var t=this.processedElements,n=0,i=t.length;n<i;){if(t[n].elem===e)return t[n].pos;n+=1}return 0},addProcessedElement:function(e,t){for(var n=this.processedElements,i=n.length;i;)if(n[i-=1].elem===e)return void(n[i].pos=t);n.push(new ProcessedElement(e,t))},prepareFrame:function(e){this.prepareRenderableFrame(e),this.prepareProperties(e,this.isInRange)}};var lineCapEnum={1:"butt",2:"round",3:"square"},lineJoinEnum={1:"miter",2:"round",3:"bevel"};function SVGShapeData(e,t,n){this.caches=[],this.styles=[],this.transformers=e,this.lStr="",this.sh=n,this.lvl=t,this._isAnimated=!!n.k;for(var i=0,o=e.length;i<o;){if(e[i].mProps.dynamicProperties.length){this._isAnimated=!0;break}i+=1}}function SVGStyleData(e,t){this.data=e,this.type=e.ty,this.d="",this.lvl=t,this._mdf=!1,this.closed=e.hd===!0,this.pElem=createNS("path"),this.msElem=null}function DashProperty(e,t,n,i){var o;this.elem=e,this.frameId=-1,this.dataProps=createSizedArray(t.length),this.renderer=n,this.k=!1,this.dashStr="",this.dashArray=createTypedArray("float32",t.length?t.length-1:0),this.dashoffset=createTypedArray("float32",1),this.initDynamicPropertyContainer(i);var l,u=t.length||0;for(o=0;o<u;o+=1)l=PropertyFactory.getProp(e,t[o].v,0,0,this),this.k=l.k||this.k,this.dataProps[o]={n:t[o].n,p:l};this.k||this.getValue(!0),this._isAnimated=this.k}function SVGStrokeStyleData(e,t,n){this.initDynamicPropertyContainer(e),this.getValue=this.iterateDynamicProperties,this.o=PropertyFactory.getProp(e,t.o,0,.01,this),this.w=PropertyFactory.getProp(e,t.w,0,null,this),this.d=new DashProperty(e,t.d||{},"svg",this),this.c=PropertyFactory.getProp(e,t.c,1,255,this),this.style=n,this._isAnimated=!!this._isAnimated}function SVGFillStyleData(e,t,n){this.initDynamicPropertyContainer(e),this.getValue=this.iterateDynamicProperties,this.o=PropertyFactory.getProp(e,t.o,0,.01,this),this.c=PropertyFactory.getProp(e,t.c,1,255,this),this.style=n}function SVGNoStyleData(e,t,n){this.initDynamicPropertyContainer(e),this.getValue=this.iterateDynamicProperties,this.style=n}function GradientProperty(e,t,n){this.data=t,this.c=createTypedArray("uint8c",4*t.p);var i=t.k.k[0].s?t.k.k[0].s.length-4*t.p:t.k.k.length-4*t.p;this.o=createTypedArray("float32",i),this._cmdf=!1,this._omdf=!1,this._collapsable=this.checkCollapsable(),this._hasOpacity=i,this.initDynamicPropertyContainer(n),this.prop=PropertyFactory.getProp(e,t.k,1,null,this),this.k=this.prop.k,this.getValue(!0)}function SVGGradientFillStyleData(e,t,n){this.initDynamicPropertyContainer(e),this.getValue=this.iterateDynamicProperties,this.initGradientData(e,t,n)}function SVGGradientStrokeStyleData(e,t,n){this.initDynamicPropertyContainer(e),this.getValue=this.iterateDynamicProperties,this.w=PropertyFactory.getProp(e,t.w,0,null,this),this.d=new DashProperty(e,t.d||{},"svg",this),this.initGradientData(e,t,n),this._isAnimated=!!this._isAnimated}function ShapeGroupData(){this.it=[],this.prevViewData=[],this.gr=createNS("g")}function SVGTransformData(e,t,n){this.transform={mProps:e,op:t,container:n},this.elements=[],this._isAnimated=this.transform.mProps.dynamicProperties.length||this.transform.op.effectsSequence.length}SVGShapeData.prototype.setAsAnimated=function(){this._isAnimated=!0},SVGStyleData.prototype.reset=function(){this.d="",this._mdf=!1},DashProperty.prototype.getValue=function(e){if((this.elem.globalData.frameId!==this.frameId||e)&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf=this._mdf||e,this._mdf)){var t=0,n=this.dataProps.length;for(this.renderer==="svg"&&(this.dashStr=""),t=0;t<n;t+=1)this.dataProps[t].n!=="o"?this.renderer==="svg"?this.dashStr+=" "+this.dataProps[t].p.v:this.dashArray[t]=this.dataProps[t].p.v:this.dashoffset[0]=this.dataProps[t].p.v}},extendPrototype([DynamicPropertyContainer],DashProperty),extendPrototype([DynamicPropertyContainer],SVGStrokeStyleData),extendPrototype([DynamicPropertyContainer],SVGFillStyleData),extendPrototype([DynamicPropertyContainer],SVGNoStyleData),GradientProperty.prototype.comparePoints=function(e,t){for(var n=0,i=this.o.length/2;n<i;){if(Math.abs(e[4*n]-e[4*t+2*n])>.01)return!1;n+=1}return!0},GradientProperty.prototype.checkCollapsable=function(){if(this.o.length/2!=this.c.length/4)return!1;if(this.data.k.k[0].s)for(var e=0,t=this.data.k.k.length;e<t;){if(!this.comparePoints(this.data.k.k[e].s,this.data.p))return!1;e+=1}else if(!this.comparePoints(this.data.k.k,this.data.p))return!1;return!0},GradientProperty.prototype.getValue=function(e){if(this.prop.getValue(),this._mdf=!1,this._cmdf=!1,this._omdf=!1,this.prop._mdf||e){var t,n,i,o=4*this.data.p;for(t=0;t<o;t+=1)n=t%4==0?100:255,i=Math.round(this.prop.v[t]*n),this.c[t]!==i&&(this.c[t]=i,this._cmdf=!e);if(this.o.length)for(o=this.prop.v.length,t=4*this.data.p;t<o;t+=1)n=t%2==0?100:1,i=t%2==0?Math.round(100*this.prop.v[t]):this.prop.v[t],this.o[t-4*this.data.p]!==i&&(this.o[t-4*this.data.p]=i,this._omdf=!e);this._mdf=!e}},extendPrototype([DynamicPropertyContainer],GradientProperty),SVGGradientFillStyleData.prototype.initGradientData=function(e,t,n){this.o=PropertyFactory.getProp(e,t.o,0,.01,this),this.s=PropertyFactory.getProp(e,t.s,1,null,this),this.e=PropertyFactory.getProp(e,t.e,1,null,this),this.h=PropertyFactory.getProp(e,t.h||{k:0},0,.01,this),this.a=PropertyFactory.getProp(e,t.a||{k:0},0,degToRads,this),this.g=new GradientProperty(e,t.g,this),this.style=n,this.stops=[],this.setGradientData(n.pElem,t),this.setGradientOpacity(t,n),this._isAnimated=!!this._isAnimated},SVGGradientFillStyleData.prototype.setGradientData=function(e,t){var n=createElementID(),i=createNS(t.t===1?"linearGradient":"radialGradient");i.setAttribute("id",n),i.setAttribute("spreadMethod","pad"),i.setAttribute("gradientUnits","userSpaceOnUse");var o,l,u,d=[];for(u=4*t.g.p,l=0;l<u;l+=4)o=createNS("stop"),i.appendChild(o),d.push(o);e.setAttribute(t.ty==="gf"?"fill":"stroke","url("+getLocationHref()+"#"+n+")"),this.gf=i,this.cst=d},SVGGradientFillStyleData.prototype.setGradientOpacity=function(e,t){if(this.g._hasOpacity&&!this.g._collapsable){var n,i,o,l=createNS("mask"),u=createNS("path");l.appendChild(u);var d=createElementID(),f=createElementID();l.setAttribute("id",f);var p=createNS(e.t===1?"linearGradient":"radialGradient");p.setAttribute("id",d),p.setAttribute("spreadMethod","pad"),p.setAttribute("gradientUnits","userSpaceOnUse"),o=e.g.k.k[0].s?e.g.k.k[0].s.length:e.g.k.k.length;var m=this.stops;for(i=4*e.g.p;i<o;i+=2)(n=createNS("stop")).setAttribute("stop-color","rgb(255,255,255)"),p.appendChild(n),m.push(n);u.setAttribute(e.ty==="gf"?"fill":"stroke","url("+getLocationHref()+"#"+d+")"),e.ty==="gs"&&(u.setAttribute("stroke-linecap",lineCapEnum[e.lc||2]),u.setAttribute("stroke-linejoin",lineJoinEnum[e.lj||2]),e.lj===1&&u.setAttribute("stroke-miterlimit",e.ml)),this.of=p,this.ms=l,this.ost=m,this.maskId=f,t.msElem=u}},extendPrototype([DynamicPropertyContainer],SVGGradientFillStyleData),extendPrototype([SVGGradientFillStyleData,DynamicPropertyContainer],SVGGradientStrokeStyleData);var buildShapeString=function(e,t,n,i){if(t===0)return"";var o,l=e.o,u=e.i,d=e.v,f=" M"+i.applyToPointStringified(d[0][0],d[0][1]);for(o=1;o<t;o+=1)f+=" C"+i.applyToPointStringified(l[o-1][0],l[o-1][1])+" "+i.applyToPointStringified(u[o][0],u[o][1])+" "+i.applyToPointStringified(d[o][0],d[o][1]);return n&&t&&(f+=" C"+i.applyToPointStringified(l[o-1][0],l[o-1][1])+" "+i.applyToPointStringified(u[0][0],u[0][1])+" "+i.applyToPointStringified(d[0][0],d[0][1]),f+="z"),f},SVGElementsRenderer=function(){var e=new Matrix,t=new Matrix;function n(p,m,g){(g||m.transform.op._mdf)&&m.transform.container.setAttribute("opacity",m.transform.op.v),(g||m.transform.mProps._mdf)&&m.transform.container.setAttribute("transform",m.transform.mProps.v.to2dCSS())}function i(){}function o(p,m,g){var b,_,R,E,S,C,T,A,M,I,O=m.styles.length,N=m.lvl;for(C=0;C<O;C+=1){if(E=m.sh._mdf||g,m.styles[C].lvl<N){for(A=t.reset(),M=N-m.styles[C].lvl,I=m.transformers.length-1;!E&&M>0;)E=m.transformers[I].mProps._mdf||E,M-=1,I-=1;if(E)for(M=N-m.styles[C].lvl,I=m.transformers.length-1;M>0;)A.multiply(m.transformers[I].mProps.v),M-=1,I-=1}else A=e;if(_=(T=m.sh.paths)._length,E){for(R="",b=0;b<_;b+=1)(S=T.shapes[b])&&S._length&&(R+=buildShapeString(S,S._length,S.c,A));m.caches[C]=R}else R=m.caches[C];m.styles[C].d+=p.hd===!0?"":R,m.styles[C]._mdf=E||m.styles[C]._mdf}}function l(p,m,g){var b=m.style;(m.c._mdf||g)&&b.pElem.setAttribute("fill","rgb("+bmFloor(m.c.v[0])+","+bmFloor(m.c.v[1])+","+bmFloor(m.c.v[2])+")"),(m.o._mdf||g)&&b.pElem.setAttribute("fill-opacity",m.o.v)}function u(p,m,g){d(p,m,g),f(p,m,g)}function d(p,m,g){var b,_,R,E,S,C=m.gf,T=m.g._hasOpacity,A=m.s.v,M=m.e.v;if(m.o._mdf||g){var I=p.ty==="gf"?"fill-opacity":"stroke-opacity";m.style.pElem.setAttribute(I,m.o.v)}if(m.s._mdf||g){var O=p.t===1?"x1":"cx",N=O==="x1"?"y1":"cy";C.setAttribute(O,A[0]),C.setAttribute(N,A[1]),T&&!m.g._collapsable&&(m.of.setAttribute(O,A[0]),m.of.setAttribute(N,A[1]))}if(m.g._cmdf||g){b=m.cst;var j=m.g.c;for(R=b.length,_=0;_<R;_+=1)(E=b[_]).setAttribute("offset",j[4*_]+"%"),E.setAttribute("stop-color","rgb("+j[4*_+1]+","+j[4*_+2]+","+j[4*_+3]+")")}if(T&&(m.g._omdf||g)){var D=m.g.o;for(R=(b=m.g._collapsable?m.cst:m.ost).length,_=0;_<R;_+=1)E=b[_],m.g._collapsable||E.setAttribute("offset",D[2*_]+"%"),E.setAttribute("stop-opacity",D[2*_+1])}if(p.t===1)(m.e._mdf||g)&&(C.setAttribute("x2",M[0]),C.setAttribute("y2",M[1]),T&&!m.g._collapsable&&(m.of.setAttribute("x2",M[0]),m.of.setAttribute("y2",M[1])));else if((m.s._mdf||m.e._mdf||g)&&(S=Math.sqrt(Math.pow(A[0]-M[0],2)+Math.pow(A[1]-M[1],2)),C.setAttribute("r",S),T&&!m.g._collapsable&&m.of.setAttribute("r",S)),m.e._mdf||m.h._mdf||m.a._mdf||g){S||(S=Math.sqrt(Math.pow(A[0]-M[0],2)+Math.pow(A[1]-M[1],2)));var F=Math.atan2(M[1]-A[1],M[0]-A[0]),L=m.h.v;L>=1?L=.99:L<=-1&&(L=-.99);var B=S*L,V=Math.cos(F+m.a.v)*B+A[0],H=Math.sin(F+m.a.v)*B+A[1];C.setAttribute("fx",V),C.setAttribute("fy",H),T&&!m.g._collapsable&&(m.of.setAttribute("fx",V),m.of.setAttribute("fy",H))}}function f(p,m,g){var b=m.style,_=m.d;_&&(_._mdf||g)&&_.dashStr&&(b.pElem.setAttribute("stroke-dasharray",_.dashStr),b.pElem.setAttribute("stroke-dashoffset",_.dashoffset[0])),m.c&&(m.c._mdf||g)&&b.pElem.setAttribute("stroke","rgb("+bmFloor(m.c.v[0])+","+bmFloor(m.c.v[1])+","+bmFloor(m.c.v[2])+")"),(m.o._mdf||g)&&b.pElem.setAttribute("stroke-opacity",m.o.v),(m.w._mdf||g)&&(b.pElem.setAttribute("stroke-width",m.w.v),b.msElem&&b.msElem.setAttribute("stroke-width",m.w.v))}return{createRenderFunction:function(p){switch(p.ty){case"fl":return l;case"gf":return d;case"gs":return u;case"st":return f;case"sh":case"el":case"rc":case"sr":return o;case"tr":return n;case"no":return i;default:return null}}}}();function SVGShapeElement(e,t,n){this.shapes=[],this.shapesData=e.shapes,this.stylesList=[],this.shapeModifiers=[],this.itemsData=[],this.processedElements=[],this.animatedContents=[],this.initElement(e,t,n),this.prevViewData=[]}function LetterProps(e,t,n,i,o,l){this.o=e,this.sw=t,this.sc=n,this.fc=i,this.m=o,this.p=l,this._mdf={o:!0,sw:!!t,sc:!!n,fc:!!i,m:!0,p:!0}}function TextProperty(e,t){this._frameId=initialDefaultFrame,this.pv="",this.v="",this.kf=!1,this._isFirstFrame=!0,this._mdf=!1,t.d&&t.d.sid&&(t.d=e.globalData.slotManager.getProp(t.d)),this.data=t,this.elem=e,this.comp=this.elem.comp,this.keysIndex=0,this.canResize=!1,this.minimumFontSize=1,this.effectsSequence=[],this.currentData={ascent:0,boxWidth:this.defaultBoxWidth,f:"",fStyle:"",fWeight:"",fc:"",j:"",justifyOffset:"",l:[],lh:0,lineWidths:[],ls:"",of:"",s:"",sc:"",sw:0,t:0,tr:0,sz:0,ps:null,fillColorAnim:!1,strokeColorAnim:!1,strokeWidthAnim:!1,yOffset:0,finalSize:0,finalText:[],finalLineHeight:0,__complete:!1},this.copyData(this.currentData,this.data.d.k[0].s),this.searchProperty()||this.completeTextData(this.currentData)}extendPrototype([BaseElement,TransformElement,SVGBaseElement,IShapeElement,HierarchyElement,FrameElement,RenderableDOMElement],SVGShapeElement),SVGShapeElement.prototype.initSecondaryElement=function(){},SVGShapeElement.prototype.identityMatrix=new Matrix,SVGShapeElement.prototype.buildExpressionInterface=function(){},SVGShapeElement.prototype.createContent=function(){this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.layerElement,0,[],!0),this.filterUniqueShapes()},SVGShapeElement.prototype.filterUniqueShapes=function(){var e,t,n,i,o=this.shapes.length,l=this.stylesList.length,u=[],d=!1;for(n=0;n<l;n+=1){for(i=this.stylesList[n],d=!1,u.length=0,e=0;e<o;e+=1)(t=this.shapes[e]).styles.indexOf(i)!==-1&&(u.push(t),d=t._isAnimated||d);u.length>1&&d&&this.setShapesAsAnimated(u)}},SVGShapeElement.prototype.setShapesAsAnimated=function(e){var t,n=e.length;for(t=0;t<n;t+=1)e[t].setAsAnimated()},SVGShapeElement.prototype.createStyleElement=function(e,t){var n,i=new SVGStyleData(e,t),o=i.pElem;return e.ty==="st"?n=new SVGStrokeStyleData(this,e,i):e.ty==="fl"?n=new SVGFillStyleData(this,e,i):e.ty==="gf"||e.ty==="gs"?(n=new(e.ty==="gf"?SVGGradientFillStyleData:SVGGradientStrokeStyleData)(this,e,i),this.globalData.defs.appendChild(n.gf),n.maskId&&(this.globalData.defs.appendChild(n.ms),this.globalData.defs.appendChild(n.of),o.setAttribute("mask","url("+getLocationHref()+"#"+n.maskId+")"))):e.ty==="no"&&(n=new SVGNoStyleData(this,e,i)),e.ty!=="st"&&e.ty!=="gs"||(o.setAttribute("stroke-linecap",lineCapEnum[e.lc||2]),o.setAttribute("stroke-linejoin",lineJoinEnum[e.lj||2]),o.setAttribute("fill-opacity","0"),e.lj===1&&o.setAttribute("stroke-miterlimit",e.ml)),e.r===2&&o.setAttribute("fill-rule","evenodd"),e.ln&&o.setAttribute("id",e.ln),e.cl&&o.setAttribute("class",e.cl),e.bm&&(o.style["mix-blend-mode"]=getBlendMode(e.bm)),this.stylesList.push(i),this.addToAnimatedContents(e,n),n},SVGShapeElement.prototype.createGroupElement=function(e){var t=new ShapeGroupData;return e.ln&&t.gr.setAttribute("id",e.ln),e.cl&&t.gr.setAttribute("class",e.cl),e.bm&&(t.gr.style["mix-blend-mode"]=getBlendMode(e.bm)),t},SVGShapeElement.prototype.createTransformElement=function(e,t){var n=TransformPropertyFactory.getTransformProperty(this,e,this),i=new SVGTransformData(n,n.o,t);return this.addToAnimatedContents(e,i),i},SVGShapeElement.prototype.createShapeElement=function(e,t,n){var i=4;e.ty==="rc"?i=5:e.ty==="el"?i=6:e.ty==="sr"&&(i=7);var o=new SVGShapeData(t,n,ShapePropertyFactory.getShapeProp(this,e,i,this));return this.shapes.push(o),this.addShapeToModifiers(o),this.addToAnimatedContents(e,o),o},SVGShapeElement.prototype.addToAnimatedContents=function(e,t){for(var n=0,i=this.animatedContents.length;n<i;){if(this.animatedContents[n].element===t)return;n+=1}this.animatedContents.push({fn:SVGElementsRenderer.createRenderFunction(e),element:t,data:e})},SVGShapeElement.prototype.setElementStyles=function(e){var t,n=e.styles,i=this.stylesList.length;for(t=0;t<i;t+=1)this.stylesList[t].closed||n.push(this.stylesList[t])},SVGShapeElement.prototype.reloadShapes=function(){var e;this._isFirstFrame=!0;var t=this.itemsData.length;for(e=0;e<t;e+=1)this.prevViewData[e]=this.itemsData[e];for(this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.layerElement,0,[],!0),this.filterUniqueShapes(),t=this.dynamicProperties.length,e=0;e<t;e+=1)this.dynamicProperties[e].getValue();this.renderModifiers()},SVGShapeElement.prototype.searchShapes=function(e,t,n,i,o,l,u){var d,f,p,m,g,b,_=[].concat(l),R=e.length-1,E=[],S=[];for(d=R;d>=0;d-=1){if((b=this.searchProcessedElement(e[d]))?t[d]=n[b-1]:e[d]._render=u,e[d].ty==="fl"||e[d].ty==="st"||e[d].ty==="gf"||e[d].ty==="gs"||e[d].ty==="no")b?t[d].style.closed=!1:t[d]=this.createStyleElement(e[d],o),e[d]._render&&t[d].style.pElem.parentNode!==i&&i.appendChild(t[d].style.pElem),E.push(t[d].style);else if(e[d].ty==="gr"){if(b)for(p=t[d].it.length,f=0;f<p;f+=1)t[d].prevViewData[f]=t[d].it[f];else t[d]=this.createGroupElement(e[d]);this.searchShapes(e[d].it,t[d].it,t[d].prevViewData,t[d].gr,o+1,_,u),e[d]._render&&t[d].gr.parentNode!==i&&i.appendChild(t[d].gr)}else e[d].ty==="tr"?(b||(t[d]=this.createTransformElement(e[d],i)),m=t[d].transform,_.push(m)):e[d].ty==="sh"||e[d].ty==="rc"||e[d].ty==="el"||e[d].ty==="sr"?(b||(t[d]=this.createShapeElement(e[d],_,o)),this.setElementStyles(t[d])):e[d].ty==="tm"||e[d].ty==="rd"||e[d].ty==="ms"||e[d].ty==="pb"||e[d].ty==="zz"||e[d].ty==="op"?(b?(g=t[d]).closed=!1:((g=ShapeModifiers.getModifier(e[d].ty)).init(this,e[d]),t[d]=g,this.shapeModifiers.push(g)),S.push(g)):e[d].ty==="rp"&&(b?(g=t[d]).closed=!0:(g=ShapeModifiers.getModifier(e[d].ty),t[d]=g,g.init(this,e,d,t),this.shapeModifiers.push(g),u=!1),S.push(g));this.addProcessedElement(e[d],d+1)}for(R=E.length,d=0;d<R;d+=1)E[d].closed=!0;for(R=S.length,d=0;d<R;d+=1)S[d].closed=!0},SVGShapeElement.prototype.renderInnerContent=function(){var e;this.renderModifiers();var t=this.stylesList.length;for(e=0;e<t;e+=1)this.stylesList[e].reset();for(this.renderShape(),e=0;e<t;e+=1)(this.stylesList[e]._mdf||this._isFirstFrame)&&(this.stylesList[e].msElem&&(this.stylesList[e].msElem.setAttribute("d",this.stylesList[e].d),this.stylesList[e].d="M0 0"+this.stylesList[e].d),this.stylesList[e].pElem.setAttribute("d",this.stylesList[e].d||"M0 0"))},SVGShapeElement.prototype.renderShape=function(){var e,t,n=this.animatedContents.length;for(e=0;e<n;e+=1)t=this.animatedContents[e],(this._isFirstFrame||t.element._isAnimated)&&t.data!==!0&&t.fn(t.data,t.element,this._isFirstFrame)},SVGShapeElement.prototype.destroy=function(){this.destroyBaseElement(),this.shapesData=null,this.itemsData=null},LetterProps.prototype.update=function(e,t,n,i,o,l){this._mdf.o=!1,this._mdf.sw=!1,this._mdf.sc=!1,this._mdf.fc=!1,this._mdf.m=!1,this._mdf.p=!1;var u=!1;return this.o!==e&&(this.o=e,this._mdf.o=!0,u=!0),this.sw!==t&&(this.sw=t,this._mdf.sw=!0,u=!0),this.sc!==n&&(this.sc=n,this._mdf.sc=!0,u=!0),this.fc!==i&&(this.fc=i,this._mdf.fc=!0,u=!0),this.m!==o&&(this.m=o,this._mdf.m=!0,u=!0),!l.length||this.p[0]===l[0]&&this.p[1]===l[1]&&this.p[4]===l[4]&&this.p[5]===l[5]&&this.p[12]===l[12]&&this.p[13]===l[13]||(this.p=l,this._mdf.p=!0,u=!0),u},TextProperty.prototype.defaultBoxWidth=[0,0],TextProperty.prototype.copyData=function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},TextProperty.prototype.setCurrentData=function(e){e.__complete||this.completeTextData(e),this.currentData=e,this.currentData.boxWidth=this.currentData.boxWidth||this.defaultBoxWidth,this._mdf=!0},TextProperty.prototype.searchProperty=function(){return this.searchKeyframes()},TextProperty.prototype.searchKeyframes=function(){return this.kf=this.data.d.k.length>1,this.kf&&this.addEffect(this.getKeyframeValue.bind(this)),this.kf},TextProperty.prototype.addEffect=function(e){this.effectsSequence.push(e),this.elem.addDynamicProperty(this)},TextProperty.prototype.getValue=function(e){if(this.elem.globalData.frameId!==this.frameId&&this.effectsSequence.length||e){this.currentData.t=this.data.d.k[this.keysIndex].s.t;var t=this.currentData,n=this.keysIndex;if(this.lock)this.setCurrentData(this.currentData);else{var i;this.lock=!0,this._mdf=!1;var o=this.effectsSequence.length,l=e||this.data.d.k[this.keysIndex].s;for(i=0;i<o;i+=1)l=n!==this.keysIndex?this.effectsSequence[i](l,l.t):this.effectsSequence[i](this.currentData,l.t);t!==l&&this.setCurrentData(l),this.v=this.currentData,this.pv=this.v,this.lock=!1,this.frameId=this.elem.globalData.frameId}}},TextProperty.prototype.getKeyframeValue=function(){for(var e=this.data.d.k,t=this.elem.comp.renderedFrame,n=0,i=e.length;n<=i-1&&!(n===i-1||e[n+1].t>t);)n+=1;return this.keysIndex!==n&&(this.keysIndex=n),this.data.d.k[this.keysIndex].s},TextProperty.prototype.buildFinalText=function(e){for(var t,n,i=[],o=0,l=e.length,u=!1,d=!1,f="";o<l;)u=d,d=!1,t=e.charCodeAt(o),f=e.charAt(o),FontManager.isCombinedCharacter(t)?u=!0:t>=55296&&t<=56319?FontManager.isRegionalFlag(e,o)?f=e.substr(o,14):(n=e.charCodeAt(o+1))>=56320&&n<=57343&&(FontManager.isModifier(t,n)?(f=e.substr(o,2),u=!0):f=FontManager.isFlagEmoji(e.substr(o,4))?e.substr(o,4):e.substr(o,2)):t>56319?(n=e.charCodeAt(o+1),FontManager.isVariationSelector(t)&&(u=!0)):FontManager.isZeroWidthJoiner(t)&&(u=!0,d=!0),u?(i[i.length-1]+=f,u=!1):i.push(f),o+=f.length;return i},TextProperty.prototype.completeTextData=function(e){e.__complete=!0;var t,n,i,o,l,u,d,f=this.elem.globalData.fontManager,p=this.data,m=[],g=0,b=p.m.g,_=0,R=0,E=0,S=[],C=0,T=0,A=f.getFontByName(e.f),M=0,I=getFontProperties(A);e.fWeight=I.weight,e.fStyle=I.style,e.finalSize=e.s,e.finalText=this.buildFinalText(e.t),n=e.finalText.length,e.finalLineHeight=e.lh;var O,N=e.tr/1e3*e.finalSize;if(e.sz)for(var j,D,F=!0,L=e.sz[0],B=e.sz[1];F;){j=0,C=0,n=(D=this.buildFinalText(e.t)).length,N=e.tr/1e3*e.finalSize;var V=-1;for(t=0;t<n;t+=1)O=D[t].charCodeAt(0),i=!1,D[t]===" "?V=t:O!==13&&O!==3||(C=0,i=!0,j+=e.finalLineHeight||1.2*e.finalSize),f.chars?(d=f.getCharData(D[t],A.fStyle,A.fFamily),M=i?0:d.w*e.finalSize/100):M=f.measureText(D[t],e.f,e.finalSize),C+M>L&&D[t]!==" "?(V===-1?n+=1:t=V,j+=e.finalLineHeight||1.2*e.finalSize,D.splice(t,V===t?1:0,"\r"),V=-1,C=0):(C+=M,C+=N);j+=A.ascent*e.finalSize/100,this.canResize&&e.finalSize>this.minimumFontSize&&B<j?(e.finalSize-=1,e.finalLineHeight=e.finalSize*e.lh/e.s):(e.finalText=D,n=e.finalText.length,F=!1)}C=-N,M=0;var H,z=0;for(t=0;t<n;t+=1)if(i=!1,(O=(H=e.finalText[t]).charCodeAt(0))===13||O===3?(z=0,S.push(C),T=C>T?C:T,C=-2*N,o="",i=!0,E+=1):o=H,f.chars?(d=f.getCharData(H,A.fStyle,f.getFontByName(e.f).fFamily),M=i?0:d.w*e.finalSize/100):M=f.measureText(o,e.f,e.finalSize),H===" "?z+=M+N:(C+=M+N+z,z=0),m.push({l:M,an:M,add:_,n:i,anIndexes:[],val:o,line:E,animatorJustifyOffset:0}),b==2){if(_+=M,o===""||o===" "||t===n-1){for(o!==""&&o!==" "||(_-=M);R<=t;)m[R].an=_,m[R].ind=g,m[R].extra=M,R+=1;g+=1,_=0}}else if(b==3){if(_+=M,o===""||t===n-1){for(o===""&&(_-=M);R<=t;)m[R].an=_,m[R].ind=g,m[R].extra=M,R+=1;_=0,g+=1}}else m[g].ind=g,m[g].extra=0,g+=1;if(e.l=m,T=C>T?C:T,S.push(C),e.sz)e.boxWidth=e.sz[0],e.justifyOffset=0;else switch(e.boxWidth=T,e.j){case 1:e.justifyOffset=-e.boxWidth;break;case 2:e.justifyOffset=-e.boxWidth/2;break;default:e.justifyOffset=0}e.lineWidths=S;var U,Q,q,W,G=p.a;u=G.length;var K=[];for(l=0;l<u;l+=1){for((U=G[l]).a.sc&&(e.strokeColorAnim=!0),U.a.sw&&(e.strokeWidthAnim=!0),(U.a.fc||U.a.fh||U.a.fs||U.a.fb)&&(e.fillColorAnim=!0),W=0,q=U.s.b,t=0;t<n;t+=1)(Q=m[t]).anIndexes[l]=W,(q==1&&Q.val!==""||q==2&&Q.val!==""&&Q.val!==" "||q==3&&(Q.n||Q.val==" "||t==n-1)||q==4&&(Q.n||t==n-1))&&(U.s.rn===1&&K.push(W),W+=1);p.a[l].s.totalChars=W;var J,ee=-1;if(U.s.rn===1)for(t=0;t<n;t+=1)ee!=(Q=m[t]).anIndexes[l]&&(ee=Q.anIndexes[l],J=K.splice(Math.floor(Math.random()*K.length),1)[0]),Q.anIndexes[l]=J}e.yOffset=e.finalLineHeight||1.2*e.finalSize,e.ls=e.ls||0,e.ascent=A.ascent*e.finalSize/100},TextProperty.prototype.updateDocumentData=function(e,t){t=t===void 0?this.keysIndex:t;var n=this.copyData({},this.data.d.k[t].s);n=this.copyData(n,e),this.data.d.k[t].s=n,this.recalculate(t),this.setCurrentData(n),this.elem.addDynamicProperty(this)},TextProperty.prototype.recalculate=function(e){var t=this.data.d.k[e].s;t.__complete=!1,this.keysIndex=0,this._isFirstFrame=!0,this.getValue(t)},TextProperty.prototype.canResizeFont=function(e){this.canResize=e,this.recalculate(this.keysIndex),this.elem.addDynamicProperty(this)},TextProperty.prototype.setMinimumFontSize=function(e){this.minimumFontSize=Math.floor(e)||1,this.recalculate(this.keysIndex),this.elem.addDynamicProperty(this)};var TextSelectorProp=function(){var e=Math.max,t=Math.min,n=Math.floor;function i(o,l){this._currentTextLength=-1,this.k=!1,this.data=l,this.elem=o,this.comp=o.comp,this.finalS=0,this.finalE=0,this.initDynamicPropertyContainer(o),this.s=PropertyFactory.getProp(o,l.s||{k:0},0,0,this),this.e="e"in l?PropertyFactory.getProp(o,l.e,0,0,this):{v:100},this.o=PropertyFactory.getProp(o,l.o||{k:0},0,0,this),this.xe=PropertyFactory.getProp(o,l.xe||{k:0},0,0,this),this.ne=PropertyFactory.getProp(o,l.ne||{k:0},0,0,this),this.sm=PropertyFactory.getProp(o,l.sm||{k:100},0,0,this),this.a=PropertyFactory.getProp(o,l.a,0,.01,this),this.dynamicProperties.length||this.getValue()}return i.prototype={getMult:function(o){this._currentTextLength!==this.elem.textProperty.currentData.l.length&&this.getValue();var l=0,u=0,d=1,f=1;this.ne.v>0?l=this.ne.v/100:u=-this.ne.v/100,this.xe.v>0?d=1-this.xe.v/100:f=1+this.xe.v/100;var p=BezierFactory.getBezierEasing(l,u,d,f).get,m=0,g=this.finalS,b=this.finalE,_=this.data.sh;if(_===2)m=p(m=b===g?o>=b?1:0:e(0,t(.5/(b-g)+(o-g)/(b-g),1)));else if(_===3)m=p(m=b===g?o>=b?0:1:1-e(0,t(.5/(b-g)+(o-g)/(b-g),1)));else if(_===4)b===g?m=0:(m=e(0,t(.5/(b-g)+(o-g)/(b-g),1)))<.5?m*=2:m=1-2*(m-.5),m=p(m);else if(_===5){if(b===g)m=0;else{var R=b-g,E=-R/2+(o=t(e(0,o+.5-g),b-g)),S=R/2;m=Math.sqrt(1-E*E/(S*S))}m=p(m)}else _===6?(b===g?m=0:(o=t(e(0,o+.5-g),b-g),m=(1+Math.cos(Math.PI+2*Math.PI*o/(b-g)))/2),m=p(m)):(o>=n(g)&&(m=e(0,t(o-g<0?t(b,1)-(g-o):b-o,1))),m=p(m));if(this.sm.v!==100){var C=.01*this.sm.v;C===0&&(C=1e-8);var T=.5-.5*C;m<T?m=0:(m=(m-T)/C)>1&&(m=1)}return m*this.a.v},getValue:function(o){this.iterateDynamicProperties(),this._mdf=o||this._mdf,this._currentTextLength=this.elem.textProperty.currentData.l.length||0,o&&this.data.r===2&&(this.e.v=this._currentTextLength);var l=this.data.r===2?1:100/this.data.totalChars,u=this.o.v/l,d=this.s.v/l+u,f=this.e.v/l+u;if(d>f){var p=d;d=f,f=p}this.finalS=d,this.finalE=f}},extendPrototype([DynamicPropertyContainer],i),{getTextSelectorProp:function(o,l,u){return new i(o,l)}}}();function TextAnimatorDataProperty(e,t,n){var i={propType:!1},o=PropertyFactory.getProp,l=t.a;this.a={r:l.r?o(e,l.r,0,degToRads,n):i,rx:l.rx?o(e,l.rx,0,degToRads,n):i,ry:l.ry?o(e,l.ry,0,degToRads,n):i,sk:l.sk?o(e,l.sk,0,degToRads,n):i,sa:l.sa?o(e,l.sa,0,degToRads,n):i,s:l.s?o(e,l.s,1,.01,n):i,a:l.a?o(e,l.a,1,0,n):i,o:l.o?o(e,l.o,0,.01,n):i,p:l.p?o(e,l.p,1,0,n):i,sw:l.sw?o(e,l.sw,0,0,n):i,sc:l.sc?o(e,l.sc,1,0,n):i,fc:l.fc?o(e,l.fc,1,0,n):i,fh:l.fh?o(e,l.fh,0,0,n):i,fs:l.fs?o(e,l.fs,0,.01,n):i,fb:l.fb?o(e,l.fb,0,.01,n):i,t:l.t?o(e,l.t,0,0,n):i},this.s=TextSelectorProp.getTextSelectorProp(e,t.s,n),this.s.t=t.s.t}function TextAnimatorProperty(e,t,n){this._isFirstFrame=!0,this._hasMaskedPath=!1,this._frameId=-1,this._textData=e,this._renderType=t,this._elem=n,this._animatorsData=createSizedArray(this._textData.a.length),this._pathData={},this._moreOptions={alignment:{}},this.renderedLetters=[],this.lettersChangedFlag=!1,this.initDynamicPropertyContainer(n)}function ITextElement(){}TextAnimatorProperty.prototype.searchProperties=function(){var e,t,n=this._textData.a.length,i=PropertyFactory.getProp;for(e=0;e<n;e+=1)t=this._textData.a[e],this._animatorsData[e]=new TextAnimatorDataProperty(this._elem,t,this);this._textData.p&&"m"in this._textData.p?(this._pathData={a:i(this._elem,this._textData.p.a,0,0,this),f:i(this._elem,this._textData.p.f,0,0,this),l:i(this._elem,this._textData.p.l,0,0,this),r:i(this._elem,this._textData.p.r,0,0,this),p:i(this._elem,this._textData.p.p,0,0,this),m:this._elem.maskManager.getMaskProperty(this._textData.p.m)},this._hasMaskedPath=!0):this._hasMaskedPath=!1,this._moreOptions.alignment=i(this._elem,this._textData.m.a,1,0,this)},TextAnimatorProperty.prototype.getMeasures=function(e,t){if(this.lettersChangedFlag=t,this._mdf||this._isFirstFrame||t||this._hasMaskedPath&&this._pathData.m._mdf){this._isFirstFrame=!1;var n,i,o,l,u,d,f,p,m,g,b,_,R,E,S,C,T,A,M,I=this._moreOptions.alignment.v,O=this._animatorsData,N=this._textData,j=this.mHelper,D=this._renderType,F=this.renderedLetters.length,L=e.l;if(this._hasMaskedPath){if(M=this._pathData.m,!this._pathData.n||this._pathData._mdf){var B,V=M.v;for(this._pathData.r.v&&(V=V.reverse()),u={tLength:0,segments:[]},l=V._length-1,C=0,o=0;o<l;o+=1)B=bez.buildBezierData(V.v[o],V.v[o+1],[V.o[o][0]-V.v[o][0],V.o[o][1]-V.v[o][1]],[V.i[o+1][0]-V.v[o+1][0],V.i[o+1][1]-V.v[o+1][1]]),u.tLength+=B.segmentLength,u.segments.push(B),C+=B.segmentLength;o=l,M.v.c&&(B=bez.buildBezierData(V.v[o],V.v[0],[V.o[o][0]-V.v[o][0],V.o[o][1]-V.v[o][1]],[V.i[0][0]-V.v[0][0],V.i[0][1]-V.v[0][1]]),u.tLength+=B.segmentLength,u.segments.push(B),C+=B.segmentLength),this._pathData.pi=u}if(u=this._pathData.pi,d=this._pathData.f.v,b=0,g=1,p=0,m=!0,E=u.segments,d<0&&M.v.c)for(u.tLength<Math.abs(d)&&(d=-Math.abs(d)%u.tLength),g=(R=E[b=E.length-1].points).length-1;d<0;)d+=R[g].partialLength,(g-=1)<0&&(g=(R=E[b-=1].points).length-1);_=(R=E[b].points)[g-1],S=(f=R[g]).partialLength}l=L.length,n=0,i=0;var H,z,U,Q,q,W=1.2*e.finalSize*.714,G=!0;U=O.length;var K,J,ee,ne,ae,oe,se,ce,ie,ue,le,Z,fe=-1,te=d,de=b,pe=g,me=-1,ye="",he=this.defaultPropsArray;if(e.j===2||e.j===1){var ge=0,Se=0,ve=e.j===2?-.5:-1,_e=0,xe=!0;for(o=0;o<l;o+=1)if(L[o].n){for(ge&&(ge+=Se);_e<o;)L[_e].animatorJustifyOffset=ge,_e+=1;ge=0,xe=!0}else{for(z=0;z<U;z+=1)(H=O[z].a).t.propType&&(xe&&e.j===2&&(Se+=H.t.v*ve),(q=O[z].s.getMult(L[o].anIndexes[z],N.a[z].s.totalChars)).length?ge+=H.t.v*q[0]*ve:ge+=H.t.v*q*ve);xe=!1}for(ge&&(ge+=Se);_e<o;)L[_e].animatorJustifyOffset=ge,_e+=1}for(o=0;o<l;o+=1){if(j.reset(),ne=1,L[o].n)n=0,i+=e.yOffset,i+=G?1:0,d=te,G=!1,this._hasMaskedPath&&(g=pe,_=(R=E[b=de].points)[g-1],S=(f=R[g]).partialLength,p=0),ye="",le="",ie="",Z="",he=this.defaultPropsArray;else{if(this._hasMaskedPath){if(me!==L[o].line){switch(e.j){case 1:d+=C-e.lineWidths[L[o].line];break;case 2:d+=(C-e.lineWidths[L[o].line])/2}me=L[o].line}fe!==L[o].ind&&(L[fe]&&(d+=L[fe].extra),d+=L[o].an/2,fe=L[o].ind),d+=I[0]*L[o].an*.005;var be=0;for(z=0;z<U;z+=1)(H=O[z].a).p.propType&&((q=O[z].s.getMult(L[o].anIndexes[z],N.a[z].s.totalChars)).length?be+=H.p.v[0]*q[0]:be+=H.p.v[0]*q),H.a.propType&&((q=O[z].s.getMult(L[o].anIndexes[z],N.a[z].s.totalChars)).length?be+=H.a.v[0]*q[0]:be+=H.a.v[0]*q);for(m=!0,this._pathData.a.v&&(d=.5*L[0].an+(C-this._pathData.f.v-.5*L[0].an-.5*L[L.length-1].an)*fe/(l-1),d+=this._pathData.f.v);m;)p+S>=d+be||!R?(T=(d+be-p)/f.partialLength,J=_.point[0]+(f.point[0]-_.point[0])*T,ee=_.point[1]+(f.point[1]-_.point[1])*T,j.translate(-I[0]*L[o].an*.005,-I[1]*W*.01),m=!1):R&&(p+=f.partialLength,(g+=1)>=R.length&&(g=0,E[b+=1]?R=E[b].points:M.v.c?(g=0,R=E[b=0].points):(p-=f.partialLength,R=null)),R&&(_=f,S=(f=R[g]).partialLength));K=L[o].an/2-L[o].add,j.translate(-K,0,0)}else K=L[o].an/2-L[o].add,j.translate(-K,0,0),j.translate(-I[0]*L[o].an*.005,-I[1]*W*.01,0);for(z=0;z<U;z+=1)(H=O[z].a).t.propType&&(q=O[z].s.getMult(L[o].anIndexes[z],N.a[z].s.totalChars),n===0&&e.j===0||(this._hasMaskedPath?q.length?d+=H.t.v*q[0]:d+=H.t.v*q:q.length?n+=H.t.v*q[0]:n+=H.t.v*q));for(e.strokeWidthAnim&&(oe=e.sw||0),e.strokeColorAnim&&(ae=e.sc?[e.sc[0],e.sc[1],e.sc[2]]:[0,0,0]),e.fillColorAnim&&e.fc&&(se=[e.fc[0],e.fc[1],e.fc[2]]),z=0;z<U;z+=1)(H=O[z].a).a.propType&&((q=O[z].s.getMult(L[o].anIndexes[z],N.a[z].s.totalChars)).length?j.translate(-H.a.v[0]*q[0],-H.a.v[1]*q[1],H.a.v[2]*q[2]):j.translate(-H.a.v[0]*q,-H.a.v[1]*q,H.a.v[2]*q));for(z=0;z<U;z+=1)(H=O[z].a).s.propType&&((q=O[z].s.getMult(L[o].anIndexes[z],N.a[z].s.totalChars)).length?j.scale(1+(H.s.v[0]-1)*q[0],1+(H.s.v[1]-1)*q[1],1):j.scale(1+(H.s.v[0]-1)*q,1+(H.s.v[1]-1)*q,1));for(z=0;z<U;z+=1){if(H=O[z].a,q=O[z].s.getMult(L[o].anIndexes[z],N.a[z].s.totalChars),H.sk.propType&&(q.length?j.skewFromAxis(-H.sk.v*q[0],H.sa.v*q[1]):j.skewFromAxis(-H.sk.v*q,H.sa.v*q)),H.r.propType&&(q.length?j.rotateZ(-H.r.v*q[2]):j.rotateZ(-H.r.v*q)),H.ry.propType&&(q.length?j.rotateY(H.ry.v*q[1]):j.rotateY(H.ry.v*q)),H.rx.propType&&(q.length?j.rotateX(H.rx.v*q[0]):j.rotateX(H.rx.v*q)),H.o.propType&&(q.length?ne+=(H.o.v*q[0]-ne)*q[0]:ne+=(H.o.v*q-ne)*q),e.strokeWidthAnim&&H.sw.propType&&(q.length?oe+=H.sw.v*q[0]:oe+=H.sw.v*q),e.strokeColorAnim&&H.sc.propType)for(ce=0;ce<3;ce+=1)q.length?ae[ce]+=(H.sc.v[ce]-ae[ce])*q[0]:ae[ce]+=(H.sc.v[ce]-ae[ce])*q;if(e.fillColorAnim&&e.fc){if(H.fc.propType)for(ce=0;ce<3;ce+=1)q.length?se[ce]+=(H.fc.v[ce]-se[ce])*q[0]:se[ce]+=(H.fc.v[ce]-se[ce])*q;H.fh.propType&&(se=q.length?addHueToRGB(se,H.fh.v*q[0]):addHueToRGB(se,H.fh.v*q)),H.fs.propType&&(se=q.length?addSaturationToRGB(se,H.fs.v*q[0]):addSaturationToRGB(se,H.fs.v*q)),H.fb.propType&&(se=q.length?addBrightnessToRGB(se,H.fb.v*q[0]):addBrightnessToRGB(se,H.fb.v*q))}}for(z=0;z<U;z+=1)(H=O[z].a).p.propType&&(q=O[z].s.getMult(L[o].anIndexes[z],N.a[z].s.totalChars),this._hasMaskedPath?q.length?j.translate(0,H.p.v[1]*q[0],-H.p.v[2]*q[1]):j.translate(0,H.p.v[1]*q,-H.p.v[2]*q):q.length?j.translate(H.p.v[0]*q[0],H.p.v[1]*q[1],-H.p.v[2]*q[2]):j.translate(H.p.v[0]*q,H.p.v[1]*q,-H.p.v[2]*q));if(e.strokeWidthAnim&&(ie=oe<0?0:oe),e.strokeColorAnim&&(ue="rgb("+Math.round(255*ae[0])+","+Math.round(255*ae[1])+","+Math.round(255*ae[2])+")"),e.fillColorAnim&&e.fc&&(le="rgb("+Math.round(255*se[0])+","+Math.round(255*se[1])+","+Math.round(255*se[2])+")"),this._hasMaskedPath){if(j.translate(0,-e.ls),j.translate(0,I[1]*W*.01+i,0),this._pathData.p.v){A=(f.point[1]-_.point[1])/(f.point[0]-_.point[0]);var Re=180*Math.atan(A)/Math.PI;f.point[0]<_.point[0]&&(Re+=180),j.rotate(-Re*Math.PI/180)}j.translate(J,ee,0),d-=I[0]*L[o].an*.005,L[o+1]&&fe!==L[o+1].ind&&(d+=L[o].an/2,d+=.001*e.tr*e.finalSize)}else{switch(j.translate(n,i,0),e.ps&&j.translate(e.ps[0],e.ps[1]+e.ascent,0),e.j){case 1:j.translate(L[o].animatorJustifyOffset+e.justifyOffset+(e.boxWidth-e.lineWidths[L[o].line]),0,0);break;case 2:j.translate(L[o].animatorJustifyOffset+e.justifyOffset+(e.boxWidth-e.lineWidths[L[o].line])/2,0,0)}j.translate(0,-e.ls),j.translate(K,0,0),j.translate(I[0]*L[o].an*.005,I[1]*W*.01,0),n+=L[o].l+.001*e.tr*e.finalSize}D==="html"?ye=j.toCSS():D==="svg"?ye=j.to2dCSS():he=[j.props[0],j.props[1],j.props[2],j.props[3],j.props[4],j.props[5],j.props[6],j.props[7],j.props[8],j.props[9],j.props[10],j.props[11],j.props[12],j.props[13],j.props[14],j.props[15]],Z=ne}F<=o?(Q=new LetterProps(Z,ie,ue,le,ye,he),this.renderedLetters.push(Q),F+=1,this.lettersChangedFlag=!0):(Q=this.renderedLetters[o],this.lettersChangedFlag=Q.update(Z,ie,ue,le,ye,he)||this.lettersChangedFlag)}}},TextAnimatorProperty.prototype.getValue=function(){this._elem.globalData.frameId!==this._frameId&&(this._frameId=this._elem.globalData.frameId,this.iterateDynamicProperties())},TextAnimatorProperty.prototype.mHelper=new Matrix,TextAnimatorProperty.prototype.defaultPropsArray=[],extendPrototype([DynamicPropertyContainer],TextAnimatorProperty),ITextElement.prototype.initElement=function(e,t,n){this.lettersChangedFlag=!0,this.initFrame(),this.initBaseData(e,t,n),this.textProperty=new TextProperty(this,e.t,this.dynamicProperties),this.textAnimator=new TextAnimatorProperty(e.t,this.renderType,this),this.initTransform(e,t,n),this.initHierarchy(),this.initRenderable(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),this.createContent(),this.hide(),this.textAnimator.searchProperties(this.dynamicProperties)},ITextElement.prototype.prepareFrame=function(e){this._mdf=!1,this.prepareRenderableFrame(e),this.prepareProperties(e,this.isInRange)},ITextElement.prototype.createPathShape=function(e,t){var n,i,o=t.length,l="";for(n=0;n<o;n+=1)t[n].ty==="sh"&&(i=t[n].ks.k,l+=buildShapeString(i,i.i.length,!0,e));return l},ITextElement.prototype.updateDocumentData=function(e,t){this.textProperty.updateDocumentData(e,t)},ITextElement.prototype.canResizeFont=function(e){this.textProperty.canResizeFont(e)},ITextElement.prototype.setMinimumFontSize=function(e){this.textProperty.setMinimumFontSize(e)},ITextElement.prototype.applyTextPropertiesToMatrix=function(e,t,n,i,o){switch(e.ps&&t.translate(e.ps[0],e.ps[1]+e.ascent,0),t.translate(0,-e.ls,0),e.j){case 1:t.translate(e.justifyOffset+(e.boxWidth-e.lineWidths[n]),0,0);break;case 2:t.translate(e.justifyOffset+(e.boxWidth-e.lineWidths[n])/2,0,0)}t.translate(i,o,0)},ITextElement.prototype.buildColor=function(e){return"rgb("+Math.round(255*e[0])+","+Math.round(255*e[1])+","+Math.round(255*e[2])+")"},ITextElement.prototype.emptyProp=new LetterProps,ITextElement.prototype.destroy=function(){},ITextElement.prototype.validateText=function(){(this.textProperty._mdf||this.textProperty._isFirstFrame)&&(this.buildNewText(),this.textProperty._isFirstFrame=!1,this.textProperty._mdf=!1)};var emptyShapeData={shapes:[]};function SVGTextLottieElement(e,t,n){this.textSpans=[],this.renderType="svg",this.initElement(e,t,n)}function ISolidElement(e,t,n){this.initElement(e,t,n)}function NullElement(e,t,n){this.initFrame(),this.initBaseData(e,t,n),this.initFrame(),this.initTransform(e,t,n),this.initHierarchy()}function SVGRendererBase(){}function ICompElement(){}function SVGCompElement(e,t,n){this.layers=e.layers,this.supports3d=!0,this.completeLayers=!1,this.pendingElements=[],this.elements=this.layers?createSizedArray(this.layers.length):[],this.initElement(e,t,n),this.tm=e.tm?PropertyFactory.getProp(this,e.tm,0,t.frameRate,this):{_placeholder:!0}}function SVGRenderer(e,t){this.animationItem=e,this.layers=null,this.renderedFrame=-1,this.svgElement=createNS("svg");var n="";if(t&&t.title){var i=createNS("title"),o=createElementID();i.setAttribute("id",o),i.textContent=t.title,this.svgElement.appendChild(i),n+=o}if(t&&t.description){var l=createNS("desc"),u=createElementID();l.setAttribute("id",u),l.textContent=t.description,this.svgElement.appendChild(l),n+=" "+u}n&&this.svgElement.setAttribute("aria-labelledby",n);var d=createNS("defs");this.svgElement.appendChild(d);var f=createNS("g");this.svgElement.appendChild(f),this.layerElement=f,this.renderConfig={preserveAspectRatio:t&&t.preserveAspectRatio||"xMidYMid meet",imagePreserveAspectRatio:t&&t.imagePreserveAspectRatio||"xMidYMid slice",contentVisibility:t&&t.contentVisibility||"visible",progressiveLoad:t&&t.progressiveLoad||!1,hideOnTransparent:!(t&&t.hideOnTransparent===!1),viewBoxOnly:t&&t.viewBoxOnly||!1,viewBoxSize:t&&t.viewBoxSize||!1,className:t&&t.className||"",id:t&&t.id||"",focusable:t&&t.focusable,filterSize:{width:t&&t.filterSize&&t.filterSize.width||"100%",height:t&&t.filterSize&&t.filterSize.height||"100%",x:t&&t.filterSize&&t.filterSize.x||"0%",y:t&&t.filterSize&&t.filterSize.y||"0%"},width:t&&t.width,height:t&&t.height,runExpressions:!t||t.runExpressions===void 0||t.runExpressions},this.globalData={_mdf:!1,frameNum:-1,defs:d,renderConfig:this.renderConfig},this.elements=[],this.pendingElements=[],this.destroyed=!1,this.rendererType="svg"}function ShapeTransformManager(){this.sequences={},this.sequenceList=[],this.transform_key_count=0}extendPrototype([BaseElement,TransformElement,SVGBaseElement,HierarchyElement,FrameElement,RenderableDOMElement,ITextElement],SVGTextLottieElement),SVGTextLottieElement.prototype.createContent=function(){this.data.singleShape&&!this.globalData.fontManager.chars&&(this.textContainer=createNS("text"))},SVGTextLottieElement.prototype.buildTextContents=function(e){for(var t=0,n=e.length,i=[],o="";t<n;)e[t]==="\r"||e[t]===""?(i.push(o),o=""):o+=e[t],t+=1;return i.push(o),i},SVGTextLottieElement.prototype.buildShapeData=function(e,t){if(e.shapes&&e.shapes.length){var n=e.shapes[0];if(n.it){var i=n.it[n.it.length-1];i.s&&(i.s.k[0]=t,i.s.k[1]=t)}}return e},SVGTextLottieElement.prototype.buildNewText=function(){var e,t;this.addDynamicProperty(this);var n=this.textProperty.currentData;this.renderedLetters=createSizedArray(n?n.l.length:0),n.fc?this.layerElement.setAttribute("fill",this.buildColor(n.fc)):this.layerElement.setAttribute("fill","rgba(0,0,0,0)"),n.sc&&(this.layerElement.setAttribute("stroke",this.buildColor(n.sc)),this.layerElement.setAttribute("stroke-width",n.sw)),this.layerElement.setAttribute("font-size",n.finalSize);var i=this.globalData.fontManager.getFontByName(n.f);if(i.fClass)this.layerElement.setAttribute("class",i.fClass);else{this.layerElement.setAttribute("font-family",i.fFamily);var o=n.fWeight,l=n.fStyle;this.layerElement.setAttribute("font-style",l),this.layerElement.setAttribute("font-weight",o)}this.layerElement.setAttribute("aria-label",n.t);var u,d=n.l||[],f=!!this.globalData.fontManager.chars;t=d.length;var p=this.mHelper,m=this.data.singleShape,g=0,b=0,_=!0,R=.001*n.tr*n.finalSize;if(!m||f||n.sz){var E,S=this.textSpans.length;for(e=0;e<t;e+=1){if(this.textSpans[e]||(this.textSpans[e]={span:null,childSpan:null,glyph:null}),!f||!m||e===0){if(u=S>e?this.textSpans[e].span:createNS(f?"g":"text"),S<=e){if(u.setAttribute("stroke-linecap","butt"),u.setAttribute("stroke-linejoin","round"),u.setAttribute("stroke-miterlimit","4"),this.textSpans[e].span=u,f){var C=createNS("g");u.appendChild(C),this.textSpans[e].childSpan=C}this.textSpans[e].span=u,this.layerElement.appendChild(u)}u.style.display="inherit"}if(p.reset(),m&&(d[e].n&&(g=-R,b+=n.yOffset,b+=_?1:0,_=!1),this.applyTextPropertiesToMatrix(n,p,d[e].line,g,b),g+=d[e].l||0,g+=R),f){var T;if((E=this.globalData.fontManager.getCharData(n.finalText[e],i.fStyle,this.globalData.fontManager.getFontByName(n.f).fFamily)).t===1)T=new SVGCompElement(E.data,this.globalData,this);else{var A=emptyShapeData;E.data&&E.data.shapes&&(A=this.buildShapeData(E.data,n.finalSize)),T=new SVGShapeElement(A,this.globalData,this)}if(this.textSpans[e].glyph){var M=this.textSpans[e].glyph;this.textSpans[e].childSpan.removeChild(M.layerElement),M.destroy()}this.textSpans[e].glyph=T,T._debug=!0,T.prepareFrame(0),T.renderFrame(),this.textSpans[e].childSpan.appendChild(T.layerElement),E.t===1&&this.textSpans[e].childSpan.setAttribute("transform","scale("+n.finalSize/100+","+n.finalSize/100+")")}else m&&u.setAttribute("transform","translate("+p.props[12]+","+p.props[13]+")"),u.textContent=d[e].val,u.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve")}m&&u&&u.setAttribute("d","")}else{var I=this.textContainer,O="start";switch(n.j){case 1:O="end";break;case 2:O="middle";break;default:O="start"}I.setAttribute("text-anchor",O),I.setAttribute("letter-spacing",R);var N=this.buildTextContents(n.finalText);for(t=N.length,b=n.ps?n.ps[1]+n.ascent:0,e=0;e<t;e+=1)(u=this.textSpans[e].span||createNS("tspan")).textContent=N[e],u.setAttribute("x",0),u.setAttribute("y",b),u.style.display="inherit",I.appendChild(u),this.textSpans[e]||(this.textSpans[e]={span:null,glyph:null}),this.textSpans[e].span=u,b+=n.finalLineHeight;this.layerElement.appendChild(I)}for(;e<this.textSpans.length;)this.textSpans[e].span.style.display="none",e+=1;this._sizeChanged=!0},SVGTextLottieElement.prototype.sourceRectAtTime=function(){if(this.prepareFrame(this.comp.renderedFrame-this.data.st),this.renderInnerContent(),this._sizeChanged){this._sizeChanged=!1;var e=this.layerElement.getBBox();this.bbox={top:e.y,left:e.x,width:e.width,height:e.height}}return this.bbox},SVGTextLottieElement.prototype.getValue=function(){var e,t,n=this.textSpans.length;for(this.renderedFrame=this.comp.renderedFrame,e=0;e<n;e+=1)(t=this.textSpans[e].glyph)&&(t.prepareFrame(this.comp.renderedFrame-this.data.st),t._mdf&&(this._mdf=!0))},SVGTextLottieElement.prototype.renderInnerContent=function(){if(this.validateText(),(!this.data.singleShape||this._mdf)&&(this.textAnimator.getMeasures(this.textProperty.currentData,this.lettersChangedFlag),this.lettersChangedFlag||this.textAnimator.lettersChangedFlag)){var e,t;this._sizeChanged=!0;var n,i,o,l=this.textAnimator.renderedLetters,u=this.textProperty.currentData.l;for(t=u.length,e=0;e<t;e+=1)u[e].n||(n=l[e],i=this.textSpans[e].span,(o=this.textSpans[e].glyph)&&o.renderFrame(),n._mdf.m&&i.setAttribute("transform",n.m),n._mdf.o&&i.setAttribute("opacity",n.o),n._mdf.sw&&i.setAttribute("stroke-width",n.sw),n._mdf.sc&&i.setAttribute("stroke",n.sc),n._mdf.fc&&i.setAttribute("fill",n.fc))}},extendPrototype([IImageElement],ISolidElement),ISolidElement.prototype.createContent=function(){var e=createNS("rect");e.setAttribute("width",this.data.sw),e.setAttribute("height",this.data.sh),e.setAttribute("fill",this.data.sc),this.layerElement.appendChild(e)},NullElement.prototype.prepareFrame=function(e){this.prepareProperties(e,!0)},NullElement.prototype.renderFrame=function(){},NullElement.prototype.getBaseElement=function(){return null},NullElement.prototype.destroy=function(){},NullElement.prototype.sourceRectAtTime=function(){},NullElement.prototype.hide=function(){},extendPrototype([BaseElement,TransformElement,HierarchyElement,FrameElement],NullElement),extendPrototype([BaseRenderer],SVGRendererBase),SVGRendererBase.prototype.createNull=function(e){return new NullElement(e,this.globalData,this)},SVGRendererBase.prototype.createShape=function(e){return new SVGShapeElement(e,this.globalData,this)},SVGRendererBase.prototype.createText=function(e){return new SVGTextLottieElement(e,this.globalData,this)},SVGRendererBase.prototype.createImage=function(e){return new IImageElement(e,this.globalData,this)},SVGRendererBase.prototype.createSolid=function(e){return new ISolidElement(e,this.globalData,this)},SVGRendererBase.prototype.configAnimation=function(e){this.svgElement.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.svgElement.setAttribute("xmlns:xlink","http://www.w3.org/1999/xlink"),this.renderConfig.viewBoxSize?this.svgElement.setAttribute("viewBox",this.renderConfig.viewBoxSize):this.svgElement.setAttribute("viewBox","0 0 "+e.w+" "+e.h),this.renderConfig.viewBoxOnly||(this.svgElement.setAttribute("width",e.w),this.svgElement.setAttribute("height",e.h),this.svgElement.style.width="100%",this.svgElement.style.height="100%",this.svgElement.style.transform="translate3d(0,0,0)",this.svgElement.style.contentVisibility=this.renderConfig.contentVisibility),this.renderConfig.width&&this.svgElement.setAttribute("width",this.renderConfig.width),this.renderConfig.height&&this.svgElement.setAttribute("height",this.renderConfig.height),this.renderConfig.className&&this.svgElement.setAttribute("class",this.renderConfig.className),this.renderConfig.id&&this.svgElement.setAttribute("id",this.renderConfig.id),this.renderConfig.focusable!==void 0&&this.svgElement.setAttribute("focusable",this.renderConfig.focusable),this.svgElement.setAttribute("preserveAspectRatio",this.renderConfig.preserveAspectRatio),this.animationItem.wrapper.appendChild(this.svgElement);var t=this.globalData.defs;this.setupGlobalData(e,t),this.globalData.progressiveLoad=this.renderConfig.progressiveLoad,this.data=e;var n=createNS("clipPath"),i=createNS("rect");i.setAttribute("width",e.w),i.setAttribute("height",e.h),i.setAttribute("x",0),i.setAttribute("y",0);var o=createElementID();n.setAttribute("id",o),n.appendChild(i),this.layerElement.setAttribute("clip-path","url("+getLocationHref()+"#"+o+")"),t.appendChild(n),this.layers=e.layers,this.elements=createSizedArray(e.layers.length)},SVGRendererBase.prototype.destroy=function(){var e;this.animationItem.wrapper&&(this.animationItem.wrapper.innerText=""),this.layerElement=null,this.globalData.defs=null;var t=this.layers?this.layers.length:0;for(e=0;e<t;e+=1)this.elements[e]&&this.elements[e].destroy&&this.elements[e].destroy();this.elements.length=0,this.destroyed=!0,this.animationItem=null},SVGRendererBase.prototype.updateContainerSize=function(){},SVGRendererBase.prototype.findIndexByInd=function(e){var t=0,n=this.layers.length;for(t=0;t<n;t+=1)if(this.layers[t].ind===e)return t;return-1},SVGRendererBase.prototype.buildItem=function(e){var t=this.elements;if(!t[e]&&this.layers[e].ty!==99){t[e]=!0;var n=this.createItem(this.layers[e]);if(t[e]=n,getExpressionsPlugin()&&(this.layers[e].ty===0&&this.globalData.projectInterface.registerComposition(n),n.initExpressions()),this.appendElementInPos(n,e),this.layers[e].tt){var i="tp"in this.layers[e]?this.findIndexByInd(this.layers[e].tp):e-1;if(i===-1)return;if(this.elements[i]&&this.elements[i]!==!0){var o=t[i].getMatte(this.layers[e].tt);n.setMatte(o)}else this.buildItem(i),this.addPendingElement(n)}}},SVGRendererBase.prototype.checkPendingElements=function(){for(;this.pendingElements.length;){var e=this.pendingElements.pop();if(e.checkParenting(),e.data.tt)for(var t=0,n=this.elements.length;t<n;){if(this.elements[t]===e){var i="tp"in e.data?this.findIndexByInd(e.data.tp):t-1,o=this.elements[i].getMatte(this.layers[t].tt);e.setMatte(o);break}t+=1}}},SVGRendererBase.prototype.renderFrame=function(e){if(this.renderedFrame!==e&&!this.destroyed){var t;e===null?e=this.renderedFrame:this.renderedFrame=e,this.globalData.frameNum=e,this.globalData.frameId+=1,this.globalData.projectInterface.currentFrame=e,this.globalData._mdf=!1;var n=this.layers.length;for(this.completeLayers||this.checkLayers(e),t=n-1;t>=0;t-=1)(this.completeLayers||this.elements[t])&&this.elements[t].prepareFrame(e-this.layers[t].st);if(this.globalData._mdf)for(t=0;t<n;t+=1)(this.completeLayers||this.elements[t])&&this.elements[t].renderFrame()}},SVGRendererBase.prototype.appendElementInPos=function(e,t){var n=e.getBaseElement();if(n){for(var i,o=0;o<t;)this.elements[o]&&this.elements[o]!==!0&&this.elements[o].getBaseElement()&&(i=this.elements[o].getBaseElement()),o+=1;i?this.layerElement.insertBefore(n,i):this.layerElement.appendChild(n)}},SVGRendererBase.prototype.hide=function(){this.layerElement.style.display="none"},SVGRendererBase.prototype.show=function(){this.layerElement.style.display="block"},extendPrototype([BaseElement,TransformElement,HierarchyElement,FrameElement,RenderableDOMElement],ICompElement),ICompElement.prototype.initElement=function(e,t,n){this.initFrame(),this.initBaseData(e,t,n),this.initTransform(e,t,n),this.initRenderable(),this.initHierarchy(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),!this.data.xt&&t.progressiveLoad||this.buildAllItems(),this.hide()},ICompElement.prototype.prepareFrame=function(e){if(this._mdf=!1,this.prepareRenderableFrame(e),this.prepareProperties(e,this.isInRange),this.isInRange||this.data.xt){if(this.tm._placeholder)this.renderedFrame=e/this.data.sr;else{var t=this.tm.v;t===this.data.op&&(t=this.data.op-1),this.renderedFrame=t}var n,i=this.elements.length;for(this.completeLayers||this.checkLayers(this.renderedFrame),n=i-1;n>=0;n-=1)(this.completeLayers||this.elements[n])&&(this.elements[n].prepareFrame(this.renderedFrame-this.layers[n].st),this.elements[n]._mdf&&(this._mdf=!0))}},ICompElement.prototype.renderInnerContent=function(){var e,t=this.layers.length;for(e=0;e<t;e+=1)(this.completeLayers||this.elements[e])&&this.elements[e].renderFrame()},ICompElement.prototype.setElements=function(e){this.elements=e},ICompElement.prototype.getElements=function(){return this.elements},ICompElement.prototype.destroyElements=function(){var e,t=this.layers.length;for(e=0;e<t;e+=1)this.elements[e]&&this.elements[e].destroy()},ICompElement.prototype.destroy=function(){this.destroyElements(),this.destroyBaseElement()},extendPrototype([SVGRendererBase,ICompElement,SVGBaseElement],SVGCompElement),SVGCompElement.prototype.createComp=function(e){return new SVGCompElement(e,this.globalData,this)},extendPrototype([SVGRendererBase],SVGRenderer),SVGRenderer.prototype.createComp=function(e){return new SVGCompElement(e,this.globalData,this)},ShapeTransformManager.prototype={addTransformSequence:function(e){var t,n=e.length,i="_";for(t=0;t<n;t+=1)i+=e[t].transform.key+"_";var o=this.sequences[i];return o||(o={transforms:[].concat(e),finalTransform:new Matrix,_mdf:!1},this.sequences[i]=o,this.sequenceList.push(o)),o},processSequence:function(e,t){for(var n=0,i=e.transforms.length,o=t;n<i&&!t;){if(e.transforms[n].transform.mProps._mdf){o=!0;break}n+=1}if(o)for(e.finalTransform.reset(),n=i-1;n>=0;n-=1)e.finalTransform.multiply(e.transforms[n].transform.mProps.v);e._mdf=o},processSequences:function(e){var t,n=this.sequenceList.length;for(t=0;t<n;t+=1)this.processSequence(this.sequenceList[t],e)},getNewKey:function(){return this.transform_key_count+=1,"_"+this.transform_key_count}};var lumaLoader=function(){var e="__lottie_element_luma_buffer",t=null,n=null,i=null;function o(){var l,u,d;t||(l=createNS("svg"),u=createNS("filter"),d=createNS("feColorMatrix"),u.setAttribute("id",e),d.setAttribute("type","matrix"),d.setAttribute("color-interpolation-filters","sRGB"),d.setAttribute("values","0.3, 0.3, 0.3, 0, 0, 0.3, 0.3, 0.3, 0, 0, 0.3, 0.3, 0.3, 0, 0, 0.3, 0.3, 0.3, 0, 0"),u.appendChild(d),l.appendChild(u),l.setAttribute("id",e+"_svg"),featureSupport.svgLumaHidden&&(l.style.display="none"),i=l,document.body.appendChild(i),t=createTag("canvas"),(n=t.getContext("2d")).filter="url(#"+e+")",n.fillStyle="rgba(0,0,0,0)",n.fillRect(0,0,1,1))}return{load:o,get:function(l){return t||o(),t.width=l.width,t.height=l.height,n.filter="url(#"+e+")",t}}};function createCanvas(e,t){if(featureSupport.offscreenCanvas)return new OffscreenCanvas(e,t);var n=createTag("canvas");return n.width=e,n.height=t,n}var assetLoader={loadLumaCanvas:lumaLoader.load,getLumaCanvas:lumaLoader.get,createCanvas},registeredEffects={};function CVEffects(e){var t,n,i=e.data.ef?e.data.ef.length:0;for(this.filters=[],t=0;t<i;t+=1){n=null;var o=e.data.ef[t].ty;registeredEffects[o]&&(n=new registeredEffects[o].effect(e.effectsManager.effectElements[t],e)),n&&this.filters.push(n)}this.filters.length&&e.addRenderableComponent(this)}function registerEffect(e,t){registeredEffects[e]={effect:t}}function CVMaskElement(e,t){var n;this.data=e,this.element=t,this.masksProperties=this.data.masksProperties||[],this.viewData=createSizedArray(this.masksProperties.length);var i=this.masksProperties.length,o=!1;for(n=0;n<i;n+=1)this.masksProperties[n].mode!=="n"&&(o=!0),this.viewData[n]=ShapePropertyFactory.getShapeProp(this.element,this.masksProperties[n],3);this.hasMasks=o,o&&this.element.addRenderableComponent(this)}function CVBaseElement(){}CVEffects.prototype.renderFrame=function(e){var t,n=this.filters.length;for(t=0;t<n;t+=1)this.filters[t].renderFrame(e)},CVEffects.prototype.getEffects=function(e){var t,n=this.filters.length,i=[];for(t=0;t<n;t+=1)this.filters[t].type===e&&i.push(this.filters[t]);return i},CVMaskElement.prototype.renderFrame=function(){if(this.hasMasks){var e,t,n,i,o=this.element.finalTransform.mat,l=this.element.canvasContext,u=this.masksProperties.length;for(l.beginPath(),e=0;e<u;e+=1)if(this.masksProperties[e].mode!=="n"){var d;this.masksProperties[e].inv&&(l.moveTo(0,0),l.lineTo(this.element.globalData.compSize.w,0),l.lineTo(this.element.globalData.compSize.w,this.element.globalData.compSize.h),l.lineTo(0,this.element.globalData.compSize.h),l.lineTo(0,0)),i=this.viewData[e].v,t=o.applyToPointArray(i.v[0][0],i.v[0][1],0),l.moveTo(t[0],t[1]);var f=i._length;for(d=1;d<f;d+=1)n=o.applyToTriplePoints(i.o[d-1],i.i[d],i.v[d]),l.bezierCurveTo(n[0],n[1],n[2],n[3],n[4],n[5]);n=o.applyToTriplePoints(i.o[d-1],i.i[0],i.v[0]),l.bezierCurveTo(n[0],n[1],n[2],n[3],n[4],n[5])}this.element.globalData.renderer.save(!0),l.clip()}},CVMaskElement.prototype.getMaskProperty=MaskElement.prototype.getMaskProperty,CVMaskElement.prototype.destroy=function(){this.element=null};var operationsMap={1:"source-in",2:"source-out",3:"source-in",4:"source-out"};function CVShapeData(e,t,n,i){this.styledShapes=[],this.tr=[0,0,0,0,0,0];var o,l=4;t.ty==="rc"?l=5:t.ty==="el"?l=6:t.ty==="sr"&&(l=7),this.sh=ShapePropertyFactory.getShapeProp(e,t,l,e);var u,d=n.length;for(o=0;o<d;o+=1)n[o].closed||(u={transforms:i.addTransformSequence(n[o].transforms),trNodes:[]},this.styledShapes.push(u),n[o].elements.push(u))}function CVShapeElement(e,t,n){this.shapes=[],this.shapesData=e.shapes,this.stylesList=[],this.itemsData=[],this.prevViewData=[],this.shapeModifiers=[],this.processedElements=[],this.transformsManager=new ShapeTransformManager,this.initElement(e,t,n)}function CVTextElement(e,t,n){this.textSpans=[],this.yOffset=0,this.fillColorAnim=!1,this.strokeColorAnim=!1,this.strokeWidthAnim=!1,this.stroke=!1,this.fill=!1,this.justifyOffset=0,this.currentRender=null,this.renderType="canvas",this.values={fill:"rgba(0,0,0,0)",stroke:"rgba(0,0,0,0)",sWidth:0,fValue:""},this.initElement(e,t,n)}function CVImageElement(e,t,n){this.assetData=t.getAssetData(e.refId),this.img=t.imageLoader.getAsset(this.assetData),this.initElement(e,t,n)}function CVSolidElement(e,t,n){this.initElement(e,t,n)}function CanvasRendererBase(){}function CanvasContext(){this.opacity=-1,this.transform=createTypedArray("float32",16),this.fillStyle="",this.strokeStyle="",this.lineWidth="",this.lineCap="",this.lineJoin="",this.miterLimit="",this.id=Math.random()}function CVContextData(){var e;for(this.stack=[],this.cArrPos=0,this.cTr=new Matrix,e=0;e<15;e+=1){var t=new CanvasContext;this.stack[e]=t}this._length=15,this.nativeContext=null,this.transformMat=new Matrix,this.currentOpacity=1,this.currentFillStyle="",this.appliedFillStyle="",this.currentStrokeStyle="",this.appliedStrokeStyle="",this.currentLineWidth="",this.appliedLineWidth="",this.currentLineCap="",this.appliedLineCap="",this.currentLineJoin="",this.appliedLineJoin="",this.appliedMiterLimit="",this.currentMiterLimit=""}function CVCompElement(e,t,n){this.completeLayers=!1,this.layers=e.layers,this.pendingElements=[],this.elements=createSizedArray(this.layers.length),this.initElement(e,t,n),this.tm=e.tm?PropertyFactory.getProp(this,e.tm,0,t.frameRate,this):{_placeholder:!0}}function CanvasRenderer(e,t){this.animationItem=e,this.renderConfig={clearCanvas:!t||t.clearCanvas===void 0||t.clearCanvas,context:t&&t.context||null,progressiveLoad:t&&t.progressiveLoad||!1,preserveAspectRatio:t&&t.preserveAspectRatio||"xMidYMid meet",imagePreserveAspectRatio:t&&t.imagePreserveAspectRatio||"xMidYMid slice",contentVisibility:t&&t.contentVisibility||"visible",className:t&&t.className||"",id:t&&t.id||"",runExpressions:!t||t.runExpressions===void 0||t.runExpressions},this.renderConfig.dpr=t&&t.dpr||1,this.animationItem.wrapper&&(this.renderConfig.dpr=t&&t.dpr||window.devicePixelRatio||1),this.renderedFrame=-1,this.globalData={frameNum:-1,_mdf:!1,renderConfig:this.renderConfig,currentGlobalAlpha:-1},this.contextData=new CVContextData,this.elements=[],this.pendingElements=[],this.transformMat=new Matrix,this.completeLayers=!1,this.rendererType="canvas",this.renderConfig.clearCanvas&&(this.ctxTransform=this.contextData.transform.bind(this.contextData),this.ctxOpacity=this.contextData.opacity.bind(this.contextData),this.ctxFillStyle=this.contextData.fillStyle.bind(this.contextData),this.ctxStrokeStyle=this.contextData.strokeStyle.bind(this.contextData),this.ctxLineWidth=this.contextData.lineWidth.bind(this.contextData),this.ctxLineCap=this.contextData.lineCap.bind(this.contextData),this.ctxLineJoin=this.contextData.lineJoin.bind(this.contextData),this.ctxMiterLimit=this.contextData.miterLimit.bind(this.contextData),this.ctxFill=this.contextData.fill.bind(this.contextData),this.ctxFillRect=this.contextData.fillRect.bind(this.contextData),this.ctxStroke=this.contextData.stroke.bind(this.contextData),this.save=this.contextData.save.bind(this.contextData))}function HBaseElement(){}function HSolidElement(e,t,n){this.initElement(e,t,n)}function HShapeElement(e,t,n){this.shapes=[],this.shapesData=e.shapes,this.stylesList=[],this.shapeModifiers=[],this.itemsData=[],this.processedElements=[],this.animatedContents=[],this.shapesContainer=createNS("g"),this.initElement(e,t,n),this.prevViewData=[],this.currentBBox={x:999999,y:-999999,h:0,w:0}}function HTextElement(e,t,n){this.textSpans=[],this.textPaths=[],this.currentBBox={x:999999,y:-999999,h:0,w:0},this.renderType="svg",this.isMasked=!1,this.initElement(e,t,n)}function HCameraElement(e,t,n){this.initFrame(),this.initBaseData(e,t,n),this.initHierarchy();var i=PropertyFactory.getProp;if(this.pe=i(this,e.pe,0,0,this),e.ks.p.s?(this.px=i(this,e.ks.p.x,1,0,this),this.py=i(this,e.ks.p.y,1,0,this),this.pz=i(this,e.ks.p.z,1,0,this)):this.p=i(this,e.ks.p,1,0,this),e.ks.a&&(this.a=i(this,e.ks.a,1,0,this)),e.ks.or.k.length&&e.ks.or.k[0].to){var o,l=e.ks.or.k.length;for(o=0;o<l;o+=1)e.ks.or.k[o].to=null,e.ks.or.k[o].ti=null}this.or=i(this,e.ks.or,1,degToRads,this),this.or.sh=!0,this.rx=i(this,e.ks.rx,0,degToRads,this),this.ry=i(this,e.ks.ry,0,degToRads,this),this.rz=i(this,e.ks.rz,0,degToRads,this),this.mat=new Matrix,this._prevMat=new Matrix,this._isFirstFrame=!0,this.finalTransform={mProp:this}}function HImageElement(e,t,n){this.assetData=t.getAssetData(e.refId),this.initElement(e,t,n)}function HybridRendererBase(e,t){this.animationItem=e,this.layers=null,this.renderedFrame=-1,this.renderConfig={className:t&&t.className||"",imagePreserveAspectRatio:t&&t.imagePreserveAspectRatio||"xMidYMid slice",hideOnTransparent:!(t&&t.hideOnTransparent===!1),filterSize:{width:t&&t.filterSize&&t.filterSize.width||"400%",height:t&&t.filterSize&&t.filterSize.height||"400%",x:t&&t.filterSize&&t.filterSize.x||"-100%",y:t&&t.filterSize&&t.filterSize.y||"-100%"}},this.globalData={_mdf:!1,frameNum:-1,renderConfig:this.renderConfig},this.pendingElements=[],this.elements=[],this.threeDElements=[],this.destroyed=!1,this.camera=null,this.supports3d=!0,this.rendererType="html"}function HCompElement(e,t,n){this.layers=e.layers,this.supports3d=!e.hasMask,this.completeLayers=!1,this.pendingElements=[],this.elements=this.layers?createSizedArray(this.layers.length):[],this.initElement(e,t,n),this.tm=e.tm?PropertyFactory.getProp(this,e.tm,0,t.frameRate,this):{_placeholder:!0}}function HybridRenderer(e,t){this.animationItem=e,this.layers=null,this.renderedFrame=-1,this.renderConfig={className:t&&t.className||"",imagePreserveAspectRatio:t&&t.imagePreserveAspectRatio||"xMidYMid slice",hideOnTransparent:!(t&&t.hideOnTransparent===!1),filterSize:{width:t&&t.filterSize&&t.filterSize.width||"400%",height:t&&t.filterSize&&t.filterSize.height||"400%",x:t&&t.filterSize&&t.filterSize.x||"-100%",y:t&&t.filterSize&&t.filterSize.y||"-100%"},runExpressions:!t||t.runExpressions===void 0||t.runExpressions},this.globalData={_mdf:!1,frameNum:-1,renderConfig:this.renderConfig},this.pendingElements=[],this.elements=[],this.threeDElements=[],this.destroyed=!1,this.camera=null,this.supports3d=!0,this.rendererType="html"}CVBaseElement.prototype={createElements:function(){},initRendererElement:function(){},createContainerElements:function(){if(this.data.tt>=1){this.buffers=[];var e=this.globalData.canvasContext,t=assetLoader.createCanvas(e.canvas.width,e.canvas.height);this.buffers.push(t);var n=assetLoader.createCanvas(e.canvas.width,e.canvas.height);this.buffers.push(n),this.data.tt>=3&&!document._isProxy&&assetLoader.loadLumaCanvas()}this.canvasContext=this.globalData.canvasContext,this.transformCanvas=this.globalData.transformCanvas,this.renderableEffectsManager=new CVEffects(this),this.searchEffectTransforms()},createContent:function(){},setBlendMode:function(){var e=this.globalData;if(e.blendMode!==this.data.bm){e.blendMode=this.data.bm;var t=getBlendMode(this.data.bm);e.canvasContext.globalCompositeOperation=t}},createRenderableComponents:function(){this.maskManager=new CVMaskElement(this.data,this),this.transformEffects=this.renderableEffectsManager.getEffects(effectTypes.TRANSFORM_EFFECT)},hideElement:function(){this.hidden||this.isInRange&&!this.isTransparent||(this.hidden=!0)},showElement:function(){this.isInRange&&!this.isTransparent&&(this.hidden=!1,this._isFirstFrame=!0,this.maskManager._isFirstFrame=!0)},clearCanvas:function(e){e.clearRect(this.transformCanvas.tx,this.transformCanvas.ty,this.transformCanvas.w*this.transformCanvas.sx,this.transformCanvas.h*this.transformCanvas.sy)},prepareLayer:function(){if(this.data.tt>=1){var e=this.buffers[0].getContext("2d");this.clearCanvas(e),e.drawImage(this.canvasContext.canvas,0,0),this.currentTransform=this.canvasContext.getTransform(),this.canvasContext.setTransform(1,0,0,1,0,0),this.clearCanvas(this.canvasContext),this.canvasContext.setTransform(this.currentTransform)}},exitLayer:function(){if(this.data.tt>=1){var e=this.buffers[1],t=e.getContext("2d");if(this.clearCanvas(t),t.drawImage(this.canvasContext.canvas,0,0),this.canvasContext.setTransform(1,0,0,1,0,0),this.clearCanvas(this.canvasContext),this.canvasContext.setTransform(this.currentTransform),this.comp.getElementById("tp"in this.data?this.data.tp:this.data.ind-1).renderFrame(!0),this.canvasContext.setTransform(1,0,0,1,0,0),this.data.tt>=3&&!document._isProxy){var n=assetLoader.getLumaCanvas(this.canvasContext.canvas);n.getContext("2d").drawImage(this.canvasContext.canvas,0,0),this.clearCanvas(this.canvasContext),this.canvasContext.drawImage(n,0,0)}this.canvasContext.globalCompositeOperation=operationsMap[this.data.tt],this.canvasContext.drawImage(e,0,0),this.canvasContext.globalCompositeOperation="destination-over",this.canvasContext.drawImage(this.buffers[0],0,0),this.canvasContext.setTransform(this.currentTransform),this.canvasContext.globalCompositeOperation="source-over"}},renderFrame:function(e){if(!this.hidden&&!this.data.hd&&(this.data.td!==1||e)){this.renderTransform(),this.renderRenderable(),this.renderLocalTransform(),this.setBlendMode();var t=this.data.ty===0;this.prepareLayer(),this.globalData.renderer.save(t),this.globalData.renderer.ctxTransform(this.finalTransform.localMat.props),this.globalData.renderer.ctxOpacity(this.finalTransform.localOpacity),this.renderInnerContent(),this.globalData.renderer.restore(t),this.exitLayer(),this.maskManager.hasMasks&&this.globalData.renderer.restore(!0),this._isFirstFrame&&(this._isFirstFrame=!1)}},destroy:function(){this.canvasContext=null,this.data=null,this.globalData=null,this.maskManager.destroy()},mHelper:new Matrix},CVBaseElement.prototype.hide=CVBaseElement.prototype.hideElement,CVBaseElement.prototype.show=CVBaseElement.prototype.showElement,CVShapeData.prototype.setAsAnimated=SVGShapeData.prototype.setAsAnimated,extendPrototype([BaseElement,TransformElement,CVBaseElement,IShapeElement,HierarchyElement,FrameElement,RenderableElement],CVShapeElement),CVShapeElement.prototype.initElement=RenderableDOMElement.prototype.initElement,CVShapeElement.prototype.transformHelper={opacity:1,_opMdf:!1},CVShapeElement.prototype.dashResetter=[],CVShapeElement.prototype.createContent=function(){this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,!0,[])},CVShapeElement.prototype.createStyleElement=function(e,t){var n={data:e,type:e.ty,preTransforms:this.transformsManager.addTransformSequence(t),transforms:[],elements:[],closed:e.hd===!0},i={};if(e.ty==="fl"||e.ty==="st"?(i.c=PropertyFactory.getProp(this,e.c,1,255,this),i.c.k||(n.co="rgb("+bmFloor(i.c.v[0])+","+bmFloor(i.c.v[1])+","+bmFloor(i.c.v[2])+")")):e.ty!=="gf"&&e.ty!=="gs"||(i.s=PropertyFactory.getProp(this,e.s,1,null,this),i.e=PropertyFactory.getProp(this,e.e,1,null,this),i.h=PropertyFactory.getProp(this,e.h||{k:0},0,.01,this),i.a=PropertyFactory.getProp(this,e.a||{k:0},0,degToRads,this),i.g=new GradientProperty(this,e.g,this)),i.o=PropertyFactory.getProp(this,e.o,0,.01,this),e.ty==="st"||e.ty==="gs"){if(n.lc=lineCapEnum[e.lc||2],n.lj=lineJoinEnum[e.lj||2],e.lj==1&&(n.ml=e.ml),i.w=PropertyFactory.getProp(this,e.w,0,null,this),i.w.k||(n.wi=i.w.v),e.d){var o=new DashProperty(this,e.d,"canvas",this);i.d=o,i.d.k||(n.da=i.d.dashArray,n.do=i.d.dashoffset[0])}}else n.r=e.r===2?"evenodd":"nonzero";return this.stylesList.push(n),i.style=n,i},CVShapeElement.prototype.createGroupElement=function(){return{it:[],prevViewData:[]}},CVShapeElement.prototype.createTransformElement=function(e){return{transform:{opacity:1,_opMdf:!1,key:this.transformsManager.getNewKey(),op:PropertyFactory.getProp(this,e.o,0,.01,this),mProps:TransformPropertyFactory.getTransformProperty(this,e,this)}}},CVShapeElement.prototype.createShapeElement=function(e){var t=new CVShapeData(this,e,this.stylesList,this.transformsManager);return this.shapes.push(t),this.addShapeToModifiers(t),t},CVShapeElement.prototype.reloadShapes=function(){var e;this._isFirstFrame=!0;var t=this.itemsData.length;for(e=0;e<t;e+=1)this.prevViewData[e]=this.itemsData[e];for(this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,!0,[]),t=this.dynamicProperties.length,e=0;e<t;e+=1)this.dynamicProperties[e].getValue();this.renderModifiers(),this.transformsManager.processSequences(this._isFirstFrame)},CVShapeElement.prototype.addTransformToStyleList=function(e){var t,n=this.stylesList.length;for(t=0;t<n;t+=1)this.stylesList[t].closed||this.stylesList[t].transforms.push(e)},CVShapeElement.prototype.removeTransformFromStyleList=function(){var e,t=this.stylesList.length;for(e=0;e<t;e+=1)this.stylesList[e].closed||this.stylesList[e].transforms.pop()},CVShapeElement.prototype.closeStyles=function(e){var t,n=e.length;for(t=0;t<n;t+=1)e[t].closed=!0},CVShapeElement.prototype.searchShapes=function(e,t,n,i,o){var l,u,d,f,p,m,g=e.length-1,b=[],_=[],R=[].concat(o);for(l=g;l>=0;l-=1){if((f=this.searchProcessedElement(e[l]))?t[l]=n[f-1]:e[l]._shouldRender=i,e[l].ty==="fl"||e[l].ty==="st"||e[l].ty==="gf"||e[l].ty==="gs")f?t[l].style.closed=!1:t[l]=this.createStyleElement(e[l],R),b.push(t[l].style);else if(e[l].ty==="gr"){if(f)for(d=t[l].it.length,u=0;u<d;u+=1)t[l].prevViewData[u]=t[l].it[u];else t[l]=this.createGroupElement(e[l]);this.searchShapes(e[l].it,t[l].it,t[l].prevViewData,i,R)}else e[l].ty==="tr"?(f||(m=this.createTransformElement(e[l]),t[l]=m),R.push(t[l]),this.addTransformToStyleList(t[l])):e[l].ty==="sh"||e[l].ty==="rc"||e[l].ty==="el"||e[l].ty==="sr"?f||(t[l]=this.createShapeElement(e[l])):e[l].ty==="tm"||e[l].ty==="rd"||e[l].ty==="pb"||e[l].ty==="zz"||e[l].ty==="op"?(f?(p=t[l]).closed=!1:((p=ShapeModifiers.getModifier(e[l].ty)).init(this,e[l]),t[l]=p,this.shapeModifiers.push(p)),_.push(p)):e[l].ty==="rp"&&(f?(p=t[l]).closed=!0:(p=ShapeModifiers.getModifier(e[l].ty),t[l]=p,p.init(this,e,l,t),this.shapeModifiers.push(p),i=!1),_.push(p));this.addProcessedElement(e[l],l+1)}for(this.removeTransformFromStyleList(),this.closeStyles(b),g=_.length,l=0;l<g;l+=1)_[l].closed=!0},CVShapeElement.prototype.renderInnerContent=function(){this.transformHelper.opacity=1,this.transformHelper._opMdf=!1,this.renderModifiers(),this.transformsManager.processSequences(this._isFirstFrame),this.renderShape(this.transformHelper,this.shapesData,this.itemsData,!0)},CVShapeElement.prototype.renderShapeTransform=function(e,t){(e._opMdf||t.op._mdf||this._isFirstFrame)&&(t.opacity=e.opacity,t.opacity*=t.op.v,t._opMdf=!0)},CVShapeElement.prototype.drawLayer=function(){var e,t,n,i,o,l,u,d,f,p=this.stylesList.length,m=this.globalData.renderer,g=this.globalData.canvasContext;for(e=0;e<p;e+=1)if(((d=(f=this.stylesList[e]).type)!=="st"&&d!=="gs"||f.wi!==0)&&f.data._shouldRender&&f.coOp!==0&&this.globalData.currentGlobalAlpha!==0){for(m.save(),l=f.elements,d==="st"||d==="gs"?(m.ctxStrokeStyle(d==="st"?f.co:f.grd),m.ctxLineWidth(f.wi),m.ctxLineCap(f.lc),m.ctxLineJoin(f.lj),m.ctxMiterLimit(f.ml||0)):m.ctxFillStyle(d==="fl"?f.co:f.grd),m.ctxOpacity(f.coOp),d!=="st"&&d!=="gs"&&g.beginPath(),m.ctxTransform(f.preTransforms.finalTransform.props),n=l.length,t=0;t<n;t+=1){for(d!=="st"&&d!=="gs"||(g.beginPath(),f.da&&(g.setLineDash(f.da),g.lineDashOffset=f.do)),o=(u=l[t].trNodes).length,i=0;i<o;i+=1)u[i].t==="m"?g.moveTo(u[i].p[0],u[i].p[1]):u[i].t==="c"?g.bezierCurveTo(u[i].pts[0],u[i].pts[1],u[i].pts[2],u[i].pts[3],u[i].pts[4],u[i].pts[5]):g.closePath();d!=="st"&&d!=="gs"||(m.ctxStroke(),f.da&&g.setLineDash(this.dashResetter))}d!=="st"&&d!=="gs"&&this.globalData.renderer.ctxFill(f.r),m.restore()}},CVShapeElement.prototype.renderShape=function(e,t,n,i){var o,l;for(l=e,o=t.length-1;o>=0;o-=1)t[o].ty==="tr"?(l=n[o].transform,this.renderShapeTransform(e,l)):t[o].ty==="sh"||t[o].ty==="el"||t[o].ty==="rc"||t[o].ty==="sr"?this.renderPath(t[o],n[o]):t[o].ty==="fl"?this.renderFill(t[o],n[o],l):t[o].ty==="st"?this.renderStroke(t[o],n[o],l):t[o].ty==="gf"||t[o].ty==="gs"?this.renderGradientFill(t[o],n[o],l):t[o].ty==="gr"?this.renderShape(l,t[o].it,n[o].it):t[o].ty;i&&this.drawLayer()},CVShapeElement.prototype.renderStyledShape=function(e,t){if(this._isFirstFrame||t._mdf||e.transforms._mdf){var n,i,o,l=e.trNodes,u=t.paths,d=u._length;l.length=0;var f=e.transforms.finalTransform;for(o=0;o<d;o+=1){var p=u.shapes[o];if(p&&p.v){for(i=p._length,n=1;n<i;n+=1)n===1&&l.push({t:"m",p:f.applyToPointArray(p.v[0][0],p.v[0][1],0)}),l.push({t:"c",pts:f.applyToTriplePoints(p.o[n-1],p.i[n],p.v[n])});i===1&&l.push({t:"m",p:f.applyToPointArray(p.v[0][0],p.v[0][1],0)}),p.c&&i&&(l.push({t:"c",pts:f.applyToTriplePoints(p.o[n-1],p.i[0],p.v[0])}),l.push({t:"z"}))}}e.trNodes=l}},CVShapeElement.prototype.renderPath=function(e,t){if(e.hd!==!0&&e._shouldRender){var n,i=t.styledShapes.length;for(n=0;n<i;n+=1)this.renderStyledShape(t.styledShapes[n],t.sh)}},CVShapeElement.prototype.renderFill=function(e,t,n){var i=t.style;(t.c._mdf||this._isFirstFrame)&&(i.co="rgb("+bmFloor(t.c.v[0])+","+bmFloor(t.c.v[1])+","+bmFloor(t.c.v[2])+")"),(t.o._mdf||n._opMdf||this._isFirstFrame)&&(i.coOp=t.o.v*n.opacity)},CVShapeElement.prototype.renderGradientFill=function(e,t,n){var i,o=t.style;if(!o.grd||t.g._mdf||t.s._mdf||t.e._mdf||e.t!==1&&(t.h._mdf||t.a._mdf)){var l,u=this.globalData.canvasContext,d=t.s.v,f=t.e.v;if(e.t===1)i=u.createLinearGradient(d[0],d[1],f[0],f[1]);else{var p=Math.sqrt(Math.pow(d[0]-f[0],2)+Math.pow(d[1]-f[1],2)),m=Math.atan2(f[1]-d[1],f[0]-d[0]),g=t.h.v;g>=1?g=.99:g<=-1&&(g=-.99);var b=p*g,_=Math.cos(m+t.a.v)*b+d[0],R=Math.sin(m+t.a.v)*b+d[1];i=u.createRadialGradient(_,R,0,d[0],d[1],p)}var E=e.g.p,S=t.g.c,C=1;for(l=0;l<E;l+=1)t.g._hasOpacity&&t.g._collapsable&&(C=t.g.o[2*l+1]),i.addColorStop(S[4*l]/100,"rgba("+S[4*l+1]+","+S[4*l+2]+","+S[4*l+3]+","+C+")");o.grd=i}o.coOp=t.o.v*n.opacity},CVShapeElement.prototype.renderStroke=function(e,t,n){var i=t.style,o=t.d;o&&(o._mdf||this._isFirstFrame)&&(i.da=o.dashArray,i.do=o.dashoffset[0]),(t.c._mdf||this._isFirstFrame)&&(i.co="rgb("+bmFloor(t.c.v[0])+","+bmFloor(t.c.v[1])+","+bmFloor(t.c.v[2])+")"),(t.o._mdf||n._opMdf||this._isFirstFrame)&&(i.coOp=t.o.v*n.opacity),(t.w._mdf||this._isFirstFrame)&&(i.wi=t.w.v)},CVShapeElement.prototype.destroy=function(){this.shapesData=null,this.globalData=null,this.canvasContext=null,this.stylesList.length=0,this.itemsData.length=0},extendPrototype([BaseElement,TransformElement,CVBaseElement,HierarchyElement,FrameElement,RenderableElement,ITextElement],CVTextElement),CVTextElement.prototype.tHelper=createTag("canvas").getContext("2d"),CVTextElement.prototype.buildNewText=function(){var e=this.textProperty.currentData;this.renderedLetters=createSizedArray(e.l?e.l.length:0);var t=!1;e.fc?(t=!0,this.values.fill=this.buildColor(e.fc)):this.values.fill="rgba(0,0,0,0)",this.fill=t;var n=!1;e.sc&&(n=!0,this.values.stroke=this.buildColor(e.sc),this.values.sWidth=e.sw);var i,o,l,u,d,f,p,m,g,b,_,R,E=this.globalData.fontManager.getFontByName(e.f),S=e.l,C=this.mHelper;this.stroke=n,this.values.fValue=e.finalSize+"px "+this.globalData.fontManager.getFontByName(e.f).fFamily,o=e.finalText.length;var T=this.data.singleShape,A=.001*e.tr*e.finalSize,M=0,I=0,O=!0,N=0;for(i=0;i<o;i+=1){u=(l=this.globalData.fontManager.getCharData(e.finalText[i],E.fStyle,this.globalData.fontManager.getFontByName(e.f).fFamily))&&l.data||{},C.reset(),T&&S[i].n&&(M=-A,I+=e.yOffset,I+=O?1:0,O=!1),g=(p=u.shapes?u.shapes[0].it:[]).length,C.scale(e.finalSize/100,e.finalSize/100),T&&this.applyTextPropertiesToMatrix(e,C,S[i].line,M,I),_=createSizedArray(g-1);var j=0;for(m=0;m<g;m+=1)if(p[m].ty==="sh"){for(f=p[m].ks.k.i.length,b=p[m].ks.k,R=[],d=1;d<f;d+=1)d===1&&R.push(C.applyToX(b.v[0][0],b.v[0][1],0),C.applyToY(b.v[0][0],b.v[0][1],0)),R.push(C.applyToX(b.o[d-1][0],b.o[d-1][1],0),C.applyToY(b.o[d-1][0],b.o[d-1][1],0),C.applyToX(b.i[d][0],b.i[d][1],0),C.applyToY(b.i[d][0],b.i[d][1],0),C.applyToX(b.v[d][0],b.v[d][1],0),C.applyToY(b.v[d][0],b.v[d][1],0));R.push(C.applyToX(b.o[d-1][0],b.o[d-1][1],0),C.applyToY(b.o[d-1][0],b.o[d-1][1],0),C.applyToX(b.i[0][0],b.i[0][1],0),C.applyToY(b.i[0][0],b.i[0][1],0),C.applyToX(b.v[0][0],b.v[0][1],0),C.applyToY(b.v[0][0],b.v[0][1],0)),_[j]=R,j+=1}T&&(M+=S[i].l,M+=A),this.textSpans[N]?this.textSpans[N].elem=_:this.textSpans[N]={elem:_},N+=1}},CVTextElement.prototype.renderInnerContent=function(){var e,t,n,i,o,l;this.validateText(),this.canvasContext.font=this.values.fValue,this.globalData.renderer.ctxLineCap("butt"),this.globalData.renderer.ctxLineJoin("miter"),this.globalData.renderer.ctxMiterLimit(4),this.data.singleShape||this.textAnimator.getMeasures(this.textProperty.currentData,this.lettersChangedFlag);var u,d=this.textAnimator.renderedLetters,f=this.textProperty.currentData.l;t=f.length;var p,m,g=null,b=null,_=null,R=this.globalData.renderer;for(e=0;e<t;e+=1)if(!f[e].n){if((u=d[e])&&(R.save(),R.ctxTransform(u.p),R.ctxOpacity(u.o)),this.fill){for(u&&u.fc?g!==u.fc&&(R.ctxFillStyle(u.fc),g=u.fc):g!==this.values.fill&&(g=this.values.fill,R.ctxFillStyle(this.values.fill)),i=(p=this.textSpans[e].elem).length,this.globalData.canvasContext.beginPath(),n=0;n<i;n+=1)for(l=(m=p[n]).length,this.globalData.canvasContext.moveTo(m[0],m[1]),o=2;o<l;o+=6)this.globalData.canvasContext.bezierCurveTo(m[o],m[o+1],m[o+2],m[o+3],m[o+4],m[o+5]);this.globalData.canvasContext.closePath(),R.ctxFill()}if(this.stroke){for(u&&u.sw?_!==u.sw&&(_=u.sw,R.ctxLineWidth(u.sw)):_!==this.values.sWidth&&(_=this.values.sWidth,R.ctxLineWidth(this.values.sWidth)),u&&u.sc?b!==u.sc&&(b=u.sc,R.ctxStrokeStyle(u.sc)):b!==this.values.stroke&&(b=this.values.stroke,R.ctxStrokeStyle(this.values.stroke)),i=(p=this.textSpans[e].elem).length,this.globalData.canvasContext.beginPath(),n=0;n<i;n+=1)for(l=(m=p[n]).length,this.globalData.canvasContext.moveTo(m[0],m[1]),o=2;o<l;o+=6)this.globalData.canvasContext.bezierCurveTo(m[o],m[o+1],m[o+2],m[o+3],m[o+4],m[o+5]);this.globalData.canvasContext.closePath(),R.ctxStroke()}u&&this.globalData.renderer.restore()}},extendPrototype([BaseElement,TransformElement,CVBaseElement,HierarchyElement,FrameElement,RenderableElement],CVImageElement),CVImageElement.prototype.initElement=SVGShapeElement.prototype.initElement,CVImageElement.prototype.prepareFrame=IImageElement.prototype.prepareFrame,CVImageElement.prototype.createContent=function(){if(this.img.width&&(this.assetData.w!==this.img.width||this.assetData.h!==this.img.height)){var e=createTag("canvas");e.width=this.assetData.w,e.height=this.assetData.h;var t,n,i=e.getContext("2d"),o=this.img.width,l=this.img.height,u=o/l,d=this.assetData.w/this.assetData.h,f=this.assetData.pr||this.globalData.renderConfig.imagePreserveAspectRatio;u>d&&f==="xMidYMid slice"||u<d&&f!=="xMidYMid slice"?t=(n=l)*d:n=(t=o)/d,i.drawImage(this.img,(o-t)/2,(l-n)/2,t,n,0,0,this.assetData.w,this.assetData.h),this.img=e}},CVImageElement.prototype.renderInnerContent=function(){this.canvasContext.drawImage(this.img,0,0)},CVImageElement.prototype.destroy=function(){this.img=null},extendPrototype([BaseElement,TransformElement,CVBaseElement,HierarchyElement,FrameElement,RenderableElement],CVSolidElement),CVSolidElement.prototype.initElement=SVGShapeElement.prototype.initElement,CVSolidElement.prototype.prepareFrame=IImageElement.prototype.prepareFrame,CVSolidElement.prototype.renderInnerContent=function(){this.globalData.renderer.ctxFillStyle(this.data.sc),this.globalData.renderer.ctxFillRect(0,0,this.data.sw,this.data.sh)},extendPrototype([BaseRenderer],CanvasRendererBase),CanvasRendererBase.prototype.createShape=function(e){return new CVShapeElement(e,this.globalData,this)},CanvasRendererBase.prototype.createText=function(e){return new CVTextElement(e,this.globalData,this)},CanvasRendererBase.prototype.createImage=function(e){return new CVImageElement(e,this.globalData,this)},CanvasRendererBase.prototype.createSolid=function(e){return new CVSolidElement(e,this.globalData,this)},CanvasRendererBase.prototype.createNull=SVGRenderer.prototype.createNull,CanvasRendererBase.prototype.ctxTransform=function(e){e[0]===1&&e[1]===0&&e[4]===0&&e[5]===1&&e[12]===0&&e[13]===0||this.canvasContext.transform(e[0],e[1],e[4],e[5],e[12],e[13])},CanvasRendererBase.prototype.ctxOpacity=function(e){this.canvasContext.globalAlpha*=e<0?0:e},CanvasRendererBase.prototype.ctxFillStyle=function(e){this.canvasContext.fillStyle=e},CanvasRendererBase.prototype.ctxStrokeStyle=function(e){this.canvasContext.strokeStyle=e},CanvasRendererBase.prototype.ctxLineWidth=function(e){this.canvasContext.lineWidth=e},CanvasRendererBase.prototype.ctxLineCap=function(e){this.canvasContext.lineCap=e},CanvasRendererBase.prototype.ctxLineJoin=function(e){this.canvasContext.lineJoin=e},CanvasRendererBase.prototype.ctxMiterLimit=function(e){this.canvasContext.miterLimit=e},CanvasRendererBase.prototype.ctxFill=function(e){this.canvasContext.fill(e)},CanvasRendererBase.prototype.ctxFillRect=function(e,t,n,i){this.canvasContext.fillRect(e,t,n,i)},CanvasRendererBase.prototype.ctxStroke=function(){this.canvasContext.stroke()},CanvasRendererBase.prototype.reset=function(){this.renderConfig.clearCanvas?this.contextData.reset():this.canvasContext.restore()},CanvasRendererBase.prototype.save=function(){this.canvasContext.save()},CanvasRendererBase.prototype.restore=function(e){this.renderConfig.clearCanvas?(e&&(this.globalData.blendMode="source-over"),this.contextData.restore(e)):this.canvasContext.restore()},CanvasRendererBase.prototype.configAnimation=function(e){if(this.animationItem.wrapper){this.animationItem.container=createTag("canvas");var t=this.animationItem.container.style;t.width="100%",t.height="100%";var n="0px 0px 0px";t.transformOrigin=n,t.mozTransformOrigin=n,t.webkitTransformOrigin=n,t["-webkit-transform"]=n,t.contentVisibility=this.renderConfig.contentVisibility,this.animationItem.wrapper.appendChild(this.animationItem.container),this.canvasContext=this.animationItem.container.getContext("2d"),this.renderConfig.className&&this.animationItem.container.setAttribute("class",this.renderConfig.className),this.renderConfig.id&&this.animationItem.container.setAttribute("id",this.renderConfig.id)}else this.canvasContext=this.renderConfig.context;this.contextData.setContext(this.canvasContext),this.data=e,this.layers=e.layers,this.transformCanvas={w:e.w,h:e.h,sx:0,sy:0,tx:0,ty:0},this.setupGlobalData(e,document.body),this.globalData.canvasContext=this.canvasContext,this.globalData.renderer=this,this.globalData.isDashed=!1,this.globalData.progressiveLoad=this.renderConfig.progressiveLoad,this.globalData.transformCanvas=this.transformCanvas,this.elements=createSizedArray(e.layers.length),this.updateContainerSize()},CanvasRendererBase.prototype.updateContainerSize=function(e,t){var n,i,o,l;if(this.reset(),e?(n=e,i=t,this.canvasContext.canvas.width=n,this.canvasContext.canvas.height=i):(this.animationItem.wrapper&&this.animationItem.container?(n=this.animationItem.wrapper.offsetWidth,i=this.animationItem.wrapper.offsetHeight):(n=this.canvasContext.canvas.width,i=this.canvasContext.canvas.height),this.canvasContext.canvas.width=n*this.renderConfig.dpr,this.canvasContext.canvas.height=i*this.renderConfig.dpr),this.renderConfig.preserveAspectRatio.indexOf("meet")!==-1||this.renderConfig.preserveAspectRatio.indexOf("slice")!==-1){var u=this.renderConfig.preserveAspectRatio.split(" "),d=u[1]||"meet",f=u[0]||"xMidYMid",p=f.substr(0,4),m=f.substr(4);o=n/i,(l=this.transformCanvas.w/this.transformCanvas.h)>o&&d==="meet"||l<o&&d==="slice"?(this.transformCanvas.sx=n/(this.transformCanvas.w/this.renderConfig.dpr),this.transformCanvas.sy=n/(this.transformCanvas.w/this.renderConfig.dpr)):(this.transformCanvas.sx=i/(this.transformCanvas.h/this.renderConfig.dpr),this.transformCanvas.sy=i/(this.transformCanvas.h/this.renderConfig.dpr)),this.transformCanvas.tx=p==="xMid"&&(l<o&&d==="meet"||l>o&&d==="slice")?(n-this.transformCanvas.w*(i/this.transformCanvas.h))/2*this.renderConfig.dpr:p==="xMax"&&(l<o&&d==="meet"||l>o&&d==="slice")?(n-this.transformCanvas.w*(i/this.transformCanvas.h))*this.renderConfig.dpr:0,this.transformCanvas.ty=m==="YMid"&&(l>o&&d==="meet"||l<o&&d==="slice")?(i-this.transformCanvas.h*(n/this.transformCanvas.w))/2*this.renderConfig.dpr:m==="YMax"&&(l>o&&d==="meet"||l<o&&d==="slice")?(i-this.transformCanvas.h*(n/this.transformCanvas.w))*this.renderConfig.dpr:0}else this.renderConfig.preserveAspectRatio==="none"?(this.transformCanvas.sx=n/(this.transformCanvas.w/this.renderConfig.dpr),this.transformCanvas.sy=i/(this.transformCanvas.h/this.renderConfig.dpr),this.transformCanvas.tx=0,this.transformCanvas.ty=0):(this.transformCanvas.sx=this.renderConfig.dpr,this.transformCanvas.sy=this.renderConfig.dpr,this.transformCanvas.tx=0,this.transformCanvas.ty=0);this.transformCanvas.props=[this.transformCanvas.sx,0,0,0,0,this.transformCanvas.sy,0,0,0,0,1,0,this.transformCanvas.tx,this.transformCanvas.ty,0,1],this.ctxTransform(this.transformCanvas.props),this.canvasContext.beginPath(),this.canvasContext.rect(0,0,this.transformCanvas.w,this.transformCanvas.h),this.canvasContext.closePath(),this.canvasContext.clip(),this.renderFrame(this.renderedFrame,!0)},CanvasRendererBase.prototype.destroy=function(){var e;for(this.renderConfig.clearCanvas&&this.animationItem.wrapper&&(this.animationItem.wrapper.innerText=""),e=(this.layers?this.layers.length:0)-1;e>=0;e-=1)this.elements[e]&&this.elements[e].destroy&&this.elements[e].destroy();this.elements.length=0,this.globalData.canvasContext=null,this.animationItem.container=null,this.destroyed=!0},CanvasRendererBase.prototype.renderFrame=function(e,t){if((this.renderedFrame!==e||this.renderConfig.clearCanvas!==!0||t)&&!this.destroyed&&e!==-1){var n;this.renderedFrame=e,this.globalData.frameNum=e-this.animationItem._isFirstFrame,this.globalData.frameId+=1,this.globalData._mdf=!this.renderConfig.clearCanvas||t,this.globalData.projectInterface.currentFrame=e;var i=this.layers.length;for(this.completeLayers||this.checkLayers(e),n=i-1;n>=0;n-=1)(this.completeLayers||this.elements[n])&&this.elements[n].prepareFrame(e-this.layers[n].st);if(this.globalData._mdf){for(this.renderConfig.clearCanvas===!0?this.canvasContext.clearRect(0,0,this.transformCanvas.w,this.transformCanvas.h):this.save(),n=i-1;n>=0;n-=1)(this.completeLayers||this.elements[n])&&this.elements[n].renderFrame();this.renderConfig.clearCanvas!==!0&&this.restore()}}},CanvasRendererBase.prototype.buildItem=function(e){var t=this.elements;if(!t[e]&&this.layers[e].ty!==99){var n=this.createItem(this.layers[e],this,this.globalData);t[e]=n,n.initExpressions()}},CanvasRendererBase.prototype.checkPendingElements=function(){for(;this.pendingElements.length;)this.pendingElements.pop().checkParenting()},CanvasRendererBase.prototype.hide=function(){this.animationItem.container.style.display="none"},CanvasRendererBase.prototype.show=function(){this.animationItem.container.style.display="block"},CVContextData.prototype.duplicate=function(){var e=2*this._length,t=0;for(t=this._length;t<e;t+=1)this.stack[t]=new CanvasContext;this._length=e},CVContextData.prototype.reset=function(){this.cArrPos=0,this.cTr.reset(),this.stack[this.cArrPos].opacity=1},CVContextData.prototype.restore=function(e){this.cArrPos-=1;var t,n=this.stack[this.cArrPos],i=n.transform,o=this.cTr.props;for(t=0;t<16;t+=1)o[t]=i[t];if(e){this.nativeContext.restore();var l=this.stack[this.cArrPos+1];this.appliedFillStyle=l.fillStyle,this.appliedStrokeStyle=l.strokeStyle,this.appliedLineWidth=l.lineWidth,this.appliedLineCap=l.lineCap,this.appliedLineJoin=l.lineJoin,this.appliedMiterLimit=l.miterLimit}this.nativeContext.setTransform(i[0],i[1],i[4],i[5],i[12],i[13]),(e||n.opacity!==-1&&this.currentOpacity!==n.opacity)&&(this.nativeContext.globalAlpha=n.opacity,this.currentOpacity=n.opacity),this.currentFillStyle=n.fillStyle,this.currentStrokeStyle=n.strokeStyle,this.currentLineWidth=n.lineWidth,this.currentLineCap=n.lineCap,this.currentLineJoin=n.lineJoin,this.currentMiterLimit=n.miterLimit},CVContextData.prototype.save=function(e){e&&this.nativeContext.save();var t=this.cTr.props;this._length<=this.cArrPos&&this.duplicate();var n,i=this.stack[this.cArrPos];for(n=0;n<16;n+=1)i.transform[n]=t[n];this.cArrPos+=1;var o=this.stack[this.cArrPos];o.opacity=i.opacity,o.fillStyle=i.fillStyle,o.strokeStyle=i.strokeStyle,o.lineWidth=i.lineWidth,o.lineCap=i.lineCap,o.lineJoin=i.lineJoin,o.miterLimit=i.miterLimit},CVContextData.prototype.setOpacity=function(e){this.stack[this.cArrPos].opacity=e},CVContextData.prototype.setContext=function(e){this.nativeContext=e},CVContextData.prototype.fillStyle=function(e){this.stack[this.cArrPos].fillStyle!==e&&(this.currentFillStyle=e,this.stack[this.cArrPos].fillStyle=e)},CVContextData.prototype.strokeStyle=function(e){this.stack[this.cArrPos].strokeStyle!==e&&(this.currentStrokeStyle=e,this.stack[this.cArrPos].strokeStyle=e)},CVContextData.prototype.lineWidth=function(e){this.stack[this.cArrPos].lineWidth!==e&&(this.currentLineWidth=e,this.stack[this.cArrPos].lineWidth=e)},CVContextData.prototype.lineCap=function(e){this.stack[this.cArrPos].lineCap!==e&&(this.currentLineCap=e,this.stack[this.cArrPos].lineCap=e)},CVContextData.prototype.lineJoin=function(e){this.stack[this.cArrPos].lineJoin!==e&&(this.currentLineJoin=e,this.stack[this.cArrPos].lineJoin=e)},CVContextData.prototype.miterLimit=function(e){this.stack[this.cArrPos].miterLimit!==e&&(this.currentMiterLimit=e,this.stack[this.cArrPos].miterLimit=e)},CVContextData.prototype.transform=function(e){this.transformMat.cloneFromProps(e);var t=this.cTr;this.transformMat.multiply(t),t.cloneFromProps(this.transformMat.props);var n=t.props;this.nativeContext.setTransform(n[0],n[1],n[4],n[5],n[12],n[13])},CVContextData.prototype.opacity=function(e){var t=this.stack[this.cArrPos].opacity;t*=e<0?0:e,this.stack[this.cArrPos].opacity!==t&&(this.currentOpacity!==e&&(this.nativeContext.globalAlpha=e,this.currentOpacity=e),this.stack[this.cArrPos].opacity=t)},CVContextData.prototype.fill=function(e){this.appliedFillStyle!==this.currentFillStyle&&(this.appliedFillStyle=this.currentFillStyle,this.nativeContext.fillStyle=this.appliedFillStyle),this.nativeContext.fill(e)},CVContextData.prototype.fillRect=function(e,t,n,i){this.appliedFillStyle!==this.currentFillStyle&&(this.appliedFillStyle=this.currentFillStyle,this.nativeContext.fillStyle=this.appliedFillStyle),this.nativeContext.fillRect(e,t,n,i)},CVContextData.prototype.stroke=function(){this.appliedStrokeStyle!==this.currentStrokeStyle&&(this.appliedStrokeStyle=this.currentStrokeStyle,this.nativeContext.strokeStyle=this.appliedStrokeStyle),this.appliedLineWidth!==this.currentLineWidth&&(this.appliedLineWidth=this.currentLineWidth,this.nativeContext.lineWidth=this.appliedLineWidth),this.appliedLineCap!==this.currentLineCap&&(this.appliedLineCap=this.currentLineCap,this.nativeContext.lineCap=this.appliedLineCap),this.appliedLineJoin!==this.currentLineJoin&&(this.appliedLineJoin=this.currentLineJoin,this.nativeContext.lineJoin=this.appliedLineJoin),this.appliedMiterLimit!==this.currentMiterLimit&&(this.appliedMiterLimit=this.currentMiterLimit,this.nativeContext.miterLimit=this.appliedMiterLimit),this.nativeContext.stroke()},extendPrototype([CanvasRendererBase,ICompElement,CVBaseElement],CVCompElement),CVCompElement.prototype.renderInnerContent=function(){var e,t=this.canvasContext;for(t.beginPath(),t.moveTo(0,0),t.lineTo(this.data.w,0),t.lineTo(this.data.w,this.data.h),t.lineTo(0,this.data.h),t.lineTo(0,0),t.clip(),e=this.layers.length-1;e>=0;e-=1)(this.completeLayers||this.elements[e])&&this.elements[e].renderFrame()},CVCompElement.prototype.destroy=function(){var e;for(e=this.layers.length-1;e>=0;e-=1)this.elements[e]&&this.elements[e].destroy();this.layers=null,this.elements=null},CVCompElement.prototype.createComp=function(e){return new CVCompElement(e,this.globalData,this)},extendPrototype([CanvasRendererBase],CanvasRenderer),CanvasRenderer.prototype.createComp=function(e){return new CVCompElement(e,this.globalData,this)},HBaseElement.prototype={checkBlendMode:function(){},initRendererElement:function(){this.baseElement=createTag(this.data.tg||"div"),this.data.hasMask?(this.svgElement=createNS("svg"),this.layerElement=createNS("g"),this.maskedElement=this.layerElement,this.svgElement.appendChild(this.layerElement),this.baseElement.appendChild(this.svgElement)):this.layerElement=this.baseElement,styleDiv(this.baseElement)},createContainerElements:function(){this.renderableEffectsManager=new CVEffects(this),this.transformedElement=this.baseElement,this.maskedElement=this.layerElement,this.data.ln&&this.layerElement.setAttribute("id",this.data.ln),this.data.cl&&this.layerElement.setAttribute("class",this.data.cl),this.data.bm!==0&&this.setBlendMode()},renderElement:function(){var e=this.transformedElement?this.transformedElement.style:{};if(this.finalTransform._matMdf){var t=this.finalTransform.mat.toCSS();e.transform=t,e.webkitTransform=t}this.finalTransform._opMdf&&(e.opacity=this.finalTransform.mProp.o.v)},renderFrame:function(){this.data.hd||this.hidden||(this.renderTransform(),this.renderRenderable(),this.renderElement(),this.renderInnerContent(),this._isFirstFrame&&(this._isFirstFrame=!1))},destroy:function(){this.layerElement=null,this.transformedElement=null,this.matteElement&&(this.matteElement=null),this.maskManager&&(this.maskManager.destroy(),this.maskManager=null)},createRenderableComponents:function(){this.maskManager=new MaskElement(this.data,this,this.globalData)},addEffects:function(){},setMatte:function(){}},HBaseElement.prototype.getBaseElement=SVGBaseElement.prototype.getBaseElement,HBaseElement.prototype.destroyBaseElement=HBaseElement.prototype.destroy,HBaseElement.prototype.buildElementParenting=BaseRenderer.prototype.buildElementParenting,extendPrototype([BaseElement,TransformElement,HBaseElement,HierarchyElement,FrameElement,RenderableDOMElement],HSolidElement),HSolidElement.prototype.createContent=function(){var e;this.data.hasMask?((e=createNS("rect")).setAttribute("width",this.data.sw),e.setAttribute("height",this.data.sh),e.setAttribute("fill",this.data.sc),this.svgElement.setAttribute("width",this.data.sw),this.svgElement.setAttribute("height",this.data.sh)):((e=createTag("div")).style.width=this.data.sw+"px",e.style.height=this.data.sh+"px",e.style.backgroundColor=this.data.sc),this.layerElement.appendChild(e)},extendPrototype([BaseElement,TransformElement,HSolidElement,SVGShapeElement,HBaseElement,HierarchyElement,FrameElement,RenderableElement],HShapeElement),HShapeElement.prototype._renderShapeFrame=HShapeElement.prototype.renderInnerContent,HShapeElement.prototype.createContent=function(){var e;if(this.baseElement.style.fontSize=0,this.data.hasMask)this.layerElement.appendChild(this.shapesContainer),e=this.svgElement;else{e=createNS("svg");var t=this.comp.data?this.comp.data:this.globalData.compSize;e.setAttribute("width",t.w),e.setAttribute("height",t.h),e.appendChild(this.shapesContainer),this.layerElement.appendChild(e)}this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.shapesContainer,0,[],!0),this.filterUniqueShapes(),this.shapeCont=e},HShapeElement.prototype.getTransformedPoint=function(e,t){var n,i=e.length;for(n=0;n<i;n+=1)t=e[n].mProps.v.applyToPointArray(t[0],t[1],0);return t},HShapeElement.prototype.calculateShapeBoundingBox=function(e,t){var n,i,o,l,u,d=e.sh.v,f=e.transformers,p=d._length;if(!(p<=1)){for(n=0;n<p-1;n+=1)i=this.getTransformedPoint(f,d.v[n]),o=this.getTransformedPoint(f,d.o[n]),l=this.getTransformedPoint(f,d.i[n+1]),u=this.getTransformedPoint(f,d.v[n+1]),this.checkBounds(i,o,l,u,t);d.c&&(i=this.getTransformedPoint(f,d.v[n]),o=this.getTransformedPoint(f,d.o[n]),l=this.getTransformedPoint(f,d.i[0]),u=this.getTransformedPoint(f,d.v[0]),this.checkBounds(i,o,l,u,t))}},HShapeElement.prototype.checkBounds=function(e,t,n,i,o){this.getBoundsOfCurve(e,t,n,i);var l=this.shapeBoundingBox;o.x=bmMin(l.left,o.x),o.xMax=bmMax(l.right,o.xMax),o.y=bmMin(l.top,o.y),o.yMax=bmMax(l.bottom,o.yMax)},HShapeElement.prototype.shapeBoundingBox={left:0,right:0,top:0,bottom:0},HShapeElement.prototype.tempBoundingBox={x:0,xMax:0,y:0,yMax:0,width:0,height:0},HShapeElement.prototype.getBoundsOfCurve=function(e,t,n,i){for(var o,l,u,d,f,p,m,g=[[e[0],i[0]],[e[1],i[1]]],b=0;b<2;++b)l=6*e[b]-12*t[b]+6*n[b],o=-3*e[b]+9*t[b]-9*n[b]+3*i[b],u=3*t[b]-3*e[b],l|=0,u|=0,(o|=0)===0&&l===0||(o===0?(d=-u/l)>0&&d<1&&g[b].push(this.calculateF(d,e,t,n,i,b)):(f=l*l-4*u*o)>=0&&((p=(-l+bmSqrt(f))/(2*o))>0&&p<1&&g[b].push(this.calculateF(p,e,t,n,i,b)),(m=(-l-bmSqrt(f))/(2*o))>0&&m<1&&g[b].push(this.calculateF(m,e,t,n,i,b))));this.shapeBoundingBox.left=bmMin.apply(null,g[0]),this.shapeBoundingBox.top=bmMin.apply(null,g[1]),this.shapeBoundingBox.right=bmMax.apply(null,g[0]),this.shapeBoundingBox.bottom=bmMax.apply(null,g[1])},HShapeElement.prototype.calculateF=function(e,t,n,i,o,l){return bmPow(1-e,3)*t[l]+3*bmPow(1-e,2)*e*n[l]+3*(1-e)*bmPow(e,2)*i[l]+bmPow(e,3)*o[l]},HShapeElement.prototype.calculateBoundingBox=function(e,t){var n,i=e.length;for(n=0;n<i;n+=1)e[n]&&e[n].sh?this.calculateShapeBoundingBox(e[n],t):e[n]&&e[n].it?this.calculateBoundingBox(e[n].it,t):e[n]&&e[n].style&&e[n].w&&this.expandStrokeBoundingBox(e[n].w,t)},HShapeElement.prototype.expandStrokeBoundingBox=function(e,t){var n=0;if(e.keyframes){for(var i=0;i<e.keyframes.length;i+=1){var o=e.keyframes[i].s;o>n&&(n=o)}n*=e.mult}else n=e.v*e.mult;t.x-=n,t.xMax+=n,t.y-=n,t.yMax+=n},HShapeElement.prototype.currentBoxContains=function(e){return this.currentBBox.x<=e.x&&this.currentBBox.y<=e.y&&this.currentBBox.width+this.currentBBox.x>=e.x+e.width&&this.currentBBox.height+this.currentBBox.y>=e.y+e.height},HShapeElement.prototype.renderInnerContent=function(){if(this._renderShapeFrame(),!this.hidden&&(this._isFirstFrame||this._mdf)){var e=this.tempBoundingBox,t=999999;if(e.x=t,e.xMax=-t,e.y=t,e.yMax=-t,this.calculateBoundingBox(this.itemsData,e),e.width=e.xMax<e.x?0:e.xMax-e.x,e.height=e.yMax<e.y?0:e.yMax-e.y,this.currentBoxContains(e))return;var n=!1;if(this.currentBBox.w!==e.width&&(this.currentBBox.w=e.width,this.shapeCont.setAttribute("width",e.width),n=!0),this.currentBBox.h!==e.height&&(this.currentBBox.h=e.height,this.shapeCont.setAttribute("height",e.height),n=!0),n||this.currentBBox.x!==e.x||this.currentBBox.y!==e.y){this.currentBBox.w=e.width,this.currentBBox.h=e.height,this.currentBBox.x=e.x,this.currentBBox.y=e.y,this.shapeCont.setAttribute("viewBox",this.currentBBox.x+" "+this.currentBBox.y+" "+this.currentBBox.w+" "+this.currentBBox.h);var i=this.shapeCont.style,o="translate("+this.currentBBox.x+"px,"+this.currentBBox.y+"px)";i.transform=o,i.webkitTransform=o}}},extendPrototype([BaseElement,TransformElement,HBaseElement,HierarchyElement,FrameElement,RenderableDOMElement,ITextElement],HTextElement),HTextElement.prototype.createContent=function(){if(this.isMasked=this.checkMasks(),this.isMasked){this.renderType="svg",this.compW=this.comp.data.w,this.compH=this.comp.data.h,this.svgElement.setAttribute("width",this.compW),this.svgElement.setAttribute("height",this.compH);var e=createNS("g");this.maskedElement.appendChild(e),this.innerElem=e}else this.renderType="html",this.innerElem=this.layerElement;this.checkParenting()},HTextElement.prototype.buildNewText=function(){var e=this.textProperty.currentData;this.renderedLetters=createSizedArray(e.l?e.l.length:0);var t=this.innerElem.style,n=e.fc?this.buildColor(e.fc):"rgba(0,0,0,0)";t.fill=n,t.color=n,e.sc&&(t.stroke=this.buildColor(e.sc),t.strokeWidth=e.sw+"px");var i,o,l=this.globalData.fontManager.getFontByName(e.f);if(!this.globalData.fontManager.chars)if(t.fontSize=e.finalSize+"px",t.lineHeight=e.finalSize+"px",l.fClass)this.innerElem.className=l.fClass;else{t.fontFamily=l.fFamily;var u=e.fWeight,d=e.fStyle;t.fontStyle=d,t.fontWeight=u}var f,p,m,g=e.l;o=g.length;var b,_=this.mHelper,R="",E=0;for(i=0;i<o;i+=1){if(this.globalData.fontManager.chars?(this.textPaths[E]?f=this.textPaths[E]:((f=createNS("path")).setAttribute("stroke-linecap",lineCapEnum[1]),f.setAttribute("stroke-linejoin",lineJoinEnum[2]),f.setAttribute("stroke-miterlimit","4")),this.isMasked||(this.textSpans[E]?m=(p=this.textSpans[E]).children[0]:((p=createTag("div")).style.lineHeight=0,(m=createNS("svg")).appendChild(f),styleDiv(p)))):this.isMasked?f=this.textPaths[E]?this.textPaths[E]:createNS("text"):this.textSpans[E]?(p=this.textSpans[E],f=this.textPaths[E]):(styleDiv(p=createTag("span")),styleDiv(f=createTag("span")),p.appendChild(f)),this.globalData.fontManager.chars){var S,C=this.globalData.fontManager.getCharData(e.finalText[i],l.fStyle,this.globalData.fontManager.getFontByName(e.f).fFamily);if(S=C?C.data:null,_.reset(),S&&S.shapes&&S.shapes.length&&(b=S.shapes[0].it,_.scale(e.finalSize/100,e.finalSize/100),R=this.createPathShape(_,b),f.setAttribute("d",R)),this.isMasked)this.innerElem.appendChild(f);else{if(this.innerElem.appendChild(p),S&&S.shapes){document.body.appendChild(m);var T=m.getBBox();m.setAttribute("width",T.width+2),m.setAttribute("height",T.height+2),m.setAttribute("viewBox",T.x-1+" "+(T.y-1)+" "+(T.width+2)+" "+(T.height+2));var A=m.style,M="translate("+(T.x-1)+"px,"+(T.y-1)+"px)";A.transform=M,A.webkitTransform=M,g[i].yOffset=T.y-1}else m.setAttribute("width",1),m.setAttribute("height",1);p.appendChild(m)}}else if(f.textContent=g[i].val,f.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),this.isMasked)this.innerElem.appendChild(f);else{this.innerElem.appendChild(p);var I=f.style,O="translate3d(0,"+-e.finalSize/1.2+"px,0)";I.transform=O,I.webkitTransform=O}this.isMasked?this.textSpans[E]=f:this.textSpans[E]=p,this.textSpans[E].style.display="block",this.textPaths[E]=f,E+=1}for(;E<this.textSpans.length;)this.textSpans[E].style.display="none",E+=1},HTextElement.prototype.renderInnerContent=function(){var e;if(this.validateText(),this.data.singleShape){if(!this._isFirstFrame&&!this.lettersChangedFlag)return;if(this.isMasked&&this.finalTransform._matMdf){this.svgElement.setAttribute("viewBox",-this.finalTransform.mProp.p.v[0]+" "+-this.finalTransform.mProp.p.v[1]+" "+this.compW+" "+this.compH),e=this.svgElement.style;var t="translate("+-this.finalTransform.mProp.p.v[0]+"px,"+-this.finalTransform.mProp.p.v[1]+"px)";e.transform=t,e.webkitTransform=t}}if(this.textAnimator.getMeasures(this.textProperty.currentData,this.lettersChangedFlag),this.lettersChangedFlag||this.textAnimator.lettersChangedFlag){var n,i,o,l,u,d=0,f=this.textAnimator.renderedLetters,p=this.textProperty.currentData.l;for(i=p.length,n=0;n<i;n+=1)p[n].n?d+=1:(l=this.textSpans[n],u=this.textPaths[n],o=f[d],d+=1,o._mdf.m&&(this.isMasked?l.setAttribute("transform",o.m):(l.style.webkitTransform=o.m,l.style.transform=o.m)),l.style.opacity=o.o,o.sw&&o._mdf.sw&&u.setAttribute("stroke-width",o.sw),o.sc&&o._mdf.sc&&u.setAttribute("stroke",o.sc),o.fc&&o._mdf.fc&&(u.setAttribute("fill",o.fc),u.style.color=o.fc));if(this.innerElem.getBBox&&!this.hidden&&(this._isFirstFrame||this._mdf)){var m=this.innerElem.getBBox();if(this.currentBBox.w!==m.width&&(this.currentBBox.w=m.width,this.svgElement.setAttribute("width",m.width)),this.currentBBox.h!==m.height&&(this.currentBBox.h=m.height,this.svgElement.setAttribute("height",m.height)),this.currentBBox.w!==m.width+2||this.currentBBox.h!==m.height+2||this.currentBBox.x!==m.x-1||this.currentBBox.y!==m.y-1){this.currentBBox.w=m.width+2,this.currentBBox.h=m.height+2,this.currentBBox.x=m.x-1,this.currentBBox.y=m.y-1,this.svgElement.setAttribute("viewBox",this.currentBBox.x+" "+this.currentBBox.y+" "+this.currentBBox.w+" "+this.currentBBox.h),e=this.svgElement.style;var g="translate("+this.currentBBox.x+"px,"+this.currentBBox.y+"px)";e.transform=g,e.webkitTransform=g}}}},extendPrototype([BaseElement,FrameElement,HierarchyElement],HCameraElement),HCameraElement.prototype.setup=function(){var e,t,n,i,o=this.comp.threeDElements.length;for(e=0;e<o;e+=1)if((t=this.comp.threeDElements[e]).type==="3d"){n=t.perspectiveElem.style,i=t.container.style;var l=this.pe.v+"px",u="matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)";n.perspective=l,n.webkitPerspective=l,i.transformOrigin="0px 0px 0px",i.mozTransformOrigin="0px 0px 0px",i.webkitTransformOrigin="0px 0px 0px",n.transform=u,n.webkitTransform=u}},HCameraElement.prototype.createElements=function(){},HCameraElement.prototype.hide=function(){},HCameraElement.prototype.renderFrame=function(){var e,t,n=this._isFirstFrame;if(this.hierarchy)for(t=this.hierarchy.length,e=0;e<t;e+=1)n=this.hierarchy[e].finalTransform.mProp._mdf||n;if(n||this.pe._mdf||this.p&&this.p._mdf||this.px&&(this.px._mdf||this.py._mdf||this.pz._mdf)||this.rx._mdf||this.ry._mdf||this.rz._mdf||this.or._mdf||this.a&&this.a._mdf){if(this.mat.reset(),this.hierarchy)for(e=t=this.hierarchy.length-1;e>=0;e-=1){var i=this.hierarchy[e].finalTransform.mProp;this.mat.translate(-i.p.v[0],-i.p.v[1],i.p.v[2]),this.mat.rotateX(-i.or.v[0]).rotateY(-i.or.v[1]).rotateZ(i.or.v[2]),this.mat.rotateX(-i.rx.v).rotateY(-i.ry.v).rotateZ(i.rz.v),this.mat.scale(1/i.s.v[0],1/i.s.v[1],1/i.s.v[2]),this.mat.translate(i.a.v[0],i.a.v[1],i.a.v[2])}if(this.p?this.mat.translate(-this.p.v[0],-this.p.v[1],this.p.v[2]):this.mat.translate(-this.px.v,-this.py.v,this.pz.v),this.a){var o;o=this.p?[this.p.v[0]-this.a.v[0],this.p.v[1]-this.a.v[1],this.p.v[2]-this.a.v[2]]:[this.px.v-this.a.v[0],this.py.v-this.a.v[1],this.pz.v-this.a.v[2]];var l=Math.sqrt(Math.pow(o[0],2)+Math.pow(o[1],2)+Math.pow(o[2],2)),u=[o[0]/l,o[1]/l,o[2]/l],d=Math.sqrt(u[2]*u[2]+u[0]*u[0]),f=Math.atan2(u[1],d),p=Math.atan2(u[0],-u[2]);this.mat.rotateY(p).rotateX(-f)}this.mat.rotateX(-this.rx.v).rotateY(-this.ry.v).rotateZ(this.rz.v),this.mat.rotateX(-this.or.v[0]).rotateY(-this.or.v[1]).rotateZ(this.or.v[2]),this.mat.translate(this.globalData.compSize.w/2,this.globalData.compSize.h/2,0),this.mat.translate(0,0,this.pe.v);var m=!this._prevMat.equals(this.mat);if((m||this.pe._mdf)&&this.comp.threeDElements){var g,b,_;for(t=this.comp.threeDElements.length,e=0;e<t;e+=1)if((g=this.comp.threeDElements[e]).type==="3d"){if(m){var R=this.mat.toCSS();(_=g.container.style).transform=R,_.webkitTransform=R}this.pe._mdf&&((b=g.perspectiveElem.style).perspective=this.pe.v+"px",b.webkitPerspective=this.pe.v+"px")}this.mat.clone(this._prevMat)}}this._isFirstFrame=!1},HCameraElement.prototype.prepareFrame=function(e){this.prepareProperties(e,!0)},HCameraElement.prototype.destroy=function(){},HCameraElement.prototype.getBaseElement=function(){return null},extendPrototype([BaseElement,TransformElement,HBaseElement,HSolidElement,HierarchyElement,FrameElement,RenderableElement],HImageElement),HImageElement.prototype.createContent=function(){var e=this.globalData.getAssetsPath(this.assetData),t=new Image;this.data.hasMask?(this.imageElem=createNS("image"),this.imageElem.setAttribute("width",this.assetData.w+"px"),this.imageElem.setAttribute("height",this.assetData.h+"px"),this.imageElem.setAttributeNS("http://www.w3.org/1999/xlink","href",e),this.layerElement.appendChild(this.imageElem),this.baseElement.setAttribute("width",this.assetData.w),this.baseElement.setAttribute("height",this.assetData.h)):this.layerElement.appendChild(t),t.crossOrigin="anonymous",t.src=e,this.data.ln&&this.baseElement.setAttribute("id",this.data.ln)},extendPrototype([BaseRenderer],HybridRendererBase),HybridRendererBase.prototype.buildItem=SVGRenderer.prototype.buildItem,HybridRendererBase.prototype.checkPendingElements=function(){for(;this.pendingElements.length;)this.pendingElements.pop().checkParenting()},HybridRendererBase.prototype.appendElementInPos=function(e,t){var n=e.getBaseElement();if(n){var i=this.layers[t];if(i.ddd&&this.supports3d)this.addTo3dContainer(n,t);else if(this.threeDElements)this.addTo3dContainer(n,t);else{for(var o,l,u=0;u<t;)this.elements[u]&&this.elements[u]!==!0&&this.elements[u].getBaseElement&&(l=this.elements[u],o=(this.layers[u].ddd?this.getThreeDContainerByPos(u):l.getBaseElement())||o),u+=1;o?i.ddd&&this.supports3d||this.layerElement.insertBefore(n,o):i.ddd&&this.supports3d||this.layerElement.appendChild(n)}}},HybridRendererBase.prototype.createShape=function(e){return this.supports3d?new HShapeElement(e,this.globalData,this):new SVGShapeElement(e,this.globalData,this)},HybridRendererBase.prototype.createText=function(e){return this.supports3d?new HTextElement(e,this.globalData,this):new SVGTextLottieElement(e,this.globalData,this)},HybridRendererBase.prototype.createCamera=function(e){return this.camera=new HCameraElement(e,this.globalData,this),this.camera},HybridRendererBase.prototype.createImage=function(e){return this.supports3d?new HImageElement(e,this.globalData,this):new IImageElement(e,this.globalData,this)},HybridRendererBase.prototype.createSolid=function(e){return this.supports3d?new HSolidElement(e,this.globalData,this):new ISolidElement(e,this.globalData,this)},HybridRendererBase.prototype.createNull=SVGRenderer.prototype.createNull,HybridRendererBase.prototype.getThreeDContainerByPos=function(e){for(var t=0,n=this.threeDElements.length;t<n;){if(this.threeDElements[t].startPos<=e&&this.threeDElements[t].endPos>=e)return this.threeDElements[t].perspectiveElem;t+=1}return null},HybridRendererBase.prototype.createThreeDContainer=function(e,t){var n,i,o=createTag("div");styleDiv(o);var l=createTag("div");if(styleDiv(l),t==="3d"){(n=o.style).width=this.globalData.compSize.w+"px",n.height=this.globalData.compSize.h+"px",n.webkitTransformOrigin="50% 50%",n.mozTransformOrigin="50% 50%",n.transformOrigin="50% 50%";var u="matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)";(i=l.style).transform=u,i.webkitTransform=u}o.appendChild(l);var d={container:l,perspectiveElem:o,startPos:e,endPos:e,type:t};return this.threeDElements.push(d),d},HybridRendererBase.prototype.build3dContainers=function(){var e,t,n=this.layers.length,i="";for(e=0;e<n;e+=1)this.layers[e].ddd&&this.layers[e].ty!==3?(i!=="3d"&&(i="3d",t=this.createThreeDContainer(e,"3d")),t.endPos=Math.max(t.endPos,e)):(i!=="2d"&&(i="2d",t=this.createThreeDContainer(e,"2d")),t.endPos=Math.max(t.endPos,e));for(e=(n=this.threeDElements.length)-1;e>=0;e-=1)this.resizerElem.appendChild(this.threeDElements[e].perspectiveElem)},HybridRendererBase.prototype.addTo3dContainer=function(e,t){for(var n=0,i=this.threeDElements.length;n<i;){if(t<=this.threeDElements[n].endPos){for(var o,l=this.threeDElements[n].startPos;l<t;)this.elements[l]&&this.elements[l].getBaseElement&&(o=this.elements[l].getBaseElement()),l+=1;o?this.threeDElements[n].container.insertBefore(e,o):this.threeDElements[n].container.appendChild(e);break}n+=1}},HybridRendererBase.prototype.configAnimation=function(e){var t=createTag("div"),n=this.animationItem.wrapper,i=t.style;i.width=e.w+"px",i.height=e.h+"px",this.resizerElem=t,styleDiv(t),i.transformStyle="flat",i.mozTransformStyle="flat",i.webkitTransformStyle="flat",this.renderConfig.className&&t.setAttribute("class",this.renderConfig.className),n.appendChild(t),i.overflow="hidden";var o=createNS("svg");o.setAttribute("width","1"),o.setAttribute("height","1"),styleDiv(o),this.resizerElem.appendChild(o);var l=createNS("defs");o.appendChild(l),this.data=e,this.setupGlobalData(e,o),this.globalData.defs=l,this.layers=e.layers,this.layerElement=this.resizerElem,this.build3dContainers(),this.updateContainerSize()},HybridRendererBase.prototype.destroy=function(){var e;this.animationItem.wrapper&&(this.animationItem.wrapper.innerText=""),this.animationItem.container=null,this.globalData.defs=null;var t=this.layers?this.layers.length:0;for(e=0;e<t;e+=1)this.elements[e]&&this.elements[e].destroy&&this.elements[e].destroy();this.elements.length=0,this.destroyed=!0,this.animationItem=null},HybridRendererBase.prototype.updateContainerSize=function(){var e,t,n,i,o=this.animationItem.wrapper.offsetWidth,l=this.animationItem.wrapper.offsetHeight,u=o/l;this.globalData.compSize.w/this.globalData.compSize.h>u?(e=o/this.globalData.compSize.w,t=o/this.globalData.compSize.w,n=0,i=(l-this.globalData.compSize.h*(o/this.globalData.compSize.w))/2):(e=l/this.globalData.compSize.h,t=l/this.globalData.compSize.h,n=(o-this.globalData.compSize.w*(l/this.globalData.compSize.h))/2,i=0);var d=this.resizerElem.style;d.webkitTransform="matrix3d("+e+",0,0,0,0,"+t+",0,0,0,0,1,0,"+n+","+i+",0,1)",d.transform=d.webkitTransform},HybridRendererBase.prototype.renderFrame=SVGRenderer.prototype.renderFrame,HybridRendererBase.prototype.hide=function(){this.resizerElem.style.display="none"},HybridRendererBase.prototype.show=function(){this.resizerElem.style.display="block"},HybridRendererBase.prototype.initItems=function(){if(this.buildAllItems(),this.camera)this.camera.setup();else{var e,t=this.globalData.compSize.w,n=this.globalData.compSize.h,i=this.threeDElements.length;for(e=0;e<i;e+=1){var o=this.threeDElements[e].perspectiveElem.style;o.webkitPerspective=Math.sqrt(Math.pow(t,2)+Math.pow(n,2))+"px",o.perspective=o.webkitPerspective}}},HybridRendererBase.prototype.searchExtraCompositions=function(e){var t,n=e.length,i=createTag("div");for(t=0;t<n;t+=1)if(e[t].xt){var o=this.createComp(e[t],i,this.globalData.comp,null);o.initExpressions(),this.globalData.projectInterface.registerComposition(o)}},extendPrototype([HybridRendererBase,ICompElement,HBaseElement],HCompElement),HCompElement.prototype._createBaseContainerElements=HCompElement.prototype.createContainerElements,HCompElement.prototype.createContainerElements=function(){this._createBaseContainerElements(),this.data.hasMask?(this.svgElement.setAttribute("width",this.data.w),this.svgElement.setAttribute("height",this.data.h),this.transformedElement=this.baseElement):this.transformedElement=this.layerElement},HCompElement.prototype.addTo3dContainer=function(e,t){for(var n,i=0;i<t;)this.elements[i]&&this.elements[i].getBaseElement&&(n=this.elements[i].getBaseElement()),i+=1;n?this.layerElement.insertBefore(e,n):this.layerElement.appendChild(e)},HCompElement.prototype.createComp=function(e){return this.supports3d?new HCompElement(e,this.globalData,this):new SVGCompElement(e,this.globalData,this)},extendPrototype([HybridRendererBase],HybridRenderer),HybridRenderer.prototype.createComp=function(e){return this.supports3d?new HCompElement(e,this.globalData,this):new SVGCompElement(e,this.globalData,this)};var CompExpressionInterface=function(e){function t(n){for(var i=0,o=e.layers.length;i<o;){if(e.layers[i].nm===n||e.layers[i].ind===n)return e.elements[i].layerInterface;i+=1}return null}return Object.defineProperty(t,"_name",{value:e.data.nm}),t.layer=t,t.pixelAspect=1,t.height=e.data.h||e.globalData.compSize.h,t.width=e.data.w||e.globalData.compSize.w,t.pixelAspect=1,t.frameDuration=1/e.globalData.frameRate,t.displayStartTime=0,t.numLayers=e.layers.length,t};function _typeof$2(e){return(_typeof$2=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}function seedRandom(e,t){var n=this,i=t.pow(256,6),o=t.pow(2,52),l=2*o;function u(m){var g,b=m.length,_=this,R=0,E=_.i=_.j=0,S=_.S=[];for(b||(m=[b++]);R<256;)S[R]=R++;for(R=0;R<256;R++)S[R]=S[E=255&E+m[R%b]+(g=S[R])],S[E]=g;_.g=function(C){for(var T,A=0,M=_.i,I=_.j,O=_.S;C--;)T=O[M=255&M+1],A=256*A+O[255&(O[M]=O[I=255&I+T])+(O[I]=T)];return _.i=M,_.j=I,A}}function d(m,g){return g.i=m.i,g.j=m.j,g.S=m.S.slice(),g}function f(m,g){for(var b,_=m+"",R=0;R<_.length;)g[255&R]=255&(b^=19*g[255&R])+_.charCodeAt(R++);return p(g)}function p(m){return String.fromCharCode.apply(0,m)}t.seedrandom=function(m,g,b){var _=[],R=f(function C(T,A){var M,I=[],O=_typeof$2(T);if(A&&O=="object")for(M in T)try{I.push(C(T[M],A-1))}catch{}return I.length?I:O=="string"?T:T+"\0"}((g=g===!0?{entropy:!0}:g||{}).entropy?[m,p(e)]:m===null?function(){try{var C=new Uint8Array(256);return(n.crypto||n.msCrypto).getRandomValues(C),p(C)}catch{var T=n.navigator,A=T&&T.plugins;return[+new Date,n,A,n.screen,p(e)]}}():m,3),_),E=new u(_),S=function(){for(var C=E.g(6),T=i,A=0;C<o;)C=256*(C+A),T*=256,A=E.g(1);for(;C>=l;)C/=2,T/=2,A>>>=1;return(C+A)/T};return S.int32=function(){return 0|E.g(4)},S.quick=function(){return E.g(4)/4294967296},S.double=S,f(p(E.S),e),(g.pass||b||function(C,T,A,M){return M&&(M.S&&d(M,E),C.state=function(){return d(E,{})}),A?(t.random=C,T):C})(S,R,"global"in g?g.global:this==t,g.state)},f(t.random(),e)}function initialize$2(e){seedRandom([],e)}var propTypes={SHAPE:"shape"};function _typeof$1(e){return(_typeof$1=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}var ExpressionManager=function(){var ob={},Math=BMMath,window=null,document=null,XMLHttpRequest=null,fetch=null,frames=null,_lottieGlobal={};function resetFrame(){_lottieGlobal={}}function $bm_isInstanceOfArray(e){return e.constructor===Array||e.constructor===Float32Array}function isNumerable(e,t){return e==="number"||t instanceof Number||e==="boolean"||e==="string"}function $bm_neg(e){var t=_typeof$1(e);if(t==="number"||e instanceof Number||t==="boolean")return-e;if($bm_isInstanceOfArray(e)){var n,i=e.length,o=[];for(n=0;n<i;n+=1)o[n]=-e[n];return o}return e.propType?e.v:-e}initialize$2(BMMath);var easeInBez=BezierFactory.getBezierEasing(.333,0,.833,.833,"easeIn").get,easeOutBez=BezierFactory.getBezierEasing(.167,.167,.667,1,"easeOut").get,easeInOutBez=BezierFactory.getBezierEasing(.33,0,.667,1,"easeInOut").get;function sum(e,t){var n=_typeof$1(e),i=_typeof$1(t);if(isNumerable(n,e)&&isNumerable(i,t)||n==="string"||i==="string")return e+t;if($bm_isInstanceOfArray(e)&&isNumerable(i,t))return(e=e.slice(0))[0]+=t,e;if(isNumerable(n,e)&&$bm_isInstanceOfArray(t))return(t=t.slice(0))[0]=e+t[0],t;if($bm_isInstanceOfArray(e)&&$bm_isInstanceOfArray(t)){for(var o=0,l=e.length,u=t.length,d=[];o<l||o<u;)(typeof e[o]=="number"||e[o]instanceof Number)&&(typeof t[o]=="number"||t[o]instanceof Number)?d[o]=e[o]+t[o]:d[o]=t[o]===void 0?e[o]:e[o]||t[o],o+=1;return d}return 0}var add=sum;function sub(e,t){var n=_typeof$1(e),i=_typeof$1(t);if(isNumerable(n,e)&&isNumerable(i,t))return n==="string"&&(e=parseInt(e,10)),i==="string"&&(t=parseInt(t,10)),e-t;if($bm_isInstanceOfArray(e)&&isNumerable(i,t))return(e=e.slice(0))[0]-=t,e;if(isNumerable(n,e)&&$bm_isInstanceOfArray(t))return(t=t.slice(0))[0]=e-t[0],t;if($bm_isInstanceOfArray(e)&&$bm_isInstanceOfArray(t)){for(var o=0,l=e.length,u=t.length,d=[];o<l||o<u;)(typeof e[o]=="number"||e[o]instanceof Number)&&(typeof t[o]=="number"||t[o]instanceof Number)?d[o]=e[o]-t[o]:d[o]=t[o]===void 0?e[o]:e[o]||t[o],o+=1;return d}return 0}function mul(e,t){var n,i,o,l=_typeof$1(e),u=_typeof$1(t);if(isNumerable(l,e)&&isNumerable(u,t))return e*t;if($bm_isInstanceOfArray(e)&&isNumerable(u,t)){for(o=e.length,n=createTypedArray("float32",o),i=0;i<o;i+=1)n[i]=e[i]*t;return n}if(isNumerable(l,e)&&$bm_isInstanceOfArray(t)){for(o=t.length,n=createTypedArray("float32",o),i=0;i<o;i+=1)n[i]=e*t[i];return n}return 0}function div(e,t){var n,i,o,l=_typeof$1(e),u=_typeof$1(t);if(isNumerable(l,e)&&isNumerable(u,t))return e/t;if($bm_isInstanceOfArray(e)&&isNumerable(u,t)){for(o=e.length,n=createTypedArray("float32",o),i=0;i<o;i+=1)n[i]=e[i]/t;return n}if(isNumerable(l,e)&&$bm_isInstanceOfArray(t)){for(o=t.length,n=createTypedArray("float32",o),i=0;i<o;i+=1)n[i]=e/t[i];return n}return 0}function mod(e,t){return typeof e=="string"&&(e=parseInt(e,10)),typeof t=="string"&&(t=parseInt(t,10)),e%t}var $bm_sum=sum,$bm_sub=sub,$bm_mul=mul,$bm_div=div,$bm_mod=mod;function clamp(e,t,n){if(t>n){var i=n;n=t,t=i}return Math.min(Math.max(e,t),n)}function radiansToDegrees(e){return e/degToRads}var radians_to_degrees=radiansToDegrees;function degreesToRadians(e){return e*degToRads}var degrees_to_radians=radiansToDegrees,helperLengthArray=[0,0,0,0,0,0];function length(e,t){if(typeof e=="number"||e instanceof Number)return t=t||0,Math.abs(e-t);var n;t||(t=helperLengthArray);var i=Math.min(e.length,t.length),o=0;for(n=0;n<i;n+=1)o+=Math.pow(t[n]-e[n],2);return Math.sqrt(o)}function normalize(e){return div(e,length(e))}function rgbToHsl(e){var t,n,i=e[0],o=e[1],l=e[2],u=Math.max(i,o,l),d=Math.min(i,o,l),f=(u+d)/2;if(u===d)t=0,n=0;else{var p=u-d;switch(n=f>.5?p/(2-u-d):p/(u+d),u){case i:t=(o-l)/p+(o<l?6:0);break;case o:t=(l-i)/p+2;break;case l:t=(i-o)/p+4}t/=6}return[t,n,f,e[3]]}function hue2rgb(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function hslToRgb(e){var t,n,i,o=e[0],l=e[1],u=e[2];if(l===0)t=u,i=u,n=u;else{var d=u<.5?u*(1+l):u+l-u*l,f=2*u-d;t=hue2rgb(f,d,o+1/3),n=hue2rgb(f,d,o),i=hue2rgb(f,d,o-1/3)}return[t,n,i,e[3]]}function linear(e,t,n,i,o){if(i!==void 0&&o!==void 0||(i=t,o=n,t=0,n=1),n<t){var l=n;n=t,t=l}if(e<=t)return i;if(e>=n)return o;var u,d=n===t?0:(e-t)/(n-t);if(!i.length)return i+(o-i)*d;var f=i.length,p=createTypedArray("float32",f);for(u=0;u<f;u+=1)p[u]=i[u]+(o[u]-i[u])*d;return p}function random(e,t){if(t===void 0&&(e===void 0?(e=0,t=1):(t=e,e=void 0)),t.length){var n,i=t.length;e||(e=createTypedArray("float32",i));var o=createTypedArray("float32",i),l=BMMath.random();for(n=0;n<i;n+=1)o[n]=e[n]+l*(t[n]-e[n]);return o}return e===void 0&&(e=0),e+BMMath.random()*(t-e)}function createPath(e,t,n,i){var o,l=e.length,u=shapePool.newElement();u.setPathData(!!i,l);var d,f,p=[0,0];for(o=0;o<l;o+=1)d=t&&t[o]?t[o]:p,f=n&&n[o]?n[o]:p,u.setTripleAt(e[o][0],e[o][1],f[0]+e[o][0],f[1]+e[o][1],d[0]+e[o][0],d[1]+e[o][1],o,!0);return u}function initiateExpression(elem,data,property){function noOp(e){return e}if(!elem.globalData.renderConfig.runExpressions)return noOp;var val=data.x,needsVelocity=/velocity(?![\w\d])/.test(val),_needsRandom=val.indexOf("random")!==-1,elemType=elem.data.ty,transform,$bm_transform,content,effect,thisProperty=property;thisProperty.valueAtTime=thisProperty.getValueAtTime,Object.defineProperty(thisProperty,"value",{get:function(){return thisProperty.v}}),elem.comp.frameDuration=1/elem.comp.globalData.frameRate,elem.comp.displayStartTime=0;var inPoint=elem.data.ip/elem.comp.globalData.frameRate,outPoint=elem.data.op/elem.comp.globalData.frameRate,width=elem.data.sw?elem.data.sw:0,height=elem.data.sh?elem.data.sh:0,name=elem.data.nm,loopIn,loop_in,loopOut,loop_out,smooth,toWorld,fromWorld,fromComp,toComp,fromCompToSurface,position,rotation,anchorPoint,scale,thisLayer,thisComp,mask,valueAtTime,velocityAtTime,scoped_bm_rt,expression_function=eval("[function _expression_function(){"+val+";scoped_bm_rt=$bm_rt}]")[0],numKeys=property.kf?data.k.length:0,active=!this.data||this.data.hd!==!0,wiggle=(function(e,t){var n,i,o=this.pv.length?this.pv.length:1,l=createTypedArray("float32",o),u=Math.floor(5*time);for(n=0,i=0;n<u;){for(i=0;i<o;i+=1)l[i]+=-t+2*t*BMMath.random();n+=1}var d=5*time,f=d-Math.floor(d),p=createTypedArray("float32",o);if(o>1){for(i=0;i<o;i+=1)p[i]=this.pv[i]+l[i]+(-t+2*t*BMMath.random())*f;return p}return this.pv+l[0]+(-t+2*t*BMMath.random())*f}).bind(this);function loopInDuration(e,t){return loopIn(e,t,!0)}function loopOutDuration(e,t){return loopOut(e,t,!0)}thisProperty.loopIn&&(loopIn=thisProperty.loopIn.bind(thisProperty),loop_in=loopIn),thisProperty.loopOut&&(loopOut=thisProperty.loopOut.bind(thisProperty),loop_out=loopOut),thisProperty.smooth&&(smooth=thisProperty.smooth.bind(thisProperty)),this.getValueAtTime&&(valueAtTime=this.getValueAtTime.bind(this)),this.getVelocityAtTime&&(velocityAtTime=this.getVelocityAtTime.bind(this));var comp=elem.comp.globalData.projectInterface.bind(elem.comp.globalData.projectInterface),time,velocity,value,text,textIndex,textTotal,selectorValue;function lookAt(e,t){var n=[t[0]-e[0],t[1]-e[1],t[2]-e[2]],i=Math.atan2(n[0],Math.sqrt(n[1]*n[1]+n[2]*n[2]))/degToRads;return[-Math.atan2(n[1],n[2])/degToRads,i,0]}function easeOut(e,t,n,i,o){return applyEase(easeOutBez,e,t,n,i,o)}function easeIn(e,t,n,i,o){return applyEase(easeInBez,e,t,n,i,o)}function ease(e,t,n,i,o){return applyEase(easeInOutBez,e,t,n,i,o)}function applyEase(e,t,n,i,o,l){o===void 0?(o=n,l=i):t=(t-n)/(i-n),t>1?t=1:t<0&&(t=0);var u=e(t);if($bm_isInstanceOfArray(o)){var d,f=o.length,p=createTypedArray("float32",f);for(d=0;d<f;d+=1)p[d]=(l[d]-o[d])*u+o[d];return p}return(l-o)*u+o}function nearestKey(e){var t,n,i,o=data.k.length;if(data.k.length&&typeof data.k[0]!="number")if(n=-1,(e*=elem.comp.globalData.frameRate)<data.k[0].t)n=1,i=data.k[0].t;else{for(t=0;t<o-1;t+=1){if(e===data.k[t].t){n=t+1,i=data.k[t].t;break}if(e>data.k[t].t&&e<data.k[t+1].t){e-data.k[t].t>data.k[t+1].t-e?(n=t+2,i=data.k[t+1].t):(n=t+1,i=data.k[t].t);break}}n===-1&&(n=t+1,i=data.k[t].t)}else n=0,i=0;var l={};return l.index=n,l.time=i/elem.comp.globalData.frameRate,l}function key(e){var t,n,i;if(!data.k.length||typeof data.k[0]=="number")throw new Error("The property has no keyframe at index "+e);e-=1,t={time:data.k[e].t/elem.comp.globalData.frameRate,value:[]};var o=Object.prototype.hasOwnProperty.call(data.k[e],"s")?data.k[e].s:data.k[e-1].e;for(i=o.length,n=0;n<i;n+=1)t[n]=o[n],t.value[n]=o[n];return t}function framesToTime(e,t){return t||(t=elem.comp.globalData.frameRate),e/t}function timeToFrames(e,t){return e||e===0||(e=time),t||(t=elem.comp.globalData.frameRate),e*t}function seedRandom(e){BMMath.seedrandom(randSeed+e)}function sourceRectAtTime(){return elem.sourceRectAtTime()}function substring(e,t){return typeof value=="string"?t===void 0?value.substring(e):value.substring(e,t):""}function substr(e,t){return typeof value=="string"?t===void 0?value.substr(e):value.substr(e,t):""}function posterizeTime(e){time=e===0?0:Math.floor(time*e)/e,value=valueAtTime(time)}var index=elem.data.ind;!elem.hierarchy||elem.hierarchy.length;var parent,randSeed=Math.floor(1e6*Math.random()),globalData=elem.globalData;function executeExpression(e){return value=e,this.frameExpressionId===elem.globalData.frameId&&this.propType!=="textSelector"?value:(this.propType==="textSelector"&&(textIndex=this.textIndex,textTotal=this.textTotal,selectorValue=this.selectorValue),thisLayer||(text=elem.layerInterface.text,thisLayer=elem.layerInterface,thisComp=elem.comp.compInterface,toWorld=thisLayer.toWorld.bind(thisLayer),fromWorld=thisLayer.fromWorld.bind(thisLayer),fromComp=thisLayer.fromComp.bind(thisLayer),toComp=thisLayer.toComp.bind(thisLayer),mask=thisLayer.mask?thisLayer.mask.bind(thisLayer):null,fromCompToSurface=fromComp),transform||(transform=elem.layerInterface("ADBE Transform Group"),$bm_transform=transform,transform&&(anchorPoint=transform.anchorPoint)),elemType!==4||content||(content=thisLayer("ADBE Root Vectors Group")),effect||(effect=thisLayer(4)),!(!elem.hierarchy||!elem.hierarchy.length)&&!parent&&(parent=elem.hierarchy[0].layerInterface),time=this.comp.renderedFrame/this.comp.globalData.frameRate,_needsRandom&&seedRandom(randSeed+time),needsVelocity&&(velocity=velocityAtTime(time)),expression_function(),this.frameExpressionId=elem.globalData.frameId,scoped_bm_rt=scoped_bm_rt.propType===propTypes.SHAPE?scoped_bm_rt.v:scoped_bm_rt)}return executeExpression.__preventDeadCodeRemoval=[$bm_transform,anchorPoint,time,velocity,inPoint,outPoint,width,height,name,loop_in,loop_out,smooth,toComp,fromCompToSurface,toWorld,fromWorld,mask,position,rotation,scale,thisComp,numKeys,active,wiggle,loopInDuration,loopOutDuration,comp,lookAt,easeOut,easeIn,ease,nearestKey,key,text,textIndex,textTotal,selectorValue,framesToTime,timeToFrames,sourceRectAtTime,substring,substr,posterizeTime,index,globalData],executeExpression}return ob.initiateExpression=initiateExpression,ob.__preventDeadCodeRemoval=[window,document,XMLHttpRequest,fetch,frames,$bm_neg,add,$bm_sum,$bm_sub,$bm_mul,$bm_div,$bm_mod,clamp,radians_to_degrees,degreesToRadians,degrees_to_radians,normalize,rgbToHsl,hslToRgb,linear,random,createPath,_lottieGlobal],ob.resetFrame=resetFrame,ob}(),Expressions=function(){var e={};return e.initExpressions=function(t){var n=0,i=[];t.renderer.compInterface=CompExpressionInterface(t.renderer),t.renderer.globalData.projectInterface.registerComposition(t.renderer),t.renderer.globalData.pushExpression=function(){n+=1},t.renderer.globalData.popExpression=function(){(n-=1)===0&&function(){var o,l=i.length;for(o=0;o<l;o+=1)i[o].release();i.length=0}()},t.renderer.globalData.registerExpressionProperty=function(o){i.indexOf(o)===-1&&i.push(o)}},e.resetFrame=ExpressionManager.resetFrame,e}(),MaskManagerInterface=function(){function e(t,n){this._mask=t,this._data=n}return Object.defineProperty(e.prototype,"maskPath",{get:function(){return this._mask.prop.k&&this._mask.prop.getValue(),this._mask.prop}}),Object.defineProperty(e.prototype,"maskOpacity",{get:function(){return this._mask.op.k&&this._mask.op.getValue(),100*this._mask.op.v}}),function(t){var n,i=createSizedArray(t.viewData.length),o=t.viewData.length;for(n=0;n<o;n+=1)i[n]=new e(t.viewData[n],t.masksProperties[n]);return function(l){for(n=0;n<o;){if(t.masksProperties[n].nm===l)return i[n];n+=1}return null}}}(),ExpressionPropertyInterface=function(){var e={pv:0,v:0,mult:1},t={pv:[0,0,0],v:[0,0,0],mult:1};function n(o,l,u){Object.defineProperty(o,"velocity",{get:function(){return l.getVelocityAtTime(l.comp.currentFrame)}}),o.numKeys=l.keyframes?l.keyframes.length:0,o.key=function(d){if(!o.numKeys)return 0;var f="";f="s"in l.keyframes[d-1]?l.keyframes[d-1].s:"e"in l.keyframes[d-2]?l.keyframes[d-2].e:l.keyframes[d-2].s;var p=u==="unidimensional"?new Number(f):Object.assign({},f);return p.time=l.keyframes[d-1].t/l.elem.comp.globalData.frameRate,p.value=u==="unidimensional"?f[0]:f,p},o.valueAtTime=l.getValueAtTime,o.speedAtTime=l.getSpeedAtTime,o.velocityAtTime=l.getVelocityAtTime,o.propertyGroup=l.propertyGroup}function i(){return e}return function(o){return o?o.propType==="unidimensional"?function(l){l&&"pv"in l||(l=e);var u=1/l.mult,d=l.pv*u,f=new Number(d);return f.value=d,n(f,l,"unidimensional"),function(){return l.k&&l.getValue(),d=l.v*u,f.value!==d&&((f=new Number(d)).value=d,n(f,l,"unidimensional")),f}}(o):function(l){l&&"pv"in l||(l=t);var u=1/l.mult,d=l.data&&l.data.l||l.pv.length,f=createTypedArray("float32",d),p=createTypedArray("float32",d);return f.value=p,n(f,l,"multidimensional"),function(){l.k&&l.getValue();for(var m=0;m<d;m+=1)p[m]=l.v[m]*u,f[m]=p[m];return f}}(o):i}}(),TransformExpressionInterface=function(e){function t(u){switch(u){case"scale":case"Scale":case"ADBE Scale":case 6:return t.scale;case"rotation":case"Rotation":case"ADBE Rotation":case"ADBE Rotate Z":case 10:return t.rotation;case"ADBE Rotate X":return t.xRotation;case"ADBE Rotate Y":return t.yRotation;case"position":case"Position":case"ADBE Position":case 2:return t.position;case"ADBE Position_0":return t.xPosition;case"ADBE Position_1":return t.yPosition;case"ADBE Position_2":return t.zPosition;case"anchorPoint":case"AnchorPoint":case"Anchor Point":case"ADBE AnchorPoint":case 1:return t.anchorPoint;case"opacity":case"Opacity":case 11:return t.opacity;default:return null}}var n,i,o,l;return Object.defineProperty(t,"rotation",{get:ExpressionPropertyInterface(e.r||e.rz)}),Object.defineProperty(t,"zRotation",{get:ExpressionPropertyInterface(e.rz||e.r)}),Object.defineProperty(t,"xRotation",{get:ExpressionPropertyInterface(e.rx)}),Object.defineProperty(t,"yRotation",{get:ExpressionPropertyInterface(e.ry)}),Object.defineProperty(t,"scale",{get:ExpressionPropertyInterface(e.s)}),e.p?l=ExpressionPropertyInterface(e.p):(n=ExpressionPropertyInterface(e.px),i=ExpressionPropertyInterface(e.py),e.pz&&(o=ExpressionPropertyInterface(e.pz))),Object.defineProperty(t,"position",{get:function(){return e.p?l():[n(),i(),o?o():0]}}),Object.defineProperty(t,"xPosition",{get:ExpressionPropertyInterface(e.px)}),Object.defineProperty(t,"yPosition",{get:ExpressionPropertyInterface(e.py)}),Object.defineProperty(t,"zPosition",{get:ExpressionPropertyInterface(e.pz)}),Object.defineProperty(t,"anchorPoint",{get:ExpressionPropertyInterface(e.a)}),Object.defineProperty(t,"opacity",{get:ExpressionPropertyInterface(e.o)}),Object.defineProperty(t,"skew",{get:ExpressionPropertyInterface(e.sk)}),Object.defineProperty(t,"skewAxis",{get:ExpressionPropertyInterface(e.sa)}),Object.defineProperty(t,"orientation",{get:ExpressionPropertyInterface(e.or)}),t},LayerExpressionInterface=function(){function e(p){var m=new Matrix;return p!==void 0?this._elem.finalTransform.mProp.getValueAtTime(p).clone(m):this._elem.finalTransform.mProp.applyToMatrix(m),m}function t(p,m){var g=this.getMatrix(m);return g.props[12]=0,g.props[13]=0,g.props[14]=0,this.applyPoint(g,p)}function n(p,m){var g=this.getMatrix(m);return this.applyPoint(g,p)}function i(p,m){var g=this.getMatrix(m);return g.props[12]=0,g.props[13]=0,g.props[14]=0,this.invertPoint(g,p)}function o(p,m){var g=this.getMatrix(m);return this.invertPoint(g,p)}function l(p,m){if(this._elem.hierarchy&&this._elem.hierarchy.length){var g,b=this._elem.hierarchy.length;for(g=0;g<b;g+=1)this._elem.hierarchy[g].finalTransform.mProp.applyToMatrix(p)}return p.applyToPointArray(m[0],m[1],m[2]||0)}function u(p,m){if(this._elem.hierarchy&&this._elem.hierarchy.length){var g,b=this._elem.hierarchy.length;for(g=0;g<b;g+=1)this._elem.hierarchy[g].finalTransform.mProp.applyToMatrix(p)}return p.inversePoint(m)}function d(p){var m=new Matrix;if(m.reset(),this._elem.finalTransform.mProp.applyToMatrix(m),this._elem.hierarchy&&this._elem.hierarchy.length){var g,b=this._elem.hierarchy.length;for(g=0;g<b;g+=1)this._elem.hierarchy[g].finalTransform.mProp.applyToMatrix(m);return m.inversePoint(p)}return m.inversePoint(p)}function f(){return[1,1,1,1]}return function(p){var m;function g(_){switch(_){case"ADBE Root Vectors Group":case"Contents":case 2:return g.shapeInterface;case 1:case 6:case"Transform":case"transform":case"ADBE Transform Group":return m;case 4:case"ADBE Effect Parade":case"effects":case"Effects":return g.effect;case"ADBE Text Properties":return g.textInterface;default:return null}}g.getMatrix=e,g.invertPoint=u,g.applyPoint=l,g.toWorld=n,g.toWorldVec=t,g.fromWorld=o,g.fromWorldVec=i,g.toComp=n,g.fromComp=d,g.sampleImage=f,g.sourceRectAtTime=p.sourceRectAtTime.bind(p),g._elem=p;var b=getDescriptor(m=TransformExpressionInterface(p.finalTransform.mProp),"anchorPoint");return Object.defineProperties(g,{hasParent:{get:function(){return p.hierarchy.length}},parent:{get:function(){return p.hierarchy[0].layerInterface}},rotation:getDescriptor(m,"rotation"),scale:getDescriptor(m,"scale"),position:getDescriptor(m,"position"),opacity:getDescriptor(m,"opacity"),anchorPoint:b,anchor_point:b,transform:{get:function(){return m}},active:{get:function(){return p.isInRange}}}),g.startTime=p.data.st,g.index=p.data.ind,g.source=p.data.refId,g.height=p.data.ty===0?p.data.h:100,g.width=p.data.ty===0?p.data.w:100,g.inPoint=p.data.ip/p.comp.globalData.frameRate,g.outPoint=p.data.op/p.comp.globalData.frameRate,g._name=p.data.nm,g.registerMaskInterface=function(_){g.mask=new MaskManagerInterface(_,p)},g.registerEffectsInterface=function(_){g.effect=_},g}}(),propertyGroupFactory=function(e,t){return function(n){return(n=n===void 0?1:n)<=0?e:t(n-1)}},PropertyInterface=function(e,t){var n={_name:e};return function(i){return(i=i===void 0?1:i)<=0?n:t(i-1)}},EffectsExpressionInterface=function(){function e(n,i,o,l){function u(g){for(var b=n.ef,_=0,R=b.length;_<R;){if(g===b[_].nm||g===b[_].mn||g===b[_].ix)return b[_].ty===5?p[_]:p[_]();_+=1}throw new Error}var d,f=propertyGroupFactory(u,o),p=[],m=n.ef.length;for(d=0;d<m;d+=1)n.ef[d].ty===5?p.push(e(n.ef[d],i.effectElements[d],i.effectElements[d].propertyGroup,l)):p.push(t(i.effectElements[d],n.ef[d].ty,l,f));return n.mn==="ADBE Color Control"&&Object.defineProperty(u,"color",{get:function(){return p[0]()}}),Object.defineProperties(u,{numProperties:{get:function(){return n.np}},_name:{value:n.nm},propertyGroup:{value:f}}),u.enabled=n.en!==0,u.active=u.enabled,u}function t(n,i,o,l){var u=ExpressionPropertyInterface(n.p);return n.p.setGroupProperty&&n.p.setGroupProperty(PropertyInterface("",l)),function(){return i===10?o.comp.compInterface(n.p.v):u()}}return{createEffectsInterface:function(n,i){if(n.effectsManager){var o,l=[],u=n.data.ef,d=n.effectsManager.effectElements.length;for(o=0;o<d;o+=1)l.push(e(u[o],n.effectsManager.effectElements[o],i,n));var f=n.data.ef||[],p=function(m){for(o=0,d=f.length;o<d;){if(m===f[o].nm||m===f[o].mn||m===f[o].ix)return l[o];o+=1}return null};return Object.defineProperty(p,"numProperties",{get:function(){return f.length}}),p}return null}}}(),ShapePathInterface=function(e,t,n){var i=t.sh;function o(u){return u==="Shape"||u==="shape"||u==="Path"||u==="path"||u==="ADBE Vector Shape"||u===2?o.path:null}var l=propertyGroupFactory(o,n);return i.setGroupProperty(PropertyInterface("Path",l)),Object.defineProperties(o,{path:{get:function(){return i.k&&i.getValue(),i}},shape:{get:function(){return i.k&&i.getValue(),i}},_name:{value:e.nm},ix:{value:e.ix},propertyIndex:{value:e.ix},mn:{value:e.mn},propertyGroup:{value:n}}),o},ShapeExpressionInterface=function(){function e(_,R,E){var S,C=[],T=_?_.length:0;for(S=0;S<T;S+=1)_[S].ty==="gr"?C.push(t(_[S],R[S],E)):_[S].ty==="fl"?C.push(n(_[S],R[S],E)):_[S].ty==="st"?C.push(l(_[S],R[S],E)):_[S].ty==="tm"?C.push(u(_[S],R[S],E)):_[S].ty==="tr"||(_[S].ty==="el"?C.push(f(_[S],R[S],E)):_[S].ty==="sr"?C.push(p(_[S],R[S],E)):_[S].ty==="sh"?C.push(ShapePathInterface(_[S],R[S],E)):_[S].ty==="rc"?C.push(m(_[S],R[S],E)):_[S].ty==="rd"?C.push(g(_[S],R[S],E)):_[S].ty==="rp"?C.push(b(_[S],R[S],E)):_[S].ty==="gf"?C.push(i(_[S],R[S],E)):C.push(o(_[S],R[S])));return C}function t(_,R,E){var S=function(A){switch(A){case"ADBE Vectors Group":case"Contents":case 2:return S.content;default:return S.transform}};S.propertyGroup=propertyGroupFactory(S,E);var C=function(A,M,I){var O,N=function(D){for(var F=0,L=O.length;F<L;){if(O[F]._name===D||O[F].mn===D||O[F].propertyIndex===D||O[F].ix===D||O[F].ind===D)return O[F];F+=1}return typeof D=="number"?O[D-1]:null};N.propertyGroup=propertyGroupFactory(N,I),O=e(A.it,M.it,N.propertyGroup),N.numProperties=O.length;var j=d(A.it[A.it.length-1],M.it[M.it.length-1],N.propertyGroup);return N.transform=j,N.propertyIndex=A.cix,N._name=A.nm,N}(_,R,S.propertyGroup),T=d(_.it[_.it.length-1],R.it[R.it.length-1],S.propertyGroup);return S.content=C,S.transform=T,Object.defineProperty(S,"_name",{get:function(){return _.nm}}),S.numProperties=_.np,S.propertyIndex=_.ix,S.nm=_.nm,S.mn=_.mn,S}function n(_,R,E){function S(C){return C==="Color"||C==="color"?S.color:C==="Opacity"||C==="opacity"?S.opacity:null}return Object.defineProperties(S,{color:{get:ExpressionPropertyInterface(R.c)},opacity:{get:ExpressionPropertyInterface(R.o)},_name:{value:_.nm},mn:{value:_.mn}}),R.c.setGroupProperty(PropertyInterface("Color",E)),R.o.setGroupProperty(PropertyInterface("Opacity",E)),S}function i(_,R,E){function S(C){return C==="Start Point"||C==="start point"?S.startPoint:C==="End Point"||C==="end point"?S.endPoint:C==="Opacity"||C==="opacity"?S.opacity:null}return Object.defineProperties(S,{startPoint:{get:ExpressionPropertyInterface(R.s)},endPoint:{get:ExpressionPropertyInterface(R.e)},opacity:{get:ExpressionPropertyInterface(R.o)},type:{get:function(){return"a"}},_name:{value:_.nm},mn:{value:_.mn}}),R.s.setGroupProperty(PropertyInterface("Start Point",E)),R.e.setGroupProperty(PropertyInterface("End Point",E)),R.o.setGroupProperty(PropertyInterface("Opacity",E)),S}function o(){return function(){return null}}function l(_,R,E){var S,C=propertyGroupFactory(O,E),T=propertyGroupFactory(I,C);function A(N){Object.defineProperty(I,_.d[N].nm,{get:ExpressionPropertyInterface(R.d.dataProps[N].p)})}var M=_.d?_.d.length:0,I={};for(S=0;S<M;S+=1)A(S),R.d.dataProps[S].p.setGroupProperty(T);function O(N){return N==="Color"||N==="color"?O.color:N==="Opacity"||N==="opacity"?O.opacity:N==="Stroke Width"||N==="stroke width"?O.strokeWidth:null}return Object.defineProperties(O,{color:{get:ExpressionPropertyInterface(R.c)},opacity:{get:ExpressionPropertyInterface(R.o)},strokeWidth:{get:ExpressionPropertyInterface(R.w)},dash:{get:function(){return I}},_name:{value:_.nm},mn:{value:_.mn}}),R.c.setGroupProperty(PropertyInterface("Color",C)),R.o.setGroupProperty(PropertyInterface("Opacity",C)),R.w.setGroupProperty(PropertyInterface("Stroke Width",C)),O}function u(_,R,E){function S(T){return T===_.e.ix||T==="End"||T==="end"?S.end:T===_.s.ix?S.start:T===_.o.ix?S.offset:null}var C=propertyGroupFactory(S,E);return S.propertyIndex=_.ix,R.s.setGroupProperty(PropertyInterface("Start",C)),R.e.setGroupProperty(PropertyInterface("End",C)),R.o.setGroupProperty(PropertyInterface("Offset",C)),S.propertyIndex=_.ix,S.propertyGroup=E,Object.defineProperties(S,{start:{get:ExpressionPropertyInterface(R.s)},end:{get:ExpressionPropertyInterface(R.e)},offset:{get:ExpressionPropertyInterface(R.o)},_name:{value:_.nm}}),S.mn=_.mn,S}function d(_,R,E){function S(T){return _.a.ix===T||T==="Anchor Point"?S.anchorPoint:_.o.ix===T||T==="Opacity"?S.opacity:_.p.ix===T||T==="Position"?S.position:_.r.ix===T||T==="Rotation"||T==="ADBE Vector Rotation"?S.rotation:_.s.ix===T||T==="Scale"?S.scale:_.sk&&_.sk.ix===T||T==="Skew"?S.skew:_.sa&&_.sa.ix===T||T==="Skew Axis"?S.skewAxis:null}var C=propertyGroupFactory(S,E);return R.transform.mProps.o.setGroupProperty(PropertyInterface("Opacity",C)),R.transform.mProps.p.setGroupProperty(PropertyInterface("Position",C)),R.transform.mProps.a.setGroupProperty(PropertyInterface("Anchor Point",C)),R.transform.mProps.s.setGroupProperty(PropertyInterface("Scale",C)),R.transform.mProps.r.setGroupProperty(PropertyInterface("Rotation",C)),R.transform.mProps.sk&&(R.transform.mProps.sk.setGroupProperty(PropertyInterface("Skew",C)),R.transform.mProps.sa.setGroupProperty(PropertyInterface("Skew Angle",C))),R.transform.op.setGroupProperty(PropertyInterface("Opacity",C)),Object.defineProperties(S,{opacity:{get:ExpressionPropertyInterface(R.transform.mProps.o)},position:{get:ExpressionPropertyInterface(R.transform.mProps.p)},anchorPoint:{get:ExpressionPropertyInterface(R.transform.mProps.a)},scale:{get:ExpressionPropertyInterface(R.transform.mProps.s)},rotation:{get:ExpressionPropertyInterface(R.transform.mProps.r)},skew:{get:ExpressionPropertyInterface(R.transform.mProps.sk)},skewAxis:{get:ExpressionPropertyInterface(R.transform.mProps.sa)},_name:{value:_.nm}}),S.ty="tr",S.mn=_.mn,S.propertyGroup=E,S}function f(_,R,E){function S(A){return _.p.ix===A?S.position:_.s.ix===A?S.size:null}var C=propertyGroupFactory(S,E);S.propertyIndex=_.ix;var T=R.sh.ty==="tm"?R.sh.prop:R.sh;return T.s.setGroupProperty(PropertyInterface("Size",C)),T.p.setGroupProperty(PropertyInterface("Position",C)),Object.defineProperties(S,{size:{get:ExpressionPropertyInterface(T.s)},position:{get:ExpressionPropertyInterface(T.p)},_name:{value:_.nm}}),S.mn=_.mn,S}function p(_,R,E){function S(A){return _.p.ix===A?S.position:_.r.ix===A?S.rotation:_.pt.ix===A?S.points:_.or.ix===A||A==="ADBE Vector Star Outer Radius"?S.outerRadius:_.os.ix===A?S.outerRoundness:!_.ir||_.ir.ix!==A&&A!=="ADBE Vector Star Inner Radius"?_.is&&_.is.ix===A?S.innerRoundness:null:S.innerRadius}var C=propertyGroupFactory(S,E),T=R.sh.ty==="tm"?R.sh.prop:R.sh;return S.propertyIndex=_.ix,T.or.setGroupProperty(PropertyInterface("Outer Radius",C)),T.os.setGroupProperty(PropertyInterface("Outer Roundness",C)),T.pt.setGroupProperty(PropertyInterface("Points",C)),T.p.setGroupProperty(PropertyInterface("Position",C)),T.r.setGroupProperty(PropertyInterface("Rotation",C)),_.ir&&(T.ir.setGroupProperty(PropertyInterface("Inner Radius",C)),T.is.setGroupProperty(PropertyInterface("Inner Roundness",C))),Object.defineProperties(S,{position:{get:ExpressionPropertyInterface(T.p)},rotation:{get:ExpressionPropertyInterface(T.r)},points:{get:ExpressionPropertyInterface(T.pt)},outerRadius:{get:ExpressionPropertyInterface(T.or)},outerRoundness:{get:ExpressionPropertyInterface(T.os)},innerRadius:{get:ExpressionPropertyInterface(T.ir)},innerRoundness:{get:ExpressionPropertyInterface(T.is)},_name:{value:_.nm}}),S.mn=_.mn,S}function m(_,R,E){function S(A){return _.p.ix===A?S.position:_.r.ix===A?S.roundness:_.s.ix===A||A==="Size"||A==="ADBE Vector Rect Size"?S.size:null}var C=propertyGroupFactory(S,E),T=R.sh.ty==="tm"?R.sh.prop:R.sh;return S.propertyIndex=_.ix,T.p.setGroupProperty(PropertyInterface("Position",C)),T.s.setGroupProperty(PropertyInterface("Size",C)),T.r.setGroupProperty(PropertyInterface("Rotation",C)),Object.defineProperties(S,{position:{get:ExpressionPropertyInterface(T.p)},roundness:{get:ExpressionPropertyInterface(T.r)},size:{get:ExpressionPropertyInterface(T.s)},_name:{value:_.nm}}),S.mn=_.mn,S}function g(_,R,E){function S(A){return _.r.ix===A||A==="Round Corners 1"?S.radius:null}var C=propertyGroupFactory(S,E),T=R;return S.propertyIndex=_.ix,T.rd.setGroupProperty(PropertyInterface("Radius",C)),Object.defineProperties(S,{radius:{get:ExpressionPropertyInterface(T.rd)},_name:{value:_.nm}}),S.mn=_.mn,S}function b(_,R,E){function S(A){return _.c.ix===A||A==="Copies"?S.copies:_.o.ix===A||A==="Offset"?S.offset:null}var C=propertyGroupFactory(S,E),T=R;return S.propertyIndex=_.ix,T.c.setGroupProperty(PropertyInterface("Copies",C)),T.o.setGroupProperty(PropertyInterface("Offset",C)),Object.defineProperties(S,{copies:{get:ExpressionPropertyInterface(T.c)},offset:{get:ExpressionPropertyInterface(T.o)},_name:{value:_.nm}}),S.mn=_.mn,S}return function(_,R,E){var S;function C(T){if(typeof T=="number")return(T=T===void 0?1:T)===0?E:S[T-1];for(var A=0,M=S.length;A<M;){if(S[A]._name===T)return S[A];A+=1}return null}return C.propertyGroup=propertyGroupFactory(C,function(){return E}),S=e(_,R,C.propertyGroup),C.numProperties=S.length,C._name="Contents",C}}(),TextExpressionInterface=function(e){var t;function n(i){switch(i){case"ADBE Text Document":return n.sourceText;default:return null}}return Object.defineProperty(n,"sourceText",{get:function(){e.textProperty.getValue();var i=e.textProperty.currentData.t;return t&&i===t.value||((t=new String(i)).value=i||new String(i),Object.defineProperty(t,"style",{get:function(){return{fillColor:e.textProperty.currentData.fc}}})),t}}),n};function _typeof(e){return(_typeof=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}var FootageInterface=(dataInterfaceFactory=function(e){function t(n){return n==="Outline"?t.outlineInterface():null}return t._name="Outline",t.outlineInterface=function(n){var i="",o=n.getFootageData();function l(u){if(o[u])return i=u,_typeof(o=o[u])==="object"?l:o;var d=u.indexOf(i);if(d!==-1){var f=parseInt(u.substr(d+i.length),10);return _typeof(o=o[f])==="object"?l:o}return""}return function(){return i="",o=n.getFootageData(),l}}(e),t},function(e){function t(n){return n==="Data"?t.dataInterface:null}return t._name="Data",t.dataInterface=dataInterfaceFactory(e),t}),dataInterfaceFactory,interfaces={layer:LayerExpressionInterface,effects:EffectsExpressionInterface,comp:CompExpressionInterface,shape:ShapeExpressionInterface,text:TextExpressionInterface,footage:FootageInterface};function getInterface(e){return interfaces[e]||null}var expressionHelpers={searchExpressions:function(e,t,n){t.x&&(n.k=!0,n.x=!0,n.initiateExpression=ExpressionManager.initiateExpression,n.effectsSequence.push(n.initiateExpression(e,t,n).bind(n)))},getSpeedAtTime:function(e){var t=this.getValueAtTime(e),n=this.getValueAtTime(e+-.01),i=0;if(t.length){var o;for(o=0;o<t.length;o+=1)i+=Math.pow(n[o]-t[o],2);i=100*Math.sqrt(i)}else i=0;return i},getVelocityAtTime:function(e){if(this.vel!==void 0)return this.vel;var t,n,i=this.getValueAtTime(e),o=this.getValueAtTime(e+-.001);if(i.length)for(t=createTypedArray("float32",i.length),n=0;n<i.length;n+=1)t[n]=(o[n]-i[n])/-.001;else t=(o-i)/-.001;return t},getValueAtTime:function(e){return e*=this.elem.globalData.frameRate,(e-=this.offsetTime)!==this._cachingAtTime.lastFrame&&(this._cachingAtTime.lastIndex=this._cachingAtTime.lastFrame<e?this._cachingAtTime.lastIndex:0,this._cachingAtTime.value=this.interpolateValue(e,this._cachingAtTime),this._cachingAtTime.lastFrame=e),this._cachingAtTime.value},getStaticValueAtTime:function(){return this.pv},setGroupProperty:function(e){this.propertyGroup=e}};function addPropertyDecorator(){function e(g,b,_){if(!this.k||!this.keyframes)return this.pv;g=g?g.toLowerCase():"";var R,E,S,C,T,A=this.comp.renderedFrame,M=this.keyframes,I=M[M.length-1].t;if(A<=I)return this.pv;if(_?E=I-(R=b?Math.abs(I-this.elem.comp.globalData.frameRate*b):Math.max(0,I-this.elem.data.ip)):((!b||b>M.length-1)&&(b=M.length-1),R=I-(E=M[M.length-1-b].t)),g==="pingpong"){if(Math.floor((A-E)/R)%2!=0)return this.getValueAtTime((R-(A-E)%R+E)/this.comp.globalData.frameRate,0)}else{if(g==="offset"){var O=this.getValueAtTime(E/this.comp.globalData.frameRate,0),N=this.getValueAtTime(I/this.comp.globalData.frameRate,0),j=this.getValueAtTime(((A-E)%R+E)/this.comp.globalData.frameRate,0),D=Math.floor((A-E)/R);if(this.pv.length){for(C=(T=new Array(O.length)).length,S=0;S<C;S+=1)T[S]=(N[S]-O[S])*D+j[S];return T}return(N-O)*D+j}if(g==="continue"){var F=this.getValueAtTime(I/this.comp.globalData.frameRate,0),L=this.getValueAtTime((I-.001)/this.comp.globalData.frameRate,0);if(this.pv.length){for(C=(T=new Array(F.length)).length,S=0;S<C;S+=1)T[S]=F[S]+(F[S]-L[S])*((A-I)/this.comp.globalData.frameRate)/5e-4;return T}return F+(A-I)/.001*(F-L)}}return this.getValueAtTime(((A-E)%R+E)/this.comp.globalData.frameRate,0)}function t(g,b,_){if(!this.k)return this.pv;g=g?g.toLowerCase():"";var R,E,S,C,T,A=this.comp.renderedFrame,M=this.keyframes,I=M[0].t;if(A>=I)return this.pv;if(_?E=I+(R=b?Math.abs(this.elem.comp.globalData.frameRate*b):Math.max(0,this.elem.data.op-I)):((!b||b>M.length-1)&&(b=M.length-1),R=(E=M[b].t)-I),g==="pingpong"){if(Math.floor((I-A)/R)%2==0)return this.getValueAtTime(((I-A)%R+I)/this.comp.globalData.frameRate,0)}else{if(g==="offset"){var O=this.getValueAtTime(I/this.comp.globalData.frameRate,0),N=this.getValueAtTime(E/this.comp.globalData.frameRate,0),j=this.getValueAtTime((R-(I-A)%R+I)/this.comp.globalData.frameRate,0),D=Math.floor((I-A)/R)+1;if(this.pv.length){for(C=(T=new Array(O.length)).length,S=0;S<C;S+=1)T[S]=j[S]-(N[S]-O[S])*D;return T}return j-(N-O)*D}if(g==="continue"){var F=this.getValueAtTime(I/this.comp.globalData.frameRate,0),L=this.getValueAtTime((I+.001)/this.comp.globalData.frameRate,0);if(this.pv.length){for(C=(T=new Array(F.length)).length,S=0;S<C;S+=1)T[S]=F[S]+(F[S]-L[S])*(I-A)/.001;return T}return F+(F-L)*(I-A)/.001}}return this.getValueAtTime((R-((I-A)%R+I))/this.comp.globalData.frameRate,0)}function n(g,b){if(!this.k)return this.pv;if(g=.5*(g||.4),(b=Math.floor(b||5))<=1)return this.pv;var _,R,E=this.comp.renderedFrame/this.comp.globalData.frameRate,S=E-g,C=b>1?(E+g-S)/(b-1):1,T=0,A=0;for(_=this.pv.length?createTypedArray("float32",this.pv.length):0;T<b;){if(R=this.getValueAtTime(S+T*C),this.pv.length)for(A=0;A<this.pv.length;A+=1)_[A]+=R[A];else _+=R;T+=1}if(this.pv.length)for(A=0;A<this.pv.length;A+=1)_[A]/=b;else _/=b;return _}function i(g){this._transformCachingAtTime||(this._transformCachingAtTime={v:new Matrix});var b=this._transformCachingAtTime.v;if(b.cloneFromProps(this.pre.props),this.appliedTransformations<1){var _=this.a.getValueAtTime(g);b.translate(-_[0]*this.a.mult,-_[1]*this.a.mult,_[2]*this.a.mult)}if(this.appliedTransformations<2){var R=this.s.getValueAtTime(g);b.scale(R[0]*this.s.mult,R[1]*this.s.mult,R[2]*this.s.mult)}if(this.sk&&this.appliedTransformations<3){var E=this.sk.getValueAtTime(g),S=this.sa.getValueAtTime(g);b.skewFromAxis(-E*this.sk.mult,S*this.sa.mult)}if(this.r&&this.appliedTransformations<4){var C=this.r.getValueAtTime(g);b.rotate(-C*this.r.mult)}else if(!this.r&&this.appliedTransformations<4){var T=this.rz.getValueAtTime(g),A=this.ry.getValueAtTime(g),M=this.rx.getValueAtTime(g),I=this.or.getValueAtTime(g);b.rotateZ(-T*this.rz.mult).rotateY(A*this.ry.mult).rotateX(M*this.rx.mult).rotateZ(-I[2]*this.or.mult).rotateY(I[1]*this.or.mult).rotateX(I[0]*this.or.mult)}if(this.data.p&&this.data.p.s){var O=this.px.getValueAtTime(g),N=this.py.getValueAtTime(g);if(this.data.p.z){var j=this.pz.getValueAtTime(g);b.translate(O*this.px.mult,N*this.py.mult,-j*this.pz.mult)}else b.translate(O*this.px.mult,N*this.py.mult,0)}else{var D=this.p.getValueAtTime(g);b.translate(D[0]*this.p.mult,D[1]*this.p.mult,-D[2]*this.p.mult)}return b}function o(){return this.v.clone(new Matrix)}var l=TransformPropertyFactory.getTransformProperty;TransformPropertyFactory.getTransformProperty=function(g,b,_){var R=l(g,b,_);return R.dynamicProperties.length?R.getValueAtTime=i.bind(R):R.getValueAtTime=o.bind(R),R.setGroupProperty=expressionHelpers.setGroupProperty,R};var u=PropertyFactory.getProp;PropertyFactory.getProp=function(g,b,_,R,E){var S=u(g,b,_,R,E);S.kf?S.getValueAtTime=expressionHelpers.getValueAtTime.bind(S):S.getValueAtTime=expressionHelpers.getStaticValueAtTime.bind(S),S.setGroupProperty=expressionHelpers.setGroupProperty,S.loopOut=e,S.loopIn=t,S.smooth=n,S.getVelocityAtTime=expressionHelpers.getVelocityAtTime.bind(S),S.getSpeedAtTime=expressionHelpers.getSpeedAtTime.bind(S),S.numKeys=b.a===1?b.k.length:0,S.propertyIndex=b.ix;var C=0;return _!==0&&(C=createTypedArray("float32",b.a===1?b.k[0].s.length:b.k.length)),S._cachingAtTime={lastFrame:initialDefaultFrame,lastIndex:0,value:C},expressionHelpers.searchExpressions(g,b,S),S.k&&E.addDynamicProperty(S),S};var d=ShapePropertyFactory.getConstructorFunction(),f=ShapePropertyFactory.getKeyframedConstructorFunction();function p(){}p.prototype={vertices:function(g,b){this.k&&this.getValue();var _,R=this.v;b!==void 0&&(R=this.getValueAtTime(b,0));var E=R._length,S=R[g],C=R.v,T=createSizedArray(E);for(_=0;_<E;_+=1)T[_]=g==="i"||g==="o"?[S[_][0]-C[_][0],S[_][1]-C[_][1]]:[S[_][0],S[_][1]];return T},points:function(g){return this.vertices("v",g)},inTangents:function(g){return this.vertices("i",g)},outTangents:function(g){return this.vertices("o",g)},isClosed:function(){return this.v.c},pointOnPath:function(g,b){var _=this.v;b!==void 0&&(_=this.getValueAtTime(b,0)),this._segmentsLength||(this._segmentsLength=bez.getSegmentsLength(_));for(var R,E=this._segmentsLength,S=E.lengths,C=E.totalLength*g,T=0,A=S.length,M=0;T<A;){if(M+S[T].addedLength>C){var I=T,O=_.c&&T===A-1?0:T+1,N=(C-M)/S[T].addedLength;R=bez.getPointInSegment(_.v[I],_.v[O],_.o[I],_.i[O],N,S[T]);break}M+=S[T].addedLength,T+=1}return R||(R=_.c?[_.v[0][0],_.v[0][1]]:[_.v[_._length-1][0],_.v[_._length-1][1]]),R},vectorOnPath:function(g,b,_){g==1?g=this.v.c:g==0&&(g=.999);var R=this.pointOnPath(g,b),E=this.pointOnPath(g+.001,b),S=E[0]-R[0],C=E[1]-R[1],T=Math.sqrt(Math.pow(S,2)+Math.pow(C,2));return T===0?[0,0]:_==="tangent"?[S/T,C/T]:[-C/T,S/T]},tangentOnPath:function(g,b){return this.vectorOnPath(g,b,"tangent")},normalOnPath:function(g,b){return this.vectorOnPath(g,b,"normal")},setGroupProperty:expressionHelpers.setGroupProperty,getValueAtTime:expressionHelpers.getStaticValueAtTime},extendPrototype([p],d),extendPrototype([p],f),f.prototype.getValueAtTime=function(g){return this._cachingAtTime||(this._cachingAtTime={shapeValue:shapePool.clone(this.pv),lastIndex:0,lastTime:initialDefaultFrame}),g*=this.elem.globalData.frameRate,(g-=this.offsetTime)!==this._cachingAtTime.lastTime&&(this._cachingAtTime.lastIndex=this._cachingAtTime.lastTime<g?this._caching.lastIndex:0,this._cachingAtTime.lastTime=g,this.interpolateShape(g,this._cachingAtTime.shapeValue,this._cachingAtTime)),this._cachingAtTime.shapeValue},f.prototype.initiateExpression=ExpressionManager.initiateExpression;var m=ShapePropertyFactory.getShapeProp;ShapePropertyFactory.getShapeProp=function(g,b,_,R,E){var S=m(g,b,_,R,E);return S.propertyIndex=b.ix,S.lock=!1,_===3?expressionHelpers.searchExpressions(g,b.pt,S):_===4&&expressionHelpers.searchExpressions(g,b.ks,S),S.k&&g.addDynamicProperty(S),S}}function initialize$1(){addPropertyDecorator()}function addDecorator(){TextProperty.prototype.getExpressionValue=function(e,t){var n=this.calculateExpression(t);if(e.t!==n){var i={};return this.copyData(i,e),i.t=n.toString(),i.__complete=!1,i}return e},TextProperty.prototype.searchProperty=function(){var e=this.searchKeyframes(),t=this.searchExpressions();return this.kf=e||t,this.kf},TextProperty.prototype.searchExpressions=function(){return this.data.d.x?(this.calculateExpression=ExpressionManager.initiateExpression.bind(this)(this.elem,this.data.d,this),this.addEffect(this.getExpressionValue.bind(this)),!0):null}}function initialize(){addDecorator()}function SVGComposableEffect(){}SVGComposableEffect.prototype={createMergeNode:function(e,t){var n,i,o=createNS("feMerge");for(o.setAttribute("result",e),i=0;i<t.length;i+=1)(n=createNS("feMergeNode")).setAttribute("in",t[i]),o.appendChild(n),o.appendChild(n);return o}};var linearFilterValue="0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0";function SVGTintFilter(e,t,n,i,o){this.filterManager=t;var l=createNS("feColorMatrix");l.setAttribute("type","matrix"),l.setAttribute("color-interpolation-filters","linearRGB"),l.setAttribute("values",linearFilterValue+" 1 0"),this.linearFilter=l,l.setAttribute("result",i+"_tint_1"),e.appendChild(l),(l=createNS("feColorMatrix")).setAttribute("type","matrix"),l.setAttribute("color-interpolation-filters","sRGB"),l.setAttribute("values","1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"),l.setAttribute("result",i+"_tint_2"),e.appendChild(l),this.matrixFilter=l;var u=this.createMergeNode(i,[o,i+"_tint_1",i+"_tint_2"]);e.appendChild(u)}function SVGFillFilter(e,t,n,i){this.filterManager=t;var o=createNS("feColorMatrix");o.setAttribute("type","matrix"),o.setAttribute("color-interpolation-filters","sRGB"),o.setAttribute("values","1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"),o.setAttribute("result",i),e.appendChild(o),this.matrixFilter=o}function SVGStrokeEffect(e,t,n){this.initialized=!1,this.filterManager=t,this.elem=n,this.paths=[]}function SVGTritoneFilter(e,t,n,i){this.filterManager=t;var o=createNS("feColorMatrix");o.setAttribute("type","matrix"),o.setAttribute("color-interpolation-filters","linearRGB"),o.setAttribute("values","0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0"),e.appendChild(o);var l=createNS("feComponentTransfer");l.setAttribute("color-interpolation-filters","sRGB"),l.setAttribute("result",i),this.matrixFilter=l;var u=createNS("feFuncR");u.setAttribute("type","table"),l.appendChild(u),this.feFuncR=u;var d=createNS("feFuncG");d.setAttribute("type","table"),l.appendChild(d),this.feFuncG=d;var f=createNS("feFuncB");f.setAttribute("type","table"),l.appendChild(f),this.feFuncB=f,e.appendChild(l)}function SVGProLevelsFilter(e,t,n,i){this.filterManager=t;var o=this.filterManager.effectElements,l=createNS("feComponentTransfer");(o[10].p.k||o[10].p.v!==0||o[11].p.k||o[11].p.v!==1||o[12].p.k||o[12].p.v!==1||o[13].p.k||o[13].p.v!==0||o[14].p.k||o[14].p.v!==1)&&(this.feFuncR=this.createFeFunc("feFuncR",l)),(o[17].p.k||o[17].p.v!==0||o[18].p.k||o[18].p.v!==1||o[19].p.k||o[19].p.v!==1||o[20].p.k||o[20].p.v!==0||o[21].p.k||o[21].p.v!==1)&&(this.feFuncG=this.createFeFunc("feFuncG",l)),(o[24].p.k||o[24].p.v!==0||o[25].p.k||o[25].p.v!==1||o[26].p.k||o[26].p.v!==1||o[27].p.k||o[27].p.v!==0||o[28].p.k||o[28].p.v!==1)&&(this.feFuncB=this.createFeFunc("feFuncB",l)),(o[31].p.k||o[31].p.v!==0||o[32].p.k||o[32].p.v!==1||o[33].p.k||o[33].p.v!==1||o[34].p.k||o[34].p.v!==0||o[35].p.k||o[35].p.v!==1)&&(this.feFuncA=this.createFeFunc("feFuncA",l)),(this.feFuncR||this.feFuncG||this.feFuncB||this.feFuncA)&&(l.setAttribute("color-interpolation-filters","sRGB"),e.appendChild(l)),(o[3].p.k||o[3].p.v!==0||o[4].p.k||o[4].p.v!==1||o[5].p.k||o[5].p.v!==1||o[6].p.k||o[6].p.v!==0||o[7].p.k||o[7].p.v!==1)&&((l=createNS("feComponentTransfer")).setAttribute("color-interpolation-filters","sRGB"),l.setAttribute("result",i),e.appendChild(l),this.feFuncRComposed=this.createFeFunc("feFuncR",l),this.feFuncGComposed=this.createFeFunc("feFuncG",l),this.feFuncBComposed=this.createFeFunc("feFuncB",l))}function SVGDropShadowEffect(e,t,n,i,o){var l=t.container.globalData.renderConfig.filterSize,u=t.data.fs||l;e.setAttribute("x",u.x||l.x),e.setAttribute("y",u.y||l.y),e.setAttribute("width",u.width||l.width),e.setAttribute("height",u.height||l.height),this.filterManager=t;var d=createNS("feGaussianBlur");d.setAttribute("in","SourceAlpha"),d.setAttribute("result",i+"_drop_shadow_1"),d.setAttribute("stdDeviation","0"),this.feGaussianBlur=d,e.appendChild(d);var f=createNS("feOffset");f.setAttribute("dx","25"),f.setAttribute("dy","0"),f.setAttribute("in",i+"_drop_shadow_1"),f.setAttribute("result",i+"_drop_shadow_2"),this.feOffset=f,e.appendChild(f);var p=createNS("feFlood");p.setAttribute("flood-color","#00ff00"),p.setAttribute("flood-opacity","1"),p.setAttribute("result",i+"_drop_shadow_3"),this.feFlood=p,e.appendChild(p);var m=createNS("feComposite");m.setAttribute("in",i+"_drop_shadow_3"),m.setAttribute("in2",i+"_drop_shadow_2"),m.setAttribute("operator","in"),m.setAttribute("result",i+"_drop_shadow_4"),e.appendChild(m);var g=this.createMergeNode(i,[i+"_drop_shadow_4",o]);e.appendChild(g)}extendPrototype([SVGComposableEffect],SVGTintFilter),SVGTintFilter.prototype.renderFrame=function(e){if(e||this.filterManager._mdf){var t=this.filterManager.effectElements[0].p.v,n=this.filterManager.effectElements[1].p.v,i=this.filterManager.effectElements[2].p.v/100;this.linearFilter.setAttribute("values",linearFilterValue+" "+i+" 0"),this.matrixFilter.setAttribute("values",n[0]-t[0]+" 0 0 0 "+t[0]+" "+(n[1]-t[1])+" 0 0 0 "+t[1]+" "+(n[2]-t[2])+" 0 0 0 "+t[2]+" 0 0 0 1 0")}},SVGFillFilter.prototype.renderFrame=function(e){if(e||this.filterManager._mdf){var t=this.filterManager.effectElements[2].p.v,n=this.filterManager.effectElements[6].p.v;this.matrixFilter.setAttribute("values","0 0 0 0 "+t[0]+" 0 0 0 0 "+t[1]+" 0 0 0 0 "+t[2]+" 0 0 0 "+n+" 0")}},SVGStrokeEffect.prototype.initialize=function(){var e,t,n,i,o=this.elem.layerElement.children||this.elem.layerElement.childNodes;for(this.filterManager.effectElements[1].p.v===1?(i=this.elem.maskManager.masksProperties.length,n=0):i=(n=this.filterManager.effectElements[0].p.v-1)+1,(t=createNS("g")).setAttribute("fill","none"),t.setAttribute("stroke-linecap","round"),t.setAttribute("stroke-dashoffset",1);n<i;n+=1)e=createNS("path"),t.appendChild(e),this.paths.push({p:e,m:n});if(this.filterManager.effectElements[10].p.v===3){var l=createNS("mask"),u=createElementID();l.setAttribute("id",u),l.setAttribute("mask-type","alpha"),l.appendChild(t),this.elem.globalData.defs.appendChild(l);var d=createNS("g");for(d.setAttribute("mask","url("+getLocationHref()+"#"+u+")");o[0];)d.appendChild(o[0]);this.elem.layerElement.appendChild(d),this.masker=l,t.setAttribute("stroke","#fff")}else if(this.filterManager.effectElements[10].p.v===1||this.filterManager.effectElements[10].p.v===2){if(this.filterManager.effectElements[10].p.v===2)for(o=this.elem.layerElement.children||this.elem.layerElement.childNodes;o.length;)this.elem.layerElement.removeChild(o[0]);this.elem.layerElement.appendChild(t),this.elem.layerElement.removeAttribute("mask"),t.setAttribute("stroke","#fff")}this.initialized=!0,this.pathMasker=t},SVGStrokeEffect.prototype.renderFrame=function(e){var t;this.initialized||this.initialize();var n,i,o=this.paths.length;for(t=0;t<o;t+=1)if(this.paths[t].m!==-1&&(n=this.elem.maskManager.viewData[this.paths[t].m],i=this.paths[t].p,(e||this.filterManager._mdf||n.prop._mdf)&&i.setAttribute("d",n.lastPath),e||this.filterManager.effectElements[9].p._mdf||this.filterManager.effectElements[4].p._mdf||this.filterManager.effectElements[7].p._mdf||this.filterManager.effectElements[8].p._mdf||n.prop._mdf)){var l;if(this.filterManager.effectElements[7].p.v!==0||this.filterManager.effectElements[8].p.v!==100){var u=.01*Math.min(this.filterManager.effectElements[7].p.v,this.filterManager.effectElements[8].p.v),d=.01*Math.max(this.filterManager.effectElements[7].p.v,this.filterManager.effectElements[8].p.v),f=i.getTotalLength();l="0 0 0 "+f*u+" ";var p,m=f*(d-u),g=1+2*this.filterManager.effectElements[4].p.v*this.filterManager.effectElements[9].p.v*.01,b=Math.floor(m/g);for(p=0;p<b;p+=1)l+="1 "+2*this.filterManager.effectElements[4].p.v*this.filterManager.effectElements[9].p.v*.01+" ";l+="0 "+10*f+" 0 0"}else l="1 "+2*this.filterManager.effectElements[4].p.v*this.filterManager.effectElements[9].p.v*.01;i.setAttribute("stroke-dasharray",l)}if((e||this.filterManager.effectElements[4].p._mdf)&&this.pathMasker.setAttribute("stroke-width",2*this.filterManager.effectElements[4].p.v),(e||this.filterManager.effectElements[6].p._mdf)&&this.pathMasker.setAttribute("opacity",this.filterManager.effectElements[6].p.v),(this.filterManager.effectElements[10].p.v===1||this.filterManager.effectElements[10].p.v===2)&&(e||this.filterManager.effectElements[3].p._mdf)){var _=this.filterManager.effectElements[3].p.v;this.pathMasker.setAttribute("stroke","rgb("+bmFloor(255*_[0])+","+bmFloor(255*_[1])+","+bmFloor(255*_[2])+")")}},SVGTritoneFilter.prototype.renderFrame=function(e){if(e||this.filterManager._mdf){var t=this.filterManager.effectElements[0].p.v,n=this.filterManager.effectElements[1].p.v,i=this.filterManager.effectElements[2].p.v,o=i[0]+" "+n[0]+" "+t[0],l=i[1]+" "+n[1]+" "+t[1],u=i[2]+" "+n[2]+" "+t[2];this.feFuncR.setAttribute("tableValues",o),this.feFuncG.setAttribute("tableValues",l),this.feFuncB.setAttribute("tableValues",u)}},SVGProLevelsFilter.prototype.createFeFunc=function(e,t){var n=createNS(e);return n.setAttribute("type","table"),t.appendChild(n),n},SVGProLevelsFilter.prototype.getTableValue=function(e,t,n,i,o){for(var l,u,d=0,f=Math.min(e,t),p=Math.max(e,t),m=Array.call(null,{length:256}),g=0,b=o-i,_=t-e;d<=256;)u=(l=d/256)<=f?_<0?o:i:l>=p?_<0?i:o:i+b*Math.pow((l-e)/_,1/n),m[g]=u,g+=1,d+=256/255;return m.join(" ")},SVGProLevelsFilter.prototype.renderFrame=function(e){if(e||this.filterManager._mdf){var t,n=this.filterManager.effectElements;this.feFuncRComposed&&(e||n[3].p._mdf||n[4].p._mdf||n[5].p._mdf||n[6].p._mdf||n[7].p._mdf)&&(t=this.getTableValue(n[3].p.v,n[4].p.v,n[5].p.v,n[6].p.v,n[7].p.v),this.feFuncRComposed.setAttribute("tableValues",t),this.feFuncGComposed.setAttribute("tableValues",t),this.feFuncBComposed.setAttribute("tableValues",t)),this.feFuncR&&(e||n[10].p._mdf||n[11].p._mdf||n[12].p._mdf||n[13].p._mdf||n[14].p._mdf)&&(t=this.getTableValue(n[10].p.v,n[11].p.v,n[12].p.v,n[13].p.v,n[14].p.v),this.feFuncR.setAttribute("tableValues",t)),this.feFuncG&&(e||n[17].p._mdf||n[18].p._mdf||n[19].p._mdf||n[20].p._mdf||n[21].p._mdf)&&(t=this.getTableValue(n[17].p.v,n[18].p.v,n[19].p.v,n[20].p.v,n[21].p.v),this.feFuncG.setAttribute("tableValues",t)),this.feFuncB&&(e||n[24].p._mdf||n[25].p._mdf||n[26].p._mdf||n[27].p._mdf||n[28].p._mdf)&&(t=this.getTableValue(n[24].p.v,n[25].p.v,n[26].p.v,n[27].p.v,n[28].p.v),this.feFuncB.setAttribute("tableValues",t)),this.feFuncA&&(e||n[31].p._mdf||n[32].p._mdf||n[33].p._mdf||n[34].p._mdf||n[35].p._mdf)&&(t=this.getTableValue(n[31].p.v,n[32].p.v,n[33].p.v,n[34].p.v,n[35].p.v),this.feFuncA.setAttribute("tableValues",t))}},extendPrototype([SVGComposableEffect],SVGDropShadowEffect),SVGDropShadowEffect.prototype.renderFrame=function(e){if(e||this.filterManager._mdf){if((e||this.filterManager.effectElements[4].p._mdf)&&this.feGaussianBlur.setAttribute("stdDeviation",this.filterManager.effectElements[4].p.v/4),e||this.filterManager.effectElements[0].p._mdf){var t=this.filterManager.effectElements[0].p.v;this.feFlood.setAttribute("flood-color",rgbToHex(Math.round(255*t[0]),Math.round(255*t[1]),Math.round(255*t[2])))}if((e||this.filterManager.effectElements[1].p._mdf)&&this.feFlood.setAttribute("flood-opacity",this.filterManager.effectElements[1].p.v/255),e||this.filterManager.effectElements[2].p._mdf||this.filterManager.effectElements[3].p._mdf){var n=this.filterManager.effectElements[3].p.v,i=(this.filterManager.effectElements[2].p.v-90)*degToRads,o=n*Math.cos(i),l=n*Math.sin(i);this.feOffset.setAttribute("dx",o),this.feOffset.setAttribute("dy",l)}}};var _svgMatteSymbols=[];function SVGMatte3Effect(e,t,n){this.initialized=!1,this.filterManager=t,this.filterElem=e,this.elem=n,n.matteElement=createNS("g"),n.matteElement.appendChild(n.layerElement),n.matteElement.appendChild(n.transformedElement),n.baseElement=n.matteElement}function SVGGaussianBlurEffect(e,t,n,i){e.setAttribute("x","-100%"),e.setAttribute("y","-100%"),e.setAttribute("width","300%"),e.setAttribute("height","300%"),this.filterManager=t;var o=createNS("feGaussianBlur");o.setAttribute("result",i),e.appendChild(o),this.feGaussianBlur=o}function TransformEffect(){}function SVGTransformEffect(e,t){this.init(t)}function CVTransformEffect(e){this.init(e)}return SVGMatte3Effect.prototype.findSymbol=function(e){for(var t=0,n=_svgMatteSymbols.length;t<n;){if(_svgMatteSymbols[t]===e)return _svgMatteSymbols[t];t+=1}return null},SVGMatte3Effect.prototype.replaceInParent=function(e,t){var n=e.layerElement.parentNode;if(n){for(var i,o=n.children,l=0,u=o.length;l<u&&o[l]!==e.layerElement;)l+=1;l<=u-2&&(i=o[l+1]);var d=createNS("use");d.setAttribute("href","#"+t),i?n.insertBefore(d,i):n.appendChild(d)}},SVGMatte3Effect.prototype.setElementAsMask=function(e,t){if(!this.findSymbol(t)){var n=createElementID(),i=createNS("mask");i.setAttribute("id",t.layerId),i.setAttribute("mask-type","alpha"),_svgMatteSymbols.push(t);var o=e.globalData.defs;o.appendChild(i);var l=createNS("symbol");l.setAttribute("id",n),this.replaceInParent(t,n),l.appendChild(t.layerElement),o.appendChild(l);var u=createNS("use");u.setAttribute("href","#"+n),i.appendChild(u),t.data.hd=!1,t.show()}e.setMatte(t.layerId)},SVGMatte3Effect.prototype.initialize=function(){for(var e=this.filterManager.effectElements[0].p.v,t=this.elem.comp.elements,n=0,i=t.length;n<i;)t[n]&&t[n].data.ind===e&&this.setElementAsMask(this.elem,t[n]),n+=1;this.initialized=!0},SVGMatte3Effect.prototype.renderFrame=function(){this.initialized||this.initialize()},SVGGaussianBlurEffect.prototype.renderFrame=function(e){if(e||this.filterManager._mdf){var t=.3*this.filterManager.effectElements[0].p.v,n=this.filterManager.effectElements[1].p.v,i=n==3?0:t,o=n==2?0:t;this.feGaussianBlur.setAttribute("stdDeviation",i+" "+o);var l=this.filterManager.effectElements[2].p.v==1?"wrap":"duplicate";this.feGaussianBlur.setAttribute("edgeMode",l)}},TransformEffect.prototype.init=function(e){this.effectsManager=e,this.type=effectTypes.TRANSFORM_EFFECT,this.matrix=new Matrix,this.opacity=-1,this._mdf=!1,this._opMdf=!1},TransformEffect.prototype.renderFrame=function(e){if(this._opMdf=!1,this._mdf=!1,e||this.effectsManager._mdf){var t=this.effectsManager.effectElements,n=t[0].p.v,i=t[1].p.v,o=t[2].p.v===1,l=t[3].p.v,u=o?l:t[4].p.v,d=t[5].p.v,f=t[6].p.v,p=t[7].p.v;this.matrix.reset(),this.matrix.translate(-n[0],-n[1],n[2]),this.matrix.scale(.01*u,.01*l,1),this.matrix.rotate(-p*degToRads),this.matrix.skewFromAxis(-d*degToRads,(f+90)*degToRads),this.matrix.translate(i[0],i[1],0),this._mdf=!0,this.opacity!==t[8].p.v&&(this.opacity=t[8].p.v,this._opMdf=!0)}},extendPrototype([TransformEffect],SVGTransformEffect),extendPrototype([TransformEffect],CVTransformEffect),registerRenderer("canvas",CanvasRenderer),registerRenderer("html",HybridRenderer),registerRenderer("svg",SVGRenderer),ShapeModifiers.registerModifier("tm",TrimModifier),ShapeModifiers.registerModifier("pb",PuckerAndBloatModifier),ShapeModifiers.registerModifier("rp",RepeaterModifier),ShapeModifiers.registerModifier("rd",RoundCornersModifier),ShapeModifiers.registerModifier("zz",ZigZagModifier),ShapeModifiers.registerModifier("op",OffsetPathModifier),setExpressionsPlugin(Expressions),setExpressionInterfaces(getInterface),initialize$1(),initialize(),registerEffect$1(20,SVGTintFilter,!0),registerEffect$1(21,SVGFillFilter,!0),registerEffect$1(22,SVGStrokeEffect,!1),registerEffect$1(23,SVGTritoneFilter,!0),registerEffect$1(24,SVGProLevelsFilter,!0),registerEffect$1(25,SVGDropShadowEffect,!0),registerEffect$1(28,SVGMatte3Effect,!1),registerEffect$1(29,SVGGaussianBlurEffect,!0),registerEffect$1(35,SVGTransformEffect,!1),registerEffect(35,CVTransformEffect),lottie})}),REACT_LOTTIE_PLAYER_VERSION="3.6.0",LOTTIE_WEB_VERSION="^5.12.2",PlayerState,PlayerEvent;function parseSrc(e){if(typeof e=="object")return e;try{return JSON.parse(e)}catch{}try{return new URL(e).toString()}catch{}return e}(function(e){e.Loading="loading",e.Playing="playing",e.Paused="paused",e.Stopped="stopped",e.Frozen="frozen",e.Error="error"})(PlayerState||(PlayerState={})),function(e){e.Load="load",e.InstanceSaved="instanceSaved",e.Error="error",e.Ready="ready",e.Play="play",e.Pause="pause",e.Stop="stop",e.Freeze="freeze",e.Loop="loop",e.Complete="complete",e.Frame="frame"}(PlayerEvent||(PlayerEvent={}));var defaultOptions={clearCanvas:!1,hideOnTransparent:!0,progressiveLoad:!0},Player=function(e){function t(n){var i=e.call(this,n)||this;return i.container=null,i.unmounted=!1,i.handleBgChange=function(o){i.setState({background:o})},i.triggerDownload=function(o,l){var u=document.createElement("a");u.href=o,u.download=l,document.body.appendChild(u),u.click(),document.body.removeChild(u)},i.snapshot=function(o){var l;o===void 0&&(o=!0);var u=i.props.id?i.props.id:"lottie",d=document.getElementById(u);if(i.props.renderer==="svg"){if(d){var f=d.querySelector("svg");if(f){var p=new XMLSerializer().serializeToString(f);l="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(p)}}o&&i.triggerDownload(l,"snapshot.svg")}else if(i.props.renderer==="canvas"){if(d){var m=d.querySelector("canvas");m&&(l=m.toDataURL("image/png"))}o&&i.triggerDownload(l,"snapshot.png")}return l},typeof window<"u"&&(window.lottie=lottie),i.state={animationData:null,background:"transparent",containerRef:React__namespace.createRef(),debug:!0,instance:null,playerState:PlayerState.Loading,seeker:0},i}return __extends(t,e),t.getDerivedStateFromProps=function(n,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return n.background!==i.background?[2,{background:n.background}]:[2,null]})})},t.prototype.getVersions=function(){return{lottieWebVersion:LOTTIE_WEB_VERSION,lottiePlayerVersion:REACT_LOTTIE_PLAYER_VERSION}},t.prototype.componentDidMount=function(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(n){switch(n.label){case 0:return this.unmounted?[3,2]:[4,this.createLottie()];case 1:n.sent(),n.label=2;case 2:return[2]}})})},t.prototype.componentWillUnmount=function(){this.unmounted=!0,this.state.instance&&this.state.instance.destroy()},t.prototype.componentDidUpdate=function(n){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){switch(i.label){case 0:return this.props.src===n.src?[3,2]:(this.state.instance&&this.state.instance.destroy(),[4,this.createLottie()]);case 1:i.sent(),i.label=2;case 2:return[2]}})})},t.prototype.render=function(){var n=this,i=this.props,o=i.children,l=i.loop,u=i.style,d=i.onBackgroundChange,f=i.className,p=this.state,m=p.animationData,g=p.instance,b=p.playerState,_=p.seeker,R=p.debug,E=p.background;return React__namespace.createElement("div",{className:"lf-player-container"},this.state.playerState===PlayerState.Error?React__namespace.createElement("div",{className:"lf-error"},React__namespace.createElement("span",{"aria-label":"error-symbol",role:"img"},"⚠️")):React__namespace.createElement("div",{id:this.props.id?this.props.id:"lottie",ref:function(S){return n.container=S},style:__assign({background:E,margin:"0 auto",outline:"none",overflow:"hidden"},u),className:f}),React__namespace.Children.map(o,function(S){return React__namespace.isValidElement(S)?React__namespace.cloneElement(S,{animationData:m,background:E,debug:R,instance:g,loop:l,pause:function(){return n.pause()},play:function(){return n.play()},playerState:b,seeker:_,setBackground:function(C){n.setState({background:C}),typeof d=="function"&&d(C)},setSeeker:function(C,T){return n.setSeeker(C,T)},stop:function(){return n.stop()},toggleDebug:function(){return n.toggleDebug()},setLoop:function(C){return n.setLoop(C)},colorChangedEvent:function(C){n.handleBgChange(C)},snapshot:function(){n.snapshot()}}):null}))},t.prototype.toggleDebug=function(){this.setState({debug:!this.state.debug})},t.prototype.createLottie=function(){return __awaiter(this,void 0,void 0,function(){var n,i,o,l,u,d,f,p,m,g,b,_,R,E,S=this;return __generator(this,function(C){switch(C.label){case 0:if(n=this.props,i=n.autoplay,o=n.direction,l=n.loop,u=n.lottieRef,d=n.renderer,f=n.speed,p=n.src,m=n.background,g=n.rendererSettings,b=n.hover,_=this.state.instance,!p||!this.container)return[2];C.label=1;case 1:return C.trys.push([1,5,,6]),typeof(R=parseSrc(p))!="string"?[3,4]:[4,fetch(R).catch(function(){throw S.setState({playerState:PlayerState.Error}),S.triggerEvent(PlayerEvent.Error),new Error("@LottieFiles/lottie-react: Animation data could not be fetched.")})];case 2:return[4,C.sent().json().catch(function(){throw S.setState({playerState:PlayerState.Error}),S.triggerEvent(PlayerEvent.Error),new Error("@LottieFiles/lottie-react: Animation data could not be fetched.")})];case 3:R=C.sent(),C.label=4;case 4:return _&&_.destroy(),E=lottie.loadAnimation({rendererSettings:g||defaultOptions,animationData:R,autoplay:i||!1,container:this.container,loop:l||!1,renderer:d}),f&&E.setSpeed(f),this.setState({animationData:R}),this.setState({instance:E},function(){S.triggerEvent(PlayerEvent.InstanceSaved),typeof u=="function"&&u(E),i&&S.play()}),E.addEventListener("enterFrame",function(){S.triggerEvent(PlayerEvent.Frame),S.setState({seeker:Math.floor(E.currentFrame)})}),E.addEventListener("DOMLoaded",function(){S.triggerEvent(PlayerEvent.Load)}),E.addEventListener("data_ready",function(){S.triggerEvent(PlayerEvent.Ready)}),E.addEventListener("data_failed",function(){S.setState({playerState:PlayerState.Error}),S.triggerEvent(PlayerEvent.Error)}),E.addEventListener("loopComplete",function(){S.triggerEvent(PlayerEvent.Loop)}),E.addEventListener("complete",function(){S.triggerEvent(PlayerEvent.Complete),S.setState({playerState:PlayerState.Paused}),S.props.keepLastFrame&&!S.props.loop||S.setSeeker(0)}),this.container&&(this.container.addEventListener("mouseenter",function(){b&&S.state.playerState!==PlayerState.Playing&&(S.props.keepLastFrame&&S.stop(),S.play())}),this.container.addEventListener("mouseleave",function(){b&&S.state.playerState===PlayerState.Playing&&S.stop()})),f&&this.setPlayerSpeed(f),o&&this.setPlayerDirection(o),m&&this.setState({background:m}),[3,6];case 5:return C.sent(),this.setState({playerState:PlayerState.Error}),this.triggerEvent(PlayerEvent.Error),[3,6];case 6:return[2]}})})},t.prototype.play=function(){var n=this.state.instance;n&&(this.triggerEvent(PlayerEvent.Play),n.play(),this.setState({playerState:PlayerState.Playing}))},t.prototype.pause=function(){var n=this.state.instance;n&&(this.triggerEvent(PlayerEvent.Pause),n.pause(),this.setState({playerState:PlayerState.Paused}))},t.prototype.stop=function(){var n=this.state.instance;n&&(this.triggerEvent(PlayerEvent.Stop),n.stop(),this.setState({playerState:PlayerState.Stopped}))},t.prototype.setPlayerSpeed=function(n){var i=this.state.instance;i&&i.setSpeed(n)},t.prototype.setPlayerDirection=function(n){var i=this.state.instance;i&&i.setDirection(n)},t.prototype.setSeeker=function(n,i){i===void 0&&(i=!1);var o=this.state,l=o.instance,u=o.playerState;l&&(i&&u===PlayerState.Playing?l.goToAndPlay(n,!0):(l.goToAndStop(n,!0),this.triggerEvent(PlayerEvent.Pause),this.setState({playerState:PlayerState.Paused})))},t.prototype.setLoop=function(n){var i=this.state.instance;i&&(i.loop=n,this.setState({instance:i}))},t.prototype.triggerEvent=function(n){var i=this.props.onEvent;i&&i(n)},t.defaultProps={loop:!1},t}(React__namespace.Component);function styleInject(e,t){t===void 0&&(t={});var n=t.insertAt;if(typeof document<"u"){var i=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css",n==="top"&&i.firstChild?i.insertBefore(o,i.firstChild):i.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}var css_248z=`.lf-progress {
|
|
328
348
|
-webkit-appearance: none;
|
|
329
349
|
-moz-apperance: none;
|
|
330
350
|
width: 100%;
|
|
@@ -862,6 +882,6 @@ ${p.description}`:p.summary||`${f.toUpperCase()} ${m[m.length-1]}`,parameters:{t
|
|
|
862
882
|
DO NOT ask the user which ID to use. ALWAYS use "${e}" for ALL ID parameters - unless the user has asked for another one.
|
|
863
883
|
This is MANDATORY for ALL API function calls.
|
|
864
884
|
|
|
865
|
-
REPEAT: For ANY API function that requires an ID in the path, USE "${e}" as the value unless the user has given you another one.`,A=C.startChat({generationConfig:{maxOutputTokens:4096},history:[{role:"user",parts:[{text:"Please introduce yourself"}]},{role:"model",parts:[{text:T}]}],tools:f.length>0?[{functionDeclarations:f.map(({declaration:M})=>M)}]:[]});l(A)}catch(C){console.error("Error initializing chat:",C)}};o||m||S()},[m,o]),React.useEffect(()=>{(async()=>{try{const C=await fetchApiFunctions(e);p(C)}catch(C){console.error("Error loading API functions:",C)}finally{g(!1)}})()},[e]);const _=Object.fromEntries(f.map(({declaration:S,handler:C})=>[S.name,C])),R=async S=>{var T,A;const C=S.name;if(C in _){const M=_[C],I=S.args||{};console.log(`[Function Call] ${C} with args:`,I);const O=(T=f.find(D=>D.declaration.name===C))==null?void 0:T.declaration;if(!O){console.error(`[Function Call] Could not find declaration for ${C}`);return}const N=Object.keys(((A=O.parameters)==null?void 0:A.properties)||{});console.log("[Function Call] Parameter names from declaration:",N);const j=[];N.forEach(D=>{if(D.toLowerCase().includes("id")||D.toLowerCase().includes("reseller")||D.toLowerCase().includes("manufacturer")||D.toLowerCase().includes("partner")||D.toLowerCase().includes("application"))j.push("");else if(D in I){const L=I[D];typeof L=="object"?j.push(JSON.stringify(L)):j.push(typeof L=="string"?L:String(L))}else j.push("")}),console.log("[Function Call] Converted args to:",j);try{const D=await M(j);let F,L=null,B=!1;if(typeof D=="string"?F=D:(F=D.summary,L=D.component,B=!0),console.log(`[Function Response] ${C} returned:`,F),o){const V={functionResponse:{name:C,response:{content:F}}};if(B&&L){const U={role:"assistant",content:L,timestamp:new Date,isComponent:!0};d(Q=>[...Q,U])}const z={role:"assistant",content:(await o.sendMessage([V])).response.text(),timestamp:new Date};d(U=>[...U,z])}}catch(D){console.error("Error executing function:",D);const F={role:"assistant",content:"I encountered an error while processing your request. Please try again.",timestamp:new Date};d(L=>[...L,F])}}else console.error(`Function ${C} not found`)};return{handleSubmitToBot:async S=>{if(S.trim()&&!n&&o){const C={role:"user",content:S,timestamp:new Date};d(T=>[...T,C]),i(!0);try{const A=(await o.sendMessage(S.trim())).response,M=A.functionCalls();if(M&&M.length>0)for(const I of M)await R(I);else{const I={role:"assistant",content:A.text(),timestamp:new Date};d(O=>[...O,I])}}catch(T){console.error("Error sending message:",T);const A={role:"assistant",content:"I'm sorry, I encountered an error processing your request. Please try again later.",timestamp:new Date};d(M=>[...M,A])}finally{i(!1)}}},botMessages:u,botReady:!!o,isProcessingSubmission:n}}const ASSISTANT_ID="RandmarAIChatAssistant",ChatLayout=React.forwardRef(({userId:e,userName:t,apiKey:n,inputRef:i},o)=>{var Q,q,W;const{data:l}=useGetV4PartnerByApplicationIdBusinessDevelopmentConversationsQuery({applicationId:e}),[u]=useLazyGetV4PartnerByApplicationIdBusinessDevelopmentConversationAndConversationIdMessagesQuery(),{handleSubmitToBot:d,botMessages:f,botReady:p,isProcessingSubmission:m}=useAIAssistant({userId:e,apiKey:n});React.useEffect(()=>{if(!l)return;const G={partner1:[e,ASSISTANT_ID].sort()[0],partner2:[e,ASSISTANT_ID].sort()[1],name:"Randmar Assistant",unread:0,pending:!1,historyFetched:!0,messages:[],conversationID:-1},K=l.map(J=>{var ee;return{partner1:[J.Participant1,J.Participant2].sort()[0],partner2:[J.Participant1,J.Participant2].sort()[1],name:((ee=J.Participant)==null?void 0:ee.PublicName)??"missing public name",unread:0,pending:J.Status!="Approved",historyFetched:!1,messages:[],conversationID:J.ConversationId}});setTimeout(()=>{var J;return(J=L.current)==null?void 0:J.focus()},50),M([G,...K])},[l]);const[g,b]=React.useState("all"),[_,R]=React.useState([[e,ASSISTANT_ID].sort()[0],[e,ASSISTANT_ID].sort()[1]]),[E,S]=React.useState(""),[C,T]=React.useState(null),[A,M]=React.useState([]),[I,O]=React.useState(""),[N,j]=React.useState(null),D=React.useRef(null),F=React.useRef(null),L=i||F,B=A.filter(G=>{const K=G.name.toLowerCase().includes(I.toLowerCase());return g==="all"?K:g==="approved"?K&&!G.pending:g==="pending"?K&&G.pending:K});React.useEffect(()=>{const G=f.at(-1);if(!G||G.role!="assistant"||G.isComponent)return;const K={id:G.timestamp.toString(),fromPartnerID:ASSISTANT_ID,toPartnerID:e,senderName:"Assistant",timestamp:G.timestamp.getTime(),content:G.content};V(K)},[f]);function V(G){const K=[G.fromPartnerID,G.toPartnerID];K.sort(),M(J=>{let ee=!1,ne=!1;const ae=J.map(oe=>oe.partner1!==K[0]||oe.partner2!==K[1]||(ne=!0,oe.messages.findIndex(se=>se.id==G.id)!==-1)?oe:(ee=!0,{...oe,unread:oe.unread+1,messages:[...oe.messages,G]}));return!ne&&K[0]!==e&&K[1]!==e?(console.log("(bug) server sent a message to us by mistake."),ae):(ee&&T([K[0],K[1]]),ae)})}React.useEffect(()=>{const G=new HubConnectionBuilder().withUrl("https://api.randmar.io/hub",{accessTokenFactory:()=>localStorage.getItem("access_token"),headers:{"X-Impersonated-Id":e}}).configureLogging(LogLevel.Information).withAutomaticReconnect().withHubProtocol(new JsonHubProtocol).build();return G.on("ReceiveMessage",V),G.start().catch(K=>console.error("Error connecting to SignalR hub:",K)),j(G),()=>{G&&G.stop()}},[e]),React.useEffect(()=>{(C==null?void 0:C[0])!==(_==null?void 0:_[0])||(C==null?void 0:C[1])!==(_==null?void 0:_[1])||(M(G=>G.map(K=>K.partner1===(_==null?void 0:_[0])&&K.partner2===(_==null?void 0:_[1])?{...K,unread:0}:K)),setTimeout(()=>{var G;return(G=D.current)==null?void 0:G.scrollIntoView({behavior:"smooth"})},50))},[C,_]),React.useEffect(()=>{var K;if(!_)return;const G=getActiveChatObject(A,_);G&&((K=L.current)==null||K.focus(),G.historyFetched?(M(J=>J.map(ee=>ee.partner1===_[0]&&ee.partner2===_[1]?{...ee,unread:0}:ee)),setTimeout(()=>{var J;return(J=D.current)==null?void 0:J.scrollIntoView({behavior:"smooth"})},50)):u({applicationId:e,conversationId:G.conversationID}).unwrap().then(J=>{const ee=J.map(ne=>({id:"history"+ne.MessageId,fromPartnerID:ne.SenderId,toPartnerID:ne.SenderId==_[0]?_[1]:_[0],senderName:ne.SenderName??"missing name",timestamp:new Date(ne.SentDate+"Z").getTime(),content:ne.Content??"no content"}));M(ne=>ne.map(ae=>ae.partner1===_[0]&&ae.partner2===_[1]?{...ae,messages:ee,historyFetched:!0}:ae)),setTimeout(()=>{var ne;return(ne=D.current)==null?void 0:ne.scrollIntoView({behavior:"smooth"})},100)}).catch(J=>{console.error("Error fetching conversation messages:",J)}))},[_,u,e]);const H=(G,K,J)=>{const ee={id:crypto.randomUUID(),senderName:t,fromPartnerID:e,toPartnerID:K[0]===e?K[1]:K[0],content:G,timestamp:Date.now()};M(ne=>ne.map(ae=>ae.partner1===K[0]&&ae.partner2===K[1]?{...ae,messages:[...ae.messages,ee]}:ae)),T([K[0],K[1]]),ee.toPartnerID==ASSISTANT_ID?d(ee.content):J.invoke("NewMessage",ee).catch(ne=>console.error("Error sending message:",ne)),S("")},z=(G,K)=>{if(!A.length||!N||!p)return!1;const J=A.find(ee=>ee.conversationID===G);return J?(R([J.partner1,J.partner2]),K&&setTimeout(()=>H(K,[J.partner1,J.partner2],N),100),!0):!1};if(React.useImperativeHandle(o,()=>({setActiveChatAndSendMessage:z})),!p)return jsxRuntime.jsx(jsxRuntime.Fragment,{children:jsxRuntime.jsx("div",{className:"flex items-center justify-center p-8",children:jsxRuntime.jsxs("div",{className:"text-center",children:[jsxRuntime.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-primary mx-auto mb-4"}),jsxRuntime.jsx("p",{children:"Loading API functions..."})]})})});const U=()=>{!E.trim()||!_||!N||H(E,_,N)};return jsxRuntime.jsxs("div",{className:"flex h-[80vh] overflow-hidden",children:[jsxRuntime.jsxs("div",{className:"w-[260px] p-4 pt-3 flex flex-col border-r",children:[jsxRuntime.jsx("div",{className:"p-4 font-semibold border-b",children:"Communications"}),A.length>1&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("div",{className:"p-2",children:jsxRuntime.jsxs("div",{className:"relative",children:[jsxRuntime.jsx(Search,{className:"absolute left-2 top-1/2 transform -translate-y-1/2 h-4 w-4 text-muted-foreground"}),jsxRuntime.jsx(Input,{placeholder:"Search chats...",className:"pl-8 h-9",value:I,onChange:G=>O(G.target.value)})]})}),jsxRuntime.jsx(Tabs,{value:g,onValueChange:b,className:"w-full mb-1",children:jsxRuntime.jsxs(TabsList,{className:"grid grid-cols-8 h-9 mx-2",children:[jsxRuntime.jsx(TabsTrigger,{value:"all",className:"text-xs col-span-2",children:"All"}),jsxRuntime.jsx(TabsTrigger,{value:"approved",className:"text-xs col-span-3",children:"Approved"}),jsxRuntime.jsx(TabsTrigger,{value:"pending",className:"text-xs col-span-3",children:"Pending"})]})})]}),jsxRuntime.jsx(ScrollArea,{className:"flex-1",children:A.length&&jsxRuntime.jsx(ChatList,{userId:e,chats:B.filter(G=>G.partner1!=ASSISTANT_ID&&G.partner2!=ASSISTANT_ID),activeChat:getActiveChatObject(A,_)??null,onSelectChat:R,assistantChat:A.find(G=>G.partner1==ASSISTANT_ID||G.partner2==ASSISTANT_ID)})})]}),jsxRuntime.jsx("div",{className:"flex-1 flex flex-col",children:_?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs("div",{className:"flex items-center p-4 border-b",children:[jsxRuntime.jsx(Avatar,{className:"h-8 w-8 flex-shrink-0 rounded-none",children:_[0]==ASSISTANT_ID||_[1]==ASSISTANT_ID?jsxRuntime.jsx(Bot,{className:"text-primary fill-white min-h-full"}):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(AvatarImage,{src:`https://api.randmar.io/v4/Partner/${_[0]===e?_[1]:_[0]}/Account/Logo?height=72&width=72`,className:" object-contain "}),jsxRuntime.jsx(AvatarFallback,{children:jsxRuntime.jsx(Handshake,{className:"text-primary fill-white min-h-full"})})]})}),jsxRuntime.jsx("div",{className:"ml-3 font-medium",children:(Q=getActiveChatObject(A,_))==null?void 0:Q.name}),jsxRuntime.jsx(Button,{variant:"ghost",size:"icon",className:"ml-auto hidden",children:jsxRuntime.jsx(EllipsisVertical,{className:"h-5 w-5"})})]}),(q=getActiveChatObject(A,_))!=null&&q.pending?jsxRuntime.jsx("p",{className:"mt-8 p-2 mx-auto",children:"This conversation is still awaiting approval — please check back later."}):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs(ScrollArea,{className:"flex-1 p-4 bg-slate-50",children:[jsxRuntime.jsx(ChatMessages,{messages:((W=getActiveChatObject(A,_))==null?void 0:W.messages)??[],currentUserId:e,isWaitingForBot:m&&_&&(_[0]===ASSISTANT_ID||_[1]===ASSISTANT_ID)}),jsxRuntime.jsx("div",{ref:D})]}),jsxRuntime.jsxs("div",{className:"p-4 border-t flex",children:[jsxRuntime.jsx(Input,{ref:L,placeholder:"Type a message...",value:E,onChange:G=>S(G.target.value),onKeyDown:G=>G.key==="Enter"&&U(),className:"flex-1"}),jsxRuntime.jsx(Button,{size:"icon",variant:"default",className:"ml-1",disabled:m,onClick:U,children:jsxRuntime.jsx(Send,{className:"h-4 w-4"})})]})]})]}):jsxRuntime.jsx("div",{className:"flex-1 flex items-center justify-center text-muted-foreground",children:"Select a chat to start messaging"})})]})});function getActiveChatObject(e,t){return e.find(n=>n.partner1==(t==null?void 0:t[0])&&n.partner2==(t==null?void 0:t[1]))}const Card=React__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("div",{ref:n,className:cn("rounded-md border bg-card text-card-foreground shadow-sm",e),...t}));Card.displayName="Card";const CardHeader=React__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("div",{ref:n,className:cn("flex flex-col space-y-1.5 p-6",e),...t}));CardHeader.displayName="CardHeader";const CardTitle=React__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("div",{ref:n,className:cn("font-semibold leading-none tracking-tight",e),...t}));CardTitle.displayName="CardTitle";const CardDescription=React__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("div",{ref:n,className:cn("text-sm text-muted-foreground",e),...t}));CardDescription.displayName="CardDescription";const CardContent=React__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("div",{ref:n,className:cn("p-6 pt-0",e),...t}));CardContent.displayName="CardContent";const CardFooter=React__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("div",{ref:n,className:cn("flex items-center p-6 pt-0",e),...t}));CardFooter.displayName="CardFooter";function PartnerCard({id:e,name:t,about:n,voiceName:i,voiceStyle:o,sceneName:l,action:u,loading:d=!1}){const f=`https://api.randmar.io/V4/Partner/${e}/Account/Video`,p=`https://api.randmar.io/V4/Partner/${e}/Account/Video/Exists`,m=`https://api.randmar.io/V4/Partner/${e}/Account/Logo?width=64&height=64`,g=`https://api.randmar.io/V4/Partner/${e}/Account/Logo/Exists`,b=!!(i||o||l),[_,R]=React.useState(null),[E,S]=React.useState(!1),[C,T]=React.useState(!1),[A,M]=React.useState(!1),[I,O]=React.useState(!0);React.useEffect(()=>{if(!e||d)return;const j=async()=>{try{const B=await fetch(g);if(B.ok){const H=(await B.text()).toLowerCase()==="true";return T(H),H}return!1}catch(B){return console.error("Failed to check if logo exists:",B),T(!1),!1}},D=async()=>{S(!0);try{const B=await fetch(m);if(B.ok){const V=await B.blob();R(URL.createObjectURL(V))}}catch(B){console.error("Failed to load logo:",B)}finally{S(!1)}},F=async()=>{try{const B=await fetch(p);if(B.ok){const V=await B.text();M(V.toLowerCase()==="true")}}catch(B){console.error("Failed to check if video exists:",B),M(!1)}};(async()=>{await j()&&D(),F()})()},[e,m,g,p,d]);const N=()=>{O(!1)};return d?jsxRuntime.jsx(Card,{className:"hover:shadow-lg transition-shadow",children:jsxRuntime.jsxs(CardContent,{className:"p-6",children:[jsxRuntime.jsxs("div",{className:"flex flex-col sm:flex-row justify-between items-start gap-4 mb-4",children:[jsxRuntime.jsxs("div",{className:"flex items-center",children:[jsxRuntime.jsx("div",{className:"h-10 flex items-center justify-center mr-4",children:jsxRuntime.jsx(Skeleton,{className:"h-10 w-10 rounded-md"})}),jsxRuntime.jsx(Skeleton,{className:"h-7 w-40"})]}),jsxRuntime.jsx("div",{className:"w-full sm:w-auto",children:jsxRuntime.jsx(Skeleton,{className:"h-9 w-24"})})]}),jsxRuntime.jsxs("div",{className:"flex flex-col md:flex-row gap-6",children:[jsxRuntime.jsxs("div",{className:"flex-1 flex flex-col order-1 md:order-1",children:[jsxRuntime.jsxs("div",{className:"space-y-2",children:[jsxRuntime.jsx(Skeleton,{className:"h-4 w-full"}),jsxRuntime.jsx(Skeleton,{className:"h-4 w-full"}),jsxRuntime.jsx(Skeleton,{className:"h-4 w-3/4"}),jsxRuntime.jsx(Skeleton,{className:"h-4 w-5/6"})]}),jsxRuntime.jsx("div",{className:"mt-4 p-3 bg-slate-50 rounded-md",children:jsxRuntime.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-2",children:[jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx(Skeleton,{className:"h-3 w-20 mb-1"}),jsxRuntime.jsx(Skeleton,{className:"h-5 w-24"})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx(Skeleton,{className:"h-3 w-20 mb-1"}),jsxRuntime.jsx(Skeleton,{className:"h-5 w-24"})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx(Skeleton,{className:"h-3 w-20 mb-1"}),jsxRuntime.jsx(Skeleton,{className:"h-5 w-24"})]})]})})]}),jsxRuntime.jsx("div",{className:"flex flex-col order-1 md:order-1 md:w-auto",children:jsxRuntime.jsx("div",{className:"w-[180px] h-[320px] rounded-md overflow-hidden",children:jsxRuntime.jsx(Skeleton,{className:"w-full h-full"})})})]})]})}):jsxRuntime.jsx(Card,{className:"hover:shadow-lg transition-shadow",children:jsxRuntime.jsxs(CardContent,{className:"p-6",children:[jsxRuntime.jsxs("div",{className:"flex flex-col sm:flex-row justify-between items-start gap-4 mb-4",children:[jsxRuntime.jsxs("div",{className:"flex items-center",children:[C&&jsxRuntime.jsx("div",{className:"h-10 flex items-center justify-center mr-4",children:E?jsxRuntime.jsx(Skeleton,{className:"h-10 w-10 rounded-md"}):_&&jsxRuntime.jsx("img",{src:_||"/placeholder.svg",alt:`${t} logo`,className:"max-h-10 w-auto object-contain"})}),jsxRuntime.jsx("h3",{className:"font-semibold text-xl",children:t})]}),u&&jsxRuntime.jsx("div",{className:"w-full sm:w-auto",children:u})]}),jsxRuntime.jsxs("div",{className:"flex flex-col md:flex-row gap-6",children:[jsxRuntime.jsxs("div",{className:"flex-1 flex flex-col order-1 md:order-1",children:[jsxRuntime.jsx("div",{className:"prose prose-sm max-w-none",dangerouslySetInnerHTML:{__html:n}}),b&&jsxRuntime.jsx("div",{className:"mt-4 p-3 bg-slate-50 rounded-md",children:jsxRuntime.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-2",children:[i&&jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("div",{className:"text-sm text-muted-foreground",children:"Voice Name"}),jsxRuntime.jsx("div",{className:"font-medium",children:i})]}),o&&jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("div",{className:"text-sm text-muted-foreground",children:"Voice Style"}),jsxRuntime.jsx("div",{className:"font-medium",children:o})]}),l&&jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("div",{className:"text-sm text-muted-foreground",children:"Scene Name"}),jsxRuntime.jsx("div",{className:"font-medium",children:l})]})]})})]}),A&&jsxRuntime.jsx("div",{className:"flex flex-col order-1 md:order-1 md:w-auto",children:jsxRuntime.jsxs("div",{className:"w-[180px] h-[320px] rounded-md overflow-hidden",children:[I&&jsxRuntime.jsx(Skeleton,{className:"w-full h-full"}),jsxRuntime.jsx("video",{src:f,controls:!0,preload:"auto",playsInline:!0,className:`w-full h-full object-contain ${I?"invisible":"visible"}`,style:{objectPosition:"center",imageRendering:"auto"},onLoadedData:N,onError:()=>O(!1)})]})})]})]})})}const Topbar=React.forwardRef(({onSignOut:e,handleValidSearch:t,rightMenu:n,searchPlaceholder:i},o)=>{const[l,u]=React.useState(""),d=reactRouterDom.useLocation(),{toast:f}=useToast();React.useEffect(()=>{const b=new URLSearchParams(d.search).get("q");b&&u(b)},[d.search]);const p=()=>{const g=l.trim();if(!g||g.length<2){f({title:"Enter more characters to search",description:"At least 2 characters are needed to search products.",variant:"destructive",duration:5e3});return}t(g)},m=g=>{g.key==="Enter"&&p()};return jsxRuntime.jsxs("header",{className:"flex h-16 items-center gap-4 border-b sidebar-foreground bg-sidebar px-6 fixed top-0 right-0 z-50 lg:left-64 left-0 border-sidebar-border",children:[jsxRuntime.jsx(SidebarTrigger,{className:"lg:hidden",children:jsxRuntime.jsx(Menu$1,{className:"h-6 w-6"})}),jsxRuntime.jsx("div",{className:"flex flex-1 items-center gap-4",children:jsxRuntime.jsx("div",{className:"relative w-full max-w-sm",children:jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("button",{type:"button",className:"absolute left-2 top-1/2 -translate-y-1/2",onClick:p,"aria-label":"Search",children:jsxRuntime.jsx(Search,{className:"h-4 w-4 text-muted-foreground"})}),jsxRuntime.jsx(Input,{placeholder:i??"Search...",className:"w-full pl-8 bg-white text-black",value:l,onChange:g=>u(g.target.value),onKeyDown:m,ref:o},"topbar-search")]})})}),n||jsxRuntime.jsx(jsxRuntime.Fragment,{}),e&&jsxRuntime.jsx("div",{className:"flex items-center gap-4",children:jsxRuntime.jsxs(Button,{variant:"ghost",size:"icon",className:"h-9 w-9",onClick:e,children:[jsxRuntime.jsx(LogOut,{className:"h-4 w-4 text-sidebar-foreground"}),jsxRuntime.jsx("span",{className:"sr-only",children:"Sign out"})]})})]})});Topbar.displayName="Topbar";const badgeVariants=cva("inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/80",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground border border-input hover:bg-accent hover:text-accent-foreground",success:"bg-green-600 text-white hover:bg-green-700",warning:"bg-yellow-500 text-white hover:bg-yellow-600",info:"bg-blue-500 text-white hover:bg-blue-600",ghost:"bg-background hover:bg-accent hover:text-accent-foreground",randmarRed:"bg-randmar-red text-white hover:bg-randmar-red/80",randmarBlue:"bg-randmar-blue text-white hover:bg-randmar-blue/80",randmarPurple:"bg-randmar-purple text-white hover:bg-randmar-purple/80",randmarGreen:"bg-randmar-green text-black hover:bg-randmar-green/80",randmarBlack:"bg-randmar-black text-white hover:bg-randmar-black/80",randmarYellow:"bg-randmar-yellow text-black hover:bg-randmar-yellow/80"},size:{default:"h-6",sm:"h-5 text-[10px]",lg:"h-7 px-3"}},defaultVariants:{variant:"default",size:"default"}}),Badge=React__namespace.forwardRef(({className:e,variant:t,size:n,icon:i,children:o,...l},u)=>jsxRuntime.jsxs("div",{ref:u,className:cn(badgeVariants({variant:t,size:n}),e),...l,children:[i&&jsxRuntime.jsx("span",{className:"mr-1",children:i}),o]}));Badge.displayName="Badge";const CountryFlag=({countryCode:e,className:t=""})=>{const[n,i]=React.useState(null),[o,l]=React.useState(!1);return React.useEffect(()=>{if(!e)return;const d=`https://purecatamphetamine.github.io/country-flag-icons/3x2/${e.toUpperCase()}.svg`;fetch(d,{method:"HEAD"}).then(f=>{f.ok?(i(d),l(!1)):l(!0)}).catch(()=>{l(!0)})},[e]),o||!n?jsxRuntime.jsx("span",{className:t,children:e}):jsxRuntime.jsx("img",{src:n,alt:`${e} flag`,className:`inline-block ${t}`,style:{width:"24px",height:"auto"}})},Navbar=React.forwardRef(({routes:e,footer:t,dashboardTitle:n,withRandmarAssistant:i,chatUserName:o,chatApiKey:l},u)=>{const{appID:d}=reactRouterDom.useParams(),f=e.filter(b=>b.showInNav),p=React.useRef(null),m=React.useRef(null),g=React.useRef(null);return React.useImperativeHandle(u,()=>({setActiveChatAndSendMessage:(b,_)=>{var R;return(R=g.current)==null||R.click(),setTimeout(()=>{var E;(E=p.current)==null||E.focus(),m.current&&m.current.setActiveChatAndSendMessage(b,_)},100),!0}})),jsxRuntime.jsxs(Sidebar,{className:"border-r border-sidebar-border",children:[jsxRuntime.jsx(SidebarHeader,{className:"border-b border-sidebar-border px-6 h-16 justify-center bg-sidebar text-sidebar-foreground",children:jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsx("div",{className:"flex items-center justify-center",children:jsxRuntime.jsx("img",{src:"https://api.randmar.io/images/RandmarIcon.svg",alt:"Randmar Icon",className:"h-4 w-4 filter brightness-0 saturate-100 invert"})}),jsxRuntime.jsx("span",{className:"font-semibold text-lg",children:n})]})}),jsxRuntime.jsx(SidebarContent,{className:"py-4 bg-sidebar text-sidebar-foreground",children:jsxRuntime.jsx(SidebarMenu,{children:f.map(b=>{const _=b.icon,R=`/${b.path.replace(":appID",d??"")}`;return jsxRuntime.jsx(SidebarMenuItem,{children:jsxRuntime.jsx(SidebarMenuButton,{asChild:!0,children:jsxRuntime.jsxs(reactRouterDom.Link,{to:R,className:"transition-colors hover:bg-muted px-6",children:[_&&jsxRuntime.jsx(_,{className:"h-4 w-4"}),jsxRuntime.jsx("span",{children:b.label})]})})},b.key)})})}),jsxRuntime.jsxs(SidebarFooter,{className:"border-t border-sidebar-border p-4 bg-sidebar-background text-sidebar-foreground",children:[i===!0&&jsxRuntime.jsxs(Dialog,{children:[jsxRuntime.jsx(DialogTrigger,{asChild:!0,children:jsxRuntime.jsxs(Button,{ref:g,size:"lg",className:"collapse md:visible",onClick:()=>setTimeout(()=>{var b;return(b=p.current)==null?void 0:b.focus()},50),children:[jsxRuntime.jsx(Bot,{}),"Assistant"]})}),jsxRuntime.jsx(DialogContent,{className:"max-w-[85vw] p-0 data-[state=open]:visible data-[state=closed]:invisible",forceMount:!0,animateExit:!1,children:jsxRuntime.jsx(ChatLayout,{ref:m,inputRef:p,userId:d??"2",userName:o??"Unknown user",apiKey:l??""})})]}),t]})]})}),Layout=React.forwardRef(({children:e,rightMenu:t,routes:n,footer:i,handleValidSearch:o,dashboardTitle:l,onSignOut:u,searchPlaceholder:d,withRandmarAssistant:f,chatUserName:p,chatApiKey:m,chatRef:g},b)=>jsxRuntime.jsx(jsxRuntime.Fragment,{children:jsxRuntime.jsx(SidebarProvider,{children:jsxRuntime.jsxs("div",{className:"flex grow",children:[jsxRuntime.jsx(Navbar,{routes:n,footer:i,dashboardTitle:l,withRandmarAssistant:f,chatUserName:p,chatApiKey:m,ref:g}),jsxRuntime.jsxs("div",{className:"flex flex-1 flex-col overflow-hidden",children:[jsxRuntime.jsx(Topbar,{ref:b,onSignOut:u,rightMenu:t,handleValidSearch:o,searchPlaceholder:d}),jsxRuntime.jsx("main",{className:"flex-1 overflow-auto mt-16",children:e}),jsxRuntime.jsx(Toaster,{})]})]})})}));Layout.displayName="Layout";const imgSizeMap={sm:100,md:200,lg:300,xl:400};function ProductImage({randmarSKU:e,size:t="md",alt:n,secondaryContent:i}){const[o,l]=React__namespace.useState(!1),[u,d]=React__namespace.useState(!1),[f,p]=React__namespace.useState(!1),[m,g]=React__namespace.useState(!1),b=`https://api.randmar.io/Product/${e}/Video`;React__namespace.useEffect(()=>{(async()=>{try{const A=await(await fetch(b+"/Exists")).json();d(A)}catch(T){console.error("Error checking for video:",T),d(!1)}})()},[e,b]);async function _(){if(u){g(!0);try{const T=await(await fetch(b)).blob(),A=window.URL.createObjectURL(T),M=document.createElement("a");M.href=A,M.download=`${e||"product"}-video.mp4`,document.body.appendChild(M),M.click(),document.body.removeChild(M),window.URL.revokeObjectURL(A)}catch(C){console.error("Error downloading video:",C)}finally{g(!1)}}}function R(){navigator.clipboard.writeText(b),p(!0),setTimeout(()=>{p(!1)},2e3)}function E(){l(!0)}const S=imgSizeMap[t||"xl"];return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(Dialog,{open:o,onOpenChange:l,children:jsxRuntime.jsx(DialogContent,{className:"max-w-4xl p-0 overflow-hidden",children:i?jsxRuntime.jsxs("div",{className:"flex flex-row",children:[jsxRuntime.jsxs("video",{className:"w-full rounded-l-lg max-h-[720px] object-contain",controls:!0,autoPlay:!0,muted:!0,loop:!0,children:[jsxRuntime.jsx("source",{src:b,type:"video/mp4"}),"Your browser does not support the video tag."]}),jsxRuntime.jsx("div",{className:"flex-grow min-w-[400px] h-[70vh] p-6",children:i})]}):jsxRuntime.jsxs("div",{className:"w-full relative",children:[jsxRuntime.jsxs("video",{className:"w-full max-h-[720px] object-contain",controls:!0,autoPlay:!0,children:[jsxRuntime.jsx("source",{src:b,type:"video/mp4"}),"Your browser does not support the video tag."]}),jsxRuntime.jsxs("div",{className:"absolute top-2 right-12 flex gap-1",children:[jsxRuntime.jsx(TooltipProvider,{children:jsxRuntime.jsxs(Tooltip$1,{children:[jsxRuntime.jsx(TooltipTrigger,{asChild:!0,children:jsxRuntime.jsx(Button,{variant:"secondary",size:"icon",onClick:R,children:f?jsxRuntime.jsx(Check,{className:"h-4 w-4"}):jsxRuntime.jsx(Copy,{className:"h-4 w-4"})})}),jsxRuntime.jsx(TooltipContent,{children:jsxRuntime.jsx("p",{children:"Copy video link"})})]})}),jsxRuntime.jsx(TooltipProvider,{children:jsxRuntime.jsxs(Tooltip$1,{children:[jsxRuntime.jsx(TooltipTrigger,{asChild:!0,children:jsxRuntime.jsx(Button,{variant:"secondary",size:"icon",onClick:_,disabled:m,children:jsxRuntime.jsx(Download,{className:"h-4 w-4"})})}),jsxRuntime.jsx(TooltipContent,{children:jsxRuntime.jsx("p",{children:"Download video"})})]})})]})]})})}),jsxRuntime.jsxs("div",{className:"relative w-max h-max",children:[jsxRuntime.jsx("img",{alt:n||`Product ${e}`,className:`rounded-md ${u?"cursor-pointer":""}`,onClick:u?E:void 0,src:`https://api.randmar.io/Product/${e}/Image?width=${S*1.5}&height=${S*1.5}`,width:S,height:S}),u&&jsxRuntime.jsx(TooltipProvider,{children:jsxRuntime.jsxs(Tooltip$1,{children:[jsxRuntime.jsx(TooltipTrigger,{asChild:!0,children:jsxRuntime.jsx(Button,{variant:"secondary",size:"icon",className:"absolute top-2 right-2",onClick:E,children:jsxRuntime.jsx(Play,{className:"h-4 w-4"})})}),jsxRuntime.jsx(TooltipContent,{children:jsxRuntime.jsx("p",{children:"Play video"})})]})})]})]})}function ProductCard({item:e,addToCart:t=!1,syncToShopify:n=!1,customAction:i=jsxRuntime.jsx(jsxRuntime.Fragment,{}),defaultOpportunityNumber:o="",viewProductAction:l,addToCartAction:u,isAddToCartActionLoading:d=!1,syncToShopifyAction:f,isSyncToShopifyActionLoading:p=!1}){var W,G,K,J,ee,ne,ae,oe,se,ce,ie,ue;const[m,g]=React.useState(1),[b,_]=React.useState(null),[R,E]=React.useState(0),[S,C]=React.useState(!1),T=((W=e==null?void 0:e.Distribution)==null?void 0:W.Cost)||0,A=((G=e==null?void 0:e.Distribution)==null?void 0:G.RegularPrice)||0,M=((K=e==null?void 0:e.Distribution)==null?void 0:K.Price)||0,[I,O]=React.useState(null),[N,j]=React.useState(!1);React.useEffect(()=>{const le=async()=>{if(e!=null&&e.ManufacturerId){j(!0);try{const Z=await fetch(`https://api.randmar.io/V4/Partner/${e.ManufacturerId}/Account/Logo?width=60&height=40`);if(Z.ok){const fe=await Z.blob();O(URL.createObjectURL(fe))}}catch(Z){console.error("Failed to load logo:",Z)}finally{j(!1)}}};e!=null&&e.ManufacturerId&&le()},[e==null?void 0:e.ManufacturerId]),React.useEffect(()=>{var le;if(e&&o){const Z=(le=e.Opportunities)==null?void 0:le.find(fe=>fe.BidNumber==o);Z&&_(Z)}},[e,o]),React.useEffect(()=>{if(!e)return;const le=b!=null&&b.Price?b.Price:M;E(A>0?Math.round((A-le)/A*100):0)},[e,b,M,A]),React.useEffect(()=>{d||g(1)},[d]);const D=le=>{if(le.Active!==!0)return!1;const Z=new Date().toISOString().split("T")[0];return!(le.EndDate&&le.EndDate<Z||le.StartDate&&le.StartDate>Z)};if(!e)return jsxRuntime.jsx(Card,{className:"hover:shadow-lg transition-shadow",children:jsxRuntime.jsxs(CardContent,{className:"p-6",children:[jsxRuntime.jsxs("div",{className:"flex justify-between items-start mb-3",children:[jsxRuntime.jsx(Skeleton,{className:"h-7 w-3/4"}),jsxRuntime.jsx("div",{className:"h-10 w-24 flex items-center justify-end ml-4",children:jsxRuntime.jsx(Skeleton,{className:"h-10 w-24 rounded-md"})})]}),jsxRuntime.jsxs("div",{className:"flex flex-wrap gap-2 mb-4",children:[jsxRuntime.jsx(Skeleton,{className:"h-6 w-20 rounded-full"}),jsxRuntime.jsx(Skeleton,{className:"h-6 w-24 rounded-full"}),jsxRuntime.jsx(Skeleton,{className:"h-6 w-28 rounded-full"})]}),jsxRuntime.jsxs("div",{className:"flex gap-6",children:[jsxRuntime.jsxs("div",{className:"grid grid-cols-2 gap-x-4 gap-y-6 flex-1",children:[jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx(Skeleton,{className:"h-4 w-12 mb-1"}),jsxRuntime.jsx(Skeleton,{className:"h-5 w-20"})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx(Skeleton,{className:"h-4 w-12 mb-1"}),jsxRuntime.jsx(Skeleton,{className:"h-5 w-24"})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx(Skeleton,{className:"h-4 w-20 mb-1"}),jsxRuntime.jsx(Skeleton,{className:"h-5 w-16"})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx(Skeleton,{className:"h-4 w-12 mb-1"}),jsxRuntime.jsx(Skeleton,{className:"h-5 w-20"})]})]}),jsxRuntime.jsx("div",{className:"flex flex-col",children:jsxRuntime.jsx("div",{className:"w-60 h-40",children:jsxRuntime.jsx(Skeleton,{className:"w-full h-full rounded-lg"})})})]}),jsxRuntime.jsxs("div",{className:"flex gap-6 mt-4",children:[jsxRuntime.jsx("div",{className:"flex flex-1",children:jsxRuntime.jsxs("div",{className:"w-full",children:[jsxRuntime.jsx(Skeleton,{className:"h-4 w-24 mb-3"}),jsxRuntime.jsx(Skeleton,{className:"h-16 w-full rounded-md"})]})}),jsxRuntime.jsxs("div",{className:"flex flex-col items-center",children:[jsxRuntime.jsx(Skeleton,{className:"h-10 w-32 rounded-md"}),jsxRuntime.jsx(Skeleton,{className:"h-5 w-24 mt-4"})]})]}),jsxRuntime.jsxs("div",{className:"flex gap-6 mt-4",children:[jsxRuntime.jsxs("div",{className:"flex flex-col items-start gap-1 mb-2",children:[jsxRuntime.jsx(Skeleton,{className:"h-8 w-32"}),jsxRuntime.jsx(Skeleton,{className:"h-6 w-24"})]}),jsxRuntime.jsxs("div",{className:"flex flex-1 items-center gap-2",children:[jsxRuntime.jsx(Skeleton,{className:"h-10 w-24 rounded-md"}),jsxRuntime.jsx(Skeleton,{className:"h-10 flex-1 rounded-md"})]})]})]})});const F=(e==null?void 0:e.Opportunities)||[],L=F.length>0,B=()=>{if(m==null){g(1);return}m>1&&g(m-1)},V=()=>{if(m==null){g(1);return}g(m+1)},H=le=>{const Z=parseInt(le.target.value,10);if(!isNaN(Z)&&Z>0){g(Z);return}g(void 0)},z=()=>{(m==null||m<1)&&g(1)},U=((ee=(J=e.Distribution)==null?void 0:J.Inventory)==null?void 0:ee.reduce((le,Z)=>le+(Z.AvailableQuantity||0),0))||0,Q=le=>{try{return new Date(le).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"})}catch(Z){return console.error(Z),le.split("T")[0]||"N/A"}},q=()=>{u&&u({quantity:m??1,bidNumber:(b==null?void 0:b.BidNumber)??null})};return jsxRuntime.jsx(Card,{className:"hover:shadow-lg transition-shadow",children:jsxRuntime.jsxs(CardContent,{className:"p-6",children:[jsxRuntime.jsxs("div",{className:"flex justify-between items-start mb-3",children:[jsxRuntime.jsx("h3",{className:"font-semibold text-xl",children:e.Title||e.RandmarTitle}),jsxRuntime.jsx("div",{className:"h-10 w-24 flex items-center justify-end ml-4",children:N?jsxRuntime.jsx(Skeleton,{className:"h-10 w-24 rounded-md"}):I&&jsxRuntime.jsx("img",{src:I||"/placeholder.svg",alt:e.ManufacturerName??"",className:"max-h-10 max-w-24 object-contain"})})]}),jsxRuntime.jsxs("div",{className:"flex gap-6",children:[jsxRuntime.jsxs("div",{className:"flex-1",children:[jsxRuntime.jsxs("div",{className:"flex flex-wrap gap-2 mb-4",children:[e.State&&jsxRuntime.jsxs(Badge,{variant:"outline",className:`rounded-full px-3 ${e.State==="Active"?"bg-green-50 text-green-700 hover:bg-green-50":"bg-red-50 text-red-700 hover:bg-red-50"}`,children:[jsxRuntime.jsx(Check,{size:"12",className:"mr-1.5"})," ",e.State]}),jsxRuntime.jsxs(Badge,{variant:"outline",className:`rounded-full px-3 ${e.SerialNumber?"bg-green-50 text-green-700 hover:bg-green-50":"bg-yellow-50 text-yellow-700 hover:bg-yellow-50"}`,children:[jsxRuntime.jsx(QrCode,{size:"12",className:"mr-1.5"})," ",e.SerialNumber?"Serialized":"Unserialized"]}),e.TransparencyCode&&jsxRuntime.jsxs(Badge,{variant:"outline",className:"rounded-full px-3 bg-green-50 text-green-700 hover:bg-green-50",children:[jsxRuntime.jsx(CircleDashed,{size:"12",className:"mr-1.5"})," Transparency Code"]}),e.AvailableToBuy===void 0?jsxRuntime.jsxs(Badge,{variant:"outline",className:`rounded-full px-3 ${(ne=e.ManufacturerCategory)!=null&&ne.QualificationRequired?"bg-blue-50 text-blue-700 hover:bg-blue-50":"bg-neutral-50 text-neutral-700 hover:bg-neutral-50"}`,children:[jsxRuntime.jsx(ShieldCheck,{size:"12",className:"mr-1.5"})," ",(ae=e.ManufacturerCategory)!=null&&ae.QualificationRequired?"Qualification Enforced":"No Qualification Needed"]}):jsxRuntime.jsxs(Badge,{variant:"outline",className:`rounded-full px-3 ${e.AvailableToBuy?"bg-green-50 text-green-700 hover:bg-green-50":"bg-red-50 text-red-700 hover:bg-red-50"}`,children:[jsxRuntime.jsx(ShieldCheck,{size:"12",className:"mr-1.5"})," ",(oe=e.ManufacturerCategory)!=null&&oe.QualificationRequired?e.AvailableToBuy?"Qualified":"Not Qualified":"No Qualification Required"]}),e.ManufacturerId&&jsxRuntime.jsxs(Badge,{variant:"outline",className:`rounded-full px-3 ${e.AutoUpdate?"bg-green-50 text-green-700 hover:bg-green-50":"bg-red-50 text-red-700 hover:bg-red-50"}`,children:[jsxRuntime.jsx(RefreshCw,{size:"12",className:"mr-1.5"})," ",e.AutoUpdate?`Automatic Reorder (${e.MasterCarton})`:"Manually Reorders"]}),jsxRuntime.jsxs(Badge,{variant:"outline",className:`rounded-full px-3 ${e.BodyHTML&&e.Title&&e.MAP?"bg-green-50 text-green-700 hover:bg-green-50":"bg-red-50 text-red-700 hover:bg-red-50"}`,children:[jsxRuntime.jsx(Store,{size:"12",className:"mr-1.5"})," ",e.BodyHTML&&e.Title&&e.MAP?"Shopify Ready":"Not Shopify Ready"]})]}),jsxRuntime.jsxs("div",{className:"grid grid-cols-2 gap-x-4 gap-y-4 flex-1",children:[jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("div",{className:"text-sm text-muted-foreground",children:"MPN"}),jsxRuntime.jsx("div",{className:"font-medium",children:e.MPN||"N/A"})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("div",{className:"text-sm text-muted-foreground",children:"UPC"}),jsxRuntime.jsx("div",{className:"font-medium",children:e.UPC||"N/A"})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("div",{className:"text-sm text-muted-foreground",children:"Unit Weight"}),jsxRuntime.jsx("div",{className:"font-medium",children:e.UnitWeight?`${e.UnitWeight} lbs`:"N/A"})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("div",{className:"text-sm text-muted-foreground",children:"MAP"}),jsxRuntime.jsx("div",{className:"font-medium",children:e.MAP?"$"+e.MAP.toFixed(2):"N/A"})]}),e.CountryCodeOfOrigin&&jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("div",{className:"text-sm text-muted-foreground",children:"Origin"}),jsxRuntime.jsxs("div",{className:"font-medium flex items-center",children:[jsxRuntime.jsx(CountryFlag,{countryCode:e.CountryCodeOfOrigin,className:"mr-2"}),e.CountryCodeOfOrigin]})]})]})]}),jsxRuntime.jsx("div",{className:"flex flex-col",children:jsxRuntime.jsx(ProductImage,{randmarSKU:e.RandmarSKU||"",alt:e.RandmarTitle||""})})]}),jsxRuntime.jsxs("div",{className:"flex gap-6 mt-4",children:[jsxRuntime.jsx("div",{className:"flex flex-1",children:L&&e.Distribution&&jsxRuntime.jsxs("div",{className:"w-full",children:[jsxRuntime.jsx("div",{className:"flex items-center",children:"You have "+F.length+(F.length>1?" opportunities":" opportunity")+" for this product:"}),jsxRuntime.jsx("div",{className:"space-y-2 max-h-[200px] overflow-y-auto p-2 mt-1",children:F.map((le,Z)=>{var fe;return jsxRuntime.jsxs("div",{className:`flex justify-between items-center rounded-lg transition-colors py-2 px-4 bg-purple-100 border border-muted
|
|
885
|
+
REPEAT: For ANY API function that requires an ID in the path, USE "${e}" as the value unless the user has given you another one.`,A=C.startChat({generationConfig:{maxOutputTokens:4096},history:[{role:"user",parts:[{text:"Please introduce yourself"}]},{role:"model",parts:[{text:T}]}],tools:f.length>0?[{functionDeclarations:f.map(({declaration:M})=>M)}]:[]});l(A)}catch(C){console.error("Error initializing chat:",C)}};o||m||S()},[m,o]),React.useEffect(()=>{(async()=>{try{const C=await fetchApiFunctions(e);p(C)}catch(C){console.error("Error loading API functions:",C)}finally{g(!1)}})()},[e]);const _=Object.fromEntries(f.map(({declaration:S,handler:C})=>[S.name,C])),R=async S=>{var T,A;const C=S.name;if(C in _){const M=_[C],I=S.args||{};console.log(`[Function Call] ${C} with args:`,I);const O=(T=f.find(D=>D.declaration.name===C))==null?void 0:T.declaration;if(!O){console.error(`[Function Call] Could not find declaration for ${C}`);return}const N=Object.keys(((A=O.parameters)==null?void 0:A.properties)||{});console.log("[Function Call] Parameter names from declaration:",N);const j=[];N.forEach(D=>{if(D.toLowerCase().includes("id")||D.toLowerCase().includes("reseller")||D.toLowerCase().includes("manufacturer")||D.toLowerCase().includes("partner")||D.toLowerCase().includes("application"))j.push("");else if(D in I){const L=I[D];typeof L=="object"?j.push(JSON.stringify(L)):j.push(typeof L=="string"?L:String(L))}else j.push("")}),console.log("[Function Call] Converted args to:",j);try{const D=await M(j);let F,L=null,B=!1;if(typeof D=="string"?F=D:(F=D.summary,L=D.component,B=!0),console.log(`[Function Response] ${C} returned:`,F),o){const V={functionResponse:{name:C,response:{content:F}}};if(B&&L){const U={role:"assistant",content:L,timestamp:new Date,isComponent:!0};d(Q=>[...Q,U])}const z={role:"assistant",content:(await o.sendMessage([V])).response.text(),timestamp:new Date};d(U=>[...U,z])}}catch(D){console.error("Error executing function:",D);const F={role:"assistant",content:"I encountered an error while processing your request. Please try again.",timestamp:new Date};d(L=>[...L,F])}}else console.error(`Function ${C} not found`)};return{handleSubmitToBot:async S=>{if(S.trim()&&!n&&o){const C={role:"user",content:S,timestamp:new Date};d(T=>[...T,C]),i(!0);try{const A=(await o.sendMessage(S.trim())).response,M=A.functionCalls();if(M&&M.length>0)for(const I of M)await R(I);else{const I={role:"assistant",content:A.text(),timestamp:new Date};d(O=>[...O,I])}}catch(T){console.error("Error sending message:",T);const A={role:"assistant",content:"I'm sorry, I encountered an error processing your request. Please try again later.",timestamp:new Date};d(M=>[...M,A])}finally{i(!1)}}},botMessages:u,botReady:!!o,isProcessingSubmission:n}}const ASSISTANT_ID="RandmarAIChatAssistant",ChatLayout=React.forwardRef(({userId:e,userName:t,apiKey:n,inputRef:i},o)=>{var Q,q,W;const{data:l}=useGetV4PartnerByApplicationIdBusinessDevelopmentConversationsQuery({applicationId:e}),[u]=useLazyGetV4PartnerByApplicationIdBusinessDevelopmentConversationAndConversationIdMessagesQuery(),{handleSubmitToBot:d,botMessages:f,botReady:p,isProcessingSubmission:m}=useAIAssistant({userId:e,apiKey:n});React.useEffect(()=>{if(!l)return;const G={partner1:[e,ASSISTANT_ID].sort()[0],partner2:[e,ASSISTANT_ID].sort()[1],name:"Randmar Assistant",unread:0,pending:!1,historyFetched:!0,messages:[],conversationID:-1},K=l.map(J=>{var ee;return{partner1:[J.Participant1,J.Participant2].sort()[0],partner2:[J.Participant1,J.Participant2].sort()[1],name:((ee=J.Participant)==null?void 0:ee.PublicName)??"missing public name",unread:0,pending:J.Status!="Approved",historyFetched:!1,messages:[],conversationID:J.ConversationId}});setTimeout(()=>{var J;return(J=L.current)==null?void 0:J.focus()},50),M([G,...K])},[l]);const[g,b]=React.useState("all"),[_,R]=React.useState([[e,ASSISTANT_ID].sort()[0],[e,ASSISTANT_ID].sort()[1]]),[E,S]=React.useState(""),[C,T]=React.useState(null),[A,M]=React.useState([]),[I,O]=React.useState(""),[N,j]=React.useState(null),D=React.useRef(null),F=React.useRef(null),L=i||F,B=A.filter(G=>{const K=G.name.toLowerCase().includes(I.toLowerCase());return g==="all"?K:g==="approved"?K&&!G.pending:g==="pending"?K&&G.pending:K});React.useEffect(()=>{const G=f.at(-1);if(!G||G.role!="assistant"||G.isComponent)return;const K={id:G.timestamp.toString(),fromPartnerID:ASSISTANT_ID,toPartnerID:e,senderName:"Assistant",timestamp:G.timestamp.getTime(),content:G.content};V(K)},[f]);function V(G){const K=[G.fromPartnerID,G.toPartnerID];K.sort(),M(J=>{let ee=!1,ne=!1;const ae=J.map(oe=>oe.partner1!==K[0]||oe.partner2!==K[1]||(ne=!0,oe.messages.findIndex(se=>se.id==G.id)!==-1)?oe:(ee=!0,{...oe,unread:oe.unread+1,messages:[...oe.messages,G]}));return!ne&&K[0]!==e&&K[1]!==e?(console.log("(bug) server sent a message to us by mistake."),ae):(ee&&T([K[0],K[1]]),ae)})}React.useEffect(()=>{const G=new HubConnectionBuilder().withUrl("https://api.randmar.io/hub",{accessTokenFactory:()=>localStorage.getItem("access_token"),headers:{"X-Impersonated-Id":e}}).configureLogging(LogLevel.Information).withAutomaticReconnect().withHubProtocol(new JsonHubProtocol).build();return G.on("ReceiveMessage",V),G.start().catch(K=>console.error("Error connecting to SignalR hub:",K)),j(G),()=>{G&&G.stop()}},[e]),React.useEffect(()=>{(C==null?void 0:C[0])!==(_==null?void 0:_[0])||(C==null?void 0:C[1])!==(_==null?void 0:_[1])||(M(G=>G.map(K=>K.partner1===(_==null?void 0:_[0])&&K.partner2===(_==null?void 0:_[1])?{...K,unread:0}:K)),setTimeout(()=>{var G;return(G=D.current)==null?void 0:G.scrollIntoView({behavior:"smooth"})},50))},[C,_]),React.useEffect(()=>{var K;if(!_)return;const G=getActiveChatObject(A,_);G&&((K=L.current)==null||K.focus(),G.historyFetched?(M(J=>J.map(ee=>ee.partner1===_[0]&&ee.partner2===_[1]?{...ee,unread:0}:ee)),setTimeout(()=>{var J;return(J=D.current)==null?void 0:J.scrollIntoView({behavior:"smooth"})},50)):u({applicationId:e,conversationId:G.conversationID}).unwrap().then(J=>{const ee=J.map(ne=>({id:"history"+ne.MessageId,fromPartnerID:ne.SenderId,toPartnerID:ne.SenderId==_[0]?_[1]:_[0],senderName:ne.SenderName??"missing name",timestamp:new Date(ne.SentDate+"Z").getTime(),content:ne.Content??"no content"}));M(ne=>ne.map(ae=>ae.partner1===_[0]&&ae.partner2===_[1]?{...ae,messages:ee,historyFetched:!0}:ae)),setTimeout(()=>{var ne;return(ne=D.current)==null?void 0:ne.scrollIntoView({behavior:"smooth"})},100)}).catch(J=>{console.error("Error fetching conversation messages:",J)}))},[_,u,e]);const H=(G,K,J)=>{const ee={id:crypto.randomUUID(),senderName:t,fromPartnerID:e,toPartnerID:K[0]===e?K[1]:K[0],content:G,timestamp:Date.now()};M(ne=>ne.map(ae=>ae.partner1===K[0]&&ae.partner2===K[1]?{...ae,messages:[...ae.messages,ee]}:ae)),T([K[0],K[1]]),ee.toPartnerID==ASSISTANT_ID?d(ee.content):J.invoke("NewMessage",ee).catch(ne=>console.error("Error sending message:",ne)),S("")},z=(G,K)=>{if(!A.length||!N||!p)return!1;const J=A.find(ee=>ee.conversationID===G);return J?(R([J.partner1,J.partner2]),K&&setTimeout(()=>H(K,[J.partner1,J.partner2],N),100),!0):!1};if(React.useImperativeHandle(o,()=>({setActiveChatAndSendMessage:z})),!p)return jsxRuntime.jsx(jsxRuntime.Fragment,{children:jsxRuntime.jsx("div",{className:"flex items-center justify-center p-8",children:jsxRuntime.jsxs("div",{className:"text-center",children:[jsxRuntime.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-primary mx-auto mb-4"}),jsxRuntime.jsx("p",{children:"Loading API functions..."})]})})});const U=()=>{!E.trim()||!_||!N||H(E,_,N)};return jsxRuntime.jsxs("div",{className:"flex h-[80vh] overflow-hidden",children:[jsxRuntime.jsxs("div",{className:"w-[260px] p-4 pt-3 flex flex-col border-r",children:[jsxRuntime.jsx("div",{className:"p-4 font-semibold border-b",children:"Communications"}),A.length>1&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("div",{className:"p-2",children:jsxRuntime.jsxs("div",{className:"relative",children:[jsxRuntime.jsx(Search,{className:"absolute left-2 top-1/2 transform -translate-y-1/2 h-4 w-4 text-muted-foreground"}),jsxRuntime.jsx(Input,{placeholder:"Search chats...",className:"pl-8 h-9",value:I,onChange:G=>O(G.target.value)})]})}),jsxRuntime.jsx(Tabs,{value:g,onValueChange:b,className:"w-full mb-1",children:jsxRuntime.jsxs(TabsList,{className:"grid grid-cols-8 h-9 mx-2",children:[jsxRuntime.jsx(TabsTrigger,{value:"all",className:"text-xs col-span-2",children:"All"}),jsxRuntime.jsx(TabsTrigger,{value:"approved",className:"text-xs col-span-3",children:"Approved"}),jsxRuntime.jsx(TabsTrigger,{value:"pending",className:"text-xs col-span-3",children:"Pending"})]})})]}),jsxRuntime.jsx(ScrollArea,{className:"flex-1",children:A.length&&jsxRuntime.jsx(ChatList,{userId:e,chats:B.filter(G=>G.partner1!=ASSISTANT_ID&&G.partner2!=ASSISTANT_ID),activeChat:getActiveChatObject(A,_)??null,onSelectChat:R,assistantChat:A.find(G=>G.partner1==ASSISTANT_ID||G.partner2==ASSISTANT_ID)})})]}),jsxRuntime.jsx("div",{className:"flex-1 flex flex-col",children:_?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs("div",{className:"flex items-center p-4 border-b",children:[jsxRuntime.jsx(Avatar,{className:"h-8 w-8 flex-shrink-0 rounded-none",children:_[0]==ASSISTANT_ID||_[1]==ASSISTANT_ID?jsxRuntime.jsx(Bot,{className:"text-primary fill-white min-h-full"}):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(AvatarImage,{src:`https://api.randmar.io/v4/Partner/${_[0]===e?_[1]:_[0]}/Account/Logo?height=72&width=72`,className:" object-contain "}),jsxRuntime.jsx(AvatarFallback,{children:jsxRuntime.jsx(Handshake,{className:"text-primary fill-white min-h-full"})})]})}),jsxRuntime.jsx("div",{className:"ml-3 font-medium",children:(Q=getActiveChatObject(A,_))==null?void 0:Q.name}),jsxRuntime.jsx(Button,{variant:"ghost",size:"icon",className:"ml-auto hidden",children:jsxRuntime.jsx(EllipsisVertical,{className:"h-5 w-5"})})]}),(q=getActiveChatObject(A,_))!=null&&q.pending?jsxRuntime.jsx("p",{className:"mt-8 p-2 mx-auto",children:"This conversation is still awaiting approval — please check back later."}):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs(ScrollArea,{className:"flex-1 p-4 bg-slate-50",children:[jsxRuntime.jsx(ChatMessages,{messages:((W=getActiveChatObject(A,_))==null?void 0:W.messages)??[],currentUserId:e,isWaitingForBot:m&&_&&(_[0]===ASSISTANT_ID||_[1]===ASSISTANT_ID)}),jsxRuntime.jsx("div",{ref:D})]}),jsxRuntime.jsxs("div",{className:"p-4 border-t flex",children:[jsxRuntime.jsx(Input,{ref:L,placeholder:"Type a message...",value:E,onChange:G=>S(G.target.value),onKeyDown:G=>G.key==="Enter"&&U(),className:"flex-1"}),jsxRuntime.jsx(Button,{size:"icon",variant:"default",className:"ml-1",disabled:m,onClick:U,children:jsxRuntime.jsx(Send,{className:"h-4 w-4"})})]})]})]}):jsxRuntime.jsx("div",{className:"flex-1 flex items-center justify-center text-muted-foreground",children:"Select a chat to start messaging"})})]})});function getActiveChatObject(e,t){return e.find(n=>n.partner1==(t==null?void 0:t[0])&&n.partner2==(t==null?void 0:t[1]))}const Card=React__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("div",{ref:n,className:cn("rounded-md border bg-card text-card-foreground shadow-sm",e),...t}));Card.displayName="Card";const CardHeader=React__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("div",{ref:n,className:cn("flex flex-col space-y-1.5 p-6",e),...t}));CardHeader.displayName="CardHeader";const CardTitle=React__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("div",{ref:n,className:cn("font-semibold leading-none tracking-tight",e),...t}));CardTitle.displayName="CardTitle";const CardDescription=React__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("div",{ref:n,className:cn("text-sm text-muted-foreground",e),...t}));CardDescription.displayName="CardDescription";const CardContent=React__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("div",{ref:n,className:cn("p-6 pt-0",e),...t}));CardContent.displayName="CardContent";const CardFooter=React__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("div",{ref:n,className:cn("flex items-center p-6 pt-0",e),...t}));CardFooter.displayName="CardFooter";function PartnerCard({id:e,name:t,about:n,voiceName:i,voiceStyle:o,sceneName:l,action:u,loading:d=!1}){const f=`https://api.randmar.io/V4/Partner/${e}/Account/Video`,p=`https://api.randmar.io/V4/Partner/${e}/Account/Video/Exists`,m=`https://api.randmar.io/V4/Partner/${e}/Account/Logo?width=64&height=64`,g=`https://api.randmar.io/V4/Partner/${e}/Account/Logo/Exists`,b=!!(i||o||l),[_,R]=React.useState(null),[E,S]=React.useState(!1),[C,T]=React.useState(!1),[A,M]=React.useState(!1),[I,O]=React.useState(!0);React.useEffect(()=>{if(!e||d)return;const j=async()=>{try{const B=await fetch(g);if(B.ok){const H=(await B.text()).toLowerCase()==="true";return T(H),H}return!1}catch(B){return console.error("Failed to check if logo exists:",B),T(!1),!1}},D=async()=>{S(!0);try{const B=await fetch(m);if(B.ok){const V=await B.blob();R(URL.createObjectURL(V))}}catch(B){console.error("Failed to load logo:",B)}finally{S(!1)}},F=async()=>{try{const B=await fetch(p);if(B.ok){const V=await B.text();M(V.toLowerCase()==="true")}}catch(B){console.error("Failed to check if video exists:",B),M(!1)}};(async()=>{await j()&&D(),F()})()},[e,m,g,p,d]);const N=()=>{O(!1)};return d?jsxRuntime.jsx(Card,{className:"hover:shadow-lg transition-shadow",children:jsxRuntime.jsxs(CardContent,{className:"p-6",children:[jsxRuntime.jsxs("div",{className:"flex flex-col sm:flex-row justify-between items-start gap-4 mb-4",children:[jsxRuntime.jsxs("div",{className:"flex items-center",children:[jsxRuntime.jsx("div",{className:"h-10 flex items-center justify-center mr-4",children:jsxRuntime.jsx(Skeleton,{className:"h-10 w-10 rounded-md"})}),jsxRuntime.jsx(Skeleton,{className:"h-7 w-40"})]}),jsxRuntime.jsx("div",{className:"w-full sm:w-auto",children:jsxRuntime.jsx(Skeleton,{className:"h-9 w-24"})})]}),jsxRuntime.jsxs("div",{className:"flex flex-col md:flex-row gap-6",children:[jsxRuntime.jsxs("div",{className:"flex-1 flex flex-col order-1 md:order-1",children:[jsxRuntime.jsxs("div",{className:"space-y-2",children:[jsxRuntime.jsx(Skeleton,{className:"h-4 w-full"}),jsxRuntime.jsx(Skeleton,{className:"h-4 w-full"}),jsxRuntime.jsx(Skeleton,{className:"h-4 w-3/4"}),jsxRuntime.jsx(Skeleton,{className:"h-4 w-5/6"})]}),jsxRuntime.jsx("div",{className:"mt-4 p-3 bg-slate-50 rounded-md",children:jsxRuntime.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-2",children:[jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx(Skeleton,{className:"h-3 w-20 mb-1"}),jsxRuntime.jsx(Skeleton,{className:"h-5 w-24"})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx(Skeleton,{className:"h-3 w-20 mb-1"}),jsxRuntime.jsx(Skeleton,{className:"h-5 w-24"})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx(Skeleton,{className:"h-3 w-20 mb-1"}),jsxRuntime.jsx(Skeleton,{className:"h-5 w-24"})]})]})})]}),jsxRuntime.jsx("div",{className:"flex flex-col order-1 md:order-1 md:w-auto",children:jsxRuntime.jsx("div",{className:"w-[180px] h-[320px] rounded-md overflow-hidden",children:jsxRuntime.jsx(Skeleton,{className:"w-full h-full"})})})]})]})}):jsxRuntime.jsx(Card,{className:"hover:shadow-lg transition-shadow",children:jsxRuntime.jsxs(CardContent,{className:"p-6",children:[jsxRuntime.jsxs("div",{className:"flex flex-col sm:flex-row justify-between items-start gap-4 mb-4",children:[jsxRuntime.jsxs("div",{className:"flex items-center",children:[C&&jsxRuntime.jsx("div",{className:"h-10 flex items-center justify-center mr-4",children:E?jsxRuntime.jsx(Skeleton,{className:"h-10 w-10 rounded-md"}):_&&jsxRuntime.jsx("img",{src:_||"/placeholder.svg",alt:`${t} logo`,className:"max-h-10 w-auto object-contain"})}),jsxRuntime.jsx("h3",{className:"font-semibold text-xl",children:t})]}),u&&jsxRuntime.jsx("div",{className:"w-full sm:w-auto",children:u})]}),jsxRuntime.jsxs("div",{className:"flex flex-col md:flex-row gap-6",children:[jsxRuntime.jsxs("div",{className:"flex-1 flex flex-col order-1 md:order-1",children:[jsxRuntime.jsx("div",{className:"prose prose-sm max-w-none",dangerouslySetInnerHTML:{__html:n}}),b&&jsxRuntime.jsx("div",{className:"mt-4 p-3 bg-slate-50 rounded-md",children:jsxRuntime.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-2",children:[i&&jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("div",{className:"text-sm text-muted-foreground",children:"Voice Name"}),jsxRuntime.jsx("div",{className:"font-medium",children:i})]}),o&&jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("div",{className:"text-sm text-muted-foreground",children:"Voice Style"}),jsxRuntime.jsx("div",{className:"font-medium",children:o})]}),l&&jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("div",{className:"text-sm text-muted-foreground",children:"Scene Name"}),jsxRuntime.jsx("div",{className:"font-medium",children:l})]})]})})]}),A&&jsxRuntime.jsx("div",{className:"flex flex-col order-1 md:order-1 md:w-auto",children:jsxRuntime.jsxs("div",{className:"w-[180px] h-[320px] rounded-md overflow-hidden",children:[I&&jsxRuntime.jsx(Skeleton,{className:"w-full h-full"}),jsxRuntime.jsx("video",{src:f,controls:!0,preload:"auto",playsInline:!0,className:`w-full h-full object-contain ${I?"invisible":"visible"}`,style:{objectPosition:"center",imageRendering:"auto"},onLoadedData:N,onError:()=>O(!1)})]})})]})]})})}const Topbar=React.forwardRef(({onSignOut:e,handleValidSearch:t,rightMenu:n,searchPlaceholder:i},o)=>{const[l,u]=React.useState(""),d=reactRouterDom.useLocation(),{toast:f}=useToast();React.useEffect(()=>{const b=new URLSearchParams(d.search).get("q");b&&u(b)},[d.search]);const p=()=>{const g=l.trim();if(!g||g.length<2){f({title:"Enter more characters to search",description:"At least 2 characters are needed to search products.",variant:"destructive",duration:5e3});return}t(g)},m=g=>{g.key==="Enter"&&p()};return jsxRuntime.jsxs("header",{className:"flex h-16 items-center gap-4 border-b sidebar-foreground bg-sidebar px-6 fixed top-0 right-0 z-50 lg:left-64 left-0 border-sidebar-border",children:[jsxRuntime.jsx(SidebarTrigger,{className:"lg:hidden",children:jsxRuntime.jsx(Menu$1,{className:"h-6 w-6"})}),jsxRuntime.jsx("div",{className:"flex flex-1 items-center gap-4",children:jsxRuntime.jsx("div",{className:"relative w-full max-w-sm",children:jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("button",{type:"button",className:"absolute left-2 top-1/2 -translate-y-1/2",onClick:p,"aria-label":"Search",children:jsxRuntime.jsx(Search,{className:"h-4 w-4 text-muted-foreground"})}),jsxRuntime.jsx(Input,{placeholder:i??"Search...",className:"w-full pl-8 bg-white text-black",value:l,onChange:g=>u(g.target.value),onKeyDown:m,ref:o},"topbar-search")]})})}),n||jsxRuntime.jsx(jsxRuntime.Fragment,{}),e&&jsxRuntime.jsx("div",{className:"flex items-center gap-4",children:jsxRuntime.jsxs(Button,{variant:"ghost",size:"icon",className:"h-9 w-9",onClick:e,children:[jsxRuntime.jsx(LogOut,{className:"h-4 w-4 text-sidebar-foreground"}),jsxRuntime.jsx("span",{className:"sr-only",children:"Sign out"})]})})]})});Topbar.displayName="Topbar";const badgeVariants=cva("inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/80",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground border border-input hover:bg-accent hover:text-accent-foreground",success:"bg-green-600 text-white hover:bg-green-700",warning:"bg-yellow-500 text-white hover:bg-yellow-600",info:"bg-blue-500 text-white hover:bg-blue-600",ghost:"bg-background hover:bg-accent hover:text-accent-foreground",randmarRed:"bg-randmar-red text-white hover:bg-randmar-red/80",randmarBlue:"bg-randmar-blue text-white hover:bg-randmar-blue/80",randmarPurple:"bg-randmar-purple text-white hover:bg-randmar-purple/80",randmarGreen:"bg-randmar-green text-black hover:bg-randmar-green/80",randmarBlack:"bg-randmar-black text-white hover:bg-randmar-black/80",randmarYellow:"bg-randmar-yellow text-black hover:bg-randmar-yellow/80"},size:{default:"h-6",sm:"h-5 text-[10px]",lg:"h-7 px-3"}},defaultVariants:{variant:"default",size:"default"}}),Badge=React__namespace.forwardRef(({className:e,variant:t,size:n,icon:i,children:o,...l},u)=>jsxRuntime.jsxs("div",{ref:u,className:cn(badgeVariants({variant:t,size:n}),e),...l,children:[i&&jsxRuntime.jsx("span",{className:"mr-1",children:i}),o]}));Badge.displayName="Badge";const CountryFlag=({countryCode:e,className:t=""})=>{const[n,i]=React.useState(null),[o,l]=React.useState(!1);return React.useEffect(()=>{if(!e)return;const d=`https://purecatamphetamine.github.io/country-flag-icons/3x2/${e.toUpperCase()}.svg`;fetch(d,{method:"HEAD"}).then(f=>{f.ok?(i(d),l(!1)):l(!0)}).catch(()=>{l(!0)})},[e]),o||!n?jsxRuntime.jsx("span",{className:t,children:e}):jsxRuntime.jsx("img",{src:n,alt:`${e} flag`,className:`inline-block ${t}`,style:{width:"24px",height:"auto"}})},Navbar=React.forwardRef(({routes:e,footer:t,dashboardTitle:n,withRandmarAssistant:i,chatUserName:o,chatApiKey:l},u)=>{const{appID:d}=reactRouterDom.useParams(),f=e.filter(b=>b.showInNav),p=React.useRef(null),m=React.useRef(null),g=React.useRef(null);return React.useImperativeHandle(u,()=>({setActiveChatAndSendMessage:(b,_)=>{var R;return(R=g.current)==null||R.click(),setTimeout(()=>{var E;(E=p.current)==null||E.focus(),m.current&&m.current.setActiveChatAndSendMessage(b,_)},100),!0}})),jsxRuntime.jsxs(Sidebar,{className:"border-r border-sidebar-border",children:[jsxRuntime.jsx(SidebarHeader,{className:"border-b border-sidebar-border px-6 h-16 justify-center bg-sidebar text-sidebar-foreground",children:jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsx("div",{className:"flex items-center justify-center",children:jsxRuntime.jsx("img",{src:"https://api.randmar.io/images/RandmarIcon.svg",alt:"Randmar Icon",className:"h-4 w-4 filter brightness-0 saturate-100 invert"})}),jsxRuntime.jsx("span",{className:"font-semibold text-lg",children:n})]})}),jsxRuntime.jsx(SidebarContent,{className:"py-4 bg-sidebar text-sidebar-foreground",children:jsxRuntime.jsx(SidebarMenu,{children:f.map(b=>{const _=b.icon,R=`/${b.path.replace(":appID",d??"")}`;return jsxRuntime.jsx(SidebarMenuItem,{children:jsxRuntime.jsx(SidebarMenuButton,{asChild:!0,children:jsxRuntime.jsxs(reactRouterDom.Link,{to:R,className:"transition-colors hover:bg-muted px-6",children:[_&&jsxRuntime.jsx(_,{className:"h-4 w-4"}),jsxRuntime.jsx("span",{children:b.label})]})})},b.key)})})}),jsxRuntime.jsxs(SidebarFooter,{className:"border-t border-sidebar-border p-4 bg-sidebar-background text-sidebar-foreground",children:[i===!0&&jsxRuntime.jsxs(Dialog,{children:[jsxRuntime.jsx(DialogTrigger,{asChild:!0,children:jsxRuntime.jsxs(Button,{ref:g,size:"lg",className:"collapse md:visible",onClick:()=>setTimeout(()=>{var b;return(b=p.current)==null?void 0:b.focus()},50),children:[jsxRuntime.jsx(Bot,{}),"Assistant"]})}),jsxRuntime.jsx(DialogContent,{className:"max-w-[85vw] p-0 data-[state=open]:visible data-[state=closed]:invisible",forceMount:!0,animateExit:!1,children:jsxRuntime.jsx(ChatLayout,{ref:m,inputRef:p,userId:d??"2",userName:o??"Unknown user",apiKey:l??""})})]}),t]})]})}),Layout=React.forwardRef(({children:e,rightMenu:t,routes:n,footer:i,handleValidSearch:o,dashboardTitle:l,onSignOut:u,searchPlaceholder:d,withRandmarAssistant:f,chatUserName:p,chatApiKey:m,chatRef:g},b)=>jsxRuntime.jsx(jsxRuntime.Fragment,{children:jsxRuntime.jsx(SidebarProvider,{children:jsxRuntime.jsxs("div",{className:"flex grow",children:[jsxRuntime.jsx(Navbar,{routes:n,footer:i,dashboardTitle:l,withRandmarAssistant:f,chatUserName:p,chatApiKey:m,ref:g}),jsxRuntime.jsxs("div",{className:"flex flex-1 flex-col overflow-hidden",children:[jsxRuntime.jsx(Topbar,{ref:b,onSignOut:u,rightMenu:t,handleValidSearch:o,searchPlaceholder:d}),jsxRuntime.jsx("main",{className:"flex-1 overflow-auto mt-16",children:e}),jsxRuntime.jsx(Toaster,{})]})]})})}));Layout.displayName="Layout";const imgSizeMap={sm:100,md:200,lg:300,xl:400};function ProductImage({randmarSKU:e,size:t="md",alt:n,secondaryContent:i}){const[o,l]=React__namespace.useState(!1),[u,d]=React__namespace.useState(!1),[f,p]=React__namespace.useState(!1),[m,g]=React__namespace.useState(!1),b=`https://api.randmar.io/Product/${e}/Video`;React__namespace.useEffect(()=>{(async()=>{try{const A=await(await fetch(b+"/Exists")).json();d(A)}catch(T){console.error("Error checking for video:",T),d(!1)}})()},[e,b]);async function _(){if(u){g(!0);try{const T=await(await fetch(b)).blob(),A=window.URL.createObjectURL(T),M=document.createElement("a");M.href=A,M.download=`${e||"product"}-video.mp4`,document.body.appendChild(M),M.click(),document.body.removeChild(M),window.URL.revokeObjectURL(A)}catch(C){console.error("Error downloading video:",C)}finally{g(!1)}}}function R(){navigator.clipboard.writeText(b),p(!0),setTimeout(()=>{p(!1)},2e3)}function E(){l(!0)}const S=imgSizeMap[t||"xl"];return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(Dialog,{open:o,onOpenChange:l,children:jsxRuntime.jsx(DialogContent,{className:"max-w-4xl p-0 overflow-hidden",children:i?jsxRuntime.jsxs("div",{className:"flex flex-row",children:[jsxRuntime.jsxs("video",{className:"w-full rounded-l-lg max-h-[720px] object-contain",controls:!0,autoPlay:!0,muted:!0,loop:!0,children:[jsxRuntime.jsx("source",{src:b,type:"video/mp4"}),"Your browser does not support the video tag."]}),jsxRuntime.jsx("div",{className:"flex-grow min-w-[400px] h-[70vh] p-6",children:i})]}):jsxRuntime.jsxs("div",{className:"w-full relative",children:[jsxRuntime.jsxs("video",{className:"w-full max-h-[720px] object-contain",controls:!0,autoPlay:!0,children:[jsxRuntime.jsx("source",{src:b,type:"video/mp4"}),"Your browser does not support the video tag."]}),jsxRuntime.jsxs("div",{className:"absolute top-2 right-12 flex gap-1",children:[jsxRuntime.jsx(TooltipProvider,{children:jsxRuntime.jsxs(Tooltip$1,{children:[jsxRuntime.jsx(TooltipTrigger,{asChild:!0,children:jsxRuntime.jsx(Button,{variant:"secondary",size:"icon",onClick:R,children:f?jsxRuntime.jsx(Check,{className:"h-4 w-4"}):jsxRuntime.jsx(Copy,{className:"h-4 w-4"})})}),jsxRuntime.jsx(TooltipContent,{children:jsxRuntime.jsx("p",{children:"Copy video link"})})]})}),jsxRuntime.jsx(TooltipProvider,{children:jsxRuntime.jsxs(Tooltip$1,{children:[jsxRuntime.jsx(TooltipTrigger,{asChild:!0,children:jsxRuntime.jsx(Button,{variant:"secondary",size:"icon",onClick:_,disabled:m,children:jsxRuntime.jsx(Download,{className:"h-4 w-4"})})}),jsxRuntime.jsx(TooltipContent,{children:jsxRuntime.jsx("p",{children:"Download video"})})]})})]})]})})}),jsxRuntime.jsxs("div",{className:"relative w-max h-max",children:[jsxRuntime.jsx("img",{alt:n||`Product ${e}`,className:`rounded-md ${u?"cursor-pointer":""}`,onClick:u?E:void 0,src:`https://api.randmar.io/Product/${e}/Image?width=${S*1.5}&height=${S*1.5}`,width:S,height:S}),u&&jsxRuntime.jsx(TooltipProvider,{children:jsxRuntime.jsxs(Tooltip$1,{children:[jsxRuntime.jsx(TooltipTrigger,{asChild:!0,children:jsxRuntime.jsx(Button,{variant:"secondary",size:"icon",className:"absolute top-2 right-2",onClick:E,children:jsxRuntime.jsx(Play,{className:"h-4 w-4"})})}),jsxRuntime.jsx(TooltipContent,{children:jsxRuntime.jsx("p",{children:"Play video"})})]})})]})]})}function ProductCard({item:e,addToCart:t=!1,syncToShopify:n=!1,customAction:i=jsxRuntime.jsx(jsxRuntime.Fragment,{}),defaultOpportunityNumber:o="",viewProductLink:l,addToCartAction:u,isAddToCartActionLoading:d=!1,syncToShopifyAction:f,isSyncToShopifyActionLoading:p=!1}){var W,G,K,J,ee,ne,ae,oe,se,ce,ie,ue;const[m,g]=React.useState(1),[b,_]=React.useState(null),[R,E]=React.useState(0),[S,C]=React.useState(!1),T=((W=e==null?void 0:e.Distribution)==null?void 0:W.Cost)||0,A=((G=e==null?void 0:e.Distribution)==null?void 0:G.RegularPrice)||0,M=((K=e==null?void 0:e.Distribution)==null?void 0:K.Price)||0,[I,O]=React.useState(null),[N,j]=React.useState(!1);React.useEffect(()=>{const le=async()=>{if(e!=null&&e.ManufacturerId){j(!0);try{const Z=await fetch(`https://api.randmar.io/V4/Partner/${e.ManufacturerId}/Account/Logo?width=60&height=40`);if(Z.ok){const fe=await Z.blob();O(URL.createObjectURL(fe))}}catch(Z){console.error("Failed to load logo:",Z)}finally{j(!1)}}};e!=null&&e.ManufacturerId&&le()},[e==null?void 0:e.ManufacturerId]),React.useEffect(()=>{var le;if(e&&o){const Z=(le=e.Opportunities)==null?void 0:le.find(fe=>fe.BidNumber==o);Z&&_(Z)}},[e,o]),React.useEffect(()=>{if(!e)return;const le=b!=null&&b.Price?b.Price:M;E(A>0?Math.round((A-le)/A*100):0)},[e,b,M,A]),React.useEffect(()=>{d||g(1)},[d]);const D=le=>{if(le.Active!==!0)return!1;const Z=new Date().toISOString().split("T")[0];return!(le.EndDate&&le.EndDate<Z||le.StartDate&&le.StartDate>Z)};if(!e)return jsxRuntime.jsx(Card,{className:"hover:shadow-lg transition-shadow",children:jsxRuntime.jsxs(CardContent,{className:"p-6",children:[jsxRuntime.jsxs("div",{className:"flex justify-between items-start mb-3",children:[jsxRuntime.jsx(Skeleton,{className:"h-7 w-3/4"}),jsxRuntime.jsx("div",{className:"h-10 w-24 flex items-center justify-end ml-4",children:jsxRuntime.jsx(Skeleton,{className:"h-10 w-24 rounded-md"})})]}),jsxRuntime.jsxs("div",{className:"flex flex-wrap gap-2 mb-4",children:[jsxRuntime.jsx(Skeleton,{className:"h-6 w-20 rounded-full"}),jsxRuntime.jsx(Skeleton,{className:"h-6 w-24 rounded-full"}),jsxRuntime.jsx(Skeleton,{className:"h-6 w-28 rounded-full"})]}),jsxRuntime.jsxs("div",{className:"flex gap-6",children:[jsxRuntime.jsxs("div",{className:"grid grid-cols-2 gap-x-4 gap-y-6 flex-1",children:[jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx(Skeleton,{className:"h-4 w-12 mb-1"}),jsxRuntime.jsx(Skeleton,{className:"h-5 w-20"})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx(Skeleton,{className:"h-4 w-12 mb-1"}),jsxRuntime.jsx(Skeleton,{className:"h-5 w-24"})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx(Skeleton,{className:"h-4 w-20 mb-1"}),jsxRuntime.jsx(Skeleton,{className:"h-5 w-16"})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx(Skeleton,{className:"h-4 w-12 mb-1"}),jsxRuntime.jsx(Skeleton,{className:"h-5 w-20"})]})]}),jsxRuntime.jsx("div",{className:"flex flex-col",children:jsxRuntime.jsx("div",{className:"w-60 h-40",children:jsxRuntime.jsx(Skeleton,{className:"w-full h-full rounded-lg"})})})]}),jsxRuntime.jsxs("div",{className:"flex gap-6 mt-4",children:[jsxRuntime.jsx("div",{className:"flex flex-1",children:jsxRuntime.jsxs("div",{className:"w-full",children:[jsxRuntime.jsx(Skeleton,{className:"h-4 w-24 mb-3"}),jsxRuntime.jsx(Skeleton,{className:"h-16 w-full rounded-md"})]})}),jsxRuntime.jsxs("div",{className:"flex flex-col items-center",children:[jsxRuntime.jsx(Skeleton,{className:"h-10 w-32 rounded-md"}),jsxRuntime.jsx(Skeleton,{className:"h-5 w-24 mt-4"})]})]}),jsxRuntime.jsxs("div",{className:"flex gap-6 mt-4",children:[jsxRuntime.jsxs("div",{className:"flex flex-col items-start gap-1 mb-2",children:[jsxRuntime.jsx(Skeleton,{className:"h-8 w-32"}),jsxRuntime.jsx(Skeleton,{className:"h-6 w-24"})]}),jsxRuntime.jsxs("div",{className:"flex flex-1 items-center gap-2",children:[jsxRuntime.jsx(Skeleton,{className:"h-10 w-24 rounded-md"}),jsxRuntime.jsx(Skeleton,{className:"h-10 flex-1 rounded-md"})]})]})]})});const F=(e==null?void 0:e.Opportunities)||[],L=F.length>0,B=()=>{if(m==null){g(1);return}m>1&&g(m-1)},V=()=>{if(m==null){g(1);return}g(m+1)},H=le=>{const Z=parseInt(le.target.value,10);if(!isNaN(Z)&&Z>0){g(Z);return}g(void 0)},z=()=>{(m==null||m<1)&&g(1)},U=((ee=(J=e.Distribution)==null?void 0:J.Inventory)==null?void 0:ee.reduce((le,Z)=>le+(Z.AvailableQuantity||0),0))||0,Q=le=>{try{return new Date(le).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"})}catch(Z){return console.error(Z),le.split("T")[0]||"N/A"}},q=()=>{u&&u({quantity:m??1,bidNumber:(b==null?void 0:b.BidNumber)??null})};return jsxRuntime.jsx(Card,{className:"hover:shadow-lg transition-shadow",children:jsxRuntime.jsxs(CardContent,{className:"p-6",children:[jsxRuntime.jsxs("div",{className:"flex justify-between items-start mb-3",children:[jsxRuntime.jsx("h3",{className:"font-semibold text-xl",children:e.Title||e.RandmarTitle}),jsxRuntime.jsx("div",{className:"h-10 w-24 flex items-center justify-end ml-4",children:N?jsxRuntime.jsx(Skeleton,{className:"h-10 w-24 rounded-md"}):I&&jsxRuntime.jsx("img",{src:I||"/placeholder.svg",alt:e.ManufacturerName??"",className:"max-h-10 max-w-24 object-contain"})})]}),jsxRuntime.jsxs("div",{className:"flex gap-6",children:[jsxRuntime.jsxs("div",{className:"flex-1",children:[jsxRuntime.jsxs("div",{className:"flex flex-wrap gap-2 mb-4",children:[e.State&&jsxRuntime.jsxs(Badge,{variant:"outline",className:`rounded-full px-3 ${e.State==="Active"?"bg-green-50 text-green-700 hover:bg-green-50":"bg-red-50 text-red-700 hover:bg-red-50"}`,children:[jsxRuntime.jsx(Check,{size:"12",className:"mr-1.5"})," ",e.State]}),jsxRuntime.jsxs(Badge,{variant:"outline",className:`rounded-full px-3 ${e.SerialNumber?"bg-green-50 text-green-700 hover:bg-green-50":"bg-yellow-50 text-yellow-700 hover:bg-yellow-50"}`,children:[jsxRuntime.jsx(QrCode,{size:"12",className:"mr-1.5"})," ",e.SerialNumber?"Serialized":"Unserialized"]}),e.TransparencyCode&&jsxRuntime.jsxs(Badge,{variant:"outline",className:"rounded-full px-3 bg-green-50 text-green-700 hover:bg-green-50",children:[jsxRuntime.jsx(CircleDashed,{size:"12",className:"mr-1.5"})," Transparency Code"]}),e.AvailableToBuy===void 0?jsxRuntime.jsxs(Badge,{variant:"outline",className:`rounded-full px-3 ${(ne=e.ManufacturerCategory)!=null&&ne.QualificationRequired?"bg-blue-50 text-blue-700 hover:bg-blue-50":"bg-neutral-50 text-neutral-700 hover:bg-neutral-50"}`,children:[jsxRuntime.jsx(ShieldCheck,{size:"12",className:"mr-1.5"})," ",(ae=e.ManufacturerCategory)!=null&&ae.QualificationRequired?"Qualification Enforced":"No Qualification Needed"]}):jsxRuntime.jsxs(Badge,{variant:"outline",className:`rounded-full px-3 ${e.AvailableToBuy?"bg-green-50 text-green-700 hover:bg-green-50":"bg-red-50 text-red-700 hover:bg-red-50"}`,children:[jsxRuntime.jsx(ShieldCheck,{size:"12",className:"mr-1.5"})," ",(oe=e.ManufacturerCategory)!=null&&oe.QualificationRequired?e.AvailableToBuy?"Qualified":"Not Qualified":"No Qualification Required"]}),e.ManufacturerId&&jsxRuntime.jsxs(Badge,{variant:"outline",className:`rounded-full px-3 ${e.AutoUpdate?"bg-green-50 text-green-700 hover:bg-green-50":"bg-red-50 text-red-700 hover:bg-red-50"}`,children:[jsxRuntime.jsx(RefreshCw,{size:"12",className:"mr-1.5"})," ",e.AutoUpdate?`Automatic Reorder (${e.MasterCarton})`:"Manually Reorders"]}),jsxRuntime.jsxs(Badge,{variant:"outline",className:`rounded-full px-3 ${e.BodyHTML&&e.Title&&e.MAP?"bg-green-50 text-green-700 hover:bg-green-50":"bg-red-50 text-red-700 hover:bg-red-50"}`,children:[jsxRuntime.jsx(Store,{size:"12",className:"mr-1.5"})," ",e.BodyHTML&&e.Title&&e.MAP?"Shopify Ready":"Not Shopify Ready"]})]}),jsxRuntime.jsxs("div",{className:"grid grid-cols-2 gap-x-4 gap-y-4 flex-1",children:[jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("div",{className:"text-sm text-muted-foreground",children:"MPN"}),jsxRuntime.jsx("div",{className:"font-medium",children:e.MPN||"N/A"})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("div",{className:"text-sm text-muted-foreground",children:"UPC"}),jsxRuntime.jsx("div",{className:"font-medium",children:e.UPC||"N/A"})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("div",{className:"text-sm text-muted-foreground",children:"Unit Weight"}),jsxRuntime.jsx("div",{className:"font-medium",children:e.UnitWeight?`${e.UnitWeight} lbs`:"N/A"})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("div",{className:"text-sm text-muted-foreground",children:"MAP"}),jsxRuntime.jsx("div",{className:"font-medium",children:e.MAP?"$"+e.MAP.toFixed(2):"N/A"})]}),e.CountryCodeOfOrigin&&jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("div",{className:"text-sm text-muted-foreground",children:"Origin"}),jsxRuntime.jsxs("div",{className:"font-medium flex items-center",children:[jsxRuntime.jsx(CountryFlag,{countryCode:e.CountryCodeOfOrigin,className:"mr-2"}),e.CountryCodeOfOrigin]})]})]})]}),jsxRuntime.jsx("div",{className:"flex flex-col",children:jsxRuntime.jsx(ProductImage,{randmarSKU:e.RandmarSKU||"",alt:e.RandmarTitle||""})})]}),jsxRuntime.jsxs("div",{className:"flex gap-6 mt-4",children:[jsxRuntime.jsx("div",{className:"flex flex-1",children:L&&e.Distribution&&jsxRuntime.jsxs("div",{className:"w-full",children:[jsxRuntime.jsx("div",{className:"flex items-center",children:"You have "+F.length+(F.length>1?" opportunities":" opportunity")+" for this product:"}),jsxRuntime.jsx("div",{className:"space-y-2 max-h-[200px] overflow-y-auto p-2 mt-1",children:F.map((le,Z)=>{var fe;return jsxRuntime.jsxs("div",{className:`flex justify-between items-center rounded-lg transition-colors py-2 px-4 bg-purple-100 border border-muted
|
|
866
886
|
${le.BidNumber==(b==null?void 0:b.BidNumber)?"cursor-pointer border-2 border-purple-900":D(le)?"hover:bg-purple-200 cursor-pointer":"!bg-neutral-50"}
|
|
867
|
-
`,onClick:()=>{D(le)&&_(le.BidNumber!=(b==null?void 0:b.BidNumber)?le:null)},children:[jsxRuntime.jsx("div",{className:"flex items-center",children:jsxRuntime.jsxs("div",{className:"flex flex-col",children:[jsxRuntime.jsx("span",{className:"font-medium text-sm",children:le.Opportunity}),jsxRuntime.jsxs("span",{className:"text-xs text-neutral-900",children:[le.BidNumber," ",!D(le)&&jsxRuntime.jsx(Badge,{variant:"outline",className:"text-xs mx-1 h-5 bg-gray-100",children:"Currently unavailable"})]})]})}),jsxRuntime.jsxs("div",{className:"flex flex-col items-end",children:[jsxRuntime.jsxs("span",{className:"font-semibold",children:["$",(fe=le.Price)==null?void 0:fe.toFixed(2)]}),le.Rebate&&le.Rebate>0&&jsxRuntime.jsxs("span",{className:"text-xs text-green-600",children:["Rebate: $",le.Rebate.toFixed(2)]}),le.EndDate&&jsxRuntime.jsxs("span",{className:"text-xs text-neutral-600",children:["Ends: ",Q(le.EndDate)]})]})]},Z)})})]})}),jsxRuntime.jsxs("div",{className:"flex flex-col items-center",children:[l&&jsxRuntime.jsxs(Button,{variant:"secondary",onClick:l,children:[jsxRuntime.jsx(Eye,{className:"mr-2"}),"View Product"]}),((se=e.Distribution)==null?void 0:se.Inventory)&&jsxRuntime.jsx("div",{className:"mt-4",children:jsxRuntime.jsxs(Dialog,{open:S,onOpenChange:C,children:[jsxRuntime.jsx(DialogTrigger,{asChild:!0,children:jsxRuntime.jsxs(Button,{variant:"ghost",className:`flex items-center text-sm ${U>0?"text-green-700":"text-red-700"}`,children:[jsxRuntime.jsx(Warehouse,{size:"16",className:"mr-2"}),U>0?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[U," in stock"]}):jsxRuntime.jsx(jsxRuntime.Fragment,{children:"Out of stock"})]})}),jsxRuntime.jsxs(DialogContent,{className:"max-w-4xl",children:[jsxRuntime.jsx(DialogHeader,{children:jsxRuntime.jsxs(DialogTitle,{className:"flex items-center",children:[jsxRuntime.jsx(Warehouse,{className:"mr-2",size:18}),"Inventory Information"]})}),jsxRuntime.jsx(ProductInventoryGrid,{inventory:e.Distribution.Inventory})]})]})})]})]}),e.Distribution&&jsxRuntime.jsxs("div",{className:"flex justify-between items-end mt-4",children:[jsxRuntime.jsx("div",{className:"flex-shrink-1 flex flex-col items-start gap-1",children:T>0?jsxRuntime.jsx("div",{className:"flex items-center",children:jsxRuntime.jsxs("span",{className:"text-2xl font-bold whitespace-nowrap",children:[jsxRuntime.jsx("span",{children:"Cost: $"}),T.toFixed(2),jsxRuntime.jsx("span",{children:" CAD"})]})}):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs("div",{className:"flex items-center flex-wrap",children:[jsxRuntime.jsxs("span",{className:"text-2xl font-bold whitespace-nowrap",children:[jsxRuntime.jsx("span",{children:"$"}),b?(ie=(ce=e.Opportunities)==null?void 0:ce.find(le=>le.BidNumber==b.BidNumber))==null?void 0:ie.Price:M.toFixed(2),jsxRuntime.jsx("span",{children:" CAD"})]}),R>0&&jsxRuntime.jsxs("span",{className:"text-muted-foreground line-through ml-2 whitespace-nowrap",children:["$",A.toFixed(2)]})]}),R>0&&jsxRuntime.jsx("div",{className:"flex items-center",children:jsxRuntime.jsxs(Badge,{variant:"outline",className:"bg-red-50 text-red-700 rounded-full px-3 whitespace-nowrap",children:[jsxRuntime.jsxs("span",{children:[R,"% OFF"]}),((ue=e.InstantRebate)==null?void 0:ue.EndDate)&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("span",{className:"mx-1.5",children:"●"})," Ends ",e.InstantRebate.EndDate.split("T")[0]]}),(b==null?void 0:b.EndDate)&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("span",{className:"mx-1.5",children:"●"})," Ends ",b.EndDate.split("T")[0]]})]})})]})}),jsxRuntime.jsxs("div",{className:"flex flex-shrink-0 gap-2 ml-4",children:[typeof t<"u"&&t&&jsxRuntime.jsxs("div",{className:"flex items-center border rounded-md",children:[jsxRuntime.jsx(Button,{variant:"ghost",size:"icon",className:"rounded-r-none",onClick:B,disabled:typeof m<"u"&&(m<=1||!e.AvailableToBuy||d||!u),children:"-"}),jsxRuntime.jsx("input",{value:m,onChange:H,onBlur:z,onClick:le=>le.currentTarget.select(),className:`w-12 text-center border-0 focus:ring-0 focus:outline-none ${!e.AvailableToBuy||d||!u?"text-gray-400":""}`,disabled:!e.AvailableToBuy||d||!u}),jsxRuntime.jsx(Button,{variant:"ghost",size:"icon",className:"rounded-l-none",onClick:V,disabled:!e.AvailableToBuy||d||!u,children:"+"})]}),typeof t<"u"&&t&&jsxRuntime.jsx(Button,{className:"gap-2 whitespace-nowrap",onClick:q,disabled:!e.AvailableToBuy||d||!u,children:d?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(LoaderCircle,{className:"h-4 w-4 animate-spin"}),"Adding..."]}):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(ShoppingCart,{className:"mr-2"}),"Add to Cart"]})}),n&&jsxRuntime.jsx(Button,{className:"gap-2 whitespace-nowrap bg-green-600 hover:bg-green-700",onClick:f,disabled:p||!f,children:p?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(LoaderCircle,{className:"h-4 w-4 animate-spin"}),"Syncing..."]}):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(ShoppingCart,{className:"mr-2"}),"Sync to Shopify"]})}),i]})]})]})})}exports.AreaChart=AreaChart,exports.Avatar=Avatar,exports.AvatarFallback=AvatarFallback,exports.AvatarFooter=AvatarFooter,exports.AvatarImage=AvatarImage,exports.Badge=Badge,exports.Button=Button,exports.Card=Card,exports.CardContent=CardContent,exports.CardDescription=CardDescription,exports.CardFooter=CardFooter,exports.CardHeader=CardHeader,exports.CardTitle=CardTitle,exports.ChatLayout=ChatLayout,exports.CountryFlag=CountryFlag,exports.Dialog=Dialog,exports.DialogClose=DialogClose,exports.DialogContent=DialogContent,exports.DialogDescription=DialogDescription,exports.DialogFooter=DialogFooter,exports.DialogHeader=DialogHeader,exports.DialogOverlay=DialogOverlay,exports.DialogPortal=DialogPortal,exports.DialogTitle=DialogTitle,exports.DialogTrigger=DialogTrigger,exports.DropdownMenu=DropdownMenu,exports.DropdownMenuCheckboxItem=DropdownMenuCheckboxItem,exports.DropdownMenuContent=DropdownMenuContent,exports.DropdownMenuGroup=DropdownMenuGroup,exports.DropdownMenuItem=DropdownMenuItem,exports.DropdownMenuLabel=DropdownMenuLabel,exports.DropdownMenuPortal=DropdownMenuPortal,exports.DropdownMenuRadioGroup=DropdownMenuRadioGroup,exports.DropdownMenuRadioItem=DropdownMenuRadioItem,exports.DropdownMenuSeparator=DropdownMenuSeparator,exports.DropdownMenuShortcut=DropdownMenuShortcut,exports.DropdownMenuSub=DropdownMenuSub,exports.DropdownMenuSubContent=DropdownMenuSubContent,exports.DropdownMenuSubTrigger=DropdownMenuSubTrigger,exports.DropdownMenuTrigger=DropdownMenuTrigger,exports.Input=Input,exports.InputOTP=InputOTP,exports.InputOTPGroup=InputOTPGroup,exports.InputOTPSeparator=InputOTPSeparator,exports.InputOTPSlot=InputOTPSlot,exports.Label=Label$1,exports.Layout=Layout,exports.Navbar=Navbar,exports.PartnerCard=PartnerCard,exports.Preloader=Preloader,exports.ProductCard=ProductCard,exports.ProductImage=ProductImage,exports.ProductInventoryGrid=ProductInventoryGrid,exports.ScrollArea=ScrollArea,exports.ScrollBar=ScrollBar,exports.Separator=Separator,exports.Sheet=Sheet,exports.SheetClose=SheetClose,exports.SheetContent=SheetContent,exports.SheetDescription=SheetDescription,exports.SheetFooter=SheetFooter,exports.SheetHeader=SheetHeader,exports.SheetOverlay=SheetOverlay,exports.SheetPortal=SheetPortal,exports.SheetTitle=SheetTitle,exports.SheetTrigger=SheetTrigger,exports.Sidebar=Sidebar,exports.SidebarContent=SidebarContent,exports.SidebarFooter=SidebarFooter,exports.SidebarGroup=SidebarGroup,exports.SidebarGroupAction=SidebarGroupAction,exports.SidebarGroupContent=SidebarGroupContent,exports.SidebarGroupLabel=SidebarGroupLabel,exports.SidebarHeader=SidebarHeader,exports.SidebarInput=SidebarInput,exports.SidebarInset=SidebarInset,exports.SidebarMenu=SidebarMenu,exports.SidebarMenuAction=SidebarMenuAction,exports.SidebarMenuBadge=SidebarMenuBadge,exports.SidebarMenuButton=SidebarMenuButton,exports.SidebarMenuItem=SidebarMenuItem,exports.SidebarMenuSkeleton=SidebarMenuSkeleton,exports.SidebarMenuSub=SidebarMenuSub,exports.SidebarMenuSubButton=SidebarMenuSubButton,exports.SidebarMenuSubItem=SidebarMenuSubItem,exports.SidebarProvider=SidebarProvider,exports.SidebarRail=SidebarRail,exports.SidebarSeparator=SidebarSeparator,exports.SidebarTrigger=SidebarTrigger,exports.Skeleton=Skeleton,exports.Tabs=Tabs,exports.TabsContent=TabsContent,exports.TabsList=TabsList,exports.TabsTrigger=TabsTrigger,exports.Toast=Toast,exports.ToastAction=ToastAction,exports.ToastClose=ToastClose,exports.ToastDescription=ToastDescription,exports.ToastProvider=ToastProvider,exports.ToastTitle=ToastTitle,exports.ToastViewport=ToastViewport,exports.Toaster=Toaster,exports.Tooltip=Tooltip$1,exports.TooltipContent=TooltipContent,exports.TooltipProvider=TooltipProvider,exports.TooltipTrigger=TooltipTrigger,exports.Topbar=Topbar,exports.badgeVariants=badgeVariants,exports.buttonVariants=buttonVariants,exports.toast=toast,exports.useIsMobile=useIsMobile,exports.useSidebar=useSidebar,exports.useToast=useToast,Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"})});
|
|
887
|
+
`,onClick:()=>{D(le)&&_(le.BidNumber!=(b==null?void 0:b.BidNumber)?le:null)},children:[jsxRuntime.jsx("div",{className:"flex items-center",children:jsxRuntime.jsxs("div",{className:"flex flex-col",children:[jsxRuntime.jsx("span",{className:"font-medium text-sm",children:le.Opportunity}),jsxRuntime.jsxs("span",{className:"text-xs text-neutral-900",children:[le.BidNumber," ",!D(le)&&jsxRuntime.jsx(Badge,{variant:"outline",className:"text-xs mx-1 h-5 bg-gray-100",children:"Currently unavailable"})]})]})}),jsxRuntime.jsxs("div",{className:"flex flex-col items-end",children:[jsxRuntime.jsxs("span",{className:"font-semibold",children:["$",(fe=le.Price)==null?void 0:fe.toFixed(2)]}),le.Rebate&&le.Rebate>0&&jsxRuntime.jsxs("span",{className:"text-xs text-green-600",children:["Rebate: $",le.Rebate.toFixed(2)]}),le.EndDate&&jsxRuntime.jsxs("span",{className:"text-xs text-neutral-600",children:["Ends: ",Q(le.EndDate)]})]})]},Z)})})]})}),jsxRuntime.jsxs("div",{className:"flex flex-col items-center",children:[l&&jsxRuntime.jsx(reactRouterDom.Link,{to:l,children:jsxRuntime.jsxs(Button,{variant:"secondary",children:[jsxRuntime.jsx(Eye,{className:"mr-2"}),"View Product"]})}),((se=e.Distribution)==null?void 0:se.Inventory)&&jsxRuntime.jsx("div",{className:"mt-4",children:jsxRuntime.jsxs(Dialog,{open:S,onOpenChange:C,children:[jsxRuntime.jsx(DialogTrigger,{asChild:!0,children:jsxRuntime.jsxs(Button,{variant:"ghost",className:`flex items-center text-sm ${U>0?"text-green-700":"text-red-700"}`,children:[jsxRuntime.jsx(Warehouse,{size:"16",className:"mr-2"}),U>0?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[U," in stock"]}):jsxRuntime.jsx(jsxRuntime.Fragment,{children:"Out of stock"})]})}),jsxRuntime.jsxs(DialogContent,{className:"max-w-4xl",children:[jsxRuntime.jsx(DialogHeader,{children:jsxRuntime.jsxs(DialogTitle,{className:"flex items-center",children:[jsxRuntime.jsx(Warehouse,{className:"mr-2",size:18}),"Inventory Information"]})}),jsxRuntime.jsx(ProductInventoryGrid,{inventory:e.Distribution.Inventory})]})]})})]})]}),e.Distribution&&jsxRuntime.jsxs("div",{className:"flex justify-between items-end mt-4",children:[jsxRuntime.jsx("div",{className:"flex-shrink-1 flex flex-col items-start gap-1",children:T>0?jsxRuntime.jsx("div",{className:"flex items-center",children:jsxRuntime.jsxs("span",{className:"text-2xl font-bold whitespace-nowrap",children:[jsxRuntime.jsx("span",{children:"Cost: $"}),T.toFixed(2),jsxRuntime.jsx("span",{children:" CAD"})]})}):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs("div",{className:"flex items-center flex-wrap",children:[jsxRuntime.jsxs("span",{className:"text-2xl font-bold whitespace-nowrap",children:[jsxRuntime.jsx("span",{children:"$"}),b?(ie=(ce=e.Opportunities)==null?void 0:ce.find(le=>le.BidNumber==b.BidNumber))==null?void 0:ie.Price:M.toFixed(2),jsxRuntime.jsx("span",{children:" CAD"})]}),R>0&&jsxRuntime.jsxs("span",{className:"text-muted-foreground line-through ml-2 whitespace-nowrap",children:["$",A.toFixed(2)]})]}),R>0&&jsxRuntime.jsx("div",{className:"flex items-center",children:jsxRuntime.jsxs(Badge,{variant:"outline",className:"bg-red-50 text-red-700 rounded-full px-3 whitespace-nowrap",children:[jsxRuntime.jsxs("span",{children:[R,"% OFF"]}),((ue=e.InstantRebate)==null?void 0:ue.EndDate)&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("span",{className:"mx-1.5",children:"●"})," Ends ",e.InstantRebate.EndDate.split("T")[0]]}),(b==null?void 0:b.EndDate)&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("span",{className:"mx-1.5",children:"●"})," Ends ",b.EndDate.split("T")[0]]})]})})]})}),jsxRuntime.jsxs("div",{className:"flex flex-shrink-0 gap-2 ml-4",children:[typeof t<"u"&&t&&jsxRuntime.jsxs("div",{className:"flex items-center border rounded-md",children:[jsxRuntime.jsx(Button,{variant:"ghost",size:"icon",className:"rounded-r-none",onClick:B,disabled:typeof m<"u"&&(m<=1||!e.AvailableToBuy||d||!u),children:"-"}),jsxRuntime.jsx("input",{value:m,onChange:H,onBlur:z,onClick:le=>le.currentTarget.select(),className:`w-12 text-center border-0 focus:ring-0 focus:outline-none ${!e.AvailableToBuy||d||!u?"text-gray-400":""}`,disabled:!e.AvailableToBuy||d||!u}),jsxRuntime.jsx(Button,{variant:"ghost",size:"icon",className:"rounded-l-none",onClick:V,disabled:!e.AvailableToBuy||d||!u,children:"+"})]}),typeof t<"u"&&t&&jsxRuntime.jsx(Button,{className:"gap-2 whitespace-nowrap",onClick:q,disabled:!e.AvailableToBuy||d||!u,children:d?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(LoaderCircle,{className:"h-4 w-4 animate-spin"}),"Adding..."]}):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(ShoppingCart,{className:"mr-2"}),"Add to Cart"]})}),n&&jsxRuntime.jsx(Button,{className:"gap-2 whitespace-nowrap bg-green-600 hover:bg-green-700",onClick:f,disabled:p||!f,children:p?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(LoaderCircle,{className:"h-4 w-4 animate-spin"}),"Syncing..."]}):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(ShoppingCart,{className:"mr-2"}),"Sync to Shopify"]})}),i]})]})]})})}function ManufacturerCard({manufacturer:e,goToManufacturerLink:t,actionItems:n=[],isLoading:i=!1}){var m;if(i)return jsxRuntime.jsxs(Card,{className:"w-full max-w-md overflow-hidden",children:[jsxRuntime.jsx(CardHeader,{className:"flex flex-row items-start justify-between space-y-0 pb-2 pt-4",children:jsxRuntime.jsxs("div",{className:"flex items-center gap-3",children:[jsxRuntime.jsx(Skeleton,{className:"h-12 w-12 rounded-md"}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx(Skeleton,{className:"h-3 w-24 mb-2"}),jsxRuntime.jsx(Skeleton,{className:"h-5 w-40 mb-1"}),jsxRuntime.jsx(Skeleton,{className:"h-4 w-32 mb-1"}),jsxRuntime.jsx(Skeleton,{className:"h-4 w-48"})]})]})}),jsxRuntime.jsx(CardContent,{className:"pb-2",children:jsxRuntime.jsxs("div",{className:"flex flex-col space-y-2",children:[jsxRuntime.jsxs("div",{className:"flex flex-wrap gap-2",children:[jsxRuntime.jsx(Skeleton,{className:"h-5 w-16 rounded-full"}),jsxRuntime.jsx(Skeleton,{className:"h-5 w-20 rounded-full"}),jsxRuntime.jsx(Skeleton,{className:"h-5 w-14 rounded-full"})]}),jsxRuntime.jsxs("div",{className:"space-y-1 pt-2",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsx(Skeleton,{className:"h-4 w-4"}),jsxRuntime.jsx(Skeleton,{className:"h-4 w-32"})]}),jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsx(Skeleton,{className:"h-4 w-4"}),jsxRuntime.jsx(Skeleton,{className:"h-4 w-40"})]}),jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsx(Skeleton,{className:"h-4 w-4"}),jsxRuntime.jsx(Skeleton,{className:"h-4 w-36"})]})]})]})}),jsxRuntime.jsxs(CardFooter,{className:"flex justify-between pt-2 gap-2",children:[jsxRuntime.jsx(Skeleton,{className:"h-9 w-24"}),jsxRuntime.jsx(Skeleton,{className:"h-9 w-40"})]})]});const o=e.ManufacturerId||"N/A",l=e.PublicName||"N/A",u=[e.City,e.Province,e.Country].filter(Boolean),d=u.length>0?u.join(", "):"Location not provided",f=((m=e.Tags)==null?void 0:m.split(",").map(g=>g.trim()).filter(Boolean))||[],p=(g,b)=>{const _=g.icon,R=jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsx(_,{className:"h-4 w-4"}),jsxRuntime.jsx("span",{children:g.label})]});return g.link?jsxRuntime.jsx(DropdownMenuItem,{asChild:!0,children:jsxRuntime.jsx(reactRouterDom.Link,{to:g.link,children:R})},b):jsxRuntime.jsx(DropdownMenuItem,{onClick:g.onClick,children:R},b)};return jsxRuntime.jsxs(Card,{className:"w-full max-w-md overflow-hidden",children:[jsxRuntime.jsxs(CardHeader,{className:"flex flex-row items-start justify-between space-y-0 pb-2 pt-4",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-3",children:[jsxRuntime.jsx("div",{className:"h-12 w-12 overflow-hidden rounded-md",children:jsxRuntime.jsx("img",{src:`https://api.randmar.io/V4/Partner/${o}/Account/Logo?width=64&height=64`,alt:`${l}'s logo`,className:"max-h-10 w-auto object-contain"})}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsx("span",{className:"text-xs text-randmar-purple",children:"Manufacturer"}),jsxRuntime.jsx("span",{className:"text-xs text-muted-foreground",children:"|"}),jsxRuntime.jsx("span",{className:"text-xs text-muted-foreground",children:o})]}),jsxRuntime.jsx("h3",{className:"font-semibold",children:e.PublicName||"N/A"}),e.Name&&jsxRuntime.jsx("p",{className:"text-sm text-muted-foreground",children:e.Name}),jsxRuntime.jsx("p",{className:"text-sm text-muted-foreground",children:d})]})]}),!!e.OnHold&&e.OnHold!==0&&jsxRuntime.jsx(Badge,{variant:"warning",children:"On Hold"})]}),jsxRuntime.jsx(CardContent,{className:"pb-2",children:jsxRuntime.jsxs("div",{className:"flex flex-col space-y-2",children:[f.length>0&&jsxRuntime.jsx("div",{className:"flex flex-wrap gap-2",children:f.map((g,b)=>jsxRuntime.jsx(Badge,{variant:"randmarPurple",children:g},b))}),jsxRuntime.jsxs("div",{className:"space-y-1 pt-2",children:[e.Phone&&jsxRuntime.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[jsxRuntime.jsx(Phone,{className:"h-4 w-4"}),jsxRuntime.jsx("span",{children:e.Phone})]}),e.PublicEmail&&jsxRuntime.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[jsxRuntime.jsx(Mail,{className:"h-4 w-4"}),jsxRuntime.jsx("span",{children:e.PublicEmail})]}),e.Website&&jsxRuntime.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[jsxRuntime.jsx(Globe,{className:"h-4 w-4"}),jsxRuntime.jsx("span",{children:e.Website})]})]})]})}),jsxRuntime.jsxs(CardFooter,{className:`flex pt-2 gap-2 ${n.length>0?"justify-between":"justify-end"}`,children:[n.length>0&&jsxRuntime.jsxs(DropdownMenu,{children:[jsxRuntime.jsx(DropdownMenuTrigger,{asChild:!0,children:jsxRuntime.jsxs(Button,{variant:"outline",className:"text-randmar-purple",children:["Actions ",jsxRuntime.jsx(Ellipsis,{className:"ml-1 h-4 w-4"})]})}),jsxRuntime.jsx(DropdownMenuContent,{align:"start",children:n.map((g,b)=>p(g,b))})]}),jsxRuntime.jsx(Button,{variant:"purple",className:"flex items-center gap-1",asChild:!0,children:jsxRuntime.jsxs(reactRouterDom.Link,{to:t,children:["Go to Manufacturer",jsxRuntime.jsx(ChevronRight,{className:"h-4 w-4"})]})})]})]})}function ResellerCard({reseller:e,goToResellerLink:t,actionItems:n=[],isLoading:i=!1}){if(i)return jsxRuntime.jsxs(Card,{className:"w-full max-w-md overflow-hidden",children:[jsxRuntime.jsx(CardHeader,{className:"flex flex-row items-start justify-between space-y-0 pb-2 pt-4",children:jsxRuntime.jsxs("div",{className:"flex items-center gap-3",children:[jsxRuntime.jsx(Skeleton,{className:"h-12 w-12 rounded-md"}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx(Skeleton,{className:"h-3 w-24 mb-2"}),jsxRuntime.jsx(Skeleton,{className:"h-5 w-40 mb-1"}),jsxRuntime.jsx(Skeleton,{className:"h-4 w-32 mb-1"}),jsxRuntime.jsx(Skeleton,{className:"h-4 w-48"})]})]})}),jsxRuntime.jsx(CardContent,{className:"pb-2",children:jsxRuntime.jsx("div",{className:"flex flex-col space-y-2",children:jsxRuntime.jsxs("div",{className:"space-y-1 pt-2",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsx(Skeleton,{className:"h-4 w-4"}),jsxRuntime.jsx(Skeleton,{className:"h-4 w-32"})]}),jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsx(Skeleton,{className:"h-4 w-4"}),jsxRuntime.jsx(Skeleton,{className:"h-4 w-40"})]}),jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsx(Skeleton,{className:"h-4 w-4"}),jsxRuntime.jsx(Skeleton,{className:"h-4 w-36"})]})]})})}),jsxRuntime.jsxs(CardFooter,{className:"flex justify-between pt-2 gap-2",children:[jsxRuntime.jsx(Skeleton,{className:"h-9 w-24"}),jsxRuntime.jsx(Skeleton,{className:"h-9 w-40"})]})]});const o=e.ResellerId||"N/A",l=e.PublicName||"N/A",u=[e.City,e.Province,e.Country].filter(Boolean),d=u.length>0?u.join(", "):"Location not provided",f=(p,m)=>{const g=p.icon,b=jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsx(g,{className:"h-4 w-4"}),jsxRuntime.jsx("span",{children:p.label})]});return p.link?jsxRuntime.jsx(DropdownMenuItem,{asChild:!0,children:jsxRuntime.jsx(reactRouterDom.Link,{to:p.link,children:b})},m):jsxRuntime.jsx(DropdownMenuItem,{onClick:p.onClick,children:b},m)};return jsxRuntime.jsxs(Card,{className:"w-full max-w-md overflow-hidden",children:[jsxRuntime.jsxs(CardHeader,{className:"flex flex-row items-start justify-between space-y-0 pb-2 pt-4",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-3",children:[jsxRuntime.jsx("div",{className:"h-12 w-12 overflow-hidden rounded-md",children:jsxRuntime.jsx("img",{src:`https://api.randmar.io/V4/Partner/${o}/Account/Logo?width=64&height=64`,alt:`${l}'s logo`,className:"max-h-10 w-auto object-contain"})}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsx("span",{className:"text-xs text-randmar-blue",children:"Reseller"}),jsxRuntime.jsx("span",{className:"text-xs text-muted-foreground",children:"|"}),jsxRuntime.jsx("span",{className:"text-xs text-muted-foreground",children:o})]}),jsxRuntime.jsx("h3",{className:"font-semibold",children:e.PublicName||"N/A"}),e.Name&&jsxRuntime.jsx("p",{className:"text-sm text-muted-foreground",children:e.Name}),jsxRuntime.jsx("p",{className:"text-sm text-muted-foreground",children:d})]})]}),!!e.OnHold&&e.OnHold!==0&&jsxRuntime.jsx(Badge,{variant:"warning",children:"On Hold"})]}),jsxRuntime.jsx(CardContent,{className:"pb-2",children:jsxRuntime.jsx("div",{className:"flex flex-col space-y-2",children:jsxRuntime.jsxs("div",{className:"space-y-1 pt-2",children:[e.Phone&&jsxRuntime.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[jsxRuntime.jsx(Phone,{className:"h-4 w-4"}),jsxRuntime.jsx("span",{children:e.Phone})]}),e.PublicEmail&&jsxRuntime.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[jsxRuntime.jsx(Mail,{className:"h-4 w-4"}),jsxRuntime.jsx("span",{children:e.PublicEmail})]}),e.Website&&jsxRuntime.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[jsxRuntime.jsx(Globe,{className:"h-4 w-4"}),jsxRuntime.jsx("span",{children:e.Website})]})]})})}),jsxRuntime.jsxs(CardFooter,{className:`flex pt-2 gap-2 ${n.length>0?"justify-between":"justify-end"}`,children:[n.length>0&&jsxRuntime.jsxs(DropdownMenu,{children:[jsxRuntime.jsx(DropdownMenuTrigger,{asChild:!0,children:jsxRuntime.jsxs(Button,{variant:"outline",className:"text-randmar-blue",children:["Actions ",jsxRuntime.jsx(Ellipsis,{className:"ml-1 h-4 w-4"})]})}),jsxRuntime.jsx(DropdownMenuContent,{align:"start",children:n.map((p,m)=>f(p,m))})]}),jsxRuntime.jsx(Button,{variant:"blue",className:"flex items-center gap-1",asChild:!0,children:jsxRuntime.jsxs(reactRouterDom.Link,{to:t,children:["Go to Reseller",jsxRuntime.jsx(ChevronRight,{className:"h-4 w-4"})]})})]})]})}exports.AreaChart=AreaChart,exports.Avatar=Avatar,exports.AvatarFallback=AvatarFallback,exports.AvatarFooter=AvatarFooter,exports.AvatarImage=AvatarImage,exports.Badge=Badge,exports.Button=Button,exports.Card=Card,exports.CardContent=CardContent,exports.CardDescription=CardDescription,exports.CardFooter=CardFooter,exports.CardHeader=CardHeader,exports.CardTitle=CardTitle,exports.ChatLayout=ChatLayout,exports.CountryFlag=CountryFlag,exports.Dialog=Dialog,exports.DialogClose=DialogClose,exports.DialogContent=DialogContent,exports.DialogDescription=DialogDescription,exports.DialogFooter=DialogFooter,exports.DialogHeader=DialogHeader,exports.DialogOverlay=DialogOverlay,exports.DialogPortal=DialogPortal,exports.DialogTitle=DialogTitle,exports.DialogTrigger=DialogTrigger,exports.DropdownMenu=DropdownMenu,exports.DropdownMenuCheckboxItem=DropdownMenuCheckboxItem,exports.DropdownMenuContent=DropdownMenuContent,exports.DropdownMenuGroup=DropdownMenuGroup,exports.DropdownMenuItem=DropdownMenuItem,exports.DropdownMenuLabel=DropdownMenuLabel,exports.DropdownMenuPortal=DropdownMenuPortal,exports.DropdownMenuRadioGroup=DropdownMenuRadioGroup,exports.DropdownMenuRadioItem=DropdownMenuRadioItem,exports.DropdownMenuSeparator=DropdownMenuSeparator,exports.DropdownMenuShortcut=DropdownMenuShortcut,exports.DropdownMenuSub=DropdownMenuSub,exports.DropdownMenuSubContent=DropdownMenuSubContent,exports.DropdownMenuSubTrigger=DropdownMenuSubTrigger,exports.DropdownMenuTrigger=DropdownMenuTrigger,exports.Input=Input,exports.InputOTP=InputOTP,exports.InputOTPGroup=InputOTPGroup,exports.InputOTPSeparator=InputOTPSeparator,exports.InputOTPSlot=InputOTPSlot,exports.Label=Label$1,exports.Layout=Layout,exports.ManufacturerCard=ManufacturerCard,exports.Navbar=Navbar,exports.PartnerCard=PartnerCard,exports.Preloader=Preloader,exports.ProductCard=ProductCard,exports.ProductImage=ProductImage,exports.ProductInventoryGrid=ProductInventoryGrid,exports.ResellerCard=ResellerCard,exports.ScrollArea=ScrollArea,exports.ScrollBar=ScrollBar,exports.Separator=Separator,exports.Sheet=Sheet,exports.SheetClose=SheetClose,exports.SheetContent=SheetContent,exports.SheetDescription=SheetDescription,exports.SheetFooter=SheetFooter,exports.SheetHeader=SheetHeader,exports.SheetOverlay=SheetOverlay,exports.SheetPortal=SheetPortal,exports.SheetTitle=SheetTitle,exports.SheetTrigger=SheetTrigger,exports.Sidebar=Sidebar,exports.SidebarContent=SidebarContent,exports.SidebarFooter=SidebarFooter,exports.SidebarGroup=SidebarGroup,exports.SidebarGroupAction=SidebarGroupAction,exports.SidebarGroupContent=SidebarGroupContent,exports.SidebarGroupLabel=SidebarGroupLabel,exports.SidebarHeader=SidebarHeader,exports.SidebarInput=SidebarInput,exports.SidebarInset=SidebarInset,exports.SidebarMenu=SidebarMenu,exports.SidebarMenuAction=SidebarMenuAction,exports.SidebarMenuBadge=SidebarMenuBadge,exports.SidebarMenuButton=SidebarMenuButton,exports.SidebarMenuItem=SidebarMenuItem,exports.SidebarMenuSkeleton=SidebarMenuSkeleton,exports.SidebarMenuSub=SidebarMenuSub,exports.SidebarMenuSubButton=SidebarMenuSubButton,exports.SidebarMenuSubItem=SidebarMenuSubItem,exports.SidebarProvider=SidebarProvider,exports.SidebarRail=SidebarRail,exports.SidebarSeparator=SidebarSeparator,exports.SidebarTrigger=SidebarTrigger,exports.Skeleton=Skeleton,exports.Tabs=Tabs,exports.TabsContent=TabsContent,exports.TabsList=TabsList,exports.TabsTrigger=TabsTrigger,exports.Toast=Toast,exports.ToastAction=ToastAction,exports.ToastClose=ToastClose,exports.ToastDescription=ToastDescription,exports.ToastProvider=ToastProvider,exports.ToastTitle=ToastTitle,exports.ToastViewport=ToastViewport,exports.Toaster=Toaster,exports.Tooltip=Tooltip$1,exports.TooltipContent=TooltipContent,exports.TooltipProvider=TooltipProvider,exports.TooltipTrigger=TooltipTrigger,exports.Topbar=Topbar,exports.badgeVariants=badgeVariants,exports.buttonVariants=buttonVariants,exports.toast=toast,exports.useIsMobile=useIsMobile,exports.useSidebar=useSidebar,exports.useToast=useToast,Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"})});
|