@darkclaw921/umgt 0.1.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -0
- package/dist/server/agents/core-tools.d.ts +6 -2
- package/dist/server/agents/core-tools.js +8 -3
- package/dist/server/agents/core-tools.js.map +1 -1
- package/dist/server/agents/core.js +4 -3
- package/dist/server/agents/core.js.map +1 -1
- package/dist/server/app.js +2 -1
- package/dist/server/app.js.map +1 -1
- package/dist/server/asset-media.d.ts +2 -1
- package/dist/server/asset-media.js +1 -1
- package/dist/server/asset-media.js.map +1 -1
- package/dist/server/chat-computer.d.ts +3 -1
- package/dist/server/chat-computer.js +8 -3
- package/dist/server/chat-computer.js.map +1 -1
- package/dist/server/chat.js +4 -3
- package/dist/server/chat.js.map +1 -1
- package/dist/server/core-client.d.ts +4 -0
- package/dist/server/core-client.js +19 -0
- package/dist/server/core-client.js.map +1 -1
- package/dist/server/generated-media.d.ts +19 -0
- package/dist/server/generated-media.js +342 -0
- package/dist/server/generated-media.js.map +1 -0
- package/dist/server/reports.d.ts +4 -0
- package/dist/server/reports.js +40 -0
- package/dist/server/reports.js.map +1 -0
- package/dist/server/routes.js +7 -1
- package/dist/server/routes.js.map +1 -1
- package/dist/server/updates.d.ts +28 -0
- package/dist/server/updates.js +99 -0
- package/dist/server/updates.js.map +1 -0
- package/dist/shared/generated-media.d.ts +2 -0
- package/dist/shared/generated-media.js +3 -0
- package/dist/shared/generated-media.js.map +1 -0
- package/dist/web/assets/AgentActivity-DRuju8iC.js +9 -0
- package/dist/web/assets/{ArrowRight.es-rFSWI60-.js → ArrowRight.es-9w41WqD8.js} +1 -1
- package/dist/web/assets/{ArrowUpRight.es-9AGQAwc-.js → ArrowUpRight.es-BmIrpjWN.js} +1 -1
- package/dist/web/assets/{AssetMediaPreview-Cqs-ltSx.js → AssetMediaPreview-D2cd6oQO.js} +1 -1
- package/dist/web/assets/AssetSelectionWizard-7SBX7wym.js +1 -0
- package/dist/web/assets/{CaretDown.es-BF-GEzW4.js → CaretDown.es-Cq33NYip.js} +1 -1
- package/dist/web/assets/{CheckCircle.es-CAQfdit1.js → CheckCircle.es-D5B3hdvz.js} +1 -1
- package/dist/web/assets/CoreAccount-BfH0gEKJ.js +1 -0
- package/dist/web/assets/{DownloadSimple.es-CwuHLlwX.js → DownloadSimple.es-DwOWFbs2.js} +1 -1
- package/dist/web/assets/{FileText.es-C7Qe_oPL.js → FileText.es-D83IIiOG.js} +1 -1
- package/dist/web/assets/{ImageSquare.es-DXp8f5Py.js → ImageSquare.es-DxCFt99_.js} +1 -1
- package/dist/web/assets/KidsApp-ChVKRU9B.js +2 -0
- package/dist/web/assets/{MagnifyingGlass.es-DAAoXLM5.js → MagnifyingGlass.es-rkdOU2rH.js} +1 -1
- package/dist/web/assets/PaperPlaneRight.es-U0twumpP.js +1 -0
- package/dist/web/assets/{PencilSimple.es-B8ERAsFN.js → PencilSimple.es-JVHwRvGx.js} +1 -1
- package/dist/web/assets/PlainChat-C4V_wRVc.js +1 -0
- package/dist/web/assets/{Sparkle.es-B2bpSK_D.js → Sparkle.es-CmGpvnNm.js} +1 -1
- package/dist/web/assets/{Square.es-POdDsCpj.js → Square.es-BjNN9Ypc.js} +1 -1
- package/dist/web/assets/{UploadSimple.es-DIzZ2Med.js → UploadSimple.es-DxIuxpCC.js} +1 -1
- package/dist/web/assets/{WarningCircle.es-DeosDn7W.js → WarningCircle.es-D63H8cL9.js} +1 -1
- package/dist/web/assets/WorkflowJournal-BlTNapOH.js +1 -0
- package/dist/web/assets/{YandexConfigFields-B4ZNwcRp.js → YandexConfigFields-DDL22Bfw.js} +1 -1
- package/dist/web/assets/{YandexGamesView-JIfZE9xK.js → YandexGamesView-BAuOI0EI.js} +2 -2
- package/dist/web/assets/{dist-BmzcNjGQ.js → dist-7vx7MTaJ.js} +1 -1
- package/dist/web/assets/index-B6_q6dBC.js +13 -0
- package/dist/web/assets/index-Izzbh11U.css +1 -0
- package/dist/web/assets/{IconBase.es-Bvh5HoVq.js → jsx-runtime-CdVFa8IP.js} +1 -1
- package/dist/web/assets/resources-xyl8IpX6.js +1 -0
- package/dist/web/assets/ui-wHE_yBK0.js +41 -0
- package/dist/web/assets/workflow-CEkwrbrT.js +34 -0
- package/dist/web/assets/workflow-s2TewWL6.css +1 -0
- package/dist/web/index.html +4 -4
- package/package.json +11 -1
- package/dist/web/assets/AgentActivity-BmfJK4y-.js +0 -9
- package/dist/web/assets/AssetSelectionWizard-BB3qGs0g.js +0 -1
- package/dist/web/assets/Check.es-C6V98Gx8.js +0 -1
- package/dist/web/assets/CoreAccount-Dkpl4Rzw.js +0 -1
- package/dist/web/assets/KidsApp-BRwDKhZO.js +0 -2
- package/dist/web/assets/PlainChat-DT-l2KJ-.js +0 -1
- package/dist/web/assets/Plus.es-xuvXKifF.js +0 -1
- package/dist/web/assets/WorkflowJournal-CnLiVdGb.js +0 -1
- package/dist/web/assets/index-IRbQKmkO.js +0 -13
- package/dist/web/assets/index-aj0ikA52.css +0 -1
- package/dist/web/assets/resources-CT9ITJ8m.js +0 -1
- package/dist/web/assets/ui-CVc6Nw0y.js +0 -41
- package/dist/web/assets/workflow-BhcU9uvG.css +0 -1
- package/dist/web/assets/workflow-o5sZ-osd.js +0 -34
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.generated-media-preview{max-width:100%;margin:12px 0;display:block}.generated-media-preview img,.generated-media-preview video{object-fit:contain;border-radius:16px;width:min(100%,720px);max-height:65vh;margin-bottom:10px;display:block}.generated-media-preview audio{width:min(100%,480px);margin-bottom:10px;display:block}.generated-media-preview a{overflow-wrap:anywhere;display:inline-block}.video-reference{color:var(--text,#12142b);background:var(--surface,#fff);border:1px solid var(--border,#d9dcec);border-radius:18px;flex-shrink:0;margin:12px 0;overflow:hidden}.video-reference-toggle{text-align:left;cursor:pointer;width:100%;color:inherit;background:0 0;border:0;align-items:center;gap:12px;padding:16px 20px;display:flex}.video-reference-toggle>b{font-size:16px}.video-reference-toggle>span:last-child{color:var(--muted,#5d628a);text-overflow:ellipsis;white-space:nowrap;max-width:40%;margin-left:auto;font-size:13px;overflow:hidden}.video-reference-body{flex-direction:column;gap:12px;max-height:75vh;padding:0 20px 20px;display:flex;overflow:auto}.video-reference-body>*{flex-shrink:0}.video-reference-body p{max-width:78ch;margin:0;line-height:1.6}.video-reference-body label{flex-direction:column;gap:8px;display:flex}.video-reference-body textarea{resize:vertical;border:1px solid var(--border,#d9dcec);width:100%;min-height:80px;color:inherit;background:var(--bg,#f5f6fb);border-radius:12px;padding:12px}.video-reference-body video{background:#12142b;border-radius:12px;align-self:center;max-width:100%;max-height:300px}.video-reference-body progress{width:100%;accent-color:var(--accent,#0c8c6c)}.video-actions{flex-wrap:wrap;gap:10px;display:flex}.video-reference-body button{cursor:pointer;border:1px solid var(--border,#d9dcec);color:inherit;background:var(--inset,#eef0f8);font:inherit;border-radius:12px;padding:10px 14px}.video-reference-body button:disabled{opacity:.45;cursor:default}.video-reference-body .video-delete{color:var(--danger,#b84c40);background:0 0;align-self:flex-start}.video-tools{border-left:4px solid var(--accent,#0c8c6c);background:var(--inset,#eef0f8);padding:12px 16px}.video-tools p{margin:8px 0}.video-notice,.video-reference-body small{color:var(--muted,#5d628a);font-size:13px}.video-analysis-progress{flex-direction:column;gap:8px;display:flex}.video-evidence{border-bottom:1px solid var(--border,#d9dcec);padding:16px 0}.video-evidence>div{flex-wrap:wrap;align-items:baseline;gap:8px;margin:8px 0;display:flex}.video-evidence em{font-size:12px}.video-error{color:var(--danger,#b84c40)}.video-idea-layout{flex-direction:column;flex:1;width:100%;min-height:0;display:flex}.video-idea-layout>.video-reference{margin:8px 24px}.video-idea-layout>.k-work{flex:1;min-height:250px}@media (width<=600px){.video-idea-layout>.video-reference{margin:8px}.video-reference-toggle{padding:14px 12px}.video-reference-toggle>span:last-child{display:none}.video-reference-body{padding:0 12px 16px}.video-actions>button{flex-grow:1}}
|
package/dist/web/index.html
CHANGED
|
@@ -17,10 +17,10 @@
|
|
|
17
17
|
content="Локальная мастерская игр. От идеи и плана до работающей игры с вашим AI-агентом."
|
|
18
18
|
/>
|
|
19
19
|
<title>Game Hub — мастерская игр</title>
|
|
20
|
-
<script type="module" crossorigin src="/assets/index-
|
|
21
|
-
<link rel="modulepreload" crossorigin href="/assets/
|
|
22
|
-
<link rel="modulepreload" crossorigin href="/assets/ui-
|
|
23
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
20
|
+
<script type="module" crossorigin src="/assets/index-B6_q6dBC.js"></script>
|
|
21
|
+
<link rel="modulepreload" crossorigin href="/assets/jsx-runtime-CdVFa8IP.js">
|
|
22
|
+
<link rel="modulepreload" crossorigin href="/assets/ui-wHE_yBK0.js">
|
|
23
|
+
<link rel="stylesheet" crossorigin href="/assets/index-Izzbh11U.css">
|
|
24
24
|
</head>
|
|
25
25
|
<body>
|
|
26
26
|
<div id="root"></div>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@darkclaw921/umgt",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Local AI game development workspace",
|
|
6
6
|
"engines": {
|
|
@@ -83,5 +83,15 @@
|
|
|
83
83
|
"publishConfig": {
|
|
84
84
|
"access": "public",
|
|
85
85
|
"registry": "https://registry.npmjs.org/"
|
|
86
|
+
},
|
|
87
|
+
"umgtReleaseNotes": {
|
|
88
|
+
"title": "Обложки, музыка, видео и восстановленные лимиты",
|
|
89
|
+
"changes": [
|
|
90
|
+
"Создавайте обложки, музыку и короткие видео через OpenRouter прямо в чате и задачах проекта.",
|
|
91
|
+
"Смотрите изображения, слушайте музыку, воспроизводите видео и скачивайте готовые файлы в студии.",
|
|
92
|
+
"Прерванную генерацию можно продолжить без повторного платного запроса.",
|
|
93
|
+
"Карточки месячного, недельного и дневного лимитов остаются видимыми при неактивной подписке и недоступности данных.",
|
|
94
|
+
"Остаток, расход и резерв на ожидающую генерацию показаны отдельно в процентах."
|
|
95
|
+
]
|
|
86
96
|
}
|
|
87
97
|
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{n as e,o as t,r as n,t as r}from"./IconBase.es-Bvh5HoVq.js";import{t as i}from"./CaretDown.es-BF-GEzW4.js";import{t as a}from"./CheckCircle.es-CAQfdit1.js";import{n as o,t as s}from"./FileText.es-C7Qe_oPL.js";import{t as c}from"./MagnifyingGlass.es-DAAoXLM5.js";import{t as l}from"./PencilSimple.es-B8ERAsFN.js";import{t as u}from"./Sparkle.es-B2bpSK_D.js";import{t as d}from"./WarningCircle.es-DeosDn7W.js";import{B as f,H as p,V as m,b as h,x as g,y as _}from"./index-IRbQKmkO.js";var v=t(n(),1),y=(0,v.createContext)({}),b=typeof window<`u`?v.useLayoutEffect:v.useEffect,x=(0,v.createContext)(null);function S(e,t){e.indexOf(t)===-1&&e.push(t)}function C(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}var w=(e,t,n)=>n>t?t:n<e?e:n,T={},ee=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),te=e=>typeof e==`object`&&!!e,ne=e=>/^0[^.\s]+$/u.test(e);function re(e){let t;return()=>(t===void 0&&(t=e()),t)}var E=e=>e,ie=(...e)=>e.reduce((e,t)=>n=>t(e(n))),ae=(e,t,n)=>{let r=t-e;return r?(n-e)/r:1},oe=class{constructor(){this.subscriptions=[]}add(e){return S(this.subscriptions,e),()=>this.remove(e)}remove(e){C(this.subscriptions,e)}notify(e,t,n){let r=this.subscriptions.length;if(r){if(r===1)this.subscriptions[0](e,t,n);else for(let i=0;i<r;i++){let r=this.subscriptions[i];r&&r(e,t,n)}}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}},D=e=>e*1e3,O=e=>e/1e3,se=(e,t)=>t?1e3/t*e:0,ce=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,le=1e-7,ue=12;function de(e,t,n,r,i){let a,o,s=0;do o=t+(n-t)/2,a=ce(o,r,i)-e,a>0?n=o:t=o;while(Math.abs(a)>le&&++s<ue);return o}function fe(e,t,n,r){if(e===t&&n===r)return E;let i=t=>de(t,0,1,e,n);return e=>e===0||e===1?e:ce(i(e),t,r)}var pe=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,me=e=>t=>1-e(1-t),he=fe(.33,1.53,.69,.99),ge=me(he),_e=pe(ge),ve=e=>e>=1?1:(e*=2)<1?.5*ge(e):.5*(2-2**(-10*(e-1))),ye=e=>1-Math.sin(Math.acos(e)),be=me(ye),xe=pe(ye),Se=fe(.42,0,1,1),Ce=fe(0,0,.58,1),we=fe(.42,0,.58,1),Te=e=>Array.isArray(e)&&typeof e[0]!=`number`,Ee=e=>Array.isArray(e)&&typeof e[0]==`number`,De={linear:E,easeIn:Se,easeInOut:we,easeOut:Ce,circIn:ye,circInOut:xe,circOut:be,backIn:ge,backInOut:_e,backOut:he,anticipate:ve},Oe=e=>typeof e==`string`,ke=e=>{if(Ee(e)){e.length;let[t,n,r,i]=e;return fe(t,n,r,i)}return Oe(e)?(De[e],`${e}`,De[e]):e},k={delta:0,timestamp:0,isProcessing:!1},Ae;function je(){Ae=void 0}var A={now:()=>(Ae===void 0&&A.set(k.isProcessing||T.useManualTiming?k.timestamp:performance.now()),Ae),set:e=>{Ae=e,queueMicrotask(je)}},Me=e=>Math.round(e*1e5)/1e5,Ne=e=>t=>typeof t==`string`&&t.startsWith(e),Pe=Ne(`--`),Fe=Ne(`var(--`),Ie=e=>Fe(e)?Le.test(e.split(`/*`)[0].trim()):!1,Le=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Re(e){return typeof e==`string`&&e.split(`/*`)[0].includes(`var(--`)}var ze={test:e=>typeof e==`number`,parse:parseFloat,transform:e=>e},Be={...ze,transform:e=>w(0,1,e)},Ve={...ze,default:1},He=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Ue(e){return e==null}var We=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Ge=(e,t)=>n=>!!(typeof n==`string`&&We.test(n)&&n.startsWith(e)||t&&!Ue(n)&&Object.prototype.hasOwnProperty.call(n,t)),Ke=(e,t,n)=>r=>{if(typeof r!=`string`)return r;let[i,a,o,s]=r.match(He);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(o),alpha:s===void 0?1:parseFloat(s)}},qe=e=>w(0,255,e),Je={...ze,transform:e=>Math.round(qe(e))},Ye={test:Ge(`rgb`,`red`),parse:Ke(`red`,`green`,`blue`),transform:({red:e,green:t,blue:n,alpha:r=1})=>`rgba(`+Je.transform(e)+`, `+Je.transform(t)+`, `+Je.transform(n)+`, `+Me(Be.transform(r))+`)`};function Xe(e){let t=``,n=``,r=``,i=``;return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}var Ze={test:Ge(`#`),parse:Xe,transform:Ye.transform},Qe=e=>({test:t=>typeof t==`string`&&t.endsWith(e)&&t.split(` `).length===1,parse:parseFloat,transform:t=>`${t}${e}`}),j=Qe(`deg`),M=Qe(`%`),N=Qe(`px`),$e=Qe(`vh`),et=Qe(`vw`),tt={...M,parse:e=>M.parse(e)/100,transform:e=>M.transform(e*100)},nt={test:Ge(`hsl`,`hue`),parse:Ke(`hue`,`saturation`,`lightness`),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>`hsla(`+Math.round(e)+`, `+M.transform(Me(t))+`, `+M.transform(Me(n))+`, `+Me(Be.transform(r))+`)`},P={test:e=>Ye.test(e)||Ze.test(e)||nt.test(e),parse:e=>Ye.test(e)?Ye.parse(e):nt.test(e)?nt.parse(e):Ze.parse(e),transform:e=>typeof e==`string`?e:e.hasOwnProperty(`red`)?Ye.transform(e):nt.transform(e),getAnimatableNone:e=>{let t=P.parse(e);return t.alpha=0,P.transform(t)}},rt=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,it=new RegExp(He.source),at=new RegExp(rt.source,`i`);function ot(e){return isNaN(e)&&typeof e==`string`&&(it.test(e)||at.test(e))}var st=`number`,ct=`color`,lt=`var`,ut=`var(`,dt="${}",ft=/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 pt(e){let t=e.toString();return it.test(t)||at.test(t)}function mt(e){let t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[],a=0;return{values:n,split:t.replace(ft,e=>(P.test(e)?(r.color.push(a),i.push(ct),n.push(P.parse(e))):e.startsWith(ut)?(r.var.push(a),i.push(lt),n.push(e)):(r.number.push(a),i.push(st),n.push(parseFloat(e))),++a,dt)).split(dt),indexes:r,types:i}}function ht(e){return mt(e).values}function gt({split:e,types:t}){let n=e.length;return r=>{let i=``;for(let a=0;a<n;a++)if(i+=e[a],r[a]!==void 0){let e=t[a];i+=e===st?Me(r[a]):e===ct?P.transform(r[a]):r[a]}return i}}function _t(e){return gt(mt(e))}var vt=e=>typeof e==`number`?0:P.test(e)?P.getAnimatableNone(e):e,yt=(e,t)=>typeof e==`number`?t?.trim().endsWith(`/`)?e:0:vt(e);function bt(e){let t=mt(e);return gt(t)(t.values.map((e,n)=>yt(e,t.split[n])))}var F={test:ot,parse:ht,createTransformer:_t,getAnimatableNone:bt};function xt(e,t,n){return n<0&&(n+=1),n>1&&--n,n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function St({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,a=0,o=0;if(!t)i=a=o=n;else{let r=n<.5?n*(1+t):n+t-n*t,s=2*n-r;i=xt(s,r,e+1/3),a=xt(s,r,e),o=xt(s,r,e-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(o*255),alpha:r}}function Ct(e,t){return n=>n>0?t:e}var I=(e,t,n)=>e+(t-e)*n,wt=(e,t,n)=>{let r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},Tt=[Ze,Ye,nt],Et=e=>Tt.find(t=>t.test(e));function Dt(e){let t=Et(e);if(!t)return`${e}`,!1;let n=t.parse(e);return t===nt&&(n=St(n)),n}var Ot=(e,t)=>{let n=Dt(e),r=Dt(t);if(!n||!r)return Ct(e,t);let i={...n};return e=>(i.red=wt(n.red,r.red,e),i.green=wt(n.green,r.green,e),i.blue=wt(n.blue,r.blue,e),i.alpha=I(n.alpha,r.alpha,e),Ye.transform(i))},kt=new Set([`none`,`hidden`]);function At(e,t){return kt.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function jt(e,t){return n=>I(e,t,n)}function Mt(e){return typeof e==`number`?jt:typeof e==`string`?Ie(e)?Ct:P.test(e)?Ot:It:Array.isArray(e)?Nt:typeof e==`object`?P.test(e)?Ot:Pt:Ct}function Nt(e,t){let n=[...e],r=n.length,i=e.map((e,n)=>Mt(e)(e,t[n]));return e=>{for(let t=0;t<r;t++)n[t]=i[t](e);return n}}function Pt(e,t){let n={...e,...t},r={};for(let i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=Mt(e[i])(e[i],t[i]));return e=>{for(let t in r)n[t]=r[t](e);return n}}function Ft(e,t){let n=[],r={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){let a=t.types[i],o=e.indexes[a][r[a]],s=e.values[o]??0;n[i]=s,r[a]++}return n}var It=(e,t)=>{let n=F.createTransformer(t),r=mt(e),i=mt(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?kt.has(e)&&!i.values.length||kt.has(t)&&!r.values.length?At(e,t):ie(Nt(Ft(r,i),i.values),n):(`${e}${t}`,Ct(e,t))},Lt=/^(-?(?:\d+(?:\.\d*)?|\.\d+))([a-z%]*)$/iu;function Rt(e,t){let n=Lt.exec(e);if(!n)return;let r=Lt.exec(t);if(!r||n[2]!==r[2])return;let i=n[2],a=parseFloat(n[1]),o=parseFloat(r[1]);return e=>Me(I(a,o,e))+i}function zt(e,t,n){if(typeof e==`number`&&typeof t==`number`&&typeof n==`number`)return I(e,t,n);if(typeof e==`string`&&typeof t==`string`){let n=Rt(e,t);if(n)return n}return Mt(e)(e,t)}var Bt=[`setup`,`read`,`resolveKeyframes`,`preUpdate`,`update`,`preRender`,`render`,`postRender`];function Vt(e){let t=new Set,n=new Set,r=!1,i=!1,a=new Set,o={delta:0,timestamp:0,isProcessing:!1};function s(t){a.has(t)&&(n.add(t),e()),t(o)}let c={schedule:(e,i=!1,o=!1)=>{let s=o&&r?t:n;return i&&a.add(e),s.add(e),e},cancel:e=>{n.delete(e),a.delete(e)},process:e=>{if(o=e,r){i=!0;return}r=!0;let a=t;t=n,n=a,t.forEach(s),t.clear(),r=!1,i&&(i=!1,c.process(e))}};return c}var Ht=40;function Ut(e,t,n={delta:0,timestamp:0,isProcessing:!1}){let r=!1,i=!0,a=()=>r=!0,o=Bt.reduce((e,t)=>(e[t]=Vt(a),e),{}),{setup:s,read:c,resolveKeyframes:l,preUpdate:u,update:d,preRender:f,render:p,postRender:m}=o,h=()=>{let a=T.useManualTiming,o=a?n.timestamp:performance.now();r=!1,a||(n.delta=i?1e3/60:Math.max(Math.min(o-n.timestamp,Ht),1)),n.timestamp=o,n.isProcessing=!0,s.process(n),c.process(n),l.process(n),u.process(n),d.process(n),f.process(n),p.process(n),m.process(n),n.isProcessing=!1,r&&t&&(i=!1,e(h))},g=()=>{r=!0,i=!0,n.isProcessing||e(h)};return{schedule:Bt.reduce((e,t)=>{let n=o[t];return e[t]=(e,t=!1,i=!1)=>(r||g(),n.schedule(e,t,i)),e},{}),cancel:e=>{for(let t=0;t<Bt.length;t++)o[Bt[t]].cancel(e)},state:n,steps:o}}var{schedule:L,cancel:R,steps:Wt}=Ut(typeof requestAnimationFrame<`u`?requestAnimationFrame:E,!0,k),Gt=e=>{let t=({timestamp:t})=>e(t);return{start:(e=!0)=>L.update(t,e),stop:()=>R(t),now:()=>k.isProcessing?k.timestamp:A.now()}},Kt=(e,t,n=10)=>{let r=``,i=Math.max(Math.round(t/n),2);for(let t=0;t<i;t++)r+=Math.round(e(t/(i-1))*1e4)/1e4+`, `;return`linear(${r.substring(0,r.length-2)})`},qt=2e4;function Jt(e,t=50,n=qt,r){let i=0,a=e.next(i);for(r?.push(a.value);!a.done&&i<n;)i+=t,a=e.next(i),r?.push(a.value);return i>=n?1/0:i}function Yt(e,t=100,n){let r=n({...e,keyframes:[0,t]}),i=Math.min(Jt(r),qt);return{type:`keyframes`,ease:e=>r.next(i*e).value/t,duration:O(i)}}var z={stiffness:100,damping:10,mass:1,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05},Xt=e=>e<0?1/Math.max(1+e,z.minDamping):Math.max(1-e,z.minDamping);function Zt(e,t){if(!(e>1))return 1;let n=Math.sqrt(e*e-1),r=e-n,i=e+n,a=2*n*Math.exp(-t)*(1+t);return en(e=>i*Math.exp(-r*e)-r*Math.exp(-i*e)-a,e=>Math.exp(-i*e)-Math.exp(-r*e),t)/t}function Qt(e,t){return e*Math.sqrt(1-t*t)}var $t=12;function en(e,t,n){let r=n;for(let n=1;n<$t;n++)r-=e(r)/t(r);return r}var tn=.001;function nn({duration:e=z.duration,bounce:t=z.bounce}){let n,r;z.maxDuration;let i=Xt(t);e=w(z.minDuration,z.maxDuration,O(e)),i<1?(n=t=>{let n=t*i,r=n*e,a=Qt(t,i),o=Math.exp(-r);return tn-n/a*o},r=t=>{let r=t*i*e,a=i*i*t*t*e,o=Math.exp(-r),s=Qt(t*t,i);return(-n(t)+tn>0?-1:1)*-a*o/s}):(n=t=>-.001+Math.exp(-t*e)*(t*e+1),r=t=>Math.exp(-t*e)*(-t*(e*e)));let a=5/e,o=en(n,r,a),s=o*Zt(i,o*e),c=s*s;return{stiffness:c,damping:i*2*Math.sqrt(c),duration:D(e)}}var rn=(e,t)=>(t?e>=0:e>0)&&e<1/0;function an(e,t){if(rn(e,t))return e}function on(e){let t=an(e.stiffness),n=an(e.damping,!0),r=an(e.mass),i={...e,stiffness:t??z.stiffness,damping:n??z.damping,mass:r??z.mass,isResolvedFromDuration:!1,isTimeDefined:(t??n??r)===void 0&&(e.duration!==void 0||e.bounce!==void 0)};if(i.isTimeDefined){if(e.visualDuration){let t=Xt(e.bounce||0),n=2*Math.PI/(e.visualDuration*1.2)*Zt(t,2*Math.PI/1.2);i.stiffness=n*n,i.damping=2*t*Math.sqrt(i.stiffness)}else Object.assign(i,nn(i)),i.isResolvedFromDuration=!0;(!rn(i.stiffness)||!rn(i.damping,!0))&&(i.stiffness=z.stiffness,i.damping=z.damping)}return i}function sn(e=z.visualDuration,t=z.bounce){let n=typeof e==`object`?e:{visualDuration:e,keyframes:[0,1],bounce:t},r=n.keyframes[0],i=n.keyframes[n.keyframes.length-1],a={done:!1,value:r},{stiffness:o,damping:s,mass:c,duration:l,isResolvedFromDuration:u,isTimeDefined:d}=on({...n}),f=e=>d?0:-O(e),p=s/(2*Math.sqrt(o*c)),m=O(Math.sqrt(o/c)),h=p*m,g={target:i,delta:i-r,velocity:f(n.velocity||0)||0,restSpeed:0,restDelta:0},_=()=>{let e=Math.abs(g.delta)<5;g.restSpeed=n.restSpeed||(e?z.restSpeed.granular:z.restSpeed.default),g.restDelta=n.restDelta||(e?z.restDelta.granular:z.restDelta.default)};_();let v,y,b;if(p<1){let e=Qt(m,p),t={A:0,sinC:0,cosC:0,t:-1,env:0,sin:0,cos:0};b=()=>{t.A=(g.velocity+h*g.delta)/e,t.sinC=h*t.A+g.delta*e,t.cosC=h*g.delta-t.A*e};let n=n=>{n!==t.t&&(t.t=n,t.env=Math.exp(-h*n),t.sin=Math.sin(e*n),t.cos=Math.cos(e*n))};v=e=>(n(e),g.target-t.env*(t.A*t.sin+g.delta*t.cos)),y=e=>(n(e),t.env*(t.sinC*t.sin+t.cosC*t.cos))}else if(p===1){v=e=>g.target-Math.exp(-m*e)*(g.delta+(g.velocity+m*g.delta)*e);let e={C:0};b=()=>{e.C=g.velocity+m*g.delta},y=t=>Math.exp(-m*t)*(m*e.C*t-g.velocity)}else{let e=m*Math.sqrt(p*p-1),t=h-e,n=h+e,r=d?1/0:300/e,i=(e,t)=>Math.exp(t>r?-e*r-h*(t-r):-e*t),a={S:0,F:0};b=()=>{let t=(g.velocity+h*g.delta)/e;a.S=(g.delta+t)/2,a.F=(g.delta-t)/2},v=e=>g.target-a.S*i(t,e)-a.F*i(n,e),y=e=>t*a.S*i(t,e)+n*a.F*i(n,e)}b();let x=u&&l||null,S={calculatedDuration:x,retarget:(e,t)=>{g.target=e[e.length-1],g.delta=g.target-e[0],g.velocity=f(t),n.restSpeed&&n.restDelta||_(),S.calculatedDuration=x,a.done=!1,b()},velocity:e=>D(y(e)),next:e=>{let t=v(e);if(u)a.done=e>=l;else{let n=D(y(e));a.done=Math.abs(n)<=g.restSpeed&&Math.abs(g.target-t)<=g.restDelta}return a.value=a.done?g.target:t,a},toString:()=>{let e=Math.min(Jt(S),qt),t=Kt(t=>S.next(e*t).value,e,30);return e+`ms `+t},toTransition:()=>{}};return S}sn.applyToOptions=e=>{let t=Yt(e,100,sn);return e.ease=t.ease,e.duration=D(t.duration),e.type=`keyframes`,e};function cn({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:a=500,modifyTarget:o,min:s,max:c,restDelta:l=.5,restSpeed:u}){let d=e[0],f={done:!1,value:d},p=e=>e<s||e>c,m=e=>s===void 0?c:c===void 0||Math.abs(s-e)<Math.abs(c-e)?s:c,h=n*t,g=d+h,_=o===void 0?g:o(g);_!==g&&(h=_-d);let v=e=>-h*Math.exp(-e/r),y=e=>{let t=v(e);f.done=Math.abs(t)<=l,f.value=f.done?_:_+t},b,x,S=e=>{p(f.value)&&(b=e,x=sn({keyframes:[f.value,m(f.value)],velocity:-v(e)/r*1e3,damping:i,stiffness:a,restDelta:l,restSpeed:u}))};return S(0),{calculatedDuration:null,next:e=>{let t=!1;return!x&&b===void 0&&(t=!0,y(e),S(e)),b!==void 0&&e>=b?x.next(e-b):(!t&&y(e),f)}}}function ln(e,t,n){let r=[],i=n||T.mix||zt,a=e.length-1;for(let n=0;n<a;n++){let a=i(e[n],e[n+1]);t&&(a=ie(Array.isArray(t)?t[n]||E:t,a)),r.push(a)}return r}function un(e,t,{clamp:n=!0,ease:r,mixer:i}={}){let a=e.length;if(t.length,a===1)return()=>t[0];if(a===2&&t[0]===t[1])return()=>t[1];let o=e[0]===e[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());let s=ln(t,r,i),c=s.length,l=n=>{if(o&&n<e[0])return t[0];let r=0;if(c>1)for(;r<e.length-2&&!(n<e[r+1]);r++);let i=ae(e[r],e[r+1],n);return s[r](i)};return n?t=>l(w(e[0],e[a-1],t)):l}function dn(e,t){let n=e[e.length-1];for(let r=1;r<=t;r++){let i=ae(0,t,r);e.push(I(n,1,i))}}function fn(e){let t=[0];return dn(t,e.length-1),t}function pn(e,t){return e.map(e=>e*t)}function mn(e,t){return e.map(()=>t||we).splice(0,e.length-1)}function hn({duration:e=300,keyframes:t,times:n,ease:r=`easeInOut`}){let i=Te(r)?r.map(ke):ke(r)||we,a={done:!1,value:t[0]};if(t.length===2&&!Array.isArray(i)&&(!n||n.length!==2||n[0]===0&&n[1]===1)){let[n,r]=t,o=n===r?void 0:(T.mix||zt)(n,r);return{calculatedDuration:e,next:t=>(a.value=o?o(i(e>0?w(0,1,t/e):1)):r,a.done=t>=e,a)}}let o=un(pn(n&&n.length===t.length?n:fn(t),e),t,{ease:Array.isArray(i)?i:mn(t,i)});return{calculatedDuration:e,next:t=>(a.value=o(t),a.done=t>=e,a)}}var gn=5;function _n(e,t,n){let r=Math.max(t-gn,0);return se(n-e(r),t-r)}function vn(e,t,n=0){return t<=0?n:e.velocity?e.velocity(t):_n(t=>e.next(t).value,t,e.next(t).value)}var yn=e=>e!==null;function bn(e,{repeat:t,repeatType:n=`loop`},r,i=1){let a=e.filter(yn),o=i<0||t&&n!==`loop`&&t%2==1?0:a.length-1;return!o||r===void 0?a[o]:r}var xn={decay:cn,inertia:cn,tween:hn,keyframes:hn,spring:sn};function Sn(e){typeof e.type==`string`&&(e.type=xn[e.type])}function Cn(e,t){return{kind:e,animation:t,timestamp:A.now(),frameTimestamp:k.timestamp,frameIsProcessing:k.isProcessing}}function wn(e,t,n){let r=globalThis.__MOTION_INSPECT__;if(r)try{r({...Cn(`animation-start`,e),options:n?{...t,...n}:t})}catch{}}function Tn(e,t){let n=globalThis.__MOTION_INSPECT__;if(n)try{n({...Cn(`layout-animation-start`,e),node:t})}catch{}}var En=class{constructor(){this.isResolved=!1}get finished(){return this._finished||=this.isResolved?Promise.resolve():new Promise(e=>{this._resolve=e}),this._finished}updateFinished(){this._finished=this._resolve=void 0,this.isResolved=!1}notifyFinished(){this.isResolved=!0,this._resolve?.()}then(e,t){return this.finished.then(e,t)}},Dn=e=>e/100,On=class extends En{constructor(e){super(),this.state=`idle`,this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{let{motionValue:e}=this.options;e&&e.updatedAt!==A.now()&&this.tick(A.now()),this.isStopped=!0,this.state!==`idle`&&(this.teardown(),this.options.onStop?.())},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause(),wn(this,this.options)}initAnimation(){let{options:e}=this;Sn(e);let{type:t=hn,repeat:n=0,repeatDelay:r=0,repeatType:i,velocity:a=0}=e,{keyframes:o}=e,s=t||hn;s!==hn&&typeof o[0]!=`number`&&(this.mixKeyframes=ie(Dn,zt(o[0],o[1])),o=[0,100]);let c=s(o===e.keyframes?e:{...e,keyframes:o});i===`mirror`&&(this.mirroredGenerator=s({...e,keyframes:[...o].reverse(),velocity:-a})),c.calculatedDuration===null&&(c.calculatedDuration=Jt(c));let{calculatedDuration:l}=c;this.calculatedDuration=l,this.resolvedDuration=l+r,this.totalDuration=this.resolvedDuration*(n+1)-r,this.generator=c}updateTime(e){let t=Math.round(e-this.startTime)*this.playbackSpeed;this.currentTime=this.holdTime===null?t:this.holdTime}tick(e,t=!1){let{generator:n,totalDuration:r,mixKeyframes:i,mirroredGenerator:a,resolvedDuration:o,calculatedDuration:s}=this;if(this.startTime===null)return n.next(0);let{delay:c=0,keyframes:l,repeat:u,repeatType:d,repeatDelay:f,type:p,onUpdate:m,finalKeyframe:h}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-r/this.speed,this.startTime)),t?this.currentTime=e:this.updateTime(e);let g=this.currentTime-c*(this.playbackSpeed>=0?1:-1),_=this.playbackSpeed>=0?g<0:g>r;this.currentTime=Math.max(g,0),this.state===`finished`&&this.holdTime===null&&(this.currentTime=r);let v=this.currentTime,y=n;if(u){let e=Math.min(this.currentTime,r)/o,t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),n===1&&t--,t=Math.min(t,u+1),t%2&&(d===`reverse`?(n=1-n,f&&(n-=f/o)):d===`mirror`&&(y=a)),v=w(0,1,n)*o}let b;_?(this.delayState.value=l[0],b=this.delayState):b=y.next(v),i&&!_&&(b.value=i(b.value));let{done:x}=b;!_&&s!==null&&(x=this.playbackSpeed>=0?this.currentTime>=r:this.currentTime<=0);let S=this.holdTime===null&&(this.state===`finished`||this.state===`running`&&x);return S&&p!==cn&&(b.value=bn(l,this.options,h,this.speed)),m&&m(b.value),S&&this.finish(),b}then(e,t){return this.finished.then(e,t)}get duration(){return O(this.calculatedDuration)}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+O(e)}get time(){return O(this.currentTime)}set time(e){e=D(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state=`paused`,this.holdTime=e,this.tick(e))}getGeneratorVelocity(){return vn(this.generator,this.currentTime,this.options.velocity)}get speed(){return this.playbackSpeed}set speed(e){let t=this.playbackSpeed!==e;t&&this.driver&&this.updateTime(A.now()),this.playbackSpeed=e,t&&this.driver&&(this.time=O(this.currentTime))}play(){if(this.isStopped)return;let{driver:e=Gt,startTime:t}=this.options;this.driver||=e(e=>this.tick(e)),this.options.onPlay?.();let n=this.driver.now();this.state===`finished`?(this.updateFinished(),this.startTime=n):this.holdTime===null?this.startTime||=t??n:this.startTime=n-this.holdTime,this.state===`finished`&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state=`running`,this.driver.start()}pause(){this.state=`paused`,this.updateTime(A.now()),this.holdTime=this.currentTime}complete(){this.state!==`running`&&this.play(),this.state=`finished`,this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state=`finished`,this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state=`idle`,this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&=(this.driver.stop(),void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type=`keyframes`,this.options.ease=`linear`,this.initAnimation()),this.driver?.stop(),e.observe(this)}},kn=new Set([`brightness`,`contrast`,`saturate`,`opacity`]);function An(e){let[t,n]=e.slice(0,-1).split(`(`);if(t===`drop-shadow`)return e;let[r]=n.match(He)||[];if(!r)return e;let i=n.replace(r,``),a=+!!kn.has(t);return r!==n&&(a*=100),t+`(`+a+i+`)`}var jn=/\b([a-z-]*)\(.*?\)/gu,Mn={...F,getAnimatableNone:e=>{let t=e.match(jn);return t?t.map(An).join(` `):e}},Nn={...F,getAnimatableNone:e=>{let t=F.parse(e);return F.createTransformer(e)(t.map(e=>typeof e==`number`?0:typeof e==`object`?{...e,alpha:1}:e))}},Pn={...ze,transform:Math.round},Fn={borderWidth:N,borderTopWidth:N,borderRightWidth:N,borderBottomWidth:N,borderLeftWidth:N,borderRadius:N,borderTopLeftRadius:N,borderTopRightRadius:N,borderBottomRightRadius:N,borderBottomLeftRadius:N,width:N,maxWidth:N,height:N,maxHeight:N,top:N,right:N,bottom:N,left:N,inset:N,insetBlock:N,insetBlockStart:N,insetBlockEnd:N,insetInline:N,insetInlineStart:N,insetInlineEnd:N,padding:N,paddingTop:N,paddingRight:N,paddingBottom:N,paddingLeft:N,paddingBlock:N,paddingBlockStart:N,paddingBlockEnd:N,paddingInline:N,paddingInlineStart:N,paddingInlineEnd:N,margin:N,marginTop:N,marginRight:N,marginBottom:N,marginLeft:N,marginBlock:N,marginBlockStart:N,marginBlockEnd:N,marginInline:N,marginInlineStart:N,marginInlineEnd:N,fontSize:N,backgroundPositionX:N,backgroundPositionY:N,rotate:j,pathRotation:j,rotateX:j,rotateY:j,rotateZ:j,scale:Ve,scaleX:Ve,scaleY:Ve,scaleZ:Ve,skew:j,skewX:j,skewY:j,distance:N,translateX:N,translateY:N,translateZ:N,x:N,y:N,z:N,perspective:N,transformPerspective:N,opacity:Be,originX:tt,originY:tt,originZ:N,zIndex:Pn,fillOpacity:Be,strokeOpacity:Be,numOctaves:Pn},In={...Fn,color:P,backgroundColor:P,outlineColor:P,fill:P,stroke:P,borderColor:P,borderTopColor:P,borderRightColor:P,borderBottomColor:P,borderLeftColor:P,filter:Mn,WebkitFilter:Mn,mask:Nn,WebkitMask:Nn},Ln=e=>In[e],Rn=new Set([Mn,Nn]);function zn(e,t){let n=Ln(e);return Rn.has(n)||(n=F),n.getAnimatableNone?n.getAnimatableNone(t):void 0}function Bn(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}var B=e=>e*180/Math.PI,Vn=e=>Un(B(Math.atan2(e[1],e[0]))),Hn={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Vn,rotateZ:Vn,skewX:e=>B(Math.atan(e[1])),skewY:e=>B(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Un=e=>(e%=360,e<0&&(e+=360),e),Wn=Vn,Gn=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Kn=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),qn={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Gn,scaleY:Kn,scale:e=>(Gn(e)+Kn(e))/2,rotateX:e=>Un(B(Math.atan2(e[6],e[5]))),rotateY:e=>Un(B(Math.atan2(-e[2],e[0]))),rotateZ:Wn,rotate:Wn,skewX:e=>B(Math.atan(e[4])),skewY:e=>B(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Jn(e){return+!!e.includes(`scale`)}function Yn(e,t){if(!e||e===`none`)return Jn(t);let n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u),r,i;if(n)r=qn,i=n;else{let t=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=Hn,i=t}if(!i)return Jn(t);let a=r[t],o=i[1].split(`,`).map(Zn);return typeof a==`function`?a(o):o[a]}var Xn=(e,t)=>{let{transform:n=`none`}=getComputedStyle(e);return Yn(n,t)};function Zn(e){return parseFloat(e.trim())}var Qn=[`transformPerspective`,`x`,`y`,`z`,`translateX`,`translateY`,`translateZ`,`scale`,`scaleX`,`scaleY`,`rotate`,`rotateX`,`rotateY`,`rotateZ`,`skew`,`skewX`,`skewY`],V=new Set([...Qn,`pathRotation`]),$n=e=>e===ze||e===N,er=new Set([`x`,`y`,`z`]),tr=Qn.filter(e=>!er.has(e));function nr(e){let t=[];return tr.forEach(n=>{let r=e.getValue(n);if(r!==void 0){let e=r.get(),i=+!!n.startsWith(`scale`);if(e===i)return;t.push([n,e]),r.set(i)}}),t}var rr=new Set([`bottom`,`right`]);function ir(e,t,n,r,i,a){let o=parseFloat(e);if(!isNaN(o))return o;let{min:s,max:c}=t()[n],l=c-s;return a===`border-box`?l:l-parseFloat(r)-parseFloat(i)}var ar={width:({width:e,paddingLeft:t=`0`,paddingRight:n=`0`,boxSizing:r},i)=>ir(e,i,`x`,t,n,r),height:({height:e,paddingTop:t=`0`,paddingBottom:n=`0`,boxSizing:r},i)=>ir(e,i,`y`,t,n,r),top:({top:e})=>parseFloat(e),left:({left:e})=>parseFloat(e),bottom:({top:e},t)=>{let{y:n}=t();return parseFloat(e)+(n.max-n.min)},right:({left:e},t)=>{let{x:n}=t();return parseFloat(e)+(n.max-n.min)},x:({transform:e})=>Yn(e,`x`),y:({transform:e})=>Yn(e,`y`)};ar.translateX=ar.x,ar.translateY=ar.y;var H=new Set,or=!1,sr=!1,cr=!1;function lr(){if(sr){let e=[],t=new Set,n=new Set;H.forEach(r=>{r.needsMeasurement&&(e.push(r),t.add(r.element),rr.has(r.name)&&n.add(r.element))});let r=new Map;n.forEach(e=>{let t=nr(e);t.length&&(r.set(e,t),e.render())}),e.forEach(e=>e.measureInitialState()),t.forEach(e=>{e.render();let t=r.get(e);t&&t.forEach(([t,n])=>{e.getValue(t)?.set(n)})}),e.forEach(e=>e.measureEndState()),e.forEach(e=>{e.suspendedScrollY!==void 0&&window.scrollTo(0,e.suspendedScrollY)})}sr=!1,or=!1,H.forEach(e=>e.complete(cr)),H.clear()}function ur(){H.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(sr=!0)})}function dr(){cr=!0,ur(),lr(),cr=!1}function fr(e,t,n){if(typeof e==`string`){if(ee(e)||ne(e))return parseFloat(e);if(!F.test(e)&&F.test(n))return zn(t,n)}return e??void 0}var pr=class{constructor(e,t,n,r,i,a=!1){this.state=`pending`,this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=n,this.motionValue=r,this.element=i,this.isAsync=a}scheduleResolve(){this.state=`scheduled`,this.isAsync?(H.add(this),or||(or=!0,L.read(ur),L.resolveKeyframes(lr))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:e,name:t,element:n,motionValue:r}=this;if(e[0]===null){let i=r?.get(),a=e[e.length-1];if(i!==void 0)e[0]=i;else if(n&&t){let r=fr(n.readValue(t,a),t,a);r!==void 0&&(e[0]=r)}e[0]===void 0&&(e[0]=a),r&&i===void 0&&r.set(e[0])}Bn(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state=`complete`,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),H.delete(this)}cancel(){this.state===`scheduled`&&(H.delete(this),this.state=`pending`)}resume(){this.state===`pending`&&this.scheduleResolve()}},mr=e=>e.startsWith(`--`);function hr(e,t,n){mr(t)?e.style.setProperty(t,n):e.style[t]=n}var gr={};function _r(e,t){let n=re(e);return()=>gr[t]??n()}var vr=_r(()=>window.ScrollTimeline!==void 0,`scrollTimeline`),yr=_r(()=>{try{document.createElement(`div`).animate({opacity:0},{easing:`linear(0, 1)`})}catch{return!1}return!0},`linearEasing`),br=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,xr={linear:`linear`,ease:`ease`,easeIn:`ease-in`,easeOut:`ease-out`,easeInOut:`ease-in-out`,circIn:br([0,.65,.55,1]),circOut:br([.55,0,1,.45]),backIn:br([.31,.01,.66,-.59]),backOut:br([.33,1.53,.69,.99])};function Sr(e,t){if(e)return typeof e==`function`?yr()?Kt(e,t):`ease-out`:Ee(e)?br(e):Array.isArray(e)?e.map(e=>Sr(e,t)||xr.easeOut):xr[e]}function Cr(e,t,n,{delay:r=0,duration:i=300,repeat:a=0,repeatType:o=`loop`,ease:s=`easeOut`,times:c}={},l=void 0){let u={[t]:n};c&&(u.offset=c);let d=Sr(s,i);Array.isArray(d)&&(u.easing=d);let f={delay:r,duration:i,easing:Array.isArray(d)?`linear`:d,fill:`both`,iterations:a+1,direction:o===`reverse`?`alternate`:`normal`};return l&&(f.pseudoElement=l),e.animate(u,f)}function wr(e){return typeof e==`function`&&`applyToOptions`in e}function Tr({type:e,...t}){return wr(e)&&yr()?e.applyToOptions(t):(t.duration??=300,t.ease??=`easeOut`,t)}var Er=class extends En{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;let{element:t,name:n,keyframes:r,pseudoElement:i,allowFlatten:a=!1,finalKeyframe:o,onComplete:s}=e;this.isPseudoElement=!!i,this.allowFlatten=a,this.options=e,e.type;let c=Tr(e);this.animation=Cr(t,n,r,c,i),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){let e=bn(r,this.options,o,this.speed);this.updateMotionValue&&this.updateMotionValue(e),hr(t,n,e),this.animation.cancel()}s?.(),this.notifyFinished()},wn(this,e,c)}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state===`finished`&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;let{state:e}=this;e!==`idle`&&e!==`finished`&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){let e=this.options?.element;!this.isPseudoElement&&e?.isConnected&&this.animation.commitStyles?.()}get duration(){let e=this.animation.effect?.getComputedTiming?.().duration||0;return O(Number(e))}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+O(e)}get time(){return O(Number(this.animation.currentTime)||0)}set time(e){let t=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=D(e),t&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime===null?this.animation.playState:`finished`}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,onAttach:t,observe:n}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:`linear`}),this.animation.onfinish=null,e&&vr()?(this.animation.timeline=e,t?.(this.animation),E):n(this)}},Dr={anticipate:ve,backInOut:_e,circInOut:xe};function Or(e){return e in Dr}function kr(e){typeof e.ease==`string`&&Or(e.ease)&&(e.ease=Dr[e.ease])}var Ar=10,jr=class extends Er{constructor(e){kr(e),Sn(e),super(e),e.startTime!==void 0&&e.autoplay!==!1&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){let{motionValue:t,onUpdate:n,onComplete:r,element:i,...a}=this.options;if(!t)return;if(e!==void 0){t.set(e);return}let o=new On({...a,autoplay:!1}),s=Math.max(Ar,A.now()-this.startTime),c=w(0,Ar,s-Ar),l=o.sample(s).value,{name:u}=this.options;i&&u&&hr(i,u,l),t.setWithVelocity(o.sample(Math.max(0,s-c)).value,l,c),o.stop()}},Mr=(e,t)=>t!==`zIndex`&&!!(typeof e==`number`||Array.isArray(e)||typeof e==`string`&&(F.test(e)||e===`0`)&&!e.startsWith(`url(`));function Nr(e){let t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function Pr(e,t,n,r){let i=e[0];if(i===null)return!1;if(t===`display`||t===`visibility`)return!0;let a=e[e.length-1],o=Mr(i,t),s=Mr(a,t);return!o||!s?(o!==s&&`${t}${i}${a}${o?a:i}`,!1):Nr(e)||(n===`spring`||wr(n))&&r}function Fr(e){e.duration=0,e.type=`keyframes`}var Ir=new Set([`opacity`,`clipPath`,`filter`,`transform`,`backgroundColor`]),Lr=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function Rr(e){for(let t=0;t<e.length;t++)if(typeof e[t]==`string`&&Lr.test(e[t]))return!0;return!1}var zr=new Set([`color`,`backgroundColor`,`outlineColor`,`fill`,`stroke`,`borderColor`,`borderTopColor`,`borderRightColor`,`borderBottomColor`,`borderLeftColor`]),Br=re(()=>Object.hasOwnProperty.call(Element.prototype,`animate`));function Vr(e){let{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:a,type:o,keyframes:s}=e;if(!n||!(Ir.has(n)||zr.has(n)))return!1;let c=t?.owner?.current;if(!(c instanceof HTMLElement)&&!(c instanceof SVGElement))return!1;let{onUpdate:l,transformTemplate:u}=t.owner.getProps();return Br()&&(Ir.has(n)||zr.has(n)&&Rr(s))&&(n!==`transform`||!u)&&!l&&!r&&i!==`mirror`&&a!==0&&o!==`inertia`}var Hr=40,Ur=class extends En{constructor(e){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=A.now();let{keyframes:t,name:n,motionValue:r,element:i}=e,a=e;a.autoplay??=!0,a.delay??=0,a.type??=`keyframes`,a.repeat??=0,a.repeatDelay??=0,a.repeatType??=`loop`;let o=i?.KeyframeResolver||pr;this.keyframeResolver=new o(t,(e,t,n)=>this.onKeyframesResolved(e,t,a,!n),n,r,i),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,t,n,r){this.keyframeResolver=void 0;let{name:i,type:a,velocity:o,delay:s,isHandoff:c,onUpdate:l}=n;this.resolvedAt=A.now();let u=!0;Pr(e,i,a,o)||(u=!1,(T.instantAnimations||!s)&&l?.(bn(e,n,t)),e[0]=e[e.length-1],Fr(n),n.repeat=0);let d=r?this.resolvedAt&&this.resolvedAt-this.createdAt>Hr?this.resolvedAt:this.createdAt:void 0,{onComplete:f}=n;n.startTime??=d,n.finalKeyframe=t,n.keyframes=e,n.onComplete=()=>{f?.(),this.notifyFinished()};let p=u&&!c&&Vr(n),m;if(p){n.element=n.motionValue?.owner?.current;try{m=new jr(n)}catch{m=new On(n)}}else m=new On(n);this.pendingTimeline&&=(this.stopTimeline=m.attachTimeline(this.pendingTimeline),void 0),this._animation=m}get finished(){return this._animation?this._animation.finished:super.finished}then(e,t){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),dr()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}};function Wr(e,t,n,r=0,i=1){let a=Array.from(e).sort((e,t)=>e.sortNodePosition(t)).indexOf(t),o=e.size,s=(o-1)*r;return typeof n==`function`?n(a,o):i===1?a*r:s-a*r}var Gr=30,Kr=e=>!isNaN(parseFloat(e)),qr={current:void 0},Jr=class{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=e=>{let t=A.now();if(this.updatedAt!==t&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&(this.notifyChange(),this.dependents))for(let e of this.dependents)e.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){this.current=e,this.updatedAt=A.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=Kr(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on(`change`,e)}on(e,t){var n;return e===`change`?this.onChangeSubscribe(t):((n=this.events)[e]||(n[e]=new oe)).add(t)}onChangeSubscribe(e){let{events:t}=this;return!t.change&&!this.changeSubscriber?this.changeSubscriber=e:(t.change||(t.change=new oe,t.change.add(this.changeSubscriber),this.changeSubscriber=void 0),t.change.add(e)),()=>{this.changeSubscriber===e?this.changeSubscriber=void 0:t.change?.remove(e),this.stopIfUnobserved()}}stopIfUnobserved(){L.read(()=>{!this.changeSubscriber&&!this.events.change?.getSize()&&this.stop()})}clearListeners(){this.changeSubscriber=void 0;for(let e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.notifyChange()}notifyChange(){let{current:e,changeSubscriber:t}=this;t?t(e):this.events.change?.notify(e)}addDependent(e){this.dependents||=new Set,this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return qr.current&&qr.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){let e=A.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>Gr)return 0;let t=Math.min(this.updatedAt-this.prevUpdatedAt,Gr);return se(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0;let n=!1,r;r=e(()=>{n=!0,this.events.animationComplete?.notify(),this.animation===r&&this.clearAnimation(),t()}),n||(this.animation=r),this.events.animationStart?.notify()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){this.animation=void 0}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}};function Yr(e,t){return new Jr(e,t)}function Xr(e,t){let n=e?.[t]??e?.default??e;return n===e?n:m(n,e)}var Zr={type:`spring`,stiffness:500,damping:25,restSpeed:10},Qr=e=>({type:`spring`,stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),$r={type:`keyframes`,duration:.8},ei={type:`keyframes`,ease:[.25,.1,.35,1],duration:.3},ti=(e,{keyframes:t})=>t.length>2?$r:V.has(e)?e.startsWith(`scale`)?Qr(t[1]):Zr:ei,ni=new Set([`when`,`delay`,`delayChildren`,`staggerChildren`,`staggerDirection`,`repeat`,`repeatType`,`repeatDelay`,`from`,`elapsed`]);function ri(e){for(let t in e)if(!ni.has(t))return!0;return!1}var ii=(e,t,n,r={},i,a)=>o=>{let s=Xr(r,e)||{},c=s.delay||r.delay||0,{elapsed:l=0}=r;l-=D(c);let u={keyframes:Array.isArray(n)?n:[null,n],ease:`easeOut`,velocity:t.getVelocity(),...s,delay:-l,onUpdate:e=>{t.set(e),s.onUpdate&&s.onUpdate(e)},onComplete:()=>{o(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:a?void 0:i};ri(s)||Object.assign(u,ti(e,u)),u.duration&&=D(u.duration),u.repeatDelay&&=D(u.repeatDelay),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(Fr(u),u.delay===0&&(d=!0)),(T.instantAnimations||T.skipAnimations||i?.shouldSkipAnimations||s.skipAnimations)&&(d=!0,Fr(u),u.delay=0),u.allowFlatten=!s.type&&!s.ease,d&&!a&&t.get()!==void 0){let e=bn(u.keyframes,s);if(e!==void 0){L.update(()=>{u.onUpdate(e),u.onComplete()});return}}return s.isSync?new On(u):new Ur(u)},ai=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function oi(e){let t=ai.exec(e);if(!t)return[,];let[,n,r,i]=t;return[`--${n??r}`,i]}function si(e,t,n=1){`${e}`;let[r,i]=oi(e);if(!r)return;let a=window.getComputedStyle(t).getPropertyValue(r);if(a){let e=a.trim();return ee(e)?parseFloat(e):e}return Ie(i)?si(i,t,n+1):i}function ci(e){let t=[{},{}];return e?.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function li(e,t,n,r){let i=t=>typeof t==`function`?t(n===void 0?e.custom:n,...ci(r)):t;return t=i(t),typeof t==`string`&&(t=e.variants&&e.variants[t]),i(t)}function U(e,t,n){return li(e.getProps(),t,n,e)}var ui=(e,t)=>t===`exit`?e.presenceContext?.custom:void 0,di=new Set([`width`,`height`,`top`,`left`,`right`,`bottom`,...Qn]),fi=e=>Array.isArray(e);function pi(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Yr(n))}function mi(e){return fi(e)?e[e.length-1]||0:e}function hi(e,t){let{transitionEnd:n={},transition:r={},...i}=U(e,t)||{};i={...i,...n};for(let t in i)pi(e,t,mi(i[t]))}var W=e=>!!(e&&e.getVelocity);function gi(e){return!!(W(e)&&e.add)}function _i(e,t){let n=e.getValue(`willChange`);if(gi(n))return n.add(t);if(!n&&T.WillChange){let n=new T.WillChange(`auto`);e.addValue(`willChange`,n),n.add(t)}}function vi(e){return e.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}var yi=`data-`+vi(`framerAppearId`);function bi(e){return e.props[yi]}var xi=typeof window<`u`;function Si({protectedKeys:e,needsAnimating:t},n){let r=n in e&&!t[n];return t[n]=!1,r}function Ci(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:a,transitionEnd:o,...s}=t,c=e.getDefaultTransition();a=a?m(a,c):c;let l=a?.reduceMotion,u=a?.skipAnimations;r&&(a=r);let d=[],f=i&&e.animationState?.getState()[i],p=a?.path;p&&p.animateVisualElement(e,s,a,n,d);for(let t in s){let r=e.getValue(t,e.latestValues[t]??null),i=s[t];if(i===void 0||f&&Si(f,t))continue;let o={delay:n,...Xr(a||{},t)};u&&(o.skipAnimations=!0);let c=r.get();if(c!==void 0&&!r.isAnimating()&&!Array.isArray(i)&&i===c&&!o.velocity){L.update(()=>r.set(i));continue}let p=!1;if(xi&&window.MotionHandoffAnimation){let n=bi(e);if(n){let e=window.MotionHandoffAnimation(n,t,L);e!==null&&(o.startTime=e,p=!0)}}_i(e,t);let m=l??e.shouldReduceMotion;r.start(ii(t,r,i,m&&di.has(t)?{type:!1}:o,e,p));let h=r.animation;h&&d.push(h)}if(o){let t=()=>L.update(()=>{o&&hi(e,o)});d.length?Promise.all(d).then(t):t()}return d}function wi(e,t,n={}){let r=U(e,t,ui(e,n.type)),i=n.transitionOverride||(r?.transition??(e.getDefaultTransition()||{})),a=()=>Promise.all(r?Ci(e,r,n):[]),o=(r=0)=>{let{variantChildren:a}=e,{delayChildren:o=0,staggerChildren:s,staggerDirection:c}=i,l=[];return a?.forEach(e=>{e.notify(`AnimationStart`,t),l.push(wi(e,t,{...n,delay:r+(typeof o==`function`?0:o)+Wr(a,e,o,s,c)}).then(()=>e.notify(`AnimationComplete`,t)))}),Promise.all(l)},{when:s}=i;return s?s===`beforeChildren`?a().then(()=>o()):o().then(a):Promise.all([a(),o(n.delay)])}function Ti(e,t,n={}){return e.notify(`AnimationStart`,t),(Array.isArray(t)?Promise.all(t.map(t=>wi(e,t,n))):typeof t==`string`?wi(e,t,n):Promise.all(Ci(e,U(e,t,n.custom),n))).then(()=>{e.notify(`AnimationComplete`,t)})}var Ei={test:e=>e===`auto`,parse:e=>e},Di=e=>t=>t.test(e),Oi=[ze,N,M,j,et,$e,Ei],ki=e=>Oi.find(Di(e));function Ai(e){return typeof e==`number`?e===0:e===null||e===`none`||e===`0`||ne(e)}var ji=new Set([`auto`,`none`,`0`]);function Mi(e,t,n){let r=0,i;for(;r<e.length&&!i;){let t=e[r];typeof t==`string`&&!ji.has(t)&&pt(t)&&(i=e[r]),r++}if(i&&n)for(let r of t)e[r]!==i&&(e[r]=zn(n,i))}var Ni=class extends pr{constructor(e,t,n,r,i){super(e,t,n,r,i,!0)}readKeyframes(){let{unresolvedKeyframes:e,element:t,name:n}=this;if(!t||!t.current)return;super.readKeyframes();for(let n=0;n<e.length;n++){let r=e[n];if(typeof r==`string`&&(r=r.trim(),Ie(r))){let i=si(r,t.current);i!==void 0&&(e[n]=i),n===e.length-1&&(this.finalKeyframe=r)}}if(this.resolveNoneKeyframes(),!di.has(n)||e.length!==2)return;let[r,i]=e;if(typeof r==`number`&&typeof i==`number`)return;let a=ki(r),o=ki(i);if(Re(r)!==Re(i)&&ar[n]){this.needsMeasurement=!0;return}if(a!==o){if($n(a)&&$n(o))for(let t=0;t<e.length;t++){let n=e[t];typeof n==`string`&&(e[t]=parseFloat(n))}else ar[n]&&(this.needsMeasurement=!0)}}resolveNoneKeyframes(){let{unresolvedKeyframes:e,name:t}=this,n=[];for(let t=0;t<e.length;t++)(e[t]===null||Ai(e[t]))&&n.push(t);n.length&&Mi(e,n,t)}measure(){let{element:e,name:t}=this;return ar[t](window.getComputedStyle(e.current),()=>e.measureViewportBox())}measureInitialState(){let{element:e,unresolvedKeyframes:t,name:n}=this;if(!e||!e.current)return;n===`height`&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=this.measure(),t[0]=this.measuredOrigin;let r=t[t.length-1];r!==void 0&&this.motionValue?.jump(r,!1)}measureEndState(){let{element:e,unresolvedKeyframes:t}=this;if(!e||!e.current)return;this.motionValue?.jump(this.measuredOrigin,!1);let n=t.length-1,r=t[n];t[n]=this.measure(),r!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=r),this.removedTransforms?.length&&this.removedTransforms.forEach(([t,n])=>{e.getValue(t).set(n)}),this.resolveNoneKeyframes()}},Pi=[`borderTopLeftRadius`,`borderTopRightRadius`,`borderBottomRightRadius`,`borderBottomLeftRadius`];function Fi(e){return te(e)&&`offsetHeight`in e&&!(`ownerSVGElement`in e)}function Ii(e){return te(e)&&`ownerSVGElement`in e}var Li=(e,t)=>t&&typeof e==`number`?t.transform(e):e;function Ri(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e==`string`){let r=document;t&&(r=t.current);let i=n?.[e]??r.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e).filter(e=>e!=null)}var zi={x:`translateX`,y:`translateY`,z:`translateZ`,transformPerspective:`perspective`},Bi=Qn.length;function Vi(e,t,n){let r=``,i=!0;for(let a=0;a<Bi;a++){let o=Qn[a],s=e[o];if(s===void 0)continue;let c=!0;if(typeof s==`number`)c=s===+!!o.startsWith(`scale`);else{let e=parseFloat(s);c=o.startsWith(`scale`)?e===1:e===0}if(!c||n){let e=Li(s,Fn[o]);if(!c){i=!1;let t=zi[o]||o;r+=`${t}(${e}) `}n&&(t[o]=e)}}let a=e.pathRotation;return a&&(i=!1,r+=`rotate(${Li(a,Fn.pathRotation)}) `),r=r.trim(),n?r=n(t,i?``:r):i&&(r=`none`),r}function Hi(e,t,n){let{style:r,vars:i,transformOrigin:a}=e,o=!1,s=!1;for(let e in t){let n=t[e];if(V.has(e)){o=!0;continue}if(Pe(e)){i[e]=n;continue}{let t=Li(n,Fn[e]);e.startsWith(`origin`)?(s=!0,a[e]=t):r[e]=t}}if(t.transform||(o||n?r.transform=Vi(t,e.transform,n):r.transform&&=`none`),s){let{originX:e=`50%`,originY:t=`50%`,originZ:n=0}=a;r.transformOrigin=`${e} ${t} ${n}`}}var Ui={offset:`stroke-dashoffset`,array:`stroke-dasharray`},Wi={offset:`strokeDashoffset`,array:`strokeDasharray`};function Gi(e,t,n=1,r=0,i=!0){e.pathLength=1;let a=i?Ui:Wi;e[a.offset]=`${-r}`,e[a.array]=`${t} ${n}`}var Ki=[`transform`,`opacity`,`offsetDistance`,`offsetPath`,`offsetRotate`,`offsetAnchor`];function qi(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:a=1,pathOffset:o=0,...s},c,l,u){if(Hi(e,s,l),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};let{attrs:d,style:f}=e;for(let e of Ki)d[e]!==void 0&&(f[e]=d[e],delete d[e]);(f.transform||d.transformOrigin)&&(f.transformOrigin=d.transformOrigin??`50% 50%`,delete d.transformOrigin),f.transform&&(f.transformBox=u?.transformBox??`fill-box`,delete d.transformBox),t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),i!==void 0&&Gi(d,i,a,o,!1)}function Ji({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Yi({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Xi(e,t){if(!t)return e;let n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Zi(e){return e===void 0||e===1}function Qi({scale:e,scaleX:t,scaleY:n}){return!Zi(e)||!Zi(t)||!Zi(n)}function G(e){return Qi(e)||$i(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function $i(e){return ea(e.x)||ea(e.y)}function ea(e){return e&&e!==`0%`}function ta(e,t,n){return n+t*(e-n)}function na(e,t,n,r,i){return i!==void 0&&(e=ta(e,i,r)),ta(e,n,r)+t}function ra(e,t=0,n=1,r,i){e.min=na(e.min,t,n,r,i),e.max=na(e.max,t,n,r,i)}function ia(e,{x:t,y:n}){ra(e.x,t.translate,t.scale,t.originPoint),ra(e.y,n.translate,n.scale,n.originPoint)}var aa=.999999999999,oa=1.0000000000001;function sa(e,t,n,r=!1){let i=n.length;if(!i)return;t.x=t.y=1;let a,o;for(let s=0;s<i;s++){a=n[s],o=a.projectionDelta;let{visualElement:i}=a.options;i&&i.props.style&&i.props.style.display===`contents`||(r&&a.options.layoutScroll&&a.scroll&&a!==a.root&&(K(e.x,-a.scroll.offset.x),K(e.y,-a.scroll.offset.y)),o&&(t.x*=o.x.scale,t.y*=o.y.scale,ia(e,o)),r&&G(a.latestValues)&&ua(e,a.latestValues,a.layout?.layoutBox))}t.x<oa&&t.x>aa&&(t.x=1),t.y<oa&&t.y>aa&&(t.y=1)}function K(e,t){e.min+=t,e.max+=t}function ca(e,t,n,r,i=.5){ra(e,t,n,I(e.min,e.max,i),r)}function la(e,t){return typeof e==`string`?parseFloat(e)/100*(t.max-t.min):e}function ua(e,t,n){let r=n??e;ca(e.x,la(t.x,r.x),t.scaleX,t.scale,t.originX),ca(e.y,la(t.y,r.y),t.scaleY,t.scale,t.originY)}function da(e,t){return Ji(Xi(e.getBoundingClientRect(),t))}function fa(e,t,n){let r=da(e,n),{scroll:i}=t;return i&&(K(r.x,i.offset.x),K(r.y,i.offset.y)),r}var{schedule:pa,cancel:ma}=Ut(queueMicrotask,!1),q={x:!1,y:!1};function ha(){return q.x||q.y}function ga(e){return e===`x`||e===`y`?q[e]?null:(q[e]=!0,()=>{q[e]=!1}):q.x||q.y?null:(q.x=q.y=!0,()=>{q.x=q.y=!1})}function _a(e,t){let n=Ri(e),r=new AbortController;return[n,{passive:!0,...t,signal:r.signal},()=>r.abort()]}function va(e){return!(e.pointerType===`touch`||ha())}function ya(e,t,n={}){let[r,i,a]=_a(e,n);return r.forEach(e=>{let n=!1,r=!1,a,o=()=>{e.removeEventListener(`pointerleave`,u)},s=e=>{a&&=(a(e),void 0),o()},c=e=>{n=!1,window.removeEventListener(`pointerup`,c),window.removeEventListener(`pointercancel`,c),r&&(r=!1,s(e))},l=()=>{n=!0,window.addEventListener(`pointerup`,c,i),window.addEventListener(`pointercancel`,c,i)},u=e=>{if(e.pointerType!==`touch`){if(n){r=!0;return}s(e)}};e.addEventListener(`pointerenter`,n=>{if(!va(n))return;r=!1;let o=t(e,n);typeof o==`function`&&(a=o,e.addEventListener(`pointerleave`,u,i))},i),e.addEventListener(`pointerdown`,l,i)}),a}var ba=(e,t)=>t?e===t||ba(e,t.parentElement):!1,xa=e=>e.pointerType===`mouse`?typeof e.button!=`number`||e.button<=0:e.isPrimary!==!1,Sa=new Set([`BUTTON`,`INPUT`,`SELECT`,`TEXTAREA`,`A`]);function Ca(e){return Sa.has(e.tagName)||e.isContentEditable===!0}var wa=new Set([`INPUT`,`SELECT`,`TEXTAREA`]);function Ta(e){return wa.has(e.tagName)||e.isContentEditable===!0}var Ea=new WeakSet;function Da(e){return t=>{t.key===`Enter`&&e(t)}}function Oa(e,t){e.dispatchEvent(new PointerEvent(`pointer`+t,{isPrimary:!0,bubbles:!0}))}var ka=(e,t)=>{let n=e.currentTarget;if(!n)return;let r=Da(()=>{if(Ea.has(n))return;Oa(n,`down`);let e=Da(()=>{Oa(n,`up`)});n.addEventListener(`keyup`,e,t),n.addEventListener(`blur`,()=>Oa(n,`cancel`),t)});n.addEventListener(`keydown`,r,t),n.addEventListener(`blur`,()=>n.removeEventListener(`keydown`,r),t)};function Aa(e){return xa(e)&&!ha()}var ja=new WeakSet;function Ma(e,t,n={}){let[r,i,a]=_a(e,n),o=e=>{let r=e.currentTarget;if(!Aa(e)||ja.has(e))return;Ea.add(r),n.stopPropagation&&ja.add(e);let a=t(r,e),o={...i,capture:!0},s=(e,t)=>{window.removeEventListener(`pointerup`,c,o),window.removeEventListener(`pointercancel`,l,o),Ea.has(r)&&Ea.delete(r),Aa(e)&&typeof a==`function`&&a(e,{success:t})},c=e=>{s(e,r===window||r===document||n.useGlobalTarget||ba(r,e.target))},l=e=>{s(e,!1)};window.addEventListener(`pointerup`,c,o),window.addEventListener(`pointercancel`,l,o)};return r.forEach(e=>{(n.useGlobalTarget?window:e).addEventListener(`pointerdown`,o,i),Fi(e)&&(e.addEventListener(`focus`,e=>ka(e,i)),!Ca(e)&&!e.hasAttribute(`tabindex`)&&(e.tabIndex=0))}),a}var Na=new WeakMap,Pa,Fa=(e,t,n)=>(r,i)=>i&&i[0]?i[0][e+`Size`]:Ii(r)&&`getBBox`in r?r.getBBox()[t]:r[n],Ia=Fa(`inline`,`width`,`offsetWidth`),La=Fa(`block`,`height`,`offsetHeight`);function Ra({target:e,borderBoxSize:t}){Na.get(e)?.forEach(n=>{n(e,{get width(){return Ia(e,t)},get height(){return La(e,t)}})})}function za(e){e.forEach(Ra)}function Ba(){typeof ResizeObserver<`u`&&(Pa=new ResizeObserver(za))}function Va(e,t){Pa||Ba();let n=Ri(e);return n.forEach(e=>{let n=Na.get(e);n||(n=new Set,Na.set(e,n)),n.add(t),Pa?.observe(e)}),()=>{n.forEach(e=>{let n=Na.get(e);n?.delete(t),n?.size||Pa?.unobserve(e)})}}var Ha=new Set,Ua;function Wa(){Ua=()=>{let e={get width(){return window.innerWidth},get height(){return window.innerHeight}};Ha.forEach(t=>t(e))},window.addEventListener(`resize`,Ua)}function Ga(e){return Ha.add(e),Ua||Wa(),()=>{Ha.delete(e),!Ha.size&&typeof Ua==`function`&&(window.removeEventListener(`resize`,Ua),Ua=void 0)}}function Ka(e,t){return typeof e==`function`?Ga(e):Va(e,t)}var qa={value:null,addProjectionMetrics:null};function Ja(e){return Ii(e)&&e.tagName===`svg`}var Ya=e=>typeof e==`number`?e:parseFloat(e),Xa=()=>({translate:0,scale:1,origin:0,originPoint:0}),Za=()=>({x:Xa(),y:Xa()}),Qa=()=>({min:0,max:0}),J=()=>({x:Qa(),y:Qa()}),$a=new WeakMap;function eo(e){return typeof e==`object`&&!!e&&typeof e.start==`function`}function to(e){return typeof e==`string`||Array.isArray(e)}var no=[`animate`,`whileInView`,`whileFocus`,`whileHover`,`whileTap`,`whileDrag`,`exit`],ro=[`initial`,...no];function io(e){if(eo(e.animate))return!0;for(let t=0;t<ro.length;t++)if(to(e[ro[t]]))return!0;return!1}function ao(e){return!!(io(e)||e.variants)}function oo(e,t,n){for(let r in t){let i=t[r],a=n[r];if(W(i))e.addValue(r,i);else if(W(a))e.addValue(r,Yr(i,{owner:e}));else if(a!==i){if(e.hasValue(r)){let t=e.getValue(r);t.liveStyle===!0?t.jump(i):t.hasAnimated||t.set(i)}else{let t=e.getStaticValue(r);e.addValue(r,Yr(t===void 0?i:t,{owner:e}))}}}for(let r in n)t[r]===void 0&&e.removeValue(r);return t}var so={current:null},co={current:!1},lo=typeof window<`u`;function uo(){if(co.current=!0,lo){if(window.matchMedia){let e=window.matchMedia(`(prefers-reduced-motion)`),t=()=>so.current=e.matches;e.addEventListener(`change`,t),t()}else so.current=!1}}var fo=[`AnimationStart`,`AnimationComplete`,`Update`,`BeforeLayoutMeasure`,`LayoutMeasure`,`LayoutAnimationStart`,`LayoutAnimationComplete`],po={};function mo(e){po=e}function ho(){return po}var go=class{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:r,skipAnimations:i,blockInitialAnimation:a,visualState:o},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=pr,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,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=()=>{let e=A.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,L.render(this.render,!1,!0))};let{latestValues:c,renderState:l}=o;this.latestValues=c,this.baseTarget={...c},this.initialValues=t.initial?{...c}:{},this.renderState=l,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.skipAnimationsConfig=i,this.options=s,this.blockInitialAnimation=!!a,this.isControllingVariants=io(t),this.isVariantNode=ao(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);let{willChange:u,...d}=this.scrapeMotionValuesFromProps(t,{},this);for(let e in d){let t=d[e];c[e]!==void 0&&W(t)&&t.set(c[e])}}mount(e){if(this.hasBeenMounted)for(let e in this.initialValues)this.values.get(e)?.jump(this.initialValues[e]),this.latestValues[e]=this.initialValues[e];if(this.current=e,$a.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.isVariantNode&&!this.isControllingVariants){let e=this;do e=e.props.inherit!==!1&&e.parent;while(e&&!e.isVariantNode);if(e){let{variantChildren:t}=e;t.add(this),this.removeFromVariantTree=()=>t.delete(this)}}this.values.forEach((e,t)=>this.bindToMotionValue(t,e)),this.reducedMotionConfig===`never`?this.shouldReduceMotion=!1:this.reducedMotionConfig===`always`?this.shouldReduceMotion=!0:(co.current||uo(),this.shouldReduceMotion=so.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),R(this.notifyUpdate),R(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(let e in this.events)this.events[e].clear();for(let e in this.features){let t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??=new Set,this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,t){if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),t.accelerate&&Ir.has(e)&&this.current instanceof HTMLElement){let{factory:n,keyframes:r,times:i,ease:a,duration:o}=t.accelerate,s=new Er({element:this.current,name:e,keyframes:r,times:i,ease:a,duration:D(o)}),c=n(s);this.valueSubscriptions.set(e,()=>{c(),s.cancel()});return}let n=V.has(e);n&&this.onBindTransform&&this.onBindTransform();let r=t.on(`change`,t=>{this.latestValues[e]=t,this.props.onUpdate&&L.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()}),i;typeof window<`u`&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{r(),i&&i()})}sortNodePosition(e){return!this.current||!e.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e=`animation`;for(e in po){let t=po[e];if(!t)continue;let{isEnabled:n,Feature:r}=t;if(!this.features[e]&&r&&n(this.props)&&(this.features[e]=new r(this)),this.features[e]){let t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):J()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let t=0;t<fo.length;t++){let n=fo[t];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);let r=e[`on`+n];r&&(this.propEventSubscriptions[n]=this.on(n,r))}this.prevMotionValues=oo(this,this.scrapeMotionValuesFromProps(e,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}addValue(e,t){let n=this.values.get(e);if(t!==n){n&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t);let r=t.get();r!==void 0&&(this.latestValues[e]=r)}}removeValue(e){this.values.delete(e);let t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return n===void 0&&t!==void 0&&(n=Yr(t??this.getDefaultValue?.(e),{owner:this}),this.addValue(e,n)),n}readValue(e,t){let n=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return n!=null&&(typeof n==`string`&&(ee(n)||ne(n))?n=parseFloat(n):typeof n!=`number`&&!F.test(n)&&F.test(t)&&(n=zn(e,t)),this.setBaseTarget(e,W(n)?n.get():n)),W(n)?n.get():n}setBaseTarget(e,t){this.baseTarget[e]=t}on(e,t){return this.events[e]||(this.events[e]=new oe),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}scheduleRenderMicrotask(){pa.render(this.render)}},_o=class extends go{constructor(){super(...arguments),this.KeyframeResolver=Ni}sortInstanceNodePosition(e,t){return e.compareDocumentPosition(t)&2?1:-1}getBaseTargetFromProps(e,t){let n=e.style;return n?n[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:e}=this.props;W(e)&&(this.childSubscription=e.on(`change`,e=>{this.current&&(this.current.textContent=`${e}`)}))}},Y=class{constructor(e){this.isMounted=!1,this.node=e}update(){}};function vo(e,{style:t,vars:n},r,i){let a=e.style,o;for(o in t)a[o]=t[o];for(o in i?.applyProjectionStyles(a,r),n)a.setProperty(o,n[o])}var yo={};function bo(e,{layout:t,layoutId:n}){return V.has(e)||e.startsWith(`origin`)||(t||n!==void 0)&&(!!yo[e]||e===`opacity`)}function xo(e,t,n){let r=e.style,i=t?.style,a={};if(!r)return a;for(let t in r)(W(r[t])||i&&W(i[t])||bo(t,e)||n?.getValue(t)?.liveStyle!==void 0)&&(a[t]=r[t]);return a}function So(e){return window.getComputedStyle(e)}var Co=class extends _o{constructor(){super(...arguments),this.type=`html`,this.renderInstance=vo}mount(e){e.style,super.mount(e)}readValueFromInstance(e,t){if(V.has(t))return this.projection?.isProjecting?Jn(t):Xn(e,t);{let n=So(e),r=(Pe(t)?n.getPropertyValue(t):n[t])||0;return typeof r==`string`?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:t}){return da(e,t)}build(e,t,n){Hi(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return xo(e,t,n)}},wo=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`]),To=e=>typeof e==`string`&&e.toLowerCase()===`svg`;function Eo(e,t,n,r){vo(e,t,void 0,r);for(let n in t.attrs)e.setAttribute(wo.has(n)?n:vi(n),t.attrs[n])}function Do(e,t,n){let r=xo(e,t,n);for(let n in e)if(W(e[n])||W(t[n])){let t=Qn.indexOf(n)===-1?n:`attr`+n.charAt(0).toUpperCase()+n.substring(1);r[t]=e[n]}return r}var Oo=class extends _o{constructor(){super(...arguments),this.type=`svg`,this.isSVGTag=!1,this.measureInstanceViewportBox=J}getBaseTargetFromProps(e,t){return V.has(t)?super.getBaseTargetFromProps(e,t)??Jn(t):e[t]}getDefaultValue(e){return V.has(e)?this.latestValues[e]??Jn(e):void 0}readValueFromInstance(e,t){if(V.has(t)){let e=Ln(t);return e&&e.default||0}if(Ki.includes(t)){let n=getComputedStyle(e)[t];if(typeof n==`string`&&n)return n.trim()}return t=wo.has(t)?t:vi(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return Do(e,t,n)}build(e,t,n){qi(e,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(e,t,n,r){Eo(e,t,n,r)}mount(e){this.isSVGTag=To(e.tagName),super.mount(e)}};function ko(e,t){if(!Array.isArray(t))return!1;let n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}var Ao=[...no].reverse();function jo(e){let t=t=>Promise.all(t.map(({animation:t,options:n})=>Ti(e,t,n))),n=No(),r=!0,i=!1;function a(a){let{props:o,parent:s,manuallyAnimateOnMount:c}=e,l=r||i,u=[],d=new Set,f={},p=1/0,m=e;do m=m.props.inherit!==!1&&m.parent;while(m&&!m.isControllingVariants);if(Ao.forEach((t,r)=>{let i=n[t],h=o[t],g=m&&m.props[t],_=h===void 0?to(g)||g===!1?g:void 0:h,v=to(_),y=t===a?i.isActive:null;y===!1&&(p=r);let b=v&&h===void 0&&!(l&&c);if(i.protectedKeys={...f},!i.isActive&&y===null||!_&&!i.prevProp||eo(_)||typeof _==`boolean`)return;if(t===`exit`&&i.isActive&&y!==!0){f={...f,...i.prevResolvedValues};return}let x=Mo(i.prevProp,_),S=x||v&&(y&&!b||r>p),C=!1,w=Array.isArray(_)?_:[_],T={};if(y!==!1)for(let n of w){let{transition:r,transitionEnd:i,...a}=U(e,n,ui(e,t))||{};T={...T,...a,...i}}let{prevResolvedValues:ee}=i;for(let t in{...ee,...T}){if(t in f)continue;let n=T[t],r=ee[t],a=Array.isArray(n)&&Array.isArray(r)?!ko(n,r)||x:n!==r;if(a&&n==null)d.add(t);else if(a||n!==void 0&&d.has(t)){S=!0,d.delete(t)&&(C=!0),i.needsAnimating[t]=!0;let n=e.getValue(t);n&&(n.liveStyle=!1)}else i.protectedKeys[t]=!0}if(i.prevProp=_,i.prevResolvedValues=T,i.isActive&&(f={...f,...T}),S&&(!(b&&x)||C))for(let n of w){let r={type:t};if(typeof n==`string`&&l&&c&&s?.enteringChildren){let t=U(s,n)?.transition?.delayChildren;r.delay=Wr(s.enteringChildren,e,t)}u.push({animation:n,options:r})}}),d.size){let{initial:t}=o,n={},r=typeof t!=`boolean`&&U(e,Array.isArray(t)?t[0]:t,e.presenceContext?.custom);r&&r.transition&&(n.transition=r.transition),d.forEach(i=>{let a=e.getValue(i);a&&(a.liveStyle=!0);let s=r&&!Array.isArray(t)?r[i]:void 0,c=e.getBaseTargetFromProps(o,i);n[i]=(s===void 0?c!==void 0&&!W(c)?c:e.initialValues[i]===void 0?e.baseTarget[i]:void 0:s)??null}),u.push({animation:n})}let h=l&&e.blockInitialAnimation||r&&!c&&(o.initial===!1||o.initial===o.animate);return r=i=!1,!h&&u.length?t(u):Promise.resolve()}function o(t,r){if(n[t].isActive===r)return Promise.resolve();e.variantChildren?.forEach(e=>e.animationState?.setActive(t,r)),n[t].isActive=r;let i=a(t);for(let e in n)n[e].protectedKeys={};return i}return{animateChanges:a,setActive:o,setAnimateFunction:n=>{t=n(e)},getState:()=>n,reset:()=>{n=No(),i=!0}}}function Mo(e,t){return typeof t==`string`?t!==e:Array.isArray(t)?!ko(t,e):!1}function No(){let e={};for(let t of no)e[t]={isActive:t===`animate`,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}};return e}function Po(e,t){e.min=t.min,e.max=t.max}function X(e,t){Po(e.x,t.x),Po(e.y,t.y)}function Fo(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}var Io=.9999,Lo=1.0001,Ro=-.01,zo=.01;function Z(e){return e.max-e.min}function Bo(e,t,n){return Math.abs(e-t)<=n}function Vo(e,t,n,r=.5){e.origin=r,e.originPoint=I(t.min,t.max,e.origin),e.scale=Z(n)/Z(t),e.translate=I(n.min,n.max,e.origin)-e.originPoint,(e.scale>=Io&&e.scale<=Lo||isNaN(e.scale))&&(e.scale=1),(e.translate>=Ro&&e.translate<=zo||isNaN(e.translate))&&(e.translate=0)}function Ho(e,t,n,r){Vo(e.x,t.x,n.x,r?r.originX:void 0),Vo(e.y,t.y,n.y,r?r.originY:void 0)}function Uo(e,t,n,r=0){e.min=(r?I(n.min,n.max,r):n.min)+t.min,e.max=e.min+Z(t)}function Wo(e,t,n,r){Uo(e.x,t.x,n.x,r?.x),Uo(e.y,t.y,n.y,r?.y)}function Go(e,t,n,r=0){let i=r?I(n.min,n.max,r):n.min;e.min=t.min-i,e.max=e.min+Z(t)}function Ko(e,t,n,r){Go(e.x,t.x,n.x,r?.x),Go(e.y,t.y,n.y,r?.y)}function qo(e,t,n,r,i){return e-=t,e=ta(e,1/n,r),i!==void 0&&(e=ta(e,1/i,r)),e}function Jo(e,t=0,n=1,r=.5,i,a=e,o=e){if(M.test(t)&&(t=parseFloat(t),t=I(o.min,o.max,t/100)-o.min),typeof t!=`number`)return;let s=I(a.min,a.max,r);e===a&&(s-=t),e.min=qo(e.min,t,n,s,i),e.max=qo(e.max,t,n,s,i)}function Yo(e,t,[n,r,i],a,o){Jo(e,t[n],t[r],t[i],t.scale,a,o)}var Xo=[`x`,`scaleX`,`originX`],Zo=[`y`,`scaleY`,`originY`];function Qo(e,t,n,r){Yo(e.x,t,Xo,n?n.x:void 0,r?r.x:void 0),Yo(e.y,t,Zo,n?n.y:void 0,r?r.y:void 0)}function $o(e){return e.translate===0&&e.scale===1}function es(e){return $o(e.x)&&$o(e.y)}function ts(e,t){return e.min===t.min&&e.max===t.max}function ns(e,t){return ts(e.x,t.x)&&ts(e.y,t.y)}function rs(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function is(e,t){return rs(e.x,t.x)&&rs(e.y,t.y)}function as(e){return Z(e.x)/Z(e.y)}function os(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function Q(e){return[e(`x`),e(`y`)]}function ss(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var cs={correct:(e,t)=>{if(!t.target)return e;if(typeof e==`string`){if(N.test(e))e=parseFloat(e);else return e}return`${ss(e,t.target.x)}% ${ss(e,t.target.y)}%`}},ls={correct:(e,{treeScale:t,projectionDelta:n})=>{let r=e,i=F.parse(e);if(i.length>5)return r;let a=F.createTransformer(e),o=typeof i[0]==`number`?0:1,s=n.x.scale*t.x,c=n.y.scale*t.y;i[0+o]/=s,i[1+o]/=c;let l=I(s,c,.5);return typeof i[2+o]==`number`&&(i[2+o]/=l),typeof i[3+o]==`number`&&(i[3+o]/=l),a(i)}};function us(e,t,n){let r=``,i=e.x.translate/t.x,a=e.y.translate/t.y,o=n?.z||0;if((i||a||o)&&(r=`translate3d(${i}px, ${a}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){let{transformPerspective:e,rotate:t,pathRotation:i,rotateX:a,rotateY:o,skewX:s,skewY:c}=n;e&&(r=`perspective(${e}px) ${r}`),t&&(r+=`rotate(${t}deg) `),i&&(r+=`rotate(${i}deg) `),a&&(r+=`rotateX(${a}deg) `),o&&(r+=`rotateY(${o}deg) `),s&&(r+=`skewX(${s}deg) `),c&&(r+=`skewY(${c}deg) `)}let s=e.x.scale*t.x,c=e.y.scale*t.y;return(s!==1||c!==1)&&(r+=`scale(${s}, ${c})`),r||`none`}var ds=Pi.length,fs=e=>typeof e==`number`||N.test(e);function ps(e,t,n,r,i,a){i?(e.opacity=I(0,n.opacity??1,hs(r)),e.opacityExit=I(t.opacity??1,0,gs(r))):a&&(e.opacity=I(t.opacity??1,n.opacity??1,r));for(let i=0;i<ds;i++){let a=Pi[i],o=ms(t,a),s=ms(n,a);(o!==void 0||s!==void 0)&&(o||=0,s||=0,o===0||s===0||fs(o)===fs(s)?(e[a]=Math.max(I(Ya(o),Ya(s),r),0),(M.test(s)||M.test(o))&&(e[a]+=`%`)):e[a]=s)}(t.rotate||n.rotate)&&(e.rotate=I(t.rotate||0,n.rotate||0,r))}function ms(e,t){return e[t]===void 0?e.borderRadius:e[t]}var hs=_s(0,.5,be),gs=_s(.5,.95,E);function _s(e,t,n){return r=>r<e?0:r>t?1:n(ae(e,t,r))}function vs(e,t,n){let r=W(e)?e:Yr(e);return r.start(ii(``,r,t,n)),r.animation}function ys(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)}var bs=(e,t)=>e.depth-t.depth,xs=class{constructor(){this.children=[],this.isDirty=!1}add(e){S(this.children,e),this.isDirty=!0}remove(e){C(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(bs),this.isDirty=!1,this.children.forEach(e)}};function Ss(e,t){let n=A.now(),r=({timestamp:i})=>{let a=i-n;a>=t&&(R(r),e(a-t))};return L.setup(r,!0),()=>R(r)}function Cs(e){return W(e)?e.get():e}var ws=class{constructor(){this.members=[]}add(e){S(this.members,e);for(let t=this.members.length-1;t>=0;t--){let n=this.members[t];if(n===e||n===this.lead||n===this.prevLead)continue;let r=n.instance;(!r||r.isConnected===!1)&&!n.snapshot&&(C(this.members,n),n.unmount())}e.scheduleRender()}remove(e){if(C(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){let e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){for(let t=this.members.indexOf(e)-1;t>=0;t--){let e=this.members[t];if(e.isPresent!==!1&&e.instance?.isConnected!==!1)return this.promote(e),!0}return!1}promote(e,t){let n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.updateSnapshot(),e.scheduleRender();let{layoutDependency:r}=n.options,{layoutDependency:i}=e.options;(r===void 0||r!==i)&&(e.resumeFrom=n,t&&(n.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root?.isUpdating&&(e.isLayoutDirty=!0)),e.options.crossfade===!1&&n.hide()}}exitAnimationComplete(){this.members.forEach(e=>{e.options.onExitComplete?.(),e.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(e=>e.instance&&e.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}},Ts={borderRadius:{...cs,applyTo:[...Pi]},borderTopLeftRadius:cs,borderTopRightRadius:cs,borderBottomLeftRadius:cs,borderBottomRightRadius:cs,boxShadow:ls},Es={hasAnimatedSinceResize:!0,hasEverUpdated:!1};Object.assign(yo,{...Ts,...yo});var Ds={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},Os=[``,`X`,`Y`,`Z`],ks=1e3,As=0;function js(e,t,n,r){let{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Ms(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;let{visualElement:t}=e.options;if(!t)return;let n=bi(t);if(window.MotionHasOptimisedAnimation(n,`transform`)){let{layout:t,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,`transform`,L,!(t||r))}let{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&Ms(r)}function Ns({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(e={},n=t?.()){this.id=As++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,qa.value&&(Ds.nodes=Ds.calculatedTargetDeltas=Ds.calculatedProjections=0),this.nodes.forEach(Is),this.nodes.forEach(Ks),this.nodes.forEach(qs),this.nodes.forEach(Ls),qa.addProjectionMetrics&&qa.addProjectionMetrics(Ds)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let e=0;e<this.path.length;e++)this.path[e].shouldResetTransform=!0;this.root===this&&(this.nodes=new xs)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new oe),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){let n=this.eventHandlers.get(e);n&&n.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t){if(this.instance)return;this.isSVG=Ii(t)&&!Ja(t),this.instance=t;let{layoutId:n,layout:r,visualElement:i}=this.options;if(i&&!i.current&&i.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(r||n)&&(this.isLayoutDirty=!0),e){let n,r=0,i=()=>this.root.updateBlockedByResize=!1;L.read(()=>{r=window.innerWidth}),e(t,()=>{let e=window.innerWidth;e!==r&&(r=e,this.root.updateBlockedByResize=!0,n&&n(),n=Ss(i,250),Es.hasAnimatedSinceResize&&(Es.hasAnimatedSinceResize=!1,this.nodes.forEach(Gs)))})}n&&this.root.registerSharedNode(n,this),this.options.animate!==!1&&i&&(n||r)&&this.addEventListener(`didUpdate`,({delta:e,hasLayoutChanged:t,hasRelativeLayoutChanged:n,layout:r})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}let a=this.options.transition||i.getDefaultTransition()||ec,{onLayoutAnimationStart:o,onLayoutAnimationComplete:s}=i.getProps(),c=!this.targetLayout||!is(this.targetLayout,r),l=!t&&n;if(this.options.layoutRoot||this.resumeFrom||l||t&&(c||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);let t={...Xr(a,`layout`),onPlay:o,onComplete:s};(i.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t),this.setAnimationOrigin(e,l,t.path)}else t||Gs(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=r})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);let e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),R(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(Js),this.animationId++)}getTransformTemplate(){let{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Ms(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let e=0;e<this.path.length;e++){let t=this.path[e];t.shouldResetTransform=!0,(typeof t.latestValues.x==`string`||typeof t.latestValues.y==`string`)&&(t.isLayoutDirty=!0),t.updateScroll(`snapshot`),t.options.layoutRoot&&t.willUpdate(!1)}let{layoutId:t,layout:n}=this.options;if(t===void 0&&!n)return;let r=this.getTransformTemplate();this.prevTransformTemplateValue=r?r(this.latestValues,``):void 0,this.updateSnapshot(),e&&this.notifyListeners(`willUpdate`)}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){let e=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),e&&this.nodes.forEach(Bs),this.nodes.forEach(zs);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Vs);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Hs),this.nodes.forEach(Us),this.nodes.forEach(Ws),this.nodes.forEach(Ps),this.nodes.forEach(Fs)):this.nodes.forEach(Vs),this.clearAllSnapshots();let e=A.now();k.delta=w(0,1e3/60,e-k.timestamp),k.timestamp=e,k.isProcessing=!0,Wt.update.process(k),Wt.preRender.process(k),Wt.render.process(k),k.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,pa.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Rs),this.sharedNodes.forEach(Ys)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,L.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){L.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure(),this.snapshot&&!Z(this.snapshot.measuredBox.x)&&!Z(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let e=0;e<this.path.length;e++)this.path[e].updateScroll();let e=this.layout;this.layout=this.measure(!1),this.layoutCorrected||=J(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners(`measure`,this.layout.layoutBox);let{visualElement:t}=this.options;t&&t.notify(`LayoutMeasure`,this.layout.layoutBox,e?e.layoutBox:void 0)}updateScroll(e=`measure`){let t=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t&&this.instance){let t=r(this.instance);this.scroll={animationId:this.root.animationId,phase:e,isRoot:t,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:t}}}resetTransform(){if(!i)return;let e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,t=this.projectionDelta&&!es(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,``):void 0,a=r!==this.prevTransformTemplateValue;e&&this.instance&&(t||G(this.latestValues)||a)&&(i(this.instance,r),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){let t=this.measurePageBox(),n=this.removeElementScroll(t);return e&&(n=this.removeTransform(n)),ic(n),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){let{visualElement:e}=this.options;if(!e)return J();let t=e.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(oc))){let{scroll:e}=this.root;e&&(K(t.x,e.offset.x),K(t.y,e.offset.y))}return t}removeElementScroll(e){let t=J();if(X(t,e),this.scroll?.wasRoot)return t;for(let n=0;n<this.path.length;n++){let r=this.path[n],{scroll:i,options:a}=r;r!==this.root&&i&&a.layoutScroll&&(i.wasRoot&&X(t,e),K(t.x,i.offset.x),K(t.y,i.offset.y))}return t}applyTransform(e,t=!1,n){let r=n||J();X(r,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];!t&&n.options.layoutScroll&&n.scroll&&n!==n.root&&(K(r.x,-n.scroll.offset.x),K(r.y,-n.scroll.offset.y)),G(n.latestValues)&&ua(r,n.latestValues,n.layout?.layoutBox)}return G(this.latestValues)&&ua(r,this.latestValues,this.layout?.layoutBox),r}removeTransform(e){let t=J();X(t,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];if(!G(n.latestValues))continue;let r;n.instance&&(Qi(n.latestValues)&&n.updateSnapshot(),r=J(),X(r,n.measurePageBox())),Qo(t,n.latestValues,n.snapshot?.layoutBox,r)}return G(this.latestValues)&&Qo(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:e.crossfade===void 0||e.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==k.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){let t=this.getLead();this.isProjectionDirty||=t.isProjectionDirty,this.isTransformDirty||=t.isTransformDirty,this.isSharedProjectionDirty||=t.isSharedProjectionDirty;let n=!!this.resumingFrom||this!==t;if(!(e||n&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;let{layout:r,layoutId:i}=this.options;if(!this.layout||!(r||i))return;this.resolvedRelativeTargetAt=k.timestamp;let a=this.getClosestProjectingParent();!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&a&&a.layout?this.createRelativeTarget(a,this.layout.layoutBox,a.layout.layoutBox):this.removeRelativeTarget()),(this.relativeTarget||this.targetDelta)&&(this.target||(this.target=J(),this.targetWithTransforms=J()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Wo(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):X(this.target,this.layout.layoutBox),ia(this.target,this.targetDelta)):X(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&a&&!!a.resumingFrom==!!this.resumingFrom&&!a.options.layoutScroll&&a.target&&this.animationProgress!==1?this.createRelativeTarget(a,this.target,a.target):this.relativeParent=this.relativeTarget=void 0),qa.value&&Ds.calculatedTargetDeltas++)}getClosestProjectingParent(){if(!(!this.parent||Qi(this.parent.latestValues)||$i(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(e,t,n){this.relativeParent=e,this.forceRelativeParentToResolveTarget(),this.relativeTarget=J(),this.relativeTargetOrigin=J(),Ko(this.relativeTargetOrigin,t,n,this.options.layoutAnchor||void 0),X(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){let e=this.getLead(),t=!!this.resumingFrom||this!==e,n=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(n=!1),t&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(n=!1),this.resolvedRelativeTargetAt===k.timestamp&&(n=!1),n)return;let{layout:r,layoutId:i}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(r||i))return;X(this.layoutCorrected,this.layout.layoutBox);let a=this.treeScale.x,o=this.treeScale.y;sa(this.layoutCorrected,this.treeScale,this.path,t),e.layout&&!e.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(e.target=e.layout.layoutBox,e.targetWithTransforms=J());let{target:s}=e;if(!s){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Fo(this.prevProjectionDelta.x,this.projectionDelta.x),Fo(this.prevProjectionDelta.y,this.projectionDelta.y)),Ho(this.projectionDelta,this.layoutCorrected,s,this.latestValues),(this.treeScale.x!==a||this.treeScale.y!==o||!os(this.projectionDelta.x,this.prevProjectionDelta.x)||!os(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners(`projectionUpdate`,s)),qa.value&&Ds.calculatedProjections++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){if(this.options.visualElement?.scheduleRender(),e){let e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Za(),this.projectionDelta=Za(),this.projectionDeltaWithTransform=Za()}setAnimationOrigin(e,t=!1,n){let r=this.snapshot,i=r?r.latestValues:{},a={...this.latestValues},o=Za();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;let s=J(),c=(r?r.source:void 0)!==(this.layout?this.layout.source:void 0),l=this.getStack(),u=!l||l.members.length<=1,d=!(!c||u||this.options.crossfade!==!0||this.path.some($s));this.animationProgress=0;let f,p=n?.interpolateProjection(e);this.mixTargetDelta=t=>{let n=t/1e3,r=p?.(n);r?(o.x.translate=r.x,o.x.scale=I(e.x.scale,1,n),o.x.origin=e.x.origin,o.x.originPoint=e.x.originPoint,o.y.translate=r.y,o.y.scale=I(e.y.scale,1,n),o.y.origin=e.y.origin,o.y.originPoint=e.y.originPoint):(Xs(o.x,e.x,n),Xs(o.y,e.y,n)),this.setTargetDelta(o),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Ko(s,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),Qs(this.relativeTarget,this.relativeTargetOrigin,s,n),f&&ns(this.relativeTarget,f)&&(this.isProjectionDirty=!1),f||=J(),X(f,this.relativeTarget)),c&&(this.animationValues=a,ps(a,i,this.latestValues,n,d,u)),r&&r.rotate!==void 0&&(this.animationValues||=a,this.animationValues.pathRotation=r.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){this.notifyListeners(`animationStart`),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&=(R(this.pendingAnimation),void 0),this.pendingAnimation=L.update(()=>{Es.hasAnimatedSinceResize=!0,this.motionValue||=Yr(0),this.motionValue.jump(0,!1),this.currentAnimation=vs(this.motionValue,[0,1e3],{...e,velocity:0,isSync:!0,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onComplete:()=>{e.onComplete&&e.onComplete(),this.completeAnimation()}}),Tn(this.currentAnimation,this),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);let e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners(`animationComplete`)}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(ks),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){let e=this.getLead(),{targetWithTransforms:t,layout:n,latestValues:r}=e,{target:i}=e;if(t&&i&&n){if(this!==e&&this.layout&&n&&ac(this.options.animationType,this.layout.layoutBox,n.layoutBox)){i=this.target||J();let t=Z(this.layout.layoutBox.x);i.x.min=e.target.x.min,i.x.max=i.x.min+t;let n=Z(this.layout.layoutBox.y);i.y.min=e.target.y.min,i.y.max=i.y.min+n}X(t,i),ua(t,r),Ho(this.projectionDeltaWithTransform,this.layoutCorrected,t,r)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new ws),this.sharedNodes.get(e).add(t);let n=t.options.initialPromotionConfig;t.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(t):void 0})}isLead(){let e=this.getStack();return!e||e.lead===this}getLead(){let{layoutId:e}=this.options;return e&&this.getStack()?.lead||this}getPrevLead(){let{layoutId:e}=this.options;return e?this.getStack()?.prevLead:void 0}getStack(){let{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){let r=this.getStack();r&&r.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){let e=this.getStack();return e?e.relegate(this):!1}resetSkewAndRotation(){let{visualElement:e}=this.options;if(!e)return;let t=!1,{latestValues:n}=e;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(t=!0),!t)return;let r={};n.z&&js(`z`,e,r,this.animationValues);for(let t=0;t<Os.length;t++)js(`rotate${Os[t]}`,e,r,this.animationValues),js(`skew${Os[t]}`,e,r,this.animationValues);e.render();for(let t in r)e.setStaticValue(t,r[t]),this.animationValues&&(this.animationValues[t]=r[t]);e.scheduleRender()}applyProjectionStyles(e,t){if(!this.instance||this.isSVG)return;if(!this.isVisible){e.visibility=`hidden`;return}let n=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,e.visibility=``,e.opacity=``,e.pointerEvents=Cs(t?.pointerEvents)||``,e.transform=n?n(this.latestValues,``):`none`;return}let r=this.getLead();if(!this.projectionDelta||!this.layout||!r.target){this.options.layoutId&&(e.opacity=this.latestValues.opacity===void 0?1:this.latestValues.opacity,e.pointerEvents=Cs(t?.pointerEvents)||``),this.hasProjected&&!G(this.latestValues)&&(e.transform=n?n({},``):`none`,this.hasProjected=!1);return}e.visibility=``;let i=r.animationValues||r.latestValues;this.applyTransformsToTarget();let a=us(this.projectionDeltaWithTransform,this.treeScale,i);n&&(a=n(i,a)),e.transform=a;let{x:o,y:s}=this.projectionDelta;e.transformOrigin=`${o.origin*100}% ${s.origin*100}% 0`,e.opacity=r.animationValues?r===this?i.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:i.opacityExit:r===this?i.opacity===void 0?``:i.opacity:i.opacityExit===void 0?0:i.opacityExit;for(let t in yo){if(i[t]===void 0)continue;let{correct:n,applyTo:o,isCSSVariable:s}=yo[t],c=a===`none`?i[t]:n(i[t],r);if(o){let t=o.length;for(let n=0;n<t;n++)e[o[n]]=c}else s?this.options.visualElement.renderState.vars[t]=c:e[t]=c}this.options.layoutId&&(e.pointerEvents=r===this?Cs(t?.pointerEvents)||``:`none`)}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(e=>e.currentAnimation?.stop()),this.root.nodes.forEach(zs),this.root.sharedNodes.clear()}}}function Ps(e){e.updateLayout()}function Fs(e){let t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners(`didUpdate`)){let{layoutBox:n,measuredBox:r}=e.layout,{animationType:i}=e.options,a=t.source!==e.layout.source;if(i===`size`)Q(e=>{let r=a?t.measuredBox[e]:t.layoutBox[e],i=Z(r);r.min=n[e].min,r.max=r.min+i});else if(i===`x`||i===`y`){let e=i===`x`?`y`:`x`;Po(a?t.measuredBox[e]:t.layoutBox[e],n[e])}else ac(i,t.layoutBox,n)&&Q(r=>{let i=a?t.measuredBox[r]:t.layoutBox[r],o=Z(n[r]);i.max=i.min+o,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[r].max=e.relativeTarget[r].min+o)});let o=Za();Ho(o,n,t.layoutBox);let s=Za();a?Ho(s,e.applyTransform(r,!0),t.measuredBox):Ho(s,n,t.layoutBox);let c=!es(o),l=!1;if(!e.resumeFrom){let r=e.getClosestProjectingParent();if(r&&!r.resumeFrom){let{snapshot:i,layout:a}=r;if(i&&a){let o=e.options.layoutAnchor||void 0,s=J();Ko(s,t.layoutBox,i.layoutBox,o);let c=J();Ko(c,n,a.layoutBox,o),is(s,c)||(l=!0),r.options.layoutRoot&&(e.relativeTarget=c,e.relativeTargetOrigin=s,e.relativeParent=r)}}}e.notifyListeners(`didUpdate`,{layout:n,snapshot:t,delta:s,layoutDelta:o,hasLayoutChanged:c,hasRelativeLayoutChanged:l})}else if(e.isLead()){let{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function Is(e){qa.value&&Ds.nodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty),e.isTransformDirty||=e.parent.isTransformDirty)}function Ls(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Rs(e){e.clearSnapshot()}function zs(e){e.clearMeasurements()}function Bs(e){e.isLayoutDirty=!0,e.updateLayout()}function Vs(e){e.isLayoutDirty=!1}function Hs(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function Us(e){e.relativeTarget&&e.relativeParent?.isLayoutDirty&&(e.currentAnimation?e.isLayoutDirty=!0:(e.targetDelta=void 0,e.removeRelativeTarget()))}function Ws(e){let{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify(`BeforeLayoutMeasure`),e.resetTransform()}function Gs(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Ks(e){e.resolveTargetDelta()}function qs(e){e.calcProjection()}function Js(e){e.resetSkewAndRotation()}function Ys(e){e.removeLeadSnapshot()}function Xs(e,t,n){e.translate=I(t.translate,0,n),e.scale=I(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Zs(e,t,n,r){e.min=I(t.min,n.min,r),e.max=I(t.max,n.max,r)}function Qs(e,t,n,r){Zs(e.x,t.x,n.x,r),Zs(e.y,t.y,n.y,r)}function $s(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}var ec={duration:.45,ease:[.4,0,.1,1]},tc=e=>typeof navigator<`u`&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),nc=tc(`applewebkit/`)&&!tc(`chrome/`)?Math.round:E;function rc(e){e.min=nc(e.min),e.max=nc(e.max)}function ic(e){rc(e.x),rc(e.y)}function ac(e,t,n){return e===`position`||e===`preserve-aspect`&&!Bo(as(t),as(n),.2)}function oc(e){return e!==e.root&&e.scroll?.wasRoot}var sc=Ns({attachResizeListener:(e,t)=>ys(e,`resize`,t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),cc={current:void 0},lc=Ns({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!cc.current){let e=new sc({});e.mount(window),e.setOptions({layoutScroll:!0}),cc.current=e}return cc.current},resetTransform:(e,t)=>{e.style.transform=t===void 0?`none`:t},checkIsScrollRoot:e=>window.getComputedStyle(e).position===`fixed`});function uc(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function dc(...e){return t=>{let n=!1,r=e.map(e=>{let r=uc(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():uc(e[t],null)}}}}function fc(...e){return v.useCallback(dc(...e),e)}var $=e(),pc=class extends v.Component{getSnapshotBeforeUpdate(e){let t=this.props.childRef.current;if(Fi(t)&&e.isPresent&&!this.props.isPresent&&this.props.pop!==!1){let e=t.offsetParent,n=Fi(e)&&e.offsetWidth||0,r=Fi(e)&&e.offsetHeight||0,i=getComputedStyle(t),a=this.props.sizeRef.current;a.height=parseFloat(i.height),a.width=parseFloat(i.width),a.top=t.offsetTop,a.left=t.offsetLeft,a.right=n-a.width-a.left,a.bottom=r-a.height-a.top,a.direction=i.direction}return null}componentDidUpdate(){}render(){return this.props.children}};function mc({children:e,isPresent:t,anchorX:n,anchorY:r,root:i,pop:a}){let o=(0,v.useId)(),s=(0,v.useRef)(null),c=(0,v.useRef)({width:0,height:0,top:0,left:0,right:0,bottom:0,direction:`ltr`}),{nonce:l}=(0,v.useContext)(f),u=fc(s,a===!1?void 0:e.props?.ref??e?.ref);return(0,v.useInsertionEffect)(()=>{let{width:e,height:u,top:d,left:f,right:p,bottom:m,direction:h}=c.current;if(t||a===!1||!s.current||!e||!u)return;let g=h===`rtl`,_=n===`left`?g?`right: ${p}`:`left: ${f}`:g?`left: ${f}`:`right: ${p}`,v=r===`bottom`?`bottom: ${m}`:`top: ${d}`;s.current.dataset.motionPopId=o;let y=document.createElement(`style`);l&&(y.nonce=l);let b=i??document.head;return b.appendChild(y),y.sheet&&y.sheet.insertRule(`
|
|
2
|
-
[data-motion-pop-id="${o}"] {
|
|
3
|
-
position: absolute !important;
|
|
4
|
-
width: ${e}px !important;
|
|
5
|
-
height: ${u}px !important;
|
|
6
|
-
${_}px !important;
|
|
7
|
-
${v}px !important;
|
|
8
|
-
}
|
|
9
|
-
`),()=>{s.current?.removeAttribute(`data-motion-pop-id`),b.contains(y)&&b.removeChild(y)}},[t]),(0,$.jsx)(pc,{isPresent:t,childRef:s,sizeRef:c,pop:a,children:a===!1?e:v.cloneElement(e,{ref:u})})}var hc=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:a,mode:o,anchorX:s,anchorY:c,root:l})=>{let u=p(gc),d=(0,v.useId)(),f=(0,v.useRef)(n),m=(0,v.useRef)(r);b(()=>{f.current=n,m.current=r});let h=!0,g=(0,v.useMemo)(()=>(h=!1,{id:d,initial:t,isPresent:n,custom:i,onExitComplete:e=>{u.set(e,!0);for(let e of u.values())if(!e)return;r&&r()},register:e=>(u.set(e,!1),()=>{u.delete(e),!f.current&&!u.size&&m.current?.()})}),[n,u,r]);return a&&h&&(g={...g}),(0,v.useMemo)(()=>{u.forEach((e,t)=>u.set(t,!1))},[n]),v.useEffect(()=>{!n&&!u.size&&r&&r()},[n]),e=(0,$.jsx)(mc,{pop:o===`popLayout`,isPresent:n,anchorX:s,anchorY:c,root:l,children:e}),(0,$.jsx)(x.Provider,{value:g,children:e})};function gc(){return new Map}function _c(e=!0){let t=(0,v.useContext)(x);if(t===null)return[!0,null];let{isPresent:n,onExitComplete:r,register:i}=t,a=(0,v.useId)();(0,v.useEffect)(()=>{if(e)return i(a)},[e]);let o=(0,v.useCallback)(()=>e&&r&&r(a),[a,r,e]);return!n&&r?[!1,o]:[!0]}var vc=e=>e.key||``;function yc(e){let t=[];return v.Children.forEach(e,e=>{(0,v.isValidElement)(e)&&t.push(e)}),t}var bc=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:i=!0,mode:a=`sync`,propagate:o=!1,anchorX:s=`left`,anchorY:c=`top`,root:l})=>{let[u,d]=_c(o),f=(0,v.useMemo)(()=>yc(e),[e]),m=o&&!u?[]:f.map(vc),h=(0,v.useRef)(!0),g=p(()=>new Map),_=(0,v.useRef)(new Set),[x,S]=(0,v.useState)(f),[C,w]=(0,v.useState)(f);b(()=>{o&&!u&&!C.length&&d?.()},[u,o,C.length,d]),b(()=>{h.current=!1;for(let e=0;e<C.length;e++){let t=vc(C[e]);m.includes(t)?(g.delete(t),_.current.delete(t)):g.get(t)!==!0&&g.set(t,!1)}},[C,m.length,m.join(`-`)]);let T=[];if(f!==x){let e=[...f],t=0;for(let n of C){let r=m.indexOf(vc(n));r===-1?(e.splice(t++,0,n),T.push(n)):t=r+T.length+1}return T.every(e=>g.get(vc(e)))?e=f:a===`wait`&&(e=T),w(yc(e)),S(f),null}let{forceRender:ee}=(0,v.useContext)(y);return(0,$.jsx)($.Fragment,{children:C.map(e=>{let p=vc(e),v=o&&!u?!1:f===C||m.includes(p);return(0,$.jsx)(hc,{isPresent:v,initial:!h.current||n?void 0:!1,custom:t,presenceAffectsLayout:i,mode:a,root:l,onExitComplete:v?void 0:()=>{if(_.current.has(p))return;if(g.has(p))_.current.add(p),g.set(p,!0);else return;let e=!0;g.forEach(t=>{t||(e=!1)}),e&&(ee?.(),S([]),o&&d?.(),r&&r())},anchorX:s,anchorY:c,children:e},p)})})},xc=(0,v.createContext)({strict:!1}),Sc={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`]},Cc=!1;function wc(){if(Cc)return;let e={};for(let t in Sc)e[t]={isEnabled:e=>Sc[t].some(t=>!!e[t])};mo(e),Cc=!0}function Tc(){return wc(),ho()}function Ec(e){let t=Tc();for(let n in e)t[n]={...t[n],...e[n]};mo(t)}var Dc=(0,v.createContext)({});function Oc(e,t){if(io(e)){let{initial:t,animate:n}=e;return{initial:t===!1||to(t)?t:void 0,animate:to(n)?n:void 0}}return e.inherit===!1?{}:t}function kc(e){let{initial:t,animate:n}=Oc(e,(0,v.useContext)(Dc));return(0,v.useMemo)(()=>({initial:t,animate:n}),[Ac(t),Ac(n)])}function Ac(e){return Array.isArray(e)?e.join(` `):e}var jc=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Mc(e,t,n){for(let r in t)!W(t[r])&&!bo(r,n)&&(e[r]=t[r])}function Nc({transformTemplate:e},t){return(0,v.useMemo)(()=>{let n=jc();return Hi(n,t,e),Object.assign({},n.vars,n.style)},[t])}function Pc(e,t){let n=e.style||{},r={};return Mc(r,n,e),Object.assign(r,Nc(e,t)),r}function Fc(e,t){let n={},r=Pc(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout=`none`,r.touchAction=e.drag===!0?`none`:`pan-${e.drag===`x`?`y`:`x`}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}var Ic=()=>({...jc(),attrs:{}});function Lc(e,t,n,r){let i=(0,v.useMemo)(()=>{let n=Ic();return qi(n,t,To(r),e.transformTemplate,e.style),{...n.attrs,style:{...n.style}}},[t]);if(e.style){let t={};Mc(t,e.style,e),i.style={...t,...i.style}}return i}var Rc=new Set(`animate.exit.variants.initial.style.values.transition.transformTemplate.custom.inherit.onBeforeLayoutMeasure.onAnimationStart.onAnimationComplete.onUpdate.onDragStart.onDrag.onDragEnd.onMeasureDragConstraints.onDirectionLock.onDragTransitionEnd._dragX._dragY.onHoverStart.onHoverEnd.onViewportEnter.onViewportLeave.globalTapTarget.propagate.ignoreStrict.viewport`.split(`.`));function zc(e){return e.startsWith(`while`)||e.startsWith(`drag`)&&e!==`draggable`||e.startsWith(`layout`)||e.startsWith(`onTap`)||e.startsWith(`onPan`)||e.startsWith(`onLayout`)||Rc.has(e)}function Bc(e,t){return e.startsWith(`on`)?!zc(e):t?.(e)??!zc(e)}function Vc(e,t,n,r){let i={};for(let a in e)(a!==`values`||typeof e.values!=`object`)&&(W(e[a])||(Bc(a,r)||n===!0&&zc(a)||!t&&!zc(a)||e.draggable&&a.startsWith(`onDrag`))&&(i[a]=e[a]));return i}var Hc=[`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 Uc(e){return typeof e!=`string`||e.includes(`-`)?!1:!!(Hc.indexOf(e)>-1||/[A-Z]/u.test(e))}function Wc(e,t,n,{latestValues:r},i,a=!1,o,s){let c=(o??Uc(e)?Lc:Fc)(t,r,i,e),l=Vc(t,typeof e==`string`,a,s),u=e===v.Fragment?{}:{...l,...c,ref:n},{children:d}=t,f=(0,v.useMemo)(()=>W(d)?d.get():d,[d]);return(0,v.createElement)(e,{...u,children:f})}function Gc({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:Kc(n,r,i,e),renderState:t()}}function Kc(e,t,n,r){let i={},a=r(e,{});for(let e in a)i[e]=Cs(a[e]);let{initial:o,animate:s}=e,c=io(e),l=ao(e);t&&l&&!c&&e.inherit!==!1&&(o===void 0&&(o=t.initial),s===void 0&&(s=t.animate));let u=n?n.initial===!1:!1;u||=o===!1;let d=u?s:o;if(d&&typeof d!=`boolean`&&!eo(d)){let t=Array.isArray(d)?d:[d];for(let n=0;n<t.length;n++){let r=li(e,t[n]);if(r){let{transitionEnd:e,transition:t,...n}=r;for(let e in n){let t=n[e];if(Array.isArray(t)){let e=u?t.length-1:0;t=t[e]}t!==null&&(i[e]=t)}for(let t in e)i[t]=e[t]}}}return i}var qc=e=>(t,n)=>{let r=(0,v.useContext)(Dc),i=(0,v.useContext)(x),a=()=>Gc(e,t,r,i);return n?a():p(a)},Jc=qc({scrapeMotionValuesFromProps:xo,createRenderState:jc}),Yc=qc({scrapeMotionValuesFromProps:Do,createRenderState:Ic}),Xc=Symbol.for(`motionComponentSymbol`);function Zc(e,t,n){let r=(0,v.useRef)(n);(0,v.useInsertionEffect)(()=>{r.current=n});let i=(0,v.useRef)(null);return(0,v.useCallback)(n=>{n&&e.onMount?.(n),t&&(n?t.mount(n):t.unmount());let a=r.current;if(typeof a==`function`){if(n){let e=a(n);typeof e==`function`&&(i.current=e)}else i.current?(i.current(),i.current=null):a(n)}else a&&(a.current=n)},[t])}var Qc=(0,v.createContext)({});function $c(e){return e&&typeof e==`object`&&Object.prototype.hasOwnProperty.call(e,`current`)}function el(e,t,n,r,i,a){let{visualElement:o}=(0,v.useContext)(Dc),s=(0,v.useContext)(xc),c=(0,v.useContext)(x),l=(0,v.useContext)(f),u=l.reducedMotion,d=l.skipAnimations,p=(0,v.useRef)(null),m=(0,v.useRef)(!1);r||=s.renderer,!p.current&&r&&(p.current=r(e,{visualState:t,parent:o,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:u,skipAnimations:d,isSVG:a}),m.current&&p.current&&(p.current.manuallyAnimateOnMount=!0));let h=p.current,g=(0,v.useContext)(Qc);h&&!h.projection&&i&&(h.type===`html`||h.type===`svg`)&&tl(p.current,n,i,g);let _=(0,v.useRef)(!1);(0,v.useInsertionEffect)(()=>{h&&_.current&&h.update(n,c)});let y=n[yi],S=(0,v.useRef)(!!y&&typeof window<`u`&&!window.MotionHandoffIsComplete?.(y)&&window.MotionHasOptimisedAnimation?.(y));return b(()=>{m.current&&h&&(h.animationState?.animateChanges(),h.enteringChildren=void 0)},[]),b(()=>{m.current=!0,h&&(_.current=!0,window.MotionIsMounted=!0,h.updateFeatures(),h.scheduleRenderMicrotask(),S.current&&h.animationState&&h.animationState.animateChanges())}),(0,v.useEffect)(()=>{h&&(!S.current&&h.animationState&&h.animationState.animateChanges(),S.current&&=(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(y)}),!1),h.enteringChildren=void 0)}),h}function tl(e,t,n,r){let{layoutId:i,layout:a,drag:o,dragConstraints:s,layoutScroll:c,layoutRoot:l,layoutAnchor:u,layoutCrossfade:d}=t;e.projection=new n(e.latestValues,t[`data-framer-portal-id`]?void 0:nl(e.parent)),e.projection.setOptions({layoutId:i,layout:a,alwaysMeasureLayout:!!o||s&&$c(s),visualElement:e,animationType:typeof a==`string`?a:`both`,initialPromotionConfig:r,crossfade:d,layoutScroll:c,layoutRoot:l,layoutAnchor:u})}function nl(e){if(e)return e.options.allowProjection===!1?nl(e.parent):e.projection}function rl(e,{forwardMotionProps:t=!1,type:n}={},r,i){r&&Ec(r);let a=n?n===`svg`:Uc(e),o=a?Yc:Jc;function s(n,s){let c,l={...(0,v.useContext)(f),...n,layoutId:il(n)},{isStatic:u,isValidProp:d}=l,p=kc(n),m=o(n,u);if(!u&&typeof window<`u`){al(l,r);let t=ol(l);c=t.MeasureLayout,p.visualElement=el(e,m,l,i,t.ProjectionNode,a)}return(0,$.jsxs)(Dc.Provider,{value:p,children:[c&&p.visualElement?(0,$.jsx)(c,{visualElement:p.visualElement,...l}):null,Wc(e,n,Zc(m,p.visualElement,s),m,u,t,a,d)]})}s.displayName=`motion.${typeof e==`string`?e:`create(${e.displayName??e.name??``})`}`;let c=(0,v.forwardRef)(s);return c[Xc]=e,c}function il({layoutId:e}){let t=(0,v.useContext)(y).id;return t&&e!==void 0?t+`-`+e:e}function al(e,t){(0,v.useContext)(xc).strict}function ol(e){let{drag:t,layout:n}=Tc();if(!t&&!n)return{};let r={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function sl(e,t){if(typeof Proxy>`u`)return rl;let n=new Map,r=(n,r)=>rl(n,r,e,t);return new Proxy((e,t)=>r(e,t),{get:(i,a)=>a===`create`?r:(n.has(a)||n.set(a,rl(a,void 0,e,t)),n.get(a))})}var cl=(e,t)=>t.isSVG??Uc(e)?new Oo(t):new Co(t,{allowProjection:e!==v.Fragment}),ll=class extends Y{constructor(e){super(e),e.animationState||=jo(e)}updateAnimationControlsSubscription(){let{animate:e}=this.node.getProps();eo(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){let{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}},ul=0,dl={animation:{Feature:ll},exit:{Feature:class extends Y{constructor(){super(...arguments),this.id=ul++}update(){let{presenceContext:e,prevPresenceContext:t,animationState:n}=this.node;if(!e||!n)return;let{isPresent:r,onExitComplete:i}=e,a=t?.isPresent;if(r===a)return;if(r&&a===!1){if(this.exit===!0){let{initial:e}=this.node.getProps();if(e&&!Array.isArray(e)){let{transition:t,transitionEnd:n,...r}=U(this.node,e)||{};for(let e in r)this.node.getValue(e)?.jump(r[e])}this.node.blockInitialAnimation=!1,n.reset(),n.animateChanges()}else n.setActive(`exit`,!1);this.exit=void 0;return}let o=this.exit=n.setActive(`exit`,!r);i&&!r&&o.then(()=>{this.exit===o&&(this.exit=!0,i(this.id))})}mount(){let{register:e,onExitComplete:t}=this.node.presenceContext||{};t&&t(this.id),e&&(this.unmount=e(this.id))}unmount(){}}}};function fl(e){return{point:{x:e.pageX,y:e.pageY}}}var pl=e=>t=>xa(t)&&e(t,fl(t));function ml(e,t,n,r){return ys(e,t,pl(n),r)}var hl=({current:e})=>e?e.ownerDocument.defaultView:null,gl=(e,t)=>Math.abs(e-t);function _l(e,t){let n=gl(e.x,t.x),r=gl(e.y,t.y);return Math.sqrt(n**2+r**2)}var vl=new Set([`auto`,`scroll`]),yl=class{constructor(e,t,{transformPagePoint:n,contextWindow:r=window,dragSnapToOrigin:i=!1,distanceThreshold:a=3,element:o}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=e=>{this.handleScroll(e.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.hasPendingMove=!1,this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=bl(this.lastRawMoveEventInfo,this.transformPagePoint));let e=Sl(this.lastMoveEventInfo,this.history),t=this.startEvent!==null,n=_l(e.offset,{x:0,y:0})>=this.distanceThreshold;if(!t&&!n)return;let{point:r}=e;this.history.push({...r,timestamp:A.now()});let{onStart:i,onMove:a}=this.handlers;t||(i&&i(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),a&&a(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastRawMoveEventInfo=t,this.lastMoveEventInfo=bl(t,this.transformPagePoint),this.hasPendingMove=!0,L.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.hasPendingMove&&this.updatePoint(),this.end();let{onEnd:n,onSessionEnd:r,resumeAnimation:i}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&i&&i(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let a=Sl(e.type===`pointercancel`?this.lastMoveEventInfo:bl(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,a),r&&r(e,a)},!xa(e))return;this.dragSnapToOrigin=i,this.handlers=t,this.transformPagePoint=n,this.distanceThreshold=a,this.contextWindow=r||window;let s=bl(fl(e),this.transformPagePoint),{point:c}=s,{timestamp:l}=k;this.history=[{...c,timestamp:l}];let{onSessionStart:u}=t;u&&u(e,Sl(s,this.history));let d={passive:!0,capture:!0};this.removeListeners=ie(ml(this.contextWindow,`pointermove`,this.handlePointerMove,d),ml(this.contextWindow,`pointerup`,this.handlePointerUp,d),ml(this.contextWindow,`pointercancel`,this.handlePointerUp,d)),o&&this.startScrollTracking(o)}startScrollTracking(e){let t=e.parentElement;for(;t;){let e=getComputedStyle(t);(vl.has(e.overflowX)||vl.has(e.overflowY))&&this.scrollPositions.set(t,{x:t.scrollLeft,y:t.scrollTop}),t=t.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener(`scroll`,this.onElementScroll,{capture:!0}),window.addEventListener(`scroll`,this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener(`scroll`,this.onElementScroll,{capture:!0}),window.removeEventListener(`scroll`,this.onWindowScroll)}}handleScroll(e){let t=this.scrollPositions.get(e);if(!t)return;let n=e===window,r=n?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop},i={x:r.x-t.x,y:r.y-t.y};(i.x!==0||i.y!==0)&&(n?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=i.x,this.lastMoveEventInfo.point.y+=i.y):this.history.length>0&&(this.history[0].x-=i.x,this.history[0].y-=i.y),this.scrollPositions.set(e,r),L.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),R(this.updatePoint)}};function bl(e,t){return t?{point:t(e.point)}:e}function xl(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Sl({point:e},t){return{point:e,delta:xl(e,wl(t)),offset:xl(e,Cl(t)),velocity:Tl(t,.1)}}function Cl(e){return e[0]}function wl(e){return e[e.length-1]}function Tl(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null,i=wl(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>D(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&i.timestamp-r.timestamp>D(t)*2&&(r=e[1]);let a=O(i.timestamp-r.timestamp);if(a===0)return{x:0,y:0};let o={x:(i.x-r.x)/a,y:(i.y-r.y)/a};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function El(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?I(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?I(n,e,r.max):Math.min(e,n)),e}function Dl(e,t,n){return{min:t===void 0?void 0:e.min+t,max:n===void 0?void 0:e.max+n-(e.max-e.min)}}function Ol(e,{top:t,left:n,bottom:r,right:i}){return{x:Dl(e.x,n,i),y:Dl(e.y,t,r)}}function kl(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function Al(e,t){return{x:kl(e.x,t.x),y:kl(e.y,t.y)}}function jl(e,t){let n=.5,r=Z(e),i=Z(t);return i>r?n=ae(t.min,t.max-r,e.min):r>i&&(n=ae(e.min,e.max-i,t.min)),w(0,1,n)}function Ml(e,t){let n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}var Nl=.35;function Pl(e=Nl){return e===!1?e=0:e===!0&&(e=Nl),{x:Fl(e,`left`,`right`),y:Fl(e,`top`,`bottom`)}}function Fl(e,t,n){return{min:Il(e,t),max:Il(e,n)}}function Il(e,t){return typeof e==`number`?e:e[t]||0}var Ll=new WeakMap,Rl=class{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=J(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:t=!1,distanceThreshold:n}={}){let{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;let i=e=>{t&&this.snapToCursor(e),this.stopAnimation()},a=(e,t)=>{let{drag:n,dragPropagation:r,onDragStart:i}=this.getProps();if(n&&!r&&(this.openDragLock&&this.openDragLock(),this.openDragLock=ga(n),!this.openDragLock))return;this.latestPointerEvent=e,this.latestPanInfo=t,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Q(e=>{let t=this.getAxisMotionValue(e).get()||0;if(M.test(t)){let{projection:n}=this.visualElement;if(n&&n.layout){let r=n.layout.layoutBox[e];r&&(t=Z(r)*(parseFloat(t)/100))}}this.originPoint[e]=t}),i&&L.update(()=>i(e,t),!1,!0),_i(this.visualElement,`transform`);let{animationState:a}=this.visualElement;a&&a.setActive(`whileDrag`,!0)},o=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t;let{dragPropagation:n,dragDirectionLock:r,onDirectionLock:i,onDrag:a}=this.getProps();if(!n&&!this.openDragLock)return;let{offset:o}=t;if(r&&this.currentDirection===null){this.currentDirection=Hl(o),this.currentDirection!==null&&i&&i(this.currentDirection);return}this.updateAxis(`x`,t.point,o),this.updateAxis(`y`,t.point,o),this.visualElement.render(),a&&L.update(()=>a(e,t),!1,!0)},s=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t,this.stop(e,t),this.latestPointerEvent=null,this.latestPanInfo=null},c=()=>{let{dragSnapToOrigin:e}=this.getProps();(e||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:l}=this.getProps();this.panSession=new yl(e,{onSessionStart:i,onStart:a,onMove:o,onSessionEnd:s,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:l,distanceThreshold:n,contextWindow:hl(this.visualElement),element:this.visualElement.current})}stop(e,t){let n=e||this.latestPointerEvent,r=t||this.latestPanInfo,i=this.isDragging;if(this.cancel(),!i||!r||!n)return;let{velocity:a}=r;this.startAnimation(a);let{onDragEnd:o}=this.getProps();o&&L.postRender(()=>o(n,r))}cancel(){this.isDragging=!1;let{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.endPanSession();let{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),t&&t.setActive(`whileDrag`,!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(e,t,n){let{drag:r}=this.getProps();if(!n||!Vl(e,r,this.currentDirection))return;let i=this.getAxisMotionValue(e),a=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(a=El(a,this.constraints[e],this.elastic[e])),i.set(a)}resolveConstraints(){let{dragConstraints:e,dragElastic:t}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,r=this.constraints;e&&$c(e)?this.constraints||=this.resolveRefConstraints():this.constraints=e&&n?Ol(n.layoutBox,e):!1,this.elastic=Pl(t),r!==this.constraints&&!$c(e)&&n&&this.constraints&&!this.hasMutatedConstraints&&Q(e=>{this.constraints!==!1&&this.getAxisMotionValue(e)&&(this.constraints[e]=Ml(n.layoutBox[e],this.constraints[e]))})}resolveRefConstraints(){let{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!$c(e))return!1;let n=e.current,{projection:r}=this.visualElement;if(!r||!r.layout)return!1;r.root&&(r.root.scroll=void 0,r.root.updateScroll());let i=fa(n,r.root,this.visualElement.getTransformPagePoint()),a=Al(r.layout.layoutBox,i);if(t){let e=t(Yi(a));this.hasMutatedConstraints=!!e,e&&(a=Ji(e))}return a}startAnimation(e){let{drag:t,dragMomentum:n,dragElastic:r,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:o}=this.getProps(),s=this.constraints||{},c=Q(o=>{if(!Vl(o,t,this.currentDirection))return;let c=s&&s[o]||{};(a===!0||a===o)&&(c={min:0,max:0});let l=r?200:1e6,u=r?40:1e7,d={type:`inertia`,velocity:n?e[o]:0,bounceStiffness:l,bounceDamping:u,timeConstant:750,restDelta:1,restSpeed:10,...i,...c};return this.startAxisValueAnimation(o,d)});return Promise.all(c).then(o)}startAxisValueAnimation(e,t){let n=this.getAxisMotionValue(e);return _i(this.visualElement,e),n.start(ii(e,n,0,t,this.visualElement,!1))}stopAnimation(){Q(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){let t=`_drag${e.toUpperCase()}`;return this.visualElement.getProps()[t]||this.visualElement.getValue(e,this.visualElement.latestValues[e]??0)}snapToCursor({clientX:e,clientY:t}){let{drag:n}=this.getProps(),r={x:e,y:t},i=this.visualElement.getTransformPagePoint()?.(r)||r,a=this.visualElement.measureViewportBox();Q(e=>{if(!Vl(e,n,this.currentDirection))return;let t=this.getAxisMotionValue(e),{min:r,max:o}=a[e];t.set((t.get()||0)+i[e]-I(r,o,.5))})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!$c(t)||!n||!this.constraints)return;this.stopAnimation();let r=this.constraints,i={x:0,y:0};Q(e=>{let t=this.getAxisMotionValue(e).get();i[e]=jl({min:t,max:t},r[e])});let{transformTemplate:a}=this.visualElement.getProps();this.visualElement.current.style.transform=a?a({},``):`none`,n.root&&n.root.updateScroll(),n.updateLayout(),this.constraints=!1,this.resolveConstraints(),Q(t=>{let n=this.getAxisMotionValue(t);if(!Vl(t,e,null)||!n.get())return;let{min:r,max:a}=this.constraints[t];n.set(I(r,a,i[t]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;Ll.set(this.visualElement,this);let e=this.visualElement.current,t=ml(e,`pointerdown`,t=>{let{drag:n,dragListener:r=!0}=this.getProps(),i=t.target,a=i!==e&&Ta(i);n&&r&&!a&&this.start(t)}),n,r=()=>{let{dragConstraints:t}=this.getProps();$c(t)&&t.current&&(this.constraints=this.resolveRefConstraints(),n||=Bl(e,t.current,()=>this.scalePositionWithinConstraints()))},{projection:i}=this.visualElement,a=i.addEventListener(`measure`,r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),L.read(r);let o=ys(window,`resize`,()=>this.scalePositionWithinConstraints()),s=i.addEventListener(`didUpdate`,(({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(Q(t=>{let n=this.getAxisMotionValue(t);n&&(this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate))}),this.visualElement.render())}));return()=>{o(),t(),a(),s&&s(),n&&n()}}getProps(){let e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:i=!1,dragElastic:a=Nl,dragMomentum:o=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:i,dragElastic:a,dragMomentum:o}}};function zl(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function Bl(e,t,n){let r=Ka(e,zl(n)),i=Ka(t,zl(n));return()=>{r(),i()}}function Vl(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function Hl(e,t=10){let n=null;return Math.abs(e.y)>t?n=`y`:Math.abs(e.x)>t&&(n=`x`),n}var Ul=class extends Y{constructor(e){super(e),this.removeGroupControls=E,this.removeListeners=E,this.controls=new Rl(e)}mount(){let{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||E}update(){let{dragControls:e}=this.node.getProps(),{dragControls:t}=this.node.prevProps||{};e!==t&&(this.removeGroupControls(),e&&(this.removeGroupControls=e.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}},Wl=e=>(t,n)=>{e&&L.update(()=>e(t,n),!1,!0)},Gl=class extends Y{constructor(){super(...arguments),this.removePointerDownListener=E}onPointerDown(e){this.session=new yl(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:hl(this.node)})}createPanHandlers(){let{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:Wl(e),onStart:Wl(t),onMove:Wl(n),onEnd:(e,t)=>{delete this.session,r&&L.postRender(()=>r(e,t))}}}mount(){this.removePointerDownListener=ml(this.node.current,`pointerdown`,e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}},Kl=!1,ql=class extends v.Component{componentDidMount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:i}=e;i&&(t.group&&t.group.add(i),n&&n.register&&r&&n.register(i),Kl&&i.root.didUpdate(),i.addEventListener(`animationComplete`,()=>{this.safeToRemove()}),i.setOptions({...i.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),Es.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){let{layoutDependency:t,visualElement:n,drag:r,isPresent:i}=this.props,{projection:a}=n;return a?(a.isPresent=i,e.layoutDependency!==t&&a.setOptions({...a.options,layoutDependency:t}),Kl=!0,r||e.layoutDependency!==t||t===void 0||e.isPresent!==i?a.willUpdate():this.safeToRemove(),e.isPresent!==i&&(i?a.promote():a.relegate()||L.postRender(()=>{let e=a.getStack();(!e||!e.members.length)&&this.safeToRemove()})),null):null}componentDidUpdate(){let{visualElement:e,layoutAnchor:t}=this.props,{projection:n}=e;n&&(n.options.layoutAnchor=t,n.root.didUpdate(),pa.postRender(()=>{!n.currentAnimation&&n.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;Kl=!0,r&&(r.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(r),n&&n.deregister&&n.deregister(r))}safeToRemove(){let{safeToRemove:e}=this.props;e&&e()}render(){return null}};function Jl(e){let[t,n]=_c(),r=(0,v.useContext)(y);return(0,$.jsx)(ql,{...e,layoutGroup:r,switchLayoutGroup:(0,v.useContext)(Qc),isPresent:t,safeToRemove:n})}var Yl={pan:{Feature:Gl},drag:{Feature:Ul,ProjectionNode:lc,MeasureLayout:Jl}};function Xl(e,t,n){let{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive(`whileHover`,n===`Start`);let i=r[`onHover`+n];i&&L.postRender(()=>i(t,fl(t)))}var Zl=class extends Y{mount(){let{current:e}=this.node;e&&(this.unmount=ya(e,(e,t)=>(Xl(this.node,t,`Start`),e=>Xl(this.node,e,`End`))))}unmount(){}},Ql=class extends Y{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(`:focus-visible`)}catch{e=!0}e&&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=ie(ys(this.node.current,`focus`,()=>this.onFocus()),ys(this.node.current,`blur`,()=>this.onBlur()))}unmount(){}};function $l(e,t,n){let{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive(`whileTap`,n===`Start`);let i=r[`onTap`+(n===`End`?``:n)];i&&L.postRender(()=>i(t,fl(t)))}var eu=class extends Y{mount(){let{current:e}=this.node;if(!e)return;let{globalTapTarget:t,propagate:n}=this.node.props;this.unmount=Ma(e,(e,t)=>($l(this.node,t,`Start`),(e,{success:t})=>$l(this.node,e,t?`End`:`Cancel`)),{useGlobalTarget:t,stopPropagation:n?.tap===!1})}unmount(){}},tu=new WeakMap,nu=new WeakMap,ru=e=>{let t=tu.get(e.target);t&&t(e)},iu=e=>{e.forEach(ru)};function au({root:e,...t}){let n=e||document;nu.has(n)||nu.set(n,{});let r=nu.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(iu,{root:e,...t})),r[i]}function ou(e,t,n){let r=au(t);return tu.set(e,n),r.observe(e),()=>{tu.delete(e),r.unobserve(e)}}var su={some:0,all:1},cu=class extends Y{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.stopObserver?.();let{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:r=`some`,once:i}=e,a={root:t?t.current:void 0,rootMargin:n,threshold:typeof r==`number`?r:su[r]},o=e=>{let{isIntersecting:t}=e;if(this.isInView===t||(this.isInView=t,i&&!t&&this.hasEnteredView))return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive(`whileInView`,t);let{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),a=t?n:r;a&&a(e)};this.stopObserver=ou(this.node.current,a,o)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>`u`)return;let{props:e,prevProps:t}=this.node;[`amount`,`margin`,`root`].some(lu(e,t))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}};function lu({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}var uu={inView:{Feature:cu},tap:{Feature:eu},focus:{Feature:Ql},hover:{Feature:Zl}},du={layout:{ProjectionNode:lc,MeasureLayout:Jl}},fu=sl({...dl,...uu,...Yl,...du},cl);function pu(){!co.current&&uo();let[e]=(0,v.useState)(so.current);return e}var mu=fu,hu=new Map([[`bold`,v.createElement(v.Fragment,null,v.createElement(`path`,{d:`M252,124a60.14,60.14,0,0,0-32-53.08,52,52,0,0,0-92-32.11A52,52,0,0,0,36,70.92a60,60,0,0,0,0,106.14,52,52,0,0,0,92,32.13,52,52,0,0,0,92-32.13A60.05,60.05,0,0,0,252,124ZM88,204a28,28,0,0,1-26.85-20.07c1,0,1.89.07,2.85.07h8a12,12,0,0,0,0-24H64A36,36,0,0,1,52,90.05a12,12,0,0,0,8-11.32V72a28,28,0,0,1,56,0v60.18a51.61,51.61,0,0,0-7.2-3.85,12,12,0,1,0-9.6,22A28,28,0,0,1,88,204Zm104-44h-8a12,12,0,0,0,0,24h8c1,0,1.9,0,2.85-.07a28,28,0,1,1-38-33.61,12,12,0,1,0-9.6-22,51.61,51.61,0,0,0-7.2,3.85V72a28,28,0,0,1,56,0v6.73a12,12,0,0,0,8,11.32,36,36,0,0,1-12,70Zm16-44a12,12,0,0,1-12,12,40,40,0,0,1-40-40V84a12,12,0,0,1,24,0v4a16,16,0,0,0,16,16A12,12,0,0,1,208,116ZM100,88a40,40,0,0,1-40,40,12,12,0,0,1,0-24A16,16,0,0,0,76,88V84a12,12,0,0,1,24,0Z`}))],[`duotone`,v.createElement(v.Fragment,null,v.createElement(`path`,{d:`M240,124a48,48,0,0,1-32,45.27h0V176a40,40,0,0,1-80,0,40,40,0,0,1-80,0v-6.73h0a48,48,0,0,1,0-90.54V72a40,40,0,0,1,80,0,40,40,0,0,1,80,0v6.73A48,48,0,0,1,240,124Z`,opacity:`0.2`}),v.createElement(`path`,{d:`M248,124a56.11,56.11,0,0,0-32-50.61V72a48,48,0,0,0-88-26.49A48,48,0,0,0,40,72v1.39a56,56,0,0,0,0,101.2V176a48,48,0,0,0,88,26.49A48,48,0,0,0,216,176v-1.41A56.09,56.09,0,0,0,248,124ZM88,208a32,32,0,0,1-31.81-28.56A55.87,55.87,0,0,0,64,180h8a8,8,0,0,0,0-16H64A40,40,0,0,1,50.67,86.27,8,8,0,0,0,56,78.73V72a32,32,0,0,1,64,0v68.26A47.8,47.8,0,0,0,88,128a8,8,0,0,0,0,16,32,32,0,0,1,0,64Zm104-44h-8a8,8,0,0,0,0,16h8a55.87,55.87,0,0,0,7.81-.56A32,32,0,1,1,168,144a8,8,0,0,0,0-16,47.8,47.8,0,0,0-32,12.26V72a32,32,0,0,1,64,0v6.73a8,8,0,0,0,5.33,7.54A40,40,0,0,1,192,164Zm16-52a8,8,0,0,1-8,8h-4a36,36,0,0,1-36-36V80a8,8,0,0,1,16,0v4a20,20,0,0,0,20,20h4A8,8,0,0,1,208,112ZM60,120H56a8,8,0,0,1,0-16h4A20,20,0,0,0,80,84V80a8,8,0,0,1,16,0v4A36,36,0,0,1,60,120Z`}))],[`fill`,v.createElement(v.Fragment,null,v.createElement(`path`,{d:`M212,76V72a44,44,0,0,0-74.86-31.31,3.93,3.93,0,0,0-1.14,2.8v88.72a4,4,0,0,0,6.2,3.33A47.67,47.67,0,0,1,167.68,128a8.18,8.18,0,0,1,8.31,7.58,8,8,0,0,1-8,8.42,32,32,0,0,0-32,32v33.88a4,4,0,0,0,1.49,3.12,47.92,47.92,0,0,0,74.21-17.16,4,4,0,0,0-4.49-5.56A68.06,68.06,0,0,1,192,192h-7.73a8.18,8.18,0,0,1-8.25-7.47,8,8,0,0,1,8-8.53h8a51.6,51.6,0,0,0,24-5.88v0A52,52,0,0,0,212,76Zm-12,36h-4a36,36,0,0,1-36-36V72a8,8,0,0,1,16,0v4a20,20,0,0,0,20,20h4a8,8,0,0,1,0,16ZM88,28A44.05,44.05,0,0,0,44,72v4a52,52,0,0,0-4,94.12h0A51.6,51.6,0,0,0,64,176h7.73A8.18,8.18,0,0,1,80,183.47,8,8,0,0,1,72,192H64a67.48,67.48,0,0,1-15.21-1.73,4,4,0,0,0-4.5,5.55A47.93,47.93,0,0,0,118.51,213a4,4,0,0,0,1.49-3.12V176a32,32,0,0,0-32-32,8,8,0,0,1-8-8.42A8.18,8.18,0,0,1,88.32,128a47.67,47.67,0,0,1,25.48,7.54,4,4,0,0,0,6.2-3.33V43.49a4,4,0,0,0-1.14-2.81A43.85,43.85,0,0,0,88,28Zm8,48a36,36,0,0,1-36,36H56a8,8,0,0,1,0-16h4A20,20,0,0,0,80,76V72a8,8,0,0,1,16,0Z`}))],[`light`,v.createElement(v.Fragment,null,v.createElement(`path`,{d:`M246,124a54.13,54.13,0,0,0-32-49.33V72a46,46,0,0,0-86-22.67A46,46,0,0,0,42,72v2.67a54,54,0,0,0,0,98.63V176a46,46,0,0,0,86,22.67A46,46,0,0,0,214,176v-2.7A54.07,54.07,0,0,0,246,124ZM88,210a34,34,0,0,1-34-32.94A53.67,53.67,0,0,0,64,178h8a6,6,0,0,0,0-12H64A42,42,0,0,1,50,84.39a6,6,0,0,0,4-5.66V72a34,34,0,0,1,68,0v73.05A45.89,45.89,0,0,0,88,130a6,6,0,0,0,0,12,34,34,0,0,1,0,68Zm104-44h-8a6,6,0,0,0,0,12h8a53.67,53.67,0,0,0,10-.94A34,34,0,1,1,168,142a6,6,0,0,0,0-12,45.89,45.89,0,0,0-34,15.05V72a34,34,0,0,1,68,0v6.73a6,6,0,0,0,4,5.66A42,42,0,0,1,192,166Zm14-54a6,6,0,0,1-6,6h-4a34,34,0,0,1-34-34V80a6,6,0,0,1,12,0v4a22,22,0,0,0,22,22h4A6,6,0,0,1,206,112ZM60,118H56a6,6,0,0,1,0-12h4A22,22,0,0,0,82,84V80a6,6,0,0,1,12,0v4A34,34,0,0,1,60,118Z`}))],[`regular`,v.createElement(v.Fragment,null,v.createElement(`path`,{d:`M248,124a56.11,56.11,0,0,0-32-50.61V72a48,48,0,0,0-88-26.49A48,48,0,0,0,40,72v1.39a56,56,0,0,0,0,101.2V176a48,48,0,0,0,88,26.49A48,48,0,0,0,216,176v-1.41A56.09,56.09,0,0,0,248,124ZM88,208a32,32,0,0,1-31.81-28.56A55.87,55.87,0,0,0,64,180h8a8,8,0,0,0,0-16H64A40,40,0,0,1,50.67,86.27,8,8,0,0,0,56,78.73V72a32,32,0,0,1,64,0v68.26A47.8,47.8,0,0,0,88,128a8,8,0,0,0,0,16,32,32,0,0,1,0,64Zm104-44h-8a8,8,0,0,0,0,16h8a55.87,55.87,0,0,0,7.81-.56A32,32,0,1,1,168,144a8,8,0,0,0,0-16,47.8,47.8,0,0,0-32,12.26V72a32,32,0,0,1,64,0v6.73a8,8,0,0,0,5.33,7.54A40,40,0,0,1,192,164Zm16-52a8,8,0,0,1-8,8h-4a36,36,0,0,1-36-36V80a8,8,0,0,1,16,0v4a20,20,0,0,0,20,20h4A8,8,0,0,1,208,112ZM60,120H56a8,8,0,0,1,0-16h4A20,20,0,0,0,80,84V80a8,8,0,0,1,16,0v4A36,36,0,0,1,60,120Z`}))],[`thin`,v.createElement(v.Fragment,null,v.createElement(`path`,{d:`M244,124a52.1,52.1,0,0,0-32-48V72a44,44,0,0,0-84-18.3A44,44,0,0,0,44,72v4a52,52,0,0,0,0,96v4a44,44,0,0,0,84,18.3A44,44,0,0,0,212,176v-4A52.07,52.07,0,0,0,244,124ZM88,212a36,36,0,0,1-36-36v-1.41A52.13,52.13,0,0,0,64,176h8a4,4,0,0,0,0-8H64A44,44,0,0,1,49.33,82.5,4,4,0,0,0,52,78.73V72a36,36,0,0,1,72,0v78.75A44,44,0,0,0,88,132a4,4,0,0,0,0,8,36,36,0,0,1,0,72Zm104-44h-8a4,4,0,0,0,0,8h8a52.13,52.13,0,0,0,12-1.41V176a36,36,0,1,1-36-36,4,4,0,0,0,0-8,44,44,0,0,0-36,18.75V72a36,36,0,0,1,72,0v6.73a4,4,0,0,0,2.67,3.77A44,44,0,0,1,192,168Zm12-56a4,4,0,0,1-4,4h-4a32,32,0,0,1-32-32V80a4,4,0,0,1,8,0v4a24,24,0,0,0,24,24h4A4,4,0,0,1,204,112ZM92,84a32,32,0,0,1-32,32H56a4,4,0,0,1,0-8h4A24,24,0,0,0,84,84V80a4,4,0,0,1,8,0Z`}))]]),gu=new Map([[`bold`,v.createElement(v.Fragment,null,v.createElement(`path`,{d:`M72.5,150.63,100.79,128,72.5,105.37a12,12,0,1,1,15-18.74l40,32a12,12,0,0,1,0,18.74l-40,32a12,12,0,0,1-15-18.74ZM144,172h32a12,12,0,0,0,0-24H144a12,12,0,0,0,0,24ZM236,56V200a20,20,0,0,1-20,20H40a20,20,0,0,1-20-20V56A20,20,0,0,1,40,36H216A20,20,0,0,1,236,56Zm-24,4H44V196H212Z`}))],[`duotone`,v.createElement(v.Fragment,null,v.createElement(`path`,{d:`M224,56V200a8,8,0,0,1-8,8H40a8,8,0,0,1-8-8V56a8,8,0,0,1,8-8H216A8,8,0,0,1,224,56Z`,opacity:`0.2`}),v.createElement(`path`,{d:`M128,128a8,8,0,0,1-3,6.25l-40,32a8,8,0,1,1-10-12.5L107.19,128,75,102.25a8,8,0,1,1,10-12.5l40,32A8,8,0,0,1,128,128Zm48,24H136a8,8,0,0,0,0,16h40a8,8,0,0,0,0-16Zm56-96V200a16,16,0,0,1-16,16H40a16,16,0,0,1-16-16V56A16,16,0,0,1,40,40H216A16,16,0,0,1,232,56ZM216,200V56H40V200H216Z`}))],[`fill`,v.createElement(v.Fragment,null,v.createElement(`path`,{d:`M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40Zm-91,94.25-40,32a8,8,0,1,1-10-12.5L107.19,128,75,102.25a8,8,0,1,1,10-12.5l40,32a8,8,0,0,1,0,12.5ZM176,168H136a8,8,0,0,1,0-16h40a8,8,0,0,1,0,16Z`}))],[`light`,v.createElement(v.Fragment,null,v.createElement(`path`,{d:`M126,128a6,6,0,0,1-2.25,4.69l-40,32a6,6,0,0,1-7.5-9.38L110.4,128,76.25,100.69a6,6,0,1,1,7.5-9.38l40,32A6,6,0,0,1,126,128Zm50,26H136a6,6,0,0,0,0,12h40a6,6,0,0,0,0-12Zm54-98V200a14,14,0,0,1-14,14H40a14,14,0,0,1-14-14V56A14,14,0,0,1,40,42H216A14,14,0,0,1,230,56Zm-12,0a2,2,0,0,0-2-2H40a2,2,0,0,0-2,2V200a2,2,0,0,0,2,2H216a2,2,0,0,0,2-2Z`}))],[`regular`,v.createElement(v.Fragment,null,v.createElement(`path`,{d:`M128,128a8,8,0,0,1-3,6.25l-40,32a8,8,0,1,1-10-12.5L107.19,128,75,102.25a8,8,0,1,1,10-12.5l40,32A8,8,0,0,1,128,128Zm48,24H136a8,8,0,0,0,0,16h40a8,8,0,0,0,0-16Zm56-96V200a16,16,0,0,1-16,16H40a16,16,0,0,1-16-16V56A16,16,0,0,1,40,40H216A16,16,0,0,1,232,56ZM216,200V56H40V200H216Z`}))],[`thin`,v.createElement(v.Fragment,null,v.createElement(`path`,{d:`M122.5,124.88a4,4,0,0,1,0,6.24l-40,32a4,4,0,0,1-5-6.24L113.6,128,77.5,99.12a4,4,0,0,1,5-6.24ZM176,156H136a4,4,0,0,0,0,8h40a4,4,0,0,0,0-8ZM228,56V200a12,12,0,0,1-12,12H40a12,12,0,0,1-12-12V56A12,12,0,0,1,40,44H216A12,12,0,0,1,228,56Zm-8,0a4,4,0,0,0-4-4H40a4,4,0,0,0-4,4V200a4,4,0,0,0,4,4H216a4,4,0,0,0,4-4Z`}))]]),_u=new Map([[`bold`,v.createElement(v.Fragment,null,v.createElement(`path`,{d:`M230.47,67.5a12,12,0,0,0-19.26-4.32L172.43,99l-12.68-2.72L157,83.57l35.79-38.78a12,12,0,0,0-4.32-19.26A76.07,76.07,0,0,0,88.41,121.64L30.92,174.18a4.68,4.68,0,0,0-.39.38,36,36,0,0,0,50.91,50.91l.38-.39,52.54-57.49A76.05,76.05,0,0,0,230.47,67.5ZM160,148a51.5,51.5,0,0,1-23.35-5.52,12,12,0,0,0-14.26,2.62L64.31,208.66a12,12,0,0,1-17-17l63.55-58.07a12,12,0,0,0,2.62-14.26A51.5,51.5,0,0,1,108,96a52.06,52.06,0,0,1,52-52h.89L135.17,71.87a12,12,0,0,0-2.91,10.65l5.66,26.35a12,12,0,0,0,9.21,9.21l26.35,5.66a12,12,0,0,0,10.65-2.91L212,95.12c0,.3,0,.59,0,.89A52.06,52.06,0,0,1,160,148Z`}))],[`duotone`,v.createElement(v.Fragment,null,v.createElement(`path`,{d:`M224,96a64,64,0,0,1-94.94,56L73,217A24,24,0,0,1,39,183L104,126.94a64,64,0,0,1,80-90.29L144,80l5.66,26.34L176,112l43.35-40A63.8,63.8,0,0,1,224,96Z`,opacity:`0.2`}),v.createElement(`path`,{d:`M226.76,69a8,8,0,0,0-12.84-2.88l-40.3,37.19-17.23-3.7-3.7-17.23,37.19-40.3A8,8,0,0,0,187,29.24,72,72,0,0,0,88,96,72.34,72.34,0,0,0,94,124.94L33.79,177c-.15.12-.29.26-.43.39a32,32,0,0,0,45.26,45.26c.13-.13.27-.28.39-.42L131.06,162A72,72,0,0,0,232,96,71.56,71.56,0,0,0,226.76,69ZM160,152a56.14,56.14,0,0,1-27.07-7,8,8,0,0,0-9.92,1.77L67.11,211.51a16,16,0,0,1-22.62-22.62L109.18,133a8,8,0,0,0,1.77-9.93,56,56,0,0,1,58.36-82.31l-31.2,33.81a8,8,0,0,0-1.94,7.1L141.83,108a8,8,0,0,0,6.14,6.14l26.35,5.66a8,8,0,0,0,7.1-1.94l33.81-31.2A56.06,56.06,0,0,1,160,152Z`}))],[`fill`,v.createElement(v.Fragment,null,v.createElement(`path`,{d:`M232,96a72,72,0,0,1-100.94,66L79,222.22c-.12.14-.26.29-.39.42a32,32,0,0,1-45.26-45.26c.14-.13.28-.27.43-.39L94,124.94a72.07,72.07,0,0,1,83.54-98.78,8,8,0,0,1,3.93,13.19L144,80l5.66,26.35L176,112l40.65-37.52a8,8,0,0,1,13.19,3.93A72.6,72.6,0,0,1,232,96Z`}))],[`light`,v.createElement(v.Fragment,null,v.createElement(`path`,{d:`M224.91,69.75a6,6,0,0,0-9.63-2.16l-41.07,37.9L154.7,101.3l-4.19-19.51,37.9-41.07a6,6,0,0,0-2.16-9.63,70,70,0,0,0-89.77,94.39l-61.39,53c-.11.09-.21.19-.32.3A30,30,0,0,0,77.2,221.23c.11-.11.21-.21.3-.32l53-61.39a70,70,0,0,0,94.39-89.77ZM160,154a58,58,0,0,1-28-7.22,6,6,0,0,0-7.45,1.33L68.57,212.88a18,18,0,0,1-25.45-25.45l64.76-55.94A6,6,0,0,0,109.2,124a58,58,0,0,1,64-84.53L139.58,75.93a6,6,0,0,0-1.45,5.33l5.65,26.35a6,6,0,0,0,4.61,4.61l26.35,5.65a6,6,0,0,0,5.33-1.45L216.49,82.8A58.06,58.06,0,0,1,160,154Z`}))],[`regular`,v.createElement(v.Fragment,null,v.createElement(`path`,{d:`M226.76,69a8,8,0,0,0-12.84-2.88l-40.3,37.19-17.23-3.7-3.7-17.23,37.19-40.3A8,8,0,0,0,187,29.24,72,72,0,0,0,88,96,72.34,72.34,0,0,0,94,124.94L33.79,177c-.15.12-.29.26-.43.39a32,32,0,0,0,45.26,45.26c.13-.13.27-.28.39-.42L131.06,162A72,72,0,0,0,232,96,71.56,71.56,0,0,0,226.76,69ZM160,152a56.14,56.14,0,0,1-27.07-7,8,8,0,0,0-9.92,1.77L67.11,211.51a16,16,0,0,1-22.62-22.62L109.18,133a8,8,0,0,0,1.77-9.93,56,56,0,0,1,58.36-82.31l-31.2,33.81a8,8,0,0,0-1.94,7.1L141.83,108a8,8,0,0,0,6.14,6.14l26.35,5.66a8,8,0,0,0,7.1-1.94l33.81-31.2A56.06,56.06,0,0,1,160,152Z`}))],[`thin`,v.createElement(v.Fragment,null,v.createElement(`path`,{d:`M223.05,70.5a4,4,0,0,0-6.42-1.44l-41.82,38.6L153,103l-4.68-21.79,38.6-41.82a4,4,0,0,0-1.44-6.43A68,68,0,0,0,98.94,126L36.4,180l-.21.2a28,28,0,0,0,39.6,39.6l.2-.21,54-62.54A68,68,0,0,0,228,96,67.51,67.51,0,0,0,223.05,70.5ZM160,156a60,60,0,0,1-29-7.47,4,4,0,0,0-5,.89L70,214.25A20,20,0,0,1,41.75,186l64.82-56a4,4,0,0,0,.89-5,60,60,0,0,1,69.46-86.59L141.05,77.29a4,4,0,0,0-1,3.55l5.66,26.35a4,4,0,0,0,3.07,3.07l26.35,5.66a4,4,0,0,0,3.55-1l38.87-35.87A60.05,60.05,0,0,1,160,156Z`}))]]),vu=v.forwardRef((e,t)=>v.createElement(r,{ref:t,...e,weights:hu}));vu.displayName=`BrainIcon`;var yu=vu,bu=v.forwardRef((e,t)=>v.createElement(r,{ref:t,...e,weights:gu}));bu.displayName=`TerminalWindowIcon`;var xu=bu,Su=v.forwardRef((e,t)=>v.createElement(r,{ref:t,...e,weights:_u}));Su.displayName=`WrenchIcon`;var Cu={waiting:o,thinking:yu,answering:u,command:xu,search:c,read:s,write:l,tool:Su},wu={running:`В работе`,waiting_permission:`Нужен ответ`,completed:`Готово`,failed:`Ошибка`,cancelled:`Завершено без продолжения`};function Tu({snapshot:e,permissionCount:t,connected:n}){let r=pu(),s=(0,v.useRef)(null),c=h(e,t,n);if((0,v.useEffect)(()=>{s.current&&(s.current.open=!1)},[e.projectId,e.run?.id]),(0,v.useEffect)(()=>{let e=e=>{e.key===`Escape`&&s.current?.open&&(s.current.open=!1,s.current.querySelector(`summary`)?.focus())};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[]),!c.label)return null;let l=c.waitingPermission?d:c.current?Cu[c.current.kind]:e.run?.status===`running`||e.run?.status===`pausing`?o:e.run?.status===`failed`||e.run?.status===`interrupted`?d:a;return(0,$.jsxs)(`section`,{className:`agent-activity-strip ${c.live?`is-live`:``} ${c.waitingPermission?`is-waiting`:``}`,"aria-label":`Действия агента`,"data-testid":`agent-activity`,"data-live":c.live?`true`:`false`,"data-kind":c.current?.kind??`idle`,children:[(0,$.jsxs)(`div`,{className:`agent-activity-current`,children:[(0,$.jsx)(`span`,{className:`agent-activity-icon`,"aria-hidden":`true`,children:(0,$.jsx)(l,{size:18})}),(0,$.jsxs)(`div`,{className:`agent-activity-copy`,children:[(0,$.jsxs)(`div`,{className:`agent-activity-title`,role:`status`,"aria-live":`polite`,"aria-atomic":`true`,children:[(0,$.jsx)(bc,{initial:!1,mode:`wait`,children:(0,$.jsx)(mu.strong,{initial:{opacity:0,y:r?0:3},animate:{opacity:1,y:0},exit:{opacity:0},transition:{duration:r?0:.12},"data-testid":`agent-activity-label`,children:c.label},c.label)}),c.parallel>1&&c.live&&(0,$.jsxs)(`span`,{className:`activity-parallel`,children:[`Параллельно: `,c.parallel]})]}),c.detail&&(0,$.jsx)(`span`,{className:`agent-activity-detail`,"data-testid":`agent-activity-detail`,title:c.detail,children:c.detail})]})]}),e.activities.length>0&&(0,$.jsxs)(`details`,{className:`activity-history`,ref:s,children:[(0,$.jsxs)(`summary`,{"data-testid":`activity-history-toggle`,children:[`Действия `,(0,$.jsx)(`span`,{children:e.activities.length}),(0,$.jsx)(i,{size:14})]}),(0,$.jsxs)(`div`,{className:`activity-history-panel`,children:[(0,$.jsxs)(`div`,{className:`activity-history-heading`,children:[(0,$.jsx)(`strong`,{children:`Последние действия`}),(0,$.jsx)(`span`,{children:`В порядке выполнения`})]}),(0,$.jsx)(`ol`,{"data-testid":`activity-history-list`,children:e.activities.map(e=>{let t=Cu[e.kind],n=g(e.detail);return(0,$.jsxs)(`li`,{"data-status":e.status,children:[(0,$.jsx)(t,{size:15,"aria-hidden":`true`}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`strong`,{children:_[e.kind]}),n&&(0,$.jsx)(`p`,{children:n}),(0,$.jsx)(`small`,{children:wu[e.status]})]}),(0,$.jsx)(`time`,{dateTime:e.createdAt,children:new Date(e.createdAt).toLocaleTimeString(`ru-RU`,{hour:`2-digit`,minute:`2-digit`})})]},e.id)})})]})]})]})}export{Tu as AgentActivityStrip};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e,o as t,r as n}from"./IconBase.es-Bvh5HoVq.js";import{i as r,n as i,o as a,r as o,t as s}from"./ui-CVc6Nw0y.js";import{i as ee,t as c}from"./AssetMediaPreview-Cqs-ltSx.js";import{t as l}from"./ArrowRight.es-rFSWI60-.js";import{t as u}from"./ArrowUpRight.es-9AGQAwc-.js";import{t as d}from"./Check.es-C6V98Gx8.js";import{t as te}from"./CheckCircle.es-CAQfdit1.js";import{t as ne}from"./MagnifyingGlass.es-DAAoXLM5.js";import{t as re}from"./UploadSimple.es-DIzZ2Med.js";import{t as ie}from"./WarningCircle.es-DeosDn7W.js";import{O as ae,R as oe,S as f,k as se}from"./index-IRbQKmkO.js";var p=t(n(),1),m=e();function h(e){if(e.choice?.kind===`skip`)return!e.required;if(e.choice?.kind===`upload`)return!0;let t=e.choice;return t?.kind===`candidate`&&e.candidates.some(e=>e.id===t.candidateId&&e.asset.importMode===`automatic`)}function g(e){if(e)try{let t=new URL(e,`http://localhost`);return[`http:`,`https:`].includes(t.protocol)?e:void 0}catch{return}}var ce={searching:`Ищем варианты`,ready:`Выберите вариант`,importing:`Импортируем`,imported:`В проекте`,skipped:`Пропущено`,failed:`Нужен повтор`};function _({open:e,onOpenChange:t,workspace:n,request:g,onRefresh:_,onPlan:v,journal:ue,events:de=[]}){let y=n.assetSelection&&(!g||g.planId!==n.assetSelection.planId||n.assetSelection.createdAt>=g.startedAt)?n.assetSelection:void 0,[b,x]=(0,p.useState)(``),[S,C]=(0,p.useState)(``),[w,T]=(0,p.useState)(``),[E,D]=(0,p.useState)(``),[O,k]=(0,p.useState)(null),[A,j]=(0,p.useState)(``),[M,N]=(0,p.useState)(``),[fe,P]=(0,p.useState)(``),[F,I]=(0,p.useState)(``),[L,R]=(0,p.useState)(!1),[z,B]=(0,p.useState)(!1),[pe,V]=(0,p.useState)(),H=(0,p.useRef)(null),U=(0,p.useRef)(0);(0,p.useEffect)(()=>(x(``),D(``),T(``),R(!1),()=>{U.current++,H.current?.abort()}),[n.project.id,y?.id]);let me=n.plans.toSorted((e,t)=>t.version-e.version)[0],W=!!y&&(y.planId!==me?.id||n.planNeedsUpdate===!0),G=W||!!y?.confirmationRequestedAt||y?.status===`confirmed`||y?.status===`cancelled`,K=y?.needs.find(e=>e.id===b)??(b===`summary`?void 0:y?.needs.find(e=>!h(e))??y?.needs[0]);(0,p.useEffect)(()=>{!b&&y?.needs.length&&x(y.needs.find(e=>!h(e))?.id??y.needs[0].id)},[b,y?.id,y?.needs[0]?.id]),(0,p.useEffect)(()=>{C(K?.query??``),k(null),j(``),N(``),P(``),I(``),R(!1)},[K?.id]);let he=`/projects/${n.project.id}/asset-selection`,q=y?`${he}/${y.id}`:he,J=async(e,t,n={},r=`POST`)=>{let i=++U.current;T(e),D(``);try{await ae(t,r,n),await _()}catch(e){i===U.current&&(D(se(e)),await _().catch(()=>{}))}finally{i===U.current&&T(``)}},ge=e=>K&&y&&void J(`Сохраняем выбор`,`${q}/needs/${K.id}`,{revision:y.revision,choice:{kind:`candidate`,candidateId:e}},`PATCH`),_e=e=>{if(e.preventDefault(),!O||!K||!y||w)return;let t=new FormData;t.append(`revision`,String(y.revision)),A.trim()&&t.append(`sourceUrl`,A.trim()),t.append(`license`,M),t.append(`author`,fe),F.trim()&&t.append(`licenseUrl`,F.trim()),z&&K.choice?.kind===`candidate`&&t.append(`candidateId`,K.choice.candidateId),t.append(`file`,O),T(`Загружаем выбранный файл`),D(``),V(void 0);let n=new XMLHttpRequest;H.current=n,n.open(`POST`,`/api/v1${q}/needs/${K.id}/upload`),n.upload.onprogress=e=>{e.lengthComputable&&V(e.loaded/e.total*100)},n.onerror=()=>{T(``),D(`Не удалось загрузить файл. Выбор сохранён; повторите загрузку.`)},n.onabort=()=>{H.current=null},n.onload=()=>{(async()=>{try{let e=JSON.parse(n.responseText);if(n.status<200||n.status>=300)throw Error(e.message??`Ошибка загрузки`);await _(),R(!1),k(null)}catch(e){D(se(e))}finally{T(``),V(void 0),H.current=null}})()},n.send(t)},Y=y?.needs.filter(e=>!h(e))??[],X=y?.status===`discovering`||y?.needs.some(e=>e.status===`searching`),Z=b===`summary`||y?.needs.length===0&&!X,ve=y?.needs.filter(e=>e.status===`imported`).length??0,Q=de.findLast(e=>e.projectId===n.project.id&&e.type===`asset.progress`&&y&&e.payload.selectionId===y.id)?.payload,ye=Q?.total&&Q.downloaded!==void 0?Q.downloaded/Q.total*100:void 0,be=!y||G||!!w||!!X||Y.length>0||y.status===`failed`,$=K?.choice?.kind===`candidate`?K.candidates.find(e=>e.id===K.choice.candidateId):void 0;return(0,p.useEffect)(()=>{R(!1),k(null),B(!1)},[$?.id]),(0,m.jsx)(r,{open:e,onOpenChange:e=>{H.current||t(e)},title:`Подберём ассеты для игры`,description:`Задачи готовятся параллельно. Выберите материалы, проверьте итог и подтвердите набор перед разработкой.`,wide:!0,children:(0,m.jsxs)(`div`,{className:`asset-selection-wizard`,"data-testid":`asset-selection-wizard`,"data-status":y?.status??`pending`,children:[ue,E&&(0,m.jsx)(s,{children:E}),W&&(0,m.jsx)(s,{children:`План изменился. Откройте актуальную версию и утвердите её, чтобы подобрать подходящие ассеты.`}),y?(0,m.jsxs)(m.Fragment,{children:[(0,m.jsxs)(`div`,{className:`selection-status-line`,children:[(0,m.jsx)(`span`,{className:`badge`,children:n.assetReadiness?.tasksReady?`Задачи готовы`:`Готовим задачи`}),(0,m.jsx)(`span`,{children:y.status===`confirmed`?`В проекте: ${ve}`:y.confirmationRequestedAt?`Набор подтверждён · ждём готовности задач и импорта`:`Выбрано ${y.needs.length-Y.length} из ${y.needs.length}`})]}),y.error&&(0,m.jsx)(s,{children:y.error}),(y.status===`failed`||y.status===`cancelled`)&&!W&&(0,m.jsxs)(`div`,{className:`selection-recovery`,children:[(0,m.jsx)(`span`,{children:y.status===`cancelled`?`Подбор остановлен. Сохранённые материалы доступны после повтора.`:`Повторите незавершённый поиск или импорт.`}),(0,m.jsxs)(i,{busy:!!w,"data-testid":`selection-retry`,onClick:()=>void J(`Возобновляем подбор`,`${q}/retry`),children:[(0,m.jsx)(ee,{size:16}),`Повторить`]})]}),X&&(0,m.jsx)(a,{label:`Ищем материалы по плану`,detail:`Покажем доступные варианты по мере получения. Их количество зависит от источников.`}),(0,m.jsxs)(`div`,{className:`selection-layout`,children:[(0,m.jsxs)(`nav`,{className:`selection-needs`,"aria-label":`Потребности в ассетах`,children:[y.needs.map((e,t)=>(0,m.jsxs)(`button`,{type:`button`,className:K?.id===e.id&&!Z?`active`:``,onClick:()=>x(e.id),"data-testid":`asset-need-${t}`,"aria-current":K?.id===e.id&&!Z?`step`:void 0,children:[(0,m.jsx)(`span`,{className:`selection-need-number`,children:h(e)?(0,m.jsx)(d,{size:15}):String(t+1).padStart(2,`0`)}),(0,m.jsxs)(`span`,{children:[(0,m.jsx)(`strong`,{children:e.title}),(0,m.jsxs)(`small`,{children:[e.required?`Обязательно`:`По желанию`,` · `,e.choice&&e.status===`ready`?`Выбрано`:ce[e.status]]})]})]},e.id)),(0,m.jsxs)(`button`,{type:`button`,onClick:()=>x(`summary`),className:Z?`active`:``,"data-testid":`selection-summary`,children:[(0,m.jsx)(te,{size:18}),(0,m.jsxs)(`span`,{children:[(0,m.jsx)(`strong`,{children:`Итоговый набор`}),(0,m.jsx)(`small`,{children:`Проверка перед разработкой`})]})]})]}),(0,m.jsx)(`div`,{className:`selection-content`,children:Z?(0,m.jsxs)(`section`,{className:`selection-summary-panel`,children:[(0,m.jsx)(`div`,{className:`eyebrow`,children:`ВАШ ВЫБОР`}),(0,m.jsx)(`h3`,{children:`Материалы для утверждённого плана`}),y.needs.length===0?(0,m.jsx)(`p`,{children:`Для этого плана дополнительные ассеты не нужны. Подтвердите пустой набор, чтобы продолжить подготовку и разработку.`}):(0,m.jsx)(`ul`,{children:y.needs.map(e=>(0,m.jsxs)(`li`,{children:[(0,m.jsxs)(`div`,{children:[(0,m.jsx)(`strong`,{children:e.title}),(0,m.jsx)(`small`,{children:e.choice?.kind===`skip`?`Пропущено по вашему выбору`:e.importedAsset?.name??(e.choice?.kind===`upload`?e.choice.asset.name:e.candidates.find(t=>e.choice?.kind===`candidate`&&t.id===e.choice.candidateId)?.asset.name)??`Ещё не выбрано`})]}),(0,m.jsx)(`span`,{className:`badge ${h(e)?`badge-success`:``}`,children:e.status===`imported`?`В проекте`:h(e)?`Готово`:`Нужен выбор`})]},e.id))}),Y.length>0&&(0,m.jsxs)(`p`,{className:`selection-summary-note`,children:[`Осталось завершить выбор: `,Y.length,`. Необязательные материалы можно пропустить.`]}),(0,m.jsx)(`p`,{className:`selection-summary-note`,children:`Файлы попадут в проект после подтверждения набора и готовности задач. Затем агент начнёт реализацию утверждённого плана.`})]}):K?(0,m.jsxs)(`section`,{children:[(0,m.jsxs)(`div`,{className:`selection-need-heading`,children:[(0,m.jsxs)(`div`,{children:[(0,m.jsxs)(`div`,{className:`eyebrow`,children:[K.type,` · `,K.required?`ОБЯЗАТЕЛЬНЫЙ МАТЕРИАЛ`:`ПО ЖЕЛАНИЮ`]}),(0,m.jsx)(`h3`,{children:(0,m.jsx)(f,{id:`selection:${y.id}:${K.id}:title`,children:K.title})}),(0,m.jsx)(`p`,{children:(0,m.jsx)(f,{id:`selection:${y.id}:${K.id}:rationale`,children:K.rationale})})]}),!K.required&&(0,m.jsx)(i,{disabled:G||!!w,"data-testid":`selection-skip`,onClick:()=>void J(`Сохраняем пропуск`,`${q}/needs/${K.id}`,{revision:y.revision,choice:{kind:`skip`}},`PATCH`),children:`Пропустить`})]}),K.warnings?.map((e,t)=>(0,m.jsxs)(`p`,{className:`selection-provider-warning`,children:[(0,m.jsx)(ie,{size:15}),e]},t)),K.error&&(0,m.jsx)(s,{children:K.error}),(0,m.jsxs)(`form`,{className:`selection-query`,onSubmit:e=>{e.preventDefault(),J(`Ищем другие варианты`,`${q}/needs/${K.id}/search`,{revision:y.revision,query:S.trim()})},children:[(0,m.jsx)(`label`,{className:`sr-only`,htmlFor:`selection-query`,children:`Поисковый запрос`}),(0,m.jsx)(ne,{size:18}),(0,m.jsx)(`input`,{id:`selection-query`,value:S,onChange:e=>C(e.target.value),disabled:G||!!w}),(0,m.jsx)(i,{type:`submit`,disabled:G||!!w||!S.trim(),"data-testid":`selection-search`,children:`Найти другие`})]}),(0,m.jsx)(`div`,{className:`selection-candidates`,children:K.candidates.map((e,t)=>(0,m.jsx)(le,{asset:e.asset,reason:e.reason,generatedId:`selection:${y.id}:${K.id}:candidate:${e.id}`,selected:K.choice?.kind===`candidate`&&K.choice.candidateId===e.id,disabled:G||!!w||K.status===`searching`,onChoose:()=>ge(e.id),testId:`asset-option-${t}`},e.id))}),!K.candidates.length&&K.status!==`searching`&&(0,m.jsx)(o,{icon:(0,m.jsx)(oe,{size:26}),title:`Подходящих вариантов пока нет`,children:`Измените запрос или добавьте файл, который уже выбрали сами.`}),$?.asset.importMode===`manual`&&(0,m.jsxs)(`div`,{className:`selection-manual-note`,children:[(0,m.jsx)(u,{size:18}),(0,m.jsx)(`span`,{children:`Этот источник требует скачивания вручную. Откройте страницу, скачайте ресурс и загрузите файл ниже; одной ссылки для разработки недостаточно.`})]}),K.choice?.kind===`upload`&&(0,m.jsxs)(`div`,{className:`selection-staged-preview`,"data-testid":`staged-asset-preview`,children:[(0,m.jsxs)(s,{type:`success`,children:[`Файл «`,K.choice.asset.name,`» выбран и сохранён для импорта.`]}),(0,m.jsx)(c,{asset:K.importedAsset??K.choice.asset})]}),!G&&(0,m.jsxs)(m.Fragment,{children:[(0,m.jsxs)(i,{className:`selection-upload-toggle`,onClick:()=>{R(e=>!e),B(!!$),$&&(I($.asset.licenseUrl??``),j($.asset.sourceUrl),N($.asset.license),P($.asset.author??``))},children:[(0,m.jsx)(re,{size:17}),L?`Скрыть загрузку`:`Загрузить свой файл`]}),L&&(0,m.jsxs)(`form`,{onSubmit:_e,className:`selection-upload-form`,children:[$&&(0,m.jsxs)(`label`,{className:`agent-permission-setting`,children:[(0,m.jsx)(`input`,{type:`checkbox`,checked:z,onChange:e=>{B(e.target.checked),e.target.checked?(j($.asset.sourceUrl),N($.asset.license),P($.asset.author??``),I($.asset.licenseUrl??``)):(j(``),N(``),P(``),I(``))}}),`Это файл со страницы «`,$.asset.name,`»`]}),(0,m.jsx)(`small`,{children:z?`Будут сохранены автор и лицензия выбранного источника. Загрузите именно его файл.`:`Для своего ресурса укажите действительную лицензию. Ссылка не нужна, если источник — ваша собственная работа.`}),(0,m.jsxs)(`label`,{children:[`Файл`,(0,m.jsx)(`input`,{type:`file`,required:!0,disabled:!!w,"data-testid":`selection-file`,onChange:e=>k(e.target.files?.[0]??null)})]}),(0,m.jsxs)(`div`,{className:`form-columns`,children:[(0,m.jsxs)(`label`,{children:[`Источник`,(0,m.jsx)(`input`,{type:`url`,value:A,onChange:e=>j(e.target.value),required:M.startsWith(`CC-BY-`),disabled:z,"aria-label":`Источник загружаемого ассета`})]}),(0,m.jsxs)(`label`,{children:[`Лицензия`,(0,m.jsx)(`input`,{value:M,onChange:e=>N(e.target.value),required:!0,disabled:z,"aria-label":`Лицензия загружаемого ассета`})]})]}),(0,m.jsxs)(`div`,{className:`form-columns`,children:[(0,m.jsxs)(`label`,{children:[`Автор`,(0,m.jsx)(`input`,{value:fe,required:M.startsWith(`CC-BY-`),disabled:z,onChange:e=>P(e.target.value)})]}),(0,m.jsxs)(`label`,{children:[`Ссылка на лицензию`,(0,m.jsx)(`input`,{type:`url`,disabled:z,value:F,onChange:e=>I(e.target.value)})]})]}),(0,m.jsx)(i,{type:`submit`,disabled:!O||!!w,"data-testid":`selection-upload`,children:`Загрузить и выбрать`})]})]})]},K.id):null})]}),w&&(0,m.jsx)(a,{label:w,value:pe}),y.status===`importing`&&(0,m.jsx)(a,{label:`Импортируем выбранные ассеты`,value:ye,detail:Q?.file??`Готово материалов: ${ve} из ${y.needs.filter(e=>e.choice?.kind!==`skip`).length}`}),(0,m.jsxs)(`div`,{className:`selection-footer`,children:[(0,m.jsxs)(`div`,{children:[W?(0,m.jsx)(i,{onClick:v,children:`Открыть актуальный план`}):(!G||y.status===`importing`||!!y.confirmationRequestedAt)&&y.status!==`confirmed`&&y.status!==`cancelled`&&(0,m.jsx)(i,{tone:`ghost`,disabled:!!w,onClick:()=>void J(`Останавливаем подбор`,`${q}/cancel`),"data-testid":`selection-cancel`,children:`Остановить подбор`}),(0,m.jsx)(`small`,{children:`Выбор сохранён. Окно можно закрыть и открыть снова.`})]}),!Z&&!G?(0,m.jsxs)(i,{tone:`primary`,onClick:()=>x(`summary`),"data-testid":`selection-review`,children:[`Проверить набор `,(0,m.jsx)(l,{size:16})]}):y.status===`confirmed`?(0,m.jsxs)(i,{tone:`primary`,onClick:()=>t(!1),children:[`Вернуться к проекту `,(0,m.jsx)(l,{size:16})]}):(0,m.jsxs)(i,{tone:`primary`,disabled:be,"data-testid":`selection-confirm`,onClick:()=>void J(`Подтверждаем набор`,`${q}/confirm`,{revision:y.revision}),children:[y.confirmationRequestedAt?`Набор подтверждён`:`Подтвердить набор и продолжить`,(0,m.jsx)(l,{size:16})]})]})]}):(0,m.jsx)(`div`,{className:`selection-pending`,children:g?.status===`failed`?(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(s,{children:g.error??`Не удалось утвердить план.`}),(0,m.jsx)(i,{onClick:v,children:`Вернуться к плану`})]}):(0,m.jsx)(a,{label:g?.status===`pending`?`Подтверждаем план`:`Определяем, какие ассеты нужны`,detail:`Ваш выбор появится здесь; разработка дождётся подтверждения набора.`})})]})})}function le({asset:e,reason:t,generatedId:n,selected:r,disabled:a,onChoose:o,testId:s}){return(0,m.jsxs)(`article`,{className:`selection-option ${r?`selected`:``}`,"data-testid":s,children:[(0,m.jsxs)(`div`,{className:`selection-media-wrap`,children:[(0,m.jsx)(c,{asset:e,compact:!0}),r&&(0,m.jsxs)(`span`,{className:`selection-chosen`,children:[(0,m.jsx)(d,{size:13}),`Выбрано`]})]}),(0,m.jsxs)(`div`,{className:`selection-option-copy`,children:[(0,m.jsx)(`small`,{children:e.provider}),(0,m.jsx)(`h4`,{children:e.name}),(0,m.jsx)(`p`,{children:(0,m.jsx)(f,{id:n,children:t})}),(0,m.jsxs)(`div`,{className:`selection-asset-meta`,children:[(0,m.jsx)(`span`,{children:e.license}),(0,m.jsx)(`span`,{children:e.formats?.join(` · `)||`Формат указан на странице`})]}),e.author&&(0,m.jsxs)(`small`,{children:[`Автор: `,e.author]}),e.attribution&&(0,m.jsx)(`small`,{children:e.attribution}),g(e.licenseUrl)&&(0,m.jsxs)(`a`,{className:`selection-license-link`,href:g(e.licenseUrl),target:`_blank`,rel:`noopener noreferrer`,children:[`Условия лицензии `,(0,m.jsx)(u,{size:12})]}),(0,m.jsxs)(`div`,{className:`selection-option-actions`,children:[g(e.sourceUrl)&&(0,m.jsxs)(`a`,{href:g(e.sourceUrl),target:`_blank`,rel:`noopener noreferrer`,children:[`Источник `,(0,m.jsx)(u,{size:13})]}),(0,m.jsx)(i,{disabled:a,"aria-pressed":r,onClick:o,children:r?`Выбран`:`Выбрать`})]})]})]})}export{_ as AssetSelectionWizard};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{o as e,r as t,t as n}from"./IconBase.es-Bvh5HoVq.js";var r=e(t(),1),i=new Map([[`bold`,r.createElement(r.Fragment,null,r.createElement(`path`,{d:`M232.49,80.49l-128,128a12,12,0,0,1-17,0l-56-56a12,12,0,1,1,17-17L96,183,215.51,63.51a12,12,0,0,1,17,17Z`}))],[`duotone`,r.createElement(r.Fragment,null,r.createElement(`path`,{d:`M232,56V200a16,16,0,0,1-16,16H40a16,16,0,0,1-16-16V56A16,16,0,0,1,40,40H216A16,16,0,0,1,232,56Z`,opacity:`0.2`}),r.createElement(`path`,{d:`M205.66,85.66l-96,96a8,8,0,0,1-11.32,0l-40-40a8,8,0,0,1,11.32-11.32L104,164.69l90.34-90.35a8,8,0,0,1,11.32,11.32Z`}))],[`fill`,r.createElement(r.Fragment,null,r.createElement(`path`,{d:`M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40ZM205.66,85.66l-96,96a8,8,0,0,1-11.32,0l-40-40a8,8,0,0,1,11.32-11.32L104,164.69l90.34-90.35a8,8,0,0,1,11.32,11.32Z`}))],[`light`,r.createElement(r.Fragment,null,r.createElement(`path`,{d:`M228.24,76.24l-128,128a6,6,0,0,1-8.48,0l-56-56a6,6,0,0,1,8.48-8.48L96,191.51,219.76,67.76a6,6,0,0,1,8.48,8.48Z`}))],[`regular`,r.createElement(r.Fragment,null,r.createElement(`path`,{d:`M229.66,77.66l-128,128a8,8,0,0,1-11.32,0l-56-56a8,8,0,0,1,11.32-11.32L96,188.69,218.34,66.34a8,8,0,0,1,11.32,11.32Z`}))],[`thin`,r.createElement(r.Fragment,null,r.createElement(`path`,{d:`M226.83,74.83l-128,128a4,4,0,0,1-5.66,0l-56-56a4,4,0,0,1,5.66-5.66L96,194.34,221.17,69.17a4,4,0,1,1,5.66,5.66Z`}))]]),a=r.forwardRef((e,t)=>r.createElement(n,{ref:t,...e,weights:i}));a.displayName=`CheckIcon`;var o=a;export{o as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e,o as t,r as n,t as r}from"./IconBase.es-Bvh5HoVq.js";import{n as i}from"./ui-CVc6Nw0y.js";import{O as a,c as o,k as s,m as c}from"./index-IRbQKmkO.js";var l=t(n(),1),u=new Map([[`bold`,l.createElement(l.Fragment,null,l.createElement(`path`,{d:`M208,36H48A20,20,0,0,0,28,56v56c0,54.29,26.32,87.22,48.4,105.29,23.71,19.39,47.44,26,48.44,26.29a12.1,12.1,0,0,0,6.32,0c1-.28,24.73-6.9,48.44-26.29,22.08-18.07,48.4-51,48.4-105.29V56A20,20,0,0,0,208,36Zm-4,76c0,35.71-13.09,64.69-38.91,86.15A126.28,126.28,0,0,1,128,219.38a126.14,126.14,0,0,1-37.09-21.23C65.09,176.69,52,147.71,52,112V60H204ZM79.51,144.49a12,12,0,1,1,17-17L112,143l47.51-47.52a12,12,0,0,1,17,17l-56,56a12,12,0,0,1-17,0Z`}))],[`duotone`,l.createElement(l.Fragment,null,l.createElement(`path`,{d:`M216,56v56c0,96-88,120-88,120S40,208,40,112V56a8,8,0,0,1,8-8H208A8,8,0,0,1,216,56Z`,opacity:`0.2`}),l.createElement(`path`,{d:`M208,40H48A16,16,0,0,0,32,56v56c0,52.72,25.52,84.67,46.93,102.19,23.06,18.86,46,25.26,47,25.53a8,8,0,0,0,4.2,0c1-.27,23.91-6.67,47-25.53C198.48,196.67,224,164.72,224,112V56A16,16,0,0,0,208,40Zm0,72c0,37.07-13.66,67.16-40.6,89.42A129.3,129.3,0,0,1,128,223.62a128.25,128.25,0,0,1-38.92-21.81C61.82,179.51,48,149.3,48,112l0-56,160,0ZM82.34,141.66a8,8,0,0,1,11.32-11.32L112,148.69l50.34-50.35a8,8,0,0,1,11.32,11.32l-56,56a8,8,0,0,1-11.32,0Z`}))],[`fill`,l.createElement(l.Fragment,null,l.createElement(`path`,{d:`M208,40H48A16,16,0,0,0,32,56v56c0,52.72,25.52,84.67,46.93,102.19,23.06,18.86,46,25.26,47,25.53a8,8,0,0,0,4.2,0c1-.27,23.91-6.67,47-25.53C198.48,196.67,224,164.72,224,112V56A16,16,0,0,0,208,40Zm-34.32,69.66-56,56a8,8,0,0,1-11.32,0l-24-24a8,8,0,0,1,11.32-11.32L112,148.69l50.34-50.35a8,8,0,0,1,11.32,11.32Z`}))],[`light`,l.createElement(l.Fragment,null,l.createElement(`path`,{d:`M208,42H48A14,14,0,0,0,34,56v56c0,51.94,25.12,83.4,46.2,100.64,22.73,18.6,45.27,24.89,46.22,25.15a6,6,0,0,0,3.16,0c.95-.26,23.49-6.55,46.22-25.15C196.88,195.4,222,163.94,222,112V56A14,14,0,0,0,208,42Zm2,70c0,37.76-13.94,68.39-41.44,91.06A131.17,131.17,0,0,1,128,225.72a130.94,130.94,0,0,1-40.56-22.66C59.94,180.39,46,149.76,46,112V56a2,2,0,0,1,2-2H208a2,2,0,0,1,2,2ZM172.24,99.76a6,6,0,0,1,0,8.48l-56,56a6,6,0,0,1-8.48,0l-24-24a6,6,0,0,1,8.48-8.48L112,151.51l51.76-51.75A6,6,0,0,1,172.24,99.76Z`}))],[`regular`,l.createElement(l.Fragment,null,l.createElement(`path`,{d:`M208,40H48A16,16,0,0,0,32,56v56c0,52.72,25.52,84.67,46.93,102.19,23.06,18.86,46,25.26,47,25.53a8,8,0,0,0,4.2,0c1-.27,23.91-6.67,47-25.53C198.48,196.67,224,164.72,224,112V56A16,16,0,0,0,208,40Zm0,72c0,37.07-13.66,67.16-40.6,89.42A129.3,129.3,0,0,1,128,223.62a128.25,128.25,0,0,1-38.92-21.81C61.82,179.51,48,149.3,48,112l0-56,160,0ZM82.34,141.66a8,8,0,0,1,11.32-11.32L112,148.69l50.34-50.35a8,8,0,0,1,11.32,11.32l-56,56a8,8,0,0,1-11.32,0Z`}))],[`thin`,l.createElement(l.Fragment,null,l.createElement(`path`,{d:`M208,44H48A12,12,0,0,0,36,56v56c0,51.16,24.73,82.12,45.47,99.1,22.4,18.32,44.55,24.5,45.48,24.76a4,4,0,0,0,2.1,0c.93-.26,23.08-6.44,45.48-24.76,20.74-17,45.47-47.94,45.47-99.1V56A12,12,0,0,0,208,44Zm4,68c0,38.44-14.23,69.63-42.29,92.71A132.45,132.45,0,0,1,128,227.82a132.23,132.23,0,0,1-41.71-23.11C58.23,181.63,44,150.44,44,112V56a4,4,0,0,1,4-4H208a4,4,0,0,1,4,4Zm-41.17-10.83a4,4,0,0,1,0,5.66l-56,56a4,4,0,0,1-5.66,0l-24-24a4,4,0,0,1,5.66-5.66L112,154.34l53.17-53.17A4,4,0,0,1,170.83,101.17Z`}))]]),d=new Map([[`bold`,l.createElement(l.Fragment,null,l.createElement(`path`,{d:`M196,136a16,16,0,1,1-16-16A16,16,0,0,1,196,136Zm40-36v80a32,32,0,0,1-32,32H60a32,32,0,0,1-32-32V60.92A32,32,0,0,1,60,28H192a12,12,0,0,1,0,24H60a8,8,0,0,0-8,8.26v.08A8.32,8.32,0,0,0,60.48,68H204A32,32,0,0,1,236,100Zm-24,0a8,8,0,0,0-8-8H60.48A33.72,33.72,0,0,1,52,90.92V180a8,8,0,0,0,8,8H204a8,8,0,0,0,8-8Z`}))],[`duotone`,l.createElement(l.Fragment,null,l.createElement(`path`,{d:`M224,80V192a8,8,0,0,1-8,8H56a16,16,0,0,1-16-16V56A16,16,0,0,0,56,72H216A8,8,0,0,1,224,80Z`,opacity:`0.2`}),l.createElement(`path`,{d:`M216,64H56a8,8,0,0,1,0-16H192a8,8,0,0,0,0-16H56A24,24,0,0,0,32,56V184a24,24,0,0,0,24,24H216a16,16,0,0,0,16-16V80A16,16,0,0,0,216,64Zm0,128H56a8,8,0,0,1-8-8V78.63A23.84,23.84,0,0,0,56,80H216Zm-48-60a12,12,0,1,1,12,12A12,12,0,0,1,168,132Z`}))],[`fill`,l.createElement(l.Fragment,null,l.createElement(`path`,{d:`M216,64H56a8,8,0,0,1,0-16H192a8,8,0,0,0,0-16H56A24,24,0,0,0,32,56V184a24,24,0,0,0,24,24H216a16,16,0,0,0,16-16V80A16,16,0,0,0,216,64Zm-36,80a12,12,0,1,1,12-12A12,12,0,0,1,180,144Z`}))],[`light`,l.createElement(l.Fragment,null,l.createElement(`path`,{d:`M216,66H56a10,10,0,0,1,0-20H192a6,6,0,0,0,0-12H56A22,22,0,0,0,34,56V184a22,22,0,0,0,22,22H216a14,14,0,0,0,14-14V80A14,14,0,0,0,216,66Zm2,126a2,2,0,0,1-2,2H56a10,10,0,0,1-10-10V75.59A21.84,21.84,0,0,0,56,78H216a2,2,0,0,1,2,2Zm-28-60a10,10,0,1,1-10-10A10,10,0,0,1,190,132Z`}))],[`regular`,l.createElement(l.Fragment,null,l.createElement(`path`,{d:`M216,64H56a8,8,0,0,1,0-16H192a8,8,0,0,0,0-16H56A24,24,0,0,0,32,56V184a24,24,0,0,0,24,24H216a16,16,0,0,0,16-16V80A16,16,0,0,0,216,64Zm0,128H56a8,8,0,0,1-8-8V78.63A23.84,23.84,0,0,0,56,80H216Zm-48-60a12,12,0,1,1,12,12A12,12,0,0,1,168,132Z`}))],[`thin`,l.createElement(l.Fragment,null,l.createElement(`path`,{d:`M216,68H56a12,12,0,0,1,0-24H192a4,4,0,0,0,0-8H56A20,20,0,0,0,36,56V184a20,20,0,0,0,20,20H216a12,12,0,0,0,12-12V80A12,12,0,0,0,216,68Zm4,124a4,4,0,0,1-4,4H56a12,12,0,0,1-12-12V72a19.86,19.86,0,0,0,12,4H216a4,4,0,0,1,4,4Zm-32-60a8,8,0,1,1-8-8A8,8,0,0,1,188,132Z`}))]]),f=l.forwardRef((e,t)=>l.createElement(r,{ref:t,...e,weights:u}));f.displayName=`ShieldCheckIcon`;var p=f,m=l.forwardRef((e,t)=>l.createElement(r,{ref:t,...e,weights:d}));m.displayName=`WalletIcon`;var h=m,g=e(),_=e=>e===void 0?`—`:e.toLocaleString(`ru-RU`),v=(e,t)=>!Number.isFinite(e)||!Number.isFinite(t)?void 0:t<=0?0:Math.min(100,Math.max(0,e/t*100)),y=e=>e===void 0?`—`:e>0&&e<1?`<1%`:e>99&&e<100?`>99%`:`${e.toLocaleString(o()===`en`?`en-US`:`ru-RU`,{maximumFractionDigits:1})}%`,b=e=>e?new Date(e).toLocaleString(o()===`en`?`en-US`:`ru-RU`):`—`;function x({modern:e=!1}){let[t,n]=(0,l.useState)(),[r,o]=(0,l.useState)(`https://umgt.aircoding.ai`),[u,d]=(0,l.useState)(``),[f,m]=(0,l.useState)(``),[x,S]=(0,l.useState)(!1),[C,w]=(0,l.useState)(),T=(0,l.useRef)(0),E=async()=>{let e=++T.current,t=await a(`/core`);e===T.current&&(n(t),o(t.url||`https://umgt.aircoding.ai`))};(0,l.useEffect)(()=>{let e=()=>{E().catch(e=>m(s(e)))},t=()=>{T.current++,n(void 0),w(void 0),d(``),e()};return e(),window.addEventListener(`umgt-usage-changed`,e),window.addEventListener(`umgt-account-changed`,t),()=>{T.current++,window.removeEventListener(`umgt-usage-changed`,e),window.removeEventListener(`umgt-account-changed`,t)}},[]);let D=async e=>{S(!0),m(``);try{await e(),await E(),window.dispatchEvent(new Event(`umgt-account-updated`))}catch(e){m(s(e))}finally{S(!1)}},O=async e=>{e.preventDefault(),await D(async()=>{await a(`/core/connect`,`POST`,{url:r,key:u}),n(void 0),d(``),w(void 0),window.dispatchEvent(new Event(`umgt-account-changed`))})},k=t?.entitlements,A=k?.ai_budget;return(0,g.jsxs)(`section`,{className:`settings-section core-account ${e?`core-account-modern`:``}`,"aria-label":`Подписка и доступ`,children:[(0,g.jsxs)(`div`,{className:`settings-description`,children:[(0,g.jsx)(`h2`,{children:`Подписка и доступ`}),(0,g.jsx)(`p`,{children:`Подключите аккаунт UMGT для работы AI. Проекты и инструменты остаются на вашем компьютере.`})]}),(0,g.jsxs)(`div`,{className:`settings-fields`,children:[f&&(0,g.jsx)(`p`,{role:`alert`,children:f}),!t?.connected&&(0,g.jsx)(`p`,{children:`Скопируйте личный API-ключ в кабинете game.aircoding.ai и вставьте его ниже. После подключения появятся баланс, подписка и остатки лимитов.`}),t?.connected&&t.profile&&(0,g.jsxs)(`div`,{className:`core-account-profile`,children:[(0,g.jsx)(c,{profile:t.profile}),(0,g.jsxs)(`div`,{children:[(0,g.jsx)(`h3`,{children:t.profile.name||`Аккаунт UMGT`}),(0,g.jsx)(`p`,{children:`Профиль личного кабинета`})]})]}),k&&(0,g.jsxs)(g.Fragment,{children:[e?(0,g.jsxs)(g.Fragment,{children:[(0,g.jsxs)(`div`,{className:`core-membership ${k.subscription?.active?`active`:``}`,children:[(0,g.jsx)(`span`,{className:`core-card-icon`,children:(0,g.jsx)(p,{size:32,weight:`duotone`})}),(0,g.jsxs)(`div`,{children:[(0,g.jsx)(`h3`,{children:k.subscription?.active?`Подписка активна`:`Подписка не активна`}),(0,g.jsx)(`p`,{children:k.subscription?.active?`Действует до ${b(k.subscription?.until)}`:`Оформи подписку или увеличь доступный лимит.`})]}),(0,g.jsx)(`span`,{className:`core-membership-badge`,children:k.subscription?.active?`Подключено`:`Без подписки`})]}),(0,g.jsx)(`dl`,{className:`core-metrics`,children:(0,g.jsxs)(`div`,{className:`core-metric core-metric-balance`,children:[(0,g.jsxs)(`dt`,{children:[(0,g.jsx)(h,{size:25,weight:`duotone`}),`Баланс`]}),(0,g.jsxs)(`dd`,{children:[_(k.balance_kop===void 0?void 0:k.balance_kop/100),` `,(0,g.jsx)(`span`,{children:`₽`})]}),(0,g.jsx)(`small`,{children:`Для генерации 3D и других услуг`})]})})]}):(0,g.jsxs)(`dl`,{className:`core-account-summary`,children:[(0,g.jsx)(`dt`,{children:`Подписка`}),(0,g.jsx)(`dd`,{children:k.subscription?.active?`Действует`:`Не активна`}),(0,g.jsx)(`dt`,{children:`Действует до`}),(0,g.jsx)(`dd`,{children:b(k.subscription?.until)}),(0,g.jsx)(`dt`,{children:`Баланс`}),(0,g.jsxs)(`dd`,{children:[_(k.balance_kop===void 0?void 0:k.balance_kop/100),` `,`₽`]})]}),A&&A.status!==`active`&&(0,g.jsx)(`p`,{role:`status`,children:A.message||`Лимиты подписки временно недоступны.`}),A?.status===`active`&&(0,g.jsx)(`p`,{className:`core-budget-description`,children:`Лимиты подписки обновляются по московскому времени.`}),(0,g.jsx)(`div`,{className:`core-account-periods ${A?.status===`active`?`core-account-periods-three`:``}`,children:(A?A.status===`active`?[`monthly`,`weekly`,`daily`]:[]:[`daily`,`weekly`]).map(t=>{let n=A?A[t]:t===`monthly`?void 0:k.limits?.[t],r=!!n?.pending_costs&&n.left>0,i=n?v(n.left,n.limit):void 0,a=i!==void 0&&i<=10?`critical`:i!==void 0&&i<=20?`warning`:`normal`,o=i===0?`Лимит исчерпан`:a===`critical`?`Критически мало доступного лимита`:a===`warning`?`Лимит заканчивается`:``;return n&&(e?(0,g.jsxs)(`section`,{className:`core-limit`,"data-level":a,"aria-label":t===`daily`?`Дневной лимит`:t===`weekly`?`Недельный лимит`:`Месячный лимит`,children:[(0,g.jsx)(`div`,{className:`core-limit-heading`,children:(0,g.jsx)(`h3`,{children:t===`daily`?`За сутки`:t===`weekly`?`За неделю`:`За месяц`})}),(0,g.jsxs)(`p`,{className:`core-limit-count`,children:[(0,g.jsx)(`span`,{children:`Осталось`}),(0,g.jsxs)(`b`,{children:[r?`≈`:``,y(i)]})]}),(0,g.jsx)(`progress`,{max:100,value:i,"aria-valuetext":y(i),"aria-label":t===`daily`?`Остаток дневного лимита`:t===`weekly`?`Остаток недельного лимита`:`Остаток месячного лимита`}),(0,g.jsxs)(`p`,{className:`core-limit-used`,children:[`Использовано `,r?`≈`:``,y(i===void 0?void 0:100-i)]}),o&&(0,g.jsx)(`small`,{className:`core-limit-notice`,children:o}),r&&(0,g.jsx)(`small`,{children:`Расчёт по подтверждённой стоимости. Цена части запросов пока неизвестна.`}),(0,g.jsxs)(`small`,{children:[`Обновление: `,A?new Date(n.resets_at).toLocaleString(`ru-RU`,{timeZone:`Europe/Moscow`})+` МСК`:b(n.resets_at)]})]},t):(0,g.jsxs)(`p`,{children:[t===`daily`?`За сутки`:t===`weekly`?`За неделю`:`За месяц`,`: осталось`,` `,y(i),`. Обновление:`,` `,b(n.resets_at),`.`]},t))})}),!A&&k.usage?.length?(0,g.jsxs)(`details`,{children:[(0,g.jsxs)(`summary`,{children:[`Расход за `,k.period??`месяц`]}),(0,g.jsx)(`ul`,{children:k.usage.map(e=>{let t=e.monthly_limit===null?void 0:v(e.monthly_limit-e.used_tokens,e.monthly_limit);return(0,g.jsxs)(`li`,{children:[e.service,`: `,e.monthly_limit===null?`Без ограничения`:`Осталось ${y(t)} · Использовано ${y(t===void 0?void 0:100-t)}`,`; `,_(e.spent_kop/100),` ₽`]},e.service)})})]}):null,k.courses?.length?(0,g.jsxs)(`p`,{children:[`Курсы: `,k.courses.join(`, `)]}):null,(0,g.jsx)(`div`,{className:`core-services`,children:k.access?.services?.map(e=>(0,g.jsxs)(`p`,{children:[e.name,`:`,` `,e.status===`active`?`доступен`:e.status===`disabled`?`выключен в UMGT`:`нет баланса`]},e.id))}),(0,g.jsxs)(`div`,{className:`core-account-actions`,children:[(0,g.jsx)(i,{type:`button`,disabled:x,onClick:()=>void D(async()=>{}),children:`Обновить`}),(0,g.jsx)(i,{type:`button`,disabled:x,onClick:()=>void D(async()=>w(await a(`/core/operations`))),children:`История операций`})]}),C&&(0,g.jsx)(`ul`,{className:`core-operation-history`,children:C.length?C.map(e=>(0,g.jsxs)(`li`,{children:[b(e.created_at),`: `,e.service??`game_hub`,`,`,` `,e.status,`,`,` `,_(Number(e.cost_kop??0)/100),` ₽`,e.error_code?` (${e.error_code})`:``]},e.id)):(0,g.jsx)(`li`,{children:`Операций пока нет.`})})]}),(0,g.jsxs)(`div`,{className:`core-account-links`,children:[(0,g.jsx)(`a`,{href:`https://game.aircoding.ai/app/`,target:`_blank`,rel:`noreferrer`,children:`Кабинет UMGT`}),(0,g.jsx)(`a`,{href:`https://game.aircoding.ai/app/checkout/subscription`,target:`_blank`,rel:`noreferrer`,children:`Оформить подписку`}),(0,g.jsx)(`a`,{href:`https://game.aircoding.ai/app/checkout/tokens`,target:`_blank`,rel:`noreferrer`,children:`Увеличить лимит`}),(0,g.jsx)(`a`,{href:`https://game.aircoding.ai/app/checkout/topup`,target:`_blank`,rel:`noreferrer`,children:`Пополнить баланс`})]}),(0,g.jsxs)(`form`,{onSubmit:O,className:`core-connect-form`,children:[e&&(0,g.jsx)(`h3`,{children:t?.connected?`Ключ подключения`:`Подключи свой аккаунт`}),(0,g.jsxs)(`label`,{children:[`Адрес ядра`,(0,g.jsx)(`input`,{type:`url`,required:!0,placeholder:`https://umgt.aircoding.ai`,value:r,onChange:e=>o(e.target.value),disabled:x})]}),(0,g.jsxs)(`label`,{children:[t?.connected?`Новый ключ UMGT`:`API-ключ UMGT`,(0,g.jsx)(`input`,{type:`password`,required:!0,autoComplete:`off`,placeholder:`umgt_…`,spellCheck:!1,value:u,onChange:e=>d(e.target.value),disabled:x})]}),(0,g.jsx)(`p`,{children:`Ключ передаётся ядру по защищённому соединению и не сохраняется в браузере. Работа AI расходует доступный лимит; генерация 3D оплачивается отдельно с рублёвого баланса по цене сервиса.`}),(0,g.jsx)(i,{tone:`primary`,disabled:x||!u||!r,children:t?.connected?`Заменить ключ`:`Подключить`})]}),(0,g.jsx)(i,{className:`core-account-logout`,type:`button`,disabled:x,onClick:()=>void D(async()=>{await a(`/core/logout`,`POST`,{}),n(void 0),w(void 0),d(``),window.dispatchEvent(new Event(`umgt-account-changed`))}),children:`Выйти из аккаунта Hub`})]})]})}export{x as CoreAccount};
|