HEX
Server: LiteSpeed
System: Linux server257.web-hosting.com 4.18.0-553.54.1.lve.el8.x86_64 #1 SMP Wed Jun 4 13:01:13 UTC 2025 x86_64
User: salhiscp (12590)
PHP: 8.4.12
Disabled: NONE
Upload Files
File: //proc/thread-self/cwd/wp-content/plugins/astra-sites/inc/lib/one-onboarding/build/main.js
(()=>{"use strict";var e,t,n,r={880:(e,t,n)=>{const r=window.wp.element,o=window.ReactJSXRuntime,i=window.React;var s=n.t(i,2);const a=(...e)=>e.filter((e,t,n)=>Boolean(e)&&n.indexOf(e)===t).join(" ");var l={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const c=(0,i.forwardRef)(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:s,iconNode:c,...u},d)=>(0,i.createElement)("svg",{ref:d,...l,width:t,height:t,stroke:e,strokeWidth:r?24*Number(n)/Number(t):n,className:a("lucide",o),...u},[...c.map(([e,t])=>(0,i.createElement)(e,t)),...Array.isArray(s)?s:[s]])),u=(e,t)=>{const n=(0,i.forwardRef)(({className:n,...r},o)=>{return(0,i.createElement)(c,{ref:o,iconNode:t,className:a(`lucide-${s=e,s.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,n),...r});var s});return n.displayName=`${e}`,n},d=u("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);let h=1;const p=new class{#e;#t;constructor(){this.#e=[],this.#t=[]}subscribe(e){return this.#t.push(e),()=>{this.#t=this.#t.filter(t=>t!==e)}}publish(e){this.#t.forEach(t=>t(e))}add(e){this.#e.push(e),this.publish(e)}remove(e){return this.#e=this.#e.filter(t=>t.id!==e),e}create(e){const{id:t,message:n="",jsx:r,...o}=e;if(!n&&"function"!=typeof r)return;const i="number"==typeof t?t:h++;return this.#e.find(e=>e.id===i)&&(this.#e=this.#e.map(e=>e.id===i?(this.publish({...e,title:n,jsx:r,...o}),{...e,title:n,jsx:r,...o}):e)),this.add({id:i,title:n,jsx:r,...o}),i}update(e,t){const{render:n}=t;let r=t;switch(typeof n){case"function":r={jsx:n,...t};break;case"string":r={title:n,...t}}this.#e=this.#e.map(t=>t.id===e?(this.publish({...t,...r}),{...t,...r}):t)}dismiss(e){return e||this.#e.forEach(e=>this.#t.forEach(t=>t({id:e.id,dismiss:!0}))),this.#t.forEach(t=>t({id:e,dismiss:!0})),e}history(){return this.#e}default(e="",t={}){return this.create({message:e,type:"neutral",...t})}success(e="",t={}){return this.create({message:e,type:"success",...t})}error(e="",t={}){return this.create({message:e,type:"error",...t})}warning(e="",t={}){return this.create({message:e,type:"warning",...t})}info(e="",t={}){return this.create({message:e,type:"info",...t})}custom(e,t={}){return this.create({jsx:e,type:"custom",...t})}},f=Object.seal(Object.assign((e,t)=>p.default(e,t),{success:p.success.bind(p),error:p.error.bind(p),warning:p.warning.bind(p),info:p.info.bind(p),custom:p.custom.bind(p),dismiss:p.dismiss.bind(p),update:p.update.bind(p)},{getHistory:p.history.bind(p)})),m=e=>{const t=b(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{const n=e.split("-");return""===n[0]&&1!==n.length&&n.shift(),g(n,t)||y(e)},getConflictingClassGroupIds:(e,t)=>{const o=n[e]||[];return t&&r[e]?[...o,...r[e]]:o}}},g=(e,t)=>{if(0===e.length)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?g(e.slice(1),r):void 0;if(o)return o;if(0===t.validators.length)return;const i=e.join("-");return t.validators.find(({validator:e})=>e(i))?.classGroupId},v=/^\[(.+)\]$/,y=e=>{if(v.test(e)){const t=v.exec(e)[1],n=t?.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},b=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return E(Object.entries(e.classGroups),n).forEach(([e,n])=>{x(n,r,e,t)}),r},x=(e,t,n,r)=>{e.forEach(e=>{if("string"!=typeof e)return"function"==typeof e?k(e)?void x(e(r),t,n,r):void t.validators.push({validator:e,classGroupId:n}):void Object.entries(e).forEach(([e,o])=>{x(o,w(t,e),n,r)});(""===e?t:w(t,e)).classGroupId=n})},w=(e,t)=>{let n=e;return t.split("-").forEach(e=>{n.nextPart.has(e)||n.nextPart.set(e,{nextPart:new Map,validators:[]}),n=n.nextPart.get(e)}),n},k=e=>e.isThemeGetter,E=(e,t)=>t?e.map(([e,n])=>[e,n.map(e=>"string"==typeof e?t+e:"object"==typeof e?Object.fromEntries(Object.entries(e).map(([e,n])=>[t+e,n])):e)]):e,S=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const o=(o,i)=>{n.set(o,i),t++,t>e&&(t=0,r=n,n=new Map)};return{get(e){let t=n.get(e);return void 0!==t?t:void 0!==(t=r.get(e))?(o(e,t),t):void 0},set(e,t){n.has(e)?n.set(e,t):o(e,t)}}},j=e=>{const{separator:t,experimentalParseClassName:n}=e,r=1===t.length,o=t[0],i=t.length,s=e=>{const n=[];let s,a=0,l=0;for(let c=0;c<e.length;c++){let u=e[c];if(0===a){if(u===o&&(r||e.slice(c,c+i)===t)){n.push(e.slice(l,c)),l=c+i;continue}if("/"===u){s=c;continue}}"["===u?a++:"]"===u&&a--}const c=0===n.length?e:e.substring(l),u=c.startsWith("!");return{modifiers:n,hasImportantModifier:u,baseClassName:u?c.substring(1):c,maybePostfixModifierPosition:s&&s>l?s-l:void 0}};return n?e=>n({className:e,parseClassName:s}):s},P=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(e=>{"["===e[0]?(t.push(...n.sort(),e),n=[]):n.push(e)}),t.push(...n.sort()),t},T=/\s+/;function C(){let e,t,n=0,r="";for(;n<arguments.length;)(e=arguments[n++])&&(t=R(e))&&(r&&(r+=" "),r+=t);return r}const R=e=>{if("string"==typeof e)return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=R(e[r]))&&(n&&(n+=" "),n+=t);return n};function A(e,...t){let n,r,o,i=function(a){const l=t.reduce((e,t)=>t(e),e());return n=(e=>({cache:S(e.cacheSize),parseClassName:j(e),...m(e)}))(l),r=n.cache.get,o=n.cache.set,i=s,s(a)};function s(e){const t=r(e);if(t)return t;const i=((e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,i=[],s=e.trim().split(T);let a="";for(let e=s.length-1;e>=0;e-=1){const t=s[e],{modifiers:l,hasImportantModifier:c,baseClassName:u,maybePostfixModifierPosition:d}=n(t);let h=Boolean(d),p=r(h?u.substring(0,d):u);if(!p){if(!h){a=t+(a.length>0?" "+a:a);continue}if(p=r(u),!p){a=t+(a.length>0?" "+a:a);continue}h=!1}const f=P(l).join(":"),m=c?f+"!":f,g=m+p;if(i.includes(g))continue;i.push(g);const v=o(p,h);for(let e=0;e<v.length;++e){const t=v[e];i.push(m+t)}a=t+(a.length>0?" "+a:a)}return a})(e,n);return o(e,i),i}return function(){return i(C.apply(null,arguments))}}const N=e=>{const t=t=>t[e]||[];return t.isThemeGetter=!0,t},M=/^\[(?:([a-z-]+):)?(.+)\]$/i,D=/^\d+\/\d+$/,L=new Set(["px","full","screen"]),I=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,O=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,V=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,_=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,F=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,B=e=>U(e)||L.has(e)||D.test(e),z=e=>te(e,"length",ne),U=e=>Boolean(e)&&!Number.isNaN(Number(e)),W=e=>te(e,"number",U),$=e=>Boolean(e)&&Number.isInteger(Number(e)),H=e=>e.endsWith("%")&&U(e.slice(0,-1)),K=e=>M.test(e),q=e=>I.test(e),Y=new Set(["length","size","percentage"]),G=e=>te(e,Y,re),X=e=>te(e,"position",re),Z=new Set(["image","url"]),J=e=>te(e,Z,ie),Q=e=>te(e,"",oe),ee=()=>!0,te=(e,t,n)=>{const r=M.exec(e);return!!r&&(r[1]?"string"==typeof t?r[1]===t:t.has(r[1]):n(r[2]))},ne=e=>O.test(e)&&!V.test(e),re=()=>!1,oe=e=>_.test(e),ie=e=>F.test(e),se=(Symbol.toStringTag,()=>{const e=N("colors"),t=N("spacing"),n=N("blur"),r=N("brightness"),o=N("borderColor"),i=N("borderRadius"),s=N("borderSpacing"),a=N("borderWidth"),l=N("contrast"),c=N("grayscale"),u=N("hueRotate"),d=N("invert"),h=N("gap"),p=N("gradientColorStops"),f=N("gradientColorStopPositions"),m=N("inset"),g=N("margin"),v=N("opacity"),y=N("padding"),b=N("saturate"),x=N("scale"),w=N("sepia"),k=N("skew"),E=N("space"),S=N("translate"),j=()=>["auto",K,t],P=()=>[K,t],T=()=>["",B,z],C=()=>["auto",U,K],R=()=>["","0",K],A=()=>[U,K];return{cacheSize:500,separator:":",theme:{colors:[ee],spacing:[B,z],blur:["none","",q,K],brightness:A(),borderColor:[e],borderRadius:["none","","full",q,K],borderSpacing:P(),borderWidth:T(),contrast:A(),grayscale:R(),hueRotate:A(),invert:R(),gap:P(),gradientColorStops:[e],gradientColorStopPositions:[H,z],inset:j(),margin:j(),opacity:A(),padding:P(),saturate:A(),scale:A(),sepia:R(),skew:A(),space:P(),translate:P()},classGroups:{aspect:[{aspect:["auto","square","video",K]}],container:["container"],columns:[{columns:[q]}],"break-after":[{"break-after":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-before":[{"break-before":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top",K]}],overflow:[{overflow:["auto","hidden","clip","visible","scroll"]}],"overflow-x":[{"overflow-x":["auto","hidden","clip","visible","scroll"]}],"overflow-y":[{"overflow-y":["auto","hidden","clip","visible","scroll"]}],overscroll:[{overscroll:["auto","contain","none"]}],"overscroll-x":[{"overscroll-x":["auto","contain","none"]}],"overscroll-y":[{"overscroll-y":["auto","contain","none"]}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[m]}],"inset-x":[{"inset-x":[m]}],"inset-y":[{"inset-y":[m]}],start:[{start:[m]}],end:[{end:[m]}],top:[{top:[m]}],right:[{right:[m]}],bottom:[{bottom:[m]}],left:[{left:[m]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",$,K]}],basis:[{basis:j()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",K]}],grow:[{grow:R()}],shrink:[{shrink:R()}],order:[{order:["first","last","none",$,K]}],"grid-cols":[{"grid-cols":[ee]}],"col-start-end":[{col:["auto",{span:["full",$,K]},K]}],"col-start":[{"col-start":C()}],"col-end":[{"col-end":C()}],"grid-rows":[{"grid-rows":[ee]}],"row-start-end":[{row:["auto",{span:[$,K]},K]}],"row-start":[{"row-start":C()}],"row-end":[{"row-end":C()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",K]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",K]}],gap:[{gap:[h]}],"gap-x":[{"gap-x":[h]}],"gap-y":[{"gap-y":[h]}],"justify-content":[{justify:["normal","start","end","center","between","around","evenly","stretch"]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal","start","end","center","between","around","evenly","stretch","baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":["start","end","center","between","around","evenly","stretch","baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[y]}],px:[{px:[y]}],py:[{py:[y]}],ps:[{ps:[y]}],pe:[{pe:[y]}],pt:[{pt:[y]}],pr:[{pr:[y]}],pb:[{pb:[y]}],pl:[{pl:[y]}],m:[{m:[g]}],mx:[{mx:[g]}],my:[{my:[g]}],ms:[{ms:[g]}],me:[{me:[g]}],mt:[{mt:[g]}],mr:[{mr:[g]}],mb:[{mb:[g]}],ml:[{ml:[g]}],"space-x":[{"space-x":[E]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[E]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",K,t]}],"min-w":[{"min-w":[K,t,"min","max","fit"]}],"max-w":[{"max-w":[K,t,"none","full","min","max","fit","prose",{screen:[q]},q]}],h:[{h:[K,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[K,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[K,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[K,t,"auto","min","max","fit"]}],"font-size":[{text:["base",q,z]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",W]}],"font-family":[{font:[ee]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",K]}],"line-clamp":[{"line-clamp":["none",U,W]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",B,K]}],"list-image":[{"list-image":["none",K]}],"list-style-type":[{list:["none","disc","decimal",K]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[v]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[v]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:["solid","dashed","dotted","double","none","wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",B,z]}],"underline-offset":[{"underline-offset":["auto",B,K]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:P()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",K]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",K]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[v]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top",X]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",G]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},J]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[f]}],"gradient-via-pos":[{via:[f]}],"gradient-to-pos":[{to:[f]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-to":[{to:[p]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[v]}],"border-style":[{border:["solid","dashed","dotted","double","none","hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[v]}],"divide-style":[{divide:["solid","dashed","dotted","double","none"]}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-s":[{"border-s":[o]}],"border-color-e":[{"border-e":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["","solid","dashed","dotted","double","none"]}],"outline-offset":[{"outline-offset":[B,K]}],"outline-w":[{outline:[B,z]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:T()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[v]}],"ring-offset-w":[{"ring-offset":[B,z]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",q,Q]}],"shadow-color":[{shadow:[ee]}],opacity:[{opacity:[v]}],"mix-blend":[{"mix-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"]}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",q,K]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[d]}],saturate:[{saturate:[b]}],sepia:[{sepia:[w]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[v]}],"backdrop-saturate":[{"backdrop-saturate":[b]}],"backdrop-sepia":[{"backdrop-sepia":[w]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[s]}],"border-spacing-x":[{"border-spacing-x":[s]}],"border-spacing-y":[{"border-spacing-y":[s]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",K]}],duration:[{duration:A()}],ease:[{ease:["linear","in","out","in-out",K]}],delay:[{delay:A()}],animate:[{animate:["none","spin","ping","pulse","bounce",K]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[x]}],"scale-x":[{"scale-x":[x]}],"scale-y":[{"scale-y":[x]}],rotate:[{rotate:[$,K]}],"translate-x":[{"translate-x":[S]}],"translate-y":[{"translate-y":[S]}],"skew-x":[{"skew-x":[k]}],"skew-y":[{"skew-y":[k]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",K]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",K]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":P()}],"scroll-mx":[{"scroll-mx":P()}],"scroll-my":[{"scroll-my":P()}],"scroll-ms":[{"scroll-ms":P()}],"scroll-me":[{"scroll-me":P()}],"scroll-mt":[{"scroll-mt":P()}],"scroll-mr":[{"scroll-mr":P()}],"scroll-mb":[{"scroll-mb":P()}],"scroll-ml":[{"scroll-ml":P()}],"scroll-p":[{"scroll-p":P()}],"scroll-px":[{"scroll-px":P()}],"scroll-py":[{"scroll-py":P()}],"scroll-ps":[{"scroll-ps":P()}],"scroll-pe":[{"scroll-pe":P()}],"scroll-pt":[{"scroll-pt":P()}],"scroll-pr":[{"scroll-pr":P()}],"scroll-pb":[{"scroll-pb":P()}],"scroll-pl":[{"scroll-pl":P()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",K]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[B,z,W]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}}),ae=A(se);function le(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=le(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function ce(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=le(e))&&(r&&(r+=" "),r+=t);return r}const ue=(...e)=>ae(ce(...e)),de=e=>{const t={0:"gap-0",xxs:"gap-1",xs:"gap-2",sm:"gap-3",md:"gap-4",lg:"gap-5",xl:"gap-6","2xl":"gap-8"};return t[e]||t.md},he=u("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]),pe=u("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]),fe=u("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]),me=u("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]),ge=(0,i.forwardRef)((e,t)=>{const{variant:n="primary",size:r="md",type:s="button",tag:a="button",className:l,children:c,disabled:u=!1,destructive:d=!1,icon:h=null,iconPosition:p="left",loading:f=!1,...m}=e,g=d&&"focus:ring-focus-error",v=f?"opacity-50 disabled:cursor-not-allowed":"",y={primary:"text-text-on-color bg-button-primary hover:bg-button-primary-hover outline-button-primary hover:outline-button-primary-hover shadow-xs disabled:shadow-none focus:shadow-none disabled:bg-button-disabled disabled:outline-button-disabled",secondary:"text-text-on-color bg-button-secondary hover:bg-button-secondary-hover outline-button-secondary hover:outline-button-secondary-hover shadow-xs focus:shadow-none disabled:shadow-none disabled:bg-button-disabled disabled:outline-button-disabled",outline:"text-button-tertiary-color outline-border-subtle bg-button-tertiary shadow-sm focus:shadow-none hover:bg-button-tertiary-hover hover:outline-border-subtle disabled:bg-button-tertiary disabled:outline-border-disabled",ghost:"text-text-primary bg-transparent outline-transparent hover:bg-button-tertiary-hover",link:"outline-none text-link-primary bg-transparent hover:text-link-primary-hover hover:underline p-0 border-0 leading-none"}[n],b=d&&!u?{primary:"bg-button-danger hover:bg-button-danger-hover outline-button-danger hover:outline-button-danger-hover",secondary:"bg-button-danger hover:bg-button-danger-hover outline-button-danger hover:outline-button-danger-hover",outline:"text-button-danger outline outline-1 outline-button-danger hover:outline-button-danger bg-button-tertiary hover:bg-field-background-error",ghost:"text-button-danger hover:bg-field-background-error",link:"text-button-danger hover:text-button-danger-secondary"}[n]:"",x={xs:"p-1 rounded [&>svg]:size-4",sm:"p-2 rounded [&>svg]:size-4 gap-0.5",md:"p-2.5 rounded-md text-sm [&>svg]:size-5 gap-1",lg:"p-3 rounded-lg text-base [&>svg]:size-6 gap-1"}[r];let w,k=null,E="";return h&&(E="flex items-center justify-center","left"===p?w=h:k=h),(0,o.jsxs)(a,{ref:t,type:s,className:ue(E,"outline outline-1 border-none cursor-pointer transition-colors duration-300 ease-in-out text-xs font-semibold focus:ring-2 focus:ring-toggle-on focus:ring-offset-2 disabled:text-text-disabled",x,y,b,g,v,{"cursor-default":u},l),disabled:u,"aria-disabled":u,...m,children:[(0,o.jsx)(i.Fragment,{children:w},"left-icon"),c?(0,o.jsx)("span",{className:"px-1",children:c}):null,(0,o.jsx)(i.Fragment,{children:k},"right-icon")]})});ge.displayName="Button";const ve="light",ye="neutral",be=({icon:e,theme:t=ve,variant:n=ye})=>{const r="[&>svg]:h-5 [&>svg]:w-5",s=(({theme:e=ve,variant:t=ye})=>{let n="light"===e?"text-icon-secondary":"text-icon-inverse";return n={info:"light"===e?"text-support-info":"text-support-info-inverse",success:"light"===e?"text-support-success":"text-support-success-inverse",warning:"light"===e?"text-support-warning":"text-support-warning-inverse",error:"light"===e?"text-support-error":"text-support-error-inverse"}[t]||n,n})({theme:t,variant:n});if(e&&(0,i.isValidElement)(e))return(0,i.cloneElement)(e,{className:ue(r,s,e?.props?.className??"")});const a={neutral:(0,o.jsx)(he,{className:ue(r,s)}),info:(0,o.jsx)(he,{className:ue(r,s)}),success:(0,o.jsx)(pe,{className:ue(r,s)}),warning:(0,o.jsx)(fe,{className:ue(r,s)}),error:(0,o.jsx)(me,{className:ue(r,s)})};return a[n]||a.neutral},xe=({actionType:e="button",onAction:t=()=>{},actionLabel:n="",theme:r=ve})=>{const i="focus:ring-0 focus:ring-offset-0 ring-offset-0 focus:outline-none";let s="text-button-primary border-button-primary hover:border-button-primary hover:text-button-primary-hover";switch("dark"===r&&(s="text-text-inverse border-text-inverse hover:border-text-inverse hover:text-text-inverse"),e){case"button":return(0,o.jsx)(ge,{variant:"outline",size:"xs",onClick:t,className:ue("rounded",i,s,"dark"===r?"bg-transparent hover:bg-transparent":"bg-white hover:bg-white"),children:n});case"link":return(0,o.jsx)(ge,{variant:"link",size:"xs",onClick:t,className:ue(i,s),children:n});default:return null}},we=({theme:e=ve,title:t="",inline:n=!1})=>t?(0,o.jsx)("span",{className:ue("block",{light:"text-text-primary",dark:"text-text-inverse"}[e],"text-sm leading-5 font-semibold",n?"inline":"block"),children:t}):null,ke=({theme:e=ve,content:t="",inline:n=!1})=>t?(0,o.jsx)("span",{className:ue({light:"text-text-primary",dark:"text-text-inverse"}[e],"block text-sm [&_*]:text-sm leading-5 [&_*]:leading-5 font-normal [word-break:break-word]",n?"inline":"block"),children:t}):null,Ee=(...e)=>t=>{e.forEach(e=>{"function"==typeof e?e(t):e&&(e.current=t)})},Se={"top-left":"top-0 bottom-0 left-0 justify-start items-start","top-right":"top-0 bottom-0 right-0 justify-start items-end","bottom-left":"top-0 bottom-0 left-0 justify-end items-start","bottom-right":"top-0 bottom-0 right-0 justify-end items-end"},je={neutral:"border-alert-border-neutral bg-alert-background-neutral",custom:"border-alert-border-neutral bg-alert-background-neutral",info:"border-alert-border-info bg-alert-background-info",success:"border-alert-border-green bg-alert-background-green",warning:"border-alert-border-warning bg-alert-background-warning",error:"border-alert-border-danger bg-alert-background-danger"},Pe="bg-background-inverse border-background-inverse",Te={light:"text-icon-secondary",dark:"text-icon-inverse"},Ce=window.ReactDOM,Re=(0,i.createContext)({});function Ae(e){const t=(0,i.useRef)(null);return null===t.current&&(t.current=e()),t.current}const Ne=(0,i.createContext)(null),Me=(0,i.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});class De extends i.Component{getSnapshotBeforeUpdate(e){const t=this.props.childRef.current;if(t&&e.isPresent&&!this.props.isPresent){const e=this.props.sizeRef.current;e.height=t.offsetHeight||0,e.width=t.offsetWidth||0,e.top=t.offsetTop,e.left=t.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function Le({children:e,isPresent:t}){const n=(0,i.useId)(),r=(0,i.useRef)(null),s=(0,i.useRef)({width:0,height:0,top:0,left:0}),{nonce:a}=(0,i.useContext)(Me);return(0,i.useInsertionEffect)(()=>{const{width:e,height:o,top:i,left:l}=s.current;if(t||!r.current||!e||!o)return;r.current.dataset.motionPopId=n;const c=document.createElement("style");return a&&(c.nonce=a),document.head.appendChild(c),c.sheet&&c.sheet.insertRule(`\n          [data-motion-pop-id="${n}"] {\n            position: absolute !important;\n            width: ${e}px !important;\n            height: ${o}px !important;\n            top: ${i}px !important;\n            left: ${l}px !important;\n          }\n        `),()=>{document.head.removeChild(c)}},[t]),(0,o.jsx)(De,{isPresent:t,childRef:r,sizeRef:s,children:i.cloneElement(e,{ref:r})})}const Ie=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:s,presenceAffectsLayout:a,mode:l})=>{const c=Ae(Oe),u=(0,i.useId)(),d=(0,i.useCallback)(e=>{c.set(e,!0);for(const e of c.values())if(!e)return;r&&r()},[c,r]),h=(0,i.useMemo)(()=>({id:u,initial:t,isPresent:n,custom:s,onExitComplete:d,register:e=>(c.set(e,!1),()=>c.delete(e))}),a?[Math.random(),d]:[n,d]);return(0,i.useMemo)(()=>{c.forEach((e,t)=>c.set(t,!1))},[n]),i.useEffect(()=>{!n&&!c.size&&r&&r()},[n]),"popLayout"===l&&(e=(0,o.jsx)(Le,{isPresent:n,children:e})),(0,o.jsx)(Ne.Provider,{value:h,children:e})};function Oe(){return new Map}function Ve(e=!0){const t=(0,i.useContext)(Ne);if(null===t)return[!0,null];const{isPresent:n,onExitComplete:r,register:o}=t,s=(0,i.useId)();(0,i.useEffect)(()=>{e&&o(s)},[e]);const a=(0,i.useCallback)(()=>e&&r&&r(s),[s,r,e]);return!n&&r?[!1,a]:[!0]}const _e=e=>e.key||"";function Fe(e){const t=[];return i.Children.forEach(e,e=>{(0,i.isValidElement)(e)&&t.push(e)}),t}const Be="undefined"!=typeof window,ze=Be?i.useLayoutEffect:i.useEffect,Ue=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:s=!0,mode:a="sync",propagate:l=!1})=>{const[c,u]=Ve(l),d=(0,i.useMemo)(()=>Fe(e),[e]),h=l&&!c?[]:d.map(_e),p=(0,i.useRef)(!0),f=(0,i.useRef)(d),m=Ae(()=>new Map),[g,v]=(0,i.useState)(d),[y,b]=(0,i.useState)(d);ze(()=>{p.current=!1,f.current=d;for(let e=0;e<y.length;e++){const t=_e(y[e]);h.includes(t)?m.delete(t):!0!==m.get(t)&&m.set(t,!1)}},[y,h.length,h.join("-")]);const x=[];if(d!==g){let e=[...d];for(let t=0;t<y.length;t++){const n=y[t],r=_e(n);h.includes(r)||(e.splice(t,0,n),x.push(n))}return"wait"===a&&x.length&&(e=x),b(Fe(e)),void v(d)}const{forceRender:w}=(0,i.useContext)(Re);return(0,o.jsx)(o.Fragment,{children:y.map(e=>{const i=_e(e),g=!(l&&!c)&&(d===y||h.includes(i));return(0,o.jsx)(Ie,{isPresent:g,initial:!(p.current&&!n)&&void 0,custom:g?void 0:t,presenceAffectsLayout:s,mode:a,onExitComplete:g?void 0:()=>{if(!m.has(i))return;m.set(i,!0);let e=!0;m.forEach(t=>{t||(e=!1)}),e&&(null==w||w(),b(f.current),l&&(null==u||u()),r&&r())},children:e},i)})})};function We(e){if("undefined"==typeof Proxy)return e;const t=new Map;return new Proxy((...t)=>e(...t),{get:(n,r)=>"create"===r?e:(t.has(r)||t.set(r,e(r)),t.get(r))})}function $e(e){return null!==e&&"object"==typeof e&&"function"==typeof e.start}const He=e=>Array.isArray(e);function Ke(e,t){if(!Array.isArray(t))return!1;const 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}function qe(e){return"string"==typeof e||Array.isArray(e)}function Ye(e){const t=[{},{}];return null==e||e.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function Ge(e,t,n,r){if("function"==typeof t){const[o,i]=Ye(r);t=t(void 0!==n?n:e.custom,o,i)}if("string"==typeof t&&(t=e.variants&&e.variants[t]),"function"==typeof t){const[o,i]=Ye(r);t=t(void 0!==n?n:e.custom,o,i)}return t}function Xe(e,t,n){const r=e.getProps();return Ge(r,t,void 0!==n?n:r.custom,e)}const Ze=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Je=["initial",...Ze];function Qe(e){let t;return()=>(void 0===t&&(t=e()),t)}const et=Qe(()=>void 0!==window.ScrollTimeline);class tt{constructor(e){this.stop=()=>this.runAll("stop"),this.animations=e.filter(Boolean)}get finished(){return Promise.all(this.animations.map(e=>"finished"in e?e.finished:e))}getAll(e){return this.animations[0][e]}setAll(e,t){for(let n=0;n<this.animations.length;n++)this.animations[n][e]=t}attachTimeline(e,t){const n=this.animations.map(n=>et()&&n.attachTimeline?n.attachTimeline(e):"function"==typeof t?t(n):void 0);return()=>{n.forEach((e,t)=>{e&&e(),this.animations[t].stop()})}}get time(){return this.getAll("time")}set time(e){this.setAll("time",e)}get speed(){return this.getAll("speed")}set speed(e){this.setAll("speed",e)}get startTime(){return this.getAll("startTime")}get duration(){let e=0;for(let t=0;t<this.animations.length;t++)e=Math.max(e,this.animations[t].duration);return e}runAll(e){this.animations.forEach(t=>t[e]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class nt extends tt{then(e,t){return Promise.all(this.animations).then(e).catch(t)}}function rt(e,t){return e?e[t]||e.default||e:void 0}const ot=2e4;function it(e){let t=0,n=e.next(t);for(;!n.done&&t<ot;)t+=50,n=e.next(t);return t>=ot?1/0:t}function st(e){return"function"==typeof e}function at(e,t){e.timeline=t,e.onfinish=null}const lt=e=>Array.isArray(e)&&"number"==typeof e[0],ct={linearEasing:void 0};function ut(e,t){const n=Qe(e);return()=>{var e;return null!==(e=ct[t])&&void 0!==e?e:n()}}const dt=ut(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(e){return!1}return!0},"linearEasing"),ht=(e,t,n)=>{const r=t-e;return 0===r?1:(n-e)/r},pt=(e,t,n=10)=>{let r="";const o=Math.max(Math.round(t/n),2);for(let t=0;t<o;t++)r+=e(ht(0,o-1,t))+", ";return`linear(${r.substring(0,r.length-2)})`};function ft(e){return Boolean("function"==typeof e&&dt()||!e||"string"==typeof e&&(e in gt||dt())||lt(e)||Array.isArray(e)&&e.every(ft))}const mt=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,gt={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:mt([0,.65,.55,1]),circOut:mt([.55,0,1,.45]),backIn:mt([.31,.01,.66,-.59]),backOut:mt([.33,1.53,.69,.99])};function vt(e,t){return e?"function"==typeof e&&dt()?pt(e,t):lt(e)?mt(e):Array.isArray(e)?e.map(e=>vt(e,t)||gt.easeOut):gt[e]:void 0}const yt={x:!1,y:!1};function bt(){return yt.x||yt.y}function xt(e,t){const n=function(e){if(e instanceof Element)return[e];if("string"==typeof e){let t=document;const n=t.querySelectorAll(e);return n?Array.from(n):[]}return Array.from(e)}(e),r=new AbortController;return[n,{passive:!0,...t,signal:r.signal},()=>r.abort()]}function wt(e){return t=>{"touch"===t.pointerType||bt()||e(t)}}const kt=(e,t)=>!!t&&(e===t||kt(e,t.parentElement)),Et=e=>"mouse"===e.pointerType?"number"!=typeof e.button||e.button<=0:!1!==e.isPrimary,St=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]),jt=new WeakSet;function Pt(e){return t=>{"Enter"===t.key&&e(t)}}function Tt(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}function Ct(e){return Et(e)&&!bt()}const Rt=e=>1e3*e,At=e=>e/1e3,Nt=e=>e,Mt=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Dt=new Set(Mt),Lt=new Set(["width","height","top","left","right","bottom",...Mt]),It=e=>He(e)?e[e.length-1]||0:e,Ot=["read","resolveKeyframes","update","preRender","render","postRender"];function Vt(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,s=Ot.reduce((e,t)=>(e[t]=function(e){let t=new Set,n=new Set,r=!1,o=!1;const i=new WeakSet;let s={delta:0,timestamp:0,isProcessing:!1};function a(t){i.has(t)&&(l.schedule(t),e()),t(s)}const l={schedule:(e,o=!1,s=!1)=>{const a=s&&r?t:n;return o&&i.add(e),a.has(e)||a.add(e),e},cancel:e=>{n.delete(e),i.delete(e)},process:e=>{s=e,r?o=!0:(r=!0,[t,n]=[n,t],t.forEach(a),t.clear(),r=!1,o&&(o=!1,l.process(e)))}};return l}(i),e),{}),{read:a,resolveKeyframes:l,update:c,preRender:u,render:d,postRender:h}=s,p=()=>{const i=performance.now();n=!1,o.delta=r?1e3/60:Math.max(Math.min(i-o.timestamp,40),1),o.timestamp=i,o.isProcessing=!0,a.process(o),l.process(o),c.process(o),u.process(o),d.process(o),h.process(o),o.isProcessing=!1,n&&t&&(r=!1,e(p))};return{schedule:Ot.reduce((t,i)=>{const a=s[i];return t[i]=(t,i=!1,s=!1)=>(n||(n=!0,r=!0,o.isProcessing||e(p)),a.schedule(t,i,s)),t},{}),cancel:e=>{for(let t=0;t<Ot.length;t++)s[Ot[t]].cancel(e)},state:o,steps:s}}const{schedule:_t,cancel:Ft,state:Bt,steps:zt}=Vt("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:Nt,!0);let Ut;function Wt(){Ut=void 0}const $t={now:()=>(void 0===Ut&&$t.set(Bt.isProcessing?Bt.timestamp:performance.now()),Ut),set:e=>{Ut=e,queueMicrotask(Wt)}};function Ht(e,t){-1===e.indexOf(t)&&e.push(t)}function Kt(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class qt{constructor(){this.subscriptions=[]}add(e){return Ht(this.subscriptions,e),()=>Kt(this.subscriptions,e)}notify(e,t,n){const r=this.subscriptions.length;if(r)if(1===r)this.subscriptions[0](e,t,n);else for(let o=0;o<r;o++){const r=this.subscriptions[o];r&&r(e,t,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function Yt(e,t){return t?e*(1e3/t):0}const Gt={current:void 0};class Xt{constructor(e,t={}){this.version="11.18.2",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(e,t=!0)=>{const n=$t.now();this.updatedAt!==n&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),t&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){var t;this.current=e,this.updatedAt=$t.now(),null===this.canTrackVelocity&&void 0!==e&&(this.canTrackVelocity=(t=this.current,!isNaN(parseFloat(t))))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,t){this.events[e]||(this.events[e]=new qt);const n=this.events[e].add(t);return"change"===e?()=>{n(),_t.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e,t=!0){t&&this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e,t)}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()}get(){return Gt.current&&Gt.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const e=$t.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||e-this.updatedAt>30)return 0;const t=Math.min(this.updatedAt-this.prevUpdatedAt,30);return Yt(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0,this.animation=e(t),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Zt(e,t){return new Xt(e,t)}function Jt(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Zt(n))}const Qt=e=>Boolean(e&&e.getVelocity);function en(e,t){const n=e.getValue("willChange");if(r=n,Boolean(Qt(r)&&r.add))return n.add(t);var r}const tn=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),nn="data-"+tn("framerAppearId");function rn(e){return e.props[nn]}const on=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e;function sn(e,t,n,r){if(e===t&&n===r)return Nt;return o=>0===o||1===o?o:on(function(e,t,n,r,o){let i,s,a=0;do{s=t+(n-t)/2,i=on(s,r,o)-e,i>0?n=s:t=s}while(Math.abs(i)>1e-7&&++a<12);return s}(o,0,1,e,n),t,r)}const an=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,ln=e=>t=>1-e(1-t),cn=sn(.33,1.53,.69,.99),un=ln(cn),dn=an(un),hn=e=>(e*=2)<1?.5*un(e):.5*(2-Math.pow(2,-10*(e-1))),pn=e=>1-Math.sin(Math.acos(e)),fn=ln(pn),mn=an(pn),gn=e=>/^0[^.\s]+$/u.test(e);function vn(e){return"number"==typeof e?0===e:null===e||"none"===e||"0"===e||gn(e)}const yn=(e,t,n)=>n>t?t:n<e?e:n,bn={test:e=>"number"==typeof e,parse:parseFloat,transform:e=>e},xn={...bn,transform:e=>yn(0,1,e)},wn={...bn,default:1},kn=e=>Math.round(1e5*e)/1e5,En=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,Sn=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,jn=(e,t)=>n=>Boolean("string"==typeof n&&Sn.test(n)&&n.startsWith(e)||t&&!function(e){return null==e}(n)&&Object.prototype.hasOwnProperty.call(n,t)),Pn=(e,t,n)=>r=>{if("string"!=typeof r)return r;const[o,i,s,a]=r.match(En);return{[e]:parseFloat(o),[t]:parseFloat(i),[n]:parseFloat(s),alpha:void 0!==a?parseFloat(a):1}},Tn={...bn,transform:e=>Math.round((e=>yn(0,255,e))(e))},Cn={test:jn("rgb","red"),parse:Pn("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Tn.transform(e)+", "+Tn.transform(t)+", "+Tn.transform(n)+", "+kn(xn.transform(r))+")"},Rn={test:jn("#"),parse:function(e){let t="",n="",r="",o="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),o=e.substring(4,5),t+=t,n+=n,r+=r,o+=o),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}},transform:Cn.transform},An=e=>({test:t=>"string"==typeof t&&t.endsWith(e)&&1===t.split(" ").length,parse:parseFloat,transform:t=>`${t}${e}`}),Nn=An("deg"),Mn=An("%"),Dn=An("px"),Ln=An("vh"),In=An("vw"),On={...Mn,parse:e=>Mn.parse(e)/100,transform:e=>Mn.transform(100*e)},Vn={test:jn("hsl","hue"),parse:Pn("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Mn.transform(kn(t))+", "+Mn.transform(kn(n))+", "+kn(xn.transform(r))+")"},Fn={test:e=>Cn.test(e)||Rn.test(e)||Vn.test(e),parse:e=>Cn.test(e)?Cn.parse(e):Vn.test(e)?Vn.parse(e):Rn.parse(e),transform:e=>"string"==typeof e?e:e.hasOwnProperty("red")?Cn.transform(e):Vn.transform(e)},Bn=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,zn="number",Un="color",Wn=/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 $n(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let i=0;const s=t.replace(Wn,e=>(Fn.test(e)?(r.color.push(i),o.push(Un),n.push(Fn.parse(e))):e.startsWith("var(")?(r.var.push(i),o.push("var"),n.push(e)):(r.number.push(i),o.push(zn),n.push(parseFloat(e))),++i,"${}")).split("${}");return{values:n,split:s,indexes:r,types:o}}function Hn(e){return $n(e).values}function Kn(e){const{split:t,types:n}=$n(e),r=t.length;return e=>{let o="";for(let i=0;i<r;i++)if(o+=t[i],void 0!==e[i]){const t=n[i];o+=t===zn?kn(e[i]):t===Un?Fn.transform(e[i]):e[i]}return o}}const qn=e=>"number"==typeof e?0:e,Yn={test:function(e){var t,n;return isNaN(e)&&"string"==typeof e&&((null===(t=e.match(En))||void 0===t?void 0:t.length)||0)+((null===(n=e.match(Bn))||void 0===n?void 0:n.length)||0)>0},parse:Hn,createTransformer:Kn,getAnimatableNone:function(e){const t=Hn(e);return Kn(e)(t.map(qn))}},Gn=new Set(["brightness","contrast","saturate","opacity"]);function Xn(e){const[t,n]=e.slice(0,-1).split("(");if("drop-shadow"===t)return e;const[r]=n.match(En)||[];if(!r)return e;const o=n.replace(r,"");let i=Gn.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+o+")"}const Zn=/\b([a-z-]*)\(.*?\)/gu,Jn={...Yn,getAnimatableNone:e=>{const t=e.match(Zn);return t?t.map(Xn).join(" "):e}},Qn={borderWidth:Dn,borderTopWidth:Dn,borderRightWidth:Dn,borderBottomWidth:Dn,borderLeftWidth:Dn,borderRadius:Dn,radius:Dn,borderTopLeftRadius:Dn,borderTopRightRadius:Dn,borderBottomRightRadius:Dn,borderBottomLeftRadius:Dn,width:Dn,maxWidth:Dn,height:Dn,maxHeight:Dn,top:Dn,right:Dn,bottom:Dn,left:Dn,padding:Dn,paddingTop:Dn,paddingRight:Dn,paddingBottom:Dn,paddingLeft:Dn,margin:Dn,marginTop:Dn,marginRight:Dn,marginBottom:Dn,marginLeft:Dn,backgroundPositionX:Dn,backgroundPositionY:Dn},er={rotate:Nn,rotateX:Nn,rotateY:Nn,rotateZ:Nn,scale:wn,scaleX:wn,scaleY:wn,scaleZ:wn,skew:Nn,skewX:Nn,skewY:Nn,distance:Dn,translateX:Dn,translateY:Dn,translateZ:Dn,x:Dn,y:Dn,z:Dn,perspective:Dn,transformPerspective:Dn,opacity:xn,originX:On,originY:On,originZ:Dn},tr={...bn,transform:Math.round},nr={...Qn,...er,zIndex:tr,size:Dn,fillOpacity:xn,strokeOpacity:xn,numOctaves:tr},rr={...nr,color:Fn,backgroundColor:Fn,outlineColor:Fn,fill:Fn,stroke:Fn,borderColor:Fn,borderTopColor:Fn,borderRightColor:Fn,borderBottomColor:Fn,borderLeftColor:Fn,filter:Jn,WebkitFilter:Jn},or=e=>rr[e];function ir(e,t){let n=or(e);return n!==Jn&&(n=Yn),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const sr=new Set(["auto","none","0"]),ar=e=>e===bn||e===Dn,lr=(e,t)=>parseFloat(e.split(", ")[t]),cr=(e,t)=>(n,{transform:r})=>{if("none"===r||!r)return 0;const o=r.match(/^matrix3d\((.+)\)$/u);if(o)return lr(o[1],t);{const t=r.match(/^matrix\((.+)\)$/u);return t?lr(t[1],e):0}},ur=new Set(["x","y","z"]),dr=Mt.filter(e=>!ur.has(e)),hr={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:cr(4,13),y:cr(5,14)};hr.translateX=hr.x,hr.translateY=hr.y;const pr=new Set;let fr=!1,mr=!1;function gr(){if(mr){const e=Array.from(pr).filter(e=>e.needsMeasurement),t=new Set(e.map(e=>e.element)),n=new Map;t.forEach(e=>{const t=function(e){const t=[];return dr.forEach(n=>{const r=e.getValue(n);void 0!==r&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}(e);t.length&&(n.set(e,t),e.render())}),e.forEach(e=>e.measureInitialState()),t.forEach(e=>{e.render();const t=n.get(e);t&&t.forEach(([t,n])=>{var r;null===(r=e.getValue(t))||void 0===r||r.set(n)})}),e.forEach(e=>e.measureEndState()),e.forEach(e=>{void 0!==e.suspendedScrollY&&window.scrollTo(0,e.suspendedScrollY)})}mr=!1,fr=!1,pr.forEach(e=>e.complete()),pr.clear()}function vr(){pr.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(mr=!0)})}class yr{constructor(e,t,n,r,o,i=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=n,this.motionValue=r,this.element=o,this.isAsync=i}scheduleResolve(){this.isScheduled=!0,this.isAsync?(pr.add(this),fr||(fr=!0,_t.read(vr),_t.resolveKeyframes(gr))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:t,element:n,motionValue:r}=this;for(let o=0;o<e.length;o++)if(null===e[o])if(0===o){const o=null==r?void 0:r.get(),i=e[e.length-1];if(void 0!==o)e[0]=o;else if(n&&t){const r=n.readValue(t,i);null!=r&&(e[0]=r)}void 0===e[0]&&(e[0]=i),r&&void 0===o&&r.set(e[0])}else e[o]=e[o-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),pr.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,pr.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}let br=Nt,xr=Nt;const wr=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),kr=e=>t=>"string"==typeof t&&t.startsWith(e),Er=kr("--"),Sr=kr("var(--"),jr=e=>!!Sr(e)&&Pr.test(e.split("/*")[0].trim()),Pr=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Tr=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Cr(e,t,n=1){xr(n<=4,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[r,o]=function(e){const t=Tr.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${null!=n?n:r}`,o]}(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const e=i.trim();return wr(e)?parseFloat(e):e}return jr(o)?Cr(o,t,n+1):o}const Rr=e=>t=>t.test(e),Ar=[bn,Dn,Mn,Nn,In,Ln,{test:e=>"auto"===e,parse:e=>e}],Nr=e=>Ar.find(Rr(e));class Mr extends yr{constructor(e,t,n,r,o){super(e,t,n,r,o,!0)}readKeyframes(){const{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("string"==typeof r&&(r=r.trim(),jr(r))){const o=Cr(r,t.current);void 0!==o&&(e[n]=o),n===e.length-1&&(this.finalKeyframe=r)}}if(this.resolveNoneKeyframes(),!Lt.has(n)||2!==e.length)return;const[r,o]=e,i=Nr(r),s=Nr(o);if(i!==s)if(ar(i)&&ar(s))for(let t=0;t<e.length;t++){const n=e[t];"string"==typeof n&&(e[t]=parseFloat(n))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:t}=this,n=[];for(let t=0;t<e.length;t++)vn(e[t])&&n.push(t);n.length&&function(e,t,n){let r,o=0;for(;o<e.length&&!r;){const t=e[o];"string"==typeof t&&!sr.has(t)&&$n(t).values.length&&(r=e[o]),o++}if(r&&n)for(const o of t)e[o]=ir(n,r)}(e,n,t)}measureInitialState(){const{element:e,unresolvedKeyframes:t,name:n}=this;if(!e||!e.current)return;"height"===n&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=hr[n](e.measureViewportBox(),window.getComputedStyle(e.current)),t[0]=this.measuredOrigin;const r=t[t.length-1];void 0!==r&&e.getValue(n,r).jump(r,!1)}measureEndState(){var e;const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const o=t.getValue(n);o&&o.jump(this.measuredOrigin,!1);const i=r.length-1,s=r[i];r[i]=hr[n](t.measureViewportBox(),window.getComputedStyle(t.current)),null!==s&&void 0===this.finalKeyframe&&(this.finalKeyframe=s),(null===(e=this.removedTransforms)||void 0===e?void 0:e.length)&&this.removedTransforms.forEach(([e,n])=>{t.getValue(e).set(n)}),this.resolveNoneKeyframes()}}const Dr=(e,t)=>!("zIndex"===t||"number"!=typeof e&&!Array.isArray(e)&&("string"!=typeof e||!Yn.test(e)&&"0"!==e||e.startsWith("url(")));function Lr(e,t,n,r){const o=e[0];if(null===o)return!1;if("display"===t||"visibility"===t)return!0;const i=e[e.length-1],s=Dr(o,t),a=Dr(i,t);return br(s===a,`You are trying to animate ${t} from "${o}" to "${i}". ${o} is not an animatable value - to enable this animation set ${o} to a value animatable to ${i} via the \`style\` property.`),!(!s||!a)&&(function(e){const t=e[0];if(1===e.length)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}(e)||("spring"===n||st(n))&&r)}const Ir=e=>null!==e;function Or(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(Ir),i=t&&"loop"!==n&&t%2==1?0:o.length-1;return i&&void 0!==r?r:o[i]}class Vr{constructor({autoplay:e=!0,delay:t=0,type:n="keyframes",repeat:r=0,repeatDelay:o=0,repeatType:i="loop",...s}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=$t.now(),this.options={autoplay:e,delay:t,type:n,repeat:r,repeatDelay:o,repeatType:i,...s},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt}get resolved(){return this._resolved||this.hasAttemptedResolve||(vr(),gr()),this._resolved}onKeyframesResolved(e,t){this.resolvedAt=$t.now(),this.hasAttemptedResolve=!0;const{name:n,type:r,velocity:o,delay:i,onComplete:s,onUpdate:a,isGenerator:l}=this.options;if(!l&&!Lr(e,n,r,o)){if(!i)return a&&a(Or(e,this.options,t)),s&&s(),void this.resolveFinishedPromise();this.options.duration=0}const c=this.initPlayback(e,t);!1!==c&&(this._resolved={keyframes:e,finalKeyframe:t,...c},this.onPostResolved())}onPostResolved(){}then(e,t){return this.currentFinishedPromise.then(e,t)}flatten(){this.options.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise(e=>{this.resolveFinishedPromise=e})}}const _r=(e,t,n)=>e+(t-e)*n;function Fr(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function Br(e,t){return n=>n>0?t:e}const zr=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},Ur=[Rn,Cn,Vn];function Wr(e){const t=(n=e,Ur.find(e=>e.test(n)));var n;if(br(Boolean(t),`'${e}' is not an animatable color. Use the equivalent color code instead.`),!Boolean(t))return!1;let r=t.parse(e);return t===Vn&&(r=function({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,n/=100;let o=0,i=0,s=0;if(t/=100){const r=n<.5?n*(1+t):n+t-n*t,a=2*n-r;o=Fr(a,r,e+1/3),i=Fr(a,r,e),s=Fr(a,r,e-1/3)}else o=i=s=n;return{red:Math.round(255*o),green:Math.round(255*i),blue:Math.round(255*s),alpha:r}}(r)),r}const $r=(e,t)=>{const n=Wr(e),r=Wr(t);if(!n||!r)return Br(e,t);const o={...n};return e=>(o.red=zr(n.red,r.red,e),o.green=zr(n.green,r.green,e),o.blue=zr(n.blue,r.blue,e),o.alpha=_r(n.alpha,r.alpha,e),Cn.transform(o))},Hr=(e,t)=>n=>t(e(n)),Kr=(...e)=>e.reduce(Hr),qr=new Set(["none","hidden"]);function Yr(e,t){return n=>_r(e,t,n)}function Gr(e){return"number"==typeof e?Yr:"string"==typeof e?jr(e)?Br:Fn.test(e)?$r:Jr:Array.isArray(e)?Xr:"object"==typeof e?Fn.test(e)?$r:Zr:Br}function Xr(e,t){const n=[...e],r=n.length,o=e.map((e,n)=>Gr(e)(e,t[n]));return e=>{for(let t=0;t<r;t++)n[t]=o[t](e);return n}}function Zr(e,t){const n={...e,...t},r={};for(const o in n)void 0!==e[o]&&void 0!==t[o]&&(r[o]=Gr(e[o])(e[o],t[o]));return e=>{for(const t in r)n[t]=r[t](e);return n}}const Jr=(e,t)=>{const n=Yn.createTransformer(t),r=$n(e),o=$n(t);return r.indexes.var.length===o.indexes.var.length&&r.indexes.color.length===o.indexes.color.length&&r.indexes.number.length>=o.indexes.number.length?qr.has(e)&&!o.values.length||qr.has(t)&&!r.values.length?function(e,t){return qr.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}(e,t):Kr(Xr(function(e,t){var n;const r=[],o={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const s=t.types[i],a=e.indexes[s][o[s]],l=null!==(n=e.values[a])&&void 0!==n?n:0;r[i]=l,o[s]++}return r}(r,o),o.values),n):(br(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),Br(e,t))};function Qr(e,t,n){return"number"==typeof e&&"number"==typeof t&&"number"==typeof n?_r(e,t,n):Gr(e)(e,t)}function eo(e,t,n){const r=Math.max(t-5,0);return Yt(n-e(r),t-r)}const to=.01,no=2,ro=.005,oo=.5;const io=12;function so(e,t){return e*Math.sqrt(1-t*t)}const ao=["duration","bounce"],lo=["stiffness","damping","mass"];function co(e,t){return t.some(t=>void 0!==e[t])}function uo(e=.3,t=.3){const n="object"!=typeof e?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:o}=n;const i=n.keyframes[0],s=n.keyframes[n.keyframes.length-1],a={done:!1,value:i},{stiffness:l,damping:c,mass:u,duration:d,velocity:h,isResolvedFromDuration:p}=function(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!co(e,lo)&&co(e,ao))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(1.2*n),o=r*r,i=2*yn(.05,1,1-(e.bounce||0))*Math.sqrt(o);t={...t,mass:1,stiffness:o,damping:i}}else{const n=function({duration:e=800,bounce:t=.3,velocity:n=0,mass:r=1}){let o,i;br(e<=Rt(10),"Spring duration must be 10 seconds or less");let s=1-t;s=yn(.05,1,s),e=yn(.01,10,At(e)),s<1?(o=t=>{const r=t*s,o=r*e;return.001-(r-n)/so(t,s)*Math.exp(-o)},i=t=>{const r=t*s*e,i=r*n+n,a=Math.pow(s,2)*Math.pow(t,2)*e,l=Math.exp(-r),c=so(Math.pow(t,2),s);return(.001-o(t)>0?-1:1)*((i-a)*l)/c}):(o=t=>Math.exp(-t*e)*((t-n)*e+1)-.001,i=t=>Math.exp(-t*e)*(e*e*(n-t)));const a=function(e,t,n){let r=n;for(let n=1;n<io;n++)r-=e(r)/t(r);return r}(o,i,5/e);if(e=Rt(e),isNaN(a))return{stiffness:100,damping:10,duration:e};{const t=Math.pow(a,2)*r;return{stiffness:t,damping:2*s*Math.sqrt(r*t),duration:e}}}(e);t={...t,...n,mass:1},t.isResolvedFromDuration=!0}return t}({...n,velocity:-At(n.velocity||0)}),f=h||0,m=c/(2*Math.sqrt(l*u)),g=s-i,v=At(Math.sqrt(l/u)),y=Math.abs(g)<5;let b;if(r||(r=y?to:no),o||(o=y?ro:oo),m<1){const e=so(v,m);b=t=>{const n=Math.exp(-m*v*t);return s-n*((f+m*v*g)/e*Math.sin(e*t)+g*Math.cos(e*t))}}else if(1===m)b=e=>s-Math.exp(-v*e)*(g+(f+v*g)*e);else{const e=v*Math.sqrt(m*m-1);b=t=>{const n=Math.exp(-m*v*t),r=Math.min(e*t,300);return s-n*((f+m*v*g)*Math.sinh(r)+e*g*Math.cosh(r))/e}}const x={calculatedDuration:p&&d||null,next:e=>{const t=b(e);if(p)a.done=e>=d;else{let n=0;m<1&&(n=0===e?Rt(f):eo(b,e,t));const i=Math.abs(n)<=r,l=Math.abs(s-t)<=o;a.done=i&&l}return a.value=a.done?s:t,a},toString:()=>{const e=Math.min(it(x),ot),t=pt(t=>x.next(e*t).value,e,30);return e+"ms "+t}};return x}function ho({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:i=500,modifyTarget:s,min:a,max:l,restDelta:c=.5,restSpeed:u}){const d=e[0],h={done:!1,value:d},p=e=>void 0===a?l:void 0===l||Math.abs(a-e)<Math.abs(l-e)?a:l;let f=n*t;const m=d+f,g=void 0===s?m:s(m);g!==m&&(f=g-d);const v=e=>-f*Math.exp(-e/r),y=e=>g+v(e),b=e=>{const t=v(e),n=y(e);h.done=Math.abs(t)<=c,h.value=h.done?g:n};let x,w;const k=e=>{var t;t=h.value,(void 0!==a&&t<a||void 0!==l&&t>l)&&(x=e,w=uo({keyframes:[h.value,p(h.value)],velocity:eo(y,e,h.value),damping:o,stiffness:i,restDelta:c,restSpeed:u}))};return k(0),{calculatedDuration:null,next:e=>{let t=!1;return w||void 0!==x||(t=!0,b(e),k(e)),void 0!==x&&e>=x?w.next(e-x):(!t&&b(e),h)}}}const po=sn(.42,0,1,1),fo=sn(0,0,.58,1),mo=sn(.42,0,.58,1),go={linear:Nt,easeIn:po,easeInOut:mo,easeOut:fo,circIn:pn,circInOut:mn,circOut:fn,backIn:un,backInOut:dn,backOut:cn,anticipate:hn},vo=e=>{if(lt(e)){xr(4===e.length,"Cubic bezier arrays must contain four numerical values.");const[t,n,r,o]=e;return sn(t,n,r,o)}return"string"==typeof e?(xr(void 0!==go[e],`Invalid easing type '${e}'`),go[e]):e};function yo({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=(e=>Array.isArray(e)&&"number"!=typeof e[0])(r)?r.map(vo):vo(r),i={done:!1,value:t[0]},s=function(e,t){return e.map(e=>e*t)}(n&&n.length===t.length?n:function(e){const t=[0];return function(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=ht(0,t,r);e.push(_r(n,1,o))}}(t,e.length-1),t}(t),e),a=function(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const i=e.length;if(xr(i===t.length,"Both input and output ranges must be the same length"),1===i)return()=>t[0];if(2===i&&t[0]===t[1])return()=>t[1];const s=e[0]===e[1];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=function(e,t,n){const r=[],o=n||Qr,i=e.length-1;for(let n=0;n<i;n++){let i=o(e[n],e[n+1]);if(t){const e=Array.isArray(t)?t[n]||Nt:t;i=Kr(e,i)}r.push(i)}return r}(t,r,o),l=a.length,c=n=>{if(s&&n<e[0])return t[0];let r=0;if(l>1)for(;r<e.length-2&&!(n<e[r+1]);r++);const o=ht(e[r],e[r+1],n);return a[r](o)};return n?t=>c(yn(e[0],e[i-1],t)):c}(s,t,{ease:Array.isArray(o)?o:(l=t,c=o,l.map(()=>c||mo).splice(0,l.length-1))});var l,c;return{calculatedDuration:e,next:t=>(i.value=a(t),i.done=t>=e,i)}}const bo=e=>{const t=({timestamp:t})=>e(t);return{start:()=>_t.update(t,!0),stop:()=>Ft(t),now:()=>Bt.isProcessing?Bt.timestamp:$t.now()}},xo={decay:ho,inertia:ho,tween:yo,keyframes:yo,spring:uo},wo=e=>e/100;class ko extends Vr{constructor(e){super(e),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,"idle"===this.state)return;this.teardown();const{onStop:e}=this.options;e&&e()};const{name:t,motionValue:n,element:r,keyframes:o}=this.options,i=(null==r?void 0:r.KeyframeResolver)||yr;this.resolver=new i(o,(e,t)=>this.onKeyframesResolved(e,t),t,n,r),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(e){const{type:t="keyframes",repeat:n=0,repeatDelay:r=0,repeatType:o,velocity:i=0}=this.options,s=st(t)?t:xo[t]||yo;let a,l;s!==yo&&"number"!=typeof e[0]&&(a=Kr(wo,Qr(e[0],e[1])),e=[0,100]);const c=s({...this.options,keyframes:e});"mirror"===o&&(l=s({...this.options,keyframes:[...e].reverse(),velocity:-i})),null===c.calculatedDuration&&(c.calculatedDuration=it(c));const{calculatedDuration:u}=c,d=u+r;return{generator:c,mirroredGenerator:l,mapPercentToKeyframes:a,calculatedDuration:u,resolvedDuration:d,totalDuration:d*(n+1)-r}}onPostResolved(){const{autoplay:e=!0}=this.options;this.play(),"paused"!==this.pendingPlayState&&e?this.state=this.pendingPlayState:this.pause()}tick(e,t=!1){const{resolved:n}=this;if(!n){const{keyframes:e}=this.options;return{done:!0,value:e[e.length-1]}}const{finalKeyframe:r,generator:o,mirroredGenerator:i,mapPercentToKeyframes:s,keyframes:a,calculatedDuration:l,totalDuration:c,resolvedDuration:u}=n;if(null===this.startTime)return o.next(0);const{delay:d,repeat:h,repeatType:p,repeatDelay:f,onUpdate:m}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-c/this.speed,this.startTime)),t?this.currentTime=e:null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=Math.round(e-this.startTime)*this.speed;const g=this.currentTime-d*(this.speed>=0?1:-1),v=this.speed>=0?g<0:g>c;this.currentTime=Math.max(g,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=c);let y=this.currentTime,b=o;if(h){const e=Math.min(this.currentTime,c)/u;let t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),1===n&&t--,t=Math.min(t,h+1),Boolean(t%2)&&("reverse"===p?(n=1-n,f&&(n-=f/u)):"mirror"===p&&(b=i)),y=yn(0,1,n)*u}const x=v?{done:!1,value:a[0]}:b.next(y);s&&(x.value=s(x.value));let{done:w}=x;v||null===l||(w=this.speed>=0?this.currentTime>=c:this.currentTime<=0);const k=null===this.holdTime&&("finished"===this.state||"running"===this.state&&w);return k&&void 0!==r&&(x.value=Or(a,this.options,r)),m&&m(x.value),k&&this.finish(),x}get duration(){const{resolved:e}=this;return e?At(e.calculatedDuration):0}get time(){return At(this.currentTime)}set time(e){e=Rt(e),this.currentTime=e,null!==this.holdTime||0===this.speed?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.speed)}get speed(){return this.playbackSpeed}set speed(e){const t=this.playbackSpeed!==e;this.playbackSpeed=e,t&&(this.time=At(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved)return void(this.pendingPlayState="running");if(this.isStopped)return;const{driver:e=bo,onPlay:t,startTime:n}=this.options;this.driver||(this.driver=e(e=>this.tick(e))),t&&t();const r=this.driver.now();null!==this.holdTime?this.startTime=r-this.holdTime:this.startTime?"finished"===this.state&&(this.startTime=r):this.startTime=null!=n?n:this.calcStartTime(),"finished"===this.state&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var e;this._resolved?(this.state="paused",this.holdTime=null!==(e=this.currentTime)&&void 0!==e?e:0):this.pendingPlayState="paused"}complete(){"running"!==this.state&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:e}=this.options;e&&e()}cancel(){null!==this.cancelTime&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}}const Eo=new Set(["opacity","clipPath","filter","transform"]),So=Qe(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),jo={anticipate:hn,backInOut:dn,circInOut:mn};class Po extends Vr{constructor(e){super(e);const{name:t,motionValue:n,element:r,keyframes:o}=this.options;this.resolver=new Mr(o,(e,t)=>this.onKeyframesResolved(e,t),t,n,r),this.resolver.scheduleResolve()}initPlayback(e,t){let{duration:n=300,times:r,ease:o,type:i,motionValue:s,name:a,startTime:l}=this.options;if(!s.owner||!s.owner.current)return!1;var c;if("string"==typeof o&&dt()&&o in jo&&(o=jo[o]),st((c=this.options).type)||"spring"===c.type||!ft(c.ease)){const{onComplete:t,onUpdate:s,motionValue:a,element:l,...c}=this.options,u=function(e,t){const n=new ko({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const o=[];let i=0;for(;!r.done&&i<2e4;)r=n.sample(i),o.push(r.value),i+=10;return{times:void 0,keyframes:o,duration:i-10,ease:"linear"}}(e,c);1===(e=u.keyframes).length&&(e[1]=e[0]),n=u.duration,r=u.times,o=u.ease,i="keyframes"}const u=function(e,t,n,{delay:r=0,duration:o=300,repeat:i=0,repeatType:s="loop",ease:a="easeInOut",times:l}={}){const c={[t]:n};l&&(c.offset=l);const u=vt(a,o);return Array.isArray(u)&&(c.easing=u),e.animate(c,{delay:r,duration:o,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:i+1,direction:"reverse"===s?"alternate":"normal"})}(s.owner.current,a,e,{...this.options,duration:n,times:r,ease:o});return u.startTime=null!=l?l:this.calcStartTime(),this.pendingTimeline?(at(u,this.pendingTimeline),this.pendingTimeline=void 0):u.onfinish=()=>{const{onComplete:n}=this.options;s.set(Or(e,this.options,t)),n&&n(),this.cancel(),this.resolveFinishedPromise()},{animation:u,duration:n,times:r,type:i,ease:o,keyframes:e}}get duration(){const{resolved:e}=this;if(!e)return 0;const{duration:t}=e;return At(t)}get time(){const{resolved:e}=this;if(!e)return 0;const{animation:t}=e;return At(t.currentTime||0)}set time(e){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.currentTime=Rt(e)}get speed(){const{resolved:e}=this;if(!e)return 1;const{animation:t}=e;return t.playbackRate}set speed(e){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playbackRate=e}get state(){const{resolved:e}=this;if(!e)return"idle";const{animation:t}=e;return t.playState}get startTime(){const{resolved:e}=this;if(!e)return null;const{animation:t}=e;return t.startTime}attachTimeline(e){if(this._resolved){const{resolved:t}=this;if(!t)return Nt;const{animation:n}=t;at(n,e)}else this.pendingTimeline=e;return Nt}play(){if(this.isStopped)return;const{resolved:e}=this;if(!e)return;const{animation:t}=e;"finished"===t.playState&&this.updateFinishedPromise(),t.play()}pause(){const{resolved:e}=this;if(!e)return;const{animation:t}=e;t.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,"idle"===this.state)return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:e}=this;if(!e)return;const{animation:t,keyframes:n,duration:r,type:o,ease:i,times:s}=e;if("idle"===t.playState||"finished"===t.playState)return;if(this.time){const{motionValue:e,onUpdate:t,onComplete:a,element:l,...c}=this.options,u=new ko({...c,keyframes:n,duration:r,type:o,ease:i,times:s,isGenerator:!0}),d=Rt(this.time);e.setWithVelocity(u.sample(d-10).value,u.sample(d).value,10)}const{onStop:a}=this.options;a&&a(),this.cancel()}complete(){const{resolved:e}=this;e&&e.animation.finish()}cancel(){const{resolved:e}=this;e&&e.animation.cancel()}static supports(e){const{motionValue:t,name:n,repeatDelay:r,repeatType:o,damping:i,type:s}=e;if(!(t&&t.owner&&t.owner.current instanceof HTMLElement))return!1;const{onUpdate:a,transformTemplate:l}=t.owner.getProps();return So()&&n&&Eo.has(n)&&!a&&!l&&!r&&"mirror"!==o&&0!==i&&"inertia"!==s}}const To={type:"spring",stiffness:500,damping:25,restSpeed:10},Co={type:"keyframes",duration:.8},Ro={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Ao=(e,{keyframes:t})=>t.length>2?Co:Dt.has(e)?e.startsWith("scale")?{type:"spring",stiffness:550,damping:0===t[1]?2*Math.sqrt(550):30,restSpeed:10}:To:Ro,No=(e,t,n,r={},o,i)=>s=>{const a=rt(r,e)||{},l=a.delay||r.delay||0;let{elapsed:c=0}=r;c-=Rt(l);let u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-c,onUpdate:e=>{t.set(e),a.onUpdate&&a.onUpdate(e)},onComplete:()=>{s(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:i?void 0:o};(function({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:o,repeat:i,repeatType:s,repeatDelay:a,from:l,elapsed:c,...u}){return!!Object.keys(u).length})(a)||(u={...u,...Ao(e,u)}),u.duration&&(u.duration=Rt(u.duration)),u.repeatDelay&&(u.repeatDelay=Rt(u.repeatDelay)),void 0!==u.from&&(u.keyframes[0]=u.from);let d=!1;if((!1===u.type||0===u.duration&&!u.repeatDelay)&&(u.duration=0,0===u.delay&&(d=!0)),d&&!i&&void 0!==t.get()){const e=Or(u.keyframes,a);if(void 0!==e)return _t.update(()=>{u.onUpdate(e),u.onComplete()}),new nt([])}return!i&&Po.supports(u)?new Po(u):new ko(u)};function Mo({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&!0!==t[n];return t[n]=!1,r}function Do(e,t,{delay:n=0,transitionOverride:r,type:o}={}){var i;let{transition:s=e.getDefaultTransition(),transitionEnd:a,...l}=t;r&&(s=r);const c=[],u=o&&e.animationState&&e.animationState.getState()[o];for(const t in l){const r=e.getValue(t,null!==(i=e.latestValues[t])&&void 0!==i?i:null),o=l[t];if(void 0===o||u&&Mo(u,t))continue;const a={delay:n,...rt(s||{},t)};let d=!1;if(window.MotionHandoffAnimation){const n=rn(e);if(n){const e=window.MotionHandoffAnimation(n,t,_t);null!==e&&(a.startTime=e,d=!0)}}en(e,t),r.start(No(t,r,o,e.shouldReduceMotion&&Lt.has(t)?{type:!1}:a,e,d));const h=r.animation;h&&c.push(h)}return a&&Promise.all(c).then(()=>{_t.update(()=>{a&&function(e,t){const n=Xe(e,t);let{transitionEnd:r={},transition:o={},...i}=n||{};i={...i,...r};for(const t in i)Jt(e,t,It(i[t]))}(e,a)})}),c}function Lo(e,t,n={}){var r;const o=Xe(e,t,"exit"===n.type?null===(r=e.presenceContext)||void 0===r?void 0:r.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=o||{};n.transitionOverride&&(i=n.transitionOverride);const s=o?()=>Promise.all(Do(e,o,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(r=0)=>{const{delayChildren:o=0,staggerChildren:s,staggerDirection:a}=i;return function(e,t,n=0,r=0,o=1,i){const s=[],a=(e.variantChildren.size-1)*r,l=1===o?(e=0)=>e*r:(e=0)=>a-e*r;return Array.from(e.variantChildren).sort(Io).forEach((e,r)=>{e.notify("AnimationStart",t),s.push(Lo(e,t,{...i,delay:n+l(r)}).then(()=>e.notify("AnimationComplete",t)))}),Promise.all(s)}(e,t,o+r,s,a,n)}:()=>Promise.resolve(),{when:l}=i;if(l){const[e,t]="beforeChildren"===l?[s,a]:[a,s];return e().then(()=>t())}return Promise.all([s(),a(n.delay)])}function Io(e,t){return e.sortNodePosition(t)}const Oo=Je.length;function Vo(e){if(!e)return;if(!e.isControllingVariants){const t=e.parent&&Vo(e.parent)||{};return void 0!==e.props.initial&&(t.initial=e.props.initial),t}const t={};for(let n=0;n<Oo;n++){const r=Je[n],o=e.props[r];(qe(o)||!1===o)&&(t[r]=o)}return t}const _o=[...Ze].reverse(),Fo=Ze.length;function Bo(e){let t=function(e){return t=>Promise.all(t.map(({animation:t,options:n})=>function(e,t,n={}){let r;if(e.notify("AnimationStart",t),Array.isArray(t)){const o=t.map(t=>Lo(e,t,n));r=Promise.all(o)}else if("string"==typeof t)r=Lo(e,t,n);else{const o="function"==typeof t?Xe(e,t,n.custom):t;r=Promise.all(Do(e,o,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}(e,t,n)))}(e),n=Wo(),r=!0;const o=t=>(n,r)=>{var o;const i=Xe(e,r,"exit"===t?null===(o=e.presenceContext)||void 0===o?void 0:o.custom:void 0);if(i){const{transition:e,transitionEnd:t,...r}=i;n={...n,...r,...t}}return n};function i(i){const{props:s}=e,a=Vo(e.parent)||{},l=[],c=new Set;let u={},d=1/0;for(let t=0;t<Fo;t++){const h=_o[t],p=n[h],f=void 0!==s[h]?s[h]:a[h],m=qe(f),g=h===i?p.isActive:null;!1===g&&(d=t);let v=f===a[h]&&f!==s[h]&&m;if(v&&r&&e.manuallyAnimateOnMount&&(v=!1),p.protectedKeys={...u},!p.isActive&&null===g||!f&&!p.prevProp||$e(f)||"boolean"==typeof f)continue;const y=zo(p.prevProp,f);let b=y||h===i&&p.isActive&&!v&&m||t>d&&m,x=!1;const w=Array.isArray(f)?f:[f];let k=w.reduce(o(h),{});!1===g&&(k={});const{prevResolvedValues:E={}}=p,S={...E,...k},j=t=>{b=!0,c.has(t)&&(x=!0,c.delete(t)),p.needsAnimating[t]=!0;const n=e.getValue(t);n&&(n.liveStyle=!1)};for(const e in S){const t=k[e],n=E[e];if(u.hasOwnProperty(e))continue;let r=!1;r=He(t)&&He(n)?!Ke(t,n):t!==n,r?null!=t?j(e):c.add(e):void 0!==t&&c.has(e)?j(e):p.protectedKeys[e]=!0}p.prevProp=f,p.prevResolvedValues=k,p.isActive&&(u={...u,...k}),r&&e.blockInitialAnimation&&(b=!1),b&&(!v||!y||x)&&l.push(...w.map(e=>({animation:e,options:{type:h}})))}if(c.size){const t={};c.forEach(n=>{const r=e.getBaseTarget(n),o=e.getValue(n);o&&(o.liveStyle=!0),t[n]=null!=r?r:null}),l.push({animation:t})}let h=Boolean(l.length);return!r||!1!==s.initial&&s.initial!==s.animate||e.manuallyAnimateOnMount||(h=!1),r=!1,h?t(l):Promise.resolve()}return{animateChanges:i,setActive:function(t,r){var o;if(n[t].isActive===r)return Promise.resolve();null===(o=e.variantChildren)||void 0===o||o.forEach(e=>{var n;return null===(n=e.animationState)||void 0===n?void 0:n.setActive(t,r)}),n[t].isActive=r;const s=i(t);for(const e in n)n[e].protectedKeys={};return s},setAnimateFunction:function(n){t=n(e)},getState:()=>n,reset:()=>{n=Wo(),r=!0}}}function zo(e,t){return"string"==typeof t?t!==e:!!Array.isArray(t)&&!Ke(t,e)}function Uo(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Wo(){return{animate:Uo(!0),whileInView:Uo(),whileHover:Uo(),whileTap:Uo(),whileDrag:Uo(),whileFocus:Uo(),exit:Uo()}}class $o{constructor(e){this.isMounted=!1,this.node=e}update(){}}let Ho=0;const Ko={animation:{Feature:class extends $o{constructor(e){super(e),e.animationState||(e.animationState=Bo(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();$e(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){var e;this.node.animationState.reset(),null===(e=this.unmountControls)||void 0===e||e.call(this)}}},exit:{Feature:class extends $o{constructor(){super(...arguments),this.id=Ho++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===n)return;const r=this.node.animationState.setActive("exit",!e);t&&!e&&r.then(()=>t(this.id))}mount(){const{register:e}=this.node.presenceContext||{};e&&(this.unmount=e(this.id))}unmount(){}}}};function qo(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function Yo(e){return{point:{x:e.pageX,y:e.pageY}}}function Go(e,t,n,r){return qo(e,t,(e=>t=>Et(t)&&e(t,Yo(t)))(n),r)}const Xo=(e,t)=>Math.abs(e-t);class Zo{constructor(e,t,{transformPagePoint:n,contextWindow:r,dragSnapToOrigin:o=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!this.lastMoveEvent||!this.lastMoveEventInfo)return;const e=ei(this.lastMoveEventInfo,this.history),t=null!==this.startEvent,n=function(e,t){const n=Xo(e.x,t.x),r=Xo(e.y,t.y);return Math.sqrt(n**2+r**2)}(e.offset,{x:0,y:0})>=3;if(!t&&!n)return;const{point:r}=e,{timestamp:o}=Bt;this.history.push({...r,timestamp:o});const{onStart:i,onMove:s}=this.handlers;t||(i&&i(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),s&&s(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastMoveEventInfo=Jo(t,this.transformPagePoint),_t.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.end();const{onEnd:n,onSessionEnd:r,resumeAnimation:o}=this.handlers;if(this.dragSnapToOrigin&&o&&o(),!this.lastMoveEvent||!this.lastMoveEventInfo)return;const i=ei("pointercancel"===e.type?this.lastMoveEventInfo:Jo(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,i),r&&r(e,i)},!Et(e))return;this.dragSnapToOrigin=o,this.handlers=t,this.transformPagePoint=n,this.contextWindow=r||window;const i=Jo(Yo(e),this.transformPagePoint),{point:s}=i,{timestamp:a}=Bt;this.history=[{...s,timestamp:a}];const{onSessionStart:l}=t;l&&l(e,ei(i,this.history)),this.removeListeners=Kr(Go(this.contextWindow,"pointermove",this.handlePointerMove),Go(this.contextWindow,"pointerup",this.handlePointerUp),Go(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),Ft(this.updatePoint)}}function Jo(e,t){return t?{point:t(e.point)}:e}function Qo(e,t){return{x:e.x-t.x,y:e.y-t.y}}function ei({point:e},t){return{point:e,delta:Qo(e,ni(t)),offset:Qo(e,ti(t)),velocity:ri(t,.1)}}function ti(e){return e[0]}function ni(e){return e[e.length-1]}function ri(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=ni(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>Rt(t)));)n--;if(!r)return{x:0,y:0};const i=At(o.timestamp-r.timestamp);if(0===i)return{x:0,y:0};const s={x:(o.x-r.x)/i,y:(o.y-r.y)/i};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}function oi(e){return e&&"object"==typeof e&&Object.prototype.hasOwnProperty.call(e,"current")}function ii(e){return e.max-e.min}function si(e,t,n,r=.5){e.origin=r,e.originPoint=_r(t.min,t.max,e.origin),e.scale=ii(n)/ii(t),e.translate=_r(n.min,n.max,e.origin)-e.originPoint,(e.scale>=.9999&&e.scale<=1.0001||isNaN(e.scale))&&(e.scale=1),(e.translate>=-.01&&e.translate<=.01||isNaN(e.translate))&&(e.translate=0)}function ai(e,t,n,r){si(e.x,t.x,n.x,r?r.originX:void 0),si(e.y,t.y,n.y,r?r.originY:void 0)}function li(e,t,n){e.min=n.min+t.min,e.max=e.min+ii(t)}function ci(e,t,n){e.min=t.min-n.min,e.max=e.min+ii(t)}function ui(e,t,n){ci(e.x,t.x,n.x),ci(e.y,t.y,n.y)}function di(e,t,n){return{min:void 0!==t?e.min+t:void 0,max:void 0!==n?e.max+n-(e.max-e.min):void 0}}function hi(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}}const pi=.35;function fi(e,t,n){return{min:mi(e,t),max:mi(e,n)}}function mi(e,t){return"number"==typeof e?e:e[t]||0}const gi=()=>({x:{min:0,max:0},y:{min:0,max:0}});function vi(e){return[e("x"),e("y")]}function yi({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function bi(e){return void 0===e||1===e}function xi({scale:e,scaleX:t,scaleY:n}){return!bi(e)||!bi(t)||!bi(n)}function wi(e){return xi(e)||ki(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function ki(e){return Ei(e.x)||Ei(e.y)}function Ei(e){return e&&"0%"!==e}function Si(e,t,n){return n+t*(e-n)}function ji(e,t,n,r,o){return void 0!==o&&(e=Si(e,o,r)),Si(e,n,r)+t}function Pi(e,t=0,n=1,r,o){e.min=ji(e.min,t,n,r,o),e.max=ji(e.max,t,n,r,o)}function Ti(e,{x:t,y:n}){Pi(e.x,t.translate,t.scale,t.originPoint),Pi(e.y,n.translate,n.scale,n.originPoint)}const Ci=.999999999999,Ri=1.0000000000001;function Ai(e,t){e.min=e.min+t,e.max=e.max+t}function Ni(e,t,n,r,o=.5){Pi(e,t,n,_r(e.min,e.max,o),r)}function Mi(e,t){Ni(e.x,t.x,t.scaleX,t.scale,t.originX),Ni(e.y,t.y,t.scaleY,t.scale,t.originY)}function Di(e,t){return yi(function(e,t){if(!t)return e;const 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}}(e.getBoundingClientRect(),t))}const Li=({current:e})=>e?e.ownerDocument.defaultView:null,Ii=new WeakMap;class Oi{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={x:{min:0,max:0},y:{min:0,max:0}},this.visualElement=e}start(e,{snapToCursor:t=!1}={}){const{presenceContext:n}=this.visualElement;if(n&&!1===n.isPresent)return;const{dragSnapToOrigin:r}=this.getProps();this.panSession=new Zo(e,{onSessionStart:e=>{const{dragSnapToOrigin:n}=this.getProps();n?this.pauseAnimation():this.stopAnimation(),t&&this.snapToCursor(Yo(e).point)},onStart:(e,t)=>{const{drag:n,dragPropagation:r,onDragStart:o}=this.getProps();if(n&&!r&&(this.openDragLock&&this.openDragLock(),this.openDragLock="x"===(i=n)||"y"===i?yt[i]?null:(yt[i]=!0,()=>{yt[i]=!1}):yt.x||yt.y?null:(yt.x=yt.y=!0,()=>{yt.x=yt.y=!1}),!this.openDragLock))return;var i;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),vi(e=>{let t=this.getAxisMotionValue(e).get()||0;if(Mn.test(t)){const{projection:n}=this.visualElement;if(n&&n.layout){const r=n.layout.layoutBox[e];r&&(t=ii(r)*(parseFloat(t)/100))}}this.originPoint[e]=t}),o&&_t.postRender(()=>o(e,t)),en(this.visualElement,"transform");const{animationState:s}=this.visualElement;s&&s.setActive("whileDrag",!0)},onMove:(e,t)=>{const{dragPropagation:n,dragDirectionLock:r,onDirectionLock:o,onDrag:i}=this.getProps();if(!n&&!this.openDragLock)return;const{offset:s}=t;if(r&&null===this.currentDirection)return this.currentDirection=function(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}(s),void(null!==this.currentDirection&&o&&o(this.currentDirection));this.updateAxis("x",t.point,s),this.updateAxis("y",t.point,s),this.visualElement.render(),i&&i(e,t)},onSessionEnd:(e,t)=>this.stop(e,t),resumeAnimation:()=>vi(e=>{var t;return"paused"===this.getAnimationState(e)&&(null===(t=this.getAxisMotionValue(e).animation)||void 0===t?void 0:t.play())})},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:r,contextWindow:Li(this.visualElement)})}stop(e,t){const n=this.isDragging;if(this.cancel(),!n)return;const{velocity:r}=t;this.startAnimation(r);const{onDragEnd:o}=this.getProps();o&&_t.postRender(()=>o(e,t))}cancel(){this.isDragging=!1;const{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),t&&t.setActive("whileDrag",!1)}updateAxis(e,t,n){const{drag:r}=this.getProps();if(!n||!Vi(e,r,this.currentDirection))return;const o=this.getAxisMotionValue(e);let i=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(i=function(e,{min:t,max:n},r){return void 0!==t&&e<t?e=r?_r(t,e,r.min):Math.max(e,t):void 0!==n&&e>n&&(e=r?_r(n,e,r.max):Math.min(e,n)),e}(i,this.constraints[e],this.elastic[e])),o.set(i)}resolveConstraints(){var e;const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):null===(e=this.visualElement.projection)||void 0===e?void 0:e.layout,o=this.constraints;t&&oi(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!t||!r)&&function(e,{top:t,left:n,bottom:r,right:o}){return{x:di(e.x,n,o),y:di(e.y,t,r)}}(r.layoutBox,t),this.elastic=function(e=pi){return!1===e?e=0:!0===e&&(e=pi),{x:fi(e,"left","right"),y:fi(e,"top","bottom")}}(n),o!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&vi(e=>{!1!==this.constraints&&this.getAxisMotionValue(e)&&(this.constraints[e]=function(e,t){const n={};return void 0!==t.min&&(n.min=t.min-e.min),void 0!==t.max&&(n.max=t.max-e.min),n}(r.layoutBox[e],this.constraints[e]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!oi(e))return!1;const n=e.current;xr(null!==n,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:r}=this.visualElement;if(!r||!r.layout)return!1;const o=function(e,t,n){const r=Di(e,n),{scroll:o}=t;return o&&(Ai(r.x,o.offset.x),Ai(r.y,o.offset.y)),r}(n,r.root,this.visualElement.getTransformPagePoint());let i=function(e,t){return{x:hi(e.x,t.x),y:hi(e.y,t.y)}}(r.layout.layoutBox,o);if(t){const e=t(function({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}(i));this.hasMutatedConstraints=!!e,e&&(i=yi(e))}return i}startAnimation(e){const{drag:t,dragMomentum:n,dragElastic:r,dragTransition:o,dragSnapToOrigin:i,onDragTransitionEnd:s}=this.getProps(),a=this.constraints||{},l=vi(s=>{if(!Vi(s,t,this.currentDirection))return;let l=a&&a[s]||{};i&&(l={min:0,max:0});const c=r?200:1e6,u=r?40:1e7,d={type:"inertia",velocity:n?e[s]:0,bounceStiffness:c,bounceDamping:u,timeConstant:750,restDelta:1,restSpeed:10,...o,...l};return this.startAxisValueAnimation(s,d)});return Promise.all(l).then(s)}startAxisValueAnimation(e,t){const n=this.getAxisMotionValue(e);return en(this.visualElement,e),n.start(No(e,n,0,t,this.visualElement,!1))}stopAnimation(){vi(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){vi(e=>{var t;return null===(t=this.getAxisMotionValue(e).animation)||void 0===t?void 0:t.pause()})}getAnimationState(e){var t;return null===(t=this.getAxisMotionValue(e).animation)||void 0===t?void 0:t.state}getAxisMotionValue(e){const t=`_drag${e.toUpperCase()}`,n=this.visualElement.getProps();return n[t]||this.visualElement.getValue(e,(n.initial?n.initial[e]:void 0)||0)}snapToCursor(e){vi(t=>{const{drag:n}=this.getProps();if(!Vi(t,n,this.currentDirection))return;const{projection:r}=this.visualElement,o=this.getAxisMotionValue(t);if(r&&r.layout){const{min:n,max:i}=r.layout.layoutBox[t];o.set(e[t]-_r(n,i,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!oi(t)||!n||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};vi(e=>{const t=this.getAxisMotionValue(e);if(t&&!1!==this.constraints){const n=t.get();r[e]=function(e,t){let n=.5;const r=ii(e),o=ii(t);return o>r?n=ht(t.min,t.max-r,e.min):r>o&&(n=ht(e.min,e.max-o,t.min)),yn(0,1,n)}({min:n,max:n},this.constraints[e])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),vi(t=>{if(!Vi(t,e,null))return;const n=this.getAxisMotionValue(t),{min:o,max:i}=this.constraints[t];n.set(_r(o,i,r[t]))})}addListeners(){if(!this.visualElement.current)return;Ii.set(this.visualElement,this);const e=Go(this.visualElement.current,"pointerdown",e=>{const{drag:t,dragListener:n=!0}=this.getProps();t&&n&&this.start(e)}),t=()=>{const{dragConstraints:e}=this.getProps();oi(e)&&e.current&&(this.constraints=this.resolveRefConstraints())},{projection:n}=this.visualElement,r=n.addEventListener("measure",t);n&&!n.layout&&(n.root&&n.root.updateScroll(),n.updateLayout()),_t.read(t);const o=qo(window,"resize",()=>this.scalePositionWithinConstraints()),i=n.addEventListener("didUpdate",({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(vi(t=>{const n=this.getAxisMotionValue(t);n&&(this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate))}),this.visualElement.render())});return()=>{o(),e(),r(),i&&i()}}getProps(){const e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:o=!1,dragElastic:i=pi,dragMomentum:s=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:o,dragElastic:i,dragMomentum:s}}}function Vi(e,t,n){return!(!0!==t&&t!==e||null!==n&&n!==e)}const _i=e=>(t,n)=>{e&&_t.postRender(()=>e(t,n))},Fi=(0,i.createContext)({}),Bi={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function zi(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Ui={correct:(e,t)=>{if(!t.target)return e;if("string"==typeof e){if(!Dn.test(e))return e;e=parseFloat(e)}return`${zi(e,t.target.x)}% ${zi(e,t.target.y)}%`}},Wi={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=Yn.parse(e);if(o.length>5)return r;const i=Yn.createTransformer(e),s="number"!=typeof o[0]?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;o[0+s]/=a,o[1+s]/=l;const c=_r(a,l,.5);return"number"==typeof o[2+s]&&(o[2+s]/=c),"number"==typeof o[3+s]&&(o[3+s]/=c),i(o)}},$i={},{schedule:Hi,cancel:Ki}=Vt(queueMicrotask,!1);class qi extends i.Component{componentDidMount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:o}=e;var i;i=Gi,Object.assign($i,i),o&&(t.group&&t.group.add(o),n&&n.register&&r&&n.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),Bi.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:t,visualElement:n,drag:r,isPresent:o}=this.props,i=n.projection;return i?(i.isPresent=o,r||e.layoutDependency!==t||void 0===t?i.willUpdate():this.safeToRemove(),e.isPresent!==o&&(o?i.promote():i.relegate()||_t.postRender(()=>{const e=i.getStack();e&&e.members.length||this.safeToRemove()})),null):null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),Hi.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;r&&(r.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(r),n&&n.deregister&&n.deregister(r))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function Yi(e){const[t,n]=Ve(),r=(0,i.useContext)(Re);return(0,o.jsx)(qi,{...e,layoutGroup:r,switchLayoutGroup:(0,i.useContext)(Fi),isPresent:t,safeToRemove:n})}const Gi={borderRadius:{...Ui,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Ui,borderTopRightRadius:Ui,borderBottomLeftRadius:Ui,borderBottomRightRadius:Ui,boxShadow:Wi},Xi=(e,t)=>e.depth-t.depth;class Zi{constructor(){this.children=[],this.isDirty=!1}add(e){Ht(this.children,e),this.isDirty=!0}remove(e){Kt(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(Xi),this.isDirty=!1,this.children.forEach(e)}}function Ji(e){const t=Qt(e)?e.get():e;return n=t,Boolean(n&&"object"==typeof n&&n.mix&&n.toValue)?t.toValue():t;var n}const Qi=["TopLeft","TopRight","BottomLeft","BottomRight"],es=Qi.length,ts=e=>"string"==typeof e?parseFloat(e):e,ns=e=>"number"==typeof e||Dn.test(e);function rs(e,t){return void 0!==e[t]?e[t]:e.borderRadius}const os=ss(0,.5,fn),is=ss(.5,.95,Nt);function ss(e,t,n){return r=>r<e?0:r>t?1:n(ht(e,t,r))}function as(e,t){e.min=t.min,e.max=t.max}function ls(e,t){as(e.x,t.x),as(e.y,t.y)}function cs(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function us(e,t,n,r,o){return e=Si(e-=t,1/n,r),void 0!==o&&(e=Si(e,1/o,r)),e}function ds(e,t,[n,r,o],i,s){!function(e,t=0,n=1,r=.5,o,i=e,s=e){if(Mn.test(t)&&(t=parseFloat(t),t=_r(s.min,s.max,t/100)-s.min),"number"!=typeof t)return;let a=_r(i.min,i.max,r);e===i&&(a-=t),e.min=us(e.min,t,n,a,o),e.max=us(e.max,t,n,a,o)}(e,t[n],t[r],t[o],t.scale,i,s)}const hs=["x","scaleX","originX"],ps=["y","scaleY","originY"];function fs(e,t,n,r){ds(e.x,t,hs,n?n.x:void 0,r?r.x:void 0),ds(e.y,t,ps,n?n.y:void 0,r?r.y:void 0)}function ms(e){return 0===e.translate&&1===e.scale}function gs(e){return ms(e.x)&&ms(e.y)}function vs(e,t){return e.min===t.min&&e.max===t.max}function ys(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function bs(e,t){return ys(e.x,t.x)&&ys(e.y,t.y)}function xs(e){return ii(e.x)/ii(e.y)}function ws(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class ks{constructor(){this.members=[]}add(e){Ht(this.members,e),e.scheduleRender()}remove(e){if(Kt(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){const t=this.members.findIndex(t=>e===t);if(0===t)return!1;let n;for(let e=t;e>=0;e--){const t=this.members[e];if(!1!==t.isPresent){n=t;break}}return!!n&&(this.promote(n),!0)}promote(e,t){const n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.instance&&n.scheduleRender(),e.scheduleRender(),e.resumeFrom=n,t&&(e.resumeFrom.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:r}=e.options;!1===r&&n.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:t,resumingFrom:n}=e;t.onExitComplete&&t.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const Es={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},Ss="undefined"!=typeof window&&void 0!==window.MotionDebug,js=["","X","Y","Z"],Ps={visibility:"hidden"};let Ts=0;function Cs(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Rs(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=rn(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:t,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",_t,!(t||r))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&Rs(r)}function As({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(e={},n=(null==t?void 0:t())){this.id=Ts++,this.animationId=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,Ss&&(Es.totalNodes=Es.resolvedTargetDeltas=Es.recalculatedProjection=0),this.nodes.forEach(Ds),this.nodes.forEach(Bs),this.nodes.forEach(zs),this.nodes.forEach(Ls),Ss&&window.MotionDebug.record(Es)},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 Zi)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new qt),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){const n=this.eventHandlers.get(e);n&&n.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t,n=this.root.hasTreeAnimated){if(this.instance)return;var r;this.isSVG=(r=t)instanceof SVGElement&&"svg"!==r.tagName,this.instance=t;const{layoutId:o,layout:i,visualElement:s}=this.options;if(s&&!s.current&&s.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),n&&(i||o)&&(this.isLayoutDirty=!0),e){let n;const r=()=>this.root.updateBlockedByResize=!1;e(t,()=>{this.root.updateBlockedByResize=!0,n&&n(),n=function(e,t){const n=$t.now(),r=({timestamp:o})=>{const i=o-n;i>=t&&(Ft(r),e(i-t))};return _t.read(r,!0),()=>Ft(r)}(r,250),Bi.hasAnimatedSinceResize&&(Bi.hasAnimatedSinceResize=!1,this.nodes.forEach(Fs))})}o&&this.root.registerSharedNode(o,this),!1!==this.options.animate&&s&&(o||i)&&this.addEventListener("didUpdate",({delta:e,hasLayoutChanged:t,hasRelativeTargetChanged:n,layout:r})=>{if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const o=this.options.transition||s.getDefaultTransition()||qs,{onLayoutAnimationStart:i,onLayoutAnimationComplete:a}=s.getProps(),l=!this.targetLayout||!bs(this.targetLayout,r)||n,c=!t&&n;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||c||t&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(e,c);const t={...rt(o,"layout"),onPlay:i,onComplete:a};(s.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t)}else t||Fs(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=r})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Ft(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(Us),this.animationId++)}getTransformTemplate(){const{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked())return void(this.options.onExitComplete&&this.options.onExitComplete());if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Rs(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let e=0;e<this.path.length;e++){const t=this.path[e];t.shouldResetTransform=!0,t.updateScroll("snapshot"),t.options.layoutRoot&&t.willUpdate(!1)}const{layoutId:t,layout:n}=this.options;if(void 0===t&&!n)return;const r=this.getTransformTemplate();this.prevTransformTemplateValue=r?r(this.latestValues,""):void 0,this.updateSnapshot(),e&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked())return this.unblockUpdate(),this.clearAllSnapshots(),void this.nodes.forEach(Os);this.isUpdating||this.nodes.forEach(Vs),this.isUpdating=!1,this.nodes.forEach(_s),this.nodes.forEach(Ns),this.nodes.forEach(Ms),this.clearAllSnapshots();const e=$t.now();Bt.delta=yn(0,1e3/60,e-Bt.timestamp),Bt.timestamp=e,Bt.isProcessing=!0,zt.update.process(Bt),zt.preRender.process(Bt),zt.render.process(Bt),Bt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Hi.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Is),this.sharedNodes.forEach(Ws)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,_t.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){_t.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure())}updateLayout(){if(!this.instance)return;if(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();const e=this.layout;this.layout=this.measure(!1),this.layoutCorrected={x:{min:0,max:0},y:{min:0,max:0}},this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:t}=this.options;t&&t.notify("LayoutMeasure",this.layout.layoutBox,e?e.layoutBox:void 0)}updateScroll(e="measure"){let t=Boolean(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t){const 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(!o)return;const e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,t=this.projectionDelta&&!gs(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,""):void 0,i=r!==this.prevTransformTemplateValue;e&&(t||wi(this.latestValues)||i)&&(o(this.instance,r),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){const t=this.measurePageBox();let n=this.removeElementScroll(t);var r;return e&&(n=this.removeTransform(n)),Xs((r=n).x),Xs(r.y),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){var e;const{visualElement:t}=this.options;if(!t)return{x:{min:0,max:0},y:{min:0,max:0}};const n=t.measureViewportBox();if(!(null===(e=this.scroll)||void 0===e?void 0:e.wasRoot)&&!this.path.some(Js)){const{scroll:e}=this.root;e&&(Ai(n.x,e.offset.x),Ai(n.y,e.offset.y))}return n}removeElementScroll(e){var t;const n={x:{min:0,max:0},y:{min:0,max:0}};if(ls(n,e),null===(t=this.scroll)||void 0===t?void 0:t.wasRoot)return n;for(let t=0;t<this.path.length;t++){const r=this.path[t],{scroll:o,options:i}=r;r!==this.root&&o&&i.layoutScroll&&(o.wasRoot&&ls(n,e),Ai(n.x,o.offset.x),Ai(n.y,o.offset.y))}return n}applyTransform(e,t=!1){const n={x:{min:0,max:0},y:{min:0,max:0}};ls(n,e);for(let e=0;e<this.path.length;e++){const r=this.path[e];!t&&r.options.layoutScroll&&r.scroll&&r!==r.root&&Mi(n,{x:-r.scroll.offset.x,y:-r.scroll.offset.y}),wi(r.latestValues)&&Mi(n,r.latestValues)}return wi(this.latestValues)&&Mi(n,this.latestValues),n}removeTransform(e){const t={x:{min:0,max:0},y:{min:0,max:0}};ls(t,e);for(let e=0;e<this.path.length;e++){const n=this.path[e];if(!n.instance)continue;if(!wi(n.latestValues))continue;xi(n.latestValues)&&n.updateSnapshot();const r=gi();ls(r,n.measurePageBox()),fs(t,n.latestValues,n.snapshot?n.snapshot.layoutBox:void 0,r)}return wi(this.latestValues)&&fs(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:void 0===e.crossfade||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!==Bt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){var t;const n=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=n.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=n.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=n.isSharedProjectionDirty);const r=Boolean(this.resumingFrom)||this!==n;if(!(e||r&&this.isSharedProjectionDirty||this.isProjectionDirty||(null===(t=this.parent)||void 0===t?void 0:t.isProjectionDirty)||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:o,layoutId:i}=this.options;if(this.layout&&(o||i)){if(this.resolvedRelativeTargetAt=Bt.timestamp,!this.targetDelta&&!this.relativeTarget){const e=this.getClosestProjectingParent();e&&e.layout&&1!==this.animationProgress?(this.relativeParent=e,this.forceRelativeParentToResolveTarget(),this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},ui(this.relativeTargetOrigin,this.layout.layoutBox,e.layout.layoutBox),ls(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(this.relativeTarget||this.targetDelta){var s,a,l;if(this.target||(this.target={x:{min:0,max:0},y:{min:0,max:0}},this.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}}),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),s=this.target,a=this.relativeTarget,l=this.relativeParent.target,li(s.x,a.x,l.x),li(s.y,a.y,l.y)):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.layoutBox):ls(this.target,this.layout.layoutBox),Ti(this.target,this.targetDelta)):ls(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const e=this.getClosestProjectingParent();e&&Boolean(e.resumingFrom)===Boolean(this.resumingFrom)&&!e.options.layoutScroll&&e.target&&1!==this.animationProgress?(this.relativeParent=e,this.forceRelativeParentToResolveTarget(),this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},ui(this.relativeTargetOrigin,this.target,e.target),ls(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}Ss&&Es.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(this.parent&&!xi(this.parent.latestValues)&&!ki(this.parent.latestValues))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return Boolean((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var e;const t=this.getLead(),n=Boolean(this.resumingFrom)||this!==t;let r=!0;if((this.isProjectionDirty||(null===(e=this.parent)||void 0===e?void 0:e.isProjectionDirty))&&(r=!1),n&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(r=!1),this.resolvedRelativeTargetAt===Bt.timestamp&&(r=!1),r)return;const{layout:o,layoutId:i}=this.options;if(this.isTreeAnimating=Boolean(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!o&&!i)return;ls(this.layoutCorrected,this.layout.layoutBox);const s=this.treeScale.x,a=this.treeScale.y;!function(e,t,n,r=!1){const o=n.length;if(!o)return;let i,s;t.x=t.y=1;for(let a=0;a<o;a++){i=n[a],s=i.projectionDelta;const{visualElement:o}=i.options;o&&o.props.style&&"contents"===o.props.style.display||(r&&i.options.layoutScroll&&i.scroll&&i!==i.root&&Mi(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),s&&(t.x*=s.x.scale,t.y*=s.y.scale,Ti(e,s)),r&&wi(i.latestValues)&&Mi(e,i.latestValues))}t.x<Ri&&t.x>Ci&&(t.x=1),t.y<Ri&&t.y>Ci&&(t.y=1)}(this.layoutCorrected,this.treeScale,this.path,n),!t.layout||t.target||1===this.treeScale.x&&1===this.treeScale.y||(t.target=t.layout.layoutBox,t.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}});const{target:l}=t;l?(this.projectionDelta&&this.prevProjectionDelta?(cs(this.prevProjectionDelta.x,this.projectionDelta.x),cs(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),ai(this.projectionDelta,this.layoutCorrected,l,this.latestValues),this.treeScale.x===s&&this.treeScale.y===a&&ws(this.projectionDelta.x,this.prevProjectionDelta.x)&&ws(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",l)),Ss&&Es.recalculatedProjection++):this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender())}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){var t;if(null===(t=this.options.visualElement)||void 0===t||t.scheduleRender(),e){const e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDeltaWithTransform={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}}setAnimationOrigin(e,t=!1){const n=this.snapshot,r=n?n.latestValues:{},o={...this.latestValues},i={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;const s={x:{min:0,max:0},y:{min:0,max:0}},a=(n?n.source:void 0)!==(this.layout?this.layout.source:void 0),l=this.getStack(),c=!l||l.members.length<=1,u=Boolean(a&&!c&&!0===this.options.crossfade&&!this.path.some(Ks));let d;this.animationProgress=0,this.mixTargetDelta=t=>{const n=t/1e3;$s(i.x,e.x,n),$s(i.y,e.y,n),this.setTargetDelta(i),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(ui(s,this.layout.layoutBox,this.relativeParent.layout.layoutBox),function(e,t,n,r){Hs(e.x,t.x,n.x,r),Hs(e.y,t.y,n.y,r)}(this.relativeTarget,this.relativeTargetOrigin,s,n),d&&function(e,t){return vs(e.x,t.x)&&vs(e.y,t.y)}(this.relativeTarget,d)&&(this.isProjectionDirty=!1),d||(d={x:{min:0,max:0},y:{min:0,max:0}}),ls(d,this.relativeTarget)),a&&(this.animationValues=o,function(e,t,n,r,o,i){o?(e.opacity=_r(0,void 0!==n.opacity?n.opacity:1,os(r)),e.opacityExit=_r(void 0!==t.opacity?t.opacity:1,0,is(r))):i&&(e.opacity=_r(void 0!==t.opacity?t.opacity:1,void 0!==n.opacity?n.opacity:1,r));for(let o=0;o<es;o++){const i=`border${Qi[o]}Radius`;let s=rs(t,i),a=rs(n,i);void 0===s&&void 0===a||(s||(s=0),a||(a=0),0===s||0===a||ns(s)===ns(a)?(e[i]=Math.max(_r(ts(s),ts(a),r),0),(Mn.test(a)||Mn.test(s))&&(e[i]+="%")):e[i]=a)}(t.rotate||n.rotate)&&(e.rotate=_r(t.rotate||0,n.rotate||0,r))}(o,r,this.latestValues,n,u,c)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Ft(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=_t.update(()=>{Bi.hasAnimatedSinceResize=!0,this.currentAnimation=function(e,t,n){const r=Qt(0)?0:Zt(0);return r.start(No("",r,1e3,n)),r.animation}(0,0,{...e,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onComplete:()=>{e.onComplete&&e.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const e=this.getLead();let{targetWithTransforms:t,target:n,layout:r,latestValues:o}=e;if(t&&n&&r){if(this!==e&&this.layout&&r&&Zs(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||{x:{min:0,max:0},y:{min:0,max:0}};const t=ii(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;const r=ii(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}ls(t,n),Mi(t,o),ai(this.projectionDeltaWithTransform,this.layoutCorrected,t,o)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new ks),this.sharedNodes.get(e).add(t);const n=t.options.initialPromotionConfig;t.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(t):void 0})}isLead(){const e=this.getStack();return!e||e.lead===this}getLead(){var e;const{layoutId:t}=this.options;return t&&(null===(e=this.getStack())||void 0===e?void 0:e.lead)||this}getPrevLead(){var e;const{layoutId:t}=this.options;return t?null===(e=this.getStack())||void 0===e?void 0:e.prevLead:void 0}getStack(){const{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){const r=this.getStack();r&&r.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){const e=this.getStack();return!!e&&e.relegate(this)}resetSkewAndRotation(){const{visualElement:e}=this.options;if(!e)return;let t=!1;const{latestValues:n}=e;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(t=!0),!t)return;const r={};n.z&&Cs("z",e,r,this.animationValues);for(let t=0;t<js.length;t++)Cs(`rotate${js[t]}`,e,r,this.animationValues),Cs(`skew${js[t]}`,e,r,this.animationValues);e.render();for(const t in r)e.setStaticValue(t,r[t]),this.animationValues&&(this.animationValues[t]=r[t]);e.scheduleRender()}getProjectionStyles(e){var t,n;if(!this.instance||this.isSVG)return;if(!this.isVisible)return Ps;const r={visibility:""},o=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,r.opacity="",r.pointerEvents=Ji(null==e?void 0:e.pointerEvents)||"",r.transform=o?o(this.latestValues,""):"none",r;const i=this.getLead();if(!this.projectionDelta||!this.layout||!i.target){const t={};return this.options.layoutId&&(t.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,t.pointerEvents=Ji(null==e?void 0:e.pointerEvents)||""),this.hasProjected&&!wi(this.latestValues)&&(t.transform=o?o({},""):"none",this.hasProjected=!1),t}const s=i.animationValues||i.latestValues;this.applyTransformsToTarget(),r.transform=function(e,t,n){let r="";const o=e.x.translate/t.x,i=e.y.translate/t.y,s=(null==n?void 0:n.z)||0;if((o||i||s)&&(r=`translate3d(${o}px, ${i}px, ${s}px) `),1===t.x&&1===t.y||(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:e,rotate:t,rotateX:o,rotateY:i,skewX:s,skewY:a}=n;e&&(r=`perspective(${e}px) ${r}`),t&&(r+=`rotate(${t}deg) `),o&&(r+=`rotateX(${o}deg) `),i&&(r+=`rotateY(${i}deg) `),s&&(r+=`skewX(${s}deg) `),a&&(r+=`skewY(${a}deg) `)}const a=e.x.scale*t.x,l=e.y.scale*t.y;return 1===a&&1===l||(r+=`scale(${a}, ${l})`),r||"none"}(this.projectionDeltaWithTransform,this.treeScale,s),o&&(r.transform=o(s,r.transform));const{x:a,y:l}=this.projectionDelta;r.transformOrigin=`${100*a.origin}% ${100*l.origin}% 0`,i.animationValues?r.opacity=i===this?null!==(n=null!==(t=s.opacity)&&void 0!==t?t:this.latestValues.opacity)&&void 0!==n?n:1:this.preserveOpacity?this.latestValues.opacity:s.opacityExit:r.opacity=i===this?void 0!==s.opacity?s.opacity:"":void 0!==s.opacityExit?s.opacityExit:0;for(const e in $i){if(void 0===s[e])continue;const{correct:t,applyTo:n}=$i[e],o="none"===r.transform?s[e]:t(s[e],i);if(n){const e=n.length;for(let t=0;t<e;t++)r[n[t]]=o}else r[e]=o}return this.options.layoutId&&(r.pointerEvents=i===this?Ji(null==e?void 0:e.pointerEvents)||"":"none"),r}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(e=>{var t;return null===(t=e.currentAnimation)||void 0===t?void 0:t.stop()}),this.root.nodes.forEach(Os),this.root.sharedNodes.clear()}}}function Ns(e){e.updateLayout()}function Ms(e){var t;const n=(null===(t=e.resumeFrom)||void 0===t?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:t,measuredBox:r}=e.layout,{animationType:o}=e.options,i=n.source!==e.layout.source;"size"===o?vi(e=>{const r=i?n.measuredBox[e]:n.layoutBox[e],o=ii(r);r.min=t[e].min,r.max=r.min+o}):Zs(o,n.layoutBox,t)&&vi(r=>{const o=i?n.measuredBox[r]:n.layoutBox[r],s=ii(t[r]);o.max=o.min+s,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[r].max=e.relativeTarget[r].min+s)});const s={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};ai(s,t,n.layoutBox);const a={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};i?ai(a,e.applyTransform(r,!0),n.measuredBox):ai(a,t,n.layoutBox);const l=!gs(s);let c=!1;if(!e.resumeFrom){const r=e.getClosestProjectingParent();if(r&&!r.resumeFrom){const{snapshot:o,layout:i}=r;if(o&&i){const s={x:{min:0,max:0},y:{min:0,max:0}};ui(s,n.layoutBox,o.layoutBox);const a={x:{min:0,max:0},y:{min:0,max:0}};ui(a,t,i.layoutBox),bs(s,a)||(c=!0),r.options.layoutRoot&&(e.relativeTarget=a,e.relativeTargetOrigin=s,e.relativeParent=r)}}}e.notifyListeners("didUpdate",{layout:t,snapshot:n,delta:a,layoutDelta:s,hasLayoutChanged:l,hasRelativeTargetChanged:c})}else if(e.isLead()){const{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function Ds(e){Ss&&Es.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=Boolean(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function Ls(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Is(e){e.clearSnapshot()}function Os(e){e.clearMeasurements()}function Vs(e){e.isLayoutDirty=!1}function _s(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Fs(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Bs(e){e.resolveTargetDelta()}function zs(e){e.calcProjection()}function Us(e){e.resetSkewAndRotation()}function Ws(e){e.removeLeadSnapshot()}function $s(e,t,n){e.translate=_r(t.translate,0,n),e.scale=_r(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Hs(e,t,n,r){e.min=_r(t.min,n.min,r),e.max=_r(t.max,n.max,r)}function Ks(e){return e.animationValues&&void 0!==e.animationValues.opacityExit}const qs={duration:.45,ease:[.4,0,.1,1]},Ys=e=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Gs=Ys("applewebkit/")&&!Ys("chrome/")?Math.round:Nt;function Xs(e){e.min=Gs(e.min),e.max=Gs(e.max)}function Zs(e,t,n){return"position"===e||"preserve-aspect"===e&&(r=xs(t),o=xs(n),!(Math.abs(r-o)<=.2));var r,o}function Js(e){var t;return e!==e.root&&(null===(t=e.scroll)||void 0===t?void 0:t.wasRoot)}const Qs=As({attachResizeListener:(e,t)=>qo(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),ea={current:void 0},ta=As({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!ea.current){const e=new Qs({});e.mount(window),e.setOptions({layoutScroll:!0}),ea.current=e}return ea.current},resetTransform:(e,t)=>{e.style.transform=void 0!==t?t:"none"},checkIsScrollRoot:e=>Boolean("fixed"===window.getComputedStyle(e).position)}),na={pan:{Feature:class extends $o{constructor(){super(...arguments),this.removePointerDownListener=Nt}onPointerDown(e){this.session=new Zo(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Li(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:_i(e),onStart:_i(t),onMove:n,onEnd:(e,t)=>{delete this.session,r&&_t.postRender(()=>r(e,t))}}}mount(){this.removePointerDownListener=Go(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}},drag:{Feature:class extends $o{constructor(e){super(e),this.removeGroupControls=Nt,this.removeListeners=Nt,this.controls=new Oi(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Nt}unmount(){this.removeGroupControls(),this.removeListeners()}},ProjectionNode:ta,MeasureLayout:Yi}};function ra(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover","Start"===n);const o=r["onHover"+n];o&&_t.postRender(()=>o(t,Yo(t)))}function oa(e,t,n){const{props:r}=e;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap","Start"===n);const o=r["onTap"+("End"===n?"":n)];o&&_t.postRender(()=>o(t,Yo(t)))}const ia=new WeakMap,sa=new WeakMap,aa=e=>{const t=ia.get(e.target);t&&t(e)},la=e=>{e.forEach(aa)};const ca={some:0,all:1},ua={inView:{Feature:class extends $o{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:r="some",once:o}=e,i={root:t?t.current:void 0,rootMargin:n,threshold:"number"==typeof r?r:ca[r]};return function(e,t,n){const r=function({root:e,...t}){const n=e||document;sa.has(n)||sa.set(n,{});const r=sa.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(la,{root:e,...t})),r[o]}(t);return ia.set(e,n),r.observe(e),()=>{ia.delete(e),r.unobserve(e)}}(this.node.current,i,e=>{const{isIntersecting:t}=e;if(this.isInView===t)return;if(this.isInView=t,o&&!t&&this.hasEnteredView)return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",t);const{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),i=t?n:r;i&&i(e)})}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;const{props:e,prevProps:t}=this.node;["amount","margin","root"].some(function({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}(e,t))&&this.startObserver()}unmount(){}}},tap:{Feature:class extends $o{mount(){const{current:e}=this.node;e&&(this.unmount=function(e,t,n={}){const[r,o,i]=xt(e,n),s=e=>{const r=e.currentTarget;if(!Ct(e)||jt.has(r))return;jt.add(r);const i=t(e),s=(e,t)=>{window.removeEventListener("pointerup",a),window.removeEventListener("pointercancel",l),Ct(e)&&jt.has(r)&&(jt.delete(r),"function"==typeof i&&i(e,{success:t}))},a=e=>{s(e,n.useGlobalTarget||kt(r,e.target))},l=e=>{s(e,!1)};window.addEventListener("pointerup",a,o),window.addEventListener("pointercancel",l,o)};return r.forEach(e=>{(function(e){return St.has(e.tagName)||-1!==e.tabIndex})(e)||null!==e.getAttribute("tabindex")||(e.tabIndex=0),(n.useGlobalTarget?window:e).addEventListener("pointerdown",s,o),e.addEventListener("focus",e=>((e,t)=>{const n=e.currentTarget;if(!n)return;const r=Pt(()=>{if(jt.has(n))return;Tt(n,"down");const e=Pt(()=>{Tt(n,"up")});n.addEventListener("keyup",e,t),n.addEventListener("blur",()=>Tt(n,"cancel"),t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)})(e,o),o)}),i}(e,e=>(oa(this.node,e,"Start"),(e,{success:t})=>oa(this.node,e,t?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}},focus:{Feature:class extends $o{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch(t){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=Kr(qo(this.node.current,"focus",()=>this.onFocus()),qo(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}},hover:{Feature:class extends $o{mount(){const{current:e}=this.node;e&&(this.unmount=function(e,t,n={}){const[r,o,i]=xt(e,n),s=wt(e=>{const{target:n}=e,r=t(e);if("function"!=typeof r||!n)return;const i=wt(e=>{r(e),n.removeEventListener("pointerleave",i)});n.addEventListener("pointerleave",i,o)});return r.forEach(e=>{e.addEventListener("pointerenter",s,o)}),i}(e,e=>(ra(this.node,e,"Start"),e=>ra(this.node,e,"End"))))}unmount(){}}}},da={layout:{ProjectionNode:ta,MeasureLayout:Yi}},ha=(0,i.createContext)({strict:!1}),pa=(0,i.createContext)({});function fa(e){return $e(e.animate)||Je.some(t=>qe(e[t]))}function ma(e){return Boolean(fa(e)||e.variants)}function ga(e){return Array.isArray(e)?e.join(" "):e}const va={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"]},ya={};for(const e in va)ya[e]={isEnabled:t=>va[e].some(e=>!!t[e])};const ba=Symbol.for("motionComponentSymbol");function xa(e,t,n){return(0,i.useCallback)(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&("function"==typeof n?n(r):oi(n)&&(n.current=r))},[t])}function wa(e,t,n,r,o){var s,a;const{visualElement:l}=(0,i.useContext)(pa),c=(0,i.useContext)(ha),u=(0,i.useContext)(Ne),d=(0,i.useContext)(Me).reducedMotion,h=(0,i.useRef)(null);r=r||c.renderer,!h.current&&r&&(h.current=r(e,{visualState:t,parent:l,props:n,presenceContext:u,blockInitialAnimation:!!u&&!1===u.initial,reducedMotionConfig:d}));const p=h.current,f=(0,i.useContext)(Fi);!p||p.projection||!o||"html"!==p.type&&"svg"!==p.type||function(e,t,n,r){const{layoutId:o,layout:i,drag:s,dragConstraints:a,layoutScroll:l,layoutRoot:c}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:ka(e.parent)),e.projection.setOptions({layoutId:o,layout:i,alwaysMeasureLayout:Boolean(s)||a&&oi(a),visualElement:e,animationType:"string"==typeof i?i:"both",initialPromotionConfig:r,layoutScroll:l,layoutRoot:c})}(h.current,n,o,f);const m=(0,i.useRef)(!1);(0,i.useInsertionEffect)(()=>{p&&m.current&&p.update(n,u)});const g=n[nn],v=(0,i.useRef)(Boolean(g)&&!(null===(s=window.MotionHandoffIsComplete)||void 0===s?void 0:s.call(window,g))&&(null===(a=window.MotionHasOptimisedAnimation)||void 0===a?void 0:a.call(window,g)));return ze(()=>{p&&(m.current=!0,window.MotionIsMounted=!0,p.updateFeatures(),Hi.render(p.render),v.current&&p.animationState&&p.animationState.animateChanges())}),(0,i.useEffect)(()=>{p&&(!v.current&&p.animationState&&p.animationState.animateChanges(),v.current&&(queueMicrotask(()=>{var e;null===(e=window.MotionHandoffMarkAsComplete)||void 0===e||e.call(window,g)}),v.current=!1))}),p}function ka(e){if(e)return!1!==e.options.allowProjection?e.projection:ka(e.parent)}function Ea({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:s}){var a,l;function c(e,a){let l;const c={...(0,i.useContext)(Me),...e,layoutId:Sa(e)},{isStatic:u}=c,d=function(e){const{initial:t,animate:n}=function(e,t){if(fa(e)){const{initial:t,animate:n}=e;return{initial:!1===t||qe(t)?t:void 0,animate:qe(n)?n:void 0}}return!1!==e.inherit?t:{}}(e,(0,i.useContext)(pa));return(0,i.useMemo)(()=>({initial:t,animate:n}),[ga(t),ga(n)])}(e),h=r(e,u);if(!u&&Be){(0,i.useContext)(ha).strict;const e=function(e){const{drag:t,layout:n}=ya;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:(null==t?void 0:t.isEnabled(e))||(null==n?void 0:n.isEnabled(e))?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}(c);l=e.MeasureLayout,d.visualElement=wa(s,h,c,t,e.ProjectionNode)}return(0,o.jsxs)(pa.Provider,{value:d,children:[l&&d.visualElement?(0,o.jsx)(l,{visualElement:d.visualElement,...c}):null,n(s,e,xa(h,d.visualElement,a),h,u,d.visualElement)]})}e&&function(e){for(const t in e)ya[t]={...ya[t],...e[t]}}(e),c.displayName=`motion.${"string"==typeof s?s:`create(${null!==(l=null!==(a=s.displayName)&&void 0!==a?a:s.name)&&void 0!==l?l:""})`}`;const u=(0,i.forwardRef)(c);return u[ba]=s,u}function Sa({layoutId:e}){const t=(0,i.useContext)(Re).id;return t&&void 0!==e?t+"-"+e:e}const ja=["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 Pa(e){return"string"==typeof e&&!e.includes("-")&&!!(ja.indexOf(e)>-1||/[A-Z]/u.test(e))}const Ta=e=>(t,n)=>{const r=(0,i.useContext)(pa),o=(0,i.useContext)(Ne),s=()=>function({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},r,o,i){const s={latestValues:Ca(r,o,i,e),renderState:t()};return n&&(s.onMount=e=>n({props:r,current:e,...s}),s.onUpdate=e=>n(e)),s}(e,t,r,o);return n?s():Ae(s)};function Ca(e,t,n,r){const o={},i=r(e,{});for(const e in i)o[e]=Ji(i[e]);let{initial:s,animate:a}=e;const l=fa(e),c=ma(e);t&&c&&!l&&!1!==e.inherit&&(void 0===s&&(s=t.initial),void 0===a&&(a=t.animate));let u=!!n&&!1===n.initial;u=u||!1===s;const d=u?a:s;if(d&&"boolean"!=typeof d&&!$e(d)){const t=Array.isArray(d)?d:[d];for(let n=0;n<t.length;n++){const r=Ge(e,t[n]);if(r){const{transitionEnd:e,transition:t,...n}=r;for(const e in n){let t=n[e];Array.isArray(t)&&(t=t[u?t.length-1:0]),null!==t&&(o[e]=t)}for(const t in e)o[t]=e[t]}}}return o}const Ra=(e,t)=>t&&"number"==typeof e?t.transform(e):e,Aa={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Na=Mt.length;function Ma(e,t,n){const{style:r,vars:o,transformOrigin:i}=e;let s=!1,a=!1;for(const e in t){const n=t[e];if(Dt.has(e))s=!0;else if(Er(e))o[e]=n;else{const t=Ra(n,nr[e]);e.startsWith("origin")?(a=!0,i[e]=t):r[e]=t}}if(t.transform||(s||n?r.transform=function(e,t,n){let r="",o=!0;for(let i=0;i<Na;i++){const s=Mt[i],a=e[s];if(void 0===a)continue;let l=!0;if(l="number"==typeof a?a===(s.startsWith("scale")?1:0):0===parseFloat(a),!l||n){const e=Ra(a,nr[s]);l||(o=!1,r+=`${Aa[s]||s}(${e}) `),n&&(t[s]=e)}}return r=r.trim(),n?r=n(t,o?"":r):o&&(r="none"),r}(t,e.transform,n):r.transform&&(r.transform="none")),a){const{originX:e="50%",originY:t="50%",originZ:n=0}=i;r.transformOrigin=`${e} ${t} ${n}`}}const Da={offset:"stroke-dashoffset",array:"stroke-dasharray"},La={offset:"strokeDashoffset",array:"strokeDasharray"};function Ia(e,t,n){return"string"==typeof e?e:Dn.transform(t+n*e)}function Oa(e,{attrX:t,attrY:n,attrScale:r,originX:o,originY:i,pathLength:s,pathSpacing:a=1,pathOffset:l=0,...c},u,d){if(Ma(e,c,d),u)return void(e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox));e.attrs=e.style,e.style={};const{attrs:h,style:p,dimensions:f}=e;h.transform&&(f&&(p.transform=h.transform),delete h.transform),f&&(void 0!==o||void 0!==i||p.transform)&&(p.transformOrigin=function(e,t,n){return`${Ia(t,e.x,e.width)} ${Ia(n,e.y,e.height)}`}(f,void 0!==o?o:.5,void 0!==i?i:.5)),void 0!==t&&(h.x=t),void 0!==n&&(h.y=n),void 0!==r&&(h.scale=r),void 0!==s&&function(e,t,n=1,r=0,o=!0){e.pathLength=1;const i=o?Da:La;e[i.offset]=Dn.transform(-r);const s=Dn.transform(t),a=Dn.transform(n);e[i.array]=`${s} ${a}`}(h,s,a,l,!1)}const Va=e=>"string"==typeof e&&"svg"===e.toLowerCase();function _a(e,{style:t,vars:n},r,o){Object.assign(e.style,t,o&&o.getProjectionStyles(r));for(const t in n)e.style.setProperty(t,n[t])}const Fa=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function Ba(e,t,n,r){_a(e,t,void 0,r);for(const n in t.attrs)e.setAttribute(Fa.has(n)?n:tn(n),t.attrs[n])}function za(e,{layout:t,layoutId:n}){return Dt.has(e)||e.startsWith("origin")||(t||void 0!==n)&&(!!$i[e]||"opacity"===e)}function Ua(e,t,n){var r;const{style:o}=e,i={};for(const s in o)(Qt(o[s])||t.style&&Qt(t.style[s])||za(s,e)||void 0!==(null===(r=null==n?void 0:n.getValue(s))||void 0===r?void 0:r.liveStyle))&&(i[s]=o[s]);return i}function Wa(e,t,n){const r=Ua(e,t,n);for(const n in e)(Qt(e[n])||Qt(t[n]))&&(r[-1!==Mt.indexOf(n)?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n]=e[n]);return r}const $a=["x","y","width","height","cx","cy","r"],Ha={useVisualState:Ta({scrapeMotionValuesFromProps:Wa,createRenderState:()=>({style:{},transform:{},transformOrigin:{},vars:{},attrs:{}}),onUpdate:({props:e,prevProps:t,current:n,renderState:r,latestValues:o})=>{if(!n)return;let i=!!e.drag;if(!i)for(const e in o)if(Dt.has(e)){i=!0;break}if(!i)return;let s=!t;if(t)for(let n=0;n<$a.length;n++){const r=$a[n];e[r]!==t[r]&&(s=!0)}s&&_t.read(()=>{!function(e,t){try{t.dimensions="function"==typeof e.getBBox?e.getBBox():e.getBoundingClientRect()}catch(e){t.dimensions={x:0,y:0,width:0,height:0}}}(n,r),_t.render(()=>{Oa(r,o,Va(n.tagName),e.transformTemplate),Ba(n,r)})})}})},Ka={useVisualState:Ta({scrapeMotionValuesFromProps:Ua,createRenderState:()=>({style:{},transform:{},transformOrigin:{},vars:{}})})};function qa(e,t,n){for(const r in t)Qt(t[r])||za(r,n)||(e[r]=t[r])}function Ya(e,t){const n={},r=function(e,t){const n={};return qa(n,e.style||{},e),Object.assign(n,function({transformTemplate:e},t){return(0,i.useMemo)(()=>{const n={style:{},transform:{},transformOrigin:{},vars:{}};return Ma(n,t,e),Object.assign({},n.vars,n.style)},[t])}(e,t)),n}(e,t);return e.drag&&!1!==e.dragListener&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=!0===e.drag?"none":"pan-"+("x"===e.drag?"y":"x")),void 0===e.tabIndex&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const Ga=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function Xa(e){return e.startsWith("while")||e.startsWith("drag")&&"draggable"!==e||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||Ga.has(e)}let Za=e=>!Xa(e);try{(Ja=require("@emotion/is-prop-valid").default)&&(Za=e=>e.startsWith("on")?!Xa(e):Ja(e))}catch(e){}var Ja;function Qa(e,t,n,r){const o=(0,i.useMemo)(()=>{const n={style:{},transform:{},transformOrigin:{},vars:{},attrs:{}};return Oa(n,t,Va(r),e.transformTemplate),{...n.attrs,style:{...n.style}}},[t]);if(e.style){const t={};qa(t,e.style,e),o.style={...t,...o.style}}return o}function el(e=!1){return(t,n,r,{latestValues:o},s)=>{const a=(Pa(t)?Qa:Ya)(n,o,s,t),l=function(e,t,n){const r={};for(const o in e)"values"===o&&"object"==typeof e.values||(Za(o)||!0===n&&Xa(o)||!t&&!Xa(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}(n,"string"==typeof t,e),c=t!==i.Fragment?{...l,...a,ref:r}:{},{children:u}=n,d=(0,i.useMemo)(()=>Qt(u)?u.get():u,[u]);return(0,i.createElement)(t,{...c,children:d})}}function tl(e,t){return function(n,{forwardMotionProps:r}={forwardMotionProps:!1}){return Ea({...Pa(n)?Ha:Ka,preloadedFeatures:e,useRender:el(r),createVisualElement:t,Component:n})}}const nl={current:null},rl={current:!1},ol=[...Ar,Fn,Yn],il=new WeakMap,sl=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class al{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:r,blockInitialAnimation:o,visualState:i},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=yr,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const e=$t.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,_t.render(this.render,!1,!0))};const{latestValues:a,renderState:l,onUpdate:c}=i;this.onUpdate=c,this.latestValues=a,this.baseTarget={...a},this.initialValues=t.initial?{...a}:{},this.renderState=l,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.options=s,this.blockInitialAnimation=Boolean(o),this.isControllingVariants=fa(t),this.isVariantNode=ma(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(e&&e.current);const{willChange:u,...d}=this.scrapeMotionValuesFromProps(t,{},this);for(const e in d){const t=d[e];void 0!==a[e]&&Qt(t)&&t.set(a[e],!1)}}mount(e){this.current=e,il.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((e,t)=>this.bindToMotionValue(t,e)),rl.current||function(){if(rl.current=!0,Be)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>nl.current=e.matches;e.addListener(t),t()}else nl.current=!1}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||nl.current),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){il.delete(this.current),this.projection&&this.projection.unmount(),Ft(this.notifyUpdate),Ft(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const e in this.events)this.events[e].clear();for(const e in this.features){const t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}bindToMotionValue(e,t){this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();const n=Dt.has(e),r=t.on("change",t=>{this.latestValues[e]=t,this.props.onUpdate&&_t.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0)}),o=t.on("renderRequest",this.scheduleRender);let i;window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{r(),o(),i&&i(),t.owner&&t.stop()})}sortNodePosition(e){return this.current&&this.sortInstanceNodePosition&&this.type===e.type?this.sortInstanceNodePosition(this.current,e.current):0}updateFeatures(){let e="animation";for(e in ya){const t=ya[e];if(!t)continue;const{isEnabled:n,Feature:r}=t;if(!this.features[e]&&r&&n(this.props)&&(this.features[e]=new r(this)),this.features[e]){const 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):{x:{min:0,max:0},y:{min:0,max:0}}}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<sl.length;t++){const n=sl[t];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);const r=e["on"+n];r&&(this.propEventSubscriptions[n]=this.on(n,r))}this.prevMotionValues=function(e,t,n){for(const r in t){const o=t[r],i=n[r];if(Qt(o))e.addValue(r,o);else if(Qt(i))e.addValue(r,Zt(o,{owner:e}));else if(i!==o)if(e.hasValue(r)){const t=e.getValue(r);!0===t.liveStyle?t.jump(o):t.hasAnimated||t.set(o)}else{const t=e.getStaticValue(r);e.addValue(r,Zt(void 0!==t?t:o,{owner:e}))}}for(const r in n)void 0===t[r]&&e.removeValue(r);return t}(this,this.scrapeMotionValuesFromProps(e,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}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}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){const t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){const n=this.values.get(e);t!==n&&(n&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);const 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 void 0===n&&void 0!==t&&(n=Zt(null===t?void 0:t,{owner:this}),this.addValue(e,n)),n}readValue(e,t){var n;let r=void 0===this.latestValues[e]&&this.current?null!==(n=this.getBaseTargetFromProps(this.props,e))&&void 0!==n?n:this.readValueFromInstance(this.current,e,this.options):this.latestValues[e];return null!=r&&("string"==typeof r&&(wr(r)||gn(r))?r=parseFloat(r):(o=r,!ol.find(Rr(o))&&Yn.test(t)&&(r=ir(e,t))),this.setBaseTarget(e,Qt(r)?r.get():r)),Qt(r)?r.get():r;var o}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){var t;const{initial:n}=this.props;let r;if("string"==typeof n||"object"==typeof n){const o=Ge(this.props,n,null===(t=this.presenceContext)||void 0===t?void 0:t.custom);o&&(r=o[e])}if(n&&void 0!==r)return r;const o=this.getBaseTargetFromProps(this.props,e);return void 0===o||Qt(o)?void 0!==this.initialValues[e]&&void 0===r?void 0:this.baseTarget[e]:o}on(e,t){return this.events[e]||(this.events[e]=new qt),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}}class ll extends al{constructor(){super(...arguments),this.KeyframeResolver=Mr}sortInstanceNodePosition(e,t){return 2&e.compareDocumentPosition(t)?1:-1}getBaseTargetFromProps(e,t){return e.style?e.style[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;Qt(e)&&(this.childSubscription=e.on("change",e=>{this.current&&(this.current.textContent=`${e}`)}))}}class cl extends ll{constructor(){super(...arguments),this.type="html",this.renderInstance=_a}readValueFromInstance(e,t){if(Dt.has(t)){const e=or(t);return e&&e.default||0}{const r=(n=e,window.getComputedStyle(n)),o=(Er(t)?r.getPropertyValue(t):r[t])||0;return"string"==typeof o?o.trim():o}var n}measureInstanceViewportBox(e,{transformPagePoint:t}){return Di(e,t)}build(e,t,n){Ma(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return Ua(e,t,n)}}class ul extends ll{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=gi}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(Dt.has(t)){const e=or(t);return e&&e.default||0}return t=Fa.has(t)?t:tn(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return Wa(e,t,n)}build(e,t,n){Oa(e,t,this.isSVGTag,n.transformTemplate)}renderInstance(e,t,n,r){Ba(e,t,0,r)}mount(e){this.isSVGTag=Va(e.tagName),super.mount(e)}}const dl=We(tl({...Ko,...ua,...na,...da},(e,t)=>Pa(e)?new ul(t):new cl(t,{allowProjection:e!==i.Fragment})));let hl=!1;const pl=({toastItem:e,title:t="",content:n="",autoDismiss:r=!0,dismissAfter:s=5e3,theme:a="light",design:l="stack",icon:c,variant:u="neutral",removeToast:h})=>{const p=(0,i.useRef)(0),f=(0,i.useRef)(0),m=(0,i.useRef)(),g=(e,t=s)=>{if(r&&!(s<0))return p.current=(new Date).getTime(),setTimeout(()=>{"function"==typeof h&&h(e.id)},t)};(0,i.useEffect)(()=>{const t=s;return m.current=g(e,t),()=>{clearTimeout(m.current)}},[]),(0,i.useEffect)(()=>{!e?.dismiss||"function"!=typeof h||h(e.id)},[e]);const v=()=>{"function"==typeof h&&e?.action?.onClick?.(()=>h(e.id))};let y=null;return"stack"===l&&(y=(0,o.jsx)("div",{className:ue("flex items-center justify-start p-4 gap-2 relative border border-solid rounded-md shadow-lg","dark"===a?Pe:je?.[u],"w-[22.5rem]"),onMouseEnter:()=>{clearTimeout(m.current),f.current=(new Date).getTime()},onMouseLeave:()=>{m.current=g(e,s-(f.current-p.current))},children:"custom"!==e.type?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("div",{className:"self-start flex items-center justify-center [&_svg]:size-5 shrink-0",children:be({variant:u,icon:c,theme:a})}),(0,o.jsxs)("div",{className:"flex flex-col items-start justify-start gap-0.5 mr-6",children:[we({title:t,theme:a}),ke({content:n,theme:a}),e?.action?.label&&"function"==typeof e?.action?.onClick&&(0,o.jsx)("div",{className:"mt-2.5",children:xe({actionLabel:e?.action?.label,actionType:e?.action?.type??"button",onAction:v,theme:a})})]}),(0,o.jsx)("div",{className:"absolute right-4 top-4 [&_svg]:size-5",children:(0,o.jsx)("button",{className:ue("bg-transparent m-0 p-0 border-none focus:outline-none active:outline-none cursor-pointer",Te[a]??Te.light),onClick:()=>{"function"==typeof h&&h(e.id)},children:(0,o.jsx)(d,{})})})]}):e?.jsx?.({close:()=>h(e.id),action:e?.action?{...e?.action,onClick:v}:null})})),"inline"===l&&(y=(0,o.jsxs)("div",{className:ue("flex items-center justify-start p-3 gap-2 relative border border-solid rounded-md shadow-lg","dark"===a?Pe:je?.[u],"lg:w-[47.5rem] w-full"),children:[(0,o.jsx)("div",{className:"self-start flex items-center justify-center [&_svg]:size-5 shrink-0",children:be({variant:u,icon:c,theme:a})}),(0,o.jsxs)("div",{className:"flex items-start justify-start gap-1 mr-10 [&>span:first-child]:shrink-0",children:[we({title:t,theme:a}),ke({content:n,theme:a})]}),(0,o.jsx)("div",{className:"absolute right-3 top-3 [&_svg]:size-5",children:(0,o.jsx)("button",{className:ue("bg-transparent m-0 p-0 border-none focus:outline-none active:outline-none cursor-pointer",Te[a]??Te.light),onClick:()=>h(e.id),children:(0,o.jsx)(d,{})})})]})),y},fl=(ml=({position:e="top-right",design:t="stack",theme:n="light",className:r="",autoDismiss:s=!0,dismissAfter:a=5e3})=>{const[l,c]=(0,i.useState)([]);(0,i.useEffect)(()=>{p.subscribe(e=>{e?.dismiss?c(t=>t.map(t=>t.id===e.id?{...t,dismiss:!0}:t)):setTimeout(()=>{(0,Ce.flushSync)(()=>c(t=>-1!==t.findIndex(t=>t.id===e.id)?t.map(t=>t.id===e.id?{...t,...e}:t):[...t,e]))})})},[]);const u=e=>{c(t=>t.filter(t=>t.id!==e))};return(0,o.jsx)("ul",{className:ue("fixed flex flex-col list-none z-20 p-10 pointer-events-none [&>li]:pointer-events-auto gap-3",Se[e]??Se["top-right"],r),children:(0,o.jsx)(Ue,{initial:!1,children:l.map(e=>(0,o.jsx)(dl.li,{initial:{opacity:0,y:50,scale:.7},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,scale:.6,transition:{duration:.15}},layoutId:`toast-${e.id}`,children:(0,o.jsx)(pl,{toastItem:e,title:e.title,content:e?.description,icon:e?.icon??void 0,design:e?.design??t,autoDismiss:e?.autoDismiss??s,dismissAfter:e?.dismissAfter??a,removeToast:u,variant:e.type,theme:e?.theme??n})},e.id))})})},(0,i.memo)(e=>{const t=e.singleTon;return hl&&t?null:(hl=!0,(0,o.jsx)(ml,{...e}))}));var ml,gl;function vl(){return vl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},vl.apply(this,arguments)}!function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"}(gl||(gl={}));const yl="popstate";function bl(e,t){if(!1===e||null==e)throw new Error(t)}function xl(e,t){if(!e){"undefined"!=typeof console&&console.warn(t);try{throw new Error(t)}catch(e){}}}function wl(e,t){return{usr:e.state,key:e.key,idx:t}}function kl(e,t,n,r){return void 0===n&&(n=null),vl({pathname:"string"==typeof e?e:e.pathname,search:"",hash:""},"string"==typeof t?Sl(t):t,{state:n,key:t&&t.key||r||Math.random().toString(36).substr(2,8)})}function El(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&"?"!==n&&(t+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(t+="#"===r.charAt(0)?r:"#"+r),t}function Sl(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}var jl;function Pl(e,t,n){return void 0===n&&(n="/"),function(e,t,n,r){let o=Bl(("string"==typeof t?Sl(t):t).pathname||"/",n);if(null==o)return null;let i=Tl(e);!function(e){e.sort((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){let n=e.length===t.length&&e.slice(0,-1).every((e,n)=>e===t[n]);return n?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)))}(i);let s=null;for(let e=0;null==s&&e<i.length;++e){let t=Fl(o);s=Vl(i[e],t,r)}return s}(e,t,n,!1)}function Tl(e,t,n,r){void 0===t&&(t=[]),void 0===n&&(n=[]),void 0===r&&(r="");let o=(e,o,i)=>{let s={relativePath:void 0===i?e.path||"":i,caseSensitive:!0===e.caseSensitive,childrenIndex:o,route:e};s.relativePath.startsWith("/")&&(bl(s.relativePath.startsWith(r),'Absolute route path "'+s.relativePath+'" nested under path "'+r+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),s.relativePath=s.relativePath.slice(r.length));let a=$l([r,s.relativePath]),l=n.concat(s);e.children&&e.children.length>0&&(bl(!0!==e.index,'Index routes must not have child routes. Please remove all child routes from route path "'+a+'".'),Tl(e.children,t,l,a)),(null!=e.path||e.index)&&t.push({path:a,score:Ol(a,e.index),routesMeta:l})};return e.forEach((e,t)=>{var n;if(""!==e.path&&null!=(n=e.path)&&n.includes("?"))for(let n of Cl(e.path))o(e,t,n);else o(e,t)}),t}function Cl(e){let t=e.split("/");if(0===t.length)return[];let[n,...r]=t,o=n.endsWith("?"),i=n.replace(/\?$/,"");if(0===r.length)return o?[i,""]:[i];let s=Cl(r.join("/")),a=[];return a.push(...s.map(e=>""===e?i:[i,e].join("/"))),o&&a.push(...s),a.map(t=>e.startsWith("/")&&""===t?"/":t)}!function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"}(jl||(jl={})),new Set(["lazy","caseSensitive","path","id","index","children"]);const Rl=/^:[\w-]+$/,Al=3,Nl=2,Ml=1,Dl=10,Ll=-2,Il=e=>"*"===e;function Ol(e,t){let n=e.split("/"),r=n.length;return n.some(Il)&&(r+=Ll),t&&(r+=Nl),n.filter(e=>!Il(e)).reduce((e,t)=>e+(Rl.test(t)?Al:""===t?Ml:Dl),r)}function Vl(e,t,n){void 0===n&&(n=!1);let{routesMeta:r}=e,o={},i="/",s=[];for(let e=0;e<r.length;++e){let a=r[e],l=e===r.length-1,c="/"===i?t:t.slice(i.length)||"/",u=_l({path:a.relativePath,caseSensitive:a.caseSensitive,end:l},c),d=a.route;if(!u&&l&&n&&!r[r.length-1].route.index&&(u=_l({path:a.relativePath,caseSensitive:a.caseSensitive,end:!1},c)),!u)return null;Object.assign(o,u.params),s.push({params:o,pathname:$l([i,u.pathname]),pathnameBase:Hl($l([i,u.pathnameBase])),route:d}),"/"!==u.pathnameBase&&(i=$l([i,u.pathnameBase]))}return s}function _l(e,t){"string"==typeof e&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=function(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!0),xl("*"===e||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were "'+e.replace(/\*$/,"/*")+'" because the `*` character must always follow a `/` in the pattern. To get rid of this warning, please change the route path to "'+e.replace(/\*$/,"/*")+'".');let r=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(e,t,n)=>(r.push({paramName:t,isOptional:null!=n}),n?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),o+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":""!==e&&"/"!==e&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),r]}(e.path,e.caseSensitive,e.end),o=t.match(n);if(!o)return null;let i=o[0],s=i.replace(/(.)\/+$/,"$1"),a=o.slice(1),l=r.reduce((e,t,n)=>{let{paramName:r,isOptional:o}=t;if("*"===r){let e=a[n]||"";s=i.slice(0,i.length-e.length).replace(/(.)\/+$/,"$1")}const l=a[n];return e[r]=o&&!l?void 0:(l||"").replace(/%2F/g,"/"),e},{});return{params:l,pathname:i,pathnameBase:s,pattern:e}}function Fl(e){try{return e.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(t){return xl(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent encoding ('+t+")."),e}}function Bl(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&"/"!==r?null:e.slice(n)||"/"}function zl(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified `to."+t+"` field ["+JSON.stringify(r)+"].  Please separate it out to the `to."+n+'` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.'}function Ul(e,t){let n=function(e){return e.filter((e,t)=>0===t||e.route.path&&e.route.path.length>0)}(e);return t?n.map((e,t)=>t===n.length-1?e.pathname:e.pathnameBase):n.map(e=>e.pathnameBase)}function Wl(e,t,n,r){let o;void 0===r&&(r=!1),"string"==typeof e?o=Sl(e):(o=vl({},e),bl(!o.pathname||!o.pathname.includes("?"),zl("?","pathname","search",o)),bl(!o.pathname||!o.pathname.includes("#"),zl("#","pathname","hash",o)),bl(!o.search||!o.search.includes("#"),zl("#","search","hash",o)));let i,s=""===e||""===o.pathname,a=s?"/":o.pathname;if(null==a)i=n;else{let e=t.length-1;if(!r&&a.startsWith("..")){let t=a.split("/");for(;".."===t[0];)t.shift(),e-=1;o.pathname=t.join("/")}i=e>=0?t[e]:"/"}let l=function(e,t){void 0===t&&(t="/");let{pathname:n,search:r="",hash:o=""}="string"==typeof e?Sl(e):e,i=n?n.startsWith("/")?n:function(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(e=>{".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)}),n.length>1?n.join("/"):"/"}(n,t):t;return{pathname:i,search:Kl(r),hash:ql(o)}}(o,i),c=a&&"/"!==a&&a.endsWith("/"),u=(s||"."===a)&&n.endsWith("/");return l.pathname.endsWith("/")||!c&&!u||(l.pathname+="/"),l}const $l=e=>e.join("/").replace(/\/\/+/g,"/"),Hl=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Kl=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",ql=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";Error;const Yl=["post","put","patch","delete"],Gl=(new Set(Yl),["get",...Yl]);function Xl(){return Xl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Xl.apply(this,arguments)}new Set(Gl),new Set([301,302,303,307,308]),new Set([307,308]),Symbol("deferred");const Zl=i.createContext(null),Jl=i.createContext(null),Ql=i.createContext(null),ec=i.createContext(null),tc=i.createContext({outlet:null,matches:[],isDataRoute:!1}),nc=i.createContext(null);function rc(){return null!=i.useContext(ec)}function oc(){return rc()||bl(!1),i.useContext(ec).location}function ic(e){i.useContext(Ql).static||i.useLayoutEffect(e)}function sc(){let{isDataRoute:e}=i.useContext(tc);return e?function(){let{router:e}=function(){let e=i.useContext(Zl);return e||bl(!1),e}(hc.UseNavigateStable),t=fc(pc.UseNavigateStable),n=i.useRef(!1);return ic(()=>{n.current=!0}),i.useCallback(function(r,o){void 0===o&&(o={}),n.current&&("number"==typeof r?e.navigate(r):e.navigate(r,Xl({fromRouteId:t},o)))},[e,t])}():function(){rc()||bl(!1);let e=i.useContext(Zl),{basename:t,future:n,navigator:r}=i.useContext(Ql),{matches:o}=i.useContext(tc),{pathname:s}=oc(),a=JSON.stringify(Ul(o,n.v7_relativeSplatPath)),l=i.useRef(!1);return ic(()=>{l.current=!0}),i.useCallback(function(n,o){if(void 0===o&&(o={}),!l.current)return;if("number"==typeof n)return void r.go(n);let i=Wl(n,JSON.parse(a),s,"path"===o.relative);null==e&&"/"!==t&&(i.pathname="/"===i.pathname?t:$l([t,i.pathname])),(o.replace?r.replace:r.push)(i,o.state,o)},[t,r,a,s,e])}()}function ac(e,t,n,r){rc()||bl(!1);let{navigator:o}=i.useContext(Ql),{matches:s}=i.useContext(tc),a=s[s.length-1],l=a?a.params:{},c=(a&&a.pathname,a?a.pathnameBase:"/");a&&a.route;let u,d=oc();if(t){var h;let e="string"==typeof t?Sl(t):t;"/"===c||(null==(h=e.pathname)?void 0:h.startsWith(c))||bl(!1),u=e}else u=d;let p=u.pathname||"/",f=p;if("/"!==c){let e=c.replace(/^\//,"").split("/");f="/"+p.replace(/^\//,"").split("/").slice(e.length).join("/")}let m=Pl(e,{pathname:f}),g=function(e,t,n,r){var o;if(void 0===t&&(t=[]),void 0===n&&(n=null),void 0===r&&(r=null),null==e){var s;if(!n)return null;if(n.errors)e=n.matches;else{if(!(null!=(s=r)&&s.v7_partialHydration&&0===t.length&&!n.initialized&&n.matches.length>0))return null;e=n.matches}}let a=e,l=null==(o=n)?void 0:o.errors;if(null!=l){let e=a.findIndex(e=>e.route.id&&void 0!==(null==l?void 0:l[e.route.id]));e>=0||bl(!1),a=a.slice(0,Math.min(a.length,e+1))}let c=!1,u=-1;if(n&&r&&r.v7_partialHydration)for(let e=0;e<a.length;e++){let t=a[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(u=e),t.route.id){let{loaderData:e,errors:r}=n,o=t.route.loader&&void 0===e[t.route.id]&&(!r||void 0===r[t.route.id]);if(t.route.lazy||o){c=!0,a=u>=0?a.slice(0,u+1):[a[0]];break}}}return a.reduceRight((e,r,o)=>{let s,d=!1,h=null,p=null;var f;n&&(s=l&&r.route.id?l[r.route.id]:void 0,h=r.route.errorElement||cc,c&&(u<0&&0===o?(mc[f="route-fallback"]||(mc[f]=!0),d=!0,p=null):u===o&&(d=!0,p=r.route.hydrateFallbackElement||null)));let m=t.concat(a.slice(0,o+1)),g=()=>{let t;return t=s?h:d?p:r.route.Component?i.createElement(r.route.Component,null):r.route.element?r.route.element:e,i.createElement(dc,{match:r,routeContext:{outlet:e,matches:m,isDataRoute:null!=n},children:t})};return n&&(r.route.ErrorBoundary||r.route.errorElement||0===o)?i.createElement(uc,{location:n.location,revalidation:n.revalidation,component:h,error:s,children:g(),routeContext:{outlet:null,matches:m,isDataRoute:!0}}):g()},null)}(m&&m.map(e=>Object.assign({},e,{params:Object.assign({},l,e.params),pathname:$l([c,o.encodeLocation?o.encodeLocation(e.pathname).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?c:$l([c,o.encodeLocation?o.encodeLocation(e.pathnameBase).pathname:e.pathnameBase])})),s,n,r);return t&&g?i.createElement(ec.Provider,{value:{location:Xl({pathname:"/",search:"",hash:"",state:null,key:"default"},u),navigationType:gl.Pop}},g):g}function lc(){let e=function(){var e;let t=i.useContext(nc),n=function(){let e=i.useContext(Jl);return e||bl(!1),e}(pc.UseRouteError),r=fc(pc.UseRouteError);return void 0!==t?t:null==(e=n.errors)?void 0:e[r]}(),t=function(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"boolean"==typeof e.internal&&"data"in e}(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return i.createElement(i.Fragment,null,i.createElement("h2",null,"Unexpected Application Error!"),i.createElement("h3",{style:{fontStyle:"italic"}},t),n?i.createElement("pre",{style:r},n):null,null)}const cc=i.createElement(lc,null);class uc extends i.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||"idle"!==t.revalidation&&"idle"===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:void 0!==e.error?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return void 0!==this.state.error?i.createElement(tc.Provider,{value:this.props.routeContext},i.createElement(nc.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function dc(e){let{routeContext:t,match:n,children:r}=e,o=i.useContext(Zl);return o&&o.static&&o.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=n.route.id),i.createElement(tc.Provider,{value:t},r)}var hc=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(hc||{}),pc=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(pc||{});function fc(e){let t=function(){let e=i.useContext(tc);return e||bl(!1),e}(),n=t.matches[t.matches.length-1];return n.route.id||bl(!1),n.route.id}const mc={};function gc(e){let{to:t,replace:n,state:r,relative:o}=e;rc()||bl(!1);let{future:s,static:a}=i.useContext(Ql),{matches:l}=i.useContext(tc),{pathname:c}=oc(),u=sc(),d=Wl(t,Ul(l,s.v7_relativeSplatPath),c,"path"===o),h=JSON.stringify(d);return i.useEffect(()=>u(JSON.parse(h),{replace:n,state:r,relative:o}),[u,h,o,n,r]),null}function vc(e){bl(!1)}function yc(e){let{basename:t="/",children:n=null,location:r,navigationType:o=gl.Pop,navigator:s,static:a=!1,future:l}=e;rc()&&bl(!1);let c=t.replace(/^\/*/,"/"),u=i.useMemo(()=>({basename:c,navigator:s,static:a,future:Xl({v7_relativeSplatPath:!1},l)}),[c,l,s,a]);"string"==typeof r&&(r=Sl(r));let{pathname:d="/",search:h="",hash:p="",state:f=null,key:m="default"}=r,g=i.useMemo(()=>{let e=Bl(d,c);return null==e?null:{location:{pathname:e,search:h,hash:p,state:f,key:m},navigationType:o}},[c,d,h,p,f,m,o]);return null==g?null:i.createElement(Ql.Provider,{value:u},i.createElement(ec.Provider,{children:n,value:g}))}function bc(e){let{children:t,location:n}=e;return ac(xc(t),n)}function xc(e,t){void 0===t&&(t=[]);let n=[];return i.Children.forEach(e,(e,r)=>{if(!i.isValidElement(e))return;let o=[...t,r];if(e.type===i.Fragment)return void n.push.apply(n,xc(e.props.children,o));e.type!==vc&&bl(!1),e.props.index&&e.props.children&&bl(!1);let s={id:e.props.id||o.join("-"),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,loader:e.props.loader,action:e.props.action,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:null!=e.props.ErrorBoundary||null!=e.props.errorElement,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(s.children=xc(e.props.children,o)),n.push(s)}),n}i.startTransition,new Promise(()=>{}),i.Component,new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);try{window.__reactRouterVersion="6"}catch(hl){}new Map;const wc=i.startTransition;function kc(e){let{basename:t,children:n,future:r,window:o}=e,s=i.useRef();var a;null==s.current&&(s.current=(void 0===(a={window:o,v5Compat:!0})&&(a={}),function(e,t,n,r){void 0===r&&(r={});let{window:o=document.defaultView,v5Compat:i=!1}=r,s=o.history,a=gl.Pop,l=null,c=u();function u(){return(s.state||{idx:null}).idx}function d(){a=gl.Pop;let e=u(),t=null==e?null:e-c;c=e,l&&l({action:a,location:p.location,delta:t})}function h(e){let t="null"!==o.location.origin?o.location.origin:o.location.href,n="string"==typeof e?e:El(e);return n=n.replace(/ $/,"%20"),bl(t,"No window.location.(origin|href) available to create URL for href: "+n),new URL(n,t)}null==c&&(c=0,s.replaceState(vl({},s.state,{idx:c}),""));let p={get action(){return a},get location(){return e(o,s)},listen(e){if(l)throw new Error("A history only accepts one active listener");return o.addEventListener(yl,d),l=e,()=>{o.removeEventListener(yl,d),l=null}},createHref:e=>t(o,e),createURL:h,encodeLocation(e){let t=h(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(e,t){a=gl.Push;let r=kl(p.location,e,t);n&&n(r,e),c=u()+1;let d=wl(r,c),h=p.createHref(r);try{s.pushState(d,"",h)}catch(e){if(e instanceof DOMException&&"DataCloneError"===e.name)throw e;o.location.assign(h)}i&&l&&l({action:a,location:p.location,delta:1})},replace:function(e,t){a=gl.Replace;let r=kl(p.location,e,t);n&&n(r,e),c=u();let o=wl(r,c),d=p.createHref(r);s.replaceState(o,"",d),i&&l&&l({action:a,location:p.location,delta:0})},go:e=>s.go(e)};return p}(function(e,t){let{pathname:n="/",search:r="",hash:o=""}=Sl(e.location.hash.substr(1));return n.startsWith("/")||n.startsWith(".")||(n="/"+n),kl("",{pathname:n,search:r,hash:o},t.state&&t.state.usr||null,t.state&&t.state.key||"default")},function(e,t){let n=e.document.querySelector("base"),r="";if(n&&n.getAttribute("href")){let t=e.location.href,n=t.indexOf("#");r=-1===n?t:t.slice(0,n)}return r+"#"+("string"==typeof t?t:El(t))},function(e,t){xl("/"===e.pathname.charAt(0),"relative pathnames are not supported in hash history.push("+JSON.stringify(t)+")")},a)));let l=s.current,[c,u]=i.useState({action:l.action,location:l.location}),{v7_startTransition:d}=r||{},h=i.useCallback(e=>{d&&wc?wc(()=>u(e)):u(e)},[u,d]);return i.useLayoutEffect(()=>l.listen(h),[l,h]),i.useEffect(()=>{return null==(e=r)||e.v7_startTransition,void 0===(null==e?void 0:e.v7_relativeSplatPath)&&(!t||t.v7_relativeSplatPath),void(t&&(t.v7_fetcherPersist,t.v7_normalizeFormMethod,t.v7_partialHydration,t.v7_skipActionErrorRevalidation));var e,t},[r]),i.createElement(yc,{basename:t,children:n,location:c.location,navigationType:c.action,navigator:l,future:r})}var Ec,Sc;Ce.flushSync,i.useId,"undefined"!=typeof window&&void 0!==window.document&&window.document.createElement,function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"}(Ec||(Ec={})),function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"}(Sc||(Sc={}));const jc=window.wp.i18n,Pc={400:"font-normal",500:"font-medium",600:"font-semibold",700:"font-bold"},Tc={36:"text-4xl",30:"text-3xl",24:"text-2xl",20:"text-xl",18:"text-lg",16:"text-base",14:"text-sm",12:"text-xs"},Cc={44:"leading-11",38:"leading-9.5",32:"leading-8",30:"leading-7.5",28:"leading-7",24:"leading-6",20:"leading-5",16:"leading-4"},Rc={2:"tracking-2"},Ac={brand600:"text-brand-primary-600",link:"text-link-primary",primary:"text-text-primary",secondary:"text-text-secondary",tertiary:"text-text-tertiary",disabled:"text-text-disabled",help:"text-field-helper",label:"text-field-label",info:"text-support-info",success:"text-support-success",warning:"text-support-warning",error:"text-support-error",inverse:"text-text-on-color"},Nc=(0,i.forwardRef)(function({as:e,children:t,weight:n,size:r,lineHeight:i,letterSpacing:s,color:a="primary",className:l,...c},u){return(0,o.jsx)(e||"p",{ref:u,className:ue("m-0 p-0",n?Pc[n]:"",r?Tc[r]:"",i?Cc[i]:"",s?Rc[s]:"",a?Ac[a]:"",l),...c,children:t})}),Mc=e=>{const t=(e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()))(e);return t.charAt(0).toUpperCase()+t.slice(1)},Dc=(...e)=>e.filter((e,t,n)=>Boolean(e)&&""!==e.trim()&&n.indexOf(e)===t).join(" ").trim(),Lc=e=>{for(const t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0};var Ic={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const Oc=(0,i.forwardRef)(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:s,iconNode:a,...l},c)=>(0,i.createElement)("svg",{ref:c,...Ic,width:t,height:t,stroke:e,strokeWidth:r?24*Number(n)/Number(t):n,className:Dc("lucide",o),...!s&&!Lc(l)&&{"aria-hidden":"true"},...l},[...a.map(([e,t])=>(0,i.createElement)(e,t)),...Array.isArray(s)?s:[s]])),Vc=(e,t)=>{const n=(0,i.forwardRef)(({className:n,...r},o)=>{return(0,i.createElement)(Oc,{ref:o,iconNode:t,className:Dc(`lucide-${s=Mc(e),s.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,`lucide-${e}`,n),...r});var s});return n.displayName=Mc(e),n},_c=Vc("play",[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]]),Fc=Vc("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]),Bc=Vc("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]),zc="SET_SCREENS",Uc="SET_CURRENT_SCREEN",Wc="SET_USER_INFO",$c="SET_PRO_FEATURES",Hc="SET_PRO_STATUS",Kc="SET_SELECTED_ADDONS",qc="SET_ACTIVATED_ADDONS",Yc="SET_STARTER_TEMPLATES_BUILDER",Gc=(e,t)=>{switch(t.type){case zc:return{...e,screens:t.payload};case Uc:return{...e,currentScreen:t.payload};case"UPDATE_STATE":return{...e,...t.payload};case"SET_LOADING":return{...e,isLoading:t.payload};case"SET_ERROR":return{...e,error:t.payload};case Wc:return{...e,userInfo:{...e.userInfo,...t.payload}};case $c:return{...e,proFeatures:t.payload};case Hc:return{...e,proStatus:t.payload};case Kc:return{...e,selectedAddons:t.payload};case qc:return{...e,activatedAddons:t.payload};case Yc:return{...e,starterTemplatesBuilder:t.payload};default:return e}},{productId:Xc,userInfo:{firstName:Zc,lastName:Jc,email:Qc}={},proStatus:eu}=window.oneOnboardingData||{},tu={productId:Xc,screens:[],currentScreen:"welcome",userInfo:{firstName:Zc||"",lastName:Jc||"",email:Qc||"",source:null,benefit:null,newUser:null},proFeatures:[],proStatus:eu||"not-installed",selectedAddons:[],activatedAddons:[],starterTemplatesBuilder:null},{productId:nu}=window.oneOnboardingData||{},ru=`${nu}_onboarding_state`,ou=e=>{try{const t=JSON.stringify(e);localStorage.setItem(ru,t)}catch(e){console.warn("Failed to save state to localStorage:",e)}},iu=window.wp.apiFetch;var su=n.n(iu);const au=(...e)=>e.filter(Boolean).join(" "),lu=e=>su()({path:`/one-onboarding/v1/plugin-status/${e}`,method:"GET"}).then(e=>({success:!0,data:e})).catch(t=>(console.error(`Error checking plugin status for ${e}:`,t),{success:!1,error:t.message})),cu=e=>su()({path:"/one-onboarding/v1/install-plugin",method:"POST",data:{plugin:e}}).then(e=>({success:!0,data:e})).catch(t=>(console.error(`Error installing plugin ${e}:`,t),{success:!1,error:t.message})),uu=e=>su()({path:"/one-onboarding/v1/activate-plugin",method:"POST",data:{plugin:e}}).then(e=>({success:!0,data:e})).catch(t=>(console.error(`Error activating plugin ${e}:`,t),{success:!1,error:t.message})),du=async e=>su()({path:"/one-onboarding/v1/save-onboarding-state",method:"POST",data:{onboardingState:e}}).then(e=>({success:!0,data:e})).catch(e=>(console.error("Error saving onboarding state:",e),{success:!1,error:e.message})),hu=async e=>su()({path:"/one-onboarding/v1/onboarding-completion",method:"POST",data:{onboardingState:e}}).then(e=>({success:!0,data:e})).catch(e=>(console.error("Error submitting onboarding completion:",e),{success:!1,error:e.message})),pu=(0,i.createContext)(),fu=({children:e})=>{const t=(()=>{try{const e=localStorage.getItem(ru);return null===e?null:JSON.parse(e)}catch(e){return console.warn("Failed to load state from localStorage:",e),null}})(),[n,r]=(0,i.useReducer)(Gc,t||tu);return(0,i.useEffect)(()=>{const e=()=>{ou(n),window.oneOnboardingData?.isExiting||du({...n,exitedEarly:"done"!==n?.currentScreen})},t=()=>{"hidden"===document.visibilityState&&(ou(n),du({...n,exitedEarly:"done"!==n?.currentScreen}))};return window.addEventListener("beforeunload",e),document.addEventListener("visibilitychange",t),()=>{window.removeEventListener("beforeunload",e),document.removeEventListener("visibilitychange",t)}},[n]),(0,i.useEffect)(()=>{ou(n)},[n.currentScreen]),(0,o.jsx)(pu.Provider,{value:{state:n,dispatch:r},children:e})},mu=()=>{const e=(0,i.useContext)(pu);if(!e)throw new Error("useStore must be used within StoreProvider");return e},gu=()=>{const{state:e,dispatch:t}=mu(),n=oc(),r=sc();(0,i.useEffect)(()=>{const r=n.pathname.replace("/","");r&&r!==e.currentScreen&&t({type:Uc,payload:r})},[n.pathname,e.currentScreen,t]);const o=e=>{t({type:Uc,payload:e}),r(`/${e}`)},s=({skip:n=!1}={})=>{const r=e.screens.findIndex(t=>t.id===e.currentScreen);if(t({type:zc,payload:e.screens.map((e,t)=>t===r?{...e,skipped:n}:e)}),r<e.screens.length-1){const t=e.screens[r+1].id;o(t)}};return{currentScreen:e.currentScreen,navigateToScreen:o,navigateToNextScreen:s,navigateToPreviousScreen:()=>{const t=e.screens.findIndex(t=>t.id===e.currentScreen);if(t>0){const n=e.screens[t-1].id;o(n)}},skipScreen:()=>{s({skip:!0})}}},{product:vu,screens:yu}=window.oneOnboardingData||{},bu=yu?.welcome||{};let xu=(e=21)=>{let t="",n=crypto.getRandomValues(new Uint8Array(e|=0));for(;e--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[63&n[e]];return t};const wu=u("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]),ku=(0,i.forwardRef)(({children:e=null,tag:t="label",size:n="sm",className:r="",variant:i="neutral",required:s=!1,...a},l)=>{if(!e)return null;let c="";return s&&(c="after:content-['*'] after:text-field-required after:ml-0.5"),(0,o.jsx)(t,{ref:l,className:ue("font-medium text-field-label flex items-center gap-0.5",{xs:"text-xs [&>*]:text-xs [&>svg]:h-3 [&>svg]:w-3",sm:"text-sm [&>*]:text-sm [&>svg]:h-4 [&>svg]:w-4",md:"text-base [&>*]:text-base [&>svg]:h-5 [&>svg]:w-5"}[n],{neutral:"text-field-label [&>*]:text-field-label",help:"text-field-helper [&>*]:text-field-helper",error:"text-support-error [&>*]:text-support-error",disabled:"text-field-color-disabled disabled cursor-not-allowed [&>*]:text-field-color-disabled"}[i],c,{neutral:"",help:"font-normal",error:"font-normal",disabled:""}?.[i],r),...a,children:e})});ku.displayName="Label";const Eu=(0,i.forwardRef)(({id:e,type:t="text",defaultValue:n="",value:r,size:s="sm",className:a="",disabled:l=!1,onChange:c=()=>{},error:u=!1,onError:h=()=>{},prefix:p=null,suffix:f=null,label:m="",...g},v)=>{const y=(0,i.useRef)(null),b=(0,i.useMemo)(()=>e||`input-${t}-${xu()}`,[e]),x=(0,i.useMemo)(()=>typeof r<"u",[r]),[w,k]=(0,i.useState)(n),[E,S]=(0,i.useState)(null),j=(0,i.useCallback)(()=>x?r:w,[x,r,w]),P=e=>{if(l)return;let n;"file"===t?(n=e.target.files,n&&n.length>0?S(n[0].name):S(null)):n=e.target.value,!x&&"file"!==t&&k(n),"function"==typeof c&&c(n)},T=()=>{S(null),y.current&&(y.current.value=""),c(null)},C="bg-field-secondary-background font-normal placeholder-text-tertiary text-text-primary w-full outline outline-1 outline-border-subtle border-none transition-[color,box-shadow,outline] duration-200",R={xs:"px-2 py-1 rounded",sm:"p-3 py-2 rounded",md:"p-3.5 py-2.5 rounded-md",lg:"p-4 py-3 rounded-lg"},A={xs:"text-xs font-medium",sm:"text-sm font-medium",md:"text-sm font-medium",lg:"text-base font-medium"},N={xs:"text-xs",sm:"text-xs",md:"text-sm",lg:"text-base"},M={sm:p?"pl-8":"",md:p?"pl-9":"",lg:p?"pl-10":""},D={sm:f?"pr-8":"",md:f?"pr-9":"",lg:f?"pr-10":""},L=l?"hover:outline-border-disabled":"hover:outline-border-strong",I="focus:outline-focus-border focus:ring-2 focus:ring-toggle-on focus:ring-offset-2",O=u?"focus:outline-focus-error-border focus:ring-field-color-error outline-focus-error-border":"",V=u?"focus:outline-focus-error-border focus:ring-field-color-error outline-focus-error-border":"",_=l?"outline-border-disabled bg-field-background-disabled cursor-not-allowed text-text-disabled":"",F=l?"outline-border-disabled cursor-not-allowed text-text-disabled file:text-text-tertiary":"",B="font-normal placeholder-text-tertiary text-text-primary pointer-events-none absolute inset-y-0 flex flex-1 items-center [&>svg]:h-4 [&>svg]:w-4",z=l?"font-normal placeholder-text-tertiary text-icon-disabled pointer-events-none absolute inset-y-0 flex flex-1 items-center":"font-normal placeholder-text-tertiary text-field-placeholder pointer-events-none absolute inset-y-0 flex flex-1 items-center",U={xs:"[&>svg]:size-4",sm:"[&>svg]:size-4",md:"[&>svg]:size-5",lg:"[&>svg]:size-6"},W=(0,i.useMemo)(()=>m?(0,o.jsx)(ku,{className:ue(A[s]),htmlFor:b,...g?.required&&{required:!0},children:m}):null,[m,s,b]),$=E?"file:border-0 file:bg-transparent pr-10":"text-text-tertiary file:border-0 file:bg-transparent pr-10";return"file"===t?(0,o.jsxs)("div",{className:"flex flex-col items-start gap-1.5 [&_*]:box-border box-border",children:[W,(0,o.jsxs)("div",{className:ue("w-full relative flex focus-within:z-10",a),children:[(0,o.jsx)("input",{ref:Ee(y,v),id:b,type:"file",className:ue(C,F,R[s],N[s],I,L,V,$),disabled:l,onChange:P,onInvalid:h,...g}),(0,o.jsx)("div",{className:ue(z,"right-0 pr-3",U[s]),children:(0,o.jsx)(wu,{})})]})]}):(0,o.jsxs)("div",{className:"flex flex-col items-start gap-1.5 [&_*]:box-border box-border",children:[W,(0,o.jsxs)("div",{className:ue("w-full relative flex focus-within:z-10",a),children:[p?(0,o.jsx)("div",{className:ue(B,"left-0 pl-3",N[s]),children:p}):null,(0,o.jsx)("input",{ref:Ee(y,v),id:b,type:t,className:ue(C,_,R[s],N[s],M[s],D[s],I,L,O),disabled:l,onChange:P,onInvalid:h,value:j(),...g}),"file"===t?E?(0,o.jsx)("div",{className:ue(z,"right-0 pr-3 cursor-pointer z-20 pointer-events-auto",U[s]),onClick:T,role:"button",tabIndex:0,onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&T()},children:(0,o.jsx)(d,{})}):(0,o.jsx)("div",{className:ue(z,"right-0 pr-3",U[s]),children:(0,o.jsx)(wu,{})}):f?(0,o.jsx)("div",{className:ue(B,"right-0 pr-3",N[s]),children:f}):null]})]})});Eu.displayName="Input";const Su=u("ChevronsUpDown",[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]]),ju=u("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]),Pu=u("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);function Tu(){return"undefined"!=typeof window}function Cu(e){return Nu(e)?(e.nodeName||"").toLowerCase():"#document"}function Ru(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function Au(e){var t;return null==(t=(Nu(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function Nu(e){return!!Tu()&&(e instanceof Node||e instanceof Ru(e).Node)}function Mu(e){return!!Tu()&&(e instanceof Element||e instanceof Ru(e).Element)}function Du(e){return!!Tu()&&(e instanceof HTMLElement||e instanceof Ru(e).HTMLElement)}function Lu(e){return!(!Tu()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof Ru(e).ShadowRoot)}const Iu=new Set(["inline","contents"]);function Ou(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Yu(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!Iu.has(o)}const Vu=new Set(["table","td","th"]);function _u(e){return Vu.has(Cu(e))}const Fu=[":popover-open",":modal"];function Bu(e){return Fu.some(t=>{try{return e.matches(t)}catch(e){return!1}})}const zu=["transform","translate","scale","rotate","perspective"],Uu=["transform","translate","scale","rotate","perspective","filter"],Wu=["paint","layout","strict","content"];function $u(e){const t=Hu(),n=Mu(e)?Yu(e):e;return zu.some(e=>!!n[e]&&"none"!==n[e])||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||Uu.some(e=>(n.willChange||"").includes(e))||Wu.some(e=>(n.contain||"").includes(e))}function Hu(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const Ku=new Set(["html","body","#document"]);function qu(e){return Ku.has(Cu(e))}function Yu(e){return Ru(e).getComputedStyle(e)}function Gu(e){return Mu(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Xu(e){if("html"===Cu(e))return e;const t=e.assignedSlot||e.parentNode||Lu(e)&&e.host||Au(e);return Lu(t)?t.host:t}function Zu(e){const t=Xu(e);return qu(t)?e.ownerDocument?e.ownerDocument.body:e.body:Du(t)&&Ou(t)?t:Zu(t)}function Ju(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=Zu(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),s=Ru(o);if(i){const e=Qu(s);return t.concat(s,s.visualViewport||[],Ou(o)?o:[],e&&n?Ju(e):[])}return t.concat(o,Ju(o,[],n))}function Qu(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ed(e){let t=e.activeElement;for(;null!=(null==(n=t)||null==(n=n.shadowRoot)?void 0:n.activeElement);){var n;t=t.shadowRoot.activeElement}return t}function td(e,t){if(!e||!t)return!1;const n=null==t.getRootNode?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&Lu(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function nd(){const e=navigator.userAgentData;return null!=e&&e.platform?e.platform:navigator.platform}function rd(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(e=>{let{brand:t,version:n}=e;return t+"/"+n}).join(" "):navigator.userAgent}function od(e){return!(0!==e.mozInputSource||!e.isTrusted)||(ad()&&e.pointerType?"click"===e.type&&1===e.buttons:0===e.detail&&!e.pointerType)}function id(e){return!rd().includes("jsdom/")&&(!ad()&&0===e.width&&0===e.height||ad()&&1===e.width&&1===e.height&&0===e.pressure&&0===e.detail&&"mouse"===e.pointerType||e.width<1&&e.height<1&&0===e.pressure&&0===e.detail&&"touch"===e.pointerType)}function sd(){return/apple/i.test(navigator.vendor)}function ad(){const e=/android/i;return e.test(nd())||e.test(rd())}function ld(){return nd().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function cd(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function ud(e){return(null==e?void 0:e.ownerDocument)||document}function dd(e,t){if(null==t)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return null!=n.target&&t.contains(n.target)}function hd(e){return"composedPath"in e?e.composedPath()[0]:e.target}function pd(e){return Du(e)&&e.matches("input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])")}function fd(e){e.preventDefault(),e.stopPropagation()}function md(e){return!!e&&"combobox"===e.getAttribute("role")&&pd(e)}const gd=Math.min,vd=Math.max,yd=Math.round,bd=Math.floor,xd=e=>({x:e,y:e}),wd={left:"right",right:"left",bottom:"top",top:"bottom"},kd={start:"end",end:"start"};function Ed(e,t,n){return vd(e,gd(t,n))}function Sd(e,t){return"function"==typeof e?e(t):e}function jd(e){return e.split("-")[0]}function Pd(e){return e.split("-")[1]}function Td(e){return"x"===e?"y":"x"}function Cd(e){return"y"===e?"height":"width"}const Rd=new Set(["top","bottom"]);function Ad(e){return Rd.has(jd(e))?"y":"x"}function Nd(e){return Td(Ad(e))}function Md(e){return e.replace(/start|end/g,e=>kd[e])}const Dd=["left","right"],Ld=["right","left"],Id=["top","bottom"],Od=["bottom","top"];function Vd(e){return e.replace(/left|right|bottom|top/g,e=>wd[e])}function _d(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function Fd(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}var Bd=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"].join(","),zd="undefined"==typeof Element,Ud=zd?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Wd=!zd&&Element.prototype.getRootNode?function(e){var t;return null==e||null===(t=e.getRootNode)||void 0===t?void 0:t.call(e)}:function(e){return null==e?void 0:e.ownerDocument},$d=function e(t,n){var r;void 0===n&&(n=!0);var o=null==t||null===(r=t.getAttribute)||void 0===r?void 0:r.call(t,"inert");return""===o||"true"===o||n&&t&&e(t.parentNode)},Hd=function e(t,n,r){for(var o=[],i=Array.from(t);i.length;){var s=i.shift();if(!$d(s,!1))if("SLOT"===s.tagName){var a=s.assignedElements(),l=e(a.length?a:s.children,!0,r);r.flatten?o.push.apply(o,l):o.push({scopeParent:s,candidates:l})}else{Ud.call(s,Bd)&&r.filter(s)&&(n||!t.includes(s))&&o.push(s);var c=s.shadowRoot||"function"==typeof r.getShadowRoot&&r.getShadowRoot(s),u=!$d(c,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(s));if(c&&u){var d=e(!0===c?s.children:c.children,!0,r);r.flatten?o.push.apply(o,d):o.push({scopeParent:s,candidates:d})}else i.unshift.apply(i,s.children)}}return o},Kd=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},qd=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||function(e){var t,n=null==e||null===(t=e.getAttribute)||void 0===t?void 0:t.call(e,"contenteditable");return""===n||"true"===n}(e))&&!Kd(e)?0:e.tabIndex},Yd=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},Gd=function(e){return"INPUT"===e.tagName},Xd=function(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return 0===n&&0===r},Zd=function(e,t){return!(t.disabled||$d(t)||function(e){return Gd(e)&&"hidden"===e.type}(t)||function(e,t){var n=t.displayCheck,r=t.getShadowRoot;if("hidden"===getComputedStyle(e).visibility)return!0;var o=Ud.call(e,"details>summary:first-of-type")?e.parentElement:e;if(Ud.call(o,"details:not([open]) *"))return!0;if(n&&"full"!==n&&"legacy-full"!==n){if("non-zero-area"===n)return Xd(e)}else{if("function"==typeof r){for(var i=e;e;){var s=e.parentElement,a=Wd(e);if(s&&!s.shadowRoot&&!0===r(s))return Xd(e);e=e.assignedSlot?e.assignedSlot:s||a===e.ownerDocument?s:a.host}e=i}if(function(e){var t,n,r,o,i=e&&Wd(e),s=null===(t=i)||void 0===t?void 0:t.host,a=!1;if(i&&i!==e)for(a=!!(null!==(n=s)&&void 0!==n&&null!==(r=n.ownerDocument)&&void 0!==r&&r.contains(s)||null!=e&&null!==(o=e.ownerDocument)&&void 0!==o&&o.contains(e));!a&&s;){var l,c,u;a=!(null===(c=s=null===(l=i=Wd(s))||void 0===l?void 0:l.host)||void 0===c||null===(u=c.ownerDocument)||void 0===u||!u.contains(s))}return a}(e))return!e.getClientRects().length;if("legacy-full"!==n)return!0}return!1}(t,e)||function(e){return"DETAILS"===e.tagName&&Array.prototype.slice.apply(e.children).some(function(e){return"SUMMARY"===e.tagName})}(t)||function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if("FIELDSET"===t.tagName&&t.disabled){for(var n=0;n<t.children.length;n++){var r=t.children.item(n);if("LEGEND"===r.tagName)return!!Ud.call(t,"fieldset[disabled] *")||!r.contains(e)}return!0}t=t.parentElement}return!1}(t))},Jd=function(e,t){return!(function(e){return function(e){return Gd(e)&&"radio"===e.type}(e)&&!function(e){if(!e.name)return!0;var t,n=e.form||Wd(e),r=function(e){return n.querySelectorAll('input[type="radio"][name="'+e+'"]')};if("undefined"!=typeof window&&void 0!==window.CSS&&"function"==typeof window.CSS.escape)t=r(window.CSS.escape(e.name));else try{t=r(e.name)}catch(e){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",e.message),!1}var o=function(e,t){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===t)return e[n]}(t,e.form);return!o||o===e}(e)}(t)||qd(t)<0||!Zd(e,t))},Qd=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},eh=function e(t){var n=[],r=[];return t.forEach(function(t,o){var i=!!t.scopeParent,s=i?t.scopeParent:t,a=function(e,t){var n=qd(e);return n<0&&t&&!Kd(e)?0:n}(s,i),l=i?e(t.candidates):s;0===a?i?n.push.apply(n,l):n.push(s):r.push({documentOrder:o,tabIndex:a,item:t,isScope:i,content:l})}),r.sort(Yd).reduce(function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e},[]).concat(n)},th=function(e,t){var n;return n=(t=t||{}).getShadowRoot?Hd([e],t.includeContainer,{filter:Jd.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:Qd}):function(e,t,n){if($d(e))return[];var r=Array.prototype.slice.apply(e.querySelectorAll(Bd));return t&&Ud.call(e,Bd)&&r.unshift(e),r.filter(n)}(e,t.includeContainer,Jd.bind(null,t)),eh(n)};function nh(e,t,n){let{reference:r,floating:o}=e;const i=Ad(t),s=Nd(t),a=Cd(s),l=jd(t),c="y"===i,u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,h=r[a]/2-o[a]/2;let p;switch(l){case"top":p={x:u,y:r.y-o.height};break;case"bottom":p={x:u,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:d};break;case"left":p={x:r.x-o.width,y:d};break;default:p={x:r.x,y:r.y}}switch(Pd(t)){case"start":p[s]-=h*(n&&c?-1:1);break;case"end":p[s]+=h*(n&&c?-1:1)}return p}async function rh(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:i,rects:s,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:h=!1,padding:p=0}=Sd(t,e),f=_d(p),m=a[h?"floating"===d?"reference":"floating":d],g=Fd(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(m)))||n?m:m.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),v="floating"===d?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,y=await(null==i.getOffsetParent?void 0:i.getOffsetParent(a.floating)),b=await(null==i.isElement?void 0:i.isElement(y))&&await(null==i.getScale?void 0:i.getScale(y))||{x:1,y:1},x=Fd(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:v,offsetParent:y,strategy:l}):v);return{top:(g.top-x.top+f.top)/b.y,bottom:(x.bottom-g.bottom+f.bottom)/b.y,left:(g.left-x.left+f.left)/b.x,right:(x.right-g.right+f.right)/b.x}}const oh=new Set(["left","top"]);function ih(e){const t=Yu(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Du(e),i=o?e.offsetWidth:n,s=o?e.offsetHeight:r,a=yd(n)!==i||yd(r)!==s;return a&&(n=i,r=s),{width:n,height:r,$:a}}function sh(e){return Mu(e)?e:e.contextElement}function ah(e){const t=sh(e);if(!Du(t))return xd(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=ih(t);let s=(i?yd(n.width):n.width)/r,a=(i?yd(n.height):n.height)/o;return s&&Number.isFinite(s)||(s=1),a&&Number.isFinite(a)||(a=1),{x:s,y:a}}const lh=xd(0);function ch(e){const t=Ru(e);return Hu()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:lh}function uh(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),i=sh(e);let s=xd(1);t&&(r?Mu(r)&&(s=ah(r)):s=ah(e));const a=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==Ru(e))&&t}(i,n,r)?ch(i):xd(0);let l=(o.left+a.x)/s.x,c=(o.top+a.y)/s.y,u=o.width/s.x,d=o.height/s.y;if(i){const e=Ru(i),t=r&&Mu(r)?Ru(r):r;let n=e,o=Qu(n);for(;o&&r&&t!==n;){const e=ah(o),t=o.getBoundingClientRect(),r=Yu(o),i=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,s=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;l*=e.x,c*=e.y,u*=e.x,d*=e.y,l+=i,c+=s,n=Ru(o),o=Qu(n)}}return Fd({width:u,height:d,x:l,y:c})}function dh(e,t){const n=Gu(e).scrollLeft;return t?t.left+n:uh(Au(e)).left+n}function hh(e,t,n){void 0===n&&(n=!1);const r=e.getBoundingClientRect();return{x:r.left+t.scrollLeft-(n?0:dh(e,r)),y:r.top+t.scrollTop}}const ph=new Set(["absolute","fixed"]);function fh(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=Ru(e),r=Au(e),o=n.visualViewport;let i=r.clientWidth,s=r.clientHeight,a=0,l=0;if(o){i=o.width,s=o.height;const e=Hu();(!e||e&&"fixed"===t)&&(a=o.offsetLeft,l=o.offsetTop)}return{width:i,height:s,x:a,y:l}}(e,n);else if("document"===t)r=function(e){const t=Au(e),n=Gu(e),r=e.ownerDocument.body,o=vd(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=vd(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+dh(e);const a=-n.scrollTop;return"rtl"===Yu(r).direction&&(s+=vd(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:a}}(Au(e));else if(Mu(t))r=function(e,t){const n=uh(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Du(e)?ah(e):xd(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:o*i.x,y:r*i.y}}(t,n);else{const n=ch(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Fd(r)}function mh(e,t){const n=Xu(e);return!(n===t||!Mu(n)||qu(n))&&("fixed"===Yu(n).position||mh(n,t))}function gh(e,t,n){const r=Du(t),o=Au(t),i="fixed"===n,s=uh(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=xd(0);function c(){l.x=dh(o)}if(r||!r&&!i)if(("body"!==Cu(t)||Ou(o))&&(a=Gu(t)),r){const e=uh(t,!0,i,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else o&&c();i&&!r&&o&&c();const u=!o||r||i?xd(0):hh(o,a);return{x:s.left+a.scrollLeft-l.x-u.x,y:s.top+a.scrollTop-l.y-u.y,width:s.width,height:s.height}}function vh(e){return"static"===Yu(e).position}function yh(e,t){if(!Du(e)||"fixed"===Yu(e).position)return null;if(t)return t(e);let n=e.offsetParent;return Au(e)===n&&(n=n.ownerDocument.body),n}function bh(e,t){const n=Ru(e);if(Bu(e))return n;if(!Du(e)){let t=Xu(e);for(;t&&!qu(t);){if(Mu(t)&&!vh(t))return t;t=Xu(t)}return n}let r=yh(e,t);for(;r&&_u(r)&&vh(r);)r=yh(r,t);return r&&qu(r)&&vh(r)&&!$u(r)?n:r||function(e){let t=Xu(e);for(;Du(t)&&!qu(t);){if($u(t))return t;if(Bu(t))return null;t=Xu(t)}return null}(e)||n}const xh={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i="fixed"===o,s=Au(r),a=!!t&&Bu(t.floating);if(r===s||a&&i)return n;let l={scrollLeft:0,scrollTop:0},c=xd(1);const u=xd(0),d=Du(r);if((d||!d&&!i)&&(("body"!==Cu(r)||Ou(s))&&(l=Gu(r)),Du(r))){const e=uh(r);c=ah(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}const h=!s||d||i?xd(0):hh(s,l,!0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+h.x,y:n.y*c.y-l.scrollTop*c.y+u.y+h.y}},getDocumentElement:Au,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[..."clippingAncestors"===n?Bu(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let r=Ju(e,[],!1).filter(e=>Mu(e)&&"body"!==Cu(e)),o=null;const i="fixed"===Yu(e).position;let s=i?Xu(e):e;for(;Mu(s)&&!qu(s);){const t=Yu(s),n=$u(s);n||"fixed"!==t.position||(o=null),(i?!n&&!o:!n&&"static"===t.position&&o&&ph.has(o.position)||Ou(s)&&!n&&mh(e,s))?r=r.filter(e=>e!==s):o=t,s=Xu(s)}return t.set(e,r),r}(t,this._c):[].concat(n),r],s=i[0],a=i.reduce((e,n)=>{const r=fh(t,n,o);return e.top=vd(r.top,e.top),e.right=gd(r.right,e.right),e.bottom=gd(r.bottom,e.bottom),e.left=vd(r.left,e.left),e},fh(t,s,o));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},getOffsetParent:bh,getElementRects:async function(e){const t=this.getOffsetParent||bh,n=this.getDimensions,r=await n(e.floating);return{reference:gh(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=ih(e);return{width:t,height:n}},getScale:ah,isElement:Mu,isRTL:function(e){return"rtl"===Yu(e).direction}};function wh(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function kh(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s="function"==typeof ResizeObserver,layoutShift:a="function"==typeof IntersectionObserver,animationFrame:l=!1}=r,c=sh(e),u=o||i?[...c?Ju(c):[],...Ju(t)]:[];u.forEach(e=>{o&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)});const d=c&&a?function(e,t){let n,r=null;const o=Au(e);function i(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function s(a,l){void 0===a&&(a=!1),void 0===l&&(l=1),i();const c=e.getBoundingClientRect(),{left:u,top:d,width:h,height:p}=c;if(a||t(),!h||!p)return;const f={rootMargin:-bd(d)+"px "+-bd(o.clientWidth-(u+h))+"px "+-bd(o.clientHeight-(d+p))+"px "+-bd(u)+"px",threshold:vd(0,gd(1,l))||1};let m=!0;function g(t){const r=t[0].intersectionRatio;if(r!==l){if(!m)return s();r?s(!1,r):n=setTimeout(()=>{s(!1,1e-7)},1e3)}1!==r||wh(c,e.getBoundingClientRect())||s(),m=!1}try{r=new IntersectionObserver(g,{...f,root:o.ownerDocument})}catch(e){r=new IntersectionObserver(g,f)}r.observe(e)}(!0),i}(c,n):null;let h,p=-1,f=null;s&&(f=new ResizeObserver(e=>{let[r]=e;r&&r.target===c&&f&&(f.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var e;null==(e=f)||e.observe(t)})),n()}),c&&!l&&f.observe(c),f.observe(t));let m=l?uh(e):null;return l&&function t(){const r=uh(e);m&&!wh(m,r)&&n(),m=r,h=requestAnimationFrame(t)}(),n(),()=>{var e;u.forEach(e=>{o&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)}),null==d||d(),null==(e=f)||e.disconnect(),f=null,l&&cancelAnimationFrame(h)}}const Eh=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:s,middlewareData:a}=t,l=await async function(e,t){const{placement:n,platform:r,elements:o}=e,i=await(null==r.isRTL?void 0:r.isRTL(o.floating)),s=jd(n),a=Pd(n),l="y"===Ad(n),c=oh.has(s)?-1:1,u=i&&l?-1:1,d=Sd(t,e);let{mainAxis:h,crossAxis:p,alignmentAxis:f}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&"number"==typeof f&&(p="end"===a?-1*f:f),l?{x:p*u,y:h*c}:{x:h*c,y:p*u}}(t,e);return s===(null==(n=a.offset)?void 0:n.placement)&&null!=(r=a.arrow)&&r.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:s}}}}},Sh=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:s=!1,limiter:a={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=Sd(e,t),c={x:n,y:r},u=await rh(t,l),d=Ad(jd(o)),h=Td(d);let p=c[h],f=c[d];if(i){const e="y"===h?"bottom":"right";p=Ed(p+u["y"===h?"top":"left"],p,p-u[e])}if(s){const e="y"===d?"bottom":"right";f=Ed(f+u["y"===d?"top":"left"],f,f-u[e])}const m=a.fn({...t,[h]:p,[d]:f});return{...m,data:{x:m.x-n,y:m.y-r,enabled:{[h]:i,[d]:s}}}}}},jh=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:s,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:h,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:f="none",flipAlignment:m=!0,...g}=Sd(e,t);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const v=jd(o),y=Ad(a),b=jd(a)===a,x=await(null==l.isRTL?void 0:l.isRTL(c.floating)),w=h||(b||!m?[Vd(a)]:function(e){const t=Vd(e);return[Md(e),t,Md(t)]}(a)),k="none"!==f;!h&&k&&w.push(...function(e,t,n,r){const o=Pd(e);let i=function(e,t,n){switch(e){case"top":case"bottom":return n?t?Ld:Dd:t?Dd:Ld;case"left":case"right":return t?Id:Od;default:return[]}}(jd(e),"start"===n,r);return o&&(i=i.map(e=>e+"-"+o),t&&(i=i.concat(i.map(Md)))),i}(a,m,f,x));const E=[a,...w],S=await rh(t,g),j=[];let P=(null==(r=i.flip)?void 0:r.overflows)||[];if(u&&j.push(S[v]),d){const e=function(e,t,n){void 0===n&&(n=!1);const r=Pd(e),o=Nd(e),i=Cd(o);let s="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=Vd(s)),[s,Vd(s)]}(o,s,x);j.push(S[e[0]],S[e[1]])}if(P=[...P,{placement:o,overflows:j}],!j.every(e=>e<=0)){var T,C;const e=((null==(T=i.flip)?void 0:T.index)||0)+1,t=E[e];if(t&&("alignment"!==d||y===Ad(t)||P.every(e=>Ad(e.placement)!==y||e.overflows[0]>0)))return{data:{index:e,overflows:P},reset:{placement:t}};let n=null==(C=P.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:C.placement;if(!n)switch(p){case"bestFit":{var R;const e=null==(R=P.filter(e=>{if(k){const t=Ad(e.placement);return t===y||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:R[0];e&&(n=e);break}case"initialPlacement":n=a}if(o!==n)return{reset:{placement:n}}}return{}}}},Ph=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:s,elements:a}=t,{apply:l=()=>{},...c}=Sd(e,t),u=await rh(t,c),d=jd(o),h=Pd(o),p="y"===Ad(o),{width:f,height:m}=i.floating;let g,v;"top"===d||"bottom"===d?(g=d,v=h===(await(null==s.isRTL?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(v=d,g="end"===h?"top":"bottom");const y=m-u.top-u.bottom,b=f-u.left-u.right,x=gd(m-u[g],y),w=gd(f-u[v],b),k=!t.middlewareData.shift;let E=x,S=w;if(null!=(n=t.middlewareData.shift)&&n.enabled.x&&(S=b),null!=(r=t.middlewareData.shift)&&r.enabled.y&&(E=y),k&&!h){const e=vd(u.left,0),t=vd(u.right,0),n=vd(u.top,0),r=vd(u.bottom,0);p?S=f-2*(0!==e||0!==t?e+t:vd(u.left,u.right)):E=m-2*(0!==n||0!==r?n+r:vd(u.top,u.bottom))}await l({...t,availableWidth:S,availableHeight:E});const j=await s.getDimensions(a.floating);return f!==j.width||m!==j.height?{reset:{rects:!0}}:{}}}},Th=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:s,elements:a,middlewareData:l}=t,{element:c,padding:u=0}=Sd(e,t)||{};if(null==c)return{};const d=_d(u),h={x:n,y:r},p=Nd(o),f=Cd(p),m=await s.getDimensions(c),g="y"===p,v=g?"top":"left",y=g?"bottom":"right",b=g?"clientHeight":"clientWidth",x=i.reference[f]+i.reference[p]-h[p]-i.floating[f],w=h[p]-i.reference[p],k=await(null==s.getOffsetParent?void 0:s.getOffsetParent(c));let E=k?k[b]:0;E&&await(null==s.isElement?void 0:s.isElement(k))||(E=a.floating[b]||i.floating[f]);const S=x/2-w/2,j=E/2-m[f]/2-1,P=gd(d[v],j),T=gd(d[y],j),C=P,R=E-m[f]-T,A=E/2-m[f]/2+S,N=Ed(C,A,R),M=!l.arrow&&null!=Pd(o)&&A!==N&&i.reference[f]/2-(A<C?P:T)-m[f]/2<0,D=M?A<C?A-C:A-R:0;return{[p]:h[p]+D,data:{[p]:N,centerOffset:A-N-D,...M&&{alignmentOffset:D}},reset:M}}}),Ch=(e,t,n)=>{const r=new Map,o={platform:xh,...n},i={...o.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,a=i.filter(Boolean),l=await(null==s.isRTL?void 0:s.isRTL(t));let c=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=nh(c,r,l),h=r,p={},f=0;for(let n=0;n<a.length;n++){const{name:i,fn:m}=a[n],{x:g,y:v,data:y,reset:b}=await m({x:u,y:d,initialPlacement:r,placement:h,strategy:o,middlewareData:p,rects:c,platform:s,elements:{reference:e,floating:t}});u=null!=g?g:u,d=null!=v?v:d,p={...p,[i]:{...p[i],...y}},b&&f<=50&&(f++,"object"==typeof b&&(b.placement&&(h=b.placement),b.rects&&(c=!0===b.rects?await s.getElementRects({reference:e,floating:t,strategy:o}):b.rects),({x:u,y:d}=nh(c,h,l))),n=-1)}return{x:u,y:d,placement:h,strategy:o,middlewareData:p}})(e,t,{...o,platform:i})};var Rh="undefined"!=typeof document?i.useLayoutEffect:function(){};function Ah(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;0!==r--;)if(!Ah(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;0!==r--;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!==r--;){const n=o[r];if(!("_owner"===n&&e.$$typeof||Ah(e[n],t[n])))return!1}return!0}return e!=e&&t!=t}function Nh(e){return"undefined"==typeof window?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Mh(e,t){const n=Nh(e);return Math.round(t*n)/n}function Dh(e){const t=i.useRef(e);return Rh(()=>{t.current=e}),t}const Lh=e=>({name:"arrow",options:e,fn(t){const{element:n,padding:r}="function"==typeof e?e(t):e;return n&&(o=n,{}.hasOwnProperty.call(o,"current"))?null!=n.current?Th({element:n.current,padding:r}).fn(t):{}:n?Th({element:n,padding:r}).fn(t):{};var o}}),Ih=(e,t)=>({...Eh(e),options:[e,t]}),Oh=(e,t)=>({...jh(e),options:[e,t]}),Vh=(e,t)=>({...Lh(e),options:[e,t]}),_h={...s},Fh=_h.useInsertionEffect||(e=>e());function Bh(e){const t=i.useRef(()=>{});return Fh(()=>{t.current=e}),i.useCallback(function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return null==t.current?void 0:t.current(...n)},[])}const zh="ArrowUp",Uh="ArrowDown",Wh="ArrowLeft",$h="ArrowRight";function Hh(e,t,n){return Math.floor(e/t)!==n}function Kh(e,t){return t<0||t>=e.current.length}function qh(e,t){return Gh(e,{disabledIndices:t})}function Yh(e,t){return Gh(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function Gh(e,t){let{startingIndex:n=-1,decrement:r=!1,disabledIndices:o,amount:i=1}=void 0===t?{}:t;const s=e.current;let a=n;do{a+=r?-i:i}while(a>=0&&a<=s.length-1&&Jh(s,a,o));return a}function Xh(e,t,n,r,o){if(-1===e)return-1;const i=n.indexOf(e),s=t[e];switch(o){case"tl":return i;case"tr":return s?i+s.width-1:i;case"bl":return s?i+(s.height-1)*r:i;case"br":return n.lastIndexOf(e)}}function Zh(e,t){return t.flatMap((t,n)=>e.includes(t)?[n]:[])}function Jh(e,t,n){if(n)return n.includes(t);const r=e[t];return null==r||r.hasAttribute("disabled")||"true"===r.getAttribute("aria-disabled")}var Qh="undefined"!=typeof document?i.useLayoutEffect:i.useEffect;function ep(){return ep=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ep.apply(this,arguments)}let tp=!1,np=0;const rp=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+np++,op=_h.useId||function(){const[e,t]=i.useState(()=>tp?rp():void 0);return Qh(()=>{null==e&&t(rp())},[]),i.useEffect(()=>{tp=!0},[]),e},ip=i.forwardRef(function(e,t){const{context:{placement:n,elements:{floating:r},middlewareData:{arrow:o,shift:s}},width:a=14,height:l=7,tipRadius:c=0,strokeWidth:u=0,staticOffset:d,stroke:h,d:p,style:{transform:f,...m}={},...g}=e,v=op(),[y,b]=i.useState(!1);if(Qh(()=>{r&&"rtl"===Yu(r).direction&&b(!0)},[r]),!r)return null;const[x,w]=n.split("-"),k="top"===x||"bottom"===x;let E=d;(k&&null!=s&&s.x||!k&&null!=s&&s.y)&&(E=null);const S=2*u,j=S/2,P=a/2*(c/-8+1),T=l/2*c/4,C=!!p,R=E&&"end"===w?"bottom":"top";let A=E&&"end"===w?"right":"left";E&&y&&(A="end"===w?"left":"right");const N=null!=(null==o?void 0:o.x)?E||o.x:"",M=null!=(null==o?void 0:o.y)?E||o.y:"",D=p||"M0,0 H"+a+" L"+(a-P)+","+(l-T)+" Q"+a/2+","+l+" "+P+","+(l-T)+" Z",L={top:C?"rotate(180deg)":"",left:C?"rotate(90deg)":"rotate(-90deg)",bottom:C?"":"rotate(180deg)",right:C?"rotate(-90deg)":"rotate(90deg)"}[x];return i.createElement("svg",ep({},g,{"aria-hidden":!0,ref:t,width:C?a:a+S,height:a,viewBox:"0 0 "+a+" "+(l>a?l:a),style:{position:"absolute",pointerEvents:"none",[A]:N,[R]:M,[x]:k||C?"100%":"calc(100% - "+S/2+"px)",transform:[L,f].filter(e=>!!e).join(" "),...m}}),S>0&&i.createElement("path",{clipPath:"url(#"+v+")",fill:"none",stroke:h,strokeWidth:S+(p?0:1),d:D}),i.createElement("path",{stroke:S&&!p?g.fill:"none",d:D}),i.createElement("clipPath",{id:v},i.createElement("rect",{x:-j,y:j*(C?-1:1),width:a+S,height:a})))});const sp=i.createContext(null),ap=i.createContext(null),lp=()=>{var e;return(null==(e=i.useContext(sp))?void 0:e.id)||null},cp=()=>i.useContext(ap);function up(e){return"data-floating-ui-"+e}function dp(e){const t=(0,i.useRef)(e);return Qh(()=>{t.current=e}),t}const hp=up("safe-polygon");function pp(e,t,n){return n&&!cd(n)?0:"number"==typeof e?e:null==e?void 0:e[t]}let fp=0;function mp(e,t){void 0===t&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(fp);const i=()=>null==e?void 0:e.focus({preventScroll:n});o?i():fp=requestAnimationFrame(i)}function gp(e,t){let n=e.filter(e=>{var n;return e.parentId===t&&(null==(n=e.context)?void 0:n.open)}),r=n;for(;r.length;)r=e.filter(e=>{var t;return null==(t=r)?void 0:t.some(t=>{var n;return e.parentId===t.id&&(null==(n=e.context)?void 0:n.open)})}),n=n.concat(r);return n}let vp=new WeakMap,yp=new WeakSet,bp={},xp=0;const wp=e=>e&&(e.host||wp(e.parentNode));function kp(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);const r=ud(e[0]).body;return function(e,t,n,r){const o="data-floating-ui-inert",i=r?"inert":n?"aria-hidden":null,s=(a=t,e.map(e=>{if(a.contains(e))return e;const t=wp(e);return a.contains(t)?t:null}).filter(e=>null!=e));var a;const l=new Set,c=new Set(s),u=[];bp[o]||(bp[o]=new WeakMap);const d=bp[o];return s.forEach(function e(t){t&&!l.has(t)&&(l.add(t),t.parentNode&&e(t.parentNode))}),function e(t){t&&!c.has(t)&&[].forEach.call(t.children,t=>{if("script"!==Cu(t))if(l.has(t))e(t);else{const e=i?t.getAttribute(i):null,n=null!==e&&"false"!==e,r=(vp.get(t)||0)+1,s=(d.get(t)||0)+1;vp.set(t,r),d.set(t,s),u.push(t),1===r&&n&&yp.add(t),1===s&&t.setAttribute(o,""),!n&&i&&t.setAttribute(i,"true")}})}(t),l.clear(),xp++,()=>{u.forEach(e=>{const t=(vp.get(e)||0)-1,n=(d.get(e)||0)-1;vp.set(e,t),d.set(e,n),t||(!yp.has(e)&&i&&e.removeAttribute(i),yp.delete(e)),n||e.removeAttribute(o)}),xp--,xp||(vp=new WeakMap,vp=new WeakMap,yp=new WeakSet,bp={})}}(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const Ep=()=>({getShadowRoot:!0,displayCheck:"function"==typeof ResizeObserver&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function Sp(e,t){const n=th(e,Ep());"prev"===t&&n.reverse();const r=n.indexOf(ed(ud(e)));return n.slice(r+1)[0]}function jp(){return Sp(document.body,"next")}function Pp(){return Sp(document.body,"prev")}function Tp(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!td(n,r)}function Cp(e){th(e,Ep()).forEach(e=>{e.dataset.tabindex=e.getAttribute("tabindex")||"",e.setAttribute("tabindex","-1")})}function Rp(e){e.querySelectorAll("[data-tabindex]").forEach(e=>{const t=e.dataset.tabindex;delete e.dataset.tabindex,t?e.setAttribute("tabindex",t):e.removeAttribute("tabindex")})}const Ap={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0};function Np(e){"Tab"===e.key&&(e.target,clearTimeout(void 0))}const Mp=i.forwardRef(function(e,t){const[n,r]=i.useState();Qh(()=>(sd()&&r("button"),document.addEventListener("keydown",Np),()=>{document.removeEventListener("keydown",Np)}),[]);const o={ref:t,tabIndex:0,role:n,"aria-hidden":!n||void 0,[up("focus-guard")]:"",style:Ap};return i.createElement("span",ep({},e,o))}),Dp=i.createContext(null),Lp=up("portal");function Ip(e){const{children:t,id:n,root:r,preserveTabOrder:o=!0}=e,s=function(e){void 0===e&&(e={});const{id:t,root:n}=e,r=op(),o=Op(),[s,a]=i.useState(null),l=i.useRef(null);return Qh(()=>()=>{null==s||s.remove(),queueMicrotask(()=>{l.current=null})},[s]),Qh(()=>{if(!r)return;if(l.current)return;const e=t?document.getElementById(t):null;if(!e)return;const n=document.createElement("div");n.id=r,n.setAttribute(Lp,""),e.appendChild(n),l.current=n,a(n)},[t,r]),Qh(()=>{if(null===n)return;if(!r)return;if(l.current)return;let e=n||(null==o?void 0:o.portalNode);e&&!Mu(e)&&(e=e.current),e=e||document.body;let i=null;t&&(i=document.createElement("div"),i.id=t,e.appendChild(i));const s=document.createElement("div");s.id=r,s.setAttribute(Lp,""),e=i||e,e.appendChild(s),l.current=s,a(s)},[t,n,r,o]),s}({id:n,root:r}),[a,l]=i.useState(null),c=i.useRef(null),u=i.useRef(null),d=i.useRef(null),h=i.useRef(null),p=null==a?void 0:a.modal,f=null==a?void 0:a.open,m=!!a&&!a.modal&&a.open&&o&&!(!r&&!s);return i.useEffect(()=>{if(s&&o&&!p)return s.addEventListener("focusin",e,!0),s.addEventListener("focusout",e,!0),()=>{s.removeEventListener("focusin",e,!0),s.removeEventListener("focusout",e,!0)};function e(e){s&&Tp(e)&&("focusin"===e.type?Rp:Cp)(s)}},[s,o,p]),i.useEffect(()=>{s&&(f||Rp(s))},[f,s]),i.createElement(Dp.Provider,{value:i.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:c,afterOutsideRef:u,beforeInsideRef:d,afterInsideRef:h,portalNode:s,setFocusManagerState:l}),[o,s])},m&&s&&i.createElement(Mp,{"data-type":"outside",ref:c,onFocus:e=>{if(Tp(e,s)){var t;null==(t=d.current)||t.focus()}else{const e=Pp()||(null==a?void 0:a.refs.domReference.current);null==e||e.focus()}}}),m&&s&&i.createElement("span",{"aria-owns":s.id,style:Ap}),s&&Ce.createPortal(t,s),m&&s&&i.createElement(Mp,{"data-type":"outside",ref:u,onFocus:e=>{if(Tp(e,s)){var t;null==(t=h.current)||t.focus()}else{const t=jp()||(null==a?void 0:a.refs.domReference.current);null==t||t.focus(),(null==a?void 0:a.closeOnFocusOut)&&(null==a||a.onOpenChange(!1,e.nativeEvent,"focus-out"))}}}))}const Op=()=>i.useContext(Dp),Vp="data-floating-ui-focusable";function _p(e){return e?e.hasAttribute(Vp)?e:e.querySelector("["+Vp+"]")||e:null}let Fp=[];function Bp(e){Fp=Fp.filter(e=>e.isConnected);let t=e;if(t&&"body"!==Cu(t)){if(!function(e,t){if(t=t||{},!e)throw new Error("No node provided");return!1!==Ud.call(e,Bd)&&Jd(t,e)}(t,Ep())){const e=th(t,Ep())[0];e&&(t=e)}Fp.push(t),Fp.length>20&&(Fp=Fp.slice(-20))}}function zp(){return Fp.slice().reverse().find(e=>e.isConnected)}const Up=i.forwardRef(function(e,t){return i.createElement("button",ep({},e,{type:"button",ref:t,tabIndex:-1,style:Ap}))});function Wp(e){const{context:t,children:n,disabled:r=!1,order:o=["content"],guards:s=!0,initialFocus:a=0,returnFocus:l=!0,restoreFocus:c=!1,modal:u=!0,visuallyHiddenDismiss:d=!1,closeOnFocusOut:h=!0}=e,{open:p,refs:f,nodeId:m,onOpenChange:g,events:v,dataRef:y,floatingId:b,elements:{domReference:x,floating:w}}=t,k="number"==typeof a&&a<0,E=md(x)&&k,S="undefined"==typeof HTMLElement||!("inert"in HTMLElement.prototype)||s,j=dp(o),P=dp(a),T=dp(l),C=cp(),R=Op(),A=i.useRef(null),N=i.useRef(null),M=i.useRef(!1),D=i.useRef(!1),L=i.useRef(-1),I=null!=R,O=_p(w),V=Bh(function(e){return void 0===e&&(e=O),e?th(e,Ep()):[]}),_=Bh(e=>{const t=V(e);return j.current.map(e=>x&&"reference"===e?x:O&&"floating"===e?O:t).filter(Boolean).flat()});function F(e){return!r&&d&&u?i.createElement(Up,{ref:"start"===e?A:N,onClick:e=>g(!1,e.nativeEvent)},"string"==typeof d?d:"Dismiss"):null}i.useEffect(()=>{if(r)return;if(!u)return;function e(e){if("Tab"===e.key){td(O,ed(ud(O)))&&0===V().length&&!E&&fd(e);const t=_(),n=hd(e);"reference"===j.current[0]&&n===x&&(fd(e),e.shiftKey?mp(t[t.length-1]):mp(t[1])),"floating"===j.current[1]&&n===O&&e.shiftKey&&(fd(e),mp(t[0]))}}const t=ud(O);return t.addEventListener("keydown",e),()=>{t.removeEventListener("keydown",e)}},[r,x,O,u,j,E,V,_]),i.useEffect(()=>{if(!r&&w)return w.addEventListener("focusin",e),()=>{w.removeEventListener("focusin",e)};function e(e){const t=hd(e),n=V().indexOf(t);-1!==n&&(L.current=n)}},[r,w,V]),i.useEffect(()=>{if(!r&&h)return w&&Du(x)?(x.addEventListener("focusout",t),x.addEventListener("pointerdown",e),w.addEventListener("focusout",t),()=>{x.removeEventListener("focusout",t),x.removeEventListener("pointerdown",e),w.removeEventListener("focusout",t)}):void 0;function e(){D.current=!0,setTimeout(()=>{D.current=!1})}function t(e){const t=e.relatedTarget;queueMicrotask(()=>{const n=!(td(x,t)||td(w,t)||td(t,w)||td(null==R?void 0:R.portalNode,t)||null!=t&&t.hasAttribute(up("focus-guard"))||C&&(gp(C.nodesRef.current,m).find(e=>{var n,r;return td(null==(n=e.context)?void 0:n.elements.floating,t)||td(null==(r=e.context)?void 0:r.elements.domReference,t)})||function(e,t){var n;let r=[],o=null==(n=e.find(e=>e.id===t))?void 0:n.parentId;for(;o;){const t=e.find(e=>e.id===o);o=null==t?void 0:t.parentId,t&&(r=r.concat(t))}return r}(C.nodesRef.current,m).find(e=>{var n,r;return(null==(n=e.context)?void 0:n.elements.floating)===t||(null==(r=e.context)?void 0:r.elements.domReference)===t})));if(c&&n&&ed(ud(O))===ud(O).body){Du(O)&&O.focus();const e=L.current,t=V(),n=t[e]||t[t.length-1]||O;Du(n)&&n.focus()}!E&&u||!t||!n||D.current||t===zp()||(M.current=!0,g(!1,e,"focus-out"))})}},[r,x,w,O,u,m,C,R,g,h,c,V,E]),i.useEffect(()=>{var e;if(r)return;const t=Array.from((null==R||null==(e=R.portalNode)?void 0:e.querySelectorAll("["+up("portal")+"]"))||[]);if(w){const e=[w,...t,A.current,N.current,j.current.includes("reference")||E?x:null].filter(e=>null!=e),n=u||E?kp(e,S,!S):kp(e);return()=>{n()}}},[r,x,w,u,j,R,E,S]),Qh(()=>{if(r||!Du(O))return;const e=ed(ud(O));queueMicrotask(()=>{const t=_(O),n=P.current,r=("number"==typeof n?t[n]:n.current)||O,o=td(O,e);k||o||!p||mp(r,{preventScroll:r===O})})},[r,p,O,k,_,P]),Qh(()=>{if(r||!O)return;let e=!1;const t=ud(O),n=ed(t);let o=y.current.openEvent;function i(t){let{open:n,reason:r,event:i,nested:s}=t;n&&(o=i),"escape-key"===r&&f.domReference.current&&Bp(f.domReference.current),"hover"===r&&"mouseleave"===i.type&&(M.current=!0),"outside-press"===r&&(s?(M.current=!1,e=!0):M.current=!(od(i)||id(i)))}Bp(n),v.on("openchange",i);const s=t.createElement("span");return s.setAttribute("tabindex","-1"),s.setAttribute("aria-hidden","true"),Object.assign(s.style,Ap),I&&x&&x.insertAdjacentElement("afterend",s),()=>{v.off("openchange",i);const n=ed(t),r=td(w,n)||C&&gp(C.nodesRef.current,m).some(e=>{var t;return td(null==(t=e.context)?void 0:t.elements.floating,n)});(r||o&&["click","mousedown"].includes(o.type))&&f.domReference.current&&Bp(f.domReference.current);const a="boolean"==typeof T.current?zp()||s:T.current.current||s;queueMicrotask(()=>{T.current&&!M.current&&Du(a)&&(a===n||n===t.body||r)&&a.focus({preventScroll:e}),s.remove()})}},[r,w,O,T,y,f,v,C,m,I,x]),i.useEffect(()=>{queueMicrotask(()=>{M.current=!1})},[r]),Qh(()=>{if(!r&&R)return R.setFocusManagerState({modal:u,closeOnFocusOut:h,open:p,onOpenChange:g,refs:f}),()=>{R.setFocusManagerState(null)}},[r,R,u,p,g,f,h]),Qh(()=>{if(r)return;if(!O)return;if("function"!=typeof MutationObserver)return;if(k)return;const e=()=>{const e=O.getAttribute("tabindex"),t=V(),n=ed(ud(w)),r=t.indexOf(n);-1!==r&&(L.current=r),j.current.includes("floating")||n!==f.domReference.current&&0===t.length?"0"!==e&&O.setAttribute("tabindex","0"):"-1"!==e&&O.setAttribute("tabindex","-1")};e();const t=new MutationObserver(e);return t.observe(O,{childList:!0,subtree:!0,attributes:!0}),()=>{t.disconnect()}},[r,w,O,f,j,V,k]);const B=!r&&S&&(!u||!E)&&(I||u);return i.createElement(i.Fragment,null,B&&i.createElement(Mp,{"data-type":"inside",ref:null==R?void 0:R.beforeInsideRef,onFocus:e=>{if(u){const e=_();mp("reference"===o[0]?e[0]:e[e.length-1])}else if(null!=R&&R.preserveTabOrder&&R.portalNode)if(M.current=!1,Tp(e,R.portalNode)){const e=jp()||x;null==e||e.focus()}else{var t;null==(t=R.beforeOutsideRef.current)||t.focus()}}}),!E&&F("start"),n,F("end"),B&&i.createElement(Mp,{"data-type":"inside",ref:null==R?void 0:R.afterInsideRef,onFocus:e=>{if(u)mp(_()[0]);else if(null!=R&&R.preserveTabOrder&&R.portalNode)if(h&&(M.current=!0),Tp(e,R.portalNode)){const e=Pp()||x;null==e||e.focus()}else{var t;null==(t=R.afterOutsideRef.current)||t.focus()}}}))}function $p(e){return Du(e.target)&&"BUTTON"===e.target.tagName}function Hp(e){return pd(e)}function Kp(e,t){void 0===t&&(t={});const{open:n,onOpenChange:r,dataRef:o,elements:{domReference:s}}=e,{enabled:a=!0,event:l="click",toggle:c=!0,ignoreMouse:u=!1,keyboardHandlers:d=!0,stickIfOpen:h=!0}=t,p=i.useRef(),f=i.useRef(!1),m=i.useMemo(()=>({onPointerDown(e){p.current=e.pointerType},onMouseDown(e){const t=p.current;0===e.button&&"click"!==l&&(cd(t,!0)&&u||(!n||!c||o.current.openEvent&&h&&"mousedown"!==o.current.openEvent.type?(e.preventDefault(),r(!0,e.nativeEvent,"click")):r(!1,e.nativeEvent,"click")))},onClick(e){const t=p.current;"mousedown"===l&&p.current?p.current=void 0:cd(t,!0)&&u||(!n||!c||o.current.openEvent&&h&&"click"!==o.current.openEvent.type?r(!0,e.nativeEvent,"click"):r(!1,e.nativeEvent,"click"))},onKeyDown(e){p.current=void 0,e.defaultPrevented||!d||$p(e)||(" "!==e.key||Hp(s)||(e.preventDefault(),f.current=!0),"Enter"===e.key&&r(!n||!c,e.nativeEvent,"click"))},onKeyUp(e){e.defaultPrevented||!d||$p(e)||Hp(s)||" "===e.key&&f.current&&(f.current=!1,r(!n||!c,e.nativeEvent,"click"))}}),[o,s,l,u,d,r,n,h,c]);return i.useMemo(()=>a?{reference:m}:{},[a,m])}const qp={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},Yp={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},Gp=e=>{var t,n;return{escapeKey:"boolean"==typeof e?e:null!=(t=null==e?void 0:e.escapeKey)&&t,outsidePress:"boolean"==typeof e?e:null==(n=null==e?void 0:e.outsidePress)||n}};function Xp(e,t){void 0===t&&(t={});const{open:n,onOpenChange:r,elements:o,dataRef:s}=e,{enabled:a=!0,escapeKey:l=!0,outsidePress:c=!0,outsidePressEvent:u="pointerdown",referencePress:d=!1,referencePressEvent:h="pointerdown",ancestorScroll:p=!1,bubbles:f,capture:m}=t,g=cp(),v=Bh("function"==typeof c?c:()=>!1),y="function"==typeof c?v:c,b=i.useRef(!1),x=i.useRef(!1),{escapeKey:w,outsidePress:k}=Gp(f),{escapeKey:E,outsidePress:S}=Gp(m),j=i.useRef(!1),P=Bh(e=>{var t;if(!n||!a||!l||"Escape"!==e.key)return;if(j.current)return;const o=null==(t=s.current.floatingContext)?void 0:t.nodeId,i=g?gp(g.nodesRef.current,o):[];if(!w&&(e.stopPropagation(),i.length>0)){let e=!0;if(i.forEach(t=>{var n;null==(n=t.context)||!n.open||t.context.dataRef.current.__escapeKeyBubbles||(e=!1)}),!e)return}r(!1,function(e){return"nativeEvent"in e}(e)?e.nativeEvent:e,"escape-key")}),T=Bh(e=>{var t;const n=()=>{var t;P(e),null==(t=hd(e))||t.removeEventListener("keydown",n)};null==(t=hd(e))||t.addEventListener("keydown",n)}),C=Bh(e=>{var t;const n=b.current;b.current=!1;const i=x.current;if(x.current=!1,"click"===u&&i)return;if(n)return;if("function"==typeof y&&!y(e))return;const a=hd(e),l="["+up("inert")+"]",c=ud(o.floating).querySelectorAll(l);let d=Mu(a)?a:null;for(;d&&!qu(d);){const e=Xu(d);if(qu(e)||!Mu(e))break;d=e}if(c.length&&Mu(a)&&!a.matches("html,body")&&!td(a,o.floating)&&Array.from(c).every(e=>!td(d,e)))return;if(Du(a)&&N){const t=a.clientWidth>0&&a.scrollWidth>a.clientWidth,n=a.clientHeight>0&&a.scrollHeight>a.clientHeight;let r=n&&e.offsetX>a.clientWidth;if(n&&"rtl"===Yu(a).direction&&(r=e.offsetX<=a.offsetWidth-a.clientWidth),r||t&&e.offsetY>a.clientHeight)return}const h=null==(t=s.current.floatingContext)?void 0:t.nodeId,p=g&&gp(g.nodesRef.current,h).some(t=>{var n;return dd(e,null==(n=t.context)?void 0:n.elements.floating)});if(dd(e,o.floating)||dd(e,o.domReference)||p)return;const f=g?gp(g.nodesRef.current,h):[];if(f.length>0){let e=!0;if(f.forEach(t=>{var n;null==(n=t.context)||!n.open||t.context.dataRef.current.__outsidePressBubbles||(e=!1)}),!e)return}r(!1,e,"outside-press")}),R=Bh(e=>{var t;const n=()=>{var t;C(e),null==(t=hd(e))||t.removeEventListener(u,n)};null==(t=hd(e))||t.addEventListener(u,n)});i.useEffect(()=>{if(!n||!a)return;s.current.__escapeKeyBubbles=w,s.current.__outsidePressBubbles=k;let e=-1;function t(e){r(!1,e,"ancestor-scroll")}function i(){window.clearTimeout(e),j.current=!0}function c(){e=window.setTimeout(()=>{j.current=!1},Hu()?5:0)}const d=ud(o.floating);l&&(d.addEventListener("keydown",E?T:P,E),d.addEventListener("compositionstart",i),d.addEventListener("compositionend",c)),y&&d.addEventListener(u,S?R:C,S);let h=[];return p&&(Mu(o.domReference)&&(h=Ju(o.domReference)),Mu(o.floating)&&(h=h.concat(Ju(o.floating))),!Mu(o.reference)&&o.reference&&o.reference.contextElement&&(h=h.concat(Ju(o.reference.contextElement)))),h=h.filter(e=>{var t;return e!==(null==(t=d.defaultView)?void 0:t.visualViewport)}),h.forEach(e=>{e.addEventListener("scroll",t,{passive:!0})}),()=>{l&&(d.removeEventListener("keydown",E?T:P,E),d.removeEventListener("compositionstart",i),d.removeEventListener("compositionend",c)),y&&d.removeEventListener(u,S?R:C,S),h.forEach(e=>{e.removeEventListener("scroll",t)}),window.clearTimeout(e)}},[s,o,l,y,u,n,r,p,a,w,k,P,E,T,C,S,R]),i.useEffect(()=>{b.current=!1},[y,u]);const A=i.useMemo(()=>({onKeyDown:P,[qp[h]]:e=>{d&&r(!1,e.nativeEvent,"reference-press")}}),[P,r,d,h]),N=i.useMemo(()=>({onKeyDown:P,onMouseDown(){x.current=!0},onMouseUp(){x.current=!0},[Yp[u]]:()=>{b.current=!0}}),[P,u]);return i.useMemo(()=>a?{reference:A,floating:N}:{},[a,A,N])}function Zp(e){void 0===e&&(e={});const{nodeId:t}=e,n=function(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=op(),s=i.useRef({}),[a]=i.useState(()=>function(){const e=new Map;return{emit(t,n){var r;null==(r=e.get(t))||r.forEach(e=>e(n))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){var r;e.set(t,(null==(r=e.get(t))?void 0:r.filter(e=>e!==n))||[])}}}()),l=null!=lp(),[c,u]=i.useState(r.reference),d=Bh((e,t,r)=>{s.current.openEvent=e?t:void 0,a.emit("openchange",{open:e,event:t,reason:r,nested:l}),null==n||n(e,t,r)}),h=i.useMemo(()=>({setPositionReference:u}),[]),p=i.useMemo(()=>({reference:c||r.reference||null,floating:r.floating||null,domReference:r.reference}),[c,r.reference,r.floating]);return i.useMemo(()=>({dataRef:s,open:t,onOpenChange:d,elements:p,events:a,floatingId:o,refs:h}),[t,d,p,a,o,h])}({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,o=r.elements,[s,a]=i.useState(null),[l,c]=i.useState(null),u=(null==o?void 0:o.domReference)||s,d=i.useRef(null),h=cp();Qh(()=>{u&&(d.current=u)},[u]);const p=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:s,floating:a}={},transform:l=!0,whileElementsMounted:c,open:u}=e,[d,h]=i.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,f]=i.useState(r);Ah(p,r)||f(r);const[m,g]=i.useState(null),[v,y]=i.useState(null),b=i.useCallback(e=>{e!==E.current&&(E.current=e,g(e))},[]),x=i.useCallback(e=>{e!==S.current&&(S.current=e,y(e))},[]),w=s||m,k=a||v,E=i.useRef(null),S=i.useRef(null),j=i.useRef(d),P=null!=c,T=Dh(c),C=Dh(o),R=Dh(u),A=i.useCallback(()=>{if(!E.current||!S.current)return;const e={placement:t,strategy:n,middleware:p};C.current&&(e.platform=C.current),Ch(E.current,S.current,e).then(e=>{const t={...e,isPositioned:!1!==R.current};N.current&&!Ah(j.current,t)&&(j.current=t,Ce.flushSync(()=>{h(t)}))})},[p,t,n,C,R]);Rh(()=>{!1===u&&j.current.isPositioned&&(j.current.isPositioned=!1,h(e=>({...e,isPositioned:!1})))},[u]);const N=i.useRef(!1);Rh(()=>(N.current=!0,()=>{N.current=!1}),[]),Rh(()=>{if(w&&(E.current=w),k&&(S.current=k),w&&k){if(T.current)return T.current(w,k,A);A()}},[w,k,A,T,P]);const M=i.useMemo(()=>({reference:E,floating:S,setReference:b,setFloating:x}),[b,x]),D=i.useMemo(()=>({reference:w,floating:k}),[w,k]),L=i.useMemo(()=>{const e={position:n,left:0,top:0};if(!D.floating)return e;const t=Mh(D.floating,d.x),r=Mh(D.floating,d.y);return l?{...e,transform:"translate("+t+"px, "+r+"px)",...Nh(D.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}},[n,l,D.floating,d.x,d.y]);return i.useMemo(()=>({...d,update:A,refs:M,elements:D,floatingStyles:L}),[d,A,M,D,L])}({...e,elements:{...o,...l&&{reference:l}}}),f=i.useCallback(e=>{const t=Mu(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),contextElement:e}:e;c(t),p.refs.setReference(t)},[p.refs]),m=i.useCallback(e=>{(Mu(e)||null===e)&&(d.current=e,a(e)),(Mu(p.refs.reference.current)||null===p.refs.reference.current||null!==e&&!Mu(e))&&p.refs.setReference(e)},[p.refs]),g=i.useMemo(()=>({...p.refs,setReference:m,setPositionReference:f,domReference:d}),[p.refs,m,f]),v=i.useMemo(()=>({...p.elements,domReference:u}),[p.elements,u]),y=i.useMemo(()=>({...p,...r,refs:g,elements:v,nodeId:t}),[p,g,v,t,r]);return Qh(()=>{r.dataRef.current.floatingContext=y;const e=null==h?void 0:h.nodesRef.current.find(e=>e.id===t);e&&(e.context=y)}),i.useMemo(()=>({...p,context:y,refs:g,elements:v}),[p,g,v,y])}const Jp="active",Qp="selected";function ef(e,t,n){const r=new Map,o="item"===n;let i=e;if(o&&e){const{[Jp]:t,[Qp]:__,...n}=e;i=n}return{..."floating"===n&&{tabIndex:-1,[Vp]:""},...i,...t.map(t=>{const r=t?t[n]:null;return"function"==typeof r?e?r(e):null:r}).concat(e).reduce((e,t)=>t?(Object.entries(t).forEach(t=>{let[n,i]=t;var s;o&&[Jp,Qp].includes(n)||(0===n.indexOf("on")?(r.has(n)||r.set(n,[]),"function"==typeof i&&(null==(s=r.get(n))||s.push(i),e[n]=function(){for(var e,t=arguments.length,o=new Array(t),i=0;i<t;i++)o[i]=arguments[i];return null==(e=r.get(n))?void 0:e.map(e=>e(...o)).find(e=>void 0!==e)})):e[n]=i)}),e):e,{})}}function tf(e){void 0===e&&(e=[]);const t=e.map(e=>null==e?void 0:e.reference),n=e.map(e=>null==e?void 0:e.floating),r=e.map(e=>null==e?void 0:e.item),o=i.useCallback(t=>ef(t,e,"reference"),t),s=i.useCallback(t=>ef(t,e,"floating"),n),a=i.useCallback(t=>ef(t,e,"item"),r);return i.useMemo(()=>({getReferenceProps:o,getFloatingProps:s,getItemProps:a}),[o,s,a])}let nf=!1;function rf(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function of(e,t){return rf(t,e===zh||e===Uh,e===Wh||e===$h)}function sf(e,t,n){return rf(t,e===Uh,n?e===Wh:e===$h)||"Enter"===e||" "===e||""===e}function af(e,t,n){return rf(t,n?e===$h:e===Wh,e===zh)}function lf(e,t){const{open:n,onOpenChange:r,elements:o}=e,{listRef:s,activeIndex:a,onNavigate:l=()=>{},enabled:c=!0,selectedIndex:u=null,allowEscape:d=!1,loop:h=!1,nested:p=!1,rtl:f=!1,virtual:m=!1,focusItemOnOpen:g="auto",focusItemOnHover:v=!0,openOnArrowKeyDown:y=!0,disabledIndices:b,orientation:x="vertical",cols:w=1,scrollItemIntoView:k=!0,virtualItemRef:E,itemSizes:S,dense:j=!1}=t,P=dp(_p(o.floating)),T=lp(),C=cp(),R=Bh(l),A=md(o.domReference),N=i.useRef(g),M=i.useRef(null!=u?u:-1),D=i.useRef(null),L=i.useRef(!0),I=i.useRef(R),O=i.useRef(!!o.floating),V=i.useRef(n),_=i.useRef(!1),F=i.useRef(!1),B=dp(b),z=dp(n),U=dp(k),W=dp(u),[$,H]=i.useState(),[K,q]=i.useState(),Y=Bh(function(e,t,n){function r(e){m?(H(e.id),null==C||C.events.emit("virtualfocus",e),E&&(E.current=e)):mp(e,{preventScroll:!0,sync:!(!ld()||!sd())&&(nf||_.current)})}void 0===n&&(n=!1);const o=e.current[t.current];o&&r(o),requestAnimationFrame(()=>{const i=e.current[t.current]||o;if(!i)return;o||r(i);const s=U.current;s&&X&&(n||!L.current)&&(null==i.scrollIntoView||i.scrollIntoView("boolean"==typeof s?{block:"nearest",inline:"nearest"}:s))})});Qh(()=>{document.createElement("div").focus({get preventScroll(){return nf=!0,!1}})},[]),Qh(()=>{c&&(n&&o.floating?N.current&&null!=u&&(F.current=!0,M.current=u,R(u)):O.current&&(M.current=-1,I.current(null)))},[c,n,o.floating,u,R]),Qh(()=>{if(c&&n&&o.floating)if(null==a){if(_.current=!1,null!=W.current)return;if(O.current&&(M.current=-1,Y(s,M)),(!V.current||!O.current)&&N.current&&(null!=D.current||!0===N.current&&null==D.current)){let e=0;const t=()=>{null==s.current[0]?(e<2&&(e?requestAnimationFrame:queueMicrotask)(t),e++):(M.current=null==D.current||sf(D.current,x,f)||p?qh(s,B.current):Yh(s,B.current),D.current=null,R(M.current))};t()}}else Kh(s,a)||(M.current=a,Y(s,M,F.current),F.current=!1)},[c,n,o.floating,a,W,p,s,x,f,R,Y,B]),Qh(()=>{var e;if(!c||o.floating||!C||m||!O.current)return;const t=C.nodesRef.current,n=null==(e=t.find(e=>e.id===T))||null==(e=e.context)?void 0:e.elements.floating,r=ed(ud(o.floating)),i=t.some(e=>e.context&&td(e.context.elements.floating,r));n&&!i&&L.current&&n.focus({preventScroll:!0})},[c,o.floating,C,T,m]),Qh(()=>{if(c&&C&&m&&!T)return C.events.on("virtualfocus",e),()=>{C.events.off("virtualfocus",e)};function e(e){q(e.id),E&&(E.current=e)}},[c,C,m,T,E]),Qh(()=>{I.current=R,O.current=!!o.floating}),Qh(()=>{n||(D.current=null)},[n]),Qh(()=>{V.current=n},[n]);const G=null!=a,X=i.useMemo(()=>{function e(e){if(!n)return;const t=s.current.indexOf(e);-1!==t&&R(t)}return{onFocus(t){let{currentTarget:n}=t;e(n)},onClick:e=>{let{currentTarget:t}=e;return t.focus({preventScroll:!0})},...v&&{onMouseMove(t){let{currentTarget:n}=t;e(n)},onPointerLeave(e){let{pointerType:t}=e;L.current&&"touch"!==t&&(M.current=-1,Y(s,M),R(null),m||mp(P.current,{preventScroll:!0}))}}}},[n,P,Y,v,s,R,m]),Z=Bh(e=>{if(L.current=!1,_.current=!0,229===e.which)return;if(!z.current&&e.currentTarget===P.current)return;if(p&&af(e.key,x,f))return fd(e),r(!1,e.nativeEvent,"list-navigation"),void(Du(o.domReference)&&(m?null==C||C.events.emit("virtualfocus",o.domReference):o.domReference.focus()));const t=M.current,i=qh(s,b),a=Yh(s,b);if(A||("Home"===e.key&&(fd(e),M.current=i,R(M.current)),"End"===e.key&&(fd(e),M.current=a,R(M.current))),w>1){const t=S||Array.from({length:s.current.length},()=>({width:1,height:1})),n=function(e,t,n){const r=[];let o=0;return e.forEach((e,i)=>{let{width:s,height:a}=e,l=!1;for(n&&(o=0);!l;){const e=[];for(let n=0;n<s;n++)for(let r=0;r<a;r++)e.push(o+n+r*t);o%t+s<=t&&e.every(e=>null==r[e])?(e.forEach(e=>{r[e]=i}),l=!0):o++}}),[...r]}(t,w,j),r=n.findIndex(e=>null!=e&&!Jh(s.current,e,b)),o=n.reduce((e,t,n)=>null==t||Jh(s.current,t,b)?e:n,-1),l=n[function(e,t){let{event:n,orientation:r,loop:o,rtl:i,cols:s,disabledIndices:a,minIndex:l,maxIndex:c,prevIndex:u,stopEvent:d=!1}=t,h=u;if(n.key===zh){if(d&&fd(n),-1===u)h=c;else if(h=Gh(e,{startingIndex:h,amount:s,decrement:!0,disabledIndices:a}),o&&(u-s<l||h<0)){const e=u%s,t=c%s,n=c-(t-e);h=t===e?c:t>e?n:n-s}Kh(e,h)&&(h=u)}if(n.key===Uh&&(d&&fd(n),-1===u?h=l:(h=Gh(e,{startingIndex:u,amount:s,disabledIndices:a}),o&&u+s>c&&(h=Gh(e,{startingIndex:u%s-s,amount:s,disabledIndices:a}))),Kh(e,h)&&(h=u)),"both"===r){const t=bd(u/s);n.key===(i?Wh:$h)&&(d&&fd(n),u%s!==s-1?(h=Gh(e,{startingIndex:u,disabledIndices:a}),o&&Hh(h,s,t)&&(h=Gh(e,{startingIndex:u-u%s-1,disabledIndices:a}))):o&&(h=Gh(e,{startingIndex:u-u%s-1,disabledIndices:a})),Hh(h,s,t)&&(h=u)),n.key===(i?$h:Wh)&&(d&&fd(n),u%s!==0?(h=Gh(e,{startingIndex:u,decrement:!0,disabledIndices:a}),o&&Hh(h,s,t)&&(h=Gh(e,{startingIndex:u+(s-u%s),decrement:!0,disabledIndices:a}))):o&&(h=Gh(e,{startingIndex:u+(s-u%s),decrement:!0,disabledIndices:a})),Hh(h,s,t)&&(h=u));const r=bd(c/s)===t;Kh(e,h)&&(h=o&&r?n.key===(i?$h:Wh)?c:Gh(e,{startingIndex:u-u%s-1,disabledIndices:a}):u)}return h}({current:n.map(e=>null!=e?s.current[e]:null)},{event:e,orientation:x,loop:h,rtl:f,cols:w,disabledIndices:Zh([...b||s.current.map((e,t)=>Jh(s.current,t)?t:void 0),void 0],n),minIndex:r,maxIndex:o,prevIndex:Xh(M.current>a?i:M.current,t,n,w,e.key===Uh?"bl":e.key===(f?Wh:$h)?"tr":"tl"),stopEvent:!0})];if(null!=l&&(M.current=l,R(M.current)),"both"===x)return}if(of(e.key,x)){if(fd(e),n&&!m&&ed(e.currentTarget.ownerDocument)===e.currentTarget)return M.current=sf(e.key,x,f)?i:a,void R(M.current);sf(e.key,x,f)?M.current=h?t>=a?d&&t!==s.current.length?-1:i:Gh(s,{startingIndex:t,disabledIndices:b}):Math.min(a,Gh(s,{startingIndex:t,disabledIndices:b})):M.current=h?t<=i?d&&-1!==t?s.current.length:a:Gh(s,{startingIndex:t,decrement:!0,disabledIndices:b}):Math.max(i,Gh(s,{startingIndex:t,decrement:!0,disabledIndices:b})),Kh(s,M.current)?R(null):R(M.current)}}),J=i.useMemo(()=>m&&n&&G&&{"aria-activedescendant":K||$},[m,n,G,K,$]),Q=i.useMemo(()=>({"aria-orientation":"both"===x?void 0:x,...!md(o.domReference)&&J,onKeyDown:Z,onPointerMove(){L.current=!0}}),[J,Z,o.domReference,x]),ee=i.useMemo(()=>{function e(e){"auto"===g&&od(e.nativeEvent)&&(N.current=!0)}return{...J,onKeyDown(e){L.current=!1;const t=e.key.startsWith("Arrow"),o=["Home","End"].includes(e.key),i=t||o,a=function(e,t,n){return rf(t,n?e===Wh:e===$h,e===Uh)}(e.key,x,f),l=af(e.key,x,f),c=of(e.key,x),d=(p?a:c)||"Enter"===e.key||""===e.key.trim();if(m&&n){const t=null==C?void 0:C.nodesRef.current.find(e=>null==e.parentId),n=C&&t?function(e,t){let n,r=-1;return function t(o,i){i>r&&(n=o,r=i),gp(e,o).forEach(e=>{t(e.id,i+1)})}(t,0),e.find(e=>e.id===n)}(C.nodesRef.current,t.id):null;if(i&&n&&E){const t=new KeyboardEvent("keydown",{key:e.key,bubbles:!0});if(a||l){var h,g;const r=(null==(h=n.context)?void 0:h.elements.domReference)===e.currentTarget,o=l&&!r?null==(g=n.context)?void 0:g.elements.domReference:a?s.current.find(e=>(null==e?void 0:e.id)===$):null;o&&(fd(e),o.dispatchEvent(t),q(void 0))}var v;if((c||o)&&n.context&&n.context.open&&n.parentId&&e.currentTarget!==n.context.elements.domReference)return fd(e),void(null==(v=n.context.elements.domReference)||v.dispatchEvent(t))}return Z(e)}(n||y||!t)&&(d&&(D.current=p&&c?null:e.key),p?a&&(fd(e),n?(M.current=qh(s,B.current),R(M.current)):r(!0,e.nativeEvent,"list-navigation")):c&&(null!=u&&(M.current=u),fd(e),!n&&y?r(!0,e.nativeEvent,"list-navigation"):Z(e),n&&R(M.current)))},onFocus(){n&&!m&&R(null)},onPointerDown:function(e){N.current=g,"auto"===g&&id(e.nativeEvent)&&(N.current=!0)},onMouseDown:e,onClick:e}},[$,J,Z,B,g,s,p,R,r,n,y,x,f,u,C,m,E]);return i.useMemo(()=>c?{reference:ee,floating:Q,item:X}:{},[c,ee,Q,X])}const cf=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function uf(e,t){var n;void 0===t&&(t={});const{open:r,floatingId:o}=e,{enabled:s=!0,role:a="dialog"}=t,l=null!=(n=cf.get(a))?n:a,c=op(),u=null!=lp(),d=i.useMemo(()=>"tooltip"===l||"label"===a?{["aria-"+("label"===a?"labelledby":"describedby")]:r?o:void 0}:{"aria-expanded":r?"true":"false","aria-haspopup":"alertdialog"===l?"dialog":l,"aria-controls":r?o:void 0,..."listbox"===l&&{role:"combobox"},..."menu"===l&&{id:c},..."menu"===l&&u&&{role:"menuitem"},..."select"===a&&{"aria-autocomplete":"none"},..."combobox"===a&&{"aria-autocomplete":"list"}},[l,o,u,r,c,a]),h=i.useMemo(()=>{const e={id:o,...l&&{role:l}};return"tooltip"===l||"label"===a?e:{...e,..."menu"===l&&{"aria-labelledby":c}}},[l,o,c,a]),p=i.useCallback(e=>{let{active:t,selected:n}=e;const r={role:"option",...t&&{id:o+"-option"}};switch(a){case"select":return{...r,"aria-selected":t&&n};case"combobox":return{...r,...t&&{"aria-selected":!0}}}return{}},[o,a]);return i.useMemo(()=>s?{reference:d,floating:h,item:p}:{},[s,d,h,p])}const df=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(e,t)=>(t?"-":"")+e.toLowerCase());function hf(e,t){return"function"==typeof e?e(t):e}function pf(e,t){const[n,r]=e;let o=!1;const i=t.length;for(let e=0,s=i-1;e<i;s=e++){const[i,a]=t[e]||[0,0],[l,c]=t[s]||[0,0];a>=r!=c>=r&&n<=(l-i)*(r-a)/(c-a)+i&&(o=!o)}return o}function ff(e){void 0===e&&(e={});const{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=e;let o,i=!1,s=null,a=null,l=performance.now();const c=e=>{let{x:n,y:c,placement:u,elements:d,onClose:h,nodeId:p,tree:f}=e;return function(e){function m(){clearTimeout(o),h()}if(clearTimeout(o),!d.domReference||!d.floating||null==u||null==n||null==c)return;const{clientX:g,clientY:v}=e,y=[g,v],b=hd(e),x="mouseleave"===e.type,w=td(d.floating,b),k=td(d.domReference,b),E=d.domReference.getBoundingClientRect(),S=d.floating.getBoundingClientRect(),j=u.split("-")[0],P=n>S.right-S.width/2,T=c>S.bottom-S.height/2,C=function(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}(y,E),R=S.width>E.width,A=S.height>E.height,N=(R?E:S).left,M=(R?E:S).right,D=(A?E:S).top,L=(A?E:S).bottom;if(w&&(i=!0,!x))return;if(k&&(i=!1),k&&!x)return void(i=!0);if(x&&Mu(e.relatedTarget)&&td(d.floating,e.relatedTarget))return;if(f&&gp(f.nodesRef.current,p).some(e=>{let{context:t}=e;return null==t?void 0:t.open}))return;if("top"===j&&c>=E.bottom-1||"bottom"===j&&c<=E.top+1||"left"===j&&n>=E.right-1||"right"===j&&n<=E.left+1)return m();let I=[];switch(j){case"top":I=[[N,E.top+1],[N,S.bottom-1],[M,S.bottom-1],[M,E.top+1]];break;case"bottom":I=[[N,S.top+1],[N,E.bottom-1],[M,E.bottom-1],[M,S.top+1]];break;case"left":I=[[S.right-1,L],[S.right-1,D],[E.left+1,D],[E.left+1,L]];break;case"right":I=[[E.right-1,L],[E.right-1,D],[S.left+1,D],[S.left+1,L]]}if(!pf([g,v],I)){if(i&&!C)return m();if(!x&&r){const t=function(e,t){const n=performance.now(),r=n-l;if(null===s||null===a||0===r)return s=e,a=t,l=n,null;const o=e-s,i=t-a,c=Math.sqrt(o*o+i*i);return s=e,a=t,l=n,c/r}(e.clientX,e.clientY);if(null!==t&&t<.1)return m()}pf([g,v],function(e){let[n,r]=e;switch(j){case"top":return[[R?n+t/2:P?n+4*t:n-4*t,r+t+1],[R?n-t/2:P?n+4*t:n-4*t,r+t+1],[S.left,P||R?S.bottom-t:S.top],[S.right,P?R?S.bottom-t:S.top:S.bottom-t]];case"bottom":return[[R?n+t/2:P?n+4*t:n-4*t,r-t],[R?n-t/2:P?n+4*t:n-4*t,r-t],[S.left,P||R?S.top+t:S.bottom],[S.right,P?R?S.top+t:S.bottom:S.top+t]];case"left":{const e=[n+t+1,A?r+t/2:T?r+4*t:r-4*t],o=[n+t+1,A?r-t/2:T?r+4*t:r-4*t];return[[T||A?S.right-t:S.left,S.top],[T?A?S.right-t:S.left:S.right-t,S.bottom],e,o]}case"right":return[[n-t,A?r+t/2:T?r+4*t:r-4*t],[n-t,A?r-t/2:T?r+4*t:r-4*t],[T||A?S.left+t:S.right,S.top],[T?A?S.left+t:S.right:S.left+t,S.bottom]]}}([n,c]))?!i&&r&&(o=window.setTimeout(m,40)):m()}}};return c.__options={blockPointerEvents:n},c}const mf={sm:{icon:"[&>svg]:size-4",searchIcon:"[&>svg]:size-4",selectButton:"px-2.5 py-2 rounded text-xs font-medium leading-4 min-h-[2rem]",multiSelect:"pl-2 pr-2 py-1.5",displaySelected:"text-xs font-normal",dropdown:"rounded-md",dropdownItemsWrapper:"p-1.5",searchbarWrapper:"p-3 flex items-center gap-0.5",searchbar:"font-medium text-sm",searchbarIcon:"size-4",label:"text-sm font-medium"},md:{icon:"[&>svg]:size-5",searchIcon:"[&>svg]:size-5",selectButton:"px-3.5 py-2.5 rounded-md text-sm font-medium leading-4 min-h-[2.5rem]",multiSelect:"pl-2 pr-2.5 py-2",displaySelected:"text-sm font-normal",dropdown:"rounded-lg",dropdownItemsWrapper:"p-2",searchbarWrapper:"p-2.5 flex items-center gap-1",searchbar:"font-medium text-sm",searchbarIcon:"size-5",label:"text-sm font-medium"},lg:{icon:"[&>svg]:size-6",searchIcon:"[&>svg]:size-5",selectButton:"px-4 py-3 rounded-lg text-sm font-medium leading-5 min-h-[3rem]",multiSelect:"pl-2.5 pr-3 py-2.5",displaySelected:"text-base font-normal",dropdown:"rounded-lg",dropdownItemsWrapper:"p-2",searchbarWrapper:"p-2.5 flex items-center gap-1",searchbar:"font-medium text-sm",searchbarIcon:"size-5",label:"text-base font-medium"}},gf="group-disabled:text-field-color-disabled",vf={sm:"w-[calc(100%+0.75rem)] translate-x-[-0.375rem]",md:"w-[calc(100%+1rem)] translate-x-[-0.5rem]",lg:"w-[calc(100%+1rem)] translate-x-[-0.5rem]"},yf={sm:"py-1.5 px-2 text-xs font-normal",md:"p-2 text-sm font-normal",lg:"p-2 text-base font-normal"},bf=e=>"string"==typeof e?e:"object"==typeof e&&"textContent"in e?e.textContent?.toString().toLowerCase()||"":"object"==typeof e&&"children"in e?bf(e.children):"",xf=(0,i.forwardRef)(({label:e="",size:t="sm",className:n="",type:r="pill",variant:i="neutral",icon:s=null,disabled:a=!1,onClose:l=()=>{},closable:c=!1,onMouseDown:u=()=>{},disableHover:h=!1},p)=>{const f={neutral:"bg-badge-background-gray text-badge-color-gray border-badge-border-gray",red:"bg-badge-background-red text-badge-color-red border-badge-border-red",yellow:"bg-badge-background-yellow text-badge-color-yellow border-badge-border-yellow",green:"bg-badge-background-green text-badge-color-green border-badge-border-green",blue:"bg-badge-background-sky text-badge-color-sky border-badge-border-sky",inverse:"bg-background-inverse text-text-inverse border-background-inverse",disabled:"bg-badge-background-disabled text-badge-color-disabled border-badge-border-disabled disabled cursor-not-allowed"};let m="",g="group relative justify-center flex items-center cursor-pointer";const v={xxs:"[&>svg]:size-3",xs:"[&>svg]:size-3",sm:"[&>svg]:size-3",md:"[&>svg]:size-4",lg:"[&>svg]:size-5"};return a?(m=f.disabled,g+=" cursor-not-allowed disabled"):m=f[i],e?(0,o.jsxs)("span",{className:ue("font-medium border-badge-border-gray flex items-center justify-center border border-solid box-border max-w-full transition-colors duration-150 ease-in-out",{xxs:"py-0.5 px-0.5 text-xs h-4",xs:"py-0.5 px-1 text-xs h-5",sm:"py-1 px-1.5 text-xs h-6",md:"py-1 px-1.5 text-sm h-7",lg:"py-1 px-1.5 text-base h-8"}[t],{pill:"rounded-full",rounded:"rounded"}[r],"gap-0.5",m,!h&&{neutral:"hover:bg-badge-hover-gray",red:"hover:bg-badge-hover-red",yellow:"hover:bg-badge-hover-yellow",green:"hover:bg-badge-hover-green",blue:"hover:bg-badge-hover-sky",inverse:"hover:bg-badge-hover-inverse",disabled:"hover:bg-badge-hover-disabled"}[i],n),ref:p,children:[s?(0,o.jsx)("span",{className:ue("justify-center flex items-center",v[t]),children:s}):null,(0,o.jsx)("span",{className:"px-1 truncate inline-block",children:e}),c&&(0,o.jsxs)("span",{className:ue(g,v[t]),onMouseDown:u,role:"button",tabIndex:0,...!a&&{onClick:l},children:[(0,o.jsx)("span",{className:"sr-only",children:`Remove ${e}`}),(0,o.jsx)(d,{}),(0,o.jsx)("span",{className:"absolute -inset-1"})]})]}):null});xf.displayName="Badge";const wf=u("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]),kf=({variant:e="primary",size:t="md",icon:n=null,className:r=""})=>{const i={primary:"text-brand-primary-600",secondary:"text-background-primary"}[e],s={sm:"[&>svg]:size-4",md:"[&>svg]:size-5",lg:"[&>svg]:size-6",xl:"[&>svg]:size-8"}[t];return(0,o.jsx)("span",{className:ue("flex",s,i,r),children:n||(0,o.jsx)(wf,{className:"animate-spin shrink-0"})})},Ef=(0,i.createContext)({}),Sf=()=>(0,i.useContext)(Ef),jf=(0,i.forwardRef)(({children:e,icon:t=null,placeholder:n="Select an option",optionIcon:r=null,render:s,label:a,className:l,...c},u)=>{const{sizeValue:d,getReferenceProps:h,getValues:p,selectId:f,refs:m,isOpen:g,multiple:v,combobox:y,setSelected:b,onChange:x,isControlled:w,disabled:k,by:E}=Sf(),S={sm:"xs",md:"sm",lg:"md"}[d],j=(0,i.useCallback)(()=>{if(t)return t;const e="text-field-placeholder group-disabled:text-icon-disabled";return y?(0,o.jsx)(Su,{className:e}):(0,o.jsx)(ju,{className:e})},[t]),P=(0,i.useCallback)(()=>{const t=p();if(!t)return null;if(v)return t.map((e,t)=>(0,o.jsx)(xf,{className:"cursor-default",icon:r,type:"rounded",size:S,onMouseDown:T(e),label:"function"==typeof s?s(e):e.toString(),closable:!0,disabled:k},t));let n="string"==typeof t?t:"";if("function"==typeof s&&(n=s(t)),"function"==typeof e&&"function"!=typeof s){const r={value:t,...v?{onClose:T(t)}:{}};n=e(r)}return((0,i.isValidElement)(e)||"string"==typeof e)&&"function"!=typeof s&&(n=e),(0,o.jsx)("span",{className:ue("truncate",mf[d].displaySelected,gf),children:n})},[p,k]),T=e=>t=>{t?.preventDefault(),t?.stopPropagation();const n=[...p()??[]],r=n.findIndex(t=>null!==t&&null!==e&&"object"==typeof t?t[E]===e[E]:t===e);-1!==r&&(n.splice(r,1),w||b(n),"function"==typeof x&&x(n))};return(0,o.jsxs)("div",{className:"w-full flex flex-col items-start gap-1.5 [&_*]:box-border box-border",children:[!!a&&(0,o.jsx)("label",{className:ue(mf[d]?.label,"text-field-label"),htmlFor:f,children:a}),(0,o.jsxs)("button",{id:f,ref:Ee(m.setReference,u),className:ue("flex items-center justify-between w-full box-border transition-[outline,background-color,color,box-shadow] duration-200 bg-white","outline outline-1 outline-field-border border-none cursor-pointer",!g&&"focus:ring-2 focus:ring-offset-2 focus:outline-focus-border focus:ring-focus [&:hover:not(:focus):not(:disabled)]:outline-border-strong",mf[d].selectButton,v&&mf[d].multiSelect,"group disabled:outline-field-border-disabled [&:hover:has(:disabled)]:outline-field-border-disabled disabled:cursor-default",l),tabIndex:0,disabled:k,...c,...h(),children:[(0,o.jsxs)("div",{className:ue("flex-1 grid items-center justify-start gap-1.5 overflow-hidden",p()&&"flex flex-wrap"),children:[P(),(v?!p()?.length:!p())&&(0,o.jsx)("div",{className:ue("[grid-area:1/1/2/3] text-field-input px-1",mf[d].displaySelected,gf),children:n})]}),(0,o.jsx)("div",{className:ue("flex items-center [&>svg]:shrink-0",mf[d].icon),children:j()})]})]})});function Pf({label:e,children:t,className:n,...r}){const{index:s,totalGroups:a}=r,{sizeValue:l}=Sf();return(0,o.jsxs)(i.Fragment,{children:[(0,o.jsxs)("div",{className:"flex flex-col",role:"group","aria-label":e,children:[(0,o.jsx)("div",{className:ue("p-2 font-normal text-text-tertiary",{sm:"text-xs",md:"text-xs",lg:"text-sm"}[l],n),id:`group-${e?.toLowerCase().replace(/\s+/g,"-")}`,children:e}),(0,o.jsx)("div",{className:"flex flex-col",role:"presentation","aria-labelledby":`group-${e?.toLowerCase().replace(/\s+/g,"-")}`,children:t})]}),s<a&&!!(t&&i.Children.count(t)>0)&&(0,o.jsx)("hr",{className:ue("h-px my-2 w-full border-border-subtle border-b border-t-0 border-solid",vf[l])})]})}function Tf({children:e,className:t}){const{isOpen:n,context:r,refs:s,combobox:a,floatingStyles:l,getFloatingProps:c,sizeValue:u,setSearchKeyword:d,setActiveIndex:h,setSelectedIndex:p,value:f,selected:m,getValues:g,searchKeyword:v,listContentRef:y,by:b,searchPlaceholder:x,activeIndex:w,searchFn:k,debounceDelay:E}=Sf(),S=(0,i.useMemo)(()=>{const t=g();let n=-1;if(t){let r=i.Children.toArray(e);r.length>0&&(0,i.isValidElement)(r[0])&&r[0].type===Pf&&(r=i.Children.toArray(e).map(e=>(0,i.isValidElement)(e)?i.Children.toArray(e.props.children):[]).flat()),n=r.findIndex(e=>{if(!(0,i.isValidElement)(e))return!1;const n=e.props.value;return"object"==typeof n&&"object"==typeof t?n[b]===t[b]:n===t})}return n},[f,m,e,b]);(0,i.useLayoutEffect)(()=>{n||(h(S),p(S))},[S,n]),(0,i.useLayoutEffect)(()=>{n&&(a&&[-1,null].includes(w)||h(-1))},[v,n]);const j=(0,i.useMemo)(()=>{let t=0,n=0;i.Children.forEach(e,e=>{if((0,i.isValidElement)(e)&&e.type===Pf){let n=!1;if(v&&!k){const t=v.toLowerCase(),r=(e.props.label?.toLowerCase()||"").includes(t),o=i.Children.toArray(e.props.children).some(e=>!!(0,i.isValidElement)(e)&&(bf(e.props.children)?.toLowerCase()).includes(t));n=r||o}else n=!0;n&&t++}}),n=Math.max(0,t-1);let r=0,o=0;return i.Children.map(e,e=>{if(!(0,i.isValidElement)(e))return null;if(e.type===Pf){let t=!1;if(v&&!k){const n=v.toLowerCase();t=(e.props.label?.toLowerCase()||"").includes(n)}const s=i.Children.map(e.props.children,e=>{if(!(0,i.isValidElement)(e))return null;if(t){const t={...e.props,index:r++};return(0,i.cloneElement)(e,t)}if(v&&!k){const t=bf(e.props.children)?.toLowerCase(),n=v.toLowerCase();if(!t?.includes(n))return null}const n={...e.props,index:r++};return(0,i.cloneElement)(e,n)});if(!s?.some(e=>null!==e))return null;const a={...e.props,children:s,index:o,totalGroups:n};return o++,(0,i.cloneElement)(e,a)}if(v&&!k){const t=bf(e.props?.children)?.toLowerCase(),n=v.toLowerCase();if(!t?.includes(n))return null}return(0,i.cloneElement)(e,{...e.props,index:r++})})},[v,f,m,e,k]),P=i.Children.count(j);(0,i.useEffect)(()=>{y.current=[];let t=i.Children.toArray(e);t&&(0,i.isValidElement)(t[0])&&t[0].type===Pf&&(t=i.Children.toArray(t).map(e=>(0,i.isValidElement)(e)?e.props.children:null).filter(Boolean)),i.Children.forEach(t,e=>{if(!(0,i.isValidElement)(e))return;const t=bf(e.props?.children)?.toLowerCase();if(v&&!k){const e=v.toLowerCase();if(!t?.includes(e))return}y.current.push(t)})},[v,k]);const[T,C]=(0,i.useState)(!1),R=(0,i.useCallback)(async()=>{if(k&&"function"==typeof k&&!T){C(!0);try{await k(v)}catch(e){console.error(e)}finally{C(!1)}}},[v]),A=((e,t=500)=>{const n=(0,i.useRef)(null);return(0,i.useCallback)((...r)=>{n.current&&clearTimeout(n.current),n.current=setTimeout(()=>e(...r),t)},[e,t])})(R,E);return(0,i.useEffect)(()=>{"function"==typeof k&&A()},[A]),(0,o.jsx)(o.Fragment,{children:n&&(0,o.jsx)(o.Fragment,{children:(0,o.jsx)(Wp,{context:r,modal:!1,visuallyHiddenDismiss:!0,children:(0,o.jsxs)("div",{ref:s.setFloating,className:ue("box-border [&_*]:box-border w-full bg-white outline-none shadow-lg outline outline-1 outline-border-subtle",a&&"grid grid-cols-1 grid-rows-[auto_1fr] divide-y divide-x-0 divide-solid divide-border-subtle",mf[u].dropdown,!a&&"h-auto",a?"overflow-hidden":"overflow-y-auto overflow-x-hidden",t),style:{...l,zIndex:1},...c(),children:[a&&(0,o.jsxs)("div",{className:ue(mf[u].searchbarWrapper),children:[T?(0,o.jsx)(kf,{className:mf[u].searchbarIcon}):(0,o.jsx)(Pu,{className:ue("text-icon-secondary shrink-0",mf[u].searchbarIcon)}),(0,o.jsx)("input",{className:ue("px-1 w-full placeholder:text-field-placeholder border-0 focus:outline-none focus:shadow-none",mf[u].searchbar),type:"search",name:"keyword",placeholder:x,onChange:e=>d(e.target.value),value:v,autoComplete:"off"})]}),(0,o.jsxs)("div",{className:ue("overflow-y-auto overflow-x-hidden",!a&&"w-full h-full",mf[u].dropdownItemsWrapper),children:[!!P&&j,!P&&(0,o.jsx)("div",{className:ue("p-2 text-center font-medium text-field-placeholder",yf[u]),children:"No items found"})]})]})})})})}function Cf({children:e,root:t,id:n}){return(0,o.jsx)(Ip,{id:n,root:t,children:e})}function Rf({value:e,selected:t,children:n,className:r,...s}){const{sizeValue:a,getItemProps:l,onKeyDownItem:c,onClickItem:u,activeIndex:d,selectedIndex:h,updateListRef:p,getValues:f,by:m,multiple:g}=Sf(),{index:v}=s,y=(0,i.useRef)(v),b=(0,i.useMemo)(()=>{if(!g)return!1;const t=f();return!!t&&t.some(t=>null!==t&&null!==e&&"object"==typeof t?t[m]===e[m]:t===e)},[e,f]),x=(0,i.useMemo)(()=>"boolean"==typeof t?t:g?b:v===h,[b,h,t]);return(0,o.jsxs)("div",{className:ue("w-full flex items-center justify-between text-text-primary hover:bg-button-tertiary-hover rounded-md transition-all duration-150 cursor-pointer focus:outline-none focus-within:outline-none outline-none",yf[a],v===d&&"bg-button-tertiary-hover",r),ref:e=>{p(v,e)},role:"option",tabIndex:v===d?0:-1,"aria-selected":x&&v===d,...l({onClick(){u(y.current,e)},onKeyDown(t){c(t,y.current,e)}}),children:[(0,o.jsx)("span",{className:"w-full truncate",children:n}),x&&(0,o.jsx)(pe,{className:ue("text-icon-on-color-disabled",{sm:"size-4",md:"size-4",lg:"size-5"}[a])})]})}const Af=({id:e,size:t="md",value:n,defaultValue:r,onChange:s,by:a="id",children:l,multiple:c=!1,combobox:u=!1,disabled:d=!1,searchPlaceholder:h="Search...",searchFn:p,debounceDelay:f=500})=>{const m=(0,i.useMemo)(()=>e||`select-${xu()}`,[e]),g=(0,i.useMemo)(()=>typeof n<"u",[n]),[v,y]=(0,i.useState)(r),[b,x]=(0,i.useState)(""),w=(0,i.useCallback)(()=>g?n:v,[g,n,v]),[k,E]=(0,i.useState)(!1),[S,j]=(0,i.useState)(null),[P,T]=(0,i.useState)(null),C={sm:u?256:172,md:u?256:216,lg:u?256:216},{refs:R,floatingStyles:A,context:N}=Zp({strategy:"fixed",placement:"bottom-start",open:k,onOpenChange:E,whileElementsMounted:kh,middleware:[Ih(5),Oh({padding:10}),(H={apply({rects:e,elements:n,availableHeight:r}){Object.assign(n.floating.style,{maxHeight:`min(${r}px, ${C[t]}px)`,maxWidth:`${e.reference.width}px`})},padding:10},{...Ph(H),options:[H,undefined]})]}),M=(0,i.useRef)([]),D=(0,i.useRef)([]),L=(0,i.useRef)(!1),I=Kp(N,{event:"mousedown"}),O=Xp(N),V=uf(N,{role:"listbox"}),_=lf(N,{listRef:M,activeIndex:S,selectedIndex:P,onNavigate:j,loop:!0}),F=function(e,t){var n;const{open:r,dataRef:o}=e,{listRef:s,activeIndex:a,onMatch:l,onTypingChange:c,enabled:u=!0,findMatch:d=null,resetMs:h=750,ignoreKeys:p=[],selectedIndex:f=null}=t,m=i.useRef(),g=i.useRef(""),v=i.useRef(null!=(n=null!=f?f:a)?n:-1),y=i.useRef(null),b=Bh(l),x=Bh(c),w=dp(d),k=dp(p);Qh(()=>{r&&(clearTimeout(m.current),y.current=null,g.current="")},[r]),Qh(()=>{var e;r&&""===g.current&&(v.current=null!=(e=null!=f?f:a)?e:-1)},[r,f,a]);const E=Bh(e=>{e?o.current.typing||(o.current.typing=e,x(e)):o.current.typing&&(o.current.typing=e,x(e))}),S=Bh(e=>{function t(e,t,n){const r=w.current?w.current(t,n):t.find(e=>0===(null==e?void 0:e.toLocaleLowerCase().indexOf(n.toLocaleLowerCase())));return r?e.indexOf(r):-1}const n=s.current;if(g.current.length>0&&" "!==g.current[0]&&(-1===t(n,n,g.current)?E(!1):" "===e.key&&fd(e)),null==n||k.current.includes(e.key)||1!==e.key.length||e.ctrlKey||e.metaKey||e.altKey)return;r&&" "!==e.key&&(fd(e),E(!0)),n.every(e=>{var t,n;return!e||(null==(t=e[0])?void 0:t.toLocaleLowerCase())!==(null==(n=e[1])?void 0:n.toLocaleLowerCase())})&&g.current===e.key&&(g.current="",v.current=y.current),g.current+=e.key,clearTimeout(m.current),m.current=setTimeout(()=>{g.current="",v.current=y.current,E(!1)},h);const o=v.current,i=t(n,[...n.slice((o||0)+1),...n.slice(0,(o||0)+1)],g.current);-1!==i?(b(i),y.current=i):" "!==e.key&&(g.current="",E(!1))}),j=i.useMemo(()=>({onKeyDown:S}),[S]),P=i.useMemo(()=>({onKeyDown:S,onKeyUp(e){" "===e.key&&E(!1)}}),[S,E]);return i.useMemo(()=>u?{reference:j,floating:P}:{},[u,j,P])}(N,{listRef:D,activeIndex:S,selectedIndex:P,onMatch:k?j:T,onTypingChange(e){L.current=e}}),{getReferenceProps:B,getFloatingProps:z,getItemProps:U}=tf([O,V,_,I,...u?[]:[F]]),W=(e,t)=>{if(c)return((e,t)=>{const n=[...w()??[]];-1===n.findIndex(e=>null!==e&&null!==t&&"object"==typeof e?e[a]===t[a]:e===t)&&(n.push(t),g||y(n),T(e),R.reference.current.focus(),E(!1),x(""),"function"==typeof s&&s(n))})(e,t);T(e),g||y(t),R.reference.current.focus(),E(!1),x(""),"function"==typeof s&&s(t)},$=(0,i.useCallback)((e,t)=>{M.current[e]=t},[]);var H;return(0,o.jsx)(Ef.Provider,{value:{selectedIndex:P,setSelectedIndex:T,activeIndex:S,setActiveIndex:j,selected:v,setSelected:y,handleSelect:W,combobox:u,sizeValue:t,multiple:c,onChange:s,isTypingRef:L,getItemProps:U,onClickItem:(e,t)=>{W(e,t)},onKeyDownItem:(e,t,n)=>{"Enter"===e.key&&(e.preventDefault(),W(t,n))," "===e.key&&!L.current&&(e.preventDefault(),W(t,n))},getValues:w,selectId:m,getReferenceProps:B,isOpen:k,value:n,updateListRef:$,refs:R,listContentRef:D,by:a,getFloatingProps:z,floatingStyles:A,context:N,searchKeyword:b,setSearchKeyword:x,disabled:d,isControlled:g,searchPlaceholder:h,searchFn:p,debounceDelay:f},children:l})};Af.displayName="Select";const Nf=Object.assign(Af,{Portal:Cf,Button:jf,Options:Tf,Option:Rf,OptionGroup:Pf});Cf.displayName="Select.Portal",jf.displayName="Select.Button",Tf.displayName="Select.Options",Rf.displayName="Select.Option",Pf.displayName="Select.OptionGroup";const Mf=(0,i.forwardRef)(({id:e,defaultValue:t="",value:n,size:r="sm",className:s="",disabled:a=!1,onChange:l=()=>{},error:c=!1,onError:u=()=>{},...d},h)=>{const p=(0,i.useMemo)(()=>e||`input-textarea-${xu()}`,[e]),f=(0,i.useMemo)(()=>typeof n<"u",[n]),[m,g]=(0,i.useState)(t),v=(0,i.useCallback)(()=>f?n:m,[f,n,m]),y=a?"hover:border-border-disabled":"hover:border-border-strong",b=c?"focus:border-focus-error-border focus:ring-field-color-error border-focus-error-border":"";return(0,o.jsx)("textarea",{ref:h,id:p,className:ue("py-2 rounded border border-solid border-border-subtle bg-field-secondary-background font-normal placeholder-text-tertiary text-text-primary focus:outline-none transition ease-in-out duration-200",a?"border-border-disabled bg-field-background-disabled cursor-not-allowed text-text-disabled":"",{sm:"px-3 rounded text-xs",md:"px-3 rounded-md text-sm",lg:"px-4 rounded-lg text-base"}[r],"focus:border-focus-border focus:ring-2 focus:ring-toggle-on focus:ring-offset-2",y,b,s),disabled:a,onChange:e=>{if(a)return;const t=e.target.value;f||g(t),"function"==typeof l&&l(t)},onInvalid:u,value:v(),...d})});Mf.displayName="TextArea";const Df=Vc("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]),{product:Lf,screens:If}=window.oneOnboardingData||{},Of=If?.["user-info"]||{},Vf=Of?.sourceOptions||{wordpress:(0,jc.__)("WordPress Plugins Directory","astra-sites"),google:(0,jc.__)("Google Search","astra-sites"),social:(0,jc.__)("Social Media","astra-sites"),youtube:(0,jc.__)("YouTube","astra-sites"),friend:(0,jc.__)("A friend or colleague","astra-sites"),other:(0,jc.__)("Other","astra-sites")},_f=Of?.benefitOptions||{"option-1":"Option 1","option-2":"Option 2",other:"Other (please specify)"},Ff=Of?.freshUserOptions||{yes:(0,jc.__)("I'm just getting started","astra-sites"),no:(0,jc.__)("I build websites regularly","astra-sites")},Bf=[{name:"firstName",label:(0,jc.__)("First Name","astra-sites")},{name:"lastName",label:(0,jc.__)("Last Name","astra-sites")},{name:"email",label:(0,jc.__)("Email","astra-sites"),type:"email",colSpan:"col-span-2"}],zf=({variant:e="dark",placement:t="bottom",title:n="",content:r,arrow:s=!1,open:a,setOpen:l,children:c,className:u,tooltipPortalRoot:d,tooltipPortalId:h,boundary:p="clippingAncestors",strategy:f="fixed",offset:m=8,triggers:g=["hover","focus"],interactive:v=!1})=>{const y=(0,i.useMemo)(()=>"boolean"==typeof a&&"function"==typeof l,[a,l]),[b,x]=(0,i.useState)(!1),w=(0,i.useRef)(null),{refs:k,floatingStyles:E,context:S}=Zp({open:y?a:b,onOpenChange:y?l:x,placement:t,strategy:f,middleware:[Ih(m),Oh({boundary:p}),(O={boundary:p},{...Sh(O),options:[O,undefined]}),Vh({element:w})],whileElementsMounted:kh}),j=Kp(S,{enabled:!y&&g.includes("click")}),P=function(e,t){void 0===t&&(t={});const{open:n,onOpenChange:r,dataRef:o,events:s,elements:a}=e,{enabled:l=!0,delay:c=0,handleClose:u=null,mouseOnly:d=!1,restMs:h=0,move:p=!0}=t,f=cp(),m=lp(),g=dp(u),v=dp(c),y=dp(n),b=i.useRef(),x=i.useRef(-1),w=i.useRef(),k=i.useRef(-1),E=i.useRef(!0),S=i.useRef(!1),j=i.useRef(()=>{}),P=i.useRef(!1),T=i.useCallback(()=>{var e;const t=null==(e=o.current.openEvent)?void 0:e.type;return(null==t?void 0:t.includes("mouse"))&&"mousedown"!==t},[o]);i.useEffect(()=>{if(l)return s.on("openchange",e),()=>{s.off("openchange",e)};function e(e){let{open:t}=e;t||(clearTimeout(x.current),clearTimeout(k.current),E.current=!0,P.current=!1)}},[l,s]),i.useEffect(()=>{if(!l)return;if(!g.current)return;if(!n)return;function e(e){T()&&r(!1,e,"hover")}const t=ud(a.floating).documentElement;return t.addEventListener("mouseleave",e),()=>{t.removeEventListener("mouseleave",e)}},[a.floating,n,r,l,g,T]);const C=i.useCallback(function(e,t,n){void 0===t&&(t=!0),void 0===n&&(n="hover");const o=pp(v.current,"close",b.current);o&&!w.current?(clearTimeout(x.current),x.current=window.setTimeout(()=>r(!1,e,n),o)):t&&(clearTimeout(x.current),r(!1,e,n))},[v,r]),R=Bh(()=>{j.current(),w.current=void 0}),A=Bh(()=>{if(S.current){const e=ud(a.floating).body;e.style.pointerEvents="",e.removeAttribute(hp),S.current=!1}}),N=Bh(()=>!!o.current.openEvent&&["click","mousedown"].includes(o.current.openEvent.type));i.useEffect(()=>{if(l&&Mu(a.domReference)){var e;const r=a.domReference;return n&&r.addEventListener("mouseleave",s),null==(e=a.floating)||e.addEventListener("mouseleave",s),p&&r.addEventListener("mousemove",t,{once:!0}),r.addEventListener("mouseenter",t),r.addEventListener("mouseleave",i),()=>{var e;n&&r.removeEventListener("mouseleave",s),null==(e=a.floating)||e.removeEventListener("mouseleave",s),p&&r.removeEventListener("mousemove",t),r.removeEventListener("mouseenter",t),r.removeEventListener("mouseleave",i)}}function t(e){if(clearTimeout(x.current),E.current=!1,d&&!cd(b.current)||h>0&&!pp(v.current,"open"))return;const t=pp(v.current,"open",b.current);t?x.current=window.setTimeout(()=>{y.current||r(!0,e,"hover")},t):n||r(!0,e,"hover")}function i(e){if(N())return;j.current();const t=ud(a.floating);if(clearTimeout(k.current),P.current=!1,g.current&&o.current.floatingContext){n||clearTimeout(x.current),w.current=g.current({...o.current.floatingContext,tree:f,x:e.clientX,y:e.clientY,onClose(){A(),R(),N()||C(e,!0,"safe-polygon")}});const r=w.current;return t.addEventListener("mousemove",r),void(j.current=()=>{t.removeEventListener("mousemove",r)})}("touch"!==b.current||!td(a.floating,e.relatedTarget))&&C(e)}function s(e){N()||o.current.floatingContext&&(null==g.current||g.current({...o.current.floatingContext,tree:f,x:e.clientX,y:e.clientY,onClose(){A(),R(),N()||C(e)}})(e))}},[a,l,e,d,h,p,C,R,A,r,n,y,f,v,g,o,N]),Qh(()=>{var e;if(l&&n&&null!=(e=g.current)&&e.__options.blockPointerEvents&&T()){S.current=!0;const e=a.floating;if(Mu(a.domReference)&&e){var t;const n=ud(a.floating).body;n.setAttribute(hp,"");const r=a.domReference,o=null==f||null==(t=f.nodesRef.current.find(e=>e.id===m))||null==(t=t.context)?void 0:t.elements.floating;return o&&(o.style.pointerEvents=""),n.style.pointerEvents="none",r.style.pointerEvents="auto",e.style.pointerEvents="auto",()=>{n.style.pointerEvents="",r.style.pointerEvents="",e.style.pointerEvents=""}}}},[l,n,m,a,f,g,T]),Qh(()=>{n||(b.current=void 0,P.current=!1,R(),A())},[n,R,A]),i.useEffect(()=>()=>{R(),clearTimeout(x.current),clearTimeout(k.current),A()},[l,a.domReference,R,A]);const M=i.useMemo(()=>{function e(e){b.current=e.pointerType}return{onPointerDown:e,onPointerEnter:e,onMouseMove(e){const{nativeEvent:t}=e;function o(){E.current||y.current||r(!0,t,"hover")}d&&!cd(b.current)||n||0===h||P.current&&e.movementX**2+e.movementY**2<2||(clearTimeout(k.current),"touch"===b.current?o():(P.current=!0,k.current=window.setTimeout(o,h)))}}},[d,r,n,y,h]),D=i.useMemo(()=>({onMouseEnter(){clearTimeout(x.current)},onMouseLeave(e){N()||C(e.nativeEvent,!1)}}),[C,N]);return i.useMemo(()=>l?{reference:M,floating:D}:{},[l,M,D])}(S,{move:!1,enabled:!y&&g.includes("hover"),...v&&{handleClose:ff()}}),T=function(e,t){void 0===t&&(t={});const{open:n,onOpenChange:r,events:o,dataRef:s,elements:a}=e,{enabled:l=!0,visibleOnly:c=!0}=t,u=i.useRef(!1),d=i.useRef(),h=i.useRef(!0);i.useEffect(()=>{if(!l)return;const e=Ru(a.domReference);function t(){!n&&Du(a.domReference)&&a.domReference===ed(ud(a.domReference))&&(u.current=!0)}function r(){h.current=!0}return e.addEventListener("blur",t),e.addEventListener("keydown",r,!0),()=>{e.removeEventListener("blur",t),e.removeEventListener("keydown",r,!0)}},[a.domReference,n,l]),i.useEffect(()=>{if(l)return o.on("openchange",e),()=>{o.off("openchange",e)};function e(e){let{reason:t}=e;"reference-press"!==t&&"escape-key"!==t||(u.current=!0)}},[o,l]),i.useEffect(()=>()=>{clearTimeout(d.current)},[]);const p=i.useMemo(()=>({onPointerDown(e){id(e.nativeEvent)||(h.current=!1)},onMouseLeave(){u.current=!1},onFocus(e){if(u.current)return;const t=hd(e.nativeEvent);if(c&&Mu(t))try{if(sd()&&ld())throw Error();if(!t.matches(":focus-visible"))return}catch(e){if(!h.current&&!pd(t))return}r(!0,e.nativeEvent,"focus")},onBlur(e){u.current=!1;const t=e.relatedTarget,n=e.nativeEvent,o=Mu(t)&&t.hasAttribute(up("focus-guard"))&&"outside"===t.getAttribute("data-type");d.current=window.setTimeout(()=>{var e;const i=ed(a.domReference?a.domReference.ownerDocument:document);(t||i!==a.domReference)&&(td(null==(e=s.current.floatingContext)?void 0:e.refs.floating.current,i)||td(a.domReference,i)||o||r(!1,n,"focus"))})}}),[s,a.domReference,r,c]);return i.useMemo(()=>l?{reference:p}:{},[l,p])}(S,{enabled:!y&&g.includes("focus")}),C=Xp(S),R=uf(S,{role:"tooltip"}),{getReferenceProps:A,getFloatingProps:N}=tf([j,P,T,C,R]),{isMounted:M,styles:D}=function(e,t){void 0===t&&(t={});const{initial:n={opacity:0},open:r,close:o,common:s,duration:a=250}=t,l=e.placement,c=l.split("-")[0],u=i.useMemo(()=>({side:c,placement:l}),[c,l]),d="number"==typeof a,h=(d?a:a.open)||0,p=(d?a:a.close)||0,[f,m]=i.useState(()=>({...hf(s,u),...hf(n,u)})),{isMounted:g,status:v}=function(e,t){void 0===t&&(t={});const{open:n,elements:{floating:r}}=e,{duration:o=250}=t,s=("number"==typeof o?o:o.close)||0,[a,l]=i.useState("unmounted"),c=function(e,t){const[n,r]=i.useState(e);return e&&!n&&r(!0),i.useEffect(()=>{if(!e&&n){const e=setTimeout(()=>r(!1),t);return()=>clearTimeout(e)}},[e,n,t]),n}(n,s);return c||"close"!==a||l("unmounted"),Qh(()=>{if(r){if(n){l("initial");const e=requestAnimationFrame(()=>{l("open")});return()=>{cancelAnimationFrame(e)}}l("close")}},[n,r]),{isMounted:c,status:a}}(e,{duration:a}),y=dp(n),b=dp(r),x=dp(o),w=dp(s);return Qh(()=>{const e=hf(y.current,u),t=hf(x.current,u),n=hf(w.current,u),r=hf(b.current,u)||Object.keys(e).reduce((e,t)=>(e[t]="",e),{});if("initial"===v&&m(t=>({transitionProperty:t.transitionProperty,...n,...e})),"open"===v&&m({transitionProperty:Object.keys(r).map(df).join(","),transitionDuration:h+"ms",...n,...r}),"close"===v){const r=t||e;m({transitionProperty:Object.keys(r).map(df).join(","),transitionDuration:p+"ms",...n,...r})}},[p,x,y,b,w,h,v,u]),{isMounted:g,styles:f}}(S,{duration:150,initial:{opacity:0},open:{opacity:1},close:{opacity:0}}),L={light:"bg-tooltip-background-light text-text-primary",dark:"bg-tooltip-background-dark text-text-on-color"}[e],I="dark"===e?"text-tooltip-background-dark":"text-tooltip-background-light";var O;return(0,o.jsxs)(i.Fragment,{children:[(0,i.isValidElement)(c)&&(0,o.jsx)(i.Fragment,{children:(0,i.cloneElement)(c,{ref:Ee(c.ref,k.setReference),className:ue(c.props.className),...A()})},"tooltip-reference"),(0,o.jsx)(Ip,{id:h,root:d,children:M&&(0,o.jsxs)("div",{className:ue("absolute z-20 py-2 px-3 rounded-md text-xs leading-4 shadow-soft-shadow-lg",L,"max-w-80 w-fit",u),ref:k.setFloating,style:{...E,...D},...N(),children:[(0,o.jsxs)("div",{children:[!!n&&(0,o.jsx)("span",{className:"font-semibold",children:n},"tooltip-title"),!!r&&(0,o.jsx)("div",{className:"font-normal",children:r},"tooltip-content")]}),s&&(0,o.jsx)(ip,{ref:w,context:S,className:ue("fill-current",I)})]})})]})};zf.displayName="Tooltip";const Uf=u("Minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]),Wf=(0,i.forwardRef)(({id:e,label:t,defaultChecked:n=!1,checked:r,onChange:s,indeterminate:a,disabled:l,size:c="md",className:u,...d},h)=>{const p=(0,i.useMemo)(()=>e||`checkbox-${xu()}`,[e]),f=(0,i.useMemo)(()=>typeof r<"u",[r]),[m,g]=(0,i.useState)(n||!1),v="primary",y={sm:{checkbox:"size-4 rounded gap-1",icon:"size-3",text:"text-sm",description:"text-sm",gap:"gap-0.5"},md:{checkbox:"size-5 rounded gap-1",icon:"size-4",text:"text-base",description:"text-sm",gap:"gap-1"}},b={primary:{checkbox:"border-border-strong hover:border-border-interactive checked:border-border-interactive bg-white checked:bg-toggle-on checked:hover:bg-toggle-on-hover checked:hover:border-toggle-on-hover focus:ring-2 focus:ring-offset-2 focus:ring-focus",icon:"text-white"}},x=(0,i.useCallback)(()=>f?r:m,[f,r,m]),w=(0,i.useCallback)(()=>(0,i.isValidElement)(t)?t:t?.heading||t?.description?(0,o.jsxs)("div",{className:y[c].gap,children:[t?.heading&&(0,o.jsx)(ku,{className:ue("text-text-primary font-medium leading-4 m-0",y[c].text,y[c].gap,l&&"text-text-disabled"),htmlFor:p,children:t?.heading}),t?.description&&(0,o.jsx)(ku,{tag:"p",className:ue("font-normal leading-5 m-0",y[c].description,l&&"text-text-disabled"),variant:"help",children:t?.description})]}):null,[t,c,l]);return(0,o.jsxs)("div",{className:ue("inline-flex items-center justify-center gap-2",!!t&&"items-start",l&&"cursor-not-allowed"),children:[(0,o.jsxs)("label",{className:ue("relative flex items-center justify-center rounded-full p-0.5",!l&&"cursor-pointer"),htmlFor:p,children:[(0,o.jsx)("input",{ref:h,id:p,type:"checkbox",className:ue("peer relative cursor-pointer appearance-none transition-all m-0 before:content-[''] checked:before:content-[''] checked:before:hidden before:hidden !border-1.5 border-solid",b[v].checkbox,y[c].checkbox,l&&"cursor-not-allowed disabled:bg-white checked:disabled:bg-white disabled:border-border-disabled checked:disabled:border-border-disabled",u),checked:x(),onChange:e=>{if(l)return;const t=e.target.checked;f||g(t),"function"==typeof s&&s(t)},disabled:l,...d}),(0,o.jsx)("span",{className:ue("pointer-events-none inline-flex items-center absolute top-2/4 not-rtl:left-2/4 rtl:right-2/4 -translate-y-2/4 -translate-x-2/4 text-white opacity-0 transition-opacity peer-checked:opacity-100",b[v].icon,l&&"cursor-not-allowed peer-disabled:text-border-disabled"),children:a?(0,o.jsx)(Uf,{className:ue(y[c]?.icon)}):(0,o.jsx)(pe,{className:ue(y[c]?.icon)})})]}),!!t&&w()]})});Wf.displayName="Checkbox";const $f=({design:e="inline",theme:t="light",variant:n="neutral",className:r="",title:i="",content:s="",icon:a=null,onClose:l,action:c={label:"",onClick:()=>{},type:"link"}})=>{const u=()=>{"function"==typeof l&&l()},h={neutral:"ring-alert-border-neutral bg-alert-background-neutral",custom:"ring-alert-border-neutral bg-alert-background-neutral",info:"ring-alert-border-info bg-alert-background-info",success:"ring-alert-border-green bg-alert-background-green",warning:"ring-alert-border-warning bg-alert-background-warning",error:"ring-alert-border-danger bg-alert-background-danger"},p="bg-background-inverse ring-background-inverse",f={light:"text-icon-secondary",dark:"text-icon-inverse"},m=()=>{c?.onClick?.(u)};return"stack"===e?(0,o.jsx)("div",{className:ue("flex items-center justify-start p-4 gap-2 relative ring-1 rounded-md shadow-lg","dark"===t?p:h?.[n],r),children:(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("div",{className:"self-start flex items-center justify-center [&_svg]:size-5 shrink-0",children:be({variant:n,icon:a,theme:t})}),(0,o.jsxs)("div",{className:"flex flex-col items-start justify-start gap-0.5 mr-7",children:[we({title:i,theme:t}),ke({content:s,theme:t}),c?.label&&"function"==typeof c?.onClick&&(0,o.jsx)("div",{className:"mt-2.5",children:xe({actionLabel:c?.label,actionType:c?.type??"button",onAction:m,theme:t})})]}),(0,o.jsx)("div",{className:"absolute right-4 top-4 [&_svg]:size-5",children:(0,o.jsx)("button",{className:ue("bg-transparent m-0 p-0 border-none focus:outline-none active:outline-none cursor-pointer",f[t]??f.light),onClick:()=>u(),"aria-label":"Close alert",children:(0,o.jsx)(d,{})})})]})}):(0,o.jsxs)("div",{className:ue("flex items-center justify-between p-3 gap-2 relative ring-1 rounded-lg shadow-lg","dark"===t?p:h?.[n],r),children:[(0,o.jsxs)("div",{className:"flex items-center justify-start gap-2",children:[(0,o.jsx)("div",{className:"self-start flex items-center justify-center [&_svg]:size-5 shrink-0",children:be({variant:n,icon:a,theme:t})}),(0,o.jsxs)("p",{className:"content-start space-x-1 my-0 mr-10 px-1",children:[we({title:i,theme:t,inline:!0}),ke({content:s,theme:t,inline:!0})]})]}),(0,o.jsxs)("div",{className:"flex h-full justify-start gap-4 [&_svg]:size-4",children:[c?.label&&"function"==typeof c?.onClick&&(0,o.jsx)("div",{className:"self-center flex h-5",children:xe({actionLabel:c?.label,actionType:c?.type??"button",onAction:m,theme:t})}),"function"==typeof l&&(0,o.jsx)("button",{className:ue("self-start bg-transparent m-0 border-none p-0.5 focus:outline-none active:outline-none cursor-pointer size-5",f[t]??f.light),onClick:()=>u(),"aria-label":"Close alert",children:(0,o.jsx)(d,{})})]})]})},{screens:Hf,proSlug:Kf}=window.oneOnboardingData||{},qf=Hf?.features||{},Yf=({status:e,upgrading:t})=>{if(t)return(0,o.jsx)("span",{dangerouslySetInnerHTML:{__html:(0,jc.sprintf)(/* translators: %s: upload plugins page link */ /* translators: %s: upload plugins page link */
(0,jc.__)("If you completed the purchase, please update the pro plugin zip manually from the %s.","astra-sites"),`<a href="/wp-admin/plugin-install.php?tab=upload" target="_blank" rel="noopener noreferrer" class="focus:ring-2 focus:ring-offset-1 focus:ring-brand-primary-600">${(0,jc.__)("upload plugins page","astra-sites")}</a>`)+" "+(0,jc.__)("Once uploaded, refresh the page to reflect the changes.","astra-sites")}});switch(e){case"inactive":return(0,jc.__)("Pro addon is found but inactive. Click continue to activate it and unlock premium features.","astra-sites");case"active":return(0,jc.__)("Pro addon is active. You can use all premium features.","astra-sites");default:return(0,jc.__)("Heads up! You've selected premium features. To use them, you'll need to upgrade.","astra-sites")}},Gf=Vc("wand-sparkles",[["path",{d:"m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72",key:"ul74o6"}],["path",{d:"m14 7 3 3",key:"1r5n42"}],["path",{d:"M5 6v4",key:"ilb8ba"}],["path",{d:"M19 14v4",key:"blhpug"}],["path",{d:"M10 2v2",key:"7u0qdc"}],["path",{d:"M7 8H3",key:"zfb6yr"}],["path",{d:"M21 16h-4",key:"1cnmox"}],["path",{d:"M11 3H9",key:"1obp7u"}]]),Xf=Vc("layers",[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]]),Zf=Vc("arrow-right",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]),{screens:Jf,starterTemplates:Qf}=window.oneOnboardingData||{},em=Jf?.features||{},tm=[{id:"ai-builder",enabled:Qf?.aiBuilder?.enabled,icon:Gf,title:(0,jc.__)("AI Starter Templates","astra-sites"),description:(0,jc.__)("Let AI generate a website tailored to your business, no design skills needed.","astra-sites"),cta:{variant:"primary",label:(0,jc.__)("Generate with AI","astra-sites"),url:Qf?.aiBuilder?.url||"#"}},{id:"classic",enabled:Qf?.classic?.enabled,icon:Xf,title:(0,jc.__)("Classic Starter Templates","astra-sites"),description:(0,jc.__)("Pick from 300+ hand-crafted designs for different niches and styles.","astra-sites"),cta:{label:(0,jc.__)("Build with Templates","astra-sites"),url:Qf?.classic?.url||"#"}}].filter(e=>e.enabled),nm=[{slug:"astra-pro-sites",name:"Premium Starter Templates"},{slug:"astra-sites",name:"Starter Templates"}],{screens:rm}=window.oneOnboardingData||{},om=rm?.["add-ons"]||{},im=({addon:e,status:t,isSelected:n,onToggle:r,processing:i})=>{const s={active:(0,jc.__)("Active","astra-sites"),inactive:i?(0,jc.__)("Activating…","astra-sites"):(0,jc.__)("Inactive","astra-sites"),default:i?(0,jc.__)("Installing…","astra-sites"):""},a={active:"green",inactive:"yellow",default:"neutral"},l={active:"text-badge-color-green",inactive:"text-badge-color-yellow",default:"text-badge-color-gray"},c=n&&i;return(0,o.jsxs)("div",{className:"p-3 bg-background-primary flex gap-2 rounded-md shadow-sm [&>div]:flex-row-reverse [&>div]:w-full [&>div]:justify-between",children:[(0,o.jsxs)("span",{className:"w-6 h-6 mt-1",children:[e?.logo&&(0,o.jsx)("img",{className:"w-full h-full",src:e?.logo,alt:(0,jc.sprintf)(
// translators: %s is the addon title
// translators: %s is the addon title
(0,jc.__)("%s logo","astra-sites"),e?.title)}),!e?.logo&&e?.logoSvg&&(0,o.jsx)("div",{className:"w-full h-full [&>svg]:w-full [&>svg]:h-full",role:"img","aria-label":(0,jc.sprintf)(
// translators: %s is the addon title
// translators: %s is the addon title
(0,jc.__)("%s logo","astra-sites"),e?.title),dangerouslySetInnerHTML:{__html:e?.logoSvg}})]}),(0,o.jsx)(Wf,{label:{description:e.description,heading:(0,o.jsxs)("span",{className:"flex items-center gap-2",children:[(0,o.jsx)("span",{className:"cursor-pointer",children:e.title}),(t||c)&&(0,o.jsx)(xf,{size:"xs",icon:c&&(0,o.jsx)(kf,{className:au("[&>svg]:size-3.5",l?.[t]||l?.default)}),variant:a?.[t]||a?.default,label:s?.[t]||s?.default})]})},size:"sm",checked:n,onChange:t=>r(e?.slug,t),onKeyDown:t=>{"Enter"===t.key&&(t.preventDefault(),r(e?.slug,!n))},className:"focus:border-border-interactive"})]})},{product:sm,screens:am,doneImageUrl:lm}=window.oneOnboardingData||{},cm=am?.done||{},um=({children:e,gap:t="lg",className:n,...r})=>(0,o.jsx)("div",{className:ue("w-full box-border flex items-center justify-between bg-background-primary p-5 min-h-16",de(t),n),...r,children:e});um.displayName="Topbar";const dm=({gap:e="sm",children:t,className:n})=>(0,o.jsx)("div",{className:ue("flex items-center",de(e),n),children:t});dm.displayName="Topbar.Left";const hm=({gap:e="md",children:t,align:n="center",className:r})=>{const i={left:"justify-start",center:"justify-center",right:"justify-end"}[n];return(0,o.jsx)("div",{className:ue("flex items-center grow",de(e),i,r),children:t})};hm.displayName="Topbar.Middle";const pm=({gap:e="sm",children:t,className:n})=>(0,o.jsx)("div",{className:ue("flex items-center",de(e),n),children:t});pm.displayName="Topbar.Right";const fm=({children:e,className:t})=>(0,o.jsx)("div",{className:ue("flex items-center [&>svg]:block h-full",t),children:e});fm.displayName="Topbar.Item",um.Left=dm,um.Middle=hm,um.Right=pm,um.Item=fm;const mm=u("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]),gm=(e,t)=>ue("rounded-full text-brand-primary-600 transition-colors duration-300",e[t].dot,e[t].ring),vm={sm:{dot:"size-2.5",ring:"size-5",numberIcon:"size-5 text-tiny",icon:"size-5",label:"text-xs"},md:{dot:"size-3",ring:"size-6",numberIcon:"size-6 text-sm",icon:"size-6",label:"text-sm"},lg:{dot:"size-3.5",ring:"size-7",numberIcon:"size-7 text-md",icon:"size-7",label:"text-sm"}},ym=({variant:e="dot",size:t="sm",type:n="inline",currentStep:r=1,children:s,className:a,lineClassName:l="min-w-10",completedVariant:c="icon",completedIcon:u=(0,o.jsx)(pe,{}),...d})=>{const h=i.Children.count(s);-1===r&&(r=h+1);const p=i.Children.map(s,(s,a)=>{const d={isCompleted:a+1<r,isCurrent:a+1===r,sizeClasses:vm,size:t,variant:e,type:n,isLast:a+1===h,index:a,lineClassName:l,completedVariant:c,completedIcon:u};return(0,o.jsx)(i.Fragment,{children:i.isValidElement(s)?i.cloneElement(s,d):s},a)});return(0,o.jsx)("div",{className:ue("flex w-full",a,"inline"===n?"items-center justify-between":""),...d,children:p})},bm=({labelText:e="",icon:t=(0,o.jsx)(mm,{}),isCurrent:n,isCompleted:r,className:i,type:s,variant:a,sizeClasses:l,size:c,isLast:u,index:d,lineClassName:h,completedVariant:p="icon",completedIcon:f=(0,o.jsx)(pe,{}),...m})=>{const g=xm(a,r,n,l,c,t,d,p,f),v={lg:"left-[calc(50%+14px)] right-[calc(-50%+14px)]",md:"left-[calc(50%+12px)] right-[calc(-50%+12px)]",sm:"left-[calc(50%+10px)] right-[calc(-50%+10px)]"},y={lg:"top-3.5",md:"top-3",sm:"top-2.5"},b=()=>{if(e){const t=ue(l[c].label,"text-text-tertiary",n?"text-brand-primary-600":"","break-word","stack"===s?"mt-2 transform max-w-xs":"mx-2 max-w-32");return(0,o.jsx)("span",{className:t,children:e})}return null},x=()=>{if(!u){const t=ue("block",r?"border-brand-primary-600":"border-border-subtle",h);return"stack"===s?(0,o.jsx)("div",{className:ue("relative","flex","border-solid","border-y","absolute",r?"border-brand-primary-600":"border-border-subtle",y[c],v[c]),children:(0,o.jsx)("span",{className:"block"})}):(0,o.jsx)("div",{className:"flex-1",children:(0,o.jsx)("span",{className:ue("mr-2 border-y border-solid",!e&&"ml-2",t)})})}return null};return"stack"===s?(0,o.jsxs)("div",{className:"relative flex-1 justify-center",children:[(0,o.jsxs)("div",{className:ue("flex items-center flex-col",i),...m,children:[g,b()]}),x()]}):(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)("div",{className:ue("flex items-center",i),...m,children:[g,b()]}),x()]})};bm.displayName="ProgressSteps.Step";const xm=(e,t,n,r,i,s,a,l="icon",c=(0,o.jsx)(pe,{}))=>{if(t)return"number"===l?(0,o.jsx)("span",{className:ue(gm(r,i),"flex items-center justify-center bg-brand-primary-600 text-text-on-color rounded-full"),children:a+1}):(0,o.jsx)("span",{className:gm(r,i),children:c});const u=((e,t,n)=>ue("relative flex items-center rounded-full justify-center transition-colors z-10 duration-500 ring-1",e?"ring-brand-primary-600":"ring-border-subtle",t[n].ring))(!!n,r,i),d=((e,t,n,r)=>{const o=`absolute rounded-full transition-colors duration-500 ${n[r].dot}`;return"dot"===e?ue(o,n[r].dot,t?"bg-brand-primary-600":"bg-text-tertiary"):"number"===e?ue(o,n[r].dot,t?"text-brand-primary-600":"text-text-tertiary","flex items-center justify-center"):"icon"===e?ue(o,t?"text-brand-primary-600":"text-text-tertiary","flex items-center justify-center"):""})(e,n,r,i);let h=null;return"number"===e?h=a+1:"icon"===e&&s&&(h=s),(0,o.jsx)("span",{className:u,children:(0,o.jsx)("span",{className:d,children:h})})};ym.Step=bm;const wm=Vc("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),{logoUrl:km,logoSvg:Em,product:Sm}=window.oneOnboardingData||{},jm=({className:e="h-6"})=>{
// translators: %s is the product name
const t=(0,jc.sprintf)((0,jc.__)("%s logo","astra-sites"),Sm?.name);return(0,o.jsxs)("span",{className:e,children:[km&&(0,o.jsx)("img",{className:"w-full h-full [&>svg]:w-full [&>svg]:h-full",src:km,alt:t}),!km&&Em&&(0,o.jsx)("div",{className:"w-full h-full",role:"img","aria-label":t,dangerouslySetInnerHTML:{__html:Em}})]})},{exit:Pm}=window.oneOnboardingData||{},Tm=({screens:e=[]})=>{const{currentScreen:t,navigateToScreen:n}=gu(),{state:r}=mu(),i=e=>e?.id?.replace(/-/g," ");return(0,o.jsxs)(um,{className:"bg-background-primary grid grid-cols-2 md:grid-cols-[1fr_4fr_1fr]",children:[(0,o.jsx)(um.Left,{children:(0,o.jsx)(um.Item,{children:(0,o.jsx)(jm,{})})}),(0,o.jsx)(um.Middle,{align:"center",className:"hidden md:flex",children:(0,o.jsx)(um.Item,{children:(0,o.jsx)(ym,{currentStep:e.findIndex(e=>e.id===t)+1,size:"md",type:"inline",variant:"number",completedVariant:"number",children:e.filter(e=>"done"!==e.id).map(e=>(0,o.jsx)(ym.Step,{onClick:()=>n(e.id),onKeyDown:t=>{"Enter"===t.key&&(t.preventDefault(),n(e.id))},"aria-label":i(e),"aria-current":t===e.id?"step":void 0,className:"cursor-pointer hover:bg-background-secondary transition-colors duration-200 rounded-full focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-brand-primary-600",tabIndex:0},e.id))})})}),(0,o.jsx)(um.Right,{className:"justify-end",children:(0,o.jsx)(um.Item,{children:(0,o.jsx)(ge,{icon:(0,o.jsx)(wm,{className:"size-4"}),iconPosition:"right",size:"xs",variant:"ghost",onClick:async()=>{window.oneOnboardingData&&(window.oneOnboardingData.isExiting=!0);try{await du({...r,exitedEarly:"done"!==t})}catch(e){console.error("Failed to save state on exit:",e)}setTimeout(()=>{window.location.href=Pm?.url||""},250)},children:Pm?.label||(0,jc.__)("Exit Guided Setup","astra-sites")})})})]})},Cm=[{id:"welcome",element:()=>{const{navigateToNextScreen:e}=gu(),t="image"===bu?.banner?.type,n="video"===bu?.banner?.type,r=bu?.banner?.thumbnail,[s,a]=(0,i.useState)(n&&!r);return(0,o.jsxs)(Nm,{className:"w-[35rem]",children:[(0,o.jsxs)("div",{className:"space-y-1.5",children:[(0,o.jsx)(Nc,{as:"h2",size:30,weight:600,children:bu?.heading||(0,jc.sprintf)(
// translators: %s is the product name
// translators: %s is the product name
(0,jc.__)("Welcome to %s","astra-sites"),vu?.name)}),(0,o.jsx)(Nc,{size:16,weight:500,children:bu?.description})]}),bu?.banner?.url&&(0,o.jsxs)("div",{className:"relative",children:[t&&(0,o.jsx)("img",{alt:bu?.banner?.title||(0,jc.sprintf)(
// translators: %s is the product name
// translators: %s is the product name
(0,jc.__)("%s Welcome Banner","astra-sites"),vu?.name),className:"w-full",src:bu.banner.url}),n&&s&&(0,o.jsx)("iframe",{className:"w-full aspect-video border-none rounded-lg bg-blend-multiply",src:bu?.banner?.url,title:bu?.banner?.title||(0,jc.__)("Welcome Video","astra-sites"),allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; autoplay",allowFullScreen:!0,style:{background:`#4F4E7C1A url('${bu?.banner?.thumbnail}') center / cover no-repeat`}}),n&&!s&&(0,o.jsxs)("div",{className:"relative w-full h-full aspect-video rounded-lg cursor-pointer overflow-hidden group",onKeyUp:e=>{"Enter"!==e.key&&" "!==e.key||a(!0)},onClick:()=>a(!0),role:"button",tabIndex:0,"aria-label":(0,jc.__)("Play Welcome Onboarding Video","astra-sites"),children:[(0,o.jsx)("img",{className:"w-full h-full object-cover rounded-xl",src:bu?.banner?.thumbnail,alt:(0,jc.__)("Starter Templates Banner","astra-sites")}),(0,o.jsx)("div",{className:"absolute inset-0 bg-[#4F4E7C1A]"}),(0,o.jsxs)("div",{className:"absolute inset-8 flex flex-col justify-between items-start",children:[(0,o.jsx)("div",{className:"my-2 w-12 h-12 flex items-center justify-center bg-[#14133880] bg-opacity-90 group-hover:bg-brand-primary-600 group-hover:bg-opacity-100 transition-all duration-300 rounded-full shadow-md group-hover:shadow-lg group-hover:scale-110",children:(0,o.jsx)(_c,{size:24,className:"fill-white",strokeWidth:0})}),bu?.banner?.title&&(0,o.jsx)(Nc,{className:"mt-4 hidden sm:block w-[52%] text-3xl uppercase",as:"h3",color:"secondary",weight:700,children:bu?.banner?.title}),(0,o.jsx)(jm,{className:"h-10 opacity-90"})]})]})]}),(0,o.jsx)("ul",{className:"divide-y divide-gray-200 list-none pl-0 space-y-2",children:bu.items.map((e,t)=>(0,o.jsxs)("li",{className:"flex items-start space-x-2 text-field-label text-sm font-medium",children:[(0,o.jsx)(Fc,{className:"mt-0.5 size-4 text-brand-primary-600"}),(0,o.jsx)("span",{children:e})]},t))}),(0,o.jsx)("div",{className:"flex justify-between items-center pt-2 gap-4",children:(0,o.jsx)(ge,{className:"px-4 w-max",icon:(0,o.jsx)(Bc,{}),iconPosition:"right",onClick:e,children:bu?.nextLabel||(0,jc.__)("Let’s Get Started","astra-sites")})})]})}},{id:"user-info",element:()=>{const e=(0,i.useRef)(),[t,n]=(0,i.useState)({}),{navigateToNextScreen:r,navigateToPreviousScreen:s,skipScreen:a}=gu(),{state:{userInfo:l},dispatch:c}=mu(),u=(0,i.useCallback)(()=>{var t,n,r;if(!e.current)return;const o=new FormData(e.current),i=Object.fromEntries(o.entries());c({type:Wc,payload:{firstName:null!==(t=i?.firstName)&&void 0!==t?t:l.firstName,lastName:null!==(n=i?.lastName)&&void 0!==n?n:l.lastName,email:null!==(r=i?.email)&&void 0!==r?r:l.email}})},[c,l.firstName,l.lastName,l.email]),d=(e,t)=>{switch(e){case"firstName":if(!t?.trim())return(0,jc.__)("First name is required","astra-sites");break;case"lastName":break;case"email":if(!t?.trim())return(0,jc.__)("Email is required","astra-sites");if(!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t))return(0,jc.__)("Please enter a valid email address","astra-sites")}return""};return(0,i.useEffect)(()=>u,[u]),(0,o.jsx)(Nm,{children:(0,o.jsxs)("form",{onSubmit:async t=>{t.preventDefault(),(()=>{const t=new FormData(e.current),r=Object.fromEntries(t.entries()),o={};["firstName","lastName","email"].forEach(e=>{o[e]=d(e,r[e])}),n(o);const i=["firstName","lastName","email"].find(e=>o[e]);if(i&&e.current){const t=e.current.querySelector(`#${i}`);t&&t.focus()}return!Object.values(o).some(e=>e)})()&&(u(),r())},ref:e,children:[(0,o.jsx)(Nm.Header,{title:Of?.heading||(0,jc.sprintf)(
// translators: %s is the product name
// translators: %s is the product name
(0,jc.__)("Get the Best Start with %s","astra-sites"),Lf?.name),description:(0,o.jsxs)(o.Fragment,{children:[Of?.description||(0,jc.sprintf)(
// translators: %s is the product name
// translators: %s is the product name
(0,jc.__)("Get helpful updates, new features, and tips to make your website better, while helping us improve %s.","astra-sites"),Lf?.name)," ",Of.privacyPolicy?.url&&(0,o.jsx)("a",{className:"text-text-secondary shadow-none focus:ring-2 focus:ring-offset-1 focus:ring-brand-primary-600",href:Of.privacyPolicy?.url,target:"_blank",rel:"noreferrer",children:Of.privacyPolicy?.label||(0,jc.__)("Privacy Policy","astra-sites")})]})}),(0,o.jsxs)("div",{className:"grid grid-cols-2 gap-6 mt-6",children:[Bf.map(e=>{return(0,o.jsxs)("div",{className:e.colSpan||"",children:[(0,o.jsx)(Eu,{id:e.name,type:e.type||"text",label:e.label,name:e.name,size:"md",defaultValue:l[e.name],error:t[e.name],onBlur:(r=e.name,e=>{((e,t)=>{const r=d(e,t);n(t=>({...t,[e]:r}))})(r,e.target.value)})}),t?.[e.name]&&(0,o.jsx)("p",{className:"text-text-error text-sm mt-1.5 mb-0",children:t?.[e.name]})]},e.name);var r}),(0,o.jsx)("div",{className:"col-span-2",children:(0,o.jsxs)(Nf,{by:"id",onChange:e=>c({type:Wc,payload:{source:e}}),placeholder:(0,jc.__)("Select an option","astra-sites"),size:"md",defaultValue:l.source,children:[(0,o.jsx)(Nf.Button,{type:"button",label:(0,jc.__)("How did you hear about us?","astra-sites"),render:e=>e?.name}),(0,o.jsx)(Nf.Portal,{children:(0,o.jsx)(Nf.Options,{dropdownPortalId:"source",children:Object.entries(Vf)?.map(([e,t])=>(0,o.jsx)(Nf.Option,{value:{id:e,name:t},children:t},e))})})]})}),(0,o.jsx)("div",{className:"col-span-2",children:(0,o.jsxs)(Nf,{by:"id",onChange:e=>c({type:Wc,payload:{newUser:e}}),placeholder:(0,jc.__)("Select an option","astra-sites"),size:"md",defaultValue:l.newUser,children:[(0,o.jsx)(Nf.Button,{type:"button",label:(0,jc.__)("Is this your first WordPress website?","astra-sites"),render:e=>e?.name}),(0,o.jsx)(Nf.Portal,{children:(0,o.jsx)(Nf.Options,{dropdownPortalId:"new-user",children:Object.entries(Ff)?.map(([e,t])=>(0,o.jsx)(Nf.Option,{value:{id:e,name:t},children:t},e))})})]})}),(0,o.jsxs)("div",{className:"col-span-2",children:[(0,o.jsxs)(Nf,{by:"id",onChange:e=>c({type:Wc,payload:{benefit:e}}),placeholder:(0,jc.__)("Select an option","astra-sites"),size:"md",defaultValue:l.benefit,children:[(0,o.jsx)(Nf.Button,{type:"button",label:(0,jc.sprintf)(
// translators: %s is the product name
// translators: %s is the product name
(0,jc.__)("What benefit matters to you most while choosing %s?","astra-sites"),Lf?.name),render:e=>e?.name}),(0,o.jsx)(Nf.Portal,{children:(0,o.jsx)(Nf.Options,{dropdownPortalId:"benefits",children:Object.entries(_f)?.map(([e,t])=>(0,o.jsx)(Nf.Option,{value:{id:e,name:t},children:t},e))})})]}),"other"===l.benefit?.id&&(0,o.jsx)(Mf,{className:"w-full mt-4 text-sm",onChange:e=>c({type:Wc,payload:{benefit:{...l.benefit||{},other:e}}}),"aria-label":(0,jc.__)("Please specify other benefits","astra-sites"),placeholder:(0,jc.__)("Please specify other benefits","astra-sites"),defaultValue:l.benefit?.other||""})]})]}),(0,o.jsxs)("div",{className:"flex justify-between items-center gap-6 mt-6",children:[(0,o.jsx)(ge,{icon:(0,o.jsx)(Df,{}),variant:"outline",onClick:s,children:(0,jc.__)("Back","astra-sites")}),(0,o.jsxs)("div",{className:"flex justify-end items-center gap-3",children:[(0,o.jsx)(ge,{className:"text-text-tertiary",variant:"ghost",onClick:a,children:(0,jc.__)("Skip","astra-sites")}),(0,o.jsx)(ge,{type:"submit",icon:(0,o.jsx)(Bc,{}),iconPosition:"right",children:(0,jc.__)("Continue","astra-sites")})]})]})]})})}},{id:"features",element:()=>{const{navigateToNextScreen:e,navigateToPreviousScreen:t,skipScreen:n}=gu(),{state:{proFeatures:r,proStatus:s},dispatch:a}=mu(),[l,c]=(0,i.useState)(!1),u="active"!==s&&"inactive"!==s,d=(0,i.useCallback)(async()=>{if(!Kf)return;const e=await lu(Kf);if(e.success&&e.data){let t="not-installed";e.data.installed&&e.data.active?t="active":e.data.installed&&!e.data.active&&(t="inactive"),a({type:Hc,payload:t})}},[a]);(0,i.useEffect)(()=>{d()},[d]),(0,i.useEffect)(()=>{const e=()=>{document.hidden||d()};return document.addEventListener("visibilitychange",e),()=>{document.removeEventListener("visibilitychange",e)}},[d]);const h=(e,t)=>{const n=t?[...r,e?.id]:r.filter(t=>t!==e?.id);a({type:$c,payload:n})},p={pro:(0,jc.__)("Pro","astra-sites"),free:(0,jc.__)("Free","astra-sites")},m=r.length>0,g=e=>(0,o.jsxs)("span",{className:"flex items-center gap-1",children:[e&&"active"===s&&(0,o.jsx)(Fc,{size:12}),e?p.pro:p.free]}),v=e=>!e?.isPro||r?.includes(e.id);return(0,o.jsx)(Nm,{children:(0,o.jsxs)("form",{onSubmit:e=>e.preventDefault(),children:[(0,o.jsx)(Nm.Header,{title:qf?.heading||(0,jc.__)("Select Your Features","astra-sites"),description:qf?.description||""}),(0,o.jsx)("div",{className:"grid grid-cols-1 mt-2",children:qf?.featureList?.map((e,t)=>{return(0,o.jsx)(zf,{arrow:!0,placement:"top",content:(n=e?.isPro,n?"":(0,jc.__)("Feature is available by default in Free version","astra-sites")),className:au(e?.isPro&&"hidden"),children:(0,o.jsx)("div",{className:au("py-4 [&>div]:flex-row-reverse [&>div]:w-full [&>div]:justify-between border-0 border-b border-solid border-border-subtle",!e?.isPro&&"[&>div]:pointer-events-none"),children:(0,o.jsx)(Wf,{label:{description:e?.description,heading:(0,o.jsxs)("span",{className:"flex items-center gap-3 cursor-pointer",children:[e?.title,(0,o.jsx)(xf,{size:"xs",variant:e?.isPro&&"active"!==s?"inverse":"green",label:g(e?.isPro)})]})},size:"sm",checked:v(e),onChange:t=>h(e,t),onKeyDown:t=>{"Enter"===t.key&&e?.isPro&&(t.preventDefault(),h(e,!v(e)))},tabIndex:e?.isPro?0:-1,className:au("focus:border-border-interactive",!e?.isPro&&"checked:bg-[#E5E7EB] checked:border-[#E5E7EB] shadow-none")})})},t);var n})}),(0,o.jsxs)("div",{className:"flex justify-between items-center gap-6 mt-6",children:[(0,o.jsx)(ge,{icon:(0,o.jsx)(Df,{}),variant:"outline",onClick:t,children:(0,jc.__)("Back","astra-sites")}),(0,o.jsxs)("div",{className:"flex justify-end items-center gap-3",children:[(0,o.jsx)(ge,{className:"text-text-tertiary",variant:"ghost",onClick:n,children:(0,jc.__)("Skip","astra-sites")}),(0,o.jsx)(ge,{icon:(0,o.jsx)(Bc,{}),iconPosition:"right",onClick:m?async()=>{if(u)return window.open(qf?.upgradeUrl||"#","_blank"),void c(!0);if(e(),"active"!==s)try{(await uu(Kf)).success?(f.success((0,jc.__)("Pro Activated","astra-sites"),{description:(0,jc.__)("The pro addon has been successfully activated…","astra-sites")}),a({type:Hc,payload:"active"})):f.error((0,jc.__)("Activation Failed!","astra-sites"),{description:(0,jc.__)("Failed to activate the pro addon. Please try again or activate it manually from the plugins page.","astra-sites")})}catch(e){console.error("Error activating plugin:",e)}}:e,children:m&&u?(0,jc.__)("Upgrade","astra-sites"):(0,jc.__)("Continue","astra-sites")})]})]}),m&&"active"!==s&&(0,o.jsx)($f,{className:"mt-8 bg-gray-50 shadow-none [&_p]:mr-0",content:(0,o.jsx)(Yf,{status:s,upgrading:l})})]})})}},{id:"starter-templates",element:()=>{const{state:e,dispatch:t}=mu(),{navigateToNextScreen:n,navigateToPreviousScreen:r,skipScreen:s}=gu(),[a,l]=(0,i.useState)(!1),c=(0,i.useCallback)(async(n,r=0)=>{(async()=>{try{t({type:Yc,payload:n?.id}),await hu(e)}catch(e){console.error("Failed to submit onboarding completion:",e)}})(),setTimeout(()=>{window.location.href=n?.cta?.url||"#"},r)},[t]),u=(0,i.useCallback)(async(e,t,n)=>{f.info((0,jc.__)("Activating…","astra-sites"),{description:(0,jc.sprintf)(
// translators: %s is the plugin name
// translators: %s is the plugin name
(0,jc.__)("Activating %s…","astra-sites"),t)});const r=await uu(e);if(!r.success)throw new Error(r.error);f.success((0,jc.__)("Redirecting…","astra-sites"),{description:(0,jc.sprintf)(
// translators: %s is the plugin name
// translators: %s is the plugin name
(0,jc.__)("Redirecting to %s…","astra-sites"),n?.title)}),c(n,1e3)},[c]),d=(0,i.useCallback)(async e=>{if(!a){l(e.id);try{const t={};for(const{slug:n}of nm)if(t[n]=await lu(n),t[n].success&&t[n].data?.active)return f.success((0,jc.__)("Redirecting…","astra-sites"),{description:(0,jc.sprintf)(
// translators: %s is the plugin name
// translators: %s is the plugin name
(0,jc.__)("Redirecting to %s…","astra-sites"),e?.title)}),void c(e);for(const{slug:n,name:r}of nm){const o=t[n];if(o.success&&o.data?.installed)return void await u(n,r,e)}const n=nm[1];f.info((0,jc.__)("Installing…","astra-sites"),{description:(0,jc.sprintf)(
// translators: %s is the plugin name
// translators: %s is the plugin name
(0,jc.__)("Installing %s…","astra-sites"),n.name)});const r=await cu(n.slug);if(!r.success)throw new Error(r.error);await u(n.slug,n.name,e)}catch(e){f.error((0,jc.__)("Error!","astra-sites"),{description:e.message||(0,jc.__)("Failed to setup Starter Templates","astra-sites")})}finally{l(!1)}}},[a,l,c,u]);return 0===tm.length?(n(),null):(0,o.jsxs)(Nm,{children:[(0,o.jsx)(Nm.Header,{title:em?.heading||(0,jc.__)("Build Your Site in Minutes Using Pre-Built Templates","astra-sites"),description:em?.description||(0,jc.__)("Launch your site in minutes by importing a complete website, including pages, headers, footers, and global styles. Customize everything visually using Astra.","astra-sites")}),(0,o.jsx)("div",{className:"p-2 bg-background-secondary flex flex-col md:flex-row gap-2 rounded-lg overflow-auto",children:tm.map((e,t)=>(0,o.jsxs)("div",{className:"md:w-1/2 p-3 bg-background-primary flex flex-col gap-2 rounded-lg shadow-sm",children:[e?.icon&&(0,o.jsx)(e.icon,{className:"h-6 w-6 text-brand-primary-600",strokeWidth:1.25}),(0,o.jsxs)("div",{className:"flex-1 mb-2",children:[(0,o.jsx)(Nc,{as:"h5",size:18,className:"mb-1",children:e?.title}),(0,o.jsx)(Nc,{as:"p",size:14,color:"secondary",children:e?.description})]}),(0,o.jsx)(ge,{className:au("w-max",a&&"cursor-not-allowed"),size:"sm",icon:a===e.id?(0,o.jsx)(kf,{size:"sm",variant:"primary"===e?.cta?.variant?"secondary":"primary"}):(0,o.jsx)(Zf,{}),iconPosition:"right",variant:e?.cta?.variant||"outline",onClick:()=>d(e),children:e?.cta?.label})]},e.id||t))}),(0,o.jsxs)("div",{className:"flex justify-between items-center pt-2 gap-4",children:[(0,o.jsx)(ge,{icon:(0,o.jsx)(Df,{}),variant:"outline",onClick:r,children:(0,jc.__)("Back","astra-sites")}),(0,o.jsx)("div",{className:"flex justify-end items-center gap-3",children:(0,o.jsx)(ge,{className:"text-text-tertiary",variant:"ghost",onClick:s,children:(0,jc.__)("Skip","astra-sites")})})]})]})}},{id:"add-ons",element:()=>{const[e,t]=(0,i.useState)({}),[n,r]=(0,i.useState)(!1),{navigateToNextScreen:s,navigateToPreviousScreen:a,skipScreen:l}=gu(),{state:{selectedAddons:c,activatedAddons:u},dispatch:d}=mu();(0,i.useEffect)(()=>{(async()=>{if(!om?.addonList?.length)return;const e=om.addonList.filter(e=>e?.slug).map(async e=>{try{const t=await lu(e.slug);if(!t.success)return null;let{installed:n,active:r}=t.data;return r=r?"active":"",n=n?"inactive":"",{slug:e.slug,status:r||n}}catch(t){return console.error(`Error checking status for ${e.slug}:`,t),null}}),n=await Promise.all(e),r={};n.forEach(e=>{e&&(r[e.slug]=e.status)}),t(r)})()},[]);const h=(e,t)=>{let n;n=t?c.includes(e)?c:[...c,e]:c.filter(t=>t!==e),d({type:Kc,payload:n})};return(0,o.jsxs)(Nm,{children:[(0,o.jsx)(Nm.Header,{title:om?.heading||(0,jc.__)("Recommended Essentials","astra-sites"),description:om?.description||(0,jc.__)("These free plugins add essential features to your website and help speed up your workflow. The selected plugins below will be installed on this site.","astra-sites")}),(0,o.jsx)("div",{className:"p-2 bg-background-secondary flex flex-col gap-1 rounded-lg overflow-auto",children:om?.addonList?.map((t,r)=>(0,o.jsx)(im,{addon:t,status:e[t?.slug]||"",isSelected:c.includes(t?.slug),onToggle:h,processing:n===t?.slug},t?.slug||r))}),(0,o.jsxs)("div",{className:"flex justify-between items-center pt-2 gap-4",children:[(0,o.jsx)(ge,{icon:(0,o.jsx)(Df,{}),variant:"outline",onClick:a,disabled:n,children:(0,jc.__)("Back","astra-sites")}),(0,o.jsxs)("div",{className:"flex justify-end items-center gap-3",children:[(0,o.jsx)(ge,{className:"text-text-tertiary",variant:"ghost",onClick:l,disabled:n,children:(0,jc.__)("Skip","astra-sites")}),(0,o.jsx)(ge,{className:au(n&&"cursor-not-allowed"),icon:n?(0,o.jsx)(kf,{size:"sm",variant:"secondary"}):(0,o.jsx)(Bc,{}),iconPosition:"right",onClick:async()=>{if(n)return;const o=c.every(t=>"active"===e[t]);if(0===c.length||o)s();else{r(!0);try{const n=[];for(const o of om?.addonList){const i=o?.slug;if(!c.find(e=>e===i))continue;r(i);const s=e[i];if("active"!==s)try{if(!s){const e=await cu(i);if(!e.success)throw new Error(e.error)}if("inactive"===s||!s){const e=await uu(i);if(!e.success)throw new Error(e.error)}t(e=>({...e,[i]:"active"})),u.includes(i)||n.push(i)}catch(e){f.error((0,jc.__)("Error!","astra-sites"),{description:(0,jc.sprintf)(
// translators: %s is the addon title
// translators: %s is the addon title
(0,jc.__)("Failed to set up %s.","astra-sites"),o.title)})}}n.length>0&&d({type:qc,payload:[...u,...n]}),setTimeout(s,500)}catch(e){f.error((0,jc.__)("Error!","astra-sites"),{description:e.message||(0,jc.__)("Failed to setup addons","astra-sites")})}finally{r(!1)}}},children:n?(0,jc.__)("Setting up…","astra-sites"):(0,jc.__)("Continue","astra-sites")})]})]})]})}},{id:"done",element:()=>{const{state:e}=mu();return(0,i.useEffect)(()=>{(async()=>{try{await hu({...e,starterTemplatesBuilder:""})}catch(e){console.error("Failed to submit onboarding completion:",e)}})()},[]),(0,o.jsxs)(Nm,{children:[(0,o.jsxs)("div",{className:"flex flex-col-reverse md:flex-row gap-2 items-center",children:[(0,o.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,o.jsx)(Nm.Header,{title:cm?.heading||(0,jc.sprintf)(
// translators: %s is the product name
// translators: %s is the product name
(0,jc.__)("You’re Ready to Build with %s!","astra-sites"),sm?.name),description:cm?.description||(0,jc.__)("You're all set to create a website that looks great, loads fast, and reflects your vision, without hassle.","astra-sites")}),(0,o.jsxs)("div",{children:[(0,o.jsx)(Nc,{className:"text-text-primary font-semibold text-sm",children:cm?.itemsHeading||(0,jc.__)("What You Can Do Next:","astra-sites")}),(0,o.jsx)("ul",{className:"divide-y divide-gray-200 list-none pl-0 space-y-2 my-2",children:cm?.items?.map((e,t)=>(0,o.jsxs)("li",{className:"flex items-start space-x-2 text-field-label text-sm font-medium",children:[(0,o.jsx)(Fc,{className:"mt-0.5 size-4 text-brand-primary-600"}),(0,o.jsx)("span",{children:e})]},t))})]})]}),lm&&(0,o.jsx)("img",{className:"mx-5 p-2 w-[8.625rem] h-[8.625rem]",src:lm,alt:(0,jc.__)("Done","astra-sites")})]}),(0,o.jsx)("hr",{className:"my-6 w-full border-b-0 border-x-0 border-t border-solid border-t-border-subtle"}),(0,o.jsxs)("div",{className:"flex items-center justify-between gap-3 pt-2",children:[(0,o.jsxs)("div",{className:"flex gap-3",children:[cm?.cta2&&(0,o.jsx)(ge,{variant:"outline",onClick:()=>{var e;window.location.href=null!==(e=cm?.cta2?.url)&&void 0!==e?e:"#/done"},children:cm?.cta2?.label||"CTA 2"}),cm?.cta3&&(0,o.jsx)(ge,{className:"text-text-tertiary",icon:(0,o.jsx)(Bc,{}),iconPosition:"right",variant:"ghost",onClick:()=>{var e;window.open(null!==(e=cm?.cta3?.url)&&void 0!==e?e:"#/done","_blank")},children:cm?.cta3?.label||"CTA 3"})]}),cm?.cta1&&(0,o.jsx)(ge,{onClick:()=>{var e;window.location.href=null!==(e=cm?.cta1?.url)&&void 0!==e?e:"#/done"},children:cm?.cta1?.label||"CTA 1"})]})]})}}],Rm=()=>{const{state:e,dispatch:t}=mu();return(0,r.useEffect)(()=>{t({type:zc,payload:Cm.map(t=>({...t,skipped:e?.screens?.find(e=>e.id===t.id)?.skipped}))})},[t]),(0,o.jsxs)(kc,{children:[(0,o.jsx)(Tm,{screens:Cm}),(0,o.jsxs)(bc,{children:[Cm.map(e=>(0,o.jsx)(vc,{path:`/${e.id}`,element:(0,o.jsx)(e.element,{})},e.id)),(0,o.jsx)(vc,{path:"/",element:(0,o.jsx)(gc,{to:`/${Cm[0].id}`,replace:!0})})]})]})},Am=({className:e="w-[42rem]",children:t})=>(0,o.jsx)("div",{className:au("box-border mx-auto p-8 mt-10 border-0.5 border-solid border-border-subtle bg-background-primary rounded-xl shadow-sm space-y-4 max-w-[90%]",e),role:"region","aria-labelledby":"screen-title",children:t});Am.Header=({title:e,description:t})=>(0,o.jsxs)("div",{className:"space-y-1",children:[(0,o.jsx)(Nc,{as:"h2",id:"screen-title",size:24,children:e}),(0,o.jsx)(Nc,{as:"p",size:14,color:"secondary",children:t})]});const Nm=Am,Mm=()=>(0,o.jsxs)(fu,{children:[(0,o.jsx)("div",{className:"font-figtree bg-background-secondary min-h-screen",children:(0,o.jsx)(Rm,{})}),(0,o.jsx)(fl,{})]}),Dm=document.querySelector(".one-onboarding");Dm&&(0,r.createRoot)(Dm).render((0,o.jsx)(Mm,{}))}},o={};function i(e){var t=o[e];if(void 0!==t)return t.exports;var n=o[e]={exports:{}};return r[e](n,n.exports,i),n.exports}i.m=r,e=[],i.O=(t,n,r,o)=>{if(!n){var s=1/0;for(u=0;u<e.length;u++){for(var[n,r,o]=e[u],a=!0,l=0;l<n.length;l++)(!1&o||s>=o)&&Object.keys(i.O).every(e=>i.O[e](n[l]))?n.splice(l--,1):(a=!1,o<s&&(s=o));if(a){e.splice(u--,1);var c=r();void 0!==c&&(t=c)}}return t}o=o||0;for(var u=e.length;u>0&&e[u-1][2]>o;u--)e[u]=e[u-1];e[u]=[n,r,o]},i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},n=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,i.t=function(e,r){if(1&r&&(e=this(e)),8&r)return e;if("object"==typeof e&&e){if(4&r&&e.__esModule)return e;if(16&r&&"function"==typeof e.then)return e}var o=Object.create(null);i.r(o);var s={};t=t||[null,n({}),n([]),n(n)];for(var a=2&r&&e;("object"==typeof a||"function"==typeof a)&&!~t.indexOf(a);a=n(a))Object.getOwnPropertyNames(a).forEach(t=>s[t]=()=>e[t]);return s.default=()=>e,i.d(o,s),o},i.d=(e,t)=>{for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e={792:0,85:0};i.O.j=t=>0===e[t];var t=(t,n)=>{var r,o,[s,a,l]=n,c=0;if(s.some(t=>0!==e[t])){for(r in a)i.o(a,r)&&(i.m[r]=a[r]);if(l)var u=l(i)}for(t&&t(n);c<s.length;c++)o=s[c],i.o(e,o)&&e[o]&&e[o][0](),e[o]=0;return i.O(u)},n=globalThis.webpackChunkone_onboarding=globalThis.webpackChunkone_onboarding||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})();var s=i.O(void 0,[85],()=>i(880));s=i.O(s)})();