System.register(["./index-legacy-kPmrjNKx.js","./_plugin-vue_export-helper-legacy-BVIICed7.js","./artplayer-legacy-Gcf7JRwd.js"],function(e,t){"use strict";var a,i,n,o,s,r,l,c,d,u,p,y,m,v,g;return{setters:[e=>{a=e.K,i=e.i,n=e.r,o=e.a,s=e.o,r=e.f,l=e.g,c=e.h,d=e.x,u=e.y,p=e.w,y=e.d,m=e.p},e=>{v=e._},e=>{g=e.e}],execute:function(){var t=document.createElement("style");t.textContent=".container[data-v-2097a35e]{position:absolute}.content-image[data-v-2097a35e]{max-width:100%;max-height:100%;object-fit:contain}.art-video-player{background-color:transparent!important}.art-controls,.art-progress,.art-state,.art-state-icon{display:none!important}\n/*$vite$:1*/",document.head.appendChild(t),e({a:async function(e,t,i,n,o,s,r,l,c,d=1){const u=await a("statisticsDB",1,{upgrade(e){e.objectStoreNames.contains("statistics")||e.createObjectStore("statistics",{keyPath:"id",autoIncrement:!0})}}),p=JSON.parse(JSON.stringify(c));try{var y;const a={timestamp:Date.now(),partner:e||null,client:t||null,display:i||null,media:n||null,adv:o||0,rate:s||0,duration:r||0,order:l||null,face:p||null,counter:d||1};await u.add("statistics",a),200==(null===(y=data)||void 0===y?void 0:y.code)&&console.log("Лог статистики записан")}catch(g){return 0}},s:async function(){if(!navigator.onLine)return void console.log("Нет сети, отправка отложена");const e=await a("statisticsDB",1),t=await e.getAll("statistics");if(0!==t.length)try{const e=(await i.post(`${h}/api/v1/player/statistics`,{action:"statistics.bulk",records:t},{headers:{"Content-Type":"application/json"},timeout:5e3})).data;if(!e||"object"!=typeof e||!0!==e.online)throw new Error("OFFLINE_OR_HTML_STUB_200");200===(null==e?void 0:e.code)&&(console.info("Результат отправки статистики:",null==e?void 0:e.data),await async function(){const e=await a("statisticsDB",1);await e.clear("statistics")}())}catch(g){console.error("Ошибка при отправке статистики:",g.message)}else console.log("Нет данных для отправки")}});const h="https://display24.ru",f=["src"],w={__name:"PlaylistImageContainer",props:{id:String,mediaMode:Number,filename:String,type:String,isVisible:Boolean,partner:String},setup(e){const t=n(null),a=e,i=o({id:null,mediaMode:2,filename:"",type:""}),u=()=>{switch(i.mediaMode){case 1:return{objectFit:"fill",width:"100%",height:"100%"};case 2:return{objectFit:"cover",width:"100%",height:"100%"};default:return{objectFit:"none"}}};return s(async()=>{i.id=a.id,i.mediaMode=a.mediaMode,i.filename=a.filename,i.type=a.type,i.filename&&(t.value=await(async(e,t)=>{const i=`https://cdn.display24.ru/partners/${a.partner}/${e}`;return await d(i,t)})(i.filename,i.type))}),(e,a)=>(l(),r("img",{src:t.value,class:"content-image",style:c(u())},null,12,f))}};e("P",v(w,[["__scopeId","data-v-2097a35e"]])),e("_",{__name:"PlaylistVideoContainer",props:{id:String,mediaMode:Number,filename:String,type:String,isVisible:Boolean,partner:String},setup(e){g.CONTEXTMENU=!1,g.NOTICE_TIME=0,g.CONTROL_HIDE_TIME=0,g.RECONNECT_TIME_MAX=10;const t=e,a=o({id:null,mediaMode:2,filename:"",type:""}),i=n(null),v=n(u(32));p(()=>t.isVisible,e=>{if(i.value)if(e)i.value.play().catch(e=>{console.warn("play() при isVisible=true не удался",e)});else{try{i.value.pause()}catch(t){}try{i.value.currentTime=0}catch(t){}}});const h=e=>{var t,i;switch(e){case 1:return{objectFit:"fill",width:a.width+"px",height:a.height+"px"};case 2:return{objectFit:"cover",width:"100%",height:"100%"};default:return{objectFit:"none",width:(null===(t=a.content)||void 0===t?void 0:t.width)+"px",height:(null===(i=a.content)||void 0===i?void 0:i.height)+"px"}}};return s(async()=>{a.id=t.id,a.mediaMode=t.mediaMode,a.filename=t.filename,a.type=t.type}),p(()=>a.filename,async e=>{if(!e||0==(null==e?void 0:e.length))return;const n=document.querySelector(".video-"+v.value);if(n){const e=await async function(e,a){const i=`https://cdn.display24.ru/partners/${t.partner}/${e}`,n=navigator.userAgent||"";return n.includes("SMART-TV")||n.includes("Tizen")?i:await d(i,a)}(a.filename,a.type);i.value&&i.value.destroy(),i.value=new g({container:n,url:e,poster:"/poster.png",autoSize:!0,miniProgressBar:!1,loop:!1,muted:!1,autoplay:!1,aspectRatio:!0,controls:[],volume:.8,playsInline:!0,isLive:!0,mutex:!1,setting:!1,preload:"auto",clickToPlay:!1,show:!1,icons:{state:""}})}else console.error("Контейнер для плеера не найден")}),y(()=>{i.value&&i.value.destroy&&i.value.destroy(!1)}),(e,t)=>(l(),r("div",{class:m("video-"+v.value),style:c(h(a.mediaMode)),key:v.value},null,6))}})}}});
