@fluidattacks/design 3.1.11 → 3.1.12
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/_commonjsHelpers-C6fGbg64.mjs +6 -0
- package/dist/components/@core/index.js +18 -1
- package/dist/components/accordion/accordion-content/index.js +9 -1
- package/dist/components/accordion/index.js +21 -1
- package/dist/components/alert/index.js +111 -4
- package/dist/components/button/index.js +18 -1
- package/dist/components/card/card-header/index.js +14 -1
- package/dist/components/card/card-with-image/index.js +18 -1
- package/dist/components/card/card-with-input/index.js +57 -3
- package/dist/components/card/card-with-selector/index.js +16 -1
- package/dist/components/card/card-with-switch/index.js +12 -1
- package/dist/components/card/index.js +12 -1
- package/dist/components/carousel/index.js +36 -10
- package/dist/components/checkbox/index.js +84 -3
- package/dist/components/cloud-image/index.js +8 -1
- package/dist/components/code-snippet/index.js +27 -1
- package/dist/components/code-snippet/location-code/index.js +125 -1
- package/dist/components/colors/index.js +9 -1
- package/dist/components/confirm-dialog/index.js +23 -1
- package/dist/components/container/index.js +27 -3
- package/dist/components/content-card/category-tag/index.js +13 -1
- package/dist/components/content-card/event-date/index.js +18 -1
- package/dist/components/content-card/index.js +63 -3
- package/dist/components/content-card-carousel/index.js +15 -1
- package/dist/components/content-card-carousel/scroll-buttons/index.js +9 -1
- package/dist/components/divider/index.js +10 -1
- package/dist/components/empty-state/empty-button/index.js +6 -1
- package/dist/components/empty-state/index.js +21 -8
- package/dist/components/file-preview/index.js +15 -3
- package/dist/components/form/index.js +26 -3
- package/dist/components/grid-container/index.js +26 -5
- package/dist/components/group-selector/index.js +26 -1
- package/dist/components/group-selector/option-container/index.js +12 -1
- package/dist/components/icon/index.js +42 -4
- package/dist/components/icon-button/index.js +27 -3
- package/dist/components/indicator-card/index.js +15 -1
- package/dist/components/info-sidebar/index.js +16 -1
- package/dist/components/inputs/fields/combobox/index.js +26 -1
- package/dist/components/inputs/fields/combobox/option/index.js +8 -1
- package/dist/components/inputs/fields/date/calendar/cell/index.js +16 -1
- package/dist/components/inputs/fields/date/calendar/grid/index.js +15 -1
- package/dist/components/inputs/fields/date/calendar/header/index.js +16 -1
- package/dist/components/inputs/fields/date/calendar/index.js +15 -1
- package/dist/components/inputs/fields/date/index.js +18 -1
- package/dist/components/inputs/fields/date-range/calendar/index.js +16 -1
- package/dist/components/inputs/fields/date-range/index.js +28 -3
- package/dist/components/inputs/fields/date-time/calendar/index.js +31 -5
- package/dist/components/inputs/fields/date-time/index.js +18 -1
- package/dist/components/inputs/fields/editable/index.js +16 -1
- package/dist/components/inputs/fields/input/index.js +13 -1
- package/dist/components/inputs/fields/input-file/index.js +24 -4
- package/dist/components/inputs/fields/input-tags/index.js +14 -2
- package/dist/components/inputs/fields/number/index.js +10 -1
- package/dist/components/inputs/fields/number-range/index.js +11 -1
- package/dist/components/inputs/fields/phone/index.js +414 -11
- package/dist/components/inputs/fields/text-area/index.js +13 -1
- package/dist/components/inputs/index.js +28 -1
- package/dist/components/inputs/label/index.js +12 -1
- package/dist/components/inputs/outline-container/index.js +18 -1
- package/dist/components/inputs/utils/action-button/index.js +10 -1
- package/dist/components/inputs/utils/calendar-button/index.js +13 -1
- package/dist/components/inputs/utils/date-selector/index.js +8 -1
- package/dist/components/inputs/utils/date-time-field/index.js +32 -1
- package/dist/components/inputs/utils/dialog/index.js +11 -1
- package/dist/components/inputs/utils/number-field/index.js +13 -1
- package/dist/components/inputs/utils/popover/index.js +13 -1
- package/dist/components/interactive-card/icon/index.js +7 -1
- package/dist/components/interactive-card/index.js +15 -1
- package/dist/components/language-selector/index.js +13 -1
- package/dist/components/language-selector/item-list/index.js +8 -1
- package/dist/components/link/index.js +52 -7
- package/dist/components/list-item/index.js +16 -1
- package/dist/components/little-flag/index.js +15 -3
- package/dist/components/loading/index.js +28 -14
- package/dist/components/logo/index.js +7 -1
- package/dist/components/logo-carousel/index.js +10 -4
- package/dist/components/lottie/index.js +15 -3
- package/dist/components/menu/index.js +23 -1
- package/dist/components/message-banner/index.js +21 -4
- package/dist/components/modal/index.js +19 -1
- package/dist/components/modal/modal-confirm/index.js +10 -1
- package/dist/components/modal/modal-footer/index.js +16 -1
- package/dist/components/modal/modal-header/index.js +25 -1
- package/dist/components/notification/index.js +68 -5
- package/dist/components/notification-sign/index.js +26 -6
- package/dist/components/number-input/index.js +25 -7
- package/dist/components/oauth-selector/index.js +26 -1
- package/dist/components/oauth-selector/option-container/index.js +15 -1
- package/dist/components/plan-card/index.js +84 -5
- package/dist/components/plan-card/recommended-tag/index.js +10 -1
- package/dist/components/pop-up/description/index.js +13 -1
- package/dist/components/pop-up/index.js +23 -1
- package/dist/components/premium-feature/index.js +45 -3
- package/dist/components/priority-score/index.js +14 -1
- package/dist/components/progress/index.js +23 -3
- package/dist/components/progress-bar/index.js +95 -5
- package/dist/components/radio-button/index.js +88 -3
- package/dist/components/scroll-button/index.js +20 -2
- package/dist/components/search/index.js +63 -7
- package/dist/components/search-bar/index.js +32 -1
- package/dist/components/search-bar/item-searching/index.js +10 -1
- package/dist/components/severity-badge/index.js +14 -1
- package/dist/components/severity-overview/badge/index.js +18 -1
- package/dist/components/severity-overview/index.js +7 -1
- package/dist/components/show-on-hover/index.js +25 -3
- package/dist/components/slide-out-menu/index.js +2009 -3
- package/dist/components/slide-out-menu/menu-item/index.js +15 -1
- package/dist/components/slider/index.js +93 -7
- package/dist/components/slider/thumb/index.js +10 -1
- package/dist/components/step-lapse/index.js +95 -9
- package/dist/components/table-button/index.js +56 -3
- package/dist/components/tabs/fixed-tabs/index.js +9 -1
- package/dist/components/tabs/index.js +14 -1
- package/dist/components/tabs/tab/index.js +8 -1
- package/dist/components/tag/index.js +116 -3
- package/dist/components/timeline/card/index.js +9 -1
- package/dist/components/timeline/index.js +7 -1
- package/dist/components/toggle/index.js +45 -14
- package/dist/components/toggle-buttons/index.js +74 -5
- package/dist/components/tooltip/index.js +13 -1
- package/dist/components/tour/index.js +2481 -4
- package/dist/components/typography/heading/index.js +9 -1
- package/dist/components/typography/index.js +8 -1
- package/dist/components/typography/span/index.js +9 -1
- package/dist/components/typography/text/index.js +9 -1
- package/dist/components/web-form/index.js +59 -7
- package/dist/hooks/index.js +13 -1
- package/dist/index-38JqtnAI.mjs +122 -0
- package/dist/index-B5yoGFs6.mjs +54 -0
- package/dist/index-BLbKylyw.mjs +209 -0
- package/dist/{index-C0_LPuYU.mjs → index-Bu448Tz2.mjs} +22 -22
- package/dist/index-BwFnfaRh.mjs +2310 -0
- package/dist/index-Co_k0WFk.mjs +75 -0
- package/dist/index-Cu7uUMlx.mjs +82 -0
- package/dist/index-D-lcuEHY.mjs +1018 -0
- package/dist/index-DrfjITyT.mjs +61 -0
- package/dist/index.js +206 -1
- package/dist/styles-7_q7nHce.mjs +110 -0
- package/dist/styles-BA0WIQL-.mjs +74 -0
- package/dist/styles-C3cZmKVJ.mjs +131 -0
- package/dist/styles-CI-I6joH.mjs +144 -0
- package/dist/styles-Cx93EcVo.mjs +76 -0
- package/dist/styles-D85YYIjM.mjs +131 -0
- package/dist/styles-EIbGRPlk.mjs +106 -0
- package/dist/styles-Q1VXuWI7.mjs +65 -0
- package/dist/styles-fH2c4cfc.mjs +77 -0
- package/dist/{styles-BAhpqi6C.mjs → styles-lSVV9kjn.mjs} +28 -28
- package/dist/use-carousel-CvRxi2FI.mjs +17 -0
- package/dist/use-click-outside-BtZLIoU1.mjs +18 -0
- package/dist/use-cloudinary-image-fG7ODNgr.mjs +611 -0
- package/dist/use-modal-CkrZ-_-M.mjs +14 -0
- package/dist/use-search-DpLNvt7Q.mjs +12 -0
- package/dist/utils-CQvBF-wY.mjs +4 -0
- package/package.json +1 -1
- package/dist/_commonjsHelpers-C37NGDzP.js +0 -1
- package/dist/_commonjsHelpers-D6CrkqQz.mjs +0 -6
- package/dist/index-BH27NQKA.mjs +0 -2311
- package/dist/index-Bcw2vW_n.mjs +0 -75
- package/dist/index-C8zdgAVH.mjs +0 -82
- package/dist/index-CA_9DXWd.js +0 -5
- package/dist/index-CmylnDrF.js +0 -14
- package/dist/index-DUMgwAbO.js +0 -26
- package/dist/index-DpQYiwGu.js +0 -5
- package/dist/index-Dy8ZUIYs.js +0 -5
- package/dist/index-JPf5Yzg6.js +0 -17
- package/dist/index-OBZtKZuT.mjs +0 -1021
- package/dist/index-SsXlDjK4.mjs +0 -122
- package/dist/index-TKLFHcRp.js +0 -18
- package/dist/index-TnyKqJHo.mjs +0 -61
- package/dist/index-Yr95Cb7Z.mjs +0 -54
- package/dist/index-h9-U5wxq.mjs +0 -209
- package/dist/index-qCiUU4sZ.js +0 -9
- package/dist/index-qe0nJwzl.js +0 -15
- package/dist/styles--Elze-LV.js +0 -3
- package/dist/styles-3pR4Xdvy.js +0 -33
- package/dist/styles-59h91S9m.mjs +0 -65
- package/dist/styles-BCwLWpC3.mjs +0 -126
- package/dist/styles-BJ7-0I5X.mjs +0 -74
- package/dist/styles-BKObp9bh.mjs +0 -76
- package/dist/styles-BWVdbvFu.js +0 -5
- package/dist/styles-Bl-CstrT.js +0 -5
- package/dist/styles-Bn42XCW5.js +0 -7
- package/dist/styles-C2CoGJl7.js +0 -33
- package/dist/styles-CNzziAXG.js +0 -5
- package/dist/styles-CdD9waPD.js +0 -29
- package/dist/styles-CnKTwnFk.mjs +0 -110
- package/dist/styles-D4R-eerv.mjs +0 -77
- package/dist/styles-DNIIhyRC.mjs +0 -144
- package/dist/styles-DV8yOaqV.mjs +0 -131
- package/dist/styles-DYoftbd3.js +0 -42
- package/dist/styles-DlmKLhPh.js +0 -7
- package/dist/styles-be8gOdgy.mjs +0 -106
- package/dist/use-carousel-64dKFW4E.js +0 -1
- package/dist/use-carousel-D7xeL3YZ.mjs +0 -17
- package/dist/use-click-outside-BqkLISED.js +0 -1
- package/dist/use-click-outside-C4Z4pdiW.mjs +0 -18
- package/dist/use-cloudinary-image-DKMl7jbx.mjs +0 -612
- package/dist/use-cloudinary-image-YMMafagv.js +0 -1
- package/dist/use-modal-CNbLSSQb.mjs +0 -14
- package/dist/use-modal-_bYY6M_n.js +0 -1
- package/dist/use-search-75ip5xR-.mjs +0 -12
- package/dist/use-search-DeL4UDMh.js +0 -1
- package/dist/utils-C2whpEd3.js +0 -1
- package/dist/utils-Da0qL35u.mjs +0 -4
|
@@ -1,3 +1,2009 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),e=require("react"),n=require("styled-components"),s=require("./menu-item/index.js"),i=require("../button/index.js"),r=require("../container/index.js"),o=require("../icon-button/index.js");require("../typography/heading/index.js"),require("../typography/span/index.js");const a=require("../typography/text/index.js"),l=require("../../use-click-outside-BqkLISED.js");require("lodash");const u=new Set;function c(t,e,n){t||u.has(e)||u.add(e)}function h(t){return null!==t&&"object"==typeof t&&"function"==typeof t.start}const d=t=>Array.isArray(t);function p(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let s=0;s<n;s++)if(e[s]!==t[s])return!1;return!0}function m(t){return"string"==typeof t||Array.isArray(t)}function f(t){const e=[{},{}];return null==t||t.values.forEach(((t,n)=>{e[0][n]=t.get(),e[1][n]=t.getVelocity()})),e}function v(t,e,n,s){if("function"==typeof e){const[i,r]=f(s);e=e(void 0!==n?n:t.custom,i,r)}if("string"==typeof e&&(e=t.variants&&t.variants[e]),"function"==typeof e){const[i,r]=f(s);e=e(void 0!==n?n:t.custom,i,r)}return e}function y(t,e,n){const s=t.getProps();return v(s,e,void 0!==n?n:s.custom,t)}const g=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],w=["initial",...g],b=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],x=new Set(b),S=t=>1e3*t,T=t=>t/1e3,A={type:"spring",stiffness:500,damping:25,restSpeed:10},C={type:"keyframes",duration:.8},V={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},M=(t,{keyframes:e})=>e.length>2?C:x.has(t)?t.startsWith("scale")?{type:"spring",stiffness:550,damping:0===e[1]?2*Math.sqrt(550):30,restSpeed:10}:A:V;function P(t,e){return t?t[e]||t.default||t:void 0}const k=t=>null!==t;function E(t,{repeat:e,repeatType:n="loop"},s){const i=t.filter(k),r=e&&"loop"!==n&&e%2==1?0:i.length-1;return r&&void 0!==s?s:i[r]}const F=t=>t;let O=F,I=F;"production"!==process.env.NODE_ENV&&(O=(t,e)=>{},I=(t,e)=>{if(!t)throw new Error(e)});const R=["read","resolveKeyframes","update","preRender","render","postRender"];function j(t,e){let n=!1,s=!0;const i={delta:0,timestamp:0,isProcessing:!1},r=()=>n=!0,o=R.reduce(((t,e)=>(t[e]=function(t){let e=new Set,n=new Set,s=!1,i=!1;const r=new WeakSet;let o={delta:0,timestamp:0,isProcessing:!1};function a(e){r.has(e)&&(l.schedule(e),t()),e(o)}const l={schedule:(t,i=!1,o=!1)=>{const a=o&&s?e:n;return i&&r.add(t),a.has(t)||a.add(t),t},cancel:t=>{n.delete(t),r.delete(t)},process:t=>{o=t,s?i=!0:(s=!0,[e,n]=[n,e],e.forEach(a),e.clear(),s=!1,i&&(i=!1,l.process(t)))}};return l}(r),t)),{}),{read:a,resolveKeyframes:l,update:u,preRender:c,render:h,postRender:d}=o,p=()=>{const r=performance.now();n=!1,i.delta=s?1e3/60:Math.max(Math.min(r-i.timestamp,40),1),i.timestamp=r,i.isProcessing=!0,a.process(i),l.process(i),u.process(i),c.process(i),h.process(i),d.process(i),i.isProcessing=!1,n&&e&&(s=!1,t(p))};return{schedule:R.reduce(((e,r)=>{const a=o[r];return e[r]=(e,r=!1,o=!1)=>(n||(n=!0,s=!0,i.isProcessing||t(p)),a.schedule(e,r,o)),e}),{}),cancel:t=>{for(let e=0;e<R.length;e++)o[R[e]].cancel(t)},state:i,steps:o}}const{schedule:D,cancel:B,state:N,steps:L}=j("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:F,!0),$=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t;function K(t,e,n,s){if(t===e&&n===s)return F;return i=>0===i||1===i?i:$(function(t,e,n,s,i){let r,o,a=0;do{o=e+(n-e)/2,r=$(o,s,i)-t,r>0?n=o:e=o}while(Math.abs(r)>1e-7&&++a<12);return o}(i,0,1,t,n),e,s)}const W=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,q=t=>e=>1-t(1-e),U=K(.33,1.53,.69,.99),Y=q(U),z=W(Y),H=t=>(t*=2)<1?.5*Y(t):.5*(2-Math.pow(2,-10*(t-1))),X=t=>1-Math.sin(Math.acos(t)),_=q(X),G=W(X),Z=t=>/^0[^.\s]+$/u.test(t),J=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),Q=t=>e=>"string"==typeof e&&e.startsWith(t),tt=Q("--"),et=Q("var(--"),nt=t=>!!et(t)&&st.test(t.split("/*")[0].trim()),st=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,it=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function rt(t,e,n=1){I(n<=4,`Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`);const[s,i]=function(t){const e=it.exec(t);if(!e)return[,];const[,n,s,i]=e;return[`--${null!=n?n:s}`,i]}(t);if(!s)return;const r=window.getComputedStyle(e).getPropertyValue(s);if(r){const t=r.trim();return J(t)?parseFloat(t):t}return nt(i)?rt(i,e,n+1):i}const ot=(t,e,n)=>n>e?e:n<t?t:n,at={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},lt={...at,transform:t=>ot(0,1,t)},ut={...at,default:1},ct=t=>({test:e=>"string"==typeof e&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),ht=ct("deg"),dt=ct("%"),pt=ct("px"),mt=ct("vh"),ft=ct("vw"),vt={...dt,parse:t=>dt.parse(t)/100,transform:t=>dt.transform(100*t)},yt=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),gt=t=>t===at||t===pt,wt=(t,e)=>parseFloat(t.split(", ")[e]),bt=(t,e)=>(n,{transform:s})=>{if("none"===s||!s)return 0;const i=s.match(/^matrix3d\((.+)\)$/u);if(i)return wt(i[1],e);{const e=s.match(/^matrix\((.+)\)$/u);return e?wt(e[1],t):0}},xt=new Set(["x","y","z"]),St=b.filter((t=>!xt.has(t))),Tt={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:bt(4,13),y:bt(5,14)};Tt.translateX=Tt.x,Tt.translateY=Tt.y;const At=t=>e=>e.test(t),Ct=[at,pt,dt,ht,ft,mt,{test:t=>"auto"===t,parse:t=>t}],Vt=t=>Ct.find(At(t)),Mt=new Set;let Pt=!1,kt=!1;function Et(){if(kt){const t=Array.from(Mt).filter((t=>t.needsMeasurement)),e=new Set(t.map((t=>t.element))),n=new Map;e.forEach((t=>{const e=function(t){const e=[];return St.forEach((n=>{const s=t.getValue(n);void 0!==s&&(e.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))})),e}(t);e.length&&(n.set(t,e),t.render())})),t.forEach((t=>t.measureInitialState())),e.forEach((t=>{t.render();const e=n.get(t);e&&e.forEach((([e,n])=>{var s;null===(s=t.getValue(e))||void 0===s||s.set(n)}))})),t.forEach((t=>t.measureEndState())),t.forEach((t=>{void 0!==t.suspendedScrollY&&window.scrollTo(0,t.suspendedScrollY)}))}kt=!1,Pt=!1,Mt.forEach((t=>t.complete())),Mt.clear()}function Ft(){Mt.forEach((t=>{t.readKeyframes(),t.needsMeasurement&&(kt=!0)}))}class Ot{constructor(t,e,n,s,i,r=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=e,this.name=n,this.motionValue=s,this.element=i,this.isAsync=r}scheduleResolve(){this.isScheduled=!0,this.isAsync?(Mt.add(this),Pt||(Pt=!0,D.read(Ft),D.resolveKeyframes(Et))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:e,element:n,motionValue:s}=this;for(let i=0;i<t.length;i++)if(null===t[i])if(0===i){const i=null==s?void 0:s.get(),r=t[t.length-1];if(void 0!==i)t[0]=i;else if(n&&e){const s=n.readValue(e,r);null!=s&&(t[0]=s)}void 0===t[0]&&(t[0]=r),s&&void 0===i&&s.set(t[0])}else t[i]=t[i-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),Mt.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,Mt.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const It=t=>Math.round(1e5*t)/1e5,Rt=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,jt=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Dt=(t,e)=>n=>Boolean("string"==typeof n&&jt.test(n)&&n.startsWith(t)||e&&!(null==n)&&Object.prototype.hasOwnProperty.call(n,e)),Bt=(t,e,n)=>s=>{if("string"!=typeof s)return s;const[i,r,o,a]=s.match(Rt);return{[t]:parseFloat(i),[e]:parseFloat(r),[n]:parseFloat(o),alpha:void 0!==a?parseFloat(a):1}},Nt={...at,transform:t=>Math.round(ot(0,255,t))},Lt={test:Dt("rgb","red"),parse:Bt("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+Nt.transform(t)+", "+Nt.transform(e)+", "+Nt.transform(n)+", "+It(lt.transform(s))+")"},$t={test:Dt("#"),parse:function(t){let e="",n="",s="",i="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),s=t.substring(5,7),i=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),s=t.substring(3,4),i=t.substring(4,5),e+=e,n+=n,s+=s,i+=i),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:i?parseInt(i,16)/255:1}},transform:Lt.transform},Kt={test:Dt("hsl","hue"),parse:Bt("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+dt.transform(It(e))+", "+dt.transform(It(n))+", "+It(lt.transform(s))+")"},Wt={test:t=>Lt.test(t)||$t.test(t)||Kt.test(t),parse:t=>Lt.test(t)?Lt.parse(t):Kt.test(t)?Kt.parse(t):$t.parse(t),transform:t=>"string"==typeof t?t:t.hasOwnProperty("red")?Lt.transform(t):Kt.transform(t)},qt=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,Ut="number",Yt="color",zt=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Ht(t){const e=t.toString(),n=[],s={color:[],number:[],var:[]},i=[];let r=0;const o=e.replace(zt,(t=>(Wt.test(t)?(s.color.push(r),i.push(Yt),n.push(Wt.parse(t))):t.startsWith("var(")?(s.var.push(r),i.push("var"),n.push(t)):(s.number.push(r),i.push(Ut),n.push(parseFloat(t))),++r,"${}"))).split("${}");return{values:n,split:o,indexes:s,types:i}}function Xt(t){return Ht(t).values}function _t(t){const{split:e,types:n}=Ht(t),s=e.length;return t=>{let i="";for(let r=0;r<s;r++)if(i+=e[r],void 0!==t[r]){const e=n[r];i+=e===Ut?It(t[r]):e===Yt?Wt.transform(t[r]):t[r]}return i}}const Gt=t=>"number"==typeof t?0:t,Zt={test:function(t){var e,n;return isNaN(t)&&"string"==typeof t&&((null===(e=t.match(Rt))||void 0===e?void 0:e.length)||0)+((null===(n=t.match(qt))||void 0===n?void 0:n.length)||0)>0},parse:Xt,createTransformer:_t,getAnimatableNone:function(t){const e=Xt(t);return _t(t)(e.map(Gt))}},Jt=new Set(["brightness","contrast","saturate","opacity"]);function Qt(t){const[e,n]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[s]=n.match(Rt)||[];if(!s)return t;const i=n.replace(s,"");let r=Jt.has(e)?1:0;return s!==n&&(r*=100),e+"("+r+i+")"}const te=/\b([a-z-]*)\(.*?\)/gu,ee={...Zt,getAnimatableNone:t=>{const e=t.match(te);return e?e.map(Qt).join(" "):t}},ne={borderWidth:pt,borderTopWidth:pt,borderRightWidth:pt,borderBottomWidth:pt,borderLeftWidth:pt,borderRadius:pt,radius:pt,borderTopLeftRadius:pt,borderTopRightRadius:pt,borderBottomRightRadius:pt,borderBottomLeftRadius:pt,width:pt,maxWidth:pt,height:pt,maxHeight:pt,top:pt,right:pt,bottom:pt,left:pt,padding:pt,paddingTop:pt,paddingRight:pt,paddingBottom:pt,paddingLeft:pt,margin:pt,marginTop:pt,marginRight:pt,marginBottom:pt,marginLeft:pt,backgroundPositionX:pt,backgroundPositionY:pt},se={rotate:ht,rotateX:ht,rotateY:ht,rotateZ:ht,scale:ut,scaleX:ut,scaleY:ut,scaleZ:ut,skew:ht,skewX:ht,skewY:ht,distance:pt,translateX:pt,translateY:pt,translateZ:pt,x:pt,y:pt,z:pt,perspective:pt,transformPerspective:pt,opacity:lt,originX:vt,originY:vt,originZ:pt},ie={...at,transform:Math.round},re={...ne,...se,zIndex:ie,size:pt,fillOpacity:lt,strokeOpacity:lt,numOctaves:ie},oe={...re,color:Wt,backgroundColor:Wt,outlineColor:Wt,fill:Wt,stroke:Wt,borderColor:Wt,borderTopColor:Wt,borderRightColor:Wt,borderBottomColor:Wt,borderLeftColor:Wt,filter:ee,WebkitFilter:ee},ae=t=>oe[t];function le(t,e){let n=ae(t);return n!==ee&&(n=Zt),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const ue=new Set(["auto","none","0"]);class ce extends Ot{constructor(t,e,n,s,i){super(t,e,n,s,i,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:e,name:n}=this;if(!e||!e.current)return;super.readKeyframes();for(let a=0;a<t.length;a++){let n=t[a];if("string"==typeof n&&(n=n.trim(),nt(n))){const s=rt(n,e.current);void 0!==s&&(t[a]=s),a===t.length-1&&(this.finalKeyframe=n)}}if(this.resolveNoneKeyframes(),!yt.has(n)||2!==t.length)return;const[s,i]=t,r=Vt(s),o=Vt(i);if(r!==o)if(gt(r)&>(o))for(let a=0;a<t.length;a++){const e=t[a];"string"==typeof e&&(t[a]=parseFloat(e))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:e}=this,n=[];for(let i=0;i<t.length;i++)("number"==typeof(s=t[i])?0===s:null===s||"none"===s||"0"===s||Z(s))&&n.push(i);var s;n.length&&function(t,e,n){let s,i=0;for(;i<t.length&&!s;){const e=t[i];"string"==typeof e&&!ue.has(e)&&Ht(e).values.length&&(s=t[i]),i++}if(s&&n)for(const r of e)t[r]=le(n,s)}(t,n,e)}measureInitialState(){const{element:t,unresolvedKeyframes:e,name:n}=this;if(!t||!t.current)return;"height"===n&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Tt[n](t.measureViewportBox(),window.getComputedStyle(t.current)),e[0]=this.measuredOrigin;const s=e[e.length-1];void 0!==s&&t.getValue(n,s).jump(s,!1)}measureEndState(){var t;const{element:e,name:n,unresolvedKeyframes:s}=this;if(!e||!e.current)return;const i=e.getValue(n);i&&i.jump(this.measuredOrigin,!1);const r=s.length-1,o=s[r];s[r]=Tt[n](e.measureViewportBox(),window.getComputedStyle(e.current)),null!==o&&void 0===this.finalKeyframe&&(this.finalKeyframe=o),(null===(t=this.removedTransforms)||void 0===t?void 0:t.length)&&this.removedTransforms.forEach((([t,n])=>{e.getValue(t).set(n)})),this.resolveNoneKeyframes()}}function he(t){return"function"==typeof t}let de;function pe(){de=void 0}const me={now:()=>(void 0===de&&me.set(N.isProcessing?N.timestamp:performance.now()),de),set:t=>{de=t,queueMicrotask(pe)}},fe=(t,e)=>!("zIndex"===e||"number"!=typeof t&&!Array.isArray(t)&&("string"!=typeof t||!Zt.test(t)&&"0"!==t||t.startsWith("url(")));class ve{constructor({autoplay:t=!0,delay:e=0,type:n="keyframes",repeat:s=0,repeatDelay:i=0,repeatType:r="loop",...o}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=me.now(),this.options={autoplay:t,delay:e,type:n,repeat:s,repeatDelay:i,repeatType:r,...o},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt}get resolved(){return this._resolved||this.hasAttemptedResolve||(Ft(),Et()),this._resolved}onKeyframesResolved(t,e){this.resolvedAt=me.now(),this.hasAttemptedResolve=!0;const{name:n,type:s,velocity:i,delay:r,onComplete:o,onUpdate:a,isGenerator:l}=this.options;if(!l&&!function(t,e,n,s){const i=t[0];if(null===i)return!1;if("display"===e||"visibility"===e)return!0;const r=t[t.length-1],o=fe(i,e),a=fe(r,e);return O(o===a,`You are trying to animate ${e} from "${i}" to "${r}". ${i} is not an animatable value - to enable this animation set ${i} to a value animatable to ${r} via the \`style\` property.`),!(!o||!a)&&(function(t){const e=t[0];if(1===t.length)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}(t)||("spring"===n||he(n))&&s)}(t,n,s,i)){if(!r)return null==a||a(E(t,this.options,e)),null==o||o(),void this.resolveFinishedPromise();this.options.duration=0}const u=this.initPlayback(t,e);!1!==u&&(this._resolved={keyframes:t,finalKeyframe:e,...u},this.onPostResolved())}onPostResolved(){}then(t,e){return this.currentFinishedPromise.then(t,e)}flatten(){this.options.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise((t=>{this.resolveFinishedPromise=t}))}}const ye=(t,e,n)=>{const s=e-t;return 0===s?1:(n-t)/s},ge=(t,e,n=10)=>{let s="";const i=Math.max(Math.round(e/n),2);for(let r=0;r<i;r++)s+=t(ye(0,i-1,r))+", ";return`linear(${s.substring(0,s.length-2)})`};function we(t,e){return e?t*(1e3/e):0}function be(t,e,n){const s=Math.max(e-5,0);return we(n-t(s),e-s)}const xe=.01,Se=2,Te=.005,Ae=.5;const Ce=12;function Ve(t,e){return t*Math.sqrt(1-e*e)}const Me=2e4;function Pe(t){let e=0,n=t.next(e);for(;!n.done&&e<Me;)e+=50,n=t.next(e);return e>=Me?1/0:e}const ke=["duration","bounce"],Ee=["stiffness","damping","mass"];function Fe(t,e){return e.some((e=>void 0!==t[e]))}function Oe(t=.3,e=.3){const n="object"!=typeof t?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:s,restDelta:i}=n;const r=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],a={done:!1,value:r},{stiffness:l,damping:u,mass:c,duration:h,velocity:d,isResolvedFromDuration:p}=function(t){let e={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...t};if(!Fe(t,Ee)&&Fe(t,ke))if(t.visualDuration){const n=t.visualDuration,s=2*Math.PI/(1.2*n),i=s*s,r=2*ot(.05,1,1-t.bounce)*Math.sqrt(i);e={...e,mass:1,stiffness:i,damping:r}}else{const n=function({duration:t=800,bounce:e=.3,velocity:n=0,mass:s=1}){let i,r;O(t<=S(10),"Spring duration must be 10 seconds or less");let o=1-e;o=ot(.05,1,o),t=ot(.01,10,T(t)),o<1?(i=e=>{const s=e*o,i=s*t;return.001-(s-n)/Ve(e,o)*Math.exp(-i)},r=e=>{const s=e*o*t,r=s*n+n,a=Math.pow(o,2)*Math.pow(e,2)*t,l=Math.exp(-s),u=Ve(Math.pow(e,2),o);return(.001-i(e)>0?-1:1)*((r-a)*l)/u}):(i=e=>Math.exp(-e*t)*((e-n)*t+1)-.001,r=e=>Math.exp(-e*t)*(t*t*(n-e)));const a=function(t,e,n){let s=n;for(let i=1;i<Ce;i++)s-=t(s)/e(s);return s}(i,r,5/t);if(t=S(t),isNaN(a))return{stiffness:100,damping:10,duration:t};{const e=Math.pow(a,2)*s;return{stiffness:e,damping:2*o*Math.sqrt(s*e),duration:t}}}(t);e={...e,...n,mass:1},e.isResolvedFromDuration=!0}return e}({...n,velocity:-T(n.velocity||0)}),m=d||0,f=u/(2*Math.sqrt(l*c)),v=o-r,y=T(Math.sqrt(l/c)),g=Math.abs(v)<5;let w;if(s||(s=g?xe:Se),i||(i=g?Te:Ae),f<1){const t=Ve(y,f);w=e=>{const n=Math.exp(-f*y*e);return o-n*((m+f*y*v)/t*Math.sin(t*e)+v*Math.cos(t*e))}}else if(1===f)w=t=>o-Math.exp(-y*t)*(v+(m+y*v)*t);else{const t=y*Math.sqrt(f*f-1);w=e=>{const n=Math.exp(-f*y*e),s=Math.min(t*e,300);return o-n*((m+f*y*v)*Math.sinh(s)+t*v*Math.cosh(s))/t}}const b={calculatedDuration:p&&h||null,next:t=>{const e=w(t);if(p)a.done=t>=h;else{let n=0;f<1&&(n=0===t?S(m):be(w,t,e));const r=Math.abs(n)<=s,l=Math.abs(o-e)<=i;a.done=r&&l}return a.value=a.done?o:e,a},toString:()=>{const t=Math.min(Pe(b),Me),e=ge((e=>b.next(t*e).value),t,30);return t+"ms "+e}};return b}function Ie({keyframes:t,velocity:e=0,power:n=.8,timeConstant:s=325,bounceDamping:i=10,bounceStiffness:r=500,modifyTarget:o,min:a,max:l,restDelta:u=.5,restSpeed:c}){const h=t[0],d={done:!1,value:h},p=t=>void 0===a?l:void 0===l||Math.abs(a-t)<Math.abs(l-t)?a:l;let m=n*e;const f=h+m,v=void 0===o?f:o(f);v!==f&&(m=v-h);const y=t=>-m*Math.exp(-t/s),g=t=>v+y(t),w=t=>{const e=y(t),n=g(t);d.done=Math.abs(e)<=u,d.value=d.done?v:n};let b,x;const S=t=>{var e;e=d.value,(void 0!==a&&e<a||void 0!==l&&e>l)&&(b=t,x=Oe({keyframes:[d.value,p(d.value)],velocity:be(g,t,d.value),damping:i,stiffness:r,restDelta:u,restSpeed:c}))};return S(0),{calculatedDuration:null,next:t=>{let e=!1;return x||void 0!==b||(e=!0,w(t),S(t)),void 0!==b&&t>=b?x.next(t-b):(!e&&w(t),d)}}}const Re=K(.42,0,1,1),je=K(0,0,.58,1),De=K(.42,0,.58,1),Be=t=>Array.isArray(t)&&"number"==typeof t[0],Ne={linear:F,easeIn:Re,easeInOut:De,easeOut:je,circIn:X,circInOut:G,circOut:_,backIn:Y,backInOut:z,backOut:U,anticipate:H},Le=t=>{if(Be(t)){I(4===t.length,"Cubic bezier arrays must contain four numerical values.");const[e,n,s,i]=t;return K(e,n,s,i)}return"string"==typeof t?(I(void 0!==Ne[t],`Invalid easing type '${t}'`),Ne[t]):t},$e=(t,e)=>n=>e(t(n)),Ke=(...t)=>t.reduce($e),We=(t,e,n)=>t+(e-t)*n;function qe(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function Ue(t,e){return n=>n>0?e:t}const Ye=(t,e,n)=>{const s=t*t,i=n*(e*e-s)+s;return i<0?0:Math.sqrt(i)},ze=[$t,Lt,Kt];function He(t){const e=(n=t,ze.find((t=>t.test(n))));var n;if(O(Boolean(e),`'${t}' is not an animatable color. Use the equivalent color code instead.`),!Boolean(e))return!1;let s=e.parse(t);return e===Kt&&(s=function({hue:t,saturation:e,lightness:n,alpha:s}){t/=360,n/=100;let i=0,r=0,o=0;if(e/=100){const s=n<.5?n*(1+e):n+e-n*e,a=2*n-s;i=qe(a,s,t+1/3),r=qe(a,s,t),o=qe(a,s,t-1/3)}else i=r=o=n;return{red:Math.round(255*i),green:Math.round(255*r),blue:Math.round(255*o),alpha:s}}(s)),s}const Xe=(t,e)=>{const n=He(t),s=He(e);if(!n||!s)return Ue(t,e);const i={...n};return t=>(i.red=Ye(n.red,s.red,t),i.green=Ye(n.green,s.green,t),i.blue=Ye(n.blue,s.blue,t),i.alpha=We(n.alpha,s.alpha,t),Lt.transform(i))},_e=new Set(["none","hidden"]);function Ge(t,e){return n=>We(t,e,n)}function Ze(t){return"number"==typeof t?Ge:"string"==typeof t?nt(t)?Ue:Wt.test(t)?Xe:tn:Array.isArray(t)?Je:"object"==typeof t?Wt.test(t)?Xe:Qe:Ue}function Je(t,e){const n=[...t],s=n.length,i=t.map(((t,n)=>Ze(t)(t,e[n])));return t=>{for(let e=0;e<s;e++)n[e]=i[e](t);return n}}function Qe(t,e){const n={...t,...e},s={};for(const i in n)void 0!==t[i]&&void 0!==e[i]&&(s[i]=Ze(t[i])(t[i],e[i]));return t=>{for(const e in s)n[e]=s[e](t);return n}}const tn=(t,e)=>{const n=Zt.createTransformer(e),s=Ht(t),i=Ht(e);return s.indexes.var.length===i.indexes.var.length&&s.indexes.color.length===i.indexes.color.length&&s.indexes.number.length>=i.indexes.number.length?_e.has(t)&&!i.values.length||_e.has(e)&&!s.values.length?(r=t,o=e,_e.has(r)?t=>t<=0?r:o:t=>t>=1?o:r):Ke(Je(function(t,e){var n;const s=[],i={color:0,var:0,number:0};for(let r=0;r<e.values.length;r++){const o=e.types[r],a=t.indexes[o][i[o]],l=null!==(n=t.values[a])&&void 0!==n?n:0;s[r]=l,i[o]++}return s}(s,i),i.values),n):(O(!0,`Complex values '${t}' and '${e}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),Ue(t,e));var r,o};function en(t,e,n){return"number"==typeof t&&"number"==typeof e&&"number"==typeof n?We(t,e,n):Ze(t)(t,e)}function nn({duration:t=300,keyframes:e,times:n,ease:s="easeInOut"}){const i=(l=s,Array.isArray(l)&&"number"!=typeof l[0]?s.map(Le):Le(s)),r={done:!1,value:e[0]},o=function(t,e){return t.map((t=>t*e))}(n&&n.length===e.length?n:function(t){const e=[0];return function(t,e){const n=t[t.length-1];for(let s=1;s<=e;s++){const i=ye(0,e,s);t.push(We(n,1,i))}}(e,t.length-1),e}(e),t),a=function(t,e,{clamp:n=!0,ease:s,mixer:i}={}){const r=t.length;if(I(r===e.length,"Both input and output ranges must be the same length"),1===r)return()=>e[0];if(2===r&&t[0]===t[1])return()=>e[1];t[0]>t[r-1]&&(t=[...t].reverse(),e=[...e].reverse());const o=function(t,e,n){const s=[],i=n||en,r=t.length-1;for(let o=0;o<r;o++){let n=i(t[o],t[o+1]);if(e){const t=Array.isArray(e)?e[o]||F:e;n=Ke(t,n)}s.push(n)}return s}(e,s,i),a=o.length,l=e=>{let n=0;if(a>1)for(;n<t.length-2&&!(e<t[n+1]);n++);const s=ye(t[n],t[n+1],e);return o[n](s)};return n?e=>l(ot(t[0],t[r-1],e)):l}(o,e,{ease:Array.isArray(i)?i:(u=e,c=i,u.map((()=>c||De)).splice(0,u.length-1))});var l,u,c;return{calculatedDuration:t,next:e=>(r.value=a(e),r.done=e>=t,r)}}const sn=t=>{const e=({timestamp:e})=>t(e);return{start:()=>D.update(e,!0),stop:()=>B(e),now:()=>N.isProcessing?N.timestamp:me.now()}},rn={decay:Ie,inertia:Ie,tween:nn,keyframes:nn,spring:Oe},on=t=>t/100;class an extends ve{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,"idle"===this.state)return;this.teardown();const{onStop:t}=this.options;t&&t()};const{name:e,motionValue:n,element:s,keyframes:i}=this.options,r=(null==s?void 0:s.KeyframeResolver)||Ot;this.resolver=new r(i,((t,e)=>this.onKeyframesResolved(t,e)),e,n,s),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(t){const{type:e="keyframes",repeat:n=0,repeatDelay:s=0,repeatType:i,velocity:r=0}=this.options,o=he(e)?e:rn[e]||nn;let a,l;o!==nn&&"number"!=typeof t[0]&&("production"!==process.env.NODE_ENV&&I(2===t.length,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${t}`),a=Ke(on,en(t[0],t[1])),t=[0,100]);const u=o({...this.options,keyframes:t});"mirror"===i&&(l=o({...this.options,keyframes:[...t].reverse(),velocity:-r})),null===u.calculatedDuration&&(u.calculatedDuration=Pe(u));const{calculatedDuration:c}=u,h=c+s;return{generator:u,mirroredGenerator:l,mapPercentToKeyframes:a,calculatedDuration:c,resolvedDuration:h,totalDuration:h*(n+1)-s}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),"paused"!==this.pendingPlayState&&t?this.state=this.pendingPlayState:this.pause()}tick(t,e=!1){const{resolved:n}=this;if(!n){const{keyframes:t}=this.options;return{done:!0,value:t[t.length-1]}}const{finalKeyframe:s,generator:i,mirroredGenerator:r,mapPercentToKeyframes:o,keyframes:a,calculatedDuration:l,totalDuration:u,resolvedDuration:c}=n;if(null===this.startTime)return i.next(0);const{delay:h,repeat:d,repeatType:p,repeatDelay:m,onUpdate:f}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-u/this.speed,this.startTime)),e?this.currentTime=t:null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const v=this.currentTime-h*(this.speed>=0?1:-1),y=this.speed>=0?v<0:v>u;this.currentTime=Math.max(v,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=u);let g=this.currentTime,w=i;if(d){const t=Math.min(this.currentTime,u)/c;let e=Math.floor(t),n=t%1;!n&&t>=1&&(n=1),1===n&&e--,e=Math.min(e,d+1),Boolean(e%2)&&("reverse"===p?(n=1-n,m&&(n-=m/c)):"mirror"===p&&(w=r)),g=ot(0,1,n)*c}const b=y?{done:!1,value:a[0]}:w.next(g);o&&(b.value=o(b.value));let{done:x}=b;y||null===l||(x=this.speed>=0?this.currentTime>=u:this.currentTime<=0);const S=null===this.holdTime&&("finished"===this.state||"running"===this.state&&x);return S&&void 0!==s&&(b.value=E(a,this.options,s)),f&&f(b.value),S&&this.finish(),b}get duration(){const{resolved:t}=this;return t?T(t.calculatedDuration):0}get time(){return T(this.currentTime)}set time(t){t=S(t),this.currentTime=t,null!==this.holdTime||0===this.speed?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const e=this.playbackSpeed!==t;this.playbackSpeed=t,e&&(this.time=T(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved)return void(this.pendingPlayState="running");if(this.isStopped)return;const{driver:t=sn,onPlay:e,startTime:n}=this.options;this.driver||(this.driver=t((t=>this.tick(t)))),e&&e();const s=this.driver.now();null!==this.holdTime?this.startTime=s-this.holdTime:this.startTime?"finished"===this.state&&(this.startTime=s):this.startTime=null!=n?n:this.calcStartTime(),"finished"===this.state&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;this._resolved?(this.state="paused",this.holdTime=null!==(t=this.currentTime)&&void 0!==t?t:0):this.pendingPlayState="paused"}complete(){"running"!==this.state&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){null!==this.cancelTime&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}const ln=new Set(["opacity","clipPath","filter","transform"]);function un(t){let e;return()=>(void 0===e&&(e=t()),e)}const cn={linearEasing:void 0};const hn=function(t,e){const n=un(t);return()=>{var t;return null!==(t=cn[e])&&void 0!==t?t:n()}}((()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(Ti){return!1}return!0}),"linearEasing");function dn(t){return Boolean("function"==typeof t&&hn()||!t||"string"==typeof t&&(t in mn||hn())||Be(t)||Array.isArray(t)&&t.every(dn))}const pn=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,mn={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:pn([0,.65,.55,1]),circOut:pn([.55,0,1,.45]),backIn:pn([.31,.01,.66,-.59]),backOut:pn([.33,1.53,.69,.99])};function fn(t,e){return t?"function"==typeof t&&hn()?ge(t,e):Be(t)?pn(t):Array.isArray(t)?t.map((t=>fn(t,e)||mn.easeOut)):mn[t]:void 0}function vn(t,e,n,{delay:s=0,duration:i=300,repeat:r=0,repeatType:o="loop",ease:a="easeInOut",times:l}={}){const u={[e]:n};l&&(u.offset=l);const c=fn(a,i);return Array.isArray(c)&&(u.easing=c),t.animate(u,{delay:s,duration:i,easing:Array.isArray(c)?"linear":c,fill:"both",iterations:r+1,direction:"reverse"===o?"alternate":"normal"})}function yn(t,e){t.timeline=e,t.onfinish=null}const gn=un((()=>Object.hasOwnProperty.call(Element.prototype,"animate"))),wn={anticipate:H,backInOut:z,circInOut:G};class bn extends ve{constructor(t){super(t);const{name:e,motionValue:n,element:s,keyframes:i}=this.options;this.resolver=new ce(i,((t,e)=>this.onKeyframesResolved(t,e)),e,n,s),this.resolver.scheduleResolve()}initPlayback(t,e){var n;let{duration:s=300,times:i,ease:r,type:o,motionValue:a,name:l,startTime:u}=this.options;if(!(null===(n=a.owner)||void 0===n?void 0:n.current))return!1;var c;if("string"==typeof r&&hn()&&r in wn&&(r=wn[r]),he((c=this.options).type)||"spring"===c.type||!dn(c.ease)){const{onComplete:e,onUpdate:n,motionValue:a,element:l,...u}=this.options,c=function(t,e){const n=new an({...e,keyframes:t,repeat:0,delay:0,isGenerator:!0});let s={done:!1,value:t[0]};const i=[];let r=0;for(;!s.done&&r<2e4;)s=n.sample(r),i.push(s.value),r+=10;return{times:void 0,keyframes:i,duration:r-10,ease:"linear"}}(t,u);1===(t=c.keyframes).length&&(t[1]=t[0]),s=c.duration,i=c.times,r=c.ease,o="keyframes"}const h=vn(a.owner.current,l,t,{...this.options,duration:s,times:i,ease:r});return h.startTime=null!=u?u:this.calcStartTime(),this.pendingTimeline?(yn(h,this.pendingTimeline),this.pendingTimeline=void 0):h.onfinish=()=>{const{onComplete:n}=this.options;a.set(E(t,this.options,e)),n&&n(),this.cancel(),this.resolveFinishedPromise()},{animation:h,duration:s,times:i,type:o,ease:r,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:e}=t;return T(e)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:e}=t;return T(e.currentTime||0)}set time(t){const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.currentTime=S(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:e}=t;return e.playbackRate}set speed(t){const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:e}=t;return e.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:e}=t;return e.startTime}attachTimeline(t){if(this._resolved){const{resolved:e}=this;if(!e)return F;const{animation:n}=e;yn(n,t)}else this.pendingTimeline=t;return F}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:e}=t;"finished"===e.playState&&this.updateFinishedPromise(),e.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:e}=t;e.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,"idle"===this.state)return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:e,keyframes:n,duration:s,type:i,ease:r,times:o}=t;if("idle"===e.playState||"finished"===e.playState)return;if(this.time){const{motionValue:t,onUpdate:e,onComplete:a,element:l,...u}=this.options,c=new an({...u,keyframes:n,duration:s,type:i,ease:r,times:o,isGenerator:!0}),h=S(this.time);t.setWithVelocity(c.sample(h-10).value,c.sample(h).value,10)}const{onStop:a}=this.options;a&&a(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:e,name:n,repeatDelay:s,repeatType:i,damping:r,type:o}=t;return gn()&&n&&ln.has(n)&&e&&e.owner&&e.owner.current instanceof HTMLElement&&!e.owner.getProps().onUpdate&&!s&&"mirror"!==i&&0!==r&&"inertia"!==o}}const xn=un((()=>void 0!==window.ScrollTimeline));class Sn{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}then(t,e){return Promise.all(this.animations).then(t).catch(e)}getAll(t){return this.animations[0][t]}setAll(t,e){for(let n=0;n<this.animations.length;n++)this.animations[n][t]=e}attachTimeline(t,e){const n=this.animations.map((n=>xn()&&n.attachTimeline?n.attachTimeline(t):e(n)));return()=>{n.forEach(((t,e)=>{t&&t(),this.animations[e].stop()}))}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let e=0;e<this.animations.length;e++)t=Math.max(t,this.animations[e].duration);return t}runAll(t){this.animations.forEach((e=>e[t]()))}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}const Tn=(t,e,n,s={},i,r)=>o=>{const a=P(s,t)||{},l=a.delay||s.delay||0;let{elapsed:u=0}=s;u-=S(l);let c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-u,onUpdate:t=>{e.set(t),a.onUpdate&&a.onUpdate(t)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:r?void 0:i};(function({when:t,delay:e,delayChildren:n,staggerChildren:s,staggerDirection:i,repeat:r,repeatType:o,repeatDelay:a,from:l,elapsed:u,...c}){return!!Object.keys(c).length})(a)||(c={...c,...M(t,c)}),c.duration&&(c.duration=S(c.duration)),c.repeatDelay&&(c.repeatDelay=S(c.repeatDelay)),void 0!==c.from&&(c.keyframes[0]=c.from);let h=!1;if((!1===c.type||0===c.duration&&!c.repeatDelay)&&(c.duration=0,0===c.delay&&(h=!0)),h&&!r&&void 0!==e.get()){const t=E(c.keyframes,a);if(void 0!==t)return D.update((()=>{c.onUpdate(t),c.onComplete()})),new Sn([])}return!r&&bn.supports(c)?new bn(c):new an(c)};class An{constructor(){this.subscriptions=[]}add(t){var e,n;return e=this.subscriptions,n=t,-1===e.indexOf(n)&&e.push(n),()=>function(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}(this.subscriptions,t)}notify(t,e,n){const s=this.subscriptions.length;if(s)if(1===s)this.subscriptions[0](t,e,n);else for(let i=0;i<s;i++){const s=this.subscriptions[i];s&&s(t,e,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}class Cn{constructor(t,e={}){this.version="11.15.0",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(t,e=!0)=>{const n=me.now();this.updatedAt!==n&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(t),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),e&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=e.owner}setCurrent(t){var e;this.current=t,this.updatedAt=me.now(),null===this.canTrackVelocity&&void 0!==t&&(this.canTrackVelocity=(e=this.current,!isNaN(parseFloat(e))))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return"production"!==process.env.NODE_ENV&&c(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,e){this.events[t]||(this.events[t]=new An);const n=this.events[t].add(e);return"change"===t?()=>{n(),D.read((()=>{this.events.change.getSize()||this.stop()}))}:n}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,e){this.passiveEffect=t,this.stopPassiveEffect=e}set(t,e=!0){e&&this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t,e)}setWithVelocity(t,e,n){this.set(e),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-n}jump(t,e=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,e&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=me.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||t-this.updatedAt>30)return 0;const e=Math.min(this.updatedAt-this.prevUpdatedAt,30);return we(parseFloat(this.current)-parseFloat(this.prevFrameValue),e)}start(t){return this.stop(),new Promise((e=>{this.hasAnimated=!0,this.animation=t(e),this.events.animationStart&&this.events.animationStart.notify()})).then((()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()}))}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Vn(t,e){return new Cn(t,e)}function Mn(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,Vn(n))}const Pn=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),kn="data-"+Pn("framerAppearId");function En(t){return t.props[kn]}const Fn=t=>Boolean(t&&t.getVelocity);function On(t,e){const n=t.getValue("willChange");if(s=n,Boolean(Fn(s)&&s.add))return n.add(e);var s}function In({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&!0!==e[n];return e[n]=!1,s}function Rn(t,e,{delay:n=0,transitionOverride:s,type:i}={}){var r;let{transition:o=t.getDefaultTransition(),transitionEnd:a,...l}=e;s&&(o=s);const u=[],c=i&&t.animationState&&t.animationState.getState()[i];for(const h in l){const e=t.getValue(h,null!==(r=t.latestValues[h])&&void 0!==r?r:null),s=l[h];if(void 0===s||c&&In(c,h))continue;const i={delay:n,...P(o||{},h)};let a=!1;if(window.MotionHandoffAnimation){const e=En(t);if(e){const t=window.MotionHandoffAnimation(e,h,D);null!==t&&(i.startTime=t,a=!0)}}On(t,h),e.start(Tn(h,e,s,t.shouldReduceMotion&&x.has(h)?{type:!1}:i,t,a));const d=e.animation;d&&u.push(d)}return a&&Promise.all(u).then((()=>{D.update((()=>{a&&function(t,e){const n=y(t,e);let{transitionEnd:s={},transition:i={},...r}=n||{};r={...r,...s};for(const a in r)Mn(t,a,(o=r[a],d(o)?o[o.length-1]||0:o));var o}(t,a)}))})),u}function jn(t,e,n={}){var s;const i=y(t,e,"exit"===n.type?null===(s=t.presenceContext)||void 0===s?void 0:s.custom:void 0);let{transition:r=t.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(r=n.transitionOverride);const o=i?()=>Promise.all(Rn(t,i,n)):()=>Promise.resolve(),a=t.variantChildren&&t.variantChildren.size?(s=0)=>{const{delayChildren:i=0,staggerChildren:o,staggerDirection:a}=r;return function(t,e,n=0,s=0,i=1,r){const o=[],a=(t.variantChildren.size-1)*s,l=1===i?(t=0)=>t*s:(t=0)=>a-t*s;return Array.from(t.variantChildren).sort(Dn).forEach(((t,s)=>{t.notify("AnimationStart",e),o.push(jn(t,e,{...r,delay:n+l(s)}).then((()=>t.notify("AnimationComplete",e))))})),Promise.all(o)}(t,e,i+s,o,a,n)}:()=>Promise.resolve(),{when:l}=r;if(l){const[t,e]="beforeChildren"===l?[o,a]:[a,o];return t().then((()=>e()))}return Promise.all([o(),a(n.delay)])}function Dn(t,e){return t.sortNodePosition(e)}const Bn=w.length;function Nn(t){if(!t)return;if(!t.isControllingVariants){const e=t.parent&&Nn(t.parent)||{};return void 0!==t.props.initial&&(e.initial=t.props.initial),e}const e={};for(let n=0;n<Bn;n++){const s=w[n],i=t.props[s];(m(i)||!1===i)&&(e[s]=i)}return e}const Ln=[...g].reverse(),$n=g.length;function Kn(t){let e=function(t){return e=>Promise.all(e.map((({animation:e,options:n})=>function(t,e,n={}){let s;if(t.notify("AnimationStart",e),Array.isArray(e)){const i=e.map((e=>jn(t,e,n)));s=Promise.all(i)}else if("string"==typeof e)s=jn(t,e,n);else{const i="function"==typeof e?y(t,e,n.custom):e;s=Promise.all(Rn(t,i,n))}return s.then((()=>{t.notify("AnimationComplete",e)}))}(t,e,n))))}(t),n=Un(),s=!0;const i=e=>(n,s)=>{var i;const r=y(t,s,"exit"===e?null===(i=t.presenceContext)||void 0===i?void 0:i.custom:void 0);if(r){const{transition:t,transitionEnd:e,...s}=r;n={...n,...s,...e}}return n};function r(r){const{props:o}=t,a=Nn(t.parent)||{},l=[],u=new Set;let c={},f=1/0;for(let e=0;e<$n;e++){const v=Ln[e],y=n[v],g=void 0!==o[v]?o[v]:a[v],w=m(g),b=v===r?y.isActive:null;!1===b&&(f=e);let x=g===a[v]&&g!==o[v]&&w;if(x&&s&&t.manuallyAnimateOnMount&&(x=!1),y.protectedKeys={...c},!y.isActive&&null===b||!g&&!y.prevProp||h(g)||"boolean"==typeof g)continue;const S=Wn(y.prevProp,g);let T=S||v===r&&y.isActive&&!x&&w||e>f&&w,A=!1;const C=Array.isArray(g)?g:[g];let V=C.reduce(i(v),{});!1===b&&(V={});const{prevResolvedValues:M={}}=y,P={...M,...V},k=e=>{T=!0,u.has(e)&&(A=!0,u.delete(e)),y.needsAnimating[e]=!0;const n=t.getValue(e);n&&(n.liveStyle=!1)};for(const t in P){const e=V[t],n=M[t];if(c.hasOwnProperty(t))continue;let s=!1;s=d(e)&&d(n)?!p(e,n):e!==n,s?null!=e?k(t):u.add(t):void 0!==e&&u.has(t)?k(t):y.protectedKeys[t]=!0}y.prevProp=g,y.prevResolvedValues=V,y.isActive&&(c={...c,...V}),s&&t.blockInitialAnimation&&(T=!1),T&&(!x||!S||A)&&l.push(...C.map((t=>({animation:t,options:{type:v}}))))}if(u.size){const e={};u.forEach((n=>{const s=t.getBaseTarget(n),i=t.getValue(n);i&&(i.liveStyle=!0),e[n]=null!=s?s:null})),l.push({animation:e})}let v=Boolean(l.length);return!s||!1!==o.initial&&o.initial!==o.animate||t.manuallyAnimateOnMount||(v=!1),s=!1,v?e(l):Promise.resolve()}return{animateChanges:r,setActive:function(e,s){var i;if(n[e].isActive===s)return Promise.resolve();null===(i=t.variantChildren)||void 0===i||i.forEach((t=>{var n;return null===(n=t.animationState)||void 0===n?void 0:n.setActive(e,s)})),n[e].isActive=s;const o=r(e);for(const t in n)n[t].protectedKeys={};return o},setAnimateFunction:function(n){e=n(t)},getState:()=>n,reset:()=>{n=Un(),s=!0}}}function Wn(t,e){return"string"==typeof e?e!==t:!!Array.isArray(e)&&!p(e,t)}function qn(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Un(){return{animate:qn(!0),whileInView:qn(),whileHover:qn(),whileTap:qn(),whileDrag:qn(),whileFocus:qn(),exit:qn()}}class Yn{constructor(t){this.isMounted=!1,this.node=t}update(){}}let zn=0;const Hn={animation:{Feature:class extends Yn{constructor(t){super(t),t.animationState||(t.animationState=Kn(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();h(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:e}=this.node.prevProps||{};t!==e&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),null===(t=this.unmountControls)||void 0===t||t.call(this)}}},exit:{Feature:class extends Yn{constructor(){super(...arguments),this.id=zn++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:e}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===n)return;const s=this.node.animationState.setActive("exit",!t);e&&!t&&s.then((()=>e(this.id)))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}}};function Xn(t){return{point:{x:t.pageX,y:t.pageY}}}function _n(t,e,n,s={passive:!0}){return t.addEventListener(e,n,s),()=>t.removeEventListener(e,n)}function Gn(t){return t&&"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,"current")}const Zn=()=>({x:{min:0,max:0},y:{min:0,max:0}}),Jn=e.createContext(null),Qn=e.createContext({}),ts=e.createContext({}),es={},{schedule:ns,cancel:ss}=j(queueMicrotask,!1);function is(t){const e=Fn(t)?t.get():t;return n=e,Boolean(n&&"object"==typeof n&&n.mix&&n.toValue)?e.toValue():e;var n}function rs(t,e){const n=function(t){if(t instanceof Element)return[t];if("string"==typeof t){const e=document.querySelectorAll(t);return e?Array.from(e):[]}return Array.from(t)}(t),s=new AbortController;return[n,{passive:!0,...e,signal:s.signal},()=>s.abort()]}function os(t){return e=>{"touch"===e.pointerType||t(e)}}function as(t,e,n){const{props:s}=t;t.animationState&&s.whileHover&&t.animationState.setActive("whileHover","Start"===n);const i=s["onHover"+n];i&&D.postRender((()=>i(e,Xn(e))))}const ls=new WeakSet;function us(t){return e=>{"Enter"===e.key&&t(e)}}function cs(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const hs=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]),ds=(t,e)=>!!e&&(t===e||ds(t,e.parentElement));function ps(t){return("mouse"===(e=t).pointerType?"number"!=typeof e.button||e.button<=0:!1!==e.isPrimary)&&!0;var e}function ms(t,e,n){const{props:s}=t;t.animationState&&s.whileTap&&t.animationState.setActive("whileTap","Start"===n);const i=s["onTap"+("End"===n?"":n)];i&&D.postRender((()=>i(e,Xn(e))))}const fs=new WeakMap,vs=new WeakMap,ys=t=>{const e=fs.get(t.target);e&&e(t)},gs=t=>{t.forEach(ys)};const ws={some:0,all:1},bs={inView:{Feature:class extends Yn{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:e,margin:n,amount:s="some",once:i}=t,r={root:e?e.current:void 0,rootMargin:n,threshold:"number"==typeof s?s:ws[s]};return function(t,e,n){const s=function({root:t,...e}){const n=t||document;vs.has(n)||vs.set(n,{});const s=vs.get(n),i=JSON.stringify(e);return s[i]||(s[i]=new IntersectionObserver(gs,{root:t,...e})),s[i]}(e);return fs.set(t,n),s.observe(t),()=>{fs.delete(t),s.unobserve(t)}}(this.node.current,r,(t=>{const{isIntersecting:e}=t;if(this.isInView===e)return;if(this.isInView=e,i&&!e&&this.hasEnteredView)return;e&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",e);const{onViewportEnter:n,onViewportLeave:s}=this.node.getProps(),r=e?n:s;r&&r(t)}))}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;const{props:t,prevProps:e}=this.node;["amount","margin","root"].some(function({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}(t,e))&&this.startObserver()}unmount(){}}},tap:{Feature:class extends Yn{mount(){const{current:t}=this.node;t&&(this.unmount=function(t,e,n={}){const[s,i,r]=rs(t,n),o=t=>{const s=t.currentTarget;if(!ps(t)||ls.has(s))return;ls.add(s);const r=e(t),o=(t,e)=>{window.removeEventListener("pointerup",a),window.removeEventListener("pointercancel",l),ps(t)&&ls.has(s)&&(ls.delete(s),r&&r(t,{success:e}))},a=t=>{o(t,n.useGlobalTarget||ds(s,t.target))},l=t=>{o(t,!1)};window.addEventListener("pointerup",a,i),window.addEventListener("pointercancel",l,i)};return s.forEach((t=>{var e;e=t,hs.has(e.tagName)||-1!==e.tabIndex||(t.tabIndex=0),(n.useGlobalTarget?window:t).addEventListener("pointerdown",o,i),t.addEventListener("focus",(t=>((t,e)=>{const n=t.currentTarget;if(!n)return;const s=us((()=>{if(ls.has(n))return;cs(n,"down");const t=us((()=>{cs(n,"up")}));n.addEventListener("keyup",t,e),n.addEventListener("blur",(()=>cs(n,"cancel")),e)}));n.addEventListener("keydown",s,e),n.addEventListener("blur",(()=>n.removeEventListener("keydown",s)),e)})(t,i)),i)})),r}(t,(t=>(ms(this.node,t,"Start"),(t,{success:e})=>ms(this.node,t,e?"End":"Cancel"))),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}},focus:{Feature:class extends Yn{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch(Ai){t=!0}t&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Ke(_n(this.node.current,"focus",(()=>this.onFocus())),_n(this.node.current,"blur",(()=>this.onBlur())))}unmount(){}}},hover:{Feature:class extends Yn{mount(){const{current:t}=this.node;t&&(this.unmount=function(t,e,n={}){const[s,i,r]=rs(t,n),o=os((t=>{const{target:n}=t,s=e(t);if(!s||!n)return;const r=os((t=>{s(t),n.removeEventListener("pointerleave",r)}));n.addEventListener("pointerleave",r,i)}));return s.forEach((t=>{t.addEventListener("pointerenter",o,i)})),r}(t,(t=>(as(this.node,t,"Start"),t=>as(this.node,t,"End")))))}unmount(){}}}},xs=e.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"}),Ss=e.createContext({}),Ts="undefined"!=typeof window,As=Ts?e.useLayoutEffect:e.useEffect,Cs=e.createContext({strict:!1});function Vs(t,n,s,i,r){var o,a;const{visualElement:l}=e.useContext(Ss),u=e.useContext(Cs),c=e.useContext(Jn),h=e.useContext(xs).reducedMotion,d=e.useRef(null);i=i||u.renderer,!d.current&&i&&(d.current=i(t,{visualState:n,parent:l,props:s,presenceContext:c,blockInitialAnimation:!!c&&!1===c.initial,reducedMotionConfig:h}));const p=d.current,m=e.useContext(ts);!p||p.projection||!r||"html"!==p.type&&"svg"!==p.type||function(t,e,n,s){const{layoutId:i,layout:r,drag:o,dragConstraints:a,layoutScroll:l,layoutRoot:u}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:Ms(t.parent)),t.projection.setOptions({layoutId:i,layout:r,alwaysMeasureLayout:Boolean(o)||a&&Gn(a),visualElement:t,animationType:"string"==typeof r?r:"both",initialPromotionConfig:s,layoutScroll:l,layoutRoot:u})}(d.current,s,r,m);const f=e.useRef(!1);e.useInsertionEffect((()=>{p&&f.current&&p.update(s,c)}));const v=s[kn],y=e.useRef(Boolean(v)&&!(null===(o=window.MotionHandoffIsComplete)||void 0===o?void 0:o.call(window,v))&&(null===(a=window.MotionHasOptimisedAnimation)||void 0===a?void 0:a.call(window,v)));return As((()=>{p&&(f.current=!0,window.MotionIsMounted=!0,p.updateFeatures(),ns.render(p.render),y.current&&p.animationState&&p.animationState.animateChanges())})),e.useEffect((()=>{p&&(!y.current&&p.animationState&&p.animationState.animateChanges(),y.current&&(queueMicrotask((()=>{var t;null===(t=window.MotionHandoffMarkAsComplete)||void 0===t||t.call(window,v)})),y.current=!1))})),p}function Ms(t){if(t)return!1!==t.options.allowProjection?t.projection:Ms(t.parent)}function Ps(t,n,s){return e.useCallback((e=>{e&&t.mount&&t.mount(e),n&&(e?n.mount(e):n.unmount()),s&&("function"==typeof s?s(e):Gn(s)&&(s.current=e))}),[n])}function ks(t){return h(t.animate)||w.some((e=>m(t[e])))}function Es(t){return Boolean(ks(t)||t.variants)}function Fs(t){return Array.isArray(t)?t.join(" "):t}const Os={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},Is={};for(const ki in Os)Is[ki]={isEnabled:t=>Os[ki].some((e=>!!t[e]))};function Rs(t){for(const e in t)Is[e]={...Is[e],...t[e]}}const js=Symbol.for("motionComponentSymbol");function Ds({preloadedFeatures:n,createVisualElement:s,useRender:i,useVisualState:r,Component:o}){n&&Rs(n);const a=e.forwardRef((function(a,l){let u;const c={...e.useContext(xs),...a,layoutId:Bs(a)},{isStatic:h}=c,d=function(t){const{initial:n,animate:s}=function(t,e){if(ks(t)){const{initial:e,animate:n}=t;return{initial:!1===e||m(e)?e:void 0,animate:m(n)?n:void 0}}return!1!==t.inherit?e:{}}(t,e.useContext(Ss));return e.useMemo((()=>({initial:n,animate:s})),[Fs(n),Fs(s)])}(a),p=r(a,h);if(!h&&Ts){!function(t,n){const s=e.useContext(Cs).strict;if("production"!==process.env.NODE_ENV&&n&&s){const e="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";t.ignoreStrict?O(!1,e):I(!1,e)}}(c,n);const t=function(t){const{drag:e,layout:n}=Is;if(!e&&!n)return{};const s={...e,...n};return{MeasureLayout:(null==e?void 0:e.isEnabled(t))||(null==n?void 0:n.isEnabled(t))?s.MeasureLayout:void 0,ProjectionNode:s.ProjectionNode}}(c);u=t.MeasureLayout,d.visualElement=Vs(o,p,c,s,t.ProjectionNode)}return t.jsxs(Ss.Provider,{value:d,children:[u&&d.visualElement?t.jsx(u,{visualElement:d.visualElement,...c}):null,i(o,a,Ps(p,d.visualElement,l),p,h,d.visualElement)]})}));return a[js]=o,a}function Bs({layoutId:t}){const n=e.useContext(Qn).id;return n&&void 0!==t?n+"-"+t:t}const Ns=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Ls(t){return"string"==typeof t&&!t.includes("-")&&!!(Ns.indexOf(t)>-1||/[A-Z]/u.test(t))}function $s(t,{style:e,vars:n},s,i){Object.assign(t.style,e,i&&i.getProjectionStyles(s));for(const r in n)t.style.setProperty(r,n[r])}const Ks=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function Ws(t,e,n,s){$s(t,e,void 0,s);for(const i in e.attrs)t.setAttribute(Ks.has(i)?i:Pn(i),e.attrs[i])}function qs(t,{layout:e,layoutId:n}){return x.has(t)||t.startsWith("origin")||(e||void 0!==n)&&(!!es[t]||"opacity"===t)}function Us(t,e,n){var s;const{style:i}=t,r={};for(const o in i)(Fn(i[o])||e.style&&Fn(e.style[o])||qs(o,t)||void 0!==(null===(s=null==n?void 0:n.getValue(o))||void 0===s?void 0:s.liveStyle))&&(r[o]=i[o]);return r}function Ys(t,e,n){const s=Us(t,e,n);for(const i in t)(Fn(t[i])||Fn(e[i]))&&(s[-1!==b.indexOf(i)?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i]=t[i]);return s}const zs=t=>(n,s)=>{const i=e.useContext(Ss),r=e.useContext(Jn),o=()=>function({scrapeMotionValuesFromProps:t,createRenderState:e,onMount:n},s,i,r){const o={latestValues:Hs(s,i,r,t),renderState:e()};return n&&(o.mount=t=>n(s,t,o)),o}(t,n,i,r);return s?o():function(t){const n=e.useRef(null);return null===n.current&&(n.current=t()),n.current}(o)};function Hs(t,e,n,s){const i={},r=s(t,{});for(const h in r)i[h]=is(r[h]);let{initial:o,animate:a}=t;const l=ks(t),u=Es(t);e&&u&&!l&&!1!==t.inherit&&(void 0===o&&(o=e.initial),void 0===a&&(a=e.animate));let c=!!n&&!1===n.initial;c=c||!1===o;const d=c?a:o;if(d&&"boolean"!=typeof d&&!h(d)){const e=Array.isArray(d)?d:[d];for(let n=0;n<e.length;n++){const s=v(t,e[n]);if(s){const{transitionEnd:t,transition:e,...n}=s;for(const s in n){let t=n[s];Array.isArray(t)&&(t=t[c?t.length-1:0]),null!==t&&(i[s]=t)}for(const s in t)i[s]=t[s]}}}return i}const Xs=(t,e)=>e&&"number"==typeof t?e.transform(t):t,_s={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Gs=b.length;function Zs(t,e,n){const{style:s,vars:i,transformOrigin:r}=t;let o=!1,a=!1;for(const l in e){const t=e[l];if(x.has(l))o=!0;else if(tt(l))i[l]=t;else{const e=Xs(t,re[l]);l.startsWith("origin")?(a=!0,r[l]=e):s[l]=e}}if(e.transform||(o||n?s.transform=function(t,e,n){let s="",i=!0;for(let r=0;r<Gs;r++){const o=b[r],a=t[o];if(void 0===a)continue;let l=!0;if(l="number"==typeof a?a===(o.startsWith("scale")?1:0):0===parseFloat(a),!l||n){const t=Xs(a,re[o]);l||(i=!1,s+=`${_s[o]||o}(${t}) `),n&&(e[o]=t)}}return s=s.trim(),n?s=n(e,i?"":s):i&&(s="none"),s}(e,t.transform,n):s.transform&&(s.transform="none")),a){const{originX:t="50%",originY:e="50%",originZ:n=0}=r;s.transformOrigin=`${t} ${e} ${n}`}}function Js(t,e,n){return"string"==typeof t?t:pt.transform(e+n*t)}const Qs={offset:"stroke-dashoffset",array:"stroke-dasharray"},ti={offset:"strokeDashoffset",array:"strokeDasharray"};function ei(t,{attrX:e,attrY:n,attrScale:s,originX:i,originY:r,pathLength:o,pathSpacing:a=1,pathOffset:l=0,...u},c,h){if(Zs(t,u,h),c)return void(t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox));t.attrs=t.style,t.style={};const{attrs:d,style:p,dimensions:m}=t;var f,v;d.transform&&(m&&(p.transform=d.transform),delete d.transform),m&&(void 0!==i||void 0!==r||p.transform)&&(p.transformOrigin=(v=void 0!==r?r:.5,`${Js(void 0!==i?i:.5,(f=m).x,f.width)} ${Js(v,f.y,f.height)}`)),void 0!==e&&(d.x=e),void 0!==n&&(d.y=n),void 0!==s&&(d.scale=s),void 0!==o&&function(t,e,n=1,s=0,i=!0){t.pathLength=1;const r=i?Qs:ti;t[r.offset]=pt.transform(-s);const o=pt.transform(e),a=pt.transform(n);t[r.array]=`${o} ${a}`}(d,o,a,l,!1)}const ni=t=>"string"==typeof t&&"svg"===t.toLowerCase(),si={useVisualState:zs({scrapeMotionValuesFromProps:Ys,createRenderState:()=>({style:{},transform:{},transformOrigin:{},vars:{},attrs:{}}),onMount:(t,e,{renderState:n,latestValues:s})=>{D.read((()=>{try{n.dimensions="function"==typeof e.getBBox?e.getBBox():e.getBoundingClientRect()}catch(t){n.dimensions={x:0,y:0,width:0,height:0}}})),D.render((()=>{ei(n,s,ni(e.tagName),t.transformTemplate),Ws(e,n)}))}})},ii={useVisualState:zs({scrapeMotionValuesFromProps:Us,createRenderState:()=>({style:{},transform:{},transformOrigin:{},vars:{}})})};function ri(t,e,n){for(const s in e)Fn(e[s])||qs(s,n)||(t[s]=e[s])}function oi(t,n){const s={},i=function(t,n){const s={};return ri(s,t.style||{},t),Object.assign(s,function({transformTemplate:t},n){return e.useMemo((()=>{const e={style:{},transform:{},transformOrigin:{},vars:{}};return Zs(e,n,t),Object.assign({},e.vars,e.style)}),[n])}(t,n)),s}(t,n);return t.drag&&!1!==t.dragListener&&(s.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=!0===t.drag?"none":"pan-"+("x"===t.drag?"y":"x")),void 0===t.tabIndex&&(t.onTap||t.onTapStart||t.whileTap)&&(s.tabIndex=0),s.style=i,s}const ai=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function li(t){return t.startsWith("while")||t.startsWith("drag")&&"draggable"!==t||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||ai.has(t)}let ui=t=>!li(t);try{(ci=require("@emotion/is-prop-valid").default)&&(ui=t=>t.startsWith("on")?!li(t):ci(t))}catch(Ti){}var ci;function hi(t,n,s,i){const r=e.useMemo((()=>{const e={style:{},transform:{},transformOrigin:{},vars:{},attrs:{}};return ei(e,n,ni(i),t.transformTemplate),{...e.attrs,style:{...e.style}}}),[n]);if(t.style){const e={};ri(e,t.style,t),r.style={...e,...r.style}}return r}function di(t=!1){return(n,s,i,{latestValues:r},o)=>{const a=(Ls(n)?hi:oi)(s,r,o,n),l=function(t,e,n){const s={};for(const i in t)"values"===i&&"object"==typeof t.values||(ui(i)||!0===n&&li(i)||!e&&!li(i)||t.draggable&&i.startsWith("onDrag"))&&(s[i]=t[i]);return s}(s,"string"==typeof n,t),u=n!==e.Fragment?{...l,...a,ref:i}:{},{children:c}=s,h=e.useMemo((()=>Fn(c)?c.get():c),[c]);return e.createElement(n,{...u,children:h})}}const pi={current:null},mi={current:!1},fi=new WeakMap,vi=[...Ct,Wt,Zt],yi=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class gi{scrapeMotionValuesFromProps(t,e,n){return{}}constructor({parent:t,props:e,presenceContext:n,reducedMotionConfig:s,blockInitialAnimation:i,visualState:r},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Ot,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const t=me.now();this.renderScheduledAt<t&&(this.renderScheduledAt=t,D.render(this.render,!1,!0))};const{latestValues:a,renderState:l}=r;this.latestValues=a,this.baseTarget={...a},this.initialValues=e.initial?{...a}:{},this.renderState=l,this.parent=t,this.props=e,this.presenceContext=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=s,this.options=o,this.blockInitialAnimation=Boolean(i),this.isControllingVariants=ks(e),this.isVariantNode=Es(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(t&&t.current);const{willChange:u,...c}=this.scrapeMotionValuesFromProps(e,{},this);for(const h in c){const t=c[h];void 0!==a[h]&&Fn(t)&&t.set(a[h],!1)}}mount(t){this.current=t,fi.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach(((t,e)=>this.bindToMotionValue(e,t))),mi.current||function(){if(mi.current=!0,Ts)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>pi.current=t.matches;t.addListener(e),e()}else pi.current=!1}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||pi.current),"production"!==process.env.NODE_ENV&&c(!0!==this.shouldReduceMotion,"You have Reduced Motion enabled on your device. Animations may not appear as expected."),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){fi.delete(this.current),this.projection&&this.projection.unmount(),B(this.notifyUpdate),B(this.render),this.valueSubscriptions.forEach((t=>t())),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const e=this.features[t];e&&(e.unmount(),e.isMounted=!1)}this.current=null}bindToMotionValue(t,e){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const n=x.has(t),s=e.on("change",(e=>{this.latestValues[t]=e,this.props.onUpdate&&D.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0)})),i=e.on("renderRequest",this.scheduleRender);let r;window.MotionCheckAppearSync&&(r=window.MotionCheckAppearSync(this,t,e)),this.valueSubscriptions.set(t,(()=>{s(),i(),r&&r(),e.owner&&e.stop()}))}sortNodePosition(t){return this.current&&this.sortInstanceNodePosition&&this.type===t.type?this.sortInstanceNodePosition(this.current,t.current):0}updateFeatures(){let t="animation";for(t in Is){const e=Is[t];if(!e)continue;const{isEnabled:n,Feature:s}=e;if(!this.features[t]&&s&&n(this.props)&&(this.features[t]=new s(this)),this.features[t]){const e=this.features[t];e.isMounted?e.update():(e.mount(),e.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):{x:{min:0,max:0},y:{min:0,max:0}}}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,e){this.latestValues[t]=e}update(t,e){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=e;for(let n=0;n<yi.length;n++){const e=yi[n];this.propEventSubscriptions[e]&&(this.propEventSubscriptions[e](),delete this.propEventSubscriptions[e]);const s=t["on"+e];s&&(this.propEventSubscriptions[e]=this.on(e,s))}this.prevMotionValues=function(t,e,n){for(const s in e){const i=e[s],r=n[s];if(Fn(i))t.addValue(s,i),"development"===process.env.NODE_ENV&&c("11.15.0"===i.version,`Attempting to mix Motion versions ${i.version} with 11.15.0 may not work as expected.`);else if(Fn(r))t.addValue(s,Vn(i,{owner:t}));else if(r!==i)if(t.hasValue(s)){const e=t.getValue(s);!0===e.liveStyle?e.jump(i):e.hasAnimated||e.set(i)}else{const e=t.getStaticValue(s);t.addValue(s,Vn(void 0!==e?e:i,{owner:t}))}}for(const s in n)void 0===e[s]&&t.removeValue(s);return e}(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const e=this.getClosestVariantNode();if(e)return e.variantChildren&&e.variantChildren.add(t),()=>e.variantChildren.delete(t)}addValue(t,e){const n=this.values.get(t);e!==n&&(n&&this.removeValue(t),this.bindToMotionValue(t,e),this.values.set(t,e),this.latestValues[t]=e.get())}removeValue(t){this.values.delete(t);const e=this.valueSubscriptions.get(t);e&&(e(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,e){if(this.props.values&&this.props.values[t])return this.props.values[t];let n=this.values.get(t);return void 0===n&&void 0!==e&&(n=Vn(null===e?void 0:e,{owner:this}),this.addValue(t,n)),n}readValue(t,e){var n;let s=void 0===this.latestValues[t]&&this.current?null!==(n=this.getBaseTargetFromProps(this.props,t))&&void 0!==n?n:this.readValueFromInstance(this.current,t,this.options):this.latestValues[t];var i;return null!=s&&("string"==typeof s&&(J(s)||Z(s))?s=parseFloat(s):(i=s,!vi.find(At(i))&&Zt.test(e)&&(s=le(t,e))),this.setBaseTarget(t,Fn(s)?s.get():s)),Fn(s)?s.get():s}setBaseTarget(t,e){this.baseTarget[t]=e}getBaseTarget(t){var e;const{initial:n}=this.props;let s;if("string"==typeof n||"object"==typeof n){const i=v(this.props,n,null===(e=this.presenceContext)||void 0===e?void 0:e.custom);i&&(s=i[t])}if(n&&void 0!==s)return s;const i=this.getBaseTargetFromProps(this.props,t);return void 0===i||Fn(i)?void 0!==this.initialValues[t]&&void 0===s?void 0:this.baseTarget[t]:i}on(t,e){return this.events[t]||(this.events[t]=new An),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}}class wi extends gi{constructor(){super(...arguments),this.KeyframeResolver=ce}sortInstanceNodePosition(t,e){return 2&t.compareDocumentPosition(e)?1:-1}getBaseTargetFromProps(t,e){return t.style?t.style[e]:void 0}removeValueFromRenderState(t,{vars:e,style:n}){delete e[t],delete n[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Fn(t)&&(this.childSubscription=t.on("change",(t=>{this.current&&(this.current.textContent=`${t}`)})))}}class bi extends wi{constructor(){super(...arguments),this.type="html",this.renderInstance=$s}readValueFromInstance(t,e){if(x.has(e)){const t=ae(e);return t&&t.default||0}{const s=(n=t,window.getComputedStyle(n)),i=(tt(e)?s.getPropertyValue(e):s[e])||0;return"string"==typeof i?i.trim():i}var n}measureInstanceViewportBox(t,{transformPagePoint:e}){return n=e,function({top:t,left:e,right:n,bottom:s}){return{x:{min:e,max:n},y:{min:t,max:s}}}(function(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),s=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:s.y,right:s.x}}(t.getBoundingClientRect(),n));var n}build(t,e,n){Zs(t,e,n.transformTemplate)}scrapeMotionValuesFromProps(t,e,n){return Us(t,e,n)}}class xi extends wi{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Zn}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(x.has(e)){const t=ae(e);return t&&t.default||0}return e=Ks.has(e)?e:Pn(e),t.getAttribute(e)}scrapeMotionValuesFromProps(t,e,n){return Ys(t,e,n)}build(t,e,n){ei(t,e,this.isSVGTag,n.transformTemplate)}renderInstance(t,e,n,s){Ws(t,e,0,s)}mount(t){this.isSVGTag=ni(t.tagName),super.mount(t)}}const Si=function(t){if("undefined"==typeof Proxy)return t;const e=new Map;return new Proxy(((...e)=>("production"!==process.env.NODE_ENV&&c(!1,"motion() is deprecated. Use motion.create() instead."),t(...e))),{get:(n,s)=>"create"===s?t:(e.has(s)||e.set(s,t(s)),e.get(s))})}((function(t,{forwardMotionProps:e}={forwardMotionProps:!1}){return Ds({...Ls(t)?si:ii,preloadedFeatures:Ti,useRender:di(e),createVisualElement:Ai,Component:t})}));var Ti,Ai;function Ci({children:n,features:s,strict:i=!1}){const[,r]=e.useState(!Vi(s)),o=e.useRef(void 0);if(!Vi(s)){const{renderer:t,...e}=s;o.current=t,Rs(e)}return e.useEffect((()=>{Vi(s)&&s().then((({renderer:t,...e})=>{Rs(e),o.current=t,r(!0)}))}),[]),t.jsx(Cs.Provider,{value:{renderer:o.current,strict:i},children:n})}function Vi(t){return"function"==typeof t}const Mi={renderer:(t,n)=>Ls(t)?new xi(n):new bi(n,{allowProjection:t!==e.Fragment}),...Hn,...bs},Pi=n.styled(Si.div)`
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { jsxs as H, jsx as I } from "react/jsx-runtime";
|
|
2
|
+
import { createContext as ee, useLayoutEffect as Ts, useEffect as st, useContext as O, useRef as Z, useInsertionEffect as xs, useCallback as fn, useMemo as Ve, forwardRef as As, Fragment as vn, createElement as Vs, useState as Cs } from "react";
|
|
3
|
+
import { styled as Ms, useTheme as Ps } from "styled-components";
|
|
4
|
+
import { MenuItem as ks } from "./menu-item/index.js";
|
|
5
|
+
import { Button as Pt } from "../button/index.js";
|
|
6
|
+
import { Container as z } from "../container/index.js";
|
|
7
|
+
import { IconButton as Es } from "../icon-button/index.js";
|
|
8
|
+
import "../typography/heading/index.js";
|
|
9
|
+
import "../typography/span/index.js";
|
|
10
|
+
import { Text as Fs } from "../typography/text/index.js";
|
|
11
|
+
import { u as Os } from "../../use-click-outside-BtZLIoU1.mjs";
|
|
12
|
+
import "lodash";
|
|
13
|
+
const kt = /* @__PURE__ */ new Set();
|
|
14
|
+
function we(t, e, n) {
|
|
15
|
+
t || kt.has(e) || (console.warn(e), kt.add(e));
|
|
16
|
+
}
|
|
17
|
+
function Is(t) {
|
|
18
|
+
if (typeof Proxy > "u") return t;
|
|
19
|
+
const e = /* @__PURE__ */ new Map();
|
|
20
|
+
return new Proxy((...n) => (process.env.NODE_ENV !== "production" && we(!1, "motion() is deprecated. Use motion.create() instead."), t(...n)), { get: (n, s) => s === "create" ? t : (e.has(s) || e.set(s, t(s)), e.get(s)) });
|
|
21
|
+
}
|
|
22
|
+
function Ce(t) {
|
|
23
|
+
return t !== null && typeof t == "object" && typeof t.start == "function";
|
|
24
|
+
}
|
|
25
|
+
const Ue = (t) => Array.isArray(t);
|
|
26
|
+
function gn(t, e) {
|
|
27
|
+
if (!Array.isArray(e)) return !1;
|
|
28
|
+
const n = e.length;
|
|
29
|
+
if (n !== t.length) return !1;
|
|
30
|
+
for (let s = 0; s < n; s++) if (e[s] !== t[s]) return !1;
|
|
31
|
+
return !0;
|
|
32
|
+
}
|
|
33
|
+
function le(t) {
|
|
34
|
+
return typeof t == "string" || Array.isArray(t);
|
|
35
|
+
}
|
|
36
|
+
function Et(t) {
|
|
37
|
+
const e = [{}, {}];
|
|
38
|
+
return t == null || t.values.forEach((n, s) => {
|
|
39
|
+
e[0][s] = n.get(), e[1][s] = n.getVelocity();
|
|
40
|
+
}), e;
|
|
41
|
+
}
|
|
42
|
+
function it(t, e, n, s) {
|
|
43
|
+
if (typeof e == "function") {
|
|
44
|
+
const [i, r] = Et(s);
|
|
45
|
+
e = e(n !== void 0 ? n : t.custom, i, r);
|
|
46
|
+
}
|
|
47
|
+
if (typeof e == "string" && (e = t.variants && t.variants[e]), typeof e == "function") {
|
|
48
|
+
const [i, r] = Et(s);
|
|
49
|
+
e = e(n !== void 0 ? n : t.custom, i, r);
|
|
50
|
+
}
|
|
51
|
+
return e;
|
|
52
|
+
}
|
|
53
|
+
function Me(t, e, n) {
|
|
54
|
+
const s = t.getProps();
|
|
55
|
+
return it(s, e, n !== void 0 ? n : s.custom, t);
|
|
56
|
+
}
|
|
57
|
+
const rt = ["animate", "whileInView", "whileFocus", "whileHover", "whileTap", "whileDrag", "exit"], ot = ["initial", ...rt], he = ["transformPerspective", "x", "y", "z", "translateX", "translateY", "translateZ", "scale", "scaleX", "scaleY", "rotate", "rotateX", "rotateY", "rotateZ", "skew", "skewX", "skewY"], q = new Set(he), R = (t) => 1e3 * t, N = (t) => t / 1e3, Rs = { type: "spring", stiffness: 500, damping: 25, restSpeed: 10 }, Ds = { type: "keyframes", duration: 0.8 }, Bs = { type: "keyframes", ease: [0.25, 0.1, 0.35, 1], duration: 0.3 }, Ns = (t, { keyframes: e }) => e.length > 2 ? Ds : q.has(t) ? t.startsWith("scale") ? { type: "spring", stiffness: 550, damping: e[1] === 0 ? 2 * Math.sqrt(550) : 30, restSpeed: 10 } : Rs : Bs;
|
|
58
|
+
function yn(t, e) {
|
|
59
|
+
return t ? t[e] || t.default || t : void 0;
|
|
60
|
+
}
|
|
61
|
+
const Ls = !1, $s = (t) => t !== null;
|
|
62
|
+
function Pe(t, { repeat: e, repeatType: n = "loop" }, s) {
|
|
63
|
+
const i = t.filter($s), r = e && n !== "loop" && e % 2 == 1 ? 0 : i.length - 1;
|
|
64
|
+
return r && s !== void 0 ? s : i[r];
|
|
65
|
+
}
|
|
66
|
+
const $ = (t) => t;
|
|
67
|
+
let te = $, U = $;
|
|
68
|
+
process.env.NODE_ENV !== "production" && (te = (t, e) => {
|
|
69
|
+
t || typeof console > "u" || console.warn(e);
|
|
70
|
+
}, U = (t, e) => {
|
|
71
|
+
if (!t) throw new Error(e);
|
|
72
|
+
});
|
|
73
|
+
const me = ["read", "resolveKeyframes", "update", "preRender", "render", "postRender"];
|
|
74
|
+
function wn(t, e) {
|
|
75
|
+
let n = !1, s = !0;
|
|
76
|
+
const i = { delta: 0, timestamp: 0, isProcessing: !1 }, r = () => n = !0, o = me.reduce((v, p) => (v[p] = /* @__PURE__ */ function(g) {
|
|
77
|
+
let m = /* @__PURE__ */ new Set(), S = /* @__PURE__ */ new Set(), x = !1, C = !1;
|
|
78
|
+
const y = /* @__PURE__ */ new WeakSet();
|
|
79
|
+
let w = { delta: 0, timestamp: 0, isProcessing: !1 };
|
|
80
|
+
function T(V) {
|
|
81
|
+
y.has(V) && (A.schedule(V), g()), V(w);
|
|
82
|
+
}
|
|
83
|
+
const A = { schedule: (V, M = !1, Ie = !1) => {
|
|
84
|
+
const ie = Ie && x ? m : S;
|
|
85
|
+
return M && y.add(V), ie.has(V) || ie.add(V), V;
|
|
86
|
+
}, cancel: (V) => {
|
|
87
|
+
S.delete(V), y.delete(V);
|
|
88
|
+
}, process: (V) => {
|
|
89
|
+
w = V, x ? C = !0 : (x = !0, [m, S] = [S, m], m.forEach(T), m.clear(), x = !1, C && (C = !1, A.process(V)));
|
|
90
|
+
} };
|
|
91
|
+
return A;
|
|
92
|
+
}(r), v), {}), { read: a, resolveKeyframes: l, update: c, preRender: u, render: h, postRender: d } = o, f = () => {
|
|
93
|
+
const v = performance.now();
|
|
94
|
+
n = !1, i.delta = s ? 1e3 / 60 : Math.max(Math.min(v - i.timestamp, 40), 1), i.timestamp = v, i.isProcessing = !0, a.process(i), l.process(i), c.process(i), u.process(i), h.process(i), d.process(i), i.isProcessing = !1, n && e && (s = !1, t(f));
|
|
95
|
+
};
|
|
96
|
+
return { schedule: me.reduce((v, p) => {
|
|
97
|
+
const g = o[p];
|
|
98
|
+
return v[p] = (m, S = !1, x = !1) => (n || (n = !0, s = !0, i.isProcessing || t(f)), g.schedule(m, S, x)), v;
|
|
99
|
+
}, {}), cancel: (v) => {
|
|
100
|
+
for (let p = 0; p < me.length; p++) o[me[p]].cancel(v);
|
|
101
|
+
}, state: i, steps: o };
|
|
102
|
+
}
|
|
103
|
+
const { schedule: F, cancel: Ye, state: be, steps: Qr } = wn(typeof requestAnimationFrame < "u" ? requestAnimationFrame : $, !0), Ft = (t, e, n) => (((1 - 3 * n + 3 * e) * t + (3 * n - 6 * e)) * t + 3 * e) * t;
|
|
104
|
+
function de(t, e, n, s) {
|
|
105
|
+
if (t === e && n === s) return $;
|
|
106
|
+
const i = (r) => function(o, a, l, c, u) {
|
|
107
|
+
let h, d, f = 0;
|
|
108
|
+
do
|
|
109
|
+
d = a + (l - a) / 2, h = Ft(d, c, u) - o, h > 0 ? l = d : a = d;
|
|
110
|
+
while (Math.abs(h) > 1e-7 && ++f < 12);
|
|
111
|
+
return d;
|
|
112
|
+
}(r, 0, 1, t, n);
|
|
113
|
+
return (r) => r === 0 || r === 1 ? r : Ft(i(r), e, s);
|
|
114
|
+
}
|
|
115
|
+
const bn = (t) => (e) => e <= 0.5 ? t(2 * e) / 2 : (2 - t(2 * (1 - e))) / 2, Sn = (t) => (e) => 1 - t(1 - e), Tn = de(0.33, 1.53, 0.69, 0.99), at = Sn(Tn), xn = bn(at), An = (t) => (t *= 2) < 1 ? 0.5 * at(t) : 0.5 * (2 - Math.pow(2, -10 * (t - 1))), lt = (t) => 1 - Math.sin(Math.acos(t)), js = Sn(lt), Vn = bn(lt), Cn = (t) => /^0[^.\s]+$/u.test(t), Mn = (t) => /^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t), Pn = (t) => (e) => typeof e == "string" && e.startsWith(t), kn = Pn("--"), Ks = Pn("var(--"), ut = (t) => !!Ks(t) && Ws.test(t.split("/*")[0].trim()), Ws = /var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu, Us = /^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;
|
|
116
|
+
function En(t, e, n = 1) {
|
|
117
|
+
U(n <= 4, `Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`);
|
|
118
|
+
const [s, i] = function(o) {
|
|
119
|
+
const a = Us.exec(o);
|
|
120
|
+
if (!a) return [,];
|
|
121
|
+
const [, l, c, u] = a;
|
|
122
|
+
return [`--${l ?? c}`, u];
|
|
123
|
+
}(t);
|
|
124
|
+
if (!s) return;
|
|
125
|
+
const r = window.getComputedStyle(e).getPropertyValue(s);
|
|
126
|
+
if (r) {
|
|
127
|
+
const o = r.trim();
|
|
128
|
+
return Mn(o) ? parseFloat(o) : o;
|
|
129
|
+
}
|
|
130
|
+
return ut(i) ? En(i, e, n + 1) : i;
|
|
131
|
+
}
|
|
132
|
+
const Y = (t, e, n) => n > e ? e : n < t ? t : n, ne = { test: (t) => typeof t == "number", parse: parseFloat, transform: (t) => t }, ue = { ...ne, transform: (t) => Y(0, 1, t) }, fe = { ...ne, default: 1 }, pe = (t) => ({ test: (e) => typeof e == "string" && e.endsWith(t) && e.split(" ").length === 1, parse: parseFloat, transform: (e) => `${e}${t}` }), B = pe("deg"), J = pe("%"), b = pe("px"), Ys = pe("vh"), qs = pe("vw"), Ot = { ...J, parse: (t) => J.parse(t) / 100, transform: (t) => J.transform(100 * t) }, zs = /* @__PURE__ */ new Set(["width", "height", "top", "left", "right", "bottom", "x", "y", "translateX", "translateY"]), It = (t) => t === ne || t === b, Rt = (t, e) => parseFloat(t.split(", ")[e]), Dt = (t, e) => (n, { transform: s }) => {
|
|
133
|
+
if (s === "none" || !s) return 0;
|
|
134
|
+
const i = s.match(/^matrix3d\((.+)\)$/u);
|
|
135
|
+
if (i) return Rt(i[1], e);
|
|
136
|
+
{
|
|
137
|
+
const r = s.match(/^matrix\((.+)\)$/u);
|
|
138
|
+
return r ? Rt(r[1], t) : 0;
|
|
139
|
+
}
|
|
140
|
+
}, Hs = /* @__PURE__ */ new Set(["x", "y", "z"]), Xs = he.filter((t) => !Hs.has(t)), X = { width: ({ x: t }, { paddingLeft: e = "0", paddingRight: n = "0" }) => t.max - t.min - parseFloat(e) - parseFloat(n), height: ({ y: t }, { paddingTop: e = "0", paddingBottom: n = "0" }) => t.max - t.min - parseFloat(e) - parseFloat(n), top: (t, { top: e }) => parseFloat(e), left: (t, { left: e }) => parseFloat(e), bottom: ({ y: t }, { top: e }) => parseFloat(e) + (t.max - t.min), right: ({ x: t }, { left: e }) => parseFloat(e) + (t.max - t.min), x: Dt(4, 13), y: Dt(5, 14) };
|
|
141
|
+
X.translateX = X.x, X.translateY = X.y;
|
|
142
|
+
const Fn = (t) => (e) => e.test(t), On = [ne, b, J, B, qs, Ys, { test: (t) => t === "auto", parse: (t) => t }], Bt = (t) => On.find(Fn(t)), W = /* @__PURE__ */ new Set();
|
|
143
|
+
let qe = !1, ze = !1;
|
|
144
|
+
function In() {
|
|
145
|
+
if (ze) {
|
|
146
|
+
const t = Array.from(W).filter((s) => s.needsMeasurement), e = new Set(t.map((s) => s.element)), n = /* @__PURE__ */ new Map();
|
|
147
|
+
e.forEach((s) => {
|
|
148
|
+
const i = function(r) {
|
|
149
|
+
const o = [];
|
|
150
|
+
return Xs.forEach((a) => {
|
|
151
|
+
const l = r.getValue(a);
|
|
152
|
+
l !== void 0 && (o.push([a, l.get()]), l.set(a.startsWith("scale") ? 1 : 0));
|
|
153
|
+
}), o;
|
|
154
|
+
}(s);
|
|
155
|
+
i.length && (n.set(s, i), s.render());
|
|
156
|
+
}), t.forEach((s) => s.measureInitialState()), e.forEach((s) => {
|
|
157
|
+
s.render();
|
|
158
|
+
const i = n.get(s);
|
|
159
|
+
i && i.forEach(([r, o]) => {
|
|
160
|
+
var a;
|
|
161
|
+
(a = s.getValue(r)) === null || a === void 0 || a.set(o);
|
|
162
|
+
});
|
|
163
|
+
}), t.forEach((s) => s.measureEndState()), t.forEach((s) => {
|
|
164
|
+
s.suspendedScrollY !== void 0 && window.scrollTo(0, s.suspendedScrollY);
|
|
165
|
+
});
|
|
166
|
+
}
|
|
167
|
+
ze = !1, qe = !1, W.forEach((t) => t.complete()), W.clear();
|
|
168
|
+
}
|
|
169
|
+
function Rn() {
|
|
170
|
+
W.forEach((t) => {
|
|
171
|
+
t.readKeyframes(), t.needsMeasurement && (ze = !0);
|
|
172
|
+
});
|
|
173
|
+
}
|
|
174
|
+
class ct {
|
|
175
|
+
constructor(e, n, s, i, r, o = !1) {
|
|
176
|
+
this.isComplete = !1, this.isAsync = !1, this.needsMeasurement = !1, this.isScheduled = !1, this.unresolvedKeyframes = [...e], this.onComplete = n, this.name = s, this.motionValue = i, this.element = r, this.isAsync = o;
|
|
177
|
+
}
|
|
178
|
+
scheduleResolve() {
|
|
179
|
+
this.isScheduled = !0, this.isAsync ? (W.add(this), qe || (qe = !0, F.read(Rn), F.resolveKeyframes(In))) : (this.readKeyframes(), this.complete());
|
|
180
|
+
}
|
|
181
|
+
readKeyframes() {
|
|
182
|
+
const { unresolvedKeyframes: e, name: n, element: s, motionValue: i } = this;
|
|
183
|
+
for (let r = 0; r < e.length; r++) if (e[r] === null) if (r === 0) {
|
|
184
|
+
const o = i == null ? void 0 : i.get(), a = e[e.length - 1];
|
|
185
|
+
if (o !== void 0) e[0] = o;
|
|
186
|
+
else if (s && n) {
|
|
187
|
+
const l = s.readValue(n, a);
|
|
188
|
+
l != null && (e[0] = l);
|
|
189
|
+
}
|
|
190
|
+
e[0] === void 0 && (e[0] = a), i && o === void 0 && i.set(e[0]);
|
|
191
|
+
} else e[r] = e[r - 1];
|
|
192
|
+
}
|
|
193
|
+
setFinalKeyframe() {
|
|
194
|
+
}
|
|
195
|
+
measureInitialState() {
|
|
196
|
+
}
|
|
197
|
+
renderEndStyles() {
|
|
198
|
+
}
|
|
199
|
+
measureEndState() {
|
|
200
|
+
}
|
|
201
|
+
complete() {
|
|
202
|
+
this.isComplete = !0, this.onComplete(this.unresolvedKeyframes, this.finalKeyframe), W.delete(this);
|
|
203
|
+
}
|
|
204
|
+
cancel() {
|
|
205
|
+
this.isComplete || (this.isScheduled = !1, W.delete(this));
|
|
206
|
+
}
|
|
207
|
+
resume() {
|
|
208
|
+
this.isComplete || this.scheduleResolve();
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
const ae = (t) => Math.round(1e5 * t) / 1e5, ht = /-?(?:\d+(?:\.\d+)?|\.\d+)/gu, _s = /^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu, dt = (t, e) => (n) => !!(typeof n == "string" && _s.test(n) && n.startsWith(t) || e && !function(s) {
|
|
212
|
+
return s == null;
|
|
213
|
+
}(n) && Object.prototype.hasOwnProperty.call(n, e)), Dn = (t, e, n) => (s) => {
|
|
214
|
+
if (typeof s != "string") return s;
|
|
215
|
+
const [i, r, o, a] = s.match(ht);
|
|
216
|
+
return { [t]: parseFloat(i), [e]: parseFloat(r), [n]: parseFloat(o), alpha: a !== void 0 ? parseFloat(a) : 1 };
|
|
217
|
+
}, De = { ...ne, transform: (t) => Math.round(((e) => Y(0, 255, e))(t)) }, K = { test: dt("rgb", "red"), parse: Dn("red", "green", "blue"), transform: ({ red: t, green: e, blue: n, alpha: s = 1 }) => "rgba(" + De.transform(t) + ", " + De.transform(e) + ", " + De.transform(n) + ", " + ae(ue.transform(s)) + ")" }, He = { test: dt("#"), parse: function(t) {
|
|
218
|
+
let e = "", n = "", s = "", i = "";
|
|
219
|
+
return t.length > 5 ? (e = t.substring(1, 3), n = t.substring(3, 5), s = t.substring(5, 7), i = t.substring(7, 9)) : (e = t.substring(1, 2), n = t.substring(2, 3), s = t.substring(3, 4), i = t.substring(4, 5), e += e, n += n, s += s, i += i), { red: parseInt(e, 16), green: parseInt(n, 16), blue: parseInt(s, 16), alpha: i ? parseInt(i, 16) / 255 : 1 };
|
|
220
|
+
}, transform: K.transform }, _ = { test: dt("hsl", "hue"), parse: Dn("hue", "saturation", "lightness"), transform: ({ hue: t, saturation: e, lightness: n, alpha: s = 1 }) => "hsla(" + Math.round(t) + ", " + J.transform(ae(e)) + ", " + J.transform(ae(n)) + ", " + ae(ue.transform(s)) + ")" }, P = { test: (t) => K.test(t) || He.test(t) || _.test(t), parse: (t) => K.test(t) ? K.parse(t) : _.test(t) ? _.parse(t) : He.parse(t), transform: (t) => typeof t == "string" ? t : t.hasOwnProperty("red") ? K.transform(t) : _.transform(t) }, Gs = /(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu, Bn = "number", Nn = "color", Zs = /var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;
|
|
221
|
+
function ce(t) {
|
|
222
|
+
const e = t.toString(), n = [], s = { color: [], number: [], var: [] }, i = [];
|
|
223
|
+
let r = 0;
|
|
224
|
+
const o = e.replace(Zs, (a) => (P.test(a) ? (s.color.push(r), i.push(Nn), n.push(P.parse(a))) : a.startsWith("var(") ? (s.var.push(r), i.push("var"), n.push(a)) : (s.number.push(r), i.push(Bn), n.push(parseFloat(a))), ++r, "${}")).split("${}");
|
|
225
|
+
return { values: n, split: o, indexes: s, types: i };
|
|
226
|
+
}
|
|
227
|
+
function Nt(t) {
|
|
228
|
+
return ce(t).values;
|
|
229
|
+
}
|
|
230
|
+
function Lt(t) {
|
|
231
|
+
const { split: e, types: n } = ce(t), s = e.length;
|
|
232
|
+
return (i) => {
|
|
233
|
+
let r = "";
|
|
234
|
+
for (let o = 0; o < s; o++) if (r += e[o], i[o] !== void 0) {
|
|
235
|
+
const a = n[o];
|
|
236
|
+
r += a === Bn ? ae(i[o]) : a === Nn ? P.transform(i[o]) : i[o];
|
|
237
|
+
}
|
|
238
|
+
return r;
|
|
239
|
+
};
|
|
240
|
+
}
|
|
241
|
+
const Js = (t) => typeof t == "number" ? 0 : t, se = { test: function(t) {
|
|
242
|
+
var e, n;
|
|
243
|
+
return isNaN(t) && typeof t == "string" && (((e = t.match(ht)) === null || e === void 0 ? void 0 : e.length) || 0) + (((n = t.match(Gs)) === null || n === void 0 ? void 0 : n.length) || 0) > 0;
|
|
244
|
+
}, parse: Nt, createTransformer: Lt, getAnimatableNone: function(t) {
|
|
245
|
+
const e = Nt(t);
|
|
246
|
+
return Lt(t)(e.map(Js));
|
|
247
|
+
} }, Qs = /* @__PURE__ */ new Set(["brightness", "contrast", "saturate", "opacity"]);
|
|
248
|
+
function ei(t) {
|
|
249
|
+
const [e, n] = t.slice(0, -1).split("(");
|
|
250
|
+
if (e === "drop-shadow") return t;
|
|
251
|
+
const [s] = n.match(ht) || [];
|
|
252
|
+
if (!s) return t;
|
|
253
|
+
const i = n.replace(s, "");
|
|
254
|
+
let r = Qs.has(e) ? 1 : 0;
|
|
255
|
+
return s !== n && (r *= 100), e + "(" + r + i + ")";
|
|
256
|
+
}
|
|
257
|
+
const ti = /\b([a-z-]*)\(.*?\)/gu, Xe = { ...se, getAnimatableNone: (t) => {
|
|
258
|
+
const e = t.match(ti);
|
|
259
|
+
return e ? e.map(ei).join(" ") : t;
|
|
260
|
+
} }, ni = { borderWidth: b, borderTopWidth: b, borderRightWidth: b, borderBottomWidth: b, borderLeftWidth: b, borderRadius: b, radius: b, borderTopLeftRadius: b, borderTopRightRadius: b, borderBottomRightRadius: b, borderBottomLeftRadius: b, width: b, maxWidth: b, height: b, maxHeight: b, top: b, right: b, bottom: b, left: b, padding: b, paddingTop: b, paddingRight: b, paddingBottom: b, paddingLeft: b, margin: b, marginTop: b, marginRight: b, marginBottom: b, marginLeft: b, backgroundPositionX: b, backgroundPositionY: b }, si = { rotate: B, rotateX: B, rotateY: B, rotateZ: B, scale: fe, scaleX: fe, scaleY: fe, scaleZ: fe, skew: B, skewX: B, skewY: B, distance: b, translateX: b, translateY: b, translateZ: b, x: b, y: b, z: b, perspective: b, transformPerspective: b, opacity: ue, originX: Ot, originY: Ot, originZ: b }, $t = { ...ne, transform: Math.round }, _e = { ...ni, ...si, zIndex: $t, size: b, fillOpacity: ue, strokeOpacity: ue, numOctaves: $t }, ii = { ..._e, color: P, backgroundColor: P, outlineColor: P, fill: P, stroke: P, borderColor: P, borderTopColor: P, borderRightColor: P, borderBottomColor: P, borderLeftColor: P, filter: Xe, WebkitFilter: Xe }, pt = (t) => ii[t];
|
|
261
|
+
function Ln(t, e) {
|
|
262
|
+
let n = pt(t);
|
|
263
|
+
return n !== Xe && (n = se), n.getAnimatableNone ? n.getAnimatableNone(e) : void 0;
|
|
264
|
+
}
|
|
265
|
+
const ri = /* @__PURE__ */ new Set(["auto", "none", "0"]);
|
|
266
|
+
class $n extends ct {
|
|
267
|
+
constructor(e, n, s, i, r) {
|
|
268
|
+
super(e, n, s, i, r, !0);
|
|
269
|
+
}
|
|
270
|
+
readKeyframes() {
|
|
271
|
+
const { unresolvedKeyframes: e, element: n, name: s } = this;
|
|
272
|
+
if (!n || !n.current) return;
|
|
273
|
+
super.readKeyframes();
|
|
274
|
+
for (let l = 0; l < e.length; l++) {
|
|
275
|
+
let c = e[l];
|
|
276
|
+
if (typeof c == "string" && (c = c.trim(), ut(c))) {
|
|
277
|
+
const u = En(c, n.current);
|
|
278
|
+
u !== void 0 && (e[l] = u), l === e.length - 1 && (this.finalKeyframe = c);
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
if (this.resolveNoneKeyframes(), !zs.has(s) || e.length !== 2) return;
|
|
282
|
+
const [i, r] = e, o = Bt(i), a = Bt(r);
|
|
283
|
+
if (o !== a) if (It(o) && It(a)) for (let l = 0; l < e.length; l++) {
|
|
284
|
+
const c = e[l];
|
|
285
|
+
typeof c == "string" && (e[l] = parseFloat(c));
|
|
286
|
+
}
|
|
287
|
+
else this.needsMeasurement = !0;
|
|
288
|
+
}
|
|
289
|
+
resolveNoneKeyframes() {
|
|
290
|
+
const { unresolvedKeyframes: e, name: n } = this, s = [];
|
|
291
|
+
for (let r = 0; r < e.length; r++) (typeof (i = e[r]) == "number" ? i === 0 : i === null || i === "none" || i === "0" || Cn(i)) && s.push(r);
|
|
292
|
+
var i;
|
|
293
|
+
s.length && function(r, o, a) {
|
|
294
|
+
let l, c = 0;
|
|
295
|
+
for (; c < r.length && !l; ) {
|
|
296
|
+
const u = r[c];
|
|
297
|
+
typeof u == "string" && !ri.has(u) && ce(u).values.length && (l = r[c]), c++;
|
|
298
|
+
}
|
|
299
|
+
if (l && a) for (const u of o) r[u] = Ln(a, l);
|
|
300
|
+
}(e, s, n);
|
|
301
|
+
}
|
|
302
|
+
measureInitialState() {
|
|
303
|
+
const { element: e, unresolvedKeyframes: n, name: s } = this;
|
|
304
|
+
if (!e || !e.current) return;
|
|
305
|
+
s === "height" && (this.suspendedScrollY = window.pageYOffset), this.measuredOrigin = X[s](e.measureViewportBox(), window.getComputedStyle(e.current)), n[0] = this.measuredOrigin;
|
|
306
|
+
const i = n[n.length - 1];
|
|
307
|
+
i !== void 0 && e.getValue(s, i).jump(i, !1);
|
|
308
|
+
}
|
|
309
|
+
measureEndState() {
|
|
310
|
+
var e;
|
|
311
|
+
const { element: n, name: s, unresolvedKeyframes: i } = this;
|
|
312
|
+
if (!n || !n.current) return;
|
|
313
|
+
const r = n.getValue(s);
|
|
314
|
+
r && r.jump(this.measuredOrigin, !1);
|
|
315
|
+
const o = i.length - 1, a = i[o];
|
|
316
|
+
i[o] = X[s](n.measureViewportBox(), window.getComputedStyle(n.current)), a !== null && this.finalKeyframe === void 0 && (this.finalKeyframe = a), !((e = this.removedTransforms) === null || e === void 0) && e.length && this.removedTransforms.forEach(([l, c]) => {
|
|
317
|
+
n.getValue(l).set(c);
|
|
318
|
+
}), this.resolveNoneKeyframes();
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
function mt(t) {
|
|
322
|
+
return typeof t == "function";
|
|
323
|
+
}
|
|
324
|
+
let ve;
|
|
325
|
+
function oi() {
|
|
326
|
+
ve = void 0;
|
|
327
|
+
}
|
|
328
|
+
const L = { now: () => (ve === void 0 && L.set(be.isProcessing || Ls ? be.timestamp : performance.now()), ve), set: (t) => {
|
|
329
|
+
ve = t, queueMicrotask(oi);
|
|
330
|
+
} }, jt = (t, e) => e !== "zIndex" && (!(typeof t != "number" && !Array.isArray(t)) || !(typeof t != "string" || !se.test(t) && t !== "0" || t.startsWith("url(")));
|
|
331
|
+
function ai(t, e, n, s) {
|
|
332
|
+
const i = t[0];
|
|
333
|
+
if (i === null) return !1;
|
|
334
|
+
if (e === "display" || e === "visibility") return !0;
|
|
335
|
+
const r = t[t.length - 1], o = jt(i, e), a = jt(r, e);
|
|
336
|
+
return te(o === a, `You are trying to animate ${e} from "${i}" to "${r}". ${i} is not an animatable value - to enable this animation set ${i} to a value animatable to ${r} via the \`style\` property.`), !(!o || !a) && (function(l) {
|
|
337
|
+
const c = l[0];
|
|
338
|
+
if (l.length === 1) return !0;
|
|
339
|
+
for (let u = 0; u < l.length; u++) if (l[u] !== c) return !0;
|
|
340
|
+
}(t) || (n === "spring" || mt(n)) && s);
|
|
341
|
+
}
|
|
342
|
+
class jn {
|
|
343
|
+
constructor({ autoplay: e = !0, delay: n = 0, type: s = "keyframes", repeat: i = 0, repeatDelay: r = 0, repeatType: o = "loop", ...a }) {
|
|
344
|
+
this.isStopped = !1, this.hasAttemptedResolve = !1, this.createdAt = L.now(), this.options = { autoplay: e, delay: n, type: s, repeat: i, repeatDelay: r, repeatType: o, ...a }, this.updateFinishedPromise();
|
|
345
|
+
}
|
|
346
|
+
calcStartTime() {
|
|
347
|
+
return this.resolvedAt && this.resolvedAt - this.createdAt > 40 ? this.resolvedAt : this.createdAt;
|
|
348
|
+
}
|
|
349
|
+
get resolved() {
|
|
350
|
+
return this._resolved || this.hasAttemptedResolve || (Rn(), In()), this._resolved;
|
|
351
|
+
}
|
|
352
|
+
onKeyframesResolved(e, n) {
|
|
353
|
+
this.resolvedAt = L.now(), this.hasAttemptedResolve = !0;
|
|
354
|
+
const { name: s, type: i, velocity: r, delay: o, onComplete: a, onUpdate: l, isGenerator: c } = this.options;
|
|
355
|
+
if (!c && !ai(e, s, i, r)) {
|
|
356
|
+
if (!o) return l == null || l(Pe(e, this.options, n)), a == null || a(), void this.resolveFinishedPromise();
|
|
357
|
+
this.options.duration = 0;
|
|
358
|
+
}
|
|
359
|
+
const u = this.initPlayback(e, n);
|
|
360
|
+
u !== !1 && (this._resolved = { keyframes: e, finalKeyframe: n, ...u }, this.onPostResolved());
|
|
361
|
+
}
|
|
362
|
+
onPostResolved() {
|
|
363
|
+
}
|
|
364
|
+
then(e, n) {
|
|
365
|
+
return this.currentFinishedPromise.then(e, n);
|
|
366
|
+
}
|
|
367
|
+
flatten() {
|
|
368
|
+
this.options.type = "keyframes", this.options.ease = "linear";
|
|
369
|
+
}
|
|
370
|
+
updateFinishedPromise() {
|
|
371
|
+
this.currentFinishedPromise = new Promise((e) => {
|
|
372
|
+
this.resolveFinishedPromise = e;
|
|
373
|
+
});
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
const ft = (t, e, n) => {
|
|
377
|
+
const s = e - t;
|
|
378
|
+
return s === 0 ? 1 : (n - t) / s;
|
|
379
|
+
}, Kn = (t, e, n = 10) => {
|
|
380
|
+
let s = "";
|
|
381
|
+
const i = Math.max(Math.round(e / n), 2);
|
|
382
|
+
for (let r = 0; r < i; r++) s += t(ft(0, i - 1, r)) + ", ";
|
|
383
|
+
return `linear(${s.substring(0, s.length - 2)})`;
|
|
384
|
+
};
|
|
385
|
+
function Wn(t, e) {
|
|
386
|
+
return e ? t * (1e3 / e) : 0;
|
|
387
|
+
}
|
|
388
|
+
function Un(t, e, n) {
|
|
389
|
+
const s = Math.max(e - 5, 0);
|
|
390
|
+
return Wn(n - t(s), e - s);
|
|
391
|
+
}
|
|
392
|
+
const Yn = 100, qn = 10, ge = 1, zn = 0, li = 800, Hn = 0.3, ui = 0.3, Kt = { granular: 0.01, default: 2 }, Wt = { granular: 5e-3, default: 0.5 }, ci = 0.01, Ut = 10, hi = 0.05, di = 1;
|
|
393
|
+
function pi({ duration: t = li, bounce: e = Hn, velocity: n = zn, mass: s = ge }) {
|
|
394
|
+
let i, r;
|
|
395
|
+
te(t <= R(Ut), "Spring duration must be 10 seconds or less");
|
|
396
|
+
let o = 1 - e;
|
|
397
|
+
o = Y(hi, di, o), t = Y(ci, Ut, N(t)), o < 1 ? (i = (l) => {
|
|
398
|
+
const c = l * o, u = c * t;
|
|
399
|
+
return 1e-3 - (c - n) / Ge(l, o) * Math.exp(-u);
|
|
400
|
+
}, r = (l) => {
|
|
401
|
+
const c = l * o * t, u = c * n + n, h = Math.pow(o, 2) * Math.pow(l, 2) * t, d = Math.exp(-c), f = Ge(Math.pow(l, 2), o);
|
|
402
|
+
return (1e-3 - i(l) > 0 ? -1 : 1) * ((u - h) * d) / f;
|
|
403
|
+
}) : (i = (l) => Math.exp(-l * t) * ((l - n) * t + 1) - 1e-3, r = (l) => Math.exp(-l * t) * (t * t * (n - l)));
|
|
404
|
+
const a = function(l, c, u) {
|
|
405
|
+
let h = u;
|
|
406
|
+
for (let d = 1; d < mi; d++) h -= l(h) / c(h);
|
|
407
|
+
return h;
|
|
408
|
+
}(i, r, 5 / t);
|
|
409
|
+
if (t = R(t), isNaN(a)) return { stiffness: Yn, damping: qn, duration: t };
|
|
410
|
+
{
|
|
411
|
+
const l = Math.pow(a, 2) * s;
|
|
412
|
+
return { stiffness: l, damping: 2 * o * Math.sqrt(s * l), duration: t };
|
|
413
|
+
}
|
|
414
|
+
}
|
|
415
|
+
const mi = 12;
|
|
416
|
+
function Ge(t, e) {
|
|
417
|
+
return t * Math.sqrt(1 - e * e);
|
|
418
|
+
}
|
|
419
|
+
const Ze = 2e4;
|
|
420
|
+
function Xn(t) {
|
|
421
|
+
let e = 0, n = t.next(e);
|
|
422
|
+
for (; !n.done && e < Ze; ) e += 50, n = t.next(e);
|
|
423
|
+
return e >= Ze ? 1 / 0 : e;
|
|
424
|
+
}
|
|
425
|
+
const fi = ["duration", "bounce"], vi = ["stiffness", "damping", "mass"];
|
|
426
|
+
function Yt(t, e) {
|
|
427
|
+
return e.some((n) => t[n] !== void 0);
|
|
428
|
+
}
|
|
429
|
+
function _n(t = ui, e = Hn) {
|
|
430
|
+
const n = typeof t != "object" ? { visualDuration: t, keyframes: [0, 1], bounce: e } : t;
|
|
431
|
+
let { restSpeed: s, restDelta: i } = n;
|
|
432
|
+
const r = n.keyframes[0], o = n.keyframes[n.keyframes.length - 1], a = { done: !1, value: r }, { stiffness: l, damping: c, mass: u, duration: h, velocity: d, isResolvedFromDuration: f } = function(y) {
|
|
433
|
+
let w = { velocity: zn, stiffness: Yn, damping: qn, mass: ge, isResolvedFromDuration: !1, ...y };
|
|
434
|
+
if (!Yt(y, vi) && Yt(y, fi)) if (y.visualDuration) {
|
|
435
|
+
const T = y.visualDuration, A = 2 * Math.PI / (1.2 * T), V = A * A, M = 2 * Y(0.05, 1, 1 - y.bounce) * Math.sqrt(V);
|
|
436
|
+
w = { ...w, mass: ge, stiffness: V, damping: M };
|
|
437
|
+
} else {
|
|
438
|
+
const T = pi(y);
|
|
439
|
+
w = { ...w, ...T, mass: ge }, w.isResolvedFromDuration = !0;
|
|
440
|
+
}
|
|
441
|
+
return w;
|
|
442
|
+
}({ ...n, velocity: -N(n.velocity || 0) }), v = d || 0, p = c / (2 * Math.sqrt(l * u)), g = o - r, m = N(Math.sqrt(l / u)), S = Math.abs(g) < 5;
|
|
443
|
+
let x;
|
|
444
|
+
if (s || (s = S ? Kt.granular : Kt.default), i || (i = S ? Wt.granular : Wt.default), p < 1) {
|
|
445
|
+
const y = Ge(m, p);
|
|
446
|
+
x = (w) => {
|
|
447
|
+
const T = Math.exp(-p * m * w);
|
|
448
|
+
return o - T * ((v + p * m * g) / y * Math.sin(y * w) + g * Math.cos(y * w));
|
|
449
|
+
};
|
|
450
|
+
} else if (p === 1) x = (y) => o - Math.exp(-m * y) * (g + (v + m * g) * y);
|
|
451
|
+
else {
|
|
452
|
+
const y = m * Math.sqrt(p * p - 1);
|
|
453
|
+
x = (w) => {
|
|
454
|
+
const T = Math.exp(-p * m * w), A = Math.min(y * w, 300);
|
|
455
|
+
return o - T * ((v + p * m * g) * Math.sinh(A) + y * g * Math.cosh(A)) / y;
|
|
456
|
+
};
|
|
457
|
+
}
|
|
458
|
+
const C = { calculatedDuration: f && h || null, next: (y) => {
|
|
459
|
+
const w = x(y);
|
|
460
|
+
if (f) a.done = y >= h;
|
|
461
|
+
else {
|
|
462
|
+
let T = 0;
|
|
463
|
+
p < 1 && (T = y === 0 ? R(v) : Un(x, y, w));
|
|
464
|
+
const A = Math.abs(T) <= s, V = Math.abs(o - w) <= i;
|
|
465
|
+
a.done = A && V;
|
|
466
|
+
}
|
|
467
|
+
return a.value = a.done ? o : w, a;
|
|
468
|
+
}, toString: () => {
|
|
469
|
+
const y = Math.min(Xn(C), Ze), w = Kn((T) => C.next(y * T).value, y, 30);
|
|
470
|
+
return y + "ms " + w;
|
|
471
|
+
} };
|
|
472
|
+
return C;
|
|
473
|
+
}
|
|
474
|
+
function qt({ keyframes: t, velocity: e = 0, power: n = 0.8, timeConstant: s = 325, bounceDamping: i = 10, bounceStiffness: r = 500, modifyTarget: o, min: a, max: l, restDelta: c = 0.5, restSpeed: u }) {
|
|
475
|
+
const h = t[0], d = { done: !1, value: h }, f = (T) => a === void 0 ? l : l === void 0 || Math.abs(a - T) < Math.abs(l - T) ? a : l;
|
|
476
|
+
let v = n * e;
|
|
477
|
+
const p = h + v, g = o === void 0 ? p : o(p);
|
|
478
|
+
g !== p && (v = g - h);
|
|
479
|
+
const m = (T) => -v * Math.exp(-T / s), S = (T) => g + m(T), x = (T) => {
|
|
480
|
+
const A = m(T), V = S(T);
|
|
481
|
+
d.done = Math.abs(A) <= c, d.value = d.done ? g : V;
|
|
482
|
+
};
|
|
483
|
+
let C, y;
|
|
484
|
+
const w = (T) => {
|
|
485
|
+
var A;
|
|
486
|
+
A = d.value, (a !== void 0 && A < a || l !== void 0 && A > l) && (C = T, y = _n({ keyframes: [d.value, f(d.value)], velocity: Un(S, T, d.value), damping: i, stiffness: r, restDelta: c, restSpeed: u }));
|
|
487
|
+
};
|
|
488
|
+
return w(0), { calculatedDuration: null, next: (T) => {
|
|
489
|
+
let A = !1;
|
|
490
|
+
return y || C !== void 0 || (A = !0, x(T), w(T)), C !== void 0 && T >= C ? y.next(T - C) : (!A && x(T), d);
|
|
491
|
+
} };
|
|
492
|
+
}
|
|
493
|
+
const gi = de(0.42, 0, 1, 1), yi = de(0, 0, 0.58, 1), Gn = de(0.42, 0, 0.58, 1), vt = (t) => Array.isArray(t) && typeof t[0] == "number", zt = { linear: $, easeIn: gi, easeInOut: Gn, easeOut: yi, circIn: lt, circInOut: Vn, circOut: js, backIn: at, backInOut: xn, backOut: Tn, anticipate: An }, Ht = (t) => {
|
|
494
|
+
if (vt(t)) {
|
|
495
|
+
U(t.length === 4, "Cubic bezier arrays must contain four numerical values.");
|
|
496
|
+
const [e, n, s, i] = t;
|
|
497
|
+
return de(e, n, s, i);
|
|
498
|
+
}
|
|
499
|
+
return typeof t == "string" ? (U(zt[t] !== void 0, `Invalid easing type '${t}'`), zt[t]) : t;
|
|
500
|
+
}, wi = (t, e) => (n) => e(t(n)), ke = (...t) => t.reduce(wi), Ee = (t, e, n) => t + (e - t) * n;
|
|
501
|
+
function Be(t, e, n) {
|
|
502
|
+
return n < 0 && (n += 1), n > 1 && (n -= 1), n < 1 / 6 ? t + 6 * (e - t) * n : n < 0.5 ? e : n < 2 / 3 ? t + (e - t) * (2 / 3 - n) * 6 : t;
|
|
503
|
+
}
|
|
504
|
+
function Se(t, e) {
|
|
505
|
+
return (n) => n > 0 ? e : t;
|
|
506
|
+
}
|
|
507
|
+
const Ne = (t, e, n) => {
|
|
508
|
+
const s = t * t, i = n * (e * e - s) + s;
|
|
509
|
+
return i < 0 ? 0 : Math.sqrt(i);
|
|
510
|
+
}, bi = [He, K, _];
|
|
511
|
+
function Xt(t) {
|
|
512
|
+
const e = (n = t, bi.find((i) => i.test(n)));
|
|
513
|
+
var n;
|
|
514
|
+
if (te(!!e, `'${t}' is not an animatable color. Use the equivalent color code instead.`), !e) return !1;
|
|
515
|
+
let s = e.parse(t);
|
|
516
|
+
return e === _ && (s = function({ hue: i, saturation: r, lightness: o, alpha: a }) {
|
|
517
|
+
i /= 360, o /= 100;
|
|
518
|
+
let l = 0, c = 0, u = 0;
|
|
519
|
+
if (r /= 100) {
|
|
520
|
+
const h = o < 0.5 ? o * (1 + r) : o + r - o * r, d = 2 * o - h;
|
|
521
|
+
l = Be(d, h, i + 1 / 3), c = Be(d, h, i), u = Be(d, h, i - 1 / 3);
|
|
522
|
+
} else l = c = u = o;
|
|
523
|
+
return { red: Math.round(255 * l), green: Math.round(255 * c), blue: Math.round(255 * u), alpha: a };
|
|
524
|
+
}(s)), s;
|
|
525
|
+
}
|
|
526
|
+
const _t = (t, e) => {
|
|
527
|
+
const n = Xt(t), s = Xt(e);
|
|
528
|
+
if (!n || !s) return Se(t, e);
|
|
529
|
+
const i = { ...n };
|
|
530
|
+
return (r) => (i.red = Ne(n.red, s.red, r), i.green = Ne(n.green, s.green, r), i.blue = Ne(n.blue, s.blue, r), i.alpha = Ee(n.alpha, s.alpha, r), K.transform(i));
|
|
531
|
+
}, Le = /* @__PURE__ */ new Set(["none", "hidden"]);
|
|
532
|
+
function Si(t, e) {
|
|
533
|
+
return (n) => Ee(t, e, n);
|
|
534
|
+
}
|
|
535
|
+
function gt(t) {
|
|
536
|
+
return typeof t == "number" ? Si : typeof t == "string" ? ut(t) ? Se : P.test(t) ? _t : xi : Array.isArray(t) ? Zn : typeof t == "object" ? P.test(t) ? _t : Ti : Se;
|
|
537
|
+
}
|
|
538
|
+
function Zn(t, e) {
|
|
539
|
+
const n = [...t], s = n.length, i = t.map((r, o) => gt(r)(r, e[o]));
|
|
540
|
+
return (r) => {
|
|
541
|
+
for (let o = 0; o < s; o++) n[o] = i[o](r);
|
|
542
|
+
return n;
|
|
543
|
+
};
|
|
544
|
+
}
|
|
545
|
+
function Ti(t, e) {
|
|
546
|
+
const n = { ...t, ...e }, s = {};
|
|
547
|
+
for (const i in n) t[i] !== void 0 && e[i] !== void 0 && (s[i] = gt(t[i])(t[i], e[i]));
|
|
548
|
+
return (i) => {
|
|
549
|
+
for (const r in s) n[r] = s[r](i);
|
|
550
|
+
return n;
|
|
551
|
+
};
|
|
552
|
+
}
|
|
553
|
+
const xi = (t, e) => {
|
|
554
|
+
const n = se.createTransformer(e), s = ce(t), i = ce(e);
|
|
555
|
+
return s.indexes.var.length === i.indexes.var.length && s.indexes.color.length === i.indexes.color.length && s.indexes.number.length >= i.indexes.number.length ? Le.has(t) && !i.values.length || Le.has(e) && !s.values.length ? function(r, o) {
|
|
556
|
+
return Le.has(r) ? (a) => a <= 0 ? r : o : (a) => a >= 1 ? o : r;
|
|
557
|
+
}(t, e) : ke(Zn(function(r, o) {
|
|
558
|
+
var a;
|
|
559
|
+
const l = [], c = { color: 0, var: 0, number: 0 };
|
|
560
|
+
for (let u = 0; u < o.values.length; u++) {
|
|
561
|
+
const h = o.types[u], d = r.indexes[h][c[h]], f = (a = r.values[d]) !== null && a !== void 0 ? a : 0;
|
|
562
|
+
l[u] = f, c[h]++;
|
|
563
|
+
}
|
|
564
|
+
return l;
|
|
565
|
+
}(s, i), i.values), n) : (te(!0, `Complex values '${t}' and '${e}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`), Se(t, e));
|
|
566
|
+
};
|
|
567
|
+
function Jn(t, e, n) {
|
|
568
|
+
return typeof t == "number" && typeof e == "number" && typeof n == "number" ? Ee(t, e, n) : gt(t)(t, e);
|
|
569
|
+
}
|
|
570
|
+
function Ai(t, e, { clamp: n = !0, ease: s, mixer: i } = {}) {
|
|
571
|
+
const r = t.length;
|
|
572
|
+
if (U(r === e.length, "Both input and output ranges must be the same length"), r === 1) return () => e[0];
|
|
573
|
+
if (r === 2 && t[0] === t[1]) return () => e[1];
|
|
574
|
+
t[0] > t[r - 1] && (t = [...t].reverse(), e = [...e].reverse());
|
|
575
|
+
const o = function(c, u, h) {
|
|
576
|
+
const d = [], f = h || Jn, v = c.length - 1;
|
|
577
|
+
for (let p = 0; p < v; p++) {
|
|
578
|
+
let g = f(c[p], c[p + 1]);
|
|
579
|
+
if (u) {
|
|
580
|
+
const m = Array.isArray(u) ? u[p] || $ : u;
|
|
581
|
+
g = ke(m, g);
|
|
582
|
+
}
|
|
583
|
+
d.push(g);
|
|
584
|
+
}
|
|
585
|
+
return d;
|
|
586
|
+
}(e, s, i), a = o.length, l = (c) => {
|
|
587
|
+
let u = 0;
|
|
588
|
+
if (a > 1) for (; u < t.length - 2 && !(c < t[u + 1]); u++) ;
|
|
589
|
+
const h = ft(t[u], t[u + 1], c);
|
|
590
|
+
return o[u](h);
|
|
591
|
+
};
|
|
592
|
+
return n ? (c) => l(Y(t[0], t[r - 1], c)) : l;
|
|
593
|
+
}
|
|
594
|
+
function Vi(t) {
|
|
595
|
+
const e = [0];
|
|
596
|
+
return function(n, s) {
|
|
597
|
+
const i = n[n.length - 1];
|
|
598
|
+
for (let r = 1; r <= s; r++) {
|
|
599
|
+
const o = ft(0, s, r);
|
|
600
|
+
n.push(Ee(i, 1, o));
|
|
601
|
+
}
|
|
602
|
+
}(e, t.length - 1), e;
|
|
603
|
+
}
|
|
604
|
+
function Te({ duration: t = 300, keyframes: e, times: n, ease: s = "easeInOut" }) {
|
|
605
|
+
const i = ((u) => Array.isArray(u) && typeof u[0] != "number")(s) ? s.map(Ht) : Ht(s), r = { done: !1, value: e[0] }, o = function(u, h) {
|
|
606
|
+
return u.map((d) => d * h);
|
|
607
|
+
}(n && n.length === e.length ? n : Vi(e), t), a = Ai(o, e, { ease: Array.isArray(i) ? i : (l = e, c = i, l.map(() => c || Gn).splice(0, l.length - 1)) });
|
|
608
|
+
var l, c;
|
|
609
|
+
return { calculatedDuration: t, next: (u) => (r.value = a(u), r.done = u >= t, r) };
|
|
610
|
+
}
|
|
611
|
+
const Ci = (t) => {
|
|
612
|
+
const e = ({ timestamp: n }) => t(n);
|
|
613
|
+
return { start: () => F.update(e, !0), stop: () => Ye(e), now: () => be.isProcessing ? be.timestamp : L.now() };
|
|
614
|
+
}, Mi = { decay: qt, inertia: qt, tween: Te, keyframes: Te, spring: _n }, Pi = (t) => t / 100;
|
|
615
|
+
class Je extends jn {
|
|
616
|
+
constructor(e) {
|
|
617
|
+
super(e), this.holdTime = null, this.cancelTime = null, this.currentTime = 0, this.playbackSpeed = 1, this.pendingPlayState = "running", this.startTime = null, this.state = "idle", this.stop = () => {
|
|
618
|
+
if (this.resolver.cancel(), this.isStopped = !0, this.state === "idle") return;
|
|
619
|
+
this.teardown();
|
|
620
|
+
const { onStop: a } = this.options;
|
|
621
|
+
a && a();
|
|
622
|
+
};
|
|
623
|
+
const { name: n, motionValue: s, element: i, keyframes: r } = this.options, o = (i == null ? void 0 : i.KeyframeResolver) || ct;
|
|
624
|
+
this.resolver = new o(r, (a, l) => this.onKeyframesResolved(a, l), n, s, i), this.resolver.scheduleResolve();
|
|
625
|
+
}
|
|
626
|
+
flatten() {
|
|
627
|
+
super.flatten(), this._resolved && Object.assign(this._resolved, this.initPlayback(this._resolved.keyframes));
|
|
628
|
+
}
|
|
629
|
+
initPlayback(e) {
|
|
630
|
+
const { type: n = "keyframes", repeat: s = 0, repeatDelay: i = 0, repeatType: r, velocity: o = 0 } = this.options, a = mt(n) ? n : Mi[n] || Te;
|
|
631
|
+
let l, c;
|
|
632
|
+
a !== Te && typeof e[0] != "number" && (process.env.NODE_ENV !== "production" && U(e.length === 2, `Only two keyframes currently supported with spring and inertia animations. Trying to animate ${e}`), l = ke(Pi, Jn(e[0], e[1])), e = [0, 100]);
|
|
633
|
+
const u = a({ ...this.options, keyframes: e });
|
|
634
|
+
r === "mirror" && (c = a({ ...this.options, keyframes: [...e].reverse(), velocity: -o })), u.calculatedDuration === null && (u.calculatedDuration = Xn(u));
|
|
635
|
+
const { calculatedDuration: h } = u, d = h + i;
|
|
636
|
+
return { generator: u, mirroredGenerator: c, mapPercentToKeyframes: l, calculatedDuration: h, resolvedDuration: d, totalDuration: d * (s + 1) - i };
|
|
637
|
+
}
|
|
638
|
+
onPostResolved() {
|
|
639
|
+
const { autoplay: e = !0 } = this.options;
|
|
640
|
+
this.play(), this.pendingPlayState !== "paused" && e ? this.state = this.pendingPlayState : this.pause();
|
|
641
|
+
}
|
|
642
|
+
tick(e, n = !1) {
|
|
643
|
+
const { resolved: s } = this;
|
|
644
|
+
if (!s) {
|
|
645
|
+
const { keyframes: A } = this.options;
|
|
646
|
+
return { done: !0, value: A[A.length - 1] };
|
|
647
|
+
}
|
|
648
|
+
const { finalKeyframe: i, generator: r, mirroredGenerator: o, mapPercentToKeyframes: a, keyframes: l, calculatedDuration: c, totalDuration: u, resolvedDuration: h } = s;
|
|
649
|
+
if (this.startTime === null) return r.next(0);
|
|
650
|
+
const { delay: d, repeat: f, repeatType: v, repeatDelay: p, onUpdate: g } = this.options;
|
|
651
|
+
this.speed > 0 ? this.startTime = Math.min(this.startTime, e) : this.speed < 0 && (this.startTime = Math.min(e - u / this.speed, this.startTime)), n ? this.currentTime = e : this.holdTime !== null ? this.currentTime = this.holdTime : this.currentTime = Math.round(e - this.startTime) * this.speed;
|
|
652
|
+
const m = this.currentTime - d * (this.speed >= 0 ? 1 : -1), S = this.speed >= 0 ? m < 0 : m > u;
|
|
653
|
+
this.currentTime = Math.max(m, 0), this.state === "finished" && this.holdTime === null && (this.currentTime = u);
|
|
654
|
+
let x = this.currentTime, C = r;
|
|
655
|
+
if (f) {
|
|
656
|
+
const A = Math.min(this.currentTime, u) / h;
|
|
657
|
+
let V = Math.floor(A), M = A % 1;
|
|
658
|
+
!M && A >= 1 && (M = 1), M === 1 && V--, V = Math.min(V, f + 1), V % 2 && (v === "reverse" ? (M = 1 - M, p && (M -= p / h)) : v === "mirror" && (C = o)), x = Y(0, 1, M) * h;
|
|
659
|
+
}
|
|
660
|
+
const y = S ? { done: !1, value: l[0] } : C.next(x);
|
|
661
|
+
a && (y.value = a(y.value));
|
|
662
|
+
let { done: w } = y;
|
|
663
|
+
S || c === null || (w = this.speed >= 0 ? this.currentTime >= u : this.currentTime <= 0);
|
|
664
|
+
const T = this.holdTime === null && (this.state === "finished" || this.state === "running" && w);
|
|
665
|
+
return T && i !== void 0 && (y.value = Pe(l, this.options, i)), g && g(y.value), T && this.finish(), y;
|
|
666
|
+
}
|
|
667
|
+
get duration() {
|
|
668
|
+
const { resolved: e } = this;
|
|
669
|
+
return e ? N(e.calculatedDuration) : 0;
|
|
670
|
+
}
|
|
671
|
+
get time() {
|
|
672
|
+
return N(this.currentTime);
|
|
673
|
+
}
|
|
674
|
+
set time(e) {
|
|
675
|
+
e = R(e), this.currentTime = e, this.holdTime !== null || this.speed === 0 ? this.holdTime = e : this.driver && (this.startTime = this.driver.now() - e / this.speed);
|
|
676
|
+
}
|
|
677
|
+
get speed() {
|
|
678
|
+
return this.playbackSpeed;
|
|
679
|
+
}
|
|
680
|
+
set speed(e) {
|
|
681
|
+
const n = this.playbackSpeed !== e;
|
|
682
|
+
this.playbackSpeed = e, n && (this.time = N(this.currentTime));
|
|
683
|
+
}
|
|
684
|
+
play() {
|
|
685
|
+
if (this.resolver.isScheduled || this.resolver.resume(), !this._resolved) return void (this.pendingPlayState = "running");
|
|
686
|
+
if (this.isStopped) return;
|
|
687
|
+
const { driver: e = Ci, onPlay: n, startTime: s } = this.options;
|
|
688
|
+
this.driver || (this.driver = e((r) => this.tick(r))), n && n();
|
|
689
|
+
const i = this.driver.now();
|
|
690
|
+
this.holdTime !== null ? this.startTime = i - this.holdTime : this.startTime ? this.state === "finished" && (this.startTime = i) : this.startTime = s ?? this.calcStartTime(), this.state === "finished" && this.updateFinishedPromise(), this.cancelTime = this.startTime, this.holdTime = null, this.state = "running", this.driver.start();
|
|
691
|
+
}
|
|
692
|
+
pause() {
|
|
693
|
+
var e;
|
|
694
|
+
this._resolved ? (this.state = "paused", this.holdTime = (e = this.currentTime) !== null && e !== void 0 ? e : 0) : this.pendingPlayState = "paused";
|
|
695
|
+
}
|
|
696
|
+
complete() {
|
|
697
|
+
this.state !== "running" && this.play(), this.pendingPlayState = this.state = "finished", this.holdTime = null;
|
|
698
|
+
}
|
|
699
|
+
finish() {
|
|
700
|
+
this.teardown(), this.state = "finished";
|
|
701
|
+
const { onComplete: e } = this.options;
|
|
702
|
+
e && e();
|
|
703
|
+
}
|
|
704
|
+
cancel() {
|
|
705
|
+
this.cancelTime !== null && this.tick(this.cancelTime), this.teardown(), this.updateFinishedPromise();
|
|
706
|
+
}
|
|
707
|
+
teardown() {
|
|
708
|
+
this.state = "idle", this.stopDriver(), this.resolveFinishedPromise(), this.updateFinishedPromise(), this.startTime = this.cancelTime = null, this.resolver.cancel();
|
|
709
|
+
}
|
|
710
|
+
stopDriver() {
|
|
711
|
+
this.driver && (this.driver.stop(), this.driver = void 0);
|
|
712
|
+
}
|
|
713
|
+
sample(e) {
|
|
714
|
+
return this.startTime = 0, this.tick(e, !0);
|
|
715
|
+
}
|
|
716
|
+
}
|
|
717
|
+
const ki = /* @__PURE__ */ new Set(["opacity", "clipPath", "filter", "transform"]);
|
|
718
|
+
function yt(t) {
|
|
719
|
+
let e;
|
|
720
|
+
return () => (e === void 0 && (e = t()), e);
|
|
721
|
+
}
|
|
722
|
+
const Ei = { linearEasing: void 0 };
|
|
723
|
+
function Fi(t, e) {
|
|
724
|
+
const n = yt(t);
|
|
725
|
+
return () => {
|
|
726
|
+
var s;
|
|
727
|
+
return (s = Ei[e]) !== null && s !== void 0 ? s : n();
|
|
728
|
+
};
|
|
729
|
+
}
|
|
730
|
+
const xe = Fi(() => {
|
|
731
|
+
try {
|
|
732
|
+
document.createElement("div").animate({ opacity: 0 }, { easing: "linear(0, 1)" });
|
|
733
|
+
} catch {
|
|
734
|
+
return !1;
|
|
735
|
+
}
|
|
736
|
+
return !0;
|
|
737
|
+
}, "linearEasing");
|
|
738
|
+
function Qn(t) {
|
|
739
|
+
return !!(typeof t == "function" && xe() || !t || typeof t == "string" && (t in Qe || xe()) || vt(t) || Array.isArray(t) && t.every(Qn));
|
|
740
|
+
}
|
|
741
|
+
const oe = ([t, e, n, s]) => `cubic-bezier(${t}, ${e}, ${n}, ${s})`, Qe = { linear: "linear", ease: "ease", easeIn: "ease-in", easeOut: "ease-out", easeInOut: "ease-in-out", circIn: oe([0, 0.65, 0.55, 1]), circOut: oe([0.55, 0, 1, 0.45]), backIn: oe([0.31, 0.01, 0.66, -0.59]), backOut: oe([0.33, 1.53, 0.69, 0.99]) };
|
|
742
|
+
function es(t, e) {
|
|
743
|
+
return t ? typeof t == "function" && xe() ? Kn(t, e) : vt(t) ? oe(t) : Array.isArray(t) ? t.map((n) => es(n, e) || Qe.easeOut) : Qe[t] : void 0;
|
|
744
|
+
}
|
|
745
|
+
function Oi(t, e, n, { delay: s = 0, duration: i = 300, repeat: r = 0, repeatType: o = "loop", ease: a = "easeInOut", times: l } = {}) {
|
|
746
|
+
const c = { [e]: n };
|
|
747
|
+
l && (c.offset = l);
|
|
748
|
+
const u = es(a, i);
|
|
749
|
+
return Array.isArray(u) && (c.easing = u), t.animate(c, { delay: s, duration: i, easing: Array.isArray(u) ? "linear" : u, fill: "both", iterations: r + 1, direction: o === "reverse" ? "alternate" : "normal" });
|
|
750
|
+
}
|
|
751
|
+
function Gt(t, e) {
|
|
752
|
+
t.timeline = e, t.onfinish = null;
|
|
753
|
+
}
|
|
754
|
+
const Ii = yt(() => Object.hasOwnProperty.call(Element.prototype, "animate")), Zt = { anticipate: An, backInOut: xn, circInOut: Vn };
|
|
755
|
+
class Jt extends jn {
|
|
756
|
+
constructor(e) {
|
|
757
|
+
super(e);
|
|
758
|
+
const { name: n, motionValue: s, element: i, keyframes: r } = this.options;
|
|
759
|
+
this.resolver = new $n(r, (o, a) => this.onKeyframesResolved(o, a), n, s, i), this.resolver.scheduleResolve();
|
|
760
|
+
}
|
|
761
|
+
initPlayback(e, n) {
|
|
762
|
+
var s;
|
|
763
|
+
let { duration: i = 300, times: r, ease: o, type: a, motionValue: l, name: c, startTime: u } = this.options;
|
|
764
|
+
if (!(!((s = l.owner) === null || s === void 0) && s.current)) return !1;
|
|
765
|
+
var h;
|
|
766
|
+
if (typeof o == "string" && xe() && o in Zt && (o = Zt[o]), mt((h = this.options).type) || h.type === "spring" || !Qn(h.ease)) {
|
|
767
|
+
const { onComplete: f, onUpdate: v, motionValue: p, element: g, ...m } = this.options, S = function(x, C) {
|
|
768
|
+
const y = new Je({ ...C, keyframes: x, repeat: 0, delay: 0, isGenerator: !0 });
|
|
769
|
+
let w = { done: !1, value: x[0] };
|
|
770
|
+
const T = [];
|
|
771
|
+
let A = 0;
|
|
772
|
+
for (; !w.done && A < 2e4; ) w = y.sample(A), T.push(w.value), A += 10;
|
|
773
|
+
return { times: void 0, keyframes: T, duration: A - 10, ease: "linear" };
|
|
774
|
+
}(e, m);
|
|
775
|
+
(e = S.keyframes).length === 1 && (e[1] = e[0]), i = S.duration, r = S.times, o = S.ease, a = "keyframes";
|
|
776
|
+
}
|
|
777
|
+
const d = Oi(l.owner.current, c, e, { ...this.options, duration: i, times: r, ease: o });
|
|
778
|
+
return d.startTime = u ?? this.calcStartTime(), this.pendingTimeline ? (Gt(d, this.pendingTimeline), this.pendingTimeline = void 0) : d.onfinish = () => {
|
|
779
|
+
const { onComplete: f } = this.options;
|
|
780
|
+
l.set(Pe(e, this.options, n)), f && f(), this.cancel(), this.resolveFinishedPromise();
|
|
781
|
+
}, { animation: d, duration: i, times: r, type: a, ease: o, keyframes: e };
|
|
782
|
+
}
|
|
783
|
+
get duration() {
|
|
784
|
+
const { resolved: e } = this;
|
|
785
|
+
if (!e) return 0;
|
|
786
|
+
const { duration: n } = e;
|
|
787
|
+
return N(n);
|
|
788
|
+
}
|
|
789
|
+
get time() {
|
|
790
|
+
const { resolved: e } = this;
|
|
791
|
+
if (!e) return 0;
|
|
792
|
+
const { animation: n } = e;
|
|
793
|
+
return N(n.currentTime || 0);
|
|
794
|
+
}
|
|
795
|
+
set time(e) {
|
|
796
|
+
const { resolved: n } = this;
|
|
797
|
+
if (!n) return;
|
|
798
|
+
const { animation: s } = n;
|
|
799
|
+
s.currentTime = R(e);
|
|
800
|
+
}
|
|
801
|
+
get speed() {
|
|
802
|
+
const { resolved: e } = this;
|
|
803
|
+
if (!e) return 1;
|
|
804
|
+
const { animation: n } = e;
|
|
805
|
+
return n.playbackRate;
|
|
806
|
+
}
|
|
807
|
+
set speed(e) {
|
|
808
|
+
const { resolved: n } = this;
|
|
809
|
+
if (!n) return;
|
|
810
|
+
const { animation: s } = n;
|
|
811
|
+
s.playbackRate = e;
|
|
812
|
+
}
|
|
813
|
+
get state() {
|
|
814
|
+
const { resolved: e } = this;
|
|
815
|
+
if (!e) return "idle";
|
|
816
|
+
const { animation: n } = e;
|
|
817
|
+
return n.playState;
|
|
818
|
+
}
|
|
819
|
+
get startTime() {
|
|
820
|
+
const { resolved: e } = this;
|
|
821
|
+
if (!e) return null;
|
|
822
|
+
const { animation: n } = e;
|
|
823
|
+
return n.startTime;
|
|
824
|
+
}
|
|
825
|
+
attachTimeline(e) {
|
|
826
|
+
if (this._resolved) {
|
|
827
|
+
const { resolved: n } = this;
|
|
828
|
+
if (!n) return $;
|
|
829
|
+
const { animation: s } = n;
|
|
830
|
+
Gt(s, e);
|
|
831
|
+
} else this.pendingTimeline = e;
|
|
832
|
+
return $;
|
|
833
|
+
}
|
|
834
|
+
play() {
|
|
835
|
+
if (this.isStopped) return;
|
|
836
|
+
const { resolved: e } = this;
|
|
837
|
+
if (!e) return;
|
|
838
|
+
const { animation: n } = e;
|
|
839
|
+
n.playState === "finished" && this.updateFinishedPromise(), n.play();
|
|
840
|
+
}
|
|
841
|
+
pause() {
|
|
842
|
+
const { resolved: e } = this;
|
|
843
|
+
if (!e) return;
|
|
844
|
+
const { animation: n } = e;
|
|
845
|
+
n.pause();
|
|
846
|
+
}
|
|
847
|
+
stop() {
|
|
848
|
+
if (this.resolver.cancel(), this.isStopped = !0, this.state === "idle") return;
|
|
849
|
+
this.resolveFinishedPromise(), this.updateFinishedPromise();
|
|
850
|
+
const { resolved: e } = this;
|
|
851
|
+
if (!e) return;
|
|
852
|
+
const { animation: n, keyframes: s, duration: i, type: r, ease: o, times: a } = e;
|
|
853
|
+
if (n.playState === "idle" || n.playState === "finished") return;
|
|
854
|
+
if (this.time) {
|
|
855
|
+
const { motionValue: c, onUpdate: u, onComplete: h, element: d, ...f } = this.options, v = new Je({ ...f, keyframes: s, duration: i, type: r, ease: o, times: a, isGenerator: !0 }), p = R(this.time);
|
|
856
|
+
c.setWithVelocity(v.sample(p - 10).value, v.sample(p).value, 10);
|
|
857
|
+
}
|
|
858
|
+
const { onStop: l } = this.options;
|
|
859
|
+
l && l(), this.cancel();
|
|
860
|
+
}
|
|
861
|
+
complete() {
|
|
862
|
+
const { resolved: e } = this;
|
|
863
|
+
e && e.animation.finish();
|
|
864
|
+
}
|
|
865
|
+
cancel() {
|
|
866
|
+
const { resolved: e } = this;
|
|
867
|
+
e && e.animation.cancel();
|
|
868
|
+
}
|
|
869
|
+
static supports(e) {
|
|
870
|
+
const { motionValue: n, name: s, repeatDelay: i, repeatType: r, damping: o, type: a } = e;
|
|
871
|
+
return Ii() && s && ki.has(s) && n && n.owner && n.owner.current instanceof HTMLElement && !n.owner.getProps().onUpdate && !i && r !== "mirror" && o !== 0 && a !== "inertia";
|
|
872
|
+
}
|
|
873
|
+
}
|
|
874
|
+
const Ri = yt(() => window.ScrollTimeline !== void 0);
|
|
875
|
+
class Di {
|
|
876
|
+
constructor(e) {
|
|
877
|
+
this.stop = () => this.runAll("stop"), this.animations = e.filter(Boolean);
|
|
878
|
+
}
|
|
879
|
+
then(e, n) {
|
|
880
|
+
return Promise.all(this.animations).then(e).catch(n);
|
|
881
|
+
}
|
|
882
|
+
getAll(e) {
|
|
883
|
+
return this.animations[0][e];
|
|
884
|
+
}
|
|
885
|
+
setAll(e, n) {
|
|
886
|
+
for (let s = 0; s < this.animations.length; s++) this.animations[s][e] = n;
|
|
887
|
+
}
|
|
888
|
+
attachTimeline(e, n) {
|
|
889
|
+
const s = this.animations.map((i) => Ri() && i.attachTimeline ? i.attachTimeline(e) : n(i));
|
|
890
|
+
return () => {
|
|
891
|
+
s.forEach((i, r) => {
|
|
892
|
+
i && i(), this.animations[r].stop();
|
|
893
|
+
});
|
|
894
|
+
};
|
|
895
|
+
}
|
|
896
|
+
get time() {
|
|
897
|
+
return this.getAll("time");
|
|
898
|
+
}
|
|
899
|
+
set time(e) {
|
|
900
|
+
this.setAll("time", e);
|
|
901
|
+
}
|
|
902
|
+
get speed() {
|
|
903
|
+
return this.getAll("speed");
|
|
904
|
+
}
|
|
905
|
+
set speed(e) {
|
|
906
|
+
this.setAll("speed", e);
|
|
907
|
+
}
|
|
908
|
+
get startTime() {
|
|
909
|
+
return this.getAll("startTime");
|
|
910
|
+
}
|
|
911
|
+
get duration() {
|
|
912
|
+
let e = 0;
|
|
913
|
+
for (let n = 0; n < this.animations.length; n++) e = Math.max(e, this.animations[n].duration);
|
|
914
|
+
return e;
|
|
915
|
+
}
|
|
916
|
+
runAll(e) {
|
|
917
|
+
this.animations.forEach((n) => n[e]());
|
|
918
|
+
}
|
|
919
|
+
flatten() {
|
|
920
|
+
this.runAll("flatten");
|
|
921
|
+
}
|
|
922
|
+
play() {
|
|
923
|
+
this.runAll("play");
|
|
924
|
+
}
|
|
925
|
+
pause() {
|
|
926
|
+
this.runAll("pause");
|
|
927
|
+
}
|
|
928
|
+
cancel() {
|
|
929
|
+
this.runAll("cancel");
|
|
930
|
+
}
|
|
931
|
+
complete() {
|
|
932
|
+
this.runAll("complete");
|
|
933
|
+
}
|
|
934
|
+
}
|
|
935
|
+
const Bi = (t, e, n, s = {}, i, r) => (o) => {
|
|
936
|
+
const a = yn(s, t) || {}, l = a.delay || s.delay || 0;
|
|
937
|
+
let { elapsed: c = 0 } = s;
|
|
938
|
+
c -= R(l);
|
|
939
|
+
let u = { keyframes: Array.isArray(n) ? n : [null, n], ease: "easeOut", velocity: e.getVelocity(), ...a, delay: -c, onUpdate: (d) => {
|
|
940
|
+
e.set(d), a.onUpdate && a.onUpdate(d);
|
|
941
|
+
}, onComplete: () => {
|
|
942
|
+
o(), a.onComplete && a.onComplete();
|
|
943
|
+
}, name: t, motionValue: e, element: r ? void 0 : i };
|
|
944
|
+
(function({ when: d, delay: f, delayChildren: v, staggerChildren: p, staggerDirection: g, repeat: m, repeatType: S, repeatDelay: x, from: C, elapsed: y, ...w }) {
|
|
945
|
+
return !!Object.keys(w).length;
|
|
946
|
+
})(a) || (u = { ...u, ...Ns(t, u) }), u.duration && (u.duration = R(u.duration)), u.repeatDelay && (u.repeatDelay = R(u.repeatDelay)), u.from !== void 0 && (u.keyframes[0] = u.from);
|
|
947
|
+
let h = !1;
|
|
948
|
+
if ((u.type === !1 || u.duration === 0 && !u.repeatDelay) && (u.duration = 0, u.delay === 0 && (h = !0)), h && !r && e.get() !== void 0) {
|
|
949
|
+
const d = Pe(u.keyframes, a);
|
|
950
|
+
if (d !== void 0) return F.update(() => {
|
|
951
|
+
u.onUpdate(d), u.onComplete();
|
|
952
|
+
}), new Di([]);
|
|
953
|
+
}
|
|
954
|
+
return !r && Jt.supports(u) ? new Jt(u) : new Je(u);
|
|
955
|
+
};
|
|
956
|
+
class ts {
|
|
957
|
+
constructor() {
|
|
958
|
+
this.subscriptions = [];
|
|
959
|
+
}
|
|
960
|
+
add(e) {
|
|
961
|
+
var n, s;
|
|
962
|
+
return n = this.subscriptions, s = e, n.indexOf(s) === -1 && n.push(s), () => function(i, r) {
|
|
963
|
+
const o = i.indexOf(r);
|
|
964
|
+
o > -1 && i.splice(o, 1);
|
|
965
|
+
}(this.subscriptions, e);
|
|
966
|
+
}
|
|
967
|
+
notify(e, n, s) {
|
|
968
|
+
const i = this.subscriptions.length;
|
|
969
|
+
if (i) if (i === 1) this.subscriptions[0](e, n, s);
|
|
970
|
+
else for (let r = 0; r < i; r++) {
|
|
971
|
+
const o = this.subscriptions[r];
|
|
972
|
+
o && o(e, n, s);
|
|
973
|
+
}
|
|
974
|
+
}
|
|
975
|
+
getSize() {
|
|
976
|
+
return this.subscriptions.length;
|
|
977
|
+
}
|
|
978
|
+
clear() {
|
|
979
|
+
this.subscriptions.length = 0;
|
|
980
|
+
}
|
|
981
|
+
}
|
|
982
|
+
class Ni {
|
|
983
|
+
constructor(e, n = {}) {
|
|
984
|
+
this.version = "11.15.0", this.canTrackVelocity = null, this.events = {}, this.updateAndNotify = (s, i = !0) => {
|
|
985
|
+
const r = L.now();
|
|
986
|
+
this.updatedAt !== r && this.setPrevFrameValue(), this.prev = this.current, this.setCurrent(s), this.current !== this.prev && this.events.change && this.events.change.notify(this.current), i && this.events.renderRequest && this.events.renderRequest.notify(this.current);
|
|
987
|
+
}, this.hasAnimated = !1, this.setCurrent(e), this.owner = n.owner;
|
|
988
|
+
}
|
|
989
|
+
setCurrent(e) {
|
|
990
|
+
var n;
|
|
991
|
+
this.current = e, this.updatedAt = L.now(), this.canTrackVelocity === null && e !== void 0 && (this.canTrackVelocity = (n = this.current, !isNaN(parseFloat(n))));
|
|
992
|
+
}
|
|
993
|
+
setPrevFrameValue(e = this.current) {
|
|
994
|
+
this.prevFrameValue = e, this.prevUpdatedAt = this.updatedAt;
|
|
995
|
+
}
|
|
996
|
+
onChange(e) {
|
|
997
|
+
return process.env.NODE_ENV !== "production" && we(!1, 'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'), this.on("change", e);
|
|
998
|
+
}
|
|
999
|
+
on(e, n) {
|
|
1000
|
+
this.events[e] || (this.events[e] = new ts());
|
|
1001
|
+
const s = this.events[e].add(n);
|
|
1002
|
+
return e === "change" ? () => {
|
|
1003
|
+
s(), F.read(() => {
|
|
1004
|
+
this.events.change.getSize() || this.stop();
|
|
1005
|
+
});
|
|
1006
|
+
} : s;
|
|
1007
|
+
}
|
|
1008
|
+
clearListeners() {
|
|
1009
|
+
for (const e in this.events) this.events[e].clear();
|
|
1010
|
+
}
|
|
1011
|
+
attach(e, n) {
|
|
1012
|
+
this.passiveEffect = e, this.stopPassiveEffect = n;
|
|
1013
|
+
}
|
|
1014
|
+
set(e, n = !0) {
|
|
1015
|
+
n && this.passiveEffect ? this.passiveEffect(e, this.updateAndNotify) : this.updateAndNotify(e, n);
|
|
1016
|
+
}
|
|
1017
|
+
setWithVelocity(e, n, s) {
|
|
1018
|
+
this.set(n), this.prev = void 0, this.prevFrameValue = e, this.prevUpdatedAt = this.updatedAt - s;
|
|
1019
|
+
}
|
|
1020
|
+
jump(e, n = !0) {
|
|
1021
|
+
this.updateAndNotify(e), this.prev = e, this.prevUpdatedAt = this.prevFrameValue = void 0, n && this.stop(), this.stopPassiveEffect && this.stopPassiveEffect();
|
|
1022
|
+
}
|
|
1023
|
+
get() {
|
|
1024
|
+
return this.current;
|
|
1025
|
+
}
|
|
1026
|
+
getPrevious() {
|
|
1027
|
+
return this.prev;
|
|
1028
|
+
}
|
|
1029
|
+
getVelocity() {
|
|
1030
|
+
const e = L.now();
|
|
1031
|
+
if (!this.canTrackVelocity || this.prevFrameValue === void 0 || e - this.updatedAt > 30) return 0;
|
|
1032
|
+
const n = Math.min(this.updatedAt - this.prevUpdatedAt, 30);
|
|
1033
|
+
return Wn(parseFloat(this.current) - parseFloat(this.prevFrameValue), n);
|
|
1034
|
+
}
|
|
1035
|
+
start(e) {
|
|
1036
|
+
return this.stop(), new Promise((n) => {
|
|
1037
|
+
this.hasAnimated = !0, this.animation = e(n), this.events.animationStart && this.events.animationStart.notify();
|
|
1038
|
+
}).then(() => {
|
|
1039
|
+
this.events.animationComplete && this.events.animationComplete.notify(), this.clearAnimation();
|
|
1040
|
+
});
|
|
1041
|
+
}
|
|
1042
|
+
stop() {
|
|
1043
|
+
this.animation && (this.animation.stop(), this.events.animationCancel && this.events.animationCancel.notify()), this.clearAnimation();
|
|
1044
|
+
}
|
|
1045
|
+
isAnimating() {
|
|
1046
|
+
return !!this.animation;
|
|
1047
|
+
}
|
|
1048
|
+
clearAnimation() {
|
|
1049
|
+
delete this.animation;
|
|
1050
|
+
}
|
|
1051
|
+
destroy() {
|
|
1052
|
+
this.clearListeners(), this.stop(), this.stopPassiveEffect && this.stopPassiveEffect();
|
|
1053
|
+
}
|
|
1054
|
+
}
|
|
1055
|
+
function ye(t, e) {
|
|
1056
|
+
return new Ni(t, e);
|
|
1057
|
+
}
|
|
1058
|
+
function Li(t, e, n) {
|
|
1059
|
+
t.hasValue(e) ? t.getValue(e).set(n) : t.addValue(e, ye(n));
|
|
1060
|
+
}
|
|
1061
|
+
const wt = (t) => t.replace(/([a-z])([A-Z])/gu, "$1-$2").toLowerCase(), ns = "data-" + wt("framerAppearId");
|
|
1062
|
+
function $i(t) {
|
|
1063
|
+
return t.props[ns];
|
|
1064
|
+
}
|
|
1065
|
+
const E = (t) => !!(t && t.getVelocity);
|
|
1066
|
+
function ji(t, e) {
|
|
1067
|
+
const n = t.getValue("willChange");
|
|
1068
|
+
if (s = n, !!(E(s) && s.add)) return n.add(e);
|
|
1069
|
+
var s;
|
|
1070
|
+
}
|
|
1071
|
+
function Ki({ protectedKeys: t, needsAnimating: e }, n) {
|
|
1072
|
+
const s = t.hasOwnProperty(n) && e[n] !== !0;
|
|
1073
|
+
return e[n] = !1, s;
|
|
1074
|
+
}
|
|
1075
|
+
function ss(t, e, { delay: n = 0, transitionOverride: s, type: i } = {}) {
|
|
1076
|
+
var r;
|
|
1077
|
+
let { transition: o = t.getDefaultTransition(), transitionEnd: a, ...l } = e;
|
|
1078
|
+
s && (o = s);
|
|
1079
|
+
const c = [], u = i && t.animationState && t.animationState.getState()[i];
|
|
1080
|
+
for (const h in l) {
|
|
1081
|
+
const d = t.getValue(h, (r = t.latestValues[h]) !== null && r !== void 0 ? r : null), f = l[h];
|
|
1082
|
+
if (f === void 0 || u && Ki(u, h)) continue;
|
|
1083
|
+
const v = { delay: n, ...yn(o || {}, h) };
|
|
1084
|
+
let p = !1;
|
|
1085
|
+
if (window.MotionHandoffAnimation) {
|
|
1086
|
+
const m = $i(t);
|
|
1087
|
+
if (m) {
|
|
1088
|
+
const S = window.MotionHandoffAnimation(m, h, F);
|
|
1089
|
+
S !== null && (v.startTime = S, p = !0);
|
|
1090
|
+
}
|
|
1091
|
+
}
|
|
1092
|
+
ji(t, h), d.start(Bi(h, d, f, t.shouldReduceMotion && q.has(h) ? { type: !1 } : v, t, p));
|
|
1093
|
+
const g = d.animation;
|
|
1094
|
+
g && c.push(g);
|
|
1095
|
+
}
|
|
1096
|
+
return a && Promise.all(c).then(() => {
|
|
1097
|
+
F.update(() => {
|
|
1098
|
+
a && function(h, d) {
|
|
1099
|
+
const f = Me(h, d);
|
|
1100
|
+
let { transitionEnd: v = {}, transition: p = {}, ...g } = f || {};
|
|
1101
|
+
g = { ...g, ...v };
|
|
1102
|
+
for (const S in g) Li(h, S, (m = g[S], Ue(m) ? m[m.length - 1] || 0 : m));
|
|
1103
|
+
var m;
|
|
1104
|
+
}(t, a);
|
|
1105
|
+
});
|
|
1106
|
+
}), c;
|
|
1107
|
+
}
|
|
1108
|
+
function et(t, e, n = {}) {
|
|
1109
|
+
var s;
|
|
1110
|
+
const i = Me(t, e, n.type === "exit" ? (s = t.presenceContext) === null || s === void 0 ? void 0 : s.custom : void 0);
|
|
1111
|
+
let { transition: r = t.getDefaultTransition() || {} } = i || {};
|
|
1112
|
+
n.transitionOverride && (r = n.transitionOverride);
|
|
1113
|
+
const o = i ? () => Promise.all(ss(t, i, n)) : () => Promise.resolve(), a = t.variantChildren && t.variantChildren.size ? (c = 0) => {
|
|
1114
|
+
const { delayChildren: u = 0, staggerChildren: h, staggerDirection: d } = r;
|
|
1115
|
+
return function(f, v, p = 0, g = 0, m = 1, S) {
|
|
1116
|
+
const x = [], C = (f.variantChildren.size - 1) * g, y = m === 1 ? (w = 0) => w * g : (w = 0) => C - w * g;
|
|
1117
|
+
return Array.from(f.variantChildren).sort(Wi).forEach((w, T) => {
|
|
1118
|
+
w.notify("AnimationStart", v), x.push(et(w, v, { ...S, delay: p + y(T) }).then(() => w.notify("AnimationComplete", v)));
|
|
1119
|
+
}), Promise.all(x);
|
|
1120
|
+
}(t, e, u + c, h, d, n);
|
|
1121
|
+
} : () => Promise.resolve(), { when: l } = r;
|
|
1122
|
+
if (l) {
|
|
1123
|
+
const [c, u] = l === "beforeChildren" ? [o, a] : [a, o];
|
|
1124
|
+
return c().then(() => u());
|
|
1125
|
+
}
|
|
1126
|
+
return Promise.all([o(), a(n.delay)]);
|
|
1127
|
+
}
|
|
1128
|
+
function Wi(t, e) {
|
|
1129
|
+
return t.sortNodePosition(e);
|
|
1130
|
+
}
|
|
1131
|
+
const Ui = ot.length;
|
|
1132
|
+
function is(t) {
|
|
1133
|
+
if (!t) return;
|
|
1134
|
+
if (!t.isControllingVariants) {
|
|
1135
|
+
const n = t.parent && is(t.parent) || {};
|
|
1136
|
+
return t.props.initial !== void 0 && (n.initial = t.props.initial), n;
|
|
1137
|
+
}
|
|
1138
|
+
const e = {};
|
|
1139
|
+
for (let n = 0; n < Ui; n++) {
|
|
1140
|
+
const s = ot[n], i = t.props[s];
|
|
1141
|
+
(le(i) || i === !1) && (e[s] = i);
|
|
1142
|
+
}
|
|
1143
|
+
return e;
|
|
1144
|
+
}
|
|
1145
|
+
const Yi = [...rt].reverse(), qi = rt.length;
|
|
1146
|
+
function zi(t) {
|
|
1147
|
+
return (e) => Promise.all(e.map(({ animation: n, options: s }) => function(i, r, o = {}) {
|
|
1148
|
+
let a;
|
|
1149
|
+
if (i.notify("AnimationStart", r), Array.isArray(r)) {
|
|
1150
|
+
const l = r.map((c) => et(i, c, o));
|
|
1151
|
+
a = Promise.all(l);
|
|
1152
|
+
} else if (typeof r == "string") a = et(i, r, o);
|
|
1153
|
+
else {
|
|
1154
|
+
const l = typeof r == "function" ? Me(i, r, o.custom) : r;
|
|
1155
|
+
a = Promise.all(ss(i, l, o));
|
|
1156
|
+
}
|
|
1157
|
+
return a.then(() => {
|
|
1158
|
+
i.notify("AnimationComplete", r);
|
|
1159
|
+
});
|
|
1160
|
+
}(t, n, s)));
|
|
1161
|
+
}
|
|
1162
|
+
function Hi(t) {
|
|
1163
|
+
let e = zi(t), n = Qt(), s = !0;
|
|
1164
|
+
const i = (o) => (a, l) => {
|
|
1165
|
+
var c;
|
|
1166
|
+
const u = Me(t, l, o === "exit" ? (c = t.presenceContext) === null || c === void 0 ? void 0 : c.custom : void 0);
|
|
1167
|
+
if (u) {
|
|
1168
|
+
const { transition: h, transitionEnd: d, ...f } = u;
|
|
1169
|
+
a = { ...a, ...f, ...d };
|
|
1170
|
+
}
|
|
1171
|
+
return a;
|
|
1172
|
+
};
|
|
1173
|
+
function r(o) {
|
|
1174
|
+
const { props: a } = t, l = is(t.parent) || {}, c = [], u = /* @__PURE__ */ new Set();
|
|
1175
|
+
let h = {}, d = 1 / 0;
|
|
1176
|
+
for (let v = 0; v < qi; v++) {
|
|
1177
|
+
const p = Yi[v], g = n[p], m = a[p] !== void 0 ? a[p] : l[p], S = le(m), x = p === o ? g.isActive : null;
|
|
1178
|
+
x === !1 && (d = v);
|
|
1179
|
+
let C = m === l[p] && m !== a[p] && S;
|
|
1180
|
+
if (C && s && t.manuallyAnimateOnMount && (C = !1), g.protectedKeys = { ...h }, !g.isActive && x === null || !m && !g.prevProp || Ce(m) || typeof m == "boolean") continue;
|
|
1181
|
+
const y = Xi(g.prevProp, m);
|
|
1182
|
+
let w = y || p === o && g.isActive && !C && S || v > d && S, T = !1;
|
|
1183
|
+
const A = Array.isArray(m) ? m : [m];
|
|
1184
|
+
let V = A.reduce(i(p), {});
|
|
1185
|
+
x === !1 && (V = {});
|
|
1186
|
+
const { prevResolvedValues: M = {} } = g, Ie = { ...M, ...V }, ie = (k) => {
|
|
1187
|
+
w = !0, u.has(k) && (T = !0, u.delete(k)), g.needsAnimating[k] = !0;
|
|
1188
|
+
const D = t.getValue(k);
|
|
1189
|
+
D && (D.liveStyle = !1);
|
|
1190
|
+
};
|
|
1191
|
+
for (const k in Ie) {
|
|
1192
|
+
const D = V[k], Re = M[k];
|
|
1193
|
+
if (h.hasOwnProperty(k)) continue;
|
|
1194
|
+
let Mt = !1;
|
|
1195
|
+
Mt = Ue(D) && Ue(Re) ? !gn(D, Re) : D !== Re, Mt ? D != null ? ie(k) : u.add(k) : D !== void 0 && u.has(k) ? ie(k) : g.protectedKeys[k] = !0;
|
|
1196
|
+
}
|
|
1197
|
+
g.prevProp = m, g.prevResolvedValues = V, g.isActive && (h = { ...h, ...V }), s && t.blockInitialAnimation && (w = !1), w && (!(C && y) || T) && c.push(...A.map((k) => ({ animation: k, options: { type: p } })));
|
|
1198
|
+
}
|
|
1199
|
+
if (u.size) {
|
|
1200
|
+
const v = {};
|
|
1201
|
+
u.forEach((p) => {
|
|
1202
|
+
const g = t.getBaseTarget(p), m = t.getValue(p);
|
|
1203
|
+
m && (m.liveStyle = !0), v[p] = g ?? null;
|
|
1204
|
+
}), c.push({ animation: v });
|
|
1205
|
+
}
|
|
1206
|
+
let f = !!c.length;
|
|
1207
|
+
return !s || a.initial !== !1 && a.initial !== a.animate || t.manuallyAnimateOnMount || (f = !1), s = !1, f ? e(c) : Promise.resolve();
|
|
1208
|
+
}
|
|
1209
|
+
return { animateChanges: r, setActive: function(o, a) {
|
|
1210
|
+
var l;
|
|
1211
|
+
if (n[o].isActive === a) return Promise.resolve();
|
|
1212
|
+
(l = t.variantChildren) === null || l === void 0 || l.forEach((u) => {
|
|
1213
|
+
var h;
|
|
1214
|
+
return (h = u.animationState) === null || h === void 0 ? void 0 : h.setActive(o, a);
|
|
1215
|
+
}), n[o].isActive = a;
|
|
1216
|
+
const c = r(o);
|
|
1217
|
+
for (const u in n) n[u].protectedKeys = {};
|
|
1218
|
+
return c;
|
|
1219
|
+
}, setAnimateFunction: function(o) {
|
|
1220
|
+
e = o(t);
|
|
1221
|
+
}, getState: () => n, reset: () => {
|
|
1222
|
+
n = Qt(), s = !0;
|
|
1223
|
+
} };
|
|
1224
|
+
}
|
|
1225
|
+
function Xi(t, e) {
|
|
1226
|
+
return typeof e == "string" ? e !== t : !!Array.isArray(e) && !gn(e, t);
|
|
1227
|
+
}
|
|
1228
|
+
function j(t = !1) {
|
|
1229
|
+
return { isActive: t, protectedKeys: {}, needsAnimating: {}, prevResolvedValues: {} };
|
|
1230
|
+
}
|
|
1231
|
+
function Qt() {
|
|
1232
|
+
return { animate: j(!0), whileInView: j(), whileHover: j(), whileTap: j(), whileDrag: j(), whileFocus: j(), exit: j() };
|
|
1233
|
+
}
|
|
1234
|
+
class G {
|
|
1235
|
+
constructor(e) {
|
|
1236
|
+
this.isMounted = !1, this.node = e;
|
|
1237
|
+
}
|
|
1238
|
+
update() {
|
|
1239
|
+
}
|
|
1240
|
+
}
|
|
1241
|
+
let _i = 0;
|
|
1242
|
+
const Gi = { animation: { Feature: class extends G {
|
|
1243
|
+
constructor(t) {
|
|
1244
|
+
super(t), t.animationState || (t.animationState = Hi(t));
|
|
1245
|
+
}
|
|
1246
|
+
updateAnimationControlsSubscription() {
|
|
1247
|
+
const { animate: t } = this.node.getProps();
|
|
1248
|
+
Ce(t) && (this.unmountControls = t.subscribe(this.node));
|
|
1249
|
+
}
|
|
1250
|
+
mount() {
|
|
1251
|
+
this.updateAnimationControlsSubscription();
|
|
1252
|
+
}
|
|
1253
|
+
update() {
|
|
1254
|
+
const { animate: t } = this.node.getProps(), { animate: e } = this.node.prevProps || {};
|
|
1255
|
+
t !== e && this.updateAnimationControlsSubscription();
|
|
1256
|
+
}
|
|
1257
|
+
unmount() {
|
|
1258
|
+
var t;
|
|
1259
|
+
this.node.animationState.reset(), (t = this.unmountControls) === null || t === void 0 || t.call(this);
|
|
1260
|
+
}
|
|
1261
|
+
} }, exit: { Feature: class extends G {
|
|
1262
|
+
constructor() {
|
|
1263
|
+
super(...arguments), this.id = _i++;
|
|
1264
|
+
}
|
|
1265
|
+
update() {
|
|
1266
|
+
if (!this.node.presenceContext) return;
|
|
1267
|
+
const { isPresent: t, onExitComplete: e } = this.node.presenceContext, { isPresent: n } = this.node.prevPresenceContext || {};
|
|
1268
|
+
if (!this.node.animationState || t === n) return;
|
|
1269
|
+
const s = this.node.animationState.setActive("exit", !t);
|
|
1270
|
+
e && !t && s.then(() => e(this.id));
|
|
1271
|
+
}
|
|
1272
|
+
mount() {
|
|
1273
|
+
const { register: t } = this.node.presenceContext || {};
|
|
1274
|
+
t && (this.unmount = t(this.id));
|
|
1275
|
+
}
|
|
1276
|
+
unmount() {
|
|
1277
|
+
}
|
|
1278
|
+
} } }, Zi = !1;
|
|
1279
|
+
function rs(t) {
|
|
1280
|
+
return { point: { x: t.pageX, y: t.pageY } };
|
|
1281
|
+
}
|
|
1282
|
+
function en(t, e, n, s = { passive: !0 }) {
|
|
1283
|
+
return t.addEventListener(e, n, s), () => t.removeEventListener(e, n);
|
|
1284
|
+
}
|
|
1285
|
+
function os(t) {
|
|
1286
|
+
return t && typeof t == "object" && Object.prototype.hasOwnProperty.call(t, "current");
|
|
1287
|
+
}
|
|
1288
|
+
const Ji = () => ({ x: { min: 0, max: 0 }, y: { min: 0, max: 0 } }), as = ee(null), Qi = ee({}), er = ee({}), tr = {}, { schedule: nr, cancel: eo } = wn(queueMicrotask, !1);
|
|
1289
|
+
function sr(t) {
|
|
1290
|
+
const e = E(t) ? t.get() : t;
|
|
1291
|
+
return n = e, n && typeof n == "object" && n.mix && n.toValue ? e.toValue() : e;
|
|
1292
|
+
var n;
|
|
1293
|
+
}
|
|
1294
|
+
function ls(t, e) {
|
|
1295
|
+
const n = function(i) {
|
|
1296
|
+
if (i instanceof Element) return [i];
|
|
1297
|
+
if (typeof i == "string") {
|
|
1298
|
+
const r = document.querySelectorAll(i);
|
|
1299
|
+
return r ? Array.from(r) : [];
|
|
1300
|
+
}
|
|
1301
|
+
return Array.from(i);
|
|
1302
|
+
}(t), s = new AbortController();
|
|
1303
|
+
return [n, { passive: !0, ...e, signal: s.signal }, () => s.abort()];
|
|
1304
|
+
}
|
|
1305
|
+
function tn(t) {
|
|
1306
|
+
return (e) => {
|
|
1307
|
+
e.pointerType === "touch" || Zi || t(e);
|
|
1308
|
+
};
|
|
1309
|
+
}
|
|
1310
|
+
function nn(t, e, n) {
|
|
1311
|
+
const { props: s } = t;
|
|
1312
|
+
t.animationState && s.whileHover && t.animationState.setActive("whileHover", n === "Start");
|
|
1313
|
+
const i = s["onHover" + n];
|
|
1314
|
+
i && F.postRender(() => i(e, rs(e)));
|
|
1315
|
+
}
|
|
1316
|
+
const re = /* @__PURE__ */ new WeakSet();
|
|
1317
|
+
function sn(t) {
|
|
1318
|
+
return (e) => {
|
|
1319
|
+
e.key === "Enter" && t(e);
|
|
1320
|
+
};
|
|
1321
|
+
}
|
|
1322
|
+
function $e(t, e) {
|
|
1323
|
+
t.dispatchEvent(new PointerEvent("pointer" + e, { isPrimary: !0, bubbles: !0 }));
|
|
1324
|
+
}
|
|
1325
|
+
const ir = /* @__PURE__ */ new Set(["BUTTON", "INPUT", "SELECT", "TEXTAREA", "A"]), us = (t, e) => !!e && (t === e || us(t, e.parentElement));
|
|
1326
|
+
function rn(t) {
|
|
1327
|
+
return ((e) => e.pointerType === "mouse" ? typeof e.button != "number" || e.button <= 0 : e.isPrimary !== !1)(t) && !0;
|
|
1328
|
+
}
|
|
1329
|
+
function rr(t, e, n = {}) {
|
|
1330
|
+
const [s, i, r] = ls(t, n), o = (a) => {
|
|
1331
|
+
const l = a.currentTarget;
|
|
1332
|
+
if (!rn(a) || re.has(l)) return;
|
|
1333
|
+
re.add(l);
|
|
1334
|
+
const c = e(a), u = (f, v) => {
|
|
1335
|
+
window.removeEventListener("pointerup", h), window.removeEventListener("pointercancel", d), rn(f) && re.has(l) && (re.delete(l), c && c(f, { success: v }));
|
|
1336
|
+
}, h = (f) => {
|
|
1337
|
+
u(f, n.useGlobalTarget || us(l, f.target));
|
|
1338
|
+
}, d = (f) => {
|
|
1339
|
+
u(f, !1);
|
|
1340
|
+
};
|
|
1341
|
+
window.addEventListener("pointerup", h, i), window.addEventListener("pointercancel", d, i);
|
|
1342
|
+
};
|
|
1343
|
+
return s.forEach((a) => {
|
|
1344
|
+
(function(l) {
|
|
1345
|
+
return ir.has(l.tagName) || l.tabIndex !== -1;
|
|
1346
|
+
})(a) || (a.tabIndex = 0), (n.useGlobalTarget ? window : a).addEventListener("pointerdown", o, i), a.addEventListener("focus", (l) => ((c, u) => {
|
|
1347
|
+
const h = c.currentTarget;
|
|
1348
|
+
if (!h) return;
|
|
1349
|
+
const d = sn(() => {
|
|
1350
|
+
if (re.has(h)) return;
|
|
1351
|
+
$e(h, "down");
|
|
1352
|
+
const f = sn(() => {
|
|
1353
|
+
$e(h, "up");
|
|
1354
|
+
});
|
|
1355
|
+
h.addEventListener("keyup", f, u), h.addEventListener("blur", () => $e(h, "cancel"), u);
|
|
1356
|
+
});
|
|
1357
|
+
h.addEventListener("keydown", d, u), h.addEventListener("blur", () => h.removeEventListener("keydown", d), u);
|
|
1358
|
+
})(l, i), i);
|
|
1359
|
+
}), r;
|
|
1360
|
+
}
|
|
1361
|
+
function on(t, e, n) {
|
|
1362
|
+
const { props: s } = t;
|
|
1363
|
+
t.animationState && s.whileTap && t.animationState.setActive("whileTap", n === "Start");
|
|
1364
|
+
const i = s["onTap" + (n === "End" ? "" : n)];
|
|
1365
|
+
i && F.postRender(() => i(e, rs(e)));
|
|
1366
|
+
}
|
|
1367
|
+
const tt = /* @__PURE__ */ new WeakMap(), je = /* @__PURE__ */ new WeakMap(), or = (t) => {
|
|
1368
|
+
const e = tt.get(t.target);
|
|
1369
|
+
e && e(t);
|
|
1370
|
+
}, ar = (t) => {
|
|
1371
|
+
t.forEach(or);
|
|
1372
|
+
};
|
|
1373
|
+
function lr(t, e, n) {
|
|
1374
|
+
const s = function({ root: i, ...r }) {
|
|
1375
|
+
const o = i || document;
|
|
1376
|
+
je.has(o) || je.set(o, {});
|
|
1377
|
+
const a = je.get(o), l = JSON.stringify(r);
|
|
1378
|
+
return a[l] || (a[l] = new IntersectionObserver(ar, { root: i, ...r })), a[l];
|
|
1379
|
+
}(e);
|
|
1380
|
+
return tt.set(t, n), s.observe(t), () => {
|
|
1381
|
+
tt.delete(t), s.unobserve(t);
|
|
1382
|
+
};
|
|
1383
|
+
}
|
|
1384
|
+
const ur = { some: 0, all: 1 }, cr = { inView: { Feature: class extends G {
|
|
1385
|
+
constructor() {
|
|
1386
|
+
super(...arguments), this.hasEnteredView = !1, this.isInView = !1;
|
|
1387
|
+
}
|
|
1388
|
+
startObserver() {
|
|
1389
|
+
this.unmount();
|
|
1390
|
+
const { viewport: t = {} } = this.node.getProps(), { root: e, margin: n, amount: s = "some", once: i } = t, r = { root: e ? e.current : void 0, rootMargin: n, threshold: typeof s == "number" ? s : ur[s] };
|
|
1391
|
+
return lr(this.node.current, r, (o) => {
|
|
1392
|
+
const { isIntersecting: a } = o;
|
|
1393
|
+
if (this.isInView === a || (this.isInView = a, i && !a && this.hasEnteredView)) return;
|
|
1394
|
+
a && (this.hasEnteredView = !0), this.node.animationState && this.node.animationState.setActive("whileInView", a);
|
|
1395
|
+
const { onViewportEnter: l, onViewportLeave: c } = this.node.getProps(), u = a ? l : c;
|
|
1396
|
+
u && u(o);
|
|
1397
|
+
});
|
|
1398
|
+
}
|
|
1399
|
+
mount() {
|
|
1400
|
+
this.startObserver();
|
|
1401
|
+
}
|
|
1402
|
+
update() {
|
|
1403
|
+
if (typeof IntersectionObserver > "u") return;
|
|
1404
|
+
const { props: t, prevProps: e } = this.node;
|
|
1405
|
+
["amount", "margin", "root"].some(function({ viewport: n = {} }, { viewport: s = {} } = {}) {
|
|
1406
|
+
return (i) => n[i] !== s[i];
|
|
1407
|
+
}(t, e)) && this.startObserver();
|
|
1408
|
+
}
|
|
1409
|
+
unmount() {
|
|
1410
|
+
}
|
|
1411
|
+
} }, tap: { Feature: class extends G {
|
|
1412
|
+
mount() {
|
|
1413
|
+
const { current: t } = this.node;
|
|
1414
|
+
t && (this.unmount = rr(t, (e) => (on(this.node, e, "Start"), (n, { success: s }) => on(this.node, n, s ? "End" : "Cancel")), { useGlobalTarget: this.node.props.globalTapTarget }));
|
|
1415
|
+
}
|
|
1416
|
+
unmount() {
|
|
1417
|
+
}
|
|
1418
|
+
} }, focus: { Feature: class extends G {
|
|
1419
|
+
constructor() {
|
|
1420
|
+
super(...arguments), this.isActive = !1;
|
|
1421
|
+
}
|
|
1422
|
+
onFocus() {
|
|
1423
|
+
let t = !1;
|
|
1424
|
+
try {
|
|
1425
|
+
t = this.node.current.matches(":focus-visible");
|
|
1426
|
+
} catch {
|
|
1427
|
+
t = !0;
|
|
1428
|
+
}
|
|
1429
|
+
t && this.node.animationState && (this.node.animationState.setActive("whileFocus", !0), this.isActive = !0);
|
|
1430
|
+
}
|
|
1431
|
+
onBlur() {
|
|
1432
|
+
this.isActive && this.node.animationState && (this.node.animationState.setActive("whileFocus", !1), this.isActive = !1);
|
|
1433
|
+
}
|
|
1434
|
+
mount() {
|
|
1435
|
+
this.unmount = ke(en(this.node.current, "focus", () => this.onFocus()), en(this.node.current, "blur", () => this.onBlur()));
|
|
1436
|
+
}
|
|
1437
|
+
unmount() {
|
|
1438
|
+
}
|
|
1439
|
+
} }, hover: { Feature: class extends G {
|
|
1440
|
+
mount() {
|
|
1441
|
+
const { current: t } = this.node;
|
|
1442
|
+
t && (this.unmount = function(e, n, s = {}) {
|
|
1443
|
+
const [i, r, o] = ls(e, s), a = tn((l) => {
|
|
1444
|
+
const { target: c } = l, u = n(l);
|
|
1445
|
+
if (!u || !c) return;
|
|
1446
|
+
const h = tn((d) => {
|
|
1447
|
+
u(d), c.removeEventListener("pointerleave", h);
|
|
1448
|
+
});
|
|
1449
|
+
c.addEventListener("pointerleave", h, r);
|
|
1450
|
+
});
|
|
1451
|
+
return i.forEach((l) => {
|
|
1452
|
+
l.addEventListener("pointerenter", a, r);
|
|
1453
|
+
}), o;
|
|
1454
|
+
}(t, (e) => (nn(this.node, e, "Start"), (n) => nn(this.node, n, "End"))));
|
|
1455
|
+
}
|
|
1456
|
+
unmount() {
|
|
1457
|
+
}
|
|
1458
|
+
} } }, cs = ee({ transformPagePoint: (t) => t, isStatic: !1, reducedMotion: "never" }), Fe = ee({}), bt = typeof window < "u", hr = bt ? Ts : st, St = ee({ strict: !1 });
|
|
1459
|
+
function dr(t, e, n, s, i) {
|
|
1460
|
+
var r, o;
|
|
1461
|
+
const { visualElement: a } = O(Fe), l = O(St), c = O(as), u = O(cs).reducedMotion, h = Z(null);
|
|
1462
|
+
s = s || l.renderer, !h.current && s && (h.current = s(t, { visualState: e, parent: a, props: n, presenceContext: c, blockInitialAnimation: !!c && c.initial === !1, reducedMotionConfig: u }));
|
|
1463
|
+
const d = h.current, f = O(er);
|
|
1464
|
+
!d || d.projection || !i || d.type !== "html" && d.type !== "svg" || function(m, S, x, C) {
|
|
1465
|
+
const { layoutId: y, layout: w, drag: T, dragConstraints: A, layoutScroll: V, layoutRoot: M } = S;
|
|
1466
|
+
m.projection = new x(m.latestValues, S["data-framer-portal-id"] ? void 0 : hs(m.parent)), m.projection.setOptions({ layoutId: y, layout: w, alwaysMeasureLayout: !!T || A && os(A), visualElement: m, animationType: typeof w == "string" ? w : "both", initialPromotionConfig: C, layoutScroll: V, layoutRoot: M });
|
|
1467
|
+
}(h.current, n, i, f);
|
|
1468
|
+
const v = Z(!1);
|
|
1469
|
+
xs(() => {
|
|
1470
|
+
d && v.current && d.update(n, c);
|
|
1471
|
+
});
|
|
1472
|
+
const p = n[ns], g = Z(!!p && !(!((r = window.MotionHandoffIsComplete) === null || r === void 0) && r.call(window, p)) && ((o = window.MotionHasOptimisedAnimation) === null || o === void 0 ? void 0 : o.call(window, p)));
|
|
1473
|
+
return hr(() => {
|
|
1474
|
+
d && (v.current = !0, window.MotionIsMounted = !0, d.updateFeatures(), nr.render(d.render), g.current && d.animationState && d.animationState.animateChanges());
|
|
1475
|
+
}), st(() => {
|
|
1476
|
+
d && (!g.current && d.animationState && d.animationState.animateChanges(), g.current && (queueMicrotask(() => {
|
|
1477
|
+
var m;
|
|
1478
|
+
(m = window.MotionHandoffMarkAsComplete) === null || m === void 0 || m.call(window, p);
|
|
1479
|
+
}), g.current = !1));
|
|
1480
|
+
}), d;
|
|
1481
|
+
}
|
|
1482
|
+
function hs(t) {
|
|
1483
|
+
if (t) return t.options.allowProjection !== !1 ? t.projection : hs(t.parent);
|
|
1484
|
+
}
|
|
1485
|
+
function pr(t, e, n) {
|
|
1486
|
+
return fn((s) => {
|
|
1487
|
+
s && t.mount && t.mount(s), e && (s ? e.mount(s) : e.unmount()), n && (typeof n == "function" ? n(s) : os(n) && (n.current = s));
|
|
1488
|
+
}, [e]);
|
|
1489
|
+
}
|
|
1490
|
+
function Oe(t) {
|
|
1491
|
+
return Ce(t.animate) || ot.some((e) => le(t[e]));
|
|
1492
|
+
}
|
|
1493
|
+
function ds(t) {
|
|
1494
|
+
return !!(Oe(t) || t.variants);
|
|
1495
|
+
}
|
|
1496
|
+
function mr(t) {
|
|
1497
|
+
const { initial: e, animate: n } = function(s, i) {
|
|
1498
|
+
if (Oe(s)) {
|
|
1499
|
+
const { initial: r, animate: o } = s;
|
|
1500
|
+
return { initial: r === !1 || le(r) ? r : void 0, animate: le(o) ? o : void 0 };
|
|
1501
|
+
}
|
|
1502
|
+
return s.inherit !== !1 ? i : {};
|
|
1503
|
+
}(t, O(Fe));
|
|
1504
|
+
return Ve(() => ({ initial: e, animate: n }), [an(e), an(n)]);
|
|
1505
|
+
}
|
|
1506
|
+
function an(t) {
|
|
1507
|
+
return Array.isArray(t) ? t.join(" ") : t;
|
|
1508
|
+
}
|
|
1509
|
+
const ln = { animation: ["animate", "variants", "whileHover", "whileTap", "exit", "whileInView", "whileFocus", "whileDrag"], exit: ["exit"], drag: ["drag", "dragControls"], focus: ["whileFocus"], hover: ["whileHover", "onHoverStart", "onHoverEnd"], tap: ["whileTap", "onTap", "onTapStart", "onTapCancel"], pan: ["onPan", "onPanStart", "onPanSessionStart", "onPanEnd"], inView: ["whileInView", "onViewportEnter", "onViewportLeave"], layout: ["layout", "layoutId"] }, Q = {};
|
|
1510
|
+
for (const t in ln) Q[t] = { isEnabled: (e) => ln[t].some((n) => !!e[n]) };
|
|
1511
|
+
function nt(t) {
|
|
1512
|
+
for (const e in t) Q[e] = { ...Q[e], ...t[e] };
|
|
1513
|
+
}
|
|
1514
|
+
const fr = Symbol.for("motionComponentSymbol");
|
|
1515
|
+
function vr({ preloadedFeatures: t, createVisualElement: e, useRender: n, useVisualState: s, Component: i }) {
|
|
1516
|
+
t && nt(t);
|
|
1517
|
+
const r = As(function(o, a) {
|
|
1518
|
+
let l;
|
|
1519
|
+
const c = { ...O(cs), ...o, layoutId: gr(o) }, { isStatic: u } = c, h = mr(o), d = s(o, u);
|
|
1520
|
+
if (!u && bt) {
|
|
1521
|
+
(function(v, p) {
|
|
1522
|
+
const g = O(St).strict;
|
|
1523
|
+
if (process.env.NODE_ENV !== "production" && p && g) {
|
|
1524
|
+
const m = "You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";
|
|
1525
|
+
v.ignoreStrict ? te(!1, m) : U(!1, m);
|
|
1526
|
+
}
|
|
1527
|
+
})(c, t);
|
|
1528
|
+
const f = function(v) {
|
|
1529
|
+
const { drag: p, layout: g } = Q;
|
|
1530
|
+
if (!p && !g) return {};
|
|
1531
|
+
const m = { ...p, ...g };
|
|
1532
|
+
return { MeasureLayout: p != null && p.isEnabled(v) || g != null && g.isEnabled(v) ? m.MeasureLayout : void 0, ProjectionNode: m.ProjectionNode };
|
|
1533
|
+
}(c);
|
|
1534
|
+
l = f.MeasureLayout, h.visualElement = dr(i, d, c, e, f.ProjectionNode);
|
|
1535
|
+
}
|
|
1536
|
+
return H(Fe.Provider, { value: h, children: [l && h.visualElement ? I(l, { visualElement: h.visualElement, ...c }) : null, n(i, o, pr(d, h.visualElement, a), d, u, h.visualElement)] });
|
|
1537
|
+
});
|
|
1538
|
+
return r[fr] = i, r;
|
|
1539
|
+
}
|
|
1540
|
+
function gr({ layoutId: t }) {
|
|
1541
|
+
const e = O(Qi).id;
|
|
1542
|
+
return e && t !== void 0 ? e + "-" + t : t;
|
|
1543
|
+
}
|
|
1544
|
+
const yr = ["animate", "circle", "defs", "desc", "ellipse", "g", "image", "line", "filter", "marker", "mask", "metadata", "path", "pattern", "polygon", "polyline", "rect", "stop", "switch", "symbol", "svg", "text", "tspan", "use", "view"];
|
|
1545
|
+
function Tt(t) {
|
|
1546
|
+
return typeof t == "string" && !t.includes("-") && !!(yr.indexOf(t) > -1 || /[A-Z]/u.test(t));
|
|
1547
|
+
}
|
|
1548
|
+
function ps(t, { style: e, vars: n }, s, i) {
|
|
1549
|
+
Object.assign(t.style, e, i && i.getProjectionStyles(s));
|
|
1550
|
+
for (const r in n) t.style.setProperty(r, n[r]);
|
|
1551
|
+
}
|
|
1552
|
+
const ms = /* @__PURE__ */ new Set(["baseFrequency", "diffuseConstant", "kernelMatrix", "kernelUnitLength", "keySplines", "keyTimes", "limitingConeAngle", "markerHeight", "markerWidth", "numOctaves", "targetX", "targetY", "surfaceScale", "specularConstant", "specularExponent", "stdDeviation", "tableValues", "viewBox", "gradientTransform", "pathLength", "startOffset", "textLength", "lengthAdjust"]);
|
|
1553
|
+
function fs(t, e, n, s) {
|
|
1554
|
+
ps(t, e, void 0, s);
|
|
1555
|
+
for (const i in e.attrs) t.setAttribute(ms.has(i) ? i : wt(i), e.attrs[i]);
|
|
1556
|
+
}
|
|
1557
|
+
function vs(t, { layout: e, layoutId: n }) {
|
|
1558
|
+
return q.has(t) || t.startsWith("origin") || (e || n !== void 0) && (!!tr[t] || t === "opacity");
|
|
1559
|
+
}
|
|
1560
|
+
function xt(t, e, n) {
|
|
1561
|
+
var s;
|
|
1562
|
+
const { style: i } = t, r = {};
|
|
1563
|
+
for (const o in i) (E(i[o]) || e.style && E(e.style[o]) || vs(o, t) || ((s = n == null ? void 0 : n.getValue(o)) === null || s === void 0 ? void 0 : s.liveStyle) !== void 0) && (r[o] = i[o]);
|
|
1564
|
+
return r;
|
|
1565
|
+
}
|
|
1566
|
+
function gs(t, e, n) {
|
|
1567
|
+
const s = xt(t, e, n);
|
|
1568
|
+
for (const i in t) (E(t[i]) || E(e[i])) && (s[he.indexOf(i) !== -1 ? "attr" + i.charAt(0).toUpperCase() + i.substring(1) : i] = t[i]);
|
|
1569
|
+
return s;
|
|
1570
|
+
}
|
|
1571
|
+
const ys = (t) => (e, n) => {
|
|
1572
|
+
const s = O(Fe), i = O(as), r = () => function({ scrapeMotionValuesFromProps: o, createRenderState: a, onMount: l }, c, u, h) {
|
|
1573
|
+
const d = { latestValues: wr(c, u, h, o), renderState: a() };
|
|
1574
|
+
return l && (d.mount = (f) => l(c, f, d)), d;
|
|
1575
|
+
}(t, e, s, i);
|
|
1576
|
+
return n ? r() : function(o) {
|
|
1577
|
+
const a = Z(null);
|
|
1578
|
+
return a.current === null && (a.current = o()), a.current;
|
|
1579
|
+
}(r);
|
|
1580
|
+
};
|
|
1581
|
+
function wr(t, e, n, s) {
|
|
1582
|
+
const i = {}, r = s(t, {});
|
|
1583
|
+
for (const d in r) i[d] = sr(r[d]);
|
|
1584
|
+
let { initial: o, animate: a } = t;
|
|
1585
|
+
const l = Oe(t), c = ds(t);
|
|
1586
|
+
e && c && !l && t.inherit !== !1 && (o === void 0 && (o = e.initial), a === void 0 && (a = e.animate));
|
|
1587
|
+
let u = !!n && n.initial === !1;
|
|
1588
|
+
u = u || o === !1;
|
|
1589
|
+
const h = u ? a : o;
|
|
1590
|
+
if (h && typeof h != "boolean" && !Ce(h)) {
|
|
1591
|
+
const d = Array.isArray(h) ? h : [h];
|
|
1592
|
+
for (let f = 0; f < d.length; f++) {
|
|
1593
|
+
const v = it(t, d[f]);
|
|
1594
|
+
if (v) {
|
|
1595
|
+
const { transitionEnd: p, transition: g, ...m } = v;
|
|
1596
|
+
for (const S in m) {
|
|
1597
|
+
let x = m[S];
|
|
1598
|
+
Array.isArray(x) && (x = x[u ? x.length - 1 : 0]), x !== null && (i[S] = x);
|
|
1599
|
+
}
|
|
1600
|
+
for (const S in p) i[S] = p[S];
|
|
1601
|
+
}
|
|
1602
|
+
}
|
|
1603
|
+
}
|
|
1604
|
+
return i;
|
|
1605
|
+
}
|
|
1606
|
+
const br = () => ({ style: {}, transform: {}, transformOrigin: {}, vars: {} }), Sr = () => ({ style: {}, transform: {}, transformOrigin: {}, vars: {}, attrs: {} }), un = (t, e) => e && typeof t == "number" ? e.transform(t) : t, Tr = { x: "translateX", y: "translateY", z: "translateZ", transformPerspective: "perspective" }, xr = he.length;
|
|
1607
|
+
function At(t, e, n) {
|
|
1608
|
+
const { style: s, vars: i, transformOrigin: r } = t;
|
|
1609
|
+
let o = !1, a = !1;
|
|
1610
|
+
for (const l in e) {
|
|
1611
|
+
const c = e[l];
|
|
1612
|
+
if (q.has(l)) o = !0;
|
|
1613
|
+
else if (kn(l)) i[l] = c;
|
|
1614
|
+
else {
|
|
1615
|
+
const u = un(c, _e[l]);
|
|
1616
|
+
l.startsWith("origin") ? (a = !0, r[l] = u) : s[l] = u;
|
|
1617
|
+
}
|
|
1618
|
+
}
|
|
1619
|
+
if (e.transform || (o || n ? s.transform = function(l, c, u) {
|
|
1620
|
+
let h = "", d = !0;
|
|
1621
|
+
for (let f = 0; f < xr; f++) {
|
|
1622
|
+
const v = he[f], p = l[v];
|
|
1623
|
+
if (p === void 0) continue;
|
|
1624
|
+
let g = !0;
|
|
1625
|
+
if (g = typeof p == "number" ? p === (v.startsWith("scale") ? 1 : 0) : parseFloat(p) === 0, !g || u) {
|
|
1626
|
+
const m = un(p, _e[v]);
|
|
1627
|
+
g || (d = !1, h += `${Tr[v] || v}(${m}) `), u && (c[v] = m);
|
|
1628
|
+
}
|
|
1629
|
+
}
|
|
1630
|
+
return h = h.trim(), u ? h = u(c, d ? "" : h) : d && (h = "none"), h;
|
|
1631
|
+
}(e, t.transform, n) : s.transform && (s.transform = "none")), a) {
|
|
1632
|
+
const { originX: l = "50%", originY: c = "50%", originZ: u = 0 } = r;
|
|
1633
|
+
s.transformOrigin = `${l} ${c} ${u}`;
|
|
1634
|
+
}
|
|
1635
|
+
}
|
|
1636
|
+
function cn(t, e, n) {
|
|
1637
|
+
return typeof t == "string" ? t : b.transform(e + n * t);
|
|
1638
|
+
}
|
|
1639
|
+
const Ar = { offset: "stroke-dashoffset", array: "stroke-dasharray" }, Vr = { offset: "strokeDashoffset", array: "strokeDasharray" };
|
|
1640
|
+
function Vt(t, { attrX: e, attrY: n, attrScale: s, originX: i, originY: r, pathLength: o, pathSpacing: a = 1, pathOffset: l = 0, ...c }, u, h) {
|
|
1641
|
+
if (At(t, c, h), u) return void (t.style.viewBox && (t.attrs.viewBox = t.style.viewBox));
|
|
1642
|
+
t.attrs = t.style, t.style = {};
|
|
1643
|
+
const { attrs: d, style: f, dimensions: v } = t;
|
|
1644
|
+
d.transform && (v && (f.transform = d.transform), delete d.transform), v && (i !== void 0 || r !== void 0 || f.transform) && (f.transformOrigin = function(p, g, m) {
|
|
1645
|
+
return `${cn(g, p.x, p.width)} ${cn(m, p.y, p.height)}`;
|
|
1646
|
+
}(v, i !== void 0 ? i : 0.5, r !== void 0 ? r : 0.5)), e !== void 0 && (d.x = e), n !== void 0 && (d.y = n), s !== void 0 && (d.scale = s), o !== void 0 && function(p, g, m = 1, S = 0, x = !0) {
|
|
1647
|
+
p.pathLength = 1;
|
|
1648
|
+
const C = x ? Ar : Vr;
|
|
1649
|
+
p[C.offset] = b.transform(-S);
|
|
1650
|
+
const y = b.transform(g), w = b.transform(m);
|
|
1651
|
+
p[C.array] = `${y} ${w}`;
|
|
1652
|
+
}(d, o, a, l, !1);
|
|
1653
|
+
}
|
|
1654
|
+
const Ct = (t) => typeof t == "string" && t.toLowerCase() === "svg", Cr = { useVisualState: ys({ scrapeMotionValuesFromProps: gs, createRenderState: Sr, onMount: (t, e, { renderState: n, latestValues: s }) => {
|
|
1655
|
+
F.read(() => {
|
|
1656
|
+
try {
|
|
1657
|
+
n.dimensions = typeof e.getBBox == "function" ? e.getBBox() : e.getBoundingClientRect();
|
|
1658
|
+
} catch {
|
|
1659
|
+
n.dimensions = { x: 0, y: 0, width: 0, height: 0 };
|
|
1660
|
+
}
|
|
1661
|
+
}), F.render(() => {
|
|
1662
|
+
Vt(n, s, Ct(e.tagName), t.transformTemplate), fs(e, n);
|
|
1663
|
+
});
|
|
1664
|
+
} }) }, Mr = { useVisualState: ys({ scrapeMotionValuesFromProps: xt, createRenderState: br }) };
|
|
1665
|
+
function ws(t, e, n) {
|
|
1666
|
+
for (const s in e) E(e[s]) || vs(s, n) || (t[s] = e[s]);
|
|
1667
|
+
}
|
|
1668
|
+
function Pr(t, e) {
|
|
1669
|
+
const n = {};
|
|
1670
|
+
return ws(n, t.style || {}, t), Object.assign(n, function({ transformTemplate: s }, i) {
|
|
1671
|
+
return Ve(() => {
|
|
1672
|
+
const r = { style: {}, transform: {}, transformOrigin: {}, vars: {} };
|
|
1673
|
+
return At(r, i, s), Object.assign({}, r.vars, r.style);
|
|
1674
|
+
}, [i]);
|
|
1675
|
+
}(t, e)), n;
|
|
1676
|
+
}
|
|
1677
|
+
function kr(t, e) {
|
|
1678
|
+
const n = {}, s = Pr(t, e);
|
|
1679
|
+
return t.drag && t.dragListener !== !1 && (n.draggable = !1, s.userSelect = s.WebkitUserSelect = s.WebkitTouchCallout = "none", s.touchAction = t.drag === !0 ? "none" : "pan-" + (t.drag === "x" ? "y" : "x")), t.tabIndex === void 0 && (t.onTap || t.onTapStart || t.whileTap) && (n.tabIndex = 0), n.style = s, n;
|
|
1680
|
+
}
|
|
1681
|
+
const Er = /* @__PURE__ */ new Set(["animate", "exit", "variants", "initial", "style", "values", "variants", "transition", "transformTemplate", "custom", "inherit", "onBeforeLayoutMeasure", "onAnimationStart", "onAnimationComplete", "onUpdate", "onDragStart", "onDrag", "onDragEnd", "onMeasureDragConstraints", "onDirectionLock", "onDragTransitionEnd", "_dragX", "_dragY", "onHoverStart", "onHoverEnd", "onViewportEnter", "onViewportLeave", "globalTapTarget", "ignoreStrict", "viewport"]);
|
|
1682
|
+
function Ae(t) {
|
|
1683
|
+
return t.startsWith("while") || t.startsWith("drag") && t !== "draggable" || t.startsWith("layout") || t.startsWith("onTap") || t.startsWith("onPan") || t.startsWith("onLayout") || Er.has(t);
|
|
1684
|
+
}
|
|
1685
|
+
let bs = (t) => !Ae(t);
|
|
1686
|
+
try {
|
|
1687
|
+
(hn = require("@emotion/is-prop-valid").default) && (bs = (t) => t.startsWith("on") ? !Ae(t) : hn(t));
|
|
1688
|
+
} catch {
|
|
1689
|
+
}
|
|
1690
|
+
var hn;
|
|
1691
|
+
function Fr(t, e, n, s) {
|
|
1692
|
+
const i = Ve(() => {
|
|
1693
|
+
const r = { style: {}, transform: {}, transformOrigin: {}, vars: {}, attrs: {} };
|
|
1694
|
+
return Vt(r, e, Ct(s), t.transformTemplate), { ...r.attrs, style: { ...r.style } };
|
|
1695
|
+
}, [e]);
|
|
1696
|
+
if (t.style) {
|
|
1697
|
+
const r = {};
|
|
1698
|
+
ws(r, t.style, t), i.style = { ...r, ...i.style };
|
|
1699
|
+
}
|
|
1700
|
+
return i;
|
|
1701
|
+
}
|
|
1702
|
+
function Or(t = !1) {
|
|
1703
|
+
return (e, n, s, { latestValues: i }, r) => {
|
|
1704
|
+
const o = (Tt(e) ? Fr : kr)(n, i, r, e), a = function(h, d, f) {
|
|
1705
|
+
const v = {};
|
|
1706
|
+
for (const p in h) p === "values" && typeof h.values == "object" || (bs(p) || f === !0 && Ae(p) || !d && !Ae(p) || h.draggable && p.startsWith("onDrag")) && (v[p] = h[p]);
|
|
1707
|
+
return v;
|
|
1708
|
+
}(n, typeof e == "string", t), l = e !== vn ? { ...a, ...o, ref: s } : {}, { children: c } = n, u = Ve(() => E(c) ? c.get() : c, [c]);
|
|
1709
|
+
return Vs(e, { ...l, children: u });
|
|
1710
|
+
};
|
|
1711
|
+
}
|
|
1712
|
+
function Ir(t, e) {
|
|
1713
|
+
return function(n, { forwardMotionProps: s } = { forwardMotionProps: !1 }) {
|
|
1714
|
+
return vr({ ...Tt(n) ? Cr : Mr, preloadedFeatures: t, useRender: Or(s), createVisualElement: e, Component: n });
|
|
1715
|
+
};
|
|
1716
|
+
}
|
|
1717
|
+
const Ke = { current: null }, dn = { current: !1 }, pn = /* @__PURE__ */ new WeakMap(), Rr = [...On, P, se], mn = ["AnimationStart", "AnimationComplete", "Update", "BeforeLayoutMeasure", "LayoutMeasure", "LayoutAnimationStart", "LayoutAnimationComplete"];
|
|
1718
|
+
class Dr {
|
|
1719
|
+
scrapeMotionValuesFromProps(e, n, s) {
|
|
1720
|
+
return {};
|
|
1721
|
+
}
|
|
1722
|
+
constructor({ parent: e, props: n, presenceContext: s, reducedMotionConfig: i, blockInitialAnimation: r, visualState: o }, a = {}) {
|
|
1723
|
+
this.current = null, this.children = /* @__PURE__ */ new Set(), this.isVariantNode = !1, this.isControllingVariants = !1, this.shouldReduceMotion = null, this.values = /* @__PURE__ */ new Map(), this.KeyframeResolver = ct, this.features = {}, this.valueSubscriptions = /* @__PURE__ */ new Map(), this.prevMotionValues = {}, this.events = {}, this.propEventSubscriptions = {}, this.notifyUpdate = () => this.notify("Update", this.latestValues), this.render = () => {
|
|
1724
|
+
this.current && (this.triggerBuild(), this.renderInstance(this.current, this.renderState, this.props.style, this.projection));
|
|
1725
|
+
}, this.renderScheduledAt = 0, this.scheduleRender = () => {
|
|
1726
|
+
const d = L.now();
|
|
1727
|
+
this.renderScheduledAt < d && (this.renderScheduledAt = d, F.render(this.render, !1, !0));
|
|
1728
|
+
};
|
|
1729
|
+
const { latestValues: l, renderState: c } = o;
|
|
1730
|
+
this.latestValues = l, this.baseTarget = { ...l }, this.initialValues = n.initial ? { ...l } : {}, this.renderState = c, this.parent = e, this.props = n, this.presenceContext = s, this.depth = e ? e.depth + 1 : 0, this.reducedMotionConfig = i, this.options = a, this.blockInitialAnimation = !!r, this.isControllingVariants = Oe(n), this.isVariantNode = ds(n), this.isVariantNode && (this.variantChildren = /* @__PURE__ */ new Set()), this.manuallyAnimateOnMount = !!(e && e.current);
|
|
1731
|
+
const { willChange: u, ...h } = this.scrapeMotionValuesFromProps(n, {}, this);
|
|
1732
|
+
for (const d in h) {
|
|
1733
|
+
const f = h[d];
|
|
1734
|
+
l[d] !== void 0 && E(f) && f.set(l[d], !1);
|
|
1735
|
+
}
|
|
1736
|
+
}
|
|
1737
|
+
mount(e) {
|
|
1738
|
+
this.current = e, pn.set(e, this), this.projection && !this.projection.instance && this.projection.mount(e), this.parent && this.isVariantNode && !this.isControllingVariants && (this.removeFromVariantTree = this.parent.addVariantChild(this)), this.values.forEach((n, s) => this.bindToMotionValue(s, n)), dn.current || function() {
|
|
1739
|
+
if (dn.current = !0, bt) if (window.matchMedia) {
|
|
1740
|
+
const n = window.matchMedia("(prefers-reduced-motion)"), s = () => Ke.current = n.matches;
|
|
1741
|
+
n.addListener(s), s();
|
|
1742
|
+
} else Ke.current = !1;
|
|
1743
|
+
}(), this.shouldReduceMotion = this.reducedMotionConfig !== "never" && (this.reducedMotionConfig === "always" || Ke.current), process.env.NODE_ENV !== "production" && we(this.shouldReduceMotion !== !0, "You have Reduced Motion enabled on your device. Animations may not appear as expected."), this.parent && this.parent.children.add(this), this.update(this.props, this.presenceContext);
|
|
1744
|
+
}
|
|
1745
|
+
unmount() {
|
|
1746
|
+
pn.delete(this.current), this.projection && this.projection.unmount(), Ye(this.notifyUpdate), Ye(this.render), this.valueSubscriptions.forEach((e) => e()), this.valueSubscriptions.clear(), this.removeFromVariantTree && this.removeFromVariantTree(), this.parent && this.parent.children.delete(this);
|
|
1747
|
+
for (const e in this.events) this.events[e].clear();
|
|
1748
|
+
for (const e in this.features) {
|
|
1749
|
+
const n = this.features[e];
|
|
1750
|
+
n && (n.unmount(), n.isMounted = !1);
|
|
1751
|
+
}
|
|
1752
|
+
this.current = null;
|
|
1753
|
+
}
|
|
1754
|
+
bindToMotionValue(e, n) {
|
|
1755
|
+
this.valueSubscriptions.has(e) && this.valueSubscriptions.get(e)();
|
|
1756
|
+
const s = q.has(e), i = n.on("change", (a) => {
|
|
1757
|
+
this.latestValues[e] = a, this.props.onUpdate && F.preRender(this.notifyUpdate), s && this.projection && (this.projection.isTransformDirty = !0);
|
|
1758
|
+
}), r = n.on("renderRequest", this.scheduleRender);
|
|
1759
|
+
let o;
|
|
1760
|
+
window.MotionCheckAppearSync && (o = window.MotionCheckAppearSync(this, e, n)), this.valueSubscriptions.set(e, () => {
|
|
1761
|
+
i(), r(), o && o(), n.owner && n.stop();
|
|
1762
|
+
});
|
|
1763
|
+
}
|
|
1764
|
+
sortNodePosition(e) {
|
|
1765
|
+
return this.current && this.sortInstanceNodePosition && this.type === e.type ? this.sortInstanceNodePosition(this.current, e.current) : 0;
|
|
1766
|
+
}
|
|
1767
|
+
updateFeatures() {
|
|
1768
|
+
let e = "animation";
|
|
1769
|
+
for (e in Q) {
|
|
1770
|
+
const n = Q[e];
|
|
1771
|
+
if (!n) continue;
|
|
1772
|
+
const { isEnabled: s, Feature: i } = n;
|
|
1773
|
+
if (!this.features[e] && i && s(this.props) && (this.features[e] = new i(this)), this.features[e]) {
|
|
1774
|
+
const r = this.features[e];
|
|
1775
|
+
r.isMounted ? r.update() : (r.mount(), r.isMounted = !0);
|
|
1776
|
+
}
|
|
1777
|
+
}
|
|
1778
|
+
}
|
|
1779
|
+
triggerBuild() {
|
|
1780
|
+
this.build(this.renderState, this.latestValues, this.props);
|
|
1781
|
+
}
|
|
1782
|
+
measureViewportBox() {
|
|
1783
|
+
return this.current ? this.measureInstanceViewportBox(this.current, this.props) : { x: { min: 0, max: 0 }, y: { min: 0, max: 0 } };
|
|
1784
|
+
}
|
|
1785
|
+
getStaticValue(e) {
|
|
1786
|
+
return this.latestValues[e];
|
|
1787
|
+
}
|
|
1788
|
+
setStaticValue(e, n) {
|
|
1789
|
+
this.latestValues[e] = n;
|
|
1790
|
+
}
|
|
1791
|
+
update(e, n) {
|
|
1792
|
+
(e.transformTemplate || this.props.transformTemplate) && this.scheduleRender(), this.prevProps = this.props, this.props = e, this.prevPresenceContext = this.presenceContext, this.presenceContext = n;
|
|
1793
|
+
for (let s = 0; s < mn.length; s++) {
|
|
1794
|
+
const i = mn[s];
|
|
1795
|
+
this.propEventSubscriptions[i] && (this.propEventSubscriptions[i](), delete this.propEventSubscriptions[i]);
|
|
1796
|
+
const r = e["on" + i];
|
|
1797
|
+
r && (this.propEventSubscriptions[i] = this.on(i, r));
|
|
1798
|
+
}
|
|
1799
|
+
this.prevMotionValues = function(s, i, r) {
|
|
1800
|
+
for (const o in i) {
|
|
1801
|
+
const a = i[o], l = r[o];
|
|
1802
|
+
if (E(a)) s.addValue(o, a), process.env.NODE_ENV === "development" && we(a.version === "11.15.0", `Attempting to mix Motion versions ${a.version} with 11.15.0 may not work as expected.`);
|
|
1803
|
+
else if (E(l)) s.addValue(o, ye(a, { owner: s }));
|
|
1804
|
+
else if (l !== a) if (s.hasValue(o)) {
|
|
1805
|
+
const c = s.getValue(o);
|
|
1806
|
+
c.liveStyle === !0 ? c.jump(a) : c.hasAnimated || c.set(a);
|
|
1807
|
+
} else {
|
|
1808
|
+
const c = s.getStaticValue(o);
|
|
1809
|
+
s.addValue(o, ye(c !== void 0 ? c : a, { owner: s }));
|
|
1810
|
+
}
|
|
1811
|
+
}
|
|
1812
|
+
for (const o in r) i[o] === void 0 && s.removeValue(o);
|
|
1813
|
+
return i;
|
|
1814
|
+
}(this, this.scrapeMotionValuesFromProps(e, this.prevProps, this), this.prevMotionValues), this.handleChildMotionValue && this.handleChildMotionValue();
|
|
1815
|
+
}
|
|
1816
|
+
getProps() {
|
|
1817
|
+
return this.props;
|
|
1818
|
+
}
|
|
1819
|
+
getVariant(e) {
|
|
1820
|
+
return this.props.variants ? this.props.variants[e] : void 0;
|
|
1821
|
+
}
|
|
1822
|
+
getDefaultTransition() {
|
|
1823
|
+
return this.props.transition;
|
|
1824
|
+
}
|
|
1825
|
+
getTransformPagePoint() {
|
|
1826
|
+
return this.props.transformPagePoint;
|
|
1827
|
+
}
|
|
1828
|
+
getClosestVariantNode() {
|
|
1829
|
+
return this.isVariantNode ? this : this.parent ? this.parent.getClosestVariantNode() : void 0;
|
|
1830
|
+
}
|
|
1831
|
+
addVariantChild(e) {
|
|
1832
|
+
const n = this.getClosestVariantNode();
|
|
1833
|
+
if (n) return n.variantChildren && n.variantChildren.add(e), () => n.variantChildren.delete(e);
|
|
1834
|
+
}
|
|
1835
|
+
addValue(e, n) {
|
|
1836
|
+
const s = this.values.get(e);
|
|
1837
|
+
n !== s && (s && this.removeValue(e), this.bindToMotionValue(e, n), this.values.set(e, n), this.latestValues[e] = n.get());
|
|
1838
|
+
}
|
|
1839
|
+
removeValue(e) {
|
|
1840
|
+
this.values.delete(e);
|
|
1841
|
+
const n = this.valueSubscriptions.get(e);
|
|
1842
|
+
n && (n(), this.valueSubscriptions.delete(e)), delete this.latestValues[e], this.removeValueFromRenderState(e, this.renderState);
|
|
1843
|
+
}
|
|
1844
|
+
hasValue(e) {
|
|
1845
|
+
return this.values.has(e);
|
|
1846
|
+
}
|
|
1847
|
+
getValue(e, n) {
|
|
1848
|
+
if (this.props.values && this.props.values[e]) return this.props.values[e];
|
|
1849
|
+
let s = this.values.get(e);
|
|
1850
|
+
return s === void 0 && n !== void 0 && (s = ye(n === null ? void 0 : n, { owner: this }), this.addValue(e, s)), s;
|
|
1851
|
+
}
|
|
1852
|
+
readValue(e, n) {
|
|
1853
|
+
var s;
|
|
1854
|
+
let i = this.latestValues[e] === void 0 && this.current ? (s = this.getBaseTargetFromProps(this.props, e)) !== null && s !== void 0 ? s : this.readValueFromInstance(this.current, e, this.options) : this.latestValues[e];
|
|
1855
|
+
var r;
|
|
1856
|
+
return i != null && (typeof i == "string" && (Mn(i) || Cn(i)) ? i = parseFloat(i) : (r = i, !Rr.find(Fn(r)) && se.test(n) && (i = Ln(e, n))), this.setBaseTarget(e, E(i) ? i.get() : i)), E(i) ? i.get() : i;
|
|
1857
|
+
}
|
|
1858
|
+
setBaseTarget(e, n) {
|
|
1859
|
+
this.baseTarget[e] = n;
|
|
1860
|
+
}
|
|
1861
|
+
getBaseTarget(e) {
|
|
1862
|
+
var n;
|
|
1863
|
+
const { initial: s } = this.props;
|
|
1864
|
+
let i;
|
|
1865
|
+
if (typeof s == "string" || typeof s == "object") {
|
|
1866
|
+
const o = it(this.props, s, (n = this.presenceContext) === null || n === void 0 ? void 0 : n.custom);
|
|
1867
|
+
o && (i = o[e]);
|
|
1868
|
+
}
|
|
1869
|
+
if (s && i !== void 0) return i;
|
|
1870
|
+
const r = this.getBaseTargetFromProps(this.props, e);
|
|
1871
|
+
return r === void 0 || E(r) ? this.initialValues[e] !== void 0 && i === void 0 ? void 0 : this.baseTarget[e] : r;
|
|
1872
|
+
}
|
|
1873
|
+
on(e, n) {
|
|
1874
|
+
return this.events[e] || (this.events[e] = new ts()), this.events[e].add(n);
|
|
1875
|
+
}
|
|
1876
|
+
notify(e, ...n) {
|
|
1877
|
+
this.events[e] && this.events[e].notify(...n);
|
|
1878
|
+
}
|
|
1879
|
+
}
|
|
1880
|
+
class Ss extends Dr {
|
|
1881
|
+
constructor() {
|
|
1882
|
+
super(...arguments), this.KeyframeResolver = $n;
|
|
1883
|
+
}
|
|
1884
|
+
sortInstanceNodePosition(e, n) {
|
|
1885
|
+
return 2 & e.compareDocumentPosition(n) ? 1 : -1;
|
|
1886
|
+
}
|
|
1887
|
+
getBaseTargetFromProps(e, n) {
|
|
1888
|
+
return e.style ? e.style[n] : void 0;
|
|
1889
|
+
}
|
|
1890
|
+
removeValueFromRenderState(e, { vars: n, style: s }) {
|
|
1891
|
+
delete n[e], delete s[e];
|
|
1892
|
+
}
|
|
1893
|
+
handleChildMotionValue() {
|
|
1894
|
+
this.childSubscription && (this.childSubscription(), delete this.childSubscription);
|
|
1895
|
+
const { children: e } = this.props;
|
|
1896
|
+
E(e) && (this.childSubscription = e.on("change", (n) => {
|
|
1897
|
+
this.current && (this.current.textContent = `${n}`);
|
|
1898
|
+
}));
|
|
1899
|
+
}
|
|
1900
|
+
}
|
|
1901
|
+
class Br extends Ss {
|
|
1902
|
+
constructor() {
|
|
1903
|
+
super(...arguments), this.type = "html", this.renderInstance = ps;
|
|
1904
|
+
}
|
|
1905
|
+
readValueFromInstance(e, n) {
|
|
1906
|
+
if (q.has(n)) {
|
|
1907
|
+
const i = pt(n);
|
|
1908
|
+
return i && i.default || 0;
|
|
1909
|
+
}
|
|
1910
|
+
{
|
|
1911
|
+
const i = (s = e, window.getComputedStyle(s)), r = (kn(n) ? i.getPropertyValue(n) : i[n]) || 0;
|
|
1912
|
+
return typeof r == "string" ? r.trim() : r;
|
|
1913
|
+
}
|
|
1914
|
+
var s;
|
|
1915
|
+
}
|
|
1916
|
+
measureInstanceViewportBox(e, { transformPagePoint: n }) {
|
|
1917
|
+
return function(s, i) {
|
|
1918
|
+
return function({ top: r, left: o, right: a, bottom: l }) {
|
|
1919
|
+
return { x: { min: o, max: a }, y: { min: r, max: l } };
|
|
1920
|
+
}(function(r, o) {
|
|
1921
|
+
if (!o) return r;
|
|
1922
|
+
const a = o({ x: r.left, y: r.top }), l = o({ x: r.right, y: r.bottom });
|
|
1923
|
+
return { top: a.y, left: a.x, bottom: l.y, right: l.x };
|
|
1924
|
+
}(s.getBoundingClientRect(), i));
|
|
1925
|
+
}(e, n);
|
|
1926
|
+
}
|
|
1927
|
+
build(e, n, s) {
|
|
1928
|
+
At(e, n, s.transformTemplate);
|
|
1929
|
+
}
|
|
1930
|
+
scrapeMotionValuesFromProps(e, n, s) {
|
|
1931
|
+
return xt(e, n, s);
|
|
1932
|
+
}
|
|
1933
|
+
}
|
|
1934
|
+
class Nr extends Ss {
|
|
1935
|
+
constructor() {
|
|
1936
|
+
super(...arguments), this.type = "svg", this.isSVGTag = !1, this.measureInstanceViewportBox = Ji;
|
|
1937
|
+
}
|
|
1938
|
+
getBaseTargetFromProps(e, n) {
|
|
1939
|
+
return e[n];
|
|
1940
|
+
}
|
|
1941
|
+
readValueFromInstance(e, n) {
|
|
1942
|
+
if (q.has(n)) {
|
|
1943
|
+
const s = pt(n);
|
|
1944
|
+
return s && s.default || 0;
|
|
1945
|
+
}
|
|
1946
|
+
return n = ms.has(n) ? n : wt(n), e.getAttribute(n);
|
|
1947
|
+
}
|
|
1948
|
+
scrapeMotionValuesFromProps(e, n, s) {
|
|
1949
|
+
return gs(e, n, s);
|
|
1950
|
+
}
|
|
1951
|
+
build(e, n, s) {
|
|
1952
|
+
Vt(e, n, this.isSVGTag, s.transformTemplate);
|
|
1953
|
+
}
|
|
1954
|
+
renderInstance(e, n, s, i) {
|
|
1955
|
+
fs(e, n, 0, i);
|
|
1956
|
+
}
|
|
1957
|
+
mount(e) {
|
|
1958
|
+
this.isSVGTag = Ct(e.tagName), super.mount(e);
|
|
1959
|
+
}
|
|
1960
|
+
}
|
|
1961
|
+
function Lr({ children: t, features: e, strict: n = !1 }) {
|
|
1962
|
+
const [, s] = Cs(!We(e)), i = Z(void 0);
|
|
1963
|
+
if (!We(e)) {
|
|
1964
|
+
const { renderer: r, ...o } = e;
|
|
1965
|
+
i.current = r, nt(o);
|
|
1966
|
+
}
|
|
1967
|
+
return st(() => {
|
|
1968
|
+
We(e) && e().then(({ renderer: r, ...o }) => {
|
|
1969
|
+
nt(o), i.current = r, s(!0);
|
|
1970
|
+
});
|
|
1971
|
+
}, []), I(St.Provider, { value: { renderer: i.current, strict: n }, children: t });
|
|
1972
|
+
}
|
|
1973
|
+
function We(t) {
|
|
1974
|
+
return typeof t == "function";
|
|
1975
|
+
}
|
|
1976
|
+
const $r = { renderer: (t, e) => Tt(t) ? new Nr(e) : new Br(e, { allowProjection: t !== vn }), ...Gi, ...cr }, jr = Ms(Is(Ir()).div)`
|
|
1977
|
+
${({ theme: t }) => `
|
|
1978
|
+
background-color: ${t.palette.white};
|
|
1979
|
+
box-shadow: ${t.shadows.lg};
|
|
1980
|
+
max-width: 350px;
|
|
1981
|
+
min-width: 350px;
|
|
1982
|
+
height: 100%;
|
|
1983
|
+
position: absolute;
|
|
1984
|
+
right: 0;
|
|
1985
|
+
top: 0;
|
|
1986
|
+
overflow: hidden auto;
|
|
1987
|
+
scrollbar-color: ${t.palette.gray[600]} ${t.palette.gray[100]};
|
|
1988
|
+
scroll-padding: ${t.spacing[0.5]};
|
|
1989
|
+
scrollbar-width: thin;
|
|
1990
|
+
z-index: 99999;
|
|
1991
|
+
|
|
1992
|
+
> div {
|
|
1993
|
+
border: 1px solid ${t.palette.gray[100]};
|
|
1994
|
+
width: auto;
|
|
1995
|
+
min-height: 100vh;
|
|
1996
|
+
height: auto;
|
|
1997
|
+
}
|
|
1998
|
+
`}
|
|
1999
|
+
`, to = ({ children: t, closeIconId: e = "close-menu", isOpen: n, items: s, onClose: i, primaryButtonText: r, primaryOnClick: o, secondaryButtonText: a, secondaryOnClick: l, title: c }) => {
|
|
2000
|
+
const u = Ps(), h = Z(null), d = fn((f) => () => {
|
|
2001
|
+
f(), i();
|
|
2002
|
+
}, [i]);
|
|
2003
|
+
return Os(h.current, () => {
|
|
2004
|
+
i();
|
|
2005
|
+
}, !0), I(Lr, { features: $r, children: I(jr, { animate: n ? { display: "block", x: 0 } : { transitionEnd: { display: "none" }, x: "100%" }, initial: { display: "none", x: "100%" }, ref: h, transition: { bounce: 0, duration: 0.6, type: "spring" }, children: H(z, { height: "100%", position: "relative", children: [H(z, { alignItems: "center", bgColor: u.palette.white, borderBottom: "1px solid", borderColor: u.palette.gray[200], display: "flex", gap: 1.25, justify: "space-between", padding: [1.25, 1.25, 1.25, 1.25], position: "sticky", top: "0", zIndex: 40, children: [I(Fs, { color: u.palette.black, display: "inline", fontWeight: "bold", size: "xl", children: c }), I(Es, { icon: "close", iconColor: u.palette.gray[400], iconSize: "xs", iconTransform: "grow-4", iconType: "fa-light", id: e, onClick: i, px: 0.25, py: 0.25, variant: "ghost" })] }), H(z, { display: "flex", flexDirection: "column", justify: "space-between", minHeight: "100vh", children: [H(z, { py: 1.25, children: [(s ?? []).map(({ customBadge: f, description: v, icon: p, onClick: g, requiresUpgrade: m, title: S }) => I(ks, { customBadge: f, description: v, icon: p, onClick: d(g), requiresUpgrade: m, title: S }, S)), t && I(z, { px: 1.25, children: t })] }), r === void 0 ? void 0 : H(z, { alignItems: "center", bgColor: u.palette.white, borderColor: u.palette.gray[200], borderTop: "1px solid", bottom: "0", display: "flex", gap: 1.25, justify: "end", padding: [1.25, 1.25, 1.25, 1.25], position: "sticky", width: "100%", zIndex: 40, children: [a === void 0 ? void 0 : I(Pt, { color: `${u.palette.primary[500]} !important`, onClick: l, pl: 0.5, pr: 0.5, variant: "ghost", children: a }), I(Pt, { onClick: o, type: "submit", children: r })] })] })] }) }) });
|
|
2006
|
+
};
|
|
2007
|
+
export {
|
|
2008
|
+
to as SlideOutMenu
|
|
2009
|
+
};
|