(function (w) {
    /*tagconfig*/
    var adConfig = {};
    var config =

{"baseJsUrl":"https:\/\/player.unrulyvideo.com\/script\/6.1\/","trackDomain":"servt.unrulyvideo.com","checkTargeting":false,"templateId":"62b08bd1ff25cd1ac30f2fb8","playerVersion":8,"scriptId":"AV62af35d851923c62777207b4","closeButtonStyle":{"outside":true,"position":"Default"},"autoPlay":true,"soundButton":true,"vitab":true,"display":{"passback":{"disableWhenFloating":false},"linear":{"duration":1000,"disableWhenFloating":false}},"tagId":"62af35d851923c62777207b4","playerType":1,"playerDelay":0,"errorLimit":1,"maxImp":1,"maxRun":1,"midrolltime":0,"vastRetry":1,"autoContinue":true,"isSessionIdEnabled":false,"posDfp1x1":false,"caption":{"enable":true,"text":""},"scrollPixels":5,"openAnim":true,"channelId":"6265145b67ce6a604d44ebf5","publisherId":"603f65a2e291680ef30af9c7","width":100,"height":0,"position":"aniplayer_AV62af35d851923c62777207b4","timelineMode":"bottom","adLabel":{"text":""},"loop":false,"pauseButton":true,"adServerDomain":"go1.aniview.com","logo":false,"targetingDomain":"","templateType":"1"}
var b =
{}
var ab =
{}


var ad =
[{"sp":60,"t":{"p":1},"a":{"uidproviders":{"avintentiq":{"all":true,"partner":448154759,"timeout":5000}},"nabTest":"IntentIQ_Control_GlobalConfig","badvlist":{"list":["trackmenow.life","fortunefindersnet.click","bidmaster360.com","trackpulsepro.cc","luxurytechinc.com","manukora.com","tracemasters.cc","wind-dSy14nuvlg.errolandtessa.com","safesysdefender.xyz","trackmaster.cc","serendipityseeker.xyz","redirectlinkway.top","ccriknights.com","lrscroyals.com","puzztake.com","windowsdefendersecuritycenter.com","yourfileisreadytodownload.com","mcafeetrojanvirusdetected.com","youvemadethe5billionthsearch.com","vpnupdatescam.com","subscribepage.com","platinumai.net","trackmenow.life","tracemasters.cc","networkfortifyguard.life","batch.cootlogix.com","vo-av.azureedge.net","v-fa.azureedge.net","bn-vdo.azureedge.net","d3i45xa0npwdkr.cloudfront.net","zr-vd.azureedge.net","livd.azureedge.net","doazcw5q3y88m.cloudfront.net","v3-ky.azureedge.net","ftder.azureedge.net","waytopmobi.com","waytopmobirtb.com","deceowinnul.xyz","winbanotice.top","22witwoqes.top","us1winno.top","2021winstat.xyz","apsbvl.space","bhgusz.space","axufcs.space","luckypapa.top","luckypuppy.top","bbd383ttka21.top","21bustqisw2.top","2022325luckyday.top","2020workaffnew.top","bbd383ttka23.top","cnmdzem1201.top","bxlysluckdu.top","2284sbluck.top","mtfl20232good.top","trkcenter.top","takutaku2834.top","takutaku2833.top","netw611k22de.top","takutaku2832.top","takutaku2831.top","new611k22.top","tmdqswllck.top","cnmb29382732.top","bindgnndnia2323.top","redirectlinkway.top","resilienceguardnet.top","protectguardline.world","barricadesecureway.info","ricadesecureway.info","chanceencounterline.top","test2.com","d9b0a67x9wsqc.cloudfront.net","d26ysxib20d4fq.cloudfront.net","d2xq9lyqyjnbrs.cloudfront.net","fortunefindersnet.click","resilience.guardnet.top","lionenergy.com","heyhorti.com","hologearco.com","ginamber.com","projectrepat.com","fortunefindersnet.click","lrscroyals.com","ccriknights.com","ccsubluedevils.com","d1l7snsb4aerjt.cloudfront.net","livebearded.com","odr.mookie1.com","mookie1.com","d12nmqc6q4mfgg.cloudfront.net","d2hv6bo9nf9myw.cloudfront.net","d2knse0u650wbq.cloudfront.net","d1p403z98dbkw8.cloudfront.net","d3keaxpcmusyl6.cloudfront.net","d3osdrn4aekbnx.cloudfront.net","d3kqccsvtdsria.cloudfront.net","d1ygqz6kxv5if1.cloudfront.net","djtxbo9vvfov0.cloudfront.net","d123c42anorg6n.cloudfront.net","forwardzonehub.life","bidder360.online","serenitystar.info","caseforconsumers.org","tk0x1.com"]},"adConfig":{"uidproviders":{"avintentiq":{"all":true,"timeout":5000,"partner":448154759,"os":["android"]}},"nabTest":"IntentIQ_Control_GlobalConfig"}}},{"sp":10,"t":{"p":1},"a":{"uidproviders":{"avintentiq":{"all":true,"partner":448154759,"timeout":5000}},"nabTest":"IntentIQ_V085T1_GlobalConfig","badvlist":{"list":["trackmenow.life","fortunefindersnet.click","bidmaster360.com","trackpulsepro.cc","luxurytechinc.com","manukora.com","tracemasters.cc","wind-dSy14nuvlg.errolandtessa.com","safesysdefender.xyz","trackmaster.cc","serendipityseeker.xyz","redirectlinkway.top","ccriknights.com","lrscroyals.com","puzztake.com","windowsdefendersecuritycenter.com","yourfileisreadytodownload.com","mcafeetrojanvirusdetected.com","youvemadethe5billionthsearch.com","vpnupdatescam.com","subscribepage.com","platinumai.net","trackmenow.life","tracemasters.cc","networkfortifyguard.life","batch.cootlogix.com","vo-av.azureedge.net","v-fa.azureedge.net","bn-vdo.azureedge.net","d3i45xa0npwdkr.cloudfront.net","zr-vd.azureedge.net","livd.azureedge.net","doazcw5q3y88m.cloudfront.net","v3-ky.azureedge.net","ftder.azureedge.net","waytopmobi.com","waytopmobirtb.com","deceowinnul.xyz","winbanotice.top","22witwoqes.top","us1winno.top","2021winstat.xyz","apsbvl.space","bhgusz.space","axufcs.space","luckypapa.top","luckypuppy.top","bbd383ttka21.top","21bustqisw2.top","2022325luckyday.top","2020workaffnew.top","bbd383ttka23.top","cnmdzem1201.top","bxlysluckdu.top","2284sbluck.top","mtfl20232good.top","trkcenter.top","takutaku2834.top","takutaku2833.top","netw611k22de.top","takutaku2832.top","takutaku2831.top","new611k22.top","tmdqswllck.top","cnmb29382732.top","bindgnndnia2323.top","redirectlinkway.top","resilienceguardnet.top","protectguardline.world","barricadesecureway.info","ricadesecureway.info","chanceencounterline.top","test2.com","d9b0a67x9wsqc.cloudfront.net","d26ysxib20d4fq.cloudfront.net","d2xq9lyqyjnbrs.cloudfront.net","fortunefindersnet.click","resilience.guardnet.top","lionenergy.com","heyhorti.com","hologearco.com","ginamber.com","projectrepat.com","fortunefindersnet.click","lrscroyals.com","ccriknights.com","ccsubluedevils.com","d1l7snsb4aerjt.cloudfront.net","livebearded.com","odr.mookie1.com","mookie1.com","d12nmqc6q4mfgg.cloudfront.net","d2hv6bo9nf9myw.cloudfront.net","d2knse0u650wbq.cloudfront.net","d1p403z98dbkw8.cloudfront.net","d3keaxpcmusyl6.cloudfront.net","d3osdrn4aekbnx.cloudfront.net","d3kqccsvtdsria.cloudfront.net","d1ygqz6kxv5if1.cloudfront.net","djtxbo9vvfov0.cloudfront.net","d123c42anorg6n.cloudfront.net","forwardzonehub.life","bidder360.online","serenitystar.info","caseforconsumers.org","tk0x1.com"]},"adConfig":{"nabTest":"IntentIQ_V085T1_GlobalConfig","playeropt":{"imp":3,"srv":true,"ll":1,"imaOpt1":{"mm":6,"hcf":1.2,"v":0.8},"v":0.85,"istv":21,"pstv":20,"lf":0.8,"m":2,"sortByDur":true,"hcf":1.15,"hca":0.1,"it":1},"uidproviders":{"avintentiq":{"all":true,"timeout":5000,"partner":448154759,"os":["android"]}}}}},{"sp":10,"t":{"p":1},"a":{"uidproviders":{"avintentiq":{"all":true,"partner":448154759,"timeout":5000}},"nabTest":"IntentIQ_V095T1_GlobalConfig","badvlist":{"list":["trackmenow.life","fortunefindersnet.click","bidmaster360.com","trackpulsepro.cc","luxurytechinc.com","manukora.com","tracemasters.cc","wind-dSy14nuvlg.errolandtessa.com","safesysdefender.xyz","trackmaster.cc","serendipityseeker.xyz","redirectlinkway.top","ccriknights.com","lrscroyals.com","puzztake.com","windowsdefendersecuritycenter.com","yourfileisreadytodownload.com","mcafeetrojanvirusdetected.com","youvemadethe5billionthsearch.com","vpnupdatescam.com","subscribepage.com","platinumai.net","trackmenow.life","tracemasters.cc","networkfortifyguard.life","batch.cootlogix.com","vo-av.azureedge.net","v-fa.azureedge.net","bn-vdo.azureedge.net","d3i45xa0npwdkr.cloudfront.net","zr-vd.azureedge.net","livd.azureedge.net","doazcw5q3y88m.cloudfront.net","v3-ky.azureedge.net","ftder.azureedge.net","waytopmobi.com","waytopmobirtb.com","deceowinnul.xyz","winbanotice.top","22witwoqes.top","us1winno.top","2021winstat.xyz","apsbvl.space","bhgusz.space","axufcs.space","luckypapa.top","luckypuppy.top","bbd383ttka21.top","21bustqisw2.top","2022325luckyday.top","2020workaffnew.top","bbd383ttka23.top","cnmdzem1201.top","bxlysluckdu.top","2284sbluck.top","mtfl20232good.top","trkcenter.top","takutaku2834.top","takutaku2833.top","netw611k22de.top","takutaku2832.top","takutaku2831.top","new611k22.top","tmdqswllck.top","cnmb29382732.top","bindgnndnia2323.top","redirectlinkway.top","resilienceguardnet.top","protectguardline.world","barricadesecureway.info","ricadesecureway.info","chanceencounterline.top","test2.com","d9b0a67x9wsqc.cloudfront.net","d26ysxib20d4fq.cloudfront.net","d2xq9lyqyjnbrs.cloudfront.net","fortunefindersnet.click","resilience.guardnet.top","lionenergy.com","heyhorti.com","hologearco.com","ginamber.com","projectrepat.com","fortunefindersnet.click","lrscroyals.com","ccriknights.com","ccsubluedevils.com","d1l7snsb4aerjt.cloudfront.net","livebearded.com","odr.mookie1.com","mookie1.com","d12nmqc6q4mfgg.cloudfront.net","d2hv6bo9nf9myw.cloudfront.net","d2knse0u650wbq.cloudfront.net","d1p403z98dbkw8.cloudfront.net","d3keaxpcmusyl6.cloudfront.net","d3osdrn4aekbnx.cloudfront.net","d3kqccsvtdsria.cloudfront.net","d1ygqz6kxv5if1.cloudfront.net","djtxbo9vvfov0.cloudfront.net","d123c42anorg6n.cloudfront.net","forwardzonehub.life","bidder360.online","serenitystar.info","caseforconsumers.org","tk0x1.com"]},"adConfig":{"nabTest":"IntentIQ_V095T1_GlobalConfig","playeropt":{"imp":3,"srv":true,"ll":1,"imaOpt1":{"mm":6,"hcf":1.2,"v":0.8},"v":0.95,"istv":21,"pstv":20,"lf":0.8,"m":2,"sortByDur":true,"hcf":1.15,"hca":0.1,"it":1},"uidproviders":{"avintentiq":{"all":true,"timeout":5000,"partner":448154759,"os":["android"]}}}}},{"sp":10,"t":{"p":1},"a":{"uidproviders":{"avintentiq":{"all":true,"partner":448154759,"timeout":5000}},"nabTest":"IntentIQ_V09HCF105_GlobalConfig","badvlist":{"list":["trackmenow.life","fortunefindersnet.click","bidmaster360.com","trackpulsepro.cc","luxurytechinc.com","manukora.com","tracemasters.cc","wind-dSy14nuvlg.errolandtessa.com","safesysdefender.xyz","trackmaster.cc","serendipityseeker.xyz","redirectlinkway.top","ccriknights.com","lrscroyals.com","puzztake.com","windowsdefendersecuritycenter.com","yourfileisreadytodownload.com","mcafeetrojanvirusdetected.com","youvemadethe5billionthsearch.com","vpnupdatescam.com","subscribepage.com","platinumai.net","trackmenow.life","tracemasters.cc","networkfortifyguard.life","batch.cootlogix.com","vo-av.azureedge.net","v-fa.azureedge.net","bn-vdo.azureedge.net","d3i45xa0npwdkr.cloudfront.net","zr-vd.azureedge.net","livd.azureedge.net","doazcw5q3y88m.cloudfront.net","v3-ky.azureedge.net","ftder.azureedge.net","waytopmobi.com","waytopmobirtb.com","deceowinnul.xyz","winbanotice.top","22witwoqes.top","us1winno.top","2021winstat.xyz","apsbvl.space","bhgusz.space","axufcs.space","luckypapa.top","luckypuppy.top","bbd383ttka21.top","21bustqisw2.top","2022325luckyday.top","2020workaffnew.top","bbd383ttka23.top","cnmdzem1201.top","bxlysluckdu.top","2284sbluck.top","mtfl20232good.top","trkcenter.top","takutaku2834.top","takutaku2833.top","netw611k22de.top","takutaku2832.top","takutaku2831.top","new611k22.top","tmdqswllck.top","cnmb29382732.top","bindgnndnia2323.top","redirectlinkway.top","resilienceguardnet.top","protectguardline.world","barricadesecureway.info","ricadesecureway.info","chanceencounterline.top","test2.com","d9b0a67x9wsqc.cloudfront.net","d26ysxib20d4fq.cloudfront.net","d2xq9lyqyjnbrs.cloudfront.net","fortunefindersnet.click","resilience.guardnet.top","lionenergy.com","heyhorti.com","hologearco.com","ginamber.com","projectrepat.com","fortunefindersnet.click","lrscroyals.com","ccriknights.com","ccsubluedevils.com","d1l7snsb4aerjt.cloudfront.net","livebearded.com","odr.mookie1.com","mookie1.com","d12nmqc6q4mfgg.cloudfront.net","d2hv6bo9nf9myw.cloudfront.net","d2knse0u650wbq.cloudfront.net","d1p403z98dbkw8.cloudfront.net","d3keaxpcmusyl6.cloudfront.net","d3osdrn4aekbnx.cloudfront.net","d3kqccsvtdsria.cloudfront.net","d1ygqz6kxv5if1.cloudfront.net","djtxbo9vvfov0.cloudfront.net","d123c42anorg6n.cloudfront.net","forwardzonehub.life","bidder360.online","serenitystar.info","caseforconsumers.org","tk0x1.com"]},"adConfig":{"nabTest":"IntentIQ_V09HCF105_GlobalConfig","playeropt":{"imp":3,"srv":true,"ll":1,"imaOpt1":{"mm":6,"hcf":1.2,"v":0.8},"v":0.9,"istv":21,"pstv":20,"lf":0.8,"m":2,"sortByDur":true,"hcf":1.05,"hca":0.1,"it":1},"uidproviders":{"avintentiq":{"all":true,"timeout":5000,"partner":448154759,"os":["android"]}}}}},{"sp":10,"t":{"p":1},"a":{"uidproviders":{"avintentiq":{"all":true,"partner":448154759,"timeout":5000}},"nabTest":"IntentIQ_Itay1_GlobalConfig","badvlist":{"list":["trackmenow.life","fortunefindersnet.click","bidmaster360.com","trackpulsepro.cc","luxurytechinc.com","manukora.com","tracemasters.cc","wind-dSy14nuvlg.errolandtessa.com","safesysdefender.xyz","trackmaster.cc","serendipityseeker.xyz","redirectlinkway.top","ccriknights.com","lrscroyals.com","puzztake.com","windowsdefendersecuritycenter.com","yourfileisreadytodownload.com","mcafeetrojanvirusdetected.com","youvemadethe5billionthsearch.com","vpnupdatescam.com","subscribepage.com","platinumai.net","trackmenow.life","tracemasters.cc","networkfortifyguard.life","batch.cootlogix.com","vo-av.azureedge.net","v-fa.azureedge.net","bn-vdo.azureedge.net","d3i45xa0npwdkr.cloudfront.net","zr-vd.azureedge.net","livd.azureedge.net","doazcw5q3y88m.cloudfront.net","v3-ky.azureedge.net","ftder.azureedge.net","waytopmobi.com","waytopmobirtb.com","deceowinnul.xyz","winbanotice.top","22witwoqes.top","us1winno.top","2021winstat.xyz","apsbvl.space","bhgusz.space","axufcs.space","luckypapa.top","luckypuppy.top","bbd383ttka21.top","21bustqisw2.top","2022325luckyday.top","2020workaffnew.top","bbd383ttka23.top","cnmdzem1201.top","bxlysluckdu.top","2284sbluck.top","mtfl20232good.top","trkcenter.top","takutaku2834.top","takutaku2833.top","netw611k22de.top","takutaku2832.top","takutaku2831.top","new611k22.top","tmdqswllck.top","cnmb29382732.top","bindgnndnia2323.top","redirectlinkway.top","resilienceguardnet.top","protectguardline.world","barricadesecureway.info","ricadesecureway.info","chanceencounterline.top","test2.com","d9b0a67x9wsqc.cloudfront.net","d26ysxib20d4fq.cloudfront.net","d2xq9lyqyjnbrs.cloudfront.net","fortunefindersnet.click","resilience.guardnet.top","lionenergy.com","heyhorti.com","hologearco.com","ginamber.com","projectrepat.com","fortunefindersnet.click","lrscroyals.com","ccriknights.com","ccsubluedevils.com","d1l7snsb4aerjt.cloudfront.net","livebearded.com","odr.mookie1.com","mookie1.com","d12nmqc6q4mfgg.cloudfront.net","d2hv6bo9nf9myw.cloudfront.net","d2knse0u650wbq.cloudfront.net","d1p403z98dbkw8.cloudfront.net","d3keaxpcmusyl6.cloudfront.net","d3osdrn4aekbnx.cloudfront.net","d3kqccsvtdsria.cloudfront.net","d1ygqz6kxv5if1.cloudfront.net","djtxbo9vvfov0.cloudfront.net","d123c42anorg6n.cloudfront.net","forwardzonehub.life","bidder360.online","serenitystar.info","caseforconsumers.org","tk0x1.com"]},"adConfig":{"nabTest":"IntentIQ_Itay1_GlobalConfig","playeropt":{"imp":3,"srv":true,"ll":1,"imaOpt1":{"mm":6,"hcf":1.2,"v":0.8},"v":0.8,"istv":21,"pstv":20,"lf":0.8,"m":1,"sortByDur":true,"hcf":1.15,"hca":0.1,"it":1},"uidproviders":{"avintentiq":{"all":true,"timeout":5000,"partner":448154759,"os":["android"]}}}}}]


var CONST = {
  CREATIVE_TYPE: {
    VIDEO: 1,
    DISPLAY: 2
  },
  PLAYER_TYPE: {
    OUTSTREAM: 1,
    INSTREAM: 2,
  },
  DEVICE: {
    MOBILE: 1,
    DESKTOP: 2,
    TABLET: 3,
    TV: 4,
  }
};

function isDisplayPlacement(playerTagConfigs) {
  return (
    playerTagConfigs.creativeType == CONST.CREATIVE_TYPE.DISPLAY
    && playerTagConfigs.playerType == CONST.PLAYER_TYPE.OUTSTREAM
  );
}

function isVideoOutstream(playerTagConfigs) {
  return (
    playerTagConfigs.creativeType != CONST.CREATIVE_TYPE.DISPLAY
    && playerTagConfigs.playerType == CONST.PLAYER_TYPE.OUTSTREAM
  );
}

function isVideoInstream(playerTagConfigs) {
  return playerTagConfigs.playerType == CONST.PLAYER_TYPE.INSTREAM;
}

function merge(target, source) {
  if (typeof source !== 'object' || Array.isArray(source)) {
    return target;
  }
  for (var key in source) {
    var a = {};
    a[key] = {};
    if (typeof source[key] === 'object' && !Array.isArray(source[key])) {
      if (!target[key]) {
        Object.assign(target, a);
      }
      merge(target[key], source[key]);
    } else {
      a[key] = source[key];
      Object.assign(target, a);
    }
  }
}

function getApiInfo(apiName, win) {
  try {
    if (win[apiName]) {
      return { api: win[apiName], window: win };
    } else if(window[apiName]) {
      return { api: window[apiName], window: window };
    } else {
      return { api: undefined, window: win };
    }
  } catch (exp) {
    return { api: undefined, window: win };
  }
}

function nodeIsConnected(node) {
  if (!node) {
    return false;
  }
  if (node.isConnected != null) {
    return node.isConnected;
  }
  return !node.ownerDocument || !(node.ownerDocument.compareDocumentPosition(node) & node.DOCUMENT_POSITION_DISCONNECTED);
}

function addNodeStateListener(st) {
  var config = st.a;

  if (!config.spa && !config.destroyOnHostRemoval) {
    return;
  }

  if (!st.win.MutationObserver) {
    console.error('MutationObserver not support');
    return;
  }

  st.win.aniview = st.win.aniview || {};
  st.win.aniview.layout = st.win.aniview.layout || {};
  st.win.aniview.placements = st.win.aniview.placements || [];

  st.id = config.tagInstanceName || config.tagId;
  var aniview = st.win.aniview;
  var placements = aniview.placements;
  var layout = aniview.layout;

  if (placements.length <= 0) {
    layout.mutationObserver = new MutationObserver(function() {
      for (var i = 0; i < placements.slice().length; i++) {
        var placement = placements[i];
        var placementConfig = placement.a;
        var hasSelector = placementConfig.position || placementConfig.posSelector || placementConfig.posSelectors && placementConfig.posSelectors.length > 0;
        if (placement.isDestroyed && placementConfig.spa && hasSelector) {
          placementConfig.posFallbacks = undefined;
          placementConfig.waitForScroll = false;
          placementConfig.waitBeforeInit = false;
          placement.retry = function() {};
          placement.loaded = false;
          placement.run();
        } else if (!nodeIsConnected(placementConfig.refDiv)) {
          placement.destroy(placement);
          if (placementConfig.destroyOnHostRemoval) {
            placements.splice(i, 1);
          }
          if (placements.length <= 0) {
            layout.mutationObserver.disconnect();
            layout.mutationObserver = null;
          }
        }
      }
    });
    layout.mutationObserver.observe(document.body, {
      childList: true,
      subtree: true
    });
  }

  for (var i = 0; i < placements.length; i++) {
    if (placements[i].id === st.id) {
      return;
    }
  }

  placements.push(st);
}

function safeJsonParse(jsonString, fallback) {
  if (!jsonString) {
    return fallback;
  }

  try {
    return JSON.parse(jsonString);
  } catch (e) {
    return fallback !== undefined ? fallback : jsonString;
  }
}

    /*tagconfig*/
    var a = config;
    var st = {
        scriptErrorCounter: 0,
        fetchScriptDelayMs: 200,
        target: function () {
            try {
if (this.sp) {
  return;
}

var ua = navigator.userAgent || navigator.vendor || window.opera;
var uav = navigator.appVersion ? navigator.appVersion.toLowerCase() : "";
var op = CONST.DEVICE.DESKTOP;
var isTablet = /(ipad|tablet|(android(?!.*mobile))|(windows(?!.*phone)(.*touch))|kindle|playbook|silk|(puffin(?!.*(IP|AP|WP))))/i.test(ua);
var isMobile = /(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(ua) || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(ua.substr(0, 4));

if (a.device === "mobile") {
  op = CONST.DEVICE.MOBILE;
} else if (a.device === "tablet") {
  op = a.tabletAsDesktop ? CONST.DEVICE.DESKTOP : CONST.DEVICE.MOBILE;
} else if (a.device === "desktop") {
  op = CONST.DEVICE.DESKTOP;
} else if (isTablet && a.tabletAsDesktop) {
  //
} else if (isMobile) {
  op = CONST.DEVICE.MOBILE;
} else if (/web0s|webos|tizen/i.test(uav)) {
  op = CONST.DEVICE.TV;
}

this.op = op;
} catch (reason) {(console.error || console.log)(reason);}
        },
        getConfig: function () {
            try {
function addDefaults (r, defaults) {
  r.creativeDimensions = defaults.creativeDimensions;
  r.refresh = defaults.refresh;
  r.width = defaults.width;
  r.height = defaults.height;
}

function getRC(ab) {
  if (ab && ab.length) {
    var inc = 0;
    var rand = Math.floor(Math.random() * 100) + 1;

    for (i = 0; i < ab.length; i++) {
      b1 = ab[i];
      inc += b1.sp;

      if (b1.a && inc >= rand) {
        return b1.a;
      }
    }
  }
}

var cfg = a;

try {
  var i, b1, b1a;

  if (b && b.length > 0) {
    st.target();

    for (i = 0; i < b.length; i++) {
      b1 = b[i];

      if (b1.t && b1.t.p && b1.t.p == this.op && b1.a) {
        b1a = b1.a;
        break;
      }
    }
  }
  st.target();

  if (typeof abDesktop !== "undefined") {
    ab = this.op == CONST.DEVICE.DESKTOP ? abDesktop : abMobile;
  }
  if (typeof adDesktop !== "undefined") {
    ad = this.op == CONST.DEVICE.DESKTOP ? adDesktop : adMobile;
  }

  var r1 = getRC(ab) || b1a || cfg;

  if (cfg.waitForScroll) {
    r1.waitForScroll = true;
  }

  if (cfg.waitBeforeInit) {
    r1.waitBeforeInit = cfg.waitBeforeInit;
  }

  if (cfg.setUtm) {
    r1.setUtm = true;
  }

  if (cfg.adConfig && cfg.adConfig.setUtm) {
    r1.adConfig.setUtm = true;
  }

  if (typeof ad !== "undefined" && ad.length > 0) {
    var r2 = getRC(ad);
    merge(r1, r2);
  }

  var defaults = config;
  if (st.op == CONST.DEVICE.MOBILE && b && b[0]) {
    defaults = b[0].a;
  }

  if (isDisplayPlacement(config)) {
    addDefaults(r1, defaults);
  }

  try {
    var urlParams = new URLSearchParams(window.top.location.search);
    var overrideConfig = JSON.parse(decodeURIComponent(urlParams.get("av_config")));

    if (overrideConfig) {
      merge(r1, overrideConfig);
    }
  } catch (err) {}

  return r1;
} catch (e) {}

return cfg;
} catch (reason) {(console.error || console.log)(reason);}
        },
        track: function(e, m) {
            try {
		if (!this.trackUrl) {
			this.trackUrl = "https://" + (a.trackDomain || "track1.aniview.com") + "/track?pid=" + a.publisherId + "&cid=" + a.channelId + "&cb=" + Date.now() + "&r=" + location.host + "&stagid=" + (a.tagId || "") + "&stplid=" + (a.templateId || "") + "&d35=" + (a.sabTest || "") + "&cd10=" + (a.unrulySiteId || "") + "&e=";
		}
		m = m ? m : "";
		(new Image()).src = this.trackUrl + e + m;
} catch (reason) {(console.error || console.log)(reason);}
        },
        unique: function() {
            try {
if (!this.win.aniplayerPos) {
  this.win.aniplayerPos = {};
}

this.win.aniplayerPos[a.position] = true;

return true;
} catch (reason) {(console.error || console.log)(reason);}
        },
        findWin: function() {
           try {
		try {
			this.doc = top.document;
			this.win = top;
		} catch (exp) {
			this.doc = document;
			this.win = window;
		}
} catch (reason) {(console.error || console.log)(reason);}
        },
        postCreate: function(el) {
            try {
		if (a.aniBoxStyle && typeof a.aniBoxStyle === "object") {
			var aBox = el.querySelector("#aniBox");
			if (aBox) {
				Object.assign(aBox.style, a.aniBoxStyle || {});
			}
		}
		if (a.minHeightRefSelector) {
			var refEl = el.parentNode.querySelector(a.minHeightRefSelector);
			if (refEl && refEl.clientHeight < 600 && refEl.clientHeight > 0) {
				var diff = 0;
				if (a.closeButtonStyle && a.closeButtonStyle.outside) {
					diff = 18;
				}
				a.minHeight = Math.max(refEl.clientHeight - diff, 0);
			}
		}
} catch (reason) {(console.error || console.log)(reason);}
        },
        retry: function() {
           try {
var that = this;
var isFallback = false;

if (this.retryCnt++ > this.timeout) {
  this.track("AV_M3", "&prbdres=nopos&sn=" + encodeURIComponent(location.href).slice(0, 400));

  return;
}

if (this.retryCnt == this.timeout && a.posFallbacks) {
  a.posSelectors = a.posFallbacks;
  isFallback = true;
  this.track("AV_M3", "&prbdres=fallbackpos&sn=" + encodeURIComponent(location.href).slice(0, 400));
}

setTimeout(function() {
  that.prePosition(isFallback);
}, 250);
} catch (reason) {(console.error || console.log)(reason);}
        },
        create: function(p, n) {
            try {
var d1 = document.createElement("div");

if (a.scriptId) {
  d1.className = a.scriptId;
}

d1.style.width = "100%";
d1.style.margin = "0 auto";
d1.style.maxWidth = "" + a.maxWidth + "px";
var d2 = document.createElement("div");
d2.id = "aniBox";
d2.style.width = "100%";
d2.style.height = "1px";
var d3 = document.createElement("div");
d3.id = a.position;
d3.style.width = "100%";

if (p === this.doc || p === this.doc.head) {
  p = this.doc.body;
}

if (n) {
  p.insertBefore(d1, n);
} else {
  if (a.posElementIndexType === 0 && a.posElementCustomIndex <= p.children.length) {
    p.insertBefore(d1, p.children[a.posElementCustomIndex - 1]);
  } else if (a.posElementIndexType === 1) {
    p.insertBefore(d1, p.firstChild);
  } else {
    p.appendChild(d1);
  }
}

a.positionDiv = d3;
a.refDiv = p;
d1.appendChild(d2);
d2.appendChild(d3);

addNodeStateListener(st);

this.postCreate(d1);
} catch (reason) {(console.error || console.log)(reason);}
        },
        prePosition: function(isFallback) {
            try {
this.position(isFallback);
} catch (reason) {(console.error || console.log)(reason);}
        },
        position: function(isFallback) {
            try {
		var p = this.doc;
		var n;
		var isScp = false;
		if (a.positionApi && typeof this.win[a.positionApi] === "function") {
			try {
				p = this.win[a.positionApi](a, st);
			} catch (ex) {
			}
			if (!p) {
				this.retry();
				return;
			}
			if (a.posType != "in") {
				n = p;
				p = p.parentNode;
			}
		}
		if (a.posSelector) {
			try {
				var q = this.doc.querySelectorAll(a.posSelector);
				var l = 0;
				if (a.posCounter > 0) {
					l = a.posCounter - 1;
				}
				p = q[l];
			} catch (e) {
				this.track("AV_M3", "&prbdres=badpos&sn=" + encodeURIComponent(location.href).slice(0, 400));
				return;
			}
			if (!p) {
				this.retry();
				return;
			}
		}
		if (a.posId) {
			p = this.doc.getElementById(a.posId);
			if (!p) {
				this.retry();
				return;
			}
		}
		if (a.posTag) {
			var c = a.posTag.split("#");
			if (c && c.length == 2) {
				var e = p.getElementsByTagName(c[0]);
				if (e.length == 0) {
					this.retry();
					return;
				}
				p = e[Math.min(c[1] - 1, e.length - 1)];
			}
		}
		if (a.posClass) {
			var c = a.posClass.split("#");
			var e = 1;
			if (c.length == 2) {
				e = c[1];
			}
			var f = p.getElementsByClassName(c[0]);
			if (f.length > 0) {
				p = f[Math.min(e - 1, f.length - 1)];
			}
			if (!p) {
				this.retry();
				return;
			}
		}
		if (a.posDfp1x1 && window.frameElement) {
			n = window.frameElement.parentNode.parentNode;
			p = n.parentNode;
			if ((frameElement.clientHeight > 5 || document.body.clientHeight > 5) && !a.nohideIframe) {
				frameElement.style.height = "0px";
			}
			if (a.posType == "after") {
				n = n.nextElementSibling;
			}
		}
		var n;
		if (p === this.doc) {
			n = this.doc.getElementById(a.scriptId);
			if (n) {
				n.id += "-used";
				p = n.parentNode;
			}
		}
		if (p === this.doc.head) {
			n = null;
			p = this.doc;
		}
		if (a.posType && a.posType !== "in" && !n) {
			if (a.posType === "after" && p.nextElementSibling) {
				n = p.nextElementSibling;
			} else {
				n = null;
			}
			p = p.parentNode;
		}
		if (p) {
			if (!p.av_setpos) {
				p.av_setpos = {};
			}
			if (!p.av_setpos[a.position]) {
				p.av_setpos[a.position] = true;
				a.position += "-" + Date.now();
				this.create(p, n);
				this.load();
			} else {
				this.track("AV_M3", "&prbdres=duppos&sn=" + encodeURIComponent(location.href).slice(0, 400));
			}
		}
} catch (reason) {(console.error || console.log)(reason);}
        },
        targetingFail: function() {
           try {
this.track("AV_M3", "&prbdres=targeting");
} catch (reason) {(console.error || console.log)(reason);}
        },
        checkTargeting: function(callbackSuccess, callbackFail) {
           try {
var that = this;
that.callbackSuccess = callbackSuccess;
that.callbackFail = callbackFail;
var adserverdomain = "tg1.aniview.com";

try {
  adserverdomain = a.adServerDomain ? a.adServerDomain : this.config.adConfig.adServerDomain;
} catch (e) {}

var targetingdomain = a.targetingDomain ? a.targetingDomain : adserverdomain;
var publisherId = a.publisherId ? a.publisherId : this.config.adConfig.publisherId;
var channelId = a.channelId ? a.channelId : this.config.adConfig.channelId;
var targetingEndpoint =
  "https://"
  + targetingdomain
  + "/api/adserver/spt/targeting?AV_TAGID="
  + a.tagId
  + "&AV_PUBLISHERID="
  + publisherId
  + "&AV_CHANNELID="
  + channelId
  + "&AV_URL="
  + window.location.href;
var xhr = new XMLHttpRequest();

xhr.onload = function () {
  try {
    var resp = JSON.parse(xhr.responseText);

    if (typeof resp.result !== "undefined" && resp.result === 0) {
      that.callbackFail();
    } else {
      that.callbackSuccess();
    }
  } catch (e) {
    that.callbackSuccess();
  }
};

xhr.open("GET", targetingEndpoint, true);
xhr.send();
} catch (reason) {(console.error || console.log)(reason);}
        },
        load: function() {
            try {
var that = this;
var apiName = "avPlayer";
var apiInfo = getApiInfo(apiName, that.win);
that.apiInfo = apiInfo;
var api = apiInfo.api;
var apiWindow = apiInfo.window;
var scheduler = apiWindow.avAdPlayerScheduler || { loading: false, queue: [] };
var abPercentage = typeof a.abtest === "undefined" ? 5 : a.abtest;
var rand = Math.floor(Math.random() * 100) + 1;
var isAbEnabled = scheduler.enableAb != null ? scheduler.enableAb : rand <= abPercentage;
var scriptPath = "/script/6.1/";
var scriptName = "player.js";
var scriptDomain = "player.aniview.com";
var scriptBaseJsUrl = "https://" + scriptDomain + scriptPath;
var scriptVersionPath = isAbEnabled ? "ab5/" : "";
var scriptUrl = scriptBaseJsUrl + scriptVersionPath + scriptName;
var customScriptUrl = (a.baseJsUrl || ("https://" + (a.scriptDomain || scriptDomain) + scriptPath))
    + scriptVersionPath
    + scriptName;
var isDefaultUrl = false;
var retryFetchScriptTimerId;

a.abtest = isAbEnabled ? 5 : 0;
scheduler.enableAb = isAbEnabled;

apiWindow.avAdPlayerScheduler = scheduler;
apiWindow.addEventListener("online", retryFetchScript);

function checkIfLoad() {
  apiWindow.removeEventListener("online", retryFetchScript);
  that.apiInfo.api = that.apiInfo.window[apiName];

  if (isDefaultUrl) {
    if (a.baseJsUrl) {
      a.baseJsUrl = scriptBaseJsUrl;
    } else if (a.scriptDomain) {
      a.scriptDomain = scriptDomain;
    }
  }

  that.postLoadAsync(function() {
    that.start();
  });
}

function checkIfError() {
  if (++st.scriptErrorCounter < 2) {
    fetchScript(customScriptUrl);
  } else {
    retryFetchScriptTimerId = setTimeout(retryFetchScript, st.fetchScriptDelayMs);
  }
}

function fetchScript(url) {
  if (api) {
    checkIfLoad();

    return;
  }

  if (scheduler.loading) {
    scheduler.queue.push([checkIfLoad, checkIfError]);

    return;
  }

  scheduler.loading = true;
  var scp = that.doc.createElement("script");
  scp.src = url;

  scp.onload = function() {
    scp.onload = null;
    scheduler.loading = false;
    checkIfLoad();
    var queue = scheduler.queue.slice();
    scheduler.queue.length = 0;

    while (callbacks = queue.shift()) {
      callbacks[0]();
    }
  };

  scp.onerror = function() {
    scp.onerror = null;
    that.doc.body.removeChild(scp);
    scheduler.loading = false;
    checkIfError();
    var queue = scheduler.queue.slice();
    scheduler.queue.length = 0;

    while (callbacks = queue.shift()) {
      callbacks[1]();
    }
  };

  scp.async = true;
  that.doc.body.appendChild(scp);
}

function retryFetchScript(event) {
  if (event) {
    clearTimeout(retryFetchScriptTimerId);
    st.fetchScriptDelayMs = 200;
  }

  if (st.scriptErrorCounter % 2 === 0 && customScriptUrl !== scriptUrl) {
    isDefaultUrl = false;
    fetchScript(customScriptUrl);
  } else {
    isDefaultUrl = true;
    fetchScript(scriptUrl);
    st.fetchScriptDelayMs = st.fetchScriptDelayMs * 2;
  }
};

fetchScript(customScriptUrl);
} catch (reason) {(console.error || console.log)(reason);}
        },
        postStart: function(p) {
            try {
		var sendEvent = function sendEvent (eventName, asid, dataObj, testMode) {
				var xhr = new XMLHttpRequest();
				var method = "POST";
				var url = "https://plog.aniview.com/plog/log?id=" + sessId;
				if (eventName) {
					url += "&e=" + eventName;
				}
				if (asid) {
					url += "&asid=" + asid;
				}
				if (testMode) {
					console.log(url, dataObj);
					return;
				}
				if ("withCredentials" in xhr) {
					xhr.open(method, url, true);
					xhr.withCredentials = false;
				} else {
					if (typeof XDomainRequest != "undefined") {
						xhr = new XDomainRequest();
						xhr.open(method, url);
					} else {
						xhr = null;
					}
				}
				if (xhr) {
					var strData = JSON.stringify(dataObj || "");
					xhr.send(strData);
				}
			};
		var inEventFilteredList = function inEventFilteredList (eventName, filteredAdEvents) {
				if (!filteredAdEvents) {
					return false;
				}
				if (filteredAdEvents.length < 1) {
					return false;
				}
				if (eventName) {
					if (filteredAdEvents.includes("*")) {
						return true;
					}
					if (filteredAdEvents.includes(eventName)) {
						return true;
					}
				}
				return false;
			};
		var inAdSourceFilteredList = function inAdSourceFilteredList (adSourceId, filteredAdSourcesId) {
				if (!filteredAdSourcesId) {
					return false;
				}
				if (filteredAdSourcesId.length < 1) {
					return false;
				}
				if (adSourceId) {
					if (filteredAdSourcesId.includes("*")) {
						return true;
					}
					adSourceId = adSourceId.split("|");
					if (adSourceId.some(function (id) {
						return filteredAdSourcesId.includes(id);
					})) {
						return true;
					}
				}
				return false;
			};
		var filteredAdSourcesId = ["633ac552dac52946fe6cda24---"];
		var filteredAdEvents = ["bid", "initAd", "AdLoaded", "startAd", "impression", "stop", "error", "vasterror", "noError", "mediaPlayError", "mediaTimeout", "vpaidGeneralError", "vpaidLoadError", "vpaidLoadTimeout", "vpaidInitAdError", "vpaidInitAdTimeout", "vpaidStartAdError", "vpaidStartAdTimeout", "vpaidPlayError", "mediaJsonError"];
		var filteredPlayerEvents = [];
		var testMode = false;
		var sessId = Date.now().toString();
		p.on("AdEvent", function (event, asid, data) {
			if (inAdSourceFilteredList(asid, filteredAdSourcesId) && inEventFilteredList(event, filteredAdEvents)) {
				sendEvent(event, encodeURIComponent(asid), {
					event,
					data
				}, testMode);
			}
		});
		if (window.location.pathname.indexOf('community-news') > 0) {
			a.ref1 += "&AV_CDIM17=TAR1";
		}
} catch (reason) {(console.error || console.log)(reason);}
        },
        getAttr: function() {
            try {
if (a.scriptId) {
  var s = this.findScript();

  if (s) {
    for (var i = 0, t = s.attributes; i < s.attributes.length; i++) {
      if (t[i].nodeName && t[i].nodeName.indexOf("data-") == 0) {
        var n = t[i]
          .nodeName
          .replace(/^data-/, "")
          .replace(/[-_]+?(\w)/g, function (_, letter) {
            return letter.toUpperCase();
          })
          .split(".");

        var lastProp = n.pop();

        try {
          var innerConfig = n.reduce(function (obj, prop) {
            if (typeof obj[prop] !== "object") {
              obj[prop] = {};
            }

            return obj[prop];
          }, a);
          innerConfig[lastProp] = safeJsonParse(t[i].nodeValue);
        } catch(e) {}
      }
    }

    if (s.src) {
      var p = s.src.indexOf("?");

      if (p > 10) {
        var r = (s.src.substring(p + 1, s.src.length));
        var existingRef1 = a.ref1 || "";
        if (r && existingRef1.indexOf(r) === -1) {
            a.ref1 = existingRef1 + "&" + r;
        }
      }
    }
  }
}
} catch (reason) {(console.error || console.log)(reason);}
        },
        start: function() {
            try {
var api = (this.apiInfo ? this.apiInfo : getApiInfo("avPlayer", this.win)).api;
var b = new api(a);
this.p = b;

if (this.pbjs && this.pbjs.preparePlayer) {
  this.pbjs.preparePlayer(b, st);
}

if (a.playerApi && typeof this.win[a.playerApi] === "function" ) {
  try {
    this.win[a.playerApi](a, b, st);
  } catch(ex) {}
}

if (a.templateType != 0) {
  b.startTemplate(a.positionDiv.parentNode);
}

b.play(a);
this.postStart(b);
} catch (reason) {(console.error || console.log)(reason);}
        },
        preRun: function() {
            try {
		a.posTimeout = 80;
		var test = Math.random();
		a.ref1 = a.ref1 || "";
		if (test > 0.1) {
			a.ref1 = a.ref1 + "&AV_CDIM16=ABT1";
		}
		a.completeonadstopped = true;
} catch (reason) {(console.error || console.log)(reason);}
        },
        run: function() {
            try {
this.getAttr();
this.config = a = config = this.getConfig();
this.a = a;
this.adConfig = adConfig = (isVideoInstream(config) ? config.adConfig : config) || {};
this.getAttr();

function generateUuid() {
  return "xxxxxxxxxxxxxxxxxxxxxxxx".replace(/[x]/g, function(c) {
    var r = Math.random() * 16|0;
    var v = c == "x" ? r : (r&0x3|0x8);

    return v.toString(16);
  });
}

if (a.isSessionIdEnabled) {
  a.sessionID = generateUuid();
}

this.a = a;

if (window.av_s2sbid) {
  adConfig.s2sbid = window.av_s2sbid;
  window.av_s2sbid = undefined;
}

this.preRun();
this.findWin();

if (!this.doc.body) {
  this.doc.addEventListener("DOMContentLoaded", function() {
    st.run();
  });

  if (this.bodyRetry > 0) {
    setTimeout(function() {
      st.run();
    }, 250);

    this.domRetry--;
  }

  return;
}

if (a.configApi && typeof this.win[a.configApi] === "function") {
  try {
    this.win[a.configApi](a);
  } catch (ex) {}
}

if (this.unique() && !this.loaded) {
  this.loaded = true;
  if (!this.isDestroyed) {
    this.track("playerLoaded");
  }
  this.retryCnt = 0;
  this.timeout = a.posTimeout || 40;
  this.pbjs = window.aniviewRenderer && window.aniviewRenderer.units && window.aniviewRenderer.units[a.scriptId];

  if (!this.pbjs) {
    this.pbjs = window.aniviewRenderer;
  }

  if (this.pbjs && this.pbjs.prepareConfig) {
    this.pbjs.prepareConfig(a, st);
  }

  if (a.checkTargeting) {
    this.checkTargeting(this.prePosition, this.targetingFail);
  } else {
    this.prePosition();
  }
}
} catch (reason) {(console.error || console.log)(reason);}
        },
        postLoadAsync: function(callback) {
            try {
var hasTopAccess = false;

try {
  if (top.location.href) {
    hasTopAccess = true;
  }
} catch (err) {}

if (!hasTopAccess || !config.waitForScroll && !config.waitBeforeInit) {
  callback();

  return;
}

var delayed;

var cleanup = function() {
  top.removeEventListener("scroll", scrollListener);

  if (delayed) {
    clearTimeout(delayed);
  }
};

var finish = function() {
  cleanup();
  callback();
};

var startTimer = function() {
  if (typeof config.waitBeforeInit === "number" && config.waitBeforeInit > 0) {
    delayed = setTimeout(finish, config.waitBeforeInit);
  }
};

var scrollPixels = typeof config.scrollPixels === "number" ? config.scrollPixels : 5;
var checkPosition = function() {
  return top.scrollY > scrollPixels;
};

var scrollListener = function() {
  if (checkPosition()) {
    finish();
  }
};

if (!config.waitForScroll) {
  startTimer();
} else {
  if (checkPosition()) {
    finish();
  } else {
    top.addEventListener("scroll", scrollListener);

    startTimer();
  }
}
} catch (reason) {(console.error || console.log)(reason);}
        },
        findScript: function() {
            try {
if (!this.scriptEl && a.scriptref) {
    var el = document.querySelector('[data-scriptref="' + a.scriptref + '"]');
    if (el) {
        this.scriptEl = el;
    }
}

if (!this.scriptEl) {
  a.scriptApi = a.scriptApi || window["av_scriptApi_" + a.scriptId];

  if (a.scriptApi && typeof a.scriptApi === "function") {
    var scriptEl = a.scriptApi();

    if (scriptEl != null) {
      this.scriptEl = scriptEl;
    }
  }
}

if (!this.scriptEl) {
  this.scriptEl = document.getElementById(a.scriptId) || document.currentScript;
}

return this.scriptEl;
} catch (reason) {(console.error || console.log)(reason);}
        },
        destroy: function() {
            try {
if (st.isDestroyed) {
  return;
}
st.loaded = false;
st.isDestroyed = true;
this.p.close();
} catch (reason) {(console.error || console.log)(reason);}
        },
        domRetry: 20
    };
    if (a.playerDelay > 0) {
        setTimeout(function() {
            st.run();
        }, a.playerDelay * 1000);
    } else {
       st.run();
    }
})(window);

