PageSourceSearch

https://panel.cloud.co.za/_nuxt/-k01RUe4.js

js cloud.co.za collected 2026-10-09 23:26:48 UTC 17,050 bytes, 1 lines download raw bytes

1import{P as N,f as v,j as C,w as t,n as a,h as r,g as S,aR as Q,k as e,b3 as K,m as G,p as B,s as ae,R as J,q as c,t as b,A as E,F as Z,D as X,r as j,b2 as le,aW as oe,Z as O,aC as M,aB as ie,v as H,L as T,M as L,b8 as ne,H as de,I as W,l as R,V,G as re,J as ue,K as ce,e as me,am as fe,z,du as ge}from"./D2R2lqYg.js";import{c as pe,b as F}from"./DuIShk63.js";import"./BOo-N2AW.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},u=new s.Error().stack;u&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[u]="e156392d-2578-41dd-85dc-af51fb03d96c",s._sentryDebugIdIdentifier="sentry-dbid-e156392d-2578-41dd-85dc-af51fb03d96c")}catch{}})();const Y=()=>{const s=d=>d.previewUrl?d.previewUrl:d.type==="video"&&d.thumbnailUrl?d.thumbnailUrl:null,u=d=>d.type==="video"&&d.videoUrl?d.videoUrl:null,y=d=>["image","banner","social"].includes(d.type),p=d=>d.type==="video";return{getPreviewUrl:s,getVideoUrl:u,shouldShowImagePreview:y,shouldShowVideoThumbnail:p,shouldShowIconOnly:d=>d.type==="document"||!y(d)&&!p(d),getFallbackIcon:d=>({image:"mdi-image",video:"mdi-play-circle-outline",document:"mdi-file-document",banner:"mdi-image",social:"mdi-image"})[d]||"mdi-file",getAspectRatio:d=>{if(!d.dimensions)return 1.7777777777777777;const[h,n]=d.dimensions.split("x").map(Number);return!h||!n?1.7777777777777777:h/n}}},ve={class:"position-relative"},ye={class:"d-flex align-center justify-center h-100"},he={key:2,class:"position-absolute d-flex align-center justify-center",style:{top:"0",left:"0",right:"0",bottom:"0",background:"rgba(0, 0, 0, 0.3)"}},be={class:"d-flex align-center justify-center bg-white rounded-pill"},we={class:"text-subtitle-1 font-weight-medium mb-1"},xe={class:"text-caption text-medium-emphasis mb-3"},ke={class:"d-flex flex-wrap ga-1 mb-3"},Ve={class:"d-flex justify-space-between align-center text-caption text-medium-emphasis mb-3"},Ue={class:"d-flex align-center"},Te={__name:"AssetCard",props:{asset:{type:Object,required:!0}},emits:["attach-link","preview","download","add-tag"],setup(s){const u=s,{getPreviewUrl:y,shouldShowImagePreview:p,shouldShowVideoThumbnail:$,getFallbackIcon:w}=Y(),x=T(!1),d=L(()=>y(u.asset)),h=L(()=>({PNG:"primary",JPG:"primary",JPEG:"primary",MP4:"error",PDF:"success",SVG:"warning"})[u.asset.fileType]||"grey"),n=()=>{x.value=!0};return N(()=>u.asset.id,()=>{x.value=!1}),(m,o)=>(v(),C(H,{elevation:"0"},{default:t(()=>[a("div",ve,[r(p)(s.asset)||r($)(s.asset)?(v(),S("div",{key:0,class:"position-relative",style:{cursor:"pointer"},role:"button",onClick:o[0]||(o[0]=i=>m.$emit("preview",s.asset))},[r(x)?(v(),C(G,{key:1,color:"grey-lighten-4",height:"250",class:"d-flex align-center justify-center"},{default:t(()=>[e(B,{icon:r(w)(s.asset.type),size:"80",color:"grey-darken-1"},null,8,["icon"])]),_:1})):(v(),C(Q,{key:0,src:r(d),height:"250",cover:"","aspect-ratio":16/9,class:"bg-grey-lighten-4",onError:n},{placeholder:t(()=>[a("div",ye,[e(K,{indeterminate:"",color:"grey-lighten-1"})])]),_:1},8,["src"])),r($)(s.asset)&&!r(x)?(v(),S("div",he,[a("div",be,[e(B,{icon:"$playIcon",size:"64",color:"grey"})])])):ae("",!0)])):(v(),C(G,{key:1,color:"grey-lighten-4",height:"250",class:"d-flex align-center justify-center",role:"button",style:{cursor:"pointer"},onClick:o[1]||(o[1]=i=>m.$emit("preview",s.asset))},{default:t(()=>[e(B,{icon:r(w)(s.asset.type),size:"80",color:"grey-darken-1"},null,8,["icon"])]),_:1})),e(J,{color:r(h),size:"small",class:"position-absolute",style:{top:"12px",right:"12px"}},{default:t(()=>[c(b(s.asset.fileType),1)]),_:1},8,["color"])]),e(E,{style:{"padding-inline":"12px !important"}},{default:t(()=>[a("h3",we,b(s.asset.title),1),a("p",xe,b(s.asset.dimensions||s.asset.fileSize),
11),a("div",ke,[(v(!0),S(Z,null,X(s.asset.tags,i=>(v(),C(J,{key:i,size:"x-small",variant:"tonal"},{default:t(()=>[c(b(i),1)]),_:2},1024))),128))]),a("div",Ve,[a("span",null,b(s.asset.downloads)+" downloads",1),a("span",null,b(s.asset.date),1)]),a("div",Ue,[e(j,{color:"primaryButtons","prepend-icon":"$linkIcon",class:"w-100",style:{"max-width":"90% !important"},onClick:o[2]||(o[2]=i=>m.$emit("attach-link",s.asset))},{default:t(()=>[...o[6]||(o[6]=[c(" Attach Link ",-1)])]),_:1}),e(le,null,{activator:t(({props:i})=>[e(j,ie({icon:"$kebabIcon",variant:"text",color:"blackAccent",block:""},i,{style:{"flex-shrink":"0","min-width":"20px !important"}}),null,16)]),default:t(()=>[e(oe,{density:"compact",class:"text-medium-emphasis"},{default:t(()=>[e(O,{onClick:o[3]||(o[3]=i=>m.$emit("preview",s.asset))},{default:t(()=>[e(M,null,{default:t(()=>[...o[7]||(o[7]=[c("Preview",-1)])]),_:1})]),_:1}),e(O,{onClick:o[4]||(o[4]=i=>m.$emit("download",s.asset))},{default:t(()=>[e(M,null,{default:t(()=>[...o[8]||(o[8]=[c("Download",-1)])]),_:1})]),_:1}),e(O,{onClick:o[5]||(o[5]=i=>m.$emit("add-tag",s.asset))},{default:t(()=>[e(M,null,{default:t(()=>[...o[9]||(o[9]=[c("Add Tag",-1)])]),_:1})]),_:1})]),_:1})]),_:1})])]),_:1})]),_:1}))}},$e={key:0,class:"position-relative"},Pe=["src"],Ie={key:1,class:"position-relative"},Ae={class:"d-flex align-center justify-center h-100"},Ce={key:2,class:"d-flex align-center justify-center bg-grey-lighten-4 rounded",style:{"min-height":"400px"}},Le={class:"text-center"},Se={class:"text-h6 mt-4"},De={class:"text-body-2 text-medium-emphasis mt-2"},Fe={class:"mt-6"},Re={__name:"AssetPreviewDialog",props:{modelValue:{type:Boolean,required:!0},asset:{type:Object,default:null}},emits:["update:modelValue","download"],setup(s){const u=s,{getPreviewUrl:y,getVideoUrl:p,shouldShowImagePreview:$,shouldShowVideoThumbnail:w,shouldShowIconOnly:x,getFallbackIcon:d}=Y(),h=T(!1),n=T<HTMLVideoElement|null>null,m=L(()=>y(u.asset)),o=L(()=>p(u.asset)),i=L(()=>$(u.asset)),f=L(()=>d(u.asset?.type)),I=()=>{h.value=!0},U=()=>{n.value&&(n.value.pause(),n.value.currentTime=0)};return N(()=>u.asset?.id,()=>{h.value=!1,U()}),N(()=>u.modelValue,k=>{k||U()}),ne(()=>{U()}),(k,g)=>(v(),C(ce,{"model-value":s.modelValue,"max-width":"900","onUpdate:modelValue":g[2]||(g[2]=D=>k.$emit("update:modelValue",D))},{default:t(()=>[e(H,{variant:"flat",class:"py-2"},{default:t(()=>[e(de,null,{default:t(()=>[c(b(s.asset?.title),1)]),_:1}),e(W),e(E,{class:"pa-6"},{default:t(()=>[r(w)(s.asset)&&r(o)?(v(),S("div",$e,[a("video",{ref:"videoPlayer",src:r(o),controls:"",class:"w-100 rounded bg-grey-lighten-4",style:{"max-height":"500px"},preload:"metadata"},null,8,Pe)])):r(i)&&r(m)&&!r(h)?(v(),S("div",Ie,[e(Q,{src:r(m),"aspect-ratio":16/9,"max-height":"500",class:"rounded bg-grey-lighten-4",cover:"",onError:I},{placeholder:t(()=>[a("div",Ae,[e(K,{indeterminate:"",color:"grey-lighten-1"})])]),_:1},8,["src"])])):(v(),S("div",Ce,[a("div",Le,[e(B,{icon:r(f),size:"100",color:"grey-darken-1"},null,8,["icon"]),a("p",Se,b(s.asset?.title),1),a("p",De,b(r(x)(s.asset)?"Preview not available for this file type":"Failed to load preview"),1)])])),a("div",Fe,[e(R,{density:"comfortable"},{default:t(()=>[e(V,{cols:"6",class:"text-caption text-medium-emphasis"},{default:t(()=>[...g[3]||(g[3]=[c(" File Type: ",-1)])]),_:1}),e(V,{cols:"6",class:"text-caption font-weight-medium"},{default:t(()=>[c(b(s.asset?.fileType),1)]),_:1}),e(V,{cols:"6",class:"text-caption text-medium-emphasis"},{default:t(()=>[c(b(s.asset?.dimensions?"Dimensions:":"File Size:"),1)]),_:1}),e(V,{cols:"6",class:"text-caption font-weight-medium"},{default:t(()=>[c(b(s.asset?.dimensions||s.asset?.fileSize),1)]),_:1}),e(V,{cols:"6",class:"text-caption text-medium-emphasis"},{default:t(()=>[...g[4]||(g[4]=[c(" Downloads: ",-1)])]),_:1}),e(V,{cols:"6",class:"text-caption font-weight-medium"},{default:t(()=>[c(b(s.asset?.downloads),1)]),_:1}),e(V,{cols:"6",class:"text-caption text-medium-emphasis"},{default:t(()=>[...g[5]||(g[5]=[c(" Date: ",-1)])]),_:1}),e(V,{cols:"6",class:"text-caption font-weight-medium"},{default:t(()=>
1[c(b(s.asset?.date),1)]),_:1})]),_:1})])]),_:1}),e(W),e(re,null,{default:t(()=>[e(j,{color:"primaryButtons",variant:"flat","min-width":"120",onClick:g[0]||(g[0]=D=>k.$emit("download",s.asset))},{default:t(()=>[...g[6]||(g[6]=[c(" Download ",-1)])]),_:1}),e(ue),e(j,{color:"secondaryButtons",variant:"outlined","min-width":"80",onClick:g[1]||(g[1]=D=>k.$emit("update:modelValue",!1))},{default:t(()=>[...g[7]||(g[7]=[c(" Close ",-1)])]),_:1})]),_:1})]),_:1})]),_:1},8,["model-value"]))}},je=()=>{const s=T(!1),u=T(""),y=T("success"),p=(n,m="success")=>{u.value=n,y.value=m,s.value=!0},$=n=>new Promise((m,o)=>{const i=document.createElement("video"),f=document.createElement("canvas"),I=f.getContext("2d");if(!I){o(new Error("Canvas context not available"));return}i.preload="metadata",i.muted=!0,i.playsInline=!0;const U=URL.createObjectURL(n);i.src=U,i.onloadedmetadata=()=>{i.currentTime=Math.min(1,i.duration*.1)},i.onseeked=()=>{try{f.width=i.videoWidth,f.height=i.videoHeight,I.drawImage(i,0,0,f.width,f.height);const k=f.toDataURL("image/jpeg",.8);URL.revokeObjectURL(U),i.remove(),f.remove(),m(k)}catch(k){URL.revokeObjectURL(U),i.remove(),f.remove(),o(k)}},i.onerror=()=>{URL.revokeObjectURL(U),i.remove(),f.remove(),o(new Error("Failed to load video"))}});return{showSnackbar:s,snackbarMessage:u,snackbarColor:y,showNotification:p,uploadFile:async(n,m)=>{if(n){p("Upload starting...","info");try{let o="image",i="images",f=n.name.split(".").pop()?.toUpperCase()||"FILE",I,U,k;if(n.type.startsWith("video/")){o="video",i="videos";try{U=await $(n),k=URL.createObjectURL(n)}catch(D){console.error("Failed to generate video thumbnail:",D)}}else n.type==="application/pdf"||n.type.includes("document")?(o="document",i="documents",f="PDF"):n.type.startsWith("image/")&&(I=URL.createObjectURL(n));const g={id:m.value.length+1,title:n.name.replace(/\.[^/.]+$/,""),type:o,fileType:f,dimensions:o==="document"?void 0:"Custom Size",fileSize:o==="document"?f:void 0,tags:["uploaded","custom"],downloads:0,date:new Date().toISOString().split("T")[0],category:i,previewUrl:I,thumbnailUrl:U,videoUrl:k};m.value.unshift(g),p("Upload complete!","success")}catch(o){console.error("Upload error:",o),p("Upload failed","error")}}},attachLink:n=>{p("Link attached","success")},downloadAsset:n=>{p(`Downloading ${n.title}...`,"info")},addTag:n=>{p("Add tag feature coming soon","info")}}},Be=s=>{const u=T("all"),y=T(""),p=L(()=>{let w=s.value;if(u.value!=="all"&&u.value!=="my-uploads"&&(w=w.filter(x=>x.category===u.value)),y.value){const x=y.value.toLowerCase();w=w.filter(d=>d.title.toLowerCase().includes(x)||d.tags.some(h=>h.toLowerCase().includes(x)))}return w}),$=L(()=>({all:"*",images:"image/*",videos:"video/*",documents:".pdf,.doc,.docx",banners:"image/*",social:"image/*","my-uploads":"*"})[u.value]||"*");return{activeTab:u,searchQuery:y,filteredAssets:p,acceptedFileTypes:$}},ze={class:"d-flex flex-column flex-sm-row justify-space-between align-sm-center ga-4 mb-6"},Ee={class:"d-flex flex-column flex-sm-row justify-space-between align-sm-center ga-3"},Oe={class:"text-center py-8"},Me={class:"text-body-2 text-medium-emphasis"},Ne=["accept"],Je={__name:"assets",setup(s){me({title:"Affiliate Assets"});const{showSnackbar:u,snackbarMessage:y,snackbarColor:p,uploadFile:$,attachLink:w,downloadAsset:x,addTag:d}=je(),h=T(null),n=T(!1),m=T(null),o=T([{id:1,title:"VPS Hosting Banner",type:"banner",fileType:"PNG",dimensions:"1200x600",tags:["vps","hosting","performance"],downloads:45,date:"2024-01-15",category:"banners",previewUrl:"https://picsum.photos/seed/vps-banner/1200/600"},{id:2,title:"Shared Hosting Video Ad",type:"video",fileType:"MP4",dimensions:"1920x1080",tags:["shared-hosting","affordable","reliable"],downloads:23,date:"2024-01-14",category:"videos",thumbnailUrl:"https://picsum.photos/seed/video-hosting/1920/1080",videoUrl:"https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4"},{id:3,title:"Domain Registration Infographic",type:"image",fileType:"PNG",dimensions:"800x2000",tags:["domains","registration","guide"],downloads:67,date:"2024-01-12",category:"images",previewUrl:"https://picsum.photos/seed/domain-info/800/2000"},{id:4,title:"SSL Certificate Benefits",type:"document",fileType:"PDF",fileSize:"PDF",tags:["ssl","security","benefits"],downloads:34,date:"2024-01-10",category:"documents"},{id:5,title:"Social Media Post - Hosting Sale",type:"social",fileType:"PNG",dimensions:"1080x1080",tags:["social","sale","promotion"],downloads:89,date:"2024-01-08",category:"social",previewUrl:"https://picsum.photos/seed/social-sale/1080/1080"}]),{activeTab:i,searchQuery:f,filteredAssets:I,acceptedFileTypes:U}=Be(o),k=()=>{h.value?.click()},g=async P=>{const l=P.target.files?.[0];l&&(await $(l,o),P.target.value="")},D=P=>
1{w(P)},_=P=>{m.value=P,n.value=!0},q=P=>{x(P),n.value=!1},ee=P=>{d(P)};return(P,l)=>{const te=Te,se=Re;return v(),S("div",null,[e(E,{style:{"min-height":"400px"}},{default:t(()=>[a("div",ze,[l[5]||(l[5]=a("div",null,[a("h1",{class:"text-h6 font-weight-medium mb-1"},"Affiliate Assets"),a("p",{class:"text-body-1 text-medium-emphasis"},"Access marketing materials and attach your affiliate links")],-1)),e(j,{color:"primaryButtons","prepend-icon":"$uploadIcon",onClick:k},{default:t(()=>[...l[4]||(l[4]=[c(" Upload Asset ",-1)])]),_:1})]),e(R,{class:"mb-6"},{default:t(()=>[e(V,{cols:"12"},{default:t(()=>[a("div",Ee,[e(fe,{modelValue:r(f),"onUpdate:modelValue":l[0]||(l[0]=A=>z(f)?f.value=A:null),placeholder:"Search assets by name or tags...","prepend-inner-icon":"$searchIcon",variant:"outlined",density:"comfortable","hide-details":"",class:"flex-grow-1"},null,8,["modelValue"]),e(j,{variant:"outlined","prepend-icon":"$filterIcon",size:"large"},{default:t(()=>[...l[6]||(l[6]=[c(" Filter ",-1)])]),_:1})])]),_:1})]),_:1}),e(pe,{modelValue:r(i),"onUpdate:modelValue":l[1]||(l[1]=A=>z(i)?i.value=A:null),class:"mb-6",spaced:"end",density:"compact",grow:""},{default:t(()=>[e(F,{value:"all"},{default:t(()=>[...l[7]||(l[7]=[c("All Assets",-1)])]),_:1}),e(F,{value:"images"},{default:t(()=>[...l[8]||(l[8]=[c("Images",-1)])]),_:1}),e(F,{value:"videos"},{default:t(()=>[...l[9]||(l[9]=[c("Videos",-1)])]),_:1}),e(F,{value:"documents"},{default:t(()=>[...l[10]||(l[10]=[c("Documents",-1)])]),_:1}),e(F,{value:"banners"},{default:t(()=>[...l[11]||(l[11]=[c("Banners",-1)])]),_:1}),e(F,{value:"social"},{default:t(()=>[...l[12]||(l[12]=[c("Social",-1)])]),_:1}),e(F,{value:"my-uploads"},{default:t(()=>[...l[13]||(l[13]=[c("My Uploads",-1)])]),_:1})]),_:1},8,["modelValue"]),r(I).length>0?(v(),C(R,{key:0},{default:t(()=>[(v(!0),S(Z,null,X(r(I),A=>(v(),C(V,{key:A.id,cols:"12",sm:"6",lg:"4"},{default:t(()=>[e(te,{asset:A,onAttachLink:D,onPreview:_,onDownload:q,onAddTag:ee},null,8,["asset"])]),_:2},1024))),128))]),_:1})):(v(),C(R,{key:1},{default:t(()=>[e(V,{cols:"12"},{default:t(()=>[e(G,{"min-height":"300px",class:"d-flex align-center justify-center"},{default:t(()=>[a("div",Oe,[e(B,{size:"64",color:"grey-lighten-1"},{default:t(()=>[...l[14]||(l[14]=[c(" $folderIcon ",-1)])]),_:1}),l[15]||(l[15]=a("p",{class:"text-h6 mt-4"},"No Assets Found",-1)),a("p",Me,b(r(f)?"Try a different search term":"Upload your first asset to get started"),1)])]),_:1})]),_:1})]),_:1})),e(R,{class:"mt-8"},{default:t(()=>[e(V,{cols:"12"},{default:t(()=>[e(H,{elevation:"0"},{default:t(()=>[e(E,{class:"pa-6"},{default:t(()=>[l[18]||(l[18]=a("div",{class:"mb-6"},[a("h2",{class:"text-h6 font-weight-medium mb-2"},"Asset Guidelines"),a("p",{class:"text-body-2 text-medium-emphasis"},"Tips for using affiliate assets effectively")],-1)),e(R,null,{default:t(()=>[e(V,{cols:"12",md:"6"},{default:t(()=>[...l[16]||(l[16]=[a("h3",{class:"text-body-1 font-weight-medium mb-4"},"Recommended Formats",-1),a("div",{class:"d-flex flex-column ga-3 text-medium-emphasis"},[a("div",null,[a("p",{class:"text-body-2 font-weight-medium mb-1"},"• Images: PNG, JPG (high resolution)")]),a("div",null,[a("p",{class:"text-body-2 font-weight-medium mb-1"},"• Videos: MP4, MOV (1080p or higher)")]),a("div",null,[a("p",{class:"text-body-2 font-weight-medium mb-1"},"• Documents: PDF, DOC, PPT")])],-1)])]),_:1}),e(V,{cols:"12",md:"6"},{default:t(()=>[...l[17]||(l[17]=[a("h3",{class:"text-body-1 font-weight-medium mb-4"},"Best Practices",-1),a("div",{class:"d-flex flex-column ga-3 text-medium-emphasis"},[a("div",null,[a("p",{class:"text-body-2 font-weight-medium mb-1"},"• Always attach your affiliate link before sharing")]),a("div",null,[a("p",{class:"text-body-2 font-weight-medium mb-1"},"• Use relevant tags for easy discovery")]),a("div",null,[a("p",{class:"text-body-2 font-weight-medium mb-1"},"• Test links before publishing content")])],-1)])]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})]),_:1}),a("input",{ref_key:"fileInput",ref:h,type:"file",style:{display:"none"},accept:r(U),onChange:g},null,40,Ne),e(se,{modelValue:r(n),"onUpdate:modelValue":l[2]||(l[2]=A=>z(n)?n.value=A:null),asset:r(m),onDownload:q},null,8,["modelValue","asset"]),e(ge,{modelValue:r(u),"onUpdate:modelValue":l[3]||(l[3]=A=>z(u)?u.value=A:null),color:r(p),timeout:3e3},{default:t(()=>
1[c(b(r(y)),1)]),_:1},8,["modelValue","color"])])}}};export{Je 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.