import{_ as i,a as o,b as m,c as f,d,e as l,f as p,g as c,h as u,i as h,j as v,k as S,l as b,m as E}from"./95.js";import{o as k,c as I,a as t,d as a,t as T,n as g,p as y,g as C,_ as P}from"./index.js";const e={Start:0,Enter:1,ShakeLeft:2,ShakeRight:3,Prepare:4,Opened:5,End:6},$={[e.Start]:"start",[e.Enter]:"enter",[e.ShakeLeft]:"shake-left",[e.ShakeRight]:"shake-right",[e.Prepare]:"prepare",[e.Opened]:"opened",[e.End]:"end"},n={[e.Start]:0,[e.Enter]:1e3,[e.ShakeLeft]:500,[e.ShakeRight]:500,[e.Prepare]:1e3,[e.Opened]:1e3,[e.End]:2e3},F=s=>(y("data-v-4b90dcc4"),s=s(),C(),s),N={class:"easter-found-fragment"},O=F(()=>t("div",{class:"easter-found-fragment__item-background"},null,-1)),w={class:"easter-found-fragment__item-description"};function x(s,_,L,R,V,r){return k(),I("div",N,[t("div",{class:g(["easter-found-fragment__item",`easter-found-fragment__item_step-${s.StepClassName[s.step]}`]),style:a({transition:r.currentTransition})},[O,t("div",{class:"easter-found-fragment__item-image",style:a({backgroundImage:`url(${s.images[`/src/assets/images/easter-found-fragment/fragments/${s.fragmentIndex+1}.png`]})`})},null,4),t("div",w,T(s.fragmentIndex+1)+" осколок получен!",1)],6),t("div",{class:g(["easter-found-fragment__shell",`easter-found-fragment__shell_step-${s.StepClassName[s.step]}`]),style:a({transition:r.currentTransition})},[t("div",{class:"easter-found-fragment__shell-item easter-found-fragment__shell-item_left",style:a({transition:r.currentTransition})},null,4),t("div",{class:"easter-found-fragment__shell-item easter-found-fragment__shell-item_right",style:a({transition:r.currentTransition})},null,4)],6)])}const B={props:["openParams"],data:()=>({Step:e,StepClassName:$,StepTiming:n,images:Object.assign({"/src/assets/images/easter-found-fragment/fragments/1.png":i,"/src/assets/images/easter-found-fragment/fragments/10.png":o,"/src/assets/images/easter-found-fragment/fragments/11.png":m,"/src/assets/images/easter-found-fragment/fragments/12.png":f,"/src/assets/images/easter-found-fragment/fragments/13.png":d,"/src/assets/images/easter-found-fragment/fragments/14.png":l,"/src/assets/images/easter-found-fragment/fragments/2.png":p,"/src/assets/images/easter-found-fragment/fragments/3.png":c,"/src/assets/images/easter-found-fragment/fragments/4.png":u,"/src/assets/images/easter-found-fragment/fragments/5.png":h,"/src/assets/images/easter-found-fragment/fragments/6.png":v,"/src/assets/images/easter-found-fragment/fragments/7.png":S,"/src/assets/images/easter-found-fragment/fragments/8.png":b,"/src/assets/images/easter-found-fragment/fragments/9.png":E}),step:e.Start,fragmentIndex:0}),computed:{currentTransition(){return`all ${n[this.step]}ms ease`}},created(){this.$data.noAdaptation=!0,this.openParams&&(this.fragmentIndex=parseInt(this.openParams)),this.step=e.Start,setTimeout(()=>this.step=e.Enter,n[e.Start])},watch:{step(s){if(s===e.End)return setTimeout(()=>sendClientEvent(gm.EVENT_EXECUTE_PUBLIC,{ignoreChat:!0},"EEEV_OnEndFoundAnimation"),n[s]);s===e.Prepare&&window.playSound("easter/sfx_pasxa_eggdrop.mp3");const _=s+1;setTimeout(()=>this.step=_,n[s])}}},A=P(B,[["render",x],["__scopeId","data-v-4b90dcc4"]]);export{A as default};
