1import{u as C,o as T,j as i,w as a,aP as x,Q as j,r as d,i as m,g as t,V as A,f as o,af as $,s as f,$ as B,A as R,T as p,an as L,x as N,t as F}from"./Bd7sooHk.js";import{V as v}from"./CVQLYzM-.js";const q={__name:"assets",setup(P){const{$auth:b,$axios:c,$config:V}=C(),y=d(!1),n=d(!1),u=d(""),l=d(""),w=async()=>{try{(await c.post(`${V.public.functionsBaseUrl}/manager/verify`)).data?.status==="ok"?y.value=!1:x({statusCode:403})}catch{x({statusCode:403})}},g=async()=>{try{const s=await c.post(`${V.public.functionsBaseUrl}/manager/assets/public`,{assets:u.value.split(` 2`).map(e=>e.trim())});return s?.data?.status==="ok"&&s?.data?.assets?(l.value=(s.data.assets||[]).join(` 3`),!0):!1}catch{return!1}},U=s=>{try{const e=new URL(s);return e.protocol==="gs:"&&e.pathname.startsWith("//journey-assets/")}catch{return!1}};T(async()=>{await b.waitForInit,await w()});const _={urls:s=>s.split(` 4`).every(e=>U(e))||"URL must begin with gs://journey-assets/"};return(s,e)=>{const k=j;return m(),i(k,null,{default:a(()=>[t(y)?F("",!0):(m(),i(A,{key:0,style:{"max-width":"1000px"}},{default:a(()=>[o($,{class:"px-0 font-weight-bold"},{default:a(()=>[...e[3]||(e[3]=[f("Assets",-1)])]),_:1}),o(B,{class:"px-0 text-medium-emphasis"},{default:a(()=>[...e[4]||(e[4]=[f("Move Assets to Public",-1)])]),_:1}),o(R,{class:"my-4"}),t(l)?(m(),i(v,{key:0,modelValue:t(l),"onUpdate:modelValue":e[0]||(e[0]=r=>p(l)?l.value=r:null),label:"URLs",variant:"outlined",disabled:""},null,8,["modelValue"])):(m(),i(L,{key:1,modelValue:t(n),"onUpdate:modelValue":e[2]||(e[2]=r=>p(n)?n.value=r:null)},{default:a(()=>[o(v,{modelValue:t(u),"onUpdate:modelValue":e[1]||(e[1]=r=>p(u)?u.value=r:null),label:"URLs",placeholder:`gs://journey-assets/.. 5gs://journey-assets/..`,variant:"outlined","validate-on-blur":"",required:"",rules:[_.urls]},null,8,["modelValue","rules"]),o(N,{disabled:!t(n),onClick:g,color:"primary",flat:""},{default:a(()=>[...e[5]||(e[5]=[f("Submit",-1)])]),_:1},8,["disabled"])]),_:1},8,["modelValue"]))]),_:1}))]),_:1})}}};export{q as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.