import{B as V,o as r,e as i,p as b,a0 as W,z as U,t as m,q as v,aG as A,m as H,d as T,ab as E,N as F,L as I,bA as j,bB as q,bC as D,O as G,i as a,f as P,h as O,r as g,k as c,an as R,_ as J}from"./index-D92x6h1h.js";import{W as K}from"./WizardFooter-BPmWxkFy.js";var Q=`
    .p-progressbar {
        display: block;
        position: relative;
        overflow: hidden;
        height: dt('progressbar.height');
        background: dt('progressbar.background');
        border-radius: dt('progressbar.border.radius');
    }

    .p-progressbar-value {
        margin: 0;
        background: dt('progressbar.value.background');
    }

    .p-progressbar-label {
        color: dt('progressbar.label.color');
        font-size: dt('progressbar.label.font.size');
        font-weight: dt('progressbar.label.font.weight');
    }

    .p-progressbar-determinate .p-progressbar-value {
        height: 100%;
        width: 0%;
        position: absolute;
        display: none;
        display: flex;
        align-items: center;
        justify-content: center;
        overflow: hidden;
        transition: width 1s ease-in-out;
    }

    .p-progressbar-determinate .p-progressbar-label {
        display: inline-flex;
    }

    .p-progressbar-indeterminate .p-progressbar-value::before {
        content: '';
        position: absolute;
        background: inherit;
        inset-block-start: 0;
        inset-inline-start: 0;
        inset-block-end: 0;
        will-change: inset-inline-start, inset-inline-end;
        animation: p-progressbar-indeterminate-anim 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite;
    }

    .p-progressbar-indeterminate .p-progressbar-value::after {
        content: '';
        position: absolute;
        background: inherit;
        inset-block-start: 0;
        inset-inline-start: 0;
        inset-block-end: 0;
        will-change: inset-inline-start, inset-inline-end;
        animation: p-progressbar-indeterminate-anim-short 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) infinite;
        animation-delay: 1.15s;
    }

    @keyframes p-progressbar-indeterminate-anim {
        0% {
            inset-inline-start: -35%;
            inset-inline-end: 100%;
        }
        60% {
            inset-inline-start: 100%;
            inset-inline-end: -90%;
        }
        100% {
            inset-inline-start: 100%;
            inset-inline-end: -90%;
        }
    }
    @-webkit-keyframes p-progressbar-indeterminate-anim {
        0% {
            inset-inline-start: -35%;
            inset-inline-end: 100%;
        }
        60% {
            inset-inline-start: 100%;
            inset-inline-end: -90%;
        }
        100% {
            inset-inline-start: 100%;
            inset-inline-end: -90%;
        }
    }

    @keyframes p-progressbar-indeterminate-anim-short {
        0% {
            inset-inline-start: -200%;
            inset-inline-end: 100%;
        }
        60% {
            inset-inline-start: 107%;
            inset-inline-end: -8%;
        }
        100% {
            inset-inline-start: 107%;
            inset-inline-end: -8%;
        }
    }
    @-webkit-keyframes p-progressbar-indeterminate-anim-short {
        0% {
            inset-inline-start: -200%;
            inset-inline-end: 100%;
        }
        60% {
            inset-inline-start: 107%;
            inset-inline-end: -8%;
        }
        100% {
            inset-inline-start: 107%;
            inset-inline-end: -8%;
        }
    }
`,X={root:function(l){var s=l.instance;return["p-progressbar p-component",{"p-progressbar-determinate":s.determinate,"p-progressbar-indeterminate":s.indeterminate}]},value:"p-progressbar-value",label:"p-progressbar-label"},Y=V.extend({name:"progressbar",style:Q,classes:X}),Z={name:"BaseProgressBar",extends:A,props:{value:{type:Number,default:null},mode:{type:String,default:"determinate"},showValue:{type:Boolean,default:!0}},style:Y,provide:function(){return{$pcProgressBar:this,$parentInstance:this}}},S={name:"ProgressBar",extends:Z,inheritAttrs:!1,computed:{progressStyle:function(){return{width:this.value+"%",display:"flex"}},indeterminate:function(){return this.mode==="indeterminate"},determinate:function(){return this.mode==="determinate"},dataP:function(){return H({determinate:this.determinate,indeterminate:this.indeterminate})}}},ee=["aria-valuenow","data-p"],ne=["data-p"],te=["data-p"],ae=["data-p"];function se(e,l,s,d,u,t){return r(),i("div",b({role:"progressbar",class:e.cx("root"),"aria-valuemin":"0","aria-valuenow":e.value,"aria-valuemax":"100","data-p":t.dataP},e.ptmi("root")),[t.determinate?(r(),i("div",b({key:0,class:e.cx("value"),style:t.progressStyle,"data-p":t.dataP},e.ptm("value")),[e.value!=null&&e.value!==0&&e.showValue?(r(),i("div",b({key:0,class:e.cx("label"),"data-p":t.dataP},e.ptm("label")),[W(e.$slots,"default",{},function(){return[U(m(e.value+"%"),1)]})],16,te)):v("",!0)],16,ne)):t.indeterminate?(r(),i("div",b({key:1,class:e.cx("value"),"data-p":t.dataP},e.ptm("value")),null,16,ae)):v("",!0)],16,ee)}S.render=se;const re={class:"wizard-step"},ie={class:"wizard-step__scroll"},oe={key:0,class:"wizard-step__header"},le=["src"],de=["innerHTML"],ue={class:"wizard-status"},pe={class:"wizard-status__counts"},ce={class:"wizard-status__count"},me={class:"wizard-status__count-label"},ve={class:"wizard-status__count-value"},be={class:"wizard-status__count"},ge={class:"wizard-status__count-label"},he={class:"wizard-status__count-value"},fe=T({__name:"WizardStepStatus",setup(e){const l=R(),s=E(),d=g(""),u=g(""),t=g("Muxes"),y=g("Services"),h=c(()=>s.progress),f=c(()=>{const n=h.value?.progress;return typeof n!="number"||!Number.isFinite(n)?0:Math.min(100,Math.max(0,Math.round(n*100)))}),x=c(()=>h.value?.muxes??0),B=c(()=>h.value?.services??0);F(async()=>{try{const p=(await I("wizard/status/load",{meta:1})).entries?.[0]?.params??[],k=p.find(o=>o.id==="icon"),z=p.find(o=>o.id==="description"),_=p.find(o=>o.id==="muxes"),w=p.find(o=>o.id==="services");typeof k?.value=="string"&&(d.value=M(k.value)),typeof z?.value=="string"&&(u.value=j(q(D(z.value)))),typeof _?.caption=="string"&&_.caption&&(t.value=_.caption),typeof w?.caption=="string"&&w.caption&&(y.value=w.caption)}catch(n){console.warn("[wizard] status/load failed:",n)}s.startPolling()}),G(()=>{s.stopPolling()});const C=c(()=>f.value>=100?"Next":"Skip");function M(n){return n?n.startsWith("/")||/^https?:\/\//i.test(n)?n:`/${n}`:""}async function N(){await l.push({name:"wizard-muxes"})}async function L(){await l.push({name:"wizard-mapping"})}async function $(){await s.cancel(),await l.push({name:"epg"})}return(n,p)=>(r(),i("div",re,[a("div",ie,[d.value||u.value?(r(),i("header",oe,[d.value?(r(),i("img",{key:0,src:d.value,alt:"",class:"wizard-step__icon"},null,8,le)):v("",!0),u.value?(r(),i("div",{key:1,class:"wizard-step__description",innerHTML:u.value},null,8,de)):v("",!0)])):v("",!0),a("div",ue,[P(O(S),{value:f.value},null,8,["value"]),a("dl",pe,[a("div",ce,[a("dt",me,m(t.value),1),a("dd",ve,m(x.value),1)]),a("div",be,[a("dt",ge,m(y.value),1),a("dd",he,m(B.value),1)])])])]),P(K,{"prev-step":"muxes","show-skip":!0,"skip-label":C.value,"skip-emphasized":f.value>=100,"hide-save":!0,onPrevious:N,onCancel:$,onSkip:L},null,8,["skip-label","skip-emphasized"])]))}}),ye=J(fe,[["__scopeId","data-v-24728698"]]);export{ye as default};
