import {clpp} from "./cl.core.js";let g={};const _ = clpp._;var f=function(window){'use strict';var rX=function(a){a.f=new _.Nt;a.f.on(a.m,_.jg,()=>pX(a));a.f.on(a.m,_.ig,()=>{s.Media.play(a.a,a.m.getPosition())});a.f.on(a.m,_.me,()=>qX(a));a.f.on(a.m,_.Kf,b=>{b=b.detail;switch(b.currentState){case _.Wo:a.a.length||qX(a);s.Media.play(a.a,a.m.getPosition());break;case _.Vo:case _.Po:pX(a);break;case _.Lo:case _.To:case _.Mo:a.g.info(`Close session for ${a.a} `+`in player state ${b.currentState}.`),pX(a),s.Media.close(a.a),a.a=""}})},pX=function(a){s.Media.stop(a.a,a.m.getPosition())},
qX=function(a){{const b=a.m.getLoadedSource();a.a=b?b.name||b.url:""}a.g.info(`Open session for ${a.a} `+`with duration ${a.m.getDuration()}`);s.Media.open(a.a,a.m.getDuration(),_.qa)},sX=class extends _.Pv{constructor(){super();this.m=this.f=null;this.a="";this.g=new _.S("clpp.adobe.AdobePlugin")}onPlayerCreated(a){var b=a.getConfiguration().adobe;(b=!b||!1!==b.enabled)?window.s&&s.Media?(this.m=a,rX(this)):this.g.warn("Adobe API not available."):this.g.debug("Adobe plugin is disabled.")}onPlayerWillDestroy(){this.f&&
(this.f.release(),this.f=null);this.m=null;this.a=""}id(){return"adobe"}};_.z("clpp.adobe.AdobeAnalyticsPlugin",sX);sX.Id="adobe";_.Ir(new class{create(){return new sX}});};f.call(g, window);