sigurd-startup 3.4.0 → 4.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -38786,13 +38786,13 @@ const jAA = () => {
38786
38786
  D.masterMuted
38787
38787
  ]);
38788
38788
  }, pH = {
38789
- major: 3,
38790
- minor: 4,
38789
+ major: 4,
38790
+ minor: 0,
38791
38791
  patch: 0,
38792
38792
  build: 0,
38793
- timestamp: 1777501648330,
38794
- hash: "UNAJIG",
38795
- full: "3.4.0"
38793
+ timestamp: 1777502341541,
38794
+ hash: "OPLAC5",
38795
+ full: "4.0.0"
38796
38796
  }, yC = pH.full, jf = () => ({
38797
38797
  version: yC,
38798
38798
  major: pH.major,
@@ -352,4 +352,4 @@ You might need to use a local HTTP server (instead of file://): https://reactjs.
352
352
  *
353
353
  * This source code is licensed under the ISC license.
354
354
  * See the LICENSE file in the root directory of this source tree.
355
- */const da=$7("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),ma=()=>{const{gameStateManager:v}=xA.getState(),{balance:D,hasBridge:g,insufficientFunds:r}=_I(),[n,P]=W.useState(!1),o=async()=>{if(!n){if(g){P(!0);const k=await Uw(1);if(P(!1),!k.success){_I.getState().setInsufficientFunds(!0);return}}v?.startNewGame()}},T=()=>{v?.openSettings()},z=()=>{v?.openControls()},c=()=>{v?.openTutorialSelect?.()};return G.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[G.jsxs("div",{className:"text-center mb-8",children:[G.jsx("h1",{className:"text-4xl font-pixel text-foreground tracking-wide mb-2",children:"SIGURD STARTUP"}),G.jsx("p",{className:"text-sm text-[var(--foreground-dim)]",children:"Samle så mye finansiering som mulig!"}),g&&D!==null&&G.jsxs("div",{className:"mt-3 flex items-center justify-center gap-2 text-sm font-mono",children:[G.jsx(Va,{size:16,className:"text-primary"}),G.jsxs("span",{className:"text-foreground",children:[D," ",D===1?"mynt":"mynter"]})]})]}),G.jsxs("div",{className:"space-y-3 w-[70%]",children:[r&&g?G.jsxs("div",{className:"text-center py-3 px-4 bg-[var(--accent-red)]/10 border border-[var(--accent-red)]/30 rounded-sm",children:[G.jsx("p",{className:"text-[var(--accent-red)] font-pixel text-sm",children:"IKKE NOK MYNTER"}),G.jsx("p",{className:"text-[var(--foreground-dim)] text-xs font-mono mt-1",children:"Kjøp flere mynter for å spille"})]}):G.jsxs($8,{onClick:o,disabled:n||g&&r,className:`w-full uppercase text-lg ${n?"opacity-70":""}`,children:[G.jsx(jw,{size:20}),n?"Venter...":g?"Spill (1 mynt)":"Press Start"]}),G.jsxs($8,{onClick:T,variant:"secondary",className:"w-full uppercase",children:[G.jsx(Kz,{size:20}),"Innstillinger"]}),G.jsxs($8,{onClick:z,variant:"secondary",className:"w-full uppercase",children:[G.jsx(xa,{size:20}),"Kontroller"]}),G.jsxs($8,{onClick:c,variant:"secondary",className:"w-full uppercase",children:[G.jsx(tz,{size:20}),"Sandkassa"]})]})]})},qa=()=>{const[v,D]=W.useState(3),{currentMap:g}=c8();return W.useEffect(()=>{{const r=setInterval(()=>{D(n=>n>1?n-1:0)},1e3);return()=>clearInterval(r)}},[]),v===0?null:G.jsxs("div",{className:"text-center",children:[G.jsx("div",{className:"text-8xl font-pixel text-primary",style:{textShadow:"0 0 24px rgba(171,221,100,.4)"},children:v}),G.jsxs("div",{className:"flex items-center justify-center gap-2 mt-2",children:[G.jsx("div",{className:"w-1.5 h-1.5 bg-primary rounded-full animate-pulse"}),G.jsx("p",{className:"text-xl text-foreground uppercase font-pixel tracking-wider",children:g?.name}),G.jsx("div",{className:"w-1.5 h-1.5 bg-primary rounded-full animate-pulse"})]})]})};function Wa(v,D=.12){const[g,r]=W.useState(v),n=W.useRef(0),P=W.useRef(v);return W.useEffect(()=>{let o=!0;const T=()=>{if(!o)return;const z=v-P.current;if(Math.abs(z)<1){P.current=v,r(v);return}P.current+=z*D,r(Math.round(P.current)),n.current=requestAnimationFrame(T)};return n.current=requestAnimationFrame(T),()=>{o=!1,cancelAnimationFrame(n.current)}},[v,D]),g}const Za=()=>{const v=xA(n=>n.tutorialMission),{gameStateManager:D}=xA.getState();if(!v)return null;const g=fH[v],r=rH.indexOf(v);return G.jsxs("div",{className:"flex items-center gap-3 w-full",children:[G.jsxs("div",{className:"text-xs font-mono text-[var(--foreground-dim)] uppercase tracking-wide whitespace-nowrap",children:["Oppdrag ",G.jsx("span",{className:"text-foreground font-pixel",children:r+1})]}),G.jsx("div",{className:"w-px h-5 bg-[var(--surface-line)] shrink-0"}),G.jsx("div",{className:"font-pixel text-sm text-foreground tracking-wider truncate",children:g.title}),G.jsx("button",{onClick:()=>D?.skipTutorialMission?.(),className:"ml-auto text-xs font-mono text-[var(--foreground-dim)] underline underline-offset-2 hover:text-primary cursor-pointer whitespace-nowrap",children:"Hopp over"})]})};function r3(v,D,{checkForDefaultPrevented:g=!0}={}){return function(n){if(v?.(n),g===!1||!n.defaultPrevented)return D?.(n)}}function iz(v,D=[]){let g=[];function r(P,o){const T=W.createContext(o),z=g.length;g=[...g,o];const c=Y=>{const{scope:e,children:J,...i}=Y,R=e?.[v]?.[z]||T,q=W.useMemo(()=>i,Object.values(i));return G.jsx(R.Provider,{value:q,children:J})};c.displayName=P+"Provider";function k(Y,e){const J=e?.[v]?.[z]||T,i=W.useContext(J);if(i)return i;if(o!==void 0)return o;throw new Error(`\`${Y}\` must be used within \`${P}\``)}return[c,k]}const n=()=>{const P=g.map(o=>W.createContext(o));return function(T){const z=T?.[v]||P;return W.useMemo(()=>({[`__scope${v}`]:{...T,[v]:z}}),[T,z])}};return n.scopeName=v,[r,_a(n,...D)]}function _a(...v){const D=v[0];if(v.length===1)return D;const g=()=>{const r=v.map(n=>({useScope:n(),scopeName:n.scopeName}));return function(P){const o=r.reduce((T,{useScope:z,scopeName:c})=>{const Y=z(P)[`__scope${c}`];return{...T,...Y}},{});return W.useMemo(()=>({[`__scope${D.scopeName}`]:o}),[o])}};return g.scopeName=D.scopeName,g}var $a=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],sB=$a.reduce((v,D)=>{const g=fz(`Primitive.${D}`),r=W.forwardRef((n,P)=>{const{asChild:o,...T}=n,z=o?g:D;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),G.jsx(z,{...T,ref:P})});return r.displayName=`Primitive.${D}`,{...v,[D]:r}},{});function A1(v,D){v&&ow.flushSync(()=>v.dispatchEvent(D))}function bw(v){const D=W.useRef(v);return W.useEffect(()=>{D.current=v}),W.useMemo(()=>(...g)=>D.current?.(...g),[])}function E1(v,D=globalThis?.document){const g=bw(v);W.useEffect(()=>{const r=n=>{n.key==="Escape"&&g(n)};return D.addEventListener("keydown",r,{capture:!0}),()=>D.removeEventListener("keydown",r,{capture:!0})},[g,D])}var D1="DismissableLayer",HP="dismissableLayer.update",I1="dismissableLayer.pointerDownOutside",H1="dismissableLayer.focusOutside",az,lz=W.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),uz=W.forwardRef((v,D)=>{const{disableOutsidePointerEvents:g=!1,onEscapeKeyDown:r,onPointerDownOutside:n,onFocusOutside:P,onInteractOutside:o,onDismiss:T,...z}=v,c=W.useContext(lz),[k,Y]=W.useState(null),e=k?.ownerDocument??globalThis?.document,[,J]=W.useState({}),i=Lg(D,sA=>Y(sA)),R=Array.from(c.layers),[q]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),fA=R.indexOf(q),gA=k?R.indexOf(k):-1,QA=c.layersWithOutsidePointerEventsDisabled.size>0,oA=gA>=fA,BA=Q1(sA=>{const LA=sA.target,JA=[...c.branches].some(iA=>iA.contains(LA));!oA||JA||(n?.(sA),o?.(sA),sA.defaultPrevented||T?.())},e),cA=v1(sA=>{const LA=sA.target;[...c.branches].some(iA=>iA.contains(LA))||(P?.(sA),o?.(sA),sA.defaultPrevented||T?.())},e);return E1(sA=>{gA===c.layers.size-1&&(r?.(sA),!sA.defaultPrevented&&T&&(sA.preventDefault(),T()))},e),W.useEffect(()=>{if(k)return g&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(az=e.body.style.pointerEvents,e.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(k)),c.layers.add(k),Vz(),()=>{g&&c.layersWithOutsidePointerEventsDisabled.size===1&&(e.body.style.pointerEvents=az)}},[k,e,g,c]),W.useEffect(()=>()=>{k&&(c.layers.delete(k),c.layersWithOutsidePointerEventsDisabled.delete(k),Vz())},[k,c]),W.useEffect(()=>{const sA=()=>J({});return document.addEventListener(HP,sA),()=>document.removeEventListener(HP,sA)},[]),G.jsx(sB.div,{...z,ref:i,style:{pointerEvents:QA?oA?"auto":"none":void 0,...v.style},onFocusCapture:r3(v.onFocusCapture,cA.onFocusCapture),onBlurCapture:r3(v.onBlurCapture,cA.onBlurCapture),onPointerDownCapture:r3(v.onPointerDownCapture,BA.onPointerDownCapture)})});uz.displayName=D1;var B1="DismissableLayerBranch",g1=W.forwardRef((v,D)=>{const g=W.useContext(lz),r=W.useRef(null),n=Lg(D,r);return W.useEffect(()=>{const P=r.current;if(P)return g.branches.add(P),()=>{g.branches.delete(P)}},[g.branches]),G.jsx(sB.div,{...v,ref:n})});g1.displayName=B1;function Q1(v,D=globalThis?.document){const g=bw(v),r=W.useRef(!1),n=W.useRef(()=>{});return W.useEffect(()=>{const P=T=>{if(T.target&&!r.current){let z=function(){Rz(I1,g,c,{discrete:!0})};const c={originalEvent:T};T.pointerType==="touch"?(D.removeEventListener("click",n.current),n.current=z,D.addEventListener("click",n.current,{once:!0})):z()}else D.removeEventListener("click",n.current);r.current=!1},o=window.setTimeout(()=>{D.addEventListener("pointerdown",P)},0);return()=>{window.clearTimeout(o),D.removeEventListener("pointerdown",P),D.removeEventListener("click",n.current)}},[D,g]),{onPointerDownCapture:()=>r.current=!0}}function v1(v,D=globalThis?.document){const g=bw(v),r=W.useRef(!1);return W.useEffect(()=>{const n=P=>{P.target&&!r.current&&Rz(H1,g,{originalEvent:P},{discrete:!1})};return D.addEventListener("focusin",n),()=>D.removeEventListener("focusin",n)},[D,g]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Vz(){const v=new CustomEvent(HP);document.dispatchEvent(v)}function Rz(v,D,g,{discrete:r}){const n=g.originalEvent.target,P=new CustomEvent(v,{bubbles:!1,cancelable:!0,detail:g});D&&n.addEventListener(v,D,{once:!0}),r?A1(n,P):n.dispatchEvent(P)}var oB=globalThis?.document?W.useLayoutEffect:()=>{},f1=I0[" useId ".trim().toString()]||(()=>{}),r1=0;function w1(v){const[D,g]=W.useState(f1());return oB(()=>{g(r=>r??String(r1++))},[v]),D?`radix-${D}`:""}const n1=["top","right","bottom","left"],PB=Math.min,XI=Math.max,Yw=Math.round,Gw=Math.floor,sH=v=>({x:v,y:v}),s1={left:"right",right:"left",bottom:"top",top:"bottom"},o1={start:"end",end:"start"};function BP(v,D,g){return XI(v,PB(D,g))}function w3(v,D){return typeof v=="function"?v(D):v}function n3(v){return v.split("-")[0]}function dQ(v){return v.split("-")[1]}function gP(v){return v==="x"?"y":"x"}function QP(v){return v==="y"?"height":"width"}const P1=new Set(["top","bottom"]);function oH(v){return P1.has(n3(v))?"y":"x"}function vP(v){return gP(oH(v))}function L1(v,D,g){g===void 0&&(g=!1);const r=dQ(v),n=vP(v),P=QP(n);let o=n==="x"?r===(g?"end":"start")?"right":"left":r==="start"?"bottom":"top";return D.reference[P]>D.floating[P]&&(o=Xw(o)),[o,Xw(o)]}function M1(v){const D=Xw(v);return[fP(v),D,fP(D)]}function fP(v){return v.replace(/start|end/g,D=>o1[D])}const yz=["left","right"],xz=["right","left"],C1=["top","bottom"],z1=["bottom","top"];function c1(v,D,g){switch(v){case"top":case"bottom":return g?D?xz:yz:D?yz:xz;case"left":case"right":return D?C1:z1;default:return[]}}function U1(v,D,g,r){const n=dQ(v);let P=c1(n3(v),g==="start",r);return n&&(P=P.map(o=>o+"-"+n),D&&(P=P.concat(P.map(fP)))),P}function Xw(v){return v.replace(/left|right|bottom|top/g,D=>s1[D])}function T1(v){return{top:0,right:0,bottom:0,left:0,...v}}function hz(v){return typeof v!="number"?T1(v):{top:v,right:v,bottom:v,left:v}}function Jw(v){const{x:D,y:g,width:r,height:n}=v;return{width:r,height:n,top:g,left:D,right:D+r,bottom:g+n,x:D,y:g}}function Sz(v,D,g){let{reference:r,floating:n}=v;const P=oH(D),o=vP(D),T=QP(o),z=n3(D),c=P==="y",k=r.x+r.width/2-n.width/2,Y=r.y+r.height/2-n.height/2,e=r[T]/2-n[T]/2;let J;switch(z){case"top":J={x:k,y:r.y-n.height};break;case"bottom":J={x:k,y:r.y+r.height};break;case"right":J={x:r.x+r.width,y:Y};break;case"left":J={x:r.x-n.width,y:Y};break;default:J={x:r.x,y:r.y}}switch(dQ(D)){case"start":J[o]-=e*(g&&c?-1:1);break;case"end":J[o]+=e*(g&&c?-1:1);break}return J}const F1=async(v,D,g)=>{const{placement:r="bottom",strategy:n="absolute",middleware:P=[],platform:o}=g,T=P.filter(Boolean),z=await(o.isRTL==null?void 0:o.isRTL(D));let c=await o.getElementRects({reference:v,floating:D,strategy:n}),{x:k,y:Y}=Sz(c,r,z),e=r,J={},i=0;for(let R=0;R<T.length;R++){const{name:q,fn:fA}=T[R],{x:gA,y:QA,data:oA,reset:BA}=await fA({x:k,y:Y,initialPlacement:r,placement:e,strategy:n,middlewareData:J,rects:c,platform:o,elements:{reference:v,floating:D}});k=gA??k,Y=QA??Y,J={...J,[q]:{...J[q],...oA}},BA&&i<=50&&(i++,typeof BA=="object"&&(BA.placement&&(e=BA.placement),BA.rects&&(c=BA.rects===!0?await o.getElementRects({reference:v,floating:D,strategy:n}):BA.rects),{x:k,y:Y}=Sz(c,e,z)),R=-1)}return{x:k,y:Y,placement:e,strategy:n,middlewareData:J}};async function D9(v,D){var g;D===void 0&&(D={});const{x:r,y:n,platform:P,rects:o,elements:T,strategy:z}=v,{boundary:c="clippingAncestors",rootBoundary:k="viewport",elementContext:Y="floating",altBoundary:e=!1,padding:J=0}=w3(D,v),i=hz(J),q=T[e?Y==="floating"?"reference":"floating":Y],fA=Jw(await P.getClippingRect({element:(g=await(P.isElement==null?void 0:P.isElement(q)))==null||g?q:q.contextElement||await(P.getDocumentElement==null?void 0:P.getDocumentElement(T.floating)),boundary:c,rootBoundary:k,strategy:z})),gA=Y==="floating"?{x:r,y:n,width:o.floating.width,height:o.floating.height}:o.reference,QA=await(P.getOffsetParent==null?void 0:P.getOffsetParent(T.floating)),oA=await(P.isElement==null?void 0:P.isElement(QA))?await(P.getScale==null?void 0:P.getScale(QA))||{x:1,y:1}:{x:1,y:1},BA=Jw(P.convertOffsetParentRelativeRectToViewportRelativeRect?await P.convertOffsetParentRelativeRectToViewportRelativeRect({elements:T,rect:gA,offsetParent:QA,strategy:z}):gA);return{top:(fA.top-BA.top+i.top)/oA.y,bottom:(BA.bottom-fA.bottom+i.bottom)/oA.y,left:(fA.left-BA.left+i.left)/oA.x,right:(BA.right-fA.right+i.right)/oA.x}}const k1=v=>({name:"arrow",options:v,async fn(D){const{x:g,y:r,placement:n,rects:P,platform:o,elements:T,middlewareData:z}=D,{element:c,padding:k=0}=w3(v,D)||{};if(c==null)return{};const Y=hz(k),e={x:g,y:r},J=vP(n),i=QP(J),R=await o.getDimensions(c),q=J==="y",fA=q?"top":"left",gA=q?"bottom":"right",QA=q?"clientHeight":"clientWidth",oA=P.reference[i]+P.reference[J]-e[J]-P.floating[i],BA=e[J]-P.reference[J],cA=await(o.getOffsetParent==null?void 0:o.getOffsetParent(c));let sA=cA?cA[QA]:0;(!sA||!await(o.isElement==null?void 0:o.isElement(cA)))&&(sA=T.floating[QA]||P.floating[i]);const LA=oA/2-BA/2,JA=sA/2-R[i]/2-1,iA=PB(Y[fA],JA),OA=PB(Y[gA],JA),eA=iA,XA=sA-R[i]-OA,WA=sA/2-R[i]/2+LA,HE=BP(eA,WA,XA),hA=!z.arrow&&dQ(n)!=null&&WA!==HE&&P.reference[i]/2-(WA<eA?iA:OA)-R[i]/2<0,UA=hA?WA<eA?WA-eA:WA-XA:0;return{[J]:e[J]+UA,data:{[J]:HE,centerOffset:WA-HE-UA,...hA&&{alignmentOffset:UA}},reset:hA}}}),j1=function(v){return v===void 0&&(v={}),{name:"flip",options:v,async fn(D){var g,r;const{placement:n,middlewareData:P,rects:o,initialPlacement:T,platform:z,elements:c}=D,{mainAxis:k=!0,crossAxis:Y=!0,fallbackPlacements:e,fallbackStrategy:J="bestFit",fallbackAxisSideDirection:i="none",flipAlignment:R=!0,...q}=w3(v,D);if((g=P.arrow)!=null&&g.alignmentOffset)return{};const fA=n3(n),gA=oH(T),QA=n3(T)===T,oA=await(z.isRTL==null?void 0:z.isRTL(c.floating)),BA=e||(QA||!R?[Xw(T)]:M1(T)),cA=i!=="none";!e&&cA&&BA.push(...U1(T,R,i,oA));const sA=[T,...BA],LA=await D9(D,q),JA=[];let iA=((r=P.flip)==null?void 0:r.overflows)||[];if(k&&JA.push(LA[fA]),Y){const WA=L1(n,o,oA);JA.push(LA[WA[0]],LA[WA[1]])}if(iA=[...iA,{placement:n,overflows:JA}],!JA.every(WA=>WA<=0)){var OA,eA;const WA=(((OA=P.flip)==null?void 0:OA.index)||0)+1,HE=sA[WA];if(HE&&(!(Y==="alignment"?gA!==oH(HE):!1)||iA.every(m=>oH(m.placement)===gA?m.overflows[0]>0:!0)))return{data:{index:WA,overflows:iA},reset:{placement:HE}};let hA=(eA=iA.filter(UA=>UA.overflows[0]<=0).sort((UA,m)=>UA.overflows[1]-m.overflows[1])[0])==null?void 0:eA.placement;if(!hA)switch(J){case"bestFit":{var XA;const UA=(XA=iA.filter(m=>{if(cA){const tA=oH(m.placement);return tA===gA||tA==="y"}return!0}).map(m=>[m.placement,m.overflows.filter(tA=>tA>0).reduce((tA,bA)=>tA+bA,0)]).sort((m,tA)=>m[1]-tA[1])[0])==null?void 0:XA[0];UA&&(hA=UA);break}case"initialPlacement":hA=T;break}if(n!==hA)return{reset:{placement:hA}}}return{}}}};function Oz(v,D){return{top:v.top-D.height,right:v.right-D.width,bottom:v.bottom-D.height,left:v.left-D.width}}function Nz(v){return n1.some(D=>v[D]>=0)}const b1=function(v){return v===void 0&&(v={}),{name:"hide",options:v,async fn(D){const{rects:g}=D,{strategy:r="referenceHidden",...n}=w3(v,D);switch(r){case"referenceHidden":{const P=await D9(D,{...n,elementContext:"reference"}),o=Oz(P,g.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:Nz(o)}}}case"escaped":{const P=await D9(D,{...n,altBoundary:!0}),o=Oz(P,g.floating);return{data:{escapedOffsets:o,escaped:Nz(o)}}}default:return{}}}}},pz=new Set(["left","top"]);async function Y1(v,D){const{placement:g,platform:r,elements:n}=v,P=await(r.isRTL==null?void 0:r.isRTL(n.floating)),o=n3(g),T=dQ(g),z=oH(g)==="y",c=pz.has(o)?-1:1,k=P&&z?-1:1,Y=w3(D,v);let{mainAxis:e,crossAxis:J,alignmentAxis:i}=typeof Y=="number"?{mainAxis:Y,crossAxis:0,alignmentAxis:null}:{mainAxis:Y.mainAxis||0,crossAxis:Y.crossAxis||0,alignmentAxis:Y.alignmentAxis};return T&&typeof i=="number"&&(J=T==="end"?i*-1:i),z?{x:J*k,y:e*c}:{x:e*c,y:J*k}}const G1=function(v){return v===void 0&&(v=0),{name:"offset",options:v,async fn(D){var g,r;const{x:n,y:P,placement:o,middlewareData:T}=D,z=await Y1(D,v);return o===((g=T.offset)==null?void 0:g.placement)&&(r=T.arrow)!=null&&r.alignmentOffset?{}:{x:n+z.x,y:P+z.y,data:{...z,placement:o}}}}},X1=function(v){return v===void 0&&(v={}),{name:"shift",options:v,async fn(D){const{x:g,y:r,placement:n}=D,{mainAxis:P=!0,crossAxis:o=!1,limiter:T={fn:q=>{let{x:fA,y:gA}=q;return{x:fA,y:gA}}},...z}=w3(v,D),c={x:g,y:r},k=await D9(D,z),Y=oH(n3(n)),e=gP(Y);let J=c[e],i=c[Y];if(P){const q=e==="y"?"top":"left",fA=e==="y"?"bottom":"right",gA=J+k[q],QA=J-k[fA];J=BP(gA,J,QA)}if(o){const q=Y==="y"?"top":"left",fA=Y==="y"?"bottom":"right",gA=i+k[q],QA=i-k[fA];i=BP(gA,i,QA)}const R=T.fn({...D,[e]:J,[Y]:i});return{...R,data:{x:R.x-g,y:R.y-r,enabled:{[e]:P,[Y]:o}}}}}},J1=function(v){return v===void 0&&(v={}),{options:v,fn(D){const{x:g,y:r,placement:n,rects:P,middlewareData:o}=D,{offset:T=0,mainAxis:z=!0,crossAxis:c=!0}=w3(v,D),k={x:g,y:r},Y=oH(n),e=gP(Y);let J=k[e],i=k[Y];const R=w3(T,D),q=typeof R=="number"?{mainAxis:R,crossAxis:0}:{mainAxis:0,crossAxis:0,...R};if(z){const QA=e==="y"?"height":"width",oA=P.reference[e]-P.floating[QA]+q.mainAxis,BA=P.reference[e]+P.reference[QA]-q.mainAxis;J<oA?J=oA:J>BA&&(J=BA)}if(c){var fA,gA;const QA=e==="y"?"width":"height",oA=pz.has(n3(n)),BA=P.reference[Y]-P.floating[QA]+(oA&&((fA=o.offset)==null?void 0:fA[Y])||0)+(oA?0:q.crossAxis),cA=P.reference[Y]+P.reference[QA]+(oA?0:((gA=o.offset)==null?void 0:gA[Y])||0)-(oA?q.crossAxis:0);i<BA?i=BA:i>cA&&(i=cA)}return{[e]:J,[Y]:i}}}},e1=function(v){return v===void 0&&(v={}),{name:"size",options:v,async fn(D){var g,r;const{placement:n,rects:P,platform:o,elements:T}=D,{apply:z=()=>{},...c}=w3(v,D),k=await D9(D,c),Y=n3(n),e=dQ(n),J=oH(n)==="y",{width:i,height:R}=P.floating;let q,fA;Y==="top"||Y==="bottom"?(q=Y,fA=e===(await(o.isRTL==null?void 0:o.isRTL(T.floating))?"start":"end")?"left":"right"):(fA=Y,q=e==="end"?"top":"bottom");const gA=R-k.top-k.bottom,QA=i-k.left-k.right,oA=PB(R-k[q],gA),BA=PB(i-k[fA],QA),cA=!D.middlewareData.shift;let sA=oA,LA=BA;if((g=D.middlewareData.shift)!=null&&g.enabled.x&&(LA=QA),(r=D.middlewareData.shift)!=null&&r.enabled.y&&(sA=gA),cA&&!e){const iA=XI(k.left,0),OA=XI(k.right,0),eA=XI(k.top,0),XA=XI(k.bottom,0);J?LA=i-2*(iA!==0||OA!==0?iA+OA:XI(k.left,k.right)):sA=R-2*(eA!==0||XA!==0?eA+XA:XI(k.top,k.bottom))}await z({...D,availableWidth:LA,availableHeight:sA});const JA=await o.getDimensions(T.floating);return i!==JA.width||R!==JA.height?{reset:{rects:!0}}:{}}}};function ew(){return typeof window<"u"}function mQ(v){return dz(v)?(v.nodeName||"").toLowerCase():"#document"}function JI(v){var D;return(v==null||(D=v.ownerDocument)==null?void 0:D.defaultView)||window}function PH(v){var D;return(D=(dz(v)?v.ownerDocument:v.document)||window.document)==null?void 0:D.documentElement}function dz(v){return ew()?v instanceof Node||v instanceof JI(v).Node:!1}function e4(v){return ew()?v instanceof Element||v instanceof JI(v).Element:!1}function LH(v){return ew()?v instanceof HTMLElement||v instanceof JI(v).HTMLElement:!1}function mz(v){return!ew()||typeof ShadowRoot>"u"?!1:v instanceof ShadowRoot||v instanceof JI(v).ShadowRoot}const t1=new Set(["inline","contents"]);function I9(v){const{overflow:D,overflowX:g,overflowY:r,display:n}=t4(v);return/auto|scroll|overlay|hidden|clip/.test(D+r+g)&&!t1.has(n)}const K1=new Set(["table","td","th"]);function i1(v){return K1.has(mQ(v))}const a1=[":popover-open",":modal"];function tw(v){return a1.some(D=>{try{return v.matches(D)}catch{return!1}})}const l1=["transform","translate","scale","rotate","perspective"],u1=["transform","translate","scale","rotate","perspective","filter"],V1=["paint","layout","strict","content"];function rP(v){const D=wP(),g=e4(v)?t4(v):v;return l1.some(r=>g[r]?g[r]!=="none":!1)||(g.containerType?g.containerType!=="normal":!1)||!D&&(g.backdropFilter?g.backdropFilter!=="none":!1)||!D&&(g.filter?g.filter!=="none":!1)||u1.some(r=>(g.willChange||"").includes(r))||V1.some(r=>(g.contain||"").includes(r))}function R1(v){let D=LB(v);for(;LH(D)&&!qQ(D);){if(rP(D))return D;if(tw(D))return null;D=LB(D)}return null}function wP(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const y1=new Set(["html","body","#document"]);function qQ(v){return y1.has(mQ(v))}function t4(v){return JI(v).getComputedStyle(v)}function Kw(v){return e4(v)?{scrollLeft:v.scrollLeft,scrollTop:v.scrollTop}:{scrollLeft:v.scrollX,scrollTop:v.scrollY}}function LB(v){if(mQ(v)==="html")return v;const D=v.assignedSlot||v.parentNode||mz(v)&&v.host||PH(v);return mz(D)?D.host:D}function qz(v){const D=LB(v);return qQ(D)?v.ownerDocument?v.ownerDocument.body:v.body:LH(D)&&I9(D)?D:qz(D)}function H9(v,D,g){var r;D===void 0&&(D=[]),g===void 0&&(g=!0);const n=qz(v),P=n===((r=v.ownerDocument)==null?void 0:r.body),o=JI(n);if(P){const T=nP(o);return D.concat(o,o.visualViewport||[],I9(n)?n:[],T&&g?H9(T):[])}return D.concat(n,H9(n,[],g))}function nP(v){return v.parent&&Object.getPrototypeOf(v.parent)?v.frameElement:null}function Wz(v){const D=t4(v);let g=parseFloat(D.width)||0,r=parseFloat(D.height)||0;const n=LH(v),P=n?v.offsetWidth:g,o=n?v.offsetHeight:r,T=Yw(g)!==P||Yw(r)!==o;return T&&(g=P,r=o),{width:g,height:r,$:T}}function sP(v){return e4(v)?v:v.contextElement}function WQ(v){const D=sP(v);if(!LH(D))return sH(1);const g=D.getBoundingClientRect(),{width:r,height:n,$:P}=Wz(D);let o=(P?Yw(g.width):g.width)/r,T=(P?Yw(g.height):g.height)/n;return(!o||!Number.isFinite(o))&&(o=1),(!T||!Number.isFinite(T))&&(T=1),{x:o,y:T}}const x1=sH(0);function Zz(v){const D=JI(v);return!wP()||!D.visualViewport?x1:{x:D.visualViewport.offsetLeft,y:D.visualViewport.offsetTop}}function h1(v,D,g){return D===void 0&&(D=!1),!g||D&&g!==JI(v)?!1:D}function Cg(v,D,g,r){D===void 0&&(D=!1),g===void 0&&(g=!1);const n=v.getBoundingClientRect(),P=sP(v);let o=sH(1);D&&(r?e4(r)&&(o=WQ(r)):o=WQ(v));const T=h1(P,g,r)?Zz(P):sH(0);let z=(n.left+T.x)/o.x,c=(n.top+T.y)/o.y,k=n.width/o.x,Y=n.height/o.y;if(P){const e=JI(P),J=r&&e4(r)?JI(r):r;let i=e,R=nP(i);for(;R&&r&&J!==i;){const q=WQ(R),fA=R.getBoundingClientRect(),gA=t4(R),QA=fA.left+(R.clientLeft+parseFloat(gA.paddingLeft))*q.x,oA=fA.top+(R.clientTop+parseFloat(gA.paddingTop))*q.y;z*=q.x,c*=q.y,k*=q.x,Y*=q.y,z+=QA,c+=oA,i=JI(R),R=nP(i)}}return Jw({width:k,height:Y,x:z,y:c})}function oP(v,D){const g=Kw(v).scrollLeft;return D?D.left+g:Cg(PH(v)).left+g}function _z(v,D,g){g===void 0&&(g=!1);const r=v.getBoundingClientRect(),n=r.left+D.scrollLeft-(g?0:oP(v,r)),P=r.top+D.scrollTop;return{x:n,y:P}}function S1(v){let{elements:D,rect:g,offsetParent:r,strategy:n}=v;const P=n==="fixed",o=PH(r),T=D?tw(D.floating):!1;if(r===o||T&&P)return g;let z={scrollLeft:0,scrollTop:0},c=sH(1);const k=sH(0),Y=LH(r);if((Y||!Y&&!P)&&((mQ(r)!=="body"||I9(o))&&(z=Kw(r)),LH(r))){const J=Cg(r);c=WQ(r),k.x=J.x+r.clientLeft,k.y=J.y+r.clientTop}const e=o&&!Y&&!P?_z(o,z,!0):sH(0);return{width:g.width*c.x,height:g.height*c.y,x:g.x*c.x-z.scrollLeft*c.x+k.x+e.x,y:g.y*c.y-z.scrollTop*c.y+k.y+e.y}}function O1(v){return Array.from(v.getClientRects())}function N1(v){const D=PH(v),g=Kw(v),r=v.ownerDocument.body,n=XI(D.scrollWidth,D.clientWidth,r.scrollWidth,r.clientWidth),P=XI(D.scrollHeight,D.clientHeight,r.scrollHeight,r.clientHeight);let o=-g.scrollLeft+oP(v);const T=-g.scrollTop;return t4(r).direction==="rtl"&&(o+=XI(D.clientWidth,r.clientWidth)-n),{width:n,height:P,x:o,y:T}}function p1(v,D){const g=JI(v),r=PH(v),n=g.visualViewport;let P=r.clientWidth,o=r.clientHeight,T=0,z=0;if(n){P=n.width,o=n.height;const c=wP();(!c||c&&D==="fixed")&&(T=n.offsetLeft,z=n.offsetTop)}return{width:P,height:o,x:T,y:z}}const d1=new Set(["absolute","fixed"]);function m1(v,D){const g=Cg(v,!0,D==="fixed"),r=g.top+v.clientTop,n=g.left+v.clientLeft,P=LH(v)?WQ(v):sH(1),o=v.clientWidth*P.x,T=v.clientHeight*P.y,z=n*P.x,c=r*P.y;return{width:o,height:T,x:z,y:c}}function $z(v,D,g){let r;if(D==="viewport")r=p1(v,g);else if(D==="document")r=N1(PH(v));else if(e4(D))r=m1(D,g);else{const n=Zz(v);r={x:D.x-n.x,y:D.y-n.y,width:D.width,height:D.height}}return Jw(r)}function Ac(v,D){const g=LB(v);return g===D||!e4(g)||qQ(g)?!1:t4(g).position==="fixed"||Ac(g,D)}function q1(v,D){const g=D.get(v);if(g)return g;let r=H9(v,[],!1).filter(T=>e4(T)&&mQ(T)!=="body"),n=null;const P=t4(v).position==="fixed";let o=P?LB(v):v;for(;e4(o)&&!qQ(o);){const T=t4(o),z=rP(o);!z&&T.position==="fixed"&&(n=null),(P?!z&&!n:!z&&T.position==="static"&&!!n&&d1.has(n.position)||I9(o)&&!z&&Ac(v,o))?r=r.filter(k=>k!==o):n=T,o=LB(o)}return D.set(v,r),r}function W1(v){let{element:D,boundary:g,rootBoundary:r,strategy:n}=v;const o=[...g==="clippingAncestors"?tw(D)?[]:q1(D,this._c):[].concat(g),r],T=o[0],z=o.reduce((c,k)=>{const Y=$z(D,k,n);return c.top=XI(Y.top,c.top),c.right=PB(Y.right,c.right),c.bottom=PB(Y.bottom,c.bottom),c.left=XI(Y.left,c.left),c},$z(D,T,n));return{width:z.right-z.left,height:z.bottom-z.top,x:z.left,y:z.top}}function Z1(v){const{width:D,height:g}=Wz(v);return{width:D,height:g}}function _1(v,D,g){const r=LH(D),n=PH(D),P=g==="fixed",o=Cg(v,!0,P,D);let T={scrollLeft:0,scrollTop:0};const z=sH(0);function c(){z.x=oP(n)}if(r||!r&&!P)if((mQ(D)!=="body"||I9(n))&&(T=Kw(D)),r){const J=Cg(D,!0,P,D);z.x=J.x+D.clientLeft,z.y=J.y+D.clientTop}else n&&c();P&&!r&&n&&c();const k=n&&!r&&!P?_z(n,T):sH(0),Y=o.left+T.scrollLeft-z.x-k.x,e=o.top+T.scrollTop-z.y-k.y;return{x:Y,y:e,width:o.width,height:o.height}}function PP(v){return t4(v).position==="static"}function Ec(v,D){if(!LH(v)||t4(v).position==="fixed")return null;if(D)return D(v);let g=v.offsetParent;return PH(v)===g&&(g=g.ownerDocument.body),g}function Dc(v,D){const g=JI(v);if(tw(v))return g;if(!LH(v)){let n=LB(v);for(;n&&!qQ(n);){if(e4(n)&&!PP(n))return n;n=LB(n)}return g}let r=Ec(v,D);for(;r&&i1(r)&&PP(r);)r=Ec(r,D);return r&&qQ(r)&&PP(r)&&!rP(r)?g:r||R1(v)||g}const $1=async function(v){const D=this.getOffsetParent||Dc,g=this.getDimensions,r=await g(v.floating);return{reference:_1(v.reference,await D(v.floating),v.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Al(v){return t4(v).direction==="rtl"}const El={convertOffsetParentRelativeRectToViewportRelativeRect:S1,getDocumentElement:PH,getClippingRect:W1,getOffsetParent:Dc,getElementRects:$1,getClientRects:O1,getDimensions:Z1,getScale:WQ,isElement:e4,isRTL:Al};function Ic(v,D){return v.x===D.x&&v.y===D.y&&v.width===D.width&&v.height===D.height}function Dl(v,D){let g=null,r;const n=PH(v);function P(){var T;clearTimeout(r),(T=g)==null||T.disconnect(),g=null}function o(T,z){T===void 0&&(T=!1),z===void 0&&(z=1),P();const c=v.getBoundingClientRect(),{left:k,top:Y,width:e,height:J}=c;if(T||D(),!e||!J)return;const i=Gw(Y),R=Gw(n.clientWidth-(k+e)),q=Gw(n.clientHeight-(Y+J)),fA=Gw(k),QA={rootMargin:-i+"px "+-R+"px "+-q+"px "+-fA+"px",threshold:XI(0,PB(1,z))||1};let oA=!0;function BA(cA){const sA=cA[0].intersectionRatio;if(sA!==z){if(!oA)return o();sA?o(!1,sA):r=setTimeout(()=>{o(!1,1e-7)},1e3)}sA===1&&!Ic(c,v.getBoundingClientRect())&&o(),oA=!1}try{g=new IntersectionObserver(BA,{...QA,root:n.ownerDocument})}catch{g=new IntersectionObserver(BA,QA)}g.observe(v)}return o(!0),P}function Il(v,D,g,r){r===void 0&&(r={});const{ancestorScroll:n=!0,ancestorResize:P=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:T=typeof IntersectionObserver=="function",animationFrame:z=!1}=r,c=sP(v),k=n||P?[...c?H9(c):[],...H9(D)]:[];k.forEach(fA=>{n&&fA.addEventListener("scroll",g,{passive:!0}),P&&fA.addEventListener("resize",g)});const Y=c&&T?Dl(c,g):null;let e=-1,J=null;o&&(J=new ResizeObserver(fA=>{let[gA]=fA;gA&&gA.target===c&&J&&(J.unobserve(D),cancelAnimationFrame(e),e=requestAnimationFrame(()=>{var QA;(QA=J)==null||QA.observe(D)})),g()}),c&&!z&&J.observe(c),J.observe(D));let i,R=z?Cg(v):null;z&&q();function q(){const fA=Cg(v);R&&!Ic(R,fA)&&g(),R=fA,i=requestAnimationFrame(q)}return g(),()=>{var fA;k.forEach(gA=>{n&&gA.removeEventListener("scroll",g),P&&gA.removeEventListener("resize",g)}),Y?.(),(fA=J)==null||fA.disconnect(),J=null,z&&cancelAnimationFrame(i)}}const Hl=G1,Bl=X1,gl=j1,Ql=e1,vl=b1,Hc=k1,fl=J1,rl=(v,D,g)=>{const r=new Map,n={platform:El,...g},P={...n.platform,_c:r};return F1(v,D,{...n,platform:P})};var wl=typeof document<"u",nl=function(){},iw=wl?W.useLayoutEffect:nl;function aw(v,D){if(v===D)return!0;if(typeof v!=typeof D)return!1;if(typeof v=="function"&&v.toString()===D.toString())return!0;let g,r,n;if(v&&D&&typeof v=="object"){if(Array.isArray(v)){if(g=v.length,g!==D.length)return!1;for(r=g;r--!==0;)if(!aw(v[r],D[r]))return!1;return!0}if(n=Object.keys(v),g=n.length,g!==Object.keys(D).length)return!1;for(r=g;r--!==0;)if(!{}.hasOwnProperty.call(D,n[r]))return!1;for(r=g;r--!==0;){const P=n[r];if(!(P==="_owner"&&v.$$typeof)&&!aw(v[P],D[P]))return!1}return!0}return v!==v&&D!==D}function Bc(v){return typeof window>"u"?1:(v.ownerDocument.defaultView||window).devicePixelRatio||1}function gc(v,D){const g=Bc(v);return Math.round(D*g)/g}function LP(v){const D=W.useRef(v);return iw(()=>{D.current=v}),D}function sl(v){v===void 0&&(v={});const{placement:D="bottom",strategy:g="absolute",middleware:r=[],platform:n,elements:{reference:P,floating:o}={},transform:T=!0,whileElementsMounted:z,open:c}=v,[k,Y]=W.useState({x:0,y:0,strategy:g,placement:D,middlewareData:{},isPositioned:!1}),[e,J]=W.useState(r);aw(e,r)||J(r);const[i,R]=W.useState(null),[q,fA]=W.useState(null),gA=W.useCallback(m=>{m!==cA.current&&(cA.current=m,R(m))},[]),QA=W.useCallback(m=>{m!==sA.current&&(sA.current=m,fA(m))},[]),oA=P||i,BA=o||q,cA=W.useRef(null),sA=W.useRef(null),LA=W.useRef(k),JA=z!=null,iA=LP(z),OA=LP(n),eA=LP(c),XA=W.useCallback(()=>{if(!cA.current||!sA.current)return;const m={placement:D,strategy:g,middleware:e};OA.current&&(m.platform=OA.current),rl(cA.current,sA.current,m).then(tA=>{const bA={...tA,isPositioned:eA.current!==!1};WA.current&&!aw(LA.current,bA)&&(LA.current=bA,ow.flushSync(()=>{Y(bA)}))})},[e,D,g,OA,eA]);iw(()=>{c===!1&&LA.current.isPositioned&&(LA.current.isPositioned=!1,Y(m=>({...m,isPositioned:!1})))},[c]);const WA=W.useRef(!1);iw(()=>(WA.current=!0,()=>{WA.current=!1}),[]),iw(()=>{if(oA&&(cA.current=oA),BA&&(sA.current=BA),oA&&BA){if(iA.current)return iA.current(oA,BA,XA);XA()}},[oA,BA,XA,iA,JA]);const HE=W.useMemo(()=>({reference:cA,floating:sA,setReference:gA,setFloating:QA}),[gA,QA]),hA=W.useMemo(()=>({reference:oA,floating:BA}),[oA,BA]),UA=W.useMemo(()=>{const m={position:g,left:0,top:0};if(!hA.floating)return m;const tA=gc(hA.floating,k.x),bA=gc(hA.floating,k.y);return T?{...m,transform:"translate("+tA+"px, "+bA+"px)",...Bc(hA.floating)>=1.5&&{willChange:"transform"}}:{position:g,left:tA,top:bA}},[g,T,hA.floating,k.x,k.y]);return W.useMemo(()=>({...k,update:XA,refs:HE,elements:hA,floatingStyles:UA}),[k,XA,HE,hA,UA])}const ol=v=>{function D(g){return{}.hasOwnProperty.call(g,"current")}return{name:"arrow",options:v,fn(g){const{element:r,padding:n}=typeof v=="function"?v(g):v;return r&&D(r)?r.current!=null?Hc({element:r.current,padding:n}).fn(g):{}:r?Hc({element:r,padding:n}).fn(g):{}}}},Pl=(v,D)=>({...Hl(v),options:[v,D]}),Ll=(v,D)=>({...Bl(v),options:[v,D]}),Ml=(v,D)=>({...fl(v),options:[v,D]}),Cl=(v,D)=>({...gl(v),options:[v,D]}),zl=(v,D)=>({...Ql(v),options:[v,D]}),cl=(v,D)=>({...vl(v),options:[v,D]}),Ul=(v,D)=>({...ol(v),options:[v,D]});var Tl="Arrow",Qc=W.forwardRef((v,D)=>{const{children:g,width:r=10,height:n=5,...P}=v;return G.jsx(sB.svg,{...P,ref:D,width:r,height:n,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:v.asChild?g:G.jsx("polygon",{points:"0,0 30,0 15,10"})})});Qc.displayName=Tl;var Fl=Qc;function kl(v){const[D,g]=W.useState(void 0);return oB(()=>{if(v){g({width:v.offsetWidth,height:v.offsetHeight});const r=new ResizeObserver(n=>{if(!Array.isArray(n)||!n.length)return;const P=n[0];let o,T;if("borderBoxSize"in P){const z=P.borderBoxSize,c=Array.isArray(z)?z[0]:z;o=c.inlineSize,T=c.blockSize}else o=v.offsetWidth,T=v.offsetHeight;g({width:o,height:T})});return r.observe(v,{box:"border-box"}),()=>r.unobserve(v)}else g(void 0)},[v]),D}var MP="Popper",[vc,fc]=iz(MP),[jl,rc]=vc(MP),wc=v=>{const{__scopePopper:D,children:g}=v,[r,n]=W.useState(null);return G.jsx(jl,{scope:D,anchor:r,onAnchorChange:n,children:g})};wc.displayName=MP;var nc="PopperAnchor",sc=W.forwardRef((v,D)=>{const{__scopePopper:g,virtualRef:r,...n}=v,P=rc(nc,g),o=W.useRef(null),T=Lg(D,o);return W.useEffect(()=>{P.onAnchorChange(r?.current||o.current)}),r?null:G.jsx(sB.div,{...n,ref:T})});sc.displayName=nc;var CP="PopperContent",[bl,Yl]=vc(CP),oc=W.forwardRef((v,D)=>{const{__scopePopper:g,side:r="bottom",sideOffset:n=0,align:P="center",alignOffset:o=0,arrowPadding:T=0,avoidCollisions:z=!0,collisionBoundary:c=[],collisionPadding:k=0,sticky:Y="partial",hideWhenDetached:e=!1,updatePositionStrategy:J="optimized",onPlaced:i,...R}=v,q=rc(CP,g),[fA,gA]=W.useState(null),QA=Lg(D,$A=>gA($A)),[oA,BA]=W.useState(null),cA=kl(oA),sA=cA?.width??0,LA=cA?.height??0,JA=r+(P!=="center"?"-"+P:""),iA=typeof k=="number"?k:{top:0,right:0,bottom:0,left:0,...k},OA=Array.isArray(c)?c:[c],eA=OA.length>0,XA={padding:iA,boundary:OA.filter(Xl),altBoundary:eA},{refs:WA,floatingStyles:HE,placement:hA,isPositioned:UA,middlewareData:m}=sl({strategy:"fixed",placement:JA,whileElementsMounted:(...$A)=>Il(...$A,{animationFrame:J==="always"}),elements:{reference:q.anchor},middleware:[Pl({mainAxis:n+LA,alignmentAxis:o}),z&&Ll({mainAxis:!0,crossAxis:!1,limiter:Y==="partial"?Ml():void 0,...XA}),z&&Cl({...XA}),zl({...XA,apply:({elements:$A,rects:kE,availableWidth:jE,availableHeight:pE})=>{const{width:U8,height:S8}=kE.reference,T8=$A.floating.style;T8.setProperty("--radix-popper-available-width",`${jE}px`),T8.setProperty("--radix-popper-available-height",`${pE}px`),T8.setProperty("--radix-popper-anchor-width",`${U8}px`),T8.setProperty("--radix-popper-anchor-height",`${S8}px`)}}),oA&&Ul({element:oA,padding:T}),Jl({arrowWidth:sA,arrowHeight:LA}),e&&cl({strategy:"referenceHidden",...XA})]}),[tA,bA]=Mc(hA),d=bw(i);oB(()=>{UA&&d?.()},[UA,d]);const nA=m.arrow?.x,ZA=m.arrow?.y,_A=m.arrow?.centerOffset!==0,[FE,YE]=W.useState();return oB(()=>{fA&&YE(window.getComputedStyle(fA).zIndex)},[fA]),G.jsx("div",{ref:WA.setFloating,"data-radix-popper-content-wrapper":"",style:{...HE,transform:UA?HE.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:FE,"--radix-popper-transform-origin":[m.transformOrigin?.x,m.transformOrigin?.y].join(" "),...m.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:v.dir,children:G.jsx(bl,{scope:g,placedSide:tA,onArrowChange:BA,arrowX:nA,arrowY:ZA,shouldHideArrow:_A,children:G.jsx(sB.div,{"data-side":tA,"data-align":bA,...R,ref:QA,style:{...R.style,animation:UA?void 0:"none"}})})})});oc.displayName=CP;var Pc="PopperArrow",Gl={top:"bottom",right:"left",bottom:"top",left:"right"},Lc=W.forwardRef(function(D,g){const{__scopePopper:r,...n}=D,P=Yl(Pc,r),o=Gl[P.placedSide];return G.jsx("span",{ref:P.onArrowChange,style:{position:"absolute",left:P.arrowX,top:P.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[P.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[P.placedSide],visibility:P.shouldHideArrow?"hidden":void 0},children:G.jsx(Fl,{...n,ref:g,style:{...n.style,display:"block"}})})});Lc.displayName=Pc;function Xl(v){return v!==null}var Jl=v=>({name:"transformOrigin",options:v,fn(D){const{placement:g,rects:r,middlewareData:n}=D,o=n.arrow?.centerOffset!==0,T=o?0:v.arrowWidth,z=o?0:v.arrowHeight,[c,k]=Mc(g),Y={start:"0%",center:"50%",end:"100%"}[k],e=(n.arrow?.x??0)+T/2,J=(n.arrow?.y??0)+z/2;let i="",R="";return c==="bottom"?(i=o?Y:`${e}px`,R=`${-z}px`):c==="top"?(i=o?Y:`${e}px`,R=`${r.floating.height+z}px`):c==="right"?(i=`${-z}px`,R=o?Y:`${J}px`):c==="left"&&(i=`${r.floating.width+z}px`,R=o?Y:`${J}px`),{data:{x:i,y:R}}}});function Mc(v){const[D,g="center"]=v.split("-");return[D,g]}var el=wc,tl=sc,Kl=oc,il=Lc,al="Portal",Cc=W.forwardRef((v,D)=>{const{container:g,...r}=v,[n,P]=W.useState(!1);oB(()=>P(!0),[]);const o=g||n&&globalThis?.document?.body;return o?FF.createPortal(G.jsx(sB.div,{...r,ref:D}),o):null});Cc.displayName=al;function ll(v,D){return W.useReducer((g,r)=>D[g][r]??g,v)}var zP=v=>{const{present:D,children:g}=v,r=ul(D),n=typeof g=="function"?g({present:r.isPresent}):W.Children.only(g),P=Lg(r.ref,Vl(n));return typeof g=="function"||r.isPresent?W.cloneElement(n,{ref:P}):null};zP.displayName="Presence";function ul(v){const[D,g]=W.useState(),r=W.useRef(null),n=W.useRef(v),P=W.useRef("none"),o=v?"mounted":"unmounted",[T,z]=ll(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return W.useEffect(()=>{const c=lw(r.current);P.current=T==="mounted"?c:"none"},[T]),oB(()=>{const c=r.current,k=n.current;if(k!==v){const e=P.current,J=lw(c);v?z("MOUNT"):J==="none"||c?.display==="none"?z("UNMOUNT"):z(k&&e!==J?"ANIMATION_OUT":"UNMOUNT"),n.current=v}},[v,z]),oB(()=>{if(D){let c;const k=D.ownerDocument.defaultView??window,Y=J=>{const R=lw(r.current).includes(J.animationName);if(J.target===D&&R&&(z("ANIMATION_END"),!n.current)){const q=D.style.animationFillMode;D.style.animationFillMode="forwards",c=k.setTimeout(()=>{D.style.animationFillMode==="forwards"&&(D.style.animationFillMode=q)})}},e=J=>{J.target===D&&(P.current=lw(r.current))};return D.addEventListener("animationstart",e),D.addEventListener("animationcancel",Y),D.addEventListener("animationend",Y),()=>{k.clearTimeout(c),D.removeEventListener("animationstart",e),D.removeEventListener("animationcancel",Y),D.removeEventListener("animationend",Y)}}else z("ANIMATION_END")},[D,z]),{isPresent:["mounted","unmountSuspended"].includes(T),ref:W.useCallback(c=>{r.current=c?getComputedStyle(c):null,g(c)},[])}}function lw(v){return v?.animationName||"none"}function Vl(v){let D=Object.getOwnPropertyDescriptor(v.props,"ref")?.get,g=D&&"isReactWarning"in D&&D.isReactWarning;return g?v.ref:(D=Object.getOwnPropertyDescriptor(v,"ref")?.get,g=D&&"isReactWarning"in D&&D.isReactWarning,g?v.props.ref:v.props.ref||v.ref)}var Rl=I0[" useInsertionEffect ".trim().toString()]||oB;function yl({prop:v,defaultProp:D,onChange:g=()=>{},caller:r}){const[n,P,o]=xl({defaultProp:D,onChange:g}),T=v!==void 0,z=T?v:n;{const k=W.useRef(v!==void 0);W.useEffect(()=>{const Y=k.current;Y!==T&&console.warn(`${r} is changing from ${Y?"controlled":"uncontrolled"} to ${T?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),k.current=T},[T,r])}const c=W.useCallback(k=>{if(T){const Y=hl(k)?k(v):k;Y!==v&&o.current?.(Y)}else P(k)},[T,v,P,o]);return[z,c]}function xl({defaultProp:v,onChange:D}){const[g,r]=W.useState(v),n=W.useRef(g),P=W.useRef(D);return Rl(()=>{P.current=D},[D]),W.useEffect(()=>{n.current!==g&&(P.current?.(g),n.current=g)},[g,n]),[g,r,P]}function hl(v){return typeof v=="function"}var Sl=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),Ol="VisuallyHidden",zc=W.forwardRef((v,D)=>G.jsx(sB.span,{...v,ref:D,style:{...Sl,...v.style}}));zc.displayName=Ol;var Nl=zc,[uw]=iz("Tooltip",[fc]),Vw=fc(),cc="TooltipProvider",pl=700,cP="tooltip.open",[dl,UP]=uw(cc),TP=v=>{const{__scopeTooltip:D,delayDuration:g=pl,skipDelayDuration:r=300,disableHoverableContent:n=!1,children:P}=v,o=W.useRef(!0),T=W.useRef(!1),z=W.useRef(0);return W.useEffect(()=>{const c=z.current;return()=>window.clearTimeout(c)},[]),G.jsx(dl,{scope:D,isOpenDelayedRef:o,delayDuration:g,onOpen:W.useCallback(()=>{window.clearTimeout(z.current),o.current=!1},[]),onClose:W.useCallback(()=>{window.clearTimeout(z.current),z.current=window.setTimeout(()=>o.current=!0,r)},[r]),isPointerInTransitRef:T,onPointerInTransitChange:W.useCallback(c=>{T.current=c},[]),disableHoverableContent:n,children:P})};TP.displayName=cc;var B9="Tooltip",[ml,g9]=uw(B9),Uc=v=>{const{__scopeTooltip:D,children:g,open:r,defaultOpen:n,onOpenChange:P,disableHoverableContent:o,delayDuration:T}=v,z=UP(B9,v.__scopeTooltip),c=Vw(D),[k,Y]=W.useState(null),e=w1(),J=W.useRef(0),i=o??z.disableHoverableContent,R=T??z.delayDuration,q=W.useRef(!1),[fA,gA]=yl({prop:r,defaultProp:n??!1,onChange:sA=>{sA?(z.onOpen(),document.dispatchEvent(new CustomEvent(cP))):z.onClose(),P?.(sA)},caller:B9}),QA=W.useMemo(()=>fA?q.current?"delayed-open":"instant-open":"closed",[fA]),oA=W.useCallback(()=>{window.clearTimeout(J.current),J.current=0,q.current=!1,gA(!0)},[gA]),BA=W.useCallback(()=>{window.clearTimeout(J.current),J.current=0,gA(!1)},[gA]),cA=W.useCallback(()=>{window.clearTimeout(J.current),J.current=window.setTimeout(()=>{q.current=!0,gA(!0),J.current=0},R)},[R,gA]);return W.useEffect(()=>()=>{J.current&&(window.clearTimeout(J.current),J.current=0)},[]),G.jsx(el,{...c,children:G.jsx(ml,{scope:D,contentId:e,open:fA,stateAttribute:QA,trigger:k,onTriggerChange:Y,onTriggerEnter:W.useCallback(()=>{z.isOpenDelayedRef.current?cA():oA()},[z.isOpenDelayedRef,cA,oA]),onTriggerLeave:W.useCallback(()=>{i?BA():(window.clearTimeout(J.current),J.current=0)},[BA,i]),onOpen:oA,onClose:BA,disableHoverableContent:i,children:g})})};Uc.displayName=B9;var FP="TooltipTrigger",Tc=W.forwardRef((v,D)=>{const{__scopeTooltip:g,...r}=v,n=g9(FP,g),P=UP(FP,g),o=Vw(g),T=W.useRef(null),z=Lg(D,T,n.onTriggerChange),c=W.useRef(!1),k=W.useRef(!1),Y=W.useCallback(()=>c.current=!1,[]);return W.useEffect(()=>()=>document.removeEventListener("pointerup",Y),[Y]),G.jsx(tl,{asChild:!0,...o,children:G.jsx(sB.button,{"aria-describedby":n.open?n.contentId:void 0,"data-state":n.stateAttribute,...r,ref:z,onPointerMove:r3(v.onPointerMove,e=>{e.pointerType!=="touch"&&!k.current&&!P.isPointerInTransitRef.current&&(n.onTriggerEnter(),k.current=!0)}),onPointerLeave:r3(v.onPointerLeave,()=>{n.onTriggerLeave(),k.current=!1}),onPointerDown:r3(v.onPointerDown,()=>{n.open&&n.onClose(),c.current=!0,document.addEventListener("pointerup",Y,{once:!0})}),onFocus:r3(v.onFocus,()=>{c.current||n.onOpen()}),onBlur:r3(v.onBlur,n.onClose),onClick:r3(v.onClick,n.onClose)})})});Tc.displayName=FP;var kP="TooltipPortal",[ql,Wl]=uw(kP,{forceMount:void 0}),Fc=v=>{const{__scopeTooltip:D,forceMount:g,children:r,container:n}=v,P=g9(kP,D);return G.jsx(ql,{scope:D,forceMount:g,children:G.jsx(zP,{present:g||P.open,children:G.jsx(Cc,{asChild:!0,container:n,children:r})})})};Fc.displayName=kP;var ZQ="TooltipContent",kc=W.forwardRef((v,D)=>{const g=Wl(ZQ,v.__scopeTooltip),{forceMount:r=g.forceMount,side:n="top",...P}=v,o=g9(ZQ,v.__scopeTooltip);return G.jsx(zP,{present:r||o.open,children:o.disableHoverableContent?G.jsx(jc,{side:n,...P,ref:D}):G.jsx(Zl,{side:n,...P,ref:D})})}),Zl=W.forwardRef((v,D)=>{const g=g9(ZQ,v.__scopeTooltip),r=UP(ZQ,v.__scopeTooltip),n=W.useRef(null),P=Lg(D,n),[o,T]=W.useState(null),{trigger:z,onClose:c}=g,k=n.current,{onPointerInTransitChange:Y}=r,e=W.useCallback(()=>{T(null),Y(!1)},[Y]),J=W.useCallback((i,R)=>{const q=i.currentTarget,fA={x:i.clientX,y:i.clientY},gA=Du(fA,q.getBoundingClientRect()),QA=Iu(fA,gA),oA=Hu(R.getBoundingClientRect()),BA=gu([...QA,...oA]);T(BA),Y(!0)},[Y]);return W.useEffect(()=>()=>e(),[e]),W.useEffect(()=>{if(z&&k){const i=q=>J(q,k),R=q=>J(q,z);return z.addEventListener("pointerleave",i),k.addEventListener("pointerleave",R),()=>{z.removeEventListener("pointerleave",i),k.removeEventListener("pointerleave",R)}}},[z,k,J,e]),W.useEffect(()=>{if(o){const i=R=>{const q=R.target,fA={x:R.clientX,y:R.clientY},gA=z?.contains(q)||k?.contains(q),QA=!Bu(fA,o);gA?e():QA&&(e(),c())};return document.addEventListener("pointermove",i),()=>document.removeEventListener("pointermove",i)}},[z,k,o,c,e]),G.jsx(jc,{...v,ref:P})}),[_l,$l]=uw(B9,{isInside:!1}),Au=di("TooltipContent"),jc=W.forwardRef((v,D)=>{const{__scopeTooltip:g,children:r,"aria-label":n,onEscapeKeyDown:P,onPointerDownOutside:o,...T}=v,z=g9(ZQ,g),c=Vw(g),{onClose:k}=z;return W.useEffect(()=>(document.addEventListener(cP,k),()=>document.removeEventListener(cP,k)),[k]),W.useEffect(()=>{if(z.trigger){const Y=e=>{e.target?.contains(z.trigger)&&k()};return window.addEventListener("scroll",Y,{capture:!0}),()=>window.removeEventListener("scroll",Y,{capture:!0})}},[z.trigger,k]),G.jsx(uz,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:P,onPointerDownOutside:o,onFocusOutside:Y=>Y.preventDefault(),onDismiss:k,children:G.jsxs(Kl,{"data-state":z.stateAttribute,...c,...T,ref:D,style:{...T.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[G.jsx(Au,{children:r}),G.jsx(_l,{scope:g,isInside:!0,children:G.jsx(Nl,{id:z.contentId,role:"tooltip",children:n||r})})]})})});kc.displayName=ZQ;var bc="TooltipArrow",Eu=W.forwardRef((v,D)=>{const{__scopeTooltip:g,...r}=v,n=Vw(g);return $l(bc,g).isInside?null:G.jsx(il,{...n,...r,ref:D})});Eu.displayName=bc;function Du(v,D){const g=Math.abs(D.top-v.y),r=Math.abs(D.bottom-v.y),n=Math.abs(D.right-v.x),P=Math.abs(D.left-v.x);switch(Math.min(g,r,n,P)){case P:return"left";case n:return"right";case g:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function Iu(v,D,g=5){const r=[];switch(D){case"top":r.push({x:v.x-g,y:v.y+g},{x:v.x+g,y:v.y+g});break;case"bottom":r.push({x:v.x-g,y:v.y-g},{x:v.x+g,y:v.y-g});break;case"left":r.push({x:v.x+g,y:v.y-g},{x:v.x+g,y:v.y+g});break;case"right":r.push({x:v.x-g,y:v.y-g},{x:v.x-g,y:v.y+g});break}return r}function Hu(v){const{top:D,right:g,bottom:r,left:n}=v;return[{x:n,y:D},{x:g,y:D},{x:g,y:r},{x:n,y:r}]}function Bu(v,D){const{x:g,y:r}=v;let n=!1;for(let P=0,o=D.length-1;P<D.length;o=P++){const T=D[P],z=D[o],c=T.x,k=T.y,Y=z.x,e=z.y;k>r!=e>r&&g<(Y-c)*(r-k)/(e-k)+c&&(n=!n)}return n}function gu(v){const D=v.slice();return D.sort((g,r)=>g.x<r.x?-1:g.x>r.x?1:g.y<r.y?-1:g.y>r.y?1:0),Qu(D)}function Qu(v){if(v.length<=1)return v.slice();const D=[];for(let r=0;r<v.length;r++){const n=v[r];for(;D.length>=2;){const P=D[D.length-1],o=D[D.length-2];if((P.x-o.x)*(n.y-o.y)>=(P.y-o.y)*(n.x-o.x))D.pop();else break}D.push(n)}D.pop();const g=[];for(let r=v.length-1;r>=0;r--){const n=v[r];for(;g.length>=2;){const P=g[g.length-1],o=g[g.length-2];if((P.x-o.x)*(n.y-o.y)>=(P.y-o.y)*(n.x-o.x))g.pop();else break}g.push(n)}return g.pop(),D.length===1&&g.length===1&&D[0].x===g[0].x&&D[0].y===g[0].y?D:D.concat(g)}var vu=Uc,fu=Tc,ru=Fc,Yc=kc;const Gc=vu,Xc=fu,jP=W.forwardRef(({className:v,sideOffset:D=4,...g},r)=>G.jsx(ru,{children:G.jsx(Yc,{ref:r,sideOffset:D,className:Xz("z-[1000] overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",v),...g})}));jP.displayName=Yc.displayName;const Jc={1:"linear-gradient(90deg, #7fb33d, #abdd64, #c2eb83)",2:"linear-gradient(90deg, #0e9fb8, #22d3ee, #67e8f9)",3:"linear-gradient(90deg, #ca8a04, #eab308, #fde047)",4:"linear-gradient(90deg, #e8856e, #f2ae99, #fcd5c8)",5:"linear-gradient(90deg, #d56aaf, #ee90cb, #8465ec)"},ec={1:"rgba(171,221,100,0.35)",2:"rgba(34,211,238,0.35)",3:"rgba(234,179,8,0.4)",4:"rgba(242,174,153,0.4)",5:"rgba(238,144,203,0.45)"},wu=()=>{const{currentState:v,currentLevel:D,gameStateManager:g,isPaused:r,tutorialMission:n}=xA(),{score:P,multiplier:o,multiplierScore:T}=r7(),z=n!==null,c=W.useRef(null),{isFullscreen:k,toggleFullscreen:Y}=$f(),e=Wa(P,.14),J=()=>{const cA=c.current?.closest("sigurd-startup");cA?Y(cA):Y()},i=()=>{v===uA.PLAYING?g?.pauseGame():v===uA.PAUSED&&g?.resumeGame()},R=lF(T,o),q=e!==P,fA=v===uA.PLAYING||v===uA.PAUSED,gA=Jc[o]??Jc[1],QA=ec[o]??ec[1],oA=o>=5,BA=oA?100:R*100;return G.jsxs("div",{ref:c,className:"w-full relative flex items-center gap-3 px-3 py-1.5 bg-[var(--background-deep)] border-b border-[var(--surface-line)] rounded-t-lg",style:{minHeight:40},children:[z?G.jsx("div",{className:"flex-1 flex items-center",children:G.jsx(Za,{})}):G.jsxs(G.Fragment,{children:[G.jsxs("div",{className:"text-[var(--foreground-dim)] font-mono text-xs shrink-0 uppercase tracking-wide",children:["Lvl ",G.jsx("span",{className:"text-foreground font-pixel",children:D})]}),G.jsx("div",{className:"w-px h-5 bg-[var(--surface-line)] shrink-0"}),G.jsx("div",{className:"shrink-0 min-w-[90px]",children:G.jsx("div",{className:`font-pixel text-sm tabular-nums transition-colors duration-150 ${q?"text-[var(--primary-light)]":"text-primary"}`,style:q?{textShadow:"0 0 8px rgba(171,221,100,.5)"}:void 0,children:e.toLocaleString()})}),G.jsx("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 opacity-60",style:{width:200},children:G.jsxs("div",{className:"relative h-5 rounded-full overflow-hidden bg-[var(--surface)] border border-[var(--surface-line)]",children:[G.jsx("div",{className:"absolute inset-y-0 left-0 rounded-full transition-all duration-500 ease-out",style:{width:`${BA}%`,background:gA,boxShadow:`0 0 8px ${QA}, inset 0 1px 0 rgba(255,255,255,0.2)`}}),G.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:G.jsxs("span",{className:"font-pixel text-[11px] leading-none",style:{color:"#fff",textShadow:"0 1px 3px rgba(0,0,0,0.5)"},children:["x",o,oA?" MAX":""]})})]})}),G.jsx("div",{className:"flex-1"})]}),G.jsxs("div",{className:"flex items-center gap-1 shrink-0",children:[fA&&G.jsx(TP,{children:G.jsxs(Gc,{children:[G.jsx(Xc,{asChild:!0,children:G.jsx($8,{onClick:i,variant:"ghost",size:"icon",className:"text-[var(--foreground-dim)] hover:text-primary h-7 w-7",children:r?G.jsx(jw,{size:15}):G.jsx(Oa,{size:15})})}),G.jsx(jP,{children:r?"Resume (P)":"Pause (P)"})]})}),G.jsx(TP,{children:G.jsxs(Gc,{children:[G.jsx(Xc,{asChild:!0,children:G.jsx($8,{onClick:J,variant:"ghost",size:"icon",className:"text-[var(--foreground-dim)] hover:text-primary h-7 w-7",children:k?G.jsx(Sa,{size:15}):G.jsx(ha,{size:15})})}),G.jsx(jP,{children:k?"Exit fullscreen (F)":"Fullscreen (F)"})]})})]})]})},nu=()=>{const{lives:v}=xA(),{isFullscreen:D}=$f();return G.jsx("div",{className:`absolute left-3 z-50 pointer-events-none ${D?"bottom-4":"bottom-2"}`,children:G.jsxs("div",{className:"flex items-center gap-1",children:[Array.from({length:3}).map((g,r)=>G.jsx(Ra,{color:"#ee90cb",size:D?22:18,fill:r<v?"#ee90cb":"none",strokeWidth:r<v?0:1.5},r)),v>3&&G.jsxs("span",{className:"text-[var(--accent-pink)] font-pixel text-sm ml-1",children:["+",v-3]})]})})},su=()=>{const{gameStateManager:v}=xA.getState(),{hasBridge:D,insufficientFunds:g}=_I(),[r,n]=W.useState(!1),P=()=>{v?.resumeGame()},o=()=>{v?.openSettings()},T=()=>{v?.quitToMenu()},z=async()=>{if(!r){if(D){n(!0);const c=await Uw(1);if(n(!1),!c.success){_I.getState().setInsufficientFunds(!0);return}}v?.restartGame()}};return G.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[G.jsxs("div",{className:"text-center mb-6",children:[G.jsx("h1",{className:"text-5xl font-pixel text-foreground tracking-wide",children:"PAUSE"}),G.jsx("p",{className:"text-sm text-[var(--foreground-dim)] mt-2",children:"Trykk P for å fortsette"})]}),G.jsxs("div",{className:"space-y-3 w-64",children:[G.jsxs($8,{onClick:P,className:"w-full uppercase",children:[G.jsx(jw,{size:20}),"Fortsett"]}),G.jsxs($8,{onClick:o,variant:"secondary",className:"w-full uppercase",children:[G.jsx(Kz,{size:20}),"Innstillinger"]}),g&&D?G.jsx("div",{className:"text-center py-2 px-4 bg-[var(--accent-red)]/10 border border-[var(--accent-red)]/30 rounded-sm",children:G.jsx("p",{className:"text-[var(--accent-red)] font-pixel text-xs",children:"IKKE NOK MYNTER"})}):G.jsxs($8,{onClick:z,variant:"secondary",disabled:r,className:`w-full uppercase text-sm tracking-normal ${r?"opacity-70":""}`,children:[G.jsx(Na,{size:20}),r?"Venter...":D?"Start på nytt (1 mynt)":"Start på nytt"]}),G.jsx("button",{onClick:T,className:"w-full text-[var(--foreground-dim)] text-sm font-mono underline underline-offset-4 hover:text-primary py-2 cursor-pointer",children:"Avslutt til hovedmeny"})]})]})},ou=["tl","tr","bl","br"];function Pu({pos:v,accent:D}){const g={position:"absolute",width:12,height:12,pointerEvents:"none"};return v==="tl"&&(g.top=-1,g.left=-1),v==="tr"&&(g.top=-1,g.right=-1),v==="bl"&&(g.bottom=-1,g.left=-1),v==="br"&&(g.bottom=-1,g.right=-1),G.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",style:g,shapeRendering:"crispEdges",children:G.jsxs("g",{fill:D,children:[v==="tl"&&G.jsxs(G.Fragment,{children:[G.jsx("rect",{x:"0",y:"0",width:"12",height:"3"}),G.jsx("rect",{x:"0",y:"0",width:"3",height:"12"})]}),v==="tr"&&G.jsxs(G.Fragment,{children:[G.jsx("rect",{x:"0",y:"0",width:"12",height:"3"}),G.jsx("rect",{x:"9",y:"0",width:"3",height:"12"})]}),v==="bl"&&G.jsxs(G.Fragment,{children:[G.jsx("rect",{x:"0",y:"9",width:"12",height:"3"}),G.jsx("rect",{x:"0",y:"0",width:"3",height:"12"})]}),v==="br"&&G.jsxs(G.Fragment,{children:[G.jsx("rect",{x:"0",y:"9",width:"12",height:"3"}),G.jsx("rect",{x:"9",y:"0",width:"3",height:"12"})]})]})})}function _Q({children:v,className:D="",accent:g="var(--primary)",glow:r=!1}){return G.jsxs("div",{className:`relative bg-[var(--surface)] border border-[var(--surface-line)] ${D}`,style:{boxShadow:r?"var(--glow-primary), var(--shadow-lg)":"var(--shadow-lg)"},children:[v,ou.map(n=>G.jsx(Pu,{pos:n,accent:g},n))]})}const Lu=()=>{const{gameStateManager:v}=xA.getState(),{audioSettings:D,updateAudioSettings:g}=X4(),[r,n]=W.useState(!1),[P,o]=W.useState(null),{masterVolume:T,musicVolume:z,sfxVolume:c,masterMuted:k,musicMuted:Y,sfxMuted:e}=D||{masterVolume:80,musicVolume:70,sfxVolume:90,masterMuted:!1,musicMuted:!1,sfxMuted:!1};W.useEffect(()=>{D&&!P&&o({...D})},[D]);const J=W.useMemo(()=>P?P.masterVolume!==T||P.musicVolume!==z||P.sfxVolume!==c||P.masterMuted!==k||P.musicMuted!==Y||P.sfxMuted!==e:!1,[P,T,z,c,k,Y,e]),i=()=>{J&&n0(T,z,c,k,Y,e),v?.closeNestedMenu()},R=async()=>{n(!0),n0(T,z,c,k,Y,e),o({masterVolume:T,musicVolume:z,sfxVolume:c,masterMuted:k,musicMuted:Y,sfxMuted:e}),setTimeout(()=>{n(!1)},800)};return G.jsxs("div",{className:"flex flex-col justify-center w-[80%]",children:[G.jsxs("div",{className:"flex items-center mb-6 gap-3",children:[G.jsx($8,{onClick:i,variant:"outline",size:"icon",className:"text-foreground hover:text-primary",children:G.jsx(E9,{size:20})}),G.jsx("h2",{className:"text-2xl font-pixel text-foreground tracking-wide uppercase",children:"Innstillinger"})]}),G.jsxs("div",{className:"space-y-2",children:[G.jsxs(_Q,{className:"p-3",children:[G.jsxs("div",{className:"flex justify-between items-center mb-2",children:[G.jsx("span",{className:"text-[var(--foreground-muted)] font-mono text-sm",children:"Master volum"}),G.jsx("button",{onClick:()=>g({masterMuted:!k}),className:`px-3 py-1 rounded-sm text-sm font-pixel tracking-wide border ${k?"bg-destructive border-destructive text-primary-foreground":"bg-[var(--surface-raised)] border-[var(--surface-line)] text-foreground"}`,children:k?"MUTED":`${T}%`})]}),G.jsx("input",{type:"range",min:"0",max:"100",value:k?0:T,onChange:q=>g({masterVolume:Number(q.target.value)}),className:"w-full accent-primary",disabled:k})]}),G.jsxs(_Q,{className:"p-3",children:[G.jsxs("div",{className:"flex justify-between items-center mb-2",children:[G.jsx("span",{className:"text-[var(--foreground-muted)] font-mono text-sm",children:"Musikk volum"}),G.jsx("button",{onClick:()=>g({musicMuted:!Y}),className:`px-3 py-1 rounded-sm text-sm font-pixel tracking-wide border ${Y?"bg-destructive border-destructive text-primary-foreground":"bg-[var(--surface-raised)] border-[var(--surface-line)] text-foreground"}`,children:Y?"MUTED":`${z}%`})]}),G.jsx("input",{type:"range",min:"0",max:"100",value:Y?0:z,onChange:q=>g({musicVolume:Number(q.target.value)}),className:"w-full accent-primary",disabled:Y})]}),G.jsxs(_Q,{className:"p-3",children:[G.jsxs("div",{className:"flex justify-between items-center mb-2",children:[G.jsx("span",{className:"text-[var(--foreground-muted)] font-mono text-sm",children:"Lyd effekter"}),G.jsx("button",{onClick:()=>g({sfxMuted:!e}),className:`px-3 py-1 rounded-sm text-sm font-pixel tracking-wide border ${e?"bg-destructive border-destructive text-primary-foreground":"bg-[var(--surface-raised)] border-[var(--surface-line)] text-foreground"}`,children:e?"MUTED":`${c}%`})]}),G.jsx("input",{type:"range",min:"0",max:"100",value:e?0:c,onChange:q=>g({sfxVolume:Number(q.target.value)}),className:"w-full accent-primary",disabled:e})]}),G.jsx("p",{className:"text-center text-xs text-[var(--foreground-dim)] font-mono py-1",children:"Trykk på tallene for å mute lyd"}),G.jsxs("div",{className:"flex gap-3",children:[G.jsx($8,{variant:"secondary",onClick:()=>{g(lo)},className:"flex-1",children:"Tilbakestill"}),G.jsx($8,{variant:"default",onClick:R,disabled:!J||r,className:`flex-1 ${J?"":"opacity-50 cursor-not-allowed"}`,children:r?G.jsxs("div",{className:"flex items-center gap-2",children:[G.jsx(IP,{className:"h-4 w-4 animate-spin"}),G.jsx("span",{children:"Oppdaterer..."})]}):"Oppdater lyd"})]})]})]})},Mu=(v,D={})=>{const{duration:g=3e3,steps:r=60,easing:n="ease-out",delay:P=0,onComplete:o}=D,[T,z]=W.useState(0),c=W.useRef(!1),k=W.useRef(v);return W.useEffect(()=>{if(v===0){z(0),c.current=!1;return}if(k.current!==v&&(c.current=!1,z(0),k.current=v),c.current){z(v);return}const Y=setTimeout(()=>{const e=g/r;let J=0;const i=setInterval(()=>{J++;const R=J/r;let q;switch(n){case"linear":q=R;break;case"ease-out":q=1-(1-R)*(1-R);break;case"gentle-ease-out":q=1-Math.pow(1-R,1.5);break;case"ease-in":q=R*R;break;case"ease-in-out":q=R<.5?2*R*R:1-Math.pow(-2*R+2,2)/2;break;default:q=1-(1-R)*(1-R)}const fA=v*q,gA=Math.round(fA);z(gA),J>=r&&(z(v),c.current=!0,clearInterval(i),o&&o())},e);return()=>clearInterval(i)},P);return()=>clearTimeout(Y)},[v,g,r,n,P,o]),T},Cu=()=>{const{currentLevel:v,correctOrderCount:D,lives:g}=xA(),{score:r}=r7(),{setBonusAnimationComplete:n}=xA(),{currentMap:P}=c8(),o=x.STARTING_LIVES-g,T=Math.max(0,D-o),z=x.BONUS_POINTS[T]||0,c=Mu(z,{duration:6e3,steps:120,easing:"gentle-ease-out",delay:200,onComplete:()=>{u.debug("Bonus animation completed, setting flag for transition"),n(!0)}});return G.jsxs("div",{className:"text-center max-w-md",children:[G.jsxs("h1",{className:"text-4xl font-pixel text-primary tracking-wide mb-4 uppercase",children:[P?.name," Fullført!"]}),G.jsx("div",{className:"text-foreground mb-6 space-y-4",children:z>0&&G.jsxs("div",{className:"flex flex-col items-center justify-center gap-5",children:[G.jsxs("div",{className:"text-xl text-[var(--foreground-muted)]",children:["Du samlet"," ",G.jsx("span",{className:"font-pixel text-primary",children:T})," ","av 23 finansieringer!"]}),G.jsxs("div",{className:"text-5xl font-pixel text-primary animate-pulse",style:{textShadow:"0 0 12px rgba(171,221,100,.5)"},children:[c.toLocaleString()," kr"]}),G.jsx("div",{className:"text-sm text-[var(--foreground-dim)] mt-2 font-mono",children:Q3.length>v?`Fortsetter til ${Q3[v]?.name||"Neste nivå"}...`:""})]})})]})},zu=()=>{const{gameStateManager:v}=xA.getState(),{getLevelResults:D}=c8.getState(),[g,r]=W.useState(!0),[n,P]=W.useState(!1),{hasBridge:o,insufficientFunds:T}=_I(),z=D();W.useEffect(()=>{o0().then(()=>{r(!1)})},[]);const c=async()=>{if(!(g||n)){if(o){P(!0);const e=await Uw(1);if(P(!1),!e.success){_I.getState().setInsufficientFunds(!0);return}}v?.restartGame()}},k=z.reduce((e,J)=>e+J.score,0),Y=z.reduce((e,J)=>e+J.bonus,0);return G.jsxs("div",{className:"text-center max-w-2xl",children:[G.jsx("h1",{className:"text-4xl font-pixel text-primary tracking-wide mb-1",children:"UNICORN FOUNDER!"}),G.jsx("p",{className:"text-sm text-[var(--foreground-dim)] mb-4",children:"Du har bygget en billion-dollar idé"}),z.length>0&&G.jsx(_Q,{className:"p-0 mb-6",children:G.jsx("div",{className:"overflow-x-auto",children:G.jsxs("table",{className:"w-full text-sm font-mono",children:[G.jsx("thead",{children:G.jsxs("tr",{className:"border-b border-[var(--surface-line)]",children:[G.jsx("th",{className:"text-left py-2 px-3 text-primary font-pixel text-xs tracking-widest",children:"Bane"}),G.jsx("th",{className:"text-right py-2 px-3 text-primary font-pixel text-xs tracking-widest",children:"Finansiering"}),G.jsx("th",{className:"text-right py-2 px-3 text-primary font-pixel text-xs tracking-widest",children:"Bonus"})]})}),G.jsx("tbody",{children:z.map((e,J)=>G.jsxs("tr",{className:"border-b border-[var(--surface-line)]/30",children:[G.jsxs("td",{className:"py-2 px-3 text-left text-foreground",children:[G.jsx(kw,{className:"w-4 h-4 text-primary inline mr-2"}),G.jsx("span",{className:"font-medium",children:e.mapName}),G.jsxs("span",{className:"text-xs text-[var(--foreground-dim)] ml-2",children:["(Nivå ",e.level,")"]})]}),G.jsxs("td",{className:"py-2 px-3 text-right text-foreground",children:[e.score.toLocaleString()," kr"]}),G.jsx("td",{className:"py-2 px-3 text-right",children:e.bonus>0?G.jsxs("span",{className:"text-amber-700 font-semibold",children:[e.bonus.toLocaleString()," kr"]}):G.jsx("span",{className:"text-[var(--foreground-dim)]",children:"-"})})]},J))}),G.jsxs("tfoot",{children:[G.jsxs("tr",{className:"border-t-2 border-primary",children:[G.jsx("td",{className:"py-3 px-3 text-left font-pixel text-primary tracking-wide",children:"TOTALT"}),G.jsxs("td",{className:"py-3 px-3 text-right font-pixel text-primary text-lg",children:[k.toLocaleString()," kr"]}),G.jsx("td",{className:"py-3 px-3 text-right font-pixel text-amber-700 text-lg",children:Y>0?`${Y.toLocaleString()} kr`:"-"})]}),G.jsxs("tr",{children:[G.jsx("td",{className:"py-3 px-3 text-left font-pixel text-foreground text-base tracking-wide",children:"TOTAL FINANSIERING"}),G.jsxs("td",{colSpan:2,className:"py-3 px-3 text-right font-pixel text-foreground text-xl",children:[(k+Y).toLocaleString()," kr"]})]})]})]})})}),G.jsxs("div",{className:"flex flex-col items-center gap-3 mt-4",children:[g&&G.jsxs("div",{className:"text-sm text-[var(--foreground-dim)] flex items-center gap-2 font-mono",children:[G.jsx(IP,{className:"w-4 h-4 animate-spin"}),"Lagrer spillet..."]}),T&&o?G.jsxs("div",{className:"text-center py-3 px-6 bg-[var(--accent-red)]/10 border border-[var(--accent-red)]/30 rounded-sm",children:[G.jsx("p",{className:"text-[var(--accent-red)] font-pixel text-sm",children:"IKKE NOK MYNTER"}),G.jsx("p",{className:"text-[var(--foreground-dim)] text-xs font-mono mt-1",children:"Kjøp flere mynter for å spille"})]}):G.jsx($8,{onClick:c,disabled:g||n,className:`uppercase px-10 ${g||n?"opacity-50 cursor-not-allowed":""}`,children:n?"Venter...":o?"Spill igjen (1 mynt)":"Spill igjen"})]})]})},cu=()=>{const{gameStateManager:v}=xA.getState(),{getLevelResults:D}=c8.getState(),[g,r]=W.useState(!0),[n,P]=W.useState(!1),{balance:o,hasBridge:T,insufficientFunds:z}=_I(),c=D();W.useEffect(()=>{o0().then(()=>{r(!1)})},[]);const k=async()=>{if(!(g||n)){if(T){P(!0);const J=await Uw(1);if(P(!1),!J.success){_I.getState().setInsufficientFunds(!0);return}}v?.restartGame()}},Y=c.reduce((J,i)=>J+i.score,0),e=c.reduce((J,i)=>J+i.bonus,0);return G.jsxs("div",{className:"text-center max-w-2xl",children:[G.jsx("h1",{className:"text-4xl font-pixel text-foreground tracking-wide mb-1",children:"KAPITALEN TØRKET UT"}),G.jsx("p",{className:"text-sm text-[var(--foreground-dim)] mb-4",children:"Startupen gikk konkurs"}),c.length>0&&G.jsx(_Q,{className:"p-0 mb-6",children:G.jsx("div",{className:"overflow-x-auto",children:G.jsxs("table",{className:"w-full text-sm font-mono",children:[G.jsx("thead",{children:G.jsxs("tr",{className:"border-b border-[var(--surface-line)]",children:[G.jsx("th",{className:"text-center py-2 px-3 text-primary font-pixel text-xs tracking-widest",children:G.jsx(kw,{className:"w-4 h-4 inline"})}),G.jsx("th",{className:"text-left py-2 px-3 text-primary font-pixel text-xs tracking-widest",children:"Bane"}),G.jsx("th",{className:"text-right py-2 px-3 text-primary font-pixel text-xs tracking-widest",children:"Finansiering"}),G.jsx("th",{className:"text-right py-2 px-3 text-primary font-pixel text-xs tracking-widest",children:"Bonus"})]})}),G.jsx("tbody",{children:c.map((J,i)=>G.jsxs("tr",{className:"border-b border-[var(--surface-line)]/30",children:[G.jsx("td",{className:"py-2 px-3 text-center",children:G.jsx("div",{className:"flex justify-center items-center",children:G.jsx("div",{className:`w-4 h-4 border-2 rounded-sm ${J.isPartial?"bg-destructive border-red-600":"bg-primary border-primary-dark"} flex items-center justify-center`,children:J.isPartial?G.jsx(da,{className:"w-3 h-3 text-white"}):G.jsx(kw,{className:"w-3 h-3 text-white"})})})}),G.jsxs("td",{className:"py-2 px-3 text-left text-foreground",children:[G.jsx("span",{className:"font-medium",children:J.mapName}),G.jsxs("span",{className:"text-xs text-[var(--foreground-dim)] ml-2",children:["(Nivå ",J.level,")"]})]}),G.jsxs("td",{className:"py-2 px-3 text-right text-foreground",children:[J.score.toLocaleString()," kr"]}),G.jsx("td",{className:"py-2 px-3 text-right",children:J.bonus>0?G.jsxs("span",{className:"text-amber-700 font-semibold",children:[J.bonus.toLocaleString()," kr"]}):G.jsx("span",{className:"text-[var(--foreground-dim)]",children:"-"})})]},i))}),G.jsx("tfoot",{children:G.jsxs("tr",{className:"border-t-2 border-primary",children:[G.jsx("td",{colSpan:2,className:"py-3 px-3 text-left font-pixel text-primary tracking-wide",children:"TOTAL"}),G.jsxs("td",{colSpan:2,className:"py-3 px-3 text-right font-pixel text-foreground text-xl",children:[(Y+e).toLocaleString()," kr"]})]})})]})})}),G.jsxs("div",{className:"flex flex-col items-center gap-3",children:[g&&G.jsxs("div",{className:"text-sm text-[var(--foreground-dim)] flex items-center gap-2 font-mono",children:[G.jsx(IP,{className:"w-4 h-4 animate-spin"}),"Lagrer spillet..."]}),z&&T?G.jsxs("div",{className:"text-center py-3 px-6 bg-[var(--accent-red)]/10 border border-[var(--accent-red)]/30 rounded-sm",children:[G.jsx("p",{className:"text-[var(--accent-red)] font-pixel text-sm",children:"IKKE NOK MYNTER"}),G.jsx("p",{className:"text-[var(--foreground-dim)] text-xs font-mono mt-1",children:"Kjøp flere mynter for å spille"})]}):G.jsx($8,{onClick:k,disabled:g||n,className:`uppercase px-10 ${g||n?"opacity-50 cursor-not-allowed":""}`,children:n?"Venter...":T?"Prøv igjen (1 mynt)":"Prøv igjen"})]})]})},Uu=()=>G.jsx("div",{className:"absolute bottom-2 left-30 right-30 p-2",children:G.jsxs("div",{className:"flex items-center justify-center gap-6 text-sm",children:[G.jsxs("div",{className:"flex items-center gap-1",children:[G.jsx("span",{className:"font-bold text-white rounded-md flex items-center justify-center text-lg",children:"F"}),G.jsx("span",{className:"text-foreground",children:"- Fullskjerm toggle"})]}),G.jsx("div",{className:"w-[1px] h-10 bg-gray-500"}),G.jsxs("div",{className:"flex items-center gap-2",children:[G.jsx("span",{className:"font-bold text-white rounded-md flex items-center justify-center text-lg",children:"P"}),G.jsx("span",{className:"text-foreground",children:"- Pause toggle"})]}),G.jsx("div",{className:"w-[1px] h-10 bg-gray-500"}),G.jsxs("div",{className:"flex items-center gap-2",children:[G.jsx("span",{className:"font-bold text-white rounded-md flex items-center justify-center text-lg",children:"M"}),G.jsx("span",{className:"text-foreground",children:"- Mute toggle"})]})]})}),K4=({children:v,transparent:D,showShortcuts:g=!0})=>{const{currentState:r}=xA(),n=r===uA.COUNTDOWN;return G.jsxs("div",{className:`absolute inset-0 flex items-center justify-center z-50 ${n?"bg-menu backdrop-blur-sm menu-blur-out":D?"bg-transparent":"bg-menu backdrop-blur-sm"}`,children:[v,r!==uA.PLAYING&&r!==uA.COUNTDOWN&&r!==uA.GAME_OVER&&r!==uA.VICTORY&&g&&G.jsx(Uu,{})]})},Tu=v=>{const{audioSettings:D,updateAudioSettings:g}=X4.getState(),{currentState:r,gameStateManager:n}=xA.getState();W.useEffect(()=>{const P=o=>{if(!(o.target instanceof HTMLInputElement||o.target instanceof HTMLTextAreaElement))switch(o.key){case"f":case"F":v?.();break;case"Escape":(document.fullscreenElement||document.webkitFullscreenElement)&&v?.();break;case"p":case"P":r===uA.PLAYING?n?.pauseGame():r===uA.PAUSED&&n?.resumeGame();break;case"m":case"M":g({masterMuted:!D.masterMuted});break}};return document.addEventListener("keydown",P),()=>{document.removeEventListener("keydown",P)}},[r,n,v,g,D.masterMuted])},MH={major:3,minor:4,patch:0,build:0,timestamp:1777501648330,hash:"UNAJIG",full:"3.4.0"},bP=MH.full,zg=()=>({version:bP,major:MH.major,minor:MH.minor,patch:MH.patch,build:MH.build,timestamp:MH.timestamp,hash:MH.hash}),tc=()=>{console.log("🎮 Sigurd Startup Game v"+bP+" (Build "+MH.build+")"),console.log("📦 Hash: "+MH.hash),console.log("⏰ Built: "+new Date(MH.timestamp).toISOString())},Fu=()=>{const{gameStateManager:v}=xA.getState(),D=[{keys:["←","→"],wasdKeys:["A","D"],description:"Beveg deg sidelengs"},{keys:["↑"],wasdKeys:["W"],description:"Hopp"},{keys:["SPACE"],description:"Flytemodus (Hold)"},{keys:["↑","SHIFT"],wasdKeys:["W","SHIFT"],description:"Super hopp"},{keys:["↓"],wasdKeys:["S"],description:"Rask fall"}],g=()=>{v?.closeNestedMenu()};return G.jsxs("div",{className:"flex flex-col justify-center h-full w-[80%]",children:[G.jsxs("div",{className:"flex items-center mb-6 gap-3",children:[G.jsx($8,{onClick:g,variant:"outline",size:"icon",className:"text-foreground hover:text-primary",children:G.jsx(E9,{size:20})}),G.jsx("h2",{className:"text-2xl font-pixel text-foreground tracking-wide uppercase",children:"Kontroller"})]}),G.jsx("div",{className:"grid grid-cols-2 gap-3",children:D.map((r,n)=>G.jsxs(_Q,{className:"p-4",children:[G.jsx("p",{className:"text-foreground text-sm text-center mb-3 font-mono",children:r.description}),G.jsx("div",{className:"flex items-center justify-center gap-3",children:G.jsxs("div",{className:"flex gap-2 items-center",children:[r.wasdKeys&&G.jsxs(G.Fragment,{children:[r.wasdKeys.map((P,o)=>G.jsx("kbd",{className:"px-2 py-1 bg-[var(--surface-raised)] text-foreground rounded-sm border border-[var(--surface-line)] border-b-[3px] text-sm font-pixel tracking-wide min-w-[30px] text-center",children:P},o)),G.jsx("span",{className:"text-[var(--foreground-dim)] text-xs mx-1",children:"eller"})]}),r.keys.map((P,o)=>G.jsx("kbd",{className:"px-2 py-1 bg-[var(--surface-raised)] text-foreground rounded-sm border border-[var(--surface-line)] border-b-[3px] text-sm font-pixel tracking-wide min-w-[30px] text-center",children:P},o))]})})]},n))})]})},ku=()=>{const{gameStateManager:v}=xA.getState(),D=r=>{v?.openTutorialBrief?.(r)},g=()=>{v?.quitToMenu?.()};return G.jsxs("div",{className:"flex flex-col items-center justify-center h-full px-6 py-4 max-w-2xl",children:[G.jsxs("div",{className:"flex items-center gap-3 mb-6",children:[G.jsx(tz,{size:28,className:"text-primary"}),G.jsx("h1",{className:"text-3xl font-pixel text-foreground tracking-wide",children:"Sandkassa"})]}),G.jsx("div",{className:"grid grid-cols-2 gap-3 w-full mb-6",children:rH.map((r,n)=>{const P=fH[r];return G.jsxs("button",{onClick:()=>D(r),className:"text-left bg-[var(--surface)] hover:bg-[var(--surface-raised)] border-2 border-[var(--surface-line)] rounded-sm p-4 transition-colors cursor-pointer",children:[G.jsxs("div",{className:"text-xs font-mono text-[var(--foreground-dim)] mb-1",children:["Oppdrag ",n+1]}),G.jsx("div",{className:"font-pixel text-base text-foreground tracking-wider mb-1",children:P.title}),G.jsx("div",{className:"text-xs text-[var(--foreground-dim)] font-mono leading-snug",children:P.description})]},r)})}),G.jsxs($8,{onClick:g,variant:"secondary",className:"uppercase text-sm",children:[G.jsx(E9,{size:16}),"Tilbake"]})]})},ju=()=>{const v=xA(n=>n.pendingTutorialMission),{gameStateManager:D}=xA.getState();if(!v)return null;const g=fH[v],r=rH.indexOf(v);return G.jsxs("div",{className:"flex flex-col items-center justify-center h-full px-6 max-w-lg w-full text-center",children:[G.jsxs("div",{className:"text-[10px] font-mono text-[var(--foreground-dim)] uppercase tracking-[0.2em] mb-2",children:["Oppdrag ",r+1," av ",rH.length]}),G.jsx("h1",{className:"text-3xl font-pixel text-foreground tracking-wide mb-5",children:g.title}),G.jsxs("div",{className:"w-full max-w-[340px] bg-[var(--surface-raised)] border-2 border-[var(--surface-line)] rounded-sm px-4 py-3 mb-4 shadow-[0_3px_0_0_rgba(0,0,0,0.3)]",children:[G.jsxs("div",{className:"flex items-center gap-2 justify-center mb-1.5",children:[G.jsx(pa,{size:12,className:"text-primary"}),G.jsx("span",{className:"text-[10px] font-mono text-primary uppercase tracking-[0.2em]",children:"Mål"})]}),G.jsx("p",{className:"font-pixel text-sm text-foreground leading-snug tracking-wide",children:g.goal})]}),G.jsx("p",{className:"text-xs font-mono text-[var(--foreground-dim)] italic leading-relaxed text-balance max-w-[340px] mb-6",children:g.description}),G.jsxs("div",{className:"flex gap-3",children:[G.jsxs($8,{onClick:()=>D?.openTutorialSelect?.(),variant:"secondary",className:"uppercase text-sm",children:[G.jsx(E9,{size:16}),"Tilbake"]}),G.jsxs($8,{onClick:()=>D?.startTutorialMission?.(v),className:"uppercase text-sm",children:[G.jsx(jw,{size:16}),"Start"]})]})]})},bu=(v,D,g)=>{if(v==="skipped")return"Greit. Du gjør det på din måte.";switch(D){case C8.MOVEMENTS:return"Du beveger deg som en konsulent på timepris.";case C8.BOMBS:return"Skattefunn-godkjent — eller i det minste innsendt.";case C8.SURVIVE:return"Byråkratene stoppet for kaffepause. Lykke til neste gang.";case C8.KILL:{const r=g?.ryggvind;return r?`${r} gikk ut. Tilbake til søknadsskjemaet.`:"Effekten gikk ut. Tilbake til søknadsskjemaet."}default:return""}},Yu=()=>{const v=xA(Y=>Y.tutorialResult),{gameStateManager:D}=xA.getState();if(!v)return null;const{reason:g,missionId:r,stats:n}=v,P=r?fH[r]:void 0,o=bu(g,r,n),T=g==="complete"?"Fullført!":"Hoppet over",z=r?rH.indexOf(r):-1,c=z>0,k=z>=0&&z<rH.length-1;return G.jsxs("div",{className:"flex flex-col items-center justify-center h-full px-6 max-w-md text-center",children:[P&&G.jsx("h1",{className:"text-3xl font-pixel text-foreground tracking-wide mb-1 leading-tight",children:P.title}),G.jsx("div",{className:`text-sm font-pixel uppercase tracking-[0.2em] mb-4 ${g==="complete"?"text-primary":"text-[var(--foreground-dim)]"}`,children:T}),o&&G.jsx("p",{className:"text-xs font-mono text-[var(--foreground-dim)] mb-4 italic text-balance max-w-[320px]",children:o}),n&&Object.keys(n).length>0&&G.jsx("div",{className:"flex flex-col gap-1.5 my-2 text-sm font-mono w-full max-w-[260px]",children:Object.entries(n).map(([Y,e],J,i)=>G.jsxs("div",{className:`flex items-center justify-between gap-6 py-1 ${J<i.length-1?"border-b border-dashed border-[var(--surface-line)]":""}`,children:[G.jsx("span",{className:"uppercase text-[var(--foreground-dim)] text-xs tracking-wide",children:Y}),G.jsx("span",{className:"text-foreground",children:e})]},Y))}),G.jsxs("div",{className:"flex gap-3 mt-5 flex-wrap justify-center",children:[G.jsxs($8,{onClick:()=>D?.goToPreviousTutorialMission?.(),variant:"secondary",disabled:!c,className:"uppercase text-sm",children:[G.jsx(E9,{size:16}),"Tilbake"]}),G.jsxs($8,{onClick:()=>D?.goToNextTutorialMission?.(),disabled:!k,className:"uppercase text-sm",children:["Neste",G.jsx(ua,{size:16})]}),G.jsxs($8,{onClick:()=>D?.quitToMenu?.(),variant:"secondary",className:"uppercase text-sm",children:[G.jsx(ya,{size:16}),"Hovedmeny"]})]})]})},Gu=()=>{const v=xA(g=>g.tutorialMission);if(!v)return null;const D=fH[v];return G.jsxs("div",{className:"absolute top-3 right-3 z-30 bg-menu backdrop-blur-sm border-2 border-[var(--surface-line)] rounded-sm shadow-[0_4px_0_0_rgba(0,0,0,0.4)] px-4 py-3 max-w-[280px]",style:{minWidth:220},children:[G.jsx("div",{className:"font-pixel text-xs uppercase tracking-wider text-primary mb-2 leading-none",children:D.overlayTitle??D.title}),v===C8.MOVEMENTS&&G.jsx(Xu,{}),v===C8.BOMBS&&G.jsx(Ju,{}),v===C8.SURVIVE&&G.jsx(eu,{}),v===C8.KILL&&G.jsx(tu,{})]})},Kc=[{keys:["←"],wasdKeys:["A"],description:"Gå venstre",subTaskId:"moveLeft"},{keys:["→"],wasdKeys:["D"],description:"Gå høyre",subTaskId:"moveRight"},{keys:["↑"],wasdKeys:["W"],description:"Hopp",subTaskId:"jump"},{keys:["↑","SHIFT"],wasdKeys:["W","SHIFT"],description:"Super-hopp",subTaskId:"superJump"},{keys:["SPACE"],description:"Sveve (hold)",subTaskId:"float"},{keys:["↓"],wasdKeys:["S"],description:"Rask fall",subTaskId:"fall"}],Xu=()=>{const v=xA(n=>n.tutorialSubTasks),D=og(n=>n.input),g=n=>n==="←"||n==="A"?D.left:n==="→"||n==="D"?D.right:n==="↑"||n==="W"?D.jump:n==="↓"||n==="S"?D.fastFall:n==="SPACE"?D.float:n==="SHIFT"?D.superJump:!1,r=v.length;return G.jsx("div",{className:"space-y-0",children:Kc.map((n,P)=>{const o=v.includes(n.subTaskId),T=P>r;return G.jsxs("div",{className:`flex justify-between items-center py-2 transition-opacity ${P<Kc.length-1?"border-b border-dashed border-[var(--surface-line)]":""} ${T?"opacity-30":"opacity-100"}`,children:[G.jsx("span",{className:`font-mono text-[11px] ${o?"text-primary line-through":"text-foreground"}`,children:n.description}),G.jsxs("div",{className:"flex items-center gap-1",children:[n.keys.map((z,c)=>G.jsxs(RQ.Fragment,{children:[G.jsx(ic,{label:z,active:g(z)}),c<n.keys.length-1&&G.jsx("span",{className:"text-primary font-mono text-[10px]",children:"+"})]},`p-${c}`)),n.wasdKeys&&G.jsxs(G.Fragment,{children:[G.jsx("span",{className:"text-[var(--foreground-dim)] font-mono text-[9px] mx-0.5",children:"/"}),n.wasdKeys.map((z,c)=>G.jsxs(RQ.Fragment,{children:[G.jsx(ic,{label:z,active:g(z)}),c<n.wasdKeys.length-1&&G.jsx("span",{className:"text-primary font-mono text-[10px]",children:"+"})]},`w-${c}`))]}),o&&G.jsx(kw,{size:11,className:"text-primary ml-1"})]})]},P)})})},ic=({label:v,active:D})=>{const g=v==="SPACE"||v==="SHIFT";return G.jsx("kbd",{className:`font-mono border rounded-sm px-1.5 py-0.5 text-[10px] text-center tracking-[.05em] transition-colors ${D?"bg-primary text-primary-foreground border-primary":"bg-[var(--surface-raised)] border-[var(--surface-line)] text-foreground"} ${g?"min-w-[42px]":"min-w-[20px]"}`,children:v})},Ju=()=>{const v=xA(P=>P.bombs),D=xA(P=>P.correctOrderCount),g=v.filter(P=>P.isCollected).length,r=v.length||14,n=g===0?"Plukk hvilken som helst finansiering":"Følg den blinkende finansieringen";return G.jsxs("div",{className:"space-y-2",children:[G.jsx("p",{className:"font-mono text-[11px] text-foreground leading-snug",children:n}),G.jsxs("div",{className:"flex justify-between font-mono text-[11px] pt-1 border-t border-dashed border-[var(--surface-line)]",children:[G.jsx("span",{className:"text-[var(--foreground-dim)]",children:"Plukket"}),G.jsxs("span",{className:"text-foreground",children:[g,"/",r]})]}),G.jsxs("div",{className:"flex justify-between font-mono text-[11px]",children:[G.jsx("span",{className:"text-[var(--foreground-dim)]",children:"Riktig rekkefølge"}),G.jsxs("span",{className:"text-primary",children:[D,"/",r]})]})]})},eu=()=>{const v=xA(P=>P.tutorialMission),[D,g]=W.useState(0),[r]=W.useState(()=>Date.now());W.useEffect(()=>{if(!v)return;const o=fH[v].surviveDurationMs??3e4,T=setInterval(()=>{g(Math.max(0,o-(Date.now()-r)))},100);return g(o),()=>clearInterval(T)},[v,r]);const n=(D/1e3).toFixed(1);return G.jsxs("div",{className:"text-center space-y-1",children:[G.jsxs("div",{className:"font-pixel text-3xl text-primary tabular-nums tracking-wide",children:[n,"s"]}),G.jsxs("p",{className:"font-mono text-[10px] text-[var(--foreground-dim)] leading-snug",children:["Hold deg unna byråkratene.",G.jsx("br",{}),"Lykke til."]})]})},tu=()=>{const v=xA(D=>D.tutorialActivePcoinIndex);return G.jsxs("div",{className:"space-y-1.5",children:[G.jsx("p",{className:"font-mono text-[10px] text-[var(--foreground-dim)] leading-snug mb-1",children:"Mynten skifter farge — vent på den verdifulle."}),U0.map((D,g)=>{const r=v===g;return G.jsxs("div",{className:`flex justify-between items-center text-[11px] font-mono px-1.5 py-0.5 rounded-sm transition-colors ${r?"bg-primary/15 ring-1 ring-primary/60":""}`,children:[G.jsxs("div",{className:"flex items-center gap-2",children:[G.jsx("span",{className:"inline-block w-2.5 h-2.5 rounded-full border border-black/20",style:{backgroundColor:D.color}}),G.jsx("span",{className:r?"text-primary font-semibold":"text-foreground",children:D.label})]}),G.jsx("span",{className:`tabular-nums ${r?"text-primary":"text-[var(--foreground-dim)]"}`,children:D.durationLabel})]},g)})]})},Ku=()=>{const{currentState:v,showMenu:D}=xA(),g=RQ.useRef(null),{toggleFullscreen:r}=$f(),{isFullscreen:n}=$f();return Tu(()=>{const o=g.current?.closest("sigurd-startup");o?r(o):r()}),G.jsxs("div",{ref:g,className:"relative rounded-lg overflow-hidden shadow-lg shadow-black/10",children:[G.jsx("div",{className:"relative z-50",children:G.jsx(wu,{})}),G.jsxs("div",{className:"relative bg-black",children:[G.jsx(Oi,{}),v===uA.PLAYING&&G.jsx(nu,{}),v===uA.PLAYING&&G.jsx(Gu,{}),RD.ENABLED,G.jsxs("div",{className:`absolute bottom-3 right-3 ${n?"text-md":"text-xs"} text-muted-foreground z-40 ${n?"bottom-4":"bottom-3"}`,children:["v",bP," (Build ",zg().build,")"]}),D===TE.START&&G.jsx(K4,{children:G.jsx(ma,{})}),D===TE.COUNTDOWN&&G.jsx(K4,{children:G.jsx(qa,{})}),D===TE.CONTROLS&&G.jsx(K4,{children:G.jsx(Fu,{})}),D===TE.PAUSE&&G.jsx(K4,{children:G.jsx(su,{})}),D===TE.SETTINGS&&G.jsx(K4,{children:G.jsx(Lu,{})}),D===TE.BONUS&&G.jsx(K4,{children:G.jsx(Cu,{})}),D===TE.VICTORY&&G.jsx(K4,{children:G.jsx(zu,{})}),D===TE.GAME_OVER&&G.jsx(K4,{children:G.jsx(cu,{})}),D===TE.TUTORIAL_SELECT&&G.jsx(K4,{children:G.jsx(ku,{})}),D===TE.TUTORIAL_BRIEF&&G.jsx(K4,{children:G.jsx(ju,{})}),D===TE.TUTORIAL_RESULT&&G.jsx(K4,{children:G.jsx(Yu,{})})]})]})},iu='*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:JetBrains Mono,ui-monospace,monospace;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:JetBrains Mono,ui-monospace,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}:root,:host{--font-pixel: "Pixelify Sans", "Press Start 2P", cursive;--font-mono: "JetBrains Mono", ui-monospace, monospace;--font-lcd: "VT323", "JetBrains Mono", monospace}:root{--background-deep: #20252e;--background: #2a303c;--foreground: #ffffff;--foreground-muted: #b2ccd6;--foreground-dim: #91a6b0;--surface: #242933;--surface-raised: #2f3543;--surface-line: #3a4150;--card: var(--surface);--card-foreground: var(--foreground);--popover: var(--surface-raised);--popover-foreground: var(--foreground);--primary: #abdd64;--primary-light: #c2eb83;--primary-dark: #7fb33d;--primary-ink: hsl(86deg 70% 4%);--primary-opacity-hover: rgba(171, 221, 100, .35);--primary-foreground: hsl(86deg 70% 4%);--accent-pink: #ee90cb;--accent-pink-soft: rgba(238, 144, 203, .15);--accent-purple: #8465ec;--accent-purple-soft: rgba(132, 101, 236, .15);--accent-peach: #f2ae99;--accent-peach-soft: rgba(242, 174, 153, .15);--accent-red: #ee90cb;--accent-red-soft: rgba(238, 144, 203, .15);--secondary: #2f3543;--secondary-light: #3a4150;--secondary-dark: #242933;--secondary-foreground: var(--foreground);--muted: #242933;--muted-foreground: var(--foreground-muted);--accent: var(--primary);--accent-foreground: var(--primary-ink);--destructive: #e05555;--destructive-foreground: #ffffff;--ok: #abdd64;--ok-soft: rgba(171, 221, 100, .15);--ok-glow: rgba(171, 221, 100, .35);--border: var(--surface-line);--input: var(--surface-line);--ring: var(--primary);--radius-sm: 4px;--radius: 8px;--radius-md: 8px;--radius-lg: 12px;--radius-xl: 16px;--radius-pill: 9999px;--menu-background: rgba(36, 41, 51, .92);--sidebar-background: 218deg 18% 15%;--sidebar-foreground: 0deg 0% 100%;--sidebar-primary: 85deg 64% 63%;--sidebar-primary-foreground: 86deg 70% 4%;--sidebar-accent: 220 17% 18%;--sidebar-accent-foreground: 0deg 0% 100%;--sidebar-border: 220 14% 27%;--sidebar-ring: 85deg 64% 63%;--gradient-primary: linear-gradient(135deg, #c2eb83 0%, #7fb33d 100%);--gradient-primary-hover: linear-gradient( 135deg, #d2f59a 0%, #92c84a 100% );--gradient-sky: linear-gradient( 180deg, #2a303c 0%, #242933 60%, #20252e 100% );--gradient-brand: linear-gradient(135deg, #ee90cb 0%, #8465ec 100%);--gradient-warm: linear-gradient(135deg, #f2ae99 0%, #ee90cb 100%);--shadow-sm: 0 1px 2px rgba(0, 0, 0, .45);--shadow-base: 0 2px 4px rgba(0, 0, 0, .55);--shadow: 0 2px 4px rgba(0, 0, 0, .55);--shadow-lg: 0 4px 8px rgba(0, 0, 0, .65), 0 0 0 1px var(--surface-line) inset;--shadow-inset: inset 0 0 0 1px rgba(255, 255, 255, .05);--glow-primary: 0 0 0 2px rgba(171, 221, 100, .25), 0 0 16px rgba(171, 221, 100, .35);--glow-primary-sm: 0 0 10px rgba(171, 221, 100, .4);--glow-pink: 0 0 0 2px rgba(238, 144, 203, .25), 0 0 12px rgba(238, 144, 203, .35);--glow-purple: 0 0 0 2px rgba(132, 101, 236, .25), 0 0 12px rgba(132, 101, 236, .4);--glow-red: 0 0 12px rgba(238, 144, 203, .35);--glow-ok: 0 0 14px var(--ok-glow);--coin-lime: #abdd64;--coin-pink: #ee90cb;--coin-purple: #8465ec;--coin-peach: #f2ae99;--coin-blue: #8fb7ff;--coin-cyan: #22d3ee;--coin-yellow: #eab308;--coin-gray: #91a6b0}*{border-color:var(--border)}body{background-color:var(--background);color:var(--foreground);-webkit-font-smoothing:antialiased}:fullscreen{background:var(--background)}:-webkit-full-screen{background:var(--background)}:-moz-full-screen{background:var(--background)}:-ms-fullscreen{background:var(--background)}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{inset:0}.inset-4{inset:1rem}.inset-y-0{top:0;bottom:0}.bottom-2{bottom:.5rem}.bottom-3{bottom:.75rem}.bottom-4{bottom:1rem}.left-0{left:0}.left-1{left:.25rem}.left-1\\/2{left:50%}.left-3{left:.75rem}.right-3{right:.75rem}.top-1{top:.25rem}.top-1\\/2{top:50%}.top-3{top:.75rem}.z-30{z-index:30}.z-40{z-index:40}.z-50{z-index:50}.z-\\[1000\\]{z-index:1000}.float-right{float:right}.float-left{float:left}.mx-0\\.5{margin-left:.125rem;margin-right:.125rem}.mx-1{margin-left:.25rem;margin-right:.25rem}.my-2{margin-top:.5rem;margin-bottom:.5rem}.mb-1{margin-bottom:.25rem}.mb-1\\.5{margin-bottom:.375rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-5{margin-bottom:1.25rem}.mb-6{margin-bottom:1.5rem}.mb-8{margin-bottom:2rem}.ml-1{margin-left:.25rem}.ml-2{margin-left:.5rem}.ml-auto{margin-left:auto}.mr-2{margin-right:.5rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-5{margin-top:1.25rem}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.hidden{display:none}.h-1\\.5{height:.375rem}.h-10{height:2.5rem}.h-11{height:2.75rem}.h-12{height:3rem}.h-2\\.5{height:.625rem}.h-24{height:6rem}.h-3{height:.75rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-7{height:1.75rem}.h-9{height:2.25rem}.h-full{height:100%}.min-h-screen{min-height:100vh}.w-1\\.5{width:.375rem}.w-10{width:2.5rem}.w-12{width:3rem}.w-2\\.5{width:.625rem}.w-24{width:6rem}.w-3{width:.75rem}.w-4{width:1rem}.w-64{width:16rem}.w-7{width:1.75rem}.w-\\[1px\\]{width:1px}.w-\\[70\\%\\]{width:70%}.w-\\[80\\%\\]{width:80%}.w-full{width:100%}.w-px{width:1px}.min-w-\\[20px\\]{min-width:20px}.min-w-\\[30px\\]{min-width:30px}.min-w-\\[42px\\]{min-width:42px}.min-w-\\[90px\\]{min-width:90px}.max-w-2xl{max-width:42rem}.max-w-\\[260px\\]{max-width:260px}.max-w-\\[280px\\]{max-width:280px}.max-w-\\[320px\\]{max-width:320px}.max-w-\\[340px\\]{max-width:340px}.max-w-lg{max-width:32rem}.max-w-md{max-width:28rem}.flex-1{flex:1 1 0%}.shrink-0{flex-shrink:0}.-translate-x-1\\/2{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.\\!resize{resize:both!important}.resize{resize:both}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-1\\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-5{gap:1.25rem}.gap-6{gap:1.5rem}.space-y-0>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(0px * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(0px * var(--tw-space-y-reverse))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-1\\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.375rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.375rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.text-balance{text-wrap:balance}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-sm{border-radius:calc(var(--radius) - 4px)}.rounded-xl{border-radius:.75rem}.rounded-t-lg{border-top-left-radius:var(--radius);border-top-right-radius:var(--radius)}.border{border-width:1px}.border-2{border-width:2px}.border-4{border-width:4px}.border-b{border-bottom-width:1px}.border-b-\\[3px\\]{border-bottom-width:3px}.border-t{border-top-width:1px}.border-t-2{border-top-width:2px}.border-dashed{border-style:dashed}.border-\\[var\\(--surface-line\\)\\]{border-color:var(--surface-line)}.border-black\\/20{border-color:#0003}.border-destructive{border-color:var(--destructive)}.border-foreground{border-color:var(--foreground)}.border-primary-dark{border-color:var(--primary-dark)}.border-red-600{--tw-border-opacity: 1;border-color:rgb(220 38 38 / var(--tw-border-opacity, 1))}.border-b-transparent{border-bottom-color:transparent}.border-l-transparent{border-left-color:transparent}.border-r-transparent{border-right-color:transparent}.border-t-primary{border-top-color:var(--primary)}.bg-\\[var\\(--background-deep\\)\\]{background-color:var(--background-deep)}.bg-\\[var\\(--surface\\)\\]{background-color:var(--surface)}.bg-\\[var\\(--surface-line\\)\\]{background-color:var(--surface-line)}.bg-\\[var\\(--surface-raised\\)\\]{background-color:var(--surface-raised)}.bg-background{background-color:var(--background)}.bg-black{--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity, 1))}.bg-black\\/80{background-color:#000c}.bg-card{background-color:var(--card)}.bg-destructive{background-color:var(--destructive)}.bg-gray-500{--tw-bg-opacity: 1;background-color:rgb(107 114 128 / var(--tw-bg-opacity, 1))}.bg-menu{background-color:var(--menu-background)}.bg-popover{background-color:var(--popover)}.bg-primary{background-color:var(--primary)}.bg-primary-dark{background-color:var(--primary-dark)}.bg-primary-light{background-color:var(--primary-light)}.bg-red-500{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity, 1))}.bg-red-600{--tw-bg-opacity: 1;background-color:rgb(220 38 38 / var(--tw-bg-opacity, 1))}.bg-secondary{background-color:var(--secondary)}.bg-transparent{background-color:transparent}.p-0{padding:0}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.p-8{padding:2rem}.px-1\\.5{padding-left:.375rem;padding-right:.375rem}.px-10{padding-left:2.5rem;padding-right:2.5rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-8{padding-left:2rem;padding-right:2rem}.py-0\\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\\.5{padding-top:.375rem;padding-bottom:.375rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.pt-1{padding-top:.25rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.font-mono{font-family:JetBrains Mono,ui-monospace,monospace}.font-pixel{font-family:Pixelify Sans,Press Start 2P,cursive}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-4xl{font-size:2.25rem;line-height:2.5rem}.text-5xl{font-size:3rem;line-height:1}.text-8xl{font-size:6rem;line-height:1}.text-\\[10px\\]{font-size:10px}.text-\\[11px\\]{font-size:11px}.text-\\[9px\\]{font-size:9px}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.italic{font-style:italic}.tabular-nums{--tw-numeric-spacing: tabular-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.leading-none{line-height:1}.leading-relaxed{line-height:1.625}.leading-snug{line-height:1.375}.leading-tight{line-height:1.25}.tracking-\\[\\.05em\\]{letter-spacing:.05em}.tracking-\\[0\\.2em\\]{letter-spacing:.2em}.tracking-normal{letter-spacing:0em}.tracking-wide{letter-spacing:.025em}.tracking-wider{letter-spacing:.05em}.tracking-widest{letter-spacing:.1em}.text-\\[var\\(--accent-pink\\)\\]{color:var(--accent-pink)}.text-\\[var\\(--accent-red\\)\\]{color:var(--accent-red)}.text-\\[var\\(--foreground-dim\\)\\]{color:var(--foreground-dim)}.text-\\[var\\(--foreground-muted\\)\\]{color:var(--foreground-muted)}.text-\\[var\\(--primary-light\\)\\]{color:var(--primary-light)}.text-amber-700{--tw-text-opacity: 1;color:rgb(180 83 9 / var(--tw-text-opacity, 1))}.text-destructive{color:var(--destructive)}.text-destructive-foreground{color:var(--destructive-foreground)}.text-foreground{color:var(--foreground)}.text-gray-300{--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity, 1))}.text-popover-foreground{color:var(--popover-foreground)}.text-primary-foreground{color:var(--primary-foreground)}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.underline{text-decoration-line:underline}.line-through{text-decoration-line:line-through}.underline-offset-2{text-underline-offset:2px}.underline-offset-4{text-underline-offset:4px}.accent-primary{accent-color:var(--primary)}.opacity-100{opacity:1}.opacity-30{opacity:.3}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-\\[0_3px_0_0_rgba\\(0\\,0\\,0\\,0\\.3\\)\\]{--tw-shadow: 0 3px 0 0 rgba(0,0,0,.3);--tw-shadow-colored: 0 3px 0 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-\\[0_4px_0_0_rgba\\(0\\,0\\,0\\,0\\.4\\)\\]{--tw-shadow: 0 4px 0 0 rgba(0,0,0,.4);--tw-shadow-colored: 0 4px 0 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-\\[0_4px_0_0_var\\(--primary-ink\\)\\,0_0_16px_rgba\\(171\\,221\\,100\\,0\\.3\\)\\]{--tw-shadow: 0 4px 0 0 var(--primary-ink),0 0 16px rgba(171,221,100,.3);--tw-shadow-colored: 0 4px 0 0 var(--tw-shadow-color), 0 0 16px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-\\[0_4px_0_0_var\\(--surface-line\\)\\]{--tw-shadow: 0 4px 0 0 var(--surface-line);--tw-shadow-colored: 0 4px 0 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-black\\/10{--tw-shadow-color: rgb(0 0 0 / .1);--tw-shadow: var(--tw-shadow-colored)}.outline{outline-style:solid}.ring{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-1{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-offset-background{--tw-ring-offset-color: var(--background)}.blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.invert{--tw-invert: invert(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-blur-sm{--tw-backdrop-blur: blur(4px);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-150{transition-duration:.15s}.duration-300{transition-duration:.3s}.duration-500{transition-duration:.5s}.ease-in{transition-timing-function:cubic-bezier(.4,0,1,1)}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}@keyframes enter{0%{opacity:var(--tw-enter-opacity, 1);transform:translate3d(var(--tw-enter-translate-x, 0),var(--tw-enter-translate-y, 0),0) scale3d(var(--tw-enter-scale, 1),var(--tw-enter-scale, 1),var(--tw-enter-scale, 1)) rotate(var(--tw-enter-rotate, 0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity, 1);transform:translate3d(var(--tw-exit-translate-x, 0),var(--tw-exit-translate-y, 0),0) scale3d(var(--tw-exit-scale, 1),var(--tw-exit-scale, 1),var(--tw-exit-scale, 1)) rotate(var(--tw-exit-rotate, 0))}}.animate-in{animation-name:enter;animation-duration:.15s;--tw-enter-opacity: initial;--tw-enter-scale: initial;--tw-enter-rotate: initial;--tw-enter-translate-x: initial;--tw-enter-translate-y: initial}.fade-in-0{--tw-enter-opacity: 0}.zoom-in-95{--tw-enter-scale: .95}.duration-150{animation-duration:.15s}.duration-300{animation-duration:.3s}.duration-500{animation-duration:.5s}.ease-in{animation-timing-function:cubic-bezier(.4,0,1,1)}.ease-in-out{animation-timing-function:cubic-bezier(.4,0,.2,1)}.ease-out{animation-timing-function:cubic-bezier(0,0,.2,1)}.\\!running{animation-play-state:running!important}.running{animation-play-state:running}.paused{animation-play-state:paused}.text-muted-foreground{color:var(--muted-foreground)}.text-primary{color:var(--primary)}.border-primary{border-color:var(--primary)}.border-secondary{border-color:var(--secondary)}.border-surface-line{border-color:var(--surface-line)}.arcade-press:active{transform:translateY(3px);box-shadow:none!important}.paper-grain{position:relative}.paper-grain:before{content:"";position:absolute;inset:0;z-index:0;pointer-events:none;background:repeating-linear-gradient(0deg,transparent,transparent 2px,rgba(255,255,255,.018) 2px,rgba(255,255,255,.018) 3px),repeating-linear-gradient(90deg,transparent,transparent 3px,rgba(255,255,255,.012) 3px,rgba(255,255,255,.012) 4px)}@keyframes crt-flicker{0%,to{opacity:1}92%{opacity:1}94%{opacity:.92}96%{opacity:1}98%{opacity:.95}}.flicker{animation:crt-flicker 6s infinite}@keyframes caret-blink{0%,49%{opacity:1}50%,to{opacity:0}}.caret:after{content:"█";display:inline-block;margin-left:4px;animation:caret-blink 1s steps(2) infinite;color:var(--primary)}@keyframes menu-blur-out{to{backdrop-filter:blur(0px);-webkit-backdrop-filter:blur(0px);background-color:transparent}}.menu-blur-out{animation:menu-blur-out 3s linear forwards}@keyframes marquee-scroll{0%{transform:translate(0)}to{transform:translate(-50%)}}.marquee{font-family:var(--font-pixel, "Pixelify Sans", cursive);font-size:14px;letter-spacing:.1em;color:var(--primary-ink);background:var(--primary);border-top:2px solid var(--primary-dark);border-bottom:2px solid var(--primary-dark);overflow:hidden;white-space:nowrap}.marquee-inner{display:inline-block;padding-left:100%;animation:marquee-scroll 40s linear infinite}.marquee-filled{display:inline-flex;animation:marquee-scroll 40s linear infinite}.hover\\:bg-\\[var\\(--surface-raised\\)\\]:hover{background-color:var(--surface-raised)}.hover\\:text-foreground:hover{color:var(--foreground)}.hover\\:text-white:hover{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.hover\\:underline:hover{text-decoration-line:underline}.hover\\:text-primary:hover{color:var(--primary)}.focus-visible\\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\\:ring-2:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-visible\\:ring-ring:focus-visible{--tw-ring-color: var(--ring)}.focus-visible\\:ring-offset-2:focus-visible{--tw-ring-offset-width: 2px}.disabled\\:pointer-events-none:disabled{pointer-events:none}.disabled\\:opacity-50:disabled{opacity:.5}.data-\\[state\\=closed\\]\\:animate-out[data-state=closed]{animation-name:exit;animation-duration:.15s;--tw-exit-opacity: initial;--tw-exit-scale: initial;--tw-exit-rotate: initial;--tw-exit-translate-x: initial;--tw-exit-translate-y: initial}.data-\\[state\\=closed\\]\\:fade-out-0[data-state=closed]{--tw-exit-opacity: 0}.data-\\[state\\=closed\\]\\:zoom-out-95[data-state=closed]{--tw-exit-scale: .95}.data-\\[side\\=bottom\\]\\:slide-in-from-top-2[data-side=bottom]{--tw-enter-translate-y: -.5rem}.data-\\[side\\=left\\]\\:slide-in-from-right-2[data-side=left]{--tw-enter-translate-x: .5rem}.data-\\[side\\=right\\]\\:slide-in-from-left-2[data-side=right]{--tw-enter-translate-x: -.5rem}.data-\\[side\\=top\\]\\:slide-in-from-bottom-2[data-side=top]{--tw-enter-translate-y: .5rem}.\\[\\&_svg\\]\\:pointer-events-none svg{pointer-events:none}.\\[\\&_svg\\]\\:size-4 svg{width:1rem;height:1rem}.\\[\\&_svg\\]\\:shrink-0 svg{flex-shrink:0}',YP="data-sigurd-fonts",au=()=>{if(typeof document>"u"||document.head.querySelector(`link[${YP}]`))return;const v=["https://fonts.googleapis.com/css2?family=Pixelify+Sans:wght@400..700&display=swap","https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,100..800;1,100..800&display=swap","https://fonts.googleapis.com/css2?family=VT323&display=swap"],D=document.createElement("link");D.rel="preconnect",D.href="https://fonts.gstatic.com",D.crossOrigin="anonymous",D.setAttribute(YP,""),document.head.appendChild(D);for(const g of v){const r=document.createElement("link");r.rel="stylesheet",r.href=g,r.setAttribute(YP,""),document.head.appendChild(r)}};class lu extends HTMLElement{constructor(){super(...arguments);p(this,"root",null)}connectedCallback(){sK(),au();const g=this.attachShadow({mode:"open"}),r=document.createElement("div");g.appendChild(r);const n=document.createElement("style");n.textContent=iu,g.appendChild(n),this.root=Sf.createRoot(r),this.root.render(G.jsx(Ku,{})),tc(),this.setAttribute("data-version",zg().version),this.setAttribute("data-build",zg().build.toString())}disconnectedCallback(){this.root&&(this.root.unmount(),this.root=null)}getVersion(){return zg()}isCompatible(g){const r=zg(),[n,P,o]=r.version.split(".").map(Number),[T,z,c]=g.split(".").map(Number);return n>T?!0:n<T?!1:P>z?!0:P<z?!1:o>=c}}customElements.define("sigurd-startup",lu);const uu={getVersion:zg,ASSET_PATHS:a0,getBackgroundImagePath:Cw};CD.ASSET_PATHS=a0,CD.default=uu,CD.getBackgroundImagePath=Cw,CD.getVersion=zg,CD.logVersion=tc,Object.defineProperties(CD,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
355
+ */const da=$7("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),ma=()=>{const{gameStateManager:v}=xA.getState(),{balance:D,hasBridge:g,insufficientFunds:r}=_I(),[n,P]=W.useState(!1),o=async()=>{if(!n){if(g){P(!0);const k=await Uw(1);if(P(!1),!k.success){_I.getState().setInsufficientFunds(!0);return}}v?.startNewGame()}},T=()=>{v?.openSettings()},z=()=>{v?.openControls()},c=()=>{v?.openTutorialSelect?.()};return G.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[G.jsxs("div",{className:"text-center mb-8",children:[G.jsx("h1",{className:"text-4xl font-pixel text-foreground tracking-wide mb-2",children:"SIGURD STARTUP"}),G.jsx("p",{className:"text-sm text-[var(--foreground-dim)]",children:"Samle så mye finansiering som mulig!"}),g&&D!==null&&G.jsxs("div",{className:"mt-3 flex items-center justify-center gap-2 text-sm font-mono",children:[G.jsx(Va,{size:16,className:"text-primary"}),G.jsxs("span",{className:"text-foreground",children:[D," ",D===1?"mynt":"mynter"]})]})]}),G.jsxs("div",{className:"space-y-3 w-[70%]",children:[r&&g?G.jsxs("div",{className:"text-center py-3 px-4 bg-[var(--accent-red)]/10 border border-[var(--accent-red)]/30 rounded-sm",children:[G.jsx("p",{className:"text-[var(--accent-red)] font-pixel text-sm",children:"IKKE NOK MYNTER"}),G.jsx("p",{className:"text-[var(--foreground-dim)] text-xs font-mono mt-1",children:"Kjøp flere mynter for å spille"})]}):G.jsxs($8,{onClick:o,disabled:n||g&&r,className:`w-full uppercase text-lg ${n?"opacity-70":""}`,children:[G.jsx(jw,{size:20}),n?"Venter...":g?"Spill (1 mynt)":"Press Start"]}),G.jsxs($8,{onClick:T,variant:"secondary",className:"w-full uppercase",children:[G.jsx(Kz,{size:20}),"Innstillinger"]}),G.jsxs($8,{onClick:z,variant:"secondary",className:"w-full uppercase",children:[G.jsx(xa,{size:20}),"Kontroller"]}),G.jsxs($8,{onClick:c,variant:"secondary",className:"w-full uppercase",children:[G.jsx(tz,{size:20}),"Sandkassa"]})]})]})},qa=()=>{const[v,D]=W.useState(3),{currentMap:g}=c8();return W.useEffect(()=>{{const r=setInterval(()=>{D(n=>n>1?n-1:0)},1e3);return()=>clearInterval(r)}},[]),v===0?null:G.jsxs("div",{className:"text-center",children:[G.jsx("div",{className:"text-8xl font-pixel text-primary",style:{textShadow:"0 0 24px rgba(171,221,100,.4)"},children:v}),G.jsxs("div",{className:"flex items-center justify-center gap-2 mt-2",children:[G.jsx("div",{className:"w-1.5 h-1.5 bg-primary rounded-full animate-pulse"}),G.jsx("p",{className:"text-xl text-foreground uppercase font-pixel tracking-wider",children:g?.name}),G.jsx("div",{className:"w-1.5 h-1.5 bg-primary rounded-full animate-pulse"})]})]})};function Wa(v,D=.12){const[g,r]=W.useState(v),n=W.useRef(0),P=W.useRef(v);return W.useEffect(()=>{let o=!0;const T=()=>{if(!o)return;const z=v-P.current;if(Math.abs(z)<1){P.current=v,r(v);return}P.current+=z*D,r(Math.round(P.current)),n.current=requestAnimationFrame(T)};return n.current=requestAnimationFrame(T),()=>{o=!1,cancelAnimationFrame(n.current)}},[v,D]),g}const Za=()=>{const v=xA(n=>n.tutorialMission),{gameStateManager:D}=xA.getState();if(!v)return null;const g=fH[v],r=rH.indexOf(v);return G.jsxs("div",{className:"flex items-center gap-3 w-full",children:[G.jsxs("div",{className:"text-xs font-mono text-[var(--foreground-dim)] uppercase tracking-wide whitespace-nowrap",children:["Oppdrag ",G.jsx("span",{className:"text-foreground font-pixel",children:r+1})]}),G.jsx("div",{className:"w-px h-5 bg-[var(--surface-line)] shrink-0"}),G.jsx("div",{className:"font-pixel text-sm text-foreground tracking-wider truncate",children:g.title}),G.jsx("button",{onClick:()=>D?.skipTutorialMission?.(),className:"ml-auto text-xs font-mono text-[var(--foreground-dim)] underline underline-offset-2 hover:text-primary cursor-pointer whitespace-nowrap",children:"Hopp over"})]})};function r3(v,D,{checkForDefaultPrevented:g=!0}={}){return function(n){if(v?.(n),g===!1||!n.defaultPrevented)return D?.(n)}}function iz(v,D=[]){let g=[];function r(P,o){const T=W.createContext(o),z=g.length;g=[...g,o];const c=Y=>{const{scope:e,children:J,...i}=Y,R=e?.[v]?.[z]||T,q=W.useMemo(()=>i,Object.values(i));return G.jsx(R.Provider,{value:q,children:J})};c.displayName=P+"Provider";function k(Y,e){const J=e?.[v]?.[z]||T,i=W.useContext(J);if(i)return i;if(o!==void 0)return o;throw new Error(`\`${Y}\` must be used within \`${P}\``)}return[c,k]}const n=()=>{const P=g.map(o=>W.createContext(o));return function(T){const z=T?.[v]||P;return W.useMemo(()=>({[`__scope${v}`]:{...T,[v]:z}}),[T,z])}};return n.scopeName=v,[r,_a(n,...D)]}function _a(...v){const D=v[0];if(v.length===1)return D;const g=()=>{const r=v.map(n=>({useScope:n(),scopeName:n.scopeName}));return function(P){const o=r.reduce((T,{useScope:z,scopeName:c})=>{const Y=z(P)[`__scope${c}`];return{...T,...Y}},{});return W.useMemo(()=>({[`__scope${D.scopeName}`]:o}),[o])}};return g.scopeName=D.scopeName,g}var $a=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],sB=$a.reduce((v,D)=>{const g=fz(`Primitive.${D}`),r=W.forwardRef((n,P)=>{const{asChild:o,...T}=n,z=o?g:D;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),G.jsx(z,{...T,ref:P})});return r.displayName=`Primitive.${D}`,{...v,[D]:r}},{});function A1(v,D){v&&ow.flushSync(()=>v.dispatchEvent(D))}function bw(v){const D=W.useRef(v);return W.useEffect(()=>{D.current=v}),W.useMemo(()=>(...g)=>D.current?.(...g),[])}function E1(v,D=globalThis?.document){const g=bw(v);W.useEffect(()=>{const r=n=>{n.key==="Escape"&&g(n)};return D.addEventListener("keydown",r,{capture:!0}),()=>D.removeEventListener("keydown",r,{capture:!0})},[g,D])}var D1="DismissableLayer",HP="dismissableLayer.update",I1="dismissableLayer.pointerDownOutside",H1="dismissableLayer.focusOutside",az,lz=W.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),uz=W.forwardRef((v,D)=>{const{disableOutsidePointerEvents:g=!1,onEscapeKeyDown:r,onPointerDownOutside:n,onFocusOutside:P,onInteractOutside:o,onDismiss:T,...z}=v,c=W.useContext(lz),[k,Y]=W.useState(null),e=k?.ownerDocument??globalThis?.document,[,J]=W.useState({}),i=Lg(D,sA=>Y(sA)),R=Array.from(c.layers),[q]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),fA=R.indexOf(q),gA=k?R.indexOf(k):-1,QA=c.layersWithOutsidePointerEventsDisabled.size>0,oA=gA>=fA,BA=Q1(sA=>{const LA=sA.target,JA=[...c.branches].some(iA=>iA.contains(LA));!oA||JA||(n?.(sA),o?.(sA),sA.defaultPrevented||T?.())},e),cA=v1(sA=>{const LA=sA.target;[...c.branches].some(iA=>iA.contains(LA))||(P?.(sA),o?.(sA),sA.defaultPrevented||T?.())},e);return E1(sA=>{gA===c.layers.size-1&&(r?.(sA),!sA.defaultPrevented&&T&&(sA.preventDefault(),T()))},e),W.useEffect(()=>{if(k)return g&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(az=e.body.style.pointerEvents,e.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(k)),c.layers.add(k),Vz(),()=>{g&&c.layersWithOutsidePointerEventsDisabled.size===1&&(e.body.style.pointerEvents=az)}},[k,e,g,c]),W.useEffect(()=>()=>{k&&(c.layers.delete(k),c.layersWithOutsidePointerEventsDisabled.delete(k),Vz())},[k,c]),W.useEffect(()=>{const sA=()=>J({});return document.addEventListener(HP,sA),()=>document.removeEventListener(HP,sA)},[]),G.jsx(sB.div,{...z,ref:i,style:{pointerEvents:QA?oA?"auto":"none":void 0,...v.style},onFocusCapture:r3(v.onFocusCapture,cA.onFocusCapture),onBlurCapture:r3(v.onBlurCapture,cA.onBlurCapture),onPointerDownCapture:r3(v.onPointerDownCapture,BA.onPointerDownCapture)})});uz.displayName=D1;var B1="DismissableLayerBranch",g1=W.forwardRef((v,D)=>{const g=W.useContext(lz),r=W.useRef(null),n=Lg(D,r);return W.useEffect(()=>{const P=r.current;if(P)return g.branches.add(P),()=>{g.branches.delete(P)}},[g.branches]),G.jsx(sB.div,{...v,ref:n})});g1.displayName=B1;function Q1(v,D=globalThis?.document){const g=bw(v),r=W.useRef(!1),n=W.useRef(()=>{});return W.useEffect(()=>{const P=T=>{if(T.target&&!r.current){let z=function(){Rz(I1,g,c,{discrete:!0})};const c={originalEvent:T};T.pointerType==="touch"?(D.removeEventListener("click",n.current),n.current=z,D.addEventListener("click",n.current,{once:!0})):z()}else D.removeEventListener("click",n.current);r.current=!1},o=window.setTimeout(()=>{D.addEventListener("pointerdown",P)},0);return()=>{window.clearTimeout(o),D.removeEventListener("pointerdown",P),D.removeEventListener("click",n.current)}},[D,g]),{onPointerDownCapture:()=>r.current=!0}}function v1(v,D=globalThis?.document){const g=bw(v),r=W.useRef(!1);return W.useEffect(()=>{const n=P=>{P.target&&!r.current&&Rz(H1,g,{originalEvent:P},{discrete:!1})};return D.addEventListener("focusin",n),()=>D.removeEventListener("focusin",n)},[D,g]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Vz(){const v=new CustomEvent(HP);document.dispatchEvent(v)}function Rz(v,D,g,{discrete:r}){const n=g.originalEvent.target,P=new CustomEvent(v,{bubbles:!1,cancelable:!0,detail:g});D&&n.addEventListener(v,D,{once:!0}),r?A1(n,P):n.dispatchEvent(P)}var oB=globalThis?.document?W.useLayoutEffect:()=>{},f1=I0[" useId ".trim().toString()]||(()=>{}),r1=0;function w1(v){const[D,g]=W.useState(f1());return oB(()=>{g(r=>r??String(r1++))},[v]),D?`radix-${D}`:""}const n1=["top","right","bottom","left"],PB=Math.min,XI=Math.max,Yw=Math.round,Gw=Math.floor,sH=v=>({x:v,y:v}),s1={left:"right",right:"left",bottom:"top",top:"bottom"},o1={start:"end",end:"start"};function BP(v,D,g){return XI(v,PB(D,g))}function w3(v,D){return typeof v=="function"?v(D):v}function n3(v){return v.split("-")[0]}function dQ(v){return v.split("-")[1]}function gP(v){return v==="x"?"y":"x"}function QP(v){return v==="y"?"height":"width"}const P1=new Set(["top","bottom"]);function oH(v){return P1.has(n3(v))?"y":"x"}function vP(v){return gP(oH(v))}function L1(v,D,g){g===void 0&&(g=!1);const r=dQ(v),n=vP(v),P=QP(n);let o=n==="x"?r===(g?"end":"start")?"right":"left":r==="start"?"bottom":"top";return D.reference[P]>D.floating[P]&&(o=Xw(o)),[o,Xw(o)]}function M1(v){const D=Xw(v);return[fP(v),D,fP(D)]}function fP(v){return v.replace(/start|end/g,D=>o1[D])}const yz=["left","right"],xz=["right","left"],C1=["top","bottom"],z1=["bottom","top"];function c1(v,D,g){switch(v){case"top":case"bottom":return g?D?xz:yz:D?yz:xz;case"left":case"right":return D?C1:z1;default:return[]}}function U1(v,D,g,r){const n=dQ(v);let P=c1(n3(v),g==="start",r);return n&&(P=P.map(o=>o+"-"+n),D&&(P=P.concat(P.map(fP)))),P}function Xw(v){return v.replace(/left|right|bottom|top/g,D=>s1[D])}function T1(v){return{top:0,right:0,bottom:0,left:0,...v}}function hz(v){return typeof v!="number"?T1(v):{top:v,right:v,bottom:v,left:v}}function Jw(v){const{x:D,y:g,width:r,height:n}=v;return{width:r,height:n,top:g,left:D,right:D+r,bottom:g+n,x:D,y:g}}function Sz(v,D,g){let{reference:r,floating:n}=v;const P=oH(D),o=vP(D),T=QP(o),z=n3(D),c=P==="y",k=r.x+r.width/2-n.width/2,Y=r.y+r.height/2-n.height/2,e=r[T]/2-n[T]/2;let J;switch(z){case"top":J={x:k,y:r.y-n.height};break;case"bottom":J={x:k,y:r.y+r.height};break;case"right":J={x:r.x+r.width,y:Y};break;case"left":J={x:r.x-n.width,y:Y};break;default:J={x:r.x,y:r.y}}switch(dQ(D)){case"start":J[o]-=e*(g&&c?-1:1);break;case"end":J[o]+=e*(g&&c?-1:1);break}return J}const F1=async(v,D,g)=>{const{placement:r="bottom",strategy:n="absolute",middleware:P=[],platform:o}=g,T=P.filter(Boolean),z=await(o.isRTL==null?void 0:o.isRTL(D));let c=await o.getElementRects({reference:v,floating:D,strategy:n}),{x:k,y:Y}=Sz(c,r,z),e=r,J={},i=0;for(let R=0;R<T.length;R++){const{name:q,fn:fA}=T[R],{x:gA,y:QA,data:oA,reset:BA}=await fA({x:k,y:Y,initialPlacement:r,placement:e,strategy:n,middlewareData:J,rects:c,platform:o,elements:{reference:v,floating:D}});k=gA??k,Y=QA??Y,J={...J,[q]:{...J[q],...oA}},BA&&i<=50&&(i++,typeof BA=="object"&&(BA.placement&&(e=BA.placement),BA.rects&&(c=BA.rects===!0?await o.getElementRects({reference:v,floating:D,strategy:n}):BA.rects),{x:k,y:Y}=Sz(c,e,z)),R=-1)}return{x:k,y:Y,placement:e,strategy:n,middlewareData:J}};async function D9(v,D){var g;D===void 0&&(D={});const{x:r,y:n,platform:P,rects:o,elements:T,strategy:z}=v,{boundary:c="clippingAncestors",rootBoundary:k="viewport",elementContext:Y="floating",altBoundary:e=!1,padding:J=0}=w3(D,v),i=hz(J),q=T[e?Y==="floating"?"reference":"floating":Y],fA=Jw(await P.getClippingRect({element:(g=await(P.isElement==null?void 0:P.isElement(q)))==null||g?q:q.contextElement||await(P.getDocumentElement==null?void 0:P.getDocumentElement(T.floating)),boundary:c,rootBoundary:k,strategy:z})),gA=Y==="floating"?{x:r,y:n,width:o.floating.width,height:o.floating.height}:o.reference,QA=await(P.getOffsetParent==null?void 0:P.getOffsetParent(T.floating)),oA=await(P.isElement==null?void 0:P.isElement(QA))?await(P.getScale==null?void 0:P.getScale(QA))||{x:1,y:1}:{x:1,y:1},BA=Jw(P.convertOffsetParentRelativeRectToViewportRelativeRect?await P.convertOffsetParentRelativeRectToViewportRelativeRect({elements:T,rect:gA,offsetParent:QA,strategy:z}):gA);return{top:(fA.top-BA.top+i.top)/oA.y,bottom:(BA.bottom-fA.bottom+i.bottom)/oA.y,left:(fA.left-BA.left+i.left)/oA.x,right:(BA.right-fA.right+i.right)/oA.x}}const k1=v=>({name:"arrow",options:v,async fn(D){const{x:g,y:r,placement:n,rects:P,platform:o,elements:T,middlewareData:z}=D,{element:c,padding:k=0}=w3(v,D)||{};if(c==null)return{};const Y=hz(k),e={x:g,y:r},J=vP(n),i=QP(J),R=await o.getDimensions(c),q=J==="y",fA=q?"top":"left",gA=q?"bottom":"right",QA=q?"clientHeight":"clientWidth",oA=P.reference[i]+P.reference[J]-e[J]-P.floating[i],BA=e[J]-P.reference[J],cA=await(o.getOffsetParent==null?void 0:o.getOffsetParent(c));let sA=cA?cA[QA]:0;(!sA||!await(o.isElement==null?void 0:o.isElement(cA)))&&(sA=T.floating[QA]||P.floating[i]);const LA=oA/2-BA/2,JA=sA/2-R[i]/2-1,iA=PB(Y[fA],JA),OA=PB(Y[gA],JA),eA=iA,XA=sA-R[i]-OA,WA=sA/2-R[i]/2+LA,HE=BP(eA,WA,XA),hA=!z.arrow&&dQ(n)!=null&&WA!==HE&&P.reference[i]/2-(WA<eA?iA:OA)-R[i]/2<0,UA=hA?WA<eA?WA-eA:WA-XA:0;return{[J]:e[J]+UA,data:{[J]:HE,centerOffset:WA-HE-UA,...hA&&{alignmentOffset:UA}},reset:hA}}}),j1=function(v){return v===void 0&&(v={}),{name:"flip",options:v,async fn(D){var g,r;const{placement:n,middlewareData:P,rects:o,initialPlacement:T,platform:z,elements:c}=D,{mainAxis:k=!0,crossAxis:Y=!0,fallbackPlacements:e,fallbackStrategy:J="bestFit",fallbackAxisSideDirection:i="none",flipAlignment:R=!0,...q}=w3(v,D);if((g=P.arrow)!=null&&g.alignmentOffset)return{};const fA=n3(n),gA=oH(T),QA=n3(T)===T,oA=await(z.isRTL==null?void 0:z.isRTL(c.floating)),BA=e||(QA||!R?[Xw(T)]:M1(T)),cA=i!=="none";!e&&cA&&BA.push(...U1(T,R,i,oA));const sA=[T,...BA],LA=await D9(D,q),JA=[];let iA=((r=P.flip)==null?void 0:r.overflows)||[];if(k&&JA.push(LA[fA]),Y){const WA=L1(n,o,oA);JA.push(LA[WA[0]],LA[WA[1]])}if(iA=[...iA,{placement:n,overflows:JA}],!JA.every(WA=>WA<=0)){var OA,eA;const WA=(((OA=P.flip)==null?void 0:OA.index)||0)+1,HE=sA[WA];if(HE&&(!(Y==="alignment"?gA!==oH(HE):!1)||iA.every(m=>oH(m.placement)===gA?m.overflows[0]>0:!0)))return{data:{index:WA,overflows:iA},reset:{placement:HE}};let hA=(eA=iA.filter(UA=>UA.overflows[0]<=0).sort((UA,m)=>UA.overflows[1]-m.overflows[1])[0])==null?void 0:eA.placement;if(!hA)switch(J){case"bestFit":{var XA;const UA=(XA=iA.filter(m=>{if(cA){const tA=oH(m.placement);return tA===gA||tA==="y"}return!0}).map(m=>[m.placement,m.overflows.filter(tA=>tA>0).reduce((tA,bA)=>tA+bA,0)]).sort((m,tA)=>m[1]-tA[1])[0])==null?void 0:XA[0];UA&&(hA=UA);break}case"initialPlacement":hA=T;break}if(n!==hA)return{reset:{placement:hA}}}return{}}}};function Oz(v,D){return{top:v.top-D.height,right:v.right-D.width,bottom:v.bottom-D.height,left:v.left-D.width}}function Nz(v){return n1.some(D=>v[D]>=0)}const b1=function(v){return v===void 0&&(v={}),{name:"hide",options:v,async fn(D){const{rects:g}=D,{strategy:r="referenceHidden",...n}=w3(v,D);switch(r){case"referenceHidden":{const P=await D9(D,{...n,elementContext:"reference"}),o=Oz(P,g.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:Nz(o)}}}case"escaped":{const P=await D9(D,{...n,altBoundary:!0}),o=Oz(P,g.floating);return{data:{escapedOffsets:o,escaped:Nz(o)}}}default:return{}}}}},pz=new Set(["left","top"]);async function Y1(v,D){const{placement:g,platform:r,elements:n}=v,P=await(r.isRTL==null?void 0:r.isRTL(n.floating)),o=n3(g),T=dQ(g),z=oH(g)==="y",c=pz.has(o)?-1:1,k=P&&z?-1:1,Y=w3(D,v);let{mainAxis:e,crossAxis:J,alignmentAxis:i}=typeof Y=="number"?{mainAxis:Y,crossAxis:0,alignmentAxis:null}:{mainAxis:Y.mainAxis||0,crossAxis:Y.crossAxis||0,alignmentAxis:Y.alignmentAxis};return T&&typeof i=="number"&&(J=T==="end"?i*-1:i),z?{x:J*k,y:e*c}:{x:e*c,y:J*k}}const G1=function(v){return v===void 0&&(v=0),{name:"offset",options:v,async fn(D){var g,r;const{x:n,y:P,placement:o,middlewareData:T}=D,z=await Y1(D,v);return o===((g=T.offset)==null?void 0:g.placement)&&(r=T.arrow)!=null&&r.alignmentOffset?{}:{x:n+z.x,y:P+z.y,data:{...z,placement:o}}}}},X1=function(v){return v===void 0&&(v={}),{name:"shift",options:v,async fn(D){const{x:g,y:r,placement:n}=D,{mainAxis:P=!0,crossAxis:o=!1,limiter:T={fn:q=>{let{x:fA,y:gA}=q;return{x:fA,y:gA}}},...z}=w3(v,D),c={x:g,y:r},k=await D9(D,z),Y=oH(n3(n)),e=gP(Y);let J=c[e],i=c[Y];if(P){const q=e==="y"?"top":"left",fA=e==="y"?"bottom":"right",gA=J+k[q],QA=J-k[fA];J=BP(gA,J,QA)}if(o){const q=Y==="y"?"top":"left",fA=Y==="y"?"bottom":"right",gA=i+k[q],QA=i-k[fA];i=BP(gA,i,QA)}const R=T.fn({...D,[e]:J,[Y]:i});return{...R,data:{x:R.x-g,y:R.y-r,enabled:{[e]:P,[Y]:o}}}}}},J1=function(v){return v===void 0&&(v={}),{options:v,fn(D){const{x:g,y:r,placement:n,rects:P,middlewareData:o}=D,{offset:T=0,mainAxis:z=!0,crossAxis:c=!0}=w3(v,D),k={x:g,y:r},Y=oH(n),e=gP(Y);let J=k[e],i=k[Y];const R=w3(T,D),q=typeof R=="number"?{mainAxis:R,crossAxis:0}:{mainAxis:0,crossAxis:0,...R};if(z){const QA=e==="y"?"height":"width",oA=P.reference[e]-P.floating[QA]+q.mainAxis,BA=P.reference[e]+P.reference[QA]-q.mainAxis;J<oA?J=oA:J>BA&&(J=BA)}if(c){var fA,gA;const QA=e==="y"?"width":"height",oA=pz.has(n3(n)),BA=P.reference[Y]-P.floating[QA]+(oA&&((fA=o.offset)==null?void 0:fA[Y])||0)+(oA?0:q.crossAxis),cA=P.reference[Y]+P.reference[QA]+(oA?0:((gA=o.offset)==null?void 0:gA[Y])||0)-(oA?q.crossAxis:0);i<BA?i=BA:i>cA&&(i=cA)}return{[e]:J,[Y]:i}}}},e1=function(v){return v===void 0&&(v={}),{name:"size",options:v,async fn(D){var g,r;const{placement:n,rects:P,platform:o,elements:T}=D,{apply:z=()=>{},...c}=w3(v,D),k=await D9(D,c),Y=n3(n),e=dQ(n),J=oH(n)==="y",{width:i,height:R}=P.floating;let q,fA;Y==="top"||Y==="bottom"?(q=Y,fA=e===(await(o.isRTL==null?void 0:o.isRTL(T.floating))?"start":"end")?"left":"right"):(fA=Y,q=e==="end"?"top":"bottom");const gA=R-k.top-k.bottom,QA=i-k.left-k.right,oA=PB(R-k[q],gA),BA=PB(i-k[fA],QA),cA=!D.middlewareData.shift;let sA=oA,LA=BA;if((g=D.middlewareData.shift)!=null&&g.enabled.x&&(LA=QA),(r=D.middlewareData.shift)!=null&&r.enabled.y&&(sA=gA),cA&&!e){const iA=XI(k.left,0),OA=XI(k.right,0),eA=XI(k.top,0),XA=XI(k.bottom,0);J?LA=i-2*(iA!==0||OA!==0?iA+OA:XI(k.left,k.right)):sA=R-2*(eA!==0||XA!==0?eA+XA:XI(k.top,k.bottom))}await z({...D,availableWidth:LA,availableHeight:sA});const JA=await o.getDimensions(T.floating);return i!==JA.width||R!==JA.height?{reset:{rects:!0}}:{}}}};function ew(){return typeof window<"u"}function mQ(v){return dz(v)?(v.nodeName||"").toLowerCase():"#document"}function JI(v){var D;return(v==null||(D=v.ownerDocument)==null?void 0:D.defaultView)||window}function PH(v){var D;return(D=(dz(v)?v.ownerDocument:v.document)||window.document)==null?void 0:D.documentElement}function dz(v){return ew()?v instanceof Node||v instanceof JI(v).Node:!1}function e4(v){return ew()?v instanceof Element||v instanceof JI(v).Element:!1}function LH(v){return ew()?v instanceof HTMLElement||v instanceof JI(v).HTMLElement:!1}function mz(v){return!ew()||typeof ShadowRoot>"u"?!1:v instanceof ShadowRoot||v instanceof JI(v).ShadowRoot}const t1=new Set(["inline","contents"]);function I9(v){const{overflow:D,overflowX:g,overflowY:r,display:n}=t4(v);return/auto|scroll|overlay|hidden|clip/.test(D+r+g)&&!t1.has(n)}const K1=new Set(["table","td","th"]);function i1(v){return K1.has(mQ(v))}const a1=[":popover-open",":modal"];function tw(v){return a1.some(D=>{try{return v.matches(D)}catch{return!1}})}const l1=["transform","translate","scale","rotate","perspective"],u1=["transform","translate","scale","rotate","perspective","filter"],V1=["paint","layout","strict","content"];function rP(v){const D=wP(),g=e4(v)?t4(v):v;return l1.some(r=>g[r]?g[r]!=="none":!1)||(g.containerType?g.containerType!=="normal":!1)||!D&&(g.backdropFilter?g.backdropFilter!=="none":!1)||!D&&(g.filter?g.filter!=="none":!1)||u1.some(r=>(g.willChange||"").includes(r))||V1.some(r=>(g.contain||"").includes(r))}function R1(v){let D=LB(v);for(;LH(D)&&!qQ(D);){if(rP(D))return D;if(tw(D))return null;D=LB(D)}return null}function wP(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const y1=new Set(["html","body","#document"]);function qQ(v){return y1.has(mQ(v))}function t4(v){return JI(v).getComputedStyle(v)}function Kw(v){return e4(v)?{scrollLeft:v.scrollLeft,scrollTop:v.scrollTop}:{scrollLeft:v.scrollX,scrollTop:v.scrollY}}function LB(v){if(mQ(v)==="html")return v;const D=v.assignedSlot||v.parentNode||mz(v)&&v.host||PH(v);return mz(D)?D.host:D}function qz(v){const D=LB(v);return qQ(D)?v.ownerDocument?v.ownerDocument.body:v.body:LH(D)&&I9(D)?D:qz(D)}function H9(v,D,g){var r;D===void 0&&(D=[]),g===void 0&&(g=!0);const n=qz(v),P=n===((r=v.ownerDocument)==null?void 0:r.body),o=JI(n);if(P){const T=nP(o);return D.concat(o,o.visualViewport||[],I9(n)?n:[],T&&g?H9(T):[])}return D.concat(n,H9(n,[],g))}function nP(v){return v.parent&&Object.getPrototypeOf(v.parent)?v.frameElement:null}function Wz(v){const D=t4(v);let g=parseFloat(D.width)||0,r=parseFloat(D.height)||0;const n=LH(v),P=n?v.offsetWidth:g,o=n?v.offsetHeight:r,T=Yw(g)!==P||Yw(r)!==o;return T&&(g=P,r=o),{width:g,height:r,$:T}}function sP(v){return e4(v)?v:v.contextElement}function WQ(v){const D=sP(v);if(!LH(D))return sH(1);const g=D.getBoundingClientRect(),{width:r,height:n,$:P}=Wz(D);let o=(P?Yw(g.width):g.width)/r,T=(P?Yw(g.height):g.height)/n;return(!o||!Number.isFinite(o))&&(o=1),(!T||!Number.isFinite(T))&&(T=1),{x:o,y:T}}const x1=sH(0);function Zz(v){const D=JI(v);return!wP()||!D.visualViewport?x1:{x:D.visualViewport.offsetLeft,y:D.visualViewport.offsetTop}}function h1(v,D,g){return D===void 0&&(D=!1),!g||D&&g!==JI(v)?!1:D}function Cg(v,D,g,r){D===void 0&&(D=!1),g===void 0&&(g=!1);const n=v.getBoundingClientRect(),P=sP(v);let o=sH(1);D&&(r?e4(r)&&(o=WQ(r)):o=WQ(v));const T=h1(P,g,r)?Zz(P):sH(0);let z=(n.left+T.x)/o.x,c=(n.top+T.y)/o.y,k=n.width/o.x,Y=n.height/o.y;if(P){const e=JI(P),J=r&&e4(r)?JI(r):r;let i=e,R=nP(i);for(;R&&r&&J!==i;){const q=WQ(R),fA=R.getBoundingClientRect(),gA=t4(R),QA=fA.left+(R.clientLeft+parseFloat(gA.paddingLeft))*q.x,oA=fA.top+(R.clientTop+parseFloat(gA.paddingTop))*q.y;z*=q.x,c*=q.y,k*=q.x,Y*=q.y,z+=QA,c+=oA,i=JI(R),R=nP(i)}}return Jw({width:k,height:Y,x:z,y:c})}function oP(v,D){const g=Kw(v).scrollLeft;return D?D.left+g:Cg(PH(v)).left+g}function _z(v,D,g){g===void 0&&(g=!1);const r=v.getBoundingClientRect(),n=r.left+D.scrollLeft-(g?0:oP(v,r)),P=r.top+D.scrollTop;return{x:n,y:P}}function S1(v){let{elements:D,rect:g,offsetParent:r,strategy:n}=v;const P=n==="fixed",o=PH(r),T=D?tw(D.floating):!1;if(r===o||T&&P)return g;let z={scrollLeft:0,scrollTop:0},c=sH(1);const k=sH(0),Y=LH(r);if((Y||!Y&&!P)&&((mQ(r)!=="body"||I9(o))&&(z=Kw(r)),LH(r))){const J=Cg(r);c=WQ(r),k.x=J.x+r.clientLeft,k.y=J.y+r.clientTop}const e=o&&!Y&&!P?_z(o,z,!0):sH(0);return{width:g.width*c.x,height:g.height*c.y,x:g.x*c.x-z.scrollLeft*c.x+k.x+e.x,y:g.y*c.y-z.scrollTop*c.y+k.y+e.y}}function O1(v){return Array.from(v.getClientRects())}function N1(v){const D=PH(v),g=Kw(v),r=v.ownerDocument.body,n=XI(D.scrollWidth,D.clientWidth,r.scrollWidth,r.clientWidth),P=XI(D.scrollHeight,D.clientHeight,r.scrollHeight,r.clientHeight);let o=-g.scrollLeft+oP(v);const T=-g.scrollTop;return t4(r).direction==="rtl"&&(o+=XI(D.clientWidth,r.clientWidth)-n),{width:n,height:P,x:o,y:T}}function p1(v,D){const g=JI(v),r=PH(v),n=g.visualViewport;let P=r.clientWidth,o=r.clientHeight,T=0,z=0;if(n){P=n.width,o=n.height;const c=wP();(!c||c&&D==="fixed")&&(T=n.offsetLeft,z=n.offsetTop)}return{width:P,height:o,x:T,y:z}}const d1=new Set(["absolute","fixed"]);function m1(v,D){const g=Cg(v,!0,D==="fixed"),r=g.top+v.clientTop,n=g.left+v.clientLeft,P=LH(v)?WQ(v):sH(1),o=v.clientWidth*P.x,T=v.clientHeight*P.y,z=n*P.x,c=r*P.y;return{width:o,height:T,x:z,y:c}}function $z(v,D,g){let r;if(D==="viewport")r=p1(v,g);else if(D==="document")r=N1(PH(v));else if(e4(D))r=m1(D,g);else{const n=Zz(v);r={x:D.x-n.x,y:D.y-n.y,width:D.width,height:D.height}}return Jw(r)}function Ac(v,D){const g=LB(v);return g===D||!e4(g)||qQ(g)?!1:t4(g).position==="fixed"||Ac(g,D)}function q1(v,D){const g=D.get(v);if(g)return g;let r=H9(v,[],!1).filter(T=>e4(T)&&mQ(T)!=="body"),n=null;const P=t4(v).position==="fixed";let o=P?LB(v):v;for(;e4(o)&&!qQ(o);){const T=t4(o),z=rP(o);!z&&T.position==="fixed"&&(n=null),(P?!z&&!n:!z&&T.position==="static"&&!!n&&d1.has(n.position)||I9(o)&&!z&&Ac(v,o))?r=r.filter(k=>k!==o):n=T,o=LB(o)}return D.set(v,r),r}function W1(v){let{element:D,boundary:g,rootBoundary:r,strategy:n}=v;const o=[...g==="clippingAncestors"?tw(D)?[]:q1(D,this._c):[].concat(g),r],T=o[0],z=o.reduce((c,k)=>{const Y=$z(D,k,n);return c.top=XI(Y.top,c.top),c.right=PB(Y.right,c.right),c.bottom=PB(Y.bottom,c.bottom),c.left=XI(Y.left,c.left),c},$z(D,T,n));return{width:z.right-z.left,height:z.bottom-z.top,x:z.left,y:z.top}}function Z1(v){const{width:D,height:g}=Wz(v);return{width:D,height:g}}function _1(v,D,g){const r=LH(D),n=PH(D),P=g==="fixed",o=Cg(v,!0,P,D);let T={scrollLeft:0,scrollTop:0};const z=sH(0);function c(){z.x=oP(n)}if(r||!r&&!P)if((mQ(D)!=="body"||I9(n))&&(T=Kw(D)),r){const J=Cg(D,!0,P,D);z.x=J.x+D.clientLeft,z.y=J.y+D.clientTop}else n&&c();P&&!r&&n&&c();const k=n&&!r&&!P?_z(n,T):sH(0),Y=o.left+T.scrollLeft-z.x-k.x,e=o.top+T.scrollTop-z.y-k.y;return{x:Y,y:e,width:o.width,height:o.height}}function PP(v){return t4(v).position==="static"}function Ec(v,D){if(!LH(v)||t4(v).position==="fixed")return null;if(D)return D(v);let g=v.offsetParent;return PH(v)===g&&(g=g.ownerDocument.body),g}function Dc(v,D){const g=JI(v);if(tw(v))return g;if(!LH(v)){let n=LB(v);for(;n&&!qQ(n);){if(e4(n)&&!PP(n))return n;n=LB(n)}return g}let r=Ec(v,D);for(;r&&i1(r)&&PP(r);)r=Ec(r,D);return r&&qQ(r)&&PP(r)&&!rP(r)?g:r||R1(v)||g}const $1=async function(v){const D=this.getOffsetParent||Dc,g=this.getDimensions,r=await g(v.floating);return{reference:_1(v.reference,await D(v.floating),v.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Al(v){return t4(v).direction==="rtl"}const El={convertOffsetParentRelativeRectToViewportRelativeRect:S1,getDocumentElement:PH,getClippingRect:W1,getOffsetParent:Dc,getElementRects:$1,getClientRects:O1,getDimensions:Z1,getScale:WQ,isElement:e4,isRTL:Al};function Ic(v,D){return v.x===D.x&&v.y===D.y&&v.width===D.width&&v.height===D.height}function Dl(v,D){let g=null,r;const n=PH(v);function P(){var T;clearTimeout(r),(T=g)==null||T.disconnect(),g=null}function o(T,z){T===void 0&&(T=!1),z===void 0&&(z=1),P();const c=v.getBoundingClientRect(),{left:k,top:Y,width:e,height:J}=c;if(T||D(),!e||!J)return;const i=Gw(Y),R=Gw(n.clientWidth-(k+e)),q=Gw(n.clientHeight-(Y+J)),fA=Gw(k),QA={rootMargin:-i+"px "+-R+"px "+-q+"px "+-fA+"px",threshold:XI(0,PB(1,z))||1};let oA=!0;function BA(cA){const sA=cA[0].intersectionRatio;if(sA!==z){if(!oA)return o();sA?o(!1,sA):r=setTimeout(()=>{o(!1,1e-7)},1e3)}sA===1&&!Ic(c,v.getBoundingClientRect())&&o(),oA=!1}try{g=new IntersectionObserver(BA,{...QA,root:n.ownerDocument})}catch{g=new IntersectionObserver(BA,QA)}g.observe(v)}return o(!0),P}function Il(v,D,g,r){r===void 0&&(r={});const{ancestorScroll:n=!0,ancestorResize:P=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:T=typeof IntersectionObserver=="function",animationFrame:z=!1}=r,c=sP(v),k=n||P?[...c?H9(c):[],...H9(D)]:[];k.forEach(fA=>{n&&fA.addEventListener("scroll",g,{passive:!0}),P&&fA.addEventListener("resize",g)});const Y=c&&T?Dl(c,g):null;let e=-1,J=null;o&&(J=new ResizeObserver(fA=>{let[gA]=fA;gA&&gA.target===c&&J&&(J.unobserve(D),cancelAnimationFrame(e),e=requestAnimationFrame(()=>{var QA;(QA=J)==null||QA.observe(D)})),g()}),c&&!z&&J.observe(c),J.observe(D));let i,R=z?Cg(v):null;z&&q();function q(){const fA=Cg(v);R&&!Ic(R,fA)&&g(),R=fA,i=requestAnimationFrame(q)}return g(),()=>{var fA;k.forEach(gA=>{n&&gA.removeEventListener("scroll",g),P&&gA.removeEventListener("resize",g)}),Y?.(),(fA=J)==null||fA.disconnect(),J=null,z&&cancelAnimationFrame(i)}}const Hl=G1,Bl=X1,gl=j1,Ql=e1,vl=b1,Hc=k1,fl=J1,rl=(v,D,g)=>{const r=new Map,n={platform:El,...g},P={...n.platform,_c:r};return F1(v,D,{...n,platform:P})};var wl=typeof document<"u",nl=function(){},iw=wl?W.useLayoutEffect:nl;function aw(v,D){if(v===D)return!0;if(typeof v!=typeof D)return!1;if(typeof v=="function"&&v.toString()===D.toString())return!0;let g,r,n;if(v&&D&&typeof v=="object"){if(Array.isArray(v)){if(g=v.length,g!==D.length)return!1;for(r=g;r--!==0;)if(!aw(v[r],D[r]))return!1;return!0}if(n=Object.keys(v),g=n.length,g!==Object.keys(D).length)return!1;for(r=g;r--!==0;)if(!{}.hasOwnProperty.call(D,n[r]))return!1;for(r=g;r--!==0;){const P=n[r];if(!(P==="_owner"&&v.$$typeof)&&!aw(v[P],D[P]))return!1}return!0}return v!==v&&D!==D}function Bc(v){return typeof window>"u"?1:(v.ownerDocument.defaultView||window).devicePixelRatio||1}function gc(v,D){const g=Bc(v);return Math.round(D*g)/g}function LP(v){const D=W.useRef(v);return iw(()=>{D.current=v}),D}function sl(v){v===void 0&&(v={});const{placement:D="bottom",strategy:g="absolute",middleware:r=[],platform:n,elements:{reference:P,floating:o}={},transform:T=!0,whileElementsMounted:z,open:c}=v,[k,Y]=W.useState({x:0,y:0,strategy:g,placement:D,middlewareData:{},isPositioned:!1}),[e,J]=W.useState(r);aw(e,r)||J(r);const[i,R]=W.useState(null),[q,fA]=W.useState(null),gA=W.useCallback(m=>{m!==cA.current&&(cA.current=m,R(m))},[]),QA=W.useCallback(m=>{m!==sA.current&&(sA.current=m,fA(m))},[]),oA=P||i,BA=o||q,cA=W.useRef(null),sA=W.useRef(null),LA=W.useRef(k),JA=z!=null,iA=LP(z),OA=LP(n),eA=LP(c),XA=W.useCallback(()=>{if(!cA.current||!sA.current)return;const m={placement:D,strategy:g,middleware:e};OA.current&&(m.platform=OA.current),rl(cA.current,sA.current,m).then(tA=>{const bA={...tA,isPositioned:eA.current!==!1};WA.current&&!aw(LA.current,bA)&&(LA.current=bA,ow.flushSync(()=>{Y(bA)}))})},[e,D,g,OA,eA]);iw(()=>{c===!1&&LA.current.isPositioned&&(LA.current.isPositioned=!1,Y(m=>({...m,isPositioned:!1})))},[c]);const WA=W.useRef(!1);iw(()=>(WA.current=!0,()=>{WA.current=!1}),[]),iw(()=>{if(oA&&(cA.current=oA),BA&&(sA.current=BA),oA&&BA){if(iA.current)return iA.current(oA,BA,XA);XA()}},[oA,BA,XA,iA,JA]);const HE=W.useMemo(()=>({reference:cA,floating:sA,setReference:gA,setFloating:QA}),[gA,QA]),hA=W.useMemo(()=>({reference:oA,floating:BA}),[oA,BA]),UA=W.useMemo(()=>{const m={position:g,left:0,top:0};if(!hA.floating)return m;const tA=gc(hA.floating,k.x),bA=gc(hA.floating,k.y);return T?{...m,transform:"translate("+tA+"px, "+bA+"px)",...Bc(hA.floating)>=1.5&&{willChange:"transform"}}:{position:g,left:tA,top:bA}},[g,T,hA.floating,k.x,k.y]);return W.useMemo(()=>({...k,update:XA,refs:HE,elements:hA,floatingStyles:UA}),[k,XA,HE,hA,UA])}const ol=v=>{function D(g){return{}.hasOwnProperty.call(g,"current")}return{name:"arrow",options:v,fn(g){const{element:r,padding:n}=typeof v=="function"?v(g):v;return r&&D(r)?r.current!=null?Hc({element:r.current,padding:n}).fn(g):{}:r?Hc({element:r,padding:n}).fn(g):{}}}},Pl=(v,D)=>({...Hl(v),options:[v,D]}),Ll=(v,D)=>({...Bl(v),options:[v,D]}),Ml=(v,D)=>({...fl(v),options:[v,D]}),Cl=(v,D)=>({...gl(v),options:[v,D]}),zl=(v,D)=>({...Ql(v),options:[v,D]}),cl=(v,D)=>({...vl(v),options:[v,D]}),Ul=(v,D)=>({...ol(v),options:[v,D]});var Tl="Arrow",Qc=W.forwardRef((v,D)=>{const{children:g,width:r=10,height:n=5,...P}=v;return G.jsx(sB.svg,{...P,ref:D,width:r,height:n,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:v.asChild?g:G.jsx("polygon",{points:"0,0 30,0 15,10"})})});Qc.displayName=Tl;var Fl=Qc;function kl(v){const[D,g]=W.useState(void 0);return oB(()=>{if(v){g({width:v.offsetWidth,height:v.offsetHeight});const r=new ResizeObserver(n=>{if(!Array.isArray(n)||!n.length)return;const P=n[0];let o,T;if("borderBoxSize"in P){const z=P.borderBoxSize,c=Array.isArray(z)?z[0]:z;o=c.inlineSize,T=c.blockSize}else o=v.offsetWidth,T=v.offsetHeight;g({width:o,height:T})});return r.observe(v,{box:"border-box"}),()=>r.unobserve(v)}else g(void 0)},[v]),D}var MP="Popper",[vc,fc]=iz(MP),[jl,rc]=vc(MP),wc=v=>{const{__scopePopper:D,children:g}=v,[r,n]=W.useState(null);return G.jsx(jl,{scope:D,anchor:r,onAnchorChange:n,children:g})};wc.displayName=MP;var nc="PopperAnchor",sc=W.forwardRef((v,D)=>{const{__scopePopper:g,virtualRef:r,...n}=v,P=rc(nc,g),o=W.useRef(null),T=Lg(D,o);return W.useEffect(()=>{P.onAnchorChange(r?.current||o.current)}),r?null:G.jsx(sB.div,{...n,ref:T})});sc.displayName=nc;var CP="PopperContent",[bl,Yl]=vc(CP),oc=W.forwardRef((v,D)=>{const{__scopePopper:g,side:r="bottom",sideOffset:n=0,align:P="center",alignOffset:o=0,arrowPadding:T=0,avoidCollisions:z=!0,collisionBoundary:c=[],collisionPadding:k=0,sticky:Y="partial",hideWhenDetached:e=!1,updatePositionStrategy:J="optimized",onPlaced:i,...R}=v,q=rc(CP,g),[fA,gA]=W.useState(null),QA=Lg(D,$A=>gA($A)),[oA,BA]=W.useState(null),cA=kl(oA),sA=cA?.width??0,LA=cA?.height??0,JA=r+(P!=="center"?"-"+P:""),iA=typeof k=="number"?k:{top:0,right:0,bottom:0,left:0,...k},OA=Array.isArray(c)?c:[c],eA=OA.length>0,XA={padding:iA,boundary:OA.filter(Xl),altBoundary:eA},{refs:WA,floatingStyles:HE,placement:hA,isPositioned:UA,middlewareData:m}=sl({strategy:"fixed",placement:JA,whileElementsMounted:(...$A)=>Il(...$A,{animationFrame:J==="always"}),elements:{reference:q.anchor},middleware:[Pl({mainAxis:n+LA,alignmentAxis:o}),z&&Ll({mainAxis:!0,crossAxis:!1,limiter:Y==="partial"?Ml():void 0,...XA}),z&&Cl({...XA}),zl({...XA,apply:({elements:$A,rects:kE,availableWidth:jE,availableHeight:pE})=>{const{width:U8,height:S8}=kE.reference,T8=$A.floating.style;T8.setProperty("--radix-popper-available-width",`${jE}px`),T8.setProperty("--radix-popper-available-height",`${pE}px`),T8.setProperty("--radix-popper-anchor-width",`${U8}px`),T8.setProperty("--radix-popper-anchor-height",`${S8}px`)}}),oA&&Ul({element:oA,padding:T}),Jl({arrowWidth:sA,arrowHeight:LA}),e&&cl({strategy:"referenceHidden",...XA})]}),[tA,bA]=Mc(hA),d=bw(i);oB(()=>{UA&&d?.()},[UA,d]);const nA=m.arrow?.x,ZA=m.arrow?.y,_A=m.arrow?.centerOffset!==0,[FE,YE]=W.useState();return oB(()=>{fA&&YE(window.getComputedStyle(fA).zIndex)},[fA]),G.jsx("div",{ref:WA.setFloating,"data-radix-popper-content-wrapper":"",style:{...HE,transform:UA?HE.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:FE,"--radix-popper-transform-origin":[m.transformOrigin?.x,m.transformOrigin?.y].join(" "),...m.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:v.dir,children:G.jsx(bl,{scope:g,placedSide:tA,onArrowChange:BA,arrowX:nA,arrowY:ZA,shouldHideArrow:_A,children:G.jsx(sB.div,{"data-side":tA,"data-align":bA,...R,ref:QA,style:{...R.style,animation:UA?void 0:"none"}})})})});oc.displayName=CP;var Pc="PopperArrow",Gl={top:"bottom",right:"left",bottom:"top",left:"right"},Lc=W.forwardRef(function(D,g){const{__scopePopper:r,...n}=D,P=Yl(Pc,r),o=Gl[P.placedSide];return G.jsx("span",{ref:P.onArrowChange,style:{position:"absolute",left:P.arrowX,top:P.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[P.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[P.placedSide],visibility:P.shouldHideArrow?"hidden":void 0},children:G.jsx(Fl,{...n,ref:g,style:{...n.style,display:"block"}})})});Lc.displayName=Pc;function Xl(v){return v!==null}var Jl=v=>({name:"transformOrigin",options:v,fn(D){const{placement:g,rects:r,middlewareData:n}=D,o=n.arrow?.centerOffset!==0,T=o?0:v.arrowWidth,z=o?0:v.arrowHeight,[c,k]=Mc(g),Y={start:"0%",center:"50%",end:"100%"}[k],e=(n.arrow?.x??0)+T/2,J=(n.arrow?.y??0)+z/2;let i="",R="";return c==="bottom"?(i=o?Y:`${e}px`,R=`${-z}px`):c==="top"?(i=o?Y:`${e}px`,R=`${r.floating.height+z}px`):c==="right"?(i=`${-z}px`,R=o?Y:`${J}px`):c==="left"&&(i=`${r.floating.width+z}px`,R=o?Y:`${J}px`),{data:{x:i,y:R}}}});function Mc(v){const[D,g="center"]=v.split("-");return[D,g]}var el=wc,tl=sc,Kl=oc,il=Lc,al="Portal",Cc=W.forwardRef((v,D)=>{const{container:g,...r}=v,[n,P]=W.useState(!1);oB(()=>P(!0),[]);const o=g||n&&globalThis?.document?.body;return o?FF.createPortal(G.jsx(sB.div,{...r,ref:D}),o):null});Cc.displayName=al;function ll(v,D){return W.useReducer((g,r)=>D[g][r]??g,v)}var zP=v=>{const{present:D,children:g}=v,r=ul(D),n=typeof g=="function"?g({present:r.isPresent}):W.Children.only(g),P=Lg(r.ref,Vl(n));return typeof g=="function"||r.isPresent?W.cloneElement(n,{ref:P}):null};zP.displayName="Presence";function ul(v){const[D,g]=W.useState(),r=W.useRef(null),n=W.useRef(v),P=W.useRef("none"),o=v?"mounted":"unmounted",[T,z]=ll(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return W.useEffect(()=>{const c=lw(r.current);P.current=T==="mounted"?c:"none"},[T]),oB(()=>{const c=r.current,k=n.current;if(k!==v){const e=P.current,J=lw(c);v?z("MOUNT"):J==="none"||c?.display==="none"?z("UNMOUNT"):z(k&&e!==J?"ANIMATION_OUT":"UNMOUNT"),n.current=v}},[v,z]),oB(()=>{if(D){let c;const k=D.ownerDocument.defaultView??window,Y=J=>{const R=lw(r.current).includes(J.animationName);if(J.target===D&&R&&(z("ANIMATION_END"),!n.current)){const q=D.style.animationFillMode;D.style.animationFillMode="forwards",c=k.setTimeout(()=>{D.style.animationFillMode==="forwards"&&(D.style.animationFillMode=q)})}},e=J=>{J.target===D&&(P.current=lw(r.current))};return D.addEventListener("animationstart",e),D.addEventListener("animationcancel",Y),D.addEventListener("animationend",Y),()=>{k.clearTimeout(c),D.removeEventListener("animationstart",e),D.removeEventListener("animationcancel",Y),D.removeEventListener("animationend",Y)}}else z("ANIMATION_END")},[D,z]),{isPresent:["mounted","unmountSuspended"].includes(T),ref:W.useCallback(c=>{r.current=c?getComputedStyle(c):null,g(c)},[])}}function lw(v){return v?.animationName||"none"}function Vl(v){let D=Object.getOwnPropertyDescriptor(v.props,"ref")?.get,g=D&&"isReactWarning"in D&&D.isReactWarning;return g?v.ref:(D=Object.getOwnPropertyDescriptor(v,"ref")?.get,g=D&&"isReactWarning"in D&&D.isReactWarning,g?v.props.ref:v.props.ref||v.ref)}var Rl=I0[" useInsertionEffect ".trim().toString()]||oB;function yl({prop:v,defaultProp:D,onChange:g=()=>{},caller:r}){const[n,P,o]=xl({defaultProp:D,onChange:g}),T=v!==void 0,z=T?v:n;{const k=W.useRef(v!==void 0);W.useEffect(()=>{const Y=k.current;Y!==T&&console.warn(`${r} is changing from ${Y?"controlled":"uncontrolled"} to ${T?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),k.current=T},[T,r])}const c=W.useCallback(k=>{if(T){const Y=hl(k)?k(v):k;Y!==v&&o.current?.(Y)}else P(k)},[T,v,P,o]);return[z,c]}function xl({defaultProp:v,onChange:D}){const[g,r]=W.useState(v),n=W.useRef(g),P=W.useRef(D);return Rl(()=>{P.current=D},[D]),W.useEffect(()=>{n.current!==g&&(P.current?.(g),n.current=g)},[g,n]),[g,r,P]}function hl(v){return typeof v=="function"}var Sl=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),Ol="VisuallyHidden",zc=W.forwardRef((v,D)=>G.jsx(sB.span,{...v,ref:D,style:{...Sl,...v.style}}));zc.displayName=Ol;var Nl=zc,[uw]=iz("Tooltip",[fc]),Vw=fc(),cc="TooltipProvider",pl=700,cP="tooltip.open",[dl,UP]=uw(cc),TP=v=>{const{__scopeTooltip:D,delayDuration:g=pl,skipDelayDuration:r=300,disableHoverableContent:n=!1,children:P}=v,o=W.useRef(!0),T=W.useRef(!1),z=W.useRef(0);return W.useEffect(()=>{const c=z.current;return()=>window.clearTimeout(c)},[]),G.jsx(dl,{scope:D,isOpenDelayedRef:o,delayDuration:g,onOpen:W.useCallback(()=>{window.clearTimeout(z.current),o.current=!1},[]),onClose:W.useCallback(()=>{window.clearTimeout(z.current),z.current=window.setTimeout(()=>o.current=!0,r)},[r]),isPointerInTransitRef:T,onPointerInTransitChange:W.useCallback(c=>{T.current=c},[]),disableHoverableContent:n,children:P})};TP.displayName=cc;var B9="Tooltip",[ml,g9]=uw(B9),Uc=v=>{const{__scopeTooltip:D,children:g,open:r,defaultOpen:n,onOpenChange:P,disableHoverableContent:o,delayDuration:T}=v,z=UP(B9,v.__scopeTooltip),c=Vw(D),[k,Y]=W.useState(null),e=w1(),J=W.useRef(0),i=o??z.disableHoverableContent,R=T??z.delayDuration,q=W.useRef(!1),[fA,gA]=yl({prop:r,defaultProp:n??!1,onChange:sA=>{sA?(z.onOpen(),document.dispatchEvent(new CustomEvent(cP))):z.onClose(),P?.(sA)},caller:B9}),QA=W.useMemo(()=>fA?q.current?"delayed-open":"instant-open":"closed",[fA]),oA=W.useCallback(()=>{window.clearTimeout(J.current),J.current=0,q.current=!1,gA(!0)},[gA]),BA=W.useCallback(()=>{window.clearTimeout(J.current),J.current=0,gA(!1)},[gA]),cA=W.useCallback(()=>{window.clearTimeout(J.current),J.current=window.setTimeout(()=>{q.current=!0,gA(!0),J.current=0},R)},[R,gA]);return W.useEffect(()=>()=>{J.current&&(window.clearTimeout(J.current),J.current=0)},[]),G.jsx(el,{...c,children:G.jsx(ml,{scope:D,contentId:e,open:fA,stateAttribute:QA,trigger:k,onTriggerChange:Y,onTriggerEnter:W.useCallback(()=>{z.isOpenDelayedRef.current?cA():oA()},[z.isOpenDelayedRef,cA,oA]),onTriggerLeave:W.useCallback(()=>{i?BA():(window.clearTimeout(J.current),J.current=0)},[BA,i]),onOpen:oA,onClose:BA,disableHoverableContent:i,children:g})})};Uc.displayName=B9;var FP="TooltipTrigger",Tc=W.forwardRef((v,D)=>{const{__scopeTooltip:g,...r}=v,n=g9(FP,g),P=UP(FP,g),o=Vw(g),T=W.useRef(null),z=Lg(D,T,n.onTriggerChange),c=W.useRef(!1),k=W.useRef(!1),Y=W.useCallback(()=>c.current=!1,[]);return W.useEffect(()=>()=>document.removeEventListener("pointerup",Y),[Y]),G.jsx(tl,{asChild:!0,...o,children:G.jsx(sB.button,{"aria-describedby":n.open?n.contentId:void 0,"data-state":n.stateAttribute,...r,ref:z,onPointerMove:r3(v.onPointerMove,e=>{e.pointerType!=="touch"&&!k.current&&!P.isPointerInTransitRef.current&&(n.onTriggerEnter(),k.current=!0)}),onPointerLeave:r3(v.onPointerLeave,()=>{n.onTriggerLeave(),k.current=!1}),onPointerDown:r3(v.onPointerDown,()=>{n.open&&n.onClose(),c.current=!0,document.addEventListener("pointerup",Y,{once:!0})}),onFocus:r3(v.onFocus,()=>{c.current||n.onOpen()}),onBlur:r3(v.onBlur,n.onClose),onClick:r3(v.onClick,n.onClose)})})});Tc.displayName=FP;var kP="TooltipPortal",[ql,Wl]=uw(kP,{forceMount:void 0}),Fc=v=>{const{__scopeTooltip:D,forceMount:g,children:r,container:n}=v,P=g9(kP,D);return G.jsx(ql,{scope:D,forceMount:g,children:G.jsx(zP,{present:g||P.open,children:G.jsx(Cc,{asChild:!0,container:n,children:r})})})};Fc.displayName=kP;var ZQ="TooltipContent",kc=W.forwardRef((v,D)=>{const g=Wl(ZQ,v.__scopeTooltip),{forceMount:r=g.forceMount,side:n="top",...P}=v,o=g9(ZQ,v.__scopeTooltip);return G.jsx(zP,{present:r||o.open,children:o.disableHoverableContent?G.jsx(jc,{side:n,...P,ref:D}):G.jsx(Zl,{side:n,...P,ref:D})})}),Zl=W.forwardRef((v,D)=>{const g=g9(ZQ,v.__scopeTooltip),r=UP(ZQ,v.__scopeTooltip),n=W.useRef(null),P=Lg(D,n),[o,T]=W.useState(null),{trigger:z,onClose:c}=g,k=n.current,{onPointerInTransitChange:Y}=r,e=W.useCallback(()=>{T(null),Y(!1)},[Y]),J=W.useCallback((i,R)=>{const q=i.currentTarget,fA={x:i.clientX,y:i.clientY},gA=Du(fA,q.getBoundingClientRect()),QA=Iu(fA,gA),oA=Hu(R.getBoundingClientRect()),BA=gu([...QA,...oA]);T(BA),Y(!0)},[Y]);return W.useEffect(()=>()=>e(),[e]),W.useEffect(()=>{if(z&&k){const i=q=>J(q,k),R=q=>J(q,z);return z.addEventListener("pointerleave",i),k.addEventListener("pointerleave",R),()=>{z.removeEventListener("pointerleave",i),k.removeEventListener("pointerleave",R)}}},[z,k,J,e]),W.useEffect(()=>{if(o){const i=R=>{const q=R.target,fA={x:R.clientX,y:R.clientY},gA=z?.contains(q)||k?.contains(q),QA=!Bu(fA,o);gA?e():QA&&(e(),c())};return document.addEventListener("pointermove",i),()=>document.removeEventListener("pointermove",i)}},[z,k,o,c,e]),G.jsx(jc,{...v,ref:P})}),[_l,$l]=uw(B9,{isInside:!1}),Au=di("TooltipContent"),jc=W.forwardRef((v,D)=>{const{__scopeTooltip:g,children:r,"aria-label":n,onEscapeKeyDown:P,onPointerDownOutside:o,...T}=v,z=g9(ZQ,g),c=Vw(g),{onClose:k}=z;return W.useEffect(()=>(document.addEventListener(cP,k),()=>document.removeEventListener(cP,k)),[k]),W.useEffect(()=>{if(z.trigger){const Y=e=>{e.target?.contains(z.trigger)&&k()};return window.addEventListener("scroll",Y,{capture:!0}),()=>window.removeEventListener("scroll",Y,{capture:!0})}},[z.trigger,k]),G.jsx(uz,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:P,onPointerDownOutside:o,onFocusOutside:Y=>Y.preventDefault(),onDismiss:k,children:G.jsxs(Kl,{"data-state":z.stateAttribute,...c,...T,ref:D,style:{...T.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[G.jsx(Au,{children:r}),G.jsx(_l,{scope:g,isInside:!0,children:G.jsx(Nl,{id:z.contentId,role:"tooltip",children:n||r})})]})})});kc.displayName=ZQ;var bc="TooltipArrow",Eu=W.forwardRef((v,D)=>{const{__scopeTooltip:g,...r}=v,n=Vw(g);return $l(bc,g).isInside?null:G.jsx(il,{...n,...r,ref:D})});Eu.displayName=bc;function Du(v,D){const g=Math.abs(D.top-v.y),r=Math.abs(D.bottom-v.y),n=Math.abs(D.right-v.x),P=Math.abs(D.left-v.x);switch(Math.min(g,r,n,P)){case P:return"left";case n:return"right";case g:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function Iu(v,D,g=5){const r=[];switch(D){case"top":r.push({x:v.x-g,y:v.y+g},{x:v.x+g,y:v.y+g});break;case"bottom":r.push({x:v.x-g,y:v.y-g},{x:v.x+g,y:v.y-g});break;case"left":r.push({x:v.x+g,y:v.y-g},{x:v.x+g,y:v.y+g});break;case"right":r.push({x:v.x-g,y:v.y-g},{x:v.x-g,y:v.y+g});break}return r}function Hu(v){const{top:D,right:g,bottom:r,left:n}=v;return[{x:n,y:D},{x:g,y:D},{x:g,y:r},{x:n,y:r}]}function Bu(v,D){const{x:g,y:r}=v;let n=!1;for(let P=0,o=D.length-1;P<D.length;o=P++){const T=D[P],z=D[o],c=T.x,k=T.y,Y=z.x,e=z.y;k>r!=e>r&&g<(Y-c)*(r-k)/(e-k)+c&&(n=!n)}return n}function gu(v){const D=v.slice();return D.sort((g,r)=>g.x<r.x?-1:g.x>r.x?1:g.y<r.y?-1:g.y>r.y?1:0),Qu(D)}function Qu(v){if(v.length<=1)return v.slice();const D=[];for(let r=0;r<v.length;r++){const n=v[r];for(;D.length>=2;){const P=D[D.length-1],o=D[D.length-2];if((P.x-o.x)*(n.y-o.y)>=(P.y-o.y)*(n.x-o.x))D.pop();else break}D.push(n)}D.pop();const g=[];for(let r=v.length-1;r>=0;r--){const n=v[r];for(;g.length>=2;){const P=g[g.length-1],o=g[g.length-2];if((P.x-o.x)*(n.y-o.y)>=(P.y-o.y)*(n.x-o.x))g.pop();else break}g.push(n)}return g.pop(),D.length===1&&g.length===1&&D[0].x===g[0].x&&D[0].y===g[0].y?D:D.concat(g)}var vu=Uc,fu=Tc,ru=Fc,Yc=kc;const Gc=vu,Xc=fu,jP=W.forwardRef(({className:v,sideOffset:D=4,...g},r)=>G.jsx(ru,{children:G.jsx(Yc,{ref:r,sideOffset:D,className:Xz("z-[1000] overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",v),...g})}));jP.displayName=Yc.displayName;const Jc={1:"linear-gradient(90deg, #7fb33d, #abdd64, #c2eb83)",2:"linear-gradient(90deg, #0e9fb8, #22d3ee, #67e8f9)",3:"linear-gradient(90deg, #ca8a04, #eab308, #fde047)",4:"linear-gradient(90deg, #e8856e, #f2ae99, #fcd5c8)",5:"linear-gradient(90deg, #d56aaf, #ee90cb, #8465ec)"},ec={1:"rgba(171,221,100,0.35)",2:"rgba(34,211,238,0.35)",3:"rgba(234,179,8,0.4)",4:"rgba(242,174,153,0.4)",5:"rgba(238,144,203,0.45)"},wu=()=>{const{currentState:v,currentLevel:D,gameStateManager:g,isPaused:r,tutorialMission:n}=xA(),{score:P,multiplier:o,multiplierScore:T}=r7(),z=n!==null,c=W.useRef(null),{isFullscreen:k,toggleFullscreen:Y}=$f(),e=Wa(P,.14),J=()=>{const cA=c.current?.closest("sigurd-startup");cA?Y(cA):Y()},i=()=>{v===uA.PLAYING?g?.pauseGame():v===uA.PAUSED&&g?.resumeGame()},R=lF(T,o),q=e!==P,fA=v===uA.PLAYING||v===uA.PAUSED,gA=Jc[o]??Jc[1],QA=ec[o]??ec[1],oA=o>=5,BA=oA?100:R*100;return G.jsxs("div",{ref:c,className:"w-full relative flex items-center gap-3 px-3 py-1.5 bg-[var(--background-deep)] border-b border-[var(--surface-line)] rounded-t-lg",style:{minHeight:40},children:[z?G.jsx("div",{className:"flex-1 flex items-center",children:G.jsx(Za,{})}):G.jsxs(G.Fragment,{children:[G.jsxs("div",{className:"text-[var(--foreground-dim)] font-mono text-xs shrink-0 uppercase tracking-wide",children:["Lvl ",G.jsx("span",{className:"text-foreground font-pixel",children:D})]}),G.jsx("div",{className:"w-px h-5 bg-[var(--surface-line)] shrink-0"}),G.jsx("div",{className:"shrink-0 min-w-[90px]",children:G.jsx("div",{className:`font-pixel text-sm tabular-nums transition-colors duration-150 ${q?"text-[var(--primary-light)]":"text-primary"}`,style:q?{textShadow:"0 0 8px rgba(171,221,100,.5)"}:void 0,children:e.toLocaleString()})}),G.jsx("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 opacity-60",style:{width:200},children:G.jsxs("div",{className:"relative h-5 rounded-full overflow-hidden bg-[var(--surface)] border border-[var(--surface-line)]",children:[G.jsx("div",{className:"absolute inset-y-0 left-0 rounded-full transition-all duration-500 ease-out",style:{width:`${BA}%`,background:gA,boxShadow:`0 0 8px ${QA}, inset 0 1px 0 rgba(255,255,255,0.2)`}}),G.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:G.jsxs("span",{className:"font-pixel text-[11px] leading-none",style:{color:"#fff",textShadow:"0 1px 3px rgba(0,0,0,0.5)"},children:["x",o,oA?" MAX":""]})})]})}),G.jsx("div",{className:"flex-1"})]}),G.jsxs("div",{className:"flex items-center gap-1 shrink-0",children:[fA&&G.jsx(TP,{children:G.jsxs(Gc,{children:[G.jsx(Xc,{asChild:!0,children:G.jsx($8,{onClick:i,variant:"ghost",size:"icon",className:"text-[var(--foreground-dim)] hover:text-primary h-7 w-7",children:r?G.jsx(jw,{size:15}):G.jsx(Oa,{size:15})})}),G.jsx(jP,{children:r?"Resume (P)":"Pause (P)"})]})}),G.jsx(TP,{children:G.jsxs(Gc,{children:[G.jsx(Xc,{asChild:!0,children:G.jsx($8,{onClick:J,variant:"ghost",size:"icon",className:"text-[var(--foreground-dim)] hover:text-primary h-7 w-7",children:k?G.jsx(Sa,{size:15}):G.jsx(ha,{size:15})})}),G.jsx(jP,{children:k?"Exit fullscreen (F)":"Fullscreen (F)"})]})})]})]})},nu=()=>{const{lives:v}=xA(),{isFullscreen:D}=$f();return G.jsx("div",{className:`absolute left-3 z-50 pointer-events-none ${D?"bottom-4":"bottom-2"}`,children:G.jsxs("div",{className:"flex items-center gap-1",children:[Array.from({length:3}).map((g,r)=>G.jsx(Ra,{color:"#ee90cb",size:D?22:18,fill:r<v?"#ee90cb":"none",strokeWidth:r<v?0:1.5},r)),v>3&&G.jsxs("span",{className:"text-[var(--accent-pink)] font-pixel text-sm ml-1",children:["+",v-3]})]})})},su=()=>{const{gameStateManager:v}=xA.getState(),{hasBridge:D,insufficientFunds:g}=_I(),[r,n]=W.useState(!1),P=()=>{v?.resumeGame()},o=()=>{v?.openSettings()},T=()=>{v?.quitToMenu()},z=async()=>{if(!r){if(D){n(!0);const c=await Uw(1);if(n(!1),!c.success){_I.getState().setInsufficientFunds(!0);return}}v?.restartGame()}};return G.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[G.jsxs("div",{className:"text-center mb-6",children:[G.jsx("h1",{className:"text-5xl font-pixel text-foreground tracking-wide",children:"PAUSE"}),G.jsx("p",{className:"text-sm text-[var(--foreground-dim)] mt-2",children:"Trykk P for å fortsette"})]}),G.jsxs("div",{className:"space-y-3 w-64",children:[G.jsxs($8,{onClick:P,className:"w-full uppercase",children:[G.jsx(jw,{size:20}),"Fortsett"]}),G.jsxs($8,{onClick:o,variant:"secondary",className:"w-full uppercase",children:[G.jsx(Kz,{size:20}),"Innstillinger"]}),g&&D?G.jsx("div",{className:"text-center py-2 px-4 bg-[var(--accent-red)]/10 border border-[var(--accent-red)]/30 rounded-sm",children:G.jsx("p",{className:"text-[var(--accent-red)] font-pixel text-xs",children:"IKKE NOK MYNTER"})}):G.jsxs($8,{onClick:z,variant:"secondary",disabled:r,className:`w-full uppercase text-sm tracking-normal ${r?"opacity-70":""}`,children:[G.jsx(Na,{size:20}),r?"Venter...":D?"Start på nytt (1 mynt)":"Start på nytt"]}),G.jsx("button",{onClick:T,className:"w-full text-[var(--foreground-dim)] text-sm font-mono underline underline-offset-4 hover:text-primary py-2 cursor-pointer",children:"Avslutt til hovedmeny"})]})]})},ou=["tl","tr","bl","br"];function Pu({pos:v,accent:D}){const g={position:"absolute",width:12,height:12,pointerEvents:"none"};return v==="tl"&&(g.top=-1,g.left=-1),v==="tr"&&(g.top=-1,g.right=-1),v==="bl"&&(g.bottom=-1,g.left=-1),v==="br"&&(g.bottom=-1,g.right=-1),G.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",style:g,shapeRendering:"crispEdges",children:G.jsxs("g",{fill:D,children:[v==="tl"&&G.jsxs(G.Fragment,{children:[G.jsx("rect",{x:"0",y:"0",width:"12",height:"3"}),G.jsx("rect",{x:"0",y:"0",width:"3",height:"12"})]}),v==="tr"&&G.jsxs(G.Fragment,{children:[G.jsx("rect",{x:"0",y:"0",width:"12",height:"3"}),G.jsx("rect",{x:"9",y:"0",width:"3",height:"12"})]}),v==="bl"&&G.jsxs(G.Fragment,{children:[G.jsx("rect",{x:"0",y:"9",width:"12",height:"3"}),G.jsx("rect",{x:"0",y:"0",width:"3",height:"12"})]}),v==="br"&&G.jsxs(G.Fragment,{children:[G.jsx("rect",{x:"0",y:"9",width:"12",height:"3"}),G.jsx("rect",{x:"9",y:"0",width:"3",height:"12"})]})]})})}function _Q({children:v,className:D="",accent:g="var(--primary)",glow:r=!1}){return G.jsxs("div",{className:`relative bg-[var(--surface)] border border-[var(--surface-line)] ${D}`,style:{boxShadow:r?"var(--glow-primary), var(--shadow-lg)":"var(--shadow-lg)"},children:[v,ou.map(n=>G.jsx(Pu,{pos:n,accent:g},n))]})}const Lu=()=>{const{gameStateManager:v}=xA.getState(),{audioSettings:D,updateAudioSettings:g}=X4(),[r,n]=W.useState(!1),[P,o]=W.useState(null),{masterVolume:T,musicVolume:z,sfxVolume:c,masterMuted:k,musicMuted:Y,sfxMuted:e}=D||{masterVolume:80,musicVolume:70,sfxVolume:90,masterMuted:!1,musicMuted:!1,sfxMuted:!1};W.useEffect(()=>{D&&!P&&o({...D})},[D]);const J=W.useMemo(()=>P?P.masterVolume!==T||P.musicVolume!==z||P.sfxVolume!==c||P.masterMuted!==k||P.musicMuted!==Y||P.sfxMuted!==e:!1,[P,T,z,c,k,Y,e]),i=()=>{J&&n0(T,z,c,k,Y,e),v?.closeNestedMenu()},R=async()=>{n(!0),n0(T,z,c,k,Y,e),o({masterVolume:T,musicVolume:z,sfxVolume:c,masterMuted:k,musicMuted:Y,sfxMuted:e}),setTimeout(()=>{n(!1)},800)};return G.jsxs("div",{className:"flex flex-col justify-center w-[80%]",children:[G.jsxs("div",{className:"flex items-center mb-6 gap-3",children:[G.jsx($8,{onClick:i,variant:"outline",size:"icon",className:"text-foreground hover:text-primary",children:G.jsx(E9,{size:20})}),G.jsx("h2",{className:"text-2xl font-pixel text-foreground tracking-wide uppercase",children:"Innstillinger"})]}),G.jsxs("div",{className:"space-y-2",children:[G.jsxs(_Q,{className:"p-3",children:[G.jsxs("div",{className:"flex justify-between items-center mb-2",children:[G.jsx("span",{className:"text-[var(--foreground-muted)] font-mono text-sm",children:"Master volum"}),G.jsx("button",{onClick:()=>g({masterMuted:!k}),className:`px-3 py-1 rounded-sm text-sm font-pixel tracking-wide border ${k?"bg-destructive border-destructive text-primary-foreground":"bg-[var(--surface-raised)] border-[var(--surface-line)] text-foreground"}`,children:k?"MUTED":`${T}%`})]}),G.jsx("input",{type:"range",min:"0",max:"100",value:k?0:T,onChange:q=>g({masterVolume:Number(q.target.value)}),className:"w-full accent-primary",disabled:k})]}),G.jsxs(_Q,{className:"p-3",children:[G.jsxs("div",{className:"flex justify-between items-center mb-2",children:[G.jsx("span",{className:"text-[var(--foreground-muted)] font-mono text-sm",children:"Musikk volum"}),G.jsx("button",{onClick:()=>g({musicMuted:!Y}),className:`px-3 py-1 rounded-sm text-sm font-pixel tracking-wide border ${Y?"bg-destructive border-destructive text-primary-foreground":"bg-[var(--surface-raised)] border-[var(--surface-line)] text-foreground"}`,children:Y?"MUTED":`${z}%`})]}),G.jsx("input",{type:"range",min:"0",max:"100",value:Y?0:z,onChange:q=>g({musicVolume:Number(q.target.value)}),className:"w-full accent-primary",disabled:Y})]}),G.jsxs(_Q,{className:"p-3",children:[G.jsxs("div",{className:"flex justify-between items-center mb-2",children:[G.jsx("span",{className:"text-[var(--foreground-muted)] font-mono text-sm",children:"Lyd effekter"}),G.jsx("button",{onClick:()=>g({sfxMuted:!e}),className:`px-3 py-1 rounded-sm text-sm font-pixel tracking-wide border ${e?"bg-destructive border-destructive text-primary-foreground":"bg-[var(--surface-raised)] border-[var(--surface-line)] text-foreground"}`,children:e?"MUTED":`${c}%`})]}),G.jsx("input",{type:"range",min:"0",max:"100",value:e?0:c,onChange:q=>g({sfxVolume:Number(q.target.value)}),className:"w-full accent-primary",disabled:e})]}),G.jsx("p",{className:"text-center text-xs text-[var(--foreground-dim)] font-mono py-1",children:"Trykk på tallene for å mute lyd"}),G.jsxs("div",{className:"flex gap-3",children:[G.jsx($8,{variant:"secondary",onClick:()=>{g(lo)},className:"flex-1",children:"Tilbakestill"}),G.jsx($8,{variant:"default",onClick:R,disabled:!J||r,className:`flex-1 ${J?"":"opacity-50 cursor-not-allowed"}`,children:r?G.jsxs("div",{className:"flex items-center gap-2",children:[G.jsx(IP,{className:"h-4 w-4 animate-spin"}),G.jsx("span",{children:"Oppdaterer..."})]}):"Oppdater lyd"})]})]})]})},Mu=(v,D={})=>{const{duration:g=3e3,steps:r=60,easing:n="ease-out",delay:P=0,onComplete:o}=D,[T,z]=W.useState(0),c=W.useRef(!1),k=W.useRef(v);return W.useEffect(()=>{if(v===0){z(0),c.current=!1;return}if(k.current!==v&&(c.current=!1,z(0),k.current=v),c.current){z(v);return}const Y=setTimeout(()=>{const e=g/r;let J=0;const i=setInterval(()=>{J++;const R=J/r;let q;switch(n){case"linear":q=R;break;case"ease-out":q=1-(1-R)*(1-R);break;case"gentle-ease-out":q=1-Math.pow(1-R,1.5);break;case"ease-in":q=R*R;break;case"ease-in-out":q=R<.5?2*R*R:1-Math.pow(-2*R+2,2)/2;break;default:q=1-(1-R)*(1-R)}const fA=v*q,gA=Math.round(fA);z(gA),J>=r&&(z(v),c.current=!0,clearInterval(i),o&&o())},e);return()=>clearInterval(i)},P);return()=>clearTimeout(Y)},[v,g,r,n,P,o]),T},Cu=()=>{const{currentLevel:v,correctOrderCount:D,lives:g}=xA(),{score:r}=r7(),{setBonusAnimationComplete:n}=xA(),{currentMap:P}=c8(),o=x.STARTING_LIVES-g,T=Math.max(0,D-o),z=x.BONUS_POINTS[T]||0,c=Mu(z,{duration:6e3,steps:120,easing:"gentle-ease-out",delay:200,onComplete:()=>{u.debug("Bonus animation completed, setting flag for transition"),n(!0)}});return G.jsxs("div",{className:"text-center max-w-md",children:[G.jsxs("h1",{className:"text-4xl font-pixel text-primary tracking-wide mb-4 uppercase",children:[P?.name," Fullført!"]}),G.jsx("div",{className:"text-foreground mb-6 space-y-4",children:z>0&&G.jsxs("div",{className:"flex flex-col items-center justify-center gap-5",children:[G.jsxs("div",{className:"text-xl text-[var(--foreground-muted)]",children:["Du samlet"," ",G.jsx("span",{className:"font-pixel text-primary",children:T})," ","av 23 finansieringer!"]}),G.jsxs("div",{className:"text-5xl font-pixel text-primary animate-pulse",style:{textShadow:"0 0 12px rgba(171,221,100,.5)"},children:[c.toLocaleString()," kr"]}),G.jsx("div",{className:"text-sm text-[var(--foreground-dim)] mt-2 font-mono",children:Q3.length>v?`Fortsetter til ${Q3[v]?.name||"Neste nivå"}...`:""})]})})]})},zu=()=>{const{gameStateManager:v}=xA.getState(),{getLevelResults:D}=c8.getState(),[g,r]=W.useState(!0),[n,P]=W.useState(!1),{hasBridge:o,insufficientFunds:T}=_I(),z=D();W.useEffect(()=>{o0().then(()=>{r(!1)})},[]);const c=async()=>{if(!(g||n)){if(o){P(!0);const e=await Uw(1);if(P(!1),!e.success){_I.getState().setInsufficientFunds(!0);return}}v?.restartGame()}},k=z.reduce((e,J)=>e+J.score,0),Y=z.reduce((e,J)=>e+J.bonus,0);return G.jsxs("div",{className:"text-center max-w-2xl",children:[G.jsx("h1",{className:"text-4xl font-pixel text-primary tracking-wide mb-1",children:"UNICORN FOUNDER!"}),G.jsx("p",{className:"text-sm text-[var(--foreground-dim)] mb-4",children:"Du har bygget en billion-dollar idé"}),z.length>0&&G.jsx(_Q,{className:"p-0 mb-6",children:G.jsx("div",{className:"overflow-x-auto",children:G.jsxs("table",{className:"w-full text-sm font-mono",children:[G.jsx("thead",{children:G.jsxs("tr",{className:"border-b border-[var(--surface-line)]",children:[G.jsx("th",{className:"text-left py-2 px-3 text-primary font-pixel text-xs tracking-widest",children:"Bane"}),G.jsx("th",{className:"text-right py-2 px-3 text-primary font-pixel text-xs tracking-widest",children:"Finansiering"}),G.jsx("th",{className:"text-right py-2 px-3 text-primary font-pixel text-xs tracking-widest",children:"Bonus"})]})}),G.jsx("tbody",{children:z.map((e,J)=>G.jsxs("tr",{className:"border-b border-[var(--surface-line)]/30",children:[G.jsxs("td",{className:"py-2 px-3 text-left text-foreground",children:[G.jsx(kw,{className:"w-4 h-4 text-primary inline mr-2"}),G.jsx("span",{className:"font-medium",children:e.mapName}),G.jsxs("span",{className:"text-xs text-[var(--foreground-dim)] ml-2",children:["(Nivå ",e.level,")"]})]}),G.jsxs("td",{className:"py-2 px-3 text-right text-foreground",children:[e.score.toLocaleString()," kr"]}),G.jsx("td",{className:"py-2 px-3 text-right",children:e.bonus>0?G.jsxs("span",{className:"text-amber-700 font-semibold",children:[e.bonus.toLocaleString()," kr"]}):G.jsx("span",{className:"text-[var(--foreground-dim)]",children:"-"})})]},J))}),G.jsxs("tfoot",{children:[G.jsxs("tr",{className:"border-t-2 border-primary",children:[G.jsx("td",{className:"py-3 px-3 text-left font-pixel text-primary tracking-wide",children:"TOTALT"}),G.jsxs("td",{className:"py-3 px-3 text-right font-pixel text-primary text-lg",children:[k.toLocaleString()," kr"]}),G.jsx("td",{className:"py-3 px-3 text-right font-pixel text-amber-700 text-lg",children:Y>0?`${Y.toLocaleString()} kr`:"-"})]}),G.jsxs("tr",{children:[G.jsx("td",{className:"py-3 px-3 text-left font-pixel text-foreground text-base tracking-wide",children:"TOTAL FINANSIERING"}),G.jsxs("td",{colSpan:2,className:"py-3 px-3 text-right font-pixel text-foreground text-xl",children:[(k+Y).toLocaleString()," kr"]})]})]})]})})}),G.jsxs("div",{className:"flex flex-col items-center gap-3 mt-4",children:[g&&G.jsxs("div",{className:"text-sm text-[var(--foreground-dim)] flex items-center gap-2 font-mono",children:[G.jsx(IP,{className:"w-4 h-4 animate-spin"}),"Lagrer spillet..."]}),T&&o?G.jsxs("div",{className:"text-center py-3 px-6 bg-[var(--accent-red)]/10 border border-[var(--accent-red)]/30 rounded-sm",children:[G.jsx("p",{className:"text-[var(--accent-red)] font-pixel text-sm",children:"IKKE NOK MYNTER"}),G.jsx("p",{className:"text-[var(--foreground-dim)] text-xs font-mono mt-1",children:"Kjøp flere mynter for å spille"})]}):G.jsx($8,{onClick:c,disabled:g||n,className:`uppercase px-10 ${g||n?"opacity-50 cursor-not-allowed":""}`,children:n?"Venter...":o?"Spill igjen (1 mynt)":"Spill igjen"})]})]})},cu=()=>{const{gameStateManager:v}=xA.getState(),{getLevelResults:D}=c8.getState(),[g,r]=W.useState(!0),[n,P]=W.useState(!1),{balance:o,hasBridge:T,insufficientFunds:z}=_I(),c=D();W.useEffect(()=>{o0().then(()=>{r(!1)})},[]);const k=async()=>{if(!(g||n)){if(T){P(!0);const J=await Uw(1);if(P(!1),!J.success){_I.getState().setInsufficientFunds(!0);return}}v?.restartGame()}},Y=c.reduce((J,i)=>J+i.score,0),e=c.reduce((J,i)=>J+i.bonus,0);return G.jsxs("div",{className:"text-center max-w-2xl",children:[G.jsx("h1",{className:"text-4xl font-pixel text-foreground tracking-wide mb-1",children:"KAPITALEN TØRKET UT"}),G.jsx("p",{className:"text-sm text-[var(--foreground-dim)] mb-4",children:"Startupen gikk konkurs"}),c.length>0&&G.jsx(_Q,{className:"p-0 mb-6",children:G.jsx("div",{className:"overflow-x-auto",children:G.jsxs("table",{className:"w-full text-sm font-mono",children:[G.jsx("thead",{children:G.jsxs("tr",{className:"border-b border-[var(--surface-line)]",children:[G.jsx("th",{className:"text-center py-2 px-3 text-primary font-pixel text-xs tracking-widest",children:G.jsx(kw,{className:"w-4 h-4 inline"})}),G.jsx("th",{className:"text-left py-2 px-3 text-primary font-pixel text-xs tracking-widest",children:"Bane"}),G.jsx("th",{className:"text-right py-2 px-3 text-primary font-pixel text-xs tracking-widest",children:"Finansiering"}),G.jsx("th",{className:"text-right py-2 px-3 text-primary font-pixel text-xs tracking-widest",children:"Bonus"})]})}),G.jsx("tbody",{children:c.map((J,i)=>G.jsxs("tr",{className:"border-b border-[var(--surface-line)]/30",children:[G.jsx("td",{className:"py-2 px-3 text-center",children:G.jsx("div",{className:"flex justify-center items-center",children:G.jsx("div",{className:`w-4 h-4 border-2 rounded-sm ${J.isPartial?"bg-destructive border-red-600":"bg-primary border-primary-dark"} flex items-center justify-center`,children:J.isPartial?G.jsx(da,{className:"w-3 h-3 text-white"}):G.jsx(kw,{className:"w-3 h-3 text-white"})})})}),G.jsxs("td",{className:"py-2 px-3 text-left text-foreground",children:[G.jsx("span",{className:"font-medium",children:J.mapName}),G.jsxs("span",{className:"text-xs text-[var(--foreground-dim)] ml-2",children:["(Nivå ",J.level,")"]})]}),G.jsxs("td",{className:"py-2 px-3 text-right text-foreground",children:[J.score.toLocaleString()," kr"]}),G.jsx("td",{className:"py-2 px-3 text-right",children:J.bonus>0?G.jsxs("span",{className:"text-amber-700 font-semibold",children:[J.bonus.toLocaleString()," kr"]}):G.jsx("span",{className:"text-[var(--foreground-dim)]",children:"-"})})]},i))}),G.jsx("tfoot",{children:G.jsxs("tr",{className:"border-t-2 border-primary",children:[G.jsx("td",{colSpan:2,className:"py-3 px-3 text-left font-pixel text-primary tracking-wide",children:"TOTAL"}),G.jsxs("td",{colSpan:2,className:"py-3 px-3 text-right font-pixel text-foreground text-xl",children:[(Y+e).toLocaleString()," kr"]})]})})]})})}),G.jsxs("div",{className:"flex flex-col items-center gap-3",children:[g&&G.jsxs("div",{className:"text-sm text-[var(--foreground-dim)] flex items-center gap-2 font-mono",children:[G.jsx(IP,{className:"w-4 h-4 animate-spin"}),"Lagrer spillet..."]}),z&&T?G.jsxs("div",{className:"text-center py-3 px-6 bg-[var(--accent-red)]/10 border border-[var(--accent-red)]/30 rounded-sm",children:[G.jsx("p",{className:"text-[var(--accent-red)] font-pixel text-sm",children:"IKKE NOK MYNTER"}),G.jsx("p",{className:"text-[var(--foreground-dim)] text-xs font-mono mt-1",children:"Kjøp flere mynter for å spille"})]}):G.jsx($8,{onClick:k,disabled:g||n,className:`uppercase px-10 ${g||n?"opacity-50 cursor-not-allowed":""}`,children:n?"Venter...":T?"Prøv igjen (1 mynt)":"Prøv igjen"})]})]})},Uu=()=>G.jsx("div",{className:"absolute bottom-2 left-30 right-30 p-2",children:G.jsxs("div",{className:"flex items-center justify-center gap-6 text-sm",children:[G.jsxs("div",{className:"flex items-center gap-1",children:[G.jsx("span",{className:"font-bold text-white rounded-md flex items-center justify-center text-lg",children:"F"}),G.jsx("span",{className:"text-foreground",children:"- Fullskjerm toggle"})]}),G.jsx("div",{className:"w-[1px] h-10 bg-gray-500"}),G.jsxs("div",{className:"flex items-center gap-2",children:[G.jsx("span",{className:"font-bold text-white rounded-md flex items-center justify-center text-lg",children:"P"}),G.jsx("span",{className:"text-foreground",children:"- Pause toggle"})]}),G.jsx("div",{className:"w-[1px] h-10 bg-gray-500"}),G.jsxs("div",{className:"flex items-center gap-2",children:[G.jsx("span",{className:"font-bold text-white rounded-md flex items-center justify-center text-lg",children:"M"}),G.jsx("span",{className:"text-foreground",children:"- Mute toggle"})]})]})}),K4=({children:v,transparent:D,showShortcuts:g=!0})=>{const{currentState:r}=xA(),n=r===uA.COUNTDOWN;return G.jsxs("div",{className:`absolute inset-0 flex items-center justify-center z-50 ${n?"bg-menu backdrop-blur-sm menu-blur-out":D?"bg-transparent":"bg-menu backdrop-blur-sm"}`,children:[v,r!==uA.PLAYING&&r!==uA.COUNTDOWN&&r!==uA.GAME_OVER&&r!==uA.VICTORY&&g&&G.jsx(Uu,{})]})},Tu=v=>{const{audioSettings:D,updateAudioSettings:g}=X4.getState(),{currentState:r,gameStateManager:n}=xA.getState();W.useEffect(()=>{const P=o=>{if(!(o.target instanceof HTMLInputElement||o.target instanceof HTMLTextAreaElement))switch(o.key){case"f":case"F":v?.();break;case"Escape":(document.fullscreenElement||document.webkitFullscreenElement)&&v?.();break;case"p":case"P":r===uA.PLAYING?n?.pauseGame():r===uA.PAUSED&&n?.resumeGame();break;case"m":case"M":g({masterMuted:!D.masterMuted});break}};return document.addEventListener("keydown",P),()=>{document.removeEventListener("keydown",P)}},[r,n,v,g,D.masterMuted])},MH={major:4,minor:0,patch:0,build:0,timestamp:1777502341541,hash:"OPLAC5",full:"4.0.0"},bP=MH.full,zg=()=>({version:bP,major:MH.major,minor:MH.minor,patch:MH.patch,build:MH.build,timestamp:MH.timestamp,hash:MH.hash}),tc=()=>{console.log("🎮 Sigurd Startup Game v"+bP+" (Build "+MH.build+")"),console.log("📦 Hash: "+MH.hash),console.log("⏰ Built: "+new Date(MH.timestamp).toISOString())},Fu=()=>{const{gameStateManager:v}=xA.getState(),D=[{keys:["←","→"],wasdKeys:["A","D"],description:"Beveg deg sidelengs"},{keys:["↑"],wasdKeys:["W"],description:"Hopp"},{keys:["SPACE"],description:"Flytemodus (Hold)"},{keys:["↑","SHIFT"],wasdKeys:["W","SHIFT"],description:"Super hopp"},{keys:["↓"],wasdKeys:["S"],description:"Rask fall"}],g=()=>{v?.closeNestedMenu()};return G.jsxs("div",{className:"flex flex-col justify-center h-full w-[80%]",children:[G.jsxs("div",{className:"flex items-center mb-6 gap-3",children:[G.jsx($8,{onClick:g,variant:"outline",size:"icon",className:"text-foreground hover:text-primary",children:G.jsx(E9,{size:20})}),G.jsx("h2",{className:"text-2xl font-pixel text-foreground tracking-wide uppercase",children:"Kontroller"})]}),G.jsx("div",{className:"grid grid-cols-2 gap-3",children:D.map((r,n)=>G.jsxs(_Q,{className:"p-4",children:[G.jsx("p",{className:"text-foreground text-sm text-center mb-3 font-mono",children:r.description}),G.jsx("div",{className:"flex items-center justify-center gap-3",children:G.jsxs("div",{className:"flex gap-2 items-center",children:[r.wasdKeys&&G.jsxs(G.Fragment,{children:[r.wasdKeys.map((P,o)=>G.jsx("kbd",{className:"px-2 py-1 bg-[var(--surface-raised)] text-foreground rounded-sm border border-[var(--surface-line)] border-b-[3px] text-sm font-pixel tracking-wide min-w-[30px] text-center",children:P},o)),G.jsx("span",{className:"text-[var(--foreground-dim)] text-xs mx-1",children:"eller"})]}),r.keys.map((P,o)=>G.jsx("kbd",{className:"px-2 py-1 bg-[var(--surface-raised)] text-foreground rounded-sm border border-[var(--surface-line)] border-b-[3px] text-sm font-pixel tracking-wide min-w-[30px] text-center",children:P},o))]})})]},n))})]})},ku=()=>{const{gameStateManager:v}=xA.getState(),D=r=>{v?.openTutorialBrief?.(r)},g=()=>{v?.quitToMenu?.()};return G.jsxs("div",{className:"flex flex-col items-center justify-center h-full px-6 py-4 max-w-2xl",children:[G.jsxs("div",{className:"flex items-center gap-3 mb-6",children:[G.jsx(tz,{size:28,className:"text-primary"}),G.jsx("h1",{className:"text-3xl font-pixel text-foreground tracking-wide",children:"Sandkassa"})]}),G.jsx("div",{className:"grid grid-cols-2 gap-3 w-full mb-6",children:rH.map((r,n)=>{const P=fH[r];return G.jsxs("button",{onClick:()=>D(r),className:"text-left bg-[var(--surface)] hover:bg-[var(--surface-raised)] border-2 border-[var(--surface-line)] rounded-sm p-4 transition-colors cursor-pointer",children:[G.jsxs("div",{className:"text-xs font-mono text-[var(--foreground-dim)] mb-1",children:["Oppdrag ",n+1]}),G.jsx("div",{className:"font-pixel text-base text-foreground tracking-wider mb-1",children:P.title}),G.jsx("div",{className:"text-xs text-[var(--foreground-dim)] font-mono leading-snug",children:P.description})]},r)})}),G.jsxs($8,{onClick:g,variant:"secondary",className:"uppercase text-sm",children:[G.jsx(E9,{size:16}),"Tilbake"]})]})},ju=()=>{const v=xA(n=>n.pendingTutorialMission),{gameStateManager:D}=xA.getState();if(!v)return null;const g=fH[v],r=rH.indexOf(v);return G.jsxs("div",{className:"flex flex-col items-center justify-center h-full px-6 max-w-lg w-full text-center",children:[G.jsxs("div",{className:"text-[10px] font-mono text-[var(--foreground-dim)] uppercase tracking-[0.2em] mb-2",children:["Oppdrag ",r+1," av ",rH.length]}),G.jsx("h1",{className:"text-3xl font-pixel text-foreground tracking-wide mb-5",children:g.title}),G.jsxs("div",{className:"w-full max-w-[340px] bg-[var(--surface-raised)] border-2 border-[var(--surface-line)] rounded-sm px-4 py-3 mb-4 shadow-[0_3px_0_0_rgba(0,0,0,0.3)]",children:[G.jsxs("div",{className:"flex items-center gap-2 justify-center mb-1.5",children:[G.jsx(pa,{size:12,className:"text-primary"}),G.jsx("span",{className:"text-[10px] font-mono text-primary uppercase tracking-[0.2em]",children:"Mål"})]}),G.jsx("p",{className:"font-pixel text-sm text-foreground leading-snug tracking-wide",children:g.goal})]}),G.jsx("p",{className:"text-xs font-mono text-[var(--foreground-dim)] italic leading-relaxed text-balance max-w-[340px] mb-6",children:g.description}),G.jsxs("div",{className:"flex gap-3",children:[G.jsxs($8,{onClick:()=>D?.openTutorialSelect?.(),variant:"secondary",className:"uppercase text-sm",children:[G.jsx(E9,{size:16}),"Tilbake"]}),G.jsxs($8,{onClick:()=>D?.startTutorialMission?.(v),className:"uppercase text-sm",children:[G.jsx(jw,{size:16}),"Start"]})]})]})},bu=(v,D,g)=>{if(v==="skipped")return"Greit. Du gjør det på din måte.";switch(D){case C8.MOVEMENTS:return"Du beveger deg som en konsulent på timepris.";case C8.BOMBS:return"Skattefunn-godkjent — eller i det minste innsendt.";case C8.SURVIVE:return"Byråkratene stoppet for kaffepause. Lykke til neste gang.";case C8.KILL:{const r=g?.ryggvind;return r?`${r} gikk ut. Tilbake til søknadsskjemaet.`:"Effekten gikk ut. Tilbake til søknadsskjemaet."}default:return""}},Yu=()=>{const v=xA(Y=>Y.tutorialResult),{gameStateManager:D}=xA.getState();if(!v)return null;const{reason:g,missionId:r,stats:n}=v,P=r?fH[r]:void 0,o=bu(g,r,n),T=g==="complete"?"Fullført!":"Hoppet over",z=r?rH.indexOf(r):-1,c=z>0,k=z>=0&&z<rH.length-1;return G.jsxs("div",{className:"flex flex-col items-center justify-center h-full px-6 max-w-md text-center",children:[P&&G.jsx("h1",{className:"text-3xl font-pixel text-foreground tracking-wide mb-1 leading-tight",children:P.title}),G.jsx("div",{className:`text-sm font-pixel uppercase tracking-[0.2em] mb-4 ${g==="complete"?"text-primary":"text-[var(--foreground-dim)]"}`,children:T}),o&&G.jsx("p",{className:"text-xs font-mono text-[var(--foreground-dim)] mb-4 italic text-balance max-w-[320px]",children:o}),n&&Object.keys(n).length>0&&G.jsx("div",{className:"flex flex-col gap-1.5 my-2 text-sm font-mono w-full max-w-[260px]",children:Object.entries(n).map(([Y,e],J,i)=>G.jsxs("div",{className:`flex items-center justify-between gap-6 py-1 ${J<i.length-1?"border-b border-dashed border-[var(--surface-line)]":""}`,children:[G.jsx("span",{className:"uppercase text-[var(--foreground-dim)] text-xs tracking-wide",children:Y}),G.jsx("span",{className:"text-foreground",children:e})]},Y))}),G.jsxs("div",{className:"flex gap-3 mt-5 flex-wrap justify-center",children:[G.jsxs($8,{onClick:()=>D?.goToPreviousTutorialMission?.(),variant:"secondary",disabled:!c,className:"uppercase text-sm",children:[G.jsx(E9,{size:16}),"Tilbake"]}),G.jsxs($8,{onClick:()=>D?.goToNextTutorialMission?.(),disabled:!k,className:"uppercase text-sm",children:["Neste",G.jsx(ua,{size:16})]}),G.jsxs($8,{onClick:()=>D?.quitToMenu?.(),variant:"secondary",className:"uppercase text-sm",children:[G.jsx(ya,{size:16}),"Hovedmeny"]})]})]})},Gu=()=>{const v=xA(g=>g.tutorialMission);if(!v)return null;const D=fH[v];return G.jsxs("div",{className:"absolute top-3 right-3 z-30 bg-menu backdrop-blur-sm border-2 border-[var(--surface-line)] rounded-sm shadow-[0_4px_0_0_rgba(0,0,0,0.4)] px-4 py-3 max-w-[280px]",style:{minWidth:220},children:[G.jsx("div",{className:"font-pixel text-xs uppercase tracking-wider text-primary mb-2 leading-none",children:D.overlayTitle??D.title}),v===C8.MOVEMENTS&&G.jsx(Xu,{}),v===C8.BOMBS&&G.jsx(Ju,{}),v===C8.SURVIVE&&G.jsx(eu,{}),v===C8.KILL&&G.jsx(tu,{})]})},Kc=[{keys:["←"],wasdKeys:["A"],description:"Gå venstre",subTaskId:"moveLeft"},{keys:["→"],wasdKeys:["D"],description:"Gå høyre",subTaskId:"moveRight"},{keys:["↑"],wasdKeys:["W"],description:"Hopp",subTaskId:"jump"},{keys:["↑","SHIFT"],wasdKeys:["W","SHIFT"],description:"Super-hopp",subTaskId:"superJump"},{keys:["SPACE"],description:"Sveve (hold)",subTaskId:"float"},{keys:["↓"],wasdKeys:["S"],description:"Rask fall",subTaskId:"fall"}],Xu=()=>{const v=xA(n=>n.tutorialSubTasks),D=og(n=>n.input),g=n=>n==="←"||n==="A"?D.left:n==="→"||n==="D"?D.right:n==="↑"||n==="W"?D.jump:n==="↓"||n==="S"?D.fastFall:n==="SPACE"?D.float:n==="SHIFT"?D.superJump:!1,r=v.length;return G.jsx("div",{className:"space-y-0",children:Kc.map((n,P)=>{const o=v.includes(n.subTaskId),T=P>r;return G.jsxs("div",{className:`flex justify-between items-center py-2 transition-opacity ${P<Kc.length-1?"border-b border-dashed border-[var(--surface-line)]":""} ${T?"opacity-30":"opacity-100"}`,children:[G.jsx("span",{className:`font-mono text-[11px] ${o?"text-primary line-through":"text-foreground"}`,children:n.description}),G.jsxs("div",{className:"flex items-center gap-1",children:[n.keys.map((z,c)=>G.jsxs(RQ.Fragment,{children:[G.jsx(ic,{label:z,active:g(z)}),c<n.keys.length-1&&G.jsx("span",{className:"text-primary font-mono text-[10px]",children:"+"})]},`p-${c}`)),n.wasdKeys&&G.jsxs(G.Fragment,{children:[G.jsx("span",{className:"text-[var(--foreground-dim)] font-mono text-[9px] mx-0.5",children:"/"}),n.wasdKeys.map((z,c)=>G.jsxs(RQ.Fragment,{children:[G.jsx(ic,{label:z,active:g(z)}),c<n.wasdKeys.length-1&&G.jsx("span",{className:"text-primary font-mono text-[10px]",children:"+"})]},`w-${c}`))]}),o&&G.jsx(kw,{size:11,className:"text-primary ml-1"})]})]},P)})})},ic=({label:v,active:D})=>{const g=v==="SPACE"||v==="SHIFT";return G.jsx("kbd",{className:`font-mono border rounded-sm px-1.5 py-0.5 text-[10px] text-center tracking-[.05em] transition-colors ${D?"bg-primary text-primary-foreground border-primary":"bg-[var(--surface-raised)] border-[var(--surface-line)] text-foreground"} ${g?"min-w-[42px]":"min-w-[20px]"}`,children:v})},Ju=()=>{const v=xA(P=>P.bombs),D=xA(P=>P.correctOrderCount),g=v.filter(P=>P.isCollected).length,r=v.length||14,n=g===0?"Plukk hvilken som helst finansiering":"Følg den blinkende finansieringen";return G.jsxs("div",{className:"space-y-2",children:[G.jsx("p",{className:"font-mono text-[11px] text-foreground leading-snug",children:n}),G.jsxs("div",{className:"flex justify-between font-mono text-[11px] pt-1 border-t border-dashed border-[var(--surface-line)]",children:[G.jsx("span",{className:"text-[var(--foreground-dim)]",children:"Plukket"}),G.jsxs("span",{className:"text-foreground",children:[g,"/",r]})]}),G.jsxs("div",{className:"flex justify-between font-mono text-[11px]",children:[G.jsx("span",{className:"text-[var(--foreground-dim)]",children:"Riktig rekkefølge"}),G.jsxs("span",{className:"text-primary",children:[D,"/",r]})]})]})},eu=()=>{const v=xA(P=>P.tutorialMission),[D,g]=W.useState(0),[r]=W.useState(()=>Date.now());W.useEffect(()=>{if(!v)return;const o=fH[v].surviveDurationMs??3e4,T=setInterval(()=>{g(Math.max(0,o-(Date.now()-r)))},100);return g(o),()=>clearInterval(T)},[v,r]);const n=(D/1e3).toFixed(1);return G.jsxs("div",{className:"text-center space-y-1",children:[G.jsxs("div",{className:"font-pixel text-3xl text-primary tabular-nums tracking-wide",children:[n,"s"]}),G.jsxs("p",{className:"font-mono text-[10px] text-[var(--foreground-dim)] leading-snug",children:["Hold deg unna byråkratene.",G.jsx("br",{}),"Lykke til."]})]})},tu=()=>{const v=xA(D=>D.tutorialActivePcoinIndex);return G.jsxs("div",{className:"space-y-1.5",children:[G.jsx("p",{className:"font-mono text-[10px] text-[var(--foreground-dim)] leading-snug mb-1",children:"Mynten skifter farge — vent på den verdifulle."}),U0.map((D,g)=>{const r=v===g;return G.jsxs("div",{className:`flex justify-between items-center text-[11px] font-mono px-1.5 py-0.5 rounded-sm transition-colors ${r?"bg-primary/15 ring-1 ring-primary/60":""}`,children:[G.jsxs("div",{className:"flex items-center gap-2",children:[G.jsx("span",{className:"inline-block w-2.5 h-2.5 rounded-full border border-black/20",style:{backgroundColor:D.color}}),G.jsx("span",{className:r?"text-primary font-semibold":"text-foreground",children:D.label})]}),G.jsx("span",{className:`tabular-nums ${r?"text-primary":"text-[var(--foreground-dim)]"}`,children:D.durationLabel})]},g)})]})},Ku=()=>{const{currentState:v,showMenu:D}=xA(),g=RQ.useRef(null),{toggleFullscreen:r}=$f(),{isFullscreen:n}=$f();return Tu(()=>{const o=g.current?.closest("sigurd-startup");o?r(o):r()}),G.jsxs("div",{ref:g,className:"relative rounded-lg overflow-hidden shadow-lg shadow-black/10",children:[G.jsx("div",{className:"relative z-50",children:G.jsx(wu,{})}),G.jsxs("div",{className:"relative bg-black",children:[G.jsx(Oi,{}),v===uA.PLAYING&&G.jsx(nu,{}),v===uA.PLAYING&&G.jsx(Gu,{}),RD.ENABLED,G.jsxs("div",{className:`absolute bottom-3 right-3 ${n?"text-md":"text-xs"} text-muted-foreground z-40 ${n?"bottom-4":"bottom-3"}`,children:["v",bP," (Build ",zg().build,")"]}),D===TE.START&&G.jsx(K4,{children:G.jsx(ma,{})}),D===TE.COUNTDOWN&&G.jsx(K4,{children:G.jsx(qa,{})}),D===TE.CONTROLS&&G.jsx(K4,{children:G.jsx(Fu,{})}),D===TE.PAUSE&&G.jsx(K4,{children:G.jsx(su,{})}),D===TE.SETTINGS&&G.jsx(K4,{children:G.jsx(Lu,{})}),D===TE.BONUS&&G.jsx(K4,{children:G.jsx(Cu,{})}),D===TE.VICTORY&&G.jsx(K4,{children:G.jsx(zu,{})}),D===TE.GAME_OVER&&G.jsx(K4,{children:G.jsx(cu,{})}),D===TE.TUTORIAL_SELECT&&G.jsx(K4,{children:G.jsx(ku,{})}),D===TE.TUTORIAL_BRIEF&&G.jsx(K4,{children:G.jsx(ju,{})}),D===TE.TUTORIAL_RESULT&&G.jsx(K4,{children:G.jsx(Yu,{})})]})]})},iu='*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:JetBrains Mono,ui-monospace,monospace;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:JetBrains Mono,ui-monospace,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}:root,:host{--font-pixel: "Pixelify Sans", "Press Start 2P", cursive;--font-mono: "JetBrains Mono", ui-monospace, monospace;--font-lcd: "VT323", "JetBrains Mono", monospace}:root{--background-deep: #20252e;--background: #2a303c;--foreground: #ffffff;--foreground-muted: #b2ccd6;--foreground-dim: #91a6b0;--surface: #242933;--surface-raised: #2f3543;--surface-line: #3a4150;--card: var(--surface);--card-foreground: var(--foreground);--popover: var(--surface-raised);--popover-foreground: var(--foreground);--primary: #abdd64;--primary-light: #c2eb83;--primary-dark: #7fb33d;--primary-ink: hsl(86deg 70% 4%);--primary-opacity-hover: rgba(171, 221, 100, .35);--primary-foreground: hsl(86deg 70% 4%);--accent-pink: #ee90cb;--accent-pink-soft: rgba(238, 144, 203, .15);--accent-purple: #8465ec;--accent-purple-soft: rgba(132, 101, 236, .15);--accent-peach: #f2ae99;--accent-peach-soft: rgba(242, 174, 153, .15);--accent-red: #ee90cb;--accent-red-soft: rgba(238, 144, 203, .15);--secondary: #2f3543;--secondary-light: #3a4150;--secondary-dark: #242933;--secondary-foreground: var(--foreground);--muted: #242933;--muted-foreground: var(--foreground-muted);--accent: var(--primary);--accent-foreground: var(--primary-ink);--destructive: #e05555;--destructive-foreground: #ffffff;--ok: #abdd64;--ok-soft: rgba(171, 221, 100, .15);--ok-glow: rgba(171, 221, 100, .35);--border: var(--surface-line);--input: var(--surface-line);--ring: var(--primary);--radius-sm: 4px;--radius: 8px;--radius-md: 8px;--radius-lg: 12px;--radius-xl: 16px;--radius-pill: 9999px;--menu-background: rgba(36, 41, 51, .92);--sidebar-background: 218deg 18% 15%;--sidebar-foreground: 0deg 0% 100%;--sidebar-primary: 85deg 64% 63%;--sidebar-primary-foreground: 86deg 70% 4%;--sidebar-accent: 220 17% 18%;--sidebar-accent-foreground: 0deg 0% 100%;--sidebar-border: 220 14% 27%;--sidebar-ring: 85deg 64% 63%;--gradient-primary: linear-gradient(135deg, #c2eb83 0%, #7fb33d 100%);--gradient-primary-hover: linear-gradient( 135deg, #d2f59a 0%, #92c84a 100% );--gradient-sky: linear-gradient( 180deg, #2a303c 0%, #242933 60%, #20252e 100% );--gradient-brand: linear-gradient(135deg, #ee90cb 0%, #8465ec 100%);--gradient-warm: linear-gradient(135deg, #f2ae99 0%, #ee90cb 100%);--shadow-sm: 0 1px 2px rgba(0, 0, 0, .45);--shadow-base: 0 2px 4px rgba(0, 0, 0, .55);--shadow: 0 2px 4px rgba(0, 0, 0, .55);--shadow-lg: 0 4px 8px rgba(0, 0, 0, .65), 0 0 0 1px var(--surface-line) inset;--shadow-inset: inset 0 0 0 1px rgba(255, 255, 255, .05);--glow-primary: 0 0 0 2px rgba(171, 221, 100, .25), 0 0 16px rgba(171, 221, 100, .35);--glow-primary-sm: 0 0 10px rgba(171, 221, 100, .4);--glow-pink: 0 0 0 2px rgba(238, 144, 203, .25), 0 0 12px rgba(238, 144, 203, .35);--glow-purple: 0 0 0 2px rgba(132, 101, 236, .25), 0 0 12px rgba(132, 101, 236, .4);--glow-red: 0 0 12px rgba(238, 144, 203, .35);--glow-ok: 0 0 14px var(--ok-glow);--coin-lime: #abdd64;--coin-pink: #ee90cb;--coin-purple: #8465ec;--coin-peach: #f2ae99;--coin-blue: #8fb7ff;--coin-cyan: #22d3ee;--coin-yellow: #eab308;--coin-gray: #91a6b0}*{border-color:var(--border)}body{background-color:var(--background);color:var(--foreground);-webkit-font-smoothing:antialiased}:fullscreen{background:var(--background)}:-webkit-full-screen{background:var(--background)}:-moz-full-screen{background:var(--background)}:-ms-fullscreen{background:var(--background)}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{inset:0}.inset-4{inset:1rem}.inset-y-0{top:0;bottom:0}.bottom-2{bottom:.5rem}.bottom-3{bottom:.75rem}.bottom-4{bottom:1rem}.left-0{left:0}.left-1{left:.25rem}.left-1\\/2{left:50%}.left-3{left:.75rem}.right-3{right:.75rem}.top-1{top:.25rem}.top-1\\/2{top:50%}.top-3{top:.75rem}.z-30{z-index:30}.z-40{z-index:40}.z-50{z-index:50}.z-\\[1000\\]{z-index:1000}.float-right{float:right}.float-left{float:left}.mx-0\\.5{margin-left:.125rem;margin-right:.125rem}.mx-1{margin-left:.25rem;margin-right:.25rem}.my-2{margin-top:.5rem;margin-bottom:.5rem}.mb-1{margin-bottom:.25rem}.mb-1\\.5{margin-bottom:.375rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-5{margin-bottom:1.25rem}.mb-6{margin-bottom:1.5rem}.mb-8{margin-bottom:2rem}.ml-1{margin-left:.25rem}.ml-2{margin-left:.5rem}.ml-auto{margin-left:auto}.mr-2{margin-right:.5rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-5{margin-top:1.25rem}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.hidden{display:none}.h-1\\.5{height:.375rem}.h-10{height:2.5rem}.h-11{height:2.75rem}.h-12{height:3rem}.h-2\\.5{height:.625rem}.h-24{height:6rem}.h-3{height:.75rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-7{height:1.75rem}.h-9{height:2.25rem}.h-full{height:100%}.min-h-screen{min-height:100vh}.w-1\\.5{width:.375rem}.w-10{width:2.5rem}.w-12{width:3rem}.w-2\\.5{width:.625rem}.w-24{width:6rem}.w-3{width:.75rem}.w-4{width:1rem}.w-64{width:16rem}.w-7{width:1.75rem}.w-\\[1px\\]{width:1px}.w-\\[70\\%\\]{width:70%}.w-\\[80\\%\\]{width:80%}.w-full{width:100%}.w-px{width:1px}.min-w-\\[20px\\]{min-width:20px}.min-w-\\[30px\\]{min-width:30px}.min-w-\\[42px\\]{min-width:42px}.min-w-\\[90px\\]{min-width:90px}.max-w-2xl{max-width:42rem}.max-w-\\[260px\\]{max-width:260px}.max-w-\\[280px\\]{max-width:280px}.max-w-\\[320px\\]{max-width:320px}.max-w-\\[340px\\]{max-width:340px}.max-w-lg{max-width:32rem}.max-w-md{max-width:28rem}.flex-1{flex:1 1 0%}.shrink-0{flex-shrink:0}.-translate-x-1\\/2{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.\\!resize{resize:both!important}.resize{resize:both}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-1\\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-5{gap:1.25rem}.gap-6{gap:1.5rem}.space-y-0>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(0px * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(0px * var(--tw-space-y-reverse))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-1\\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.375rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.375rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.text-balance{text-wrap:balance}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-sm{border-radius:calc(var(--radius) - 4px)}.rounded-xl{border-radius:.75rem}.rounded-t-lg{border-top-left-radius:var(--radius);border-top-right-radius:var(--radius)}.border{border-width:1px}.border-2{border-width:2px}.border-4{border-width:4px}.border-b{border-bottom-width:1px}.border-b-\\[3px\\]{border-bottom-width:3px}.border-t{border-top-width:1px}.border-t-2{border-top-width:2px}.border-dashed{border-style:dashed}.border-\\[var\\(--surface-line\\)\\]{border-color:var(--surface-line)}.border-black\\/20{border-color:#0003}.border-destructive{border-color:var(--destructive)}.border-foreground{border-color:var(--foreground)}.border-primary-dark{border-color:var(--primary-dark)}.border-red-600{--tw-border-opacity: 1;border-color:rgb(220 38 38 / var(--tw-border-opacity, 1))}.border-b-transparent{border-bottom-color:transparent}.border-l-transparent{border-left-color:transparent}.border-r-transparent{border-right-color:transparent}.border-t-primary{border-top-color:var(--primary)}.bg-\\[var\\(--background-deep\\)\\]{background-color:var(--background-deep)}.bg-\\[var\\(--surface\\)\\]{background-color:var(--surface)}.bg-\\[var\\(--surface-line\\)\\]{background-color:var(--surface-line)}.bg-\\[var\\(--surface-raised\\)\\]{background-color:var(--surface-raised)}.bg-background{background-color:var(--background)}.bg-black{--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity, 1))}.bg-black\\/80{background-color:#000c}.bg-card{background-color:var(--card)}.bg-destructive{background-color:var(--destructive)}.bg-gray-500{--tw-bg-opacity: 1;background-color:rgb(107 114 128 / var(--tw-bg-opacity, 1))}.bg-menu{background-color:var(--menu-background)}.bg-popover{background-color:var(--popover)}.bg-primary{background-color:var(--primary)}.bg-primary-dark{background-color:var(--primary-dark)}.bg-primary-light{background-color:var(--primary-light)}.bg-red-500{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity, 1))}.bg-red-600{--tw-bg-opacity: 1;background-color:rgb(220 38 38 / var(--tw-bg-opacity, 1))}.bg-secondary{background-color:var(--secondary)}.bg-transparent{background-color:transparent}.p-0{padding:0}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.p-8{padding:2rem}.px-1\\.5{padding-left:.375rem;padding-right:.375rem}.px-10{padding-left:2.5rem;padding-right:2.5rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-8{padding-left:2rem;padding-right:2rem}.py-0\\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\\.5{padding-top:.375rem;padding-bottom:.375rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.pt-1{padding-top:.25rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.font-mono{font-family:JetBrains Mono,ui-monospace,monospace}.font-pixel{font-family:Pixelify Sans,Press Start 2P,cursive}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-4xl{font-size:2.25rem;line-height:2.5rem}.text-5xl{font-size:3rem;line-height:1}.text-8xl{font-size:6rem;line-height:1}.text-\\[10px\\]{font-size:10px}.text-\\[11px\\]{font-size:11px}.text-\\[9px\\]{font-size:9px}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.italic{font-style:italic}.tabular-nums{--tw-numeric-spacing: tabular-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.leading-none{line-height:1}.leading-relaxed{line-height:1.625}.leading-snug{line-height:1.375}.leading-tight{line-height:1.25}.tracking-\\[\\.05em\\]{letter-spacing:.05em}.tracking-\\[0\\.2em\\]{letter-spacing:.2em}.tracking-normal{letter-spacing:0em}.tracking-wide{letter-spacing:.025em}.tracking-wider{letter-spacing:.05em}.tracking-widest{letter-spacing:.1em}.text-\\[var\\(--accent-pink\\)\\]{color:var(--accent-pink)}.text-\\[var\\(--accent-red\\)\\]{color:var(--accent-red)}.text-\\[var\\(--foreground-dim\\)\\]{color:var(--foreground-dim)}.text-\\[var\\(--foreground-muted\\)\\]{color:var(--foreground-muted)}.text-\\[var\\(--primary-light\\)\\]{color:var(--primary-light)}.text-amber-700{--tw-text-opacity: 1;color:rgb(180 83 9 / var(--tw-text-opacity, 1))}.text-destructive{color:var(--destructive)}.text-destructive-foreground{color:var(--destructive-foreground)}.text-foreground{color:var(--foreground)}.text-gray-300{--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity, 1))}.text-popover-foreground{color:var(--popover-foreground)}.text-primary-foreground{color:var(--primary-foreground)}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.underline{text-decoration-line:underline}.line-through{text-decoration-line:line-through}.underline-offset-2{text-underline-offset:2px}.underline-offset-4{text-underline-offset:4px}.accent-primary{accent-color:var(--primary)}.opacity-100{opacity:1}.opacity-30{opacity:.3}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-\\[0_3px_0_0_rgba\\(0\\,0\\,0\\,0\\.3\\)\\]{--tw-shadow: 0 3px 0 0 rgba(0,0,0,.3);--tw-shadow-colored: 0 3px 0 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-\\[0_4px_0_0_rgba\\(0\\,0\\,0\\,0\\.4\\)\\]{--tw-shadow: 0 4px 0 0 rgba(0,0,0,.4);--tw-shadow-colored: 0 4px 0 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-\\[0_4px_0_0_var\\(--primary-ink\\)\\,0_0_16px_rgba\\(171\\,221\\,100\\,0\\.3\\)\\]{--tw-shadow: 0 4px 0 0 var(--primary-ink),0 0 16px rgba(171,221,100,.3);--tw-shadow-colored: 0 4px 0 0 var(--tw-shadow-color), 0 0 16px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-\\[0_4px_0_0_var\\(--surface-line\\)\\]{--tw-shadow: 0 4px 0 0 var(--surface-line);--tw-shadow-colored: 0 4px 0 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-black\\/10{--tw-shadow-color: rgb(0 0 0 / .1);--tw-shadow: var(--tw-shadow-colored)}.outline{outline-style:solid}.ring{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-1{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-offset-background{--tw-ring-offset-color: var(--background)}.blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.invert{--tw-invert: invert(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-blur-sm{--tw-backdrop-blur: blur(4px);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-150{transition-duration:.15s}.duration-300{transition-duration:.3s}.duration-500{transition-duration:.5s}.ease-in{transition-timing-function:cubic-bezier(.4,0,1,1)}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}@keyframes enter{0%{opacity:var(--tw-enter-opacity, 1);transform:translate3d(var(--tw-enter-translate-x, 0),var(--tw-enter-translate-y, 0),0) scale3d(var(--tw-enter-scale, 1),var(--tw-enter-scale, 1),var(--tw-enter-scale, 1)) rotate(var(--tw-enter-rotate, 0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity, 1);transform:translate3d(var(--tw-exit-translate-x, 0),var(--tw-exit-translate-y, 0),0) scale3d(var(--tw-exit-scale, 1),var(--tw-exit-scale, 1),var(--tw-exit-scale, 1)) rotate(var(--tw-exit-rotate, 0))}}.animate-in{animation-name:enter;animation-duration:.15s;--tw-enter-opacity: initial;--tw-enter-scale: initial;--tw-enter-rotate: initial;--tw-enter-translate-x: initial;--tw-enter-translate-y: initial}.fade-in-0{--tw-enter-opacity: 0}.zoom-in-95{--tw-enter-scale: .95}.duration-150{animation-duration:.15s}.duration-300{animation-duration:.3s}.duration-500{animation-duration:.5s}.ease-in{animation-timing-function:cubic-bezier(.4,0,1,1)}.ease-in-out{animation-timing-function:cubic-bezier(.4,0,.2,1)}.ease-out{animation-timing-function:cubic-bezier(0,0,.2,1)}.\\!running{animation-play-state:running!important}.running{animation-play-state:running}.paused{animation-play-state:paused}.text-muted-foreground{color:var(--muted-foreground)}.text-primary{color:var(--primary)}.border-primary{border-color:var(--primary)}.border-secondary{border-color:var(--secondary)}.border-surface-line{border-color:var(--surface-line)}.arcade-press:active{transform:translateY(3px);box-shadow:none!important}.paper-grain{position:relative}.paper-grain:before{content:"";position:absolute;inset:0;z-index:0;pointer-events:none;background:repeating-linear-gradient(0deg,transparent,transparent 2px,rgba(255,255,255,.018) 2px,rgba(255,255,255,.018) 3px),repeating-linear-gradient(90deg,transparent,transparent 3px,rgba(255,255,255,.012) 3px,rgba(255,255,255,.012) 4px)}@keyframes crt-flicker{0%,to{opacity:1}92%{opacity:1}94%{opacity:.92}96%{opacity:1}98%{opacity:.95}}.flicker{animation:crt-flicker 6s infinite}@keyframes caret-blink{0%,49%{opacity:1}50%,to{opacity:0}}.caret:after{content:"█";display:inline-block;margin-left:4px;animation:caret-blink 1s steps(2) infinite;color:var(--primary)}@keyframes menu-blur-out{to{backdrop-filter:blur(0px);-webkit-backdrop-filter:blur(0px);background-color:transparent}}.menu-blur-out{animation:menu-blur-out 3s linear forwards}@keyframes marquee-scroll{0%{transform:translate(0)}to{transform:translate(-50%)}}.marquee{font-family:var(--font-pixel, "Pixelify Sans", cursive);font-size:14px;letter-spacing:.1em;color:var(--primary-ink);background:var(--primary);border-top:2px solid var(--primary-dark);border-bottom:2px solid var(--primary-dark);overflow:hidden;white-space:nowrap}.marquee-inner{display:inline-block;padding-left:100%;animation:marquee-scroll 40s linear infinite}.marquee-filled{display:inline-flex;animation:marquee-scroll 40s linear infinite}.hover\\:bg-\\[var\\(--surface-raised\\)\\]:hover{background-color:var(--surface-raised)}.hover\\:text-foreground:hover{color:var(--foreground)}.hover\\:text-white:hover{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.hover\\:underline:hover{text-decoration-line:underline}.hover\\:text-primary:hover{color:var(--primary)}.focus-visible\\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\\:ring-2:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-visible\\:ring-ring:focus-visible{--tw-ring-color: var(--ring)}.focus-visible\\:ring-offset-2:focus-visible{--tw-ring-offset-width: 2px}.disabled\\:pointer-events-none:disabled{pointer-events:none}.disabled\\:opacity-50:disabled{opacity:.5}.data-\\[state\\=closed\\]\\:animate-out[data-state=closed]{animation-name:exit;animation-duration:.15s;--tw-exit-opacity: initial;--tw-exit-scale: initial;--tw-exit-rotate: initial;--tw-exit-translate-x: initial;--tw-exit-translate-y: initial}.data-\\[state\\=closed\\]\\:fade-out-0[data-state=closed]{--tw-exit-opacity: 0}.data-\\[state\\=closed\\]\\:zoom-out-95[data-state=closed]{--tw-exit-scale: .95}.data-\\[side\\=bottom\\]\\:slide-in-from-top-2[data-side=bottom]{--tw-enter-translate-y: -.5rem}.data-\\[side\\=left\\]\\:slide-in-from-right-2[data-side=left]{--tw-enter-translate-x: .5rem}.data-\\[side\\=right\\]\\:slide-in-from-left-2[data-side=right]{--tw-enter-translate-x: -.5rem}.data-\\[side\\=top\\]\\:slide-in-from-bottom-2[data-side=top]{--tw-enter-translate-y: .5rem}.\\[\\&_svg\\]\\:pointer-events-none svg{pointer-events:none}.\\[\\&_svg\\]\\:size-4 svg{width:1rem;height:1rem}.\\[\\&_svg\\]\\:shrink-0 svg{flex-shrink:0}',YP="data-sigurd-fonts",au=()=>{if(typeof document>"u"||document.head.querySelector(`link[${YP}]`))return;const v=["https://fonts.googleapis.com/css2?family=Pixelify+Sans:wght@400..700&display=swap","https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,100..800;1,100..800&display=swap","https://fonts.googleapis.com/css2?family=VT323&display=swap"],D=document.createElement("link");D.rel="preconnect",D.href="https://fonts.gstatic.com",D.crossOrigin="anonymous",D.setAttribute(YP,""),document.head.appendChild(D);for(const g of v){const r=document.createElement("link");r.rel="stylesheet",r.href=g,r.setAttribute(YP,""),document.head.appendChild(r)}};class lu extends HTMLElement{constructor(){super(...arguments);p(this,"root",null)}connectedCallback(){sK(),au();const g=this.attachShadow({mode:"open"}),r=document.createElement("div");g.appendChild(r);const n=document.createElement("style");n.textContent=iu,g.appendChild(n),this.root=Sf.createRoot(r),this.root.render(G.jsx(Ku,{})),tc(),this.setAttribute("data-version",zg().version),this.setAttribute("data-build",zg().build.toString())}disconnectedCallback(){this.root&&(this.root.unmount(),this.root=null)}getVersion(){return zg()}isCompatible(g){const r=zg(),[n,P,o]=r.version.split(".").map(Number),[T,z,c]=g.split(".").map(Number);return n>T?!0:n<T?!1:P>z?!0:P<z?!1:o>=c}}customElements.define("sigurd-startup",lu);const uu={getVersion:zg,ASSET_PATHS:a0,getBackgroundImagePath:Cw};CD.ASSET_PATHS=a0,CD.default=uu,CD.getBackgroundImagePath=Cw,CD.getVersion=zg,CD.logVersion=tc,Object.defineProperties(CD,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "sigurd-startup",
3
3
  "private": false,
4
- "version": "3.4.0",
4
+ "version": "4.0.0",
5
5
  "type": "module",
6
6
  "description": "A web component game about Sigurd's startup journey",
7
7
  "main": "dist/sigurd-startup.umd.js",