window.adthrive.core = {"partners":[{"secondary":false,"cpm":[{"name":"default","type":"percent","value":0.975}],"s2s":[{"s2s_value":0,"endpoint_value":null,"endpoint":null,"media_type":"display"},{"s2s_value":0,"endpoint_value":null,"endpoint":null,"media_type":"video"}],"bidder_name":"33across","enabled":true},{"secondary":false,"cpm":[{"name":"default","type":"percent","value":0.98},{"name":"pmp","type":"percent","value":1},{"name":"stickyOutstream","type":"percent","value":0.7},{"name":"instream","type":"percent","value":1}],"s2s":[{"s2s_value":0,"endpoint_value":null,"endpoint":null,"media_type":"display"},{"s2s_value":0,"endpoint_value":null,"endpoint":null,"media_type":"video"}],"bidder_name":"a_amazon","enabled":true},{"secondary":false,"cpm":[{"name":"default","type":"percent","value":0.35},{"name":"stickyOutstream","type":"percent","value":0.6},{"name":"instream","type":"percent","value":1}],"s2s":[{"s2s_value":0,"endpoint_value":null,"endpoint":null,"media_type":"display"},{"s2s_value":0,"endpoint_value":null,"endpoint":null,"media_type":"video"}],"bidder_name":"a_appnexus","enabled":true},{"secondary":false,"cpm":[{"name":"default","type":"percent","value":1},{"name":"instream","type":"percent","value":1}],"s2s":[{"s2s_value":0,"endpoint_value":null,"endpoint":null,"media_type":"display"},{"s2s_value":0,"endpoint_value":null,"endpoint":null,"media_type":"video"}],"bidder_name":"a_blis","enabled":true},{"secondary":false,"cpm":[{"name":"default","type":"percent","value":1},{"name":"instream","type":"percent","value":1}],"s2s":[{"s2s_value":0,"endpoint_value":null,"endpoint":null,"media_type":"display"},{"s2s_value":0,"endpoint_value":null,"endpoint":null,"media_type":"video"}],"bidder_name":"a_cadent","enabled":true},{"secondary":false,"cpm":[{"name":"default","type":"percent","value":0.94},{"name":"stickyOutstream","type":"percent","value":0.61},{"name":"instream","type":"percent","value":0.995}],"s2s":[{"s2s_value":0,"endpoint_value":null,"endpoint":null,"media_type":"display"},{"s2s_value":0,"endpoint_value":null,"endpoint":null,"media_type":"video"}],"bidder_name":"a_gumgum","enabled":true},{"secondary":false,"cpm":[{"name":"default","type":"percent","value":0.93},{"name":"stickyOutstream","type":"percent","value":0.45},{"name":"instream","type":"percent","value":1}],"s2s":[{"s2s_value":0,"endpoint_value":null,"endpoint":null,"media_type":"display"},{"s2s_value":0,"endpoint_value":null,"endpoint":null,"media_type":"video"}],"bidder_name":"a_ix","enabled":true},{"secondary":false,"cpm":[{"name":"default","type":"percent","value":0.82}],"s2s":[{"s2s_value":0,"endpoint_value":null,"endpoint":null,"media_type":"display"},{"s2s_value":0,"endpoint_value":null,"endpoint":null,"media_type":"video"}],"bidder_name":"a_ogury","enabled":true},{"secondary":false,"cpm":[{"name":"default","type":"percent","value":0.95},{"name":"stickyOutstream","type":"percent","value":0.4},{"name":"instream","type":"percent","value":1}],"s2s":[{"s2s_value":0,"endpoint_value":null,"endpoint":null,"media_type":"display"},{"s2s_value":0,"endpoint_value":null,"endpoint":null,"media_type":"video"}],"bidder_name":"a_openx","enabled":true},{"secondary":false,"cpm":[{"name":"default","type":"percent","value":0.98},{"name":"stickyOutstream","type":"percent","value":0.4},{"name":"instream","type":"percent","value":1}],"s2s":[{"s2s_value":0,"endpoint_value":null,"endpoint":null,"media_type":"display"},{"s2s_value":0,"endpoint_value":null,"endpoint":null,"media_type":"video"}],"bidder_name":"a_pubmatic","enabled":true},{"secondary":false,"cpm":[{"name":"default","type":"percent","value":0.95},{"name":"stickyOutstream","type":"percent","value":0.45},{"name":"instream","type":"percent","value":1}],"s2s":[{"s2s_value":0,"endpoint_value":null,"endpoint":null,"media_type":"display"},{"s2s_value":0,"endpoint_value":null,"endpoint":null,"media_type":"video"}],"bidder_name":"a_rubicon","enabled":true},{"secondary":false,"cpm":[{"name":"default","type":"percent","value":0.94}],"s2s":[{"s2s_value":0,"endpoint_value":null,"endpoint":null,"media_type":"display"},{"s2s_value":0,"endpoint_value":null,"endpoint":null,"media_type":"video"}],"bidder_name":"a_seedtag","enabled":true},{"secondary":false,"cpm":[{"name":"default","type":"percent","value":0.985},{"name":"stickyOutstream","type":"percent","value":0.45},{"name":"instream","type":"percent","value":1}],"s2s":[{"s2s_value":0,"endpoint_value":null,"endpoint":null,"media_type":"display"},{"s2s_value":0,"endpoint_value":null,"endpoint":null,"media_type":"video"}],"bidder_name":"a_sharethrough","enabled":true},{"secondary":false,"cpm":[{"name":"default","type":"percent","value":0.95},{"name":"stickyOutstream","type":"percent","value":0.4},{"name":"instream","type":"percent","value":1}],"s2s":[{"s2s_value":0,"endpoint_value":null,"endpoint":null,"media_type":"display"},{"s2s_value":0,"endpoint_value":null,"endpoint":null,"media_type":"video"}],"bidder_name":"a_triplelift","enabled":true},{"secondary":false,"cpm":[{"name":"default","type":"percent","value":0.96},{"name":"stickyOutstream","type":"percent","value":0.45},{"name":"instream","type":"percent","value":1}],"s2s":[{"s2s_value":0,"endpoint_value":null,"endpoint":null,"media_type":"display"},{"s2s_value":0,"endpoint_value":null,"endpoint":null,"media_type":"video"}],"bidder_name":"a_unruly","enabled":true},{"secondary":false,"cpm":[{"name":"default","type":"percent","value":1},{"name":"stickyOutstream","type":"percent","value":0.3},{"name":"instream","type":"percent","value":1}],"s2s":[{"s2s_value":0,"endpoint_value":null,"endpoint":null,"media_type":"display"},{"s2s_value":0,"endpoint_value":null,"endpoint":null,"media_type":"video"}],"bidder_name":"a_verizon","enabled":true},{"secondary":false,"cpm":[{"name":"default","type":"percent","value":1},{"name":"stickyOutstream","type":"percent","value":0.4},{"name":"instream","type":"percent","value":0.985}],"s2s":[{"s2s_value":0,"endpoint_value":null,"endpoint":null,"media_type":"display"},{"s2s_value":0,"endpoint_value":null,"endpoint":null,"media_type":"video"}],"bidder_name":"a_yieldmo","enabled":true},{"secondary":false,"cpm":[{"name":"default","type":"percent","value":0.6},{"name":"stickyOutstream","type":"percent","value":0.59},{"name":"instream","type":"percent","value":0.9}],"s2s":[{"s2s_value":0,"endpoint_value":null,"endpoint":null,"media_type":"display"},{"s2s_value":0,"endpoint_value":null,"endpoint":null,"media_type":"video"}],"bidder_name":"adform","enabled":true},{"secondary":false,"cpm":[{"name":"default","type":"percent","value":0.01},{"name":"instream","type":"percent","value":0.01}],"s2s":[{"s2s_value":0,"endpoint_value":null,"endpoint":null,"media_type":"display"},{"s2s_value":0,"endpoint_value":null,"endpoint":null,"media_type":"video"}],"bidder_name":"aidem_ss","enabled":true},{"secondary":false,"cpm":[{"name":"default","type":"percent","value":1},{"name":"stickyOutstream","type":"percent","value":1},{"name":"instream","type":"percent","value":1}],"s2s":[{"s2s_value":0,"endpoint_value":null,"endpoint":null,"media_type":"display"},{"s2s_value":0,"endpoint_value":null,"endpoint":null,"media_type":"video"}],"bidder_name":"amx","enabled":true},{"secondary":false,"cpm":[{"name":"default","type":"percent","value":0.99},{"name":"outstream","type":"percent","value":0.99},{"name":"stickyOutstream","type":"percent","value":0.72},{"name":"instream","type":"percent","value":1}],"s2s":[{"s2s_value":0,"endpoint_value":null,"endpoint":null,"media_type":"display"},{"s2s_value":0,"endpoint_value":null,"endpoint":null,"media_type":"video"}],"bidder_name":"appnexus","enabled":true},{"secondary":false,"cpm":[{"name":"instream","type":"percent","value":1}],"s2s":[{"s2s_value":0,"endpoint_value":null,"endpoint":null,"media_type":"display"},{"s2s_value":0,"endpoint_value":null,"endpoint":null,"media_type":"video"}],"bidder_name":"connatix","enabled":true},{"secondary":false,"cpm":[{"name":"default","type":"percent","value":0.99}],"s2s":[{"s2s_value":0,"endpoint_value":null,"endpoint":null,"media_type":"display"},{"s2s_value":0,"endpoint_value":null,"endpoint":null,"media_type":"video"}],"bidder_name":"conversant","enabled":true},{"secondary":false,"cpm":[{"name":"default","type":"percent","value":0.99},{"name":"stickyOutstream","type":"percent","value":0.9},{"name":"instream","type":"percent","value":0.97}],"s2s":[{"s2s_value":0,"endpoint_value":null,"endpoint":null,"media_type":"display"},{"s2s_value":0,"endpoint_value":null,"endpoint":null,"media_type":"video"}],"bidder_name":"crit_ss","enabled":true},{"secondary":false,"cpm":[{"name":"default","type":"percent","value":1},{"name":"stickyOutstream","type":"percent","value":0.9},{"name":"instream","type":"percent","value":1}],"s2s":[{"s2s_value":0,"endpoint_value":null,"endpoint":null,"media_type":"display"},{"s2s_value":0,"endpoint_value":null,"endpoint":null,"media_type":"video"}],"bidder_name":"criteo","enabled":true},{"secondary":false,"cpm":[{"name":"default","type":"percent","value":0.99},{"name":"pmp","type":"percent","value":1}],"s2s":[{"s2s_value":0,"endpoint_value":null,"endpoint":null,"media_type":"display"},{"s2s_value":0,"endpoint_value":null,"endpoint":null,"media_type":"video"}],"bidder_name":"flipp","enabled":true},{"secondary":false,"cpm":[{"name":"default","type":"percent","value":0.5},{"name":"pmp","type":"percent","value":1,"deals":[{"name":"G-TRUSTX-b827d08da2714822","type":"percent","value":1}]},{"name":"stickyOutstream","type":"percent","value":1}],"s2s":[{"s2s_value":0,"endpoint_value":null,"endpoint":null,"media_type":"display"},{"s2s_value":0,"endpoint_value":null,"endpoint":null,"media_type":"video"}],"bidder_name":"grid","enabled":true},{"secondary":false,"cpm":[{"name":"default","type":"percent","value":0.6},{"name":"pmp","type":"percent","value":1,"deals":[{"name":"g-trustx-69dcdccd456a4d4a","type":"percent","value":1}]}],"s2s":[{"s2s_value":0,"endpoint_value":null,"endpoint":null,"media_type":"display"},{"s2s_value":0,"endpoint_value":null,"endpoint":null,"media_type":"video"}],"bidder_name":"gridvid","enabled":true},{"secondary":false,"cpm":[{"name":"default","type":"percent","value":0.96},{"name":"instream","type":"percent","value":1}],"s2s":[{"s2s_value":0,"endpoint_value":null,"endpoint":null,"media_type":"display"},{"s2s_value":0,"endpoint_value":null,"endpoint":null,"media_type":"video"}],"bidder_name":"gumgum","enabled":true},{"secondary":false,"cpm":[{"name":"default","type":"percent","value":0.01},{"name":"stickyOutstream","type":"percent","value":0.01},{"name":"instream","type":"percent","value":0.01}],"s2s":[{"s2s_value":0,"endpoint_value":null,"endpoint":null,"media_type":"display"},{"s2s_value":0,"endpoint_value":null,"endpoint":null,"media_type":"video"}],"bidder_name":"improve_ss","enabled":false},{"secondary":false,"cpm":[{"name":"default","type":"percent","value":0.995},{"name":"outstream","type":"percent","value":0.995},{"name":"pmp","type":"percent","value":1,"deals":[{"name":"M1IX203202022021992","type":"flat","value":0.5},{"name":"M1IX203202022021991","type":"flat","value":0.5},{"name":"203209212021995","type":"flat","value":1},{"name":"203209212021996","type":"flat","value":1},{"name":"203210122021995","type":"flat","value":1},{"name":"203210122021996","type":"flat","value":1},{"name":"M1IX203212162021995","type":"flat","value":1},{"name":"M1IX203212162021996","type":"flat","value":1},{"name":"9311192021991","type":"percent","value":0.97},{"name":"9311192021992","type":"percent","value":0.97},{"name":"146002182022991","type":"flat","value":1},{"name":"146002182022992","type":"flat","value":1},{"name":"146002182022993","type":"flat","value":1},{"name":"146002182022994","type":"flat","value":1},{"name":"146002182022995","type":"flat","value":1},{"name":"2251041120229923","type":"percent","value":0.97},{"name":"2251041120229922","type":"percent","value":0.97},{"name":"2251041120229921","type":"percent","value":0.97},{"name":"2251041120229920","type":"percent","value":0.97},{"name":"2251041120229919","type":"percent","value":0.97},{"name":"2251041120229918","type":"percent","value":0.97},{"name":"2251041120229917","type":"percent","value":0.97},{"name":"2251041120229916","type":"percent","value":0.97},{"name":"2251041120229915","type":"percent","value":0.97},{"name":"2251041120229914","type":"percent","value":0.97},{"name":"2251041120229913","type":"percent","value":0.97},{"name":"2251041120229912","type":"percent","value":0.97},{"name":"2251041120229911","type":"percent","value":0.97},{"name":"2251041120229910","type":"percent","value":0.97},{"name":"225104112022999","type":"percent","value":0.97},{"name":"225104112022998","type":"percent","value":0.97},{"name":"225104112022997","type":"percent","value":0.97},{"name":"225104112022996","type":"percent","value":0.97},{"name":"225104112022995","type":"percent","value":0.97},{"name":"225104112022994","type":"percent","value":0.97},{"name":"225104112022993","type":"percent","value":0.97},{"name":"225104112022992","type":"percent","value":0.97},{"name":"225104112022991","type":"percent","value":0.97},{"name":"400104282022991","type":"percent","value":0.97},{"name":"335305022022991","type":"flat","value":1},{"name":"335305022022992","type":"flat","value":1},{"name":"905172022991","type":"flat","value":0.5},{"name":"140408052022991","type":"flat","value":1},{"name":"140408052022992","type":"flat","value":1},{"name":"140408052022993","type":"flat","value":1},{"name":"140408052022994","type":"flat","value":1},{"name":"51210172022991","type":"flat","value":1},{"name":"51210172022992","type":"flat","value":1},{"name":"140410122022991","type":"flat","value":1},{"name":"140410122022992","type":"flat","value":1},{"name":"51211082022991","type":"flat","value":1},{"name":"270111082022991","type":"flat","value":1.5},{"name":"270111082022992","type":"flat","value":1.5},{"name":"270111082022993","type":"flat","value":1},{"name":"270111082022994","type":"flat","value":1},{"name":"140412152022995","type":"flat","value":1},{"name":"140412152022996","type":"flat","value":1},{"name":"140412152022997","type":"flat","value":1},{"name":"515112212022991","type":"flat","value":1.5},{"name":"515112212022992","type":"flat","value":1.5},{"name":"683401262023991","type":"percent","value":0.97},{"name":"683401262023992","type":"percent","value":0.97},{"name":"1404013123991","type":"flat","value":1},{"name":"1404013123992","type":"flat","value":1},{"name":"1404013123993","type":"flat","value":1},{"name":"1404013123994","type":"flat","value":1},{"name":"140402282023991","type":"flat","value":1},{"name":"121503022023991","type":"flat","value":1.5},{"name":"121503022023992","type":"flat","value":1.5},{"name":"9063003102023991","type":"flat","value":1},{"name":"9063003102023992","type":"flat","value":1},{"name":"9063003102023993","type":"flat","value":1},{"name":"9063003102023994","type":"flat","value":1},{"name":"140403242023991","type":"flat","value":1},{"name":"140403242023992","type":"flat","value":1},{"name":"140403242023993","type":"flat","value":1},{"name":"15105022023993","type":"flat","value":1},{"name":"15105022023994","type":"flat","value":1},{"name":"15105022023995","type":"flat","value":1},{"name":"15105022023996","type":"flat","value":1},{"name":"20706162023991","type":"flat","value":1},{"name":"20706162023992","type":"flat","value":1},{"name":"72206142023991","type":"flat","value":1.5},{"name":"72206142023992","type":"flat","value":1.5},{"name":"23107122023991","type":"flat","value":1},{"name":"23107122023992","type":"flat","value":1},{"name":"23107122023993","type":"flat","value":1},{"name":"23107122023994","type":"flat","value":1},{"name":"23107122023995","type":"flat","value":1},{"name":"23107122023996","type":"flat","value":1},{"name":"23107122023997","type":"flat","value":1},{"name":"23107122023998","type":"flat","value":1},{"name":"23107122023999","type":"flat","value":1},{"name":"231071220239910","type":"flat","value":1},{"name":"231071220239911","type":"flat","value":1},{"name":"231071220239912","type":"flat","value":1},{"name":"231071220239913","type":"flat","value":1},{"name":"231071220239914","type":"flat","value":1},{"name":"231071220239915","type":"flat","value":1},{"name":"231071220239916","type":"flat","value":1},{"name":"231071220239917","type":"flat","value":1},{"name":"231071220239918","type":"flat","value":1},{"name":"231071220239919","type":"flat","value":1},{"name":"231071220239920","type":"flat","value":1},{"name":"231071220239921","type":"flat","value":1},{"name":"231071220239922","type":"flat","value":1},{"name":"303208092023991","type":"flat","value":0.28},{"name":"303208092023992","type":"flat","value":0.28},{"name":"303208092023993","type":"flat","value":0.28},{"name":"303208092023994","type":"flat","value":0.28},{"name":"303208092023995","type":"flat","value":0.28},{"name":"320809082023991","type":"flat","value":1},{"name":"320809082023992","type":"flat","value":1},{"name":"320809082023993","type":"flat","value":1},{"name":"320809082023994","type":"flat","value":1},{"name":"320809082023995","type":"flat","value":1},{"name":"320809082023996","type":"flat","value":1},{"name":"320809082023997","type":"flat","value":1.5},{"name":"320809082023998","type":"flat","value":1.5},{"name":"536509082023991","type":"flat","value":1},{"name":"536509082023992","type":"flat","value":1},{"name":"536509082023993","type":"flat","value":1},{"name":"536509082023994","type":"flat","value":1},{"name":"536509082023995","type":"flat","value":1},{"name":"536509082023996","type":"flat","value":1},{"name":"20709262023991","type":"flat","value":1},{"name":"20709262023992","type":"flat","value":1},{"name":"110010052023991","type":"flat","value":4.97},{"name":"110010052023992","type":"flat","value":4.97},{"name":"152910052023991","type":"flat","value":1},{"name":"152910052023992","type":"flat","value":1},{"name":"515110202023991","type":"flat","value":1.5},{"name":"515110202023992","type":"flat","value":1.5},{"name":"15110132023991","type":"flat","value":1},{"name":"15110132023992","type":"flat","value":1},{"name":"15110172023992","type":"flat","value":1},{"name":"15110172023991","type":"flat","value":1},{"name":"20710262023995","type":"flat","value":1},{"name":"20710262023996","type":"flat","value":1},{"name":"20710262023997","type":"flat","value":1},{"name":"20710262023998","type":"flat","value":1},{"name":"20710262023999","type":"flat","value":1},{"name":"20710232023910","type":"flat","value":1},{"name":"20710262023911","type":"flat","value":1},{"name":"20710262023912","type":"flat","value":1},{"name":"20710262023913","type":"flat","value":1},{"name":"20710262023914","type":"flat","value":1},{"name":"20710262023915","type":"flat","value":1},{"name":"20710262023916","type":"flat","value":1},{"name":"20710262023917","type":"flat","value":1},{"name":"20710262023918","type":"flat","value":1},{"name":"20710262023919","type":"flat","value":1},{"name":"20710262023920","type":"flat","value":1},{"name":"110010262023991","type":"flat","value":4.97},{"name":"110010262023992","type":"flat","value":4.97},{"name":"110010262023993","type":"flat","value":1.47},{"name":"110010272023994","type":"flat","value":1.47},{"name":"110010272023995","type":"flat","value":1.47},{"name":"212210182023991","type":"percent","value":0.9},{"name":"146006052023995","type":"percent","value":0.9},{"name":"146006052023992","type":"percent","value":0.9},{"name":"146006052023991","type":"percent","value":0.9},{"name":"146006052023993","type":"percent","value":0.9},{"name":"483412152023991","type":"flat","value":1},{"name":"483412152023992","type":"flat","value":1},{"name":"9901242024992","type":"flat","value":4.24},{"name":"9901242024993","type":"flat","value":3.24},{"name":"9901242024994","type":"flat","value":4.24},{"name":"193102232024991","type":"flat","value":0.8},{"name":"193102223024992","type":"flat","value":0.8},{"name":"20701262024995","type":"flat","value":1},{"name":"20701262024996","type":"flat","value":1},{"name":"20701262024997","type":"flat","value":1},{"name":"20701262024998","type":"flat","value":1},{"name":"264202292024992","type":"flat","value":1},{"name":"815104172024991","type":"flat","value":1},{"name":"815104172024992","type":"flat","value":1},{"name":"815104172024993","type":"flat","value":1},{"name":"815104172024994","type":"flat","value":1},{"name":"815104172024995","type":"flat","value":1},{"name":"815104172024996","type":"flat","value":1},{"name":"121503272024991","type":"flat","value":1},{"name":"121503272024992","type":"flat","value":1},{"name":"121503272024993","type":"flat","value":1},{"name":"121503272024994","type":"flat","value":1},{"name":"BB515107222024992","type":"flat","value":3.6},{"name":"BB515107222024991","type":"flat","value":3.6},{"name":"502908152024991","type":"percent","value":0.95},{"name":"502908152024992","type":"percent","value":0.95},{"name":"502908152024993","type":"percent","value":0.95},{"name":"502908152024994","type":"percent","value":0.95},{"name":"PAN457408292024991","type":"flat","value":2.6},{"name":"PAN457408292024992","type":"flat","value":2.6},{"name":"PAN49008292024995","type":"flat","value":2.6},{"name":"PAN49008292024996","type":"flat","value":2.6},{"name":"BB49008292024991","type":"flat","value":2.6},{"name":"BB49008292024993","type":"flat","value":2.6},{"name":"MRL154505152024991","type":"flat","value":3.8},{"name":"MRL154505152024991","type":"percent","value":0.95},{"name":"PAN515108302024991","type":"flat","value":2.6},{"name":"PAN515108302024992","type":"flat","value":2.6},{"name":"BB73109192024991","type":"flat","value":3.6},{"name":"BB73109192024992","type":"flat","value":3.6},{"name":"PAN193110042024991","type":"flat","value":2.6},{"name":"PAN193110042024992","type":"flat","value":2.6},{"name":"BB73110222024991","type":"flat","value":3.6},{"name":"BB73110222024992","type":"flat","value":3.6},{"name":"PAN10010232024991","type":"flat","value":2.6},{"name":"PAN10010232024992","type":"flat","value":2.6},{"name":"PAN10010232024993","type":"flat","value":2.6},{"name":"PAN10010232024994","type":"flat","value":2.6},{"name":"PAN10010232024995","type":"flat","value":2.6},{"name":"PAN10010232024996","type":"flat","value":2.6},{"name":"PAN10010232024997","type":"flat","value":2.6},{"name":"PAN10010232024998","type":"flat","value":2.6},{"name":"PAN57412092024991","type":"flat","value":2.6},{"name":"PAN57412092024992","type":"flat","value":2.6},{"name":"PAN813612192024991","type":"flat","value":2.6},{"name":"PAN813612192024991","type":"percent","value":0.95},{"name":"PAN813612192024992","type":"flat","value":2.6},{"name":"PAN813612192024992","type":"percent","value":0.95},{"name":"PAN9912192024991","type":"flat","value":2.6},{"name":"PAN9912192024991","type":"percent","value":0.95},{"name":"PAN9912192024992","type":"flat","value":2.6},{"name":"PAN9912192024992","type":"percent","value":0.95},{"name":"BB9912192024991","type":"flat","value":3.6},{"name":"BB9912192024991","type":"percent","value":0.95},{"name":"BB9912192024992","type":"flat","value":3.6},{"name":"BB9912192024992","type":"percent","value":0.95},{"name":"6411202024991","type":"percent","value":0.95},{"name":"6411202024992","type":"percent","value":0.95},{"name":"1611202024993","type":"percent","value":0.95},{"name":"1611202024994","type":"percent","value":0.95},{"name":"391601082025991","type":"percent","value":0.95},{"name":"391601082025992","type":"percent","value":0.95},{"name":"391601082025993","type":"percent","value":0.95},{"name":"391601082025994","type":"percent","value":0.95},{"name":"323801102025991","type":"percent","value":0.95},{"name":"323801102025992","type":"percent","value":0.95},{"name":"260301102025991","type":"percent","value":0.95},{"name":"260301092025991","type":"percent","value":0.95},{"name":"260301092025992","type":"percent","value":0.95},{"name":"260301092025993","type":"percent","value":0.95},{"name":"260301092025994","type":"percent","value":0.95},{"name":"504501092025992","type":"percent","value":0.95},{"name":"504501092025991","type":"percent","value":0.95},{"name":"504501092025993","type":"percent","value":0.95},{"name":"504501092025994","type":"percent","value":0.95},{"name":"504501102025991","type":"percent","value":0.95},{"name":"795301152025991","type":"percent","value":0.95},{"name":"795301152025992","type":"percent","value":0.95},{"name":"260301212025991","type":"percent","value":0.95},{"name":"260301212025992","type":"percent","value":0.95},{"name":"260301212025993","type":"percent","value":0.95},{"name":"260301212025994","type":"percent","value":0.95},{"name":"260301212025995","type":"percent","value":0.95},{"name":"504501212025991","type":"percent","value":0.95},{"name":"504501212025992","type":"percent","value":0.95},{"name":"504501212025993","type":"percent","value":0.95},{"name":"504501212025994","type":"percent","value":0.95},{"name":"504501212025995","type":"percent","value":0.95},{"name":"795301232025991","type":"percent","value":0.95},{"name":"795301232025992","type":"percent","value":0.95},{"name":"303207242023993","type":"percent","value":1},{"name":"VDR813602062025991","type":"flat","value":3.6},{"name":"VDR813602062025991","type":"percent","value":0.95},{"name":"825202122025991","type":"percent","value":0.95},{"name":"825202122025992","type":"percent","value":0.95},{"name":"VDR548502192025991","type":"flat","value":3.6},{"name":"VDR548502192025991","type":"percent","value":0.95},{"name":"BB320803262025991","type":"flat","value":3.6},{"name":"BB320803262025992","type":"flat","value":3.6},{"name":"BB515103042025991","type":"flat","value":3.6},{"name":"BB515103042025992","type":"flat","value":3.6},{"name":"PAN515103202025991","type":"flat","value":2.6},{"name":"PAN515103202025992","type":"flat","value":2.6},{"name":"BB9904152025991","type":"flat","value":3.6},{"name":"BB9904152025992","type":"flat","value":3.6},{"name":"BB9904152025993","type":"flat","value":3.6},{"name":"BB9904152025994","type":"flat","value":3.6},{"name":"733304232025991","type":"percent","value":0.9},{"name":"7333304232025992","type":"percent","value":0.9},{"name":"733304232025993","type":"percent","value":0.9},{"name":"733304232025994","type":"percent","value":0.9},{"name":"733304232025995","type":"percent","value":0.9},{"name":"TWV733304232025991","type":"flat","value":3.6},{"name":"TWV733304232025992","type":"flat","value":3.6},{"name":"TWV733304232025993","type":"flat","value":3.6},{"name":"TWV733304232025994","type":"flat","value":3.6},{"name":"TWV733304232025995","type":"flat","value":3.6},{"name":"TWV733304232025996","type":"flat","value":3.6},{"name":"TWV733304232025997","type":"flat","value":3.6},{"name":"825204302025991","type":"percent","value":0.95},{"name":"733305082025991","type":"percent","value":0.9},{"name":"TWV733305082025992","type":"flat","value":3.6},{"name":"TWV733305082025993","type":"flat","value":3.6},{"name":"TWV733305082025994","type":"flat","value":3.6},{"name":"TWV733305082025995","type":"flat","value":3.6},{"name":"TWV733305082025996","type":"flat","value":3.6}]},{"name":"stickyOutstream","type":"percent","value":0.65},{"name":"instream","type":"percent","value":1}],"s2s":[{"s2s_value":0,"endpoint_value":null,"endpoint":null,"media_type":"display"},{"s2s_value":0,"endpoint_value":null,"endpoint":null,"media_type":"video"}],"bidder_name":"ix","enabled":true},{"secondary":false,"cpm":[{"name":"default","type":"percent","value":0.98},{"name":"outstream","type":"percent","value":0.98},{"name":"pmp","type":"percent","value":1,"deals":[{"name":"391601082025991","type":"percent","value":0.95},{"name":"391601082025992","type":"percent","value":0.95},{"name":"391601082025993","type":"percent","value":0.95},{"name":"391601082025994","type":"percent","value":0.95},{"name":"323801102025991","type":"percent","value":0.95},{"name":"323801102025992","type":"percent","value":0.95},{"name":"260301102025991","type":"percent","value":0.95},{"name":"260301092025991","type":"percent","value":0.95},{"name":"260301092025992","type":"percent","value":0.95},{"name":"260301092025993","type":"percent","value":0.95},{"name":"260301092025994","type":"percent","value":0.95},{"name":"504501092025992","type":"percent","value":0.95},{"name":"504501092025991","type":"percent","value":0.95},{"name":"504501092025993","type":"percent","value":0.95},{"name":"504501092025994","type":"percent","value":0.95},{"name":"504501102025991","type":"percent","value":0.95},{"name":"795301152025991","type":"percent","value":0.95},{"name":"795301152025992","type":"percent","value":0.95},{"name":"260301212025991","type":"percent","value":0.95},{"name":"260301212025992","type":"percent","value":0.95},{"name":"260301212025993","type":"percent","value":0.95},{"name":"260301212025994","type":"percent","value":0.95},{"name":"260301212025995","type":"percent","value":0.95},{"name":"504501212025991","type":"percent","value":0.95},{"name":"504501212025992","type":"percent","value":0.95},{"name":"504501212025993","type":"percent","value":0.95},{"name":"504501212025994","type":"percent","value":0.95},{"name":"504501212025995","type":"percent","value":0.95},{"name":"795301232025991","type":"percent","value":0.95},{"name":"795301232025992","type":"percent","value":0.95},{"name":"303207242023993","type":"flat","value":3.6},{"name":"VDR813602062025991","type":"flat","value":3.6},{"name":"VDR813602062025991","type":"percent","value":0.95},{"name":"825202122025991","type":"percent","value":0.95},{"name":"825202122025992","type":"percent","value":0.95},{"name":"VDR548502192025991","type":"flat","value":3.6},{"name":"VDR548502192025991","type":"percent","value":0.95},{"name":"BB320803262025991","type":"flat","value":3.6},{"name":"BB320803262025992","type":"flat","value":3.6},{"name":"BB913503072025991","type":"flat","value":3.6},{"name":"BB913503072025992","type":"flat","value":3.6},{"name":"PAN913503072025993","type":"flat","value":2.6},{"name":"PAN913503072025994","type":"flat","value":2.6},{"name":"BB9904152025991","type":"flat","value":3.6},{"name":"BB9904152025992","type":"flat","value":3.6},{"name":"BB9904152025993","type":"flat","value":3.6},{"name":"BB9904152025994","type":"flat","value":3.6},{"name":"733304232025991","type":"percent","value":0.9},{"name":"7333304232025992","type":"percent","value":0.9},{"name":"733304232025993","type":"percent","value":0.9},{"name":"733304232025994","type":"percent","value":0.9},{"name":"733304232025995","type":"percent","value":0.9},{"name":"TWV733304232025991","type":"flat","value":3.6},{"name":"TWV733304232025992","type":"flat","value":3.6},{"name":"TWV733304232025993","type":"flat","value":3.6},{"name":"TWV733304232025994","type":"flat","value":3.6},{"name":"TWV733304232025995","type":"flat","value":3.6},{"name":"TWV733304232025996","type":"flat","value":3.6},{"name":"TWV733304232025997","type":"flat","value":3.6},{"name":"825204302025991","type":"percent","value":0.95},{"name":"733305082025991","type":"percent","value":0.9},{"name":"TWV733305082025992","type":"flat","value":3.6},{"name":"TWV733305082025993","type":"flat","value":3.6},{"name":"TWV733305082025994","type":"flat","value":3.6},{"name":"TWV733305082025995","type":"flat","value":3.6},{"name":"TWV733305082025996","type":"flat","value":3.6}]},{"name":"stickyOutstream","type":"percent","value":0.65},{"name":"instream","type":"percent","value":1}],"s2s":[{"s2s_value":0,"endpoint_value":null,"endpoint":null,"media_type":"display"},{"s2s_value":0,"endpoint_value":null,"endpoint":null,"media_type":"video"}],"bidder_name":"ix_ss","enabled":true},{"secondary":false,"cpm":[{"name":"default","type":"percent","value":0.987},{"name":"outstream","type":"percent","value":0.987},{"name":"instream","type":"percent","value":1}],"s2s":[{"s2s_value":0,"endpoint_value":null,"endpoint":null,"media_type":"display"},{"s2s_value":0,"endpoint_value":null,"endpoint":null,"media_type":"video"}],"bidder_name":"kargo","enabled":true},{"secondary":false,"cpm":[{"name":"default","type":"percent","value":0.99},{"name":"outstream","type":"percent","value":0.99},{"name":"instream","type":"percent","value":1}],"s2s":[{"s2s_value":0,"endpoint_value":null,"endpoint":null,"media_type":"display"},{"s2s_value":0,"endpoint_value":null,"endpoint":null,"media_type":"video"}],"bidder_name":"krgo_ss","enabled":true},{"secondary":false,"cpm":[{"name":"default","type":"percent","value":1},{"name":"stickyOutstream","type":"percent","value":0.75}],"s2s":[{"s2s_value":0,"endpoint_value":null,"endpoint":null,"media_type":"display"},{"s2s_value":0,"endpoint_value":null,"endpoint":null,"media_type":"video"}],"bidder_name":"nativo","enabled":true},{"secondary":false,"cpm":[{"name":"default","type":"percent","value":0.99},{"name":"stickyOutstream","type":"percent","value":0.75},{"name":"instream","type":"percent","value":0.9}],"s2s":[{"s2s_value":0,"endpoint_value":null,"endpoint":null,"media_type":"display"},{"s2s_value":0,"endpoint_value":null,"endpoint":null,"media_type":"video"}],"bidder_name":"ntvo_ss","enabled":true},{"secondary":false,"cpm":[{"name":"default","type":"percent","value":1}],"s2s":[{"s2s_value":0,"endpoint_value":null,"endpoint":null,"media_type":"display"},{"s2s_value":0,"endpoint_value":null,"endpoint":null,"media_type":"video"}],"bidder_name":"ogury","enabled":true},{"secondary":false,"cpm":[{"name":"default","type":"percent","value":1},{"name":"pmp","type":"percent","value":1,"deals":[{"name":"OX-caf-ypSBrR","type":"flat","value":1}]},{"name":"stickyOutstream","type":"percent","value":0.75},{"name":"instream","type":"percent","value":1}],"s2s":[{"s2s_value":0,"endpoint_value":null,"endpoint":null,"media_type":"display"},{"s2s_value":0,"endpoint_value":null,"endpoint":null,"media_type":"video"}],"bidder_name":"openx","enabled":true},{"secondary":false,"cpm":[{"name":"default","type":"percent","value":0.955},{"name":"pmp","type":"percent","value":1,"deals":[{"name":"OX-caf-ypSBrR","type":"flat","value":1}]},{"name":"stickyOutstream","type":"percent","value":0.6},{"name":"instream","type":"percent","value":0.955}],"s2s":[{"s2s_value":0,"endpoint_value":null,"endpoint":null,"media_type":"display"},{"s2s_value":0,"endpoint_value":null,"endpoint":null,"media_type":"video"}],"bidder_name":"opnx_ss","enabled":true},{"secondary":false,"cpm":[{"name":"default","type":"percent","value":1}],"s2s":[{"s2s_value":0,"endpoint_value":null,"endpoint":null,"media_type":"display"},{"s2s_value":0,"endpoint_value":null,"endpoint":null,"media_type":"video"}],"bidder_name":"ozone","enabled":true},{"secondary":false,"cpm":[{"name":"default","type":"percent","value":1},{"name":"outstream","type":"percent","value":1},{"name":"pmp","type":"percent","value":1,"deals":[{"name":"PM-KINC-9618","type":"flat","value":2},{"name":"PM-JUHD-8401","type":"flat","value":2.6},{"name":"PM-HATE-1895","type":"flat","value":2.6},{"name":"PM-MQZI-5216","type":"flat","value":2.6},{"name":"PM-TTRW-3858","type":"flat","value":2.6},{"name":"PM-PAFH-7243","type":"flat","value":2.6},{"name":"PM-VZSB-1140","type":"flat","value":2.6},{"name":"PM-VAWX-8475","type":"flat","value":1.25},{"name":"PM-KTOG-0862","type":"flat","value":1.25},{"name":"PM-WBUD-7484","type":"percent","value":0.95},{"name":"PM-RDZV-6197","type":"percent","value":0.95},{"name":"PM-PZJT-8450","type":"percent","value":0.95},{"name":"PM-KHSU-8994","type":"percent","value":0.95},{"name":"PM-KQDM-8416","type":"percent","value":0.85},{"name":"PM-QBFB-1491","type":"percent","value":0.85},{"name":"PM-VPHR-7435","type":"percent","value":0.85},{"name":"PM-SCOD-9158","type":"percent","value":0.85},{"name":"PM-GFEB-2837","type":"percent","value":0.85},{"name":"PM-ISBW-4350","type":"percent","value":0.85},{"name":"PM-SION-2536","type":"percent","value":0.85},{"name":"PM-KZOE-9119","type":"percent","value":0.85},{"name":"PM-CDGX-8332","type":"percent","value":0.85},{"name":"PM-ULDD-8757","type":"percent","value":0.85},{"name":"PM-FCGM-3602","type":"percent","value":0.85},{"name":"PM-GEIE-0271","type":"percent","value":0.85},{"name":"PM-WEYA-7606","type":"percent","value":0.85},{"name":"PM-WFRI-7773","type":"percent","value":0.85},{"name":"PM-XLNY-4568","type":"percent","value":0.85},{"name":"PM-CAJR-3848","type":"percent","value":0.85},{"name":"PM-UGMS-1573","type":"percent","value":0.85},{"name":"PM-UQAP-5062","type":"percent","value":0.85},{"name":"PM-KOWN-6036","type":"percent","value":0.85},{"name":"PM-UICF-0360","type":"percent","value":0.85},{"name":"PM-DBKB-7129","type":"percent","value":0.85},{"name":"PM-RTDT-2662","type":"percent","value":0.85},{"name":"PM-EEXO-4604","type":"percent","value":0.85},{"name":"PM-VSKI-9959","type":"percent","value":0.85},{"name":"PM-DDIS-7631","type":"percent","value":0.85},{"name":"PM-BDJP-1583","type":"percent","value":0.85},{"name":"PM-HIDA-3239","type":"percent","value":0.85},{"name":"PM-BSAO-7238","type":"percent","value":0.85},{"name":"PM-VVQG-2371","type":"percent","value":0.85},{"name":"PM-SUSL-6647","type":"percent","value":0.85},{"name":"PM-KZUM-4456","type":"percent","value":0.85},{"name":"PM-JAQO-5410","type":"percent","value":0.85},{"name":"PM-ODII-3311","type":"percent","value":0.85},{"name":"PM-GLOA-2282","type":"percent","value":0.85},{"name":"PM-WHVG-2369","type":"percent","value":0.85},{"name":"PM-CYHH-5286","type":"percent","value":0.85},{"name":"PM-GWWP-3609","type":"percent","value":0.85},{"name":"PM-VEIR-0386","type":"percent","value":0.85},{"name":"PM-OKDF-9459","type":"percent","value":0.85},{"name":"PM-IZQR-0692","type":"percent","value":0.85},{"name":"PM-LPUY-3631","type":"percent","value":0.85},{"name":"PM-ALAH-9592","type":"percent","value":0.85},{"name":"PM-SWTT-0936","type":"percent","value":0.85},{"name":"PM-WOMQ-9438","type":"percent","value":0.85},{"name":"PM-SQYG-3496","type":"percent","value":0.85},{"name":"PM-NIUT-2026","type":"percent","value":0.85},{"name":"PM-FXFR-1947","type":"percent","value":0.85},{"name":"PM-IHXN-5498","type":"percent","value":0.85},{"name":"PM-UJXC-9054","type":"percent","value":0.85},{"name":"PM-JYFD-2663","type":"percent","value":0.85},{"name":"PM-TIYC-8006","type":"percent","value":0.85},{"name":"PM-PCHI-7693","type":"percent","value":0.85},{"name":"PM-TITY-8788","type":"percent","value":0.85},{"name":"PM-YWHX-0933","type":"percent","value":0.85},{"name":"PM-URCT-6163","type":"percent","value":0.85},{"name":"PM-UVVF-2116","type":"percent","value":0.85},{"name":"PM-DVAF-8245","type":"percent","value":0.85}]},{"name":"stickyOutstream","type":"percent","value":0.8},{"name":"instream","type":"percent","value":1}],"s2s":[{"s2s_value":0,"endpoint_value":null,"endpoint":null,"media_type":"display"},{"s2s_value":0,"endpoint_value":null,"endpoint":null,"media_type":"video"}],"bidder_name":"pubm_ss","enabled":true},{"secondary":false,"cpm":[{"name":"default","type":"percent","value":1},{"name":"outstream","type":"percent","value":1},{"name":"pmp","type":"percent","value":1,"deals":[{"name":"PM-KINC-9618","type":"flat","value":2},{"name":"PM-VAWX-8475","type":"flat","value":1.25},{"name":"PM-KTOG-0862","type":"flat","value":1.25},{"name":"PM-JUHD-8401","type":"flat","value":2.6},{"name":"PM-HATE-1895","type":"flat","value":2.6},{"name":"PM-MQZI-5216","type":"flat","value":2.6},{"name":"PM-TTRW-3858","type":"flat","value":2.6},{"name":"PM-PAFH-7243","type":"flat","value":2.6},{"name":"PM-VZSB-1140","type":"flat","value":2.6},{"name":"PM-WBUD-7484","type":"percent","value":0.95},{"name":"PM-RDZV-6197","type":"percent","value":0.95},{"name":"PM-PZJT-8450","type":"percent","value":0.95},{"name":"PM-KHSU-8994","type":"percent","value":0.95},{"name":"PM-KQDM-8416","type":"percent","value":0.85},{"name":"PM-QBFB-1491","type":"percent","value":0.85},{"name":"PM-VPHR-7435","type":"percent","value":0.85},{"name":"PM-SCOD-9158","type":"percent","value":0.85},{"name":"PM-GFEB-2837","type":"percent","value":0.85},{"name":"PM-ISBW-4350","type":"percent","value":0.85},{"name":"PM-SION-2536","type":"percent","value":0.85},{"name":"PM-KZOE-9119","type":"percent","value":0.85},{"name":"PM-CDGX-8332","type":"percent","value":0.85},{"name":"PM-ULDD-8757","type":"percent","value":0.85},{"name":"PM-FCGM-3602","type":"percent","value":0.85},{"name":"PM-GEIE-0271","type":"percent","value":0.85},{"name":"PM-WEYA-7606","type":"percent","value":0.85},{"name":"PM-WFRI-7773","type":"percent","value":0.85},{"name":"PM-XLNY-4568","type":"percent","value":0.85},{"name":"PM-CAJR-3848","type":"percent","value":0.85},{"name":"PM-UGMS-1573","type":"percent","value":0.85},{"name":"PM-UQAP-5062","type":"percent","value":0.85},{"name":"PM-KOWN-6036","type":"percent","value":0.85},{"name":"PM-UICF-0360","type":"percent","value":0.85},{"name":"PM-DBKB-7129","type":"percent","value":0.85},{"name":"PM-RTDT-2662","type":"percent","value":0.85},{"name":"PM-EEXO-4604","type":"percent","value":0.85},{"name":"PM-VSKI-9959","type":"percent","value":0.85},{"name":"PM-DDIS-7631","type":"percent","value":0.85},{"name":"PM-BDJP-1583","type":"percent","value":0.85},{"name":"PM-HIDA-3239","type":"percent","value":0.85},{"name":"PM-BSAO-7238","type":"percent","value":0.85},{"name":"PM-VVQG-2371","type":"percent","value":0.85},{"name":"PM-SUSL-6647","type":"percent","value":0.85},{"name":"PM-KZUM-4456","type":"percent","value":0.85},{"name":"PM-JAQO-5410","type":"percent","value":0.85},{"name":"PM-ODII-3311","type":"percent","value":0.85},{"name":"PM-GLOA-2282","type":"percent","value":0.85},{"name":"PM-WHVG-2369","type":"percent","value":0.85},{"name":"PM-CYHH-5286","type":"percent","value":0.85},{"name":"PM-GWWP-3609","type":"percent","value":0.85},{"name":"PM-VEIR-0386","type":"percent","value":0.85},{"name":"PM-OKDF-9459","type":"percent","value":0.85},{"name":"PM-IZQR-0692","type":"percent","value":0.85},{"name":"PM-LPUY-3631","type":"percent","value":0.85},{"name":"PM-ALAH-9592","type":"percent","value":0.85},{"name":"PM-SWTT-0936","type":"percent","value":0.85},{"name":"PM-WOMQ-9438","type":"percent","value":0.85},{"name":"PM-SQYG-3496","type":"percent","value":0.85},{"name":"PM-NIUT-2026","type":"percent","value":0.85},{"name":"PM-FXFR-1947","type":"percent","value":0.85},{"name":"PM-IHXN-5498","type":"percent","value":0.85},{"name":"PM-UJXC-9054","type":"percent","value":0.85},{"name":"PM-JYFD-2663","type":"percent","value":0.85},{"name":"PM-TIYC-8006","type":"percent","value":0.85},{"name":"PM-PCHI-7693","type":"percent","value":0.85},{"name":"PM-TITY-8788","type":"percent","value":0.85},{"name":"PM-YWHX-0933","type":"percent","value":0.85},{"name":"PM-URCT-6163","type":"percent","value":0.85},{"name":"PM-UVVF-2116","type":"percent","value":0.85},{"name":"PM-DVAF-8245","type":"percent","value":0.85}]},{"name":"stickyOutstream","type":"percent","value":0.8},{"name":"instream","type":"percent","value":1}],"s2s":[{"s2s_value":0,"endpoint_value":null,"endpoint":null,"media_type":"display"},{"s2s_value":0,"endpoint_value":null,"endpoint":null,"media_type":"video"}],"bidder_name":"pubmatic","enabled":true},{"secondary":false,"cpm":[{"name":"default","type":"percent","value":0.01},{"name":"instream","type":"percent","value":0.01}],"s2s":[{"s2s_value":0,"endpoint_value":null,"endpoint":null,"media_type":"display"},{"s2s_value":0,"endpoint_value":null,"endpoint":null,"media_type":"video"}],"bidder_name":"resetdigital","enabled":false},{"secondary":false,"cpm":[{"name":"default","type":"percent","value":0.01},{"name":"instream","type":"percent","value":0.01}],"s2s":[{"s2s_value":0,"endpoint_value":null,"endpoint":null,"media_type":"display"},{"s2s_value":0,"endpoint_value":null,"endpoint":null,"media_type":"video"}],"bidder_name":"rise","enabled":false},{"secondary":false,"cpm":[{"name":"default","type":"percent","value":0.01}],"s2s":[{"s2s_value":0,"endpoint_value":null,"endpoint":null,"media_type":"display"},{"s2s_value":0,"endpoint_value":null,"endpoint":null,"media_type":"video"}],"bidder_name":"rtbhouse","enabled":true},{"secondary":false,"cpm":[{"name":"default","type":"percent","value":1},{"name":"outstream","type":"percent","value":1},{"name":"pmp","type":"percent","value":1,"deals":[{"name":"829398","type":"percent","value":0.95},{"name":"832174","type":"percent","value":0.97},{"name":"832176","type":"percent","value":0.97},{"name":"855776","type":"percent","value":0.97},{"name":"855778","type":"percent","value":0.97},{"name":"855780","type":"percent","value":0.97},{"name":"855782","type":"percent","value":0.97},{"name":"855784","type":"percent","value":0.97},{"name":"855786","type":"percent","value":0.97},{"name":"855788","type":"percent","value":0.97},{"name":"855790","type":"percent","value":0.97},{"name":"855792","type":"percent","value":0.97},{"name":"855794","type":"percent","value":0.97},{"name":"855796","type":"percent","value":0.97},{"name":"855798","type":"percent","value":0.97},{"name":"855800","type":"percent","value":0.97},{"name":"855802","type":"percent","value":0.97},{"name":"855804","type":"percent","value":0.97},{"name":"855806","type":"percent","value":0.97},{"name":"855808","type":"percent","value":0.97},{"name":"855810","type":"percent","value":0.97},{"name":"855812","type":"percent","value":0.97},{"name":"855814","type":"percent","value":0.97},{"name":"855816","type":"percent","value":0.97},{"name":"855824","type":"percent","value":0.97},{"name":"855828","type":"percent","value":0.97},{"name":"859888","type":"percent","value":0.97},{"name":"944042","type":"percent","value":0.97},{"name":"944044","type":"percent","value":0.97},{"name":"1130968","type":"percent","value":0.9},{"name":"1130970","type":"percent","value":0.9},{"name":"1130976","type":"percent","value":0.9},{"name":"1130978","type":"percent","value":0.9},{"name":"1509070","type":"percent","value":0.85},{"name":"1509072","type":"percent","value":0.85},{"name":"1623874","type":"percent","value":0.85},{"name":"1623876","type":"percent","value":0.88},{"name":"1688128","type":"percent","value":0.98},{"name":"1751440","type":"percent","value":0.85},{"name":"1751442","type":"percent","value":0.85},{"name":"1751444","type":"percent","value":0.85},{"name":"1751448","type":"percent","value":0.85},{"name":"1751450","type":"percent","value":0.85},{"name":"1751452","type":"percent","value":0.85},{"name":"1751454","type":"percent","value":0.85},{"name":"1751456","type":"percent","value":0.85},{"name":"1751472","type":"percent","value":0.85},{"name":"1751474","type":"percent","value":0.85},{"name":"1751476","type":"percent","value":0.85},{"name":"1751478","type":"percent","value":0.85},{"name":"1751480","type":"percent","value":0.85},{"name":"1751482","type":"percent","value":0.85},{"name":"1751632","type":"percent","value":0.85},{"name":"1751634","type":"percent","value":0.85},{"name":"1751636","type":"percent","value":0.85},{"name":"1751638","type":"percent","value":0.88},{"name":"1751640","type":"percent","value":0.85},{"name":"1751642","type":"percent","value":0.85},{"name":"1751644","type":"percent","value":0.85},{"name":"1751646","type":"percent","value":0.85},{"name":"1751648","type":"percent","value":0.85},{"name":"1751650","type":"percent","value":0.85},{"name":"1751652","type":"percent","value":0.85},{"name":"1751654","type":"percent","value":0.85},{"name":"1751656","type":"percent","value":0.85},{"name":"1751660","type":"percent","value":0.85},{"name":"1751662","type":"percent","value":0.85},{"name":"1751664","type":"percent","value":0.85},{"name":"1751666","type":"percent","value":0.85},{"name":"1751668","type":"percent","value":0.85},{"name":"1751670","type":"percent","value":0.85},{"name":"1751672","type":"percent","value":0.85},{"name":"1751674","type":"percent","value":0.85},{"name":"1751676","type":"percent","value":0.85},{"name":"1751678","type":"percent","value":0.85},{"name":"1751680","type":"percent","value":0.85},{"name":"1751682","type":"percent","value":0.85},{"name":"1751684","type":"percent","value":0.88},{"name":"1751686","type":"percent","value":0.85},{"name":"1751688","type":"percent","value":0.88},{"name":"1751690","type":"percent","value":0.85},{"name":"1751692","type":"percent","value":0.88},{"name":"1751694","type":"percent","value":0.85},{"name":"1751696","type":"percent","value":0.88},{"name":"1751698","type":"percent","value":0.85},{"name":"1751700","type":"percent","value":0.88},{"name":"1751702","type":"percent","value":0.88},{"name":"1751706","type":"percent","value":0.88},{"name":"1751708","type":"percent","value":0.85},{"name":"1751710","type":"percent","value":0.88},{"name":"1751712","type":"percent","value":0.85},{"name":"1751714","type":"percent","value":0.88},{"name":"1751716","type":"percent","value":0.85},{"name":"1751718","type":"percent","value":0.85},{"name":"1791050","type":"percent","value":0.9},{"name":"1791052","type":"percent","value":0.9},{"name":"1791054","type":"percent","value":0.9},{"name":"1792390","type":"percent","value":0.85},{"name":"1792400","type":"percent","value":0.85},{"name":"1813144","type":"percent","value":0.85},{"name":"1883724","type":"percent","value":0.9},{"name":"1883726","type":"percent","value":0.9},{"name":"1883728","type":"percent","value":0.9},{"name":"1909612","type":"percent","value":0.9},{"name":"1910078","type":"percent","value":0.9},{"name":"1913794","type":"percent","value":0.9},{"name":"1914770","type":"percent","value":0.9},{"name":"1915132","type":"percent","value":0.9},{"name":"1915136","type":"percent","value":0.9},{"name":"1915534","type":"percent","value":0.9},{"name":"1915928","type":"percent","value":0.9},{"name":"1915930","type":"percent","value":0.9},{"name":"1916326","type":"percent","value":0.9},{"name":"1916722","type":"percent","value":0.9},{"name":"1917116","type":"percent","value":0.9},{"name":"1917120","type":"percent","value":0.9},{"name":"1917122","type":"percent","value":0.9},{"name":"1917124","type":"percent","value":0.9},{"name":"1917126","type":"percent","value":0.9},{"name":"1917128","type":"percent","value":0.9},{"name":"1917130","type":"percent","value":0.9},{"name":"1917132","type":"percent","value":0.88},{"name":"1917134","type":"percent","value":0.88},{"name":"1917136","type":"percent","value":0.88},{"name":"1917138","type":"percent","value":0.88},{"name":"1917142","type":"percent","value":0.9},{"name":"1917144","type":"percent","value":0.9},{"name":"1921048","type":"percent","value":0.9},{"name":"1921898","type":"percent","value":0.9},{"name":"1921906","type":"percent","value":0.9},{"name":"1950010","type":"percent","value":0.88},{"name":"1950020","type":"percent","value":0.85},{"name":"2003186","type":"percent","value":0.88},{"name":"2003188","type":"percent","value":0.88},{"name":"2003190","type":"percent","value":0.88},{"name":"2003192","type":"percent","value":0.88},{"name":"2032118","type":"percent","value":0.88},{"name":"2040506","type":"percent","value":0.9},{"name":"2076190","type":"percent","value":0.9},{"name":"2091612","type":"percent","value":0.9},{"name":"2092510","type":"percent","value":0.9},{"name":"2100546","type":"percent","value":0.9},{"name":"2127668","type":"percent","value":0.9},{"name":"2127670","type":"percent","value":0.9},{"name":"2212644","type":"percent","value":0.9},{"name":"2212648","type":"percent","value":0.9},{"name":"2256280","type":"percent","value":0.9},{"name":"2256286","type":"percent","value":0.9},{"name":"2256288","type":"percent","value":0.9},{"name":"2256292","type":"percent","value":0.9},{"name":"2270364","type":"percent","value":0.98},{"name":"2270368","type":"percent","value":0.98},{"name":"2270374","type":"percent","value":0.98},{"name":"2302618","type":"percent","value":0.88},{"name":"2302620","type":"percent","value":0.88},{"name":"2302622","type":"percent","value":0.88},{"name":"2331334","type":"percent","value":0.88},{"name":"2339448","type":"percent","value":0.9},{"name":"2356286","type":"percent","value":0.9},{"name":"2394816","type":"percent","value":0.9},{"name":"2394818","type":"percent","value":0.9},{"name":"2395892","type":"percent","value":0.9},{"name":"2397458","type":"percent","value":0.9},{"name":"2397466","type":"percent","value":0.9},{"name":"2441602","type":"percent","value":0.88},{"name":"2441604","type":"percent","value":0.88},{"name":"2441606","type":"percent","value":0.88},{"name":"2441608","type":"percent","value":0.88},{"name":"2441610","type":"percent","value":0.88},{"name":"2441614","type":"percent","value":0.88},{"name":"2441616","type":"percent","value":0.88},{"name":"2452690","type":"percent","value":0.88},{"name":"2464274","type":"percent","value":0.88},{"name":"2464278","type":"percent","value":0.88},{"name":"2464280","type":"percent","value":0.88},{"name":"2464282","type":"percent","value":0.85},{"name":"2464284","type":"percent","value":0.85},{"name":"2464286","type":"percent","value":0.85},{"name":"2479038","type":"percent","value":0.88},{"name":"2479456","type":"percent","value":0.88},{"name":"2484526","type":"percent","value":0.9},{"name":"2484530","type":"percent","value":0.9},{"name":"2484532","type":"percent","value":0.9},{"name":"2486688","type":"percent","value":0.9},{"name":"2511840","type":"percent","value":0.88},{"name":"2569122","type":"percent","value":0.85},{"name":"2669970","type":"percent","value":0.88},{"name":"2674258","type":"percent","value":0.85},{"name":"2674260","type":"percent","value":0.88},{"name":"2674262","type":"percent","value":0.85},{"name":"2674264","type":"percent","value":0.85},{"name":"2674268","type":"percent","value":0.85},{"name":"2674270","type":"percent","value":0.85},{"name":"2674272","type":"percent","value":0.85},{"name":"2674276","type":"percent","value":0.85},{"name":"2674278","type":"percent","value":0.85},{"name":"2674280","type":"percent","value":0.85},{"name":"2674282","type":"percent","value":0.88},{"name":"2674284","type":"percent","value":0.88},{"name":"2674286","type":"percent","value":0.85},{"name":"2674288","type":"percent","value":0.88},{"name":"2674290","type":"percent","value":0.85},{"name":"2674292","type":"percent","value":0.85},{"name":"2674296","type":"percent","value":0.85},{"name":"2674298","type":"percent","value":0.88},{"name":"2674300","type":"percent","value":0.85},{"name":"2674302","type":"percent","value":0.88},{"name":"2674304","type":"percent","value":0.85},{"name":"2674306","type":"percent","value":0.85},{"name":"2680696","type":"percent","value":0.88},{"name":"2680698","type":"percent","value":0.88},{"name":"2734898","type":"percent","value":0.9},{"name":"2734902","type":"percent","value":0.9},{"name":"2734904","type":"percent","value":0.9},{"name":"2734908","type":"percent","value":0.9},{"name":"2734910","type":"percent","value":0.9},{"name":"2734914","type":"percent","value":0.9},{"name":"2734918","type":"percent","value":0.9},{"name":"2734920","type":"percent","value":0.9},{"name":"2734922","type":"percent","value":0.9},{"name":"2734924","type":"percent","value":0.9},{"name":"2734926","type":"percent","value":0.9},{"name":"2734928","type":"percent","value":0.9},{"name":"2734930","type":"percent","value":0.9},{"name":"2734932","type":"percent","value":0.9},{"name":"2734934","type":"percent","value":0.9},{"name":"2734936","type":"percent","value":0.9},{"name":"2734938","type":"percent","value":0.9},{"name":"2734940","type":"percent","value":0.9},{"name":"2734942","type":"percent","value":0.9},{"name":"2734944","type":"percent","value":0.9},{"name":"2734946","type":"percent","value":0.9},{"name":"2734948","type":"percent","value":0.9},{"name":"2734950","type":"percent","value":0.9},{"name":"2734952","type":"percent","value":0.9},{"name":"2734954","type":"percent","value":0.9},{"name":"2734956","type":"percent","value":0.9},{"name":"2734958","type":"percent","value":0.9},{"name":"2734960","type":"percent","value":0.9},{"name":"2734962","type":"percent","value":0.9},{"name":"2734964","type":"percent","value":0.9},{"name":"2734966","type":"percent","value":0.9},{"name":"2734968","type":"percent","value":0.9},{"name":"2734970","type":"percent","value":0.9},{"name":"2734972","type":"percent","value":0.9},{"name":"2734974","type":"percent","value":0.9},{"name":"2734976","type":"percent","value":0.9},{"name":"2735402","type":"percent","value":0.85},{"name":"2735404","type":"percent","value":0.85},{"name":"2749170","type":"percent","value":0.85},{"name":"2756148","type":"flat","value":0.8},{"name":"2811442","type":"percent","value":0.9},{"name":"2811450","type":"percent","value":0.9},{"name":"2823770","type":"percent","value":0.88},{"name":"2824402","type":"percent","value":0.9},{"name":"2825204","type":"percent","value":0.9},{"name":"2837520","type":"percent","value":0.88},{"name":"2837534","type":"percent","value":0.88},{"name":"2877500","type":"percent","value":0.88},{"name":"2877504","type":"percent","value":0.88},{"name":"2877506","type":"percent","value":0.88},{"name":"2877510","type":"percent","value":0.88},{"name":"2990692","type":"percent","value":0.85},{"name":"2990750","type":"percent","value":0.88},{"name":"2990752","type":"percent","value":0.88},{"name":"2990756","type":"percent","value":0.85},{"name":"2990760","type":"percent","value":0.85},{"name":"2990762","type":"percent","value":0.85},{"name":"2990764","type":"percent","value":0.88},{"name":"2990766","type":"percent","value":0.85},{"name":"2990768","type":"percent","value":0.88},{"name":"2990770","type":"percent","value":0.88},{"name":"2990772","type":"percent","value":0.85},{"name":"3064682","type":"flat","value":2.6},{"name":"3064682","type":"percent","value":0.88},{"name":"3073482","type":"flat","value":2.6},{"name":"3073482","type":"percent","value":0.88},{"name":"3073502","type":"flat","value":2.6},{"name":"3073502","type":"percent","value":0.88},{"name":"3073504","type":"flat","value":2.6},{"name":"3073504","type":"percent","value":0.88},{"name":"3073506","type":"flat","value":2.6},{"name":"3073506","type":"percent","value":0.88},{"name":"3073508","type":"flat","value":2.6},{"name":"3073508","type":"percent","value":0.88},{"name":"3141208","type":"percent","value":0.9},{"name":"3141658","type":"percent","value":0.9},{"name":"3141660","type":"percent","value":0.9},{"name":"3141662","type":"percent","value":0.9},{"name":"3243288","type":"percent","value":0.9},{"name":"3243290","type":"percent","value":0.9},{"name":"3243292","type":"percent","value":0.9},{"name":"3243294","type":"percent","value":0.9},{"name":"3281928","type":"percent","value":0.85},{"name":"3281930","type":"percent","value":0.85},{"name":"3283836","type":"percent","value":0.85},{"name":"3283952","type":"percent","value":0.85},{"name":"3284646","type":"percent","value":0.85},{"name":"3285126","type":"percent","value":0.85},{"name":"3285302","type":"percent","value":0.85},{"name":"3285458","type":"percent","value":0.85},{"name":"3285460","type":"percent","value":0.85},{"name":"3285814","type":"percent","value":0.85},{"name":"3286008","type":"percent","value":0.85},{"name":"3286010","type":"percent","value":0.88},{"name":"3286014","type":"percent","value":0.88},{"name":"3286016","type":"percent","value":0.85},{"name":"3286020","type":"percent","value":0.85},{"name":"3286548","type":"percent","value":0.85},{"name":"3286564","type":"percent","value":0.85},{"name":"3286566","type":"percent","value":0.85},{"name":"3286568","type":"percent","value":0.88},{"name":"3286574","type":"percent","value":0.85},{"name":"3286576","type":"percent","value":0.85},{"name":"3286578","type":"percent","value":0.85},{"name":"3286580","type":"percent","value":0.85},{"name":"3309310","type":"flat","value":3.6},{"name":"3309310","type":"percent","value":0.88},{"name":"3309804","type":"flat","value":3.6},{"name":"3309804","type":"percent","value":0.88},{"name":"3309806","type":"flat","value":3.6},{"name":"3309806","type":"percent","value":0.88},{"name":"3309808","type":"flat","value":3.6},{"name":"3309808","type":"percent","value":0.88},{"name":"3317338","type":"percent","value":0.95},{"name":"3317342","type":"percent","value":0.95},{"name":"3317344","type":"percent","value":0.95},{"name":"3317346","type":"percent","value":0.95},{"name":"3331634","type":"percent","value":0.85},{"name":"3342294","type":"percent","value":0.85},{"name":"3359410","type":"percent","value":0.9},{"name":"3359414","type":"percent","value":0.9},{"name":"3359416","type":"percent","value":0.9},{"name":"3401148","type":"percent","value":0.9},{"name":"3401150","type":"percent","value":0.9},{"name":"3401152","type":"percent","value":0.9},{"name":"3401154","type":"percent","value":0.9},{"name":"3419972","type":"percent","value":0.9},{"name":"3427182","type":"percent","value":0.88},{"name":"3464904","type":"percent","value":0.95},{"name":"3464906","type":"percent","value":0.95},{"name":"3492808","type":"flat","value":2.6},{"name":"3494148","type":"percent","value":0.9},{"name":"3494152","type":"percent","value":0.9},{"name":"3507294","type":"flat","value":2.6},{"name":"3507302","type":"flat","value":3.6},{"name":"3507316","type":"flat","value":3.6},{"name":"3532524","type":"percent","value":0.95},{"name":"3532624","type":"percent","value":0.95},{"name":"3548098","type":"percent","value":0.85},{"name":"3561446","type":"percent","value":0.9},{"name":"3561448","type":"percent","value":0.9},{"name":"3577514","type":"percent","value":0.95},{"name":"3577516","type":"percent","value":0.95},{"name":"3577518","type":"percent","value":0.95},{"name":"3577520","type":"percent","value":0.95},{"name":"3577522","type":"percent","value":0.95},{"name":"3577524","type":"percent","value":0.95},{"name":"3578846","type":"percent","value":0.95},{"name":"3578870","type":"percent","value":0.95},{"name":"3626028","type":"percent","value":0.85},{"name":"3626030","type":"percent","value":0.85},{"name":"3626032","type":"percent","value":0.85},{"name":"3626038","type":"percent","value":0.85},{"name":"3650122","type":"percent","value":0.95},{"name":"3650124","type":"percent","value":0.95},{"name":"3652906","type":"percent","value":0.95},{"name":"3691624","type":"percent","value":0.95},{"name":"3691626","type":"percent","value":0.95},{"name":"3693074","type":"percent","value":0.85},{"name":"3693076","type":"percent","value":0.85},{"name":"3744900","type":"percent","value":0.95},{"name":"3744902","type":"percent","value":0.95},{"name":"3765920","type":"percent","value":0.95},{"name":"3765922","type":"percent","value":0.95},{"name":"3765924","type":"percent","value":0.95},{"name":"3765926","type":"percent","value":0.95},{"name":"3766636","type":"percent","value":0.95},{"name":"3766638","type":"percent","value":0.95},{"name":"3766640","type":"percent","value":0.95},{"name":"3766646","type":"percent","value":0.95},{"name":"3766690","type":"percent","value":0.85},{"name":"3769100","type":"percent","value":0.95},{"name":"3769110","type":"percent","value":0.95},{"name":"3769114","type":"percent","value":0.95},{"name":"3769116","type":"percent","value":0.95},{"name":"3769144","type":"percent","value":0.95},{"name":"3771346","type":"flat","value":2.6},{"name":"3771346","type":"percent","value":0.85},{"name":"3771350","type":"flat","value":2.6},{"name":"3771350","type":"percent","value":0.85},{"name":"3772558","type":"percent","value":0.85},{"name":"3772566","type":"percent","value":0.85},{"name":"3772882","type":"percent","value":0.95},{"name":"3772884","type":"percent","value":0.95},{"name":"3772888","type":"percent","value":0.95},{"name":"3773468","type":"percent","value":0.85},{"name":"3773470","type":"percent","value":0.85},{"name":"3773474","type":"percent","value":0.85},{"name":"3773476","type":"percent","value":0.85},{"name":"3773486","type":"percent","value":0.95},{"name":"3773488","type":"percent","value":0.95},{"name":"3773490","type":"percent","value":0.95},{"name":"3773494","type":"percent","value":0.95},{"name":"3773496","type":"percent","value":0.95},{"name":"3773498","type":"percent","value":0.95},{"name":"3773500","type":"percent","value":0.95},{"name":"3773502","type":"percent","value":0.95},{"name":"3773504","type":"percent","value":0.95},{"name":"3773506","type":"percent","value":0.95},{"name":"3773508","type":"percent","value":0.95},{"name":"3773510","type":"percent","value":0.95},{"name":"3773516","type":"percent","value":0.95},{"name":"3773930","type":"percent","value":0.95},{"name":"3773940","type":"percent","value":0.95},{"name":"3773942","type":"percent","value":0.95},{"name":"3773944","type":"percent","value":0.95},{"name":"3774238","type":"percent","value":0.95},{"name":"3774242","type":"percent","value":0.95},{"name":"3774246","type":"percent","value":0.95},{"name":"3774248","type":"percent","value":0.95},{"name":"3775844","type":"percent","value":0.95},{"name":"3775846","type":"percent","value":0.95},{"name":"3775864","type":"percent","value":0.85},{"name":"3776064","type":"percent","value":0.95},{"name":"3776066","type":"percent","value":0.95},{"name":"3776068","type":"percent","value":0.95},{"name":"3776070","type":"percent","value":0.95},{"name":"3776072","type":"percent","value":0.95},{"name":"3776074","type":"percent","value":0.95},{"name":"3776152","type":"percent","value":0.95},{"name":"3776154","type":"percent","value":0.95},{"name":"3776156","type":"percent","value":0.95},{"name":"3776158","type":"percent","value":0.95},{"name":"3776382","type":"percent","value":0.95},{"name":"3776402","type":"percent","value":0.95},{"name":"3776618","type":"percent","value":0.95},{"name":"3776620","type":"percent","value":0.95},{"name":"3777796","type":"percent","value":0.95},{"name":"3777798","type":"percent","value":0.95},{"name":"3778892","type":"percent","value":0.95},{"name":"3778894","type":"percent","value":0.95},{"name":"3778896","type":"percent","value":0.95},{"name":"3778900","type":"percent","value":0.95},{"name":"3778902","type":"percent","value":0.95},{"name":"3778904","type":"percent","value":0.95},{"name":"3778906","type":"percent","value":0.95},{"name":"3778908","type":"percent","value":0.95},{"name":"3778912","type":"percent","value":0.95},{"name":"3778914","type":"percent","value":0.95},{"name":"3778916","type":"percent","value":0.95},{"name":"3778918","type":"percent","value":0.95},{"name":"3779114","type":"percent","value":0.85},{"name":"3779118","type":"percent","value":0.85},{"name":"3779120","type":"percent","value":0.85},{"name":"3779122","type":"percent","value":0.85},{"name":"3781560","type":"percent","value":0.85},{"name":"3782734","type":"percent","value":0.9},{"name":"3782740","type":"percent","value":0.85},{"name":"3783146","type":"percent","value":0.95},{"name":"3783148","type":"percent","value":0.95},{"name":"3783588","type":"percent","value":0.85},{"name":"3783758","type":"percent","value":0.95},{"name":"3783760","type":"percent","value":0.95},{"name":"3783762","type":"percent","value":0.95},{"name":"3783764","type":"percent","value":0.95},{"name":"3783766","type":"percent","value":0.95},{"name":"3783768","type":"percent","value":0.95},{"name":"3783770","type":"percent","value":0.95},{"name":"3783772","type":"percent","value":0.95},{"name":"3783774","type":"percent","value":0.95},{"name":"3783776","type":"percent","value":0.95},{"name":"3783778","type":"percent","value":0.95},{"name":"3783780","type":"percent","value":0.95},{"name":"3784862","type":"percent","value":0.85},{"name":"3785356","type":"percent","value":0.85},{"name":"3785372","type":"percent","value":0.98},{"name":"3785374","type":"percent","value":0.98},{"name":"3786320","type":"percent","value":0.7},{"name":"3786326","type":"percent","value":0.85},{"name":"3786328","type":"flat","value":2.6},{"name":"3786328","type":"percent","value":0.85},{"name":"3786482","type":"percent","value":0.85},{"name":"3786484","type":"percent","value":0.85},{"name":"3788980","type":"percent","value":0.85},{"name":"3788982","type":"percent","value":0.85},{"name":"3789904","type":"percent","value":0.95},{"name":"3789906","type":"percent","value":0.95},{"name":"3789908","type":"percent","value":0.95},{"name":"3789910","type":"percent","value":0.95},{"name":"3789912","type":"percent","value":0.95},{"name":"3791994","type":"percent","value":0.9},{"name":"3791996","type":"percent","value":0.9},{"name":"3793184","type":"percent","value":0.85},{"name":"3794974","type":"flat","value":2.6},{"name":"3794974","type":"percent","value":0.85},{"name":"3794976","type":"flat","value":2.6},{"name":"3794976","type":"percent","value":0.85},{"name":"3794978","type":"percent","value":0.85},{"name":"3794980","type":"percent","value":0.85},{"name":"3795838","type":"percent","value":0.85},{"name":"3795840","type":"percent","value":0.85},{"name":"3795842","type":"percent","value":0.85},{"name":"3795844","type":"percent","value":0.85},{"name":"3795846","type":"percent","value":0.85},{"name":"3795848","type":"percent","value":0.85},{"name":"3796850","type":"percent","value":0.85},{"name":"3796852","type":"percent","value":0.85},{"name":"3796854","type":"percent","value":0.85},{"name":"3796856","type":"percent","value":0.85},{"name":"3796858","type":"percent","value":0.85},{"name":"3796860","type":"percent","value":0.85}]},{"name":"stickyOutstream","type":"percent","value":0.65},{"name":"instream","type":"percent","value":0.99}],"s2s":[{"s2s_value":0,"endpoint_value":null,"endpoint":null,"media_type":"display"},{"s2s_value":0,"endpoint_value":null,"endpoint":null,"media_type":"video"}],"bidder_name":"rubi_ss","enabled":true},{"secondary":false,"cpm":[{"name":"default","type":"percent","value":0.98},{"name":"outstream","type":"percent","value":0.98},{"name":"pmp","type":"percent","value":1,"deals":[{"name":"829398","type":"percent","value":0.95},{"name":"832174","type":"percent","value":0.97},{"name":"832176","type":"percent","value":0.97},{"name":"855776","type":"percent","value":0.97},{"name":"855778","type":"percent","value":0.97},{"name":"855780","type":"percent","value":0.97},{"name":"855782","type":"percent","value":0.97},{"name":"855784","type":"percent","value":0.97},{"name":"855786","type":"percent","value":0.97},{"name":"855788","type":"percent","value":0.97},{"name":"855790","type":"percent","value":0.97},{"name":"855792","type":"percent","value":0.97},{"name":"855794","type":"percent","value":0.97},{"name":"855796","type":"percent","value":0.97},{"name":"855798","type":"percent","value":0.97},{"name":"855800","type":"percent","value":0.97},{"name":"855802","type":"percent","value":0.97},{"name":"855804","type":"percent","value":0.97},{"name":"855806","type":"percent","value":0.97},{"name":"855808","type":"percent","value":0.97},{"name":"855810","type":"percent","value":0.97},{"name":"855812","type":"percent","value":0.97},{"name":"855814","type":"percent","value":0.97},{"name":"855816","type":"percent","value":0.97},{"name":"855824","type":"percent","value":0.97},{"name":"855828","type":"percent","value":0.97},{"name":"859888","type":"percent","value":0.97},{"name":"944042","type":"percent","value":0.97},{"name":"944044","type":"percent","value":0.97},{"name":"1130968","type":"percent","value":0.9},{"name":"1130970","type":"percent","value":0.9},{"name":"1130976","type":"percent","value":0.9},{"name":"1130978","type":"percent","value":0.9},{"name":"1509070","type":"percent","value":0.85},{"name":"1509072","type":"percent","value":0.85},{"name":"1623874","type":"percent","value":0.85},{"name":"1623876","type":"percent","value":0.88},{"name":"1688128","type":"percent","value":0.98},{"name":"1751440","type":"percent","value":0.85},{"name":"1751442","type":"percent","value":0.85},{"name":"1751444","type":"percent","value":0.85},{"name":"1751448","type":"percent","value":0.85},{"name":"1751450","type":"percent","value":0.85},{"name":"1751452","type":"percent","value":0.85},{"name":"1751454","type":"percent","value":0.85},{"name":"1751456","type":"percent","value":0.85},{"name":"1751472","type":"percent","value":0.85},{"name":"1751474","type":"percent","value":0.85},{"name":"1751476","type":"percent","value":0.85},{"name":"1751478","type":"percent","value":0.85},{"name":"1751480","type":"percent","value":0.85},{"name":"1751482","type":"percent","value":0.85},{"name":"1751632","type":"percent","value":0.85},{"name":"1751634","type":"percent","value":0.85},{"name":"1751636","type":"percent","value":0.85},{"name":"1751638","type":"percent","value":0.88},{"name":"1751640","type":"percent","value":0.85},{"name":"1751642","type":"percent","value":0.85},{"name":"1751644","type":"percent","value":0.85},{"name":"1751646","type":"percent","value":0.85},{"name":"1751648","type":"percent","value":0.85},{"name":"1751650","type":"percent","value":0.85},{"name":"1751652","type":"percent","value":0.85},{"name":"1751654","type":"percent","value":0.85},{"name":"1751656","type":"percent","value":0.85},{"name":"1751660","type":"percent","value":0.85},{"name":"1751662","type":"percent","value":0.85},{"name":"1751664","type":"percent","value":0.85},{"name":"1751666","type":"percent","value":0.85},{"name":"1751668","type":"percent","value":0.85},{"name":"1751670","type":"percent","value":0.85},{"name":"1751672","type":"percent","value":0.85},{"name":"1751674","type":"percent","value":0.85},{"name":"1751676","type":"percent","value":0.85},{"name":"1751678","type":"percent","value":0.85},{"name":"1751680","type":"percent","value":0.85},{"name":"1751682","type":"percent","value":0.85},{"name":"1751684","type":"percent","value":0.88},{"name":"1751686","type":"percent","value":0.85},{"name":"1751688","type":"percent","value":0.88},{"name":"1751690","type":"percent","value":0.85},{"name":"1751692","type":"percent","value":0.88},{"name":"1751694","type":"percent","value":0.85},{"name":"1751696","type":"percent","value":0.88},{"name":"1751698","type":"percent","value":0.85},{"name":"1751700","type":"percent","value":0.88},{"name":"1751702","type":"percent","value":0.88},{"name":"1751706","type":"percent","value":0.88},{"name":"1751708","type":"percent","value":0.85},{"name":"1751710","type":"percent","value":0.88},{"name":"1751712","type":"percent","value":0.85},{"name":"1751714","type":"percent","value":0.88},{"name":"1751716","type":"percent","value":0.85},{"name":"1751718","type":"percent","value":0.85},{"name":"1791050","type":"percent","value":0.9},{"name":"1791052","type":"percent","value":0.9},{"name":"1791054","type":"percent","value":0.9},{"name":"1792390","type":"percent","value":0.85},{"name":"1792400","type":"percent","value":0.85},{"name":"1813144","type":"percent","value":0.85},{"name":"1883724","type":"percent","value":0.9},{"name":"1883726","type":"percent","value":0.9},{"name":"1883728","type":"percent","value":0.9},{"name":"1909612","type":"percent","value":0.9},{"name":"1910078","type":"percent","value":0.9},{"name":"1913794","type":"percent","value":0.9},{"name":"1914770","type":"percent","value":0.9},{"name":"1915132","type":"percent","value":0.9},{"name":"1915136","type":"percent","value":0.9},{"name":"1915534","type":"percent","value":0.9},{"name":"1915928","type":"percent","value":0.9},{"name":"1915930","type":"percent","value":0.9},{"name":"1916326","type":"percent","value":0.9},{"name":"1916722","type":"percent","value":0.9},{"name":"1917116","type":"percent","value":0.9},{"name":"1917120","type":"percent","value":0.9},{"name":"1917122","type":"percent","value":0.9},{"name":"1917124","type":"percent","value":0.9},{"name":"1917126","type":"percent","value":0.9},{"name":"1917128","type":"percent","value":0.9},{"name":"1917130","type":"percent","value":0.9},{"name":"1917132","type":"percent","value":0.88},{"name":"1917134","type":"percent","value":0.88},{"name":"1917136","type":"percent","value":0.88},{"name":"1917138","type":"percent","value":0.88},{"name":"1917142","type":"percent","value":0.9},{"name":"1917144","type":"percent","value":0.9},{"name":"1921048","type":"percent","value":0.9},{"name":"1921898","type":"percent","value":0.9},{"name":"1921906","type":"percent","value":0.9},{"name":"1950010","type":"percent","value":0.88},{"name":"1950020","type":"percent","value":0.85},{"name":"2003186","type":"percent","value":0.88},{"name":"2003188","type":"percent","value":0.88},{"name":"2003190","type":"percent","value":0.88},{"name":"2003192","type":"percent","value":0.88},{"name":"2032118","type":"percent","value":0.88},{"name":"2040506","type":"percent","value":0.9},{"name":"2076190","type":"percent","value":0.9},{"name":"2091612","type":"percent","value":0.9},{"name":"2092510","type":"percent","value":0.9},{"name":"2100546","type":"percent","value":0.9},{"name":"2127668","type":"percent","value":0.9},{"name":"2127670","type":"percent","value":0.9},{"name":"2212644","type":"percent","value":0.9},{"name":"2212648","type":"percent","value":0.9},{"name":"2256280","type":"percent","value":0.9},{"name":"2256286","type":"percent","value":0.9},{"name":"2256288","type":"percent","value":0.9},{"name":"2256292","type":"percent","value":0.9},{"name":"2270364","type":"percent","value":0.98},{"name":"2270368","type":"percent","value":0.98},{"name":"2270374","type":"percent","value":0.98},{"name":"2302618","type":"percent","value":0.88},{"name":"2302620","type":"percent","value":0.88},{"name":"2302622","type":"percent","value":0.88},{"name":"2331334","type":"percent","value":0.88},{"name":"2339448","type":"percent","value":0.9},{"name":"2356286","type":"percent","value":0.9},{"name":"2394816","type":"percent","value":0.9},{"name":"2394818","type":"percent","value":0.9},{"name":"2395892","type":"percent","value":0.9},{"name":"2397458","type":"percent","value":0.9},{"name":"2397466","type":"percent","value":0.9},{"name":"2441602","type":"percent","value":0.88},{"name":"2441604","type":"percent","value":0.88},{"name":"2441606","type":"percent","value":0.88},{"name":"2441608","type":"percent","value":0.88},{"name":"2441610","type":"percent","value":0.88},{"name":"2441614","type":"percent","value":0.88},{"name":"2441616","type":"percent","value":0.88},{"name":"2452690","type":"percent","value":0.88},{"name":"2464274","type":"percent","value":0.88},{"name":"2464278","type":"percent","value":0.88},{"name":"2464280","type":"percent","value":0.88},{"name":"2464282","type":"percent","value":0.85},{"name":"2464284","type":"percent","value":0.85},{"name":"2464286","type":"percent","value":0.85},{"name":"2479038","type":"percent","value":0.88},{"name":"2479456","type":"percent","value":0.88},{"name":"2484526","type":"percent","value":0.9},{"name":"2484530","type":"percent","value":0.9},{"name":"2484532","type":"percent","value":0.9},{"name":"2486688","type":"percent","value":0.9},{"name":"2511840","type":"percent","value":0.88},{"name":"2569122","type":"percent","value":0.85},{"name":"2669970","type":"percent","value":0.88},{"name":"2674258","type":"percent","value":0.85},{"name":"2674260","type":"percent","value":0.88},{"name":"2674262","type":"percent","value":0.85},{"name":"2674264","type":"percent","value":0.85},{"name":"2674268","type":"percent","value":0.85},{"name":"2674270","type":"percent","value":0.85},{"name":"2674272","type":"percent","value":0.85},{"name":"2674276","type":"percent","value":0.85},{"name":"2674278","type":"percent","value":0.85},{"name":"2674280","type":"percent","value":0.85},{"name":"2674282","type":"percent","value":0.88},{"name":"2674284","type":"percent","value":0.88},{"name":"2674286","type":"percent","value":0.85},{"name":"2674288","type":"percent","value":0.88},{"name":"2674290","type":"percent","value":0.85},{"name":"2674292","type":"percent","value":0.85},{"name":"2674296","type":"percent","value":0.85},{"name":"2674298","type":"percent","value":0.88},{"name":"2674300","type":"percent","value":0.85},{"name":"2674302","type":"percent","value":0.88},{"name":"2674304","type":"percent","value":0.85},{"name":"2674306","type":"percent","value":0.85},{"name":"2680696","type":"percent","value":0.88},{"name":"2680698","type":"percent","value":0.88},{"name":"2734898","type":"percent","value":0.9},{"name":"2734902","type":"percent","value":0.9},{"name":"2734904","type":"percent","value":0.9},{"name":"2734908","type":"percent","value":0.9},{"name":"2734910","type":"percent","value":0.9},{"name":"2734914","type":"percent","value":0.9},{"name":"2734918","type":"percent","value":0.9},{"name":"2734920","type":"percent","value":0.9},{"name":"2734922","type":"percent","value":0.9},{"name":"2734924","type":"percent","value":0.9},{"name":"2734926","type":"percent","value":0.9},{"name":"2734928","type":"percent","value":0.9},{"name":"2734930","type":"percent","value":0.9},{"name":"2734932","type":"percent","value":0.9},{"name":"2734934","type":"percent","value":0.9},{"name":"2734936","type":"percent","value":0.9},{"name":"2734938","type":"percent","value":0.9},{"name":"2734940","type":"percent","value":0.9},{"name":"2734942","type":"percent","value":0.9},{"name":"2734944","type":"percent","value":0.9},{"name":"2734946","type":"percent","value":0.9},{"name":"2734948","type":"percent","value":0.9},{"name":"2734950","type":"percent","value":0.9},{"name":"2734952","type":"percent","value":0.9},{"name":"2734954","type":"percent","value":0.9},{"name":"2734956","type":"percent","value":0.9},{"name":"2734958","type":"percent","value":0.9},{"name":"2734960","type":"percent","value":0.9},{"name":"2734962","type":"percent","value":0.9},{"name":"2734964","type":"percent","value":0.9},{"name":"2734966","type":"percent","value":0.9},{"name":"2734968","type":"percent","value":0.9},{"name":"2734970","type":"percent","value":0.9},{"name":"2734972","type":"percent","value":0.9},{"name":"2734974","type":"percent","value":0.9},{"name":"2734976","type":"percent","value":0.9},{"name":"2735402","type":"percent","value":0.85},{"name":"2735404","type":"percent","value":0.85},{"name":"2749170","type":"percent","value":0.85},{"name":"2756148","type":"flat","value":0.8},{"name":"2811442","type":"percent","value":0.9},{"name":"2811450","type":"percent","value":0.9},{"name":"2823770","type":"percent","value":0.88},{"name":"2824402","type":"percent","value":0.9},{"name":"2825204","type":"percent","value":0.9},{"name":"2837520","type":"percent","value":0.88},{"name":"2837534","type":"percent","value":0.88},{"name":"2877500","type":"percent","value":0.88},{"name":"2877504","type":"percent","value":0.88},{"name":"2877506","type":"percent","value":0.88},{"name":"2877510","type":"percent","value":0.88},{"name":"2990692","type":"percent","value":0.85},{"name":"2990750","type":"percent","value":0.88},{"name":"2990752","type":"percent","value":0.88},{"name":"2990756","type":"percent","value":0.85},{"name":"2990760","type":"percent","value":0.85},{"name":"2990762","type":"percent","value":0.85},{"name":"2990764","type":"percent","value":0.88},{"name":"2990766","type":"percent","value":0.85},{"name":"2990768","type":"percent","value":0.88},{"name":"2990770","type":"percent","value":0.88},{"name":"2990772","type":"percent","value":0.85},{"name":"3064682","type":"flat","value":2.6},{"name":"3064682","type":"percent","value":0.88},{"name":"3073482","type":"flat","value":2.6},{"name":"3073482","type":"percent","value":0.88},{"name":"3073502","type":"flat","value":2.6},{"name":"3073502","type":"percent","value":0.88},{"name":"3073504","type":"flat","value":2.6},{"name":"3073504","type":"percent","value":0.88},{"name":"3073506","type":"flat","value":2.6},{"name":"3073506","type":"percent","value":0.88},{"name":"3073508","type":"flat","value":2.6},{"name":"3073508","type":"percent","value":0.88},{"name":"3141208","type":"percent","value":0.9},{"name":"3141658","type":"percent","value":0.9},{"name":"3141660","type":"percent","value":0.9},{"name":"3141662","type":"percent","value":0.9},{"name":"3243288","type":"percent","value":0.9},{"name":"3243290","type":"percent","value":0.9},{"name":"3243292","type":"percent","value":0.9},{"name":"3243294","type":"percent","value":0.9},{"name":"3281928","type":"percent","value":0.85},{"name":"3281930","type":"percent","value":0.85},{"name":"3283836","type":"percent","value":0.85},{"name":"3283952","type":"percent","value":0.85},{"name":"3284646","type":"percent","value":0.85},{"name":"3285126","type":"percent","value":0.85},{"name":"3285302","type":"percent","value":0.85},{"name":"3285458","type":"percent","value":0.85},{"name":"3285460","type":"percent","value":0.85},{"name":"3285814","type":"percent","value":0.85},{"name":"3286008","type":"percent","value":0.85},{"name":"3286010","type":"percent","value":0.88},{"name":"3286014","type":"percent","value":0.88},{"name":"3286016","type":"percent","value":0.85},{"name":"3286020","type":"percent","value":0.85},{"name":"3286548","type":"percent","value":0.85},{"name":"3286564","type":"percent","value":0.85},{"name":"3286566","type":"percent","value":0.85},{"name":"3286568","type":"percent","value":0.88},{"name":"3286574","type":"percent","value":0.85},{"name":"3286576","type":"percent","value":0.85},{"name":"3286578","type":"percent","value":0.85},{"name":"3286580","type":"percent","value":0.85},{"name":"3309310","type":"flat","value":3.6},{"name":"3309310","type":"percent","value":0.88},{"name":"3309804","type":"flat","value":3.6},{"name":"3309804","type":"percent","value":0.88},{"name":"3309806","type":"flat","value":3.6},{"name":"3309806","type":"percent","value":0.88},{"name":"3309808","type":"flat","value":3.6},{"name":"3309808","type":"percent","value":0.88},{"name":"3317338","type":"percent","value":0.95},{"name":"3317342","type":"percent","value":0.95},{"name":"3317344","type":"percent","value":0.95},{"name":"3317346","type":"percent","value":0.95},{"name":"3331634","type":"percent","value":0.85},{"name":"3342294","type":"percent","value":0.85},{"name":"3359410","type":"percent","value":0.9},{"name":"3359414","type":"percent","value":0.9},{"name":"3359416","type":"percent","value":0.9},{"name":"3401148","type":"percent","value":0.9},{"name":"3401150","type":"percent","value":0.9},{"name":"3401152","type":"percent","value":0.9},{"name":"3401154","type":"percent","value":0.9},{"name":"3419972","type":"percent","value":0.9},{"name":"3427182","type":"percent","value":0.88},{"name":"3464904","type":"percent","value":0.95},{"name":"3464906","type":"percent","value":0.95},{"name":"3492808","type":"flat","value":2.6},{"name":"3494148","type":"percent","value":0.9},{"name":"3494152","type":"percent","value":0.9},{"name":"3507294","type":"flat","value":2.6},{"name":"3507302","type":"flat","value":3.6},{"name":"3507316","type":"flat","value":3.6},{"name":"3532524","type":"percent","value":0.95},{"name":"3532624","type":"percent","value":0.95},{"name":"3548098","type":"percent","value":0.85},{"name":"3561446","type":"percent","value":0.9},{"name":"3561448","type":"percent","value":0.9},{"name":"3577514","type":"percent","value":0.95},{"name":"3577516","type":"percent","value":0.95},{"name":"3577518","type":"percent","value":0.95},{"name":"3577520","type":"percent","value":0.95},{"name":"3577522","type":"percent","value":0.95},{"name":"3577524","type":"percent","value":0.95},{"name":"3578846","type":"percent","value":0.95},{"name":"3578870","type":"percent","value":0.95},{"name":"3626028","type":"percent","value":0.85},{"name":"3626030","type":"percent","value":0.85},{"name":"3626032","type":"percent","value":0.85},{"name":"3626038","type":"percent","value":0.85},{"name":"3650122","type":"percent","value":0.95},{"name":"3650124","type":"percent","value":0.95},{"name":"3652906","type":"percent","value":0.95},{"name":"3691624","type":"percent","value":0.95},{"name":"3691626","type":"percent","value":0.95},{"name":"3693074","type":"percent","value":0.85},{"name":"3693076","type":"percent","value":0.85},{"name":"3744900","type":"percent","value":0.95},{"name":"3744902","type":"percent","value":0.95},{"name":"3765920","type":"percent","value":0.95},{"name":"3765922","type":"percent","value":0.95},{"name":"3765924","type":"percent","value":0.95},{"name":"3765926","type":"percent","value":0.95},{"name":"3766636","type":"percent","value":0.95},{"name":"3766638","type":"percent","value":0.95},{"name":"3766640","type":"percent","value":0.95},{"name":"3766646","type":"percent","value":0.95},{"name":"3766690","type":"percent","value":0.85},{"name":"3769100","type":"percent","value":0.95},{"name":"3769110","type":"percent","value":0.95},{"name":"3769114","type":"percent","value":0.95},{"name":"3769116","type":"percent","value":0.95},{"name":"3769144","type":"percent","value":0.95},{"name":"3771346","type":"flat","value":2.6},{"name":"3771346","type":"percent","value":0.85},{"name":"3771350","type":"flat","value":2.6},{"name":"3771350","type":"percent","value":0.85},{"name":"3772558","type":"percent","value":0.85},{"name":"3772566","type":"percent","value":0.85},{"name":"3772882","type":"percent","value":0.95},{"name":"3772884","type":"percent","value":0.95},{"name":"3772888","type":"percent","value":0.95},{"name":"3773468","type":"percent","value":0.85},{"name":"3773470","type":"percent","value":0.85},{"name":"3773474","type":"percent","value":0.85},{"name":"3773476","type":"percent","value":0.85},{"name":"3773486","type":"percent","value":0.95},{"name":"3773488","type":"percent","value":0.95},{"name":"3773490","type":"percent","value":0.95},{"name":"3773494","type":"percent","value":0.95},{"name":"3773496","type":"percent","value":0.95},{"name":"3773498","type":"percent","value":0.95},{"name":"3773500","type":"percent","value":0.95},{"name":"3773502","type":"percent","value":0.95},{"name":"3773504","type":"percent","value":0.95},{"name":"3773506","type":"percent","value":0.95},{"name":"3773508","type":"percent","value":0.95},{"name":"3773510","type":"percent","value":0.95},{"name":"3773516","type":"percent","value":0.95},{"name":"3773930","type":"percent","value":0.95},{"name":"3773940","type":"percent","value":0.95},{"name":"3773942","type":"percent","value":0.95},{"name":"3773944","type":"percent","value":0.95},{"name":"3774238","type":"percent","value":0.95},{"name":"3774242","type":"percent","value":0.95},{"name":"3774246","type":"percent","value":0.95},{"name":"3774248","type":"percent","value":0.95},{"name":"3775844","type":"percent","value":0.95},{"name":"3775846","type":"percent","value":0.95},{"name":"3775864","type":"percent","value":0.85},{"name":"3776064","type":"percent","value":0.95},{"name":"3776066","type":"percent","value":0.95},{"name":"3776068","type":"percent","value":0.95},{"name":"3776070","type":"percent","value":0.95},{"name":"3776072","type":"percent","value":0.95},{"name":"3776074","type":"percent","value":0.95},{"name":"3776152","type":"percent","value":0.95},{"name":"3776154","type":"percent","value":0.95},{"name":"3776156","type":"percent","value":0.95},{"name":"3776158","type":"percent","value":0.95},{"name":"3776382","type":"percent","value":0.95},{"name":"3776402","type":"percent","value":0.95},{"name":"3776618","type":"percent","value":0.95},{"name":"3776620","type":"percent","value":0.95},{"name":"3777796","type":"percent","value":0.95},{"name":"3777798","type":"percent","value":0.95},{"name":"3778892","type":"percent","value":0.95},{"name":"3778894","type":"percent","value":0.95},{"name":"3778896","type":"percent","value":0.95},{"name":"3778900","type":"percent","value":0.95},{"name":"3778902","type":"percent","value":0.95},{"name":"3778904","type":"percent","value":0.95},{"name":"3778906","type":"percent","value":0.95},{"name":"3778908","type":"percent","value":0.95},{"name":"3778912","type":"percent","value":0.95},{"name":"3778914","type":"percent","value":0.95},{"name":"3778916","type":"percent","value":0.95},{"name":"3778918","type":"percent","value":0.95},{"name":"3779114","type":"percent","value":0.85},{"name":"3779118","type":"percent","value":0.85},{"name":"3779120","type":"percent","value":0.85},{"name":"3779122","type":"percent","value":0.85},{"name":"3781560","type":"percent","value":0.85},{"name":"3782734","type":"percent","value":0.9},{"name":"3782740","type":"percent","value":0.85},{"name":"3783146","type":"percent","value":0.95},{"name":"3783148","type":"percent","value":0.95},{"name":"3783588","type":"percent","value":0.85},{"name":"3783758","type":"percent","value":0.95},{"name":"3783760","type":"percent","value":0.95},{"name":"3783762","type":"percent","value":0.95},{"name":"3783764","type":"percent","value":0.95},{"name":"3783766","type":"percent","value":0.95},{"name":"3783768","type":"percent","value":0.95},{"name":"3783770","type":"percent","value":0.95},{"name":"3783772","type":"percent","value":0.95},{"name":"3783774","type":"percent","value":0.95},{"name":"3783776","type":"percent","value":0.95},{"name":"3783778","type":"percent","value":0.95},{"name":"3783780","type":"percent","value":0.95},{"name":"3784862","type":"percent","value":0.85},{"name":"3785356","type":"percent","value":0.85},{"name":"3785372","type":"percent","value":0.98},{"name":"3785374","type":"percent","value":0.98},{"name":"3786320","type":"percent","value":0.7},{"name":"3786326","type":"percent","value":0.85},{"name":"3786328","type":"flat","value":2.6},{"name":"3786328","type":"percent","value":0.85},{"name":"3786482","type":"percent","value":0.85},{"name":"3786484","type":"percent","value":0.85},{"name":"3788980","type":"percent","value":0.85},{"name":"3788982","type":"percent","value":0.85},{"name":"3789904","type":"percent","value":0.95},{"name":"3789906","type":"percent","value":0.95},{"name":"3789908","type":"percent","value":0.95},{"name":"3789910","type":"percent","value":0.95},{"name":"3789912","type":"percent","value":0.95},{"name":"3791994","type":"percent","value":0.9},{"name":"3791996","type":"percent","value":0.9},{"name":"3793184","type":"percent","value":0.85},{"name":"3794974","type":"flat","value":2.6},{"name":"3794974","type":"percent","value":0.85},{"name":"3794976","type":"flat","value":2.6},{"name":"3794976","type":"percent","value":0.85},{"name":"3794978","type":"percent","value":0.85},{"name":"3794980","type":"percent","value":0.85},{"name":"3795838","type":"percent","value":0.85},{"name":"3795840","type":"percent","value":0.85},{"name":"3795842","type":"percent","value":0.85},{"name":"3795844","type":"percent","value":0.85},{"name":"3795846","type":"percent","value":0.85},{"name":"3795848","type":"percent","value":0.85}]},{"name":"stickyOutstream","type":"percent","value":0.65},{"name":"instream","type":"percent","value":1}],"s2s":[{"s2s_value":0,"endpoint_value":null,"endpoint":null,"media_type":"display"},{"s2s_value":0,"endpoint_value":null,"endpoint":null,"media_type":"video"}],"bidder_name":"rubicon","enabled":true},{"secondary":false,"cpm":[{"name":"default","type":"percent","value":1},{"name":"stickyOutstream","type":"percent","value":0.6},{"name":"instream","type":"percent","value":1}],"s2s":[{"s2s_value":0,"endpoint_value":null,"endpoint":null,"media_type":"display"},{"s2s_value":0,"endpoint_value":null,"endpoint":null,"media_type":"video"}],"bidder_name":"share_ss","enabled":true},{"secondary":false,"cpm":[{"name":"default","type":"percent","value":0.99},{"name":"stickyOutstream","type":"percent","value":0.8},{"name":"instream","type":"percent","value":1}],"s2s":[{"s2s_value":0,"endpoint_value":null,"endpoint":null,"media_type":"display"},{"s2s_value":0,"endpoint_value":null,"endpoint":null,"media_type":"video"}],"bidder_name":"sharethrough","enabled":true},{"secondary":false,"cpm":[{"name":"default","type":"percent","value":1},{"name":"instream","type":"percent","value":1}],"s2s":[{"s2s_value":0,"endpoint_value":null,"endpoint":null,"media_type":"display"},{"s2s_value":0,"endpoint_value":null,"endpoint":null,"media_type":"video"}],"bidder_name":"stackadapt","enabled":true},{"secondary":false,"cpm":[{"name":"default","type":"percent","value":0.98}],"s2s":[],"bidder_name":"teads","enabled":true},{"secondary":false,"cpm":[{"name":"default","type":"percent","value":0.985},{"name":"outstream","type":"percent","value":0.65},{"name":"stickyOutstream","type":"percent","value":0.65},{"name":"instream","type":"percent","value":0.98}],"s2s":[{"s2s_value":0,"endpoint_value":null,"endpoint":null,"media_type":"display"},{"s2s_value":0,"endpoint_value":null,"endpoint":null,"media_type":"video"}],"bidder_name":"tripl_ss","enabled":true},{"secondary":true,"cpm":[{"name":"default","type":"percent","value":0.985},{"name":"outstream","type":"percent","value":0.65},{"name":"stickyOutstream","type":"percent","value":0.65},{"name":"instream","type":"percent","value":1}],"s2s":[{"s2s_value":0,"endpoint_value":null,"endpoint":null,"media_type":"display"},{"s2s_value":0,"endpoint_value":null,"endpoint":null,"media_type":"video"}],"bidder_name":"triplelift","enabled":true},{"secondary":false,"cpm":[{"name":"default","type":"percent","value":0.95},{"name":"pmp","type":"percent","value":1},{"name":"stickyOutstream","type":"percent","value":0.65},{"name":"instream","type":"percent","value":0.96}],"s2s":[{"s2s_value":0,"endpoint_value":null,"endpoint":null,"media_type":"display"},{"s2s_value":0,"endpoint_value":null,"endpoint":null,"media_type":"video"}],"bidder_name":"ttd","enabled":true},{"secondary":false,"cpm":[{"name":"instream","type":"percent","value":1}],"s2s":[{"s2s_value":0,"endpoint_value":null,"endpoint":null,"media_type":"display"},{"s2s_value":0,"endpoint_value":null,"endpoint":null,"media_type":"video"}],"bidder_name":"under_ss","enabled":true},{"secondary":false,"cpm":[{"name":"default","type":"percent","value":1}],"s2s":[{"s2s_value":0,"endpoint_value":null,"endpoint":null,"media_type":"display"},{"s2s_value":0,"endpoint_value":null,"endpoint":null,"media_type":"video"}],"bidder_name":"undertone","enabled":true},{"secondary":false,"cpm":[{"name":"default","type":"percent","value":0.99},{"name":"outstream","type":"percent","value":0.99},{"name":"instream","type":"percent","value":1}],"s2s":[{"s2s_value":0,"endpoint_value":null,"endpoint":null,"media_type":"display"},{"s2s_value":0,"endpoint_value":null,"endpoint":null,"media_type":"video"}],"bidder_name":"unruly","enabled":true},{"secondary":false,"cpm":[{"name":"default","type":"percent","value":1},{"name":"pmp","type":"percent","value":1},{"name":"stickyOutstream","type":"percent","value":0.6},{"name":"instream","type":"percent","value":1}],"s2s":[{"s2s_value":0,"endpoint_value":null,"endpoint":null,"media_type":"display"},{"s2s_value":0,"endpoint_value":null,"endpoint":null,"media_type":"video"}],"bidder_name":"yah_ss","enabled":true},{"secondary":false,"cpm":[{"name":"default","type":"percent","value":1},{"name":"pmp","type":"percent","value":1},{"name":"stickyOutstream","type":"percent","value":0.7},{"name":"instream","type":"percent","value":1}],"s2s":[{"s2s_value":0,"endpoint_value":null,"endpoint":null,"media_type":"display"},{"s2s_value":0,"endpoint_value":null,"endpoint":null,"media_type":"video"}],"bidder_name":"yahoossp","enabled":true},{"secondary":false,"cpm":[{"name":"default","type":"percent","value":0.96},{"name":"stickyOutstream","type":"percent","value":0.7},{"name":"instream","type":"percent","value":1}],"s2s":[{"s2s_value":0,"endpoint_value":null,"endpoint":null,"media_type":"display"},{"s2s_value":0,"endpoint_value":null,"endpoint":null,"media_type":"video"}],"bidder_name":"yieldmo","enabled":true}],"liveIntent":[{"bidder":"a_appnexus","month":5,"day":28,"multiplier":99.08832894263504,"browser":"Chrome"},{"bidder":"a_blis","month":5,"day":28,"multiplier":99.40823607609246,"browser":"Chrome"},{"bidder":"a_ogury","month":5,"day":28,"multiplier":99.9200041904565,"browser":"Chrome"},{"bidder":"a_openx","month":5,"day":28,"multiplier":99.77441923740082,"browser":"Chrome"},{"bidder":"a_pubmatic","month":5,"day":28,"multiplier":99.52917601225799,"browser":"Chrome"},{"bidder":"a_sharethrough","month":5,"day":28,"multiplier":99.58396328279946,"browser":"Chrome"},{"bidder":"improve_ss","month":5,"day":28,"multiplier":96.61763906728312,"browser":"Chrome"},{"bidder":"ix","month":5,"day":28,"multiplier":99.93153643828805,"browser":"Chrome"},{"bidder":"ix_ss","month":5,"day":28,"multiplier":99.69013106065631,"browser":"Chrome"},{"bidder":"nativo","month":5,"day":28,"multiplier":99.56387059216118,"browser":"Chrome"},{"bidder":"openx","month":5,"day":28,"multiplier":99.62676734425474,"browser":"Chrome"},{"bidder":"opnx_ss","month":5,"day":28,"multiplier":99.4097851812546,"browser":"Chrome"},{"bidder":"ozone","month":5,"day":28,"multiplier":99.45067689910947,"browser":"Chrome"},{"bidder":"stackadapt","month":5,"day":28,"multiplier":97.87334056355427,"browser":"Chrome"},{"bidder":"tripl_ss","month":5,"day":28,"multiplier":99.55113425407706,"browser":"Chrome"},{"bidder":"triplelift","month":5,"day":28,"multiplier":99.83934686389911,"browser":"Chrome"},{"bidder":"under_ss","month":5,"day":28,"multiplier":99.94018581160512,"browser":"Chrome"},{"bidder":"unruly","month":5,"day":28,"multiplier":99.79098996729948,"browser":"Chrome"},{"bidder":"pubm_ss","month":5,"day":28,"multiplier":99.4735677056418,"browser":"Chrome"},{"bidder":"pubmatic","month":5,"day":28,"multiplier":99.62218275427266,"browser":"Chrome"},{"bidder":"rubi_ss","month":5,"day":28,"multiplier":99.65190204929301,"browser":"Chrome"},{"bidder":"rubicon","month":5,"day":28,"multiplier":99.7185770303042,"browser":"Chrome"},{"bidder":"share_ss","month":5,"day":28,"multiplier":99.5971518351934,"browser":"Chrome"},{"bidder":"sharethrough","month":5,"day":28,"multiplier":99.71512092395874,"browser":"Chrome"},{"bidder":"criteo","month":5,"day":28,"multiplier":98.844545366661,"browser":"Not Chrome"},{"bidder":"flipp","month":5,"day":28,"multiplier":99.76008657061767,"browser":"Not Chrome"},{"bidder":"grid","month":5,"day":28,"multiplier":99.5709294654833,"browser":"Not Chrome"},{"bidder":"ix","month":5,"day":28,"multiplier":99.63782235196324,"browser":"Not Chrome"},{"bidder":"ix_ss","month":5,"day":28,"multiplier":99.38735911154015,"browser":"Not Chrome"},{"bidder":"nativo","month":5,"day":28,"multiplier":99.94439946015227,"browser":"Not Chrome"},{"bidder":"pubm_ss","month":5,"day":28,"multiplier":98.50858997471518,"browser":"Not Chrome"},{"bidder":"pubmatic","month":5,"day":28,"multiplier":98.83119495017155,"browser":"Not Chrome"},{"bidder":"rubi_ss","month":5,"day":28,"multiplier":99.6616387680761,"browser":"Not Chrome"},{"bidder":"rubicon","month":5,"day":28,"multiplier":99.23937457259312,"browser":"Not Chrome"},{"bidder":"share_ss","month":5,"day":28,"multiplier":99.62682094170944,"browser":"Not Chrome"},{"bidder":"yah_ss","month":5,"day":28,"multiplier":99.96784541729185,"browser":"Chrome"},{"bidder":"yieldmo","month":5,"day":28,"multiplier":99.77454802737634,"browser":"Chrome"},{"bidder":"a_appnexus","month":5,"day":28,"multiplier":99.6088551802918,"browser":"Not Chrome"},{"bidder":"a_blis","month":5,"day":28,"multiplier":98.263680006791,"browser":"Not Chrome"},{"bidder":"a_openx","month":5,"day":28,"multiplier":99.11802247845445,"browser":"Not Chrome"},{"bidder":"a_pubmatic","month":5,"day":28,"multiplier":98.39910470884872,"browser":"Not Chrome"},{"bidder":"a_seedtag","month":5,"day":28,"multiplier":99.96315271879071,"browser":"Not Chrome"},{"bidder":"sharethrough","month":5,"day":28,"multiplier":99.00510194644424,"browser":"Not Chrome"},{"bidder":"stackadapt","month":5,"day":28,"multiplier":97.97069215675677,"browser":"Not Chrome"},{"bidder":"tripl_ss","month":5,"day":28,"multiplier":98.96389805832825,"browser":"Not Chrome"},{"bidder":"triplelift","month":5,"day":28,"multiplier":99.44912681104182,"browser":"Not Chrome"},{"bidder":"unruly","month":5,"day":28,"multiplier":99.87821055970745,"browser":"Not Chrome"},{"bidder":"yieldmo","month":5,"day":28,"multiplier":99.37126469587903,"browser":"Not Chrome"},{"bidder":"a_triplelift","month":5,"day":28,"multiplier":99.9163123647526,"browser":"Not Chrome"},{"bidder":"a_unruly","month":5,"day":28,"multiplier":99.96815913595559,"browser":"Not Chrome"},{"bidder":"a_verizon","month":5,"day":28,"multiplier":99.92008547064819,"browser":"Not Chrome"},{"bidder":"appnexus","month":5,"day":28,"multiplier":99.9936786005734,"browser":"Not Chrome"},{"bidder":"crit_ss","month":5,"day":28,"multiplier":99.15710163416315,"browser":"Not Chrome"},{"bidder":"ntvo_ss","month":5,"day":28,"multiplier":99.91901813416005,"browser":"Not Chrome"},{"bidder":"onetag","month":5,"day":28,"multiplier":96.61763906728312,"browser":"Not Chrome"},{"bidder":"openx","month":5,"day":28,"multiplier":99.76743874349754,"browser":"Not Chrome"},{"bidder":"opnx_ss","month":5,"day":28,"multiplier":99.12841775801458,"browser":"Not Chrome"},{"bidder":"ozone","month":5,"day":28,"multiplier":99.75535452909942,"browser":"Not Chrome"}],"predictiveAnalysis":[{"error_rate":"0.9966792367873023","chrome":"0","adomain":"visa.com.sg","bidder":"rubicon","domain":"visa.com.sg","mobile":"1","report_date":"2025-05-28"},{"error_rate":"0.9901034386357283","chrome":"0","adomain":"visa.com.sg","bidder":"rubicon","domain":"visa.com.sg","mobile":"1","report_date":"2025-05-28"},{"error_rate":"0.9963296017617912","chrome":"0","adomain":"mybobs.com","bidder":"tripl_ss","domain":"mybobs.com","mobile":"1","report_date":"2025-05-28"},{"error_rate":"0.9963296017617912","chrome":"0","adomain":"mybobs.com","bidder":"tripl_ss","domain":"mybobs.com","mobile":"1","report_date":"2025-05-28"},{"error_rate":"0.987599771949829","chrome":"1","adomain":"pretzelcrisps.com","bidder":"rubi_ss","domain":"pretzelcrisps.com","mobile":"1","report_date":"2025-05-28"},{"error_rate":"0.9899985712244607","chrome":"1","adomain":"pretzelcrisps.com","bidder":"rubi_ss","domain":"pretzelcrisps.com","mobile":"1","report_date":"2025-05-28"},{"error_rate":"0.9926909133434686","chrome":"0","adomain":"lactalisamericangroup.com","bidder":"rubi_ss","domain":"lactalisamericangroup.com","mobile":"0","report_date":"2025-05-28"},{"error_rate":"0.9894509849632824","chrome":"0","adomain":"lactalisamericangroup.com","bidder":"rubi_ss","domain":"lactalisamericangroup.com","mobile":"0","report_date":"2025-05-28"},{"error_rate":"0.9999426934097421","chrome":"0","adomain":"rguest.com","bidder":"opnx_ss","domain":"rguest.com","mobile":"1","report_date":"2025-05-28"},{"error_rate":"0.9884354889247753","chrome":"0","adomain":"lowes.com","bidder":"rubi_ss","domain":"lowes.com","mobile":"1","report_date":"2025-05-28"},{"error_rate":"0.9821904159721024","chrome":"0","adomain":"lowes.com","bidder":"rubi_ss","domain":"lowes.com","mobile":"1","report_date":"2025-05-28"},{"error_rate":"0.9893842887473461","chrome":"0","adomain":"pretzelcrisps.com","bidder":"rubi_ss","domain":"pretzelcrisps.com","mobile":"0","report_date":"2025-05-28"},{"error_rate":"0.9885847055258107","chrome":"0","adomain":"pretzelcrisps.com","bidder":"rubi_ss","domain":"pretzelcrisps.com","mobile":"0","report_date":"2025-05-28"},{"error_rate":"0.9862435070494892","chrome":"0","adomain":"lowes.com","bidder":"rubicon","domain":"lowes.com","mobile":"1","report_date":"2025-05-28"},{"error_rate":"0.990900401452877","chrome":"0","adomain":"lowes.com","bidder":"rubicon","domain":"lowes.com","mobile":"1","report_date":"2025-05-28"},{"error_rate":"0.9999268321236244","chrome":"0","adomain":"totalwine.com","bidder":"rubi_ss","domain":"totalwine.com","mobile":"1","report_date":"2025-05-28"},{"error_rate":"0.9994441925434042","chrome":"0","adomain":"totalwine.com","bidder":"rubi_ss","domain":"totalwine.com","mobile":"1","report_date":"2025-05-28"},{"error_rate":"0.9920936597232781","chrome":"0","adomain":"lowes.com","bidder":"rubicon","domain":"lowes.com","mobile":"0","report_date":"2025-05-28"},{"error_rate":"0.9907379289401761","chrome":"0","adomain":"lowes.com","bidder":"rubicon","domain":"lowes.com","mobile":"0","report_date":"2025-05-28"},{"error_rate":"0.9922036855304766","chrome":"0","adomain":"pretzelcrisps.com","bidder":"rubicon","domain":"pretzelcrisps.com","mobile":"1","report_date":"2025-05-28"},{"error_rate":"0.9925283595113438","chrome":"0","adomain":"pretzelcrisps.com","bidder":"rubicon","domain":"pretzelcrisps.com","mobile":"1","report_date":"2025-05-28"},{"error_rate":"1.0","chrome":"1","adomain":"choctawnation.com","bidder":"opnx_ss","domain":"choctawnation.com","mobile":"1","report_date":"2025-05-28"},{"error_rate":"0.996055048634324","chrome":"1","adomain":"pmi.com","bidder":"rubicon","domain":"pmi.com","mobile":"1","report_date":"2025-05-28"},{"error_rate":"0.9890261041174536","chrome":"1","adomain":"pmi.com","bidder":"rubicon","domain":"pmi.com","mobile":"1","report_date":"2025-05-28"},{"error_rate":"0.9913796973914605","chrome":"0","adomain":"precision.myalcon.com","bidder":"rubi_ss","domain":"precision.myalcon.com","mobile":"1","report_date":"2025-05-28"},{"error_rate":"0.9949085338379742","chrome":"0","adomain":"precision.myalcon.com","bidder":"rubi_ss","domain":"precision.myalcon.com","mobile":"1","report_date":"2025-05-28"},{"error_rate":"0.9972994261280522","chrome":"1","adomain":"totalwine.com","bidder":"rubi_ss","domain":"totalwine.com","mobile":"1","report_date":"2025-05-28"},{"error_rate":"0.9948366820069593","chrome":"1","adomain":"totalwine.com","bidder":"rubi_ss","domain":"totalwine.com","mobile":"1","report_date":"2025-05-28"},{"error_rate":"0.9941280399085429","chrome":"0","adomain":"wendys.com","bidder":"rubicon","domain":"wendys.com","mobile":"1","report_date":"2025-05-28"},{"error_rate":"0.991860223973455","chrome":"0","adomain":"wendys.com","bidder":"rubicon","domain":"wendys.com","mobile":"1","report_date":"2025-05-28"},{"error_rate":"0.9917070306766476","chrome":"0","adomain":"wendys.com","bidder":"rubicon","domain":"wendys.com","mobile":"1","report_date":"2025-05-28"},{"error_rate":"0.9885149963423555","chrome":"0","adomain":"wendys.com","bidder":"rubicon","domain":"wendys.com","mobile":"1","report_date":"2025-05-28"},{"error_rate":"0.9762224352828379","chrome":"1","adomain":"mybobs.com","bidder":"opnx_ss","domain":"mybobs.com","mobile":"1","report_date":"2025-05-28"},{"error_rate":"0.9711942006867608","chrome":"1","adomain":"mybobs.com","bidder":"opnx_ss","domain":"mybobs.com","mobile":"1","report_date":"2025-05-28"},{"error_rate":"0.9931872037914692","chrome":"0","adomain":"titosvodka.com","bidder":"rubi_ss","domain":"titosvodka.com","mobile":"1","report_date":"2025-05-28"},{"error_rate":"0.9877015980558215","chrome":"0","adomain":"titosvodka.com","bidder":"rubi_ss","domain":"titosvodka.com","mobile":"1","report_date":"2025-05-28"},{"error_rate":"0.9984138972809667","chrome":"0","adomain":"zacaparum.com","bidder":"pubmatic","domain":"zacaparum.com","mobile":"1","report_date":"2025-05-28"},{"error_rate":"0.9540052043041002","chrome":"1","adomain":"viator.com","bidder":"rubicon","domain":"viator.com","mobile":"1","report_date":"2025-05-28"},{"error_rate":"0.9960016195971252","chrome":"0","adomain":"mybobs.com","bidder":"opnx_ss","domain":"mybobs.com","mobile":"1","report_date":"2025-05-28"},{"error_rate":"0.9967583447297776","chrome":"0","adomain":"mybobs.com","bidder":"opnx_ss","domain":"mybobs.com","mobile":"1","report_date":"2025-05-28"},{"error_rate":"0.9997410131565316","chrome":"0","adomain":"totalwine.com","bidder":"rubicon","domain":"totalwine.com","mobile":"1","report_date":"2025-05-28"},{"error_rate":"0.9999481918972127","chrome":"0","adomain":"totalwine.com","bidder":"rubicon","domain":"totalwine.com","mobile":"1","report_date":"2025-05-28"},{"error_rate":"0.9891066402585218","chrome":"1","adomain":"lowes.com","bidder":"rubi_ss","domain":"lowes.com","mobile":"1","report_date":"2025-05-28"},{"error_rate":"0.9836719883889695","chrome":"1","adomain":"lowes.com","bidder":"rubi_ss","domain":"lowes.com","mobile":"1","report_date":"2025-05-28"},{"error_rate":"0.999677211103938","chrome":"1","adomain":"choctawcasinos.com","bidder":"ix_ss","domain":"choctawcasinos.com","mobile":"0","report_date":"2025-05-28"},{"error_rate":"0.9893759648980255","chrome":"0","adomain":"zippo.com","bidder":"rubi_ss","domain":"zippo.com","mobile":"1","report_date":"2025-05-28"},{"error_rate":"0.9966440892999652","chrome":"0","adomain":"zippo.com","bidder":"rubi_ss","domain":"zippo.com","mobile":"1","report_date":"2025-05-28"},{"error_rate":"0.9898464885772996","chrome":"0","adomain":"lowes.com","bidder":"rubi_ss","domain":"lowes.com","mobile":"0","report_date":"2025-05-28"},{"error_rate":"0.9876975033168496","chrome":"0","adomain":"lowes.com","bidder":"rubi_ss","domain":"lowes.com","mobile":"0","report_date":"2025-05-28"},{"error_rate":"0.9957181571815719","chrome":"0","adomain":"mybobs.com","bidder":"opnx_ss","domain":"mybobs.com","mobile":"1","report_date":"2025-05-28"},{"error_rate":"0.9965283428261459","chrome":"0","adomain":"mybobs.com","bidder":"opnx_ss","domain":"mybobs.com","mobile":"1","report_date":"2025-05-28"},{"error_rate":"0.9002392784833425","chrome":"0","adomain":"att.com","bidder":"rubicon","domain":"att.com","mobile":"1","report_date":"2025-05-28"},{"error_rate":"0.9888264326843982","chrome":"0","adomain":"www1.macys.com","bidder":"rubi_ss","domain":"www1.macys.com","mobile":"1","report_date":"2025-05-28"},{"error_rate":"0.9895047331595554","chrome":"0","adomain":"www1.macys.com","bidder":"rubi_ss","domain":"www1.macys.com","mobile":"1","report_date":"2025-05-28"},{"error_rate":"0.913090848139457","chrome":"0","adomain":"att.com","bidder":"opnx_ss","domain":"att.com","mobile":"1","report_date":"2025-05-28"},{"error_rate":"0.999982015682325","chrome":"1","adomain":"rguest.com","bidder":"opnx_ss","domain":"rguest.com","mobile":"0","report_date":"2025-05-28"},{"error_rate":"0.9999280666103189","chrome":"1","adomain":"rguest.com","bidder":"opnx_ss","domain":"rguest.com","mobile":"0","report_date":"2025-05-28"},{"error_rate":"0.9887761515668493","chrome":"0","adomain":"lactalisamericangroup.com","bidder":"rubi_ss","domain":"lactalisamericangroup.com","mobile":"0","report_date":"2025-05-28"},{"error_rate":"0.9838291789511302","chrome":"0","adomain":"lactalisamericangroup.com","bidder":"rubi_ss","domain":"lactalisamericangroup.com","mobile":"0","report_date":"2025-05-28"},{"error_rate":"0.9888646816751392","chrome":"0","adomain":"titosvodka.com","bidder":"rubi_ss","domain":"titosvodka.com","mobile":"1","report_date":"2025-05-28"},{"error_rate":"0.9799688137219623","chrome":"0","adomain":"titosvodka.com","bidder":"rubi_ss","domain":"titosvodka.com","mobile":"1","report_date":"2025-05-28"},{"error_rate":"0.9890765312960729","chrome":"0","adomain":"www1.macys.com","bidder":"rubi_ss","domain":"www1.macys.com","mobile":"1","report_date":"2025-05-28"},{"error_rate":"0.9897398068669528","chrome":"0","adomain":"www1.macys.com","bidder":"rubi_ss","domain":"www1.macys.com","mobile":"1","report_date":"2025-05-28"},{"error_rate":"0.9655172413793104","chrome":"0","adomain":"zippo.com","bidder":"rubi_ss","domain":"zippo.com","mobile":"1","report_date":"2025-05-28"},{"error_rate":"0.98892490545651","chrome":"0","adomain":"zippo.com","bidder":"rubi_ss","domain":"zippo.com","mobile":"1","report_date":"2025-05-28"},{"error_rate":"0.9857009107158056","chrome":"0","adomain":"wendys.com","bidder":"rubi_ss","domain":"wendys.com","mobile":"0","report_date":"2025-05-28"},{"error_rate":"0.9856170212765958","chrome":"0","adomain":"wendys.com","bidder":"rubi_ss","domain":"wendys.com","mobile":"0","report_date":"2025-05-28"},{"error_rate":"0.9997936335964505","chrome":"1","adomain":"choctawcasinos.com","bidder":"ix_ss","domain":"choctawcasinos.com","mobile":"0","report_date":"2025-05-28"},{"error_rate":"0.9187402332011059","chrome":"0","adomain":"leovegas.com","bidder":"ix_ss","domain":"leovegas.com","mobile":"1","report_date":"2025-05-28"},{"error_rate":"0.901935331602549","chrome":"0","adomain":"leovegas.com","bidder":"ix_ss","domain":"leovegas.com","mobile":"1","report_date":"2025-05-28"},{"error_rate":"0.9983053870852658","chrome":"0","adomain":"mybobs.com","bidder":"triplelift","domain":"mybobs.com","mobile":"1","report_date":"2025-05-28"},{"error_rate":"0.9975046787273861","chrome":"0","adomain":"mybobs.com","bidder":"triplelift","domain":"mybobs.com","mobile":"1","report_date":"2025-05-28"},{"error_rate":"0.9998747259630442","chrome":"1","adomain":"choctawcasinos.com","bidder":"ix_ss","domain":"choctawcasinos.com","mobile":"1","report_date":"2025-05-28"},{"error_rate":"0.996901226597805","chrome":"1","adomain":"totalwine.com","bidder":"rubi_ss","domain":"totalwine.com","mobile":"1","report_date":"2025-05-28"},{"error_rate":"0.9940775074031157","chrome":"1","adomain":"totalwine.com","bidder":"rubi_ss","domain":"totalwine.com","mobile":"1","report_date":"2025-05-28"},{"error_rate":"0.9887376818395119","chrome":"0","adomain":"wendys.com","bidder":"rubi_ss","domain":"wendys.com","mobile":"0","report_date":"2025-05-28"},{"error_rate":"0.9886714036734147","chrome":"0","adomain":"wendys.com","bidder":"rubi_ss","domain":"wendys.com","mobile":"0","report_date":"2025-05-28"},{"error_rate":"0.9998162440279309","chrome":"0","adomain":"pepperidgefarm.com","bidder":"pubm_ss","domain":"pepperidgefarm.com","mobile":"1","report_date":"2025-05-28"},{"error_rate":"0.9878797941225304","chrome":"0","adomain":"pmi.com","bidder":"rubicon","domain":"pmi.com","mobile":"1","report_date":"2025-05-28"},{"error_rate":"0.9750901343821697","chrome":"0","adomain":"pmi.com","bidder":"rubicon","domain":"pmi.com","mobile":"1","report_date":"2025-05-28"},{"error_rate":"0.9970817120622568","chrome":"0","adomain":"precision.myalcon.com","bidder":"rubicon","domain":"precision.myalcon.com","mobile":"1","report_date":"2025-05-28"},{"error_rate":"0.9924477149496514","chrome":"0","adomain":"precision.myalcon.com","bidder":"rubicon","domain":"precision.myalcon.com","mobile":"1","report_date":"2025-05-28"},{"error_rate":"0.9853663828171612","chrome":"0","adomain":"wendys.com","bidder":"rubi_ss","domain":"wendys.com","mobile":"1","report_date":"2025-05-28"},{"error_rate":"0.9862757871878393","chrome":"0","adomain":"wendys.com","bidder":"rubi_ss","domain":"wendys.com","mobile":"1","report_date":"2025-05-28"},{"error_rate":"0.9888989990900819","chrome":"0","adomain":"zippo.com","bidder":"rubi_ss","domain":"zippo.com","mobile":"0","report_date":"2025-05-28"},{"error_rate":"0.9966984592809978","chrome":"0","adomain":"zippo.com","bidder":"rubi_ss","domain":"zippo.com","mobile":"0","report_date":"2025-05-28"},{"error_rate":"0.9908182554685391","chrome":"1","adomain":"lowes.com","bidder":"rubicon","domain":"lowes.com","mobile":"1","report_date":"2025-05-28"},{"error_rate":"0.9886822958771221","chrome":"1","adomain":"lowes.com","bidder":"rubicon","domain":"lowes.com","mobile":"1","report_date":"2025-05-28"},{"error_rate":"0.9244003790916381","chrome":"0","adomain":"att.com","bidder":"opnx_ss","domain":"att.com","mobile":"1","report_date":"2025-05-28"},{"error_rate":"0.999760038393857","chrome":"1","adomain":"rguest.com","bidder":"openx","domain":"rguest.com","mobile":"0","report_date":"2025-05-28"},{"error_rate":"0.9996800767815724","chrome":"1","adomain":"rguest.com","bidder":"openx","domain":"rguest.com","mobile":"0","report_date":"2025-05-28"},{"error_rate":"0.9933606717438","chrome":"1","adomain":"lowes.com","bidder":"rubicon","domain":"lowes.com","mobile":"1","report_date":"2025-05-28"},{"error_rate":"0.9918112692532658","chrome":"1","adomain":"lowes.com","bidder":"rubicon","domain":"lowes.com","mobile":"1","report_date":"2025-05-28"},{"error_rate":"0.9134497549019608","chrome":"0","adomain":"zacaparum.com","bidder":"ttd","domain":"zacaparum.com","mobile":"1","report_date":"2025-05-28"},{"error_rate":"0.9916587976078061","chrome":"0","adomain":"totalwine.com","bidder":"rubicon","domain":"totalwine.com","mobile":"0","report_date":"2025-05-28"},{"error_rate":"0.9938485804416404","chrome":"0","adomain":"totalwine.com","bidder":"rubicon","domain":"totalwine.com","mobile":"0","report_date":"2025-05-28"},{"error_rate":"0.999659979598776","chrome":"1","adomain":"rguest.com","bidder":"openx","domain":"rguest.com","mobile":"0","report_date":"2025-05-28"},{"error_rate":"0.9995466908431551","chrome":"1","adomain":"rguest.com","bidder":"openx","domain":"rguest.com","mobile":"0","report_date":"2025-05-28"},{"error_rate":"0.9900307692307693","chrome":"1","adomain":"wendys.com","bidder":"rubi_ss","domain":"wendys.com","mobile":"1","report_date":"2025-05-28"},{"error_rate":"0.9863887185775598","chrome":"1","adomain":"wendys.com","bidder":"rubi_ss","domain":"wendys.com","mobile":"1","report_date":"2025-05-28"},{"error_rate":"0.9999535993021335","chrome":"1","adomain":"rguest.com","bidder":"opnx_ss","domain":"rguest.com","mobile":"1","report_date":"2025-05-28"},{"error_rate":"0.9999628790972196","chrome":"1","adomain":"rguest.com","bidder":"opnx_ss","domain":"rguest.com","mobile":"1","report_date":"2025-05-28"},{"error_rate":"0.97976171046189","chrome":"1","adomain":"mybobs.com","bidder":"opnx_ss","domain":"mybobs.com","mobile":"1","report_date":"2025-05-28"},{"error_rate":"0.9754631134221644","chrome":"1","adomain":"mybobs.com","bidder":"opnx_ss","domain":"mybobs.com","mobile":"1","report_date":"2025-05-28"},{"error_rate":"0.9999866261885975","chrome":"1","adomain":"rguest.com","bidder":"opnx_ss","domain":"rguest.com","mobile":"0","report_date":"2025-05-28"},{"error_rate":"0.9999465069006098","chrome":"1","adomain":"rguest.com","bidder":"opnx_ss","domain":"rguest.com","mobile":"0","report_date":"2025-05-28"},{"error_rate":"0.9807286961758507","chrome":"0","adomain":"precision.myalcon.com","bidder":"rubi_ss","domain":"precision.myalcon.com","mobile":"1","report_date":"2025-05-28"},{"error_rate":"0.9885673816268717","chrome":"0","adomain":"precision.myalcon.com","bidder":"rubi_ss","domain":"precision.myalcon.com","mobile":"1","report_date":"2025-05-28"},{"error_rate":"1.0","chrome":"1","adomain":"choctawnation.com","bidder":"opnx_ss","domain":"choctawnation.com","mobile":"1","report_date":"2025-05-28"},{"error_rate":"0.9924595013890393","chrome":"1","adomain":"lowes.com","bidder":"rubi_ss","domain":"lowes.com","mobile":"1","report_date":"2025-05-28"},{"error_rate":"0.988678431513496","chrome":"1","adomain":"lowes.com","bidder":"rubi_ss","domain":"lowes.com","mobile":"1","report_date":"2025-05-28"},{"error_rate":"0.9871367317770366","chrome":"1","adomain":"wendys.com","bidder":"rubi_ss","domain":"wendys.com","mobile":"1","report_date":"2025-05-28"},{"error_rate":"0.9824561403508771","chrome":"1","adomain":"wendys.com","bidder":"rubi_ss","domain":"wendys.com","mobile":"1","report_date":"2025-05-28"},{"error_rate":"0.9461282753226438","chrome":"0","adomain":"chipotle.com","bidder":"kargo","domain":"chipotle.com","mobile":"0","report_date":"2025-05-28"},{"error_rate":"0.987766515204474","chrome":"0","adomain":"pretzelcrisps.com","bidder":"rubi_ss","domain":"pretzelcrisps.com","mobile":"0","report_date":"2025-05-28"},{"error_rate":"0.9868467000349203","chrome":"0","adomain":"pretzelcrisps.com","bidder":"rubi_ss","domain":"pretzelcrisps.com","mobile":"0","report_date":"2025-05-28"},{"error_rate":"0.9832663989290495","chrome":"1","adomain":"pmi.com","bidder":"rubicon","domain":"pmi.com","mobile":"0","report_date":"2025-05-28"},{"error_rate":"0.990292571120399","chrome":"1","adomain":"pmi.com","bidder":"rubicon","domain":"pmi.com","mobile":"0","report_date":"2025-05-28"},{"error_rate":"0.9999260409733008","chrome":"0","adomain":"rguest.com","bidder":"opnx_ss","domain":"rguest.com","mobile":"1","report_date":"2025-05-28"},{"error_rate":"0.9912337965121701","chrome":"0","adomain":"kfc.com","bidder":"rubi_ss","domain":"kfc.com","mobile":"1","report_date":"2025-05-28"},{"error_rate":"0.9999358406795755","chrome":"1","adomain":"rguest.com","bidder":"opnx_ss","domain":"rguest.com","mobile":"1","report_date":"2025-05-28"},{"error_rate":"0.999948671885025","chrome":"1","adomain":"rguest.com","bidder":"opnx_ss","domain":"rguest.com","mobile":"1","report_date":"2025-05-28"},{"error_rate":"0.9990195437610301","chrome":"0","adomain":"mybobs.com","bidder":"openx","domain":"mybobs.com","mobile":"1","report_date":"2025-05-28"},{"error_rate":"0.998562655167908","chrome":"0","adomain":"mybobs.com","bidder":"openx","domain":"mybobs.com","mobile":"1","report_date":"2025-05-28"},{"error_rate":"0.9998223485521407","chrome":"1","adomain":"rguest.com","bidder":"openx","domain":"rguest.com","mobile":"1","report_date":"2025-05-28"},{"error_rate":"0.9998815586876703","chrome":"1","adomain":"rguest.com","bidder":"openx","domain":"rguest.com","mobile":"1","report_date":"2025-05-28"},{"error_rate":"0.9909226732287914","chrome":"0","adomain":"lowes.com","bidder":"rubicon","domain":"lowes.com","mobile":"1","report_date":"2025-05-28"},{"error_rate":"0.9940051887861767","chrome":"0","adomain":"lowes.com","bidder":"rubicon","domain":"lowes.com","mobile":"1","report_date":"2025-05-28"},{"error_rate":"0.990180992159449","chrome":"0","adomain":"totalwine.com","bidder":"rubi_ss","domain":"totalwine.com","mobile":"0","report_date":"2025-05-28"},{"error_rate":"0.9943340691685063","chrome":"0","adomain":"totalwine.com","bidder":"rubi_ss","domain":"totalwine.com","mobile":"0","report_date":"2025-05-28"},{"error_rate":"0.9873773197070148","chrome":"0","adomain":"pretzelcrisps.com","bidder":"rubi_ss","domain":"pretzelcrisps.com","mobile":"1","report_date":"2025-05-28"},{"error_rate":"0.9881067926004259","chrome":"0","adomain":"pretzelcrisps.com","bidder":"rubi_ss","domain":"pretzelcrisps.com","mobile":"1","report_date":"2025-05-28"},{"error_rate":"1.0","chrome":"1","adomain":"www.choctawnation.com","bidder":"rubi_ss","domain":"www.choctawnation.com","mobile":"1","report_date":"2025-05-28"},{"error_rate":"0.9430365296803653","chrome":"0","adomain":"nba.com","bidder":"share_ss","domain":"nba.com","mobile":"1","report_date":"2025-05-28"},{"error_rate":"0.9885026006022447","chrome":"0","adomain":"lowes.com","bidder":"rubi_ss","domain":"lowes.com","mobile":"0","report_date":"2025-05-28"},{"error_rate":"0.9860731840524304","chrome":"0","adomain":"lowes.com","bidder":"rubi_ss","domain":"lowes.com","mobile":"0","report_date":"2025-05-28"},{"error_rate":"0.9669482188762395","chrome":"1","adomain":"chipotle.com","bidder":"kargo","domain":"chipotle.com","mobile":"0","report_date":"2025-05-28"},{"error_rate":"0.9998650836481382","chrome":"1","adomain":"choctawnation.com","bidder":"opnx_ss","domain":"choctawnation.com","mobile":"0","report_date":"2025-05-28"},{"error_rate":"0.9976927747419551","chrome":"0","adomain":"mybobs.com","bidder":"triplelift","domain":"mybobs.com","mobile":"1","report_date":"2025-05-28"},{"error_rate":"0.9966035904900534","chrome":"0","adomain":"mybobs.com","bidder":"triplelift","domain":"mybobs.com","mobile":"1","report_date":"2025-05-28"},{"error_rate":"0.9998005186515061","chrome":"1","adomain":"choctawcasinos.com","bidder":"ix_ss","domain":"choctawcasinos.com","mobile":"1","report_date":"2025-05-28"},{"error_rate":"0.9923808616391152","chrome":"0","adomain":"lowes.com","bidder":"rubi_ss","domain":"lowes.com","mobile":"1","report_date":"2025-05-28"},{"error_rate":"0.9882410242137489","chrome":"0","adomain":"lowes.com","bidder":"rubi_ss","domain":"lowes.com","mobile":"1","report_date":"2025-05-28"},{"error_rate":"0.9887096057252078","chrome":"0","adomain":"seedlipdrinks.com","bidder":"ttd","domain":"seedlipdrinks.com","mobile":"1","report_date":"2025-05-28"},{"error_rate":"0.997201623058626","chrome":"0","adomain":"mybobs.com","bidder":"tripl_ss","domain":"mybobs.com","mobile":"1","report_date":"2025-05-28"},{"error_rate":"0.997201623058626","chrome":"0","adomain":"mybobs.com","bidder":"tripl_ss","domain":"mybobs.com","mobile":"1","report_date":"2025-05-28"},{"error_rate":"0.9997121473805411","chrome":"1","adomain":"rguest.com","bidder":"openx","domain":"rguest.com","mobile":"1","report_date":"2025-05-28"},{"error_rate":"0.9998080798387871","chrome":"1","adomain":"rguest.com","bidder":"openx","domain":"rguest.com","mobile":"1","report_date":"2025-05-28"},{"error_rate":"0.9890621071159165","chrome":"1","adomain":"pretzelcrisps.com","bidder":"rubi_ss","domain":"pretzelcrisps.com","mobile":"1","report_date":"2025-05-28"},{"error_rate":"0.991180546806098","chrome":"1","adomain":"pretzelcrisps.com","bidder":"rubi_ss","domain":"pretzelcrisps.com","mobile":"1","report_date":"2025-05-28"},{"error_rate":"0.99984532095901","chrome":"1","adomain":"choctawnation.com","bidder":"opnx_ss","domain":"choctawnation.com","mobile":"0","report_date":"2025-05-28"},{"error_rate":"0.9105492115280044","chrome":"1","adomain":"mybobs.com","bidder":"rubicon","domain":"mybobs.com","mobile":"0","report_date":"2025-05-28"},{"error_rate":"0.9996387283236994","chrome":"0","adomain":"totalwine.com","bidder":"rubicon","domain":"totalwine.com","mobile":"1","report_date":"2025-05-28"},{"error_rate":"0.9999277247759468","chrome":"0","adomain":"totalwine.com","bidder":"rubicon","domain":"totalwine.com","mobile":"1","report_date":"2025-05-28"},{"error_rate":"0.999086869178791","chrome":"0","adomain":"mybobs.com","bidder":"openx","domain":"mybobs.com","mobile":"1","report_date":"2025-05-28"},{"error_rate":"0.998661311914324","chrome":"0","adomain":"mybobs.com","bidder":"openx","domain":"mybobs.com","mobile":"1","report_date":"2025-05-28"},{"error_rate":"0.9915101156069365","chrome":"0","adomain":"autozone.com","bidder":"rubi_ss","domain":"autozone.com","mobile":"0","report_date":"2025-05-28"},{"error_rate":"0.9874078071595611","chrome":"0","adomain":"autozone.com","bidder":"rubi_ss","domain":"autozone.com","mobile":"0","report_date":"2025-05-28"},{"error_rate":"1.0","chrome":"1","adomain":"www.choctawnation.com","bidder":"rubi_ss","domain":"www.choctawnation.com","mobile":"1","report_date":"2025-05-28"},{"error_rate":"0.9898526685530296","chrome":"0","adomain":"zippo.com","bidder":"rubicon","domain":"zippo.com","mobile":"1","report_date":"2025-05-28"},{"error_rate":"0.9976398859278198","chrome":"0","adomain":"zippo.com","bidder":"rubicon","domain":"zippo.com","mobile":"1","report_date":"2025-05-28"},{"error_rate":"0.9873639446224171","chrome":"0","adomain":"wendys.com","bidder":"rubi_ss","domain":"wendys.com","mobile":"1","report_date":"2025-05-28"},{"error_rate":"0.9881507035519767","chrome":"0","adomain":"wendys.com","bidder":"rubi_ss","domain":"wendys.com","mobile":"1","report_date":"2025-05-28"},{"error_rate":"0.9907016060862215","chrome":"0","adomain":"pretzelcrisps.com","bidder":"rubicon","domain":"pretzelcrisps.com","mobile":"1","report_date":"2025-05-28"},{"error_rate":"0.9910882716450921","chrome":"0","adomain":"pretzelcrisps.com","bidder":"rubicon","domain":"pretzelcrisps.com","mobile":"1","report_date":"2025-05-28"},{"error_rate":"0.9998995983935743","chrome":"0","adomain":"totalwine.com","bidder":"rubi_ss","domain":"totalwine.com","mobile":"1","report_date":"2025-05-28"},{"error_rate":"0.9992374530933317","chrome":"0","adomain":"totalwine.com","bidder":"rubi_ss","domain":"totalwine.com","mobile":"1","report_date":"2025-05-28"},{"error_rate":"0.9848843767625494","chrome":"0","adomain":"totalwine.com","bidder":"rubi_ss","domain":"totalwine.com","mobile":"0","report_date":"2025-05-28"},{"error_rate":"0.9912579473206177","chrome":"0","adomain":"totalwine.com","bidder":"rubi_ss","domain":"totalwine.com","mobile":"0","report_date":"2025-05-28"},{"error_rate":"0.9162245421872326","chrome":"1","adomain":"leovegas.com","bidder":"ix_ss","domain":"leovegas.com","mobile":"1","report_date":"2025-05-28"},{"error_rate":"0.9519871965857563","chrome":"1","adomain":"leovegas.com","bidder":"ix_ss","domain":"leovegas.com","mobile":"1","report_date":"2025-05-28"},{"error_rate":"0.9881911623308912","chrome":"0","adomain":"pretzelcrisps.com","bidder":"rubi_ss","domain":"pretzelcrisps.com","mobile":"1","report_date":"2025-05-28"},{"error_rate":"0.9888741326973114","chrome":"0","adomain":"pretzelcrisps.com","bidder":"rubi_ss","domain":"pretzelcrisps.com","mobile":"1","report_date":"2025-05-28"},{"error_rate":"0.9883955600403632","chrome":"1","adomain":"visa.com.sg","bidder":"rubicon","domain":"visa.com.sg","mobile":"1","report_date":"2025-05-28"},{"error_rate":"0.9966929534469601","chrome":"1","adomain":"visa.com.sg","bidder":"rubicon","domain":"visa.com.sg","mobile":"1","report_date":"2025-05-28"}],"country":"CO","region":"ANT","coreExperiments":[{"variants":[{"value":"off","weight":100},{"value":"extrashort","weight":0},{"value":"short","weight":0},{"value":"medium","weight":0},{"value":"long","weight":0},{"value":"mix","weight":0}],"type":"weightedChoice","lookupKey":"ADC","key":"AdDurationControl","abgroup":"adc"},{"variants":[{"value":"b","weight":0},{"value":"w","weight":100},{"value":"g25","weight":0}],"type":"weightedChoice","lookupKey":"TCMB2","key":"TopCenterMobileBackground","abgroup":"tcmb2"},{"variants":[{"value":"animatedFooter","weight":50},{"value":"expandableFooter","weight":50},{"value":"inRecipeRecommendationDesktop","weight":50},{"value":"inRecipeRecommendationMobile","weight":50},{"value":"largeFormatsDesktop","weight":50},{"value":"largeFormatsMobile","weight":50},{"value":"nativeDesktopContent","weight":50},{"value":"nativeDesktopRecipe","weight":50},{"value":"nativeDesktopSidebar","weight":50},{"value":"nativeMobileContent","weight":50},{"value":"nativeMobileRecipe","weight":50},{"value":"nativeDesktopHeader","weight":50},{"value":"nativeDesktopBelowPost","weight":50},{"value":"nativeMobileHeader","weight":50},{"value":"nativeMobileBelowPost","weight":50},{"value":"outstreamDesktop","weight":50},{"value":"outstreamMobile","weight":50},{"value":"sponsorTileDesktop","weight":50},{"value":"sponsorTileMobile","weight":50},{"value":"expandableCatalogAdsDesktop","weight":50},{"value":"expandableCatalogAdsMobile","weight":50},{"value":"miniscroller","weight":50},{"value":"interscroller","weight":50}],"type":"multivalueBernoulliTrial","lookupKey":"AT1","key":"AdType","abgroup":"at1"},{"variants":[{"value":0.5,"weight":90},{"value":1,"weight":10}],"type":"weightedChoice","lookupKey":"RRAV2","key":"ReduceRenderAboveViewport","abgroup":"rrav2"},{"variants":[{"value":"5,9","weight":10},{"value":"","weight":90}],"type":"weightedChoice","lookupKey":"ATD2","key":"AdTypeDays","abgroup":"atd2"},{"variants":[{"value":50,"weight":34},{"value":250,"weight":33},{"value":500,"weight":33}],"type":"weightedChoice","lookupKey":"MDLE1","key":"mdle","abgroup":"mdle1"},{"variants":[{"weight":100}],"type":"bernoulliTrial","lookupKey":"RVPS","key":"ReducedVideoPlayerSize","abgroup":"rvps"},{"variants":[{"weight":90}],"type":"bernoulliTrial","lookupKey":"WL","key":"WakeLock","abgroup":"wl"},{"variants":[{"weight":100}],"type":"bernoulliTrial","lookupKey":"PLFX","key":"PlaylistFix","abgroup":"plfx"},{"variants":[{"weight":95}],"type":"bernoulliTrial","lookupKey":"DELLOAD","key":"EnableDelayLoading","abgroup":"delload"},{"variants":[{"weight":99.5}],"type":"bernoulliTrial","lookupKey":"AMZN","key":"Amazon","abgroup":"amzn"},{"variants":[{"value":1.5,"weight":25},{"value":2,"weight":25},{"value":3,"weight":25},{"value":4,"weight":25}],"type":"weightedChoice","lookupKey":"FTO","key":"FloorBootstrap","abgroup":"fto"},{"variants":[{"value":1.5,"weight":25},{"value":2,"weight":25},{"value":3,"weight":25},{"value":4,"weight":25}],"type":"weightedChoice","lookupKey":"MTO","key":"MarmaladeBootstrap","abgroup":"mto"},{"variants":[{"weight":99}],"type":"bernoulliTrial","lookupKey":"OWSO","key":"OutstreamWithSOExperiment","abgroup":"owso"},{"variants":[{"weight":100}],"type":"bernoulliTrial","lookupKey":"PBM","key":"Playbackmethod","abgroup":"pbm"},{"variants":[{"value":30,"weight":100},{"value":15,"weight":0},{"value":10,"weight":0}],"type":"weightedChoice","lookupKey":"VMAXDUR","key":"VideoDuration","abgroup":"vmaxdur"},{"variants":[{"value":"all","weight":0},{"value":"adx","weight":100},{"value":"off","weight":0}],"type":"weightedChoice","lookupKey":"INTERS","key":"Interstitial","abgroup":"inters"},{"variants":[{"value":"all","weight":0},{"value":"adx","weight":90},{"value":"off","weight":10}],"type":"weightedChoice","lookupKey":"INTERS5","key":"InterstitialAlt","abgroup":"inters5"},{"variants":[{"value":"off","weight":95},{"value":"4","weight":4},{"value":"1","weight":1}],"type":"weightedChoice","lookupKey":"AYP","key":"ayp","abgroup":"ayp"},{"variants":[{"value":"both","weight":0},{"value":"client","weight":2},{"value":"server","weight":98}],"type":"weightedChoice","lookupKey":"KRGODRVID","key":"KargoVideo","abgroup":"krgodrvid"},{"variants":[{"value":"none","weight":98.9},{"value":"roxot","weight":0},{"value":"ay","weight":1},{"value":"generic","weight":0.1}],"type":"weightedChoice","lookupKey":"PBA2","key":"Analytics2","abgroup":"pba2"},{"variants":[{"value":0,"weight":20},{"value":5,"weight":20},{"value":10,"weight":20},{"value":25,"weight":20},{"value":50,"weight":20}],"type":"weightedChoice","lookupKey":"KWL","key":"KeywordLength","abgroup":"kwl"},{"variants":[{"value":1,"weight":34},{"value":2,"weight":33},{"value":3,"weight":33}],"type":"weightedChoice","lookupKey":"KPML","key":"KeywordPhraseMaxLength","abgroup":"kpml"},{"variants":[{"weight":50}],"type":"bernoulliTrial","lookupKey":"RCB","key":"RaptiveCreativeBlock","abgroup":"rcb"},{"variants":[{"value":"both","weight":50},{"value":"client","weight":0},{"value":"server","weight":50}],"type":"weightedChoice","lookupKey":"YAHOODR","key":"YahooSSP","abgroup":"yahoodr"},{"variants":[{"value":"both","weight":99},{"value":"server","weight":0},{"value":"client","weight":1}],"type":"weightedChoice","lookupKey":"IXDR","key":"IndexExchangeDoubleRequest","abgroup":"ixdr"},{"variants":[{"value":"both","weight":0},{"value":"client","weight":100},{"value":"server","weight":0}],"type":"weightedChoice","lookupKey":"YAHOODR1","key":"YahooSSP1","abgroup":"yahoodr1"},{"variants":[{"weight":0}],"type":"bernoulliTrial","lookupKey":"LOGFLTR","key":"LoggerFilter","abgroup":"logfltr"},{"variants":[{"weight":100}],"type":"bernoulliTrial","lookupKey":"RPM","key":"RaptivePlayerMobile","abgroup":"rpm"},{"variants":[{"weight":100}],"type":"bernoulliTrial","lookupKey":"RPD","key":"RaptivePlayerDesktop","abgroup":"rpd"},{"variants":[{"value":10,"weight":85},{"value":15,"weight":5},{"value":20,"weight":5},{"value":25,"weight":5}],"type":"weightedChoice","lookupKey":"RPSPDBT","key":"staleBufferTime","abgroup":"rpspdbt"},{"variants":[{"value":"tc","weight":0},{"value":"bl","weight":0},{"value":"br","weight":0},{"value":"off","weight":100}],"type":"weightedChoice","lookupKey":"SPLTV2","key":"VideoCollapsedLocations","abgroup":"spltv2"},{"variants":[{"value":900000,"weight":5,"abvalue":"900"},{"value":600000,"weight":5,"abvalue":"600"},{"value":300000,"weight":5,"abvalue":"300"},{"value":10000,"weight":0,"abvalue":"10"},{"value":-1,"weight":5,"abvalue":"tdoc"},{"value":0,"weight":80}],"type":"weightedChoice","lookupKey":"RPTD","key":"RaptiveTearDownPlayer","abgroup":"rptd"},{"variants":[{"weight":50}],"type":"bernoulliTrial","lookupKey":"RPM_TEST","key":"RaptivePlayerMobile_test","abgroup":"rpm_test"},{"variants":[{"weight":50}],"type":"bernoulliTrial","lookupKey":"RPD_TEST","key":"RaptivePlayerDesktop_test","abgroup":"rpd_test"},{"variants":[{"weight":100}],"type":"bernoulliTrial","lookupKey":"RPM_TEST2","key":"RaptivePlayerMobile_test2","abgroup":"rpm_test2"},{"variants":[{"weight":100}],"type":"bernoulliTrial","lookupKey":"RPD_TEST2","key":"RaptivePlayerDesktop_test2","abgroup":"rpd_test2"},{"variants":[{"weight":50}],"type":"bernoulliTrial","lookupKey":"FLDG","key":"FledgeGPT","abgroup":"fldg"},{"variants":[{"weight":100}],"type":"bernoulliTrial","lookupKey":"FLDGLOG","key":"FledgeLogging","abgroup":"fldglog"},{"variants":[{"weight":50}],"type":"bernoulliTrial","lookupKey":"AED","key":"ContentAdExpansion","abgroup":"aed"},{"variants":[{"weight":100}],"type":"bernoulliTrial","lookupKey":"AED1","key":"AdExpansion","abgroup":"aed1"},{"variants":[{"weight":100}],"type":"bernoulliTrial","lookupKey":"ESSA","key":"EnhancedStickySidebarAds","abgroup":"essa"},{"variants":[{"value":50,"weight":40},{"value":1000,"weight":20},{"value":3000,"weight":20},{"value":5000,"weight":20}],"type":"weightedChoice","lookupKey":"DEFTIMER3","key":"DelayLoading","abgroup":"deftimer3"},{"variants":[{"weight":100}],"type":"bernoulliTrial","lookupKey":"WVTLS","key":"WebVitals","abgroup":"wvtls"},{"variants":[{"weight":100}],"type":"bernoulliTrial","lookupKey":"WVTLSCLS","key":"WebVitals_CLSRefactor","abgroup":"wvtlscls"},{"variants":[{"weight":1}],"type":"bernoulliTrial","lookupKey":"LOGLEV","key":"ImpressionLog","abgroup":"loglev"},{"variants":[{"weight":1}],"type":"bernoulliTrial","lookupKey":"SENS_OFF","key":"SensOff","abgroup":"sens_off"},{"variants":[{"weight":100}],"type":"bernoulliTrial","lookupKey":"RTBF","key":"RtbHouseExperiment","abgroup":"rtbf"},{"variants":[{"weight":100}],"type":"bernoulliTrial","lookupKey":"SAB","key":"BidLimit","abgroup":"sab"},{"variants":[{"weight":0}],"type":"bernoulliTrial","lookupKey":"DGC","key":"DelayGamCall","abgroup":"dgc"},{"variants":[{"weight":95}],"type":"bernoulliTrial","lookupKey":"JWB","key":"JwBoost","abgroup":"jwb"},{"variants":[{"weight":10}],"type":"bernoulliTrial","lookupKey":"LOGCLS","key":"LayoutShift","abgroup":"logcls"},{"variants":[{"value":5000,"weight":40,"abvalue":"5s"},{"value":10000,"weight":40,"abvalue":"10s"},{"value":15000,"weight":20,"abvalue":"15s"}],"type":"weightedChoice","lookupKey":"VAST_TO","key":"VastTimeout","abgroup":"vast_to"},{"variants":[{"value":15000,"weight":60,"abvalue":"15s"},{"value":18000,"weight":20,"abvalue":"18s"},{"value":20000,"weight":20,"abvalue":"20s"}],"type":"weightedChoice","lookupKey":"VASTTOISV","key":"VastTimeoutISV","abgroup":"vasttoisv"},{"variants":[{"value":"mOinGM9MTu5v-Lto835XLhlrSPY","weight":85,"abvalue":"main"},{"value":"HNS5BPofqNhjJ0uaex6oavjNklg","weight":5,"abvalue":"1"},{"value":"8bGsXqcT6wQIoFOgjoW97C-Xeb8","weight":5,"abvalue":"2"},{"value":"wyN88rwU6FImxcXgha7IWE-FzsE","weight":5,"abvalue":"test"}],"type":"weightedChoice","lookupKey":"CNFTP","key":"ConfiantProperty","abgroup":"cnftp"},{"variants":[{"value":3000,"weight":80,"abvalue":"3s"},{"value":2000,"weight":10,"abvalue":"2s"},{"value":1000,"weight":10,"abvalue":"1s"}],"type":"weightedChoice","lookupKey":"VASTTOOSV","key":"VastTimeoutOSV","abgroup":"vasttoosv"},{"variants":[{"weight":100}],"type":"bernoulliTrial","lookupKey":"SRE","key":"SlotResize","abgroup":"sre"},{"variants":[{"weight":25}],"type":"bernoulliTrial","lookupKey":"ADDENS","key":"AdDensity","abgroup":"addens"},{"variants":[{"weight":99}],"type":"bernoulliTrial","lookupKey":"BMETRICS","key":"BrandMetrics","abgroup":"bmetrics"},{"variants":[{"weight":95}],"type":"bernoulliTrial","lookupKey":"REBUILDSLOT","key":"RefreshRebuild","abgroup":"rebuildslot"},{"variants":[{"weight":0}],"type":"bernoulliTrial","lookupKey":"NLSENTRCKR","key":"NielsenTracker","abgroup":"nlsentrckr"},{"variants":[{"weight":100}],"type":"bernoulliTrial","lookupKey":"VADV","key":"AdvancePlaylistExperiment","abgroup":"vadv"},{"variants":[{"weight":95}],"type":"bernoulliTrial","lookupKey":"TPCAPI","key":"TopicsAPI","abgroup":"tpcapi"},{"variants":[{"weight":10}],"type":"bernoulliTrial","lookupKey":"CRTVMON","key":"CreativeMonitoring","abgroup":"crtvmon"},{"variants":[{"value":"1.00","weight":25},{"value":"1.50","weight":25},{"value":"2.00","weight":25},{"value":"2.50","weight":25}],"type":"weightedChoice","lookupKey":"FAF","key":"FasterAdsFloors","abgroup":"faf"},{"variants":[{"value":700,"weight":50},{"value":500,"weight":50}],"type":"weightedChoice","lookupKey":"ESSAM","key":"EnhancedStickySidebarAdsMargin","abgroup":"essam"},{"variants":[{"value":"rubi","weight":0},{"value":"rapml","weight":1},{"value":"cm","weight":0},{"value":"fbmag","weight":0},{"value":"fbrap","weight":98},{"value":"none","weight":1}],"type":"weightedChoice","lookupKey":"FLRML1","key":"Floors","abgroup":"flrml1"},{"variants":[{"value":"on","weight":5},{"value":"off","weight":95}],"type":"weightedChoice","lookupKey":"PBSFLR","key":"PBSFloor","abgroup":"pbsflr"},{"variants":[{"value":"on","weight":5},{"value":"off","weight":95}],"type":"weightedChoice","lookupKey":"PBSFLR1","key":"PBSFloor1","abgroup":"pbsflr1"},{"variants":[{"value":"1_1","weight":19},{"value":"1_2","weight":19},{"value":"1_3","weight":19},{"value":"1_4","weight":19},{"value":"1_5","weight":19},{"value":"off","weight":5}],"type":"weightedChoice","lookupKey":"TTDDEALFLR","key":"TTDDealFloor","abgroup":"ttddealflr"},{"variants":[{"weight":0}],"type":"bernoulliTrial","lookupKey":"AMZN_HOLD_LOAD","key":"AmazonHoldLoad","abgroup":"amzn_hold_load"},{"variants":[{"weight":0}],"type":"bernoulliTrial","lookupKey":"RMOS1","key":"OneVideoStream","abgroup":"rmos1"},{"variants":[{"value":900000,"weight":5,"abvalue":"900"},{"value":600000,"weight":5,"abvalue":"600"},{"value":300000,"weight":5,"abvalue":"300"},{"value":-1,"weight":5,"abvalue":"tdoc"},{"value":0,"weight":80}],"type":"weightedChoice","lookupKey":"MGTDTW","key":"TearDownPlayer","abgroup":"mgtdtw"},{"variants":[{"weight":50}],"type":"bernoulliTrial","lookupKey":"AMZN_HOLD_DISP","key":"AmazonHoldDisplay","abgroup":"amzn_hold_disp"},{"variants":[{"weight":100}],"type":"bernoulliTrial","lookupKey":"HCGP","key":"HemCaptureGatedPrint","abgroup":"hcgp"},{"variants":[{"weight":100}],"type":"bernoulliTrial","lookupKey":"DAJTO","key":"DisableAjaxTimeout","abgroup":"dajto"},{"variants":[{"weight":100}],"type":"bernoulliTrial","lookupKey":"SMAD300","key":"RemoveLargeSidebar","abgroup":"smad300"},{"variants":[{"weight":100}],"type":"bernoulliTrial","lookupKey":"RVADV_AB1","key":"AdvancePlaylistRelated","abgroup":"rvadv_ab1"},{"variants":[{"value":6000,"weight":5,"abvalue":"6s"},{"value":4000,"weight":75,"abvalue":"4s"},{"value":2000,"weight":15,"abvalue":"2s"},{"value":0,"weight":5,"abvalue":"0s"}],"type":"weightedChoice","lookupKey":"CBT","key":"CloseButtonTimeout","abgroup":"cbt"},{"variants":[{"value":0,"weight":85,"abvalue":"0s"},{"value":1000,"weight":5,"abvalue":"1s"},{"value":2000,"weight":5,"abvalue":"2s"},{"value":3000,"weight":5,"abvalue":"3s"}],"type":"weightedChoice","lookupKey":"SOCBDE","key":"StickyOutstreamCloseButtonTimeout","abgroup":"socbde"},{"variants":[{"value":10000,"weight":20,"abvalue":"10"},{"value":15000,"weight":60,"abvalue":"15"},{"value":20000,"weight":20,"abvalue":"20"}],"type":"weightedChoice","lookupKey":"REQTO","key":"JwRequestTimeout","abgroup":"reqTo"},{"variants":[{"weight":3}],"type":"bernoulliTrial","lookupKey":"ADDUR","key":"LogAdDuration","abgroup":"addur"},{"variants":[{"value":"ix","weight":99.5},{"value":"mn","weight":96},{"value":"ox","weight":99},{"value":"pu","weight":95},{"value":"un","weight":90},{"value":"ma","weight":99},{"value":"sh","weight":90},{"value":"st","weight":90},{"value":"sb","weight":99},{"value":"sv","weight":75},{"value":"tl","weight":99},{"value":"yh","weight":0},{"value":"mg","weight":99},{"value":"xr","weight":99},{"value":"ot","weight":75},{"value":"ax","weight":100},{"value":"ch","weight":100},{"value":"cr","weight":100},{"value":"gg","weight":100},{"value":"kg","weight":100},{"value":"td","weight":100},{"value":"ym","weight":90}],"type":"multivalueBernoulliTrial","lookupKey":"DOBA","key":"DisplayOpenBidderExperiment","abgroup":"doba"},{"variants":[{"value":"ax","weight":100},{"value":"ix","weight":95},{"value":"mn","weight":99},{"value":"ox","weight":90},{"value":"pu","weight":95},{"value":"un","weight":95},{"value":"ma","weight":95},{"value":"sx","weight":100},{"value":"tl","weight":99},{"value":"yh","weight":80},{"value":"sh","weight":70},{"value":"ym","weight":55},{"value":"mg","weight":99},{"value":"xr","weight":99},{"value":"gg","weight":95},{"value":"ot","weight":75},{"value":"sv","weight":75}],"type":"multivalueBernoulliTrial","lookupKey":"VOBA","key":"VideoOpenBidderExperiment","abgroup":"voba"},{"variants":[{"value":"ix","weight":80},{"value":"ma","weight":80},{"value":"mn","weight":90},{"value":"ox","weight":80},{"value":"pu","weight":80},{"value":"sh","weight":90},{"value":"tl","weight":90},{"value":"ts","weight":90}],"type":"multivalueBernoulliTrial","lookupKey":"UID1BS","key":"UID1BidderSupression","abgroup":"uid1bs"},{"variants":[{"value":2,"weight":97},{"value":3,"weight":3}],"type":"weightedChoice","lookupKey":"OSP","key":"OutstreamPlacementExperiment","abgroup":"osp"},{"variants":[{"value":2,"weight":0},{"value":3,"weight":100}],"type":"weightedChoice","lookupKey":"OSP2","key":"OutstreamPlacementExperiment2","abgroup":"osp2"},{"variants":[{"value":0.8,"weight":25},{"value":1,"weight":25},{"value":1.2,"weight":25},{"value":1.4,"weight":25}],"type":"weightedChoice","lookupKey":"FLRMLTP","key":"SingleFloorMultiplier","abgroup":"flrmltp"},{"variants":[{"value":1.25,"weight":5},{"value":1.3,"weight":15},{"value":1.35,"weight":59},{"value":1.4,"weight":15},{"value":1.45,"weight":5},{"value":"off","weight":1}],"type":"weightedChoice","lookupKey":"BPFLMULT2","key":"LazyFloorMultiplier","abgroup":"bpflmult3"},{"variants":[{"weight":50}],"type":"bernoulliTrial","lookupKey":"MGNCRBN","key":"MagniteCarbon","abgroup":"mgncrbn"},{"variants":[{"weight":90}],"type":"bernoulliTrial","lookupKey":"TS","key":"TrafficShaping","abgroup":"ts"},{"variants":[{"weight":10}],"type":"bernoulliTrial","lookupKey":"ADLIFECYC","key":"LogAdLifeCycle","abgroup":"adlifecyc"},{"variants":[{"weight":100}],"type":"bernoulliTrial","lookupKey":"SOFC","key":"StickyOutstreamFooterCollision","abgroup":"sofc"},{"variants":[{"weight":100}],"type":"bernoulliTrial","lookupKey":"FAN","key":"FooterAnchorAd","abgroup":"fan"},{"variants":[{"weight":100}],"type":"bernoulliTrial","lookupKey":"NOSVP","key":"OutstreamRendererExperiment","abgroup":"nosvp"},{"variants":[{"weight":100}],"type":"bernoulliTrial","lookupKey":"SOSPP","key":"StickyOutstreamOnStickyPlayerPages","abgroup":"sospp"},{"variants":[{"weight":1}],"type":"bernoulliTrial","lookupKey":"SIDP","key":"SharedIdPlugin","abgroup":"sidp"},{"variants":[{"weight":1}],"type":"bernoulliTrial","lookupKey":"DOFRE","key":"DisplayBackupRenderer","abgroup":"dofre"},{"variants":[{"value":"strict","weight":0},{"value":"relaxed","weight":100},{"value":"off","weight":0}],"type":"weightedChoice","lookupKey":"DCO","key":"DemandChain","abgroup":"dco"},{"variants":[{"value":1.3,"weight":25},{"value":1.5,"weight":25},{"value":1.7,"weight":25},{"value":"off","weight":25}],"label":"RPBS","type":"weightedChoice","lookupKey":"OAT","key":"RPBSOptimizedActionTime","abgroup":"oat"},{"variants":[{"value":100,"weight":25},{"value":200,"weight":50,"abvalue":"off"},{"value":300,"weight":25}],"type":"weightedChoice","lookupKey":"S2SBUFF","key":"S2SBuffer","abgroup":"s2sbuff"},{"variants":[{"value":0,"weight":85},{"value":1,"weight":5},{"value":500,"weight":5},{"value":1000,"weight":5}],"type":"weightedChoice","lookupKey":"ADT","key":"AuctionDelay","abgroup":"adt"},{"variants":[{"value":400,"weight":33},{"value":500,"weight":34},{"value":600,"weight":33}],"type":"weightedChoice","lookupKey":"ADT3","key":"AuctionDelay_2","abgroup":"adt3"},{"variants":[{"weight":25,"value":"on5"},{"weight":25,"value":"on7"},{"weight":25,"value":"on10"},{"weight":25,"value":"off"}],"type":"weightedChoice","lookupKey":"TCKSCROLL","key":"TrackScrollExperiment","abgroup":"tckscroll"},{"variants":[{"weight":90,"value":[5,7,10]},{"weight":10,"value":"off"}],"type":"weightedChoice","lookupKey":"TCKSCROLL2","key":"TrackScrollExperiment2","abgroup":"tckscroll2"},{"variants":[{"value":1,"weight":97},{"value":1.1,"weight":1},{"value":1.2,"weight":1},{"value":1.3,"weight":1}],"type":"weightedChoice","lookupKey":"REFVIDFLR","key":"FloorsInstreamRefresh","abgroup":"refvidflr"},{"variants":[{"value":0.4,"weight":25},{"value":0.5,"weight":25},{"value":0.6,"weight":25},{"value":0.7,"weight":25}],"type":"weightedChoice","lookupKey":"SESFLRSO","key":"SessionFloorStickyOutstreamPercentileExperiment","abgroup":"sesflrso"},{"variants":[{"value":0.6,"weight":10},{"value":0.7,"weight":10},{"value":0.75,"weight":10},{"value":0.8,"weight":50},{"value":0.85,"weight":10},{"value":0.9,"weight":10}],"type":"weightedChoice","lookupKey":"SESFLRDIS","key":"SessionFloorDisplayPercentileExperiment","abgroup":"sesflrdis"},{"variants":[{"value":0.6,"weight":20},{"value":0.7,"weight":60},{"value":0.8,"weight":20}],"type":"weightedChoice","lookupKey":"SESFLRVID2","key":"SessionFloorVideoPercentileExperiment","abgroup":"sesflrvid2"},{"variants":[{"value":0,"weight":5},{"value":1.1,"weight":10},{"value":1.2,"weight":10},{"value":1.3,"weight":10},{"value":1.4,"weight":10},{"value":"ml","weight":55}],"type":"weightedChoice","lookupKey":"REFSOFLR","key":"FloorsStickyOutstreamRefresh","abgroup":"refsoflr"},{"variants":[{"value":0,"weight":33},{"value":1,"weight":33},{"value":1.5,"weight":34}],"type":"weightedChoice","lookupKey":"SOCON","key":"SuppressOutreamSlowConnection","abgroup":"socon"},{"variants":[{"weight":25}],"type":"bernoulliTrial","lookupKey":"UPL","key":"UserPageDataLogging","abgroup":"upl"},{"variants":[{"weight":1}],"type":"bernoulliTrial","lookupKey":"AOS","key":"AdditionalOutstreamUnitsExperiment","abgroup":"aos"},{"variants":[{"weight":10}],"type":"bernoulliTrial","lookupKey":"DATAPRIV","key":"UserPageDataPrivacyLogging","abgroup":"datapriv"},{"variants":[{"value":500,"weight":25},{"value":1000,"weight":25},{"value":1500,"weight":25},{"value":2000,"weight":25}],"type":"weightedChoice","lookupKey":"FAITE","key":"FasterAdsInitialTimeoutExperiment","abgroup":"faite"},{"variants":[{"value":2000,"weight":10},{"value":2100,"weight":15},{"value":2200,"weight":50},{"value":2300,"weight":15},{"value":2400,"weight":10}],"type":"weightedChoice","lookupKey":"ITO_DF","key":"InitialTimeoutDesktopFastExperiment","abgroup":"ito_df"},{"variants":[{"value":2600,"weight":10},{"value":2700,"weight":15},{"value":2800,"weight":50},{"value":2900,"weight":15},{"value":3000,"weight":10}],"type":"weightedChoice","lookupKey":"ITO_DS","key":"InitialTimeoutDesktopSlowExperiment","abgroup":"ito_ds"},{"variants":[{"value":2400,"weight":10},{"value":2500,"weight":15},{"value":2600,"weight":50},{"value":2700,"weight":15},{"value":2800,"weight":10}],"type":"weightedChoice","lookupKey":"ITO_DN","key":"InitialTimeoutDesktopUnknownExperiment","abgroup":"ito_dn"},{"variants":[{"value":"off","weight":90},{"value":"nobid","weight":5},{"value":"always","weight":4},{"value":"bid","weight":1}],"label":"RPBS","type":"weightedChoice","lookupKey":"RRB","key":"RPBSReRequestBidders","abgroup":"rrb"},{"variants":[{"value":2400,"weight":10},{"value":2500,"weight":15},{"value":2600,"weight":50},{"value":2700,"weight":15},{"value":2800,"weight":10}],"type":"weightedChoice","lookupKey":"ITO_MF","key":"InitialTimeoutMobileFastExperiment","abgroup":"ito_mf"},{"variants":[{"value":2600,"weight":10},{"value":2700,"weight":15},{"value":2800,"weight":50},{"value":2900,"weight":15},{"value":3000,"weight":10}],"type":"weightedChoice","lookupKey":"ITO_MS","key":"InitialTimeoutMobileSlowExperiment","abgroup":"ito_ms"},{"variants":[{"value":2600,"weight":10},{"value":2700,"weight":15},{"value":2800,"weight":50},{"value":2900,"weight":15},{"value":3000,"weight":10}],"type":"weightedChoice","lookupKey":"ITO_MN","key":"InitialTimeoutMobileUnknownExperiment","abgroup":"ito_mn"},{"variants":[{"value":"on","weight":0},{"value":"off","weight":60},{"value":"vpr","weight":30},{"value":"dbc","weight":10}],"type":"weightedChoice","lookupKey":"IROE","key":"InstreamRerequestOnError","abgroup":"iroe"},{"variants":[{"value":"on","weight":0},{"value":"off","weight":5},{"value":"vpr","weight":0},{"value":"vpr2","weight":95}],"type":"weightedChoice","lookupKey":"RIROE","key":"RaptiveInstreamRerequestOnError","abgroup":"riroe"},{"variants":[{"value":"on","weight":0},{"value":"off","weight":5},{"value":"vpr","weight":0},{"value":"vpr2","weight":95},{"value":"dbc","weight":0}],"type":"weightedChoice","lookupKey":"IROE2","key":"InstreamRerequestOnError2","abgroup":"iroe2"},{"variants":[{"value":"id5Id","weight":5},{"value":"identityLink","weight":1},{"value":"pairId","weight":1},{"value":"unifiedId","weight":1},{"value":"unifiedId2","weight":1},{"value":"sharedId","weight":1},{"value":"criteo","weight":5},{"value":"connectId","weight":5},{"value":"fabrickId","weight":99},{"value":"FTrackId","weight":95},{"value":"33acrossId","weight":5},{"value":"liveIntentId","weight":1},{"value":"linkedInAdsId","weight":10},{"value":"lotamePanoramaId","weight":5},{"value":"merkleId","weight":25},{"value":"merkuryId","weight":5}],"type":"multivalueBernoulliTrial","lookupKey":"IDHO","key":"IDHO","abgroup":"idho"},{"variants":[{"weight":90}],"type":"bernoulliTrial","lookupKey":"IDGUID3","key":"IdGraphUid2","abgroup":"idguid3"},{"variants":[{"weight":98}],"type":"bernoulliTrial","lookupKey":"IDGLR","key":"IdGraphLiveRamp","abgroup":"idglr"},{"variants":[{"weight":99}],"type":"bernoulliTrial","lookupKey":"AYUSRMC","key":"AYUserSyncReplaceMacro","abgroup":"ayusrmc"},{"variants":[{"value":"aidem","weight":100},{"value":"appnexus","weight":1},{"value":"conversant","weight":1},{"value":"criteo","weight":1},{"value":"gridvid","weight":1},{"value":"gumgum","weight":50},{"value":"improvedigital","weight":75},{"value":"ix","weight":0.5},{"value":"openx","weight":1},{"value":"pubmatic","weight":1},{"value":"resetdigital","weight":100},{"value":"rubicon","weight":1},{"value":"sharethrough","weight":1},{"value":"stackadapt","weight":1},{"value":"triplelift","weight":1},{"value":"ttd","weight":1},{"value":"unruly","weight":1},{"value":"undertone","weight":10},{"value":"yahoossp","weight":1},{"value":"kargo","weight":1},{"value":"33across","weight":100},{"value":"onetag","weight":10},{"value":"adform","weight":95},{"value":"nativo","weight":1}],"type":"multivalueBernoulliTrial","lookupKey":"VBHO2","key":"VBHO2","abgroup":"vbho2"},{"variants":[{"weight":100}],"type":"bernoulliTrial","lookupKey":"VBHORISE","key":"VBHORise","abgroup":"vbhorise"},{"variants":[{"value":"33across","weight":25},{"value":"aidem","weight":100},{"value":"appnexus","weight":1},{"value":"conversant","weight":10},{"value":"criteo","weight":1},{"value":"grid","weight":10},{"value":"gumgum","weight":5},{"value":"kargo","weight":1},{"value":"improvedigital","weight":75},{"value":"ix","weight":0.5},{"value":"nativo","weight":1},{"value":"openx","weight":1},{"value":"ozone","weight":1},{"value":"pubmatic","weight":1},{"value":"resetdigital","weight":100},{"value":"rtbhouse","weight":100},{"value":"rubicon","weight":1},{"value":"sharethrough","weight":5},{"value":"stackadapt","weight":1},{"value":"teads","weight":1},{"value":"triplelift","weight":0.5},{"value":"ttd","weight":1},{"value":"undertone","weight":1},{"value":"unruly","weight":1},{"value":"yahoossp","weight":1},{"value":"yieldmo","weight":1},{"value":"adform","weight":95},{"value":"flipp","weight":5},{"value":"ogury","weight":1}],"type":"multivalueBernoulliTrial","lookupKey":"HBHO2","key":"HBHO2","abgroup":"hbho2"},{"label":"RPBS","variants":[{"weight":0}],"type":"bernoulliTrial","lookupKey":"BPS","key":"BiddersPerStage","abgroup":"bps"},{"variants":[{"weight":100}],"type":"bernoulliTrial","lookupKey":"HBHORISE","key":"HBHORise","abgroup":"hbhorise"},{"variants":[{"value":["animatedFooter"],"weight":6},{"value":["expandableFooter"],"weight":6},{"value":["inRecipeRecommendationDesktop","inRecipeRecommendationMobile"],"weight":6},{"value":["largeFormatsDesktop","largeFormatsMobile"],"weight":6},{"value":["nativeDesktopSidebar"],"weight":6},{"value":["nativeDesktopContent","nativeMobileContent"],"weight":6},{"value":["nativeDesktopRecipe","nativeMobileRecipe"],"weight":6},{"value":["nativeDesktopHeader","nativeMobileHeader"],"weight":6},{"value":["nativeDesktopBelowPost","nativeMobileBelowPost"],"weight":6},{"value":["outstreamDesktop","outstreamMobile"],"weight":6},{"value":["sponsorTileDesktop","sponsorTileMobile"],"weight":6},{"value":["expandableCatalogAdsDesktop","expandableCatalogAdsMobile"],"weight":6},{"value":["miniscroller"],"weight":6},{"value":["interscroller"],"weight":6},{"value":["skylineHeader"],"weight":6},{"value":["control"],"weight":10}],"type":"weightedChoice","lookupKey":"ATDH","key":"AdTypeDaysHoldout","abgroup":"atdh"},{"variants":[{"value":"animatedFooter","weight":0},{"value":"expandableFooter","weight":0},{"value":"miniscroller","weight":0},{"value":"interscroller","weight":0}],"type":"multivalueBernoulliTrial","lookupKey":"ATHMB","key":"AdTypeHoldout","abgroup":"athmb"},{"variants":[{"value":"33across","weight":0},{"value":"appnexus","weight":0},{"value":"conversant","weight":0},{"value":"criteo","weight":0},{"value":"grid","weight":0},{"value":"gridvid","weight":0},{"value":"gumgum","weight":0},{"value":"kargo","weight":0},{"value":"improvedigital","weight":100},{"value":"ix","weight":0},{"value":"nativo","weight":0},{"value":"openx","weight":0},{"value":"pubmatic","weight":0},{"value":"resetdigital","weight":0},{"value":"rtbhouse","weight":0},{"value":"rubicon","weight":0},{"value":"sharethrough","weight":0},{"value":"teads","weight":0},{"value":"triplelift","weight":0},{"value":"ttd","weight":0},{"value":"undertone","weight":0},{"value":"unruly","weight":0},{"value":"yahoossp","weight":0},{"value":"yieldmo","weight":0},{"value":"onetag","weight":0}],"type":"multivalueBernoulliTrial","lookupKey":"ALLBHO","key":"AllBidderHO","abgroup":"allbho"},{"variants":[{"value":"amzn","weight":25},{"value":"gumgum","weight":25},{"value":"kargo","weight":25},{"value":"sharethrough","weight":25},{"value":"teads","weight":25},{"value":"triplelift","weight":25},{"value":"undertone","weight":25},{"value":"yieldmo","weight":25}],"type":"multivalueBernoulliTrial","lookupKey":"SFBHO","key":"SFBHO","abgroup":"sfbho"},{"variants":[{"value":"33across","weight":100},{"value":"appnexus","weight":5},{"value":"conversant","weight":100},{"value":"grid","weight":100},{"value":"gumgum","weight":2},{"value":"improve_ss","weight":100},{"value":"pubm_ss","weight":100},{"value":"resetdigital","weight":100},{"value":"under_ss","weight":100},{"value":"unruly","weight":100},{"value":"yieldmo","weight":100},{"value":"adform","weight":100},{"value":"aidem_ss","weight":100},{"value":"gridnat","weight":100},{"value":"rubi_ss","weight":100},{"value":"flipp","weight":100},{"value":"rise","weight":100},{"value":"tripl_ss","weight":100},{"value":"rubiv_ss","weight":100},{"value":"opnx_ss","weight":100},{"value":"share_ss","weight":100},{"value":"crit_ss","weight":100},{"value":"ntvo_ss","weight":100},{"value":"ogury","weight":100}],"type":"multivalueBernoulliTrial","lookupKey":"PBS2S","key":"S2S","abgroup":"pbs2s"},{"variants":[{"weight":0}],"type":"bernoulliTrial","lookupKey":"EUE","key":"EUEndpoint","abgroup":"eue"},{"variants":[{"value":"33across","weight":100},{"value":"appnexus","weight":5},{"value":"conversant","weight":100},{"value":"grid","weight":100},{"value":"gumgum","weight":2},{"value":"improve_ss","weight":100},{"value":"openx","weight":1},{"value":"pubm_ss","weight":100},{"value":"resetdigital","weight":100},{"value":"under_ss","weight":100},{"value":"unruly","weight":100},{"value":"yieldmo","weight":100},{"value":"adform","weight":100},{"value":"aidem_ss","weight":100},{"value":"gridnat","weight":100},{"value":"rubi_ss","weight":100},{"value":"flipp","weight":100},{"value":"rise","weight":100},{"value":"tripl_ss","weight":100},{"value":"rubiv_ss","weight":100},{"value":"opnx_ss","weight":100},{"value":"share_ss","weight":100},{"value":"crit_ss","weight":100},{"value":"ttd","weight":100}],"type":"multivalueBernoulliTrial","lookupKey":"PBS2S2","key":"S2S2","abgroup":"pbs2s2"},{"variants":[{"value":"33across","weight":100},{"value":"appnexus","weight":5},{"value":"conversant","weight":100},{"value":"grid","weight":100},{"value":"gumgum","weight":2},{"value":"improve_ss","weight":100},{"value":"openx","weight":100},{"value":"pubm_ss","weight":100},{"value":"resetdigital","weight":100},{"value":"under_ss","weight":100},{"value":"unruly","weight":100},{"value":"yieldmo","weight":100},{"value":"adform","weight":100},{"value":"aidem_ss","weight":100},{"value":"gridnat","weight":100},{"value":"rubi_ss","weight":100},{"value":"flipp","weight":100},{"value":"rise","weight":100},{"value":"tripl_ss","weight":100},{"value":"rubiv_ss","weight":100},{"value":"opnx_ss","weight":100},{"value":"share_ss","weight":100},{"value":"crit_ss","weight":100},{"value":"ntvo_ss","weight":100}],"type":"multivalueBernoulliTrial","lookupKey":"PBS2S3","key":"S2S3","abgroup":"pbs2s3"},{"variants":[{"value":"s1","weight":50},{"value":"s2","weight":50}],"type":"weightedChoice","lookupKey":"MXB","key":"MutuallyExclusiveBidders","abgroup":"mxb"},{"variants":[{"value":0,"weight":20},{"value":50,"weight":16},{"value":200,"weight":16},{"value":500,"weight":16},{"value":1000,"weight":16},{"value":2000,"weight":16}],"type":"weightedChoice","lookupKey":"ABT1","key":"AmazonBootstrapTimeoutExperiment","abgroup":"abt1"},{"variants":[{"value":1,"weight":70},{"value":2,"weight":10},{"value":3,"weight":10},{"value":4,"weight":10}],"type":"weightedChoice","lookupKey":"USYNCTRIG","key":"UserSyncTrigger","abgroup":"usynctrig"},{"variants":[{"value":1,"weight":25},{"value":3,"weight":25},{"value":5,"weight":25},{"value":7,"weight":25}],"type":"weightedChoice","lookupKey":"CSYNC_LIM","key":"UserSyncLimit","abgroup":"csync_lim"},{"variants":[{"weight":5}],"type":"bernoulliTrial","lookupKey":"FOREX","key":"CurrencyConversion","abgroup":"forex"},{"variants":[{"weight":5}],"type":"bernoulliTrial","lookupKey":"CFIP_BRHO","key":"CFIpBidReqHoldout","abgroup":"cfip_brho"},{"variants":[{"weight":95}],"type":"bernoulliTrial","lookupKey":"CFIP_IDPHO","key":"CFIdParHoldout","abgroup":"cfip_idpho"},{"variants":[{"weight":20}],"type":"bernoulliTrial","lookupKey":"LRSS","key":"LiverampSecureSignals","abgroup":"lrss"},{"variants":[{"weight":40}],"type":"bernoulliTrial","lookupKey":"OTKE","key":"OptTknEndpoint","abgroup":"otke"},{"variants":[{"weight":100}],"type":"bernoulliTrial","lookupKey":"ROG_2","key":"Optable","abgroup":"rog_2"},{"variants":[{"value":"US","weight":100},{"value":"CA","weight":100},{"value":"GB","weight":100},{"value":"UK","weight":100},{"value":"AU","weight":100}],"type":"multivalueBernoulliTrial","lookupKey":"OPTCA","key":"OptableCountryAllowlist","abgroup":"optca"},{"variants":[{"value":"US-VT","weight":100},{"value":"US-NE","weight":100},{"value":"US-LA","weight":100},{"value":"US-MO","weight":100},{"value":"CA-QC","weight":100}],"type":"multivalueBernoulliTrial","lookupKey":"OPTCRB","key":"OptableCountryRegionBlocklist","abgroup":"optcrb"},{"variants":[{"weight":30}],"type":"bernoulliTrial","lookupKey":"ROGID5HEM","key":"OptableId5ResolveHems","abgroup":"rog_id5hem"},{"variants":[{"weight":0}],"type":"bernoulliTrial","lookupKey":"OPTID5RRT","key":"OptableId5ResolveRouteTest","abgroup":"optid5rrt"},{"variants":[{"weight":100}],"type":"bernoulliTrial","lookupKey":"ROGHEM_4","key":"UseOptableHem","abgroup":"roghem_4"},{"variants":[{"weight":99}],"type":"bernoulliTrial","lookupKey":"SDKLI","key":"LiveIntentHem","abgroup":"sdkli"},{"variants":[{"weight":100}],"type":"bernoulliTrial","lookupKey":"SDKLIR","key":"LiveIntentUid2Hem","abgroup":"sdklir"},{"variants":[{"weight":0}],"type":"bernoulliTrial","lookupKey":"OTTPD","key":"OptableTestThirdPartyDCN","abgroup":"ottpd"},{"variants":[{"weight":0}],"type":"bernoulliTrial","lookupKey":"ROGCU","key":"Uid2TokenCleanup","abgroup":"rogcu"},{"variants":[{"weight":100}],"type":"bernoulliTrial","lookupKey":"SPA","key":"SinglePageAppSupport","abgroup":"spa"},{"variants":[{"weight":99}],"type":"bernoulliTrial","lookupKey":"S2SPARAM","key":"OrtbEnrich","abgroup":"s2sparam"},{"variants":[{"weight":100}],"type":"bernoulliTrial","lookupKey":"JTTE","key":"JumpToTracker","abgroup":"jtte"},{"variants":[{"weight":100}],"type":"bernoulliTrial","lookupKey":"CSP","key":"ContentSpecificPlaylists","abgroup":"csp"},{"variants":[{"weight":0}],"type":"bernoulliTrial","lookupKey":"SPA_636BB77B4A063E2C3E3686FB","key":"SinglePageAppSupport_636bb77b4a063e2c3e3686fb","abgroup":"spa_636bb77b4a063e2c3e3686fb"},{"variants":[{"weight":0}],"type":"bernoulliTrial","lookupKey":"SPA_62A8F1D2540A6E420AB16977","key":"SinglePageAppSupport_62a8f1d2540a6e420ab16977","abgroup":"spa_62a8f1d2540a6e420ab16977"},{"variants":[{"weight":0}],"type":"bernoulliTrial","lookupKey":"SOTC_660A2F0855C0E65B7013B0A2A","key":"StickyOutstreamTopCenter_660a2f0855c0e65b7013b0a2a","abgroup":"sotc_660a2f0855c0e65b7013b0a2a"},{"variants":[{"weight":0}],"type":"bernoulliTrial","lookupKey":"SOTC_56D7646348AC34B603D08CDD","key":"StickyOutstreamTopCenter_56d7646348ac34b603d08cdd","abgroup":"sotc_56d7646348ac34b603d08cdd"},{"variants":[{"weight":0}],"type":"bernoulliTrial","lookupKey":"SOTC_52E41FAC28963D1E058A107E","key":"StickyOutstreamTopCenter_52e41fac28963d1e058a107e","abgroup":"sotc_52e41fac28963d1e058a107e"},{"variants":[{"weight":0}],"type":"bernoulliTrial","lookupKey":"SOTC_553542257A55B2E06135E447","key":"StickyOutstreamTopCenter_553542257a55b2e06135e447","abgroup":"sotc_553542257a55b2e06135e447"},{"variants":[{"weight":0}],"type":"bernoulliTrial","lookupKey":"SOTC_53237591208F222C05B9A652","key":"StickyOutstreamTopCenter_53237591208f222c05b9a652","abgroup":"sotc_53237591208f222c05b9a652"},{"variants":[{"weight":0}],"type":"bernoulliTrial","lookupKey":"SOTC_530961E8208F222C05B9A319","key":"StickyOutstreamTopCenter_530961e8208f222c05b9a319","abgroup":"sotc_530961e8208f222c05b9a319"},{"variants":[{"weight":0}],"type":"bernoulliTrial","lookupKey":"SOTC_60A7FA14D53602489A3692C6","key":"StickyOutstreamTopCenter_60a7fa14d53602489a3692c6","abgroup":"sotc_60a7fa14d53602489a3692c6"},{"variants":[{"weight":0}],"type":"bernoulliTrial","lookupKey":"SOTC_52E41FAC28963D1E058A1132","key":"StickyOutstreamTopCenter_52e41fac28963d1e058a1132","abgroup":"sotc_52e41fac28963d1e058a1132"},{"variants":[{"weight":0}],"type":"bernoulliTrial","lookupKey":"SOTC_58C18D1BF051050F829E3C0B","key":"StickyOutstreamTopCenter_58c18d1bf051050f829e3c0b","abgroup":"sotc_58c18d1bf051050f829e3c0b"},{"variants":[{"weight":0}],"type":"bernoulliTrial","lookupKey":"SOTC_5667530F4856897050E3754F","key":"StickyOutstreamTopCenter_5667530f4856897050e3754f","abgroup":"sotc_5667530f4856897050e3754f"},{"variants":[{"weight":0}],"type":"bernoulliTrial","lookupKey":"SOTC_55BCCC97303EDAB84AFD77E2","key":"StickyOutstreamTopCenter_55bccc97303edab84afd77e2","abgroup":"sotc_55bccc97303edab84afd77e2"},{"variants":[{"weight":0}],"type":"bernoulliTrial","lookupKey":"SOTC_5E7DEA4B319B6675881FA756","key":"StickyOutstreamTopCenter_5e7dea4b319b6675881fa756","abgroup":"sotc_5e7dea4b319b6675881fa756"},{"variants":[{"weight":0}],"type":"bernoulliTrial","lookupKey":"SOTC_54BDB2D6358B65853F5FE5C4","key":"StickyOutstreamTopCenter_54bdb2d6358b65853f5fe5c4","abgroup":"sotc_54bdb2d6358b65853f5fe5c4"},{"variants":[{"weight":0}],"type":"bernoulliTrial","lookupKey":"SOTC_5EBAC21FF67E7555AE952E51","key":"StickyOutstreamTopCenter_5ebac21ff67e7555ae952e51","abgroup":"sotc_5ebac21ff67e7555ae952e51"},{"variants":[{"weight":0}],"type":"bernoulliTrial","lookupKey":"SOTC_60241FB76F0AF53EE0150FBA","key":"StickyOutstreamTopCenter_60241fb76f0af53ee0150fba","abgroup":"sotc_60241fb76f0af53ee0150fba"},{"variants":[{"weight":0}],"type":"bernoulliTrial","lookupKey":"SOTC_5AF420ECFAB03C25E571FC36","key":"StickyOutstreamTopCenter_5af420ecfab03c25e571fc36","abgroup":"sotc_5af420ecfab03c25e571fc36"},{"variants":[{"weight":0}],"type":"bernoulliTrial","lookupKey":"SOTC_5E42FEBB231FAA5BC174C1E9","key":"StickyOutstreamTopCenter_5e42febb231faa5bc174c1e9","abgroup":"sotc_5e42febb231faa5bc174c1e9"},{"variants":[{"weight":0}],"type":"bernoulliTrial","lookupKey":"SOTC_62F26EB8E4A64B3CE9532C7B","key":"StickyOutstreamTopCenter_62f26eb8e4a64b3ce9532c7b","abgroup":"sotc_62f26eb8e4a64b3ce9532c7b"},{"variants":[{"weight":0}],"type":"bernoulliTrial","lookupKey":"SOTC_5ADE026821520F50AB7DC946","key":"StickyOutstreamTopCenter_5ade026821520f50ab7dc946","abgroup":"sotc_5ade026821520f50ab7dc946"},{"variants":[{"weight":0}],"type":"bernoulliTrial","lookupKey":"SOTC_5BE1D613604FB775E8699C25","key":"StickyOutstreamTopCenter_5be1d613604fb775e8699c25","abgroup":"sotc_5be1d613604fb775e8699c25"},{"variants":[{"weight":100}],"type":"bernoulliTrial","lookupKey":"SCATCVE","key":"StickyContainerAdsTopCenterVideoDependency","abgroup":"scatcve"},{"variants":[{"weight":0}],"type":"bernoulliTrial","lookupKey":"SSAU","key":"SlickstreamAdUnits","abgroup":"ssau"},{"variants":[{"weight":100}],"type":"bernoulliTrial","lookupKey":"SSFF","key":"StickySidebarFeatureFlag","abgroup":"ssff"},{"variants":[{"value":"20sc","weight":80},{"value":"20s","weight":10},{"value":"off","weight":10}],"type":"weightedChoice","lookupKey":"MULTIREFAUC","key":"MultistagePrebidAuction","abgroup":"multirefauc"},{"variants":[{"value":"20s","weight":25},{"value":"20sf1","weight":25},{"value":"20sf2","weight":25},{"value":"off","weight":25}],"type":"weightedChoice","lookupKey":"MULTIREFAUCD","key":"MultistagePrebidAuctionDisplay","abgroup":"multirefaucd"},{"variants":[{"value":"10s1","weight":0},{"value":"10s2","weight":0},{"value":"off","weight":100}],"type":"weightedChoice","lookupKey":"MULTIREFAUCV","key":"MultistagePrebidAuctionV","abgroup":"multirefaucv"},{"variants":[{"value":"10s1","weight":2},{"value":"10s2","weight":2},{"value":"off","weight":96}],"type":"weightedChoice","lookupKey":"MULTIREFAUCV2","key":"MultistagePrebidAuctionV2","abgroup":"multirefaucv2"},{"variants":[{"value":"10s1","weight":33},{"value":"10s2","weight":33},{"value":"off","weight":34}],"type":"weightedChoice","lookupKey":"MVIOS","key":"MultistagePrebidAuctionVideoNonIosExperiment","abgroup":"mvios"},{"variants":[{"value":3,"weight":25},{"value":7,"weight":25},{"value":10,"weight":25},{"value":15,"weight":25}],"type":"weightedChoice","lookupKey":"LCBPE","key":"LimitContentBidPoolExperiment","abgroup":"lcbpe"},{"variants":[{"value":5,"weight":25},{"value":10,"weight":25},{"value":15,"weight":25},{"value":20,"weight":25}],"type":"weightedChoice","lookupKey":"LVBPE","key":"LimitVideoBidPoolExperiment","abgroup":"lvbpe"},{"variants":[{"value":"none","weight":1},{"value":"8.30.0","weight":99}],"type":"weightedChoice","lookupKey":"JWPV","key":"JWPVersionExperiment","abgroup":"jwpv"},{"variants":[{"value":10000,"weight":70},{"value":15000,"weight":7},{"value":20000,"weight":7},{"value":25000,"weight":10},{"value":1000,"weight":3},{"value":2000,"weight":3}],"type":"weightedChoice","lookupKey":"AINV","key":"AdInViewExperiment","abgroup":"ainv"},{"variants":[{"value":1000,"weight":100}],"type":"weightedChoice","lookupKey":"AINV2","key":"AdInViewExperiment_2","abgroup":"ainv2"},{"variants":[{"value":10000,"weight":50},{"value":5000,"weight":50}],"type":"weightedChoice","lookupKey":"AINVI","key":"AdInViewIOS","abgroup":"ainvi"},{"variants":[{"value":"noref","weight":25},{"value":20,"weight":25},{"value":30,"weight":25},{"value":"off","weight":25}],"type":"weightedChoice","lookupKey":"ASR_RE","key":"ASRInViewRefreshExperiment","abgroup":"asr_re"},{"variants":[{"weight":1}],"type":"bernoulliTrial","lookupKey":"DOVH","key":"DetectOverlappingHeader","abgroup":"dovh"},{"variants":[{"weight":100}],"type":"bernoulliTrial","lookupKey":"VCSU","key":"VideoCollapseScrollUp","abgroup":"vcsu"},{"variants":[{"value":"off","weight":0},{"value":"1","weight":100},{"value":"2","weight":0}],"type":"weightedChoice","lookupKey":"COSUFTC","key":"VideoCollapseScrollUpTopCenter","abgroup":"cosuftc"},{"variants":[{"weight":90}],"type":"bernoulliTrial","lookupKey":"INTCFG","key":"InterstitialConfig","abgroup":"intcfg"},{"variants":[{"value":"Continuing without bids","weight":99},{"value":"xhr timeout after","weight":99},{"value":"marmaladeResponseLoaded","weight":90},{"value":"_initializeHls","weight":90}],"type":"multivalueBernoulliTrial","lookupKey":"DSLE","key":"DialDownLogsExperiment","abgroup":"dsle"},{"variants":[{"value":"Continuing without bids","weight":100},{"value":"xhr timeout after","weight":100},{"value":"SlotRenderEnded::adImpression","weight":99},{"value":"RaptivePlayer::_initializeHls","weight":100},{"value":"RaptivePlayer::_initializeHlsOrMp4","weight":100},{"value":"in response for appnexus adapter: unknown","weight":100}],"type":"multivalueBernoulliTrial","lookupKey":"DSLE2","key":"DialDownLogsExperiment2","abgroup":"dsle2"},{"variants":[{"weight":90}],"type":"bernoulliTrial","lookupKey":"IPLIN","key":"IOSPlayInline","abgroup":"iplin"},{"variants":[{"weight":1}],"type":"bernoulliTrial","lookupKey":"CSL","key":"ContentSizeLogging","abgroup":"csl"},{"variants":[{"value":0.9,"weight":96},{"value":0.85,"weight":1},{"value":0.8,"weight":1},{"value":0.75,"weight":1},{"value":0,"weight":1}],"type":"weightedChoice","lookupKey":"VPRED_1","key":"PredictiveAnalysis","abgroup":"vpred_1"},{"variants":[{"value":0.6,"weight":95},{"value":"off","weight":5}],"type":"weightedChoice","lookupKey":"DSLLV","key":"DynamicSlotLazyLoadViewability","abgroup":"dsllv"},{"variants":[{"value":"off","weight":25},{"value":"ingredients","weight":25},{"value":"seeRecipe","weight":25},{"value":"quickView","weight":25}],"type":"weightedChoice","lookupKey":"RQV","key":"RecipeQuickView","abgroup":"rqv"},{"variants":[{"value":{"protocols":[1,2,3,4,5,6,7,8],"value":"all","scope":"all"},"weight":55},{"value":{"protocols":[2,3,5,6,7,8],"value":"nv1","scope":"all"},"weight":15},{"value":{"protocols":[1,2,3,5,6,7,8],"value":"allr","scope":"limited"},"weight":15},{"value":{"protocols":[2,3,5,6,7,8],"value":"nv1r","scope":"limited"},"weight":15}],"type":"weightedChoice","lookupKey":"PROTO","key":"Protocols","abgroup":"proto"},{"variants":[{"value":"off","weight":30},{"value":"7.30","weight":50},{"value":"5.10","weight":10},{"value":"3.00","weight":5},{"value":"1.40","weight":5}],"type":"weightedChoice","lookupKey":"DCSLL_SS2","key":"DCSLLSiteSpecific","abgroup":"dcsll_ss2"},{"variants":[{"value":"5","weight":100}],"type":"weightedChoice","lookupKey":"DCSLL_MED","key":"DCSLLMediumCPMTarget","abgroup":"dcsll_med"},{"variants":[{"weight":5}],"type":"bernoulliTrial","lookupKey":"SOBLP","key":"StickyOutstreamBottomLeftExperiment","abgroup":"soblp"},{"variants":[{"weight":80}],"type":"bernoulliTrial","lookupKey":"SHTLI","key":"SharethroughLiveIntent","abgroup":"shtli"},{"variants":[{"weight":0}],"type":"bernoulliTrial","lookupKey":"PALE","key":"ParallaxAdLogError","abgroup":"pale"},{"variants":[{"value":1800,"weight":10},{"value":2100,"weight":10},{"value":2400,"weight":10},{"value":2700,"weight":60},{"value":3000,"weight":10}],"type":"weightedChoice","lookupKey":"DSSMH","key":"DynamicSidebarSlotsMinHeight","abgroup":"dssmh"},{"variants":[{"value":[640,360],"weight":20},{"value":[854,480],"weight":20},{"value":[960,540],"weight":20},{"value":[1280,720],"weight":20},{"value":[1920,1080],"weight":20}],"type":"weightedChoice","lookupKey":"ISV","key":"InstreamSizeValue","abgroup":"isv"},{"variants":[{"weight":50}],"type":"bernoulliTrial","lookupKey":"ISR","key":"InstreamSizeRefresh","abgroup":"isr"},{"variants":[{"value":5,"weight":16},{"value":10,"weight":16},{"value":15,"weight":17},{"value":18,"weight":17},{"value":22,"weight":17},{"value":25,"weight":17}],"type":"weightedChoice","lookupKey":"DSSC2","key":"DynamicSidebarSlotsCap","abgroup":"dssc2"},{"variants":[{"value":0,"weight":25},{"value":1,"weight":25},{"value":2,"weight":25},{"value":3,"weight":25}],"type":"weightedChoice","lookupKey":"SOIR","key":"StickyOutstreamIOSRefresh","abgroup":"soir"},{"variants":[{"value":"ats","weight":1},{"value":"cmscr","weight":1},{"value":"mrk","weight":1},{"value":"nlsn","weight":1},{"value":"conf","weight":1},{"value":"hawk","weight":1},{"value":"tgtaff","weight":1},{"value":"amz","weight":1}],"type":"multivalueBernoulliTrial","lookupKey":"TKHO_2","key":"TKHO","abgroup":"tkho_2"},{"variants":[{"weight":25,"value":0},{"weight":25,"value":1},{"weight":25,"value":5},{"weight":25,"value":15}],"type":"weightedChoice","lookupKey":"ETTL","key":"EventHistoryTTL","abgroup":"ettl"},{"variants":[{"weight":1}],"type":"bernoulliTrial","lookupKey":"AML","key":"AuctionMetricsLogger","abgroup":"aml"},{"variants":[{"value":"control","weight":0},{"value":"topLeft","weight":100},{"value":"topLeftAboveAd","weight":0}],"type":"weightedChoice","lookupKey":"FCP","key":"FooterCloseButtonLocation","abgroup":"fcp"},{"variants":[{"weight":100}],"type":"bernoulliTrial","lookupKey":"RPBS","key":"RaptivePrebidServerExperiment","abgroup":"rpbs"},{"variants":[{"weight":100}],"type":"bernoulliTrial","lookupKey":"RPBSP","key":"RaptivePrebidServerProxyExperiment","abgroup":"rpbsp"},{"variants":[{"value":"orcl","weight":0},{"value":"east","weight":0},{"value":"west","weight":50},{"value":"mag","weight":0},{"value":"ay","weight":50}],"type":"weightedChoice","lookupKey":"RRPBS68","key":"RaptiveRegionalPrebidServerExperiment3","abgroup":"rrpbs68"},{"variants":[{"value":"all","weight":99},{"value":"west","weight":1},{"value":"ay","weight":0}],"type":"weightedChoice","lookupKey":"PBSMC","key":"PrebidServerMultiCall","abgroup":"pbsmc"},{"variants":[{"value":"off","weight":0},{"value":"20s","weight":100}],"type":"weightedChoice","lookupKey":"MULTISERVERAUC","key":"RaptivePBSMultistageAuctionExperiment","abgroup":"multiserverauc"},{"variants":[{"value":0,"weight":20},{"value":2,"weight":20},{"value":4,"weight":20},{"value":6,"weight":20},{"value":8,"weight":20}],"label":"RPBS","type":"weightedChoice","lookupKey":"R_DR","key":"RPBSDoubleRequestExperiment","abgroup":"r_dr"},{"variants":[{"weight":100}],"type":"bernoulliTrial","lookupKey":"INTL","key":"InterstitialLink","abgroup":"intl"},{"variants":[{"weight":100}],"type":"bernoulliTrial","lookupKey":"MRBF","key":"MidrollBugFixExperiment","abgroup":"mrbf"},{"variants":[{"weight":25,"value":30},{"weight":25,"value":40},{"weight":25,"value":50},{"weight":25,"value":60}],"type":"weightedChoice","lookupKey":"TTLE","key":"EventHistoryTTLExperiment","abgroup":"ttle"},{"variants":[{"weight":100}],"type":"bernoulliTrial","lookupKey":"PRM","key":"PageRefreshMonitorExperiment","abgroup":"prm"},{"variants":[{"weight":25,"value":0},{"weight":25,"value":60},{"weight":25,"value":150},{"weight":25,"value":300}],"type":"weightedChoice","lookupKey":"TTLMBC","key":"MinBidCacheTTLExperiment","abgroup":"ttlmbc"},{"variants":[{"value":0,"weight":25},{"value":1000,"weight":25},{"value":2500,"weight":25},{"value":5000,"weight":25}],"type":"weightedChoice","lookupKey":"LITO","key":"LiveIntentTimeOutExperiment","abgroup":"lito"},{"variants":[{"value":100,"weight":100}],"type":"weightedChoice","lookupKey":"LAT","key":"LazyLoadThreshold","abgroup":"lat"},{"variants":[{"value":"ix","weight":100},{"value":"ttd","weight":100}],"type":"multivalueBernoulliTrial","lookupKey":"PRBI","key":"PriorityBiddersExperiment","abgroup":"prbi"},{"variants":[{"value":"ss","weight":100},{"value":"g_td","weight":100},{"value":"g_mw","weight":100},{"value":"g_td:pubm","weight":100},{"value":"g_mw:pubm","weight":100},{"value":"g_mw:id5id","weight":100},{"value":"g_td:id5id","weight":100},{"value":"g_td-pubm","weight":100},{"value":"g_mw-pubm","weight":100},{"value":"g_mw-id5id","weight":100},{"value":"g_td-id5id","weight":100},{"value":"ra_gpid","weight":100},{"value":"ra_shid","weight":100},{"value":"ra_lpid","weight":100},{"value":"ra_rcid","weight":100},{"value":"nl","weight":100},{"value":"url","weight":100},{"value":"urlh","weight":100},{"value":"api","weight":100},{"value":"grwm","weight":100},{"value":"cki","weight":100},{"value":"l","weight":100},{"value":"o","weight":100},{"value":"c","weight":100},{"value":"l_i","weight":100},{"value":"ot","weight":100},{"value":"slickstream","weight":100},{"value":"unknown","weight":100},{"value":"undefined","weight":100},{"value":"urlhck","weight":100},{"value":"sdkli","weight":100},{"value":"sdklir","weight":100}],"type":"multivalueBernoulliTrial","lookupKey":"HEMSA","key":"hemSourceAllowlist","abgroup":"hemsa"},{"variants":[{"value":"11","weight":1},{"value":"1911","weight":25},{"value":"21","weight":1},{"value":"169","weight":72},{"value":"43","weight":1}],"type":"weightedChoice","lookupKey":"NTVRAT","key":"NativeRatio","abgroup":"ntvrat"},{"variants":[{"value":20,"weight":20},{"value":23,"weight":20},{"value":25,"weight":20},{"value":28,"weight":20},{"value":30,"weight":20}],"type":"weightedChoice","lookupKey":"NTVRTL","key":"NativeRecipeTitleLength","abgroup":"ntvrtl"},{"variants":[{"weight":90}],"type":"bernoulliTrial","lookupKey":"SSPUS","key":"SSPUserSync","abgroup":"sspus"},{"variants":[{"weight":0}],"type":"bernoulliTrial","lookupKey":"PAAPI","key":"PaapiExperiment","abgroup":"paapi"},{"variants":[{"value":500,"weight":100}],"type":"weightedChoice","lookupKey":"PAAPIBTO","key":"PaapiBuyerTimeout","abgroup":"paapi_bto"},{"variants":[{"value":500,"weight":100}],"type":"weightedChoice","lookupKey":"PAAPISTO","key":"PaapiSellerTimeout","abgroup":"paapi_sto"},{"variants":[{"value":500,"weight":100}],"type":"weightedChoice","lookupKey":"PAAPIRTO","key":"PaapiReportingTimeout","abgroup":"paapi_rto"},{"variants":[{"value":"ec3","weight":90},{"value":"arl","weight":5},{"value":"off","weight":5}],"type":"weightedChoice","lookupKey":"IXNT","key":"IxNativeExperiment","abgroup":"ixnt"},{"variants":[{"value":"none","weight":40},{"value":"idl","weight":20},{"value":"li_uid2","weight":20},{"value":"lpid","weight":20}],"type":"weightedChoice","lookupKey":"1ST_EID2","key":"FirstEidExperiment","abgroup":"1st_eid2"},{"variants":[{"value":"er3","weight":33},{"value":"arl","weight":33},{"value":"off","weight":34}],"type":"weightedChoice","lookupKey":"IXNTR","key":"IxNativeExperimentRecipe","abgroup":"ixntr"},{"variants":[{"value":1000,"weight":5},{"value":1250,"weight":45},{"value":1500,"weight":45},{"value":1750,"weight":5}],"type":"weightedChoice","lookupKey":"S2STO","key":"S2STimeOutExperiment","abgroup":"s2sto"},{"variants":[{"weight":0}],"type":"bernoulliTrial","lookupKey":"INP","key":"INPExperiment","abgroup":"inp"},{"variants":[{"value":1500,"weight":85},{"value":2000,"weight":5},{"value":3000,"weight":5},{"value":4000,"weight":5}],"type":"weightedChoice","lookupKey":"S2STORE","key":"S2SRefreshTimeout","abgroup":"s2store"},{"variants":[{"weight":99}],"type":"bernoulliTrial","lookupKey":"OPLI","key":"OpenPathLiveIntent","abgroup":"opli"},{"variants":[{"weight":0}],"type":"bernoulliTrial","lookupKey":"SSPTRM","key":"SspTakeRateMonitor","abgroup":"ssptrm"},{"variants":[{"value":1,"weight":20},{"value":2,"weight":20},{"value":3,"weight":20},{"value":4,"weight":20},{"value":5,"weight":20}],"type":"weightedChoice","lookupKey":"TTLB","key":"TTLBuffer","abgroup":"ttlb"},{"variants":[{"value":0,"weight":20},{"value":75,"weight":5},{"value":100,"weight":20},{"value":120,"weight":20},{"value":140,"weight":35}],"type":"weightedChoice","lookupKey":"NTVDL","key":"NativeDescriptionLength","abgroup":"ntvdl"},{"variants":[{"value":0,"weight":20},{"value":5,"weight":20},{"value":10,"weight":20},{"value":15,"weight":20},{"value":20,"weight":20}],"type":"weightedChoice","lookupKey":"NBHO","key":"NoBidHoldouts","abgroup":"nbho"},{"variants":[{"value":5,"weight":25},{"value":10,"weight":25},{"value":15,"weight":25},{"value":20,"weight":25}],"type":"weightedChoice","lookupKey":"NBL","key":"NoBidLimit","abgroup":"nbl"},{"variants":[{"value":300,"weight":20},{"value":400,"weight":20},{"value":500,"weight":20},{"value":600,"weight":20},{"value":700,"weight":20}],"type":"weightedChoice","lookupKey":"FTMG","key":"FetchMargin","abgroup":"ftmg"},{"variants":[{"value":"2_1","weight":7},{"value":"2_2","weight":7},{"value":"2_3","weight":7},{"value":"2_4","weight":7},{"value":"2_5","weight":7},{"value":"3_1","weight":7},{"value":"3_2","weight":7},{"value":"3_3","weight":7},{"value":"4_1","weight":7},{"value":"4_2","weight":7},{"value":"4_3","weight":7},{"value":"5_1","weight":7},{"value":"5_2","weight":7},{"value":"5_3","weight":7},{"value":"off","weight":2}],"type":"weightedChoice","lookupKey":"MMSA","key":"MultiMultistagePrebidAuctionDisplay","abgroup":"mmsa"},{"variants":[{"value":0,"weight":20},{"value":50,"weight":20},{"value":75,"weight":20},{"value":100,"weight":20},{"value":150,"weight":20}],"type":"weightedChoice","lookupKey":"LRT","key":"LazyRenderThreshold","abgroup":"lrt"},{"variants":[{"weight":100}],"type":"bernoulliTrial","lookupKey":"KRPL","key":"KargoPlacement","abgroup":"krpl"},{"variants":[{"value":"20sf1","weight":33},{"value":"20sf2","weight":33},{"value":"off","weight":33},{"value":"csdr","weight":1}],"type":"weightedChoice","lookupKey":"MULTIREFAUCD2","key":"MultistagePrebidAuctionDisplay2","abgroup":"multirefaucd2"},{"variants":[{"value":"20sf1","weight":33},{"value":"20sf2","weight":33},{"value":"off","weight":33},{"value":"crr","weight":1}],"type":"weightedChoice","lookupKey":"MULTIREFAUCD3","key":"MultistagePrebidAuctionDisplay3","abgroup":"multirefaucd3"},{"variants":[{"weight":100}],"type":"bernoulliTrial","lookupKey":"HSCU","key":"HemStorageCleanup","abgroup":"hscu"},{"variants":[{"weight":5}],"type":"bernoulliTrial","lookupKey":"APPRQ","key":"AppRequests","abgroup":"apprq"},{"variants":[{"weight":100}],"type":"bernoulliTrial","lookupKey":"SGF","key":"ServerGAMFailure","abgroup":"sgf"},{"variants":[{"weight":90}],"type":"bernoulliTrial","lookupKey":"MR4","key":"DisableMultistageRefresh","abgroup":"mr4"},{"variants":[{"weight":50}],"label":"RPBS","type":"bernoulliTrial","lookupKey":"RAS","key":"RPBSAsyncStages","abgroup":"ras"},{"variants":[{"weight":25,"value":"mr4"},{"weight":25,"value":"mrt1"},{"weight":25,"value":"mrt2"},{"weight":25,"value":"off"}],"type":"weightedChoice","lookupKey":"MRM","key":"MultistageRefreshModifier","abgroup":"mrm"},{"variants":[{"weight":100}],"type":"bernoulliTrial","lookupKey":"MNR","key":"MissingNativeParams","abgroup":"mnr"},{"variants":[{"weight":100}],"type":"bernoulliTrial","lookupKey":"DBUID2","key":"DeclareBridgedUid2","abgroup":"dbuid2"},{"variants":[{"weight":0}],"type":"bernoulliTrial","lookupKey":"DBGPID","key":"DeclareBridgedGPID","abgroup":"dbgpid"},{"variants":[{"weight":99,"value":"rubi_ss"},{"weight":5,"value":"tripl_ss"}],"type":"multivalueBernoulliTrial","lookupKey":"APPRQB","key":"AppBiddersList","abgroup":"apprqb"},{"label":"RPBS","variants":[{"value":"yahoossp","weight":15},{"value":"triplelift","weight":15},{"value":"rubicon","weight":15},{"value":"pubmatic","weight":15},{"value":"rise","weight":15},{"value":"33across","weight":15},{"value":"conversant","weight":15},{"value":"yieldmo","weight":15}],"type":"multivalueBernoulliTrial","lookupKey":"FBSL","key":"FixedBidderStageList","abgroup":"fbsl"},{"label":"RPBS","variants":[{"value":"first","weight":33},{"value":"last","weight":33},{"value":"off","weight":34}],"type":"weightedChoice","lookupKey":"FBST","key":"FixedBidderStageToggle","abgroup":"fbst"},{"variants":[{"weight":100}],"label":"RPBS","type":"bernoulliTrial","lookupKey":"FBET","key":"FixedBidderExperimentToggle","abgroup":"fbet"},{"variants":[{"weight":50}],"label":"RPBS","type":"bernoulliTrial","lookupKey":"FBF","key":"RPBSFixedBiddersByFloor","abgroup":"fbf"},{"variants":[{"weight":20}],"type":"bernoulliTrial","lookupKey":"BS2SE","key":"BrokenS2SEndpoint","abgroup":"bs2se"},{"variants":[{"value":1000,"weight":20},{"value":2000,"weight":20},{"value":3000,"weight":20},{"value":4000,"weight":20},{"value":5000,"weight":20}],"type":"weightedChoice","lookupKey":"PBFS","key":"PrebidFailsafeTimeout","abgroup":"pbfs"},{"variants":[{"value":500,"weight":20},{"value":750,"weight":20},{"value":1000,"weight":20},{"value":1250,"weight":20},{"value":1500,"weight":20}],"type":"weightedChoice","lookupKey":"AMZFS","key":"AmazonFailsafeTimeout","abgroup":"amzfs"},{"variants":[{"weight":1}],"type":"bernoulliTrial","lookupKey":"NTVHO","key":"NativeHoldout","abgroup":"ntvho"},{"variants":[{"value":0,"weight":20},{"value":2,"weight":20},{"value":3,"weight":20},{"value":4,"weight":20},{"value":5,"weight":20}],"type":"weightedChoice","lookupKey":"DRB","key":"DisplayRequestBatch","abgroup":"drb"},{"variants":[{"weight":50}],"type":"bernoulliTrial","lookupKey":"GBSR","key":"GAMBatchSRARequest","abgroup":"gbsr"},{"variants":[{"weight":100}],"type":"bernoulliTrial","lookupKey":"GGB","key":"GpidGraphBridge","abgroup":"ggb"},{"variants":[{"value":15,"weight":25},{"value":3,"weight":25},{"value":7,"weight":25},{"value":10,"weight":25}],"type":"weightedChoice","lookupKey":"LBPE","key":"LimitBidPoolExperiment","abgroup":"lbpe"},{"variants":[{"value":100,"weight":20},{"value":200,"weight":20},{"value":300,"weight":20},{"value":400,"weight":20},{"value":500,"weight":20}],"type":"weightedChoice","lookupKey":"VSE","key":"VideoScrollExperiment","abgroup":"vse"},{"variants":[{"value":0,"weight":25},{"value":250,"weight":25},{"value":500,"weight":25},{"value":1000,"weight":25}],"type":"weightedChoice","lookupKey":"IISW","key":"IdentityIframeSyncWait","abgroup":"iisw"},{"variants":[{"weight":0}],"type":"bernoulliTrial","lookupKey":"ADXISO","key":"AdxStickyOutstream","abgroup":"adxiso"},{"variants":[{"weight":50}],"type":"bernoulliTrial","lookupKey":"ADXISO2","key":"AdxStickyOutstreamV2","abgroup":"adxiso2"},{"variants":[{"value":0.6,"weight":33},{"value":0.7,"weight":33},{"value":0.9,"weight":34}],"type":"weightedChoice","lookupKey":"LAZYFLR","key":"LazyFloorPercentile","abgroup":"lazyflr"},{"variants":[{"value":-1,"weight":4},{"value":500,"weight":95},{"value":1024,"weight":1}],"type":"weightedChoice","lookupKey":"IMABR","key":"IMABitrate","abgroup":"imabr"},{"variants":[{"value":0,"weight":20},{"value":20,"weight":20},{"value":35,"weight":20},{"value":50,"weight":20},{"value":"off","weight":20}],"type":"weightedChoice","lookupKey":"RPBBL","key":"RaptivePlayerBackBufferLength","abgroup":"rpbbl"},{"variants":[{"value":10,"weight":20},{"value":20,"weight":20},{"value":30,"weight":20},{"value":60,"weight":20},{"value":"off","weight":20}],"type":"weightedChoice","lookupKey":"RPFBT","key":"RaptivePlayerFrontBufferThreshold","abgroup":"rpfbt"},{"variants":[{"value":1,"weight":20},{"value":5,"weight":20},{"value":10,"weight":20},{"value":20,"weight":20},{"value":30,"weight":20}],"type":"weightedChoice","lookupKey":"RPMBL","key":"RaptivePlayerMaxBufferLength","abgroup":"rpmbl"},{"variants":[{"value":10,"weight":20},{"value":50,"weight":20},{"value":100,"weight":20},{"value":250,"weight":20},{"value":600,"weight":20}],"type":"weightedChoice","lookupKey":"RPMMBL","key":"RaptivePlayerMaxMaxBufferLength","abgroup":"rpmmbl"},{"variants":[{"value":5,"weight":20},{"value":20,"weight":20},{"value":35,"weight":20},{"value":50,"weight":20},{"value":60,"weight":20}],"type":"weightedChoice","lookupKey":"RPMBS","key":"RaptivePlayerMaxBufferSize","abgroup":"rpmbs"},{"variants":[{"value":20,"weight":20},{"value":25,"weight":20},{"value":30,"weight":20},{"value":35,"weight":20},{"value":40,"weight":20}],"type":"weightedChoice","lookupKey":"RPSLT","key":"RaptivePlayerStaleLoadThreshold","abgroup":"rpslt"},{"variants":[{"value":"d","weight":90},{"value":"7","weight":10}],"type":"weightedChoice","lookupKey":"LIFPI","key":"LiveIntentFpiExpiration","abgroup":"lifpi"},{"variants":[{"weight":50}],"label":"RPBS","type":"bernoulliTrial","lookupKey":"FBT","key":"RPBSFixedBiddersByTimeout","abgroup":"fbt"},{"variants":[{"weight":100}],"type":"bernoulliTrial","lookupKey":"ASRI","key":"AmazonASRInitalRequest","abgroup":"asri"},{"variants":[{"value":50,"weight":10},{"value":100,"weight":30},{"value":150,"weight":30},{"value":200,"weight":20},{"value":250,"weight":10}],"type":"weightedChoice","lookupKey":"PBRQT","key":"PrebidRequestQueueTimeout","abgroup":"pbrqt"},{"variants":[{"weight":1}],"type":"bernoulliTrial","lookupKey":"GAAM","key":"GenericAnalyticsAdMarkup","abgroup":"gaam"},{"variants":[{"value":"bc","weight":33},{"value":"nobc","weight":33},{"value":"off","weight":34}],"type":"weightedChoice","lookupKey":"PUBBCAT","key":"PubmaticBCats","abgroup":"pubbcat"},{"variants":[{"weight":50}],"type":"bernoulliTrial","lookupKey":"RPEP","key":"RaptivePlayerEnablePreloading","abgroup":"rpep"},{"variants":[{"value":4000,"weight":20},{"value":6000,"weight":20},{"value":8000,"weight":20},{"value":10000,"weight":20},{"value":15000,"weight":20}],"type":"weightedChoice","lookupKey":"RPLVTO","key":"RaptivePlayerLoadVideoTimeout","abgroup":"rplvto"},{"variants":[{"choices":[{"value":0.8,"weight":10},{"value":1,"weight":80},{"value":1.2,"weight":10}],"value":"33across","abvalue":"33"},{"choices":[{"value":0.8,"weight":10},{"value":1,"weight":80},{"value":1.2,"weight":10}],"value":"adform","abvalue":"af"},{"choices":[{"value":0.8,"weight":10},{"value":1,"weight":80},{"value":1.2,"weight":10}],"value":"appnexus","abvalue":"an"},{"choices":[{"value":0.8,"weight":10},{"value":1,"weight":80},{"value":1.2,"weight":10}],"value":"conversant","abvalue":"cv"},{"choices":[{"value":0.8,"weight":10},{"value":1,"weight":80},{"value":1.2,"weight":10}],"value":"criteo","abvalue":"cr"},{"choices":[{"value":0.8,"weight":10},{"value":1,"weight":80},{"value":1.2,"weight":10}],"value":"flipp","abvalue":"fl"},{"choices":[{"value":0.8,"weight":10},{"value":1,"weight":80},{"value":1.2,"weight":10}],"value":"gridvid","abvalue":"gv"},{"choices":[{"value":0.8,"weight":10},{"value":1,"weight":80},{"value":1.2,"weight":10}],"value":"gumgum","abvalue":"gg"},{"choices":[{"value":0.8,"weight":10},{"value":1,"weight":80},{"value":1.2,"weight":10}],"value":"improvedigital","abvalue":"id"},{"choices":[{"value":0.8,"weight":10},{"value":1,"weight":80},{"value":1.2,"weight":10}],"value":"ix","abvalue":"ix"},{"choices":[{"value":0.8,"weight":10},{"value":1,"weight":80},{"value":1.2,"weight":10}],"value":"kargo","abvalue":"kg"},{"choices":[{"value":0.8,"weight":10},{"value":1,"weight":80},{"value":1.2,"weight":10}],"value":"nativo","abvalue":"nt"},{"choices":[{"value":0.8,"weight":10},{"value":1,"weight":80},{"value":1.2,"weight":10}],"value":"openx","abvalue":"ox"},{"choices":[{"value":0.8,"weight":10},{"value":1,"weight":80},{"value":1.2,"weight":10}],"value":"ozone","abvalue":"oz"},{"choices":[{"value":0.8,"weight":10},{"value":1,"weight":80},{"value":1.2,"weight":10}],"value":"pubmatic","abvalue":"pm"},{"choices":[{"value":0.8,"weight":10},{"value":1,"weight":80},{"value":1.2,"weight":10}],"value":"resetdigital","abvalue":"rd"},{"choices":[{"value":0.8,"weight":10},{"value":1,"weight":80},{"value":1.2,"weight":10}],"value":"rise","abvalue":"ri"},{"choices":[{"value":0.8,"weight":10},{"value":1,"weight":80},{"value":1.2,"weight":10}],"value":"rtbhouse","abvalue":"rh"},{"choices":[{"value":0.8,"weight":10},{"value":1,"weight":80},{"value":1.2,"weight":10}],"value":"rubicon","abvalue":"rb"},{"choices":[{"value":0.8,"weight":10},{"value":1,"weight":80},{"value":1.2,"weight":10}],"value":"sharethrough","abvalue":"sh"},{"choices":[{"value":0.8,"weight":10},{"value":1,"weight":80},{"value":1.2,"weight":10}],"value":"teads","abvalue":"te"},{"choices":[{"value":0.8,"weight":10},{"value":1,"weight":80},{"value":1.2,"weight":10}],"value":"triplelift","abvalue":"tl"},{"choices":[{"value":0.8,"weight":10},{"value":1,"weight":80},{"value":1.2,"weight":10}],"value":"ttd","abvalue":"td"},{"choices":[{"value":0.8,"weight":10},{"value":1,"weight":80},{"value":1.2,"weight":10}],"value":"undertone","abvalue":"ut"},{"choices":[{"value":0.8,"weight":10},{"value":1,"weight":80},{"value":1.2,"weight":10}],"value":"unruly","abvalue":"ur"},{"choices":[{"value":0.8,"weight":10},{"value":1,"weight":80},{"value":1.2,"weight":10}],"value":"yahoossp","abvalue":"yh"},{"choices":[{"value":0.8,"weight":10},{"value":1,"weight":80},{"value":1.2,"weight":10}],"value":"yieldmo","abvalue":"ym"}],"type":"multivalueWeightedChoice","lookupKey":"DFDB","key":"DifferentFloorDifferentBidder","abgroup":"dfdb"},{"variants":[{"value":1,"weight":33},{"value":2,"weight":33},{"value":"off","weight":34}],"label":"RPBS","type":"weightedChoice","lookupKey":"FBS","key":"RPBSFixedBiddersBySlowRT","abgroup":"fbs"},{"variants":[{"choices":[{"value":0.8,"weight":10},{"value":1,"weight":80},{"value":1.2,"weight":10}],"value":"33across","abvalue":"33"},{"choices":[{"value":0.8,"weight":10},{"value":1,"weight":80},{"value":1.2,"weight":10}],"value":"adform","abvalue":"af"},{"choices":[{"value":0.8,"weight":10},{"value":1,"weight":80},{"value":1.2,"weight":10}],"value":"appnexus","abvalue":"an"},{"choices":[{"value":0.8,"weight":10},{"value":1,"weight":80},{"value":1.2,"weight":10}],"value":"aidem_ss","abvalue":"as"},{"choices":[{"value":0.8,"weight":10},{"value":1,"weight":80},{"value":1.2,"weight":10}],"value":"conversant","abvalue":"cv"},{"choices":[{"value":0.8,"weight":10},{"value":1,"weight":80},{"value":1.2,"weight":10}],"value":"crit_ss","abvalue":"cr"},{"choices":[{"value":0.8,"weight":10},{"value":1,"weight":80},{"value":1.2,"weight":10}],"value":"flipp","abvalue":"fl"},{"choices":[{"value":0.8,"weight":10},{"value":1,"weight":80},{"value":1.2,"weight":10}],"value":"grid","abvalue":"gs"},{"choices":[{"value":0.8,"weight":10},{"value":1,"weight":80},{"value":1.2,"weight":10}],"value":"gumgum","abvalue":"gg"},{"choices":[{"value":0.8,"weight":10},{"value":1,"weight":80},{"value":1.2,"weight":10}],"value":"improve_ss","abvalue":"id"},{"choices":[{"value":0.8,"weight":10},{"value":1,"weight":80},{"value":1.2,"weight":10}],"value":"ix_ss","abvalue":"ix"},{"choices":[{"value":0.8,"weight":10},{"value":1,"weight":80},{"value":1.2,"weight":10}],"value":"ntvo_ss","abvalue":"nt"},{"choices":[{"value":0.8,"weight":10},{"value":1,"weight":80},{"value":1.2,"weight":10}],"value":"opnx_ss","abvalue":"ox"},{"choices":[{"value":0.8,"weight":10},{"value":1,"weight":80},{"value":1.2,"weight":10}],"value":"pubm_ss","abvalue":"pm"},{"choices":[{"value":0.8,"weight":10},{"value":1,"weight":80},{"value":1.2,"weight":10}],"value":"resetdigital","abvalue":"rd"},{"choices":[{"value":0.8,"weight":10},{"value":1,"weight":80},{"value":1.2,"weight":10}],"value":"rise","abvalue":"ri"},{"choices":[{"value":0.8,"weight":10},{"value":1,"weight":80},{"value":1.2,"weight":10}],"value":"rubi_ss","abvalue":"rb"},{"choices":[{"value":0.8,"weight":10},{"value":1,"weight":80},{"value":1.2,"weight":10}],"value":"share_ss","abvalue":"sh"},{"choices":[{"value":0.8,"weight":10},{"value":1,"weight":80},{"value":1.2,"weight":10}],"value":"tripl_ss","abvalue":"tl"},{"choices":[{"value":0.8,"weight":10},{"value":1,"weight":80},{"value":1.2,"weight":10}],"value":"under_ss","abvalue":"ut"},{"choices":[{"value":0.8,"weight":10},{"value":1,"weight":80},{"value":1.2,"weight":10}],"value":"unruly","abvalue":"ur"},{"choices":[{"value":0.8,"weight":10},{"value":1,"weight":80},{"value":1.2,"weight":10}],"value":"yah_ss","abvalue":"yh"},{"choices":[{"value":0.8,"weight":10},{"value":1,"weight":80},{"value":1.2,"weight":10}],"value":"yieldmo","abvalue":"ym"}],"type":"multivalueWeightedChoice","lookupKey":"DFDSB","key":"DifferentFloorDifferentServerBidder","abgroup":"dfdsb"},{"variants":[{"weight":100}],"type":"bernoulliTrial","lookupKey":"PBSINTL","key":"PBSInternationalTraffic","abgroup":"pbsintl"},{"variants":[{"value":"ignkrg","weight":33},{"value":"nokrginfl","weight":33},{"value":"off","weight":34}],"type":"weightedChoice","lookupKey":"BPKRG","key":"KargoFloorsRefreshExperiment","abgroup":"bpkrg"},{"variants":[{"value":50,"weight":25},{"value":100,"weight":25},{"value":200,"weight":25},{"value":400,"weight":25}],"type":"weightedChoice","lookupKey":"ECHDE","key":"EmailCaptureHandlerDebounceExperiment","abgroup":"echde"},{"variants":[{"value":1,"weight":20},{"value":1.5,"weight":20},{"value":2,"weight":20},{"value":3,"weight":20},{"value":4,"weight":20}],"type":"weightedChoice","lookupKey":"BCM","key":"BidCacheTimeout","abgroup":"bcm"},{"variants":[{"weight":50}],"type":"bernoulliTrial","lookupKey":"MMBR","key":"MaxMaxBufferReset","abgroup":"mmbr"},{"variants":[{"value":0,"weight":25},{"value":1,"weight":5},{"value":2,"weight":25},{"value":3,"weight":20},{"value":4,"weight":25}],"type":"weightedChoice","lookupKey":"ICFT","key":"InstreamCreativeFailureThreshold","abgroup":"icft"},{"variants":[{"value":0,"weight":25},{"value":1,"weight":5},{"value":2,"weight":25},{"value":3,"weight":20},{"value":4,"weight":25}],"type":"weightedChoice","lookupKey":"OCFT","key":"OutstreamCreativeFailureThreshold","abgroup":"ocft"},{"variants":[{"value":"west","weight":33},{"value":"east","weight":33},{"value":"off","weight":34}],"label":"RPBS","type":"weightedChoice","lookupKey":"BRE","key":"RPBSBiddersRegionalEndpoint","abgroup":"bre"},{"variants":[{"value":1.1,"weight":49},{"value":1.2,"weight":49},{"value":"off","weight":2}],"label":"RPBS","type":"weightedChoice","lookupKey":"R_INFMLT","key":"RPBSInflatorMultiplier","abgroup":"r_infmlt"},{"variants":[{"value":1.1,"weight":20},{"value":1.2,"weight":20},{"value":1.3,"weight":20},{"value":1.4,"weight":20},{"value":"off","weight":20}],"label":"RPBS","type":"weightedChoice","lookupKey":"MFM","key":"RPBSMultistageFloorMultiplier","abgroup":"mfm"},{"variants":[{"weight":5}],"type":"bernoulliTrial","lookupKey":"IXNR","key":"IXRefresh","abgroup":"ixnr"},{"variants":[{"value":0,"weight":20},{"value":50,"weight":20},{"value":100,"weight":20},{"value":200,"weight":20},{"value":400,"weight":20}],"type":"weightedChoice","lookupKey":"ECHDE2","key":"EmailCaptureHandlerDebounceExperiment_2","abgroup":"echde2"},{"variants":[{"weight":5}],"type":"bernoulliTrial","lookupKey":"MGNR","key":"MagniteRefresh","abgroup":"mgnr"},{"variants":[{"weight":1}],"type":"bernoulliTrial","lookupKey":"VPSM","key":"ViewportSampling","abgroup":"vpsm"},{"variants":[{"value":0,"weight":20},{"value":1,"weight":20},{"value":2,"weight":20},{"value":3,"weight":20},{"value":4,"weight":20}],"type":"weightedChoice","lookupKey":"RFAVT","key":"RefreshAuctionViewportThreshold","abgroup":"rfavt"},{"variants":[{"value":"off","weight":90},{"value":"nobid","weight":10}],"label":"RPBS","type":"weightedChoice","lookupKey":"R_SHPMLT","key":"RPBSReRequestNoBids","abgroup":"r_shpmlt"},{"label":"RPBS","variants":[{"value":2,"weight":100}],"type":"weightedChoice","lookupKey":"SCA","key":"StagesCountAdjustment","abgroup":"sca"},{"label":"RPBS","variants":[{"value":3,"weight":50},{"value":2,"weight":50}],"type":"weightedChoice","lookupKey":"SCA2","key":"RPBSStagesCount2","abgroup":"sca2"},{"variants":[{"value":"off","weight":25},{"value":"bg","weight":25},{"value":"sm","weight":25},{"value":"rv","weight":25}],"type":"weightedChoice","lookupKey":"SO2","key":"SizeOrder2","abgroup":"so2"},{"variants":[{"value":"off","weight":20},{"value":"bg","weight":20},{"value":"sm","weight":20},{"value":"sm1","weight":20},{"value":"rv","weight":20}],"type":"weightedChoice","lookupKey":"BWH","key":"BannerWidthHeight","abgroup":"bwh"},{"variants":[{"value":"off","weight":25},{"value":"bg","weight":25},{"value":"sm","weight":25},{"value":"rv","weight":25}],"type":"weightedChoice","lookupKey":"SOG","key":"SizeOrderGam","abgroup":"sog"},{"variants":[{"value":"off","weight":2},{"value":"sm","weight":98}],"type":"weightedChoice","lookupKey":"SO","key":"SizeOrder","abgroup":"so"},{"variants":[{"weight":0}],"type":"bernoulliTrial","lookupKey":"RP","key":"RaptivePlayerOverride","abgroup":"rp"},{"label":"RPBS","variants":[{"value":"off","weight":100},{"value":1,"weight":0},{"value":2,"weight":0}],"type":"weightedChoice","lookupKey":"MFB","key":"RPBSMultistageFixedBidders","abgroup":"mfb"},{"label":"RPBS","variants":[{"value":"round","weight":50},{"value":"off","weight":50}],"type":"weightedChoice","lookupKey":"BSA","key":"RPBSBiddersSplitAlgorithm","abgroup":"bsa"},{"variants":[{"value":15,"weight":0},{"value":25,"weight":100}],"type":"weightedChoice","lookupKey":"ADVD","key":"AdvancePlaylistDelay","abgroup":"advd"},{"label":"RPBS","variants":[{"weight":50}],"type":"bernoulliTrial","lookupKey":"TM","key":"Tmax","abgroup":"tm"},{"label":"RPBS","variants":[{"value":"off","weight":34},{"value":1,"weight":33},{"value":2,"weight":33}],"type":"weightedChoice","lookupKey":"BFC","key":"RPBSBidFloorAdjustAlgorithm","abgroup":"bfc"},{"variants":[{"weight":98}],"type":"bernoulliTrial","lookupKey":"VADF","key":"VideoAuctionDurationFallbackExperiment","abgroup":"vadf"},{"label":"RPBS","variants":[{"weight":50}],"type":"bernoulliTrial","lookupKey":"ITM","key":"InvalidTMax","abgroup":"itm"},{"variants":[{"value":1,"weight":25},{"value":2,"weight":25},{"value":3,"weight":25},{"value":"off","weight":25}],"label":"RPBS","type":"weightedChoice","lookupKey":"RFT","key":"RPBSFloorTiers","abgroup":"rft"},{"variants":[{"value":"rpbs","weight":100},{"value":"mag","weight":0}],"type":"weightedChoice","lookupKey":"PBSGR","key":"PrebidServerGDPRRouting","abgroup":"pbsgr"},{"label":"RPBS","variants":[{"weight":50}],"type":"bernoulliTrial","lookupKey":"BPS2","key":"RPBSBiddersPerStage2","abgroup":"bps2"},{"variants":[{"value":"default","weight":90},{"value":"single","weight":5},{"value":"both","weight":5}],"type":"weightedChoice","lookupKey":"UID1SRC","key":"Uid1AdserverExperiment","abgroup":"uid1src"},{"variants":[{"value":15000,"weight":25},{"value":10000,"weight":25},{"value":5000,"weight":25},{"value":2000,"weight":25}],"type":"weightedChoice","lookupKey":"IMAIV","key":"IOSMobileAdInViewExperiment","abgroup":"imaiv"},{"variants":[{"weight":50}],"type":"bernoulliTrial","lookupKey":"AYSSEWOLI","key":"AyServerSideEnrichmentWithoutLiveIntent","abgroup":"ayssewoli"},{"variants":[{"weight":95}],"type":"bernoulliTrial","lookupKey":"AYSSEWLI","key":"AyServerSideEnrichmentWithLiveIntent","abgroup":"ayssewli"},{"variants":[{"weight":100}],"type":"bernoulliTrial","lookupKey":"PCPURL","key":"PrebidConfigPageUrl","abgroup":"pcpurl"},{"variants":[{"weight":50}],"type":"bernoulliTrial","lookupKey":"ARF","key":"AdditiveRefreshFloors","abgroup":"arf"},{"variants":[{"value":500,"weight":50},{"value":200,"weight":50}],"type":"weightedChoice","lookupKey":"FMBDT0","key":"FetchMarginWithMinBidCacheTTLAt0","abgroup":"fmbdt0"},{"variants":[{"weight":0}],"type":"bernoulliTrial","lookupKey":"AMZNTS","key":"AmazonTrafficShaping","abgroup":"amznts"},{"variants":[{"weight":0}],"type":"bernoulliTrial","lookupKey":"OBTS","key":"OpenBiddingTrafficShaping","abgroup":"obts"},{"variants":[{"weight":95}],"type":"bernoulliTrial","lookupKey":"MULTISOSD","key":"MultiStageStickyOutstreamShorterDuration","abgroup":"multisosd"},{"variants":[{"value":3,"weight":25},{"value":7,"weight":25},{"value":10,"weight":25},{"value":15,"weight":25}],"type":"weightedChoice","lookupKey":"LRBPE","key":"LimitRecipeBidPoolExperiment","abgroup":"lrbpe"},{"variants":[{"weight":100}],"type":"bernoulliTrial","lookupKey":"SBH","key":"SlotBidHeight","abgroup":"sbh"}]}; var adtpm=Math.random()<.02&&{startTime:Date.now(),name:"adt-iife-start",duration:null};window.adthrive.branch=window.adthrive.branch||"HEAD 0e948e2",window.adthrive.bucket=window.adthrive.bucket||"flex",window.adthrive.gdpr="false",window.adthrive.deployment=window.adthrive.deployment||"X";var adthrive=function(){"use strict";window.adthrive.buildDate="2025-05-27";const e=new WeakMap;function t(t,i){return e.get(t)&&e.get(t).get(i)}function i(e,i,s){if(void 0===i)throw new TypeError;const n=t(i,s);return n&&n.get(e)}function s(i,s,n,r){if(r&&!["string","symbol"].includes(typeof r))throw new TypeError;(t(n,r)||function(t,i){const s=e.get(t)||new Map;e.set(t,s);const n=s.get(i)||new Map;return s.set(i,n),n}(n,r)).set(i,s)}function n(e,t,s){return i(e,t,s)?i(e,t,s):Object.getPrototypeOf(t)?n(e,Object.getPrototypeOf(t),s):void 0}const r={decorate:function(e,t,i,s){if(!Array.isArray(e)||0===e.length)throw new TypeError;return void 0!==i?function(e,t,i,s){return e.reverse().forEach((e=>{s=e(t,i,s)||s})),s}(e,t,i,s):"function"==typeof t?function(e,t){return e.reverse().forEach((e=>{const i=e(t);i&&(t=i)})),t}(e,t):void 0},defineMetadata:function(e,t,i,n){s(e,t,i,n)},getMetadata:function(e,t,i){return n(e,t,i)},getOwnMetadata:function(e,t,s){return i(e,t,s)},hasMetadata:function(e,t,i){return!!n(e,t,i)},hasOwnMetadata:function(e,t,s){return!!i(e,t,s)},metadata:function(e,t){return function(i,n){s(e,t,i,n)}}};var a;Object.assign(Reflect,r),function(e){e[e.Transient=0]="Transient",e[e.Singleton=1]="Singleton",e[e.ResolutionScoped=2]="ResolutionScoped",e[e.ContainerScoped=3]="ContainerScoped"}(a||(a={}));var o=a,l=function(e,t){return l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])},l(e,t)};function d(e,t){function i(){this.constructor=e}l(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}function c(e,t,i,s){return new(i||(i=Promise))((function(t,n){function r(e){try{o(s.next(e))}catch(e){n(e)}}function a(e){try{o(s.throw(e))}catch(e){n(e)}}function o(e){var s;e.done?t(e.value):(s=e.value,s instanceof i?s:new i((function(e){e(s)}))).then(r,a)}o((s=s.apply(e,[])).next())}))}function h(e,t){var i,s,n,r,a={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return r={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function o(r){return function(o){return function(r){if(i)throw new TypeError("Generator is already executing.");for(;a;)try{if(i=1,s&&(n=2&r[0]?s.return:r[0]?s.throw||((n=s.return)&&n.call(s),0):s.next)&&!(n=n.call(s,r[1])).done)return n;switch(s=0,n&&(r=[2&r[0],n.value]),r[0]){case 0:case 1:n=r;break;case 4:return a.label++,{value:r[1],done:!1};case 5:a.label++,s=r[1],r=[0];continue;case 7:r=a.ops.pop(),a.trys.pop();continue;default:if(!(n=a.trys,(n=n.length>0&&n[n.length-1])||6!==r[0]&&2!==r[0])){a=0;continue}if(3===r[0]&&(!n||r[1]>n[0]&&r[1]=e.length&&(e=void 0),{value:e&&e[s++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function p(e,t){var i="function"==typeof Symbol&&e[Symbol.iterator];if(!i)return e;var s,n,r=i.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(s=r.next()).done;)a.push(s.value)}catch(e){n={error:e}}finally{try{s&&!s.done&&(i=r.return)&&i.call(r)}finally{if(n)throw n.error}}return a}function g(){for(var e=[],t=0;t0},e.prototype.clear=function(){this._registryMap.clear()},e.prototype.ensure=function(e){this._registryMap.has(e)||this._registryMap.set(e,[])},e}(),T=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return d(t,e),t}(C),w=function(){this.scopedResolutions=new Map};function k(e,t,i){var s=p(e.toString().match(/constructor\(([\w, ]+)\)/)||[],2)[1],n=function(e,t){return null===e?"at position #"+t:'"'+e.split(",")[t].trim()+'" at position #'+t}(void 0===s?null:s,t);return function(e,t,i){return void 0===i&&(i=" "),g([e],t.message.split("\n").map((function(e){return i+e}))).join("\n")}("Cannot inject the dependency "+n+' of "'+e.name+'" constructor. Reason:',i)}var A=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return d(t,e),t}(C),I=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return d(t,e),t}(C),x=function(){this.preResolution=new A,this.postResolution=new I},P=new Map,O=function(){function e(e){this.parent=e,this._registry=new T,this.interceptors=new x,this.disposed=!1,this.disposables=new Set}return e.prototype.register=function(e,t,i){var s;if(void 0===i&&(i={lifecycle:o.Transient}),this.ensureNotDisposed(),s=function(e){return _(e)||E(e)||S(e)||f(e)}(t)?t:{useClass:t},S(s))for(var n=[e],r=s;null!=r;){var a=r.useToken;if(n.includes(a))throw new Error("Token registration cycle detected! "+g(n,[a]).join(" -> "));n.push(a);var l=this._registry.get(a);r=l&&S(l.provider)?l.provider:null}if((i.lifecycle===o.Singleton||i.lifecycle==o.ContainerScoped||i.lifecycle==o.ResolutionScoped)&&(E(s)||f(s)))throw new Error('Cannot use lifecycle "'+o[i.lifecycle]+'" with ValueProviders or FactoryProviders');return this._registry.set(e,{provider:s,options:i}),this},e.prototype.registerType=function(e,t){return this.ensureNotDisposed(),y(t)?this.register(e,{useToken:t}):this.register(e,{useClass:t})},e.prototype.registerInstance=function(e,t){return this.ensureNotDisposed(),this.register(e,{useValue:t})},e.prototype.registerSingleton=function(e,t){if(this.ensureNotDisposed(),y(e)){if(y(t))return this.register(e,{useToken:t},{lifecycle:o.Singleton});if(t)return this.register(e,{useClass:t},{lifecycle:o.Singleton});throw new Error('Cannot register a type name as a singleton without a "to" token')}var i=e;return t&&!y(t)&&(i=t),this.register(e,{useClass:i},{lifecycle:o.Singleton})},e.prototype.resolve=function(e,t){void 0===t&&(t=new w),this.ensureNotDisposed();var i=this.getRegistration(e);if(!i&&y(e))throw new Error('Attempted to resolve unregistered dependency token: "'+e.toString()+'"');if(this.executePreResolutionInterceptor(e,"Single"),i){var s=this.resolveRegistration(i,t);return this.executePostResolutionInterceptor(e,s,"Single"),s}if(function(e){return"function"==typeof e||e instanceof v}(e)){s=this.construct(e,t);return this.executePostResolutionInterceptor(e,s,"Single"),s}throw new Error("Attempted to construct an undefined constructor. Could mean a circular dependency problem. Try using `delay` function.")},e.prototype.executePreResolutionInterceptor=function(e,t){var i,s;if(this.interceptors.preResolution.has(e)){var n=[];try{for(var r=u(this.interceptors.preResolution.getAll(e)),a=r.next();!a.done;a=r.next()){var o=a.value;"Once"!=o.options.frequency&&n.push(o),o.callback(e,t)}}catch(e){i={error:e}}finally{try{a&&!a.done&&(s=r.return)&&s.call(r)}finally{if(i)throw i.error}}this.interceptors.preResolution.setAll(e,n)}},e.prototype.executePostResolutionInterceptor=function(e,t,i){var s,n;if(this.interceptors.postResolution.has(e)){var r=[];try{for(var a=u(this.interceptors.postResolution.getAll(e)),o=a.next();!o.done;o=a.next()){var l=o.value;"Once"!=l.options.frequency&&r.push(l),l.callback(e,t,i)}}catch(e){s={error:e}}finally{try{o&&!o.done&&(n=a.return)&&n.call(a)}finally{if(s)throw s.error}}this.interceptors.postResolution.setAll(e,r)}},e.prototype.resolveRegistration=function(e,t){if(this.ensureNotDisposed(),e.options.lifecycle===o.ResolutionScoped&&t.scopedResolutions.has(e))return t.scopedResolutions.get(e);var i,s=e.options.lifecycle===o.Singleton,n=e.options.lifecycle===o.ContainerScoped,r=s||n;return i=E(e.provider)?e.provider.useValue:S(e.provider)?r?e.instance||(e.instance=this.resolve(e.provider.useToken,t)):this.resolve(e.provider.useToken,t):_(e.provider)?r?e.instance||(e.instance=this.construct(e.provider.useClass,t)):this.construct(e.provider.useClass,t):f(e.provider)?e.provider.useFactory(this):this.construct(e.provider,t),e.options.lifecycle===o.ResolutionScoped&&t.scopedResolutions.set(e,i),i},e.prototype.resolveAll=function(e,t){var i=this;void 0===t&&(t=new w),this.ensureNotDisposed();var s=this.getAllRegistrations(e);if(!s&&y(e))throw new Error('Attempted to resolve unregistered dependency token: "'+e.toString()+'"');if(this.executePreResolutionInterceptor(e,"All"),s){var n=s.map((function(e){return i.resolveRegistration(e,t)}));return this.executePostResolutionInterceptor(e,n,"All"),n}var r=[this.construct(e,t)];return this.executePostResolutionInterceptor(e,r,"All"),r},e.prototype.isRegistered=function(e,t){return void 0===t&&(t=!1),this.ensureNotDisposed(),this._registry.has(e)||t&&(this.parent||!1)&&this.parent.isRegistered(e,!0)},e.prototype.reset=function(){this.ensureNotDisposed(),this._registry.clear(),this.interceptors.preResolution.clear(),this.interceptors.postResolution.clear()},e.prototype.clearInstances=function(){var e,t;this.ensureNotDisposed();try{for(var i=u(this._registry.entries()),s=i.next();!s.done;s=i.next()){var n=p(s.value,2),r=n[0],a=n[1];this._registry.setAll(r,a.filter((function(e){return!E(e.provider)})).map((function(e){return e.instance=void 0,e})))}}catch(t){e={error:t}}finally{try{s&&!s.done&&(t=i.return)&&t.call(i)}finally{if(e)throw e.error}}},e.prototype.createChildContainer=function(){var t,i;this.ensureNotDisposed();var s=new e(this);try{for(var n=u(this._registry.entries()),r=n.next();!r.done;r=n.next()){var a=p(r.value,2),l=a[0],d=a[1];d.some((function(e){return e.options.lifecycle===o.ContainerScoped}))&&s._registry.setAll(l,d.map((function(e){return e.options.lifecycle===o.ContainerScoped?{provider:e.provider,options:e.options}:e})))}}catch(e){t={error:e}}finally{try{r&&!r.done&&(i=n.return)&&i.call(n)}finally{if(t)throw t.error}}return s},e.prototype.beforeResolution=function(e,t,i){void 0===i&&(i={frequency:"Always"}),this.interceptors.preResolution.set(e,{callback:t,options:i})},e.prototype.afterResolution=function(e,t,i){void 0===i&&(i={frequency:"Always"}),this.interceptors.postResolution.set(e,{callback:t,options:i})},e.prototype.dispose=function(){return c(this,0,void 0,(function(){var e;return h(this,(function(t){switch(t.label){case 0:return this.disposed=!0,e=[],this.disposables.forEach((function(t){var i=t.dispose();i&&e.push(i)})),[4,Promise.all(e)];case 1:return t.sent(),[2]}}))}))},e.prototype.getRegistration=function(e){return this.isRegistered(e)?this._registry.get(e):this.parent?this.parent.getRegistration(e):null},e.prototype.getAllRegistrations=function(e){return this.isRegistered(e)?this._registry.getAll(e):this.parent?this.parent.getAllRegistrations(e):null},e.prototype.construct=function(e,t){var i=this;if(e instanceof v)return e.createProxy((function(e){return i.resolve(e,t)}));var s,n=function(){var s=P.get(e);if(!s||0===s.length){if(0===e.length)return new e;throw new Error('TypeInfo not known for "'+e.name+'"')}var n=s.map(i.resolveParams(t,e));return new(e.bind.apply(e,g([void 0],n)))}();return"function"!=typeof(s=n).dispose||s.dispose.length>0||this.disposables.add(n),n},e.prototype.resolveParams=function(e,t){var i=this;return function(s,n){var r,a,o,l;try{return"object"==typeof(l=s)&&"token"in l&&"multiple"in l?b(s)?s.multiple?(r=i.resolve(s.transform)).transform.apply(r,g([i.resolveAll(s.token)],s.transformArgs)):(a=i.resolve(s.transform)).transform.apply(a,g([i.resolve(s.token,e)],s.transformArgs)):s.multiple?i.resolveAll(s.token):i.resolve(s.token,e):b(s)?(o=i.resolve(s.transform,e)).transform.apply(o,g([i.resolve(s.token,e)],s.transformArgs)):i.resolve(s,e)}catch(e){throw new Error(k(t,n,e))}}},e.prototype.ensureNotDisposed=function(){if(this.disposed)throw new Error("This container has been disposed, you cannot interact with a disposed container")},e}(),R=new O;function L(e){return t=e,function(e,i,s){var n=Reflect.getOwnMetadata(m,e)||{};n[s]=t,Reflect.defineMetadata(m,n,e)};var t}function D(){return function(e){P.set(e,function(e){var t=Reflect.getMetadata("design:paramtypes",e)||[],i=Reflect.getOwnMetadata(m,e)||{};return Object.keys(i).forEach((function(e){t[+e]=i[e]})),t}(e))}}function M(){return function(e){D()(e),R.registerSingleton(e)}}if("undefined"==typeof Reflect||!Reflect.getMetadata)throw new Error("tsyringe requires a reflect polyfill. Please add 'import \"reflect-metadata\"' to the top of your entry point.");function B(e,t,i,s){var n,r=arguments.length,a=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,s);else for(var o=e.length-1;o>=0;o--)(n=e[o])&&(a=(r<3?n(a):r>3?n(t,i,a):n(t,i))||a);return r>3&&a&&Object.defineProperty(t,i,a),a}function F(e,t){return function(i,s){t(i,s,e)}}function j(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}"function"==typeof SuppressedError&&SuppressedError;class N{constructor(){this.emitters=new Set}}N=B([M()],N);const U=R.resolve(N).emitters;class V{on(e){return this._listeners.add(e),()=>{this.off(e)}}off(e){this._listeners.delete(e)}once(e,t=!0){const i=t=>{this.off(i),e(t)};this._listeners.add(i),t&&(this._onces.add(e),this._trackStatefulEmitter())}legacyOnce(){return new Promise((e=>{const t=this.on(((...i)=>(t(),e(...i))))}))}_trackStatefulEmitter(){U.add(this)}async legacyEmit(e){return Promise.all([...this._listeners].map((t=>t(e)))).then((e=>(this._emitted++,e)))}emit(e){[...this._listeners].forEach((t=>t(e))),this._emitted++,this._trackStatefulEmitter()}clear(){this._listeners.clear()}resetEmitted(){this._emitted=0}resetOnces(){for(const e of this._onces)this.once(e,!1)}get count(){return this._listeners.size}get emitted(){return this._emitted}get onces(){return this._onces}constructor(){this._listeners=new Set,this._emitted=0,this._onces=new Set}}class z extends V{on(e,t){return this._listeners.add(e),(null==t?void 0:t.handleEventsAlreadyEmitted)&&this._pastEvents.forEach(e),()=>{this.off(e)}}async legacyEmit(e){return this._pastEvents.push(e),Promise.all([...this._listeners].map((t=>t(e)))).then((e=>(this._emitted++,e)))}emit(e){this._pastEvents.push(e),[...this._listeners].forEach((t=>t(e))),this._emitted++,this._trackStatefulEmitter()}_trackStatefulEmitter(){U.add(this)}constructor(...e){super(...e),this._pastEvents=[]}}class H{}class ${}$=B([M()],$);class q extends ${constructor(...e){super(...e),this.dialDownLogs=new V,this.newContextDataEncodingSize=new V}}q=B([M()],q);class G extends H{init(e){this.logFilter=e.loggerFilters||[],this.siteId=e.siteAds.siteId,this.siteName=e.siteAds.siteName,this.bucket=e.bucket,this.branch=e.branch,this.deployment=e.deployment,this.debug=e.debug,this._gdpr="true"===e.gdpr,this._shouldQueue=this._gdpr,this._setLoggerExperiments()}_setLoggerExperiments(){this.loggerEventBus.dialDownLogs.on((({result:e,choices:t})=>{this._dialDownLogsExperimentResult=e,this._dialDownLogsExperimentChoices=t}))}_isDialedDownLog(e){const t=this._dialDownLogsExperimentResult||[];return e.some((e=>"string"==typeof e&&t.some((t=>e.toLowerCase().indexOf(t.toLowerCase())>-1))))}_dialedDownChoice(e){var t;return null==(t=this._dialDownLogsExperimentChoices)?void 0:t.filter((({choice:t})=>"string"==typeof t&&e.some((e=>"string"==typeof e&&e.toLowerCase().indexOf(t.toLowerCase())>-1)))).map((({weight:e})=>e))}log(e,t,...i){this.call(console.log,e,t,...i)}info(e,t,...i){this.call(console.info,e,t,...i)}warn(e,t,...i){this.call(console.warn,e,t,...i)}_getLogToCheck(e){const t=e&&e[1]&&e[1].arguments&&e[1].arguments[0];return t?[t]:e}error(e,t,...i){this._request("error",e,t,i)}event(e,t,...i){this._request("event",e,t,i)}_request(e,t,i,s){this.shouldLog(t,i)&&this.call(console.error,t,i,...s);const n=`${t}::${i}`,r=s.concat([n]),a=this._getLogToCheck(r);let o=this._uniqueLogMap.get(n)||0;if(!this._uniqueLogExclusionList.includes(n)&&o>this._uniqueLogLimit);else if(!this._isDialedDownLog(a)){const r=this._dialedDownChoice(a);r&&r.length&&s.push(`Sampled at ${100-r[0]} percent`),this.makeRequest("send",e,t,i,...s).catch((e=>{console.error(e)})),this._uniqueLogMap.set(n,++o)}}shouldLog(e,t){return!!this.debug&&!this.suppressedEventLogNames.has(e)&&this.suppressedEventLogNames.get(e)!==t}fetchEvent(e,t,...i){this.debug&&this.call(console.log,e,t,...i),this.makeRequest("fetch","event",e,t,...i).catch((e=>{console.error(e)}))}getBlockedLogCategories(){if("undefined"!=typeof window&&window.location){const e=new URLSearchParams(window.location.search).get("at_block_logs");if(e)return e.split(",").map((e=>e.trim().toLowerCase()))}return[]}getLimitedLogCategories(){if("undefined"!=typeof window&&window.location){const e=new URLSearchParams(window.location.search).get("at_limit_logs");if(e)return e.split(",").map((e=>e.trim().toLowerCase()))}return[]}call(e,t,i,...s){const n=this.logFilter;if(n&&n.length&&n.includes(t))return;const r=t.toLowerCase();if(this.getBlockedLogCategories().includes(r))return;const a=this.getLimitedLogCategories();if(a.length>0&&!a.includes(r))return;const o=[`%c${t}::${i} `],l=["color: #999; font-weight: bold;"];s.length>0&&"string"==typeof s[0]&&o.push(s.shift()),l.push(...s);try{Function.prototype.apply.call(e,console,[o.join(""),...l])}catch(e){return void console.error(e)}}buildRequestUrl(e,t,i,s){const n=`https://logger.adthrive.com/${e}`,r=[`${t}::${i} `];s.length>0&&"string"==typeof s[0]&&r.push(s.shift());const a=s.map((e=>(e&&e.error&&(e=e.error),e instanceof Error&&(e={name:e.name,message:e.message,stack:e.stack}),e))),o=this._addDefaultData(t,i);o&&a.push(o);return`${n}?${[`siteId=${encodeURIComponent(this.siteId||"")}`,`siteName=${encodeURIComponent(this.siteName||"")}`,`bucket=${encodeURIComponent(this.bucket||"")}`,`branch=${encodeURIComponent(this.branch||"")}`,`deployment=${encodeURIComponent(this.deployment||"")}`,`message=${encodeURIComponent(r.join("").trim())}`,`pageurl=${encodeURIComponent(window.location.origin+window.location.pathname)}`,`body=${encodeURIComponent(JSON.stringify(a))}`].join("&")}`}_addDefaultData(e,t){if(!this._data)return;const i={...this._data},s=this.defaultDataFilterList.get(`${e}:${t}`);return s&&Object.keys(i).forEach((e=>{s.includes(e)&&delete i[e]})),i}clearQueue(e){e&&(this._shouldQueue=!1,this.logQueue.forEach((e=>{"send"===e.action&&this.sendRequest(e.type,e.className,e.methodName,...e.args).catch((()=>{})),"fetch"===e.action&&this.fetchRequest(e.type,e.className,e.methodName,...e.args).catch((()=>{}))}))),this.logQueue=[]}async makeRequest(e,t,i,s,...n){if(this.disable)return Promise.resolve(!1);if(this._gdpr&&this._shouldQueue){const r={action:e,type:t,className:i,methodName:s,args:n};return this.logQueue.push(r),Promise.resolve(!0)}return"send"===e?this.sendRequest(t,i,s,...n):this.fetchRequest(t,i,s,...n)}truncateRequestUrl(e,t,i,s,n){const r=[...s[0].arguments],a={...s[0],arguments:r},o=`${i}Truncated`;let l=0;for(;n.length>this.maxCloudFrontUrlSize&&r.length>0&&l<10;)r.pop(),n=this.buildRequestUrl(e,t,o,[a]),l++;return n}async sendRequest(e,t,i,...s){this.sending.emit();let n=this.buildRequestUrl(e,t,i,s);var r;if(n.length>this.maxCloudFrontUrlSize&&(this._isTruncatableRequest(e,t,i,null==(r=s[0])?void 0:r.arguments)&&(n=this.truncateRequestUrl(e,t,i,s,n)),n.length>this.maxCloudFrontUrlSize))return this.sendRequest(e,t,i,"Payload too large. Logger cannot send").catch((e=>{console.error(e)}));return new Promise(((e,r)=>{const a=new XMLHttpRequest;a.open("get",n);const o="logger"===t&&"sendRequest"===i;a.addEventListener("load",(()=>200!==a.status?(o||this.error("logger","sendRequest",...s,{className:t,methodName:i}),r(new Error(`Logger send request failed ${a.status}`))):e(a.responseText))),a.addEventListener("error",(()=>(o||this.error("logger","sendRequest",...s,{className:t,methodName:i}),r(new Error("Logger send request failed"))))),a.send()}))}_isTruncatableRequest(e,t,i,s){return[{type:"error",className:"PrebidAuctionManager",methodName:"_logAuctionDebug"},{type:"event",className:"SlotManager",methodName:"requestBids"}].some((s=>s.type===e&&s.className===t&&s.methodName===i))&&!!s}async fetchRequest(e,t,i,...s){this.sending.emit();const n=this.buildRequestUrl(e,t,i,s);return fetch(n,{method:"GET",keepalive:!0,referrerPolicy:"no-referrer-when-downgrade"})}get data(){return this._data}set data(e){this._data=e,this.loggerEventBus.newContextDataEncodingSize.emit(encodeURIComponent(JSON.stringify(this._data)).length)}constructor(){super(),this.name="Logger",this.gdprPurposes=[7],this.disable=!1,this._shouldQueue=!1,this._data={abgroup:{key:"adslogger-err"},pubab:{key:"adslogger-err"},sess:"adslogger-err",pvk:"adslogger-err",hbho:["adslogger-err"],vbho:["adslogger-err"],spa:!1},this._uniqueLogLimit=100,this._uniqueLogMap=new Map,this._uniqueLogExclusionList=["SlotRenderEnded::adImpression","ImpressionLogComponent::bidWon"],this.sending=new V,this.logQueue=[],this.suppressedEventLogNames=new Map([["SlotRenderEnded","adImpression"],["VideoUtils","getPlacementElement"],["PrebidAuctionManager","_logAuctionDebug"],["PrebidAuctionManager","init"]]),this.defaultDataFilterList=new Map([["SlotRenderEnded:adImpression",["abgroup"]]]),this.maxCloudFrontUrlSize=8192,this.loggerEventBus=R.resolve(q)}}const W=new(G=B([D(),j("design:type",Function),j("design:paramtypes",[])],G));class K{async limit(e){return new Promise((t=>{this._timeouts.has(e)&&window.clearTimeout(this._timeouts.get(e));const i=window.setTimeout((()=>{t()}),this._wait);this._timeouts.set(e,i)}))}constructor(e){this._wait=e,this._timeouts=new Map}}class Y extends G{}const X=new(Y=B([D()],Y)),Q="amznbid",J="amzniid",Z="amznp",ee="amznsz",te={Aidem:"aidem",AmazonTAM:"amazon",AmazonUAM:"AmazonUAM",Blis:"blis",Cadent:"cadent",Criteo:"criteo",ImproveDigital:"improvedigital",IndexExchange:"ix",Kargo:"kargo",MediaGridVideo:"gridvid",Medianet:"medianet",Nativo:"nativo",Ogury:"ogury",OpenX:"openx",Ozone:"ozone",Pubmatic:"pubmatic",Rtbhouse:"rtbhouse",Rubicon:"rubicon",Seedtag:"seedtag",Sharethrough:"sharethrough",Triplelift:"triplelift",Teads:"teads",TTD:"ttd",Undertone:"undertone",Verizon:"verizon",YahooSSP:"yahoossp",Adform:"adform",AppNexus:"appnexus",AidemServer:"aidem_ss",Conversant:"conversant",CriteoServer:"crit_ss",Flipp:"flipp",ImproveDigitalServer:"improve_ss",IndexExchangeServer:"ix_ss",GumGum:"gumgum",MediaGrid:"grid",NativoServer:"ntvo_ss",OpenXServer:"opnx_ss",PubmaticServer:"pubm_ss",Rise:"rise",RubiconServer:"rubi_ss",SharethroughServer:"share_ss",ThirtyThreeAcross:"33across",TripleliftServer:"tripl_ss",UndertoneServer:"under_ss",Unruly:"unruly",YahooSSPServer:"yah_ss",Yieldmo:"yieldmo",AdformAY:"adform_ay",AidemAY:"aidem_ay",AppNexusAy:"appnexus_ay",ConversantAY:"convrsnt_ay",CriteoAY:"crit_ay",FlippAY:"flipp_ay",GumGumAY:"gumgum_ay",ImproveDigitalAY:"improve_ay",IndexExchangeAY:"ix_ay",MediaGridAY:"grid_ay",NativoAY:"ntvo_ay",OpenXAY:"opnx_ay",PubmaticAY:"pubm_ay",ResetDigitalAY:"resetdigital_ay",RiseAY:"rse_ay",RubiconAY:"rubi_ay",SharethroughAY:"share_ay",ThirtyThreeAcrossAY:"33across_ay",TripleliftAY:"tripl_ay",UndertoneAY:"under_ay",UnrulyAY:"unrly_ay",YahooSSPAY:"yah_ay",YieldmoAY:"yldmo_ay"},ie="ix",se="mn",ne="ox",re="pu",ae="ma",oe="sh",le="tl",de="af",ce="an",he="as",ue="cv",pe="cs",ge="fl",me="im",_e="is",fe="gg",ve="mg",ye="ns",be="os",Se="ps",Ee="rs",Ce="ms",Te="sr",we="ta",ke="ts",Ae="us",Ie="ur",xe="ys",Pe="ym",Oe={[te.IndexExchange]:ie,[te.Medianet]:se,[te.OpenX]:ne,[te.Pubmatic]:re,[te.Rubicon]:ae,[te.Sharethrough]:oe,[te.Triplelift]:le,[te.Adform]:de,[te.AppNexus]:ce,[te.AidemServer]:he,[te.Conversant]:ue,[te.CriteoServer]:pe,[te.Flipp]:ge,[te.ImproveDigitalServer]:me,[te.IndexExchangeServer]:_e,[te.GumGum]:fe,[te.MediaGrid]:ve,[te.NativoServer]:ye,[te.OpenXServer]:be,[te.PubmaticServer]:Se,[te.Rise]:Ee,[te.RubiconServer]:Ce,[te.SharethroughServer]:Te,[te.ThirtyThreeAcross]:we,[te.TripleliftServer]:ke,[te.UndertoneServer]:Ae,[te.Unruly]:Ie,[te.YahooSSPServer]:xe,[te.Yieldmo]:Pe},Re={[ie]:te.IndexExchange,[se]:te.Medianet,[ne]:te.OpenX,[re]:te.Pubmatic,[ae]:te.Rubicon,[oe]:te.Sharethrough,[le]:te.Triplelift,[de]:te.Adform,[ce]:te.AppNexus,[he]:te.AidemServer,[ue]:te.Conversant,[pe]:te.CriteoServer,[ge]:te.Flipp,[me]:te.ImproveDigitalServer,[_e]:te.IndexExchangeServer,[fe]:te.GumGum,[ve]:te.MediaGrid,[ye]:te.NativoServer,[be]:te.OpenXServer,[Se]:te.PubmaticServer,[Ee]:te.Rise,[Ce]:te.RubiconServer,[Te]:te.SharethroughServer,[we]:te.ThirtyThreeAcross,[ke]:te.TripleliftServer,[Ae]:te.UndertoneServer,[Ie]:te.Unruly,[xe]:te.YahooSSPServer,[Pe]:te.Yieldmo},Le=[te.AppNexus,te.IndexExchangeServer,te.OpenXServer,te.PubmaticServer,te.RubiconServer,te.TripleliftServer,te.UndertoneServer],De=[],Me={Prebid:"prebid",Amazon:"amazon",Floors:"floors",Optable:"optable",TrafficShaping:"trafficShaping"},Be={GAM:"gam",Marmalade:"marmalade",CMP:"cmp",...Me},Fe="cm",je="fbrap",Ne="rapml",Ue="lazy",Ve="raptive",ze="refresh",He="session",$e="lazyBidPool",qe="fallback",Ge={lazy:"l",raptive:"rapml",refresh:"r",session:"s",crossdomain:"c",highsequence:"hs",lazyBidPool:"lbp",fallback:"f"},We={Version:"Version",SharingNotice:"SharingNotice",SaleOptOutNotice:"SaleOptOutNotice",SharingOptOutNotice:"SharingOptOutNotice",TargetedAdvertisingOptOutNotice:"TargetedAdvertisingOptOutNotice",SensitiveDataProcessingOptOutNotice:"SensitiveDataProcessingOptOutNotice",SensitiveDataLimitUseNotice:"SensitiveDataLimitUseNotice",SaleOptOut:"SaleOptOut",SharingOptOut:"SharingOptOut",TargetedAdvertisingOptOut:"TargetedAdvertisingOptOut",SensitiveDataProcessing:"SensitiveDataProcessing",KnownChildSensitiveDataConsents:"KnownChildSensitiveDataConsents",PersonalDataConsents:"PersonalDataConsents",MspaCoveredTransaction:"MspaCoveredTransaction",MspaOptOutOptionMode:"MspaOptOutOptionMode",MspaServiceProviderMode:"MspaServiceProviderMode",SubSectionType:"SubsectionType",Gpc:"Gpc"},Ke=1,Ye=2,Xe={AdDensity:"addensity",AdLayout:"adlayout",FooterCloseButton:"footerclose",Interstitial:"interstitial",RemoveVideoTitleWrapper:"removevideotitlewrapper",StickyOutstream:"stickyoutstream",VideoAdvancePlaylistRelatedPlayer:"videoadvanceplaylistrp",MobileStickyPlayerPosition:"mspp"},Qe={Below_Post_1:"Below_Post_1",Below_Post:"Below_Post",Content:"Content",Content_1:"Content_1",Content_2:"Content_2",Content_3:"Content_3",Content_4:"Content_4",Content_5:"Content_5",Content_6:"Content_6",Content_7:"Content_7",Content_8:"Content_8",Content_9:"Content_9",Recipe:"Recipe",Recipe_1:"Recipe_1",Recipe_2:"Recipe_2",Recipe_3:"Recipe_3",Recipe_4:"Recipe_4",Recipe_5:"Recipe_5",Native_Recipe:"Native_Recipe",Footer_1:"Footer_1",Footer:"Footer",Header_1:"Header_1",Header_2:"Header_2",Header:"Header",Sidebar_1:"Sidebar_1",Sidebar_2:"Sidebar_2",Sidebar_3:"Sidebar_3",Sidebar_4:"Sidebar_4",Sidebar_5:"Sidebar_5",Sidebar_9:"Sidebar_9",Sidebar:"Sidebar",Interstitial_1:"Interstitial_1",Interstitial:"Interstitial",Video_StickyOutstream_1:"Video_StickyOutstream_1",Video_StickyOutstream:"Video_StickyOutstream",Video_StickyInstream:"Video_StickyInstream",Sponsor_Tile:"Sponsor_Tile"},Je="desktop",Ze="mobile",et={Video_Collapse_Autoplay_SoundOff:"Video_Collapse_Autoplay_SoundOff",Video_Individual_Autoplay_SOff:"Video_Individual_Autoplay_SOff",Video_Coll_SOff_Smartphone:"Video_Coll_SOff_Smartphone",Video_In_Post_ClicktoPlay_SoundOn:"Video_In-Post_ClicktoPlay_SoundOn",Video_Collapse_Autoplay_SoundOff_15s:"Video_Collapse_Autoplay_SoundOff_15s",Video_Individual_Autoplay_SOff_15s:"Video_Individual_Autoplay_SOff_15s",Video_Coll_SOff_Smartphone_15s:"Video_Coll_SOff_Smartphone_15s",Video_In_Post_ClicktoPlay_SoundOn_15s:"Video_In-Post_ClicktoPlay_SoundOn_15s"},tt={Float:"adthrive-collapse-float",Sticky:"adthrive-collapse-sticky",Mobile:"adthrive-collapse-mobile"},it={Small:"adthrive-collapse-small",Medium:"adthrive-collapse-medium"},st="adthrive-collapse-bottom-right",nt=1,rt=2,at=3,ot=4,lt=5,dt=6,ct=7,ht=8,ut=9,pt=10,gt=11,mt=2,_t=4,ft=5,vt=6,yt=7,bt=8,St={"":"Off","ar-SA":"Arabic","zh-CN":"Chinese","en-US":"English","fr-FR":"French","de-DE":"German","hi-IN":"Hindi","pt-PT":"Portuguese","es-US":"Spanish"},Et="default",Ct="5daf495ed42c8605cfc74b0b",Tt="55bccc97303edab84afd77e2",wt="55cb7e3b4bc841bd0c4ea577",kt="566aefa94856897050ee7303",At="541917f5a90318f9194874cf",It={SIZE_640_360:[640,360],SIZE_400_225:[400,225]},xt=["17","18","62"],Pt="mgn",Ot=e=>"isAmazon"in e||"amzniid"in e||"amzniid_sp"in e,Rt="percent",Lt="flat",Dt="pmp",Mt="instream",Bt="default",Ft="outstream",jt="stickyOutstream",Nt="prebid",Ut="native",Vt={percent:1,flat:0},zt=Vt.flat,Ht=Vt.percent,$t=[.1,5,20,100],qt=new Map([[.1,100],[5,20],[20,10],[100,2]]),Gt=(e,t,i)=>{var s;const n=+(null!=(s=null==e?void 0:e.percent)?s:Ht);var r;const a=+(null!=(r=null==e?void 0:e.flat)?r:zt);var o;let l=+(null!=(o=null==t?void 0:t.percent)?o:Ht);var d;let c=+(null!=(d=null==t?void 0:t.flat)?d:zt);if(i){var h;var u;l*=+(null!=(h=i.percent)?h:Ht),c+=+(null!=(u=i.flat)?u:zt)}return l*=n,c+=a,{percent:l,flat:c}},Wt=(e,t)=>{var i,s,n,r;return{percent:Number(null!=(i=e.percent)?i:1)*Number(null!=(s=t.percent)?s:1),flat:Number(null!=(n=e.flat)?n:0)+Number(null!=(r=t.flat)?r:0)}},Kt=(e,t)=>{const{adUnitCode:i="",mediaType:s,meta:n,vastUrl:r,vastXml:a}=t,o=e.video.instreamAdUnits.has(i),l=i.includes(Qe.Video_StickyOutstream),d=(null==n?void 0:n.isInBannerVideo)||!o&&(r||a||"video"===s)&&!l;return o?Mt:l?jt:d?Ft:"native"===s?Ut:Bt},Yt=(e,t,i)=>{let s=i.mediaType||Bt;!Ot(i)&&(s=i.dealId&&"prebid"===t?Dt:Kt(e,i));const n=e.partners.getBidderConfig(t);return n?n.cpmMap.get(e.partners.getBidderConfig(t).cpmMap.has(s)?s:Bt):Vt},Xt=(e,t,i)=>{let s,n=i.mediaType||Bt;Ot(i)||(n=Kt(e,i),s=i.bidderCode),t=t||s||"";const r=e.partners.getBidderConfig(t),a={...r.cpmMap.get(r.cpmMap.has(n)?n:Bt)||Vt};return n===Ft&&((e,t)=>{!Ot(e)&&e.viewability&&(t.percent=(t.percent||1)*e.viewability)})(i,a),a},Qt=(e,t,i,s)=>{const{dealId:n,pmpConfig:r,dealConfig:a}=((e,t,i)=>{var s,n;const r=Ot(e)?e.amzndeal_sp:e.dealId,a=null==(s=t.partners.getBidderConfig(i).cpmMap)?void 0:s.get(Dt);return{dealId:r,pmpConfig:a,dealConfig:a&&"deals"in a&&r?null==a||null==(n=a.deals)?void 0:n[r]:void 0}})(s,e,i);var o;const l=null!=(o=Yt(e,Bt,s))?o:{};var d;const c=null!=(d=Yt(e,Nt,s))?d:{},h=Wt(l,c),u=((e,t,i)=>e&&t?Gt(Vt,t,i):void 0)(n,r,a);u&&(h.percent*=u.percent,h.flat+=u.flat);const p=((e,t,i)=>{const{percent:s,flat:n}=Gt(e,t);return i*s-n})(h,Xt(e,i,s),t);return Math.max(p,0)},Jt=(e,t,i,s,n=!1)=>{const r=e.prebid.bidderInflatorMap.get(t)||1;var a;n&&(s*=r);const o=null!=(a=Yt(e,Bt,i))?a:{};var l;const d=null!=(l=Yt(e,Nt,i))?l:{},c=Xt(e,t,i),h=Gt(o,c,{}),{percent:u,flat:p}=Gt(h,d),g=e.prebid.s2s.bidders.includes(t)||"server"===t,m=n?(s+p)/u:s*u-p,_=((e,t,i,s=!1)=>{var n;const r=null!=(n=Yt(e,Bt,i))?n:{},a=Wt(r,{}),o=s?(t+a.flat)/a.percent:t*a.percent-a.flat;return Math.max(o,0)})(e,s,i,n),f=g?_:m;return n?f:f/r},Zt=(e,t,i,s,n=!0)=>{const r={adUnitCode:i.adUnitCode,...i.mediaTypes&&{mediaType:i.mediaTypes.banner?"banner":"video"},...i.viewability&&{viewability:i.viewability}};return Jt(e,t,r,s,n)},ei=e=>{const t=$t.find((t=>e<=t))||100,i=qt.get(t);return(Math.floor(e*i)/i).toFixed(2)},ti=(e,t,i,s,n)=>{var r;const a={...t};a.mediaType=n,a.isAmazon=!0,a.amzndeal_sp=(null==a?void 0:a.amzndeal_sp)||(null==(r=a.targeting)?void 0:r.amzndeal_sp);const o=Qt(e,s,i,a);return Math.max(o,0)},ii=e=>{const t={};return function(...i){const s=JSON.stringify(i);if(t[s])return t[s];const n=e.apply(this,i);return t[s]=n,n}},si=navigator.vendor,ni=navigator.userAgent,ri=ii((e=>/Edge\/|Edg\//.test(e||ni))),ai=ii((e=>/Firefox/.test(e||ni))),oi=ii((e=>/Trident|MSIE/.test(e||ni))),li=ii((e=>/Opera|OPR/.test(e||ni))),di=ii(((e,t)=>(/Chrom/.test(e||ni)&&/Google/.test(t||si)||/CriOS/.test(e||ni))&&!ri(e)&&!li(e))),ci=ii((e=>/Chrom|Applechromium/.test(e||ni))),hi=ii(((e,t)=>/Safari/.test(e||ni)&&/Apple Computer/.test(t||si)&&!ri(e)&&!li(e))),ui=ii((()=>/WebKit/.test(ni))),pi=ii(((e,t)=>di(e,t)?"Chrome":hi(e,t)?"Safari":ri(e)?"Edge":ai(e)?"Firefox":li(e)?"Opera":oi(e)?"IE":"Others")),gi=ii(((e,t)=>{const i=pi(e||ni,t||si);return"Chrome"===i?(e=>{const t=-1!==e.indexOf("Chrom")?e.indexOf("Chrom"):e.indexOf("CriOS");if(-1!==t){const i=t+7,s=e.indexOf(" ",i);return e.substring(i,s)}return null})(e||ni):"Safari"===i?(e=>{const t=e.indexOf("Version/");if(-1!==t){const i=t+8,s=e.indexOf(" ",i);return e.substring(i,s)}const i=e.indexOf("Safari/");if(-1!==i){const t=i+7,s=e.indexOf(" ",t);return e.substring(t,s)}return null})(e||ni):"Firefox"===i?(e=>{const t=e.indexOf("Firefox/");if(-1!==t){const i=t+8;let s=e.indexOf(" ",i);return-1===s&&(s=e.length),e.substring(i,s)}return null})(e||ni):"Edge"===i?(e=>{const t=e.indexOf("Edg/");if(-1!==t){const i=t+4;let s=e.indexOf(" ",i);return-1===s&&(s=e.length),e.substring(i,s)}return null})(e||ni):"IE"===i?(e=>{const t=e.indexOf("MSIE ");if(-1!==t){const i=t+5;let s=e.indexOf(";",i);return-1===s&&(s=e.length),e.substring(i,s)}})(e||ni):"Opera"===i?(e=>{const t=e.indexOf("OPR/");if(-1!==t){const i=t+4,s=e.indexOf(" ",i);return e.substring(i,s)}return"Unknown"})(e||ni):void 0})),mi=ii((()=>ci()?"chromium":ui()?"webkit":"other")),_i=(e=window.document)=>!!e.browsingTopics&&!!e.featurePolicy&&e.featurePolicy.allowsFeature("browsing-topics"),fi={"control_1.1":"disabled","control_1.2":"disabled","control_1.3":"disabled","control_1.4":"disabled",label_only_1:"disabled",label_only_2:"enabled",label_only_3:"enabled",label_only_4:"enabled",label_only_5:"enabled",control_2:"disabled","treatment_1.1":"enabled","treatment_1.2":"enabled","treatment_1.3":"enabled",none:"experiment"},vi=(e,t=0,i=!1,s=74)=>{if(!e.parentElement)return;if(t===s)return;const n=getComputedStyle(e.parentElement).overflow;"hidden"!==n&&"auto"!==n||(e.parentElement.style.overflow="visible",i||(i=!0,W.event("util","checkForOverflow","parent element with overflow detected"))),vi(e.parentElement,++t,i,s)},yi=()=>{const e=document.querySelector(".adthrive-footer");let t=52;return e&&"none"===e.style.display?t=102:e&&(t=Math.max(e.getBoundingClientRect().height,t)),t},bi=(e,t,i,s,n)=>{const r=document.createElement(e);return t&&r.setAttribute("id",t),i&&(r.className=i),s&&(r.innerHTML=s),n&&(r.href=n,"a"===e&&r.addEventListener("click",(e=>{e.preventDefault()}))),r},Si=(e,t)=>null==e||e!=e?t:e,Ei=e=>new Promise((t=>{setTimeout(t,e)})),Ci=(e,t)=>{const i=window.innerWidth;return i>=t?"desktop":i>=e?"tablet":"phone"},Ti=()=>new Promise((e=>{if("interactive"===document.readyState||"complete"===document.readyState)return e();document.addEventListener("DOMContentLoaded",(()=>e()))})),wi=(e,t)=>e.devices.includes(t),ki=(e,t)=>!e.disableAds.locations.has(t.location)&&!e.disableAds.all,Ai=e=>0===e.pageSelector.length||null!==document.querySelector(e.pageSelector),Ii=e=>{let t=e.clientWidth;if(getComputedStyle){const i=getComputedStyle(e,null);t-=parseFloat(i.paddingLeft||"0")+parseFloat(i.paddingRight||"0")}return t},xi=e=>{const t=e.offsetHeight,i=e.offsetWidth,s=e.getBoundingClientRect(),n=document.body,r=document.documentElement,a=window.pageYOffset||r.scrollTop||n.scrollTop,o=window.pageXOffset||r.scrollLeft||n.scrollLeft,l=r.clientTop||n.clientTop||0,d=r.clientLeft||n.clientLeft||0,c=Math.round(s.top+a-l),h=Math.round(s.left+o-d);return{top:c,left:h,bottom:c+t,right:h+i,width:i,height:t}},Pi=(e,t=50)=>{const i=e.getBoundingClientRect(),s=window.innerHeight||document.documentElement.clientHeight;return(i.bottom-s)/i.height*100>=t},Oi=e=>(e=>{const t=e.match(/([a-zA-Z0-9._!#$%+^&*()[\]<>-]+@[a-zA-Z0-9._-]+\.[a-zA-Z0-9._-]+)/gi);return t?t[0]:""})((e=>e.replace(/\s/g,""))(e.toLowerCase())),Ri=(e=window.location.search)=>{const t=0===e.indexOf("?")?1:0;return e.slice(t).split("&").reduce(((e,t)=>{const[i,s]=t.split("=");return e.set(i,s),e}),new Map)},Li=e=>e.split("&").reduce(((e,t)=>{const[i,s]=t&&t.split("=");return i&&s&&(e[i]=s),e}),{}),Di=e=>{let t={};const i=Ri().get(e);if(i)try{const s=decodeURIComponent(i).replace(/\+/g,"");t=JSON.parse(s),W.event("ExperimentOverridesUtil","getExperimentOverrides",e,t)}catch(e){}return t},Mi=(e,t,i)=>i.indexOf(e)===t,Bi=ii(((e=navigator.userAgent)=>/Windows NT|Macintosh/i.test(e))),Fi=(e=navigator.userAgent)=>/iP(hone|od|ad)/i.test(e),ji=(e,t=navigator.userAgent)=>Fi(t)&&((e,t=navigator.userAgent)=>new RegExp(`OS ${e}`,"i").test(t))(e.toString(),t),Ni="Facebook",Ui="Instagram",Vi="Pinterest",zi=new Map([[Ni,{ios:"com.facebook.Facebook",android:"com.facebook.katana"}],[Vi,{ios:"pinterest",android:"com.pinterest"}],[Ui,{ios:"com.burbn.instagram",android:"com.instagram.android"}]]),Hi=()=>window.navigator.userAgent.includes("[Pinterest/iOS]")||window.navigator.userAgent.includes("[Pinterest/Android]"),$i=()=>window.navigator.userAgent.includes("FBAN")||window.navigator.userAgent.includes("FBAV"),qi=()=>window.navigator.userAgent.includes("Instagram"),Gi=(e,t)=>{const i=$i()?Ni:qi()?Ui:Hi()?Vi:"",s=zi.get(i);if(s){const n=Fi()?s.ios:((e=navigator.userAgent)=>e.includes("android")||e.includes("Android"))()?s.android:"";if(!n)return;return{bundle:n,name:i,domain:e,content:t.content}}},Wi=()=>window.adthriveCLS,Ki=ii((()=>{const e=navigator.userAgent,t=/Tablet|iPad|Playbook|Nook|webOS|Kindle|Android (?!.*Mobile).*Safari|CrOS/i.test(e);return/Mobi|iP(hone|od)|Opera Mini/i.test(e)&&!t})),Yi=()=>{const e=navigator.userAgent;return/Tablet|iPad|Playbook|Nook|webOS|Kindle|Android (?!.*Mobile).*Safari/i.test(e)||!/iPhone/i.test(e)&&/Mac/i.test(e)&&(navigator.maxTouchPoints>0||"ontouchstart"in window)},Xi=()=>Ki()?"phone":Yi()?"tablet":Bi()?"desktop":"other",Qi=e=>{const t=e.getBoundingClientRect(),i=window.innerHeight;return t.bottom<0?-Math.ceil(Math.abs(t.bottom)/i):t.top>i?Math.ceil((t.top-i)/i):0},Ji=[50,60,70,80],Zi=e=>Ki()&&(null==e?void 0:e.location)===Qe.Content&&1===(null==e?void 0:e.refreshCount)?60:80,es=e=>(null==e?void 0:e.refreshCount)>0?Zi(e):(null==e?void 0:e.viewability)?Math.min(10*Math.floor(100*(null==e?void 0:e.viewability)/10),80):0,ts=e=>Ji.includes(e)?e:0,is=(e=new Date)=>{const t=e.getTimezoneOffset();return new Date(e.getTime()-60*t*1e3).toISOString().split("T")[0]},ss=e=>new Promise(((t,i)=>{fetch(e).then((e=>{e.json().then((e=>t(e))).catch((()=>i(!1)))})).catch((()=>i(!1)))})),ns=e=>{const t=e.split("."),i=t.length;return i>2&&(e=t[i-2]+"."+t[i-1],2!==t[i-2].length&&3!==t[i-2].length||2!==t[i-1].length||(e=t[i-3]+"."+e)),e},rs=()=>{if(document.referrer&&document.referrer.length){const e=(e=>{const t=document.createElement("a");return t.href=e,t.hostname})(document.referrer);if(ns(e)!==ns(window.location.hostname))return e}},as=e=>{const t=rs();return Si(t,e)},os="div #comments, section .comments",ls=(e,t=os)=>{const i=e.querySelector(t);return i?e.offsetHeight-i.offsetHeight:e.offsetHeight},ds=(e,t,i=document)=>{const s=((e=document)=>{const t=e.querySelectorAll("article");if(0===t.length)return null;const i=Array.from(t).reduce(((e,t)=>t.offsetHeight>e.offsetHeight?t:e));return i&&i.offsetHeight>1.5*window.innerHeight?i:null})(i),n=s?[s]:[],r=[];e.forEach((e=>{const s=Array.from(i.querySelectorAll(e.elementSelector)).slice(0,e.skip);var a;(a=e.elementSelector,a.includes(",")?a.split(","):[a]).forEach((a=>{const o=i.querySelectorAll(a);for(let i=0;ie.isEqualNode(a))))continue;const l=a&&a.parentElement;l&&l!==document.body?n.push(l):n.push(a),-1===s.indexOf(a)&&r.push({dynamicAd:e,element:a})}}))}));const a=((e=document)=>(e===document?document.body:e).getBoundingClientRect().top)(i),o=r.sort(((e,t)=>e.element.getBoundingClientRect().top-a-(t.element.getBoundingClientRect().top-a)));return[n,o]},cs=(e,t,i=document)=>{const[s,n]=ds(e,t,i);if(0===s.length)throw Error("No Main Content Elements Found");return[Array.from(s).reduce(((e,t)=>t.offsetHeight>e.offsetHeight?t:e))||document.body,n]},hs=()=>{var e;const t=window.navigator.userAgent,i=(null==(e=window.navigator.userAgentData)?void 0:e.platform)||window.navigator.platform||"";return["macOS","Macintosh","MacIntel","MacPPC","Mac68K"].includes(i)?"macOS":["iPhone","iPad","iPod"].includes(i)?"iOS":["Win32","Win64","Windows","WinCE"].includes(i)?"windows":/Android/.test(t)?"android":/Linux/.test(i)?"linux":"other"},us="e:",ps="c1:",gs={KEY:"adt_i"},ms={KEY:"adt_emsrc",VALUES:{ID5ID:"id5id",GPID:"gpid",RCID:"rcid",SHID:"shid",LPID:"lpid",TD:"td",MW:"mw",API:"api",URL:"url",URLH:"urlh",LOCAL_STORAGE:"l",COOKIE:"cki",COMMENT:"c",NEWSLETTER:"nl",SLICKSTREAM:"ss",IDENTITY_IFRAME:"l_i",GRWM:"grwm",PUBM:"pubm",OTHER:"o",SDKLI:"sdkli"},PREFIXES:{IDG:"g_",IDENTITY_IFRAME:"l_i-",SLICKSTREAM:"ss_",RAPTIVE_AUTH:"ra_"},SUFFIXES:{CAPTURE:"_c",STORAGE:"_s"}},_s={KEY:"__lmpid"},fs=e=>"string"==typeof e&&e.includes(ms.VALUES.SDKLI),vs=e=>"string"==typeof e&&e.includes(`${ms.VALUES.SDKLI}r`),ys=e=>{const{source:t,identifierType:i}=e;return"gpid"===i?t.includes(`${ms.PREFIXES.RAPTIVE_AUTH}${ms.VALUES.GPID}`):t.includes(ms.PREFIXES.RAPTIVE_AUTH)},bs=e=>{const{source:t,identifierType:i}=e;switch(i){case"truedata":return t.includes(`${ms.PREFIXES.IDG}${ms.VALUES.TD}`);case"mediawallah":return t.includes(`${ms.PREFIXES.IDG}${ms.VALUES.MW}`);default:return t.includes(ms.PREFIXES.IDG)}},Ss=e=>!("string"!=typeof e||(e=>"string"==typeof e&&["l_i","l_i-l_i"].includes(e))(e)||bs({source:e})||ys({source:e})||fs(e)),Es=e=>"string"==typeof e&&(Ss(e)||ys({source:e})),Cs=(e,t=!1,i=!1,s=!1)=>new Promise(((n,r)=>{const a=document.createElement("script");a.addEventListener("error",(()=>r(new Error(`Failed to import script ${e}`)))),a.addEventListener("load",(()=>n(a))),a.type="text/javascript",a.src=e,a.defer=i,a.async=s,((e,t)=>{const i=document.getElementsByTagName("script")[0];i&&i.parentNode&&!t?i.parentNode.insertBefore(e,i):document.body.appendChild(e)})(a,t)})),Ts=(e,t,i)=>{const s=document.createElement("link");s.rel=t,s.href=e,i&&i.length&&i.forEach((e=>{s.setAttribute(e.name,e.value)})),document.head.appendChild(s)},ws=["Refresh","PD","Source","Browser","Topic","MCMP","Sens"],ks=(e,t,i=!1)=>{t.addToQueue((()=>{const s=t.getConfig("ix")||{firstPartyData:{}},n={...s.firstPartyData,...e},r={};ws.forEach((e=>{e in n&&(r[e]=n[e])}));for(const e in n)ws.includes(e)||(r[e]=n[e]);s.firstPartyData=r,i&&delete s.firstPartyData.Refresh,t.setConfig({ix:s})}))},As=e=>e?(e=>{const t={google:"google",facebook:"facebook",instagram:"instagram",pinterest:"pinterest"};return e.split(".").filter((e=>t[e]))[0]||"other"})(e):"direct",Is=({event:e,ignoreOtherCompanyIds:t=!1})=>{const i=new Set([-1,0,1,199612376,2143809321]),s=new Set([4455444655,4460609902,4463579729,4464180925,4466143841,4550726766,4623743690,4623743882,4634020290,4642901988,4697115760,4801442281,4802163255,4805985973,4807636548,4867316569]),n=!e.campaignId||i.has(e.campaignId),r=!e.companyIds||e.companyIds&&!e.companyIds.some((e=>s.has(e)));return t?n:n&&r};class xs{isSelenium(){return this.runTests()}constructor(){this.runTests=()=>{let e=!1;if(window&&document){e=["webdriver"in window,"_Selenium_IDE_Recorder"in window,"callSelenium"in window,"_selenium"in window,"__webdriver_script_fn"in document,"__driver_evaluate"in document,"__webdriver_evaluate"in document,"__selenium_evaluate"in document,"__fxdriver_evaluate"in document,"__driver_unwrapped"in document,"__webdriver_unwrapped"in document,"__selenium_unwrapped"in document,"__fxdriver_unwrapped"in document,"__webdriver_script_func"in document,null!==document.documentElement.getAttribute("selenium"),null!==document.documentElement.getAttribute("webdriver"),null!==document.documentElement.getAttribute("driver")].some((e=>e))}return e}}}const Ps=()=>{if(navigator&&navigator.webdriver)return"wdv"},Os=()=>{if(navigator&&navigator.hardwareConcurrency>32)return"hwv"},Rs=()=>{if(navigator&&navigator.userAgent&&(()=>{const e=new RegExp(["python","apis","googleweblight","spider","crawler","curl","wget","ia_archiver","insights","baidu","bot","monitor","scraper","A6-Indexer","addthis","admantx","agentslug","alexa","anderspink","apache-httpclient","apachebench","apis-google","appengine-google","ask jeeves","asynchttpclient","awe.sm","baidu","barkrowler","biglotron","bingpreview","brandverify","bubing","butterfly","buzztalk","cf-uc","chatgpt","check_http","cloudflare","cmradar/0.1","coldfusion","comodo ssl checker","convera","copypants","crowsnest","curl","dap/nethttp","daumoa","deepseek","deepseekbot","developers.google.com/+/web/snippet/","digitalpersona fingerprint software","drupact","duckduck","elb-healthchecker","embedly","eoaagent","europarchive","eventmachine httpclient","evrinid","exaleadcloudview","ezooms","ez publish","facebookexternalhit","feedburner","feedfetcher-google","findlink","findthatfile","flipboardproxy","garlik","genieo","getprismatic.com","ghost","gigablast","go http package","google( page speed insights| web preview|google-site-verification|-structured-data-testing-tool|-structureddatatestingtool)","gpt","gptbot","hatena","headless","heritrix","htmlparser","http(_request2|client|s|unit)","httrack","hubspot","ichiro","icoreservice","idmarch","in(agist|sieve|stapaper)","ips-agent","jack","jakarta commons","java","jetslide","jobseeker","js-kit","kimengi","knows.is","kraken","laconica","libwww","lighthouse","linode","lipperhey","longurl","ltx71","lwp-trivial","mappydata","mastodon","mediapartners-google","megaindex.ru","metauri","mfe_expand","mixnode","mon(tastic|tools)","moreover","mrchrome","nberta","net(craft|researchserver|state|vibes)","newrelicpinger","newspaper","newsme","ning","nightmare","nmap","nutch","online-domain-tools","openai","paessler","page(peek|sinventory|thing)","panopta","peerindex","phantomjs","pingdom","plukkie","proximic","pu_in","publiclibraryarchive.org","python-(httplib2|requests|urllib)","quanti","queryseeker","quicklook","qwanti","re-animator","readability","rebelmouse","relateiq","riddler","rssmicro","ruby","scrapy","seo-audit","seodiver","seokicks","shopwiki","shortlinktranslate","siege","sistrix","site24x7","siteexplorer","skypeuripreview","slack","slurp","socialrank","sogou","spinn3r","squider","statuscake","stripe","summify","teeraid","teoma","test certificate info","tineye","traackr","tweetedtimes","twikle","twitjobsearch","twitmunin","twurly","typhoeus","unwindfetch","uptim(e|ia)","uptm.io","vagabondo","vb project","vigil","vkshare","wappalyzer","watchsumo","webceo","webdatascout","webmon","webscout","wesee","wget","whatsapp","whatweb","wikido","wordpress","wormly","wotbox","xenu link sleuth","xing-contenttabreceiver","yandex","yanga","yeti","yff35","yourls","zelist.ro","zibb","^Mozilla/5\\.0$","Viv/2"].join("|"),"i"),t=window.navigator.userAgent.toLowerCase();return e.test(t)})())return"uav"},Ls=()=>{const e={width:Math.max(document.documentElement.clientWidth||0,window.innerWidth||0),height:Math.max(document.documentElement.clientHeight||0,window.innerHeight||0)};if(e.width>5e3||e.height>5e3)return"vpv"},Ds=()=>{const e=document.createElement("canvas"),t=e.getContext&&e.getContext("webgl"),i=t&&t.getExtension&&t.getExtension("WEBGL_debug_renderer_info");if(i&&i.UNMASKED_RENDERER_WEBGL){if("Google SwiftShader"===(t&&t.getParameter(i.UNMASKED_RENDERER_WEBGL)))return"wglv"}},Ms=()=>{if((new xs).isSelenium())return"selenium"},Bs=["mcmpfreqrec"];const Fs=new class extends H{init(e){this._gdpr="true"===e.gdpr,this._shouldQueue=this._gdpr}clearQueue(e){e&&(this._shouldQueue=!1,this._sessionStorageHandlerQueue.forEach((e=>{this.setSessionStorage(e.key,e.value)})),this._localStorageHandlerQueue.forEach((e=>{if("adthrive_abgroup"===e.key){const t=Object.keys(e.value)[0],i=e.value[t],s=e.value[`${t}_weight`];this.getOrSetABGroupLocalStorageValue(t,i,s,{value:24,unit:"hours"})}else e.expiry?"internal"===e.type?this.setExpirableInternalLocalStorage(e.key,e.value,{expiry:e.expiry,resetOnRead:e.resetOnRead}):this.setExpirableExternalLocalStorage(e.key,e.value,{expiry:e.expiry,resetOnRead:e.resetOnRead}):"internal"===e.type?this.setInternalLocalStorage(e.key,e.value):this.setExternalLocalStorage(e.key,e.value)})),this._cookieHandlerQueue.forEach((e=>{"internal"===e.type?this.setInternalCookie(e.key,e.value):this.setExternalCookie(e.key,e.value)}))),this._sessionStorageHandlerQueue=[],this._localStorageHandlerQueue=[],this._cookieHandlerQueue=[]}readInternalCookie(e){return this._verifyInternalKey(e),this._readCookie(e)}readExternalCookie(e){return this._readCookie(e)}readInternalLocalStorage(e){return this._verifyInternalKey(e),this._readFromLocalStorage(e)}readExternalLocalStorage(e){return this._readFromLocalStorage(e)}readSessionStorage(e){const t=window.sessionStorage.getItem(e);if(!t)return null;try{return JSON.parse(t)}catch(e){return t}}deleteCookie(e){document.cookie=`${e}=; SameSite=None; Secure; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/`}deleteLocalStorage(e){window.localStorage.removeItem(e)}deleteSessionStorage(e){window.sessionStorage.removeItem(e)}setInternalCookie(e,t,i){this._verifyInternalKey(e),this._setCookieValue("internal",e,t,i)}setExternalCookie(e,t,i){this._setCookieValue("external",e,t,i)}setInternalLocalStorage(e,t){if(this._verifyInternalKey(e),this._gdpr&&this._shouldQueue){const i={key:e,value:t,type:"internal"};this._localStorageHandlerQueue.push(i)}else{const i="string"==typeof t?t:JSON.stringify(t);window.localStorage.setItem(e,i)}}setExternalLocalStorage(e,t){if(this._gdpr&&this._shouldQueue){const i={key:e,value:t,type:"external"};this._localStorageHandlerQueue.push(i)}else{const i="string"==typeof t?t:JSON.stringify(t);window.localStorage.setItem(e,i)}}setExpirableInternalLocalStorage(e,t,i){this._verifyInternalKey(e);try{var s;const r=null!=(s=null==i?void 0:i.expiry)?s:{value:400,unit:"days"};var n;const a=null!=(n=null==i?void 0:i.resetOnRead)&&n;if(this._gdpr&&this._shouldQueue){const i={key:e,value:t,type:"internal",expires:this._getExpiryDate(r),expiry:r,resetOnRead:a};this._localStorageHandlerQueue.push(i)}else{const i={value:t,type:"internal",expires:this._getExpiryDate(r),expiry:r,resetOnRead:a};window.localStorage.setItem(e,JSON.stringify(i))}}catch(e){console.error(e)}}setExpirableExternalLocalStorage(e,t,i){try{var s;const r=null!=(s=null==i?void 0:i.expiry)?s:{value:400,unit:"days"};var n;const a=null!=(n=null==i?void 0:i.resetOnRead)&&n;if(this._gdpr&&this._shouldQueue){const i={key:e,value:JSON.stringify(t),type:"external",expires:this._getExpiryDate(r),expiry:r,resetOnRead:a};this._localStorageHandlerQueue.push(i)}else{const i={value:t,type:"external",expires:this._getExpiryDate(r),expiry:r,resetOnRead:a};window.localStorage.setItem(e,JSON.stringify(i))}}catch(e){console.error(e)}}setSessionStorage(e,t){if(this._gdpr&&this._shouldQueue){const i={key:e,value:t};this._sessionStorageHandlerQueue.push(i)}else{const i="string"==typeof t?t:JSON.stringify(t);window.sessionStorage.setItem(e,i)}}getOrSetABGroupLocalStorageValue(e,t,i,s,n=!0){const r="adthrive_abgroup",a=this.readInternalLocalStorage(r);if(null!==a){const t=a[e];var o;const i=null!=(o=a[`${e}_weight`])?o:null;if(this._isValidABGroupLocalStorageValue(t))return[t,i]}const l={...a,[e]:t,[`${e}_weight`]:i};return s?this.setExpirableInternalLocalStorage(r,l,{expiry:s,resetOnRead:n}):this.setInternalLocalStorage(r,l),[t,i]}_isValidABGroupLocalStorageValue(e){return null!=e&&!("number"==typeof e&&isNaN(e))}_getExpiryDate({value:e,unit:t}){const i=new Date;return"milliseconds"===t?i.setTime(i.getTime()+e):"seconds"==t?i.setTime(i.getTime()+1e3*e):"minutes"===t?i.setTime(i.getTime()+60*e*1e3):"hours"===t?i.setTime(i.getTime()+60*e*60*1e3):"days"===t?i.setTime(i.getTime()+24*e*60*60*1e3):"months"===t&&i.setTime(i.getTime()+30*e*24*60*60*1e3),i.toUTCString()}_resetExpiry(e){return e.expires=this._getExpiryDate(e.expiry),e}_readCookie(e){const t=document.cookie.split("; ").find((t=>t.split("=")[0]===e));if(!t)return null;const i=t.split("=")[1];if(i)try{return JSON.parse(decodeURIComponent(i))}catch(e){return decodeURIComponent(i)}return null}_readFromLocalStorage(e){const t=window.localStorage.getItem(e);if(!t)return null;try{const s=JSON.parse(t),n=s.expires&&(new Date).getTime()>=new Date(s.expires).getTime();if("adthrive_abgroup"===e&&s.created)return window.localStorage.removeItem(e),null;if(s.resetOnRead&&s.expires&&!n){const t=this._resetExpiry(s);var i;return window.localStorage.setItem(e,JSON.stringify(s)),null!=(i=t.value)?i:t}if(n)return window.localStorage.removeItem(e),null;if(!s.hasOwnProperty("value"))return s;try{return JSON.parse(s.value)}catch(e){return s.value}}catch(e){return t}}_setCookieValue(e,t,i,s){try{if(this._gdpr&&this._shouldQueue){const s={key:t,value:i,type:e};this._cookieHandlerQueue.push(s)}else{var n;const e=this._getExpiryDate(null!=(n=null==s?void 0:s.expiry)?n:{value:400,unit:"days"});var r;const o=null!=(r=null==s?void 0:s.sameSite)?r:"None";var a;const l=null==(a=null==s?void 0:s.secure)||a,d="object"==typeof i?JSON.stringify(i):i;document.cookie=`${t}=${d}; SameSite=${o}; ${l?"Secure;":""} expires=${e}; path=/`}}catch(e){}}_verifyInternalKey(e){const t=e.startsWith("adthrive_"),i=e.startsWith("adt_");if(!t&&!i&&!Bs.includes(e))throw new Error('When reading an internal cookie, the key must start with "adthrive_" or "adt_" or be part of the allowed legacy keys.')}constructor(...e){super(...e),this.name="BrowserStorage",this.disable=!1,this.gdprPurposes=[1],this._sessionStorageHandlerQueue=[],this._localStorageHandlerQueue=[],this._cookieHandlerQueue=[],this._shouldQueue=!1}},js=()=>{let e=0;try{const t=Fs.readInternalLocalStorage("adthrive_fpv");t&&(e=Date.now()-Date.parse(t));if(!t||e>864e5)return!0}catch(e){}return!1},Ns=e=>!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length),Us=e=>!Ns(e),Vs=e=>0===e.indexOf("hbs-q"),zs=(e,t,i)=>{switch(t){case Xe.AdDensity:return((e,t)=>{const i=e.adDensityEnabled,s=e.adDensityLayout.pageOverrides.find((e=>!!document.querySelector(e.pageSelector)&&(e[t].onePerViewport||"number"==typeof e[t].adDensity)));return!i||!s})(e,i);case Xe.StickyOutstream:return(e=>{var t,i,s;const n=null==(s=e.videoPlayers)||null==(i=s.partners)||null==(t=i.stickyOutstream)?void 0:t.blockedPageSelectors;return!n||!document.querySelector(n)})(e);case Xe.Interstitial:return(e=>{const t=e.adOptions.interstitialBlockedPageSelectors;return!t||!document.querySelector(t)})(e);default:return!0}},Hs=(e,t=33)=>{const i=Object.keys(e).reduce(((i,s)=>{const n=e[s].map((e=>((e,t)=>parseInt(e,t)/1e5)(e,t)));return{...i,[s]:[...n]}}),{});return i},$s=(e,t=33)=>{const i=Object.keys(e).reduce(((i,s)=>{const n=e[s].map((e=>((e,t)=>Math.floor(1e5*e).toString(t))(e,t)));return{...i,[s]:n}}),{});return i},qs=e=>{if("string"!=typeof e&&"number"!=typeof e||"string"==typeof e&&isNaN(parseInt(e,10))||"number"==typeof e&&isNaN(e))return"E";const t=Date.now(),i="string"==typeof e?parseInt(e,10):e,s=Math.floor((t-i)/864e5);return s<=1?"1":s<=2?"2":s<=3?"3":s<=4?"4":s<=14?"14":"15"},Gs=e=>{if(e)return e.includes(".")?`i4:${e}`:e.includes(":")?`i6:${e}`:void 0},Ws=()=>new Promise((e=>{if("complete"===document.readyState)return e();window.addEventListener("load",(()=>e()))})),Ks=(e,t)=>{e.length>=t&&e.splice(Math.floor(Math.random()*e.length),1)},Ys=e=>e.split("#")[0],Xs=["CA","CT","UT","VA","WA"],Qs=e=>{const t=document.getElementsByTagName("meta");return!!Array.from(t).filter((t=>t.name===e&&"true"===t.content)).length},Js=()=>Qs("child-directed-treatment"),Zs=e=>{let t=!1;return e&&(t=Xs.includes(e)),Qs("health-directed-treatment")&&t},en=()=>Qs("sensitive-finance-treatment"),tn=()=>(new Date).getTimezoneOffset()<(()=>{const e=new Date((new Date).getFullYear(),0,1),t=new Date((new Date).getFullYear(),6,1);return Math.max(e.getTimezoneOffset(),t.getTimezoneOffset())})(),sn=()=>Date.now(),nn=(e,t)=>{if("Intl"in window){const t=Intl.DateTimeFormat().resolvedOptions().timeZone;return e.some((e=>t===e))}return t.some((e=>(new Date).getTimezoneOffset()===(tn()?e-60:e)))},rn=()=>(new Date).toISOString(),an=(e,t)=>{var i;i=t,(t=Array.isArray(i)?i:[i]).forEach((t=>{e.classList.contains(t)?e.classList.remove(t):e.classList.add(t)}))},on=e=>void 0!==e,ln=(e,t)=>!(!e||"object"!=typeof e||!(t in e)),dn=(e,t)=>{if(t)for(const t of window.pbjs.getUserIdsAsEids())if(t.source&&t.source===e&&t.uids&&t.uids.length>0&&t.uids[0].id)return t.uids[0].id;return null},cn=e=>{const t=window.location.href;return e.some((e=>new RegExp(e,"i").test(t)))},hn=e=>{try{return{valid:!0,elements:document.querySelectorAll(e)}}catch(e){return{valid:!1,...e}}},un=e=>""===e?{valid:!0}:hn(e),pn=(e,t)=>{if(!e)return!1;const i=!!e.enabled,s=null==e.dateStart||Date.now()>=e.dateStart,n=null==e.dateEnd||Date.now()<=e.dateEnd,r=null===e.selector||""!==e.selector&&!!document.querySelector(e.selector),a="mobile"===e.platform&&"mobile"===t,o="desktop"===e.platform&&"desktop"===t,l=null===e.platform||"all"===e.platform||a||o,d="bernoulliTrial"===e.experimentType?1===e.variants.length:(e=>{const t=e.reduce(((e,t)=>t.weight?t.weight+e:e),0);return e.length>0&&e.every((e=>{const t=e.value,i=e.weight;return!(null==t||"number"==typeof t&&isNaN(t)||!i)}))&&100===t})(e.variants);return d||W.error("SiteTest","validateSiteExperiment","experiment presented invalid choices for key:",e.key,e.variants),i&&s&&n&&r&&l&&d},gn=["siteId","siteName","adOptions","breakpoints","adUnits"],mn=(e,t=gn)=>{if(!e)return!1;for(let i=0;i{const a=Math.round(r-n),o=[],l=[];o.push("(",i.map((()=>"%o")).join(", "),")"),l.push(...i),void 0!==s&&(o.push(" => %o"),l.push(s)),o.push(` %c(${a}ms)`),l.push("color: #999;")},yn=(e,t,i)=>{const s=void 0!==i.get?i.get:i.value;return function(...i){try{const n=fn(),r=s.apply(this,i);if(r instanceof Promise)return r.then((e=>{const t=fn();return vn(0,0,i,e,n,t),Promise.resolve(e)})).catch((i=>{throw i.logged||(W.error(e,t,i),i.logged=!0),i}));{const e=fn();return vn(0,0,i,r,n,e),r}}catch(i){throw i.logged||(W.error(e,t,i),i.logged=!0),i}}},bn=(e,t=!1)=>i=>{const s=Object.getOwnPropertyNames(i.prototype).filter((e=>t||0!==e.indexOf("_"))).map((e=>[e,Object.getOwnPropertyDescriptor(i.prototype,e)]));for(const[t,n]of s)void 0!==n&&"function"==typeof n.value?i.prototype[t]=yn(e,t,n):void 0!==n&&void 0!==n.get&&"function"==typeof n.get&&Object.defineProperty(i.prototype,t,{...n,get:yn(e,t,n)})},Sn=e=>"string"==typeof e&&/^[0-9a-f]{64}$/.test(e),En=e=>"string"==typeof e&&/^[0-9a-fA-F-]{36}$/.test(e),Cn=e=>"string"==typeof e&&/^[0-9a-f]{32}$/.test(e),Tn=(e,t=Number.MAX_SAFE_INTEGER)=>i=>"string"==typeof i&&(i.length>=e&&i.length<=t),wn={"Europe/Brussels":"gdpr","Europe/Sofia":"gdpr","Europe/Prague":"gdpr","Europe/Copenhagen":"gdpr","Europe/Berlin":"gdpr","Europe/Tallinn":"gdpr","Europe/Dublin":"gdpr","Europe/Athens":"gdpr","Europe/Madrid":"gdpr","Africa/Ceuta":"gdpr","Europe/Paris":"gdpr","Europe/Zagreb":"gdpr","Europe/Rome":"gdpr","Asia/Nicosia":"gdpr","Europe/Nicosia":"gdpr","Europe/Riga":"gdpr","Europe/Vilnius":"gdpr","Europe/Luxembourg":"gdpr","Europe/Budapest":"gdpr","Europe/Malta":"gdpr","Europe/Amsterdam":"gdpr","Europe/Vienna":"gdpr","Europe/Warsaw":"gdpr","Europe/Lisbon":"gdpr","Atlantic/Madeira":"gdpr","Europe/Bucharest":"gdpr","Europe/Ljubljana":"gdpr","Europe/Bratislava":"gdpr","Europe/Helsinki":"gdpr","Europe/Stockholm":"gdpr","Europe/London":"gdpr","Europe/Vaduz":"gdpr","Atlantic/Reykjavik":"gdpr","Europe/Oslo":"gdpr","Europe/Istanbul":"gdpr","Europe/Zurich":"gdpr"},kn=()=>(e,t,i)=>{const s=i.value;s&&(i.value=function(...e){const t=(e=>{if(null===e)return null;const t=e.map((({choice:e})=>e));return(e=>{let t=5381,i=e.length;for(;i;)t=33*t^e.charCodeAt(--i);return t>>>0})(JSON.stringify(t)).toString(16)})(this._choices),i=this._expConfigABGroup?this._expConfigABGroup:this.abgroup,n=i?i.toLowerCase():this.key?this.key.toLowerCase():"",r=t?`${n}_${t}`:n,a=this.localStoragePrefix?`${this.localStoragePrefix}-${r}`:r;if([Xe.AdLayout,Xe.AdDensity].includes(n)&&"gdpr"===(()=>{const e=Intl.DateTimeFormat().resolvedOptions().timeZone,t=wn[e];return null!=t?t:null})()){return s.apply(this,e)}const o=Fs.readInternalLocalStorage("adthrive_branch");!1===(o&&o.enabled)&&Fs.deleteLocalStorage(a);const l=(()=>s.apply(this,e))(),d=(c=this._choices,h=l,null!=(p=null==(u=c.find((({choice:e})=>e===h)))?void 0:u.weight)?p:null);var c,h,u,p;const[g,m]=Fs.getOrSetABGroupLocalStorageValue(a,l,d,{value:24,unit:"hours"});return this._stickyResult=g,this._stickyWeight=m,g})},An="0123456789ABCDEFGHJKMNPQRSTVWXYZ",In=Math.pow(2,48)-1,xn=e=>{let t=Math.floor(32*e());return 32===t&&(t=31),An.charAt(t)},Pn=(e,t)=>{if(isNaN(e))throw new Error(`${e} must be a number`);if(e>In)throw(e=>{const t=new Error(e);return t.source="ulid",t})(`cannot encode time greater than ${In}`);let i,s="";for(;t>0;t--)i=e%32,s=An.charAt(i)+s,e=(e-i)/32;return s},On=()=>Pn(Date.now(),10)+((e,t)=>{let i="";for(;e>0;e--)i=xn(t)+i;return i})(16,(()=>(()=>{if(window.crypto){const e=new Uint8Array(1);return crypto.getRandomValues(e),e[0]/255}return Math.random()})())),Rn=e=>new Promise((t=>setTimeout(t,e))),Ln=async({condition:e,delay:t=500,maxAttempts:i=10,executedAttempts:s=0})=>{if(!e()){if(s>=i)throw new Error("Max waitFor attempts reached without resolution");return await Rn(t),await Ln({condition:e,delay:t,maxAttempts:i,executedAttempts:s+1})}};class Dn{getBidWithBsidForSlot(e,t=[]){const i=t.filter((e=>e.meta&&e.meta.dchain)),s=new RegExp(`${e.location}_${e.sequence}(?!d)`,"i");for(let e=t.length-1;e>=0;e--){const{adUnitCode:n,meta:r}=t[e];if(s.test(n)&&this.getLastBsid(r))return i[e]}}getLastBsid(e={}){const{dchain:t}=e,i=t&&t.nodes||[];for(let e=i.length-1;e>=0;e--)if(i[e].bsid)return i[e].bsid}}Dn=B([bn("DemandChain"),D()],Dn);class Mn{addAdUnits(e){this.addToQueue((()=>{window.pbjs.addAdUnits(e)}))}getPrebidAdUnits(){return window.pbjs&&window.pbjs.adUnits}addToQueue(e){if(this._queueRan)try{e()}catch(e){W.error("PrebidMethods","Method in command queue failed to run")}else window.pbjs.que.push(e)}enableAnalytics(e){this.addToQueue((()=>{window.pbjs.enableAnalytics(e)}))}isPrebidLoaded(){return window.pbjs&&window.pbjs.libLoaded}getVersion(){return window.pbjs&&window.pbjs.version||"nl"}markWinningBidAsUsed(e){this.addToQueue((()=>{window.pbjs.markWinningBidAsUsed(e)}))}offEvent(e,t){this.addToQueue((()=>{window.pbjs.offEvent(e,t)}))}onEvent(e,t){this.addToQueue((()=>{window.pbjs.onEvent(e,t)}))}refreshUserIds(e,t){return new Promise(((i,s)=>{this.addToQueue((()=>{window.pbjs.refreshUserIds(e,t).then(i).catch(s)}))}))}requestBids(e){this.addToQueue((()=>{window.pbjs.requestBids(e)}))}setAliasBidder(e,t,i){this.addToQueue((()=>{i?window.pbjs.aliasBidder(e,t,i):window.pbjs.aliasBidder(e,t)}))}setBidderConfig(e,t=!1){this.addToQueue((()=>{window.pbjs.setBidderConfig(e,t)}))}setBidderSettings(e){this.addToQueue((()=>{window.pbjs.bidderSettings=e}))}setBidsReceivedFilter(e){this.addToQueue((()=>{window.pbjs.setBidsReceivedFilter(e)}))}setConfig(e){this.addToQueue((()=>{window.pbjs.setConfig(e)}))}mergeConfig(e){this.addToQueue((()=>{window.pbjs.mergeConfig(e)}))}setTargetingForGPTAsync(e,t=null,i="",s,n,r,a){a?this.addToQueue((()=>{window.pbjs.setTargetingForGPTAsync(e,t,i,s,n,r)})):window.pbjs.setTargetingForGPTAsync(e,t,i,s,n,r)}triggerUserSyncs(){this.addToQueue((()=>{window.pbjs.triggerUserSyncs()}))}registerSignalSources(){this.addToQueue((()=>{window.pbjs.registerSignalSources()}))}clearTargetingForSharedBidPool(e){this.addToQueue((()=>{window.pbjs.clearTargetingForSharedBidPool(e)}))}renderAd(e,t){this.addToQueue((()=>{window.pbjs.renderAd(e,t)}))}clearAllAuctions(){this.addToQueue((()=>{window.pbjs.clearAllAuctions()}))}clearSlotTargeting(e){this.addToQueue((()=>{const t=e.googleTagSlot;t&&window.pbjs.clearSlotTargeting(t)}))}waitForQueue(){return new Promise((e=>{this.isPrebidLoaded()?this._queueRan?e(!0):window.pbjs.que.push((()=>{e(!0)})):e(!1)}))}getBidResponsesForAdUnitCode(e){return window.pbjs.getBidResponsesForAdUnitCode(e)}clearAuctionBids(e){return window.pbjs.clearAuctionBids(e)}getUserIdsAsEids(){return window.pbjs.getUserIdsAsEids()}getUserIdsAsEidBySource(e){return window.pbjs.getUserIdsAsEidBySource(e)}getBidResponsesForBidPoolId(e){return pbjs.getBidResponsesForBidPoolId(e)}getAdserverTargetingForAdUnitCode(e,t){return window.pbjs.getAdserverTargetingForAdUnitCode(e,t)}getAllPrebidWinningBids(){return window.pbjs.getAllPrebidWinningBids()}getConfig(e,t){return t?window.pbjs.getConfig(e,t):window.pbjs.getConfig(e)}getHighestCpmBids(e){return window.pbjs.getHighestCpmBids(e)}getHighestCpmBidsForPoolId(e){return window.pbjs.getHighestCpmBidsForPoolId(e)}getUserIds(){return window.pbjs.getUserIds()}getUserIdsAsync(){return new Promise((e=>{this.isPrebidLoaded()||e(!1),window.pbjs.getUserIdsAsync().then((t=>e(t))).catch((()=>{}))}))}removeAdUnit(e){return window.pbjs.removeAdUnit(e)}removeAllAdUnits(e=!0){if(e){var t;const e=[...null!=(t=pbjs.adUnits)?t:[]];return window.pbjs.adUnits=[],e}{const e=[],t=[];var i;return(null!=(i=pbjs.adUnits)?i:[]).forEach((i=>{Object.values(et).includes(i.code)?e.push(i):t.push(i)})),window.pbjs.adUnits=e,t}}updateAdUnit(e,t){const i=this.getAdUnit(e);i&&Object.assign(i,t)}getAdUnit(e){var t;return null==(t=window.pbjs.adUnits)?void 0:t.find((t=>t.code===e))}setPAAPIConfigForGPT(e){return window.pbjs.setPAAPIConfigForGPT(e)}constructor(){var e;this._queueRan=!1,(null==(e=window.pbjs)?void 0:e.que)||(window.pbjs=window.pbjs||{},window.pbjs.que=window.pbjs.que||[]),this.addToQueue((()=>{this._queueRan=!0}))}}Mn=B([M(),j("design:type",Function),j("design:paramtypes",[])],Mn);class Bn extends ${constructor(...e){super(...e),this.addSlots=new V,this.addRebuiltSlots=new V,this.requestingBids=new V,this.preRequestBids=new V,this.refreshingBids=new V,this.beforeGoogleAdManagerRefreshSlots=new V,this.addRangeSlotTargeting=new V,this.addPrebidSlotTargeting=new V,this.displaySlot=new V,this.triggerRenderOutsideGam=new V,this.adRenderingOutsideGAM=new V,this.adRenderedOutsideGAM=new V,this.googleAdManagerFallbackDivAdded=new V,this.amazonBidResponseReceived=new V,this.noBidResponses=new V,this.auctionsCompleted=new V,this.gamEmptyNoBidResponse=new V,this.adSlotScrolledFarOutOfView=new V}}Bn=B([M()],Bn);class Fn{get enabled(){return!0}}class jn{constructor(e){this.prefix="AdThrive",this.networkCode="18190176",this._gamMCMEnabled=Si(e.siteAds.adOptions.gamMCMEnabled,!1),this._gamMCMChildNetworkCode=Si(e.siteAds.adOptions.gamMCMChildNetworkCode,""),this.account=this._gamMCMEnabled&&""!==this._gamMCMChildNetworkCode?`${this.networkCode},${this._gamMCMChildNetworkCode}`:this.networkCode;const t=new Set(["service","bidding","dynamicVersion"]);this.targeting=e.siteAds.targeting.length&&e.siteAds.targeting.filter((({key:e})=>!t.has(e))).map((({key:e,value:t})=>("boolean"==typeof t&&(t=String(t)),{key:e,value:t})))||[]}}jn=B([M(),F(0,L("AdThrive")),j("design:type",Function),j("design:paramtypes",["undefined"==typeof AdThrive?Object:AdThrive])],jn);class Nn{hasValidOverride(e,t){if(e in this.adthriveExperimentOverrides){const i=this.adthriveExperimentOverrides[e];return this.isValidExperimentOverride(t,i)}return!1}useOverride(e){return this.adthriveExperimentOverrides[e]}isValidExperimentOverride(e,t){if(0===e.length)return!1;const i=Array.isArray(e[0])?"array":typeof e[0];if("array"===i){if(!Array.isArray(t))return!1;if(t.some((t=>!e.includes(t)))&&t.map((e=>"["+JSON.stringify(e)+"]")).some((t=>!e.map((e=>JSON.stringify(e))).includes(t)))&&!e.map((e=>JSON.stringify(e))).includes(JSON.stringify(t)))return!1}else if("object"===i){if(!e.map((e=>JSON.stringify(e))).includes(JSON.stringify(t)))return!1}else if(typeof e[0]==typeof t&&!e.includes(t))return!1;return!0}constructor(){this.adthriveExperimentOverrides=Di("at_features")}}Nn=B([M(),j("design:type",Function),j("design:paramtypes",[])],Nn);class Un{constructor(){this.shouldUseCoreExperimentsConfig=!0;const e=this.run.bind(this);this.run=()=>{var t;const i=R.resolve(Nn),s=null==(t=this._choices)?void 0:t.map((e=>e.choice)),n=this._expConfigABGroup?this._expConfigABGroup:this.abgroup?this.abgroup:this.key;return s&&i.hasValidOverride(n,s)?i.useOverride(n):e()}}}class Vn{}class zn extends Vn{get(){if(this._probability<0||this._probability>1)throw new Error(`Invalid probability: ${this._probability}`);return Math.random()({choice:e,weight:t}))),t)}addChoice(e,t){this._choices.push({choice:e,weight:t})}get(){const e=(t=0,i=100,Math.random()*(i-t)+t);var t,i;let s=0;for(const{choice:t,weight:i}of this._choices)if(s+=i,s>=e)return t;return this._default}get totalWeight(){return this._choices.reduce(((e,{weight:t})=>e+t),0)}constructor(e=[],t){super(),this._choices=e,this._default=t}}class $n extends ${constructor(...e){super(...e),this.initialized=new V}}$n=B([M()],$n);class qn extends ${constructor(...e){super(...e),this.libraryLoadFailed=new z,this.amazonLibraryLoadComplete=new z,this.floorsLibraryLoadComplete=new z,this.optableLibraryLoadComplete=new z,this.prebidLibraryLoadComplete=new z,this.trafficShapingLibraryLoadComplete=new z}}qn=B([M()],qn);class Gn extends ${constructor(){super(),this.topicsReceived=new z}}Gn=B([M(),j("design:type",Function),j("design:paramtypes",[])],Gn);class Wn extends ${constructor(...e){super(...e),this.act25consentCaptured=new z,this.usCmpConsentCaptured=new z}}Wn=B([M()],Wn);class Kn extends ${constructor(...e){super(...e),this.disableAds=new z}}Kn=B([M()],Kn);class Yn extends ${constructor(...e){super(...e),this.setAmazonFloors=new V,this.clearAllFloorData=new V,this.storeModuleFloorData=new V,this.storeRaptiveFloorData=new V,this.setAuctionFloorData=new V,this.componentActive=new V}}Yn=B([M()],Yn);class Xn extends ${constructor(...e){super(...e),this.footerElementAdded=new z,this.comscoreInitialized=new z,this.footerHeightChanged=new V,this.footerResponseReceived=new V,this.footerRenderEnded=new V,this.footerVideoRibbonStateChanged=new V}}Xn=B([M()],Xn);class Qn extends ${constructor(...e){super(...e),this.identityApiReady=new z,this.identityApiDataSubmitted=new V,this.dataCaptured=new z,this.dataCapturedForIframe=new z,this.dataSentFromIframe=new V,this.iframeReady=new z,this.iframeDataSynced=new z,this.optableResolved=new z,this.optableIdentitiesCaptured=new z,this.optableTraitsCaptured=new z,this.optableRaptiveGraphResolved=new z,this.optableThirdPartyGraphResolved=new z,this.optableWaterfallCompleted=new z}}Qn=B([M()],Qn);class Jn extends ${constructor(){super(),this.adRenderFailed=new V,this.adRenderSucceeded=new V,this.auctionDebug=new V,this.auctionEnd=new V,this.auctionInit=new V,this.beforeRequestBids=new V,this.bidRequested=new V,this.bidWon=new V,this.initialized=new z,this.rubiconBidError=new V,this.setTargeting=new V,this.staleRender=new V,this.tcf2Enforcement=new V,this.vastExceededLimit=new V,this.liveIntentResolved=new V,this.expiredRender=new V}}Jn=B([M(),j("design:type",Function),j("design:paramtypes",[])],Jn);class Zn extends ${constructor(...e){super(...e),this.iframeReady=new z}}Zn=B([M()],Zn);class er extends ${constructor(...e){super(...e),this.userIdNeedsRefresh=new V,this.uid2Refreshed=new V}}er=B([M()],er);class tr extends ${constructor(){super(),this.marmaladeResponseLoaded=new z,this.recencyFrequencyDataSet=new z,this.resetMarmaladeData=new V}}tr=B([M(),j("design:type",Function),j("design:paramtypes",[])],tr);class ir extends ${constructor(...e){super(...e),this.routeChanged=new V,this.resetCompleted=new V}}ir=B([M()],ir);class sr extends ${constructor(...e){super(...e),this.targetingReady=new V}}sr=B([M()],sr);class nr{constructor(){this.added=new V,this.displayed=new V,this.displaying=new V,this.refreshed=new V,this.refreshing=new V,this.refreshAuctionStart=new V,this.refreshingBids=new V,this.requestingBids=new V,this.requestedBids=new V}}nr=B([M()],nr);class rr extends ${constructor(...e){super(...e),this.videoAdUnitAdded=new V,this.videoPlayerAdded=new V,this.videoCollapsed=new V,this.videoUnCollapsed=new V,this.preRequestVideoBids=new V,this.requestingVideoBids=new V,this.buildingVastAdURL=new V,this.addAPStagSlotBidResponse=new V,this.topCenterVideoClosed=new V,this.topCenterVideoCollapsed=new V,this.topCenterVideoUnCollapsed=new V,this.amazonVideoBidResponseReceived=new V,this.auctionsCompleted=new V,this.settingsUpdated=new V}}rr=B([M()],rr);class ar extends ${constructor(...e){super(...e),this.realizedAdDensityCompReady=new V,this.metricsRequested=new V}}ar=B([M()],ar);class or{get result(){return this._isTargeted||(this._siteExperimentEventBus.targetingReady.emit(),this._isTargeted=!0),this._result}get enabled(){return void 0!==this.experimentConfig}_isValidResult(e,t=()=>!0){return t()&&(e=>null!=e&&!("number"==typeof e&&isNaN(e)))(e)}constructor(){this._siteExperimentEventBus=R.resolve(sr),this._isTargeted=!1}}class lr extends or{_isValidResult(e){return super._isValidResult(e,(()=>this._resultValidator(e)||"control"===e))}run(){if(!this.experimentConfig)return W.error("WeightedChoiceSiteExperiment","run","No experiment config found"),"control";if(!this._mappedChoices||0===this._mappedChoices.length)return W.error("WeightedChoiceSiteExperiment","run","No experiment config found"),"control";const e=new Hn(this._mappedChoices).get();return this._isValidResult(e)?e:(W.error("WeightedChoiceSiteExperiment","run","Invalid result from experiment choices. Defaulting to control.",e),"control")}constructor(...e){super(...e),this._resultValidator=()=>!0}}class dr{getSiteExperimentByKey(e){const t=this.siteExperiments.filter((t=>t.key.toLowerCase()===e.toLowerCase()))[0],i=Di("at_site_features"),s=(n=(null==t?void 0:t.variants[1])?null==t?void 0:t.variants[1].value:null==t?void 0:t.variants[0].value,r=i[e],typeof n==typeof r);var n,r;return t&&i[e]&&s&&(t.variants=[{displayName:"test",value:i[e],weight:100,id:0}]),t}constructor(e){var t,i;this.siteExperiments=[],this._device=Ki()?"mobile":"desktop",this.siteExperiments=null!=(i=null==e||null==(t=e.siteExperiments)?void 0:t.filter((t=>{const i=t.key,s=pn(t,this._device),n=zs(e,i,this._device);return s&&n})))?i:[]}}class cr extends dr{getVideoPlaylistByType(e){var t,i;return null!=(i=null==(t=this._players)?void 0:t.filter((t=>t.type===e)))?i:[]}constructor(e){var t;super(e.siteAds),this._players=null==(t=e.siteAds.videoPlayers)?void 0:t.players}}cr=B([M(),F(0,L("AdThrive")),j("design:type",Function),j("design:paramtypes",["undefined"==typeof AdThrive?Object:AdThrive])],cr);class hr extends Un{get result(){return this._result}run(){return this._sensCategories.filter((()=>new zn(.01).get()))}constructor(e){super(),this.key="SensOff",this.lookup="SENSOFF",this.abgroup="SensOffExperiment",this._choices=[],this._sensCategories=Si(e.siteAds.adOptions.sensitiveCategories,[]),this._choices=this._sensCategories.map((e=>({choice:[e]}))),this._result=this.run()}}hr=B([bn("SensOffExperiment"),M(),F(0,L("AdThrive")),j("design:type",Function),j("design:paramtypes",["undefined"==typeof AdThrive?Object:AdThrive])],hr);class ur{constructor(e,t){var i,s;this._sensOffExperiment=t,this.enableCategoriesNetworkWide=["drg","conl"],this.disableCategoriesNetworkWide=["dlu"],this.id=e.siteAds.siteId,this.name=e.siteAds.siteName,this.verticals=e.siteAds.adOptions.verticals,this.sensitiveCategories=Si(e.siteAds.adOptions.sensitiveCategories,[]).filter((e=>!this.enableCategoriesNetworkWide.includes(e)&&!this.disableCategoriesNetworkWide.includes(e))),this.sensCategoriesOff=this._sensOffExperiment.result,this.filteredSensitiveCategories=this.sensitiveCategories.filter((e=>-1===this.sensCategoriesOff.indexOf(e))),this.breakpoints=e.siteAds.breakpoints,this.style=e.style,this.spa=Si(e.siteAds.adOptions.spa,!1),this.deployedCloudflareVersion=null!=(s=null==(i=e.siteAds.cloudflare)?void 0:i.version)?s:null}}ur=B([M(),F(0,L("AdThrive")),j("design:type",Function),j("design:paramtypes",["undefined"==typeof AdThrive?Object:AdThrive,void 0===hr?Object:hr])],ur);class pr{set(e,t){this.setAbGroup&&this._map.set(e,t)}get(e){return this._map.get(e)}get groups(){const e=[];for(const[t,i]of this._map)Array.isArray(i)?i.forEach((i=>{e.push(`${t}:${i}`)})):e.push(`${t}:${i}`);return e}get groupsAsObject(){const e={};for(const t of this._map.keys()){const i=this._map.get(t);i&&(e[t]=i)}return e}constructor(){this._map=new Map,this.setAbGroup=!Ri().has("at_features")}}pr=B([M(),j("design:type",Function),j("design:paramtypes",[])],pr);class gr extends pr{}gr=B([M()],gr);class mr{getCoreExperimentButMutateWeights(e,t){const i=this.getCoreExperiment(e,t);return"bernoulliTrial"===(null==i?void 0:i.type)&&(i.variants[0].weight=i.variants[0].weight/100),i}getCoreExperiment(e,t){let i=t?this._validExperiments.find((e=>e.lookupKey===t)):null;return i||(i=this._validExperiments.find((({key:t})=>t===e))),i}getAllMatchingCoreExperiments(e){return this._validExperiments.filter((({label:t})=>null==t?void 0:t.includes(e)))}getWeightedChoiceVariants(e,t){const i=this.getCoreExperimentButMutateWeights(e,t);return i&&"weightedChoice"===i.type?i.variants.map((e=>({choice:e.value,weight:e.weight,...e.abvalue?{abvalue:e.abvalue}:{}}))):null}getMultivalueBernoulliVariants(e,t){const i=this.getCoreExperimentButMutateWeights(e,t);return i&&"multivalueBernoulliTrial"===i.type?i.variants.map((e=>({choice:e.value,weight:e.weight}))):null}getMultivalueWeightedChoiceVariants(e,t){const i=this.getCoreExperimentButMutateWeights(e,t);return i&&"multivalueWeightedChoice"===i.type?i.variants.map((e=>({choice:e.value,options:e.choices.map((e=>({choice:e.value,weight:e.weight,abvalue:e.abvalue}))),keyABValue:e.abvalue}))):null}_getValidExperiments(e=[]){return e.filter((({type:e,variants:t,key:i})=>"weightedChoice"===e?this._isValidWeightedChoice(t,i):"bernoulliTrial"===e?this._isValidBernoulliTrial(t,i):"multivalueBernoulliTrial"===e?this._isValidMultivalueBernoulliTrial(t,i):"multivalueWeightedChoice"===e&&this._isValidMultivalueWeightChoiceTrial(t,i)))}_isValidWeightedChoice(e,t){const i=(e=>{let t=0;return e.forEach((e=>{e.weight&&(t+=e.weight)})),e.length>0&&e.every((e=>!(!e.hasOwnProperty("value")||!e.hasOwnProperty("weight"))))&&100===t})(e);return i||this._invalidExperiment(t),i}_isValidBernoulliTrial(e,t){const i=1===e.length;return i||this._invalidExperiment(t),i}_isValidMultivalueBernoulliTrial(e,t){const i=(s=e).length>0&&s.every((e=>!(!e.hasOwnProperty("value")||!e.hasOwnProperty("weight"))));var s;return i||this._invalidExperiment(t),i}_isValidMultivalueWeightChoiceTrial(e,t){const i=(s=e).length>0&&s.every((e=>{let t=0,i=!(!e.value||!e.choices);for(const s of e.choices||[]){if(!s.hasOwnProperty("weight")||!s.hasOwnProperty("value")){i=!1;break}t+=s.weight}return!(!i||100!==t)}));var s;return i||this._invalidExperiment(t),i}_invalidExperiment(e){W.error("CoreExperimentConfig","_invalidExperiment","Experiment Validation failed for key: ",e)}constructor(e){this._validExperiments=this._getValidExperiments(e).map((e=>({...e,_expConfigABGroup:e.abgroup}))),this.coreExperiments=this._validExperiments.map((({variants:e,abgroup:t,key:i})=>({variants:e,abgroup:t,key:i})))}}mr=B([M(),F(0,L("CoreExperimentValues")),j("design:type",Function),j("design:paramtypes",[Array])],mr);const _r="You need to set \"this._key\" in the init method for this experiment. The code should look something like this:\n\n protected init() {\n this._key = 'my_key';\n }";class fr extends Un{get _choices(){return null}get key(){if(!this._key)throw new Error(_r);return this._key}get lookup(){return this._lookup||""}_isMultiValueChoice(e){return"multivalueWeightedChoice"===this._type}_isGenericChoice(e){return"multivalueWeightedChoice"!==this._type}_isMultiValueResult(e){return"multivalueWeightedChoice"===this._type}_isGenericResult(e){return"multivalueWeightedChoice"!==this._type}_runAndSetABGroup(){const e=this._choices;if(e){const t=this._result=this.run();if(void 0===t)return;this._isMultiValueResult(t)&&this._isMultiValueChoice(e)?this._setMultivalueABGroup(e,t):this._isGenericResult(t)&&this._isGenericChoice(e)&&this._setStandardABGroup(e,t)}return this._result}_setStandardABGroup(e,t){const i=e.filter((({choice:e})=>e===t))[0],s=(null==i?void 0:i.abvalue)||t;if(this._setAbGroup&&void 0!==s){var n;const e=null!=(n=null==i?void 0:i.weight)?n:-1,t=this.getResultWeight(s,e);100!==t&&this.setABGroup(s,void 0,t)}}_setMultivalueABGroup(e,t){const i=[],s=this._experiment;if(!s)return;const n={};e.forEach((e=>{const t=`${e.choice}`;n[t]||(n[t]=[]),e.options.forEach((i=>{const s=Array.isArray(i.choice)?i.choice.join("%7C"):`${i.choice}`;n[t].push({weight:i.weight,option:s,...i.abvalue&&{abvalue:i.abvalue},...e.keyABValue&&{keyABValue:e.keyABValue}})}))})),t.forEach((e=>{if(n[e.choice])for(const r of n[e.choice]){var t,s;(Array.isArray(e.option)?e.option.join("%7C"):`${e.option}`)===r.option&&100!==r.weight&&i.push(`${null!=(t=r.keyABValue)?t:e.choice}_${null!=(s=r.abvalue)?s:r.option}@${r.weight}`)}})),i.length&&this.abgroupClass.set(s.abgroup,i)}getResultWeight(e,t=-1){const i=this._experiment;if(!i)return-1;if("bernoulliTrial"===i.type){const t=i.variants[0].weight;return e?t:100-t}if("multivalueBernoulliTrial"===i.type){const e=new Map;return i.variants.forEach((t=>{e.set(t.value,t.weight)})),e}return t}setABGroup(e,t,i){const s=this._experiment;var n;const r=null!=(n=this._stickyWeight)?n:i;if(s)if(Array.isArray(e)){const i=e.filter((e=>"number"==typeof r?100!==r:r&&100!==r.get(e))).map((e=>`${e}@${"number"==typeof r?r:r&&r.get(e)||0}`));i.length||i.push("none"),this.abgroupClass.set(t||s.abgroup,i)}else this.abgroupClass.set(t||s.abgroup,`${e}@${r}`)}init(){throw new Error(_r)}get result(){return!1===this._autorun&&void 0===this._result&&void 0===this.abgroupClass.get(this.key)&&(this._result=this._runAndSetABGroup()),this._result}isEnabled(){if(this.shouldUseCoreExperimentsConfig){return!!(this._experiment=this._coreExperimentConfig.getCoreExperiment(this.key,this.lookup))}return!0}constructor(e,t){super(),this.abgroupClass=e,this._coreExperimentConfig=t,this._setAbGroup=!0,this._autorun=!0,this.init();const i=this._experiment=this._coreExperimentConfig.getCoreExperiment(this.key,this.lookup);this._type=(null==i?void 0:i.type)||"Unknown",this.isEnabled()&&(this._expConfigABGroup=null==i?void 0:i.abgroup,this._autorun&&this._runAndSetABGroup())}}fr=B([F(0,L(pr)),F(1,L(mr)),j("design:type",Function),j("design:paramtypes",[void 0===pr?Object:pr,void 0===mr?Object:mr])],fr);class vr extends fr{get _choices(){const e=this._coreExperimentConfig.getMultivalueBernoulliVariants(this.key,this.lookup);return!e||e.length,e}run(){const e=this._choices;if(e){const t=e.filter((e=>new zn(e.weight/100).get())).map((e=>e.choice));t.length&&(this._result=t)}return this._result||this._default}get choices(){return this._choices}}class yr extends vr{init(){this._setAbGroup=!0,this._key="S2S",this._lookup="PBS2S",this._default=["none"]}}yr=B([bn("S2SExperiment"),M()],yr);class br extends fr{get _choices(){const e=this._coreExperimentConfig.getWeightedChoiceVariants(this.key,this.lookup);return!e||e.length,e}run(){if(this._choices)return new Hn(this._choices).get()}}class Sr extends br{init(){this._key="AuctionDelay_2",this._lookup="ADT3"}get result(){return this._result}}Sr=B([bn("AuctionDelayExperiment"),M()],Sr);class Er extends fr{get _choices(){var e;const t=null==(e=this._coreExperimentConfig.getCoreExperiment(this.key,this.lookup))?void 0:e.variants;return t?[{choice:!0,weight:t[0].weight},{choice:!1,weight:100-t[0].weight}]:[{choice:!0,weight:-1},{choice:!1,weight:-1}]}run(){const e=this._coreExperimentConfig.getCoreExperiment(this.key,this.lookup);if(e){const t=e.variants[0];return new zn(t.weight/100).get()}}setABGroup(e,t){const i=this._coreExperimentConfig.getCoreExperiment(this.key,this.lookup);let s,n;if(i){const r=i.variants[0];void 0!==this._stickyResult&&void 0!==this._stickyWeight?(s=this._stickyResult?"on":"off",n=this._stickyWeight):(s=e?"on":"off",n=e?r.weight:100-r.weight),100!==n&&0!==n&&this.abgroupClass.set(t||i.abgroup,`${s}@${n}`)}}get result(){if(void 0===this._default)throw new Error("You need to set \"this._default\" in the init method for this experiment. The code should look something like this:\n protected init() {\n this._key = 'my_key';\n this._default = false;\n }");var e;return!1===this._autorun&&void 0===this._result&&void 0===this.abgroupClass.get(this.key)&&(this._result=this._runAndSetABGroup()),null!=(e=this._result)?e:this._default}}class Cr extends Er{init(){this._key="OrtbEnrich",this._lookup="S2SPARAM",this._default=!1}}Cr=B([bn("OrtbEnrichExperiment"),M()],Cr);class Tr extends br{init(){this._key="YahooSSP",this._lookup="YAHOODR"}run(){return super.run()}}B([kn(),j("design:type",Function),j("design:paramtypes",[]),j("design:returntype",void 0)],Tr.prototype,"run",null),Tr=B([bn("YahooSSPExperiment"),M()],Tr);class wr extends br{init(){this._key="MultistagePrebidAuctionDisplay3",this._lookup="MULTIREFAUCD3"}run(){return super.run()}}B([kn(),j("design:type",Function),j("design:paramtypes",[]),j("design:returntype",void 0)],wr.prototype,"run",null),wr=B([bn("MultistagePrebidAuctionExperiment"),M()],wr);const kr=new Map([[te.Adform,{enabled:!0,nameFromAdmin:"adform"}],[te.AidemServer,{enabled:!0,nameFromAdmin:te.Aidem}],[te.AmazonUAM,{enabled:!0,nameFromAdmin:"amazonUAM"}],[te.AppNexus,{enabled:!0,nameFromAdmin:"appNexus"}],[te.Conversant,{enabled:!0}],[te.Criteo,{enabled:!0}],[te.GumGum,{enabled:!0}],[te.ImproveDigital,{enabled:!0}],[te.IndexExchange,{enabled:!0,nameFromAdmin:"indexExchange"}],[te.Kargo,{enabled:!0}],[te.MediaGrid,{enabled:!0,nameFromAdmin:"mediaGrid"}],[te.MediaGridVideo,{enabled:!0,nameFromAdmin:"mediaGrid"}],[te.Nativo,{enabled:!0}],[te.OpenX,{enabled:!0}],[te.Ozone,{enabled:!1}],[te.Pubmatic,{enabled:!0,nameFromAdmin:"pubMatic"}],[te.Rise,{enabled:!1}],[te.Rtbhouse,{enabled:!0}],[te.Rubicon,{enabled:!0}],[te.Sharethrough,{enabled:!0}],[te.Teads,{enabled:!0}],[te.ThirtyThreeAcross,{enabled:!0,nameFromAdmin:"thirtyThreeAcross"}],[te.Triplelift,{enabled:!0,nameFromAdmin:"tripleLift"}],[te.TTD,{enabled:!0,nameFromAdmin:"theTradeDesk"}],[te.Undertone,{enabled:!0}],[te.UndertoneServer,{enabled:!0}],[te.Unruly,{enabled:!0}],[te.YahooSSP,{enabled:!0}],[te.Yieldmo,{enabled:!0}],[te.Flipp,{enabled:!1}]]),Ar=new Map([[te.Adform,!0],[te.AidemServer,!1],[te.AmazonUAM,!0],[te.AppNexus,!1],[te.Conversant,!1],[te.Criteo,!0],[te.GumGum,!0],[te.ImproveDigital,!0],[te.IndexExchange,!1],[te.Kargo,!0],[te.MediaGrid,!0],[te.MediaGridVideo,!0],[te.Nativo,!1],[te.OpenX,!1],[te.Ozone,!1],[te.Pubmatic,!0],[te.Rise,!1],[te.Rtbhouse,!0],[te.Rubicon,!0],[te.Sharethrough,!0],[te.Teads,!0],[te.ThirtyThreeAcross,!0],[te.Triplelift,!0],[te.TTD,!0],[te.Undertone,!0],[te.Unruly,!0],[te.YahooSSP,!0],[te.Yieldmo,!0],[te.Flipp,!1]]),Ir=new Map([[te.Adform,!0],[te.AidemServer,!1],[te.AmazonUAM,!0],[te.AppNexus,!0],[te.Criteo,!0],[te.GumGum,!0],[te.ImproveDigital,!0],[te.IndexExchange,!0],[te.Kargo,!0],[te.Nativo,!1],[te.MediaGridVideo,!0],[te.OpenX,!0],[te.Pubmatic,!0],[te.Rise,!1],[te.Rubicon,!0],[te.Sharethrough,!0],[te.ThirtyThreeAcross,!0],[te.Triplelift,!0],[te.TTD,!0],[te.Unruly,!0],[te.UndertoneServer,!0],[te.YahooSSP,!0]]),xr=[{choice:te.ThirtyThreeAcross,weight:.0033},{choice:te.AppNexus,weight:.0033},{choice:te.Conversant,weight:33e-5},{choice:te.GumGum,weight:33e-5},{choice:te.ImproveDigitalServer,weight:.0033},{choice:te.IndexExchange,weight:.0033},{choice:te.Kargo,weight:33e-5},{choice:te.MediaGrid,weight:.0033},{choice:te.Nativo,weight:33e-5},{choice:te.OpenX,weight:.0033},{choice:te.OpenXServer,weight:.0033},{choice:te.Ozone,weight:.0033},{choice:te.Pubmatic,weight:.0033},{choice:te.PubmaticServer,weight:.0033},{choice:te.Rtbhouse,weight:33e-5},{choice:te.Rubicon,weight:.0033},{choice:te.RubiconServer,weight:.0033},{choice:te.Sharethrough,weight:33e-5},{choice:te.Triplelift,weight:.00158},{choice:te.TripleliftServer,weight:.00236},{choice:te.TTD,weight:.0033},{choice:te.Undertone,weight:33e-5},{choice:te.Unruly,weight:.0033},{choice:te.YahooSSP,weight:.0033},{choice:te.YahooSSPServer,weight:.0033},{choice:te.Yieldmo,weight:.0033},{choice:te.AidemServer,weight:.0033}];class Pr{getBidderConfig(e,t=!0){const i={bidder_name:e,enabled:t,cpmMap:new Map};return Si(this._biddersCoreConfig.get(e),i)}get bidderPriceAdjustments(){return this._bidderPriceAdjustments}_enableConfiantPriceAdjustments(){const e=[Bt,Ft,jt];this._setBidderPriceAdjustments(xr,e,Lt)}_setBidderPriceAdjustments(e,t,i){e&&t.forEach((t=>{e.forEach((e=>this._setBidderPriceAdjustmentMap(e,t,i)))}))}_enableLiveIntentPriceAdjustments(e){const t=e.filter((e=>di()?"Chrome"===e.browser:"Not Chrome"===e.browser)).map((e=>({choice:e.bidder,weight:e.multiplier/100,browser:e.browser})));t.forEach((e=>{(e.weight<0||e.weight>1)&&this._invalidBidAdjustments.push({source:"LiveIntent",bidder:e.choice,value:e.weight})})),this._setBidderPriceAdjustments(t,this.configTypes,Rt)}_setBidderPriceAdjustmentMap(e,t,i){if(!e||t===Dt)return;const{choice:s,weight:n}=e,r=this._bidderPriceAdjustments[e.choice];if(r){const s=r.get(t);if(s){var a;const e=null!=(a=s.percent)?a:1;var o;const l=Number(null!=(o=s.flat)?o:0),d=i===Rt?Number(n)*e:e,c=i===Lt?Number(n)+l:l;r.set(t,{percent:d,flat:c})}else r.set(t,{[i]:e.weight})}else this._bidderPriceAdjustments[s]=new Map([[t,{[i]:e.weight}]])}_displayPartnerEnabled(e){var t,i,s;const n=(null==(t=kr.get(e))?void 0:t.nameFromAdmin)||e,r=n?Si(this._adOptions[n],Ar.get(e)):void 0,a=Si(null==(i=this._biddersCoreConfig.get(e))?void 0:i.enabled,null==(s=kr.get(e))?void 0:s.enabled);return e===te.AmazonUAM?r:!!r&&!!a}_videoPartnerEnabled(e){var t,i,s;const n=(null==(t=kr.get(e))?void 0:t.nameFromAdmin)||e,r=Si(this._videoPartners[n],Ir.get(e)),a=Si(null==(i=this._biddersCoreConfig.get(e))?void 0:i.enabled,null==(s=kr.get(e))?void 0:s.enabled);return!!r&&!!a}_createCPMMap(e,t){const i=Si(e.enabled,!0);let s=new Map;if(t){const t=e.cpm,i=this._prepareCPMConfigs(t);t.forEach((t=>{"percent"===t.type&&(t.value<0||t.value>1)&&this._invalidBidAdjustments.push({source:"BidderCoreConfig",bidder:e.bidder_name,value:t.value})})),i.forEach((t=>{s.set(t.name,this._convertToCPMPriceAdjustments(t,e.bidder_name))}))}else s=e.cpm;this._biddersCoreConfig.set(e.bidder_name,{bidder_name:e.bidder_name,enabled:i,cpmMap:s})}_prepareCPMConfigs(e){var t;const i=null!=(t=e.find((e=>e.name===Bt)))?t:{name:Bt,type:Rt,value:Vt.percent},s=[];return this.configTypes.forEach((t=>{const n=e.find((e=>e.name===t));n?s.push(n):s.push({...i,name:t})})),s}_isCPMConfigLegacy(e){var t;const i=null==e||null==(t=e[0])?void 0:t.cpm;return i&&Array.isArray(i)}_convertToCPMPriceAdjustments(e,t){return e.name===Dt?this._convertToCMPPriceAdjustmentPMP(e,t):this._convertToCMPPriceAdjustment(e,t)}_convertToCMPPriceAdjustmentPMP(e,t){const i=this._convertToCMPPriceAdjustment(e,t);return e.deals&&(i.deals={},e.deals.forEach((e=>{i.deals[e.name]=this._convertToCMPPriceAdjustment(e,t,!1)}))),i}_convertToCMPPriceAdjustment(e,t,i=!0){const s={},n=e.name,r=this._getBidderPriceAdjustment(t,n,i);let a=1,o=0;return e.type===Rt?a*=e.value:e.type===Lt&&(o+=e.value),s.percent=a*r.percent,s.flat=o+Number(r.flat),s}_getBidderPriceAdjustment(e,t,i=!0){if(!i)return{...Vt};const s=this._bidderPriceAdjustments,n=s[e]&&s[e].get(s[e].has(t)?t:Bt)||{};return{...Vt,...n}}_getDisplayBidders(){return new Map([[te.Adform,this._displayPartnerEnabled(te.Adform)],[te.Aidem,this._displayPartnerEnabled(te.AidemServer)],[te.AppNexus,this._displayPartnerEnabled(te.AppNexus)],[te.Conversant,this._displayPartnerEnabled(te.Conversant)],[te.Criteo,this._displayPartnerEnabled(te.Criteo)],[te.ImproveDigital,this._displayPartnerEnabled(te.ImproveDigital)],[te.IndexExchange,this._displayPartnerEnabled(te.IndexExchange)],[te.GumGum,this._displayPartnerEnabled(te.GumGum)],[te.Kargo,this._displayPartnerEnabled(te.Kargo)],[te.MediaGrid,this._displayPartnerEnabled(te.MediaGrid)],[te.MediaGridVideo,this._displayPartnerEnabled(te.MediaGridVideo)],[te.Nativo,this._displayPartnerEnabled(te.Nativo)],[te.OpenX,this._displayPartnerEnabled(te.OpenX)],[te.Ozone,this._displayPartnerEnabled(te.Ozone)],[te.Pubmatic,this._displayPartnerEnabled(te.Pubmatic)],[te.Rise,this._displayPartnerEnabled(te.Rise)],[te.Rtbhouse,this._displayPartnerEnabled(te.Rtbhouse)],[te.Rubicon,this._displayPartnerEnabled(te.Rubicon)],[te.Sharethrough,this._displayPartnerEnabled(te.Sharethrough)],[te.Teads,this._displayPartnerEnabled(te.Teads)],[te.ThirtyThreeAcross,this._displayPartnerEnabled(te.ThirtyThreeAcross)],[te.Triplelift,this._displayPartnerEnabled(te.Triplelift)],[te.TTD,this._displayPartnerEnabled(te.TTD)],[te.Undertone,this._displayPartnerEnabled(te.Undertone)],[te.Unruly,this._displayPartnerEnabled(te.Unruly)],[te.YahooSSP,this._displayPartnerEnabled(te.YahooSSP)],[te.Yieldmo,this._displayPartnerEnabled(te.Yieldmo)],[te.AmazonUAM,this._displayPartnerEnabled(te.AmazonUAM)],[te.Flipp,this._displayPartnerEnabled(te.Flipp)]])}_getVideoBidders(){return new Map([[te.Adform,this._videoPartnerEnabled(te.Adform)],[te.Aidem,this._videoPartnerEnabled(te.AidemServer)],[te.AmazonUAM,this._videoPartnerEnabled(te.AmazonUAM)],[te.AppNexus,this._videoPartnerEnabled(te.AppNexus)],[te.Criteo,this._videoPartnerEnabled(te.Criteo)],[te.GumGum,this._videoPartnerEnabled(te.GumGum)],[te.ImproveDigital,this._videoPartnerEnabled(te.ImproveDigital)],[te.IndexExchange,this._videoPartnerEnabled(te.IndexExchange)],[te.Kargo,this._videoPartnerEnabled(te.Kargo)],[te.MediaGridVideo,this._videoPartnerEnabled(te.MediaGridVideo)],[te.Nativo,this._videoPartnerEnabled(te.Nativo)],[te.OpenX,this._videoPartnerEnabled(te.OpenX)],[te.Pubmatic,this._videoPartnerEnabled(te.Pubmatic)],[te.Rise,this._videoPartnerEnabled(te.Rise)],[te.Rubicon,this._videoPartnerEnabled(te.Rubicon)],[te.Sharethrough,this._videoPartnerEnabled(te.Sharethrough)],[te.ThirtyThreeAcross,this._videoPartnerEnabled(te.ThirtyThreeAcross)],[te.Triplelift,this._videoPartnerEnabled(te.Triplelift)],[te.TTD,this._videoPartnerEnabled(te.TTD)],[te.Unruly,this._videoPartnerEnabled(te.Unruly)],[te.UndertoneServer,this._videoPartnerEnabled(te.Undertone)],[te.YahooSSP,this._videoPartnerEnabled(te.YahooSSP)],[te.Yieldmo,this._videoPartnerEnabled(te.Yieldmo)]])}constructor(e){var t,i,s,n,r;this.adthrive=e,this.configTypes=[Bt,Mt,Ut,Ft,Dt,jt],this._biddersCoreConfig=new Map,this._idGraphAdjustmentGlobalDiscount="US"===(null==(t=this.adthrive.core)?void 0:t.country)?.006:0,this._defaultGlobalDiscount=.0147+this._idGraphAdjustmentGlobalDiscount,this._instreamGlobalDiscount=.16+this._defaultGlobalDiscount,this._globalPriceAdjustments=new Map([[Bt,{flat:this._defaultGlobalDiscount}],[Mt,{flat:this._instreamGlobalDiscount}]]),this._prebidPriceAdjustments=new Map([[Bt,{flat:0}],[Mt,{flat:0}],[Dt,{flat:0}]]),this._bidderPriceAdjustments={ix:new Map([[Dt,{flat:.05}]])},this._invalidBidAdjustments=[];const a=null==(i=e.siteAds.videoPlayers)?void 0:i.partners,o=null==(s=e.siteAds.video)?void 0:s.partners,l=Bt,d=Nt;if(this._adOptions=e.siteAds.adOptions,this._videoPartners=a||o||{},null==(r=e.core)||null==(n=r.partners)?void 0:n.length){const t=this._isCPMConfigLegacy(e.core.partners);this._enableConfiantPriceAdjustments(),e.core.liveIntent&&this._enableLiveIntentPriceAdjustments(e.core.liveIntent),e.core.partners.forEach((e=>{e.bidder_name&&this._createCPMMap(e,t)})),this._biddersCoreConfig.set(l,{bidder_name:l,enabled:!0,cpmMap:this._globalPriceAdjustments}),this._biddersCoreConfig.set(d,{bidder_name:d,enabled:!0,cpmMap:this._prebidPriceAdjustments})}this._invalidBidAdjustments.length>0&&W.error("Partners","constructor","Invalid bid adjustments detected",this._invalidBidAdjustments),this.display=this._getDisplayBidders(),this.video=this._getVideoBidders()}}Pr=B([M(),F(0,L("AdThrive")),j("design:type",Function),j("design:paramtypes",["undefined"==typeof AdThrive?Object:AdThrive])],Pr);const Or=new Map([["20sf1",["ttd","appnexus","rtbhouse","teads","kargo","gridvid","rubi_ss","tripl_ss","pubm_ss","yah_ss","improve_ss","opnx_ss","under_ss"]],["20sf2",["ozone","under_ss","33across","nativo","triplelift","grid","undertone","opnx_ss","yieldmo","unruly","yah_ss","pubm_ss","improve_ss","tripl_ss","rubi_ss"]],["20scf",["appnexus","teads","kargo","pubmatic","ix","ttd","rubicon","pubm_ss","yieldmo","yahoossp","yah_ss","undertone","unruly","opnx_ss"]]]);class Rr extends br{init(){this._key="MultistagePrebidAuctionV2",this._lookup="MULTIREFAUCV2"}run(){return super.run()}}B([kn(),j("design:type",Function),j("design:paramtypes",[]),j("design:returntype",void 0)],Rr.prototype,"run",null),Rr=B([bn("MultistagePrebidAuctionVideoExperiment"),M()],Rr);class Lr extends Er{init(){this._key="MissingNativeParams",this._lookup="MNR",this._default=!1}}Lr=B([bn("NativeParamsExperiment"),M()],Lr);const Dr=()=>{(()=>{var e;const t=navigator.userAgent,i=navigator.vendor;if(!hi(t,i))return!1;const s=(null==(e=/ Version\/(1\d)\.(\d+)/.exec(t))?void 0:e.slice(-2))||[],n="14"===s[0],r="15"===s[0]&&+s[1]<4;return n||r})()&&window.addEventListener("beforeunload",(()=>{window.addEventListener("visibilitychange",(e=>{e.stopImmediatePropagation()}),!0)}),!0)};class Mr{setupOnceEvent(e,t,i=window){const s=()=>{i.removeEventListener(e,s),t()};i.addEventListener(e,s)}setupOnceEventWithPromise(e,t=window){return new Promise((i=>{const s=n=>(t.removeEventListener(e,s),i(n));t.addEventListener(e,s)}))}addEventListener(e,t,i=window){i.addEventListener(e,(()=>{t.emit()}),!1)}_handleScreenChange(){const e=screen.orientation.type.includes("portrait")?"portrait":"landscape";this._currentDeviceOrientation!==e&&(this.deviceOrientationChange.emit(),this._currentDeviceOrientation=e)}constructor(){var e,t,i;this.beforeUnload=new V,this.pageHide=new V,this.resize=new V,this.scroll=new V,this.visibilityChange=new V,this.keydown=new V,this.deviceOrientationChange=new V,this.addEventListener("beforeunload",this.beforeUnload),this.addEventListener("pagehide",this.pageHide),this.addEventListener("resize",this.resize),this.addEventListener("scroll",this.scroll),this._handleScreenChange=this._handleScreenChange.bind(this),null==(i=window)||null==(t=i.screen)||null==(e=t.orientation)||e.addEventListener("change",this._handleScreenChange),this.addEventListener("visibilitychange",this.visibilityChange,document),this.addEventListener("keydown",this.keydown,document),Dr()}}Mr=B([bn("PageManager"),M(),j("design:type",Function),j("design:paramtypes",[])],Mr);const Br=e=>new URLSearchParams(window.location.search).get(e);class Fr{setSessionKey(){const e=Fs.readInternalLocalStorage("adthrive_session_key");if(e)return e;{const e=On();return Fs.setExpirableInternalLocalStorage("adthrive_session_key",e,{expiry:{value:24,unit:"hours"},resetOnRead:!0}),Fs.deleteLocalStorage("adthrive_fpv"),(()=>{const e=Fs.readExternalCookie("_ga"),t=Fs.readExternalCookie("_gid");e||t||R.resolve(Mr).beforeUnload.on((()=>{}))})(),e}}get browsingTopicsSupported(){return _i()}get browsingTopicsTaxonomyVersion(){var e,t;return null==(t=this.browsingTopics)||null==(e=t[0])?void 0:e.taxonomy_version}_isWordPressLogin(){return!!document.getElementById("wpadminbar")||!!window.location.href&&window.location.href.includes("/wp-admin")}_getPrivacySandboxHost(){var e;return null!=(e=Br("at_privacy_sandbox_host"))?e:"privacysandbox.adthrive.com"}constructor(e,t){this.connectionTargeting=[];const{bucket:i,core:s,plugin:n,branch:r,debug:a,deployment:o,baseUrl:l,host:d,fastAds:c,siteAds:h,styleUrl:u,invalidTraffic:p,integration:g,deliveryVersion:m}=e,{tablet:_,desktop:f}=h.breakpoints;this.host=d.replace("https://",""),this.privacySandboxHost=this._getPrivacySandboxHost().replace("https://",""),this.baseUrl=l,this.branch=r,this.bucket=i,this.country=s&&s.country,this.region=s&&s.region,this.plugin=n,this.fastAds=c,this.invalidTraffic=p,this.deployment=o,this.domain=window.location.host,this.device=Ci(_,f),this.pageUrl=window.location.href,this.pageviewKey=t;const v=this.querystring=Ri();this.sessionKey=this.setSessionKey(),this.styleUrl=u,this.debug=a,this.integration=g,this.deliveryVersion=m,this.savedReferrer=Fs.readInternalLocalStorage("adthrive_referrer"),this.isFirstPageview=js(),this.isWordPressLogin=this._isWordPressLogin();try{const e=Fs.readExternalLocalStorage("pbjs-id5id");this.gpid=e?JSON.parse(decodeURIComponent(e)).gp:void 0}catch(e){}this.ri=v.has("ri")?v.get("ri"):String(Math.floor(200*Math.random())),this.salesThrottle=v.has("st")?v.get("st"):String(Math.floor(200*Math.random()));const y=Fs.readInternalLocalStorage("adthrive_rsi");this.rsi=y||String(Math.floor(200*Math.random())),y||Fs.setInternalLocalStorage("adthrive_rsi",this.rsi);const b=window.performance.getEntriesByType("resource").filter((e=>e.name.includes("ads.min.js")&&e.name.includes("ads.adthrive.com")))[0];if(b){const e=Math.round(b.responseEnd-b.startTime).toString();"NaN"!==e&&(this.adsMinLoadDuration=[e])}const S=window.navigator&&(window.navigator.connection||window.navigator.mozConnection||window.navigator.webkitConnection);S&&(S.effectiveType&&this.connectionTargeting.push(`niet:${S.effectiveType}`),this.downlink=S.downlink||S.bandwidth,this.downlink&&this.connectionTargeting.push(`dl:${this.downlink}`));const E=Fs.readInternalLocalStorage("adthrive_browsing_topics");this.browsingTopics=Array.isArray(E)?E:[]}}Fr=B([M(),F(0,L("AdThrive")),F(1,L("PageviewKey")),j("design:type",Function),j("design:paramtypes",["undefined"==typeof AdThrive?Object:AdThrive,String])],Fr);class jr{get siteFeatureRollouts(){return this._featureRollouts}_isRolloutEnabled(e){if(this._doesRolloutExist(e)){const t=this._featureRollouts[e];let i=t.enabled;const s=t.data;if(this._doesRolloutHaveConfig(e)&&this._isFeatureRolloutConfigType(s)){const e=s.pct_enabled?s.pct_enabled/100:1;i=i&&new zn(e).get()}return i}return!1}isRolloutEnabled(e){var t;const i=null!=(t=this._checkedFeatureRollouts.get(e))?t:this._isRolloutEnabled(e);return void 0===this._checkedFeatureRollouts.get(e)&&this._checkedFeatureRollouts.set(e,i),i}_doesRolloutExist(e){return this._featureRollouts&&!!this._featureRollouts[e]}_doesRolloutHaveConfig(e){return this._doesRolloutExist(e)&&"data"in this._featureRollouts[e]}_isFeatureRolloutConfigType(e){return null!=e&&"object"==typeof e&&!!Object.keys(e).length}getSiteRolloutConfig(e){var t;return this.isRolloutEnabled(e)&&null!=(t=this._featureRollouts[e].data)?t:{}}get enabledFeatureRolloutIds(){return this._enabledFeatureRolloutIds}constructor(){this._featureRollouts={},this._checkedFeatureRollouts=new Map,this._enabledFeatureRolloutIds=[]}}var Nr;const Ur=new class extends jr{_setEnabledFeatureRolloutIds(){Object.entries(this._featureRollouts).forEach((([e,t])=>{this.isRolloutEnabled(e)&&void 0!==t.featureRolloutId&&this._enabledFeatureRolloutIds.push(t.featureRolloutId)}))}constructor(e){super(),this._featureRollouts=e,this._setEnabledFeatureRolloutIds()}}(window.adthrive&&window.adthrive.siteAds&&"featureRollouts"in window.adthrive.siteAds&&null!=(Nr=window.adthrive.siteAds.featureRollouts)?Nr:{});class Vr{_isHighRevGeo(e){var t;const i=null!=(t=e.country)?t:"US";return["US","CA","AU","DE","NZ","GB","UK"].includes(i)}get enabled(){return this._enabled}constructor(e){this._enabled=!0;const t=this._isHighRevGeo(e),i=Ur.isRolloutEnabled("only-pb-s2s-non-high-rev-geo-mob-chromium");this._enabled=!!t||!(i&&ci()&&Ki())}}Vr=B([bn("PrebidClientSide"),M(),j("design:type",Function),j("design:paramtypes",[void 0===Fr?Object:Fr])],Vr);class zr extends Er{init(){this._key="DisableMultistageRefresh",this._lookup="MR4",this._default=!1}}zr=B([bn("DisableMultistageRefreshExperiment"),M()],zr);class Hr extends br{init(){this._key="PrebidFailsafeTimeout",this._lookup="PBFS"}}Hr=B([bn("PrebidFailsafeTimeoutExperiment"),M()],Hr);class $r extends Er{init(){this._key="CurrencyConversion",this._lookup="FOREX",this._default=!1}}$r=B([bn("CurrencyConversionExperiment"),M()],$r);class qr extends br{init(){this._key="PrebidRequestQueueTimeout",this._lookup="PBRQT"}get result(){return this._result}}qr=B([bn("RequestQueueExperiment"),M()],qr);const Gr="You need to set \"this._label\" in the init method for this experiment. The code should look something like this:\n\n protected init() {\n this._label = 'my_label';\n }";class Wr{get label(){if(!this._label)throw new Error(Gr);return this._label}get experiments(){return this._experiments}get results(){return!1!==this._autorun||Object.keys(this._results).length||this._run(),this._results}get resultsByLookupKey(){return!1!==this._autorun||Object.keys(this._results).length||this._run(),this._resultsByLookupKey}init(){throw new Error(Gr)}_run(){var e;null==(e=this._experiments)||e.forEach((e=>{const{abgroup:t,key:i,lookupKey:s}=e,n=this._createExperiment(e);if(Object.defineProperty(n,"name",{value:`${i}${i.includes("Experiment")?"":"Experiment"}`}),!n)return;const r=new n(this._abgroupClass,this._coreExperimentConfig);this._results[t]=r.result,s&&(this._resultsByLookupKey[s]=r.result)}))}isEnabled(){if(this.shouldUseCoreExperimentsConfig){const e=this._experiments=this._coreExperimentConfig.getAllMatchingCoreExperiments(this.label);return!(!e||!e.length)}return!0}_createExperiment(e){const{key:t,type:i,lookupKey:s}=e;switch(i){case"bernoulliTrial":return this._runBernoulliExperiment(t,s);case"weightedChoice":return this._runWeightedChoiceExperiment(t,s);case"multivalueBernoulliTrial":return this._runMultivalueBernoulliExperiment(t,s);default:return}}_runBernoulliExperiment(e,t){return class extends Er{init(){this._key=e,this._default=!1,this._lookup=t}}}_runWeightedChoiceExperiment(e,t){return class extends br{init(){this._key=e,this._lookup=t}}}_runMultivalueBernoulliExperiment(e,t){return class extends vr{init(){this._key=e,this._default=["none"],this._lookup=t}}}constructor(e,t){this._coreExperimentConfig=e,this._abgroupClass=t,this.shouldUseCoreExperimentsConfig=!0,this._autorun=!0,this._results={},this._resultsByLookupKey={},this.init(),this.isEnabled()&&this._autorun&&this._run()}}Wr=B([F(0,L(mr)),j("design:type",Function),j("design:paramtypes",[void 0===mr?Object:mr,void 0===pr?Object:pr])],Wr);class Kr extends Wr{init(){this._label="RPBS"}}Kr=B([bn("PBSBatchExperiments"),M()],Kr);class Yr extends br{init(){this._key="PrebidServerMultiCall",this._lookup="PBSMC"}run(){return super.run()}}Yr=B([bn("PrebidServerMultiCallExperiment"),M()],Yr);class Xr extends vr{init(){this._key="AppBiddersList",this._lookup="APPRQB",this._default=[]}get choices(){return this._choices}}Xr=B([bn("AppBiddersExperiment"),M()],Xr);class Qr extends fr{get _choices(){const e=this._coreExperimentConfig.getMultivalueWeightedChoiceVariants(this.key,this.lookup);return!e||e.length,e}run(){const e=this._choices;if(e){const t=e.map((e=>{const t=new Hn(e.options).get();return{choice:`${e.choice}`,option:t,...e.abvalue&&{keyValue:e.abvalue},...e.keyABValue&&{abvalue:e.keyABValue}}}));t.length&&(this._result=t)}return this._result||this._default}get choices(){return this._choices}}class Jr extends Qr{init(){this._key="DifferentFloorDifferentBidder",this._lookup="DFDB"}}Jr=B([bn("BidderFloorInflatorExperiment"),M()],Jr);class Zr extends br{init(){this._key="IndexExchangeDoubleRequest",this._lookup="IXDR"}run(){return super.run()}}B([kn(),j("design:type",Function),j("design:paramtypes",[]),j("design:returntype",void 0)],Zr.prototype,"run",null),Zr=B([bn("IndexExchangeDoubleRequest"),M()],Zr);class ea extends Qr{init(){this._key="DifferentFloorDifferentServerBidder",this._lookup="DFDSB"}}ea=B([bn("ServerBidderFloorInflatorExperiment"),M()],ea);const ta={[te.AidemServer]:te.Aidem,[te.CriteoServer]:te.Criteo,[te.ImproveDigitalServer]:te.ImproveDigital,[te.IndexExchangeServer]:te.IndexExchange,[te.NativoServer]:te.Nativo,[te.OpenXServer]:te.OpenX,[te.PubmaticServer]:te.Pubmatic,[te.RubiconServer]:te.Rubicon,[te.SharethroughServer]:te.Sharethrough,[te.TripleliftServer]:te.Triplelift,[te.YahooSSPServer]:te.YahooSSP,[te.UndertoneServer]:te.Undertone};class ia{setBidderInflators(e,t){(t||[]).forEach((t=>{e.set(t.choice,t.option)}))}_setRefreshAuctionCount(e){e.result&&"off"!==e.result&&(this.refreshAuctionCount=2)}_setupS2SBidders(e,t,i){var s;this._addToS2SBidders(te.IndexExchange,te.IndexExchangeServer,null!=(s=null==t?void 0:t.result)?s:"client"),this._addToS2SBidders(te.YahooSSP,te.YahooSSPServer,this._isIOS?"server":null==i?void 0:i.result);const n=e.result||[],r=n.indexOf(te.GumGum);this._isIOS&&r>-1&&n.splice(r,1);return{bidders:[...n,...this._s2sBidders].filter((e=>this._isBidderCodeValid(e)))}}_isBidderCodeValid(e){const t=ta[e];return this._partners.display.get(e)||this._partners.video.get(e)||t&&(this._partners.display.get(t)||this._partners.video.get(t))}_determineBidderLabel(e,t){if("off"===e)return;const i="20sc"===e||"20s"===e,s=this.s2s.bidders,n=Object.values(te),r=[te.AmazonTAM,te.AmazonUAM],a=this.getClientSideBiddersArray(n,(e=>!s.includes(e)&&!r.includes(e))),o=1,l=2,d={};if(i){const i="20sc"===e?Math.ceil(t.length/2):0;d[o]=s.concat(this._shuffleArray(t).slice(0,i))}else{const i=Or.get(e);d[o]=this._evaluateMultistageServerBidders(s,i)||[...s,...t]}d[l]=this._getLastAuctionBidders(d[o]||[],[...s,...a]);for(const e in d)this._addBidderLabelToAuctionMap(d[e],Number(e))}_evaluateMultistageServerBidders(e,t){return t=t&&t.concat(e).filter(Mi)}_getLastAuctionBidders(e,t){return t.filter((t=>!e.includes(t)))}_addBidderLabelToAuctionMap(e,t){e.forEach((e=>{this.auctionMapping.set(e,`auction-${t}`)}))}_determineVideoBidderLabel(e){const t=Object.values(te),i=[te.AmazonTAM,te.AmazonUAM];let s=this.getClientSideBiddersArray(t,(e=>!this.s2s.bidders.includes(e)&&!i.includes(e)));const{result:n}=e;this.refreshStickyOutstreamAuctionCount="off"===n||Fi()?1:2;const{bidders:r}=this.s2s;if("10s1"!==n||this._isIOS)"10s2"!==n||this._isIOS?(this.firstVideoAuctionBidders=new Set([...r,...s]),this.secondVideoAuctionBidders=this.firstVideoAuctionBidders):(this.firstVideoAuctionBidders=new Set(r),this.secondVideoAuctionBidders=new Set(s));else{s=this._shuffleArray(s);const e=Math.ceil(s.length/2);this.firstVideoAuctionBidders=new Set([...r,...s.slice(0,e)]),this.secondVideoAuctionBidders=new Set(s.slice(e))}}_shuffleArray(e){const t=[...e];for(let e=t.length-1;e>0;e--){const i=Math.floor(Math.random()*(e+1));[t[e],t[i]]=[t[i],t[e]]}return t}_addToS2SBidders(e,t,i){if(!i)return;this.requestExp[t]=i;const s=this.experimentIntegrationHoldouts;"server"===i?(this._s2sBidders.push(t),s.push(e)):"client"===i?s.push(t):this._s2sBidders.push(t)}distributeServerBidders(){if(!this.ayServerEnabled||!this.rpbsEnabled)return;const e=this.s2s.bidders,t=[],i=[],s=[],n=[];for(const i of e)De.includes(i)?t.push(i):Le.includes(i)?s.push(i):n.push(i);for(const e of s)i.push(e),t.push(e);for(const e of n.sort((()=>Math.random()-.5)))t.length>i.length?i.push(e):t.push(e);this.s2s.distributedBidders={rpbsBidders:t,ayBidders:i}}get pbsExperimentsResults(){return this._pbsExperimentsResults}get pbsExperimentsResultsByLookupKey(){return this._pbsExperimentsResultsByLookupKey}getVideoBidderLabel(e){const t=this.firstVideoAuctionBidders.has(e),i=this.secondVideoAuctionBidders.has(e);return t&&!i||!t&&i?t?["auction-1"]:["auction-2"]:[]}getBidderLabel(e){return[this.auctionMapping.get(e)||`auction-${this.refreshAuctionCount}`]}get requestQueueTimeout(){return this._requestQueueTimeout}getClientSideBiddersArray(e,t){const i=e.filter(t.bind(this));return this._prebidClientSide.enabled?i:[]}constructor(e,t,i,s,n,r,a,o,l,d,c,h,u,p,g,m,_,f,v,y,b,S){this._gam=r,this._site=a,this._partners=d,this._prebidClientSide=h,this._currencyConversionExperiment=g,this._prebidServerMultiCallExperiment=f,this._context=b,this.bidPoolSlots=[Qe.Below_Post,Qe.Content,Qe.Sidebar,Qe.Recipe],this.deals=[],this.firstVideoAuctionBidders=new Set,this.secondVideoAuctionBidders=new Set,this.auctionMapping=new Map,this.targetingKeys=["ADOMAIN","AD_ID","BIDDER","CACHE_ID","CACHE_HOST","DEAL","FORMAT","PRICE_BUCKET","SIZE","SOURCE","UUID","INTERSTITIAL","DSP","CRID","ATTR"],this.advertiserId=413678576,this.refreshAuctionCount=1,this.refreshStickyOutstreamAuctionCount=1,this.currencyConversionEnabled=!1,this.sendAllBidsTargetingKeys=this.targetingKeys.filter((e=>!["BIDDER","INTERSTITIAL","CRID"].includes(e))),this.isClientSideDoubleRequest=!1,this.requestExp={},this.ayServerEnabled=!1,this.rpbsEnabled=!1,this.blockedCreativeIds=[],this.blockableCreativeUnits=[et.Video_Coll_SOff_Smartphone,et.Video_Collapse_Autoplay_SoundOff,et.Video_In_Post_ClicktoPlay_SoundOn,et.Video_Individual_Autoplay_SOff],this.bidderInflatorMap=new Map,this.serverBidderInflatorMap=new Map,this.experimentIntegrationHoldouts=[],this._s2sBidders=[],this._isIOS=Fi();const E=this._prebidServerMultiCallExperiment.result;this.rpbsEnabled="all"===E||"west"===E,this.ayServerEnabled="all"===E||"ay"===E,this.s2s=this._setupS2SBidders(e,l,o),this.interstitialAdUnitCode=`gpt_unit_/${this._gam.account}/AdThrive_Interstitial_1/${this._site.id}_0`,this.ortbEnrich=i.result,this.setBidderInflators(this.bidderInflatorMap,y.result),this.setBidderInflators(this.serverBidderInflatorMap,S.result);const C=Object.values(te),T=[te.AmazonTAM,te.AmazonUAM],w=this.getClientSideBiddersArray(C,(e=>!this.s2s.bidders.includes(e)&&!T.includes(e))),k=this.multistageValue=s.result||"off",A=s.result||"off";this.multistageActive="off"!==k,this.multistageStickyOutstreamActive="off"!==A;const I=this.isClientSideDoubleRequest="crr"===k;var x;this.isClientSideDoubleRequest||this._determineBidderLabel(k,w),this._determineVideoBidderLabel(n),this.auctionDelay=null!=(x=t.result)?x:0,this._setRefreshAuctionCount(s);this.experimentRefreshInterval=3e4-5e3*this.refreshAuctionCount,this.sendAdditionalNativeParams=c.result,this.multiStageLimit=!I&&u.result?4:0,this.failsafeTimeout=p.result||1e3,this.currencyConversionEnabled=this._currencyConversionExperiment.result,this.appBidders=v.result||[],this._requestQueueTimeout=m.result||250,this._pbsExperimentsResults=_.results||[],this._pbsExperimentsResultsByLookupKey=_.resultsByLookupKey||[]}}ia=B([M(),j("design:type",Function),j("design:paramtypes",[void 0===yr?Object:yr,void 0===Sr?Object:Sr,void 0===Cr?Object:Cr,void 0===wr?Object:wr,void 0===Rr?Object:Rr,void 0===jn?Object:jn,void 0===ur?Object:ur,void 0===Tr?Object:Tr,void 0===Zr?Object:Zr,void 0===Pr?Object:Pr,void 0===Lr?Object:Lr,void 0===Vr?Object:Vr,void 0===zr?Object:zr,void 0===Hr?Object:Hr,void 0===$r?Object:$r,void 0===qr?Object:qr,void 0===Kr?Object:Kr,void 0===Yr?Object:Yr,void 0===Xr?Object:Xr,void 0===Jr?Object:Jr,void 0===Fr?Object:Fr,void 0===ea?Object:ea])],ia);const sa=[Qe.Sidebar_3,Qe.Sidebar_4,Qe.Sidebar_5,Qe.Native_Recipe];class na{get id(){return this.element.id}get isSticky(){return this.sticky}get hasHighViewability(){return this.sticky||this.location===Qe.Recipe}setHighlyViewable(e){const t=this.viewability>=Number(e&&e.hvThreshold);this.highlyViewable=this.lazy||t}setBidPoolId(e){this.location.includes(Qe.Sidebar)?this.generateSidebarBidPoolId(e):this.generateContentBidPoolId(e),this.setSlotTargetingFlag("bpe",[this.bidPoolId?"1":"0"])}generateSidebarBidPoolId(e){const t=this.lazy,i=this.sequence,s=`${this.location}_${this.sequence}`;if(!i||sa.includes(s));else{const i=t?t?"_Lazy":"":"_Nonlazy";if(this.sizes.length<=2||!e.includes(this.location)||!i)return;this.bidPoolId=`${this.location}_BPID${i}`}}generateContentBidPoolId(e){const t=this.lazy,i=this.location.toLowerCase().includes("content"),s=this.sequence,n=i&&s&&s>=4&&!t?"_Nonlazy":i&&t?"_Lazy":"";!e.includes(this.location)||i&&!n||(this.bidPoolId=`${this.location}_BPID${n}`)}setPassiveBidPoolId(){const e=this.lazy,t=this.location,i=`${t}_${this.sequence}`,s=t.includes(Qe.Content),n=t.includes(Qe.Sidebar)&&!sa.includes(i);e||!s&&!n||(this.passiveBidPoolId=`${t}_BPID_Lazy`)}isHighlyViewable(){return this.highlyViewable||this.lazy||this.refreshCount>0}get isAboveTheFold(){return(e=>{const t=e.getBoundingClientRect();return{top:t.top+window.pageYOffset,left:t.left+window.pageXOffset,bottom:t.bottom+window.pageYOffset,right:t.right+window.pageXOffset,width:t.right-t.left,height:t.bottom-t.top}})(this.element).top>1e3}hasSize([e,t]){return this.sizes.some((([i,s])=>e===i&&t===s))}get name(){return[this.location,this.sequence].filter(on).join("_")}get placementMapName(){return this.location===Qe.Content&&this.sequence&&this.sequence>9?Qe.Content_9:this.name.includes(Qe.Below_Post)?Qe.Below_Post:this.location===Qe.Sidebar&&this.sequence&&this.sequence>9?Qe.Sidebar_9:this.location===Qe.Recipe&&this.sequence&&this.sequence>5?Qe.Recipe_2:this.name}pushToQueue(e){const t=window.googletag;t&&t.cmd&&t.cmd.push(e)}setViewability(e){const t=e.adViewability.length&&void 0!==e.adViewability[0].home&&void 0!==e.adViewability[0].depth&&void 0!==e.adViewability[0].lazy,i="/"===window.location.pathname?"1":"0",s=Fs.readInternalLocalStorage("adthrive_session_fpv"),n=!0===s||null===s?"1":"0";e.adViewability.filter((s=>s.speed===e.speed&&window.innerWidth>=s.width[0]&&(!s.width[1]||window.innerWidth<=s.width[1])&&(!t||s.home===i&&s.depth===n&&this.lazy===s.lazy))).forEach((e=>{Object.keys(e.adUnits).forEach((t=>{t===this.name?this.viewability=e.adUnits[t]:this.location===Qe.Content&&this.sequence>9?this.viewability=e.adUnits[Qe.Content]:this.location===Qe.Below_Post&&this.sequence>1&&(this.viewability=e.adUnits[Qe.Below_Post])}))}))}clearTargeting(e){this.googleTagSlot?this.googleTagSlot.clearTargeting(e):W.error("Slot","setTargeting","Attempted to clear targeting before slot was defined",e)}setTargeting(e){this.googleTagSlotReady?this.applyTargeting(e):this.googleTagSlotReadyEmitter.once((()=>{this.applyTargeting(e)}))}applyTargeting(e){this.pushToQueue((()=>{if(this.googleTagSlot){const t=Array.isArray(e)?e:[e];for(const e of t)this.googleTagSlot.setTargeting(e.key,e.value)}else W.error("Slot","setTargeting","Attempted to set targeting before slot was defined",e)}))}setSlotTargetingFlag(e,t,i=!1){const s=()=>{if(this.googleTagSlot){const s=(this.googleTagSlot.getTargeting("flag_slot")||[]).filter((t=>{const[s]=t.split(":");return!i||s!==e}));this.googleTagSlot.setTargeting("flag_slot",[...s,...t.map((t=>`${e}:${t}`))])}};t&&t.length>0&&this.pushToQueue((()=>s()))}clearSlotTargetingFlag(e){const t=()=>{if(this.googleTagSlot){const t=(this.googleTagSlot.getTargeting("flag_slot")||[]).filter((t=>{const[i]=t.split(":");return!e.includes(i)}));this.googleTagSlot.setTargeting("flag_slot",[...t])}};this.pushToQueue((()=>t()))}getTargeting(e){return this.googleTagSlot?this.googleTagSlot.getTargeting(e):(W.error("Slot","getTargeting","Attempted to get targeting before slot was defined",e),[])}setTransactionId(e){this.transactionId=e}getTargetingMap(){if(this.googleTagSlot){const e=this.googleTagSlot;return e.getTargetingKeys().reduce(((t,i)=>(t[i]=e.getTargeting(i),t)),{})}return W.error("Slot","getTargetingMap","Attempted to get targeting before slot was defined"),{}}setSlotAppBids(e,t){const i=e.filter((e=>e.adUnitCode===t)).map((e=>e.adId));i.length&&(this.slotAppBids=i)}getSlotAppBids(){return this.slotAppBids}addRequestTypeSlotFlag(){var e;if((null==this||null==(e=this.getSlotAppBids())?void 0:e.length)&&(null==this?void 0:this.googleTagSlot)){const e=this.getSlotAppBids();this.googleTagSlot.getTargeting("hb_adid").some((t=>null==e?void 0:e.includes(t)))&&this.setSlotTargetingFlag("reqtype",["app"],!0)}}getPositionFromViewport(){return Qi(this.element)}constructor(e,t,i,s,n,r=!1,a=8,o,l=[],d=!0,c=!1){this.location=e,this.sequence=t,this.sizes=i,this.element=s,this.sticky=n,this.lazy=r,this.auctionPriority=a,this.stickyOverlapSelector=o,this.special=l,this.enabledForAuction=d,this.infinite=c,this.refreshPaused=!1,this.isRefreshing=!1,this.closed=!1,this.viewableDuration=0,this.slotFullyRenderedDuration=0,this.outOfViewIO=!0,this.outOfViewGPT=!0,this.alwaysInView=!1,this.displayed=!1,this.refreshCount=0,this.viewability=0,this.highlyViewable=!1,this.hvp=0,this.servedPrebidBidResponse=void 0,this.lazyDisabled=!1,this.transactionId="",this.stickyOutstreamShortVideo=!1,this.stickyOutstreamLastAdErrored=!1,this.stickyOutstreamRefreshTimeout=5e3,this.multiformat=!1,this.multiformatNative=!1,this.multiformatOutstream=!1,this.outstreamEnabled=!1,this.nativeEnabled=!1,this.googleTagSlotReadyEmitter=new V,this.googleTagSlotReady=!1,this.rebuild=!1,this.location===Qe.Video_StickyOutstream&&(this.stickyOutstreamErrorCount=0,this.noAdRefreshCount=0,this.stickyOutstreamErrorLogged=!1)}}class ra{add(e){const t=Fs.readSessionStorage("adthrive_footer_closed");let i=this.castArray(e);t&&(i=i.filter((e=>e.location!==Qe.Footer)));for(const e of i)if(!this._slots.has(e.id)){this._slots.set(e.id,e);try{this.added.emit(e)}catch(e){W.error("Slots","add",e)}}return i}remove(e){const t=this.castArray(e);for(const e of t)this._slots.has(e.id)&&(e.closed=!0,this._slots.delete(e.id))}get(e){return"string"==typeof e?this._slots.get(e):Array.isArray(e)?e.map((e=>this._slots.get(e))).filter((e=>void 0!==e)):[...this._slots.values()]}castArray(e){if("string"==typeof e){const t=this.get(e);return void 0!==t?[t]:[]}return Array.isArray(e)?e:[e]}constructor(){this.added=new V,this.bidServed=new V,this._slots=new Map}}ra=B([bn("Slots"),M()],ra);class aa extends br{init(){this._key="ReduceRenderAboveViewport",this._lookup="RRAV2"}}aa=B([M()],aa);class oa{constructor(){this.googleLazyLoadSettings={disabled:{fetchMarginPercent:-1,renderMarginPercent:-1,mobileScaling:-1},gam:{fetchMarginPercent:600,renderMarginPercent:100,mobileScaling:1.5},hbMarginPercent:700}}}oa=B([M(),j("design:type",Function),j("design:paramtypes",[])],oa);class la{observe(e){let t=this._initialMarginPercent;e.getPositionFromViewport()<0&&(t*=this._adjustment);let i=this._marginToIntersectionObserverMap.get(t);i||(i=this._getIntersectionObserver(t),this._marginToIntersectionObserverMap.set(t,i)),i.observe(e.element),this._slotToIntersectionObserverMap.set(e,i)}unobserve(e){const t=this._slotToIntersectionObserverMap.get(e);t&&t.unobserve(e.element),this._slotToIntersectionObserverMap.delete(e)}unobserveAll(e=!0){this.getObservedSlots().forEach((t=>{this.unobserve(t),e&&this._slotEventBus.displaySlot.emit(t.id)}))}reobserveAll(){this.getObservedSlots().forEach((e=>{this.unobserve(e),this.observe(e)}))}_getIntersectionObserver(e){const t=window.innerHeight*(e/100);return new IntersectionObserver((e=>{for(const t of e)this.processEntry(t)}),{rootMargin:`${t}px 0px`,threshold:[0]})}processEntry(e){const t=this._slots.get(e.target.id);t&&e.intersectionRatio>0&&this._slotToIntersectionObserverMap.has(t)&&(this._slotEventBus.displaySlot.emit(t.id),this.unobserve(t))}getObservedSlots(){return Array.from(this._slotToIntersectionObserverMap.keys())}constructor(e,t,i,s){this._slots=e,this._slotEventBus=t,this._marginToIntersectionObserverMap=new Map,this._slotToIntersectionObserverMap=new Map,i.result&&"number"==typeof i.result?this._adjustment=i.result:this._adjustment=1,this._initialMarginPercent=s.googleLazyLoadSettings.hbMarginPercent}}la=B([bn("IntersectionObserverManager"),M(),j("design:type",Function),j("design:paramtypes",[void 0===ra?Object:ra,void 0===Bn?Object:Bn,void 0===aa?Object:aa,void 0===oa?Object:oa])],la);class da extends br{init(){this._key="DCSLLMediumCPMTarget",this._lookup="DCSLL_MED"}}da=B([bn("DCSLLMediumCPMTargetExperiment"),M()],da);class ca{get required(){return this._required}get consented(){return this._consented}set consented(e){this._consented=e}_setupListeners(){this._consentEventBus.act25consentCaptured.on((e=>{this._consented=e}))}_isFrenchLanguage(){var e;const t=null!=(e=navigator.language&&navigator.language.toLowerCase())?e:"";var i;const s=null!=(i=navigator.languages&&navigator.languages.map((e=>e.toLowerCase())))?i:[];return"fr"===t||t.includes("fr-")||(null==s?void 0:s.some((e=>"fr"===e||e.includes("fr-"))))}constructor(e,t){this._consentEventBus=t,this._storageKey="adthrive_act25-consent",this._required="CA"===e.core.country&&nn(["America/Toronto","America/Blanc-Sablon","America/Montreal","America/Nipigon"],[300,240])&&this._isFrenchLanguage(),this._consented=Fs.readInternalLocalStorage(this._storageKey),this._required&&this._setupListeners()}}ca=B([M(),F(0,L("AdThrive")),j("design:type",Function),j("design:paramtypes",["undefined"==typeof AdThrive?Object:AdThrive,void 0===Wn?Object:Wn])],ca);class ha{get required(){return this._required}get consent(){return this._consent}constructor(e,t){var i,s;this.consentEventBus=t,this._consent=null;const n=Si(null==(i=e.siteAds.adOptions.usCMP)?void 0:i.regions,[]),r=e.core.region&&n.includes(e.core.region);this._required=Boolean(r&&Si(null==(s=e.siteAds.adOptions.usCMP)?void 0:s.enabled,!1)),this._required&&(null!==Fs.readExternalCookie("usprivacy")&&(this._consent="1YNY"===Fs.readExternalCookie("usprivacy")),this.consentEventBus.usCmpConsentCaptured.on((e=>{this._consent=e}),{handleEventsAlreadyEmitted:!0}))}}ha=B([M(),F(0,L("AdThrive")),j("design:type",Function),j("design:paramtypes",["undefined"==typeof AdThrive?Object:AdThrive,void 0===Wn?Object:Wn])],ha);class ua extends br{init(){this._key="InterstitialAlt",this._lookup="INTERS5"}run(){return super.run()}}B([kn(),j("design:type",Function),j("design:paramtypes",[]),j("design:returntype",void 0)],ua.prototype,"run",null),ua=B([bn("InterstitialExperiment"),M()],ua);const pa=()=>{try{const e=2500,t=Fs.readExternalLocalStorage("__lsv__"),i=t||[];if(window.innerWidth>=e)return{isError:!1,canDisplay:!1};if(i.length){const e=36e5,t=sn(),s=i[0];return{isError:!1,canDisplay:("number"==typeof s?t-s:0)>e}}return{isError:!1,canDisplay:!0}}catch(e){return{isError:!0,canDisplay:!1,message:e.message}}};class ga extends or{run(){const e=this._choices[0].weight/100;return new zn(e).get()}setExperimentTargeting(){if(!this.enabled||!this.experimentConfig)return void W.error("InterstitialSiteExperiment","setExperimentTargeting","() => %o","Experiment targeting requires an experiment config");const e=`${this.experimentConfig.key.toLowerCase()}-${this.experimentConfig.id}`,t=this._result?"on":"off";this._pubabgroup.set(e,t)}constructor(e,t){super(),this._siteExperiments=e,this._pubabgroup=t,this._choices=[],this._result=!1,this.key=Xe.Interstitial;const{isError:i,canDisplay:s,message:n}=pa();i&&W.error("InterstitialSiteExperiment","constructor",{message:n}),this.experimentConfig=this._siteExperiments.getSiteExperimentByKey(this.key),this.enabled&&this.experimentConfig&&s&&(this._choices=this.experimentConfig.variants,this._result=this.run(),this.setExperimentTargeting())}}B([kn(),j("design:type",Function),j("design:paramtypes",[]),j("design:returntype",void 0)],ga.prototype,"run",null),ga=B([M(),j("design:type",Function),j("design:paramtypes",[void 0===cr?Object:cr,void 0===gr?Object:gr])],ga);class ma extends or{run(){const e=this._choices[0].weight/100;return new zn(e).get()}setExperimentTargeting(){if(!this.enabled||!this.experimentConfig)return void W.error("RemoveFooterCloseButtonSiteExperiment","setExperimentTargeting","() => %o","Experiment targeting requires an experiment config");const e=`${this.experimentConfig.key.toLowerCase()}-${this.experimentConfig.id}`,t=this._result?"on":"off";this._pubabgroup.set(e,t)}constructor(e,t){super(),this._siteExperiments=e,this._pubabgroup=t,this._choices=[],this._result=!1,this.key=Xe.FooterCloseButton,this.experimentConfig=this._siteExperiments.getSiteExperimentByKey(this.key),this.enabled&&this.experimentConfig&&(this._choices=this.experimentConfig.variants,this._result=this.run(),this.setExperimentTargeting())}}B([kn(),j("design:type",Function),j("design:paramtypes",[]),j("design:returntype",void 0)],ma.prototype,"run",null),ma=B([M(),j("design:type",Function),j("design:paramtypes",[void 0===cr?Object:cr,void 0===gr?Object:gr])],ma);class _a{_isGamInterstitialNetworkExperimentEnabled(e){const{isError:t,canDisplay:i,message:s}=pa(),n=Ki()&&Si(e.siteAds.adOptions.mobileInterstitial,!1),r=!Ki()&&Si(e.siteAds.adOptions.desktopInterstitial,!1);if(t&&W.error("InterstitialExperiment","canDisplayInterstitial",{message:s}),i&&(n||r)){const e=R.resolve(ua);return!(!e||!e.result||"off"===e.result)}return!1}constructor(e,t,i){var s,n,r,a,o,l,d;this._interstitialSiteExperiment=t,this._removeFooterCloseButtonSiteExperiment=i,this.footerCloseButtonMigrated=!1;const{adInViewTime:c,allowSmallerAdSizes:h,bgColor:u,footerCloseButton:p,footerCloseButtonMobile:g,footerCloseButtonDesktop:m,footerSelector:_,infiniteScroll:f,infiniteScrollOptions:v,infiniteScrollRefresh:y,isAutoOptimized:b,pmp:S,targetaff:E,stickyContainerConfig:C,sidebarConfig:T,siteAttributes:w,dynamicContentSlotLazyLoading:k,desktopInterstitial:A,mobileInterstitial:I,prioritizeShorterVideoAds:x,optimizeVideoPlayersForEarnings:P,secColor:O,wakeLock:R,usCMP:L}=e.siteAds.adOptions;this.allowSmallerAdSizes=Si(h,!0),void 0!==g&&void 0!==m&&(this.footerCloseButtonMigrated=!0);const D=this._isGamInterstitialNetworkExperimentEnabled(e),M=this._interstitialSiteExperiment.enabled?this._interstitialSiteExperiment.result:D;if(this.interstitial={gam:M,prebid:!1},this._removeFooterCloseButtonSiteExperiment.enabled){const e=!this._removeFooterCloseButtonSiteExperiment.result;this.footerCloseButton=e,this.footerCloseButtonMobile=e,this.footerCloseButtonDesktop=e}else this.footerCloseButton=Si(p,!0),this.footerCloseButtonMobile=Si(g,!0),this.footerCloseButtonDesktop=Si(m,!0);this.adInViewTime=c?1e3*c:void 0,this.bgColor=Si(u,"#FFFFFF"),this.footerSelector=Si(_,""),this.pmp=Si(S,!0),this.infiniteScroll=Si(f,!1),this.infiniteScrollOptions=Si(v,{}),this.infiniteScrollRefresh=Si(y,!0),this.isAutoOptimized=Si(b,!1),this.targetAff=Si(E,!1),this.spa=Si(e.siteAds.adOptions.spa,!1),this.stickyContentEnabled=null==C||null==(s=C.content)?void 0:s.enabled,this.stickyContentHeight=null==C||null==(n=C.content)?void 0:n.minHeight,this.stickyRecipeHeight=Ki()?null==C||null==(r=C.recipeMobile)?void 0:r.minHeight:null==C||null==(a=C.recipeDesktop)?void 0:a.minHeight,this.stickyHeaderSelectors=null==C?void 0:C.stickyHeaderSelectors,this.stickyBlockedSelectors=null==C?void 0:C.blockedSelectors,this.dynamicStickySidebarEnabled=null==T||null==(o=T.dynamicStickySidebar)?void 0:o.enabled,this.dynamicStickySidebarHeight=null==T||null==(l=T.dynamicStickySidebar)?void 0:l.minHeight,this.dynamicStickySidebarBlockedSelectors=null==T||null==(d=T.dynamicStickySidebar)?void 0:d.blockedSelectors,this.dynamicStickySidebarHeaderSelectors=Ki()?null==w?void 0:w.mobileHeaderSelectors:null==w?void 0:w.desktopHeaderSelectors,this.dynamicContentSlotLazyLoading=Si(k,!1),this.desktopInterstitial=Si(A,!1),this.mobileInterstitial=Si(I,!1),this.prioritizeShorterVideoAds=Si(x,!0),this.optimizeVideoPlayersForEarnings=Si(P,!1),this.secColor=Si(O,"#000000"),this.wakeLock=R,this.usCMP=Si(L,{enabled:!1,regions:[]})}}_a=B([M(),F(0,L("AdThrive")),j("design:type",Function),j("design:paramtypes",["undefined"==typeof AdThrive?Object:AdThrive,void 0===ga?Object:ga,void 0===ma?Object:ma])],_a);class fa extends br{init(){this._key="AdTypeDays",this._lookup="ATD2",this._autorun=!1}run(){return super.run()}}B([kn(),j("design:type",Function),j("design:paramtypes",[]),j("design:returntype",void 0)],fa.prototype,"run",null),fa=B([M()],fa);class va extends vr{init(){this._setAbGroup=!0,this._key="AdType",this._lookup="AT1",this._default=["none"]}run(){return super.run()}}B([kn(),j("design:type",Function),j("design:paramtypes",[]),j("design:returntype",void 0)],va.prototype,"run",null),va=B([M()],va);class ya{get overrideValues(){const e=this._adTypeDaysExperiment.result;if(!e)return null;const[t,i]=e.split(","),s=parseInt(t,10),n=parseInt(i,10),r=(e=>{const t=e.slice(8,10);return parseInt(t)})(rn());if(r>=s&&r<=n){return R.resolve(va).result||null}return null}constructor(e){this._adTypeDaysExperiment=e}}ya=B([bn("AdTypePerformanceMonitoring"),M(),j("design:type",Function),j("design:paramtypes",[void 0===fa?Object:fa])],ya);class ba extends vr{init(){this._key="AdTypeHoldout",this._lookup="ATHMB",this._default=["none"]}}ba=B([bn("AdTypeHoldoutExperiment"),M()],ba);const Sa=["animatedFooter","expandableFooter","inRecipeRecommendationDesktop","inRecipeRecommendationMobile","largeFormatsDesktop","largeFormatsMobile","nativeDesktopContent","nativeDesktopRecipe","nativeDesktopSidebar","nativeMobileContent","nativeMobileRecipe","nativeDesktopHeader","nativeDesktopBelowPost","nativeMobileHeader","nativeMobileBelowPost","outstreamDesktop","outstreamMobile","sponsorTileDesktop","sponsorTileMobile","expandableCatalogAdsDesktop","expandableCatalogAdsMobile"],Ea=["miniscroller","interscroller"];class Ca{has(e){return this[e]&&!0===this[e]}get enabled(){return Object.keys(this).filter((e=>!0===this[e]))}get enabledMinified(){const e={outstreamDesktop:{min:"od",val:this.outstreamDesktop},outstreamMobile:{min:"om",val:this.outstreamMobile}};return this.enabled.filter((t=>Object.keys(e).includes(t)&&e[t].val)).map((t=>e[t].min))}get outstreamEnabled(){return Ki()?!0===this.outstreamMobile:!0===this.outstreamDesktop}_overriveAdType(e){const t=e.overrideValues;if(t)return Sa.forEach((e=>{(null==t?void 0:t.includes(e))?this[e]=!0:this[e]=!1})),void(Ki()&&Ea.forEach((e=>{(null==t?void 0:t.includes(e))?this[e]=!0:this[e]=!1})));const i=this._adTypeHoldoutExperiment.result;i&&i.length&&i.forEach((e=>{this[e]&&(this[e]=!1)}))}constructor(e,t,i){this._adTypeHoldoutExperiment=t;const s=e.siteAds.adTypes||{};var n,r;this.animatedFooter=Si(s.animatedFooter,!0),this.expandableFooter=Si(s.expandableFooter,!0),this.inRecipeRecommendationDesktop=Si(s.inRecipeRecommendationDesktop,!0),this.inRecipeRecommendationMobile=Si(s.inRecipeRecommendationMobile,!0),this.inRecipeRecommendationSelectors=s.inRecipeRecommendationSelectors,this.interscroller=!!Ki()&&Si(s.interscroller,!0),this.largeFormatsDesktop=Si(s.largeFormatsDesktop,!0),this.largeFormatsMobile=Si(s.largeFormatsMobile,!0),this.miniscroller=!!Ki()&&Si(s.miniscroller,!0),this.nativeDesktopContent=Si(s.nativeDesktopContent,!0),this.nativeDesktopRecipe=Si(s.nativeDesktopRecipe,!0),this.nativeDesktopSidebar=Si(s.nativeDesktopSidebar,!0),this.nativeDesktopHeader=Si(null!=(n=s.nativeHeaderDesktop)?n:s.nativeDesktopHeader,!0),this.nativeDesktopBelowPost=Si(s.nativeDesktopBelowPost,!0),this.nativeMobileContent=Si(s.nativeMobileContent,!0),this.nativeMobileRecipe=Si(s.nativeMobileRecipe,!0),this.nativeMobileHeader=Si(null!=(r=s.nativeHeaderMobile)?r:s.nativeMobileHeader,!0),this.nativeMobileBelowPost=Si(s.nativeMobileBelowPost,!0),this.outstreamDesktop=Si(s.outstreamDesktop,!0),this.outstreamMobile=Si(s.outstreamMobile,!0),this.sponsorTileDesktop=Si(s.sponsorTileDesktop,!1),this.sponsorTileMobile=Si(s.sponsorTileMobile,!1),this.expandableCatalogAdsDesktop=Si(s.expandableCatalogAdsDesktop,!1),this.expandableCatalogAdsMobile=Si(s.expandableCatalogAdsMobile,!1),this._overriveAdType(i),this.skylineHeader=Si(s.skylineHeader,!1)}}Ca=B([M(),F(0,L("AdThrive")),j("design:type",Function),j("design:paramtypes",["undefined"==typeof AdThrive?Object:AdThrive,void 0===ba?Object:ba,void 0===ya?Object:ya])],Ca);class Ta extends Un{get result(){return this._result}run(){return new zn(this.weight).get()}constructor(e,t,i){super(),this._result=!0,this.key="Amazon",this.lookup="AMZN",this._choices=[{choice:!0},{choice:!1}],this.weight=.995;const s=e.deliveryFeatures,n=i.getCoreExperimentButMutateWeights(this.key,this.lookup);if((!s||!s.includes("amazonLoad"))&&n){this._expConfigABGroup=n.abgroup;const e=n.variants[0];this.weight=e.weight,this._result=this.run(),t.set(n.abgroup,this._result?"on":"off")}}}B([kn(),j("design:type",Function),j("design:paramtypes",[]),j("design:returntype",void 0)],Ta.prototype,"run",null),Ta=B([bn("AmazonExperiment"),M(),F(0,L("AdThrive")),j("design:type",Function),j("design:paramtypes",["undefined"==typeof AdThrive?Object:AdThrive,void 0===pr?Object:pr,void 0===mr?Object:mr])],Ta);class wa extends Er{init(){this._key="WebVitals",this._lookup="WVTLS",this._default=!1}}wa=B([bn("WebVitalsExperiment"),M()],wa);class ka{get host(){return this._host}get baseUrl(){return this._baseUrl}get targetPath(){return this._targetPath}constructor(e,t){this.bootstrapResult=new Map,this.bootstrapLoaders={},this.webVitalsEnabled=!!di()&&R.resolve(wa).result,this.gptLibFailedToLoad=!1,this.isGDPR="true"===e.gdpr;const i=Fi()?"/s2s":"";this._host=e.host,this._baseUrl=e.baseUrl,this._targetPath=`${e.targetPath}${i}`||`/es2018${i}`;const s=e.deliveryFeatures;this.isAmazonPreloaded=!(!s||!s.includes("amazonLoad")),this.isGPTPreloaded=!(!s||!s.includes("gptLoad")),this.isPrebidPreloaded=!(!s||!s.includes("prebidLoad")),this.isCmpPreloaded=!(!s||!s.includes("consentManagerCMP")),this.amazonEnabled=t.result||this.isAmazonPreloaded}}ka=B([bn("BootstrapConfig"),M(),F(0,L("AdThrive")),j("design:type",Function),j("design:paramtypes",["undefined"==typeof AdThrive?Object:AdThrive,void 0===Ta?Object:Ta])],ka);class Aa{async load(){return this._bootstrapConfig.amazonEnabled&&this._amazonUAM?(this._init(),this._bootstrapConfig.isAmazonPreloaded?Promise.resolve(!0):(this._addAmazonLinks(),this._addApstag())):Promise.resolve(!1)}_addApstag(){return Cs(this._url)}_addAmazonLinks(){const e=this._link;Ts(e,"dns-prefetch"),Ts(e,"preconnect",[{name:"crossorigin",value:""}])}_init(){if(window.apstag)return;const e=(e,t)=>{window.apstag.queue.push([e,t,(new Date).getTime()])};window.apstag={init(){e("i",arguments)},customPlacements:()=>({}),fetchBids(){e("f",arguments)},setDisplayBids(){},targetingKeys:()=>[],dpa(){e("di",arguments)},rpa(){e("ri",arguments)},upa(){e("ui",arguments)},queue:[]}}constructor(e,t){this._bootstrapConfig=t,this.type=Me.Amazon,this.wait=!1,this._url="https://c.aps.amazon-adsystem.com/apstag.js",this._link="https://c.aps.amazon-adsystem.com",this._amazonUAM=e.siteAds.adOptions.amazonUAM}}Aa=B([bn("AmazonBootstrap"),D(),F(0,L("AdThrive")),j("design:type",Function),j("design:paramtypes",["undefined"==typeof AdThrive?Object:AdThrive,void 0===ka?Object:ka])],Aa);const Ia=(e,t)=>et?1:0,xa=(e,t)=>{var i,s;return(null!=(i=t.lastSeen)?i:0)-(null!=(s=e.lastSeen)?s:0)},Pa=e=>Array.from(new Set(e)).sort(Ia);class Oa extends Er{init(){this._key="OptableTestThirdPartyDCN",this._lookup="OTTPD",this._default=!1}run(){return super.run()}}Oa=B([bn("OptableTestThirdPartyDCNExperiment"),M()],Oa);class Ra{async load(e,t){var i,s,n,r;const a=`s-${e}`;(null==(i=window.optable)?void 0:i.instance)&&(null==(s=window.optable)?void 0:s.auth)&&(null==(n=window.optable)?void 0:n.site)===a&&(null==(r=window.optable.auth)?void 0:r.site)===a||(window.optable=window.optable||{cmd:[]},window.optable.site=a,window.optable.geo="CA"===t?"US":t,window.optable.auth||(window.optable.auth={}),window.optable.auth.site=a,window.optable.instance||(window.optable.instance={},window.optable.instance.dcn=window.optable.instance.dcn||{}),window.optable.tests||(window.optable.tests={}),await Cs("https://raptive.solutions.cdn.optable.co/public-assets/raptive-sdk.js"))}setDCNExperiments(e){var t;(null==(t=window.optable)?void 0:t.instance)&&(window.optable.instance.dcn=window.optable.instance.dcn||{},window.optable.instance.dcn.experiments=e)}loaded(){var e,t,i;return!!(null==(e=window.optable)?void 0:e.site)&&!!(null==(t=window.optable)?void 0:t.instance)&&!!(null==(i=window.optable)?void 0:i.auth)}addToQueue(e){var t,i;window.optable=window.optable||{cmd:[]},window.optable.cmd=(null==(t=window.optable)?void 0:t.cmd)||[],null==(i=window.optable)||i.cmd.push(e)}async resolveRaptiveClusters(e){return new Promise(((t,i)=>{this.addToQueue((()=>{var s,n;(null==(n=window.optable)||null==(s=n.auth)?void 0:s.resolve)?window.optable.auth.resolve(e).then((e=>{const i=(e=>{const t={metadata:{totalClusterCount:0,totalSourceCount:0,uniqueSources:[],uniqueIds:[],uniqueTraits:[],lastSeen:null,lastSeenSource:null,lastSeenSourceClusterCount:0,lastSeenSourceIds:[],lastSeenSourceTraits:[]},sources:{raptive:{clusters:[]}}};if(!e.clusters)return t;let i=[],s=[];return e.clusters.forEach((e=>{const n={cookieDeprecationLabel:[],lastSeen:null,hemCollectionDate:[],hemSites:[],hemSources:[],browser:[],device:[],os:[],trueDataHems:[]};var r;e.traits.forEach((e=>{const{key:t,value:i}=e;switch(t){case"cookieDeprecationLabel":n.cookieDeprecationLabel.push(i);break;case"hem_cd":const e=new Date(i).getTime();var s;n.hemCollectionDate.push(e),e>(null!=(s=n.lastSeen)?s:0)&&(n.lastSeen=e);break;case"hem_dates":const t=new Date(i).getTime();var r;t>(null!=(r=n.lastSeen)?r:0)&&(n.lastSeen=t);break;case"hem_sites":n.hemSites.push(i);break;case"hem_sources":n.hemSources.push(i);break;case"browser":n.browser.push(i);break;case"device":n.device.push(i);break;case"os":n.os.push(i);break;case"td_hems":n.trueDataHems.push(i)}})),Object.entries(n).forEach((([e,t])=>{Array.isArray(t)&&(n[e]=Array.from(new Set(t)).sort(Ia))})),t.sources.raptive.clusters.push({ids:Array.from(new Set(null!=(r=e.ids)?r:[])).sort(Ia),traits:n}),t.metadata.uniqueIds.push(...e.ids),t.metadata.uniqueTraits.push(...Object.keys(n)),n.lastSeen&&(!t.metadata.lastSeen||n.lastSeen>t.metadata.lastSeen)&&(t.metadata.lastSeen=n.lastSeen,t.metadata.lastSeenSource="raptive",i=e.ids,s=Object.keys(n))})),t.metadata.lastSeenSourceIds=Pa(i),t.metadata.lastSeenSourceTraits=Pa(s),t.metadata.totalClusterCount=t.sources.raptive.clusters.length,t.metadata.lastSeenSourceClusterCount=t.sources.raptive.clusters.length,t.metadata.totalSourceCount=1,t.metadata.uniqueSources.push("raptive"),t.metadata.uniqueIds=Pa(t.metadata.uniqueIds),t.metadata.uniqueTraits=Pa(t.metadata.uniqueTraits),Object.values(t.sources).forEach((e=>{e.clusters.sort(((e,t)=>xa(e.traits,t.traits)))})),t})(e);t(i)})).catch(i):i("Optable SDK 'resolve' method not available after loading SDK")}))}))}async resolveThirdPartyClusters(e,t=!1){return new Promise(((i,s)=>{this.addToQueue((()=>{var n,r;const a=this._useTestThirdPartyDCN||t?null==(n=window.optable)?void 0:n.tests:null==(r=window.optable)?void 0:r.instance;(null==a?void 0:a.resolve)?a.resolve(e).then((e=>{const t=(e=>{var t;const i={metadata:{totalClusterCount:0,totalSourceCount:0,uniqueSources:[],uniqueIds:[],uniqueTraits:[],lastSeen:null,lastSeenSource:null,lastSeenSourceClusterCount:0,lastSeenSourceIds:[],lastSeenSourceTraits:[]},sources:{mediawallah:{clusters:[]},truedata:{clusters:[]},id5:{clusters:[]}},lmpid:null!=(t=e.lmpid)?t:""};return e.clusters?(e.clusters.forEach((e=>{var t;const s=null!=(t=e.ids)?t:[];let n=null;e.traits.forEach((e=>{const{key:t,value:r}=e;"metadata"===t&&r&&r.split("|").forEach((e=>{const t=JSON.parse(e),{id:r,metadata:a}=t,{last_seen:o,percentile:l,source:d,cookie_type:c}=a,h=null==d?void 0:d.toLowerCase();let u=r;(null==h?void 0:h.includes("mediawallah"))?n="mediawallah":(null==h?void 0:h.includes("truedata"))?n="truedata":(null==h?void 0:h.includes("id5"))&&(n="id5",u=`id5:${u}`);const p=Array.from(new Set([u,...s])).sort(Ia),g={lastSeen:new Date(1e3*o).getTime(),..."id5"===n?{cookieType:c.toLowerCase().replace(/\s/g,"")}:{},..."mediawallah"!==n&&"truedata"!==n||void 0===l?{}:{percentile:parseInt(l)}};n&&(i.metadata.uniqueIds.push(...p),i.metadata.uniqueSources.push(n),i.metadata.uniqueTraits.push(...Object.keys(g)),i.sources[n].clusters.push({ids:p,traits:g})),(!i.metadata.lastSeen&&g.lastSeen||i.metadata.lastSeen&&g.lastSeen&&g.lastSeen>i.metadata.lastSeen)&&(i.metadata.lastSeen=g.lastSeen,i.metadata.lastSeenSource=n,i.metadata.lastSeenSourceIds=Pa([...s,u]),i.metadata.lastSeenSourceTraits=Object.keys(g).sort(Ia))}))}))})),i.metadata.totalClusterCount=Object.values(i.sources).reduce(((e,t)=>e+t.clusters.length),0),i.metadata.lastSeenSourceClusterCount="mediawallah"===i.metadata.lastSeenSource?i.sources.mediawallah.clusters.length:i.sources.truedata.clusters.length,i.metadata.uniqueSources=Pa(i.metadata.uniqueSources),i.metadata.uniqueIds=Pa(i.metadata.uniqueIds),i.metadata.uniqueTraits=Pa(i.metadata.uniqueTraits),i.metadata.totalSourceCount=i.metadata.uniqueSources.length,Object.values(i.sources).forEach((e=>{e.clusters.sort(((e,t)=>xa(e.traits,t.traits)))})),i):i})(e);i(t)})).catch(s):s("Optable SDK 'resolve' method not available after loading SDK")}))}))}cid(e,t=0){return new Promise(((i,s)=>{this.addToQueue((()=>{var n,r;if(null==(r=window.optable)||null==(n=r.SDK)?void 0:n.cid){const s=window.optable.SDK.cid(e,t);i(s)}else s("Optable SDK 'SDK.cid' method not available after loading SDK")}))}))}eid(e){return new Promise(((t,i)=>{this.addToQueue((()=>{var s,n;if(null==(n=window.optable)||null==(s=n.SDK)?void 0:s.eid){const i=window.optable.SDK.eid(e);t(i)}else i("Optable SDK 'SDK.eid' method not available after loading SDK")}))}))}async identify(...e){return new Promise(((t,i)=>{this.addToQueue((()=>{var s,n;(null==(n=window.optable)||null==(s=n.auth)?void 0:s.identify)?window.optable.auth.identify(...e).then(t).catch(i):i("Optable SDK 'identify' method not available after loading SDK")}))}))}async profile(e){return new Promise(((t,i)=>{this.addToQueue((()=>{var s,n;(null==(n=window.optable)||null==(s=n.auth)?void 0:s.profile)?window.optable.auth.profile(e).then(t).catch(i):i("Optable SDK 'auth.profile' method not available after loading SDK")}))}))}async targeting(){return new Promise(((e,t)=>{this.addToQueue((()=>{var i,s;(null==(s=window.optable)||null==(i=s.auth)?void 0:i.targeting)?window.optable.auth.targeting().then(e).catch(t):t("Optable SDK 'auth.targeting' method not available after loading SDK")}))}))}async tokenize(e){return new Promise(((t,i)=>{this.addToQueue((()=>{var s,n;(null==(n=window.optable)||null==(s=n.instance)?void 0:s.tokenize)?window.optable.instance.tokenize(e).then((e=>t(e))).catch(i):i("Optable SDK 'instance.tokenize' method not available after loading SDK")}))}))}installGPTSecureSignals(){return new Promise((e=>{this.addToQueue((()=>{window.googletag=window.googletag||{cmd:[]};const t=window.googletag;t.cmd.push((()=>{t.secureSignalProviders||(t.secureSignalProviders=[]),t.secureSignalProviders.push({id:"loblawmedia.ca",collectorFunction:()=>{var e,t,i;return(null==(t=window.optable)||null==(e=t.auth)?void 0:e.lmpidFromCache)?Promise.resolve(null!=(i=window.optable.auth.lmpidFromCache())?i:""):Promise.resolve("")}})})),e()}))}))}constructor(e){var t;this._useTestThirdPartyDCN=!1,this._useTestThirdPartyDCN=null!=(t=e.result)&&t}}Ra=B([bn("OptableSdkWrapper"),M(),j("design:type",Function),j("design:paramtypes",[void 0===Oa?Object:Oa])],Ra);class La extends Er{init(){this._key="Optable",this._lookup="ROG_2",this._default=!1,this._autorun=!1}run(){return super.run()}}B([kn(),j("design:type",Function),j("design:paramtypes",[]),j("design:returntype",Object)],La.prototype,"run",null),La=B([bn("OptableExperiment"),M()],La);class Da extends Er{init(){this._key="UseOptableHem",this._lookup="ROGHEM_4",this._default=!1,this._autorun=!1}run(){return super.run()}}B([kn(),j("design:type",Function),j("design:paramtypes",[]),j("design:returntype",Object)],Da.prototype,"run",null),Da=B([bn("UseOptableHemExperiment"),M()],Da);class Ma extends vr{init(){this._key="OptableCountryAllowlist",this._lookup="OPTCA",this._default=[]}}Ma=B([bn("OptableCountryAllowlistExperiment"),M()],Ma);class Ba extends vr{init(){this._key="OptableCountryRegionBlocklist",this._lookup="OPTCRB",this._default=[]}}Ba=B([bn("OptableCountryRegionBlocklistExperiment"),M()],Ba);class Fa{_getOptableEnabled(e,t,i){var s,n;if(!t||!i)return!1;if(!(null==(s=this._optableCountryAllowlistExperiment.result)?void 0:s.includes(t)))return!1;if(null==(n=this._optableCountryRegionBlocklistExperiment.result)?void 0:n.includes(`${t}-${i}`))return!1;const r=Ri().get("rptbt24");return!(e.invalidTraffic&&"true"!==r)&&this._optableExperiment.result}constructor(e,t,i,s,n){var r,a,o,l;this._optableExperiment=t,this._useOptableHemExperiment=i,this._optableCountryAllowlistExperiment=s,this._optableCountryRegionBlocklistExperiment=n;const d=null!=(l=null==(r=e.core)?void 0:r.country)?l:"";var c;const h=null!=(c=null==(o=e.core)||null==(a=o.region)?void 0:a.toUpperCase())?c:"",u=Ri().get("optable_identifier");this.enabled=this._getOptableEnabled(e,d,h),this.useOptableHem=this.enabled&&this._useOptableHemExperiment.result,this.loblawEnabled=this.enabled&&"CA"===d,this.identifierOverride=u?decodeURIComponent(u):void 0}}Fa=B([M(),F(0,L("AdThrive")),j("design:type",Function),j("design:paramtypes",["undefined"==typeof AdThrive?Object:AdThrive,void 0===La?Object:La,void 0===Da?Object:Da,void 0===Ma?Object:Ma,void 0===Ba?Object:Ba])],Fa);class ja{setGpcString(){!this.gpcEnabled&&this.globalPrivacyControl?(Fs.setInternalLocalStorage("adthrive_gpc",`${this.globalPrivacyControl}`),this._updateGPC()):this.gpcEnabled&&!this.globalPrivacyControl&&(Fs.deleteLocalStorage("adthrive_gpc"),this._updateGPC())}_updateGPC(){this.gpcEnabled=!!this.globalPrivacyControl,this.gpcUpdated=!0}constructor(){this.gpcUpdated=!1,this.globalPrivacyControl=!!window.navigator.globalPrivacyControl,this.gpcEnabled="true"===Fs.readInternalLocalStorage("adthrive_gpc")}}ja=B([M(),j("design:type",Function),j("design:paramtypes",[])],ja);class Na{get enabled(){return this.required&&this.userOptedOut}constructor(e,t,i){var s;this._usCmp=t,this._consentEventBus=i,this.nonCompliantBidders=["unruly"],this.ccpaNotApplicable="1---",this.ccpaOptIn="1YNY",this.ccpaOptOut="1YYY",this.consentChange=new V,this.optOutText="Do not sell or share my personal information.",this.optInText="Customize my ad experience.",this.deviceAccess=!1,this.usCmpRequired=this._usCmp.required;const n=null==e||null==(s=e.core)?void 0:s.region;this.required="true"!==e.gdpr,this.privacyString=Fs.readExternalCookie("usprivacy"),this.userOptedOut=this.privacyString===this.ccpaOptOut,this.gpcEnabled=Fs.readInternalLocalStorage("adthrive_gpc"),this._usCmp.required&&(this.userOptedOut=!this._usCmp.consent,this._consentEventBus.usCmpConsentCaptured.on((e=>{this.userOptedOut=!e,this.consentChange.emit(e?this.ccpaOptIn:this.ccpaOptOut)}),{handleEventsAlreadyEmitted:!0})),this.consentChange=new V,Js()||en()&&this.required||Zs(n)&&this.required?this.privacyString=this.ccpaOptOut:!this.privacyString&&this.required&&(this.privacyString=this.ccpaOptIn),this.consentChange.on((e=>{this.privacyString=e})),this.required&&(this.comscoreParams=this.userOptedOut?"0":"1")}}Na=B([M(),F(0,L("AdThrive")),j("design:type",Function),j("design:paramtypes",["undefined"==typeof AdThrive?Object:AdThrive,void 0===ha?Object:ha,void 0===Wn?Object:Wn])],Na);class Ua extends Er{init(){this._key="OptTknEndpoint",this._lookup="OTKE",this.abgroup="otke",this._default=!1}}Ua=B([bn("OptableTokenizeEndpointExperiment"),M()],Ua);const Va=()=>new Promise((e=>setTimeout(e,0))),za=()=>window.scheduler.yield(),Ha=window.scheduler&&"yield"in window.scheduler&&"function"==typeof window.scheduler.yield?za:Va,$a="adthrive_GetPiiData",qa="adthrive_SetPiiData",Ga="adthrive_SetIdentityData",Wa="adthrive_DeletePiiData",Ka="adthrive_SendPiiData";class Ya{constructor(){this.consentCaptured=new z}}Ya=B([M()],Ya);class Xa{get enabled(){return this._isRequired}constructor(e){this.raptiveVendorId=996,this.nonCompliantBidders=[te.ThirtyThreeAcross],this.revokedPurposeConsent=!1,this.cmpUserActionCompleteFired=!1,this.consentCaptured=!1,this.consentCapturedData={},this._isRequired="true"===e.gdpr}}Xa=B([M(),F(0,L("AdThrive")),j("design:type",Function),j("design:paramtypes",["undefined"==typeof AdThrive?Object:AdThrive])],Xa);class Qa{get enabled(){return!this._gpcConfig.gpcEnabled&&!this._ccpaConfig.userOptedOut}async start(){await this._addIframeToPage(),this._identityEventBus.iframeReady.emit(),this._setupEventListeners()}deleteData(){try{if(this._frame.contentWindow){const e={action:Wa};this._frame.contentWindow.postMessage(e,this._host)}}catch(e){W.error("PiiIframeManager","deleteIdentity","Failed to delete identity data",e)}}setIdentityData(e){try{if(this._frame.contentWindow){const t={action:Ga,identityData:e,encrypt:"false"!==this._context.querystring.get("adt_encrypt")};this._frame.contentWindow.postMessage(t,this._host)}}catch(e){W.error("PiiIframeManager","setIdentityData","Failed to set identity data",e)}}setData(e){try{if(this._frame.contentWindow){const t={action:qa,piiData:e};this._frame.contentWindow.postMessage(t,this._host)}}catch(e){W.error("PiiIframeManager","setIdentity","Failed to set identity data",e)}}getData(){try{if(this._frame.contentWindow){const e={action:$a};this._frame.contentWindow.postMessage(e,this._host)}}catch(e){W.error("PiiIframeManager","getIdentity","Failed to get identity data",e)}}_addIframeToPage(){return new Promise((e=>{this._frame.src=this._frameSrc,this._frame.id="adt-ii",this._frame.style.display="none",this._frame.onload=()=>{e()},document.body.appendChild(this._frame)}))}_setupEventListeners(){this._identityEventBus.dataCaptured.on((e=>{const{sha1Hash:t,sha256Hash:i,source:s,sourceCollectedDate:n}=e;(i||t||s)&&this.setData({sha1Hash:t,sha256Hash:i,source:s,sourceCollectedDate:n})}),{handleEventsAlreadyEmitted:!0}),this._identityEventBus.dataCapturedForIframe.on((e=>{e&&this.setIdentityData(e)}),{handleEventsAlreadyEmitted:!0}),this._ccpaConfig.consentChange.on((e=>{e===this._ccpaConfig.ccpaOptOut&&this.deleteData()})),this._frame.contentWindow&&window.addEventListener("message",this._handleMessageEvent.bind(this))}_handleMessageEvent(e){const t=e.data.action;if(e.origin===this._host&&t===Ka){const t=e.data.piiData;t&&!t.sourceCollectedDate&&(t.sourceCollectedDate=null);let i=e.data.identityData;i&&("object"==typeof i||(W.error("PiiIframeManager","_handleMessageEvent","Received invalid identity data from iframe (cross domain):",i),i=void 0)),this._identityEventBus.dataSentFromIframe.emit({...t&&{piiData:t},...i&&{identityData:i}})}}constructor(e,t,i,s,n,r,a,o){this._bootstrapConfig=e,this._gpcConfig=t,this._gdprConfig=i,this._ccpaConfig=s,this._identityEventBus=n,this._gdprEvents=r,this._siteConfig=a,this._context=o,this._host=`https://${this._bootstrapConfig.host}`.replace("https://https://","https://"),this._frame=document.createElement("iframe"),this._baseUrl=this._bootstrapConfig.baseUrl,this._frameSrc=`${this._baseUrl.replace("/gdpr","")}/html/i.html`,this.enabled&&(this._gdprConfig.enabled?this._gdprEvents.consentCaptured.on((()=>{((e,t)=>{try{var i;if("function"!=typeof window.__cmp)return!1;const s=window.__cmp("getCMPData"),n=!0===(null==s||null==(i=s.vendorConsents)?void 0:i[e]),r=!!(null==t?void 0:t.every((e=>{var t;return!0===(null==s||null==(t=s.purposeConsents)?void 0:t[e])})));return n&&r}catch(e){return W.error("util","checkConsentForVendor",e),!1}})(this._gdprConfig.raptiveVendorId,[1])&&this.start().catch((e=>{W.error("PiiIframeManager","constructor","Failed to initialize identity iframe",e)}))}),{handleEventsAlreadyEmitted:!0}):this.start().catch((e=>{W.error("PiiIframeManager","constructor","Failed to initialize identity iframe",e)})))}}function Ja(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}Qa=B([bn("PiiIframeManager"),M(),j("design:type",Function),j("design:paramtypes",[void 0===ka?Object:ka,void 0===ja?Object:ja,void 0===Xa?Object:Xa,void 0===Na?Object:Na,void 0===Qn?Object:Qn,void 0===Ya?Object:Ya,void 0===ur?Object:ur,void 0===Fr?Object:Fr])],Qa);var Za="object"==typeof global&&global&&global.Object===Object&&global,eo="object"==typeof self&&self&&self.Object===Object&&self,to=Za||eo||Function("return this")(),io=function(){return to.Date.now()},so=/\s/;var no=/^\s+/;function ro(e){return e?e.slice(0,function(e){for(var t=e.length;t--&&so.test(e.charAt(t)););return t}(e)+1).replace(no,""):e}var ao=to.Symbol,oo=Object.prototype,lo=oo.hasOwnProperty,co=oo.toString,ho=ao?ao.toStringTag:void 0;var uo=Object.prototype.toString;var po=ao?ao.toStringTag:void 0;function go(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":po&&po in Object(e)?function(e){var t=lo.call(e,ho),i=e[ho];try{e[ho]=void 0;var s=!0}catch(e){}var n=co.call(e);return s&&(t?e[ho]=i:delete e[ho]),n}(e):function(e){return uo.call(e)}(e)}function mo(e){return null!=e&&"object"==typeof e}var _o=/^[-+]0x[0-9a-f]+$/i,fo=/^0b[01]+$/i,vo=/^0o[0-7]+$/i,yo=parseInt;function bo(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||mo(e)&&"[object Symbol]"==go(e)}(e))return NaN;if(Ja(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Ja(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=ro(e);var i=fo.test(e);return i||vo.test(e)?yo(e.slice(2),i?2:8):_o.test(e)?NaN:+e}var So=Math.max,Eo=Math.min;function Co(e,t,i){var s,n,r,a,o,l,d=0,c=!1,h=!1,u=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function p(t){var i=s,r=n;return s=n=void 0,d=t,a=e.apply(r,i)}function g(e){var i=e-l;return void 0===l||i>=t||i<0||h&&e-d>=r}function m(){var e=io();if(g(e))return _(e);o=setTimeout(m,function(e){var i=t-(e-l);return h?Eo(i,r-(e-d)):i}(e))}function _(e){return o=void 0,u&&s?p(e):(s=n=void 0,a)}function f(){var e=io(),i=g(e);if(s=arguments,n=this,l=e,i){if(void 0===o)return function(e){return d=e,o=setTimeout(m,t),c?p(e):a}(l);if(h)return clearTimeout(o),o=setTimeout(m,t),p(l)}return void 0===o&&(o=setTimeout(m,t)),a}return t=bo(t)||0,Ja(i)&&(c=!!i.leading,r=(h="maxWait"in i)?So(bo(i.maxWait)||0,t):r,u="trailing"in i?!!i.trailing:u),f.cancel=function(){void 0!==o&&clearTimeout(o),d=0,s=l=n=o=void 0},f.flush=function(){return void 0===o?a:_(io())},f}class To extends br{init(){this._key="EmailCaptureHandlerDebounceExperiment_2",this._lookup="ECHDE2"}}To=B([M()],To);class wo extends ${constructor(...e){super(...e),this.selectorFound=new V}}wo=B([M()],wo);class ko{captureEmail(e,t){this.checkSources(t),this.emailCaptured.emit({pii:{email:e,source:`${t}_c`,sourceCollectedDate:is()},identityDataSource:"email"})}checkSources(e){!(e="slickstream"===e?"ss":e)||["url","urlh","c","nl","ss","l_s","l_i","api","grwm","g_td","ra_gpid"].includes(e)||(null==e?void 0:e.startsWith("ss_"))||W.event("EmailCaptureHandler","checkSources","unknown source: ",e)}_processHash(e,t){return e&&"string"==typeof e&&e.match(/value/i)?this._retrieveBitHashString(e,t):e||""}collectEmailFromStorage(){const[e,t]=this._getStoredHashInfo(),i=this._getStoredSource(t),s=this._getStoredSourceCollectedDate();e?this._processStoredHash(e,i,s):this._collectFromIframe()}_getStoredHashInfo(){const e=Fs.readInternalCookie("adt_ei"),t=Fs.readInternalLocalStorage("adt_ei");let i=null,s=!1;return e?(i=e,s=!0):t&&(i="string"==typeof t?{sha256Hash:t,sha1Hash:""}:t),[i,s]}_getStoredSource(e=!1){const t=Fs.readInternalCookie("adt_emsrc")||Fs.readInternalLocalStorage("adt_emsrc")||"o_s";if(t.includes(ms.VALUES.IDENTITY_IFRAME))return this._retrieveIframeSourceString(t);if(t.includes(ms.PREFIXES.IDG)||t.includes(ms.PREFIXES.RAPTIVE_AUTH)){const e=t.includes(ms.SUFFIXES.CAPTURE);return!t.includes(ms.SUFFIXES.CAPTURE)&&!t.includes(ms.SUFFIXES.STORAGE)?`${t}${ms.SUFFIXES.CAPTURE}`:e?t.replace(`${ms.SUFFIXES.CAPTURE}`,`${ms.SUFFIXES.STORAGE}`):t}return this._determineSource(t,e)}_getStoredSourceCollectedDate(){return Fs.readInternalLocalStorage("adt_emsrc_cd")}_determineSource(e,t){const i="url"===e||"urlh"===e||"urlhck"===e,s=e.endsWith("_c");return i?`${e}_c`:s?e.replace(/_c$/,"_s"):t?"cki_s":e}_processStoredHash(e,t,i){(t.includes(":id5id")||t.includes(":pubm"))&&(t=t.replace(":","-"));const s=[{key:"sha256Hash",length:64},{key:"sha1Hash",length:40}];for(const t of s){const i=e[t.key];(null==i?void 0:i.length)&&(e[t.key]=this._processHash(i,t.length))}if(e&&t&&(e.sha256Hash||e.sha1Hash)){const s={pii:{sha256Hash:e.sha256Hash,sha1Hash:e.sha1Hash,source:t,sourceCollectedDate:i},identityDataSource:"browserStorage"};this.emailCaptured.emit(s)}}_collectFromIframe(){this._identityEventBus.dataSentFromIframe.once((e=>{if(e.piiData){e.piiData.source&&!e.piiData.source.includes(ms.PREFIXES.IDENTITY_IFRAME)&&(e.piiData.source=`${ms.PREFIXES.IDENTITY_IFRAME}${e.piiData.source}`);const t={pii:e.piiData,identityDataMap:e.identityData,identityDataSource:"iframe"};this.emailCaptured.emit(t)}else this._identityEventBus.iframeDataSynced.emit()})),this._identityEventBus.iframeReady.on((()=>this._piiIframeManager.getData()),{handleEventsAlreadyEmitted:!0})}_retrieveBitHashString(e,t){const i=e.match(`\\w{${t}}`);return i?i[0]:""}_retrieveIframeSourceString(e){const t=e.match(/^(l_i)-(.*)/);return t&&3===t.length?t[0].replace(/_c$/,"_s"):"l_i"}addEmailProviderListeners(){this._eventMap.forEach(((e,t)=>{e.addEventListener(t,this._boundCallEventHandler)}))}removeEmailProviderListeners(){this._eventMap.forEach(((e,t)=>{e.removeEventListener(t,this._boundCallEventHandler)}))}callCheckEmailProviders(e){("mouseleave"!==e.type||e.clientY<=0)&&setTimeout((()=>{this._emailProviderOnPage||this.emailProviderHandler()}),this._emailCheckTimeout)}emailProviderHandler(){for(const e of this._emailProviders){const t=document.querySelectorAll(e.divSelector);if(t.length){this._emailCaptureEventBus.selectorFound.emit({selector:e.divSelector,providerName:e.name,divs:t}),e.divSelector.includes("grow-me")&&(this._growMeOnPage=!0),this.removeEmailProviderListeners(),this._emailProviderOnPage=!0,this._addElementListeners();break}}}setElements(){const e="input[type=text], input[type=email], input[name=email]";if(this._elements=Array.prototype.slice.call(document.querySelectorAll(e)),this._growMeOnPage){var t;const[s]=Array.from(document.querySelectorAll(this._growMeSelector));var i;const n=null!=(i=Array.prototype.slice.call(null==s||null==(t=s.shadowRoot)?void 0:t.querySelectorAll(e)))?i:[];this._elements=[...this._elements,...n]}}_addKeydownEventListener(){document.addEventListener("keydown",(e=>this._keydownEventListener(e)))}_keydownEventListener(e){"keydown"!==e.type||"@"!=e.key||this._keydownListenerAdded||(this._keydownListenerAdded=!0,this._addElementListeners())}_addElementListeners(){this.setElements();for(const e of this._elements)e.addEventListener("blur",this._boundProcessEventHandler),e.addEventListener("change",this._boundProcessEventHandler)}removeElementListeners(){for(const e of this._elements)e.removeEventListener("blur",this._boundProcessEventHandler),e.removeEventListener("change",this._boundProcessEventHandler)}sourceOrigin(e){let t="unknown";if(!e.form)return t;const{id:i}=e.form;return i&&"string"==typeof i&&(i.includes("comment")?t=ms.VALUES.COMMENT:i.includes("subscribe")?t=ms.VALUES.NEWSLETTER:this._growMeOnPage&&e.form.querySelectorAll(this._growMeFormSelector)&&(t=ms.VALUES.GRWM)),t}processInputChange(e){const t=e.target,i=t.value,s=Oi(i);if(s){const e=this.sourceOrigin(t);this.captureEmail(s,e),this.removeElementListeners()}}constructor(e,t,i,s){var n;this._identityEventBus=e,this._piiIframeManager=t,this._emailCaptureEventBus=s,this._elements=[],this._keydownListenerAdded=!1,this._emailProviderOnPage=!1,this._growMeOnPage=!1,this._growMeSelector='[id^="grow-me-inline-subscribe-cta-root-"]',this._growMeFormSelector='[class^="SubscribeCtaWidget___StyledDiv6-"]',this.emailCaptured=new z,this._emailProviders=[{divSelector:'div[id$="-optin"]',name:"OptInMonster"},{divSelector:'div[class^="cb-form-group"]',name:"ConvertBox"},{divSelector:"div.sumo-form-wrapper.listbuilder-popup",name:"SumoMe"},{divSelector:this._growMeSelector,name:"Grow.me"}],this._emailCheckTimeout=1500,this._eventMap=new Map([["mousemove",window],["scroll",window],["mouseleave",document],["om.Campaign.startShow",document]]);const r=null!=(n=i.result)?n:0;this._boundCallEventHandler=Co(this.callCheckEmailProviders.bind(this),r),this._boundProcessEventHandler=Co(this.processInputChange.bind(this),r),this.addEmailProviderListeners(),this._addElementListeners(),this._addKeydownEventListener(),this.collectEmailFromStorage()}}ko=B([bn("EmailCaptureHandler"),M(),j("design:type",Function),j("design:paramtypes",[void 0===Qn?Object:Qn,void 0===Qa?Object:Qa,void 0===To?Object:To,void 0===wo?Object:wo])],ko);class Ao{constructor(){}}class Io extends Ao{constructor(...e){super(...e),this.truedataHems=[]}}Io=B([M()],Io);class xo extends Er{init(){this._key="GpidGraphBridge",this._lookup="GGB",this._default=!1,this._autorun=!1}run(){return super.run()}}B([kn(),j("design:type",Function),j("design:paramtypes",[]),j("design:returntype",void 0)],xo.prototype,"run",null),xo=B([bn("GpidGraphBridgeExperiment"),M()],xo);class Po extends br{init(){this._key="IdentityIframeSyncWait",this._lookup="IISW"}}Po=B([bn("IdentityIframeSyncWaitExperiment"),M()],Po);class Oo extends vr{init(){this._key="hemSourceAllowlist",this._lookup="HEMSA",this._default=["none"]}setABGroup(e,t){const i=this._coreExperimentConfig.getCoreExperiment(this.key,this.lookup);i&&this.abgroupClass.set(i.abgroup,"on")}}Oo=B([bn("HemSourceAllowlistExperiment"),M()],Oo);class Ro{_getMatchedHemSource(e){const t=e.match(/^l_i$/);if(t)return t[0];const i=e.match(/^(ss)_.*/);if(i)return i[1];const s=e.match(/(?:ra_)(.*?)(?:_c|_s)/);if(s&&s[1])return`ra_${s[1]}`;const n=e.match(/(?:g_)(.*?)(?:_c|_s)/);if(n&&n[1])return`g_${n[1]}`;const r=e.match(/(.*?)(?:_c|_s)/);return r&&r[1]?r[1]:void 0}checkSource(e){if(!e||"string"!=typeof e)return this._default;var t;const i=null!=(t=this._getMatchedHemSource(this._removeIdentityIframePrefix(e)))?t:"";return!!this._allowedSources.includes(i)||this._default}_removeIdentityIframePrefix(e){const t=e.match(/^l_i-(.*)/);return t&&t[1]?t[1]:e}constructor(e){var t;this._default=!1,this._allowedSources=null!=(t=e.result)?t:[]}}Ro=B([M(),j("design:type",Function),j("design:paramtypes",[void 0===Oo?Object:Oo])],Ro);const Lo=e=>(new TextEncoder).encode(e),Do=e=>(new TextDecoder).decode(e),Mo=async e=>{const t=Lo(e);return crypto.subtle.importKey("raw",t.slice(0,16),{name:"AES-GCM"},!1,["encrypt","decrypt"])},Bo=async(e,t)=>{const i=await Mo(t),s=Uint8Array.from(atob(e),(e=>e.charCodeAt(0))),n=s.slice(0,12),r=s.slice(12),a=await crypto.subtle.decrypt({name:"AES-GCM",iv:n},i,r);return JSON.parse(Do(a))},Fo=async(e,t)=>{const i=await Mo(t),s=Lo(JSON.stringify(e)),n=crypto.getRandomValues(new Uint8Array(12)),r=await crypto.subtle.encrypt({name:"AES-GCM",iv:n},i,s),a=new Uint8Array(n.length+r.byteLength);return a.set(n),a.set(new Uint8Array(r),n.length),(e=>{const t=String.fromCharCode(...new Uint8Array(e));return btoa(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")})(a.buffer)},jo=async(e,t)=>{const i=await Mo(t),s=(e=>{const t=(4-(e=e.replace(/-/g,"+").replace(/_/g,"/")).length%4)%4;e+="=".repeat(t);const i=atob(e);return Uint8Array.from(i,(e=>e.charCodeAt(0)))})(e),n=s.slice(0,12),r=s.slice(12),a=await crypto.subtle.decrypt({name:"AES-GCM",iv:n},i,r);return JSON.parse(Do(a))},No=async(e=!0)=>{try{const t=Fs.readInternalLocalStorage(gs.KEY);if("object"!=typeof t)return null;if(t&&e)for(const e of Object.values(t)){if(!e.d)return null;"string"==typeof e.d&&(e.d=await jo(e.d,e.s))}return t}catch(e){return null}},Uo=async(e,t,i=!0,s)=>{const n=await No(!1)||{},r=e.collectionSiteId?e.collectionSiteId:t;n[e.collectionMethod]={d:e,s:r};for(const e of Object.values(n))i&&"object"==typeof e.d&&(e.d=await Fo(e.d,e.s)),i||"string"!=typeof e.d||(e.d=await jo(e.d,e.s));return Fs.setInternalLocalStorage(gs.KEY,n),n};class Vo{get rcid(){return this._rcid}get hash(){const e=Fs.readInternalLocalStorage("adt_ei");return e&&"object"==typeof e&&e.hasOwnProperty("sha256Hash")?this._retrieveValueFromObject(e.sha256Hash):e&&"string"==typeof e&&e.match(/sha256Hash/i)?this._retrieve64BitString(e):void 0}get source(){const e=Fs.readInternalLocalStorage("adt_emsrc");return e||void 0}async getRcid(){if(this._rcid)return this._rcid;try{var e;const t=Fs.readExternalCookie("_rcid");if(!t)return null;"string"==typeof t?this._rcid=await Bo(t,this._site.id):"object"==typeof t&&(null==t||null==(e=t.value)?void 0:e.sharedId)?this._rcid=t:this._rcid=null}catch(e){this._rcid=null}return this._rcid}_retrieveValueFromObject(e){return"string"==typeof e?e:"object"==typeof e&&e.hasOwnProperty("sha256Hash")?"object"==typeof e.sha256Hash?this._retrieveValueFromObject(e.sha256Hash):e.sha256Hash:void 0}_retrieve64BitString(e){const t=/\w{64}/.exec(e);return t?t[0]:void 0}constructor(e){this._site=e,this._rcid=null}}Vo=B([M(),j("design:type",Function),j("design:paramtypes",[void 0===ur?Object:ur])],Vo);class zo{constructor(e,t,i){this._optableConfig=e,this._user=t,this._hemSourceAllowlist=i,this.share=({blockGraphHem:e=!1,blockLiveIntentHem:t=!1}={})=>{if(this._hash=this._user.hash,this._source=this._user.source,!this._hash||!this._source)return!1;const i=!(!this._source||!bs({source:this._source}));var s;const n=null!=(s=i&&e)&&s,r=i&&!this._optableConfig.useOptableHem;return!n&&(!r&&((!fs(this._source)||!t)&&(!(!this._hash||!this._source)&&this._hemSourceAllowlist.checkSource(this._source))))}}}zo=B([D(),j("design:type",Function),j("design:paramtypes",[void 0===Fa?Object:Fa,void 0===Vo?Object:Vo,void 0===Ro?Object:Ro])],zo);const Ho=()=>Fs.readExternalLocalStorage("_pubcid"),$o=(e,t)=>{var i;return!(null==(i=e.subModule)?void 0:i.some((e=>e===t)))},qo=()=>{const e=Fs.readExternalCookie("panoramaId"),t=Fs.readExternalCookie("panoramaId_expiry");if(e&&t&&Number(t)>Date.now())return e;const i=Fs.readExternalLocalStorage("panoramaId"),s=Fs.readExternalLocalStorage("panoramaId_expiry");return i&&s&&Number(s)>Date.now()?i:null},Go=e=>{if(!e)return;let t;return"truedata.com"===e?t="t":"mediawallah.com"===e?t="m":"liveintent.com"===e&&(t="l"),t},Wo=new Map([["api",ms.VALUES.API],["comment",ms.VALUES.COMMENT],["cookies",ms.VALUES.COOKIE],["growme",ms.VALUES.GRWM],["localStorage",ms.VALUES.LOCAL_STORAGE],["newsletter",ms.VALUES.NEWSLETTER],["other",ms.VALUES.OTHER],["url",ms.VALUES.URL],["urlHashed",ms.VALUES.URLH],["identityIframe",ms.VALUES.IDENTITY_IFRAME],["slickstream",ms.VALUES.SLICKSTREAM]]),Ko=new Map([["truedata",ms.VALUES.TD],["mediawallah",ms.VALUES.MW]]);class Yo{constructor(e){this.collectionMethod="direct",this.type=e.type,this.sha256Hash=e.sha256Hash,this.sha1Hash=e.sha1Hash,this.collectionSiteId=e.collectionSiteId,this.collectionDate=e.collectionDate,this.collectionSource=e.collectionSource,this.iframe=e.iframe,this.directSource=e.directSource,this.directApiAttribution=e.directApiAttribution}}class Xo{constructor(e){this.collectionMethod="graph3p",this.type=e.type,this.sha256Hash=e.sha256Hash,this.sha1Hash=e.sha1Hash,this.alternateIds=e.alternateIds,this.collectionSiteId=e.collectionSiteId,this.collectionDate=e.collectionDate,this.collectionSource=e.collectionSource,this.iframe=e.iframe,this.graphSource=e.graphSource,this.graphTraits=e.graphTraits,this.bridgingMethod=e.bridgingMethod,this.bridgingValue=e.bridgingValue}}class Qo{constructor(e){this.collectionMethod="graph1p",this.type=e.type,this.sha256Hash=e.sha256Hash,this.sha1Hash=e.sha1Hash,this.alternateIds=e.alternateIds,this.collectionSiteId=e.collectionSiteId,this.collectionDate=e.collectionDate,this.collectionSource=e.collectionSource,this.iframe=e.iframe,this.bridgingMethod=e.bridgingMethod}}class Jo{constructor(e){this.collectionMethod="liveIntent",this.type=e.type,this.sha256Hash=e.sha256Hash,this.sha1Hash=e.sha1Hash,this.collectionSiteId=e.collectionSiteId,this.collectionDate=e.collectionDate,this.collectionSource=e.collectionSource,this.iframe=e.iframe,this.withUid2=e.withUid2}}const Zo=e=>e.includes(`${ms.PREFIXES.RAPTIVE_AUTH}${ms.VALUES.GPID}`)||e.includes(`${ms.PREFIXES.RAPTIVE_AUTH}${ms.VALUES.RCID}`)||e.includes(`${ms.PREFIXES.RAPTIVE_AUTH}${ms.VALUES.LPID}`)||e.includes(`${ms.PREFIXES.RAPTIVE_AUTH}${ms.VALUES.SHID}`),el=e=>e.includes(ms.VALUES.ID5ID)?"id5id":e.includes(ms.VALUES.PUBM)?"pubm":"unknown",tl=e=>e.includes(ms.VALUES.GPID)?"gpid":e.includes(ms.VALUES.RCID)?"rcid":e.includes(ms.VALUES.LPID)?"lpid":e.includes(ms.VALUES.SHID)?"shid":"unknown",il=e=>e.includes(ms.VALUES.TD)?"truedata":e.includes(ms.VALUES.MW)?"mediawallah":"unknown",sl=e=>"string"==typeof e&&e.trim().length>0,nl=()=>{const e=Fs.readExternalLocalStorage("__tamLIResolveResult");return e?JSON.parse(decodeURIComponent(e)):null};class rl{get enabled(){const e=!this._gpcConfig.gpcEnabled&&!this._ccpaConfig.userOptedOut;return!!this._optableConfig.enabled&&!!e}async start(){if(this.enabled){await Ha();try{const e=this._user.hash,t=this._user.source,i=!!e,s=null==t?void 0:t.includes(ms.PREFIXES.IDG),n=i&&t&&fs(t),r=i&&s,a=i&&!r;r||n?await this._resolveHemFromGraph({resolveRaptiveDCN:!0,resolveExternalSourceDCN:!1,storeNewHem:!0,storedHem:e}):a?await this._resolveHemFromGraph({resolveRaptiveDCN:!1,resolveExternalSourceDCN:!0,storeNewHem:!1,storedHem:e}):!i&&this._context.isFirstPageview&&await this._resolveHemFromGraph({resolveRaptiveDCN:!0,resolveExternalSourceDCN:!0,storeNewHem:!0,storedHem:e})}catch(e){W.error("OptableHemResolver","start",e)}finally{this._identityEventBus.optableWaterfallCompleted.emit()}}}async _resolveHemFromGraph(e){let t;const i=await this._user.getRcid();if(i&&i.value&&i.value.sharedId&&e.resolveRaptiveDCN&&(t=await this._resolveHemFromRaptiveDCN(i.value.sharedId,3,ms.VALUES.RCID)),!(null==t?void 0:t.hem)&&e.resolveRaptiveDCN){const e=Ho();e&&(t=await this._resolveHemFromRaptiveDCN(e,6,ms.VALUES.SHID))}const{gpid:s}=this._context;if(!(null==t?void 0:t.hem)&&s&&e.resolveRaptiveDCN&&this._gpidGraphBridgeExperiment.result&&(t=await this._resolveHemFromRaptiveDCN(s,0,ms.VALUES.GPID)),!(null==t?void 0:t.hem)&&e.resolveRaptiveDCN){const e=qo();e&&(t=await this._resolveHemFromRaptiveDCN(e,7,ms.VALUES.LPID))}if(!(null==t?void 0:t.hem)&&e.resolveExternalSourceDCN){var n;const{pubmatic:i}=null!=(n=nl())?n:{};i&&(t=await this._resolveHemFromThirdPartyDCN(e,"pubm","c1:"+i))}if(!(null==t?void 0:t.hem)&&e.resolveExternalSourceDCN){var r;const s=null!=(r=this._optableConfig.identifierOverride)?r:Gs(null==i?void 0:i.metadata.clientIp);t=await this._resolveHemFromThirdPartyDCN(e,"ip",s)}let a=!1;if(!hi()&&!ai()){await this._waitForIdentityIframeSync();const e=Fs.readInternalLocalStorage("adt_emsrc");a=!!e&&Es(e)}t&&e.storeNewHem&&!a&&this._emailCaptureHandler.emailCaptured.emit({pii:{sha256Hash:t.hem,source:t.source,sourceCollectedDate:is()},identityDataSource:Zo(t.source)?"raptiveDCN":"externalDCN"})}async _resolveHemFromRaptiveDCN(e,t,i){if(!sl(e))return void W.event("OptableHemResolver","_resolveHemFromRaptiveDCN","resolveId is not a string or empty",{resolveId:e});const s=await this._optableSdkWrapper.cid(e,t),n=await this._optableSdkWrapper.resolveRaptiveClusters(s);this._identityEventBus.optableRaptiveGraphResolved.emit(n);const r=n.sources.raptive.clusters.filter((e=>e.ids.includes(s)&&e.ids.some((e=>e.startsWith(us))))),a=r.reduce(((e,t)=>{const i=t.ids.filter((e=>e.startsWith(us)));return[...e,...i]}),[]),o=a[Math.floor(Math.random()*a.length)],l=null==o?void 0:o.substring(us.length);return l?{hem:l,source:`${ms.PREFIXES.RAPTIVE_AUTH}${i}${ms.SUFFIXES.CAPTURE}`}:void 0}async _resolveHemFromThirdPartyDCN(e,t,i){var s;const n=await this._optableSdkWrapper.resolveThirdPartyClusters(i);Fs.setInternalLocalStorage("adt_otpgrd",n),this._identityEventBus.optableThirdPartyGraphResolved.emit(n),this._optableConfig.loblawEnabled&&n.lmpid&&localStorage.setItem(_s.KEY,n.lmpid);const r=Math.floor(Date.now()/1e3)-7776e3,a=[...n.sources.truedata.clusters,...n.sources.mediawallah.clusters].sort(((e,t)=>t.traits.lastSeen-e.traits.lastSeen)),o=a.filter((e=>{const t=e.traits.lastSeen,i="percentile"in e.traits?e.traits.percentile:void 0;return t?t>=r:!!i&&i>=55})),l=o.reduce(((e,t)=>[...e,...t.ids.filter((e=>e.startsWith(us)))]),[]),d=n.sources.truedata.clusters.reduce(((e,t)=>[...e,...t.ids.filter((e=>e.startsWith(us)))]),[]);var c;l.length>0&&(this._optableStore.truedataHems=d);const h={clusterCount:o.length,hemCount:l.length,traits:null!=(c=null==(s=o[0])?void 0:s.traits)?c:{},accuracyResult:{status:"no-stored-hem"},recencyGroup:o[0]?qs(o[0].traits.lastSeen):"NA"};if(e.storedHem){const t=o.filter((t=>t.ids.some((t=>t.includes(e.storedHem))))),i=o.reduce(((e,i,s)=>t.includes(i)?s:e),-1);var u;if(-1!==i)h.accuracyResult={status:"hem-found",matchingClusterIndex:i},h.traits=(null==(u=o[i])?void 0:u.traits)||[];else h.accuracyResult={status:"no-stored-hem"};W.event("OptableHemResolver","_resolveHemFromExternalSourceDCN",h)}if(this._identityEventBus.optableResolved.emit(h),!l.length)return;if(!e.storeNewHem)return;if(!o.length||!l.length)return;const p=l[Math.floor(Math.random()*l.length)],g=us.length,m=null==p?void 0:p.substring(g);if(!sl(m))return void W.event("OptableHemResolver","_resolveHemFromExternalSourceDCN","Extracted HEM is not a string or empty",{hem:m});let _="truedata"===this._getHemSourceResolveResponseData(n,p)?ms.VALUES.TD:ms.VALUES.MW,f="";if(_){"pubm"===t&&(_=(e=>`${e}-${ms.VALUES.PUBM}`)(_)),f=`${ms.PREFIXES.IDG}${_}${ms.SUFFIXES.CAPTURE}`}return m&&f?{hem:m,source:f}:void 0}_getHemSourceResolveResponseData(e,t){for(const i of Object.keys(e.sources))for(const s of e.sources[i].clusters)if(s.ids.includes(t))return i;return null}_waitForIdentityIframeSync(){var e;const t=null!=(e=this._identityIframeSyncWaitExperiment.result)?e:0;return new Promise((e=>{const i=setTimeout((()=>{this._identityEventBus.iframeDataSynced.off(s),e()}),t),s=()=>{clearTimeout(i),this._identityEventBus.iframeDataSynced.off(s),e()};this._identityEventBus.iframeDataSynced.on(s,{handleEventsAlreadyEmitted:!0})}))}constructor(e,t,i,s,n,r,a,o,l,d,c){this._optableStore=e,this._gpcConfig=t,this._ccpaConfig=i,this._context=s,this._user=n,this._emailCaptureHandler=r,this._identityEventBus=a,this._optableSdkWrapper=o,this._gpidGraphBridgeExperiment=l,this._identityIframeSyncWaitExperiment=d,this._optableConfig=c}}rl=B([bn("OptableHemResolver"),M(),j("design:type",Function),j("design:paramtypes",[void 0===Io?Object:Io,void 0===ja?Object:ja,void 0===Na?Object:Na,void 0===Fr?Object:Fr,void 0===Vo?Object:Vo,void 0===ko?Object:ko,void 0===Qn?Object:Qn,void 0===Ra?Object:Ra,void 0===xo?Object:xo,void 0===Po?Object:Po,void 0===Fa?Object:Fa])],rl);class al{async load(){try{if(this._optableTimingData.bootstrapStarted=fn(),await this._checkAndInitSDK(),!this._optableConfig.enabled)return;if(this._gpcConfig.gpcEnabled||this._ccpaConfig.userOptedOut)return;this._optableTimingData.bootstrapFinished=fn()}catch(e){return void W.error("OptableBootstrap","load","Failed to bootstrap Optable SDK",e)}this._optableTimingData.resolveStarted=fn(),await this._optableHemResolver.start(),this._optableTimingData.resolveFinished=fn(),this._shouldLogTimingData()&&W.event("OptableBootstrap","load","Optable timing data",this._optableTimingData)}async _checkAndInitSDK(){this._optableConfig.enabled&&(this._gpcConfig.gpcEnabled||this._ccpaConfig.userOptedOut||await this._initOptableSDK())}_shouldLogTimingData(){return Math.random()>=.95}async _initOptableSDK(){var e;this._optableSdkWrapper.loaded()||await this._optableSdkWrapper.load(this._siteId,null!=(e=this._context.country)?e:"");this._optableTokenizeEndpointExperiment.result&&this._optableSdkWrapper.setDCNExperiments(["tokenize-v2"]),this._optableConfig.loblawEnabled&&(this._optableSdkWrapper.installGPTSecureSignals().catch((e=>{})),this._optableSdkWrapper.targeting().catch((e=>{})))}constructor(e,t,i,s,n,r,a,o){this._optableConfig=t,this._gpcConfig=i,this._ccpaConfig=s,this._optableSdkWrapper=n,this._optableTokenizeEndpointExperiment=r,this._context=a,this._optableHemResolver=o,this.type=Me.Optable,this.wait=!1,this._optableTimingData={},this._siteId="",this._siteId=e.siteAds.siteId}}al=B([bn("OptableBootstrap"),M(),F(0,L("AdThrive")),j("design:type",Function),j("design:paramtypes",["undefined"==typeof AdThrive?Object:AdThrive,void 0===Fa?Object:Fa,void 0===ja?Object:ja,void 0===Na?Object:Na,void 0===Ra?Object:Ra,void 0===Ua?Object:Ua,void 0===Fr?Object:Fr,void 0===rl?Object:rl])],al);class ol{async load(){return this._isGPTPreloaded?Promise.resolve(!0):(this.init(),Cs(this._url))}init(){window.googletag=window.googletag||{},window.googletag.cmd=window.googletag.cmd||[]}constructor({isGPTPreloaded:e}){this._url="https://securepubads.g.doubleclick.net/tag/js/gpt.js",this._isGPTPreloaded=e}}ol=B([bn("GAMBootstrap"),D(),j("design:type",Function),j("design:paramtypes",[void 0===ka?Object:ka])],ol);class ll extends br{init(){this._key="MarmaladeBootstrap",this._lookup="MTO"}run(){return super.run()}}ll=B([bn("MarmaladeBootstrapTimeoutExperiment"),M()],ll);class dl{setMarmaladeFinishedTimeout(e){this._marmaladeFinishedTimeout=e}async get(){if(window.adthrive.marmalade){const e=await window.adthrive.marmalade;return this._emitMarmaladeResponse(e),e}const e=new Promise((e=>{window.adthrive.marmaladeFinished=t=>(clearTimeout(this._timeoutId),e(t),t)})).then((e=>(this._emitMarmaladeResponse(e),e))),t=new Promise((e=>{this._timeoutId=window.setTimeout((()=>{const t=window.adthrive.marmalade||{};this._emitMarmaladeResponse(t),e(t)}),this._marmaladeFinishedTimeout)}));return Promise.race([e,t])}_emitMarmaladeResponse(e){e&&Object.keys(e).length>0&&this._eventBus.marmaladeResponseLoaded.emit(e)}constructor(e,t){this._eventBus=e,this._timeoutExp=t,this._marmaladeFinishedTimeout=this._timeoutExp.result?1e3*this._timeoutExp.result:3e3}}dl=B([bn("MarmaladeBootstrap"),D(),j("design:type",Function),j("design:paramtypes",[void 0===tr?Object:tr,void 0===ll?Object:ll])],dl);class cl{async load(){return this.init(),this._isPrebidPreloaded?"preloaded":await Cs(this._url)}init(){window.pbjs=window.pbjs||{},window.pbjs.que=window.pbjs.que||[]}constructor({baseUrl:e,targetPath:t,isPrebidPreloaded:i}){this.type=Me.Prebid,this.wait=!1,this._url=`${e}/vendor/prebid${t}/prebid.min.js`,this._isPrebidPreloaded=i}}cl=B([bn("PrebidBootstrap"),D(),j("design:type",Function),j("design:paramtypes",[void 0===ka?Object:ka])],cl);class hl extends br{init(){this._key="Floors",this._lookup="FLRML1"}run(){return super.run()}}B([kn(),j("design:type",Function),j("design:paramtypes",[]),j("design:returntype",void 0)],hl.prototype,"run",null),hl=B([bn("FloorsExperiment"),M()],hl);class ul{get result(){return this._result}_enableRaptiveFloors(){this._result.raptive=!0}_enableLegacyFloors(){this._result.legacy=!0}_getFloorsExperimentResults(){const e=this._floorsExperiment.result,t=e===Fe,i=e===je;return{cm:t,fbrap:i,rapML:e===Ne,enableLegacy:i||t}}_setExpResults({cm:e,fbrap:t}){const i=this._result;e&&(i.cm=e),t&&(i.fbrap=t)}run(){const e=this._getFloorsExperimentResults(),{enableLegacy:t,fbrap:i,rapML:s}=e;this._setExpResults(e),(s||i)&&this._enableRaptiveFloors(),t&&this._enableLegacyFloors()}constructor(e,t){this._floorsExperiment=e,this.abGroup=t,this._result={raptive:!1,legacy:!1,fbrap:!1,cm:!1,percentile:{lazy:0}},this.run()}}ul=B([bn("FloorsExperimentHandler"),M(),j("design:type",Function),j("design:paramtypes",[void 0===hl?Object:hl,void 0===pr?Object:pr])],ul);class pl{savePriorityFloorData(e,t,i){const s=this._floorsPriorityData.get(e);this._floorsPriorityData.set(e,{...s,[i]:t})}get os(){return this._os}set os(e){this._os=e}get browser(){return this._browser}set browser(e){this._browser=e}get country(){return this._country}set country(e){this._country=e}get raptiveMLFloorsLoaded(){return this._raptiveMLFloorsLoaded}get floorsData(){return this._floorsData}set floorsData(e){this._floorsData=e}get floorsExperiment(){return this._enabledFloorsExperiments.result}get activeFloorsData(){return this._floorsPriorityData}get cmPriority(){return this._fpv?this._cmFPVPriority:this._cmNonFPVPriority}get activeFloorsTypes(){return this._activeFloorsTypes}addActiveFloorsType(e){return this._activeFloorsTypes.push(e)}get customSchemaFields(){return this._customSchemaFields}getSchemaFieldOrder(e){return this._schemaFieldOrder.get(e)}get raptiveMLRefreshFloors(){return this._raptiveMLRefreshFloors}set raptiveMLRefreshFloors(e){this._raptiveMLRefreshFloors=e}get modelTimestamp(){return this._modelTimestamp}set modelTimestamp(e){this._modelTimestamp=e}setAdditionalSchemaFields(e){for(const t of e)if(this._schemaFieldOrder.set(t,e.indexOf(t)||0),!this._standardSchemaFields.has(t)){const e=this._customFieldsMap.get(t)||this._customFieldsMap.get("*");this._customSchemaFields[t]=e}}get defaultFloorData(){return this._defaultFloorData}constructor(e,t){this._enabledFloorsExperiments=e,this._bootstrapEventBus=t,this.floorsDataReady=new V,this.floorsTypeExcludes=new Set([Ve]),this.amazonSlotCpm=new Map,this._raptiveMLFloorsLoaded=!1,this._activeFloorsTypes=[],this._cmFPVPriority=[ze,$e,Ue,He],this._cmNonFPVPriority=[ze,$e,He,Ue],this._customFieldsMap=new Map([["hvp",e=>{var t,i,s;const n=null!=(s=null==(i=e.ortb2Imp.ext)||null==(t=i.data)?void 0:t.hvp)?s:0;return n?`${n}`:"*"}],["knownUser",()=>{const e=Fs.readInternalLocalStorage("adt_ei"),t=Fs.readInternalLocalStorage("adt_i");return e||t?"1":"*"}],["*",()=>"*"]]),this._customSchemaFields={},this._floorsPriorityData=new Map,this._schemaFieldOrder=new Map([["adUnitCode",1]]),this._standardSchemaFields=new Set(["size","mediaType","gptSlot","domain","adUnitCode"]),this._modelTimestamp=0,this._defaultFloorData={currency:"USD",schema:{fields:["domain","adUnitCode"],delimiter:"|"},values:{},modelWeight:100,modelVersion:""},this._fpv=!0===Fs.readInternalLocalStorage("adthrive_session_fpv")||null===Fs.readInternalLocalStorage("adthrive_session_fpv"),this.raptiveMLFloorsEventPromise=new Promise((e=>{this._floorsOffEvent=this._bootstrapEventBus.floorsLibraryLoadComplete.on((()=>{this._raptiveMLFloorsLoaded=!0,e(),null==this._floorsOffEvent||this._floorsOffEvent.call(this)}),{handleEventsAlreadyEmitted:!0})}))}}pl=B([M(),j("design:type",Function),j("design:paramtypes",[void 0===ul?Object:ul,void 0===qn?Object:qn])],pl);class gl extends br{init(){this._key="FloorBootstrap",this._lookup="FTO"}run(){return super.run()}}gl=B([bn("FloorsBootstrapTimeoutExperiment"),M()],gl);class ml{async _resolveFloorsData(e){const t=await e;return new Promise((e=>{if(t&&Object.keys(t).length){const{floors:s,refreshFloors:n,os:r,browser:a,country:o}=t;var i;this._floorsConfig.floorsData=s,this._floorsConfig.raptiveMLRefreshFloors=n,this._floorsConfig.modelTimestamp=null!=(i=s.modelTimestamp)?i:0,this._floorsConfig.floorsDataReady.emit(),this._floorsConfig.os=r,this._floorsConfig.browser=a,this._floorsConfig.country=o,e(s)}e({})}))}async load(){if(!this._isRaptive)return Promise.resolve({});const e=window.adthrive.additiveRaptiveFloors;if(e)return this._resolveFloorsData(e);const t=new Promise((e=>{window.adthrive.additiveRaptiveFloorsFinished=e})),i=new Promise((e=>{setTimeout((()=>{e({})}),this._floorsFinishedTimeout)}));return await Promise.race([t,i]),this._resolveFloorsData(window.adthrive.additiveRaptiveFloors)}constructor(e,t){this._floorsConfig=e,this._timeoutExp=t,this.type=Me.Floors,this.wait=!1,this._isRaptive=!1,this._floorsFinishedTimeout=this._timeoutExp.result?1e3*this._timeoutExp.result:3e3,this._isRaptive=this._floorsConfig.floorsExperiment.raptive}}ml=B([bn("FloorsBootstrap"),D(),j("design:type",Function),j("design:paramtypes",[void 0===pl?Object:pl,void 0===gl?Object:gl])],ml);class _l{async start(){this._ccpaConfig.enabled||(await this.addIframeToPage(),this._marmaladeEventBus.marmaladeResponseLoaded.on((e=>{const t=e.recencyFrequency;Array.isArray(t)&&t.length&&this.setMcmpData(t)}),{handleEventsAlreadyEmitted:!0}),this._ccpaConfig.consentChange.on((e=>{e===this._ccpaConfig.ccpaOptOut&&this.deleteMcmpData()})))}get recencyFrequencyIframeLocation(){return`${this._baseUrl}/html/rnf.html`}addIframeToPage(){let e;const t=new Promise((t=>{e=t}));this._frame.onload=()=>{e()};try{this._frame.src=this.recencyFrequencyIframeLocation,this._frame.id="adthrive-mcmp",this._frame.style.display="none",document.body.appendChild(this._frame)}catch(e){W.error("RecencyAndFrequencyIFrameManager","addIframeToPage","Failed to append rnf iframe to document",e)}return t}deleteMcmpData(){try{this._frame.contentWindow&&this._frame.contentWindow.postMessage({message:"deleteMcmpData"},this._host)}catch(e){W.error("RecencyAndFrequencyIFrameManager","deleteMcmpData","Failed to delete mcmp data",e)}}setMcmpData(e){try{this._frame.contentWindow&&(window.addEventListener("message",(e=>{const t=e.data,i=t.message;e.origin===this._host&&"mcmpDataResponse"===i&&this._marmaladeEventBus.recencyFrequencyDataSet.emit(t.mcmpData)})),this._frame.contentWindow.postMessage({message:"setMcmpData",mcmpData:e},this._host))}catch(e){W.error("RecencyAndFrequencyIFrameManager","setMcmpData","Failed to set mcmp data",e)}}constructor(e,t,i){this._bootstrapConfig=e,this._ccpaConfig=t,this._marmaladeEventBus=i,this._host=`https://${this._bootstrapConfig.host}`,this._baseUrl=this._bootstrapConfig.baseUrl,this._frame=document.createElement("iframe")}}_l=B([bn("RecencyAndFrequencyIFrameManager"),M(),j("design:type",Function),j("design:paramtypes",[void 0===ka?Object:ka,void 0===Na?Object:Na,void 0===tr?Object:tr])],_l);class fl extends Er{init(){this._key="TrafficShaping",this._lookup="TS",this._default=!1}}fl=B([bn("TrafficShapingExperiment"),M()],fl);const vl=e=>{const t={index:-1,weight:-1};if(!e||0===e.length)return t;const i=e.reduce(((e,t)=>e+t),0);if(0===i)return t;const s=Math.random()*i;let n=0,r=e[n];for(;s>r;)r+=e[++n];return{index:n,weight:e[n]}};class yl{setupData(e){var t;this._shapingData=e,this._setTrafficShapingModelGroup(e),this.modelVersion=null==(t=this._modelGroup)?void 0:t.modelVersion,this.active=this._checkData()}_checkData(){return!!(this.experimentActive&&this._shapingData&&this._modelGroup&&this.modelVersion)}_setTrafficShapingModelGroup(e){var t;const i=null==(t=e.shaping)?void 0:t.modelGroups.map((e=>e.modelWeight));if(i){const{index:t}=vl(i);this._modelGroup=e.shaping.modelGroups[t]}}get trafficShapingLoaded(){return this._trafficShapingLoaded}get modelVersion(){return this._modelVersion}set modelVersion(e){this._modelVersion=e}getTrafficShapingRule(e,t){var i,s,n,r,a;if(!(null==(i=this._modelGroup)?void 0:i.values.length))return;const o=this._modelGroup.values[0],l=e[0],d=`${t}`,c="*";var h,u,p;return null!=(p=null!=(u=null!=(h=null==(s=o[l])?void 0:s[d])?h:null==(n=o[l])?void 0:n[c])?u:null==(r=o[c])?void 0:r[d])?p:null==(a=o[c])?void 0:a[c]}constructor(e,t){this.trafficShapingExperiment=e,this._bootstrapEventBus=t,this.experimentActive=!1,this.active=!1,this._trafficShapingLoaded=!1,this.experimentActive=this.trafficShapingExperiment.result,this.trafficShapingEventPromise=new Promise((e=>{this._trafficShapingOffEvent=this._bootstrapEventBus.trafficShapingLibraryLoadComplete.on((()=>{this._trafficShapingLoaded=!0,e(),null==this._trafficShapingOffEvent||this._trafficShapingOffEvent.call(this)}),{handleEventsAlreadyEmitted:!0})}))}}yl=B([M(),j("design:type",Function),j("design:paramtypes",[void 0===fl?Object:fl,void 0===qn?Object:qn])],yl);class bl{async _resolveTrafficShapingData(e){const t=await e;return new Promise((e=>{var i,s,n;(null==t?void 0:t.trafficShaping)&&(null==t||null==(n=t.trafficShaping)||null==(s=n.shaping)||null==(i=s.modelGroups)?void 0:i.length)?(this.trafficShaping.setupData(t.trafficShaping),e(t)):e({})}))}async load(){if(!this.trafficShapingDeliveryFeatureEnabled||!this.trafficShaping.experimentActive)return Promise.resolve({});const e=window.adthrive.trafficShaping;if(e)return this._resolveTrafficShapingData(e);const t=new Promise((e=>{window.adthrive.trafficShapingFinished=e})),i=new Promise((e=>{setTimeout((()=>{e({})}),this.timeout)}));return await Promise.race([t,i]),this._resolveTrafficShapingData(window.adthrive.trafficShaping)}constructor(e,t){var i,s;this.trafficShaping=t,this.type=Me.TrafficShaping,this.wait=!1,this.timeout=3e3,this.trafficShapingDeliveryFeatureEnabled=!1,this.trafficShapingDeliveryFeatureEnabled=null!=(s=null==(i=e.deliveryFeatures)?void 0:i.includes("trafficShaping"))&&s}}bl=B([bn("TrafficShapingBootstrap"),D(),F(0,L("AdThrive")),j("design:type",Function),j("design:paramtypes",["undefined"==typeof AdThrive?Object:AdThrive,void 0===yl?Object:yl])],bl);class Sl{async run(){let e;this.loadNonBlockingLibraries();const t=e=this._run((()=>this._marmalade.get()),Be.Marmalade),i=this._run((()=>this._gam.load()),Be.GAM,{required:!0}).catch((t=>this.gamFallback(t&&t.result,e))),s=this._user.getRcid();return Promise.all([i,t,Ti(),s]).then((([e,t])=>({gam:e,marmalade:t})))}loadNonBlockingLibraries(){[this._prebid,this._amazon,this._optable,this._floors,this._trafficShaping].forEach((e=>{this._run((()=>{const t=e.type;return this._bootstrapConfig.bootstrapLoaders[e.type]=e.load().then((()=>{this._bootstrapEventBus[`${t}LibraryLoadComplete`].emit()})).catch((i=>{throw this._bootstrapEventBus[`${t}LibraryLoadComplete`].emit(),this._bootstrapEventBus.libraryLoadFailed.emit({bootstrapType:e.type}),new Error(i)}))}),e.type,{wait:e.wait}).catch((()=>!1))}))}gamFallback(e,t){return this._bootstrapConfig.gptLibFailedToLoad=!0,this._bootstrapConfig.webVitalsEnabled||(this._bootstrapConfig.webVitalsEnabled=!0),t.then((t=>Promise.reject({message:e,marmalade:t})))}_run(e,t,{required:i=!1,wait:s=!0}={}){const n=fn(),r=e=>{const i=fn(),s={result:e,started:n,finished:i,duration:i-n};return this._bootstrapConfig.bootstrapResult.set(t,s),s},a=e().then(r,(e=>(W.error("Bootstrap","_start error",t,e),i?Promise.reject(r(e.message)):r(e.message))));return s?a:Promise.resolve(r(!0))}constructor(e,t,i,s,n,r,a,o,l,d){this._bootstrapConfig=e,this._user=t,this._bootstrapEventBus=i,this._amazon=s,this._optable=n,this._gam=r,this._marmalade=a,this._prebid=o,this._floors=l,this._trafficShaping=d;R.resolve(_l).start().catch((e=>{W.error("Bootstrap","constructor","Failed to start RecencyAndFrequencyIFrameManager",e)}))}}Sl=B([D(),j("design:type",Function),j("design:paramtypes",[void 0===ka?Object:ka,void 0===Vo?Object:Vo,void 0===qn?Object:qn,void 0===Aa?Object:Aa,void 0===al?Object:al,void 0===ol?Object:ol,void 0===dl?Object:dl,void 0===cl?Object:cl,void 0===ml?Object:ml,void 0===bl?Object:bl])],Sl);class El extends br{init(){this._key="AmazonFailsafeTimeout",this._lookup="AMZFS"}}El=B([bn("AmazonFailsafeTimeoutExperiment"),M()],El);class Cl{getEncryptedTargetingKeys(e={dealKeys:!1,nonDealKeys:!1}){return e.dealKeys?this._amznEncryptedTargetingKeys.filter((e=>e.includes("_sp"))).concat("amzndeal_sp"):e.nonDealKeys?this._amznEncryptedTargetingKeys.filter((e=>!e.includes("_sp"))):this._amznEncryptedTargetingKeys}constructor(e,t,i){this.pubId="4fbba76f-7987-4fa2-9733-c27eb3a2170b",this.adUnitExclusions=new Set([Qe.Interstitial]),this.amznTargetingKeys=[],this.advertiserId=4526447244,this.availableBids=new Map,this._amznDecryptedTargetingKeys=["amz_pb","amz_bidder","amz_pb_sp","amz_bidder_sp"],this._amznEncryptedTargetingKeys=["amznbid","amzniid","amznp","amznsz","mediaType","amznbid_sp","amzniid_sp","amznp_sp","amznsz_sp","mediaType_sp"];const s=t.amazonEnabled;this.enabled=s&&!0===e.siteAds.adOptions.amazonUAM,this.amznTargetingKeys=["amzndeal_sp",...this._amznEncryptedTargetingKeys,...this._amznDecryptedTargetingKeys],this.failsafeTimeout=i.result||1e3}}Cl=B([M(),F(0,L("AdThrive")),j("design:type",Function),j("design:paramtypes",["undefined"==typeof AdThrive?Object:AdThrive,void 0===ka?Object:ka,void 0===El?Object:El])],Cl);class Tl{get enabled(){return!!this._clsGlobalData&&!!this._clsGlobalData.siteAds&&mn(this._clsGlobalData.siteAds)}get error(){return!(!this._clsGlobalData||!this._clsGlobalData.error)}set siteAds(e){this._clsGlobalData.siteAds=e}get siteAds(){return this._clsGlobalData.siteAds}set disableAds(e){this._clsGlobalData.disableAds=e}get disableAds(){return this._clsGlobalData.disableAds}set enabledLocations(e){this._clsGlobalData.enabledLocations=e}get enabledLocations(){return this._clsGlobalData.enabledLocations}get injectedFromPlugin(){return this._clsGlobalData.injectedFromPlugin}set injectedFromPlugin(e){this._clsGlobalData.injectedFromPlugin=e}get injectedFromSiteAds(){return this._clsGlobalData.injectedFromSiteAds}set injectedFromSiteAds(e){this._clsGlobalData.injectedFromSiteAds=e}overwriteInjectedSlots(e){this._clsGlobalData.injectedSlots=e}setInjectedSlots(e){this._clsGlobalData.injectedSlots=this._clsGlobalData.injectedSlots||[],this._clsGlobalData.injectedSlots.push(e)}get injectedSlots(){return this._clsGlobalData.injectedSlots}setInjectedVideoSlots(e){this._clsGlobalData.injectedVideoSlots=this._clsGlobalData.injectedVideoSlots||[],this._clsGlobalData.injectedVideoSlots.push(e)}get injectedVideoSlots(){return this._clsGlobalData.injectedVideoSlots}setInjectedScripts(e){this._clsGlobalData.injectedScripts=this._clsGlobalData.injectedScripts||[],this._clsGlobalData.injectedScripts.push(e)}get getInjectedScripts(){return this._clsGlobalData.injectedScripts}setExperiment(e,t,i=!1){this._clsGlobalData.experiments=this._clsGlobalData.experiments||{},this._clsGlobalData.siteExperiments=this._clsGlobalData.siteExperiments||{};(i?this._clsGlobalData.siteExperiments:this._clsGlobalData.experiments)[e]=t}getExperiment(e,t=!1){const i=t?this._clsGlobalData.siteExperiments:this._clsGlobalData.experiments;return i&&i[e]}setWeightedChoiceExperiment(e,t,i=!1){this._clsGlobalData.experimentsWeightedChoice=this._clsGlobalData.experimentsWeightedChoice||{},this._clsGlobalData.siteExperimentsWeightedChoice=this._clsGlobalData.siteExperimentsWeightedChoice||{};(i?this._clsGlobalData.siteExperimentsWeightedChoice:this._clsGlobalData.experimentsWeightedChoice)[e]=t}getWeightedChoiceExperiment(e,t=!1){var i,s;const n=t?null==(i=this._clsGlobalData)?void 0:i.siteExperimentsWeightedChoice:null==(s=this._clsGlobalData)?void 0:s.experimentsWeightedChoice;return n&&n[e]}get branch(){return this._clsGlobalData.branch}get bucket(){return this._clsGlobalData.bucket}set videoDisabledFromPlugin(e){this._clsGlobalData.videoDisabledFromPlugin=e}get videoDisabledFromPlugin(){return this._clsGlobalData.videoDisabledFromPlugin}set targetDensityLog(e){this._clsGlobalData.targetDensityLog=e}get targetDensityLog(){return this._clsGlobalData.targetDensityLog}get removeVideoTitleWrapper(){return this._clsGlobalData.siteAds.adOptions.removeVideoTitleWrapper}constructor(){this._clsGlobalData=Wi()}}const wl=250;class kl{get enabled(){return this._clsOptimizedAds||this._clsOptions.enabled&&(this._clsOptions.injectedFromPlugin||this._clsOptions.injectedFromSiteAds)}getDivHeight(e,t){const i=this._map.get(t);return i&&i[e]||this._defaultHeight}setStyle(e,t){if(t===Qe.Footer||this.enabled&&this._map.get(this._context.device)[t]){e.classList.add("adthrive-ad-cls");(t===Qe.Header||t===Qe.Footer)&&e.classList.add(`adthrive-${t.toLowerCase()}-${this._context.device}`)}}constructor(e,t,i,s){if(this._context=t,this._abgroup=i,this._clsOptions=s,this._defaultHeight=wl,this._map=new Map([["phone",{Content:wl,Recipe:wl,Header:50,Footer:50,Below_Post:wl,Sidebar:wl}],["tablet",{Content:wl,Recipe:wl,Header:90,Footer:90,Below_Post:wl,Sidebar:wl}],["desktop",{Content:wl,Recipe:wl,Header:90,Footer:90,Below_Post:wl,Sidebar:wl}]]),this._clsOptimizedAds=e.siteAds.adOptions.clsOptimizedAds,this._clsOptions.enabled){const e="clsins_ss",t=this._clsOptions.getExperiment(e);t&&this._abgroup.set(e,String(t));["cls-insertion","cls-header-insertion","cls-disable-ads"].filter((e=>{if(this._clsOptions.branch){const t="script[id^="+`${e}-${this._clsOptions.branch}`+"]";return document.querySelectorAll(t).length>0}return!1})).forEach((e=>this._clsOptions.setInjectedScripts(e)))}}}kl=B([M(),F(0,L("AdThrive")),j("design:type",Function),j("design:paramtypes",["undefined"==typeof AdThrive?Object:AdThrive,void 0===Fr?Object:Fr,void 0===pr?Object:pr,void 0===Tl?Object:Tl])],kl);class Al{constructor(e,t){this._footerConfigEventBus=t,this.tracker=!0,this.gdpr=!1,this._footerMessages=new Map([["FamilyParenting","CafeMedia Family & Parenting"],["Finance","CafeMedia Finance"],["Food","CafeMedia Food"],["General","CafeMedia"],["HomeDIY","CafeMedia Home/DIY"],["Lifestyle","CafeMedia Lifestyle"],["Pets","CafeMedia Pets"],["Tech","CafeMedia Tech"],["Travel","CafeMedia Travel"]]);const{comscore:i,comscoreFooter:s}=e.siteAds.adOptions;this.category=Si(i,"General"),this.comscore=Si(s,!0),this.comscoreMessage=Si(this._footerMessages.get(this.category),"CafeMedia"),this._footerConfigEventBus.comscoreInitialized.emit(this.comscore)}}Al=B([M(),F(0,L("AdThrive")),j("design:type",Function),j("design:paramtypes",["undefined"==typeof AdThrive?Object:AdThrive,void 0===Xn?Object:Xn])],Al);class Il{removeClsDivs(e){if(!this._clsOptions.enabled)return;const t=this._clsOptions.injectedSlots.filter((t=>{const i=t.element;let s=!1;return i.parentNode&&e.some((e=>i.classList.contains(e)))&&(i.parentNode.removeChild(i),s=!0),!s}));this._clsOptions.overwriteInjectedSlots(t)}disableAllAds(e){e&&!cn(e)||(this.all=!0,this.reasons.add("all_page"),this.removeClsDivs(this._clsDivs),this._emit()),this._log("disableAllAds")}disableContentAds(e){e&&!cn(e)||(this.content=!0,this.recipe=!0,this.locations.add(Qe.Content),this.locations.add(Qe.Recipe),this.reasons.add("content_page"),this.removeClsDivs(["adthrive-content","adthrive-recipe"])),this._log("disableContentAds")}disablePlaylistPlayers(e){e&&!cn(e)||(this.video=!0,this.locations.add("Video"),this.reasons.add("video_page"),this.adthrive.siteAds.videoPlayers?this._removeCLSVideoPlayers():this._removeLegacyCLSVideoPlayers()),this._log("disablePlaylistPlayers")}_removeCLSVideoPlayers(){var e;null==(e=this.adthrive.siteAds.videoPlayers)||e.players.filter((e=>"stickyPlaylist"===e.type)).map((e=>document.querySelectorAll(`#cls-video-container-${e.playlistId}`))).forEach((e=>{for(let i=0;i{(this.urlHasEmail(window.location.href)||this.urlHasEmail(window.document.referrer))&&(this.all=!0,this.reasons.add("all_email"),this.removeClsDivs(this._clsDivs));try{document.body.classList.contains("adthrive-disable-all")&&(this.all=!0,this.reasons.add("all_plugin")),document.body.classList.contains("adthrive-disable-content")&&(this.content=!0,this.recipe=!0,this.locations.add(Qe.Content),this.locations.add(Qe.Recipe),this.reasons.add("content_plugin")),null!==document.querySelector(".tag-novideo")&&(this.video=!0,this.locations.add("Video"),this.reasons.add("video_tag")),document.body.classList.contains("adthrive-disable-video")&&(this.video=!0,this.locations.add("Video"),this.reasons.add("video_plugin"))}catch(e){W.error("DisableAds","constructor",{message:e.message});const t="classList"in document.createElement("_");W.error("BodyDeviceClassComponent","init.support",{support:t});const i="classList"in document.body;W.error("BodyDeviceClassComponent","init.supportBody",{supportBody:i})}this.reasons.size>0&&this._emit(),this._log("init")},this.clear=()=>{this.all=!1,this.content=!1,this.recipe=!1,this.video=!1,this.locations=new Set,this.reasons=new Set},this._log=e=>{},this.init()}}Il=B([M(),F(0,L("AdThrive")),j("design:type",Function),j("design:paramtypes",["undefined"==typeof AdThrive?Object:AdThrive,void 0===Tl?Object:Tl])],Il);class xl extends vr{init(){this._setAbGroup=!1,this._key="DisplayOpenBidderExperiment",this._lookup="DOBA",this._default=["none"]}}xl=B([bn("DisplayOpenBidderExperiment"),M()],xl);class Pl{constructor(e){this.bidders=e.result||["none"]}}Pl=B([M(),j("design:type",Function),j("design:paramtypes",[void 0===xl?Object:xl])],Pl);class Ol extends Un{get result(){return this._result}run(){return new zn(this.weight).get()}constructor(e,t){var i;super(),this._abgroup=t,this._result=!1,this.key="ParallaxAdsExperiment",this.lookup="PARALLAX",this.abgroup="parallax",this._choices=[{choice:!0},{choice:!1}],this.weight=0,this.shouldUseCoreOverride=!1;const s=window.adthriveCLS,n=s&&s.experiments,r=null==e||null==(i=e.siteAds)?void 0:i.adTypes,a=!!Ki()&&(null==r?void 0:r.largeFormatsMobile);n&&this.abgroup in n?(this._result=n[this.abgroup],this._abgroup.set(this.abgroup,this._result?"on":"off")):a&&(this._result=this.run(),this._abgroup.set(this.abgroup,this._result?"on":"off"))}}Ol=B([M(),bn("ParallaxAdsExperiment"),F(0,L("AdThrive")),j("design:type",Function),j("design:paramtypes",["undefined"==typeof AdThrive?Object:AdThrive,void 0===pr?Object:pr])],Ol);class Rl extends Un{get result(){return this._result}run(){return new zn(this.weight).get()}constructor(e,t,i){var s,n;super(),this._result=!0,this.key="AdvancePlaylistRelated",this.lookup="RVADV_AB1",this._choices=[{choice:!0},{choice:!1}],this.weight=1;const r=e.siteAds,a=r.adOptions.advancePlaylistOptions||{},o=r.videoPlayers;var l;const d=null!=(l=null==o||null==(s=o.players)?void 0:s.filter((e=>"stickyPlaylist"===e.type)))?l:[],c=i.getCoreExperimentButMutateWeights(this.key,this.lookup);if(c&&d.length&&Si(null==(n=a.relatedPlayer)?void 0:n.enabled,!0)){this._expConfigABGroup=c.abgroup;const e=c.variants[0];this.weight=e.weight,this._result=this.run(),t.set(c.abgroup,this._result?"on":"off")}}}B([kn(),j("design:type",Function),j("design:paramtypes",[]),j("design:returntype",void 0)],Rl.prototype,"run",null),Rl=B([bn("AdvancePlaylistRelatedExperiment"),M(),F(0,L("AdThrive")),j("design:type",Function),j("design:paramtypes",["undefined"==typeof AdThrive?Object:AdThrive,void 0===pr?Object:pr,void 0===mr?Object:mr])],Rl);class Ll extends br{init(){this._key="AdvancePlaylistDelay",this._lookup="ADVD"}}Ll=B([bn("AdvancePlaylistDelayExperiment"),M()],Ll);class Dl extends br{init(){this._key="AdDurationControl",this._lookup="ADC"}}Dl=B([bn("AdDurationControlExperiment"),M()],Dl);class Ml extends br{init(){this._key="RaptivePlayerBackBufferLength",this._lookup="RPBBL"}}Ml=B([bn("BackBufferLengthExperiment"),M()],Ml);class Bl extends Er{init(){this._key="ContentSpecificPlaylists",this._lookup="CSP",this._default=!1}}Bl=B([bn("ContentSpecificPlaylistExperiment"),M()],Bl);class Fl extends br{init(){this._key="RaptivePlayerFrontBufferThreshold",this._lookup="RPFBT"}}Fl=B([bn("FrontBufferThresholdExperiment"),M()],Fl);class jl extends br{init(){this._key="InstreamCreativeFailureThreshold",this._lookup="ICFT"}}jl=B([bn("InstreamCreativeFailureThresholdExperiment"),M()],jl);class Nl extends br{init(){this._key="InstreamRerequestOnError2",this._lookup="IROE2"}}Nl=B([bn("InstreamRerequestOnErrorExperiment"),M()],Nl);class Ul extends Er{init(){this._key="JwBoost",this._lookup="JWB",this._default=!1}run(){return super.run()}}B([kn(),j("design:type",Function),j("design:paramtypes",[]),j("design:returntype",void 0)],Ul.prototype,"run",null),Ul=B([bn("JwBoostExperiment"),M()],Ul);class Vl extends br{init(){this._key="JwRequestTimeout",this._lookup="REQTO"}run(){return super.run()}}B([kn(),j("design:type",Function),j("design:paramtypes",[]),j("design:returntype",void 0)],Vl.prototype,"run",null),Vl=B([bn("JwRequestTimeoutExperiment"),M()],Vl);class zl extends br{init(){this._key="JWPVersionExperiment",this._lookup="JWPV"}}zl=B([bn("JWPVersionExperiment"),M()],zl);class Hl extends Er{init(){this._key="LogAdDuration",this._lookup="ADDUR",this._default=!1}}Hl=B([bn("LogAdDurationExperiment"),M()],Hl);class $l extends Er{init(){this._key="LogAdLifeCycle",this._lookup="ADLIFECYC",this._default=!1}}$l=B([bn("LogAdLifeCycleExperiment"),M()],$l);class ql extends br{init(){this._key="IMABitrate",this._lookup="IMABR"}}ql=B([bn("MaxBitrateExperiment"),M()],ql);class Gl extends br{init(){this._key="RaptivePlayerMaxBufferLength",this._lookup="RPMBL"}}Gl=B([bn("MaxBufferLengthExperiment"),M()],Gl);class Wl extends br{init(){this._key="RaptivePlayerMaxBufferSize",this._lookup="RPMBS"}}Wl=B([bn("MaxBufferSizeExperiment"),M()],Wl);class Kl extends br{init(){this._key="RaptivePlayerMaxMaxBufferLength",this._lookup="RPMMBL"}}Kl=B([bn("MaxMaxBufferLengthExperiment"),M()],Kl);class Yl extends Er{init(){this._default=!1,this._key="MaxMaxBufferReset",this._lookup="MMBR"}}Yl=B([bn("MaxMaxBufferResetExperiment"),M()],Yl);class Xl extends Er{init(){this._key="MidrollBugFixExperiment",this._lookup="MRBF",this._default=!1}}Xl=B([bn("MidrollBugFixExperiment"),M()],Xl);class Ql extends br{init(){this._key="VideoCollapsedLocations",this._lookup="SPLTV2"}get mobileLocation(){if(this.result&&"off"!==this.result)return this.locationMap[this.result]}constructor(...e){super(...e),this.locationMap={tc:"top-center",bl:"bottom-left",br:"bottom-right"}}}Ql=B([bn("MobileStickyPlayerPositionCoreExperiment"),M()],Ql);class Jl extends lr{run(){return super.run()}setExperimentTargeting(){if(!this.enabled||!this.experimentConfig||!this._isValidResult(this._result))return void W.error("MobileStickyPlayerPositionSiteExperiment","setExperimentTargeting","() => %o","Experiment targeting requires an experiment config and valid result");const e=`${this.experimentConfig.key.toLowerCase()}-${this.experimentConfig.id}`,t=`${this._result}`;this._pubabgroup.set(e,t)}_mapChoices(){return this._choices.map((({weight:e,value:t})=>({weight:e,choice:String(t)})))}constructor(e,t){super(),this._siteExperiments=e,this._pubabgroup=t,this._positions=["bottom-left","bottom-right","bottom-center","top-left","top-right","top-center"],this._choices=[],this._mappedChoices=[],this._resultValidator=e=>this._positions.includes(e),this._result="control",this.key=Xe.MobileStickyPlayerPosition,this.experimentConfig=this._siteExperiments.getSiteExperimentByKey(this.key),this.enabled&&this.experimentConfig&&(this._choices=this.experimentConfig.variants,this._mappedChoices=this._mapChoices(),this._result=this.run(),this.setExperimentTargeting())}}B([kn(),j("design:type",Function),j("design:paramtypes",[]),j("design:returntype",void 0)],Jl.prototype,"run",null),Jl=B([M(),j("design:type",Function),j("design:paramtypes",[void 0===cr?Object:cr,void 0===gr?Object:gr])],Jl);class Zl extends br{init(){this._key="OutstreamCreativeFailureThreshold",this._lookup="OCFT"}}Zl=B([bn("OutstreamCreativeFailureThresholdExperiment"),M()],Zl);class ed extends br{init(){this._key="OutstreamPlacementExperiment",this._lookup="OSP"}run(){return super.run()}}ed=B([bn("OutstreamPlacementExperiment"),M()],ed);class td extends Un{get result(){return this._result}run(){return new zn(this.weight).get()}constructor(e,t){super(),this._result=!0,this.key="Playbackmethod",this.lookup="PBM",this._choices=[{choice:!0},{choice:!1}],this._map=new Map([[et.Video_In_Post_ClicktoPlay_SoundOn,[3]],[et.Video_Collapse_Autoplay_SoundOff,[6]],[et.Video_Coll_SOff_Smartphone,[6]],[et.Video_Individual_Autoplay_SOff,[6]]]),this.weight=1;const i=t.getCoreExperimentButMutateWeights(this.key,this.lookup);if(i){this._expConfigABGroup=i.abgroup;const t=i.variants[0];this.weight=t.weight,this._result=this.run(),this.playbackmethod=this._result?this._map:void 0,e.set(i.abgroup,this._result?"on":"off")}}}B([kn(),j("design:type",Function),j("design:paramtypes",[]),j("design:returntype",void 0)],td.prototype,"run",null),td=B([bn("PlaybackmethodExperiment"),M(),j("design:type",Function),j("design:paramtypes",[void 0===pr?Object:pr,void 0===mr?Object:mr])],td);class id extends Er{init(){this._key="PlaylistFix",this._lookup="PLFX",this._default=!1}run(){return super.run()}}id=B([bn("PlaylistFixExperiment"),M()],id);class sd extends br{init(){this._key="Protocols",this._lookup="PROTO"}setABGroup(){if(this._result){var e;let t=-1;null==(e=this._choices)||e.forEach((e=>{var i;e.choice.value===(null==(i=this._result)?void 0:i.value)&&(t=e.weight)})),super.setABGroup(this._result.value,this.abgroup,t)}}run(){return super.run()}}B([kn(),j("design:type",Function),j("design:paramtypes",[]),j("design:returntype",void 0)],sd.prototype,"run",null),sd=B([bn("ProtocolsExperiment"),M()],sd);class nd extends Er{init(){this._key="RaptivePlayerDesktop",this._lookup="RPD",this._default=!1}isEnabled(){const e=Ur.isRolloutEnabled("drp");return super.isEnabled()&&!e}}nd=B([bn("RaptiveDesktopPlayerExperiment"),M()],nd);class rd extends br{init(){this._key="RaptiveInstreamRerequestOnError",this._lookup="RIROE"}}rd=B([bn("RaptiveInstreamRerequestOnErrorExperiment"),M()],rd);class ad extends Er{init(){const e=Ur.isRolloutEnabled("erp"),t=Ur.isRolloutEnabled("drp");this._key="RaptivePlayerMobile",this._lookup="RPM",this._default=e&&!t}isEnabled(){const e=Ur.isRolloutEnabled("erp"),t=Ur.isRolloutEnabled("drp");return super.isEnabled()&&!t&&!e}}ad=B([bn("RaptiveMobilePlayerExperiment"),M()],ad);class od extends br{init(){this._key="RaptiveTearDownPlayer",this._lookup="RPTD"}}od=B([bn("RaptiveTearDownPlayerExperiment"),M()],od);class ld extends Er{init(){this._key="RaptivePlayerOverride",this._lookup="RP",this._default=!1}}ld=B([bn("RaptivePlayerOverride"),M()],ld);class dd extends br{init(){this._key="RaptivePlayerStaleLoadThreshold",this._lookup="RPSLT"}}dd=B([bn("RaptivePlayerStaleLoadThresholdExperiment"),M()],dd);class cd extends or{run(){const e=this._choices[0].weight/100;return new zn(e).get()}setExperimentTargeting(){if(!this.enabled||!this.experimentConfig)return void W.error("RemoveVideoTitleWrapperSiteExperiment","setExperimentTargeting","() => %o","Experiment targeting requires an experiment config");const e=`${this.experimentConfig.key.toLowerCase()}-${this.experimentConfig.id}`,t=this._result?"on":"off";this._pubabgroup.set(e,t)}constructor(e,t){super(),this._siteExperiments=e,this._pubabgroup=t,this._choices=[],this._result=!1,this.key=Xe.RemoveVideoTitleWrapper,this.experimentConfig=this._siteExperiments.getSiteExperimentByKey(this.key),this.enabled&&this.experimentConfig&&(this._choices=this.experimentConfig.variants,this._result=this.run(),this.setExperimentTargeting())}}B([kn(),j("design:type",Function),j("design:paramtypes",[]),j("design:returntype",void 0)],cd.prototype,"run",null),cd=B([M(),j("design:type",Function),j("design:paramtypes",[void 0===cr?Object:cr,void 0===gr?Object:gr])],cd);class hd extends br{init(){this._key="staleBufferTime",this._lookup="RPSPDBT"}run(){return super.run()}}hd=B([bn("RPStalePlayerBufferTimeExperiment"),M()],hd);class ud extends Er{init(){this._default=!1,this._key="DisplayBackupRenderer",this._lookup="DOFRE"}}ud=B([bn("StandardOutstreamBackupRendererExperiment"),M()],ud);class pd extends br{init(){this._key="StickyOutstreamCloseButtonTimeout",this._lookup="SOCBDE"}run(){return super.run()}constructor(...e){super(...e),this.abgroup="socbde"}}B([kn(),j("design:type",Function),j("design:paramtypes",[]),j("design:returntype",void 0)],pd.prototype,"run",null),pd=B([bn("StickyOutstreamCloseButtonTimeoutExperiment"),M()],pd);class gd extends Er{init(){this._key="StickyOutstreamFooterCollision",this._lookup="SOFC",this._default=!1}}gd=B([bn("StickyOutstreamFooterCollisionExperiment"),M()],gd);class md extends or{run(){const e=this._choices[0].weight/100;return new zn(e).get()}setExperimentTargeting(){if(!this.enabled||!this.experimentConfig)return void W.error("StickyOutstreamSiteExperiment","setExperimentTargeting","() => %o","Experiment targeting requires an experiment config");const e=`${this.experimentConfig.key.toLowerCase()}-${this.experimentConfig.id}`,t=this._result?"on":"off";this._pubabgroup.set(e,t)}constructor(e,t){super(),this._siteExperiments=e,this._pubabgroup=t,this._choices=[],this._result=!1,this.key=Xe.StickyOutstream,this.experimentConfig=this._siteExperiments.getSiteExperimentByKey(this.key),this.enabled&&this.experimentConfig&&(this._choices=this.experimentConfig.variants,this._result=this.run(),this.setExperimentTargeting())}}B([kn(),j("design:type",Function),j("design:paramtypes",[]),j("design:returntype",void 0)],md.prototype,"run",null),md=B([M(),j("design:type",Function),j("design:paramtypes",[void 0===cr?Object:cr,void 0===gr?Object:gr])],md);class _d extends br{init(){this._key="TearDownPlayer",this._lookup="MGTDTW"}}_d=B([bn("TearDownPlayerExperiment"),M()],_d);class fd extends br{init(){this._key="VastTimeoutISV",this._lookup="VASTTOISV"}run(){return super.run()}}fd=B([bn("VastTimeoutISVExperiment"),M()],fd);class vd extends br{init(){this._key="VastTimeoutOSV",this._lookup="VASTTOOSV"}run(){return super.run()}}vd=B([bn("VastTimeoutOSVExperiment"),M()],vd);class yd extends or{run(){const e=this._choices[0].weight/100;return new zn(e).get()}setExperimentTargeting(){if(!this.enabled||!this.experimentConfig)return void W.error("VideoAdvancePlaylistRelatedPlayerSiteExperiment","setExperimentTargeting","() => %o","Experiment targeting requires an experiment config");const e=`${this.experimentConfig.key.toLowerCase()}-${this.experimentConfig.id}`,t=this._result?"on":"off";this._pubabgroup.set(e,t)}constructor(e,t){super(),this._siteExperiments=e,this._pubabgroup=t,this._choices=[],this._result=!1,this.key=Xe.VideoAdvancePlaylistRelatedPlayer,this.experimentConfig=this._siteExperiments.getSiteExperimentByKey(this.key);const i=this._siteExperiments.getVideoPlaylistByType("stickyPlaylist");this.enabled&&this.experimentConfig&&i.length>0&&(this._choices=this.experimentConfig.variants,this._result=this.run(),this.setExperimentTargeting())}}B([kn(),j("design:type",Function),j("design:paramtypes",[]),j("design:returntype",void 0)],yd.prototype,"run",null),yd=B([M(),j("design:type",Function),j("design:paramtypes",[void 0===cr?Object:cr,void 0===gr?Object:gr])],yd);class bd extends Er{init(){this._key="VideoAuctionDurationFallbackExperiment",this._lookup="VADF",this._default=!1}}bd=B([bn("VideoAuctionDurationFallbackExperiment"),M()],bd);class Sd extends br{init(){this._key="VideoCollapseScrollUpTopCenter",this._lookup="COSUFTC"}isEnabled(){return super.isEnabled()&&Ki()}run(){return super.run()}}B([kn(),j("design:type",Function),j("design:paramtypes",[]),j("design:returntype",void 0)],Sd.prototype,"run",null),Sd=B([bn("VideoCollapseScrollUpTopCenterExperiment"),M()],Sd);class Ed extends Er{init(){this._key="VideoCollapseScrollUp",this._lookup="VCSU",this._default=!1}isEnabled(){return super.isEnabled()&&!Ki()}run(){return super.run()}}B([kn(),j("design:type",Function),j("design:paramtypes",[]),j("design:returntype",void 0)],Ed.prototype,"run",null),Ed=B([bn("VideoCollapseScrollUpExperiment"),M()],Ed);class Cd extends br{init(){this._key="VideoDuration",this._lookup="VMAXDUR"}constructor(...e){super(...e),this.abgroup="vmaxdur"}}Cd=B([bn("VideoMaxDurationExperiment"),M()],Cd);class Td extends Er{init(){this._key="RaptivePlayerEnablePreloading",this._lookup="RPEP",this._default=!0}}Td=B([bn("EnablePreloadingExperiment"),M()],Td);class wd{setupStickyOutstreamSettings(e){const t=e.siteAds.video&&e.siteAds.video.partners&&e.siteAds.video.partners.stickyOutstream,i=this._adthriveSiteAds.videoPlayers&&this._adthriveSiteAds.videoPlayers.partners&&this._adthriveSiteAds.videoPlayers.partners.stickyOutstream,s=t||i,n=(e=>{const{tablet:t,desktop:i}=e.siteAds.breakpoints,s=Ci(t,i),n=e.siteAds,r=n.video&&n.video.partners&&n.video.partners.stickyOutstream,a=n.videoPlayers&&n.videoPlayers.partners&&n.videoPlayers.partners.stickyOutstream,o=r||a,l=e.siteAds.adOptions,d=o||l&&l.stickyOutstream;return!(!d||!("phone"===s?d.mobile.enabled:d.desktop.enabled))})(e);if(this._stickyOutstreamSiteExperiment.enabled?this._stickyOutstreamSiteExperiment.result:n){this._stickyOutstreamEnabled=!0;const e={...this._adUnitSettingTemplate};e.sticky=!0,e.location=Qe.Video_StickyOutstream,e.position="beforeend",e.pageSelector=Si(s&&s.blockedPageSelectors,""),e.sizes="phone"===this._device?[[300,50]]:[[300,250]],this._stickyOutstreamSettingTemplate=e}}setupInterstitialSettings(){const e={...this._adUnitSettingTemplate},t=this._adthriveOptions;e.location=Qe.Interstitial,e.sizes=this.interstitalSupportedSizes(),e.pageSelector=Si(t.interstitialBlockedPageSelectors,""),this._interstitialSettingTemplate=e}get(){this._adUnits.sort(((e,t)=>{const i=e.location===Qe.Sidebar&&e.sticky?`${e.location}_sticky`:e.location,s=t.location===Qe.Sidebar&&t.sticky?`${t.location}_sticky`:t.location;return this._adUnitAuctionPriorityMap.get(i)-this._adUnitAuctionPriorityMap.get(s)}));const e=this._parallaxAdsExperiment.result,t=this._adUnits.filter((e=>void 0!==e.dynamic&&e.dynamic.enabled)).map((t=>{const i=t.location.replace(/\s+/g,"_"),s="Sidebar"===i?0:2;return{auctionPriority:this._adUnitAuctionPriorityMap.get(i)||8,location:i,sequence:Si(t.sequence,1),sizes:this.onlySupportedAdSizes(t.adSizes).filter((e=>this.includeCertainTallSizes(t,e))).concat(e&&t.location===Qe.Content?this._tallMobileContentAdsizes:[]),devices:t.devices,pageSelector:Si(t.dynamic.pageSelector,"").trim(),elementSelector:Si(t.dynamic.elementSelector,"").trim(),position:Si(t.dynamic.position,"beforebegin"),max:Math.floor(Si(t.dynamic.max,0)),spacing:Si(t.dynamic.spacing,0),skip:Math.floor(Si(t.dynamic.skip,0)),every:Math.max(Math.floor(Si(t.dynamic.every,1)),1),classNames:t.dynamic.classNames||[],sticky:this.isStickyUnit(t,this._adthriveSiteAds.adOptions.stickyContainerConfig),stickyOverlapSelector:Si(t.stickyOverlapSelector,"").trim(),autosize:t.autosize,special:Si(t.targeting,[]).filter((e=>"special"===e.key)).reduce(((e,t)=>e.concat(...t.value)),[]),lazy:Si(t.dynamic.lazy,!1),lazyMax:Si(t.dynamic.lazyMax,s),lazyMaxDefaulted:0!==t.dynamic.lazyMax&&!t.dynamic.lazyMax,name:t.name}}));return this._stickyOutstreamEnabled&&this._stickyOutstreamSettingTemplate&&t.push(this._stickyOutstreamSettingTemplate),this._adOptions.interstitial.gam&&this._interstitialSettingTemplate&&t.push(this._interstitialSettingTemplate),t}onlySupportedAdSizes(e){return this._supportedSizes.filter((([t,i])=>e.some((([e,s])=>t===e&&i===s))))}interstitalSupportedSizes(){return this._interstitialSupportedSizes.filter((([e,t])=>"phone"===this._device||"320,50"!=`${e},${t}`))}includeCertainTallSizes(e,[t,i]){const{location:s,sequence:n}=e;if(s===Qe.Footer)return!("phone"===this._device&&320===t&&100===i);if(s===Qe.Header)return!0;if(s===Qe.Recipe)return!(Ki()&&"phone"===this._device&&(300===t&&390===i||320===t&&300===i));if(s===Qe.Sidebar){const t=e.adSizes.some((([,e])=>e<=300)),s=i>300;return!(!s||t)||(9===n||(!!n&&n<=5?!s||e.sticky:!s))}return!0}constructor(e,t,i,s){this._adOptions=t,this._stickyOutstreamSiteExperiment=i,this._parallaxAdsExperiment=s,this._stickyOutstreamEnabled=!1,this._supportedSizes=[[728,90],[300,250],[300,600],[320,50],[970,250],[160,600],[300,1050],[336,280],[970,90],[300,50],[320,100],[468,60],[250,250],[120,240],[1,1],[300,300],[552,334],[300,420],[728,250],[320,300],[300,390]],this._tallMobileContentAdsizes=[[300,600],[160,600]],this._interstitialSupportedSizes=[[320,50],[300,250],[300,600],[336,280],[320,480],[1,1]],this._adUnitAuctionPriorityMap=new Map([[Qe.Footer,1],[Qe.Header,2],[Qe.Sidebar,3],[Qe.Content,4],[Qe.Recipe,5],["Sidebar_sticky",6],["Below Post",7]]),this._adUnitSettingTemplate={auctionPriority:8,autosize:!0,classNames:[],devices:["tablet","phone","desktop"],elementSelector:"body",every:1,lazy:!1,lazyMax:0,lazyMaxDefaulted:!1,location:"",max:1,pageSelector:"",position:"beforebegin",sequence:1,sizes:[],skip:0,spacing:0,special:[],sticky:!1,stickyOverlapSelector:"",name:""},this.isStickyUnit=(e,t)=>{const{location:i,sticky:s}=e;if(i===Qe.Recipe&&t){const{recipeMobile:e,recipeDesktop:i}=t;if(Ki()&&(null==e?void 0:e.enabled))return!0;if(!Ki()&&(null==i?void 0:i.enabled))return!0}return i===Qe.Footer||s};const{tablet:n,desktop:r}=e.siteAds.breakpoints;this._device=Ci(n,r),this._adthriveSiteAds=e.siteAds,this._adthriveOptions=this._adthriveSiteAds.adOptions,this._adUnits=e.siteAds.adUnits,this.setupStickyOutstreamSettings(e),this.setupInterstitialSettings()}}wd=B([D(),F(0,L("AdThrive")),j("design:type",Function),j("design:paramtypes",["undefined"==typeof AdThrive?Object:AdThrive,void 0===_a?Object:_a,void 0===md?Object:md,void 0===Ol?Object:Ol])],wd);class kd extends Er{init(){this._key="FledgeGPT",this._lookup="FLDG",this._default=!1,this._autorun=!1}}kd=B([bn("FledgeGPTExperiment"),M()],kd);class Ad extends Er{init(){this._key="PaapiExperiment",this._lookup="PAAPI",this._default=!1}}Ad=B([bn("PaapiExperiment"),M()],Ad);class Id{get supported(){return this._supported}get enabled(){return this._enabled}get cookieDeprecationLabel(){return this._cookieDeprecationLabel}_isFledgeEnabled(){if(!this._supported)return!1;if(!this._paapiExperiment.result)return!1;var e;const t=(e=>{const t=Object.keys(fi).find((t=>e===t||e.startsWith(t)));return fi[null!=t?t:"none"]})((null!=(e=this._cookieDeprecationLabel)?e:"").replace("fake_",""));return"enabled"===t||"disabled"!==t&&this._fledgeGptExperiment.result}constructor(e,t,i){var s;this._paapiExperiment=t,this._fledgeGptExperiment=i,this._cookieDeprecationLabel=null!=(s=e.cookieDeprecationLabel)?s:null,this._supported=((e=window.document,t=window.navigator)=>!!t.joinAdInterestGroup&&!!e.featurePolicy&&e.featurePolicy.allowsFeature("join-ad-interest-group")&&e.featurePolicy.allowsFeature("run-ad-auction"))(),this._enabled=this._isFledgeEnabled()}}Id=B([M(),F(0,L("AdThrive")),j("design:type",Function),j("design:paramtypes",["undefined"==typeof AdThrive?Object:AdThrive,void 0===Ad?Object:Ad,void 0===kd?Object:kd])],Id);class xd{constructor(){this.elements=[],this.footerSelectorsForHeightCheck=["div[data-gg-moat]",".kargo-ad-content",".adthrive-footer",".sprkflw_main.sprkflw_default",".ogy-footer-ad",".raptive-sales-footer"]}}xd=B([M()],xd);class Pd extends vr{init(){this._key="HBHO2",this._lookup="HBHO2",this._default=["none"]}}Pd=B([bn("HBHOExperiment"),M()],Pd);class Od extends Er{init(){this._key="HBHORise",this._lookup="HBHORISE",this._default=!1}}Od=B([bn("HBHORiseExperiment"),M()],Od);class Rd extends vr{init(){this._key="AllBidderHO",this._lookup="ALLBHO",this.abgroup="allbho",this._default=["none"]}get result(){var e;return null!=(e=this._result)?e:this._default}}Rd=B([bn("AllBidderHOExperiment"),M()],Rd);const Ld=["none"];class Dd{_getFilteredBidders(e){const t=e.filter((e=>this._fullyDisabledBiddersMapping.includes(e)));return t}constructor(e,t,i){var s;this.hbhoExperiment=e,this.allBidderHOExperiment=t,this.hbhoRiseExperiment=i,this.bidders=[],this._fullyDisabledBiddersMapping=[];const n=null!=(s=this.hbhoExperiment.result)?s:[],r=this.allBidderHOExperiment.result;this.hbhoRiseExperiment.result&&n.push(te.Rise),this.bidders=[...n,...r].filter(((e,t,i)=>"none"!==e&&i.indexOf(e)===t)),0===this.bidders.length&&(this.bidders=Ld),this.filteredBidders=this._getFilteredBidders(this.bidders)}}Dd=B([M(),j("design:type",Function),j("design:paramtypes",[void 0===Pd?Object:Pd,void 0===Rd?Object:Rd,void 0===Od?Object:Od])],Dd);class Md extends vr{init(){this._key="IDHO",this._lookup="IDHO",this._default=["none"]}setABGroup(e,t){const i=this._coreExperimentConfig.getCoreExperiment(this.key,this.lookup);if(i&&Array.isArray(e)){const s=e.map((e=>`${e}`));this.abgroupClass.set(t||i.abgroup,s)}}}Md=B([bn("IDHOExperiment"),M()],Md);class Bd{constructor(e){this.subModule=e.result;const t=e._choices;this.percentages=null==t?void 0:t.map((e=>`${e.choice}:${"number"==typeof e.weight?e.weight:0}`))}}Bd=B([M(),j("design:type",Function),j("design:paramtypes",[void 0===Md?Object:Md])],Bd);class Fd{constructor(){this.refreshSlots=new Set(["Footer"]),this.ajaxType=!1}}Fd=B([M()],Fd);class jd{constructor(e){this._id="69e75073-3763-483e-a64c-0d281bfd9225",this.url=`https://launchpad-wrapper.privacymanager.io/${this._id}/launchpad-liveramp.js`,this.enabled=Si(e.siteAds.adOptions.liveRampATS,!0)}}jd=B([M(),F(0,L("AdThrive")),j("design:type",Function),j("design:paramtypes",["undefined"==typeof AdThrive?Object:AdThrive])],jd);class Nd{get targetingValue(){return this.isNewZealand()?"nz":this.isUnitedStates()?"us":this.isUnitedKingdom()?"uk":this.isCanada()?"ca":this.isGDPR()?"gdpr":"o"}isNewZealand(){return"NZ"===this.country}isUnitedStates(){return"US"===this.country}isUnitedKingdom(){if(!this.country)return!1;return["UK","GB","IM","GG","JE","GI","FK"].includes(this.country)}isCanada(){return"CA"===this.country}isGDPR(){return!!this.country&&"true"===this.gdpr}constructor(e){var t,i,s,n;this.country=null==e||null==(i=e.core)||null==(t=i.country)?void 0:t.toUpperCase(),this.region=null==e||null==(n=e.core)||null==(s=n.region)?void 0:s.toUpperCase(),this.tz=Intl.DateTimeFormat().resolvedOptions().timeZone,this.gdpr=null==e?void 0:e.gdpr}}Nd=B([M(),F(0,L("AdThrive")),j("design:type",Function),j("design:paramtypes",["undefined"==typeof AdThrive?Object:AdThrive])],Nd);const Ud={AS:{location:"Sponsor_Tile",selectors:["h1.entry-title","h1.post-title","h1.posttitle","h1.story-title","h1.heading",".post > .post-title","h1.tdb-title-text","h1.post_title"],size:[[300,55],[234,60]],position:"afterend",classNames:["adthrive-sponsor-tile"],find:e=>document.querySelector(e),requireSelectorMatch:!0,lazy:!1},NR:{location:"Native_Recipe",sequence:1,selectors:['[itemscope][itemtype$="//schema.org/Recipe"] [itemprop="recipeIngredient"]:last-child','[itemscope][itemtype$="//schema.org/Recipe"] [itemprop="ingredients"]:last-child','[itemscope][itemtype$="//schema.org/Recipe"] .ingredient:last-child',".wprm-recipe-ingredient:last-child","#recipe .ingredients",".wprm-recipe-ingredients-container",".tasty-recipe-ingredients",'[class*="recipe"] [class*="ingredient"] ul li:last-child','[class*="create-ingredient"] ul li:last-child','[class*="tasty-recipe"] [class*="ingredient"] p:last-child',"[class*=recipe] [class*=recipe] ~ p + ul li:last-child"],size:[[225,65],[234,60],[300,100]],position:"afterend",classNames:["adthrive-native-recipe"],find:e=>{const t=document.querySelectorAll(e);return t.length>0?t[t.length-1]:null},requireSelectorMatch:!1,lazy:!0}},Vd=["AAOSL_21","AFAM_2020","AFOI_2020","APIO_2022","ASOI_2022","BIPOC_2024","CMINO_2022","EXPFTR_24","FMLO_2021","FMOOI_2022","GENZ_2023","HISP_2023","HISPO_2022","INTSCR_24","LGBTOI_2022","LGBTQ_2021","MINO_2021","MOMS_2020","MRLOI_22","NWPR_2021","PKDSU12_24","RMOI_24","STKCONT_24","TGNAF_21"],zd=["AAOSL_21","AFAM_2020","AFOI_2020","APIO_2022","ASOI_2022","CMINO_2022","FMLO_2021","FMOOI_2022","GENZ_2023","HISP_2023","HISPO_2022","LGBTQ_2021","LGBTQOI_2021","MINO_2021","MOMS_2020","MRLOI_22","NWPR_2021","PKDSU12_2021","RMOI_24","TGNAF_21"];class Hd{_setMarmaladeData(e,t){var i;this.loaded=!0;const{host:s,page:n,adViewability:r,dcsllSiteSpecific:a}=e;if(s&&s.length&&(this.siteCodes=(s[0].site_codes||[]).filter(Mi),this.filteredSiteCodes=this.siteCodes.filter((e=>this._bidderSiteCodeList.includes(e))),this.filteredRoadblockSiteCodes=this.siteCodes.filter((e=>this._appnexusRoadblockSiteCodeList.includes(e)))),n&&n.length){const e=n[0].campaigns||[];this.campaigns=e.filter(this._activeCampaign)}r&&r.length&&(this.adViewability=r),a&&(this.dcsllSiteSpecific=a);const o=null==(i=window.location.hostname)?void 0:i.replace("www.","");this._targetCampaignSites.has(o)&&(this.adUnits.NR.lazy=!1),this._targetCampaignSites.has(o)&&document.body.classList.contains("single-post")&&!this.campaigns.some((e=>"NR_TNFLK23"===e.dfp_id))&&this.campaigns.push({casale_id:"NR_TNFLK23",dfp_id:"NR_TNFLK23",expiration_date:"2026-12-31",ingredient_line:"",internal_id:"NR_TNFLK23",lead_ingredient:"",start_date:"2023-08-15"});const l=this._getMcmpFlpIds();this.mcmp=l.mcmp||[],this.flpProdIds=l.flpProdIds||[],this.ortbSegments=this._getOrtbSegments(),t.recencyFrequencyDataSet.on(this._handleRecencyFrequencyDataSet.bind(this),{handleEventsAlreadyEmitted:!0})}_getOrtbSegments(){return this.campaigns.reduce(((e,t)=>{const i=new RegExp(/(^iab(a|c))_(\d*)/),[,s,,n]=i.exec(t.dfp_id)||[];if(n){const t=e.get(s)||[];t.push({id:n}),s&&t.length&&e.set(s,t)}return e}),new Map)}_handleRecencyFrequencyDataSet(e){e.forEach((e=>{const t=e[0],i=e[1];if("_A"===t.substring(t.length-2))this.rfMcmpCodes.push([t,i]);else{const e=t.substring(t.indexOf("_")+1);this.ortbSegments.set("iaba",[{id:e}]),this.rfIabCodes.push([t,i])}})),this.rfDataProcessed.emit()}_isValidMarmaladeCampaign(e){const t=e.dfp_id.substring(0,2),i=this.adUnits[t];if(i){const e=i.find(((e,t)=>(t.inRecipeRecommendationSelectors?t.inRecipeRecommendationSelectors.split(",").map((e=>e.trim())):void 0)||e.selectors)(i,this._adTypes).join(","));return e&&this.selectorMatches.push({adUnit:i,match:e}),!i.requireSelectorMatch||!!e}return!0}_getMcmpFlpIds(){return this.campaigns.filter((e=>this._isValidMarmaladeCampaign(e))).reduce(((e,t)=>(e.mcmp.push(t.dfp_id),t.flp_prod_id&&e.flpProdIds.push(...JSON.parse(t.flp_prod_id)),e)),{mcmp:[],flpProdIds:[]})}_parseDate(e){const t=e.split("-");return new Date(Number(t[0]),Number(t[1])-1,Number(t[2]))}constructor(e,t,i){this._adTypes=i,this.loaded=!1,this.campaigns=[],this.filteredRoadblockSiteCodes=[],this.filteredSiteCodes=[],this.siteCodes=[],this.adViewability=[],this.speed=navigator.connection&&"4g"===navigator.connection.effectiveType?"1":"0",this.adUnits=Ud,this.selectorMatches=[],this.ortbSegments=new Map,this.rfMcmpCodes=[],this.rfIabCodes=[],this.rfDataProcessed=new V,this.hvThreshold=.6,this.mcmp=[],this.mcmpTargeting=[],this.flpProdIds=[],this._targetCampaignSites=new Set(["divascancook.com","hungryhappens.net","whatsgabycooking.com","pinchofyum.com","isabeleats.com"]),this._bidderSiteCodeList=Vd,this._appnexusRoadblockSiteCodeList=zd,this._activeCampaign=e=>{const t=Date.now();return t>=this._parseDate(e.start_date).getTime()&&t<=this._parseDate(e.expiration_date).getTime()},e&&Object.keys(e).length>0?this._setMarmaladeData(e,t):t.marmaladeResponseLoaded.once((e=>{this._setMarmaladeData(e,t),t.resetMarmaladeData.emit()}))}}Hd=B([M(),F(0,L("RecencyFrequencyMarmaladeResponse")),j("design:type",Function),j("design:paramtypes",["undefined"==typeof RecencyFrequencyMarmaladeResponse?Object:RecencyFrequencyMarmaladeResponse,void 0===tr?Object:tr,void 0===Ca?Object:Ca])],Hd);const $d=e=>{const t=e.substring(13).split(".").map((e=>parseInt(e)));return{major:t[0],minor:t[1],patch:t[2]}};class qd{isEnabled(){const e=window,t=e.adthrive&&e.adthrive.plugin,i=e.adthriveCLS,s=i&&i.experiments,n=!(!s||!("clsins_ss"in s))||!(!t||!((e,t)=>{const i=$d(e),s=$d(t);return!(i.major>s.major)&&(i.majors.minor)&&(i.minors.patch)&&(i.patch<=s.patch||void 0)))})("adthrive-ads-1.1.0",t));return!!(this.settings&&this._adDensityEnabled&&n)}constructor(e){this.settings=e.siteAds.adDensityLayout,this._adDensityEnabled=Si(e.siteAds.adDensityEnabled,!0),this.enabled=this.isEnabled()}}qd=B([M(),F(0,L("AdThrive")),j("design:type",Function),j("design:paramtypes",["undefined"==typeof AdThrive?Object:AdThrive])],qd);class Gd extends br{init(){const e=R.resolve(Fr),{key:t,lookupKey:i}=(e=>{const t=(e=>{const t=e.downlink;return void 0===t?"unknown":t<10?"slow":"fast"})(e);if("desktop"===e.device)switch(t){case"fast":return{key:"InitialTimeoutDesktopFastExperiment",lookupKey:"ITO_DF"};case"slow":return{key:"InitialTimeoutDesktopSlowExperiment",lookupKey:"ITO_DS"};case"unknown":return{key:"InitialTimeoutDesktopUnknownExperiment",lookupKey:"ITO_DN"}}else switch(t){case"fast":return{key:"InitialTimeoutMobileFastExperiment",lookupKey:"ITO_MF"};case"slow":return{key:"InitialTimeoutMobileSlowExperiment",lookupKey:"ITO_MS"};case"unknown":return{key:"InitialTimeoutMobileUnknownExperiment",lookupKey:"ITO_MN"}}})(e);this._key=t,this._lookup=i}}Gd=B([bn("InitialTimeoutExperiment"),M()],Gd);class Wd{constructor(e){var t;this.initialBidsRequest=null!=(t=e.result)?t:2400,this.refreshBidsRequest=5e3}}Wd=B([M(),j("design:type",Function),j("design:paramtypes",[void 0===Gd?Object:Gd])],Wd);class Kd{set(e){this._data={...this._data,...e}}get(){return 0!==Object.keys(this._data).length?this._data:void 0}getByKey(e){return this._data[e]}clear(){this.set({})}constructor(){this._data={}}}Kd=B([bn("UserPageDataLoggingStore"),M()],Kd);class Yd{_executeCallback(e){e(),this._callbacks.delete(e),0===this._callbacks.size&&this.logUserPageData()}setUserPageData(e){e&&this._userPageDataLoggingStore.set(e)}logUserPageData(){this._requestSent||(W.fetchEvent("UserPageDataLoggingComponent","logUserData",this._userPageDataLoggingStore.get()),this._requestSent=!0,this.cleanup())}addCallbackToQueue(e,t){this._callbacks.add(t),e.forEach((e=>{this._listeners.push(e.on((()=>this._executeCallback(t))))}))}cleanup(){this._listeners.forEach((e=>{e()})),this._listeners=[],this._callbacks.clear()}constructor(e){this._userPageDataLoggingStore=e,this.loggingData=new V,this._maxTimeOnPage=36e5,this._listeners=[],this._callbacks=new Set,this._requestSent=!1,setTimeout((()=>{this._callbacks.forEach((e=>this._executeCallback(e))),this.cleanup()}),this._maxTimeOnPage)}}Yd=B([bn("UserPageDataLoggingEvents"),M(),j("design:type",Function),j("design:paramtypes",[void 0===Kd?Object:Kd])],Yd);class Xd{setNonBlockingLibraryTimingData(e){const t=e.get(Be.Prebid),i=e.get(Be.Amazon),s=e.get(Be.Optable);this._setPrebidTimingData(t),this._setAmazonTimingData(i),this._setOptableTimingData(s)}_setPrebidTimingData(e){this.prebidStarted=e&&e.started||0,this.prebidFinished=e&&e.finished||0,this.prebidDuration=e&&e.started&&e.finished&&e.finished-e.started||0}_setAmazonTimingData(e){this.amazonStarted=e&&e.started||0,this.amazonFinished=e&&e.finished||0,this.amazonDuration=e&&e.started&&e.finished&&e.finished-e.started||0}_setOptableTimingData(e){this.optableStarted=e&&e.started||0,this.optableFinished=e&&e.finished||0,this.optableDuration=e&&e.started&&e.finished&&e.finished-e.started||0}get timingData(){return{started:this.started,delay:this.delay,loading:this.loading,totalTimeOnPage:this.totalTimeOnPage,bootstrapFinished:this.bootstrapFinished,amazonStarted:this.amazonStarted,amazonFinished:this.amazonFinished,amazonDuration:this.amazonDuration,gamStarted:this.gamStarted,gamFinished:this.gamFinished,gamDuration:this.gamDuration,marmaladeStarted:this.marmaladeStarted,marmaladeFinished:this.marmaladeFinished,marmaladeDuration:this.marmaladeDuration,floorsStarted:this.floorsStarted,floorsFinished:this.floorsFinished,floorsDuration:this.floorsDuration,prebidStarted:this.prebidStarted,prebidFinished:this.prebidFinished,prebidDuration:this.prebidDuration,optableStarted:this.optableStarted,optableFinished:this.optableFinished,optableDuration:this.optableDuration,...this.timeOnPage&&{timeOnPage:this.timeOnPage}}}documentVisibilityChanged(){"visible"===document.visibilityState?this.timeOnPage=fn():"hidden"===document.visibilityState&&(this.totalTimeOnPage+=fn()-this.timeOnPage,this.timeOnPage=void 0)}constructor(e,t){this._pageManager=t,this.started=0,this.delay=0,this.loading=0,this.totalTimeOnPage=0,this.bootstrapFinished=0,this.amazonStarted=0,this.amazonFinished=0,this.amazonDuration=0,this.gamStarted=0,this.gamFinished=0,this.gamDuration=0,this.marmaladeStarted=0,this.marmaladeFinished=0,this.marmaladeDuration=0,this.floorsStarted=0,this.floorsFinished=0,this.floorsDuration=0,this.prebidStarted=0,this.prebidFinished=0,this.prebidDuration=0,this.optableStarted=0,this.optableFinished=0,this.optableDuration=0,this.started=fn(),"visible"===document.visibilityState&&(this.timeOnPage=this.started),this._pageManager.visibilityChange.on((()=>this.documentVisibilityChanged())),e.loggingData.on((()=>{"visible"===document.visibilityState&&(this.totalTimeOnPage+=fn()-this.timeOnPage)}))}}Xd=B([M(),j("design:type",Function),j("design:paramtypes",[void 0===Yd?Object:Yd,void 0===Mr?Object:Mr])],Xd);class Qd extends vr{init(){this._key="TKHO",this._lookup="TKHO_2",this._default=["none"]}}Qd=B([bn("TKHOExperiment"),M()],Qd);class Jd{constructor(e){var t;this.tracker=null!=(t=e.result)?t:["none"]}}Jd=B([M(),j("design:type",Function),j("design:paramtypes",[void 0===Qd?Object:Qd])],Jd);class Zd extends vr{init(){this._key="VBHO2",this._lookup="VBHO2",this._default=["none"]}}Zd=B([bn("VBHOExperiment"),M()],Zd);class ec extends Er{init(){this._key="VBHORise",this._lookup="VBHORISE",this._default=!1}}ec=B([bn("VBHORiseExperiment"),M()],ec);const tc=["none"];class ic{_getFilteredBidders(e){const t=e.filter((e=>this._fullyDisabledBiddersMapping.includes(e)));return t}constructor(e,t,i){var s;this.vbhoExperiment=e,this.allBidderHOExperiment=t,this.vbhoRiseExperiment=i,this._fullyDisabledBiddersMapping=[];const n=null!=(s=this.vbhoExperiment.result)?s:[],r=this.allBidderHOExperiment.result;this.vbhoRiseExperiment.result&&n.push(te.Rise),this.bidders=[...n,...r].filter(((e,t,i)=>"none"!==e&&i.indexOf(e)===t)),0===this.bidders.length&&(this.bidders=tc),this.filteredBidders=this._getFilteredBidders(this.bidders)}}ic=B([M(),j("design:type",Function),j("design:paramtypes",[void 0===Zd?Object:Zd,void 0===Rd?Object:Rd,void 0===ec?Object:ec])],ic);class sc{static getScrollTop(){return(window.pageYOffset||document.documentElement.scrollTop)-(document.documentElement.clientTop||0)}static getScrollBottom(){return this.getScrollTop()+(document.documentElement.clientHeight||0)}static shufflePlaylist(e){let t,i,s=e.length;for(;0!==s;)i=Math.floor(Math.random()*e.length),s-=1,t=e[s],e[s]=e[i],e[i]=t;return e}static isMobileLandscape(){return window.matchMedia("(orientation: landscape) and (max-height: 480px)").matches}static playerViewable(e){const t=e.getBoundingClientRect();return this.isMobileLandscape()?window.innerHeight>t.top+t.height/2&&t.top+t.height/2>0:window.innerHeight>t.top+t.height/2}static createQueryString(e){return Object.keys(e).map((t=>`${t}=${e[t]}`)).join("&")}static createEncodedQueryString(e){return Object.keys(e).map((t=>`${t}=${encodeURIComponent(e[t])}`)).join("&")}static setMobileLocation(e){return"top-left"===(e=e||"bottom-right")?e="adthrive-collapse-top-left":"top-right"===e?e="adthrive-collapse-top-right":"bottom-left"===e?e="adthrive-collapse-bottom-left":"bottom-right"===e?e="adthrive-collapse-bottom-right":"top-center"===e&&(e=Ki()?"adthrive-collapse-top-center":"adthrive-collapse-bottom-right"),e}static addMaxResolutionQueryParam(e){const t=`max_resolution=${Ki()?"320":"1280"}`,[i,s]=String(e).split("?");return`${i}?${s?s+`&${t}`:t}`}}const nc=e=>{const t=[],i=[],s=(()=>{const e=un(".adthrive-content-specific-playlist");return e.valid&&e.elements&&e.elements.length?{playlistId:e.elements[0].getAttribute("data-playlist-id"),shuffle:Boolean(e.elements[0].getAttribute("data-playlist-shuffle"))}:null})();if(s&&s.playlistId)return s;e.forEach((e=>{if(e.isDraft)return;e.categories.some((e=>{const t=un(`.adthrive-cat-${e}`);return t.valid&&t.elements&&t.elements.length}))?t.push({playlistId:e.playlistId,shuffle:e.shuffle||!1}):0===e.categories.length&&i.push({playlistId:e.playlistId,shuffle:e.shuffle||!1})}));const n=t.length>0?t:i;return n[Math.floor(Math.random()*n.length)]},rc=e=>{if(R.resolve(Bl).result&&e.length){return nc(e)}};class ac extends br{init(){this._key="RaptivePlayerLoadVideoTimeout",this._lookup="RPLVTO"}}ac=B([bn("LoadVideoTimeoutExperiment"),M()],ac);class oc{setupAdvanceRelatedExperiment(e){const t=R.resolve(yd),i=R.resolve(Rl),s=this.advancePlaylist.relatedPlayer,n=t.enabled;s.shouldRun=this.jwPlaylistObj.playlist.then((r=>{const a=s.sticky?s.sticky.enabled:s.enabled,o=s.static?s.static.enabled:s.enabled,l=a&&e,d=!e||o;return"object"==typeof r&&(n&&t.result||!n&&(l||d)&&i.result)})).catch((()=>!1)),s.applyToFirst=n?t.result:e&&s.sticky?s.sticky.applyToFirst:s.applyToFirst}_getPlaylistPlayerVideos(e){var t;const i=e.siteAds.videoPlayers,s=(i&&i.players||[]).filter((e=>"stickyPlaylist"===e.type)),n=e.siteAds.videoPlayers&&e.siteAds.videoPlayers.contentSpecificPlaylists,r=n&&rc(n),a=r&&r.playlistId,o=a||s.length&&s[0].playlistId;var l,d;return{playlistId:o,hasContentSpecificPlaylist:Boolean(r),contentSpecificPlaylistshuffle:null!=(l=r&&r.shuffle)&&l,defaultPlaylistShuffle:null!=(d=null==(t=s[0])?void 0:t.shuffle)&&d,playlist:o?ss(sc.addMaxResolutionQueryParam(`https://cdn.jwplayer.com/v2/playlists/${o}`)):Promise.reject().catch((()=>!1))}}_getAdvancePlaylistConfig(e){const t=e.siteAds.adOptions.advancePlaylistOptions||{},i=t.relatedPlayer||{};return{playlistPlayer:{enabled:Si(t.playlistPlayer.enabled,!0)},relatedPlayer:{applyToFirst:Si(i.applyToFirst,!0),enabled:Si(i.enabled,!0),shouldRun:Promise.reject().catch((()=>!1)),static:i.static,sticky:i.sticky}}}_getStickyOutstreamSettings(e){const{video:t,videoPlayers:i}=e.siteAds,s=i&&i.partners&&i.partners.stickyOutstream,n=t&&t.partners.stickyOutstream;return Si(s||n,{blockedPageSelectors:"",mobile:{enabled:!1},desktop:{enabled:!1},allowForPageWithStickyPlayer:{enabled:!1},allowOnHomepage:!1,mobileHeaderSelector:"",mobileLocation:"bottom-right",saveVideoCloseState:!1})}constructor(e,t,i,s,n,r,a,o,l,d,c,h,u,p,g,m,_,f,v,y,b,S,E){this.players=[],this.instreamAdUnits=new Set([et.Video_Collapse_Autoplay_SoundOff,et.Video_Individual_Autoplay_SOff,et.Video_Coll_SOff_Smartphone,et.Video_In_Post_ClicktoPlay_SoundOn]);const C=e.siteAds.videoPlayers;this.advancePlaylist=this._getAdvancePlaylistConfig(e),this.apiValue=[2,7],this.stickyOutstreamCloseButtonTimeout=Si(t.result,4e3),this.contentSpecificPlaylists=C&&C.contentSpecificPlaylists,this.footerSelector=Si(C&&C.footerSelector,""),this.jwPlaylistObj=this._getPlaylistPlayerVideos(e),this.jwRequestTimeout=Si(l.result,15e3),this.logAdDuration=a.result,this.logAdLifeCycle=o.result,this.maxRedirect=8,this.mimeType=navigator.userAgent&&-1===navigator.userAgent.search(/Chrom|firefox/i)?["video/mp4","application/javascript"]:["video/mp4","application/javascript","video/webm"],this.mobileStickyPlayerOnPage=!1,this.outstreamPlacement=d.result||0,this.playbackmethod=r.playbackmethod,this.players=Si(C&&C.players.map((e=>(e.mobileLocation=sc.setMobileLocation(e.mobileLocation),e))),[]),this.position={id:1,name:"above"},this.relatedSettings=C&&C.contextual,this.removeVideoTitleWrapper=Si(e.siteAds.adOptions.removeVideoTitleWrapper,!1),this.setStandardOutstreamBackupRenderer=h.result,this.stickyOutstreamSettings=this._getStickyOutstreamSettings(e),this.vastTimeoutISV=Si(i.result,1e4),this.vastTimeoutOSV=Si(s.result,5e3),this.videoProtocols=n.result,this.videoWasClosed=Si(Fs.readInternalLocalStorage("adthrive_video_closed"),!1),this.maxBitrate=u.result||-1,this.backBufferLength=p.result&&"off"!==p.result?p.result:1/0,this.maxBufferLength=g.result||30,this.maxBufferSize=m.result||60,this.maxMaxBufferLength=_.result||600,this.frontBufferThreshold=f.result&&"off"!==f.result?f.result:1/0,this.staleLoadThreshold=c.result||20,this.maxMaxBufferReset=v.result,this.enablePreloading=y.result,this.loadVideoTimeout=b.result||8e3,this.instreamCreativeFailureThreshold=S.result||0,this.outstreamCreativeFailureThreshold=E.result||0}}oc=B([M(),F(0,L("AdThrive")),j("design:type",Function),j("design:paramtypes",["undefined"==typeof AdThrive?Object:AdThrive,void 0===pd?Object:pd,void 0===fd?Object:fd,void 0===vd?Object:vd,void 0===sd?Object:sd,void 0===td?Object:td,void 0===Hl?Object:Hl,void 0===$l?Object:$l,void 0===Vl?Object:Vl,void 0===ed?Object:ed,void 0===dd?Object:dd,void 0===ud?Object:ud,void 0===ql?Object:ql,void 0===Ml?Object:Ml,void 0===Gl?Object:Gl,void 0===Wl?Object:Wl,void 0===Kl?Object:Kl,void 0===Fl?Object:Fl,void 0===Yl?Object:Yl,void 0===Td?Object:Td,void 0===ac?Object:ac,void 0===jl?Object:jl,void 0===Zl?Object:Zl])],oc);class lc{get videoFlagSlot(){return this._videoFlagSlot}setVideoFlagSlot(e,t={}){e&&(this._videoFlagSlot[e]={...this._videoFlagSlot[e],...t})}clearVideoFlagSlot(e){if(e)return delete this._videoFlagSlot[e],!0}constructor(e,t,i,s){this._videoAdOptions=e,this.apiValue=[2,7],this.relatedPlayerAdded=!1,this.footerSelector="",this.gamDiscount=.16,this.hasJwPlayer=!1,this.hasStickyOutstream=!1,this.instreamAdUnits=new Set([et.Video_Collapse_Autoplay_SoundOff,et.Video_Individual_Autoplay_SOff,et.Video_Coll_SOff_Smartphone,et.Video_In_Post_ClicktoPlay_SoundOn]),this.jwpVersion=null,this.minFloor=.1753,this.mobileStickyPlayerOnPage=!1,this.playlistPlayerAdded=!1,this.plcmtUnits=new Map([[et.Video_Collapse_Autoplay_SoundOff,2],[et.Video_Individual_Autoplay_SOff,2],[et.Video_Coll_SOff_Smartphone,2],[et.Video_In_Post_ClicktoPlay_SoundOn,1]]),this.preventStickyOutstream=!1,this.removeVideoTitleWrapper=!1,this.vidDiscount=.1753,this._videoFlagSlot={};const n=this._videoAdOptions;this.position={id:1,name:"above"},this.maxRedirect=8,this.playbackmethod=n.playbackmethod,this.advancePlaylist=n.advancePlaylist,this.jwPlaylistObj=n.jwPlaylistObj,this.setupAdvanceRelatedExperiment=n.setupAdvanceRelatedExperiment,this.relatedSettings=n.relatedSettings,this.mimeType=n.mimeType,this.outstreamPlacement=n.outstreamPlacement,this.videoProtocols=n.videoProtocols,this.jwRequestTimeout=n.jwRequestTimeout,this.logAdDuration=n.logAdDuration,this.logAdLifeCycle=n.logAdLifeCycle,this.vastTimeoutISV=n.vastTimeoutISV,this.vastTimeoutOSV=n.vastTimeoutOSV,this.videoWasClosed=n.videoWasClosed,this.removeVideoTitleWrapper=i.enabled?i.result:n.removeVideoTitleWrapper,this.players=n.players,this.footerSelector=n.footerSelector,this.stickyOutstreamSettings=n.stickyOutstreamSettings,this.maxDuration=s.result||30,this.contentSpecificPlaylists=n.contentSpecificPlaylists,this.jwpVersion=t.result&&"none"!==t.result?t.result:null,this.staleLoadThreshold=n.staleLoadThreshold,this.setStandardOutstreamBackupRenderer=n.setStandardOutstreamBackupRenderer,this.stickyOutstreamCloseButtonTimeout=n.stickyOutstreamCloseButtonTimeout,this.maxBitrate=n.maxBitrate,this.backBufferLength=n.backBufferLength,this.maxBufferLength=n.maxBufferLength,this.maxBufferSize=n.maxBufferSize,this.maxMaxBufferLength=n.maxMaxBufferLength,this.frontBufferThreshold=n.frontBufferThreshold,this.maxMaxBufferReset=n.maxMaxBufferReset,this.enablePreloading=n.enablePreloading,this.loadVideoTimeout=n.loadVideoTimeout,this.instreamCreativeFailureThreshold=n.instreamCreativeFailureThreshold,this.outstreamCreativeFailureThreshold=n.outstreamCreativeFailureThreshold}}lc=B([M(),j("design:type",Function),j("design:paramtypes",[void 0===oc?Object:oc,void 0===zl?Object:zl,void 0===cd?Object:cd,void 0===Cd?Object:Cd])],lc);class dc extends vr{init(){this._setAbGroup=!1,this._key="VideoOpenBidderExperiment",this._lookup="VOBA",this._default=["none"]}}dc=B([bn("VideoOpenBidderExperiment"),M()],dc);class cc{constructor(e){this.bidders=e.result||["none"]}}cc=B([M(),j("design:type",Function),j("design:paramtypes",[void 0===dc?Object:dc])],cc);class hc{constructor(){this.active=!1}}hc=B([M()],hc);class uc extends br{init(){this._key="TrackScrollExperiment2",this._lookup="TCKSCROLL2"}get result(){return this._result}}uc=B([bn("TrackScrollExperiment"),M()],uc);function pc(e,t,i){var s=!0,n=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return Ja(i)&&(s="leading"in i?!!i.leading:s,n="trailing"in i?!!i.trailing:n),Co(e,t,{leading:s,maxWait:t,trailing:n})}class gc{getTargetingValue(){if(this._timesForTracking&&this._shouldUpdateTargeting()&&this._currentTimesForTracking.length>0)return this._currentTimesForTracking.map((e=>`engage${e}`))}_parseResult(e){return Array.isArray(e)&&e.length>0&&e.every((e=>"number"==typeof e))?e:[]}_setupScrollListener(){const e=pc((()=>{this._lastScrollTimestamp=Date.now()}),500);window.addEventListener("scroll",e,{passive:!0})}_shouldUpdateTargeting(){if(this._lastScrollTimestamp&&this._timesForTracking){const e=(Date.now()-this._lastScrollTimestamp)/1e3;if(this._currentTimesForTracking=this._timesForTracking.filter((t=>t>e)),this._currentTimesForTracking.length>0)return!0}return!1}constructor(e){this.trackScrollExperiment=e,this._currentTimesForTracking=[];const t=this.trackScrollExperiment.result;"off"!==t?(this.trackScrollEnabled=!0,this._timesForTracking=this._parseResult(t),this._setupScrollListener()):this.trackScrollEnabled=!1}}gc=B([M(),j("design:type",Function),j("design:paramtypes",[void 0===uc?Object:uc])],gc);class mc{get os(){return this._os}get browser(){return this._browser}get device(){return this._device}get deviceByBreakpoint(){return this._deviceByBreakpoint}constructor(e){const{tablet:t,desktop:i}=e.siteAds.breakpoints;this._os=hs(),this._browser=pi(),this._device=Xi(),this._deviceByBreakpoint=Ci(t,i)}}mc=B([M(),F(0,L("AdThrive")),j("design:type",Function),j("design:paramtypes",["undefined"==typeof AdThrive?Object:AdThrive])],mc);class _c{resetDynamicAds(){this.dynamicAds=this._dynamicAdsMapper.get()}get isStickyOutstreamTopCenterColorsDisabled(){return Ur.isRolloutEnabled("disable-sticky-outstream-top-center-colors")}_getEnabledBidders(){const e=[...this.partners.display.entries(),...this.partners.video.entries()].filter((([,e])=>e)).map((([e])=>e)),t=new Set([...e,...this.prebid.s2s.bidders]);return Array.from(t).sort(((e,t)=>e.localeCompare(t)))}constructor(e,t,i,s,n,r,a,o,l,d,c,h,u,p,g,m,_,f,v,y,b,S,E,C,T,w,k,A,I,x,P,O,L,D,M,B,F,j,N,U,V,z,H){this.abGroup=e,this.act25=t,this.usCMP=i,this.adOptions=s,this.adTypes=n,this.amazon=r,this.ccpa=a,this.gpc=o,this.clsOptimizedAds=l,this.comscore=d,this.disableAds=c,this.displayOpenBidding=h,this.fledge=u,this.floors=p,this.footer=g,this.gam=m,this.gdpr=_,this.hbho=f,this.idho=v,this.infiniteScroll=y,this.lazyLoad=b,this.liveRampAts=S,this.locale=E,this.marmalade=C,this.optable=T,this.partners=w,this.pubAbGroup=k,this.prebid=A,this.site=I,this.targetDensity=x,this.timeouts=P,this.timing=O,this.tkho=L,this.user=D,this.vbho=M,this.video=B,this.videoOpenBidding=F,this.uid2TokenCleanup=j,this._dynamicAdsMapper=N,this.trackScroll=U,this.userAgent=V,this.prebidClientSide=z,this.trafficShaping=H,this.enabledBidders=this._getEnabledBidders(),this.dynamicAds=N.get();const $=R.resolve(Tl);$.enabled&&(this.clsOptions=$)}}_c=B([M(),j("design:type",Function),j("design:paramtypes",[void 0===pr?Object:pr,void 0===ca?Object:ca,void 0===ha?Object:ha,void 0===_a?Object:_a,void 0===Ca?Object:Ca,void 0===Cl?Object:Cl,void 0===Na?Object:Na,void 0===ja?Object:ja,void 0===kl?Object:kl,void 0===Al?Object:Al,void 0===Il?Object:Il,void 0===Pl?Object:Pl,void 0===Id?Object:Id,void 0===pl?Object:pl,void 0===xd?Object:xd,void 0===jn?Object:jn,void 0===Xa?Object:Xa,void 0===Dd?Object:Dd,void 0===Bd?Object:Bd,void 0===Fd?Object:Fd,void 0===oa?Object:oa,void 0===jd?Object:jd,void 0===Nd?Object:Nd,void 0===Hd?Object:Hd,void 0===Fa?Object:Fa,void 0===Pr?Object:Pr,void 0===gr?Object:gr,void 0===ia?Object:ia,void 0===ur?Object:ur,void 0===qd?Object:qd,void 0===Wd?Object:Wd,void 0===Xd?Object:Xd,void 0===Jd?Object:Jd,void 0===Vo?Object:Vo,void 0===ic?Object:ic,void 0===lc?Object:lc,void 0===cc?Object:cc,void 0===hc?Object:hc,void 0===wd?Object:wd,void 0===gc?Object:gc,void 0===mc?Object:mc,void 0===Vr?Object:Vr,void 0===yl?Object:yl])],_c);class fc extends Fn{isContentSlot(e){return e.location===Qe.Content}isBelowPostSlot(e){return e.location===Qe.Below_Post}isRecipeSlot(e){return e.location===Qe.Recipe}isValidLocation(e){const t=this.isContentSlot(e)||this.isBelowPostSlot(e)||this.isRecipeSlot(e);return this.cpmThreshold.slotLocations?t&&this.cpmThreshold.slotLocations.includes(e.location):t}isValidSequence(e){if(this.isBelowPostSlot(e))return e.sequence&&e.sequence<=1;if(this.isRecipeSlot(e))return!0;{var t;const i=null!=(t=this.cpmThreshold.slotLimit)?t:9;return e.sequence&&e.sequence<=i}}isCPMSlot(e){return e.sequence&&e.sequence<=2&&this.isContentSlot(e)}isTargetSlot(e){return e.lazy&&!this.isCPMSlot(e)&&this.isValidSequence(e)&&this.isValidLocation(e)}_sortByCpm(e,t){return e.cpm===t.cpm?0:e.cpm{var i;return(null==(i=e.prebidAdUnit)?void 0:i.length)&&t.adUnitCode===e.prebidAdUnit[0].code})).sort(this._sortByCpm);if(t.length>0)return t[0].cpm}return 0}checkThresholdMet(e){if(!this.cpmThreshold.met&&this.isCPMSlot(e)){const t=4,i=100,s=this._dcsllMediumCPMExperiment.result?parseFloat(this._dcsllMediumCPMExperiment.result):5,n=this.getSlotCPM(e);n>=i?this.cpmThreshold={met:!0,slotLimit:null,slotLocations:null}:n>=s?this.cpmThreshold={met:!0,slotLimit:7,slotLocations:[Qe.Content]}:n>=t&&(this.cpmThreshold={met:!0,slotLimit:4,slotLocations:[Qe.Content]}),this.cpmThreshold.met&&this.loadRemainingSlots()}return this.cpmThreshold.met}loadRemainingSlots(){this._intersectionObserverManager.getObservedSlots().forEach((e=>{this.isTargetSlot(e)&&(this._intersectionObserverManager.unobserve(e),this._slotEventBus.displaySlot.emit(e.id))}))}lazyLoadingEnabledForSlot(e){if(e&&e.googleTagSlot){if(this.enabled&&this.checkThresholdMet(e)&&this.isTargetSlot(e))return e.setSlotTargetingFlag("dcsll",["true"]),e.lazyDisabled=!0,!1}else W.error("DynamicContentSlotLazyLoadingComponent","lazyLoadingEnabledForSlot","Slot not configured");return e.lazy}get enabled(){return this._config.adOptions.dynamicContentSlotLazyLoading}constructor(e,t,i,s,n){super(),this._slotEventBus=e,this._intersectionObserverManager=t,this._config=i,this._dcsllMediumCPMExperiment=s,this._prebidMethods=n,this.cpmThreshold={met:!1,slotLimit:null,slotLocations:null}}}fc=B([bn("DynamicContentSlotLazyLoadingComponent"),M(),j("design:type",Function),j("design:paramtypes",[void 0===Bn?Object:Bn,void 0===la?Object:la,void 0===_c?Object:_c,void 0===da?Object:da,void 0===Mn?Object:Mn])],fc);class vc extends Er{init(){this._key="InterstitialConfig",this._lookup="INTCFG",this._default=!1}}vc=B([bn("InterstitialConfigExperiment"),M()],vc);class yc extends Fn{get enabled(){return this._interstitialConfigExperiment.result&&(this._adOptions.desktopInterstitial||this._adOptions.mobileInterstitial)}start(){this._addAttributeToInternalLinks()}_isInternalLink(e){const t=new URL(window.location.href).hostname;return e.startsWith("/")||e.startsWith("#")||e.includes(t)||e.startsWith(`//${t}`)}_addAttributeToInternalLinks(){document.querySelectorAll("a").forEach((e=>{this._isInternalLink(e.href)&&e.setAttribute("data-google-interstitial","false")}))}_setInterstitialConfig(e){e.googleTagSlot&&e.googleTagSlot.setConfig({interstitial:{triggers:{unhideWindow:!0}}})}constructor(e,t){super(),this._interstitialConfigExperiment=e,this._adOptions=t}}yc=B([D(),bn("InterstitialConfigComponent"),j("design:type",Function),j("design:paramtypes",[void 0===vc?Object:vc,void 0===_a?Object:_a])],yc);class bc extends Er{init(){this._key="AdExpansion",this._lookup="AED1",this._default=!1}isEnabled(){const e=!Ur.isRolloutEnabled("disable-expandable-ads");return super.isEnabled()&&!Ki()&&e}}bc=B([bn("AdExpansionExperiment"),M()],bc);class Sc{constructor(){this.impressionViewable=new V,this.slotOnload=new V,this.slotRenderEnded=new V,this.slotVisibilityChanged=new V,this.slotRequested=new V,this.slotResponseReceived=new V,this.started=new V}}Sc=B([M()],Sc);const Ec=e=>"scheduler"in window&&window.scheduler&&window.scheduler.postTask?window.scheduler.postTask((()=>e()),{priority:"background"}):new Promise((t=>setTimeout((()=>t(e())),0)));class Cc{markEndTask(){const e=this._markEnd();this._slotRenderEndedFired?Ec((()=>this._logData(e))):this._pushToAdThriveQueue((()=>{this._pushToGamQueue((()=>{window.googletag.pubads().addEventListener("slotRenderEnded",(()=>{Ec((()=>this._logData(e)))}))}))}))}_markEnd(){const e=Date.now();return performance.mark(`${this._id}-end`),performance.measure(`${this._id}`,`${this._id}-start`,`${this._id}-end`),{startTime:this._startTime,duration:e-this._startTime,name:this._id}}_logData(e){const t=this._createLogURL(e),i=new XMLHttpRequest;i.open("get",t,!0),i.send()}setTaskData(e){const{duration:t,startTime:i}=e;this._taskData={name:this._name,type:this._type,startTime:i,duration:t,sequence:this._sequence,metadata:this._metadata}}_createLogURL(e){this.setTaskData(e);const t=[null===this._taskData?{}:this._taskData,this._adsloggerData];return`https://logger.adthrive.com/event?${[`siteId=${encodeURIComponent(window.adthrive.siteAds.siteId||"")}`,`siteName=${encodeURIComponent(window.adthrive.siteAds.siteName||"")}`,`bucket=${encodeURIComponent(window.adthrive.bucket||"")}`,`branch=${encodeURIComponent(window.adthrive.branch||"")}`,`deployment=${encodeURIComponent(window.adthrive.deployment||"")}`,`message=${encodeURIComponent("TaskMonitor::_logData")}`,`pageurl=${encodeURIComponent(window.location.origin+window.location.pathname)}`,`body=${encodeURIComponent(JSON.stringify(t))}`].join("&")}`}addMetadata(e){Object.keys(e).forEach((t=>{this._metadata[t]=e[t]}))}_pushToAdThriveQueue(e){const t=window.adthrive;t&&t.cmd&&t.cmd.push(e)}_pushToGamQueue(e){const t=window.googletag;t&&t.cmd&&t.cmd.push(e)}constructor(e,t,i,s,n){this._id=e,this._startTime=t,this._sequence=i,this._type=s,this._slotRenderEndedFired=n,this._pvk="",this._adsloggerData={abgroup:"taskmonitor-log",pubab:"taskmonitor-log",sess:"taskmonitor-log",pvk:this._pvk,hbho:["taskmonitor-log"],vbho:["taskmonitor-log"],spa:!1},this._taskData=null,this._metadata={};const r=window.adthrive;"object"==typeof r&&null!==r&&"context"in r&&"object"==typeof r.context&&null!==r.context&&"pageviewKey"in r.context&&"string"==typeof r.context.pageviewKey&&(this._pvk=r.context.pageviewKey,this._adsloggerData.pvk=this._pvk),this._name=this._id.split("_")[0]}}const Tc=new class{markStartTask(e,t,i=!1){if(i||this.enabled){const i=`adt-${t.join("-")}`,s=this._taskIdCounters.get(i),n=void 0!==s?s+1:0,r=`${i}_${n}`,a=this._markStart(r);return this._taskIdCounters.set(i,n),new Cc(r,a,n,e,this._slotRenderEndedFired)}return{markEndTask:()=>{},addMetadata:()=>{}}}_markStart(e){return performance.mark(`${e}-start`),Date.now()}get enabled(){if(null===this._enabled){const e=!!Ri().get("tpm"),t=this._determineDesiredSiteLevelLoggingRate(),i=new zn(t).get();this._enabled=i||e}return this._enabled}_pushToAdThriveQueue(e){const t=window.adthrive;t&&t.cmd&&t.cmd.push(e)}_pushToGamQueue(e){const t=window.googletag;t&&t.cmd&&t.cmd.push(e)}_determineDesiredSiteLevelLoggingRate(){if(this._featureRolloutKeyForLoggingRate in Ur.siteFeatureRollouts){const{enabled:e,data:t}=Ur.siteFeatureRollouts[this._featureRolloutKeyForLoggingRate];if(e&&t&&"object"==typeof t&&"pct_enabled"in t&&"number"==typeof t.pct_enabled)return t.pct_enabled/100}return this._defaultLoggingRate}constructor(){this._taskIdCounters=new Map,this._enabled=null,this._defaultLoggingRate=.02,this._featureRolloutKeyForLoggingRate="task-performance-logging-rate",this._slotRenderEndedFired=!1;window.adthrive&&this._pushToAdThriveQueue((()=>{this._pushToGamQueue((()=>{window.googletag.pubads().addEventListener("slotRenderEnded",(()=>{this._slotRenderEndedFired=!0}))}))}))}};class wc{init(){wc.pushToQueue((()=>{const e=window.googletag.pubads();e.setSafeFrameConfig({sandbox:!0,allowOverlayExpansion:!0,allowPushExpansion:!0}),e.set("page_url",this._context.pageUrl),e.enableSingleRequest(),e.disableInitialLoad(),e.setPrivacySettings({childDirectedTreatment:Js()}),this._addGamEventListeners(),this._bootstrapEventBus.libraryLoadFailed.on((({bootstrapType:e})=>{e===Be.Prebid&&this.setTargetingFlag("pbjs",["failed"])}),{handleEventsAlreadyEmitted:!0}),this._config.act25.required&&this._consentEventBus.act25consentCaptured.on((e=>{this.setNonPersonalizedAds(!e)}),{handleEventsAlreadyEmitted:!0}),this._config.usCMP.required&&this._consentEventBus.usCmpConsentCaptured.on((e=>{this.setNonPersonalizedAds(!e)}),{handleEventsAlreadyEmitted:!0}),this._identityEventBus.optableResolved.on((e=>this._setOptableGamTargeting(e)),{handleEventsAlreadyEmitted:!0}),Ur.enabledFeatureRolloutIds&&Ur.enabledFeatureRolloutIds.length&&this.setTargetingFlag("fr",Ur.enabledFeatureRolloutIds.map((e=>e.toString())))})),this.setTargetingFlag("tpme",[Tc.enabled.toString()])}start(){wc.pushToQueue((()=>{window.googletag.enableServices();try{this._eventBus.started.emit()}catch(e){W.error("GoogleAdManager","start","started",e)}}))}static pushToQueue(e){window.googletag.cmd.push(e)}waitForQueue(){return new Promise((e=>{window.googletag.cmd.push((()=>{e(!0)}))}))}setTargeting(e){const t=(Array.isArray(e)?e:[e]).filter((e=>!(!e.value||!e.value.length)));for(const e of t)e&&wc.pushToQueue((()=>{window.googletag.pubads().setTargeting(e.key,e.value)}))}setSlotTargeting(e,t){const i=Array.isArray(e)?e:[e];for(const e of i)e&&wc.pushToQueue((()=>{t.setTargeting(e.key,Array.isArray(e.value)?e.value.join(","):e.value)}))}setTargetingFlag(e,t,i=!1){const s=()=>{const s=window.googletag.pubads().getTargeting("flag").filter((t=>{const[s]=t.split(":");return!i||s!==e}));this.setTargeting({key:"flag",value:[...s,...t.map((t=>`${e}:${t}`))]})};t&&t.length>0&&wc.pushToQueue((()=>s()))}getTargeting(){return window.googletag.pubads().getTargetingKeys().map((e=>({key:e,value:window.googletag.pubads().getTargeting(e)})))}getTargetingValuesForKey(e){return window.googletag.pubads().getTargeting(e)}getTargetingValuesForFlag(e){let t=[];const i=this.getTargetingValuesForKey("flag").filter((t=>{const[i]=t.split(":");return i===e}));return i.length>0&&(t=i.map((e=>e.split(":")[1]))),t}getTargetingMap(){const e=window.googletag.pubads();return e.getTargetingKeys().reduce(((t,i)=>(t[i]=e.getTargeting(i),t)),{})}clearTargetingForKey(e){wc.pushToQueue((()=>{window.googletag.pubads().clearTargeting(e)}))}_getPathname(e){return e.location===Qe.Content&&e.sequence&&e.sequence>9||e.location===Qe.Below_Post&&e.sequence&&e.sequence>1?e.location:e.location===Qe.Sidebar&&e.sequence&&e.sequence>9?e.name.replace(/\d+/,"9"):e.location===Qe.Recipe&&e.sequence&&e.sequence>5?e.name.replace(/\d+/,"2"):e.name}defineSlots(e){const{id:t}=this._config.site,{account:i,prefix:s}=this._config.gam;return e.map((e=>{const n=this._getPathname(e),r=`/${i}/${s}_${n}/${t}`,a=e.location===Qe.Video_StickyOutstream?[...e.sizes]:[...e.sizes,"fluid"];return this._setupSlot(e,r,a),e})).filter(on)}async displaySlots(e){await this.waitForQueue();const t=window.googletag.pubads();window.googletag&&!window.googletag.pubadsReady&&W.error("GoogleAdManager","displaySlots",new Error(`Unexpected googletag.pubadsReady: ${window.googletag.pubadsReady}`));let i=[];await this._prebidMethods.waitForQueue().then((e=>{!0===e&&(i=this._prebidMethods.getAllPrebidWinningBids())}));for(const s of e){const n=s.location===Qe.Video_StickyOutstream,r=this._demandChain.getBidWithBsidForSlot(s,i);let a;r&&(a=this._demandChain.getLastBsid(r.meta),a&&s.googleTagSlot.setTargeting("hb_bsid",a)),t.enableLazyLoad(this._dynamicContentSlotLazyLoadingComponent.lazyLoadingEnabledForSlot(s)?this._config.lazyLoad.googleLazyLoadSettings.gam:this._config.lazyLoad.googleLazyLoadSettings.disabled),await this._emitBeforeRefreshSlots(e);!n||this._hasBids(s,{hb_bsid:a})?t.refresh([s.googleTagSlot]):(s.unfilled=!0,await this._emitNoBidResponses(s))}}refreshSlots(e){wc.pushToQueue((async()=>{await this._emitBeforeRefreshSlots(e);const t=[],i=[];e.forEach((e=>{e.location!==Qe.Video_StickyOutstream||this._hasBids(e)?t.push(e):(e.unfilled=!0,i.push(e))})),t.length&&(t.forEach((e=>e.addRequestTypeSlotFlag())),window.googletag.pubads().refresh(t.map((e=>e.googleTagSlot)))),i.forEach((async e=>await this._emitNoBidResponses(e)))}))}_emitNoBidResponses(e){return this._slotEventBus.noBidResponses.legacyEmit(e.id)}_hasBids(e,t){const i=e.googleTagSlot;if(!i)return;const s=i.getTargeting("amz_pb").length||i.getTargeting("amz_pb_sp").length,n=i.getTargeting("hb_adid").length||s;return n||W.event("GoogleAdManager","_hasBids",{name:e.name,nref:e.refreshCount,...t}),!!n}async _emitBeforeRefreshSlots(e){const t=e.map((e=>e.id));await this._slotEventBus.beforeGoogleAdManagerRefreshSlots.legacyEmit(t),await this._slotEventBus.addRangeSlotTargeting.legacyEmit(t)}clearSlots(e){wc.pushToQueue((()=>{const t=e.map((e=>e.googleTagSlot));window.googletag.pubads().clear(t)}))}destroySlots(e){wc.pushToQueue((()=>{const t=e.map((e=>e.googleTagSlot));window.googletag.destroySlots(t)}))}setIdAsPPID(e){wc.pushToQueue((()=>{window.googletag.pubads().setPublisherProvidedId(e)}))}setNonPersonalizedAds(e){wc.pushToQueue((()=>{window.googletag.pubads().setPrivacySettings({nonPersonalizedAds:e})}))}_addGamEventListeners(){this._addEventListener(this._eventBus.impressionViewable,"impressionViewable"),this._addEventListener(this._eventBus.slotOnload,"slotOnload"),this._addEventListener(this._eventBus.slotRenderEnded,"slotRenderEnded"),this._addEventListener(this._eventBus.slotVisibilityChanged,"slotVisibilityChanged"),this._addEventListener(this._eventBus.slotRequested,"slotRequested"),this._addEventListener(this._eventBus.slotResponseReceived,"slotResponseReceived")}_addEventListener(e,t){wc.pushToQueue((()=>{window.googletag.pubads().addEventListener(t,(i=>{const s=Tc.markStartTask("microtask",["GoogleAdManager",t]),n=this._slots.get(i.slot.getSlotElementId());if(n)try{e.emit({slotId:n.id,event:i})}catch(e){W.error("GoogleAdManager","addEventListener","emit",e)}s.markEndTask()}))}))}_setOptableGamTargeting(e){const{clusterCount:t,hemCount:i,accuracyResult:s,traits:n,recencyGroup:r}=e;this.setTargetingFlag("n_clust",[`${t}`]),this.setTargetingFlag("n_hem",[`${i}`]),this.setTargetingFlag("g_rec",[r]),"hem-found"===s.status?this.setTargetingFlag("rog_ha",[s.matchingClusterIndex.toString()]):"hem-not-found"===s.status&&this.setTargetingFlag("rog_ha",["-1"]),this._setOptableGamTargetingForTraits(n)}_setOptableGamTargetingForTraits(e){[{key:"lastSeen",targetingName:"td_rec"},{key:"percentile",targetingName:"td_perc"},{key:"hemSources",targetingName:"oemsrc"}].forEach((t=>{const{key:i,targetingName:s}=t,n=e[i];if(n)switch(n){case"true":this.setTargetingFlag(s,["t"]);break;case"false":this.setTargetingFlag(s,["f"]);break;default:this.setTargetingFlag(s,Array.isArray(n)?n.map((e=>e.toString())):[n.toString()])}}))}_setupSlot(e,t,i){if(this._bootstrapConfig.gptLibFailedToLoad)return;const s=window.googletag.pubads();e.googleTagSlot=e.location===Qe.Interstitial?window.googletag.defineOutOfPageSlot(t,window.googletag.enums.OutOfPageFormat.INTERSTITIAL):window.googletag.defineSlot(t,i,e.element.id),e.googleTagSlot?(e.googleTagSlot.addService(s).setTargeting("location",e.location).setTargeting("sequence",String(e.sequence)).setTargeting("id",e.id),e.googleTagSlotReady=!0,e.googleTagSlotReadyEmitter.emit(),e.location!==Qe.Content&&e.location!==Qe.Below_Post||!this._adExpansionExperiment.result||e.googleTagSlot.setConfig({adExpansion:{enabled:!0}}),!this._interstitialConfigComponent.enabled||e.location!==Qe.Interstitial&&e.location!==Qe.Interstitial_1||this._interstitialConfigComponent._setInterstitialConfig(e),(1===e.sequence&&e.isAboveTheFold||e.location===Qe.Footer)&&e.googleTagSlot.setTargeting("ATF","true"),e.isSticky&&e.location!==Qe.Video_StickyOutstream&&e.googleTagSlot.setTargeting("sticky","true"),e.special&&e.special.length>0&&e.googleTagSlot.setTargeting("special",e.special),"Sponsor_Tile"===e.location&&e.googleTagSlot.setCollapseEmptyDiv(!0,!0),e.location.includes("Native")&&e.googleTagSlot.setCollapseEmptyDiv(!0),s.isInitialLoadDisabled()&&window.googletag.display(e.googleTagSlot)):W.error("GoogleAdManager","defineSlots","Duplicate",t)}constructor(e,t,i,s,n,r,a,o,l,d,c,h,u,p){this._config=e,this._context=t,this._bootstrapEventBus=i,this._consentEventBus=s,this._slots=n,this._prebidMethods=r,this._demandChain=a,this._dynamicContentSlotLazyLoadingComponent=o,this._interstitialConfigComponent=l,this._adExpansionExperiment=d,this._identityEventBus=c,this._slotEventBus=h,this._eventBus=u,this._bootstrapConfig=p}}wc=B([bn("GoogleAdManager"),M(),j("design:type",Function),j("design:paramtypes",[void 0===_c?Object:_c,void 0===Fr?Object:Fr,void 0===qn?Object:qn,void 0===Wn?Object:Wn,void 0===ra?Object:ra,void 0===Mn?Object:Mn,void 0===Dn?Object:Dn,void 0===fc?Object:fc,void 0===yc?Object:yc,void 0===bc?Object:bc,void 0===Qn?Object:Qn,void 0===Bn?Object:Bn,void 0===Sc?Object:Sc,void 0===ka?Object:ka])],wc);class kc{get videoEnabled(){return!0}get enabled(){return!0}}class Ac{getSupplyChainConfig(e){return{ver:"1.0",complete:1,nodes:[{asi:"cafemedia.com",sid:e,hp:1}]}}}const Ic=new Map([["10thu68",`a_${te.AppNexus}`],["16d9pts",`a_${te.GumGum}`],["1axt6o",`a_${te.OpenX}`],["1bkk3r4",`a_${te.AmazonTAM}`],["1dfpj4",`a_${te.AmazonTAM}`],["1e4ycjk",`a_${te.Triplelift}`],["1lcnshs",`a_${te.Sharethrough}`],["1skd8g0",`a_${te.Yieldmo}`],["1y4543k",`a_${te.Pubmatic}`],["3bcv7k",`a_${te.AmazonTAM}`],["j27tog",`a_${te.Rubicon}`],["me2y9s",`a_${te.IndexExchange}`],["qtwge8",`a_${te.Verizon}`],["upqrr4",`a_${te.MediaGrid}`],["emebk0",`a_${te.Unruly}`],["f6dibk",`a_${te.Ogury}`],["rdvn5s",`a_${te.Seedtag}`],["1qwfo5c",`a_${te.Blis}`],["ii8mww",`a_${te.Cadent}`]]),xc={"138wa9s":.01,lhm9s0:.02,"1l06ark":.03,clz9j4:.04,"1c4jaio":.05,ud9a0w:.06,"1tvtb0g":.07,"865reo":.08,"17opse8":.09,pxfrwg:.1,"1pfzsw0":.11,h1srnk:.12,"1gkcsn4":.13,yt2s5c:.14,"1ybmt4w":.15,"1ifi80":.16,"110zj7k":.17,j9pips:.18,"1is9jpc":.19,ae2igw:.2,"19wmjgg":.21,s5ciyo:.22,"1rnwjy8":.23,"5y90cg":.24,"15gt1c0":.25,npj0u8:.26,"1n831ts":.27,etw0lc:.28,"1ecg1kw":.29,wl6134:.3,"1w3q22o":.31,"2mdvr4":.32,"124xwqo":.33,kdnw8w:.34,"1jw7x8g":.35,bi0w00:.36,"1b0kwzk":.37,t9awhs:.38,"1sruxhc":.39,"727dvk":.4,"16krev4":.41,othedc:.42,"1oc1fcw":.43,fxue4g:.44,"1fgef40":.45,xp4em8:.46,"1x7ofls":.47,eh4ow:.48,zx15og:.49,i5r56o:.5,"1hob668":.51,"9a44xs":.52,"18so5xc":.53,r1e5fk:.54,"1qjy6f4":.55,"4uamtc":.56,"14cunsw":.57,mlknb4:.58,"1m44oao":.59,dpxn28:.6,"1d8ho1s":.61,vh7nk0:.62,"1uzrojk":.63,"4abg1s":.64,"13svh1c":.65,m1lgjk:.66,"1lk5hj4":.67,d5ygao:.68,"1coiha8":.69,ux8gsg:.7,"1ufshs0":.71,"8q4y68":.72,"188oz5s":.73,qheyo0:.74,"1pzyznk":.75,hlryf4:.76,"1h4bzeo":.77,zd1yww:.78,"1yvlzwg":.79,"22eozk":.8,"11kypz4":.81,jtophc:.82,"1jc8qgw":.83,ay1p8g:.84,"1aglq80":.85,spbpq8:.86,"1s7vqps":.87,"6i8740":.88,"160s83k":.89,o9i7ls:.9,"1ns28lc":.91,fdv7cw:.92,"1ewf8cg":.93,x557uo:.94,"1wnp8u8":.95,"36d2io":.96,"12ox3i8":.97,kxn30g:.98,"1kg7400":.99,c202rk:1,"1bkk3r4":1.01,tta39c:1.02,"1tbu48w":1.03,"7m6kn4":1.04,"174qlmo":1.05,pdgl4w:1.06,"1ow0m4g":1.07,ghtkw0:1.08,"1g0dlvk":1.09,y93lds:1.1,"1xrnmdc":1.11,ygbgg:1.12,"10h0cg0":1.13,ipqby8:1.14,"1i8acxs":1.15,"9u3bpc":1.16,"19cncow":1.17,rldc74:1.18,"1r3xd6o":1.19,"5e9tkw":1.2,"14wtukg":1.21,n5ju2o:1.22,"1mo3v28":1.23,e9wtts:1.24,"1dsgutc":1.25,w16ubk:1.26,"1vjqvb4":1.27,"3gcnwg":1.28,"12ywow0":1.29,l7moe8:1.3,"1kq6pds":1.31,cbzo5c:1.32,"1bujp4w":1.33,u39on4:1.34,"1tltpmo":1.35,"7w660w":1.36,"17eq70g":1.37,png6io:1.38,"1p607i8":1.39,grt69s:1.4,"1gad79c":1.41,yj36rk:1.42,"1y1n7r4":1.43,"18fwu8":1.44,"10qzxts":1.45,izpxc0:1.46,"1ii9ybk":1.47,a42x34:1.48,"19mmy2o":1.49,rvcxkw:1.5,"1rdwykg":1.51,"5o9eyo":1.52,"156tfy8":1.53,nfjfgg:1.54,"1my3gg0":1.55,ejwf7k:1.56,"1e2gg74":1.57,wb6fpc:1.58,"1vtqgow":1.59,"2ceadc":1.6,"11uybcw":1.61,k3oav4:1.62,"1jm8buo":1.63,b81am8:1.64,"1aqlbls":1.65,szbb40:1.66,"1shvc3k":1.67,"6s7shs":1.68,"16arthc":1.69,ojhszk:1.7,"1o21tz4":1.71,fnusqo:1.72,"1f6etq8":1.73,xf4t8g:1.74,"1wxou80":1.75,"4hjb4":1.76,zn1kao:1.77,hvrjsw:1.78,"1hebksg":1.79,"904jk0":1.8,"18iokjk":1.81,qrek1s:1.82,"1q9yl1c":1.83,"4kb1fk":1.84,"142v2f4":1.85,mbl1xc:1.86,"1lu52ww":1.87,dfy1og:1.88,"1cyi2o0":1.89,v78268:1.9,"1ups35s":1.91,"40buo0":1.92,"13ivvnk":1.93,lrlv5s:1.94,"1la5w5c":1.95,cvyuww:1.96,"1ceivwg":1.97,un8veo:1.98,"1u5swe8":1.99,"8g5csg":2,"17ypds0":2.01,q7fda8:2.02,"1ppze9s":2.03,hbsd1c:2.04,"1guce0w":2.05,z32dj4:2.06,"1ylmeio":2.07,"1sf3ls":2.08,"11az4lc":2.09,jjp43k:2.1,"1j29534":2.11,ao23uo:2.12,"1a6m4u8":2.13,sfc4cg:2.14,"1rxw5c0":2.15,"688lq8":2.16,"15qsmps":2.17,nzim80:2.18,"1ni2n7k":2.19,f3vlz4:2.2,"1emfmyo":2.21,wv5mgw:2.22,"1wdpngg":2.23,"2wdh4w":2.24,"12exi4g":2.25,knnhmo:2.26,"1k67im8":2.27,bs0hds:2.28,"1bakidc":2.29,tjahvk:2.3,"1t1uiv4":2.31,"7c6z9c":2.32,"16ur08w":2.33,p3gzr4:2.34,"1om10qo":2.35,g7tzi8:2.36,"1fqe0hs":2.37,xz4000:2.38,"1xho0zk":2.39,ogq2o:2.4,"1070r28":2.41,ifqqkg:2.42,"1hyark0":2.43,"9k3qbk":2.44,"192nrb4":2.45,rbdqtc:2.46,"1qtxrsw":2.47,"54a874":2.48,"14mu96o":2.49,mvk8ow:2.5,"1me49og":2.51,dzx8g0:2.52,"1dih9fk":2.53,vr78xs:2.54,"1v9r9xc":2.55,"3vc1z4":2.56,"13dw2yo":2.57,lmm2gw:2.58,"1l563gg":2.59,cqz280:2.6,"1c9j37k":2.61,ui92ps:2.62,"1u0t3pc":2.63,"8b5k3k":2.64,"17tpl34":2.65,q2fklc:2.66,"1pkzlkw":2.67,h6skcg:2.68,"1gpclc0":2.69,yy2ku8:2.7,"1ygmlts":2.71,"1nfaww":2.72,"115zbwg":2.73,jepbeo:2.74,"1ix9ce8":2.75,aj2b5s:2.76,"1a1mc5c":2.77,sacbnk:2.78,"1rswcn4":2.79,"638t1c":2.8,"15lsu0w":2.81,nuitj4:2.82,"1nd2uio":2.83,eyvta8:2.84,"1ehfu9s":2.85,wq5ts0:2.86,"1w8purk":2.87,"2rdog0":2.88,"129xpfk":2.89,kinoxs:2.9,"1k17pxc":2.91,bn0oow:2.92,"1b5kpog":2.93,teap6o:2.94,"1swuq68":2.95,"7776kg":2.96,"16pr7k0":2.97,oyh728:2.98,"1oh181s":2.99,g2u6tc:3,"1020ydc":3.05,r6dy4g:3.1,"1m94gzk":3.15,"4fb8qo":3.2,"1cti9z4":3.25,qmercw:3.3,"1z0lslc":3.35,b31hxc:3.4,"165s0sg":3.45,xa50jk:3.5,"1kl6wow":3.55,"7r6dc0":3.6,"1g5dekg":3.65,iuq4n4:3.7,"1r8x5vk":3.75,eewmio:3.8,"133whkw":3.85,u89hc0:3.9,"1pb0074":3.95,"1dfpj4":4,"19rmqrk":4.05,nkj85c:4.1,"1vyq9ds":4.15,bd13b4:4.2,"16frm68":4.25,xk4lxc:4.3,"1hjbdhc":4.35,"4pau4g":4.4,"1d3hvcw":4.45,lwlnuo:4.5,"1uasp34":4.55,hgs5q8:4.6,"11fyxa8":4.65,skbx1c:4.7,"1nn2fwg":4.75,"31d9ts":4.8,"1bfkb28":4.85,p8gsg0:4.9,"1xmntog":4.95,"9p3j0g":5,"14ru1vk":5.05,vw71mo:5.1,"1kxoef4":5.15,"83nv28":5.2,"1ghuwao":5.25,j77mdc:5.3,"1rlenls":5.35,ere48w:5.4,"122g0e8":5.45,t6t05c:5.5,"1o9jj0g":5.55,bz8cg:5.6,"18q69kw":5.65,mj2qyo:5.7,"1ux9s74":5.75,d3gjy8:5.8,"18672tc":5.85,zak2kg:5.9,"1j9qu4g":5.95,"6fqark":6,"1etxc00":6.05,kv56o0:6.1,"1t9c7wg":6.15,gfbojk:6.2,"10eig3k":6.25,rivfuo:6.3,"1mllyps":6.35,"3durk0":6.4,"1bs1ssg":6.45,pkya68:6.5,"1xz5beo":6.55,a1l0qo:6.6,"154bjls":6.65,w8ojcw:6.7,"1jjqfi8":6.75,"6ppw5c":6.8,"1f3wxds":6.85,ht9ngg:6.9,"1q7goow":6.95,ddg5c0:7,"13gdzb4":7.05,ukqz28:7.1,"1pnhhxc":7.15,"1px79c":7.2,"1a448hs":7.25,nx0pvk:7.3,"1wb7r40":7.35,bpil1c:7.4,"16s93wg":7.45,xwm3nk:7.5,"1hvsv7k":7.55,"51sbuo":7.6,"1dfzd34":7.65,lk464g:7.7,"1tyb7cw":7.75,h4ao00:7.8,"113hfk0":7.85,s7ufb4:7.9,"1naky68":7.95,"2ovs3k":8,ovzaps:8.1,"9cm1a8":8.2,"14fck5c":8.25,vjpjwg:8.3,"8smuio":8.4,jw6lts:8.5,fgd3pc:8.6,tvrzls:8.7,"1oyiigw":8.75,"10y7sw":8.8,n81qf4:8.9,cehkhs:9,yll340:9.1,"5qrbb4":9.2,"1e4ycjk":9.25,k6677k:9.3,fqcp34:9.4,qtwge8:9.5,"42tr0g":9.6,q9x9mo:9.7,"1yo4av4":9.75,aqk074:9.8,wxnitc:9.9,"7eovls":10,ii8mww:10.1,e2f4sg:10.2,"137nc3k":10.25,uc0buo:10.3,"1h6k1s":10.4,noa2o0:10.5,bgrxts:10.6,xnvgg0:10.7,"1hn2800":10.75,"4t1on4":10.8,m0cidc:10.9,hkj08w:11,so2rk0:11.1,"3544cg":11.2,"1bjb5kw":11.25,pc7myo:11.3,"9sudj4":11.4,vzxw5c:11.5,"7ux7uo":11.6,iygz5s:11.7,"1rco0e8":11.75,einh1c:11.8,sy2cxs:11.9,"38l4w":12,mac3r4:12.1,cupwqo:12.2,"17xgfls":12.25,z1tfcw:12.3,"66znk0":12.4,kmejgg:12.5,g6l1c0:12.6,"1mcvbi8":12.7,ra4sn4:12.75,"3u33sw":12.8,q16mf4:12.9,ahtczk:13,wowvls:13.1,"75y8e8":13.2,"1fk59mo":13.25,i9hzpc:13.3,dtohkw:13.4,v0zbb4:13.5,"265ji8":13.6,od924g:13.7,"1wrg3cw":13.75,c5qxa8:13.8,ycufwg:13.9,"5i0o3k":14,lbdiww:14.1,gvk0sg:14.2,"10uqscg":14.25,rz3s3k:14.3,"2g54w0":14.4,on8ni8:14.5,"93ve2o":14.6,vaywow:14.7,"1ldwqo0":14.75,"8jw7b4":14.8,jnfym8:14.9,f7mghs:15,tn1ce8:15.1,s7klc:15.2,"196elts":15.25,mzb37k:15.3,ci8f0g:15.4,ypbxmo:15.5,"5ui5ts":15.6,k9x1q8:15.7,"1so42yo":15.75,fu3jls:15.8,qxnaww:15.9,"46klj4":16,qdo45c:16.1,auaups:16.2,"15x1dkw":16.25,x1edc0:16.3,"7ifq4g":16.4,ilzhfk:16.5,e65zb4:16.6,tziu4g:16.7,"1p29czk":16.75,"14p2bk":16.8,nbskxs:16.9,b4ag3k:17,xbdyps:17.1,"4gk6ww":17.2,"1cur85c":17.25,lnv0n4:17.3,h81iio:17.4,sbl9ts:17.5,"2smmm8":17.6,ozq58g:17.7,"1xdx6gw":17.75,"9gcvsw":17.8,vngef4:17.9,"87epkw":18,jaygw0:18.1,ev4yrk:18.2,"1266uww":18.25,tajuo0:18.3,fq2v4:18.4,mmtlhc:18.5,d77egw:18.6,zeax34:18.7,"1jdhon4":18.75,"6jh5a8":18.8,kyw16o:18.9,gj2j28:19,rmmadc:19.1,"3hlm2o":19.2,"1bvsnb4":19.25,pop4ow:19.3,a5bv9c:19.4,wcfdvk:19.5,"6tgqo0":19.6,hx0hz4:19.7,"1qb7j7k":19.75,dh6zuo:19.8,uohtkw:19.9,"1to1s0":20,lgzsow:20.5,"99hnuo":21,tsnm68:21.5,"5nmxvk":22,q6sw74:22.5,dzarcw:23,xthq80:23.5,"3aqe4g":24,j438xs:24.5,d0c6io:25,rfr2f4:25.5,"6z30g0":26,o6du68:26.5,goosu8:27,v43oqo:27.5,lccn4:28,kfjbi8:28.5,azx4hs:29,u553wg:29.5,"4m6gow":30,p5cf0g:30.5,es0lc0:31,zb6jnk:31.5,"3eh8n4":32,htw4jk:32.5,bq524g:33,s8gwe8:33.5,"8t9bls":34,n8o7i8:34.5,fqz668:35,wy9zwg:35.5,"1e26m8":36,lx84xs:36.5,"9pq03k":37,suxzi8:37.5,"63va4g":38,py28zk:38.5,dqk45c:39,y9q2gw:39.5,"2d0rgg":40,jkbl6o:40.5,cmai2o:41,r1pdz4:41.5,"7mht6o":42,nfuo00:42.5,hc3lkw:43,vrihhc:43.5,js5xc:44,l2y48w:44.5,a9dybk:45,usjwn4:45.5,"59l9fk":46,oraqkg:46.5,fbojk0:47,ygwiyo:47.5,"3y56v4":48,idk2rk:48.5,bku0w0:49,ss4um8:49.5,"7yzaww":50,mee6tc:50.5,gan4e8:51,wk8bgg:51.5,"21gzcw":52,l6oyrk:52.5,"8z6txc":53,tics8w:53.5,"62b3eo":54,qlh1q8:54.5,edyww0:55,xj6wao:55.5,"30fk74":56,j69wqo:56.5,d2iubk:57,rhxq80:57.5,"6os6io":58,nw308w:58.5,h3cydc:59,viru9s:59.5,"100i68":60,k58hkw:60.5,apmakg:61,ucy1hc:61.5,"4tze9s":62,pd5clc:62.5,ejl6o0:63,z2r4zk:63.5,"3v0tfk":64,iafpc0:64.5,c6omww:65,s01hq8:65.5,"8ktwxs":66,n08su8:66.5,fv198g:67,x2c2yo:67.5,"15mry8":68,losq9s:68.5,"9halfk":69,tbhkao:69.5,"6keuww":70,ppmubk:70.5,di4phc:71,y1answ:71.5,"2ktp1c":72,js4irk:72.5,cafhfk:73,qpudc0:73.5,"7amsjk":74,nsymtc:74.5,hp7ke8:75,w4mgao:75.5,"7x5a8":76,kr33ls:76.5,aa0feo:77,ut6dq8:77.5,"5a7qio":78,offpxc:78.5,eztiww:79,yu0hs0:79.5,"4b95og":80,iqo1kw:80.5,b8z08w:81,sg9tz4:81.5,"86bdog":82,mlq9kw:82.5,ghz75s:83,wbc1z4:83.5,"1skpvk":84,lmroqo:84.5,"9f9jwg":85,tyfi80:85.5,"5tetxc":86,qcks8w:86.5,e52neo:87,xms4jk:87.5,"340sg0":88,ixdn9c:88.5,ctmku8:89,r91gqo:89.5,"74uwhs":90,oc5q80:90.5,gugow0:91,v9vksg:91.5,r48ow:92,kckkcg:92.5,awydc0:93,u26cqo:93.5,"4j7pj4":94,p2dnuo:94.5,exshds:95,zgyfpc:95.5,"3k94ow":96,hzo0lc:96.5,bvwy68:97,s1raps:97.5,"8mjpxc":98,n1ylts:98.5,fk9khs:99,wrke80:99.5,"1ju2o0":100},Pc=e=>xc[(e=>{const t=e.indexOf("_");return-1===t?e:e.substring(t+1)})(e)];class Oc extends Er{init(){this._key="AmazonHoldDisplay",this._lookup="AMZN_HOLD_DISP",this._default=!1}run(){return super.run()}}B([kn(),j("design:type",Function),j("design:paramtypes",[]),j("design:returntype",void 0)],Oc.prototype,"run",null),Oc=B([bn("AmazonLibraryExperiment"),M()],Oc);class Rc{isAmazonLoaded(){return!!window.apstag}init(e){this.isAmazonLoaded()&&window.apstag.init(e)}fetchBids(e,t){this.isAmazonLoaded()&&window.apstag.fetchBids(e,t)}setDisplayBids(){this.isAmazonLoaded()&&window.apstag.setDisplayBids()}targetingKeys(){return this.isAmazonLoaded()?window.apstag.targetingKeys():[]}rpa(e){this.isAmazonLoaded()&&window.apstag.rpa(e,this.tokenCallback,!1)}upa(e){this.isAmazonLoaded()&&window.apstag.upa(e,this.tokenCallback,!1)}tokenCallback(e){e&&(document.cookie=`AMZN-Token=${e.AIPToken}; expires=${e.cookieExpiry}; path=/;`)}dpa(e){this.isAmazonLoaded()&&window.apstag.dpa(e)}renderImp(e,t){this.isAmazonLoaded()&&window.apstag.renderImp&&window.apstag.renderImp(e,t)}}class Lc{addVideoSlots(e){this._videoEventBus.videoPlayerAdded.emit(e)}async requestVideoBids(e,t){await this.requestingVideoBids.legacyEmit(e).catch(),await this._determineIsRefreshing(e).catch(),await this._videoEventBus.preRequestVideoBids.legacyEmit({videos:e,timeout:t}),await this._videoEventBus.requestingVideoBids.legacyEmit({videos:e,timeout:t})}get amazonVideoBidResponseReceived(){return this._videoEventBus.amazonVideoBidResponseReceived}async _determineIsRefreshing(e){const t=e.filter((e=>e.prerollNum>0));t.length&&await this.refreshingVideoBids.legacyEmit(t)}constructor(e){this._videoEventBus=e,this.refreshingVideoBids=new V,this.requestingVideoBids=new V}}Lc=B([bn("VideoRequestManager"),M(),j("design:type",Function),j("design:paramtypes",[void 0===rr?Object:rr])],Lc);class Dc{async setContextualData(e){return this.fetchIrisResponse(e).then((e=>{if(e&&"boolean"!=typeof e){const t=e.video_info,i=t&&t.context;i&&i.length&&(this._contextualData=i,this._irisId=t.iris_id)}return!0})).catch((()=>!1))}get irisContextualData(){return this._contextualData}get irisId(){return this._irisId}fetchIrisResponse(e){return ss(`${this._irisEndpoint}?access_token=${this._token}&client_token=${this._clientToken}&platform_id=${e}`)}_resetIrisData(){this._contextualData=void 0,this._irisId=void 0}get enabled(){return!this._config.tkho.tracker.includes(this._name)&&!this._config.gpc.gpcEnabled&&!this._config.ccpa.userOptedOut}constructor(e,t){this._config=e,this._spaEventBus=t,this._name="iris",this.segmentName="www.iris.tv",this.segtax=501,this._irisEndpoint="https://context.iris.tv/video_info",this._token="5d8f38ad6d7de4253cfa501b84c30b1014868d9884be5d68dc64bd50a6edb54c",this._clientToken="EXJQESR8SMWMZCJ",this._spaEventBus.routeChanged.on((()=>{this._resetIrisData()}))}}Dc=B([bn("IrisTvTrackerComponent"),M(),j("design:type",Function),j("design:paramtypes",[void 0===_c?Object:_c,void 0===ir?Object:ir])],Dc);class Mc extends Fn{getAllMcmps(){return[...this._config.marmalade.mcmp.filter((e=>!e.startsWith("SR_"))),...this._config.marmalade.rfMcmpCodes.map((e=>e[0])),...this._config.marmalade.rfIabCodes.map((e=>e[0]))].filter(Mi)}constructor(e,t){super(),this._config=e,this._eventBus=t,this.setMcmpWithRFCodes=()=>new Promise((e=>{this._eventBus.recencyFrequencyDataSet.on((()=>{this.getAllMcmps(),e(!0)}),{handleEventsAlreadyEmitted:!0})}))}}Mc=B([bn("RecencyAndFrequencyCodesComponent"),D(),j("design:type",Function),j("design:paramtypes",[void 0===_c?Object:_c,void 0===tr?Object:tr])],Mc);class Bc extends br{init(){this._key="TTDDealFloor",this._lookup="TTDDEALFLR"}}Bc=B([bn("TTDDealFloorExperiment"),M()],Bc);const Fc=["IAB25","IAB26"],jc=new Map([["alc",["IAB8-5","IAB8-18"]],["ast",["IAB15-1"]],["dat",["IAB14-1"]],["gamc",["IAB9-5"]],["gamv",["IAB9-30"]],["pol",["IAB11-4"]],["rel",["IAB23"]],["ssr",["IAB7-39"]],["srh",["IAB7-30","IAB6-7","IAB7-45"]],["ske",["IAB7-19"]],["tob",["IAB7-41"]],["wtl",["IAB7-44"]]]);class Nc extends br{init(){this._key="PubmaticBCats",this._lookup="PUBBCAT"}run(){return super.run()}}B([kn(),j("design:type",Function),j("design:paramtypes",[]),j("design:returntype",void 0)],Nc.prototype,"run",null),Nc=B([bn("PubMaticBcatExperiment"),M()],Nc);class Uc extends Fn{get staticFirstPartyData(){return this._staticFirstPartyData}get staticIXFirstPartyData(){return this._staticIXFirstPartyData}init(){this._onAddedEvent(),this._onRequestingEvent(),this._onRefreshingEvent(),this._onVideoRequestingEvent(),this._onVideoRefreshingEvent(),this._setGlobalFirstPartyData(),this._spaEventBus.routeChanged.on((()=>{this._onAddedEvent()}))}_resetMCMPData(){this._staticFirstPartyData.mcmp=this._rfcodes.getAllMcmps()}_getTheTradeDeskPMPData(){let e=this._ttdDealFloorExperiment.result||"1";e="off"===e?"1":e;const t=+e.replace("_",".");return{deals:[{id:"opath-456-def-ryan",at:1,bidfloor:10*t,bidfloorcur:"USD",isVideo:!0},{id:"opath-123-abc-ryan",at:1,bidfloor:2.5*t,bidfloorcur:"USD",isVideo:!1}],private_auction:0}}_getSiteExtData(e,t=!1){const i=this._updateMcmpWithScrollTargeting(e.mcmp);return t&&i&&(e.mcmp=i),{ext:{data:e}}}_onAddedEvent(){this._slotManagerEventBus.added.once((e=>{const t=this._getBlockedCategories(),i=this._getTheTradeDeskPMPData();this._setPrebidBidderSpecificFirstPartyData([te.TTD],{pmp:i,site:this._getSiteExtData({site_code:this._config.marmalade.filteredSiteCodes}),bcat:t});const s=this._slots.get(e[0]),n="0",r=this._context.bucket,a=es(s).toString(),o=this._getIXFirstPartyData({refresh:"0",vp:n});this._setPrebidBidderSpecificFirstPartyData([te.IndexExchange,te.IndexExchangeServer],{site:this._getSiteExtData(o,!0)});const l=this._getSiteExtData({site_code:this._config.marmalade.filteredSiteCodes,refresh:["false"],vp:n,bucket:r},!0);this._setPrebidBidderSpecificFirstPartyData([te.Rubicon,te.RubiconServer],{site:l});const d=this._getSiteExtData({refresh:"0",vp:n,hvp:a,site_code:this._config.marmalade.filteredSiteCodes});this._setPrebidBidderSpecificFirstPartyData([te.OpenX,te.OpenXServer],{site:d,bcat:t}),this._setPrebidBidderSpecificFirstPartyData([te.Kargo],{bcat:t}),"nobc"!==this._pubMaticBcatExperiment.result&&this._setPrebidBidderSpecificFirstPartyData([te.Pubmatic,te.PubmaticServer],{bcat:t});const c=this._getSiteExtData({site_code:this._config.marmalade.filteredSiteCodes,vp:n,hvp:a,refresh:"0"});this._setPrebidBidderSpecificFirstPartyData([te.Triplelift,te.TripleliftServer],{site:c})}))}_getBlockedCategories(){return[...[...jc.keys()].filter((e=>!this._config.site.filteredSensitiveCategories.includes(e))).reduce(((e,t)=>e.concat(jc.get(t)||[])),[]),...Fc]}_onRequestingEvent(){this._slotManagerEventBus.requestingBids.on((e=>{const t=this._slots.get(e);t.forEach((e=>{this.setIXHVPParam(e,this._prebidMethods)}));const i=this._context.bucket,s="0",n=es(t[0]).toString(),r=this._getIXFirstPartyData({refresh:"0",vp:s});this._setPrebidBidderSpecificFirstPartyData([te.IndexExchange,te.IndexExchangeServer],{site:this._getSiteExtData(r,!0)});const a=this._getSiteExtData({site_code:this._config.marmalade.filteredSiteCodes,refresh:["false"],vp:s,bucket:i},!0);this._setPrebidBidderSpecificFirstPartyData([te.Rubicon,te.RubiconServer],{site:a});const o=this._getSiteExtData({refresh:"0",vp:s,hvp:n,site_code:this._config.marmalade.filteredSiteCodes});this._setPrebidBidderSpecificFirstPartyData([te.OpenX,te.OpenXServer],{site:o});const l=this._getSiteExtData({site_code:this._config.marmalade.filteredSiteCodes,vp:s,hvp:n,refresh:"0"});this._setPrebidBidderSpecificFirstPartyData([te.Triplelift,te.TripleliftServer],{site:l})}))}_onRefreshingEvent(){this._slotManagerEventBus.refreshingBids.on((e=>{var t;const i=this._slots.get(e);i.forEach((e=>{this.setIXHVPParam(e,this._prebidMethods)}));const s="0",n=i[0]&&(null==(t=i[0])?void 0:t.refreshCount),r=es(i[0]).toString(),a=this._context.bucket,o=this._getSiteExtData({site_code:this._config.marmalade.filteredSiteCodes,refresh:["true"],vp:s,bucket:a},!0);this._setPrebidBidderSpecificFirstPartyData([te.Rubicon,te.RubiconServer],{site:o});const l=this._getIXFirstPartyData({refresh:`${n}`,vp:s});this._setPrebidBidderSpecificFirstPartyData([te.IndexExchange,te.IndexExchangeServer],{site:this._getSiteExtData(l,!0)});const d=this._getSiteExtData({refresh:`${n}`,vp:s,hvp:r,site_code:this._config.marmalade.filteredSiteCodes});this._setPrebidBidderSpecificFirstPartyData([te.OpenX,te.OpenXServer],{site:d});const c=this._getSiteExtData({site_code:this._config.marmalade.filteredSiteCodes,vp:s,hvp:r,refresh:`${n}`});this._setPrebidBidderSpecificFirstPartyData([te.Triplelift,te.TripleliftServer],{site:c})}))}_onVideoRequestingEvent(){this._videoRequestManager.requestingVideoBids.on((e=>{e.forEach((()=>{const e=this._irisTvTracker,t=this._irisTvTracker.enabled?e.irisContextualData:void 0;if(t&&t.length){const t={content:{id:e.irisId}};this._setPrebidBidderSpecificFirstPartyData([te.Pubmatic,te.PubmaticServer],{site:t})}}))}))}_onVideoRefreshingEvent(){this._videoRequestManager.refreshingVideoBids.on((e=>{const t=this._context.bucket;e.forEach((e=>{if(e.vp>0&&e.prerollNum<=10){const i=e.vp.toString(),s=this._getSiteExtData({site_code:this._config.marmalade.filteredSiteCodes,refresh:["true"],vp:i,bucket:t},!0);this._setPrebidBidderSpecificFirstPartyData([te.Rubicon,te.RubiconServer],{site:s});const n=this._getIXFirstPartyData({refresh:`${e.prerollNum}`,vp:i});this._setPrebidBidderSpecificFirstPartyData([te.IndexExchange,te.IndexExchangeServer],{site:this._getSiteExtData(n,!0)});const r=this._getSiteExtData({refresh:`${e.prerollNum}`,vp:i,site_code:this._config.marmalade.filteredSiteCodes});this._setPrebidBidderSpecificFirstPartyData([te.OpenX,te.OpenXServer],{site:r});const a=this._getSiteExtData({site_code:this._config.marmalade.filteredSiteCodes,vp:i,refresh:`${e.prerollNum}`});this._setPrebidBidderSpecificFirstPartyData([te.Triplelift,te.TripleliftServer],{site:a}),this._prebidMethods.addToQueue((()=>{this.setIXVPParam(e.vp)}))}}))}))}_getIXFirstPartyData(e){return this._setupIXFirstPartyData(e)}setIXHVPParam(e,t){wc.pushToQueue((()=>{t.addToQueue((()=>{const i=t.getConfig(te.IndexExchange);if(i&&i.firstPartyData){const s=i.firstPartyData.HVP||{},n=es(e),r=ts(n||0);s[e.id]=r,e.refreshCount>0?ks({HVP:s,Refresh:"True"},t):ks({HVP:s},t,!0)}}))}))}setIXVPParam(e){const t=this._prebidMethods.getConfig(te.IndexExchange);t&&t.firstPartyData&&e>0&&ks({vp:e.toString()},this._prebidMethods)}_setupIXFirstPartyData(e){return{...e,...this.staticIXFirstPartyData}}_removeInitEvent(){null==this._initOffEvent||this._initOffEvent.call(this)}_awaitPrebidInit(){return new Promise((e=>{this._initOffEvent=this._prebidEventBus.initialized.on((()=>{e(),this._removeInitEvent()}),{handleEventsAlreadyEmitted:!0})}))}async _setGlobalFirstPartyData(){await this._awaitPrebidInit(),this._config.marmalade.rfDataProcessed.emitted||this._rfcodes.setMcmpWithRFCodes().then((()=>{this._resetMCMPData(),this._setPrebidGlobalFirstPartyData()})).catch((()=>{})),this._setPrebidGlobalFirstPartyData()}_setPrebidGlobalFirstPartyData(){this._prebidMethods.addToQueue((()=>{var e,t;const i=this._prebidMethods.getConfig("ortb2"),s={...i,ext:{...i.ext,rpbs:{experiments:this._config.prebid.pbsExperimentsResults,exp:this._config.prebid.pbsExperimentsResultsByLookupKey}},site:{...i.site,ext:{data:{...null==(t=i.site)||null==(e=t.ext)?void 0:e.data,...this.staticFirstPartyData}}}};this._prebidMethods.setConfig({ortb2:s})}))}_setPrebidBidderSpecificFirstPartyData(e,t){this._prebidMethods.setBidderConfig({bidders:e,config:{ortb2:t}})}_updateMcmpWithScrollTargeting(e){const t=this._config.trackScroll.getTargetingValue();return t?e?[...e,...t]:[...t]:e}constructor(e,t,i,s,n,r,a,o,l,d,c,h){super(),this._config=e,this._context=t,this._prebidMethods=i,this._videoRequestManager=s,this._irisTvTracker=n,this._rfcodes=r,this._spaEventBus=a,this._ttdDealFloorExperiment=o,this._slotManagerEventBus=l,this._pubMaticBcatExperiment=d,this._prebidEventBus=c,this._slots=h,this._staticFirstPartyData={mcmp:this._rfcodes.getAllMcmps(),site_id:[this._config.site.id],verticals:this._config.site.verticals,pmp_elig:[this._config.adOptions.pmp],sens:this._config.site.filteredSensitiveCategories},this._staticIXFirstPartyData={site_code:this._config.marmalade.filteredSiteCodes,sens:this._config.site.filteredSensitiveCategories,topic:this._config.site.verticals,pd:`${this._config.adOptions.pmp?"":"no"}${this._context.device}`,pmp_elig:this._config.adOptions.pmp?"TRUE":"FALSE",source:""};const u=as(this._context.savedReferrer);this._staticIXFirstPartyData.source=As(u)}}function Vc(e,t){return e===t||e!=e&&t!=t}function zc(e,t){for(var i=e.length;i--;)if(Vc(e[i][0],t))return i;return-1}Uc=B([bn("FirstPartyDataComponent"),D(),j("design:type",Function),j("design:paramtypes",[void 0===_c?Object:_c,void 0===Fr?Object:Fr,void 0===Mn?Object:Mn,void 0===Lc?Object:Lc,void 0===Dc?Object:Dc,void 0===Mc?Object:Mc,void 0===ir?Object:ir,void 0===Bc?Object:Bc,void 0===nr?Object:nr,void 0===Nc?Object:Nc,void 0===Jn?Object:Jn,void 0===ra?Object:ra])],Uc);var Hc=Array.prototype.splice;function $c(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t-1},$c.prototype.set=function(e,t){var i=this.__data__,s=zc(i,e);return s<0?(++this.size,i.push([e,t])):i[s][1]=t,this};function qc(e){if(!Ja(e))return!1;var t=go(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}var Gc,Wc=to["__core-js_shared__"],Kc=(Gc=/[^.]+$/.exec(Wc&&Wc.keys&&Wc.keys.IE_PROTO||""))?"Symbol(src)_1."+Gc:"";var Yc=Function.prototype.toString;function Xc(e){if(null!=e){try{return Yc.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var Qc=/^\[object .+?Constructor\]$/,Jc=Function.prototype,Zc=Object.prototype,eh=Jc.toString,th=Zc.hasOwnProperty,ih=RegExp("^"+eh.call(th).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function sh(e){return!(!Ja(e)||(t=e,Kc&&Kc in t))&&(qc(e)?ih:Qc).test(Xc(e));var t}function nh(e,t){var i=function(e,t){return null==e?void 0:e[t]}(e,t);return sh(i)?i:void 0}var rh=nh(to,"Map"),ah=nh(Object,"create");var oh=Object.prototype.hasOwnProperty;var lh=Object.prototype.hasOwnProperty;function dh(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t-1&&e%1==0&&e<=9007199254740991}function Nh(e){return null!=e&&jh(e.length)&&!qc(e)}var Uh="object"==typeof exports&&exports&&!exports.nodeType&&exports,Vh=Uh&&"object"==typeof module&&module&&!module.nodeType&&module,zh=Vh&&Vh.exports===Uh?to.Buffer:void 0,Hh=(zh?zh.isBuffer:void 0)||function(){return!1},$h=Function.prototype,qh=Object.prototype,Gh=$h.toString,Wh=qh.hasOwnProperty,Kh=Gh.call(Object);var Yh={};function Xh(e){return function(t){return e(t)}}Yh["[object Float32Array]"]=Yh["[object Float64Array]"]=Yh["[object Int8Array]"]=Yh["[object Int16Array]"]=Yh["[object Int32Array]"]=Yh["[object Uint8Array]"]=Yh["[object Uint8ClampedArray]"]=Yh["[object Uint16Array]"]=Yh["[object Uint32Array]"]=!0,Yh["[object Arguments]"]=Yh["[object Array]"]=Yh["[object ArrayBuffer]"]=Yh["[object Boolean]"]=Yh["[object DataView]"]=Yh["[object Date]"]=Yh["[object Error]"]=Yh["[object Function]"]=Yh["[object Map]"]=Yh["[object Number]"]=Yh["[object Object]"]=Yh["[object RegExp]"]=Yh["[object Set]"]=Yh["[object String]"]=Yh["[object WeakMap]"]=!1;var Qh="object"==typeof exports&&exports&&!exports.nodeType&&exports,Jh=Qh&&"object"==typeof module&&module&&!module.nodeType&&module,Zh=Jh&&Jh.exports===Qh&&Za.process,eu=function(){try{var e=Jh&&Jh.require&&Jh.require("util").types;return e||Zh&&Zh.binding&&Zh.binding("util")}catch(e){}}(),tu=eu&&eu.isTypedArray,iu=tu?Xh(tu):function(e){return mo(e)&&jh(e.length)&&!!Yh[go(e)]};function su(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var nu=Object.prototype.hasOwnProperty;function ru(e,t,i){var s=e[t];nu.call(e,t)&&Vc(s,i)&&(void 0!==i||t in e)||gh(e,t,i)}var au=/^(?:0|[1-9]\d*)$/;function ou(e,t){var i=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==i||"symbol"!=i&&au.test(e))&&e>-1&&e%1==0&&e0){if(++Su>=800)return arguments[0]}else Su=0;return bu.apply(void 0,arguments)});function Tu(e,t){return Cu(function(e,t,i){return t=fu(void 0===t?e.length-1:t,0),function(){for(var s=arguments,n=-1,r=fu(s.length-t,0),a=Array(r);++n1?t[s-1]:void 0,r=s>2?t[2]:void 0;for(n=wu.length>3&&"function"==typeof n?(s--,n):void 0,r&&function(e,t,i){if(!Ja(i))return!1;var s=typeof t;return!!("number"==s?Nh(i)&&ou(t,i.length):"string"==s&&t in i)&&Vc(i[t],e)}(t[0],t[1],r)&&(n=s<3?void 0:n,s=1),e=Object(e);++i/^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/.test(e)?"IPv4":/^((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){1,7}:)|(([0-9A-Fa-f]{1,4}:){1,6}:[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){1,5}(:[0-9A-Fa-f]{1,4}){1,2})|(([0-9A-Fa-f]{1,4}:){1,4}(:[0-9A-Fa-f]{1,4}){1,3})|(([0-9A-Fa-f]{1,4}:){1,3}(:[0-9A-Fa-f]{1,4}){1,4})|(([0-9A-Fa-f]{1,4}:){1,2}(:[0-9A-Fa-f]{1,4}){1,5})|([0-9A-Fa-f]{1,4}:((:[0-9A-Fa-f]{1,4}){1,6}))|(::([0-9A-Fa-f]{1,4}:){0,6}[0-9A-Fa-f]{1,4}))$/.test(e)||"::"===e?"IPv6":"Invalid",xu=e=>"JwPlayer"===e.type;class Pu extends Er{init(){this._key="AyServerSideEnrichmentWithLiveIntent",this._lookup="AYSSEWLI",this._default=!1,this._autorun=!1}}Pu=B([bn("AyServerSideEnrichmentWithLiveIntentExperiment"),M()],Pu);class Ou extends Er{init(){this._key="AyServerSideEnrichmentWithoutLiveIntent",this._lookup="AYSSEWOLI",this._default=!1,this._autorun=!1}}Ou=B([bn("AyServerSideEnrichmentWithoutLiveIntentExperiment"),M()],Ou);class Ru extends Er{init(){this._key="CFIpBidReqHoldout",this._lookup="CFIP_BRHO",this._default=!1}run(){return super.run()}}B([kn(),j("design:type",Function),j("design:paramtypes",[]),j("design:returntype",void 0)],Ru.prototype,"run",null),Ru=B([bn("CloudflareIpBidReqExperimentHoldoutExperiment"),M()],Ru);class Lu{_setORTB2Data(){this._prebidMethods.addToQueue((()=>{const e=this._prebidMethods.getConfig("ortb2")||{};this.createOrtbDataObj();const t=ku(e,this._data);this._prebidMethods.setConfig({ortb2:t})})),this._spaEventBus.routeChanged.on((()=>{this._prebidMethods.addToQueue((()=>{this.createOrtbDataObj(),this._prebidMethods.setConfig({ortb2:{...this._data}})}))}))}createOrtbDataObj(){this._userSegments=this._getUserSegments(),this._siteSegments=this._getSiteSegments();const e=this._config.prebid.ortbEnrich,t=this._getUserData(),i=this._getSiteData(e),s=this._getDeviceData(e),n={cur:this._getOrtb2Currency(),site:i,user:t,device:s};this._data={...n,...e&&{at:1,source:{fd:0}}}}get data(){return this._data}_getDeviceData(e){var t;const i=this._cloudflareIpBidReqExpHo.result&&(null==(t=this._config.user.rcid)?void 0:t.metadata.clientIp),s=i?Iu(i):null,n="IPv6"===s?"ipv6":"IPv4"===s?"ip":null;return{...i&&n&&{[n]:i},...e&&{language:navigator.language.slice(0,2),js:1}}}_getUserData(){return{...this._userSegments.length&&{data:this._userSegments}}}_getSiteData(e){const t=document.documentElement.lang,i=this._config.site.verticals,s=i.length?i[0].replace(/ /g,"_"):"";return{content:{...this._siteSegments.length&&{data:this._siteSegments},...e&&t&&{language:t.slice(0,2)}},...e&&i.length&&Au[s]&&{cat:[Au[s].iabCode],pagecat:[Au[s].iabCode]},...e&&{privacypolicy:1,mobile:1},...this._ayEnrichmentEligible&&{ext:{data:{aysse:this._ayEnrichmentEnabled}}}}}_onConsentEvent(){const e=this._config.ccpa;e.consentChange.on((t=>{this._prebidMethods.addToQueue((()=>{if(t===e.ccpaOptOut){const e=this._prebidMethods.getConfig("ortb2")||{};e.user&&(delete e.user,this._prebidMethods.setConfig({ortb2:e}))}}))}))}_getSiteSegments(){return this.buildSegmentData(this._config.marmalade.ortbSegments.get("iabc")||[],6)}_getUserSegments(){if(this._config.ccpa.userOptedOut)return[];const e=this.buildSegmentData(this._config.marmalade.ortbSegments.get("iaba")||[],4),t=this._convertTopicData(this._context.browsingTopics);return e.concat(t)}_convertTopicData(e){const t=e.some((e=>"2"===e.taxonomy_version))?601:600;return this.buildSegmentData(e.reduce(((e,t)=>[...e,{id:String(t.id)}]),[]),t,"adthrive.com")}_setDelayedTopicsData(e){this._prebidMethods.addToQueue((()=>{const t=this._prebidMethods.getConfig("ortb2")||{};t.user=t.user||{},t.user.data=t.user.data||[],t.user.data=t.user.data.concat(e),this._prebidMethods.setConfig({ortb2:t})}))}buildSegmentData(e,t,i="cafemedia.com"){return e.length?[{name:i,segment:e,ext:{segtax:t}}]:[]}buildSegmentDataFromArray(e,t,i){return this.buildSegmentData(e.map((e=>({id:e}))),t,i)}setOrtb2Imp(e,t){if(t)for(const i of Object.keys(e))t[i]=e[i]}setOrtb2ImpExt(e,t){t&&(t.ext={...t.ext,...e})}setOrtb2ImpExtData(e,t){var i;t&&(t.ext=null!=(i=t.ext)?i:{},t.ext.data={...t.ext.data,...e})}_setVideoOrtb2ImpData(e,t){this.setOrtb2ImpExtData({adserver:{name:"gam",adslot:`/${this._config.gam.account}/${this._config.gam.prefix}_${t.name}/${this._config.site.id}`}},e),xu(t)&&!this._config.ccpa.userOptedOut&&this._jwBoostExperiment.result&&this.setOrtb2ImpExtData({jwTargeting:t.getJwBoostTargeting()},e)}_setOrtb2ImpTrafficShapingData({ortb2Imp:e,location:t,refreshCount:i}){var s,n;if(!e)return;e.ext=null!=(n=e.ext)?n:{},e.ext.rpbs=e.ext.rpbs||{};const r=null==(s=this._config.trafficShaping.getTrafficShapingRule(t,i))?void 0:s.dbl;r?e.ext.rpbs.ts={on:!0,dbl:r}:delete e.ext.rpbs}addOrtb2Imp(e,t,i=!1,s){const n=this._config,{slot:r,video:a}=e,o=s||{ext:{data:{}}};if(o.secure=1,n.fledge.enabled&&(this.setOrtb2ImpExt({ae:1},o),r&&this.setOrtb2ImpExtData({banner:{sizes:r.sizes}},o),a&&this.setOrtb2ImpExtData({video:{sizes:a.size}},o)),a)this._setVideoOrtb2ImpData(o,a);else if(r){const e=es(r),t=ts(e||0);this.setOrtb2ImpExtData({hvp:`${t}`},o)}if(r&&i&&this.setOrtb2Imp({instl:1},o),r&&r.isHighlyViewable()&&this.setOrtb2ImpExtData({pos:"atf"},o),(null==t?void 0:t.length)&&this._setIXServerSiteId(t,o),r&&n.prebid.rpbsEnabled&&n.trafficShaping.active){const{location:e,refreshCount:t}=r;this._setOrtb2ImpTrafficShapingData({ortb2Imp:o,location:e,refreshCount:t})}return o}_setIXServerSiteId(e,t){for(const s of e)if(s.bidder===te.IndexExchangeServer){var i;const e=null==s||null==(i=s.params)?void 0:i.siteId;if(e){t.ext={...t.ext,siteId:e};break}}}addOrtb2Reg(e,t){this._prebidMethods.addToQueue((()=>{const i=this._prebidMethods.getConfig("ortb2")||{};i.regs={gpp:e,gpp_sid:t},this._prebidMethods.setConfig({ortb2:i})}))}addEidsToOrtb2(e){const t=Array.isArray(e)?[...e]:[e];this._prebidMethods.addToQueue((()=>{var e;var i;const s={...null!=(e=this._prebidMethods.getConfig("ortb2"))?e:{},...null!=(i=this._data)?i:{}};var n,r,a;s.user=null!=(n=s.user)?n:{},s.user.ext=null!=(r=s.user.ext)?r:{},s.user.ext.eids=null!=(a=s.user.ext.eids)?a:[],s.user.ext.eids=s.user.ext.eids.concat(t),this._prebidMethods.setConfig({ortb2:s})}))}updateOrtb2WithIris(e){var t,i;if(!1===e.enabled)return;const s=this._prebidMethods.getConfig("ortb2")||{},{irisId:n,segmentName:r,irisContextualData:a}=e;var o;const l={ext:{segtax:e.segtax,...n&&{cids:[n]}},name:r,segment:null!=(o=null==a?void 0:a.map((e=>({id:e}))))?o:[]};(null==(i=s.site)||null==(t=i.content)?void 0:t.data)?s.site.content.data.push(l):s.site.content.data=[l],this._prebidMethods.setConfig({ortb2:s})}_getOrtb2Currency(){const e=this._config.prebid.currencyConversionEnabled,t=this._context.country,i=["USD"],s={GB:"GBP",CA:"CAD",AU:"AUD"};return e&&t&&s[t]&&i.unshift(s[t]),i}constructor(e,t,i,s,n,r,a,o,l,d,c){this._config=e,this._context=t,this._jwBoostExperiment=i,this._prebidMethods=s,this._spaEventBus=n,this._marmaladeEventBus=r,this._browsingTopicsApiEventBus=a,this._cloudflareIpBidReqExpHo=o,this._ayServerSideEnrichmentWithLiveIntentExperiment=l,this._ayServerSideEnrichmentWithoutLiveIntentExperiment=d,this._idho=c,this._data={},this._ayEnrichmentEligible=this._config.prebid.ayServerEnabled,$o(this._idho,"liveIntentId")?this._ayEnrichmentEnabled=!!this._ayEnrichmentEligible&&this._ayServerSideEnrichmentWithLiveIntentExperiment.result:this._ayEnrichmentEnabled=!!this._ayEnrichmentEligible&&this._ayServerSideEnrichmentWithoutLiveIntentExperiment.result,this.createOrtbDataObj(),this._onConsentEvent(),this._marmaladeEventBus.resetMarmaladeData.once((()=>{this._setORTB2Data()})),this._config.marmalade.rfDataProcessed.on((()=>{this._setORTB2Data()})),this._config.gdpr.enabled||this._config.ccpa.userOptedOut||!this._context.browsingTopicsSupported||0!==this._context.browsingTopics.length||this._browsingTopicsApiEventBus.topicsReceived.on((e=>{this._setDelayedTopicsData(this._convertTopicData(e))}))}}Lu=B([M(),j("design:type",Function),j("design:paramtypes",[void 0===_c?Object:_c,void 0===Fr?Object:Fr,void 0===Ul?Object:Ul,void 0===Mn?Object:Mn,void 0===ir?Object:ir,void 0===tr?Object:tr,void 0===Gn?Object:Gn,void 0===Ru?Object:Ru,void 0===Pu?Object:Pu,void 0===Ou?Object:Ou,void 0===Bd?Object:Bd])],Lu);const Du={TC_LOADED:"tcloaded",USER_ACTION_COMPLETE:"useractioncomplete"};class Mu extends Fn{init(){this.checkConsentOnLoad().then((e=>{const t=e&&e.tcString;t?(this._config.gdpr.consentCaptured=!0,this._config.gdpr.revokedPurposeConsent=this._checkForRevokedPurpose(e.purpose),this._config.gdpr.consentCapturedData.consentString=t,e&&e.addtlConsent&&(this._config.gdpr.consentCapturedData.additionalConsent=e.addtlConsent),this._events.consentCaptured.emit(t),this._clearGdprQueues()):this.listenForConsentSubmit().catch((e=>{W.error("GDPREnforcementComponent","init","listenForConsentSubmit",e)}))})).catch((e=>{W.error("GDPREnforcementComponent","init","checkConsentOnLoad",e)}))}checkConsentOnLoad(){return new Promise((e=>{window.__tcfapi("addEventListener",2,((t,i)=>i&&t&&"tcloaded"===t.eventStatus&&t.tcString&&!Js()?e(t):e({})))}))}checkConsentForVendor(e,t){var i;const s=window.__cmp("getCMPData"),n=!0===(null==s||null==(i=s.vendorConsents)?void 0:i[e]),r=!!(null==t?void 0:t.every((e=>!0===(null==s?void 0:s.purposeConsents[e]))));return Promise.resolve(n&&r)}_clearGdprQueues(){this._queues.forEach((e=>{this.checkConsentForVendor(this._config.gdpr.raptiveVendorId,e.gdprPurposes).then((t=>{t?e.clearQueue(!0):(e.disable=!0,e.clearQueue(!1))})).catch((e=>{W.error("listenForConsentSubmit","clearGdprQueues",e)}))}))}listenForConsentSubmit(){return new Promise((e=>{window.__tcfapi("addEventListener",2,((t,i)=>{i&&([Du.TC_LOADED,Du.USER_ACTION_COMPLETE].includes(null==t?void 0:t.eventStatus)&&(this._config.gdpr.consentCaptured=!0,this._config.gdpr.cmpUserActionCompleteFired=!0,this._config.gdpr.revokedPurposeConsent=this._checkForRevokedPurpose(t.purpose),t&&t.tcString&&t.tcString.length&&(this._config.gdpr.consentCapturedData.consentString=t.tcString),t&&t.addtlConsent&&t.addtlConsent.length&&(this._config.gdpr.consentCapturedData.additionalConsent=t.addtl_consent),this._events.consentCaptured.emit(t.tcString),this._clearGdprQueues(),window.__tcfapi("removeEventListener",2,(e=>{}),t.listenerId)),e(!0)),e(!1)}))}))}_checkForRevokedPurpose(e){const t=e&&e.consents||{};return!t[1]||!t[4]}get enabled(){return"function"==typeof window.__tcfapi}constructor(e,t){super(),this._events=e,this._config=t,this._queues=[Fs,W]}}Mu=B([bn("GDPREnforcementComponent"),D(),j("design:type",Function),j("design:paramtypes",[void 0===Ya?Object:Ya,void 0===_c?Object:_c])],Mu);class Bu extends Er{init(){this._key="AmazonTrafficShaping",this._lookup="AMZNTS",this._default=!1}}Bu=B([bn("AmazonTrafficShapingExperiment"),M()],Bu);const Fu="AmazonAuctionManager";class ju extends kc{init(){this.videoSlotNames=this._initVideoSlotMap(),this._setup()}async _awaitAmazonReady(){return new Promise((e=>{this._amazonEventBus.initialized.once((()=>{e()}))}))}async _setup(){await this.checkLibLoaded("init"),this._listenForOutsideGAMRender(),this._listenForAmazonFloors(),this._setupFpdForCCPA(),this._setupFpdForGDPR(),this._config.ccpa.required||this._config.gdpr.enabled||this._toggleFPDToAmzConfig(!0),this._amazonMethods.init(this._amazonConfig),this._initialized=!0,this._amazonEventBus.initialized.emit()}_listenForAmazonFloors(){this._floorsEventBus.setAmazonFloors.on((e=>{e.forEach((({code:e,value:t,currency:i})=>{this._floors.set(e,{value:t,currency:i})}))})),this._floorsEventBus.clearAllFloorData.on((()=>{this._floors=new Map}))}_listenForOutsideGAMRender(){this._slotEventBus.adRenderingOutsideGAM.on((({slotId:e})=>{this._config.amazon.availableBids.delete(e)}))}_setupFpdForGDPR(){this._config.gdpr.enabled&&this._gdprEvents.consentCaptured.on((()=>{this._gdprEnforcement.checkConsentForVendor(this._config.gdpr.raptiveVendorId,[1]).then((e=>{this._toggleFPDToAmzConfig(!!e),this._amazonMethods.init(this._amazonConfig)})).catch((()=>{}))}))}_setupFpdForCCPA(){this._config.ccpa.required&&(this._config.ccpa.userOptedOut||this._toggleFPDToAmzConfig(!0),this._config.ccpa.consentChange.on((e=>{this._amazonConfig.params&&e&&(this._amazonConfig.params.us_privacy=e),this._toggleFPDToAmzConfig(e!==this._config.ccpa.ccpaOptOut),this._amazonMethods.init(this._amazonConfig)})))}_toggleFPDToAmzConfig(e=!0){if(e){const e={site:{...this._ortb2.data.site,cattax:1},user:{...this._ortb2.data.user}},t={ext:{data:{mcmp:[...this._config.marmalade.mcmp,...this._config.marmalade.rfMcmpCodes.map((e=>e[0]))],...this._firstPartyDataComponent.staticFirstPartyData}}};e.site={...e.site,...t},this._amazonConfig={...this._amazonConfig,signals:{ortb2:{...e}}}}else delete this._amazonConfig.signals}clearAuctionTargeting(e){this._clearAmazonKeys([e])}async requestBids(e,t=this._config.timeouts.initialBidsRequest-200,i=!1){try{if(!await this.checkLibLoaded("requestBids"))return;const s=e.map((e=>e.name)),n=Tc.markStartTask("microtask",["AmazonAuctionManager","requestBids"]);n.addMetadata({slotNames:s});const r=this.filterExcludedSlots(e,this._config.amazon.adUnitExclusions);if(!r.length)return void n.markEndTask();this._initialized||await this._awaitAmazonReady(),r.forEach((e=>{this._resetAmazonBidMapCpm(e)})),this._mapGptSlotsFromManagedSlots(r);const a=this._requestBidsFromAmazon(r,t,i);return n.markEndTask(),await a}catch(e){return void W.error(Fu,"requestBids",e)}}_getBidsInCache(e,t){const i=this._unitBidMapping.get(e);return{bids:i?[{cpm:i}]:[],requests:1,responses:i?1:0,refresh:t}}async _setBidsInCache(e){const t="_setBidsInCache",i=new Map;try{if(!await this.checkLibLoaded(t))return i;e.forEach((e=>{const t="id"in e?e.id:e.name;var s;const n=(null!=(s=this._unitBidMapping.get(t))?s:0)?1:0;i.set(t,n)}))}catch(e){return W.error(Fu,t,e),i}return i}async setPreAuctionBidCacheData(e){return this._setBidsInCache(e)}async setDisplayBidCacheTargeting(e){return this._setDecryptedBidsBasedOnSlotTargetingForSlots(e),this._removeAmazonEncryptedSlotTargetingForSlots(e),this._setBidCacheTargeting(e)}async setInstreamBidCacheTargeting(e){return this._setBidCacheTargeting(e)}async _setBidCacheTargeting(e){const t="_setBidCacheTargeting",i=new Map;try{if(!await this.checkLibLoaded(t))return i;e.forEach((e=>{const t="id"in e,s=t?e.id:e.name,n=t?e.refreshCount:e.prerollNum,r=this._getBidsInCache(s,n);i.set(s,r)}))}catch(e){return W.error(Fu,t,e),i}return i}filterExcludedSlots(e,t){const i=this._config.trafficShaping;return e.filter((e=>{var s;const n=i.active&&this._amazonTrafficShapingExperiment.result&&(null==(s=i.getTrafficShapingRule(e.location,e.refreshCount))?void 0:s.tam);return void 0!==e.googleTagSlot&&!t.has(e.location)&&e.location!==Qe.Native_Recipe&&!n}))}getAmazonSlots(e){const{id:t}=this._config.site,{networkCode:i,prefix:s}=this._config.gam;return e.map((e=>{const n=e.element.id,r=this._getAmazonFloors(n,e.hvp);return{slotID:n,slotName:`/${i}/${s}_${e.name}/${t}`,sizes:e.sizes,...e.location===Qe.Video_StickyOutstream&&{mediaType:"video"},...r&&r.value>0&&r.currency&&{floor:{value:Math.ceil(100*r.value),currency:r.currency}}}}))}_getAmazonRaptiveFloorKeys(e){const t=e.join("-");let i=this._amazonRaptiveFloorKeys.get(t)||[];if(!i.length){i=((e,t)=>e.reduce(((e,i)=>{const s=[];return e.forEach((e=>{i.forEach((i=>{s.push(e+t+i)}))})),s})).sort(((e,t)=>e.split("*").length-t.split("*").length)))(e.map((e=>[e,"*"])),"-"),this._amazonRaptiveFloorKeys.set(t,i)}return i}_getAmazonFloors(e,t){const i=this._config,s=this._floors,n=e.toLowerCase(),r=s.get(n),a=i.floors.floorsExperiment;if(!r&&(a.raptive||a.fbrap)){const e=this._getAmazonRaptiveFloorKeys([n,`${t||0}`]);for(const t of e){const e=s.get(t);if(e)return e}}return r}_mapGptSlotsFromManagedSlots(e,t=this._gptSlot){e.forEach((e=>t.set(e.element.id,e.googleTagSlot)))}get amazonHoldDisplayExperimentResult(){return this._amazonHoldDisplayExperiment.result}_requestBidsFromAmazon(e,t,i){return new Promise((s=>{const n=()=>{e.forEach((e=>{this._resetAmazonSlotCpm(e)}))},r=t+(e[0].refreshCount?0:this._config.amazon.failsafeTimeout),a=setTimeout((()=>{this._amazonMethods.setDisplayBids(),n(),s()}),r),o=()=>{s(),clearTimeout(a)},l={slots:this.getAmazonSlots(e),timeout:t,params:{adRefresh:i?"1":"0"}};this._amazonMethods.fetchBids(l,(()=>{wc.pushToQueue((()=>{try{this._amazonMethods.setDisplayBids()}catch(e){W.error(Fu,"_requestBidsFromAmazon",e)}n(),o()}))})),this.amazonHoldDisplayExperimentResult||o()}))}_resetAmazonBidMapCpm(e){const t="id"in e?e.id:e.name;this._unitBidMapping.get(t)&&this._unitBidMapping.delete(t)}_resetAmazonSlotCpm(e){const t="id"in e?e.id:e.name;this.amazonSlotCpm.get(t)&&this.amazonSlotCpm.delete(t)}_setDecryptedBidsBasedOnSlotTargetingForSlots(e){e.forEach((e=>this._setDecryptedBidsBasedOnSlotTargeting(e)))}_removeAmazonEncryptedSlotTargetingForSlots(e){e.forEach((e=>this._removeAmazonEncryptedSlotTargeting(e)))}_removeAmazonEncryptedSlotTargeting(e){const t=e.googleTagSlot.getTargetingKeys()||[];this._amazonEncryptedTargetingKeysToRemove.forEach((i=>{t.includes(i)&&e.googleTagSlot.clearTargeting(i)}))}_setDecryptedBidsBasedOnSlotTargeting(e,t=this._gptSlot){this._decryptAmazonDisplayBidAndSetTargeting(this._getReconstructedAmazonBidBasedOnSlotTargeting(e),t,e)}_getReconstructedAmazonBidBasedOnSlotTargeting(e){const t={};var i;return this._config.amazon.getEncryptedTargetingKeys().forEach((i=>{var s;const n=null==(s=e.googleTagSlot)?void 0:s.getTargeting(i);(null==n?void 0:n.length)&&(t[i]=n[0])})),{slotID:e.element.id,size:null!=(i=t.amznsz)?i:"",targeting:t}}_decryptAmazonDisplayBidAndSetTargeting(e,t=this._gptSlot,i){const s=t.get(e.slotID),n=this._decryptAmazonBid(e),{bidder:r,cpm:a,mediaType:o,pmpCpm:l,pmpBidder:d,pmpMediaType:c}=n,h=!!r&&this._partnerEnabled(r),u=!!d&&this._partnerEnabled(d),p={standard:{originalCpm:0,discount:0},pmp:{originalCpm:0,discount:0}};if(s){if(a&&r&&h){const t=ti(this._config,n,r,a,o),i=ei(t),l=a-t;p.standard.originalCpm=a,p.standard.discount=l,this._setDisplayTargeting(e,r,i,s,o,this._decrypted_cpm_key,this._decrypted_bidder_key)}else this._clearAmazonKeys([i],this._config.amazon.getEncryptedTargetingKeys({nonDealKeys:!0}));if(l&&d&&u){const t=ti(this._config,n,d,l,c),i=ei(t),r=l-t;p.pmp.originalCpm=l,p.pmp.discount=r,this._setDisplayTargeting(e,d,i,s,c,this._decrypted_deal_cpm_key,this._decrypted_deal_bidder_key)}else this._clearAmazonKeys([i],this._config.amazon.getEncryptedTargetingKeys({dealKeys:!0}));(h||u)&&(this._config.amazon.availableBids.set(e.slotID,n),this._setAmazonSlotCpm(i,p.standard.originalCpm,p.pmp.originalCpm),this._setAmazonDiscountTargeting(p,i))}}_partnerEnabled(e){return this._config.partners.getBidderConfig(e,!1).enabled}_setAmazonSlotCpm(e,t,i){const s=t>i?t:i;if("id"in e){const n=e.id;this.amazonSlotCpm.set(n,s),this._unitBidMapping.set(n,s),this._slotEventBus.amazonBidResponseReceived.emit([{slotId:e.id,cpm:t,location:e.location,lazy:e.lazy},{slotId:e.id,cpm:i,location:e.location,lazy:e.lazy}])}else{const n=e.name;this.amazonSlotCpm.set(n,s),this._unitBidMapping.set(n,s),this._videoEventBus.amazonVideoBidResponseReceived.emit([{video:e,cpm:t},{video:e,cpm:i}])}}_setAmazonDiscountTargeting(e,t){const{standard:i,pmp:s}=e,n=(e,i)=>{t.setSlotTargetingFlag(e,[i.toFixed(6).toString()],!0)};i.originalCpm&&n("aop",i.originalCpm),i.discount&&n("apd",i.discount),s.originalCpm&&n("aopp",s.originalCpm),s.discount&&n("appd",s.discount)}_setDisplayTargeting(e,t,i,s,n,r,a){s.setTargeting(r,i),s.setTargeting(a,t)}refreshBids(e){return this._clearAmazonKeys(e),this.requestBids(e,this._config.timeouts.refreshBidsRequest-200,!0)}_clearAmazonKeys(e,t){const i=t||this._config.amazon.amznTargetingKeys;e.forEach((e=>{if(e.googleTagSlot){const t=e.googleTagSlot.getTargetingKeys()||[];i.forEach((i=>t.includes(i)&&e.googleTagSlot.clearTargeting(i)))}}))}async requestVideoBids(e,t=this._config.timeouts.initialBidsRequest-200){if(!await this.checkLibLoaded("requestBids"))return;const i=this._amazonMethods;return e.forEach((e=>{this._resetAmazonSlotCpm(e)})),Promise.all(e.map((e=>{const s=this._getAmazonFloors(e.name,0)||{value:0,currency:"USD"},n=s&&s.value||0,r=Math.ceil(100*(Number(n)+this._config.video.minFloor)),a={slotID:this.videoSlotNames.get(e.amzName),mediaType:"video",floor:{value:r,currency:s.currency||"USD"}};return new Promise((s=>{const n=t+(e.prerollNum?0:this._config.amazon.failsafeTimeout),r=setTimeout((()=>{s()}),n),o=e=>{e?s(e):s(),clearTimeout(r)};this.checkLibLoaded("requestVideoBids").then((s=>{if(!s)return o();a?i.fetchBids({slots:[a],timeout:t},(t=>{t.length?(e.setAmznBids(t),t.forEach((t=>{const{cpm:i,amznBid:s,discounts:n}=this._setDecryptedAmazonVideoKVs(t);i-n.standard.discount>0?this._setAmazonInstreamCPM(e,i,n,s,o):o()}))):o()})):o()})).catch((e=>{W.error(Fu,"requestVideoBids",e)}))}))}))).then((()=>Promise.resolve())).catch()}get videoEnabled(){return this._config.partners.video.get("AmazonUAM")}get enabled(){return this._amazonMethods.isAmazonLoaded()&&this._config.amazon.enabled}get amazonSlotCpm(){return this._config.floors.amazonSlotCpm}_decryptAmazonBid(e){const t={...e,...e.targeting};var i;const s=null!=(i=t[Q])?i:"",n=Pc(s);var r;const a=null!=(r=t[Z])?r:"";var o;const l=null!=(o=Ic.get(a))?o:"";var d;const c=null!=(d=t.amznbid_sp)?d:"",h="slotID"in t?t.slotID:"",u=this._getMediaType(c,h),p=Pc(c);var g;const m=null!=(g=t[`${Z}_sp`])?g:"";var _;const f=null!=(_=Ic.get(m))?_:"";var v;const y=null!=(v=t[`${J}_sp`])?v:"",b=t[`${ee}_sp`];var S;const E=null!=(S=t.amznbid_sp)?S:"";var C;const T=null!=(C=t.amzndeal_sp)?C:"",w=this._getMediaType(s,h),k=t[ee];return{...t,amznbid:s,amzniid:t.amzniid,bidder:l,cpm:n,mediaType:w,slotID:h,...c.length&&{pmpAmznBid:E,pmpAmazoniid:y,pmpBidder:f,pmpCpm:p,pmpDeal:T,pmpMediaType:u,mediaType_sp:u,pmpSize:b},size:k}}_getMediaType(e,t){const i=t.toLowerCase();return this._isStickyOustreamBid(e,i)?"stickyOutstream":this._isInstreamOrAccompanyingContentBid(e,i)?"instream":"default"}_isStickyOustreamBid(e,t){return e.startsWith("o_")&&t.indexOf("stickyoutstream")>-1}_isInstreamOrAccompanyingContentBid(e,t){return e.startsWith("v_")||e.startsWith("o_")&&(t.startsWith("sticky_playlist")||t.startsWith("sticky_related"))}async checkLibLoaded(e){try{return await this._bootstrapConfig.bootstrapLoaders[Be.Amazon],!0}catch(e){return!1}}async _setAmazonInstreamCPM(e,t,i,s,n){this._setAmazonSlotCpm(e,i.standard.originalCpm,i.pmp.originalCpm),await this._videoEventBus.addAPStagSlotBidResponse.legacyEmit({playlistId:e._playlistId,bid:s,discounts:i}),n(t)}_initVideoSlotMap(){return Bi()?new Map([[et.Video_Collapse_Autoplay_SoundOff,"Sticky_Playlist_Desktop"],[et.Video_Individual_Autoplay_SOff,"Sticky_Related_Desktop"],[et.Video_In_Post_ClicktoPlay_SoundOn,"CTP_Desktop"],[et.Video_Collapse_Autoplay_SoundOff_15s,"Sticky_Playlist_Desktop_15s"],[et.Video_Individual_Autoplay_SOff_15s,"Sticky_Related_Desktop_15s"],[et.Video_In_Post_ClicktoPlay_SoundOn_15s,"CTP_Desktop_15s"]]):new Map([[et.Video_Coll_SOff_Smartphone,"Sticky_Playlist_Mobile"],[et.Video_Individual_Autoplay_SOff,"Sticky_Related_Mobile"],[et.Video_In_Post_ClicktoPlay_SoundOn,"CTP_Mobile"],[et.Video_Coll_SOff_Smartphone_15s,"Sticky_Playlist_Mobile_15s"],[et.Video_Individual_Autoplay_SOff_15s,"Sticky_Related_Mobile_15s"],[et.Video_In_Post_ClicktoPlay_SoundOn_15s,"CTP_Mobile_15s"]])}_setDecryptedAmazonVideoKVs(e){const t={standard:{originalCpm:0,discount:0},pmp:{originalCpm:0,discount:0}},i=this._decryptAmazonBid(e),{bidder:s,cpm:n,mediaType:r,pmpCpm:a,pmpBidder:o,pmpMediaType:l}=i;if(s&&n){const e=ti(this._config,i,s,n,r),a=ei(e),o=n-e;t.standard.originalCpm=n,t.standard.discount=o,i[this._decrypted_cpm_key]=`${a}`,i[this._decrypted_bidder_key]=s}if(a&&o){const e=ti(this._config,i,o,a,l),s=ei(e),n=a-e;t.pmp.originalCpm=a,t.pmp.discount=n,i.targeting?(i.targeting[this._decrypted_deal_cpm_key]=`${s}`,i.targeting[this._decrypted_deal_bidder_key]=`${o}`):(i[this._decrypted_deal_cpm_key]=`${s}`,i[this._decrypted_deal_bidder_key]=`${o}`)}return{amznBid:i,cpm:n,discounts:t}}constructor(e,t,i,s,n,r,a,o,l,d,c,h,u){super(),this._config=e,this._amazonMethods=t,this._amazonHoldDisplayExperiment=i,this._videoEventBus=s,this._bootstrapConfig=n,this._firstPartyDataComponent=r,this._ortb2=a,this._gdprEnforcement=o,this._gdprEvents=l,this._slotEventBus=d,this._floorsEventBus=c,this._amazonEventBus=h,this._amazonTrafficShapingExperiment=u,this.videoSlotNames=new Map,this._gptSlot=new Map,this._encrypted_cpm_key="amznbid",this._encrypted_bidder_key="amznp",this._encrypted_deal_cpm_key="amznbid_sp",this._encrypted_deal_bidder_key="amznp_sp",this._decrypted_cpm_key="amz_pb",this._decrypted_bidder_key="amz_bidder",this._decrypted_deal_cpm_key="amz_pb_sp",this._decrypted_deal_bidder_key="amz_bidder_sp",this._amazon_size_key="amznsz",this._amazonEncryptedTargetingKeysToRemove=["amznp","amznp_sp"],this._amazonRaptiveFloorKeys=new Map,this._floors=new Map,this._initialized=!1,this._unitBidMapping=new Map,this._amazonConfig={pubID:this._config.amazon.pubId,deals:this._config.adOptions.pmp,adServer:"googletag",videoAdServer:"DFP",...this._config.ccpa.required&&this._config.ccpa.privacyString&&{params:{us_privacy:this._config.ccpa.privacyString}},schain:(new Ac).getSupplyChainConfig(this._config.site.id)}}}ju=B([bn(Fu),D(),j("design:type",Function),j("design:paramtypes",[void 0===_c?Object:_c,void 0===Rc?Object:Rc,void 0===Oc?Object:Oc,void 0===rr?Object:rr,void 0===ka?Object:ka,void 0===Uc?Object:Uc,void 0===Lu?Object:Lu,void 0===Mu?Object:Mu,void 0===Ya?Object:Ya,void 0===Bn?Object:Bn,void 0===Yn?Object:Yn,void 0===$n?Object:$n,void 0===Bu?Object:Bu])],ju);class Nu{get _config(){return this.config}get enabled(){return!0}}class Uu extends Nu{get _config(){return this.config}get enabled(){return!this._gpc.gpcEnabled&&!this._ccpa.userOptedOut&&$o(this._idho,"connectId")&&this._liveRampAts.enabled}constructor(e,t,i,s,n,r){super(),this._ccpa=e,this._gpc=t,this._idho=i,this._liveRampAts=s,this._user=n,this._shareHemWithUserIdModule=r,this._name="connectId",this.targetingKey="cid",this.eidSource="yahoo.com",this.config={name:this._name,params:{pixelId:58404,...Ho()&&{puid:Ho()},...this._shareHemWithUserIdModule.share()&&{he:this._user.hash}},storage:{name:"connectid",type:"html5",expires:15}}}}Uu=B([bn("ConnectIdModule"),M(),j("design:type",Function),j("design:paramtypes",[void 0===Na?Object:Na,void 0===ja?Object:ja,void 0===Bd?Object:Bd,void 0===jd?Object:jd,void 0===Vo?Object:Vo,void 0===zo?Object:zo])],Uu);class Vu extends Nu{get _config(){return this.config}get enabled(){return!this._gpc.gpcEnabled&&!this._ccpa.userOptedOut&&$o(this._idho,"unifiedId")}constructor(e,t,i){super(),this._ccpa=e,this._gpc=t,this._idho=i,this._name="unifiedId",this.targetingKey="uid1",this.eidSource="adserver.org",this.eidSourceAlias="adsrvr.org",this.config={name:this._name,params:{url:"https://match.adsrvr.org/track/rid?ttd_pid=iowij76&fmt=json"},storage:{type:"html5",name:"pbjs-unifiedid",expires:60}}}}Vu=B([bn("UnifiedIdModule"),M(),j("design:type",Function),j("design:paramtypes",[void 0===Na?Object:Na,void 0===ja?Object:ja,void 0===Bd?Object:Bd])],Vu);class zu extends Er{init(){this._key="CFIdParHoldout",this._lookup="CFIP_IDPHO",this._default=!1}run(){return super.run()}}B([kn(),j("design:type",Function),j("design:paramtypes",[]),j("design:returntype",void 0)],zu.prototype,"run",null),zu=B([bn("CloudflareIdPartnerHoldoutExperiment"),M()],zu);class Hu extends Nu{get _config(){return this.config}get enabled(){return!this._gpc.gpcEnabled&&!this._ccpa.userOptedOut&&$o(this._idho,"id5Id")}getPdString(e){var t;const i=null==(t=this._user.rcid)?void 0:t.metadata.clientIp,s=Iu(i||""),n=this._shareHemWithUserIdModule.share({blockGraphHem:!0}),r=this._cloudflareIdPartnerExpHo.result,a=[{key:5,value:Ho()},{key:12,value:ni}];n&&a.push({key:1,value:null!=e?e:this._user.hash}),r&&"IPv4"===s&&a.push({key:10,value:i}),r&&"IPv6"===s&&a.push({key:11,value:i});const o=a.filter((e=>e.value)).map((e=>`${e.key}=${encodeURIComponent(e.value)}`)).join("&");return btoa(o)}constructor(e,t,i,s,n,r){super(),this._ccpa=e,this._gpc=t,this._idho=i,this._user=s,this._shareHemWithUserIdModule=n,this._cloudflareIdPartnerExpHo=r,this._name="id5Id",this.targetingKey="id5-d",this.eidSource="id5-sync.com",this.config={name:this._name,params:{partner:367,pd:this.getPdString(),externalModuleUrl:"https://cdn.id5-sync.com/api/1.0/id5PrebidModule.js"},storage:{type:"html5",name:"pbjs-id5id",expires:60,refreshInSeconds:28800}}}}Hu=B([bn("Id5IdModule"),M(),j("design:type",Function),j("design:paramtypes",[void 0===Na?Object:Na,void 0===ja?Object:ja,void 0===Bd?Object:Bd,void 0===Vo?Object:Vo,void 0===zo?Object:zo,void 0===zu?Object:zu])],Hu);class $u extends Nu{get _config(){return this.config}get enabled(){return!this._gpc.gpcEnabled&&!this._ccpa.userOptedOut&&$o(this._idho,"merkuryId")&&!this._gdpr.enabled}constructor(e,t,i,s){super(),this._ccpa=e,this._gpc=t,this._idho=i,this._gdpr=s,this._name="merkleId",this.targetingKey="mrk",this.eidSource="merkleinc.com",this.config={name:this._name,params:{sv_pubid:"9262",ssp_ids:["534404531"]},storage:{type:"html5",name:"pbjs-merkleId",expires:30}}}}$u=B([bn("MerkuryIdModule"),M(),j("design:type",Function),j("design:paramtypes",[void 0===Na?Object:Na,void 0===ja?Object:ja,void 0===Bd?Object:Bd,void 0===Xa?Object:Xa])],$u);class qu extends Nu{get _config(){return this.config}get enabled(){return!this._gpc.gpcEnabled&&!this._ccpa.userOptedOut&&$o(this._idho,"identityLink")}constructor(e,t,i){super(),this._ccpa=e,this._gpc=t,this._idho=i,this._name="identityLink",this.targetingKey="idl",this.eidSource="liveramp.com",this.config={name:this._name,params:{pid:"111"},storage:{type:"html5",name:"pbjs-identitylink",expires:60}}}}qu=B([bn("IdentityLinkIdModule"),M(),j("design:type",Function),j("design:paramtypes",[void 0===Na?Object:Na,void 0===ja?Object:ja,void 0===Bd?Object:Bd])],qu);class Gu extends Nu{get _config(){return this.config}get enabled(){return!this._gpc.gpcEnabled&&!this._ccpa.userOptedOut&&$o(this._idho,"lotamePanoramaId")}constructor(e,t,i){super(),this._ccpa=e,this._gpc=t,this._idho=i,this._name="lotamePanoramaId",this.targetingKey="lpid",this.storageKey="panoramaId",this.eidSource="crwdcntrl.net",this.config={name:this._name,params:{clientId:"17297"}}}}Gu=B([bn("LotamePanoramaIdModule"),M(),j("design:type",Function),j("design:paramtypes",[void 0===Na?Object:Na,void 0===ja?Object:ja,void 0===Bd?Object:Bd])],Gu);class Wu extends Nu{get _config(){return this.config}get enabled(){return!this._gpc.gpcEnabled&&!this._ccpa.userOptedOut&&$o(this._idho,"FTrack")&&!this._gdpr.enabled}constructor(e,t,i,s){super(),this._ccpa=e,this._gpc=t,this._idho=i,this._gdpr=s,this._name="FTrack",this.targetingKey="ftr",this.eidSource="flashtalking.com",this.config={name:this._name,params:{url:"https://d9.flashtalking.com/d9core",ids:{"device id":!0,"single device id":!0,"household id":!0}},storage:{type:"html5",name:"FTrackId",expires:60,refreshInSeconds:28800}}}}Wu=B([bn("FTrackIdModule"),M(),j("design:type",Function),j("design:paramtypes",[void 0===Na?Object:Na,void 0===ja?Object:ja,void 0===Bd?Object:Bd,void 0===Xa?Object:Xa])],Wu);class Ku extends Nu{get _config(){return this.config}get enabled(){return!this._gpc.gpcEnabled&&!this._ccpa.userOptedOut&&$o(this._idho,"lmpId")&&this._optableConfig.loblawEnabled}constructor(e,t,i,s){super(),this._ccpa=e,this._gpc=t,this._idho=i,this._optableConfig=s,this._name="lmpId",this.targetingKey="lmpId",this.storageKey=_s.KEY,this.eidSource="loblawmedia.ca",this.config={name:this._name,params:{clientId:"17297"}}}}Ku=B([bn("LoblawIdModule"),M(),j("design:type",Function),j("design:paramtypes",[void 0===Na?Object:Na,void 0===ja?Object:ja,void 0===Bd?Object:Bd,void 0===Fa?Object:Fa])],Ku);class Yu extends Nu{get _config(){return this.config}get enabled(){return!this._gpc.gpcEnabled&&!this._ccpa.userOptedOut&&$o(this._idho,"33acrossId")&&!this._gdpr.enabled}constructor(e,t,i,s,n,r){super(),this._ccpa=e,this._gpc=t,this._idho=i,this._gdpr=s,this._user=n,this._shareHemWithUserIdModule=r,this._name="33acrossId",this.targetingKey="33a",this.eidSource="33across.com",this.config={name:this._name,params:{pid:"0013300001i0fyfAAA",...this._shareHemWithUserIdModule.share({blockGraphHem:!0})&&{hem:this._user.hash}},storage:{name:"33acrossId",type:"html5",expires:90,refreshInSeconds:28800}}}}Yu=B([bn("ThirtyThreeAcrossIdModule"),M(),j("design:type",Function),j("design:paramtypes",[void 0===Na?Object:Na,void 0===ja?Object:ja,void 0===Bd?Object:Bd,void 0===Xa?Object:Xa,void 0===Vo?Object:Vo,void 0===zo?Object:zo])],Yu);class Xu extends Nu{get _config(){return this.config}get enabled(){return!this._gpc.gpcEnabled&&!this._ccpa.userOptedOut&&$o(this._idho,"fabrickId")&&!this._gdpr.enabled}constructor(e,t,i,s,n,r){super(),this._ccpa=e,this._gpc=t,this._idho=i,this._user=s,this._gdpr=n,this._shareHemWithUserIdModule=r,this._name="fabrickId",this.targetingKey="fab",this.eidSource="neustar.biz",this.config={name:this._name,params:{apiKey:"2487261909",...this._shareHemWithUserIdModule.share()&&{e:this._user.hash}},storage:{type:"html5",name:"pbjs_fabrickId",expires:60}}}}Xu=B([bn("FabrickIdModule"),M(),j("design:type",Function),j("design:paramtypes",[void 0===Na?Object:Na,void 0===ja?Object:ja,void 0===Bd?Object:Bd,void 0===Vo?Object:Vo,void 0===Xa?Object:Xa,void 0===zo?Object:zo])],Xu);class Qu extends Nu{get _config(){return this.config}get enabled(){return!this._gpc.gpcEnabled&&!this._ccpa.userOptedOut&&$o(this._idho,"criteo")}constructor(e,t,i){super(),this._ccpa=e,this._gpc=t,this._idho=i,this._name="criteo",this.targetingKey="cri",this.eidSource="criteo.com",this.config={name:this._name,storage:{type:"html5",name:"pbjs-criteo",expires:60}}}}Qu=B([bn("CriteoIdModule"),M(),j("design:type",Function),j("design:paramtypes",[void 0===Na?Object:Na,void 0===ja?Object:ja,void 0===Bd?Object:Bd])],Qu);class Ju extends Nu{get _config(){return this.config}get enabled(){return!this._gpc.gpcEnabled&&!this._ccpa.userOptedOut&&$o(this._idho,"pairId")&&this._liveRampAts.enabled}constructor(e,t,i,s){super(),this._ccpa=e,this._gpc=t,this._idho=i,this._liveRampAts=s,this._name="pairId",this.targetingKey="pair",this.eidSource="google.com",this.config={name:this._name,params:{liveramp:{}},storage:{type:"html5",name:"pbjs-pairId",expires:30,refreshInSeconds:1800}}}}Ju=B([bn("PairIdModule"),M(),j("design:type",Function),j("design:paramtypes",[void 0===Na?Object:Na,void 0===ja?Object:ja,void 0===Bd?Object:Bd,void 0===jd?Object:jd])],Ju);class Zu extends Er{init(){this._key="SharethroughLiveIntent",this._lookup="SHTLI",this._default=!1}}Zu=B([bn("SharethroughLiftLiveIntentExperiment"),M()],Zu);class ep extends br{init(){this._key="LiveIntentTimeOutExperiment",this._lookup="LITO"}}ep=B([bn("LiveIntentTimeOutExperiment"),M()],ep);class tp extends br{init(){this._key="LiveIntentFpiExpiration",this._lookup="LIFPI"}run(){return super.run()}}B([kn(),j("design:type",Function),j("design:paramtypes",[]),j("design:returntype",void 0)],tp.prototype,"run",null),tp=B([bn("LiveIntentTimeOutExperiment"),M()],tp);class ip extends Er{init(){this._key="LiveIntentHem",this._lookup="SDKLI",this._default=!1}}ip=B([bn("LiveIntentHemExperiment"),M()],ip);class sp extends Er{init(){this._key="LiveIntentUid2Hem",this._lookup="SDKLIR",this._default=!1}}sp=B([bn("LiveIntentHemWithoutIid2Experiment"),M()],sp);class np extends Nu{_getIdentifiers(){var e;const t=this._context.gpid;t?Fs.setInternalLocalStorage("adt_li_gpid",t):Fs.deleteLocalStorage("adt_li_gpid");const i=qo();i?Fs.setInternalLocalStorage("adt_li_panoramaid",i):Fs.deleteLocalStorage("adt_li_panoramaid");const s=null==(e=this._user.rcid)?void 0:e.value.sharedId;s?Fs.setInternalLocalStorage("adt_li_rcid",s):Fs.deleteLocalStorage("adt_li_rcid");const n=Fs.readExternalLocalStorage("pbjs-unifiedid"),r=n?JSON.parse(decodeURIComponent(n)):void 0,a=r?r.TDID:void 0;return a?Fs.setInternalLocalStorage("adt_li_unifiedid",a):Fs.deleteLocalStorage("adt_li_unifiedid"),[Ho()&&"_pubcid",t&&"adt_li_gpid",i&&"adt_li_panoramaid",a&&"adt_li_unifiedid",s&&"adt_li_rcid"].filter((e=>null!=e))}get _config(){return this.config}get enabled(){return!this._gpc.gpcEnabled&&!this._ccpa.userOptedOut&&$o(this._idho,"liveIntentId")}constructor(e,t,i,s,n,r,a,o,l,d,c,h,u,p,g){let m,_;if(super(),this._ccpa=e,this._gpc=t,this._idho=i,this._user=s,this._shareHemWithUserIdModule=n,this._sharethroughLiveIntentExperiment=r,this._liveIntentTimeoutExperiment=a,this._liveIntentFpiExpirationExperiment=o,this._cloudflareIdPartnerExpHo=l,this._context=d,this._prebidEventBus=c,this._emailCaptureHandler=h,this._liveIntentHemExperiment=u,this._gam=p,this._liveIntentUid2HemExperiment=g,this._name="liveIntentId",this.targetingKey="liid",this._user.rcid){const e=Iu(this._user.rcid.metadata.clientIp);"IPv4"===e?m=this._user.rcid.metadata.clientIp:"IPv6"===e&&(_=this._user.rcid.metadata.clientIp)}const f=this._getIdentifiers();var v;this.config={name:this._name,params:{distributorId:"did-001w",requestedAttributesOverrides:{uid2:!0,medianet:!0,bidswitch:!0,magnite:!0,index:!0,pubmatic:!0,sovrn:!0,openx:!0,triplelift:!0,thetradedesk:!0,sha2:!0,...this._sharethroughLiveIntentExperiment.result&&{sharethrough:!0}},...this._cloudflareIdPartnerExpHo.result&&m&&{ipv4:m},...this._cloudflareIdPartnerExpHo.result&&_&&{ipv6:_},...f.length&&{identifiersToResolve:f},..."d"!==this._liveIntentFpiExpirationExperiment.result&&this._liveIntentFpiExpirationExperiment.result&&{liCollectConfig:{fpiExpirationDays:parseInt(this._liveIntentFpiExpirationExperiment.result)}},...this._shareHemWithUserIdModule.share({blockGraphHem:!0,blockLiveIntentHem:!0})&&{emailHash:this._user.hash},ajaxTimeout:null!=(v=this._liveIntentTimeoutExperiment.result)?v:5e3},storage:{name:"__tamLIResolveResult",type:"html5",expires:1,refreshInSeconds:28800}},this._liveIntentHemExperiment.result&&this._prebidEventBus.liveIntentResolved.once((e=>{if(this._user.hash&&this._user.source&&Ss(this._user.source)&&e&&e.sha2){const t=this._user.hash==e.sha2?"1":"0";this._gam.setTargetingFlag("lihem_mtch",[t])}!this._user.hash&&e&&e.sha2&&(this._liveIntentUid2HemExperiment.result||!this._liveIntentUid2HemExperiment.result&&e.uid2)&&this._emailCaptureHandler.emailCaptured.emit({pii:{sha256Hash:e.sha2,source:`${ms.VALUES.SDKLI}${e.uid2?"":"r"}_c`,sourceCollectedDate:is()},identityDataSource:"sdkli"})}))}}np=B([bn("LiveIntentIdModule"),M(),j("design:type",Function),j("design:paramtypes",[void 0===Na?Object:Na,void 0===ja?Object:ja,void 0===Bd?Object:Bd,void 0===Vo?Object:Vo,void 0===zo?Object:zo,void 0===Zu?Object:Zu,void 0===ep?Object:ep,void 0===tp?Object:tp,void 0===zu?Object:zu,void 0===Fr?Object:Fr,void 0===Jn?Object:Jn,void 0===ko?Object:ko,void 0===ip?Object:ip,void 0===wc?Object:wc,void 0===sp?Object:sp])],np);class rp extends Er{init(){this._key="IdGraphUid2",this._lookup="IDGUID3",this._default=!1}run(){return super.run()}}B([kn(),j("design:type",Function),j("design:paramtypes",[]),j("design:returntype",void 0)],rp.prototype,"run",null),rp=B([bn("IdGraphUid2Experiment"),M()],rp);class ap extends Nu{get enabled(){var e;const t=!bs({source:null!=(e=this._user.source)?e:""}),i=this._idGraphUid2Experiment.result;return!this._gpc.gpcEnabled&&!this._ccpa.userOptedOut&&$o(this._idho,"unifiedId2")&&!this._gdpr.enabled&&(t||i)}getToken(){return this._uid2AdvertisingToken?this._uid2AdvertisingToken.latestToken?this._uid2AdvertisingToken.latestToken:this._uid2AdvertisingToken.originalToken:this._uid2ServerToken}get _config(){return this.config}async _setBridgedTargetingFlag(e){await this._googleAdManager.waitForQueue();const t=Go(e);t&&this._googleAdManager.setTargetingFlag("uid2b",[t],!0)}constructor(e,t,i,s,n,r,a){super(),this._ccpa=e,this._gpc=t,this._idho=i,this._gdpr=s,this._user=n,this._idGraphUid2Experiment=r,this._googleAdManager=a,this._name="uid2",this.targetingKey="uid2",this.eidSource="uidapi.com",this.storageKey="__uid2_advertising_token",this._uid2ServerToken=Fs.readExternalLocalStorage("__uid2_server_token"),this._uid2AdvertisingToken=Fs.readExternalLocalStorage("__uid2_advertising_token");const o=this.getToken(),l=!!(null==o?void 0:o.matcher);this.config={name:this._name,params:{storage:"localStorage",...o?{uid2Token:o,declareBridged:l}:{},...(null==o?void 0:o.matcher)&&{matcher:o.matcher}}},l&&(null==o?void 0:o.matcher)&&this._setBridgedTargetingFlag(null==o?void 0:o.matcher).catch((e=>{W.error("UnifiedId2IdModule","_setBridgedTargetingFlag",e)}))}}ap=B([bn("UnifiedId2IdModule"),M(),j("design:type",Function),j("design:paramtypes",[void 0===Na?Object:Na,void 0===ja?Object:ja,void 0===Bd?Object:Bd,void 0===Xa?Object:Xa,void 0===Vo?Object:Vo,void 0===rp?Object:rp,void 0===wc?Object:wc])],ap);class op extends Nu{get _config(){return this.config}get enabled(){return!this._gpc.gpcEnabled&&!this._ccpa.userOptedOut&&$o(this._idho,"sharedId")}constructor(e,t,i){super(),this._ccpa=e,this._gpc=t,this._idho=i,this._name="sharedId",this.targetingKey="shl",this.eidSource="pubcid.org",this.config={name:this._name,storage:{type:"html5",name:"_pubcid",expires:60}}}}op=B([bn("SharedIdModule"),M(),j("design:type",Function),j("design:paramtypes",[void 0===Na?Object:Na,void 0===ja?Object:ja,void 0===Bd?Object:Bd])],op);class lp extends Nu{get _config(){return this.config}get enabled(){return!this._gpc.gpcEnabled&&!this._ccpa.userOptedOut&&$o(this._idho,"linkedInAdsId")}constructor(e,t,i){super(),this._ccpa=e,this._gpc=t,this._idho=i,this._name="linkedInAdsId",this.targetingKey="liaid",this.config={name:this._name,storage:{type:"html5",name:"linkedin_ads_id",expires:30}}}}lp=B([bn("LinkedInAdsIdModule"),M(),j("design:type",Function),j("design:paramtypes",[void 0===Na?Object:Na,void 0===ja?Object:ja,void 0===Bd?Object:Bd])],lp);class dp{_removeIdsOnWordpressPage(){this._context.isWordPressLogin&&(this.ids=new Map)}get(e){return"FTrack"===e?this.ids.get("ftrack"):"merkleId"===e?this.ids.get("merkuryId"):this.ids.get(e)}forEach(e){return this.ids.forEach(e)}values(){return this.ids.values()}constructor(e,t,i,s,n,r,a,o,l,d,c,h,u,p,g,m,_){this._context=e,this._connectIdModule=t,this._unifiedIdModule=i,this._id5IdModule=s,this._merkuryIdModule=n,this._identityLinkIdModule=r,this._lotamePanoramaIdModule=a,this._thirtyThreeAcrossIdModule=o,this._fTrackIdModule=l,this._loblawIdModule=d,this._fabrickIdModule=c,this._criteoIdModule=h,this._liveIntentIdModule=u,this._pairIdModule=p,this._unifiedId2IdModule=g,this._sharedIdModule=m,this._linkedInAdsIdModule=_,this._connectIdConfig=["connectId",{id:this._connectIdModule._config,targetingKey:this._connectIdModule.targetingKey,enabled:this._connectIdModule.enabled,eidSource:this._connectIdModule.eidSource}],this._unifiedIdConfig=["unifiedId",{id:this._unifiedIdModule._config,targetingKey:this._unifiedIdModule.targetingKey,enabled:this._unifiedIdModule.enabled,eidSource:this._unifiedIdModule.eidSource,eidSourceAlias:this._unifiedIdModule.eidSourceAlias,storageParser:e=>JSON.parse(decodeURIComponent(e)).TDID}],this._unifiedId2Config=["uid2",{id:this._unifiedId2IdModule._config,enabled:this._unifiedId2IdModule.enabled,eidSource:this._unifiedId2IdModule.eidSource,targetingKey:this._unifiedId2IdModule.targetingKey,storageKey:this._unifiedId2IdModule.storageKey}],this._id5IdConfig=["id5Id",{id:this._id5IdModule._config,enabled:this._id5IdModule.enabled,targetingKey:this._id5IdModule.targetingKey,eidSource:this._id5IdModule.eidSource,storageParser:e=>JSON.parse(decodeURIComponent(e)).gp}],this._merkuryIdConfig=["merkuryId",{id:this._merkuryIdModule._config,enabled:this._merkuryIdModule.enabled,eidSource:this._merkuryIdModule.eidSource,targetingKey:this._merkuryIdModule.targetingKey}],this._identityLinkConfig=["identityLink",{id:this._identityLinkIdModule._config,enabled:this._identityLinkIdModule.enabled,eidSource:this._identityLinkIdModule.eidSource,targetingKey:this._identityLinkIdModule.targetingKey}],this._pairIdConfig=["pairId",{id:this._pairIdModule._config,enabled:this._pairIdModule.enabled,eidSource:this._pairIdModule.eidSource,targetingKey:this._pairIdModule.targetingKey}],this._criteoIdConfig=["criteo",{id:this._criteoIdModule._config,enabled:this._criteoIdModule.enabled,eidSource:this._criteoIdModule.eidSource,targetingKey:this._criteoIdModule.targetingKey}],this._sharedIdConfig=["sharedId",{id:this._sharedIdModule._config,enabled:this._sharedIdModule.enabled,eidSource:this._sharedIdModule.eidSource,targetingKey:this._sharedIdModule.targetingKey}],this._fabrickIdConfig=["fabrickId",{id:this._fabrickIdModule._config,enabled:this._fabrickIdModule.enabled,eidSource:this._fabrickIdModule.eidSource,targetingKey:this._fabrickIdModule.targetingKey}],this._fTrackIdConfig=["ftrack",{id:this._fTrackIdModule._config,enabled:this._fTrackIdModule.enabled,eidSource:this._fTrackIdModule.eidSource,targetingKey:this._fTrackIdModule.targetingKey}],this._33AcrossIdConfig=["33acrossId",{id:this._thirtyThreeAcrossIdModule._config,enabled:this._thirtyThreeAcrossIdModule.enabled,eidSource:this._thirtyThreeAcrossIdModule.eidSource,targetingKey:this._thirtyThreeAcrossIdModule.targetingKey}],this._liveIntentIdConfig=["liveIntentId",{id:this._liveIntentIdModule._config,enabled:this._liveIntentIdModule.enabled,targetingKey:this._liveIntentIdModule.targetingKey,storageParser:e=>JSON.parse(decodeURIComponent(e))}],this._lotamePanoramaIdConfig=["lotamePanoramaId",{id:this._lotamePanoramaIdModule._config,enabled:this._lotamePanoramaIdModule.enabled,targetingKey:this._lotamePanoramaIdModule.targetingKey,eidSource:this._lotamePanoramaIdModule.eidSource,storageKey:this._lotamePanoramaIdModule.storageKey}],this._lmpIdConfig=["lmpId",{id:this._loblawIdModule._config,enabled:this._loblawIdModule.enabled,targetingKey:this._loblawIdModule.targetingKey,eidSource:this._loblawIdModule.eidSource,storageKey:this._loblawIdModule.storageKey}],this._linkedInAdsIdConfig=["linkedInAdsId",{id:this._linkedInAdsIdModule._config,enabled:this._linkedInAdsIdModule.enabled,targetingKey:this._linkedInAdsIdModule.targetingKey}],this.ids=new Map([this._sharedIdConfig,this._connectIdConfig,this._unifiedIdConfig,this._unifiedId2Config,this._id5IdConfig,this._identityLinkConfig,this._merkuryIdConfig,this._pairIdConfig,this._criteoIdConfig,this._fabrickIdConfig,this._fTrackIdConfig,this._33AcrossIdConfig,this._liveIntentIdConfig,this._lotamePanoramaIdConfig,this._lmpIdConfig,this._linkedInAdsIdConfig]),this._removeIdsOnWordpressPage()}}dp=B([bn("UserIds"),M(),j("design:type",Function),j("design:paramtypes",[void 0===Fr?Object:Fr,void 0===Uu?Object:Uu,void 0===Vu?Object:Vu,void 0===Hu?Object:Hu,void 0===$u?Object:$u,void 0===qu?Object:qu,void 0===Gu?Object:Gu,void 0===Yu?Object:Yu,void 0===Wu?Object:Wu,void 0===Ku?Object:Ku,void 0===Xu?Object:Xu,void 0===Qu?Object:Qu,void 0===np?Object:np,void 0===Ju?Object:Ju,void 0===ap?Object:ap,void 0===op?Object:op,void 0===lp?Object:lp])],dp);class cp{get enabled(){return!0}}class hp extends Er{init(){this._key="IdGraphLiveRamp",this._lookup="IDGLR",this._default=!1}run(){return super.run()}constructor(...e){super(...e),this.source=""}}B([kn(),j("design:type",Function),j("design:paramtypes",[]),j("design:returntype",void 0)],hp.prototype,"run",null),hp=B([bn("IdGraphLiveRampExperiment"),M()],hp);class up extends cp{get enabled(){return this._enabled}_runLiveRamp(e){if(bs({source:e.source})&&!this._idGraphLiveRampExperiment.result)return;if(fs(e.source))return;let t,i="";var s;if(this._config.gdpr.enabled)t="gdpr",i=null!=(s=e.consent)?s:"";else if(this._config.ccpa.required){var n;t="ccpa",i=null!=(n=this._config.ccpa.privacyString)?n:this._config.ccpa.ccpaOptIn}try{const s=[e.sha256Hash,e.sha1Hash].filter((e=>e&&e.length));window.atsenvelopemodule.setAdditionalData({consentString:i,...void 0!==t?{consentType:t}:{},id:s.length?s:e.email,type:e.sha256Hash||e.sha1Hash?"emailHashes":"email"})}catch(e){W.error("LiveRampPiiPartner","processPii","Error setting ATS additional data",e)}}processPii(e){this._isEnvelopeModuleReady?this._runLiveRamp(e):window.addEventListener("envelopeModuleReady",(()=>{this._runLiveRamp(e)}))}get _shouldSetTargeting(){return this._enabled&&(!!Fs.readExternalLocalStorage(this._envelopeKey)||!!Fs.readExternalCookie(this._envelopeKey))}constructor(e,t){var i;super(),this._config=e,this._idGraphLiveRampExperiment=t,this._envelopeKey="_lr_env",this._isEnvelopeModuleReady=!1,this._enabled=!this._config.gpc.gpcEnabled&&!this._config.ccpa.userOptedOut&&(null==(i=this._config.liveRampAts)?void 0:i.enabled)&&"localStorage"in window,window.addEventListener("envelopeModuleReady",(()=>{this._isEnvelopeModuleReady=!0}))}}up=B([bn("LiveRampPiiPartner"),D(),j("design:type",Function),j("design:paramtypes",[void 0===_c?Object:_c,void 0===hp?Object:hp])],up);class pp{get isPubmaticEidSetByLiveIntent(){var e,t;return null!=(t=null==(e=window.pbjs)?void 0:e.getUserIdsAsEids().some((e=>"pubmatic.com"===e.source&&e.uids.some((e=>{var t;return"liveintent.com"===(null==(t=e.ext)?void 0:t.provider)})))))&&t}}pp=B([M()],pp);const gp=e=>{var t;const i=null==(t=e.uids[0].ext)?void 0:t.provider;return"liveintent.com"===i||i===window.location.hostname},mp=e=>"id5-sync.com"===e.matcher||"id5.com"===e.matcher,_p=e=>{var t,i;const s="adserver.org"===e.source||"adsrvr.org"===e.source,n=null==(t=e.uids[0].ext)?void 0:t.rtiPartner,r=null==(i=e.uids[0].ext)?void 0:i.provider;return s&&"TDID"===n&&!r},fp=e=>e.source.includes("triplelift.com");class vp{processEids(e){const t={},i=[],s=this._getRules();for(const n of e){const e=n.source;if(!t[e]){t[e]=[n];continue}const r=t[e];let a=!1;const o=[];for(const[e,t]of r.entries()){const i=this._decidePreferredEid(t,n,s);if(i.excluded.includes(n)){a=!0;break}i.excluded.includes(t)&&o.push(e)}if(a){if(i.push(n),o.length>0){o.sort(((e,t)=>t-e));for(const e of o){const[t]=r.splice(e,1);i.push(t)}}}else{if(o.length>0){o.sort(((e,t)=>t-e));for(const e of o){const[t]=r.splice(e,1);i.push(t)}}r.push(n)}}return{included:Object.values(t).flat(),excluded:i}}_decidePreferredEid(e,t,i){for(const s of i){if(!s.enabled)continue;if(s.sources&&(!s.sources.includes(e.source)||!s.sources.includes(t.source)))continue;const i=s.fn(e,t);if("a"===i)return{included:[e],excluded:[t]};if("b"===i)return{included:[t],excluded:[e]};if("none"===i)return{included:[],excluded:[e,t]}}return{included:[e],excluded:[t]}}_getRules(){return[{enabled:!0,fn:(e,t)=>{const i=gp(t),s=gp(e),n=mp(t),r=mp(e);return i&&r?"b":s&&n?"a":"both"}},{enabled:!0,sources:["adserver.org","adsrvr.org"],fn:(e,t)=>{if(e.source===t.source){const i=gp(t);if(i!==gp(e))return i?"b":"a";const s=mp(t);if(s!==mp(e))return s?"b":"a";const n=_p(t);if(n!==_p(e))return n?"b":"a"}return"both"}}]}}vp=B([M()],vp);class yp extends vr{init(){this._key="UID1BidderSupression",this._lookup="UID1BS",this._default=[]}get result(){var e;return null!=(e=this._result)?e:this._default}}yp=B([bn("Uid1BidderSuppressionExperiment"),M()],yp);class bp{processEids(e,t){let i=e,s=[];const n=this._getRules();for(const e of n){if(!e.enabled)continue;if(e.bidders&&t&&!e.bidders.includes(t))continue;const n=e.fn(i,t);i=n.included,s=s.concat(n.excluded)}return{included:i,excluded:s}}_getRules(){return[{enabled:!0,fn:e=>{if(!e.some((e=>(e=>e.source.includes("openx.com"))(e)&&gp(e))))return{included:e,excluded:[]};const t=e.filter((e=>(e=>"adserver.org"===e.source||"adsrvr.org"===e.source)(e)&&mp(e)));return{included:e.filter((e=>!t.includes(e))),excluded:t}}},{enabled:this._isDirectUid1BidderSuppressionEnabled(),bidders:this._getDirectUid1BidderSuppressionList(),fn:(e,t)=>{if(!t)return{included:e,excluded:[]};if(!e.some((e=>this._bidderCodeToLiveIntentEidSourceMap.get(t)===e.source&&gp(e))))return{included:e,excluded:[]};const i=e.filter((e=>_p(e)));return{included:e.filter((e=>!i.includes(e))),excluded:i}}},{enabled:!0,fn:e=>{if(!e.some((e=>"liveintent.indexexchange.com"===e.source&&gp(e))))return{included:e,excluded:[]};const t=e.filter((e=>(e=>e.source.includes("indexexchange.com"))(e)&&mp(e)));return{included:e.filter((e=>!t.includes(e))),excluded:t}}},{enabled:!0,fn:e=>{if(!e.some((e=>"liveintent.triplelift.com"===e.source&&gp(e))))return{included:e,excluded:[]};const t=e.filter((e=>fp(e)&&mp(e)));return{included:e.filter((e=>!t.includes(e))),excluded:t}}},{enabled:!0,fn:e=>({included:e.map((e=>{if("uidapi.com"===e.source){const t=this._userIds.get("uid2"),i=t&&t.id?t.id.params:void 0,s=(null==i?void 0:i.uid2Token)&&"object"==typeof i.uid2Token&&"matcher"in i.uid2Token?i.uid2Token.matcher:void 0;return{...e,...s&&{matcher:s,inserter:"cafemedia.com"}}}return e})),excluded:[]})},{enabled:!0,fn:e=>({included:e.map((e=>fp(e)&&mp(e)?{...e,matcher:"id5.com",inserter:"raptive.com"}:e)),excluded:[]})}]}_getDirectUid1BidderSuppressionList(){var e;return(null!=(e=this._uid1BidderSuppressionExperiment.result)?e:[]).map((e=>Re[e]))}_isDirectUid1BidderSuppressionEnabled(){const e=this._userIds.get("liveIntentId"),t=this._userIds.get("unifiedId");let i;try{i=nl()}catch(e){i={}}return Boolean((null==e?void 0:e.enabled)&&(null==t?void 0:t.enabled)&&(null==i?void 0:i.nonId)&&!(null==i?void 0:i.thetradedesk))}constructor(e,t){this._userIds=e,this._uid1BidderSuppressionExperiment=t,this._bidderCodeToLiveIntentEidSourceMap=new Map([[te.Rubicon,"rubiconproject.com"],[te.IndexExchange,"liveintent.indexexchange.com"],[te.Pubmatic,"pubmatic.com"],[te.OpenX,"openx.net"],[te.Triplelift,"liveintent.triplelift.com"]])}}bp=B([M(),j("design:type",Function),j("design:paramtypes",[void 0===dp?Object:dp,void 0===yp?Object:yp])],bp);class Sp{getSupplementalEids(e=[]){var t;return(null!=(t=this._prebidMethods.getConfig("ortb2.user.ext.eids"))?t:[]).filter((t=>!(t.source&&e.length>0)||e.includes(t.source)))}getModuleEids(e=[]){var t;return(null!=(t=this._prebidMethods.getUserIdsAsEids())?t:[]).filter((t=>!(t.source&&e.length>0)||e.includes(t.source)))}getEids(e=[]){return{module:this.getModuleEids(e),supplemental:this.getSupplementalEids(e)}}getProcessedEids(e=[]){const t=this.getEids(e),i=[...t.module,...t.supplemental],{included:s,excluded:n}=this._eidSelector.processEids(i),{included:r,excluded:a}=this._eidProcessor.processEids(s);return{included:r,excluded:[...n,...a]}}getProcessedEidsForBidder(e,t){return this._eidProcessor.processEids(e,t)}constructor(e,t,i){this._prebidMethods=e,this._eidSelector=t,this._eidProcessor=i}}Sp=B([M(),j("design:type",Function),j("design:paramtypes",[void 0===Mn?Object:Mn,void 0===vp?Object:vp,void 0===bp?Object:bp])],Sp);class Ep{getSyncedIdModules(e){return[...e].reduce(((e,t)=>{const i=this._userIds.get(t.name);return i&&this.getStoredUserIds(i)?(e.push(i.id.name),e):e}),[])}getSyncedBrowserIdPartners(e){const t=this.getSyncedIdModules(e).map((e=>{var t;return null==(t=this._userIds.get(e))?void 0:t.targetingKey})).filter((e=>Boolean(e)));this._context.gpid&&t.push("gpid");const i=this.getMagniteCarbonId(),s=this.getAmazonPublisherAudienceId(),n=this._getConditionalPiiPartners(),r=this._getRaptiveConnectedId();return[...t,...i,...s,...n,...r]}_getRaptiveConnectedId(){const e=[];return Fs.readExternalCookie("_rcid")&&e.push("rcid"),e}_getConditionalPiiPartners(){const e=[];return this._liveRampPiiPartner._shouldSetTargeting&&e.push("ats"),e}setUid1TargetingFlag(e){const t=e.find((e=>"adserver.org"===e.source&&_p(e))),i=e.find((e=>"adsrvr.org"===e.source&&_p(e)));t&&i?this._gam.setTargetingFlag("uid1e",["2"],!0):t?this._gam.setTargetingFlag("uid1e",["1"],!0):i&&this._gam.setTargetingFlag("uid1e",["0"],!0)}getSyncedAuctionEidPartners(e){let t=[];const{included:i,excluded:s}=this._eidManager.getProcessedEids();if(i){this.setUid1TargetingFlag(i);const s=i.filter((e=>"id5-sync.com"!==e.matcher));t=e.reduce(((e,t)=>{const i=s.find((e=>e.source===(null==t?void 0:t.eidSource)||t.eidSourceAlias&&e.source===(null==t?void 0:t.eidSourceAlias)));if(i){if(("adserver.org"===i.source||"uidapi.com"===i.source)&&i.uids.length>0){var n;const t=null==(n=i.uids[0].ext)?void 0:n.provider,s="adserver.org"===i.source;if("uidapi.com"===i.source&&t){if("liveintent.com"===t)return e}else if(s&&("liveintent.com"===t||t===window.location.hostname))return e}e.push(t.targetingKey)}return e}),[])}const n=this._getLiveIntentEidPartners(i),r=this._getBidderLevelEidPartners(),[a,o]=this._getId5EidPartners(i,s);return[[...t,...n,...r,...a],[...o]]}_getLiveIntentEidPartners(e){const t=[],i=new Map([["liveintent.com","li_id"],["uidapi.com","li_uid2"],["rubiconproject.com","li_mgn"],["liveintent.indexexchange.com","li_ix"],["liveintent.sovrn.com","li_svrn"],["media.net","li_mnet"],["pubmatic.com","li_pub"],["openx.net","li_ox"],["bidswitch.net","li_bdswt"],["adserver.org","li_uid1"],["liveintent.triplelift.com","li_tl"],["sharethrough.com","li_sht"]]);for(const[n,r]of i){const i=null==e?void 0:e.find((e=>e.source===n));var s;if("adserver.org"===n||"uidapi.com"===n||"pubmatic.com"===n){if(i&&i.uids.length>0)(null==(s=i.uids[0].ext)?void 0:s.hasOwnProperty("provider"))&&t.push(r)}else i&&t.push(r)}return t}_getBidderLevelEidPartners(){const e=[];return"mediawallah-dcn"===this._userSyncConfig.pubmaticBidderLevelEidSource&&e.push("mw_pub"),e}_getId5EidPartners(e,t){const i=[],s=[],n=new Map([["adserver.org","id5_uid1"],["adsrvr.org","id5_uid1"],["adnxs.com","id5_appn"],["bidswitch.net","id5_bdswt"],["indexexchange.com","id5_ix"],["kargo.com","id5_krg"],["pubmatic.com","id5_pub"],["rubiconproject.com","id5_mgn"],["triplelift.com","id5_tl"],["yieldmo.com","id5_ym"]]);for(const[r,a]of n){const n=e.find((e=>e.source===r&&mp(e))),o=t.find((e=>e.source===r&&mp(e)));n?i.push(a):o&&s.push(a)}return[i,s]}getAmazonPublisherAudienceId(){return Fs.readExternalCookie("AMZN-Token")?["amzn"]:[]}getMagniteCarbonId(){const e=Fs.readExternalLocalStorage("carbon_ccuid"),t=Fs.readExternalCookie("ccuid"),i=Fs.readExternalCookie("ccsid");return e||t||i?["mgncrbn"]:[]}getStoredUserIds(e){const{id:{storage:t},storageKey:i}=e;let s;return t&&"cookie"===t.type&&window.navigator.cookieEnabled?s=Fs.readExternalCookie(t.name):t&&"html5"===t.type?s=Fs.readExternalLocalStorage(t.name):i&&(s=Fs.readExternalLocalStorage(i)),s}getParsedUserIdStoredValue(e){const t=this.getStoredUserIds(e);if(t){if(!e.storageParser)return t;try{return e.storageParser(t)}catch(e){return t}}}getLiveRampAtsEnvelopeSourceId(){const e="_lr_env_src_ats";var t;return null!=(t=Fs.readExternalLocalStorage(e)||Fs.readExternalCookie(e))?t:""}constructor(e,t,i,s,n,r){this._userIds=e,this._liveRampPiiPartner=t,this._context=i,this._userSyncConfig=s,this._gam=n,this._eidManager=r}}Ep=B([bn("UserIdTargeting"),D(),j("design:type",Function),j("design:paramtypes",[void 0===dp?Object:dp,void 0===up?Object:up,void 0===Fr?Object:Fr,void 0===pp?Object:pp,void 0===wc?Object:wc,void 0===Sp?Object:Sp])],Ep);class Cp extends Fn{_refreshUid2TargetingKey(){this._enabledUserIds=[...this._userIds.values()].filter((e=>e.enabled)).map((e=>{if("uid2"===e.id.name){var t;const i=null==(t=e.id.params)?void 0:t.uid2Token;"optable"===(null==i?void 0:i.provider)&&(e.targetingKey="opt_uid2")}return e.id})),this._enabledUserIdConfigs=[...this._userIds.values()].filter((e=>e.enabled)).map((e=>{if("uid2"===e.id.name){var t;const i=null==(t=e.id.params)?void 0:t.uid2Token;"optable"===(null==i?void 0:i.provider)&&(e.targetingKey="opt_uid2")}return e}))}get enabled(){return!this._gpcConfig.gpcEnabled&&!this._ccpaConfig.userOptedOut}getTargetingData(){if(!this.enabled)return[];const[e,t]=this._userIdTargeting.getSyncedAuctionEidPartners(this._enabledUserIdConfigs),i=this._userIdTargeting.getSyncedBrowserIdPartners(this._enabledUserIds);return this._flattenSyncedIdPartnerData(i,e,t)}_flattenSyncedIdPartnerData(e,t,i){const s=e.filter((e=>!t.includes(e))),n=t.filter((t=>!e.includes(t))),r=i.filter((t=>!e.includes(t))),a=e.filter((e=>t.includes(e)));return[...s.map((e=>`i:${e}`)),...n.map((e=>`e:${e}`)),...r.map((e=>`i:${e}`)),...a]}get enabledUserIds(){return this.enabled?[...this._userIds.values()].map((e=>e.id)):[]}init(){if(!this.enabled)return;const e={userIds:this._enabledUserIds};this._ppid&&(e.ppid="pubcid.org"),this.setTAMLiveIntentFlag(),this.setUserIdsWithPrebid(e),this.setLiveRampAtsEnvelopeSourceId(),this._prebidEventBus.auctionInit.on((e=>{if(!(null==e?void 0:e.bidderRequests))return;const{included:t}=this._eidManager.getProcessedEids(),i={},s=e=>{if(i[e])return i[e];const{included:s}=this._eidManager.getProcessedEidsForBidder(t,e);return i[e]=s,s};e.bidderRequests.forEach((e=>{var t,i;const n=s(e.bidderCode);null==(t=e.bids)||t.forEach((e=>{e.userIdAsEids=n})),(null==(i=e.ortb2)?void 0:i.user)&&(e.ortb2.user.ext=e.ortb2.user.ext||{},e.ortb2.user.ext.eids=n)})),e.adUnits.forEach((e=>{var t;null==(t=e.bids)||t.forEach((e=>{e.userIdAsEids=s(e.bidder)}))}))}))}setTAMLiveIntentFlag(){const e=this._enabledUserIdConfigs.find((e=>"liveIntentId"===e.id.name));window.liModuleEnabled=void 0!==e}setLiveRampAtsEnvelopeSourceId(){const e=this._userIdTargeting.getLiveRampAtsEnvelopeSourceId();e&&this._gam.setTargetingFlag("ats_src","true"===e?["t"]:["f"])}setUserIdsWithPrebid(e){this._prebidMethods.setConfig({userSync:e})}async _setPPID(){var e,t,i;const s=this._context.gpid,n=await this._user.getRcid(),r=Ho();if(null==n||null==(e=n.value)?void 0:e.sharedId){const e=this._isRCIDConversionEven(n.value.sharedId);this._ppid=e?{value:n.value.sharedId,source:"rcid_e"}:{value:r,source:"rcid_o"}}else s?this._ppid={value:s,source:"gpid"}:r&&(this._ppid={value:r,source:"sh_id"});this._addPPIDToBidStream(),(null==(t=this._ppid)?void 0:t.value)&&"rcid_e"===(null==(i=this._ppid)?void 0:i.source)&&this._addRcidAsEid(this._ppid.value)}_addPPIDToBidStream(){var e,t,i,s;let n=null!=(s=null==(e=this._ppid)?void 0:e.value)?s:null;if(("sh_id"===(null==(t=this._ppid)?void 0:t.source)||"rcid_o"===(null==(i=this._ppid)?void 0:i.source))&&null!==n){const e=n.replace(/[^0-9a-zA-Z+.=\/_\-$,{}]/g,"");if(!(e.length>=22&&e.length<=150))return void W.error("UserIdComponent","_initializePPID","Shared ID is invalid, not setting PPID");n=e}var r,a;n&&(this._prebidMethods.setConfig({ppid:n}),this._gam.setIdAsPPID(n),(null==(r=this._ppid)?void 0:r.source)&&this._gam.setTargetingFlag("ppid",[null==(a=this._ppid)?void 0:a.source],!0))}_isRCIDConversionEven(e){const t=e.split("").map((e=>e.charCodeAt(0).toString(2))).join(" ");var i;return i=t,parseInt(i.charAt(i.length-1))%2==0}_addRcidAsEid(e){const t={source:"pubcid.org",uids:[{id:e,atype:1}]};this._ortb2.addEidsToOrtb2(t)}constructor(e,t,i,s,n,r,a,o,l,d,c,h,u){super(),this._gpcConfig=e,this._ccpaConfig=t,this._prebidMethods=i,this._userIdTargeting=s,this._userIds=n,this._gam=r,this._slotEventBus=a,this._userIdEventBus=o,this._prebidEventBus=l,this._user=d,this._context=c,this._ortb2=h,this._eidManager=u,this._enabledUserIds=[],this._enabledUserIdConfigs=[],this._ppid=null,this.enabled&&(this._enabledUserIds=[...n.values()].filter((e=>e.enabled)).map((e=>{var t;if("sharedId"===e.id.name&&(null==(t=this._ppid)?void 0:t.source)&&this._ppid.value){const t=e.id.storage&&e.id.storage.name||"";"sh_id"!==this._ppid.source&&"rcid_o"!==this._ppid.source||(this._ppid.value=Fs.readExternalLocalStorage(t)),e.id.value={pubcid:this._ppid.value}}if("uid2"===e.id.name){var i;const t=null==(i=e.id.params)?void 0:i.uid2Token;"optable"===(null==t?void 0:t.provider)&&(e.targetingKey="opt_uid2")}return e.id})),this._enabledUserIdConfigs=[...n.values()].filter((e=>e.enabled)).map((e=>{if("uid2"===e.id.name){var t;const i=null==(t=e.id.params)?void 0:t.uid2Token;"optable"===(null==i?void 0:i.provider)&&(e.targetingKey="opt_uid2")}return e})),this._slotEventBus.requestingBids.once(this._setPPID.bind(this)),this._slotEventBus.refreshingBids.once(this._addPPIDToBidStream.bind(this)),this._userIdEventBus.uid2Refreshed.on((()=>{this._refreshUid2TargetingKey()})))}}Cp=B([bn("UserIdComponent"),M(),j("design:type",Function),j("design:paramtypes",[void 0===ja?Object:ja,void 0===Na?Object:Na,void 0===Mn?Object:Mn,void 0===Ep?Object:Ep,void 0===dp?Object:dp,void 0===wc?Object:wc,void 0===Bn?Object:Bn,void 0===er?Object:er,void 0===Jn?Object:Jn,void 0===Vo?Object:Vo,void 0===Fr?Object:Fr,void 0===Lu?Object:Lu,void 0===Sp?Object:Sp])],Cp);class Tp{}class wp extends br{init(){this._key="Analytics2",this._lookup="PBA2"}run(){return super.run()}}B([kn(),j("design:type",Function),j("design:paramtypes",[]),j("design:returntype",void 0)],wp.prototype,"run",null),wp=B([bn("AnalyticsExperiment"),M()],wp);class kp extends Tp{init(){window.localStorage?Cs(this._url).then(this.initializeAy.bind(this)).catch((e=>W.error("AssertiveYieldAnalytics","init - failed",e))):W.error("AssertiveYieldAnalytics","init",new Error("Disabled ay because localStorage is undefined"))}initializeAy(){if(!window.ayS2STag)return void W.error("AssertiveYieldAnalytics","failed to load ayS2STag");const{bucket:e,deployment:t}=window.adthrive;window.ayS2STag.init({entityId:this._entityId,pbjs:"pbjs",analytics:{enabled:!0,custom_1:this._prebidServerMultiCallExperiment.result,custom_2:e,custom_3:t,...("ay"===this._prebidServerMultiCallExperiment.result||"all"===this._prebidServerMultiCallExperiment.result)&&{custom_4:"aysse"}}})}get enabled(){return"ay"===this._analyticsExperiment.result}constructor(e,t){super(),this._analyticsExperiment=e,this._prebidServerMultiCallExperiment=t,this.name="Assertive-yield",this._url="https://ads.adthrive.com/ay/ay.js",this._entityId="8DBojqDi4uyEa5CBW"}}kp=B([bn("AssertiveYieldAnalytics"),D(),j("design:type",Function),j("design:paramtypes",[void 0===wp?Object:wp,void 0===Yr?Object:Yr])],kp);var Ap=nh(to,"WeakMap");var Ip=Ah(Object.keys,Object),xp=Object.prototype.hasOwnProperty;function Pp(e){return Nh(e)?du(e):function(e){if(!Ph(e))return Ip(e);var t=[];for(var i in Object(e))xp.call(e,i)&&"constructor"!=i&&t.push(i);return t}(e)}var Op=Object.prototype.propertyIsEnumerable,Rp=Object.getOwnPropertySymbols,Lp=Rp?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var i=-1,s=null==e?0:e.length,n=0,r=[];++io))return!1;var d=r.get(e),c=r.get(t);if(d&&c)return d==t&&c==e;var h=-1,u=!0,p=2&i?new cg:void 0;for(r.set(e,t),r.set(t,e);++h{if(t.length>e.length)return!1;const i=e.length-t.length;for(let s=0;s{const s=dg(e),n=t.map((e=>e.split("."))),r=[],a=[];for(const e of n)1===e.length?r.push(e[0]):a.push(e);const o=Object.entries(i).map((([e,t])=>({pathSegments:e.split("."),replacementValue:t}))),l=new Map,d=[];for(const{pathSegments:e,replacementValue:t}of o)if(1===e.length)l.set(e[0],t);else{const i=e.slice(0,-1),s=e[e.length-1];d.push({prefix:i,lastKey:s,replacement:t})}const c=(e,t)=>{if(Array.isArray(e)){const i=e.map((e=>c(e,t))).filter((e=>void 0!==e&&((!Array.isArray(e)||0!==e.length)&&("object"!=typeof e||null===e||0!==Object.keys(e).length))));return 0===i.length?void 0:i}if("object"==typeof e&&null!==e){for(const i of Object.keys(e)){const s=e[i];if(r.includes(i)){delete e[i];continue}let n=!1;for(const s of a)if(s.length>=2){const r=s.slice(0,-1),a=s[s.length-1];if(wg(t,r)&&i===a){delete e[i],n=!0;break}}if(n)continue;if(l.has(i)){e[i]=l.get(i);continue}let o=!1;for(const{prefix:s,lastKey:n,replacement:r}of d)if(wg(t,s)&&i===n){e[i]=r,o=!0;break}if(o)continue;const h=c(s,[...t,i]);void 0===h||Array.isArray(h)&&0===h.length||"object"==typeof h&&null!==h&&0===Object.keys(h).length?delete e[i]:e[i]=h}return 0===Object.keys(e).length?void 0:e}return e},h=c(s,[]);return null!=h?h:{}},Ag=["enforcement","jwplayer","mimes","protocols","regs","renderer","rtd","schain","segments","site.content","site.ext","sizes","user.data","user.ext","adm","prebid.events","adapterMetrics","ext.errors","msdebug"],Ig={"mediaType.native":!0,nativeOrtbRequest:!0,nativeParams:!0};class xg extends Tp{init(){try{this._prebidMethods.enableAnalytics({provider:this.name,options:{batchSize:40,batchDelay:2e3,gvlid:this._config.gdpr.raptiveVendorId,events:{bidResponse:e=>this._setLoggerBidResponseFields(e),bidWon:e=>this._setLoggerBidWonFields(e),noBid:e=>this._setLoggerNoBidFields(e),bidTimeout:e=>this._setLoggerBidTimeoutFields(e),bidRequested:e=>this._setLoggerBidRequestedFields(e),pbsAnalytics:e=>this._setLoggerPbsAnalyticsFields(e)},handler:e=>{const t=Array.isArray(e)?e.map((e=>kg(e,Ag,Ig))):kg(e,Ag,Ig);return new Promise(((e,i)=>{fetch(this._loggerEndpoint,{method:"POST",headers:[["Content-Type","application/json"]],body:JSON.stringify({event_type:"generic",message:JSON.stringify(t)})}).then((t=>{e(t)})).catch((e=>{i(e)}))}))}}})}catch(e){W.error("GenericAnalytics","init - ignored",e)}try{this._prebidMethods.setConfig({analyticsLabels:{deployment:`${window.adthrive.deployment}`}})}catch(e){W.error("GenericAnalytics","init - ignored",e)}}get enabled(){return"generic"===this._analyticsExperiment.result}truncateBidRequestBids(e){let t,i,s;const n=e.map((e=>{var t,i,s,n;const{userId:r,userIdAsEids:a,metrics:o,ortb2:l,...d}=e,c=null==o?void 0:o.getMetrics()["requestBids.total"],h=dg(l),u=[...a||[],...(null==h||null==(i=h.user)||null==(t=i.ext)?void 0:t.eids)||[]].map((e=>e.source)).filter(Mi);return(null==h||null==(n=h.user)||null==(s=n.ext)?void 0:s.eids)&&delete h.user.ext.eids,{...d,ortb2:h,eidsSources:u,...c&&{metrics:{"requestBids.total":c}}}}));return n.length>0&&(t=n.every((e=>Tg(e.ortb2,n[0].ortb2)))?n[0].ortb2:void 0,i=n.every((e=>Tg(e.ortb2Imp,n[0].ortb2Imp)))?n[0].ortb2Imp:void 0,s=n.every((e=>Tg(e.eidsSources,n[0].eidsSources)))?n[0].eidsSources:void 0,n.forEach((e=>{t&&delete e.ortb2,i&&delete e.ortb2Imp,s&&delete e.eidsSources}))),{truncatedBids:n,ortb2:t,ortb2Imp:i,eidsSources:s}}constructor(e,t,i){super(),this._prebidMethods=e,this._analyticsExperiment=t,this._config=i,this.name="generic",this._loggerEndpoint="https://api.adthrive.com/logger",this._setLoggerBidResponseFields=e=>{var t;return{event_type:"BIDRESPONSE",adserverTargeting:e.adserverTargeting,adUnitCode:e.adUnitCode,auctionId:e.auctionId,bidder:e.bidderCode,bidderCode:e.bidderCode,cpm:e.cpm,currency:e.currency,floorData:e.floorData,floorValue:null==(t=e.floorData)?void 0:t.floorValue,height:e.height,mediaType:e.mediaType,meta:e.meta,originalCpm:e.originalCpm,requestId:e.requestId,requestTimestamp:e.requestTimestamp,responseCpm:e.responseCpm,responseTimestamp:e.responseTimestamp,responseTimeMillis:e.responseTimeMillis,seatNonBidStatusCode:e.seatNonBidStatusCode,size:e.size,source:e.source,statusMessage:e.statusMessage,timeToRespond:e.timeToRespond,transactionId:e.transactionId,ttl:e.ttl,width:e.width,analyticsLabels:e.analyticsLabels}},this._setLoggerBidWonFields=e=>({event_type:"BIDWON",adserverTargeting:e.adserverTargeting,adUnitCode:e.adUnitCode,auctionId:e.auctionId,bidder:e.bidder,bidderCode:e.bidderCode,cpm:e.cpm,currency:e.currency,floorData:e.floorData,height:e.height,mediaType:e.mediaType,meta:e.meta,requestId:e.requestId,requestTimestamp:e.requestTimestamp,responseCpm:e.responseCpm,size:e.size,source:e.source,status:e.status,statusMessage:e.statusMessage,timeToRespond:e.timeToRespond,transactionId:e.transactionId,ttl:e.ttl,width:e.width,analyticsLabels:e.analyticsLabels}),this._setLoggerNoBidFields=e=>({event_type:"NOBID",auctionId:e.auctionId,bidder:e.bidder,source:e.src,adUnitCode:e.adUnitCode,floor:null==e.getFloor?void 0:e.getFloor.call(e),floorData:e.floorData,analyticsLabels:e.analyticsLabels}),this._setLoggerBidTimeoutFields=e=>{const{analyticsLabels:t,...i}=e,s=Object.values(i),n=s.length,r=n>1&&s.every((e=>Tg(e.ortb2,s[0].ortb2))),a=n>1&&s.every((e=>Tg(e.ortb2Imp,s[0].ortb2Imp))),o=r?s[0].ortb2:void 0,l=a?s[0].ortb2Imp:void 0;return{event_type:"BIDTIMEOUT",bids:s.map((e=>({adUnitCode:e.adUnitCode,auctionId:e.auctionId,bid_id:e.bid_id,bidder:e.bidder,bidderRequestId:e.bidderRequestId,bidderRequestsCount:e.bidRequestsCount,bidderWinsCount:e.bidderWinsCount,bidId:e.bidId,bidRequestsCount:e.bidRequestsCount,floorData:e.floorData,mediaTypes:e.mediaTypes,ortb2:r?void 0:e.ortb2,ortb2Imp:a?void 0:e.ortb2Imp,schain:e.schain,sizes:e.sizes,src:e.src,transactionId:e.transactionId}))),...o&&{ortb2:o},...a&&{ortb2Imp:l},analyticsLabels:t}},this._setLoggerBidRequestedFields=e=>{const{truncatedBids:t,eidsSources:i,ortb2:s,ortb2Imp:n}=this.truncateBidRequestBids(e.bids);return{event_type:"BIDREQUESTED",bidderCode:e.bidderCode,auctionId:e.auctionId,auctionStart:e.auctionStart,bidderRequestId:e.bidderRequestId,bids:t,start:e.start,timeout:e.timeout,ortb2:null!=s?s:e.ortb2,...n&&{ortb2Imp:n},...i&&{eidsSources:i},analyticsLabels:e.analyticsLabels}},this._setLoggerPbsAnalyticsFields=e=>{var t;const{response:i,seatnonbid:s}=e,n=Tg(s,null==i||null==(t=i.ext)?void 0:t.seatnonbid)?{...i,ext:{...null==i?void 0:i.ext,seatnonbid:void 0}}:i;return{event_type:"PBSANALYTICS",...e,response:n,analyticsLabels:e.analyticsLabels}}}}xg=B([bn("GenericAnalytics"),D(),j("design:type",Function),j("design:paramtypes",[void 0===Mn?Object:Mn,void 0===wp?Object:wp,void 0===_c?Object:_c])],xg);class Pg{updateBidParams(e,t){}setup(){this._integrationConfigured||this._setupBidderIntegrationType()}get bidderDisplayEnabled(){return!0}get bidderInstreamEnabled(){return!0}get bidders(){return this._bidders}get enabled(){var e;return!!(this._bidders.length>0&&(null!=(e=this._config.partners.display.get(this.name))?e:this.adapterName&&this._config.partners.display.get(this.adapterName)))}get videoEnabled(){return this._bidders.length>0&&(this._config.partners.video.get(this.name)||this.adapterName&&this._config.partners.video.get(this.adapterName))}get name(){return this.bidderConfig.bidder_name}_addPositionParam(e,t){e.params.position=t}_addPlacementIdParam(e,t){e.params.placementId=t}_applyAuctionLabel(e,t){const i=this._config,s="crr"!==i.prebid.multistageValue&&"off"!==i.prebid.multistageValue,n=e.location===Qe.Video_StickyOutstream,r=i.prebid,a=t.bidder;let o=[];s&&n&&r.refreshStickyOutstreamAuctionCount>1?o=r.getVideoBidderLabel(a):s&&!n&&r.refreshAuctionCount>1&&(o=r.getBidderLabel(a)),o.forEach((e=>{t.labelAll=t.labelAll||[],t.labelAll.includes(e)||t.labelAll.push(e)}))}_addBidLabel(e,t={}){const i=[];if(t.outstreamCapable){const t=`outstreamCapable_${e}`;i.push(t)}if(t.refresh){const e="refresh";i.push(e)}if(t.initial){const e="initial";i.push(e)}return t.highHVP&&i.push("highHVP"),i.length?{labelAll:i}:{}}_isS2SBidder(e=""){return this._config.prebid.s2s.bidders.includes(e)}_setupBidderIntegrationType(){const{name:e,adapterName:t,serverBidderCode:i,additionalServerBidderCodes:s}=this,n=i=>this._getBidderHoldout(e,t,i),r=({name:e,type:t,pbsHost:i})=>{this._bidders.push({name:e,type:t,...i&&{pbsHost:i}})};n()||this._isS2SBidder(e)||!this._config.prebidClientSide.enabled||r({name:e,type:"client"}),this._isS2SBidder(i)&&(n(i)||r({name:i,type:"server"}),null==s||s.forEach((e=>{var t;n(e)||(r({name:i,type:"server",pbsHost:e}),null!=(t=this._config.prebid.s2s).additionalBidders||(t.additionalBidders=[]),this._config.prebid.s2s.additionalBidders.push(e))}))),this._integrationConfigured=!0}applyTrafficShapingLabel(e,t){var i;if(!this._config.trafficShaping.active)return;const s="holdout",n=t.labelAll=t.labelAll||[],r=((null==(i=this._config.trafficShaping.getTrafficShapingRule(e.location,e.refreshCount))?void 0:i.pb)||[]).includes(t.bidder),a=n.indexOf(s),o=-1!==a;r&&!o?n.push(s):!r&&o&&n.splice(a,1)}_getBidderHoldout(e,t,i){const s=this._config;return[e,...t?[t]:[],...i&&i!==e?[i]:[]].some((n=>s.hbho.bidders.includes(n)&&s.vbho.bidders.includes(n)||s.prebid.experimentIntegrationHoldouts.includes(i||t||e)))}constructor(e){this._config=e,this._bidders=[],this._integrationConfigured=!1}}class Og extends Pg{getSlotBidRequests(e){}getBannerSlotBidRequests(e){}getMultiFormatBannerVideoSlotBidRequests(e){}getMultiFormatBannerNativeSlotBidRequests(e){}getOutstreamSlotBidRequests(e){}getNativeSlotBidRequests(e){}getVideoSlotBidRequests(e){}getBannerBidRequests(e,t){const i=this.multiformatBannerNativeBidder,s=this.multiformatBannerVideoBidder;e.forEach((e=>{if(!i&&!s||!e.multiformat||!e.outstreamEnabled&&s||!e.nativeEnabled&&i){const i=this.getBannerSlotBidRequests(e);this._getBidderBidRequests(t,i,e.id,e)}}))}getMultiFormatBannerVideoBidRequests(e,t){e.forEach((e=>{const i=this.getMultiFormatBannerVideoSlotBidRequests(e);this._getBidderBidRequests(t,i,e.id,e)}))}getMultiFormatBannerNativeBidRequests(e,t){e.forEach((e=>{const i=this.getMultiFormatBannerNativeSlotBidRequests(e);this._getBidderBidRequests(t,i,e.id,e)}))}getOutstreamBidRequests(e,t){e.forEach((e=>{if(!this.multiformatBannerVideoBidder||!e.multiformat){const i=this.getOutstreamSlotBidRequests(e);this._getBidderBidRequests(t,i,e.id,e)}}))}getNativeBidRequests(e,t){e.forEach((e=>{if(!this.multiformatBannerVideoBidder||!e.multiformat){const i=this.getNativeSlotBidRequests(e);this._getBidderBidRequests(t,i,e.id,e)}}))}getVideoBidRequests(e,t){return e.forEach((e=>{const i=this.getVideoSlotBidRequests(e)||[];this._getBidderBidRequests(t,i,e.name)}))}_getBidderBidRequests(e,t,i,s){let n=this._filterBids(t,i,s);const r=e.get(i);return s&&(n=null==n?void 0:n.reduce(((e,t)=>(t&&(this._applyAuctionLabel(s,t),e.push(t)),e)),[])),r&&(n=(n||[]).concat(r)),n&&e.set(i,n),e}_filterBids(e,t,i){if(!e)return;e=e.filter((e=>void 0!==e));const s=this._config.prebid,{bidders:n,distributedBidders:r}=s.s2s,a=s.ayServerEnabled;return r&&this._preprocessBids(e,n),e.filter((e=>{if(!this._shouldIncludeBidByHoldout(e,t,i))return!1;if(n.includes(e.bidder))if(r){if(!this._shouldIncludeBidByServer(e,r.rpbsBidders,r.ayBidders))return!1;if(e.skip)return!1}else if(!!e.pbsHost!=!!a)return!1;return!0}))}_shouldIncludeBidByHoldout(e,t,i){const s=this._config,n=s[Object.values(et).includes(t)?"vbho":"hbho"].bidders,r=s.prebid.experimentIntegrationHoldouts;return i&&this.applyTrafficShapingLabel(i,e),!n.includes(this.adapterName||this.name)&&!r.includes(e.bidder)&&!n.includes(e.bidder)}_shouldIncludeBidByServer(e,t,i){return e.pbsHost?i.includes(e.bidder):t.includes(e.bidder)}_preprocessBids(e,t){const i=[],s=["initial","refresh"];if(e.some((e=>Le.includes(e.bidder)))){for(const a of e){var n,r;if(!t.includes(a.bidder))continue;(null==(n=a.labelAll)?void 0:n.some((e=>s.includes(e))))||(null==(r=a.labelAny)?void 0:r.some((e=>s.includes(e))))||i.push(a)}if(i.length>2){i.sort(((e,t)=>void 0===e.pbsHost&&void 0!==t.pbsHost?-1:void 0!==e.pbsHost&&void 0===t.pbsHost?1:0));const e=Math.floor(i.length/2);let t=Math.random()<.5;for(let s=0;s{const n=i.pbsHost;return{bidder:i.name,...this._addBidLabel(e.placementMapName,{outstreamCapable:t}),params:{siteId:s,productId:this._bannerProductId},...n&&{pbsHost:n}}}))}getVideoSlotBidRequests(e){const t=this._videoMap,i=t.has(e.name)&&t.get(e.name);if(i)return this._bidders.map((e=>{const t=e.pbsHost;return{bidder:e.name,params:{siteId:i,productId:this._videoProductId},...t&&{pbsHost:t}}}))}constructor(e){super(e),this.bidderConfig=this._config.partners.getBidderConfig(te.ThirtyThreeAcross),this.serverBidderCode=te.ThirtyThreeAcross,this.additionalServerBidderCodes=[te.ThirtyThreeAcrossAY],this.videoCreativeIds=[["138395447475",te.ThirtyThreeAcross],["138395937226",te.ThirtyThreeAcross],["138395937256",te.ThirtyThreeAcross],["138395937310",te.ThirtyThreeAcross],["138395937325",te.ThirtyThreeAcross],["138395447241",te.ThirtyThreeAcross],["138395937274",te.ThirtyThreeAcross],["138395937313",te.ThirtyThreeAcross],["138395937319",te.ThirtyThreeAcross],["138395937343",te.ThirtyThreeAcross],["138395937349",te.ThirtyThreeAcross],["138395937304",te.ThirtyThreeAcross],["138395937307",te.ThirtyThreeAcross],["138395937322",te.ThirtyThreeAcross],["138395937346",te.ThirtyThreeAcross],["138395445846",te.ThirtyThreeAcross]],this._bannerProductId="siab",this._videoProductId="instream",this._bannerMap=new Map([[Qe.Below_Post,"dqjinO_Lqr6i5uaKkv7mNO"],[Qe.Content_1,"dzqsVw_Lqr6iHHaKlId8sQ"],[Qe.Content_2,"dGYL36_Lqr6iHHaKlId8sQ"],[Qe.Content_3,"dPmBLW_Lqr6ikXaKkGJozW"],[Qe.Content_4,"dYmdO4_Lqr6ikXaKkGJozW"],[Qe.Content_5,"d73_q4_Lqr6ikfaKlId8sQ"],[Qe.Content_6,"aeCNc8_Lur6ikfaKlId8sQ"],[Qe.Content_7,"amEJ90_Lur6ikXaKkGJozW"],[Qe.Content_8,"avcDUU_Lur6ikXaKkGJozW"],[Qe.Content_9,"aE0F5q_Lur6iHHaKlId8sQ"],[Qe.Footer_1,"aMbGkS_Lur6ikXaKkGJozW"],[Qe.Header_1,"aZCnyg_Lur6ikfaKlId8sQ"],[Qe.Header_2,"a7S6ye_Lur6ikXaKkGJozW"],[Qe.Recipe_1,"bfXhLW_Lur6ioMaKkGJozW"],[Qe.Recipe_2,"bmQVLo_Lur6ikfaKlId8sQ"],[Qe.Recipe_3,"d7kcPCUhur6yo-aKkGJozW"],[Qe.Recipe_4,"agAjkaUhyr6yo9aKlId8sQ"],[Qe.Sidebar_1,"buEy3O_Lur6ikfaKlId8sQ"],[Qe.Sidebar_2,"bCOsqy_Lur6ikfaKlId8sQ"],[Qe.Sidebar_3,"bOGvrc_Lur6ikXaKkGJozW"],[Qe.Sidebar_4,"bW-wb0_Lur6ikfaKlId8sQ"],[Qe.Sidebar_5,"b8nVxi_Lur6ikXaKkGJozW"],[Qe.Sidebar_9,"cggK7W_Lur6ikfaKlId8sQ"]]),this._videoMap=new Map([[et.Video_Collapse_Autoplay_SoundOff,"a_lKMg0Iar7k8brkHcnlxd"],[et.Video_Coll_SOff_Smartphone,"b7sKMM0Iar7ikGrkHcnnVW"],[et.Video_In_Post_ClicktoPlay_SoundOn,"c98www0Iar7ioerkHcnlKl"],[et.Video_Individual_Autoplay_SOff,"bhUZlu0Ier7ioerkHcnlKl"]])}}Rg=B([bn("ThirtyThreeAcrossBidder"),D(),j("design:type",Function),j("design:paramtypes",[void 0===_c?Object:_c])],Rg);const Lg="Raptive_Display_RON",Dg="Raptive_Video_RON",Mg="Raptive_StickyOutstream_RON",Bg={[Lg]:{desktop:1819606,mobile:1819607},[Dg]:{default:1819610},[Mg]:{default:1819614}};class Fg extends Og{getBannerSlotBidRequests(e){if(this._displaySet.has(e.placementMapName))return this._bidders.map((e=>{const t=e.pbsHost;return{bidder:e.name,params:{mname:Lg,mid:Ki()?Bg[Lg].mobile:Bg[Lg].desktop,..."US"===this._context.country&&{adxDomain:this._adxDomain}},...t&&{pbsHost:t}}}))}getOutstreamSlotBidRequests(e){if(this._outstreamSet.has(e.placementMapName))return this._bidders.map((t=>{const i=t.pbsHost;return{bidder:t.name,params:{mname:Mg,mid:Bg[Mg].default,adxDomain:this._adxDomain},...this._addBidLabel(e.placementMapName,{outstreamCapable:e.location!==Qe.Video_StickyOutstream}),...i&&{pbsHost:i}}}))}getVideoSlotBidRequests(e){if(this._videoSet.has(e.name))return this._bidders.map((e=>{const t=e.pbsHost;return{bidder:e.name,params:{mname:Dg,mid:Bg[Dg].default,adxDomain:this._adxDomain},...t&&{pbsHost:t}}}))}constructor(e,t){super(e),this._context=t,this.bidderConfig=this._config.partners.getBidderConfig(te.Adform),this.adapterName=te.Adform,this.serverBidderCode=te.Adform,this.additionalServerBidderCodes=[te.AdformAY],this.gvlid=50,this._adxDomain="adx2.adform.net",this.videoCreativeIds=[["138446479256",te.Adform],["138446479406",te.Adform],["138446479442",te.Adform],["138446479445",te.Adform],["138446479505",te.Adform],["138446479508",te.Adform],["138447155053",te.Adform],["138447155056",te.Adform]],this._displaySet=new Set([Qe.Below_Post,Qe.Content_1,Qe.Content_2,Qe.Content_3,Qe.Content_4,Qe.Content_5,Qe.Content_6,Qe.Content_7,Qe.Content_8,Qe.Content_9,Qe.Footer_1,Qe.Header_1,Qe.Header_2,Qe.Recipe_1,Qe.Recipe_2,Qe.Recipe_3,Qe.Recipe_4,Qe.Recipe_5,Qe.Sidebar_1,Qe.Sidebar_2,Qe.Sidebar_3,Qe.Sidebar_4,Qe.Sidebar_5,Qe.Sidebar_9]),this._videoSet=new Set([et.Video_Coll_SOff_Smartphone,et.Video_Collapse_Autoplay_SoundOff,et.Video_In_Post_ClicktoPlay_SoundOn,et.Video_Individual_Autoplay_SOff]),this._outstreamSet=new Set([Qe.Video_StickyOutstream_1])}}Fg=B([bn("AdformBidder"),D(),j("design:type",Function),j("design:paramtypes",[void 0===_c?Object:_c,void 0===Fr?Object:Fr])],Fg);class jg extends Og{get bidderDisplayEnabled(){const e=this._context.country;return this._allowedCountries.includes(e)}get bidderInstreamEnabled(){const e=this._context.country;return this._allowedCountries.includes(e)}getBannerSlotBidRequests(e){if(this._bannerMap.has(e.placementMapName))return this._bidders.map((t=>{const i=t.pbsHost;return{bidder:t.name,params:{...this._params,placementId:e.id},...i&&{pbsHost:i}}}))}getVideoSlotBidRequests(e){if(this._videoMap.has(e.name))return this._bidders.map((t=>{const i=t.pbsHost;return{bidder:t.name,params:{...this._params,placementId:`AdThrive_${e.name}`},...i&&{pbsHost:i}}}))}constructor(e,t){super(e),this._context=t,this.bidderConfig=this._config.partners.getBidderConfig(te.AidemServer),this.adapterName=te.Aidem,this.serverBidderCode=te.AidemServer,this.additionalServerBidderCodes=[te.AidemAY],this._allowedCountries=["GB","US"],this.videoServerCreativeIds=[["138447954856",te.AidemServer],["138447954853",te.AidemServer],["138447954850",te.AidemServer],["138447954859",te.AidemServer],["138447954568",te.AidemServer],["138447954574",te.AidemServer],["138447954514",te.AidemServer],["138447240867",te.AidemServer]],this._params={publisherId:"6532804884",siteId:this._config.site.id},this._displaySet=new Set([Qe.Below_Post,Qe.Content,Qe.Content_1,Qe.Content_2,Qe.Content_3,Qe.Content_4,Qe.Content_5,Qe.Content_6,Qe.Content_7,Qe.Content_8,Qe.Content_9,Qe.Footer_1,Qe.Header_1,Qe.Header_2,Qe.Recipe_1,Qe.Recipe_2,Qe.Recipe_3,Qe.Recipe_4,Qe.Recipe_5,Qe.Sidebar_1,Qe.Sidebar_2,Qe.Sidebar_3,Qe.Sidebar_4,Qe.Sidebar_5,Qe.Sidebar_9]),this._videoDisplaySet=new Set([et.Video_Coll_SOff_Smartphone,et.Video_Collapse_Autoplay_SoundOff,et.Video_In_Post_ClicktoPlay_SoundOn,et.Video_Individual_Autoplay_SOff]),this._videoMobileSet=new Set([et.Video_Coll_SOff_Smartphone,et.Video_In_Post_ClicktoPlay_SoundOn,et.Video_Individual_Autoplay_SOff]),this._bannerMobileDesktopMap={desktop:this._displaySet,mobile:this._displaySet},this._videoMobileDesktopMap={desktop:this._videoDisplaySet,mobile:this._videoMobileSet},this._bannerMap=Ki()?this._bannerMobileDesktopMap.mobile:this._bannerMobileDesktopMap.desktop,this._videoMap=Ki()?this._videoMobileDesktopMap.mobile:this._videoMobileDesktopMap.desktop}}jg=B([bn("AidemBidder"),D(),j("design:type",Function),j("design:paramtypes",[void 0===_c?Object:_c,void 0===Fr?Object:Fr])],jg);class Ng extends br{init(){this._key="AdInViewExperiment_2",this._lookup="AINV2"}}Ng=B([bn("AdInViewExperiment"),M()],Ng);class Ug extends br{init(){this._key="SizeOrder2",this._lookup="SO2"}}Ug=B([bn("SizeOrderExperiment"),M()],Ug);const Vg=new Map([["300x250",1],["320x50",2],["728x90",3],["300x600",4],["300x50",5],["336x280",6],["1x1",7],["160x600",8],["320x300",9],["300x300",10],["320x100",11],["552x334",12],["970x90",13],["300x420",14],["300x390",15],["970x950",16],["250x250",17],["468x60",18],["1x2",19],["320x480",20],["120x240",21],["728x4100",22],["*",23]]);class zg extends br{init(){this._key="BannerWidthHeight",this._lookup="BWH"}}zg=B([bn("BannerWidthHeightExperiment"),M()],zg);class Hg extends Er{init(){this._key="OpenBiddingTrafficShaping",this._lookup="OBTS",this._default=!1}}Hg=B([bn("OpenBiddingTrafficShapingExperiment"),M()],Hg);const $g={Recipe:"Recipe",Video:"Video"};class qg{init(e){this.listeners=e,this._addElementListeners()}_processButtonClicked(e){if(!this._hasFired)for(const t of this.listeners)t(e);this._cleanup()}_cleanup(){for(const e of this.elements)e.removeEventListener("click",this._buttonClicked)}_addElementListeners(){this.setElementsListeners()}setElementsListeners(){for(const e of this.elements)e.addEventListener("click",this._buttonClicked)}constructor(){this._hasFired=!1,this.listeners=[],this.elements=[],this._buttonClicked=this._processButtonClicked.bind(this)}}class Gg extends qg{start(e){const t=[()=>{this.onJumpToRecipeClicked.emit()}];if(e){const e=e=>{const t=e.target.classList;W.event("JumpToTracker","_logEvent",$g.Recipe.toLowerCase(),t)};t.push(e)}this.init(t)}constructor(){super(),this.selectors=[".wprm-recipe-jump","#jump-to-recipe","#wprm-jump",".wprm-jump",".tasty-recipes-jump-link",".mv-create-jtr",".jump-to-recipe"],this.onJumpToRecipeClicked=new z,this.elements=Array.prototype.slice.call(document.querySelectorAll(this.selectors.join()))}}Gg=B([M(),j("design:type",Function),j("design:paramtypes",[])],Gg);class Wg{slotsFilter(e){return e.location===Qe.Content&&e.sequence&&e.sequence<=3}preventSlotsBeingAdded(e){this.preventedSlotsFromBeingAdded.emit(e)}determineSlotsToAddAndRemove(e){const t=[];return this.enabled&&this._allowSlotsToBeFiltered&&(e=e.filter((e=>!(this.slotsFilter(e)&&e.getPositionFromViewport()<=-2)||(t.push(e),!1)))),{addSlots:e,removeSlots:t}}get enabled(){return!Ur.isRolloutEnabled("ios-manage-content-slots")&&Ki()&&Fi()&&this._isFoodVertical&&this._jumpToRecipeElementsOnPage}constructor(e,t){this._jumpToRecipeTracker=e,this._jumpToRecipeElementsOnPage=!1,this._allowSlotsToBeFiltered=!1,this._onJumpToRecipeTrackerClicked=new z,this._allowSlotsToBeAdded=!1,this.preventedSlotsFromBeingAdded=new z,this._isFoodVertical=!!t.verticals.find((e=>"food"===e.toLowerCase())),this._jumpToRecipeElementsOnPage=!!e.elements.length,this._jumpToRecipeTracker.onJumpToRecipeClicked.on((()=>{this._allowSlotsToBeFiltered=!0,this._onJumpToRecipeTrackerClicked.emit(),setTimeout((()=>{this._allowSlotsToBeFiltered=!1}),500)}),{handleEventsAlreadyEmitted:!0})}}Wg=B([M(),j("design:type",Function),j("design:paramtypes",[void 0===Gg?Object:Gg,void 0===ur?Object:ur])],Wg);class Kg{setSizes(e){const t=this._sizeOrderExperimentResult,i=this._bannerWidthHeightExperimentResult;if("off"!==t){const i=this._getSizeSorter(t);e.originalSizes=[...e.sizes],e.sizes=[...e.sizes].sort(i)}if("off"!==i){const t=this._getBannerWidthSizeSorter(i),s=[...e.sizes].sort(t),n=s[s.length>1&&"sm1"===i?1:0];e.mainAuctionWidth=n[0],e.mainAuctionHeight=n[1]}}async add(e,t=!1){const i=Tc.markStartTask("microtask",["SlotManager","add","1"]);this._gptLibFailedToLoad?i.markEndTask():(i.markEndTask(),await this._googleAdManager.waitForQueue());const s=Tc.markStartTask("microtask",["SlotManager","add","2"]),n=Fs.readSessionStorage("adthrive_footer_closed"),{addSlots:r,removeSlots:a}=this._jumpToSlotManager.determineSlotsToAddAndRemove(this.castArray(e));a.length&&this._jumpToSlotManager.preventSlotsBeingAdded(a);const o=this._googleAdManager.defineSlots(r.filter((e=>e.location!==Qe.Footer||e.location===Qe.Footer&&!n))),l=this._config.marmalade;l.adViewability.length||this._marmaladeEventBus.resetMarmaladeData.once((()=>{o.forEach((e=>e.setViewability(l)))})),o.forEach((e=>{this.setSizes(e),e.setViewability(l),e.setHighlyViewable(l),e.setBidPoolId(this._config.prebid.bidPoolSlots),e.setPassiveBidPoolId(),e.rebuild=t;e.location===Qe.Recipe&&e.sticky||this._config.clsOptimizedAds.setStyle(e.element,e.location),this._setSlotTargetingForTrafficShaping(e)})),this._slots.add(o);const d=o.map((e=>e.id));t?this._slotEventBus.addRebuiltSlots.emit(d):this._slotEventBus.addSlots.emit(d),s.markEndTask(),await Ha();const c=Tc.markStartTask("microtask",["SlotManager","add","3"]),h=this.eventBus.added.legacyEmit(o.map((e=>e.id)));return c.markEndTask(),await h,o}destroy(e){const t=this.castArray(e);return this.pauseRefresh(t),this._slots.remove(t),this._googleAdManager.destroySlots(t),t}destroyAll(e=!0){let t=this._slots.get();return e||(t=t.filter((e=>!Object.values(et).includes(e.location)))),this.destroy(t)}rebuild(e){const t=this.castArray(e),i=this._googleAdManager;for(const e of t)wc.pushToQueue((()=>{const t=["refresh","inf_scroll","decref","nref","hvp","lazy","bpe","fle"].reduce(((t,i)=>{const s=e.getTargeting(i);return s.length&&t.push({key:i,value:s}),t}),[]);i.destroySlots(this.castArray(e)),e.googleTagSlotReady=!1,i.defineSlots(this.castArray(e)),e.setTargeting(t)}));return t}rebuildAll(){const e=this._slots.get();return this.rebuild(e)}removeElement(e){const t=this.castArray(e),i=[];for(const e of t){var s;if(e.location===Qe.Video_StickyOutstream)null==(s=e.element.parentElement)||s.remove();else e.element.remove();i.push(e.element)}return i}removeAllElements(e=!0){let t=this._slots.get();return e||(t=t.filter((e=>!Object.values(et).includes(e.location)))),this.removeElement(t)}async refresh(e,t=!0,i=0){const{addSlots:s,removeSlots:n}=this._jumpToSlotManager.determineSlotsToAddAndRemove(this.castArray(e));n.length&&this.destroy(n);const r=s.some((e=>e.location===Qe.Video_StickyOutstream)),a=s.map((e=>e.id));for(const e of s)e&&void 0!==e.refreshCount&&(e.refreshCount++,e.servedPrebidBidResponse=void 0,e.isRefreshing=!0,this._setSlotTargetingForTrafficShaping(e));await this.eventBus.refreshing.legacyEmit(a),await this.eventBus.refreshAuctionStart.legacyEmit(a);const o=Date.now(),l=this._getAuctionCount(s,r),d=1!==l,c=this._getInjectedAuctions(d,l);for(let e=0;e{await this._slotEventBus.auctionsCompleted.legacyEmit(s.map((e=>e.id))),this._googleAdManager.refreshSlots(s)})),await this.eventBus.refreshed.legacyEmit(a);for(const e of s)e.isRefreshing=!1;return s}async display(e){const{addSlots:t,removeSlots:i}=this._jumpToSlotManager.determineSlotsToAddAndRemove(this.castArray(e));i.length&&this.destroy(i);const s=t.map((e=>e.id));await this.eventBus.displaying.legacyEmit(s);const n=Tc.markStartTask("microtask",["SlotManager","display","1"]),r=this.requestBids(t);n.markEndTask(),await r;const a=Tc.markStartTask("microtask",["SlotManager","display","auctionComplete"]),o=this._slotEventBus.auctionsCompleted.legacyEmit(s);a.markEndTask(),await o;const l=Tc.markStartTask("microtask",["SlotManager","display","gamDisplaySlots"]);return await this._googleAdManager.displaySlots(t),l.markEndTask(),t.forEach((e=>{e.displayed=!0})),this.eventBus.displayed.emit(s),t}inView(e){const t=this.castArray(e);return t.forEach((e=>this.setRefreshTimeout(e))),t}outOfView(e){const t=this.castArray(e);return t.filter((e=>!e.alwaysInView)).filter((e=>"IntersectionObserver"in window?e.outOfViewGPT&&e.outOfViewIO:e.outOfViewGPT)).forEach((e=>{const t=e.element.querySelector("div > iframe"),i=null==t?void 0:t.nextElementSibling;Ns(e.element)&&t&&(Ns(t)||i&&Ns(i))&&this.clearRefreshTimeout(e)})),t}pauseRefresh(e){const t=this.castArray(e);return t.filter((e=>e.refreshTimeout)).forEach((e=>{e.refreshPaused=!0,this.clearRefreshTimeout(e)})),t}resumeRefresh(e){const t=this.castArray(e);return t.filter((e=>e.refreshPaused)).forEach((e=>{e.refreshPaused=!1,this.setRefreshTimeout(e)})),t}updateRefreshTimeout(e,t){const i=this.castArray(e);return i.forEach((e=>{e.refreshInterval=t;const i=e.element.querySelector("div > iframe"),s=Ns(e.element)&&i&&Ns(i)&&!document.hidden;e.location===Qe.Video_StickyOutstream&&e.unfilled?(this.setRefreshTimeout(e),e.unfilled=!1):e.refreshTimeout&&(e.location!==Qe.Video_StickyOutstream||s)?(this.clearRefreshTimeout(e),this.setRefreshTimeout(e)):e.refreshTimeout&&!s&&(this.setRefreshTimeout(e),this.clearRefreshTimeout(e))})),i}clearRefreshTimeout(e,t=!1){this.castArray(e).filter((e=>e.refreshTimeout)).forEach((e=>{window.clearTimeout(e.refreshTimeout),e.refreshTimeout=void 0,t?(e.viewableDuration=0,e.slotFullyRenderedDuration=0):(e.viewableSince&&(e.viewableDuration+=sn()-e.viewableSince.getTime()),e.slotFullyRenderedSince&&(e.slotFullyRenderedDuration=sn()-e.slotFullyRenderedSince))}))}getSlot(e){return this._slots.get(e)}getSlots(e){return e?this._slots.get(e):this._slots.get()}get amazonBidResponseReceived(){return this._slotEventBus.amazonBidResponseReceived}_getAuctionCount(e,t){const i=t&&e[0].stickyOutstreamShortVideo,s=t&&e[0].noAdRefreshCount,n=t&&e[0].stickyOutstreamLastAdErrored,r=this._config.prebid.multiStageLimit,a=r&&e[0].refreshCount>=r?1:this._config.prebid.refreshAuctionCount,o=i||s||n?1:this._config.prebid.refreshStickyOutstreamAuctionCount;return t?o:a}_getAuctionDelay(e,t,i){var s;const n=this._config.timeouts.refreshBidsRequest,r=e.some((e=>e.location===Qe.Video_StickyOutstream)),a=r&&e[0].stickyOutstreamShortVideo?1:this._config.prebid.refreshStickyOutstreamAuctionCount,o=r?a:this._config.prebid.refreshAuctionCount,l=Date.now()-t,d=null==(s=e[0])?void 0:s.stickyOutstreamRefreshTimeout,c=(i>3e4-n*o?3e4-i:n*o)-l,h=Math.max(c,0);return r&&d?d:h}_getInjectedAuctions(e,t){const i=[];if(e)for(let e=0;e<(t||1)-1;e++)i.push(e);return i}_setSlotTargetingForTrafficShaping(e){const t=this._config.trafficShaping;if(t.active&&this._openBiddingTrafficShapingExperiment.result){var i,s;const n=null!=(s=null==(i=t.getTrafficShapingRule(e.location,e.refreshCount))?void 0:i.ob)?s:[];this._googleAdManager.setSlotTargeting({key:"obts",value:n},e.googleTagSlot)}}setRefreshTimeout(e){this.castArray(e).filter((e=>!(e.refreshTimeout||e.isRefreshing&&e.location!==Qe.Video_StickyOutstream))).forEach((e=>{const t=this.calculateRemainingRefreshDuration(e,e.location===Qe.Video_StickyOutstream?this.stickyOutstreamRefreshInterval:this.displayRefreshInterval);e.viewableSince=new Date,0!==e.refreshInterval&&(e.refreshTimeout=window.setTimeout((()=>{const t=sn()-(e.slotFullyRenderedSince||Date.now());e.viewableDuration=0,e.slotFullyRenderedDuration=0,e.refreshInterval=void 0,e.refreshTimeout=void 0,e.slotFullyRenderedSince=void 0,this.refresh(e,!0,t).catch((e=>{}))}),Math.max(t,0)))}))}getAmazonBidderCode(e){var t,i;return 4526447244===this.slotAdvertiserID.get(e.element.id)&&(null==(i=e.getTargeting("amz_bidder"))||null==(t=i[0])?void 0:t.substring(2))||""}getBidderAdInViewDurationOverride(e){var t;const i=new Set(["kargo","tripl_ss","triplelift","ogury","nativo"]),s=(null==(t=e.servedPrebidBidResponse)?void 0:t.bidderCode)||"",n=this.getAmazonBidderCode(e);return i.has(s)||i.has(n)?5e3:void 0}calculateRemainingRefreshDuration(e,t=25e3){const i=this._adInViewExperimentResult?this.getBidderAdInViewDurationOverride(e):void 0,s=Si(i||this._config.adOptions.adInViewTime||this._adInViewExperimentResult,t),n=Si(e.refreshInterval,s);e.slotFullyRenderedSince&&(e.slotFullyRenderedDuration=sn()-e.slotFullyRenderedSince);const r=t-e.slotFullyRenderedDuration,a=n-e.viewableDuration,o=Math.max(r,a,0);if(e.location===Qe.Video_StickyOutstream){return Si(e.refreshInterval,this.stickyOutstreamRefreshInterval)-e.viewableDuration}return o}async requestBids(e){const t=this.castArray(e).filter((e=>e.enabledForAuction));if(0===t.length)return t;const i=t.map((e=>e.id));await this.eventBus.requestingBids.legacyEmit(i);const s=Tc.markStartTask("microtask",["SlotManger","requestBids","1"]),n=this._slotEventBus.preRequestBids.legacyEmit(i);s.markEndTask(),await n;const r=Tc.markStartTask("microtask",["SlotManger","requestBids","2"]),a=this._slotEventBus.requestingBids.legacyEmit(i);r.markEndTask(),await a;const o=Tc.markStartTask("microtask",["SlotManger","requestBids","3"]),l=this.eventBus.requestedBids.legacyEmit(i);return o.markEndTask(),await l,t}async refreshBids(e,t=0,i=!0){const s=this.castArray(e).filter((e=>e.enabledForAuction));if(s.length>0){const e=s.map((e=>e.id));this._clearTargetingKeysOnRefresh(s),await this.eventBus.refreshingBids.legacyEmit(e),await this._slotEventBus.preRequestBids.legacyEmit(e),await this._slotEventBus.refreshingBids.legacyEmit({managedSlotsIds:e,auctionCount:t,setTargeting:i})}return s}castArray(e){if("string"==typeof e){const t=this._slots.get(e);return void 0!==t?[t]:[]}return Array.isArray(e)?e:[e]}setupSlotRenderedListener(){this._gamEventBus.slotRenderEnded.on((e=>{const t=this._slots.get(e.slotId);this.slotAdvertiserID.set(e.slotId,e.event.advertiserId),t&&(t.slotFullyRenderedSince=(new Date).getTime())}))}_clearTargetingKeysOnRefresh(e){e.forEach((e=>{e.clearSlotTargetingFlag(this._refreshTargetingKeys)}))}_setRubiconBidFailedTargeting(e){const t=e.errorCode,i=xt.includes(t),s=this.getSlot(e.adUnitCode);if(i){const e=this._googleAdManager.getTargetingValuesForFlag("bot");e.push(Pt),this._googleAdManager.setTargetingFlag("bot",e.filter(Mi),!0)}s&&s.setSlotTargetingFlag(Pt,[t],!0)}_getBannerWidthSizeSorter(e){const t=e.includes("sm")?"sm":e;return this._getSizeSorter(t)}_getSizeSorter(e){let t;return t="bg"===e?this._largeSizeSorter:"sm"===e?this._smallSizeSorter:this._valueSizeSorter,t}constructor(e,t,i,s,n,r,a,o,l,d,c,h,u,p){this._config=e,this._googleAdManager=t,this._slots=i,this._slotEventBus=s,this._marmaladeEventBus=n,this._gamEventBus=r,this.eventBus=a,this._prebidEventBus=o,this._jumpToSlotManager=l,this._openBiddingTrafficShapingExperiment=p,this.stickyOutstreamRefreshInterval=4e4,this.slotAdvertiserID=new Map,this._refreshTargetingKeys=["aop","apd","aopp","appd",Pt,"pbop","pbpd","reqtype"],this._gptLibFailedToLoad=!1,this._largeSizeSorter=(e,t)=>{const i=e[0]*e[1];return t[0]*t[1]-i},this._smallSizeSorter=(e,t)=>e[0]*e[1]-t[0]*t[1],this._valueSizeSorter=(e,t)=>(Vg.get(e.join("x"))||Vg.get("*")||Vg.size)-(Vg.get(t.join("x"))||Vg.get("*")||Vg.size),this._slotEventBus.adSlotScrolledFarOutOfView.on((e=>{const t=this._slots.get(e);t&&this.destroy(t)})),this._slotEventBus.displaySlot.on((async e=>{const t=this._slots.get(e);t&&await this.display(t)})),this.setupSlotRenderedListener(),this.displayRefreshInterval=3e4-5e3*this._config.prebid.refreshAuctionCount,this._gptLibFailedToLoad=d.gptLibFailedToLoad,this._prebidEventBus.rubiconBidError.on(this._setRubiconBidFailedTargeting.bind(this)),this._sizeOrderExperimentResult="sm"===h.result&&Ki()?"sm":"off",this._bannerWidthHeightExperimentResult=u.result||"off",this._adInViewExperimentResult=c.result}}Kg=B([bn("SlotManager"),M(),j("design:type",Function),j("design:paramtypes",[void 0===_c?Object:_c,void 0===wc?Object:wc,void 0===ra?Object:ra,void 0===Bn?Object:Bn,void 0===tr?Object:tr,void 0===Sc?Object:Sc,void 0===nr?Object:nr,void 0===Jn?Object:Jn,void 0===Wg?Object:Wg,void 0===ka?Object:ka,void 0===Ng?Object:Ng,void 0===Ug?Object:Ug,void 0===zg?Object:zg,void 0===Hg?Object:Hg])],Kg);class Yg{_setupSpaListeners(){this._spaEventBus.routeChanged.on((()=>{this.spaListeners.forEach((e=>e())),this.spaListeners.length=0})),this._spaEventBus.resetCompleted.on((()=>{this.addEventListeners()}))}addEventListeners(){let e=!1,t=!1;const i=()=>{e||(e=!0,setTimeout((()=>{this.scroll.emit(),e=!1}),100))},s=()=>{t||(t=!0,setTimeout((()=>{this.resize.emit(),t=!1}),100))};this.spaListeners.push(this._pageManager.scroll.on((()=>i()))),this.spaListeners.push(this._pageManager.resize.on((()=>s()))),this.spaListeners.push(this._pageManager.visibilityChange.on((()=>{this.pageVisibility.emit(document.hidden)})))}emitVideoPlayingEvent(e,t,i,s){this.videoPlaying.emit({playerNumber:e,playlistId:t,wasClicked:i,mediaIdCount:s})}emitVideoSlotRenderedEvent(e){this.videoSlotRendered.emit(e)}constructor(e,t,i,s,n){this._pageManager=e,this._spaEventBus=t,this.gamEventBus=i,this.footerEventBus=s,this._slots=n,this.scroll=new V,this.resize=new V,this.pageVisibility=new V,this.videoPlaying=new V,this.videoSlotRendered=new V,this.spaListeners=[],this._setupSpaListeners(),this.addEventListeners(),this.gamEventBus.slotResponseReceived.on((({slotId:e})=>{const t=this._slots.get(e);(null==t?void 0:t.location)===Qe.Footer&&this.footerEventBus.footerResponseReceived.emit()})),this.gamEventBus.slotRenderEnded.on((({slotId:e})=>{const t=this._slots.get(e);(null==t?void 0:t.location)===Qe.Footer&&this.footerEventBus.footerRenderEnded.emit(t.refreshCount)}))}}Yg=B([M(),j("design:type",Function),j("design:paramtypes",[void 0===Mr?Object:Mr,void 0===ir?Object:ir,void 0===Sc?Object:Sc,void 0===Xn?Object:Xn,void 0===ra?Object:ra])],Yg);class Xg{isDragging(){return this._isDragging}toggle(e){e?this._container.classList.add("active"):this._container.classList.remove("active")}update(){if(!this._isVisible()||this._isDragging)return;const{currentTime:e,duration:t}=this._videoElement,i=e/t;this._setProgressPosition(i)}init(){this._createProgressBar(),this._setupListeners()}_createProgressBar(){this._container.tabIndex=0,this._container.className="adthrive-player-progress-bar-container",this._progressBar.className="adthrive-player-progress-bar",this._progressBarHandle.className="adthrive-player-progress-bar-handle",this._progressBar.appendChild(this._progressBarIndicator),this._container.appendChild(this._progressBar),this._container.appendChild(this._progressBarHandle)}_setupListeners(){this._container.addEventListener("click",this._seekVideoOnClick.bind(this)),this._container.addEventListener("keydown",this._handleKeyboardControl.bind(this)),this._progressBarHandle.addEventListener("pointerdown",this._handleStartDragProgress.bind(this)),this._videoElement.addEventListener("timeupdate",this.update.bind(this))}_setProgressPosition(e){this._progressBarHandle.style.left=100*e+"%",this._progressBarIndicator.style.transform=`scaleX(${e})`}_seekVideoOnClick(e){this._seekVideo(e.clientX)}_seekVideo(e){const t=this._container.getBoundingClientRect(),i=(e-t.left)/t.width*this._videoElement.duration;this._videoElement.currentTime=i}_fastForwardVideo(e=.05){const t=this._videoElement.duration,i=t*e;this._videoElement.currentTime=Math.min(this._videoElement.currentTime+i,t)}_rewindVideo(e=.05){const t=this._videoElement.duration*e;this._videoElement.currentTime=Math.max(this._videoElement.currentTime-t,0)}_handleKeyboardControl(e){["Space","Enter","ArrowLeft","ArrowRight"].includes(e.code)&&e.preventDefault(),this._throttledKeyboardControl(e)}_handleStartDragProgress(e){this._isDragging||(e.preventDefault(),this._isDragging=!0,this._container.setPointerCapture(e.pointerId),document.addEventListener("pointermove",this._startDraggingHandler),document.addEventListener("pointerup",this._stopDraggingHandler))}_handleDragProgress(e){const t=e.clientX;e.preventDefault();const i=this._container.getBoundingClientRect();let s=t-i.left;s=Math.max(0,Math.min(s,i.width));const n=s/i.width;this._setProgressPosition(n)}_handleStopDragProgress(e){const t=e.clientX;this._isDragging=!1,this._container.releasePointerCapture(e.pointerId),document.removeEventListener("pointermove",this._startDraggingHandler),document.removeEventListener("pointerup",this._stopDraggingHandler),this._seekVideo(t)}constructor(e,t){this._container=document.createElement("DIV"),this._progressBar=document.createElement("DIV"),this._progressBarIndicator=document.createElement("DIV"),this._progressBarHandle=document.createElement("DIV"),this._isDragging=!1,this._startDraggingHandler=this._handleDragProgress.bind(this),this._stopDraggingHandler=this._handleStopDragProgress.bind(this),this._throttledKeyboardControl=pc((e=>{switch(e.code){case"ArrowRight":this._fastForwardVideo();break;case"ArrowLeft":this._rewindVideo()}}),100),this._videoElement=e,this._isVisible=t,this.init()}}const Qg={languages:{path:"captions",key:"language",title:"Captions",options:[{label:"Settings",value:"settings",action:"show",persist:!0},...Object.entries(St).map((([e,t])=>({label:t,value:e,action:"update",persist:""===e})))],parent:""},settings:{path:"settings",key:"settings",title:"Settings",options:[{label:"Font Color",value:"fontColor",action:"show"},{label:"Font Opacity",value:"fontOpacity",action:"show"},{label:"Font Size",value:"fontSize",action:"show"},{label:"Font Family",value:"fontFamily",action:"show"},{label:"Text Shadow",value:"textShadow",action:"show"},{label:"Background Color",value:"backgroundColor",action:"show"},{label:"Background Opacity",value:"backgroundOpacity",action:"show"},{label:"Window Color",value:"windowColor",action:"show"},{label:"Window Opacity",value:"windowOpacity",action:"show"}],parent:"language"},fontColor:{path:"fontColor",key:"fontColor",title:"Font Color",options:[{label:"White",value:"white",action:"update"},{label:"Black",value:"black",action:"update"},{label:"Red",value:"red",action:"update"},{label:"Green",value:"green",action:"update"},{label:"Blue",value:"blue",action:"update"},{label:"Yellow",value:"yellow",action:"update"},{label:"Magenta",value:"magenta",action:"update"},{label:"Cyan",value:"cyan",action:"update"}],parent:"settings"},fontOpacity:{path:"fontOpacity",key:"fontOpacity",title:"Font Opacity",options:[{label:"100%",value:"100%",action:"update"},{label:"75%",value:"75%",action:"update"},{label:"50%",value:"50%",action:"update"},{label:"25%",value:"25%",action:"update"}],parent:"settings"},fontSize:{path:"fontSize",key:"fontSize",title:"Font Size",options:[{label:"200%",value:"200%",action:"update"},{label:"175%",value:"175%",action:"update"},{label:"150%",value:"150%",action:"update"},{label:"125%",value:"125%",action:"update"},{label:"100%",value:"100%",action:"update"},{label:"75%",value:"75%",action:"update"},{label:"50%",value:"50%",action:"update"}],parent:"settings"},fontFamily:{path:"fontFamily",key:"fontFamily",title:"Font Family",options:[{label:"Arial",value:"Arial",action:"update"},{label:"Georgia",value:"Georgia",action:"update"},{label:"Garamond",value:"Garamond",action:"update"},{label:"Courier New",value:"Courier New",action:"update"},{label:"Tahoma",value:"Tahoma",action:"update"},{label:"Times New Roman",value:"Times New Roman",action:"update"},{label:"Trebuchet MS",value:"Trebuchet MS",action:"update"},{label:"Verdana",value:"Verdana",action:"update"}],parent:"settings"},textShadow:{path:"textShadow",key:"textShadow",title:"Text Shadow",options:[{label:"None",value:"none",action:"update"},{label:"Raised",value:"raised",action:"update"},{label:"Depressed",value:"depressed",action:"update"},{label:"Uniform",value:"uniform",action:"update"},{label:"Drop Shadow",value:"drop shadow",action:"update"}],parent:"settings"},backgroundColor:{path:"backgroundColor",key:"backgroundColor",title:"Background Color",options:[{label:"White",value:"white",action:"update"},{label:"Black",value:"black",action:"update"},{label:"Red",value:"red",action:"update"},{label:"Green",value:"green",action:"update"},{label:"Blue",value:"blue",action:"update"},{label:"Yellow",value:"yellow",action:"update"},{label:"Magenta",value:"magenta",action:"update"},{label:"Cyan",value:"cyan",action:"update"}],parent:"settings"},backgroundOpacity:{path:"backgroundOpacity",key:"backgroundOpacity",title:"Background Opacity",options:[{label:"100%",value:"100%",action:"update"},{label:"75%",value:"75%",action:"update"},{label:"50%",value:"50%",action:"update"},{label:"25%",value:"25%",action:"update"},{label:"0%",value:"0%",action:"update"}],parent:"settings"},windowColor:{path:"windowColor",key:"windowColor",title:"Window Color",options:[{label:"White",value:"white",action:"update"},{label:"Black",value:"black",action:"update"},{label:"Red",value:"red",action:"update"},{label:"Green",value:"green",action:"update"},{label:"Blue",value:"blue",action:"update"},{label:"Yellow",value:"yellow",action:"update"},{label:"Magenta",value:"magenta",action:"update"},{label:"Cyan",value:"cyan",action:"update"}],parent:"settings"},windowOpacity:{path:"windowOpacity",key:"windowOpacity",title:"Window Opacity",options:[{label:"100%",value:"100%",action:"update"},{label:"75%",value:"75%",action:"update"},{label:"50%",value:"50%",action:"update"},{label:"25%",value:"25%",action:"update"},{label:"0%",value:"0%",action:"update"}],parent:"settings"}};class Jg{static bootstrap(){const e=document.createElement("div"),t=document.createElement("div"),i=document.createElement("span"),s=document.createElement("div");e.classList.add(this.CLASSES.CONTAINER),t.classList.add(this.CLASSES.HEADER),i.classList.add(this.CLASSES.TITLE),s.classList.add(this.CLASSES.BODY);const n=this._createBackButton();t.appendChild(n),t.appendChild(i);const r=this._createCloseButton();return t.appendChild(r),e.appendChild(t),e.appendChild(s),[e,i,s]}static show(e,t=null,i=null,s=!1){t&&t.classList.remove(this.CLASSES.PAGE_ACTIVE),i&&(i.classList.add(this.CLASSES.PAGE_ACTIVE),s?e.classList.add(this.CLASSES.NESTED):e.classList.remove(this.CLASSES.NESTED)),this._scrollup(e),e.classList.add(this.CLASSES.ACTIVE)}static hide(e){e.classList.remove(this.CLASSES.ACTIVE)}static isActive(e){return e.classList.contains(this.CLASSES.ACTIVE)}static updateTitle(e,t=""){e.innerText=t}static createOptionList(e,t){const i=document.createElement("div");return i.classList.add(this.CLASSES.PAGE),i.dataset.key=e,t.forEach((e=>{const t=this._createOptionListItem(e.label,e.value,e.action,e.persist);i.appendChild(t)})),i}static updateOptionListAllowedValues(e,t){Array.from(e.children).filter((e=>e instanceof HTMLButtonElement)).forEach((e=>{const i=this.CLASSES.PAGE_ITEM_UNAVAILABLE,{persist:s,value:n}=e.dataset,r=!!n&&t.includes(n);s||r?e.classList.remove(i):e.classList.add(i)}))}static updateOptionListSelection(e,t){const i=this.CLASSES.PAGE_ITEM_SELECTED;Array.from(e.children).filter((e=>e instanceof HTMLElement)).forEach((e=>{t===e.dataset.value?e.classList.add(i):e.classList.remove(i)}))}static updateOptionListItemPreview(e,t,i){const s=e.querySelector(`button[data-value="${t}"] span.raptive-player-settings-page-item-value`);s&&(s.innerText=i)}static _createOptionListItem(e,t,i,s=!1){const n=document.createElement("button");n.classList.add(this.CLASSES.PAGE_ITEM),n.dataset.action=i,n.dataset.value=t,s&&(n.dataset.persist="true");const r=document.createElement("span");r.innerText=e,n.appendChild(r);const a=document.createElement("span");if(a.classList.add("raptive-player-settings-page-item-value"),n.appendChild(a),"show"===i){const e=document.createElement("span"),t=this._createForwardIcon();e.appendChild(t),n.appendChild(e)}return n}static _scrollup(e){(null==e?void 0:e.lastElementChild)&&(e.lastElementChild.scrollTop=0)}static _createBackButton(){const e=document.createElement("button");e.classList.add(this.CLASSES.BACK_BUTTON),e.dataset.action="back";const t=this._createBackIcon();return e.appendChild(t),e}static _createBackIcon(){const e="http://www.w3.org/2000/svg",t=document.createElementNS(e,"svg");t.style.pointerEvents="none",t.setAttribute("viewBox","0 0 24 24"),t.setAttribute("width","24"),t.setAttribute("height","24"),t.setAttribute("stroke","currentColor"),t.setAttribute("stroke-width","2"),t.setAttribute("fill","none"),t.setAttribute("stroke-linecap","round"),t.setAttribute("stroke-linejoin","round"),t.setAttribute("class","feather feather-chevron-left");const i=document.createElementNS(e,"polyline");return i.setAttribute("points","15 18 9 12 15 6"),t.appendChild(i),t}static _createForwardIcon(){const e="http://www.w3.org/2000/svg",t=document.createElementNS(e,"svg");t.style.pointerEvents="none",t.setAttribute("viewBox","0 0 24 24"),t.setAttribute("width","20"),t.setAttribute("height","20"),t.setAttribute("fill","none"),t.setAttribute("stroke","currentColor"),t.setAttribute("stroke-width","2"),t.setAttribute("stroke-linecap","round"),t.setAttribute("stroke-linejoin","round"),t.setAttribute("class","feather feather-chevron-right");const i=document.createElementNS(e,"polyline");return i.setAttribute("points","9 18 15 12 9 6"),t.appendChild(i),t}static _createCloseButton(){const e=document.createElement("button");e.classList.add(this.CLASSES.CLOSE_BUTTON),e.dataset.action="hide";const t=this._createCloseIcon();return e.appendChild(t),e}static _createCloseIcon(){const e="http://www.w3.org/2000/svg",t=document.createElementNS(e,"svg");t.style.pointerEvents="none",t.setAttribute("viewBox","0 0 24 24"),t.setAttribute("width","24"),t.setAttribute("height","24"),t.setAttribute("stroke","currentColor"),t.setAttribute("stroke-width","2"),t.setAttribute("fill","none"),t.setAttribute("stroke-linecap","round"),t.setAttribute("stroke-linejoin","round"),t.setAttribute("class","css-i6dzq1");const i=document.createElementNS(e,"line");i.setAttribute("x1","18"),i.setAttribute("y1","6"),i.setAttribute("x2","6"),i.setAttribute("y2","18");const s=document.createElementNS(e,"line");return s.setAttribute("x1","6"),s.setAttribute("y1","6"),s.setAttribute("x2","18"),s.setAttribute("y2","18"),t.appendChild(i),t.appendChild(s),t}}Jg.CLASSES=Object.freeze({CONTAINER:"raptive-player-settings",ACTIVE:"raptive-player-settings--active",NESTED:"raptive-player-settings--nested",HEADER:"raptive-player-settings-header",BACK_BUTTON:"raptive-player-settings-back",TITLE:"raptive-player-settings-header-title",CLOSE_BUTTON:"raptive-player-settings-close",BODY:"raptive-player-settings-body",PAGE:"raptive-player-settings-page",PAGE_ACTIVE:"raptive-player-settings-page--active",PAGE_ITEM:"raptive-player-settings-page-item",PAGE_ITEM_SELECTED:"raptive-player-settings-page-item--selected",PAGE_ITEM_UNAVAILABLE:"raptive-player-settings-page-item--unavailable"});class Zg{get settings(){return this._settings}updateSetting(e,t){this._settings[e]=t,this._saveSettings(),this._videoEventBus.settingsUpdated.emit({key:e,value:t})}_saveSettings(){try{Fs.setInternalLocalStorage(this.STORAGE_KEY,this._settings)}catch(e){console.error("Failed to save settings:",e)}}_loadSettings(){try{const e=Fs.readInternalLocalStorage(this.STORAGE_KEY);e&&"object"==typeof e&&(this._settings={...this._settings,...e})}catch(e){console.error("Failed to load settings:",e)}}constructor(){this._videoEventBus=R.resolve(rr),this._settings={language:"",fontColor:"white",fontOpacity:"100%",fontSize:"100%",fontFamily:"Arial",textShadow:"none",backgroundColor:"black",backgroundOpacity:"50%",windowColor:"black",windowOpacity:"0%"},this.STORAGE_KEY="adthrive_video_settings",this._loadSettings()}}Zg=B([bn("VideoSettingsManager"),M(),j("design:type",Function),j("design:paramtypes",[])],Zg);let em=class{get el(){return this._container}show(e){const t=this._pages.get(this._activePage)||null,i=e?this._pages.get(e):null,s=!!(null==i?void 0:i.parent);this._activePage=null!=e?e:"",Jg.show(this._container,null==t?void 0:t.el,null==i?void 0:i.el,s),Jg.updateTitle(this._title,null==i?void 0:i.title)}hide(){Jg.hide(this._container)}toggle(e){Jg.isActive(this._container)?this.hide():this.show(e)}updatePageOptions(e,t){const i=this._pages.get(e);i&&Jg.updateOptionListAllowedValues(i.el,t)}_back(){const e=this._pages.get(this._activePage);e&&this.show(e.parent)}_update(e,t){if(!(e in this._state.settings))return;this._state.updateSetting(e,t),this._updateSettingUI(e,t);const i=this._pages.get(e);(null==i?void 0:i.parent)&&this._back()}_updateSettingUI(e,t){const i=this._pages.get(e);i&&(Jg.updateOptionListItemPreview(this._container,e,t),Jg.updateOptionListSelection(i.el,t))}_initPages(){Object.values(Qg).forEach((e=>{const t=Jg.createOptionList(e.key,e.options);this._addPage(e.key,e.title,t,e.parent)}))}_initOptionListSelections(){Object.entries(this._state.settings).forEach((([e,t])=>{Jg.updateOptionListItemPreview(this._container,e,t);const i=this._pages.get(e);i&&Jg.updateOptionListSelection(i.el,t)}))}_addPage(e,t,i,s=""){this._pages.set(e,{el:i,title:t,parent:s}),this._body.appendChild(i)}_setupListeners(){this._container.addEventListener("click",(e=>{if(!(e.target instanceof HTMLElement))return;const t=e.target.closest("button");if(!t)return;const i=t.dataset.action;var s;const n=null!=(s=t.dataset.value)?s:"";if(i)switch(i){case"show":this.show(n);break;case"hide":this.hide();break;case"back":this._back();break;case"update":var r,a;const e=null!=(a=null==(r=t.parentElement)?void 0:r.dataset.key)?a:"";this._update(e,n)}}))}constructor(){this._pages=new Map,this._activePage="",this._state=R.resolve(Zg),this._videoEventBus=R.resolve(rr),[this._container,this._title,this._body]=Jg.bootstrap(),this._initPages(),this._initOptionListSelections(),this._setupListeners(),this._videoEventBus.settingsUpdated.on((e=>this._updateSettingUI(e.key,e.value)))}};class tm{static createCaptionsContainer(){const e=document.createElement("div");e.classList.add(this.CLASSES.CAPTIONS);const t=document.createElement("span");return e.appendChild(t),e}static createCaptionsButton(e){const t=document.createElement("button");return t.innerText="CC",t.classList.add(this.CLASSES.CAPTIONS_BUTTON),t.addEventListener("click",(()=>e())),t}static toggleCaptionsButton(e,t){t?e.classList.add(this.CLASSES.CAPTIONS_BUTTON_VISIBLE):e.classList.remove(this.CLASSES.CAPTIONS_BUTTON_VISIBLE)}static updateCaptionStyles(e,t,i){const s=e.firstElementChild;if(s)switch(t){case"fontColor":e.style.color=this._getColor("font",i);break;case"fontOpacity":e.style.setProperty(this.VARIABLES.FONT_OPACITY,i);break;case"fontSize":s.style.fontSize=i;break;case"fontFamily":e.style.fontFamily=i;break;case"textShadow":e.style.textShadow=this._getTextShadow(i);break;case"backgroundColor":s.style.backgroundColor=this._getColor("background",i);break;case"backgroundOpacity":e.style.setProperty(this.VARIABLES.BACKGROUND_OPACITY,i);break;case"windowColor":e.style.backgroundColor=this._getColor("window",i);break;case"windowOpacity":e.style.setProperty(this.VARIABLES.WINDOW_OPACITY,i)}}static displayCaption(e,t){e.children[0].innerText=t,e.style.display="block"}static clearCaption(e){const t=e.children[0];e.style.display="none",t.innerText=""}static _getColor(e,t){const i={font:this.VARIABLES.FONT_OPACITY,background:this.VARIABLES.BACKGROUND_OPACITY,window:this.VARIABLES.WINDOW_OPACITY},s={white:"0, 0%, 100%",black:"0, 0%, 0%",red:"0, 100%, 50%",green:"120, 100%, 50%",blue:"240, 100%, 50%",yellow:"60, 100%, 50%",magenta:"300, 100%, 50%",cyan:"180, 100%, 50%"};return s[t]?`hsla(${s[t]}, var(${i[e]}))`:t}static _getTextShadow(e){return{none:"",raised:"rgb(0, 0, 0) 0px 0px 5px, rgb(0, 0, 0) 0px 1px 5px, rgb(0, 0, 0) 0px 2px 5px",depressed:"rgb(0, 0, 0) 0px -2px 1px",uniform:"rgb(0, 0, 0) -2px 0px 1px, rgb(0, 0, 0) 2px 0px 1px, rgb(0, 0, 0) 0px -2px 1px, rgb(0, 0, 0) 0px 2px 1px, rgb(0, 0, 0) -1px 1px 1px, rgb(0, 0, 0) 1px 1px 1px, rgb(0, 0, 0) 1px -1px 1px, rgb(0, 0, 0) 1px 1px 1px","drop shadow":"rgb(0, 0, 0) 0px 2px 1px"}[e]||""}}tm.CLASSES=Object.freeze({CAPTIONS:"raptive-player-captions",CAPTIONS_BUTTON:"raptive-player-captions-button",CAPTIONS_BUTTON_VISIBLE:"raptive-player-captions-button--visible"}),tm.VARIABLES=Object.freeze({FONT_OPACITY:"--raptive-player-captions-font-opacity",BACKGROUND_OPACITY:"--raptive-player-captions-background-opacity",WINDOW_OPACITY:"--raptive-player-captions-window-opacity"});class im{timestampToSeconds(e){const[t,i]=e.split(","),s=parseInt(i),[n,r,a]=t.split(":").map((e=>parseInt(e))),o=.001*s+a+60*r+3600*n;return Math.round(1e3*o)/1e3}correctFormat(e){let t=e.replace(".",",");var i,[s,n]=t.split(",");i=this.fixed_str_digit(3,n);var[r,a,o]=s.split(":");return`${this.fixed_str_digit(2,r,!1)}:${this.fixed_str_digit(2,a,!1)}:${this.fixed_str_digit(2,o,!1)},${i}`}fixed_str_digit(e,t,i=!0){return t.length==e?t:t.length>e?t.slice(0,e):t.length (\d{1,2}:\d{2}:\d{2},\d{1,3})/g);return t.shift(),t}tryDot(e){let t=(e=e.replace(/\r/g,"")).split(/(\d+)\n(\d{1,2}:\d{2}:\d{2}\.\d{1,3}) --> (\d{1,2}:\d{2}:\d{2}\.\d{1,3})/g);return t.shift(),this.seperator=".",t}fromSrt(e){var t=e,i=this.tryComma(t);0==i.length&&(i=this.tryDot(t));for(var s=[],n=0;n","&lrm":"‎","&rlm":"‏"," ":" "}),this.entities=e,this.parse=function(i,r){i=i.replace(/\0/g,"�");var a=Date.now(),o=0,l=i.split(/\r\n|\r|\n/),d=!1,c=[],h=[],u=[];function p(e,t){u.push({message:e,line:o+1,col:t})}var g=l[o],m=g.length,_="WEBVTT",f=0,v=6;for("\ufeff"===g[0]&&(f=1,v+=1),(mv&&" "!==g[v]&&"\t"!==g[v])&&p('No valid signature. (File needs to start with "WEBVTT".)'),o++;""!=l[o]&&null!=l[o];){if(p("No blank line after the signature."),-1!=l[o].indexOf("--\x3e")){d=!0;break}o++}for(;null!=l[o];){for(var y;!d&&""==l[o];)o++;if(!d&&null==l[o])break;y=Object.assign({},t,{id:"",startTime:0,endTime:0,pauseOnExit:!1,direction:"horizontal",snapToLines:!0,linePosition:"auto",lineAlign:"start",textPosition:"auto",positionAlign:"auto",size:100,alignment:"center",text:"",tree:null});var b=!0;if(-1==l[o].indexOf("--\x3e")){if(y.id=l[o],/^NOTE($|[ \t])/.test(y.id)){for(o++;""!=l[o]&&null!=l[o];)-1!=l[o].indexOf("--\x3e")&&p("Cannot have timestamp in a comment."),o++;continue}if(/^STYLE($|[ \t])/.test(y.id)){var S=[],E=!1;for(o++;""!=l[o]&&null!=l[o];)-1!=l[o].indexOf("--\x3e")&&(p("Cannot have timestamp in a style block."),E=!0),S.push(l[o]),o++;if(h.length){p("Style blocks cannot appear after the first cue.");continue}E||c.push(S.join("\n"));continue}if(""==l[++o]||null==l[o]){p("Cue identifier cannot be standalone.");continue}if(-1==l[o].indexOf("--\x3e")){b=!1,p("Cue identifier needs to be followed by timestamp.");continue}}d=!1;var C=new s(l[o],p),T=0;if(h.length>0&&(T=h[h.length-1].startTime),!b||C.parse(y,T)){for(o++;""!=l[o]&&null!=l[o];){if(-1!=l[o].indexOf("--\x3e")){p("Blank line missing before cue."),d=!0;break}""!=y.text&&(y.text+="\n"),y.text+=l[o],o++}var w=new n(y.text,p,r,e);y.tree=w.parse(y.startTime,y.endTime),h.push(y)}else for(y=null,o++;""!=l[o]&&null!=l[o];){if(-1!=l[o].indexOf("--\x3e")){d=!0;break}o++}}return h.sort((function(e,t){return e.startTimet.startTime?1:e.endTime>t.endTime?-1:e.endTime2||parseInt(t,10)>59)&&(l="hours"),":"==e[n])if(n++,2==(i=o(/\d/)).length){if("hours"==l||":"==e[n]){if(":"!=e[n])return void r("No seconds found or minutes is greater than 59.");if(n++,2!=(s=o(/\d/)).length)return void r("Must be exactly two digits.")}else{if(2!=t.length)return void r("Must be exactly two digits.");s=i,i=t,t="0"}if("."==e[n])if(n++,3==(a=o(/\d/)).length)if(parseInt(i,10)>59)r("You cannot have more than 59 minutes.");else{if(!(parseInt(s,10)>59))return 60*parseInt(t,10)*60+60*parseInt(i,10)+parseInt(s,10)+parseInt(a,10)/1e3;r("You cannot have more than 59 seconds.")}else r("Milliseconds must be given in three digits.");else r('No decimal separator (".") found.')}else r("Must be exactly two digits.");else r("No time unit separator found.");else r("Timestamp must start with a character in the range 0-9.");else r("No timestamp found.")}this.parse=function(t,o){if(a(i),t.startTime=l(),null!=t.startTime)if(t.startTime"==e[n]){if(n++,s.test(e[n])&&r("'--\x3e' not separated from timestamp by whitespace."),a(i),t.endTime=l(),null!=t.endTime)return t.endTime<=t.startTime&&r("End timestamp is not greater than start timestamp."),s.test(e[n]),a(i),function(e,t){for(var s=e.split(i),n=[],a=0;a100)){r("Line position cannot be >100%.");continue}if(""===u||isNaN(u)||!isFinite(u)){r("Line position needs to be a number");continue}if(void 0!==h){if(!["start","center","end"].includes(h)){r("Line alignment needs to be one of start, center or end");continue}t.lineAlign=h}t.snapToLines=!p,t.linePosition=parseFloat(u),parseFloat(u).toString()!==u&&(t.nonSerializable=!0)}else if("position"==l){if(/,/.test(d)){c=d.split(","),d=c[0];var g=c[1]}if("%"!=d[d.length-1]){r("Text position must be a percentage.");continue}if(parseInt(d,10)>100||parseInt(d,10)<0){r("Text position needs to be between 0 and 100%.");continue}if(""===(u=d.slice(0,d.length-1))||isNaN(u)||!isFinite(u)){r("Line position needs to be a number");continue}if(void 0!==g){if(!["line-left","center","line-right"].includes(g)){r("Position alignment needs to be one of line-left, center or line-right");continue}t.positionAlign=g}t.textPosition=parseFloat(u)}else if("size"==l){if("%"!=d[d.length-1]){r("Size must be a percentage.");continue}if(parseInt(d,10)>100){r("Size cannot be >100%.");continue}var m=d.slice(0,d.length-1);if(void 0===m||""===m||isNaN(m)){r("Size needs to be a number"),m=100;continue}if((m=parseFloat(m))<0||m>100){r("Size needs to be between 0 and 100%.");continue}t.size=m}else if("align"==l){var _=["start","center","end","left","right"];if(-1==_.indexOf(d)){r("Alignment can only be set to one of "+_.join(", ")+".");continue}t.alignment=d}else r("Invalid setting.")}}(e.substring(n),t),!0}else r("No valid timestamp separator found.");else r("No valid timestamp separator found.");else r("No valid timestamp separator found.")},this.parseTimestamp=function(){var t=l();if(null==e[n])return t;r("Timestamp must not have trailing characters.")}},n=function(e,t,i,n){this.entities=n;var r=this,a=0,o=function(e){"metadata"!=i&&t(e,a+1)};function l(){for(var t="data",i="",s="",l=[];null!=e[a-1]||0==a;){var d=e[a];if("data"==t)if("&"==d)s=d,t="escape";else if("<"==d&&""==i)t="tag";else{if("<"==d||null==d)return["text",i];i+=d}else if("escape"==t){if("<"==d||null==d){let e;return o("Incorrect escape."),(e=s.match(/^&#([0-9]+)$/))?i+=String.fromCharCode(e[1]):r.entities[s]?i+=r.entities[s]:i+=s,["text",i]}if("&"==d)o("Incorrect escape."),i+=s,s=d;else if(/[a-z#0-9]/i.test(d))s+=d;else if(";"==d){let e;(e=s.match(/^&#(x?[0-9]+)$/))?i+=String.fromCharCode("0"+e[1]):r.entities[s+d]?i+=r.entities[s+d]:(e=Object.keys(n).find((e=>s.startsWith(e))))?i+=r.entities[e]+s.slice(e.length)+d:(o("Incorrect escape."),i+=s+";"),t="data"}else o("Incorrect escape."),i+=s+d,t="data"}else if("tag"==t)if("\t"==d||"\n"==d||"\f"==d||" "==d)t="start tag annotation";else if("."==d)t="start tag class";else if("/"==d)t="end tag";else if(/\d/.test(d))i=d,t="timestamp tag";else{if(">"==d||null==d)return">"==d&&a++,["start tag","",[],""];i=d,t="start tag"}else if("start tag"==t)if("\t"==d||"\f"==d||" "==d)t="start tag annotation";else if("\n"==d)s=d,t="start tag annotation";else if("."==d)t="start tag class";else{if(">"==d||null==d)return">"==d&&a++,["start tag",i,[],""];i+=d}else if("start tag class"==t)if("\t"==d||"\f"==d||" "==d)s&&l.push(s),s="",t="start tag annotation";else if("\n"==d)s&&l.push(s),s=d,t="start tag annotation";else if("."==d)s&&l.push(s),s="";else{if(">"==d||null==d)return">"==d&&a++,s&&l.push(s),["start tag",i,l,""];s+=d}else if("start tag annotation"==t){if(">"==d||null==d)return">"==d&&a++,["start tag",i,l,s=s.split(/[\u0020\t\f\r\n]+/).filter((function(e){if(e)return!0})).join(" ")];s+=d}else if("end tag"==t){if(">"==d||null==d)return">"==d&&a++,["end tag",i];i+=d}else if("timestamp tag"==t){if(">"==d||null==d)return">"==d&&a++,["timestamp",i];i+=d}else o("Never happens.");a++}}this.parse=function(t,n){var r={children:[]},d=r,c=[];function h(e){d.children.push({type:"object",name:e[1],classes:e[2],children:[],parent:d}),d=d.children[d.children.length-1]}function u(e){for(var t=d;t;){if(t.name==e)return!0;t=t.parent}}for(;null!=e[a];){var p=l();if("text"==p[0])d.children.push({type:"text",value:p[1],parent:d});else if("start tag"==p[0]){"chapters"==i&&o("Start tags not allowed in chapter title text.");var g=p[1];"v"!=g&&"lang"!=g&&""!=p[3]&&o("Only and can have an annotation."),"c"==g||"i"==g||"b"==g||"u"==g||"ruby"==g||"rt"==g&&"ruby"==d.name?h(p):"v"==g?(u("v")&&o(" cannot be nested inside itself."),h(p),d.value=p[3],p[3]||o(" requires an annotation.")):"lang"==g?(h(p),d.value=p[3]):o("Incorrect start tag.")}else if("end tag"==p[0])"chapters"==i&&o("End tags not allowed in chapter title text."),p[1]==d.name?d=d.parent:"ruby"==p[1]&&"rt"==d.name?d=d.parent.parent:o("Incorrect end tag.");else if("timestamp"==p[0]){"chapters"==i&&o("Timestamp not allowed in chapter title text.");var m=new s(p[1],o).parseTimestamp();null!=m&&((m<=t||m>=n)&&o("Timestamp must be between start timestamp and end timestamp."),c.length>0&&c[c.length-1]>=m&&o("Timestamp must be greater than any previous timestamp."),d.children.push({type:"timestamp",value:m,parent:d}),c.push(m))}}for(;d.parent;)"v"!=d.name&&o("Required end tag missing."),d=d.parent;return function e(t){const i={...t};return t.children&&(i.children=t.children.map(e)),i.parent&&delete i.parent,i}(r)}},r=function(){function e(e){const t=("00"+1e3*(e-Math.floor(e)).toFixed(3)).slice(-3);let i=0,s=0,n=0;return e>=3600&&(i=Math.floor(e/3600)),s=Math.floor((e-3600*i)/60),n=Math.floor(e-3600*i-60*s),(i?i+":":"")+(""+s).padStart(2,"0")+":"+(""+n).padStart(2,"0")+"."+t}function i(t){for(var s="",n=0;n/g,">");else if("object"==r.type){if(s+="<"+r.name,r.classes)for(var a=0;a"}else"timestamp"==r.type?s+="<"+e(r.value)+">":s+="<"+r.value+">"}return s}function s(s){return(void 0!==s.id?s.id+"\n":"")+e(s.startTime)+" --\x3e "+e(s.endTime)+function(e){var i="";const s=Object.keys(t).filter((i=>e[i]!==t[i]));return s.includes("direction")&&(i+=" vertical:"+e.direction),s.includes("alignment")&&(i+=" align:"+e.alignment),s.includes("size")&&(i+=" size:"+e.size+"%"),(s.includes("lineAlign")||s.includes("linePosition"))&&(i+=" line:"+e.linePosition+(e.snapToLines?"":"%")+(e.lineAlign&&e.lineAlign!=t.lineAlign?","+e.lineAlign:"")),(s.includes("textPosition")||s.includes("positionAlign"))&&(i+=" position:"+e.textPosition+"%"+(e.positionAlign&&e.positionAlign!==t.positionAlign?","+e.positionAlign:"")),i}(s)+"\n"+i(s.tree.children)+"\n\n"}this.serialize=function(e,t){var i="WEBVTT\n\n";if(t)for(var n=0;nthis._isSupportedTrack(e))).map((e=>{const t=e.language;return{language:t,label:this._getTrackLabel(t),file:e.file,cues:[]}}))}static _isSupportedTrack(e){return"captions"===e.kind&&!!e.language&&am.includes(e.language)}static _getTrackLabel(e){var t;return null!=(t=St[e])?t:"Unknown"}static _parse(e){return e.trim().startsWith("WEBVTT")?this._parseVTT(e):this._parseSRT(e)}static _parseVTT(e){try{const t=new rm.WebVTTParser;return t.parse(e).cues.map((e=>({start:e.startTime,end:e.endTime,text:e.text})))}catch(e){return console.error("Failed to parse VTT captions:",e),[]}}static _parseSRT(e){try{return(new im).fromSrt(e).map((e=>({start:e.startSeconds,end:e.endSeconds,text:e.text})))}catch(e){return console.error("Failed to parse SRT captions:",e),[]}}}class lm{get captionLanguage(){return this._preferredLanguage}init(e){this._reset(),this._tracks=om.getTracks(e),this._updateCaptionsButtonVisibility(),this._settings.updatePageOptions("language",this._tracks.map((e=>e.language))),this._setTrack(this._preferredLanguage)}_applyStoredSettings(){const e=this._settingsState.settings;Object.entries(e).forEach((([e,t])=>{this._setStyle(e,t)})),this._preferredLanguage=e.language}_updateCaptionsButtonVisibility(){const e=this._tracks.length>0;tm.toggleCaptionsButton(this.captionsButton,e)}_handleSettingsUpdate(e,t){"language"===e?this._setTrack(t):this._setStyle(e,t)}async _setTrack(e){this._preferredLanguage=e,e||(tm.clearCaption(this.captionContainer),this._detachTimeUpdateListener()),this._activeTrack=this._tracks.find((t=>t.language===e))||null,this._activeTrack&&(this._activeTrack.cues=await om.load(this._activeTrack.file),this._attachTimeUpdateListener(),-1!==this._currentCueIndex&&this._updateCaption(!0)),this._settings.hide()}_setStyle(e,t){tm.updateCaptionStyles(this.captionContainer,e,t)}_reset(){tm.clearCaption(this.captionContainer),this._detachTimeUpdateListener(),this._tracks=[],this._activeTrack=null,this._currentCueIndex=-1}_handleTimeUpdate(){if(!this._activeTrack)return tm.clearCaption(this.captionContainer),void this._detachTimeUpdateListener();this._updateCaption()}_updateCaption(e=!1){var t;const i=this._videoElement.currentTime,s=(null==(t=this._activeTrack)?void 0:t.cues)||[];if(s.length&&(-1===this._currentCueIndex||is[this._currentCueIndex].end||e)){const e=s.findIndex((e=>i>=e.start&&i<=e.end));-1!==e?(this._currentCueIndex=e,tm.displayCaption(this.captionContainer,s[e].text)):tm.clearCaption(this.captionContainer)}}_attachTimeUpdateListener(){!this._onTimeUpdateAttached&&this._activeTrack&&(this._videoElement.addEventListener("timeupdate",this._onTimeUpdate),this._onTimeUpdateAttached=!0)}_detachTimeUpdateListener(){this._onTimeUpdateAttached&&(this._videoElement.removeEventListener("timeupdate",this._onTimeUpdate),this._onTimeUpdateAttached=!1)}constructor(e,t){this._videoElement=e,this._settings=t,this._logPrefix="Captions",this._tracks=[],this._activeTrack=null,this._currentCueIndex=-1,this._preferredLanguage="",this._videoEventBus=R.resolve(rr),this._settingsState=R.resolve(Zg),this._onTimeUpdate=this._handleTimeUpdate.bind(this),this._onTimeUpdateAttached=!1,this.captionContainer=tm.createCaptionsContainer(),this.captionsButton=tm.createCaptionsButton((()=>this._settings.toggle("language"))),this._videoEventBus.settingsUpdated.on((e=>this._handleSettingsUpdate(e.key,e.value))),this._applyStoredSettings()}}const dm="adError",cm="adsManagerLoaded",hm="adProgress",um="allAdsCompleted",pm="complete",gm="contentResumeRequested",mm="impression",_m="loaded",fm="log",vm="pause",ym="resume",bm="skip",Sm="start",Em="auto-injected",Cm="embedded-stationary",Tm="outstream",wm="playlist",km="related",Am="related-sticky",Im="stickyoutstream",xm="normal";class Pm{get muted(){return this._muted}get volumeLevel(){return this._volumeLevel}get preventClick(){return this._preventClick}get isVideoContent(){return this._isVideoContent}set isVideoContent(e){this._isVideoContent=e}toggleControlsFullWidth(e){const t=this._playerControls.classList;e?t.add("adthrive-full-width"):t.remove("adthrive-full-width")}showControls(){var e;if(!this.mediaStarted)return;const t=this._isVideoContent;this.toggleControlsFullWidth(t),this._controlsVisible=!0,null==(e=this._progressBar)||e.update(),this._playerControls.classList.remove("adthrive-player-ad-controls-hidden"),this._resetAutoHideControlsTimeout()}hideControls(){var e,t;!this._isDesktop&&!this._isVideoContent||(null==(e=this._progressBar)?void 0:e.isDragging())||(this._playerControls.classList.add("adthrive-player-ad-controls-hidden"),null==(t=this._settings)||t.hide(),this._controlsVisible=!1,this._clearAutoHideControlsTimeout())}toggleProgressBar(e){this._progressBar&&(e?this._playerControls.classList.add("adthrive-player-progress-bar-visible"):this._playerControls.classList.remove("adthrive-player-progress-bar-visible"),this._progressBar.toggle(e))}setPlayButtonState(e){this._playButtonState!==e&&(this._playButtonState=e,this._setActiveButtonState(this._playButtonState))}_setPreviousVolume(e){return this._previousVolumeLevel=e,this._previousVolumeLevel}setVolume(e){return this._volumeLevel=e,this._videoElement.volume=this.volumeLevel,this._videoElement.volume}muteVolume(){this._setMuteState(!0),this.setVolume(0),this._setMuteIconToMuted(!0)}unmuteVolume(e){this._setMuteState(!1),this.setVolume(e||this._previousVolumeLevel),this._setMuteIconToMuted(!1)}_setMuteState(e){return this._muted=!!e,this._videoElement.muted=this._muted,this._videoElement.muted}_emitAction(e,t){const i=t?`user${e.charAt(0).toUpperCase()+e.substring(1)}`:e,s=this._isVideoContent?"content":"ad";this.videoActionEvents.emit({action:i,context:s})}_addEmitterIfNeeded(e){return this._isInstream?Object.entries(e).reduce(((e,[t,i])=>(e[t]=e=>{"onkickoffAdPlayback"!==t&&this._emitAction(t,e),i(e)},e)),{}):e}enablePlayerControls(e,t){if(this._created)return;this._created=!0;const{play:i,pause:s,volume:n,onkickoffAdPlayback:r,fullscreen:a}=this._addEmitterIfNeeded(e),o=this._playerControls;o.classList.add("adthrive-player-ad-controls"),this._playerType===Cm&&r&&this._createOverlay(r);const l=this._createPlayPauseControls(i,s);var d,c,h;(this._createVolumeIconControls(n),o.appendChild(l),o.appendChild(this._playerControlsVolumeContainer),this._isInstream)?(o.classList.add("adthrive-player-ad-controls-hidden"),this._settings=new em,null==(d=this._videoElement.parentNode)||d.appendChild(this._settings.el),this._captions=new lm(this._videoElement,this._settings),o.appendChild(this._captions.captionsButton),a&&(this._fullscreenButton=this.createFullscreenButton(a),o.appendChild(this._fullscreenButton)),this._progressBar=new Xg(this._videoElement,(()=>this._controlsVisible)),o.appendChild(this._progressBar._container),null==(c=this._videoElement.parentNode)||c.insertBefore(o,this._videoElement),null==(h=this._videoElement.parentNode)||h.insertBefore(this._captions.captionContainer,this._videoElement)):null==t||t.appendChild(this._playerControls);const u=this._videoElement.parentElement;u&&this._isInstream&&this._playerType!==Cm&&this._setVideoContainerEvents(u)}_setVideoContainerEvents(e){e&&(e.addEventListener("mouseenter",this.showControls.bind(this)),e.addEventListener("mouseleave",this.hideControls.bind(this)),e.addEventListener("focusin",this.showControls.bind(this)),e.addEventListener("focusout",(t=>!e.contains(t.target)&&this.hideControls())),e.addEventListener("touchstart",this._handleTouchStart.bind(this)),e.addEventListener("touchend",this._handleTouchEnd.bind(this)))}_handleTouchStart(e){var t;if(null==(t=this._progressBar)?void 0:t.isDragging())return;const i=e.target,s=i.parentElement,n=i.querySelectorAll(`${this._adthrivePlayerIcon}-volume`);(null==n?void 0:n.length)&&n.forEach((e=>{an(e,this._hiddenIconClassName)})),s&&an(s,"active"),this._controlsVisible?this._preventClick=!1:(this._preventClick=!0,this.showControls())}_handleTouchEnd(e){const t=e.target,i=t.parentElement;t.classList.contains("adthrive-player-progress-bar-handle")||(i&&an(i,"active"),this._controlsVisible&&e.stopPropagation())}_createOverlay(e){var t;this._overlay.className="adthrive-video-overlay";const i=document.createElement("DIV");i.tabIndex=0,i.className="adthrive-player-big-play-button",i.innerHTML="►",this._overlay.appendChild(i),null==(t=this._videoElement.parentElement)||t.appendChild(this._overlay),this._overlay.addEventListener("click",this._handleOverlayClick.bind(this,e)),i.addEventListener("keydown",pc((t=>{["Space","Enter"].includes(t.code)&&(t.preventDefault(),this._handleOverlayClick(e),setTimeout((()=>{var e;return null==(e=this._pauseButton)?void 0:e.focus()}),100))}),100))}_handleOverlayClick(e){e(),this._overlay.remove();const t=this._videoElement.parentElement;t&&(t.addEventListener("mouseenter",this.showControls.bind(this)),t.addEventListener("mouseleave",this.hideControls.bind(this)),t.addEventListener("focusin",this.showControls.bind(this)),t.addEventListener("focusout",(e=>!t.contains(e.target)&&this.hideControls())))}_createPlayPauseControls(e,t){const i=document.createElement("DIV");return i.className="adthrive-player-ad-controls-play",this._playButton=this._createPlayButton(e),this._pauseButton=this._createPauseButton(t),i.appendChild(this._playButton),i.appendChild(this._pauseButton),this._isDesktop&&(i.addEventListener("mouseenter",this._togglePlayButton.bind(this)),i.addEventListener("mouseleave",this._togglePlayButton.bind(this))),i}_resetAutoHideControlsTimeout(e=5e3){this._clearAutoHideControlsTimeout(),!this._isDesktop&&this._isVideoContent&&(this._autoHideControlsTimeout=window.setTimeout((()=>{this.hideControls()}),e))}_clearAutoHideControlsTimeout(){this._autoHideControlsTimeout&&(clearTimeout(this._autoHideControlsTimeout),this._autoHideControlsTimeout=void 0)}_setActiveButtonState(e){const t=this._playerControls.querySelector(`#${this._adthrivePlayerIcon}-${e}-${this._playerType}`);let i=null;i="pause"===e?t&&t.previousSibling:t&&t.nextSibling,null==t||t.classList.remove(this._hiddenIconClassName),null==i||i.classList.add(this._hiddenIconClassName)}_createPlayButton(e){const t=document.createElement("DIV");t.classList.add(`${this._adthrivePlayerIcon}`,`${this._adthrivePlayerIcon}-play`),"pause"===this._playButtonState&&t.classList.add(this._hiddenIconClassName),t.id=`${this._adthrivePlayerIcon}-play-${this._playerType}`,t.tabIndex=0;const i=this._createSvg("white",!1);return i.appendChild(this._createPolygon("white","2.29,0 2.29,18 15.71,9")),t.appendChild(i),t.addEventListener("click",e),t.addEventListener("keydown",pc((t=>{["Space","Enter"].includes(t.code)&&(t.preventDefault(),e(t),setTimeout((()=>{var e;return null==(e=this._pauseButton)?void 0:e.focus()}),100))}),100)),t}_createPauseButton(e){const t=document.createElement("DIV");t.classList.add(`${this._adthrivePlayerIcon}`,`${this._adthrivePlayerIcon}-pause`),"play"===this._playButtonState&&t.classList.add(this._hiddenIconClassName),t.id=`${this._adthrivePlayerIcon}-pause-${this._playerType}`,t.tabIndex=0;const i=this._createSvg("white",!1);return i.appendChild(this._createRect("white","5","18","2.29")),i.appendChild(this._createRect("white","5","18","10.71")),t.addEventListener("click",e),t.addEventListener("keydown",pc((t=>{["Space","Enter"].includes(t.code)&&(t.preventDefault(),e(t),setTimeout((()=>{var e;return null==(e=this._playButton)?void 0:e.focus()}),100))}),100)),t.appendChild(i),t}_appendVolumeSlider(e){const t=this._createVolumeSlider(e);this._playerControlsVolumeContainer.classList.add("adthrive-player-ad-controls-volume-container-with-slider"),this._playerControlsVolumeIcon.appendChild(t)}_createVolumeIconControls(e){this._playerControlsVolumeContainer.className="adthrive-player-ad-controls-volume-container",this._playerControlsVolumeIcon.className="adthrive-player-ad-controls-volume",this._isInstream&&this._playerControlsVolumeContainer.classList.add("adthrive-player-ad-controls-volume-container-with-bar"),this._createVolumeMutedButton(e),this._createVolumeUnMutedButton(e),this._playerControlsVolumeIcon.appendChild(this._muteButton),this._playerControlsVolumeIcon.appendChild(this._unmuteButton),this._playerControlsVolumeContainer.appendChild(this._playerControlsVolumeIcon),this._isDesktop&&this._appendVolumeSlider(e)}_createVolumeMutedButton(e){this._muteButton.tabIndex=0,this._muteButton.classList.add(`${this._adthrivePlayerIcon}`,`${this._adthrivePlayerIcon}-volume`,`${this._adthrivePlayerIcon}-volume-muted`),this.muted||this._muteButton.classList.add(this._hiddenIconClassName);const t=this._createSvg("white",!1);t.appendChild(this._createPath("white","M16.45,9.02c0,1.64-0.57,2.97-1.33,4.03l1.2,1.15C17.29,12.94,18,11.26,18,9.04c0-6.95-6.96-8.7-6.96-8.7v1.32C11.04,1.66,16.45,3.96,16.45,9.02z")),t.appendChild(this._createPath("white","M13.27,14.94c-1.18,0.91-2.23,1.33-2.23,1.33v1.44c0,0,1.68-0.42,3.39-1.67L13.27,14.94z")),t.appendChild(this._createRect("white","1.71","22.61","8.15","-2.28","matrix(0.6917 -0.7222 0.7222 0.6917 -3.7421 9.2833)")),t.appendChild(this._createPath("white","M12.98,11c0.31-0.55,0.52-1.2,0.52-1.98c0-2.95-2.99-4.24-2.99-4.24v3.86L12.98,11z")),t.appendChild(this._createPath("white","M10.52,12.3v0.86c0,0,0.24-0.1,0.58-0.3L10.52,12.3z")),t.appendChild(this._createPolygon("white","9.21,7.4 9.24,0.74 5.82,4.15")),t.appendChild(this._createPolygon("white","3.69,5.77 0.06,5.77 0,12.07 4.14,12.07 9.18,17.11 9.2,11.04")),this._muteButton.addEventListener("click",(()=>this._toggleVolume(e))),this._muteButton.addEventListener("keydown",pc((t=>{["Space","Enter"].includes(t.code)&&(t.preventDefault(),this._toggleVolume(e),setTimeout((()=>{var e;return null==(e=this._unmuteButton)?void 0:e.focus()}),100))}),100)),this._muteButton.appendChild(t)}_createVolumeUnMutedButton(e){this._unmuteButton.tabIndex=0,this._unmuteButton.classList.add(`${this._adthrivePlayerIcon}`,`${this._adthrivePlayerIcon}-volume`,`${this._adthrivePlayerIcon}-volume-unmuted`),this.muted&&this._unmuteButton.classList.add(this._hiddenIconClassName);const t=this._createSvg("white",!1);t.appendChild(this._createPolygon("white","9.18,17.11 4.14,12.07 0,12.07 0.06,5.77 4.2,5.77 9.24,0.74")),t.appendChild(this._createPath("white","M11.04,0.34c0,0,6.96,1.75,6.96,8.7s-6.96,8.67-6.96,8.67v-1.44c0,0,5.42-2.18,5.42-7.25s-5.42-7.37-5.42-7.37V0.34z")),t.appendChild(this._createPath("white","M10.52,4.79c0,0,2.99,1.28,2.99,4.24s-2.99,4.14-2.99,4.14V4.79z")),this._unmuteButton.addEventListener("click",(()=>this._toggleVolume(e))),this._unmuteButton.addEventListener("keydown",pc((t=>{["Space","Enter"].includes(t.code)&&(t.preventDefault(),this._toggleVolume(e),setTimeout((()=>{var e;return null==(e=this._muteButton)?void 0:e.focus()}),100))}),100)),this._unmuteButton.appendChild(t)}_setInitialVolume(e){const t=this._isDesktop?.5:.8,i=e?t:0,s=!e;this._setPreviousVolume(t),this.setVolume(i),this._setSliderRange(),this._setMuteState(s)}_setSliderRange(){this._volumeSlider.value=""+100*this.volumeLevel}_createVolumeSlider(e){const t=document.createElement("DIV");t.tabIndex=0,t.className="adthrive-player-volume-control",t.id=`adthrive-${this._playerType}-volume-control`;const i=this._volumeSlider;return i.setAttribute("type","range"),i.setAttribute("min","0"),i.setAttribute("max","100"),i.setAttribute("step","1"),i.tabIndex=-1,i.addEventListener("mouseup",(t=>this._volumeChange(t,e)),!1),t.appendChild(i),t.addEventListener("keydown",(t=>{["Space","Enter","ArrowLeft","ArrowRight"].includes(t.code)&&t.preventDefault(),pc((()=>{if("ArrowRight"===t.code){var s,n;if(i.value=`${Math.min(Number(i.value)+5,100)}`,this.muted)this._setMuteState(!1),null==(s=this._muteButton)||s.classList.add(this._hiddenIconClassName),null==(n=this._unmuteButton)||n.classList.remove(this._hiddenIconClassName);const t=Number(i.value)/100;this.setVolume(t),this._setSliderRange(),e()}if("ArrowLeft"===t.code){var r,a;if(i.value=`${Math.max(Number(i.value)-5,0)}`,!this.muted&&"0"===i.value)this._setMuteState(!0),null==(r=this._unmuteButton)||r.classList.add(this._hiddenIconClassName),null==(a=this._muteButton)||a.classList.remove(this._hiddenIconClassName);const t=Number(i.value)/100;this.setVolume(t),this._setSliderRange(),e()}}),100)()})),t}_setMuteIconToMuted(e=!0){e?(this._unmuteButton.classList.add(this._hiddenIconClassName),this._muteButton.classList.remove(this._hiddenIconClassName)):(this._muteButton.classList.add(this._hiddenIconClassName),this._unmuteButton.classList.remove(this._hiddenIconClassName))}_volumeChange(e,t){if(this.preventClick)return;const i=e.target,s=this.volumeLevel,n=Number(i.value)/100,r=0===n,a=this.muted&&n>0;r?this.muteVolume():a?this.unmuteVolume(n):this.setVolume(n),this._setPreviousVolume(s),this._setSliderRange(),t()}_toggleVolume(e){this.preventClick||(this.muted?this.unmuteVolume():(this._setPreviousVolume(this.volumeLevel),this.muteVolume()),this._setSliderRange(),e())}_togglePlayButton(e){const t=e.target;t&&an(t,"active")}createFullscreenButton(e){const t=document.createElement("button");return t.classList.add(this._adthrivePlayerIcon),t.classList.add(`${this._adthrivePlayerIcon}-fullscreen`),t.appendChild(this.createMaximizeIcon()),t.appendChild(this.createMinimizeIcon()),t.addEventListener("click",e),t}createMinimizeIcon(){const e=this._createSvg("white",!1);return e.classList.add("raptive-player-secondary-icon"),e.setAttribute("stroke","white"),e.setAttribute("stroke-width","2"),e.setAttribute("stroke-linecap","round"),e.setAttribute("stroke-linejoin","round"),e.appendChild(this._createLine("1","17","7","11")),e.appendChild(this._createLine("3","11","7","11")),e.appendChild(this._createLine("7","11","7","15")),e.appendChild(this._createLine("17","1","11","7")),e.appendChild(this._createLine("11","7","15","7")),e.appendChild(this._createLine("11","3","11","7")),e}createMaximizeIcon(){const e=this._createSvg("white",!1);return e.classList.add("raptive-player-primary-icon"),e.setAttribute("stroke","white"),e.setAttribute("stroke-width","2"),e.setAttribute("stroke-linecap","round"),e.setAttribute("stroke-linejoin","round"),e.appendChild(this._createLine("1","17","7","11")),e.appendChild(this._createLine("1","17","5","17")),e.appendChild(this._createLine("1","13","1","17")),e.appendChild(this._createLine("17","1","11","7")),e.appendChild(this._createLine("13","1","17","1")),e.appendChild(this._createLine("17","1","17","5")),e}_createPath(e,t){const i=document.createElementNS("http://www.w3.org/2000/svg","path");return i.setAttribute("d",t),i.setAttribute("fill",e),i}_createLine(e,t,i,s){const n=document.createElementNS("http://www.w3.org/2000/svg","line");return n.setAttribute("x1",e),n.setAttribute("y1",t),n.setAttribute("x2",i),n.setAttribute("y2",s),n}_createPolygon(e,t){const i=document.createElementNS("http://www.w3.org/2000/svg","polygon");return i.setAttribute("points",t),i.setAttribute("fill",e),i}_createRect(e,t,i,s,n,r){const a=document.createElementNS("http://www.w3.org/2000/svg","rect");return a.setAttribute("x",s),a.setAttribute("height",i),a.setAttribute("width",t),a.setAttribute("fill",e),n&&a.setAttribute("y",n),r&&a.setAttribute("transform",r),a}_createSvg(e,t){const i=document.createElementNS("http://www.w3.org/2000/svg","svg");return i.setAttribute("focusable",`${t}`),i.setAttribute("width","18"),i.setAttribute("height","18"),i.setAttribute("viewBox","0 0 18 18"),i.setAttribute("fill",e),i}setTracks(e){var t;null==(t=this._captions)||t.init(e)}get captionLanguage(){var e,t;return null!=(t=null==(e=this._captions)?void 0:e.captionLanguage)?t:""}constructor({videoElement:e,playerType:t,isDesktop:i,isVideoContent:s}){this._playerControls=document.createElement("DIV"),this._isInstream=!1,this._isDesktop=!1,this._progressBar=null,this._playButtonState="pause",this._muted=!0,this._muteButton=document.createElement("DIV"),this._unmuteButton=document.createElement("DIV"),this._playerControlsVolumeContainer=document.createElement("DIV"),this._playerControlsVolumeIcon=document.createElement("DIV"),this._previousVolumeLevel=.5,this._volumeSlider=document.createElement("INPUT"),this._volumeLevel=0,this._adthrivePlayerIcon="adthrive-player-icon",this._hiddenIconClassName="adthrive-hidden",this._overlay=document.createElement("DIV"),this._preventClick=!1,this._created=!1,this._playButton=null,this._pauseButton=null,this._fullscreenButton=null,this._controlsVisible=!0,this.mediaStarted=!1,this.videoActionEvents=new V,this._captions=null,this._settings=null,this._isInstream=Em===t||Cm===t||Am===t,this._playerType=t,this._videoElement=e,this._isVideoContent=s,this._isDesktop=i;const n=t===Cm;this._playButtonState=n?"play":"pause",this._controlsVisible=!n,this._setInitialVolume(n)}}Pm=B([bn("VideoPlayerControls"),j("design:type",Function),j("design:paramtypes",["undefined"==typeof VideoPlayerControlsParameters?Object:VideoPlayerControlsParameters])],Pm);class Om{attachEventHandlers(e,t){for(const i of e)this.addEventHandler(i.target,i.event,i.handler,t)}detachEventHandlers(e){for(const t of e)this.removeEventHandler(t.target,t.event)}addEventHandler(e,t,i,s){const n=s?i.bind(s):i,r=this.getHandlerKey(e,t);this.boundHandlers.set(r,n),e.addEventListener(t,n,!1)}removeEventHandler(e,t){const i=this.getHandlerKey(e,t),s=this.boundHandlers.get(i);s&&(e.removeEventListener(t,s,!1),this.boundHandlers.delete(i))}getHandlerKey(e,t){return`${e.constructor.name}_${t}`}constructor(){this.boundHandlers=new Map}}class Rm{get imaSDKVersion(){return this._ima&&this._ima.VERSION}get adContainer(){return this._adContainer}get adDisplayContainer(){return this._adDisplayContainer}get adsLoader(){return this._adsLoader}get adsRequest(){return this._adsRequest}get adsManager(){return this._adsManager}get adPlayReady(){return this._adPlayReady}get prematureAdPlay(){return this._prematureAdPlay}get isAdActive(){return this._isAdActive}setAdPlayReady(e){this._adPlayReady=e}setPrematureAdPlay(e){this._prematureAdPlay=e}setIsAdActive(e){this._isAdActive=e}async init(){await this.initIMA(),this.initVisibilityListener(),this.adReady.on((()=>{this.setAdPlayReady(!0)}))}setupOnInject(){window.google.ima.settings.setDisableCustomPlaybackForIOS10Plus(!0),this.initAdContainer(),this.setAdDisplayContainer(this._videoElement),this._adDisplayContainer&&(this._adDisplayContainer.initialize(),this.setAdsLoader(this._adDisplayContainer)),this.setAdsRequest(),this._isAutoPlay&&this._adsRequest&&(this._controls.muteVolume(),this._adsRequest.setAdWillAutoPlay(!0),this._adsRequest.setAdWillPlayMuted(!0)),this.addSlickDialogListener()}requestAd(e){const t=this._adsRequest,i=this._size,{adResponse:s,adTagUrl:n}=e;t.linearAdSlotWidth=i[0],t.linearAdSlotHeight=i[1],t.nonLinearAdSlotWidth=i[0],t.nonLinearAdSlotHeight=i[1],t.vastLoadTimeout=this._isInstream()?this._config.video.vastTimeoutISV:this._config.video.vastTimeoutOSV,s&&(t.adsResponse=s),n&&(t.adTagUrl=n),this.setAdsLoaderEventHandlers(),this._adsLoader.requestAds(t)}resize(){var e;null==(e=this._adsManager)||e.resize(this._adContainer.clientWidth,this._adContainer.clientHeight,xm)}reInitIMA(){this.setAdsRequest(),this._isAutoPlay&&this._adsRequest&&(this._adsRequest.setAdWillAutoPlay(!0),this._adsRequest.setAdWillPlayMuted(!0))}disable(){var e,t,i;this.removeAdsLoaderEventHandlers(),null==(e=this.adsLoader)||e.destroy(),null==(t=this.adDisplayContainer)||t.destroy(),null==(i=this.adsManager)||i.destroy(),this._adsLoader=void 0,this._adDisplayContainer=void 0,this._adsManager=void 0}resetAdContainer(){this._adContainer=document.createElement("DIV")}remove(e=!1){var t,i;!this._isInstream()||e?(this.removeAdsLoaderEvents(),null==(t=this.adsLoader)||t.destroy(),null==(i=this.adDisplayContainer)||i.destroy(),this.removeAdsLoader(),this.removeAdDisplayContainer()):this.adsLoader&&this.removeAdsLoaderEvents();this._setState("idle"),this.adsManager&&(this.adsManager.destroy(),this.removeAdsManager())}playAdInStream(){var e,t;const{volumeLevel:i}=this._controls;null==(e=this._adsManager)||e.setVolume(i),null==(t=this._adsManager)||t.start()}playAdOutStream(e){this.requestAd(e),this._adsRequestTimer=window.setTimeout((()=>this._adError({error:{data:{errorCode:-1,errorMessage:"Adloader failed to request ads: unknown error",type:"error"}}})),2e4)}playAd(e=!1){var t;this._controls.preventClick||(e&&this._setUserClickedToPlay(!0),"playing"!==this._getState()&&(null==(t=this._adsManager)||t.resume()))}pauseAd({event:e,pausedByOtherPlayer:t}={}){var i;this._controls.preventClick||(this._setUserClickedToPlay(!1),(e||t)&&this._setIntentionalPause(!0),"paused"!==this._getState()&&(null==(i=this._adsManager)||i.pause()))}_resumed(e){this._resumedCallback();const t=this._getAdRenderDetails(e);this.adPlay.emit(t),this._setState("playing"),this._setIntentionalPause(!1),this._setPlayButtonState()}_paused(e){if("paused"===this._getState())return;const t=this._getAdRenderDetails(e);this.adPause.emit(t),this._setState("paused"),this._setPlayButtonState()}_adsManagerLoaded(e){this.resetAdsRequestTimer(),this.setAdsManager(e,this._videoElement);const t=this._adsManager;if(t){this.setAdsManagerEventHandlers();try{const e=this._isInstream()?this._adContainer.clientWidth:this._size[0],i=this._isInstream()?this._adContainer.clientHeight:this._size[1];t.init(e,i,xm),this._isInstream()||t.start()}catch(e){W.error("IMAManager","_adsManagerLoaded",this._playerType,e)}}}_adLoaded(e){if(this._isInstream()){var t;null==(t=this._adsManager)||t.setVolume(this._controls.volumeLevel)}else{var i;null==(i=this._adsManager)||i.setVolume(0),this._controls.muteVolume();const e={play:this.playAd.bind(this,!0),pause:e=>this.pauseAd({event:e}),volume:this._onVolumeChangeCallback};this._controls.enablePlayerControls(e,this._adContainer)}const s=this._getAdRenderDetails(e);this.adLoaded.emit(s),document.hidden&&this.pauseAd()}_adStarted(e){if(this._isInstream()&&!this._adPlayReady)return this.setAdPlayReady(!0),void this.pauseAd();const t=this._getAdRenderDetails(e);var i,s;(this.adStarted.emit(t),this._setState("playing"),this.setIsAdActive(!0),this._setIsVideoContent(!1),this._controls.isVideoContent=!1,this._setPlayButtonState(),this._isInstream())?null==(i=this._adsManager)||i.setVolume(this._controls.volumeLevel):(this._container.classList.remove("adthrive-player-idle"),this._container.classList.add("adthrive-player-playing"),null==(s=this._adsManager)||s.setVolume(0))}_adComplete(e){this.setIsAdActive(!1);const t=this._getAdRenderDetails(e);this.adCompleted.emit(t)}_adError(e){this.resetAdsRequestTimer();const t=e&&e.error&&e.error.data,i=t?{code:t.errorCode,message:t.errorMessage,type:t.type}:{};this.adError.emit(i)}_adImpression(e){const t=this._getAdRenderDetails(e);this.adImpression.emit(t)}_contentResumeRequested(e){const t=this._getAdRenderDetails(e);this.contentResumeRequested.emit(t)}_allAdsComplete(e){const t=this._getAdRenderDetails(e);this.allAdsCompleted.emit(t)}_adProgress(e){const t=e.getAdData();t&&this.adProgress.emit({duration:t.duration,position:t.currentTime})}_adSkipped(e){const t=this._getAdRenderDetails(e);this.adSkipped.emit(t)}_log(e){this.log.emit(e)}async initIMA(){if(Rm.isIMALoaded())this._ima=window.google.ima;else try{var e;if(await this.importIMAScript(),await Rm._waitForIMAInit(),this._ima=null==(e=window.google)?void 0:e.ima,!this._ima)throw new Error("IMA SDK loaded, but `window.google.ima` is undefined.")}catch(e){throw new Error(`Failed to initialize IMA SDK: ${e instanceof Error?e.message:String(e)}`)}}initVisibilityListener(){this._isInstream()&&(this._visibilityListener=this._eventProxy.pageVisibility.on(this.handlePageVisibilityChange.bind(this)))}initAdContainer(){this._adContainer.id=`adthrive-${this._playerType}-ad-container`,this._adContainer.className="adthrive-player-ad-container",this._isOutstream()&&(this._adContainer.style.width=`${this._size[0]}px`,this._adContainer.style.height=`${this._size[1]}px`),this._isInstream()&&(this._adContainer.classList.add("raptive-player-ad","raptive-player-ad-container-idle"),this._adContainer.style.width="100%",this._adContainer.style.height="100%")}static isIMALoaded(){var e;return!!(null==(e=window.google)?void 0:e.ima)}async importIMAScript(){Rm.isIMALoaded()||await Cs(Rm.IMA_SCRIPT_URL,!1,!1,!0)}setAdsLoader(e){var t;if(!this._ima)return;this._adsLoader=new this._ima.AdsLoader(e);const i=null==(t=this._adsLoader)?void 0:t.getSettings();null==i||i.setNumRedirects(this._config.video.maxRedirect),null==i||i.setVpaidMode(this._ima.ImaSdkSettings.VpaidMode.ENABLED),null==i||i.setVpaidMode(this._ima.ImaSdkSettings.VpaidMode.INSECURE)}removeAdsLoader(){this._adsLoader=void 0}setAdsLoaderEventHandlers(){const e=[{target:this._adsLoader,event:cm,handler:this._adsManagerLoaded},{target:this._adsLoader,event:dm,handler:this._adError}];this._eventManager.attachEventHandlers(e,this)}removeAdsLoaderEventHandlers(){const e=[{target:this._adsLoader,event:cm,handler:this._adsManagerLoaded},{target:this._adsLoader,event:dm,handler:this._adError}];this._eventManager.detachEventHandlers(e)}setAdsManager(e,t){if(!this._ima)return;const i=new this._ima.AdsRenderingSettings;i.restoreCustomPlaybackStateOnAdBreakComplete=!0,i.bitrate=this._config.video.maxBitrate,i.enablePreloading=this._config.video.enablePreloading,i.loadVideoTimeout=this._config.video.loadVideoTimeout,this._shouldUseHardcodedAdPodDuration&&(i.disableUi=!0),this._adsManager=e.getAdsManager(t,i)}removeAdsManager(){this._adsManager=void 0}setAdsManagerEventHandlers(){const e=[{target:this._adsManager,event:vm,handler:this._paused},{target:this._adsManager,event:ym,handler:this._resumed},{target:this._adsManager,event:Sm,handler:this._adStarted},{target:this._adsManager,event:pm,handler:this._adComplete},{target:this._adsManager,event:_m,handler:this._adLoaded},{target:this._adsManager,event:dm,handler:this._adError},{target:this._adsManager,event:hm,handler:this._adProgress},{target:this._adsManager,event:um,handler:this._allAdsComplete},{target:this._adsManager,event:gm,handler:this._contentResumeRequested},{target:this._adsManager,event:mm,handler:this._adImpression},{target:this._adsManager,event:bm,handler:this._adSkipped},{target:this._adsManager,event:fm,handler:this._log}];this._eventManager.attachEventHandlers(e,this)}setAdDisplayContainer(e){this._ima&&(this._adDisplayContainer=new this._ima.AdDisplayContainer(this._adContainer,e))}removeAdDisplayContainer(){this._adDisplayContainer=void 0}setAdsRequest(){this._ima&&(this._adsRequest=new this._ima.AdsRequest)}resetAdsRequestTimer(){this._adsRequestTimer&&(clearTimeout(this._adsRequestTimer),this._adsRequestTimer=null)}addSlickDialogListener(){document.addEventListener("slick-auth-dialog-opened",(()=>{var e;"paused"!==this._getState()&&(null==(e=this._adsManager)||e.pause())})),document.addEventListener("slick-auth-dialog-closed",(()=>{this._getIntentionalPause()||this.playAd()}))}removeAdsLoaderEvents(){this._isInstream()&&this.removeAdsLoaderEventHandlers(),this._visibilityListener&&this._visibilityListener()}handlePageVisibilityChange(e){"playing"===this._getState()&&e?this.pauseAd():"paused"!==this._getState()||e||this._getIntentionalPause()||this.playAd()}_isOutstream(){return Tm===this._playerType||Im===this._playerType}_isInstream(){return Em===this._playerType||Cm===this._playerType||Am===this._playerType}_getAdRenderDetails(e){const t=this._adsRequest,i=t.adTagUrl,s=t.adsResponse;let n;if(e&&e.getAd){const t=e.getAd(),i=Object.keys(t)||[];n=t&&i.length&&t[i[0]]}const r=e&&Object.keys(e)||[];return n=n||r.reduce(((t,i)=>{if(!e[i]||"object"!=typeof e[i]||Array.isArray(e[i]))return;const s=Object.keys(e[i]);s&&s.length&&e[i][s[0]]}),{}),{ad:n,userRequestContext:{...i&&{adTagUrl:i},...s&&{vastXml:s}}}}static _waitForIMAInit(e=50,t=5e3){return new Promise(((i,s)=>{var n;if(null==(n=window.google)?void 0:n.ima)return i();const r=Date.now(),a=setInterval((()=>{var e;(null==(e=window.google)?void 0:e.ima)?(clearInterval(a),i()):Date.now()-r>=t&&(clearInterval(a),s(new Error("Timed out waiting for IMA SDK to initialize")))}),e)}))}constructor(e,t,i,s,n,r,a,o,l,d,c,h,u,p,g,m,_,f){this._config=e,this._playerType=t,this._size=i,this._isAutoPlay=s,this._container=n,this._videoElement=r,this._controls=a,this._eventProxy=o,this._setPlayButtonState=l,this._getState=d,this._setState=c,this._getIntentionalPause=h,this._setIntentionalPause=u,this._setUserClickedToPlay=p,this._resumedCallback=g,this._setIsVideoContent=m,this._onVolumeChangeCallback=_,this._shouldUseHardcodedAdPodDuration=f,this._adContainer=document.createElement("DIV"),this._adsRequestTimer=null,this._adPlayReady=!1,this._prematureAdPlay=!1,this._isAdActive=!1,this._eventManager=new Om,this.adCompleted=new V,this.adError=new V,this.adImpression=new V,this.adLoaded=new V,this.adPause=new V,this.adPlay=new V,this.adProgress=new V,this.adReady=new V,this.adRequest=new V,this.adSkipped=new V,this.adStarted=new V,this.allAdsCompleted=new V,this.contentResumeRequested=new V,this.log=new V}}Rm.IMA_SCRIPT_URL="https://imasdk.googleapis.com/js/sdkloader/ima3.js";class Lm extends Fn{_setupVideoPlayerControls(){return new Pm({videoElement:this._videoElement,playerType:this._playerType,isDesktop:this._isDesktop,isVideoContent:this.isVideoContent})}attachEventHandlers(e){for(const t of e)this.addEventHandler(t.target,t.event,t.handler)}addEventHandler(e,t,i){const s=i.bind(this),n=this.getHandlerKey(e,t);this._boundHandlers.set(n,s),e.addEventListener(t,s,!1)}getHandlerKey(e,t){return`${e.constructor.name}_${t}`}async init(){try{await this.imaManager.init()}catch(e){return void W.error("VideoPlayer","init",this._playerType,"Failed to initialize player. IMA is not defined.")}this.injectPlayer()}injectPlayer(){this._remove(),this._injectPlayer(),this.ready.emit()}_injectPlayer(){this._isInstream&&this._injectInstreamPlayer(),this._container.id=`adthrive-${this._playerType}-container`,this._videoElement.setAttribute("webkit-playsinline","true"),this._videoElement.setAttribute("playsinline","true"),this._videoElement.setAttribute("disablePictureInPicture","true"),this._pageElement.appendChild(this._container),this.imaManager.setupOnInject()}setPlayButtonState(){const e=this.imaManager.isAdActive&&"playing"===this.state||this.isVideoContent&&"playing"===this.videoContentState,t=this.imaManager.isAdActive&&"paused"===this.state,i=this.isVideoContent&&"paused"===this.videoContentState,s=t||i;e?this._videoPlayerControls.setPlayButtonState("pause"):s&&this._videoPlayerControls.setPlayButtonState("play")}_play(e){this.imaManager.setIsAdActive(!1),this.isVideoContent=!0,this._videoPlayerControls.isVideoContent=!0,this.videoContentState="playing",this.setPlayButtonState(),this.play.emit(e)}_playerClick(e){this.isVideoContent&&!this._videoPlayerControls.preventClick&&("playing"===this.videoContentState?this._pauseVideoPlayer(e):"paused"===this.videoContentState&&this._playVideoPlayer(),this.setPlayButtonState(),this.click.emit(e))}_playerVolumeChange(e){this.playerVolumeChange.emit(e)}_loadedMetaData(e){this.loadedMetaData.emit(e)}_pause(e){this.videoContentState="paused",this.setPlayButtonState(),this.pause.emit(e)}_error(e){this.error.emit(e)}_seeking(e){this.seeking.emit(e)}_seeked(e){this.seeked.emit(e)}_ended(e){this.videoContentState="ended",this.ended.emit(e)}_timeupdate(e){this.timeupdate.emit(e)}_resumedCallback(){this.playerNumber&&this._eventProxy.emitVideoPlayingEvent(this.playerNumber)}_remove(){this.imaManager.remove()}_removePlayer(){var e,t;null==(t=this._container)||null==(e=t.parentElement)||e.removeChild(this._container)}_injectInstreamPlayer(){const e=this._container,t=this._videoElement,i=this._playerPosition,s=this._playerType;this._initVideoListeners(),e.className=`adthrive-${s}-player-container`,this._playerType!==Em&&this._playerType!==Am||e.classList.add("adthrive-collapse-player"),i.classList.add("raptive-player-position"),this._config.video.removeVideoTitleWrapper||this.createTitleOverlayContainer(),t.classList.add("raptive-player-video"),this._playerContainer.classList.add("raptive-player-container","raptive-player-reset"),this._isMobile&&this._playerContainer.classList.add("raptive-player-container-mobile"),this._playerContainer.appendChild(t),this._playerContainer.appendChild(this.imaManager.adContainer),i.appendChild(this._playerContainer),e.appendChild(i);const n={play:this._playVideoPlayer.bind(this),pause:this._pauseVideoPlayer.bind(this),volume:this._onVolumeChange.bind(this),fullscreen:this._onToggleFullscreen.bind(this),onkickoffAdPlayback:()=>{this.kickoffAdPlayback.emit(),this._eventProxy.emitVideoPlayingEvent(this.playerNumber)}};this._videoPlayerControls.enablePlayerControls(n)}_initVideoListeners(){this.attachEventHandlers([{target:this._videoElement,event:"ended",handler:this._ended},{target:this._videoElement,event:"error",handler:this._error},{target:this._videoElement,event:"seeking",handler:this._seeking},{target:this._videoElement,event:"seeked",handler:this._seeked},{target:this._videoElement,event:"loadedmetadata",handler:this._loadedMetaData},{target:this._videoElement,event:"pause",handler:this._pause},{target:this._videoElement,event:"play",handler:this._play},{target:this._videoElement,event:"click",handler:this._playerClick.bind(this)},{target:this._videoElement,event:"volumechange",handler:this._playerVolumeChange},{target:this._videoElement,event:"timeupdate",handler:this._timeupdate}])}createTitleOverlayContainer(e=!1){const t=this._playerType===Em||this._playerType===Am&&e;this._videoTitleOverlayContainer.classList.add("adthrive-title-overlay");const i=document.createElement("div");i.classList.add("adthrive-video-title-description-container","adthrive-video-text-cutoff"),this._videoTitleDiv.id="adthrive-video-title-text",this._videoDescriptionDiv.id="adthrive-video-description-text",i.appendChild(this._videoTitleDiv),this._isMobile||i.appendChild(this._videoDescriptionDiv),t?(this._wrapperTitleWrapperElement=document.createElement("a"),this._wrapperTitleWrapperElement.classList.add("adthrive-wrapper-title-wrapper"),this._wrapperTitleWrapperElement.appendChild(i),this._videoTitleOverlayContainer.appendChild(this._wrapperTitleWrapperElement)):this._videoTitleOverlayContainer.appendChild(i),this._playerContainer.appendChild(this._videoTitleOverlayContainer)}_pauseVideoPlayer(e){if(!this._videoPlayerControls.preventClick)if(e&&(this._intentionalPause=!0),this.isVideoContent&&"paused"!==this.videoContentState)this._videoElement.pause();else if("paused"!==this.state){var t;null==(t=this.imaManager.adsManager)||t.pause()}}_playVideoPlayer(){if(this._videoPlayerControls.preventClick)return;this._isInstream&&this.playerNumber&&this._eventProxy.emitVideoPlayingEvent(this.playerNumber);if("playing"!==this.videoContentState&&this.isVideoContent)this._videoElement.play();else if("playing"!==this.state){var e;this._intentionalPause=!1,null==(e=this.imaManager.adsManager)||e.resume()}}_onVolumeChange(){var e;this.isVideoContent?this._videoPlayerControls.setVolume(this._videoPlayerControls.volumeLevel):null==(e=this.imaManager.adsManager)||e.setVolume(this._videoPlayerControls.volumeLevel)}_onToggleFullscreen(){const e=this._playerContainer;e&&(Fi()&&this._videoElement&&this._videoElement.webkitSupportsFullscreen?this._videoElement.webkitEnterFullscreen():document.fullscreenElement?document.exitFullscreen().then((()=>e.classList.remove("raptive-player-fullscreen"))).catch((e=>{console.error(`Error attempting to exit fullscreen mode: ${e.message}`)})):e.requestFullscreen().then((()=>e.classList.add("raptive-player-fullscreen"))).catch((e=>{console.error(`Error attempting to enable fullscreen mode: ${e.message}`)})))}_resetPlayerReferences(){this.imaManager.resetAdContainer(),this._container=document.createElement("DIV"),this._videoElement=document.createElement("VIDEO"),this._videoPlayerControls=this._setupVideoPlayerControls(),this._playerContainer=document.createElement("DIV"),this._playerPosition=document.createElement("DIV"),this._videoDescriptionDiv=document.createElement("DIV"),this._videoTitleDiv=document.createElement("DIV"),this._videoTitleOverlayContainer=document.createElement("DIV")}_removeInstream(e=!1){e&&(this._removePlayer(),e&&this._resetPlayerReferences()),this.imaManager.remove(e)}constructor(e,t,i,s,n,r,a,o,l,d,c){super(),this._playerId=e,this._playlistId=t,this._playerType=i,this._pageElement=s,this.size=n,this._config=r,this._eventProxy=a,this._autoplay=o,this._id=l,this.playerNumber=d,this._shouldUseHardcodedAdPodDuration=c,this.canPlay=!0,this.error=new V,this.seeking=new V,this.seeked=new V,this.isFirstPlay=!0,this.isVideoContent=!1,this.pause=new V,this.play=new V,this.click=new V,this.playerVolumeChange=new V,this.loadedMetaData=new V,this.ended=new V,this.timeupdate=new V,this.playlist=[],this.ready=new V,this.kickoffAdPlayback=new V,this.state="idle",this.videoContentState="idle",this._videoTitleDiv=document.createElement("DIV"),this._videoDescriptionDiv=document.createElement("DIV"),this._videoTitleOverlayContainer=document.createElement("DIV"),this._container=document.createElement("DIV"),this._playerPosition=document.createElement("DIV"),this._isMobile=Ki(),this._isTablet=Yi(),this._isDesktop=!this._isMobile&&!this._isTablet,this._playerContainer=document.createElement("DIV"),this._videoElement=document.createElement("VIDEO"),this._userClickedToPlay=!1,this._intentionalPause=!1,this._isInstream=!1,this._instreamTypes=[Em,Cm,Am],this.requestVideoBids=()=>{throw new Error("Request video bids not set")},this.buildVideoUrl=()=>{throw new Error("Build video url not set")},this.waitForConsent=()=>{throw new Error("Wait for consent not set")},this._boundHandlers=new Map,this._isInstream=this._instreamTypes.includes(this._playerType),this._videoPlayerControls=this._setupVideoPlayerControls(),this.imaManager=new Rm(r,i,n,o,this._container,this._videoElement,this._videoPlayerControls,this._eventProxy,(()=>this.setPlayButtonState()),(()=>this.state),(e=>this.state=e),(()=>this._intentionalPause),(e=>this._intentionalPause=e),(e=>this._userClickedToPlay=e),(()=>this._resumedCallback()),(e=>this.isVideoContent=e),this._onVolumeChange.bind(this),!!this._shouldUseHardcodedAdPodDuration)}}class Dm extends Lm{_listenForVideoRibbonFooter(){this._footerVideoRibbonStateListenerOff=this._footerConfigEventBus.footerVideoRibbonStateChanged.on((e=>{e?this.imaManager.pauseAd():"paused"!==this.state||this._intentionalPause||this.imaManager.playAd()}))}_handleReady(){this.adPlaying=!1;const e=document.getElementsByClassName("adthrive-sticky-outstream-idle")[0],t=document.getElementsByClassName("adthrive-sticky-outstream-active")[0];e?e.classList.add("adthrive-new-outstream-player"):t&&this._toggleActive(!0)}_handleAdStart(){this.adPlaying=!0,this._toggleActive(!0)}_handleAdErrorOrComplete(){this.adPlaying=!1,this._toggleActive(!1),this._remove(),this._footerVideoRibbonStateListenerOff&&this._footerVideoRibbonStateListenerOff()}_toggleActive(e){const t=document.getElementsByClassName("adthrive-new-outstream-player")[0];t&&(e?(t.classList.add("adthrive-sticky-outstream-active"),t.classList.remove("adthrive-sticky-outstream-idle")):(t.classList.remove("adthrive-sticky-outstream-active"),t.classList.add("adthrive-sticky-outstream-idle")))}_injectPlayer(){const e=this._container,t=this._videoElement,i=this._playerType,s=this.size;this._pageElement.classList.add("adthrive-video-stickyoutstream-new-player"),e.className=`adthrive-${i}-container adthrive-player-idle`,e.style.width=`${s[0]}px`,e.style.height=`${s[1]}px`,t.style.width=`${s[0]}px`,t.style.height=`${s[1]}px`,e.appendChild(t),e.appendChild(this.imaManager.adContainer),t.load(),super._injectPlayer()}_remove(){this._removePlayer(),super._remove()}constructor(e,t,i,s,n,r,a,o,l){super(e,t,i,s,r,o,n,a),this.adId=l,this.adPlaying=!1,this._footerConfigEventBus=R.resolve(Xn),this.ready.on(this._handleReady.bind(this)),this.imaManager.adStarted.on(this._handleAdStart.bind(this)),this.imaManager.allAdsCompleted.on(this._handleAdErrorOrComplete.bind(this)),this.imaManager.adError.on(this._handleAdErrorOrComplete.bind(this)),this._listenForVideoRibbonFooter()}}class Mm{get outstreamPlayer(){return this._outstreamPlayer}callRendererWithUrl(e,t,i=!1){const s=i?Im:Tm,n=i?this._stickyOutstreamSize:[300,225];this._callRenderAd({adTagUrl:e},t,s,n)}get standardOutstreamConfig(){const e=this._config.video,t={...this._rendererConfig},i=e.outstreamPlacement;return e.setStandardOutstreamBackupRenderer&&(t.renderer.backupOnly=!0),{playerSize:[640,480],...i&&{placement:i},...this._sharedConfig,...t}}get stickyOutstreamConfig(){return{...this._sharedConfig,...this._rendererConfig,startdelay:0,placement:5,playerSize:this._stickyOutstreamSize}}get _rendererConfig(){return{renderer:{url:this._imaEndpoint,render:e=>{this._renderer(e)}}}}_callRenderer(e,t,i,s=!1){const n=this._slotManager.getSlot(e),r=s?Im:Tm;n&&s&&(n.stickyOutstreamShortVideo=!1,n.stickyOutstreamLastAdErrored=!1,n.stickyOutstreamRefreshTimeout=5e3,n.stickyOutstreamErrorLogged=!1,n.stickyOutstreamRenderedTimestamp=Date.now()),this._callRenderAd(t,e,r,i)}_callRenderAd(e,t,i,s){const n=document.getElementById(t);if(n){const r=Math.floor(1e8*Math.random()).toString(),a=this._config,o=this._outstreamPlayer=new Dm(r,"",i,n,this._videoEventProxy,s,!0,a,t);this._setPlayerEvents(o,e),o.init()}}_handleAdImpression(e){const t=this._slotManager.getSlot(e);this._lastRenderedAdId=null,e.includes("StickyOutstream")&&t&&this._logCreativeIdWithPreviousError(t,e)}_handleComplete(e){this._slotManager.getSlot(e);e.includes("StickyOutstream")}_handleErrorEvent(e,t){this._handleOffEvent();const i=this._slotManager.getSlot(e);var s;e.includes("StickyOutstream")&&i&&(W.error("StickyOutstream","adError",{adId:e,...t}),this._creativeFailureDetection(i,null!=(s=this._lastRenderedAdId)?s:""),i.stickyOutstreamRefreshTimeout=2500,i.stickyOutstreamLastAdErrored=!0,this._lastRenderedAdId=null,this._setSlotForceRefresh(e,!0))}_creativeFailureDetection(e,t){const i=this._config,s=this._prebidMethods.getBidResponsesForAdUnitCode(e.id).bids||[],n=i.video.outstreamCreativeFailureThreshold;for(const e of s)if(e.adId===t&&e.creativeId&&!i.prebid.blockedCreativeIds.includes(e.creativeId)){let t=this._erroredOutCreativeIds.get(e.creativeId.toString())||0;t++,this._erroredOutCreativeIds.set(e.creativeId.toString(),t),t>=n&&i.prebid.blockedCreativeIds.push(e.creativeId);break}}_logCreativeIdWithPreviousError(e,t){const i=this._prebidMethods.getBidResponsesForAdUnitCode(e.id).bids||[];for(const e of i)if(e.adId===t&&e.creativeId){(this._erroredOutCreativeIds.get(e.creativeId.toString())||0)&&W.event("JWPlayer","_logCreativeIdWithPreviousError",{creativeId:e.creativeId});break}}_handleAdTimeChange(e,t){const i=this._slotManager.getSlot(t);let s=!1;if(!t.includes("StickyOutstream")||!i)return;const{duration:n,position:r}=e,a=(n||30)-r,o=n<10,l=1!==this._config.prebid.refreshStickyOutstreamAuctionCount,d=r<100&&r>30&&r0&&a<=10||d:a>0&&a<=5||d,s&&!i.isRefreshing){let e=l&&!o?1e4:5e3;n<5&&(e=1e3*n),i.stickyOutstreamShortVideo=o,i.stickyOutstreamRefreshTimeout=e,this._setSlotForceRefresh(t)}}_handleAdSkip(e){const t=this._slotManager.getSlot(e);e.includes("StickyOutstream")&&t&&(t.stickyOutstreamRefreshTimeout=2500,this._setSlotForceRefresh(e))}_handleOffEvent(){this._offEvents=this._offEvents.filter((e=>(e(),!1)))}_renderer(e){const t=e.ad||e.vastXml,i=-1!==e.adUnitCode.indexOf("StickyOutstream"),s=i?this._stickyOutstreamSize:[300,225],n=t?{adResponse:t}:{adTagUrl:e.vastUrl};this._lastRenderedAdId=e.adId,this._callRenderer(e.sharedBidInUse||e.adUnitCode,n,s,i)}_setPlayerEvents(e,t){const i=this._offEvents;i.push(e.imaManager.adImpression.on((()=>this._handleAdImpression(e.adId)))),i.push(e.imaManager.adError.on((t=>this._handleErrorEvent(e.adId,t)))),i.push(e.imaManager.adCompleted.on((()=>this._handleComplete(e.adId)))),i.push(e.ready.on((()=>{e.imaManager.playAdOutStream(t)}))),i.push(e.imaManager.adProgress.on((t=>this._handleAdTimeChange(t,e.adId)))),i.push(e.imaManager.adSkipped.on((()=>this._handleAdSkip(e.adId))))}_setSlotForceRefresh(e,t=!1,i=!1){const s=this._slotManager,n=s.getSlot(e),r=e.includes("StickyOutstream");let a=!t&&!i;if(!n||!r||n.isRefreshing)return;n.isRefreshing=!0;const o=t&&void 0!==n.stickyOutstreamErrorCount&&n.stickyOutstreamErrorCountthis._setTargetingForFill(e))),this._slotEventBus.gamEmptyNoBidResponse.on((e=>this._noFillForceRefresh(e))),this._slotEventBus.noBidResponses.on((e=>{const t=this._slotManager.getSlot(e);t&&(t.isRefreshing=!1,this._setSlotForceRefresh(t.id,!1,!0))}))}}Mm=B([M(),j("design:type",Function),j("design:paramtypes",[void 0===_c?Object:_c,void 0===Kg?Object:Kg,void 0===Yg?Object:Yg,void 0===Bn?Object:Bn,void 0===Sc?Object:Sc,void 0===Mn?Object:Mn])],Mm);class Bm extends Er{init(){this._key="AdditionalOutstreamUnitsExperiment",this._lookup="AOS",this._default=!1}isEnabled(){return super.isEnabled()}}Bm=B([bn("AdditionalOutstreamUnitsExperiment"),M()],Bm);class Fm extends Er{init(){this._key="OneVideoStream",this._lookup="RMOS1",this._default=!1}}Fm=B([bn("OneVideoStreamExperiment"),M()],Fm);class jm extends br{init(){this._key="SuppressOutreamSlowConnection",this._lookup="SOCON"}}jm=B([bn("OutstreamSOCONExperiment"),M()],jm);class Nm extends br{init(){this._key="NativeDescriptionLength",this._lookup="NTVDL"}get result(){return this._result}}Nm=B([bn("NativeDescriptionLengthExperiment"),M()],Nm);class Um extends Er{init(){this._key="OutstreamWithSOExperiment",this._lookup="OWSO",this._default=!0}run(){return super.run()}}Um=B([bn("OutstreamWithSOExperiment"),M()],Um);class Vm extends Er{init(){this._key="NativeHoldout",this._lookup="NTVHO",this._default=!1}}Vm=B([bn("NativeHoldoutExperiment"),M()],Vm);class zm extends br{init(){this._key="NativeRecipeTitleLength",this._lookup="NTVRTL"}get result(){return this._result}}zm=B([bn("NativeRecipeTitleLength"),M()],zm);class Hm{runOneStreamExperiment(){const e=R.resolve(Bm);this._gam.setTargeting({key:"abgroup",value:this._config.abGroup.groups.join(",")}),this.additionalOutstreamUnitsExperiment=e.result,this.additionalOutstreamUnitsExperiment&&[Qe.Content_3,Qe.Content_5,Qe.Recipe_1].forEach((e=>{this._standardOutstreamSlots.add(e)}))}isOutstreamAllowed(){return!this._oneVideoStreamExperiment.result||!this._config.video.hasJwPlayer}isSlowConnection(){var e;const t=null!=(e=this._soconExperiment.result)?e:0;if(void 0!==this._context.downlink){return this._context.downlink<=t}return!1}outstreamEnabled(e){const t=e.location===Qe.Video_StickyOutstream,i=!t&&this.isSlowConnection();return{outstreamCapable:(this._config.adTypes.outstreamEnabled||t)&&this.outstreamSlots.has(e.placementMapName)&&this.isOutstreamAllowed()&&!i}}nativeEnabled(e){const t=this._nativeHoldoutExperiment.result,i=this._config.adTypes.has(Ki()?`nativeMobile${e.location}`:`nativeDesktop${e.location}`),s=!t&&!!i&&!!this._nativeEligibleSlots.includes(e.location);return e.location.includes(Qe.Recipe)?s&&!!this.getNativeRecipeSize(e.sizes):s}getNativeRecipeSize(e){return Ki()?e.find((e=>e[1]===this._native.recipeMobileSize[1])):e.find((e=>e[0]===this._native.recipeSizes[0][0]&&e[1]===this._native.recipeSizes[0][1]||e[0]===this._native.recipeSizes[1][0]&&e[1]===this._native.recipeSizes[1][1]))}getMediaType(e,t={}){const i={},{slot:s,video:n}=e;if(n&&this._config.video.instreamAdUnits.has(n.name)&&this._config.video.plcmtUnits.has(n.name)){const e=this.getInstreamConfig(n);i.video=e}else if(s){const e={sizes:s.sizes,...s.isHighlyViewable()&&{pos:1},...s.mainAuctionWidth&&s.mainAuctionHeight&&{w:s.mainAuctionWidth,h:s.mainAuctionHeight}};t.banner&&(i.banner=e),t.outstream&&(i.video=s.location!==Qe.Video_StickyOutstream?this._outstream.standardOutstreamConfig:this._outstream.stickyOutstreamConfig),t.native&&(i.native=this._getNativeConfig(s.location,(s.sequence||1)-1,s.sizes))}return i}get outstreamSlots(){return this._outstreamWithSOExperiment.result?this._standardOutstreamSlots:new Set([Qe.Video_StickyOutstream_1])}getInstreamConfig(e){var t,i,s;return{context:"instream",playerSize:e.size,mimes:this._config.video.mimeType,protocols:null==(t=this._config.video.videoProtocols)?void 0:t.protocols,...(null==(i=this._config.video.plcmtUnits)?void 0:i.get(e.name))&&{plcmt:this._config.video.plcmtUnits.get(e.name)},maxduration:this._config.video.maxDuration,...(null==(s=this._config.video.playbackmethod)?void 0:s.get(e.name))&&{playbackmethod:this._config.video.playbackmethod.get(e.name)},...e.collapsible&&{playbackend:3},linearity:1,api:this._config.video.apiValue,w:e.size[0],h:e.size[1],pos:this._config.video.position.id,minduration:1,startdelay:0,placement:1,skip:0,delivery:[1,2]}}_getNativeSize(e,t){return e.includes(Qe.Content)?this._native.contentSize:e.includes(Qe.Recipe)?this.getNativeRecipeSize(t):void 0}_getAdditionalNativeParams(e){return{context:1,contextsubtype:10,privacy:0,seq:e}}_getNativeConfig(e,t,i){const s=this._native,n=this._getNativeSize(e,i)||s.size;return{ortb:{ver:"1.2",plcmttype:1,eventtrackers:[{event:1,methods:[1,2]}],assets:[{id:1,required:1,title:{len:e.includes(Qe.Recipe)?s.recipeTitleLength:s.titleLength}},{id:2,required:1,img:{type:3,wmin:n[0],hmin:n[1]}},{id:3,required:1,img:{type:1,wmin:20,hmin:20}},{id:4,required:1,data:{type:1}},{id:5,required:1,data:{type:2,...s.descriptionLength&&{len:s.descriptionLength}}}],...this._config.prebid.sendAdditionalNativeParams&&this._getAdditionalNativeParams(t)}}}constructor(e,t,i,s,n,r,a,o,l,d){this._config=e,this._context=t,this._gam=i,this._outstream=s,this._outstreamWithSOExperiment=n,this._oneVideoStreamExperiment=r,this._soconExperiment=a,this._nativeDescriptionLengthExperiment=o,this._nativeHoldoutExperiment=l,this._nativeRecipeTitleLengthExperiment=d,this.additionalOutstreamUnitsExperiment=!1,this._standardOutstreamSlots=new Set([Qe.Content_1,Qe.Below_Post,Qe.Video_StickyOutstream_1]),this._nativeEligibleSlots=[Qe.Content,Qe.Recipe],this._native={size:[300,300],contentSize:[300,150],recipeSizes:[[320,300],[300,390]],recipeMobileSize:[300,300],titleLength:25,recipeTitleLength:this._nativeRecipeTitleLengthExperiment.result||25,descriptionLength:this._nativeDescriptionLengthExperiment.result||0}}}Hm=B([M(),j("design:type",Function),j("design:paramtypes",[void 0===_c?Object:_c,void 0===Fr?Object:Fr,void 0===wc?Object:wc,void 0===Mm?Object:Mm,void 0===Um?Object:Um,void 0===Fm?Object:Fm,void 0===jm?Object:jm,void 0===Nm?Object:Nm,void 0===Vm?Object:Vm,void 0===zm?Object:zm])],Hm);class $m extends Og{_getRoadblockDisplayTargeting(e){return{site_code:this._config.marmalade.filteredRoadblockSiteCodes,pmp_elig:[String(this._config.adOptions.pmp)],hvp:[this._getHVP(e)]}}_getRoadblockVideoTargeting(e){return{site_code:this._config.marmalade.filteredRoadblockSiteCodes,pmp_elig:[String(this._config.adOptions.pmp)],vprenum:[e.prerollNum.toString()]}}_getHVP(e){const t=es(e);return ts(t).toString()}getBannerSlotBidRequests(e){if(this._map.has(e.placementMapName))return this._map.get(e.placementMapName).filter((({adType:e})=>!e||this._config.adTypes.has(e))).flatMap((({placementId:t})=>this._bidders.map((i=>{const s=i.pbsHost;return{bidder:i.name,params:{...this._getKeywords(e),allowSmallerSizes:this._config.adOptions.allowSmallerAdSizes,placementId:t,...e.isHighlyViewable()&&{position:"above"}},...s&&{pbsHost:s}}}))))}_getKeywords(e){const t={...this._keywords};return"Footer"===e.location&&(t.keywords={...t.keywords,...this._getRoadblockDisplayTargeting(e)}),t}getOutstreamSlotBidRequests(e){if(this._map.has(e.placementMapName))return this._map.get(e.placementMapName).filter((({adType:e})=>!e||this._config.adTypes.has(e))).flatMap((({placementId:t,playback_method:i})=>this._bidders.map((s=>{const n=s.pbsHost;return{bidder:s.name,...this._addBidLabel(e.placementMapName,{outstreamCapable:e.location!==Qe.Video_StickyOutstream}),params:{...this._getKeywords(e),allowSmallerSizes:this._config.adOptions.allowSmallerAdSizes,placementId:t,video:{playback_method:i},...e.isHighlyViewable()&&{position:"above"}},...n&&{pbsHost:n}}}))))}getVideoSlotBidRequests(e){if(this._map.has(e.name))return this._bidders.map((t=>{var i;const s=t.pbsHost;return{bidder:t.name,params:{...this._keywords,placementId:this._map.get(e.name)[0].placementId,position:this._config.video.position.name,video:{mimes:this._config.video.mimeType,...(null==(i=this._config.video.playbackmethod)?void 0:i.get(e.name))&&{playback_method:this._playbackmethodMap.get(this._config.video.playbackmethod.get(e.name)[0])},frameworks:this._config.video.apiValue}},...s&&{pbsHost:s}}}))}updateBidParams(e){this._addPositionParam(e,"above")}constructor(e,t,i,s){super(e),this._mediaType=t,this._rfcodes=i,this._context=s,this.bidderConfig=this._config.partners.getBidderConfig(te.AppNexus),this.serverBidderCode=te.AppNexus,this.additionalServerBidderCodes=[te.AppNexusAy],this.videoCreativeIds=[["138323232312",te.AppNexus],["138323908966",te.AppNexus],["138323900998",te.AppNexus],["138323900548",te.AppNexus],["138323457386",te.AppNexus],["138323908963",te.AppNexus],["138323908960",te.AppNexus],["138323901004",te.AppNexus],["138323901001",te.AppNexus],["138323521089",te.AppNexus],["138323457473",te.AppNexus],["138323908969",te.AppNexus],["138323908957",te.AppNexus],["138323908954",te.AppNexus],["138323900995",te.AppNexus],["138323521092",te.AppNexus]],this._keywords={keywords:{...this._config.site.filteredSensitiveCategories.length&&{sens:this._config.site.filteredSensitiveCategories},bucket:[this._context.bucket],Chrome:[`${di()}`],Mobile:[(!!(navigator.userAgent&&navigator.userAgent.search(/Mobi/i)>-1)).toString()],...this._config.site.verticals.length&&{verticals:this._config.site.verticals},mcmp:this._rfcodes.getAllMcmps()}},this.outstreamType=Ki()?"outstreamMobile":"outstreamDesktop",this._map=new Map([[Qe.Below_Post,[{placementId:13036386}]],[Qe.Content_1,[{placementId:13036388},{placementId:16808429,adType:this.outstreamType,playback_method:["auto_play_sound_off"]}]],[Qe.Content_2,[{placementId:13036389}]],[Qe.Content_3,[{placementId:13036391}]],[Qe.Content_4,[{placementId:13036393}]],[Qe.Content_5,[{placementId:13036394}]],[Qe.Content_6,[{placementId:13036396}]],[Qe.Content_7,[{placementId:13036398}]],[Qe.Content_8,[{placementId:13036399}]],[Qe.Content_9,[{placementId:13036400}]],[Qe.Footer_1,[{placementId:13036401}]],[Qe.Header_1,[{placementId:13036404}]],[Qe.Header_2,[{placementId:13036405}]],[Qe.Interstitial_1,[{placementId:21240886}]],[Qe.Recipe_1,[{placementId:13036406}]],[Qe.Recipe_2,[{placementId:13036407}]],[Qe.Recipe_3,[{placementId:15014787}]],[Qe.Recipe_4,[{placementId:15998791}]],[Qe.Sidebar_1,[{placementId:13036408}]],[Qe.Sidebar_2,[{placementId:13036409}]],[Qe.Sidebar_3,[{placementId:13036410}]],[Qe.Sidebar_4,[{placementId:13036411}]],[Qe.Sidebar_5,[{placementId:13036412}]],[Qe.Sidebar_9,[{placementId:13036416}]],[Qe.Video_StickyOutstream_1,[{placementId:22366045}]],[et.Video_Collapse_Autoplay_SoundOff,[{placementId:15504193,playback_method:["auto_play_sound_off"]}]],[et.Video_Coll_SOff_Smartphone,[{placementId:15504209,playback_method:["auto_play_sound_off"]}]],[et.Video_In_Post_ClicktoPlay_SoundOn,[{placementId:15504166,playback_method:["click_to_play"]}]],[et.Video_Individual_Autoplay_SOff,[{placementId:17947919,playback_method:["auto_play_sound_off"]}]]]),this._playbackmethodMap=new Map([[3,"click_to_play"],[6,"auto_play_sound_off"]])}}$m=B([bn("AppNexusBidder"),D(),j("design:type",Function),j("design:paramtypes",[void 0===_c?Object:_c,void 0===Hm?Object:Hm,void 0===Mc?Object:Mc,void 0===Fr?Object:Fr])],$m);class qm extends Og{getBannerSlotBidRequests(e){if(this._map.has(e.placementMapName))return this._bidders.map((t=>{const i=t.pbsHost;return{bidder:t.name,params:{tag_id:this._map.get(e.placementMapName).tag_id,site_id:this._siteId},...i&&{pbsHost:i}}}))}constructor(e){super(e),this.serverBidderCode=te.Conversant,this.additionalServerBidderCodes=[te.ConversantAY],this.bidderConfig=this._config.partners.getBidderConfig(te.Conversant),this._siteId="203587",this._map=new Map([[Qe.Below_Post,{tag_id:"8c6e3091"}],[Qe.Content,{tag_id:"f4f67b17"}],[Qe.Content_1,{tag_id:"9cbc79fd"}],[Qe.Content_2,{tag_id:"8fdfa3de"}],[Qe.Content_3,{tag_id:"ff6c383c"}],[Qe.Content_4,{tag_id:"972f654c"}],[Qe.Content_5,{tag_id:"bd1aadb5"}],[Qe.Content_6,{tag_id:"ce4f5d6e"}],[Qe.Content_7,{tag_id:"d85e90b"}],[Qe.Content_8,{tag_id:"f02f4ba"}],[Qe.Content_9,{tag_id:"2c01cbc"}],[Qe.Footer_1,{tag_id:"1b2dec1"}],[Qe.Header_1,{tag_id:"44d21b5"}],[Qe.Header_2,{tag_id:"3488dd9"}],[Qe.Recipe_1,{tag_id:"f6cf917"}],[Qe.Recipe_2,{tag_id:"31d9c43"}],[Qe.Recipe_3,{tag_id:"a7b4d19"}],[Qe.Recipe_4,{tag_id:"245c673"}],[Qe.Recipe_5,{tag_id:"0bf3576"}],[Qe.Sidebar_1,{tag_id:"bf73d45"}],[Qe.Sidebar_2,{tag_id:"0a57500"}],[Qe.Sidebar_3,{tag_id:"cceddcd"}],[Qe.Sidebar_4,{tag_id:"872fffd4"}],[Qe.Sidebar_5,{tag_id:"a7653e4"}],[Qe.Sidebar_9,{tag_id:"517df454"}]])}}qm=B([bn("ConversantBidder"),D(),j("design:type",Function),j("design:paramtypes",[void 0===_c?Object:_c])],qm);class Gm extends Og{async _checkConsentAndSetUpInterestGroupIframe(){if(this._config.gdpr.enabled){if(!await this._gdprEnforcement.checkConsentForVendor(this._config.gdpr.raptiveVendorId,[1]))return}"joinAdInterestGroup"in navigator&&this._setInterestGroupIframe().then((e=>{})).catch((e=>{W.error("CriteoBidder","_setInterestGroupIframe",e)}))}_getBidParams(e,t,i){var s;const n=this._params[e][i];return{params:{...n.networkId&&{networkId:n.networkId},...n.zoneId&&{zoneId:n.zoneId},..."server"===e&&(null==(s=n.uid)?void 0:s[t])&&{uid:n.uid[t]}}}}getBannerSlotBidRequests(e){const t=e.placementMapName;if(!this._map.has(t))return;const i=[];return this._bidders.forEach((e=>{const s=e.type,n=e.pbsHost;i.push({bidder:e.name,...this._getBidParams(s,t,"banner"),...n&&{pbsHost:n}})})),i}getOutstreamSlotBidRequests(e){const t=e.placementMapName;if(!this._map.has(e.placementMapName))return;const i=e.location===Qe.Video_StickyOutstream,s=[];return this._bidders.forEach((e=>{const n=e.type,r=e.pbsHost;s.push({bidder:e.name,...this._addBidLabel(t,{outstreamCapable:!i}),...this._getBidParams(n,t,i?"stickyOutstream":"outstream"),...r&&{pbsHost:r}})})),s}getVideoSlotBidRequests(e){if(this._videoMap.has(e.name)){const t=[];return this._bidders.forEach((i=>{var s,n;const r=i.type,a=null==(s=this._videoMap.get(e.name))?void 0:s[r],o=i.pbsHost;t.push({bidder:i.name,params:{...a,video:{playbackmethod:(null==(n=this._config.video.playbackmethod)?void 0:n.get(e.name))||[]}},...o&&{pbsHost:o}})})),t}}async _setInterestGroupIframe(){const e=document.getElementById("criteo-ig");return e||new Promise(((e,t)=>{try{const i=document.createElement("iframe");i.id="criteo-ig",i.style.display="none",i.onload=()=>{e(i)},i.onerror=()=>{t("Interest Group iframe loading failed")},i.src="https://gpsb-reims.criteo.com/paapi/join_ig?advertiser_id=500002_500329&ig_name=r6NnpiEx",document.body.appendChild(i)}catch(e){t(e)}}))}constructor(e,t,i,s){super(e),this._prebidMethods=t,this._gdprEnforcement=i,this._gdprEvents=s,this.bidderConfig=this._config.partners.getBidderConfig(te.Criteo),this.adapterName=te.Criteo,this.serverBidderCode=te.CriteoServer,this.additionalServerBidderCodes=[te.CriteoAY],this.gvlid=91,this.videoCreativeIds=[["138381583896",te.Criteo],["138381548372",te.Criteo],["138381548387",te.Criteo],["138381548384",te.Criteo],["138381548525",te.Criteo],["138381548522",te.Criteo],["138381548516",te.Criteo],["138381548513",te.Criteo],["138382062244",te.Criteo],["138382062241",te.Criteo],["138382062238",te.Criteo],["138382062235",te.Criteo],["138382062232",te.Criteo],["138382062226",te.Criteo],["138382062223",te.Criteo],["138381584697",te.Criteo]],this.videoServerCreativeIds=[["138485671580",te.CriteoServer],["138486258745",te.CriteoServer],["138486258748",te.CriteoServer],["138486258766",te.CriteoServer],["138486258769",te.CriteoServer],["138486258772",te.CriteoServer],["138486258775",te.CriteoServer],["138486259240",te.CriteoServer]],this.settings={storageAllowed:["html5"]},this._params={client:{banner:{networkId:3927},outstream:{zoneId:1709027},stickyOutstream:{zoneId:1709026}},server:{banner:{networkId:12180,uid:{[Qe.Below_Post]:417066,[Qe.Below_Post_1]:417063,[Qe.Content]:417061,[Qe.Content_1]:417062,[Qe.Content_2]:417069,[Qe.Content_3]:417068,[Qe.Content_4]:417070,[Qe.Content_5]:417064,[Qe.Content_6]:417065,[Qe.Content_7]:417067,[Qe.Content_8]:417071,[Qe.Content_9]:417072,[Qe.Footer_1]:417073,[Qe.Header_1]:417074,[Qe.Header_2]:417075,[Qe.Recipe_1]:417076,[Qe.Recipe_2]:417077,[Qe.Recipe_3]:417078,[Qe.Recipe_4]:417079,[Qe.Recipe_5]:417080,[Qe.Sidebar_1]:417081,[Qe.Sidebar_2]:417082,[Qe.Sidebar_3]:417083,[Qe.Sidebar_4]:417092,[Qe.Sidebar_5]:417090,[Qe.Sidebar_9]:417093}},outstream:{networkId:12180,uid:{[Qe.Below_Post]:417710,[Qe.Below_Post_1]:417711,[Qe.Content_1]:417712,[Qe.Content_3]:417713,[Qe.Content_5]:417714,[Qe.Recipe_1]:417715}},stickyOutstream:{networkId:12180,uid:{[Qe.Video_StickyOutstream_1]:417106}}}},this._map=new Set([Qe.Below_Post,Qe.Content_1,Qe.Content_2,Qe.Content_3,Qe.Content_4,Qe.Content_5,Qe.Content_6,Qe.Content_7,Qe.Content_8,Qe.Content_9,Qe.Footer_1,Qe.Header_1,Qe.Header_2,Qe.Recipe_1,Qe.Recipe_2,Qe.Recipe_3,Qe.Recipe_4,Qe.Sidebar_1,Qe.Sidebar_2,Qe.Sidebar_3,Qe.Sidebar_4,Qe.Sidebar_5,Qe.Sidebar_9,Qe.Video_StickyOutstream_1]),this._videoMap=new Map([[et.Video_Collapse_Autoplay_SoundOff,{client:{zoneId:1629631},server:{networkId:12180,uid:417103}}],[et.Video_Coll_SOff_Smartphone,{client:{zoneId:1629630},server:{networkId:12180,uid:417102}}],[et.Video_In_Post_ClicktoPlay_SoundOn,{client:{zoneId:1629629},server:{networkId:12180,uid:417104}}],[et.Video_Individual_Autoplay_SOff,{client:{zoneId:1629401},server:{networkId:12180,uid:417105}}]]),this._prebidMethods.setConfig({criteo:{fastBidVersion:"none"}}),this._checkConsentAndSetUpInterestGroupIframe().catch((()=>{})),this._config.gdpr.enabled&&this._gdprEvents.consentCaptured.on((()=>{this._checkConsentAndSetUpInterestGroupIframe().catch((()=>{}))}))}}Gm=B([bn("CriteoBidder"),D(),j("design:type",Function),j("design:paramtypes",[void 0===_c?Object:_c,void 0===Mn?Object:Mn,void 0===Mu?Object:Mu,void 0===Ya?Object:Ya])],Gm);class Wm extends Og{get bidderDisplayEnabled(){return this._config.site.filteredSensitiveCategories.includes("alc")}getBannerSlotBidRequests(e){if(this._map.has(`${e.placementMapName}_${e.sequence}`)){const t=`${e.placementMapName}_${e.sequence}`;return this._map.get(t).filter((({adType:e})=>!e||this._config.adTypes.has(e))).flatMap((({siteId:t,creativeType:i,publisherNameIdentifier:s,options:n})=>{const r={siteId:t,creativeType:i,publisherNameIdentifier:s};return n&&Object.keys(n).length&&(r.options=n),this._bidders.map((t=>{const i=t.pbsHost;return{bidder:t.name,...this._addBidLabel(e.placementMapName,{highHVP:!0}),params:r,...i&&{pbsHost:i}}}))}))}}constructor(e){super(e),this.bidderConfig=this._config.partners.getBidderConfig(te.Flipp),this.adapterName=te.Flipp,this.serverBidderCode=te.Flipp,this.additionalServerBidderCodes=[te.FlippAY],this._expandableCatalogAdType=Ki()?"expandableCatalogAdsMobile":"expandableCatalogAdsDesktop";const t="true"===Ri().get("test_flipp")?{contentCode:"publisher-test"}:{};this._map=new Map([[Qe.Below_Post_1,[{siteId:1285424,creativeType:"NativeX",publisherNameIdentifier:"Raptive Prebid Standard",options:{...t,startCompact:!1,dwellExpand:!1},adType:this._expandableCatalogAdType},{siteId:1285425,creativeType:"NativeX",publisherNameIdentifier:"Raptive Prebid Compact",options:{...t,startCompact:!0,dwellExpand:!0}}]]])}}Wm=B([bn("FlippBidder"),D(),j("design:type",Function),j("design:paramtypes",[void 0===_c?Object:_c])],Wm);class Km extends Og{getBannerSlotBidRequests(e){const t=this._map.get(e.placementMapName)||this._map.get(e.location),i=e.location===Qe.Footer&&this._animatedFooterEnabled,s=e.location===Qe.Content,n=this._interstitialEnabled&&e.location===Qe.Interstitial;if(t){const r=[];return this.bidders.forEach((a=>{const o=a.pbsHost;i&&r.push({bidder:a.name,params:{...this._defaultContextualAuctionParams},...o&&{pbsHost:o}}),(n||s)&&t.filter((({size:t})=>!t||e.hasSize(t))).filter((e=>!e.isHangtime||this._isHangtimeEnabled)).forEach((e=>{const t=this._isHangtimeEnabled&&e.isHangtime?{zone:this._zoneIds.hangtime}:this._defaultContextualAuctionParams;r.push({bidder:a.name,params:{...t,...e.slotId&&!this._config.prebid.s2s.bidders.includes(a.name)&&{slot:e.slotId}},...o&&{pbsHost:o}})})),i&&this.isExpandableFooter&&r.push({bidder:a.name,params:{zone:this._config.prebid.s2s.bidders.includes(a.name)?this._zoneIds.expandableFooter.s2s:this._zoneIds.expandableFooter.client},...o&&{pbsHost:o}})})),r}}getVideoSlotBidRequests(e){if(this._videoMap.has(e.name))return this._bidders.map((t=>{const i=t.pbsHost;return{bidder:this.name,params:{...this._config.prebid.s2s.bidders.includes(this.name)&&{...this._defaultContextualAuctionParams},video:this._videoMap.get(e.name)},...i&&{pbsHost:i}}}))}constructor(e){super(e),this.bidderConfig=this._config.partners.getBidderConfig(te.GumGum),this.serverBidderCode=te.GumGum,this.additionalServerBidderCodes=[te.GumGumAY],this.videoCreativeIds=[["138330842944",te.GumGum],["138330432527",te.GumGum],["138330466869",te.GumGum],["138330842389",te.GumGum],["138330842452",te.GumGum],["138330432530",te.GumGum],["138330432548",te.GumGum],["138330432551",te.GumGum],["138330466908",te.GumGum],["138330842464",te.GumGum],["138330842470",te.GumGum],["138330466872",te.GumGum],["138330842458",te.GumGum],["138330842461",te.GumGum],["138330842467",te.GumGum],["138330842455",te.GumGum]],this._zoneIds={client:"g95nznmj",s2s:{desktop:"0yo5ozig",tablet:"0yo5ozig",phone:"nedjcoh9"},expandableFooter:{client:"klpfgzhj",s2s:"wspaezyl"},hangtime:"yynpv9l1"},this._map=new Map([[Qe.Interstitial_1,[{slotId:110743}]],[Qe.Content_1,[{slotId:913891},{slotId:1178411,size:[300,250],isHangtime:!0}]],[Qe.Content_2,[{slotId:913892}]],[Qe.Content_3,[{slotId:913893}]],[Qe.Content_4,[{slotId:913894}]],[Qe.Content_5,[{slotId:913895}]],[Qe.Content_6,[{slotId:913896}]],[Qe.Content_7,[{slotId:913897}]],[Qe.Content_8,[{slotId:913898}]],[Qe.Content_9,[{slotId:913899}]],[Qe.Footer_1,[]]]),this._videoMap=new Map([[et.Video_Collapse_Autoplay_SoundOff,"glpmwixo"],[et.Video_Coll_SOff_Smartphone,"5zl85htf"],[et.Video_Individual_Autoplay_SOff,"8jzhuyj5"]]),this.isExpandableFooter=!1,this._animatedFooterEnabled=this._config.adTypes.animatedFooter,this._interstitialEnabled=this._config.adOptions.interstitial.prebid;this._device=Ki()?"phone":Yi()?"tablet":"desktop",this._isHangtimeEnabled=this._config.adTypes.has("interscroller")&&"phone"===this._device,this._defaultContextualAuctionParams={zone:this._config.prebid.s2s.bidders.includes(this.name)?this._zoneIds.s2s[this._device]:this._zoneIds.client},this.isExpandableFooter=this._config.adTypes.has("expandableFooter")}}Km=B([bn("GumGumBidder"),D(),j("design:type",Function),j("design:paramtypes",[void 0===_c?Object:_c])],Km);class Ym extends Og{getBannerSlotBidRequests(e){if(this._displaySet.has(e.placementMapName)){const e=this._displayPlacementId;return this._bidders.map((t=>{const i=t.pbsHost;return{bidder:t.name,params:{publisherId:this._publisherId,placementId:e},...i&&{pbsHost:i}}}))}}getOutstreamSlotBidRequests(e){if(this._outstreamSet.has(e.placementMapName)){const e=this._stickyOutstreamPlacementId;return this._bidders.map((t=>{const i=t.pbsHost;return{bidder:t.name,params:{publisherId:this._publisherId,placementId:e},...i&&{pbsHost:i}}}))}}getVideoSlotBidRequests(e){if(this._videoSet.has(e.name))return this._bidders.map((e=>{const t=e.pbsHost;return{bidder:e.name,params:{publisherId:this._publisherId,placementId:22983143},...t&&{pbsHost:t}}}))}constructor(e){super(e),this.bidderConfig=this._config.partners.getBidderConfig(te.ImproveDigitalServer),this.adapterName=te.ImproveDigital,this.serverBidderCode=te.ImproveDigitalServer,this.additionalServerBidderCodes=[te.ImproveDigitalAY],this.gvlid=253,this._publisherId=2250,this._displayPlacementId=22983142,this._stickyOutstreamPlacementId=23006106,this.videoCreativeIds=[["138436972580",te.ImproveDigitalServer],["138436972724",te.ImproveDigitalServer],["138436972727",te.ImproveDigitalServer],["138436972736",te.ImproveDigitalServer],["138437681002",te.ImproveDigitalServer],["138437681251",te.ImproveDigitalServer],["138437681254",te.ImproveDigitalServer],["138437681257",te.ImproveDigitalServer]],this._displaySet=new Set([Qe.Below_Post,Qe.Content_1,Qe.Content_2,Qe.Content_3,Qe.Content_4,Qe.Content_5,Qe.Content_6,Qe.Content_7,Qe.Content_8,Qe.Content_9,Qe.Footer_1,Qe.Header_1,Qe.Header_2,Qe.Recipe_1,Qe.Recipe_2,Qe.Recipe_3,Qe.Recipe_4,Qe.Recipe_5,Qe.Sidebar_1,Qe.Sidebar_2,Qe.Sidebar_3,Qe.Sidebar_4,Qe.Sidebar_5,Qe.Sidebar_9]),this._outstreamSet=new Set([Qe.Video_StickyOutstream_1]),this._videoSet=new Set([et.Video_Coll_SOff_Smartphone,et.Video_Collapse_Autoplay_SoundOff,et.Video_In_Post_ClicktoPlay_SoundOn,et.Video_Individual_Autoplay_SOff])}}Ym=B([bn("ImproveDigitalBidder"),D(),j("design:type",Function),j("design:paramtypes",[void 0===_c?Object:_c])],Ym);const Xm={client:new Map([[Qe.Content_1,{siteId:"943837"}],[Qe.Content_2,{siteId:"943837"}],[Qe.Content_3,{siteId:"943837"}],[Qe.Content_4,{siteId:"943837"}],[Qe.Content_5,{siteId:"943837"}],[Qe.Content_6,{siteId:"943837"}],[Qe.Content_7,{siteId:"943837"}],[Qe.Content_8,{siteId:"943837"}],[Qe.Content_9,{siteId:"943837"}],[Qe.Recipe_1,{siteId:"1094729"}],[Qe.Recipe_2,{siteId:"1094729"}],[Qe.Recipe_3,{siteId:"1094729"}],[Qe.Recipe_4,{siteId:"1094729"}],[Qe.Recipe_5,{siteId:"1094729"}]]),server:new Map([[Qe.Content_1,{siteId:"1170742"}],[Qe.Content_2,{siteId:"1170742"}],[Qe.Content_3,{siteId:"1170742"}],[Qe.Content_4,{siteId:"1170742"}],[Qe.Content_5,{siteId:"1170742"}],[Qe.Content_6,{siteId:"1170742"}],[Qe.Content_7,{siteId:"1170742"}],[Qe.Content_8,{siteId:"1170742"}],[Qe.Content_9,{siteId:"1170742"}]])},Qm={client:new Map([[Qe.Below_Post,{initial:{siteId:"185759"}}],[Qe.Content_1,{initial:{siteId:"185761",outstreamSiteId:"820298"},refresh:{siteId:"1140188"}}],[Qe.Content_2,{initial:{siteId:"185762"},refresh:{siteId:"1140189"}}],[Qe.Content_3,{initial:{siteId:"185763"},refresh:{siteId:"1140190"}}],[Qe.Content_4,{initial:{siteId:"185764"},refresh:{siteId:"1140191"}}],[Qe.Content_5,{initial:{siteId:"185765"},refresh:{siteId:"1140192"}}],[Qe.Content_6,{initial:{siteId:"185766"},refresh:{siteId:"1140193"}}],[Qe.Content_7,{initial:{siteId:"185767"},refresh:{siteId:"1140194"}}],[Qe.Content_8,{initial:{siteId:"185768"},refresh:{siteId:"1140195"}}],[Qe.Content_9,{initial:{siteId:"185769"},refresh:{siteId:"1140196"}}],[Qe.Footer_1,{initial:{siteId:"185770"}}],[Qe.Header_1,{initial:{siteId:"185774"}}],[Qe.Interstitial_1,{initial:{siteId:"631834"}}],[Qe.Recipe_1,{initial:{siteId:"185776"}}],[Qe.Recipe_2,{initial:{siteId:"185777"}}],[Qe.Recipe_3,{initial:{siteId:"304909"}}],[Qe.Recipe_4,{initial:{siteId:"371523"}}],[Qe.Sidebar_1,{initial:{siteId:"185787"}}],[Qe.Sidebar_2,{initial:{siteId:"185788"}}],[Qe.Sidebar_3,{initial:{siteId:"185789"}}],[Qe.Sidebar_4,{initial:{siteId:"185790"}}],[Qe.Sidebar_5,{initial:{siteId:"185791"}}],[Qe.Sidebar_9,{initial:{siteId:"185795"}}],[Qe.Video_StickyOutstream_1,{initial:{siteId:"745167",outstreamSiteId:"745167"}}]]),server:new Map([[Qe.Below_Post,{initial:{siteId:"1170743"}}],[Qe.Content_1,{initial:{siteId:"1170753",outstreamSiteId:"1170771"}}],[Qe.Content_2,{initial:{siteId:"1170757"}}],[Qe.Content_3,{initial:{siteId:"1170760"}}],[Qe.Content_4,{initial:{siteId:"1170761"}}],[Qe.Content_5,{initial:{siteId:"1170762"}}],[Qe.Content_6,{initial:{siteId:"1170763"}}],[Qe.Content_7,{initial:{siteId:"1170764"}}],[Qe.Content_8,{initial:{siteId:"1170744"}}],[Qe.Content_9,{initial:{siteId:"1170745"}}],[Qe.Footer_1,{initial:{siteId:"1170746"}}],[Qe.Header_1,{initial:{siteId:"1170747"}}],[Qe.Recipe_1,{initial:{siteId:"1170748"}}],[Qe.Recipe_2,{initial:{siteId:"1170749"}}],[Qe.Recipe_3,{initial:{siteId:"1170758"}}],[Qe.Recipe_4,{initial:{siteId:"1170759"}}],[Qe.Sidebar_1,{initial:{siteId:"1170750"}}],[Qe.Sidebar_2,{initial:{siteId:"1170751"}}],[Qe.Sidebar_3,{initial:{siteId:"1170752"}}],[Qe.Sidebar_4,{initial:{siteId:"1170754"}}],[Qe.Sidebar_5,{initial:{siteId:"1170755"}}],[Qe.Sidebar_9,{initial:{siteId:"1170756"}}],[Qe.Video_StickyOutstream_1,{initial:{siteId:"1170775",outstreamSiteId:"1170775"}}]])},Jm=new Map([[Qe.Below_Post,[{size:[728,90],id:"1_1"},{size:[300,250],id:"1_2"}]],[Qe.Content_1,[{size:[728,90],id:"3_1"},{size:[300,250],id:"3_2"},{size:[320,480],id:"3_2"},{size:[320,50],id:"3_4"},{size:[320,100],id:"3_5"},{size:[300,50],id:"3_6"},{size:[728,250]}]],[Qe.Content_2,[{size:[728,90],id:"4_1"},{size:[300,250],id:"4_2"},{size:[728,410],id:"4_2"},{size:[320,50],id:"4_4"},{size:[320,100],id:"4_5"},{size:[300,50],id:"4_6"},{size:[728,250]}]],[Qe.Content_3,[{size:[300,250],id:"5_1"},{size:[320,50],id:"5_2"},{size:[320,100],id:"5_3"},{size:[300,50],id:"5_4"},{size:[728,250]}]],[Qe.Content_4,[{size:[300,250],id:"6_1"},{size:[320,50],id:"6_2"},{size:[320,100],id:"6_3"},{size:[300,50],id:"6_4"},{size:[728,250]}]],[Qe.Content_5,[{size:[300,250],id:"7_1"},{size:[320,50],id:"7_2"},{size:[320,100],id:"7_3"},{size:[300,50],id:"7_4"},{size:[728,250]}]],[Qe.Content_6,[{size:[300,250],id:"8_1"},{size:[320,50],id:"8_2"},{size:[320,100],id:"8_3"},{size:[300,50],id:"8_4"},{size:[728,250]}]],[Qe.Content_7,[{size:[300,250],id:"9_1"},{size:[320,50],id:"9_2"},{size:[300,50],id:"9_3"},{size:[728,250]}]],[Qe.Content_8,[{size:[300,250],id:"10_1"},{size:[320,50],id:"10_2"},{size:[300,50],id:"10_3"},{size:[728,250]}]],[Qe.Content_9,[{size:[300,250],id:"11_1"},{size:[320,50],id:"11_2"},{size:[300,50],id:"11_3"},{size:[728,250]}]],[Qe.Footer_1,[{size:[728,90],id:"12_1"},{size:[970,90],id:"12_2"},{size:[320,50],id:"12_3"},{size:[320,100],id:"12_4"},{size:[300,50],id:"12_5"}]],[Qe.Header_1,[{size:[728,90],id:"15_1"},{size:[970,90],id:"15_2"},{size:[970,250],id:"15_3"},{size:[320,50],id:"15_4"},{size:[320,100],id:"15_5"},{size:[300,50],id:"15_6"}]],[Qe.Interstitial_1,[{size:[300,600],id:"36_1"},{size:[336,280],id:"36_2"},{size:[320,480],id:"36_3"},{size:[300,250],id:"36_4"},{size:[320,50],id:"36_5"}]],[Qe.Recipe_1,[{size:[300,250],id:"17_1"},{size:[320,50],id:"17_3"},{size:[320,100],id:"17_4"},{size:[300,50],id:"17_5"}]],[Qe.Recipe_2,[{size:[300,250],id:"18_1"},{size:[320,50],id:"18_3"},{size:[320,100],id:"18_4"},{size:[300,50],id:"18_5"}]],[Qe.Recipe_3,[{size:[300,250],id:"42_1"},{size:[320,50],id:"42_3"},{size:[320,100],id:"42_4"},{size:[300,50],id:"42_5"}]],[Qe.Recipe_4,[{size:[300,250],id:"43_1"},{size:[320,50],id:"43_3"},{size:[320,100],id:"43_4"},{size:[300,50],id:"43_5"}]],[Qe.Sidebar_1,[{size:[300,250],id:"27_1"},{size:[300,600],id:"27_2"},{size:[300,1050],id:"27_3"},{size:[160,600],id:"27_4"},{size:[300,50],id:"27_5"}]],[Qe.Sidebar_2,[{size:[300,250],id:"28_1"},{size:[300,600],id:"28_2"},{size:[160,600],id:"28_3"},{size:[300,50],id:"28_4"}]],[Qe.Sidebar_3,[{size:[300,250],id:"29_1"},{size:[300,600],id:"29_2"},{size:[160,600],id:"29_3"},{size:[300,50],id:"29_4"}]],[Qe.Sidebar_4,[{size:[300,250],id:"30_1"},{size:[300,600],id:"30_2"},{size:[160,600],id:"30_3"},{size:[300,50],id:"30_4"}]],[Qe.Sidebar_5,[{size:[300,250],id:"31_1"},{size:[300,600],id:"31_2"},{size:[160,600],id:"31_3"},{size:[300,50],id:"31_4"}]],[Qe.Sidebar_9,[{size:[300,250],id:"35_1"},{size:[300,600],id:"35_2"},{size:[300,1050],id:"35_3"},{size:[160,600],id:"35_4"},{size:[300,50],id:"35_5"}]],[Qe.Video_StickyOutstream_1,[{size:[300,250],id:"48_1",sizeOverride:[227,150]},{size:[300,50],id:"48_2",sizeOverride:[178,100]}]]]),Zm={client:new Map([[et.Video_Collapse_Autoplay_SoundOff,[{size:[640,360],siteId:"185255",id:"44_1"}]],[et.Video_Coll_SOff_Smartphone,[{size:[400,225],siteId:"321341",id:"45_1"}]],[et.Video_In_Post_ClicktoPlay_SoundOn,[{size:[640,360],siteId:"385287",device:"desktop",id:"46_1"},{size:[400,225],siteId:"385288",device:"mobile",id:"46_2"}]],[et.Video_Individual_Autoplay_SOff,[{size:[640,360],siteId:"385285",device:"desktop",id:"47_1"},{size:[400,225],siteId:"385286",device:"mobile",id:"47_2"}]]]),server:new Map([[et.Video_Collapse_Autoplay_SoundOff,[{size:[640,360],siteId:"1170770",id:"44_1"}]],[et.Video_Coll_SOff_Smartphone,[{size:[400,225],siteId:"1170765",id:"45_1"}]],[et.Video_In_Post_ClicktoPlay_SoundOn,[{size:[640,360],siteId:"1170768",device:"desktop",id:"46_1"},{size:[400,225],siteId:"1170769",device:"mobile",id:"46_2"}]],[et.Video_Individual_Autoplay_SOff,[{size:[640,360],siteId:"1170766",device:"desktop",id:"47_1"},{size:[400,225],siteId:"1170767",device:"mobile",id:"47_2"}]]])};class e_ extends br{init(){this._key="IxNativeExperiment",this._lookup="IXNT"}run(){return super.run()}}e_=B([bn("IxNativeExperiment"),M()],e_);class t_ extends Er{init(){this._key="IXRefresh",this._lookup="IXNR",this._default=!1}}t_=B([bn("IXRefreshExperiment"),M()],t_);class i_ extends br{init(){this._key="IxNativeExperimentRecipe",this._lookup="IXNTR"}get result(){return this._result}}i_=B([bn("IxNativeExperimentRecipe"),M()],i_);class s_ extends Og{init(){const e=as(this._context.savedReferrer),t=this._config,i=t.site,s=[...i.verticals].filter(Mi),n=i.filteredSensitiveCategories,r={PD:`${t.adOptions.pmp?"":"no"}${this._context.device}`,...s.length&&{Topic:s.join("#Topic:")},...n.length&&{Sens:n.join("#Sens:")},Source:As(e),Browser:pi(),vp:"0"};var a,o;ks(r,this._prebidMethods),this._largeFormatSizes.length&&(a=this._largeFormatSizes,(o=this._prebidMethods).addToQueue((()=>{const e=o.getConfig("ix")||{};e.largeFormatSizes=a,o.setConfig({ix:e})})))}getBannerSlotBidRequests(e){let t=[];return this.bidders.forEach((i=>{var s;if(null==(s=Qm[i.type])?void 0:s.get(e.placementMapName)){const s=this._getSlotBids(e,i);t=[...t,...s]}})),t}getOutstreamSlotBidRequests(e){let t=[];return this.bidders.forEach((i=>{var s;if(null==(s=Qm[i.type])?void 0:s.get(e.placementMapName)){const s=this._getSlotBids(e,i,!0);t=[...t,...s]}})),t}getNativeSlotBidRequests(e){const t=[];return this.bidders.forEach((i=>{var s;const n=null==(s=Xm[i.type])?void 0:s.get(e.placementMapName);if(!this._isSlotNativeEligible(e,n))return[];const r=n.siteId,a={refresh:"arl"===this._nativeExperiment.result};t.push(this.getPrebidAdUnitBidRequest(i,r,void 0,void 0,e.placementMapName,!1,a))})),t}getVideoSlotBidRequests(e){const t=[];return this.bidders.forEach((i=>{const s=this.getVideoSizeSites(e,i);(null==s?void 0:s.length)&&s.forEach((s=>{const n=s.sizeSite.siteId,r=s.sizeSite.size,a=this.getPrebidAdUnitBidRequest(i,n,r,e.name,"",!1);a.params.video=this.getVideoParams(e.name),a&&t.push(a)}))})),t}getVideoParams(e,t){var i;const s={...this._config.video,...t},n=s.playbackmethod&&s.playbackmethod.get(e),r=new Map([[3,[3]],[6,[2]]]),a=n&&{playbackmethod:r.get(n[0])};if(!s.videoProtocols||!s.videoProtocols.protocols){const e=s.videoProtocols?"protocols is undefined":"videoProtocols is undefined";W.error("IndexExchangeBidder","getVideoParams",e)}return{api:s.apiValue,mimes:s.mimeType,...a,minduration:0,maxduration:30,protocols:null==(i=s.videoProtocols)?void 0:i.protocols,pos:s.position.id}}_isSlotNativeEligible(e,t){const i="Content"===e.location&&e.sequence&&(e.sequence<3||"ec3"!==this._nativeExperiment.result),s="Recipe"===e.location&&e.sequence&&(e.sequence<3||"er3"!==this._nativeExperimentRecipe.result);return t&&(i||s)}getPrebidAdUnitBidRequest(e,t,i,s,n="",r=!1,a={}){const o="client"===e.type,l=e.pbsHost;return{bidder:e.name,...this._addBidLabel(n,a),params:{...o&&s&&{id:s},siteId:t,...r&&{video:{}},...o&&!r&&i&&{size:i}},...l&&{pbsHost:l}}}_getSlotBids(e,t,i=!1){const s=[],n=[Qe.Content],r=Jm.get(e.placementMapName),a=Qm[t.type].get(e.placementMapName),o=!i&&this._ixRefreshExperiment.result&&n.includes(e.location);return r&&r.filter((({size:t})=>e.hasSize(t)||this.largeFormatSizeEnabled(t))).forEach((({size:n,id:r})=>{var l;const d=i&&null!=(l=a.initial.outstreamSiteId)?l:a.initial.siteId,c={outstreamCapable:i&&e.location!==Qe.Video_StickyOutstream,initial:o};if(s.push(this.getPrebidAdUnitBidRequest(t,d,n,r,e.placementMapName,i,c)),o&&a.refresh){const l={outstreamCapable:i,refresh:o},d=a.refresh.siteId;s.push(this.getPrebidAdUnitBidRequest(t,d,n,r,e.placementMapName,i,l))}})),"client"===t.type?s:s[0]?[s[0]]:[]}largeFormatSizeEnabled([e,t]){return this._largeFormatSizes.some((([i,s])=>e===i&&t===s))}getVideoSizeSites(e,t){return Zm[t.type].get(e.name).filter((({device:t,size:i})=>(!t||t&&t===this._device)&&e.size[0]===i[0]&&e.size[1]===i[1])).map((t=>({video:e,sizeSite:t})))}constructor(e,t,i,s,n,r){super(e),this._prebidMethods=t,this._nativeExperiment=i,this._context=s,this._ixRefreshExperiment=n,this._nativeExperimentRecipe=r,this._device=Bi()?"desktop":"mobile",this._hasLargeFormatsEnabled=Bi()?this._config.adTypes.largeFormatsDesktop:this._config.adTypes.largeFormatsMobile,this._largeFormatSizes=this._hasLargeFormatsEnabled?"desktop"===this._device?[[728,410]]:[[320,480]]:[],this.adapterName=te.IndexExchange,this.serverBidderCode=te.IndexExchangeServer,this.additionalServerBidderCodes=[te.IndexExchangeAY],this.bidderConfig=this._config.partners.getBidderConfig(te.IndexExchange),this.gvlid=10,this.videoCreativeIds=[["138323461889",te.IndexExchange],["138365130553",te.IndexExchange],["138323602520",te.IndexExchange],["138323911414",te.IndexExchange],["138365130307",te.IndexExchange],["138323648223",te.IndexExchange],["138323911009",te.IndexExchange],["138364758402",te.IndexExchange],["138323523396",te.IndexExchange],["138364703774",te.IndexExchange],["138323464748",te.IndexExchange],["138364758405",te.IndexExchange],["138323911423",te.IndexExchange],["138365130310",te.IndexExchange],["138323911420",te.IndexExchange],["138365130313",te.IndexExchange],["138323911411",te.IndexExchange],["138364758408",te.IndexExchange],["138323911012",te.IndexExchange],["138364703777",te.IndexExchange],["138323523390",te.IndexExchange],["138364758411",te.IndexExchange],["138323523387",te.IndexExchange],["138365130316",te.IndexExchange],["138323911426",te.IndexExchange],["138364758414",te.IndexExchange],["138323911408",te.IndexExchange],["138364703780",te.IndexExchange],["138323911405",te.IndexExchange],["138364703783",te.IndexExchange],["138323523393",te.IndexExchange],["138364758417",te.IndexExchange],["138323911417",te.IndexExchange],["138365130319",te.IndexExchange]],this.videoServerCreativeIds=[["138500837694",te.IndexExchangeServer],["138500837883",te.IndexExchangeServer],["138501656857",te.IndexExchangeServer],["138501657097",te.IndexExchangeServer],["138501657115",te.IndexExchangeServer],["138501657118",te.IndexExchangeServer],["138501657121",te.IndexExchangeServer],["138501657124",te.IndexExchangeServer]]}}s_=B([bn("IndexExchangeBidder"),D(),j("design:type",Function),j("design:paramtypes",[void 0===_c?Object:_c,void 0===Mn?Object:Mn,void 0===e_?Object:e_,void 0===Fr?Object:Fr,void 0===t_?Object:t_,void 0===i_?Object:i_])],s_);const n_=new Map([[et.Video_Collapse_Autoplay_SoundOff,[{siteId:Tt,client:"_bRbD9p9sZK",server:"_tyXFRsb7b4",size:It.SIZE_640_360},{siteId:At,client:"_x8sgYI55G4",server:"_jg4wlPdEog",size:It.SIZE_640_360},{siteId:Ct,client:"_d4LW55Tz6Z",server:"_vw404TGZKZ",size:It.SIZE_640_360},{siteId:wt,client:"_hhjZvYrxAc",server:"_rsajlrnhno",size:It.SIZE_640_360},{siteId:kt,client:"_uEi7eMPnxq",server:"_gPZIDLm8j2",size:It.SIZE_640_360},{siteId:Et,client:"_kWJDXIuROl",server:"_kkLiJTt47x",size:It.SIZE_640_360}]],[et.Video_In_Post_ClicktoPlay_SoundOn,[{siteId:Tt,client:"_iSNq3tefXu",server:"_zXaUPeITLG",size:It.SIZE_640_360},{siteId:At,client:"_lCb7dfvNjq",server:"_cHXAF6BKmN",size:It.SIZE_640_360},{siteId:Ct,client:"_tyYmCc4eCT",server:"_g2LAwxEvEs",size:It.SIZE_640_360},{siteId:wt,client:"_bB1dCkFu32",server:"_sBUGeiExbU",size:It.SIZE_640_360},{siteId:kt,client:"_g9cki8b6xC",server:"_mBNCdbBCg7",size:It.SIZE_640_360},{siteId:Et,client:"_fR1aawM8Zo",server:"_j08PBtvK4B",size:It.SIZE_640_360}]],[et.Video_Individual_Autoplay_SOff,[{siteId:Tt,client:"_cSmQNecEfo",server:"_s5shEWGvJC",size:It.SIZE_640_360},{siteId:At,client:"_atcYOwsv5N",server:"_vx63n2bPCt",size:It.SIZE_640_360},{siteId:Ct,client:"_qdsWDke6KD",server:"_ySOwZdo8WZ",size:It.SIZE_640_360},{siteId:wt,client:"_eZmQSTrIMN",server:"_qxKutqq3kR",size:It.SIZE_640_360},{siteId:kt,client:"_gVAQIoM4cp",server:"_i2ILdAGFrc",size:It.SIZE_640_360},{siteId:Et,client:"_nmpcOw19lD",server:"_mX7o0eM1jT",size:It.SIZE_640_360}]]]),r_=new Map([[et.Video_Coll_SOff_Smartphone,[{siteId:Tt,client:"_oqaQNDGjZ4",server:"_cjATjOt7M3",size:It.SIZE_400_225},{siteId:At,client:"_g47ukW03bo",server:"_jdef3qyaew",size:It.SIZE_400_225},{siteId:wt,client:"_kp8W0sdhdE",server:"_p3pJYWNuxp",size:It.SIZE_400_225},{siteId:kt,client:"_rsmG36HH8x",server:"_ngr9SeXdE7",size:It.SIZE_400_225},{siteId:Ct,client:"_ghA53Kjqrh",server:"_xRJtnJlLcg",size:It.SIZE_400_225},{siteId:Et,client:"_kUg4kKElHf",server:"_wraUX6ObGH",size:It.SIZE_400_225}]],[et.Video_In_Post_ClicktoPlay_SoundOn,[{siteId:Tt,client:"_tBeS7Z4US3",server:"_pnaFOGgJHk",size:It.SIZE_400_225},{siteId:At,client:"_lsGboL0uST",server:"_el6JVb9qoD",size:It.SIZE_400_225},{siteId:wt,client:"_wqAAlYzlij",server:"_dc6prrDilF",size:It.SIZE_400_225},{siteId:kt,client:"_zn7ZLevuPn",server:"_bjw2WhZN1K",size:It.SIZE_400_225},{siteId:Ct,client:"_qaJQvOMII9",server:"_pCPyKofX1S",size:It.SIZE_400_225},{siteId:Et,client:"_upDLM7q4jV",server:"_iNqGr1ZsCR",size:It.SIZE_400_225}]],[et.Video_Individual_Autoplay_SOff,[{siteId:Tt,client:"_vWJq7i6Hsr",server:"_jE3UrcJ5WA",size:It.SIZE_400_225},{siteId:At,client:"_mx5iL6Bejc",server:"_rRtn5dy9zf",size:It.SIZE_400_225},{siteId:wt,client:"_oUwmSg3ct7",server:"_bCZv43HA5e",size:It.SIZE_400_225},{siteId:kt,client:"_akUrKNgwMu",server:"_dZQibxLKPI",size:It.SIZE_400_225},{siteId:Ct,client:"_uFi5ptAWHm",server:"_kCaQmZiXGS",size:It.SIZE_400_225},{siteId:Et,client:"_fyab3CymN5",server:"_qeYOrszj4C",size:It.SIZE_400_225}]]]),a_=new Map([["1000000",[{siteId:Tt,client:{mobile:"_hAsShWhZrX",desktop:"_hGHupdqGkR"},server:{mobile:"_dBn42PEYpT",desktop:"_bNu9DxaovG"},isOutstream:!1},{siteId:At,client:{mobile:"_ua1Af0iqiz",desktop:"_tHHlCZoftJ"},server:{mobile:"_yiSiyTNTr9",desktop:"_zOvUvvugIj"},isOutstream:!1},{siteId:Ct,client:{mobile:"_lI4BEQnUxI",desktop:"_nVsVVfpDjN"},server:{mobile:"_d2hBOhJhxF",desktop:"_uo8nEFxOVu"},isOutstream:!1},{siteId:wt,client:{mobile:"_wVm3mYeRml",desktop:"_iRqGIvmzUs"},server:{mobile:"_fK6uPhLCLl",desktop:"_yaaHKyz3Zk"},isOutstream:!1},{siteId:kt,client:{mobile:"_jvVwL9Fnun",desktop:"_nJqZtOhz0Q"},server:{mobile:"_dzb8opas5y",desktop:"_yC15vgTB1T"},isOutstream:!1},{siteId:Et,client:{mobile:"_htv2gWQDl4",desktop:"_hIMWOFYOkG"},server:{mobile:"_fc3We7MSf8",desktop:"_p9dR36E2p7"},isOutstream:!1}]],["1000001",[{siteId:Tt,client:{mobile:"_eD6ub757kw",desktop:"_eD6ub757kw"},server:{mobile:"_hXKlqSHoHB",desktop:"_hXKlqSHoHB"},isOutstream:!1},{siteId:At,client:{mobile:"_fTyEwORc0V",desktop:"_fTyEwORc0V"},server:{mobile:"_gvad3bdvqr",desktop:"_gvad3bdvqr"},isOutstream:!1},{siteId:Ct,client:{mobile:"_d3ReNcjIse",desktop:"_d3ReNcjIse"},server:{mobile:"_r5n7qvMsMJ",desktop:"_r5n7qvMsMJ"},isOutstream:!1},{siteId:wt,client:{mobile:"_eWSWxaV6Xx",desktop:"_eWSWxaV6Xx"},server:{mobile:"_kvd1znrrGJ",desktop:"_kvd1znrrGJ"},isOutstream:!1},{siteId:kt,client:{mobile:"_k0TLw869op",desktop:"_k0TLw869op"},server:{mobile:"_lrQyIIv5M6",desktop:"_lrQyIIv5M6"},isOutstream:!1},{siteId:Et,client:{mobile:"_zxmQwsW17E",desktop:"_zxmQwsW17E"},server:{mobile:"_npLCsRl0pb",desktop:"_npLCsRl0pb"},isOutstream:!1}]],["0100000",[{siteId:Tt,client:{mobile:"_eIhMof7yqe",desktop:"_byCkELixPr"},server:{mobile:"_lCC4Vz5HVq",desktop:"_c0YtPZCFAN"},isOutstream:!1},{siteId:At,client:{mobile:"_f1sGSYRKR3",desktop:"_q3eCqZRhdS"},server:{mobile:"_d6K4oqtod2",desktop:"_wwAn0mcH6d"},isOutstream:!1},{siteId:Ct,client:{mobile:"_qwYKU8Qi3G",desktop:"_ohqIx8jj4D"},server:{mobile:"_ycHhS8LeQg",desktop:"_go3v3cJHBo"},isOutstream:!1},{siteId:wt,client:{mobile:"_whqXDci8eJ",desktop:"_c8mUVLDZhB"},server:{mobile:"_a4F7BDxYvO",desktop:"_ry2nukXJCM"},isOutstream:!1},{siteId:kt,client:{mobile:"_fp2BsPBxqI",desktop:"_hYVLy7Ua4r"},server:{mobile:"_jHYRZMA3Rv",desktop:"_e1zarT1nQu"},isOutstream:!1},{siteId:Et,client:{mobile:"_bDJEtXJaCQ",desktop:"_vzS4k9rMKu"},server:{mobile:"_mTkU31vSyD",desktop:"_uBJBQkzM4x"},isOutstream:!1}]],["1010000",[{siteId:Tt,client:{mobile:"_finwQXYsdW",desktop:"_hqpdpEgPND"},server:{mobile:"_aMXALPX3fS",desktop:"_hY1xJfGGVe"},isOutstream:!0},{siteId:At,client:{mobile:"_f8CIFfN0X9",desktop:"_u8FSFfE7br"},server:{mobile:"_ijhi0w8YvT",desktop:"_s5QXHlZsTW"},isOutstream:!0},{siteId:Ct,client:{mobile:"_agHXJxfEse",desktop:"_eEANDb6t2k"},server:{mobile:"_l2FGd0utDq",desktop:"_zhrJRRWVYf"},isOutstream:!0},{siteId:wt,client:{mobile:"_gSKH6aK6R4",desktop:"_jaMt5ZbQgI"},server:{mobile:"_ePFeBkTZqT",desktop:"_nn2s0plngX"},isOutstream:!0},{siteId:kt,client:{mobile:"_kIAYcCNe7d",desktop:"_rFrgDRiaQp"},server:{mobile:"_wUz9lluZW9",desktop:"_cKmNoetgxX"},isOutstream:!0},{siteId:Et,client:{mobile:"_rEapvpk6cZ",desktop:"_oCKJ4D9jsI"},server:{mobile:"_d1ofpEpOuE",desktop:"_pJRjrqANDE"},isOutstream:!0}]],["1011000",[{siteId:Tt,client:{mobile:"_ecQ46kpFH4",desktop:"_hDLFEUkifu"},server:{mobile:"_cRzdV4tRUN",desktop:"_hDLFEUkifu"},isOutstream:!0},{siteId:At,client:{mobile:"_vOhgG6ZGQc",desktop:"_hDLFEUkifu"},server:{mobile:"_oBErk6NgT9",desktop:"_hDLFEUkifu"},isOutstream:!0},{siteId:Ct,client:{mobile:"_dZU1BlrcQe",desktop:"_hDLFEUkifu"},server:{mobile:"_aGjeC3sjY2",desktop:"_hDLFEUkifu"},isOutstream:!0},{siteId:wt,client:{mobile:"_zcdgs90WxP",desktop:"_hDLFEUkifu"},server:{mobile:"_sRHWp1P95W",desktop:"_hDLFEUkifu"},isOutstream:!0},{siteId:kt,client:{mobile:"_lLcxnJnUL0",desktop:"_hDLFEUkifu"},server:{mobile:"_mKff6SG1V4",desktop:"_hDLFEUkifu"},isOutstream:!0},{siteId:Et,client:{mobile:"_hDLFEUkifu",desktop:"_hDLFEUkifu"},server:{mobile:"_d4LMbFjRkk",desktop:"_hDLFEUkifu"},isOutstream:!0}]],["1001000",[{siteId:Tt,client:{mobile:"_qy8FZvprXY",desktop:"_kEvPWSnblw"},server:{mobile:"_aYXzmplV9F",desktop:"_kEvPWSnblw"},isOutstream:!1},{siteId:At,client:{mobile:"_gsOgkDslR3",desktop:"_kEvPWSnblw"},server:{mobile:"_u5EkrC5vYV",desktop:"_kEvPWSnblw"},isOutstream:!1},{siteId:Ct,client:{mobile:"_lGIFrPovZn",desktop:"_kEvPWSnblw"},server:{mobile:"_f4bL87KId1",desktop:"_kEvPWSnblw"},isOutstream:!1},{siteId:wt,client:{mobile:"_gn64RSSM57",desktop:"_kEvPWSnblw"},server:{mobile:"_yDuCGfXmql",desktop:"_kEvPWSnblw"},isOutstream:!1},{siteId:kt,client:{mobile:"_gD0lSine9a",desktop:"_kEvPWSnblw"},server:{mobile:"_lx9tkSimU2",desktop:"_kEvPWSnblw"},isOutstream:!1},{siteId:Et,client:{mobile:"_kEvPWSnblw",desktop:"_kEvPWSnblw"},server:{mobile:"_jiqa71nZQy",desktop:"_kEvPWSnblw"},isOutstream:!1}]],["0000110",[{siteId:Tt,client:{mobile:"_v5SMFEjDrr",desktop:"_fTbDngf8Ub"},server:{mobile:"_jGV537FxMJ",desktop:"_rzRzo7jEiB"},isOutstream:!1},{siteId:At,client:{mobile:"_lX0mmLqXOH",desktop:"_zQGKRsK2OR"},server:{mobile:"_qH1l1kyPi3",desktop:"_pBJnthmHgl"},isOutstream:!1},{siteId:Ct,client:{mobile:"_lUXeoSZAf0",desktop:"_pXYJ80T5VN"},server:{mobile:"_jxiRracsTG",desktop:"_ndFYWLoiBo"},isOutstream:!1},{siteId:wt,client:{mobile:"_qQ8NEcQY1C",desktop:"_gGD1SYrcGe"},server:{mobile:"_dbjFQeqonB",desktop:"_yG4Q6pfCcA"},isOutstream:!1},{siteId:kt,client:{mobile:"_kFc3pV1c0n",desktop:"_mzspF6n1E6"},server:{mobile:"_aSfWWLCYIF",desktop:"_oFaxWSuc5h"},isOutstream:!1},{siteId:Et,client:{mobile:"_hRaLC9FgYn",desktop:"_yI7yqradgk"},server:{mobile:"_qkzet6WYFk",desktop:"_cw6zRI7FoH"},isOutstream:!1}]],["0000100",[{siteId:Tt,client:{mobile:"_r4fIEDQTLY",desktop:"_baT851TDWI"},server:{mobile:"_ecjCX4kPwm",desktop:"_qQwA2mxuBj"},isOutstream:!1},{siteId:At,client:{mobile:"_rAF97HOGTF",desktop:"_l4gY7l7f5a"},server:{mobile:"_jTzFFJiTJD",desktop:"_hBe1suFVbp"},isOutstream:!1},{siteId:Ct,client:{mobile:"_mqFteTH9Rj",desktop:"_d7BTJmSlpc"},server:{mobile:"_vuHz64bKFd",desktop:"_r9dNt9173p"},isOutstream:!1},{siteId:wt,client:{mobile:"_qs6lmj0Pbf",desktop:"_p950SHR2Xv"},server:{mobile:"_lx5UxDlx0g",desktop:"_lLRgz2kTfw"},isOutstream:!1},{siteId:kt,client:{mobile:"_maZsbF5qjH",desktop:"_lZNyxSw6Ss"},server:{mobile:"_vTQcRjZrSS",desktop:"_gund5mIKg5"},isOutstream:!1},{siteId:Et,client:{mobile:"_iyznbek6ki",desktop:"_fPM3feDxUE"},server:{mobile:"_xgNGHBHpEp",desktop:"_uqR67yraqv"},isOutstream:!1}]],["0000010",[{siteId:Tt,client:{mobile:"_cxVgq7bff1",desktop:"_paxUDMm9of"},server:{mobile:"_oMCKtxsq0T",desktop:"_uXClSLcqiX"},isOutstream:!1},{siteId:At,client:{mobile:"_nhQCrEk0GT",desktop:"_iGYXTwKJkq"},server:{mobile:"_vg5Tj9cQlS",desktop:"_ix2Vu5yio6"},isOutstream:!1},{siteId:Ct,client:{mobile:"_yc0KcUV2Sb",desktop:"_gaEp6ub3Uz"},server:{mobile:"_lhuIK8d0HO",desktop:"_s1YBpsN41s"},isOutstream:!1},{siteId:wt,client:{mobile:"_vwzo4mlIdf",desktop:"_p3pvAJLdvb"},server:{mobile:"_ol6ZhRXMRV",desktop:"_k5zqurOzN9"},isOutstream:!1},{siteId:kt,client:{mobile:"_vKGlgbERMK",desktop:"_x7OEkwJGD9"},server:{mobile:"_vaUAWXhKWM",desktop:"_wzZeDPhHwx"},isOutstream:!1},{siteId:Et,client:{mobile:"_g1dEyYpnCU",desktop:"_wtAZ5wepHr"},server:{mobile:"_p2WCSP0fm1",desktop:"_bSkTYI5gwN"},isOutstream:!1}]]]),o_=[Qe.Below_Post,Qe.Content_1,Qe.Content_2,Qe.Content_3,Qe.Content_4,Qe.Content_5,Qe.Content_5,Qe.Content_6,Qe.Content_7,Qe.Content_8,Qe.Content_9,Qe.Recipe_1,Qe.Recipe_2,Qe.Recipe_3,Qe.Recipe_4,Qe.Recipe_5,Qe.Sidebar_1,Qe.Sidebar_2,Qe.Sidebar_3,Qe.Sidebar_4,Qe.Sidebar_5,Qe.Sidebar_9],l_=[Qe.Below_Post,Qe.Content_1],d_=[Qe.Below_Post,Qe.Content],c_={desktop:n_,mobile:r_},h_=[Qe.Below_Post,Qe.Content_1,Qe.Content_3,Qe.Content_5,Qe.Recipe_1];class u_ extends Og{addLazySlotsToTypes(e){"mobile"===this._device&&d_.includes(e.location)&&e.lazy&&l_.push(e.name)}createBitStringAdOptions(e,t=!1){const i=e.hasSize([300,250]),s=e.hasSize([320,50]),n=e.hasSize([728,90]),r=e.hasSize([300,600]),a=e.hasSize([160,600]);this.addLazySlotsToTypes(e);return[+this.isBanner(e,i,s,r),+this.isHeader(e,n,s),+this.isOutstream(e,i,t),+this.isInterscroller(e),+this.isAnimatedFooter(e,s),+this.isExpandableFooter(e,s),+this.isSiderail(e,i||a||r)].join("")}isBanner(e,t,i,s){const n=e.location===Qe.Sidebar;return(t||i||s&&n)&&o_.includes(e.placementMapName)}isHeader(e,t,i){const s=[Qe.Header_1,Qe.Header_2];return(t||i)&&s.includes(e.placementMapName)}isOutstream(e,t,i=!1){const s=[Qe.Content,Qe.Header,Qe.Below_Post,Qe.Recipe];return t&&("desktop"===this._device&&s.includes(e.location)||"mobile"===this._device&&i&&h_.includes(e.placementMapName)&&this._mediaType.outstreamEnabled(e).outstreamCapable)}isInterscroller(e){return"mobile"===this._device&&this._config.adTypes.has("interscroller")&&l_.includes(e.placementMapName)}isAnimatedFooter(e,t){return("desktop"===this._device||this._config.adTypes.has("animatedFooter"))&&t&&e.placementMapName===Qe.Footer_1}isExpandableFooter(e,t){return"mobile"===this._device&&t&&this._config.adTypes.has("expandableFooter")&&e.placementMapName===Qe.Footer_1}isSiderail(e,t){return"desktop"===this._device&&t&&e.location===Qe.Sidebar}getBannerSlotBidRequests(e){return this._getBidParams(e)}getOutstreamSlotBidRequests(e){if("desktop"!==this._device)return this._getBidParams(e,!0)}getVideoSlotBidRequests(e){const t=this._videoMap.get(e.name),i=[];return t?(this._bidders.forEach((t=>{const s="server"===t.type?"adSlotID":"placementId",n=this._videoMap.get(e.name).filter((e=>e.siteId===this._videoSiteID))[0][t.type],r=t.pbsHost;i.push({bidder:t.name,params:{[s]:n},...r&&{pbsHost:r}})})),i):i}_getBidParams(e,t=!1){const i=this.createBitStringAdOptions(e,t);if(a_.has(i))return this._bidders.map((s=>{const n="server"===s.type?"adSlotID":"placementId",r=a_.get(i).filter((e=>e.siteId===this._siteID))[0],a=s.pbsHost;return{bidder:s.name,...this._addBidLabel(e.placementMapName,{outstreamCapable:r.isOutstream&&t}),params:{[n]:r[s.type][this._device]},...a&&{pbsHost:a}}}))}constructor(e,t){super(e),this._mediaType=t,this.bidderConfig=this._config.partners.getBidderConfig(te.Kargo),this.adapterName=te.Kargo,this.gvlid=972,this._device=Ki()?"mobile":"desktop",this._videoMap=c_[this._device],this._displaySiteMappings=[Ct,wt,kt,Tt,At],this._videoSiteMappings=[wt,kt,Ct,Tt,At],this._siteID=this._displaySiteMappings.includes(this._config.site.id)?this._config.site.id:"default",this._videoSiteID=this._videoSiteMappings.includes(this._config.site.id)?this._config.site.id:"default",this.videoCreativeIds=[["138381592896",te.Kargo],["138381553202",te.Kargo],["138381553217",te.Kargo],["138381553238",te.Kargo],["138381553328",te.Kargo],["138381553214",te.Kargo],["138381553235",te.Kargo],["138381553244",te.Kargo],["138381553331",te.Kargo],["138381553334",te.Kargo],["138382066465",te.Kargo],["138381553241",te.Kargo],["138381553325",te.Kargo],["138381553337",te.Kargo],["138381553340",te.Kargo],["138382066468",te.Kargo]],this.settings={storageAllowed:["html5"]}}}u_=B([bn("KargoBidder"),M(),j("design:type",Function),j("design:paramtypes",[void 0===_c?Object:_c,void 0===Hm?Object:Hm])],u_);class p_ extends Og{getBannerSlotBidRequests(e){if(this._displayMap.has(e.placementMapName))return this._bidders.map((t=>{const i=t.pbsHost;return{bidder:t.name,params:{uid:this._displayMap.get(e.placementMapName)},...i&&{pbsHost:i}}}))}getOutstreamSlotBidRequests(e){if(this._outstreamMap.has(e.placementMapName))return this._bidders.map((t=>{const i=t.pbsHost;return{bidder:t.name,...this._addBidLabel(e.placementMapName,{outstreamCapable:e.location!==Qe.Video_StickyOutstream}),params:{uid:this._outstreamMap.get(e.placementMapName)},...i&&{pbsHost:i}}}))}constructor(e){super(e),this.bidderConfig=this._config.partners.getBidderConfig(te.MediaGrid),this.serverBidderCode=te.MediaGrid,this.additionalServerBidderCodes=[te.MediaGridAY],this.settings={bidCpmAdjustment:(e,t)=>this._getCPMAdjustment(e,t),adserverTargeting:[{key:"hb_attr",val:e=>{var t,i;let s="trustx"===(null==e||null==(t=e.meta)?void 0:t.demandSource)?`trustx_${e.mediaType}`:e.mediaType;return(null==e||null==(i=e.meta)?void 0:i.isInBannerVideo)&&(s="ibv"),s}}]},this._getCPMAdjustment=(e,t)=>{const i=t.dealId,s=("vastUrl"in t||"vastXml"in t)&&i&&i.toString().includes("G-TRUSTX");return Qt(this._config,e,te.MediaGrid,{...t,...s&&{dealId:void 0}})},this._displayMap=new Map([[Qe.Below_Post,357],[Qe.Content_1,358],[Qe.Content_2,359],[Qe.Content_3,360],[Qe.Content_4,361],[Qe.Content_5,362],[Qe.Content_6,363],[Qe.Content_7,364],[Qe.Content_8,365],[Qe.Content_9,366],[Qe.Footer_1,367],[Qe.Header_1,368],[Qe.Header_2,369],[Qe.Interstitial_1,48428],[Qe.Recipe_1,370],[Qe.Recipe_2,371],[Qe.Recipe_3,372],[Qe.Recipe_4,373],[Qe.Sidebar_1,375],[Qe.Sidebar_2,376],[Qe.Sidebar_3,377],[Qe.Sidebar_4,378],[Qe.Sidebar_5,379],[Qe.Sidebar_9,380]]),this._outstreamMap=new Map([[Qe.Below_Post,415475],[Qe.Content_1,415482],[Qe.Content_3,415479],[Qe.Content_5,415481],[Qe.Recipe_1,420057],[Qe.Video_StickyOutstream_1,133519]])}}p_=B([bn("MediaGridBidder"),D(),j("design:type",Function),j("design:paramtypes",[void 0===_c?Object:_c])],p_);class g_ extends Og{getVideoSlotBidRequests(e){const t=Bi()?"desktop":"mobile";if(this._map.has(e.name))return this._map.get(e.name).filter((({device:e})=>!e||e===t)).map((({uid:e})=>({bidder:this.name,params:{uid:e}})))}constructor(e){super(e),this.gvlid=686,this.bidderConfig=this._config.partners.getBidderConfig(te.MediaGridVideo),this.adapterName="grid",this.videoCreativeIds=[["138323922262",te.MediaGridVideo],["138323922901",te.MediaGridVideo],["138323922886",te.MediaGridVideo],["138323922898",te.MediaGridVideo],["138323922904",te.MediaGridVideo],["138323923042",te.MediaGridVideo],["138323922889",te.MediaGridVideo],["138323923018",te.MediaGridVideo],["138323922907",te.MediaGridVideo],["138323922859",te.MediaGridVideo],["138323923048",te.MediaGridVideo],["138323923045",te.MediaGridVideo],["138323923051",te.MediaGridVideo],["138323923021",te.MediaGridVideo],["138323922895",te.MediaGridVideo],["138323922892",te.MediaGridVideo]],this._map=new Map([[et.Video_Collapse_Autoplay_SoundOff,[{uid:2163}]],[et.Video_Coll_SOff_Smartphone,[{uid:2165}]],[et.Video_In_Post_ClicktoPlay_SoundOn,[{device:"desktop",uid:2164},{device:"mobile",uid:6056}]],[et.Video_Individual_Autoplay_SOff,[{device:"desktop",uid:2166},{device:"mobile",uid:6057}]]])}}g_=B([bn("MediaGridVideoBidder"),D(),j("design:type",Function),j("design:paramtypes",[void 0===_c?Object:_c])],g_);class m_ extends Og{_addRecipePlacements(){const e=this._config.adTypes;(this._mobile?e.nativeMobileRecipe:e.nativeDesktopRecipe)&&this._eligibleUnits.push(Qe.Recipe_1,Qe.Recipe_2,Qe.Recipe_3)}_addHeaderPlacements(){const e=this._config.adTypes;(this._mobile?e.nativeMobileHeader:e.nativeDesktopHeader)&&this._eligibleUnits.push(Qe.Header_1)}_addSidebarPlacements(){const e=this._config.adTypes;!this._mobile&&e.nativeDesktopSidebar&&this._eligibleUnits.push(Qe.Sidebar_1,Qe.Sidebar_2)}_addContentPlacements(){const e=this._config.adTypes;(this._mobile?e.nativeMobileContent:e.nativeDesktopContent)&&this._eligibleUnits.push(Qe.Content_1,Qe.Content_2,Qe.Content_3,Qe.Content_4,Qe.Content_5,Qe.Content_6,Qe.Content_7,Qe.Content_8,Qe.Content_9)}getVideoSlotBidRequests(){return this._bidders.reduce(((e,t)=>{const i=t.pbsHost;return"server"===t.type&&e.push({bidder:t.name,params:{},...i&&{pbsHost:i}}),e}),[])}getBannerSlotBidRequests(e){if(this._displayMap.has(e.placementMapName))return this._bidders.map((e=>{const t=e.pbsHost;return{bidder:e.name,params:{},...t&&{pbsHost:t}}}))}getOutstreamSlotBidRequests(e){if(this._outstreamMap.has(e.placementMapName))return this._bidders.reduce(((e,t)=>{const i=t.pbsHost;return"server"===t.type&&e.push({bidder:t.name,params:{},...i&&{pbsHost:i}}),e}),[])}constructor(e){super(e),this.bidderConfig=this._config.partners.getBidderConfig(te.Nativo),this.adapterName=te.Nativo,this.serverBidderCode=te.NativoServer,this.additionalServerBidderCodes=[te.NativoAY],this._mobile=Ki(),this._eligibleUnits=[Qe.Footer_1],this._outstreamMap=new Set([Qe.Video_StickyOutstream_1]),this.videoServerCreativeIds=[["138501015328",te.NativoServer],["138500434457",te.NativoServer],["138500434454",te.NativoServer],["138500434427",te.NativoServer],["138500433788",te.NativoServer],["138500433785",te.NativoServer],["138500433770",te.NativoServer],["138500198436",te.NativoServer]],this._addContentPlacements(),this._addRecipePlacements(),this._addSidebarPlacements(),this._addHeaderPlacements(),this._displayMap=new Set(this._eligibleUnits)}}m_=B([bn("NativoBidder"),D(),j("design:type",Function),j("design:paramtypes",[void 0===_c?Object:_c])],m_);class __ extends Og{_lazyActiveTypes(e){return e.lazy&&this._lazyImpactParamsMap.has(e.location)&&this._lazyImpactParamsMap.get(e.location).filter((e=>this._config.adTypes[e]))}activeAdTypes(e){return this._highImpactParamsMap.has(e.placementMapName)&&this._highImpactParamsMap.get(e.placementMapName).filter((e=>this._config.adTypes[e]))}getBannerSlotBidRequests(e){if(this._map.has(e.placementMapName))return this._getBidParams(e)}getOutstreamSlotBidRequests(e){if(this._map.has(e.placementMapName))return this._getBidParams(e,!0)}getVideoSlotBidRequests(e){if(this._map.has(e.name)){var t;const i="all"===(null==(t=this._config.video.videoProtocols)?void 0:t.scope)?{protocols:this._config.video.videoProtocols.protocols}:"",s=this._map.get(e.name);return this._bidders.map((t=>{var n;const r=t.pbsHost;return{bidder:t.name,params:{...this._params,unit:s[t.type].unit,video:{mimes:this._config.video.mimeType,api:this._config.video.apiValue,...i,pos:this._config.video.position.id,...(null==(n=this._config.video.playbackmethod)?void 0:n.get(e.name))&&{playbackmethod:this._config.video.playbackmethod.get(e.name)}}},...r&&{pbsHost:r}}}))}}_getBidParams(e,t=!1){const i=this.activeAdTypes(e)||this._lazyActiveTypes(e)||[],s=this._map.get(e.placementMapName);return this._bidders.map((n=>{const r=n.pbsHost;return{bidder:n.name,...this._addBidLabel(e.placementMapName,{outstreamCapable:t&&e.location!==Qe.Video_StickyOutstream}),params:{...this._params,unit:s[n.type].unit,customParams:{...this._custParams,...i.length&&{hi_au:i.filter((e=>this._config.adTypes[e]))}}},...r&&{pbsHost:r}}}))}constructor(e,t){super(e),this._context=t,this.bidderConfig=this._config.partners.getBidderConfig(te.OpenX),this.adapterName=te.OpenX,this.serverBidderCode=te.OpenXServer,this.additionalServerBidderCodes=[te.OpenXAY],this.gvlid=69,this.videoCreativeIds=[["138323525262",te.OpenX],["138323914702",te.OpenX],["138323526741",te.OpenX],["138323526186",te.OpenX],["138323526738",te.OpenX],["138323526744",te.OpenX],["138323526747",te.OpenX],["138323526189",te.OpenX],["138323914588",te.OpenX],["138323526192",te.OpenX],["138323526750",te.OpenX],["138323466806",te.OpenX],["138323468969",te.OpenX],["138323914705",te.OpenX],["138323526183",te.OpenX],["138323526753",te.OpenX]],this.videoServerCreativeIds=[["138411286398",te.OpenXServer],["138411786451",te.OpenXServer],["138411286395",te.OpenXServer],["138411286392",te.OpenXServer],["138411286401",te.OpenXServer],["138411286389",te.OpenXServer],["13841117744",te.OpenXServer],["138411178055",te.OpenXServer]],this._params={delDomain:"cafemedia-d.openx.net"},this._highImpactParamsMap=new Map([[Qe.Content_1,["interscroller","miniscroller"]]]),this._lazyImpactParamsMap=new Map([[Qe.Content,["interscroller","miniscroller"]],[Qe.Recipe,["miniscroller"]],[Qe.Below_Post,["interscroller","miniscroller"]]]),this._map=new Map([[Qe.Below_Post,{client:{unit:"538699862"},server:{unit:"558245996"}}],[Qe.Content_1,{client:{unit:"538699864"},server:{unit:"558245997"}}],[Qe.Content_2,{client:{unit:"538699865"},server:{unit:"558245998"}}],[Qe.Content_3,{client:{unit:"538699866"},server:{unit:"558245999"}}],[Qe.Content_4,{client:{unit:"538699867"},server:{unit:"558246000"}}],[Qe.Content_5,{client:{unit:"538699868"},server:{unit:"558246001"}}],[Qe.Content_6,{client:{unit:"538699869"},server:{unit:"558246002"}}],[Qe.Content_7,{client:{unit:"538699870"},server:{unit:"558246003"}}],[Qe.Content_8,{client:{unit:"538699871"},server:{unit:"558246004"}}],[Qe.Content_9,{client:{unit:"538699872"},server:{unit:"558246005"}}],[Qe.Footer_1,{client:{unit:"538699840"},server:{unit:"558246006"}}],[Qe.Header_1,{client:{unit:"538699873"},server:{unit:"558246007"}}],[Qe.Header_2,{client:{unit:"538699874"},server:{unit:"558246008"}}],[Qe.Interstitial_1,{client:{unit:"543876568"},server:{unit:"543876568"}}],[Qe.Recipe_1,{client:{unit:"538699843"},server:{unit:"558246009"}}],[Qe.Recipe_2,{client:{unit:"538699844"},server:{unit:"558246010"}}],[Qe.Recipe_3,{client:{unit:"540594416"},server:{unit:"558246011"}}],[Qe.Recipe_4,{client:{unit:"540751624"},server:{unit:"558246012"}}],[Qe.Sidebar_1,{client:{unit:"538699853"},server:{unit:"558246014"}}],[Qe.Sidebar_2,{client:{unit:"538699854"},server:{unit:"558246015"}}],[Qe.Sidebar_3,{client:{unit:"538699855"},server:{unit:"558246016"}}],[Qe.Sidebar_4,{client:{unit:"538699856"},server:{unit:"558246017"}}],[Qe.Sidebar_5,{client:{unit:"538699857"},server:{unit:"558246018"}}],[Qe.Sidebar_9,{client:{unit:"538699861"},server:{unit:"558246019"}}],[Qe.Video_StickyOutstream_1,{client:{unit:"545721971"},server:{unit:"558246697"}}],[et.Video_Collapse_Autoplay_SoundOff,{client:{unit:"540679731"},server:{unit:"558246727"}}],[et.Video_Coll_SOff_Smartphone,{client:{unit:"540679733"},server:{unit:"558246726"}}],[et.Video_In_Post_ClicktoPlay_SoundOn,{client:{unit:"540679727"},server:{unit:"558246662"}}],[et.Video_Individual_Autoplay_SOff,{client:{unit:"540925853"},server:{unit:"558246728"}}]]),this._custParams={...this._config.site.filteredSensitiveCategories.length&&{sens:this._config.site.filteredSensitiveCategories},bucket:[this._context.bucket]}}}__=B([bn("OpenXBidder"),D(),j("design:type",Function),j("design:paramtypes",[void 0===_c?Object:_c,void 0===Fr?Object:Fr])],__);class f_ extends Og{get bidderDisplayEnabled(){return this._isCountryValid()}_isCountryValid(){const e=this._config;switch(this._context.country){case"GB":return e.gdpr.enabled;case"CA":return!0;default:return!1}}getBannerSlotBidRequests(e){var t;if(this._map.has(e.placementMapName))return[{bidder:this.name,params:{placementId:null==(t=this._map.get(e.placementMapName))?void 0:t.placementId,...this._params}}]}constructor(e,t){super(e),this._context=t,this.bidderConfig=this._config.partners.getBidderConfig(te.Ozone),this.adapterName=te.Ozone,this._params={publisherId:"OZONERAP0001",siteId:"1500000160"},this._map=new Map([[Qe.Content,{placementId:"3500013089"}],[Qe.Content_1,{placementId:"3500013090"}],[Qe.Content_2,{placementId:"3500013091"}],[Qe.Content_3,{placementId:"3500013092"}],[Qe.Content_4,{placementId:"3500013093"}],[Qe.Content_5,{placementId:"3500013094"}],[Qe.Content_6,{placementId:"3500013095"}],[Qe.Content_7,{placementId:"3500013096"}],[Qe.Content_8,{placementId:"3500013097"}],[Qe.Content_9,{placementId:"3500013098"}],[Qe.Header_1,{placementId:"3500013099"}],[Qe.Header_2,{placementId:"3500013100"}],[Qe.Sidebar_1,{placementId:"3500013101"}],[Qe.Sidebar_2,{placementId:"3500013102"}],[Qe.Sidebar_3,{placementId:"3500013103"}],[Qe.Sidebar_4,{placementId:"3500013104"}],[Qe.Sidebar_5,{placementId:"3500013105"}],[Qe.Sidebar_9,{placementId:"3500013106"}],[Qe.Below_Post,{placementId:"3500013107"}],[Qe.Below_Post_1,{placementId:"3500013108"}],[Qe.Footer_1,{placementId:"3500013109"}],[Qe.Recipe_1,{placementId:"3500013110"}],[Qe.Recipe_2,{placementId:"3500013111"}],[Qe.Recipe_3,{placementId:"3500013112"}],[Qe.Recipe_4,{placementId:"3500013113"}],[Qe.Recipe_5,{placementId:"3500013114"}]])}}f_=B([bn("OzoneBidder"),D(),j("design:type",Function),j("design:paramtypes",[void 0===_c?Object:_c,void 0===Fr?Object:Fr])],f_);class v_ extends Og{getBannerSlotBidRequests(e){return this._getBidRequests(e,this._map)}getMultiFormatBannerNativeSlotBidRequests(e){return this._getBidRequests(e,this._nativeMap,!0)}getMultiFormatBannerVideoSlotBidRequests(e){return this._getBidRequests(e,this._map)}_getBidRequests(e,t,i=!1){const s=[],n=t.get(e.placementMapName);return n?(this._bidders.forEach((t=>{const r=this._getBidParams(t.name,n[t.type],e,!1,i,t.pbsHost);s.push(r)})),s):[]}getOutstreamSlotBidRequests(e){const t=[],i=e.location!==Qe.Video_StickyOutstream,s=this._map.get(e.placementMapName);return s&&this._bidders.forEach((n=>{const r=this._getBidParams(n.name,s[n.type],e,!i,!1,n.pbsHost);t.push(r)})),t}_getBidParams(e,t,i,s=!1,n=!1,r){return{bidder:e,...this._addBidLabel(i.placementMapName,{outstreamCapable:s}),params:{publisherId:this.pubId,adSlot:n?t:`${t}@${i.sizes[0][0]}x${i.sizes[0][1]}`,...this._config.site.filteredSensitiveCategories.length>0&&this._shouldSendPMZoneId()&&{pmzoneid:this._config.site.filteredSensitiveCategories.join(",")}},...r&&{pbsHost:r}}}getVideoSlotBidRequests(e){const t=[];return this._map.has(e.name)&&this._bidders.forEach((i=>{t.push(this.getVideoBidParams(i.name,this._map.get(e.name)[i.type],e,i.pbsHost))})),t}getDCTRParam(){const e=[],t=this._irisTvTracker.enabled?this._irisTvTracker.irisContextualData:void 0;return t&&t.length&&e.push(`iris_context=${t.toString()}`),e.join("|")}getVideoBidParams(e,t,i,s){var n,r;const a=this.getDCTRParam();return{bidder:e,params:{publisherId:this.pubId,...a&&{dctr:a},video:{mimes:this._config.video.mimeType,api:this._config.video.apiValue,..."all"===(null==(n=this._config.video.videoProtocols)?void 0:n.scope)&&{protocols:this._config.video.videoProtocols.protocols},...(null==(r=this._config.video.playbackmethod)?void 0:r.get(i.name))&&{playbackmethod:this._config.video.playbackmethod.get(i.name)}},adSlot:`${t}@${i.size[0]}x${i.size[1]}`,...this._config.site.filteredSensitiveCategories.length>0&&this._shouldSendPMZoneId()&&{pmzoneid:this._config.site.filteredSensitiveCategories.join(",")}},...s&&{pbsHost:s}}}_shouldSendPMZoneId(){return"bc"!==this._pubMaticBcatExperiment.result}constructor(e,t,i){super(e),this._irisTvTracker=t,this._pubMaticBcatExperiment=i,this.multiformatBidder=!0,this.multiformatBannerVideoBidder=!0,this.bidderConfig=this._config.partners.getBidderConfig(te.Pubmatic),this.adapterName=te.Pubmatic,this.serverBidderCode=te.PubmaticServer,this.additionalServerBidderCodes=[te.PubmaticAY],this.gvlid=76,this.videoCreativeIds=[["138323526825",te.Pubmatic],["138323915419",te.Pubmatic],["138323915299",te.Pubmatic],["138323527095",te.Pubmatic],["138323469392",te.Pubmatic],["138323915422",te.Pubmatic],["138323469395",te.Pubmatic],["138323469389",te.Pubmatic],["138323469383",te.Pubmatic],["138323469320",te.Pubmatic],["138323469317",te.Pubmatic],["138323527092",te.Pubmatic],["138323469401",te.Pubmatic],["138323469398",te.Pubmatic],["138323469386",te.Pubmatic],["138323469404",te.Pubmatic]],this.videoServerCreativeIds=[["138337271609",te.PubmaticServer],["138337343196",te.PubmaticServer],["138337343229",te.PubmaticServer],["138337720879",te.PubmaticServer],["138337720885",te.PubmaticServer],["138337343202",te.PubmaticServer],["138337343211",te.PubmaticServer],["138337343217",te.PubmaticServer],["138337343232",te.PubmaticServer],["138337720597",te.PubmaticServer],["138337720888",te.PubmaticServer],["138337343199",te.PubmaticServer],["138337343214",te.PubmaticServer],["138337343223",te.PubmaticServer],["138337343226",te.PubmaticServer],["138337343220",te.PubmaticServer]],this.pubId="157347",this._map=new Map([[Qe.Below_Post,{client:"BelowPost1",server:"BelowPost1_XandrS2S"}],[Qe.Content_1,{client:"Content1",server:"Content1_XandrS2S"}],[Qe.Content_2,{client:"Content2",server:"Content2_XandrS2S"}],[Qe.Content_3,{client:"Content3",server:"Content3_XandrS2S"}],[Qe.Content_4,{client:"Content4",server:"Content4_XandrS2S"}],[Qe.Content_5,{client:"Content5",server:"Content5_XandrS2S"}],[Qe.Content_6,{client:"Content6",server:"Content6_XandrS2S"}],[Qe.Content_7,{client:"Content7",server:"Content7_XandrS2S"}],[Qe.Content_8,{client:"Content8",server:"Content8_XandrS2S"}],[Qe.Content_9,{client:"Content9",server:"Content9_XandrS2S"}],[Qe.Footer_1,{client:"Footer1",server:"Footer1_XandrS2S"}],[Qe.Header_1,{client:"Header1",server:"Header1_XandrS2S"}],[Qe.Header_2,{client:"Header2",server:"Header2_XandrS2S"}],[Qe.Interstitial_1,{client:"interstitial",server:"interstitial_XandrS2S"}],[Qe.Recipe_1,{client:"Recipe1",server:"Recipe1_XandrS2S"}],[Qe.Recipe_2,{client:"Recipe2",server:"Recipe2_XandrS2S"}],[Qe.Recipe_3,{client:"Recipe3",server:"Recipe3_XandrS2S"}],[Qe.Recipe_4,{client:"Recipe4",server:"Recipe4_XandrS2S"}],[Qe.Sidebar_1,{client:"Sidebar1",server:"Sidebar1_XandrS2S"}],[Qe.Sidebar_2,{client:"Sidebar2",server:"Sidebar2_XandrS2S"}],[Qe.Sidebar_3,{client:"Sidebar3",server:"Sidebar3_XandrS2S"}],[Qe.Sidebar_4,{client:"Sidebar4",server:"Sidebar4_XandrS2S"}],[Qe.Sidebar_5,{client:"Sidebar5",server:"Sidebar5_XandrS2S"}],[Qe.Sidebar_9,{client:"Sidebar9",server:"Sidebar9_XandrS2S"}],[Qe.Video_StickyOutstream_1,{client:"2267845",server:"4018943"}],[et.Video_Collapse_Autoplay_SoundOff,{client:"1961309",server:"3437231"}],[et.Video_Coll_SOff_Smartphone,{client:"1961310",server:"3437234"}],[et.Video_In_Post_ClicktoPlay_SoundOn,{client:"1961308",server:"3437232"}],[et.Video_Individual_Autoplay_SOff,{client:"2503033",server:"3443766"}]]),this._nativeMap=new Map([[Qe.Content_1,{client:"Content1_Native",server:"Content1_Native_S2S"}],[Qe.Content_2,{client:"Content2_Native",server:"Content2_Native_S2S"}],[Qe.Content_3,{client:"Content3_Native",server:"Content3_Native_S2S"}],[Qe.Content_4,{client:"Content4_Native",server:"Content4_Native_S2S"}],[Qe.Content_5,{client:"Content5_Native",server:"Content5_Native_S2S"}],[Qe.Content_6,{client:"Content6_Native",server:"Content6_Native_S2S"}],[Qe.Content_7,{client:"Content7_Native",server:"Content7_Native_S2S"}],[Qe.Content_8,{client:"Content8_Native",server:"Content8_Native_S2S"}],[Qe.Content_9,{client:"Content9_Native",server:"Content9_Native_S2S"}],[Qe.Recipe_1,{client:"Recipe1_Native",server:"Recipe1_Native_S2S"}],[Qe.Recipe_2,{client:"Recipe2_Native",server:"Recipe2_Native_S2S"}],[Qe.Recipe_3,{client:"Recipe3_Native",server:"Recipe3_Native_S2S"}],[Qe.Recipe_4,{client:"Recipe4_Native",server:"Recipe4_Native_S2S"}],[Qe.Recipe_5,{client:"Recipe5_Native",server:"Recipe5_Native_S2S"}]])}}v_=B([bn("PubMaticBidder"),D(),j("design:type",Function),j("design:paramtypes",[void 0===_c?Object:_c,void 0===Dc?Object:Dc,void 0===Nc?Object:Nc])],v_);class y_ extends Og{get bidderDisplayEnabled(){return"US"===this._context.country}get bidderInstreamEnabled(){return"US"===this._context.country}_getBids(){return this._bidders.map((e=>{const t=e.pbsHost;return{bidder:e.name,params:{...this._params},...t&&{pbsHost:t}}}))}getBannerSlotBidRequests(){return this._getBids()}getVideoSlotBidRequests(){return this._getBids()}constructor(e,t){super(e),this._context=t,this.bidderConfig=this._config.partners.getBidderConfig(te.Rise),this.serverBidderCode=te.Rise,this.additionalServerBidderCodes=[te.RiseAY],this.videoCreativeIds=[["138495438845",te.Rise],["138495438842",te.Rise],["138495438824",te.Rise],["138495438689",te.Rise],["138495438686",te.Rise],["138495438653",te.Rise],["138495438416",te.Rise],["138495437750",te.Rise]],this._params={org:"670f50ccaaffbb00017d70d5"}}}y_=B([bn("RiseBidder"),D(),j("design:type",Function),j("design:paramtypes",[void 0===_c?Object:_c,void 0===Fr?Object:Fr])],y_);class b_ extends Er{init(){this._key="RtbHouseExperiment",this._lookup="RTBF",this._default=!1}}b_=B([bn("RtbHouseExperiment"),M()],b_);class S_ extends Og{get bidderDisplayEnabled(){const e=this._config;return this._rtbHouseExperiment.result&&e.fledge.enabled}getBannerSlotBidRequests(e){if(this._map.has(e.placementMapName))return[{bidder:this.name,params:{publisherId:"puHY4pgB9FOPeQBYYZEM",region:"prebid-us"}}]}constructor(e,t){super(e),this._rtbHouseExperiment=t,this.bidderConfig=this._config.partners.getBidderConfig(te.Rtbhouse),this.gvlid=16,this._map=new Set([Qe.Below_Post,Qe.Content_1,Qe.Content_2,Qe.Content_3,Qe.Content_4,Qe.Content_5,Qe.Content_6,Qe.Content_7,Qe.Content_8,Qe.Content_9,Qe.Footer_1,Qe.Header_1,Qe.Header_2,Qe.Recipe_1,Qe.Recipe_2,Qe.Recipe_3,Qe.Recipe_4,Qe.Recipe_5,Qe.Sidebar_1,Qe.Sidebar_2,Qe.Sidebar_3,Qe.Sidebar_4,Qe.Sidebar_5,Qe.Sidebar_9])}}S_=B([bn("RtbHouseBidder"),D(),j("design:type",Function),j("design:paramtypes",[void 0===_c?Object:_c,void 0===b_?Object:b_])],S_);class E_ extends Er{init(){this._key="MagniteRefresh",this._lookup="MGNR",this._default=!1}}E_=B([bn("MagniteRefreshExperiment"),M()],E_);class C_ extends Og{getDisplayParams(e,t){return{accountId:9262,siteId:t===Qe.Video_StickyOutstream?{server:420534,client:386004}[e]:{server:363698,client:180726}[e],...t===Qe.Video_StickyOutstream&&{video:{language:"en"}}}}getVideoParams(e){return{accountId:9262,siteId:{server:375144,client:253996}[e],video:{language:"en"}}}getBannerSlotBidRequests(e){return this._getBidParams(e)}getMultiFormatBannerNativeSlotBidRequests(e){return this._getMultiformatBidParams(e)}getOutstreamSlotBidRequests(e){return this._getBidParams(e,!0)}getVideoSlotBidRequests(e){if(this._map.has(e.name))return this.bidders.map((t=>{const i=t.pbsHost;return{bidder:t.name,params:{...this.getVideoParams(t.type),zoneId:this._map.get(e.name).initial[t.type]},...i&&{pbsHost:i}}}))}updateBidParams(e){this._addPositionParam(e,"atf")}_getMultiformatBidParams(e){const t=this._getBidParams(e,!1);return t&&t.forEach((e=>{e.params&&(e.params.bidonmultiformat=!0)})),t}_getBidParams(e,t=!1){const i=[Qe.Content],s=this._magniteRefreshExperiment.result&&i.includes(e.location),n=t&&e.location!==Qe.Video_StickyOutstream;if(this._map.has(e.placementMapName))return this._bidders.reduce(((t,i)=>{const r=(t=!1,s=!1)=>{const r=t&&!s,a=s?"refresh":"initial",o=i.pbsHost;return{bidder:i.name,...this._addBidLabel(e.placementMapName,{...r&&{initial:r},...s&&{refresh:s},outstreamCapable:n}),params:{...this.getDisplayParams(i.type,e.location),zoneId:this._map.get(e.placementMapName)[a][i.type],...e.isHighlyViewable()&&{position:"atf"}},...o&&{pbsHost:o}}};return"client"===i.type&&n||(t.push(r(s)),s&&t.push(r(s,!0))),t}),[])}constructor(e,t){super(e),this._magniteRefreshExperiment=t,this.multiformatBidder=!0,this.multiformatBannerNativeBidder=!0,this.bidderConfig=this._config.partners.getBidderConfig(te.Rubicon),this.adapterName=te.Rubicon,this.serverBidderCode=te.RubiconServer,this.additionalServerBidderCodes=[te.RubiconAY],this.gvlid=52,this.videoCreativeIds=[["138323536473",te.Rubicon],["138323540955",te.Rubicon],["138323540961",te.Rubicon],["138323540964",te.Rubicon],["138323929606",te.Rubicon],["138323480624",te.Rubicon],["138323536455",te.Rubicon],["138323540856",te.Rubicon],["138323929612",te.Rubicon],["138323480642",te.Rubicon],["138323929516",te.Rubicon],["138323480600",te.Rubicon],["138323480636",te.Rubicon],["138323536467",te.Rubicon],["138323926693",te.Rubicon],["138323536476",te.Rubicon]],this.videoServerCreativeIds=[["138323542002",te.RubiconServer],["138323932663",te.RubiconServer],["138323544525",te.RubiconServer],["138323932642",te.RubiconServer],["138323544531",te.RubiconServer],["138323544528",te.RubiconServer],["138323932765",te.RubiconServer],["138323932768",te.RubiconServer],["138323932852",te.RubiconServer],["138323932855",te.RubiconServer],["138323544354",te.RubiconServer],["138323932858",te.RubiconServer],["138323544357",te.RubiconServer],["138323544339",te.RubiconServer],["138323932672",te.RubiconServer],["138323932669",te.RubiconServer]],this._map=new Map([[Qe.Below_Post,{initial:{client:881394,server:1974272}}],[Qe.Content_1,{initial:{client:881398,server:1974276},refresh:{client:3571264,server:3571284}}],[Qe.Content_2,{initial:{client:881400,server:1974280},refresh:{client:3571268,server:3571286}}],[Qe.Content_3,{initial:{client:881402,server:1974282},refresh:{client:3571270,server:3571288}}],[Qe.Content_4,{initial:{client:881404,server:1974284},refresh:{client:3571272,server:3571290}}],[Qe.Content_5,{initial:{client:881406,server:1974286},refresh:{client:3571274,server:3571292}}],[Qe.Content_6,{initial:{client:881408,server:1974288},refresh:{client:3571276,server:3571294}}],[Qe.Content_7,{initial:{client:881410,server:1974290},refresh:{client:3571278,server:3571296}}],[Qe.Content_8,{initial:{client:881412,server:1974292},refresh:{client:3571280,server:3571298}}],[Qe.Content_9,{initial:{client:881414,server:1974294},refresh:{client:3571282,server:3571300}}],[Qe.Footer_1,{initial:{client:881416,server:1974296}}],[Qe.Header_1,{initial:{client:881422,server:1974304}}],[Qe.Header_2,{initial:{client:881426,server:1974306}}],[Qe.Interstitial_1,{initial:{client:1979348,server:1979354}}],[Qe.Recipe_1,{initial:{client:881428,server:1974308}}],[Qe.Recipe_2,{initial:{client:881430,server:1974310}}],[Qe.Recipe_3,{initial:{client:1187188,server:1974312}}],[Qe.Recipe_4,{initial:{client:1279328,server:1974314}}],[Qe.Sidebar_1,{initial:{client:881440,server:1974316}}],[Qe.Sidebar_2,{initial:{client:881454,server:1974318}}],[Qe.Sidebar_3,{initial:{client:881460,server:1974320}}],[Qe.Sidebar_4,{initial:{client:881462,server:1974322}}],[Qe.Sidebar_5,{initial:{client:881466,server:1974324}}],[Qe.Sidebar_9,{initial:{client:881478,server:1974332}}],[Qe.Video_StickyOutstream_1,{initial:{client:2150398,server:2384630}}],[et.Video_Collapse_Autoplay_SoundOff,{initial:{client:1259006,server:2055644}}],[et.Video_Coll_SOff_Smartphone,{initial:{client:1259010,server:2055648}}],[et.Video_In_Post_ClicktoPlay_SoundOn,{initial:{client:1259008,server:2055642}}],[et.Video_Individual_Autoplay_SOff,{initial:{client:1506800,server:2055646}}]])}}C_=B([bn("RubiconBidder"),D(),j("design:type",Function),j("design:paramtypes",[void 0===_c?Object:_c,void 0===E_?Object:E_])],C_);const T_=new Map([[Qe.Below_Post,{client:{pkey:["WoVFJAUvQg9oowjifOQLhHfb"]},server:{pkey:["LIEwvmMuVmssQ5NeNnA3LG7j"]}}],[Qe.Content_1,{client:{pkey:["9kDU40A4BJXchR7ikuWND5Ui"]},server:{pkey:["UzMWqNiQufIagUwXXcUnC3RR"]}}],[Qe.Content_2,{client:{pkey:["ocdg6DMXhAfaTk7KgImuPCPi"]},server:{pkey:["AgAUrutbIGojlToE3k84bzxl"]}}],[Qe.Content_3,{client:{pkey:["JQXmRwXj1jOjHCQF8ufXkKIJ"]},server:{pkey:["yZZZxVNiOjM4qj37cnZmOhpm"]}}],[Qe.Content_4,{client:{pkey:["7DEh5436UHnmeKGzVXQVsvRk"]},server:{pkey:["4mtr3RYgMDNCr8MiQN6QNN7A"]}}],[Qe.Content_5,{client:{pkey:["ZWVmSVe4txKlxxCQoqMcGIus"]},server:{pkey:["EWFEzPp8DyciUpd7S2IbClhb"]}}],[Qe.Content_6,{client:{pkey:["T3CRI7sep8LYNDkOrvgSZUPQ"]},server:{pkey:["19cNdBQ7O8p6vuuVMO7qDAlj"]}}],[Qe.Content_7,{client:{pkey:["T4LKxfIKZJCqFzBemjae6MGu"]},server:{pkey:["GXckyQRgDUWb23RX4J75FZxG"]}}],[Qe.Content_8,{client:{pkey:["TIHmP6MqapPY4RpbkOm3pYpV"]},server:{pkey:["SQZkIoibuQubwnJWlqMB0wyD"]}}],[Qe.Content_9,{client:{pkey:["mBGMr6mqftj8c2qcQky6UjEB"]},server:{pkey:["C0WBeOXHffjxuUxTVCV95pEe"]}}],[Qe.Footer_1,{client:{pkey:["B1C8tQAkMN7kpCuxh1hW6CY8"]},server:{pkey:["47ay7QLdBDSeZxqhcmhI1GCJ"]}}],[Qe.Header_1,{client:{pkey:["jStKXZxN8Ccuf6XS4dKqhKr9"]},server:{pkey:["m9Fpkq4iFy20pGMo6N3MIo5s"]}}],[Qe.Header_2,{client:{pkey:["TJx2N6gevlYeFawnBbRy4gRl"]},server:{pkey:["oRnFtrhEhljXqLbZoTCwLhKI"]}}],[Qe.Recipe_1,{client:{pkey:["lklI3sAvIozfaIGNQGORtPOR"]},server:{pkey:["3T7FySyUW1tYZTIj40NTh1v7"]}}],[Qe.Recipe_2,{client:{pkey:["nWhVYiRycgz0snwL4hTcS3vA"]},server:{pkey:["KHkUCj4p7S5QUtqs4PHAL6Wm"]}}],[Qe.Recipe_3,{client:{pkey:["XTsNJ5wTa3CksG40rnRNHiib"]},server:{pkey:["5l5aa7MPO4kmL72O9HPJh09l"]}}],[Qe.Recipe_4,{client:{pkey:["BpO7D8zDzdyGmFUOGNcRhUUm"]},server:{pkey:["F0iZGMeqWPGsxl3T89ciqsoa"]}}],[Qe.Sidebar_1,{client:{pkey:["1BptSVedVseFELcEHmSjZmDr"]},server:{pkey:["FERgtCkBYYJlLAMdOfrwzSUv"]}}],[Qe.Sidebar_2,{client:{pkey:["TAk15aJmBw3jMFoV9vSYYWLl"]},server:{pkey:["M0ETJ1WkxrBImmFZBDafhwfv"]}}],[Qe.Sidebar_3,{client:{pkey:["oSwBRQCb6174NZ0wDEyxZW9E"]},server:{pkey:["y0G8OyxjMjcTCOA0A8teaect"]}}],[Qe.Sidebar_4,{client:{pkey:["UMKQPvhCYMOH1sOPVdYEDEQt"]},server:{pkey:["UnGAf9ltEFV09DpREkqrEpK0"]}}],[Qe.Sidebar_5,{client:{pkey:["WdPWJ92IfPqKgO5vRXvlsDO4"]},server:{pkey:["hd3wbcwtoeg0OfouZfTDIfTD"]}}],[Qe.Sidebar_9,{client:{pkey:["k8W1t71k8qmkYsiK4v3pop6j"]},server:{pkey:["TDRVoNcJZQhrS1VJr0Qq6xq9"]}}],[Qe.Video_StickyOutstream_1,{client:{pkey:["qKjlCz8NOStHzB15G18scbgS"]},server:{pkey:["RUx5hQX5rX4bhGZWzZ0ta4op"]}}]]),w_=new Map([[et.Video_Collapse_Autoplay_SoundOff,{client:{pkey:["I5VjN89qESPMegBdpCt92W8S"]},server:{pkey:["pQwHn4uCAr3kQ8SE9qjIzMtV"]}}],[et.Video_Coll_SOff_Smartphone,{client:{pkey:["iZXbFkwkNrOgpI7ue8o3mJda"]},server:{pkey:["8EIqVDI1c2TA7IKq8rLk6oRG"]}}],[et.Video_In_Post_ClicktoPlay_SoundOn,{client:{pkey:["sMLWZBQNa6GaKC2khQiIg5Tj","yHkEhAMj24ubV101Fklbp6fA"]},server:{pkey:["XQu5Rud4EL34FXVySow4WkgR"]}}],[et.Video_Individual_Autoplay_SOff,{client:{pkey:["GCV9Do84nDBEFaVjb507H4iE","6lY8mDlZX6W7ijhbh6OuDCfj"]},server:{pkey:["uUSzUB6i3CeQ2y1A514w2lxL"]}}]]);class k_ extends Og{getBannerSlotBidRequests(e){const t=T_.get(e.placementMapName);if(t&&e.location!==Qe.Video_StickyOutstream)return this._getBidParams(t)}getOutstreamSlotBidRequests(e){const t=T_.get(e.placementMapName);if(t&&e.location===Qe.Video_StickyOutstream)return this._getBidParams(t)}getVideoSlotBidRequests(e){const t=[];return this._bidders.forEach((i=>{const s=i.pbsHost;w_.get(e.name)[i.type].pkey.forEach((e=>{t.push({bidder:i.name,params:{pkey:e},...s&&{pbsHost:s}})}))})),t}_getBidParams(e){const t=[];return this._bidders.forEach((i=>{e[i.type].pkey.forEach((e=>{const s=i.pbsHost;t.push({bidder:i.name,params:{pkey:e},...s&&{pbsHost:s}})}))})),t}constructor(e){super(e),this.bidderConfig=this._config.partners.getBidderConfig(te.Sharethrough),this.adapterName=te.Sharethrough,this.serverBidderCode=te.SharethroughServer,this.additionalServerBidderCodes=[te.SharethroughAY],this.gvlid=80,this.videoCreativeIds=[["138377683089",te.Sharethrough],["138377670131",te.Sharethrough],["138377670158",te.Sharethrough],["138377670173",te.Sharethrough],["138378141751",te.Sharethrough],["138377670161",te.Sharethrough],["138377670167",te.Sharethrough],["138377670170",te.Sharethrough],["138377670209",te.Sharethrough],["138377670212",te.Sharethrough],["138377670224",te.Sharethrough],["138377669645",te.Sharethrough],["138377670218",te.Sharethrough],["138377670221",te.Sharethrough],["138378141754",te.Sharethrough],["138377670215",te.Sharethrough]],this.videoServerCreativeIds=[["138495437207",te.SharethroughServer],["138495437120",te.SharethroughServer],["138495437117",te.SharethroughServer],["138495437114",te.SharethroughServer],["138495437111",te.SharethroughServer],["138495437087",te.SharethroughServer],["138495437057",te.SharethroughServer],["138495142563",te.SharethroughServer]]}}k_=B([bn("SharethroughBidder"),D(),j("design:type",Function),j("design:paramtypes",[void 0===_c?Object:_c])],k_);class A_ extends Og{lazyActiveTypes(e,t){if(!e.lazy)return!1;return[Qe.Content,Qe.Recipe,Qe.Below_Post].includes(e.location)&&["interscroller","miniscroller"].includes(t)}createBitArrayAdOptions(e,t=!1){const i=Ki()?this._deviceAdTypes.mobile:this._deviceAdTypes.desktop,s=["1","0","0","0"],n=this._adUnitsMap.get(e.placementMapName);return this._adTypeBitIndexMap.forEach(((r,a)=>{const o=r.adType;i.includes(o)&&this._config.adTypes.has(o)&&(n.includes(o)||this.lazyActiveTypes(e,o))&&(s[r.index]="outstream"===a?t&&this._mediaType.outstreamEnabled(e).outstreamCapable?"1":"0":"1")})),s}getBannerSlotBidRequests(e){if(this._adUnitsMap.has(e.placementMapName)){const t=this.createBitArrayAdOptions(e),i=this._placementIdMap.get(t.join(""));return[{bidder:this.name,params:{placementId:i.id,pageId:this._pageId}}]}}getOutstreamSlotBidRequests(e){if(this._adUnitsMap.has(e.placementMapName)){const t=this.createBitArrayAdOptions(e,!0),i=this._placementIdMap.get(t.join(""));return[{bidder:this.name,...this._addBidLabel(e.placementMapName,{outstreamCapable:e.location!==Qe.Video_StickyOutstream}),params:{placementId:i.id,pageId:this._pageId}}]}}constructor(e,t){super(e),this._mediaType=t,this.bidderConfig=this._config.partners.getBidderConfig(te.Teads),this._pageId=112062,this._adTypeBitIndexMap=new Map([["outstream",{adType:Ki()?"outstreamMobile":"outstreamDesktop",index:1}],["miniscroller",{adType:"miniscroller",index:2}],["interscroller",{adType:"interscroller",index:3}]]),this._adUnitsMap=new Map([[Qe.Below_Post,[]],[Qe.Content_1,["outstreamDesktop","outstreamMobile","miniscroller","interscroller"]],[Qe.Content_2,["miniscroller","interscroller"]],[Qe.Content_3,["outstreamDesktop","outstreamMobile","miniscroller","interscroller"]],[Qe.Content_4,["miniscroller","interscroller"]],[Qe.Content_5,["outstreamDesktop","outstreamMobile","miniscroller","interscroller"]],[Qe.Content_6,["miniscroller","interscroller"]],[Qe.Content_7,["miniscroller","interscroller"]],[Qe.Content_8,["miniscroller","interscroller"]],[Qe.Content_9,["miniscroller","interscroller"]],[Qe.Footer_1,[]],[Qe.Header_1,[]],[Qe.Header_2,[]],[Qe.Recipe_1,["outstreamDesktop","outstreamMobile","miniscroller"]],[Qe.Recipe_2,["miniscroller"]],[Qe.Recipe_3,["miniscroller"]],[Qe.Recipe_4,["miniscroller"]],[Qe.Recipe_5,["miniscroller"]],[Qe.Sidebar_1,[]],[Qe.Sidebar_2,[]],[Qe.Sidebar_3,[]],[Qe.Sidebar_4,[]],[Qe.Sidebar_5,[]],[Qe.Sidebar_9,[]]]),this._deviceAdTypes={mobile:["outstreamMobile","interscroller","miniscroller"],desktop:["outstreamDesktop"]},this._placementIdMap=new Map([["1000",{id:121842}],["1001",{id:121836}],["1010",{id:121835}],["1011",{id:121840}],["1100",{id:121834}],["1101",{id:121838}],["1110",{id:121837}],["1111",{id:121895}]])}}A_=B([bn("TeadsBidder"),D(),j("design:type",Function),j("design:paramtypes",[void 0===_c?Object:_c,void 0===Hm?Object:Hm])],A_);const I_=new Map([[Qe.Interstitial_1,{desktop:{adTypes:[]},mobile:{adTypes:[]}}],[Qe.Below_Post,{desktop:{adTypes:["nativeDesktopBelowPost"],sizes:[[728,250],[728,90]]},mobile:{adTypes:["nativeMobileBelowPost"],sizes:[[300,250],[320,100]]}}],[Qe.Content_1,{desktop:{adTypes:["nativeDesktopContent"]},mobile:{adTypes:["nativeMobileContent"]}}],[Qe.Content_2,{desktop:{adTypes:["nativeDesktopContent"]},mobile:{adTypes:["nativeMobileContent"]}}],[Qe.Content_3,{desktop:{adTypes:["nativeDesktopContent"]},mobile:{adTypes:["nativeMobileContent"]}}],[Qe.Content_4,{desktop:{adTypes:["nativeDesktopContent"]},mobile:{adTypes:["nativeMobileContent"]}}],[Qe.Content_5,{desktop:{adTypes:["nativeDesktopContent"]},mobile:{adTypes:["nativeMobileContent"]}}],[Qe.Content_6,{desktop:{adTypes:["nativeDesktopContent"]},mobile:{adTypes:["nativeMobileContent"]}}],[Qe.Content_7,{desktop:{adTypes:["nativeDesktopContent"]},mobile:{adTypes:["nativeMobileContent"]}}],[Qe.Content_8,{desktop:{adTypes:["nativeDesktopContent"]},mobile:{adTypes:["nativeMobileContent"]}}],[Qe.Content_9,{desktop:{adTypes:["nativeDesktopContent"]},mobile:{adTypes:["nativeMobileContent"]}}],[Qe.Footer_1,{desktop:{adTypes:[]},mobile:{adTypes:[]}}],[Qe.Header_1,{desktop:{adTypes:["nativeDesktopHeader"],sizes:[[970,250],[728,90]]},mobile:{adTypes:["nativeMobileHeader"],sizes:[[320,100]]}}],[Qe.Header_2,{desktop:{adTypes:["nativeDesktopHeader"],sizes:[[970,250],[728,90]]},mobile:{adTypes:["nativeMobileHeader"],sizes:[[320,100]]}}],[Qe.Recipe_1,{desktop:{adTypes:["nativeDesktopRecipe"]},mobile:{adTypes:["nativeMobileRecipe"]}}],[Qe.Recipe_2,{desktop:{adTypes:["nativeDesktopRecipe"]},mobile:{adTypes:["nativeMobileRecipe"]}}],[Qe.Recipe_3,{desktop:{adTypes:["nativeDesktopRecipe"]},mobile:{adTypes:["nativeMobileRecipe"]}}],[Qe.Recipe_4,{desktop:{adTypes:["nativeDesktopRecipe"]},mobile:{adTypes:["nativeMobileRecipe"]}}],[Qe.Recipe_5,{desktop:{adTypes:["nativeDesktopRecipe"]},mobile:{adTypes:["nativeMobileRecipe"]}}],[Qe.Sidebar_1,{desktop:{adTypes:["nativeDesktopSidebar"]},mobile:{adTypes:[]}}],[Qe.Sidebar_2,{desktop:{adTypes:["nativeDesktopSidebar"]},mobile:{adTypes:[]}}],[Qe.Sidebar_3,{desktop:{adTypes:["nativeDesktopSidebar"]},mobile:{adTypes:[]}}],[Qe.Sidebar_4,{desktop:{adTypes:["nativeDesktopSidebar"]},mobile:{adTypes:[]}}],[Qe.Sidebar_5,{desktop:{adTypes:["nativeDesktopSidebar"]},mobile:{adTypes:[]}}],[Qe.Sidebar_9,{desktop:{adTypes:["nativeDesktopSidebar"]},mobile:{adTypes:[]}}],[Qe.Video_StickyOutstream_1,{desktop:{adTypes:[]},mobile:{adTypes:[]}}]]),x_=new Map([[et.Video_Collapse_Autoplay_SoundOff,{client:"AdThriveRON_instream_desktopcollapse_prebid_c2s",server:"AdThriveRON_instream_desktopcollapse_prebid"}],[et.Video_Coll_SOff_Smartphone,{client:"AdThriveRON_instream_mwebsticky_prebid_c2s",server:"AdThriveRON_instream_mwebsticky_prebid"}],[et.Video_In_Post_ClicktoPlay_SoundOn,{client:"AdThriveRON_instream_CTP_prebid_c2s",server:"AdThriveRON_instream_CTP_prebid"}],[et.Video_Individual_Autoplay_SOff,{client:"AdThriveRON_instream_contextcollapse_prebid_c2s",server:"AdThriveRON_instream_contextcollapse_prebid"}]]);class P_ extends Og{_getSharedSlotBidRequests(e){const t=this._mediaType.outstreamEnabled(e).outstreamCapable&&e.location!==Qe.Video_StickyOutstream,i=Ki()?"mobile":"desktop",s=this._deviceAdTypes[i].filter((e=>this._config.adTypes.has(e))),n=[];if(I_.has(e.placementMapName)){let r=e.location===Qe.Interstitial?Qe.Interstitial.toLowerCase():"standard";const a=I_.get(e.placementMapName)[i];a.adTypes.forEach((e=>{s.includes(e)&&(r=e)}));const o=this._getInventoryCode(r,e,a.sizes);this._bidders.forEach((i=>{o.forEach((s=>{const r=this._addBidLabel(e.placementMapName,{outstreamCapable:t&&s.indexOf("hive")>-1}),a=i.pbsHost;n.push({bidder:i.name,...r,params:{inventoryCode:`${s}${"server"===i.type?"_pbs2s":""}`},...a&&{pbsHost:a}})}))}))}return n}getBannerSlotBidRequests(e){return this._getSharedSlotBidRequests(e)}getOutstreamSlotBidRequests(e){return this._getSharedSlotBidRequests(e)}getMultiFormatBannerNativeSlotBidRequests(e){return e.multiformatOutstream?[]:this._getSharedSlotBidRequests(e)}getMultiFormatBannerVideoSlotBidRequests(e){return this._getSharedSlotBidRequests(e)}_isOutstreamAndContentCapable(e){return"Content"===e.location&&this._mediaType.outstreamEnabled(e).outstreamCapable}_getLargeFormatPlacements(e,t){let i="";const s="mobile"===t,n=e.location===Qe.Content&&s,r=s?this._config.adTypes.largeFormatsMobile:this._config.adTypes.largeFormatsDesktop;return n&&r&&(i=`adthriveron_${e.location.toLowerCase()}_${t}_largeformat_opt_in`),i}_stripSlotString(e){return e.replace(/_(?!.*_)/,"")}_getInventoryCode(e,t,i){const s=Ki()?"mobile":"desktop",n=[],r="standard"===e||this._standardInclusionAdTypes.includes(e),a=t.location.toLowerCase(),o=t.placementMapName===Qe.Content_1||t.placementMapName===Qe.Sidebar_9?a:this._stripSlotString(t.placementMapName.toLowerCase()),l=this._getLargeFormatPlacements(t,s);if(r){const e=t.placementMapName===Qe.Below_Post?Qe.Below_Post_1:t.placementMapName,i=t.placementMapName===Qe.Video_StickyOutstream_1?`_${s}`:"";n.push(`adthrive_${e.toLowerCase()}${i}_hdx`)}else"interstitial"===e?n.push("adthriveron_interstitial_multisize"):n.push(`adthrive${this._category}_${o}_fixed_${s}`);if(i){const e=this._stripSlotString(a);i.filter((e=>t.sizes.some((([t,i])=>t===e[0]&&i===e[1])))).forEach((t=>{n.push(`adthriveron_${e}_${s}_${t[0]}x${t[1]}`)}),[])}return l&&n.push(l),this._isOutstreamAndContentCapable(t)&&n.push(`adthriveron_${a}_${s}_hive`),n}_getVideoBidParams(e,t,i,s){var n,r,a;return{bidder:e,params:{inventoryCode:i,video:{...Bi()?{w:640,h:360}:{w:400,h:225},api:this._config.video.apiValue,mimes:this._config.video.mimeType,..."all"===(null==(n=this._config.video.videoProtocols)?void 0:n.scope)&&{protocols:this._config.video.videoProtocols.protocols},playbackmethod:null==(a=this._config.video.playbackmethod)||null==(r=a.get(t.name))?void 0:r[0],pos:this._config.video.position.id}},...s&&{pbsHost:s}}}getVideoSlotBidRequests(e){const t=[];return x_.has(e.name)&&this._bidders.forEach((i=>{t.push(this._getVideoBidParams(i.name,e,x_.get(e.name)[i.type],i.pbsHost))})),t}_getCategory(){const e=this._config.site.verticals.filter((e=>this._verticalCategoryMap.has(e))).map((e=>this._verticalCategoryMap.get(e)));for(const t of this._categoryPriorityList)if(e.includes(t))return t}constructor(e,t){super(e),this._mediaType=t,this.multiformatBidder=!0,this.multiformatBannerVideoBidder=!0,this.bidderConfig=this._config.partners.getBidderConfig(te.Triplelift),this.adapterName=te.Triplelift,this.serverBidderCode=te.TripleliftServer,this.additionalServerBidderCodes=[te.TripleliftAY],this.gvlid=28,this.videoCreativeIds=[["138323510289",te.Triplelift],["138323472959",te.Triplelift],["138323472731",te.Triplelift],["138323472671",te.Triplelift],["138323472641",te.Triplelift],["138323473061",te.Triplelift],["138323473058",te.Triplelift],["138323473019",te.Triplelift],["138323473016",te.Triplelift],["138323472986",te.Triplelift],["138323472734",te.Triplelift],["138323473064",te.Triplelift],["138323473055",te.Triplelift],["138323472728",te.Triplelift],["138323472674",te.Triplelift],["138323472737",te.Triplelift],["138326649881",te.Triplelift],["138326691825",te.Triplelift],["138326691828",te.Triplelift],["138326691831",te.Triplelift],["138326691834",te.Triplelift],["138326691837",te.Triplelift],["138326691840",te.Triplelift],["138326691843",te.Triplelift],["138326691846",te.Triplelift],["138326691783",te.Triplelift],["138326691786",te.Triplelift],["138326691789",te.Triplelift],["138326691792",te.Triplelift],["138326691753",te.Triplelift],["138326691756",te.Triplelift],["138326691570",te.Triplelift]],this.videoServerCreativeIds=[["138348653814",te.TripleliftServer],["138348654438",te.TripleliftServer],["138349054156",te.TripleliftServer],["138349054168",te.TripleliftServer],["138349054201",te.TripleliftServer],["138348654432",te.TripleliftServer],["138348654444",te.TripleliftServer],["138349054186",te.TripleliftServer],["138349054204",te.TripleliftServer],["138349054210",te.TripleliftServer],["138349054435",te.TripleliftServer],["138349054189",te.TripleliftServer],["138349054207",te.TripleliftServer],["138349054426",te.TripleliftServer],["138349054429",te.TripleliftServer],["138349054432",te.TripleliftServer]],this._standardInclusionAdTypes=["nativeMobileHeader","nativeMobileBelowPost","nativeDesktopHeader","nativeDesktopBelowPost"],this.settings={adserverTargeting:[{key:"hb_attr",val:({mediaType:e,meta:t,tl_source:i})=>{let s=t&&t.mediaType||this.tlSourceMap.get(i||"")||e;return("banner"===e&&"video"===(null==t?void 0:t.mediaType)||(null==t?void 0:t.isInBannerVideo))&&(s="ibv"),s}}]},this.tlSourceMap=new Map([["hdx","banner"],["tlx","native"]]),this._verticalCategoryMap=new Map([["Baby","family"],["Family and Parenting","family"],["Natural Parenting","family"],["Pregnancy","family"],["Toddler","family"],["Personal Finance","finance"],["Professional Finance","finance"],["Deals","finance"],["Clean Eating","food"],["Food","food"],["Crafts","home"],["Gardening","home"],["Green Living","home"],["Home Decor and Design","home"],["Pets","home"],["Travel","travel"],["News","news"],["Lifestyle","lifestyle"],["Beauty","lifestyle"],["Other","lifestyle"],["Health and Fitness","health"],["Entertainment","entertainment"],["Sports","sports"],["Womens Style","womensstyle"],["Mens Style and Grooming","mensstyle"],["Tech","tech"],["Wedding","wedding"],["Auto","auto"]]),this._categoryPriorityList=new Set(["food","home","family","finance","travel","news","health","entertainment","sports","womensstyle","mensstyle","tech","wedding","auto","lifestyle"]),this._category=Si(this._getCategory(),"lifestyle"),this._deviceAdTypes={mobile:["nativeMobileContent","nativeMobileRecipe","nativeMobileHeader","nativeMobileBelowPost"],desktop:["nativeDesktopContent","nativeDesktopRecipe","nativeDesktopSidebar","nativeDesktopHeader","nativeDesktopBelowPost"]}}}P_=B([bn("TripleLiftBidder"),D(),j("design:type",Function),j("design:paramtypes",[void 0===_c?Object:_c,void 0===Hm?Object:Hm])],P_);class O_ extends Og{getBannerSlotBidRequests(e){if(this._set.has(e.placementMapName)&&e.location!==Qe.Video_StickyOutstream)return this._getBidParams(e)}getOutstreamSlotBidRequests(e){if(this._set.has(e.placementMapName))return this._getBidParams(e,e.location!==Qe.Video_StickyOutstream)}getVideoSlotBidRequests(e){if(this._set.has(e.name)){const t=`${e.name}`;return[{bidder:this.name,params:{publisherId:this._config.site.id,siteId:this._config.site.id,placementId:t,supplySourceId:"cafemedia"}}]}}_getBidParams(e,t=!1){const i=e.id,s=new RegExp(`_${this._device}`);return[{bidder:this.name,...this._addBidLabel(e.placementMapName,{outstreamCapable:t}),params:{publisherId:this._config.site.id,siteId:this._config.site.id,placementId:i.replace(s,""),supplySourceId:"cafemedia"}}]}constructor(e,t){super(e),this._context=t,this.bidderConfig=this._config.partners.getBidderConfig(te.TTD),this.videoCreativeIds=[["138323472896",te.TTD],["138323532681",te.TTD],["138323532645",te.TTD],["138323532675",te.TTD],["138323532678",te.TTD],["138323922211",te.TTD],["138323530488",te.TTD],["138323532606",te.TTD],["138323532648",te.TTD],["138323922202",te.TTD],["138323532672",te.TTD],["138323922205",te.TTD],["138323922010",te.TTD],["138323922208",te.TTD],["138323532642",te.TTD],["138323921998",te.TTD]],this._device=this._context.device,this._set=new Set([Qe.Below_Post,Qe.Content_1,Qe.Content_2,Qe.Content_3,Qe.Content_4,Qe.Content_5,Qe.Content_6,Qe.Content_7,Qe.Content_8,Qe.Content_9,Qe.Footer_1,Qe.Header_1,Qe.Recipe_1,Qe.Recipe_2,Qe.Recipe_3,Qe.Recipe_4,Qe.Sidebar_1,Qe.Sidebar_2,Qe.Sidebar_3,Qe.Sidebar_4,Qe.Sidebar_5,Qe.Sidebar_9,Qe.Video_StickyOutstream_1,et.Video_Collapse_Autoplay_SoundOff,et.Video_Coll_SOff_Smartphone,et.Video_In_Post_ClicktoPlay_SoundOn,et.Video_Individual_Autoplay_SOff])}}O_=B([bn("TTDBidder"),D(),j("design:type",Function),j("design:paramtypes",[void 0===_c?Object:_c,void 0===Fr?Object:Fr])],O_);class R_ extends Og{getBannerSlotBidRequests(e){const t=(Ki()?this._deviceAdTypes.mobile:this._deviceAdTypes.desktop).filter((e=>this._config.adTypes.has(e)));if(this._map.has(e.placementMapName))return this._map.get(e.placementMapName).filter((({adType:i,mobileCollapsePlayer:s,size:n})=>(!i&&n.some((t=>e.hasSize(t)))||i&&t.includes(i))&&(!s||!this._config.video.mobileStickyPlayerOnPage))).map((({placementId:i,size:s,highViewability:n,adType:r})=>({bidder:this.name,...this._addBidLabel(e.placementMapName,{refresh:n&&e.viewabilitye.hasSize(i)||r&&t.includes(r)))}})))}constructor(e){super(e),this.bidderConfig=this._config.partners.getBidderConfig(te.Undertone),this._params={publisherId:2002},this._deviceAdTypes={mobile:["animatedFooter","expandableFooter","interscroller","miniscroller"],desktop:[]},this._map=new Map([[Qe.Below_Post,[{placementId:"2002034",size:[[1,2]],adType:"interscroller",highViewability:!0}]],[Qe.Content_1,[{placementId:"2002001",size:[[1,2]],adType:"interscroller"},{placementId:"2002002",size:[[1,2],[300,250],[728,90]]}]],[Qe.Content_2,[{placementId:"2002003",size:[[1,2],[300,250],[728,90]]}]],[Qe.Content_3,[{placementId:"2002004",size:[[1,2],[300,250],[728,90]]}]],[Qe.Content_4,[{placementId:"2002005",size:[[1,2],[300,250],[728,90]]}]],[Qe.Footer_1,[{placementId:"2002033",size:[[320,50]],adType:"expandableFooter"},{placementId:"2002038",size:[[1,1]],adType:"expandableFooter",mobileCollapsePlayer:!0},{placementId:"2002039",size:[[1,1]],adType:"animatedFooter"}]],[Qe.Interstitial_1,[{placementId:"2002040",size:[[1,1]]}]],[Qe.Sidebar_9,[{placementId:"2002032",size:[[300,250],[160,600],[300,600]]}]]])}}R_=B([bn("UndertoneBidder"),M(),j("design:type",Function),j("design:paramtypes",[void 0===_c?Object:_c])],R_);class L_ extends Og{getVideoSlotBidRequests(e){if(this._videoMap.has(e.name))return this._bidders.map((t=>{const i=t.pbsHost;return{bidder:t.name,params:{publisherId:this._params.publisherId,placementId:this._videoMap.get(e.name).placementId},...i&&{pbsHost:i}}}))}constructor(e){super(e),this.gvlid=677,this.bidderConfig=this._config.partners.getBidderConfig(te.UndertoneServer),this.adapterName=te.Undertone,this.serverBidderCode=te.UndertoneServer,this.additionalServerBidderCodes=[te.UndertoneAY],this.videoCreativeIds=[["138422425195",te.UndertoneServer],["138421771020",te.UndertoneServer],["138421771017",te.UndertoneServer],["138421771014",te.UndertoneServer],["138421761770",te.UndertoneServer],["138421761767",te.UndertoneServer],["138421761764",te.UndertoneServer],["138421761761",te.UndertoneServer]],this._params={publisherId:2002},this._videoMap=new Map([[et.Video_Collapse_Autoplay_SoundOff,{placementId:2002044}],[et.Video_Coll_SOff_Smartphone,{placementId:2002045}]])}}L_=B([bn("UndertoneServerBidder"),D(),j("design:type",Function),j("design:paramtypes",[void 0===_c?Object:_c])],L_);class D_ extends Og{_getBids(){return this._bidders.map((e=>{const t=e.pbsHost;return{bidder:e.name,params:{...this._params},...t&&{pbsHost:t}}}))}getBannerSlotBidRequests(){return this._getBids()}getVideoSlotBidRequests(){return this._getBids()}constructor(e){super(e),this.bidderConfig=this._config.partners.getBidderConfig(te.Unruly),this.serverBidderCode=te.Unruly,this.additionalServerBidderCodes=[te.UnrulyAY],this.videoCreativeIds=[["138398568419",te.Unruly],["138398715243",te.Unruly],["138398716629",te.Unruly],["138398716632",te.Unruly],["138398716656",te.Unruly],["138398716659",te.Unruly],["138398716662",te.Unruly],["138398716665",te.Unruly],["138398716683",te.Unruly],["138398716686",te.Unruly],["138398716689",te.Unruly],["138398716692",te.Unruly],["138398716695",te.Unruly],["138398716698",te.Unruly],["138398716701",te.Unruly],["138398716704",te.Unruly]],this._params={siteId:249232}}}D_=B([bn("UnrulyBidder"),D(),j("design:type",Function),j("design:paramtypes",[void 0===_c?Object:_c])],D_);const M_=new Map([[et.Video_Collapse_Autoplay_SoundOff,{client:"8a96941a017e7e91c49492261bdf000c",server:"8a9695b901888852d78e6cde78c2003e"}],[et.Video_Coll_SOff_Smartphone,{client:"8a9690ee017e7e91bee0922682f1000b",server:"8a9698af01888852cc626cde79b3002e"}],[et.Video_In_Post_ClicktoPlay_SoundOn,{client:"8a969951017e7e91ba38923576c20011",server:"8a9695b901888852d78e6cde7a3b003f"}],[et.Video_Individual_Autoplay_SOff,{client:"8a969951017e7e91ba389236dc470014",server:"8a9691d801888852d23d6cde79390031"}]]),B_={desktop:new Map([[Qe.Content_1,[{size:[300,250],id:"8a969d580177771bc13c20458198007e"},{size:[728,90],id:"8a96918c0177771bc65220467ff60092"}]],[Qe.Content_2,[{size:[300,250],id:"8a96918c0177771bc652204531fe0091"}]],[Qe.Content_3,[{size:[300,250],id:"8a9694d00177771bcae220463a710058"}]],[Qe.Footer_1,[{size:[728,90],id:"8a9694d00177771bcae21c6a7d880025"},{size:[970,90],id:"8a969d580177771bc13c2046cd280081"},{size:[320,50],id:"8a9694d00177771bcae2204408520056"}]],[Qe.Header_1,[{size:[728,90],id:"8a969d580177771bc13c2045cac4007f"}]],[Qe.Interstitial_1,[{size:[300,250],id:"8a969449017c7c9d384d9f8170b10066"},{size:[300,600],id:"8a969449017c7c9d384d9f80b9970064"},{size:[320,480],id:"8a969958017c7c9d2d8a9f812d360081"},{size:[336,280],id:"8a969449017c7c9d384d9f80f2a20065"}]],[Qe.Sidebar_1,[{size:[300,250],id:"8a9694d00177771bcae2204449d80057"}]],[Qe.Sidebar_9,[{size:[320,50],id:"8a969d580177771bc13c2045ff6b0080"},{size:[300,600],id:"8a96918c0177771bc6522043c8540090"},{size:[160,600],id:"8a969d580177771bc13c2044ea91007d"},{size:[300,250],id:"8a96918c0177771bc6521c6b5f4e003f"}]],[Qe.Recipe_1,[{size:[300,250],id:"8a9694d00177771bcae21c6bc7e80027"}]],[Qe.Recipe_2,[{size:[300,250],id:"8a969d580177771bc13c2044ac08007c"}]],[Qe.Video_StickyOutstream_1,[{size:[300,250],id:"8a969d87017b7be074aae07a22b70005"}]]]),mobile:new Map([[Qe.Content_1,[{size:[300,250],id:"8a969d580177771bc13c2048bd0e0085"},{size:[320,50],id:"8a969d580177771bc13c204b68670088"}]],[Qe.Content_2,[{size:[300,250],id:"8a96918c0177771bc652204877c50094"},{size:[320,50],id:"8a96918c0177771bc652204b257e0097"}]],[Qe.Content_3,[{size:[300,250],id:"8a96918c0177771bc6522048f24e0095"}]],[Qe.Content_4,[{size:[300,250],id:"8a9694d00177771bcae220497831005a"}]],[Qe.Content_5,[{size:[300,250],id:"8a969d580177771bc13c204a5f240087"}]],[Qe.Content_6,[{size:[300,250],id:"8a9694d00177771bcae2204a9092005c"}]],[Qe.Footer_1,[{size:[320,100],id:"8a96918c0177771bc652204a27cb0096"},{size:[300,50],id:"8a9694d00177771bcae22049449a0059"},{size:[728,90],id:"8a9694d00177771bcae2204ad481005d"},{size:[320,50],id:"8a969d580177771bc13c20480cf50084"}]],[Qe.Interstitial_1,[{size:[300,250],id:"8a969161017c7c9d32879f82491c007d"},{size:[300,600],id:"8a969161017c7c9d32879f8195b3007c"},{size:[320,480],id:"8a969958017c7c9d2d8a9f81f2c50082"},{size:[336,280],id:"8a969449017c7c9d384d9f81c5660067"},{size:[320,50],id:"8a969449017c7c9d384d9f8279950068"}]],[Qe.Recipe_1,[{size:[300,250],id:"8a96918c0177771bc6522048483a0093"}]],[Qe.Recipe_2,[{size:[300,250],id:"8a9694d00177771bcae22049e596005b"}]],[Qe.Recipe_3,[{size:[300,250],id:"8a969d580177771bc13c2049b47f0086"}]],[Qe.Video_StickyOutstream_1,[{size:[300,50],id:"8a969d87017b7be074aae07a22b70005"}]]])},F_={desktop:new Map([[Qe.Content_1,[{size:[300,250],id:"8a9698af01888852cc626cdc9c8a0024"},{size:[728,90],id:"8a9698af01888852cc626cdca2ac0026"}]],[Qe.Content_2,[{size:[300,250],id:"8a9695b901888852d78e6cdc9c0a0036"}]],[Qe.Content_3,[{size:[300,250],id:"8a9698af01888852cc626cdc9e100025"}]],[Qe.Footer_1,[{size:[728,90],id:"8a9691d801888852d23d6cdc9b7e0027"},{size:[970,90],id:"8a9695b901888852d78e6cdc9fb40039"},{size:[320,50],id:"8a9691d801888852d23d6cdc9f220029"}]],[Qe.Header_1,[{size:[728,90],id:"8a9691d801888852d23d6cdca335002a"}]],[Qe.Interstitial_1,[{size:[300,250],id:"8a969449017c7c9d384d9f8170b10066"},{size:[300,600],id:"8a969449017c7c9d384d9f80b9970064"},{size:[320,480],id:"8a969958017c7c9d2d8a9f812d360081"},{size:[336,280],id:"8a969449017c7c9d384d9f80f2a20065"}]],[Qe.Sidebar_1,[{size:[300,250],id:"8a9695b901888852d78e6cdc9a960035"}]],[Qe.Sidebar_9,[{size:[320,50],id:"8a9695b901888852d78e6cdca1b7003a"},{size:[300,600],id:"8a9698af01888852cc626cdc9b0e0023"},{size:[160,600],id:"8a9698af01888852cc626cdca3db0027"},{size:[300,250],id:"8a9691d801888852d23d6cdc9cfd0028"}]],[Qe.Recipe_1,[{size:[300,250],id:"8a9695b901888852d78e6cdc9d800037"}]],[Qe.Recipe_2,[{size:[300,250],id:"8a9695b901888852d78e6cdc9ea70038"}]],[Qe.Video_StickyOutstream_1,[{size:[300,250],id:"8a9695b901888852d78e6ce0245f0040"}]]]),mobile:new Map([[Qe.Content_1,[{size:[300,250],id:"8a9698af01888852cc626cdca59d0028"},{size:[320,50],id:"8a9698af01888852cc626cdca7a8002a"}]],[Qe.Content_2,[{size:[300,250],id:"8a9695b901888852d78e6cdca71a003c"},{size:[320,50],id:"8a9695b901888852d78e6cdca952003d"}]],[Qe.Content_3,[{size:[300,250],id:"8a9698af01888852cc626cdca8b7002b"}]],[Qe.Content_4,[{size:[300,250],id:"8a9691d801888852d23d6cdca525002c"}]],[Qe.Content_5,[{size:[300,250],id:"8a9698af01888852cc626cdcab10002d"}]],[Qe.Content_6,[{size:[300,250],id:"8a9691d801888852d23d6cdca44d002b"}]],[Qe.Footer_1,[{size:[320,100],id:"8a9698af01888852cc626cdca68b0029"},{size:[300,50],id:"8a9695b901888852d78e6cdca4b6003b"},{size:[728,90],id:"8a9691d801888852d23d6cdca60e002d"},{size:[320,50],id:"8a9691d801888852d23d6cdcab9a0030"}]],[Qe.Interstitial_1,[{size:[300,250],id:"8a969161017c7c9d32879f82491c007d"},{size:[300,600],id:"8a969161017c7c9d32879f8195b3007c"},{size:[320,480],id:"8a969958017c7c9d2d8a9f81f2c50082"},{size:[336,280],id:"8a969449017c7c9d384d9f81c5660067"},{size:[320,50],id:"8a969449017c7c9d384d9f8279950068"}]],[Qe.Recipe_1,[{size:[300,250],id:"8a9691d801888852d23d6cdcaa71002f"}]],[Qe.Recipe_2,[{size:[300,250],id:"8a9691d801888852d23d6cdca826002e"}]],[Qe.Recipe_3,[{size:[300,250],id:"8a9698af01888852cc626cdca9ed002c"}]],[Qe.Video_StickyOutstream_1,[{size:[300,50],id:"8a9695b901888852d78e6ce0245f0040"}]]])};class j_ extends Og{getBannerSlotBidRequests(e){return this._getBidParams(e)}getOutstreamSlotBidRequests(e){return this._getBidParams(e,!0)}getVideoSlotBidRequests(e){const t=[];return this._bidders.forEach((i=>{if(M_.has(e.name)){const s=i.pbsHost;t.push({bidder:i.name,params:{...this._params.video[i.type],pos:M_.get(e.name)[i.type]},...s&&{pbsHost:s}})}})),t}_getBidParams(e,t=!1){const i=[];return this._bidders.forEach((s=>{this._map="server"===s.type?F_[this._device]:B_[this._device],!this._map.has(e.placementMapName)||t&&e.location!==Qe.Video_StickyOutstream||this._map.get(e.placementMapName).filter((({size:t})=>e.hasSize(t))).forEach((({id:e})=>{const n=s.pbsHost;i.push({bidder:s.name,params:{...t?this._params.video[s.type]:this._params.display[s.type],pos:e},...n&&{pbsHost:n}})}))})),i}_setYahooMediaConfig(){this._prebidMethods.setConfig({yahoossp:{mode:"all"}})}constructor(e,t){super(e),this._prebidMethods=t,this.bidderConfig=this._config.partners.getBidderConfig(te.YahooSSP),this.adapterName=te.YahooSSP,this.serverBidderCode=te.YahooSSPServer,this.additionalServerBidderCodes=[te.YahooSSPAY],this.gvlid=25,this._device=Ki()?"mobile":"desktop",this._map=new Map,this.videoCreativeIds=[["138379204183",te.YahooSSP],["138378707447",te.YahooSSP],["138378707558",te.YahooSSP],["138378717711",te.YahooSSP],["138378717726",te.YahooSSP],["138378706907",te.YahooSSP],["138378706928",te.YahooSSP],["138378707468",te.YahooSSP],["138378707561",te.YahooSSP],["138378717720",te.YahooSSP],["138378717783",te.YahooSSP],["138378707552",te.YahooSSP],["138378717723",te.YahooSSP],["138378717780",te.YahooSSP],["138378717786",te.YahooSSP],["138378707555",te.YahooSSP]],this.videoServerCreativeIds=[["138437164046",te.YahooSSPServer],["138437164367",te.YahooSSPServer],["138437170553",te.YahooSSPServer],["138437192487",te.YahooSSPServer],["138437199522",te.YahooSSPServer],["138437199525",te.YahooSSPServer],["138437199528",te.YahooSSPServer],["138437854447",te.YahooSSPServer]],this._params={display:{client:{dcn:Ki()?"8a969d580177771bc13c2047d6290082":"8a9694d00177771bcae21c6941d30023"},server:{dcn:Ki()?"8a9691d801888852d23d6cda98130025":"8a9698af01888852cc626cda97350021"}},video:{client:{dcn:"8a969469017b7bdf59b2e07862af0281"},server:{dcn:"8a9695b901888852d78e6cda98760033"}}},this._setYahooMediaConfig()}}j_=B([bn("YahooSSPBidder"),D(),j("design:type",Function),j("design:paramtypes",[void 0===_c?Object:_c,void 0===Mn?Object:Mn])],j_);class N_ extends Og{getCreativeFormatId(e){const t=/creative_format_id":([0-9]*)/.exec(e);if(null!==t)return t[1]}isMiniScroller(e){return e.sequence&&this._config.adTypes.has("miniscroller")&&(e.location===Qe.Content||e.location===Qe.Recipe||e.lazy&&e.location===Qe.Below_Post)}isNative(e){const t={mobile:new Map([[Qe.Content,"nativeMobileContent"],[Qe.Recipe,"nativeMobileRecipe"]]),desktop:new Map([[Qe.Content,"nativeDesktopContent"],[Qe.Recipe,"nativeDesktopRecipe"],[Qe.Sidebar,"nativeDesktopSidebar"]])},i=Ki()?t.mobile:t.desktop;return e.sequence&&i.has(e.location)&&this._config.adTypes.has(i.get(e.location))}isOutstream(e){return this._mediaType.outstreamEnabled(e).outstreamCapable}isStickyOutstream(e){return e.location===Qe.Video_StickyOutstream}isMobileOutstreamSingleInstance(e){return Ki()&&e.placementMapName===Qe.Content_1&&this._mediaType.outstreamEnabled(e).outstreamCapable&&this._config.adTypes.has("outstreamMobile")&&!this._config.video.mobileStickyPlayerOnPage}createBitStringAdOptions(e,t=!1){let i=this._bannerMap.includes(e.placementMapName)?"1":"0";return i+=t&&this.isOutstream(e)?"1":"0",i+=this.isMiniScroller(e)?"1":"0",i+=this.isNative(e)?"1":"0",i+=t&&this.isMobileOutstreamSingleInstance(e)?"1":"0",i+=t&&this.isStickyOutstream(e)?"1":"0",i}getBannerSlotBidRequests(e){let t;const i=this.createBitStringAdOptions(e);if(this._adOptionsMap.has(i)){const e=this._adOptionsMap.get(i);t=e.id}return this._config.video.hasStickyOutstream||e.placementMapName!==Qe.Footer_1||(t="3457550240226157077"),this._bidders.map((e=>{const i=e.pbsHost;return{bidder:e.name,params:{placementId:t},...i&&{pbsHost:i}}}))}getOutstreamSlotBidRequests(e){const t=this.createBitStringAdOptions(e,!0);if(this._adOptionsMap.has(t)){const i=this._adOptionsMap.get(t);return this._bidders.map((t=>{const s=t.pbsHost;return{bidder:t.name,...this._addBidLabel(e.placementMapName,{outstreamCapable:e.location!==Qe.Video_StickyOutstream}),params:{placementId:i.id,...e.location===Qe.Video_StickyOutstream&&{video:{placement:2}}},...s&&{pbsHost:s}}}))}}getVideoSlotBidRequests(e){if(this._videoMap.has(e.name))return this.bidders.map((t=>{const i=t.pbsHost;return{bidder:t.name,params:{placementId:this._videoMap.get(e.name)},...i&&{pbsHost:i}}}))}constructor(e,t){super(e),this._mediaType=t,this.bidderConfig=this._config.partners.getBidderConfig(te.Yieldmo),this.serverBidderCode=te.Yieldmo,this.additionalServerBidderCodes=[te.YieldmoAY],this.videoCreativeIds=[["138463806447",te.Yieldmo],["138463975208",te.Yieldmo],["138463975223",te.Yieldmo],["138464489752",te.Yieldmo],["138464489758",te.Yieldmo],["138464489761",te.Yieldmo],["138464490757",te.Yieldmo],["138464490775",te.Yieldmo]],this.settings={adserverTargeting:[{key:"hb_attr",val:e=>{var t,i;let s=this._creativeFormatMap.get(this.getCreativeFormatId(e.ad))||e.mediaType;return("banner"===e.mediaType&&"video"===(null==(t=e.meta)?void 0:t.mediaType)||(null==(i=e.meta)?void 0:i.isInBannerVideo))&&(s="ibv"),s}}]},this._creativeFormatMap=new Map([["44","banner"],["47","banner"],["49","banner"],["50","banner"],["43","banner"],["17","banner"],["23","banner"],["33","banner"],["40","outstream"],["51","outstream"],["48","outstream"],["34","outstream"],["14","miniscroller"],["16","miniscroller"],["37","miniscroller"],["15","miniscroller"],["18","native"],["36","native"],["46","native"],["10","native"],["6","native"]]),this._adOptionsMap=new Map([["100000",{id:"2626064683911553041",isOutstream:!1}],["110000",{id:"2626064684062547986",isOutstream:!0}],["111000",{id:"2626064684196765715",isOutstream:!0}],["110100",{id:"2626064684339372052",isOutstream:!0}],["110010",{id:"2626064684498755605",isOutstream:!0}],["111100",{id:"2626064684632973334",isOutstream:!0}],["111010",{id:"2626064684775579671",isOutstream:!0}],["111110",{id:"2626064684934963224",isOutstream:!0}],["101000",{id:"2626064685069180953",isOutstream:!1}],["101100",{id:"2626064685203398682",isOutstream:!1}],["101010",{id:"2626064685337616411",isOutstream:!0}],["101110",{id:"2626064685471834140",isOutstream:!0}],["100100",{id:"2626064685606051869",isOutstream:!1}],["100110",{id:"2626064685740269598",isOutstream:!0}],["100010",{id:"2626064685882875935",isOutstream:!0}],["110110",{id:"2626807131797397582",isOutstream:!0}],["110001",{id:"3154492104504189746",isOutstream:!0}]]),this._bannerMap=[Qe.Below_Post,Qe.Content,Qe.Content_1,Qe.Content_2,Qe.Content_3,Qe.Content_4,Qe.Content_5,Qe.Content_6,Qe.Content_7,Qe.Content_8,Qe.Content_9,Qe.Footer_1,Qe.Header_1,Qe.Header_2,Qe.Recipe_1,Qe.Recipe_2,Qe.Recipe_3,Qe.Recipe_4,Qe.Recipe_5,Qe.Sidebar_1,Qe.Sidebar_2,Qe.Sidebar_3,Qe.Sidebar_4,Qe.Sidebar_5,Qe.Sidebar_9,Qe.Video_StickyOutstream_1],this._videoMap=new Map([[et.Video_Collapse_Autoplay_SoundOff,"3137192266624344610"],[et.Video_Coll_SOff_Smartphone,"3137192266808893988"],[et.Video_Individual_Autoplay_SOff,"3137192266716619299"]])}}N_=B([bn("YieldmoBidder"),D(),j("design:type",Function),j("design:paramtypes",[void 0===_c?Object:_c,void 0===Hm?Object:Hm])],N_);var U_=Object.freeze({__proto__:null,get AdformBidder(){return Fg},get AidemBidder(){return jg},get AppNexusBidder(){return $m},Bidder:Og,BidderBase:Pg,get ConversantBidder(){return qm},get CriteoBidder(){return Gm},get FlippBidder(){return Wm},get GumGumBidder(){return Km},get ImproveDigitalBidder(){return Ym},get IndexExchangeBidder(){return s_},get KargoBidder(){return u_},get MediaGridBidder(){return p_},get MediaGridVideoBidder(){return g_},get NativoBidder(){return m_},get OpenXBidder(){return __},get OzoneBidder(){return f_},get PubMaticBidder(){return v_},get RiseBidder(){return y_},get RtbHouseBidder(){return S_},get RubiconBidder(){return C_},get SharethroughBidder(){return k_},get TTDBidder(){return O_},get TeadsBidder(){return A_},get ThirtyThreeAcrossBidder(){return Rg},get TripleLiftBidder(){return P_},get UndertoneBidder(){return R_},get UndertoneServerBidder(){return L_},get UnrulyBidder(){return D_},get YahooSSPBidder(){return j_},get YieldmoBidder(){return N_}});class V_{get orderedDisplayBidders(){return this._orderedDisplayBidders}get multiFormatBidders(){return this._multiFormatBidders}get orderedVideoBidders(){return this._orderedVideoBidders}get biddersParams(){return this._biddersParams}get videoCreativeIdMapping(){return this._videoCreativeIdMapping}_setVideoCreativeIdMap(){return new Map(this._orderedVideoBidders.reduce(((e,t)=>e.concat(t.videoCreativeIds||[],t.videoServerCreativeIds||[])),[]))}_getBidderEnablement(e){const t=this._config,i=e.name,s={adapterName:e.adapterName,bidderName:i,ccpa:t.ccpa,gdpr:t.gdpr,enablement:{display:{holdout:t.hbho.bidders,enabled:["bidderDisplayEnabled","enabled"]},video:{holdout:t.vbho.bidders,enabled:["bidderInstreamEnabled","videoEnabled"]}}};return this._getEnablement(e,s)}_getEnablement(e,t){const i={display:!1,video:!1},{adapterName:s,bidderName:n,ccpa:r,gdpr:a}=t;return["display","video"].forEach((o=>{const l=t.enablement[o],d=l.holdout,c=l.enabled,h="video"===o||!e.updateBidParams;i[o]=!!(c.every((t=>e[t]))&&this._holdoutValidation(d,n,s)&&this._ccpaValidation(r,n,s)&&this._gdprValidation(a,n,s)&&(h||this._biddersParams.set(n,e)))})),i}_holdoutValidation(e,t,i){return!(e.length&&(i&&e.includes(i)||e.includes(t)))}_ccpaValidation(e,t,i=""){return!e.enabled||!e.nonCompliantBidders.includes(i)&&!e.nonCompliantBidders.includes(t)}_gdprValidation(e,t,i=""){return!e.enabled||!e.nonCompliantBidders.includes(i)&&!e.nonCompliantBidders.includes(t)}constructor(e,t,i,s,n,r,a,o,l,d,c,h,u,p,g,m,_,f,v,y,b,S,E,C,T,w,k,A,I,x){this._config=e,this._orderedDisplayBidders=[],this._orderedVideoBidders=[],this._biddersParams=new Map;[d,i,l,C,v,u,y,_,p,T,h,n,c,E,g,a,r,m,s,b,f,t,w,S,o,k,A,I,x].forEach((e=>{e.setup();const{display:t,video:i}=this._getBidderEnablement(e);t&&this._orderedDisplayBidders.push(e),i&&this._orderedVideoBidders.push(e)})),this._multiFormatBidders=this._orderedDisplayBidders.filter((e=>e.multiformatBidder)),this._videoCreativeIdMapping=this._setVideoCreativeIdMap()}}V_=B([M(),j("design:type",Function),j("design:paramtypes",[void 0===_c?Object:_c,void 0===U_||void 0===Fg?Object:Fg,void 0===U_||void 0===$m?Object:$m,void 0===U_||void 0===qm?Object:qm,void 0===U_||void 0===Gm?Object:Gm,void 0===U_||void 0===g_?Object:g_,void 0===U_||void 0===Km?Object:Km,void 0===U_||void 0===Ym?Object:Ym,void 0===U_||void 0===s_?Object:s_,void 0===U_||void 0===u_?Object:u_,void 0===U_||void 0===p_?Object:p_,void 0===U_||void 0===__?Object:__,void 0===U_||void 0===v_?Object:v_,void 0===U_||void 0===C_?Object:C_,void 0===U_||void 0===m_?Object:m_,void 0===U_||void 0===k_?Object:k_,void 0===U_||void 0===A_?Object:A_,void 0===U_||void 0===Rg?Object:Rg,void 0===U_||void 0===P_?Object:P_,void 0===U_||void 0===O_?Object:O_,void 0===U_||void 0===R_?Object:R_,void 0===U_||void 0===L_?Object:L_,void 0===U_||void 0===D_?Object:D_,void 0===U_||void 0===j_?Object:j_,void 0===U_||void 0===N_?Object:N_,void 0===U_||void 0===S_?Object:S_,void 0===U_||void 0===f_?Object:f_,void 0===U_||void 0===jg?Object:jg,void 0===U_||void 0===Wm?Object:Wm,void 0===U_||void 0===y_?Object:y_])],V_);class z_ extends Er{init(){this._key="CreativeMonitoring",this._lookup="CRTVMON",this._default=!1}}z_=B([bn("CreativeMonitoringExperiment"),M()],z_);class H_{setupCreativeEventListeners(){const e=this._prebidEventBus;e.auctionInit.on(this._storeAuctionData.bind(this)),e.adRenderFailed.on(this._renderFailedHandler.bind(this)),e.adRenderSucceeded.on(this._renderSucceededHandler.bind(this)),e.staleRender.on(this._staleRenderHandler.bind(this)),this._gamEventBus.slotRenderEnded.on(this._slotRenderEnded.bind(this)),this._gamEventBus.slotRequested.on(this._slotRequested.bind(this))}_slotRequested(e){const t=this._slots.get(e.slotId);if(!t)return;const i=t.id;this._gamRenderedData.has(i)&&this._gamRenderedData.delete(i)}_slotRenderEnded(e){const t=this._slots.get(e.slotId);t&&(this._gamRenderedData.set(t.id,e),this._creativeMonitoringExperiment.result&&this._checkSlotRender(e))}_storeAuctionData(e){e.adUnitCodes.forEach((t=>this._auctionData.add(`${e.auctionId}-${t}`)))}_deleteStoredAuction(e,t){this._auctionData.delete(`${e}-${t}`)}_getSlotData(e){const t=this._slots.get(e);return{...t&&{slot:t.location,sequence:t.sequence,nref:t.refreshCount}}}_getGAMCreativeData(e){const t=this._gamRenderedData.get(e);return t?{lineItemId:t.event.lineItemId,creativeId:t.event.creativeId,campaignId:t.event.campaignId}:{}}_getBidData(e){return e?{...this._getPrebidBidDataFromBid(e),...this._getSlotData(e.adUnitCode),...this._getGAMCreativeData(e.adUnitCode)}:{}}_renderFailedHandler(e){setTimeout((()=>{const t=e.bid;t&&this._deleteStoredAuction(t.auctionId,t.adUnitCode);const i={message:e.message,reason:e.reason,...this._getBidData(t)};t&&t.meta&&Object.keys(t.meta).length>0?i.buyerInformation=t.meta:i.markup=t&&t.ad,W.error("PrebidAuctionManager","init","adRenderFailed",i)}),2e3)}_staleRenderHandler(e){e&&this._deleteStoredAuction(e.auctionId,e.adUnitCode),setTimeout((()=>{W.error("PrebidAuctionManager","init","staleRender",{...this._getBidData(e)})}),2e3)}_renderSucceededHandler(e){const t=e.bid;t&&this._deleteStoredAuction(t.auctionId,t.adUnitCode)}_isSafeFrame(e){const t=e.element.querySelector("iframe");return!(!t||!t.src)}_checkSlotRender(e){const t=e.event,i=this._slots.get(e.slotId),s=this._config.prebid.advertiserId;i&&!this._isSafeFrame(i)&&t.advertiserId===s&&setTimeout((()=>{this._logUnknownFailure(e)}),2e3)}_getHeightWidth(e){if(!e)return{};const t=e.split("x").map(Number);return{...Array.isArray(t)&&2===t.length&&{height:t[1],width:t[0]}}}_getPrebidCreativeWindowData(e){return{adId:e.bidderAdId,bidder:e.bidder,size:e.bidderSize,adserverTargeting:e.targeting}}_getPrebidBidDataFromBid(e){return{price:e.adserverTargeting.hb_pb,bidderSize:e.size||e.adserverTargeting.hb_size,advertiserDomains:e.meta&&e.meta.advertiserDomains||e.adserverTargeting.hb_adomain,bidder:e.bidder}}_getPrebidBidderDataFromIframe(e){const t=e.element.querySelector("iframe").contentWindow;if(!t)return{};const{adId:i,adserverTargeting:s,bidder:n,size:r}=this._getPrebidCreativeWindowData(t),{height:a,width:o}=this._getHeightWidth(t&&t.bidderSize);return{adId:i,adserverTargeting:s,adUnitCode:e.id,bidder:n,height:a,size:r,width:o}}_logUnknownFailure(e){const t=this._context,i=this._slots.get(e.slotId);if(!i)return;const s=e.event,{adId:n,adserverTargeting:r,auctionId:a,adUnitCode:o,bidder:l,height:d,meta:c,size:h,width:u}=i.servedPrebidBidResponse||this._getPrebidBidderDataFromIframe(i);if(a&&o&&!this._auctionData.has(`${a}-${o}`))return;const p={adId:n,advertiserDomains:c&&c.advertiserDomains||r&&r.hb_adomain,bidderSize:h||r&&r.hb_size,bidder:l,branch:t.branch,bucket:t.bucket,campaignId:s.campaignId,creativeId:s.creativeId||s.sourceAgnosticCreativeId,lineItemId:s.lineItemId||s.sourceAgnosticLineItemId,message:"An unknown error occurred rendering the Prebid creative",nref:i.refreshCount,price:r&&r.hb_pb,sequence:i.sequence,slotSizes:i.sizes,slot:i.location,...u&&d&&{size:[u,d]},...c&&(c.dchain&&{dchain:c.dchain}||c.networkId&&{networkId:c.networkId}),...(!n||n.length<2)&&r&&{hbAdId:r.hb_adid}};W.error("PrebidAuctionManager","init","prebidCreativeFailure",p),a&&o&&this._deleteStoredAuction(a,o)}constructor(e,t,i,s,n,r){this._config=e,this._context=t,this._prebidEventBus=i,this._slots=s,this._creativeMonitoringExperiment=n,this._gamEventBus=r,this._auctionData=new Set,this._gamRenderedData=new Map}}H_=B([M(),j("design:type",Function),j("design:paramtypes",[void 0===_c?Object:_c,void 0===Fr?Object:Fr,void 0===Jn?Object:Jn,void 0===ra?Object:ra,void 0===z_?Object:z_,void 0===Sc?Object:Sc])],H_);class $_{setOseq(e,t){let i=`${e.sequence}`;const{id:s,bidPoolId:n}=e,{hb_bidder:r,hb_adid:a}=t,{bids:o}=n?this._prebidMethods.getBidResponsesForBidPoolId(n):this._prebidMethods.getBidResponsesForAdUnitCode(s);if(o)for(let e=o.length-1;e>=0;e--)if(o[e].bidderCode===r&&o[e].adId===a){i=this.getSeqFromAdUnitCode(o[e].adUnitCode),o[e];break}e&&e.setSlotTargetingFlag("oseq",[i],!0)}getSeqFromAdUnitCode(e){const t=(e||"").match(/AdThrive_.*?_(\d+)\_\S+$/);return t&&t.length?t[1]:""}constructor(e){this._prebidMethods=e}}$_=B([bn("OSeq"),D(),j("design:type",Function),j("design:paramtypes",[void 0===Mn?Object:Mn])],$_);class q_ extends br{init(){this._key="DemandChain",this._lookup="DCO"}run(){return super.run()}}B([kn(),j("design:type",Function),j("design:paramtypes",[]),j("design:returntype",void 0)],q_.prototype,"run",null),q_=B([bn("DemandChainExperiment"),M()],q_);const G_={buckets:[{precision:2,max:.1,increment:.01},{precision:2,max:5,increment:.05},{precision:2,max:20,increment:.1},{precision:2,max:100,increment:.5}]};class W_{get configuration(){return this._configuration}constructor(e,t){this._config=e,this._context=t,this._configuration={suppressEmptyKeys:!0,adserverTargeting:[{key:"hb_bidder",val:e=>e.bidderCode},{key:"hb_adid",val:e=>e.adId},{key:"hb_pb",val:e=>e.pbCg},{key:"hb_size",val:e=>this._config.video.instreamAdUnits.has(e.adUnitCode)?"":e.size},{key:"hb_deal",val:e=>e.dealId},{key:"hb_format",val:e=>e.mediaType},{key:"hb_adomain",val:e=>e.meta&&e.meta.advertiserDomains?e.meta.advertiserDomains[0]:e.meta&&e.meta.advertiserId},{key:"hb_dsp",val:e=>{var t,i;return null!=(i=null!=(t=e.meta&&e.meta.networkId)?t:e.meta&&e.meta.networkName)?i:e.meta&&e.meta.dchain&&e.meta.dchain.nodes.reverse()[0].bsid}},{key:"hb_crid",val:e=>e.creativeId},{key:"hb_dur",val:e=>e.duration},{key:"hb_source",val:e=>{const t=this._config.prebid,i=null==e?void 0:e.pbsHost;let s;if(t.s2s.bidders.includes(e.bidderCode)){const{ayServerEnabled:e}=t,n=i&&e?"sa":"sr";s=null!=n?n:"sr"}else s="c";return s}},{key:"hb_attr",val:e=>{var t,i;if("banner"===e.mediaType&&"video"===(null==(t=e.meta)?void 0:t.mediaType)||(null==(i=e.meta)?void 0:i.isInBannerVideo))return"ibv"}},{key:"ismobile",val:e=>{const t="native"===e.mediaType&&Ki();return t?String(t):void 0}}]}}}W_=B([M(),j("design:type",Function),j("design:paramtypes",[void 0===_c?Object:_c,void 0===Fr?Object:Fr])],W_);class K_ extends Er{init(){this._key="PrebidConfigPageUrl",this._lookup="PCPURL",this._default=!1}}K_=B([bn("PrebidConfigPageUrlExperiment"),M()],K_);class Y_ extends Er{init(){this._key="OpenPathLiveIntent",this._lookup="OPLI",this._default=!1}run(){return super.run()}}B([kn(),j("design:type",Function),j("design:paramtypes",[]),j("design:returntype",void 0)],Y_.prototype,"run",null),Y_=B([bn("OpenPathLiveIntentExperiment"),M()],Y_);class X_ extends br{init(){this._key="FirstEidExperiment",this._lookup="1ST_EID2"}get result(){if(this._result&&"none"!==this._result)return this.eidMap.get(this._result)}constructor(...e){super(...e),this.eidMap=new Map([["idl","idl_env"],["id5","id5id"],["pubcid","pubcid"],["uid1","tdid"],["li_uid2","uid2"],["cid","connectId"],["lpid","lotamePanoramaId"],["li_bdsw","bidswitch"]])}}X_=B([bn("FirstEidExperiment"),M()],X_);class Q_ extends br{init(){this._key="Uid1AdserverExperiment",this._lookup="UID1SRC"}}Q_=B([bn("Uid1AdserverExperiment"),M()],Q_);class J_{getUserSyncConfig(){return{...this._firstEidExperiment.result&&{firstEid:this._firstEidExperiment.result},syncEnabled:!this._config.gpc.gpcEnabled&&!this._config.ccpa.userOptedOut,idPriority:{tdid:this._openPathLiveIntentExperiment.result?["liveIntentId","unifiedId"]:["unifiedId","liveIntentId"]},auctionDelay:this._config.prebid.auctionDelay,syncsPerBidder:1,aliasSyncEnabled:!this._config.gpc.gpcEnabled&&!this._config.ccpa.userOptedOut,enableOverride:!this._config.gpc.gpcEnabled&&!this._config.ccpa.userOptedOut,filterSettings:{iframe:{bidders:"*",filter:"include"}},...this._uid1AdserverExperiment.result&&{uid1Adsrvr:this._uid1AdserverExperiment.result}}}constructor(e,t,i,s){this._config=e,this._openPathLiveIntentExperiment=t,this._firstEidExperiment=i,this._uid1AdserverExperiment=s}}J_=B([M(),j("design:type",Function),j("design:paramtypes",[void 0===_c?Object:_c,void 0===Y_?Object:Y_,void 0===X_?Object:X_,void 0===Q_?Object:Q_])],J_);class Z_{_getUspConfig(){return this._config.ccpa.required?{cmpApi:"iab",timeout:0}:{cmpApi:"static",consentData:{getUSPData:{uspString:"1---"}}}}getConsentManagementConfig(){return!0===this._config.gdpr.enabled?this._gdprConfig:this._uspConfig}constructor(e){this._config=e,this._clientVendorExceptions=["appnexus"],this._uspConfig={usp:this._getUspConfig()},this._gdprConfig={},this._serverVendorExceptions=this._config.prebid.s2s.bidders,this._gdprConfig={gdpr:{cmpApi:"iab",timeout:25e3,defaultGdprScope:!0,rules:[{purpose:"storage",enforcePurpose:!0,enforceVendor:!0},{purpose:"basicAds",enforcePurpose:!0,enforceVendor:!0,vendorExceptions:this._clientVendorExceptions.concat(this._serverVendorExceptions)},{purpose:"personalizedAds",enforcePurpose:!0,enforceVendor:!0},{purpose:"measurement",enforcePurpose:!0,enforceVendor:!0}]}}}}Z_=B([M(),j("design:type",Function),j("design:paramtypes",[void 0===_c?Object:_c])],Z_);class ef{_isCCPAConsentDenied(){return!!this._config.ccpa.userOptedOut}_isAct25ConsentDenied(){return this._config.act25.required&&!this._config.act25.consented}getAllowActivities(){const e={rules:[{condition:()=>this._isCCPAConsentDenied()||this._isAct25ConsentDenied(),allow:!1}]};return{reportAnalytics:{rules:[{condition:()=>this._isCCPAConsentDenied(),allow:!1}]},enrichUfpd:{...e},enrichEids:{...e},syncUser:{...e},transmitEids:{...e},transmitPreciseGeo:{...e},transmitUfpd:{...e},...this._config.gdpr.enabled&&{fetchBids:{rules:[{condition:({componentType:e,adapterCode:t})=>"ozone"===t&&"bidder"===e&&this._checkPurpose1Consent("s1119"),allow:!1}]}}}}constructor(e){this._config=e,this._checkPurpose1Consent=e=>{if("function"!=typeof window.__cmp)return!1;try{const s=window.__cmp("getCMPData");if(s){var t,i;const n=!0===(null==s||null==(t=s.vendorConsents)?void 0:t[e]),r=!0===(null==s||null==(i=s.purposeConsents)?void 0:i[1]);return!n||!r}}catch(t){return console.warn(`Raptive::Error while checking consent for vendorId: ${e} `,t),!1}return!1}}}ef=B([M(),j("design:type",Function),j("design:paramtypes",[void 0===_c?Object:_c])],ef);class tf{customPreAuction(e,t){if(e&&t){let i=t;const s=e.code,n=t.split("/"),r=sa.includes(s),a={Content:Qe.Content,Sidebar:this._isSideBarNineAvailable?Qe.Sidebar_9:Qe.Sidebar_1,Recipe:Qe.Recipe_1};for(const e in a)s.includes(e)&&(i=`/${n[1]}/AdThrive_${a[e]}/${n[3]}`);return r?t:i}}setDefaultConfig(e){const t=this._regulatoryConfiguration.getConsentManagementConfig(),i={...this._defaultConfig,...e&&{eventHistoryTTL:60},consentManagement:t,...this._config.prebid.currencyConversionEnabled&&{currency:{adServerCurrency:"USD"}}};this._prebidMethods.setConfig(i)}applyClientAndServerBidderSettings(e){this._prebidMethods.setBidderSettings(e.reduce(((e,t)=>this._setupBidderSettings(e,t)),{standard:this._standardPrebidBidderSetting.configuration}))}aliasBidders(e){[...new Set(e)].forEach((e=>{const{adapterName:t,name:i,gvlid:s,serverBidderCode:n}=e;if(!t)return;const r=[te.ImproveDigitalServer,te.AidemServer],a=this._config.prebid.s2s.bidders,o=n&&!r.includes(n)&&a.includes(n);i!==t&&!r.includes(i)&&!this._config.prebid.s2s.bidders.includes(i)&&this._setAlias(t,i,s),o&&this._setAlias(t,n,s)}))}_setAlias(e,t,i){i?this._prebidMethods.setAliasBidder(e,t,{gvlid:i}):this._prebidMethods.setAliasBidder(e,t)}_setupBidderSettings(e,t){var i;return e[t.name]=this.getBidderSettings(t,t.name),t.serverBidderCode&&t.name!==t.serverBidderCode&&(e[t.serverBidderCode]=this.getBidderSettings(t,t.serverBidderCode)),null==(i=t.additionalServerBidderCodes)||i.forEach((i=>{e[i]=this.getBidderSettings(t,i)})),e.standard.adserverTargeting&&t.adServerTargeting&&e.standard.adserverTargeting.push(...t.adServerTargeting),e}_setIsSidebarNineAvailable(e){const t=this._slots.get(e);for(const e of t)if(e.location===Qe.Sidebar&&9===e.sequence)return void(this._isSideBarNineAvailable=!0)}getBidderSettings(e,t){return{bidCpmAdjustment:(e,i)=>{const s=this._config;return Qt(s,e,t,i)},inverseBidAdjustment:(e,t)=>{const i=this._config,s=this._config.prebid.s2s.bidders.includes(t.bidder)?"server":t.bidder;return Zt(i,s,t,e)},...e.settings}}constructor(e,t,i,s,n,r,a,o,l,d,c){this._config=e,this._prebidMethods=t,this._dcoExperiment=i,this._ortb2=s,this._standardPrebidBidderSetting=n,this._slotManagerEventBus=r,this._prebidConfigPageUrlExperiment=a,this._slots=o,this._userSyncConfiguration=l,this._regulatoryConfiguration=d,this._allowActivitiesConfiguration=c,this._isSideBarNineAvailable=!1,this._defaultConfig={allowActivities:this._allowActivitiesConfiguration.getAllowActivities(),auctionOptions:{secondaryBidders:["unruly","undertone","33across","nativo"]},bidderSequence:"fixed",bidPooling:{excludedBidders:[te.Teads]},cache:{url:"https://prebid.adnxs.com/pbc/v1/cache"},consentManagement:{},dchain:{validation:this._dcoExperiment.result},disableAjaxTimeout:!0,enableTIDs:!1,enableSendAllBids:!0,eventHistoryTTL:0,gptPreAuction:{mcmEnabled:!0,enabled:!0,customPreAuction:this.customPreAuction.bind(this)},gvlMapping:{generic:this._config.gdpr.raptiveVendorId},maxRequestsPerOrigin:6,ortb2:this._ortb2.data,...this._prebidConfigPageUrlExperiment.result&&{pageUrl:window.location.origin+window.location.pathname},priceGranularity:G_,requestQueue:{enabled:!0,timeout:this._config.prebid.requestQueueTimeout},schain:{validation:"strict",config:(new Ac).getSupplyChainConfig(this._config.site.id)},sendBidsControl:{bidLimit:3},sizeConfig:[],targetingControls:{allowTargetingKeys:this._config.prebid.targetingKeys,allowSendAllBidsTargetingKeys:this._config.prebid.sendAllBidsTargetingKeys},useBidCache:!0,userSync:this._userSyncConfiguration.getUserSyncConfig()},this._slotManagerEventBus.added.on((e=>{this._setIsSidebarNineAvailable(e)}))}}tf=B([M(),j("design:type",Function),j("design:paramtypes",[void 0===_c?Object:_c,void 0===Mn?Object:Mn,void 0===q_?Object:q_,void 0===Lu?Object:Lu,void 0===W_?Object:W_,void 0===nr?Object:nr,void 0===K_?Object:K_,void 0===ra?Object:ra,void 0===J_?Object:J_,void 0===Z_?Object:Z_,void 0===ef?Object:ef])],tf);class sf extends br{init(){this._key="PredictiveAnalysis",this._lookup="VPRED_1"}run(){return super.run()}}B([kn(),j("design:type",Function),j("design:paramtypes",[]),j("design:returntype",void 0)],sf.prototype,"run",null),sf=B([bn("PredictiveAnalysisExperiment"),M()],sf);class nf extends br{init(){this._key="UserSyncLimit",this._lookup="CSYNC_LIM"}run(){try{const e=super.run();return this._validateResult(e),e}catch(e){return W.error("UserSyncLimitExperiment","run",e),-1}}_validateResult(e){if("number"!=typeof e)throw new Error(`Result is not a number: ${e}`);if(!Number.isInteger(e))throw new Error(`Result is not an integer: ${e}`);if(e<0||e>100)throw new Error(`Result out of range: ${e}`);return e}}B([kn(),j("design:type",Function),j("design:paramtypes",[]),j("design:returntype",void 0)],nf.prototype,"run",null),nf=B([bn("UserSyncLimitExperiment"),M()],nf);class rf extends br{init(){this._key="S2STimeOutExperiment",this._lookup="S2STO"}}rf=B([bn("S2STimeoutExperiment"),M()],rf);class af extends br{init(){this._key="S2SRefreshTimeout",this._lookup="S2STORE"}}af=B([bn("S2SRefreshTimeoutExperiment"),M()],af);const of="default",lf="experiment-18";class df extends Er{init(){this._key="RaptivePrebidServerProxyExperiment",this._lookup="RPBSP",this._default=!1}}df=B([bn("RaptivePrebidServerProxyExperiment"),M()],df);class cf extends br{init(){this._key="RaptivePBSMultistageAuctionExperiment",this._lookup="MULTISERVERAUC"}}cf=B([bn("RaptivePBSMultistageAuctionExperiment"),M()],cf);class hf{init(){this._setupURLs()}get auction(){return this._auctionUrl.toString()}get sync(){return this._syncUrl.toString()}_setupURLs(){this._baseUrl=new URL(this._url),this._auctionUrl=new URL(this._auctionSuffix,this._baseUrl),this._syncUrl=new URL(this._syncSuffix,this._baseUrl)}constructor(){this._auctionSuffix="/openrtb2/auction",this._syncSuffix="/cookie_sync"}}class uf extends hf{init(){this._setShouldUseProxy()&&this._setAuctionParams(),super.init()}_setAuctionParams(){this._handleSetVersionParam(lf)}_setShouldUseProxy(){return!(!R.resolve(df).result||"off"===R.resolve(cf).result)}_handleSetVersionParam(e){this._shouldSetVersionParam(e)&&(this._setAuctionVersionParam(e),this._setSyncVersionParam(e))}_shouldSetVersionParam(e){return e!==of}_setAuctionVersionParam(e){this._auctionSuffix+=`?version=${e}`}_setSyncVersionParam(e){this._syncSuffix+=`?version=${e}`}}class pf extends uf{constructor(){super(),this._url="https://prebid.production.adthrive.com",this.init()}}pf=B([M(),j("design:type",Function),j("design:paramtypes",[])],pf);class gf extends br{init(){this._key="ayp",this._lookup="AYP"}}gf=B([bn("AYParameterExperiment"),D()],gf);class mf extends Er{init(){this._key="EUEndpoint",this._lookup="EUE",this._default=!1,this._autorun=!1}}mf=B([bn("EUEndpointExperiment"),M()],mf);class _f extends hf{init(){this._setupExperimentParam(),super.init()}_setupExperimentParam(){const e="off"!==this._experimentParam?`?experiment=${this._experimentParam}`:"";this._auctionSuffix+=e;this._syncSuffix+="?aysse=true"}constructor(e){super(),this._experimentParam=e}}class ff extends _f{constructor(e){super(e),this._url="https://pbs-raptive-us.ay.delivery",this.init()}}ff=B([M(),j("design:type",Function),j("design:paramtypes",[Object])],ff);class vf extends _f{constructor(e){super(e),this._url="https://pbs-raptive-eu.ay.delivery/",this.init()}}vf=B([M(),j("design:type",Function),j("design:paramtypes",[Object])],vf);class yf extends uf{constructor(){super(),this._url="https://rpbs-euw1-blu.production.adthrive.com",this.init()}}yf=B([M(),j("design:type",Function),j("design:paramtypes",[])],yf);class bf{_runRaptivePrebidServerExperiments(){const{rpbsEnabled:e,ayServerEnabled:t}=this._config.prebid;this._useRaptivePBS=e,this._useAYPBS=t}_generateAliases(e){return{...e.includes(te.ImproveDigitalServer)&&{[te.ImproveDigitalServer]:te.ImproveDigital},...e.includes(te.RubiconServer)&&{[te.RubiconServer]:te.Rubicon},...e.includes(te.AidemServer)&&{[te.AidemServer]:te.Aidem},...Fi()&&e.includes(te.YahooSSPServer)&&{[te.YahooSSPServer]:te.YahooSSP}}}_getRaptiveServer2ServerConfig(e,t){const i=this._getRPBSEndpoint(t);return this._generateServer2ServerConfig(e,i)}_getAssertiveYieldServer2ServerConfig(e,t,i){const s=this._getAYPBSEndpoint(t),n=this._generateServer2ServerConfig(e,s,i);return this._updateAYConfigSharedId(n,i),n}_updateAYConfigSharedId(e,t){const i="dummy_iiq_bidder";t.push(i);e.syncUrlModifier=this._addSyncModifierToBidder(t,i,((e,t,s)=>{let n,r,a;try{const e=Fs.readExternalLocalStorage("pbjs-id5id");r=e?JSON.parse(decodeURIComponent(e)).gp:void 0,a=Fs.readExternalLocalStorage("_pubcid"),n=r||a}catch(e){W.error("S2S","modifySyncUrlForIIQ",`GPID or SharedID failed to set: ${e}`)}const o="[SHAREDID]";return n&&s===i&&t.includes(o)&&t.includes("sync.intentiq.com")?(W.event("S2S","modifySyncUrlForIIQ","Replaced macro in sync URL for IIQ bidder with Shared Id Type: "+(r?"GPID":a?"Pubcid":"Unknown")),t.replace(o,n)):t}))}_addSyncModifierToBidder(e,t,i){return e.reduce(((e,s)=>(s===t&&(e[s]=i),e)),{})}_getRPBSEndpoint(e=!1){return e||!this._config.gdpr.enabled&&!this._euEndpointExperiment.result?new pf:new yf}_getAYPBSEndpoint(e=!1){const t=this._aypExperiment.result;return e?new ff(t):new vf(t)}getServer2ServerConfigWithAppData(e,t,i=!1){const s=this._appData;if(!s||!this._config.prebid.appBidders.length)return;var n;const r=null!=(n=this._config.prebid.s2s.additionalBidders)?n:[],a=t?this._getRaptiveServer2ServerConfig(e,i):this._getAssertiveYieldServer2ServerConfig(e,i,r);return a.accountId=this._appAccountId,s&&0!==Object.keys(s).length?(a.ignoreDuplicateBidders=!0,a.appData=s,a):void 0}_generateServer2ServerConfig(e,t,i){var s,n,r;return{accountId:this._accountId,enabled:!0,...this._config.prebid.ortbEnrich&&{secure:1},bidders:null!=i?i:e,syncBidders:i?e:void 0,extPrebid:{aliases:this._generateAliases(e),eidPermissions:[{source:"bidswitch.net",bidders:e.filter((e=>e!==te.ThirtyThreeAcross))}],returnallbidstatus:!0},defaultTtl:300,timeout:null!=(s=this._s2sTimeoutExperiment.result)?s:750,maxTimeout:null!=(n=this._s2sTimeoutExperiment.result)?n:750,refreshTimeout:null!=(r=this._s2sRefreshTimeoutExperiment.result)?r:1e3,adapter:"prebidServer",coopSync:!1,userSyncLimit:this._userSyncLimitExperiment.result,endpoint:{p1Consent:t.auction,noP1Consent:t.auction},syncEndpoint:{p1Consent:this._config.gpc.gpcEnabled||this._config.ccpa.userOptedOut?"":t.sync,noP1Consent:this._config.gpc.gpcEnabled||this._config.ccpa.userOptedOut?"":t.sync}}}_buildS2SConfigs(){const e=this._config.prebid,t=e.s2s.bidders,i=e.s2s.additionalBidders||[],s=["us","ca"].some((e=>{var t;return e===(null==(t=this._context.country)?void 0:t.toLowerCase())})),n=this._useRaptivePBS;this._useAYPBS&&this._s2sConfig.push(this._getAssertiveYieldServer2ServerConfig(t,s,i)),n&&this._s2sConfig.push(this._getRaptiveServer2ServerConfig(t,s));const r=this.getServer2ServerConfigWithAppData(t,n,s);r&&this._s2sConfig.push(r)}init(){this._buildS2SConfigs();const e={s2sConfig:this._s2sConfig.filter((e=>e.bidders.length))};e.firstPartyData={uaHints:this._highEntropyUserHints},this._prebidMethods.setConfig(e)}constructor(e,t,i,s,n,r,a,o,l){this._config=e,this._context=t,this._prebidMethods=i,this._userSyncLimitExperiment=s,this._s2sTimeoutExperiment=n,this._ortb2=r,this._s2sRefreshTimeoutExperiment=a,this._aypExperiment=o,this._euEndpointExperiment=l,this._useRaptivePBS=!1,this._useAYPBS=!1,this._accountId="1234",this._appAccountId="6666",this._s2sConfig=[],this._highEntropyUserHints=["architecture","model","platform","platformVersion","fullVersionList"],this._appData=Gi(this._context.domain,this._ortb2.data.site),this._runRaptivePrebidServerExperiments()}}bf=B([D(),j("design:type",Function),j("design:paramtypes",[void 0===_c?Object:_c,void 0===Fr?Object:Fr,void 0===Mn?Object:Mn,void 0===nf?Object:nf,void 0===rf?Object:rf,void 0===Lu?Object:Lu,void 0===af?Object:af,void 0===gf?Object:gf,void 0===mf?Object:mf])],bf);class Sf extends br{init(){this._key="UserSyncTrigger",this._lookup="USYNCTRIG"}}Sf=B([bn("UserSyncTriggerExperiment"),M()],Sf);class Ef extends Fn{triggerUserSyncBasedOnExperiment(e){const t=this._userSyncTriggerExperiment.result;t&&this._userSyncTriggerMap.get(t)===e&&!this._alreadyCalled&&(this._prebidMethods.triggerUserSyncs(),this._alreadyCalled=!0)}constructor(e,t){super(),this._userSyncTriggerExperiment=e,this._prebidMethods=t,this._alreadyCalled=!1,this._userSyncTriggerMap=new Map([[1,"onPageLoad"],[2,"onConfigSet"],[3,"onBeforeRequestEvent"],[4,"onBidsBackHandler"]])}}Ef=B([bn("UserSyncTriggerComponent"),M(),j("design:type",Function),j("design:paramtypes",[void 0===Sf?Object:Sf,void 0===Mn?Object:Mn])],Ef);class Cf extends Er{init(){this._key="SspTakeRateMonitor",this._lookup="SSPTRM",this._default=!1}}Cf=B([bn("SspTakeRateMonitorExperiment"),M()],Cf);class Tf extends Er{init(){this._key="LiverampSecureSignals",this._lookup="LRSS",this._default=!1}}Tf=B([bn("LiverampSecureSignalsExperiment"),M()],Tf);class wf{isRoadblock(e){const t=Object.keys(e);return!this._gamSlotRequested&&!!t.filter((t=>t.indexOf("Footer")>-1&&e[t].bids.filter((e=>!!(e.meta&&e.meta.advertiserId&&e.meta.advertiserId===this._appnexusAdvertiserId&&e.creativeId)&&(this.creativeId=e.creativeId,!0))).length)).length}_init(){this._gamEventBus.slotRequested.once((()=>{this._gamSlotRequested=!0,this.creativeId=void 0}))}constructor(e){this._gamEventBus=e,this._gamSlotRequested=!1,this._appnexusAdvertiserId=10645616,this._init()}}wf=B([D(),j("design:type",Function),j("design:paramtypes",[void 0===Sc?Object:Sc])],wf);class kf extends Er{init(){this._key="SSPUserSync",this._lookup="SSPUS",this._default=!1}run(){return super.run()}}B([kn(),j("design:type",Function),j("design:paramtypes",[]),j("design:returntype",void 0)],kf.prototype,"run",null),kf=B([bn("SSPUserSyncExperiment"),M()],kf);class Af extends Fn{get enabled(){return!this._gpcConfig.gpcEnabled&&!this._ccpaConfig.userOptedOut&&this._sspUserSyncExperiment.result}async init(){this.enabled&&(await Ha(),this._loadMessagesFromStorage(),this._setupPostMessageListener())}getTargetingData(){const e=Object.keys(this._cachedMessages).filter((e=>{const t=this._cachedMessages[e];return!(this._sspToDetailsMap[t.ssp.toLowerCase()].bidderCode===te.Pubmatic&&this._userSyncConfig.isPubmaticEidSetByLiveIntent&&"pubmatic.com"===t.eid.source)}));return e?e.map((e=>`ssp:${this._sspToDetailsMap[e].storageKey}`)):[""]}_setupPostMessageListener(){window.addEventListener("message",(e=>{if(this._isOriginAllowed(e.origin)){let t=null;try{"string"==typeof e.data?t=JSON.parse(e.data):"object"==typeof e.data&&(t=e.data)}catch(t){W.error("SSPUserSyncComponent","_setupPostMessageListener","Error parsing message",t,e.data)}t&&"ssp-user-sync"===t.type&&this._handlePostMessage(t)}}))}_handlePostMessage(e){try{const t=e.ssp.toLowerCase();this._cachedMessages[t]||(this._storeMessage(e),this._processMessage(e),this._cachedMessages[t]=e)}catch(e){W.error("SSPUserSyncComponent","_handlePostMessage","Error processing message",e)}}_isOriginAllowed(e){return this._allowedDomains.includes(e)}_storeMessage(e){try{const t=e.ssp.toLowerCase(),i=this._sspToDetailsMap[t].storageKey||t.toLowerCase();Fs.setInternalLocalStorage(`adthrive_sspus_${i}`,e)}catch(e){W.error("SSPUserSyncComponent","_storeMessage","Error storing SSPUserSyncMessage",e)}}_loadMessagesFromStorage(){const e=Object.values(this._sspToDetailsMap).map((({storageKey:e})=>Fs.readInternalLocalStorage(`adthrive_sspus_${e}`))).filter((e=>null!==e));this._cachedMessages=e.reduce(((e,t)=>(e[t.ssp.toLowerCase()]=t,e)),this._cachedMessages),e.forEach((e=>{this._processMessage(e)}))}_processMessage(e){const t=e.eid,i=this._sspToDetailsMap[e.ssp.toLowerCase()].bidderCode;t&&i&&(i===te.Pubmatic&&this._userSyncConfig.isPubmaticEidSetByLiveIntent&&"pubmatic.com"===t.source||i===te.Pubmatic&&"mediawallah-dcn"===this._userSyncConfig.pubmaticBidderLevelEidSource||(this._prebidMethods.setBidderConfig({bidders:[i],config:{ortb2:{user:{ext:{data:{eids:[t]}}}}}}),i===te.Pubmatic&&(this._userSyncConfig.pubmaticBidderLevelEidSource="pubmatic-iframe")))}constructor(e,t,i,s,n){super(),this._gpcConfig=e,this._ccpaConfig=t,this._prebidMethods=i,this._userSyncConfig=s,this._sspUserSyncExperiment=n,this._allowedDomains=["https://ads.pubmatic.com"],this._sspToDetailsMap={pubmatic:{storageKey:"pubm",bidderCode:te.Pubmatic}},this._cachedMessages={}}}Af=B([bn("SSPUserSyncComponent"),M(),j("design:type",Function),j("design:paramtypes",[void 0===ja?Object:ja,void 0===Na?Object:Na,void 0===Mn?Object:Mn,void 0===pp?Object:pp,void 0===kf?Object:kf])],Af);class If extends kc{init(){const e=this._prebidConfiguration,t=[...this._orderedDisplayBidders,...this._orderedVideoBidders],i=Gi(this._context.domain,this._ortb2.data.site),s=this._appDataBidders,n=this._genericAnalytics.enabled;s.length&&this._prebidMethods.setConfig({appDataConfig:{appData:i,bidders:this._appDataBidders,bseat:this._bseatAppRequests}}),this._setEvents(),e.setDefaultConfig(n),this._userSyncTriggerComponent.triggerUserSyncBasedOnExperiment("onConfigSet"),e.aliasBidders(t),t.filter(Mi).forEach((e=>void 0!==e.init&&e.init())),this._config.prebid.distributeServerBidders(),this._s2s.init(),this._analytics.forEach((e=>void 0!==e.init&&e.init())),e.applyClientAndServerBidderSettings(t),Ws().then((()=>{this._userSyncTriggerComponent.triggerUserSyncBasedOnExperiment("onPageLoad")})).then((()=>this._registerSignalSources())).catch((e=>{W.error("PrebidAuctionManager","init","pageLoaded",e)})),this._prebidEventBus.initialized.emit(),this._initialized=!0}get multiFormatBidders(){return this._orderedMultiformatBidders}lastAuctionData(e){return this._previousAuctionData.get(e)}_logAuctionDebug(){this._prebidEventBus.auctionDebug.on((e=>{if(e&&"ERROR"===e.type){const t="Error trying to write ad";[...e.arguments].some((e=>"string"==typeof e&&e.indexOf(t)>-1))||W.error("PrebidAuctionManager","_logAuctionDebug","auctionDebug",e)}}))}async _registerSignalSources(){if(this._config.ccpa.userOptedOut||this._config.gpc.gpcEnabled)return;if(this._config.gdpr.enabled){if(!await this._gdprEnforcement.checkConsentForVendor(this._config.gdpr.raptiveVendorId,[1]))return}const e=["esp.criteo.com","33across.com","crwdcntrl.net"];this._liveRampSecureSignalsExperiment.result&&e.push("liveramp.com"),this._prebidMethods.setConfig({userSync:{encryptedSignalSources:{sources:[{source:e,encrypt:!1}],registerDelay:2e3}}}),this._prebidMethods.registerSignalSources()}_getNoBidReason(e,t){return Object.keys(null!=e?e:{}).length?"":null!=t?t:"noBid"}_setLastAuctionData(e,t,i,s){const n=this._previousAuctionData.get(e),r=null==n?void 0:n.refresh,a=r===t&&n?n.bids.concat(i):i,o=r===t&&n?n.requests.concat(s):s;this._previousAuctionData.set(e,{bids:a,requests:o,refresh:t})}_handleAuctionEnd(){this._prebidEventBus.auctionEnd.on((e=>{const t=e.bidderRequests||[],i=e.bidsReceived||[],s=e.adUnits||[],n=i.filter((e=>e.app));s.forEach((e=>{const{code:s,noBidReason:r}=e,a=this._slots.get(s),o=a?a.id:s;var l;const d=a?a.refreshCount:null!=(l=this._instreamAuctionRefreshByPlayer.get(o))?l:0,c=this._prebidMethods.getAdserverTargetingForAdUnitCode(o),h=this._getNoBidReason(c,r);if(this._setLastAuctionData(o,d,i,t),a){var u;null==a||a.setSlotAppBids(n,s),h&&(null==(u=a.googleTagSlot)||u.setTargeting("hb_bidder",h))}else{const e=h?{noBid:h}:c;this._config.video.bidRate=(i.length/(t.length||1)).toFixed(2),this._slotEventBus.addPrebidSlotTargeting.emit({adUnitCode:s,slotTargeting:e})}})),this._setClearBidsTimeout(e.auctionId,e.bidsReceived)}))}_getHighestBidTTL(e){const t=e.map((e=>e.ttl?1e3*e.ttl:0));return Math.max(6e4,...t)}_setupTTLTimeout(e,t,i=1){setTimeout((()=>{const t=this._prebidMethods.clearAuctionBids(e);if((null==t?void 0:t.length)&&i({cpm:e.cpm}))),{requests:n,responses:r}=this._previousBidRateData=this._getBiddingData(e);return{bids:s,requests:n,responses:r,refresh:t}}_handleAuctionInit(){this._prebidEventBus.auctionInit.on((e=>{e.adUnitCodes.forEach((t=>{const i=(this._prebidMethods.getPrebidAdUnits()||[]).filter((e=>e.code===t));i.length&&i.forEach((t=>{t.lastAuctionId=e.auctionId}))}))}))}_handleBidWon(){this._prebidEventBus.bidWon.on((e=>{const t=this._slots.get(e.adUnitCode);if(t){t.servedPrebidBidResponse=e,this._slots.bidServed.emit(t);Math.floor(100*Math.random())>=95&&this._sspTakeRateMonitorExperiment.result&&this._logBidResponseInfo(e.adUnitCode,t)}}))}_logBidResponseInfo(e,t){const i=this._prebidMethods.getBidResponsesForAdUnitCode(e).bids,s=this._bidResponseForAdUnitCount.get(e)||0;i.slice(s).forEach((e=>{const{bidder:i,cpm:s,adUnitCode:n,dealId:r,originalCpm:a,responseCpm:o,meta:l}=e,{hb_pb:d,hb_format:c}=e.adserverTargeting,{bp:h,wp:u}=this._extractPriceInfoFromPixelUrl(e);i&&s&&d&&h&&u&&n&&W.event("PrebidAuctionManager","_logBidResponseInfo","Info from bid response",{bidder:i,cpm:s,originalCpm:a,responseCpm:o,hb_pb:d,hb_format:c,meta:l,bp:h,wp:u,adUnitCode:n,nref:t.refreshCount,dealId:r})})),this._bidResponseForAdUnitCount.set(e,i.length)}_extractPriceInfoFromPixelUrl(e){const{ad:t,adUrl:i}=e;let s,n;if(!t&&!i)return{bp:void 0,wp:void 0};if(t){const e=t.match(/[?&]bp=([^&]*)/),i=t.match(/[?&]wp=([^&]*)/);s=e&&e[1],n=i&&i[1]}if(i){const e=i.match(/[?&]bp=([^&]*)/),t=i.match(/[?&]wp=([^&]*)/);s=!s&&e&&e[1],n=!n&&t&&t[1]}return{bp:s,wp:n}}_handleSetTargeting(){this._prebidEventBus.setTargeting.on((e=>{for(const t in e){const i=this._slots.get(t);if(i){const{hb_adid:s,hb_bidder:n}=e[t];try{this._oseq.setOseq(i,{hb_adid:s,hb_bidder:n})}catch(e){const t=this._prebidMethods.getVersion();W.error("PrebidAuctionManager","setEvents",e,t)}}}}))}_handleBeforeRequestEvent(){this._prebidEventBus.beforeRequestBids.on((e=>{var t,i;this._userSyncTriggerComponent.triggerUserSyncBasedOnExperiment("onBeforeRequestEvent"),!this._mediaType.additionalOutstreamUnitsExperiment&&this._mediaType.isOutstreamAllowed()||this._isBeforeRequestEventLoaded||this._updateHighImpactUnitTargeting();const s=[...this._userIdComponent.getTargetingData(),...this._sspUserSyncComponent.getTargetingData()];((null==(t=this._ortb2.data.device)?void 0:t.ip)||(null==(i=this._ortb2.data.device)?void 0:i.ipv6))&&s.push("cfip"),e.forEach((e=>{this._setupSlotRequestTargeting(e,s)})),this._isBeforeRequestEventLoaded=!0}))}_handleGamOnLoad(){this._googleAdManagerEventBus.slotOnload.on((({slotId:e})=>{const t=this._slots.get(e);!t||t.lazy&&!t.refreshCount||setTimeout((()=>{this._prebidMethods.clearTargetingForSharedBidPool(t.id)}),2e3)}))}_applyServerBidderInflator(e,t){var i;null==(i=e.bids)||i.forEach((i=>{const{floor:s}=this._getFloor([i]),n=null==s?void 0:s.floor;if(n){var r;const s=n*t;null==(r=e.adUnitsS2SCopy)||r.forEach((e=>{e.bids.filter((e=>e.bidder===i.bidder)).forEach((e=>{var t;null!=(t=e).ortb2Imp||(t.ortb2Imp={}),e.ortb2Imp.bidfloor=s}))}))}}))}_setBidRequestedFloorData(e){const{floor:t,floorData:i}=this._getFloor(e.bids),s=e.bids[0],n=this._config.prebid.s2s.bidders.includes(s.bidder)?"server":s.bidder;if(t&&"number"==typeof t.floor||(null==i?void 0:i.skipped)){const r=e.auctionId,a=(null==i?void 0:i.skipped)?-1:((e,t,i,s)=>Zt(e,t,i,s,!1))(this._config,n,s,t.floor);this._usedFloorAuctionIds.push(r),this._floorsEventBus.setAuctionFloorData.emit({auctionId:r,price:a,floorData:i,bidder:n})}}_getFloor(e){let t,i;const s=e[0];try{i=(null==s?void 0:s.floorData)||{},t="function"==typeof e[0].getFloor&&s.getFloor()}catch(e){W.error("PrebidAuctionManager","_handleBidRequested","could not call getFloor",e)}return{floor:t,floorData:i}}_handleBidRequested(){this._prebidEventBus.bidRequested.on(this._setAuctionFloors.bind(this))}_setEvents(){this._logAuctionDebug(),this._handleAuctionEnd(),this._handleBidWon(),this._handleSetTargeting(),this._handleBeforeRequestEvent(),this._handleBidRequested(),this._handleGamOnLoad(),this._handleAuctionInit(),this._creativeMonitoring.setupCreativeEventListeners(),this._setBidsFilter(),this._handleExpiredRender(),this._setupEventListeners()}_setupEventListeners(){const e=this._prebidMethods,t=this._prebidEventBus;e.onEvent("adRenderFailed",(e=>t.adRenderFailed.emit(e))),e.onEvent("adRenderSucceeded",(e=>t.adRenderSucceeded.emit(e))),e.onEvent("auctionDebug",(e=>t.auctionDebug.emit(e))),e.onEvent("auctionEnd",(e=>t.auctionEnd.emit(e))),e.onEvent("auctionInit",(e=>t.auctionInit.emit(e))),e.onEvent("beforeRequestBids",(e=>t.beforeRequestBids.emit(e))),e.onEvent("bidRequested",(e=>t.bidRequested.emit(e))),e.onEvent("bidWon",(e=>t.bidWon.emit(e))),e.onEvent("rubiconBidError",(e=>t.rubiconBidError.emit(e))),e.onEvent("setTargeting",(e=>t.setTargeting.emit(e))),e.onEvent("staleRender",(e=>t.staleRender.emit(e))),e.onEvent("tcf2Enforcement",(e=>t.tcf2Enforcement.emit(e))),e.onEvent("vastExceededLimit",(e=>t.vastExceededLimit.emit(e))),e.onEvent("liveIntentResolved",(e=>t.liveIntentResolved.emit(e))),e.onEvent("expiredRender",(e=>t.expiredRender.emit(e)))}_setBidsFilter(){const e=this._config.prebid,t=this._getPredictiveAnalysisInvalidBidMap();this._prebidMethods.setBidsReceivedFilter((i=>i.length&&e.blockableCreativeUnits.includes(i[0].adUnitCode)?i.filter((i=>{var s;const n=e.blockedCreativeIds.includes(i.creativeId||"");var r;const a=null!=(r=null==(s=i.meta)?void 0:s.advertiserDomains)?r:[],o=Array.isArray(a)?a:[a],l=this._isAdvertiserDomainValid(i,o,t);return!n&&l})):i))}_getPredictiveAnalysisInvalidBidMap(){const e=e=>{const t=this._context.device;return"1"===e?"phone"===t:"tablet"===t||"desktop"===t},t=this._predictiveAnalysis.filter((t=>parseFloat(t.error_rate)>(this._predictiveAnalysisResult||.9)&&"1"===t.chrome===di()&&e(t.mobile))),i={};return this._predictiveAnalysis.length&&t.forEach((e=>{const t=`${e.adomain},${e.bidder}`;i[t]=!0})),i}_isAdvertiserDomainValid(e,t,i){return t.some((t=>{const s=t+","+e.bidder;return!i[s]}))}_updateSlotTargeting(e){if(!this._mediaType.outstreamSlots.has(`${e.placementMapName}`))return;const t=this._config.adTypes.enabledMinified.map((e=>e.toLowerCase())).filter((e=>"od"===e||"om"===e));t.length&&this._gam.setSlotTargeting({key:"hi_au",value:t},e.googleTagSlot)}instlEnabled(e){return"Interstitial"===e&&this._config.adOptions.interstitial.prebid}get videoCreativeIdMapping(){return this._videoCreativeIdMapping}addSlots(e){const t=e.filter((e=>this._shouldIncludeSlot(e)));this._applySlotFlags(t);const{bannerEligibleSlots:i,outstreamEligibleSlots:s,nativeEligibleSlots:n,multiFormatBannerVideoEligibleSlots:r,multiFormatBannerNativeEligibleSlots:a}=this._getSlotsByMediaType(t),{bannerBidderBidRequests:o,outstreamBidderBidRequests:l,nativeBidderBidRequests:d,multiFormatBannerVideoBidderBidRequests:c,multiFormatBannerNativeBidderBidRequests:h}=this._getBidsForMediaTypes(i,s,n,r,a),u={bannerBidderBidRequests:o,outstreamBidderBidRequests:l,nativeBidderBidRequests:d,multiFormatBannerVideoBidderBidRequests:c,multiFormatBannerNativeBidderBidRequests:h},p=t.sort(((e,t)=>e.auctionPriority-t.auctionPriority)).reduce(((e,t)=>{const i=this._generateAdUnits(t,u);return e.concat(i)}),[]);return this._prebidMethods.addAdUnits(p),this._setAdUnitOnSLot(t),this._setBidsFilter(),p}reset(e=!0){return this._prebidMethods.removeAllAdUnits(e)}_getSlotsByMediaType(e){const t=[],i=[],s=[],n=[],r=[];return e.forEach((e=>{e.location!==Qe.Video_StickyOutstream&&t.push(e),this._mediaType.outstreamEnabled(e).outstreamCapable&&(i.push(e),n.push(e),e.multiformatOutstream=!0),this._mediaType.nativeEnabled(e)&&(s.push(e),r.push(e),e.multiformatNative=!0)})),{bannerEligibleSlots:t,outstreamEligibleSlots:i,nativeEligibleSlots:s,multiFormatBannerVideoEligibleSlots:n,multiFormatBannerNativeEligibleSlots:r}}_getBidsForMediaTypes(e,t,i,s,n){const r=new Map,a=new Map,o=new Map,l=new Map,d=new Map;return this._orderedDisplayBidders.forEach((c=>{c.getBannerBidRequests(e,r),c.getOutstreamBidRequests(t,a),c.getNativeBidRequests(i,o),c.getMultiFormatBannerVideoBidRequests(s,l),c.getMultiFormatBannerNativeBidRequests(n,d)})),{bannerBidderBidRequests:r,outstreamBidderBidRequests:a,nativeBidderBidRequests:o,multiFormatBannerVideoBidderBidRequests:l,multiFormatBannerNativeBidderBidRequests:d}}_applySlotFlags(e){e.forEach((e=>{this._mediaType.outstreamEnabled(e).outstreamCapable&&e.location!==Qe.Video_StickyOutstream&&(e.multiformat=!0,e.outstreamEnabled=!0),this._mediaType.nativeEnabled(e)&&(e.multiformat=!0,e.nativeEnabled=!0)}))}_generateAdUnits(e,t){const i=[],s=e.location===Qe.Video_StickyOutstream,n=this._mediaType.outstreamEnabled(e).outstreamCapable&&!s,r=this._mediaType.nativeEnabled(e);if(this._mediaType.additionalOutstreamUnitsExperiment&&this._updateSlotTargeting(e),s){const s=this._getOutstreamUnit(e,t.outstreamBidderBidRequests);s&&(this._config.prebid.blockableCreativeUnits.push(s.code),i.push(s))}else this.getDisplayAdUnitsFromRequests(e,i,n,r,t);return i}getDisplayAdUnitsFromRequests(e,t,i,s,n){const{bannerBidderBidRequests:r,outstreamBidderBidRequests:a,nativeBidderBidRequests:o,multiFormatBannerVideoBidderBidRequests:l,multiFormatBannerNativeBidderBidRequests:d}=n,c=this._getBannerUnit(e,r);if(c&&t.push(c),a.size&&i){const i=this._getOutstreamUnit(e,a);(null==i?void 0:i.bids.length)&&t.push(i)}if(o.size&&s){const i=this._getNativeUnit(e,o);(null==i?void 0:i.bids.length)&&t.push(i)}if(l.size&&e.multiformat){const i=this._getMultiformatBannerVideoUnit(e,l);(null==i?void 0:i.bids.length)&&t.push(i)}if(d.size&&e.multiformat){const i=this._getMultiformatBannerNativeUnit(e,d);(null==i?void 0:i.bids.length)&&t.push(i)}}_getMultiformatBannerNativeUnit(e,t){const i=!0,s=this._mediaType.nativeEnabled(e)&&i,n={banner:!0,native:this._mediaType.nativeEnabled(e)&&i,outstream:!1},r={banner:!0,native:s,outstream:!1};return this._getBannerUnit(e,t,i,r,n)}_getMultiformatBannerVideoUnit(e,t){const i=!0,s={banner:!0,native:!1,outstream:this._mediaType.outstreamEnabled(e).outstreamCapable&&i},n={banner:!0,native:!1,outstream:this._mediaType.outstreamEnabled(e).outstreamCapable&&i};return this._getBannerUnit(e,t,i,n,s)}_getBannerUnit(e,t,i=!1,s={banner:!0,native:!1,outstream:!1},n={banner:!0,native:!1,outstream:!1}){const r=this.instlEnabled(e.location),a=t.get(e.id),o=this._ortb2.addOrtb2Imp({slot:e},a,r),l=s.outstream,d=s.native;return a?{...i&&{multiformat:i,multiformatNative:d,multiformatVideo:l},...e.bidPoolId&&{bidPoolId:e.bidPoolId},...e.passiveBidPoolId&&{passiveBidPoolId:e.passiveBidPoolId},code:r?this._config.prebid.interstitialAdUnitCode:e.element.id,mediaTypes:this._mediaType.getMediaType({slot:e},n),...o?{ortb2Imp:o}:{},bids:a,viewability:e.viewability}:void 0}_getOutstreamUnit(e,t){const i=this.instlEnabled(e.location),s=t.get(e.id),n=this._ortb2.addOrtb2Imp({slot:e},s,i);return s?{...e.bidPoolId&&{bidPoolId:e.bidPoolId},...e.passiveBidPoolId&&{passiveBidPoolId:e.passiveBidPoolId},code:i?this._config.prebid.interstitialAdUnitCode:e.element.id,mediaTypes:this._mediaType.getMediaType({slot:e},{outstream:!0}),...n?{ortb2Imp:n}:{},viewability:e.viewability,bids:s}:void 0}_getNativeUnit(e,t){const i=this.instlEnabled(e.location),s=t.get(e.id),n=this._ortb2.addOrtb2Imp({slot:e},s,i);return s?{...e.bidPoolId&&{bidPoolId:e.bidPoolId},...e.passiveBidPoolId&&{passiveBidPoolId:e.passiveBidPoolId},code:i?this._config.prebid.interstitialAdUnitCode:e.element.id,mediaTypes:this._mediaType.getMediaType({slot:e},{native:!0}),...n?{ortb2Imp:n}:{},viewability:e.viewability,bids:s}:void 0}_setAdUnitOnSLot(e){e.length&&this._prebidMethods.addToQueue((()=>{const t=this._prebidMethods.getPrebidAdUnits();t&&e.forEach((e=>{const i=t.filter((t=>t.code===e.element.id));i.length&&(e.prebidAdUnit=i)}))}))}_updateSlots(e){e.forEach((e=>{this._updateAdUnitData(e,e.prebidAdUnit);const t=e.prebidAdUnit||[];t.length&&(this._updateAdUnitOrtb2Imp(e,t),this._updateBidderBidParams(e,t))}))}_updateAdUnitOrtb2Imp(e,t){t.forEach((t=>{var i;const s=this._ortb2.addOrtb2Imp({slot:e});s.ext={...null==t||null==(i=t.ortb2Imp)?void 0:i.ext,...null==s?void 0:s.ext},t.ortb2Imp=s}))}_updateBidderBidParams(e,t){t.forEach((t=>{t.bids&&t.bids.length&&t.bids.forEach((t=>{const i=this._bidderSetup.biddersParams.get(t.bidder);i&&(e.highlyViewable&&i&&i.updateBidParams(t,e),i.applyTrafficShapingLabel(e,t))}))}))}_updateAdUnitData(e,t){t&&e.location!==Qe.Video_StickyOutstream&&t.forEach((t=>{var i;if(t.multiformat){const i={banner:!0,native:t.multiformatNative,outstream:t.multiformatVideo};t.mediaTypes=this._mediaType.getMediaType({slot:e},i)}t.viewability=e.refreshCount?Math.max(e.viewability,.7):e.viewability;const s=null==(i=t.mediaTypes)?void 0:i.banner;s&&e.originalSizes&&e.refreshCount>0&&(e.sizes=e.originalSizes,e.originalSizes=void 0,s.sizes=e.sizes)}))}_updateHighImpactUnitTargeting(){const e=this._gam;wc.pushToQueue((()=>{const t="hi_au",i=e.getTargetingValuesForKey(t).filter((e=>"od"!==e&&"om"!==e));i.length?e.setTargeting({key:t,value:i}):e.clearTargetingForKey(t)}))}_shouldIncludeSlot(e){return!this._excludedSlots.includes(e.location)||e.location===Qe.Interstitial&&this.instlEnabled(e.location)}_addOutstreamLabel(e,t){return this._mediaType.isOutstreamAllowed()&&e.forEach((e=>{this._mediaType.outstreamEnabled(e).outstreamCapable&&t.push(`outstreamCapable_${e.placementMapName}`)})),t}_addHvpLabel(e,t){e.forEach((e=>{e.isHighlyViewable()&&t.push(`hvp_${e.placementMapName}`)}))}_addRefreshLabel(e,t){e.forEach((e=>{e.refreshCount>0&&t.push("refresh")}))}_addInitialLabel(e,t){e.forEach((e=>{0===e.refreshCount&&t.push("initial")}))}_addAuctionLabels(e,t,i,s){const n=(i?this._config.prebid.refreshStickyOutstreamAuctionCount:this._config.prebid.refreshAuctionCount)||1;if(!t||1===t&&s)for(let t=0;t{[60,70,80,90].includes(e.hvp)&&t.push("highHVP")}))}_addLabels(e,t,i,s){const n=e.some((e=>e.location===Qe.Video_StickyOutstream));(n||1!==this._config.prebid.refreshAuctionCount)&&this._addAuctionLabels(t,i,n,s),this._addHighHVPLabel(e,t),this._addRefreshLabel(e,t),this._addOutstreamLabel(e,t),this._addHvpLabel(e,t),this._addInitialLabel(e,t)}_setDiscountTargeting(e){var t;const i=(null==e||null==(t=e.googleTagSlot)?void 0:t.getTargeting("hb_adid"))||[],s=(e.bidPoolId?this._prebidMethods.getBidResponsesForBidPoolId(e.bidPoolId):this._prebidMethods.getBidResponsesForAdUnitCode(e.id)).bids.filter((e=>e.adId===i[0]))[0]||{},n=s.responseCpm;if(n){const t=n-s.cpm;e.setSlotTargetingFlag("pbop",[n.toFixed(6).toString()]),e.setSlotTargetingFlag("pbpd",[t.toFixed(6).toString()])}}async _setRefreshOnVideoAdUnit(e){const t=this._prebidMethods;await t.waitForQueue();const i=t.getPrebidAdUnits();e.forEach((e=>{const t=null==i?void 0:i.filter((t=>t.code===e.name))[0];t&&(t.refresh=!0)}))}async _awaitPrebidReady(){return new Promise((e=>{this._prebidEventBus.initialized.once((()=>{e()}))}))}_getBiddingData(e){var t;const{bids:i,requests:s}=null!=(t=this._previousAuctionData.get(e))?t:{bids:[],requests:[]},n=[],r=[];var a;return s.length?(s.forEach((e=>{var t;const i=null!=(t=e.bidder)?t:e.bidderCode;n.includes(i)||n.push(i)})),i.forEach((e=>{var t;const i=null!=(t=e.bidderCode)?t:e.bidder;r.includes(i)||r.push(i)})),{requests:n.length,responses:r.length}):null!=(a=this._previousBidRateData)?a:{requests:0,responses:0}}async _setBidsInCache(e){const t=new Map;return new Promise((i=>{this.checkLibLoaded().then((async s=>{s&&e.length?(this._initialized||await this._awaitPrebidReady(),e.forEach((e=>{const i="id"in e?e.id:e.name,s=(this._getActiveBidsInPool(i)||[]).length;t.set(i,s)})),i(t)):i(t)})).catch((e=>{i(t)}))}))}_getBidCacheTargeting(e){const t=new Map;return new Promise((i=>{this.checkLibLoaded().then((async s=>{s&&e.length?(this._initialized||await this._awaitPrebidReady(),e.forEach((e=>{const i="id"in e?e.id:e.name,s="id"in e?e.refreshCount:e.prerollNum,n="id"in e?e.bidPoolId:void 0;t.set(i,this._getBidsInCache(i,s,n))})),i(t)):i(t)})).catch((e=>{i(t)}))}))}async setPreAuctionBidCacheData(e){return this._setBidsInCache(e)}setDisplayBidCacheTargeting(e){return this._getBidCacheTargeting(e)}setInstreamBidCacheTargeting(e){return this._getBidCacheTargeting(e)}clearAuctionTargeting(e){this._prebidMethods.clearSlotTargeting(e)}requestBids(e,t=this._config.timeouts.initialBidsRequest,i=[],s=0,n=!0,r=!1){return e=e.filter((e=>this._shouldIncludeSlot(e))),new Promise((a=>{this.checkLibLoaded().then((async o=>{const l=e.map((e=>e.name)),d=Tc.markStartTask("microtask",["PrebidAuctionManager","requestBids","first","task"]);d.addMetadata({slotNames:l});const c=e.map((e=>this.instlEnabled(e.location)?this._config.prebid.interstitialAdUnitCode:e.element.id));let h=!1;const{reducer:u,sorter:p}=this._getBidSorters(c,e),g=()=>{h=!0,d.markEndTask(),a()},m=()=>{h||(n&&this._displayBidsBackhandler({},c,e,u,p),g())};if(!o||!e.length)return void g();d.markEndTask(),this._initialized||await this._awaitPrebidReady();const _=Tc.markStartTask("microtask",["PrebidAuctionManager","requestBids","second","task"]);_.addMetadata({slotNames:l}),this._addLabels(e,i,s,n),r&&this._updateSlots(e),this._buildRequest(c,e,t,i,n,a);const f=t+(e[0].refreshCount?0:this._config.prebid.failsafeTimeout),v=()=>{this._prebidMethods.addToQueue((()=>{setTimeout(m,f)}))};this._bootstrapConfig.gptLibFailedToLoad?v():wc.pushToQueue((()=>v)),_.markEndTask()})).catch((e=>{W.error("PrebidAuctionManager","requestBids",e),a()}))}))}_buildRequest(e,t,i=this._config.timeouts.initialBidsRequest,s=[],n=!0,r,a,o){this._prebidMethods.requestBids({adUnitCodes:e,timeout:i,bidsBackHandler:i=>{n&&this._displayBidsBackhandler(i,e,t,a,o),r()},labels:s})}_getBidSorters(e,t){var i;const s=e.length>1,n=(null==(i=t[0])?void 0:i.location)===Qe.Video_StickyOutstream;let r,a;return!s&&n&&(r=this.cpmByDurationReducer.bind(this),a=this.cpmByDurationSorter.bind(this)),{reducer:r,sorter:a}}_displayBidsBackhandler(e,t,i,s,n){if(this._userSyncTriggerComponent.triggerUserSyncBasedOnExperiment("onBidsBackHandler"),this._bootstrapConfig.gptLibFailedToLoad)this.handleRenderingSlotsWhenGoogleAdManagerFailed(i);else{var r;this._config.fledge.enabled&&this._prebidMethods.setPAAPIConfigForGPT({adUnitCode:t[0]});const a=!!((null==(r=i[0])?void 0:r.location)===Qe.Footer)&&this._roadblocksDetection.isRoadblock(e);a&&this._gam.setTargeting({key:"rb_crid",value:String(this._roadblocksDetection.creativeId)});const o=a?2:1;this._prebidMethods.setTargetingForGPTAsync(t,null,i[0].bidPoolId,o,s,n),this._setDiscountTargeting(i[0]),i.forEach((e=>{e.addRequestTypeSlotFlag()})),this.setCurrencySlotTargetingFlag(i[0])}}_updateOrtb2WithJwPlayerSegments(e,t){var i,s,n,r,a;const o=dg(t),l=(null==(n=o.site)||null==(s=n.content)||null==(i=s.data)?void 0:i.filter((e=>"jwplayer.com"!==e.name)))||[];var d;const c={ext:{segtax:502,cids:[e.nextMediaId]},name:"jwplayer.com",segment:null!=(d=null==(r=e.jwPlayerSegments)?void 0:r.map((e=>({id:e}))))?d:[]};return l.push(c),o.site={...o.site,content:{...null==(a=o.site)?void 0:a.content,data:l}},o}requestVideoBids(e,t=this._config.timeouts.initialBidsRequest){e.forEach((e=>this._instreamAuctionRefreshByPlayer.set(e.name,e.prerollNum)));const i=e.map((({name:e})=>e)),s=this._prebidMethods.getConfig("ortb2")||{},n=!xu(e[0]);let r={};return n&&(r=this._updateOrtb2WithJwPlayerSegments(e[0],s)),new Promise((s=>{let a=!1;const o=()=>{s(),a=!0},l=()=>{a||s()};this.checkLibLoaded().then((async s=>{s||o(),this._initialized||await this._awaitPrebidReady(),this._setRefreshOnVideoAdUnit(e),this._prebidMethods.requestBids({adUnitCodes:i,timeout:t,bidsBackHandler:t=>{this._videoBidsBackhandler(t,e),o()},...n?{ortb2:r}:{}});const a=t+(e[0].prerollNum?0:this._config.prebid.failsafeTimeout),d=()=>{this._prebidMethods.addToQueue((()=>{setTimeout(l,a)}))};this._bootstrapConfig.gptLibFailedToLoad?d():wc.pushToQueue((()=>d))})).catch((e=>{W.error("PrebidAuctionManager","requestVideoBids",e),o()}))}))}_getActiveBidsInPool(e,t){const i=this._prebidMethods;var s;const n=(null!=(s=t?i.getBidResponsesForBidPoolId(t):i.getBidResponsesForAdUnitCode(e))?s:{}).bids;return null==n?void 0:n.filter((t=>this._filterUnusedBids(t,e)))}_filterUnusedBids(e,t){const i=e.ttl||300;e.responseTimestamp=e.responseTimestamp||(new Date).getTime();const s=e.responseTimestamp+1e3*i>(new Date).getTime(),n=e&&(!e.sharedBidInUse||e.sharedBidInUse===t)&&"rendered"!==e.status;return s&&n}_videoBidsBackhandler(e,t){var i,s;this._userSyncTriggerComponent.triggerUserSyncBasedOnExperiment("onBidsBackHandler");const n=t[0].videoAdUnit,r=null==n||null==(s=n.mediaTypes)||null==(i=s.video)?void 0:i.maxduration;if(n&&r&&e[n.code]){const i=e[n.code].bids;i.forEach((e=>{e.maxDuration=r})),t[0].setPrebidBids(i)}}setCurrencySlotTargetingFlag(e){if(this._config.prebid.currencyConversionEnabled){const t="bidcur";let i=[];i=e.bidPoolId?this._prebidMethods.getHighestCpmBidsForPoolId(e.bidPoolId):this._prebidMethods.getHighestCpmBids(e.id);const s=null==i?void 0:i[0],n=null==s?void 0:s.originalCurrency,r=null==s?void 0:s.currency;s&&r&&n!==r?e.setSlotTargetingFlag(t,[n||"undefined",r],!0):e.clearSlotTargetingFlag([t])}}handleRenderingSlotsWhenGoogleAdManagerFailed(e){e.forEach((e=>{e.isRefreshing=!1,this._slotEventBus.triggerRenderOutsideGam.emit(e.id)}))}addVideoSlots(e){const t=new Map;this._orderedVideoBidders.forEach((i=>{i.getVideoBidRequests(e,t)}));const i=e.map((e=>{const i=t.get(e.name),s=this._ortb2.addOrtb2Imp({video:e},i),n={code:e.name,ortb2Imp:s,mediaTypes:this._mediaType.getMediaType({video:e}),bids:i};return e.videoAdUnit=n,this._config.prebid.blockableCreativeUnits.push(n.code),n}));this._prebidMethods.addAdUnits(i),this._videoEventBus.videoAdUnitAdded.emit()}refreshBids(e,t=0,i=!0){return e.forEach((e=>{var t;null==(t=e.prebidAdUnit)||t.forEach((e=>e.refresh=!0))})),this.requestBids(e,this._config.timeouts.refreshBidsRequest,[],t,i,!0)}checkLibLoaded(){return new Promise((e=>{this._bootstrapConfig.bootstrapLoaders[Be.Prebid].then((()=>e(!0))).catch((()=>e(!1)))}))}shouldTurnOffPrebidBasedOnGeoAndDevice(){var e;const t=null!=(e=this._context.country)?e:"US",i=!this._highRevGeoCountries.includes(t)&&Ki()&&ci(),s=Ur.isRolloutEnabled("disable-prebid-non-high-geo-mob-chromium");return!!i&&s}get enabled(){return!(this.shouldTurnOffPrebidBasedOnGeoAndDevice()||oi())}cpmByDurationReducer(e,t){return this.getBidCpmByDuration(e){const{bidder:t,cpm:i,adUnitCode:s,dealId:n,originalCpm:r,responseCpm:a,meta:o}=e,{hb_pb:l,hb_format:d}=e.adserverTargeting,c=this._slots.get(s),h=c?c.refreshCount:"";W.event("PrebidAuctionManager","_handleExpiredRender",{bidder:t,cpm:i,originalCpm:r,responseCpm:a,hb_pb:l,hb_format:d,meta:o,adUnitCode:s,nref:h,dealId:n})}))}constructor(e,t,i,s,n,r,a,o,l,d,c,h,u,p,g,m,_,f,v,y,b,S,E,C,T,w,k,A,I){super(),this._bootstrapConfig=t,this._config=i,this._context=s,this._gam=n,this._s2s=r,this._bidderSetup=a,this._mediaType=o,this._prebidMethods=l,this._prebidConfiguration=d,this._predictiveAnalysisExperiment=c,this._userSyncTriggerComponent=h,this._slots=u,this._creativeMonitoring=p,this._ortb2=g,this._oseq=m,this._gdprEnforcement=_,this._prebidEventBus=f,this._slotEventBus=v,this._videoEventBus=y,this._floorsEventBus=b,this._sspTakeRateMonitorExperiment=S,this._userIdComponent=E,this._sspUserSyncComponent=C,this._googleAdManagerEventBus=T,this._roadblocksDetection=w,this._genericAnalytics=k,this._liveRampSecureSignalsExperiment=A,this._assertiveYieldAnalytics=I,this.videoAdUnits=[],this.bidsRequested=new V,this._isBeforeRequestEventLoaded=!1,this._excludedSlots=[Qe.Interstitial,Qe.Native_Recipe],this._defaultVideoDuration=30,this._bidResponseForAdUnitCount=new Map,this._highRevGeoCountries=["US","CA","AU","DE","NZ","GB","UK"],this._bseatAppRequests=["537073292","2307","377","39","5510"],this._initialized=!1,this._previousAuctionData=new Map,this._instreamAuctionRefreshByPlayer=new Map,this._usedFloorAuctionIds=[],this._maxClearBidAttempts=3,this._setAuctionFloors=e=>{var t,i,s;const n=(null==e?void 0:e.auctionId)&&!this._usedFloorAuctionIds.includes(e.auctionId),r=(null==(t=e.bids)?void 0:t.length)>0&&(null==(s=e.bids)||null==(i=s[0])?void 0:i.floorData),a=this._config.prebid.s2s.bidders.includes(e.bidderCode),o=this._config.prebid.serverBidderInflatorMap.get(e.bidderCode);n&&r&&this._setBidRequestedFloorData(e),r&&a&&o&&this._applyServerBidderInflator(e,o),this.bidsRequested.emit()},this._orderedDisplayBidders=this._bidderSetup.orderedDisplayBidders,this._orderedVideoBidders=this._bidderSetup.orderedVideoBidders,this._videoCreativeIdMapping=this._bidderSetup.videoCreativeIdMapping,this._predictiveAnalysisResult=this._predictiveAnalysisExperiment.result||void 0,this._predictiveAnalysis=e.core.predictiveAnalysis,this._orderedMultiformatBidders=this._bidderSetup.multiFormatBidders,this._appDataBidders=this._config.prebid.appBidders,this._analytics=[this._genericAnalytics,this._assertiveYieldAnalytics].filter((e=>e.enabled))}}If=B([bn("PrebidAuctionManager"),M(),F(0,L("AdThrive")),j("design:type",Function),j("design:paramtypes",["undefined"==typeof AdThrive?Object:AdThrive,void 0===ka?Object:ka,void 0===_c?Object:_c,void 0===Fr?Object:Fr,void 0===wc?Object:wc,void 0===bf?Object:bf,void 0===V_?Object:V_,void 0===Hm?Object:Hm,void 0===Mn?Object:Mn,void 0===tf?Object:tf,void 0===sf?Object:sf,void 0===Ef?Object:Ef,void 0===ra?Object:ra,void 0===H_?Object:H_,void 0===Lu?Object:Lu,void 0===$_?Object:$_,void 0===Mu?Object:Mu,void 0===Jn?Object:Jn,void 0===Bn?Object:Bn,void 0===rr?Object:rr,void 0===Yn?Object:Yn,void 0===Cf?Object:Cf,void 0===Cp?Object:Cp,void 0===Af?Object:Af,void 0===Sc?Object:Sc,void 0===wf?Object:wf,void 0===xg?Object:xg,void 0===Tf?Object:Tf,void 0===kp?Object:kp])],If);const xf=e=>{if(!Number.isFinite(e))return"";let t="";return t=e<=.04?"00.00_00.04":e<=3?"00.05_03.00":e<=5?"03.05_05.00":e<=10?"05.05_10.00":"10.10_100.00",t};class Pf extends Er{init(){this._key="ViewportSampling",this._lookup="VPSM",this._default=!1}}Pf=B([bn("ViewportSamplingExperiment"),M()],Pf);class Of{_setSlotEvents(){this._slotEventBus.addSlots.on((e=>this._addSlots(e))),this._slotEventBus.requestingBids.on((e=>this._requestBids(e))),this._slotEventBus.beforeGoogleAdManagerRefreshSlots.on((e=>this._beforeGoogleAdManagerRefreshSlots(e))),this._slotEventBus.refreshingBids.on((e=>this._refreshBids(e.managedSlotsIds,e.auctionCount,e.setTargeting))),this._slotEventBus.addRangeSlotTargeting.on((e=>this._addRangeSlotTargeting(e))),this._gamEventBus.slotRenderEnded.on((e=>{this._clearLastAuctionKeyValueTargeting(e.slotId)}))}_setVideoEvents(){this._videoEventBus.videoPlayerAdded.on((e=>this._addVideoSlots(e))),this._videoEventBus.requestingVideoBids.on((({videos:e,timeout:t})=>this._requestVideoBids(e,t))),this._videoEventBus.buildingVastAdURL.on((e=>this._setInstreamBidCacheTargeting(e)))}_awaitTrafficShapingLoaded(){return this._config.trafficShaping.trafficShapingEventPromise}_awaitRaptiveMLFloorsLoaded(){return this._config.floors.raptiveMLFloorsEventPromise}init(){this._auctionManagers.forEach((e=>{this._auctionManagerInit(e)}))}async _auctionManagerInit(e){const t=this._config;t.trafficShaping.trafficShapingLoaded||await this._awaitTrafficShapingLoaded(),t.floors.raptiveMLFloorsLoaded||await this._awaitRaptiveMLFloorsLoaded(),void 0!==e.init&&e.init()}_clearLastAuctionKeyValueTargeting(e){const t=this._slots.get(e);t&&this._auctionManagers.forEach((e=>e.clearAuctionTargeting(t)))}_addRangeSlotTargeting(e){this._slots.get(e).forEach((e=>{const t=e.googleTagSlot,i=(null==t?void 0:t.getTargetingKeys())||[];let s=null;["hb_pb","amz_pb","amz_pb_sp"].forEach((e=>{if(i.includes(e)){const i=Number(null==t?void 0:t.getTargeting(e)[0]);(!s||s&&i>s)&&(s=i)}})),s&&e.setTargeting({key:"hb_rpb",value:xf(s)})}))}async _beforeGoogleAdManagerRefreshSlots(e){const t=this._slots.get(e);await this._setDisplayBidCacheTargeting(t)}async _requestBids(e){const t=this._slots.get(e);await this._setPreAuctionBidCacheData(t),await Ha(),await Promise.all(this._auctionManagers.map((e=>e.requestBids(t))))}async _setDisplayBidCacheTargeting(e){const t=await Promise.all(this._auctionManagers.map((t=>t.setDisplayBidCacheTargeting(e))));e.forEach((e=>{const i=this._getBidCacheTargeting(e.id,t,e.refreshCount);this._setDisplayBidCacheTargetingOnSlot(e,i)}))}_setDisplayBidCacheTargetingOnSlot(e,t){const i=e.id,s=this._getTargetingMap(i,t);if(Object.keys(s).forEach((t=>{const i=t;var n;e.setSlotTargetingFlag(t,[null!=(n=s[i])?n:"none"],!0)})),this._viewportSamplingExperiment.result){const t=e.getPositionFromViewport().toString();e.setSlotTargetingFlag("v",[t],!0)}}async _setInstreamBidCacheTargeting(e){const t=await Promise.all(this._auctionManagers.map((t=>t.setInstreamBidCacheTargeting(e))));e.forEach((e=>{const i=this._getBidCacheTargeting(e.name,t,e.prerollNum);this._setInstreamBidCacheTargetingMap(e,i)}))}_getTargetingMap(e,t){var i,s;const n=t.bids.sort(((e,t)=>t.cpm-e.cpm));var r;const a=null!=(r=this._getBidRate(t))?r:"none";var o,l,d;return this._lastAuctionData.set(e,{...t,bidRate:a}),{bic:(null!=(o=this._bidsInCacheMap.get(e))?o:0).toString(),tbc:null==n||null==(i=n[0])?void 0:i.cpm.toFixed(2),"2bc":null!=(l=null==n||null==(s=n[1])?void 0:s.cpm.toFixed(2))?l:"none",medb:null!=(d=this._getMedianBid(n))?d:"none",bidr:a}}async _setPreAuctionBidCacheData(e){const t=await Promise.all(this._auctionManagers.map((t=>t.setPreAuctionBidCacheData(e))));e.forEach((e=>{const i="id"in e?e.id:e.name,s=this._getBidsInCacheValue(i,t);this._setBidsInCache(i,s.bids)}))}_setBidsInCache(e,t){this._bidsInCacheMap.set(e,t)}_getBidsInCacheValue(e,t){return t.reduce(((t,i)=>{var s;const n=null!=(s=i.get(e))?s:0;return t.bids+=n,t}),{bids:0})}_getBidCacheTargeting(e,t,i){const s=this._lastAuctionData.get(e),n=(null==s?void 0:s.refresh)===i?s:{bids:[],requests:0,responses:0,refresh:0,bidRate:0};return t.reduce(((t,i)=>{const s=i.get(e);return s&&Object.keys(s).forEach((e=>{const i=e,n=s[i];n&&("bids"===i&&Array.isArray(n)&&n.length?t[i]=[...t[i],...n]:"refresh"===i&&"number"==typeof n?t[i]=n:"bids"!==i&&"number"==typeof n&&(t[i]+=n))})),t}),n)}_setInstreamBidCacheTargetingMap(e,t){const i=e.name;e.lastAuctionBidDetails=this._getTargetingMap(i,t)}_getBidRate(e){const{requests:t,responses:i}=e;return(i/(t||1)).toFixed(2)}_getMedianBid(e){const t=e.length;if(!t)return;let i;if(1===t)i=e[0].cpm;else{const s=t%2==0,n=Math.floor(t/2);i=s?(e[n].cpm+e[n-1].cpm)/2:e[n].cpm}return i.toFixed(2)}async _refreshBids(e,t=0,i=!0){const s=this._slots.get(e);s.forEach((e=>{var t;null==(t=e.googleTagSlot)||t.clearTargeting("hb_rpb")})),await this._setPreAuctionBidCacheData(s),await Promise.all(this._auctionManagers.map((e=>e.refreshBids(s,t,i))))}_addSlots(e){const t=this._slots.get(e);this._auctionManagers.forEach((e=>{void 0!==e.addSlots&&e.addSlots(t)}))}_addVideoSlots(e){this._auctionManagers.filter((e=>e.videoEnabled&&e.addVideoSlots)).forEach((t=>t.addVideoSlots(e)))}async _requestVideoBids(e,t){await this._setPreAuctionBidCacheData(e),await Promise.all(this._auctionManagers.filter((e=>e.videoEnabled)).map((i=>i.requestVideoBids(e,t))))}getPrebidAuctionManager(){for(const e of this._auctionManagers)if(e instanceof If)return e}getAmazonAuctionManager(){for(const e of this._auctionManagers)if(e instanceof ju)return e}constructor(e,t,i,s,n,r,a,o){this._config=e,this._slotEventBus=s,this._videoEventBus=n,this._gamEventBus=r,this._viewportSamplingExperiment=a,this._slots=o,this._bidsInCacheMap=new Map,this._lastAuctionData=new Map,this._auctionManagers=[i,t].filter((e=>e.enabled)),this._setSlotEvents(),this._setVideoEvents()}}Of=B([bn("AuctionManagers"),M(),j("design:type",Function),j("design:paramtypes",[void 0===_c?Object:_c,void 0===If?Object:If,void 0===ju?Object:ju,void 0===Bn?Object:Bn,void 0===rr?Object:rr,void 0===Sc?Object:Sc,void 0===Pf?Object:Pf,void 0===ra?Object:ra])],Of);class Rf{init(){if(this._commands.length>0){for(const e of this._commands){this._isGamMethod(e.toString())?this._addToGamQueue(e):this._call(e)}this._commands=[]}}push(e){if(this._commands.length>0)this._commands.push(e);else{this._isGamMethod(e.toString())?this._addToGamQueue(e):this._call(e)}}_call(e){try{e.call(void 0)}catch(e){W.error("CommandQueue","_call","Error calling command",e)}}_isGamMethod(e){return e&&(e.includes("setTargeting(")||e.includes("setTargetingFlag(")||e.includes("getTargeting(")||e.includes("getTargetingMap(")||e.includes("googletag")||e.includes("pubads"))}_addToGamQueue(e){wc.pushToQueue((()=>{this._call(e)}))}constructor(e){this._commands=e.cmd||[]}}Rf=B([M(),F(0,L("AdThrive")),j("design:type",Function),j("design:paramtypes",["undefined"==typeof AdThrive?Object:AdThrive])],Rf);class Lf{constructor(){this.wasClosed=!1,this.wasStarted=!1,this.totalTimeCollapsed=0}}Lf=B([bn("CollapsibleVideoLoggingStore"),M()],Lf);class Df{init(){}calculateCookieSizes(e){const t=this.getCookies();let i=0,s=0;t.forEach((e=>{const t=new Blob([e.value]).size;this.knownCookieKeys.includes(e.name)?i+=t:s+=t})),this.cookieEvents.push({e:e,knownSize:i,unknownSize:s})}getCookies(){const e=[];return document.cookie.split(";").forEach((t=>{const[i,s]=t.split("=").map((e=>e.trim()));e.push({name:i,value:s})})),e}constructor(e){this._identityEventBus=e,this.knownCookieKeys=["AMZN-Token","ccuid","ccsid","usprivacy","_pubcid","_pubcid_exp","connectId","lidid","TAPAD","panaoramaId","panaoramaId_expiry","krg_crb","krg_uid","cto_bundle","__li_idex_cache_e30"],this.cookieEvents=[],this._identityEventBus.dataCaptured.on((()=>{setTimeout((()=>this.calculateCookieSizes("piiSubmitted")),2e3)}))}}Df=B([bn("CookieDataStorage"),M(),j("design:type",Function),j("design:paramtypes",[void 0===Qn?Object:Qn])],Df);class Mf extends Er{init(){this._key="UserPageDataLogging",this._lookup="UPL",this._default=!1}}Mf=B([bn("UserPageDataLoggingExperiment"),M()],Mf);class Bf extends Er{init(){this._key="UserPageDataPrivacyLogging",this._lookup="DATAPRIV",this._default=!1}}Bf=B([bn("UserPageDataPrivacyLoggingExperiment"),M()],Bf);class Ff extends Fn{init(){this._setupSlotManagerEventListeners(),this._setupUserPageDataLogEventCallbacks(),this._logUserPrivacyData().catch((()=>{W.error("_logUserPrivacyData: ","Could not log user privacy.")})),this._setLoadTimingProperties()}get enabled(){return this._userPageDataLoggingExperiment.result}_getBuildData(){const e=Wi(),t=e&&e.buildDate;return{bundleBuildDate:window.adthrive.buildDate,...t?{clsBuildDate:t}:{}}}_setTimingData(e,t,i){var s;if(null==(s=window.performance)?void 0:s.timing){const s=window.performance.timing;if(s&&0!==s.navigationStart){const r={pageLoad:s.loadEventStart-s.navigationStart,domainLookup:s.domainLookupEnd-s.domainLookupStart,connect:s.connectEnd-s.connectStart,request:s.responseStart-s.requestStart,response:s.responseEnd-s.responseStart,navigation:s.fetchStart-s.navigationStart,domInteractive:s.domInteractive-s.navigationStart,domContentLoaded:s.domContentLoadedEventStart-s.navigationStart};if(Object.keys(r).map((e=>r[e])).every((e=>!isNaN(e)&&e>=0&&e<36e5))){this._setNonBlockingLibraryTimingData();const{reasons:s}=this._config.disableAds;var n;this._timingData={...r,...this._config.timing.timingData,disableAds:s.size>0?[...s].join(","):"none",cookieDeprecationLabel:null!=(n=this._config.fledge.cookieDeprecationLabel)?n:"none",auctionStarted:e,auctionFinished:t,displayed:i}}}}}_setNonBlockingLibraryTimingData(){this._config.timing.setNonBlockingLibraryTimingData(this._bootstrapConfig.bootstrapResult)}_logUserData(){this._cookieDataStorage.calculateCookieSizes("userDataLogged"),this._userPageDataLogEvents.loggingData.emit(),this._userPageDataLogEvents.setUserPageData({...this._timingData&&{UserPageTimingData:this._timingData},UserPageDataLoggingComponent:this._getUserData(),performanceTimingData:this._performanceTimingData})}async _logUserPrivacyData(){this._userPageDataPrivacyLoggingExperiment.result&&(this._userPrivacyData=await this._getUserPrivacyData())}async _getUserPrivacyData(){return{gpc:"navigator"in window&&"globalPrivacyControl"in window.navigator?window.navigator.globalPrivacyControl:null,dcp:await this._getDataConsent()}}async _getDataConsent(){if("dataConsentPreference"in document)try{return await document.dataConsentPreference()}catch(e){return null}return null}_getEventTiming(e,t){var i;var s;return null!=(s=((null==(i=window.performance)?void 0:i.getEntriesByType(e).filter(t))||[])[0])?s:{}}_getEventTimingProperties(e,t,i){const s={},n=this._getEventTiming(e,t);return i.forEach((e=>{var t;s[e]=null!=(t=null==n?void 0:n[e])?t:null})),s}_getEventRegex(e){switch(e){case"adsmin":return/ads\.adthrive\.com\/sites\/.*\/ads\.min\.js\?.*/;case"marmalade":return/ads\.adthrive\.com\/api\/.*\/marmalade\?.*/;case"floors":return/ads\.adthrive\.com\/api\/.*\/raptiveFloors\.*/}return new RegExp("")}_setLoadTimingProperties(){const{duration:e}=this._getEventTimingProperties("resource",(e=>e.name.includes("adthrive.min.js")),["duration"]),t=this._getEventRegex("adsmin"),{duration:i,startTime:s}=this._getEventTimingProperties("resource",(e=>t.test(e.name)),["duration","startTime"]),{duration:n,responseEnd:r}=this._getEventTimingProperties("resource",(e=>e.name.includes("gpt.js")),["responseEnd","duration"]),a=this._getEventRegex("marmalade"),{responseEnd:o}=this._getEventTimingProperties("resource",(e=>a.test(e.name)),["responseEnd"]),l=this._getEventRegex("floors"),{responseEnd:d}=this._getEventTimingProperties("resource",(e=>l.test(e.name)),["responseEnd"]),c=Math.max(o,r,d),{domContentLoadedEventEnd:h,startTime:u,responseEnd:p,domInteractive:g,domContentLoadedEventStart:m,domComplete:_,loadEventStart:f,loadEventEnd:v}=this._getEventTimingProperties("navigation",(e=>!!e),["domContentLoadedEventEnd","startTime","responseEnd","domInteractive","domContentLoadedEventStart","domComplete","loadEventStart","loadEventEnd"]);this._performanceTimingData={durations:{adsMinLoadDuration:i,adCodeLoadDuration:e,gptLoadDuration:n},endTimes:{marmaladeEndTime:o,gptEndTime:r,floorsEndTime:d,domReadyEndTime:h},totalLoadTime:c-s,startTime:u,responseEnd:p,domInteractive:g,domContentLoadedEventStart:m,domContentLoadedEventEnd:h,domComplete:_,loadEventStart:f,loadEventEnd:v}}constructor(e,t,i,s,n,r,a,o,l,d,c,h){super(),this._bootstrapConfig=e,this._config=t,this._context=i,this._pageManager=s,this._spaEventBus=n,this._prebidMethods=r,this._userPageDataLoggingExperiment=a,this._userPageDataPrivacyLoggingExperiment=o,this._userPageDataLogEvents=l,this._collapsibleVideoLoggingStore=d,this._cookieDataStorage=c,this._slotManagerEventBus=h,this._userPrivacyData={},this._performanceTimingData={},this._setupSlotManagerEventListeners=()=>{const{reasons:e}=this._config.disableAds,t=0!==e.size,i={requestingBids:null,requestedBids:null,displayed:null};let s={...i,pageLoaded:!1};const n=(e,t)=>{s[e]=t,"number"==typeof s.requestingBids&&"number"==typeof s.requestedBids&&"number"==typeof s.displayed&&s.pageLoaded&&(this._setTimingData(s.requestingBids,s.requestedBids,s.displayed),s={...s,...i})};t?(s.requestedBids=0,s.requestingBids=0,s.displayed=0):(this._slotManagerEventBus.requestingBids.once((()=>n("requestingBids",fn()))),this._slotManagerEventBus.requestedBids.once((()=>n("requestedBids",fn()))),this._slotManagerEventBus.displayed.once((()=>n("displayed",fn())))),Ws().then((()=>n("pageLoaded",!0)))},this._setupUserPageDataLogEventCallbacks=()=>{Ki()&&this._userPageDataLogEvents.addCallbackToQueue([this._pageManager.visibilityChange],(()=>{"hidden"===document.visibilityState&&this._logUserData()})),this._userPageDataLogEvents.addCallbackToQueue([this._pageManager.beforeUnload,this._pageManager.pageHide,this._spaEventBus.routeChanged],(()=>this._logUserData()))},this._getUserData=()=>({...this._getBuildData(),device:this._context.device,gptv:googletag&&googletag.getVersion&&googletag.getVersion(),timePageOpen:fn()-this._config.timing.started,timeOnPage:this._config.timing.totalTimeOnPage,viewportWidth:window.innerWidth,viewportHeight:window.innerHeight,video:{nonclose:!this._collapsibleVideoLoggingStore.wasClosed,playerName:this._collapsibleVideoLoggingStore.playerName,totalTimeCollapsed:this._collapsibleVideoLoggingStore.totalTimeCollapsed,wasStarted:this._collapsibleVideoLoggingStore.wasStarted},cookieEvents:this._cookieDataStorage.cookieEvents,...this._userPrivacyData,...!this._config.gdpr.enabled&&!this._config.ccpa.userOptedOut&&{uid1:dn("adserver.org",this._prebidMethods.isPrebidLoaded())}})}}Ff=B([bn("UserPageDataLoggingComponent"),D(),j("design:type",Function),j("design:paramtypes",[void 0===ka?Object:ka,void 0===_c?Object:_c,void 0===Fr?Object:Fr,void 0===Mr?Object:Mr,void 0===ir?Object:ir,void 0===Mn?Object:Mn,void 0===Mf?Object:Mf,void 0===Bf?Object:Bf,void 0===Yd?Object:Yd,void 0===Lf?Object:Lf,void 0===Df?Object:Df,void 0===nr?Object:nr])],Ff);const jf=()=>window.location.origin+"/"===window.location.href.split("?")[0];class Nf{add(e,t,i,s=document){this._map.push({el:e,coords:t,dynamicAd:i,target:s})}get map(){return this._map}sort(){this._map.sort((({coords:e},{coords:t})=>e-t))}filterUsed(){this._map=this._map.filter((({dynamicAd:e})=>!e.used))}reset(){this._map=[]}constructor(){this._map=[]}}class Uf extends Nf{}Uf=B([M()],Uf);class Vf extends Er{init(){this._key="AdDensity",this._lookup="ADDENS",this._default=!1}}Vf=B([bn("RealizedAdDensityExperiment"),M()],Vf);const zf=e=>{const t=e.firstChild?e.firstChild:void 0,i=t?getComputedStyle(t).height:"0px";return Number(i.slice(0,-2))};class Hf extends Fn{init(){this._realizedAdDensityEventBus.metricsRequested.on((e=>e(this._getAdDensity())));const[e]=cs(this._config.dynamicAds,this._adInjectionMap);this._mainContent=e,null!==this._mainContent&&(this._gamEventBus.slotOnload.once((()=>{setTimeout((()=>{this._getSlotHeights(),this._mainContent&&this._initObserver(this._mainContent)}),this._initialSlotsTimeout)})),this._slotManagerEventBus.added.on((e=>{const t=this._slots.get(e);t.some((e=>e.infinite))||this._addSlots(t)})),this._userPageDataLogEvents.addCallbackToQueue([this._pageManager.beforeUnload],(()=>this._logAdDensity())))}_getAdDensity(){return this.enabled,{...this._endMainContentHeight&&this._slotsHeightEnd&&{addensend:Math.round(this._slotsHeightEnd/this._endMainContentHeight*100)}}}_logAdDensity(){const e=this._getAdDensity();Object.keys(e).length>0&&this._userPageDataLogEvents.setUserPageData({AdDensityComponent:e})}_addSlots(e){e.filter((e=>this._slotsForAdDensity.has(e.location))).filter((e=>!e.element.classList.contains("adthrive-slicksearch"))).forEach((e=>{!e.lazy&&this._addToMainContent.has(e.location)&&this._slotsForMainContent.add(e.name),this._slotsForEnd.add(e.name)}))}isSlotInMainContent(e){var t;return!(!(null==(t=this._mainContent)?void 0:t.querySelector(`#${e.id}`))||this.isSlotInComment(e))}isSlotInComment(e){return!(!this._commentElem||!this._commentElem.querySelector(`#${e.id}`))}_getSlotHeights(){let e=0;this._slots.get().forEach((t=>{this._slotsForMainContent.has(t.name)&&(e+=t.element.offsetHeight)})),this._mainContent&&(this._initMainContentHeight=ls(this._mainContent),this._initMainContentHeight+=e)}_commentElementHasAdSlots(e){return this._slots.get().some((t=>e.querySelector(`#${t.id}`)&&t.location===Qe.Below_Post))}_initObserver(e){const t=e.querySelector(os);this._observer=this.getIntersectionObserver(t),null!==t&&this._commentElementHasAdSlots(t)?(this._commentElem=t,this._elementBeingObserved="comment",this._observer.observe(this._commentElem)):(this._elementBeingObserved="mainContent",this._observer.observe(e))}getIntersectionObserver(e){return new IntersectionObserver((t=>{for(const n of t)if(null!==this._initMainContentHeight){var i,s;if("mainContent"===this._elementBeingObserved&&n.isIntersecting)this._calculateSlotHeightsAtEnd(),null==(i=this._observer)||i.unobserve(this._mainContent);if(null!==e&&"comment"===this._elementBeingObserved&&n.boundingClientRect.top>0)this._calculateSlotHeightsAtEnd(),null==(s=this._observer)||s.unobserve(e)}}),{})}_calculateSlotHeightsAtEnd(){let e=0,t=0;if(this._slots.get().forEach((i=>{if(this._slotsForEnd.has(i.name)&&(i.location!==Qe.Content||this.isSlotInMainContent(i))){const t=zf(i.element);t&&t>1?this._parallaxExperiment.result&&t>=600&&t<=750?e+=400:e+=t:e+=i.element.offsetHeight}this._slotsForMainContent.has(i.name)&&(t+=i.element.offsetHeight)})),this._slotsHeightEnd=e,this._mainContent&&(this._endMainContentHeight=ls(this._mainContent),this._endMainContentHeight+=t),this._config.video.playlistPlayerAdded){const t=document.querySelector(".adthrive-collapse-player");e+=t?t.offsetHeight:0}if(this._config.video.relatedPlayerAdded){document.querySelectorAll(".adthrive-video-player").forEach((t=>{e+=t.offsetHeight}))}this._slotsHeightVideo=e}get enabled(){return this._realizedAdDensityExperiment.result&&"IntersectionObserver"in window&&!(null!==document.querySelector("body.home")||null!==document.querySelector("body.archive"))&&!jf()}start(){this._realizedAdDensityEventBus.realizedAdDensityCompReady.emit()}constructor(e,t,i,s,n,r,a,o,l,d){super(),this._config=e,this._realizedAdDensityExperiment=t,this._parallaxExperiment=i,this._slots=s,this._pageManager=n,this._userPageDataLogEvents=r,this._adInjectionMap=a,this._realizedAdDensityEventBus=o,this._gamEventBus=l,this._slotManagerEventBus=d,this._initialSlotsTimeout=1e4,this._addToMainContent=new Set([Qe.Below_Post]),this._slotsForAdDensity=new Set([Qe.Content,Qe.Recipe,Qe.Footer]),this._mainContent=null,this._commentElem=null,this._elementBeingObserved=null,this._initMainContentHeight=null,this._endMainContentHeight=null,this._slotsHeightEnd=null,this._slotsHeightVideo=null,this._slotsForMainContent=new Set,this._slotsForEnd=new Set}}Hf=B([bn("RealizedAdDensityComponent"),D(),j("design:type",Function),j("design:paramtypes",[void 0===_c?Object:_c,void 0===Vf?Object:Vf,void 0===Ol?Object:Ol,void 0===ra?Object:ra,void 0===Mr?Object:Mr,void 0===Yd?Object:Yd,void 0===Uf?Object:Uf,void 0===ar?Object:ar,void 0===Sc?Object:Sc,void 0===nr?Object:nr])],Hf);class $f extends Fn{init(){if(this._context.querystring.has("ad_test")){const e=this._context.querystring.get("ad_test");this._gam.setTargeting({key:"sec",value:e.split(",").map((e=>`test${e}`))})}}constructor(e,t){super(),this._context=e,this._gam=t}}$f=B([bn("AdTestComponent"),D(),j("design:type",Function),j("design:paramtypes",[void 0===Fr?Object:Fr,void 0===wc?Object:wc])],$f);class qf extends Er{init(){this._key="BrandMetrics",this._lookup="BMETRICS",this._default=!0}}qf=B([bn("BrandMetricsExperiment"),M()],qf);class Gf extends Fn{init(){this._prebidAuctionManager.bidsRequested.once((()=>{this._load()}))}get enabled(){return this._brandMetricsExperiment.result}_load(){Cs(this._url).then((()=>this._monitorSurvey())).catch((()=>{}))}_monitorSurvey(){window._brandmetrics=window._brandmetrics||[],window._brandmetrics.push({cmd:"_querySurvey",val:{callback:(e,t)=>{e&&t&&t.measurementId&&this._gam.setTargeting({key:"bms",value:[t.measurementId.toString()]})}}})}constructor(e,t,i){super(),this._brandMetricsExperiment=e,this._gam=t,this._prebidAuctionManager=i,this._url="https://cdn.brandmetrics.com/tag/aa466d868b2742ffa2cc31bb6341dc12/cafemedia.js"}}Gf=B([bn("BrandMetrics"),D(),j("design:type",Function),j("design:paramtypes",[void 0===qf?Object:qf,void 0===wc?Object:wc,void 0===If?Object:If])],Gf);class Wf extends Fn{init(){(e=>{const t=document.body,i=`adthrive-device-${e}`;if(!t.classList.contains(i))try{t.classList.add(i)}catch(e){W.error("BodyDeviceClassComponent","init",{message:e.message});const t="classList"in document.createElement("_");W.error("BodyDeviceClassComponent","init.support",{support:t})}})(this._context.device)}constructor(e){super(),this._context=e}}function Kf(e,t){void 0===t&&(t={});var i=t.insertAt;if(e&&"undefined"!=typeof document){var s=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===i&&s.firstChild?s.insertBefore(n,s.firstChild):s.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}Wf=B([bn("BodyDeviceClassComponent"),D(),j("design:type",Function),j("design:paramtypes",[void 0===Fr?Object:Fr])],Wf);Kf(".adthrive-ccpa-modal{background-color:#000;background-color:rgba(0,0,0,.4);display:none;height:100%;left:0;overflow:auto;position:fixed;top:0;width:100%;z-index:2147483647}.adthrive-ccpa-modal-content{background-color:#fefefe;border:1px solid #888;border-radius:10px;box-shadow:0 0 10px rgba(0,0,0,.5);font-family:Verdana,Geneva,Tahoma,sans-serif;margin:0 auto;max-width:592px;padding:20px 24px 24px;position:relative;top:50%;transform:translateY(-50%);width:80%}#adthrive-ccpa-modal-title{color:rgba(0,0,0,.87);font-size:20px;line-height:26px}.adthrive-ccpa-modal-btn:focus,.adthrive-ccpa-modal-btn:hover{color:#000;cursor:pointer;text-decoration:none}#adthrive-ccpa-modal-language{color:rgba(0,0,0,.87);display:block;font-size:14px;line-height:20px;margin:16px 0 32px}#adthrive-ccpa-modal-cancel-btn:focus,#adthrive-ccpa-modal-cancel-btn:hover,#adthrive-ccpa-modal-close-btn-container:focus,#adthrive-ccpa-modal-close-btn-container:hover{color:rgba(0,0,0,.8);cursor:pointer;text-decoration:none}#adthrive-ccpa-modal-continue-btn:focus,#adthrive-ccpa-modal-continue-btn:hover{color:hsla(0,0%,100%,.8);cursor:pointer;text-decoration:none}#adthrive-ccpa-modal-close-btn-container{color:#000;font-size:20px;font-weight:700;line-height:20px;position:absolute;right:8px;top:8px}.adthrive-ccpa-lower-buttons-container{color:#000;font-size:18px}#adthrive-ccpa-modal-cancel-btn{display:inline-block;text-align:left;width:calc(100% - 150px)}#adthrive-ccpa-modal-continue-btn{background-color:#010044;border-radius:10px;color:#fff;display:inline-block;height:44px;line-height:44px;text-align:center;width:150px}@media screen and (max-width:896px){.adthrive-ccpa-modal-content{margin:0 auto;position:relative;width:calc(100% - 80px)}#adthrive-ccpa-modal-title{font-size:16px;line-height:24px}#adthrive-ccpa-modal-language{font-size:12px;line-height:16px;text-align:left}.adthrive-ccpa-lower-buttons-container{font-size:14px}#adthrive-ccpa-modal-close-btn-container{font-size:14px;line-height:14px}}@media screen and (max-width:350px){#adthrive-ccpa-modal-title{font-size:14px;line-height:24px}#adthrive-ccpa-modal-language{font-size:10px;line-height:14px;text-align:left}.adthrive-ccpa-lower-buttons-container{display:block;font-size:12px;text-align:center;width:100%}#adthrive-ccpa-modal-close-btn-container{display:block;font-size:12px;line-height:12px}#adthrive-ccpa-modal-cancel-btn,#adthrive-ccpa-modal-continue-btn{display:block;text-align:center;width:100%}#adthrive-ccpa-modal-cancel-btn{margin-bottom:10px}}");class Yf extends Fn{init(){if(window.__uspapi=this.uspapi.bind(this),this.ccpaRequired){this._createModalElements(),this._addLocatorFrame(),window.__uspapi("registerDeletion",1,this._deleteData.bind(this)),this.setGpcString();const e=this.gpcEnabled||this._config.ccpa.privacyString===this.ccpaOptOut?this.ccpaOptOut:this.ccpaOptIn;this.setPrivacyString(e),this._setDeviceAccess(),this._setupListeners();const t=document.querySelector(`#${this.ccpaOptOutDivId}`),i=this._isHomeOrFPV();t||this._config.act25.required||(this.addOptOutElements(i),this.injectFooter());const s=Qs("health-directed-treatment");"US"===this._context.country&&s&&this._gam.setTargetingFlag("hmt",[Zs(this._context.region)?"1":"0"])}else this.setPrivacyString(this.ccpaNotApplicable);this.usCmpRequired&&this._consentEventBus.usCmpConsentCaptured.on((e=>{this.setPrivacyString(e?this.ccpaOptIn:this.ccpaOptOut),this._setDeviceAccess()}),{handleEventsAlreadyEmitted:!0})}_createModalElements(){this.modal=bi("div","adthrive-ccpa-modal","adthrive-ccpa-modal"),this.modalContent=bi("div","adthrive-ccpa-modal-content","adthrive-ccpa-modal-content"),this.ccpaATag=bi("a","ccpaTag",void 0,this.ccpaLinkText,"/")}setPrivacyString(e,t=!1){const i=this.ccpaRequired&&this.privacyString===this.ccpaNotApplicable,s=!this.ccpaRequired&&this.privacyString!==this.ccpaNotApplicable;(e||!0===t||i||s||this.gpcUpdated)&&(this._setPrivacyCookie(e),this.privacyString=e)}_setPrivacyCookie(e){const t=new Date(2147483647e3).toUTCString();document.cookie=`usprivacy=${e};path=/;expires=${t}`}setGpcString(){null!==this.gpcEnabled&&!1!==this.gpcEnabled||!this.globalPrivacyControl?!0!==this.gpcEnabled||this.globalPrivacyControl||(Fs.deleteLocalStorage("adthrive_gpc"),this.gpcEnabled=this.globalPrivacyControl,this.gpcUpdated=!0):(Fs.setInternalLocalStorage("adthrive_gpc",`${this.globalPrivacyControl}`),this.gpcEnabled=!!`${this.globalPrivacyControl}`,this.gpcUpdated=!0)}uspapi(e,t,i){switch(e){case"performDeletion":this._deletionQueue.forEach((e=>e()));break;case"registerDeletion":this._deletionQueue.push(i);break;case"getUSPData":return i({command:e,version:t,uspString:Fs.readExternalCookie("usprivacy")},!0);default:return null}}_addLocatorFrame(){if(null===document.getElementById("__uspapiLocator")){const e=document.createElement("iframe");e.style.display="none",e.id="__uspapiLocator",e.name="__uspapiLocator",document.body.appendChild(e)}}_setCCPAEventListener(e,t,i,s){i&&this.modal?i.addEventListener("click",(()=>{e&&this.optUserInOrOut(),t&&this.modal&&(this.modal.style.display="none")}).bind(this)):s&&this.modal&&s.addEventListener("click",(e=>{e.target==this.modal&&(this.modal.style.display="none")}).bind(this))}optUserInOrOut(){this.privacyString===this.ccpaOptIn&&this.modal&&this.ccpaATag?(this.setPrivacyString(this.ccpaOptOut,!0),window.__uspapi("performDeletion",1),this.modal.style.display="block",this.ccpaATag.textContent=this.ccpaOptInText,this._config.ccpa.userOptedOut=!0):(this.setPrivacyString(this.ccpaOptIn,!0),this.ccpaATag&&(this.ccpaATag.textContent=this.ccpaOptOutText),this._config.ccpa.userOptedOut=!1),this._config.ccpa.consentChange.emit(this.privacyString),this._setDeviceAccess()}createCCPAModal(){if(!this.modal||!this.modalContent)return void W.error("CCPAComponent","createCCPAModal","Attempt to access modal");document.body.append(this.modal),this.modal.append(this.modalContent),this._setCCPAEventListener(!1,!0,void 0,window);const e=bi("div","adthrive-ccpa-modal-close-btn-container",void 0,"");this.modalContent.append(e),this._setCCPAEventListener(!1,!0,e);const t=bi("div","adthrive-ccpa-modal-title",void 0,this._config.ccpa.optOutText);this.modalContent.append(t);const i=bi("span","adthrive-ccpa-modal-language",void 0,'You have chosen to opt-out of the sale or sharing of your information from this site and any of its affiliates. To opt back in please click the "Customize my ad experience" link.
\n
This site collects information through the use of cookies and other tracking tools. Cookies and these tools do not contain any information that personally identifies a user, but personal information that would be stored about you may be linked to the information stored in and obtained from them. This information would be used and shared for Analytics, Ad Serving, Interest Based Advertising, among other purposes.
\n
For more information please visit this site\'s Privacy Policy.');this.modalContent.append(i)}_createModalLowerButtons(){if(!this.modalContent)return void W.error("CCPAComponent","_createModalLowerButtons","Attempt to access modalContent");const e=bi("div",void 0,"adthrive-ccpa-lower-buttons-container");this.modalContent.append(e);const t=bi("div","adthrive-ccpa-modal-cancel-btn","adthrive-ccpa-modal-btn","CANCEL");e.append(t),this._setCCPAEventListener(!0,!0,t);const i=bi("div","adthrive-ccpa-modal-continue-btn","adthrive-ccpa-modal-btn","CONTINUE");e.append(i),this._setCCPAEventListener(!1,!0,i)}addOptOutElements(e=!0){if(!this.ccpaATag)return void W.error("CCPAComponent","addOptOutElements","Attempt to access ccpaTag");this.ccpaOptOutDiv=bi("div",this.ccpaOptOutDivId,"adthrive-ccpa-link","Information from your device can be used to personalize your ad experience.

"),this.ccpaOptOutDiv.style.display=e&&!this._config.usCMP.required?"block":"none",this.ccpaOptOutDiv.appendChild(this.ccpaATag),this._setCCPAEventListener(!0,!1,this.ccpaATag),document.body.appendChild(this.ccpaOptOutDiv),this.createCCPAModal(),this._createModalLowerButtons()}_isHomeOrFPV(){return"/"===window.location.pathname||this._context.isFirstPageview}_setupListeners(){!this._didSetupListeners&&this._config.adOptions.spa&&(this._spaEventBus.routeChanged.once((()=>{this.init();const e=document.querySelector(`#${this.ccpaOptOutDivId}`),t=this._isHomeOrFPV()?"block":"none";e&&(e.style.display=t)})),this._didSetupListeners=!0)}_deleteData(){}_setDeviceAccess(){this._deviceAccess=this.privacyString===this.ccpaOptIn}injectFooter(){this.ccpaOptOutDiv&&this._config.footer.elements.push({order:1,element:this.ccpaOptOutDiv})}constructor(e,t,i,s,n){super(),this._config=e,this._consentEventBus=t,this._context=i,this._spaEventBus=s,this._gam=n,this._didSetupListeners=!1,this._deviceAccess=!1,this._deletionQueue=[],this.ccpaRequired=this._config.ccpa.required,this.privacyString=this._config.ccpa.privacyString,this.ccpaNotApplicable=this._config.ccpa.ccpaNotApplicable,this.ccpaOptIn=this._config.ccpa.ccpaOptIn,this.ccpaOptOut=this._config.ccpa.ccpaOptOut,this.ccpaOptOutText=this._config.ccpa.optOutText,this.ccpaOptInText=this._config.ccpa.optInText,this.usCmpRequired=this._config.ccpa.usCmpRequired,this.gpcEnabled=!!this._config.ccpa.gpcEnabled,this.gpcUpdated=!1,this.globalPrivacyControl=window.navigator.globalPrivacyControl,this.ccpaLinkText=""===this.privacyString||this.privacyString===this.ccpaOptIn?this.ccpaOptOutText:this.ccpaOptInText,this.ccpaOptOutDivId="adthrive-ccpa-link"}}Yf=B([bn("CCPAComponent"),D(),j("design:type",Function),j("design:paramtypes",[void 0===_c?Object:_c,void 0===Wn?Object:Wn,void 0===Fr?Object:Fr,void 0===ir?Object:ir,void 0===wc?Object:wc])],Yf);class Xf extends Fn{_isInApp(){return qi()||$i()||Hi()}_getBrowserCharacter(e=!1){return this._isInApp()&&e?"a":di()?"c":hi()?"s":ai()?"f":oi()?"i":ri()?"e":"o"}_getOSAndBrowserValue(){const e=hs().slice(0,1).toLowerCase();if(!["m","w","i","a"].includes(e))return"o";const t=new Set(["m","a"]),i=`${e}${this._getBrowserCharacter(!t.has(e))}`;return new Set(["mc","ms","mf","wc","wi","we","wf","ws","ic","is","ia","io","ac","aa","ao"]).has(i)?i:"o"}_getConfigTargeting(){const e=this._config,t=this._context,i=this.debug,s=this._getOSAndBrowserValue(),n=[...this._getConfigGoogleAdManagerTargeting(e.gam.targeting),{key:"abgroup",value:e.abGroup.groups},{key:"pubab",value:e.pubAbGroup.groups},{key:"idho_p",value:e.idho.percentages},{key:"bucket",value:i?"unsupported":t.bucket},{key:"sens",value:e.site.sensitiveCategories},{key:"domain",value:t.domain},{key:"plugin",value:t.plugin},{key:"hi_au",value:e.adTypes.enabledMinified},{key:"vpwxvph",value:`${window.innerWidth}x${window.innerHeight}`},{key:"ri",value:t.ri},{key:"st",value:t.salesThrottle},{key:"rsi",value:t.rsi},{key:"pvk",value:t.pageviewKey},{key:"sess",value:t.sessionKey},{key:"branch",value:t.branch},{key:"deployment",value:i||t.invalidTraffic?"unsupported":t.deployment},{key:"doba",value:e.displayOpenBidding.bidders},{key:"gptv",value:window.googletag.getVersion()},{key:"id_region",value:e.locale.targetingValue},{key:"osb",value:s}];return e.hbho.filteredBidders.length&&n.push({key:"hbho",value:e.hbho.filteredBidders}),e.vbho.filteredBidders.length&&n.push({key:"vbho",value:e.vbho.filteredBidders}),n}_getConfigGoogleAdManagerTargeting(e){const t="verticals",i=[];return e.forEach((e=>{e.key===t?i.push({key:t,value:this._fixGamVerticalsValue(e.value)}):i.push({key:e.key,value:e.value})})),i}_fixGamVerticalsValue(e){if(!Array.isArray(e))return this._fixGamVerticalsValue([e])[0];const t=new RegExp(/[";'\^=\(\)!<>\+\[\]#,\*~`]/,"g");return e.map((e=>e.replace(t,"").replace(/&/g,"and")))}getConditionalTargeting(){const e=[],t=this._context,i=this._config.site,s=this._config.ccpa;return i.sensCategoriesOff.length&&e.push({key:"sens_off",value:i.sensCategoriesOff}),t.connectionTargeting.length&&e.push({key:"connection",value:t.connectionTargeting}),s.required&&e.push({key:"ccpaOptOut",value:s.userOptedOut?"1":"0"}),e}setConditionalFlagTargeting(){const e=this._context,t=this._config,i=gi(),s=this._config.prebid.s2s.distributedBidders,n=t.floors.os,r=t.floors.browser,a=t.floors.country;var o,l,d,c;(this._gam.setTargetingFlag("co",[null!=(o=null!=a?a:this._context.country)?o:""]),this._gam.setTargetingFlag("os",[null!=(l=null!=n?n:hs())?l:""]),this._gam.setTargetingFlag("br",[null!=(d=null!=r?r:pi())?d:""]),"cookieDeprecationLabel"in navigator)&&this._gam.setTargetingFlag("cookdep",[null!=(c=this._config.fledge.cookieDeprecationLabel)?c:""]);if(e.invalidTraffic&&this._gam.setTargetingFlag("bot",e.invalidTraffic),e.adsMinLoadDuration&&this._gam.setTargetingFlag("adsmnche",e.adsMinLoadDuration),this._config.gdpr.enabled&&this._gam.setTargetingFlag("gdpr",["1"]),this._config.locale.region&&this._gam.setTargetingFlag("region",[this._config.locale.region]),null!==gi()&&this._gam.setTargetingFlag("brwsrv",[`${i}`]),this._config.adOptions.pmp&&this._gam.setTargetingFlag("pmp_elig",["1"]),Bi()&&this._config.adTypes.largeFormatsDesktop&&this._gam.setTargetingFlag("lf_elig",["1"]),!Bi()&&this._config.adTypes.largeFormatsMobile&&this._gam.setTargetingFlag("lf_elig",["1"]),this._config.clsOptions&&(this._gam.setTargetingFlag("clson",[String(!!this._config.clsOptions.injectedFromPlugin)]),this._gam.setTargetingFlag("clsBranch",[this._config.clsOptions.branch||""]),this._gam.setTargetingFlag("clsBucket",[this._config.clsOptions.bucket||""])),e.integration&&this._gam.setTargetingFlag("integration",[e.integration]),e.deliveryVersion&&this._gam.setTargetingFlag("lmdv",[e.deliveryVersion]),e.isWordPressLogin&&this._gam.setTargetingFlag("wpadm",["1"]),this._config.trafficShaping.active&&this._gam.setTargetingFlag("ts",[this._config.trafficShaping.modelVersion]),s){const e=s.rpbsBidders.filter((e=>!Le.includes(e))).map((e=>Oe[e])),t=s.ayBidders.filter((e=>!Le.includes(e))).map((e=>Oe[e]));this._gam.setTargetingFlag("db_r",e),this._gam.setTargetingFlag("db_ay",t)}}init(){wc.pushToQueue((()=>{this._gam.setTargeting([...this._getConfigTargeting(),...this.getConditionalTargeting()]),this.setConditionalFlagTargeting()}))}constructor(e,t,i){super(),this._config=e,this._gam=t,this._context=i,this.debug=!1,this.debug=this._context.debug}}Xf=B([bn("ConfigTargetingComponent"),D(),j("design:type",Function),j("design:paramtypes",[void 0===_c?Object:_c,void 0===wc?Object:wc,void 0===Fr?Object:Fr])],Xf);class Qf extends Fn{init(){this._gamEventBus.slotRenderEnded.on((e=>this.confirmedClickOverlay(e)))}confirmedClickOverlay({event:e,slotId:t}){const i=this._slots.get(t);i&&wc.pushToQueue((()=>{const{id:t,location:s,sequence:n,nref:r}=i.getTargetingMap(),a=this.confirmedClickStatus(this._slots.get(e.slot.getSlotElementId()));Is({event:e,ignoreOtherCompanyIds:!0})&&a&&W.event("confirmedClickOverlay","status",{id:t,location:s,sequence:n,nref:r,confirmedClick:a})}))}confirmedClickStatus(e){const t=["common_15click_overlay","common_15click_anchor"];try{const i=null==e?void 0:e.element.querySelectorAll("iframe[id^=google_ads_iframe]");let s;return i&&(null==i?void 0:i.length)>0&&(s=i[0]),t.some((e=>{var t;return null!=(null==s||null==(t=s.contentDocument)?void 0:t.getElementById(e))}))}catch(e){W.error("ConfirmedClickComponent","confirmedClickStatus",e)}return!1}constructor(e,t){super(),this._slots=e,this._gamEventBus=t}}Qf=B([bn("ConfirmedClicksComponent"),D(),j("design:type",Function),j("design:paramtypes",[void 0===ra?Object:ra,void 0===Sc?Object:Sc])],Qf);class Jf extends Fn{init(){const e=this._slotManager;if("phone"===this._device||"tablet"===this._device){this._gamEventBus.slotRenderEnded.on((({event:t,slotId:i})=>{const s=e.getSlot(i);s&&this.isDeclaredRefreshCompliantSlot(s)&&Is({event:t})&&e.updateRefreshTimeout(i,24e4)}));const t=this._slotManagerEventBus.added.on((e=>{this._slotManager.getSlots(e).forEach((e=>{this.isDeclaredRefreshCompliantSlot(e)&&wc.pushToQueue((()=>{e.setTargeting({key:"decref",value:"240"})}))}))}));this._headerDeclared&&this._sidebarDeclared&&this._slotManagerEventBus.added.off(t)}}_isSidebarDeclaredRefreshCompliant(e){const t=e.location===Qe.Sidebar;return t&&(this._sidebarDeclared=!0),t}_isHeaderDeclaredRefreshCompliant(e){const t=e.location===Qe.Header&&2===e.sequence;return t&&(this._headerDeclared=!0),t}isDeclaredRefreshCompliantSlot(e){return this._isSidebarDeclaredRefreshCompliant(e)||this._isHeaderDeclaredRefreshCompliant(e)}constructor(e,t,i,s){super(),this._context=e,this._gamEventBus=t,this._slotManager=i,this._slotManagerEventBus=s,this._headerDeclared=!1,this._sidebarDeclared=!1,this._device=this._context.device}}Jf=B([bn("DeclaredRefreshComponent"),D(),j("design:type",Function),j("design:paramtypes",[void 0===Fr?Object:Fr,void 0===Sc?Object:Sc,void 0===Kg?Object:Kg,void 0===nr?Object:nr])],Jf);class Zf extends lr{run(){if(!this.enabled)return W.error("TargetAdDensitySiteExperiment","run","() => %o","No experiment config found. Defaulting to control."),"control";const e=new Hn(this._mappedChoices).get();return this._isValidResult(e)?e:(W.error("TargetAdDensitySiteExperiment","run","() => %o","Invalid result from experiment choices. Defaulting to control."),"control")}setExperimentTargeting(){if(!this.enabled||!this._isValidResult(this._result))return void W.error("TargetAdDensitySiteExperiment","setExperimentTargeting","() => %o","Experiment targeting requires an experiment config and valid result");const e=this.experimentConfig,t=`${e.key.toLowerCase()}-${e.id}`,i="control"===this._result?"control":`${Math.round(100*this._result)}`;this._pubabgroup.set(t,i)}_mapChoices(){return this._choices.map((({weight:e,value:t})=>({weight:e,choice:"number"==typeof t?(t||0)/100:"control"})))}constructor(e,t,i,s){var n;super(),this._siteExperiments=e,this._pubabgroup=t,this._clsOptions=i,this._choices=[],this._mappedChoices=[],this._result="control",this._resultValidator=e=>"number"==typeof e,this.key=Xe.AdDensity,this.abgroup=Xe.AdDensity,(null==(n=s.siteAds)?void 0:n.siteExperiments)?this.experimentConfig=new dr(s.siteAds).getSiteExperimentByKey(this.key):this.experimentConfig=this._siteExperiments.getSiteExperimentByKey(this.key);const r=this._clsOptions.getWeightedChoiceExperiment(this.abgroup,!0);this.enabled&&this._isValidResult(r)?(this._result=r,this.setExperimentTargeting()):this.enabled&&this.experimentConfig&&(this._choices=this.experimentConfig.variants,this._mappedChoices=this._mapChoices(),this._result=this.run(),this.setExperimentTargeting())}}B([kn(),j("design:type",Function),j("design:paramtypes",[]),j("design:returntype",void 0)],Zf.prototype,"run",null),Zf=B([M(),F(3,L("AdthriveCLS")),j("design:type",Function),j("design:paramtypes",[void 0===cr?Object:cr,void 0===gr?Object:gr,void 0===Tl?Object:Tl,"undefined"==typeof AdthriveCLS?Object:AdthriveCLS])],Zf);const ev=(e,t,i,s=[],n)=>{let r=`
`;if(n===Qe.Video_StickyOutstream){r=`
`+r+"
"}return window.adthriveCLS&&window.adthriveCLS.injectedSlots&&window.adthriveCLS.injectedSlots.some((e=>e.element.id===t))||e.insertAdjacentHTML(i,r),document.getElementById(t)},tv=({location:e,sequence:t,sticky:i,lazy:s,stickyOverlapSelector:n,special:r,auctionPriority:a},o,l,d)=>new na(e,t,l,o,i,s,a,n,r,!0,d),iv=(e,t=document)=>t.querySelectorAll(e),sv=e=>`adthrive-${e.location.replace("_","-").toLowerCase()}`,nv=e=>`${sv(e)}-${e.sequence}`;class rv{inject(e,t=document){window.adthriveCLS&&window.adthriveCLS.targetDensityLog&&W.event("BaseDynamicAdsInjector","_logDensityInfo",window.adthriveCLS.targetDensityLog),this._densityDevice="desktop"===this._context.device?Je:Ze,this._overrideDefaultAdDensitySettingsWithSiteExperiment();const i=this._config.targetDensity.enabled,s=e.filter((e=>i?e.location!==Qe.Content:e)),n=e.filter((e=>i?e.location===Qe.Content:null));return[...s.length?this._injectNonDensitySlots(s,t):[],...n.length?this._injectDensitySlots(n,t):[]]}_injectNonDensitySlots(e,t=document){const i=[];for(const s of e)this._insertNonDensityAds(s,i,t);return i}_insertNonDensityAds(e,t,i=document){let s=0,n=0,r=0;e.spacing>0&&(s=window.innerHeight*e.spacing,n=s);const a=this._repeatDynamicAds(e),o=iv(e.elementSelector,i);e.skip;for(let l=e.skip;la.length);l+=e.every){let d=o[l];if(s>0){const{bottom:e}=xi(d);if(e<=n)continue;n=e+s}const c=a[r],h=`${c.location}_${c.sequence}`;if(t.some((e=>e.name===h))){r+=1;continue}const u=this.getDynamicElementId(c),p=sv(e),g=nv(e),m=[e.location===Qe.Sidebar&&e.sticky&&e.sequence&&e.sequence<=5?"adthrive-sticky-sidebar":"",e.location===Qe.Recipe&&e.sticky?"adthrive-recipe-sticky-container":"",p,g,...e.classNames],_=ev(d,u,e.position,m,e.location);if(_){const s=this._filterAdUnitSizes(c,_);s.length&&(t.push(tv(c,_,s,i!==document)),e.location===Qe.Recipe&&++this._recipeCount,r+=1),d=_}}}_injectDensitySlots(e,t=document){try{this._calculateMainContentHeightAndAllElements(e,t)}catch(e){return[]}const{onePerViewport:i,targetAll:s,targetDensityUnits:n,combinedMax:r,numberOfUnits:a}=this._getDensitySettings(e,t);return this._absoluteMinimumSpacingByDevice=i?window.innerHeight:this._absoluteMinimumSpacingByDevice,a?(this._adInjectionMap.filterUsed(),this._findElementsForAds(a,i,s,r,n,t),this._insertAds()):[]}_overrideDefaultAdDensitySettingsWithSiteExperiment(){const e=R.resolve(Zf);if(!e.enabled)return;const t=e.result;"number"==typeof t&&(this._config.targetDensity.enabled=!0,this._config.targetDensity.settings[this._densityDevice].adDensity=t)}_getDensitySettings(e,t=document){const i=this._config.targetDensity.settings,s=this._determineOverrides(i.pageOverrides),n=s.length?s[0]:i[this._densityDevice],r=n.adDensity,a=n.onePerViewport,o=this._shouldTargetAllEligible(r),l=this._getTargetDensityUnits(r,o),d=this._getCombinedMax(e,t),c=Math.min(this._totalAvailableElements.length,l,...d>0?[d]:[]);return this._pubLog={onePerViewport:a,targetDensity:r,targetDensityUnits:l,combinedMax:d},{onePerViewport:a,targetAll:o,targetDensityUnits:l,combinedMax:d,numberOfUnits:c}}_determineOverrides(e){return e.filter((e=>{const t=un(e.pageSelector);return""===e.pageSelector||t.elements&&t.elements.length})).map((e=>e[this._densityDevice]))}_shouldTargetAllEligible(e){return e===this._densityMax}_getTargetDensityUnits(e,t){return t?this._totalAvailableElements.length:Math.floor(e*this._mainContentHeight/(1-e)/this._getMinDivHeight())-this._recipeCount}_getMinDivHeight(e=Qe.Content){return this._config.clsOptimizedAds.getDivHeight(e,this._context.device)}_getCombinedMax(e,t=document){return Si(e.filter((e=>{let i;try{i=t.querySelector(e.elementSelector)}catch(e){}return i})).map((e=>Number(e.max)+Number(e.lazyMaxDefaulted?0:e.lazyMax))).sort(((e,t)=>t-e))[0],0)}_elementLargerThanMainContent(e){return e.offsetHeight>=this._mainContentHeight&&this._totalAvailableElements.length>1}_elementDisplayNone(e){const t=window.getComputedStyle(e,null).display;return t&&"none"===t||"none"===e.style.display}_isBelowMaxes(e,t){return this._adInjectionMap.map.length{for(const{dynamicAd:t,element:a}of this._totalAvailableElements)if(this._logDensityInfo(a,t.elementSelector,e),!(!i&&this._elementLargerThanMainContent(a)||this._elementDisplayNone(a))){if(!this._isBelowMaxes(s,n))break;this._checkElementSpacing({dynamicAd:t,element:a,insertEvery:e,targetAll:i,target:r})}!this._usedAbsoluteMinimum&&this._smallerIncrementAttempts<5&&(++this._smallerIncrementAttempts,a(this._getSmallerIncrement(e)))},o=this._getInsertEvery(e,t,n);a(o)}_getSmallerIncrement(e){let t=.6*e;return t<=this._absoluteMinimumSpacingByDevice&&(t=this._absoluteMinimumSpacingByDevice,this._usedAbsoluteMinimum=!0),t}_insertAds(){const e=[];return this._adInjectionMap.filterUsed(),this._adInjectionMap.map.forEach((({el:t,dynamicAd:i,target:s},n)=>{const r=Number(i.sequence)+n,a=i.max,o=i.lazy&&r>a;i.sequence=r,i.lazy=o;const l=this._addContentAd(t,i,s);l&&(i.used=!0,e.push(l))})),e}_getInsertEvery(e,t,i){let s=this._absoluteMinimumSpacingByDevice;return this._moreAvailableElementsThanUnitsToInject(i,e)?(this._usedAbsoluteMinimum=!1,s=this._useWiderSpacing(i,e)):(this._usedAbsoluteMinimum=!0,s=this._useSmallestSpacing(t)),t&&window.innerHeight>s?window.innerHeight:s}_useWiderSpacing(e,t){return this._mainContentHeight/Math.min(e,t)}_useSmallestSpacing(e){return e&&window.innerHeight>this._absoluteMinimumSpacingByDevice?window.innerHeight:this._absoluteMinimumSpacingByDevice}_moreAvailableElementsThanUnitsToInject(e,t){return this._totalAvailableElements.length>e||this._totalAvailableElements.length>t}_logDensityInfo(e,t,i){const{onePerViewport:s,targetDensity:n,targetDensityUnits:r,combinedMax:a}=this._pubLog;this._totalAvailableElements.length}_checkElementSpacing({dynamicAd:e,element:t,insertEvery:i,targetAll:s,target:n=document}){(this._isFirstAdInjected()||this._hasProperSpacing(t,e,s,i))&&this._markSpotForContentAd(t,{...e},n)}_isFirstAdInjected(){return!this._adInjectionMap.map.length}_markSpotForContentAd(e,t,i=document){const s="beforebegin"===t.position||"afterbegin"===t.position;this._adInjectionMap.add(e,this._getElementCoords(e,s),t,i),this._adInjectionMap.sort()}_hasProperSpacing(e,t,i,s){const n="beforebegin"===t.position||"afterbegin"===t.position,r="beforeend"===t.position||"afterbegin"===t.position,a=i||this._isElementFarEnoughFromOtherAdElements(e,s,n),o=r||this._isElementNotInRow(e,n),l=-1===e.id.indexOf("AdThrive_Below_Post");return a&&o&&l}_isElementFarEnoughFromOtherAdElements(e,t,i){const s=this._getElementCoords(e,i);let n=!1;for(let e=0;ei&&(!r||s+t{const n=!e.autosize||(t[0]<=i||t[0]<=320),r=!s||t[1]<=window.innerHeight-100;return n&&r}))}_repeatDynamicAds(e){const t=[],i=e.location===Qe.Recipe?99:this.locationMaxLazySequence.get(e.location),s=e.lazy?Si(i,0):0,n=e.max,r=e.lazyMax,a=0===s&&e.lazy?n+r:Math.min(Math.max(s-e.sequence+1,0),n+r),o=Math.max(n,a);for(let i=0;i=n;t.push({...e,sequence:s,lazy:r})}}return t}constructor(e,t){this._adInjectionMap=e,this._context=t,this._recipeCount=0,this._mainContentHeight=0,this._mainContentDiv=null,this._totalAvailableElements=[],this._densityDevice=Je,this._pubLog={onePerViewport:!1,targetDensity:0,targetDensityUnits:0,combinedMax:0},this._densityMax=.99,this._smallerIncrementAttempts=0,this._absoluteMinimumSpacingByDevice=250,this._usedAbsoluteMinimum=!1,this.locationMaxLazySequence=new Map([[Qe.Recipe,5]])}}class av extends rv{getDynamicElementId(e){return`${this._config.gam.prefix}_${e.location}_${e.sequence}_${this._context.device}`}constructor(e,t,i){super(i,t),this._config=e,this._context=t,this._adInjectionMap=i}}av=B([bn("DynamicAdsInjector"),D(),j("design:type",Function),j("design:paramtypes",[void 0===_c?Object:_c,void 0===Fr?Object:Fr,void 0===Uf?Object:Uf])],av);const ov=(e=5)=>{Kf(`\n .adthrive-sticky-container > div {\n flex-basis: unset;\n position: sticky !important;\n display: block;\n flex-direction: column;\n top: ${e>5?e:5}px;\n }\n `)},lv=(e=5)=>{Kf(`\n .adthrive-recipe-sticky-container > div {\n flex-basis: unset;\n position: sticky !important;\n display: block;\n flex-direction: column;\n top: ${e>5?e:5}px;\n }\n `)},dv=e=>{if(e&&e.length){let t=0;for(let i=0;i div {\n flex-basis: unset;\n position: sticky !important;\n top: ${null!=(a=n)?a:5}px;\n }\n `);const o=this._config.dynamicAds.filter((e=>ki(this._config,e))).filter((e=>wi(e,this._context.device))).filter((e=>!t||t&&e.location!==Qe.Content)).filter((e=>{return e.location===Qe.Interstitial||e.location===Qe.Video_StickyOutstream?0===(t=e.pageSelector).length||!t.split(",").some((e=>null!==document.querySelector(e))):Ai(e);var t})).filter((e=>!this.pluginInjected(e))).filter((e=>e.location!==Qe.Video_StickyOutstream||!this.shouldFilterStickyOutstream()));let l=this._injector.inject(o);if(this._config.clsOptions&&this._config.clsOptions.enabled){const e=[];this._config.clsOptions.injectedSlots.forEach((t=>{const i=l.find((e=>e.name===t.name)),s=e.find((e=>e.name===t.name));i||s||e.push(tv(t.dynamicAd,t.element,t.sizes,t.infinite))})),l=l.concat(e)}const d=t=>{0!==t.length&&this._slotManager.add(t,e).catch((e=>{W.error("DynamicAdsComponent","start","add",e)}))};if(this._config.adTypes.skylineHeader&&Bi()&&l.some((e=>e.location===Qe.Header))){const e=l.findIndex((e=>e.location===Qe.Footer));if(-1!==e){const t=l.splice(e,1)[0];this._skylineAdsEventBus.footerSlotAdditionEnabled.on((()=>{d([t])}))}}d(l)}get enabled(){return this._config.dynamicAds.length>0}shouldFilterStickyOutstream(){return!!(this._config.video.preventStickyOutstream||this._config.disableAds.video||!this._config.video.stickyOutstreamSettings.allowOnHomepage&&jf())||(this._config.video.hasStickyOutstream=!0,!1)}pluginInjected(e){const t=JSON.stringify(e);return this._config.clsOptions&&this._config.clsOptions.injectedSlots.some((e=>JSON.stringify(e.clsDynamicAd)===t))}constructor(e,t,i,s,n){super(),this._config=e,this._context=t,this._injector=i,this._slotManager=s,this._skylineAdsEventBus=n}}hv=B([bn("DynamicAdsComponent"),D(),j("design:type",Function),j("design:paramtypes",[void 0===_c?Object:_c,void 0===Fr?Object:Fr,void 0===av?Object:av,void 0===Kg?Object:Kg,void 0===cv?Object:cv])],hv);class uv extends Fn{start(){this._addDeviceOrientationListener()}_addDeviceOrientationListener(){this._pageManager.deviceOrientationChange.on((()=>this._handleDeviceOrientationChange()))}_handleDeviceOrientationChange(){var e,t,i,s;this._config.disableAds.clear(),this._intersectionObserverManager.unobserveAll(!1),this._adInjectionMap.reset(),this._slotManager.removeAllElements(!1),this._prebidActionManager.reset(!1),this._prebidMethods.clearAllAuctions();const n=this._slotManager.destroyAll(!1);_n.resetTimeOrigin(),this._config.disableAds.init(),W.event("DeviceOrientationComponent","_handleDeviceOrientationChange"),this._config.resetDynamicAds(),null==(t=this._config.clsOptions)||null==(e=t.injectedSlots)||e.splice(0,this._config.clsOptions.injectedSlots.length),null==(s=this._config.clsOptions)||null==(i=s.injectedVideoSlots)||i.splice(0,this._config.clsOptions.injectedVideoSlots.length),this._dynamicAdsComponent.start(!0),this._slotManager.rebuildAll();const r=this._slotEventBus;r.addRebuiltSlots.once((e=>{this._slotManager.getSlots(e).forEach((e=>{if(e.rebuild){const t=n.find((t=>t.id===e.id));if(t){const i=t.refreshCount+1;e.refreshCount=i}}})),r.addSlots.emit(e)}))}constructor(e,t,i,s,n,r,a,o,l){super(),this._pageManager=e,this._config=t,this._adInjectionMap=i,this._intersectionObserverManager=s,this._slotManager=n,this._prebidActionManager=r,this._dynamicAdsComponent=a,this._prebidMethods=o,this._slotEventBus=l}}uv=B([bn("DeviceOrientationComponent"),D(),j("design:type",Function),j("design:paramtypes",[void 0===Mr?Object:Mr,void 0===_c?Object:_c,void 0===Uf?Object:Uf,void 0===la?Object:la,void 0===Kg?Object:Kg,void 0===If?Object:If,void 0===hv?Object:hv,void 0===Mn?Object:Mn,void 0===Bn?Object:Bn])],uv);class pv extends Fn{init(){try{this._gamEventBus.slotOnload.once((()=>this.refreshExternal()))}catch(e){W.error("ExternalSlotsComponent","init",e)}}refreshExternal(){wc.pushToQueue((()=>{const{account:e}=this._config.gam,t=window.googletag.pubads().getSlots().filter((t=>null===RegExp(`^/?${e}/`).exec(t.getAdUnitPath()))).filter((e=>null!==document.getElementById(e.getSlotElementId())));t.length&&window.googletag.pubads().refresh(t)}))}constructor(e,t){super(),this._config=e,this._gamEventBus=t}}pv=B([bn("ExternalSlotsComponent"),D(),j("design:type",Function),j("design:paramtypes",[void 0===_c?Object:_c,void 0===Sc?Object:Sc])],pv);class gv extends Fn{init(){const e=this._context.isFirstPageview?"1":"0",t=[1];this._config.gdpr.enabled?this._gdprEvents.consentCaptured.on((()=>{this._gdprEnforcement.checkConsentForVendor(this._config.gdpr.raptiveVendorId,t).then((t=>{t&&this.setFPV(e)})).catch((()=>{}))})):this.setFPV(e),this.handleSPARouteChange()}setFPV(e="0"){+e&&Fs.setInternalLocalStorage("adthrive_fpv",(new Date).toString()),this._gam.setTargeting({key:"fpv",value:e})}handleSPARouteChange(){this._spaEventBus.routeChanged.on((()=>{this._context.isFirstPageview=!1,this.setFPV("0"),Fs.setInternalLocalStorage("adthrive_session_fpv",null===Fs.readInternalLocalStorage("adthrive_session_fpv"))}))}constructor(e,t,i,s,n,r){super(),this._gam=e,this._gdprEvents=t,this._config=i,this._context=s,this._gdprEnforcement=n,this._spaEventBus=r}}gv=B([bn("FirstPageviewComponent"),D(),j("design:type",Function),j("design:paramtypes",[void 0===wc?Object:wc,void 0===Ya?Object:Ya,void 0===_c?Object:_c,void 0===Fr?Object:Fr,void 0===Mu?Object:Mu,void 0===ir?Object:ir])],gv);class mv extends Fn{_setValues(e,t,i){e.values[`${this._host}|${t}`]=i>0?i:0}_getDefaultFloorConfig(){return{...dg(this._config.floors.defaultFloorData),modelVersion:`legacy.${this.floorsType}`}}_updateBidTTL(e,t,i=""){(i?this._prebidMethods.getBidResponsesForBidPoolId(i):this._prebidMethods.getBidResponsesForAdUnitCode(e)).bids.filter((e=>"rendered"!==e.status&&e.ttl&&!e.expired&&!e.sharedBidInUse)).forEach((i=>{const s=i.responseTimestamp,n=i.ttl,r=(e.includes(Qe.Video_StickyOutstream)?this._config.prebid.multistageStickyOutstreamActive:this._config.prebid.multistageActive)?2:1,a=n-this._expirationThreshold*r;Number(s)+1e3*Number(a)this._createFloorsMap(e)))}_createFloorsMap(e){if(e&&Object.keys(e).length){var t,i;const s=this._floorsExperiment.result,n=s.fbrap||s.raptive,r=null==e||null==(t=e.modelGroups)?void 0:t[0],a=(null==r||null==(i=r.schema)?void 0:i.fields)||[];this._config.floors.setAdditionalSchemaFields(a),n&&this._floorsEventBus.storeRaptiveFloorData.emit(e)}else W.error("FloorsRaptiveComponent","init","Raptive floor data not found")}get active(){return this.enabled}get enabled(){return this._floorsExperiment.result.raptive}constructor(e,t,i,s){super(e,t),this._config=e,this._prebidMethods=t,this._floorsExperiment=i,this._floorsEventBus=s,this.floorsType=Ve}}_v=B([bn("FloorsRaptiveComponent"),D(),j("design:type",Function),j("design:paramtypes",[void 0===_c?Object:_c,void 0===Mn?Object:Mn,void 0===ul?Object:ul,void 0===Yn?Object:Yn])],_v);class fv extends br{init(){this._key="FloorsStickyOutstreamRefresh",this._lookup="REFSOFLR"}}fv=B([bn("FloorsStickyOutstreamRefreshExperiment"),M()],fv);class vv extends Er{init(){this._key="AdditiveRefreshFloors",this._lookup="ARF",this._default=!1}}vv=B([bn("AdditiveRefreshFloorsExperiment"),M()],vv);const yv="banner",bv="instream",Sv="stickyOutstream";class Ev extends mv{init(){this._slotManagerEventBus.refreshAuctionStart.on((e=>this._handleBannerRefreshAuction(e))),this._videoRequestManager.refreshingVideoBids.on((e=>this._handleInstreamRefreshAuction(e)))}_handleBannerRefreshAuction(e){const t=this._slots.get(e);this._prebidMethods.addToQueue((()=>{this._setRefreshFloors(t.map((e=>({adUnitCode:e.id,refreshCount:e.refreshCount,bidPoolId:e.bidPoolId,setSlotTargetingFlag:(t,i,s)=>{e.setSlotTargetingFlag(t,i,s)}}))))}))}_handleInstreamRefreshAuction(e){this._prebidMethods.addToQueue((()=>{this._setRefreshFloors(e.map((e=>({adUnitCode:e.name,refreshCount:e.prerollNum}))))}))}_getFloorData(e,t,i,s,n){let r,a,o,l=0;if(n)({multiplier:a,weight:o,addition:l}=this._getRefreshInflateMultiplierWithWeight(s,t,i)),r=e&&e*a+l;else{const n=s<=5?"low":"high",o=this._getMultiplierType(t,i);a=this._multipliers.get(o)[n],r=e&&e*a}return{floor:r,multiplier:a,addition:l,weight:o}}_getMultiplierType(e,t){let i=yv;return e?i=bv:t&&(i=Sv),i}_getHighestCPM(e,t,i){this._updateBidTTL(e,t,i);const[s]=i?this._prebidMethods.getHighestCpmBidsForPoolId(i):this._prebidMethods.getHighestCpmBids(e),n=this._config.floors.amazonSlotCpm.get(e)||0,r=(null==s?void 0:s.cpm)||0;return Math.max(r,n)}_generateFloorData(e){const{adUnitCode:t,bidPoolId:i,refreshCount:s}=e,n=sn(),r=this._getHighestCPM(t,n,i),a=this._config.video.instreamAdUnits.has(t),o=t.includes(Qe.Video_StickyOutstream),{shouldUseRaptiveInflators:l,isRaptiveSkipApplied:d,canApplyRaptiveMLRefreshInflators:c}=this._shouldApplyRaptiveMLRefreshFloors(o),{floor:h,multiplier:u,addition:p,weight:g}=this._getFloorData(r,a,o,s,l);return{cpm:r,floor:h,multiplier:u,addition:p,weight:g,isInstream:a,shouldUseRaptiveInflators:l,canApplyRaptiveMLRefreshInflators:c}}_setRefreshFloors(e){const t=this._getDefaultFloorConfig();for(const i of e){const e=i.adUnitCode,{cpm:s,floor:n,isInstream:r,multiplier:a,addition:o,shouldUseRaptiveInflators:l,weight:d,canApplyRaptiveMLRefreshInflators:c}=this._generateFloorData(i);n?(this._setValues(t,e,n),this._setFmlriTargetingFlagSlot(n,i,r,a,o,d,!l,c)):s&&this._setFmlriTargetingFlagSlot(s,i,r,a,o,d,!l,c),this._floorsEventBus.storeModuleFloorData.emit({floorData:t,type:this.floorsType,code:i.adUnitCode,cpm:s,floor:n})}}_setFmlriTargetingFlagSlot(e,t,i,s,n,r,a,o){const{adUnitCode:l,setSlotTargetingFlag:d}=t,c=`${e}@${s}@${n}@${null!=r?r:0}${o?a?"h":"":"e"}`;d?d("fmlri",[c],!0):i&&this._config.video.setVideoFlagSlot(l,{fmlri:c})}_shouldApplyRaptiveMLRefreshFloors(e=!1){const t=!!e&&!this._stickyOutstreamMLEnabled,i=this._floorsExperiment.result.fbrap&&void 0!==this._raptiveMLSkipRate;var s;const n=new zn((null!=(s=this._raptiveMLSkipRate)?s:0)/100).get();return{shouldUseRaptiveInflators:i&&!n&&!t,isRaptiveSkipApplied:i&&n,canApplyRaptiveMLRefreshInflators:i}}_getRefreshInflateMultiplierWithWeight(e,t,i){const{inflator:s=[],defaultInflatorMultipliers:n=[],defaultInflatorAdditions:r=[],defaultInstreamInflatorMultipliers:a=[],defaultInstreamInflatorAdditions:o=[],defaultStickyOutstreamMultipliers:l=[],defaultStickyOutstreamInflatorAdditions:d=[],inflatorWeights:c}=this._config.floors.raptiveMLRefreshFloors,{index:h,weight:u}=vl(c);let p=0;if(-1===h)return{multiplier:1,addition:p,weight:-1};const g=s.find((t=>e>=t.minRefresh&&e<=t.maxRefresh));let m,_;var f,v;if(t)m=null!=(f=null==g?void 0:g.instreamMultipliers)?f:a,_=null!=(v=null==g?void 0:g.instreamAdditions)?v:o;else if(i){var y,b;m=null!=(y=null==g?void 0:g.stickyOutstreamMultipliers)?y:l,_=null!=(b=null==g?void 0:g.stickyOutstreamAdditions)?b:d}else{var S,E;m=null!=(S=null==g?void 0:g.multipliers)?S:n,_=null!=(E=null==g?void 0:g.additions)?E:r}return this._additiveRefreshFloorsExperiment.result&&_[h]&&_[h]>0&&(p=_[h]),{multiplier:m[h]||1,addition:p,weight:u}}get active(){return this.enabled}get enabled(){return!0===this._floorsExperiment.result.legacy}constructor(e,t,i,s,n,r,a,o,l){var d;super(e,t),this._config=e,this._prebidMethods=t,this._videoRequestManager=i,this._floorsExperiment=s,this._stickyOutstreamExperiment=n,this._slotManagerEventBus=r,this._floorsEventBus=a,this._additiveRefreshFloorsExperiment=o,this._slots=l,this.floorsType=ze,this._stickyOutstreamMLEnabled=!1,this._multipliers=new Map([[yv,{low:1.3,high:1.1}],[bv,{low:1.3,high:1.1}],[Sv,{low:1.1,high:1}]]),this._raptiveMLSkipRate=null==(d=this._config.floors.raptiveMLRefreshFloors)?void 0:d.skipRate;const c=this._stickyOutstreamExperiment.result;"number"==typeof c&&c>0?this._multipliers.set(Sv,{low:c,high:c}):"ml"===c&&(this._stickyOutstreamMLEnabled=!0)}}Ev=B([bn("FloorsRefreshComponent"),D(),j("design:type",Function),j("design:paramtypes",[void 0===_c?Object:_c,void 0===Mn?Object:Mn,void 0===Lc?Object:Lc,void 0===ul?Object:ul,void 0===fv?Object:fv,void 0===nr?Object:nr,void 0===Yn?Object:Yn,void 0===vv?Object:vv,void 0===ra?Object:ra])],Ev);class Cv extends br{init(){this._key="SessionFloorDisplayPercentileExperiment",this._lookup="SESFLRDIS"}get result(){return this._result}}Cv=B([bn("SessionFloorDisplayPercentileExperiment"),M()],Cv);class Tv extends br{init(){this._key="SessionFloorStickyOutstreamPercentileExperiment",this._lookup="SESFLRSO"}get result(){return this._result}}Tv=B([bn("SessionFloorStickyOutstreamPercentileExperiment"),M()],Tv);class wv extends br{init(){this._key="SessionFloorVideoPercentileExperiment",this._lookup="SESFLRVID"}get result(){return this._result}}wv=B([bn("SessionFloorVideoPercentileExperiment"),M()],wv);class kv extends mv{init(){this._eventListenersSet||this._setupEventListeners()}_setupEventListeners(){this._eventListenersSet=!0,this._spaEventBus.routeChanged.on((()=>{this._eventListenersSet=!1,this._offEvents.forEach((e=>{e()})),this._offEvents=[],this.init()})),this._offEvents.push(this._slotManagerEventBus.requestedBids.on((e=>this._handleRequestedBids(e))),this._slotEventBus.amazonBidResponseReceived.on((e=>this._handleAmazonDisplayBidResponse(e))),this._videoRequestManager.requestingVideoBids.on((e=>this._handleRequestingVideoBids(e))),this._videoRequestManager.amazonVideoBidResponseReceived.on((e=>this._handleAmazonVideoBidResponse(e))),...this._sessionNonFPV?[this._slotManagerEventBus.requestingBids.on((e=>this._handleRequestingBids(e)))]:[])}_handleRequestingBids(e){(this._slots.get(e)||[]).filter((e=>Object.keys(this._savedBids).includes(e.location))).forEach((e=>{const{floor:t,percentile:i,sessionFloorData:s}=this._getFloorValues(e.location,e.id);e.setSlotTargetingFlag("fmlsi",[`${t}@${i}`],!0),this._floorsEventBus.storeModuleFloorData.emit({floorData:s,type:this.floorsType,code:e.id})}))}_handleAmazonDisplayBidResponse(e){e.forEach((({location:e,cpm:t,slotId:i})=>{Object.keys(this._savedBids).includes(e)&&t>0&&this._prebidMethods.addToQueue((()=>{this._saveAmazonSlotBid(i,t,e)}))})),Fs.setInternalLocalStorage("adthrive_bc",$s(this._savedBids,this._rdx))}_handleRequestingVideoBids(e){e.forEach((e=>{if(Object.keys(this._savedBids).includes(e.name)&&(this._prebidMethods.addToQueue((()=>{this.saveVideoSlotBids(e)})),this._sessionNonFPV)){const{floor:t,percentile:i,sessionFloorData:s}=this._getFloorValues(e.name);this._config.video.setVideoFlagSlot(e.name,{fmlsi:[`${t}@${i}`]}),this._floorsEventBus.storeModuleFloorData.emit({floorData:s,type:this.floorsType,code:e.name})}})),Fs.setInternalLocalStorage("adthrive_bc",$s(this._savedBids,this._rdx))}_handleAmazonVideoBidResponse(e){e.forEach((({video:e,cpm:t})=>{Object.keys(this._savedBids).includes(e.name)&&t>0&&this._prebidMethods.addToQueue((()=>{this._saveAmazonVideoSlotBid(e,t)}))})),Fs.setInternalLocalStorage("adthrive_bc",$s(this._savedBids,this._rdx))}_getFloorValues(e,t){const i=this._getDefaultFloorConfig(),s=this._getPercentile(e),n=((e,t)=>{if(e.length<=1)return 0;if(e.sort(((e,t)=>e-t)),t<=0)return e[0];if(t>=1)return e[e.length-1];const i=t*(e.length+1),s=Math.floor(i)-1,n=s+1,r=Number((i%1).toFixed(1));return i<1?e[0]:n>=e.length?e[s]:e[s]+r*(e[n]-e[s])})(this._savedBids[e],s);return n>0&&this._setValues(i,null!=t?t:e,n),{floor:n,percentile:s,sessionFloorData:i}}_handleRequestedBids(e){this._slots.get(e).forEach((e=>{Object.keys(this._savedBids).includes(e.location)&&this._prebidMethods.addToQueue((()=>{this.saveSlotBids(e)}))})),Fs.setInternalLocalStorage("adthrive_bc",$s(this._savedBids,this._rdx))}_saveBids(e,t){this._prebidMethods.getBidResponsesForAdUnitCode(e).bids.forEach((i=>{Ks(this._savedBids[null!=t?t:e],1e3),i.cpm&&this._savedBids[null!=t?t:e].push(i.cpm)}))}saveSlotBids(e){this._saveBids(e.id,e.location)}_saveAmazonSlotBid(e,t,i){Ks(this._savedBids[i],1e3),t&&this._savedBids[i].push(t)}saveVideoSlotBids(e){this._saveBids(e.name)}_saveAmazonVideoSlotBid(e,t){Ks(this._savedBids[e.name],1e3),t&&this._savedBids[e.name].push(t)}_getPercentile(e){let t;return t=e.includes(Qe.Video_StickyOutstream)?this._stickyOutstreamSessionPercentileExperiment.result:e.includes("Video")?this._videoSessionPercentileExperiment.result:this._displaySessionPercentileExperiment.result,t||this.defaultPercentile}get defaultPercentile(){return this._percentile}get active(){return this.enabled&&this._sessionNonFPV}get enabled(){return!0===this._floorsExperiment.result.legacy}constructor(e,t,i,s,n,r,a,o,l,d,c,h){super(e,t),this._config=e,this._prebidMethods=t,this._videoRequestManager=i,this._floorsExperiment=s,this._spaEventBus=n,this._slotManagerEventBus=r,this._slotEventBus=a,this._displaySessionPercentileExperiment=o,this._stickyOutstreamSessionPercentileExperiment=l,this._videoSessionPercentileExperiment=d,this._floorsEventBus=c,this._slots=h,this.floorsType=He,this._percentile=.6,this._rdx=33,this._defaultSavedBids={Content:[],Recipe:[],Header:[],Below_Post:[],Sidebar:[],Footer:[],"Video_In-Post_ClicktoPlay_SoundOn":[],Video_Collapse_Autoplay_SoundOff:[],Video_Individual_Autoplay_SOff:[],Video_Coll_SOff_Smartphone:[],Video_StickyOutstream_1:[],Video_StickyOutstream:[]},this._eventListenersSet=!1,this._offEvents=[()=>{}],this._sessionNonFPV=!1===Fs.readInternalLocalStorage("adthrive_session_fpv");const u=Fs.readInternalLocalStorage("adthrive_bc");this._savedBids={...this._defaultSavedBids,...u&&Hs(u,this._rdx)}}}kv=B([bn("FloorsSessionComponent"),D(),j("design:type",Function),j("design:paramtypes",[void 0===_c?Object:_c,void 0===Mn?Object:Mn,void 0===Lc?Object:Lc,void 0===ul?Object:ul,void 0===ir?Object:ir,void 0===nr?Object:nr,void 0===Bn?Object:Bn,void 0===Cv?Object:Cv,void 0===Tv?Object:Tv,void 0===wv?Object:wv,void 0===Yn?Object:Yn,void 0===ra?Object:ra])],kv);class Av extends br{init(){this._key="LazyFloorMultiplier",this._lookup="BPFLMULT2"}get result(){return this._result}}Av=B([bn("LazyFloorMultiplierExperiment"),M()],Av);class Iv extends mv{init(){this._slotManagerEventBus.requestingBids.on((e=>this.handleRequestingBids(e)))}handleRequestingBids(e){const t=this._slots.get(e)||[];this._prebidMethods.addToQueue((()=>{this._setLazyBidPoolFloors(t.filter((e=>this._enabledAdUnits.includes(e.location)&&!e.refreshCount&&e.lazy&&e.bidPoolId)).map((e=>({adUnitCode:e.id,refreshCount:e.refreshCount,bidPoolId:e.bidPoolId}))))}))}_getLazyMultiplier(){const e=this._lazyFloorMultiplierExperiment.result;return"number"!=typeof e?1:e}_getFloorValue(e,t,i,s){this._updateBidTTL(e,t,s);const[n]=s?this._prebidMethods.getHighestCpmBidsForPoolId(s):this._prebidMethods.getHighestCpmBids(e);return(null==n?void 0:n.cpm)*i}_setLazyBidPoolFloors(e){const t=this._getDefaultFloorConfig(),i=this._getLazyMultiplier();for(const s of e){const{adUnitCode:e,bidPoolId:n}=s,r=sn(),a=this._getFloorValue(e,r,i,n);a&&this._setValues(t,e,a),this._floorsEventBus.storeModuleFloorData.emit({floorData:t,type:this.floorsType,code:s.adUnitCode})}}get active(){return this.enabled}get enabled(){return!0===this._floorsExperiment.result.legacy}constructor(e,t,i,s,n,r,a){super(e,t),this._config=e,this._prebidMethods=t,this._floorsExperiment=i,this._slotManagerEventBus=s,this._lazyFloorMultiplierExperiment=n,this._floorsEventBus=r,this._slots=a,this.floorsType=$e,this._enabledAdUnits=[Qe.Content,Qe.Recipe,Qe.Below_Post]}}Iv=B([bn("FloorsLazyBidPoolComponent"),D(),j("design:type",Function),j("design:paramtypes",[void 0===_c?Object:_c,void 0===Mn?Object:Mn,void 0===ul?Object:ul,void 0===nr?Object:nr,void 0===Av?Object:Av,void 0===Yn?Object:Yn,void 0===ra?Object:ra])],Iv);class xv extends Fn{get prioritizedFloorsByUnit(){return this._prioritizedFloorsByUnit}get floorAbbrv(){return this._floorAbbrv}get skipAbbrv(){return this._skipAbbrv}init(){this._setupEventListeners(),this._setVideoDiscountRules(),this._initiateSubComponents()}_initiateSubComponents(){this._floorsComponents.forEach((e=>{const t=e.floorsType,i="raptive"!==t;var s;(e.init(),e.active)&&(this._floorsConfig.addActiveFloorsType(t),i&&this._activeFloorComponentTargeting.push((null!=(s=this._floorAbbrv[t])?s:t).slice(0,2)))}))}getDefaultFloorConfig(){return{...dg(this._floorsConfig.defaultFloorData)}}_setupEventListeners(){const{fbrap:e,legacy:t}=this._floorsConfig.floorsExperiment,i=t||e,s=i?"on":"once";this._handleAuctionRequestEvents(s),this._handleAuctionEndEvents(i),this._handleFloorEvents(),this._handleAddedEvent()}_handleAddedEvent(){const e=this._activeFloorComponentTargeting;this._slotEventBus.addSlots.on((t=>{this._slots.get(t).forEach((t=>t.setSlotTargetingFlag("fle",e,!0)))})),this._videoEventBus.videoPlayerAdded.on((t=>{t.forEach((t=>t.eligibleFloorComponents=e))}))}_handleFloorEvents(){this._floorsEventBus.storeModuleFloorData.on((e=>this._storeLegacyFloorData(e))),this._floorsEventBus.storeRaptiveFloorData.on((e=>this._storeRaptiveFloorData(e))),this._floorsEventBus.setAuctionFloorData.on((e=>this._setAuctionFloorData(e))),this._floorsEventBus.clearAllFloorData.on((()=>{this._handleClearAllFloorData()}))}_handleAuctionRequestEvents(e){e?(this._slotEventBus.preRequestBids[e](this._setBannerAuctionFloor.bind(this)),this._videoEventBus.preRequestVideoBids[e](this._setVideoAuctionFloor.bind(this))):this._setLocationAuctionFloor()}_handleAuctionEndEvents(e){this._prebidEventBus.auctionEnd.on((t=>this._handleAuctionEnd(t,e))),this._slotEventBus.auctionsCompleted.on((e=>this._handleSlotAuctionComplete(e))),this._videoEventBus.auctionsCompleted.on((e=>this._handleVideoAuctionComplete(e)))}_storeLegacyFloorData(e){const t=e.cpm;if(t&&this._refreshFloors.set(e.code,t),!Object.keys(e.floorData.values||{}).length)return;const i={...this._prioritizedFloorsByUnit.get(e.code),[e.type]:{floorData:e.floorData,...t&&{cpm:t}}};this._prioritizedFloorsByUnit.set(e.code,i)}_storeRaptiveFloorData(e){this._raptiveFloors=e}_setAuctionFloorData({auctionId:e,price:t,floorData:i,bidder:s}){this._auctionFloors.set(e,{price:t,floorData:i,bidder:s})}_handleAuctionEnd(e,t){t&&e.adUnitCodes.forEach((e=>this._clearRefreshFloorValue(`${this._host}|${e}`)))}_handleSlotAuctionComplete(e){this._slots.get(e).forEach((e=>{this._clearRefreshFloorValue(e.id),this._setSlotFloorTargeting(e)}))}_handleVideoAuctionComplete(e){e.forEach((e=>{this._clearRefreshFloorValue(e.name),this._setVideoFloorTargeting(e)}))}_handleClearAllFloorData(){this._prioritizedFloorsByUnit=new Map}_setVideoDiscountRules(){Object.keys(et).forEach((e=>{const t=`${this._host}|${et[e]}`;this._vidDiscountRules[t]=1e-5}))}_getCombinedLegacyData(e,t){const i=this.getDefaultFloorConfig();i.modelVersion=`legacy.${t}`;for(const e of this._prioritizedFloorsByUnit.values())for(const t of this._floorPriority){var s;const n=null==(s=e[t])?void 0:s.floorData;if(n){i.values={...i.values||{},...n.values},i.modelWeight=100;break}}return i.values={...i.values,...e.values},i}_clearRefreshFloorValue(e){this._floorResetTypes.forEach((t=>{var i;const s=this._prioritizedFloorsByUnit.get(e),n=null==s||null==(i=s[t])?void 0:i.floorData,r=null==n?void 0:n.values[e];n&&r&&(delete s[t],this._config.floors.savePriorityFloorData(e,n,t))}))}_awaitRaptiveMLFloorsLoaded(){return this._config.floors.raptiveMLFloorsEventPromise}async _setBannerAuctionFloor(e){this._config.floors.raptiveMLFloorsLoaded||await this._awaitRaptiveMLFloorsLoaded();this._slots.get(e).forEach((e=>{var t,i;const s=null==(i=e.prebidAdUnit)||null==(t=i[0])?void 0:t.code;this._setLocationAuctionFloor(s,e)}))}async _setVideoAuctionFloor(e){this._config.floors.raptiveMLFloorsLoaded||await this._awaitRaptiveMLFloorsLoaded(),e.videos.forEach((e=>{const t=e.name;this._setLocationAuctionFloor(t,e)}))}_setLocationAuctionFloor(e,t){e&&t&&this._setAuctionFloor(e,t)}_setAuctionFloor(e,t){var i;let s={};const n=this._raptiveFloors,r=this._floorPriority;this._setLegacyFloorValues(s,r,e,t),s={floors:n,type:Ve,...s};const a=this._excludeSettingFloors(s.type);(null==(i=s.floors)?void 0:i.modelGroups.length)?(this._setAmazonFloors(s.floors,s.floors.currency,s.type,a),this._setPrebidFloors(s.floors,s.type,s.type===Ve,a)):(this._setPrebidFloors(this._getBackupFloorValues(),qe,!1),this._setAmazonFloors(this._getBackupFloorValues(),"USD",s.type))}_setLegacyFloorValues(e,t,i,s){const n=[];let r=!1;for(let s=0;s<=t.length;s++){var a,o,l;const d=null==(o=this._prioritizedFloorsByUnit.get(i))||null==(a=o[t[s]])?void 0:a.floorData;(null==d||null==(l=d.values)?void 0:l[`${this._host}|${i}`])&&(r||(e.floors=this._getLegacyFloorsSchema(d,t[s]),e.type=t[s]),n.push(t[s]),r=!0)}const d=n.map((e=>{var t;return(null!=(t=this._floorAbbrv[e])?t:e).slice(0,2)}));"id"in s?s.setSlotTargetingFlag("fla",d.length?d:["none"],!0):s.appliedFloorComponents=d}_getBackupFloorValues(){return this._getLegacyFloorsSchema({values:{...this._vidDiscountRules},schema:{}},qe)}_getLegacyFloorsSchema(e,t){const i=this._getCombinedLegacyData(e,t),s=Ue===t||He===t?1:0,n=this._config.floors;return!n.floorsExperiment.fbrap&&n.floorsData||{floorProvider:"legacy",floorProviderType:t,floorsSchemaVersion:2,currency:"USD",modelGroups:[{modelWeight:100,modelVersion:"legacy",...i,skipRate:s}]}}_excludeSettingFloors(e){if(!e||e&&!this._config.floors.floorsTypeExcludes.has(e))return!1;const{ccpa:t,gdpr:i}=this._config,s=t.enabled&&t.ccpaOptOut===t.privacyString,n=i.enabled&&i.revokedPurposeConsent;return e&&(s||n)}_setPrebidFloors(e,t,i,s=!1){const n=s?{}:{floors:{enforcement:{enforceJS:!1},data:e,...i&&{additionalSchemaFields:this._config.floors.customSchemaFields}}};this._prebidMethods.setConfig(n)}_setAmazonFloors(e,t="USD",i="",s=!1){var n;const r=[],a=(null==e||null==(n=e.modelGroups)?void 0:n[0])||{},o=(null==a?void 0:a.values)||{},l="raptive"===i;Object.keys(o).forEach((e=>{const i=e.split("|");var n;const a=i.length&&i[l&&null!=(n=this._config.floors.getSchemaFieldOrder("adUnitCode"))?n:1]||e;let d=a;if(l&&i.length>2){d=`${a}-${i[this._config.floors.getSchemaFieldOrder("hvp")||1]}`}r.push({code:d.toLowerCase(),value:s?0:o[e],currency:t||"USD"})})),this._floorsEventBus.setAmazonFloors.emit(r)}_getTargetingValue(e){const t=null==e?void 0:e.modelVersion;var i;const s=null!=(i=e.floorProviderType)?i:null==t?void 0:t.replace("legacy.",""),n="legacy"===(null==e?void 0:e.floorProvider)&&(s&&this._floorAbbrv[s]||"L");let r=!1;(null==e?void 0:e.skipped)&&(r=this._skipAbbrv[e.skippedReason]||"s","se"===r&&W.event("Floors","_getTargetingValue","fv:se"));return{modelVersion:r||n||t||"none",modelTimestamp:n?-1:t&&(null==e?void 0:e.modelTimestamp)||0,isLegacy:n}}_getLoggedFloorValuesForAdUnit(e,t){const i=t?":":"%3A",s=[];return this._config.floors.activeFloorsTypes.forEach((t=>{var n,r,a;const o=this._prioritizedFloorsByUnit.get(e),l=null==o||null==(n=o[t])?void 0:n.cpm,d=null==o||null==(r=o[t])?void 0:r.floorData;var c;const h=l||(null!=(c=null==d||null==(a=d.values)?void 0:a[`${this._host}|${e}`])?c:0);h&&s.push(`${Ge[t]}${i}${h.toFixed(4)}`)})),s.length,s}_getFloorTargeting(e,t){var i;const s=t?null==(i=t.prebidAdUnit)?void 0:i[0]:this._getVideoPlayerPrebidUnit(e),n=this._getLoggedFloorValuesForAdUnit(e,!0),{floorPrice:r,floorData:a,bidder:o}=this.getAuctionFloors(null==s?void 0:s.lastAuctionId),{modelVersion:l,modelTimestamp:d,isLegacy:c}=this._getTargetingValue(a);null==a||a.skipped;return{bidder:o,fcv:n,floorPrice:r,modelTimestamp:d,modelVersion:l,shouldSendModelTimestamp:!c&&Number(d)>=0}}_getVideoPlayerPrebidUnit(e){return(this._prebidMethods.isPrebidLoaded()&&this._prebidMethods.getPrebidAdUnits()||[]).filter((t=>t.code===e))[0]}_setSlotFloorTargeting(e){const{bidder:t,fcv:i,floorPrice:s,modelTimestamp:n,modelVersion:r,shouldSendModelTimestamp:a}=this._getFloorTargeting(e.id,e);e.setSlotTargetingFlag("fv",[r],!0),e.setSlotTargetingFlag("hbf",[s],!0),e.setSlotTargetingFlag("hbb",[null!=t?t:"none"],!0),a&&e.setSlotTargetingFlag("flrti",[`${n}`],!0),i.length&&e.setTargeting({key:"fcv",value:i})}_setVideoFloorTargeting(e){const t=e.name,{fcv:i,floorPrice:s,modelTimestamp:n,modelVersion:r,shouldSendModelTimestamp:a}=this._getFloorTargeting(t),o={fv:r,hbf:s,...i.length&&{fcv:i},...a&&{flrti:`${n}`}};this._config.video.setVideoFlagSlot(t,o)}getAuctionFloors(e){const{price:t,floorData:i,bidder:s}=e&&this._auctionFloors.get(e)||{},n=i||{};return{floorPrice:!(null==i?void 0:i.skipped)&&t?t.toFixed(4):"none",floorData:n,bidder:s}}constructor(e,t,i,s,n,r,a,o,l,d,c,h){super(),this._config=e,this._floorsConfig=t,this._prebidMethods=i,this._prebidEventBus=s,this._slotEventBus=n,this._videoEventBus=r,this._floorsEventBus=a,this._slots=h,this._prioritizedFloorsByUnit=new Map,this._floorPriority=this._config.floors.cmPriority,this._floorResetTypes=[ze,$e,Ue],this._vidDiscountRules={},this._host=window.location.hostname,this._floorAbbrv={[ze]:"lr",[$e]:"lbp",[Ue]:"ll",[He]:"ls"},this._skipAbbrv={random:"sr",not_found:"se",session:"sks",lazy:"sl"},this._refreshFloors=new Map,this._auctionFloors=new Map,this._activeFloorComponentTargeting=[],this._floorsComponents=[o,l,d,c].filter((e=>e.enabled))}}xv=B([D(),j("design:type",Function),j("design:paramtypes",[void 0===_c?Object:_c,void 0===pl?Object:pl,void 0===Mn?Object:Mn,void 0===Jn?Object:Jn,void 0===Bn?Object:Bn,void 0===rr?Object:rr,void 0===Yn?Object:Yn,void 0===Iv?Object:Iv,void 0===_v?Object:_v,void 0===Ev?Object:Ev,void 0===kv?Object:kv,void 0===ra?Object:ra])],xv);class Pv extends Fn{start(){if(this._config.footer.elements.length){this._footer=document.createElement("div"),this._footer.classList.add(...this._footerClassNames),this._config.footer.elements.sort(((e,t)=>e.order-t.order)).forEach((({element:e})=>{e instanceof Element?this._footer.insertAdjacentElement("beforeend",e):this._footer.insertAdjacentHTML("beforeend",e)}));const e=""===this._config.adOptions.footerSelector?".adthrive-mobile #page-wrapper":this._config.adOptions.footerSelector;(document.querySelector(e)||document.body).insertAdjacentElement("beforeend",this._footer),this._setupListeners()}}_setupListeners(){this._spaEventBus.routeChanged.once((()=>{document.querySelector(`.${this._footerClassNames.join(".")}`)||this.start()}))}_added(){this._footerConfigEventBus.footerElementAdded.on((e=>{this._config.footer.elements.push(e)}),{handleEventsAlreadyEmitted:!0})}constructor(e,t,i){super(),this._config=e,this._spaEventBus=t,this._footerConfigEventBus=i,this._footerClassNames=["adthrive-comscore","adthrive-footer-message"],this._footer={},this._added()}}Pv=B([bn("FooterComponent"),D(),j("design:type",Function),j("design:paramtypes",[void 0===_c?Object:_c,void 0===ir?Object:ir,void 0===Xn?Object:Xn])],Pv);class Ov extends Fn{init(){this._slotEventBus.triggerRenderOutsideGam.on(this._onTriggerRenderOutsideGam.bind(this)),this._googleAdManagerEventBus.slotRenderEnded.on(this._slotRenderedHandler.bind(this)),this._prebidEventBus.bidWon.on(this._bidWonEventHandler.bind(this))}_slotRenderedHandler({event:e,slotId:t}){const i=this._slotManager.getSlot(t);if(!i)return;const s=[Qe.Native_Recipe,Qe.Interstitial],n=this._isGAMDisabled(i);!e.isEmpty&&!n||s.includes(i.location)||this._onTriggerRenderOutsideGam(i.id)}_bidWonEventHandler(e){const t=this._getSlot(e);t&&this._isGAMDisabled(t)&&this._handleGptLibFailedToLoad(e,t)}_handleGptLibFailedToLoad(e,t){this._slotEventBus.adRenderedOutsideGAM.emit({bidResponse:e,slotId:t.id})}_getSlot(e){return this._slotManager.getSlot(e.sharedBidInUse||e.adUnitCode)}_isGAMDisabled(e){var t;return!(null==e||null==(t=e.googleTagSlot)?void 0:t.getResponseInformation())}_onTriggerRenderOutsideGam(e){this.clearSharedBidPool(e),this._config.gdpr.enabled||(W.event("GoogleAdManagerFallbackComponent","init","slotIsEmpty","adding prebid render to queue"),this.renderSlotOutsideGAM(e))}clearSharedBidPool(e){this._prebidMethods.clearTargetingForSharedBidPool(e)}_createGoogleAdManagerFallbackDiv(e){e.iframe=this._createGoogleAdManagerFallbackIframe();const t=document.createElement("div");t.className="google-ad-manager-fallback-container",t.style.margin="auto",e.location===Qe.Video_StickyOutstream&&(t.style.height="0",e.iframe.style.width="0",e.iframe.style.height="0"),t.appendChild(e.iframe),this._clearSlotDiv(e),e.element.children.length<2&&e.element.appendChild(t),this._slotEventBus.googleAdManagerFallbackDivAdded.emit(e.id)}_createEmptyFallbackDiv(e){var t;const i=document.createElement("div");i.className="google-ad-manager-fallback-container",i.style.margin="auto",i.style.height="0",this._clearSlotDiv(e),(null==(t=e.element)?void 0:t.children.length)<2&&e.element.appendChild(i),this._slotEventBus.googleAdManagerFallbackDivAdded.emit(e.id)}_clearSlotDiv(e){var t;const i=null==(t=e.element)?void 0:t.firstElementChild;"google-ad-manager-fallback-container"===(null==i?void 0:i.className)&&e.element.removeChild(i)}_createGoogleAdManagerFallbackIframe(){const e=document.createElement("iframe");return e.style.border="0",e.style.display="inline!important",e.scrolling="no",e.frameBorder="0",e.marginHeight="0",e.marginWidth="0",e.style.height="1",e.style.width="1",e}_setTopPrebidBid(e){var t,i,s,n;const{slotId:r,bidPoolId:a,passiveBidPoolId:o}=e,l=a?(null==(i=this._prebidMethods.getBidResponsesForBidPoolId(a))||null==(t=i.bids.filter((e=>"rendered"!==e.status&&"native"!==e.mediaType&&!e.sharedBidInUse)).sort(((e,t)=>t.cpm-e.cpm)))?void 0:t[0])||(null==(s=this._prebidMethods.getHighestCpmBidsForPoolId(a))?void 0:s[0]):null==(n=this._prebidMethods.getHighestCpmBids(r))?void 0:n[0];return l&&(a||o)&&(l.sharedBidInUse=r),l}renderSlotOutsideGAM(e){const t=this._slotManager.getSlot(e);if(!t)return;const i=this._getTopBid(t);if(!i)return this._createEmptyFallbackDiv(t),void this._slotEventBus.gamEmptyNoBidResponse.emit(e);this._createGoogleAdManagerFallbackDiv(t),this._removePreviousSiblingDiv(t),this._setDisplayProperty(t),this._emitEventAndRenderAd(t,i)}_getAmazonBidData(e){const t=this._config.amazon.availableBids.get(e.id);if(!t)return;return t.pmpCpm&&t.cpmt.cpm?i:t}_removePreviousSiblingDiv(e){const t=e.iframe&&e.iframe.parentElement;if(t){const e=t.previousSibling;null==e||e.remove()}}_setDisplayProperty(e){const t=document.getElementById(e.element.id);null==t||t.style.setProperty("display","block")}_emitEventAndRenderAd(e,t){var i,s;const n=null==(s=e.iframe)||null==(i=s.contentWindow)?void 0:i.document,r=Ot(t);if(n){if(this._slotEventBus.adRenderingOutsideGAM.emit({bidResponse:t,slotId:e.id}),e.location===Qe.Video_StickyOutstream&&r)return;r?this._amazonMethods.renderImp(n,t.amzniid):this._prebidMethods.renderAd(n,t.adId)}}constructor(e,t,i,s,n,r,a){super(),this._config=e,this._googleAdManagerEventBus=t,this._prebidMethods=i,this._prebidEventBus=s,this._slotManager=n,this._slotEventBus=r,this._amazonMethods=a}}Ov=B([bn("GoogleAdManagerFallbackComponent"),D(),j("design:type",Function),j("design:paramtypes",[void 0===_c?Object:_c,void 0===Sc?Object:Sc,void 0===Mn?Object:Mn,void 0===Jn?Object:Jn,void 0===Kg?Object:Kg,void 0===Bn?Object:Bn,void 0===Rc?Object:Rc])],Ov);const Rv={"000000":"A","000001":"B","000010":"C","000011":"D","000100":"E","000101":"F","000110":"G","000111":"H","001000":"I","001001":"J","001010":"K","001011":"L","001100":"M","001101":"N","001110":"O","001111":"P","010000":"Q","010001":"R","010010":"S","010011":"T","010100":"U","010101":"V","010110":"W","010111":"X","011000":"Y","011001":"Z","011010":"a","011011":"b","011100":"c","011101":"d","011110":"e","011111":"f",1e5:"g",100001:"h",100010:"i",100011:"j",100100:"k",100101:"l",100110:"m",100111:"n",101e3:"o",101001:"p",101010:"q",101011:"r",101100:"s",101101:"t",101110:"u",101111:"v",11e4:"w",110001:"x",110010:"y",110011:"z",110100:"0",110101:"1",110110:"2",110111:"3",111e3:"4",111001:"5",111010:"6",111011:"7",111100:"8",111101:"9",111110:"-",111111:"_"};class Lv extends Fn{init(){var e,t;const i=[...(null==(e=window.__gpp)?void 0:e.events)||[]],s=[...(null==(t=window.__gpp)?void 0:t.queue)||[]];window.__gpp=this._gpp.bind(this),window.__gpp.queue=s,this._usCMP.required?this._consentEventBus.usCmpConsentCaptured.on((()=>{this._initializeCoreGPPFunctions()}),{handleEventsAlreadyEmitted:!0}):this._initializeCoreGPPFunctions(),i.forEach((e=>{this._addEventListener(e.callback,e.parameter||null)})),this._addLocatorFrame(),this._refreshPrivacyStrings(),this._spaEventBus.routeChanged.on((()=>{this._setPrebidGPPString()}))}_setPingData(){return{gppVersion:"1.1",cmpStatus:"loaded",cmpDisplayStatus:"visible",cmpId:1,supportedAPIs:this._supportedAPIs,signalStatus:this._usCMP.required&&null===this._usCMP.consent?"not ready":"ready",sectionList:this._sectionList,applicableSections:this._sectionList,gppString:this._createGPPString(),parsedSections:this._getParsedSections()}}_setSections(){return{tcfeuv1:null,tcfeuv2:null,"":null,"--":null,tcfca:null,uspv1:this._getParsedSections(),usnat:this._getUSNatObj(),usca:null,usva:null,usco:null,usut:null,usct:null}}_getParsedSections(){return{uspv1:this._ccpa.privacyString||null,usnat:this._getUSNatObj()}}_initializeCoreGPPFunctions(){this._enableEvents(),this._setPrebidGPPString(),this._refreshPingData()}_refreshPrivacyStrings(){this._pingData.gppString=this._createGPPString(),this._pingData.parsedSections&&this._pingData.parsedSections.uspv1&&(this._pingData.parsedSections.uspv1=this._callUSPAPI("getUSPData").uspString)}_refreshPingData(){this._usCMP.required?(this._pingData.signalStatus=null===this._usCMP.consent?"not ready":"ready",this._pingData.cmpDisplayStatus=null===this._usCMP.consent?"visible":"hidden"):(this._pingData.signalStatus="ready",this._pingData.cmpDisplayStatus="visible")}_triggerEventCallbacks(e){const t=window.__gpp.events;if(t&&t.length){this._refreshPrivacyStrings();const i=this._pingData;t.forEach((t=>{const s={eventName:e,listenerId:t.id,data:this._getEventData(e),pingData:i};t.callback(s)}))}}_getEventData(e){return"sectionChange"===e?this._supportedAPIs:"signalStatus"===e?"ready":void 0}_refreshGppData(){this._pingData=this._setPingData(),this._sections=this._setSections()}_enableEvents(){this._triggerEventCallbacks("signalStatus"),this._ccpa.consentChange.on((()=>{this._refreshGppData(),this._triggerEventCallbacks("sectionChange"),this._setPrebidGPPString(),this._triggerEventCallbacks("signalStatus")}))}_setPrebidGPPString(){const e=this._createGPPString();this._ortb2.addOrtb2Reg(e,this._sectionList)}_addEventListener(e,t){window.__gpp=window.__gpp||{},window.__gpp.events=window.__gpp.events||[],"lastId"in window.__gpp||(window.__gpp.lastId=0),window.__gpp.lastId++;const i=window.__gpp.lastId;window.__gpp.events.push({id:i,callback:e,parameter:t}),e({eventName:"listenerRegistered",listenerId:i,data:!0,pingData:this._pingData},!0)}_removeEventListener(e,t){let i=!1;const s=t;window.__gpp=window.__gpp||{},window.__gpp.events=window.__gpp.events||[];for(let e=0;e`${e}${this._getUSNatData(t,!0)}`),"");if(e.length<66){const t=66-e.length;for(let i=0;iRv[e]||"A")).join("")}_padStart(e,t){return e.padStart?e.padStart(t,"0"):`${e}${Array(t).join("0")}`}_encodedUSNat(e,t){const i=this._usnatFields.get(e)&&this._usnatFields.get(e).fieldValLength||0,s=(+t>>>0).toString(2);return this._padStart(s,i)}_getUSNatData(e,t=!1){const i=this._usnatFields.get(e);if(!i)return"";if(void 0!==i.unencodedVal)return t?this._encodedUSNat(e,i.unencodedVal):i.unencodedVal;const s=this._ccpa.privacyString===this._ccpa.ccpaOptOut?i.optOut:i.optIn;return t?this._encodedUSNat(e,s||"0"):s}_getUSNatObj(){return this._usnatFieldOrder.map((e=>{const t=this._getUSNatData(e);return{[e]:t}})).reduce(((e,t)=>({...e,...t})),{})}_getGPPData(){return{sectionId:3,gppVersion:1.1,sectionList:this._sectionList,applicableSections:this._sectionList,gppString:this._createGPPString(),pingData:this._pingData}}_hasSection(e){return!!this._sections[e]}_getSection(e){return this._sections[e]?this._sections[e]:null}_callUSPAPI(e){return this._ccpaComponent.uspapi(e,1,((e,t)=>{if(t)return e}))}_getField(e){const t=e.split("."),i=t[0],s=t[1];return this._hasSection(i)?"uspv1"===i?this._callUSPAPI(s):"usnat"===i?this._getUSNatData(s):void 0:null}_addLocatorFrame(){if(null===document.getElementById("__gppLocator")){const e=document.createElement("iframe");e.style.display="none",e.id="__gppLocator",e.name="__gppLocator",document.body.appendChild(e),window.__gpp_msghandler=e=>{const t="string"==typeof e.data;let i;try{i=t?JSON.parse(e.data):e.data}catch(e){i=null}if("object"==typeof i&&null!==i&&"__gppCall"in i){const s=i.__gppCall;window.__gpp(s.command,((i,n)=>{const r={__gppReturn:{returnValue:i,success:n,callId:s.callId}};e.source.postMessage(t?JSON.stringify(r):r,"*")}),s.parameter)}}}"__gpp"in window&&"function"==typeof window.__gpp||(window.__gpp=window.__gpp_stub,window.addEventListener("message",window.__gpp_msghandler,!1),window.__gpp_addFrame("__gppLocator"))}_createGPPString(){return`DBABzw~${this._callUSPAPI("getUSPData").uspString}~${this._createUSNatString()}`}_gpp(e,t,i){const s="function"==typeof t;switch(e){case"ping":return this._refreshGppData(),this._refreshPrivacyStrings(),s?t(this._pingData,!0):this._pingData;case"addEventListener":return s?this._addEventListener(t,i):null;case"removeEventListener":return s?this._removeEventListener(t,i):null;case"hasSection":if(i){const e=this._hasSection(i);return s?t(e,!0):e}case"getSection":if(i){const e=this._getSection(i);return s?t(e,!0):e}case"getField":if(i){const e=this._getField(i);return s?t(e,!0):e}case"getGPPData":return s?t(this._getGPPData()):this._getGPPData()}}get enabled(){return"US"===this._context.country}constructor(e,t,i,s,n,r,a,o){super(),this._gpc=e,this._ccpa=t,this._usCMP=i,this._context=s,this._ccpaComponent=n,this._ortb2=r,this._spaEventBus=a,this._consentEventBus=o,this.ccpaRequired=this._ccpa.required,this.ccpaNotApplicable=this._ccpa.ccpaNotApplicable,this.gpcEnabled=this._gpc.gpcEnabled,this.gpcUpdated=!1,this.globalPrivacyControl=window.navigator.globalPrivacyControl,this._sectionList=[6,7],this._supportedAPIs=["6:uspv1","7:usnat"],this._usnatFieldOrder=Object.values(We),this._usnatFields=new Map([[We.Version,{unencodedVal:1,fieldValLength:6}],[We.SharingNotice,{unencodedVal:1,fieldValLength:2}],[We.SaleOptOutNotice,{unencodedVal:1,fieldValLength:2}],[We.SharingOptOutNotice,{unencodedVal:1,fieldValLength:2}],[We.TargetedAdvertisingOptOutNotice,{unencodedVal:1,fieldValLength:2}],[We.SensitiveDataProcessingOptOutNotice,{unencodedVal:0,fieldValLength:2}],[We.SensitiveDataLimitUseNotice,{unencodedVal:0,fieldValLength:2}],[We.SaleOptOut,{fieldValLength:2,optIn:Ye,optOut:Ke}],[We.SharingOptOut,{fieldValLength:2,optIn:Ye,optOut:Ke}],[We.TargetedAdvertisingOptOut,{fieldValLength:2,optIn:Ye,optOut:Ke}],[We.SensitiveDataProcessing,{unencodedVal:[0,0,0,0,0,0,0,0,0,0,0,0],fieldValLength:24}],[We.KnownChildSensitiveDataConsents,{unencodedVal:[0,0],fieldValLength:4}],[We.PersonalDataConsents,{unencodedVal:0,fieldValLength:2}],[We.MspaCoveredTransaction,{unencodedVal:2,fieldValLength:2}],[We.MspaOptOutOptionMode,{unencodedVal:0,fieldValLength:2}],[We.MspaServiceProviderMode,{unencodedVal:0,fieldValLength:2}],[We.SubSectionType,{unencodedVal:0,fieldValLength:2}],[We.Gpc,{unencodedVal:!!navigator.globalPrivacyControl,fieldValLength:1}]]),this._pingData=this._setPingData(),this._sections=this._setSections()}}Lv=B([bn("GPPComponent"),D(),j("design:type",Function),j("design:paramtypes",[void 0===ja?Object:ja,void 0===Na?Object:Na,void 0===ha?Object:ha,void 0===Fr?Object:Fr,void 0===Yf?Object:Yf,void 0===Lu?Object:Lu,void 0===ir?Object:ir,void 0===Wn?Object:Wn])],Lv);class Dv extends Fn{init(){let e=!1;this._slots.bidServed.on((t=>{t.servedPrebidBidResponse&&"gumgum"===t.servedPrebidBidResponse.bidder&&t.location===Qe.Footer&&(e=!0)})),this._slotManagerEventBus.refreshing.on((t=>{var i;this._slots.get(t).filter((e=>e.location===Qe.Footer))&&e&&(e=!1,"function"==typeof(null==(i=window.GUMGUM)?void 0:i.removeISAd)&&window.GUMGUM.removeISAd())}))}constructor(e,t){super(),this._slots=e,this._slotManagerEventBus=t}}Dv=B([bn("GumGumInScreenComponent"),D(),j("design:type",Function),j("design:paramtypes",[void 0===ra?Object:ra,void 0===nr?Object:nr])],Dv);class Mv extends Fn{init(){this._identityEventBus.identityApiDataSubmitted.on((({data:e,cb:t})=>this.identityOptIn(e,t).catch((()=>{})))),window.addEventListener("message",(e=>{if(window===window.top&&e&&e.origin===window.origin&&e.data&&"adthriveIdentityAPI"===e.data.message&&e.data.info){const t={message:"adthriveIdentityFinished",response:{}};this.identityOptIn(e.data.info,(i=>{var s;e.source instanceof MessagePort||e.source instanceof ServiceWorker||(t.response=i,null==(s=e.source)||s.postMessage(t,e.origin))})).catch((()=>{}))}}),!1)}start(){this._identityEventBus.identityApiReady.emit()}validateData(e){if(!e.source||"string"!=typeof e.source||e.source.length>20)throw Error("source required with 20 characters or less");if(!e.plainText&&!e.sha256&&!e.sha1)throw Error("plainText, sha256 or sha1 required");if(e.plainText&&("string"!=typeof e.plainText||!Oi(e.plainText)))throw Error(`plainText not string or not valid email: ${e.plainText}`);if(e.sha256&&("string"!=typeof e.sha256||64!==e.sha256.length))throw Error(`sha256 not string or not encoded properly: ${e.sha256}`);if(e.sha1&&("string"!=typeof e.sha1||40!==e.sha1.length))throw Error(`sha256 not string or not encoded properly: ${e.sha1}`)}categorizeSource(e){var t;const i=e.source;"slickstream"===e.source||(null==(t=e.source)?void 0:t.startsWith(ms.PREFIXES.SLICKSTREAM))||(W.event("IdentityAPI","optIn",`source:${i}`),e.source="api")}buildPII(e){let t=e.source;t||(t="api_unknown",W.error("IdentityAPI","buildPII","source not provided with: ",e)),this._emailCaptureHandler.checkSources(t);const i={source:`${t}${ms.SUFFIXES.CAPTURE}`,sourceCollectedDate:is()};return e.plainText&&(i.email=e.plainText),e.sha256&&(i.sha256Hash=e.sha256),e.sha1&&(i.sha1Hash=e.sha1),i}async identityOptIn(e,t){try{if(this._hasRun)throw Error("Identity API Already Successfully Called");if(this._config.ccpa.userOptedOut)throw Error("User has opted out of CCPA");if(this._config.gdpr.enabled){if(!await this._gdprEnforcement.checkConsentForVendor(this._config.gdpr.raptiveVendorId,[1]))throw Error("CafeMedia does not have Purpose 1 consent.")}this.validateData(e),this.categorizeSource(e);const i=this.buildPII(e);this._emailCaptureHandler.emailCaptured.emit({pii:i,identityDataSource:"identityApi"}),t({success:!0,data:{message:"OK"}}),this._hasRun=!0}catch(e){t({success:!1,data:{message:e.message}})}}constructor(e,t,i,s){super(),this._emailCaptureHandler=e,this._config=t,this._gdprEnforcement=i,this._identityEventBus=s,this._hasRun=!1}}Mv=B([bn("IdentityAPIComponent"),D(),j("design:type",Function),j("design:paramtypes",[void 0===ko?Object:ko,void 0===_c?Object:_c,void 0===Mu?Object:Mu,void 0===Qn?Object:Qn])],Mv);class Bv extends qg{start(e){const t=[];if(e){const e=e=>{const t=e.target.classList;W.event("JumpToTracker","_logEvent",$g.Video.toLowerCase(),t)};t.push(e)}this.init(t)}constructor(){super(),this.selectors=[".wprm-recipe-jump-video"],this.elements=Array.prototype.slice.call(document.querySelectorAll(this.selectors.join()))}}Bv=B([D(),j("design:type",Function),j("design:paramtypes",[])],Bv);class Fv extends Er{init(){this._key="JumpToTracker",this._lookup="JTTE",this._default=!1}}Fv=B([M()],Fv);class jv extends Fn{start(){this._jumpToRecipeTracker.start(this.enableLogging),this._jumpToVideoTracker.start(this.enableLogging)}constructor(e,t,i,s,n){super(),this._jumpToRecipeTracker=s,this._jumpToVideoTracker=n,this.enableLogging=!e.gpcEnabled&&!t.userOptedOut&&i.result}}jv=B([D(),bn("JumpToTrackerComponent"),j("design:type",Function),j("design:paramtypes",[void 0===ja?Object:ja,void 0===Na?Object:Na,void 0===Fv?Object:Fv,void 0===Gg?Object:Gg,void 0===Bv?Object:Bv])],jv);class Nv extends Fn{init(){this._gamEventBus.slotRenderEnded.on((e=>this._bannerSlotRenderEnded(e))),this._videoEventProxy.videoSlotRendered.on(this._videoSlotRenderEnded.bind(this)),this._slotEventBus.adRenderedOutsideGAM.on(this._onRenderedOutsideGAM.bind(this)),this._slotEventBus.adRenderingOutsideGAM.on(this._onRenderingOutsideGAM.bind(this))}get enabled(){return!0}_onRenderedOutsideGAM(e){this._onBidWonEvent(e.bidResponse,e.slot)}_onBidWonEvent(e,t){const i=this._slots.get(t);if(!i)return;const s=this._createEventData(dg(e),i);W.event("ImpressionLogComponent","bidWon",s)}_onRenderingOutsideGAM(e){Ot(e.bidResponse)&&this._onBidWonEvent(e.bidResponse,e.slotId)}_getDecodedURI(e){try{return decodeURIComponent(e)}catch(e){return""}}_getTargetingData(e){const t=Ri(e.split("?")[1]);return{custParams:this._getDecodedURI(t.get("cust_params")||""),iu:t.get("iu")||"",sz:this._sizeStringToArray(t.get("sz"))||[1,1]}}_sizeStringToArray(e){if(e)return e.split("x").map((e=>parseInt(e)))}_bannerSlotRenderEnded({event:e,slotId:t}){const i=this._slots.get(t);if(!i)return;const s=e.slot.getAdUnitPath(),n=On();this._renderedSlotKey.set(s,n);const r={adUnitPath:s,advertiserId:e.advertiserId,agnosticCreativeId:e.sourceAgnosticCreativeId,agnosticLineItemId:e.sourceAgnosticLineItemId,campaignId:e.campaignId,companyIds:e.companyIds,creativeId:e.creativeId,isEmpty:e.isEmpty,lineItemId:e.lineItemId,serviceName:e.serviceName,siteTargeting:this._filterTargeting(this._gam.getTargetingMap()),size:e.size,slotElementId:i.id,slotKey:n,slotTargeting:this._filterTargeting(i.getTargetingMap()),yieldGroupIds:e.yieldGroupIds,transactionId:i.transactionId};this._logImpressionEvent(r)}_videoSlotRenderEnded(e){const t=this._getTargetingData(e.tag),i={adUnitPath:t.iu,creativeId:e.gamCreativeId,isEmpty:e.isEmpty,lineItemId:e.gamLineItemId,size:t.sz,slotElementId:e.adUnitName,slotKey:On(),slotTargeting:this._filterTargeting(Li(t.custParams))};this._logImpressionEvent(i)}_filterTargeting(e){return Object.keys(e).filter((t=>!this._filterKeys.has(t)&&e[t].length)).reduce(((t,i)=>(t[i]=e[i],t)),{})}_logImpressionEvent(e){W.event("SlotRenderEnded","adImpression",e)}_getPrebidData(e,t){const{adUnitCode:i,adserverTargeting:{hb_pb:s},bidder:n,adId:r,auctionId:a,width:o,height:l,cpm:d,meta:c,requestTimestamp:h,responseTimestamp:u,timeToRespond:p,expired:g,dealId:m,size:_,source:f,mediaType:v,ttl:y,originalCpm:b}=e;return{adUnitPath:i,adomain:(null==c?void 0:c.advertiserDomains)||[],hb_pb:s,bidder:n,adId:r,auctionId:a,width:o,height:l,cpm:d,requestTimestamp:h,responseTimestamp:u,timeToRespond:p,expired:g,dealId:m,size:_,source:f,mediaType:v,ttl:y,originalCpm:b,isEmpty:!0,...t&&{location:t.location,sequence:t.sequence,nref:t.refreshCount,...t.googleTagSlot&&{slotTargeting:this._filterTargeting(t.getTargetingMap())}}}}_getAmazonData(e,t){const{amzniid:i,bidder:s,deal:n,cpm:r,mediaType:a,size:o}=e,[l,d]=(o||"").split("x");return{amzniid:i,bidder:s,cpm:r,...n&&{deal:n},height:d,isEmpty:!0,mediaType:"default"===a?"banner":a,size:o,width:l,...t&&{adUnitPath:t.id,location:t.location,sequence:t.sequence,nref:t.refreshCount,...t.googleTagSlot&&{slotTargeting:this._filterTargeting(t.getTargetingMap())}}}}_createEventData(e,t){return Ot(e)?this._getAmazonData(e,t):this._getPrebidData(e,t)}constructor(e,t,i,s,n){super(),this._gam=e,this._videoEventProxy=t,this._gamEventBus=i,this._slotEventBus=s,this._slots=n,this._renderedSlotKey=new Map,this._filterKeys=new Set(["abgroup","pvk","bucket","branch","deployment","siteName","siteId","site_code","mcmp","sense"])}}Nv=B([bn("ImpressionLogComponent"),D(),j("design:type",Function),j("design:paramtypes",[void 0===wc?Object:wc,void 0===Yg?Object:Yg,void 0===Sc?Object:Sc,void 0===Bn?Object:Bn,void 0===ra?Object:ra])],Nv);class Uv extends br{init(){this._key="FooterCloseButtonLocation",this._lookup="FCP"}isEnabled(){const e=!(Ur.isRolloutEnabled("mobile-footer-close-button-css-conflict")&&Ki());return super.isEnabled()&&e}}Uv=B([bn("FooterCloseButtonExperiment"),M()],Uv);class Vv extends Fn{init(){this._gamEventBus.slotRenderEnded.on((({slotId:e,event:t})=>{this.slotRenderEnded(e,t)}))}slotRenderEnded(e,t){var i;const s=this._slotManager.getSlot(e);s&&!t.isEmpty&&2===(null==(i=t.size)?void 0:i.length)&&(s.element&&this._locations.includes(s.location)&&s.sticky&&(s.element.setAttribute("closable","true"),this._addCloseButton(s.id)),this._slotEventBus.adRenderedOutsideGAM.on((e=>{this._addCloseButton(e.slotId)})))}_addCloseButton(e){const t=this._slotManager.getSlot(e);if(!t)return;const{element:i,location:s,refreshCount:n}=t;t.element&&this._locations.includes(t.location)&&t.sticky&&i.hasAttribute("closable")&&(null===this._closeButton&&(this._closeButton=this._createButton(i,s,n)),this._changeCloseButtonLocation(i,this._closeButton),i.appendChild(this._closeButton))}_createButton(e,t,i){const s=document.createElement("span");s.innerHTML="×",s.className="adthrive-close";return s.addEventListener("click",(()=>this._handleCloseButtonClick(s,e,t,i))),s}_changeCloseButtonLocation(e,t){const i=this._footerCloseLocationExperiment.result;if(i&&i.includes("topLeft")&&(t.style.right="initial",t.style.left=Bi()?"10px":"5px","topLeftAboveAd"===i)){var s;const i=(null==(s=e.firstChild)?void 0:s.firstChild).getBoundingClientRect();t.style.left=(i.left-26).toString()+"px",t.style.top="5px"}}get enabled(){return this._config.adOptions.footerCloseButtonMigrated?"phone"===this._context.device?this._config.adOptions.footerCloseButtonMobile:this._config.adOptions.footerCloseButtonDesktop:this._config.adOptions.footerCloseButton}constructor(e,t,i,s,n,r){super(),this._config=e,this._context=t,this._slotManager=i,this._footerCloseLocationExperiment=s,this._gamEventBus=n,this._slotEventBus=r,this._locations=[Qe.Footer],this._closeButton=null,this._handleCloseButtonClick=(e,t,i,s)=>{const n=document.createEvent("Event");i===Qe.Footer&&Fs.setSessionStorage("adthrive_footer_closed","true"),n.initEvent(`adthrive${i}Close`,!0,!0),e.remove(),this._closeButton=null;const r=t.parentElement;r&&(window.dispatchEvent(n),r.removeChild(t),W.event("CloseButtonComponent","logCloseFooter","User clicked footer close button",{nref:s}),this._slotManager.destroy(t.id))}}}Vv=B([bn("CloseButtonComponent"),D(),j("design:type",Function),j("design:paramtypes",[void 0===_c?Object:_c,void 0===Fr?Object:Fr,void 0===Kg?Object:Kg,void 0===Uv?Object:Uv,void 0===Sc?Object:Sc,void 0===Bn?Object:Bn])],Vv);class zv extends Er{init(){this._key="EnhancedStickySidebarAds",this._lookup="ESSA",this._default=!1}}zv=B([bn("EnhancedStickySidebarAdsExperiment"),M()],zv);class Hv extends Er{init(){this._key="AdxStickyOutstream",this._lookup="ADXISO",this._default=!1}}Hv=B([bn("AdxStickyOutstream"),M()],Hv);const $v=1,qv=2,Gv=3,Wv=4;class Kv extends Fn{createPlayerCloseButton(e,t,i,s=!1,n){this._hasTitleBar=s,this._position=n?this._getPositionForMobile(t,n):this._getPositionForDesktop(t);const r=this._config.isStickyOutstreamTopCenterColorsDisabled&&"sticky outstream"===t;if(r){const e=document.createElement("style");e.textContent="#adthrive-sticky-outstream-close > svg > * { stroke: white; }",document.head.appendChild(e)}const a=this._getButtonClasses(),o=this._getSvgOptions(this._position!==Wv||"instream"!==t&&r?null:this._config.adOptions.secColor),l=this._createCloseButton(a,i,o);return l.onclick=e,l.onkeydown=e=>{"Space"===e.code&&e.preventDefault()},l.onkeyup=t=>{["Space","Enter"].includes(t.code)&&e()},this._position===$v?this.applyCloseButtonWrapper(l):l}_getPositionForMobile(e,t){return"top-center"===t?Wv:"sticky outstream"===e?this._adxStickyOutstreamExperiment?"bottom-right"===t?Gv:qv:$v:qv}_getPositionForDesktop(e){return"sticky outstream"===e?this._adxStickyOutstreamExperiment?Gv:$v:qv}_getButtonClasses(){var e;return["adthrive-video-close",...null!=(e={[Wv]:["adthrive-top-collapse-close"],[qv]:["adthrive-wrapper-float-close","adthrive-top-left-outer","adthrive-video-close-float-left"],[Gv]:["adthrive-wrapper-float-close","adthrive-top-right-outer","adthrive-video-close-float-right"],[$v]:["adthrive-close-in-container"]}[this._position])?e:[]]}_getSvgOptions(e){let t="white",i="black";return this._position!==$v&&this._position!==Wv||(t="transparent",i="white"),e&&(i=e),{fillColor:t,strokeColor:i}}_buildNewCloseButton(e,t){e.appendChild(this._createCloseButtonX(t)),e.appendChild(this._createCloseButtonCircleThatGoesAroundTheX(t))}_createCloseButton(e,t,i){const{fillColor:s,strokeColor:n}=i,r=this._createButtonHtml(e,t),a=this._createSvg(s);if(this._position===Wv)this._buildNewCloseButton(a,n);else{const e=this._createPath(n);a.appendChild(e)}return r.appendChild(a),r}_createButtonHtml(e,t){const i=document.createElement("div");return i.tabIndex=0,i.className=e.join(" "),i.id=t,i}_createSvg(e){const t=document.createElementNS("http://www.w3.org/2000/svg","svg");return t.setAttribute("width","18"),t.setAttribute("height","18"),t.setAttribute("text-anchor","middle"),t.setAttribute("dominant-baseline","central"),t.setAttribute("fill",e),t.setAttribute("text-anchor","middle"),t.setAttribute("dominant-baseline","central"),t}_createPath(e){const t=document.createElementNS("http://www.w3.org/2000/svg","path");return t.setAttribute("d","M 0.5 9 A 5 5 0 0 0 17.5 9 A 5 5 0 0 0 0.5 9 M 9 9 L 7 7 L 11 11 M 9 9 L 7 11 L 11 7"),t.setAttribute("stroke",e),t.setAttribute("stroke-width","1"),t}_createCloseButtonCircleThatGoesAroundTheX(e){const t=document.createElementNS("http://www.w3.org/2000/svg","circle");return t.setAttribute("cx","9"),t.setAttribute("cy","9"),t.setAttribute("r","8"),t.setAttribute("stroke",e),t.setAttribute("stroke-width","2"),t.setAttribute("fill","none"),t}_createCloseButtonX(e){const t=document.createElementNS("http://www.w3.org/2000/svg","text");return t.setAttribute("x","9"),t.setAttribute("y","9"),t.setAttribute("text-anchor","middle"),t.setAttribute("stroke",e),t.setAttribute("fill",e),t.setAttribute("stroke-width","1px"),t.setAttribute("font-size","13px"),t.setAttribute("alignment-baseline","middle"),t.textContent="x",t}applyCloseButtonWrapper(e){const t=document.createElement("div"),i=["adthrive-wrapper-float-close","adthrive-wrapper-close-bkgd-50"];return this._hasTitleBar?i.push("adthrive-top-left-inner-wrapper"):i.push("adthrive-top-left-inner"),t.classList.add(...i),t.appendChild(e),t}constructor(e){super(),this._config=e,this._hasTitleBar=!1,this._position=qv,this._adxStickyOutstreamExperiment=R.resolve(Hv).result}}Kv=B([bn("VideoCloseButtonComponent"),D(),j("design:type",Function),j("design:paramtypes",[void 0===_c?Object:_c])],Kv);class Yv{_setupEventListeners(e,t){this._onScrollEvent=()=>{this._element&&!e.closed?this._check(t):this._removeEventListeners()},this._onThrottledScrollEvent=pc((()=>this._update()),500),this._onThrottledResizeEvent=pc((()=>{this._element&&!e.closed?(this._unstick(),this._update(),this._check(t)):this._removeEventListeners()}),500),window.addEventListener("scroll",this._onThrottledScrollEvent),window.addEventListener("resize",this._onThrottledResizeEvent),window.addEventListener("scroll",this._onScrollEvent)}_removeEventListeners(){window.removeEventListener("scroll",this._onScrollEvent),window.removeEventListener("scroll",this._onThrottledScrollEvent),window.removeEventListener("resize",this._onThrottledResizeEvent),this._onThrottledScrollEvent&&this._onThrottledScrollEvent.cancel&&this._onThrottledScrollEvent.cancel(),this._onThrottledResizeEvent&&this._onThrottledResizeEvent.cancel&&this._onThrottledResizeEvent.cancel(),this._element=null,this._overlap=null,this._closed=!0}_update(){this._element&&(this._stuck||(this._start=this._getTop(this._element)),this._overlap&&(this._cutoff=this._getTop(this._overlap)))}_updateStickyOutstreamPosition(e){if(window.pageYOffset+window.innerHeight-this._stickyOutstreamStyleBottom>=e){const t=window.innerHeight+window.pageYOffset-e+"px";this._element.style.bottom=t,this._element.parentElement.style.bottom=t}else{const e=yi();this._element.parentElement.style.bottom=`${e}px`}}_check(e){if(!this._closed){if(0!==this._start){const t=window.pageYOffset,i=this._element.offsetHeight+this._cutoffBuffer,s=0!==this._cutoff&&t+i>this._cutoff;this._start0&&(!t||i.offsetTop{},this._onThrottledScrollEvent=()=>{},this._onThrottledResizeEvent=()=>{},this._closed=!1;const s=e.location===Qe.Video_StickyOutstream;this._element=e.element;const n=s?i.video.footerSelector:"";if(t){if(e.stickyOverlapSelector)this._overlap=document.querySelector(e.stickyOverlapSelector);else if(n.length){const e=document.querySelector(n);e&&!Us(e)&&(this._overlap=e)}else this._overlap=this._findOverlap(this._element);this._overlap,s&&this._stick(s)}this._setupEventListeners(e,s)}}class Xv{applyTransitionToElement(e){this._mobileRaptivePlayerEnabled||this._desktopRaptivePlayerEnabled||(e.style.transition="all 0.2s ease-in-out")}pushElementBelowHeader(e,t){null!==t&&e.style.setProperty("top",`${t}px`)}anchorVideoPlayerBelowNavbar(e,t){const{playerContainer:i,topBackgroundElement:s}=e,n=()=>{const e=this.getHeaderHeight(t);if(null!==e){this.applyTransitionToElement(s),this.applyTransitionToElement(i),this.pushElementBelowHeader(s,e),this.pushElementBelowHeader(i,e);const t=i.querySelector(".adthrive-top-collapse-wrapper-bar");t&&this.pushElementBelowHeader(t,e)}},r=()=>{s.style.top="0",i.style.top="0"};this._isHeaderVisible?n():r(),this._pushVideoPlayerDown=n,this._pushVideoPlayerUp=r}getHeaderHeight(e){const t=this.getSiteHeader(e);if(!t)return null;return this.getElementHeight(t)}getElementHeight(e){return e.getBoundingClientRect().height}getSiteHeader(e){if(this._header)return this._header;const t=document.querySelector(e);return t?(this._header=t,this._header):null}constructor(e,t){this._raptiveMobilePlayerExperiment=e,this._raptiveDesktopPlayerExperiment=t,this._pushVideoPlayerDown=()=>{},this._pushVideoPlayerUp=()=>{},this._header=null,this._isHeaderVisible=!0,this._desktopRaptivePlayerEnabled=!1,this._mobileRaptivePlayerEnabled=!1,this._isMobile=Ki(),this._open=!1,this.handleUncollapse=(e,t)=>{const{playerContainer:i,topBackgroundElement:s}=e;if(i.style.removeProperty("top"),s.style.removeProperty("top"),t){this.collapsiblePersistentHeaderObserver.disconnect();const e=this.getSiteHeader(t);e&&(e.onclick=null)}},this.handleCollapse=e=>{if(e.mobileHeaderSelector){this.anchorVideoPlayerBelowNavbar(e,e.mobileHeaderSelector);const t=this.getSiteHeader(e.mobileHeaderSelector);t&&(this.collapsiblePersistentHeaderObserver.observe(t),t.onclick=()=>{this._open=!this._open,this._open?(e.programmaticPause(),e.playerContainer.style.display="none"):(e.programmaticPlay(),e.playerContainer.style.display="block")})}},this.collapsiblePersistentHeaderObserver=new IntersectionObserver((e=>{for(const t of e)this._isHeaderVisible=t.isIntersecting,this._isHeaderVisible?this._pushVideoPlayerDown():this._pushVideoPlayerUp()}),{threshold:.95});const i=R.resolve(ld).result;this._desktopRaptivePlayerEnabled=i||!this._isMobile&&this._raptiveDesktopPlayerExperiment.result,this._mobileRaptivePlayerEnabled=i||this._isMobile&&this._raptiveMobilePlayerExperiment.result}}Xv=B([M(),bn("TopCenterVideoPlayerForPersistentHeaderUtils"),j("design:type",Function),j("design:paramtypes",[void 0===ad?Object:ad,void 0===nd?Object:nd])],Xv);let Qv,Jv=sc.getScrollTop();class Zv{static changeState(e,t){const i=this._handleOtherVideoPlaying(t,e);if(!(e.playerState&&(e.playerState===lt||i||e.playerState===ot)&&t===mt)){const i=this._shouldCollapse(e);switch(e.playerState){case nt:this._handleUnstarted(t,e);break;case rt:this._handleUncollapsedPlay(t,i,e);break;case at:this._handleCollapsedPlay(t,i,e);break;case ot:this._handleUserPauseUncollapsed(t,i,e);break;case lt:this._handleUserPauseCollapsed(t,i,e);break;case dt:this._handlePausedNotVisible(t,e);break;case ct:this._handleOverlapped(t,i,e);break;default:return e.playerState}}return e.playerState}static _handleUnstarted(e,t){this.offsetheight||(this.offsetheight=t.playerContainer.offsetHeight),e===ft&&(t.programmaticPlay({logEvent:!1}),t.collapseTimer.firstInView||(t.collapseTimer.firstInView=new Date),Zv.startEvent.emit(),t.playerState=rt)}static _setPlayerClosed(e){e.playerState=ht,this._isTopCollapse(e)&&R.resolve(rr).topCenterVideoClosed.emit()}static _handleOtherVideoPlaying(e,t){const{programmaticPause:i}=t;return e===bt&&(this.uncollapse(t),i({pausedByOtherPlayer:!0}),this._setPlayerClosed(t),!0)}static _handleUncollapsedPlay(e,t,i){const{programmaticPause:s,programmaticPlay:n}=i;e===ft?t&&(this.collapse(i),i.playerState=at):e===_t?t?(n(),this.collapse(i),i.playerState=at):i.playerState!==ot&&(s(),i.playerState=dt):e===mt&&(i.playerState=ot)}static _handleCollapsedPlay(e,t,i){const{programmaticPause:s,playerContainer:n}=i;e===ft?t||(this.uncollapse(i),i.playerState=rt):e===_t?t||(this.uncollapse(i),s(),i.playerState=dt):e===mt?i.playerState=lt:e===yt?(i.lastCollapsedClasses=n.className,this.uncollapse(i),s(),i.playerState=ct):e===vt&&(this.uncollapse(i),s(),this._setPlayerClosed(i))}static _handleUserPauseCollapsed(e,t,i){const{programmaticPause:s}=i;e!==ft||t?e===mt?i.playerState=at:e===vt&&(this.uncollapse(i),s(),this._setPlayerClosed(i)):(this.uncollapse(i),i.playerState=ot)}static _handleUserPauseUncollapsed(e,t,i){const{programmaticPlay:s}=i;e===ft&&t?t?(this.collapse(i),i.playerState=lt):s():e===mt&&(i.playerState=rt)}static _handlePausedNotVisible(e,t){const{programmaticPlay:i}=t;e===ft&&(i(),t.playerState=rt)}static _handleOverlapped(e,t,i){const{programmaticPlay:s}=i;t&&!this.playerWouldOverlapFooter(i)&&(this.collapse(i),s(),i.playerState=at)}static handleResize(e){this._isCollapsed(e.playerState)&&(e.collapseType===tt.Mobile&&"adthrive-collapse-top-center"===e.collapseMobileSubType&&e.topBackgroundElement&&(e.topBackgroundElement.style.height=`${e.playerContainer.offsetHeight}px`,e.topBackgroundElement.style.width=`${window.innerWidth}px`),e.forceMobile||e.collapseType!==tt.Sticky||this._stickToSidebar(e))}static handleScroll(e){const{playerState:t,playerContainer:i,playbackStarted:s}=e,n=sc.getScrollTop(),r=n>Jv;Jv=n;const a=this._shouldCollapseOnScrollUp(e),o=!(sc.playerViewable(i)||a&&s),l=this._isWarmupComplete(e);let d;d=o?_t:this.playerWouldOverlapFooter(e)?yt:ft;const c=Pi(i)&&t===dt&&!l;this._isTopOfPage()?this.stopCollapseWarmupTimer(e):r&&c?(this.startCollapseWarmupTimer(e),d=_t,clearTimeout(Qv),Qv=setTimeout((()=>{this._isWarmupComplete(e)&&(this.stopCollapseWarmupTimer(e),e.playerState=rt,this.changeState(e,d))}),1e3)):l&&this.stopCollapseWarmupTimer(e),this.changeState(e,d),e.playerState===at||e.playerState===lt?Zv.startCollapseTimer(e):Zv.stopCollapseTimer(e)}static handleOtherVideoPlaying(e){this.changeState(e,bt)}static handlePageVisibilityChange(e,t){if(t.playerState!==ht&&t.playerState!==nt&&t.playerState!==ot&&t.playerState!==lt&&t.playerState!==dt&&t.playerState!==ct){const{programmaticPause:i,programmaticPlay:s}=t;e?i():s()}}static handleWidthBreak(e,t){t.playerState!==ht&&t.playerState!==nt&&(e.matches?(this._isCollapsed(t.playerState)&&(this.toggleCollapsedPlayerClasses(!1,t),t.collapseType===tt.Sticky&&this._unstickFromSidebar(t.playerContainer),t.forceMobile=!0,this.toggleCollapsedPlayerClasses(!0,t)),t.forceMobile=!0):(this.toggleCollapsedPlayerClasses(!1,t),t.forceMobile=!1,this._isCollapsed(t.playerState)&&(this.toggleCollapsedPlayerClasses(!0,t),t.collapseType===tt.Sticky&&this._stickToSidebar(t))))}static handleClose(e,t=0){Zv.closeEvent.emit(),this.changeState(e,vt),Zv.stopCollapseTimer(e),W.event("RaptivePlayer","handleClose",{timeElapsed:e.collapseTimer.timeCollapsed,device:Bi()?"desktop":"mobile",playerType:e.playerType,vp:t})}static handleUserClick(e){this.changeState(e,mt)}static collapse(e){const{playerContainer:t,topBackgroundElement:i,programmaticPause:s,programmaticPlay:n}=e;if(this.disableCollapse)return;e.playerCollapsed=!0,e.hidePlayer(),this.toggleCollapsedPlayerClasses(!0,e),e.showPlayer(),this.repositionCollapseMobile(e,!0),e.hasPreviouslyCollapsed=!0,this.collapseEvent.emit(),e.forceMobile||e.collapseType!==tt.Sticky||this._stickToSidebar(e),i&&R.resolve(Xv).handleCollapse({topBackgroundElement:i,mobileHeaderSelector:e.mobileHeaderSelector,playerContainer:t,programmaticPause:s,programmaticPlay:n}),setTimeout((e=>{this.displayCloseButton(e)}),0,e);const r=R.resolve(rr);r.topCenterVideoCollapsed.emit(e),r.videoCollapsed.emit(e)}static displayCloseButton(e){this._isCollapsed(e.playerState)&&(e.closeButton.style.display="inline-flex")}static uncollapse(e){const{playerContainer:t,topBackgroundElement:i,mobileHeaderSelector:s}=e,n=R.resolve(rr);e.hidePlayer(),this.toggleCollapsedPlayerClasses(!1,e),e.showPlayer(),this.repositionCollapseMobile(e,!1),this._unstickFromSidebar(t),e.playerCollapsed=!1,Zv.uncollapseEvent.emit(),e.closeButton.style.display="none",i&&(R.resolve(Xv).handleUncollapse({playerContainer:t,topBackgroundElement:i},s),n.topCenterVideoUnCollapsed.emit()),n.videoUnCollapsed.emit()}static _shouldCollapse(e){const{playbackStarted:t,playerPosition:i}=e;if(!t)return!1;const s=this._shouldCollapseOnScrollUp(e);if(sc.isMobileLandscape())return!1;const n=this._isTopCollapse(e);if(n){const t=!!e.collapseTimer.warmupStartTime,i=this._isWarmupComplete(e);if(this._isTopOfPage()||t&&!i)return!1}const r=sc.getScrollTop(),a=sc.getScrollBottom(),o=xi(i),l=this.offsetheight,d=o.top,c=d+l;return n?r>=d||s&&a<=c:r>=d+l/2||s&&a<=c-l/2}static _shouldCollapseOnScrollUp(e){const{hasPreviouslyCollapsed:t}=e;return t}static _isCollapsed(e){return e===at||e===lt}static _isWarmupComplete(e){const{collapseTimer:t}=e;return!!t.warmupStartTime&&Date.now()-t.warmupStartTime.getTime()>1e3}static _isTopOfPage(){return window.scrollY<1}static _isTopCollapse(e){return e.collapseMobileSubType&&"adthrive-collapse-top-center"===e.collapseMobileSubType}static _stickToSidebar(e){e.stickyElement&&(e.playerContainer.style.left=`${e.stickyElement.getBoundingClientRect().left}px`,e.playerContainer.style.width=`${e.stickyElement.clientWidth}px`),e.playerContainer.style.top=`${e.topMargin}px`}static _unstickFromSidebar(e){e.style.bottom="",e.style.removeProperty("transform")}static playerWouldOverlapFooter(e){if(!e.footerElement||Us(e.footerElement))return!1;if(e.playerContainer.className.includes("adthrive-collapse-bottom")||e.lastCollapsedClasses&&e.lastCollapsedClasses.includes("adthrive-collapse-bottom")){const t=yi();return!(window.innerHeight-t{i?e.playerContainer.classList.add(t):e.playerContainer.classList.remove(t)}))}static toggleCollapsedPlayerClasses(e,t){this.toggleClass(t,"raptive-player-collapse",e),t.forceMobile?(this.toggleClass(t,tt.Mobile,e),this.toggleClass(t,t.collapseMobileSizeType,e),this.toggleClass(t,t.collapseMobileSubType,e),this.classesToggled.emit()):(this.toggleClass(t,t.collapseType,e),t.collapseSubType&&this.toggleClass(t,t.collapseSubType,e),t.collapseMobileSizeType&&this.toggleClass(t,t.collapseMobileSizeType,e),t.collapseType===tt.Mobile&&t.collapseMobileSubType&&this.toggleClass(t,t.collapseMobileSubType,e),this.classesToggled.emit())}static repositionCollapseMobile(e,t){"adthrive-collapse-bottom-left"===e.collapseMobileSubType||"adthrive-collapse-bottom-right"===e.collapseMobileSubType?this.repositionCollapseMobileBottom(e):"adthrive-collapse-top-center"===e.collapseMobileSubType&&this.repositionCollapseMobileTop(e,t)}static repositionCollapseMobileTop(e,t){e.topBackgroundElement&&(t?e.topBackgroundElement.style.height=`${e.playerContainer.offsetHeight}px`:(e.topBackgroundElement.style.height="0",e.topBackgroundElement.classList.remove("extra-height")))}static repositionCollapseMobileBottom(e){if(e.playerContainer.className.includes("adthrive-collapse-bottom")||e.collapseMobileSubType&&e.collapseMobileSubType.indexOf("bottom")>-1){const t=yi();e.playerContainer.style.setProperty("top","auto","important"),e.playerContainer.style.setProperty("bottom",`${t}px`,"important")}}static startCollapseTimer(e){e.collapseTimer.isRunning||(e.collapseTimer.startTime?e.collapseTimer.lastCollapsedTime=new Date:(e.collapseTimer.startTime=new Date,e.collapseTimer.lastCollapsedTime=e.collapseTimer.startTime),e.collapseTimer.isRunning=!0)}static stopCollapseTimer(e){e.collapseTimer.isRunning&&(e.collapseTimer.lastCollapsedTime&&(e.collapseTimer.timeCollapsed+=sn()-e.collapseTimer.lastCollapsedTime.getTime()),e.collapseTimer.isRunning=!1)}static startCollapseWarmupTimer(e){e.collapseTimer.warmupStartTime||(e.collapseTimer.warmupStartTime=new Date)}static stopCollapseWarmupTimer(e){e.collapseTimer.warmupStartTime&&(e.collapseTimer.warmupStartTime=void 0)}}Zv.collapseEvent=new V,Zv.uncollapseEvent=new V,Zv.classesToggled=new V,Zv.closeEvent=new V,Zv.startEvent=new V,Zv.disableCollapse=!1,Zv.offsetheight=0,Zv=B([bn("CollapseUtils")],Zv);class ey{applyTransitionToElement(e){e.style.transition="all 0.2s ease-in-out"}pushElementBelowHeader(e,t){const i=this.getHeaderHeight(t);null!==i&&(e.style.top=`${i}px`)}anchorVideoPlayerBelowNavbar(e,t){const{playerElement:i,topBackgroundElement:s}=e,n=i.querySelector(".adthrive-top-collapse-wrapper-bar"),r=()=>{null!==this.getHeaderHeight(t)&&(this.applyTransitionToElement(s),this.applyTransitionToElement(i),this.pushElementBelowHeader(s,t),this.pushElementBelowHeader(i,t),n&&this.pushElementBelowHeader(n,t))},a=()=>{s.style.top="0",i.style.top="0",n&&(n.style.top="0")};this._isHeaderVisible?r():a(),this._headerVisibleEvents.push(r),this._headerHiddenEvents.push(a)}getHeaderHeight(e){const t=this.siteHeader(e);if(!t)return null;return this.getElementHeight(t)}getElementHeight(e){return e.getBoundingClientRect().height}siteHeader(e){if(this._header)return this._header;const t=document.querySelector(e);return t?(this._header=t,this.collapsiblePersistentHeaderObserver.observe(this._header),this._header):null}constructor(){this._headerVisibleEvents=[],this._headerHiddenEvents=[],this._header=null,this._isHeaderVisible=!0,this._open=!1,this.handleUncollapse=()=>{},this.handleCollapse=e=>{if(e.mobileHeaderSelector){this.anchorVideoPlayerBelowNavbar(e,e.mobileHeaderSelector);const t=this.siteHeader(e.mobileHeaderSelector);t&&(t.onclick=()=>{this._open=!this._open,this._open?(e.programmaticPause(),e.playerContainer&&(e.playerContainer.style.display="none")):(e.programmaticPlay(),e.playerContainer&&(e.playerContainer.style.display="block"))})}},this.collapsiblePersistentHeaderObserver=new IntersectionObserver((e=>{for(const t of e)this._isHeaderVisible=t.isIntersecting,this._isHeaderVisible?this._headerVisibleEvents.forEach((e=>e())):this._headerHiddenEvents.forEach((e=>e()))}),{threshold:.95})}}ey=B([M(),bn("TopCenterVideoPlayerForPersistentHeaderLegacyUtils"),j("design:type",Function),j("design:paramtypes",[])],ey);let ty,iy=sc.getScrollTop();class sy{static changeState(e,t){const i=this._shouldCollapse(e);if(!this._handleOtherVideoPlaying(t,e))switch(e.playerState){case nt:this._handleUnstarted(t,i,e);break;case rt:this._handleUncollapsedPlay(t,i,e);break;case at:this._handleCollapsedPlay(t,i,e);break;case ut:this._handleNonLinearAdPlay(t,i,e);break;case lt:this._handleUserPauseCollapsed(t,i,e);break;case ot:this._handleUserPauseUncollapsed(t,i,e);break;case dt:this._handlePausedNotVisible(t,e);break;case pt:this._handleNonLinearAdPaused(t,e);break;case ct:this._handleOverlapped(t,i,e);break;case gt:this._handleNonLinearAdOverlapped(t,i,e);break;default:return e.playerState}return e.playerState}static _handleUnstarted(e,t,i){this.offsetheight||(this.offsetheight=i.playerContainer.offsetHeight);const s=i.playerInstance;e===ft&&(i.collapseTimer.firstInView||(i.collapseTimer.firstInView=new Date),sy.startEvent.emit(),t?(this.collapse(i),s.getViewable()&&s.play(!0),i.playerState=s._nonLinearAd?ut:at):i.playerState=s._nonLinearAd?ut:rt)}static _setPlayerClosed(e){e.playerState=ht,this._isTopCollapse(e)&&R.resolve(rr).topCenterVideoClosed.emit()}static _handleOtherVideoPlaying(e,t){return e===bt&&(this.uncollapse(t),t.playerInstance.pause(!0),this._setPlayerClosed(t),!0)}static _setCollapsedPlay(e,t){sy.collapse(e),e.playerState=at,this._isPlayingOrAboutToPlay(t,e)||t.play(!0)}static _isPlayingOrAboutToPlay(e,t){const i=null==e?void 0:e.getState(),s="playing"===i||"buffering"===i,n=!(!(null==t?void 0:t.getIsRunningAdPlay)||!t.getIsRunningAdPlay());return s||n}static _handleUncollapsedPlay(e,t,i){const{playerInstance:s}=i;e===ft?t?this._setCollapsedPlay(i,s):this._isPlayingOrAboutToPlay(s,i)||s.play(!0):e===_t?t?this._setCollapsedPlay(i,s):(s.pause(!0),i.playerState=dt):e===mt&&(i.playerState=ot)}static _handleVideoHeight(e){const{playerElement:t,topBackgroundElement:i}=e;i&&t.offsetHeight>=i.offsetHeight&&(i.style.height="101px")}static _handleCollapsedPlay(e,t,i){const{playerInstance:s,playerElement:n}=i;e===ft?(t||(this.uncollapse(i),i.playerState=rt),!this._isPlayingOrAboutToPlay(s,i)&&s.play(!0)):e===_t?t||(this.uncollapse(i),s.pause(!0),i.playerState=dt):e===mt?i.playerState=lt:e===yt?(i.lastCollapsedClasses=n.className,this.uncollapse(i),s.pause(!0),i.playerState=ct):e===vt&&(this.uncollapse(i),s.pause(!0),this._setPlayerClosed(i))}static _handleNonLinearAdPlay(e,t,i){const{playerInstance:s}=i;e===ft?t&&this.collapse(i):e===_t?(s.pauseAd(!0),i.playerState=pt):e===yt&&(this.uncollapse(i),s.pauseAd(!0),i.playerState=gt)}static _handleUserPauseCollapsed(e,t,i){const{playerInstance:s}=i;e!==ft||t?e===mt?i.playerState=at:e===vt&&(this.uncollapse(i),s.pause(!0),this._setPlayerClosed(i)):(this.uncollapse(i),i.playerState=ot)}static _handleUserPauseUncollapsed(e,t,i){e===ft&&t?(this.collapse(i),i.playerState=lt):e===mt&&(i.playerState=rt)}static _handlePausedNotVisible(e,t){const{playerInstance:i}=t;e===ft&&(i.play(!0),t.playerState=rt)}static _handleNonLinearAdPaused(e,t){const{playerInstance:i}=t;e===ft?(i.pauseAd(!1),t.playerState=ut):this.playerWouldOverlapFooter(t)&&(t.playerState=gt)}static _handleOverlapped(e,t,i){const{playerInstance:s}=i;t&&!this.playerWouldOverlapFooter(i)?(this.collapse(i),s.play(!0),i.playerState=at):i.playerState=ct}static _handleNonLinearAdOverlapped(e,t,i){const{playerInstance:s}=i;t&&!this.playerWouldOverlapFooter(i)?(this.collapse(i),s.pauseAd(!1),i.playerState=ut):(s.pauseAd(!0),i.playerState=gt)}static handleResize(e){this.isCollapsed(e.playerState)?(e.collapseType===tt.Mobile&&"adthrive-collapse-top-center"===e.collapseMobileSubType&&e.topBackgroundElement&&(e.topBackgroundElement.style.height=`${e.playerElement.offsetHeight}px`,e.topBackgroundElement.style.width=`${window.innerWidth}px`),e.forceMobile||e.collapseType!==tt.Sticky||this._stickToSidebar(e)):this.resizeContainer(e)}static handleScroll(e){const{playerState:t,playerElement:i,playerContainer:s,mediaStarted:n,mobileCollapseOnScrollUp:r}=e;if("adthrive-collapse-top-center"===e.collapseMobileSubType&&"none"===e.playerContainer.style.display)return;const a=sc.getScrollTop(),o=a>iy;iy=a;const l=this.playerWouldOverlapFooter(e),d=this._shouldCollapseOnScrollUp(e),c=!(sc.playerViewable(i)||d&&n),h=this._isWarmupComplete(e);let u=c?_t:l?yt:ft;if("off"!==r){const i=Pi(s)&&t===dt&&!h;this._isTopOfPage()?(u=_t,this.stopCollapseWarmupTimer(e)):o&&i?(this.startCollapseWarmupTimer(e),u=_t,"1"===r&&(clearTimeout(ty),ty=setTimeout((()=>{this._isWarmupComplete(e)&&(this.stopCollapseWarmupTimer(e),e.playerState=rt,this.changeState(e,u))}),1e3))):h&&this.stopCollapseWarmupTimer(e)}this.changeState(e,u),e.playerState===at||e.playerState===lt?sy.startCollapseTimer(e):sy.stopCollapseTimer(e)}static handleOtherVideoPlaying(e){this.changeState(e,bt)}static handlePageVisibilityChange(e,t){t.playerState!==ht&&t.playerState!==nt&&t.playerState!==ot&&t.playerState!==lt&&t.playerState!==dt&&t.playerState!==ct&&(e?t.playerInstance.pause(!0):t.playerInstance.play(!0))}static handleWidthBreak(e,t){t.playerState!==ht&&t.playerState!==nt&&(e.matches?(this.isCollapsed(t.playerState)&&(this.toggleCollapsedPlayerClasses(!1,t),t.collapseType===tt.Sticky&&this._unstickFromSidebar(t.playerElement),t.forceMobile=!0,this.toggleCollapsedPlayerClasses(!0,t)),t.forceMobile=!0):(this.toggleCollapsedPlayerClasses(!1,t),t.forceMobile=!1,this.isCollapsed(t.playerState)&&(this.toggleCollapsedPlayerClasses(!0,t),t.collapseType===tt.Sticky&&this._stickToSidebar(t))))}static handleClose(e,t=0){sy.closeEvent.emit(),this.changeState(e,vt),sy.stopCollapseTimer(e),W.event("JwPlayer","handleClose",{timeElapsed:e.collapseTimer.timeCollapsed,device:Bi()?"desktop":"mobile",playerType:e.playerType,vp:t})}static handleUserClick(e){this.changeState(e,mt)}static collapse(e){const{playerElement:t,topBackgroundElement:i,playerContainer:s}=e;this.disableCollapse||(this.collapseEvent.emit(),this.toggleCollapsedPlayerClasses(!0,e),e.hasPreviouslyCollapsed=!0,e.forceMobile||e.collapseType!==tt.Sticky||this._stickToSidebar(e),i&&(this._handleVideoHeight(e),R.resolve(ey).handleCollapse({playerElement:t,playerContainer:s,topBackgroundElement:i,programmaticPause:()=>{e.playerInstance.pause(!0)},programmaticPlay:()=>{e.playerInstance.play(!0)},mobileHeaderSelector:e.mobileHeaderSelector})),e.playerInstance.resize(),setTimeout((e=>{this.displayCloseButton(e)}),0,e),R.resolve(rr).topCenterVideoCollapsed.emit(e))}static displayCloseButton(e){this.isCollapsed(e.playerState)&&(e.closeButton.style.display="inline-flex")}static hideCloseButton(e){e.closeButton.style.display="none",e.closeButton.setAttribute("style","display: none!important")}static uncollapse(e){sy.uncollapseEvent.emit(),this.toggleCollapsedPlayerClasses(!1,e),this._unstickFromSidebar(e.playerElement),this.hideCloseButton(e),this.resizeContainer(e),R.resolve(ey).handleUncollapse(),R.resolve(rr).topCenterVideoUnCollapsed.emit()}static _shouldCollapse(e){const{mediaStarted:t,playerContainer:i,mobileCollapseOnScrollUp:s}=e,n=this._shouldCollapseOnScrollUp(e);if(sc.isMobileLandscape())return!1;const r=this._isTopCollapse(e);if("off"!==s&&r){const t=!!e.collapseTimer.warmupStartTime,i=this._isWarmupComplete(e);if(this._isTopOfPage()||t&&!i)return!1}const a=sc.getScrollTop(),o=sc.getScrollBottom(),l=this.offsetheight,d=xi(i).top,c=d+l;return r?t&&(a>=d||n&&o<=c):t&&(a>=d+l/2||n&&o<=c-l/2)}static _shouldCollapseOnScrollUp(e){const{desktopCollapseOnScrollUp:t,hasPreviouslyCollapsed:i,mobileCollapseOnScrollUp:s}=e;return i&&(t||"off"!==s)}static isCollapsed(e){return e===at||e===lt}static _isWarmupComplete(e){const{collapseTimer:t,mobileCollapseOnScrollUp:i,playerContainer:s}=e;return!!t.warmupStartTime&&("1"===i?Date.now()-t.warmupStartTime.getTime()>1e3:"2"===i?((e,t=50)=>{const i=e.getBoundingClientRect();return(0-i.top)/i.height*100>=t})(s):void 0)}static _isTopOfPage(){return window.scrollY<1}static _isTopCollapse(e){return e.collapseMobileSubType&&"adthrive-collapse-top-center"===e.collapseMobileSubType}static _stickToSidebar(e){e.stickyElement&&(e.playerElement.style.left=`${e.stickyElement.getBoundingClientRect().left}px`,e.playerElement.style.width=`${e.stickyElement.clientWidth}px`),e.playerElement.style.top=`${e.topMargin}px`}static _unstickFromSidebar(e){e.style.cssText=""}static playerWouldOverlapFooter(e){if(!e.footerElement)return!1;if(e.playerElement.className.includes("adthrive-collapse-bottom")||e.lastCollapsedClasses&&e.lastCollapsedClasses.includes("adthrive-collapse-bottom")){const t=yi();return!(window.innerHeight-t{};s(t.playerElement,"adthrive-jw-player-collapse",e),t.forceMobile?(s(t.playerElement,tt.Mobile,e),s(t.playerElement,t.collapseMobileSizeType,e),s(t.playerElement,t.collapseMobileSubType,e),this.repositionCollapseMobile(t,e)):(s(t.playerElement,t.collapseType,e),t.collapseSubType&&s(t.playerElement,t.collapseSubType,e),t.collapseMobileSizeType&&s(t.playerElement,t.collapseMobileSizeType,e),t.collapseType===tt.Mobile&&(s(t.playerElement,t.collapseMobileSubType,e),this.repositionCollapseMobile(t,e)))}static repositionCollapseMobile(e,t){"adthrive-collapse-bottom-left"===e.collapseMobileSubType||"adthrive-collapse-bottom-right"===e.collapseMobileSubType?this.repositionCollapseMobileBottom(e):"adthrive-collapse-top-center"===e.collapseMobileSubType&&this.repositionCollapseMobileTop(e,t)}static repositionCollapseMobileTop(e,t){e.topBackgroundElement&&(e.topBackgroundElement.style.height=t?`${e.playerElement.offsetHeight}px`:"0")}static repositionCollapseMobileBottom(e){if(e.playerElement.className.includes("adthrive-collapse-bottom")||e.collapseMobileSubType&&e.collapseMobileSubType.indexOf("bottom")>-1){const t=yi();e.playerElement.style.setProperty("top","auto","important"),e.playerElement.style.setProperty("bottom",`${t}px`,"important")}}static resizeContainer(e){e.playerContainer.style.height=`${e.playerElement.offsetHeight+30}px`}static startCollapseTimer(e){e.collapseTimer.isRunning||(e.collapseTimer.startTime?e.collapseTimer.lastCollapsedTime=new Date:(e.collapseTimer.startTime=new Date,e.collapseTimer.lastCollapsedTime=e.collapseTimer.startTime),e.collapseTimer.isRunning=!0)}static stopCollapseTimer(e){e.collapseTimer.isRunning&&(e.collapseTimer.lastCollapsedTime&&(e.collapseTimer.timeCollapsed+=sn()-e.collapseTimer.lastCollapsedTime.getTime()),e.collapseTimer.isRunning=!1)}static startCollapseWarmupTimer(e){e.collapseTimer.warmupStartTime||(e.collapseTimer.warmupStartTime=new Date)}static stopCollapseWarmupTimer(e){e.collapseTimer.warmupStartTime&&(e.collapseTimer.warmupStartTime=void 0)}}sy.collapseEvent=new V,sy.uncollapseEvent=new V,sy.closeEvent=new V,sy.startEvent=new V,sy.disableCollapse=!1,sy.offsetheight=0,sy=B([bn("LegacyCollapseUtils")],sy);const ny="so-fo",ry="so-o",ay="so-cbv",oy="so-cc",ly="so-csfi",dy="so-cso",cy="so-csbv";class hy{setup(){this._isRendered||(this._isRendered=!0,this._appendCloseButton(),this._activate()),this._slot.setSlotTargetingFlag("fref",[`${this._slot.noAdRefreshCount}`],!0),sy.collapseEvent.on((()=>{this._closeOnRelatedCollapse()})),Zv.collapseEvent.on((()=>{this._closeOnRelatedCollapse()})),this._listenForFooterRibbon()}get renderState(){return this._isRendered}_listenForFooterRibbon(){this._footerEventBus.footerVideoRibbonStateChanged.on((e=>{this._isFooterRibbonOnPage=e,this._hideIfVideoRibbonPresent()}))}_hideIfVideoRibbonPresent(){const e=this._slot.element.parentElement;e&&(this._isFooterRibbonOnPage?(e.classList.add("adthrive-hidden"),e.classList.remove("adthrive-display-unset")):(e.classList.add("adthrive-display-unset"),e.classList.remove("adthrive-hidden")))}_activate(){this._handleWidthBreak();const e=this._slot.element.parentElement;e&&(e.classList.add(`${this._elementClassNamePrefix}-idle`),this._isMobile&&this._setElementStyle(e),this._gamEventBus.slotRequested.on(this._handleSlotRequested.bind(this)),this._gamEventBus.slotRenderEnded.on(this._handleSlotRenderEnded.bind(this)),this._gamEventBus.slotOnload.on(this._handleSlotOnload.bind(this)))}_setElementStyle(e){if("top-center"===this._mobileLocation)this._setTopCenterStyle(e);else{const t=this._mobileLocation?this._mobileLocation.split("-")[1]:"right";e.classList.add(`${this._elementClassNamePrefix}-mobile-${t}`)}}_setScrollListener(e,t,i){this._scrollEventHandler=pc((()=>{const s=t.getBoundingClientRect().bottom,n=i&&i.getBoundingClientRect().bottom,r=s>n?s:n;e.style.setProperty("top",`${r}px`)}),20),window.addEventListener("scroll",this._scrollEventHandler)}_setTopCenterStyle(e){const t=this._mobileHeaderSelector?un(this._mobileHeaderSelector):null,i=t&&t.valid&&t.elements&&t.elements[0]||null;let s=0;if(i){const t=document.querySelector(".slick-film-strip");s=t?t.getBoundingClientRect().bottom:i.getBoundingClientRect().bottom,this._setScrollListener(e,i,t)}e.classList.add(`${this._elementClassNamePrefix}-top-center`);const n=this._config.isStickyOutstreamTopCenterColorsDisabled?"#000000":this._config.adOptions.bgColor;e.style.setProperty("background-color",n),e.style.setProperty("top",`${s}px`)}_handleSlotOnload({slotId:e}){const t=this._slotManager.getSlot(e);if("Video_StickyOutstream"===(null==t?void 0:t.location)){performance.mark(ry);performance.getEntriesByName(ny).length||performance.mark(ny)}}_handleSlotRenderEnded({event:e,slotId:t}){const i=this._slotManager.getSlot(t);if(!("Video_StickyOutstream"!==(null==i?void 0:i.location)||e.isEmpty||e.advertiserId&&this._prebidAmazonAdvertiserIds.includes(e.advertiserId))){this._hideIfVideoRibbonPresent();const e=this._slot.element.parentElement;if(!e)return;e.classList.add(`${this._elementClassNamePrefix}-active`),e.classList.remove(`${this._elementClassNamePrefix}-idle`)}}_handleSlotRequested({slotId:e}){const t=this._slotManager.getSlot(e);if("Video_StickyOutstream"===(null==t?void 0:t.location)){const e=this._slot.element.parentElement;if(!e||e.classList.contains(`${this._elementClassNamePrefix}-idle`))return;e.classList.remove(`${this._elementClassNamePrefix}-active`),e.classList.add(`${this._elementClassNamePrefix}-idle`)}}_createObserver(e){this._observer=new MutationObserver((e=>{e.forEach((e=>{e.target.classList.contains(`${this._elementClassNamePrefix}-active`)?this._displayCloseButton():this._hideCloseButton()}))})),this._observer.observe(e.parentElement||e,{attributes:!0,attributeFilter:["class"]})}_hideCloseButton(){const e=this._closeButton;e&&(e.style.display="none")}_displayCloseButton(){const e=this._closeButton;e&&setTimeout((()=>{e.style.display="inline-flex",performance.mark(ay)}),this._config.video.stickyOutstreamCloseButtonTimeout)}_appendCloseButton(){var e;const t=this._slot.element,i=this._videoCloseButton.createPlayerCloseButton(this._handleCloseClick.bind(this),"sticky outstream",`${this._elementClassNamePrefix}-close`,!1,this._isMobile?this._mobileLocation:void 0);this._hideCloseButton(),null==(e=t.parentNode)||e.insertBefore(i,t),this._closeButton=i,this._createObserver(t)}_addSlickDialogListeners(){document.addEventListener("slick-auth-dialog-opened",(()=>{this._slot.element.classList.add(this._hiddenClassName)})),document.addEventListener("slick-auth-dialog-closed",(()=>{this._slot.element.classList.remove(this._hiddenClassName)}))}_getMeasure(e,t,i){try{return(performance.measure(e,t,i).duration/1e3).toFixed(2)}catch(e){return-1}}_getDurations(){return{slotTime:this._getMeasure(dy,ry,oy),btnTime:this._getMeasure(cy,ay,oy),firstImp:this._getMeasure(ly,ny,oy),pageLoad:(performance.now()/1e3).toFixed(2),refresh:this._slot.refreshCount}}_cleanUpLogging(){var e;null==(e=this._observer)||e.disconnect(),this._markNames.forEach((e=>performance.clearMarks&&performance.clearMarks(e))),this._measureNames.forEach((e=>performance.clearMeasures&&performance.clearMeasures(e)))}_logPlayerClose(e){hy.closeEvent.emit(),W.event("StickyOutstream","handleClose",{device:Bi()?"desktop":"mobile",closeReason:e,...this._getDurations()}),this._cleanUpLogging(),window.removeEventListener("scroll",this._scrollEventHandler)}_closeOnRelatedCollapse(){this._handleClose("relatedCollapse")}_handleCloseClick(){performance.mark(oy),this._handleClose("closeClick")}_handleClose(e){if(this._isClosed)return;this._isClosed=!0;const t=this._slot.element,i=t.parentElement;this._logPlayerClose(e),i&&(i.removeChild(t),i.classList.remove(`${this._elementClassNamePrefix}-active`),this._slotManager.destroy(t.id),this._removeListener())}_handleWidthBreak(){this._removeListener=this._footerEventBus.footerResponseReceived.on(this._handleFooterResponseReceivedEvent.bind(this)),this._repositionCollapseBottom()}_handleFooterResponseReceivedEvent(){this._repositionCollapseBottom()}_repositionCollapseBottom(){this._isMobile&&"top-center"!==this._mobileLocation&&(this._footerBottom=yi(),this._slot.element.parentElement&&(this._slot.element.parentElement.style.setProperty("top","auto","important"),this._slot.element.parentElement.style.setProperty("bottom",`${this._footerBottom}px`,"important")))}_addOffset(e){const t="bottom-right"===this._config.video.stickyOutstreamSettings.mobileLocation&&document.querySelector("slick-sticky-toolbar"),i=e-this._footerBottom,s=t?-76:0;this._slot.element.parentElement&&this._slot.element.parentElement.style.setProperty("transform",`translate(${s}px, -${i}px)`,"important"),document.querySelectorAll(".raptive-sales-footer")&&this._adjustPositionForCeltraAds()}_adjustPositionForCeltraAds(){this._hideIfVideoRibbonPresent();const e=document.querySelector("#AdThrive_Video_StickyOutstream_1_phone");if(!e)return;const t=()=>{"fixed"===e.style.position&&e.style.setProperty("position","static")};new MutationObserver((()=>{t()})).observe(e,{attributes:!0,attributeFilter:["class"]}),t()}constructor(e,t,i,s,n,r,a){this._config=e,this._context=t,this._slotManager=i,this._slot=s,this._videoCloseButton=n,this._gamEventBus=r,this._footerEventBus=a,this._isRendered=!1,this._isClosed=!1,this._elementClassNamePrefix="adthrive-sticky-outstream",this._isMobile="phone"===this._context.device,this._hiddenClassName="adthrive-player-hidden",this._markNames=[ny,ry,oy,ay],this._measureNames=[ly,dy,cy],this._scrollEventHandler=()=>{},this._footerBottom=52,this._isFooterRibbonOnPage=!1,this._prebidAmazonAdvertiserIds=[e.prebid.advertiserId,e.amazon.advertiserId];const{mobileHeaderSelector:o,mobileLocation:l}=this._config.video.stickyOutstreamSettings;this._mobileHeaderSelector=o,this._mobileLocation=Si(l,"bottom-right"),this._addSlickDialogListeners(),this._footerEventBus.footerHeightChanged.on((e=>{this._addOffset(e)}))}}hy.closeEvent=new V;class uy extends Er{init(){this._key="StickySidebarFeatureFlag",this._lookup="SSFF",this._default=!1}}uy=B([bn("StickySidebarExperiment"),M()],uy);class py extends Fn{_callAmazonVastEndpoint(e,t){const i=this._slots.get(e);if(!i||!Ot(t))return;const s=Math.floor(1e11*Math.random()),n=`https://aax.amazon-adsystem.com/e/dtb/vast?b=${t.amzniid}&rnd=${s}&pp=${t.amznbid}`;this._outstream.callRendererWithUrl(n,i.id,!0)}stickyOutstreamReady(){this._stickyOutstream&&!this._stickyOutstream.renderState&&this._stickyOutstream.setup()}constructor(e,t,i,s,n,r,a,o,l,d,c,h){super(),this._slots=e,this._config=t,this._context=i,this._slotManager=s,this._videoCloseButton=n,this._outstream=r,this._amazonMethods=a,this._gamEventBus=d,this._slotEventBus=c,this._footerEventBus=h,this._sticky=[],this._slots.added.on((e=>{if((null==e?void 0:e.location)!==Qe.Recipe&&e&&e.sticky){if(e.element.classList.add("adthrive-sticky"),e.location===Qe.Sidebar){const t=o.result&&e.sequence&&e.sequence<=5,i=this._config.adOptions.dynamicStickySidebarEnabled&&l.result&&e.sequence&&e.sequence>=9;t||i&&e.element.classList.contains("adthrive-sticky-sidebar")?vi(e.element):this._sticky.push(new Yv(e,!0,this._config))}e.location===Qe.Video_StickyOutstream&&(this._stickyOutstream=new hy(this._config,this._context,this._slotManager,e,this._videoCloseButton,this._gamEventBus,this._footerEventBus),this._sticky.push(new Yv(e,!0,this._config)))}})),this._amazonMethods.isAmazonLoaded()&&this._config.amazon.enabled&&(this._gamEventBus.slotOnload.on((({slotId:e})=>{const t=this._slots.get(e),i=window.apsBidObject?window.apsBidObject.VAST:null;(null==t?void 0:t.location)===Qe.Video_StickyOutstream&&i&&(this._outstream.callRendererWithUrl(i,t.id,!0),delete window.apsBidObject)})),this._slotEventBus.adRenderingOutsideGAM.on((({slotId:e,bidResponse:t})=>{this._callAmazonVastEndpoint(e,t)})))}}py=B([bn("StickyComponent"),M(),j("design:type",Function),j("design:paramtypes",[void 0===ra?Object:ra,void 0===_c?Object:_c,void 0===Fr?Object:Fr,void 0===Kg?Object:Kg,void 0===Kv?Object:Kv,void 0===Mm?Object:Mm,void 0===Rc?Object:Rc,void 0===uy?Object:uy,void 0===zv?Object:zv,void 0===Sc?Object:Sc,void 0===Bn?Object:Bn,void 0===Xn?Object:Xn])],py);class gy extends Fn{init(){const e=this._slotManager;this.jumpToRecipeTracker.onJumpToRecipeClicked.once((()=>{this._intersectionObserverManager.reobserveAll()})),this._slotManagerEventBus.added.on((t=>{const i=this._slotManager.getSlots(t);for(const t of i)t.lazy?(wc.pushToQueue((()=>{t.googleTagSlot.setTargeting("lazy","true")})),this._intersectionObserverManager.observe(t)):t.location===Qe.Video_StickyOutstream?(this._sticky.stickyOutstreamReady(),e.display([t]).catch((e=>{W.error("GoogleLazyLoadComponent","init","display stickyOutstream slot",e)}))):(wc.pushToQueue((()=>{t.googleTagSlot.setTargeting("lazy","false")})),e.display(t).catch((e=>{W.error("GoogleLazyLoadComponent","init","display non lazy slot",e)})))}))}constructor(e,t,i,s,n){super(),this._slotManager=e,this._sticky=t,this._intersectionObserverManager=i,this._slotManagerEventBus=s,this.jumpToRecipeTracker=n}}gy=B([bn("GoogleLazyLoadComponent"),D(),j("design:type",Function),j("design:paramtypes",[void 0===Kg?Object:Kg,void 0===py?Object:py,void 0===la?Object:la,void 0===nr?Object:nr,void 0===Gg?Object:Gg])],gy);class my extends Fn{init(){this._slotManagerEventBus.added.on((e=>{const t=this._slots.get(e);wc.pushToQueue((()=>{for(const e of t){const t=es(e)||0;e.hvp=t,t>=50&&e.setTargeting({key:"hvp",value:t.toString()})}}))})),this._slotManagerEventBus.refreshing.on((e=>{const t=this._slots.get(e);wc.pushToQueue((()=>{for(const e of t)if((null==e?void 0:e.refreshCount)<=2&&(!(null==e?void 0:e.hvp)||(null==e?void 0:e.hvp)<80)){const t=Zi(e)||0;e.hvp=t,t>=60&&e.setTargeting({key:"hvp",value:`${t}`})}}))}))}constructor(e,t){super(),this._slotManagerEventBus=e,this._slots=t}}my=B([bn("HvpComponent"),D(),j("design:type",Function),j("design:paramtypes",[void 0===nr?Object:nr,void 0===ra?Object:ra])],my);class _y{inject(){try{return this._config.marmalade.selectorMatches.reduce(this.processMatch.bind(this),[])}catch(e){W.error("MarmaladeInjector","inject",e)}return[]}filterBasedOnSettings(){const e=this._config.adTypes,t=Ki()?e.inRecipeRecommendationMobile:e.inRecipeRecommendationDesktop,i=Ki()?e.sponsorTileMobile:e.sponsorTileDesktop;return this._config.marmalade.selectorMatches.filter((({adUnit:e})=>"Native_Recipe"===e.location?(t&&this._gam.setTargetingFlag("irrEligible",["true"],!0),t):"Sponsor_Tile"!==e.location||(i&&this._gam.setTargetingFlag("stEligible",["true"],!0),i)))}processMatch(e,t){const{adUnit:i,match:s}=t,n=this.getElementId(i.location,i.sequence);if(!e.some((e=>e.location===i.location&&e.sequence===i.sequence))){const t=this.addAd(s,n,i.position,i.classNames);if(t){const s=new na(i.location,i.sequence,i.size,t,!1,i.lazy);e.push(s)}}return e}getElementId(e,t){return[this._config.gam.prefix,e,t].filter(on).join("_")}addAd(e,t,i,s=[]){const n=`
`;return e.insertAdjacentHTML(i,n),document.getElementById(t)}constructor(e,t){this._config=e,this._gam=t,this._config.marmalade.selectorMatches=this.filterBasedOnSettings()}}_y=B([bn("MarmaladeInjector"),D(),j("design:type",Function),j("design:paramtypes",[void 0===_c?Object:_c,void 0===wc?Object:wc])],_y);class fy extends Fn{init(){this._marmaladeEventBus.marmaladeResponseLoaded.on((()=>{this._initializeMarmalade()})),this._slotEventBus.preRequestBids.on((e=>{this._slots.get(e).forEach((e=>{wc.pushToQueue((()=>{e.setTargeting(this.getMcmpTargeting())}))}))})),this._addDynamicSlots(),this._addFlpMessaging(),this._setPageLevelTargeting(),this._setIXTargeting();const e=()=>{this._setMcmpTargeting(),this._setIXTargeting()};this._config.marmalade.rfDataProcessed.emitted?e():this._config.marmalade.rfDataProcessed.on((()=>e()))}getMcmpTargeting(){const e=[...this._mcmp,...this._getRfCodes("gam")],t=this._config.trackScroll,i=t.trackScrollEnabled&&t.getTargetingValue();return i&&e.push(...i),{key:"mcmp",value:e}}_initializeMarmalade(){this._mcmp=this._config.marmalade.mcmp.filter(Mi),this._siteCodes=this._config.marmalade.siteCodes,this._filteredSiteCodes=this._config.marmalade.filteredSiteCodes,this._siteCodeObject=this._filteredSiteCodes.reduce(((e,t)=>(e[t]="True",e)),{}),this.init()}_getRfCodes(e){const t=[];if(e){const i=this._config.marmalade;[...i.rfMcmpCodes,...i.rfIabCodes].forEach((i=>{const s=i[0];i[1].includes(e)&&t.push(s)}))}return t}_setMcmpTargeting(){const e=this._getRfCodes("gam");this._config.marmalade.mcmpTargeting=[...this._mcmp,...e]}_setIXTargeting(){const e=this._getRfCodes("ix"),t=this._config.trackScroll.getTargetingValue(),i=t?[t]:[];ks({MCMP:[...e,...this._mcmp,...i].join("#MCMP:"),...this._siteCodeObject},this._prebidMethods)}_setPageLevelTargeting(){this._slotManagerEventBus.requestingBids.once((()=>{this._gam.setTargetingFlag("rf",[String(this._marmaladeEventBus.recencyFrequencyDataSet.emitted)])})),this._setMcmpTargeting(),this._gam.setTargeting({key:"site_code",value:this._siteCodes}),this._gam.setTargeting({key:"marmalade",value:this._config.marmalade.loaded?"true":"false"})}_addDynamicSlots(){const e=this._marmaladeInjector.inject();e.forEach((e=>e.refreshInterval=0)),e.length>0&&this.gamEventBus.started.on((async()=>{await this._slotManager.add(e).catch((e=>{W.error("MarmaladeComponent","init",e)}))}))}_addFlpMessaging(){const e=this._config.marmalade.flpProdIds.filter(Mi);if(e){((e,t)=>{window.addEventListener("message",(i=>{try{const{origin:s,source:n}=i,r=JSON.parse(i.data),a=r&&r.message===t.message;if(!s||!s.match(e)||!a)return;n.postMessage(JSON.stringify(t),s)}catch(e){return}}))})(/https:\/\/\S*\.safeframe.googlesyndication.com/i,{message:"adthriveFlippData",flippData:e})}}get enabled(){return!this._config.disableAds.all}constructor(e,t,i,s,n,r,a,o,l,d){super(),this._config=e,this._marmaladeInjector=t,this._slotManager=i,this._gam=s,this._prebidMethods=n,this.gamEventBus=r,this._marmaladeEventBus=a,this._slotEventBus=o,this._slotManagerEventBus=l,this._slots=d,this._siteCodeObject={};const c=this._config.marmalade;this._mcmp=c.mcmp.filter(Mi),this._siteCodes=c.siteCodes,this._filteredSiteCodes=c.filteredSiteCodes,this._siteCodeObject=this._filteredSiteCodes.reduce(((e,t)=>(e[t]="True",e)),{})}}fy=B([bn("MarmaladeComponent"),D(),j("design:type",Function),j("design:paramtypes",[void 0===_c?Object:_c,void 0===_y?Object:_y,void 0===Kg?Object:Kg,void 0===wc?Object:wc,void 0===Mn?Object:Mn,void 0===Sc?Object:Sc,void 0===tr?Object:tr,void 0===Bn?Object:Bn,void 0===nr?Object:nr,void 0===ra?Object:ra])],fy);class vy extends Er{init(){this._key="MagniteCarbon",this._lookup="MGNCRBN",this._default=!1}run(){return super.run()}}B([kn(),j("design:type",Function),j("design:paramtypes",[]),j("design:returntype",void 0)],vy.prototype,"run",null),vy=B([bn("MagniteCarbonExperiment"),M()],vy);class yy extends Fn{init(){this._gdpr.enabled?this._events.consentCaptured.on((()=>{this._gdprEnforcement.checkConsentForVendor(this.MAGNITE_CARBON_GVLID,[1]).then((e=>{e&&this._beginEventLogging()})).catch((()=>{}))})):this._beginEventLogging()}async _beginEventLogging(){this._pageEngagement.id=this._generateUUID(),this._pageEngagement.startTime=Date.now(),this._pageEngagement.timeLastEngage=Date.now(),this.pageViewId=this._generateUUID().toString(),this.profileId=this._getProfileId(),this.sessionId=this._getSessionId();const e=await this._createBaseEngagementEvent();this._sendEngagementEvent(e,"page_load"),this._prebidEventBus.auctionEnd.once((()=>{this._auctionEndEvent()})),this._prebidEventBus.tcf2Enforcement.on((e=>{this.tcf2EnforcementEvent(e)}))}async tcf2EnforcementEvent(e){var t,i,s;if((null==(t=e.storageBlocked)?void 0:t.length)>0||(null==(i=e.biddersBlocked)?void 0:i.length)>0||(null==(s=e.analyticsBlocked)?void 0:s.length)>0){this._registerEngagement();const t=await this._createBaseEngagementEvent();t.tcf_events=e,this._sendEngagementEvent(t,"tcf_enforcement")}}async _auctionEndEvent(){if(this._auctionEndEventCount++,1===this._auctionEndEventCount){this._registerEngagement();const e=await this._createBaseEngagementEvent();this._sendEngagementEvent(e,"auction_end")}}async _createBaseEngagementEvent(){const e={profile_id:this.profileId,session_id:this.sessionId,pageview_id:this.pageViewId,engagement_id:this._pageEngagement.id,engagement_count:this._pageEngagement.count,engagement_ttl:this._pageEngagement.ttl,start_time:this._pageEngagement.startTime,end_time:Date.now(),script_id:window.location.host,url:window.location.href,referrer:document.referrer,consent:await this._getConsentData()},t=await this.getExternalIds();return e.external_ids=t,e}_registerEngagement(){const e=Date.now(),t=(e-this._pageEngagement.timeLastEngage)/1e3;this._pageEngagement.timeLastEngage=e,t{window.__tcfapi("getTcData",2,((t,i)=>{i&&t&&t.tcString&&t.tcString.length?e(t.tcString):e("")}))}))),t}async getExternalIds(){const e={};let t=[];return await this._prebidMethods.waitForQueue().then((i=>{!0===i&&(t=this._prebidMethods.getUserIdsAsEids()),t.forEach((t=>{t.source&&(null==t?void 0:t.uids.length)&&(e[t.source]=t.uids.map((e=>e.id)))}))})),e}_sendEngagementEvent(e,t){const i=`${this.ANALYTICS_HOST}/${this.ANALYTICS_VERSION}/parent/${this.PARENT_ID}/engagement/trigger/${t}`;fetch(i,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify(e)}).then((e=>e.json())).then((e=>{try{this._updateProfileId(e)}catch(e){W.error("MagniteCarbonComponent","importScript","unable to parse API response")}})).catch((e=>W.error("MagniteCarbonComponent","importScript",e)))}_updateProfileId(e){(null==e?void 0:e.update)&&""!=(null==e?void 0:e.id)&&(Fs.setExternalCookie(this.PROFILE_ID_COOKIE,e.id,{expiry:{unit:"days",value:89},sameSite:"Lax"}),Fs.setExternalLocalStorage(this.PROFILE_ID_KEY,e.id))}_getProfileId(){const e=Fs.readExternalLocalStorage(this.PROFILE_ID_KEY),t=Fs.readExternalCookie(this.PROFILE_ID_COOKIE);if(e)return Fs.setExternalCookie(this.PROFILE_ID_COOKIE,e,{expiry:{unit:"days",value:89},sameSite:"Lax"}),e;if(t)return Fs.setExternalLocalStorage(this.PROFILE_ID_KEY,t),t;const i=this._generateUUID();return Fs.setExternalLocalStorage(this.PROFILE_ID_KEY,i.toString()),Fs.setExternalCookie(this.PROFILE_ID_COOKIE,i.toString(),{expiry:{unit:"days",value:89},sameSite:"Lax"}),i.toString()}_getSessionId(){const e=Fs.readExternalCookie(this.SESSION_ID_COOKIE);if(e&&""!=e)return Fs.setExternalCookie(this.PROFILE_ID_COOKIE,e,{expiry:{unit:"minutes",value:5},sameSite:"Lax"}),e;const t=this._generateUUID();return Fs.setExternalCookie(this.PROFILE_ID_COOKIE,t.toString(),{expiry:{unit:"minutes",value:5},sameSite:"Lax"}),t.toString()}_generateUUID(e){let t=0;return t=window&&window.crypto&&void 0!==window.crypto.getRandomValues?crypto.getRandomValues(new Uint8Array(1))[0]%16:16*Math.random(),e?(e^t>>e/4).toString(16):([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,this._generateUUID)}get enabled(){return this._magniteCarbonExperiment.result&&!this._gpc.gpcEnabled&&!this._ccpa.userOptedOut}constructor(e,t,i,s,n,r,a,o){super(),this._gpc=e,this._ccpa=t,this._gdpr=i,this._magniteCarbonExperiment=s,this._prebidMethods=n,this._prebidEventBus=r,this._events=a,this._gdprEnforcement=o,this.ANALYTICS_VERSION="v1.0",this.PROFILE_ID_KEY="carbon_ccuid",this.PROFILE_ID_COOKIE="ccuid",this.SESSION_ID_COOKIE="ccsid",this.MAGNITE_CARBON_GVLID=493,this.PARENT_ID="8fea659f19",this.ANALYTICS_HOST="https://pb-ing.ccgateway.net",this.pageViewId="",this.profileId="",this.sessionId="",this._pageEngagement={ttl:60,count:0,id:0,startTime:0,timeLastEngage:0},this._auctionEndEventCount=0}}yy=B([bn("MagniteCarbonComponent"),M(),j("design:type",Function),j("design:paramtypes",[void 0===ja?Object:ja,void 0===Na?Object:Na,void 0===Xa?Object:Xa,void 0===vy?Object:vy,void 0===Mn?Object:Mn,void 0===Jn?Object:Jn,void 0===Ya?Object:Ya,void 0===Mu?Object:Mu])],yy);class by extends Er{init(){this._key="TopicsAPI",this._lookup="TPCAPI",this._default=!1}isEnabled(){return super.isEnabled()&&_i()}}by=B([bn("TopicsAPIExperiment"),M()],by);class Sy extends Fn{get enabled(){return!this._config.gdpr.enabled&&!this._config.ccpa.userOptedOut&&this._context.browsingTopicsSupported&&this._browsingTopicsAPIExperiment.result}get topics(){return this._topics}async start(){const e=await this.fetchTopics(),t=e.map((e=>`${e.id}`));t.length>0&&this._gam.setTargetingFlag("topicapi",t),this._topics=e,this._context.browsingTopics=e,this._browsingTopicsAPIEventBus.topicsReceived.emit(e)}async fetchTopics(){try{const t=await window.fetch(`${this._topicsUrl}?ts=${Date.now()}`,{browsingTopics:!0}),i=await t.json();var e;return null!=(e=i.topics)?e:[]}catch(e){return[]}}async pollForTopics(){const e=await this.fetchTopics();return 0===e.length?(await Rn(15e3),this.pollForTopics()):e}constructor(e,t,i,s,n){super(),this._config=e,this._context=t,this._gam=i,this._browsingTopicsAPIExperiment=s,this._browsingTopicsAPIEventBus=n,this._topics=[],this._topicsUrl="https://ads.adthrive.com/api/v2/topics"}}Sy=B([bn("BrowsingTopicsAPIComponent"),D(),j("design:type",Function),j("design:paramtypes",[void 0===_c?Object:_c,void 0===Fr?Object:Fr,void 0===wc?Object:wc,void 0===by?Object:by,void 0===Gn?Object:Gn])],Sy);class Ey extends br{init(){this._key="PaapiBuyerTimeout",this._lookup="PAAPIBTO"}}Ey=B([bn("PaapiBuyerTimeoutExperiment"),M()],Ey);class Cy extends br{init(){this._key="PaapiSellerTimeout",this._lookup="PAAPISTO"}}Cy=B([bn("PaapiSellerTimeoutExperiment"),M()],Cy);class Ty extends br{init(){this._key="PaapiReportingTimeout",this._lookup="PAAPIRTO"}}Ty=B([bn("PaapiReportingTimeoutExperiment"),M()],Ty);class wy extends Fn{get enabled(){return this._config.fledge.enabled}init(){this.enabled&&(this._gam.setTargeting({key:"fledge",value:"true"}),this._setPrebidPAAPIConfig())}_getDecisionLogicUrl(){return`https://${this._context.privacySandboxHost}/decision-logic.js`}_setPrebidPAAPIConfig(){var e;const t=null!=(e=this._paapiBuyerTimeoutExperiment.result)?e:500;var i;const s=null!=(i=this._paapiSellerTimeoutExperiment.result)?i:500;var n;const r=null!=(n=this._paapiReportingTimeoutExperiment.result)?n:500,a={seller:this._sellerUrl,decisionLogicUrl:this._decisionLogicUrl,interestGroupBuyers:[this._ownerUrl,"https://grid-mercury.criteo.com","https://ads.optable.co"],auctionSignals:{raptive:{...W.data,debug:this._context.debug,chromeLabel:this._config.fledge.cookieDeprecationLabel,siteId:this._config.site.id,siteName:this._config.site.name,pvk:this._context.pageviewKey,sess:this._context.sessionKey,deployment:this._context.deployment,branch:this._context.branch,bucket:this._context.bucket}},perBuyerTimeouts:{"*":t},perBuyerCumulativeTimeouts:{"*":t},sellerTimeout:s,reportingTimeout:r},o={enabled:!0,defaultForSlots:1,bidders:this._bidderCodeList,componentSeller:{auctionConfig:a,separateAuctions:!1},parallel:!1,gpt:{configWithTargeting:!1}};this._prebidMethods.setConfig({paapi:o}),this._prebidMethods.setBidderConfig({bidders:[te.Rtbhouse],config:{fledgeEnabled:!0,fledgeConfig:a}},!0)}constructor(e,t,i,s,n,r,a){super(),this._config=e,this._context=t,this._gam=i,this._prebidMethods=s,this._paapiBuyerTimeoutExperiment=n,this._paapiSellerTimeoutExperiment=r,this._paapiReportingTimeoutExperiment=a,this._bidderCodeList=[te.Rtbhouse,te.OpenX,te.OpenXServer,te.Criteo,te.IndexExchange,te.Rubicon,te.CriteoServer],this._ownerUrl=`https://${this._context.host}`,this._sellerUrl=`https://${this._context.privacySandboxHost}`,this._decisionLogicUrl=this._getDecisionLogicUrl()}}wy=B([bn("FledgeComponent"),M(),j("design:type",Function),j("design:paramtypes",[void 0===_c?Object:_c,void 0===Fr?Object:Fr,void 0===wc?Object:wc,void 0===Mn?Object:Mn,void 0===Ey?Object:Ey,void 0===Cy?Object:Cy,void 0===Ty?Object:Ty])],wy);class ky{static createIdentityData(e,t){switch(e){case"direct":return new Yo(t);case"graph3p":return new Xo(t);case"graph1p":return new Qo(t);case"liveIntent":return new Jo(t)}}}class Ay{createIdentityData(e,t,i,s,n=[]){let r;const a=this._getCollectionSourceFromCaptureSource(s),o={type:"email",sha256Hash:e.sha256Hash,sha1Hash:e.sha1Hash?e.sha1Hash:void 0,collectionSiteId:this._siteConfig.id,collectionDate:"capture"===a?is():i||void 0,collectionSource:a,collectionMethod:"direct",...("iframe"===s||t.startsWith(ms.PREFIXES.IDENTITY_IFRAME))&&{iframe:!0}};let l=this._getCollectionMethod(s);if(void 0===l&&(l=this._getCollectionMethodFromSourceStr(t)),"direct"===l){const e={...o,collectionMethod:"direct",directSource:this._getDirectSource(t)};r=ky.createIdentityData("direct",e)}else if("graph3p"===l){const e=il(t),i={...o,collectionMethod:"graph3p",graphSource:e,bridgingMethod:el(t),alternateIds:n};r=ky.createIdentityData("graph3p",i)}else if("graph1p"===l){const e={...o,collectionMethod:"graph1p",bridgingMethod:tl(t),alternateIds:n};r=ky.createIdentityData("graph1p",e)}else{const e={...o,collectionMethod:"liveIntent",withUid2:!t.includes("sdklir")};r=ky.createIdentityData("liveIntent",e)}return r}_getCollectionSourceFromCaptureSource(e){return"email"===e||"identityApi"===e||"raptiveDCN"===e||"externalDCN"===e||"iframe"===e||"sdkli"===e?"capture":"browserStorage"===e?"storage":void 0}_getCollectionMethodFromSourceStr(e){return fs(e)?"liveIntent":Zo(e)?"graph1p":Ss(e)?"direct":"graph3p"}_getCollectionMethod(e){return"identityApi"===e||"email"===e?"direct":"raptiveDCN"===e?"graph1p":"externalDCN"===e?"graph3p":"sdkli"===e?"liveIntent":void 0}_getDirectSource(e){const t=e.startsWith(ms.PREFIXES.IDENTITY_IFRAME)?e.slice(ms.PREFIXES.IDENTITY_IFRAME.length):e;return t.includes(ms.VALUES.SLICKSTREAM)||t.includes("slickstream")?"slickstream":t.includes(ms.VALUES.URLH)?"urlHashed":t.includes(ms.VALUES.URL)?"url":t.includes(ms.VALUES.API)?"api":t.includes(ms.VALUES.COOKIE)?"cookies":t.includes(ms.VALUES.GRWM)?"growme":t.includes(ms.VALUES.NEWSLETTER)?"newsletter":t.includes(ms.VALUES.IDENTITY_IFRAME)?"identityIframe":t.includes(`${ms.VALUES.LOCAL_STORAGE}_`)?"localStorage":t.includes(`${ms.VALUES.COMMENT}_`)?"comment":t.includes(`${ms.VALUES.OTHER}_`)?"other":"unknown"}constructor(e){this._siteConfig=e}}Ay=B([bn("IdentityDataMigration"),D(),j("design:type",Function),j("design:paramtypes",[void 0===ur?Object:ur])],Ay);class Iy{init(){this._emailCaptureHandler.emailCaptured.on((e=>this._handleEmailCapture(e).then((()=>{"iframe"===e.identityDataSource&&this._identityEventBus.iframeDataSynced.emit()}))),{handleEventsAlreadyEmitted:!0}),this._gdprEvents.consentCaptured.on((e=>this._handleConsentCapture(e)),{handleEventsAlreadyEmitted:!0}),this._config.ccpa.consentChange.on((e=>{this._handleCCPAConsentChange(null!=e?e:"")}))}_atLeastOneHashProvided(e){return Object.values(e).some((e=>e.length>0))}async _handleEmailCapture(e){const{pii:{email:t,sha256Hash:i,sha1Hash:s,source:n,sourceCollectedDate:r,alternateIds:a},shareWithPartners:o,identityDataSource:l,identityDataMap:d}=e;if(i||s?this._hashObj={sha256Hash:i||"",sha1Hash:s||""}:t&&await this._hashEmail(t),this._email=t,this._source=n,this._sourceCollectedDate=r,l)if(d&&"iframe"===l){const e=d.direct?d.direct:d.graph1p?d.graph1p:d.graph3p;e&&(this._identityData="string"==typeof e.d?await jo(e.d,e.s):e.d,this._identityData.iframe=!0)}else this._identityData=this._identityDataMigration.createIdentityData({sha256Hash:this._hashObj.sha256Hash,sha1Hash:this._hashObj.sha1Hash},this._source,this._sourceCollectedDate,l,a);this._shareWithPartners=o||this._shareBasedOnSource(n),this._config.gdpr.enabled&&!this._consentReceived||this._processPii()}_shareBasedOnSource(e){const t=this._hemSourceAllowlist.checkSource(e);return bs({source:e})?t&&this._optableConfig.enabled&&this._optableConfig.useOptableHem:t}_handleConsentCapture(e){this._consentReceived=!0,this._consent=e,(this._email||this._atLeastOneHashProvided(this._hashObj))&&this._processPii()}_processPii(){Fs.setInternalLocalStorage("adt_emsrc",this._source),Fs.setInternalLocalStorage("adt_ei",this._hashObj),this._identityData&&Uo(this._identityData,this._config.site.id,"false"!==this._context.querystring.get("adt_encrypt")).then((e=>{if(this._identityData){const t=this._convertIdentityDataToGamTargetingValue(this._identityData,e);this._gam.setTargeting({key:"adt_i",value:t})}})),this._gam.setTargetingFlag("emsrc",[this._source],!0),this._gam.setTargetingFlag("hem",["1"],!0),this._sourceCollectedDate&&(Fs.setInternalLocalStorage("adt_emsrc_cd",this._sourceCollectedDate),this._gam.setTargetingFlag("hem_cd",[this._sourceCollectedDate],!0)),this._shareWithPartners&&(this._identityEventBus.dataCaptured.emit({email:this._email,...this._hashObj,consent:this._consent,source:this._source,sourceCollectedDate:this._sourceCollectedDate}),this._gam.setTargetingFlag("hem_shared",["1"],!0),this._identityData&&this._identityEventBus.dataCapturedForIframe.emit(this._identityData))}_convertIdentityDataToGamTargetingValue(e,t){const i=[];switch(e.collectionMethod){case"direct":if(i.push("cm:d"),e.directSource){const t=(n=e.directSource,Wo.get(n)||"unknown");i.push(`ds:${t}`)}break;case"graph1p":i.push("cm:dcn1"),e.bridgingMethod&&i.push(`bm:${e.bridgingMethod}`);break;case"graph3p":if(i.push("cm:dcn2"),e.graphSource){const t=(s=e.graphSource,Ko.get(s)||"unknown");i.push(`gs:${t}`)}break;case"liveIntent":i.push("cm:sdkli")}var s,n;switch(e.collectionSource){case"capture":i.push("cs:c");break;case"storage":i.push("cs:s")}return i.push(`cd:${e.collectionDate}`),e.collectionSiteId!==this._config.site.id&&i.push("xs"),e.iframe&&i.push("if"),t.direct&&i.push("d"),t.graph1p&&i.push("dcn1"),t.graph3p&&i.push("dcn2"),t.liveIntent&&i.push("sdkli"),i}async _hashEmail(e){if(!("msCrypto"in window)&&"https:"===location.protocol&&"crypto"in window&&"TextEncoder"in window){const t=(new TextEncoder).encode(e),[i,s]=await Promise.all([this._convertToSpecificHashType("SHA-256",t),this._convertToSpecificHashType("SHA-1",t)]);this._hashObj.sha256Hash=i,this._hashObj.sha1Hash=s}}async _convertToSpecificHashType(e,t){const i=await crypto.subtle.digest(e,t),s=Array.from(new Uint8Array(i)).map((e=>("00"+e.toString(16)).slice(-2))).join("");return s}_handleCCPAConsentChange(e=""){const t=Fs.readInternalLocalStorage("adt_ei"),i=Fs.readInternalLocalStorage("adt_emsrc"),s=e===this._config.ccpa.ccpaOptOut;if(ci()){const e=Fs.readInternalCookie("adt_ei"),t=Fs.readInternalCookie("adt_emsrc");(e||t)&&s&&(Fs.deleteCookie("adt_ei"),Fs.deleteCookie("adt_emsrc"),Fs.deleteCookie("adt_i"))}(t||i)&&s&&(Fs.deleteLocalStorage("adt_ei"),Fs.deleteLocalStorage("adt_emsrc"),Fs.deleteLocalStorage("adt_emsrc_cd"),Fs.deleteLocalStorage("adt_i"))}constructor(e,t,i,s,n,r,a,o,l){this._emailCaptureHandler=e,this._gdprEvents=t,this._config=i,this._context=s,this._gam=n,this._identityEventBus=r,this._hemSourceAllowlist=a,this._optableConfig=o,this._identityDataMigration=l,this._email="",this._consent="",this._hashObj={sha256Hash:"",sha1Hash:""},this._source="",this._sourceCollectedDate=null,this._shareWithPartners=!0,this._consentReceived=!1,this._emailCounted=!1,this._identityData=null,this.piiCaptured=new V}}Iy=B([bn("PiiManager"),M(),j("design:type",Function),j("design:paramtypes",[void 0===ko?Object:ko,void 0===Ya?Object:Ya,void 0===_c?Object:_c,void 0===Fr?Object:Fr,void 0===wc?Object:wc,void 0===Qn?Object:Qn,void 0===Ro?Object:Ro,void 0===Fa?Object:Fa,void 0===Ay?Object:Ay])],Iy);class xy extends cp{get enabled(){var e,t;return!this._gpcConfig.gpcEnabled&&!this._ccpaConfig.userOptedOut&&null!=(t=null==(e=this._userId)?void 0:e.enabled)&&t}updateUserIds(){var e;return(null!=(e=this._prebidMethods.getConfig("userSync.userIds"))?e:[]).map((e=>(this._userId&&e.name===this._userId.id.name&&(e=this._userId.id),e)))}processPii(e){this._prebidMethods.addToQueue((()=>{this.run(e)}))}run(e){if(this._userId&&e.sha256Hash&&this._userId.id.params){this._userId.id.params.he=e.sha256Hash;const t=this.updateUserIds();this._prebidMethods.setConfig({userSync:{userIds:t}}),this._userIdEventBus.userIdNeedsRefresh.emit({options:{submoduleNames:[this._name]},callback:()=>{}})}}constructor(e,t,i,s,n){super(),this._gpcConfig=e,this._ccpaConfig=t,this._prebidMethods=i,this._userIds=s,this._userIdEventBus=n,this._name="connectId",this._userId=this._userIds.get(this._name)}}xy=B([bn("YahooPiiPartner"),D(),j("design:type",Function),j("design:paramtypes",[void 0===ja?Object:ja,void 0===Na?Object:Na,void 0===Mn?Object:Mn,void 0===dp?Object:dp,void 0===er?Object:er])],xy);class Py extends cp{get enabled(){var e,t;return!this._gpcConfig.gpcEnabled&&!this._ccpaConfig.userOptedOut&&null!=(t=null==(e=this._userId)?void 0:e.enabled)&&t}processPii(e){this._prebidMethods.addToQueue((()=>{this.run(e)}))}updateUserIds(){var e;return(null!=(e=this._prebidMethods.getConfig("userSync.userIds"))?e:[]).map((e=>(this._userId&&e.name===this._userId.id.name&&(e=this._userId.id),e)))}run(e){if(e.sha256Hash&&this._userId&&this._userId.id.params){const t=this.updateUserIds();if(bs({source:e.source}))return;e.sha256Hash&&(this._userId.id.params.pd=this._id5IdModule.getPdString(e.sha256Hash)),this._prebidMethods.setConfig({userSync:{userIds:t}}),this._userIdEventBus.userIdNeedsRefresh.emit({options:{submoduleNames:[this._userId.id.name]},callback:()=>{}})}}constructor(e,t,i,s,n,r){super(),this._gpcConfig=e,this._ccpaConfig=t,this._prebidMethods=i,this._userIds=s,this._userIdEventBus=n,this._id5IdModule=r,this._name="id5Id",this._userId=this._userIds.get(this._name)}}Py=B([D(),bn("Id5PiiPartner"),j("design:type",Function),j("design:paramtypes",[void 0===ja?Object:ja,void 0===Na?Object:Na,void 0===Mn?Object:Mn,void 0===dp?Object:dp,void 0===er?Object:er,void 0===Hu?Object:Hu])],Py);class Oy extends cp{get enabled(){const e=this._config.partners;return!(this._config.gpc.gpcEnabled||this._config.ccpa.userOptedOut||!e.display.get(te.Criteo)&&!e.video.get(te.Criteo))}processPii(e){this._prebidMethods.addToQueue((()=>{this.run(e)}))}run(e){e&&e.sha256Hash&&this._prebidMethods.setBidderConfig({bidders:[te.Criteo],config:{ortb2:{user:{ext:{data:{eids:[{source:"cafemedia.com",uids:[{id:e.sha256Hash,atype:3,ext:{stype:"hemsha256"}}]}]}}}}}})}constructor(e,t){super(),this._config=e,this._prebidMethods=t}}Oy=B([D(),bn("CriteoBidderPiiPartner"),j("design:type",Function),j("design:paramtypes",[void 0===_c?Object:_c,void 0===Mn?Object:Mn])],Oy);class Ry extends cp{get enabled(){var e,t;return!this._gpcConfig.gpcEnabled&&!this._ccpaConfig.userOptedOut&&null!=(t=null==(e=this._userId)?void 0:e.enabled)&&t}processPii(e){}_run(e){var t;const i=null!=(t=this._prebidMethods.getConfig("userSync.userIds"))?t:[],s=i.find((e=>e.name===this._name)),n=i.filter((e=>e.name!==this._name)),r=!!s,a=this._userId&&this._userId.id.params&&this._userId.id.params.hasOwnProperty("e");r&&!a&&(this._prebidMethods.setConfig({userSync:{userIds:[...n,{...s,params:{...null==s?void 0:s.params,e:e.sha256Hash}}]}}),this._userIdEventBus.userIdNeedsRefresh.emit({options:{submoduleNames:[this._name]},callback:()=>{}}))}constructor(e,t,i,s,n){super(),this._gpcConfig=e,this._ccpaConfig=t,this._prebidMethods=i,this._userIds=s,this._userIdEventBus=n,this._name="fabrickId",this._userId=this._userIds.get(this._name)}}Ry=B([D(),bn("FabrickPiiPartner"),j("design:type",Function),j("design:paramtypes",[void 0===ja?Object:ja,void 0===Na?Object:Na,void 0===Mn?Object:Mn,void 0===dp?Object:dp,void 0===er?Object:er])],Ry);class Ly extends cp{get enabled(){return this._optableConfig.enabled&&this._optableConfig.useOptableHem&&!this._gpcConfig.gpcEnabled&&!this._ccpaConfig.enabled}async init(){if(this.enabled)try{this._setupEventListeners();const t=Fs.readInternalLocalStorage("adt_otpgrd");t&&this._setPubmaticSspIdAsEidFromGraphResponse(t);const[i,s]=await Promise.all([this._collectIdentifiersFromSSP(),this._collectIdentifiersFromUserIds()]);var e;await this._processIdentifiers([...i,...s]);const n={os:this._userAgentConfig.os,browser:this._userAgentConfig.browser,device:this._userAgentConfig.device,cookieDeprecationLabel:null!=(e=this._fledgeConfig.cookieDeprecationLabel)?e:""};await this._processTraits(n)}catch(e){}}processPii(e){var t;if(!this.enabled)return;if(!(null==(t=window.optable)?void 0:t.auth))return;if(!(null==e?void 0:e.source)||!(null==e?void 0:e.sha256Hash))return;if(fs(e.source))return;const i={},s=[];if(e.sourceCollectedDate&&(i.hem_cd=e.sourceCollectedDate),Es(e.source)){const t=`${us}${e.sha256Hash}`;s.push(t),i.hem_sources=e.source,i.hem_dates=is(),i.hem_sites=`s-${this._siteConfig.id}`,this._optableStore.truedataHems.length&&(i.td_hems=this._optableStore.truedataHems.join(","))}this._processIdentifiers(s),this._processTraits(i)}_setupEventListeners(){this._identityEventBus.optableIdentitiesCaptured.on((e=>{this._processIdentifiers(e)}),{handleEventsAlreadyEmitted:!0}),this._identityEventBus.optableTraitsCaptured.on((e=>{this._processTraits(e)}),{handleEventsAlreadyEmitted:!0}),this._identityEventBus.optableThirdPartyGraphResolved.on((e=>{e&&this._setPubmaticSspIdAsEidFromGraphResponse(e)}),{handleEventsAlreadyEmitted:!0})}async _collectIdentifiersFromUserIds(){try{const e=this._userIdSources.reduce(((e,{userId:t,variant:i})=>{if(!t)return e;const s=this._userIdTargeting.getParsedUserIdStoredValue(t);return s?[...e,this._optableSdkWrapper.cid(s,i)]:e}),[]);return Promise.all(e)}catch(e){return W.error("OptablePiiPartner","_collectIdentifiersFromUserIds","Failed to collect identifiers from UserIds",e),[]}}async _collectIdentifiersFromSSP(){try{await Rn(3e3);const e=this._prebidMethods.getUserIdsAsEids(),t=this._sspSources.reduce(((t,{source:i,variant:s})=>{if(!i)return t;const n=null==e?void 0:e.find((e=>e.source===i));return n&&n.uids.length>0?[...t,this._optableSdkWrapper.cid(n.uids[0].id,s)]:t}),[]);return Promise.all(t)}catch(e){return W.error("OptablePiiPartner","_collectIdentifiersFromSSP","Failed to collect identifiers from SSPs",e),[]}}async _processIdentifiers(e){try{const t=this._santitizeIdentifiers(e);if(!t.length)return;await this._optableSdkWrapper.identify(...t)}catch(t){W.error("OptablePiiPartner","_processIdentifiers","Failed to process identifiers",{identifiers:e,error:t})}}_santitizeIdentifiers(e){return e.filter((e=>{if("string"!=typeof e||!e.length)return!1;const[t,i]=e.split(":",2),s=this._identityValidators[t];return!!s&&s(i)}))}async _processTraits(e){try{const t=this._sanitizeTraits(e);if(!Object.keys(t).length)return;await this._optableSdkWrapper.profile(t)}catch(t){W.error("OptablePiiPartner","_processTraits","Failed to process traits",{traits:e,error:t})}}_sanitizeTraits(e){return Object.entries(e).reduce(((e,[t,i])=>("string"==typeof i&&i.length&&(e[t]=i),e)),{})}_setPubmaticSspIdAsEidFromGraphResponse(e){var t,i,s,n,r;if(!(null==e||null==(s=e.sources)||null==(i=s.mediawallah)||null==(t=i.clusters)?void 0:t.length))return;if(this._userSyncConfig.isPubmaticEidSetByLiveIntent)return;const a=(null==e||null==(r=e.sources)||null==(n=r.mediawallah)?void 0:n.clusters).reduce(((e,t)=>{var i;return[...e,...null!=(i=t.ids)?i:[]]}),[]).filter((e=>e.startsWith(ps)));if(!(null==a?void 0:a.length))return!1;const o=a[Math.floor(Math.random()*a.length)].replace(ps,"");this._prebidMethods.setBidderConfig({bidders:[te.Pubmatic],config:{ortb2:{user:{ext:{data:{eids:[{source:"mediawallah.com",uids:[{id:o}]}]}}}}}}),this._userSyncConfig.pubmaticBidderLevelEidSource="mediawallah-dcn"}constructor(e,t,i,s,n,r,a,o,l,d,c,h,u){super(),this._optableConfig=e,this._gpcConfig=t,this._ccpaConfig=i,this._fledgeConfig=s,this._userAgentConfig=n,this._siteConfig=r,this._optableStore=a,this._optableSdkWrapper=o,this._userIds=l,this._userIdTargeting=d,this._identityEventBus=c,this._prebidMethods=h,this._userSyncConfig=u,this._userIdSources=[{userId:this._userIds.get("id5Id"),variant:0},{userId:this._userIds.get("unifiedId"),variant:5},{userId:this._userIds.get("sharedId"),variant:6}],this._sspSources=[{source:"liveintent.sovrn.com",variant:1},{source:"pubmatic.com",variant:2},{source:"flashtalking.com",variant:4},{source:"crwdcntrl.net",variant:7},{source:"openx.net",variant:8},{source:"rubiconproject.com",variant:9}],this._identityValidators={e:Sn,i4:Sn,i6:Sn,p:Sn,c:Sn,c1:Tn(10),c2:En,c4:Cn,c5:En,c6:En,c7:Sn,c8:En,c9:Tn(10)}}}Ly=B([bn("OptablePiiPartner"),D(),j("design:type",Function),j("design:paramtypes",[void 0===Fa?Object:Fa,void 0===ja?Object:ja,void 0===Na?Object:Na,void 0===Id?Object:Id,void 0===mc?Object:mc,void 0===ur?Object:ur,void 0===Io?Object:Io,void 0===Ra?Object:Ra,void 0===dp?Object:dp,void 0===Ep?Object:Ep,void 0===Qn?Object:Qn,void 0===Mn?Object:Mn,void 0===pp?Object:pp])],Ly);class Dy extends cp{get enabled(){var e,t;return!this._config.gpc.gpcEnabled&&!this._config.ccpa.userOptedOut&&null!=(t=null==(e=this._userId)?void 0:e.enabled)&&t}async _getGdprConsent(){let e="tcunavailable";return"function"==typeof window.__tcfapi&&(e=await new Promise((t=>{window.__tcfapi("getTCData",2,(i=>{i&&i.tcString&&i.tcString.length?t(i.tcString):t(e)}))}))),`&gdpr=1&gdpr_consent=${e}`}async _pixelSync(e){let t="";this._config.gdpr.enabled&&(t=e?`&gdpr=1&gdpr_consent=${e}`:await this._getGdprConsent());const i=`https://pixel.rubiconproject.com/token?pid=49096${t}${this._config.ccpa.required?`&us_privacy=${this._config.ccpa.privacyString}`:""}`,s=new Image;s.src=i,s.style.display="none",s.alt="",document.body.appendChild(s)}processPii(e){this._prebidMethods.addToQueue((()=>{this.run(e)}))}run(e){var t;const i=null==(t=window.liQ_instances)?void 0:t[0],s=!!(null==i?void 0:i.ready),n=bs({source:e.source});if(s&&!n&&!fs(e.source)&&e.sha256Hash&&this._userId&&this._userId.id.params){let t=e.sha256Hash;t&&t.length>64&&(W.event("LiveIntentPiiPartner","run","Detected nested sha256Hash value. Attempting to extract value before sending to liveConnect."),t=this._retrieve64BitString(t)),this._userId.id.params.emailHash=t;const s=this.updateUserIds();this._prebidMethods.setConfig({userSync:{userIds:s}}),this._userIdEventBus.userIdNeedsRefresh.emit({options:{submoduleNames:[this._userId.id.name]},callback:()=>{}}),i.push({hash:null!=t?t:""})}}updateUserIds(){var e;return(null!=(e=this._prebidMethods.getConfig("userSync.userIds"))?e:[]).map((e=>(this._userId&&e.name===this._userId.id.name&&(e=this._userId.id),e)))}_retrieve64BitString(e){const t=e.match(/\w{64}/);return t?t[0]:void 0}constructor(e,t,i,s,n){super(),this._config=e,this._events=t,this._prebidMethods=i,this._userIdEventBus=n,this._name="liveIntentId",this._userId=s.get(this._name),this._config.gdpr.enabled?this._events.consentCaptured.on((e=>this._pixelSync(e))):this._pixelSync()}}Dy=B([D(),bn("LiveIntentPiiPartner"),j("design:type",Function),j("design:paramtypes",[void 0===_c?Object:_c,void 0===Ya?Object:Ya,void 0===Mn?Object:Mn,void 0===dp?Object:dp,void 0===er?Object:er])],Dy);class My extends Er{init(){this._key="DeclareBridgedUid2",this._lookup="DBUID2",this._default=!1}}My=B([bn("DeclareBridgedUid2"),M()],My);class By extends cp{get enabled(){var e,t;return!this._config.gpc.gpcEnabled&&!this._config.ccpa.userOptedOut&&null!=(t=null==(e=this._userId)?void 0:e.enabled)&&t}processPii(e){this._prebidMethods.addToQueue((()=>{this.run(e).catch((t=>{W.error("Uid2PiiPartner","processPii","Error processing PII",{pii:e,error:t})}))}))}async run(e){const t=Es(e.source),i=this._idGraphUid2Experiment.result;if("l_i"!==e.source&&"l_i-l_i"!==e.source){if(this._liveIntentUid2HemExperiment.result&&vs(e.source));else if(fs(e.source))return;if(!this._config.gdpr.enabled&&!this._config.uid2TokenCleanup.active&&e.sha256Hash){if(t)return this.setTTDUId2ServerToken(e,"raptive");if(i)return this.setTTDUId2ServerToken(e,"optable")}}}updateUserIds(){var e;return(null!=(e=this._prebidMethods.getConfig("userSync.userIds"))?e:[]).map((e=>(this._userId&&e.name===this._name&&(e=this._userId.id),e)))}async setTTDUId2ServerToken(e,t){if(Fs.readExternalLocalStorage(this._uid2ServerTokenKey))return;let i;try{"raptive"===t?i=await this._getTTDUId2ServerTokenFromRaptive(e):"optable"===t&&(i=await this._getTTDUId2ServerTokenFromOptable(e))}catch(e){return}i?(Fs.setExternalLocalStorage(this._uid2ServerTokenKey,i),this._setUid2WithUpdatedToken({token:i,declareBridged:this._shouldDeclareBridgedUid2(e.source)})):W.error("Uid2PiiPartner","setTTDUId2ServerToken",`No UID2 token returned from ${t}`)}_shouldDeclareBridgedUid2(e){return(bs({source:e})||vs(e))&&this._declareBridgedUid2Experiment.result}_getMacher(e){if(vs(e))return"liveintent.com";const t=il(e);return"truedata"===t?"truedata.com":"mediawallah"===t?"mediawallah.com":void 0}async _getTTDUId2ServerTokenFromOptable(e){try{var t,i,s;const n=await this._optableSdkWrapper.tokenize(`e:${e.sha256Hash}`);if(!(null==n||null==(t=n.user)?void 0:t.eids))return void W.error("Uid2PiiPartner","_getTTDUId2ServerTokenFromOptable","No User or Eids included in response");const r=n.user.eids.find((e=>"uidapi.com"===e.source));if(!r)return void W.error("Uid2PiiPartner","_getTTDUId2ServerTokenFromOptable","No uidapi.com EID included in response");const a=null==(s=r.uids)||null==(i=s[0])?void 0:i.ext;if(!(null==a?void 0:a.advertising_token))return void W.error("Uid2PiiPartner","_getTTDUId2ServerTokenFromOptable","No UID2 token or no advertising token included in response");if(a.provider="optable",this._shouldDeclareBridgedUid2(e.source)){a.matcher=this._getMacher(e.source);const t=Go(a.matcher);t&&this._googleAdManager.setTargetingFlag("uid2b",[t],!0)}return a}catch(e){return void W.error("Uid2PiiPartner","_getTTDUId2ServerTokenFromOptable","Failed to tokenize PII",e)}}async _getTTDUId2ServerTokenFromRaptive(e){return new Promise(((t,i)=>{if(!sl(e.sha256Hash))return W.event("Uid2PiiPartner","_getTTDUId2ServerTokenFromRaptive","piiData.sha256Hash is invalid type or length",{sha256Hash:e.sha256Hash}),i();const s=(new Date).setUTCHours(0,0,0,0),n=`${this._uid2Url}?format=email_hash&value=${e.sha256Hash}&optout_check=1&ts=${s}`;fetch(n).then((async e=>{const{body:s,status:n}=await e.json(),r=s;return"optout"===n?(Fs.deleteLocalStorage(this._uid2ServerTokenKey),i()):(null==r?void 0:r.advertising_token)?(r.provider="raptive",t(r)):i()})).catch((e=>(W.error("Uid2PiiPartner","_getTTDUId2ServerTokenFromRaptive","Failed to fetch uid2 token",e),i(e))))}))}_setUid2WithUpdatedToken(e){if(!e.token)return;const t=this._prebidMethods.getConfig("userSync.userIds");this._prebidMethods.setConfig({userSync:{userIds:t.map((t=>(t.name===this._name&&t.params&&(t.params.uid2Token=e.token,e.declareBridged&&(t.params.declareBridged=e.declareBridged)),t)))}}),this._userIdEventBus.userIdNeedsRefresh.emit({options:{submoduleNames:[this._name]},callback:()=>{this._userIdEventBus.uid2Refreshed.emit()}})}constructor(e,t,i,s,n,r,a,o,l){super(),this._config=e,this._prebidMethods=t,this._userIds=i,this._userIdEventBus=s,this._idGraphUid2Experiment=n,this._optableSdkWrapper=r,this._liveIntentUid2HemExperiment=a,this._declareBridgedUid2Experiment=o,this._googleAdManager=l,this._name="uid2",this._uid2ServerTokenKey="__uid2_server_token",this._uid2Url="https://ads.adthrive.com/api/v2/uid",this._userId=this._userIds.get(this._name)}}By=B([D(),bn("Uid2PiiPartner"),j("design:type",Function),j("design:paramtypes",[void 0===_c?Object:_c,void 0===Mn?Object:Mn,void 0===dp?Object:dp,void 0===er?Object:er,void 0===rp?Object:rp,void 0===Ra?Object:Ra,void 0===sp?Object:sp,void 0===My?Object:My,void 0===wc?Object:wc])],By);class Fy extends cp{init(){this._regulatoryValidation()}get enabled(){return!this._config.tkho.tracker.includes(this._name)&&!this._config.gpc.gpcEnabled&&!this._config.ccpa.userOptedOut}processPii(e){const t={...this._getHashedRecords(e.sha256Hash),...this._getGDPRConfig(e.consent),...this._getOptOut()};Ti().then((async()=>{await this._bootstrapConfig.bootstrapLoaders[Be.Amazon],this._amazonMethods.rpa(t)}))}_getHashedRecords(e=""){return{hashedRecords:[{type:"email",record:e}]}}_getGDPRConfig(e){const t=this._gdprEnabled;return{gdpr:{enabled:t,...t&&{consent:e}}}}_getOptOut(){return{optOut:this._userOptedOut}}_regulatoryValidation(){Fs.readExternalCookie(this._tokenKey)&&this._userOptedOut&&this._optOut()}_optOut(){this._amazonMethods.upa({hashedRecords:[],optOut:!0})}constructor(e,t,i){super(),this._config=e,this._amazonMethods=t,this._bootstrapConfig=i,this._name="amz",this._tokenKey="AMZN-Token",this._gdprEnabled=this._config.gdpr.enabled,this._userOptedOut=this._config.ccpa.userOptedOut}}Fy=B([bn("AmazonPublisherAudiencesPiiPartner"),D(),j("design:type",Function),j("design:paramtypes",[void 0===_c?Object:_c,void 0===Rc?Object:Rc,void 0===ka?Object:ka])],Fy);class jy extends cp{get enabled(){var e,t;return null!=(t=null==(e=this._userId)?void 0:e.enabled)&&t}processPii(e){this._prebidMethods.addToQueue((()=>{this.run(e)}))}run(e){if(this._userId&&e.sha256Hash&&this._userId.id.params){if(bs({source:e.source}))return;this._userId.id.params.hem=e.sha256Hash;const t=this.updateUserIds();this._prebidMethods.setConfig({userSync:{userIds:t}}),this._userIdEventBus.userIdNeedsRefresh.emit({options:{submoduleNames:[this._name]},callback:()=>{}})}}updateUserIds(){var e;return(null!=(e=this._prebidMethods.getConfig("userSync.userIds"))?e:[]).map((e=>(this._userId&&e.name===this._userId.id.name&&(e=this._userId.id),e)))}constructor(e,t,i){super(),this._prebidMethods=e,this._userIds=t,this._userIdEventBus=i,this._name="33acrossId",this._userId=this._userIds.get(this._name)}}jy=B([bn("ThirtyThreeAcrossPiiPartner"),D(),j("design:type",Function),j("design:paramtypes",[void 0===Mn?Object:Mn,void 0===dp?Object:dp,void 0===er?Object:er])],jy);class Ny extends Fn{start(){this.enabled&&(this._partners.forEach((e=>e.init&&e.init())),this._piiManager.init())}get enabled(){return!this._config.gpc.gpcEnabled&&!this._config.ccpa.userOptedOut}constructor(e,t,i,s,n,r,a,o,l,d,c,h,u,p,g){super(),this._config=e,this._context=t,this._piiManager=i,this._identityEventBus=s,this._idho=n,this._partners=[r,a,o,l,d,c,h,u,p,g].filter((e=>e.enabled&&!this._context.isWordPressLogin)),this._identityEventBus.dataCaptured.on((e=>{fs(e.source)&&!$o(this._idho,"liveIntentId")||this._partners.forEach((t=>{t.processPii(e)}))}))}}Ny=B([bn("PiiCaptureComponent"),D(),j("design:type",Function),j("design:paramtypes",[void 0===_c?Object:_c,void 0===Fr?Object:Fr,void 0===Iy?Object:Iy,void 0===Qn?Object:Qn,void 0===Bd?Object:Bd,void 0===Fy?Object:Fy,void 0===Oy?Object:Oy,void 0===Ry?Object:Ry,void 0===Py?Object:Py,void 0===Dy?Object:Dy,void 0===up?Object:up,void 0===Ly?Object:Ly,void 0===xy?Object:xy,void 0===By?Object:By,void 0===jy?Object:jy])],Ny);class Uy extends Fn{init(){this._slotManagerEventBus.displaying.on((e=>{const t=this._slots.get(e);wc.pushToQueue((()=>{t.forEach((e=>{this._setSlotTargeting(e)}))}))})),this._slotManagerEventBus.refreshing.on((e=>{const t=this._slots.get(e);wc.pushToQueue((()=>{t.forEach((e=>{this._setSlotTargeting(e)}))}))}))}_setSlotTargeting(e){if(!e||void 0===e.refreshCount||void 0===e.setTargeting)return;const t=`0${Math.min(e.refreshCount,this._maxSlotRefreshCount)}`.slice(-2);e.setTargeting({key:"refresh",value:t}),e.setTargeting({key:"nref",value:e.refreshCount.toString()})}constructor(e,t){super(),this._slotManagerEventBus=e,this._slots=t,this._maxSlotRefreshCount=4}}Uy=B([bn("RefreshCountComponent"),D(),j("design:type",Function),j("design:paramtypes",[void 0===nr?Object:nr,void 0===ra?Object:ra])],Uy);class Vy extends Er{init(){this._key="RefreshRebuild",this._lookup="REBUILDSLOT",this._default=!0}run(){return super.run()}}B([kn(),j("design:type",Function),j("design:paramtypes",[]),j("design:returntype",void 0)],Vy.prototype,"run",null),Vy=B([bn("RefreshRebuildExperiment"),M()],Vy);class zy extends Fn{init(){this._slotManagerEventBus.refreshing.on((e=>{this._slotManager.getSlots(e).filter(this.slotHasHighRefreshCountIncrement).forEach((e=>this._slotManager.rebuild(e)))}))}slotHasHighRefreshCountIncrement(e){return e.refreshCount%100==0}get enabled(){return this._refreshRebuildExperiment.result}constructor(e,t,i){super(),this._slotManager=e,this._refreshRebuildExperiment=t,this._slotManagerEventBus=i}}zy=B([bn("RefreshRebuildComponent"),D(),j("design:type",Function),j("design:paramtypes",[void 0===Kg?Object:Kg,void 0===Vy?Object:Vy,void 0===nr?Object:nr])],zy);class Hy extends Fn{init(){wc.pushToQueue((()=>{try{Object.keys(localStorage).filter((e=>e.startsWith("_GESPSK-"))).forEach((e=>{const t=Fs.readExternalLocalStorage(e);if(t){const e=JSON.parse(t)[1];e&&"string"==typeof e&&this._googleAdManager.setTargetingFlag("ssp_len",[e.length.toString()])}}))}catch(e){}this._prebidMethods.waitForQueue().then((e=>{if(!0===e){const e=this._mapIdsToEids();window.googletag.secureSignalProviders&&window.googletag.secureSignalProviders.push({networkCode:this._config.gam.networkCode,collectorFunction:async()=>{const t=(await this.fetchAsyncSignals(e)).obfuscate();return this._googleAdManager.setTargetingFlag("ssp_len",[t.length.toString()]),t}})}}))}))}_mapIdsToEids(){return this._prebidMethods.getUserIdsAsEids().filter((e=>this._ids.includes(e.source))).map((e=>{const{id:t,ext:i}=e.uids[0];return{source:e.source,data:t,...i&&"provider"in i&&{provider:i.provider},isPubCreated:!0}}))}fetchAsyncSignals(e){return Promise.resolve({obfuscate:()=>btoa(JSON.stringify({signals:[...e,{source:"mcmp",data:this._config.marmalade.mcmp,isPubCreated:!0},{source:"sens",data:this._config.site.sensitiveCategories,isPubCreated:!0}]}))})}constructor(e,t,i){super(),this._config=e,this._prebidMethods=t,this._googleAdManager=i,this._ids=["flashtalking.com","neustar.biz","media.net","liveintent.triplelift.com","liveintent.sovrn.com"]}}Hy=B([bn("SecureSignalsComponent"),D(),j("design:type",Function),j("design:paramtypes",[void 0===_c?Object:_c,void 0===Mn?Object:Mn,void 0===wc?Object:wc])],Hy);class $y extends Er{init(){const e=R.resolve(_c);this._key="SinglePageAppSupport_"+String(e.site.id),this._lookup="SPA_"+String(e.site.id),this._default=!1}}$y=B([bn("SpaMultiSiteExperiment"),M()],$y);class qy extends Er{init(){const e=R.resolve($y),t=e.key,i=e.lookup,s=this._coreExperimentConfig.getCoreExperiment(t,i);this._key=s?t:"SinglePageAppSupport";const n=R.resolve(_c);this._lookup="SinglePageAppSupport"===this._key?"SPA":"SPA_"+String(n.site.id),this.setABGroup(!!this.isEnabled(),"SinglePageAppSupport"===this._key?"spa":"spa_"+String(n.site.id)),this._default=!1}isEnabled(){return!0===R.resolve(_c).adOptions.spa&&super.isEnabled()}run(){return super.run()}}B([kn(),j("design:type",Function),j("design:paramtypes",[]),j("design:returntype",Object)],qy.prototype,"run",null),qy=B([bn("SinglePageAppManagerExperiment"),M()],qy);class Gy extends Fn{start(){this._addRouteChangeObserver(),this._setupRouteChangeListener()}get enabled(){return this._singlePageAppManagerExperiment.result}_setupRouteChangeListener(){this._spaEventBus.routeChanged.on((e=>{this._handleRouteChange().catch((e=>{W.error("SinglePageAppManagerComponent","routeChanged",e),this._isTransitioning=!1}))}))}_resetStatefulEmitters(){U.forEach((e=>{e.resetEmitted(),e.resetOnces()}))}async _handleRouteChange(){var e,t;const i=()=>{const e=Ys(document.location.href);return e&&e!==this._lastHref};if(this._isTransitioning=!0,this._config.disableAds.clear(),this._intersectionObserverManager.unobserveAll(!1),this._adInjectionMap.reset(),await Rn(this._routeChangeBufferDuration),i())throw new Error("Handler canceled after route change buffer.");if(this._slotManager.removeAllElements(),this._prebidActionManager.reset(),this._prebidMethods.clearAllAuctions(),this._slotManager.destroyAll(),this._refreshPageviewKey(),_n.resetTimeOrigin(),this._config.disableAds.init(),this._context.sessionKey=this._context.setSessionKey(),this._context.isFirstPageview=js(),this._context.pageUrl=window.location.href,await this._waitForPageMutations(),i())throw new Error("Handler canceled after page settled.");this._resetStatefulEmitters(),this._config.resetDynamicAds(),null==(e=this._config.clsOptions)||e.injectedSlots.splice(0,this._config.clsOptions.injectedSlots.length),null==(t=this._config.clsOptions)||t.injectedVideoSlots.splice(0,this._config.clsOptions.injectedVideoSlots.length),this._dynamicAdsComponent.start(),this._spaEventBus.resetCompleted.emit(),this._gam.setTargetingFlag("spa_rc",["1"]),this._isTransitioning=!1}_refreshPageviewKey(){const e=this._context.pageviewKey,t=On();return this._context.pageviewKey=t,this._gam.setTargeting({key:"pvk",value:t}),e}_addRouteChangeObserver(){if(!document.body)return void W.error("SinglePageAppManagerComponent","_addRouteChangeObserver","DOM is not ready");new MutationObserver(Co((e=>{const t=Ys(document.location.href);if(t&&this._lastHref!==t){try{this._spaEventBus.routeChanged.emit({to:t,from:this._lastHref})}catch(e){W.error("SinglePageAppManagerComponent","_addRouteChangeObserver",'Error while emitting "routeChanged" event',(e=>{let t;return t=e instanceof Error?e.message:String(e),t})(e))}this._lastHref=t}else this._isTransitioning&&this._hasPageContentMutated(e)&&(this._lastContentMutationTimestamp=Date.now())}),this._observerDebounceDuration,{leading:!0})).observe(document.body,{childList:!0,subtree:!0,attributes:!0})}async _waitForPageMutations(){try{return await Ln({condition:()=>Date.now()-this._lastContentMutationTimestamp>this._observerSettledDuration})}catch(e){return}}_hasPageContentMutated(e){return e.some((e=>{const t="childList"===e.type,i=e.addedNodes.length>0||e.removedNodes.length>0,s=e.target,n=(null==s?void 0:s.id.includes("AdThrive_"))||(null==s?void 0:s.id.includes("google_ad"));return t&&i&&!n}))}constructor(e,t,i,s,n,r,a,o,l,d,c){super(),this._config=e,this._context=t,this._spaEventBus=i,this._slotManager=s,this._prebidActionManager=n,this._prebidMethods=r,this._singlePageAppManagerExperiment=a,this._dynamicAdsComponent=o,this._intersectionObserverManager=l,this._gam=d,this._adInjectionMap=c,this._routeChangeBufferDuration=500,this._observerDebounceDuration=500,this._observerSettledDuration=1e3,this._lastContentMutationTimestamp=1/0,this._lastHref=Ys(document.location.href),this._isTransitioning=!1}}Gy=B([bn("SinglePageAppManagerComponent"),D(),j("design:type",Function),j("design:paramtypes",[void 0===_c?Object:_c,void 0===Fr?Object:Fr,void 0===ir?Object:ir,void 0===Kg?Object:Kg,void 0===If?Object:If,void 0===Mn?Object:Mn,void 0===qy?Object:qy,void 0===hv?Object:hv,void 0===la?Object:la,void 0===wc?Object:wc,void 0===Uf?Object:Uf])],Gy);class Wy extends Fn{start(){window.camAddRouteObserver&&window.camAddRouteObserver()}get enabled(){return!this._singlePageAppManagerExperiment.result}constructor(e){super(),this._singlePageAppManagerExperiment=e}}Wy=B([bn("CamSinglePageAppManagerComponent"),D(),j("design:type",Function),j("design:paramtypes",[void 0===qy?Object:qy])],Wy);class Ky extends Fn{start(){this._config.site.style&&this._config.site.style.length>0?Kf(this._config.site.style):this._context.styleUrl&&(e=>{const t=document.createElement("link");t.rel="stylesheet",t.type="text/css",t.href=e,document.head.appendChild(t)})(this._context.styleUrl)}constructor(e,t){super(),this._config=e,this._context=t}}Ky=B([bn("SiteStyleComponent"),D(),j("design:type",Function),j("design:paramtypes",[void 0===_c?Object:_c,void 0===Fr?Object:Fr])],Ky);class Yy extends Fn{init(){const e=this.getReferrer();null!==e&&this._gam.setTargeting({key:"doc_ref",value:e})}getReferrer(){const e=as(this._context.savedReferrer);return e&&e.length&&Fs.setExpirableInternalLocalStorage("adthrive_referrer",e,{expiry:{value:30,unit:"minutes"}}),e}constructor(e,t){super(),this._gam=e,this._context=t}}Yy=B([bn("TrafficSourceComponent"),D(),j("design:type",Function),j("design:paramtypes",[void 0===wc?Object:wc,void 0===Fr?Object:Fr])],Yy);class Xy extends Fn{init(){const e=Si(Fs.readInternalLocalStorage("adthrive_utm"),{});["utm_medium","utm_campaign","utm_session","utm_source"].forEach((t=>{const i=this._context.querystring.get(t),s=Si(i,e[t]);this._gam.setTargeting({key:t,value:s}),s&&(e[t]=s)})),Fs.setExpirableInternalLocalStorage("adthrive_utm",e,{expiry:{value:30,unit:"minutes"}})}constructor(e,t){super(),this._context=e,this._gam=t}}Xy=B([bn("UTMComponent"),D(),j("design:type",Function),j("design:paramtypes",[void 0===Fr?Object:Fr,void 0===wc?Object:wc])],Xy);class Qy{get adPlayMap(){return this._adPlayMap}get prerollNumber(){return this._prerollNumber}get adPodDuration(){return this._totalAdPodDuration}get adPodSize(){return this._prerollAdCountInPod}get maxAdPodSize(){return this._maxNumberOfAdsInPod}get canFallBackAuction(){return!this._isMax30SecPodFeatureEnabled&&this.adPodDuration<=30||this._isMax30SecPodFeatureEnabled&&1===this._prerollAdCountInPod}setAdPlayMap(e,t){this._adPlayMap.set(e,t)}reset(){this._adPlayMap=new Map,this.resetAdCountInPod()}resetAdCountInPod(){this._prerollAdCountInPod=0,this._totalAdPodDuration=0,this._numberOfVideoContentPlayed=0,this._currentAdPodFetchesCompleted=!1}_incrementPrerollAdCountInPod(){this._prerollAdCountInPod++,this._prerollAdCountInPod>=this._maxNumberOfAdsInPod&&(this._currentAdPodFetchesCompleted=!0)}incrementSessionPrerollNumber(){this._prerollNumber++,this._incrementPrerollAdCountInPod()}incrementVideoContentPlayCount(){this._numberOfVideoContentPlayed++}canApplyAdPodExperience(){return this._optimizeVideoPlayersForEarnings&&this._isCollapsible}canFetchNextAdInPod(){const e=this._currentAdPodFetchesCompleted,t=this.adPodDuration>=this._adPodAuctionCutoffSeconds,i=!e&&!t;return this._logCanFetchStatus(i,e,t),i}_logCanFetchStatus(e,t,i){}canPlayAdPodPrerollAd(){return!this._adPlayMap.has(this.prerollNumber)}isFirstInAdPod(){return 1===this._prerollAdCountInPod}isLastInAdPod(){return this._prerollAdCountInPod>=this._maxNumberOfAdsInPod}get shouldFetchNextAd(){return 1===this._maxNumberOfAdsInPod||this.shouldFetchNextAdAfterAdvancing()}shouldFetchNextAdAfterAdvancing(){return this._numberOfVideoContentPlayed>1||this.adPodDuration<=30}addCreativeDuration(e=30){this._totalAdPodDuration+=e}constructor({optimizeVideoPlayersForEarnings:e,isCollapsible:t,maxAdsInPod:i,adPodAuctionCutoffSeconds:s,isMax30SecPodFeatureEnabled:n}){this._optimizeVideoPlayersForEarnings=!1,this._isMax30SecPodFeatureEnabled=!1,this._adPlayMap=new Map,this._prerollNumber=0,this._prerollAdCountInPod=1,this._maxNumberOfAdsInPod=2,this._adPodAuctionCutoffSeconds=0,this._logPrefix="AdPodManager",this._currentAdPodFetchesCompleted=!1,this._numberOfVideoContentPlayed=0,this._totalAdPodDuration=0,this._optimizeVideoPlayersForEarnings=e,this._isCollapsible=!!t,this._maxNumberOfAdsInPod=null!=i?i:this._maxNumberOfAdsInPod,this._adPodAuctionCutoffSeconds=s,this._currentAdPodFetchesCompleted=1===this._maxNumberOfAdsInPod,this._isMax30SecPodFeatureEnabled=n}}Qy=B([bn("AdPodManager"),j("design:type",Function),j("design:paramtypes",["undefined"==typeof AdPodManagerParameters?Object:AdPodManagerParameters])],Qy);class Jy{beforeBidRequest(e=!1,t=!0){this.enabled&&(e||1!==this._currentAuctionNumber?this._isSecondAuctionWithFallback(e,t)&&this._setupSecondAuctionAdUnits():this._setupFirstAuctionAdUnits())}get enabled(){return this._enabledViaExperiment&&this._optimizeForEarnings&&this._prioritizeShorterVideoAds&&this._isCollapsible}get currentAuctionNumber(){return this._currentAuctionNumber}get hasFallenBack(){return this._hasFallenBack}get amznAdUnitName(){return this._amznAdUnitName}setAmznBids(e){this._amzBids=e}setPrebidBids(e){this._prebidBids=e}incrementCurrentAuctionNumber(){this._currentAuctionNumber++}reset(){this._hasFallenBack=!1,this._currentAuctionNumber=0,this._amzBids=[],this._prebidBids=[],this._amznAdUnitName=this._getInitialAmznAdUnitName()}_setupFirstAuctionAdUnits(){const e=this._getInitialAmznAdUnitName();this._updatePrebidAdUnitForNextAuction(this._firstBidDuration),this._updateAmznAdUnitForNextAuction(e)}_setupSecondAuctionAdUnits(){this._updatePrebidAdUnitForNextAuction(this._fallbackDuration),this._updateAmznAdUnitForNextAuction(this._name),this._hasFallenBack=!0}_getInitialAmznAdUnitName(){return this.enabled?`${this._name}_15s`:this._name}_updateAmznAdUnitForNextAuction(e){this._amznAdUnitName=e}_updatePrebidAdUnitForNextAuction(e){var t;const i=this._prebidMethods.getAdUnit(this._name);(null==i||null==(t=i.mediaTypes)?void 0:t.video)&&(i.mediaTypes.video.maxduration=e)}_shouldIncrementMaxDuration(){if(0===this._currentAuctionNumber)return!1;const e=0===this._prebidBids.length,t=0===this._amzBids.length;return e&&t}_isSecondAuctionWithFallback(e,t){return e||2===this._currentAuctionNumber&&this._shouldIncrementMaxDuration()&&t}constructor(e,t,i,s){this._firstBidDuration=15,this._currentAuctionNumber=0,this._amzBids=[],this._prebidBids=[],this._prioritizeShorterVideoAds=!1,this._optimizeForEarnings=!1,this._hasFallenBack=!1,this._enabledViaExperiment=!1,this._logPrefix="VideoAuctionManager",this._isCollapsible=!!s,this._name=e,this._prebidMethods=t,this._fallbackDuration=i.video.maxDuration,this._prioritizeShorterVideoAds=i.adOptions.prioritizeShorterVideoAds,this._optimizeForEarnings=i.adOptions.optimizeVideoPlayersForEarnings,this._enabledViaExperiment=R.resolve(bd).result,this._amznAdUnitName=this._getInitialAmznAdUnitName()}}class Zy{init(e){this.setup(e)}constructor(){}}class eb{logEvents(e,t){this._logPlayerPlayEvents(e,t),this._logPlayerPauseEvents(e,t),this._logPlayerMuteEvents(e,t),this._logPlayerVolumeEvents(e,t),this._logPlayerSeekEvents(e,t)}_logPlayerPlayEvents(e,t){e.on("play",(e=>this._onPlayerPlayEvent(e,t)))}_logPlayerPauseEvents(e,t){e.on("pause",(e=>this._onPlayerPauseEvent(e,t)))}_logPlayerMuteEvents(e,t){e.on("mute",(e=>this._onPlayerMuteEvent(e,t)))}_logPlayerVolumeEvents(e,t){e.on("volume",(e=>this._onPlayerVolumeEvent(e,t)))}_logPlayerSeekEvents(e,t){e.on("seek",(e=>this._onPlayerSeekEvent(e,t)))}_onPlayerPlayEvent(e,t){"interaction"===e.playReason&&W.event("JwPlayer","play",t)}_onPlayerPauseEvent(e,t){"interaction"===e.pauseReason&&W.event("JwPlayer","pause",t)}_onPlayerMuteEvent(e,t){W.event("JwPlayer","mute",{mute:e.mute,...t})}_onPlayerVolumeEvent(e,t){}_onPlayerSeekEvent(e,t){}}eb=B([M()],eb);class tb extends Zy{get name(){return`${this._name}`}get amzName(){return this._auctionManager.amznAdUnitName}get collapsible(){return this._isCollapsible}get mediaOrPlaylistId(){return this._mediaOrPlaylistId}get playerContainer(){return this._playerContainer}get playerContainerId(){return`${this._playlistId}_${this._mediaIdCount}`}get playerElement(){return this._playerElement}get prerollNum(){return this._adPodManager.prerollNumber}get size(){return this._size}set videoAdUnit(e){this._videoAdUnit=e}get videoAdUnit(){return this._videoAdUnit}set lastAuctionBidDetails(e){this._lastAuctionBidDetails=e}get lastAuctionBidDetails(){return this._lastAuctionBidDetails}get eligibleFloorComponents(){return this._eligibleFloorComponents}set eligibleFloorComponents(e){this._eligibleFloorComponents=e}get appliedFloorComponents(){return this._appliedFloorComponents}set appliedFloorComponents(e){this._appliedFloorComponents=e}setAmznBids(e){this._auctionManager.setAmznBids(e)}setPrebidBids(e){this._auctionManager.setPrebidBids(e)}getMinMaxDurationsForGAM(){if(this._auctionManager.enabled)return this._auctionManager.hasFallenBack||this._retryAttempts>0?void 0:{min_ad_duration:1e3,max_ad_duration:15e3}}getJwBoostTargeting(){return{playerID:this._playlistId,...(this.name===et.Video_In_Post_ClicktoPlay_SoundOn||this.name===et.Video_Individual_Autoplay_SOff)&&{mediaID:this._playlistId}}}get transactionId(){return this._transactionId}set transactionId(e){this._transactionId=e}set userIdTargetingData(e){this._userIdTargetingData=e}get userIdTargetingData(){return this._userIdTargetingData}get vp(){return this.prerollNum<=1?this.prerollNum:this.prerollNum<=9?2:3}get retryAttempts(){return this._retryAttempts}get isPlayerType(){return this._playerType}init(){this.setup()}getDefaults(){return this._defaults}setDefaults(e){this._defaults=e}setIsRunningAdPlay(e){this._isRunningAdPlay=e}getIsRunningAdPlay(){return this._isRunningAdPlay}_createCollapsibleCollection(e){const{playerElement:t,playerContainer:i,footerElement:s,stickyElement:n,mobileHeaderSelector:r}=e;this.collapseCollection={playerInstance:this.playerInstance,playerType:this._playerType,playerState:this._state,playerContainer:i,playerElement:t,topBackgroundElement:this._topBackgroundElement,footerElement:s,stickyElement:n,closeButton:this._closeButton,forceMobile:"desktop"!==this._context.device,isMobile:this._isMobile,collapseType:this._collapseType,collapseMobileSizeType:this._collapseMobileSizeType,collapseSubType:st,collapseMobileSubType:this._getCollapseMobileSubType(),mobileHeaderSelector:r,collapseTimer:{timeCollapsed:0,isRunning:!1},mediaStarted:!1,desktopCollapseOnScrollUp:this._desktopCollapseOnScrollUp,mobileCollapseOnScrollUp:this._mobileCollapseOnScrollUp,hasPreviouslyCollapsed:this._hasPreviouslyCollapsed,getIsRunningAdPlay:()=>this.getIsRunningAdPlay()}}_resetAdVars(){this._bidMarkedOnCurrentAd=!1,this._adDetails=null,this._nextAdFetched=!1,this._adDurationLogged=!1,this._currentAdTime=0,this._currentAdDurationWithBuffer=0,this._pendingBidRequests.length=0,this._clearStaleTimers(),this._lastAdSuccessful=!0,this._retryAttempts=0,this.setIsRunningAdPlay(!1),this._advanceInProgress=!1,this._auctionManager.reset()}async _handleNextAdFetch(){this._nextAdFetched=!0,this._advanceInProgress=!0,this._adPodManager.canApplyAdPodExperience()&&this._adPodManager.resetAdCountInPod(),await this._doubleFetchBids()}async _checkForConsent(){const e=this._config.gdpr;!e.consentCaptured&&e.enabled&&await this.waitForConsent()}async _inViewPlayAd(){await this._checkForConsent(),await this._fetchBids(),this._triggerAdPlay()}_setPlayerVersions(){const e=new RegExp("^[0-9]+.[0-9]+.[0-9]+"),t=this.playerInstance,i=e.exec(t.version);this.jwVersion=i&&i[0],this.imaVersion=t.plugins&&t.plugins.googima&&t.plugins.googima.version}_getPlayerVersions(){return{imaSDKVersion:this.imaVersion,jwVersion:this.jwVersion}}async _doubleFetchBids(){this._adPodManager.incrementSessionPrerollNumber(),await this._fetchBids(),await this._fetchBids()}_fetchBids(e=!1){if(this._auctionManager.enabled)return this._manageAuction(e);if(this._pendingBidRequests.length<2){const e=this.requestVideoBids([this]);if(e)return this._pendingBidRequests.push(e),e}}async _manageAuction(e){if(this._auctionManager.currentAuctionNumber>=2)return;this._auctionManager.incrementCurrentAuctionNumber(),2===this._auctionManager.currentAuctionNumber&&await this._pendingBidRequests[0],this._auctionManager.beforeBidRequest(e);const t=this.requestVideoBids([this]);return t?(this._pendingBidRequests.push(t),t):void 0}_playerReady(e){this._startTearDownTimer(),this._configureQuality(),this._setPlayerVersions(),this.playerInstance.on("playlistItem",(e=>{this._handleTitleLinkWrapper(e)}))}_jwSetup(e){const t={...this._defaults,...this._baseConfig,...e};if(this.playerInstance.setup)try{this.playerInstance.setup(t),this._handleNonLinearAd(),this._setupEventListeners()}catch(e){W.error("InstreamPlayer","jwSetup","Unexpected issue while setting up JWPlayer",{playerId:this._playerId,err:e})}else W.error("InstreamPlayer","jwSetup","Unexpected issue while setting up JWPlayer",{playerId:this._playerId})}_handleNonLinearAd(){this.playerInstance.on("adImpression",(e=>{const t=ln(e.ima,"ad")?e.ima.ad:null,i=this._getAdDetailsFromAd(t);if(i&&ln(i,"linear")&&!1===i.linear||"nonlinear"===e.linear){this.playerInstance._nonLinearAd=!0,this.playerInstance.pause();const e=document.getElementById(`${this._playlistId}`),t=e.querySelector("div > div.jw-overlays.jw-reset");t.style.backgroundColor="black";const i=e.querySelector("div.jw-wrapper.jw-reset > div.jw-controls.jw-reset");i.style.zIndex="-1",this.playerInstance.once("adComplete",(()=>{this.playerInstance._nonLinearAd=!1,t.style.backgroundColor="transparent",i.style.zIndex="",this.playerInstance.play()}))}}))}async _handleScroll(){await this._checkForConsent(),this.collapseCollection&&(this._isFirstPlay&&!this.getIsRunningAdPlay()&&await this._fetchBids(),sy.handleScroll(this.collapseCollection))}_handleResize(){this.collapseCollection&&sy.handleResize(this.collapseCollection)}_handlePageVisibilityChange(e){this.collapseCollection&&sy.handlePageVisibilityChange(e,this.collapseCollection)}_displayCloseButton(){this.collapseCollection&&sy.displayCloseButton(this.collapseCollection)}_onCloseClick(){this.collapseCollection&&(this._saveVideoCloseState&&Fs.setExpirableInternalLocalStorage("adthrive_video_closed",!0,{expiry:{value:30,unit:"minutes"}}),sy.handleClose(this.collapseCollection,this.prerollNum))}_handleUserClick(){this.collapseCollection&&sy.handleUserClick(this.collapseCollection)}_handleWidthBreak(e){this.collapseCollection&&sy.handleWidthBreak(e,this.collapseCollection)}_handleVideoPlayingEvent({playlistId:e,mediaIdCount:t,wasClicked:i}){e===this._playlistId&&t===this._mediaIdCount||(this.collapseCollection?sy.handleOtherVideoPlaying(this.collapseCollection):i&&this.playerInstance.pause(!0))}_handleTitleClick(e){this.collapseCollection.collapseTimer.firstInView&&W.event("jw-player","handleTitleClick",{timeElapsed:Date.now()-this.collapseCollection.collapseTimer.firstInView.valueOf(),link:e.currentTarget.getAttribute("href")})}_handleFooterResponseReceivedEvent(){this.collapseCollection&&sy.repositionCollapseMobileBottom(this.collapseCollection)}_configureQuality(){Bi()||this.playerInstance.on("levels",(e=>{this.playerInstance.setCurrentQuality(e.levels.length-1)}))}_createPlayerCloseButton(){var e;const t=this._wrapperTitleWrapperElement||this._videoTitleElement;return this._closeButton=this._videoCloseButtonComponent.createPlayerCloseButton(this._onCloseClick.bind(this),"instream","adthrive-collapse-close",!!t,this.isTopCenterCollapse()?"top-center":null==(e=this.collapseCollection)?void 0:e.collapseType),this._closeButton}_createPlayerCollapseBackgroundElement(){const e=document.createElement("div");return e.classList.add("adthrive-collapse-mobile-background"),e.style.backgroundColor=this._config.adOptions.bgColor,e.style.width=`${window.innerWidth}px`,e.style.display="inline",e.style.height="0",e}_createLinkIcon(e){const t=document.createElementNS("http://www.w3.org/2000/svg","svg");t.setAttribute("width","24"),t.setAttribute("height","24"),t.setAttribute("style","margin-bottom:6px");const i=document.createElementNS("http://www.w3.org/2000/svg","path");return i.setAttribute("d","M 16 1 H 23 V 8 Z M 19.5 12.5 V 23 H 1 V 4.5 H 12 l 1 1 H 2 V 22 H 18.5 V 11.5 l 1 1 v 1 M 19 4 L 11.5 11.5 l 1 1 L 20 5"),i.setAttribute("stroke","white"),i.setAttribute("stroke-width","2"),i.setAttribute("stroke-linejoin","round"),t.appendChild(i),t.id=`${e}-svg-link`,t}_createLearnMoreLink(e){const t=document.createElement("a");return t.classList.add("adthrive-learn-more-link"),t.innerText="Tap here to learn more.",t.style.setProperty("color",this._config.adOptions.secColor),t.id=`${e}-learn-more-link`,t}_createPlayerWrapper(e){if(e){this._wrapperTitleWrapperElement=document.createElement("a");const e=this._createLinkIcon(this._playlistId);this._wrapperTitleWrapperElement.appendChild(e)}else this._wrapperTitleWrapperElement=document.createElement("div");this._videoTitleElement=document.createElement("span"),this._videoTitleElement.id="video-title-text";const t=document.createElement("div"),i=document.createElement("div");return i.className="adthrive-wrapper-title-wrapper",this._videoTitleElement.classList.add("adthrive-video-text-cutoff"),this._videoTitleElement.classList.add("adthrive-video-title"),this._wrapperTitleWrapperElement.className="adthrive-video-text-cutoff",this._wrapperTitleWrapperElement.appendChild(this._videoTitleElement),this._wrapperTitleWrapperElement.target="_blank",this._wrapperTitleWrapperElement.onclick=this._handleTitleClick.bind(this),this._closeButton=this._createPlayerCloseButton(),i.appendChild(this._wrapperTitleWrapperElement),t.className="adthrive-wrapper-bar",t.appendChild(i),t.appendChild(this._closeButton),t}_createTopCollapseWrapper(e=!0){const t=document.createElement("div");t.className="adthrive-top-collapse-wrapper-bar",this._closeButton=this._createPlayerCloseButton();const i=document.createElement("div");i.className="adthrive-top-collapse-close-spacer",i.appendChild(this._closeButton),t.appendChild(i);const s=document.createElement("a");if(this._topCollapseVideoTitleElement=document.createElement("span"),this._topCollapseVideoTitleElement.classList.add("adthrive-top-collapse-wrapper-video-title"),this._topCollapseVideoTitleElement.style.color=this._config.adOptions.secColor,s.appendChild(this._topCollapseVideoTitleElement),e){const e=this._createLearnMoreLink(this._playlistId);s.appendChild(e),s.onclick=this._handleTitleClick.bind(this)}return t.appendChild(s),this._wrapperText=s,t}_trimEventData(e){var t,i;const s={...e},n=s.ima&&s.ima.ad&&this._getAdDetailsFromAd(s.ima.ad);return(null==s?void 0:s.tag)&&delete s.tag,n&&n.traffickingParameters&&delete n.traffickingParameters,(null==s||null==(i=s.ima)||null==(t=i.userRequestContext)?void 0:t.adTagUrl)&&delete s.ima.userRequestContext.adTagUrl,(null==s?void 0:s.mediaFile)&&delete s.mediaFile,s}_handleOneVideoContentPlaylist(){this.playerInstance.pause(),this.playerInstance.seek(0),this.setIsRunningAdPlay(!1),this._adPodManager.canApplyAdPodExperience()&&!this._adPodManager.canPlayAdPodPrerollAd()?this.playerInstance.play():this.playerInstance.once("firstFrame",(()=>{this._triggerAdPlay()})),this.playerInstance.trigger("firstFrame",{loadTime:0,viewable:1}),this._adPodManager.canApplyAdPodExperience()&&this._adPodManager.incrementVideoContentPlayCount()}_handleNextButton(){this._calledNextVideo=!0,this._removeSkipContainer(),this._isAdvancePlaylist&&1===this.playerInstance.getPlaylist().length?this._handleOneVideoContentPlaylist():this.playerInstance.next()}_handleNextButtonClick(){const e={playerType:this._playerType,mediaId:this.mediaOrPlaylistId,playlistIndex:this.playerInstance.getPlaylistIndex()};W.event("JwPlayer","nextButtonClicked",e),this._handleNextButton()}_handleStayButtonClick(){const e={playerType:this._playerType,mediaId:this.mediaOrPlaylistId,playlistIndex:this.playerInstance.getPlaylistIndex()};W.event("JwPlayer","stayButtonClicked",e)}_createNavButton(e){const t=document.createElement("div"),i=document.createElement("span");return t.id=`${e}-video`,i.textContent=e,t.appendChild(i),ji(15)||ji(16)||((e=navigator.userAgent)=>hi(e)&&Bi(e))()||t.classList.add("video-box-shadow"),t}_createSkipContainer(){const e=document.createElement("div");e.id="next-stay-container",e.classList.add("active");const t=this._createNavButton("next");t.onclick=this._handleNextButtonClick.bind(this),e.appendChild(t);const i=this._createNavButton("stay");return i.onclick=this._handleStayButtonClick.bind(this),e.appendChild(i),e}_initSkipContainer(){const e=this._canApplyAdvancePlaylistOptimizations()&&this._advancePlaylistDelayExperiment.result?this._advancePlaylistDelayExperiment.result:25,t=5+e+10,i=e;this.playerInstance.on("time",(({position:s,duration:n})=>{if(!this._canSkip||this.playerInstance._nonLinearAd||this._wasClicked||n<5)return;const r=n=n-5:s>=e,o=r?s>=n:s>=e+5,l=r?s>=n:s>=i;if(!this._skipContainer&&l&&!this._nextAdFetched){(!this._adPodManager.canApplyAdPodExperience()||this._adPodManager.shouldFetchNextAdAfterAdvancing())&&this._handleNextAdFetch()}!this._skipContainer&&a?(this._skipContainer=this._createSkipContainer(),this.playerInstance.getContainer().appendChild(this._skipContainer),getComputedStyle(this._skipContainer).backgroundColor&&this._skipContainer.classList.add("loaded")):this._skipContainer&&!this._calledNextVideo&&o&&(this._handleNextButton(),this._advanceInProgress=!1)}))}_handleVideoPlayerClicked(e){this._logAdvancePlaylistCancelled(e),this._wasClicked=!0,this._removeSkipContainer()}_logAdvancePlaylistCancelled(e){if(!this._canSkip||this.playerInstance._nonLinearAd||this._wasClicked)return;if(e.composedPath().some((e=>["next-video","stay-video"].includes(e.id))))return;const t={playerType:this._playerType,mediaId:this.mediaOrPlaylistId,playlistIndex:this.playerInstance.getPlaylistIndex()};W.event("JwPlayer","advancePlaylistCancelled",t)}_removeSkipContainer(){this._skipContainer&&this._skipContainer.parentNode&&(this._skipContainer.parentNode.removeChild(this._skipContainer),this._skipContainer=void 0)}_handleFirstFrame(){this._calledNextVideo=!1,this._wasClicked=!1}_getCollapseMobileSubType(){return this._mobileStickyPlayerPositionSiteExperiment.enabled&&"control"!==this._mobileStickyPlayerPositionSiteExperiment.result?sc.setMobileLocation(this._mobileStickyPlayerPositionSiteExperiment.result):this._mobileStickyPlayerPositionCoreExperiment.mobileLocation?sc.setMobileLocation(this._mobileStickyPlayerPositionCoreExperiment.mobileLocation):this._mobileLocation}get _isTopCollapse(){return"adthrive-collapse-top-center"===this._getCollapseMobileSubType()}isTopCenterCollapse(){return this._collapseType===tt.Mobile&&this._isTopCollapse}_createTopCenterBackground(e){this._topBackgroundElement=this._createPlayerCollapseBackgroundElement(),e.appendChild(this._topBackgroundElement)}_clearStaleTimers(){this._stalePlayerTimer&&(clearTimeout(this._stalePlayerTimer),this._stalePlayerTimer=null)}_listenForLargeVastError(){this._prebidEventBus.vastExceededLimit.on((e=>{const t={meta:e.bids[0].meta,bidder:e.bids[0].bidder,adId:e.bids[0].adId,creativeId:e.bids[0].creativeId,responseSize:e.responseSize,maxSizeAllowed:e.maxSizeAllowed};W.error("JwPlayer","listenForLargeVastError",t)}))}_getErrorLogAdDetails(){return(({wrapperIds:e,wrapperCreativeIds:t,wrapperSystems:i,vastCreativeId:s,mediaFileURL:n,adId:r,adUnitName:a,adomain:o,hb_bidder:l,amznp:d,hb_pb:c,hb_crid:h,amznbid:u,hb_deal:p})=>({wrapperIds:e,wrapperCreativeIds:t,wrapperSystems:i,vastCreativeId:s,mediaFileURL:n,adId:r,adUnitName:a,adomain:o&&encodeURIComponent(o),hb_bidder:l,amznp:d,hb_pb:c,hb_crid:h,amznbid:u,hb_deal:p}))(this._adDetails||{})}_setStaleAdDetection(){const e=this._currentAdDurationWithBuffer-this._currentAdTime;this._stalePlayerTimer||(this._stalePlayerTimer=window.setTimeout((()=>{W.error("JwPlayer","stalePlayer",{message:"JwPlayer encountered an unknown error during ad play",...this._getPlayerVersions(),...this._getErrorLogAdDetails()}),-1===this._tearDownPlayerTimeout?(this._enableTearDown(),this._tearDownPlayer()):this.playerInstance.playlistItem(this.playerInstance.getPlaylistIndex())}),1e3*e))}_getJwEventLog(e){return{playerName:this._name,rawData:this._trimEventData(e)}}_tearDownPlayer(){if(this._tearDownAfterNextAd){var e;const t={adUnit:this._name,playerType:this._playerType,playerId:this._playerId,mediaId:this.mediaOrPlaylistId,state:this._state,collapseState:null==(e=this.collapseCollection)?void 0:e.playerState,vp:this.prerollNum};W.event("JwPlayer","tearDownPlayer",t),this._tearDownAfterNextAd=!1,this._tearDownTimer&&clearTimeout(this._tearDownTimer),this.playerInstance.remove(),this.setPlayerInstance(this),this._handleScroll(),this._adPodManager.reset(),this.setIsRunningAdPlay(!1)}}_enableTearDown(){this._tearDownAfterNextAd=!0}_startTearDownTimer(){const e=this._tearDownPlayerTimeout;this._canTearDown&&(this._tearDownTimer=window.setTimeout(this._enableTearDown.bind(this),e))}_excludedErroredOutAdIdsFromGamAuction(){if(this.name){this._prebidMethods.getBidResponsesForAdUnitCode(this.name).bids.forEach((e=>{this._erroredOutAdIds.has(e.adId)&&this._prebidMethods.markWinningBidAsUsed({adUnitCode:this.name,adId:e.adId})}))}}_handleErrors(){["adError","setupError","error"].forEach((e=>{this._bidMarkedOnCurrentAd=!1;const t="adError"===e;this.playerInstance.on(e,(i=>{if(this._clearStaleTimers(),!this._adDetails){const e="tag"in i&&i.tag||"";this._addAdDetailFields(e),this._adDetails={...this._additionalAdFieldsLegacy,adUnitName:this._name,tag:e,isEmpty:!0}}if(900===i.code&&this._eventProxy.emitVideoSlotRenderedEvent(this._adDetails),"setupError"===e&&this._preventCollapse(),W.error("JwPlayer",e,{code:i.code,...t&&{message:i.message,adErrorCode:i.adErrorCode},...this._getJwEventLog(i)}),t){const e=this._adPodManager,t=!e.canApplyAdPodExperience()||e.isFirstInAdPod();this._checkRenderedAdDetails(!0),this._adDetails.adId&&this._erroredOutAdIds.add(this._adDetails.adId),this._lastAdSuccessful=!1,e.setAdPlayMap(this.prerollNum,!1),this.setIsRunningAdPlay(!1);const s={message:i.message,code:i.code,adErrorCode:i.adErrorCode,...this._getPlayerVersions(),...this._getErrorLogAdDetails()};W.error("JwPlayer","vastError",s),t&&this._adFailedLogic()}}))}))}_handleAdSkipped(){this.setIsRunningAdPlay(!1),this._adPodManager.canApplyAdPodExperience()&&this._adPodManager.canPlayAdPodPrerollAd()&&this._runAdPodPrerollAd()}_handleAdComplete(){this.setIsRunningAdPlay(!1),this._tearDownPlayer(),this._adPodManager.canApplyAdPodExperience()&&this._adPodManager.canPlayAdPodPrerollAd()&&this._runAdPodPrerollAd()}_handleTimeEvents(){this.playerInstance.on("beforeComplete",(()=>{this._resetAdVars(),this.playerInstance._nonLinearAd=!1})),this.playerInstance.on("time",(({position:e,duration:t})=>{if(t-e<10&&!this._nextAdFetched){(!this._adPodManager.canApplyAdPodExperience()||this._adPodManager.shouldFetchNextAdAfterAdvancing())&&this._handleNextAdFetch()}})),this.playerInstance.on("adTime",(e=>{if(this._currentAdTime=e.position,this._config.video.logAdDuration&&!this._adDurationLogged){const t={adDuration:e.duration,roundedAdDuration:Math.round(e.duration)};W.event("VideoManager","VideoAdDuration",t),this._adDurationLogged=!0}})),this.playerInstance.on("adSkipped",(()=>this._handleAdSkipped())),this.playerInstance.on("adComplete",(()=>this._handleAdComplete()))}_canApplyAdvancePlaylistOptimizations(){return!Ur.isRolloutEnabled("disable-adv-playlist-optimization")}_shouldPlayAd(){return!this.getIsRunningAdPlay()&&this._shouldPlayPrerollAds()}async _triggerAdPlay(){await this._checkForConsent(),this._shouldPlayAd()&&(this._playLinearAd(),this._isFirstPlay=!1)}_handleVideoEvents(){this.playerInstance.on("playlistItem",(({item:e})=>{var t;this._mediaOrPlaylistId=null!=(t=e.mediaid)?t:"nf",this.setIsRunningAdPlay(!1),this._isFirstPlay||this._adPodManager.incrementVideoContentPlayCount()})),["play","adPlay","pause","adSkipped","adPause"].forEach((e=>{const t="play"===e,i="adPlay"===e,s="pause"===e,n="adPause"===e,r="adSkipped"===e;this.playerInstance.on(e,(e=>{if((t||n||r)&&(this._clearStaleTimers(),n&&this.playerInstance.once("adPlay",(()=>{0!==this._currentAdTime&&this._setStaleAdDetection()}))),(t||i)&&(this._eventProxy.emitVideoPlayingEvent(0,this._playlistId,this._wasClicked,this._mediaIdCount),i&&this._checkRenderedAdDetails()),t||s){const t="pauseReason"in e&&e.pauseReason||"playReason"in e&&e.playReason&&!this._calledNextVideo;t&&"interaction"===t&&this._handleUserClick()}})),(t||i)&&this.collapseCollection&&this.playerInstance.once(e,(()=>{this.collapseCollection.mediaStarted=!0,this._handleScroll()}))})),this.playerInstance.on("beforePlay",(()=>{this._shouldPlayAd()&&(this.playerInstance.pause(),this._triggerAdPlay())})),document.addEventListener("slick-auth-dialog-opened",(()=>{this._playerElement.classList.add(this._hiddenClassName),this.collapseCollection&&this.playerInstance.pause()})),document.addEventListener("slick-auth-dialog-closed",(()=>{var e;this._playerElement.classList.remove(this._hiddenClassName);const t=(null==(e=this.collapseCollection)?void 0:e.playerState)!==lt;this.collapseCollection&&t&&this.playerInstance.play(!0)}))}_checkRenderedAdDetails(e=!1){const t=this._prebidAuctionManager,i=this._adDetails;if("off"!==this._instreamRerequestOnErrorResult&&(this._bidMarkedOnCurrentAd=!1),!t||!i||this._bidMarkedOnCurrentAd)return;const s=i.gamCreativeId,n=i.wrapperSystems;this._markPrebidBidAsUsed(s,t,n,e)}_markPrebidBidAsUsed(e="",t,i=[],s=!1){const n=e&&t.videoCreativeIdMapping.get(e);let r=!1,a=!1,o=!1;if(i.forEach((e=>{const t=e.toLowerCase();"gdfp"===t&&(a=!0),"prebid.org wrapper"===t?r=!0:"amazon"===t&&(o=!0)})),n){const e=this._adDetails,t=(e&&e.tag&&this._getCustParamsFromQueryString(e.tag)||{})[`hb_adid_${n}`.substring(0,20)];t&&(this._prebidMethods.markWinningBidAsUsed({adUnitCode:this.name,adId:t,...!s&&{analytics:!0}}),this._bidMarkedOnCurrentAd=!0,s?this._creativeFailureDetection(t):this._logCreativeIdWithPreviousError(t))}else e||(r||a&&!o||!i.length)&&(this._bidMarkedOnCurrentAd=!0,this._prebidMethods.markWinningBidAsUsed({adUnitCode:this.name,...!s&&{analytics:!0}}))}_creativeFailureDetection(e){const t=this._config,i=this._prebidMethods.getBidResponsesForAdUnitCode(this.name).bids||[],s=t.video.instreamCreativeFailureThreshold;for(const n of i)if(n.adId===e&&n.creativeId&&!t.prebid.blockedCreativeIds.includes(n.creativeId)){let e=this._erroredOutCreativeIds.get(n.creativeId.toString())||0;e++,this._erroredOutCreativeIds.set(n.creativeId.toString(),e),e>=s&&t.prebid.blockedCreativeIds.push(n.creativeId);break}}_logCreativeIdWithPreviousError(e){const t=this._prebidMethods.getBidResponsesForAdUnitCode(this.name).bids||[];for(const i of t)if(i.adId===e&&i.creativeId){(this._erroredOutCreativeIds.get(i.creativeId.toString())||0)&&W.event("JWPlayer","_logCreativeIdWithPreviousError",{creativeId:i.creativeId});break}}_getCustParamsFromQueryString(e){const t=e&&Ri(e.split("?")[1]),i=t&&t.get("cust_params");return i&&Li(this._getDecodedURI(i))}_getDecodedURI(e){try{return decodeURIComponent(e)}catch(e){return""}}_getAdDetailsFromAd(e){return e&&Object.keys(e).length>0?e[Object.keys(e)[0]]:null}_handleAdTrackingEvents(){this.playerInstance.on("adLoaded",(e=>{const t=e.ima&&e.ima.ad&&this._getAdDetailsFromAd(e.ima.ad),i=t&&t.duration||e.duration||this._defaultAdDuration;this._currentAdDurationWithBuffer=i+this._adTimingBuffer;const s=e.tag;t&&(this._addAdDetailFields(s),this._adDetails={...this._additionalAdFieldsLegacy,wrapperIds:t.adWrapperIds,gamCreativeId:t.adWrapperCreativeIds[t.adWrapperCreativeIds.length-1],gamLineItemId:t.adWrapperIds[t.adWrapperIds.length-1],wrapperCreativeIds:t.adWrapperCreativeIds,vastCreativeId:t.creativeId,mediaFileURL:t.mediaUrl,adUnitName:this._name,tag:e.tag,isEmpty:!1,wrapperSystems:t.adWrapperSystems,duration:i}),this._setStaleAdDetection()})),this.playerInstance.on("adImpression",(()=>{this._lastAdSuccessful=!0,this._retryAttempts=0;const e=this._adDetails||{};this._eventProxy.emitVideoSlotRenderedEvent(e),this._adPodManager.canApplyAdPodExperience()&&(e.duration&&this._adPodManager.addCreativeDuration(e.duration),this._adPodManager.canFetchNextAdInPod()&&this._doubleFetchBids())})),this._config.video.logAdLifeCycle&&["adRequest","adImpression","adStarted","adViewableImpression"].forEach((e=>{this.playerInstance.on(e,(t=>{"adImpression"===e&&W.event("JwPlayer","adImpression",this._getJwEventLog(t))}))}))}_maxRetriesReached(){const e=this._maxRetries,t="vpr"===this._instreamRerequestOnErrorResult&&this.prerollNum>5,i="vpr2"===this._instreamRerequestOnErrorResult&&this._retryAttempts>=2,s=this._retryAttempts>=e;return t||i||s}async _runAdPodPrerollAd(){0===this._pendingBidRequests.length&&await this._doubleFetchBids(),this._runAdPlay()}async _adFailedLogic(){if(this._maxRetriesReached()||"off"===this._instreamRerequestOnErrorResult||this._lastAdSuccessful||!this._midrollBugFixExperiment.result){this._resetAdVars();const e=this._adPodManager;e.canApplyAdPodExperience()&&!e.isLastInAdPod()&&await this._runAdPodPrerollAd()}else this._retryAttempts+=1,this.playerInstance.pause(!0),this.setIsRunningAdPlay(!0),this.playerInstance.seek(0),this._prebidMethods.getHighestCpmBids(this.name).length||await this._fetchBids(!0),"dbc"===this._instreamRerequestOnErrorResult&&this._excludedErroredOutAdIdsFromGamAuction(),this._runAdPlay(!1)}_addAdDetailFields(e){const t=e&&this._getCustParamsFromQueryString(e);t&&(this._additionalAdFieldsLegacy={adId:String(t.hb_adid),adomain:String(t.hb_adomain),hb_bidder:String(t.hb_bidder),amznp:String(t.amznp),hb_pb:String(t.hb_pb),hb_crid:String(t.hb_crid),amznbid:String(t.amznbid),hb_deal:String(t.hb_deal)})}_setupEventProxies(){if(this._collapseType===tt.Mobile){R.resolve(Xn).footerResponseReceived.on(this._handleFooterResponseReceivedEvent.bind(this))}this._spaListeners.push(this._eventProxy.scroll.on(this._handleScroll.bind(this))),this._spaListeners.push(this._eventProxy.resize.on(this._handleResize.bind(this))),this._spaListeners.push(this._eventProxy.pageVisibility.on(this._handlePageVisibilityChange.bind(this))),this._spaListeners.push(this._eventProxy.videoPlaying.on(this._handleVideoPlayingEvent.bind(this)))}_onBeforeRequestBids(){this._prebidEventBus.beforeRequestBids.on((e=>{e.forEach((e=>{const t=e.code===this.name,i=[...this._userIdComponent.getTargetingData(),...this._sspUserSyncComponent.getTargetingData()];var s;t&&i&&(this.userIdTargetingData=i);const n=null!=(s=e.ortb2Imp&&e.ortb2Imp.ext&&e.ortb2Imp.ext.tid)?s:"";t&&n&&(this.transactionId=n)}))}))}_setupEventListeners(){this._onBeforeRequestBids(),this._handleErrors(),this._listenForLargeVastError(),this._handleTimeEvents(),this._handleVideoEvents(),this._handleAdTrackingEvents(),this._setupEventProxies(),this._listenForPlayerEventsToLog(),this.playerInstance.on("ready",this._playerReady.bind(this))}_listenForPlayerEventsToLog(){R.resolve(eb).logEvents(this.playerInstance,{mediaId:this._playlistId,siteId:this._config.site.id,playerId:this._playerId,mediaIdCount:`${this._mediaIdCount||0}`})}_preventCollapse(){sy.disableCollapse=!0,this.collapseCollection&&sy.uncollapse(this.collapseCollection)}async _getPrerollAdUrl(){const e=this._adDurationControlExperiment.result;return e&&"off"!==e?`https://vast-tags.com/category/${e}?prerollNum=${this.prerollNum}`:(await this._videoEventBus.buildingVastAdURL.legacyEmit([this]),this.buildVideoUrl(this))}async _playLinearAd(){if(this.setIsRunningAdPlay(!0),this._config.video.logAdLifeCycle&&this._isRunningAdPlay&&W.event("JwPlayer","doubleGAMRequest",{vprenum:this.prerollNum}),await this._fetchBids(),this._pendingBidRequests.length>0){const e=this._pendingBidRequests.pop();e&&e.then((()=>{this._runAdPlay()})).catch((()=>{this._lastAdSuccessful=!1,this._adPodManager.setAdPlayMap(this.prerollNum,!1),this.setIsRunningAdPlay(!1)}))}}_linkProvidedByPublisher(e){return!e.startsWith("https://cdn.jwplayer.com")}_updateElementsToIncludeAnchor(){var e,t;const i=document.createElement("a");i.id="video-link",i.target="_blank",i.className="adthrive-video-text-cutoff";const s=null==(e=this._wrapperTitleWrapperElement)?void 0:e.parentNode,n=document.getElementById("video-title-text");null==(t=this._wrapperTitleWrapperElement)||t.remove(),this._wrapperTitleWrapperElement=i,n&&this._wrapperTitleWrapperElement.appendChild(n),null==s||s.appendChild(this._wrapperTitleWrapperElement)}_updateTitle(e){this._videoTitleElement&&ln(e,"title")&&"string"==typeof e.title&&(this._videoTitleElement.innerText=e.title),this._topCollapseVideoTitleElement&&ln(e,"title")&&"string"==typeof e.title&&(this._topCollapseVideoTitleElement.innerText=e.title)}_handleTitleLinkWrapper(e){const t=e.item,i=this._playlistId,s=document.getElementById(`${i}-learn-more-link`),n=document.getElementById(`${i}-svg-link`),r="related"===this._playerType,a="related"===this._playerType&&0===e.index,o=!r||!a,l=ln(t,"link")&&"string"==typeof t.link&&this._linkProvidedByPublisher(t.link),d=this._wrapperTitleWrapperElement&&l&&o,c=this._wrapperText&&l&&o;this._updateTitle(t),d&&(r&&!document.getElementById("video-link")&&this._updateElementsToIncludeAnchor(),this._wrapperTitleWrapperElement.href=t.link,n||this._wrapperTitleWrapperElement.prepend(this._createLinkIcon(i))),c&&(this._wrapperText.href=t.link,s||this._wrapperText.append(this._createLearnMoreLink(i))),t&&ln(t,"link")&&"string"==typeof t.link&&!this._linkProvidedByPublisher(t.link)&&(null==n||n.remove(),null==s||s.remove())}constructor(e,t=1,i,s,n,r,a,o,l,d=tt.Float,c,h,u,p,g,m,_,f,v,y){super(),this._playerId=e,this._mediaIdCount=t,this._playlistId=i,this._name=s,this._size=n,this._pageElement=r,this._eventProxy=a,this._config=o,this._context=l,this._collapseType=d,this._collapseMobileSizeType=c,this._prebidEventBus=h,this._prebidMethods=u,this._auctionManagers=p,this._playerType=g,this._isCollapsible=m,this._desktopCollapseOnScrollUp=_,this._mobileCollapseOnScrollUp=f,this._saveVideoCloseState=v,this._mobileLocation=y,this.type="JwPlayer",this.initialAuctionPlayer=!1,this.jwVersion="",this.imaVersion="",this._lastAdSuccessful=!0,this._retryAttempts=0,this._playlistMaxRetries=4,this._relatedPlayerMaxRetries=2,this._erroredOutAdIds=new Set,this._erroredOutCreativeIds=new Map,this.requestVideoBids=()=>{throw new Error("Request video bids not set")},this.buildVideoUrl=()=>{throw new Error("Build video url not set")},this.setPlayerInstance=()=>{throw new Error("Reset player not set")},this.waitForConsent=()=>{throw new Error("Wait for consent not set")},this.collapseCollection=null,this._defaults={},this._state=nt,this._nextAdFetched=!1,this._adDurationLogged=!1,this._isFirstPlay=!0,this._calledNextVideo=!1,this._wasClicked=!1,this._canSkip=!0,this._isAdvancePlaylist=!1,this._adDetails=null,this._additionalAdFieldsLegacy=null,this._canTearDown=!1,this._tearDownAfterNextAd=!1,this._tearDownTimer=null,this._tearDownPlayerTimeout=0,this._stalePlayerTimer=null,this._currentAdTime=0,this._currentAdDurationWithBuffer=0,this._adTimingBuffer=10,this._defaultAdDuration=30,this._autoplayBehaviorConfig={mute:!0},this._topBackgroundElement=null,this._hasPreviouslyCollapsed=!1,this._bidMarkedOnCurrentAd=!1,this._baseConfig={advertising:{adscheduleid:"DmULPHgQ",client:"googima",maxRedirects:this._config.video.maxRedirect,requestTimeout:this._config.video.jwRequestTimeout,vastLoadTimeout:this._config.video.vastTimeoutISV,vpaidmode:"insecure",vpaidcontrols:!0},generateSEOMetadata:!Ur.isRolloutEnabled("disableJwpSeo"),preload:"metadata"},this._spaListeners=[],this._transactionId="",this._userIdTargetingData=[],this._pendingBidRequests=[],this._mediaOrPlaylistId="nf",this._hiddenClassName="adthrive-hidden",this._isRunningAdPlay=!1,this._isMobile=!1,this._advanceInProgress=!1,this._eligibleFloorComponents=[],this._appliedFloorComponents=[],this._shouldPlayPrerollAds=()=>!this._adPodManager.adPlayMap.has(this.prerollNum)&&!this._advanceInProgress,this._runAdPlay=async(e=!0)=>{this.setIsRunningAdPlay(!0),await this._videoEventBus.auctionsCompleted.legacyEmit([this]);const t=await this._getPrerollAdUrl();this.playerInstance._nonLinearAd=!1,this._adPodManager.setAdPlayMap(this.prerollNum,!0),this.playerInstance.playAd(t),e&&this._resetAdVars()},this._isMobile="phone"===this._context.device,this._instreamRerequestOnErrorResult=R.resolve(Nl).result;if(R.resolve(ir).routeChanged.on((()=>{this._spaListeners.forEach((e=>e())),this._spaListeners.length=0})),this._videoEventBus=R.resolve(rr),this._maxRetries=this._playerType===wm?this._playlistMaxRetries:this._relatedPlayerMaxRetries,this._prebidAuctionManager=this._auctionManagers.getPrebidAuctionManager(),this._mobileStickyPlayerPositionSiteExperiment=R.resolve(Jl),this._mobileStickyPlayerPositionCoreExperiment=R.resolve(Ql),this._midrollBugFixExperiment=R.resolve(Xl),this._advancePlaylistDelayExperiment=R.resolve(Ll),this._videoCloseButtonComponent=R.resolve(Kv),window.matchMedia){const e=window.matchMedia(`only screen and (max-width: ${this._config.site.breakpoints.desktop-1}px)`);e.addListener(this._handleWidthBreak.bind(this)),this._handleWidthBreak(e)}const b=this._config.video.advancePlaylist;var S;(this._isAdvancePlaylist=this._playerType===wm?b.playlistPlayer.enabled:b.relatedPlayer.enabled,this._playerType!==km||this._isCollapsible&&b)&&(this._tearDownPlayerTimeout=null!=(S=R.resolve(_d).result)?S:0,this._canTearDown=0!==this._tearDownPlayerTimeout&&-1!==this._tearDownPlayerTimeout);this._userIdComponent=R.resolve(Cp),this._sspUserSyncComponent=R.resolve(Af);const E={optimizeVideoPlayersForEarnings:o.adOptions.optimizeVideoPlayersForEarnings,isCollapsible:this._isCollapsible,maxAdsInPod:2,adPodAuctionCutoffSeconds:6e3,isMax30SecPodFeatureEnabled:!1};this._adPodManager=new Qy(E),this._adDurationControlExperiment=R.resolve(Dl),this._auctionManager=new Jy(s,u,o,this._isCollapsible)}}class ib extends tb{_appendPlayer(){const e=document.createElement("div");e.id=this.playerContainerId,e.className="adthrive-jw-static-player",this._isCollapsible?(this._pageElement.id="adthrive-contextual-container",this._playerElement.className="adthrive-player-position",this._playerElement.id="adthrive-contextual-position",this.isTopCenterCollapse()&&this._createTopCenterBackground(this._pageElement),this._config.video.removeVideoTitleWrapper?this._addCloseWithoutWrapper():this.isTopCenterCollapse()?this._addTopCenterWrapper():this._addPlayerWithoutWrapper(),this._playerElement.appendChild(e),this._pageElement.appendChild(this._playerElement)):this._pageElement.appendChild(e)}setup(){if(this._isFirstPlay&&this._appendPlayer(),this.playerInstance=window.jwplayer(this.playerContainerId),this._isCollapsible){const e={playerElement:this._playerElement,playerContainer:this._pageElement,footerElement:this._config.video.footerSelector?document.querySelector(this._config.video.footerSelector):null,stickyElement:this._stickyElement,mobileHeaderSelector:this._mobileHeaderSelector||null};this._createCollapsibleCollection(e),this._playerConfig.playlist=sc.addMaxResolutionQueryParam(this._playerConfig.playlist)}this._jwSetup(this._playerConfig),this._config.video.relatedPlayerAdded=!0}_handleNextButton(){super._handleNextButton()}_playerReady(e){super._playerReady(e),this._initRelatedPlaylist();const t=this._autoplayStationaryPlayer;(t||this.collapseCollection)&&(e.viewable&&this._inViewPlayAd(),t&&this._logStationaryAutoplay()),this._isCollapsible&&this._setupCollapsible()}_logStationaryAutoplay(){this._config.video.logAdLifeCycle&&W.event("JwPlayer","StaticPlayer",{message:`Static Player set to autoplay for playlist id ${this._playlistId}`,...this._getPlayerVersions()})}_loadPlaylistPlayerVideos(){const e=this._config.video.jwPlaylistObj.playlist,{hasContentSpecificPlaylist:t,contentSpecificPlaylistshuffle:i}=this._config.video.jwPlaylistObj;e.then((e=>{if(e.playlist&&e.playlist.length){const s=!t||i?sc.shufflePlaylist(e.playlist):e.playlist,n=this.playerInstance.getPlaylist().concat(s);this.playerInstance.once("userInactive",(()=>{var e;!(null==(e=this.collapseCollection)?void 0:e.mediaStarted)&&this._handleScroll().catch((()=>{}))})),this.playerInstance.load(n),this._handleScroll().catch((()=>!1))}})).catch((()=>!1))}_setupAllowSkip(){this._config.video.advancePlaylist.relatedPlayer.applyToFirst&&(this._canSkip=!0),this.playerInstance.once("complete",(()=>{this._canSkip=!0}))}_shouldStationaryAutoplay(){return!this._config.video.playlistPlayerAdded&&!!document.querySelector("body.adthrive-video-autoplay")}_setWrapperBar(){this._wrapperBar=this._playerElement.querySelector(".adthrive-wrapper-bar")}_hideWrapperBar(){const e=this._wrapperBar,t=this._playerElement;!this._wrapperBarRemoved&&e&&(this._wrapperBarRemoved=!0,e.parentNode&&e.parentNode.removeChild(e),this._wrapperBar=null,t.insertBefore(this._createPlayerCloseButton(),t.firstChild),this.collapseCollection&&(this.collapseCollection.closeButton=this._closeButton,this._displayCloseButton()))}_addCloseWithoutWrapper(){this._playerElement.appendChild(this._createPlayerCloseButton()),this._playerElement.classList.add("adthrive-player-without-wrapper-text")}_addTopCenterWrapper(){this._playerElement.appendChild(this._createPlayerWrapper(!1)),this._playerElement.appendChild(this._createTopCollapseWrapper(!1)),this._playerElement.classList.add("adthrive-player-with-wrapper-text")}_addPlayerWithoutWrapper(){this._playerElement.appendChild(this._createPlayerWrapper(!1)),this._playerElement.classList.add("adthrive-player-without-wrapper-text")}_initRelatedPlaylist(){this._config.video.advancePlaylist.relatedPlayer.shouldRun.then((e=>{e&&(this._loadPlaylistPlayerVideos(),this._setupAllowSkip(),this.playerInstance.on("firstFrame",(()=>this._handleFirstFrame())),this.playerInstance.getContainer().addEventListener("click",(e=>this._handleVideoPlayerClicked(e))),this._initSkipContainer())})).catch((()=>!1))}_setupCollapsible(){this._setWrapperBar(),this._wrapperBar&&this._wrapperBar.style.setProperty("display","flex"),this._handleResize()}constructor(e,t,i,s,n,r,a,o,l,d,c,h,u,p,g,m,_,f,v){super(e,t,i,s,n,r,a,o,l,c,h,u,p,g,km,d,m,_,undefined,f),this._mobileHeaderSelector=v,this._topBackgroundElement=null,this._playerConfig={repeat:!0,nextupoffset:-.01,playlist:`https://cdn.jwplayer.com/v2/media/${this._playlistId}`,height:"auto"},this._wrapperBarRemoved=!1,this._playerElement=document.createElement("div"),this._canSkip=!1,this._autoplayStationaryPlayer=this._shouldStationaryAutoplay(),(d||this._autoplayStationaryPlayer)&&(this._playerConfig={...this._playerConfig,...this._autoplayBehaviorConfig},this.initialAuctionPlayer=!0,this._stickyElement=null,this._playerContainer=this._pageElement)}}ib=B([bn("RelatedPlayer"),j("design:type",Function),j("design:paramtypes",[Object,Number,String,et,Array,"undefined"==typeof HTMLElement?Object:HTMLElement,void 0===Yg?Object:Yg,void 0===_c?Object:_c,void 0===Fr?Object:Fr,Boolean,tt,it,void 0===Jn?Object:Jn,void 0===Mn?Object:Mn,void 0===Of?Object:Of,Boolean,"undefined"==typeof VideoCollapseScrollUpTopCenterExperimentVariant?Object:VideoCollapseScrollUpTopCenterExperimentVariant,"undefined"==typeof CollapseMobileSubType?Object:CollapseMobileSubType,Object])],ib);class sb extends Fn{setPotentialPlayersMap(){const e=this._videoConfig.players||[],t=this._filterPlayerMap(),i=e.filter((e=>"stationaryRelated"===e.type&&e.enabled));return t.stationaryRelated=i,this._potentialPlayerMap=t,this._potentialPlayerMap}_filterPlayerMap(){const e=this._videoConfig.players,t={stickyRelated:[],stickyPlaylist:[],stationaryRelated:[]};return e&&e.length?e.filter((e=>{var t;return null==(t=e.devices)?void 0:t.includes(this._device)})).reduce(((e,t)=>(e[t.type]||(W.event(this._component,"constructor","Unknown Video Player Type detected",t.type),e[t.type]=[]),t.enabled&&e[t.type].push(t),e)),t):t}_checkPlayerSelectorOnPage(e){const t=this._potentialPlayerMap[e].map((e=>({player:e,playerElement:this._getPlacementElement(e)})));return t.length?t[0]:{player:null,playerElement:null}}_getOverrideElement(e,t,i){if(e&&t){const s=document.createElement("div");t.insertAdjacentElement(e.position,s),i=s}else{const{player:e,playerElement:t}=this._checkPlayerSelectorOnPage("stickyPlaylist");if(e&&t){const s=document.createElement("div");t.insertAdjacentElement(e.position,s),i=s}}return i}_shouldOverrideElement(e){const t=e.getAttribute("override-embed");return"true"===t||"false"===t?"true"===t:!!this._videoConfig.relatedSettings&&this._videoConfig.relatedSettings.overrideEmbedLocation}_checkPageSelector(e,t,i=[]){if(e&&t&&0===i.length){return!("/"===window.location.pathname)&&W.event("VideoUtils","getPlacementElement",new Error(`PSNF: ${e} does not exist on the page`)),!1}return!0}_getElementSelector(e,t,i){return t&&t.length>i?t[i]:(W.event("VideoUtils","getPlacementElement",new Error(`ESNF: ${e} does not exist on the page`)),null)}_getPlacementElement(e){const{pageSelector:t,elementSelector:i,skip:s}=e,{valid:n,elements:r,...a}=un(t),{valid:o,elements:l,...d}=hn(i);if(""!==t&&!n)return W.error("VideoUtils","getPlacementElement",new Error(`${t} is not a valid selector`),a),null;if(!o)return W.error("VideoUtils","getPlacementElement",new Error(`${i} is not a valid selector`),d),null;if(!this._checkPageSelector(t,n,r))return null;return this._getElementSelector(i,l,s)||null}_getEmbeddedPlayerType(e){let t=e.getAttribute("data-player-type");return t&&"default"!==t||(t=this._videoConfig.relatedSettings?this._videoConfig.relatedSettings.defaultPlayerType:"static"),this._stickyRelatedOnPage&&(t="static"),t}_getMediaId(e){const t=e.getAttribute("data-video-id");return!!t&&(this._relatedMediaIds.push(t),t)}_createRelatedPlayer(e,t,i,s){"collapse"===t?this._createCollapsePlayer(e,i):"static"===t&&this._createStaticPlayer(e,i,s)}_createCollapsePlayer(e,t){const{player:i,playerElement:s}=this._checkPlayerSelectorOnPage("stickyRelated"),n=i||this._potentialPlayerMap.stationaryRelated[0];if(n&&n.playerId){this._shouldOverrideElement(t)&&(t=this._getOverrideElement(i,s,t)),t=document.querySelector(`#cls-video-container-${e} > div`)||t,this._createStickyRelatedPlayer({...n,mediaId:e},t)}else W.error(this._component,"_createCollapsePlayer","No video player found")}_createStaticPlayer(e,t,i){if(this._potentialPlayerMap.stationaryRelated.length&&this._potentialPlayerMap.stationaryRelated[0].playerId){const s=this._potentialPlayerMap.stationaryRelated[0];this._createStationaryRelatedPlayer({...s,mediaOrPlaylistId:e},t,i)}else W.error(this._component,"_createStaticPlayer","No video player found")}_shouldRunAutoplayPlayers(){return!(!this._isVideoAllowedOnPage()||!this._potentialPlayerMap.stickyRelated.length&&!this._potentialPlayerMap.stickyPlaylist.length)}_setPlaylistMediaIdWhenStationaryOnPage(e,t){if(this._potentialPlayerMap.stationaryRelated.length&&this._potentialPlayerMap.stationaryRelated[0].playerId&&e&&e.length){const i=e[0].getAttribute("data-video-id");return i?{...t,mediaId:i}:t}return t}_determineAutoplayPlayers(e){const t=this._component,i="VideoManagerComponent"===t,s=this._context;if(this._stickyRelatedOnPage)return void W.event(t,"stickyRelatedOnPage",i&&{device:s&&s.device,isDesktop:this._device}||{});const{playerElement:n}=this._checkPlayerSelectorOnPage("stickyPlaylist");let{player:r}=this._checkPlayerSelectorOnPage("stickyPlaylist");r&&r.playerId&&n?(r=this._setPlaylistMediaIdWhenStationaryOnPage(e,r),this._createPlaylistPlayer(r,n)):Math.random()<.01&&setTimeout((()=>{W.event(t,"noStickyPlaylist",i&&{vendor:"none",device:s&&s.device,isDesktop:this._device}||{})}),1e3)}_initializeRelatedPlayers(e){const t=new Map;for(let i=0;i=0){this._count=i;const e=void 0!==this._hardcodedTimeLeft?this._hardcodedTimeLeft:i;this._updateCountdownText(e),this._hardcodedTimeLeft&&this._hardcodedTimeLeft--}else i<=0&&this.hideAdTimer()}_updateCountdownText(e){const t=this._hardcodedTimeLeft?rb.POD_COUNTDOWN_TEXT:rb.INDIVIDUAL_COUNTDOWN_TEXT;this._adCountDownElement.innerHTML=`${t} ${e}`}_hasBuiltInCountdownElements(e){return e.includes(this._builtInCountdownElements[0])&&e.includes(this._builtInCountdownElements[1])}constructor(){this._adCountDownElement=document.createElement("div"),this._canStartAdCountDown=!1,this._count=0,this._builtInCountdownElements=["adAttribution","countdown"],this._hiddenClassElement="adthrive-hidden",this._adCountDownElement.classList.add("adthrive-count-down")}}function ab(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}rb.INDIVIDUAL_COUNTDOWN_TEXT="Ad ends in",rb.POD_COUNTDOWN_TEXT="Ads end in",rb=B([bn("AdCountDownTimer"),j("design:type",Function),j("design:paramtypes",[])],rb);var ob={exports:{}};!function(e){var t,i,s,n,r;t=/^(?=((?:[a-zA-Z0-9+\-.]+:)?))\1(?=((?:\/\/[^\/?#]*)?))\2(?=((?:(?:[^?#\/]*\/)*[^;?#\/]*)?))\3((?:;[^?#]*)?)(\?[^#]*)?(#[^]*)?$/,i=/^(?=([^\/?#]*))\1([^]*)$/,s=/(?:\/|^)\.(?=\/)/g,n=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,r={buildAbsoluteURL:function(e,t,s){if(s=s||{},e=e.trim(),!(t=t.trim())){if(!s.alwaysNormalize)return e;var n=r.parseURL(e);if(!n)throw new Error("Error trying to parse base URL.");return n.path=r.normalizePath(n.path),r.buildURLFromParts(n)}var a=r.parseURL(t);if(!a)throw new Error("Error trying to parse relative URL.");if(a.scheme)return s.alwaysNormalize?(a.path=r.normalizePath(a.path),r.buildURLFromParts(a)):t;var o=r.parseURL(e);if(!o)throw new Error("Error trying to parse base URL.");if(!o.netLoc&&o.path&&"/"!==o.path[0]){var l=i.exec(o.path);o.netLoc=l[1],o.path=l[2]}o.netLoc&&!o.path&&(o.path="/");var d={scheme:o.scheme,netLoc:a.netLoc,path:null,params:a.params,query:a.query,fragment:a.fragment};if(!a.netLoc&&(d.netLoc=o.netLoc,"/"!==a.path[0]))if(a.path){var c=o.path,h=c.substring(0,c.lastIndexOf("/")+1)+a.path;d.path=r.normalizePath(h)}else d.path=o.path,a.params||(d.params=o.params,a.query||(d.query=o.query));return null===d.path&&(d.path=s.alwaysNormalize?r.normalizePath(a.path):a.path),r.buildURLFromParts(d)},parseURL:function(e){var i=t.exec(e);return i?{scheme:i[1]||"",netLoc:i[2]||"",path:i[3]||"",params:i[4]||"",query:i[5]||"",fragment:i[6]||""}:null},normalizePath:function(e){for(e=e.split("").reverse().join("").replace(s,"");e.length!==(e=e.replace(n,"")).length;);return e.split("").reverse().join("")},buildURLFromParts:function(e){return e.scheme+e.netLoc+e.path+e.params+e.query+e.fragment}},e.exports=r}(ob);var lb=ob.exports;function db(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,s)}return i}function cb(e){for(var t=1;t`):fb}(t)}))}const Sb=yb,Eb=/^(\d+)x(\d+)$/,Cb=/(.+?)=(".*?"|.*?)(?:,|$)/g;class Tb{decimalInteger(e){const t=parseInt(this[e],10);return t>Number.MAX_SAFE_INTEGER?1/0:t}hexadecimalInteger(e){if(this[e]){let t=(this[e]||"0x").slice(2);t=(1&t.length?"0":"")+t;const i=new Uint8Array(t.length/2);for(let e=0;eNumber.MAX_SAFE_INTEGER?1/0:t}decimalFloatingPoint(e){return parseFloat(this[e])}optionalFloat(e,t){const i=this[e];return i?parseFloat(i):t}enumeratedString(e){return this[e]}bool(e){return"YES"===this[e]}decimalResolution(e){const t=Eb.exec(this[e]);if(null!==t)return{width:parseInt(t[1],10),height:parseInt(t[2],10)}}static parseAttrList(e){let t;const i={};for(Cb.lastIndex=0;null!==(t=Cb.exec(e));){let e=t[2];0===e.indexOf('"')&&e.lastIndexOf('"')===e.length-1&&(e=e.slice(1,-1));i[t[1].trim()]=e}return i}constructor(e){"string"==typeof e&&(e=Tb.parseAttrList(e));for(const t in e)e.hasOwnProperty(t)&&("X-"===t.substring(0,2)&&(this.clientAttrs=this.clientAttrs||[],this.clientAttrs.push(t)),this[t]=e[t])}}function wb(e){return"SCTE35-OUT"===e||"SCTE35-IN"===e}class kb{get id(){return this.attr.ID}get class(){return this.attr.CLASS}get startDate(){return this._startDate}get endDate(){if(this._endDate)return this._endDate;const e=this.duration;return null!==e?new Date(this._startDate.getTime()+1e3*e):null}get duration(){if("DURATION"in this.attr){const e=this.attr.decimalFloatingPoint("DURATION");if(pb(e))return e}else if(this._endDate)return(this._endDate.getTime()-this._startDate.getTime())/1e3;return null}get plannedDuration(){return"PLANNED-DURATION"in this.attr?this.attr.decimalFloatingPoint("PLANNED-DURATION"):null}get endOnNext(){return this.attr.bool("END-ON-NEXT")}get isValid(){return!!this.id&&!this._badValueForSameId&&pb(this.startDate.getTime())&&(null===this.duration||this.duration>=0)&&(!this.endOnNext||!!this.class)}constructor(e,t){if(this.attr=void 0,this._startDate=void 0,this._endDate=void 0,this._badValueForSameId=void 0,t){const i=t.attr;for(const t in i)if(Object.prototype.hasOwnProperty.call(e,t)&&e[t]!==i[t]){Sb.warn(`DATERANGE tag attribute: "${t}" does not match for tags with ID: "${e.ID}"`),this._badValueForSameId=t;break}e=ub(new Tb({}),i,e)}if(this.attr=e,this._startDate=new Date(e["START-DATE"]),"END-DATE"in this.attr){const e=new Date(this.attr["END-DATE"]);pb(e.getTime())&&(this._endDate=e)}}}class Ab{constructor(){this.aborted=!1,this.loaded=0,this.retry=0,this.total=0,this.chunkCount=0,this.bwEstimate=0,this.loading={start:0,first:0,end:0},this.parsing={start:0,end:0},this.buffering={start:0,first:0,end:0}}}var Ib="audio",xb="video",Pb="audiovideo";class Ob{setByteRange(e,t){const i=e.split("@",2),s=[];1===i.length?s[0]=t?t.byteRangeEndOffset:0:s[0]=parseInt(i[1]),s[1]=parseInt(i[0])+s[0],this._byteRange=s}get byteRange(){return this._byteRange?this._byteRange:[]}get byteRangeStartOffset(){return this.byteRange[0]}get byteRangeEndOffset(){return this.byteRange[1]}get url(){return!this._url&&this.baseurl&&this.relurl&&(this._url=lb.buildAbsoluteURL(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url||""}set url(e){this._url=e}constructor(e){this._byteRange=null,this._url=null,this.baseurl=void 0,this.relurl=void 0,this.elementaryStreams={[Ib]:null,[xb]:null,[Pb]:null},this.baseurl=e}}class Rb extends Ob{get decryptdata(){const{levelkeys:e}=this;if(!e&&!this._decryptdata)return null;if(!this._decryptdata&&this.levelkeys&&!this.levelkeys.NONE){const e=this.levelkeys.identity;if(e)this._decryptdata=e.getDecryptData(this.sn);else{const e=Object.keys(this.levelkeys);if(1===e.length)return this._decryptdata=this.levelkeys[e[0]].getDecryptData(this.sn)}}return this._decryptdata}get end(){return this.start+this.duration}get endProgramDateTime(){if(null===this.programDateTime)return null;if(!pb(this.programDateTime))return null;const e=pb(this.duration)?this.duration:0;return this.programDateTime+1e3*e}get encrypted(){var e;if(null!=(e=this._decryptdata)&&e.encrypted)return!0;if(this.levelkeys){const e=Object.keys(this.levelkeys),t=e.length;if(t>1||1===t&&this.levelkeys[e[0]].encrypted)return!0}return!1}setKeyFormat(e){if(this.levelkeys){const t=this.levelkeys[e];t&&!this._decryptdata&&(this._decryptdata=t.getDecryptData(this.sn))}}abortRequests(){var e,t;null==(e=this.loader)||e.abort(),null==(t=this.keyLoader)||t.abort()}setElementaryStreamInfo(e,t,i,s,n,r=!1){const{elementaryStreams:a}=this,o=a[e];o?(o.startPTS=Math.min(o.startPTS,t),o.endPTS=Math.max(o.endPTS,i),o.startDTS=Math.min(o.startDTS,s),o.endDTS=Math.max(o.endDTS,n)):a[e]={startPTS:t,endPTS:i,startDTS:s,endDTS:n,partial:r}}clearElementaryStreamInfo(){const{elementaryStreams:e}=this;e[Ib]=null,e[xb]=null,e[Pb]=null}constructor(e,t){super(t),this._decryptdata=null,this.rawProgramDateTime=null,this.programDateTime=null,this.tagList=[],this.duration=0,this.sn=0,this.levelkeys=void 0,this.type=void 0,this.loader=null,this.keyLoader=null,this.level=-1,this.cc=0,this.startPTS=void 0,this.endPTS=void 0,this.startDTS=void 0,this.endDTS=void 0,this.start=0,this.deltaPTS=void 0,this.maxStartPTS=void 0,this.minEndPTS=void 0,this.stats=new Ab,this.urlId=0,this.data=void 0,this.bitrateTest=!1,this.title=null,this.initSegment=null,this.endList=void 0,this.gap=void 0,this.type=e}}class Lb extends Ob{get start(){return this.fragment.start+this.fragOffset}get end(){return this.start+this.duration}get loaded(){const{elementaryStreams:e}=this;return!!(e.audio||e.video||e.audiovideo)}constructor(e,t,i,s,n){super(i),this.fragOffset=0,this.duration=0,this.gap=!1,this.independent=!1,this.relurl=void 0,this.fragment=void 0,this.index=void 0,this.stats=new Ab,this.duration=e.decimalFloatingPoint("DURATION"),this.gap=e.bool("GAP"),this.independent=e.bool("INDEPENDENT"),this.relurl=e.enumeratedString("URI"),this.fragment=t,this.index=s;const r=e.enumeratedString("BYTERANGE");r&&this.setByteRange(r,n),n&&(this.fragOffset=n.fragOffset+n.duration)}}class Db{reloaded(e){if(!e)return this.advanced=!0,void(this.updated=!0);const t=this.lastPartSn-e.lastPartSn,i=this.lastPartIndex-e.lastPartIndex;this.updated=this.endSN!==e.endSN||!!i||!!t||!this.live,this.advanced=this.endSN>e.endSN||t>0||0===t&&i>0,this.updated||this.advanced?this.misses=Math.floor(.6*e.misses):this.misses=e.misses+1,this.availabilityDelay=e.availabilityDelay}get hasProgramDateTime(){return!!this.fragments.length&&pb(this.fragments[this.fragments.length-1].programDateTime)}get levelTargetDuration(){return this.averagetargetduration||this.targetduration||10}get drift(){const e=this.driftEndTime-this.driftStartTime;if(e>0){return 1e3*(this.driftEnd-this.driftStart)/e}return 1}get edge(){return this.partEnd||this.fragmentEnd}get partEnd(){var e;return null!=(e=this.partList)&&e.length?this.partList[this.partList.length-1].end:this.fragmentEnd}get fragmentEnd(){var e;return null!=(e=this.fragments)&&e.length?this.fragments[this.fragments.length-1].end:0}get age(){return this.advancedDateTime?Math.max(Date.now()-this.advancedDateTime,0)/1e3:0}get lastPartIndex(){var e;return null!=(e=this.partList)&&e.length?this.partList[this.partList.length-1].index:-1}get lastPartSn(){var e;return null!=(e=this.partList)&&e.length?this.partList[this.partList.length-1].fragment.sn:this.endSN}constructor(e){this.PTSKnown=!1,this.alignedSliding=!1,this.averagetargetduration=void 0,this.endCC=0,this.endSN=0,this.fragments=void 0,this.fragmentHint=void 0,this.partList=null,this.dateRanges=void 0,this.live=!0,this.ageHeader=0,this.advancedDateTime=void 0,this.updated=!0,this.advanced=!0,this.availabilityDelay=void 0,this.misses=0,this.startCC=0,this.startSN=0,this.startTimeOffset=null,this.targetduration=0,this.totalduration=0,this.type=null,this.url=void 0,this.m3u8="",this.version=null,this.canBlockReload=!1,this.canSkipUntil=0,this.canSkipDateRanges=!1,this.skippedSegments=0,this.recentlyRemovedDateranges=void 0,this.partHoldBack=0,this.holdBack=0,this.partTarget=0,this.preloadHint=void 0,this.renditionReports=void 0,this.tuneInGoal=0,this.deltaUpdateFailed=void 0,this.driftStartTime=0,this.driftEndTime=0,this.driftStart=0,this.driftEnd=0,this.encryptedFragments=void 0,this.playlistParsingError=null,this.variableList=null,this.hasVariableRefs=!1,this.fragments=[],this.encryptedFragments=[],this.dateRanges={},this.url=e}}function Mb(e){return Uint8Array.from(atob(e),(e=>e.charCodeAt(0)))}function Bb(e){const t=e.split(":");let i=null;if("data"===t[0]&&2===t.length){const e=t[1].split(";"),s=e[e.length-1].split(",");if(2===s.length){const t="base64"===s[0],n=s[1];t?(e.splice(-1,1),i=Mb(n)):i=function(e){const t=Fb(e).subarray(0,16),i=new Uint8Array(16);return i.set(t,16-t.length),i}(n)}}return i}function Fb(e){return Uint8Array.from(unescape(encodeURIComponent(e)),(e=>e.charCodeAt(0)))}var jb={CLEARKEY:"org.w3.clearkey",FAIRPLAY:"com.apple.fps",PLAYREADY:"com.microsoft.playready",WIDEVINE:"com.widevine.alpha"},Nb="org.w3.clearkey",Ub="com.apple.streamingkeydelivery",Vb="com.microsoft.playready",zb="urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed";function Hb(e){switch(e){case Ub:return jb.FAIRPLAY;case Vb:return jb.PLAYREADY;case zb:return jb.WIDEVINE;case Nb:return jb.CLEARKEY}}var $b="edef8ba979d64acea3c827dcd51d21ed";function qb(e){switch(e){case jb.FAIRPLAY:return Ub;case jb.PLAYREADY:return Vb;case jb.WIDEVINE:return zb;case jb.CLEARKEY:return Nb}}function Gb(e){const{drmSystems:t,widevineLicenseUrl:i}=e,s=t?[jb.FAIRPLAY,jb.WIDEVINE,jb.PLAYREADY,jb.CLEARKEY].filter((e=>!!t[e])):[];return!s[jb.WIDEVINE]&&i&&s.push(jb.WIDEVINE),s}const Wb="undefined"!=typeof self&&self.navigator&&self.navigator.requestMediaKeySystemAccess?self.navigator.requestMediaKeySystemAccess.bind(self.navigator):null;function Kb(e,t,i){return Uint8Array.prototype.slice?e.slice(t,i):new Uint8Array(Array.prototype.slice.call(e,t,i))}const Yb=(e,t)=>t+10<=e.length&&73===e[t]&&68===e[t+1]&&51===e[t+2]&&e[t+3]<255&&e[t+4]<255&&e[t+6]<128&&e[t+7]<128&&e[t+8]<128&&e[t+9]<128,Xb=(e,t)=>t+10<=e.length&&51===e[t]&&68===e[t+1]&&73===e[t+2]&&e[t+3]<255&&e[t+4]<255&&e[t+6]<128&&e[t+7]<128&&e[t+8]<128&&e[t+9]<128,Qb=(e,t)=>{const i=t;let s=0;for(;Yb(e,t);){s+=10;s+=Jb(e,t+6),Xb(e,t+10)&&(s+=10),t+=s}if(s>0)return e.subarray(i,i+s)},Jb=(e,t)=>{let i=0;return i=(127&e[t])<<21,i|=(127&e[t+1])<<14,i|=(127&e[t+2])<<7,i|=127&e[t+3],i},Zb=(e,t)=>Yb(e,t)&&Jb(e,t+6)+10<=e.length-t,eS=e=>e&&"PRIV"===e.key&&"com.apple.streaming.transportStreamTimestamp"===e.info,tS=e=>{const t=String.fromCharCode(e[0],e[1],e[2],e[3]),i=Jb(e,4);return{type:t,size:i,data:e.subarray(10,10+i)}},iS=e=>{let t=0;const i=[];for(;Yb(e,t);){const s=Jb(e,t+6);t+=10;const n=t+s;for(;t+8"PRIV"===e.type?nS(e):"W"===e.type[0]?aS(e):rS(e),nS=e=>{if(e.size<2)return;const t=lS(e.data,!0),i=new Uint8Array(e.data.subarray(t.length+1));return{key:e.type,info:t,data:i.buffer}},rS=e=>{if(e.size<2)return;if("TXXX"===e.type){let t=1;const i=lS(e.data.subarray(t),!0);t+=i.length+1;const s=lS(e.data.subarray(t));return{key:e.type,info:i,data:s}}const t=lS(e.data.subarray(1));return{key:e.type,data:t}},aS=e=>{if("WXXX"===e.type){if(e.size<2)return;let t=1;const i=lS(e.data.subarray(t),!0);t+=i.length+1;const s=lS(e.data.subarray(t));return{key:e.type,info:i,data:s}}const t=lS(e.data);return{key:e.type,data:t}},oS=e=>{if(8===e.data.byteLength){const t=new Uint8Array(e.data),i=1&t[3];let s=(t[4]<<23)+(t[5]<<15)+(t[6]<<7)+t[7];return s/=45,i&&(s+=47721858.84),Math.round(s)}},lS=(e,t=!1)=>{const i=cS();if(i){const s=i.decode(e);if(t){const e=s.indexOf("\0");return-1!==e?s.substring(0,e):s}return s.replace(/\0/g,"")}const s=e.length;let n,r,a,o="",l=0;for(;l>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:o+=String.fromCharCode(n);break;case 12:case 13:r=e[l++],o+=String.fromCharCode((31&n)<<6|63&r);break;case 14:r=e[l++],a=e[l++],o+=String.fromCharCode((15&n)<<12|(63&r)<<6|63&a)}}return o};let dS;function cS(){return dS||void 0===self.TextDecoder||(dS=new self.TextDecoder("utf-8")),dS}const hS=function(e){let t="";for(let i=0;i>24,e[t+1]=i>>16&255,e[t+2]=i>>8&255,e[t+3]=255&i}function bS(e,t){const i=[];if(!t.length)return i;const s=e.byteLength;for(let n=0;n1?n+r:s;if(mS(e.subarray(n+4,n+8))===t[0])if(1===t.length)i.push(e.subarray(n+8,a));else{const s=bS(e.subarray(n+8,a),t.slice(1));s.length&&pS.apply(i,s)}n=a}return i}function SS(e){const t=[],i=e[0];let s=8;const n=fS(e,s);s+=4;s+=0===i?8:16,s+=2;let r=e.length+0;const a=_S(e,s);s+=2;for(let i=0;i>>31)return Sb.warn("SIDX has hierarchical references (not supported)"),null;const l=fS(e,i);i+=4,t.push({referenceSize:o,subsegmentDuration:l,info:{duration:l/n,start:r,end:r+o-1}}),r+=o,i+=4,s=i}return{earliestPresentationTime:0,timescale:n,version:i,referencesCount:a,references:t}}function ES(e){const t=[],i=bS(e,["moov","trak"]);for(let e=0;e{const i=fS(e,4),s=t[i];s&&(s.default={duration:fS(e,12),flags:fS(e,20)})})),t}function CS(e){const t=bS(e,["schm"])[0];if(t){const i=mS(t.subarray(4,8));if("cbcs"===i||"cenc"===i)return bS(e,["schi","tenc"])[0]}return Sb.error("[eme] missing 'schm' box"),null}function TS(e){const t=fS(e,0);let i=8;1&t&&(i+=4),4&t&&(i+=4);let s=0;const n=fS(e,4);for(let r=0;r{const l=o.byteOffset-8;bS(o,["traf"]).map((o=>{const d=bS(o,["tfdt"]).map((e=>{const t=e[0];let i=fS(e,4);return 1===t&&(i*=Math.pow(2,32),i+=fS(e,8)),i/n}))[0];return void 0!==d&&(e=d),bS(o,["tfhd"]).map((d=>{const c=fS(d,4),h=16777215&fS(d,0);let u=0;const p=!!(16&h);let g=0;const m=!!(32&h);let _=8;c===r&&(!!(1&h)&&(_+=8),!!(2&h)&&(_+=4),!!(8&h)&&(u=fS(d,_),_+=4),p&&(g=fS(d,_),_+=4),m&&(_+=4),"video"===t.type&&(a=function(e){if(!e)return!1;const t=e.indexOf("."),i=t<0?e:e.substring(0,t);return"hvc1"===i||"hev1"===i||"dvh1"===i||"dvhe"===i}(t.codec)),bS(o,["trun"]).map((r=>{const o=r[0],d=16777215&fS(r,0),c=!!(1&d);let h=0;const p=!!(4&d),m=!!(256&d);let _=0;const f=!!(512&d);let v=0;const y=!!(1024&d),b=!!(2048&d);let S=0;const E=fS(r,4);let C=8;c&&(h=fS(r,C),C+=4),p&&(C+=4);let T=h+l;for(let l=0;l>1&63;return 39===e||40===e}return 6===(31&t)}function IS(e,t,i,s){const n=xS(e);let r=0;r+=t;let a=0,o=0,l=!1,d=0;for(;r=n.length)break;d=n[r++],a+=d}while(255===d);o=0;do{if(r>=n.length)break;d=n[r++],o+=d}while(255===d);const e=n.length-r;if(!l&&4===a&&r16){const e=[];for(let t=0;t<16;t++){const i=n[r++].toString(16);e.push(1==i.length?"0"+i:i),3!==t&&5!==t&&7!==t&&9!==t||e.push("-")}const t=o-16,l=new Uint8Array(t);for(let e=0;ee)break}}function xS(e){const t=e.byteLength,i=[];let s=1;for(;s0&&new DataView(a.buffer).setUint32(0,i.byteLength,!1),function(e,...t){const i=t.length;let s=8,n=i;for(;n--;)s+=t[n].byteLength;const r=new Uint8Array(s);for(r[0]=s>>24&255,r[1]=s>>16&255,r[2]=s>>8&255,r[3]=255&s,r.set(e,4),n=0,s=8;n>8*(15-i)&255;return t}(e);return new RS(this.method,this.uri,"identity",this.keyFormatVersions,t)}const t=Bb(this.uri);if(t)switch(this.keyFormat){case zb:this.pssh=t,t.length>=22&&(this.keyId=t.subarray(t.length-22,t.length-6));break;case Vb:{const e=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);this.pssh=PS(e,0,t);const i=new Uint16Array(t.buffer,t.byteOffset,t.byteLength/2),s=String.fromCharCode.apply(null,Array.from(i)),n=s.substring(s.indexOf("<"),s.length),r=(new DOMParser).parseFromString(n,"text/xml").getElementsByTagName("KID")[0];if(r){const e=r.childNodes[0]?r.childNodes[0].nodeValue:r.getAttribute("VALUE");if(e){const t=Mb(e).subarray(0,16);!function(e){const t=function(e,t,i){const s=e[t];e[t]=e[i],e[i]=s};t(e,0,3),t(e,1,2),t(e,4,5),t(e,6,7)}(t),this.keyId=t}}break}default:{let e=t.subarray(0,16);if(16!==e.length){const t=new Uint8Array(16);t.set(e,16-e.length),e=t}this.keyId=e;break}}if(!this.keyId||16!==this.keyId.byteLength){let e=OS[this.uri];if(!e){const t=Object.keys(OS).length%Number.MAX_SAFE_INTEGER;e=new Uint8Array(16);new DataView(e.buffer,12,4).setUint32(0,t),OS[this.uri]=e}this.keyId=e}return this}constructor(e,t,i,s=[1],n=null){this.uri=void 0,this.method=void 0,this.keyFormat=void 0,this.keyFormatVersions=void 0,this.encrypted=void 0,this.isCommonEncryption=void 0,this.iv=null,this.key=null,this.keyId=null,this.pssh=null,this.method=e,this.uri=t,this.keyFormat=i,this.keyFormatVersions=s,this.iv=n,this.encrypted=!!e&&"NONE"!==e,this.isCommonEncryption=this.encrypted&&"AES-128"!==e}}const LS=/\{\$([a-zA-Z0-9-_]+)\}/g;function DS(e){return LS.test(e)}function MS(e,t,i){if(null!==e.variableList||e.hasVariableRefs)for(let s=i.length;s--;){const n=i[s],r=t[n];r&&(t[n]=BS(e,r))}}function BS(e,t){if(null!==e.variableList||e.hasVariableRefs){const i=e.variableList;return t.replace(LS,(t=>{const s=t.substring(2,t.length-1),n=null==i?void 0:i[s];return void 0===n?(e.playlistParsingError||(e.playlistParsingError=new Error(`Missing preceding EXT-X-DEFINE tag for Variable Reference: "${s}"`)),t):n}))}return t}function FS(e,t,i){let s,n,r=e.variableList;if(r||(e.variableList=r={}),"QUERYPARAM"in t){s=t.QUERYPARAM;try{const e=new self.URL(i).searchParams;if(!e.has(s))throw new Error(`"${s}" does not match any query parameter in URI: "${i}"`);n=e.get(s)}catch(t){e.playlistParsingError||(e.playlistParsingError=new Error(`EXT-X-DEFINE QUERYPARAM: ${t.message}`))}}else s=t.NAME,n=t.VALUE;s in r?e.playlistParsingError||(e.playlistParsingError=new Error(`EXT-X-DEFINE duplicate Variable Name declarations: "${s}"`)):r[s]=n||""}function jS(e,t,i){const s=t.IMPORT;if(i&&s in i){let t=e.variableList;t||(e.variableList=t={}),t[s]=i[s]}else e.playlistParsingError||(e.playlistParsingError=new Error(`EXT-X-DEFINE IMPORT attribute not found in Multivariant Playlist: "${s}"`))}function NS(){if("undefined"!=typeof self)return self.MediaSource||self.WebKitMediaSource}const US={audio:{a3ds:!0,"ac-3":!0,"ac-4":!0,alac:!0,alaw:!0,dra1:!0,"dts+":!0,"dts-":!0,dtsc:!0,dtse:!0,dtsh:!0,"ec-3":!0,enca:!0,g719:!0,g726:!0,m4ae:!0,mha1:!0,mha2:!0,mhm1:!0,mhm2:!0,mlpa:!0,mp4a:!0,"raw ":!0,Opus:!0,opus:!0,samr:!0,sawb:!0,sawp:!0,sevc:!0,sqcp:!0,ssmv:!0,twos:!0,ulaw:!0},video:{avc1:!0,avc2:!0,avc3:!0,avc4:!0,avcp:!0,av01:!0,drac:!0,dva1:!0,dvav:!0,dvh1:!0,dvhe:!0,encv:!0,hev1:!0,hvc1:!0,mjp2:!0,mp4v:!0,mvc1:!0,mvc2:!0,mvc3:!0,mvc4:!0,resv:!0,rv60:!0,s263:!0,svc1:!0,svc2:!0,"vc-1":!0,vp08:!0,vp09:!0},text:{stpp:!0,wvtt:!0}},VS=NS();function zS(e,t){var i;return null!=(i=null==VS?void 0:VS.isTypeSupported(`${t||"video"}/mp4;codecs="${e}"`))&&i}const HS=/#EXT-X-STREAM-INF:([^\r\n]*)(?:[\r\n](?:#[^\r\n]*)?)*([^\r\n]+)|#EXT-X-(SESSION-DATA|SESSION-KEY|DEFINE|CONTENT-STEERING|START):([^\r\n]*)[\r\n]+/g,$S=/#EXT-X-MEDIA:(.*)/g,qS=/^#EXT(?:INF|-X-TARGETDURATION):/m,GS=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/(?!#) *(\S[\S ]*)/.source,/#EXT-X-BYTERANGE:*(.+)/.source,/#EXT-X-PROGRAM-DATE-TIME:(.+)/.source,/#.*/.source].join("|"),"g"),WS=new RegExp([/#(EXTM3U)/.source,/#EXT-X-(DATERANGE|DEFINE|KEY|MAP|PART|PART-INF|PLAYLIST-TYPE|PRELOAD-HINT|RENDITION-REPORT|SERVER-CONTROL|SKIP|START):(.+)/.source,/#EXT-X-(BITRATE|DISCONTINUITY-SEQUENCE|MEDIA-SEQUENCE|TARGETDURATION|VERSION): *(\d+)/.source,/#EXT-X-(DISCONTINUITY|ENDLIST|GAP)/.source,/(#)([^:]*):(.*)/.source,/(#)(.*)(?:.*)\r?\n?/.source].join("|"));class KS{static findGroup(e,t){for(let i=0;i2){let e=t.shift()+".";return e+=parseInt(t.shift()).toString(16),e+=("000"+parseInt(t.shift()).toString(16)).slice(-4),e}return e}static resolve(e,t){return lb.buildAbsoluteURL(t,e,{alwaysNormalize:!0})}static isMediaPlaylist(e){return qS.test(e)}static parseMasterPlaylist(e,t){const i={contentSteering:null,levels:[],playlistParsingError:null,sessionData:null,sessionKeys:null,startTimeOffset:null,variableList:null,hasVariableRefs:DS(e)},s=[];let n;for(HS.lastIndex=0;null!=(n=HS.exec(e));)if(n[1]){var r;const e=new Tb(n[1]);MS(i,e,["CODECS","SUPPLEMENTAL-CODECS","ALLOWED-CPC","PATHWAY-ID","STABLE-VARIANT-ID","AUDIO","VIDEO","SUBTITLES","CLOSED-CAPTIONS","NAME"]);const a=BS(i,n[2]),o={attrs:e,bitrate:e.decimalInteger("AVERAGE-BANDWIDTH")||e.decimalInteger("BANDWIDTH"),name:e.NAME,url:KS.resolve(a,t)},l=e.decimalResolution("RESOLUTION");l&&(o.width=l.width,o.height=l.height),QS((e.CODECS||"").split(/[ ,]+/).filter((e=>e)),o),o.videoCodec&&-1!==o.videoCodec.indexOf("avc1")&&(o.videoCodec=KS.convertAVC1ToAVCOTI(o.videoCodec)),null!=(r=o.unknownCodecs)&&r.length||s.push(o),i.levels.push(o)}else if(n[3]){const e=n[3],s=n[4];switch(e){case"SESSION-DATA":{const e=new Tb(s);MS(i,e,["DATA-ID","LANGUAGE","VALUE","URI"]);const t=e["DATA-ID"];t&&(null===i.sessionData&&(i.sessionData={}),i.sessionData[t]=e);break}case"SESSION-KEY":{const e=YS(s,t,i);e.encrypted&&e.isSupported()?(null===i.sessionKeys&&(i.sessionKeys=[]),i.sessionKeys.push(e)):Sb.warn(`[Keys] Ignoring invalid EXT-X-SESSION-KEY tag: "${s}"`);break}case"DEFINE":{const e=new Tb(s);MS(i,e,["NAME","VALUE","QUERYPARAM"]),FS(i,e,t)}break;case"CONTENT-STEERING":{const e=new Tb(s);MS(i,e,["SERVER-URI","PATHWAY-ID"]),i.contentSteering={uri:KS.resolve(e["SERVER-URI"],t),pathwayId:e["PATHWAY-ID"]||"."};break}case"START":i.startTimeOffset=XS(s)}}const a=s.length>0&&s.length({id:e.attrs.AUDIO,audioCodec:e.audioCodec}))),SUBTITLES:r.map((e=>({id:e.attrs.SUBTITLES,textCodec:e.textCodec}))),"CLOSED-CAPTIONS":[]};let o=0;for($S.lastIndex=0;null!==(s=$S.exec(e));){const e=new Tb(s[1]),r=e.TYPE;if(r){const s=a[r],l=n[r]||[];n[r]=l,MS(i,e,["URI","GROUP-ID","LANGUAGE","ASSOC-LANGUAGE","STABLE-RENDITION-ID","NAME","INSTREAM-ID","CHARACTERISTICS","CHANNELS"]);const d={attrs:e,bitrate:0,id:o++,groupId:e["GROUP-ID"]||"",instreamId:e["INSTREAM-ID"],name:e.NAME||e.LANGUAGE||"",type:r,default:e.bool("DEFAULT"),autoselect:e.bool("AUTOSELECT"),forced:e.bool("FORCED"),lang:e.LANGUAGE,url:e.URI?KS.resolve(e.URI,t):""};if(null!=s&&s.length){const e=KS.findGroup(s,d.groupId)||s[0];JS(d,e,"audioCodec"),JS(d,e,"textCodec")}l.push(d)}}return n}static parseLevelPlaylist(e,t,i,s,n,r){const a=new Db(t),o=a.fragments;let l,d,c,h=null,u=0,p=0,g=0,m=0,_=null,f=new Rb(s,t),v=-1,y=!1;for(GS.lastIndex=0,a.m3u8=e,a.hasVariableRefs=DS(e);null!==(l=GS.exec(e));){y&&(y=!1,f=new Rb(s,t),f.start=g,f.sn=u,f.cc=m,f.level=i,h&&(f.initSegment=h,f.rawProgramDateTime=h.rawProgramDateTime,h.rawProgramDateTime=null));const e=l[1];if(e){f.duration=parseFloat(e);const t=(" "+l[2]).slice(1);f.title=t||null,f.tagList.push(t?["INF",e,t]:["INF",e])}else if(l[3]){if(pb(f.duration)){f.start=g,c&&tE(f,c,a),f.sn=u,f.level=i,f.cc=m,f.urlId=n,o.push(f);const e=(" "+l[3]).slice(1);f.relurl=BS(a,e),ZS(f,_),_=f,g+=f.duration,u++,p=0,y=!0}}else if(l[4]){const e=(" "+l[4]).slice(1);_?f.setByteRange(e,_):f.setByteRange(e)}else if(l[5])f.rawProgramDateTime=(" "+l[5]).slice(1),f.tagList.push(["PROGRAM-DATE-TIME",f.rawProgramDateTime]),-1===v&&(v=o.length);else{if(l=l[0].match(WS),!l){Sb.warn("No matches on slow regex match for level playlist!");continue}for(d=1;d0&&e.bool("CAN-SKIP-DATERANGES"),a.partHoldBack=e.optionalFloat("PART-HOLD-BACK",0),a.holdBack=e.optionalFloat("HOLD-BACK",0);break}case"PART-INF":{const e=new Tb(n);a.partTarget=e.decimalFloatingPoint("PART-TARGET");break}case"PART":{let e=a.partList;e||(e=a.partList=[]);const i=p>0?e[e.length-1]:void 0,s=p++,r=new Tb(n);MS(a,r,["BYTERANGE","URI"]);const o=new Lb(r,f,t,s,i);e.push(o),f.duration+=o.duration;break}case"PRELOAD-HINT":{const e=new Tb(n);MS(a,e,["URI"]),a.preloadHint=e;break}case"RENDITION-REPORT":{const e=new Tb(n);MS(a,e,["URI"]),a.renditionReports=a.renditionReports||[],a.renditionReports.push(e);break}default:Sb.warn(`line parsed but not handled: ${l}`)}}}_&&!_.relurl?(o.pop(),g-=_.duration,a.partList&&(a.fragmentHint=_)):a.partList&&(ZS(f,_),f.cc=m,a.fragmentHint=f,c&&tE(f,c,a));const b=o.length,S=o[0],E=o[b-1];if(g+=a.skippedSegments*a.targetduration,g>0&&b&&E){a.averagetargetduration=g/b;const e=E.sn;a.endSN="initSegment"!==e?e:0,a.live||(E.endList=!0),S&&(a.startCC=S.cc)}else a.endSN=0,a.startCC=0;return a.fragmentHint&&(g+=a.fragmentHint.duration),a.totalduration=g,a.endCC=m,v>0&&function(e,t){let i=e[t];for(let s=t;s--;){const t=e[s];if(!t)return;t.programDateTime=i.programDateTime-1e3*t.duration,i=t}}(o,v),a}}function YS(e,t,i){var s,n;const r=new Tb(e);MS(i,r,["KEYFORMAT","KEYFORMATVERSIONS","URI","IV","URI"]);const a=null!=(s=r.METHOD)?s:"",o=r.URI,l=r.hexadecimalInteger("IV"),d=r.KEYFORMATVERSIONS,c=null!=(n=r.KEYFORMAT)?n:"identity";o&&r.IV&&!l&&Sb.error(`Invalid IV: ${r.IV}`);const h=o?KS.resolve(o,t):"",u=(d||"1").split("/").map(Number).filter(Number.isFinite);return new RS(a,h,c,u,l)}function XS(e){const t=new Tb(e).decimalFloatingPoint("TIME-OFFSET");return pb(t)?t:null}function QS(e,t){["video","audio","text"].forEach((i=>{const s=e.filter((e=>function(e,t){const i=US[t];return!!i&&!0===i[e.slice(0,4)]}(e,i)));if(s.length){const n=s.filter((e=>0===e.lastIndexOf("avc1",0)||0===e.lastIndexOf("mp4a",0)));t[`${i}Codec`]=n.length>0?n[0]:s[0],e=e.filter((e=>-1===s.indexOf(e)))}})),t.unknownCodecs=e}function JS(e,t,i){const s=t[i];s&&(e[i]=s)}function ZS(e,t){e.rawProgramDateTime?e.programDateTime=Date.parse(e.rawProgramDateTime):null!=t&&t.programDateTime&&(e.programDateTime=t.endProgramDateTime),pb(e.programDateTime)||(e.programDateTime=null,e.rawProgramDateTime=null)}function eE(e,t,i,s){e.relurl=t.URI,t.BYTERANGE&&e.setByteRange(t.BYTERANGE),e.level=i,e.sn="initSegment",s&&(e.levelkeys=s),e.initSegment=null}function tE(e,t,i){e.levelkeys=t;const{encryptedFragments:s}=i;s.length&&s[s.length-1].levelkeys===t||!Object.keys(t).some((e=>t[e].isCommonEncryption))||s.push(e)}var iE="manifest",sE="level",nE="audioTrack",rE="subtitleTrack",aE="main",oE="audio",lE="subtitle";function dE(e){const{type:t}=e;switch(t){case nE:return oE;case rE:return lE;default:return aE}}function cE(e,t){let i=e.url;return void 0!==i&&0!==i.indexOf("data:")||(i=t.url),i}class hE{startLoad(e){}stopLoad(){this.destroyInternalLoaders()}registerListeners(){const{hls:e}=this;e.on(gb.MANIFEST_LOADING,this.onManifestLoading,this),e.on(gb.LEVEL_LOADING,this.onLevelLoading,this),e.on(gb.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),e.on(gb.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)}unregisterListeners(){const{hls:e}=this;e.off(gb.MANIFEST_LOADING,this.onManifestLoading,this),e.off(gb.LEVEL_LOADING,this.onLevelLoading,this),e.off(gb.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),e.off(gb.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)}createInternalLoader(e){const t=this.hls.config,i=t.pLoader,s=t.loader,n=new(i||s)(t);return this.loaders[e.type]=n,n}getInternalLoader(e){return this.loaders[e.type]}resetInternalLoader(e){this.loaders[e]&&delete this.loaders[e]}destroyInternalLoaders(){for(const e in this.loaders){const t=this.loaders[e];t&&t.destroy(),this.resetInternalLoader(e)}}destroy(){this.variableList=null,this.unregisterListeners(),this.destroyInternalLoaders()}onManifestLoading(e,t){const{url:i}=t;this.variableList=null,this.load({id:null,level:0,responseType:"text",type:iE,url:i,deliveryDirectives:null})}onLevelLoading(e,t){const{id:i,level:s,url:n,deliveryDirectives:r}=t;this.load({id:i,level:s,responseType:"text",type:sE,url:n,deliveryDirectives:r})}onAudioTrackLoading(e,t){const{id:i,groupId:s,url:n,deliveryDirectives:r}=t;this.load({id:i,groupId:s,level:null,responseType:"text",type:nE,url:n,deliveryDirectives:r})}onSubtitleTrackLoading(e,t){const{id:i,groupId:s,url:n,deliveryDirectives:r}=t;this.load({id:i,groupId:s,level:null,responseType:"text",type:rE,url:n,deliveryDirectives:r})}load(e){var t;const i=this.hls.config;let s,n=this.getInternalLoader(e);if(n){const t=n.context;if(t&&t.url===e.url)return void Sb.trace("[playlist-loader]: playlist request ongoing");Sb.log(`[playlist-loader]: aborting previous loader for type: ${e.type}`),n.abort()}if(s=e.type===iE?i.manifestLoadPolicy.default:ub({},i.playlistLoadPolicy.default,{timeoutRetry:null,errorRetry:null}),n=this.createInternalLoader(e),null!=(t=e.deliveryDirectives)&&t.part){let t;if(e.type===sE&&null!==e.level?t=this.hls.levels[e.level].details:e.type===nE&&null!==e.id?t=this.hls.audioTracks[e.id].details:e.type===rE&&null!==e.id&&(t=this.hls.subtitleTracks[e.id].details),t){const e=t.partTarget,i=t.targetduration;if(e&&i){const t=1e3*Math.max(3*e,.8*i);s=ub({},s,{maxTimeToFirstByteMs:Math.min(t,s.maxTimeToFirstByteMs),maxLoadTimeMs:Math.min(t,s.maxTimeToFirstByteMs)})}}}const r=s.errorRetry||s.timeoutRetry||{},a={loadPolicy:s,timeout:s.maxLoadTimeMs,maxRetry:r.maxNumRetry||0,retryDelay:r.retryDelayMs||0,maxRetryDelay:r.maxRetryDelayMs||0},o={onSuccess:(e,t,i,s)=>{const n=this.getInternalLoader(i);this.resetInternalLoader(i.type);const r=e.data;0===r.indexOf("#EXTM3U")?(t.parsing.start=performance.now(),KS.isMediaPlaylist(r)?this.handleTrackOrLevelPlaylist(e,t,i,s||null,n):this.handleMasterPlaylist(e,t,i,s)):this.handleManifestParsingError(e,i,new Error("no EXTM3U delimiter"),s||null,t)},onError:(e,t,i,s)=>{this.handleNetworkError(t,i,!1,e,s)},onTimeout:(e,t,i)=>{this.handleNetworkError(t,i,!0,void 0,e)}};n.load(e,a,o)}handleMasterPlaylist(e,t,i,s){const n=this.hls,r=e.data,a=cE(e,i),o=KS.parseMasterPlaylist(r,a);if(o.playlistParsingError)return void this.handleManifestParsingError(e,i,o.playlistParsingError,s,t);const{contentSteering:l,levels:d,sessionData:c,sessionKeys:h,startTimeOffset:u,variableList:p}=o;this.variableList=p;const{AUDIO:g=[],SUBTITLES:m,"CLOSED-CAPTIONS":_}=KS.parseMasterPlaylistMedia(r,a,o);if(g.length){g.some((e=>!e.url))||!d[0].audioCodec||d[0].attrs.AUDIO||(Sb.log("[playlist-loader]: audio codec signaled in quality level, but no embedded audio track signaled, create one"),g.unshift({type:"main",name:"main",groupId:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new Tb({}),bitrate:0,url:""}))}n.trigger(gb.MANIFEST_LOADED,{levels:d,audioTracks:g,subtitles:m,captions:_,contentSteering:l,url:a,stats:t,networkDetails:s,sessionData:c,sessionKeys:h,startTimeOffset:u,variableList:p})}handleTrackOrLevelPlaylist(e,t,i,s,n){const r=this.hls,{id:a,level:o,type:l}=i,d=cE(e,i),c=pb(a)?a:0,h=pb(o)?o:c,u=dE(i),p=KS.parseLevelPlaylist(e.data,d,h,u,c,this.variableList);if(l===iE){const e={attrs:new Tb({}),bitrate:0,details:p,name:"",url:d};r.trigger(gb.MANIFEST_LOADED,{levels:[e],audioTracks:[],url:d,stats:t,networkDetails:s,sessionData:null,sessionKeys:null,contentSteering:null,startTimeOffset:null,variableList:null})}t.parsing.end=performance.now(),i.levelDetails=p,this.handlePlaylistLoaded(p,e,t,i,s,n)}handleManifestParsingError(e,t,i,s,n){this.hls.trigger(gb.ERROR,{type:mb.NETWORK_ERROR,details:_b.MANIFEST_PARSING_ERROR,fatal:t.type===iE,url:e.url,err:i,error:i,reason:i.message,response:e,context:t,networkDetails:s,stats:n})}handleNetworkError(e,t,i=!1,s,n){let r=`A network ${i?"timeout":"error"+(s?" (status "+s.code+")":"")} occurred while loading ${e.type}`;e.type===sE?r+=`: ${e.level} id: ${e.id}`:e.type!==nE&&e.type!==rE||(r+=` id: ${e.id} group-id: "${e.groupId}"`);const a=new Error(r);Sb.warn(`[playlist-loader]: ${r}`);let o=_b.UNKNOWN,l=!1;const d=this.getInternalLoader(e);switch(e.type){case iE:o=i?_b.MANIFEST_LOAD_TIMEOUT:_b.MANIFEST_LOAD_ERROR,l=!0;break;case sE:o=i?_b.LEVEL_LOAD_TIMEOUT:_b.LEVEL_LOAD_ERROR,l=!1;break;case nE:o=i?_b.AUDIO_TRACK_LOAD_TIMEOUT:_b.AUDIO_TRACK_LOAD_ERROR,l=!1;break;case rE:o=i?_b.SUBTITLE_TRACK_LOAD_TIMEOUT:_b.SUBTITLE_LOAD_ERROR,l=!1}d&&this.resetInternalLoader(e.type);const c={type:mb.NETWORK_ERROR,details:o,fatal:l,url:e.url,loader:d,context:e,error:a,networkDetails:t,stats:n};if(s){const i=(null==t?void 0:t.url)||e.url;c.response=cb({url:i,data:void 0},s)}this.hls.trigger(gb.ERROR,c)}handlePlaylistLoaded(e,t,i,s,n,r){const a=this.hls,{type:o,level:l,id:d,groupId:c,deliveryDirectives:h}=s,u=cE(t,s),p=dE(s),g="number"==typeof s.level&&p===aE?l:void 0;if(!e.fragments.length){const e=new Error("No Segments found in Playlist");return void a.trigger(gb.ERROR,{type:mb.NETWORK_ERROR,details:_b.LEVEL_EMPTY_ERROR,fatal:!1,url:u,error:e,reason:e.message,response:t,context:s,level:g,parent:p,networkDetails:n,stats:i})}e.targetduration||(e.playlistParsingError=new Error("Missing Target Duration"));const m=e.playlistParsingError;if(m)a.trigger(gb.ERROR,{type:mb.NETWORK_ERROR,details:_b.LEVEL_PARSING_ERROR,fatal:!1,url:u,error:m,reason:m.message,response:t,context:s,level:g,parent:p,networkDetails:n,stats:i});else switch(e.live&&r&&(r.getCacheAge&&(e.ageHeader=r.getCacheAge()||0),r.getCacheAge&&!isNaN(e.ageHeader)||(e.ageHeader=0)),o){case iE:case sE:a.trigger(gb.LEVEL_LOADED,{details:e,level:g||0,id:d||0,stats:i,networkDetails:n,deliveryDirectives:h});break;case nE:a.trigger(gb.AUDIO_TRACK_LOADED,{details:e,id:d||0,groupId:c||"",stats:i,networkDetails:n,deliveryDirectives:h});break;case rE:a.trigger(gb.SUBTITLE_TRACK_LOADED,{details:e,id:d||0,groupId:c||"",stats:i,networkDetails:n,deliveryDirectives:h})}}constructor(e){this.hls=void 0,this.loaders=Object.create(null),this.variableList=null,this.hls=e,this.registerListeners()}}function uE(e,t){let i;try{i=new Event("addtrack")}catch(e){i=document.createEvent("Event"),i.initEvent("addtrack",!1,!1)}i.track=e,t.dispatchEvent(i)}function pE(e,t){const i=e.mode;if("disabled"===i&&(e.mode="hidden"),e.cues&&!e.cues.getCueById(t.id))try{if(e.addCue(t),!e.cues.getCueById(t.id))throw new Error(`addCue is failed for: ${t}`)}catch(i){Sb.debug(`[texttrack-utils]: ${i}`);try{const i=new self.TextTrackCue(t.startTime,t.endTime,t.text);i.id=t.id,e.addCue(i)}catch(e){Sb.debug(`[texttrack-utils]: Legacy TextTrackCue fallback failed: ${e}`)}}"disabled"===i&&(e.mode=i)}function gE(e){const t=e.mode;if("disabled"===t&&(e.mode="hidden"),e.cues)for(let t=e.cues.length;t--;)e.removeCue(e.cues[t]);"disabled"===t&&(e.mode=t)}function mE(e,t,i,s){const n=e.mode;if("disabled"===n&&(e.mode="hidden"),e.cues&&e.cues.length>0){const n=function(e,t,i){const s=[],n=function(e,t){if(te[i].endTime)return-1;let s=0,n=i;for(;s<=n;){const r=Math.floor((n+s)/2);if(te[r].startTime&&s-1)for(let r=n,a=e.length;r=t&&n.endTime<=i)s.push(n);else if(n.startTime>i)return s}return s}(e.cues,t,i);for(let t=0;t{const e=yE();try{new e(0,Number.POSITIVE_INFINITY,"")}catch(e){return Number.MAX_VALUE}return Number.POSITIVE_INFINITY})();function SE(e,t){return e.getTime()/1e3-t}class EE{destroy(){this._unregisterListeners(),this.id3Track=null,this.media=null,this.dateRangeCuesAppended={},this.hls=null}_registerListeners(){const{hls:e}=this;e.on(gb.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(gb.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(gb.MANIFEST_LOADING,this.onManifestLoading,this),e.on(gb.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),e.on(gb.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(gb.LEVEL_UPDATED,this.onLevelUpdated,this)}_unregisterListeners(){const{hls:e}=this;e.off(gb.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(gb.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(gb.MANIFEST_LOADING,this.onManifestLoading,this),e.off(gb.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),e.off(gb.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(gb.LEVEL_UPDATED,this.onLevelUpdated,this)}onMediaAttached(e,t){this.media=t.media}onMediaDetaching(){this.id3Track&&(gE(this.id3Track),this.id3Track=null,this.media=null,this.dateRangeCuesAppended={})}onManifestLoading(){this.dateRangeCuesAppended={}}createTrack(e){const t=this.getID3Track(e.textTracks);return t.mode="hidden",t}getID3Track(e){if(this.media){for(let t=0;tbE&&(s=bE);s-i<=0&&(s=i+.25);for(let e=0;ee.type===_E&&o:"video"===s?e=>e.type===vE&&a:e=>e.type===_E&&o||e.type===vE&&a,mE(n,t,i,e)}}onLevelUpdated(e,{details:t}){if(!this.media||!t.hasProgramDateTime||!this.hls.config.enableDateRangeMetadataCues)return;const{dateRangeCuesAppended:i,id3Track:s}=this,{dateRanges:n}=t,r=Object.keys(n);if(s){const e=Object.keys(i).filter((e=>!r.includes(e)));for(let t=e.length;t--;){const n=e[t];Object.keys(i[n].cues).forEach((e=>{s.removeCue(i[n].cues[e])})),delete i[n]}}const a=t.fragments[t.fragments.length-1];if(0===r.length||!pb(null==a?void 0:a.programDateTime))return;this.id3Track||(this.id3Track=this.createTrack(this.media));const o=a.programDateTime/1e3-a.start,l=yE();for(let e=0;e{const i=n[t];return i.class===s.class&&i.id!==t&&i.startDate>s.startDate&&e.push(i),e}),[]).sort(((e,t)=>e.startDate.getTime()-t.startDate.getTime()))[0];e&&(g=SE(e.startDate,o),u=!0)}const _=Object.keys(s.attr);for(let e=0;e<_.length;e++){const i=_[e];if("ID"===(c=i)||"CLASS"===c||"START-DATE"===c||"DURATION"===c||"END-DATE"===c||"END-ON-NEXT"===c)continue;let n=h[i];if(n)u&&!a.durationKnown&&(n.endTime=g);else{let e=s.attr[i];n=new l(p,g,""),wb(i)&&(d=e,e=Uint8Array.from(d.replace(/^0x/,"").replace(/([\da-fA-F]{2}) ?/g,"0x$1 ").replace(/ +$/,"").split(" ")).buffer),n.value={key:i,data:e},n.type=fE,n.id=t,this.id3Track.addCue(n),h[i]=n}}i[t]={cues:h,dateRange:s,durationKnown:u}}var d,c}constructor(e){this.hls=void 0,this.id3Track=null,this.media=null,this.dateRangeCuesAppended={},this.hls=e,this._registerListeners()}}class CE{get latency(){return this._latency||0}get maxLatency(){const{config:e,levelDetails:t}=this;return void 0!==e.liveMaxLatencyDuration?e.liveMaxLatencyDuration:t?e.liveMaxLatencyDurationCount*t.targetduration:0}get targetLatency(){const{levelDetails:e}=this;if(null===e)return null;const{holdBack:t,partHoldBack:i,targetduration:s}=e,{liveSyncDuration:n,liveSyncDurationCount:r,lowLatencyMode:a}=this.config,o=this.hls.userConfig;let l=a&&i||t;(o.liveSyncDuration||o.liveSyncDurationCount||0===l)&&(l=void 0!==n?n:r*s);const d=s;return l+Math.min(1*this.stallCount,d)}get liveSyncPosition(){const e=this.estimateLiveEdge(),t=this.targetLatency,i=this.levelDetails;if(null===e||null===t||null===i)return null;const s=i.edge,n=e-t-this.edgeStalled,r=s-i.totalduration,a=s-(this.config.lowLatencyMode&&i.partTarget||i.targetduration);return Math.min(Math.max(r,n),a)}get drift(){const{levelDetails:e}=this;return null===e?1:e.drift}get edgeStalled(){const{levelDetails:e}=this;if(null===e)return 0;const t=3*(this.config.lowLatencyMode&&e.partTarget||e.targetduration);return Math.max(e.age-t,0)}get forwardBufferLength(){const{media:e,levelDetails:t}=this;if(!e||!t)return 0;const i=e.buffered.length;return(i?e.buffered.end(i-1):t.edge)-this.currentTime}destroy(){this.unregisterListeners(),this.onMediaDetaching(),this.levelDetails=null,this.hls=this.timeupdateHandler=null}registerListeners(){this.hls.on(gb.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(gb.MEDIA_DETACHING,this.onMediaDetaching,this),this.hls.on(gb.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(gb.LEVEL_UPDATED,this.onLevelUpdated,this),this.hls.on(gb.ERROR,this.onError,this)}unregisterListeners(){this.hls.off(gb.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(gb.MEDIA_DETACHING,this.onMediaDetaching,this),this.hls.off(gb.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.off(gb.LEVEL_UPDATED,this.onLevelUpdated,this),this.hls.off(gb.ERROR,this.onError,this)}onMediaAttached(e,t){this.media=t.media,this.media.addEventListener("timeupdate",this.timeupdateHandler)}onMediaDetaching(){this.media&&(this.media.removeEventListener("timeupdate",this.timeupdateHandler),this.media=null)}onManifestLoading(){this.levelDetails=null,this._latency=null,this.stallCount=0}onLevelUpdated(e,{details:t}){this.levelDetails=t,t.advanced&&this.timeupdate(),!t.live&&this.media&&this.media.removeEventListener("timeupdate",this.timeupdateHandler)}onError(e,t){var i;t.details===_b.BUFFER_STALLED_ERROR&&(this.stallCount++,null!=(i=this.levelDetails)&&i.live&&Sb.warn("[playback-rate-controller]: Stall detected, adjusting target latency"))}timeupdate(){const{media:e,levelDetails:t}=this;if(!e||!t)return;this.currentTime=e.currentTime;const i=this.computeLatency();if(null===i)return;this._latency=i;const{lowLatencyMode:s,maxLiveSyncPlaybackRate:n}=this.config;if(!s||1===n)return;const r=this.targetLatency;if(null===r)return;const a=i-r,o=a.05&&this.forwardBufferLength>1){const t=Math.min(2,Math.max(1,n)),i=Math.round(2/(1+Math.exp(-.75*a-this.edgeStalled))*20)/20;e.playbackRate=Math.min(t,Math.max(1,i))}else 1!==e.playbackRate&&0!==e.playbackRate&&(e.playbackRate=1)}estimateLiveEdge(){const{levelDetails:e}=this;return null===e?null:e.edge+e.age}computeLatency(){const e=this.estimateLiveEdge();return null===e?null:e-this.currentTime}constructor(e){this.hls=void 0,this.config=void 0,this.media=null,this.levelDetails=null,this.currentTime=0,this.stallCount=0,this._latency=null,this.timeupdateHandler=()=>this.timeupdate(),this.hls=e,this.config=e.config,this.registerListeners()}}const TE=["NONE","TYPE-0","TYPE-1",null];var wE="",kE="YES",AE="v2";class IE{addDirectives(e){const t=new self.URL(e);return void 0!==this.msn&&t.searchParams.set("_HLS_msn",this.msn.toString()),void 0!==this.part&&t.searchParams.set("_HLS_part",this.part.toString()),this.skip&&t.searchParams.set("_HLS_skip",this.skip),t.href}constructor(e,t,i){this.msn=void 0,this.part=void 0,this.skip=void 0,this.msn=e,this.part=t,this.skip=i}}class xE{get maxBitrate(){return Math.max(this.realBitrate,this.bitrate)}get attrs(){return this._attrs[this._urlId]}get pathwayId(){return this.attrs["PATHWAY-ID"]||"."}get uri(){return this.url[this._urlId]||""}get urlId(){return this._urlId}set urlId(e){const t=e%this.url.length;this._urlId!==t&&(this.fragmentError=0,this.loadError=0,this.details=void 0,this._urlId=t)}get audioGroupId(){var e;return null==(e=this.audioGroupIds)?void 0:e[this.urlId]}get textGroupId(){var e;return null==(e=this.textGroupIds)?void 0:e[this.urlId]}addFallback(e){this.url.push(e.url),this._attrs.push(e.attrs)}constructor(e){this._attrs=void 0,this.audioCodec=void 0,this.bitrate=void 0,this.codecSet=void 0,this.height=void 0,this.id=void 0,this.name=void 0,this.videoCodec=void 0,this.width=void 0,this.unknownCodecs=void 0,this.audioGroupIds=void 0,this.details=void 0,this.fragmentError=0,this.loadError=0,this.loaded=void 0,this.realBitrate=0,this.textGroupIds=void 0,this.url=void 0,this._urlId=0,this.url=[e.url],this._attrs=[e.attrs],this.bitrate=e.bitrate,e.details&&(this.details=e.details),this.id=e.id||0,this.name=e.name,this.width=e.width||0,this.height=e.height||0,this.audioCodec=e.audioCodec,this.videoCodec=e.videoCodec,this.unknownCodecs=e.unknownCodecs,this.codecSet=[e.videoCodec,e.audioCodec].filter((e=>e)).join(",").replace(/\.[^.,]+/g,"")}}function PE(e,t){const i=t.startPTS;if(pb(i)){let s,n=0;t.sn>e.sn?(n=i-e.start,s=e):(n=e.start-i,s=t),s.duration!==n&&(s.duration=n)}else if(t.sn>e.sn){e.cc===t.cc&&e.minEndPTS?t.start=e.start+(e.minEndPTS-e.start):t.start=e.start+e.duration}else t.start=Math.max(e.start-t.duration,0)}function OE(e,t,i,s,n,r){s-i<=0&&(Sb.warn("Fragment should have a positive duration",t),s=i+t.duration,r=n+t.duration);let a=i,o=s;const l=t.startPTS,d=t.endPTS;if(pb(l)){const e=Math.abs(l-i);pb(t.deltaPTS)?t.deltaPTS=Math.max(e,t.deltaPTS):t.deltaPTS=e,a=Math.max(i,l),i=Math.min(i,l),n=Math.min(n,t.startDTS),o=Math.min(s,d),s=Math.max(s,d),r=Math.max(r,t.endDTS)}const c=i-t.start;0!==t.start&&(t.start=i),t.duration=s-t.start,t.startPTS=i,t.maxStartPTS=a,t.startDTS=n,t.endPTS=s,t.minEndPTS=o,t.endDTS=r;const h=t.sn;if(!e||he.endSN)return 0;let u;const p=h-e.startSN,g=e.fragments;for(g[p]=t,u=p;u>0;u--)PE(g[u],g[u-1]);for(u=p;u=0;e--){const t=s[e].initSegment;if(t){i=t;break}}e.fragmentHint&&delete e.fragmentHint.endPTS;let n,r=0;if(function(e,t,i){const s=t.skippedSegments,n=Math.max(e.startSN,t.startSN)-t.startSN,r=(e.fragmentHint?1:0)+(s?t.endSN:Math.min(e.endSN,t.endSN))-t.startSN,a=t.startSN-e.startSN,o=t.fragmentHint?t.fragments.concat(t.fragmentHint):t.fragments,l=e.fragmentHint?e.fragments.concat(e.fragmentHint):e.fragments;for(let e=n;e<=r;e++){const n=l[a+e];let r=o[e];s&&!r&&e{e.relurl&&(r=e.cc-s.cc),pb(e.startPTS)&&pb(e.endPTS)&&(s.start=s.startPTS=e.startPTS,s.startDTS=e.startDTS,s.maxStartPTS=e.maxStartPTS,s.endPTS=e.endPTS,s.endDTS=e.endDTS,s.minEndPTS=e.minEndPTS,s.duration=e.endPTS-e.startPTS,s.duration&&(n=s),t.PTSKnown=t.alignedSliding=!0),s.elementaryStreams=e.elementaryStreams,s.loader=e.loader,s.stats=e.stats,s.urlId=e.urlId,e.initSegment&&(s.initSegment=e.initSegment,i=e.initSegment)})),i){(t.fragmentHint?t.fragments.concat(t.fragmentHint):t.fragments).forEach((e=>{var t;e.initSegment&&e.initSegment.relurl!==(null==(t=i)?void 0:t.relurl)||(e.initSegment=i)}))}if(t.skippedSegments)if(t.deltaUpdateFailed=t.fragments.some((e=>!e)),t.deltaUpdateFailed){Sb.warn("[level-helper] Previous playlist missing segments skipped in delta playlist");for(let e=t.skippedSegments;e--;)t.fragments.shift();t.startSN=t.fragments[0].sn,t.startCC=t.fragments[0].cc}else t.canSkipDateRanges&&(t.dateRanges=function(e,t,i){const s=ub({},e);i&&i.forEach((e=>{delete s[e]}));return Object.keys(t).forEach((e=>{const i=new kb(t[e].attr,s[e]);i.isValid?s[e]=i:Sb.warn(`Ignoring invalid Playlist Delta Update DATERANGE tag: "${JSON.stringify(t[e].attr)}"`)})),s}(e.dateRanges,t.dateRanges,t.recentlyRemovedDateranges));const a=t.fragments;if(r){Sb.warn("discontinuity sliding from playlist, take drift into account");for(let e=0;e{t.elementaryStreams=e.elementaryStreams,t.stats=e.stats})),n?OE(t,n,n.startPTS,n.endPTS,n.startDTS,n.endDTS):LE(e,t),a.length&&(t.totalduration=t.edge-a[0].start),t.driftStartTime=e.driftStartTime,t.driftStart=e.driftStart;const o=t.advancedDateTime;if(t.advanced&&o){const e=t.edge;t.driftStart||(t.driftStartTime=o,t.driftStart=e),t.driftEndTime=o,t.driftEnd=e}else t.driftEndTime=e.driftEndTime,t.driftEnd=e.driftEnd,t.advancedDateTime=e.advancedDateTime}function LE(e,t){const i=t.startSN+t.skippedSegments-e.startSN,s=e.fragments;i<0||i>=s.length||DE(t,s[i].start)}function DE(e,t){if(t){const i=e.fragments;for(let s=e.skippedSegments;s499)}(s)||!!i)}const zE=function(e,t){let i=0,s=e.length-1,n=null,r=null;for(;i<=s;){n=(i+s)/2|0,r=e[n];const a=t(r);if(a>0)i=n+1;else{if(!(a<0))return r;s=n-1}}return null};function HE(e,t,i=0,s=0){let n=null;if(e?n=t[e.sn-t[0].sn+1]||null:0===i&&0===t[0].start&&(n=t[0]),n&&0===$E(i,s,n))return n;const r=zE(t,$E.bind(null,i,s));return!r||r===e&&n?n:r}function $E(e=0,t=0,i){if(i.start<=e&&i.start+i.duration>e)return 0;const s=Math.min(t,i.duration+(i.deltaPTS?i.deltaPTS:0));return i.start+i.duration-s<=e?1:i.start-s>e&&i.start?-1:0}function qE(e,t,i){const s=1e3*Math.min(t,i.duration+(i.deltaPTS?i.deltaPTS:0));return(i.endProgramDateTime||0)-s>e}var GE=0,WE=2,KE=5,YE=0,XE=1,QE=2;function JE(e,t,i){if(performance.now()-e.lastErrorPerfMs>3e5)return!0;const s=e.details;if(t.details===_b.FRAG_GAP&&s&&t.frag){const e=t.frag.start,i=HE(null,s.fragments,e);if(i&&!i.gap)return!0}if(i&&e.errors.length3*s.targetduration)return!0}return!1}class ZE{destroy(){this.clearTimer(),this.hls=this.log=this.warn=null}clearTimer(){clearTimeout(this.timer),this.timer=-1}startLoad(){this.canLoad=!0,this.requestScheduled=-1,this.loadPlaylist()}stopLoad(){this.canLoad=!1,this.clearTimer()}switchParams(e,t){const i=null==t?void 0:t.renditionReports;if(i){let s=-1;for(let n=0;n=0&&e>t.partTarget&&(r+=1)}return new IE(n,r>=0?r:void 0,wE)}}}loadPlaylist(e){-1===this.requestScheduled&&(this.requestScheduled=self.performance.now())}shouldLoadPlaylist(e){return this.canLoad&&!!e&&!!e.url&&(!e.details||e.details.live)}shouldReloadPlaylist(e){return-1===this.timer&&-1===this.requestScheduled&&this.shouldLoadPlaylist(e)}playlistLoaded(e,t,i){const{details:s,stats:n}=t,r=self.performance.now(),a=n.loading.first?Math.max(0,r-n.loading.first):0;if(s.advancedDateTime=Date.now()-a,s.live||null!=i&&i.live){if(s.reloaded(i),i&&this.log(`live playlist ${e} ${s.advanced?"REFRESHED "+s.lastPartSn+"-"+s.lastPartIndex:s.updated?"UPDATED":"MISSED"}`),i&&s.fragments.length>0&&RE(i,s),!this.canLoad||!s.live)return;let a,o,l;if(s.canBlockReload&&s.endSN&&s.advanced){const e=this.hls.config.lowLatencyMode,n=s.lastPartSn,r=s.endSN,d=s.lastPartIndex,c=n===r;-1!==d?(o=c?r+1:n,l=c?e?0:d:d+1):o=r+1;const h=s.age,u=h+s.ageHeader;let p=Math.min(u-s.partTarget,1.5*s.targetduration);if(p>0){if(i&&p>i.tuneInGoal)this.warn(`CDN Tune-in goal increased from: ${i.tuneInGoal} to: ${p} with playlist age: ${s.age}`),p=0;else{const e=Math.floor(p/s.targetduration);if(o+=e,void 0!==l){l+=Math.round(p%s.targetduration/s.partTarget)}this.log(`CDN Tune-in age: ${s.ageHeader}s last advanced ${h.toFixed(2)}s goal: ${p} skip sn ${e} to part ${l}`)}s.tuneInGoal=p}if(a=this.getDeliveryDirectives(s,t.deliveryDirectives,o,l),e||!c)return void this.loadPlaylist(a)}else(s.canBlockReload||s.canSkipUntil)&&(a=this.getDeliveryDirectives(s,t.deliveryDirectives,o,l));const d=this.hls.mainForwardBufferInfo,c=d?d.end-d.len:0,h=function(e,t=1/0){let i=1e3*e.targetduration;if(e.updated){const s=e.fragments,n=4;if(s.length&&i*n>t){const e=1e3*s[s.length-1].duration;ethis.requestScheduled+h&&(this.requestScheduled=n.loading.start),void 0!==o&&s.canBlockReload?this.requestScheduled=n.loading.first+h-(1e3*s.partTarget||1e3):-1===this.requestScheduled||this.requestScheduled+hthis.loadPlaylist(a)),u)}else this.clearTimer()}getDeliveryDirectives(e,t,i,s){let n=function(e,t){const{canSkipUntil:i,canSkipDateRanges:s,endSN:n}=e;return i&&(void 0!==t?t-n:0)=a.maxNumRetry)return!1;if(i&&null!=(l=e.context)&&l.deliveryDirectives)this.warn(`Retrying playlist loading ${r+1}/${a.maxNumRetry} after "${t}" without delivery-directives`),this.loadPlaylist();else{const e=NE(a,r);this.timer=self.setTimeout((()=>this.loadPlaylist()),e),this.warn(`Retrying playlist loading ${r+1}/${a.maxNumRetry} after "${t}" in ${e}ms`)}e.levelRetry=!0,s.resolved=!0}return o}constructor(e,t){this.hls=void 0,this.timer=-1,this.requestScheduled=-1,this.canLoad=!1,this.log=void 0,this.warn=void 0,this.log=Sb.log.bind(Sb,`${t}:`),this.warn=Sb.warn.bind(Sb,`${t}:`),this.hls=e}}let eC;class tC extends ZE{_registerListeners(){const{hls:e}=this;e.on(gb.MANIFEST_LOADING,this.onManifestLoading,this),e.on(gb.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(gb.LEVEL_LOADED,this.onLevelLoaded,this),e.on(gb.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(gb.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),e.on(gb.FRAG_LOADED,this.onFragLoaded,this),e.on(gb.ERROR,this.onError,this)}_unregisterListeners(){const{hls:e}=this;e.off(gb.MANIFEST_LOADING,this.onManifestLoading,this),e.off(gb.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(gb.LEVEL_LOADED,this.onLevelLoaded,this),e.off(gb.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(gb.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),e.off(gb.FRAG_LOADED,this.onFragLoaded,this),e.off(gb.ERROR,this.onError,this)}destroy(){this._unregisterListeners(),this.steering=null,this.resetLevels(),super.destroy()}startLoad(){this._levels.forEach((e=>{e.loadError=0,e.fragmentError=0})),super.startLoad()}resetLevels(){this._startLevel=void 0,this.manualLevelIndex=-1,this.currentLevelIndex=-1,this.currentLevel=null,this._levels=[]}onManifestLoading(e,t){this.resetLevels()}onManifestLoaded(e,t){const i=[],s={};let n;t.levels.forEach((e=>{var t;const r=e.attrs;-1!==(null==(t=e.audioCodec)?void 0:t.indexOf("mp4a.40.34"))&&(eC||(eC=/chrome|firefox/i.test(navigator.userAgent)),eC&&(e.audioCodec=void 0));const{AUDIO:a,CODECS:o,"FRAME-RATE":l,"PATHWAY-ID":d,RESOLUTION:c,SUBTITLES:h}=r,u=`${`${d||"."}-`}${e.bitrate}-${c}-${l}-${o}`;n=s[u],n?n.addFallback(e):(n=new xE(e),s[u]=n,i.push(n)),iC(n,"audio",a),iC(n,"text",h)})),this.filterAndSortMediaOptions(i,t)}filterAndSortMediaOptions(e,t){let i=[],s=[],n=!1,r=!1,a=!1,o=e.filter((({audioCodec:e,videoCodec:t,width:i,height:s,unknownCodecs:o})=>(n||(n=!(!i||!s)),r||(r=!!t),a||(a=!!e),!(null!=o&&o.length)&&(!e||zS(e,"audio"))&&(!t||zS(t,"video")))));if((n||r)&&a&&(o=o.filter((({videoCodec:e,width:t,height:i})=>!!e||!(!t||!i)))),0===o.length)return void Promise.resolve().then((()=>{if(this.hls){const e=new Error("no level with compatible codecs found in manifest");this.hls.trigger(gb.ERROR,{type:mb.MEDIA_ERROR,details:_b.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:t.url,error:e,reason:e.message})}}));t.audioTracks&&(i=t.audioTracks.filter((e=>!e.audioCodec||zS(e.audioCodec,"audio"))),sC(i)),t.subtitles&&(s=t.subtitles,sC(s));const l=o.slice(0);o.sort(((e,t)=>e.attrs["HDCP-LEVEL"]!==t.attrs["HDCP-LEVEL"]?(e.attrs["HDCP-LEVEL"]||"")>(t.attrs["HDCP-LEVEL"]||"")?1:-1:e.bitrate!==t.bitrate?e.bitrate-t.bitrate:e.attrs["FRAME-RATE"]!==t.attrs["FRAME-RATE"]?e.attrs.decimalFloatingPoint("FRAME-RATE")-t.attrs.decimalFloatingPoint("FRAME-RATE"):e.attrs.SCORE!==t.attrs.SCORE?e.attrs.decimalFloatingPoint("SCORE")-t.attrs.decimalFloatingPoint("SCORE"):n&&e.height!==t.height?e.height-t.height:0));let d=l[0];if(this.steering&&(o=this.steering.filterParsedLevels(o),o.length!==l.length))for(let e=0;e!!e.url))};this.hls.trigger(gb.MANIFEST_PARSED,h),(this.hls.config.autoStartLoad||this.hls.forceStartLoad)&&this.hls.startLoad(this.hls.config.startPosition)}get levels(){return 0===this._levels.length?null:this._levels}get level(){return this.currentLevelIndex}set level(e){const t=this._levels;if(0===t.length)return;if(e<0||e>=t.length){const i=new Error("invalid level idx"),s=e<0;if(this.hls.trigger(gb.ERROR,{type:mb.OTHER_ERROR,details:_b.LEVEL_SWITCH_ERROR,level:e,fatal:s,error:i,reason:i.message}),s)return;e=Math.min(e,t.length-1)}const i=this.currentLevelIndex,s=this.currentLevel,n=s?s.attrs["PATHWAY-ID"]:void 0,r=t[e],a=r.attrs["PATHWAY-ID"];if(this.currentLevelIndex=e,this.currentLevel=r,i===e&&r.details&&s&&n===a)return;this.log(`Switching to level ${e}${a?" with Pathway "+a:""} from level ${i}${n?" with Pathway "+n:""}`);const o=ub({},r,{level:e,maxBitrate:r.maxBitrate,attrs:r.attrs,uri:r.uri,urlId:r.urlId});delete o._attrs,delete o._urlId,this.hls.trigger(gb.LEVEL_SWITCHING,o);const l=r.details;if(!l||l.live){const e=this.switchParams(r.uri,null==s?void 0:s.details);this.loadPlaylist(e)}}get manualLevel(){return this.manualLevelIndex}set manualLevel(e){this.manualLevelIndex=e,void 0===this._startLevel&&(this._startLevel=e),-1!==e&&(this.level=e)}get firstLevel(){return this._firstLevel}set firstLevel(e){this._firstLevel=e}get startLevel(){if(void 0===this._startLevel){const e=this.hls.config.startLevel;return void 0!==e?e:this._firstLevel}return this._startLevel}set startLevel(e){this._startLevel=e}onError(e,t){!t.fatal&&t.context&&t.context.type===sE&&t.context.level===this.level&&this.checkRetry(t)}onFragLoaded(e,{frag:t}){if(void 0!==t&&t.type===aE){const e=this._levels[t.level];void 0!==e&&(e.loadError=0)}}onLevelLoaded(e,t){var i;const{level:s,details:n}=t,r=this._levels[s];var a;if(!r)return this.warn(`Invalid level index ${s}`),void(null!=(a=t.deliveryDirectives)&&a.skip&&(n.deltaUpdateFailed=!0));s===this.currentLevelIndex?(0===r.fragmentError&&(r.loadError=0),this.playlistLoaded(s,t,r.details)):null!=(i=t.deliveryDirectives)&&i.skip&&(n.deltaUpdateFailed=!0)}onAudioTrackSwitched(e,t){const i=this.currentLevel;if(!i)return;const s=this.hls.audioTracks[t.id].groupId;if(i.audioGroupIds&&i.audioGroupId!==s){let e=-1;for(let t=0;ti!==t,s=this._levels.filter(((s,n)=>n!==e||(s.url.length>1&&void 0!==t?(s.url=s.url.filter(i),s.audioGroupIds&&(s.audioGroupIds=s.audioGroupIds.filter(i)),s.textGroupIds&&(s.textGroupIds=s.textGroupIds.filter(i)),s.urlId=0,!0):(this.steering&&this.steering.removeLevel(s),!1))));this.hls.trigger(gb.LEVELS_UPDATED,{levels:s})}onLevelsUpdated(e,{levels:t}){t.forEach(((e,t)=>{const{details:i}=e;null!=i&&i.fragments&&i.fragments.forEach((e=>{e.level=t}))})),this._levels=t}constructor(e,t){super(e,"[level-controller]"),this._levels=[],this._firstLevel=-1,this._startLevel=void 0,this.currentLevel=null,this.currentLevelIndex=-1,this.manualLevelIndex=-1,this.steering=void 0,this.onParsedComplete=void 0,this.steering=t,this._registerListeners()}}function iC(e,t,i){i&&("audio"===t?(e.audioGroupIds||(e.audioGroupIds=[]),e.audioGroupIds[e.url.length-1]=i):"text"===t&&(e.textGroupIds||(e.textGroupIds=[]),e.textGroupIds[e.url.length-1]=i))}function sC(e){const t={};e.forEach((e=>{const i=e.groupId||"";e.id=t[i]=t[i]||0,t[i]++}))}var nC="NOT_LOADED",rC="APPENDING",aC="PARTIAL",oC="OK";class lC{_registerListeners(){const{hls:e}=this;e.on(gb.BUFFER_APPENDED,this.onBufferAppended,this),e.on(gb.FRAG_BUFFERED,this.onFragBuffered,this),e.on(gb.FRAG_LOADED,this.onFragLoaded,this)}_unregisterListeners(){const{hls:e}=this;e.off(gb.BUFFER_APPENDED,this.onBufferAppended,this),e.off(gb.FRAG_BUFFERED,this.onFragBuffered,this),e.off(gb.FRAG_LOADED,this.onFragLoaded,this)}destroy(){this._unregisterListeners(),this.fragments=this.activePartLists=this.endListFragments=this.timeRanges=null}getAppendedFrag(e,t){const i=this.activePartLists[t];if(i)for(let t=i.length;t--;){const s=i[t];if(!s)break;const n=s.end;if(s.start<=e&&null!==n&&e<=n)return s}return this.getBufferedFrag(e,t)}getBufferedFrag(e,t){const{fragments:i}=this,s=Object.keys(i);for(let n=s.length;n--;){const r=i[s[n]];if((null==r?void 0:r.body.type)===t&&r.buffered){const t=r.body;if(t.start<=e&&e<=t.end)return t}}return null}detectEvictedFragments(e,t,i,s){this.timeRanges&&(this.timeRanges[e]=t);const n=(null==s?void 0:s.fragment.sn)||-1;Object.keys(this.fragments).forEach((s=>{const r=this.fragments[s];if(!r)return;if(n>=r.body.sn)return;if(!r.buffered&&!r.loaded)return void(r.body.type===i&&this.removeFragment(r.body));const a=r.range[e];a&&a.time.some((e=>{const i=!this.isTimeBuffered(e.startPTS,e.endPTS,t);return i&&this.removeFragment(r.body),i}))}))}detectPartialFragments(e){const t=this.timeRanges,{frag:i,part:s}=e;if(!t||"initSegment"===i.sn)return;const n=cC(i),r=this.fragments[n];if(!r||r.buffered&&i.gap)return;const a=!i.relurl;if(Object.keys(t).forEach((e=>{const n=i.elementaryStreams[e];if(!n)return;const o=t[e],l=a||!0===n.partial;r.range[e]=this.getBufferedTimes(i,s,l,o)})),r.loaded=null,Object.keys(r.range).length){r.buffered=!0;(r.body.endList=i.endList||r.body.endList)&&(this.endListFragments[r.body.type]=r),dC(r)||this.removeParts(i.sn-1,i.type)}else this.removeFragment(r.body)}removeParts(e,t){const i=this.activePartLists[t];i&&(this.activePartLists[t]=i.filter((t=>t.fragment.sn>=e)))}fragBuffered(e,t){const i=cC(e);let s=this.fragments[i];!s&&t&&(s=this.fragments[i]={body:e,appendedPTS:null,loaded:null,buffered:!1,range:Object.create(null)},e.gap&&(this.hasGaps=!0)),s&&(s.loaded=null,s.buffered=!0)}getBufferedTimes(e,t,i,s){const n={time:[],partial:i},r=e.start,a=e.end,o=e.minEndPTS||a,l=e.maxStartPTS||r;for(let e=0;e=t&&o<=i){n.time.push({startPTS:Math.max(r,s.start(e)),endPTS:Math.min(a,s.end(e))});break}if(rt)n.partial=!0,n.time.push({startPTS:Math.max(r,s.start(e)),endPTS:Math.min(a,s.end(e))});else if(a<=t)break}return n}getPartialFragment(e){let t,i,s,n=null,r=0;const{bufferPadding:a,fragments:o}=this;return Object.keys(o).forEach((l=>{const d=o[l];d&&dC(d)&&(i=d.body.start-a,s=d.body.end+a,e>=i&&e<=s&&(t=Math.min(e-i,s-e),r<=t&&(n=d.body,r=t)))})),n}isEndListAppended(e){const t=this.endListFragments[e];return void 0!==t&&(t.buffered||dC(t))}getState(e){const t=cC(e),i=this.fragments[t];return i?i.buffered?dC(i)?aC:oC:rC:nC}isTimeBuffered(e,t,i){let s,n;for(let r=0;r=s&&t<=n)return!0;if(t<=s)return!1}return!1}onFragLoaded(e,t){const{frag:i,part:s}=t;if("initSegment"===i.sn||i.bitrateTest)return;const n=s?null:t,r=cC(i);this.fragments[r]={body:i,appendedPTS:null,loaded:n,buffered:!1,range:Object.create(null)}}onBufferAppended(e,t){const{frag:i,part:s,timeRanges:n}=t;if("initSegment"===i.sn)return;const r=i.type;if(s){let e=this.activePartLists[r];e||(this.activePartLists[r]=e=[]),e.push(s)}this.timeRanges=n,Object.keys(n).forEach((e=>{const t=n[e];this.detectEvictedFragments(e,t,r,s)}))}onFragBuffered(e,t){this.detectPartialFragments(t)}hasFragment(e){const t=cC(e);return!!this.fragments[t]}hasParts(e){var t;return!(null==(t=this.activePartLists[e])||!t.length)}removeFragmentsInRange(e,t,i,s,n){s&&!this.hasGaps||Object.keys(this.fragments).forEach((r=>{const a=this.fragments[r];if(!a)return;const o=a.body;o.type!==i||s&&!o.gap||o.starte&&(a.buffered||n)&&this.removeFragment(o)}))}removeFragment(e){const t=cC(e);e.stats.loaded=0,e.clearElementaryStreamInfo();const i=this.activePartLists[e.type];if(i){const t=e.sn;this.activePartLists[e.type]=i.filter((e=>e.fragment.sn!==t))}delete this.fragments[t],e.endList&&delete this.endListFragments[e.type]}removeAllFragments(){this.fragments=Object.create(null),this.endListFragments=Object.create(null),this.activePartLists=Object.create(null),this.hasGaps=!1}constructor(e){this.activePartLists=Object.create(null),this.endListFragments=Object.create(null),this.fragments=Object.create(null),this.timeRanges=Object.create(null),this.bufferPadding=.2,this.hls=void 0,this.hasGaps=!1,this.hls=e,this._registerListeners()}}function dC(e){var t,i,s;return e.buffered&&(e.body.gap||(null==(t=e.range.video)?void 0:t.partial)||(null==(i=e.range.audio)?void 0:i.partial)||(null==(s=e.range.audiovideo)?void 0:s.partial))}function cC(e){return`${e.type}_${e.level}_${e.urlId}_${e.sn}`}const hC=Math.pow(2,17);class uC{destroy(){this.loader&&(this.loader.destroy(),this.loader=null)}abort(){this.loader&&this.loader.abort()}load(e,t){const i=e.url;if(!i)return Promise.reject(new mC({type:mb.NETWORK_ERROR,details:_b.FRAG_LOAD_ERROR,fatal:!1,frag:e,error:new Error("Fragment does not have a "+(i?"part list":"url")),networkDetails:null}));this.abort();const s=this.config,n=s.fLoader,r=s.loader;return new Promise(((a,o)=>{if(this.loader&&this.loader.destroy(),e.gap){if(e.tagList.some((e=>"GAP"===e[0])))return void o(gC(e));e.gap=!1}const l=this.loader=e.loader=n?new n(s):new r(s),d=pC(e),c=UE(s.fragLoadPolicy.default),h={loadPolicy:c,timeout:c.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0,highWaterMark:"initSegment"===e.sn?1/0:hC};e.stats=l.stats,l.load(d,h,{onSuccess:(t,i,s,n)=>{this.resetLoader(e,l);let r=t.data;s.resetIV&&e.decryptdata&&(e.decryptdata.iv=new Uint8Array(r.slice(0,16)),r=r.slice(16)),a({frag:e,part:null,payload:r,networkDetails:n})},onError:(t,s,n,r)=>{this.resetLoader(e,l),o(new mC({type:mb.NETWORK_ERROR,details:_b.FRAG_LOAD_ERROR,fatal:!1,frag:e,response:cb({url:i,data:void 0},t),error:new Error(`HTTP Error ${t.code} ${t.text}`),networkDetails:n,stats:r}))},onAbort:(t,i,s)=>{this.resetLoader(e,l),o(new mC({type:mb.NETWORK_ERROR,details:_b.INTERNAL_ABORTED,fatal:!1,frag:e,error:new Error("Aborted"),networkDetails:s,stats:t}))},onTimeout:(t,i,s)=>{this.resetLoader(e,l),o(new mC({type:mb.NETWORK_ERROR,details:_b.FRAG_LOAD_TIMEOUT,fatal:!1,frag:e,error:new Error(`Timeout after ${h.timeout}ms`),networkDetails:s,stats:t}))},onProgress:(i,s,n,r)=>{t&&t({frag:e,part:null,payload:n,networkDetails:r})}})}))}loadPart(e,t,i){this.abort();const s=this.config,n=s.fLoader,r=s.loader;return new Promise(((a,o)=>{if(this.loader&&this.loader.destroy(),e.gap||t.gap)return void o(gC(e,t));const l=this.loader=e.loader=n?new n(s):new r(s),d=pC(e,t),c=UE(s.fragLoadPolicy.default),h={loadPolicy:c,timeout:c.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0,highWaterMark:hC};t.stats=l.stats,l.load(d,h,{onSuccess:(s,n,r,o)=>{this.resetLoader(e,l),this.updateStatsFromPart(e,t);const d={frag:e,part:t,payload:s.data,networkDetails:o};i(d),a(d)},onError:(i,s,n,r)=>{this.resetLoader(e,l),o(new mC({type:mb.NETWORK_ERROR,details:_b.FRAG_LOAD_ERROR,fatal:!1,frag:e,part:t,response:cb({url:d.url,data:void 0},i),error:new Error(`HTTP Error ${i.code} ${i.text}`),networkDetails:n,stats:r}))},onAbort:(i,s,n)=>{e.stats.aborted=t.stats.aborted,this.resetLoader(e,l),o(new mC({type:mb.NETWORK_ERROR,details:_b.INTERNAL_ABORTED,fatal:!1,frag:e,part:t,error:new Error("Aborted"),networkDetails:n,stats:i}))},onTimeout:(i,s,n)=>{this.resetLoader(e,l),o(new mC({type:mb.NETWORK_ERROR,details:_b.FRAG_LOAD_TIMEOUT,fatal:!1,frag:e,part:t,error:new Error(`Timeout after ${h.timeout}ms`),networkDetails:n,stats:i}))}})}))}updateStatsFromPart(e,t){const i=e.stats,s=t.stats,n=s.total;if(i.loaded+=s.loaded,n){const s=Math.round(e.duration/t.duration),r=Math.min(Math.round(i.loaded/n),s),a=(s-r)*Math.round(i.loaded/r);i.total=i.loaded+a}else i.total=Math.max(i.loaded,i.total);const r=i.loading,a=s.loading;r.start?r.first+=a.first-a.start:(r.start=a.start,r.first=a.first),r.end=a.end}resetLoader(e,t){e.loader=null,this.loader===t&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),t.destroy()}constructor(e){this.config=void 0,this.loader=null,this.partLoadTimeout=-1,this.config=e}}function pC(e,t=null){const i=t||e,s={frag:e,part:t,responseType:"arraybuffer",url:i.url,headers:{},rangeStart:0,rangeEnd:0},n=i.byteRangeStartOffset,r=i.byteRangeEndOffset;if(pb(n)&&pb(r)){var a;let t=n,i=r;if("initSegment"===e.sn&&"AES-128"===(null==(a=e.decryptdata)?void 0:a.method)){const e=r-n;e%16&&(i=r+(16-e%16)),0!==n&&(s.resetIV=!0,t=n-16)}s.rangeStart=t,s.rangeEnd=i}return s}function gC(e,t){const i=new Error(`GAP ${e.gap?"tag":"attribute"} found`),s={type:mb.MEDIA_ERROR,details:_b.FRAG_GAP,fatal:!1,frag:e,error:i,networkDetails:null};return t&&(s.part=t),(t||e).stats.aborted=!0,new mC(s)}class mC extends Error{constructor(e){super(e.error.message),this.data=void 0,this.data=e}}class _C{abort(e){for(const t in this.keyUriToKeyInfo){const i=this.keyUriToKeyInfo[t].loader;if(i){if(e&&e!==i.context.frag.type)return;i.abort()}}}detach(){for(const e in this.keyUriToKeyInfo){const t=this.keyUriToKeyInfo[e];(t.mediaKeySessionContext||t.decryptdata.isCommonEncryption)&&delete this.keyUriToKeyInfo[e]}}destroy(){this.detach();for(const e in this.keyUriToKeyInfo){const t=this.keyUriToKeyInfo[e].loader;t&&t.destroy()}this.keyUriToKeyInfo={}}createKeyLoadError(e,t=_b.KEY_LOAD_ERROR,i,s,n){return new mC({type:mb.NETWORK_ERROR,details:t,fatal:!1,frag:e,response:n,error:i,networkDetails:s})}loadClear(e,t){if(this.emeController&&this.config.emeEnabled){const{sn:i,cc:s}=e;for(let e=0;e{n.setKeyFormat(e)}));break}}}}load(e){return!e.decryptdata&&e.encrypted&&this.emeController?this.emeController.selectKeySystemFormat(e).then((t=>this.loadInternal(e,t))):this.loadInternal(e)}loadInternal(e,t){var i,s;t&&e.setKeyFormat(t);const n=e.decryptdata;if(!n){const i=new Error(t?`Expected frag.decryptdata to be defined after setting format ${t}`:"Missing decryption data on fragment in onKeyLoading");return Promise.reject(this.createKeyLoadError(e,_b.KEY_LOAD_ERROR,i))}const r=n.uri;if(!r)return Promise.reject(this.createKeyLoadError(e,_b.KEY_LOAD_ERROR,new Error(`Invalid key URI: "${r}"`)));let a=this.keyUriToKeyInfo[r];if(null!=(i=a)&&i.decryptdata.key)return n.key=a.decryptdata.key,Promise.resolve({frag:e,keyInfo:a});var o;if(null!=(s=a)&&s.keyLoadPromise)switch(null==(o=a.mediaKeySessionContext)?void 0:o.keyStatus){case void 0:case"status-pending":case"usable":case"usable-in-future":return a.keyLoadPromise.then((t=>(n.key=t.keyInfo.decryptdata.key,{frag:e,keyInfo:a})))}switch(a=this.keyUriToKeyInfo[r]={decryptdata:n,keyLoadPromise:null,loader:null,mediaKeySessionContext:null},n.method){case"ISO-23001-7":case"SAMPLE-AES":case"SAMPLE-AES-CENC":case"SAMPLE-AES-CTR":return"identity"===n.keyFormat?this.loadKeyHTTP(a,e):this.loadKeyEME(a,e);case"AES-128":return this.loadKeyHTTP(a,e);default:return Promise.reject(this.createKeyLoadError(e,_b.KEY_LOAD_ERROR,new Error(`Key supplied with unsupported METHOD: "${n.method}"`)))}}loadKeyEME(e,t){const i={frag:t,keyInfo:e};if(this.emeController&&this.config.emeEnabled){const t=this.emeController.loadKey(i);if(t)return(e.keyLoadPromise=t.then((t=>(e.mediaKeySessionContext=t,i)))).catch((t=>{throw e.keyLoadPromise=null,t}))}return Promise.resolve(i)}loadKeyHTTP(e,t){const i=this.config,s=new(0,i.loader)(i);return t.keyLoader=e.loader=s,e.keyLoadPromise=new Promise(((n,r)=>{const a={keyInfo:e,frag:t,responseType:"arraybuffer",url:e.decryptdata.uri},o=i.keyLoadPolicy.default,l={loadPolicy:o,timeout:o.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0},d={onSuccess:(e,t,i,s)=>{const{frag:a,keyInfo:o,url:l}=i;if(!a.decryptdata||o!==this.keyUriToKeyInfo[l])return r(this.createKeyLoadError(a,_b.KEY_LOAD_ERROR,new Error("after key load, decryptdata unset or changed"),s));o.decryptdata.key=a.decryptdata.key=new Uint8Array(e.data),a.keyLoader=null,o.loader=null,n({frag:a,keyInfo:o})},onError:(e,i,s,n)=>{this.resetLoader(i),r(this.createKeyLoadError(t,_b.KEY_LOAD_ERROR,new Error(`HTTP Error ${e.code} loading key ${e.text}`),s,cb({url:a.url,data:void 0},e)))},onTimeout:(e,i,s)=>{this.resetLoader(i),r(this.createKeyLoadError(t,_b.KEY_LOAD_TIMEOUT,new Error("key loading timed out"),s))},onAbort:(e,i,s)=>{this.resetLoader(i),r(this.createKeyLoadError(t,_b.INTERNAL_ABORTED,new Error("key loading aborted"),s))}};s.load(a,l,d)}))}resetLoader(e){const{frag:t,keyInfo:i,url:s}=e,n=i.loader;t.keyLoader===n&&(t.keyLoader=null,i.loader=null),delete this.keyUriToKeyInfo[s],n&&n.destroy()}constructor(e){this.config=void 0,this.keyUriToKeyInfo={},this.emeController=null,this.config=e}}class fC{destroy(){this.onHandlerDestroying(),this.onHandlerDestroyed()}onHandlerDestroying(){this.clearNextTick(),this.clearInterval()}onHandlerDestroyed(){}hasInterval(){return!!this._tickInterval}hasNextTick(){return!!this._tickTimer}setInterval(e){return!this._tickInterval&&(this._tickCallCount=0,this._tickInterval=self.setInterval(this._boundTick,e),!0)}clearInterval(){return!!this._tickInterval&&(self.clearInterval(this._tickInterval),this._tickInterval=null,!0)}clearNextTick(){return!!this._tickTimer&&(self.clearTimeout(this._tickTimer),this._tickTimer=null,!0)}tick(){this._tickCallCount++,1===this._tickCallCount&&(this.doTick(),this._tickCallCount>1&&this.tickImmediate(),this._tickCallCount=0)}tickImmediate(){this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)}doTick(){}constructor(){this._boundTick=void 0,this._tickTimer=null,this._tickInterval=null,this._tickCallCount=0,this._boundTick=this.tick.bind(this)}}const vC={length:0,start:()=>0,end:()=>0};class yC{static isBuffered(e,t){try{if(e){const i=yC.getBuffered(e);for(let e=0;e=i.start(e)&&t<=i.end(e))return!0}}catch(e){}return!1}static bufferInfo(e,t,i){try{if(e){const s=yC.getBuffered(e),n=[];let r;for(r=0;rr&&(s[n-1].end=e[t].end):s.push(e[t])}else s.push(e[t])}else s=e;let n,r=0,a=t,o=t;for(let e=0;e=l&&ti.startCC||e&&e.cc>>8^255&i^99,e[p]=i,t[i]=p;const o=u[p],m=u[o],_=u[m];let f=257*u[i]^16843008*i;s[p]=f<<24|f>>>8,n[p]=f<<16|f>>>16,r[p]=f<<8|f>>>24,a[p]=f,f=16843009*_^65537*m^257*o^16843008*p,l[i]=f<<24|f>>>8,d[i]=f<<16|f>>>16,c[i]=f<<8|f>>>24,h[i]=f,p?(p=o^u[u[u[_^o]]],g^=u[u[g]]):p=g=1}}expandKey(e){const t=this.uint8ArrayToUint32Array_(e);let i=!0,s=0;for(;s{if(!s)return Promise.reject(new Error("web crypto not initialized"));this.logOnce("WebCrypto AES decrypt");return new kC(s,new Uint8Array(i)).decrypt(e.buffer,t)})).catch((s=>(Sb.warn(`[decrypter]: WebCrypto Error, disable WebCrypto API, ${s.name}: ${s.message}`),this.onWebCryptoError(e,t,i))))}onWebCryptoError(e,t,i){this.useSoftware=!0,this.logEnabled=!0,this.softwareDecrypt(e,t,i);const s=this.flush();if(s)return s.buffer;throw new Error("WebCrypto and softwareDecrypt: failed to decrypt data")}getValidChunk(e){let t=e;const i=e.length-e.length%16;return i!==e.length&&(t=Kb(e,0,i),this.remainderData=Kb(e,i)),t}logOnce(e){this.logEnabled&&(Sb.log(`[decrypter]: ${e}`),this.logEnabled=!1)}constructor(e,{removePKCS7Padding:t=!0}={}){if(this.logEnabled=!0,this.removePKCS7Padding=void 0,this.subtle=null,this.softwareDecrypter=null,this.key=null,this.fastAesKey=null,this.remainderData=null,this.currentIV=null,this.currentResult=null,this.useSoftware=void 0,this.useSoftware=e.enableSoftwareAES,this.removePKCS7Padding=t,t)try{const e=self.crypto;e&&(this.subtle=e.subtle||e.webkitSubtle)}catch(e){}null===this.subtle&&(this.useSoftware=!0)}}const PC=function(e){let t="";const i=e.length;for(let s=0;sa.end){const e=r>n;(r{if(this.fragContextChanged(e))return this.warn(`Fragment ${e.sn}${t.part?" p: "+t.part.index:""} of level ${e.level} was dropped during download.`),void this.fragmentTracker.removeFragment(e);e.stats.chunkCount++,this._handleFragmentLoadProgress(t)})).then((t=>{if(!t)return;const i=this.state;this.fragContextChanged(e)?(i===DC||!this.fragCurrent&&i===FC)&&(this.fragmentTracker.removeFragment(e),this.state=RC):("payload"in t&&(this.log(`Loaded fragment ${e.sn} of level ${e.level}`),this.hls.trigger(gb.FRAG_LOADED,t)),this._handleFragmentLoadComplete(t))})).catch((t=>{this.state!==OC&&this.state!==UC&&(this.warn(t),this.resetFragmentLoading(e))}))}clearTrackerIfNeeded(e){var t;const{fragmentTracker:i}=this;if(i.getState(e)===rC){const t=e.type,s=this.getFwdBufferInfo(this.mediaBuffer,t),n=Math.max(e.duration,s?s.len:this.config.maxBufferLength);this.reduceMaxBufferLength(n)&&i.removeFragment(e)}else 0===(null==(t=this.mediaBuffer)?void 0:t.buffered.length)?i.removeAllFragments():i.hasParts(e.type)&&(i.detectPartialFragments({frag:e,part:null,stats:e.stats,id:e.type}),i.getState(e)===aC&&i.removeFragment(e))}checkLiveUpdate(e){if(e.updated&&!e.live){const t=e.fragments[e.fragments.length-1];this.fragmentTracker.detectPartialFragments({frag:t,part:null,stats:t.stats,id:t.type})}e.fragments[0]||(e.deltaUpdateFailed=!0)}flushMainBuffer(e,t,i=null){if(!(e-t))return;const s={startOffset:e,endOffset:t,type:i};this.hls.trigger(gb.BUFFER_FLUSHING,s)}_loadInitSegment(e,t){this._doFragLoad(e,t).then((t=>{if(!t||this.fragContextChanged(e)||!this.levels)throw new Error("init load aborted");return t})).then((t=>{const{hls:i}=this,{payload:s}=t,n=e.decryptdata;if(s&&s.byteLength>0&&n&&n.key&&n.iv&&"AES-128"===n.method){const r=self.performance.now();return this.decrypter.decrypt(new Uint8Array(s),n.key.buffer,n.iv.buffer).catch((t=>{throw i.trigger(gb.ERROR,{type:mb.MEDIA_ERROR,details:_b.FRAG_DECRYPT_ERROR,fatal:!1,error:t,reason:t.message,frag:e}),t})).then((s=>{const n=self.performance.now();return i.trigger(gb.FRAG_DECRYPTED,{frag:e,payload:s,stats:{tstart:r,tdecrypt:n}}),t.payload=s,t}))}return t})).then((i=>{const{fragCurrent:s,hls:n,levels:r}=this;if(!r)throw new Error("init load aborted, missing levels");const a=e.stats;this.state=RC,t.fragmentError=0,e.data=new Uint8Array(i.payload),a.parsing.start=a.buffering.start=self.performance.now(),a.parsing.end=a.buffering.end=self.performance.now(),i.frag===s&&n.trigger(gb.FRAG_BUFFERED,{stats:a,frag:s,part:null,id:e.type}),this.tick()})).catch((t=>{this.state!==OC&&this.state!==UC&&(this.warn(t),this.resetFragmentLoading(e))}))}fragContextChanged(e){const{fragCurrent:t}=this;return!e||!t||e.level!==t.level||e.sn!==t.sn||e.urlId!==t.urlId}fragBufferedComplete(e,t){var i,s,n,r;const a=this.mediaBuffer?this.mediaBuffer:this.media;this.log(`Buffered ${e.type} sn: ${e.sn}${t?" part: "+t.index:""} of ${this.playlistType===aE?"level":"track"} ${e.level} (frag:[${(null!=(i=e.startPTS)?i:NaN).toFixed(3)}-${(null!=(s=e.endPTS)?s:NaN).toFixed(3)}] > buffer:${a?PC(yC.getBuffered(a)):"(detached)"})`),this.state=RC,a&&(!this.loadedmetadata&&e.type==aE&&a.buffered.length&&(null==(n=this.fragCurrent)?void 0:n.sn)===(null==(r=this.fragPrevious)?void 0:r.sn)&&(this.loadedmetadata=!0,this.seekToStartPos()),this.tick())}seekToStartPos(){}_handleFragmentLoadComplete(e){const{transmuxer:t}=this;if(!t)return;const{frag:i,part:s,partsLoaded:n}=e,r=!n||0===n.length||n.some((e=>!e)),a=new bC(i.level,i.sn,i.stats.chunkCount+1,0,s?s.index:-1,!r);t.flush(a)}_handleFragmentLoadProgress(e){}_doFragLoad(e,t,i=null,s){var n;const r=null==t?void 0:t.details;if(!this.levels||!r)throw new Error(`frag load aborted, missing level${r?"":" detail"}s`);let a=null;if(!e.encrypted||null!=(n=e.decryptdata)&&n.key?!e.encrypted&&r.encryptedFragments.length&&this.keyLoader.loadClear(e,r.encryptedFragments):(this.log(`Loading key for ${e.sn} of [${r.startSN}-${r.endSN}], ${"[stream-controller]"===this.logPrefix?"level":"track"} ${e.level}`),this.state=LC,this.fragCurrent=e,a=this.keyLoader.load(e).then((e=>{if(!this.fragContextChanged(e.frag))return this.hls.trigger(gb.KEY_LOADED,e),this.state===LC&&(this.state=RC),e})),this.hls.trigger(gb.KEY_LOADING,{frag:e}),null===this.fragCurrent&&(a=Promise.reject(new Error("frag load aborted, context changed in KEY_LOADING")))),i=Math.max(e.start,i||0),this.config.lowLatencyMode&&"initSegment"!==e.sn){const n=r.partList;if(n&&s){i>e.end&&r.fragmentHint&&(e=r.fragmentHint);const o=this.getNextPart(n,e,i);if(o>-1){const l=n[o];let d;return this.log(`Loading part sn: ${e.sn} p: ${l.index} cc: ${e.cc} of playlist [${r.startSN}-${r.endSN}] parts [0-${o}-${n.length-1}] ${"[stream-controller]"===this.logPrefix?"level":"track"}: ${e.level}, target: ${parseFloat(i.toFixed(3))}`),this.nextLoadPosition=l.start+l.duration,this.state=DC,d=a?a.then((i=>!i||this.fragContextChanged(i.frag)?null:this.doFragPartsLoad(e,l,t,s))).catch((e=>this.handleFragLoadError(e))):this.doFragPartsLoad(e,l,t,s).catch((e=>this.handleFragLoadError(e))),this.hls.trigger(gb.FRAG_LOADING,{frag:e,part:l,targetBufferTime:i}),null===this.fragCurrent?Promise.reject(new Error("frag load aborted, context changed in FRAG_LOADING parts")):d}if(!e.url||this.loadedEndOfParts(n,i))return Promise.resolve(null)}}this.log(`Loading fragment ${e.sn} cc: ${e.cc} ${r?"of ["+r.startSN+"-"+r.endSN+"] ":""}${"[stream-controller]"===this.logPrefix?"level":"track"}: ${e.level}, target: ${parseFloat(i.toFixed(3))}`),pb(e.sn)&&!this.bitrateTest&&(this.nextLoadPosition=e.start+e.duration),this.state=DC;const o=this.config.progressive;let l;return l=o&&a?a.then((t=>!t||this.fragContextChanged(null==t?void 0:t.frag)?null:this.fragmentLoader.load(e,s))).catch((e=>this.handleFragLoadError(e))):Promise.all([this.fragmentLoader.load(e,o?s:void 0),a]).then((([e])=>(!o&&e&&s&&s(e),e))).catch((e=>this.handleFragLoadError(e))),this.hls.trigger(gb.FRAG_LOADING,{frag:e,targetBufferTime:i}),null===this.fragCurrent?Promise.reject(new Error("frag load aborted, context changed in FRAG_LOADING")):l}doFragPartsLoad(e,t,i,s){return new Promise(((n,r)=>{var a;const o=[],l=null==(a=i.details)?void 0:a.partList,d=t=>{this.fragmentLoader.loadPart(e,t,s).then((s=>{o[t.index]=s;const r=s.part;this.hls.trigger(gb.FRAG_LOADED,s);const a=ME(i,e.sn,t.index+1)||BE(l,e.sn,t.index+1);if(!a)return n({frag:e,part:r,partsLoaded:o});d(a)})).catch(r)};d(t)}))}handleFragLoadError(e){if("data"in e){const t=e.data;e.data&&t.details===_b.INTERNAL_ABORTED?this.handleFragLoadAborted(t.frag,t.part):this.hls.trigger(gb.ERROR,t)}else this.hls.trigger(gb.ERROR,{type:mb.OTHER_ERROR,details:_b.INTERNAL_EXCEPTION,err:e,error:e,fatal:!0});return null}_handleTransmuxerFlush(e){const t=this.getCurrentContext(e);if(!t||this.state!==FC)return void(this.fragCurrent||this.state===OC||this.state===UC||(this.state=RC));const{frag:i,part:s,level:n}=t,r=self.performance.now();i.stats.parsing.end=r,s&&(s.stats.parsing.end=r),this.updateLevelTiming(i,s,n,e.partial)}getCurrentContext(e){const{levels:t,fragCurrent:i}=this,{level:s,sn:n,part:r}=e;if(null==t||!t[s])return this.warn(`Levels object was unset while buffering fragment ${n} of level ${s}. The current chunk will not be buffered.`),null;const a=t[s],o=r>-1?ME(a,n,r):null,l=o?o.fragment:function(e,t,i){if(null==e||!e.details)return null;const s=e.details;let n=s.fragments[t-s.startSN];return n||(n=s.fragmentHint,n&&n.sn===t?n:tr&&this.flushMainBuffer(a,e.start)}getFwdBufferInfo(e,t){const i=this.getLoadPosition();return pb(i)?this.getFwdBufferInfoAtPos(e,i,t):null}getFwdBufferInfoAtPos(e,t,i){const{config:{maxBufferHole:s}}=this,n=yC.bufferInfo(e,t,s);if(0===n.len&&void 0!==n.nextStart){const r=this.fragmentTracker.getBufferedFrag(t,i);if(r&&n.nextStart=i&&(t.maxMaxBufferLength/=2,this.warn(`Reduce max buffer length to ${t.maxMaxBufferLength}s`),!0)}getAppendedFrag(e,t=aE){const i=this.fragmentTracker.getAppendedFrag(e,aE);return i&&"fragment"in i?i.fragment:i}getNextFragment(e,t){const i=t.fragments,s=i.length;if(!s)return null;const{config:n}=this,r=i[0].start;let a;if(t.live){const r=n.initialLiveManifestSize;if(st}getNextFragmentLoopLoading(e,t,i,s,n){const r=e.gap,a=this.getNextFragment(this.nextLoadPosition,t);if(null===a)return a;if(e=a,r&&e&&!e.gap&&i.nextStart){const t=this.getFwdBufferInfoAtPos(this.mediaBuffer?this.mediaBuffer:this.media,i.nextStart,s);if(null!==t&&i.len+t.len>=n)return this.log(`buffer full after gaps in "${s}" playlist starting at sn: ${e.sn}`),null}return e}mapToInitFragWhenRequired(e){return null==e||!e.initSegment||null!=e&&e.initSegment.data||this.bitrateTest?e:e.initSegment}getNextPart(e,t,i){let s=-1,n=!1,r=!0;for(let a=0,o=e.length;a-1&&ii.start&&i.loaded}getInitialLiveFragment(e,t){const i=this.fragPrevious;let s=null;if(i){if(e.hasProgramDateTime&&(this.log(`Live playlist, switching playlist, load frag with same PDT: ${i.programDateTime}`),s=function(e,t,i){if(null===t||!Array.isArray(e)||!e.length||!pb(t))return null;if(t<(e[0].programDateTime||0))return null;if(t>=(e[e.length-1].endProgramDateTime||0))return null;i=i||0;for(let s=0;s=e.startSN&&n<=e.endSN){const r=t[n-e.startSN];i.cc===r.cc&&(s=r,this.log(`Live playlist, switching playlist, load frag with next SN: ${s.sn}`))}s||(s=function(e,t){return zE(e,(e=>e.cct?-1:0))}(t,i.cc),s&&this.log(`Live playlist, switching playlist, load frag with same CC: ${s.sn}`))}}else{const t=this.hls.liveSyncPosition;null!==t&&(s=this.getFragmentAtPosition(t,this.bitrateTest?e.fragmentEnd:e.edge,e))}return s}getFragmentAtPosition(e,t,i){const{config:s}=this;let{fragPrevious:n}=this,{fragments:r,endSN:a}=i;const{fragmentHint:o}=i,l=s.maxFragLookUpTolerance,d=i.partList,c=!!(s.lowLatencyMode&&null!=d&&d.length&&o);let h;if(c&&o&&!this.bitrateTest&&(r=r.concat(o),a=o.sn),et-l?0:l)}else h=r[r.length-1];if(h){const e=h.sn-i.startSN,t=this.fragmentTracker.getState(h);if((t===oC||t===aC&&h.gap)&&(n=h),n&&h.sn===n.sn&&(!c||d[0].fragment.sn>h.sn)){if(n&&h.level===n.level){const t=r[e+1];h=h.sn=r-t.maxFragLookUpTolerance&&n<=a;if(null!==s&&i.duration>s&&(n${e.startSN} prev-sn: ${n?n.sn:"na"} fragments: ${a}`),i}return o}waitForCdnTuneIn(e){return e.live&&e.canBlockReload&&e.partTarget&&e.tuneInGoal>Math.max(e.partHoldBack,3*e.partTarget)}setStartPosition(e,t){let i=this.startPosition;if(i ${null==(s=this.fragCurrent)?void 0:s.url}`);const n=t.details===_b.FRAG_GAP;n&&this.fragmentTracker.fragBuffered(i,!0);const r=t.errorAction,{action:a,retryCount:o=0,retryConfig:l}=r||{};if(r&&a===KE&&l){var d;this.resetStartWhenNotLoaded(null!=(d=this.levelLastLoaded)?d:i.level);const s=NE(l,o);this.warn(`Fragment ${i.sn} of ${e} ${i.level} errored with ${t.details}, retrying loading ${o+1}/${l.maxNumRetry} in ${s}ms`),r.resolved=!0,this.retryDate=self.performance.now()+s,this.state=MC}else l&&r?(this.resetFragmentErrors(e),o.5;s&&this.reduceMaxBufferLength(i.len);const n=!s;return n&&this.warn(`Buffer full error while media.currentTime is not buffered, flush ${t} buffer`),e.frag&&(this.fragmentTracker.removeFragment(e.frag),this.nextLoadPosition=e.frag.start),this.resetLoadingState(),n}return!1}resetFragmentErrors(e){e===oE&&(this.fragCurrent=null),this.loadedmetadata||(this.startFragRequested=!1),this.state!==OC&&(this.state=RC)}afterBufferFlushed(e,t,i){if(!e)return;const s=yC.getBuffered(e);this.fragmentTracker.detectEvictedFragments(t,s,i),this.state===NC&&this.resetLoadingState()}resetLoadingState(){this.log("Reset loading state"),this.fragCurrent=null,this.fragPrevious=null,this.state=RC}resetStartWhenNotLoaded(e){if(!this.loadedmetadata){this.startFragRequested=!1;const t=this.levels?this.levels[e].details:null;null!=t&&t.live?(this.startPosition=-1,this.setStartPosition(t,0),this.resetLoadingState()):this.nextLoadPosition=this.startPosition}}resetWhenMissingContext(e){var t;this.warn(`The loading context changed while buffering fragment ${e.sn} of level ${e.level}. This chunk will not be buffered.`),this.removeUnbufferedFrags(),this.resetStartWhenNotLoaded(null!=(t=this.levelLastLoaded)?t:e.level),this.resetLoadingState()}removeUnbufferedFrags(e=0){this.fragmentTracker.removeFragmentsInRange(e,1/0,this.playlistType,!1,!0)}updateLevelTiming(e,t,i,s){var n;const r=i.details;if(!r)return void this.warn("level.details undefined");if(Object.keys(e.elementaryStreams).reduce(((t,n)=>{const a=e.elementaryStreams[n];if(a){const o=a.endPTS-a.startPTS;if(o<=0)return this.warn(`Could not parse fragment ${e.sn} ${n} duration reliably (${o})`),t||!1;const l=s?0:OE(r,e,a.startPTS,a.endPTS,a.startDTS,a.endDTS);return this.hls.trigger(gb.LEVEL_PTS_UPDATED,{details:r,level:i,drift:l,type:n,frag:e,start:a.startPTS,end:a.endPTS}),!0}return t}),!1))i.fragmentError=0;else if(null===(null==(n=this.transmuxer)?void 0:n.error)){const t=new Error(`Found no media in fragment ${e.sn} of level ${e.level} resetting transmuxer to fallback to playlist timing`);if(0===i.fragmentError&&(i.fragmentError++,e.gap=!0,this.fragmentTracker.removeFragment(e),this.fragmentTracker.fragBuffered(e,!0)),this.warn(t.message),this.hls.trigger(gb.ERROR,{type:mb.MEDIA_ERROR,details:_b.FRAG_PARSING_ERROR,fatal:!1,error:t,frag:e,reason:`Found no media in msn ${e.sn} of level "${i.url}"`}),!this.hls)return;this.resetTransmuxer()}this.state=jC,this.hls.trigger(gb.FRAG_PARSED,{frag:e,part:t})}resetTransmuxer(){this.transmuxer&&(this.transmuxer.destroy(),this.transmuxer=null)}recoverWorkerError(e){var t,i,s;"demuxerWorker"===e.event&&(this.fragmentTracker.removeAllFragments(),this.resetTransmuxer(),this.resetStartWhenNotLoaded(null!=(t=null!=(i=this.levelLastLoaded)?i:null==(s=this.fragCurrent)?void 0:s.level)?t:0),this.resetLoadingState())}set state(e){const t=this._state;t!==e&&(this._state=e,this.log(`${t}->${e}`))}get state(){return this._state}constructor(e,t,i,s,n){super(),this.hls=void 0,this.fragPrevious=null,this.fragCurrent=null,this.fragmentTracker=void 0,this.transmuxer=null,this._state=OC,this.playlistType=void 0,this.media=null,this.mediaBuffer=null,this.config=void 0,this.bitrateTest=!1,this.lastCurrentTime=0,this.nextLoadPosition=0,this.startPosition=0,this.startTimeOffset=null,this.loadedmetadata=!1,this.retryDate=0,this.levels=null,this.fragmentLoader=void 0,this.keyLoader=void 0,this.levelLastLoaded=null,this.startFragRequested=!1,this.decrypter=void 0,this.initPTS=[],this.onvseeking=null,this.onvended=null,this.logPrefix="",this.log=void 0,this.warn=void 0,this.playlistType=n,this.logPrefix=s,this.log=Sb.log.bind(Sb,`${s}:`),this.warn=Sb.warn.bind(Sb,`${s}:`),this.hls=e,this.fragmentLoader=new uC(e.config),this.keyLoader=i,this.fragmentTracker=t,this.config=e.config,this.decrypter=new xC(e.config),e.on(gb.MANIFEST_LOADED,this.onManifestLoaded,this)}}function $C(){return self.SourceBuffer||self.WebKitSourceBuffer}function qC(e="",t=9e4){return{type:e,id:-1,pid:-1,inputTimeScale:t,sequenceNumber:-1,samples:[],dropped:0}}class GC{resetInitSegment(e,t,i,s){this._id3Track={type:"id3",id:3,pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0}}resetTimeStamp(e){this.initPTS=e,this.resetContiguity()}resetContiguity(){this.basePTS=null,this.lastPTS=null,this.frameIndex=0}canParse(e,t){return!1}appendFrame(e,t,i){}demux(e,t){this.cachedData&&(e=wS(this.cachedData,e),this.cachedData=null);let i,s=Qb(e,0),n=s?s.length:0;const r=this._audioTrack,a=this._id3Track,o=s?(e=>{const t=iS(e);for(let e=0;e0&&a.samples.push({pts:this.lastPTS,dts:this.lastPTS,data:s,type:_E,duration:Number.POSITIVE_INFINITY});n{if(pb(e))return 90*e;return 9e4*t+(i?9e4*i.baseTime/i.timescale:0)};function KC(e,t){return 255===e[t]&&240==(246&e[t+1])}function YC(e,t){return 1&e[t+1]?7:9}function XC(e,t){return(3&e[t+3])<<11|e[t+4]<<3|(224&e[t+5])>>>5}function QC(e,t){return t+1=e.length)return!1;const s=XC(e,t);if(s<=i)return!1;const n=t+s;return n===e.length||QC(e,n)}return!1}function ZC(e,t,i,s,n){if(!e.samplerate){const r=function(e,t,i,s){let n,r,a,o;const l=navigator.userAgent.toLowerCase(),d=s,c=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];n=1+((192&t[i+2])>>>6);const h=(60&t[i+2])>>>2;if(!(h>c.length-1))return a=(1&t[i+2])<<2,a|=(192&t[i+3])>>>6,Sb.log(`manifest codec:${s}, ADTS type:${n}, samplingIndex:${h}`),/firefox/i.test(l)?h>=6?(n=5,o=new Array(4),r=h-3):(n=2,o=new Array(2),r=h):-1!==l.indexOf("android")?(n=2,o=new Array(2),r=h):(n=5,o=new Array(4),s&&(-1!==s.indexOf("mp4a.40.29")||-1!==s.indexOf("mp4a.40.5"))||!s&&h>=6?r=h-3:((s&&-1!==s.indexOf("mp4a.40.2")&&(h>=6&&1===a||/vivaldi/i.test(l))||!s&&1===a)&&(n=2,o=new Array(2)),r=h)),o[0]=n<<3,o[0]|=(14&h)>>1,o[1]|=(1&h)<<7,o[1]|=a<<3,5===n&&(o[1]|=(14&r)>>1,o[2]=(1&r)<<7,o[2]|=8,o[3]=0),{config:o,samplerate:c[h],channelCount:a,codec:"mp4a.40."+n,manifestCodec:d};e.trigger(gb.ERROR,{type:mb.MEDIA_ERROR,details:_b.FRAG_PARSING_ERROR,fatal:!0,reason:`invalid ADTS sampling index:${h}`})}(t,i,s,n);if(!r)return;e.config=r.config,e.samplerate=r.samplerate,e.channelCount=r.channelCount,e.codec=r.codec,e.manifestCodec=r.manifestCodec,Sb.log(`parsed codec:${e.codec}, rate:${r.samplerate}, channels:${r.channelCount}`)}}function eT(e){return 9216e4/e}function tT(e,t,i,s,n){const r=s+n*eT(e.samplerate),a=function(e,t){const i=YC(e,t);if(t+i<=e.length){const s=XC(e,t)-i;if(s>0)return{headerLength:i,frameLength:s}}}(t,i);let o;if(a){const{frameLength:s,headerLength:n}=a,l=n+s,d=Math.max(0,i+l-t.length);d?(o=new Uint8Array(l-n),o.set(t.subarray(i+n,t.length),0)):o=t.subarray(i+n,i+l);const c={unit:o,pts:r};return d||e.samples.push(c),{sample:c,length:l,missing:d}}const l=t.length-i;o=new Uint8Array(l),o.set(t.subarray(i,t.length),0);return{sample:{unit:o,pts:r},length:l,missing:-1}}const iT=/\/emsg[-/]ID3/i;let sT=null;const nT=[32,64,96,128,160,192,224,256,288,320,352,384,416,448,32,48,56,64,80,96,112,128,160,192,224,256,320,384,32,40,48,56,64,80,96,112,128,160,192,224,256,320,32,48,56,64,80,96,112,128,144,160,176,192,224,256,8,16,24,32,40,48,56,64,80,96,112,128,144,160],rT=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],aT=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],oT=[0,1,1,4];function lT(e,t,i,s,n){if(i+24>t.length)return;const r=dT(t,i);if(r&&i+r.frameLength<=t.length){const a=s+n*(9e4*r.samplesPerFrame/r.sampleRate),o={unit:t.subarray(i,i+r.frameLength),pts:a,dts:a};return e.config=[],e.channelCount=r.channelCount,e.samplerate=r.sampleRate,e.samples.push(o),{sample:o,length:r.frameLength,missing:0}}}function dT(e,t){const i=e[t+1]>>3&3,s=e[t+1]>>1&3,n=e[t+2]>>4&15,r=e[t+2]>>2&3;if(1!==i&&0!==n&&15!==n&&3!==r){const a=e[t+2]>>1&1,o=e[t+3]>>6,l=1e3*nT[14*(3===i?3-s:3===s?3:4)+n-1],d=rT[3*(3===i?0:2===i?1:2)+r],c=3===o?1:2,h=aT[i][s],u=oT[s],p=8*h*u,g=Math.floor(h*l/d+a)*u;if(null===sT){const e=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);sT=e?parseInt(e[1]):0}return!!sT&&sT<=87&&2===s&&l>=224e3&&0===o&&(e[t+3]=128|e[t+3]),{sampleRate:d,channelCount:c,frameLength:g,samplesPerFrame:p}}}function cT(e,t){return!(255!==e[t]||224&~e[t+1]||!(6&e[t+1]))}function hT(e,t){return t+1e?(this.word<<=e,this.bitsAvailable-=e):(t=(e-=this.bitsAvailable)>>3,e-=t<<3,this.bytesAvailable-=t,this.loadWord(),this.word<<=e,this.bitsAvailable-=e)}readBits(e){let t=Math.min(this.bitsAvailable,e);const i=this.word>>>32-t;if(e>32&&Sb.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=t,this.bitsAvailable>0)this.word<<=t;else{if(!(this.bytesAvailable>0))throw new Error("no bits available");this.loadWord()}return t=e-t,t>0&&this.bitsAvailable?i<>>e)return this.word<<=e,this.bitsAvailable-=e,e;return this.loadWord(),e+this.skipLZ()}skipUEG(){this.skipBits(1+this.skipLZ())}skipEG(){this.skipBits(1+this.skipLZ())}readUEG(){const e=this.skipLZ();return this.readBits(e+1)-1}readEG(){const e=this.readUEG();return 1&e?1+e>>>1:-1*(e>>>1)}readBoolean(){return 1===this.readBits(1)}readUByte(){return this.readBits(8)}readUShort(){return this.readBits(16)}readUInt(){return this.readBits(32)}skipScalingList(e){let t,i=8,s=8;for(let n=0;n{const r=new Uint8Array(n);s.set(r,16),this.decrypter.isSync()||this.decryptAacSamples(e,t+1,i)}))}decryptAacSamples(e,t,i){for(;;t++){if(t>=e.length)return void i();if(!(e[t].unit.length<32)&&(this.decryptAacSample(e,t,i),!this.decrypter.isSync()))return}}getAvcEncryptedData(e){const t=16*Math.floor((e.length-48)/160)+16,i=new Int8Array(t);let s=0;for(let t=32;t{n.data=this.getAvcDecryptedUnit(r,a),this.decrypter.isSync()||this.decryptAvcSamples(e,t,i+1,s)}))}decryptAvcSamples(e,t,i,s){if(e instanceof Uint8Array)throw new Error("Cannot decrypt samples of type Uint8Array");for(;;t++,i=0){if(t>=e.length)return void s();const n=e[t].units;for(;!(i>=n.length);i++){const r=n[i];if(!(r.data.length<=48||1!==r.type&&5!==r.type||(this.decryptAvcSample(e,t,i,s,r),this.decrypter.isSync())))return}}}constructor(e,t,i){this.keyData=void 0,this.decrypter=void 0,this.keyData=i,this.decrypter=new xC(t,{removePKCS7Padding:!1})}}const mT=188;class _T{static probe(e){const t=_T.syncOffset(e);return t>0&&Sb.warn(`MPEG2-TS detected but first sync word found @ offset ${t}`),-1!==t}static syncOffset(e){const t=e.length;let i=Math.min(940,e.length-mT)+1,s=0;for(;s1&&(0===r&&a>2||o+mT>i))return r}s++}return-1}static createTrack(e,t){return{container:"video"===e||"audio"===e?"video/mp2t":void 0,type:e,id:gS[e],pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0,duration:"audio"===e?t:void 0}}resetInitSegment(e,t,i,s){this.pmtParsed=!1,this._pmtId=-1,this._avcTrack=_T.createTrack("video"),this._audioTrack=_T.createTrack("audio",s),this._id3Track=_T.createTrack("id3"),this._txtTrack=_T.createTrack("text"),this._audioTrack.segmentCodec="aac",this.aacOverFlow=null,this.avcSample=null,this.remainderData=null,this.audioCodec=t,this.videoCodec=i,this._duration=s}resetTimeStamp(){}resetContiguity(){const{_audioTrack:e,_avcTrack:t,_id3Track:i}=this;e&&(e.pesData=null),t&&(t.pesData=null),i&&(i.pesData=null),this.aacOverFlow=null,this.avcSample=null,this.remainderData=null}demux(e,t,i=!1,s=!1){let n;i||(this.sampleAes=null);const r=this._avcTrack,a=this._audioTrack,o=this._id3Track,l=this._txtTrack;let d=r.pid,c=r.pesData,h=a.pid,u=o.pid,p=a.pesData,g=o.pesData,m=null,_=this.pmtParsed,f=this._pmtId,v=e.length;if(this.remainderData&&(v=(e=wS(this.remainderData,e)).length,this.remainderData=null),v>4>1){if(b=t+5+e[t+4],b===t+mT)continue}else b=t+4;switch(v){case d:s&&(c&&(n=ST(c))&&this.parseAVCPES(r,l,n,!1),c={data:[],size:0}),c&&(c.data.push(e.subarray(b,t+mT)),c.size+=t+mT-b);break;case h:if(s){if(p&&(n=ST(p)))switch(a.segmentCodec){case"aac":this.parseAACPES(a,n);break;case"mp3":this.parseMPEGPES(a,n)}p={data:[],size:0}}p&&(p.data.push(e.subarray(b,t+mT)),p.size+=t+mT-b);break;case u:s&&(g&&(n=ST(g))&&this.parseID3PES(o,n),g={data:[],size:0}),g&&(g.data.push(e.subarray(b,t+mT)),g.size+=t+mT-b);break;case 0:s&&(b+=e[b]+1),f=this._pmtId=yT(e,b);break;case f:{s&&(b+=e[b]+1);const n=bT(e,b,this.typeSupported,i);d=n.avc,d>0&&(r.pid=d),h=n.audio,h>0&&(a.pid=h,a.segmentCodec=n.segmentCodec),u=n.id3,u>0&&(o.pid=u),null===m||_||(Sb.warn(`MPEG-TS PMT found at ${t} after unknown PID '${m}'. Backtracking to sync byte @${y} to parse all TS packets.`),m=null,t=y-188),_=this.pmtParsed=!0;break}case 17:case 8191:break;default:m=v}}else b++;if(b>0){const e=new Error(`Found ${b} TS packet/s that do not start with 0x47`);this.observer.emit(gb.ERROR,gb.ERROR,{type:mb.MEDIA_ERROR,details:_b.FRAG_PARSING_ERROR,fatal:!1,error:e,reason:e.message})}r.pesData=c,a.pesData=p,o.pesData=g;const S={audioTrack:a,videoTrack:r,id3Track:o,textTrack:l};return s&&this.extractRemainingSamples(S),S}flush(){const{remainderData:e}=this;let t;return this.remainderData=null,t=e?this.demux(e,-1,!1,!0):{videoTrack:this._avcTrack,audioTrack:this._audioTrack,id3Track:this._id3Track,textTrack:this._txtTrack},this.extractRemainingSamples(t),this.sampleAes?this.decrypt(t,this.sampleAes):t}extractRemainingSamples(e){const{audioTrack:t,videoTrack:i,id3Track:s,textTrack:n}=e,r=i.pesData,a=t.pesData,o=s.pesData;let l;if(r&&(l=ST(r))?(this.parseAVCPES(i,n,l,!0),i.pesData=null):i.pesData=r,a&&(l=ST(a))){switch(t.segmentCodec){case"aac":this.parseAACPES(t,l);break;case"mp3":this.parseMPEGPES(t,l)}t.pesData=null}else null!=a&&a.size&&Sb.log("last AAC PES packet truncated,might overlap between fragments"),t.pesData=a;o&&(l=ST(o))?(this.parseID3PES(s,l),s.pesData=null):s.pesData=o}demuxSampleAes(e,t,i){const s=this.demux(e,i,!0,!this.config.progressive),n=this.sampleAes=new gT(this.observer,this.config,t);return this.decrypt(s,n)}decrypt(e,t){return new Promise((i=>{const{audioTrack:s,videoTrack:n}=e;s.samples&&"aac"===s.segmentCodec?t.decryptAacSamples(s.samples,0,(()=>{n.samples?t.decryptAvcSamples(n.samples,0,0,(()=>{i(e)})):i(e)})):n.samples&&t.decryptAvcSamples(n.samples,0,0,(()=>{i(e)}))}))}destroy(){this._duration=0}parseAVCPES(e,t,i,s){const n=this.parseAVCNALu(e,i.data);let r,a=this.avcSample,o=!1;i.data=null,a&&n.length&&!e.audFound&&(ET(a,e),a=this.avcSample=fT(!1,i.pts,i.dts,"")),n.forEach((s=>{var n;switch(s.type){case 1:{let t=!1;r=!0;const n=s.data;if(o&&n.length>4){const e=new pT(n).readSliceType();2!==e&&4!==e&&7!==e&&9!==e||(t=!0)}var l;if(t)null!=(l=a)&&l.frame&&!a.key&&(ET(a,e),a=this.avcSample=null);a||(a=this.avcSample=fT(!0,i.pts,i.dts,"")),a.frame=!0,a.key=t;break}case 5:r=!0,null!=(n=a)&&n.frame&&!a.key&&(ET(a,e),a=this.avcSample=null),a||(a=this.avcSample=fT(!0,i.pts,i.dts,"")),a.key=!0,a.frame=!0;break;case 6:r=!0,IS(s.data,1,i.pts,t.samples);break;case 7:if(r=!0,o=!0,!e.sps){const t=s.data,i=new pT(t).readSPS();e.width=i.width,e.height=i.height,e.pixelRatio=i.pixelRatio,e.sps=[t],e.duration=this._duration;const n=t.subarray(1,4);let r="avc1.";for(let e=0;e<3;e++){let t=n[e].toString(16);t.length<2&&(t="0"+t),r+=t}e.codec=r}break;case 8:r=!0,e.pps||(e.pps=[s.data]);break;case 9:r=!1,e.audFound=!0,a&&ET(a,e),a=this.avcSample=fT(!1,i.pts,i.dts,"");break;case 12:r=!0;break;default:r=!1,a&&(a.debug+="unknown NAL "+s.type+" ")}if(a&&r){a.units.push(s)}})),s&&a&&(ET(a,e),this.avcSample=null)}getLastNalUnit(e){var t;let i,s=this.avcSample;if(s&&0!==s.units.length||(s=e[e.length-1]),null!=(t=s)&&t.units){const e=s.units;i=e[e.length-1]}return i}parseAVCNALu(e,t){const i=t.byteLength;let s=e.naluState||0;const n=s,r=[];let a,o,l,d=0,c=-1,h=0;for(-1===s&&(c=0,h=31&t[0],s=0,d=1);d=0){const e={data:t.subarray(c,d-s-1),type:h};r.push(e)}else{const i=this.getLastNalUnit(e.samples);if(i&&(n&&d<=4-n&&i.state&&(i.data=i.data.subarray(0,i.data.byteLength-n)),o=d-s-1,o>0)){const e=new Uint8Array(i.data.byteLength+o);e.set(i.data,0),e.set(t.subarray(0,o),i.data.byteLength),i.data=e,i.state=0}}d=0&&s>=0){const e={data:t.subarray(c,i),type:h,state:s};r.push(e)}if(0===r.length){const i=this.getLastNalUnit(e.samples);if(i){const e=new Uint8Array(i.data.byteLength+t.byteLength);e.set(i.data,0),e.set(t,i.data.byteLength),i.data=e}}return e.naluState=s,r}parseAACPES(e,t){let i=0;const s=this.aacOverFlow;let n,r,a,o=t.data;if(s){this.aacOverFlow=null;const t=s.missing,n=s.sample.unit.byteLength;if(-1===t){const e=new Uint8Array(n+o.byteLength);e.set(s.sample.unit,0),e.set(o,n),o=e}else{const r=n-t;s.sample.unit.set(o.subarray(0,t),r),e.samples.push(s.sample),i=s.missing}}for(n=i,r=o.length;n1;){const e=new Uint8Array(o[0].length+o[1].length);e.set(o[0]),e.set(o[1],o[0].length),o[0]=e,o.splice(1,1)}t=o[0];if(1===(t[0]<<16)+(t[1]<<8)+t[2]){if(i=(t[4]<<8)+t[5],i&&i>e.size-6)return null;const l=t[7];192&l&&(n=536870912*(14&t[9])+4194304*(255&t[10])+16384*(254&t[11])+128*(255&t[12])+(254&t[13])/2,64&l?(r=536870912*(14&t[14])+4194304*(255&t[15])+16384*(254&t[16])+128*(255&t[17])+(254&t[18])/2,n-r>54e5&&(Sb.warn(`${Math.round((n-r)/9e4)}s delta between PTS and DTS, align them`),n=r)):r=n),s=t[8];let d=s+9;if(e.size<=d)return null;e.size-=d;const c=new Uint8Array(e.size);for(let e=0,i=o.length;ei){d-=i;continue}t=t.subarray(d),i-=d,d=0}c.set(t,a),a+=i}return i&&(i-=s+3),{data:c,pts:n,dts:r,len:i}}return null}function ET(e,t){if(e.units.length&&e.frame){if(void 0===e.pts){const i=t.samples,s=i.length;if(!s)return void t.dropped++;{const t=i[s-1];e.pts=t.pts,e.dts=t.dts}}t.samples.push(e)}e.debug.length&&Sb.log(e.pts+"/"+e.dts+":"+e.debug)}class CT{static getSilentFrame(e,t){if("mp4a.40.2"===e){if(1===t)return new Uint8Array([0,200,0,128,35,128]);if(2===t)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(3===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(4===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(5===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(6===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224])}else{if(1===t)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(2===t)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(3===t)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94])}}}const TT=Math.pow(2,32)-1;class wT{static init(){let e;for(e in wT.types={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],".mp3":[],mvex:[],mvhd:[],pasp:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[]},wT.types)wT.types.hasOwnProperty(e)&&(wT.types[e]=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]);const t=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),i=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]);wT.HDLR_TYPES={video:t,audio:i};const s=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),n=new Uint8Array([0,0,0,0,0,0,0,0]);wT.STTS=wT.STSC=wT.STCO=n,wT.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),wT.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),wT.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),wT.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);const r=new Uint8Array([105,115,111,109]),a=new Uint8Array([97,118,99,49]),o=new Uint8Array([0,0,0,1]);wT.FTYP=wT.box(wT.types.ftyp,r,o,r,a),wT.DINF=wT.box(wT.types.dinf,wT.box(wT.types.dref,s))}static box(e,...t){let i=8,s=t.length;const n=s;for(;s--;)i+=t[s].byteLength;const r=new Uint8Array(i);for(r[0]=i>>24&255,r[1]=i>>16&255,r[2]=i>>8&255,r[3]=255&i,r.set(e,4),s=0,i=8;s>24&255,e>>16&255,e>>8&255,255&e,i>>24,i>>16&255,i>>8&255,255&i,s>>24,s>>16&255,s>>8&255,255&s,85,196,0,0]))}static mdia(e){return wT.box(wT.types.mdia,wT.mdhd(e.timescale,e.duration),wT.hdlr(e.type),wT.minf(e))}static mfhd(e){return wT.box(wT.types.mfhd,new Uint8Array([0,0,0,0,e>>24,e>>16&255,e>>8&255,255&e]))}static minf(e){return"audio"===e.type?wT.box(wT.types.minf,wT.box(wT.types.smhd,wT.SMHD),wT.DINF,wT.stbl(e)):wT.box(wT.types.minf,wT.box(wT.types.vmhd,wT.VMHD),wT.DINF,wT.stbl(e))}static moof(e,t,i){return wT.box(wT.types.moof,wT.mfhd(e),wT.traf(i,t))}static moov(e){let t=e.length;const i=[];for(;t--;)i[t]=wT.trak(e[t]);return wT.box.apply(null,[wT.types.moov,wT.mvhd(e[0].timescale,e[0].duration)].concat(i).concat(wT.mvex(e)))}static mvex(e){let t=e.length;const i=[];for(;t--;)i[t]=wT.trex(e[t]);return wT.box.apply(null,[wT.types.mvex,...i])}static mvhd(e,t){t*=e;const i=Math.floor(t/(TT+1)),s=Math.floor(t%(TT+1)),n=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,e>>24&255,e>>16&255,e>>8&255,255&e,i>>24,i>>16&255,i>>8&255,255&i,s>>24,s>>16&255,s>>8&255,255&s,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return wT.box(wT.types.mvhd,n)}static sdtp(e){const t=e.samples||[],i=new Uint8Array(4+t.length);let s,n;for(s=0;s>>8&255),n.push(255&s),n=n.concat(Array.prototype.slice.call(i));for(t=0;t>>8&255),r.push(255&s),r=r.concat(Array.prototype.slice.call(i));const a=wT.box(wT.types.avcC,new Uint8Array([1,n[3],n[4],n[5],255,224|e.sps.length].concat(n).concat([e.pps.length]).concat(r))),o=e.width,l=e.height,d=e.pixelRatio[0],c=e.pixelRatio[1];return wT.box(wT.types.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,o>>8&255,255&o,l>>8&255,255&l,0,72,0,0,0,72,0,0,0,0,0,0,0,1,18,100,97,105,108,121,109,111,116,105,111,110,47,104,108,115,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),a,wT.box(wT.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),wT.box(wT.types.pasp,new Uint8Array([d>>24,d>>16&255,d>>8&255,255&d,c>>24,c>>16&255,c>>8&255,255&c])))}static esds(e){const t=e.config.length;return new Uint8Array([0,0,0,0,3,23+t,0,1,0,4,15+t,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([t]).concat(e.config).concat([6,1,2]))}static mp4a(e){const t=e.samplerate;return wT.box(wT.types.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,e.channelCount,0,16,0,0,0,0,t>>8&255,255&t,0,0]),wT.box(wT.types.esds,wT.esds(e)))}static mp3(e){const t=e.samplerate;return wT.box(wT.types[".mp3"],new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,e.channelCount,0,16,0,0,0,0,t>>8&255,255&t,0,0]))}static stsd(e){return"audio"===e.type?"mp3"===e.segmentCodec&&"mp3"===e.codec?wT.box(wT.types.stsd,wT.STSD,wT.mp3(e)):wT.box(wT.types.stsd,wT.STSD,wT.mp4a(e)):wT.box(wT.types.stsd,wT.STSD,wT.avc1(e))}static tkhd(e){const t=e.id,i=e.duration*e.timescale,s=e.width,n=e.height,r=Math.floor(i/(TT+1)),a=Math.floor(i%(TT+1));return wT.box(wT.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,t>>24&255,t>>16&255,t>>8&255,255&t,0,0,0,0,r>>24,r>>16&255,r>>8&255,255&r,a>>24,a>>16&255,a>>8&255,255&a,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,s>>8&255,255&s,0,0,n>>8&255,255&n,0,0]))}static traf(e,t){const i=wT.sdtp(e),s=e.id,n=Math.floor(t/(TT+1)),r=Math.floor(t%(TT+1));return wT.box(wT.types.traf,wT.box(wT.types.tfhd,new Uint8Array([0,0,0,0,s>>24,s>>16&255,s>>8&255,255&s])),wT.box(wT.types.tfdt,new Uint8Array([1,0,0,0,n>>24,n>>16&255,n>>8&255,255&n,r>>24,r>>16&255,r>>8&255,255&r])),wT.trun(e,i.length+16+20+8+16+8+8),i)}static trak(e){return e.duration=e.duration||4294967295,wT.box(wT.types.trak,wT.tkhd(e),wT.mdia(e))}static trex(e){const t=e.id;return wT.box(wT.types.trex,new Uint8Array([0,0,0,0,t>>24,t>>16&255,t>>8&255,255&t,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))}static trun(e,t){const i=e.samples||[],s=i.length,n=12+16*s,r=new Uint8Array(n);let a,o,l,d,c,h;for(t+=8+n,r.set(["video"===e.type?1:0,0,15,1,s>>>24&255,s>>>16&255,s>>>8&255,255&s,t>>>24&255,t>>>16&255,t>>>8&255,255&t],0),a=0;a>>24&255,l>>>16&255,l>>>8&255,255&l,d>>>24&255,d>>>16&255,d>>>8&255,255&d,c.isLeading<<2|c.dependsOn,c.isDependedOn<<6|c.hasRedundancy<<4|c.paddingValue<<1|c.isNonSync,61440&c.degradPrio,15&c.degradPrio,h>>>24&255,h>>>16&255,h>>>8&255,255&h],12+16*a);return wT.box(wT.types.trun,r)}static initSegment(e){wT.types||wT.init();const t=wT.moov(e),i=new Uint8Array(wT.FTYP.byteLength+t.byteLength);return i.set(wT.FTYP),i.set(t,wT.FTYP.byteLength),i}}wT.types=void 0,wT.HDLR_TYPES=void 0,wT.STTS=void 0,wT.STSC=void 0,wT.STCO=void 0,wT.STSZ=void 0,wT.VMHD=void 0,wT.SMHD=void 0,wT.STSD=void 0,wT.FTYP=void 0,wT.DINF=void 0;function kT(e,t,i=1,s=!1){const n=e*t*i;return s?Math.round(n):n}function AT(e,t=!1){return kT(e,1e3,1/9e4,t)}let IT,xT=null,PT=null;class OT{destroy(){}resetTimeStamp(e){Sb.log("[mp4-remuxer]: initPTS & initDTS reset"),this._initPTS=this._initDTS=e}resetNextTimestamp(){Sb.log("[mp4-remuxer]: reset next timestamp"),this.isVideoContiguous=!1,this.isAudioContiguous=!1}resetInitSegment(){Sb.log("[mp4-remuxer]: ISGenerated flag reset"),this.ISGenerated=!1}getVideoStartPts(e){let t=!1;const i=e.reduce(((e,i)=>{const s=i.pts-e;return s<-4294967296?(t=!0,RT(e,i.pts)):s>0?e:i.pts}),e[0].pts);return t&&Sb.debug("PTS rollover detected"),i}remux(e,t,i,s,n,r,a,o){let l,d,c,h,u,p,g=n,m=n;const _=e.pid>-1,f=t.pid>-1,v=t.samples.length,y=e.samples.length>0,b=a&&v>0||v>1;if((!_||y)&&(!f||b)||this.ISGenerated||a){this.ISGenerated||(c=this.generateIS(e,t,n,r));const i=this.isVideoContiguous;let s,a=-1;if(b&&(a=function(e){for(let t=0;t0){Sb.warn(`[mp4-remuxer]: Dropped ${a} out of ${v} video samples due to a missing keyframe`);const e=this.getVideoStartPts(t.samples);t.samples=t.samples.slice(a),t.dropped+=a,m+=(t.samples[0].pts-e)/t.inputTimeScale,s=m}else-1===a&&(Sb.warn(`[mp4-remuxer]: No keyframe found out of ${v} video samples`),p=!1);if(this.ISGenerated){if(y&&b){const i=this.getVideoStartPts(t.samples),s=(RT(e.samples[0].pts,i)-i)/t.inputTimeScale;g+=Math.max(0,s),m+=Math.max(0,-s)}if(y){if(e.samplerate||(Sb.warn("[mp4-remuxer]: regenerate InitSegment as audio detected"),c=this.generateIS(e,t,n,r)),d=this.remuxAudio(e,g,this.isAudioContiguous,r,f||b||o===oE?m:void 0),b){const s=d?d.endPTS-d.startPTS:0;t.inputTimeScale||(Sb.warn("[mp4-remuxer]: regenerate InitSegment as video detected"),c=this.generateIS(e,t,n,r)),l=this.remuxVideo(t,m,i,s)}}else b&&(l=this.remuxVideo(t,m,i,0));l&&(l.firstKeyFrame=a,l.independent=-1!==a,l.firstKeyFramePTS=s)}}return this.ISGenerated&&this._initPTS&&this._initDTS&&(i.samples.length&&(u=LT(i,n,this._initPTS,this._initDTS)),s.samples.length&&(h=DT(s,n,this._initPTS))),{audio:d,video:l,initSegment:c,independent:p,text:h,id3:u}}generateIS(e,t,i,s){const n=e.samples,r=t.samples,a=this.typeSupported,o={},l=this._initPTS;let d,c,h,u=!l||s,p="audio/mp4";if(u&&(d=c=1/0),e.config&&n.length){if(e.timescale=e.samplerate,"mp3"===e.segmentCodec)a.mpeg?(p="audio/mpeg",e.codec=""):a.mp3&&(e.codec="mp3");o.audio={id:"audio",container:p,codec:e.codec,initSegment:"mp3"===e.segmentCodec&&a.mpeg?new Uint8Array(0):wT.initSegment([e]),metadata:{channelCount:e.channelCount}},u&&(h=e.inputTimeScale,l&&h===l.timescale?u=!1:d=c=n[0].pts-Math.round(h*i))}if(t.sps&&t.pps&&r.length&&(t.timescale=t.inputTimeScale,o.video={id:"main",container:"video/mp4",codec:t.codec,initSegment:wT.initSegment([t]),metadata:{width:t.width,height:t.height}},u))if(h=t.inputTimeScale,l&&h===l.timescale)u=!1;else{const e=this.getVideoStartPts(r),t=Math.round(h*i);c=Math.min(c,RT(r[0].dts,e)-t),d=Math.min(d,e-t)}if(Object.keys(o).length)return this.ISGenerated=!0,u?(this._initPTS={baseTime:d,timescale:h},this._initDTS={baseTime:c,timescale:h}):d=h=void 0,{tracks:o,initPTS:d,timescale:h}}remuxVideo(e,t,i,s){const n=e.inputTimeScale,r=e.samples,a=[],o=r.length,l=this._initPTS;let d,c,h=this.nextAvcDts,u=8,p=this.videoSampleDuration,g=Number.POSITIVE_INFINITY,m=Number.NEGATIVE_INFINITY,_=!1;if(!i||null===h){h=t*n-(r[0].pts-RT(r[0].dts,r[0].pts))}const f=l.baseTime*n/l.timescale;for(let e=0;e0?e-1:e].dts&&(_=!0)}_&&r.sort((function(e,t){const i=e.dts-t.dts,s=e.pts-t.pts;return i||s})),d=r[0].dts,c=r[r.length-1].dts;const v=c-d,y=v?Math.round(v/(o-1)):p||e.inputTimeScale/30;if(i){const e=d-h,t=e>y,i=e<-1;if((t||i)&&(t?Sb.warn(`AVC: ${AT(e,!0)} ms (${e}dts) hole between fragments detected, filling it`):Sb.warn(`AVC: ${AT(-e,!0)} ms (${e}dts) overlapping between fragments detected`),!i||h>=r[0].pts)){d=h;const t=r[0].pts-e;r[0].dts=d,r[0].pts=t,Sb.log(`Video: First PTS/DTS adjusted: ${AT(t,!0)}/${AT(d,!0)}, delta: ${AT(e,!0)} ms`)}}d=Math.max(0,d);let b=0,S=0;for(let e=0;e0?t.dts-r[e-1].dts:y;if(l=e>0?t.pts-r[e-1].pts:y,i.stretchShortVideoTrack&&null!==this.nextAudioPts){const e=Math.floor(i.maxBufferHole*n),r=(s?g+s*n:this.nextAudioPts)-t.pts;r>e?(p=r-a,p<0?p=a:w=!0,Sb.log(`[mp4-remuxer]: It is approximately ${r/90} ms to the next segment; using duration ${p/90} ms for the last video frame.`)):p=a}else p=a}const c=Math.round(t.pts-t.dts);k=Math.min(k,p),I=Math.max(I,p),A=Math.min(A,l),x=Math.max(x,l),a.push(new MT(t.key,p,d,c))}if(a.length)if(xT){if(xT<70){const e=a[0].flags;e.dependsOn=2,e.isNonSync=0}}else if(PT&&x-A0&&(s&&Math.abs(_-m)<9e3||Math.abs(RT(p[0].pts-f,_)-m)<20*l),p.forEach((function(e){e.pts=RT(e.pts-f,_)})),!i||m<0){if(p=p.filter((e=>e.pts>=0)),!p.length)return;m=0===n?0:s&&!u?Math.max(0,_):p[0].pts}if("aac"===e.segmentCodec){const t=this.config.maxAudioFramesDrift;for(let i=0,s=m;i=t*l&&d<1e4&&u){let t=Math.round(o/l);s=a-t*l,s<0&&(t--,s+=l),0===i&&(this.nextAudioPts=m=s),Sb.warn(`[mp4-remuxer]: Injecting ${t} audio frame @ ${(s/r).toFixed(3)}s due to ${Math.round(1e3*o/r)} ms gap.`);for(let r=0;r0))return;S+=g;try{v=new Uint8Array(S)}catch(e){return void this.observer.emit(gb.ERROR,gb.ERROR,{type:mb.MUX_ERROR,details:_b.REMUX_ALLOC_ERROR,fatal:!1,error:e,bytes:S,reason:`fail allocating audio mdat ${S}`})}if(!c){new DataView(v.buffer).setUint32(0,S),v.set(wT.types.mdat,4)}}v.set(n,g);const l=n.byteLength;g+=l,h.push(new MT(!0,o,l,0)),b=r}const C=h.length;if(!C)return;const T=h[h.length-1];this.nextAudioPts=m=b+a*T.duration;const w=c?new Uint8Array(0):wT.moof(e.sequenceNumber++,y/a,ub({},e,{samples:h}));e.samples=[];const k=y/r,A=m/r,I={data1:w,data2:v,startPTS:k,endPTS:A,startDTS:k,endDTS:A,type:"audio",hasAudio:!0,hasVideo:!1,nb:C};return this.isAudioContiguous=!0,I}remuxEmptyAudio(e,t,i,s){const n=e.inputTimeScale,r=n/(e.samplerate?e.samplerate:n),a=this.nextAudioPts,o=this._initDTS,l=9e4*o.baseTime/o.timescale,d=(null!==a?a:s.startDTS*n)+l,c=s.endDTS*n+l,h=1024*r,u=Math.ceil((c-d)/h),p=CT.getSilentFrame(e.manifestCodec||e.codec,e.channelCount);if(Sb.warn("[mp4-remuxer]: remux empty Audio"),!p)return void Sb.trace("[mp4-remuxer]: Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec");const g=[];for(let e=0;e4294967296;)e+=i;return e}function LT(e,t,i,s){const n=e.samples.length;if(!n)return;const r=e.inputTimeScale;for(let a=0;ae.pts-t.pts));const r=e.samples;return e.samples=[],{samples:r}}class MT{constructor(e,t,i,s){this.size=void 0,this.duration=void 0,this.cts=void 0,this.flags=void 0,this.duration=t,this.size=i,this.cts=s,this.flags=new BT(e)}}class BT{constructor(e){this.isLeading=0,this.isDependedOn=0,this.hasRedundancy=0,this.degradPrio=0,this.dependsOn=1,this.isNonSync=1,this.dependsOn=e?2:1,this.isNonSync=e?0:1}}function FT(e,t){const i=null==e?void 0:e.codec;return i&&i.length>4?i:"hvc1"===i||"hev1"===i?"hvc1.1.6.L120.90":"av01"===i?"av01.0.04M.08":"avc1"===i||t===xb?"avc1.42e01e":"mp4a.40.5"}try{IT=self.performance.now.bind(self.performance)}catch(e){Sb.debug("Unable to use Performance API on this environment"),IT="undefined"!=typeof self&&self.Date.now}const jT=[{demux:class{resetTimeStamp(){}resetInitSegment(e,t,i,s){const n=this.videoTrack=qC("video",1),r=this.audioTrack=qC("audio",1),a=this.txtTrack=qC("text",1);if(this.id3Track=qC("id3",1),this.timeOffset=0,null==e||!e.byteLength)return;const o=ES(e);if(o.video){const{id:e,timescale:t,codec:i}=o.video;n.id=e,n.timescale=a.timescale=t,n.codec=i}if(o.audio){const{id:e,timescale:t,codec:i}=o.audio;r.id=e,r.timescale=t,r.codec=i}a.id=gS.text,n.sampleDuration=0,n.duration=r.duration=s}resetContiguity(){this.remainderData=null}static probe(e){return bS(e=e.length>16384?e.subarray(0,16384):e,["moof"]).length>0}demux(e,t){this.timeOffset=t;let i=e;const s=this.videoTrack,n=this.txtTrack;if(this.config.progressive){this.remainderData&&(i=wS(this.remainderData,e));const t=function(e){const t={valid:null,remainder:null},i=bS(e,["moof"]);if(!i)return t;if(i.length<2)return t.remainder=e,t;const s=i[i.length-1];return t.valid=Kb(e,0,s.byteOffset-8),t.remainder=Kb(e,s.byteOffset-8),t}(i);this.remainderData=t.remainder,s.samples=t.valid||new Uint8Array}else s.samples=i;const r=this.extractID3Track(s,t);return n.samples=kS(t,s),{videoTrack:s,audioTrack:this.audioTrack,id3Track:r,textTrack:this.txtTrack}}flush(){const e=this.timeOffset,t=this.videoTrack,i=this.txtTrack;t.samples=this.remainderData||new Uint8Array,this.remainderData=null;const s=this.extractID3Track(t,this.timeOffset);return i.samples=kS(e,t),{videoTrack:t,audioTrack:qC(),id3Track:s,textTrack:qC()}}extractID3Track(e,t){const i=this.id3Track;if(e.samples.length){const s=bS(e.samples,["emsg"]);s&&s.forEach((e=>{const s=function(e){const t=e[0];let i="",s="",n=0,r=0,a=0,o=0,l=0,d=0;if(0===t){for(;"\0"!==mS(e.subarray(d,d+1));)i+=mS(e.subarray(d,d+1)),d+=1;for(i+=mS(e.subarray(d,d+1)),d+=1;"\0"!==mS(e.subarray(d,d+1));)s+=mS(e.subarray(d,d+1)),d+=1;s+=mS(e.subarray(d,d+1)),d+=1,n=fS(e,12),r=fS(e,16),o=fS(e,20),l=fS(e,24),d=28}else if(1===t){d+=4,n=fS(e,d),d+=4;const t=fS(e,d);d+=4;const r=fS(e,d);for(d+=4,a=2**32*t+r,Number.isSafeInteger(a)||(a=Number.MAX_SAFE_INTEGER,Sb.warn("Presentation time exceeds safe integer limit and wrapped to max safe integer in parsing emsg box")),o=fS(e,d),d+=4,l=fS(e,d),d+=4;"\0"!==mS(e.subarray(d,d+1));)i+=mS(e.subarray(d,d+1)),d+=1;for(i+=mS(e.subarray(d,d+1)),d+=1;"\0"!==mS(e.subarray(d,d+1));)s+=mS(e.subarray(d,d+1)),d+=1;s+=mS(e.subarray(d,d+1)),d+=1}return{schemeIdUri:i,value:s,timeScale:n,presentationTime:a,presentationTimeDelta:r,eventDuration:o,id:l,payload:e.subarray(d,e.byteLength)}}(e);if(iT.test(s.schemeIdUri)){const e=pb(s.presentationTime)?s.presentationTime/s.timeScale:t+s.presentationTimeDelta/s.timeScale;let n=4294967295===s.eventDuration?Number.POSITIVE_INFINITY:s.eventDuration/s.timeScale;n<=.001&&(n=Number.POSITIVE_INFINITY);const r=s.payload;i.samples.push({data:r,len:r.byteLength,dts:e,pts:e,type:vE,duration:n})}}))}return i}demuxSampleAes(e,t,i){return Promise.reject(new Error("The MP4 demuxer does not support SAMPLE-AES decryption"))}destroy(){}constructor(e,t){this.remainderData=null,this.timeOffset=0,this.config=void 0,this.videoTrack=void 0,this.audioTrack=void 0,this.id3Track=void 0,this.txtTrack=void 0,this.config=t}},remux:class{destroy(){}resetTimeStamp(e){this.initPTS=e,this.lastEndTime=null}resetNextTimestamp(){this.lastEndTime=null}resetInitSegment(e,t,i,s){this.audioCodec=t,this.videoCodec=i,this.generateInitSegment(function(e,t){if(!e||!t)return e;const i=t.keyId;i&&t.isCommonEncryption&&bS(e,["moov","trak"]).forEach((e=>{const t=bS(e,["mdia","minf","stbl","stsd"])[0].subarray(8);let s=bS(t,["enca"]);const n=s.length>0;n||(s=bS(t,["encv"])),s.forEach((e=>{bS(n?e.subarray(28):e.subarray(78),["sinf"]).forEach((e=>{const t=CS(e);if(t){const e=t.subarray(8,24);e.some((e=>0!==e))||(Sb.log(`[eme] Patching keyId in 'enc${n?"a":"v"}>sinf>>tenc' box: ${hS(e)} -> ${hS(i)}`),t.set(i,8))}}))}))}));return e}(e,s)),this.emitInitSegment=!0}generateInitSegment(e){let{audioCodec:t,videoCodec:i}=this;if(null==e||!e.byteLength)return this.initTracks=void 0,void(this.initData=void 0);const s=this.initData=ES(e);t||(t=FT(s.audio,Ib)),i||(i=FT(s.video,xb));const n={};s.audio&&s.video?n.audiovideo={container:"video/mp4",codec:t+","+i,initSegment:e,id:"main"}:s.audio?n.audio={container:"audio/mp4",codec:t,initSegment:e,id:"audio"}:s.video?n.video={container:"video/mp4",codec:i,initSegment:e,id:"main"}:Sb.warn("[passthrough-remuxer.ts]: initSegment does not contain moov or trak boxes."),this.initTracks=n}remux(e,t,i,s,n,r){var a,o;let{initPTS:l,lastEndTime:d}=this;const c={audio:void 0,video:void 0,text:s,id3:i,initSegment:void 0};pb(d)||(d=this.lastEndTime=n||0);const h=t.samples;if(null==h||!h.length)return c;const u={initPTS:void 0,timescale:1};let p=this.initData;if(null!=(a=p)&&a.length||(this.generateInitSegment(h),p=this.initData),null==(o=p)||!o.length)return Sb.warn("[passthrough-remuxer.ts]: Failed to generate initSegment."),c;this.emitInitSegment&&(u.tracks=this.initTracks,this.emitInitSegment=!1);const g=function(e,t){let i=0,s=0,n=0;const r=bS(e,["moof","traf"]);for(let e=0;ee+t.info.duration||0),0))}return t}return s||n}(h,p),m=function(e,t){return bS(t,["moof","traf"]).reduce(((t,i)=>{const s=bS(i,["tfdt"])[0],n=s[0],r=bS(i,["tfhd"]).reduce(((t,i)=>{const r=fS(i,4),a=e[r];if(a){let e=fS(s,4);if(1===n){if(e===uS)return Sb.warn("[mp4-demuxer]: Ignoring assumed invalid signed 64-bit track fragment decode time"),t;e*=uS+1,e+=fS(s,8)}const i=e/(a.timescale||9e4);if(isFinite(i)&&(null===t||in}(l,_,n,g)||u.timescale!==l.timescale&&r)&&(u.initPTS=_-n,l&&1===l.timescale&&Sb.warn("Adjusting initPTS by "+(u.initPTS-l.baseTime)),this.initPTS=l={baseTime:u.initPTS,timescale:1});const f=e?_-l.baseTime/l.timescale:d,v=f+g;!function(e,t,i){bS(t,["moof","traf"]).forEach((t=>{bS(t,["tfhd"]).forEach((s=>{const n=fS(s,4),r=e[n];if(!r)return;const a=r.timescale||9e4;bS(t,["tfdt"]).forEach((e=>{const t=e[0];let s=fS(e,4);if(0===t)s-=i*a,s=Math.max(s,0),yS(e,4,s);else{s*=Math.pow(2,32),s+=fS(e,8),s-=i*a,s=Math.max(s,0);const t=Math.floor(s/(uS+1)),n=Math.floor(s%(uS+1));yS(e,4,t),yS(e,8,n)}}))}))}))}(p,h,l.baseTime/l.timescale),g>0?this.lastEndTime=v:(Sb.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());const y=!!p.audio,b=!!p.video;let S="";y&&(S+="audio"),b&&(S+="video");const E={data1:h,startPTS:f,startDTS:f,endPTS:v,endDTS:v,type:S,hasAudio:y,hasVideo:b,nb:1,dropped:0};return c.audio="audio"===E.type?E:void 0,c.video="audio"!==E.type?E:void 0,c.initSegment=u,c.id3=LT(i,n,l,l),s.samples.length&&(c.text=DT(s,n,l)),c}constructor(){this.emitInitSegment=!1,this.audioCodec=void 0,this.videoCodec=void 0,this.initData=void 0,this.initPTS=null,this.initTracks=void 0,this.lastEndTime=null}}},{demux:_T,remux:OT},{demux:class extends GC{resetInitSegment(e,t,i,s){super.resetInitSegment(e,t,i,s),this._audioTrack={container:"audio/adts",type:"audio",id:2,pid:-1,sequenceNumber:0,segmentCodec:"aac",samples:[],manifestCodec:t,duration:s,inputTimeScale:9e4,dropped:0}}static probe(e){if(!e)return!1;let t=(Qb(e,0)||[]).length;for(let i=e.length;t0&&null!=t&&null!=t.key&&null!==t.iv&&null!=t.method&&(i=t);return i}(r,t);if(y&&"AES-128"===y.method){const e=this.getDecrypter();if(!e.isSync())return this.decryptionPromise=e.webCryptoDecrypt(r,y.key.buffer,y.iv.buffer).then((e=>{const t=this.push(e,null,i);return this.decryptionPromise=null,t})),this.decryptionPromise;{let t=e.softwareDecrypt(r,y.key.buffer,y.iv.buffer);if(i.part>-1&&(t=e.flush()),!t)return n.executeEnd=IT(),UT(i);r=new Uint8Array(t)}}const b=this.needsProbing(d,c);if(b){const e=this.configureTransmuxer(r);if(e)return Sb.warn(`[transmuxer] ${e.message}`),this.observer.emit(gb.ERROR,gb.ERROR,{type:mb.MEDIA_ERROR,details:_b.FRAG_PARSING_ERROR,fatal:!1,error:e,reason:e.message}),n.executeEnd=IT(),UT(i)}(d||c||p||b)&&this.resetInitSegment(v,g,m,f,t),(d||p||b)&&this.resetInitialTimestamp(_),l||this.resetContiguity();const S=this.transmux(r,y,u,h,i),E=this.currentTransmuxState;return E.contiguous=!0,E.discontinuity=!1,E.trackSwitch=!1,n.executeEnd=IT(),S}flush(e){const t=e.transmuxing;t.executeStart=IT();const{decrypter:i,currentTransmuxState:s,decryptionPromise:n}=this;if(n)return n.then((()=>this.flush(e)));const r=[],{timeOffset:a}=s;if(i){const t=i.flush();t&&r.push(this.push(t,null,e))}const{demuxer:o,remuxer:l}=this;if(!o||!l)return t.executeEnd=IT(),[UT(e)];const d=o.flush(a);return VT(d)?d.then((t=>(this.flushRemux(r,t,e),r))):(this.flushRemux(r,d,e),r)}flushRemux(e,t,i){const{audioTrack:s,videoTrack:n,id3Track:r,textTrack:a}=t,{accurateTimeOffset:o,timeOffset:l}=this.currentTransmuxState;Sb.log(`[transmuxer.ts]: Flushed fragment ${i.sn}${i.part>-1?" p: "+i.part:""} of level ${i.level}`);const d=this.remuxer.remux(s,n,r,a,l,o,!0,this.id);e.push({remuxResult:d,chunkMeta:i}),i.transmuxing.executeEnd=IT()}resetInitialTimestamp(e){const{demuxer:t,remuxer:i}=this;t&&i&&(t.resetTimeStamp(e),i.resetTimeStamp(e))}resetContiguity(){const{demuxer:e,remuxer:t}=this;e&&t&&(e.resetContiguity(),t.resetNextTimestamp())}resetInitSegment(e,t,i,s,n){const{demuxer:r,remuxer:a}=this;r&&a&&(r.resetInitSegment(e,t,i,s),a.resetInitSegment(e,t,i,n))}destroy(){this.demuxer&&(this.demuxer.destroy(),this.demuxer=void 0),this.remuxer&&(this.remuxer.destroy(),this.remuxer=void 0)}transmux(e,t,i,s,n){let r;return r=t&&"SAMPLE-AES"===t.method?this.transmuxSampleAes(e,t,i,s,n):this.transmuxUnencrypted(e,i,s,n),r}transmuxUnencrypted(e,t,i,s){const{audioTrack:n,videoTrack:r,id3Track:a,textTrack:o}=this.demuxer.demux(e,t,!1,!this.config.progressive);return{remuxResult:this.remuxer.remux(n,r,a,o,t,i,!1,this.id),chunkMeta:s}}transmuxSampleAes(e,t,i,s,n){return this.demuxer.demuxSampleAes(e,t,i).then((e=>({remuxResult:this.remuxer.remux(e.audioTrack,e.videoTrack,e.id3Track,e.textTrack,i,s,!1,this.id),chunkMeta:n})))}configureTransmuxer(e){const{config:t,observer:i,typeSupported:s,vendor:n}=this;let r;for(let t=0,i=jT.length;t({remuxResult:{},chunkMeta:e});function VT(e){return"then"in e&&e.then instanceof Function}class zT{constructor(e,t,i,s,n){this.audioCodec=void 0,this.videoCodec=void 0,this.initSegmentData=void 0,this.duration=void 0,this.defaultInitPts=void 0,this.audioCodec=e,this.videoCodec=t,this.initSegmentData=i,this.duration=s,this.defaultInitPts=n||null}}class HT{constructor(e,t,i,s,n,r){this.discontinuity=void 0,this.contiguous=void 0,this.accurateTimeOffset=void 0,this.trackSwitch=void 0,this.timeOffset=void 0,this.initSegmentChange=void 0,this.discontinuity=e,this.contiguous=t,this.accurateTimeOffset=i,this.trackSwitch=s,this.timeOffset=n,this.initSegmentChange=r}}var $T={exports:{}};!function(e){var t=Object.prototype.hasOwnProperty,i="~";function s(){}function n(e,t,i){this.fn=e,this.context=t,this.once=i||!1}function r(e,t,s,r,a){if("function"!=typeof s)throw new TypeError("The listener must be a function");var o=new n(s,r||e,a),l=i?i+t:t;return e._events[l]?e._events[l].fn?e._events[l]=[e._events[l],o]:e._events[l].push(o):(e._events[l]=o,e._eventsCount++),e}function a(e,t){0==--e._eventsCount?e._events=new s:delete e._events[t]}function o(){this._events=new s,this._eventsCount=0}Object.create&&(s.prototype=Object.create(null),(new s).__proto__||(i=!1)),o.prototype.eventNames=function(){var e,s,n=[];if(0===this._eventsCount)return n;for(s in e=this._events)t.call(e,s)&&n.push(i?s.slice(1):s);return Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(e)):n},o.prototype.listeners=function(e){var t=i?i+e:e,s=this._events[t];if(!s)return[];if(s.fn)return[s.fn];for(var n=0,r=s.length,a=new Array(r);n!1};class WT{resetWorker(){if(this.workerContext){const{worker:e,objectURL:t}=this.workerContext;t&&self.URL.revokeObjectURL(t),e.removeEventListener("message",this.onwmsg),e.onerror=null,e.terminate(),this.workerContext=null}}destroy(){if(this.workerContext)this.resetWorker(),this.onwmsg=void 0;else{const e=this.transmuxer;e&&(e.destroy(),this.transmuxer=null)}const e=this.observer;e&&e.removeAllListeners(),this.frag=null,this.observer=null,this.hls=null}push(e,t,i,s,n,r,a,o,l,d){var c,h;l.transmuxing.start=self.performance.now();const{transmuxer:u}=this,p=r?r.start:n.start,g=n.decryptdata,m=this.frag,_=!(m&&n.cc===m.cc),f=!(m&&l.level===m.level),v=m?l.sn-m.sn:-1,y=this.part?l.part-this.part.index:-1,b=0===v&&l.id>1&&l.id===(null==m?void 0:m.stats.chunkCount),S=!f&&(1===v||0===v&&(1===y||b&&y<=0)),E=self.performance.now();(f||v||0===n.stats.parsing.start)&&(n.stats.parsing.start=E),!r||!y&&S||(r.stats.parsing.start=E);const C=!(m&&(null==(c=n.initSegment)?void 0:c.url)===(null==(h=m.initSegment)?void 0:h.url)),T=new HT(_,S,o,f,p,C);if(!S||_||C){Sb.log(`[transmuxer-interface, ${n.type}]: Starting new transmux session for sn: ${l.sn} p: ${l.part} level: ${l.level} id: ${l.id}\n discontinuity: ${_}\n trackSwitch: ${f}\n contiguous: ${S}\n accurateTimeOffset: ${o}\n timeOffset: ${p}\n initSegmentChange: ${C}`);const e=new zT(i,s,t,a,d);this.configureTransmuxer(e)}if(this.frag=n,this.part=r,this.workerContext)this.workerContext.worker.postMessage({cmd:"demux",data:e,decryptdata:g,chunkMeta:l,state:T},e instanceof ArrayBuffer?[e]:[]);else if(u){const t=u.push(e,g,l,T);VT(t)?(u.async=!0,t.then((e=>{this.handleTransmuxComplete(e)})).catch((e=>{this.transmuxerError(e,l,"transmuxer-interface push error")}))):(u.async=!1,this.handleTransmuxComplete(t))}}flush(e){e.transmuxing.start=self.performance.now();const{transmuxer:t}=this;if(this.workerContext)this.workerContext.worker.postMessage({cmd:"flush",chunkMeta:e});else if(t){let i=t.flush(e);VT(i)||t.async?(VT(i)||(i=Promise.resolve(i)),i.then((t=>{this.handleFlushResult(t,e)})).catch((t=>{this.transmuxerError(t,e,"transmuxer-interface flush error")}))):this.handleFlushResult(i,e)}}transmuxerError(e,t,i){this.hls&&(this.error=e,this.hls.trigger(gb.ERROR,{type:mb.MEDIA_ERROR,details:_b.FRAG_PARSING_ERROR,chunkMeta:t,fatal:!1,error:e,err:e,reason:i}))}handleFlushResult(e,t){e.forEach((e=>{this.handleTransmuxComplete(e)})),this.onFlush(t)}onWorkerMessage(e){const t=e.data,i=this.hls;switch(t.event){case"init":{var s;const e=null==(s=this.workerContext)?void 0:s.objectURL;e&&self.URL.revokeObjectURL(e);break}case"transmuxComplete":this.handleTransmuxComplete(t.data);break;case"flush":this.onFlush(t.data);break;case"workerLog":Sb[t.data.logType]&&Sb[t.data.logType](t.data.message);break;default:t.data=t.data||{},t.data.frag=this.frag,t.data.id=this.id,i.trigger(t.event,t.data)}}configureTransmuxer(e){const{transmuxer:t}=this;this.workerContext?this.workerContext.worker.postMessage({cmd:"configure",config:e}):t&&t.configure(e)}handleTransmuxComplete(e){e.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(e)}constructor(e,t,i,s){this.error=null,this.hls=void 0,this.id=void 0,this.observer=void 0,this.frag=null,this.part=null,this.useWorker=void 0,this.workerContext=null,this.onwmsg=void 0,this.transmuxer=null,this.onTransmuxComplete=void 0,this.onFlush=void 0;const n=e.config;this.hls=e,this.id=t,this.useWorker=!!n.enableWorker,this.onTransmuxComplete=i,this.onFlush=s;const r=(e,t)=>{(t=t||{}).frag=this.frag,t.id=this.id,e===gb.ERROR&&(this.error=t.error),this.hls.trigger(e,t)};this.observer=new qT,this.observer.on(gb.FRAG_DECRYPTED,r),this.observer.on(gb.ERROR,r);const a={mp4:GT.isTypeSupported("video/mp4"),mpeg:GT.isTypeSupported("audio/mpeg"),mp3:GT.isTypeSupported('audio/mp4; codecs="mp3"')},o=navigator.vendor;if(this.useWorker&&"undefined"!=typeof Worker){if(n.workerPath||"function"==typeof __HLS_WORKER_BUNDLE__){try{n.workerPath?(Sb.log(`loading Web Worker ${n.workerPath} for "${t}"`),this.workerContext=function(e){const t=new self.URL(e,self.location.href).href;return{worker:new self.Worker(t),scriptURL:t}}(n.workerPath)):(Sb.log(`injecting Web Worker for "${t}"`),this.workerContext=function(){const e=new self.Blob([`var exports={};var module={exports:exports};function define(f){f()};define.amd=true;(${__HLS_WORKER_BUNDLE__.toString()})(true);`],{type:"text/javascript"}),t=self.URL.createObjectURL(e);return{worker:new self.Worker(t),objectURL:t}}()),this.onwmsg=e=>this.onWorkerMessage(e);const{worker:e}=this.workerContext;e.addEventListener("message",this.onwmsg),e.onerror=e=>{const i=new Error(`${e.message} (${e.filename}:${e.lineno})`);n.enableWorker=!1,Sb.warn(`Error in "${t}" Web Worker, fallback to inline`),this.hls.trigger(gb.ERROR,{type:mb.OTHER_ERROR,details:_b.INTERNAL_EXCEPTION,fatal:!1,event:"demuxerWorker",error:i})},e.postMessage({cmd:"init",typeSupported:a,vendor:o,id:t,config:JSON.stringify(n)})}catch(e){Sb.warn(`Error setting up "${t}" Web Worker, fallback to inline`,e),this.resetWorker(),this.error=null,this.transmuxer=new NT(this.observer,a,n,o,t)}return}}this.transmuxer=new NT(this.observer,a,n,o,t)}}class KT{destroy(){this.media=null,this.hls=this.fragmentTracker=null}poll(e,t){const{config:i,media:s,stalled:n}=this;if(null===s)return;const{currentTime:r,seeking:a}=s,o=this.seeking&&!a,l=!this.seeking&&a;if(this.seeking=a,r!==e){if(this.moved=!0,null!==n){if(this.stallReported){const e=self.performance.now()-n;Sb.warn(`playback not stuck anymore @${r}, after ${Math.round(e)}ms`),this.stallReported=!1}this.stalled=null,this.nudgeRetry=0}return}if(l||o)return void(this.stalled=null);if(s.paused&&!a||s.ended||0===s.playbackRate||!yC.getBuffered(s).length)return;const d=yC.bufferInfo(s,r,0),c=d.len>0,h=d.nextStart||0;if(!c&&!h)return;if(a){const e=d.len>2,i=!h||t&&t.start<=r||h-r>2&&!this.fragmentTracker.getPartialFragment(r);if(e||i)return;this.moved=!1}if(!this.moved&&null!==this.stalled){var u;const e=Math.max(h,d.start||0)-r,t=this.hls.levels?this.hls.levels[this.hls.currentLevel]:null,i=(null==t||null==(u=t.details)?void 0:u.live)?2*t.details.targetduration:2,s=this.fragmentTracker.getPartialFragment(r);if(e>0&&(e<=i||s))return void this._trySkipBufferHole(s)}const p=self.performance.now();if(null===n)return void(this.stalled=p);const g=p-n;if(!a&&g>=250&&(this._reportStall(d),!this.media))return;const m=yC.bufferInfo(s,r,i.maxBufferHole);this._tryFixBufferStall(m,g)}_tryFixBufferStall(e,t){const{config:i,fragmentTracker:s,media:n}=this;if(null===n)return;const r=n.currentTime,a=s.getPartialFragment(r);if(a){if(this._trySkipBufferHole(a)||!this.media)return}(e.len>i.maxBufferHole||e.nextStart&&e.nextStart-r1e3*i.highBufferWatchdogPeriod&&(Sb.warn("Trying to nudge playhead over buffer-hole"),this.stalled=null,this._tryNudgeBuffer())}_reportStall(e){const{hls:t,media:i,stallReported:s}=this;if(!s&&i){this.stallReported=!0;const s=new Error(`Playback stalling at @${i.currentTime} due to low buffer (${JSON.stringify(e)})`);Sb.warn(s.message),t.trigger(gb.ERROR,{type:mb.MEDIA_ERROR,details:_b.BUFFER_STALLED_ERROR,fatal:!1,error:s,buffer:e.len})}}_trySkipBufferHole(e){const{config:t,hls:i,media:s}=this;if(null===s)return 0;const n=s.currentTime,r=yC.bufferInfo(s,n,0),a=n0&&r.len<1&&s.readyState<3,d=a-n;if(d>0&&(o||l)){if(d>t.maxBufferHole){const{fragmentTracker:t}=this;let i=!1;if(0===n){const e=t.getAppendedFrag(0,aE);e&&a1?(e=0,this.bitrateTest=!0):e=i.nextAutoLevel),this.level=i.nextLoadLevel=e,this.loadedmetadata=!1}t>0&&-1===e&&(this.log(`Override startPosition with lastCurrentTime @${t.toFixed(3)}`),e=t),this.state=RC,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=e,this.tick()}else this._forceStartLoad=!0,this.state=OC}stopLoad(){this._forceStartLoad=!1,super.stopLoad()}doTick(){switch(this.state){case zC:{var e;const{levels:t,level:i}=this,s=null==t||null==(e=t[i])?void 0:e.details;if(s&&(!s.live||this.levelLastLoaded===this.level)){if(this.waitForCdnTuneIn(s))break;this.state=RC;break}if(this.hls.nextLoadLevel!==this.level){this.state=RC;break}break}case MC:{var t;const e=self.performance.now(),i=this.retryDate;(!i||e>=i||null!=(t=this.media)&&t.seeking)&&(this.resetStartWhenNotLoaded(this.level),this.state=RC)}}this.state===RC&&this.doTickIdle(),this.onTickEnd()}onTickEnd(){super.onTickEnd(),this.checkBuffer(),this.checkFragmentChanged()}doTickIdle(){const{hls:e,levelLastLoaded:t,levels:i,media:s}=this,{config:n,nextLoadLevel:r}=e;if(null===t||!s&&(this.startFragRequested||!n.startFragPrefetch))return;if(this.altAudio&&this.audioOnly)return;if(null==i||!i[r])return;const a=i[r],o=this.getMainFwdBufferInfo();if(null===o)return;const l=this.getLevelDetails();if(l&&this._streamEnded(o,l)){const e={};return this.altAudio&&(e.type="video"),this.hls.trigger(gb.BUFFER_EOS,e),void(this.state=NC)}e.loadLevel!==r&&-1===e.manualLevel&&this.log(`Adapting to level ${r} from level ${this.level}`),this.level=e.nextLoadLevel=r;const d=a.details;if(!d||this.state===zC||d.live&&this.levelLastLoaded!==r)return this.level=r,void(this.state=zC);const c=o.len,h=this.getMaxBufferLength(a.maxBitrate);if(c>=h)return;this.backtrackFragment&&this.backtrackFragment.start>o.end&&(this.backtrackFragment=null);const u=this.backtrackFragment?this.backtrackFragment.start:o.end;let p=this.getNextFragment(u,d);if(this.couldBacktrack&&!this.fragPrevious&&p&&"initSegment"!==p.sn&&this.fragmentTracker.getState(p)!==oC){var g;const e=(null!=(g=this.backtrackFragment)?g:p).sn-d.startSN,t=d.fragments[e-1];t&&p.cc===t.cc&&(p=t,this.fragmentTracker.removeFragment(t))}else this.backtrackFragment&&o.len&&(this.backtrackFragment=null);if(p&&this.isLoopLoading(p,u)){if(!p.gap){const e=this.audioOnly&&!this.altAudio?Ib:xb,t=(e===xb?this.videoBuffer:this.mediaBuffer)||this.media;t&&this.afterBufferFlushed(t,e,aE)}p=this.getNextFragmentLoopLoading(p,d,o,aE,h)}p&&(!p.initSegment||p.initSegment.data||this.bitrateTest||(p=p.initSegment),this.loadFragment(p,a,u))}loadFragment(e,t,i){const s=this.fragmentTracker.getState(e);this.fragCurrent=e,s===nC||s===aC?"initSegment"===e.sn?this._loadInitSegment(e,t):this.bitrateTest?(this.log(`Fragment ${e.sn} of level ${e.level} is being downloaded to test bitrate and will not be buffered`),this._loadBitrateTestFrag(e,t)):(this.startFragRequested=!0,super.loadFragment(e,t,i)):this.clearTrackerIfNeeded(e)}getBufferedFrag(e){return this.fragmentTracker.getBufferedFrag(e,aE)}followingBufferedFrag(e){return e?this.getBufferedFrag(e.end+.5):null}immediateLevelSwitch(){this.abortCurrentFrag(),this.flushMainBuffer(0,Number.POSITIVE_INFINITY)}nextLevelSwitch(){const{levels:e,media:t}=this;if(null!=t&&t.readyState){let i;const s=this.getAppendedFrag(t.currentTime);s&&s.start>1&&this.flushMainBuffer(0,s.start-1);const n=this.getLevelDetails();if(null!=n&&n.live){const e=this.getMainFwdBufferInfo();if(!e||e.len<2*n.targetduration)return}if(!t.paused&&e){const t=e[this.hls.nextLoadLevel],s=this.fragLastKbps;i=s&&this.fragCurrent?this.fragCurrent.duration*t.maxBitrate/(1e3*s)+1:0}else i=0;const r=this.getBufferedFrag(t.currentTime+i);if(r){const e=this.followingBufferedFrag(r);if(e){this.abortCurrentFrag();const t=e.maxStartPTS?e.maxStartPTS:e.start,i=e.duration,s=Math.max(r.end,t+Math.min(Math.max(i-this.config.maxFragLookUpTolerance,.5*i),.75*i));this.flushMainBuffer(s,Number.POSITIVE_INFINITY)}}}}abortCurrentFrag(){const e=this.fragCurrent;switch(this.fragCurrent=null,this.backtrackFragment=null,e&&(e.abortRequests(),this.fragmentTracker.removeFragment(e)),this.state){case LC:case DC:case MC:case FC:case jC:this.state=RC}this.nextLoadPosition=this.getLoadPosition()}flushMainBuffer(e,t){super.flushMainBuffer(e,t,this.altAudio?"video":null)}onMediaAttached(e,t){super.onMediaAttached(e,t);const i=t.media;this.onvplaying=this.onMediaPlaying.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),i.addEventListener("playing",this.onvplaying),i.addEventListener("seeked",this.onvseeked),this.gapController=new KT(this.config,i,this.fragmentTracker,this.hls)}onMediaDetaching(){const{media:e}=this;e&&this.onvplaying&&this.onvseeked&&(e.removeEventListener("playing",this.onvplaying),e.removeEventListener("seeked",this.onvseeked),this.onvplaying=this.onvseeked=null,this.videoBuffer=null),this.fragPlaying=null,this.gapController&&(this.gapController.destroy(),this.gapController=null),super.onMediaDetaching()}onMediaPlaying(){this.tick()}onMediaSeeked(){const e=this.media,t=e?e.currentTime:null;pb(t)&&this.log(`Media seeked to ${t.toFixed(3)}`);const i=this.getMainFwdBufferInfo();null!==i&&0!==i.len?this.tick():this.warn(`Main forward buffer length on "seeked" event ${i?i.len:"empty"})`)}onManifestLoading(){this.log("Trigger BUFFER_RESET"),this.hls.trigger(gb.BUFFER_RESET,void 0),this.fragmentTracker.removeAllFragments(),this.couldBacktrack=!1,this.startPosition=this.lastCurrentTime=0,this.levels=this.fragPlaying=this.backtrackFragment=null,this.altAudio=this.audioOnly=!1}onManifestParsed(e,t){let i,s=!1,n=!1;t.levels.forEach((e=>{i=e.audioCodec,i&&(-1!==i.indexOf("mp4a.40.2")&&(s=!0),-1!==i.indexOf("mp4a.40.5")&&(n=!0))})),this.audioCodecSwitch=s&&n&&!function(){var e;const t=$C();return"function"==typeof(null==t||null==(e=t.prototype)?void 0:e.changeType)}(),this.audioCodecSwitch&&this.log("Both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.levels=t.levels,this.startFragRequested=!1}onLevelLoading(e,t){const{levels:i}=this;if(!i||this.state!==RC)return;const s=i[t.level];(!s.details||s.details.live&&this.levelLastLoaded!==t.level||this.waitForCdnTuneIn(s.details))&&(this.state=zC)}onLevelLoaded(e,t){var i;const{levels:s}=this,n=t.level,r=t.details,a=r.totalduration;if(!s)return void this.warn(`Levels were reset while loading level ${n}`);this.log(`Level ${n} loaded [${r.startSN},${r.endSN}]${r.lastPartSn?`[part-${r.lastPartSn}-${r.lastPartIndex}]`:""}, cc [${r.startCC}, ${r.endCC}] duration:${a}`);const o=s[n],l=this.fragCurrent;!l||this.state!==DC&&this.state!==MC||l.level===t.level&&l.urlId===o.urlId||!l.loader||this.abortCurrentFrag();let d=0;if(r.live||null!=(i=o.details)&&i.live){if(this.checkLiveUpdate(r),r.deltaUpdateFailed)return;d=this.alignPlaylists(r,o.details)}if(o.details=r,this.levelLastLoaded=n,this.hls.trigger(gb.LEVEL_UPDATED,{details:r,level:n}),this.state===zC){if(this.waitForCdnTuneIn(r))return;this.state=RC}this.startFragRequested?r.live&&this.synchronizeToLiveEdge(r):this.setStartPosition(r,d),this.tick()}_handleFragmentLoadProgress(e){var t;const{frag:i,part:s,payload:n}=e,{levels:r}=this;if(!r)return void this.warn(`Levels were reset while fragment load was in progress. Fragment ${i.sn} of level ${i.level} will not be buffered`);const a=r[i.level],o=a.details;if(!o)return this.warn(`Dropping fragment ${i.sn} of level ${i.level} after level details were reset`),void this.fragmentTracker.removeFragment(i);const l=a.videoCodec,d=o.PTSKnown||!o.live,c=null==(t=i.initSegment)?void 0:t.data,h=this._getAudioCodec(a),u=this.transmuxer=this.transmuxer||new WT(this.hls,aE,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),p=s?s.index:-1,g=-1!==p,m=new bC(i.level,i.sn,i.stats.chunkCount,n.byteLength,p,g),_=this.initPTS[i.cc];u.push(n,c,h,l,i,s,o.totalduration,d,m,_)}onAudioTrackSwitching(e,t){const i=this.altAudio;if(!!!t.url){if(this.mediaBuffer!==this.media){this.log("Switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;const e=this.fragCurrent;e&&(this.log("Switching to main audio track, cancel main fragment load"),e.abortRequests(),this.fragmentTracker.removeFragment(e)),this.resetTransmuxer(),this.resetLoadingState()}else this.audioOnly&&this.resetTransmuxer();const e=this.hls;i&&(e.trigger(gb.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:null}),this.fragmentTracker.removeAllFragments()),e.trigger(gb.AUDIO_TRACK_SWITCHED,t)}}onAudioTrackSwitched(e,t){const i=t.id,s=!!this.hls.audioTracks[i].url;if(s){const e=this.videoBuffer;e&&this.mediaBuffer!==e&&(this.log("Switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=e)}this.altAudio=s,this.tick()}onBufferCreated(e,t){const i=t.tracks;let s,n,r=!1;for(const e in i){const t=i[e];if("main"===t.id){if(n=e,s=t,"video"===e){const t=i[e];t&&(this.videoBuffer=t.buffer)}}else r=!0}r&&s?(this.log(`Alternate track found, use ${n}.buffered to schedule main fragment loading`),this.mediaBuffer=s.buffer):this.mediaBuffer=this.media}onFragBuffered(e,t){const{frag:i,part:s}=t;if(i&&i.type!==aE)return;if(this.fragContextChanged(i))return this.warn(`Fragment ${i.sn}${s?" p: "+s.index:""} of level ${i.level} finished buffering, but was aborted. state: ${this.state}`),void(this.state===jC&&(this.state=RC));const n=s?s.stats:i.stats;this.fragLastKbps=Math.round(8*n.total/(n.buffering.end-n.loading.first)),"initSegment"!==i.sn&&(this.fragPrevious=i),this.fragBufferedComplete(i,s)}onError(e,t){var i;if(t.fatal)this.state=UC;else switch(t.details){case _b.FRAG_GAP:case _b.FRAG_PARSING_ERROR:case _b.FRAG_DECRYPT_ERROR:case _b.FRAG_LOAD_ERROR:case _b.FRAG_LOAD_TIMEOUT:case _b.KEY_LOAD_ERROR:case _b.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(aE,t);break;case _b.LEVEL_LOAD_ERROR:case _b.LEVEL_LOAD_TIMEOUT:case _b.LEVEL_PARSING_ERROR:t.levelRetry||this.state!==zC||(null==(i=t.context)?void 0:i.type)!==sE||(this.state=RC);break;case _b.BUFFER_FULL_ERROR:if(!t.parent||"main"!==t.parent)return;this.reduceLengthAndFlushBuffer(t)&&this.flushMainBuffer(0,Number.POSITIVE_INFINITY);break;case _b.INTERNAL_EXCEPTION:this.recoverWorkerError(t)}}checkBuffer(){const{media:e,gapController:t}=this;if(e&&t&&e.readyState){if(this.loadedmetadata||!yC.getBuffered(e).length){const e=this.state!==RC?this.fragCurrent:null;t.poll(this.lastCurrentTime,e)}this.lastCurrentTime=e.currentTime}}onFragLoadEmergencyAborted(){this.state=RC,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tickImmediate()}onBufferFlushed(e,{type:t}){if(t!==Ib||this.audioOnly&&!this.altAudio){const e=(t===xb?this.videoBuffer:this.mediaBuffer)||this.media;this.afterBufferFlushed(e,t,aE)}}onLevelsUpdated(e,t){this.levels=t.levels}swapAudioCodec(){this.audioCodecSwap=!this.audioCodecSwap}seekToStartPos(){const{media:e}=this;if(!e)return;const t=e.currentTime;let i=this.startPosition;if(i>=0&&t0&&(n{const{hls:s}=this;if(!i||this.fragContextChanged(e))return;t.fragmentError=0,this.state=RC,this.startFragRequested=!1,this.bitrateTest=!1;const n=e.stats;n.parsing.start=n.parsing.end=n.buffering.start=n.buffering.end=self.performance.now(),s.trigger(gb.FRAG_LOADED,i),e.bitrateTest=!1}))}_handleTransmuxComplete(e){var t;const i="main",{hls:s}=this,{remuxResult:n,chunkMeta:r}=e,a=this.getCurrentContext(r);if(!a)return void this.resetWhenMissingContext(r);const{frag:o,part:l,level:d}=a,{video:c,text:h,id3:u,initSegment:p}=n,{details:g}=d,m=this.altAudio?void 0:n.audio;if(this.fragContextChanged(o))this.fragmentTracker.removeFragment(o);else{if(this.state=FC,p){if(null!=p&&p.tracks){const e=o.initSegment||o;this._bufferInitSegment(d,p.tracks,e,r),s.trigger(gb.FRAG_PARSING_INIT_SEGMENT,{frag:e,id:i,tracks:p.tracks})}const e=p.initPTS,t=p.timescale;pb(e)&&(this.initPTS[o.cc]={baseTime:e,timescale:t},s.trigger(gb.INIT_PTS_FOUND,{frag:o,id:i,initPTS:e,timescale:t}))}if(c&&g&&"initSegment"!==o.sn){const e=g.fragments[o.sn-1-g.startSN],t=o.sn===g.startSN,i=!e||o.cc>e.cc;if(!1!==n.independent){const{startPTS:e,endPTS:s,startDTS:n,endDTS:a}=c;if(l)l.elementaryStreams[c.type]={startPTS:e,endPTS:s,startDTS:n,endDTS:a};else if(c.firstKeyFrame&&c.independent&&1===r.id&&!i&&(this.couldBacktrack=!0),c.dropped&&c.independent){const n=this.getMainFwdBufferInfo(),r=(n?n.end:this.getLoadPosition())+this.config.maxBufferHole,l=c.firstKeyFramePTS?c.firstKeyFramePTS:e;if(!t&&r{const n=t[e].initSegment;null!=n&&n.byteLength&&this.hls.trigger(gb.BUFFER_APPENDING,{type:e,data:n,frag:i,part:null,chunkMeta:s,parent:i.type})})),this.tick()}getMainFwdBufferInfo(){return this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:this.media,aE)}backtrack(e){this.couldBacktrack=!0,this.backtrackFragment=e,this.resetTransmuxer(),this.flushBufferGap(e),this.fragmentTracker.removeFragment(e),this.fragPrevious=null,this.nextLoadPosition=e.start,this.state=RC}checkFragmentChanged(){const e=this.media;let t=null;if(e&&e.readyState>1&&!1===e.seeking){const i=e.currentTime;if(yC.isBuffered(e,i)?t=this.getAppendedFrag(i):yC.isBuffered(e,i+.1)&&(t=this.getAppendedFrag(i+.1)),t){this.backtrackFragment=null;const e=this.fragPlaying,i=t.level;e&&t.sn===e.sn&&e.level===i&&t.urlId===e.urlId||(this.fragPlaying=t,this.hls.trigger(gb.FRAG_CHANGED,{frag:t}),e&&e.level===i||this.hls.trigger(gb.LEVEL_SWITCHED,{level:i}))}}}get nextLevel(){const e=this.nextBufferedFrag;return e?e.level:-1}get currentFrag(){const e=this.media;return e?this.fragPlaying||this.getAppendedFrag(e.currentTime):null}get currentProgramDateTime(){const e=this.media;if(e){const t=e.currentTime,i=this.currentFrag;if(i&&pb(t)&&pb(i.programDateTime)){const e=i.programDateTime+1e3*(t-i.start);return new Date(e)}}return null}get currentLevel(){const e=this.currentFrag;return e?e.level:-1}get nextBufferedFrag(){const e=this.currentFrag;return e?this.followingBufferedFrag(e):null}get forceStartLoad(){return this._forceStartLoad}constructor(e,t,i){super(e,t,i,"[stream-controller]",aE),this.audioCodecSwap=!1,this.gapController=null,this.level=-1,this._forceStartLoad=!1,this.altAudio=!1,this.audioOnly=!1,this.fragPlaying=null,this.onvplaying=null,this.onvseeked=null,this.fragLastKbps=0,this.couldBacktrack=!1,this.backtrackFragment=null,this.audioCodecSwitch=!1,this.videoBuffer=null,this._registerListeners()}}class XT{sample(e,t){const i=Math.pow(this.alpha_,e);this.estimate_=t*(1-i)+i*this.estimate_,this.totalWeight_+=e}getTotalWeight(){return this.totalWeight_}getEstimate(){if(this.alpha_){const e=1-Math.pow(this.alpha_,this.totalWeight_);if(e)return this.estimate_/e}return this.estimate_}constructor(e,t=0,i=0){this.halfLife=void 0,this.alpha_=void 0,this.estimate_=void 0,this.totalWeight_=void 0,this.halfLife=e,this.alpha_=e?Math.exp(Math.log(.5)/e):0,this.estimate_=t,this.totalWeight_=i}}class QT{update(e,t){const{slow_:i,fast_:s,ttfb_:n}=this;i.halfLife!==e&&(this.slow_=new XT(e,i.getEstimate(),i.getTotalWeight())),s.halfLife!==t&&(this.fast_=new XT(t,s.getEstimate(),s.getTotalWeight())),n.halfLife!==e&&(this.ttfb_=new XT(e,n.getEstimate(),n.getTotalWeight()))}sample(e,t){const i=(e=Math.max(e,this.minDelayMs_))/1e3,s=8*t/i;this.fast_.sample(i,s),this.slow_.sample(i,s)}sampleTTFB(e){const t=e/1e3,i=Math.sqrt(2)*Math.exp(-Math.pow(t,2)/2);this.ttfb_.sample(i,Math.max(e,5))}canEstimate(){return this.fast_.getTotalWeight()>=this.minWeight_}getEstimate(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_}getEstimateTTFB(){return this.ttfb_.getTotalWeight()>=this.minWeight_?this.ttfb_.getEstimate():this.defaultTTFB_}destroy(){}constructor(e,t,i,s=100){this.defaultEstimate_=void 0,this.minWeight_=void 0,this.minDelayMs_=void 0,this.slow_=void 0,this.fast_=void 0,this.defaultTTFB_=void 0,this.ttfb_=void 0,this.defaultEstimate_=i,this.minWeight_=.001,this.minDelayMs_=50,this.slow_=new XT(e),this.fast_=new XT(t),this.defaultTTFB_=s,this.ttfb_=new XT(e)}}class JT{push(e){this.chunks.push(e),this.dataLength+=e.length}flush(){const{chunks:e,dataLength:t}=this;let i;return e.length?(i=1===e.length?e[0]:function(e,t){const i=new Uint8Array(t);let s=0;for(let t=0;te[i]!==t[i]))}class tw{constructor(e){this.buffered=void 0;const t=(t,i,s)=>{if((i>>>=0)>s-1)throw new DOMException(`Failed to execute '${t}' on 'TimeRanges': The index provided (${i}) is greater than the maximum bound (${s})`);return e[i][t]};this.buffered={get length(){return e.length},end:i=>t("end",i,e.length),start:i=>t("start",i,e.length)}}}function iw(e){const t=[];for(let i=0;i{t=e})),s={execute:t,onStart:()=>{},onComplete:()=>{},onError:()=>{}};return this.append(s,e),i}executeNext(e){const{buffers:t,queues:i}=this,s=t[e],n=i[e];if(n.length){const t=n[0];try{t.execute()}catch(i){Sb.warn("[buffer-operation-queue]: Unhandled exception executing the current operation"),t.onError(i),null!=s&&s.updating||(n.shift(),this.executeNext(e))}}}shiftAndExecuteNext(e){this.queues[e].shift(),this.executeNext(e)}current(e){return this.queues[e][0]}constructor(e){this.buffers=void 0,this.queues={video:[],audio:[],audiovideo:[]},this.buffers=e}}const nw=NS(),rw=/([ha]vc.)(?:\.[^.,]+)+/;const aw={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,128:174,129:176,130:189,131:191,132:8482,133:162,134:163,135:9834,136:224,137:32,138:232,139:226,140:234,141:238,142:244,143:251,144:193,145:201,146:211,147:218,148:220,149:252,150:8216,151:161,152:42,153:8217,154:9473,155:169,156:8480,157:8226,158:8220,159:8221,160:192,161:194,162:199,163:200,164:202,165:203,166:235,167:206,168:207,169:239,170:212,171:217,172:249,173:219,174:171,175:187,176:195,177:227,178:205,179:204,180:236,181:210,182:242,183:213,184:245,185:123,186:125,187:92,188:94,189:95,190:124,191:8764,192:196,193:228,194:214,195:246,196:223,197:165,198:164,199:9475,200:197,201:229,202:216,203:248,204:9487,205:9491,206:9495,207:9499},ow=function(e){let t=e;return aw.hasOwnProperty(e)&&(t=aw[e]),String.fromCharCode(t)},lw=15,dw=100,cw={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},hw={17:2,18:4,21:6,22:8,23:10,19:13,20:15},uw={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},pw={25:2,26:4,29:6,30:8,31:10,27:13,28:15},gw=["white","green","blue","cyan","red","yellow","magenta","black","transparent"];class mw{log(e,t){if(this.verboseLevel>=e){const i="function"==typeof t?t():t;Sb.log(`${this.time} [${e}] ${i}`)}}constructor(){this.time=null,this.verboseLevel=0}}const _w=function(e){const t=[];for(let i=0;idw&&(this.logger.log(3,"Too large cursor position "+this.pos),this.pos=dw)}moveCursor(e){const t=this.pos+e;if(e>1)for(let e=this.pos+1;e=144&&this.backSpace();const t=ow(e);this.pos>=dw?this.logger.log(0,(()=>"Cannot insert "+e.toString(16)+" ("+t+") at position "+this.pos+". Skipping it!")):(this.chars[this.pos].setChar(t,this.currPenState),this.moveCursor(1))}clearFromPos(e){let t;for(t=e;t"pacData = "+JSON.stringify(e)));let t=e.row-1;if(this.nrRollUpRows&&t"bkgData = "+JSON.stringify(e))),this.backSpace(),this.setPen(e),this.insertChar(32)}setRollUpRows(e){this.nrRollUpRows=e}rollUp(){if(null===this.nrRollUpRows)return void this.logger.log(3,"roll_up but nrRollUpRows not set yet");this.logger.log(1,(()=>this.getDisplayText()));const e=this.currRow+1-this.nrRollUpRows,t=this.rows.splice(e,1)[0];t.clear(),this.rows.splice(this.currRow,0,t),this.logger.log(2,"Rolling up")}getDisplayText(e){e=e||!1;const t=[];let i="",s=-1;for(let i=0;i0&&(i=e?"["+t.join(" | ")+"]":t.join("\n")),i}getTextAndFormat(){return this.rows}constructor(e){this.rows=void 0,this.currRow=void 0,this.nrRollUpRows=void 0,this.lastOutputScreen=void 0,this.logger=void 0,this.rows=[];for(let t=0;t"MODE="+e)),"MODE_POP-ON"===this.mode?this.writeScreen=this.nonDisplayedMemory:(this.writeScreen=this.displayedMemory,this.writeScreen.reset()),"MODE_ROLL-UP"!==this.mode&&(this.displayedMemory.nrRollUpRows=null,this.nonDisplayedMemory.nrRollUpRows=null),this.mode=e)}insertChars(e){for(let t=0;tt+": "+this.writeScreen.getDisplayText(!0))),"MODE_PAINT-ON"!==this.mode&&"MODE_ROLL-UP"!==this.mode||(this.logger.log(1,(()=>"DISPLAYED: "+this.displayedMemory.getDisplayText(!0))),this.outputDataUpdate())}ccRCL(){this.logger.log(2,"RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")}ccBS(){this.logger.log(2,"BS - BackSpace"),"MODE_TEXT"!==this.mode&&(this.writeScreen.backSpace(),this.writeScreen===this.displayedMemory&&this.outputDataUpdate())}ccAOF(){}ccAON(){}ccDER(){this.logger.log(2,"DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()}ccRU(e){this.logger.log(2,"RU("+e+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(e)}ccFON(){this.logger.log(2,"FON - Flash On"),this.writeScreen.setPen({flash:!0})}ccRDC(){this.logger.log(2,"RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")}ccTR(){this.logger.log(2,"TR"),this.setMode("MODE_TEXT")}ccRTD(){this.logger.log(2,"RTD"),this.setMode("MODE_TEXT")}ccEDM(){this.logger.log(2,"EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate(!0)}ccCR(){this.logger.log(2,"CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate(!0)}ccENM(){this.logger.log(2,"ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()}ccEOC(){if(this.logger.log(2,"EOC - End Of Caption"),"MODE_POP-ON"===this.mode){const e=this.displayedMemory;this.displayedMemory=this.nonDisplayedMemory,this.nonDisplayedMemory=e,this.writeScreen=this.nonDisplayedMemory,this.logger.log(1,(()=>"DISP: "+this.displayedMemory.getDisplayText()))}this.outputDataUpdate(!0)}ccTO(e){this.logger.log(2,"TO("+e+") - Tab Offset"),this.writeScreen.moveCursor(e)}ccMIDROW(e){const t={flash:!1};if(t.underline=e%2==1,t.italics=e>=46,t.italics)t.foreground="white";else{const i=Math.floor(e/2)-16,s=["white","green","blue","cyan","red","yellow","magenta"];t.foreground=s[i]}this.logger.log(2,"MIDROW: "+JSON.stringify(t)),this.writeScreen.setPen(t)}outputDataUpdate(e=!1){const t=this.logger.time;null!==t&&this.outputFilter&&(null!==this.cueStartTime||this.displayedMemory.isEmpty()?this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue(this.cueStartTime,t,this.lastOutputScreen),e&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue(),this.cueStartTime=this.displayedMemory.isEmpty()?null:t):this.cueStartTime=t,this.lastOutputScreen.copy(this.displayedMemory))}cueSplitAtTime(e){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,e,this.displayedMemory),this.cueStartTime=e))}constructor(e,t,i){this.chNr=void 0,this.outputFilter=void 0,this.mode=void 0,this.verbose=void 0,this.displayedMemory=void 0,this.nonDisplayedMemory=void 0,this.lastOutputScreen=void 0,this.currRollUpRow=void 0,this.writeScreen=void 0,this.cueStartTime=void 0,this.logger=void 0,this.chNr=e,this.outputFilter=t,this.mode=null,this.verbose=0,this.displayedMemory=new bw(i),this.nonDisplayedMemory=new bw(i),this.lastOutputScreen=new bw(i),this.currRollUpRow=this.displayedMemory.rows[14],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.logger=i}}class Ew{getHandler(e){return this.channels[e].getHandler()}setHandler(e,t){this.channels[e].setHandler(t)}addData(e,t){let i,s,n,r=!1;this.logger.time=e;for(let e=0;e ("+_w([s,n])+")"),i=this.parseCmd(s,n),i||(i=this.parseMidrow(s,n)),i||(i=this.parsePAC(s,n)),i||(i=this.parseBackgroundAttributes(s,n)),!i&&(r=this.parseChars(s,n),r)){const e=this.currentChannel;if(e&&e>0){this.channels[e].insertChars(r)}else this.logger.log(2,"No channel found yet. TEXT-MODE?")}i||r||this.logger.log(2,"Couldn't parse cleaned data "+_w([s,n])+" orig: "+_w([t[e],t[e+1]]))}}parseCmd(e,t){const{cmdHistory:i}=this;if(!((20===e||28===e||21===e||29===e)&&t>=32&&t<=47)&&!((23===e||31===e)&&t>=33&&t<=35))return!1;if(Tw(e,t,i))return Cw(null,null,i),this.logger.log(3,"Repeated command ("+_w([e,t])+") is dropped"),!0;const s=20===e||21===e||23===e?1:2,n=this.channels[s];return 20===e||21===e||28===e||29===e?32===t?n.ccRCL():33===t?n.ccBS():34===t?n.ccAOF():35===t?n.ccAON():36===t?n.ccDER():37===t?n.ccRU(2):38===t?n.ccRU(3):39===t?n.ccRU(4):40===t?n.ccFON():41===t?n.ccRDC():42===t?n.ccTR():43===t?n.ccRTD():44===t?n.ccEDM():45===t?n.ccCR():46===t?n.ccENM():47===t&&n.ccEOC():n.ccTO(t-32),Cw(e,t,i),this.currentChannel=s,!0}parseMidrow(e,t){let i=0;if((17===e||25===e)&&t>=32&&t<=47){if(i=17===e?1:2,i!==this.currentChannel)return this.logger.log(0,"Mismatch channel in midrow parsing"),!1;const s=this.channels[i];return!!s&&(s.ccMIDROW(t),this.logger.log(3,"MIDROW ("+_w([e,t])+")"),!0)}return!1}parsePAC(e,t){let i;const s=this.cmdHistory;if(!((e>=17&&e<=23||e>=25&&e<=31)&&t>=64&&t<=127)&&!((16===e||24===e)&&t>=64&&t<=95))return!1;if(Tw(e,t,s))return Cw(null,null,s),!0;const n=e<=23?1:2;i=t>=64&&t<=95?1===n?cw[e]:uw[e]:1===n?hw[e]:pw[e];const r=this.channels[n];return!!r&&(r.setPAC(this.interpretPAC(i,t)),Cw(e,t,s),this.currentChannel=n,!0)}interpretPAC(e,t){let i;const s={color:null,italics:!1,indent:null,underline:!1,row:e};return i=t>95?t-96:t-64,s.underline=!(1&~i),i<=13?s.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(i/2)]:i<=15?(s.italics=!0,s.color="white"):s.indent=4*Math.floor((i-16)/2),s}parseChars(e,t){let i,s=null,n=null;if(e>=25?(i=2,n=e-8):(i=1,n=e),n>=17&&n<=19){let e;e=17===n?t+80:18===n?t+112:t+144,this.logger.log(2,"Special char '"+ow(e)+"' in channel "+i),s=[e]}else e>=32&&e<=127&&(s=0===t?[e]:[e,t]);if(s){const i=_w(s);this.logger.log(3,"Char codes = "+i.join(",")),Cw(e,t,this.cmdHistory)}return s}parseBackgroundAttributes(e,t){if(!((16===e||24===e)&&t>=32&&t<=47)&&!((23===e||31===e)&&t>=45&&t<=47))return!1;let i;const s={};16===e||24===e?(i=Math.floor((t-32)/2),s.background=gw[i],t%2==1&&(s.background=s.background+"_semi")):45===t?s.background="transparent":(s.foreground="black",47===t&&(s.underline=!0));const n=e<=23?1:2;return this.channels[n].setBkgData(s),Cw(e,t,this.cmdHistory),!0}reset(){for(let e=0;ee)&&(this.startTime=e),this.endTime=t,this.screen=i,this.timelineController.createCaptionsTrack(this.trackName)}reset(){this.cueRanges=[],this.startTime=null}constructor(e,t){this.timelineController=void 0,this.cueRanges=[],this.trackName=void 0,this.startTime=null,this.endTime=null,this.screen=null,this.timelineController=e,this.trackName=t}}var kw=function(){if("undefined"!=typeof self&&self.VTTCue)return self.VTTCue;const e=["","lr","rl"],t=["start","middle","end","left","right"];function i(e,t){if("string"!=typeof t)return!1;if(!Array.isArray(e))return!1;const i=t.toLowerCase();return!!~e.indexOf(i)&&i}function s(e){return i(t,e)}function n(e,...t){let i=1;for(;i100)throw new Error("Position must be between 0 and 100.");y=e,this.hasBeenReset=!0}})),Object.defineProperty(o,"positionAlign",n({},l,{get:function(){return b},set:function(e){const t=s(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");b=t,this.hasBeenReset=!0}})),Object.defineProperty(o,"size",n({},l,{get:function(){return S},set:function(e){if(e<0||e>100)throw new Error("Size must be between 0 and 100.");S=e,this.hasBeenReset=!0}})),Object.defineProperty(o,"align",n({},l,{get:function(){return E},set:function(e){const t=s(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");E=t,this.hasBeenReset=!0}})),o.displayState=void 0}return r.prototype.getCueAsHTML=function(){return self.WebVTT.convertCueToDOMTree(self,this.text)},r}();class Aw{decode(e,t){if(!e)return"";if("string"!=typeof e)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(e))}}function Iw(e){function t(e,t,i,s){return 3600*(0|e)+60*(0|t)+(0|i)+parseFloat(s||0)}const i=e.match(/^(?:(\d+):)?(\d{2}):(\d{2})(\.\d+)?/);return i?parseFloat(i[2])>59?t(i[2],i[3],0,i[4]):t(i[1],i[2],i[3],i[4]):null}class xw{set(e,t){this.get(e)||""===t||(this.values[e]=t)}get(e,t,i){return i?this.has(e)?this.values[e]:t[i]:this.has(e)?this.values[e]:t}has(e){return e in this.values}alt(e,t,i){for(let s=0;s=0&&i<=100)return this.set(e,i),!0}return!1}constructor(){this.values=Object.create(null)}}function Pw(e,t,i,s){const n=s?e.split(s):[e];for(const e in n){if("string"!=typeof n[e])continue;const s=n[e].split(i);if(2!==s.length)continue;t(s[0],s[1])}}const Ow=new kw(0,0,""),Rw="middle"===Ow.align?"middle":"center";function Lw(e,t,i){const s=e;function n(){const t=Iw(e);if(null===t)throw new Error("Malformed timestamp: "+s);return e=e.replace(/^[^\sa-zA-Z-]+/,""),t}function r(){e=e.replace(/^\s+/,"")}if(r(),t.startTime=n(),r(),"--\x3e"!==e.slice(0,3))throw new Error("Malformed time stamp (time stamps must be separated by '--\x3e'): "+s);e=e.slice(3),r(),t.endTime=n(),r(),function(e,t){const s=new xw;Pw(e,(function(e,t){let n;switch(e){case"region":for(let n=i.length-1;n>=0;n--)if(i[n].id===t){s.set(e,i[n].region);break}break;case"vertical":s.alt(e,t,["rl","lr"]);break;case"line":n=t.split(","),s.integer(e,n[0]),s.percent(e,n[0])&&s.set("snapToLines",!1),s.alt(e,n[0],["auto"]),2===n.length&&s.alt("lineAlign",n[1],["start",Rw,"end"]);break;case"position":n=t.split(","),s.percent(e,n[0]),2===n.length&&s.alt("positionAlign",n[1],["start",Rw,"end","line-left","line-right","auto"]);break;case"size":s.percent(e,t);break;case"align":s.alt(e,t,["start",Rw,"end","left","right"])}}),/:/,/\s/),t.region=s.get("region",null),t.vertical=s.get("vertical","");let n=s.get("line","auto");"auto"===n&&-1===Ow.line&&(n=-1),t.line=n,t.lineAlign=s.get("lineAlign","start"),t.snapToLines=s.get("snapToLines",!0),t.size=s.get("size",100),t.align=s.get("align",Rw);let r=s.get("position","auto");"auto"===r&&50===Ow.position&&(r="start"===t.align||"left"===t.align?0:"end"===t.align||"right"===t.align?100:50),t.position=r}(e,t)}function Dw(e){return e.replace(//gi,"\n")}class Mw{parse(e){const t=this;function i(){let e=t.buffer,i=0;for(e=Dw(e);i>>0).toString()};function Nw(e,t,i){return jw(e.toString())+jw(t.toString())+jw(i)}function Uw(e,t,i,s,n,r,a){const o=new Mw,l=lS(new Uint8Array(e)).trim().replace(Bw,"\n").split("\n"),d=[],c=t?function(e,t=1){return kT(e,9e4,1/t)}(t.baseTime,t.timescale):0;let h,u="00:00.000",p=0,g=0,m=!0;o.oncue=function(e){const r=i[s];let a=i.ccOffset;const o=(p-c)/9e4;if(null!=r&&r.new&&(void 0!==g?a=i.ccOffset=r.start:function(e,t,i){let s=e[t],n=e[s.prevCC];if(!n||!n.new&&s.new)return e.ccOffset=e.presentationOffset=s.start,void(s.new=!1);for(;null!=(r=n)&&r.new;){var r;e.ccOffset+=s.start-n.start,s.new=!1,s=n,n=e[s.prevCC]}e.presentationOffset=i}(i,s,o)),o){if(!t)return void(h=new Error("Missing initPTS for VTT MPEGTS"));a=o-i.presentationOffset}const l=e.endTime-e.startTime,u=RT(9e4*(e.startTime+a-g),9e4*n)/9e4;e.startTime=Math.max(u,0),e.endTime=Math.max(u+l,0);const m=e.text.trim();e.text=decodeURIComponent(encodeURIComponent(m)),e.id||(e.id=Nw(e.startTime,e.endTime,m)),e.endTime>0&&d.push(e)},o.onparsingerror=function(e){h=e},o.onflush=function(){h?a(h):r(d)},l.forEach((e=>{if(m){if(Fw(e,"X-TIMESTAMP-MAP=")){m=!1,e.slice(16).split(",").forEach((e=>{Fw(e,"LOCAL:")?u=e.slice(6):Fw(e,"MPEGTS:")&&(p=parseInt(e.slice(7)))}));try{g=function(e){let t=parseInt(e.slice(-3));const i=parseInt(e.slice(-6,-4)),s=parseInt(e.slice(-9,-7)),n=e.length>9?parseInt(e.substring(0,e.indexOf(":"))):0;if(!(pb(t)&&pb(i)&&pb(s)&&pb(n)))throw Error(`Malformed X-TIMESTAMP-MAP: Local:${e}`);return t+=1e3*i,t+=6e4*s,t+=36e5*n,t}(u)/1e3}catch(e){h=e}return}""===e&&(m=!1)}o.parse(e+"\n")})),o.flush()}const Vw="stpp.ttml.im1t",zw=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,Hw=/^(\d*(?:\.\d*)?)(h|m|s|ms|f|t)$/,$w={left:"start",center:"center",right:"end",start:"start",end:"end"};function qw(e,t,i,s){const n=bS(new Uint8Array(e),["mdat"]);if(0===n.length)return void s(new Error("Could not parse IMSC1 mdat"));const r=n.map((e=>lS(e))),a=function(e,t,i=1,s=!1){return kT(e,t,1/i,s)}(t.baseTime,1,t.timescale);try{r.forEach((e=>i(function(e,t){const i=new DOMParser,s=i.parseFromString(e,"text/xml"),n=s.getElementsByTagName("tt")[0];if(!n)throw new Error("Invalid ttml");const r={frameRate:30,subFrameRate:1,frameRateMultiplier:0,tickRate:0},a=Object.keys(r).reduce(((e,t)=>(e[t]=n.getAttribute(`ttp:${t}`)||r[t],e)),{}),o="preserve"!==n.getAttribute("xml:space"),l=Ww(Gw(n,"styling","style")),d=Ww(Gw(n,"layout","region")),c=Gw(n,"body","[begin]");return[].map.call(c,(e=>{const i=Kw(e,o);if(!i||!e.hasAttribute("begin"))return null;const s=Qw(e.getAttribute("begin"),a),n=Qw(e.getAttribute("dur"),a);let r=Qw(e.getAttribute("end"),a);if(null===s)throw Xw(e);if(null===r){if(null===n)throw Xw(e);r=s+n}const c=new kw(s-t,r-t,i);c.id=Nw(c.startTime,c.endTime,c.text);const h=function(e,t,i){const s="http://www.w3.org/ns/ttml#styling";let n=null;const r=["displayAlign","textAlign","color","backgroundColor","fontSize","fontFamily"],a=null!=e&&e.hasAttribute("style")?e.getAttribute("style"):null;a&&i.hasOwnProperty(a)&&(n=i[a]);return r.reduce(((i,r)=>{const a=Yw(t,s,r)||Yw(e,s,r)||Yw(n,s,r);return a&&(i[r]=a),i}),{})}(d[e.getAttribute("region")],l[e.getAttribute("style")],l),{textAlign:u}=h;if(u){const e=$w[u];e&&(c.lineAlign=e),c.align=u}return ub(c,h),c})).filter((e=>null!==e))}(e,a))))}catch(e){s(e)}}function Gw(e,t,i){const s=e.getElementsByTagName(t)[0];return s?[].slice.call(s.querySelectorAll(i)):[]}function Ww(e){return e.reduce(((e,t)=>{const i=t.getAttribute("xml:id");return i&&(e[i]=t),e}),{})}function Kw(e,t){return[].slice.call(e.childNodes).reduce(((e,i,s)=>{var n;return"br"===i.nodeName&&s?e+"\n":null!=(n=i.childNodes)&&n.length?Kw(i,t):t?e+i.textContent.trim().replace(/\s+/g," "):e+i.textContent}),"")}function Yw(e,t,i){return e&&e.hasAttributeNS(t,i)?e.getAttributeNS(t,i):null}function Xw(e){return new Error(`Could not parse ttml timestamp ${e}`)}function Qw(e,t){if(!e)return null;let i=Iw(e);return null===i&&(zw.test(e)?i=function(e,t){const i=zw.exec(e),s=(0|i[4])+(0|i[5])/t.subFrameRate;return 3600*(0|i[1])+60*(0|i[2])+(0|i[3])+s/t.frameRate}(e,t):Hw.test(e)&&(i=function(e,t){const i=Hw.exec(e),s=Number(i[1]);switch(i[2]){case"h":return 3600*s;case"m":return 60*s;case"ms":return 1e3*s;case"f":return s/t.frameRate;case"t":return s/t.tickRate}return s}(e,t))),i}function Jw(e,t){return!!e&&e.label===t.name&&!(e.textTrack1||e.textTrack2)}class Zw{setStreamController(e){this.streamController=e}destroy(){this.unregisterListener(),this.hls.config.capLevelToPlayerSize&&this.stopCapping(),this.media=null,this.clientRect=null,this.hls=this.streamController=null}registerListeners(){const{hls:e}=this;e.on(gb.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),e.on(gb.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(gb.MANIFEST_PARSED,this.onManifestParsed,this),e.on(gb.BUFFER_CODECS,this.onBufferCodecs,this),e.on(gb.MEDIA_DETACHING,this.onMediaDetaching,this)}unregisterListener(){const{hls:e}=this;e.off(gb.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),e.off(gb.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(gb.MANIFEST_PARSED,this.onManifestParsed,this),e.off(gb.BUFFER_CODECS,this.onBufferCodecs,this),e.off(gb.MEDIA_DETACHING,this.onMediaDetaching,this)}onFpsDropLevelCapping(e,t){const i=this.hls.levels[t.droppedLevel];this.isLevelAllowed(i)&&this.restrictedLevels.push({bitrate:i.bitrate,height:i.height,width:i.width})}onMediaAttaching(e,t){this.media=t.media instanceof HTMLVideoElement?t.media:null,this.clientRect=null}onManifestParsed(e,t){const i=this.hls;this.restrictedLevels=[],this.firstLevel=t.firstLevel,i.config.capLevelToPlayerSize&&t.video&&this.startCapping()}onBufferCodecs(e,t){this.hls.config.capLevelToPlayerSize&&t.video&&this.startCapping()}onMediaDetaching(){this.stopCapping()}detectPlayerSize(){if(this.media&&this.mediaHeight>0&&this.mediaWidth>0){const e=this.hls.levels;if(e.length){const t=this.hls;t.autoLevelCapping=this.getMaxLevel(e.length-1),t.autoLevelCapping>this.autoLevelCapping&&this.streamController&&this.streamController.nextLevelSwitch(),this.autoLevelCapping=t.autoLevelCapping}}}getMaxLevel(e){const t=this.hls.levels;if(!t.length)return-1;const i=t.filter(((t,i)=>this.isLevelAllowed(t)&&i<=e));return this.clientRect=null,Zw.getMaxLevelByMediaSize(i,this.mediaWidth,this.mediaHeight)}startCapping(){this.timer||(this.autoLevelCapping=Number.POSITIVE_INFINITY,this.hls.firstLevel=this.getMaxLevel(this.firstLevel),self.clearInterval(this.timer),this.timer=self.setInterval(this.detectPlayerSize.bind(this),1e3),this.detectPlayerSize())}stopCapping(){this.restrictedLevels=[],this.firstLevel=-1,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(self.clearInterval(this.timer),this.timer=void 0)}getDimensions(){if(this.clientRect)return this.clientRect;const e=this.media,t={width:0,height:0};if(e){const i=e.getBoundingClientRect();t.width=i.width,t.height=i.height,t.width||t.height||(t.width=i.right-i.left||e.width||0,t.height=i.bottom-i.top||e.height||0)}return this.clientRect=t,t}get mediaWidth(){return this.getDimensions().width*this.contentScaleFactor}get mediaHeight(){return this.getDimensions().height*this.contentScaleFactor}get contentScaleFactor(){let e=1;if(!this.hls.config.ignoreDevicePixelRatio)try{e=self.devicePixelRatio}catch(e){}return e}isLevelAllowed(e){return!this.restrictedLevels.some((t=>e.bitrate===t.bitrate&&e.width===t.width&&e.height===t.height))}static getMaxLevelByMediaSize(e,t,i){if(null==e||!e.length)return-1;let s=e.length-1;for(let a=0;a=t||o.height>=i)&&(n=o,!(r=e[a+1])||n.width!==r.width||n.height!==r.height)){s=a;break}}var n,r;return s}constructor(e){this.hls=void 0,this.autoLevelCapping=void 0,this.firstLevel=void 0,this.media=void 0,this.restrictedLevels=void 0,this.timer=void 0,this.clientRect=void 0,this.streamController=void 0,this.hls=e,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.firstLevel=-1,this.media=null,this.restrictedLevels=[],this.timer=void 0,this.clientRect=null,this.registerListeners()}}const ek="[eme]";class tk{destroy(){this.unregisterListeners(),this.onMediaDetached();const e=this.config;e.requestMediaKeySystemAccessFunc=null,e.licenseXhrSetup=e.licenseResponseCallback=void 0,e.drmSystems=e.drmSystemOptions={},this.hls=this.onMediaEncrypted=this.onWaitingForKey=this.keyIdToKeySessionPromise=null,this.config=null}registerListeners(){this.hls.on(gb.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(gb.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.on(gb.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(gb.MANIFEST_LOADED,this.onManifestLoaded,this)}unregisterListeners(){this.hls.off(gb.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(gb.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.off(gb.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.off(gb.MANIFEST_LOADED,this.onManifestLoaded,this)}getLicenseServerUrl(e){const{drmSystems:t,widevineLicenseUrl:i}=this.config,s=t[e];if(s)return s.licenseUrl;if(e===jb.WIDEVINE&&i)return i;throw new Error(`no license server URL configured for key-system "${e}"`)}getServerCertificateUrl(e){const{drmSystems:t}=this.config,i=t[e];if(i)return i.serverCertificateUrl;this.log(`No Server Certificate in config.drmSystems["${e}"]`)}attemptKeySystemAccess(e){const t=this.hls.levels,i=(e,t,i)=>!!e&&i.indexOf(e)===t,s=t.map((e=>e.audioCodec)).filter(i),n=t.map((e=>e.videoCodec)).filter(i);return s.length+n.length===0&&n.push("avc1.42e01e"),new Promise(((t,i)=>{const r=e=>{const a=e.shift();this.getMediaKeysPromise(a,s,n).then((e=>t({keySystem:a,mediaKeys:e}))).catch((t=>{e.length?r(e):i(t instanceof ik?t:new ik({type:mb.KEY_SYSTEM_ERROR,details:_b.KEY_SYSTEM_NO_ACCESS,error:t,fatal:!0},t.message))}))};r(e)}))}requestMediaKeySystemAccess(e,t){const{requestMediaKeySystemAccessFunc:i}=this.config;if("function"!=typeof i){let e=`Configured requestMediaKeySystemAccess is not a function ${i}`;return null===Wb&&"http:"===self.location.protocol&&(e=`navigator.requestMediaKeySystemAccess is not available over insecure protocol ${location.protocol}`),Promise.reject(new Error(e))}return i(e,t)}getMediaKeysPromise(e,t,i){const s=function(e,t,i,s){let n;switch(e){case jb.FAIRPLAY:n=["cenc","sinf"];break;case jb.WIDEVINE:case jb.PLAYREADY:n=["cenc"];break;case jb.CLEARKEY:n=["cenc","keyids"];break;default:throw new Error(`Unknown key-system: ${e}`)}return function(e,t,i,s){return[{initDataTypes:e,persistentState:s.persistentState||"not-allowed",distinctiveIdentifier:s.distinctiveIdentifier||"not-allowed",sessionTypes:s.sessionTypes||[s.sessionType||"temporary"],audioCapabilities:t.map((e=>({contentType:`audio/mp4; codecs="${e}"`,robustness:s.audioRobustness||"",encryptionScheme:s.audioEncryptionScheme||null}))),videoCapabilities:i.map((e=>({contentType:`video/mp4; codecs="${e}"`,robustness:s.videoRobustness||"",encryptionScheme:s.videoEncryptionScheme||null})))}]}(n,t,i,s)}(e,t,i,this.config.drmSystemOptions),n=this.keySystemAccessPromises[e];let r=null==n?void 0:n.keySystemAccess;if(!r){this.log(`Requesting encrypted media "${e}" key-system access with config: ${JSON.stringify(s)}`),r=this.requestMediaKeySystemAccess(e,s);const t=this.keySystemAccessPromises[e]={keySystemAccess:r};return r.catch((t=>{this.log(`Failed to obtain access to key-system "${e}": ${t}`)})),r.then((i=>{this.log(`Access for key-system "${i.keySystem}" obtained`);const s=this.fetchServerCertificate(e);return this.log(`Create media-keys for "${e}"`),t.mediaKeys=i.createMediaKeys().then((t=>(this.log(`Media-keys created for "${e}"`),s.then((i=>i?this.setMediaKeysServerCertificate(t,e,i):t))))),t.mediaKeys.catch((t=>{this.error(`Failed to create media-keys for "${e}"}: ${t}`)})),t.mediaKeys}))}return r.then((()=>n.mediaKeys))}createMediaKeySessionContext({decryptdata:e,keySystem:t,mediaKeys:i}){this.log(`Creating key-system session "${t}" keyId: ${hS(e.keyId||[])}`);const s=i.createSession(),n={decryptdata:e,keySystem:t,mediaKeys:i,mediaKeysSession:s,keyStatus:"status-pending"};return this.mediaKeySessions.push(n),n}renewKeySession(e){const t=e.decryptdata;if(t.pssh){const i=this.createMediaKeySessionContext(e),s=this.getKeyIdString(t),n="cenc";this.keyIdToKeySessionPromise[s]=this.generateRequestWithPreferredKeySession(i,n,t.pssh,"expired")}else this.warn("Could not renew expired session. Missing pssh initData.");this.removeSession(e)}getKeyIdString(e){if(!e)throw new Error("Could not read keyId of undefined decryptdata");if(null===e.keyId)throw new Error("keyId is null");return hS(e.keyId)}updateKeySession(e,t){var i;const s=e.mediaKeysSession;return this.log(`Updating key-session "${s.sessionId}" for keyID ${hS((null==(i=e.decryptdata)?void 0:i.keyId)||[])}\n } (data length: ${t?t.byteLength:t})`),s.update(t)}selectKeySystemFormat(e){const t=Object.keys(e.levelkeys||{});return this.keyFormatPromise||(this.log(`Selecting key-system from fragment (sn: ${e.sn} ${e.type}: ${e.level}) key formats ${t.join(", ")}`),this.keyFormatPromise=this.getKeyFormatPromise(t)),this.keyFormatPromise}getKeyFormatPromise(e){return new Promise(((t,i)=>{const s=Gb(this.config),n=e.map(Hb).filter((e=>!!e&&-1!==s.indexOf(e)));return this.getKeySystemSelectionPromise(n).then((({keySystem:e})=>{const s=qb(e);s?t(s):i(new Error(`Unable to find format for key-system "${e}"`))})).catch(i)}))}loadKey(e){const t=e.keyInfo.decryptdata,i=this.getKeyIdString(t),s=`(keyId: ${i} format: "${t.keyFormat}" method: ${t.method} uri: ${t.uri})`;this.log(`Starting session for key ${s}`);let n=this.keyIdToKeySessionPromise[i];return n||(n=this.keyIdToKeySessionPromise[i]=this.getKeySystemForKeyPromise(t).then((({keySystem:i,mediaKeys:n})=>(this.throwIfDestroyed(),this.log(`Handle encrypted media sn: ${e.frag.sn} ${e.frag.type}: ${e.frag.level} using key ${s}`),this.attemptSetMediaKeys(i,n).then((()=>{this.throwIfDestroyed();const e=this.createMediaKeySessionContext({keySystem:i,mediaKeys:n,decryptdata:t});return this.generateRequestWithPreferredKeySession(e,"cenc",t.pssh,"playlist-key")}))))),n.catch((e=>this.handleError(e)))),n}throwIfDestroyed(e="Invalid state"){if(!this.hls)throw new Error("invalid state")}handleError(e){this.hls&&(this.error(e.message),e instanceof ik?this.hls.trigger(gb.ERROR,e.data):this.hls.trigger(gb.ERROR,{type:mb.KEY_SYSTEM_ERROR,details:_b.KEY_SYSTEM_NO_KEYS,error:e,fatal:!0}))}getKeySystemForKeyPromise(e){const t=this.getKeyIdString(e),i=this.keyIdToKeySessionPromise[t];if(!i){const t=Hb(e.keyFormat),i=t?[t]:Gb(this.config);return this.attemptKeySystemAccess(i)}return i}getKeySystemSelectionPromise(e){if(e.length||(e=Gb(this.config)),0===e.length)throw new ik({type:mb.KEY_SYSTEM_ERROR,details:_b.KEY_SYSTEM_NO_CONFIGURED_LICENSE,fatal:!0},`Missing key-system license configuration options ${JSON.stringify({drmSystems:this.config.drmSystems})}`);return this.attemptKeySystemAccess(e)}_onMediaEncrypted(e){const{initDataType:t,initData:i}=e;if(this.debug(`"${e.type}" event: init data type: "${t}"`),null===i)return;let s,n;if("sinf"===t&&this.config.drmSystems[jb.FAIRPLAY]){const e=mS(new Uint8Array(i));try{const t=Mb(JSON.parse(e).sinf),i=CS(new Uint8Array(t));if(!i)return;s=i.subarray(8,24),n=jb.FAIRPLAY}catch(e){return void this.warn('Failed to parse sinf "encrypted" event message initData')}}else{const e=function(e){if(!(e instanceof ArrayBuffer)||e.byteLength<32)return null;const t={version:0,systemId:"",kids:null,data:null},i=new DataView(e),s=i.getUint32(0);if(e.byteLength!==s&&s>44)return null;if(1886614376!==i.getUint32(4))return null;if(t.version=i.getUint32(8)>>>24,t.version>1)return null;t.systemId=hS(new Uint8Array(e,12,16));const n=i.getUint32(28);if(0===t.version){if(s-32this.generateRequestWithPreferredKeySession(n,t,i,"encrypted-event-key-match")));break}}l||(l=a[r]=this.getKeySystemSelectionPromise([n]).then((({keySystem:e,mediaKeys:n})=>{var a;this.throwIfDestroyed();const o=new RS("ISO-23001-7",r,null!=(a=qb(e))?a:"");return o.pssh=new Uint8Array(i),o.keyId=s,this.attemptSetMediaKeys(e,n).then((()=>{this.throwIfDestroyed();const s=this.createMediaKeySessionContext({decryptdata:o,keySystem:e,mediaKeys:n});return this.generateRequestWithPreferredKeySession(s,t,i,"encrypted-event-no-match")}))}))),l.catch((e=>this.handleError(e)))}_onWaitingForKey(e){this.log(`"${e.type}" event`)}attemptSetMediaKeys(e,t){const i=this.setMediaKeysQueue.slice();this.log(`Setting media-keys for "${e}"`);const s=Promise.all(i).then((()=>{if(!this.media)throw new Error("Attempted to set mediaKeys without media element attached");return this.media.setMediaKeys(t)}));return this.setMediaKeysQueue.push(s),s.then((()=>{this.log(`Media-keys set for "${e}"`),i.push(s),this.setMediaKeysQueue=this.setMediaKeysQueue.filter((e=>-1===i.indexOf(e)))}))}generateRequestWithPreferredKeySession(e,t,i,s){var n,r;const a=null==(n=this.config.drmSystems)||null==(r=n[e.keySystem])?void 0:r.generateRequest;if(a)try{const s=a.call(this.hls,t,i,e);if(!s)throw new Error("Invalid response from configured generateRequest filter");t=s.initDataType,i=e.decryptdata.pssh=s.initData?new Uint8Array(s.initData):null}catch(e){var o;if(this.warn(e.message),null!=(o=this.hls)&&o.config.debug)throw e}if(null===i)return this.log(`Skipping key-session request for "${s}" (no initData)`),Promise.resolve(e);const l=this.getKeyIdString(e.decryptdata);this.log(`Generating key-session request for "${s}": ${l} (init data type: ${t} length: ${i?i.byteLength:null})`);const d=new qT;e.mediaKeysSession.onmessage=t=>{const i=e.mediaKeysSession;if(!i)return void d.emit("error",new Error("invalid state"));const{messageType:s,message:n}=t;this.log(`"${s}" message event for session "${i.sessionId}" message size: ${n.byteLength}`),"license-request"===s||"license-renewal"===s?this.renewLicense(e,n).catch((e=>{this.handleError(e),d.emit("error",e)})):"license-release"===s?e.keySystem===jb.FAIRPLAY&&(this.updateKeySession(e,Fb("acknowledged")),this.removeSession(e)):this.warn(`unhandled media key message type "${s}"`)},e.mediaKeysSession.onkeystatuseschange=t=>{if(!e.mediaKeysSession)return void d.emit("error",new Error("invalid state"));this.onKeyStatusChange(e);const i=e.keyStatus;d.emit("keyStatus",i),"expired"===i&&(this.warn(`${e.keySystem} expired for key ${l}`),this.renewKeySession(e))};const c=new Promise(((e,t)=>{d.on("error",t),d.on("keyStatus",(i=>{i.startsWith("usable")?e():"output-restricted"===i?t(new ik({type:mb.KEY_SYSTEM_ERROR,details:_b.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED,fatal:!1},"HDCP level output restricted")):"internal-error"===i?t(new ik({type:mb.KEY_SYSTEM_ERROR,details:_b.KEY_SYSTEM_STATUS_INTERNAL_ERROR,fatal:!0},`key status changed to "${i}"`)):"expired"===i?t(new Error("key expired while generating request")):this.warn(`unhandled key status change "${i}"`)}))}));return e.mediaKeysSession.generateRequest(t,i).then((()=>{var t;this.log(`Request generated for key-session "${null==(t=e.mediaKeysSession)?void 0:t.sessionId}" keyId: ${l}`)})).catch((e=>{throw new ik({type:mb.KEY_SYSTEM_ERROR,details:_b.KEY_SYSTEM_NO_SESSION,error:e,fatal:!1},`Error generating key-session request: ${e}`)})).then((()=>c)).catch((t=>{throw d.removeAllListeners(),this.removeSession(e),t})).then((()=>(d.removeAllListeners(),e)))}onKeyStatusChange(e){e.mediaKeysSession.keyStatuses.forEach(((t,i)=>{this.log(`key status change "${t}" for keyStatuses keyId: ${hS("buffer"in i?new Uint8Array(i.buffer,i.byteOffset,i.byteLength):new Uint8Array(i))} session keyId: ${hS(new Uint8Array(e.decryptdata.keyId||[]))} uri: ${e.decryptdata.uri}`),e.keyStatus=t}))}fetchServerCertificate(e){const t=this.config,i=new(0,t.loader)(t),s=this.getServerCertificateUrl(e);return s?(this.log(`Fetching serverCertificate for "${e}"`),new Promise(((n,r)=>{const a={responseType:"arraybuffer",url:s},o=t.certLoadPolicy.default,l={loadPolicy:o,timeout:o.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0},d={onSuccess:(e,t,i,s)=>{n(e.data)},onError:(t,i,n,o)=>{r(new ik({type:mb.KEY_SYSTEM_ERROR,details:_b.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED,fatal:!0,networkDetails:n,response:cb({url:a.url,data:void 0},t)},`"${e}" certificate request failed (${s}). Status: ${t.code} (${t.text})`))},onTimeout:(t,i,n)=>{r(new ik({type:mb.KEY_SYSTEM_ERROR,details:_b.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED,fatal:!0,networkDetails:n,response:{url:a.url,data:void 0}},`"${e}" certificate request timed out (${s})`))},onAbort:(e,t,i)=>{r(new Error("aborted"))}};i.load(a,l,d)}))):Promise.resolve()}setMediaKeysServerCertificate(e,t,i){return new Promise(((s,n)=>{e.setServerCertificate(i).then((n=>{this.log(`setServerCertificate ${n?"success":"not supported by CDM"} (${null==i?void 0:i.byteLength}) on "${t}"`),s(e)})).catch((e=>{n(new ik({type:mb.KEY_SYSTEM_ERROR,details:_b.KEY_SYSTEM_SERVER_CERTIFICATE_UPDATE_FAILED,error:e,fatal:!0},e.message))}))}))}renewLicense(e,t){return this.requestLicense(e,new Uint8Array(t)).then((t=>this.updateKeySession(e,new Uint8Array(t)).catch((e=>{throw new ik({type:mb.KEY_SYSTEM_ERROR,details:_b.KEY_SYSTEM_SESSION_UPDATE_FAILED,error:e,fatal:!0},e.message)}))))}setupLicenseXHR(e,t,i,s){const n=this.config.licenseXhrSetup;return n?Promise.resolve().then((()=>{if(!i.decryptdata)throw new Error("Key removed");return n.call(this.hls,e,t,i,s)})).catch((r=>{if(!i.decryptdata)throw r;return e.open("POST",t,!0),n.call(this.hls,e,t,i,s)})).then((i=>{e.readyState||e.open("POST",t,!0);return{xhr:e,licenseChallenge:i||s}})):(e.open("POST",t,!0),Promise.resolve({xhr:e,licenseChallenge:s}))}requestLicense(e,t){const i=this.config.keyLoadPolicy.default;return new Promise(((s,n)=>{const r=this.getLicenseServerUrl(e.keySystem);this.log(`Sending license request to URL: ${r}`);const a=new XMLHttpRequest;a.responseType="arraybuffer",a.onreadystatechange=()=>{if(!this.hls||!e.mediaKeysSession)return n(new Error("invalid state"));if(4===a.readyState)if(200===a.status){this._requestLicenseFailureCount=0;let t=a.response;this.log(`License received ${t instanceof ArrayBuffer?t.byteLength:t}`);const i=this.config.licenseResponseCallback;if(i)try{t=i.call(this.hls,a,r,e)}catch(e){this.error(e)}s(t)}else{const o=i.errorRetry,l=o?o.maxNumRetry:0;if(this._requestLicenseFailureCount++,this._requestLicenseFailureCount>l||a.status>=400&&a.status<500)n(new ik({type:mb.KEY_SYSTEM_ERROR,details:_b.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0,networkDetails:a,response:{url:r,data:void 0,code:a.status,text:a.statusText}},`License Request XHR failed (${r}). Status: ${a.status} (${a.statusText})`));else{const i=l-this._requestLicenseFailureCount+1;this.warn(`Retrying license request, ${i} attempts left`),this.requestLicense(e,t).then(s,n)}}},e.licenseXhr&&e.licenseXhr.readyState!==XMLHttpRequest.DONE&&e.licenseXhr.abort(),e.licenseXhr=a,this.setupLicenseXHR(a,r,e,t).then((({xhr:e,licenseChallenge:t})=>{e.send(t)}))}))}onMediaAttached(e,t){if(!this.config.emeEnabled)return;const i=t.media;this.media=i,i.addEventListener("encrypted",this.onMediaEncrypted),i.addEventListener("waitingforkey",this.onWaitingForKey)}onMediaDetached(){const e=this.media,t=this.mediaKeySessions;e&&(e.removeEventListener("encrypted",this.onMediaEncrypted),e.removeEventListener("waitingforkey",this.onWaitingForKey),this.media=null),this._requestLicenseFailureCount=0,this.setMediaKeysQueue=[],this.mediaKeySessions=[],this.keyIdToKeySessionPromise={},RS.clearKeyUriToKeyIdMap();const i=t.length;tk.CDMCleanupPromise=Promise.all(t.map((e=>this.removeSession(e))).concat(null==e?void 0:e.setMediaKeys(null).catch((t=>{this.log(`Could not clear media keys: ${t}. media.src: ${null==e?void 0:e.src}`)})))).then((()=>{i&&(this.log("finished closing key sessions and clearing media keys"),t.length=0)})).catch((t=>{this.log(`Could not close sessions and clear media keys: ${t}. media.src: ${null==e?void 0:e.src}`)}))}onManifestLoading(){this.keyFormatPromise=null}onManifestLoaded(e,{sessionKeys:t}){if(t&&this.config.emeEnabled&&!this.keyFormatPromise){const e=t.reduce(((e,t)=>(-1===e.indexOf(t.keyFormat)&&e.push(t.keyFormat),e)),[]);this.log(`Selecting key-system from session-keys ${e.join(", ")}`),this.keyFormatPromise=this.getKeyFormatPromise(e)}}removeSession(e){const{mediaKeysSession:t,licenseXhr:i}=e;if(t){this.log(`Remove licenses and keys and close session ${t.sessionId}`),t.onmessage=null,t.onkeystatuseschange=null,i&&i.readyState!==XMLHttpRequest.DONE&&i.abort(),e.mediaKeysSession=e.decryptdata=e.licenseXhr=void 0;const s=this.mediaKeySessions.indexOf(e);return s>-1&&this.mediaKeySessions.splice(s,1),t.remove().catch((e=>{this.log(`Could not remove session: ${e}`)})).then((()=>t.close())).catch((e=>{this.log(`Could not close session: ${e}`)}))}}constructor(e){this.hls=void 0,this.config=void 0,this.media=null,this.keyFormatPromise=null,this.keySystemAccessPromises={},this._requestLicenseFailureCount=0,this.mediaKeySessions=[],this.keyIdToKeySessionPromise={},this.setMediaKeysQueue=tk.CDMCleanupPromise?[tk.CDMCleanupPromise]:[],this.onMediaEncrypted=this._onMediaEncrypted.bind(this),this.onWaitingForKey=this._onWaitingForKey.bind(this),this.debug=Sb.debug.bind(Sb,ek),this.log=Sb.log.bind(Sb,ek),this.warn=Sb.warn.bind(Sb,ek),this.error=Sb.error.bind(Sb,ek),this.hls=e,this.config=e.config,this.registerListeners()}}tk.CDMCleanupPromise=void 0;class ik extends Error{constructor(e,t){super(t),this.data=void 0,e.error||(e.error=new Error(t)),this.data=e,e.err=e.error}}var sk="m",nk="a",rk="v",ak="av",ok="i",lk="tt";class dk{registerListeners(){const e=this.hls;e.on(gb.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(gb.MEDIA_DETACHED,this.onMediaDetached,this),e.on(gb.BUFFER_CREATED,this.onBufferCreated,this)}unregisterListeners(){const e=this.hls;e.off(gb.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(gb.MEDIA_DETACHED,this.onMediaDetached,this),e.off(gb.BUFFER_CREATED,this.onBufferCreated,this)}destroy(){this.unregisterListeners(),this.onMediaDetached(),this.hls=this.config=this.audioBuffer=this.videoBuffer=null}onMediaAttached(e,t){this.media=t.media,this.media.addEventListener("waiting",this.onWaiting),this.media.addEventListener("playing",this.onPlaying)}onMediaDetached(){this.media&&(this.media.removeEventListener("waiting",this.onWaiting),this.media.removeEventListener("playing",this.onPlaying),this.media=null)}onBufferCreated(e,t){var i,s;this.audioBuffer=null==(i=t.tracks.audio)?void 0:i.buffer,this.videoBuffer=null==(s=t.tracks.video)?void 0:s.buffer}createData(){var e;return{v:1,sf:"h",sid:this.sid,cid:this.cid,pr:null==(e=this.media)?void 0:e.playbackRate,mtp:this.hls.bandwidthEstimate/1e3}}apply(e,t={}){ub(t,this.createData());const i=t.ot===ok||t.ot===rk||t.ot===ak;if(this.starved&&i&&(t.bs=!0,t.su=!0,this.starved=!1),null==t.su&&(t.su=this.buffering),this.useHeaders){const i=dk.toHeaders(t);if(!Object.keys(i).length)return;e.headers||(e.headers={}),ub(e.headers,i)}else{const i=dk.toQuery(t);if(!i)return;e.url=dk.appendQueryToUri(e.url,i)}}getObjectType(e){const{type:t}=e;return"subtitle"===t?lk:"initSegment"===e.sn?ok:"audio"===t?nk:"main"===t?this.hls.audioTracks.length?rk:ak:void 0}getTopBandwidth(e){let t,i=0;const s=this.hls;if(e===nk)t=s.audioTracks;else{const e=s.maxAutoLevel,i=e>-1?e+1:s.levels.length;t=s.levels.slice(0,i)}for(const e of t)e.bitrate>i&&(i=e.bitrate);return i>0?i:NaN}getBufferLength(e){const t=this.hls.media,i=e===nk?this.audioBuffer:this.videoBuffer;if(!i||!t)return NaN;return 1e3*yC.bufferInfo(i,t.currentTime,this.config.maxBufferHole).len}createPlaylistLoader(){const{pLoader:e}=this.config,t=this.applyPlaylistData,i=e||this.config.loader;return class{get stats(){return this.loader.stats}get context(){return this.loader.context}destroy(){this.loader.destroy()}abort(){this.loader.abort()}load(e,i,s){t(e),this.loader.load(e,i,s)}constructor(e){this.loader=void 0,this.loader=new i(e)}}}createFragmentLoader(){const{fLoader:e}=this.config,t=this.applyFragmentData,i=e||this.config.loader;return class{get stats(){return this.loader.stats}get context(){return this.loader.context}destroy(){this.loader.destroy()}abort(){this.loader.abort()}load(e,i,s){t(e),this.loader.load(e,i,s)}constructor(e){this.loader=void 0,this.loader=new i(e)}}}static uuid(){const e=URL.createObjectURL(new Blob),t=e.toString();return URL.revokeObjectURL(e),t.slice(t.lastIndexOf("/")+1)}static serialize(e){const t=[],i=e=>!Number.isNaN(e)&&null!=e&&""!==e&&!1!==e,s=e=>Math.round(e),n=e=>100*s(e/100),r={br:s,d:s,bl:n,dl:n,mtp:n,nor:e=>encodeURIComponent(e),rtp:n,tb:s},a=Object.keys(e||{}).sort();for(const s of a){let n=e[s];if(!i(n))continue;if("v"===s&&1===n)continue;if("pr"==s&&1===n)continue;const a=r[s];a&&(n=a(n));const o=typeof n;let l;l="ot"===s||"sf"===s||"st"===s?`${s}=${n}`:"boolean"===o?s:"number"===o?`${s}=${n}`:`${s}=${JSON.stringify(n)}`,t.push(l)}return t.join(",")}static toHeaders(e){const t=Object.keys(e),i={},s=["Object","Request","Session","Status"],n=[{},{},{},{}],r={br:0,d:0,ot:0,tb:0,bl:1,dl:1,mtp:1,nor:1,nrr:1,su:1,cid:2,pr:2,sf:2,sid:2,st:2,v:2,bs:3,rtp:3};for(const i of t){n[null!=r[i]?r[i]:1][i]=e[i]}for(let e=0;e{this.initialized&&(this.starved=!0),this.buffering=!0},this.onPlaying=()=>{this.initialized||(this.initialized=!0),this.buffering=!1},this.applyPlaylistData=e=>{try{this.apply(e,{ot:sk,su:!this.initialized})}catch(e){Sb.warn("Could not generate manifest CMCD data.",e)}},this.applyFragmentData=e=>{try{const t=e.frag,i=this.hls.levels[t.level],s=this.getObjectType(t),n={d:1e3*t.duration,ot:s};s!==rk&&s!==nk&&s!=ak||(n.br=i.bitrate/1e3,n.tb=this.getTopBandwidth(s)/1e3,n.bl=this.getBufferLength(s)),this.apply(e,n)}catch(e){Sb.warn("Could not generate segment CMCD data.",e)}},this.hls=e;const t=this.config=e.config,{cmcd:i}=t;null!=i&&(t.pLoader=this.createPlaylistLoader(),t.fLoader=this.createFragmentLoader(),this.sid=i.sessionId||dk.uuid(),this.cid=i.contentId,this.useHeaders=!0===i.useHeaders,this.registerListeners())}}function ck(e,t,i,s){e&&Object.keys(t).forEach((n=>{const r=e.filter((e=>e.groupId===n)).map((e=>{const r=ub({},e);return r.details=void 0,r.attrs=new Tb(r.attrs),r.url=r.attrs.URI=hk(e.url,e.attrs["STABLE-RENDITION-ID"],"PER-RENDITION-URIS",i),r.groupId=r.attrs["GROUP-ID"]=t[n],r.attrs["PATHWAY-ID"]=s,r}));e.push(...r)}))}function hk(e,t,i,s){const{HOST:n,PARAMS:r,[i]:a}=s;let o;t&&(o=null==a?void 0:a[t],o&&(e=o));const l=new self.URL(e);return n&&!o&&(l.host=n),r&&Object.keys(r).sort().forEach((e=>{e&&l.searchParams.set(e,r[e])})),l.href}const uk=/^age:\s*[\d.]+\s*$/im;class pk{destroy(){this.callbacks=null,this.abortInternal(),this.loader=null,this.config=null}abortInternal(){const e=this.loader;self.clearTimeout(this.requestTimeout),self.clearTimeout(this.retryTimeout),e&&(e.onreadystatechange=null,e.onprogress=null,4!==e.readyState&&(this.stats.aborted=!0,e.abort()))}abort(){var e;this.abortInternal(),null!=(e=this.callbacks)&&e.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.loader)}load(e,t,i){if(this.stats.loading.start)throw new Error("Loader can only be used once.");this.stats.loading.start=self.performance.now(),this.context=e,this.config=t,this.callbacks=i,this.loadInternal()}loadInternal(){const{config:e,context:t}=this;if(!e)return;const i=this.loader=new self.XMLHttpRequest,s=this.stats;s.loading.first=0,s.loaded=0,s.aborted=!1;const n=this.xhrSetup;n?Promise.resolve().then((()=>{if(!this.stats.aborted)return n(i,t.url)})).catch((e=>(i.open("GET",t.url,!0),n(i,t.url)))).then((()=>{this.stats.aborted||this.openAndSendXhr(i,t,e)})).catch((e=>{this.callbacks.onError({code:i.status,text:e.message},t,i,s)})):this.openAndSendXhr(i,t,e)}openAndSendXhr(e,t,i){e.readyState||e.open("GET",t.url,!0);const s=this.context.headers,{maxTimeToFirstByteMs:n,maxLoadTimeMs:r}=i.loadPolicy;if(s)for(const t in s)e.setRequestHeader(t,s[t]);t.rangeEnd&&e.setRequestHeader("Range","bytes="+t.rangeStart+"-"+(t.rangeEnd-1)),e.onreadystatechange=this.readystatechange.bind(this),e.onprogress=this.loadprogress.bind(this),e.responseType=t.responseType,self.clearTimeout(this.requestTimeout),i.timeout=n&&pb(n)?n:r,this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),i.timeout),e.send()}readystatechange(){const{context:e,loader:t,stats:i}=this;if(!e||!t)return;const s=t.readyState,n=this.config;if(!i.aborted&&s>=2&&(0===i.loading.first&&(i.loading.first=Math.max(self.performance.now(),i.loading.start),n.timeout!==n.loadPolicy.maxLoadTimeMs&&(self.clearTimeout(this.requestTimeout),n.timeout=n.loadPolicy.maxLoadTimeMs,this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),n.loadPolicy.maxLoadTimeMs-(i.loading.first-i.loading.start)))),4===s)){self.clearTimeout(this.requestTimeout),t.onreadystatechange=null,t.onprogress=null;const s=t.status,r="text"!==t.responseType;if(s>=200&&s<300&&(r&&t.response||null!==t.responseText)){i.loading.end=Math.max(self.performance.now(),i.loading.first);const n=r?t.response:t.responseText,a="arraybuffer"===t.responseType?n.byteLength:n.length;if(i.loaded=i.total=a,i.bwEstimate=8e3*i.total/(i.loading.end-i.loading.first),!this.callbacks)return;const o=this.callbacks.onProgress;if(o&&o(i,e,n,t),!this.callbacks)return;const l={url:t.responseURL,data:n,code:s};this.callbacks.onSuccess(l,i,e,t)}else{const r=n.loadPolicy.errorRetry;VE(r,i.retry,!1,s)?this.retry(r):(Sb.error(`${s} while loading ${e.url}`),this.callbacks.onError({code:s,text:t.statusText},e,t,i))}}}loadtimeout(){var e;const t=null==(e=this.config)?void 0:e.loadPolicy.timeoutRetry;if(VE(t,this.stats.retry,!0))this.retry(t);else{Sb.warn(`timeout while loading ${this.context.url}`);const e=this.callbacks;e&&(this.abortInternal(),e.onTimeout(this.stats,this.context,this.loader))}}retry(e){const{context:t,stats:i}=this;this.retryDelay=NE(e,i.retry),i.retry++,Sb.warn(`${status?"HTTP Status "+status:"Timeout"} while loading ${t.url}, retrying ${i.retry}/${e.maxNumRetry} in ${this.retryDelay}ms`),this.abortInternal(),this.loader=null,self.clearTimeout(this.retryTimeout),this.retryTimeout=self.setTimeout(this.loadInternal.bind(this),this.retryDelay)}loadprogress(e){const t=this.stats;t.loaded=e.loaded,e.lengthComputable&&(t.total=e.total)}getCacheAge(){let e=null;if(this.loader&&uk.test(this.loader.getAllResponseHeaders())){const t=this.loader.getResponseHeader("age");e=t?parseFloat(t):null}return e}getResponseHeader(e){return this.loader&&new RegExp(`^${e}:\\s*[\\d.]+\\s*$`,"im").test(this.loader.getAllResponseHeaders())?this.loader.getResponseHeader(e):null}constructor(e){this.xhrSetup=void 0,this.requestTimeout=void 0,this.retryTimeout=void 0,this.retryDelay=void 0,this.config=null,this.callbacks=null,this.context=void 0,this.loader=null,this.stats=void 0,this.xhrSetup=e&&e.xhrSetup||null,this.stats=new Ab,this.retryDelay=0}}const gk=/(\d+)-(\d+)\/(\d+)/;class mk{destroy(){this.loader=this.callbacks=null,this.abortInternal()}abortInternal(){const e=this.response;null!=e&&e.ok||(this.stats.aborted=!0,this.controller.abort())}abort(){var e;this.abortInternal(),null!=(e=this.callbacks)&&e.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.response)}load(e,t,i){const s=this.stats;if(s.loading.start)throw new Error("Loader can only be used once.");s.loading.start=self.performance.now();const n=function(e,t){const i={method:"GET",mode:"cors",credentials:"same-origin",signal:t,headers:new self.Headers(ub({},e.headers))};e.rangeEnd&&i.headers.set("Range","bytes="+e.rangeStart+"-"+String(e.rangeEnd-1));return i}(e,this.controller.signal),r=i.onProgress,a="arraybuffer"===e.responseType,o=a?"byteLength":"length",{maxTimeToFirstByteMs:l,maxLoadTimeMs:d}=t.loadPolicy;this.context=e,this.config=t,this.callbacks=i,this.request=this.fetchSetup(e,n),self.clearTimeout(this.requestTimeout),t.timeout=l&&pb(l)?l:d,this.requestTimeout=self.setTimeout((()=>{this.abortInternal(),i.onTimeout(s,e,this.response)}),t.timeout),self.fetch(this.request).then((n=>{this.response=this.loader=n;const o=Math.max(self.performance.now(),s.loading.start);if(self.clearTimeout(this.requestTimeout),t.timeout=d,this.requestTimeout=self.setTimeout((()=>{this.abortInternal(),i.onTimeout(s,e,this.response)}),d-(o-s.loading.start)),!n.ok){const{status:e,statusText:t}=n;throw new fk(t||"fetch, bad network response",e,n)}return s.loading.first=o,s.total=function(e){const t=e.get("Content-Range");if(t){const e=function(e){const t=gk.exec(e);if(t)return parseInt(t[2])-parseInt(t[1])+1}(t);if(pb(e))return e}const i=e.get("Content-Length");if(i)return parseInt(i)}(n.headers)||s.total,r&&pb(t.highWaterMark)?this.loadProgressively(n,s,e,t.highWaterMark,r):a?n.arrayBuffer():"json"===e.responseType?n.json():n.text()})).then((n=>{const{response:a}=this;self.clearTimeout(this.requestTimeout),s.loading.end=Math.max(self.performance.now(),s.loading.first);const l=n[o];l&&(s.loaded=s.total=l);const d={url:a.url,data:n,code:a.status};r&&!pb(t.highWaterMark)&&r(s,e,n,a),i.onSuccess(d,s,e,a)})).catch((t=>{if(self.clearTimeout(this.requestTimeout),s.aborted)return;const n=t&&t.code||0,r=t?t.message:null;i.onError({code:n,text:r},e,t?t.details:null,s)}))}getCacheAge(){let e=null;if(this.response){const t=this.response.headers.get("age");e=t?parseFloat(t):null}return e}getResponseHeader(e){return this.response?this.response.headers.get(e):null}loadProgressively(e,t,i,s=0,n){const r=new JT,a=e.body.getReader(),o=()=>a.read().then((a=>{if(a.done)return r.dataLength&&n(t,i,r.flush(),e),Promise.resolve(new ArrayBuffer(0));const l=a.value,d=l.length;return t.loaded+=d,d=s&&n(t,i,r.flush(),e)):n(t,i,l,e),o()})).catch((()=>Promise.reject()));return o()}constructor(e){this.fetchSetup=void 0,this.requestTimeout=void 0,this.request=void 0,this.response=void 0,this.controller=void 0,this.context=void 0,this.config=null,this.callbacks=null,this.stats=void 0,this.loader=null,this.fetchSetup=e.fetchSetup||_k,this.controller=new self.AbortController,this.stats=new Ab}}function _k(e,t){return new self.Request(e.url,t)}class fk extends Error{constructor(e,t,i){super(e),this.code=void 0,this.details=void 0,this.code=t,this.details=i}}const vk=/\s/,yk={newCue(e,t,i,s){const n=[];let r,a,o,l,d;const c=self.VTTCue||self.TextTrackCue;for(let u=0;u=16?l--:l++;const s=Dw(d.trim()),p=Nw(t,i,s);null!=e&&null!=(h=e.cues)&&h.getCueById(p)||(a=new c(t,i,s),a.id=p,a.line=u+1,a.align="left",a.position=10+Math.min(80,10*Math.floor(8*l/32)),n.push(a))}return e&&n.length&&(n.sort(((e,t)=>"auto"===e.line||"auto"===t.line?0:e.line>8&&t.line>8?t.line-e.line:e.line-t.line)),n.forEach((t=>pE(e,t)))),n}},bk=cb(cb({autoStartLoad:!0,startPosition:-1,defaultAudioCodec:void 0,debug:!1,capLevelOnFPSDrop:!1,capLevelToPlayerSize:!1,ignoreDevicePixelRatio:!1,initialLiveManifestSize:1,maxBufferLength:30,backBufferLength:1/0,maxBufferSize:6e7,maxBufferHole:.1,highBufferWatchdogPeriod:2,nudgeOffset:.1,nudgeMaxRetry:3,maxFragLookUpTolerance:.25,liveSyncDurationCount:3,liveMaxLatencyDurationCount:1/0,liveSyncDuration:void 0,liveMaxLatencyDuration:void 0,maxLiveSyncPlaybackRate:1,liveDurationInfinity:!1,liveBackBufferLength:null,maxMaxBufferLength:600,enableWorker:!0,workerPath:null,enableSoftwareAES:!0,startLevel:void 0,startFragPrefetch:!1,fpsDroppedMonitoringPeriod:5e3,fpsDroppedMonitoringThreshold:.2,appendErrorMaxRetry:3,loader:pk,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,licenseXhrSetup:void 0,licenseResponseCallback:void 0,abrController:class{registerListeners(){const{hls:e}=this;e.on(gb.FRAG_LOADING,this.onFragLoading,this),e.on(gb.FRAG_LOADED,this.onFragLoaded,this),e.on(gb.FRAG_BUFFERED,this.onFragBuffered,this),e.on(gb.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(gb.LEVEL_LOADED,this.onLevelLoaded,this)}unregisterListeners(){const{hls:e}=this;e.off(gb.FRAG_LOADING,this.onFragLoading,this),e.off(gb.FRAG_LOADED,this.onFragLoaded,this),e.off(gb.FRAG_BUFFERED,this.onFragBuffered,this),e.off(gb.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(gb.LEVEL_LOADED,this.onLevelLoaded,this)}destroy(){this.unregisterListeners(),this.clearTimer(),this.hls=this.onCheck=null,this.fragCurrent=this.partCurrent=null}onFragLoading(e,t){var i;const s=t.frag;this.ignoreFragment(s)||(this.fragCurrent=s,this.partCurrent=null!=(i=t.part)?i:null,this.clearTimer(),this.timer=self.setInterval(this.onCheck,100))}onLevelSwitching(e,t){this.clearTimer()}getTimeToLoadFrag(e,t,i,s){return e+i/t+(s?this.lastLevelLoadSec:0)}onLevelLoaded(e,t){const i=this.hls.config,{total:s,bwEstimate:n}=t.stats;pb(s)&&pb(n)&&(this.lastLevelLoadSec=8*s/n),t.details.live?this.bwEstimator.update(i.abrEwmaSlowLive,i.abrEwmaFastLive):this.bwEstimator.update(i.abrEwmaSlowVoD,i.abrEwmaFastVoD)}_abandonRulesCheck(){const{fragCurrent:e,partCurrent:t,hls:i}=this,{autoLevelEnabled:s,media:n}=i;if(!e||!n)return;const r=performance.now(),a=t?t.stats:e.stats,o=t?t.duration:e.duration,l=r-a.loading.start;if(a.aborted||a.loaded&&a.loaded===a.total||0===e.level)return this.clearTimer(),void(this._nextAutoLevel=-1);if(!s||n.paused||!n.playbackRate||!n.readyState)return;const d=i.mainForwardBufferInfo;if(null===d)return;const c=this.bwEstimator.getEstimateTTFB(),h=Math.abs(n.playbackRate);if(l<=Math.max(c,o/(2*h)*1e3))return;const u=d.len/h;if(u>=2*o/h)return;const p=a.loading.first?a.loading.first-a.loading.start:-1,g=a.loaded&&p>-1,m=this.bwEstimator.getEstimate(),{levels:_,minAutoLevel:f}=i,v=_[e.level],y=a.total||Math.max(a.loaded,Math.round(o*v.maxBitrate/8));let b=l-p;b<1&&g&&(b=Math.min(l,8*a.loaded/m));const S=g?1e3*a.loaded/b:0,E=S?(y-a.loaded)/S:8*y/m+c/1e3;if(E<=u)return;const C=S?8*S:m;let T,w=Number.POSITIVE_INFINITY;for(T=e.level-1;T>f;T--){const e=_[T].maxBitrate;if(w=this.getTimeToLoadFrag(c/1e3,C,o*e,!_[T].details),w=E||w>10*o||(i.nextLoadLevel=T,g?this.bwEstimator.sample(l-Math.min(c,p),a.loaded):this.bwEstimator.sampleTTFB(l),this.clearTimer(),Sb.warn(`[abr] Fragment ${e.sn}${t?" part "+t.index:""} of level ${e.level} is loading too slowly;\n Time to underbuffer: ${u.toFixed(3)} s\n Estimated load time for current fragment: ${E.toFixed(3)} s\n Estimated load time for down switch fragment: ${w.toFixed(3)} s\n TTFB estimate: ${p}\n Current BW estimate: ${pb(m)?(m/1024).toFixed(3):"Unknown"} Kb/s\n New BW estimate: ${(this.bwEstimator.getEstimate()/1024).toFixed(3)} Kb/s\n Aborting and switching to level ${T}`),e.loader&&(this.fragCurrent=this.partCurrent=null,e.abortRequests()),i.trigger(gb.FRAG_LOAD_EMERGENCY_ABORTED,{frag:e,part:t,stats:a}))}onFragLoaded(e,{frag:t,part:i}){const s=i?i.stats:t.stats;if(t.type===aE&&this.bwEstimator.sampleTTFB(s.loading.first-s.loading.start),!this.ignoreFragment(t)){if(this.clearTimer(),this.lastLoadedFragLevel=t.level,this._nextAutoLevel=-1,this.hls.config.abrMaxWithRealBitrate){const e=i?i.duration:t.duration,n=this.hls.levels[t.level],r=(n.loaded?n.loaded.bytes:0)+s.loaded,a=(n.loaded?n.loaded.duration:0)+e;n.loaded={bytes:r,duration:a},n.realBitrate=Math.round(8*r/a)}if(t.bitrateTest){const e={stats:s,frag:t,part:i,id:t.type};this.onFragBuffered(gb.FRAG_BUFFERED,e),t.bitrateTest=!1}}}onFragBuffered(e,t){const{frag:i,part:s}=t,n=null!=s&&s.stats.loaded?s.stats:i.stats;if(n.aborted)return;if(this.ignoreFragment(i))return;const r=n.parsing.end-n.loading.start-Math.min(n.loading.first-n.loading.start,this.bwEstimator.getEstimateTTFB());this.bwEstimator.sample(r,n.loaded),n.bwEstimate=this.bwEstimator.getEstimate(),i.bitrateTest?this.bitrateTestDelay=r/1e3:this.bitrateTestDelay=0}ignoreFragment(e){return e.type!==aE||"initSegment"===e.sn}clearTimer(){self.clearInterval(this.timer)}get nextAutoLevel(){const e=this._nextAutoLevel,t=this.bwEstimator;if(-1!==e&&!t.canEstimate())return e;let i=this.getNextABRAutoLevel();if(-1!==e){const t=this.hls.levels;if(t.length>Math.max(e,i)&&t[e].loadError<=t[i].loadError)return e}return-1!==e&&(i=Math.min(e,i)),i}getNextABRAutoLevel(){const{fragCurrent:e,partCurrent:t,hls:i}=this,{maxAutoLevel:s,config:n,minAutoLevel:r,media:a}=i,o=t?t.duration:e?e.duration:0,l=a&&0!==a.playbackRate?Math.abs(a.playbackRate):1,d=this.bwEstimator?this.bwEstimator.getEstimate():n.abrEwmaDefaultEstimate,c=i.mainForwardBufferInfo,h=(c?c.len:0)/l;let u=this.findBestLevel(d,r,s,h,n.abrBandWidthFactor,n.abrBandWidthUpFactor);if(u>=0)return u;Sb.trace(`[abr] ${h?"rebuffering expected":"buffer is empty"}, finding optimal quality level`);let p=o?Math.min(o,n.maxStarvationDelay):n.maxStarvationDelay,g=n.abrBandWidthFactor,m=n.abrBandWidthUpFactor;if(!h){const e=this.bitrateTestDelay;if(e){p=(o?Math.min(o,n.maxLoadingDelay):n.maxLoadingDelay)-e,Sb.trace(`[abr] bitrate test took ${Math.round(1e3*e)}ms, set first fragment max fetchDuration to ${Math.round(1e3*p)} ms`),g=m=1}}return u=this.findBestLevel(d,r,s,h+p,g,m),Math.max(u,0)}findBestLevel(e,t,i,s,n,r){var a;const{fragCurrent:o,partCurrent:l,lastLoadedFragLevel:d}=this,{levels:c}=this.hls,h=c[d],u=!(null==h||null==(a=h.details)||!a.live),p=null==h?void 0:h.codecSet,g=l?l.duration:o?o.duration:0,m=this.bwEstimator.getEstimateTTFB()/1e3;let _=t,f=-1;for(let a=i;a>=t;a--){const t=c[a];if(!t||p&&t.codecSet!==p){t&&(_=Math.min(a,_),f=Math.max(a,f));continue}-1!==f&&Sb.trace(`[abr] Skipped level(s) ${_}-${f} with CODECS:"${c[f].attrs.CODECS}"; not compatible with "${h.attrs.CODECS}"`);const i=t.details,o=(l?null==i?void 0:i.partTarget:null==i?void 0:i.averagetargetduration)||g;let v;v=a<=d?n*e:r*e;const y=c[a].maxBitrate,b=this.getTimeToLoadFrag(m,v,y*o,void 0===i);if(Sb.trace(`[abr] level:${a} adjustedbw-bitrate:${Math.round(v-y)} avgDuration:${o.toFixed(1)} maxFetchDuration:${s.toFixed(1)} fetchDuration:${b.toFixed(1)}`),v>y&&(0===b||!pb(b)||u&&!this.bitrateTestDelay||b0||Object.keys(this.pendingTracks).length>0}destroy(){this.unregisterListeners(),this.details=null,this.lastMpegAudioChunk=null}registerListeners(){const{hls:e}=this;e.on(gb.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(gb.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(gb.MANIFEST_LOADING,this.onManifestLoading,this),e.on(gb.MANIFEST_PARSED,this.onManifestParsed,this),e.on(gb.BUFFER_RESET,this.onBufferReset,this),e.on(gb.BUFFER_APPENDING,this.onBufferAppending,this),e.on(gb.BUFFER_CODECS,this.onBufferCodecs,this),e.on(gb.BUFFER_EOS,this.onBufferEos,this),e.on(gb.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(gb.LEVEL_UPDATED,this.onLevelUpdated,this),e.on(gb.FRAG_PARSED,this.onFragParsed,this),e.on(gb.FRAG_CHANGED,this.onFragChanged,this)}unregisterListeners(){const{hls:e}=this;e.off(gb.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(gb.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(gb.MANIFEST_LOADING,this.onManifestLoading,this),e.off(gb.MANIFEST_PARSED,this.onManifestParsed,this),e.off(gb.BUFFER_RESET,this.onBufferReset,this),e.off(gb.BUFFER_APPENDING,this.onBufferAppending,this),e.off(gb.BUFFER_CODECS,this.onBufferCodecs,this),e.off(gb.BUFFER_EOS,this.onBufferEos,this),e.off(gb.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(gb.LEVEL_UPDATED,this.onLevelUpdated,this),e.off(gb.FRAG_PARSED,this.onFragParsed,this),e.off(gb.FRAG_CHANGED,this.onFragChanged,this)}_initSourceBuffer(){this.sourceBuffer={},this.operationQueue=new sw(this.sourceBuffer),this.listeners={audio:[],video:[],audiovideo:[]},this.lastMpegAudioChunk=null}onManifestLoading(){this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=0,this.details=null}onManifestParsed(e,t){let i=2;(t.audio&&!t.video||!t.altAudio)&&(i=1),this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=i,Sb.log(`${this.bufferCodecEventsExpected} bufferCodec event(s) expected`)}onMediaAttaching(e,t){const i=this.media=t.media;if(i&&nw){const e=this.mediaSource=new nw;e.addEventListener("sourceopen",this._onMediaSourceOpen),e.addEventListener("sourceended",this._onMediaSourceEnded),e.addEventListener("sourceclose",this._onMediaSourceClose),i.src=self.URL.createObjectURL(e),this._objectUrl=i.src,i.addEventListener("emptied",this._onMediaEmptied)}}onMediaDetaching(){const{media:e,mediaSource:t,_objectUrl:i}=this;if(t){if(Sb.log("[buffer-controller]: media source detaching"),"open"===t.readyState)try{t.endOfStream()}catch(e){Sb.warn(`[buffer-controller]: onMediaDetaching: ${e.message} while calling endOfStream`)}this.onBufferReset(),t.removeEventListener("sourceopen",this._onMediaSourceOpen),t.removeEventListener("sourceended",this._onMediaSourceEnded),t.removeEventListener("sourceclose",this._onMediaSourceClose),e&&(e.removeEventListener("emptied",this._onMediaEmptied),i&&self.URL.revokeObjectURL(i),e.src===i?(e.removeAttribute("src"),e.load()):Sb.warn("[buffer-controller]: media.src was changed by a third party - skip cleanup")),this.mediaSource=null,this.media=null,this._objectUrl=null,this.bufferCodecEventsExpected=this._bufferCodecEventsTotal,this.pendingTracks={},this.tracks={}}this.hls.trigger(gb.MEDIA_DETACHED,void 0)}onBufferReset(){this.getSourceBufferTypes().forEach((e=>{const t=this.sourceBuffer[e];try{t&&(this.removeBufferListeners(e),this.mediaSource&&this.mediaSource.removeSourceBuffer(t),this.sourceBuffer[e]=void 0)}catch(t){Sb.warn(`[buffer-controller]: Failed to reset the ${e} buffer`,t)}})),this._initSourceBuffer()}onBufferCodecs(e,t){const i=this.getSourceBufferTypes().length;Object.keys(t).forEach((e=>{if(i){const i=this.tracks[e];if(i&&"function"==typeof i.buffer.changeType){const{id:s,codec:n,levelCodec:r,container:a,metadata:o}=t[e],l=(i.levelCodec||i.codec).replace(rw,"$1"),d=(r||n).replace(rw,"$1");if(l!==d){const t=`${a};codecs=${r||n}`;this.appendChangeType(e,t),Sb.log(`[buffer-controller]: switching codec ${l} to ${d}`),this.tracks[e]={buffer:i.buffer,codec:n,container:a,levelCodec:r,metadata:o,id:s}}}}else this.pendingTracks[e]=t[e]})),i||(this.bufferCodecEventsExpected=Math.max(this.bufferCodecEventsExpected-1,0),this.mediaSource&&"open"===this.mediaSource.readyState&&this.checkPendingTracks())}appendChangeType(e,t){const{operationQueue:i}=this,s={execute:()=>{const s=this.sourceBuffer[e];s&&(Sb.log(`[buffer-controller]: changing ${e} sourceBuffer type to ${t}`),s.changeType(t)),i.shiftAndExecuteNext(e)},onStart:()=>{},onComplete:()=>{},onError:t=>{Sb.warn(`[buffer-controller]: Failed to change ${e} SourceBuffer type`,t)}};i.append(s,e)}onBufferAppending(e,t){const{hls:i,operationQueue:s,tracks:n}=this,{data:r,type:a,frag:o,part:l,chunkMeta:d}=t,c=d.buffering[a],h=self.performance.now();c.start=h;const u=o.stats.buffering,p=l?l.stats.buffering:null;0===u.start&&(u.start=h),p&&0===p.start&&(p.start=h);const g=n.audio;let m=!1;"audio"===a&&"audio/mpeg"===(null==g?void 0:g.container)&&(m=!this.lastMpegAudioChunk||1===d.id||this.lastMpegAudioChunk.sn!==d.sn,this.lastMpegAudioChunk=d);const _=o.start,f={execute:()=>{if(c.executeStart=self.performance.now(),m){const e=this.sourceBuffer[a];if(e){const t=_-e.timestampOffset;Math.abs(t)>=.1&&(Sb.log(`[buffer-controller]: Updating audio SourceBuffer timestampOffset to ${_} (delta: ${t}) sn: ${o.sn})`),e.timestampOffset=_)}}this.appendExecutor(r,a)},onStart:()=>{},onComplete:()=>{const e=self.performance.now();c.executeEnd=c.end=e,0===u.first&&(u.first=e),p&&0===p.first&&(p.first=e);const{sourceBuffer:t}=this,i={};for(const e in t)i[e]=yC.getBuffered(t[e]);this.appendError=0,this.hls.trigger(gb.BUFFER_APPENDED,{type:a,frag:o,part:l,chunkMeta:d,parent:o.type,timeRanges:i})},onError:e=>{Sb.error(`[buffer-controller]: Error encountered while trying to append to the ${a} SourceBuffer`,e);const t={type:mb.MEDIA_ERROR,parent:o.type,details:_b.BUFFER_APPEND_ERROR,frag:o,part:l,chunkMeta:d,error:e,err:e,fatal:!1};e.code===DOMException.QUOTA_EXCEEDED_ERR?t.details=_b.BUFFER_FULL_ERROR:(this.appendError++,t.details=_b.BUFFER_APPEND_ERROR,this.appendError>i.config.appendErrorMaxRetry&&(Sb.error(`[buffer-controller]: Failed ${i.config.appendErrorMaxRetry} times to append segment in sourceBuffer`),t.fatal=!0)),i.trigger(gb.ERROR,t)}};s.append(f,a)}onBufferFlushing(e,t){const{operationQueue:i}=this,s=e=>({execute:this.removeExecutor.bind(this,e,t.startOffset,t.endOffset),onStart:()=>{},onComplete:()=>{this.hls.trigger(gb.BUFFER_FLUSHED,{type:e})},onError:t=>{Sb.warn(`[buffer-controller]: Failed to remove from ${e} SourceBuffer`,t)}});t.type?i.append(s(t.type),t.type):this.getSourceBufferTypes().forEach((e=>{i.append(s(e),e)}))}onFragParsed(e,t){const{frag:i,part:s}=t,n=[],r=s?s.elementaryStreams:i.elementaryStreams;r[Pb]?n.push("audiovideo"):(r[Ib]&&n.push("audio"),r[xb]&&n.push("video"));0===n.length&&Sb.warn(`Fragments must have at least one ElementaryStreamType set. type: ${i.type} level: ${i.level} sn: ${i.sn}`),this.blockBuffers((()=>{const e=self.performance.now();i.stats.buffering.end=e,s&&(s.stats.buffering.end=e);const t=s?s.stats:i.stats;this.hls.trigger(gb.FRAG_BUFFERED,{frag:i,part:s,stats:t,id:i.type})}),n)}onFragChanged(e,t){this.flushBackBuffer()}onBufferEos(e,t){this.getSourceBufferTypes().reduce(((e,i)=>{const s=this.sourceBuffer[i];return!s||t.type&&t.type!==i||(s.ending=!0,s.ended||(s.ended=!0,Sb.log(`[buffer-controller]: ${i} sourceBuffer now EOS`))),e&&!(s&&!s.ended)}),!0)&&(Sb.log("[buffer-controller]: Queueing mediaSource.endOfStream()"),this.blockBuffers((()=>{this.getSourceBufferTypes().forEach((e=>{const t=this.sourceBuffer[e];t&&(t.ending=!1)}));const{mediaSource:e}=this;e&&"open"===e.readyState?(Sb.log("[buffer-controller]: Calling mediaSource.endOfStream()"),e.endOfStream()):e&&Sb.info(`[buffer-controller]: Could not call mediaSource.endOfStream(). mediaSource.readyState: ${e.readyState}`)})))}onLevelUpdated(e,{details:t}){t.fragments.length&&(this.details=t,this.getSourceBufferTypes().length?this.blockBuffers(this.updateMediaElementDuration.bind(this)):this.updateMediaElementDuration())}flushBackBuffer(){const{hls:e,details:t,media:i,sourceBuffer:s}=this;if(!i||null===t)return;const n=this.getSourceBufferTypes();if(!n.length)return;const r=t.live&&null!==e.config.liveBackBufferLength?e.config.liveBackBufferLength:e.config.backBufferLength;if(!pb(r)||r<0)return;const a=i.currentTime,o=t.levelTargetDuration,l=Math.max(r,o),d=Math.floor(a/o)*o-l;n.forEach((i=>{const n=s[i];if(n){const s=yC.getBuffered(n);if(s.length>0&&d>s.start(0)){if(e.trigger(gb.BACK_BUFFER_REACHED,{bufferEnd:d}),t.live)e.trigger(gb.LIVE_BACK_BUFFER_REACHED,{bufferEnd:d});else if(n.ended&&s.end(s.length-1)-a<2*o)return void Sb.info(`[buffer-controller]: Cannot flush ${i} back buffer while SourceBuffer is in ended state`);e.trigger(gb.BUFFER_FLUSHING,{startOffset:0,endOffset:d,type:i})}}}))}updateMediaElementDuration(){if(!this.details||!this.media||!this.mediaSource||"open"!==this.mediaSource.readyState)return;const{details:e,hls:t,media:i,mediaSource:s}=this,n=e.fragments[0].start+e.totalduration,r=i.duration,a=pb(s.duration)?s.duration:0;e.live&&t.config.liveDurationInfinity?(Sb.log("[buffer-controller]: Media Source duration is set to Infinity"),s.duration=1/0,this.updateSeekableRange(e)):(n>a&&n>r||!pb(r))&&(Sb.log(`[buffer-controller]: Updating Media Source duration to ${n.toFixed(3)}`),s.duration=n)}updateSeekableRange(e){const t=this.mediaSource,i=e.fragments;if(i.length&&e.live&&null!=t&&t.setLiveSeekableRange){const s=Math.max(0,i[0].start),n=Math.max(s,s+e.totalduration);t.setLiveSeekableRange(s,n)}}checkPendingTracks(){const{bufferCodecEventsExpected:e,operationQueue:t,pendingTracks:i}=this,s=Object.keys(i).length;if(s&&!e||2===s){this.createSourceBuffers(i),this.pendingTracks={};const e=this.getSourceBufferTypes();if(e.length)this.hls.trigger(gb.BUFFER_CREATED,{tracks:this.tracks}),e.forEach((e=>{t.executeNext(e)}));else{const e=new Error("could not create source buffer for media codec(s)");this.hls.trigger(gb.ERROR,{type:mb.MEDIA_ERROR,details:_b.BUFFER_INCOMPATIBLE_CODECS_ERROR,fatal:!0,error:e,reason:e.message})}}}createSourceBuffers(e){const{sourceBuffer:t,mediaSource:i}=this;if(!i)throw Error("createSourceBuffers called when mediaSource was null");for(const s in e)if(!t[s]){const n=e[s];if(!n)throw Error(`source buffer exists for track ${s}, however track does not`);const r=n.levelCodec||n.codec,a=`${n.container};codecs=${r}`;Sb.log(`[buffer-controller]: creating sourceBuffer(${a})`);try{const e=t[s]=i.addSourceBuffer(a),o=s;this.addBufferListener(o,"updatestart",this._onSBUpdateStart),this.addBufferListener(o,"updateend",this._onSBUpdateEnd),this.addBufferListener(o,"error",this._onSBUpdateError),this.tracks[s]={buffer:e,codec:r,container:n.container,levelCodec:n.levelCodec,metadata:n.metadata,id:n.id}}catch(e){Sb.error(`[buffer-controller]: error while trying to add sourceBuffer: ${e.message}`),this.hls.trigger(gb.ERROR,{type:mb.MEDIA_ERROR,details:_b.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:e,mimeType:a})}}}_onSBUpdateStart(e){const{operationQueue:t}=this;t.current(e).onStart()}_onSBUpdateEnd(e){const{operationQueue:t}=this;t.current(e).onComplete(),t.shiftAndExecuteNext(e)}_onSBUpdateError(e,t){const i=new Error(`${e} SourceBuffer error`);Sb.error(`[buffer-controller]: ${i}`,t),this.hls.trigger(gb.ERROR,{type:mb.MEDIA_ERROR,details:_b.BUFFER_APPENDING_ERROR,error:i,fatal:!1});const s=this.operationQueue.current(e);s&&s.onError(t)}removeExecutor(e,t,i){const{media:s,mediaSource:n,operationQueue:r,sourceBuffer:a}=this,o=a[e];if(!s||!n||!o)return Sb.warn(`[buffer-controller]: Attempting to remove from the ${e} SourceBuffer, but it does not exist`),void r.shiftAndExecuteNext(e);const l=pb(s.duration)?s.duration:1/0,d=pb(n.duration)?n.duration:1/0,c=Math.max(0,t),h=Math.min(i,l,d);h>c&&!o.ending?(o.ended=!1,Sb.log(`[buffer-controller]: Removing [${c},${h}] from the ${e} SourceBuffer`),o.remove(c,h)):r.shiftAndExecuteNext(e)}appendExecutor(e,t){const{operationQueue:i,sourceBuffer:s}=this,n=s[t];if(!n)return Sb.warn(`[buffer-controller]: Attempting to append to the ${t} SourceBuffer, but it does not exist`),void i.shiftAndExecuteNext(t);n.ended=!1,n.appendBuffer(e)}blockBuffers(e,t=this.getSourceBufferTypes()){if(!t.length)return Sb.log("[buffer-controller]: Blocking operation requested, but no SourceBuffers exist"),void Promise.resolve().then(e);const{operationQueue:i}=this,s=t.map((e=>i.appendBlocker(e)));Promise.all(s).then((()=>{e(),t.forEach((e=>{const t=this.sourceBuffer[e];null!=t&&t.updating||i.shiftAndExecuteNext(e)}))}))}getSourceBufferTypes(){return Object.keys(this.sourceBuffer)}addBufferListener(e,t,i){const s=this.sourceBuffer[e];if(!s)return;const n=i.bind(this,e);this.listeners[e].push({event:t,listener:n}),s.addEventListener(t,n)}removeBufferListeners(e){const t=this.sourceBuffer[e];t&&this.listeners[e].forEach((e=>{t.removeEventListener(e.event,e.listener)}))}constructor(e){this.details=null,this._objectUrl=null,this.operationQueue=void 0,this.listeners=void 0,this.hls=void 0,this.bufferCodecEventsExpected=0,this._bufferCodecEventsTotal=0,this.media=null,this.mediaSource=null,this.lastMpegAudioChunk=null,this.appendError=0,this.tracks={},this.pendingTracks={},this.sourceBuffer=void 0,this._onMediaSourceOpen=()=>{const{media:e,mediaSource:t}=this;Sb.log("[buffer-controller]: Media source opened"),e&&(e.removeEventListener("emptied",this._onMediaEmptied),this.updateMediaElementDuration(),this.hls.trigger(gb.MEDIA_ATTACHED,{media:e})),t&&t.removeEventListener("sourceopen",this._onMediaSourceOpen),this.checkPendingTracks()},this._onMediaSourceClose=()=>{Sb.log("[buffer-controller]: Media source closed")},this._onMediaSourceEnded=()=>{Sb.log("[buffer-controller]: Media source ended")},this._onMediaEmptied=()=>{const{media:e,_objectUrl:t}=this;e&&e.src!==t&&Sb.error(`Media element src was set while attaching MediaSource (${t} > ${e.src})`)},this.hls=e,this._initSourceBuffer(),this.registerListeners()}},capLevelController:Zw,errorController:class{registerListeners(){const e=this.hls;e.on(gb.ERROR,this.onError,this),e.on(gb.MANIFEST_LOADING,this.onManifestLoading,this),e.on(gb.LEVEL_UPDATED,this.onLevelUpdated,this)}unregisterListeners(){const e=this.hls;e&&(e.off(gb.ERROR,this.onError,this),e.off(gb.ERROR,this.onErrorOut,this),e.off(gb.MANIFEST_LOADING,this.onManifestLoading,this),e.off(gb.LEVEL_UPDATED,this.onLevelUpdated,this))}destroy(){this.unregisterListeners(),this.hls=null,this.penalizedRenditions={}}startLoad(e){this.playlistError=0}stopLoad(){}getVariantLevelIndex(e){return(null==e?void 0:e.type)===aE?e.level:this.hls.loadLevel}onManifestLoading(){this.playlistError=0,this.penalizedRenditions={}}onLevelUpdated(){this.playlistError=0}onError(e,t){var i,s;if(t.fatal)return;const n=this.hls,r=t.context;switch(t.details){case _b.FRAG_LOAD_ERROR:case _b.FRAG_LOAD_TIMEOUT:case _b.KEY_LOAD_ERROR:case _b.KEY_LOAD_TIMEOUT:return void(t.errorAction=this.getFragRetryOrSwitchAction(t));case _b.FRAG_PARSING_ERROR:if(null!=(i=t.frag)&&i.gap)return void(t.errorAction={action:GE,flags:YE});case _b.FRAG_GAP:case _b.FRAG_DECRYPT_ERROR:return t.errorAction=this.getFragRetryOrSwitchAction(t),void(t.errorAction.action=WE);case _b.LEVEL_EMPTY_ERROR:case _b.LEVEL_PARSING_ERROR:{var a,o;const e=t.parent===aE?t.level:n.loadLevel;t.details===_b.LEVEL_EMPTY_ERROR&&null!=(a=t.context)&&null!=(o=a.levelDetails)&&o.live?t.errorAction=this.getPlaylistRetryOrSwitchAction(t,e):(t.levelRetry=!1,t.errorAction=this.getLevelSwitchAction(t,e))}return;case _b.LEVEL_LOAD_ERROR:case _b.LEVEL_LOAD_TIMEOUT:return void("number"==typeof(null==r?void 0:r.level)&&(t.errorAction=this.getPlaylistRetryOrSwitchAction(t,r.level)));case _b.AUDIO_TRACK_LOAD_ERROR:case _b.AUDIO_TRACK_LOAD_TIMEOUT:case _b.SUBTITLE_LOAD_ERROR:case _b.SUBTITLE_TRACK_LOAD_TIMEOUT:if(r){const e=n.levels[n.loadLevel];if(e&&(r.type===nE&&r.groupId===e.audioGroupId||r.type===rE&&r.groupId===e.textGroupId))return t.errorAction=this.getPlaylistRetryOrSwitchAction(t,n.loadLevel),t.errorAction.action=WE,void(t.errorAction.flags=XE)}return;case _b.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED:{const e=n.levels[n.loadLevel],i=null==e?void 0:e.attrs["HDCP-LEVEL"];i&&(t.errorAction={action:WE,flags:QE,hdcpLevel:i})}return;case _b.BUFFER_ADD_CODEC_ERROR:case _b.REMUX_ALLOC_ERROR:return void(t.errorAction=this.getLevelSwitchAction(t,null!=(s=t.level)?s:n.loadLevel));case _b.INTERNAL_EXCEPTION:case _b.BUFFER_APPENDING_ERROR:case _b.BUFFER_APPEND_ERROR:case _b.BUFFER_FULL_ERROR:case _b.LEVEL_SWITCH_ERROR:case _b.BUFFER_STALLED_ERROR:case _b.BUFFER_SEEK_OVER_HOLE:case _b.BUFFER_NUDGE_ON_STALL:return void(t.errorAction={action:GE,flags:YE})}if(t.type===mb.KEY_SYSTEM_ERROR){const e=this.getVariantLevelIndex(t.frag);return t.levelRetry=!1,void(t.errorAction=this.getLevelSwitchAction(t,e))}}getPlaylistRetryOrSwitchAction(e,t){var i;const s=jE(this.hls.config.playlistLoadPolicy,e),n=this.playlistError++,r=null==(i=e.response)?void 0:i.code;if(VE(s,n,FE(e),r))return{action:KE,flags:YE,retryConfig:s,retryCount:n};const a=this.getLevelSwitchAction(e,t);return s&&(a.retryConfig=s,a.retryCount=n),a}getFragRetryOrSwitchAction(e){const t=this.hls,i=this.getVariantLevelIndex(e.frag),s=t.levels[i],{fragLoadPolicy:n,keyLoadPolicy:r}=t.config,a=jE(e.details.startsWith("key")?r:n,e),o=t.levels.reduce(((e,t)=>e+t.fragmentError),0);if(s){var l;e.details!==_b.FRAG_GAP&&s.fragmentError++;const t=null==(l=e.response)?void 0:l.code;if(VE(a,o,FE(e),t))return{action:KE,flags:YE,retryConfig:a,retryCount:o}}const d=this.getLevelSwitchAction(e,i);return a&&(d.retryConfig=a,d.retryCount=o),d}getLevelSwitchAction(e,t){const i=this.hls;null==t&&(t=i.loadLevel);const s=this.hls.levels[t];if(s&&(s.loadError++,i.autoLevelEnabled)){var n,r;let t=-1;const{levels:a,loadLevel:o,minAutoLevel:l,maxAutoLevel:d}=i,c=null==(n=e.frag)?void 0:n.type,{type:h,groupId:u}=null!=(r=e.context)?r:{};for(let i=a.length;i--;){const n=(i+o)%a.length;if(n!==o&&n>=l&&n<=d&&0===a[n].loadError){const i=a[n];if(e.details===_b.FRAG_GAP&&e.frag){const t=a[n].details;if(t){const i=HE(e.frag,t.fragments,e.frag.start);if(null!=i&&i.gap)continue}}else{if(h===nE&&u===i.audioGroupId||h===rE&&u===i.textGroupId)continue;if(c===oE&&s.audioGroupId===i.audioGroupId||c===lE&&s.textGroupId===i.textGroupId)continue}t=n;break}}if(t>-1&&i.loadLevel!==t)return e.levelRetry=!0,this.playlistError=0,{action:WE,flags:YE,nextAutoLevel:t}}return{action:WE,flags:XE}}onErrorOut(e,t){var i;switch(null==(i=t.errorAction)?void 0:i.action){case GE:break;case WE:this.sendAlternateToPenaltyBox(t),t.errorAction.resolved||t.details===_b.FRAG_GAP||(t.fatal=!0)}t.fatal&&this.hls.stopLoad()}sendAlternateToPenaltyBox(e){const t=this.hls,i=e.errorAction;if(!i)return;const{flags:s,hdcpLevel:n,nextAutoLevel:r}=i;switch(s){case YE:this.switchLevel(e,r);break;case XE:i.resolved||(i.resolved=this.redundantFailover(e));break;case QE:n&&(t.maxHdcpLevel=TE[TE.indexOf(n)-1],i.resolved=!0),this.warn(`Restricting playback to HDCP-LEVEL of "${t.maxHdcpLevel}" or lower`)}i.resolved||this.switchLevel(e,r)}switchLevel(e,t){void 0!==t&&e.errorAction&&(this.warn(`switching to level ${t} after ${e.details}`),this.hls.nextAutoLevel=t,e.errorAction.resolved=!0,this.hls.nextLoadLevel=this.hls.nextAutoLevel)}redundantFailover(e){const{hls:t,penalizedRenditions:i}=this,s=e.parent===aE?e.level:t.loadLevel,n=t.levels[s],r=n.url.length,a=e.frag?e.frag.urlId:n.urlId;n.urlId!==a||e.frag&&!n.details||this.penalizeRendition(n,e);for(let o=1;o{e.urlId=l})),t.nextLoadLevel=s,!0}return!1}penalizeRendition(e,t){const{penalizedRenditions:i}=this,s=i[e.urlId]||{lastErrorPerfMs:0,errors:[],details:void 0};s.lastErrorPerfMs=performance.now(),s.errors.push(t),s.details=e.details,i[e.urlId]=s}constructor(e){this.hls=void 0,this.playlistError=0,this.penalizedRenditions={},this.log=void 0,this.warn=void 0,this.error=void 0,this.hls=e,this.log=Sb.log.bind(Sb,"[info]:"),this.warn=Sb.warn.bind(Sb,"[warning]:"),this.error=Sb.error.bind(Sb,"[error]:"),this.registerListeners()}},fpsController:class{setStreamController(e){this.streamController=e}registerListeners(){this.hls.on(gb.MEDIA_ATTACHING,this.onMediaAttaching,this)}unregisterListeners(){this.hls.off(gb.MEDIA_ATTACHING,this.onMediaAttaching,this)}destroy(){this.timer&&clearInterval(this.timer),this.unregisterListeners(),this.isVideoPlaybackQualityAvailable=!1,this.media=null}onMediaAttaching(e,t){const i=this.hls.config;if(i.capLevelOnFPSDrop){const e=t.media instanceof self.HTMLVideoElement?t.media:null;this.media=e,e&&"function"==typeof e.getVideoPlaybackQuality&&(this.isVideoPlaybackQualityAvailable=!0),self.clearInterval(this.timer),this.timer=self.setInterval(this.checkFPSInterval.bind(this),i.fpsDroppedMonitoringPeriod)}}checkFPS(e,t,i){const s=performance.now();if(t){if(this.lastTime){const e=s-this.lastTime,n=i-this.lastDroppedFrames,r=t-this.lastDecodedFrames,a=1e3*n/e,o=this.hls;if(o.trigger(gb.FPS_DROP,{currentDropped:n,currentDecoded:r,totalDroppedFrames:i}),a>0&&n>o.config.fpsDroppedMonitoringThreshold*r){let e=o.currentLevel;Sb.warn("drop FPS ratio greater than max allowed value for currentLevel: "+e),e>0&&(-1===o.autoLevelCapping||o.autoLevelCapping>=e)&&(e-=1,o.trigger(gb.FPS_DROP_LEVEL_CAPPING,{level:e,droppedLevel:o.currentLevel}),o.autoLevelCapping=e,this.streamController.nextLevelSwitch())}}this.lastTime=s,this.lastDroppedFrames=i,this.lastDecodedFrames=t}}checkFPSInterval(){const e=this.media;if(e)if(this.isVideoPlaybackQualityAvailable){const t=e.getVideoPlaybackQuality();this.checkFPS(e,t.totalVideoFrames,t.droppedVideoFrames)}else this.checkFPS(e,e.webkitDecodedFrameCount,e.webkitDroppedFrameCount)}constructor(e){this.hls=void 0,this.isVideoPlaybackQualityAvailable=!1,this.timer=void 0,this.media=null,this.lastTime=void 0,this.lastDroppedFrames=0,this.lastDecodedFrames=0,this.streamController=void 0,this.hls=e,this.registerListeners()}},stretchShortVideoTrack:!1,maxAudioFramesDrift:1,forceKeyFrameOnDiscontinuity:!0,abrEwmaFastLive:3,abrEwmaSlowLive:9,abrEwmaFastVoD:3,abrEwmaSlowVoD:9,abrEwmaDefaultEstimate:5e5,abrBandWidthFactor:.95,abrBandWidthUpFactor:.7,abrMaxWithRealBitrate:!1,maxStarvationDelay:4,maxLoadingDelay:4,minAutoBitrate:0,emeEnabled:!1,widevineLicenseUrl:void 0,drmSystems:{},drmSystemOptions:{},requestMediaKeySystemAccessFunc:Wb,testBandwidth:!0,progressive:!1,lowLatencyMode:!0,cmcd:void 0,enableDateRangeMetadataCues:!0,enableEmsgMetadataCues:!0,enableID3MetadataCues:!0,certLoadPolicy:{default:{maxTimeToFirstByteMs:8e3,maxLoadTimeMs:2e4,timeoutRetry:null,errorRetry:null}},keyLoadPolicy:{default:{maxTimeToFirstByteMs:8e3,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:1,retryDelayMs:1e3,maxRetryDelayMs:2e4,backoff:"linear"},errorRetry:{maxNumRetry:8,retryDelayMs:1e3,maxRetryDelayMs:2e4,backoff:"linear"}}},manifestLoadPolicy:{default:{maxTimeToFirstByteMs:1/0,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:2,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:1,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},playlistLoadPolicy:{default:{maxTimeToFirstByteMs:1e4,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:2,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:2,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},fragLoadPolicy:{default:{maxTimeToFirstByteMs:1e4,maxLoadTimeMs:12e4,timeoutRetry:{maxNumRetry:4,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:6,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},steeringManifestLoadPolicy:{default:{maxTimeToFirstByteMs:1e4,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:2,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:1,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},manifestLoadingTimeOut:1e4,manifestLoadingMaxRetry:1,manifestLoadingRetryDelay:1e3,manifestLoadingMaxRetryTimeout:64e3,levelLoadingTimeOut:1e4,levelLoadingMaxRetry:4,levelLoadingRetryDelay:1e3,levelLoadingMaxRetryTimeout:64e3,fragLoadingTimeOut:2e4,fragLoadingMaxRetry:6,fragLoadingRetryDelay:1e3,fragLoadingMaxRetryTimeout:64e3},{cueHandler:yk,enableWebVTT:!0,enableIMSC1:!0,enableCEA708Captions:!0,captionsTextTrack1Label:"English",captionsTextTrack1LanguageCode:"en",captionsTextTrack2Label:"Spanish",captionsTextTrack2LanguageCode:"es",captionsTextTrack3Label:"Unknown CC",captionsTextTrack3LanguageCode:"",captionsTextTrack4Label:"Unknown CC",captionsTextTrack4LanguageCode:"",renderTextTracksNatively:!0}),{},{subtitleStreamController:class extends HC{onHandlerDestroying(){this._unregisterListeners(),this.mainDetails=null}_registerListeners(){const{hls:e}=this;e.on(gb.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(gb.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(gb.MANIFEST_LOADING,this.onManifestLoading,this),e.on(gb.LEVEL_LOADED,this.onLevelLoaded,this),e.on(gb.ERROR,this.onError,this),e.on(gb.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.on(gb.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.on(gb.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.on(gb.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),e.on(gb.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(gb.FRAG_BUFFERED,this.onFragBuffered,this)}_unregisterListeners(){const{hls:e}=this;e.off(gb.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(gb.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(gb.MANIFEST_LOADING,this.onManifestLoading,this),e.off(gb.LEVEL_LOADED,this.onLevelLoaded,this),e.off(gb.ERROR,this.onError,this),e.off(gb.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.off(gb.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.off(gb.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.off(gb.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),e.off(gb.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(gb.FRAG_BUFFERED,this.onFragBuffered,this)}startLoad(e){this.stopLoad(),this.state=RC,this.setInterval(500),this.nextLoadPosition=this.startPosition=this.lastCurrentTime=e,this.tick()}onManifestLoading(){this.mainDetails=null,this.fragmentTracker.removeAllFragments()}onMediaDetaching(){this.tracksBuffered=[],super.onMediaDetaching()}onLevelLoaded(e,t){this.mainDetails=t.details}onSubtitleFragProcessed(e,t){const{frag:i,success:s}=t;if(this.fragPrevious=i,this.state=RC,!s)return;const n=this.tracksBuffered[this.currentTrackId];if(!n)return;let r;const a=i.start;for(let e=0;e=n[e].start&&a<=n[e].end){r=n[e];break}const o=i.start+i.duration;r?r.end=o:(r={start:a,end:o},n.push(r)),this.fragmentTracker.fragBuffered(i)}onBufferFlushing(e,t){const{startOffset:i,endOffset:s}=t;if(0===i&&s!==Number.POSITIVE_INFINITY){const e=s-1;if(e<=0)return;t.endOffsetSubtitles=Math.max(0,e),this.tracksBuffered.forEach((t=>{for(let i=0;inew xE(e))):(this.tracksBuffered=[],this.levels=t.map((e=>{const t=new xE(e);return this.tracksBuffered[t.id]=[],t})),this.fragmentTracker.removeFragmentsInRange(0,Number.POSITIVE_INFINITY,lE),this.fragPrevious=null,this.mediaBuffer=null)}onSubtitleTrackSwitch(e,t){if(this.currentTrackId=t.id,!this.levels.length||-1===this.currentTrackId)return void this.clearInterval();const i=this.levels[this.currentTrackId];null!=i&&i.details?this.mediaBuffer=this.mediaBufferTimeRanges:this.mediaBuffer=null,i&&this.setInterval(500)}onSubtitleTrackLoaded(e,t){var i;const{details:s,id:n}=t,{currentTrackId:r,levels:a}=this;if(!a.length)return;const o=a[r];if(n>=a.length||n!==r||!o)return;this.mediaBuffer=this.mediaBufferTimeRanges;let l=0;if(s.live||null!=(i=o.details)&&i.live){const e=this.mainDetails;if(s.deltaUpdateFailed||!e)return;const t=e.fragments[0];o.details?(l=this.alignPlaylists(s,o.details),0===l&&t&&(l=t.start,DE(s,l))):s.hasProgramDateTime&&e.hasProgramDateTime?(wC(s,e),l=s.fragments[0].start):t&&(l=t.start,DE(s,l))}if(o.details=s,this.levelLastLoaded=n,this.startFragRequested||!this.mainDetails&&s.live||this.setStartPosition(o.details,l),this.tick(),s.live&&!this.fragCurrent&&this.media&&this.state===RC){HE(null,s.fragments,this.media.currentTime,0)||(this.warn("Subtitle playlist not aligned with playback"),o.details=void 0)}}_handleFragmentLoadComplete(e){const{frag:t,payload:i}=e,s=t.decryptdata,n=this.hls;if(!this.fragContextChanged(t)&&i&&i.byteLength>0&&s&&s.key&&s.iv&&"AES-128"===s.method){const e=performance.now();this.decrypter.decrypt(new Uint8Array(i),s.key.buffer,s.iv.buffer).catch((e=>{throw n.trigger(gb.ERROR,{type:mb.MEDIA_ERROR,details:_b.FRAG_DECRYPT_ERROR,fatal:!1,error:e,reason:e.message,frag:t}),e})).then((i=>{const s=performance.now();n.trigger(gb.FRAG_DECRYPTED,{frag:t,payload:i,stats:{tstart:e,tdecrypt:s}})})).catch((e=>{this.warn(`${e.name}: ${e.message}`),this.state=RC}))}}doTick(){if(this.media){if(this.state===RC){const{currentTrackId:e,levels:t}=this,i=t[e];if(!t.length||!i||!i.details)return;const{config:s}=this,n=this.getLoadPosition(),r=yC.bufferedInfo(this.tracksBuffered[this.currentTrackId]||[],n,s.maxBufferHole),{end:a,len:o}=r,l=this.getFwdBufferInfo(this.media,aE),d=i.details;if(o>this.getMaxBufferLength(null==l?void 0:l.len)+d.levelTargetDuration)return;const c=d.fragments,h=c.length,u=d.edge;let p=null;const g=this.fragPrevious;if(au-e?0:e;p=HE(g,c,Math.max(c[0].start,a),t),!p&&g&&g.start-1&&this.toggleTrackModes(this.trackId)}registerListeners(){const{hls:e}=this;e.on(gb.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(gb.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(gb.MANIFEST_LOADING,this.onManifestLoading,this),e.on(gb.MANIFEST_PARSED,this.onManifestParsed,this),e.on(gb.LEVEL_LOADING,this.onLevelLoading,this),e.on(gb.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(gb.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.on(gb.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e.off(gb.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(gb.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(gb.MANIFEST_LOADING,this.onManifestLoading,this),e.off(gb.MANIFEST_PARSED,this.onManifestParsed,this),e.off(gb.LEVEL_LOADING,this.onLevelLoading,this),e.off(gb.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(gb.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.off(gb.ERROR,this.onError,this)}onMediaAttached(e,t){this.media=t.media,this.media&&(this.queuedDefaultTrack>-1&&(this.subtitleTrack=this.queuedDefaultTrack,this.queuedDefaultTrack=-1),this.useTextTrackPolling=!(this.media.textTracks&&"onchange"in this.media.textTracks),this.useTextTrackPolling?this.pollTrackChange(500):this.media.textTracks.addEventListener("change",this.asyncPollTrackChange))}pollTrackChange(e){self.clearInterval(this.subtitlePollingInterval),this.subtitlePollingInterval=self.setInterval(this.trackChangeListener,e)}onMediaDetaching(){if(!this.media)return;self.clearInterval(this.subtitlePollingInterval),this.useTextTrackPolling||this.media.textTracks.removeEventListener("change",this.asyncPollTrackChange),this.trackId>-1&&(this.queuedDefaultTrack=this.trackId);iw(this.media.textTracks).forEach((e=>{gE(e)})),this.subtitleTrack=-1,this.media=null}onManifestLoading(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.selectDefaultTrack=!0}onManifestParsed(e,t){this.tracks=t.subtitleTracks}onSubtitleTrackLoaded(e,t){const{id:i,details:s}=t,{trackId:n}=this,r=this.tracksInGroup[n];if(!r)return void this.warn(`Invalid subtitle track id ${i}`);const a=r.details;r.details=t.details,this.log(`subtitle track ${i} loaded [${s.startSN}-${s.endSN}]`),i===this.trackId&&this.playlistLoaded(i,t,a)}onLevelLoading(e,t){this.switchLevel(t.level)}onLevelSwitching(e,t){this.switchLevel(t.level)}switchLevel(e){const t=this.hls.levels[e];if(null==t||!t.textGroupIds)return;const i=t.textGroupIds[t.urlId],s=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0;if(this.groupId!==i){const e=this.tracks.filter((e=>!i||e.groupId===i));this.tracksInGroup=e;const t=this.findTrackId(null==s?void 0:s.name)||this.findTrackId();this.groupId=i||null;const n={subtitleTracks:e};this.log(`Updating subtitle tracks, ${e.length} track(s) found in "${i}" group-id`),this.hls.trigger(gb.SUBTITLE_TRACKS_UPDATED,n),-1!==t&&this.setSubtitleTrack(t,s)}else this.shouldReloadPlaylist(s)&&this.setSubtitleTrack(this.trackId,s)}findTrackId(e){const t=this.tracksInGroup;for(let i=0;ie.groupId===this.groupId));if(-1===e)[].slice.call(s).forEach((e=>{e.mode="disabled"}));else{const e=n[i];e&&(e.mode="disabled")}const r=n[e];r&&(r.mode=this.subtitleDisplay?"showing":"hidden")}setSubtitleTrack(e,t){var i;const s=this.tracksInGroup;if(!this.media)return void(this.queuedDefaultTrack=e);if(this.trackId!==e&&this.toggleTrackModes(e),this.trackId===e&&(-1===e||null!=(i=s[e])&&i.details)||e<-1||e>=s.length)return;this.clearTimer();const n=s[e];if(this.log(`Switching to subtitle-track ${e}`+(n?` "${n.name}" lang:${n.lang} group:${n.groupId}`:"")),this.trackId=e,n){const{id:e,groupId:i="",name:s,type:r,url:a}=n;this.hls.trigger(gb.SUBTITLE_TRACK_SWITCH,{id:e,groupId:i,name:s,type:r,url:a});const o=this.switchParams(n.url,null==t?void 0:t.details);this.loadPlaylist(o)}else this.hls.trigger(gb.SUBTITLE_TRACK_SWITCH,{id:e})}onTextTracksChanged(){if(this.useTextTrackPolling||self.clearInterval(this.subtitlePollingInterval),!this.media||!this.hls.config.renderTextTracksNatively)return;let e=-1;const t=iw(this.media.textTracks);for(let i=0;ithis.onTextTracksChanged(),this.asyncPollTrackChange=()=>this.pollTrackChange(0),this.useTextTrackPolling=!1,this.subtitlePollingInterval=-1,this._subtitleDisplay=!0,this.registerListeners()}},timelineController:class{destroy(){const{hls:e}=this;e.off(gb.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(gb.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(gb.MANIFEST_LOADING,this.onManifestLoading,this),e.off(gb.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(gb.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.off(gb.FRAG_LOADING,this.onFragLoading,this),e.off(gb.FRAG_LOADED,this.onFragLoaded,this),e.off(gb.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),e.off(gb.FRAG_DECRYPTED,this.onFragDecrypted,this),e.off(gb.INIT_PTS_FOUND,this.onInitPtsFound,this),e.off(gb.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),e.off(gb.BUFFER_FLUSHING,this.onBufferFlushing,this),this.hls=this.config=this.cea608Parser1=this.cea608Parser2=null}addCues(e,t,i,s,n){let r=!1;for(let e=n.length;e--;){const s=n[e],c=(a=s[0],o=s[1],l=t,d=i,Math.min(o,d)-Math.max(a,l));if(c>=0&&(s[0]=Math.min(s[0],t),s[1]=Math.max(s[1],i),r=!0,c/(i-t)>.5))return}var a,o,l,d;if(r||n.push([t,i]),this.config.renderTextTracksNatively){const n=this.captionsTracks[e];this.Cues.newCue(n,t,i,s)}else{const n=this.Cues.newCue(null,t,i,s);this.hls.trigger(gb.CUES_PARSED,{type:"captions",cues:n,track:e})}}onInitPtsFound(e,{frag:t,id:i,initPTS:s,timescale:n}){const{unparsedVttFrags:r}=this;"main"===i&&(this.initPTS[t.cc]={baseTime:s,timescale:n}),r.length&&(this.unparsedVttFrags=[],r.forEach((e=>{this.onFragLoaded(gb.FRAG_LOADED,e)})))}getExistingTrack(e){const{media:t}=this;if(t)for(let i=0;i{gE(e[t]),delete e[t]})),this.nonNativeCaptionsTracks={}}onManifestLoading(){this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs={ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!0}},this._cleanTracks(),this.tracks=[],this.captionsTracks={},this.nonNativeCaptionsTracks={},this.textTracks=[],this.unparsedVttFrags=[],this.initPTS=[],this.cea608Parser1&&this.cea608Parser2&&(this.cea608Parser1.reset(),this.cea608Parser2.reset())}_cleanTracks(){const{media:e}=this;if(!e)return;const t=e.textTracks;if(t)for(let e=0;ee.textCodec===Vw));if(this.config.enableWebVTT||s&&this.config.enableIMSC1){if(ZT(this.tracks,i))return void(this.tracks=i);if(this.textTracks=[],this.tracks=i,this.config.renderTextTracksNatively){const e=this.media?this.media.textTracks:null;this.tracks.forEach(((t,i)=>{let s;if(e&&i({label:e.name,kind:e.type.toLowerCase(),default:e.default,subtitleTrack:e})));this.hls.trigger(gb.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:e})}}}_captionsOrSubtitlesFromCharacteristics(e){if(e.attrs.CHARACTERISTICS){const t=/transcribes-spoken-dialog/gi.test(e.attrs.CHARACTERISTICS),i=/describes-music-and-sound/gi.test(e.attrs.CHARACTERISTICS);if(t&&i)return"captions"}return"subtitles"}onManifestLoaded(e,t){this.config.enableCEA708Captions&&t.captions&&t.captions.forEach((e=>{const t=/(?:CC|SERVICE)([1-4])/.exec(e.instreamId);if(!t)return;const i=`textTrack${t[1]}`,s=this.captionsProperties[i];s&&(s.label=e.name,e.lang&&(s.languageCode=e.lang),s.media=e)}))}closedCaptionsForLevel(e){const t=this.hls.levels[e.level];return null==t?void 0:t.attrs["CLOSED-CAPTIONS"]}onFragLoading(e,t){const{cea608Parser1:i,cea608Parser2:s,lastSn:n,lastPartIndex:r}=this;if(this.enabled&&i&&s&&t.frag.type===aE){var a,o;const e=t.frag.sn,l=null!=(a=null==t||null==(o=t.part)?void 0:o.index)?a:-1;e===n+1||e===n&&l===r+1||(i.reset(),s.reset()),this.lastSn=e,this.lastPartIndex=l}}onFragLoaded(e,t){const{frag:i,payload:s}=t;if(i.type===lE)if(s.byteLength){const e=i.decryptdata,n="stats"in t;if(null==e||!e.encrypted||n){const e=this.tracks[i.level],n=this.vttCCs;n[i.cc]||(n[i.cc]={start:i.start,prevCC:this.prevCC,new:!0},this.prevCC=i.cc),e&&e.textCodec===Vw?this._parseIMSC1(i,s):this._parseVTTs(t)}}else this.hls.trigger(gb.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:i,error:new Error("Empty subtitle payload")})}_parseIMSC1(e,t){const i=this.hls;qw(t,this.initPTS[e.cc],(t=>{this._appendCues(t,e.level),i.trigger(gb.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:e})}),(t=>{Sb.log(`Failed to parse IMSC1: ${t}`),i.trigger(gb.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:e,error:t})}))}_parseVTTs(e){var t;const{frag:i,payload:s}=e,{initPTS:n,unparsedVttFrags:r}=this,a=n.length-1;if(!n[i.cc]&&-1===a)return void r.push(e);const o=this.hls;Uw(null!=(t=i.initSegment)&&t.data?wS(i.initSegment.data,new Uint8Array(s)):s,this.initPTS[i.cc],this.vttCCs,i.cc,i.start,(e=>{this._appendCues(e,i.level),o.trigger(gb.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:i})}),(t=>{const n="Missing initPTS for VTT MPEGTS"===t.message;n?r.push(e):this._fallbackToIMSC1(i,s),Sb.log(`Failed to parse VTT cue: ${t}`),n&&a>i.cc||o.trigger(gb.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:i,error:t})}))}_fallbackToIMSC1(e,t){const i=this.tracks[e.level];i.textCodec||qw(t,this.initPTS[e.cc],(()=>{i.textCodec=Vw,this._parseIMSC1(e,t)}),(()=>{i.textCodec="wvtt"}))}_appendCues(e,t){const i=this.hls;if(this.config.renderTextTracksNatively){const i=this.textTracks[t];if(!i||"disabled"===i.mode)return;e.forEach((e=>pE(i,e)))}else{const s=this.tracks[t];if(!s)return;const n=s.default?"default":"subtitles"+t;i.trigger(gb.CUES_PARSED,{type:"subtitles",cues:e,track:n})}}onFragDecrypted(e,t){const{frag:i}=t;i.type===lE&&this.onFragLoaded(gb.FRAG_LOADED,t)}onSubtitleTracksCleared(){this.tracks=[],this.captionsTracks={}}onFragParsingUserdata(e,t){const{cea608Parser1:i,cea608Parser2:s}=this;if(!this.enabled||!i||!s)return;const{frag:n,samples:r}=t;if(n.type!==aE||"NONE"!==this.closedCaptionsForLevel(n))for(let e=0;emE(e[s],t,i)))}if(this.config.renderTextTracksNatively&&0===t&&void 0!==s){const{textTracks:e}=this;Object.keys(e).forEach((i=>mE(e[i],t,s)))}}}extractCea608Data(e){const t=[[],[]],i=31&e[0];let s=2;for(let n=0;n0&&-1===e?(this.log(`Override startPosition with lastCurrentTime @${t.toFixed(3)}`),e=t,this.state=RC):(this.loadedmetadata=!1,this.state=BC),this.nextLoadPosition=this.startPosition=this.lastCurrentTime=e,this.tick()}doTick(){switch(this.state){case RC:this.doTickIdle();break;case BC:{var e;const{levels:t,trackId:i}=this,s=null==t||null==(e=t[i])?void 0:e.details;if(s){if(this.waitForCdnTuneIn(s))break;this.state=VC}break}case MC:{var t;const e=performance.now(),i=this.retryDate;(!i||e>=i||null!=(t=this.media)&&t.seeking)&&(this.log("RetryDate reached, switch back to IDLE state"),this.resetStartWhenNotLoaded(this.trackId),this.state=RC);break}case VC:{const e=this.waitingData;if(e){const{frag:t,part:i,cache:s,complete:n}=e;if(void 0!==this.initPTS[t.cc]){this.waitingData=null,this.waitingVideoCC=-1,this.state=DC;const e={frag:t,part:i,payload:s.flush(),networkDetails:null};this._handleFragmentLoadProgress(e),n&&super._handleFragmentLoadComplete(e)}else if(this.videoTrackCC!==this.waitingVideoCC)this.log(`Waiting fragment cc (${t.cc}) cancelled because video is at cc ${this.videoTrackCC}`),this.clearWaitingFragment();else{const e=this.getLoadPosition(),i=yC.bufferInfo(this.mediaBuffer,e,this.config.maxBufferHole);$E(i.end,this.config.maxFragLookUpTolerance,t)<0&&(this.log(`Waiting fragment cc (${t.cc}) @ ${t.start} cancelled because another fragment at ${i.end} is needed`),this.clearWaitingFragment())}}else this.state=RC}}this.onTickEnd()}clearWaitingFragment(){const e=this.waitingData;e&&(this.fragmentTracker.removeFragment(e.frag),this.waitingData=null,this.waitingVideoCC=-1,this.state=RC)}resetLoadingState(){this.clearWaitingFragment(),super.resetLoadingState()}onTickEnd(){const{media:e}=this;null!=e&&e.readyState&&(this.lastCurrentTime=e.currentTime)}doTickIdle(){const{hls:e,levels:t,media:i,trackId:s}=this,n=e.config;if(null==t||!t[s])return;if(!i&&(this.startFragRequested||!n.startFragPrefetch))return;const r=t[s],a=r.details;if(!a||a.live&&this.levelLastLoaded!==s||this.waitForCdnTuneIn(a))return void(this.state=BC);const o=this.mediaBuffer?this.mediaBuffer:this.media;this.bufferFlushed&&o&&(this.bufferFlushed=!1,this.afterBufferFlushed(o,Ib,oE));const l=this.getFwdBufferInfo(o,oE);if(null===l)return;const{bufferedTrack:d,switchingTrack:c}=this;if(!c&&this._streamEnded(l,a))return e.trigger(gb.BUFFER_EOS,{type:"audio"}),void(this.state=NC);const h=this.getFwdBufferInfo(this.videoBuffer?this.videoBuffer:this.media,aE),u=l.len,p=this.getMaxBufferLength(null==h?void 0:h.len);if(u>=p&&!c)return;const g=a.fragments[0].start;let m=l.end;if(c&&i){const e=this.getLoadPosition();d&&c.attrs!==d.attrs&&(m=e),a.PTSKnown&&eg||l.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),i.currentTime=g+.05)}let _=this.getNextFragment(m,a),f=!1;if(_&&this.isLoopLoading(_,m)&&(f=!!_.gap,_=this.getNextFragmentLoopLoading(_,a,l,aE,p)),!_)return void(this.bufferFlushed=!0);const v=h&&_.start>h.end+a.targetduration;if(v||(null==h||!h.len)&&l.len){const e=this.getAppendedFrag(_.start,aE);if(null===e)return;if(f||(f=!!e.gap||!!v&&0===h.len),v&&!f||f&&l.nextStart&&l.nextStartnew xE(e)))}onAudioTrackSwitching(e,t){const i=!!t.url;this.trackId=t.id;const{fragCurrent:s}=this;s&&(s.abortRequests(),this.removeUnbufferedFrags(s.start)),this.resetLoadingState(),i?this.setInterval(100):this.resetTransmuxer(),i?(this.switchingTrack=t,this.state=RC):(this.switchingTrack=null,this.bufferedTrack=t,this.state=OC),this.tick()}onManifestLoading(){this.fragmentTracker.removeAllFragments(),this.startPosition=this.lastCurrentTime=0,this.bufferFlushed=!1,this.levels=this.mainDetails=this.waitingData=this.bufferedTrack=this.cachedTrackLoadedData=this.switchingTrack=null,this.startFragRequested=!1,this.trackId=this.videoTrackCC=this.waitingVideoCC=-1}onLevelLoaded(e,t){this.mainDetails=t.details,null!==this.cachedTrackLoadedData&&(this.hls.trigger(gb.AUDIO_TRACK_LOADED,this.cachedTrackLoadedData),this.cachedTrackLoadedData=null)}onAudioTrackLoaded(e,t){var i;if(null==this.mainDetails)return void(this.cachedTrackLoadedData=t);const{levels:s}=this,{details:n,id:r}=t;if(!s)return void this.warn(`Audio tracks were reset while loading level ${r}`);this.log(`Track ${r} loaded [${n.startSN},${n.endSN}]${n.lastPartSn?`[part-${n.lastPartSn}-${n.lastPartIndex}]`:""},duration:${n.totalduration}`);const a=s[r];let o=0;if(n.live||null!=(i=a.details)&&i.live){this.checkLiveUpdate(n);const e=this.mainDetails;if(n.deltaUpdateFailed||!e)return;!a.details&&n.hasProgramDateTime&&e.hasProgramDateTime?(wC(n,e),o=n.fragments[0].start):o=this.alignPlaylists(n,a.details)}a.details=n,this.levelLastLoaded=r,this.startFragRequested||!this.mainDetails&&n.live||this.setStartPosition(a.details,o),this.state!==BC||this.waitForCdnTuneIn(n)||(this.state=RC),this.tick()}_handleFragmentLoadProgress(e){var t;const{frag:i,part:s,payload:n}=e,{config:r,trackId:a,levels:o}=this;if(!o)return void this.warn(`Audio tracks were reset while fragment load was in progress. Fragment ${i.sn} of level ${i.level} will not be buffered`);const l=o[a];if(!l)return void this.warn("Audio track is undefined on fragment load progress");const d=l.details;if(!d)return this.warn("Audio track details undefined on fragment load progress"),void this.removeUnbufferedFrags(i.start);const c=r.defaultAudioCodec||l.audioCodec||"mp4a.40.2";let h=this.transmuxer;h||(h=this.transmuxer=new WT(this.hls,oE,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));const u=this.initPTS[i.cc],p=null==(t=i.initSegment)?void 0:t.data;if(void 0!==u){const e=!1,t=s?s.index:-1,r=-1!==t,a=new bC(i.level,i.sn,i.stats.chunkCount,n.byteLength,t,r);h.push(n,p,c,"",i,s,d.totalduration,e,a,u)}else{this.log(`Unknown video PTS for cc ${i.cc}, waiting for video PTS before demuxing audio frag ${i.sn} of [${d.startSN} ,${d.endSN}],track ${a}`);const{cache:e}=this.waitingData=this.waitingData||{frag:i,part:s,cache:new JT,complete:!1};e.push(new Uint8Array(n)),this.waitingVideoCC=this.videoTrackCC,this.state=VC}}_handleFragmentLoadComplete(e){this.waitingData?this.waitingData.complete=!0:super._handleFragmentLoadComplete(e)}onBufferReset(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1}onBufferCreated(e,t){const i=t.tracks.audio;i&&(this.mediaBuffer=i.buffer||null),t.tracks.video&&(this.videoBuffer=t.tracks.video.buffer||null)}onFragBuffered(e,t){const{frag:i,part:s}=t;if(i.type===oE)if(this.fragContextChanged(i))this.warn(`Fragment ${i.sn}${s?" p: "+s.index:""} of level ${i.level} finished buffering, but was aborted. state: ${this.state}, audioSwitch: ${this.switchingTrack?this.switchingTrack.name:"false"}`);else{if("initSegment"!==i.sn){this.fragPrevious=i;const e=this.switchingTrack;e&&(this.bufferedTrack=e,this.switchingTrack=null,this.hls.trigger(gb.AUDIO_TRACK_SWITCHED,cb({},e)))}this.fragBufferedComplete(i,s)}else if(!this.loadedmetadata&&i.type===aE){const e=this.videoBuffer||this.media;if(e){yC.getBuffered(e).length&&(this.loadedmetadata=!0)}}}onError(e,t){var i;if(t.fatal)this.state=UC;else switch(t.details){case _b.FRAG_GAP:case _b.FRAG_PARSING_ERROR:case _b.FRAG_DECRYPT_ERROR:case _b.FRAG_LOAD_ERROR:case _b.FRAG_LOAD_TIMEOUT:case _b.KEY_LOAD_ERROR:case _b.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(oE,t);break;case _b.AUDIO_TRACK_LOAD_ERROR:case _b.AUDIO_TRACK_LOAD_TIMEOUT:case _b.LEVEL_PARSING_ERROR:t.levelRetry||this.state!==BC||(null==(i=t.context)?void 0:i.type)!==nE||(this.state=RC);break;case _b.BUFFER_FULL_ERROR:if(!t.parent||"audio"!==t.parent)return;this.reduceLengthAndFlushBuffer(t)&&(this.bufferedTrack=null,super.flushMainBuffer(0,Number.POSITIVE_INFINITY,"audio"));break;case _b.INTERNAL_EXCEPTION:this.recoverWorkerError(t)}}onBufferFlushed(e,{type:t}){t===Ib&&(this.bufferFlushed=!0,this.state===NC&&(this.state=RC))}_handleTransmuxComplete(e){var t;const i="audio",{hls:s}=this,{remuxResult:n,chunkMeta:r}=e,a=this.getCurrentContext(r);if(!a)return void this.resetWhenMissingContext(r);const{frag:o,part:l,level:d}=a,{details:c}=d,{audio:h,text:u,id3:p,initSegment:g}=n;if(!this.fragContextChanged(o)&&c){if(this.state=FC,this.switchingTrack&&h&&this.completeAudioSwitch(this.switchingTrack),null!=g&&g.tracks){const e=o.initSegment||o;this._bufferInitSegment(g.tracks,e,r),s.trigger(gb.FRAG_PARSING_INIT_SEGMENT,{frag:e,id:i,tracks:g.tracks})}if(h){const{startPTS:e,endPTS:t,startDTS:i,endDTS:s}=h;l&&(l.elementaryStreams[Ib]={startPTS:e,endPTS:t,startDTS:i,endDTS:s}),o.setElementaryStreamInfo(Ib,e,t,i,s),this.bufferFragmentData(h,o,l,r)}if(null!=p&&null!=(t=p.samples)&&t.length){const e=ub({id:i,frag:o,details:c},p);s.trigger(gb.FRAG_PARSING_METADATA,e)}if(u){const e=ub({id:i,frag:o,details:c},u);s.trigger(gb.FRAG_PARSING_USERDATA,e)}}else this.fragmentTracker.removeFragment(o)}_bufferInitSegment(e,t,i){if(this.state!==FC)return;e.video&&delete e.video;const s=e.audio;if(!s)return;s.levelCodec=s.codec,s.id="audio",this.log(`Init audio buffer, container:${s.container}, codecs[parsed]=[${s.codec}]`),this.hls.trigger(gb.BUFFER_CODECS,e);const n=s.initSegment;if(null!=n&&n.byteLength){const e={type:"audio",frag:t,part:null,chunkMeta:i,parent:t.type,data:n};this.hls.trigger(gb.BUFFER_APPENDING,e)}this.tick()}loadFragment(e,t,i){const s=this.fragmentTracker.getState(e);var n;(this.fragCurrent=e,this.switchingTrack||s===nC||s===aC)?"initSegment"===e.sn?this._loadInitSegment(e,t):null!=(n=t.details)&&n.live&&!this.initPTS[e.cc]?(this.log(`Waiting for video PTS in continuity counter ${e.cc} of live stream before loading audio fragment ${e.sn} of level ${this.trackId}`),this.state=VC):(this.startFragRequested=!0,super.loadFragment(e,t,i)):this.clearTrackerIfNeeded(e)}completeAudioSwitch(e){const{hls:t,media:i,bufferedTrack:s}=this,n=null==s?void 0:s.attrs,r=e.attrs;i&&n&&(n.CHANNELS!==r.CHANNELS||n.NAME!==r.NAME||n.LANGUAGE!==r.LANGUAGE)&&(this.log("Switching audio track : flushing all audio"),super.flushMainBuffer(0,Number.POSITIVE_INFINITY,"audio")),this.bufferedTrack=e,this.switchingTrack=null,t.trigger(gb.AUDIO_TRACK_SWITCHED,cb({},e))}constructor(e,t,i){super(e,t,i,"[audio-stream-controller]",oE),this.videoBuffer=null,this.videoTrackCC=-1,this.waitingVideoCC=-1,this.bufferedTrack=null,this.switchingTrack=null,this.trackId=-1,this.waitingData=null,this.mainDetails=null,this.bufferFlushed=!1,this.cachedTrackLoadedData=null,this._registerListeners()}},audioTrackController:class extends ZE{registerListeners(){const{hls:e}=this;e.on(gb.MANIFEST_LOADING,this.onManifestLoading,this),e.on(gb.MANIFEST_PARSED,this.onManifestParsed,this),e.on(gb.LEVEL_LOADING,this.onLevelLoading,this),e.on(gb.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(gb.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.on(gb.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e.off(gb.MANIFEST_LOADING,this.onManifestLoading,this),e.off(gb.MANIFEST_PARSED,this.onManifestParsed,this),e.off(gb.LEVEL_LOADING,this.onLevelLoading,this),e.off(gb.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(gb.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.off(gb.ERROR,this.onError,this)}destroy(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,this.currentTrack=null,super.destroy()}onManifestLoading(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.currentTrack=null,this.selectDefaultTrack=!0}onManifestParsed(e,t){this.tracks=t.audioTracks||[]}onAudioTrackLoaded(e,t){const{id:i,groupId:s,details:n}=t,r=this.tracksInGroup[i];if(!r||r.groupId!==s)return void this.warn(`Track with id:${i} and group:${s} not found in active group ${r.groupId}`);const a=r.details;r.details=t.details,this.log(`audio-track ${i} "${r.name}" lang:${r.lang} group:${s} loaded [${n.startSN}-${n.endSN}]`),i===this.trackId&&this.playlistLoaded(i,t,a)}onLevelLoading(e,t){this.switchLevel(t.level)}onLevelSwitching(e,t){this.switchLevel(t.level)}switchLevel(e){const t=this.hls.levels[e];if(null==t||!t.audioGroupIds)return;const i=t.audioGroupIds[t.urlId];if(this.groupId!==i){this.groupId=i||null;const e=this.tracks.filter((e=>!i||e.groupId===i));this.selectDefaultTrack&&!e.some((e=>e.default))&&(this.selectDefaultTrack=!1),this.tracksInGroup=e;const t={audioTracks:e};this.log(`Updating audio tracks, ${e.length} track(s) found in group:${i}`),this.hls.trigger(gb.AUDIO_TRACKS_UPDATED,t),this.selectInitialTrack()}else this.shouldReloadPlaylist(this.currentTrack)&&this.setAudioTrack(this.trackId)}onError(e,t){!t.fatal&&t.context&&t.context.type===nE&&t.context.id===this.trackId&&t.context.groupId===this.groupId&&(this.requestScheduled=-1,this.checkRetry(t))}get audioTracks(){return this.tracksInGroup}get audioTrack(){return this.trackId}set audioTrack(e){this.selectDefaultTrack=!1,this.setAudioTrack(e)}setAudioTrack(e){const t=this.tracksInGroup;if(e<0||e>=t.length)return void this.warn("Invalid id passed to audio-track controller");this.clearTimer();const i=this.currentTrack;t[this.trackId];const s=t[e],{groupId:n,name:r}=s;if(this.log(`Switching to audio-track ${e} "${r}" lang:${s.lang} group:${n}`),this.trackId=e,this.currentTrack=s,this.selectDefaultTrack=!1,this.hls.trigger(gb.AUDIO_TRACK_SWITCHING,cb({},s)),s.details&&!s.details.live)return;const a=this.switchParams(s.url,null==i?void 0:i.details);this.loadPlaylist(a)}selectInitialTrack(){const e=this.tracksInGroup,t=this.findTrackId(this.currentTrack)|this.findTrackId(null);if(-1!==t)this.setAudioTrack(t);else{const t=new Error(`No track found for running audio group-ID: ${this.groupId} track count: ${e.length}`);this.warn(t.message),this.hls.trigger(gb.ERROR,{type:mb.MEDIA_ERROR,details:_b.AUDIO_TRACK_LOAD_ERROR,fatal:!0,error:t})}}findTrackId(e){const t=this.tracksInGroup;for(let i=0;it!==e)))}onManifestLoading(){this.stopLoad(),this.enabled=!0,this.timeToLoad=300,this.updated=0,this.uri=null,this.pathwayId=".",this.levels=this.audioTracks=this.subtitleTracks=null}onManifestLoaded(e,t){const{contentSteering:i}=t;null!==i&&(this.pathwayId=i.pathwayId,this.uri=i.uri,this.started&&this.startLoad())}onManifestParsed(e,t){this.audioTracks=t.audioTracks,this.subtitleTracks=t.subtitleTracks}onError(e,t){const{errorAction:i}=t;if((null==i?void 0:i.action)===WE&&i.flags===XE){let e=this.pathwayPriority;const t=this.pathwayId;this.penalizedPathways[t]||(this.penalizedPathways[t]=performance.now()),!e&&this.levels&&(e=this.levels.reduce(((e,t)=>(-1===e.indexOf(t.pathwayId)&&e.push(t.pathwayId),e)),[])),e&&e.length>1&&(this.updatePathwayPriority(e),i.resolved=this.pathwayId!==t)}}filterParsedLevels(e){this.levels=e;let t=this.getLevelsForPathway(this.pathwayId);if(0===t.length){const i=e[0].pathwayId;this.log(`No levels found in Pathway ${this.pathwayId}. Setting initial Pathway to "${i}"`),t=this.getLevelsForPathway(i),this.pathwayId=i}return t.length!==e.length?(this.log(`Found ${t.length}/${e.length} levels in Pathway "${this.pathwayId}"`),t):e}getLevelsForPathway(e){return null===this.levels?[]:this.levels.filter((t=>e===t.pathwayId))}updatePathwayPriority(e){let t;this.pathwayPriority=e;const i=this.penalizedPathways,s=performance.now();Object.keys(i).forEach((e=>{s-i[e]>3e5&&delete i[e]}));for(let s=0;s0){this.log(`Setting Pathway to "${n}"`),this.pathwayId=n,this.hls.trigger(gb.LEVELS_UPDATED,{levels:t});const e=this.hls.levels[r];a&&e&&this.levels&&(e.attrs["STABLE-VARIANT-ID"]!==a.attrs["STABLE-VARIANT-ID"]&&e.bitrate!==a.bitrate&&this.log(`Unstable Pathways change from bitrate ${a.bitrate} to ${e.bitrate}`),this.hls.nextLoadLevel=r);break}}}clonePathways(e){const t=this.levels;if(!t)return;const i={},s={};e.forEach((e=>{const{ID:n,"BASE-ID":r,"URI-REPLACEMENT":a}=e;if(t.some((e=>e.pathwayId===n)))return;const o=this.getLevelsForPathway(r).map((e=>{const t=ub({},e);t.details=void 0,t.url=hk(e.uri,e.attrs["STABLE-VARIANT-ID"],"PER-VARIANT-URIS",a);const r=new Tb(e.attrs);r["PATHWAY-ID"]=n;const o=r.AUDIO&&`${r.AUDIO}_clone_${n}`,l=r.SUBTITLES&&`${r.SUBTITLES}_clone_${n}`;o&&(i[r.AUDIO]=o,r.AUDIO=o),l&&(s[r.SUBTITLES]=l,r.SUBTITLES=l),t.attrs=r;const d=new xE(t);return iC(d,"audio",o),iC(d,"text",l),d}));t.push(...o),ck(this.audioTracks,i,a,n),ck(this.subtitleTracks,s,a,n)}))}loadSteeringManifest(e){const t=this.hls.config,i=t.loader;let s;this.loader&&this.loader.destroy(),this.loader=new i(t);try{s=new self.URL(e)}catch(t){return this.enabled=!1,void this.log(`Failed to parse Steering Manifest URI: ${e}`)}if("data:"!==s.protocol){const e=0|(this.hls.bandwidthEstimate||t.abrEwmaDefaultEstimate);s.searchParams.set("_HLS_pathway",this.pathwayId),s.searchParams.set("_HLS_throughput",""+e)}const n={responseType:"json",url:s.href},r=t.steeringManifestLoadPolicy.default,a=r.errorRetry||r.timeoutRetry||{},o={loadPolicy:r,timeout:r.maxLoadTimeMs,maxRetry:a.maxNumRetry||0,retryDelay:a.retryDelayMs||0,maxRetryDelay:a.maxRetryDelayMs||0},l={onSuccess:(e,t,i,n)=>{this.log(`Loaded steering manifest: "${s}"`);const r=e.data;if(1!==r.VERSION)return void this.log(`Steering VERSION ${r.VERSION} not supported!`);this.updated=performance.now(),this.timeToLoad=r.TTL;const{"RELOAD-URI":a,"PATHWAY-CLONES":o,"PATHWAY-PRIORITY":l}=r;if(a)try{this.uri=new self.URL(a,s).href}catch(e){return this.enabled=!1,void this.log(`Failed to parse Steering Manifest RELOAD-URI: ${a}`)}this.scheduleRefresh(this.uri||i.url),o&&this.clonePathways(o),l&&this.updatePathwayPriority(l)},onError:(e,t,i,s)=>{if(this.log(`Error loading steering manifest: ${e.code} ${e.text} (${t.url})`),this.stopLoad(),410===e.code)return this.enabled=!1,void this.log(`Steering manifest ${t.url} no longer available`);let n=1e3*this.timeToLoad;if(429!==e.code)this.scheduleRefresh(this.uri||t.url,n);else{const e=this.loader;if("function"==typeof(null==e?void 0:e.getResponseHeader)){const t=e.getResponseHeader("Retry-After");t&&(n=1e3*parseFloat(t))}this.log(`Steering manifest ${t.url} rate limited`)}},onTimeout:(e,t,i)=>{this.log(`Timeout loading steering manifest (${t.url})`),this.scheduleRefresh(this.uri||t.url)}};this.log(`Requesting steering manifest: ${s}`),this.loader.load(n,o,l)}scheduleRefresh(e,t=1e3*this.timeToLoad){self.clearTimeout(this.reloadTimer),this.reloadTimer=self.setTimeout((()=>{this.loadSteeringManifest(e)}),t)}constructor(e){this.hls=void 0,this.log=void 0,this.loader=null,this.uri=null,this.pathwayId=".",this.pathwayPriority=null,this.timeToLoad=300,this.reloadTimer=-1,this.updated=0,this.started=!1,this.enabled=!0,this.levels=null,this.audioTracks=null,this.subtitleTracks=null,this.penalizedPathways={},this.hls=e,this.log=Sb.log.bind(Sb,"[content-steering]:"),this.registerListeners()}}});function Sk(e){return e&&"object"==typeof e?Array.isArray(e)?e.map(Sk):Object.keys(e).reduce(((t,i)=>(t[i]=Sk(e[i]),t)),{}):e}function Ek(e){const t=e.loader;if(t!==mk&&t!==pk)Sb.log("[config]: Custom loader detected, cannot enable progressive streaming"),e.progressive=!1;else{(function(){if(self.fetch&&self.AbortController&&self.ReadableStream&&self.Request)try{return new self.ReadableStream({}),!0}catch(e){}return!1})()&&(e.loader=mk,e.progressive=!0,e.enableSoftwareAES=!0,Sb.log("[config]: Progressive streaming enabled, using FetchLoader"))}}class Ck{static get version(){return"1.4.12"}static isSupported(){return function(){const e=NS();if(!e)return!1;const t=$C(),i=e&&"function"==typeof e.isTypeSupported&&e.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'),s=!t||t.prototype&&"function"==typeof t.prototype.appendBuffer&&"function"==typeof t.prototype.remove;return!!i&&!!s}()}static get Events(){return gb}static get ErrorTypes(){return mb}static get ErrorDetails(){return _b}static get DefaultConfig(){return Ck.defaultConfig?Ck.defaultConfig:bk}static set DefaultConfig(e){Ck.defaultConfig=e}createController(e,t){if(e){const i=new e(this);return t&&t.push(i),i}return null}on(e,t,i=this){this._emitter.on(e,t,i)}once(e,t,i=this){this._emitter.once(e,t,i)}removeAllListeners(e){this._emitter.removeAllListeners(e)}off(e,t,i=this,s){this._emitter.off(e,t,i,s)}listeners(e){return this._emitter.listeners(e)}emit(e,t,i){return this._emitter.emit(e,t,i)}trigger(e,t){if(this.config.debug)return this.emit(e,e,t);try{return this.emit(e,e,t)}catch(t){Sb.error("An internal error happened while handling event "+e+'. Error message: "'+t.message+'". Here is a stacktrace:',t),this.trigger(gb.ERROR,{type:mb.OTHER_ERROR,details:_b.INTERNAL_EXCEPTION,fatal:!1,event:e,error:t})}return!1}listenerCount(e){return this._emitter.listenerCount(e)}destroy(){Sb.log("destroy"),this.trigger(gb.DESTROYING,void 0),this.detachMedia(),this.removeAllListeners(),this._autoLevelCapping=-1,this.url=null,this.networkControllers.forEach((e=>e.destroy())),this.networkControllers.length=0,this.coreComponents.forEach((e=>e.destroy())),this.coreComponents.length=0;const e=this.config;e.xhrSetup=e.fetchSetup=void 0,this.userConfig=null}attachMedia(e){Sb.log("attachMedia"),this._media=e,this.trigger(gb.MEDIA_ATTACHING,{media:e})}detachMedia(){Sb.log("detachMedia"),this.trigger(gb.MEDIA_DETACHING,void 0),this._media=null}loadSource(e){this.stopLoad();const t=this.media,i=this.url,s=this.url=lb.buildAbsoluteURL(self.location.href,e,{alwaysNormalize:!0});Sb.log(`loadSource:${s}`),t&&i&&(i!==s||this.bufferController.hasSourceTypes())&&(this.detachMedia(),this.attachMedia(t)),this.trigger(gb.MANIFEST_LOADING,{url:e})}startLoad(e=-1){Sb.log(`startLoad(${e})`),this.networkControllers.forEach((t=>{t.startLoad(e)}))}stopLoad(){Sb.log("stopLoad"),this.networkControllers.forEach((e=>{e.stopLoad()}))}swapAudioCodec(){Sb.log("swapAudioCodec"),this.streamController.swapAudioCodec()}recoverMediaError(){Sb.log("recoverMediaError");const e=this._media;this.detachMedia(),e&&this.attachMedia(e)}removeLevel(e,t=0){this.levelController.removeLevel(e,t)}get levels(){const e=this.levelController.levels;return e||[]}get currentLevel(){return this.streamController.currentLevel}set currentLevel(e){Sb.log(`set currentLevel:${e}`),this.loadLevel=e,this.abrController.clearTimer(),this.streamController.immediateLevelSwitch()}get nextLevel(){return this.streamController.nextLevel}set nextLevel(e){Sb.log(`set nextLevel:${e}`),this.levelController.manualLevel=e,this.streamController.nextLevelSwitch()}get loadLevel(){return this.levelController.level}set loadLevel(e){Sb.log(`set loadLevel:${e}`),this.levelController.manualLevel=e}get nextLoadLevel(){return this.levelController.nextLoadLevel}set nextLoadLevel(e){this.levelController.nextLoadLevel=e}get firstLevel(){return Math.max(this.levelController.firstLevel,this.minAutoLevel)}set firstLevel(e){Sb.log(`set firstLevel:${e}`),this.levelController.firstLevel=e}get startLevel(){return this.levelController.startLevel}set startLevel(e){Sb.log(`set startLevel:${e}`),-1!==e&&(e=Math.max(e,this.minAutoLevel)),this.levelController.startLevel=e}get capLevelToPlayerSize(){return this.config.capLevelToPlayerSize}set capLevelToPlayerSize(e){const t=!!e;t!==this.config.capLevelToPlayerSize&&(t?this.capLevelController.startCapping():(this.capLevelController.stopCapping(),this.autoLevelCapping=-1,this.streamController.nextLevelSwitch()),this.config.capLevelToPlayerSize=t)}get autoLevelCapping(){return this._autoLevelCapping}get bandwidthEstimate(){const{bwEstimator:e}=this.abrController;return e?e.getEstimate():NaN}get ttfbEstimate(){const{bwEstimator:e}=this.abrController;return e?e.getEstimateTTFB():NaN}set autoLevelCapping(e){this._autoLevelCapping!==e&&(Sb.log(`set autoLevelCapping:${e}`),this._autoLevelCapping=e)}get maxHdcpLevel(){return this._maxHdcpLevel}set maxHdcpLevel(e){TE.indexOf(e)>-1&&(this._maxHdcpLevel=e)}get autoLevelEnabled(){return-1===this.levelController.manualLevel}get manualLevel(){return this.levelController.manualLevel}get minAutoLevel(){const{levels:e,config:{minAutoBitrate:t}}=this;if(!e)return 0;const i=e.length;for(let s=0;s=t)return s;return 0}get maxAutoLevel(){const{levels:e,autoLevelCapping:t,maxHdcpLevel:i}=this;let s;if(s=-1===t&&e&&e.length?e.length-1:t,i)for(let t=s;t--;){const s=e[t].attrs["HDCP-LEVEL"];if(s&&s<=i)return t}return s}get nextAutoLevel(){return Math.min(Math.max(this.abrController.nextAutoLevel,this.minAutoLevel),this.maxAutoLevel)}set nextAutoLevel(e){this.abrController.nextAutoLevel=Math.max(this.minAutoLevel,e)}get playingDate(){return this.streamController.currentProgramDateTime}get mainForwardBufferInfo(){return this.streamController.getMainFwdBufferInfo()}get audioTracks(){const e=this.audioTrackController;return e?e.audioTracks:[]}get audioTrack(){const e=this.audioTrackController;return e?e.audioTrack:-1}set audioTrack(e){const t=this.audioTrackController;t&&(t.audioTrack=e)}get subtitleTracks(){const e=this.subtitleTrackController;return e?e.subtitleTracks:[]}get subtitleTrack(){const e=this.subtitleTrackController;return e?e.subtitleTrack:-1}get media(){return this._media}set subtitleTrack(e){const t=this.subtitleTrackController;t&&(t.subtitleTrack=e)}get subtitleDisplay(){const e=this.subtitleTrackController;return!!e&&e.subtitleDisplay}set subtitleDisplay(e){const t=this.subtitleTrackController;t&&(t.subtitleDisplay=e)}get lowLatencyMode(){return this.config.lowLatencyMode}set lowLatencyMode(e){this.config.lowLatencyMode=e}get liveSyncPosition(){return this.latencyController.liveSyncPosition}get latency(){return this.latencyController.latency}get maxLatency(){return this.latencyController.maxLatency}get targetLatency(){return this.latencyController.targetLatency}get drift(){return this.latencyController.drift}get forceStartLoad(){return this.streamController.forceStartLoad}constructor(e={}){this.config=void 0,this.userConfig=void 0,this.coreComponents=void 0,this.networkControllers=void 0,this._emitter=new qT,this._autoLevelCapping=void 0,this._maxHdcpLevel=null,this.abrController=void 0,this.bufferController=void 0,this.capLevelController=void 0,this.latencyController=void 0,this.levelController=void 0,this.streamController=void 0,this.audioTrackController=void 0,this.subtitleTrackController=void 0,this.emeController=void 0,this.cmcdController=void 0,this._media=null,this.url=null,function(e,t){if(self.console&&!0===e||"object"==typeof e){bb(e,"debug","log","info","warn","error");try{yb.log(`Debug logs enabled for "${t}" in hls.js version 1.4.12`)}catch(e){yb=vb}}else yb=vb}(e.debug||!1,"Hls instance");const t=this.config=function(e,t){if((t.liveSyncDurationCount||t.liveMaxLatencyDurationCount)&&(t.liveSyncDuration||t.liveMaxLatencyDuration))throw new Error("Illegal hls.js config: don't mix up liveSyncDurationCount/liveMaxLatencyDurationCount and liveSyncDuration/liveMaxLatencyDuration");if(void 0!==t.liveMaxLatencyDurationCount&&(void 0===t.liveSyncDurationCount||t.liveMaxLatencyDurationCount<=t.liveSyncDurationCount))throw new Error('Illegal hls.js config: "liveMaxLatencyDurationCount" must be greater than "liveSyncDurationCount"');if(void 0!==t.liveMaxLatencyDuration&&(void 0===t.liveSyncDuration||t.liveMaxLatencyDuration<=t.liveSyncDuration))throw new Error('Illegal hls.js config: "liveMaxLatencyDuration" must be greater than "liveSyncDuration"');const i=Sk(e),s=["TimeOut","MaxRetry","RetryDelay","MaxRetryTimeout"];return["manifest","level","frag"].forEach((e=>{const n=`${"level"===e?"playlist":e}LoadPolicy`,r=void 0===t[n],a=[];s.forEach((s=>{const o=`${e}Loading${s}`,l=t[o];if(void 0!==l&&r){a.push(o);const e=i[n].default;switch(t[n]={default:e},s){case"TimeOut":e.maxLoadTimeMs=l,e.maxTimeToFirstByteMs=l;break;case"MaxRetry":e.errorRetry.maxNumRetry=l,e.timeoutRetry.maxNumRetry=l;break;case"RetryDelay":e.errorRetry.retryDelayMs=l,e.timeoutRetry.retryDelayMs=l;break;case"MaxRetryTimeout":e.errorRetry.maxRetryDelayMs=l,e.timeoutRetry.maxRetryDelayMs=l}}})),a.length&&Sb.warn(`hls.js config: "${a.join('", "')}" setting(s) are deprecated, use "${n}": ${JSON.stringify(t[n])}`)})),cb(cb({},i),t)}(Ck.DefaultConfig,e);this.userConfig=e,this._autoLevelCapping=-1,t.progressive&&Ek(t);const{abrController:i,bufferController:s,capLevelController:n,errorController:r,fpsController:a}=t,o=new r(this),l=this.abrController=new i(this),d=this.bufferController=new s(this),c=this.capLevelController=new n(this),h=new a(this),u=new hE(this),p=new EE(this),g=t.contentSteeringController,m=g?new g(this):null,_=this.levelController=new tC(this,m),f=new lC(this),v=new _C(this.config),y=this.streamController=new YT(this,f,v);c.setStreamController(y),h.setStreamController(y);const b=[u,_,y];m&&b.splice(1,0,m),this.networkControllers=b;const S=[l,d,c,h,p,f];this.audioTrackController=this.createController(t.audioTrackController,b);const E=t.audioStreamController;E&&b.push(new E(this,f,v)),this.subtitleTrackController=this.createController(t.subtitleTrackController,b);const C=t.subtitleStreamController;C&&b.push(new C(this,f,v)),this.createController(t.timelineController,S),v.emeController=this.emeController=this.createController(t.emeController,S),this.cmcdController=this.createController(t.cmcdController,S),this.latencyController=this.createController(CE,S),this.coreComponents=S,b.push(o);const T=o.onErrorOut;"function"==typeof T&&this.on(gb.ERROR,T,o)}}Ck.defaultConfig=void 0;class Tk{isSupported(){return Ck.isSupported()}loadSource(e){this._hls.loadSource(e),this._hls.attachMedia(this._videoEl),this._registerEvents()}setMaxBufferLength(e){this._config.maxMaxBufferReset||this._hls.config.maxMaxBufferLength===e||(this._hls.config.maxBufferLength=e)}reset(){this._hls.destroy(),this._hls=new Ck,this._setupComplete=!1}_getConfig(){return{backBufferLength:this._config.backBufferLength,maxMaxBufferLength:this._config.maxMaxBufferLength,maxBufferSize:this._config.maxBufferSize,maxBufferLength:this._config.maxBufferLength,frontBufferFlushThreshold:this._config.frontBufferThreshold}}_registerEvents(){this._setupComplete||(this.setMaxBufferLength(1),this._hls.on(Ck.Events.ERROR,this._onError.bind(this)),this._setupComplete=!0)}_onError(e,t){t.fatal&&(W.error(this._logPrefix,"_onError",{event:e,data:t}),this._handleFatalHLSError(e,t))}_handleFatalHLSError(e,t){switch(W.error(this._logPrefix,"_handleFatalHLSError",{event:e,data:t}),t.type){case Ck.ErrorTypes.MEDIA_ERROR:this._hls.recoverMediaError();break;case Ck.ErrorTypes.NETWORK_ERROR:default:this._fatalErrorCallback()}}constructor(e){this._logPrefix="HlsManager",this._setupComplete=!1,this._config=e.config,this._fatalErrorCallback=e.fatalErrorCallback,this._videoEl=e.videoEl,this._hls=new Ck(this._getConfig())}}const wk=1,kk=2,Ak=3,Ik=4;class xk{start(e,t=30,i=1){this.isActive()||(this.reset(),this._startTime=Date.now(),this._setupShouldAdvanceToContent(e,t,i),this._setupThresholds(e,t,i),document.addEventListener("visibilitychange",this._handleVisibilityChange.bind(this)),this._intervalId=window.setInterval((()=>this._handleTimeInterval()),200))}show(){this._buttons&&(this._buttons.style.display="flex",this._buttons.classList.add("active"),this._isVisible=!0)}reset(e=!1){this._clearInterval(),this._hide(),this._state=wk,this._elapsedTime=0,this._startTime=0,this._hiddenStartTime=0,document.removeEventListener("visibilitychange",this._handleVisibilityChange.bind(this)),e&&(this._nextAdvancePlaylistDuration=void 0,this._shouldAdvanceToContent=!1)}destroy(){var e,t;this._parentElement.removeEventListener("click",this._interactionHandler),this._parentElement.removeEventListener("keyup",this._interactionHandler),null==(t=this._buttons)||null==(e=t.parentNode)||e.removeChild(this._buttons),this._buttons=void 0,document.removeEventListener("visibilitychange",this._handleVisibilityChange.bind(this))}isActive(){return void 0!==this._intervalId}_setupShouldAdvanceToContent(e,t,i){const s=i>1,n=t>this._defaultAdvancePlaylistDuration,r=t>e,a=!this._nextAdvancePlaylistDuration;this._shouldAdvanceToContent=s&&n&&r&&a,this._shouldAdvanceToContent&&(this._nextAdvancePlaylistDuration=Math.max(t-this._defaultAdvancePlaylistDuration,15))}_handleTimeInterval(){var e;this._updateElapsedTime(),null==(e=this._stateHandlers[this._state])||e.call(this._stateHandlers)}_handleAwaitingStart(){this._state=this._shouldAdvanceToContent?Ak:kk}_handleAwaitingFetchAd(){this._shouldFetchAd()&&(this._fetchAd(),this._state=Ak)}_handleAwaitingShowButtons(){this._shouldShowButtons()&&(this.show(),this._state=Ik)}_handleAwaitingAdvance(){this._shouldAdvance()&&(this._shouldAdvanceToContent?this._advanceToContent():this._advanceToAd(),this.reset(!this._shouldAdvanceToContent))}_setDefaultAdvancePlaylistDuration(){const e=R.resolve(Ll).result,t=Ur.isRolloutEnabled("disable-adv-playlist-optimization");e&&!t&&(this._defaultAdvancePlaylistDuration=e+5)}_getAdvancePlaylistDuration(e,t,i){if(this._shouldAdvanceToContent){return this._defaultAdvancePlaylistDuration}if(this._nextAdvancePlaylistDuration){return this._nextAdvancePlaylistDuration}if(t&&i&&i>1){return Math.max(15,t)}if(t){const i=Math.max(15,Math.min(t,this._defaultAdvancePlaylistDuration));return Math.min(e,i)}return Math.min(e,this._defaultAdvancePlaylistDuration)}_setupThresholds(e,t,i){const s=this._getAdvancePlaylistDuration(e,t,i);this._fetchAdThreshold=s-10,this._showButtonsThreshold=s-5,this._advanceThreshold=s}_thresholdReached(e){return this._elapsedTime>=e&&this._elapsedTime<=e+.5}_shouldFetchAd(){return this._thresholdReached(this._fetchAdThreshold)&&!this._shouldAdvanceToContent&&!this._isVisible&&!this._wasAdFetched()}_shouldShowButtons(){return this._thresholdReached(this._showButtonsThreshold)&&!this._isVisible}_shouldAdvance(){return this._thresholdReached(this._advanceThreshold)&&this._isVisible}_getAdvanceType(){return this._shouldAdvanceToContent?"content":"ad"}_updateElapsedTime(){const e=Date.now();this._elapsedTime=(e-this._startTime)/1e3}_clearInterval(){this._intervalId&&(clearInterval(this._intervalId),this._intervalId=void 0)}_handleVisibilityHidden(){this._hiddenStartTime=Date.now(),this._clearInterval()}_handleVisibilityVisible(){if(0===this._startTime)return;const e=Date.now()-this._hiddenStartTime;this._startTime+=e,this._updateElapsedTime(),this._intervalId=window.setInterval((()=>this._handleTimeInterval()),200)}_handleVisibilityChange(){const e=document.visibilityState;e!==this._lastVisibilityState&&(this._lastVisibilityState=e,"hidden"===e?this._handleVisibilityHidden():this._handleVisibilityVisible())}_createButtons(){const e=document.createElement("div");e.id="next-stay-container",e.style.display="none";const t=this._createButton("next",(()=>this._nextButtonClick(this._shouldAdvanceToContent))),i=this._createButton("stay",(()=>this._stayButtonClick()));return e.appendChild(t),e.appendChild(i),e}_createButton(e,t){const i=document.createElement("div"),s=document.createElement("span");return i.id=this._getButtonId(e),s.textContent=e,i.appendChild(s),i.onclick=t,i.onkeydown=e=>this._throttledKeydownHandler(e,t),i}_getButtonId(e){return`${e}-video`}_hide(){this._buttons&&(this._buttons.style.display="none",this._buttons.classList.remove("active"),this._isVisible=!1)}_handleInteractation(e){if(e instanceof MouseEvent&&"click"!==e.type)return;if(e instanceof KeyboardEvent&&!["Space","Enter","ArrowLeft","ArrowRight"].includes(e.code))return;if(!this.isActive())return;const t=e.composedPath(),i=[this._getButtonId("next"),this._getButtonId("stay")];t.some((e=>i.includes(e.id)))||this._cancel()}constructor(e,t,i,s,n,r,a,o){this._parentElement=e,this._wasAdFetched=t,this._fetchAd=i,this._advanceToAd=s,this._advanceToContent=n,this._nextButtonClick=r,this._stayButtonClick=a,this._cancel=o,this._logPrefix="AdvancePlaylist",this._isVisible=!1,this._state=kk,this._lastVisibilityState=document.visibilityState,this._startTime=0,this._elapsedTime=0,this._hiddenStartTime=0,this._defaultAdvancePlaylistDuration=30,this._fetchAdThreshold=0,this._showButtonsThreshold=0,this._advanceThreshold=0,this._shouldAdvanceToContent=!1,this._nextAdvancePlaylistDuration=void 0,this._interactionHandler=this._handleInteractation.bind(this),this._stateHandlers={[wk]:this._handleAwaitingStart.bind(this),[kk]:this._handleAwaitingFetchAd.bind(this),[Ak]:this._handleAwaitingShowButtons.bind(this),[Ik]:this._handleAwaitingAdvance.bind(this)},this._throttledKeydownHandler=pc(((e,t)=>{["Space","Enter"].includes(e.code)&&(e.preventDefault(),t())}),100),this._setDefaultAdvancePlaylistDuration(),this._buttons=this._createButtons(),this._parentElement.appendChild(this._buttons),this._parentElement.addEventListener("click",this._interactionHandler),this._parentElement.addEventListener("keyup",this._interactionHandler)}}class Pk{resolve(e){this._resolve(e)}reject(e){this._reject(e)}constructor(){this.promise=new Promise(((e,t)=>{this._resolve=e,this._reject=t}))}}class Ok{setupListener(e,t,i){const{tablet:s,desktop:n}=i,r=window.innerHeight>window.innerWidth;this._orientationListener=this._setResizeListener.bind(this,{device:t,desktopBreakpoint:n,tabletBreakpoint:s,originallyPortraitView:r,pageElement:e}),this._pageManager.resize.on(this._orientationListener)}_removeCLSMinHeight(e){var t;null==(t=e.parentElement)||t.style.removeProperty("min-height")}_setResizeListener({device:e,desktopBreakpoint:t,tabletBreakpoint:i,originallyPortraitView:s,pageElement:n}){const r="phone"===e&&window.innerWidth>=i,a="tablet"===e&&(window.innerWidth<=i||window.innerWidth>=t),o="desktop"===e&&window.innerWidth<=t,l=r||a||o,d=s&&window.innerWidth>window.innerHeight,c=!s&&window.innerHeight>window.innerWidth;(l||(d||c))&&(this._removeCLSMinHeight(n),this._orientationListener&&this._pageManager.resize.off(this._orientationListener),this._orientationListener=null)}constructor(){this._orientationListener=null,this._pageManager=R.resolve(Mr)}}class Rk{render(e=document.head){this._el&&this._el.remove(),this._el=document.createElement("script"),this._el.type="application/ld+json",this._el.dataset.mediaid=this._mediaid||"",this._el.textContent=JSON.stringify(this._jsonld,null,2),e.appendChild(this._el)}transform(e){var t,i,s;return{"@context":"https://schema.org","@type":"VideoObject",name:e.title||"Untitled",description:e.description||"",thumbnailUrl:(null==(t=e.images)?void 0:t.map((e=>e.src)))||[],uploadDate:Rk.formatDate(e.pubdate||0),duration:Rk.formatDuration(e.duration||0),contentUrl:(null==(s=e.sources)||null==(i=s.find((e=>"video/mp4"===e.type)))?void 0:i.file)||"",embedUrl:e.link||""}}static formatDuration(e){return`PT${Math.floor(e/60)}M${e%60}S`}static formatDate(e){return new Date(1e3*e).toISOString()}constructor(e){this._logPrefix="RaptivePlayer",this._jsonld=null,this._mediaid=null,this._el=null,this._mediaid=e.mediaid,this._jsonld=this.transform(e)}}class Lk extends Lm{get prerollNum(){return this._adPodManager.prerollNumber}get eligibleFloorComponents(){return this._eligibleFloorComponents}set eligibleFloorComponents(e){this._eligibleFloorComponents=e}get appliedFloorComponents(){return this._appliedFloorComponents}set appliedFloorComponents(e){this._appliedFloorComponents=e}hide(){this._playerContainer.classList.add("raptive-player-hidden")}show(){this._playerContainer.classList.remove("raptive-player-hidden")}_isAutoInjectedPlayer(){return this._playerType===Em}async _handlePlayerReady(){if(await this.getPlayerContent(),this._setupMetadata(),this._logRaptivePlayerEvent("Embed"),this._isAutoInjectedPlayer()){(new Ok).setupListener(this._pageElement,this._context.device,this._config.site.breakpoints)}this._autoplay&&this._kickoffAdPlayback()}async _kickoffAdPlayback(){this._loadingSpinner.show();const e=this._didTearDown,t=this._config.gdpr;!t.consentCaptured&&t.enabled&&await this.waitForConsent(),this._startTearDownTimer(),this._autoplay?this._loadingSpinner.show():this._logRaptivePlayerEvent("CTP-initiated"),e||await this._fetchLinearAd(),this.collapseCollection?this.triggerPlayInView():this._programmaticPlayVideo(),this._checkVideoClose()&&(this._state=ht)}_setupPlayer(){this._setupCollapseListeners(),this._setupContentSpecificPlaylists(),this._setupMatchMedia(),this._handleLoadedMetaData(),this._setupCollapse(),this._setupAdvancePlaylist(),this._adCountDown.addAdTimer(this._playerContainer),this._setupTearDown(),this._setupDataAttributes()}_createHlsManager(){return new Tk({videoEl:this._videoElement,config:this._config.video,fatalErrorCallback:this._hlsFatalErrorCallback.bind(this)})}_isRelatedPlayer(){return this._isEmbeddedStationary()||this._playerType===Am}_isFirstRelatedPlayerVideo(){return this._isRelatedPlayer()&&0===this._playlistIndex}_getPlaylistIdForLogger(){return this._isFirstRelatedPlayerVideo()?null:this._playlistId}_setupMetadata(){if(!this._isMetadataEnabled||this._metadata||!this._isRelatedPlayer()||!this._videoContentObject)return;const e=this._videoContentObject.playlist[0];this._metadata=new Rk(e),this._metadata.render()}_setupTearDown(){var e;(this._playerType===km&&this._config.video.advancePlaylist||this._isCollapsible)&&(this._tearDownPlayerTimeout=null!=(e=R.resolve(od).result)?e:0,this._canTearDown=this._tearDownPlayerTimeout>0,this._getPlaylistIdForLogger())}_setupDataAttributes(){this._playerId&&(this._playerContainer.dataset.playerId=this._playerId,this._playerContainer.dataset.name=this.name)}_setupCollapse(){if(this._collapseSettings){this._isTopCenterWithTitle()||this._playerContainer.appendChild(this._createPlayerCloseButton()),this._handleTitleContainerOnCollapseAndUnCollapse(),this._collapsePlayerLogic();const e=this._collapseSettings.title;if(this._isAutoInjectedPlayer()&&e){const t=document.createElement("h3");t.innerText=e,t.className="adthrive-player-title",t.id="adthrive-collapse-title";const i=this._container.firstChild;i?this._container.insertBefore(t,i):this._container.appendChild(t)}}}_setupMatchMedia(){if(window.matchMedia){const e=window.matchMedia(`only screen and (max-width: ${this._config.site.breakpoints.desktop-1}px)`);e.addListener(this._handleWidthBreak.bind(this)),this._handleWidthBreak(e)}}_setupAdvancePlaylist(){const{playlistPlayer:e,relatedPlayer:t}=this._config.video.advancePlaylist;this._isAdvancePlaylistEnabled=this._isAutoInjectedPlayer()?e.enabled:t.enabled,this._isAdvancePlaylistEnabled&&!this._adsDisabled&&(this._advancePlaylist=new xk(this._playerContainer,(()=>this._adFetched),this._handleAdvancePlaylistFetchAd.bind(this),this._handleAdvancePlaylistAdvanceToAd.bind(this),this._handleAdvancePlaylistAdvanceToContent.bind(this),this._handleAdvancePlaylistNextButtonClick.bind(this),this._handleAdvancePlaylistStayButtonClick.bind(this),this._handleAdvancePlaylistCancel.bind(this)))}_setupContentSpecificPlaylists(){const e=this._config.video.contentSpecificPlaylists,t=e&&rc(e);this._getPlaylistIdForLogger(),t&&t.playlistId&&(this._contentSpecificPlaylistId=t.playlistId)}_handleTitleContainerOnCollapseAndUnCollapse(){this._videoEventBus.videoCollapsed.on((e=>{var t;e.playerContainer===(null==(t=this.collapseCollection)?void 0:t.playerContainer)&&(this._videoDescriptionDiv.classList.add("adthrive-display-none"),this._videoTitleDiv.classList.add("adthrive-small-text"))})),this._videoEventBus.videoUnCollapsed.on((()=>{this._videoDescriptionDiv.classList.remove("adthrive-display-none"),this._videoTitleDiv.classList.remove("adthrive-small-text")}))}_handleLoadedMetaData(){this.loadedMetaData.once((()=>{this._config.video.removeVideoTitleWrapper?this._playerContainer.classList.add("adthrive-player-without-wrapper-text"):this._createVideoContentTitle(),this._collapseSettings&&this._createCollapsibleCollection()}))}async _handleAdvancePlaylistFetchAd(){const e=this._adPodManager;e.resetAdCountInPod(),e.incrementSessionPrerollNumber(),this._reInitAttempts=0,await this._fetchLinearAd()}_handleAdvancePlaylistAdvanceToAd(){this._handleVideoElementEnded()}_handleAdvancePlaylistAdvanceToContent(){this._programmaticPauseVideo({pauseContent:!0,logEvent:!1}),this._continuePlayingNextContent()}_handleAdvancePlaylistNextButtonClick(e=!1){const t={playerType:this._playerType,mediaId:this.mediaOrPlaylistId,playlistIndex:this._playlistIndex};W.event(this._logPrefix,"nextButtonClicked",t),e?this._handleAdvancePlaylistAdvanceToContent():this._handleAdvancePlaylistAdvanceToAd()}_handleAdvancePlaylistStayButtonClick(){var e;const t={playerType:this._playerType,mediaId:this.mediaOrPlaylistId,playlistIndex:this._playlistIndex};W.event(this._logPrefix,"stayButtonClicked",t),null==(e=this._advancePlaylist)||e.reset()}_handleAdvancePlaylistCancel(){var e;if(this._adPlaying)return;const t={playerType:this._playerType,mediaId:this.mediaOrPlaylistId,playlistIndex:this._playlistIndex};W.event(this._logPrefix,"advancePlaylistCancelled",t),null==(e=this._advancePlaylist)||e.reset()}_setWrapperBar(){this._wrapperBar=this._playerPosition.querySelector(".adthrive-wrapper-bar")}_shouldStartAdvancePlaylist(){return!!this._isAdvancePlaylistEnabled&&(!this.isFirstPlay||!this._isRelatedPlayer()||!this._isEmbeddedStationary()&&this._config.video.advancePlaylist.relatedPlayer.applyToFirst)}_isEmbeddedStationary(){return this._playerType===Cm}_createVideoContentTitle(){this._isMobileTopCenterCollapse()?this._addTopCenterWrapper():this._addPlayerWithoutWrapper()}_isTopCenterWithTitle(){return!this._config.video.removeVideoTitleWrapper&&this._isMobileTopCenterCollapse()}_checkVideoClose(){return this._collapseSettings&&this._collapseSettings.saveVideoCloseState&&this._config.video.videoWasClosed}_prepareToPausePlayer(){this._handleAdvancePlaylistCancel(),this._loadingSpinner.hide(),this._videoPlayerControls.toggleControlsFullWidth(!0),this._videoPlayerControls.setPlayButtonState("play"),this.collapseCollection&&Zv.handleOtherVideoPlaying(this.collapseCollection)}triggerPlayInView(){this.loadedMetaData.once((()=>{this.collapseCollection&&Zv.handleScroll(this.collapseCollection)})),this.loadedMetaData.emitted&&this.collapseCollection&&Zv.handleScroll(this.collapseCollection)}_collapsePlayerLogic(){this.collapsible&&(this._setWrapperBar(),this._wrapperBar&&this._wrapperBar.style.setProperty("display","flex"),this._isMobileTopCenterCollapse()&&this._createTopCenterBackground(this._playerPosition),this._stickyElement=null)}_shouldShufflePlaylist(){const{hasContentSpecificPlaylist:e,contentSpecificPlaylistshuffle:t,defaultPlaylistShuffle:i}=this._config.video.jwPlaylistObj;return e&&t||!e&&i}_shuffleKeepingFirstItem(e){const[t,...i]=e;return[t,...sc.shufflePlaylist(i)]}_updatePlaylistItemsWithShuffle(){if(!this._videoContentObject||!this._videoContentObject.playlist||this._videoContentObject.playlist.length<2||!this._shouldShufflePlaylist())return;const e=this._videoContentObject.playlist;this._videoContentObject.playlist=this._isRelatedPlayer()||this._playlistPlayerMediaId?this._shuffleKeepingFirstItem(e):sc.shufflePlaylist(e)}async getPlayerContent(){this._videoContentObject=await this._getVideoContent(),this._updatePlaylistItemsWithShuffle(),this._setVideoElementAttributesAndSource()}_initializeHlsOrMp4(e){var t;const i=null==(t=e.find((e=>"application/vnd.apple.mpegurl"===e.type)))?void 0:t.file;i&&this._hlsManager.isSupported()?this._hlsManager.loadSource(i):i&&this._videoElement.canPlayType("application/vnd.apple.mpegurl")?this._videoElement.src=i:(W.event(this._logPrefix,"_initializeHlsOrMp4",{message:"Hls is not supported, falling back to mp4"}),this._setMp4Source(e))}_setMp4Source(e){const t=this._getLowestBitrateMp4Rendition(e);t?this._videoElement.src=t:W.error(this._logPrefix,"_setMp4Source",{message:"No mp4 sources found"})}_getLowestBitrateMp4Rendition(e){let t;for(const i of e)"video/mp4"===i.type&&(!t||i.bitrate&&t.bitrate&&i.bitrate"video/mp4"===e.type)),i=this._videoElement.currentTime;this._hlsManager.reset(),t.length>0&&this._switchToMp4Source(i,t)}_switchToMp4Source(e,t){var i;this._setMp4Source(t),this._videoElement.currentTime=e,this._videoElement.load(),null==(i=this._advancePlaylist)||i.reset(),this._programmaticPlayVideo({logEvent:!1}).then((()=>{var e;(this._isMobile||this._isTablet)&&this._videoPlayerControls.hideControls(),this._shouldStartAdvancePlaylist()&&(null==(e=this._advancePlaylist)||e.start(this._videoElement.duration)),this._toggleTitle(!0),this._videoPlayerControls.toggleProgressBar(!0)})).catch((()=>{}))}_getVideoUsingIndex(e=this._playlistIndex){const t=this._videoContentObject;if(t)return t?t.playlist[e]:void 0}_getNextIndex(){const e=this._videoContentObject;if(!e)return;return e.playlist.length-1===this._playlistIndex||this.isFirstPlay?0:this._playlistIndex+1}_incrementPlaylistIndex(){const e=this._getNextIndex();void 0!==e&&(this._playlistIndex=e)}setNextVideo(){this._videoContentObject&&(this._incrementPlaylistIndex(),this._setVideoElementAttributesAndSource())}_setVideoElementAttributesAndSource(){if(!this._videoContentObject)return;const e=this._getVideoUsingIndex(),t=e.sources;this._videoPlayerControls.setTracks(e.tracks),this._config.video.removeVideoTitleWrapper||this._setVideoTitle(e),this._videoElement.poster=this.isFirstPlay?e.image:"",this._videoElement.controls=!1,this._videoElement.preload="metadata",this._initializeHlsOrMp4(t)}_setVideoTitle(e){const{title:t,link:i}=e;this._videoTitle=t,this._videoLink=i,this._topCollapseVideoTitleElement&&(this._topCollapseVideoTitleElement.innerHTML=this._videoTitle),this._videoTitleDiv.innerHTML=`${t}`,this._videoDescriptionDiv.innerHTML=`${e.description}`;const s=this._linkProvidedByPublisher(this._videoLink);if(this._toggleLearnMoreLink(s),s&&this._wrapperTitleWrapperElement){var n,r;null==(r=this._wrapperTitleWrapperElement)||null==(n=r.querySelector("svg"))||n.remove();const e=this._createLinkIcon(this._playlistId);this._wrapperTitleWrapperElement.appendChild(e),this._wrapperTitleWrapperElement.href=i,this._wrapperTitleWrapperElement.target="_blank",this._wrapperTitleWrapperElement.onclick=this._handleTitleClick.bind(this),this._videoTitleOverlayContainer.prepend(this._wrapperTitleWrapperElement),this._wrapperTitleWrapperElement.classList.remove("adthrive-no-pointer-events")}else if(this._wrapperTitleWrapperElement){var a,o;null==(o=this._wrapperTitleWrapperElement)||null==(a=o.querySelector("svg"))||a.remove(),this._wrapperTitleWrapperElement.classList.add("adthrive-no-pointer-events")}}_toggleLearnMoreLink(e){const t=document.getElementById(`${this._playlistId}-learn-more-link`);if(!t)return;const i="raptive-player-learn-more-link-active";e?t.classList.add(i):t.classList.remove(i)}_updateAdUnitMediaId(e){var t,i,s;const n={playerID:this._playerId,mediaID:this.nextMediaId};e.ortb2Imp={...e.ortb2Imp,ext:{...null==(t=e.ortb2Imp)?void 0:t.ext,data:{...null==(s=e.ortb2Imp)||null==(i=s.ext)?void 0:i.data,jwTargeting:n}}},this._prebidMethods.updateAdUnit(e.code,e)}_onBeforeRequestBids(){this._prebidEventBus.beforeRequestBids.on((e=>{e.forEach((e=>{const t=e.code===this.name;if(!t)return;const i=[...this._userIdComponent.getTargetingData(),...this._sspUserSyncComponent.getTargetingData()];var s;i&&(this.userIdTargetingData=i);const n=null!=(s=e.ortb2Imp&&e.ortb2Imp.ext&&e.ortb2Imp.ext.tid)?s:"";t&&n&&(this.transactionId=n)}))}))}_setupCollapseListeners(){this._collapseSettings&&(Zv.classesToggled.on((()=>{this._handleResizeAd()})),Zv.collapseEvent.on((()=>{this._handleResizeAd(),this._handleTransformForCollapse()})),Zv.uncollapseEvent.on((()=>{this._handleResizeAd()})))}_setupListeners(){if(this.collapsible&&this._collapseSettings.collapseType===tt.Mobile){const e=R.resolve(Xn);e.footerResponseReceived.on(this._handleFooterResponseReceivedEvent.bind(this));this._getCollapseMobileSubType().includes("bottom")&&e.footerHeightChanged.on((e=>this._handleFooterHeightChange(e)))}this._disableAdsEventBus.disableAds.on(this._disableAds.bind(this),{handleEventsAlreadyEmitted:!0}),this.kickoffAdPlayback.on(this._kickoffAdPlayback.bind(this)),this.imaManager.adLoaded.on(this._handleAdLoaded.bind(this)),this.imaManager.adStarted.on(this._handleAdStart.bind(this)),this.imaManager.adProgress.on(this._handleAdProgress.bind(this)),this.imaManager.adPause.on(this._handleAdPause.bind(this)),this.imaManager.adPlay.on(this._handleAdPlay.bind(this)),this.imaManager.adError.on(this._handleAdError.bind(this)),this.imaManager.adImpression.on(this._handleAdImpression.bind(this)),this.imaManager.log.on(this._handleLogEvent.bind(this)),this.play.on(this._handleVideoElementPlay.bind(this)),this.pause.on(this._handleVideoElementPause.bind(this)),this.seeked.on(this._handleVideoElementSeeked.bind(this)),this.seeking.on(this._handleVideoElementSeeking.bind(this)),this.timeupdate.on(this._handleVideoElementTimeUpdate.bind(this)),this.ended.on(this._handleVideoElementEnded.bind(this)),this.imaManager.allAdsCompleted.on(this._handleAllAdsComplete.bind(this)),this.imaManager.contentResumeRequested.on(this._handleContentResumeRequested.bind(this)),this._spaListeners.push(this._eventProxy.resize.on(this._handleResizeAd.bind(this))),this._collapseSettings&&this._spaListeners.push(this._eventProxy.scroll.on(this._handleScroll.bind(this))),this._videoPlayerControls.videoActionEvents.on((e=>this._listenForPlayerEventsToLog(e))),this._spaListeners.push(this._eventProxy.pageVisibility.on(this._handlePageVisibilityChange.bind(this))),this._listenForLargeVastError()}_listenForLargeVastError(){this._prebidEventBus.vastExceededLimit.on((e=>{var t;const i=null==(t=e.bids)?void 0:t[0];if(!i)return;const{adId:s,bidder:n,creativeId:r,meta:a}=i,{maxSizeAllowed:o,responseSize:l}=e,d={meta:a,bidder:n,adId:s,creativeId:r,responseSize:l,maxSizeAllowed:o};W.error(this._logPrefix,"listenForLargeVastError",d)}))}_listenForPlayerEventsToLog(e){var t,i,s;const{action:n,context:r,details:a}=e,o=this._getPlaylistIdForLogger(),l={mediaId:null==(s=this._videoContentObject)||null==(i=s.playlist)||null==(t=i[this._playlistIndex])?void 0:t.mediaid,playlistId:o,siteId:this._config.site.id,playerId:this._playerId,mediaIdCount:`${this._mediaIdCount||0}`,context:r,...a};this._eventsToSkipLogging.includes(n)||W.event(this._logPrefix,n,l)}get collapsible(){return this._isCollapsible}get isPlayerType(){return this._playerType}get transactionId(){return this._transactionId}set transactionId(e){this._transactionId=e}get vp(){return this.prerollNum<=1?this.prerollNum:this.prerollNum<=9?2:3}get retryAttempts(){return this._retryAttempts}set userIdTargetingData(e){this._userIdTargetingData=e}get userIdTargetingData(){return this._userIdTargetingData}set videoAdUnit(e){this._videoAdUnit=e}get videoAdUnit(){return this._videoAdUnit}get mediaOrPlaylistId(){return this._mediaOrPlaylistId}fetchVideoContent(e,t){return ss(sc.addMaxResolutionQueryParam(`https://cdn.jwplayer.com/v2/${e}/${t}`))}async _prependEmbeddedMedia(e){const t=this._isRelatedPlayer()?this._mediaOrPlaylistId:this._playlistPlayerMediaId;if(t){const i=await this.fetchVideoContent("media",t);e.playlist.unshift(i.playlist[0])}}async _handleAdvancePlaylist(e){const t=await this._config.video.jwPlaylistObj.playlist;this._isAdvancePlaylistEnabled&&(e.playlist=e.playlist.concat(t.playlist))}async _getVideoContent(){try{const e=this._isRelatedPlayer()&&!this._contentSpecificPlaylistId?"media":"playlists",t=this._contentSpecificPlaylistId||this._mediaOrPlaylistId,i=await this.fetchVideoContent(e,t);return this._isRelatedPlayer()||this._playlistPlayerMediaId?(this._contentSpecificPlaylistId||this._playlistPlayerMediaId?await this._prependEmbeddedMedia(i):await this._handleAdvancePlaylist(i),i):i}catch(e){}}_getSegmentsForNextContent(){var e,t,i;const s=this._getNextIndex();var n;return null!=(n=null==(i=this._videoContentObject)||null==(t=i.playlist)||null==(e=t[s])?void 0:e.jwpseg)?n:[]}_enrichBidsWithJwTargeting(){var e;this._jwBoostExperiment.result&&((null==(e=this._videoAdUnit)?void 0:e.bids)?(this.jwPlayerSegments=this._getSegmentsForNextContent(),this._videoAdUnit.bids.forEach((e=>this._applyJwTargetingToBid(e,this.jwPlayerSegments)))):this._videoEventBus.videoAdUnitAdded.once((()=>{this._enrichBidsWithJwTargeting()})))}_applyJwTargetingToBid(e,t){const i=e.rtd||{},s={jwplayer:{...i.jwplayer,targeting:{content:{id:`jw_${this.nextMediaId}`},segments:t}}};e.rtd={...i,...s}}_getFormattedAdDetails(e){const t=this._getAdDetailsFromAd(e);return t?{...this._winningBidDetails,adId:t.adId,wrapperIds:t.adWrapperIds,gamCreativeId:t.adWrapperCreativeIds[t.adWrapperCreativeIds.length-1],gamLineItemId:t.adWrapperIds[t.adWrapperIds.length-1],wrapperCreativeIds:t.adWrapperCreativeIds,vastCreativeId:t.creativeId,mediaFileURL:t.mediaUrl,adUnitName:this.name,tag:this._prerollAdUrl,isEmpty:!1,wrapperSystems:t.adWrapperSystems,duration:t.duration}:null}async _handleAdLoaded(e){if(this._config.video.logAdLifeCycle&&W.event(this._logPrefix,"_handleAdLoaded",this._playerType,this._getEventInfo(e)),this._addWinningBidDetails(),this._adDetails=this._getFormattedAdDetails(e),this.imaManager.adPlayReady||await this._awaitAdReady(),this._adKickoffCompletePromise.resolve(),this._adsDisabled)this._continuePlayingNextContent();else{if(this._videoPlayerControls.toggleProgressBar(!1),this.imaManager.prematureAdPlay)return this.imaManager.setPrematureAdPlay(!1),void this._handleContentResumeRequested();this.imaManager.playAdInStream(),this._setStaleAdDetection("adLoaded")}}async _disableAds(e){var t;e.has("all_page")&&(this._adsDisabled=!0,await this._adKickoffCompletePromise.promise,null==(t=this._advancePlaylist)||t.destroy(),this._advancePlaylist=void 0,this._videoPlayerControls.toggleProgressBar(!0),this.imaManager.disable(),this._adPlaying&&this._continuePlayingNextContent())}_handleAdStart(e){var t;this.imaManager.adPlayReady||W.event(this._logPrefix,"_handleAdStart","PrematureStart",this._getEventInfo(e)),this._videoPlayerControls.setPlayButtonState("pause"),this._retryAttempts=0,this._clearStaleTimers(),this._handleResizeAd(),this._adCountDown.setAdTimer(e,!!this._shouldUseHardcodedAdPodDuration,this._adPodManager.maxAdPodSize),this._adCountDown.canStartAdCountDown&&this._adCountDown.displayAdTimer(),this.collapseCollection&&(this.collapseCollection.playbackStarted=!0,this._handleScroll()),this._videoPlayerControls.mediaStarted=!0,(this._isMobile||this._isTablet)&&this._videoPlayerControls.showControls(),this._videoPlayerControls.toggleControlsFullWidth(!1),this._addWinningBidDetails(),this._adDetails=this._getFormattedAdDetails(e);const i=this._adDetails&&this._adDetails.duration||e.duration||this._defaultAdDuration;this._currentAdDurationWithBuffer=i+this._stalePlayerTimeoutBuffer,this._setStaleAdDetection("adStart");const s=this._adDetails||{};this._eventProxy.emitVideoSlotRenderedEvent(s),this._checkRenderedAdDetails(),this._adPlaying=!0,this._adPodManager.addCreativeDuration(null==(t=this._adDetails)?void 0:t.duration),this._adPodManager.canApplyAdPodExperience()&&this._requestNextAdAuctionInPod(),this._toggleTitle(!1),this._loadingSpinner.hide()}_handleAdProgress(e){if(!this.canPlay){try{this._prepareToPausePlayer(),this._programmaticPauseVideo({logEvent:!0,pausedByOtherPlayer:!0})}catch(e){W.error(this._logPrefix,"handleAdProgress","Error trying to pause player",e)}return}const{duration:t,position:i}=e;if(this._adCountDown.canStartAdCountDown&&this._adCountDown.updateAdCountdown(t,i),this._currentAdTime=i,this._config.video.logAdDuration&&!this._adDurationLogged){const e={adDuration:t,roundedAdDuration:Math.round(t)};W.event(this._logPrefix,"_handleAdProgress","VideoAdDuration",e),this._adDurationLogged=!0}}_handleAdImpression(e){this._handlingAdError=!1,this._config.video.logAdLifeCycle&&W.event(this._logPrefix,"_handleAdImpression",this._playerType,this._getEventInfo(e))}_handleAdPause(){if(this._clearStaleTimers(),this.imaManager.adPlay.once((e=>{if(0!==this._currentAdTime){var t;const i=(null==(t=this._getFormattedAdDetails(e))?void 0:t.duration)||this._defaultAdDuration;this._currentAdDurationWithBuffer=i+this._stalePlayerTimeoutBuffer,this._setStaleAdDetection()}})),this.collapseCollection)if(this._isProgrammaticPause)this._isProgrammaticPause=!1;else if(this.collapseCollection){var e;if((null==(e=this.collapseCollection)?void 0:e.playerState)===ht)return;this.collapseCollection.playerState=this.collapseCollection.playerCollapsed?lt:ot}}_handleAdPlay(){if(this._isProgrammaticPlay)this._isProgrammaticPlay=!1;else if(this.collapseCollection){var e;if((null==(e=this.collapseCollection)?void 0:e.playerState)===ht)return;this.collapseCollection.playerState=this.collapseCollection.playerCollapsed?at:rt}}async _runPrerollAdInAdPod(){this._loadingSpinner.show(),this._adFetched||(this._adPodManager.incrementSessionPrerollNumber(),await this._doubleRequestVideoBids()),this._resetIMA(),await this._makeGamCall(),this._resetAdVars(),this.imaManager.adReady.emit(),this.imaManager.playAd()}_maxRetriesReached(){const e="vpr"===this._raptiveInstreamRerequestOnErrorResult&&this.prerollNum>5,t="vpr2"===this._raptiveInstreamRerequestOnErrorResult&&this._retryAttempts>=2,i=this._retryAttempts>=this._maxRetries;return e||t||i}_resetIMA(){this._reInitAttempts=0,this._removeInstream(),this.imaManager.reInitIMA()}async _adFailedLogic(){const e=this._maxRetriesReached(),t=this._adPodManager.canApplyAdPodExperience();e||"off"===this._raptiveInstreamRerequestOnErrorResult||t?this._adPodManager.canFetchNextAdInPod()?(this._adFetched=!1,await this._runPrerollAdInAdPod()):this._continuePlayingNextContent():(this._retryAttempts+=1,this._prebidMethods.getHighestCpmBids(this.name).length||(this._auctionManager.beforeBidRequest(!0),await this.requestVideoBids([this])),this._resetIMA(),this._makeGamCall(),this._loadingSpinner.show())}async _awaitAdReady(){return new Promise((e=>{this.imaManager.adReady.once((()=>{e()}))}))}_handleAllAdsComplete(){this._shouldUseHardcodedAdPodDuration||this._adCountDown.hideAdTimer()}_handleContentResumeRequested(){this._shouldUseHardcodedAdPodDuration||this._adCountDown.hideAdTimer(),this._videoStarted=!1,this._handlingAdError?W.event(this._logPrefix,"_handleContentResumeRequested","PrematureContentResumeRequested",this._playerType):this._adPodManager.canApplyAdPodExperience()&&this._adPodManager.canPlayAdPodPrerollAd()?this._runPrerollAdInAdPod():(this._adCountDown.hideAdTimer(),this._adCountDown.reset(),this._hlsManager.setMaxBufferLength(600),this._tearDownAfterNextAd&&(this._incrementPlaylistIndex(),this._tearDownPlayer()),this._continuePlayingNextContent())}async _handleAdError(e){this._handlingAdError=!0,this.imaManager.adPlayReady||await this._awaitAdReady(),this._adKickoffCompletePromise.resolve(),this._clearStaleTimers();const t=this._prerollAdUrl;this._bidMarkedOnCurrentAd=!1,this._adDetails||(this._addWinningBidDetails(),this._adDetails={...this._winningBidDetails,adUnitName:this.name,tag:t,isEmpty:!0}),this._checkRenderedAdDetails(!0);const i={...e,...this._getPlayerVersions(),...this._getErrorLogAdDetails()};900===e.code&&this._eventProxy.emitVideoSlotRenderedEvent(this._adDetails),W.error(this._logPrefix,"vastError",this._playerType,i),this._shouldUseHardcodedAdPodDuration||this._adCountDown.hideAdTimer(),this._adsDisabled?this._continuePlayingNextContent():this._adFailedLogic()}_handleLogEvent(e){var t,i,s;const n=null==(i=e.getAdData())||null==(t=i.adError)?void 0:t.getMessage();if(W.event(this._logPrefix,"_handleLogEvent","LOG",`non-fatal error occured for ad id: ${(null==(s=this._adDetails)?void 0:s.adId)||"unavailable"}`,{error:n,adDetails:this._adDetails}),!this._adDetails||!this._prebidAuctionManager)return void W.event(this._logPrefix,"_handleLogEvent","LOG","no ad details available",{error:n});const r=this._markPrebidBidAsUsed(this._adDetails.gamCreativeId,this._prebidAuctionManager,this._adDetails.wrapperSystems);if(this._bidMarkedOnCurrentAd){const e=r?`marked bid as used for ad id: ${r}`:"marked winning bid as used";W.event(this._logPrefix,"_handleLogEvent","LOG",e,{error:n,adDetails:this._adDetails})}}_programmaticPlayVideo({logEvent:e}={logEvent:!0}){return new Promise(((t,i)=>{if(e&&this._listenForPlayerEventsToLog({action:"programmaticPlay",context:this._adPlaying?"ad":"content"}),this._adPlaying)try{this.imaManager.playAd(),t()}catch(e){i(e)}else this._isProgrammaticPlay=!0,this._videoElement.play().then(t).catch(i)}))}_handleVideoElementPlay(){if(this._videoPlayerControls.mediaStarted=!0,!this._adsDisabled&&this._wasSeeking&&(this._isVideoEnded||0===this._videoElement.currentTime))return this._videoPlayerControls.toggleProgressBar(!1),this._toggleAdContainer(!0),this._adCountDown.hideAdTimer(),void this._programmaticPauseVideo({pauseContent:!0,logEvent:!1});if(this._videoPlayerControls.toggleControlsFullWidth(!0),!this._adsDisabled&&this.isFirstPlay&&(this._programmaticPauseVideo({pauseContent:!0,logEvent:!1}),this._videoPlayerControls.toggleProgressBar(!1),this._toggleAdContainer(!0),this.imaManager.adReady.emit()),this._videoPlayerControls.toggleProgressBar(!0),this._isProgrammaticPlay)this._isProgrammaticPlay=!1;else if(this.collapseCollection){var e;if((null==(e=this.collapseCollection)?void 0:e.playerState)===ht)return;this.collapseCollection.playerState=this.collapseCollection.playerCollapsed?at:rt}}_programmaticPauseVideo(e={logEvent:!0}){const{pauseContent:t,logEvent:i,pausedByOtherPlayer:s}=e;let n;this._isProgrammaticPause=!0,!this._adPlaying||t?(n="content",this._videoElement.pause()):(n="ad",this.imaManager.pauseAd({pausedByOtherPlayer:s})),i&&this._listenForPlayerEventsToLog({action:"programmaticPause",context:n})}_handleVideoElementPause(){if(this._adPlaying||(this._toggleTitle(!0),this._adCountDown.hideAdTimer()),this.collapseCollection)if(this._isProgrammaticPause)this._isProgrammaticPause=!1;else if(this.collapseCollection){var e;if((null==(e=this.collapseCollection)?void 0:e.playerState)===ht)return;this.collapseCollection.playerState=this.collapseCollection.playerCollapsed?lt:ot}}_handleVideoElementSeeking(e){"seeking"===e.type&&(this._wasSeeking=!0)}_handleVideoElementSeeked(e){"seeked"===e.type&&(this._wasSeeking=!1)}async _handleVideoElementTimeUpdate(){const e=this._videoElement,t=e.currentTime,i=e.duration-t;if(t>=.5&&!this._videoStarted&&(this._videoStarted=!0,this._isVideoEnded=!1,this._loadingSpinner.hide(),this.collapseCollection&&(this.collapseCollection.playbackStarted=!0,this._handleScroll())),!this.canPlay)return this._prepareToPausePlayer(),void this._programmaticPauseVideo({pauseContent:!0,pausedByOtherPlayer:!0,logEvent:!0});t>3&&this._videoTitleOverlayContainer.classList.contains("active")&&!this._wasSeeking&&this._toggleTitle(!1),!this._adsDisabled&&i<10&&!this._adFetched&&this._adPodManager.shouldFetchNextAd&&await this._handleAdvancePlaylistFetchAd()}async _getPrerollAdUrl(){if("rvp_vastOverride"in window){const e=await window.rvp_vastOverride(this.prerollNum);if(e)return e}const e=this._adDurationControlExperiment.result;if(e&&"off"!==e){return`https://vast-tags.com/category/${e}?prerollNum=${this.prerollNum}`}return await this._videoEventBus.buildingVastAdURL.legacyEmit([this]),this.buildVideoUrl(this)}_requestNextAdAuctionInPod(){this._adPodManager.canFetchNextAdInPod()&&(this._adPodManager.incrementSessionPrerollNumber(),this._auctionManager.reset(),this._doubleRequestVideoBids())}async _doubleRequestVideoBids(){this._adFetched=!0,await this._requestBids(),await this._requestBids()}async _requestBids(){this._auctionManager.incrementCurrentAuctionNumber(),this._auctionManager.beforeBidRequest(!1,this._adPodManager.canFallBackAuction),await this.requestVideoBids([this])}_setNextMediaId(){const e=this._getVideoUsingIndex(this._getNextIndex());var t;this.nextMediaId=null!=(t=null==e?void 0:e.mediaid)?t:"nf"}async _fetchLinearAd(){this._setNextMediaId(),this._adsDisabled?this._continuePlayingNextContent():(this._jwBoostExperiment.result&&this.videoAdUnit&&this._updateAdUnitMediaId(this.videoAdUnit),this._config.ccpa.userOptedOut||this._enrichBidsWithJwTargeting(),await this._doubleRequestVideoBids(),this._makeGamCall())}_handleVideoElementEnded(){var e;this._isVideoEnded=!0,this._videoStarted=!1,null==(e=this._advancePlaylist)||e.reset(),this._videoPlayerControls.toggleProgressBar(!1),this._toggleTitle(!1),this._loadingSpinner.show(),this._adsDisabled?this._continuePlayingNextContent():(this._programmaticPauseVideo({pauseContent:!0,logEvent:!1}),this._adFetched?(this._toggleAdContainer(!0),this.imaManager.adReady.emit()):this._continuePlayingNextContent())}_handleResizeAd(){this.imaManager.resize()}_addWinningBidDetails(){const e=this._prerollAdUrl,t=e&&this._getCustParamsFromQueryString(e),{hb_adid:i,hb_adomain:s,hb_bidder:n,amznp:r,hb_pb:a,amznbid:o,hb_deal:l}=t||{};this._winningBidDetails={hb_adid:`${i}`,adomain:`${s}`,hb_bidder:`${n}`,amznp:`${r}`,hb_pb:`${a}`,amznbid:`${o}`,hb_deal:`${l}`}}_checkRenderedAdDetails(e=!1){const t=this._prebidAuctionManager,i=this._adDetails;if(!t||!i||this._bidMarkedOnCurrentAd)return;const s=i.gamCreativeId,n=i.wrapperSystems;this._markPrebidBidAsUsed(s,t,n,e)}_clearStaleTimers(){this._stalePlayerTimeoutId&&(clearTimeout(this._stalePlayerTimeoutId),this._stalePlayerTimeoutId=null)}_adjustStylesForContentPlayback(){(this._isMobile||this._isTablet)&&this._videoPlayerControls.hideControls(),this._toggleTitle(!0),this._toggleAdContainer(!1),this._loadingSpinner.hide(),this._videoPlayerControls.toggleProgressBar(!0),this._adCountDown.hideAdTimer()}_continuePlayingNextContent(){this._handlingAdError=!1,this._adPlaying=!1,this._hlsManager.setMaxBufferLength(600),this.isFirstPlay||this.setNextVideo();const e=this._shouldStartAdvancePlaylist();this.isFirstPlay=!1,!this._adsDisabled&&this._reInitAttempts<1&&(this._removeInstream(),this.imaManager.reInitIMA(),this._reInitAttempts++),this._resetAdVars(),this._programmaticPlayVideo({logEvent:!1}).then((()=>{var t,i;this._adjustStylesForContentPlayback(),this._logRaptivePlayerEvent("Play");const{adPodDuration:s,adPodSize:n}=this._adPodManager;e&&(null==(t=this._advancePlaylist)||t.start(this._videoElement.duration,s,n)),this._adPodManager.canApplyAdPodExperience()&&this._adPodManager.incrementVideoContentPlayCount(),Rn(1),null==(i=this.imaManager.adsLoader)||i.contentComplete()})).catch((()=>{}))}_enableRemoveRaptivePLayer(){this._tearDownAfterNextAd=!0,this._getPlaylistIdForLogger()}_getAdDetailsFromAd(e){return e&&Object.keys(e).length>0?e[Object.keys(e)[0]]:null}_getCustParamsFromQueryString(e){const t=e&&Ri(e.split("?")[1]),i=t&&t.get("cust_params");return i&&Li(this._getDecodedURI(i))}_getDecodedURI(e){try{return decodeURIComponent(e)}catch(e){return""}}_getErrorLogAdDetails(){return(({wrapperIds:e,wrapperCreativeIds:t,wrapperSystems:i,vastCreativeId:s,mediaFileURL:n,adId:r,adUnitName:a,adomain:o,hb_bidder:l,amznp:d,hb_pb:c,amznbid:h,hb_deal:u})=>({wrapperIds:e,wrapperCreativeIds:t,wrapperSystems:i,vastCreativeId:s,mediaFileURL:n,adId:r,adUnitName:a,adomain:o&&encodeURIComponent(o),hb_bidder:l,amznp:d,hb_pb:c,amznbid:h,hb_deal:u}))(this._adDetails||{})}_getEventInfo(e){const{adId:t,adSystem:i,adWrapperIds:s,mediaurl:n,adWrapperSystems:r,apiFramework:a,duration:o,height:l,title:d,vpaid:c}=e.ad;return{vprenum:this.prerollNum,playerName:this.name,adId:t,adSystem:i,adWrapperIds:s,mediaurl:n,adWrapperSystems:r,apiFramework:a,duration:o,height:l,title:d,vpaid:c}}_getPlayerVersions(){return{imaSDKVersion:this.imaManager.imaSDKVersion}}_markPrebidBidAsUsed(e="",t,i=[],s=!1){const n=e&&t.videoCreativeIdMapping.get(e);let r=!1,a=!1,o=!1;if(i.forEach((e=>{const t=e.toLowerCase();"gdfp"===t&&(a=!0),"prebid.org wrapper"===t?r=!0:"amazon"===t&&(o=!0)})),n){const e=this._adDetails,t=(e&&e.tag&&this._getCustParamsFromQueryString(e.tag)||{})[`hb_adid_${n}`.substring(0,20)];if(t)return this._prebidMethods.markWinningBidAsUsed({adUnitCode:this.name,adId:t,...!s&&{analytics:!0}}),this._bidMarkedOnCurrentAd=!0,s?this._creativeFailureDetection(t):this._logCreativeIdWithPreviousError(t),t}else e?W.event(this._logPrefix,"_markPrebidBidAsUsed",{message:"Creative Id Not Found",gamCreativeId:e}):((r||a&&!o||!i.length)&&(this._bidMarkedOnCurrentAd=!0,this._prebidMethods.markWinningBidAsUsed({adUnitCode:this.name,...!s&&{analytics:!0}})),W.event(this._logPrefix,"_markPrebidBidAsUsed",{message:"Missing Creative Id"}))}_creativeFailureDetection(e){const t=this._prebidMethods.getBidResponsesForAdUnitCode(this.name).bids||[],i=this._config,s=i.video.instreamCreativeFailureThreshold;for(const n of t)if(n.adId===e&&n.creativeId){let e=this._erroredOutCreativeIds.get(n.creativeId.toString())||0;e++,this._erroredOutCreativeIds.set(n.creativeId.toString(),e),e>=s&&i.prebid.blockedCreativeIds.push(n.creativeId);break}}_logCreativeIdWithPreviousError(e){const t=this._prebidMethods.getBidResponsesForAdUnitCode(this.name).bids||[];for(const i of t)if(i.adId===e&&i.creativeId){(this._erroredOutCreativeIds.get(i.creativeId.toString())||0)&&W.event(this._logPrefix,"_logCreativeIdWithPreviousError",{creativeId:i.creativeId});break}}_resetAdVars(){this._bidMarkedOnCurrentAd=!1,this._adDetails=null,this._adFetched=!1,this._adDurationLogged=!1,this._currentAdTime=0,this._currentAdDurationWithBuffer=0,this._clearStaleTimers(),this.imaManager.setAdPlayReady(!1),this.imaManager.setPrematureAdPlay(!1),this._retryAttempts=0,this._auctionManager.reset()}_resetPlayerProperties(){this._adPodManager.reset(),this._adPlaying=!1,this._canTearDown=!1,this._isProgrammaticPause=!0,this._isProgrammaticPlay=!0,this._isVideoEnded=!1,this._playerState=nt,this._tearDownAfterNextAd=!1,this._videoStarted=!1,this._videoPlayerControls.toggleProgressBar(!0)}_setStaleAdDetection(e="adPlay"){const t="adLoaded"===e,i="adStart"===e?0:this._currentAdTime,s=t?this._config.video.staleLoadThreshold:this._currentAdDurationWithBuffer-i,n="RaptivePlayer encountered an unknown error "+(t?"attempting to play the ad":"during ad play");this._stalePlayerTimeoutId||(this._stalePlayerTimeoutId=window.setTimeout((()=>{W.error(this._logPrefix,"stalePlayer",{message:n,...this._getPlayerVersions(),...this._getErrorLogAdDetails()}),-1===this._tearDownPlayerTimeout?(this._enableRemoveRaptivePLayer(),this._tearDownPlayer()):this._continuePlayingNextContent()}),1e3*s))}_startTearDownTimer(){this._didTearDown=!1;const e=this._tearDownPlayerTimeout,t=this._canTearDown;this._getPlaylistIdForLogger(),t&&(this._tearDownTimer=window.setTimeout(this._enableRemoveRaptivePLayer.bind(this),e))}_tearDownPlayer(){var e,t,i,s,n,r;const a=this._getPlaylistIdForLogger(),o=null==(i=this._videoContentObject)||null==(t=i.playlist)||null==(e=t[this._playlistIndex])?void 0:e.mediaid,l={adUnit:null==(s=this._videoAdUnit)?void 0:s.code,playerType:this._playerType,playerId:this._playerId,playlistId:a,mediaId:o,state:this._state,collapseState:null==(n=this.collapseCollection)?void 0:n.playerState,vp:this.prerollNum};W.event(this._logPrefix,"_tearDownPlayer",l),this._tearDownTimer&&clearTimeout(this._tearDownTimer),this._removeInstream(!0),null==(r=this._advancePlaylist)||r.destroy(),this._hlsManager.reset(),this.injectPlayer(),this._hlsManager=this._createHlsManager(),this._setupPlayer(),this.imaManager.reInitIMA(),this._resetAdVars(),this._resetPlayerProperties(),this._handleScroll(),this._didTearDown=!0}_toggleAdContainer(e){const t=this._playerContainer.querySelector(`#adthrive-${this._playerType}-ad-container`);t&&(e?(t.classList.add("adthrive-player-ad-container-loading"),t.classList.remove("raptive-player-ad-container-idle")):(t.classList.remove("adthrive-player-ad-container-loading"),t.classList.add("raptive-player-ad-container-idle")))}_toggleTitle(e){this._config.video.removeVideoTitleWrapper||this._adPlaying||(e?this._videoTitleOverlayContainer.classList.add("active"):this._videoTitleOverlayContainer.classList.remove("active"))}_logRaptivePlayerEvent(e){var t,i,s;const n=this._playerId,r=this._getPlaylistIdForLogger(),a=this._playerType,o=null==(s=this._videoContentObject)||null==(i=s.playlist)||null==(t=i[this._playlistIndex])?void 0:t.mediaid,l=this._mediaIdCount;W.event(this._logPrefix,e,{playerId:n,playlistId:r,mediaId:o,playerType:a,mediaIdCount:l})}_createCollapsibleCollection(){this.collapseCollection={adContainer:this.imaManager.adContainer,closeButton:this._closeButton,collapseMobileSizeType:this._collapseSettings.collapseMobileSizeType,collapseMobileSubType:this._getCollapseMobileSubType(),collapseSubType:st,collapseTimer:{timeCollapsed:0,isRunning:!1},collapseType:this._collapseSettings.collapseType,footerElement:this._config.video.footerSelector?document.querySelector(this._config.video.footerSelector):null,forceMobile:"desktop"!==this._context.device,hasPreviouslyCollapsed:!1,playbackStarted:!1,mobileHeaderSelector:this._collapseSettings.mobileHeaderSelector,playerCollapsed:!1,playerContainer:this._playerContainer,playerPosition:this._playerPosition,playerState:this._playerState,playerType:this._playerType,programmaticPause:this._programmaticPauseVideo.bind(this),programmaticPlay:this._programmaticPlayVideo.bind(this),saveVideoCloseState:this._collapseSettings.saveVideoCloseState,stickyElement:this._stickyElement,title:this._collapseSettings.title,topBackgroundElement:this._topBackgroundElement,showPlayer:this.show.bind(this),hidePlayer:this.hide.bind(this)}}_getCollapseMobileSubType(){var e;return this._mobileStickyPlayerPositionSiteExperiment.enabled&&"control"!==this._mobileStickyPlayerPositionSiteExperiment.result?sc.setMobileLocation(this._mobileStickyPlayerPositionSiteExperiment.result):this._mobileStickyPlayerPositionCoreExperiment.mobileLocation?sc.setMobileLocation(this._mobileStickyPlayerPositionCoreExperiment.mobileLocation):null==(e=this._collapseSettings)?void 0:e.mobileLocation}async _handleScroll(){const e=this._config.gdpr;!e.consentCaptured&&e.enabled&&await this.waitForConsent(),this.collapseCollection&&Zv.handleScroll(this.collapseCollection)}_handleResize(){this.collapseCollection&&Zv.handleResize(this.collapseCollection)}_handlePageVisibilityChange(e){this.collapseCollection&&Zv.handlePageVisibilityChange(e,this.collapseCollection)}_handleTransformForCollapse(){var e,t;if(!(null==(e=this.collapseCollection)?void 0:e.playerCollapsed))return;this._handleSlickHeartBeat();const i=`${0!==this._translateX?`translateX(${this._translateX}px)`:""} ${0!==this._translateY?`translateY(-${this._translateY}px)`:""}`.trim();null==(t=this.collapseCollection)||t.playerContainer.style.setProperty("transform",i,"important")}_handleSlickHeartBeat(){if(this._slickHeartbeatPresent)return;const e="adthrive-collapse-bottom-right"===this._getCollapseMobileSubType();this._slickHeartbeatPresent=!!document.querySelector("slick-heartbeat"),this._slickHeartbeatPresent&&e&&(this._translateX=-60)}_handleFooterHeightChange(e){var t;const i=yi();this._translateY=e-i,(null==(t=this.collapseCollection)?void 0:t.playerCollapsed)&&(Zv.repositionCollapseMobileBottom(this.collapseCollection),this._handleTransformForCollapse())}_displayCloseButton(){this.collapseCollection&&Zv.displayCloseButton(this.collapseCollection)}_linkProvidedByPublisher(e){return!e.startsWith("https://cdn.jwplayer.com")}_handleClose(){if(this.collapseCollection){var e;if(this._collapseSettings.saveVideoCloseState&&Fs.setExpirableInternalLocalStorage("adthrive_video_closed",!0,{expiry:{value:30,unit:"minutes"}}),this._isAdvancePlaylistEnabled)null==(e=this._advancePlaylist)||e.reset();Zv.handleClose(this.collapseCollection,this.prerollNum)}}_handleWidthBreak(e){this.collapseCollection&&Zv.handleWidthBreak(e,this.collapseCollection)}_handleTitleClick(e){var t;(null==(t=this.collapseCollection)?void 0:t.collapseTimer.firstInView)&&W.event(this._logPrefix,"_handleTitleClick",{timeElapsed:Date.now()-this.collapseCollection.collapseTimer.firstInView.valueOf(),link:e.currentTarget.getAttribute("href")})}_handleFooterResponseReceivedEvent(){this.collapseCollection&&this.collapseCollection.playerCollapsed&&Zv.repositionCollapseMobileBottom(this.collapseCollection)}get _isTopCollapse(){return"adthrive-collapse-top-center"===this._getCollapseMobileSubType()}_createTopCenterBackground(e){this._topBackgroundElement=this._createPlayerCollapseBackgroundElement(),this._topCenterBackgroundColor=this._config.adOptions.bgColor,this._topCenterBackgroundColor&&(this._topBackgroundElement.style.backgroundColor=this._topCenterBackgroundColor),e.appendChild(this._topBackgroundElement)}_createLinkIcon(e){const t=document.createElementNS("http://www.w3.org/2000/svg","svg");t.setAttribute("width","24"),t.setAttribute("height","24"),t.setAttribute("style","vertical-align:top;margin-right:10px");const i=document.createElementNS("http://www.w3.org/2000/svg","path");return i.setAttribute("d","M 16 1 H 23 V 8 Z M 19.5 12.5 V 23 H 1 V 4.5 H 12 l 1 1 H 2 V 22 H 18.5 V 11.5 l 1 1 v 1 M 19 4 L 11.5 11.5 l 1 1 L 20 5"),i.setAttribute("stroke","white"),i.setAttribute("stroke-width","2"),i.setAttribute("stroke-linejoin","round"),t.appendChild(i),t.id=`${e}-svg-link`,t}_addTopCenterWrapper(){this._playerContainer.appendChild(this._createPlayerWrapper()),this._playerContainer.appendChild(this._createTopCollapseWrapper()),this._playerContainer.classList.add("adthrive-player-with-wrapper-text")}_addPlayerWithoutWrapper(){this._playerContainer.appendChild(this._createPlayerWrapper()),this._playerContainer.classList.add("adthrive-player-without-wrapper-text")}_createPlayerWrapper(){const e=this._videoTitleOverlayContainer;return this._videoTitleElement=document.createElement("span"),this._videoTitleElement.classList.add("adthrive-video-text-cutoff","adthrive-video-title"),e.classList.add("adthrive-wrapper-bar"),e}_createLearnMoreLink(e,t){const i=document.createElement("a"),s=["raptive-player-learn-more-link","adthrive-learn-more-link",...t?["raptive-player-learn-more-link-active"]:[]];return i.classList.add(...s),i.innerText="Tap here to learn more.",i.id=`${e}-learn-more-link`,i.style.color="#FFFFFF"===this._topCenterBackgroundColor?"black":"white",i}_createTopCollapseWrapper(){const e=this._isAutoInjectedPlayer(),t=document.createElement("div");t.className="adthrive-top-collapse-wrapper-bar",this._closeButton=this._createPlayerCloseButton();const i=document.createElement("div");i.className="adthrive-top-collapse-close-spacer",i.appendChild(this._closeButton),t.appendChild(i),this._wrapperText=document.createElement("a");const s=this._linkProvidedByPublisher(this._videoLink);s&&e&&(this._wrapperText.href=this._videoLink),this._topCollapseVideoTitleElement=document.createElement("span"),this._topCollapseVideoTitleElement.classList.add("adthrive-top-collapse-wrapper-video-title");const n=this._config.adOptions.secColor;if(n&&(this._topCollapseVideoTitleElement.style.color=n,this._topCollapseVideoTitleElement.innerHTML=this._videoTitle),this._wrapperText.appendChild(this._topCollapseVideoTitleElement),e){const e=this._createLearnMoreLink(this._playlistId,s);this._wrapperText.appendChild(e),this._wrapperText.onclick=this._handleTitleClick.bind(this)}return t.appendChild(this._wrapperText),t}_isMobileTopCenterCollapse(){var e;return(null==(e=this._collapseSettings)?void 0:e.collapseType)===tt.Mobile&&this._isTopCollapse}_createPlayerCloseButton(){var e;const t=this._wrapperTitleWrapperElement||this._videoTitleElement;return this._closeButton=this._videoCloseButtonComponent.createPlayerCloseButton(this._handleClose.bind(this),"instream","adthrive-collapse-close",!!t,this._isMobileTopCenterCollapse()?"top-center":null==(e=this._collapseSettings)?void 0:e.collapseType),this._closeButton}_createPlayerCollapseBackgroundElement(){const e=document.createElement("div");return e.classList.add("adthrive-collapse-mobile-background"),e.style.width=`${window.innerWidth}px`,e.style.display="inline",e.style.height="0",e}setAmznBids(e){this._auctionManager.setAmznBids(e)}setPrebidBids(e){this._auctionManager.setPrebidBids(e)}get amzName(){return this._auctionManager.amznAdUnitName}getMinMaxDurationsForGAM(){if(this._auctionManager.enabled)return this._auctionManager.hasFallenBack||this._retryAttempts>0?void 0:{min_ad_duration:1e3,max_ad_duration:15e3}}set lastAuctionBidDetails(e){this._lastAuctionBidDetails=e}get lastAuctionBidDetails(){return this._lastAuctionBidDetails}get captionLanguage(){return this._videoPlayerControls.captionLanguage}constructor(e,t,i=1,s,n,r,a,o,l,d,c,h,u,p,g,m,_,f,v,y,b){super(t,s,n,r,a,o,d,c,e,f,b),this._id=e,this._mediaIdCount=i,this._mediaOrPlaylistId=s,this._context=l,this.name=h,this._isCollapsible=u,this._prebidMethods=p,this._auctionManagers=g,this._prebidEventBus=m,this._videoEventBus=_,this._playerNumber=f,this._collapseSettings=v,this._playlistPlayerMediaId=y,this.type="RaptivePlayer",this.collapseCollection=null,this._logPrefix="RaptivePlayer",this._winningBidDetails=null,this._adDurationLogged=!1,this._adFetched=!1,this._adKickoffCompletePromise=new Pk,this._adsDisabled=!1,this._adDetails=null,this._adPlaying=!1,this._bidMarkedOnCurrentAd=!1,this._canTearDown=!1,this._didTearDown=!1,this._contentSpecificPlaylistId=null,this._currentAdDurationWithBuffer=0,this._currentAdTime=0,this._defaultAdDuration=30,this._eventsToSkipLogging=["volume"],this._isAdvancePlaylistEnabled=!1,this._isProgrammaticPause=!0,this._isProgrammaticPlay=!0,this._isVideoEnded=!1,this._playerState=nt,this._playlistIndex=0,this._prerollAdUrl="",this._reInitAttempts=0,this._spaListeners=[],this._state=nt,this._stalePlayerTimeoutId=null,this._tearDownAfterNextAd=!1,this._tearDownPlayerTimeout=0,this._tearDownTimer=null,this._topBackgroundElement=null,this._transactionId="",this._userIdTargetingData=[],this._videoLink="",this._videoStarted=!1,this._videoTitle="",this._wasSeeking=!1,this._retryAttempts=0,this._playlistMaxRetries=4,this._relatedPlayerMaxRetries=2,this._erroredOutCreativeIds=new Map,this._topCenterBackgroundColor="black",this._handlingAdError=!1,this._slickHeartbeatPresent=!1,this._translateX=0,this._translateY=0,this._metadata=null,this._isMetadataEnabled=!1,this._isMax30SecPodFeatureEnabled=!1,this._eligibleFloorComponents=[],this._appliedFloorComponents=[],this._makeGamCall=async()=>{await this._videoEventBus.auctionsCompleted.legacyEmit([this]),this._prerollAdUrl=await this._getPrerollAdUrl(),this.imaManager.requestAd({adTagUrl:this._prerollAdUrl}),this._adPodManager.setAdPlayMap(this.prerollNum,!0)},this._isRelatedPlayer()&&this._config.video.setupAdvanceRelatedExperiment(!1),this._disableAdsEventBus=R.resolve(Kn),this._isMetadataEnabled=!Ur.isRolloutEnabled("disableJwpSeo"),this._isMax30SecPodFeatureEnabled=Ur.isRolloutEnabled("video-ad-max-30-pod"),this._stalePlayerBufferTimeExperiment=R.resolve(hd),this._stalePlayerTimeoutBuffer=Si(this._stalePlayerBufferTimeExperiment.result,10),this._raptiveInstreamRerequestOnErrorResult=R.resolve(rd).result,this._maxRetries=this._isAutoInjectedPlayer()?this._playlistMaxRetries:this._relatedPlayerMaxRetries,this._userIdComponent=R.resolve(Cp),this._sspUserSyncComponent=R.resolve(Af),this._videoCloseButtonComponent=R.resolve(Kv),this._mobileStickyPlayerPositionSiteExperiment=R.resolve(Jl),this._mobileStickyPlayerPositionCoreExperiment=R.resolve(Ql),this._jwBoostExperiment=R.resolve(Ul),this._prebidAuctionManager=this._auctionManagers.getPrebidAuctionManager(),this._adCountDown=R.resolve(rb),this._adDurationControlExperiment=R.resolve(Dl),this._auctionManager=new Jy(h,p,o,this._isCollapsible),this._hlsManager=this._createHlsManager(),this._onBeforeRequestBids(),this._setupPlayer(),this._setupListeners(),this._loadingSpinner=new nb(this._playerContainer);let S=1;o.adOptions.optimizeVideoPlayersForEarnings&&(S=this._isMax30SecPodFeatureEnabled?Lk.MAX_ADS_IN_30SEC_POD:Lk.DEFAULT_MAX_NUMBER_OF_ADS_IN_POD),this._adPodManager=new Qy({optimizeVideoPlayersForEarnings:o.adOptions.optimizeVideoPlayersForEarnings,isCollapsible:this._isCollapsible,maxAdsInPod:S,adPodAuctionCutoffSeconds:this._isMax30SecPodFeatureEnabled?16:46,isMax30SecPodFeatureEnabled:this._isMax30SecPodFeatureEnabled}),this.ready.on((()=>this._handlePlayerReady()))}}Lk.DEFAULT_MAX_NUMBER_OF_ADS_IN_POD=4,Lk.MAX_ADS_IN_30SEC_POD=2;class Dk{_addAPStagSlotBidResponse(e,t,i){this._apstagSlotBids.set(e,{bid:t,discounts:i})}_addPrebidSlotTargeting(e,t){this._prebidSlotTargetingMap.set(e,t)}getVideoTargeting(e,t){const i="imav",s=this._irisTvTracker.enabled?this._irisTvTracker.irisContextualData:void 0,n={},r="rvadv_ab1";if(Object.keys(t).forEach((e=>{const i=t[e],s=this._abgroup.get(r);"abgroup"===e&&s&&i.push(`${r}:${s}`),n[e]=encodeURIComponent(i.toString())})),n.mcmp=this._getMcmpValues(),n.vprenum=String(e.prerollNum),xu(e)?(n.jwv=e.jwVersion||"",n[i]=e.imaVersion||""):n[i]=e.imaManager.imaSDKVersion||"",n.voba=this._config.videoOpenBidding.bidders.toString(),s){n["iris_context"]=s.toString()}return n}_getMcmpValues(){const e=this._getTrackScrollTargeting(),t=[...this._config.marmalade.mcmpTargeting];return e&&t.push(...e),t.toString()}_getTrackScrollTargeting(){const e=this._config.trackScroll;return e.trackScrollEnabled&&e.getTargetingValue()}_getVideoBid(e){const t=this._apstagSlotBids.get(e),i=null==t?void 0:t.bid,s=null==t?void 0:t.discounts;return i?(this._apstagSlotBids.delete(e),{bid:i,discounts:s}):{}}getPrebidNoBidTargeting(e){const t=this.getPrebidSlotTargeting(e).noBid;if(t)return{hb_bidder:t}}getPrebidSlotTargeting(e){return this._prebidSlotTargetingMap.get(e)||{}}_convertFlagSlotValues(e){const t=[];return Object.keys(e).forEach((i=>{const s=e[i];"string"==typeof s?t.push(`${i}%3A${s}`):Array.isArray(s)&&s.length>0&&t.push(s.map((e=>`${i}%3A${e}`)).join(","))})),t.join(",")}_addAmazonDiscountTargeting(e,t){const{standard:i,pmp:s}=e,n=(e,i)=>{this._config.video.setVideoFlagSlot(t,{[e]:[i.toFixed(6).toString()]})};i.originalCpm&&n("aop",i.originalCpm),i.discount&&n("apd",i.discount),s.originalCpm&&n("aopp",s.originalCpm),s.discount&&n("appd",s.discount)}_removeSpecificAmazonTargetingKey(e){this._amazonTargetingKeysToRemove.forEach((t=>{delete e[t]}))}_getAmazonBidTargeting(e,t){const{bid:i,discounts:s}=this._getVideoBid(e);if(i){let e={};for(const t in i)if("targeting"===t)e={...e,...i[t]};else if(this._config.amazon.amznTargetingKeys.includes(t)){const s=i[t];e[t]=s}return this._removeSpecificAmazonTargetingKey(e),s&&this._addAmazonDiscountTargeting(s,t),e}return{}}_setPrebidDiscountTargeting(e){const{cpm:t,responseCpm:i}=this._prebidMethods.getHighestCpmBids(e)[0]||{},s=(i||0)-(t||0);i&&s&&this._config.video.setVideoFlagSlot(e,{pbop:[t.toFixed(6).toString()],pbpd:[s.toFixed(6).toString()]})}_getFloorsTargeting(e){const t=this._config.video.videoFlagSlot[e]||{};return t&&this._config.video.clearVideoFlagSlot(e),t}_getTopCPMValue(e,t){return Number.isFinite(t)&&(!Number.isFinite(e)||t>e)?t:e}_getCPMRange(e,t){var i;const s=null==e||null==(i=e.adserverTargeting)?void 0:i.hb_pb,n=Number(s),r=null==t?void 0:t.amz_pb,a=Number(r),o=null==t?void 0:t.amz_pb_sp,l=Number(o),d=r&&o?Math.max(a,l):a||l,c=this._getTopCPMValue(n,d);return xf(c)}_getCustParams(e,t=!0){const i=this._gam.getTargetingMap(),s=this._getAmazonBidTargeting(e._playlistId,e.name),n=t&&this._getActiveBidsInPool(e),r=e.lastAuctionBidDetails,a=null!=r?r:{bic:"0",tbc:"none","2bc":"none",medb:"none",bidr:"0"},o=n?n[0]:void 0,l=this._getCPMRange(o,s);var d,c;const h={...(e.isPlayerType===wm||e.isPlayerType===Em)&&{plid:e._playlistId},...e instanceof Lk?{jwpid:null!=(d=e._playerId)?d:""}:{},jwmid:e.nextMediaId||e.mediaOrPlaylistId,...this._getFloorsTargeting(e.name),tid:"transactionId"in e?e.transactionId:"",iroe:"retryAttempts"in e?e.retryAttempts.toString():"0",player:xu(e)?"j":"r",...e instanceof Lk?{cclang:null!=(c=e.captionLanguage)?c:""}:{},fle:e.eligibleFloorComponents,fla:e.appliedFloorComponents,...a};return{...h&&{flag_slot:this._convertFlagSlotValues(h)},...this.getVideoTargeting(e,i),...this.getPrebidNoBidTargeting(e.name),...s,idp:e.userIdTargetingData.join(","),...l&&{hb_rpb:l}}}_getActiveBidsInPool(e){const t=(this._prebidMethods.getBidResponsesForAdUnitCode(e.name)||{}).bids,i=e.getMinMaxDurationsForGAM();return t&&t.filter((e=>{const t=e.ttl||300,s=e.responseTimestamp+1e3*t>(new Date).getTime(),n=e&&"rendered"!==e.status;let r=!0;return i&&e.maxDuration&&(r=e.maxDuration===i.max_ad_duration/1e3),s&&n&&r})).sort(((e,t)=>t.cpm-e.cpm))}handleGdprConsent(){const e={gdpr:1,gdpr_consent:"tcunavailable"},t=!!this._config.gdpr.consentCapturedData.consentString,i=!!this._config.gdpr.consentCapturedData.additionalConsent,s="function"==typeof window.__tcfapi;return t&&(e.gdpr_consent=this._config.gdpr.consentCapturedData.consentString),i&&(e.addtl_consent=this._config.gdpr.consentCapturedData.additionalConsent),!t&&s&&window.__tcfapi("getTCData",2,(t=>{const i=!(!t||!t.tcString),s=!(!t||!t.addtlConsent);i&&(e.gdpr_consent=t.tcString),s&&(e.addtl_consent=t.addtlConsent)})),e}getConsentParams(){return this._config.gdpr.enabled?this.handleGdprConsent():this._config.ccpa.privacyString?{us_privacy:this._config.ccpa.privacyString}:void 0}getDefaultVideoUrlParams(e){var t;const i=window.location.origin,s=e.getMinMaxDurationsForGAM();return{iu:`/${this._config.gam.account}/${this._config.gam.prefix}_${e.name}/${this._config.site.id}`,sz:e.size.join("x"),hl:"en",output:"vast",url:"__page-url__",vad_type:"linear",description_url:`${encodeURIComponent(encodeURIComponent(i))}`,pp:"10_VAST%20redirects_video%2Fmp4_VPAID%20JavaScript",vpos:"preroll",vpmute:this._getVpmute(e.name),wta:1,tfcd:Js()||en()?1:0,...(null==(t=this._config.video.plcmtUnits)?void 0:t.get(e.name))&&{plcmt:this._config.video.plcmtUnits.get(e.name)},...s}}buildGAMVideoUrl(e){const t=this.getConsentParams(),i=sc.createQueryString(this._getCustParams(e,!1)),s=sc.createEncodedQueryString({cust_params:i}),n={env:"vp",gdfp_req:"1",unviewed_position_start:"1",...this.getDefaultVideoUrlParams(e),...t};return`https://securepubads.g.doubleclick.net/gampad/ads?${sc.createQueryString(n)}&${s}`}buildGAMVideoUrlPrebid(e){const t=e.videoAdUnit||{};this._setPrebidDiscountTargeting(e.name);const i=this._getCustParams(e),s=this.getDefaultVideoUrlParams(e);return window.pbjs.adServers.dfp.buildVideoUrl({adUnit:t,params:{...s,cust_params:i}})}buildVideoUrl(e){return this.shouldPrebidRun?this.buildGAMVideoUrlPrebid(e):this.buildGAMVideoUrl(e)}_getVpmute(e){return e===et.Video_In_Post_ClicktoPlay_SoundOn?0:1}constructor(e,t,i,s,n,r,a){this._abgroup=e,this._config=t,this._gam=i,this._irisTvTracker=s,this._videoEventBus=n,this._slotEventBus=r,this._prebidMethods=a,this._apstagSlotBids=new Map,this._prebidSlotTargetingMap=new Map,this._amazonTargetingKeysToRemove=["amznp","amznp_sp"],this.shouldPrebidRun=!1,this._videoEventBus.addAPStagSlotBidResponse.on((({playlistId:e,bid:t,discounts:i})=>this._addAPStagSlotBidResponse(e,t,i))),this._slotEventBus.addPrebidSlotTargeting.on((({adUnitCode:e,slotTargeting:t})=>this._addPrebidSlotTargeting(e,t)))}}Dk=B([bn("VideoUrlBuilder"),M(),j("design:type",Function),j("design:paramtypes",[void 0===pr?Object:pr,void 0===_c?Object:_c,void 0===wc?Object:wc,void 0===Dc?Object:Dc,void 0===rr?Object:rr,void 0===Bn?Object:Bn,void 0===Mn?Object:Mn])],Dk);const Mk=()=>{var e,t,i;return(e="generator",(null!=(i=null==(t=document.querySelector(`meta[name=${e}]`))?void 0:t.content)?i:null)||"").includes("Wix")||!!window.wixPerformanceMeasurements||!!window["wix-perf-measure"]||!!window.wixDevelopersAnalytics},Bk=(e=>{let t=!1;return async()=>{if(!t){try{await Ln(e)}catch(e){}t=!0}}})({condition:()=>!1,delay:500,maxAttempts:8});class Fk extends tb{setup(){this._isCollapsible&&(this._playerConfig.playlist=sc.addMaxResolutionQueryParam(this._playerConfig.playlist),this._playlistFixExperiment&&this._createCollapsibleCollection(this._playerData),this.collapseCollection.closeButton=this._closeButton),this._isFirstPlay&&this._appendPlayer(),this.playerInstance=window.jwplayer(this._playlistId),this.collapseCollection&&(this.collapseCollection.playerInstance=this.playerInstance,this.collapseCollection.playerContainer=this._playerContainer,this.collapseCollection.playerElement=this._playerElement,this.collapseCollection.topBackgroundElement=this._topBackgroundElement),this._jwSetup(this._playerConfig),this._config.video.playlistPlayerAdded=!0}_appendPlayer(){const e=document.createElement("div");this._playerContainer.classList.add("adthrive-player-container"),this._playerContainer.classList.add("adthrive-collapse-player"),this._playerContainer.id="adthrive-collapse-container",this._playerElement.className="adthrive-player-position",this._playerElement.id="adthrive-collapse-position",e.id=this._playlistId;const t=this._getTitle();if(t){const e=document.createElement("h3");e.innerText=t,e.className="adthrive-player-title",e.id="adthrive-collapse-title",this._playerElement.appendChild(e)}this._config.video.removeVideoTitleWrapper?(this._playerElement.appendChild(this._createPlayerCloseButton()),this._playerElement.classList.add("adthrive-player-without-wrapper-text")):this._collapseType===tt.Mobile&&this._isTopCollapse?(this._playerElement.appendChild(this._createPlayerWrapper(!0)),this._playerElement.appendChild(this._createTopCollapseWrapper()),this._playerElement.classList.add("adthrive-player-with-wrapper-text")):(this._playerElement.appendChild(this._createPlayerWrapper(!0)),this._playerElement.classList.add("adthrive-player-without-wrapper-text")),this.collapseCollection.closeButton=this._closeButton,this._playerElement.appendChild(e),this.isTopCenterCollapse()&&this._createTopCenterBackground(this._playerContainer),this._playerContainer.appendChild(this._playerElement),this._clsPlayerContainer||this._pageElement.insertAdjacentElement(this._sharedVideoSettings.position,this._playerContainer)}_linkProvidedByPublisher(e){return!e.startsWith("https://cdn.jwplayer.com")}_playerReady(e){var t;super._playerReady(e),null==(t=this._playerElement.querySelector(".adthrive-wrapper-bar"))||t.style.setProperty("display","flex");if(this._getShuffle()||this._hasContentSpecificPlaylist&&this._shuffleContentSpecificPlaylist){const e=this.playerInstance.getPlaylist();this.playerInstance.load(sc.shufflePlaylist(e))}this._config.video.advancePlaylist.playlistPlayer.enabled&&(this.playerInstance.on("firstFrame",(()=>this._handleFirstFrame())),this.playerInstance.getContainer().addEventListener("click",(e=>this._handleVideoPlayerClicked(e))),this._initSkipContainer()),this._handleResize(),this._playlistFixExperiment&&this._handleScroll().catch((()=>!1)),e.viewable&&this._inViewPlayAd()}_getShuffle(){return!!this._shuffle&&this._shuffle}_getTitle(){return this._title?this._title:""}_checkVideoClose(){return this._saveVideoCloseState&&this._config.video.videoWasClosed}constructor(e,t,i,s,n,r,a,o,l,d=tt.Float,c,h,u,p,g,m,_,f,v,y,b){super(e,1,t,i,s,r,a,o,l,d,c,h,u,p,wm,!0,g,m,v,_),this._sharedVideoSettings=n,this._title=y,this._shuffle=b,this._topBackgroundElement=null,this._isCollapsible=!0,this._playerData=null,this._playerConfig={repeat:!0,playlist:`https://cdn.jwplayer.com/v2/playlists/${this._playlistId}`,related:{autoplaytimer:0}},this._shuffleContentSpecificPlaylist=!1,this._clsPlayerContainer=document.querySelector(`#cls-video-container-${this.playerContainerId} > div`)||document.querySelector(`#cls-video-container-${this.playerContainerId.split("_")[0]} > div`),this._playerContainer=this._clsPlayerContainer?this._clsPlayerContainer:document.createElement("div"),this._playerElement=document.createElement("div");const S=this._config.video.jwPlaylistObj;this._hasContentSpecificPlaylist=S.hasContentSpecificPlaylist,this._shuffleContentSpecificPlaylist=S.contentSpecificPlaylistshuffle,S&&S.playlistId&&(this._playlistId=S.playlistId,this._playerConfig.playlist=`https://cdn.jwplayer.com/v2/playlists/${this._playlistId}`),this._playerConfig={...this._playerConfig,...this._autoplayBehaviorConfig},this.initialAuctionPlayer=!0,this._stickyElement=null,this._checkVideoClose()&&(this._state=ht),this._config.video.footerSelector?this._footerElement=document.querySelector(this._config.video.footerSelector):this._footerElement=null,this._playerData={playerElement:this._playerElement,playerContainer:this._playerContainer,footerElement:this._footerElement,stickyElement:this._stickyElement,mobileHeaderSelector:f||null},this._playlistFixExperiment=R.resolve(id).result,this._playlistFixExperiment||this._createCollapsibleCollection(this._playerData)}}Fk=B([bn("PlaylistPlayer"),j("design:type",Function),j("design:paramtypes",[String,String,et,Array,"undefined"==typeof SharedVideoSettings?Object:SharedVideoSettings,"undefined"==typeof HTMLElement?Object:HTMLElement,void 0===Yg?Object:Yg,void 0===_c?Object:_c,void 0===Fr?Object:Fr,tt,it,void 0===Jn?Object:Jn,void 0===Mn?Object:Mn,void 0===Of?Object:Of,Boolean,"undefined"==typeof VideoCollapseScrollUpTopCenterExperimentVariant?Object:VideoCollapseScrollUpTopCenterExperimentVariant,"undefined"==typeof CollapseMobileSubType?Object:CollapseMobileSubType,Object,Boolean,String,Boolean])],Fk);class jk extends Lk{_setNextVideoTitle(){if(!this._config.video.removeVideoTitleWrapper&&!this.isFirstPlay){const e=this._getVideoUsingIndex(this._getNextIndex());e&&this._setVideoTitle(e)}}_handleAdvancePlaylistAdvanceToAd(){this._setNextVideoTitle(),super._handleAdvancePlaylistAdvanceToAd()}_handleAdvancePlaylistAdvanceToContent(){this._setNextVideoTitle(),super._handleAdvancePlaylistAdvanceToContent()}_handleVideoElementEnded(){this._setNextVideoTitle(),super._handleVideoElementEnded()}_updateWrapperTextForRelatedPlayer(e){if(!this._wrapperText)return;this._wrapperText.href=e.link;const t=this._linkProvidedByPublisher(e.link);if(!this._wrapperText.querySelector(".raptive-player-learn-more-link")){const e=this._createLearnMoreLink(this._playlistId,t);this._wrapperText.appendChild(e)}const i=this._playerPosition.querySelector(".adthrive-top-collapse-wrapper-bar");null==i||i.appendChild(this._wrapperText)}_isNonInitialRelatedVideo(){return 0!==this._getNextIndex()}_updateTopCollapseTitle(e){this._topCollapseVideoTitleElement&&(this._topCollapseVideoTitleElement.innerHTML=e)}_setWrapperTitleAttributes(e){this._wrapperTitleWrapperElement&&(this._wrapperTitleWrapperElement.href=e,this._wrapperTitleWrapperElement.target="_blank",this._wrapperTitleWrapperElement.onclick=this._handleTitleClick.bind(this))}_updateWrapperTitleWrapper(e,t){var i;if(this._wrapperTitleWrapperElement)if(null==(i=this._wrapperTitleWrapperElement.querySelector("svg"))||i.remove(),e){const e=this._createLinkIcon(this._playlistId);this._wrapperTitleWrapperElement.appendChild(e),this._isNonInitialRelatedVideo()&&(this._setWrapperTitleAttributes(t),this._videoTitleOverlayContainer.prepend(this._wrapperTitleWrapperElement),this._wrapperTitleWrapperElement.classList.remove("adthrive-no-pointer-events"))}else this._wrapperTitleWrapperElement.classList.add("adthrive-no-pointer-events")}_setVideoTitle(e){this._isNonInitialRelatedVideo()&&this._updateWrapperTextForRelatedPlayer(e);1===this._getNextIndex()&&this.createTitleOverlayContainer(!0);const{title:t,link:i}=e;this._videoTitle=t,this._videoLink=i,this._updateTopCollapseTitle(t),this._videoTitleDiv.innerHTML=`${t}`,this._videoDescriptionDiv.innerHTML=`${e.description}`;const s=this._linkProvidedByPublisher(this._videoLink);this._toggleLearnMoreLink(s),this._updateWrapperTitleWrapper(s,i)}_createTopCollapseWrapper(){if(this._wrapperText){this._linkProvidedByPublisher(this._videoLink)&&this._isNonInitialRelatedVideo()&&(this._wrapperText.href=this._videoLink)}return super._createTopCollapseWrapper()}}class Nk extends sb{async init(){Mk()&&await Bk(),this._setupSpaListeners(),this._handleCollapsibleVideoLogging(),this._initializePlayers(),this._mediaType.runOneStreamExperiment()}setPlayerAsPlaying({playerNumber:e}){this._html5Players.forEach((t=>{t.canPlay=t.playerNumber===e}))}_setupSpaListeners(){this._spaEventBus.routeChanged.on((()=>{this._removeExistingSpaListeners(),this._removePlayers(),this._stickyRelatedOnPage=!1,this._relatedMediaIds=[],this.setPotentialPlayersMap()})),this._spaEventBus.resetCompleted.on((()=>{this._handleCollapsibleVideoLogging(),this._initializePlayers()}))}_removeExistingSpaListeners(){this._spaListeners.forEach((e=>e())),this._spaListeners.length=0}_removePlayers(){this._jwPlayers.forEach((e=>e.playerInstance.remove())),this._jwPlayers.length=0}_initializePlayers(){const e=document.querySelectorAll(this._IN_POST_SELECTOR);if(e.length&&this._initializeRelatedPlayers(e),this._shouldRunAutoplayPlayers()){this._determineAutoplayPlayers(e);try{this._importScripts(),this._initHtml5Players()}catch(e){W.error("VideoManagerComponent","initializePlayers",e)}}else try{this._importScripts(),this._initHtml5Players()}catch(e){W.error("VideoManagerComponent","initializePlayers",e)}}_createStationaryRelatedPlayer(e,t,i){const s="mobile"===this._device?[400,225]:[640,360],n=et.Video_In_Post_ClicktoPlay_SoundOn,r=this._config,a=this._prebidMethods,o=this._prebidEventBus,l=this._context;if(this._desktopRaptivePlayerEnabled||this._mobileRaptivePlayerEnabled){const d=this._html5Players.length+1,c=new Lk(e.id.toString(),e.playerId,i||1,e.mediaOrPlaylistId,Cm,t,s,r,l,this._eventProxy,!1,n,!1,a,this._auctionManagers,o,this._videoEventBus,d,this._shouldUseHardcodedAdPodDuration);this._html5Players.push(c)}else{const r=new ib(e.playerId,i||1,e.mediaOrPlaylistId,n,s,t,this._eventProxy,this._config,l,false,tt.Mobile,it.Medium,o,a,this._auctionManagers,this._desktopCollapseOnScrollUp,this._mobileCollapseOnScrollUp);this._jwPlayers.push(r)}}_createStickyRelatedPlayer(e,t){const i="mobile"===this._device?[400,225]:[640,360],s=et.Video_Individual_Autoplay_SOff,n=this._getCollapseType();this._collapsibleVideoLoggingStore.playerName=s,this._stickyRelatedOnPage=!0,this._config.video.mobileStickyPlayerOnPage="mobile"===this._device;const r=this._prebidEventBus,a=this._getCollapseType();if(this._desktopRaptivePlayerEnabled||this._mobileRaptivePlayerEnabled){const n={classNames:[],collapseMobileSizeType:it.Medium,collapseType:a,elementSelector:e.elementSelector,enabled:!0,mobileHeaderSelector:e.mobileHeaderSelector,mobileLocation:e.mobileLocation,pageSelector:e.pageSelector,position:e.position,saveVideoCloseState:e.saveVideoCloseState,skip:e.skip,title:e.title},o=this._html5Players.length+1,l=new jk(e.id.toString(),e.playerId,1,e.mediaId,Am,t,i,this._config,this._context,this._eventProxy,true,s,!0,this._prebidMethods,this._auctionManagers,r,this._videoEventBus,o,n,void 0,this._shouldUseHardcodedAdPodDuration);this._html5Players.push(l)}else{const a=new ib(e.playerId,1,e.mediaId,s,i,t,this._eventProxy,this._config,this._context,true,n,it.Medium,r,this._prebidMethods,this._auctionManagers,this._desktopCollapseOnScrollUp,this._mobileCollapseOnScrollUp,e.mobileLocation,e.mobileHeaderSelector);this._jwPlayers.push(a)}}_createPlaylistPlayer(e,t){const i=e.playerId,s=e.playlistId,n=this._getCollapseType(),r=n===tt.Mobile?[400,225]:[640,360],a=this._config,o=this._context,l="mobile"===this._device?et.Video_Coll_SOff_Smartphone:et.Video_Collapse_Autoplay_SoundOff,d=this._prebidMethods,c=this._prebidEventBus;if(this._desktopRaptivePlayerEnabled||this._mobileRaptivePlayerEnabled){const h=document.querySelector(`#cls-video-container-${s} > div`);t=h||t;const u={classNames:[],collapseMobileSizeType:it.Medium,collapseType:n,elementSelector:e.elementSelector,enabled:!0,mobileHeaderSelector:e.mobileHeaderSelector,mobileLocation:e.mobileLocation,pageSelector:e.pageSelector,position:e.position,saveVideoCloseState:e.saveVideoCloseState,skip:e.skip,title:e.title};this._config.video.mobileStickyPlayerOnPage=!0;const p=this._html5Players.length+1,g=new Lk(e.id.toString(),i,1,s,Em,t,r,a,o,this._eventProxy,true,l,true,d,this._auctionManagers,c,this._videoEventBus,p,u,e.mediaId,this._shouldUseHardcodedAdPodDuration);this._collapsibleVideoLoggingStore.playerName=l,this._html5Players.push(g)}else{const a={classNames:[],enabled:!0,pageSelector:e.pageSelector,elementSelector:e.elementSelector,position:e.position,skip:e.skip},o=new Fk(i,s,l,r,a,t,this._eventProxy,this._config,this._context,n,it.Medium,c,d,this._auctionManagers,this._desktopCollapseOnScrollUp,this._mobileCollapseOnScrollUp,e.mobileLocation,e.mobileHeaderSelector,e.saveVideoCloseState,e.title,e.shuffle);this._collapsibleVideoLoggingStore.playerName=l,this._jwPlayers.push(o)}}_initJwBoost(){this._prebidMethods.setConfig({...this._jwBoostExperiment.result&&this._jwPlayers.length&&{realTimeData:{dataProviders:[{name:"jwplayer",params:{mediaIDs:this._relatedMediaIds}}]}}})}_setPlayerInstance(e){this._resetPlayer(e)}_resetPlayer(e){e.init()}async _initializePlayer(e,t){const i=this._videoRequestManager;e.setDefaults(window.jwplayer.defaults),window.jwplayer.defaults={},await this._bootstrapConfig.bootstrapLoaders[Be.Prebid].then((()=>{this._videoUrlBuilder.shouldPrebidRun=!0})).catch((()=>{})),t&&this._relatedMediaIds[0]&&this._irisTvTracker.enabled&&(await this._irisTvTracker.setContextualData(this._relatedMediaIds[0]),this._ortb2.updateOrtb2WithIris(this._irisTvTracker)),i.addVideoSlots([e]),e.setPlayerInstance=this._setPlayerInstance.bind(this),e.requestVideoBids=async e=>await i.requestVideoBids(e),e.waitForConsent=this.gdprConsentWait.bind(this),wc.pushToQueue((()=>{e.buildVideoUrl=this._videoUrlBuilder.buildVideoUrl.bind(this._videoUrlBuilder),e.init()}))}async gdprConsentWait(){return new Promise((e=>{this._events.consentCaptured.on((t=>{t&&e(!0)}))}))}async _initHtml5Players(){const e=this._videoRequestManager;for(const t of this._html5Players){const i=t.isPlayerType===Cm;await this._bootstrapConfig.bootstrapLoaders[Be.Prebid].then((()=>{this._videoUrlBuilder.shouldPrebidRun=!0})).catch((()=>{})),i&&this._relatedMediaIds[0]&&await this._irisTvTracker.setContextualData(this._relatedMediaIds[0]),e.addVideoSlots([t]),t.requestVideoBids=async t=>await e.requestVideoBids(t),t.waitForConsent=this.gdprConsentWait.bind(this),wc.pushToQueue((()=>{t.buildVideoUrl=this._videoUrlBuilder.buildVideoUrl.bind(this._videoUrlBuilder),t.init()}))}}_importScripts(){this._config.video.preventStickyOutstream=this._disableStickyOutstreamInPresenceOfCollapsiblePlayer(),this._jwPlayers.length&&(this._config.ccpa.userOptedOut||this._initJwBoost(),this._config.video.hasJwPlayer=!0,this._jwPlayers.forEach((e=>{const t=e.isPlayerType===km;t&&this._config.video.setupAdvanceRelatedExperiment(e.collapsible);const i=this._config.video.jwpVersion?`?version_override=${this._config.video.jwpVersion}`:"";Cs(`https://content.jwplatform.com/libraries/${e._playerId}.js${i}`).then((async()=>this._initializePlayer(e,t))).catch((e=>W.error("VideoManagerComponent","importScripts",e)))})))}_hasCollapsiblePlayer(e){return!!e.length&&e.some((e=>e.collapsible))}_disableStickyOutstreamInPresenceOfCollapsiblePlayer(){return!!this._hasCollapsiblePlayer([...this._jwPlayers,...this._html5Players])&&!this._config.video.stickyOutstreamSettings.allowForPageWithStickyPlayer.enabled}_isVideoAllowedOnPage(){return!this._config.disableAds.video||(this._config.disableAds.reasons.has("video_tag")?W.error("VideoManagerComponent","isVideoAllowedOnPage",new Error("DBP: Disabled by publisher via video tag")):this._config.disableAds.reasons.has("video_plugin")?W.error("VideoManagerComponent","isVideoAllowedOnPage",new Error("DBP: Disabled by publisher via video plugin")):this._config.disableAds.reasons.has("video_page")?W.error("VideoManagerComponent","isVideoAllowedOnPage",new Error("DBP: Disabled by publisher via command queue")):W.error("VideoManagerComponent","isVideoAllowedOnPage",new Error("DBP: Disabled by publisher via other")),!1)}_getCollapseType(){return"mobile"===this._device?tt.Mobile:tt.Float}_handleCollapsibleVideoLogging(){this._spaListeners.push(Zv.collapseEvent.on((()=>{this._collapsibleVideoLoggingStore.startedCollapsedTime=fn()})),sy.collapseEvent.on((()=>{this._collapsibleVideoLoggingStore.startedCollapsedTime=fn()}))),this._spaListeners.push(Zv.uncollapseEvent.on((()=>{this._collapsibleVideoLoggingStore.totalTimeCollapsed+=this._collapsibleVideoLoggingStore.startedCollapsedTime?fn()-this._collapsibleVideoLoggingStore.startedCollapsedTime:0,this._collapsibleVideoLoggingStore.startedCollapsedTime=void 0})),sy.uncollapseEvent.on((()=>{this._collapsibleVideoLoggingStore.totalTimeCollapsed+=this._collapsibleVideoLoggingStore.startedCollapsedTime?fn()-this._collapsibleVideoLoggingStore.startedCollapsedTime:0,this._collapsibleVideoLoggingStore.startedCollapsedTime=void 0}))),this._spaListeners.push(Zv.closeEvent.on((()=>{this._collapsibleVideoLoggingStore.wasClosed=!0})),sy.closeEvent.on((()=>{this._collapsibleVideoLoggingStore.wasClosed=!0}))),Zv.startEvent.once((()=>{this._collapsibleVideoLoggingStore.wasStarted=!0})),sy.startEvent.once((()=>{this._collapsibleVideoLoggingStore.wasStarted=!0})),this._spaListeners.push(this._userPageDataLoggingEvent.loggingData.on((()=>{this._collapsibleVideoLoggingStore.startedCollapsedTime&&(this._collapsibleVideoLoggingStore.totalTimeCollapsed+=fn()-this._collapsibleVideoLoggingStore.startedCollapsedTime)})))}constructor(e,t,i,s,n,r,a,o,l,d,c,h,u,p,g,m,_,f,v,y,b,S,E){super(s.video,"VideoManagerComponent",n),this._auctionManagers=e,this._bootstrapConfig=t,this._collapsibleVideoLoggingStore=i,this._config=s,this._context=n,this._eventProxy=r,this._events=a,this._irisTvTracker=o,this._jwBoostExperiment=l,this._mediaType=d,this._ortb2=c,this._prebidEventBus=h,this._prebidMethods=u,this._spaEventBus=p,this._slotManagerEventBus=g,this._videoEventBus=m,this._raptiveDesktopPlayerExperiment=_,this._raptiveMobilePlayerExperiment=f,this._userPageDataLoggingEvent=v,this._videoCollapseScrollUpExperiment=y,this._videoCollapseScrollUpTopCenterExperiment=b,this._videoRequestManager=S,this._videoUrlBuilder=E,this._jwPlayers=[],this._html5Players=[],this._spaListeners=[],this._IN_POST_SELECTOR=".adthrive-video-player",this._desktopCollapseOnScrollUp=!1,this._mobileCollapseOnScrollUp="off",this._desktopRaptivePlayerEnabled=!1,this._mobileRaptivePlayerEnabled=!1,this._shouldUseHardcodedAdPodDuration=!1,this._desktopCollapseOnScrollUp=this._videoCollapseScrollUpExperiment.result,this._mobileCollapseOnScrollUp=this._videoCollapseScrollUpTopCenterExperiment.result||"off";const C=R.resolve(ld).result;this._desktopRaptivePlayerEnabled=C||"mobile"!==this._device&&this._raptiveDesktopPlayerExperiment.result,this._mobileRaptivePlayerEnabled=C||"mobile"===this._device&&this._raptiveMobilePlayerExperiment.result,this._shouldUseHardcodedAdPodDuration=Ur.isRolloutEnabled("max-video-ad-duration"),this._eventProxy.videoPlaying.on(this.setPlayerAsPlaying.bind(this))}}Nk=B([bn("VideoManagerComponent"),D(),j("design:type",Function),j("design:paramtypes",[void 0===Of?Object:Of,void 0===ka?Object:ka,void 0===Lf?Object:Lf,void 0===_c?Object:_c,void 0===Fr?Object:Fr,void 0===Yg?Object:Yg,void 0===Ya?Object:Ya,void 0===Dc?Object:Dc,void 0===Ul?Object:Ul,void 0===Hm?Object:Hm,void 0===Lu?Object:Lu,void 0===Jn?Object:Jn,void 0===Mn?Object:Mn,void 0===ir?Object:ir,void 0===nr?Object:nr,void 0===rr?Object:rr,void 0===nd?Object:nd,void 0===ad?Object:ad,void 0===Yd?Object:Yd,void 0===Ed?Object:Ed,void 0===Sd?Object:Sd,void 0===Lc?Object:Lc,void 0===Dk?Object:Dk])],Nk);var Uk,Vk,zk,Hk,$k,qk=-1,Gk=function(e){addEventListener("pageshow",(function(t){t.persisted&&(qk=t.timeStamp,e(t))}),!0)},Wk=function(){var e=self.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0];if(e&&e.responseStart>0&&e.responseStart=0?s="back-forward-cache":i&&(document.prerendering||Kk()>0?s="prerender":document.wasDiscarded?s="restore":i.type&&(s=i.type.replace(/_/g,"-"))),{name:e,value:void 0===t?-1:t,rating:"good",delta:0,entries:[],id:"v4-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12),navigationType:s}},Xk=function(e,t,i){try{if(PerformanceObserver.supportedEntryTypes.includes(e)){var s=new PerformanceObserver((function(e){Promise.resolve().then((function(){t(e.getEntries())}))}));return s.observe(Object.assign({type:e,buffered:!0},i||{})),s}}catch(e){}},Qk=function(e,t,i,s){var n,r;return function(a){t.value>=0&&(a||s)&&((r=t.value-(n||0))||void 0===n)&&(n=t.value,t.delta=r,t.rating=function(e,t){return e>t[1]?"poor":e>t[0]?"needs-improvement":"good"}(t.value,i),e(t))}},Jk=function(e){requestAnimationFrame((function(){return requestAnimationFrame((function(){return e()}))}))},Zk=function(e){document.addEventListener("visibilitychange",(function(){"hidden"===document.visibilityState&&e()}))},eA=function(e){var t=!1;return function(){t||(e(),t=!0)}},tA=-1,iA=function(){return"hidden"!==document.visibilityState||document.prerendering?1/0:0},sA=function(e){"hidden"===document.visibilityState&&tA>-1&&(tA="visibilitychange"===e.type?e.timeStamp:0,rA())},nA=function(){addEventListener("visibilitychange",sA,!0),addEventListener("prerenderingchange",sA,!0)},rA=function(){removeEventListener("visibilitychange",sA,!0),removeEventListener("prerenderingchange",sA,!0)},aA=function(){return tA<0&&(tA=iA(),nA(),Gk((function(){setTimeout((function(){tA=iA(),nA()}),0)}))),{get firstHiddenTime(){return tA}}},oA=function(e){document.prerendering?addEventListener("prerenderingchange",(function(){return e()}),!0):e()},lA=[1800,3e3],dA=function(e,t){t=t||{},oA((function(){var i,s=aA(),n=Yk("FCP"),r=Xk("paint",(function(e){e.forEach((function(e){"first-contentful-paint"===e.name&&(r.disconnect(),e.startTime(t||100)-1)return i||n;if(i=i?n+">"+i:n,s.id)break;e=s.parentNode}}catch(e){}return i},uA=[.1,.25],pA=0,gA=1/0,mA=0,_A=function(e){e.forEach((function(e){e.interactionId&&(gA=Math.min(gA,e.interactionId),mA=Math.max(mA,e.interactionId),pA=mA?(mA-gA)/7+1:0)}))},fA=function(){return Uk?pA:performance.interactionCount||0},vA=[],yA=new Map,bA=0,SA=[],EA=function(e){if(SA.forEach((function(t){return t(e)})),e.interactionId||"first-input"===e.entryType){var t=vA[vA.length-1],i=yA.get(e.interactionId);if(i||vA.length<10||e.duration>t.latency){if(i)e.duration>i.latency?(i.entries=[e],i.latency=e.duration):e.duration===i.latency&&e.startTime===i.entries[0].startTime&&i.entries.push(e);else{var s={id:e.interactionId,latency:e.duration,entries:[e]};yA.set(s.id,s),vA.push(s)}vA.sort((function(e,t){return t.latency-e.latency})),vA.length>10&&vA.splice(10).forEach((function(e){return yA.delete(e.id)}))}}},CA=function(e){var t=self.requestIdleCallback||self.setTimeout,i=-1;return e=eA(e),"hidden"===document.visibilityState?e():(i=t(e),Zk(e)),i},TA=[200,500],wA=function(e,t){"PerformanceEventTiming"in self&&"interactionId"in PerformanceEventTiming.prototype&&(t=t||{},oA((function(){var i;"interactionCount"in performance||Uk||(Uk=Xk("event",_A,{type:"event",buffered:!0,durationThreshold:0}));var s,n=Yk("INP"),r=function(e){CA((function(){e.forEach(EA);var t=function(){var e=Math.min(vA.length-1,Math.floor((fA()-bA)/50));return vA[e]}();t&&t.latency!==n.value&&(n.value=t.latency,n.entries=t.entries,s())}))},a=Xk("event",r,{durationThreshold:null!==(i=t.durationThreshold)&&void 0!==i?i:40});s=Qk(e,n,TA,t.reportAllChanges),a&&(a.observe({type:"first-input",buffered:!0}),Zk((function(){r(a.takeRecords()),s(!0)})),Gk((function(){bA=fA(),vA.length=0,yA.clear(),n=Yk("INP"),s=Qk(e,n,TA,t.reportAllChanges)})))})))},kA=[2500,4e3],AA={},IA=[800,1800],xA=function e(t){document.prerendering?oA((function(){return e(t)})):"complete"!==document.readyState?addEventListener("load",(function(){return e(t)}),!0):setTimeout(t,0)},PA=function(e,t){t=t||{};var i=Yk("TTFB"),s=Qk(e,i,IA,t.reportAllChanges);xA((function(){var n=Wk();n&&(i.value=Math.max(n.responseStart-Kk(),0),i.entries=[n],s(!0),Gk((function(){i=Yk("TTFB",0),(s=Qk(e,i,IA,t.reportAllChanges))(!0)})))}))},OA={passive:!0,capture:!0},RA=new Date,LA=function(e,t){Vk||(Vk=t,zk=e,Hk=new Date,BA(removeEventListener),DA())},DA=function(){if(zk>=0&&zk1e12?new Date:performance.now())-e.timeStamp;"pointerdown"==e.type?function(e,t){var i=function(){LA(e,t),n()},s=function(){n()},n=function(){removeEventListener("pointerup",i,OA),removeEventListener("pointercancel",s,OA)};addEventListener("pointerup",i,OA),addEventListener("pointercancel",s,OA)}(t,e):LA(t,e)}},BA=function(e){["mousedown","keydown","touchstart","pointerdown"].forEach((function(t){return e(t,MA,OA)}))},FA=[100,300];class jA{handleEvent(e,t,i){W.event("CustomLCPReporter","handleEvent",{...e.toJSON(),lcpValue:t,elementSelector:i})}get enabled(){return this._enabled}constructor(){this._enabled=new zn(.02).get()}}jA=B([bn("CustomLCPReporter"),M(),j("design:type",Function),j("design:paramtypes",[])],jA);class NA{handleEvent(e){W.event("CustomCLSReporter","handleEvent",e)}get enabled(){return this._enabled}constructor(){this._enabled=new zn(.01).get()}}NA=B([bn("CustomCLSReporter"),M(),j("design:type",Function),j("design:paramtypes",[])],NA);class UA extends Fn{init(){Ti().then((()=>{const e=this.addWebVital.bind(this);!function(e,t){t=t||{},oA((function(){var i,s=aA(),n=Yk("FID"),r=function(e){e.startTimen.value&&(n.value=r,n.entries=a,s())},l=Xk("layout-shift",o);l&&(s=Qk(e,n,uA,t.reportAllChanges),Zk((function(){o(l.takeRecords()),s(!0)})),Gk((function(){r=0,n=Yk("CLS",0),s=Qk(e,n,uA,t.reportAllChanges),Jk((function(){return s()}))})),setTimeout(s,0))})))}(e,{reportAllChanges:!0,durationThreshold:0},this._customCLSReporter.enabled?this._customCLSReporter.handleEvent:void 0),function(e,t,i){t=t||{},oA((function(){var s,n=aA(),r=Yk("LCP"),a=function(e){t.reportAllChanges||(e=e.slice(-1)),e.forEach((function(e){e.startTimethis.logWebVitals()),{once:!0})})).catch((()=>!1)),setTimeout((()=>{this.logWebVitals()}),this._maxTimeOnPage)}addWebVital({name:e,delta:t,value:i,id:s}){this._webVitals.push({name:e,delta:t,value:i,id:s})}_getFlagTargeting(){try{return this._googleAdManager.getTargetingValuesForKey("flag")}catch(e){return[]}}logWebVitals(){if(this._webVitalsSent)return;const e=this._getFlagTargeting(),t={webVitals:this._webVitals,DOMSize:document.querySelectorAll("*").length,gptLoad:!0,gptv:googletag&&googletag.getVersion&&googletag.getVersion(),flagTargeting:e};this._webVitalsSent=!0,null==this._visibilityChangeOff||this._visibilityChangeOff.call(this),this._bootstrapConfig.gptLibFailedToLoad&&(t.gptLoad=!1),W.fetchEvent("WebVitalsComponent","logWebVital",t)}get enabled(){return this._bootstrapConfig.webVitalsEnabled}constructor(e,t,i,s){super(),this._bootstrapConfig=e,this._googleAdManager=t,this._customCLSReporter=i,this._customLCPReporter=s,this._maxTimeOnPage=36e5,this._webVitals=[],this._webVitalsSent=!1}}UA=B([bn("WebVitalsComponent"),D(),j("design:type",Function),j("design:paramtypes",[void 0===ka?Object:ka,void 0===wc?Object:wc,void 0===NA?Object:NA,void 0===jA?Object:jA])],UA);class VA extends ${constructor(...e){super(...e),this.stickyContainerContentAdStylingApplied=new z}}VA=B([M()],VA);class zA extends Er{init(){this._key="ParallaxAdLogError",this._lookup="PALE",this._default=!1}}zA=B([bn("ParallaxAdLogErrorExperiment"),M()],zA);class HA extends Fn{get enabled(){return this.parallaxAdsExperiment.result}start(){this._setupListeners()}_setupListeners(){this._stickyContainerAdsEventBus.stickyContainerContentAdStylingApplied.on((()=>{this._stickyContainerAdsApplied=!0}),{handleEventsAlreadyEmitted:!0}),this._videoEventBus.topCenterVideoCollapsed.on((()=>{this._scrollStartPosition=500})),this._videoEventBus.topCenterVideoUnCollapsed.on((()=>{this._scrollStartPosition=300})),this._gamEventBus.slotOnload.on((({slotId:e})=>this._parallaxSetup(e))),this._slotEventBus.adRenderedOutsideGAM.on((({slotId:e})=>this._parallaxSetup(e))),this._slotManagerEventBus.refreshing.on((e=>{this._slotManager.getSlots(e).forEach((e=>{const t=e.element.id;e.location!==Qe.Content||this._slotRebuildComplete.get(t)||this._parallaxSlotMap.get(t)||this._stickyContainerAdsApplied||this._rebuildSlot(e)}))}))}_parallaxSetup(e){const t=this._slotManager.getSlot(e);if(t&&t.location===Qe.Content){const e=t.element;this._stickyContainerAdsApplied&&this._removeParallaxCSS(e),this._removeParallaxScrollEvent(e);if(this._isParallaxAd(e)){W.event("ParallaxComponent","_setupListeners","parallax_rendered",t.element.id,t.refreshCount);const i=e.firstChild?e.firstChild:null;this._parallaxSlotMap.set(e.id,!0),this._setParallaxSlotCSS(e,i),this._parallaxAdOnScroll(e),this._parallaxAdLogErrorExperiment.result&&this._checkParallaxAdVisibilityPercent(e,i)}}}_setParallaxSlotCSS(e,t){e.classList.add("adthrive-parallax-slot"),t&&t.classList.add("adthrive-parallax-ad")}_removeParallaxCSS(e){e.classList.remove("adthrive-parallax-slot");const t=e.firstChild;t&&t.classList.remove("adthrive-parallax-ad")}_removeParallaxScrollEvent(e){const t=this._parallaxScrollEventOffMap.get(e.id);t&&t()}_parallaxAdOnScroll(e){const t=Number(e.getBoundingClientRect().top)+window.pageYOffset,i=()=>{const i=e.firstChild?e.firstChild:void 0,s=this._isParallaxAd(e),n=t205?205:a;i&&s&&(i.style.transform=`translateY(-${o}px)`)};this._parallaxScrollEventOffMap.set(e.id,this._pageManager.scroll.on((()=>i())))}_getScrollStartPosition(e,t){return e?this._slotScrollStartPosition.get(t.id)||this._scrollStartPosition:(this._slotScrollStartPosition.get(t.id)!==this._scrollStartPosition&&this._slotScrollStartPosition.set(t.id,this._scrollStartPosition),this._scrollStartPosition)}_isParallaxAd(e){const t=zf(e);return t>=600&&t<=750}_rebuildSlot(e){e.sizes=e.sizes.filter((e=>e[1]<600)),this._slotManager.rebuild(e),this._slotRebuildComplete.set(e.element.id,!0)}_checkParallaxAdVisibilityPercent(e,t){const i=new IntersectionObserver((s=>{s.forEach((s=>{const n=100*s.intersectionRatio,r=400/zf(e)*100;r-n>2&&this._logParallaxAdError(e,t,"adVisibility",Math.floor(r-n)),i.unobserve(s.target)}))}),{root:e});t&&i.observe(t)}_logParallaxAdError(e,t,i,s){W.error("ParallaxComponent","_logParallaxAdError",`parallax ad error: ${i}, visibility percent lost:`,s,`siteId: ${this._config.site.id}`,`pageUrl: ${window.location.href}`,`containerId: ${e.id}`,`creativeId: ${null==t?void 0:t.id}`)}constructor(e,t,i,s,n,r,a,o,l,d){super(),this.parallaxAdsExperiment=e,this._pageManager=t,this._slotManager=i,this._stickyContainerAdsEventBus=s,this._videoEventBus=n,this._config=r,this._parallaxAdLogErrorExperiment=a,this._gamEventBus=o,this._slotEventBus=l,this._slotManagerEventBus=d,this._parallaxSlotMap=new Map,this._parallaxScrollEventOffMap=new Map,this._slotRebuildComplete=new Map,this._stickyContainerAdsApplied=!1,this._scrollStartPosition=300,this._slotScrollStartPosition=new Map}}HA=B([D(),bn("ParallaxAdsComponent"),j("design:type",Function),j("design:paramtypes",[void 0===Ol?Object:Ol,void 0===Mr?Object:Mr,void 0===Kg?Object:Kg,void 0===VA?Object:VA,void 0===rr?Object:rr,void 0===_c?Object:_c,void 0===zA?Object:zA,void 0===Sc?Object:Sc,void 0===Bn?Object:Bn,void 0===nr?Object:nr])],HA);class $A extends Er{init(){this._key="Uid2TokenCleanup",this._lookup="ROGCU",this._default=!1}run(){return super.run()}}B([kn(),j("design:type",Function),j("design:paramtypes",[]),j("design:returntype",void 0)],$A.prototype,"run",null),$A=B([bn("Uid2TokenCleanupExperiment"),M()],$A);class qA extends Fn{init(){this._config.uid2TokenCleanup.active=!0;try{this._uid2TokenKeys.forEach((e=>{Fs.readExternalLocalStorage(e)&&this._cleanUpToken(e)}))}catch(e){}}_cleanUpToken(e){Fs.deleteLocalStorage(e)}get enabled(){return this._validExistingToken&&this._uid2TokenCleanupExperiment.result}constructor(e,t){if(super(),this._config=e,this._uid2TokenCleanupExperiment=t,this._validExistingToken=!1,this._uid2TokenKeys=["__uid2_advertising_token","__uid2_server_token"],this._config.user.hash&&this._config.user.source){const e=this._config.user.source.includes(ms.VALUES.TD)&&this._config.user.source.endsWith(ms.SUFFIXES.STORAGE),t=/^(?:l_i-l_i|l_i)$/,s=this._config.user.source.match(t),n=null!==s&&s.length>0;var i;this._validExistingToken=null!=(i=e||n)&&i}}}qA=B([bn("Uid2TokenCleanupComponent"),D(),j("design:type",Function),j("design:paramtypes",[void 0===_c?Object:_c,void 0===$A?Object:$A])],qA);class GA extends Er{init(){this._key="HemStorageCleanup",this._lookup="HSCU",this._default=!1}run(){return super.run()}}B([kn(),j("design:type",Function),j("design:paramtypes",[]),j("design:returntype",void 0)],GA.prototype,"run",null),GA=B([bn("HemStorageCleanupExperiment"),M()],GA);class WA extends Fn{init(){const e=Fs.readInternalLocalStorage("adt_ei");this._isStoredHemValid(e)||this._cleanUpStoredValue(e)}get enabled(){return this.experiment.result}_isStoredHemValid(e){var t;const i="object"==typeof e&&"object"==typeof(null==e?void 0:e.sha256Hash);var s;const n="string"==typeof e&&null!=(s=null==(t=e.match(/sha256Hash/g))?void 0:t.length)&&s;return!i&&!n}_cleanUpStoredValue(e){const t=JSON.stringify(e);let i="",s="";const n=/sha256Hash":"(\w+)"/.exec(t),r=/sha1Hash":"(\w+)"/.exec(t);n&&2===n.length&&(i=n[1]),r&&2===r.length&&(s=r[1]);const a={sha256Hash:i,sha1Hash:s};Fs.setInternalLocalStorage("adt_ei",a)}constructor(e){super(),this.experiment=e}}WA=B([bn("HemStorageCleanupComponent"),D(),j("design:type",Function),j("design:paramtypes",[void 0===GA?Object:GA])],WA);class KA extends Fn{get enabled(){const e=Ri().get("rptbt24"),t=this._context.invalidTraffic&&"true"!==e,i="US"===this._context.country||"CA"===this._context.country&&"QC"!==this._context.region||"true"===e;return this._siteHasCloudflareWorker&&!t&&i}async start(){try{const e=Fs.readExternalCookie("_rcid");(!e&&this._isFirstPageview||e&&await this._shouldRefreshCookie(e))&&await this._requestRcid(),await this._logCookie()}catch(e){W.error("RaptiveConnectedIdComponent","start","Error starting Raptive Connected ID component",e)}}async _shouldRefreshCookie(e){let t=e;if("string"==typeof t){t=await Bo(t,this._config.site.id);const e=new Date(t.metadata.capturedOn).getTime(),i=(new Date).getTime();return Math.floor((i-e)/864e5)>340}return!0}async _logCookie(){let e=Fs.readExternalCookie("_rcid");if(!e)return;"string"==typeof e&&(e=await Bo(e,this._config.site.id)),W.event("RaptiveConnectedIdComponent","_logCookie","Raptive Connected ID",e);const t=await this._optableSdkWrapper.cid(e.value.sharedId,3);await this._optableSdkWrapper.identify(t);const i=Gs(e.metadata.clientIp);i&&await this._optableSdkWrapper.identify(i)}async _requestRcid(){W.event("RaptiveConnectedIdComponent","_requestRcid","Requesting Raptive Connected ID");try{const e=await fetch(this._cloudflareWorkerUrl,{credentials:"include"});e.ok||(404===e.status?W.error("RaptiveConnectedIdComponent","_requestRcid",`Handler not found at ${this._cloudflareWorkerUrl}`):W.error("RaptiveConnectedIdComponent","_requestRcid","Error fetching Raptive Connected ID"))}catch(e){W.error("RaptiveConnectedIdComponent","_requestRcid","Error fetching Raptive Connected ID",e)}}constructor(e,t,i){super(),this._config=e,this._context=t,this._optableSdkWrapper=i,this._cloudflareWorkerUrl="",this._isFirstPageview=!1,this._siteHasCloudflareWorker=!1;const s=this._config.site.id,n=window.location.origin;this._cloudflareWorkerUrl=n.replace("https://",`https://${s}.`).replace("www.",""),this._isFirstPageview=this._context.isFirstPageview,this._siteHasCloudflareWorker=null!==this._config.site.deployedCloudflareVersion}}KA=B([bn("RaptiveConnectedIdComponent"),M(),j("design:type",Function),j("design:paramtypes",[void 0===_c?Object:_c,void 0===Fr?Object:Fr,void 0===Ra?Object:Ra])],KA);class YA extends Er{init(){this._key="OptableId5ResolveHems",this._lookup="ROGID5HEM",this._default=!1}}YA=B([bn("OptableExperiment"),M()],YA);class XA extends Er{init(){this._key="OptableId5ResolveRouteTest",this._lookup="OPTID5RRT",this._default=!1}}XA=B([bn("OptableId5ResolveRouteTestExperiment"),M()],XA);const QA={thetradedesk:"adserver.org",appnexus:"adnxs.com",bidswitch:"bidswitch.net",indexexchange:"indexexchange.com",kargo:"kargo.com",pubmatic:"pubmatic.com",magnite:"rubiconproject.com",triplelift:"triplelift.com",yieldmo:"yieldmo.com",unknown:""};class JA extends Fn{get enabled(){var e,t;const i=this._optableConfig.enabled&&(null==(e=this._userIds.get("id5Id"))?void 0:e.enabled)&&(null==(t=this._userIds.get("liveIntentId"))?void 0:t.enabled),s=!this._gpcConfig.gpcEnabled&&!this._ccpaConfig.userOptedOut;return!!i&&!!s}async start(){try{var e,t,i,s,n;if(!this.enabled)return;hi()||(await Ha(),await this._waitForIdentityIframeSync()),await Ha(),await this._waitForOptableWaterfall(),await Ha();let a=await No(),o=null==a||null==(e=a.graph3p)?void 0:e.d;var r;if(null==o||null==(t=o.alternateIds)?void 0:t.length)return void this._setAlternateIdsAsEids(null!=(r=o.alternateIds)?r:[]);const l=await this._waitForId5Id();if(!l)return;await Ha();const d=Fs.readInternalLocalStorage("adt_emsrc"),c=d&&Es(d);if((null==o||null==(i=o.alternateIds)?void 0:i.length)&&c)return;a=await No(),o=null==a||null==(s=a.graph3p)?void 0:s.d;const{hem:h,source:u,alternateIds:p}=await this._resolveIdsWithId5Id(l),g=this._optableId5ResolveHemsExperiment.result&&h&&u,m=(null==p?void 0:p.length)?p:(null==o||null==(n=o.alternateIds)?void 0:n.length)?o.alternateIds:[];if(g){const e=!c;await this._storeIdentifiers(h,u,m,e)}m.length&&this._setAlternateIdsAsEids(m)}catch(e){W.error("OptableID5ResolverComponent","start",e)}}_readId5FromStorage(){const e=Fs.readExternalLocalStorage("pbjs-id5id");if(!e)return null;try{return JSON.parse(decodeURIComponent(e)).universal_uid}catch(e){return W.error("OptableID5ResolverComponent","_readId5IdFromStorage","Error parsing id5 id.",e),null}}async _waitForIdentityIframeSync(){return new Promise((e=>{const t=()=>{this._identityEventBus.iframeDataSynced.off(t),e()};this._identityEventBus.iframeDataSynced.on(t,{handleEventsAlreadyEmitted:!0}),setTimeout((()=>{this._identityEventBus.iframeDataSynced.off(t),e()}),3e3)}))}async _waitForOptableWaterfall(){return new Promise((e=>{const t=()=>{this._identityEventBus.optableWaterfallCompleted.off(t),e()};this._identityEventBus.optableWaterfallCompleted.on(t,{handleEventsAlreadyEmitted:!0}),setTimeout((()=>{this._identityEventBus.optableWaterfallCompleted.off(t),e()}),3e3)}))}async _waitForId5Id(){return new Promise((e=>{let t=0;const i=setInterval((()=>{const s=this._readId5FromStorage();s?(clearInterval(i),e(s)):(t++,t>=3&&(clearInterval(i),e(null)))}),1e3)}))}async _resolveIdsWithId5Id(e){const t=await this._optableSdkWrapper.resolveThirdPartyClusters(`id5:${e}`,this._optableId5ResolveRouteTestExperiment.result),{hem:i,source:s}=((e,t)=>{let i=null,s=null,n=0;for(const r of Object.keys(e.sources)){const a=e.sources[r].clusters;for(const e of a){const a=e.ids.find((e=>e.startsWith(t)));if(!a)continue;const o=e.traits.lastSeen;"number"==typeof o&&o>n&&(n=o,i=a.replace(t,""),s=r)}}return{hem:i,source:s}})(t,"e:");return{hem:i,source:s,alternateIds:this._getAlternateIdsFromGraphResponse(t)}}_getLegacyBridgedHemSource(e){const t={mediawallah:"MW",truedata:"TD"}[e];if(!t)throw new Error(`No legacy mapping found for source: ${e}`);const{PREFIXES:i,VALUES:s,SUFFIXES:n}=ms;return`${i.IDG}${s[t]}-${s.ID5ID}${n.CAPTURE}`}_getAlternateIdsFromGraphResponse(e){var t,i,s,n;return(null!=(n=null==e||null==(s=e.sources)||null==(i=s.id5)||null==(t=i.clusters)?void 0:t.map((e=>{var t,i,s;return{id:(null!=(s=null==(t=e.ids)?void 0:t.find((e=>e.startsWith("id5:"))))?s:"").replace("id5:",""),type:e.traits.cookieType,lastSeen:null==(i=e.traits)?void 0:i.lastSeen}})))?n:[]).reduce(((e,t)=>{const i=e.find((e=>e.type===t.type));return i?t.lastSeen>i.lastSeen&&(e[e.indexOf(i)]=t):e.push(t),e}),[]).map((({id:e,type:t})=>({id:e,type:t})))}_setAlternateIdsAsEids(e){if(!e.length)return;const t=e.reduce(((e,t)=>{const i=QA[t.type],s=e.find((e=>e.source===i));return s?s.uids.push({atype:3,id:t.id}):i&&e.push({source:i,matcher:"id5-sync.com",inserter:"cafemedia.com",mm:5,uids:[{atype:3,id:t.id}]}),e}),[]);this._ortb2.addEidsToOrtb2(t)}async _storeIdentifiers(e,t,i,s){const n=this._getLegacyBridgedHemSource(t),r=is(),a=e,o="externalDCN";if(s)this._emailCaptureHandler.emailCaptured.emit({pii:{sha256Hash:a,source:n,sourceCollectedDate:r,alternateIds:i},identityDataSource:o});else{const e=this._identityDataMigration.createIdentityData({sha256Hash:a},n,r,o,i);await Uo(e,this._siteConfig.id,"false"!==this._context.querystring.get("adt_encrypt"))}}constructor(e,t,i,s,n,r,a,o,l,d,c,h,u){super(),this._context=e,this._siteConfig=t,this._optableConfig=i,this._gpcConfig=s,this._ccpaConfig=n,this._userIds=r,this._optableSdkWrapper=a,this._ortb2=o,this._emailCaptureHandler=l,this._identityDataMigration=d,this._identityEventBus=c,this._optableId5ResolveHemsExperiment=h,this._optableId5ResolveRouteTestExperiment=u}}JA=B([bn("OptableID5ResolverComponent"),D(),j("design:type",Function),j("design:paramtypes",[void 0===Fr?Object:Fr,void 0===ur?Object:ur,void 0===Fa?Object:Fa,void 0===ja?Object:ja,void 0===Na?Object:Na,void 0===dp?Object:dp,void 0===Ra?Object:Ra,void 0===Lu?Object:Lu,void 0===ko?Object:ko,void 0===Ay?Object:Ay,void 0===Qn?Object:Qn,void 0===YA?Object:YA,void 0===XA?Object:XA])],JA);class ZA{constructor(){this.contentAdded=new V}}ZA=B([bn("InfiniteScrollEvents"),M()],ZA);class eI extends Fn{start(){this.detectInfiniteScroll()}detectInfiniteScroll(){this.checkForCustomConfig();const e=new MutationObserver(((e,t)=>{e.filter((({type:e,addedNodes:t})=>"childList"===e&&t.length>0)).reduce(((e,{addedNodes:t})=>[...e,...Array.prototype.slice.call(t)]),[]).filter((e=>e instanceof HTMLElement&&e.clientHeight>this._heightThreshold)).forEach((e=>{e.parentElement&&(t.disconnect(),t.observe(e.parentElement,{childList:!0}),this._infiniteScrollElement&&t.observe(this._infiniteScrollElement,{childList:!0,subtree:!0}));try{this._events.contentAdded.emit(e)}catch(e){W.error("InfiniteScrollDetectionComponent","addMutationObserver","added",e)}}))}));this._infiniteScrollElement?e.observe(this._infiniteScrollElement,{childList:!0,subtree:!0}):Array.prototype.slice.call(document.querySelectorAll("body *")).filter((e=>e instanceof HTMLElement&&e.offsetHeight>this._heightThreshold)).forEach((t=>{e.observe(t,{childList:!0})}))}checkForCustomConfig(){const{heightThreshold:e,selector:t}=this._config.adOptions.infiniteScrollOptions,i=t?document.querySelector(t):null;if(i)this._infiniteScrollElement=i;else{const e=document.querySelector(this._ajaxSelector);e&&(this._config.infiniteScroll.ajaxType=!0,this._infiniteScrollElement=e)}e&&e>0&&(this._heightThreshold=e)}get enabled(){return this._config.adOptions.infiniteScroll&&"MutationObserver"in window}constructor(e,t){super(),this._config=e,this._events=t,this._ajaxSelector="#ajax-load-more",this._heightThreshold=1e3,this._infiniteScrollElement=null}}eI=B([bn("InfiniteScrollDetectionComponent"),D(),j("design:type",Function),j("design:paramtypes",[void 0===_c?Object:_c,void 0===ZA?Object:ZA])],eI);class tI extends rv{getDynamicElementId(){return`${this._config.gam.prefix}_Infinite_${this._count++}`}constructor(e,t,i){super(t,i),this._config=e,this._adInjectionMap=t,this._context=i,this._count=1}}tI=B([bn("InfiniteScrollDynamicAdsInjector"),D(),j("design:type",Function),j("design:paramtypes",[void 0===_c?Object:_c,void 0===Uf?Object:Uf,void 0===Fr?Object:Fr])],tI);class iI extends Fn{init(){this._events.contentAdded.on((e=>{this._page++,this._context.pageviewKey=On(),this._gam.setTargeting({key:"pvk",value:this._context.pageviewKey}),this.slotsAlreadyInjectedInElement(e)||this.addSlots(e)}))}slotsAlreadyInjectedInElement(e){return!!e.querySelector("[id*='AdThrive_Content']")}addSlots(e){const t=this._config.dynamicAds.filter((e=>!(this._config.infiniteScroll.ajaxType&&e.location===Qe.Sidebar))).filter((e=>ki(this._config,e))).filter((e=>wi(e,this._context.device))).filter((e=>Ai(e))),i=this._injector.inject(t,e);0!==i.length&&this._slotManager.add(i).then((e=>{e.forEach((e=>{wc.pushToQueue((()=>{e.setTargeting({key:"inf_scroll",value:this._page.toString()})}))}))})).catch((e=>{W.error("InfiniteScrollDynamicAdsComponent","addSlots",e)}))}get enabled(){return this._config.adOptions.infiniteScroll}constructor(e,t,i,s,n,r){super(),this._config=e,this._context=t,this._events=i,this._injector=s,this._slotManager=n,this._gam=r,this._page=1}}iI=B([bn("InfiniteScrollDynamicAdsComponent"),D(),j("design:type",Function),j("design:paramtypes",[void 0===_c?Object:_c,void 0===Fr?Object:Fr,void 0===ZA?Object:ZA,void 0===tI?Object:tI,void 0===Kg?Object:Kg,void 0===wc?Object:wc])],iI);class sI extends Fn{start(){this._observer=this.getIntersectionObserver(),this._events.contentAdded.on((e=>{this._observer&&this._observer.observe(e)}))}getIntersectionObserver(){return new IntersectionObserver((e=>{for(const t of e)t.intersectionRatio>0&&t.isIntersecting&&this._debounce.limit(t.target.id).then((()=>this.refresh())).catch((e=>{W.error("InfiniteScrollRefreshComponent","getIntersectionObserver","refresh",e)}))}),{threshold:[.08]})}refresh(){if(this._config.adOptions.infiniteScrollRefresh){this._slots.get().filter((e=>this._config.infiniteScroll.refreshSlots.has(e.location)&&e.isSticky&&!e.isRefreshing)).forEach((e=>{this._slotManager.updateRefreshTimeout(e,1001)}))}}get enabled(){return this._config.adOptions.infiniteScroll&&"IntersectionObserver"in window}constructor(e,t,i,s){super(),this._config=e,this._events=t,this._slotManager=i,this._slots=s,this._debounce=new K(1e3)}}sI=B([bn("InfiniteScrollRefreshComponent"),D(),j("design:type",Function),j("design:paramtypes",[void 0===_c?Object:_c,void 0===ZA?Object:ZA,void 0===Kg?Object:Kg,void 0===ra?Object:ra])],sI);class nI extends Fn{init(){this.gamEventBus.slotResponseReceived.on((({slotId:e})=>{const t=this._slots.get(e);t&&this.slotResponseReceived(t)}))}slotResponseReceived(e){e.alwaysInView=e.location===Qe.Footer||e.location===Qe.Video_StickyOutstream}constructor(e,t){super(),this.gamEventBus=e,this._slots=t}}nI=B([bn("AlwaysInViewComponent"),D(),j("design:type",Function),j("design:paramtypes",[void 0===Sc?Object:Sc,void 0===ra?Object:ra])],nI);class rI extends Fn{constructor(e){super(),this._slotManager=e;window.addEventListener("message",(e=>{e&&e.data&&"set_adthrive_slot_timeout"===e.data.message&&e.data.slot_id&&e.data.refresh_interval>=0&&this._slotManager.updateRefreshTimeout(e.data.slot_id,e.data.refresh_interval)}),!1)}}rI=B([bn("ChangeSlotRefreshComponent"),D(),j("design:type",Function),j("design:paramtypes",[void 0===Kg?Object:Kg])],rI);class aI extends Fn{init(){this._pageManager.visibilityChange.on((()=>this.documentVisibilityChanged()))}documentVisibilityChanged(){const e=document.visibilityState,t=this._slots.get();"visible"===e?this._slotManager.resumeRefresh(t):"hidden"===e&&this._slotManager.pauseRefresh(t)}constructor(e,t,i){super(),this._slotManager=e,this._slots=t,this._pageManager=i}}aI=B([bn("DocumentHiddenPauseRefreshComponent"),D(),j("design:type",Function),j("design:paramtypes",[void 0===Kg?Object:Kg,void 0===ra?Object:ra,void 0===Mr?Object:Mr])],aI);class oI extends Fn{init(){this._googleAgManagerEventBus.impressionViewable.on((({slotId:e})=>{this.processImpressionViewable(e)})),this._googleAgManagerEventBus.slotVisibilityChanged.on((({slotId:e,event:t})=>{this.processVisibilityChanged(e,t)}))}processImpressionViewable(e){const t=this._slotManager.getSlot(e);t&&(t.outOfViewGPT=!1,this._slotManager.inView(t))}processVisibilityChanged(e,t){const i=this._slotManager.getSlot(e);i&&this.check(i,t.inViewPercentage)}check(e,t){t&&t>=this._inViewPercentage||e.location===Qe.Video_StickyOutstream?(e.outOfViewGPT=!1,this._slotManager.inView(e)):(e.outOfViewGPT=!0,this._slotManager.outOfView(e))}constructor(e,t){super(),this._slotManager=e,this._googleAgManagerEventBus=t,this._inViewPercentage=50}}oI=B([bn("ImpressionViewableRefreshComponent"),D(),j("design:type",Function),j("design:paramtypes",[void 0===Kg?Object:Kg,void 0===Sc?Object:Sc])],oI);class lI extends Fn{init(){this._observer=this._getIntersectionObserver(),this._slotEventBus.googleAdManagerFallbackDivAdded.on((e=>{this.slotResponseReceived(e)})),this._gamEventBus.slotResponseReceived.on((({slotId:e})=>{this.slotResponseReceived(e),this._trackSlotEvents.set(e,"slotResponseReceived")})),this._gamEventBus.slotRenderEnded.on((({slotId:e})=>{this.slotResponseReceived(e),this._trackSlotEvents.delete(e)})),this._gamEventBus.slotRequested.on((({slotId:e})=>{this._trackSlotEvents.set(e,"slotRequested")})),this._slotManagerEventBus.refreshing.on((e=>{const t=this._slotManager.getSlots(e);for(const e of t)this._trackSlotEvents.get(e.id)&&(this._slotManager.rebuild(e),this._trackSlotEvents.delete(e.id));this.refreshing(t)}))}get enabled(){return"IntersectionObserver"in window}slotResponseReceived(e){const t=this._slots.get(e);t&&this._observer&&t.element&&this._observer.observe(t.element)}_googleAdManagerFallbackDivAdded(e){this._observer&&e&&this._observer.observe(e)}refreshing(e){if(this._observer)for(const t of e){t.element&&this._observer.unobserve(t.element);Array.from(t.element.children).forEach((e=>{e.classList.contains("google-ad-manager-fallback-container")&&this._observer.unobserve(e)}))}}_getIntersectionObserver(){return new IntersectionObserver((e=>{for(const t of e){const e=t.target.id.length?this._slots.get(t.target.id):null;if(e)this._check(e,100*t.intersectionRatio);else{const e=t.target.parentElement&&t.target.parentElement.classList.contains("adthrive-ad")&&this._slots.get(t.target.parentElement.id);e&&this._check(e,100*t.intersectionRatio)}}}),{threshold:[0,this._inViewPercentage/100]})}_check(e,t){t>=this._inViewPercentage||e.location===Qe.Video_StickyOutstream?(e.outOfViewIO=!1,this._slotManager.inView(e)):(e.outOfViewIO=!0,this._slotManager.outOfView(e))}constructor(e,t,i,s,n){super(),this._slotManager=e,this._slots=t,this._gamEventBus=i,this._slotEventBus=s,this._slotManagerEventBus=n,this._inViewPercentage=50,this._trackSlotEvents=new Map}}lI=B([bn("IntersectionObserverRefreshComponent"),D(),j("design:type",Function),j("design:paramtypes",[void 0===Kg?Object:Kg,void 0===ra?Object:ra,void 0===Sc?Object:Sc,void 0===Bn?Object:Bn,void 0===nr?Object:nr])],lI);class dI extends Fn{init(){this._eventBus.footerResponseReceived.on(this.pollForFooterAdHeight.bind(this))}get enabled(){const e=this._stickyOutstreamFooterCollisionExperiment.result,t="phone"===this._context.device,{stickyOutstreamSettings:i,players:s}=this._config.video,n=i.mobile.enabled&&"top-center"!==i.mobileLocation,r=(null==s?void 0:s.some((e=>e.mobileLocation.includes("bottom"))))||!1;return e&&t&&(n||r)}pollForFooterAdHeight(){let e=0;const t=setInterval((()=>{this.checkForFooterAdHeightChange(),e++,e>=this._maxRetries&&clearInterval(t)}),500)}checkForFooterAdHeightChange(){const e=this.getFooterAdHeight();e!==this._lastAdHeight&&(this._eventBus.footerHeightChanged.emit(e),this._lastAdHeight=e)}isElementAtBottomOfPage(e){const t=e.getBoundingClientRect();if(t.width&&t.height){const e=t.bottom||(t.top||t.y)+t.height;if(Math.abs(window.innerHeight-e)<100)return!0}return!1}getFooterAdHeight(){let e=52;return this._config.footer.footerSelectorsForHeightCheck.forEach((t=>{const i=document.querySelector(t.trim());if(i&&Ns(i)&&this.isElementAtBottomOfPage(i)){const t=i.getBoundingClientRect().height;t>e&&(e=t)}})),e}constructor(e,t,i,s){super(),this._config=e,this._context=t,this._eventBus=i,this._stickyOutstreamFooterCollisionExperiment=s,this._lastAdHeight=52,this._maxRetries=12}}dI=B([bn("FooterAdRefreshComponent"),M(),j("design:type",Function),j("design:paramtypes",[void 0===_c?Object:_c,void 0===Fr?Object:Fr,void 0===Xn?Object:Xn,void 0===gd?Object:gd])],dI);class cI extends br{init(){this._key="ConfiantProperty",this._lookup="CNFTP"}run(){return super.run()}}cI=B([bn("ConfiantPropertyExperiment"),M()],cI);const hI=new Map([[1,{type:"manual",description:"Deprecated"}],[2,{type:"creative",description:"Creative-based detection"}],[3,{type:"provider_security",description:"Domain-based detection for unsafe domains"}],[4,{type:"banned_domain",description:"Domain-based detection for bannded domains"}],[5,{type:"provider_ibv",description:"Domain-based detection for in-banner-video"}],[6,{type:"unsafejs",description:"JavaScript-based detection for unsafe ads"}],[7,{type:"hrap",description:"Domain-based detection for high risk ad platform domains"}],[10,{type:"adv_brand_safety",description:"Ads that act as placeholders when a brand safety blocklist prohibits the original ad from displaying."}]]);class uI extends Fn{init(){var e;const t=`https://cdn.confiant-integrations.net/${null!=(e=this._confiantPropertyExperiment.result)?e:"mOinGM9MTu5v-Lto835XLhlrSPY"}/gpt_and_prebid/config.js`;return window.confiant=window.confiant||{},window.confiant.callback=(e,t,i,s,n,r)=>{const a=hI.get(e);W.event("ConfiantTrackerComponent","adBlocked",{blockingTypeIntegerValue:e,blockingType:a?a.type:"unknown",description:a?a.description:"unknown",tagId:n,wrapperId:s,blockingId:t,isBlocked:i}),"adv_brand_safety"!==(null==a?void 0:a.type)&&this._extractCridForBlocking(r)},Cs(t)}get enabled(){return!this._config.tkho.tracker.includes(this._name)&&!this._config.gpc.gpcEnabled&&!this._config.ccpa.userOptedOut}_extractCridForBlocking(e){var t;if("object"==typeof e&&(null==e||null==(t=e.tp_crid)?void 0:t.startsWith("PB:"))){const t=e.tp_crid.split(";"),i=t[t.length-1];window.fetch("https://api.adthrive.com/crid",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({crid:i})}).then((()=>{W.event("ConfiantTrackerComponent","_extractCridForBlocking","Stored crid for blocking",{crid:i})})).catch((e=>{W.error("ConfiantTrackerComponent","_extractCridForBlocking","Error storing crid",i,e)}))}}constructor(e,t){super(),this._config=e,this._confiantPropertyExperiment=t,this._name="conf"}}uI=B([bn("ConfiantTrackerComponent"),D(),j("design:type",Function),j("design:paramtypes",[void 0===_c?Object:_c,void 0===cI?Object:cI])],uI);class pI extends Fn{init(){const e=this._config.ccpa.comscoreParams||"0",t={c1:"2",c2:this._comscoreId,cs_fpid:Fs.readExternalCookie("_pubcid")||Fs.readExternalLocalStorage("_pubcid"),cs_fpit:"o",cs_fpdm:"*null",cs_fpdt:"*null",options:{enableFirstPartyCookie:!0},...this._gdprEnabled&&{cs_ucfr:"1"},...this._config.ccpa.required&&{cs_ucfr:e}};window._comscore=window._comscore||[],window._comscore.push(t),this._import()}_import(){const e=`https://sb.scorecardresearch.com/cs/${this._comscoreId}/beacon.js`;document.querySelector(`[src^="${e}"]`)?W.event("ComscoreTrackerComponent","init","Comscore script already loaded"):Cs(e).catch((e=>{const t=this._gdprEnabled?"GDPR":"non-GDPR";W.error("ComscoreTrackerComponent","init",`Error during Comscore beacon.js import in ${t} region: `,e)}))}get enabled(){return!this._config.tkho.tracker.includes(this._name)&&this._isValidTraffic&&!this._config.gpc.gpcEnabled&&!this._config.ccpa.userOptedOut}constructor(e){super(),this._config=e,this._name="cmscr",this._comscoreId="6035453",this._gdprEnabled=!1,this._isValidTraffic=!1,this._gdprEnabled=this._config.gdpr.enabled,this._isValidTraffic=!window.adthrive.invalidTraffic}}pI=B([bn("ComscoreTrackerComponent"),D(),j("design:type",Function),j("design:paramtypes",[void 0===_c?Object:_c])],pI);class gI extends Fn{init(){this._gamEventBus.slotOnload.once((()=>{this.import().then((()=>this.syncData())).catch((e=>W.error("HawkeyeTrackerComponent","init","slotOnload",e)))}))}get enabled(){return!this._config.tkho.tracker.includes(this._name)&&!this._config.gpc.gpcEnabled&&!this._config.ccpa.userOptedOut}async import(){return await Cs("https://pghub.io/js/pandg-sdk.js",!0)}async syncData(){const e={ccpa:this._config.ccpa.privacyString?this._config.ccpa.privacyString:null,bp_id:"cafemedia"},t=window.Tapad.init(e,{name:"P&G",pixelUrl:"https://pandg.tapad.com/tag"});await t.sync({}),this._gam.setTargetingFlag("het_sync",["1"])}constructor(e,t,i){super(),this._gam=e,this._config=t,this._gamEventBus=i,this._name="hawk"}}gI=B([bn("HawkeyeTrackerComponent"),D(),j("design:type",Function),j("design:paramtypes",[void 0===wc?Object:wc,void 0===_c?Object:_c,void 0===Sc?Object:Sc])],gI);class mI extends Fn{init(){try{this._importATS()}catch(e){W.error("LiveRampAtsTrackerComponent","init",e)}}get enabled(){return this._config.liveRampAts.enabled&&!this._config.disableAds.all&&!this._config.tkho.tracker.includes(this._name)&&!this._config.gpc.gpcEnabled&&!this._config.ccpa.userOptedOut}_setECSTags(){const e={},t=this._config.marmalade.mcmp;for(const i of t)e[i]="mcmp";window.__launchpad("ecst",e,(e=>{}))}_setListener(){window.addEventListener("lrEnvelopePresent",(()=>{this._setECSTags()}))}_importATS(){this._setListener(),Cs(this._config.liveRampAts.url).then((()=>{})).catch((e=>{W.error("LiveRampAtsTrackerComponent","error importing liveramp with ATS",e)}))}constructor(e){super(),this._config=e,this._name="ats"}}mI=B([bn("LiveRampAtsTrackerComponent"),D(),j("design:type",Function),j("design:paramtypes",[void 0===_c?Object:_c])],mI);class _I extends Fn{init(){try{this._gamEventBus.slotOnload.once((()=>{this.loadImage()}))}catch(e){W.error("NielsenTrackerComponent","init",e)}}get enabled(){return di()&&!this._config.tkho.tracker.includes(this._name)&&!this._config.gpc.gpcEnabled&&!this._config.ccpa.userOptedOut}loadImage(){const e=this._context.device;let t="https://secure-gl.imrworldwide.com/cgi-bin/m?am=3&at=view&rt=banner&st=image&cr=adthrive&ce=cafemedia";let i={phone:"nlsn290957",tablet:"nlsn291137",desktop:"nlsn291136"}[e];const s={phone:"nlsn287186",tablet:"nlsn287188",desktop:"nlsn287187"},n=as(this._context.savedReferrer);n&&(n.toLowerCase().includes("instagram.com")||n.toLowerCase().includes("pinterest.com"))&&(i=s[e]),t+=`&ci=nlsnci542&ca=${i}&pc=${window.location.host}&r=${Date.now()}`,(new Image).src=`${t}`}constructor(e,t,i){super(),this._config=e,this._gamEventBus=t,this._context=i,this._name="nlsn"}}_I=B([bn("NielsenTrackerComponent"),D(),j("design:type",Function),j("design:paramtypes",[void 0===_c?Object:_c,void 0===Sc?Object:Sc,void 0===Fr?Object:Fr])],_I);const fI=[".adthrive",".adthrive-ad",".adthrive-sidebar"];class vI extends Fn{init(){try{const e=setTimeout((()=>{this.rewriteAllTargetLinksOnPage()}),5e3);this._slotManagerEventBus.added.once((()=>{this._gamEventBus.slotOnload.once((()=>{e&&clearTimeout(e),this.rewriteAllTargetLinksOnPage()}))}))}catch(e){W.error("TargetRewriteTrackerComponent","getAllTargetLinksOnPage",e)}}rewriteAllTargetLinksOnPage(){let e=0;Array.prototype.map.call(document.querySelectorAll(`a[href*="${this._targetDomain}"]`),(e=>e)).filter((e=>this.isEligibleForRewrite(e))).forEach((t=>{this.fireImpression(t.href),this.replaceTargetLink(t),e++})),e&&W.event("TargetRewriteTrackerComponent","logTargetRewrite",{message:"targetRewrite",countRewrite:e})}fireImpression(e){const t=this.getImpressionPixel(e);return(new Image).src=t}getImpressionPixel(e){let t=`https://${this._affDomain}/i/${this._commonPath}?`;const i=`U1|${this.getUUID()}`;t+=`_ir=${encodeURIComponent(i)}&`+this._commonParams+"&subid3="+encodeURIComponent(e);const s=e.split("?");return s.length>1&&(t+="&"+s[1]),t}getUUID(){return`${sn().toString()}.${Math.random().toString(36).substring(2,15)}`}replaceTargetLink(e){const t=this.removeHashtagsFromUrl(e.href),i=encodeURIComponent(t);e.classList.add("noskimlinks","norewrite"),e.href=`https://${this._affDomain}/c/${this._commonPath}?${this._commonParams}&subid3=${i}&u=${i}#donotlink`}removeHashtagsFromUrl(e){return e.split("#")[0]}isEligibleForRewrite(e){return this.isTargetLink(e)&&!this.shouldExcludeLink(e)}isTargetLink(e){const t=this.extractDomain(e.href);return t&&!t.includes(this._affDomain)}shouldExcludeLink(e){return fI.some((t=>e.matches(t)))||e.matches(".raptive-affiliate-ignore")}extractDomain(e){const t=/^https?\:\/\/([^\/:?#]+)(?:[\/:?#]|$)/i.exec(e);return t&&t[1]||""}get enabled(){return!this._config.tkho.tracker.includes(this._name)&&!this._config.ccpa.enabled&&this._config.adOptions.targetAff&&!this._config.gpc.gpcEnabled&&!this._config.ccpa.userOptedOut}constructor(e,t,i){var s;super(),this._config=e,this._gamEventBus=t,this._slotManagerEventBus=i,this._name="tgtaff",this._accountId="2773249",this._adId="81938",this._configId="2092",this._affDomain="goto.target.com",this._targetDomain="target.com",this._commonParams="",this._commonPath="",this._commonParams=(s={subid1:this._config.site.id,subid2:location.href,sharedid:this._config.site.name},Object.keys(s).map((e=>`${e}=${encodeURIComponent(s[e])}`)).join("&")),this._commonPath=`${this._accountId}/${this._adId}/${this._configId}`}}vI=B([bn("TargetRewriteTrackerComponent"),D(),j("design:type",Function),j("design:paramtypes",[void 0===_c?Object:_c,void 0===Sc?Object:Sc,void 0===nr?Object:nr])],vI);class yI extends Fn{init(){try{this._gamEventBus.slotOnload.once((()=>{this.loadImage()}))}catch(e){W.error("TheTradeDeskTrackerComponent","init",e)}}get enabled(){return!this._tkho.tracker.includes(this._name)&&!this._gpcConfig.gpcEnabled&&!this._ccpaConfig.userOptedOut}loadImage(){(new Image).src="https://insight.adsrvr.org/track/evnt/?adv=z127r4i&ct=0:p21aj7j&fmt=3"}constructor(e,t,i,s){super(),this._gpcConfig=e,this._ccpaConfig=t,this._tkho=i,this._gamEventBus=s,this._name="ttdt"}}yI=B([bn("TheTradeDeskTrackerComponent"),D(),j("design:type",Function),j("design:paramtypes",[void 0===ja?Object:ja,void 0===Na?Object:Na,void 0===Jd?Object:Jd,void 0===Sc?Object:Sc])],yI);class bI extends Er{init(){this._key="SlotResize",this._lookup="SRE",this._default=!1}}bI=B([M()],bI);class SI extends Fn{get enabled(){return this.slotResizeExperiment.result}start(){this._setupListeners()}_setupListeners(){this._gamSlotOnLoad.on((({slotId:e})=>{const t=this._slots.get(e);"Content"===(null==t?void 0:t.location)&&this._compareSlot(t)}))}_compareSlot(e){const t=this._slotSizeMap.get(e.id),i=getComputedStyle(e.element).height,s=Number(i.slice(0,-2));(!t||te.some((e=>null!==document.querySelector(e)));class CI{logOverflow(e){const t=document.querySelector(e);t&&vi(t)}getStickyAdTopProperty(e){const{playerContainer:t,topBackgroundElement:i,collapseMobileSubType:s,mobileHeaderSelector:n}=e;if("adthrive-collapse-bottom-left"===s||"adthrive-collapse-bottom-right"===s)return this.stickyHeaderHeight;{const e=Number(i?i.getBoundingClientRect().height:t.getBoundingClientRect().height),s=dv([n||""]);return s?Number(s)+e:e}}constructor(e){this.stickyBlockedSelectors=[],this.stickyHeaderHeight=dv(e.adOptions.stickyHeaderSelectors),this.stickyBlockedSelectors=e.adOptions.stickyBlockedSelectors||[]}}CI=B([bn("StickyContainerAdsUtil"),D(),j("design:type",Function),j("design:paramtypes",[void 0===_c?Object:_c])],CI);class TI extends Er{init(){this._key="StickyContainerAdsTopCenterVideoDependency",this._lookup="SCATCVE",this._default=!1}isEnabled(){return super.isEnabled()&&Ki()}}TI=B([D(),bn("StickyContainerAdsTopCenterVideoDependencyExperiment")],TI);class wI extends Fn{get enabled(){return this._stickyContentEnabled&&!EI(this._stickyContainerAdsUtil.stickyBlockedSelectors)}start(){this.setCSS(),this._stickyContainerAdsUtil.logOverflow(".adthrive-sticky-container"),this._stickyContainerAdEventBus.stickyContainerContentAdStylingApplied.emit()}setCSS(){Kf(`\n .adthrive-device-phone .adthrive-sticky-content {\n height: 450px !important;\n margin-bottom: 100px !important;\n }\n .adthrive-content.adthrive-sticky {\n position: -webkit-sticky;\n position: sticky !important;\n top: 42px !important;\n margin-top: 42px !important;\n }\n .adthrive-content.adthrive-sticky:after {\n content: "— Advertisement. Scroll down to continue. —";\n font-size: 10pt;\n margin-top: 5px;\n margin-bottom: 5px;\n display:block;\n color: #888;\n }\n .adthrive-sticky-container {\n position: relative;\n display: flex;\n flex-direction: column;\n justify-content: flex-start;\n align-items: center;\n min-height:${this._stickyContentHeight||400}px !important;\n margin: 10px 0 10px 0;\n background-color: #FAFAFA;\n padding-bottom:0px;\n }\n `),ov(this._stickyContainerAdsUtil.stickyHeaderHeight),this._stickyContainerTopCenterVideoDependencyExperimentResult&&this.addListeners()}addListeners(){this._videoEventBus.topCenterVideoCollapsed.on((e=>{this._stickyAdTopProperty||(this._stickyAdTopProperty=this._stickyContainerAdsUtil.getStickyAdTopProperty(e)),ov(this._stickyAdTopProperty)})),this._videoEventBus.topCenterVideoUnCollapsed.on((()=>{ov(this._stickyContainerAdsUtil.stickyHeaderHeight)}))}constructor(e,t,i,s){super(),this._videoEventBus=t,this._stickyContainerAdEventBus=i,this._stickyContainerTopCenterVideoDependencyExperiment=s,this._stickyContainerTopCenterVideoDependencyExperimentResult=!1,this._stickyContentEnabled=!1,this._stickyContainerAdsUtil=new CI(e),this._stickyContentHeight=Bi()?250:e.adOptions.stickyContentHeight,this._stickyContainerTopCenterVideoDependencyExperimentResult=this._stickyContainerTopCenterVideoDependencyExperiment.result,this._stickyContentEnabled=e.adOptions.stickyContentEnabled||!1}}wI=B([bn("StickyContainerContentAdsComponent"),D(),j("design:type",Function),j("design:paramtypes",[void 0===_c?Object:_c,void 0===rr?Object:rr,void 0===VA?Object:VA,void 0===TI?Object:TI])],wI);class kI extends Fn{get enabled(){return!EI(this._stickyContainerAdsUtil.stickyBlockedSelectors)}start(){this.setCSS(),this._stickyContainerAdsUtil.logOverflow(".adthrive-recipe-sticky-container")}setCSS(){Kf(`\n .adthrive-recipe.adthrive-sticky {\n position: -webkit-sticky;\n position: sticky !important;\n top: 42px !important;\n margin-top: 42px !important;\n }\n .adthrive-recipe-sticky-container {\n position: relative;\n display: flex;\n flex-direction: column;\n justify-content: flex-start;\n align-items: center;\n min-height:${this._stickyRecipeHeight||400}px !important;\n margin: 10px 0 10px 0;\n background-color: #FAFAFA;\n padding-bottom:0px;\n }\n `),lv(this._stickyContainerAdsUtil.stickyHeaderHeight),this._stickyContainerTopCenterVideoDependencyExperimentResult&&this.addListeners()}addListeners(){this._videoEventBus.topCenterVideoCollapsed.on((e=>{this._stickyAdTopProperty||(this._stickyAdTopProperty=this._stickyContainerAdsUtil.getStickyAdTopProperty(e)),lv(this._stickyAdTopProperty)})),this._videoEventBus.topCenterVideoUnCollapsed.on((()=>{lv(this._stickyContainerAdsUtil.stickyHeaderHeight)}))}constructor(e,t,i){super(),this._videoEventBus=t,this._stickyContainerTopCenterVideoDependencyExperiment=i,this._stickyContainerTopCenterVideoDependencyExperimentResult=!1,this._stickyContainerAdsUtil=new CI(e),this._stickyRecipeHeight=e.adOptions.stickyRecipeHeight,this._stickyContainerTopCenterVideoDependencyExperimentResult=this._stickyContainerTopCenterVideoDependencyExperiment.result}}kI=B([bn("StickyContainerRecipeAdsComponent"),D(),j("design:type",Function),j("design:paramtypes",[void 0===_c?Object:_c,void 0===rr?Object:rr,void 0===TI?Object:TI])],kI);class AI extends Fn{init(){this._spaEventBus.routeChanged.on((async()=>{const e=await(e=>{const t=`https://ads.adthrive.com/api/v1/marmalade?siteid=${e}&url=${encodeURIComponent(location.href)}&experiments=recencyFrequency`;return fetch?fetch(t).then((e=>e.json())).catch((e=>(W.error("getMarmaladeData","Unable to get marmalade data. Error:",e),null))):new Promise((e=>{const i=new XMLHttpRequest;i.onload=()=>{200===i.status&&e(i.response)},i.open("GET",t,!0),i.responseType="json",i.send()}))})(this._siteId);e&&(this._config.marmalade=new Hd(e,this._marmaladeEventBus,this._adTypes),this._marmaladeEventBus.marmaladeResponseLoaded.emit(e))}))}get enabled(){return!0}constructor(e,t,i,s){super(),this._spaEventBus=e,this._marmaladeEventBus=t,this._config=i,this._adTypes=s,this._siteId=this._config.site.id}}AI=B([bn("SPAMarmaladeComponent"),D(),j("design:type",Function),j("design:paramtypes",[void 0===ir?Object:ir,void 0===tr?Object:tr,void 0===_c?Object:_c,void 0===Ca?Object:Ca])],AI);class II extends Fn{init(){this.checkGPPConsentForFacebook(),this._config.gdpr.enabled&&this._gdprEnforcement.checkConsentOnLoad().then((e=>{e&&e.tcString?this.checkGDPRConsentForFacebook():this.listenForUserActionComplete()})).catch((()=>{}))}checkGPPConsentForFacebook(){this.gppComponent.enabled&&(this._consent=this.gppComponent.gpcEnabled?"revoke":"grant",this._config.ccpa.consentChange.on((e=>{const t=e===this._config.ccpa.ccpaOptOut;this._consent=t?"revoke":"grant",this.handleFacebookPixelConsent()})),this.handleFacebookPixelConsent())}checkGDPRConsentForFacebook(){this._gdprEnforcement.checkConsentForVendor(this._facebookVendorId,[1]).then((e=>{this._consent=e?"grant":"revoke",this.handleFacebookPixelConsent()})).catch((()=>{}))}listenForUserActionComplete(){window.__tcfapi("addEventListener",2,((e,t)=>{t&&e&&"useractioncomplete"===e.eventStatus&&this.checkGDPRConsentForFacebook()}))}checkFBEventsJSExists(){return Array.from(document.querySelectorAll("head > script:not([src]), body > script:not([src])")).some((e=>this._fbEventsUrlPattern.test(e.innerHTML)))}removeUserInteractionListeners(){this._cb&&(this._userInteractionEvents.forEach((e=>window.removeEventListener(e,this._cb))),this._cb=null)}addUserInteractionListeners(e){this._cb=pc((()=>{e()&&this.removeUserInteractionListeners()}),this._throttleInterval,{leading:!1}),this._userInteractionEvents.forEach((e=>window.addEventListener(e,this._cb)))}handleFacebookPixelConsent(){window.fbq&&"function"==typeof window.fbq?(window.fbq("consent",this._consent),this.removeUserInteractionListeners()):!this._cb&&this.checkFBEventsJSExists()&&this.addUserInteractionListeners(this.handleFacebookPixelConsent.bind(this))}get enabled(){return this._config.gdpr.enabled||this.gppComponent.enabled}constructor(e,t,i){super(),this._gdprEnforcement=e,this.gppComponent=t,this._config=i,this._cb=null,this._facebookVendorId="s7",this._fbEventsUrlPattern=/connect\.facebook\.net\/en_US\/fbevents.js/,this._userInteractionEvents=["mousemove","keydown","touchstart","wheel"],this._consent="revoke",this._throttleInterval=500}}II=B([bn("FacebookPixelComponent"),D(),j("design:type",Function),j("design:paramtypes",[void 0===Mu?Object:Mu,void 0===Lv?Object:Lv,void 0===_c?Object:_c])],II);class xI extends Er{init(){this._key="SlickstreamAdUnits",this._lookup="SSAU",this._default=!1}}xI=B([bn("SlickstreamAdsExperiment"),M()],xI);const PI=(e,t,i=0)=>{const s=[];for(let n=0;n(e.lazy=!0,e)));for(let e=0;ee.name===a)))continue;const o=this.getDynamicElementId(),l=`adthrive-${i.location.replace("_","-").toLowerCase()}`,d=[l,`${l}-${i.sequence}`,...i.classNames,"adthrive-slicksearch"],c=ev(t,o,i.position,d,i.location);if(c){const e=this._filterAdUnitSizes(i,c);e.length&&(s.push(tv(i,c,e,!1)),this._count++)}}return s}getDynamicElementId(){return`${this._config.gam.prefix}_Content_${this._count}_${this._context.device}`}constructor(e,t,i){super(t,i),this._config=e,this._adInjectionMap=t,this._context=i,this._count=0}}OI=B([bn("SlickstreamAdsInjector"),D(),j("design:type",Function),j("design:paramtypes",[void 0===_c?Object:_c,void 0===Uf?Object:Uf,void 0===Fr?Object:Fr])],OI);class RI extends Fn{get enabled(){return this._slickstreamAdsExperiment.result}init(){document.addEventListener("slick-search-panel-show",(()=>{const e=document.querySelector("slick-search-panel");e&&!this.slotsAlreadyInjectedInElement(e)&&this._addSlots(e)})),document.addEventListener("slick-search-panel-hide",(()=>{this._slickstreamAdSlots.length>0&&this._removeSlots()})),this._slotManagerEventBus.added.on((e=>{const t=this._slotManager.getSlots(e);for(const e of t)e.location===Qe.Content&&this._contentSlotsCount++}))}_addSlots(e){const t=this._config.dynamicAds.filter((e=>e.location===Qe.Content)).filter((e=>ki(this._config,e))).filter((e=>wi(e,this._context.device)));if(t.length>0){const i=this._injector.injectSlickstreamAdSlots(t[0],e,this._contentSlotsCount);if(0===i.length)return;this._slotManager.add(i).then((e=>{e.forEach((e=>{this._slickstreamAdSlots.push(e),wc.pushToQueue((()=>{e.setTargeting({key:"slicksearch",value:"true"}),e.setSlotTargetingFlag("slicksearch",["true"])}))}))})).catch((e=>{W.error("SlickstreamAdsComponent","_addSlots",e)}))}}_removeSlots(){this._slotManager.destroy(this._slickstreamAdSlots),this._slotManager.removeElement(this._slickstreamAdSlots),this._contentSlotsCount=this._contentSlotsCount-this._slickstreamAdSlots.length,this._slickstreamAdSlots.length=0}slotsAlreadyInjectedInElement(e){return!!e.querySelector("[id*='AdThrive_Content']")}constructor(e,t,i,s,n,r){super(),this._config=e,this._context=t,this._injector=i,this._slotManager=s,this._slickstreamAdsExperiment=n,this._slotManagerEventBus=r,this._slickstreamAdSlots=[],this._contentSlotsCount=0}}RI=B([bn("SlickstreamAdsComponent"),D(),j("design:type",Function),j("design:paramtypes",[void 0===_c?Object:_c,void 0===Fr?Object:Fr,void 0===OI?Object:OI,void 0===Kg?Object:Kg,void 0===xI?Object:xI,void 0===nr?Object:nr])],RI);const LI=e=>/^[-_a-zA-Z]+[-_a-zA-Z0-9]*$/.test(e);class DI extends lr{run(){if(!this.enabled)return W.error("AdLayoutSiteExperiment","run","() => %o","No experiment config found. Defaulting to empty class name."),"";const e=new Hn(this._mappedChoices).get();return this._isValidResult(e)?e:(W.error("AdLayoutSiteExperiment","run","() => %o","Invalid result from experiment choices. Defaulting to empty class name for result",e),"")}setExperimentTargeting(){if(!this.enabled||!this._isValidResult(this._result))return void W.error("AdLayoutSiteExperiment","setExperimentTargeting","() => %o","Experiment targeting requires an experiment config and valid result");const e=this.experimentConfig,t=`${e.key.toLowerCase()}-${e.id}`,i=this._result;this._pubabgroup.set(t,i)}_mapChoices(){return this._choices.map((({weight:e,value:t})=>({weight:e,choice:t})))}constructor(e,t,i,s){var n;super(),this._siteExperiments=e,this._pubabgroup=t,this._clsOptions=i,this._choices=[],this._mappedChoices=[],this._result="",this.key=Xe.AdLayout,this._resultValidator=e=>{if("string"!=typeof e)return!1;const t=e.startsWith(".")?e.substring(1):e;return LI(t)},(null==(n=s.siteAds)?void 0:n.siteExperiments)?this.experimentConfig=new dr(s.siteAds).getSiteExperimentByKey(this.key):this.experimentConfig=this._siteExperiments.getSiteExperimentByKey(this.key);const r=this._clsOptions.getWeightedChoiceExperiment(this.key,!0);this.enabled&&this._isValidResult(r)?(this._result=r,this.setExperimentTargeting()):this.enabled&&this.experimentConfig&&(this._choices=this.experimentConfig.variants,this._mappedChoices=this._mapChoices(),this._result=this.run(),this.setExperimentTargeting())}}B([kn(),j("design:type",Function),j("design:paramtypes",[]),j("design:returntype",void 0)],DI.prototype,"run",null),DI=B([M(),F(3,L("AdthriveCLS")),j("design:type",Function),j("design:paramtypes",[void 0===cr?Object:cr,void 0===gr?Object:gr,void 0===Tl?Object:Tl,"undefined"==typeof AdthriveCLS?Object:AdthriveCLS])],DI);class MI extends Fn{get enabled(){return this._adLayoutSiteExperiment.enabled}init(){const e=this._adLayoutSiteExperiment.result,t=e.startsWith(".")?e.substring(1):e;if(LI(t))try{document.body.classList.add(t)}catch(e){W.error("AdLayoutComponent","init",`Uncaught CSS Class Name error: ${e}`)}else W.error("AdLayoutComponent","init",`Invalid class name: ${e}`)}constructor(e){super(),this._adLayoutSiteExperiment=e}}MI=B([bn("AdLayoutComponent"),D(),j("design:type",Function),j("design:paramtypes",[void 0===DI?Object:DI])],MI);class BI extends Fn{init(){this._footerConfigEventBus.comscoreInitialized.on((e=>{e&&this._footerConfigEventBus.footerElementAdded.emit({order:2,element:"A Raptive Partner Site"})}),{handleEventsAlreadyEmitted:!0})}constructor(e){super(),this._footerConfigEventBus=e}}BI=B([D(),j("design:type",Function),j("design:paramtypes",[void 0===Xn?Object:Xn])],BI);class FI extends Fn{init(){this._slotManagerEventBus.added.on((e=>{this._slots.get(e).forEach((e=>{e.element.classList.add("adthrive-ad-debug"),e.element.addEventListener("click",(()=>{console.warn(`%c Debug Info for ${e.id}`,"background: #6B65FF; color: #F0EDEB; padding: 1px; border-radius: 3px;",e)}))}))}))}get enabled(){const e=Br("at_ui_debug");return"true"===e||"1"===e}constructor(e,t){super(),this._slotManagerEventBus=e,this._slots=t}}FI=B([bn("UIDebugComponent"),M(),j("design:type",Function),j("design:paramtypes",[void 0===nr?Object:nr,void 0===ra?Object:ra])],FI);const jI=(e,t)=>{const i=Ii(t),s=e.sticky&&e.location===Qe.Sidebar;return e.sizes.filter((t=>{const n=!e.autosize||(t[0]<=i||t[0]<=320),r=!s||t[1]<=window.innerHeight-100;return n&&r}))};class NI extends br{init(){this._key="DynamicSidebarSlotsCap",this._lookup="DSSC2"}}NI=B([bn("DynamicSidebarSlotsCapExperiment"),M()],NI);const UI=(e,t,i=1200,s=25)=>{const n=e-(t.hasChildNodes()?(e=>{const t=e.lastChild;if(t instanceof HTMLElement)return t.offsetTop+t.offsetHeight;if(t instanceof Text){const i=t.previousElementSibling;return i?i.offsetTop+i.offsetHeight:e.offsetTop}return W.error("util","determineSidebar9ElementTop","Could not determine the top of the sidebar9 child element"),e.offsetTop})(t):t.offsetTop),r=Math.floor(n/(i+10));return Math.min(r,s)};class VI extends Fn{get enabled(){const e=this._config.adOptions.dynamicStickySidebarBlockedSelectors||[];return!EI(e)&&!!this._config.adOptions.dynamicStickySidebarEnabled&&this._essaExperiment.result}start(){const e=this._config.dynamicAds.filter((e=>e.location===Qe.Sidebar)).filter((e=>9===e.sequence)).filter((e=>ki(this._config,e))).filter((e=>{return t=e,i=this._context.device,t.devices.includes(i);var t,i})).filter((e=>{return 0===(t=e).pageSelector.length||null!==document.querySelector(t.pageSelector);var t}))[0];if(!e)return;const t=this.insertDynamicStickySidebarAds(e);0!==t.length&&this._slotManager.add(t)}updateStylingForExistingStickySidebarAd(e){const t=this.getDynamicElementId(e),i=document.getElementById(t);null==i||i.classList.add("adthrive-sticky-sidebar")}getSidebarElement(e){return iv(e.elementSelector,document).item(e.skip)}insertDynamicStickySidebarAds(e){const t=[],i=iv(e.elementSelector,document).item(e.skip);if(null===i)return t;const s=this.repeatDynamicStickySidebar(e).filter((e=>null===document.querySelector(`#${this.getDynamicElementId(e)}`)));if(s.length<2)return t;this.updateStylingForExistingStickySidebarAd(e);for(let n=0;ne.name===a)))continue;const o=this.getDynamicElementId(r),l=sv(r),d=nv(r),c=[n===s.length-1?"":"adthrive-sticky-sidebar",l,d,...r.classNames],h=ev(i,o,r.position,c,e.location);if(h){const e=jI(r,h);e.length&&t.push(tv(r,h,e,!1))}}return t}getSidebarSlotHeight(){const e=this._config.adOptions.dynamicStickySidebarHeight;return 0===e||void 0===e?(W.error("EnhancedStickySidebarComponent","_getSidebarSlotHeight","Dynamic sticky sidebar height is not set in config"),1800):e}calculateNumberOfDynamicStickySidebars(e){var t;const i=this.getSidebarElement(e);if(!i)return 0;const s=this.getSidebarSlotHeight(),n=e.stickyOverlapSelector&&(null==(t=document.querySelector(e.stickyOverlapSelector))?void 0:t.offsetTop)||document.body.scrollHeight,r=this._dynamicSidebarSlotsCapExperiment.result||0;return UI(n,i,s,r)}repeatDynamicStickySidebar(e){if(e.location!==Qe.Sidebar||9!==e.sequence||!e.sticky)return[e];const t=this.calculateNumberOfDynamicStickySidebars(e);return PI(e,t,9).map((e=>(9!==e.sequence&&(e.lazy=!0),e)))}getDynamicElementId(e){return`${this._config.gam.prefix}_${e.location}_${e.sequence}_${this._context.device}`}constructor(e,t,i,s,n){super(),this._config=e,this._context=t,this._slotManager=i,this._dynamicSidebarSlotsCapExperiment=s,this._essaExperiment=n}}VI=B([bn("EnhancedStickySidebarComponent"),D(),j("design:type",Function),j("design:paramtypes",[void 0===_c?Object:_c,void 0===Fr?Object:Fr,void 0===Kg?Object:Kg,void 0===NI?Object:NI,void 0===zv?Object:zv])],VI);class zI extends Er{init(){this._key="INPExperiment",this._lookup="INP",this._default=!1}}zI=B([bn("INPExperiment"),M()],zI);const HI="good",$I="needs improvement",qI="poor";class GI extends Fn{init(){this._observer=this._createPerformanceObserver(),this._observer.observe({type:"event",buffered:!0,durationThreshold:0}),this._pageManager.pageHide.on((()=>{this._logINPEventsData(),this._logINPCounts()})),this._currentContextualDataSize=encodeURIComponent(JSON.stringify(W.data)).length,this._setMaxCharsAvailableToLog(),this._loggerEventBus.newContextDataEncodingSize.on((e=>this._updateCharLimits(e)))}_createPerformanceObserver(){return new PerformanceObserver((e=>{e.getEntries().forEach((e=>{this._isEntryPerformanceEventTimingType(e)&&this._hasNonZeroInteractionId(e)&&this._processEntry(e)}))}))}_processEntry(e){const t=e.interactionId,i=this._getInteractionEventInfo(e),s=this._existingInteractions.get(t);(!s||i.inp>s.maxINP)&&this._updateINPForInteraction(t,i);const n={...i,interactionId:t};this._updateINPLog(n),this._totalInteractionEvents++}_isEntryPerformanceEventTimingType(e){return"event"===e.entryType}_hasNonZeroInteractionId(e){return!!e.interactionId&&0!==e.interactionId}_getInteractionEventInfo(e){const t=e.duration,i=e.startTime,s=e.processingStart,n=e.processingEnd,r=e.target;return{inp:t,startTime:i,startDelay:s-i,processingStart:s,processingEnd:n,processingTime:n-s,...this._getTargetIdentifiers(r),qualitativeScore:this._getQualitativeINPScore(t),eventType:e.name}}_updateINPForInteraction(e,t){const i={maxINP:t.inp,qualitativeScore:t.qualitativeScore};this._existingInteractions.set(e,i)}_setMaxCharsAvailableToLog(){const e=W.buildRequestUrl("event","INPComponent","_logINPEventsData",[]).length,t=this._calculateCharsOfEncodedDataObject(this._logData)+this._calculateCharsFromEncodedCommas(1);this._maxCharsAvailableInSendEvent=W.maxCloudFrontUrlSize-e-t}_updateCharLimits(e){const t=this._maxCharsAvailableInSendEvent;this._maxCharsAvailableInSendEvent+=this._currentContextualDataSize-e,this._currentContextualDataSize=e,this._maxCharsAvailableInSendEvent=this._maxCharsAvailableInSendEvent&&this._saveExcessEventsAndLogRemaining()}_saveExcessEventsAndLogRemaining(){const e=[];for(;this._lengthOfCurrentLogRequest>=this._maxCharsAvailableInSendEvent;){const t=this._logData.INPData.pop();if(t){e.push(t);const i=this._countAdditionalEncodedChars(t);this._lengthOfCurrentLogRequest-=i}}e.forEach((e=>this._updateINPLog(e)))}_countAdditionalEncodedChars(e){const t=!!this._logData.INPData.length;return this._calculateCharsOfEncodedDataObject(e)+(t?this._calculateCharsFromEncodedCommas(1):0)}_updateINPLog(e){const t=this._countAdditionalEncodedChars(e);t+this._lengthOfCurrentLogRequest>this._maxCharsAvailableInSendEvent&&(this._logINPEventsData(),this._clearLogData(),this._lengthOfCurrentLogRequest=0),this._addINPData(e),this._lengthOfCurrentLogRequest+=t}_addINPData(e){this._logData.INPData.push(e)}_logINPEventsData(){W.event("INPComponent","_logINPEventsData",this._logData)}_logINPCounts(){let e=-1/0;for(const[,t]of this._existingInteractions.entries())t.maxINP>e&&(e=t.maxINP);W.event("INPComponent","_logINPCounts",{...this._getNumberOfEventsAndInteractions(),maxINP:e})}_clearLogData(){this._logData.INPData.length=0}_calculateCharsOfEncodedDataObject(e){return encodeURIComponent(JSON.stringify(e)).length}_calculateCharsFromEncodedCommas(e){return e*encodeURIComponent(",").length}_getTargetIdentifiers(e){const t={nodeIdentifier:"",innerText:""};return e instanceof HTMLElement?(t.nodeIdentifier=(i=e).id?`id:${i.id}`:i.classList&&i.classList.value?`class:${i.classList.value.split(" ").join(".")}`:`node:${i.nodeName.toLowerCase()}`,t.innerText=e.innerText&&e.innerText.length<300?e.innerText:"",t):(e instanceof Node&&(t.nodeIdentifier=`node:${e.nodeName}`),t);var i}_getQualitativeINPScore(e){return e<=200?HI:e<=500?$I:qI}_getNumberOfEventsAndInteractions(){return{totalInteractions:this._existingInteractions.size,totalInteractionEvents:this._totalInteractionEvents}}get enabled(){return"PerformanceObserver"in window&&PerformanceObserver&&PerformanceObserver.supportedEntryTypes.includes("event")&&"interactionId"in PerformanceEventTiming.prototype&&this._inpExperiment.result}constructor(e,t,i){super(),this._pageManager=e,this._loggerEventBus=t,this._inpExperiment=i,this._existingInteractions=new Map,this._totalInteractionEvents=0,this._maxCharsAvailableInSendEvent=0,this._currentContextualDataSize=0,this._lengthOfCurrentLogRequest=0,this._logData={INPData:[]}}}GI=B([bn("INPComponent"),D(),j("design:type",Function),j("design:paramtypes",[void 0===Mr?Object:Mr,void 0===q?Object:q,void 0===zI?Object:zI])],GI);var WI,KI,YI=function(){var e=self.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0];if(e&&e.responseStart>0&&e.responseStart(t||100)-1)return i||n;if(i=i?n+">"+i:n,s.id)break;e=s.parentNode}}catch(e){}return i},ZI=-1,ex=function(e){addEventListener("pageshow",(function(t){t.persisted&&(ZI=t.timeStamp,e(t))}),!0)},tx=function(e,t){var i=YI(),s="navigate";return ZI>=0?s="back-forward-cache":i&&(document.prerendering||function(){var e=YI();return e&&e.activationStart||0}()>0?s="prerender":document.wasDiscarded?s="restore":i.type&&(s=i.type.replace(/_/g,"-"))),{name:e,value:-1,rating:"good",delta:0,entries:[],id:"v4-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12),navigationType:s}},ix=function(e,t,i){try{if(PerformanceObserver.supportedEntryTypes.includes(e)){var s=new PerformanceObserver((function(e){Promise.resolve().then((function(){t(e.getEntries())}))}));return s.observe(Object.assign({type:e,buffered:!0},i||{})),s}}catch(e){}},sx=function(e,t,i,s){var n,r;return function(a){t.value>=0&&(a||s)&&((r=t.value-(n||0))||void 0===n)&&(n=t.value,t.delta=r,t.rating=function(e,t){return e>t[1]?"poor":e>t[0]?"needs-improvement":"good"}(t.value,i),e(t))}},nx=function(e){document.addEventListener("visibilitychange",(function(){"hidden"===document.visibilityState&&e()}))},rx=0,ax=1/0,ox=0,lx=function(e){e.forEach((function(e){e.interactionId&&(ax=Math.min(ax,e.interactionId),ox=Math.max(ox,e.interactionId),rx=ox?(ox-ax)/7+1:0)}))},dx=function(){return WI?rx:performance.interactionCount||0},cx=function(){"interactionCount"in performance||WI||(WI=ix("event",lx,{type:"event",buffered:!0,durationThreshold:0}))},hx=[],ux=new Map,px=0,gx=[],mx=function(e){if(gx.forEach((function(t){return t(e)})),e.interactionId||"first-input"===e.entryType){var t=hx[hx.length-1],i=ux.get(e.interactionId);if(i||hx.length<10||e.duration>t.latency){if(i)e.duration>i.latency?(i.entries=[e],i.latency=e.duration):e.duration===i.latency&&e.startTime===i.entries[0].startTime&&i.entries.push(e);else{var s={id:e.interactionId,latency:e.duration,entries:[e]};ux.set(s.id,s),hx.push(s)}hx.sort((function(e,t){return t.latency-e.latency})),hx.length>10&&hx.splice(10).forEach((function(e){return ux.delete(e.id)}))}}},_x=function(e){var t=self.requestIdleCallback||self.setTimeout,i=-1;return e=function(e){var t=!1;return function(){t||(e(),t=!0)}}(e),"hidden"===document.visibilityState?e():(i=t(e),nx(e)),i},fx=[200,500],vx=function(e,t){"PerformanceEventTiming"in self&&"interactionId"in PerformanceEventTiming.prototype&&(t=t||{},function(e){document.prerendering?addEventListener("prerenderingchange",(function(){return e()}),!0):e()}((function(){var i;cx();var s,n=tx("INP"),r=function(e){_x((function(){e.forEach(mx);var t=function(){var e=Math.min(hx.length-1,Math.floor((dx()-px)/50));return hx[e]}();t&&t.latency!==n.value&&(n.value=t.latency,n.entries=t.entries,s())}))},a=ix("event",r,{durationThreshold:null!==(i=t.durationThreshold)&&void 0!==i?i:40});s=sx(e,n,fx,t.reportAllChanges),a&&(a.observe({type:"first-input",buffered:!0}),nx((function(){r(a.takeRecords()),s(!0)})),ex((function(){px=dx(),hx.length=0,ux.clear(),n=tx("INP"),s=sx(e,n,fx,t.reportAllChanges)})))})))},yx=[],bx=[],Sx=0,Ex=new WeakMap,Cx=new Map,Tx=-1,wx=function(e){yx=yx.concat(e),kx()},kx=function(){Tx<0&&(Tx=_x(Ax))},Ax=function(){Cx.size>10&&Cx.forEach((function(e,t){ux.has(t)||Cx.delete(t)}));var e=hx.map((function(e){return Ex.get(e.entries[0])})),t=bx.length-50;bx=bx.filter((function(i,s){return s>=t||e.includes(i)}));for(var i=new Set,s=0;sSx&&t>r||i.has(e)})),Tx=-1};gx.push((function(e){e.interactionId&&e.target&&!Cx.has(e.interactionId)&&Cx.set(e.interactionId,e.target)}),(function(e){var t,i=e.startTime+e.duration;Sx=Math.max(Sx,e.processingEnd);for(var s=bx.length-1;s>=0;s--){var n=bx[s];if(Math.abs(i-n.renderTime)<=8){(t=n).startTime=Math.min(e.startTime,t.startTime),t.processingStart=Math.min(e.processingStart,t.processingStart),t.processingEnd=Math.max(e.processingEnd,t.processingEnd),t.entries.push(e);break}}t||(t={startTime:e.startTime,processingStart:e.processingStart,processingEnd:e.processingEnd,renderTime:i,entries:[e]},bx.push(t)),(e.interactionId||"first-input"===e.entryType)&&Ex.set(e,t),kx()}));var Ix=function(e,t){for(var i,s=[],n=0;i=yx[n];n++)if(!(i.startTime+i.durationt)break;s.push(i)}return s};class xx extends Fn{init(){!function(e,t){KI||(KI=ix("long-animation-frame",wx)),vx((function(t){var i=function(e){var t=e.entries[0],i=Ex.get(t),s=t.processingStart,n=i.processingEnd,r=i.entries.sort((function(e,t){return e.processingStart-t.processingStart})),a=Ix(t.startTime,n),o=e.entries.find((function(e){return e.target})),l=o&&o.target||Cx.get(t.interactionId),d=[t.startTime+t.duration,n].concat(a.map((function(e){return e.startTime+e.duration}))),c=Math.max.apply(Math,d),h={interactionTarget:JI(l),interactionTargetElement:l,interactionType:t.name.startsWith("key")?"keyboard":"pointer",interactionTime:t.startTime,nextPaintTime:c,processedEventEntries:r,longAnimationFrameEntries:a,inputDelay:s-t.startTime,processingDuration:n-s,presentationDelay:Math.max(c-n,0),loadState:XI(t.startTime)};return Object.assign(e,{attribution:h})}(t);e(i)}),t)}(this.logInpWithAttribution.bind(this),{reportAllChanges:!0})}logInpWithAttribution(e){W.event("AttributionINPComponent","logInpWithAttribution",e)}get enabled(){return di()&&this.inpExperiment.result}constructor(e){super(),this.inpExperiment=e}}xx=B([bn("AttributionINPComponent"),M(),j("design:type",Function),j("design:paramtypes",[void 0===zI?Object:zI])],xx);class Px extends Fn{init(){this._userIdEventBus.userIdNeedsRefresh.on((e=>{this._enqueueRequest(e)}))}_enqueueRequest(e){this._requestQueue.push(e),this._isProcessingQueue||this._processQueue().catch((e=>{W.error("RefreshUserIdsComponent","_enqueueRequest","Error processing request queue",e)}))}async _processQueue(){if(0===this._requestQueue.length)return void(this._isProcessingQueue=!1);const e=this._requestQueue.shift();if(e)return this._isProcessingQueue=!0,await this._prebidMethods.refreshUserIds(e.options,e.callback),this._processQueue();this._isProcessingQueue=!1}constructor(e,t){super(),this._userIdEventBus=e,this._prebidMethods=t,this._requestQueue=[],this._isProcessingQueue=!1}}Px=B([bn("RefreshUserIdsComponent"),M(),j("design:type",Function),j("design:paramtypes",[void 0===er?Object:er,void 0===Mn?Object:Mn])],Px);class Ox extends Fn{init(){this._pageManager.visibilityChange.on(this._handleVisibilityChange.bind(this))}async start(){hi()?this._pageManager.setupOnceEvent("click",this._acquireWakeLock.bind(this)):await this._acquireWakeLock()}async _handleVisibilityChange(){null!==this._wakeLock&&"visible"===document.visibilityState&&await this._acquireWakeLock()}_getMaxDurationMinutes(){var e,t,i,s;return Bi()?null!=(t=null==(e=this._adOptions.wakeLock)?void 0:e.desktopValue)?t:this._desktopDefaultDuration:null!=(s=null==(i=this._adOptions.wakeLock)?void 0:i.mobileValue)?s:this._mobileDefaultDuration}async _acquireWakeLock(){try{this._wakeLock=await navigator.wakeLock.request("screen"),this._wakeLock.addEventListener("release",(()=>{this._timeoutId&&clearTimeout(this._timeoutId)}));const e=this._getMaxDurationMinutes();this._timeoutId=setTimeout((()=>{this._wakeLock&&this._wakeLock.release().then((()=>{this._wakeLock=null}))}),this.convertMinutesToMilliseconds(e))}catch(e){}}get enabled(){return!!("wakeLock"in navigator)&&this._wakeLockEnabledInAdOptions()}_wakeLockEnabledInAdOptions(){return void 0===this._adOptions.wakeLock||null!==this._adOptions.wakeLock&&(Ki()||Yi()?this._adOptions.wakeLock.mobileEnabled:!Bi()||this._adOptions.wakeLock.desktopEnabled)}constructor(e,t){super(),this._pageManager=e,this._adOptions=t,this._wakeLock=null,this._timeoutId=null,this._mobileDefaultDuration=15,this._desktopDefaultDuration=30,this.convertMinutesToMilliseconds=e=>60*e*1e3}}Ox=B([M(),bn("WakeLockComponent"),j("design:type",Function),j("design:paramtypes",[void 0===Mr?Object:Mr,void 0===_a?Object:_a])],Ox);class Rx extends Fn{init(){this._gamEventBus.slotOnload.on((({slotId:e})=>this._getAdCoverage(e))),this._slickstreamHeartbeat=document.querySelector("slick-heartbeat"),this._addOptinMonsterPopupEventListener()}start(){this._getSlickstreamCoverage()}_getSlickstreamCoverage(){const e=this._slickstreamHeartbeat&&this._slickstreamHeartbeat.shadowRoot;if(e){const t=e.querySelector("#iconsPanel");t&&this._logCoverage("slickstream",{panelSize:this._getSizeFromElement(t)})}}_addOptinMonsterPopupEventListener(){this._emailCaptureEventBus.selectorFound.on((e=>{this._emailServiceProviderSelectors.has(e.selector)&&this._getEmailCoverage(e)}))}_getEmailCoverage(e){const{selector:t,providerName:i,divs:s}=e;s.length&&s.forEach((e=>{if(!this._loggedEmailPopups.has(e.id)){const s=this._getSizeFromElement(e);this._logCoverage("email",{divSelector:t,size:s,divId:e.id,providerName:i}),this._loggedEmailPopups.add(e.id)}}))}_getAdCoverage(e){const t=this._slots.get(e);t&&this._adsOfInterest.has(t.location)&&setTimeout((()=>{const e=this._getAdDimensions(t);this._logCoverage("ad",e)}),2e3)}_getAdDimensions(e){var t,i,s;const n=null!=(s=e.googleTagSlot.getTargeting("hb_size")[0])?s:"";var r;const a=null!=(r=e.googleTagSlot.getTargeting("hb_bidder")[0])?r:"",o=this._getSizeFromElement(e.element),l=null==(t=e.element.firstElementChild)?void 0:t.cloneNode(!0),d=this._getSizeFromElement(l),c=null==(i=l.firstElementChild)?void 0:i.cloneNode(!0),h=this._getSizeFromElement(c);return e.location.includes(Qe.Video_StickyOutstream)?{adSlotSize:o,hbSize:n,gptContainerSize:d,iframeSize:h,stickyOutstreamContainerSize:this._getStickyOutstreamContainerSize(),hbBidder:a,location:e.location}:{adSlotSize:o,hbSize:n,gptContainerSize:d,iframeSize:h,hbBidder:a,location:e.location}}_getSizeFromElement(e){const t=[this._getSizeFromRectangle.bind(this),this._getSizeFromOffsetProperties.bind(this),this._getSizeFromNamedWidthAndHeightAttributes.bind(this),this._getSizeFromNamedStyleAttribute.bind(this)];for(const i of t){const t=i(e);if(!this._invalidSize(t))return t}return[-1,-1]}_getSizeFromRectangle(e){const t=e.getBoundingClientRect(),i=t.height;return[t.width,i]}_getSizeFromOffsetProperties(e){return[e.offsetWidth,e.offsetHeight]}_getSizeFromNamedWidthAndHeightAttributes(e){var t,i,s;var n;return[+(null!=(s=null==(t=e.attributes.getNamedItem("width"))?void 0:t.nodeValue)?s:-1),+(null!=(n=null==(i=e.attributes.getNamedItem("height"))?void 0:i.nodeValue)?n:-1)]}_getSizeFromNamedStyleAttribute(e){var t;const i=null==(t=e.attributes.getNamedItem("style"))?void 0:t.nodeValue,s=[-1,-1];return null==i||i.replace(/\s/g,"").split(";").forEach((e=>{const[t,i]=e.split(":");"width"===t?s[0]=parseInt(i):"height"===t&&(s[1]=parseInt(i))})),s}_getStickyOutstreamContainerSize(){const e=document.querySelector("#adthrive-stickyoutstream-container");if(e){return this._getSizeFromElement(e)}}_logCoverage(e,t){W.event("ViewportCoverageComponent","_logCoverage",this._constructLog(e,t))}_constructLog(e,t){return{coverageType:e,data:t,viewportSize:this._viewportSize,deviceType:this._deviceType,operatingSystem:this.operatingSystem}}_invalidSize(e){const[t,i]=e;return i===t&&t<=1||!i||!t}constructor(e,t,i){super(),this._gamEventBus=e,this._emailCaptureEventBus=t,this._slots=i,this._adsOfInterest=new Set([Qe.Footer,Qe.Video_StickyInstream,Qe.Video_StickyOutstream]),this._viewportSize=[window.innerWidth,window.innerHeight],this._slickstreamHeartbeat=null,this._emailServiceProviderSelectors=new Set(['div[id$="-optin"]']),this._loggedEmailPopups=new Set('div[id$="-optin"]'),this._deviceType=Xi(),this.operatingSystem=hs()}}Rx=B([M(),j("design:type",Function),j("design:paramtypes",[void 0===Sc?Object:Sc,void 0===wo?Object:wo,void 0===ra?Object:ra])],Rx);class Lx extends Fn{init(){this._footerEventBus.footerRenderEnded.on((e=>{e&&setTimeout((()=>{this._checkIsFooterRibbon()}),500)}))}_checkIsFooterRibbon(){document.querySelectorAll(".raptive-sales.raptive-sales-footer.raptive-sales-vidrbn").length?this._footerEventBus.footerVideoRibbonStateChanged.emit(!0):this._footerEventBus.footerVideoRibbonStateChanged.emit(!1)}get enabled(){return Ki()}constructor(e){super(),this._footerEventBus=e}}Lx=B([D(),j("design:type",Function),j("design:paramtypes",[void 0===Xn?Object:Xn])],Lx);class Dx extends Er{init(){this._key="ContentSizeLogging",this._lookup="CSL",this._default=!1}}Dx=B([bn("ContentSizeLoggingExperiment"),M()],Dx);class Mx extends Fn{start(){const[e]=cs(this._dynamicAdsMapper.get(),this._adInjectionMap);this._initMainContentHeight=e.scrollHeight,this._calculateAndLogTotalSlotHeight(),Ws().then((()=>{W.event("ContentSizeLoggingComponent","init",{fullPageHeight:this._pageContentHeight(),mainContentHeight:this._initMainContentHeight}),this._logImageData()}))}_calculateAndLogTotalSlotHeight(){this._slotManagerEventBus.displaying.once((()=>{this._slotManager.getSlots().forEach((e=>{if(this._shouldAddHeightToTotal(e)){const t=this._clsOptimizedAds.getDivHeight(e.name,Ki()?"phone":"desktop");this._mainContentSlot.has(e.location)?this._slotsForMainContent.set(e.id,t):this._slotsForEnd.set(e.id,t)}this._logSlotHeights()}))}))}_logSlotHeights(){const e=Array.from(this._slotsForMainContent.values()).reduce(((e,t)=>e+t),0),t=e+Array.from(this._slotsForEnd.values()).reduce(((e,t)=>e+t),0);W.event("ContentSizeLoggingComponent","_logSlotHeights",{mainAdSlotHeight:e,fullPageAdSlotHeight:t})}_shouldAddHeightToTotal(e){return!(e.infinite||e.element.classList.contains("adthrive-slicksearch")||this._slotsForMainContent.has(e.name)||this._slotsForEnd.has(e.name))}_logImageData(){if("undefined"==typeof performance)return;const e=performance.getEntriesByType("resource");let t=0,i=0,s=0,n=0;e.forEach((e=>{"img"===e.initiatorType&&(0===e.encodedBodySize?i++:t++,s+=e.encodedBodySize,n+=e.decodedBodySize)}));const r={zeroByteImagesCount:i,nonZeroByteImageCount:t,imagesCompressedSize:`${(s/1048576).toFixed(2)} MB`,imagesUncompressedSize:`${(n/1048576).toFixed(2)} MB`};JSON.stringify(r).length>8e3?W.error("ContentSizeLoggingComponent","_logImageData","log size too large",`siteId: ${this._site.id}`,`pageUrl: ${window.location.href}`):W.event("ContentSizeLoggingComponent","_logImageData",r)}_pageContentHeight(){const e=document.body,t=document.documentElement;return Math.max(e.scrollHeight,e.offsetHeight,t.clientHeight,t.scrollHeight,t.offsetHeight)}get enabled(){return this._contentSizeLoggingExperiment.result}constructor(e,t,i,s,n,r,a){super(),this._dynamicAdsMapper=e,this._adInjectionMap=t,this._contentSizeLoggingExperiment=i,this._slotManager=s,this._slotManagerEventBus=n,this._clsOptimizedAds=r,this._site=a,this._slotsForMainContent=new Map,this._slotsForEnd=new Map,this._mainContentSlot=new Set([Qe.Content,Qe.Recipe]),this._initMainContentHeight=null}}Mx=B([bn("ContentSizeLoggingComponent"),D(),j("design:type",Function),j("design:paramtypes",[void 0===wd?Object:wd,void 0===Uf?Object:Uf,void 0===Dx?Object:Dx,void 0===Kg?Object:Kg,void 0===nr?Object:nr,void 0===kl?Object:kl,void 0===ur?Object:ur])],Mx);class Bx extends Fn{init(){const e=this._slotManagerEventBus.added.on((t=>{const i=this._slotManager.getSlots(t).find((e=>this._isHeaderSlot(e)));i&&(this._setSkylineTargetingOnSlot(i),e())})),t=this._gamEventBus.slotOnload.on((({slotId:e})=>{const i=this._slotManager.getSlot(e);i&&this._isHeaderSlot(i)&&setTimeout((()=>{this._isSkylineAdUnit(i)?this._handleSkylineHeaderRender(i):this._enableFooterSlotAddition(),i.clearSlotTargetingFlag(["skl"]),t()}),this._skylineSearchDelayAfterRender)}))}_setSkylineTargetingOnSlot(e){e.setSlotTargetingFlag("skl",["1"])}_isSkylineAdUnit(e){return this._isHeaderSlot(e)&&!!e.element.getElementsByClassName(this._skylineUnitClassName).length}_handleSkylineHeaderRender(e){this._slotManager.updateRefreshTimeout(e,this._skylineRenderDuration),this._listenForSkylineClosed();const t=this._slotEventBus.beforeGoogleAdManagerRefreshSlots.on((e=>{this._slotManager.getSlots(e).some((e=>this._isHeaderSlot(e)))&&(this._enableFooterSlotAddition(),t())}));this._handleSkylineAfter60Seconds(e)}_listenForSkylineClosed(){window.addEventListener("message",(e=>{this._isSkylineClosedMessage(e)&&this._enableFooterSlotAddition()}))}_isSkylineClosedMessage(e){const t=e.data;return!!t&&"object"==typeof t&&"type"in t&&"string"==typeof t.type&&"CeltraSkyline"===t.type&&"action"in t&&"string"==typeof t.action&&"closed"===t.action}_handleSkylineAfter60Seconds(e){setTimeout((()=>{this._footerSlotAdded||this._slotManager.refresh(e)}),this._skylineRenderDuration)}_enableFooterSlotAddition(){this._footerSlotAdded=!0,this._skylineEventBus.footerSlotAdditionEnabled.emit()}get enabled(){return this._adTypes.skylineHeader&&Bi()}_isHeaderSlot(e){return e.location===Qe.Header}constructor(e,t,i,s,n,r){super(),this._adTypes=e,this._gamEventBus=t,this._skylineEventBus=i,this._slotManagerEventBus=s,this._slotManager=n,this._slotEventBus=r,this._footerSlotAdded=!1,this._skylineSearchDelayAfterRender=750,this._skylineRenderDuration=6e4,this._skylineUnitClassName="raptive-sales-sky"}}Bx=B([bn("SkylineAdsComponent"),M(),j("design:type",Function),j("design:paramtypes",[void 0===Ca?Object:Ca,void 0===Sc?Object:Sc,void 0===cv?Object:cv,void 0===nr?Object:nr,void 0===Kg?Object:Kg,void 0===Bn?Object:Bn])],Bx);class Fx extends Fn{init(){this._listenForSlotsAdded(),this._featureRolloutEnabled?this._setScrollListenerAndCreateObservers():this._jumpToSlotManager.enabled&&(this._jumpToSlotManager._onJumpToRecipeTrackerClicked.once((()=>{this._setScrollListenerAndCreateObservers()})),this._jumpToSlotManager.preventedSlotsFromBeingAdded.on((e=>{e.forEach((e=>{this._storeSlotDataAndObserveForRestore(e.element,e)}))})))}_setScrollListenerAndCreateObservers(){this._pageManager.scroll.on(pc((()=>this._handleScroll.call(this,window.scrollY)),100)),this._observerForDestroyingSlots=this._createObserverForDestroyingSlots(),this._observerForRestoringSlots=this._createObserverForRestoringSlots()}_listenForSlotsAdded(){this._slotManagerEventBus.added.on((e=>{this._slotManager.getSlots(e).forEach((e=>{this._slotFilter(e)&&this._observerForDestroyingSlots&&!this._destroySlotIfAboveByTwoViewports(e)&&this._observerForDestroyingSlots.observe(e.element)}))}))}async _handleScroll(e){const t=(e-this._lastScroll)/window.innerHeight;if(t<=-1)for(const[e,t]of this._destroyedSlots){const i=document.getElementById(e);i&&Qi(i)>=0&&await this._restoreSlot(i,t)}else t>=1&&this._slotManager.getSlots().forEach((e=>this._slotFilter(e)&&this._destroySlotIfAboveByTwoViewports(e)));this._lastScroll=e}_destroySlotIfAboveByTwoViewports(e){return e.getPositionFromViewport()<=-3&&!this._destroyedSlots.has(e.id)&&(this._destroySlot(e.element,e),!0)}_createObserverForDestroyingSlots(){return new IntersectionObserver(this._processSlotsForDeletion.bind(this),{root:null,rootMargin:"300% 0px -300% 0px",threshold:[0]})}_createObserverForRestoringSlots(){return new IntersectionObserver((e=>{this._processSlotsForRestoration(e).catch((e=>W.error("ContentSlotsIntersectionObserverComponent","_processSlotsForRestoration",e)))}),{root:null,rootMargin:"200% 0px -200% 0px",threshold:[0]})}_storeContentSlotConfig(e,t){const{location:i,sequence:s,sticky:n,lazy:r,stickyOverlapSelector:a,special:o,auctionPriority:l,element:d,sizes:c,infinite:h}=t;this._destroyedSlots.set(e,{location:i,sequence:s,sticky:n,lazy:r,stickyOverlapSelector:a,special:o,auctionPriority:l,element:d,sizes:c,infinite:h})}_processSlotsForDeletion(e){e.forEach((e=>{const t=this._slotManager.getSlot(e.target.id);t&&e.isIntersecting&&this._lastScrollwindow.scrollY&&await this._restoreSlot(t.target,e)}}async _restoreSlot(e,t){this._observerForRestoringSlots&&(this._observerForRestoringSlots.unobserve(e),this._destroyedSlots.delete(e.id),await this._slotManager.add(new na(t.location,t.sequence,t.sizes,t.element,t.sticky,t.lazy,t.auctionPriority,t.stickyOverlapSelector,t.special,!0,t.infinite)))}get enabled(){return Fi()&&Ki()&&(this._jumpToSlotManager.enabled||this._featureRolloutEnabled)&&"IntersectionObserver"in window&&"IntersectionObserverEntry"in window&&"intersectionRatio"in IntersectionObserverEntry.prototype}constructor(e,t,i,s,n){super(),this._slotManager=e,this._slotEventBus=t,this._slotManagerEventBus=i,this._pageManager=s,this._jumpToSlotManager=n,this._destroyedSlots=new Map,this._observerForDestroyingSlots=null,this._observerForRestoringSlots=null,this._lastScroll=window.scrollY,this._featureRolloutEnabled=!1,this._featureRolloutEnabled=Ur.isRolloutEnabled("ios-manage-content-slots");const r=e=>e.location===Qe.Content;this._slotFilter=this._featureRolloutEnabled?e=>!!r(e):e=>!!(r(e)&&e.sequence&&e.sequence<=3)}}Fx=B([bn("ContentSlotsIntersectionObserverComponent"),M(),j("design:type",Function),j("design:paramtypes",[void 0===Kg?Object:Kg,void 0===Bn?Object:Bn,void 0===nr?Object:nr,void 0===Mr?Object:Mr,void 0===Wg?Object:Wg])],Fx);class jx extends ${constructor(...e){super(...e),this.velocityChange=new V}}jx=B([M()],jx);class Nx extends Fn{get enabled(){return!1}init(){this._lastScrollTop=window.scrollY,this._lastTimestamp=performance.now(),this._pageManager.scroll.on((()=>this._handleScroll()))}_handleScroll(){this._calculateScrollVelocity(),this._scrollStopTimeout&&clearTimeout(this._scrollStopTimeout),this._scrollStopTimeout=setTimeout((()=>{this._scrollVelocityPxPerMs=0,this._scrollVelocityTrackerEventBus.velocityChange.emit(this._scrollVelocityPxPerMs)}),200)}_calculateScrollVelocity(){const e=performance.now(),t=window.scrollY,i=e-this._lastTimestamp,s=t-this._lastScrollTop;if(this._userScrolled(i,s)){const e=s/i;this._scrollVelocityPxPerMs=.5*this._scrollVelocityPxPerMs+.5*e,this._scrollVelocityTrackerEventBus.velocityChange.emit(this._scrollVelocityPxPerMs)}this._lastScrollTop=t,this._lastTimestamp=e}get scrollVelocityPxPerMs(){return this._scrollVelocityPxPerMs}_userScrolled(e,t){return e>0&&0!==t}constructor(e,t){super(),this._pageManager=e,this._scrollVelocityTrackerEventBus=t,this._lastScrollTop=0,this._lastTimestamp=0,this._scrollVelocityPxPerMs=0,this._scrollStopTimeout=null}}Nx=B([D(),j("design:type",Function),j("design:paramtypes",[void 0===Mr?Object:Mr,void 0===jx?Object:jx])],Nx);class Ux{init(){this._components.forEach((e=>{try{e.init&&e.enabled&&e.init()}catch(t){W.error("Components","init",`${e.constructor.name} failed to initialize:`,t)}}))}start(){this._components.forEach((e=>{try{e.start&&e.enabled&&e.start()}catch(t){W.error("Components","start",`${e.constructor.name} failed to start:`,t)}}))}constructor(e,t,i,s,n,r,a,o,l,d,c,h,u,p,g,m,_,f,v,y,b,S,E,C,T,w,k,A,I,x,P,O,R,L,D,M,B,F,j,N,U,V,z,H,$,q,G,W,K,Y,X,Q,J,Z,ee,te,ie,se,ne,re,ae,oe,le,de,ce,he,ue,pe,ge,me,_e,fe,ve,ye,be,Se,Ee,Ce,Te,we,ke,Ae,Ie,xe,Pe,Oe){this._config=e,this._components=[t,i,s,n,r,a,o,l,d,c,h,u,p,g,m,_,f,ye,v,y,b,S,E,C,T,w,k,A,I,x,O,L,P,D,M,B,F,j,N,U,V,z,H,$,q,Ce,G,W,K,Y,X,J,Z,ee,Q,te,ie,se,ne,re,ae,oe,le,R,ce,de,he,ue,pe,ge,me,_e,fe,ve,be,Se,Ee,Te,we,ke,Ae,Ie,xe,Pe,Oe]}}Ux=B([bn("Components"),D(),j("design:type",Function),j("design:paramtypes",[void 0===_c?Object:_c,void 0===Hf?Object:Hf,void 0===$f?Object:$f,void 0===nI?Object:nI,void 0===Gf?Object:Gf,void 0===Wf?Object:Wf,void 0===Yf?Object:Yf,void 0===rI?Object:rI,void 0===Vv?Object:Vv,void 0===BI?Object:BI,void 0===pI?Object:pI,void 0===Xf?Object:Xf,void 0===Qf?Object:Qf,void 0===uI?Object:uI,void 0===Jf?Object:Jf,void 0===uv?Object:uv,void 0===aI?Object:aI,void 0===hv?Object:hv,void 0===Nv?Object:Nv,void 0===pv?Object:pv,void 0===II?Object:II,void 0===gv?Object:gv,void 0===Uc?Object:Uc,void 0===xv?Object:xv,void 0===Pv?Object:Pv,void 0===dI?Object:dI,void 0===Ov?Object:Ov,void 0===gy?Object:gy,void 0===Lv?Object:Lv,void 0===Dv?Object:Dv,void 0===Mv?Object:Mv,void 0===gI?Object:gI,void 0===WA?Object:WA,void 0===my?Object:my,void 0===oI?Object:oI,void 0===eI?Object:eI,void 0===iI?Object:iI,void 0===sI?Object:sI,void 0===lI?Object:lI,void 0===jv?Object:jv,void 0===mI?Object:mI,void 0===fy?Object:fy,void 0===yy?Object:yy,void 0===_I?Object:_I,void 0===Sy?Object:Sy,void 0===wy?Object:wy,void 0===Ny?Object:Ny,void 0===Uy?Object:Uy,void 0===zy?Object:zy,void 0===Hy?Object:Hy,void 0===Ky?Object:Ky,void 0===SI?Object:SI,void 0===Gy?Object:Gy,void 0===Wy?Object:Wy,void 0===AI?Object:AI,void 0===Af?Object:Af,void 0===py?Object:py,void 0===wI?Object:wI,void 0===kI?Object:kI,void 0===vI?Object:vI,void 0===yI?Object:yI,void 0===Yy?Object:Yy,void 0===qA?Object:qA,void 0===Ff?Object:Ff,void 0===Cp?Object:Cp,void 0===Xy?Object:Xy,void 0===Nk?Object:Nk,void 0===Lx?Object:Lx,void 0===UA?Object:UA,void 0===RI?Object:RI,void 0===HA?Object:HA,void 0===MI?Object:MI,void 0===yc?Object:yc,void 0===VI?Object:VI,void 0===FI?Object:FI,void 0===GI?Object:GI,void 0===xx?Object:xx,void 0===Px?Object:Px,void 0===Ox?Object:Ox,void 0===KA?Object:KA,void 0===JA?Object:JA,void 0===Rx?Object:Rx,void 0===Mx?Object:Mx,void 0===Bx?Object:Bx,void 0===Fx?Object:Fx,void 0===Nx?Object:Nx])],Ux);Kf('.adthrive-ad{clear:both;line-height:0;margin-bottom:10px;margin-top:10px;overflow-x:visible;text-align:center}.adthrive-ad-cls{align-items:center;display:flex;flex-wrap:wrap;justify-content:center}.adthrive-ad-cls>div,.adthrive-ad-cls>iframe{flex-basis:100%}.adthrive-interstitial{margin-bottom:0;margin-top:0}.adthrive-native-recipe{display:inline-block}.adthrive-recipe{min-width:300px;position:relative;z-index:1}.adthrive-footer-mobile,.adthrive-header-mobile{min-height:50px}.adthrive-footer-desktop,.adthrive-footer-tablet,.adthrive-header-desktop,.adthrive-header-tablet{min-height:90px}.adthrive-below-post,.adthrive-content,.adthrive-recipe,.adthrive-sidebar{min-height:250px}.adthrive-device-desktop .adthrive-recipe,.adthrive-device-tablet .adthrive-recipe{max-width:320px}.adthrive-stuck.adthrive-sticky.adthrive-header,.adthrive-stuck.adthrive-sticky.adthrive-sidebar{position:fixed;top:0;z-index:9999}.adthrive-stuck.adthrive-header{margin-top:0}.adthrive-stuck.adthrive-sticky-outstream{display:none;position:fixed;z-index:2147483644}.adthrive-sticky.adthrive-footer{background-color:hsla(0,0%,100%,.8);border-top:2px solid hsla(0,0%,88%,.8);bottom:0;box-sizing:content-box;left:0;margin:0;max-height:100px;overflow:hidden;position:fixed;text-align:center;width:100%;z-index:1000001}.adthrive-sticky.adthrive-footer>.adthrive-close{background:#fff;border:1px solid #b2b2b2;border-radius:20px;color:#b2b2b2;cursor:pointer;display:inline-block;font-family:Arial,sans-serif;font-size:20px;line-height:20px;padding:0 5px;position:absolute;right:5px;top:5px}.adthrive-device-desktop .adthrive-sticky.adthrive-footer>.adthrive-close{right:10px;top:10px}.adthrive-ccpa-link,.adthrive-footer-message,.adthrive-privacy-preferences{margin-top:5px;text-align:center}.adthrive-footer>div,.adthrive-header>div{max-width:1200px}.raptive-player-reset>*{background-color:transparent;border:0;box-shadow:none;box-sizing:border-box;clear:both;color:inherit;direction:ltr;display:block;float:none;font-family:Arial,Helvetica,sans-serif;font-size:16px;font-stretch:normal;font-style:normal;font-variant:normal;font-weight:400;letter-spacing:normal;line-height:1.2;margin:0;overflow-wrap:normal;padding:0;text-align:left;text-decoration:none;text-transform:none;white-space:normal;word-spacing:normal}#next-video,#stay-video{background-color:#333;color:#fff;cursor:pointer;height:40px;line-height:40px;margin:5px;opacity:.9;position:relative;text-align:center;text-transform:capitalize;width:100px}.adthrive-collapse-mobile #next-video,.adthrive-collapse-mobile #stay-video,.adthrive-player-position-mobile #next-video,.adthrive-player-position-mobile #stay-video,.jw-flag-small-player #next-video,.jw-flag-small-player #stay-video,.raptive-player-container-mobile #next-video,.raptive-player-container-mobile #stay-video{height:30px;line-height:30px;width:75px}#next-stay-container{bottom:0;display:flex;flex-flow:column;justify-content:center;margin:12px;position:absolute;right:0;top:0;z-index:1}.adthrive-collapse-mobile #next-stay-container,.adthrive-player-position-mobile #next-stay-container,.jw-flag-small-player #next-stay-container,.raptive-player-container-mobile #next-stay-container{margin:0}#next-video:before{background-color:red;content:"";display:block;height:100%;position:absolute;transform-origin:left;width:100%;will-change:transform,opacity;z-index:1}#next-stay-container.active>#next-video:before{animation:scaleInFromLeft 5s linear 0s 1}#next-video span{position:relative;z-index:2}@keyframes scaleInFromLeft{0%{opacity:0;transform:scaleX(0)}to{opacity:1;transform:scaleX(1)}}.video-box-shadow{box-shadow:0 0 10px rgba(0,0,0,.5)}.adthrive-wrapper-bar{background-color:#595959;border-top-left-radius:5px;border-top-right-radius:5px;display:none;font-family:Arial,Helvetica,sans-serif;height:36px}.adthrive-video-title{color:#fff;font-size:13px;font-weight:700;text-decoration:none}.adthrive-wrapper-title-wrapper{align-items:center;border:none;box-shadow:none;display:inline-flex;justify-content:center;margin-left:10px;margin-right:10px;min-width:0}.adthrive-wrapper-title-wrapper>a>svg,.adthrive-wrapper-title-wrapper>div>svg{vertical-align:middle;fill:#fff;margin-right:5px}.adthrive-wrapper-title-wrapper>a{text-decoration:none}.adthrive-video-text-cutoff{color:#fff;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.adthrive-collapse-player{border-bottom:1px solid #dbdbdb;border-top:1px solid #dbdbdb;margin-left:auto;margin-right:auto;padding:8px!important;width:90%}.adthrive-outstream-container{flex-basis:unset!important;margin:0 auto;position:relative}.adthrive-player-idle{display:none;transition:all .5s ease-out;transition-delay:.5s}.raptive-player-ad-container-idle{display:none}.adthrive-player-playing{display:block;transition:all .5s ease-in;transition-delay:.5s}.adthrive-sticky-outstream-active.adthrive-new-outstream-player{animation-duration:.5s;animation-iteration-count:1;animation-name:adthrive-fade-in;animation-timing-function:ease-in;opacity:1}.adthrive-sticky-outstream-idle.adthrive-new-outstream-player{animation-duration:.5s;animation-iteration-count:1;animation-name:adthrive-fade-out;animation-timing-function:ease-out;display:block;opacity:0}@keyframes adthrive-fade-in{0%{opacity:0}to{opacity:1}}@keyframes adthrive-fade-out{0%{opacity:1}to{opacity:0}}.adthrive-player-ad-controls-play{margin:-5px 4px;z-index:1001}.adthrive-player-icon-play>svg{margin-left:4px}.adthrive-player-ad-controls-pause{display:flex;justify-content:center}.adthrive-player-ad-controls-volume-container{border-radius:36px;display:flex;flex-direction:column-reverse;height:36px;position:relative;z-index:1001}.adthrive-player-ad-controls-volume-container-with-bar{top:-5px}.adthrive-player-ad-controls-volume-container>.adthrive-player-ad-controls-volume{display:flex;flex-direction:column-reverse;height:55px;position:relative}.adthrive-player-ad-controls-play>.adthrive-player-icon.adthrive-player-icon-pause,.adthrive-player-ad-controls-volume>.adthrive-player-icon-volume-muted,.adthrive-player-ad-controls-volume>.adthrive-player-icon.adthrive-player-icon-volume-unmuted,.adthrive-player-ad-controls-volume>.adthrive-player-volume-control,.adthrive-player-ad-controls>.adthrive-player-ad-controls-volume-container{margin-block-start:0}.adthrive-player-icon-volume-muted,.adthrive-player-icon-volume-unmuted{z-index:2}.adthrive-player-ad-controls-play,.adthrive-player-ad-controls-volume{border-radius:36px;display:inline-block;height:36px;width:36px}.adthrive-player-ad-controls-play.active,.adthrive-player-ad-controls-play:hover,.adthrive-player-ad-controls-volume-container:hover,.adthrive-player-icon-fullscreen:focus,.adthrive-player-icon-fullscreen:hover,.adthrive-player-icon-volume.active{background:rgba(0,0,0,.3)}.adthrive-player-ad-controls-volume-container-with-slider:hover{background:none}.adthrive-player-ad-controls-volume-container.active{z-index:1001}.adthrive-player-icon{align-items:center;background:transparent;border:none;border-radius:100%;cursor:pointer;display:flex;height:36px;justify-content:center;margin-right:4px;padding:0;width:36px}.adthrive-hidden{display:none!important}.adthrive-display-unset{display:unset!important}.adthrive-count-down{background:rgba(0,0,0,.5);border-bottom-right-radius:4px;color:#fff;font-size:12px;height:auto;left:0;line-height:1.2;outline:none;padding:4px;pointer-events:none;position:absolute;text-shadow:#000 0 0 1px,#000 0 0 1px,#000 0 0 1px,#000 0 0 1px;top:0;width:auto;z-index:1}.adthrive-collapse-medium>.adthrive-count-down,.adthrive-collapse-small>.adthrive-count-down{padding:2px}.adthrive-player-icon svg{filter:drop-shadow(3px 5px 3px rgb(0 0 0/.5));pointer-events:none}.adthrive-player-ad-container{bottom:0;margin:0;position:absolute}.adthrive-player-ad-container-loading{align-items:center;background-color:#000;display:flex;height:100%;justify-content:center}.adthrive-player-ad-container{overflow:hidden}.adthrive-loading-spinner-container{align-items:center;bottom:0;justify-content:center;left:0;position:absolute;right:0;top:0;z-index:2147483647}.adthrive-loading-spinner{animation:spin 1s ease-in-out infinite;-webkit-animation:spin 1s ease-in-out infinite;border:3px solid hsla(0,0%,100%,.3);border-radius:50%;border-top-color:#fff;height:50px;width:50px}@keyframes spin{to{-webkit-transform:rotate(1turn)}}@-webkit-keyframes spin{to{-webkit-transform:rotate(1turn)}}.adthrive-title-overlay{align-items:center;background:rgba(0,0,0,.4);border-radius:0;box-sizing:border-box;color:#fff;display:flex;flex-direction:row;height:0;justify-content:flex-start;left:0;position:absolute;right:0;top:0;transition:background .3s ease-out;z-index:1}.adthrive-title-overlay.active{height:36px}.adthrive-title-overlay>.adthrive-wrapper-title-wrapper{align-items:center;display:none;flex-direction:row-reverse;height:100%;overflow:hidden;text-decoration:none;width:100%}.adthrive-title-overlay.active>.adthrive-wrapper-title-wrapper{display:flex}.adthrive-player-ad-container-loading~.adthrive-title-overlay,.adthrive-title-overlay.active>.adthrive-wrapper-title-wrapper:after{display:none}.adthrive-wrapper-bar a[target=_blank]:after{display:none!important}.adthrive-no-pointer-events{pointer-events:none}.adthrive-display-none{display:none}.adthrive-small-text{font-size:13px}.adthrive-video-title-description-container{display:flex;flex:1;flex-direction:column;font-size:1.2em;height:100%;line-height:1.1em}#adthrive-video-title-text{align-items:center;display:flex;flex:1}.adthrive-player-position-mobile #adthrive-video-title-text,.raptive-player-container-mobile #adthrive-video-title-text{font-size:.85em}#adthrive-video-description-text{align-items:center;display:flex;flex:1;font-size:1vw;margin:-4px 0 0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.adthrive-video-play-button{border-bottom:30px solid transparent;border-left:60px solid #fff;border-top:30px solid transparent;cursor:pointer;height:0;width:0;z-index:1}.raptive-player-position{background-color:#000;clear:both;padding-top:56.25%;position:relative;width:100%}.raptive-player-container{bottom:0;height:100%;left:0;position:absolute;right:0;top:0;z-index:1}.raptive-player-hidden{display:none}.raptive-player-video{height:100%;margin-block:0!important;width:100%}.raptive-player-collapse{background-color:#000;max-height:169px;z-index:2147483644}.adthrive-video-overlay{align-items:center;background-color:rgba(0,0,0,.5);bottom:0;cursor:pointer;display:flex;justify-content:center;left:0;margin-block-start:unset;position:absolute;right:0;top:0;z-index:4}.adthrive-player-big-play-button{color:#6b65ff;font-size:48px}@media (max-width:480px){.adthrive-player-big-play-button{font-size:44px}}@media (min-width:481px) and (max-width:768px){.adthrive-player-big-play-button{font-size:77px}}@media (min-width:769px){.adthrive-player-big-play-button{font-size:88px}}.adthrive-sticky-outstream.adthrive-sticky-outstream-mobile .adthrive-player-ad-container{margin-bottom:2px;margin-top:2px}.adthrive-player-ad-controls.adthrive-player-ad-controls-hidden{opacity:0!important;pointer-events:none;transition:opacity .5s!important}.adthrive-player-ad-controls{bottom:0;display:flex;height:50px;left:0;line-height:18px;opacity:1;padding:0;position:absolute;text-align:left;transform:translateY(12px);transition:opacity .5s ease-out,transform .2s ease-out;width:auto;z-index:1000000}.adthrive-full-width{width:100%}.adthrive-player-ad-controls.adthrive-player-progress-bar-visible{transform:translateY(0)}.adthrive-player-progress-bar-container{bottom:0;cursor:pointer;display:none;height:20px;left:2%;pointer-events:all;position:absolute;width:96%;z-index:1000}.adthrive-collapse-mobile .adthrive-player-progress-bar-container{left:3%;width:94%}.adthrive-player-progress-bar-container.active{display:initial}.adthrive-player-progress-bar{background-color:#ccc;border-radius:36px;bottom:0;height:6px;margin:auto 0;overflow:hidden;position:absolute;top:0;width:100%}.adthrive-player-progress-bar div{background-color:#6b65ff;content:"";display:block;height:100%;transform-origin:left;width:100%}.adthrive-player-progress-bar-handle{background-color:#6b65ff;border-radius:50%;box-shadow:0 0 10px rgba(0,0,0,.4);height:12px;left:0;position:absolute;top:50%;touch-action:none;transform:translate(-50%,-50%) scale(1);width:12px;z-index:1001}.adthrive-player-progress-bar-handle:before{content:"";display:block;height:20px;transform:translate(-4px,-4px);width:20px}.adthrive-player-volume-control{align-items:center;background:rgba(0,0,0,.5);border-radius:36px;display:flex;height:36px;justify-content:center;margin:auto;opacity:0;padding-left:30px;position:absolute;transform:rotate(270deg);transform-origin:18px;width:120px;z-index:1}.adthrive-player-volume-control.adPlaying{top:20px}.adthrive-player-volume-control input[type=range]{-webkit-appearance:none;background-color:#777;border:0;border-radius:20px;box-shadow:none;cursor:pointer;height:10px;margin:0;outline:0;overflow:hidden;padding:0;position:relative;vertical-align:bottom;width:65px;z-index:1001}.adthrive-player-volume-control input[type=range]::-webkit-slider-runnable-track{-webkit-appearance:none;color:#777;height:10px;margin-top:-1px}.adthrive-player-volume-control input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;background:#fff;border-radius:50%;box-shadow:-325px 0 0 320px #6b65ff,inset 0 0 0 40px #fff;cursor:pointer;height:10px;position:relative;top:.5px;width:10px}.adthrive-player-volume-control input[type=range]:active::-webkit-slider-thumb{background:#fff;box-shadow:-325px 0 0 320px #6b65ff,inset 0 0 0 3px #fff}.adthrive-player-volume-control input[type=range]::-moz-range-thumb{height:10px;width:10px}.adthrive-player-volume-control input[type=range]::-moz-range-progress{background-color:#ddd;box-shadow:-325px 0 0 320px #6b65ff,inset 0 0 0 3px #6b65ff}.adthrive-player-volume-control input[type=range]::-moz-range-track{background-color:#777}.adthrive-player-volume-control input[type=range]::-ms-fill-lower{background-color:#ddd;box-shadow:-325px 0 0 320px #6b65ff,inset 0 0 0 3px #6b65ff}.adthrive-player-volume-control input[type=range]::-ms-fill-upper{background-color:#777}.adthrive-jw-player-collapse{z-index:2147483644}.adthrive-player-position.adthrive-collapse-float,.raptive-player-container.adthrive-collapse-float{position:fixed;width:300px!important}.adthrive-player-position.adthrive-collapse-float #adthrive-video-description-text,.raptive-player-container.adthrive-collapse-float #adthrive-video-description-text{display:none}.adthrive-player-position.adthrive-collapse-float.adthrive-collapse-right,.raptive-player-container.adthrive-collapse-float.adthrive-collapse-right{bottom:auto;left:auto;right:5px;top:0}.adthrive-player-position.adthrive-collapse-float.adthrive-collapse-bottom-right,.raptive-player-container.adthrive-collapse-float.adthrive-collapse-bottom-right{bottom:100px;left:auto;right:5px;top:auto}.adthrive-player-position.adthrive-collapse-float.adthrive-collapse-bottom-left,.raptive-player-container.adthrive-collapse-float.adthrive-collapse-bottom-left{bottom:100px;left:auto;top:auto}.adthrive-player-position.adthrive-collapse-float>.adthrive-player-title,.raptive-player-container.adthrive-collapse-float>.adthrive-player-title{display:none}.adthrive-player-position.adthrive-collapse-sticky,.raptive-player-container.adthrive-collapse-sticky{padding-bottom:20px;padding-top:20px;position:fixed;z-index:9999}.adthrive-player-position.adthrive-collapse-sticky>.adthrive-player-title,.raptive-player-container.adthrive-collapse-sticky>.adthrive-player-title{display:none}.adthrive-sticky-outstream.adthrive-sticky-outstream-top-center.adthrive-sticky-outstream-mobile{bottom:auto!important;top:0;transform:translate(0)!important}body.adthrive-device-phone .adthrive-sticky-outstream.adthrive-sticky-outstream-active.adthrive-sticky-outstream-top-center{bottom:auto!important}.adthrive-collapse-mobile-background{left:0;position:fixed;top:0;z-index:99990}.adthrive-collapse-mobile-background.extra-height{height:163px!important}.adthrive-top-collapse-close{left:-30px;position:fixed;top:5px;z-index:1}.adthrive-sticky-outstream-top-center>.adthrive-top-collapse-close{left:10px;position:fixed;top:48px}.adthrive-sticky-outstream-top-center.adthrive-sticky-outstream-mobile>.adthrive-top-collapse-close{top:10px}.adthrive-top-collapse-wrapper-bar>* .adthrive-top-collapse-close{left:0;position:relative;top:0}.adthrive-top-collapse-wrapper-bar>* .adthrive-wrapper-float-close{display:none;float:none;margin-bottom:0}.adthrive-top-collapse-close-spacer{line-height:1.2}.adthrive-player-position.adthrive-collapse-mobile,.raptive-player-container.adthrive-collapse-mobile{position:fixed;width:300px;z-index:99998}.adthrive-player-position.adthrive-collapse-mobile.adthrive-collapse-medium,.adthrive-player-position.adthrive-collapse-mobile.adthrive-collapse-small{width:178px}.raptive-player-container.adthrive-collapse-mobile.adthrive-collapse-medium,.raptive-player-container.adthrive-collapse-mobile.adthrive-collapse-small{bottom:unset;height:101px;left:unset;right:unset;top:unset;width:178px}.adthrive-player-position.adthrive-collapse-mobile.adthrive-collapse-top-right,.raptive-player-container.adthrive-collapse-mobile.adthrive-collapse-top-right{right:10px;top:26px}.adthrive-player-position.adthrive-collapse-mobile.adthrive-collapse-top-left,.raptive-player-container.adthrive-collapse-mobile.adthrive-collapse-top-left{left:5px;top:26px}.adthrive-player-position.adthrive-collapse-mobile.adthrive-collapse-bottom-left,.raptive-player-container.adthrive-collapse-mobile.adthrive-collapse-bottom-left{bottom:52px;left:5px}.adthrive-player-position.adthrive-collapse-mobile.adthrive-collapse-bottom-right,.raptive-player-container.adthrive-collapse-mobile.adthrive-collapse-bottom-right{bottom:52px;right:10px}.adthrive-player-position.adthrive-collapse-mobile>.adthrive-player-title,.raptive-player-container.adthrive-collapse-mobile>.adthrive-player-title{display:none}.adthrive-player-position.adthrive-collapse-mobile.adthrive-collapse-top-center>.adthrive-wrapper-bar,.raptive-player-container.adthrive-collapse-mobile.adthrive-collapse-top-center>.adthrive-wrapper-bar{display:none!important}.adthrive-player-position.adthrive-collapse-mobile.adthrive-collapse-top-center>.adthrive-top-collapse-wrapper-bar,.raptive-player-container.adthrive-collapse-mobile.adthrive-collapse-top-center>.adthrive-top-collapse-wrapper-bar{display:block}.adthrive-player-position.adthrive-collapse-mobile.adthrive-collapse-top-center.adthrive-player-without-wrapper-text,.raptive-player-container.adthrive-collapse-mobile.adthrive-collapse-top-center.adthrive-player-without-wrapper-text{bottom:auto;left:50%;padding-bottom:1px!important;padding-top:0!important;right:auto;top:0;transform:translateX(-50%)}.adthrive-player-position.adthrive-collapse-mobile.adthrive-collapse-top-center.adthrive-player-with-wrapper-text,.raptive-player-container.adthrive-collapse-mobile.adthrive-collapse-top-center.adthrive-player-with-wrapper-text{bottom:auto;left:auto;padding-bottom:1px!important;padding-top:0!important;right:5px;top:0}.adthrive-player-position.adthrive-collapse-mobile.adthrive-collapse-top-center,.raptive-player-container.adthrive-collapse-mobile.adthrive-collapse-top-center{transition:none!important}.adthrive-top-collapse-wrapper-bar{color:#fff;display:none;left:5px;padding-bottom:5px;padding-top:5px;position:fixed;top:0;width:-webkit-calc(100% - 188px);width:-moz-calc(100% - 188px);width:calc(100% - 188px);z-index:99998}.adthrive-top-collapse-wrapper-video-title{color:#fff;display:-webkit-box;font-size:13px;font-weight:700;overflow:hidden;text-decoration:none;text-overflow:ellipsis;-webkit-line-clamp:3;line-clamp:3;-webkit-box-orient:vertical}.adthrive-top-collapse-wrapper-bar a a.adthrive-learn-more-link{display:inline-block;font-size:13px}.adthrive-top-collapse-wrapper-bar a a.raptive-player-learn-more-link{display:none}.adthrive-top-collapse-wrapper-bar a a.raptive-player-learn-more-link.raptive-player-learn-more-link-active{display:inline-block}h3.adthrive-player-title{margin:10px 0}.adthrive-wrapper-close{align-items:center;color:#fff;font-size:36px;height:36px;justify-content:center;margin-left:auto;margin-right:0;min-width:36px}.adthrive-wrapper-float-close{cursor:pointer;display:none;float:right;margin-bottom:5px}.adthrive-top-left-outer{height:78px;left:-30px;position:absolute;top:-55px;width:78px}.adthrive-top-right-outer{height:78px;position:absolute;right:-30px;top:-55px;width:78px}.adthrive-top-left-outer>svg{bottom:30px;left:30px;position:absolute}.adthrive-top-right-outer>svg{bottom:30px;position:absolute;right:30px}.adthrive-top-left-inner{position:absolute;top:0}.adthrive-top-left-inner.adthrive-wrapper-float-close{background:rgba(0,0,0,.5);color:#fff;padding:2px;pointer-events:none;width:100%;z-index:99}.adthrive-new-outstream-player .adthrive-top-left-inner.adthrive-wrapper-float-close{z-index:10000}.adthrive-new-outstream-player .adthrive-ad{margin-bottom:0;margin-top:0}.adthrive-top-left-inner-wrapper.adthrive-wrapper-float-close{background:rgba(0,0,0,.5);color:#fff;padding:2px;pointer-events:none;position:absolute;top:36px;width:100%;z-index:10000}.adthrive-sticky-outstream>.adthrive-wrapper-float-close.adthrive-wrapper-close-outside-left{left:2px}.adthrive-sticky-outstream>.adthrive-wrapper-float-close.adthrive-wrapper-close-bkgd-50{background:rgba(0,0,0,.5);color:#fff;left:0;padding:2px 0;pointer-events:none;top:0}.adthrive-new-outstream-player{margin-bottom:20px;padding:0!important}.adthrive-new-outstream-player>.adthrive-wrapper-float-close.adthrive-wrapper-close-bkgd-50{top:0}.adthrive-close-in-container{line-height:0;position:relative}#adthrive-sticky-outstream-close.adthrive-top-collapse-close{position:inherit}.adthrive-sticky-outstream-idle>.adthrive-close-in-container{pointer-events:none}.adthrive-sticky-outstream-active>.adthrive-close-in-container{pointer-events:all}.adthrive-wrapper-close-bkgd-50>.adthrive-close-in-container{padding:2px 0 0 4px;pointer-events:all}.adthrive-sticky-outstream.adthrive-sticky-outstream-mobile{bottom:52px;transition-delay:0s;transition-duration:.25s;transition-property:transform}.adthrive-sticky-outstream.adthrive-sticky-outstream-mobile-right{right:10px}.adthrive-sticky-outstream.adthrive-sticky-outstream-mobile-left{left:10px;transform:none!important}.adthrive-sticky-outstream.adthrive-sticky-outstream-active.adthrive-sticky-outstream-top-center{background:#000;bottom:auto;left:0;right:0;top:0;transform:none}.adthrive-sticky-outstream.adthrive-sticky-outstream-desktop{bottom:100px;right:5px}.adthrive-sticky-outstream.adthrive-sticky-outstream-top-center.adthrive-sticky-outstream-desktop,.adthrive-sticky-outstream.adthrive-sticky-outstream-top-center.adthrive-sticky-outstream-mobile{bottom:auto}.adthrive-sticky-outstream.adthrive-sticky-outstream-top-center.adthrive-sticky-outstream-mobile .adthrive-stickyoutstream-container{background-color:#000;margin:0 auto}.adthrive-sticky-outstream.adthrive-sticky-outstream-active{display:block}.adthrive-video-stickyoutstream{margin-top:0}.adthrive-video-stickyoutstream div:first-of-type{margin:-1px}.adthrive-video-stickyoutstream-new-player div:first-of-type{margin:0}.adthrive-video-stickyoutstream-new-player>div:first-child{position:absolute}.adthrive-video-close{pointer-events:all}.adthrive-video-close-float-left{float:left}.adthrive-video-close-float-right{float:right}.adthrive-ccpa-link,.adthrive-ccpa-link span,.adthrive-footer-message span,.adthrive-privacy-preferences a{color:#a9a9a9;font-family:Arial,Helvetica Neue,Helvetica,sans-serif;font-size:13px}.adthrive-ccpa-link a{cursor:pointer;text-decoration:underline}.adthrive-device-phone .adthrive-footer-message{margin-bottom:60px}.adthrive-footer-message{margin-bottom:100px}.adthrive-footer-message>span{border-top:1px solid #b2b2b2;padding-top:5px;text-transform:uppercase}.adthrive-parallax-slot{height:400px;overflow:hidden;padding-top:5px}.adthrive-parallax-ad{transform:translateY(0);transition:transform .3s ease-out}.adthrive-sticky-container.adthrive-parallax-slot{flex-direction:row;justify-content:center;padding-top:10px}#_inv_voicefive___{display:none}.adthrive-ad-debug{background-color:rgba(255,0,0,.5)!important;outline:1px solid red!important}.adthrive-ad-debug:hover{background-color:rgba(255,0,0,.8)!important;cursor:pointer;outline:1px solid red!important}.adthrive-player-ad-controls-volume:hover>.adthrive-player-volume-control,.adthrive-player-volume-control:focus{opacity:1}@media print{.adthrive-ad,.adthrive-comscore,.adthrive-native-recipe,.raptive-sales,body[data-gg-moat],div[class*=kargo-ad],div[data-gg-moat],iframe[data-gg-moat-ifr]{display:none!important;height:0;visibility:hidden;width:0}}.raptive-player-captions{border-radius:5px;bottom:60px;color:#fff;display:none;font-size:16px!important;left:0;line-height:1.5;margin:0 auto;position:absolute;right:0;text-align:center;transition:transform .5s;width:90%;--raptive-player-captions-font-opacity:100%;--raptive-player-captions-background-opacity:0%;--raptive-player-captions-window-opacity:0%}.raptive-player-captions span{background:rgba(0,0,0,.5);border-radius:5px;padding:2px 4px;white-space:pre-wrap}.raptive-player-captions-button{background-color:transparent;border-radius:9999px;border-style:unset;color:#fff;cursor:pointer;display:none;font-size:.75em;font-weight:700;height:36px;margin:-5px 4px -5px auto;padding:0;width:36px}.raptive-player-captions-button:hover{background:rgba(0,0,0,.3)}.adthrive-full-width .raptive-player-captions-button.raptive-player-captions-button--visible{display:block}.adthrive-player-ad-controls-hidden+.raptive-player-captions{transform:translateY(40px)}.raptive-player-collapse .raptive-player-captions,.raptive-player-container-mobile .raptive-player-captions{font-size:10px!important}.raptive-player-container-mobile.raptive-player-collapse .raptive-player-captions{font-size:6px!important}.raptive-player-container-mobile.raptive-player-collapse .raptive-player-captions-button{display:none}.raptive-player-settings{background:#000;border-radius:5px;bottom:60px;color:#fff;display:none;font-family:Arial,sans-serif!important;font-size:14px;font-weight:400!important;height:192px;position:absolute;right:2%;text-transform:none!important;width:288px;z-index:999999999}.raptive-player-settings--active{display:block}.raptive-player-settings-header{align-items:center;background:#404040;border-radius:5px 5px 0 0;box-sizing:content-box;display:flex;gap:4px;height:40px;padding:4px}.raptive-player-settings-header>button{align-items:center;background:transparent;border:none;border-radius:5px;color:#fff;cursor:pointer;font-weight:700;height:40px;justify-content:center;padding:0;position:relative;width:40px}.raptive-player-settings-header>button.active{border-radius:5px 5px 0 0}.raptive-player-settings-header>button.active:after{background-color:#fff;bottom:-4px;content:"";height:4px;left:0;position:absolute;width:100%}.raptive-player-settings-header>button:hover{background:#000}.raptive-player-settings-header-title{font-weight:700;margin-left:8px}.raptive-player-settings--nested .raptive-player-settings-header-title{margin-left:0}.raptive-player-settings-body{height:144px;overflow:scroll;scrollbar-color:#fff #646464}.raptive-player-settings-body>div{display:none}.raptive-player-settings-body>div.raptive-player-settings-page--active{display:block}.raptive-player-settings-body::-webkit-scrollbar-thumb{background:#fff!important}.raptive-player-settings-close{display:flex;margin:0 0 0 auto}.raptive-player-settings-back{display:none}.raptive-player-settings-back>svg{margin-right:2px}.raptive-player-settings--nested .raptive-player-settings-back{display:flex}.raptive-player-settings-page{padding:4px}.raptive-player-settings-page>button:hover{background:#404040}.raptive-player-settings-page-item{align-items:center;background:unset;border:none;border-radius:5px;color:#fff!important;cursor:pointer;display:flex;font-family:Arial,sans-serif!important;font-weight:400!important;letter-spacing:normal!important;line-height:1!important;margin:4px 0;padding:4px 8px;text-align:left;text-transform:none!important;width:100%}.raptive-player-settings-page-item>span:nth-child(2){margin-left:auto;text-transform:capitalize}.raptive-player-settings-page-item>span:nth-child(3){display:flex}.raptive-player-settings-page-item--selected{background:#6b65ff!important}.raptive-player-settings-page-item--unavailable{display:none}.raptive-player-collapse .raptive-player-settings,.raptive-player-container-mobile .raptive-player-settings{border-radius:0;bottom:0;height:100%;left:0;position:absolute;right:0;top:0;width:100%}.raptive-player-collapse .raptive-player-settings-body,.raptive-player-container-mobile .raptive-player-settings-body{bottom:0;height:auto;left:0;position:absolute;right:0;top:48px}.raptive-player-collapse .raptive-player-settings-header,.raptive-player-container-mobile .raptive-player-settings-header{border-radius:0}.raptive-player-container-mobile.raptive-player-collapse .raptive-player-settings{display:none}.adthrive-player-icon-fullscreen .raptive-player-primary-icon,.raptive-player-fullscreen .adthrive-player-icon-fullscreen .raptive-player-secondary-icon{display:block}.adthrive-player-icon-fullscreen .raptive-player-secondary-icon,.raptive-player-fullscreen .adthrive-player-icon-fullscreen .raptive-player-primary-icon,.raptive-player-ios .adthrive-player-icon-fullscreen{display:none}.raptive-player-ios .adthrive-full-width .adthrive-player-icon-fullscreen{display:flex}.adthrive-player-ad-controls.adthrive-full-width .raptive-player-captions-button.raptive-player-captions-button--visible+.adthrive-player-icon-fullscreen,.adthrive-player-ad-controls>.adthrive-player-icon-fullscreen{margin:-5px 4px}.adthrive-player-ad-controls.adthrive-full-width .raptive-player-captions-button+.adthrive-player-icon-fullscreen,.raptive-player-container-mobile .adthrive-player-ad-controls.adthrive-full-width>.adthrive-player-icon-fullscreen{margin:-5px 4px -5px auto}');class Vx{addHealthReport(e,t){this.healthReport[e]=this.healthReport[e]||{details:[]},this.healthReport[e].details.push(t)}log(){X.event("HealthReporter","log",this.healthReport)}constructor(){this.healthReport={}}}class zx extends Vx{get enabled(){return!1}start(){this._clsType(),this._clsSlots()}_clsType(){const e=window.adthriveCLS,t=e&&e.injectedFromPlugin,i=e&&!e.injectedFromPlugin&&e.injectedFromSiteAds,s=(t?"plugin":i&&"nonplugin")||"none";this.addHealthReport(this._reporter,{metric:"clsType",value:s})}_clsSlots(){const e=window.adthriveCLS,t=e&&e.injectedSlots,i=e&&e.injectedVideoSlots,s=(t&&t.length||0)+(i&&i.length||0);this.addHealthReport(this._reporter,{metric:"clsSlots",value:s})}constructor(...e){super(...e),this._reporter="CLSReporter"}}class Hx{start(){this._healthReporters.forEach((e=>{e.start(),e.log()}))}constructor(e){this._healthReporters=[e].filter((e=>e.enabled))}}Hx=B([D(),j("design:type",Function),j("design:paramtypes",[void 0===zx?Object:zx])],Hx);class $x extends vr{init(){this._setAbGroup=!1,this._key="DialDownLogsExperiment2",this._lookup="DSLE2",this._default=["none"]}}$x=B([M()],$x);class qx{init(){this._slotEventBus.requestingBids.once((()=>this._setTimeToFirstAdRequest())),this._slotEventBus.requestingBids.on((()=>this._adRequested())),this._slotEventBus.addSlots.on((e=>this._addSlots(e.length))),this._gamEventBus.slotRenderEnded.on((({event:e})=>{e&&!e.isEmpty&&this._addDisplaySlotImpression()})),this._videoEventProxy.videoSlotRendered.on((e=>{e&&!e.isEmpty&&this._addVideoSlotImpression()})),this._trackDomContentLoaded(),this._pageManager.beforeUnload.on((()=>{this._calculateTimeOnPage(),this._sendCounts()})),this._prebidEventBus.bidWon.on((e=>{this._prebidResponses++,this._prebidResponseCPMs.push(Number(e.cpm.toFixed(2)))}))}_setTimeToFirstAdRequest(){this._timeToFirstAdReq=this._domContentLoaded!==-1/0?_n.now()-this._domContentLoaded:-1/0}_adRequested(){this._adRequests++}_addSlots(e){this._adSlots+=e}_addDisplaySlotImpression(){this._displayImpressions++}_addVideoSlotImpression(){this._videoImpressions++}_trackDomContentLoaded(){var e;const t=null==(e=window.performance)?void 0:e.getEntriesByType("navigation");t&&t[0]&&t[0].domContentLoadedEventEnd&&(this._domContentLoaded=t[0].domContentLoadedEventEnd)}_calculateTimeOnPage(){this._timeOnPage=this._domContentLoaded!==-1/0?_n.now()-this._domContentLoaded:-1/0}_sendCounts(){X.event("SystemPulse","counts",{adRequests:this._adRequests,prebidsWon:this._prebidResponses,prebidCPMs:this._prebidResponseCPMs,adSlots:this._adSlots,displayImps:this._displayImpressions,videoImps:this._videoImpressions,timeToFirstAdReq:this._timeToFirstAdReq,timeOnPage:this._timeOnPage})}constructor(e,t,i,s,n){this._slotEventBus=e,this._pageManager=t,this._prebidEventBus=i,this._gamEventBus=s,this._videoEventProxy=n,this._adRequests=0,this._adSlots=0,this._prebidResponses=0,this._prebidResponseCPMs=[],this._domContentLoaded=-1/0,this._timeOnPage=-1/0,this._timeToFirstAdReq=-1/0,this._displayImpressions=0,this._videoImpressions=0}}qx=B([M(),j("design:type",Function),j("design:paramtypes",[void 0===Bn?Object:Bn,void 0===Mr?Object:Mr,void 0===Jn?Object:Jn,void 0===Sc?Object:Sc,void 0===Yg?Object:Yg])],qx);Kf(".adthrive-act25-modal{background-color:#000;background-color:rgba(0,0,0,.4);display:none;height:100%;left:0;overflow:auto;position:fixed;top:0;width:100%;z-index:2147483647}.adthrive-act25-modal.show{display:block}.adthrive-act25-modal-content{background-color:#fefefe;border:1px solid #888;border-radius:10px;box-shadow:0 0 10px rgba(0,0,0,.5);font-family:Verdana,Geneva,Tahoma,sans-serif;left:50%;margin:auto;max-width:592px;padding:20px 24px 24px;position:absolute;top:50%;transform:translate(-50%,-50%);width:80%}.adthrive-act25-modal-close{color:#000;font-size:28px;font-weight:700;position:fixed;right:3px;top:-10px}.adthrive-act25-modal-close:focus,.adthrive-act25-modal-close:hover{color:#000;cursor:pointer;text-decoration:none}.adthrive-act25-modal-header{padding:2px 16px}.adthrive-act25-modal-header h1{color:rgba(0,0,0,.87);font-size:20px;line-height:26px}.adthrive-act25-modal-body{margin-bottom:10px;max-height:50vh;overflow-y:auto;padding:10px 16px;position:relative}.adthrive-act25-modal-body p{font-size:14px;line-height:20px}.adthrive-act25-modal-footer{color:#fff;display:flex;flex-direction:column;justify-content:space-between;padding:2px 16px}.adthrive-act25-modal-accept,.adthrive-act25-modal-decline{border:none;border-radius:10px;color:#fff;cursor:pointer}.adthrive-act25-modal-accept{background-color:#010044}.adthrive-act25-modal-decline{background-color:#fff;color:#000}.adthrive-act25-modal-accept,.adthrive-act25-modal-decline{flex:1;margin:0 10px 10px 0;text-transform:uppercase}.adthrive-act25-modal-accept:focus,.adthrive-act25-modal-accept:hover{background-color:#010044;color:#c4c4c4}.adthrive-act25-modal-decline:focus,.adthrive-act25-modal-decline:hover{background-color:#fff;color:#000}@media (max-width:600px){.adthrive-act25-modal-content{width:90%}.adthrive-act25-modal-body{border-bottom:1px solid #c4c4c4;box-shadow:inset 0 -100px 30px -100px rgba(0,0,0,.1)}.adthrive-act25-modal-accept,.adthrive-act25-modal-decline{font-size:14px;line-height:14px}}@media (min-width:600px){.adthrive-act25-modal-footer{flex-direction:row}.adthrive-act25-modal-accept,.adthrive-act25-modal-decline{flex:0 0 auto;margin:0}}.adthrive-act25-footer{margin-bottom:30px}.adthrive-act25-footer-text{color:#a9a9a9;font-size:14px}.adthrive-act25-footer-text p{color:#a9a9a9;text-decoration:underline}.adthrive-act25-footer-link{cursor:pointer;font-size:14px;text-decoration:underline}");class Gx extends Fn{get consented(){return this._consented}get modal(){return this._modal}get footer(){return this._footer}init(){var e;(this._modal=this._createConsentModal(),this._footer=this._createFooterElement(),null===this._consented)?(null==(e=this._modal)||e.classList.add("show"),this._startTimer()):this._consentEventBus.act25consentCaptured.emit(this._consented);this._injectFooterElement()}checkConsent(){return new Promise((e=>{null!==this._consented&&e(this._consented),this._consentEventBus.act25consentCaptured.on((t=>{this._timer&&(clearTimeout(this._timer),this._timer=null),e(t)}))}))}_createConsentModal(){if(this._modal)return this._modal;const e=document.createElement("div");e.className=`${this._cssPrefix}-modal`;const t=document.createElement("div");t.className=`${this._cssPrefix}-modal-content`;const i=document.createElement("span");i.className=`${this._cssPrefix}-modal-close`,i.innerText="✕",i.addEventListener("click",(()=>this._handleClose()));const s=document.createElement("div");s.className=`${this._cssPrefix}-modal-body`,s.innerHTML='\n

\n Soucieux d’offrir une expérience optimale, nous et nos partenaires utilisons des technologies telles que les cookies pour enregistrer et/ou accéder\n aux informations des appareils. Le consentement à ces technologies nous permettra, à nous et à nos partenaires, de traiter des données personnelles\n telles que le comportement de navigation ou les identifiants uniques sur ce site. Les cookies déposés par nos partenaires ou fournisseurs tiers sont\n des cookies tiers déposés dans le but de placer des publicités sur nos produits et Services sur d’autres sites web. L’utilisation des cookies par\n ces tiers est régie par leurs politiques de confidentialité.\n

\n

\n Cliquez sur « accepter » ou « déclin » ci-dessous. Vous pouvez mettre à jour vos choix à tout moment en cliquant sur ne vendez pas en\n bas de la page.\n

\n\n
\n\n

\n To provide the best experiences, we and our partners use technologies like cookies to store and/or access device information.\n Consenting to these technologies will allow us and our partners to process personal data such as browsing behavior or unique IDs on this site.\n Cookies placed by our partners or third-party suppliers are third-party cookies placed for the purpose of placing advertisements on our products\n and Services on other websites. The use of cookies by these third parties is governed by their privacy policies.\n

\n

\n Click "accept" or “decline" below. You can update your choices at any time by clicking on the Do not sell link in the bottom of the page.\n

\n ';const n=document.createElement("div");n.className=`${this._cssPrefix}-modal-footer`;const r=document.createElement("button");r.className=`${this._cssPrefix}-modal-accept`,r.innerText="Accepter/Accept",r.addEventListener("click",(()=>this._handleAccept()));const a=document.createElement("button");return a.className=`${this._cssPrefix}-modal-decline`,a.innerText="Déclin/Decline",a.addEventListener("click",(()=>this._handleDecline())),s.appendChild(i),n.appendChild(a),n.appendChild(r),t.appendChild(s),t.appendChild(n),e.appendChild(t),document.body.appendChild(e),e}_createFooterElement(){if(this._footer)return this._footer;const e=document.createElement("div");e.className=`${this._cssPrefix}-footer`;const t=document.createElement("p");t.className=`${this._cssPrefix}-footer-text`,t.innerText="\n Les informations de votre appareil peuvent être utilisées pour personnaliser votre expérience publicitaire. /\n Information from your device can be used to personalize your ad experience.";const i=document.createElement("a");return i.innerText=this._consented?this._footerLinkOptOutText:this._footerLinkOptInText,i.className=`${this._cssPrefix}-footer-link`,i.addEventListener("click",(()=>{var e;return this._handleFooterLinkClick(null!=(e=this._consented)&&e)})),this._footerLink=i,e.appendChild(t),e.appendChild(i),e}_injectFooterElement(){const e=this._config.footer.elements;!!this._footer&&e.find((e=>e.element===this._footer))||e.push({order:1,element:this._footer})}_destroyConsentModal(){var e;null==(e=this._modal)||e.classList.remove("show")}_handleAccept(){this._toggleConsent(!0),W.event("Act25EnforcementComponent","handleUserAction","qbccmp:acc")}_handleDecline(){this._toggleConsent(!1),W.event("Act25EnforcementComponent","handleUserAction","qbccmp:dec")}_handleClose(){this._toggleConsent(!1),W.event("Act25EnforcementComponent","handleUserAction","qbccmp:clo")}_handleTimeout(){this._toggleConsent(!1),W.event("Act25EnforcementComponent","handleUserAction","qbccmp:tim")}_handleFooterLinkClick(e){var t;e?this._handleDecline():null==(t=this._modal)||t.classList.add("show")}_toggleConsent(e){Fs.setExpirableInternalLocalStorage(this._storageKey,e,{expiry:{value:this._storageTimeout,unit:"months"}}),this._consented=e,this._destroyConsentModal(),this._updateFooterLink(e),this._consentEventBus.act25consentCaptured.emit(e)}_updateFooterLink(e){this._footerLink&&(this._footerLink.innerText=e?this._footerLinkOptOutText:this._footerLinkOptInText)}_startTimer(){this._timer=window.setTimeout((()=>{this._handleTimeout()}),this._timeout)}constructor(e,t){super(),this._config=e,this._consentEventBus=t,this._cssPrefix="adthrive-act25",this._modal=null,this._footer=null,this._footerLink=null,this._footerLinkOptOutText="Ne vendez pas ou ne partagez pas mes informations personnelles / Do not sell or share my personal information",this._footerLinkOptInText="Personnalisez mon expérience publicitaire / Customize my ad experience",this._storageKey="adthrive_act25-consent",this._timer=null,this._timeout=3e4,this._storageTimeout=13,this._consented=this._config.act25.consented}}Gx=B([bn("Act25EnforcementComponent"),M(),j("design:type",Function),j("design:paramtypes",[void 0===_c?Object:_c,void 0===Wn?Object:Wn])],Gx);Kf(".adthrive-us-cmp-modal{background-color:#000;background-color:rgba(0,0,0,.4);display:none;height:100%;left:0;overflow:auto;position:fixed;top:0;width:100%;z-index:2147483647}.adthrive-us-cmp-modal.show{display:block}.adthrive-us-cmp-modal-content{background-color:#fefefe;border:1px solid #888;border-radius:10px;box-shadow:0 0 10px rgba(0,0,0,.5);font-family:Verdana,Geneva,Tahoma,sans-serif;left:50%;margin:auto;max-width:592px;padding:20px 24px 24px;position:absolute;top:50%;transform:translate(-50%,-50%);width:80%}.adthrive-us-cmp-modal-close{color:#000;font-size:28px;font-weight:700;position:fixed;right:3px;top:-10px}.adthrive-us-cmp-modal-close:focus,.adthrive-us-cmp-modal-close:hover{color:#000;cursor:pointer;text-decoration:none}.adthrive-us-cmp-modal-header{padding:2px 16px}.adthrive-us-cmp-modal-header h1{color:rgba(0,0,0,.87);font-size:20px;line-height:26px}.adthrive-us-cmp-modal-body{margin-bottom:10px;max-height:50vh;overflow-y:auto;padding:10px 16px;position:relative}.adthrive-us-cmp-modal-body p{font-size:14px;line-height:20px}.adthrive-us-cmp-modal-footer{color:#fff;display:flex;flex-direction:column;justify-content:space-between;padding:2px 16px}.adthrive-us-cmp-modal-accept,.adthrive-us-cmp-modal-decline{border:none;border-radius:10px;color:#fff;cursor:pointer}.adthrive-us-cmp-modal-accept{background-color:#010044}.adthrive-us-cmp-modal-decline{background-color:#fff;color:#000}.adthrive-us-cmp-modal-accept,.adthrive-us-cmp-modal-decline{flex:1;margin:0 10px 10px 0;text-transform:uppercase}.adthrive-us-cmp-modal-accept:focus,.adthrive-us-cmp-modal-accept:hover{background-color:#010044;color:#c4c4c4}.adthrive-us-cmp-modal-decline:focus,.adthrive-us-cmp-modal-decline:hover{background-color:#fff;color:#000}@media (max-width:600px){.adthrive-us-cmp-modal-content{width:90%}.adthrive-us-cmp-modal-body{border-bottom:1px solid #c4c4c4;box-shadow:inset 0 -100px 30px -100px rgba(0,0,0,.1)}.adthrive-us-cmp-modal-accept,.adthrive-us-cmp-modal-decline{font-size:14px;line-height:14px}}@media (min-width:600px){.adthrive-us-cmp-modal-footer{flex-direction:row}.adthrive-us-cmp-modal-accept,.adthrive-us-cmp-modal-decline{flex:0 0 auto;margin:0}}.adthrive-us-cmp-footer{margin-bottom:30px}.adthrive-us-cmp-footer-text{color:#a9a9a9;font-size:14px}.adthrive-us-cmp-footer-text p{color:#a9a9a9;text-decoration:underline}.adthrive-us-cmp-footer-link{cursor:pointer;font-size:14px;text-decoration:underline}");class Wx extends Fn{get modal(){return this._modal}get footer(){return this._footer}init(){var e;(this._modal=this._createConsentModal(),this._footer=this._createFooterElement(),null===this._config.usCMP.consent)?(null==(e=this._modal)||e.classList.add("show"),this._startTimer()):this._consentEventBus.usCmpConsentCaptured.emit(this._config.usCMP.consent);this._injectFooterElement()}checkConsent(){return new Promise((e=>{null!==this._config.usCMP.consent&&e(this._config.usCMP.consent),this._consentEventBus.usCmpConsentCaptured.on((t=>{this._timer&&(clearTimeout(this._timer),this._timer=null),e(t)}),{handleEventsAlreadyEmitted:!0})}))}_createConsentModal(){if(this._modal)return this._modal;const e=document.createElement("div");e.className=`${this._cssPrefix}-modal`;const t=document.createElement("div");t.className=`${this._cssPrefix}-modal-content`;const i=document.createElement("span");i.className=`${this._cssPrefix}-modal-close`,i.innerText="✕",i.addEventListener("click",(()=>this._handleClose()));const s=document.createElement("div");s.className=`${this._cssPrefix}-modal-body`,s.innerHTML='\n

\n To provide the best experiences, we and our partners use technologies like cookies to store and/or access device information.\n Consenting to these technologies will allow us and our partners to process personal data such as browsing behavior or unique IDs on this site.\n Cookies placed by our partners or third-party suppliers are third-party cookies placed for the purpose of placing advertisements on our products\n and Services on other websites. The use of cookies by these third parties is governed by their privacy policies.\n

\n

\n Click "accept" or “decline" below. You can update your choices at any time by clicking on the Do not sell link in the bottom of the page.\n

\n ';const n=document.createElement("div");n.className=`${this._cssPrefix}-modal-footer`;const r=document.createElement("button");r.className=`${this._cssPrefix}-modal-accept`,r.innerText="Accept",r.addEventListener("click",(()=>this._handleAccept()));const a=document.createElement("button");return a.className=`${this._cssPrefix}-modal-decline`,a.innerText="Decline",a.addEventListener("click",(()=>this._handleDecline())),s.appendChild(i),n.appendChild(a),n.appendChild(r),t.appendChild(s),t.appendChild(n),e.appendChild(t),document.body.appendChild(e),e}_createFooterElement(){if(this._footer)return this._footer;const e=document.createElement("div");e.className=`${this._cssPrefix}-footer`;const t=document.createElement("p");t.className=`${this._cssPrefix}-footer-text`,t.innerText="Information from your device can be used to personalize your ad experience.";const i=document.createElement("a");return i.innerText=this._config.usCMP.consent?this._footerLinkOptOutText:this._footerLinkOptInText,i.className=`${this._cssPrefix}-footer-link`,i.addEventListener("click",(()=>{var e;return this._handleFooterLinkClick(null!=(e=this._config.usCMP.consent)&&e)})),this._footerLink=i,e.appendChild(t),e.appendChild(i),e}_injectFooterElement(){const e=this._config.footer.elements;!!this._footer&&e.find((e=>e.element===this._footer))||e.push({order:1,element:this._footer})}_destroyConsentModal(){var e;null==(e=this._modal)||e.classList.remove("show")}_handleAccept(){this._toggleConsent(!0),W.event("USCMPEnforcementComponent","handleUserAction","uscmp:acc")}_handleDecline(){this._toggleConsent(!1),W.event("USCMPEnforcementComponent","handleUserAction","uscmp:dec")}_handleClose(){this._toggleConsent(!1),W.event("USCMPEnforcementComponent","handleUserAction","uscmp:clo")}_handleTimeout(){this._toggleConsent(!0),W.event("USCMPEnforcementComponent","handleUserAction","uscmp:tim")}_handleFooterLinkClick(e){var t;e?this._handleDecline():null==(t=this._modal)||t.classList.add("show")}_toggleConsent(e){this._consentEventBus.usCmpConsentCaptured.emit(e),this._destroyConsentModal(),this._updateFooterLink(e)}_updateFooterLink(e){this._footerLink&&(this._footerLink.innerText=e?this._footerLinkOptOutText:this._footerLinkOptInText)}_startTimer(){this._timer=window.setTimeout((()=>{this._handleTimeout()}),this._timeout)}constructor(e,t){super(),this._config=e,this._consentEventBus=t,this._cssPrefix="adthrive-us-cmp",this._modal=null,this._footer=null,this._footerLink=null,this._footerLinkOptOutText="Do not sell or share my personal information.",this._footerLinkOptInText="Customize my ad experience.",this._timer=null,this._timeout=25e3}}Wx=B([bn("USCMPEnforcementComponent"),M(),j("design:type",Function),j("design:paramtypes",[void 0===_c?Object:_c,void 0===Wn?Object:Wn])],Wx);class Kx{start(){const e=Fs.readSessionStorage("previousUrl"),t=Fs.readSessionStorage("previousPVK"),i=Fs.readSessionStorage("previousPageHide"),s=Fs.readSessionStorage("previousUnload"),n=Fs.readSessionStorage("previousBeforeUnload");this.pageManager.beforeUnload.on((()=>{Fs.setSessionStorage("previousBeforeUnload",!0)})),window.addEventListener("unload",(()=>{Fs.setSessionStorage("previousUnload",!0)})),this.pageManager.pageHide.on((()=>{Fs.setSessionStorage("previousPageHide",!0)}));const r=rn();if(e&&e===window.location.href){var a;const e=Fs.readSessionStorage("previousLoadTime"),o=e?((e,t)=>{const i=new Date(e);return new Date(t)-i})(e,r):void 0,l=null==(a=performance.getEntriesByType("navigation")[0])?void 0:a.type;W.event("PageRefreshMonitor","refresh",{timeSinceLastLoad:o,navigationType:l,legacyNavigationType:window.performance.navigation.type,previousPVK:t,previousPageHide:i,previousUnload:s,previousBeforeUnload:n})}Fs.setSessionStorage("previousUrl",window.location.href),Fs.setSessionStorage("previousLoadTime",r),Fs.setSessionStorage("previousPVK",this.pageviewKey),Fs.setSessionStorage("previousPageHide",!1),Fs.setSessionStorage("previousUnload",!1),Fs.setSessionStorage("previousBeforeUnload",!1)}constructor(e,t){this.pageviewKey=e,this.pageManager=t}}Kx=B([D(),F(0,L("PageviewKey")),j("design:type",Function),j("design:paramtypes",[String,void 0===Mr?Object:Mr])],Kx);let Yx=class{async init(){const e=Tc.markStartTask("microtask",["index","setupAdthrive","after-yield","1"]),t=Vs(window.adthrive.bucket)||Math.random()<.01;t&&this.cmd.push((()=>X.event("AdThrive","init","hcstart"))),this._identipyApiReady=new Promise((e=>this._identityEventBus.identityApiReady.on((()=>e(!0)),{handleEventsAlreadyEmitted:!0}))),this._adDensityReady=new Promise((e=>this._realizedAdDensityEventBus.realizedAdDensityCompReady.on((()=>e(!0)))));const i=e=>{e.data={abgroup:this.config.abGroup.groupsAsObject,pubab:this.config.pubAbGroup.groupsAsObject,sess:this.context.sessionKey,pvk:this.context.pageviewKey,hbho:this.config.hbho.bidders,vbho:this.config.vbho.bidders,spa:this.config.adOptions.spa,...this.context.deliveryVersion&&{lmdv:this.context.deliveryVersion},...this.config.clsOptions&&this.config.clsOptions.branch&&{clsBranch:this.config.clsOptions.branch},...this.config.clsOptions&&this.config.clsOptions.bucket&&{clsBucket:this.config.clsOptions.bucket}}},s=R.resolve($x);R.resolve(q).dialDownLogs.emit({result:s.result,choices:s._choices}),i(W),W.sending.on((()=>i(W))),X.sending.on((()=>i(X))),e.markEndTask(),await Ha();const n=Tc.markStartTask("microtask",["index","setupAdthrive","after-yield","2"]);this.cmd.init(),this._auctionManagers.init(),this._googleAdManager.init();if(R.resolve(qx).init(),this.config.act25.required){const e=R.resolve(Gx);e.init();const t=e.checkConsent();n.markEndTask(),await t}else if(this.config.usCMP.required){const e=R.resolve(Wx);e.init();const t=e.checkConsent();n.markEndTask(),await t}else n.markEndTask();await Ha();R.resolve(Kx).start();const r=Tc.markStartTask("microtask",["index","setupAdthrive","after-yield","3"]);this._components.init(),r.markEndTask(),await Ha();const a=Tc.markStartTask("microtask",["index","setupAdthrive","after-yield","4"]);this._googleAdManager.start(),this._components.start(),window.adthriveCLS&&window.adthriveCLS.error&&W.error("AdThrive","init","Problem with AdThriveCLS SiteAds. CLS Disabled"),this._healthReporters.start(),t&&X.event("AdThrive","init","hcend"),a.markEndTask()}identityApi(e,t){return this._identipyApiReady.then((()=>{this._identityEventBus.identityApiDataSubmitted.emit({data:e,cb:t})}))}disableAds(e){this.config.disableAds.disableAllAds(e)}disableContentAds(e){this.config.disableAds.disableContentAds(e)}disablePlaylistPlayers(e){this.config.disableAds.disablePlaylistPlayers(e)}showPrivacyPreferences(){window.__tcfapi&&window.__tcfapi("showGDPRScreenAdvanced")}getConsentData(){window.__tcfapi&&window.__tcfapi("getTCData",2,(e=>{}))}getAdthriveFlippData(){return this.config.marmalade.flpProdIds.filter(Mi)}setTargetingFlag(e,t,i=!1){e&&"string"==typeof e&&t&&Array.isArray(t)&&0!==t.length&&this._googleAdManager.setTargetingFlag(e,t,i)}setTargeting(e){this._googleAdManager.setTargeting(e)}getTargeting(){return this._googleAdManager.getTargeting()}getTargetingMap(){return this._googleAdManager.getTargetingMap()}logError(e,t,i){W.error(e,t,i)}log(e,t,i,s){switch(e){case"error":W.error(t,i,s);break;case"info":break;case"log":W.log(t,i,s)}}refreshSlots(e){let t=this.slots.get();e&&e.length&&(t=t.filter((t=>e.includes(t.id)))),t.forEach((e=>{this.slotManager.refresh(e,!1).then((()=>{this.slotManager.clearRefreshTimeout(e,!0)})).catch((()=>{}))}))}nmr(){return W.event("adthrive","nmr","adthrive.nmr() has been called"),this.slotManager.updateRefreshTimeout(this.slots.get(),0)}clearSticky(){W.event("adthrive","clearSticky","adthrive.clearSticky() has been called"),Fs.deleteLocalStorage("adthrive_abgroup"),Fs.deleteLocalStorage("adt_pe")}async getAdDensity(){let e=null;return await this._adDensityReady.then((()=>{this._realizedAdDensityEventBus.metricsRequested.emit((t=>e=t))})).catch((()=>{})),e}logAdDensity(){this._adDensityReady.then((()=>{this._realizedAdDensityEventBus.metricsRequested.emit((e=>{}))})).catch((()=>{}))}constructor(e,t,i,s,n,r,a,o,l,d,c,h,u){this.config=e,this.context=t,this.cmd=i,this.slotManager=s,this.slots=n,this._auctionManagers=r,this._coreExperimentConfig=a,this._googleAdManager=o,this._components=l,this._healthReporters=d,this._siteExperimentEventBus=c,this._realizedAdDensityEventBus=h,this._identityEventBus=u,this.marmalade={mcmp:null},this.marmaladeFinished=e=>e,this.additiveRaptiveFloorsFinished=e=>e,this.rubiconFloorsFinished=e=>e,this.trafficShapingFinished=e=>e,this.api={browserStorage:{setLocalStorage:Fs.setExternalLocalStorage.bind(Fs),readLocalStorage:Fs.readExternalLocalStorage.bind(Fs),setInternalLocalStorage:Fs.setInternalLocalStorage.bind(Fs)}},this._identipyApiReady=new Promise((e=>e(!1))),this._adDensityReady=new Promise((e=>e(!1))),this.bucket=this.context.bucket,this.branch=this.context.branch,this.invalidTraffic=this.context.invalidTraffic,this.deployment=this.context.deployment,this.abgroup=this.config.abGroup.groups,this.pubab=this.config.pubAbGroup.groups,this.siteAds=window.adthrive.siteAds,this.buildDate=window.adthrive.buildDate,this.windowPerformance=window.adthrive.windowPerformance,this.marmaladeFinished=window.adthrive.marmaladeFinished||this.marmaladeFinished,this.additiveRaptiveFloorsFinished=window.adthrive.additiveRaptiveFloorsFinished||this.additiveRaptiveFloorsFinished,this.trafficShapingFinished=window.adthrive.trafficShapingFinished||this.trafficShapingFinished,this.coreExperiments=this._coreExperimentConfig.coreExperiments,this.deliveryFeatures=window.adthrive.deliveryFeatures,this.cookieDeprecationLabel=window.adthrive.cookieDeprecationLabel,this.siteAds.targeting={push:e=>this._googleAdManager.setTargeting(e)},this._siteExperimentEventBus.targetingReady.on((()=>{this.pubab=this.config.pubAbGroup.groups,this._googleAdManager.setTargeting({key:"pubab",value:this.pubab})}));"off"===Ri().get("at_sticky")&&this.clearSticky()}};Yx=B([bn("AdThrive"),M(),j("design:type",Function),j("design:paramtypes",[void 0===_c?Object:_c,void 0===Fr?Object:Fr,void 0===Rf?Object:Rf,void 0===Kg?Object:Kg,void 0===ra?Object:ra,void 0===Of?Object:Of,void 0===mr?Object:mr,void 0===wc?Object:wc,void 0===Ux?Object:Ux,void 0===Hx?Object:Hx,void 0===sr?Object:sr,void 0===ar?Object:ar,void 0===Qn?Object:Qn])],Yx);const Xx={domain:"ads.adthrive.com",branch:"main",bucket:"prod",cmp:!0};class Qx extends Un{get result(){return this._result}run(){return new zn(0).get()}constructor(){super(),this.classList=["EmailCaptureHandler"],this._result=!1,this._choices=[{choice:!0},{choice:!1}],this.abgroup="logfltr",this.key="LoggerFilter",this.lookup="LOGFLTR",this._result=this.run()}}Qx=B([bn("LoggerFilterExperiment"),M(),j("design:type",Function),j("design:paramtypes",[])],Qx);const Jx=()=>!(!navigator.userAgent||!(navigator.userAgent.search(/GTmetrix/i)>-1||navigator.userAgent.search(/pingdom/i)>-1||navigator.userAgent.search(/Google Page Speed Insights/i)>-1||navigator.userAgent.search(/Chrome-Lighthouse/i)>-1))||!!["__nativePromise","__nativeURL","__nativePerformance","__nativeFetch","__ElementMatches","__HTMLElementBoundingClientRect"].some((e=>window.hasOwnProperty(e))),Zx="adthrive_SetInterestGroupsData";class eP{get enabled(){return this._fledgeConfig.enabled}setInterestGroups(e){try{if(this._frame.contentWindow){const t={action:Zx,groupNames:e};this._frame.contentWindow.postMessage(t,this._host)}}catch(e){W.error("PrivacySandboxIframeManager","setInterestGroups","Failed to set interest groups.",e)}}_addIframeToPage(){return new Promise((e=>{this._frame.src=this._frameSrc,this._frame.id="adthrive-privacy-sandbox",this._frame.style.display="none",this._frame.onload=()=>{e()},document.body.appendChild(this._frame)}))}_setupEventListeners(){this._browserTopicsAPIEventBus.topicsReceived.on((e=>{const t=e.map((e=>`${e.id}`));this.setInterestGroups(t)}),{handleEventsAlreadyEmitted:!0}),this._marmaladeEventBus.marmaladeResponseLoaded.on((({recencyFrequency:e})=>{var t;const i=null!=(t=null==e?void 0:e.map((({rf_code:e})=>e)))?t:[];this.setInterestGroups(i)}),{handleEventsAlreadyEmitted:!0})}constructor(e,t,i,s,n){this._bootstrapConfig=e,this._fledgeConfig=t,this._privacySandboxEventBus=i,this._browserTopicsAPIEventBus=s,this._marmaladeEventBus=n,this._host=`https://${this._bootstrapConfig.host}`,this._frame=document.createElement("iframe"),this._baseUrl=this._bootstrapConfig.baseUrl,this._frameSrc=`${this._baseUrl.replace("/gdpr","")}/html/ps.html`,this.enabled&&this._addIframeToPage().then((()=>{this._privacySandboxEventBus.iframeReady.emit(),this._setupEventListeners()})).catch((e=>{W.error("PrivacySandboxIframeManager","constructor","Failed to initialize Privacy Sandbox iframe",e)}))}}eP=B([bn("PrivacySandboxIframeManager"),M(),j("design:type",Function),j("design:paramtypes",[void 0===ka?Object:ka,void 0===Id?Object:Id,void 0===Zn?Object:Zn,void 0===Gn?Object:Gn,void 0===tr?Object:tr])],eP);class tP{static isValidExperiment(e){return 100===e.reduce(((e,t)=>e+t),0)}static setExperimentABGroup(e,t){const i=`${e}_${t.id}`;this._experimentABGroup=i}static getExperimentConfig(e){const t=e.experimentChoices,i=this.getStickyResult(e);if(i)return this.setExperimentABGroup(e.id,i),i;const s=t.map((e=>e.weight));if(!this.isValidExperiment(s))return;const n=(e=>{const t={index:-1,weight:-1};if(!e||0===e.length)return t;const i=e.reduce(((e,t)=>e+t),0);if(0===i)return t;const s=Math.random()*i;let n=0,r=e[n];for(;s>r;)r+=e[++n];return{index:n,weight:e[n]}})(s);this.setExperimentABGroup(e.id,t[n.index]);const r=t[n.index];return this.setStickyResult(e.id,r),r}static get experimentABGroup(){return this._experimentABGroup}static getStickyResult(e){try{const t=Fs.readInternalLocalStorage(this._localStorageKey);if(!t)return null;const i=t[e.id];return i&&e.experimentChoices.find((e=>e.id===i.id))?i:null}catch(e){return W.error("ProfileExperimentsUtil","unabled to parse sticky experiment value"),null}}static setStickyResult(e,t){const i=Fs.readInternalLocalStorage(this._localStorageKey)||{};i[e]=t,Fs.setInternalLocalStorage(this._localStorageKey,i)}}tP._localStorageKey="adt_pe",tP._experimentABGroup=null;const iP=e=>{const t=mi(),i=(()=>{const e=Ki()?"mobile":"tablet";return Bi(ni)?"desktop":e})(),s=e.siteAdsProfiles;let n=null;if(s&&s.length)for(const e of s){const s=e.targeting.device,r=e.targeting.browserEngine,a=s&&s.length&&s.includes(i),o=r&&r.length&&r.includes(t);a&&o&&(n=e)}return n};class sP{static _getSiteAdsProfile(e){const t=iP(e);return t&&(this._profileID=t.profileId),t}static updateSiteAds(e){const t=this._getSiteAdsProfile(e.siteAds),i=t&&t.experiment?tP.getExperimentConfig(t.experiment):void 0;if(t){const s={adOptions:t.adOptions,adTypes:t.adTypes,videoPlayers:t.videoPlayers};e.siteAds.adOptions=Object.assign(e.siteAds.adOptions,s.adOptions,null==i?void 0:i.adOptions),e.siteAds.adTypes&&Object.assign(e.siteAds.adTypes,s.adTypes,null==i?void 0:i.adTypes),e.siteAds.videoPlayers&&t.videoPlayers&&(e.siteAds.videoPlayers=Object.assign(e.siteAds.videoPlayers,t.videoPlayers,null==i?void 0:i.videoPlayers)),this._profileID=t.profileId.toString(),this.setTargeting(i)}}static get profileID(){return this._profileID}static setTargeting(e){const t=R.resolve(pr);t.set("aprf",this._profileID),e&&tP.experimentABGroup&&t.set("pe",tP.experimentABGroup)}static updateBodyClass(){const e=`raptive-profile-${this._profileID}`;"def"===this._profileID||document.body.classList.contains(e)||document.body.classList.add(e)}}sP._profileID="def";const nP=R.resolve(Xd),rP=async(e,t,i)=>{const s=Tc.markStartTask("microtask",["index","setupAdthrive","before-yield","1"]),n=fn();R.register("RecencyFrequencyMarmaladeResponse",{useValue:i.result}),s.markEndTask(),await(async()=>{await Ha();const e=Tc.markStartTask("microtask",["index","resolveLongAdThriveDependencies","1"]);R.resolve(_c),R.resolve(Kg),e.markEndTask(),await Ha();const t=Tc.markStartTask("microtask",["index","resolveLongAdThriveDependencies","2"]);R.resolve(wc),R.resolve(Of),t.markEndTask(),await Ha()})();const r=Tc.markStartTask("microtask",["index","setupAdthrive","before-yield","2"]);return window.adthrive=R.resolve(Yx),((e,t,i,s)=>{nP.loading=e,nP.bootstrapFinished=t,nP.gamStarted=i.started,nP.gamFinished=i.finished,nP.gamDuration=i.duration,nP.marmaladeStarted=s.started,nP.marmaladeFinished=s.finished,nP.marmaladeDuration=s.duration})(e,n,t,i),r.markEndTask(),await Ha(),window.adthrive.init()},aP=async e=>{const t=fn(),i=window.adthrive.branch,s=Fs.readInternalLocalStorage("adthrive_branch"),n=i===(null==s?void 0:s.branch);Fs.setInternalLocalStorage("adthrive_branch",{branch:i,enabled:n}),Fs.setInternalLocalStorage("adthrive_session_fpv",null===Fs.readInternalLocalStorage("adthrive_session_fpv")),R.register("Build",{useValue:Xx}),R.register("AdThrive",{useValue:e}),R.resolve(Qa),R.resolve(eP);const r=R.resolve(Sl);return await r.run().then((({gam:e,marmalade:i})=>rP(t,e,i))).catch((e=>(e=>{const t=e.marmalade,i=e.message||e;return t&&Object.prototype.hasOwnProperty.call(t,"result")&&R.register("RecencyFrequencyMarmaladeResponse",{useValue:t.result}),R.resolve(UA).init(),window.adthrive=R.resolve(Yx),window.adthrive.init(),Promise.reject(i)})(e)))},oP=e=>{let t;if(Si(e.siteAds.adOptions.delayLoading,!1)){const i=e.siteAds.adOptions.delayLoadingTime,s=(e=>{const t=R.resolve(Mr).setupOnceEventWithPromise,i=[t("scroll"),t("mousemove"),t("keyup")];Bi()||i.push(t("touchstart"));const s=[t("load").then((()=>Ei(e)))];return Jx()?i:s.concat(i)})(i?1e3*i:50);t=Promise.race(s)}else t=Promise.resolve();return t},lP=()=>{if(!(()=>{var e,t;const i=null==(t=window)||null==(e=t.location)?void 0:e.host;return!i||!["megadiscounts.world","securedspot.vip","inrk.info","stealthedealz.world","jiyin.info","groug.com","lifesfouhealth.com","2hihkhkthrg.com","trybox.cyou","andrewgreenbaumdesign.com","lolitatops.com","goapplydeal.com","nexofrost.com","soldes-vetements.store","egobhps.info","negozio-di-valigi.com","zlqwrm.info","flavorjourney.blog"].find((e=>i.includes(e)))})())return;R.register("PageviewKey",{useValue:On()});const e=window.adthrive;window.adthriveCLS&&!window.adthriveCLS.error?(R.register("AdthriveCLS",{useValue:window.adthriveCLS}),(()=>{const e=window.adthrive.siteAds,t=window.adthriveCLS,i=t&&t.siteAds,s=window.adthrive.siteAds.videoPlayers&&window.adthrive.siteAds.videoPlayers.contentSpecificPlaylists,n=s?[...s]:[];i&&mn(i)&&(e.adUnits=i.adUnits,e.video=i.video,e.videoPlayers=i.videoPlayers,e.breakpoints=i.breakpoints,e.videoPlayers&&(e.videoPlayers.contentSpecificPlaylists=n.filter((e=>!e.isDraft))))})()):R.register("AdthriveCLS",{useValue:{}}),R.register("CoreExperimentValues",{useValue:e.core.coreExperiments});const t=(({gdpr:e,baseUrl:t})=>"true"===e?`${t}/gdpr`:t)(e),i=(()=>{const e=[Ls(),Ps(),Rs(),Os(),Ds(),Ms()].filter((e=>!!e));return e.length?e:void 0})(),s=Vs(e.bucket),n=i||s?"unsupported":e.bucket,r=R.resolve(Qx),a=r.result?[]:r.classList,o={...e,bucket:n,baseUrl:t,invalidTraffic:i,loggerFilters:a};Fs.init(o),X.init(o),W.init(o),sP.updateSiteAds(o),sP.updateBodyClass();const l=fn();oP(o).then((()=>{const e=Tc.markStartTask("microtask",["handleDelayLoading"]),t=fn()-l;nP.delay=t;const i=aP(o);return e.markEndTask(),i})).then((()=>{})).catch((e=>{"string"==typeof e?W.error("index","load",new Error(e)):W.error("index","load",e)}))};try{(e=>e instanceof Yx||e instanceof Promise)(window.adthrive)||lP()}catch(e){W.error("index","pre-init",e)}return window.adthrive}();if(adtpm){const e=Date.now();adtpm.duration=e-adtpm.startTime;const t="TaskMonitor::_logData",i=[{timingData:adtpm,taskMetadata:{}},{abgroup:"taskmonitor-log",pubab:"taskmonitor-log",sess:"taskmonitor-log",pvk:"taskmonitor-log",hbho:["taskmonitor-log"],vbho:["taskmonitor-log"],spa:!1}],s="https://logger.adthrive.com/event?"+["siteId="+encodeURIComponent(window.adthrive.siteAds.siteId||""),"siteName="+encodeURIComponent(window.adthrive.siteAds.siteName||""),"bucket="+encodeURIComponent(window.adthrive.bucket||""),"branch="+encodeURIComponent(window.adthrive.branch||""),"deployment="+encodeURIComponent(window.adthrive.deployment||""),"message="+encodeURIComponent(t),"pageurl="+encodeURIComponent(window.location.origin+window.location.pathname),"body="+encodeURIComponent(JSON.stringify(i))].join("&"),n=new XMLHttpRequest;n.open("get",s,!0),n.send()} ;