if(!window.cp)window.cp = function(str){return document.getElementById(str)};cp.CPProjInit = function(){if(cp && cp.model && cp.model.data) return; cp.model = {}; cp.poolResources = {}; cp.D = cp.model.data = {pref:{acc:1,rkt:0,hsr:1},Image_1:{type:15,from:1,to:90,rp:0,rpa:0,mdi:'Image_1c',retainState:false,immo:false,apsn:'Slide10968',JSONTT_4:[],cpa:true,oca:'cp.jumpToNextSlide();',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[10784]}],stis:0,bstiid:-1,sipst:0,sicbs:false,sihhs:false,sihds:false,isDD:false},Image_1c:{b:[-6,-297,1288,1061],uid:10784,sr:cp.fd,ip:'dr/10776_1294_1358Tr76.png',dn:'Image_1',visible:1,effectiveVi:1,JSONEffectData:false,accstr:'Image ',traccstr:'',ti:-1,acclng:'',vbwr:[-6,-297,1288,1061],vb:[-6,-297,1288,1061]},Title_AutoShape_2:{type:589,from:1,to:90,rp:0,rpa:0,mdi:'Title_AutoShape_2c',retainState:false,immo:false,apsn:'Slide10968',JSONTT_4:[],cpa:true,oca:'cp.jumpToNextSlide();',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[10817]}],stis:0,bstiid:-1,sipst:0,sicbs:false,sihhs:false,sihds:false,isDD:false},Title_AutoShape_2c:{b:[14,272,708,482],uid:10817,sr:cp.fd,ip:'dr/Title_AutoShape_2.png',dn:'Title_AutoShape_2',visible:1,effectiveVi:1,JSONEffectData:false,accstr:'Teaching Sexuality... ',traccstr:'',ti:-1,acclng:'',sc:'#0080ff',sw:0,ss:0,fa:0,bc:'#ffffff',p0:[[0],[1,14,272],[2,14,482],[2,708,482],[2,708,272],[2,14,272],[4]],svg:false,vbwr:[14,272,709,482],vb:[14,272,709,482]},Text_Caption_1:{type:19,from:1,to:90,rp:0,rpa:0,mdi:'Text_Caption_1c',retainState:false,immo:false,apsn:'Slide10968',iflbx:false,ipflbx:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[10825]}],stis:0,bstiid:-1,sipst:0,sicbs:false,sihhs:false,sihds:false,isDD:false},Text_Caption_1c:{b:[165,469,708,531],uid:10825,sr:cp.fd,ip:'dr/Text_Caption_1.png',dn:'Text_Caption_1',visible:1,effectiveVi:1,JSONEffectData:false,accstr:'Part 1: Reflective Perspective ',traccstr:'',ti:-1,acclng:'',vbwr:[165,469,708,531],vb:[165,469,708,531]},Image_2:{type:15,from:1,to:90,rp:0,rpa:0,mdi:'Image_2c',retainState:false,immo:false,apsn:'Slide10968',JSONTT_4:[],cpa:true,oca:'cp.jumpToNextSlide();',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[10835]}],stis:0,bstiid:-1,sipst:0,sicbs:false,sihhs:false,sihds:false,isDD:false},Image_2c:{b:[22,16,304,115],uid:10835,sr:cp.fd,ip:'dr/10827_282_99.png',dn:'Image_2',visible:1,effectiveVi:1,JSONEffectData:false,accstr:'Image ',traccstr:'',ti:-1,acclng:'',vbwr:[22,16,304,115],vb:[22,16,304,115]},Image_3:{type:15,from:1,to:90,rp:0,rpa:0,mdi:'Image_3c',retainState:false,immo:false,apsn:'Slide10968',JSONTT_4:[],cpa:true,oca:'cp.jumpToNextSlide();',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[10846]}],stis:0,bstiid:-1,sipst:0,sicbs:false,sihhs:false,sihds:false,isDD:false},Image_3c:{b:[328,50,551,105],uid:10846,sr:cp.fd,ip:'dr/10838_223_55.png',dn:'Image_3',visible:1,effectiveVi:1,JSONEffectData:false,accstr:'Image ',traccstr:'',ti:-1,acclng:'',vbwr:[328,50,551,105],vb:[328,50,551,105]},SmartShape_1:{type:612,from:1,to:90,rp:0,rpa:0,mdi:'SmartShape_1c',retainState:false,immo:false,apsn:'Slide10968',JSONTT_4:[],cpa:true,oca:'cp.jumpToNextSlide();',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[10875]}],stis:0,bstiid:-1,sipst:0,sicbs:false,sihhs:false,sihds:false,isDD:false},SmartShape_1c:{b:[802,18,1258,700],uid:10875,dn:'SmartShape_1',visible:1,effectiveVi:1,JSONEffectData:false,accstr:' ',traccstr:'',ti:-1,acclng:'',sc:'#1a1a1a',sw:2,ss:0,fa:0,bc:'#e6e6e6',p0:[[0],[1,802,18],[2,802,700.00],[2,1258,700.00],[2,1258,18],[2,802,18],[4]],svg:false,vbwr:[798,14,1262,704],vb:[798,14,1262,704]},Button_1:{type:177,from:1,to:90,rp:0,rpa:0,mdi:'Button_1c',retainState:false,immo:false,apsn:'Slide10968',JSONTT_4:[],cpa:true,oca:'cp.jumpToNextSlide();',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,chfn:cp.ch,osc:'',osct:0,ofc:'',ofct:0,pa:46,enabled:1,ma:-1,pfc:1,dclk:false,amc:true,eh:cp.cbKH,siq:false,sat:true,subt:2,itr:false,stopt:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[10913]},{stn:'RollOver',stt:2,stsi:[10927]},{stn:'Down',stt:1,stsi:[10941]}],stis:0,bstiid:-1,sipst:0,sicbs:false,sihhs:true,sihds:true,stc:['Button_1','si10927','si10941'],isDD:false},Button_1c:{b:[510,607,709,654],uid:10913,sr:cp.fd,ip:'dr/Button_1.png',dn:'Button_1',visible:1,effectiveVi:1,JSONEffectData:false,accstr:'START COURSE ',traccstr:' Trigger this button to go to the next slide',ti:2500,acclng:'',vbwr:[510,607,709,654],vb:[510,607,709,654]},si10927:{type:177,from:1,to:90,rp:0,rpa:0,mdi:'si10927c',retainState:false,immo:false,apsn:'Slide10968',JSONTT_4:[],cpa:true,oca:'cp.jumpToNextSlide();',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,chfn:cp.ch,osc:'',osct:0,ofc:'',ofct:0,pa:46,enabled:1,ma:-1,pfc:1,dclk:false,amc:true,eh:cp.cbKH,siq:false,sat:true,subt:2,itr:false,trin:0,trout:0,bstin:'Button_1',stl:[{stn:'Normal',stt:0,stsi:[10927]}],stis:0,bstiid:10913,sipst:2,sicbs:true,sihhs:true,sihds:true,isDD:false},si10927c:{b:[510,607,709,654],uid:10927,sr:cp.fd,ip:'dr/si10927.png',dn:'si10927',visible:0,effectiveVi:1,JSONEffectData:false,accstr:'START COURSE ',traccstr:' Trigger this button to go to the next slide',ti:2500,acclng:'',vbwr:[510,607,709,654],vb:[510,607,709,654]},si10941:{type:177,from:1,to:90,rp:0,rpa:0,mdi:'si10941c',retainState:false,immo:false,apsn:'Slide10968',JSONTT_4:[],cpa:true,oca:'cp.jumpToNextSlide();',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,chfn:cp.ch,osc:'',osct:0,ofc:'',ofct:0,pa:46,enabled:1,ma:-1,pfc:1,dclk:false,amc:true,eh:cp.cbKH,siq:false,sat:true,subt:2,itr:false,trin:0,trout:0,bstin:'Button_1',stl:[{stn:'Normal',stt:0,stsi:[10941]}],stis:0,bstiid:10913,sipst:1,sicbs:true,sihhs:true,sihds:true,isDD:false},si10941c:{b:[510,607,709,654],uid:10941,sr:cp.fd,ip:'dr/si10941.png',dn:'si10941',visible:0,effectiveVi:1,JSONEffectData:false,accstr:'START COURSE ',traccstr:' Trigger this button to go to the next slide',ti:2500,acclng:'',vbwr:[510,607,709,654],vb:[510,607,709,654]},Image_4:{type:15,from:1,to:90,rp:0,rpa:0,mdi:'Image_4c',retainState:false,immo:false,apsn:'Slide10968',JSONTT_4:[],cpa:true,oca:'cp.jumpToNextSlide();',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[10952]}],stis:0,bstiid:-1,sipst:0,sicbs:false,sihhs:false,sihds:false,isDD:false},Image_4c:{b:[686,92,1221,725],uid:10952,sr:cp.fd,ip:'dr/10944_535_633.png',dn:'Image_4',visible:1,effectiveVi:1,JSONEffectData:false,accstr:'Image ',traccstr:'',ti:-1,acclng:'',vbwr:[686,92,1221,725],vb:[686,92,1221,725]},Slide10968:{lb:'',id:10968,from:1,to:90,iols:0,i360qs:false,propTxtScaling:false,minFontSizeScaling:14,useng:true,transition:{type:0},mmot:false,mdi:'Slide10968c',st:'Normal Slide',ccProperties:{1280:{pos:7,x:35,y:88}},audCC:[],vidCC:[],accstr:' ',si:[{n:'Image_1',t:15},{n:'Title_AutoShape_2',t:589},{n:'Text_Caption_1',t:19},{n:'Image_2',t:15},{n:'Image_3',t:15},{n:'SmartShape_1',t:612},{n:'Button_1',t:177},{n:'si10927',t:177},{n:'si10941',t:177},{n:'Image_4',t:15}],iph:[],v:false,bc:'#ffffff',JSONTT_0:[],JSONTT_6:[],qs:''},Slide10968c:{b:[0,0,0,0],sr:cp.fd,uid:10968,dn:'Slide10968',visible:'1'},Image_5:{type:15,from:91,to:180,rp:0,rpa:0,mdi:'Image_5c',retainState:false,immo:false,apsn:'Slide11009',JSONTT_4:[],cpa:true,oca:'cp.jumpToNextSlide();',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[10979]}],stis:0,bstiid:-1,sipst:0,sicbs:false,sihhs:false,sihds:false,isDD:false},Image_5c:{b:[-44,-4,1308,1056],uid:10979,sr:cp.fd,ip:'dr/10776_1352_1060Tr70.png',dn:'Image_5',visible:1,effectiveVi:1,JSONEffectData:false,accstr:'Image ',traccstr:'',ti:-1,acclng:'',vbwr:[-44,-4,1308,1056],vb:[-44,-4,1308,1056]},Text_Caption_2:{type:19,from:91,to:180,rp:0,rpa:0,mdi:'Text_Caption_2c',retainState:false,immo:false,apsn:'Slide11009',iflbx:false,ipflbx:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[10989]}],stis:0,bstiid:-1,sipst:0,sicbs:false,sihhs:false,sihds:false,isDD:false},Text_Caption_2c:{b:[48,176,1243,709],uid:10989,sr:cp.fd,ip:'dr/Text_Caption_2.png',dn:'Text_Caption_2',visible:1,effectiveVi:1,JSONEffectData:false,accstr:'We acknowledge that Alberta, where this course has been created, is the traditional territory of Treaty 6, Treaty 7, and Treaty 8, and the home of eight Métis Settlements and the Métis Nation of Alberta. We recognize the many diverse First Nations, Métis, and Inuit whose ancestors walked this land before us, and whose land we share today. We make this acknowledgment as an act of reconciliation and gratitude, and strive to work in partnership to build strong, positive, and healthy relationships. Because of this, both Alberta Health Services\' MORE and Sexual & Reproductive Health teams acknowledge the truth that colonization has impacted the health, education, and sexuality of everyone living on these lands, Indigenous and non-Indigenous. We offer this course, and our ongoing work, as a resource for people to access as they see fit to build the health of their communities, families, and themselves, and as one starting point for continued conversation. ',traccstr:'',ti:-1,acclng:'',vbwr:[48,176,1243,709],vb:[48,176,1243,709]},Text_Caption_3:{type:19,from:91,to:180,rp:0,rpa:0,mdi:'Text_Caption_3c',retainState:false,immo:false,apsn:'Slide11009',iflbx:false,ipflbx:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[10993]}],stis:0,bstiid:-1,sipst:0,sicbs:false,sihhs:false,sihds:false,isDD:false},Text_Caption_3c:{b:[39,39,918,174],uid:10993,sr:cp.fd,ip:'dr/Text_Caption_3.png',dn:'Text_Caption_3',visible:1,effectiveVi:1,JSONEffectData:false,accstr:'BEFORE WE START ',traccstr:'',ti:-1,acclng:'',vbwr:[39,39,918,174],vb:[39,39,918,174]},Slide11009:{lb:'',id:11009,from:91,to:180,iols:0,i360qs:false,propTxtScaling:false,minFontSizeScaling:14,useng:true,transition:{type:0},mmot:false,mdi:'Slide11009c',st:'Normal Slide',ccProperties:{1280:{pos:7,x:35,y:88}},audCC:[],vidCC:[],accstr:' ',si:[{n:'Image_5',t:15},{n:'Text_Caption_2',t:19},{n:'Text_Caption_3',t:19}],iph:[],v:false,bc:'#ffffff',JSONTT_0:[],sea:'cpCmndPause = 1;',JSONTT_6:[],qs:''},Slide11009c:{b:[0,0,0,0],sr:cp.fd,uid:11009,dn:'Slide11009',visible:'1'},SmartShape_2:{type:612,from:181,to:270,rp:0,rpa:0,mdi:'SmartShape_2c',retainState:false,immo:false,apsn:'Slide11088',JSONTT_4:[],cpa:true,oca:'cp.jumpToNextSlide();',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[11042]}],stis:0,bstiid:-1,sipst:0,sicbs:false,sihhs:false,sihds:false,isDD:false},SmartShape_2c:{b:[96,84,758,656],uid:11042,sr:cp.fd,ip:'dr/SmartShape_2.png',dn:'SmartShape_2',visible:1,effectiveVi:1,JSONEffectData:false,accstr:' ',traccstr:'',ti:-1,acclng:'',sc:'#1a1a1a',sw:2,ss:0,fa:0,bc:'#ffffff',p0:[[0],[1,96,84],[2,96,656],[2,758,656],[2,758,84],[2,96,84],[4]],svg:false,vbwr:[92,80,762,660],vb:[92,80,762,660]},Image_6:{type:15,from:181,to:270,rp:0,rpa:0,mdi:'Image_6c',retainState:false,immo:false,apsn:'Slide11088',JSONTT_4:[],cpa:true,oca:'cp.jumpToNextSlide();',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[11053]}],stis:0,bstiid:-1,sipst:0,sicbs:false,sihhs:false,sihds:false,isDD:false},Image_6c:{b:[698,187,1282,725],uid:11053,sr:cp.fd,ip:'dr/11045_584_538Tr89.png',dn:'Image_6',visible:1,effectiveVi:1,JSONEffectData:false,accstr:'Image ',traccstr:'',ti:-1,acclng:'',vbwr:[698,187,1282,725],vb:[698,187,1282,725]},Image_7:{type:15,from:181,to:270,rp:0,rpa:0,mdi:'Image_7c',retainState:false,immo:false,apsn:'Slide11088',JSONTT_4:[],cpa:true,oca:'cp.jumpToNextSlide();',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[11064]}],stis:0,bstiid:-1,sipst:0,sicbs:false,sihhs:false,sihds:false,isDD:false},Image_7c:{b:[668,151,1089,720],uid:11064,sr:cp.fd,ip:'dr/11056_421_569.png',dn:'Image_7',visible:1,effectiveVi:1,JSONEffectData:false,accstr:'Image ',traccstr:'',ti:-1,acclng:'',vbwr:[668,151,1089,720],vb:[668,151,1089,720]},Text_Caption_4:{type:19,from:181,to:270,rp:0,rpa:0,mdi:'Text_Caption_4c',retainState:false,immo:false,apsn:'Slide11088',iflbx:false,ipflbx:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[11072]}],stis:0,bstiid:-1,sipst:0,sicbs:false,sihhs:false,sihds:false,isDD:false},Text_Caption_4c:{b:[116,105,751,642],uid:11072,sr:cp.fd,ip:'dr/Text_Caption_4.png',dn:'Text_Caption_4',visible:1,effectiveVi:1,JSONEffectData:false,accstr:'Many teachers feel comfortable teaching about sexuality. Others do not feel confident. Taking time to reflect on one’s own perspectives about sexuality and recognizing how bias can influence practice helps increase capacity to teach comfortably and confidently about sexuality. ',traccstr:'',ti:-1,acclng:'',vbwr:[116,105,751,642],vb:[116,105,751,642]},Slide11088:{lb:'',id:11088,from:181,to:270,iols:0,i360qs:false,propTxtScaling:false,minFontSizeScaling:14,useng:true,transition:{type:0},mmot:false,mdi:'Slide11088c',st:'Normal Slide',ccProperties:{1280:{pos:7,x:35,y:88}},audCC:[],vidCC:[],accstr:' ',si:[{n:'SmartShape_2',t:612},{n:'Image_6',t:15},{n:'Image_7',t:15},{n:'Text_Caption_4',t:19}],iph:[],v:false,bc:'#ffffff',JSONTT_0:[],sea:'cpCmndPause = 1;',JSONTT_6:[],qs:''},Slide11088c:{b:[0,0,0,0],sr:cp.fd,uid:11088,dn:'Slide11088',visible:'1'},Image_8:{type:15,from:271,to:360,rp:0,rpa:0,mdi:'Image_8c',retainState:false,immo:false,apsn:'Slide11125',JSONTT_4:[],cpa:true,oca:'cp.jumpToNextSlide();',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[11099]}],stis:0,bstiid:-1,sipst:0,sicbs:false,sihhs:false,sihds:false,isDD:false},Image_8c:{b:[-74,123,1341,1220],uid:11099,sr:cp.fd,ip:'dr/10776_1415_1097Tr61.png',dn:'Image_8',visible:1,effectiveVi:1,JSONEffectData:false,accstr:'Image ',traccstr:'',ti:-1,acclng:'',vbwr:[-74,123,1341,1220],tr:'rotate(31deg)',vb:[-256,-164,1523,1507]},Text_Caption_5:{type:19,from:271,to:360,rp:0,rpa:0,mdi:'Text_Caption_5c',retainState:false,immo:false,apsn:'Slide11125',iflbx:false,ipflbx:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[11109]}],stis:0,bstiid:-1,sipst:0,sicbs:false,sihhs:false,sihds:false,isDD:false},Text_Caption_5c:{b:[285,225,1181,542],uid:11109,sr:cp.fd,ip:'dr/Text_Caption_5.png',dn:'Text_Caption_5',visible:1,effectiveVi:1,JSONEffectData:false,accstr:'Comprehensive sexual health education is designed to give students skills to make healthy decisions and healthy sexual decisions. ',traccstr:'',ti:-1,acclng:'',vbwr:[285,225,1181,542],vb:[285,225,1181,542]},Slide11125:{lb:'',id:11125,from:271,to:360,iols:0,i360qs:false,propTxtScaling:false,minFontSizeScaling:14,useng:true,transition:{type:0},mmot:false,mdi:'Slide11125c',st:'Normal Slide',ccProperties:{1280:{pos:7,x:35,y:88}},audCC:[],vidCC:[],accstr:' ',si:[{n:'Image_8',t:15},{n:'Text_Caption_5',t:19}],iph:[],v:false,bc:'#ffffff',JSONTT_0:[],sea:'cpCmndPause = 1;',JSONTT_6:[],qs:''},Slide11125c:{b:[0,0,0,0],sr:cp.fd,uid:11125,dn:'Slide11125',visible:'1'},SmartShape_3:{type:612,from:361,to:450,rp:0,rpa:0,mdi:'SmartShape_3c',retainState:false,immo:false,apsn:'Slide11196',JSONTT_4:[],cpa:true,oca:'cp.jumpToNextSlide();',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[11156]}],stis:0,bstiid:-1,sipst:0,sicbs:false,sihhs:false,sihds:false,isDD:false},SmartShape_3c:{b:[553,49,1214,677],uid:11156,dn:'SmartShape_3',visible:1,effectiveVi:1,JSONEffectData:false,accstr:' ',traccstr:'',ti:-1,acclng:'',sc:'#1a1a1a',sw:2,ss:0,fa:0,bc:'#e6e6e6',p0:[[0],[1,553,49],[2,553,677],[2,1214,677],[2,1214,49],[2,553,49],[4]],svg:false,vbwr:[549,45,1218,681],vb:[549,45,1218,681]},Text_Caption_6:{type:19,from:361,to:450,rp:0,rpa:0,mdi:'Text_Caption_6c',retainState:false,immo:false,apsn:'Slide11196',iflbx:false,ipflbx:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[11164]}],stis:0,bstiid:-1,sipst:0,sicbs:false,sihhs:false,sihds:false,isDD:false},Text_Caption_6c:{b:[645,236,1233,633],uid:11164,sr:cp.fd,ip:'dr/Text_Caption_6.png',dn:'Text_Caption_6',visible:1,effectiveVi:1,JSONEffectData:false,accstr:'Teaching sexuality is not necessarily about sex. Sex is a label assigned to people based on their reproductive anatomy. It is also an act, the act of sex. ',traccstr:'',ti:-1,acclng:'',vbwr:[645,236,1233,633],vb:[645,236,1233,633]},Image_9:{type:15,from:361,to:450,rp:0,rpa:0,mdi:'Image_9c',retainState:false,immo:false,apsn:'Slide11196',JSONTT_4:[],cpa:true,oca:'cp.jumpToNextSlide();',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[11176]}],stis:0,bstiid:-1,sipst:0,sicbs:false,sihhs:false,sihds:false,isDD:false},Image_9c:{b:[-117,75,1047,729],uid:11176,sr:cp.fd,ip:'dr/11168_1164_654.png',dn:'Image_9',visible:1,effectiveVi:1,JSONEffectData:false,accstr:'Image ',traccstr:'',ti:-1,acclng:'',vbwr:[-117,75,1047,729],vb:[-117,75,1047,729]},Text_Caption_7:{type:19,from:361,to:450,rp:0,rpa:0,mdi:'Text_Caption_7c',retainState:false,immo:false,apsn:'Slide11196',iflbx:false,ipflbx:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[11180]}],stis:0,bstiid:-1,sipst:0,sicbs:false,sihhs:false,sihds:false,isDD:false},Text_Caption_7c:{b:[646,87,939,222],uid:11180,sr:cp.fd,ip:'dr/Text_Caption_7.png',dn:'Text_Caption_7',visible:1,effectiveVi:1,JSONEffectData:false,accstr:'pSSSST... ',traccstr:'',ti:-1,acclng:'',vbwr:[646,87,939,222],tr:'rotate(359deg)',vb:[644,84,941,225]},Slide11196:{lb:'',id:11196,from:361,to:450,iols:0,i360qs:false,propTxtScaling:false,minFontSizeScaling:14,useng:true,transition:{type:0},mmot:false,mdi:'Slide11196c',st:'Normal Slide',ccProperties:{1280:{pos:7,x:35,y:88}},audCC:[],vidCC:[],accstr:' ',si:[{n:'SmartShape_3',t:612},{n:'Text_Caption_6',t:19},{n:'Image_9',t:15},{n:'Text_Caption_7',t:19}],iph:[],v:false,bc:'#ffffff',JSONTT_0:[],sea:'cpCmndPause = 1;',JSONTT_6:[],qs:''},Slide11196c:{b:[0,0,0,0],sr:cp.fd,uid:11196,dn:'Slide11196',visible:'1'},Image_10:{type:15,from:451,to:540,rp:0,rpa:0,mdi:'Image_10c',retainState:false,immo:false,apsn:'Slide11370',JSONTT_4:[],cpa:true,oca:'cp.jumpToNextSlide();',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[11208]}],stis:0,bstiid:-1,sipst:0,sicbs:false,sihhs:false,sihds:false,isDD:false},Image_10c:{b:[-1361,-487,780,856],uid:11208,sr:cp.fd,ip:'dr/11200_2141_1343Tr88.png',dn:'Image_10',visible:1,effectiveVi:1,JSONEffectData:false,accstr:'Image ',traccstr:'',ti:-1,acclng:'',vbwr:[-1361,-487,780,856],tr:'rotate(295deg)',vb:[-1352,-1070,771,1439]},SmartShape_4:{type:612,from:451,to:540,rp:0,rpa:0,mdi:'SmartShape_4c',retainState:false,immo:false,apsn:'Slide11370',JSONTT_4:[],cpa:true,oca:'cp.hide("Text_Caption_9");\
cp.hide("SmartShape_6");\
cp.show("Smartshape_WHO_info_5");\
cp.changeState("Smartshape_WHO_info_5","WHO_info");',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,uab:1,chfn:cp.ch,osc:'',osct:0,ofc:'',ofct:0,pa:496,enabled:1,ma:-1,pfc:1,dclk:false,amc:true,ca:'SmartShape_4ClkAd',eh:cp.cbKH,siq:false,sat:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[11247]},{stn:'RollOver',stt:2,stsi:[11256]},{stn:'Down',stt:1,stsi:[11265]}],stis:0,bstiid:-1,sipst:0,sicbs:false,sihhs:true,sihds:true,stc:['SmartShape_4','si11256','si11265'],isDD:false},SmartShape_4c:{b:[593,249,1178,580],uid:11247,dn:'SmartShape_4',visible:1,effectiveVi:1,JSONEffectData:false,accstr:' ',traccstr:'',ti:2500,acclng:'',sc:'#1a1a1a',sw:2,ss:0,fa:0,bc:'#e6e6e6',p0:[[0],[1,593,249],[2,593,580.00],[2,1178,580.00],[2,1178,249],[2,593,249],[4]],svg:false,vbwr:[589,245,1182,584],vb:[589,245,1182,584]},SmartShape_4ClkAd:{src:'ar/Mouse.mp3',du:182},si11256:{type:612,from:451,to:540,rp:0,rpa:0,mdi:'si11256c',retainState:false,immo:false,apsn:'Slide11370',JSONTT_4:[],cpa:true,oca:'cp.hide("Text_Caption_9");\
cp.hide("SmartShape_6");\
cp.show("Smartshape_WHO_info_5");\
cp.changeState("Smartshape_WHO_info_5","WHO_info");',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,uab:1,chfn:cp.ch,osc:'',osct:0,ofc:'',ofct:0,pa:496,enabled:1,ma:-1,pfc:1,dclk:false,amc:true,ca:'si11256ClkAd',eh:cp.cbKH,siq:false,sat:true,trin:0,trout:0,bstin:'SmartShape_4',stl:[{stn:'Normal',stt:0,stsi:[11256]}],stis:0,bstiid:11247,sipst:2,sicbs:true,sihhs:true,sihds:true,isDD:false},si11256c:{b:[593,249,1178,580],uid:11256,dn:'si11256',visible:0,effectiveVi:1,JSONEffectData:false,accstr:' ',traccstr:'',ti:2500,acclng:'',sc:'#ff3437',sw:4,ss:0,fa:20,bc:'#737373',p0:[[0],[1,593,249],[2,593,580.00],[2,1178,580.00],[2,1178,249],[2,593,249],[4]],svg:false,vbwr:[585,241,1186,588],vb:[585,241,1186,588]},si11256ClkAd:{src:'ar/Mouse.mp3',du:182},si11265:{type:612,from:451,to:540,rp:0,rpa:0,mdi:'si11265c',retainState:false,immo:false,apsn:'Slide11370',JSONTT_4:[],cpa:true,oca:'cp.hide("Text_Caption_9");\
cp.hide("SmartShape_6");\
cp.show("Smartshape_WHO_info_5");\
cp.changeState("Smartshape_WHO_info_5","WHO_info");',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,uab:1,chfn:cp.ch,osc:'',osct:0,ofc:'',ofct:0,pa:496,enabled:1,ma:-1,pfc:1,dclk:false,amc:true,ca:'si11265ClkAd',eh:cp.cbKH,siq:false,sat:true,trin:0,trout:0,bstin:'SmartShape_4',stl:[{stn:'Normal',stt:0,stsi:[11265]}],stis:0,bstiid:11247,sipst:1,sicbs:true,sihhs:true,sihds:true,isDD:false},si11265c:{b:[593,249,1178,580],uid:11265,dn:'si11265',visible:0,effectiveVi:1,JSONEffectData:false,accstr:' ',traccstr:'',ti:2500,acclng:'',sc:'#1a1a1a',sw:2,ss:0,fa:40,bc:'#171717',p0:[[0],[1,593,249],[2,593,580.00],[2,1178,580.00],[2,1178,249],[2,593,249],[4]],svg:false,vbwr:[589,245,1182,584],vb:[589,245,1182,584]},si11265ClkAd:{src:'ar/Mouse.mp3',du:182},Smartshape_WHO_info_5:{type:612,from:451,to:540,rp:0,rpa:0,mdi:'Smartshape_WHO_info_5c',retainState:false,immo:false,apsn:'Slide11370',JSONTT_4:[],cpa:true,oca:'cp.jumpToNextSlide();',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[11279]},{stn:'WHO_info',stt:9,stsi:[11288,11300,11308]}],stis:0,bstiid:-1,sipst:0,sicbs:false,sihhs:false,sihds:false,stc:['Smartshape_WHO_info_5','si11288'],isDD:false},Smartshape_WHO_info_5c:{b:[53,66,582,664],uid:11279,dn:'Smartshape_WHO_info_5',visible:1,effectiveVi:1,JSONEffectData:false,accstr:' ',traccstr:'',ti:-1,acclng:'',sc:'#1a1a1a',sw:2,ss:0,fa:0,bc:'#ffffff',p0:[[0],[1,53,66],[2,53,664],[2,582,664],[2,582,66],[2,53,66],[4]],svg:false,vbwr:[49,62,586,668],vb:[49,62,586,668]},si11288:{type:612,from:451,to:540,rp:0,rpa:0,mdi:'si11288c',retainState:false,immo:false,apsn:'Slide11370',JSONTT_4:[],cpa:true,oca:'cp.jumpToNextSlide();',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,trin:0,trout:0,bstin:'Smartshape_WHO_info_5',stl:[{stn:'Normal',stt:0,stsi:[11288]}],stis:0,bstiid:11279,sipst:9,sicbs:true,sihhs:false,sihds:false,isDD:false},si11288c:{b:[53,66,604,664],uid:11288,dn:'si11288',visible:0,effectiveVi:1,JSONEffectData:false,accstr:' ',traccstr:'',ti:-1,acclng:'',sc:'#1a1a1a',sw:2,ss:0,fa:100,bc:'#ffffff',p0:[[0],[1,53,66],[2,53,664],[2,604,664],[2,604,66],[2,53,66],[4]],svg:false,vbwr:[49,62,608,668],vb:[49,62,608,668]},Image_11:{type:15,from:451,to:540,rp:0,rpa:0,mdi:'Image_11c',retainState:false,immo:false,apsn:'Slide11370',JSONTT_4:[],cpa:true,oca:'cp.jumpToNextSlide();',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[11300]}],stis:0,bstiid:11279,sipst:9,sicbs:false,sihhs:false,sihds:false,isDD:false},Image_11c:{b:[214,466,431,692],uid:11300,sr:cp.fd,ip:'dr/11292_217_226.png',dn:'Image_11',visible:0,effectiveVi:1,JSONEffectData:false,accstr:'Image ',traccstr:'',ti:-1,acclng:'',vbwr:[214,466,431,692],vb:[214,466,431,692]},Text_Caption_8:{type:19,from:451,to:540,rp:0,rpa:0,mdi:'Text_Caption_8c',retainState:false,immo:false,apsn:'Slide11370',iflbx:false,ipflbx:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[11308]}],stis:0,bstiid:11279,sipst:9,sicbs:false,sihhs:false,sihds:false,isDD:false},Text_Caption_8c:{b:[80,85,547,481],uid:11308,sr:cp.fd,ip:'dr/Text_Caption_8.png',dn:'Text_Caption_8',visible:0,effectiveVi:1,JSONEffectData:false,accstr:'According to the World Health Organization (WHO), sexuality is a central aspect of being human and is important to healthy development whether someone is sexually active or not. Sexuality encompasses sex, intimacy, reproduction, eroticism, pleasure, sexual orientation, gender identities and roles. ',traccstr:'',ti:-1,acclng:'',vbwr:[80,85,547,481],vb:[80,85,547,481]},Image_12:{type:15,from:451,to:540,rp:0,rpa:0,mdi:'Image_12c',retainState:false,immo:false,apsn:'Slide11370',JSONTT_4:[],cpa:true,oca:'cp.hide("Text_Caption_9");\
cp.hide("SmartShape_6");\
cp.show("Smartshape_WHO_info_5");\
cp.changeState("Smartshape_WHO_info_5","WHO_info");',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,chfn:cp.ch,uab:1,osc:'',osct:0,ofc:'',ofct:0,enabled:1,pa:496,ma:-1,pfc:1,dclk:false,amc:true,eh:cp.cbKH,siq:false,sat:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[11323]},{stn:'RollOver',stt:2,stsi:[11329]},{stn:'Down',stt:1,stsi:[11335]}],stis:0,bstiid:-1,sipst:0,sicbs:false,sihhs:true,sihds:true,stc:['Image_12','si11329','si11335'],isDD:false},Image_12c:{b:[540,211,1227,720],uid:11323,sr:cp.fd,ip:'dr/11311_687_509.png',dn:'Image_12',visible:1,effectiveVi:1,JSONEffectData:false,accstr:'Image ',traccstr:'',ti:2500,acclng:'',vbwr:[540,211,1227,720],vb:[540,211,1227,720]},si11329:{type:15,from:451,to:540,rp:0,rpa:0,mdi:'si11329c',retainState:false,immo:false,apsn:'Slide11370',JSONTT_4:[],cpa:true,oca:'cp.hide("Text_Caption_9");\
cp.hide("SmartShape_6");\
cp.show("Smartshape_WHO_info_5");\
cp.changeState("Smartshape_WHO_info_5","WHO_info");',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,chfn:cp.ch,uab:1,osc:'',osct:0,ofc:'',ofct:0,enabled:1,pa:496,ma:-1,pfc:1,dclk:false,amc:true,eh:cp.cbKH,siq:false,sat:true,trin:0,trout:0,bstin:'Image_12',stl:[{stn:'Normal',stt:0,stsi:[11329]}],stis:0,bstiid:11323,sipst:2,sicbs:true,sihhs:true,sihds:true,isDD:false},si11329c:{b:[540,211,1227,720],uid:11329,sr:cp.fd,ip:'dr/11311_687_509.png',dn:'si11329',visible:0,effectiveVi:1,JSONEffectData:false,accstr:'Image ',traccstr:'',ti:2500,acclng:'',vbwr:[540,211,1227,720],vb:[540,211,1227,720]},si11335:{type:15,from:451,to:540,rp:0,rpa:0,mdi:'si11335c',retainState:false,immo:false,apsn:'Slide11370',JSONTT_4:[],cpa:true,oca:'cp.hide("Text_Caption_9");\
cp.hide("SmartShape_6");\
cp.show("Smartshape_WHO_info_5");\
cp.changeState("Smartshape_WHO_info_5","WHO_info");',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,chfn:cp.ch,uab:1,osc:'',osct:0,ofc:'',ofct:0,enabled:1,pa:496,ma:-1,pfc:1,dclk:false,amc:true,eh:cp.cbKH,siq:false,sat:true,trin:0,trout:0,bstin:'Image_12',stl:[{stn:'Normal',stt:0,stsi:[11335]}],stis:0,bstiid:11323,sipst:1,sicbs:true,sihhs:true,sihds:true,isDD:false},si11335c:{b:[540,211,1227,720],uid:11335,sr:cp.fd,ip:'dr/11311_687_509.png',dn:'si11335',visible:0,effectiveVi:1,JSONEffectData:false,accstr:'Image ',traccstr:'',ti:2500,acclng:'',vbwr:[540,211,1227,720],vb:[540,211,1227,720]},Text_Caption_9:{type:19,from:451,to:540,rp:0,rpa:0,mdi:'Text_Caption_9c',retainState:false,immo:false,apsn:'Slide11370',iflbx:false,ipflbx:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[11339]}],stis:0,bstiid:-1,sipst:0,sicbs:false,sihhs:false,sihds:false,isDD:false},Text_Caption_9c:{b:[45,28,517,669],uid:11339,sr:cp.fd,ip:'dr/Text_Caption_9.png',dn:'Text_Caption_9',visible:1,effectiveVi:1,JSONEffectData:false,accstr:' Then what is sexuality? What DOES sexual health deal with?Click on the screen to take a closer look at how the World Health Organization defines sexuality and the importance it plays in human development: ',traccstr:'',ti:-1,acclng:'',vbwr:[45,28,517,669],vb:[45,28,517,669]},SmartShape_6:{type:612,from:451,to:540,rp:0,rpa:0,mdi:'SmartShape_6c',retainState:false,immo:false,apsn:'Slide11370',JSONTT_4:[],cpa:true,oca:'cp.jumpToNextSlide();',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[11350]}],stis:0,bstiid:-1,sipst:0,sicbs:false,sihhs:false,sihds:false,isDD:false},SmartShape_6c:{b:[401,372,534,410],uid:11350,dn:'SmartShape_6',visible:1,effectiveVi:1,JSONEffectData:false,accstr:' ',traccstr:'',ti:-1,acclng:'',sc:'#1a1a1a',sw:0,ss:0,fa:100,bc:'#007ca9',p0:[[0],[1,514.49,372],[2,514.49,384],[2,401,384],[2,401,398],[2,514.49,398],[2,514.49,410.00],[2,534,391],[2,514.49,372],[4]],svg:false,vbwr:[401,372,534,410],vb:[401,372,534,410]},Slide11370:{lb:'',id:11370,from:451,to:540,iols:0,i360qs:false,propTxtScaling:false,minFontSizeScaling:14,useng:true,transition:{type:0},mmot:false,mdi:'Slide11370c',st:'Normal Slide',ccProperties:{1280:{pos:7,x:35,y:88}},audCC:[],vidCC:[],accstr:' ',si:[{n:'Image_10',t:15},{n:'SmartShape_4',t:612},{n:'si11256',t:612},{n:'si11265',t:612},{n:'Smartshape_WHO_info_5',t:612},{n:'si11288',t:612},{n:'Image_11',t:15},{n:'Text_Caption_8',t:19},{n:'Image_12',t:15},{n:'si11329',t:15},{n:'si11335',t:15},{n:'Text_Caption_9',t:19},{n:'SmartShape_6',t:612}],iph:[],ea:'SmartShape_4ClkAd,si11256ClkAd,si11265ClkAd',v:false,bc:'#ffffff',JSONTT_0:[],sea:'cpCmndPause = 1;\
cp.show("Text_Caption_9");\
cp.hide("Smartshape_WHO_info_5");\
cp.enable("SmartShape_4");',JSONTT_6:[],qs:''},Slide11370c:{b:[0,0,0,0],sr:cp.fd,uid:11370,dn:'Slide11370',visible:'1'},Image_13:{type:15,from:541,to:630,rp:0,rpa:0,mdi:'Image_13c',retainState:false,immo:false,apsn:'Slide11613',JSONTT_4:[],cpa:true,oca:'cp.jumpToNextSlide();',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[11381]}],stis:0,bstiid:-1,sipst:0,sicbs:false,sihhs:false,sihds:false,isDD:false},Image_13c:{b:[1,76,725,729],uid:11381,sr:cp.fd,ip:'dr/11045_724_653Fl1Tr85.png',dn:'Image_13',visible:1,effectiveVi:1,JSONEffectData:false,accstr:'Image ',traccstr:'',ti:-1,acclng:'',vbwr:[1,76,725,729],vb:[1,76,725,729]},Image_14:{type:15,from:541,to:630,rp:0,rpa:0,mdi:'Image_14c',retainState:false,immo:false,apsn:'Slide11613',JSONTT_4:[],cpa:true,oca:'cp.jumpToNextSlide();',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[11392]}],stis:0,bstiid:-1,sipst:0,sicbs:false,sihhs:false,sihds:false,isDD:false},Image_14c:{b:[282,261,818,955],uid:11392,sr:cp.fd,ip:'dr/11384_536_694.png',dn:'Image_14',visible:1,effectiveVi:1,JSONEffectData:false,accstr:'Image ',traccstr:'',ti:-1,acclng:'',vbwr:[282,261,818,955],vb:[282,261,818,955]},Image_15:{type:15,from:541,to:630,rp:0,rpa:0,mdi:'Image_15c',retainState:false,immo:false,apsn:'Slide11613',JSONTT_4:[],cpa:true,oca:'cp.jumpToNextSlide();',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[11403]}],stis:0,bstiid:-1,sipst:0,sicbs:false,sihhs:false,sihds:false,isDD:false},Image_15c:{b:[-51,315,398,911],uid:11403,sr:cp.fd,ip:'dr/11395_449_596.png',dn:'Image_15',visible:1,effectiveVi:1,JSONEffectData:false,accstr:'Image ',traccstr:'',ti:-1,acclng:'',vbwr:[-51,315,398,911],vb:[-51,315,398,911]},Image_16:{type:15,from:541,to:630,rp:0,rpa:0,mdi:'Image_16c',retainState:false,immo:false,apsn:'Slide11613',JSONTT_4:[],cpa:true,oca:'cp.jumpToNextSlide();',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[11414]}],stis:0,bstiid:-1,sipst:0,sicbs:false,sihhs:false,sihds:false,isDD:false},Image_16c:{b:[671,347,1218,874],uid:11414,sr:cp.fd,ip:'dr/11406_547_527.png',dn:'Image_16',visible:1,effectiveVi:1,JSONEffectData:false,accstr:'Image ',traccstr:'',ti:-1,acclng:'',vbwr:[671,347,1218,874],vb:[671,347,1218,874]},Text_Caption_10:{type:19,from:541,to:630,rp:0,rpa:0,mdi:'Text_Caption_10c',retainState:false,immo:false,apsn:'Slide11613',iflbx:false,ipflbx:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[11424]}],stis:0,bstiid:-1,sipst:0,sicbs:false,sihhs:false,sihds:false,isDD:false},Text_Caption_10c:{b:[58,16,559,82],uid:11424,sr:cp.fd,ip:'dr/Text_Caption_10.png',dn:'Text_Caption_10',visible:1,effectiveVi:1,JSONEffectData:false,accstr:'Speaker Introductions ',traccstr:'',ti:-1,acclng:'',vbwr:[58,16,559,82],vb:[58,16,559,82]},Text_Caption_11:{type:19,from:541,to:630,rp:0,rpa:0,mdi:'Text_Caption_11c',retainState:false,immo:false,apsn:'Slide11613',iflbx:false,ipflbx:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[11428]}],stis:0,bstiid:-1,sipst:0,sicbs:false,sihhs:false,sihds:false,isDD:false},Text_Caption_11c:{b:[58,73,1235,292],uid:11428,sr:cp.fd,ip:'dr/Text_Caption_11.png',dn:'Text_Caption_11',visible:1,effectiveVi:1,JSONEffectData:false,accstr:'Kim, Chris, and Christine sat down with MORE to chat candidly about their experiences teaching sexuality in Alberta schools. Throughout this course and the rest of the course series, you’ll hear their perspectives and insights, facilitated by MORE Education Consultant, Natalie. Click on each audio link to listen to their bios. ',traccstr:'',ti:-1,acclng:'',vbwr:[58,73,1235,292],vb:[58,73,1235,292]},Image_17:{type:15,from:541,to:630,rp:0,rpa:0,mdi:'Image_17c',retainState:false,immo:false,apsn:'Slide11613',JSONTT_4:[],cpa:true,oca:'cp.playAudio2();cp.actionChoicePauseMovie();',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[11441]}],stis:0,bstiid:-1,sipst:0,sicbs:false,sihhs:false,sihds:false,stc:['Image_17'],isDD:false},Image_17c:{b:[1083,460,1160,538],uid:11441,sr:cp.fd,ip:'dr/11431_77_78.png',dn:'Image_17',visible:1,effectiveVi:1,JSONEffectData:false,accstr:'Image ',traccstr:'',ti:-1,acclng:'',vbwr:[1083,460,1160,538],vb:[1083,460,1160,538]},Image_18:{type:15,from:541,to:630,rp:0,rpa:0,mdi:'Image_18c',retainState:false,immo:false,apsn:'Slide11613',JSONTT_4:[],cpa:true,oca:'cp.playAudio2();cp.actionChoicePauseMovie();',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[11451]}],stis:0,bstiid:-1,sipst:0,sicbs:false,sihhs:false,sihds:false,stc:['Image_18'],isDD:false},Image_18c:{b:[671,336,748,414],uid:11451,sr:cp.fd,ip:'dr/11431_77_78.png',dn:'Image_18',visible:1,effectiveVi:1,JSONEffectData:false,accstr:'Image ',traccstr:'',ti:-1,acclng:'',vbwr:[671,336,748,414],vb:[671,336,748,414]},Text_Caption_12:{type:19,from:541,to:630,rp:0,rpa:0,mdi:'Text_Caption_12c',retainState:false,immo:false,apsn:'Slide11613',iflbx:false,ipflbx:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[11455]}],stis:0,bstiid:-1,sipst:0,sicbs:false,sihhs:false,sihds:false,isDD:false},Text_Caption_12c:{b:[243,380,398,424],uid:11455,sr:cp.fd,ip:'dr/Text_Caption_12.png',dn:'Text_Caption_12',visible:1,effectiveVi:1,JSONEffectData:false,accstr:'KIM (she/her) ',traccstr:'',ti:-1,acclng:'',vbwr:[243,380,398,424],vb:[243,380,398,424]},Text_Caption_13:{type:19,from:541,to:630,rp:0,rpa:0,mdi:'Text_Caption_13c',retainState:false,immo:false,apsn:'Slide11613',iflbx:false,ipflbx:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[11459]}],stis:0,bstiid:-1,sipst:0,sicbs:false,sihhs:false,sihds:false,isDD:false},Text_Caption_13c:{b:[632,296,827,336],uid:11459,sr:cp.fd,ip:'dr/Text_Caption_13.png',dn:'Text_Caption_13',visible:1,effectiveVi:1,JSONEffectData:false,accstr:'CHRIS (he/his) ',traccstr:'',ti:-1,acclng:'',vbwr:[632,296,827,336],vb:[632,296,827,336]},Text_Caption_14:{type:19,from:541,to:630,rp:0,rpa:0,mdi:'Text_Caption_14c',retainState:false,immo:false,apsn:'Slide11613',iflbx:false,ipflbx:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[11463]}],stis:0,bstiid:-1,sipst:0,sicbs:false,sihhs:false,sihds:false,isDD:false},Text_Caption_14c:{b:[989,414,1280,454],uid:11463,sr:cp.fd,ip:'dr/Text_Caption_14.png',dn:'Text_Caption_14',visible:1,effectiveVi:1,JSONEffectData:false,accstr:'CHRISTINE (she/her) ',traccstr:'',ti:-1,acclng:'',vbwr:[989,414,1280,454],vb:[989,414,1280,454]},Button_Chris_7:{type:612,from:541,to:630,rp:0,rpa:0,mdi:'Button_Chris_7c',retainState:false,immo:false,apsn:'Slide11613',JSONTT_4:[],cpa:true,oca:'cp.playAudio2("11489");cp.actionChoicePauseMovie();',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,uab:1,chfn:cp.ch,osc:'',osct:0,ofc:'',ofct:0,pa:586,enabled:1,ma:-1,pfc:1,dclk:false,amc:true,eh:cp.cbKH,ssc:1,siq:false,sat:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[11499]},{stn:'RollOver',stt:2,stsi:[11508]},{stn:'Down',stt:1,stsi:[11517]}],stis:0,bstiid:-1,sipst:0,sicbs:false,sihhs:true,sihds:true,stc:['Button_Chris_7','si11508','si11517'],isDD:false},Button_Chris_7c:{b:[675,338,745,408],uid:11499,dn:'Button_Chris_7',visible:1,effectiveVi:1,JSONEffectData:false,accstr:' ',traccstr:'',ti:2500,acclng:'',sc:'#1a1a1a',sw:0,ss:0,fa:0,bc:'#9a9a9a',p0:[[0],[1,710.00,338],[3,690.67,338,675,353.67,675,373],[3,675,392.33,690.67,408,710.00,408],[3,729.33,408,745,392.33,745,373],[3,745,353.67,729.33,338,710.00,338],[4]],svg:false,vbwr:[675,338,745,408],vb:[675,338,745,408]},PA11489:{src:'ar/11489.mp3',du:12485},si11508:{type:612,from:541,to:630,rp:0,rpa:0,mdi:'si11508c',retainState:false,immo:false,apsn:'Slide11613',JSONTT_4:[],cpa:true,oca:'cp.playAudio2("11489");cp.actionChoicePauseMovie();',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,uab:1,chfn:cp.ch,osc:'',osct:0,ofc:'',ofct:0,pa:586,enabled:1,ma:-1,pfc:1,dclk:false,amc:true,eh:cp.cbKH,siq:false,sat:true,trin:0,trout:0,bstin:'Button_Chris_7',stl:[{stn:'Normal',stt:0,stsi:[11508]}],stis:0,bstiid:11499,sipst:2,sicbs:true,sihhs:true,sihds:true,isDD:false},si11508c:{b:[675,338,745,408],uid:11508,dn:'si11508',visible:0,effectiveVi:1,JSONEffectData:false,accstr:' ',traccstr:'',ti:2500,acclng:'',sc:'#1a1a1a',sw:2,ss:0,fa:30,bc:'#999999',p0:[[0],[1,710.00,338],[3,690.67,338,675,353.67,675,373],[3,675,392.33,690.67,408,710.00,408],[3,729.33,408,745,392.33,745,373],[3,745,353.67,729.33,338,710.00,338],[4]],svg:false,vbwr:[671,334,749,412],vb:[671,334,749,412]},si11517:{type:612,from:541,to:630,rp:0,rpa:0,mdi:'si11517c',retainState:false,immo:false,apsn:'Slide11613',JSONTT_4:[],cpa:true,oca:'cp.playAudio2("11489");cp.actionChoicePauseMovie();',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,uab:1,chfn:cp.ch,osc:'',osct:0,ofc:'',ofct:0,pa:586,enabled:1,ma:-1,pfc:1,dclk:false,amc:true,eh:cp.cbKH,siq:false,sat:true,trin:0,trout:0,bstin:'Button_Chris_7',stl:[{stn:'Normal',stt:0,stsi:[11517]}],stis:0,bstiid:11499,sipst:1,sicbs:true,sihhs:true,sihds:true,isDD:false},si11517c:{b:[675,338,745,408],uid:11517,dn:'si11517',visible:0,effectiveVi:1,JSONEffectData:false,accstr:' ',traccstr:'',ti:2500,acclng:'',sc:'#1a1a1a',sw:2,ss:0,fa:30,bc:'#171717',p0:[[0],[1,710.00,338],[3,690.67,338,675,353.67,675,373],[3,675,392.33,690.67,408,710.00,408],[3,729.33,408,745,392.33,745,373],[3,745,353.67,729.33,338,710.00,338],[4]],svg:false,vbwr:[671,334,749,412],vb:[671,334,749,412]},Button_Christine_8:{type:612,from:541,to:630,rp:0,rpa:0,mdi:'Button_Christine_8c',retainState:false,immo:false,apsn:'Slide11613',JSONTT_4:[],cpa:true,oca:'cp.playAudio2("11525");cp.actionChoicePauseMovie();',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,uab:1,chfn:cp.ch,osc:'',osct:0,ofc:'',ofct:0,pa:586,enabled:1,ma:-1,pfc:1,dclk:false,amc:true,eh:cp.cbKH,ssc:1,siq:false,sat:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[11535]},{stn:'RollOver',stt:2,stsi:[11544]},{stn:'Down',stt:1,stsi:[11553]}],stis:0,bstiid:-1,sipst:0,sicbs:false,sihhs:true,sihds:true,stc:['Button_Christine_8','si11544','si11553'],isDD:false},Button_Christine_8c:{b:[1087,463,1157,533],uid:11535,dn:'Button_Christine_8',visible:1,effectiveVi:1,JSONEffectData:false,accstr:' ',traccstr:'',ti:2500,acclng:'',sc:'#1a1a1a',sw:0,ss:0,fa:0,bc:'#e6e6e6',p0:[[0],[1,1122,463],[3,1102.67,463,1087,478.67,1087,498],[3,1087,517.33,1102.67,533,1122,533],[3,1141.33,533,1157,517.33,1157,498],[3,1157,478.67,1141.33,463,1122,463],[4]],svg:false,vbwr:[1087,463,1157,533],vb:[1087,463,1157,533]},PA11525:{src:'ar/11525.mp3',du:13818},si11544:{type:612,from:541,to:630,rp:0,rpa:0,mdi:'si11544c',retainState:false,immo:false,apsn:'Slide11613',JSONTT_4:[],cpa:true,oca:'cp.playAudio2("11525");cp.actionChoicePauseMovie();',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,uab:1,chfn:cp.ch,osc:'',osct:0,ofc:'',ofct:0,pa:586,enabled:1,ma:-1,pfc:1,dclk:false,amc:true,eh:cp.cbKH,siq:false,sat:true,trin:0,trout:0,bstin:'Button_Christine_8',stl:[{stn:'Normal',stt:0,stsi:[11544]}],stis:0,bstiid:11535,sipst:2,sicbs:true,sihhs:true,sihds:true,isDD:false},si11544c:{b:[1087,463,1157,533],uid:11544,dn:'si11544',visible:0,effectiveVi:1,JSONEffectData:false,accstr:' ',traccstr:'',ti:2500,acclng:'',sc:'#1a1a1a',sw:2,ss:0,fa:30,bc:'#999999',p0:[[0],[1,1122,463],[3,1102.67,463,1087,478.67,1087,498],[3,1087,517.33,1102.67,533,1122,533],[3,1141.33,533,1157,517.33,1157,498],[3,1157,478.67,1141.33,463,1122,463],[4]],svg:false,vbwr:[1083,459,1161,537],vb:[1083,459,1161,537]},si11553:{type:612,from:541,to:630,rp:0,rpa:0,mdi:'si11553c',retainState:false,immo:false,apsn:'Slide11613',JSONTT_4:[],cpa:true,oca:'cp.playAudio2("11525");cp.actionChoicePauseMovie();',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,uab:1,chfn:cp.ch,osc:'',osct:0,ofc:'',ofct:0,pa:586,enabled:1,ma:-1,pfc:1,dclk:false,amc:true,eh:cp.cbKH,siq:false,sat:true,trin:0,trout:0,bstin:'Button_Christine_8',stl:[{stn:'Normal',stt:0,stsi:[11553]}],stis:0,bstiid:11535,sipst:1,sicbs:true,sihhs:true,sihds:true,isDD:false},si11553c:{b:[1087,463,1157,533],uid:11553,dn:'si11553',visible:0,effectiveVi:1,JSONEffectData:false,accstr:' ',traccstr:'',ti:2500,acclng:'',sc:'#1a1a1a',sw:2,ss:0,fa:30,bc:'#171717',p0:[[0],[1,1122,463],[3,1102.67,463,1087,478.67,1087,498],[3,1087,517.33,1102.67,533,1122,533],[3,1141.33,533,1157,517.33,1157,498],[3,1157,478.67,1141.33,463,1122,463],[4]],svg:false,vbwr:[1083,459,1161,537],vb:[1083,459,1161,537]},Image_19:{type:15,from:541,to:630,rp:0,rpa:0,mdi:'Image_19c',retainState:false,immo:false,apsn:'Slide11613',JSONTT_4:[],cpa:true,oca:'cp.jumpToNextSlide();',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[11561]}],stis:0,bstiid:-1,sipst:0,sicbs:false,sihhs:false,sihds:false,isDD:false},Image_19c:{b:[282,431,350,502],uid:11561,sr:cp.fd,ip:'dr/11431_68_71.png',dn:'Image_19',visible:1,effectiveVi:1,JSONEffectData:false,accstr:'Image ',traccstr:'',ti:-1,acclng:'',vbwr:[282,431,350,502],vb:[282,431,350,502]},SmartShape_9:{type:612,from:541,to:630,rp:0,rpa:0,mdi:'SmartShape_9c',retainState:false,immo:false,apsn:'Slide11613',JSONTT_4:[],cpa:true,oca:'cp.playAudio2("11569");cp.actionChoicePauseMovie();',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,uab:1,chfn:cp.ch,osc:'',osct:0,ofc:'',ofct:0,pa:586,enabled:1,ma:-1,pfc:1,dclk:false,amc:true,ca:'SmartShape_9ClkAd',eh:cp.cbKH,siq:false,sat:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[11579]},{stn:'RollOver',stt:2,stsi:[11588]},{stn:'Down',stt:1,stsi:[11597]}],stis:0,bstiid:-1,sipst:0,sicbs:false,sihhs:true,sihds:true,stc:['SmartShape_9','si11588','si11597'],isDD:false},SmartShape_9c:{b:[286,436,346,496],uid:11579,dn:'SmartShape_9',visible:1,effectiveVi:1,JSONEffectData:false,accstr:' ',traccstr:'',ti:2500,acclng:'',sc:'#1a1a1a',sw:0,ss:0,fa:0,bc:'#e6e6e6',p0:[[0],[1,316,436],[3,299.43,436,286,449.43,286,466],[3,286,482.57,299.43,496,316,496],[3,332.57,496,346,482.57,346,466],[3,346,449.43,332.57,436,316,436],[4]],svg:false,vbwr:[286,436,346,496],vb:[286,436,346,496]},SmartShape_9ClkAd:{src:'ar/Mouse.mp3',du:182},PA11569:{src:'ar/11569.mp3',du:24711},si11588:{type:612,from:541,to:630,rp:0,rpa:0,mdi:'si11588c',retainState:false,immo:false,apsn:'Slide11613',JSONTT_4:[],cpa:true,oca:'cp.playAudio2("11569");cp.actionChoicePauseMovie();',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,uab:1,chfn:cp.ch,osc:'',osct:0,ofc:'',ofct:0,pa:586,enabled:1,ma:-1,pfc:1,dclk:false,amc:true,ca:'si11588ClkAd',eh:cp.cbKH,siq:false,sat:true,trin:0,trout:0,bstin:'SmartShape_9',stl:[{stn:'Normal',stt:0,stsi:[11588]}],stis:0,bstiid:11579,sipst:2,sicbs:true,sihhs:true,sihds:true,isDD:false},si11588c:{b:[286,436,346,496],uid:11588,dn:'si11588',visible:0,effectiveVi:1,JSONEffectData:false,accstr:' ',traccstr:'',ti:2500,acclng:'',sc:'#1a1a1a',sw:2,ss:0,fa:20,bc:'#737373',p0:[[0],[1,316,436],[3,299.43,436,286,449.43,286,466],[3,286,482.57,299.43,496,316,496],[3,332.57,496,346,482.57,346,466],[3,346,449.43,332.57,436,316,436],[4]],svg:false,vbwr:[282,432,350,500],vb:[282,432,350,500]},si11588ClkAd:{src:'ar/Mouse.mp3',du:182},si11597:{type:612,from:541,to:630,rp:0,rpa:0,mdi:'si11597c',retainState:false,immo:false,apsn:'Slide11613',JSONTT_4:[],cpa:true,oca:'cp.playAudio2("11569");cp.actionChoicePauseMovie();',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,uab:1,chfn:cp.ch,osc:'',osct:0,ofc:'',ofct:0,pa:586,enabled:1,ma:-1,pfc:1,dclk:false,amc:true,ca:'si11597ClkAd',eh:cp.cbKH,siq:false,sat:true,trin:0,trout:0,bstin:'SmartShape_9',stl:[{stn:'Normal',stt:0,stsi:[11597]}],stis:0,bstiid:11579,sipst:1,sicbs:true,sihhs:true,sihds:true,isDD:false},si11597c:{b:[286,436,346,496],uid:11597,dn:'si11597',visible:0,effectiveVi:1,JSONEffectData:false,accstr:' ',traccstr:'',ti:2500,acclng:'',sc:'#1a1a1a',sw:2,ss:0,fa:30,bc:'#666666',p0:[[0],[1,316,436],[3,299.43,436,286,449.43,286,466],[3,286,482.57,299.43,496,316,496],[3,332.57,496,346,482.57,346,466],[3,346,449.43,332.57,436,316,436],[4]],svg:false,vbwr:[282,432,350,500],vb:[282,432,350,500]},si11597ClkAd:{src:'ar/Mouse.mp3',du:182},Slide11613:{lb:'',id:11613,from:541,to:630,iols:0,i360qs:false,propTxtScaling:false,minFontSizeScaling:14,useng:true,transition:{type:0},mmot:false,mdi:'Slide11613c',st:'Normal Slide',ccProperties:{1280:{pos:7,x:35,y:88}},audCC:[],vidCC:[],accstr:' ',si:[{n:'Image_13',t:15},{n:'Image_14',t:15},{n:'Image_15',t:15},{n:'Image_16',t:15},{n:'Text_Caption_10',t:19},{n:'Text_Caption_11',t:19},{n:'Image_17',t:15},{n:'Image_18',t:15},{n:'Text_Caption_12',t:19},{n:'Text_Caption_13',t:19},{n:'Text_Caption_14',t:19},{n:'Button_Chris_7',t:612},{n:'si11508',t:612},{n:'si11517',t:612},{n:'Button_Christine_8',t:612},{n:'si11544',t:612},{n:'si11553',t:612},{n:'Image_19',t:15},{n:'SmartShape_9',t:612},{n:'si11588',t:612},{n:'si11597',t:612}],iph:[],ea:'PA11489,PA11525,SmartShape_9ClkAd,PA11569,si11588ClkAd,si11597ClkAd',v:false,bc:'#ffffff',JSONTT_0:[],sea:'cpCmndPause = 1;',JSONTT_6:[],qs:''},Slide11613c:{b:[0,0,0,0],sr:cp.fd,uid:11613,dn:'Slide11613',visible:'1'},Text_Caption_15:{type:19,from:631,to:720,rp:0,rpa:0,mdi:'Text_Caption_15c',retainState:false,immo:false,apsn:'Slide11655',iflbx:false,ipflbx:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[11623]}],stis:0,bstiid:-1,sipst:0,sicbs:false,sihhs:false,sihds:false,isDD:false},Text_Caption_15c:{b:[57,20,1256,83],uid:11623,sr:cp.fd,ip:'dr/Text_Caption_15.png',dn:'Text_Caption_15',visible:1,effectiveVi:1,JSONEffectData:false,accstr:'Getting ready to teach about sexuality... ',traccstr:'',ti:-1,acclng:'',vbwr:[57,20,1256,83],vb:[57,20,1256,83]},Video_Object_1:{type:98,from:631,to:720,rp:0,rpa:0,mdi:'Video_Object_1c',retainState:false,immo:false,apsn:'Slide11655',iflbx:false,ipflbx:true,psv:718,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[11639]}],stis:0,bstiid:-1,sipst:0,sicbs:false,sihhs:false,sihds:false,isDD:false},Video_Object_1c:{b:[170,95,1256,706],uid:11639,dn:'Video_Object_1',visible:1,effectiveVi:1,JSONEffectData:false,accstr:'Video ',traccstr:'',ti:-1,acclng:'',mp4:'vr/Vi2.mp4',vss:{vsRtt:'Rewind Video',vsPtt:'Play/Pause Video',vsStt:'Stop Video',vsFtt:'Switch to Full Screen',vsVtt:'Set Volume',vsMtt:'Mute/Unmute Sound',vsREb:'Rewind',vsPLb:'Play',vsPAb:'Pause',vsSTb:'Stop',vsPRb:'Progress, Video at ',vsFSb:'Full Screen',vsVOb:'Volume set to ',vsMUb:'Mute',vsUNb:'Unmute'},svc:true,au:0,ar:0,l:0,vbwr:[170,95,1257,707],vb:[170,95,1257,707]},Slide11655:{lb:'',id:11655,from:631,to:720,iols:0,i360qs:false,propTxtScaling:false,minFontSizeScaling:14,useng:true,transition:{type:0},mmot:false,mdi:'Slide11655c',st:'Normal Slide',ccProperties:{1280:{pos:7,x:35,y:88}},audCC:[],vidCC:[],accstr:' ',si:[{n:'Text_Caption_15',t:19},{n:'Video_Object_1',t:98}],iph:[],v:false,bc:'#ffffff',JSONTT_0:[],sea:'cpCmndPause = 1;',JSONTT_6:[],qs:''},Slide11655c:{b:[0,0,0,0],sr:cp.fd,uid:11655,dn:'Slide11655',visible:'1'},Image_20:{type:15,from:721,to:810,rp:0,rpa:0,mdi:'Image_20c',retainState:false,immo:false,apsn:'Slide11821',JSONTT_4:[],cpa:true,oca:'cp.jumpToNextSlide();',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[11667]}],stis:0,bstiid:-1,sipst:0,sicbs:false,sihhs:false,sihds:false,isDD:false},Image_20c:{b:[-949,35,1339,1115],uid:11667,sr:cp.fd,ip:'dr/11200_2288_1080Tr84.png',dn:'Image_20',visible:1,effectiveVi:1,JSONEffectData:false,accstr:'Image ',traccstr:'',ti:-1,acclng:'',vbwr:[-949,35,1339,1115],tr:'rotate(19deg)',vb:[-1063,-309,1453,1459]},SmartShape_10:{type:612,from:721,to:810,rp:0,rpa:0,mdi:'SmartShape_10c',retainState:false,immo:false,apsn:'Slide11821',JSONTT_4:[],cpa:true,oca:'cp.jumpToNextSlide();',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[11698]}],stis:0,bstiid:-1,sipst:0,sicbs:false,sihhs:false,sihds:false,isDD:false},SmartShape_10c:{b:[397,66,890,664],uid:11698,dn:'SmartShape_10',visible:1,effectiveVi:1,JSONEffectData:false,accstr:' ',traccstr:'',ti:-1,acclng:'',sc:'#1a1a1a',sw:2,ss:0,fa:80,bc:'#ffffff',p0:[[0],[1,397,66],[2,397,664],[2,890.00,664],[2,890.00,66],[2,397,66],[4]],svg:false,vbwr:[393,62,894,668],vb:[393,62,894,668]},Strategy_Back02_11:{type:612,from:721,to:810,rp:0,rpa:0,mdi:'Strategy_Back02_11c',retainState:false,immo:false,apsn:'Slide11821',JSONTT_4:[],cpa:true,oca:'cp.changeState("Strategy_Back02_11","Visited");cp.actionChoicePauseMovie();',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,uab:1,chfn:cp.ch,osc:'',osct:0,ofc:'',ofct:0,pa:766,enabled:1,ma:-1,pfc:0,dclk:false,amc:true,ca:'Strategy_Back02_11ClkAd',eh:cp.cbKH,siq:false,sat:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[11721]},{stn:'Down',stt:1,stsi:[11734]},{stn:'Visited',stt:10,stsi:[11747]}],stis:0,bstiid:-1,sipst:0,sicbs:false,sihhs:false,sihds:true,stc:['Strategy_Back02_11','si11734','si11747'],isDD:false},Strategy_Back02_11c:{b:[914,63,1214,663],uid:11721,sr:cp.fd,ip:'dr/Strategy_Back02_11.png',dn:'Strategy_Back02_11',visible:1,effectiveVi:1,JSONEffectData:false,accstr:' ',traccstr:'',ti:2500,acclng:'',sc:'#1a1a1a',sw:0,ss:0,fa:100,imgf:{b:[914,63,1214,663],s:1,t:1,img:{w:300,h:600,ip:'dr/11717_300_600.png',tiletype:'br'}},p0:[[0],[1,930.00,63],[3,921.16,63,914,70.16,914,79],[2,914,647],[3,914,655.84,921.16,663,930.00,663],[2,1198,663],[3,1206.84,663,1214,655.84,1214,647],[2,1214,79],[3,1214,70.16,1206.84,63,1198,63],[2,930.00,63],[4]],svg:false,vbwr:[914,63,1214,663],sh:{i:false,a:45,d:3,b:4,o:0.4,c:'rgb(0, 0, 0)'},vb:[914,63,1218,667]},Strategy_Back02_11ClkAd:{src:'ar/Mouse.mp3',du:182},si11734:{type:612,from:721,to:810,rp:0,rpa:0,mdi:'si11734c',retainState:false,immo:false,apsn:'Slide11821',JSONTT_4:[],cpa:true,oca:'cp.changeState("Strategy_Back02_11","Visited");cp.actionChoicePauseMovie();',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,uab:1,chfn:cp.ch,osc:'',osct:0,ofc:'',ofct:0,pa:766,enabled:1,ma:-1,pfc:0,dclk:false,amc:true,ca:'si11734ClkAd',eh:cp.cbKH,siq:false,sat:true,trin:0,trout:0,bstin:'Strategy_Back02_11',stl:[{stn:'Normal',stt:0,stsi:[11734]}],stis:0,bstiid:11721,sipst:1,sicbs:true,sihhs:false,sihds:true,isDD:false},si11734c:{b:[914,63,1214,663],uid:11734,sr:cp.fd,ip:'dr/si11734.png',dn:'si11734',visible:0,effectiveVi:1,JSONEffectData:false,accstr:' ',traccstr:'',ti:2500,acclng:'',sc:'#1a1a1a',sw:0,ss:0,fa:80,bc:'#407d48',p0:[[0],[1,930.00,63],[3,921.16,63,914,70.16,914,79],[2,914,647],[3,914,655.84,921.16,663,930.00,663],[2,1198,663],[3,1206.84,663,1214,655.84,1214,647],[2,1214,79],[3,1214,70.16,1206.84,63,1198,63],[2,930.00,63],[4]],svg:false,vbwr:[914,63,1214,663],sh:{i:false,a:45,d:3,b:4,o:0.4,c:'rgb(0, 0, 0)'},vb:[914,63,1218,667]},si11734ClkAd:{src:'ar/Mouse.mp3',du:182},si11747:{type:612,from:721,to:810,rp:0,rpa:0,mdi:'si11747c',retainState:false,immo:false,apsn:'Slide11821',JSONTT_4:[],cpa:true,oca:'cp.changeState("Strategy_Back02_11","Visited");cp.actionChoicePauseMovie();',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,uab:1,chfn:cp.ch,osc:'',osct:0,ofc:'',ofct:0,pa:766,enabled:1,ma:-1,pfc:0,dclk:false,amc:true,ca:'si11747ClkAd',eh:cp.cbKH,siq:false,sat:true,trin:0,trout:0,bstin:'Strategy_Back02_11',stl:[{stn:'Normal',stt:0,stsi:[11747]}],stis:0,bstiid:11721,sipst:10,sicbs:true,sihhs:false,sihds:true,isDD:false},si11747c:{b:[914,63,1214,663],uid:11747,sr:cp.fd,ip:'dr/si11747.png',dn:'si11747',visible:0,effectiveVi:1,JSONEffectData:false,accstr:'• Non-judgmental language • Highlighting the positive outcomes of healthy decision making • Exploring healthy relationships • Teaching about a variety of risk prevention strategies • Discussing how to manage negative outcomes • Recognizing students are sexual beings and have the right to make choices based on objective information ',traccstr:'',ti:2500,acclng:'',sc:'#1a1a1a',sw:0,ss:0,fa:100,bc:'#d3ebc8',p0:[[0],[1,930.00,63],[3,921.16,63,914,70.16,914,79],[2,914,647],[3,914,655.84,921.16,663,930.00,663],[2,1198,663],[3,1206.84,663,1214,655.84,1214,647],[2,1214,79],[3,1214,70.16,1206.84,63,1198,63],[2,930.00,63],[4]],svg:false,vbwr:[914,63,1214,663],sh:{i:false,a:45,d:3,b:4,o:0.4,c:'rgb(0, 0, 0)'},vb:[914,63,1218,667]},si11747ClkAd:{src:'ar/Mouse.mp3',du:182},Strategy_Back01_12:{type:612,from:721,to:810,rp:0,rpa:0,mdi:'Strategy_Back01_12c',retainState:false,immo:false,apsn:'Slide11821',JSONTT_4:[],cpa:true,oca:'cp.changeState("Strategy_Back01_12","Visited");cp.actionChoicePauseMovie();',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,uab:1,chfn:cp.ch,osc:'',osct:0,ofc:'',ofct:0,pa:766,enabled:1,ma:-1,pfc:0,dclk:false,amc:true,ca:'Strategy_Back01_12ClkAd',eh:cp.cbKH,siq:false,sat:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[11771]},{stn:'Down',stt:1,stsi:[11784]},{stn:'Visited',stt:10,stsi:[11797]}],stis:0,bstiid:-1,sipst:0,sicbs:false,sihhs:false,sihds:true,stc:['Strategy_Back01_12','si11784','si11797'],isDD:false},Strategy_Back01_12c:{b:[64,63,364,663],uid:11771,sr:cp.fd,ip:'dr/Strategy_Back01_12.png',dn:'Strategy_Back01_12',visible:1,effectiveVi:1,JSONEffectData:false,accstr:' ',traccstr:'',ti:2500,acclng:'',sc:'#1a1a1a',sw:0,ss:0,fa:100,imgf:{b:[64,63,364,663],s:1,t:1,img:{w:300,h:600,ip:'dr/11767_300_600.png',tiletype:'br'}},p0:[[0],[1,78,63],[3,70.27,63,64,69.27,64,77],[2,64,649],[3,64,656.73,70.27,663,78,663],[2,350.00,663],[3,357.73,663,364,656.73,364,649],[2,364,77],[3,364,69.27,357.73,63,350.00,63],[2,78,63],[4]],svg:false,vbwr:[64,63,364,663],sh:{i:false,a:45,d:3,b:4,o:0.4,c:'rgb(0, 0, 0)'},vb:[64,63,368,667]},Strategy_Back01_12ClkAd:{src:'ar/Mouse.mp3',du:182},si11784:{type:612,from:721,to:810,rp:0,rpa:0,mdi:'si11784c',retainState:false,immo:false,apsn:'Slide11821',JSONTT_4:[],cpa:true,oca:'cp.changeState("Strategy_Back01_12","Visited");cp.actionChoicePauseMovie();',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,uab:1,chfn:cp.ch,osc:'',osct:0,ofc:'',ofct:0,pa:766,enabled:1,ma:-1,pfc:0,dclk:false,amc:true,ca:'si11784ClkAd',eh:cp.cbKH,siq:false,sat:true,trin:0,trout:0,bstin:'Strategy_Back01_12',stl:[{stn:'Normal',stt:0,stsi:[11784]}],stis:0,bstiid:11771,sipst:1,sicbs:true,sihhs:false,sihds:true,isDD:false},si11784c:{b:[64,63,364,663],uid:11784,sr:cp.fd,ip:'dr/si11784.png',dn:'si11784',visible:0,effectiveVi:1,JSONEffectData:false,accstr:' ',traccstr:'',ti:2500,acclng:'',sc:'#1a1a1a',sw:0,ss:0,fa:80,bc:'#340015',p0:[[0],[1,78,63],[3,70.27,63,64,69.27,64,77],[2,64,649],[3,64,656.73,70.27,663,78,663],[2,350.00,663],[3,357.73,663,364,656.73,364,649],[2,364,77],[3,364,69.27,357.73,63,350.00,63],[2,78,63],[4]],svg:false,vbwr:[64,63,364,663],sh:{i:false,a:45,d:3,b:4,o:0.4,c:'rgb(0, 0, 0)'},vb:[64,63,368,667]},si11784ClkAd:{src:'ar/Mouse.mp3',du:182},si11797:{type:612,from:721,to:810,rp:0,rpa:0,mdi:'si11797c',retainState:false,immo:false,apsn:'Slide11821',JSONTT_4:[],cpa:true,oca:'cp.changeState("Strategy_Back01_12","Visited");cp.actionChoicePauseMovie();',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,uab:1,chfn:cp.ch,osc:'',osct:0,ofc:'',ofct:0,pa:766,enabled:1,ma:-1,pfc:0,dclk:false,amc:true,ca:'si11797ClkAd',eh:cp.cbKH,siq:false,sat:true,trin:0,trout:0,bstin:'Strategy_Back01_12',stl:[{stn:'Normal',stt:0,stsi:[11797]}],stis:0,bstiid:11771,sipst:10,sicbs:true,sihhs:false,sihds:true,isDD:false},si11797c:{b:[64,63,364,663],uid:11797,sr:cp.fd,ip:'dr/si11797.png',dn:'si11797',visible:0,effectiveVi:1,JSONEffectData:false,accstr:'• Images of STIs • Statistics presented to groups that don’t understand statistics • Graphic discussion of symptoms, labor and delivery • Catastrophizing negative health outcomes • All or nothing thinking/discussion • Overgeneralization • Using scary content to influence students to avoid sexual activity ',traccstr:'',ti:2500,acclng:'',sc:'#1a1a1a',sw:0,ss:0,fa:100,bc:'#ffcece',p0:[[0],[1,78,63],[3,70.27,63,64,69.27,64,77],[2,64,649],[3,64,656.73,70.27,663,78,663],[2,350.00,663],[3,357.73,663,364,656.73,364,649],[2,364,77],[3,364,69.27,357.73,63,350.00,63],[2,78,63],[4]],svg:false,vbwr:[64,63,364,663],sh:{i:false,a:45,d:3,b:4,o:0.4,c:'rgb(0, 0, 0)'},vb:[64,63,368,667]},si11797ClkAd:{src:'ar/Mouse.mp3',du:182},Text_Caption_16:{type:19,from:721,to:810,rp:0,rpa:0,mdi:'Text_Caption_16c',retainState:false,immo:false,apsn:'Slide11821',iflbx:false,ipflbx:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[11805]}],stis:0,bstiid:-1,sipst:0,sicbs:false,sihhs:false,sihds:false,isDD:false},Text_Caption_16c:{b:[421,72,871,643],uid:11805,sr:cp.fd,ip:'dr/Text_Caption_16.png',dn:'Text_Caption_16',visible:1,effectiveVi:1,JSONEffectData:false,accstr:'Scare Tactics vs. Effective Sexuality Education Scare tactics only draw attention to the potential harm and are seldom effective to motivate learning or behaviour change. In the long term, building on effective strategies that increase student resilience is the best way to ensure sexual health. ',traccstr:'',ti:-1,acclng:'',vbwr:[421,72,871,643],vb:[421,72,871,643]},Slide11821:{lb:'',id:11821,from:721,to:810,iols:0,i360qs:false,propTxtScaling:false,minFontSizeScaling:14,useng:true,transition:{type:0},mmot:false,mdi:'Slide11821c',st:'Normal Slide',ccProperties:{1280:{pos:7,x:35,y:88}},audCC:[],vidCC:[],accstr:' ',si:[{n:'Image_20',t:15},{n:'SmartShape_10',t:612},{n:'Strategy_Back02_11',t:612},{n:'si11734',t:612},{n:'si11747',t:612},{n:'Strategy_Back01_12',t:612},{n:'si11784',t:612},{n:'si11797',t:612},{n:'Text_Caption_16',t:19}],iph:[],ea:'Strategy_Back02_11ClkAd,si11734ClkAd,si11747ClkAd,Strategy_Back01_12ClkAd,si11784ClkAd,si11797ClkAd',v:false,bc:'#ffffff',JSONTT_0:[],sea:'cpCmndPause = 1;',JSONTT_6:[],qs:''},Slide11821c:{b:[0,0,0,0],sr:cp.fd,uid:11821,dn:'Slide11821',visible:'1'},Image_21:{type:15,from:811,to:900,rp:0,rpa:0,mdi:'Image_21c',retainState:false,immo:false,apsn:'Slide12481',JSONTT_4:[],cpa:true,oca:'cp.jumpToNextSlide();',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[11833]}],stis:0,bstiid:-1,sipst:0,sicbs:false,sihhs:false,sihds:false,isDD:false},Image_21c:{b:[-228,255,932,1097],uid:11833,sr:cp.fd,ip:'dr/11825_1160_842Tr89.png',dn:'Image_21',visible:1,effectiveVi:1,JSONEffectData:false,accstr:'Image ',traccstr:'',ti:-1,acclng:'',vbwr:[-228,255,932,1097],vb:[-228,255,932,1097]},CYOA_01_description_13:{type:612,from:811,to:900,rp:0,rpa:0,mdi:'CYOA_01_description_13c',retainState:false,immo:false,apsn:'Slide12481',JSONTT_4:[],cpa:true,oca:'cp.jumpToNextSlide();',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[11866]}],stis:0,bstiid:-1,sipst:0,sicbs:false,sihhs:false,sihds:false,isDD:false},CYOA_01_description_13c:{b:[54,103,1238,255],uid:11866,sr:cp.fd,ip:'dr/CYOA_01_description_13.png',dn:'CYOA_01_description_13',visible:1,effectiveVi:1,JSONEffectData:false,accstr:'It can feel like a wild ride when first starting conversations about healthy sexuality. Select each option to explore three ways to begin the conversation...and what the possible outcome might be! ',traccstr:'',ti:-1,acclng:'',sc:'#1a1a1a',sw:0,ss:0,fa:0,bc:'#ffffff',p0:[[0],[1,54,103],[2,54,255],[2,1238,255],[2,1238,103],[2,54,103],[4]],svg:false,vbwr:[54,103,1238,255],vb:[54,103,1238,255]},Btn_CYOA_down03_14:{type:612,from:811,to:900,rp:0,rpa:0,mdi:'Btn_CYOA_down03_14c',retainState:false,immo:false,apsn:'Slide12481',JSONTT_4:[],cpa:true,oca:'cp.changeState("Infotext_CYOA_Option3_16","Outcome");cp.actionChoicePauseMovie();',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,uab:1,chfn:cp.ch,osc:'',osct:0,ofc:'',ofct:0,pa:856,enabled:1,ma:-1,pfc:1,dclk:false,amc:true,eh:cp.cbKH,siq:false,sat:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[11884]},{stn:'RollOver',stt:2,stsi:[11895]},{stn:'Down',stt:1,stsi:[11906]}],stis:0,bstiid:-1,sipst:0,sicbs:false,sihhs:true,sihds:true,stc:['Btn_CYOA_down03_14','si11895','si11906'],isDD:false},Btn_CYOA_down03_14c:{b:[1148,637,1200,684],uid:11884,dn:'Btn_CYOA_down03_14',visible:1,effectiveVi:1,JSONEffectData:false,accstr:' ',traccstr:'',ti:2500,acclng:'',sc:'#1a1a1a',sw:0,ss:0,fa:100,bc:'#b85c53',p0:[[0],[1,1174,637],[2,1148,684],[2,1200.00,684],[2,1174,637],[4]],svg:false,vbwr:[1148,637,1200,684],tr:'rotate(180deg)',sh:{i:false,a:45,d:3,b:4,o:0.4,c:'rgb(0, 0, 0)'},vb:[1148,637,1204,688]},si11895:{type:612,from:811,to:900,rp:0,rpa:0,mdi:'si11895c',retainState:false,immo:false,apsn:'Slide12481',JSONTT_4:[],cpa:true,oca:'cp.changeState("Infotext_CYOA_Option3_16","Outcome");cp.actionChoicePauseMovie();',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,uab:1,chfn:cp.ch,osc:'',osct:0,ofc:'',ofct:0,pa:856,enabled:1,ma:-1,pfc:1,dclk:false,amc:true,eh:cp.cbKH,siq:false,sat:true,trin:0,trout:0,bstin:'Btn_CYOA_down03_14',stl:[{stn:'Normal',stt:0,stsi:[11895]}],stis:0,bstiid:11884,sipst:2,sicbs:true,sihhs:true,sihds:true,isDD:false},si11895c:{b:[1148,637,1200,684],uid:11895,dn:'si11895',visible:0,effectiveVi:1,JSONEffectData:false,accstr:' ',traccstr:'',ti:2500,acclng:'',sc:'#1a1a1a',sw:0,ss:0,fa:100,bc:'#737373',p0:[[0],[1,1174,637],[2,1148,684],[2,1200.00,684],[2,1174,637],[4]],svg:false,vbwr:[1148,637,1200,684],tr:'rotate(180deg)',sh:{i:false,a:45,d:3,b:4,o:0.4,c:'rgb(0, 0, 0)'},vb:[1148,637,1204,688]},si11906:{type:612,from:811,to:900,rp:0,rpa:0,mdi:'si11906c',retainState:false,immo:false,apsn:'Slide12481',JSONTT_4:[],cpa:true,oca:'cp.changeState("Infotext_CYOA_Option3_16","Outcome");cp.actionChoicePauseMovie();',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,uab:1,chfn:cp.ch,osc:'',osct:0,ofc:'',ofct:0,pa:856,enabled:1,ma:-1,pfc:1,dclk:false,amc:true,eh:cp.cbKH,siq:false,sat:true,trin:0,trout:0,bstin:'Btn_CYOA_down03_14',stl:[{stn:'Normal',stt:0,stsi:[11906]}],stis:0,bstiid:11884,sipst:1,sicbs:true,sihhs:true,sihds:true,isDD:false},si11906c:{b:[1148,637,1200,684],uid:11906,dn:'si11906',visible:0,effectiveVi:1,JSONEffectData:false,accstr:' ',traccstr:'',ti:2500,acclng:'',sc:'#1a1a1a',sw:0,ss:0,fa:100,bc:'#171717',p0:[[0],[1,1174,637],[2,1148,684],[2,1200.00,684],[2,1174,637],[4]],svg:false,vbwr:[1148,637,1200,684],tr:'rotate(180deg)',sh:{i:false,a:45,d:3,b:4,o:0.4,c:'rgb(0, 0, 0)'},vb:[1148,637,1204,688]},Btn_CYOA_up03_15:{type:612,from:811,to:900,rp:0,rpa:0,mdi:'Btn_CYOA_up03_15c',retainState:false,immo:false,apsn:'Slide12481',JSONTT_4:[],cpa:true,oca:'cp.changeState("Infotext_CYOA_Option3_16","Normal");cp.actionChoicePauseMovie();',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,uab:1,chfn:cp.ch,osc:'',osct:0,ofc:'',ofct:0,pa:856,enabled:1,ma:-1,pfc:1,dclk:false,amc:true,eh:cp.cbKH,siq:false,sat:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[11925]},{stn:'RollOver',stt:2,stsi:[11938]},{stn:'Down',stt:1,stsi:[11951]}],stis:0,bstiid:-1,sipst:0,sicbs:false,sihhs:true,sihds:true,stc:['Btn_CYOA_up03_15','si11938','si11951'],isDD:false},Btn_CYOA_up03_15c:{b:[1148,384,1200,431],uid:11925,sr:cp.fd,ip:'dr/Btn_CYOA_up03_15.png',dn:'Btn_CYOA_up03_15',visible:1,effectiveVi:1,JSONEffectData:false,accstr:' ',traccstr:'',ti:2500,acclng:'',sc:'#1a1a1a',sw:0,ss:0,fa:100,bc:'#b85c53',p0:[[0],[1,1174,384],[2,1148,431],[2,1200.00,431],[2,1174,384],[4]],svg:false,vbwr:[1148,384,1200,431],sh:{i:false,a:45,d:3,b:4,o:0.4,c:'rgb(0, 0, 0)'},vb:[1148,384,1204,435]},si11938:{type:612,from:811,to:900,rp:0,rpa:0,mdi:'si11938c',retainState:false,immo:false,apsn:'Slide12481',JSONTT_4:[],cpa:true,oca:'cp.changeState("Infotext_CYOA_Option3_16","Normal");cp.actionChoicePauseMovie();',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,uab:1,chfn:cp.ch,osc:'',osct:0,ofc:'',ofct:0,pa:856,enabled:1,ma:-1,pfc:1,dclk:false,amc:true,eh:cp.cbKH,siq:false,sat:true,trin:0,trout:0,bstin:'Btn_CYOA_up03_15',stl:[{stn:'Normal',stt:0,stsi:[11938]}],stis:0,bstiid:11925,sipst:2,sicbs:true,sihhs:true,sihds:true,isDD:false},si11938c:{b:[1148,384,1200,431],uid:11938,sr:cp.fd,ip:'dr/si11938.png',dn:'si11938',visible:0,effectiveVi:1,JSONEffectData:false,accstr:' ',traccstr:'',ti:2500,acclng:'',sc:'#1a1a1a',sw:0,ss:0,fa:100,bc:'#737373',p0:[[0],[1,1174,384],[2,1148,431],[2,1200.00,431],[2,1174,384],[4]],svg:false,vbwr:[1148,384,1200,431],sh:{i:false,a:45,d:3,b:4,o:0.4,c:'rgb(0, 0, 0)'},vb:[1148,384,1204,435]},si11951:{type:612,from:811,to:900,rp:0,rpa:0,mdi:'si11951c',retainState:false,immo:false,apsn:'Slide12481',JSONTT_4:[],cpa:true,oca:'cp.changeState("Infotext_CYOA_Option3_16","Normal");cp.actionChoicePauseMovie();',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,uab:1,chfn:cp.ch,osc:'',osct:0,ofc:'',ofct:0,pa:856,enabled:1,ma:-1,pfc:1,dclk:false,amc:true,eh:cp.cbKH,siq:false,sat:true,trin:0,trout:0,bstin:'Btn_CYOA_up03_15',stl:[{stn:'Normal',stt:0,stsi:[11951]}],stis:0,bstiid:11925,sipst:1,sicbs:true,sihhs:true,sihds:true,isDD:false},si11951c:{b:[1148,384,1200,431],uid:11951,sr:cp.fd,ip:'dr/si11951.png',dn:'si11951',visible:0,effectiveVi:1,JSONEffectData:false,accstr:' ',traccstr:'',ti:2500,acclng:'',sc:'#1a1a1a',sw:0,ss:0,fa:100,bc:'#171717',p0:[[0],[1,1174,384],[2,1148,431],[2,1200.00,431],[2,1174,384],[4]],svg:false,vbwr:[1148,384,1200,431],sh:{i:false,a:45,d:3,b:4,o:0.4,c:'rgb(0, 0, 0)'},vb:[1148,384,1204,435]},Infotext_CYOA_Option3_16:{type:612,from:811,to:900,rp:0,rpa:0,mdi:'Infotext_CYOA_Option3_16c',retainState:false,immo:false,apsn:'Slide12481',JSONTT_4:[],cpa:true,oca:'cp.jumpToNextSlide();',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[11970]},{stn:'Outcome',stt:9,stsi:[11984]}],stis:0,bstiid:-1,sipst:0,sicbs:false,sihhs:false,sihds:false,stc:['Infotext_CYOA_Option3_16','si11984'],isDD:false},Infotext_CYOA_Option3_16c:{b:[400,344,1119,689],uid:11970,sr:cp.fd,ip:'dr/Infotext_CYOA_Option3_16.png',dn:'Infotext_CYOA_Option3_16',visible:1,effectiveVi:1,JSONEffectData:false,accstr:'“When I was growing up we didn’t get a chance to talk about this very much, so I might sometimes seem a bit awkward. But - this is an important topic to learn about and you deserve a better experience.”Scroll down for outcome ',traccstr:'',ti:-1,acclng:'',sc:'#1a1a1a',sw:2,ss:0,fa:100,bc:'#ffffff',p0:[[0],[1,400.00,344],[2,400.00,689],[2,1119,689],[2,1119,344],[2,400.00,344],[4]],svg:false,vbwr:[396,340,1123,693],sh:{i:false,a:45,d:3,b:4,o:0.4,c:'rgb(0, 0, 0)'},vb:[396,340,1127,697]},si11984:{type:612,from:811,to:900,rp:0,rpa:0,mdi:'si11984c',retainState:false,immo:false,apsn:'Slide12481',JSONTT_4:[],cpa:true,oca:'cp.jumpToNextSlide();',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,trin:0,trout:0,bstin:'Infotext_CYOA_Option3_16',stl:[{stn:'Normal',stt:0,stsi:[11984]}],stis:0,bstiid:11970,sipst:9,sicbs:true,sihhs:false,sihds:false,isDD:false},si11984c:{b:[400,344,1119,689],uid:11984,sr:cp.fd,ip:'dr/si11984.png',dn:'si11984',visible:0,effectiveVi:1,JSONEffectData:false,accstr:'*Go for it!* This option shows healthy boundaries around self disclosure and development of rapport as a teacher, genuine concern for the student, and directs the flow of conversation in the classroom. ',traccstr:'',ti:-1,acclng:'',sc:'#1a1a1a',sw:2,ss:0,fa:100,bc:'#ffffff',p0:[[0],[1,400.00,344],[2,400.00,689],[2,1119,689],[2,1119,344],[2,400.00,344],[4]],svg:false,vbwr:[396,340,1123,693],sh:{i:false,a:45,d:3,b:4,o:0.4,c:'rgb(0, 0, 0)'},vb:[396,340,1127,697]},Btn_CYOA_down02_17:{type:612,from:811,to:900,rp:0,rpa:0,mdi:'Btn_CYOA_down02_17c',retainState:false,immo:false,apsn:'Slide12481',JSONTT_4:[],cpa:true,oca:'cp.changeState("Infotext_CYOA_Option2_19","Outcome");cp.actionChoicePauseMovie();',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,uab:1,chfn:cp.ch,osc:'',osct:0,ofc:'',ofct:0,pa:856,enabled:1,ma:-1,pfc:1,dclk:false,amc:true,eh:cp.cbKH,siq:false,sat:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[12001]},{stn:'RollOver',stt:2,stsi:[12012]},{stn:'Down',stt:1,stsi:[12023]}],stis:0,bstiid:-1,sipst:0,sicbs:false,sihhs:true,sihds:true,stc:['Btn_CYOA_down02_17','si12012','si12023'],isDD:false},Btn_CYOA_down02_17c:{b:[1148,637,1200,684],uid:12001,dn:'Btn_CYOA_down02_17',visible:1,effectiveVi:1,JSONEffectData:false,accstr:' ',traccstr:'',ti:2500,acclng:'',sc:'#1a1a1a',sw:0,ss:0,fa:100,bc:'#b85c53',p0:[[0],[1,1174,637],[2,1148,684],[2,1200.00,684],[2,1174,637],[4]],svg:false,vbwr:[1148,637,1200,684],tr:'rotate(180deg)',sh:{i:false,a:45,d:3,b:4,o:0.4,c:'rgb(0, 0, 0)'},vb:[1148,637,1204,688]},si12012:{type:612,from:811,to:900,rp:0,rpa:0,mdi:'si12012c',retainState:false,immo:false,apsn:'Slide12481',JSONTT_4:[],cpa:true,oca:'cp.changeState("Infotext_CYOA_Option2_19","Outcome");cp.actionChoicePauseMovie();',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,uab:1,chfn:cp.ch,osc:'',osct:0,ofc:'',ofct:0,pa:856,enabled:1,ma:-1,pfc:1,dclk:false,amc:true,eh:cp.cbKH,siq:false,sat:true,trin:0,trout:0,bstin:'Btn_CYOA_down02_17',stl:[{stn:'Normal',stt:0,stsi:[12012]}],stis:0,bstiid:12001,sipst:2,sicbs:true,sihhs:true,sihds:true,isDD:false},si12012c:{b:[1148,637,1200,684],uid:12012,dn:'si12012',visible:0,effectiveVi:1,JSONEffectData:false,accstr:' ',traccstr:'',ti:2500,acclng:'',sc:'#1a1a1a',sw:0,ss:0,fa:100,bc:'#737373',p0:[[0],[1,1174,637],[2,1148,684],[2,1200.00,684],[2,1174,637],[4]],svg:false,vbwr:[1148,637,1200,684],tr:'rotate(180deg)',sh:{i:false,a:45,d:3,b:4,o:0.4,c:'rgb(0, 0, 0)'},vb:[1148,637,1204,688]},si12023:{type:612,from:811,to:900,rp:0,rpa:0,mdi:'si12023c',retainState:false,immo:false,apsn:'Slide12481',JSONTT_4:[],cpa:true,oca:'cp.changeState("Infotext_CYOA_Option2_19","Outcome");cp.actionChoicePauseMovie();',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,uab:1,chfn:cp.ch,osc:'',osct:0,ofc:'',ofct:0,pa:856,enabled:1,ma:-1,pfc:1,dclk:false,amc:true,eh:cp.cbKH,siq:false,sat:true,trin:0,trout:0,bstin:'Btn_CYOA_down02_17',stl:[{stn:'Normal',stt:0,stsi:[12023]}],stis:0,bstiid:12001,sipst:1,sicbs:true,sihhs:true,sihds:true,isDD:false},si12023c:{b:[1148,637,1200,684],uid:12023,dn:'si12023',visible:0,effectiveVi:1,JSONEffectData:false,accstr:' ',traccstr:'',ti:2500,acclng:'',sc:'#1a1a1a',sw:0,ss:0,fa:100,bc:'#171717',p0:[[0],[1,1174,637],[2,1148,684],[2,1200.00,684],[2,1174,637],[4]],svg:false,vbwr:[1148,637,1200,684],tr:'rotate(180deg)',sh:{i:false,a:45,d:3,b:4,o:0.4,c:'rgb(0, 0, 0)'},vb:[1148,637,1204,688]},Btn_CYOA_up02_18:{type:612,from:811,to:900,rp:0,rpa:0,mdi:'Btn_CYOA_up02_18c',retainState:false,immo:false,apsn:'Slide12481',JSONTT_4:[],cpa:true,oca:'cp.changeState("Infotext_CYOA_Option2_19","Normal");cp.actionChoicePauseMovie();',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,uab:1,chfn:cp.ch,osc:'',osct:0,ofc:'',ofct:0,pa:856,enabled:1,ma:-1,pfc:1,dclk:false,amc:true,eh:cp.cbKH,siq:false,sat:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[12042]},{stn:'RollOver',stt:2,stsi:[12055]},{stn:'Down',stt:1,stsi:[12068]}],stis:0,bstiid:-1,sipst:0,sicbs:false,sihhs:true,sihds:true,stc:['Btn_CYOA_up02_18','si12055','si12068'],isDD:false},Btn_CYOA_up02_18c:{b:[1148,384,1200,431],uid:12042,sr:cp.fd,ip:'dr/Btn_CYOA_up02_18.png',dn:'Btn_CYOA_up02_18',visible:1,effectiveVi:1,JSONEffectData:false,accstr:' ',traccstr:'',ti:2500,acclng:'',sc:'#1a1a1a',sw:0,ss:0,fa:100,bc:'#b85c53',p0:[[0],[1,1174,384],[2,1148,431],[2,1200.00,431],[2,1174,384],[4]],svg:false,vbwr:[1148,384,1200,431],sh:{i:false,a:45,d:3,b:4,o:0.4,c:'rgb(0, 0, 0)'},vb:[1148,384,1204,435]},si12055:{type:612,from:811,to:900,rp:0,rpa:0,mdi:'si12055c',retainState:false,immo:false,apsn:'Slide12481',JSONTT_4:[],cpa:true,oca:'cp.changeState("Infotext_CYOA_Option2_19","Normal");cp.actionChoicePauseMovie();',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,uab:1,chfn:cp.ch,osc:'',osct:0,ofc:'',ofct:0,pa:856,enabled:1,ma:-1,pfc:1,dclk:false,amc:true,eh:cp.cbKH,siq:false,sat:true,trin:0,trout:0,bstin:'Btn_CYOA_up02_18',stl:[{stn:'Normal',stt:0,stsi:[12055]}],stis:0,bstiid:12042,sipst:2,sicbs:true,sihhs:true,sihds:true,isDD:false},si12055c:{b:[1148,384,1200,431],uid:12055,sr:cp.fd,ip:'dr/si12055.png',dn:'si12055',visible:0,effectiveVi:1,JSONEffectData:false,accstr:' ',traccstr:'',ti:2500,acclng:'',sc:'#1a1a1a',sw:0,ss:0,fa:100,bc:'#737373',p0:[[0],[1,1174,384],[2,1148,431],[2,1200.00,431],[2,1174,384],[4]],svg:false,vbwr:[1148,384,1200,431],sh:{i:false,a:45,d:3,b:4,o:0.4,c:'rgb(0, 0, 0)'},vb:[1148,384,1204,435]},si12068:{type:612,from:811,to:900,rp:0,rpa:0,mdi:'si12068c',retainState:false,immo:false,apsn:'Slide12481',JSONTT_4:[],cpa:true,oca:'cp.changeState("Infotext_CYOA_Option2_19","Normal");cp.actionChoicePauseMovie();',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,uab:1,chfn:cp.ch,osc:'',osct:0,ofc:'',ofct:0,pa:856,enabled:1,ma:-1,pfc:1,dclk:false,amc:true,eh:cp.cbKH,siq:false,sat:true,trin:0,trout:0,bstin:'Btn_CYOA_up02_18',stl:[{stn:'Normal',stt:0,stsi:[12068]}],stis:0,bstiid:12042,sipst:1,sicbs:true,sihhs:true,sihds:true,isDD:false},si12068c:{b:[1148,384,1200,431],uid:12068,sr:cp.fd,ip:'dr/si12068.png',dn:'si12068',visible:0,effectiveVi:1,JSONEffectData:false,accstr:' ',traccstr:'',ti:2500,acclng:'',sc:'#1a1a1a',sw:0,ss:0,fa:100,bc:'#171717',p0:[[0],[1,1174,384],[2,1148,431],[2,1200.00,431],[2,1174,384],[4]],svg:false,vbwr:[1148,384,1200,431],sh:{i:false,a:45,d:3,b:4,o:0.4,c:'rgb(0, 0, 0)'},vb:[1148,384,1204,435]},Infotext_CYOA_Option2_19:{type:612,from:811,to:900,rp:0,rpa:0,mdi:'Infotext_CYOA_Option2_19c',retainState:false,immo:false,apsn:'Slide12481',JSONTT_4:[],cpa:true,oca:'cp.jumpToNextSlide();',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[12086]},{stn:'Outcome',stt:9,stsi:[12099]}],stis:0,bstiid:-1,sipst:0,sicbs:false,sihhs:false,sihds:false,stc:['Infotext_CYOA_Option2_19','si12099'],isDD:false},Infotext_CYOA_Option2_19c:{b:[400,344,1119,689],uid:12086,sr:cp.fd,ip:'dr/Infotext_CYOA_Option2_19.png',dn:'Infotext_CYOA_Option2_19',visible:1,effectiveVi:1,JSONEffectData:false,accstr:'“Today we will start our first lesson on sexuality. Can you raise your hand if you are sexually active?” scroll down for outcome ',traccstr:'',ti:-1,acclng:'',sc:'#1a1a1a',sw:2,ss:0,fa:100,bc:'#ffffff',p0:[[0],[1,400.00,344],[2,400.00,689],[2,1119,689],[2,1119,344],[2,400.00,344],[4]],svg:false,vbwr:[396,340,1123,693],sh:{i:false,a:45,d:3,b:4,o:0.4,c:'rgb(0, 0, 0)'},vb:[396,340,1127,697]},si12099:{type:612,from:811,to:900,rp:0,rpa:0,mdi:'si12099c',retainState:false,immo:false,apsn:'Slide12481',JSONTT_4:[],cpa:true,oca:'cp.jumpToNextSlide();',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,trin:0,trout:0,bstin:'Infotext_CYOA_Option2_19',stl:[{stn:'Normal',stt:0,stsi:[12099]}],stis:0,bstiid:12086,sipst:9,sicbs:true,sihhs:false,sihds:false,isDD:false},si12099c:{b:[400,344,1119,689],uid:12099,sr:cp.fd,ip:'dr/si12099.png',dn:'si12099',visible:0,effectiveVi:1,JSONEffectData:false,accstr:'*NO!*Asking students to self disclose their sexual experience(s) does not create a safe environment. ',traccstr:'',ti:-1,acclng:'',sc:'#1a1a1a',sw:2,ss:0,fa:100,bc:'#ffffff',p0:[[0],[1,400.00,344],[2,400.00,689],[2,1119,689],[2,1119,344],[2,400.00,344],[4]],svg:false,vbwr:[396,340,1123,693],sh:{i:false,a:45,d:3,b:4,o:0.4,c:'rgb(0, 0, 0)'},vb:[396,340,1127,697]},Btn_CYOA_down01_20:{type:612,from:811,to:900,rp:0,rpa:0,mdi:'Btn_CYOA_down01_20c',retainState:false,immo:false,apsn:'Slide12481',JSONTT_4:[],cpa:true,oca:'cp.changeState("Infotext_CYOA_Option1_22","Outcome");cp.actionChoicePauseMovie();',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,uab:1,chfn:cp.ch,osc:'',osct:0,ofc:'',ofct:0,pa:856,enabled:1,ma:-1,pfc:1,dclk:false,amc:true,eh:cp.cbKH,siq:false,sat:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[12116]},{stn:'RollOver',stt:2,stsi:[12127]},{stn:'Down',stt:1,stsi:[12138]}],stis:0,bstiid:-1,sipst:0,sicbs:false,sihhs:true,sihds:true,stc:['Btn_CYOA_down01_20','si12127','si12138'],isDD:false},Btn_CYOA_down01_20c:{b:[1148,637,1200,684],uid:12116,dn:'Btn_CYOA_down01_20',visible:1,effectiveVi:1,JSONEffectData:false,accstr:' ',traccstr:'',ti:2500,acclng:'',sc:'#1a1a1a',sw:0,ss:0,fa:100,bc:'#b85c53',p0:[[0],[1,1174,637],[2,1148,684],[2,1200.00,684],[2,1174,637],[4]],svg:false,vbwr:[1148,637,1200,684],tr:'rotate(180deg)',sh:{i:false,a:45,d:3,b:4,o:0.4,c:'rgb(0, 0, 0)'},vb:[1148,637,1204,688]},si12127:{type:612,from:811,to:900,rp:0,rpa:0,mdi:'si12127c',retainState:false,immo:false,apsn:'Slide12481',JSONTT_4:[],cpa:true,oca:'cp.changeState("Infotext_CYOA_Option1_22","Outcome");cp.actionChoicePauseMovie();',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,uab:1,chfn:cp.ch,osc:'',osct:0,ofc:'',ofct:0,pa:856,enabled:1,ma:-1,pfc:1,dclk:false,amc:true,eh:cp.cbKH,siq:false,sat:true,trin:0,trout:0,bstin:'Btn_CYOA_down01_20',stl:[{stn:'Normal',stt:0,stsi:[12127]}],stis:0,bstiid:12116,sipst:2,sicbs:true,sihhs:true,sihds:true,isDD:false},si12127c:{b:[1148,637,1200,684],uid:12127,dn:'si12127',visible:0,effectiveVi:1,JSONEffectData:false,accstr:' ',traccstr:'',ti:2500,acclng:'',sc:'#1a1a1a',sw:0,ss:0,fa:100,bc:'#737373',p0:[[0],[1,1174,637],[2,1148,684],[2,1200.00,684],[2,1174,637],[4]],svg:false,vbwr:[1148,637,1200,684],tr:'rotate(180deg)',sh:{i:false,a:45,d:3,b:4,o:0.4,c:'rgb(0, 0, 0)'},vb:[1148,637,1204,688]},si12138:{type:612,from:811,to:900,rp:0,rpa:0,mdi:'si12138c',retainState:false,immo:false,apsn:'Slide12481',JSONTT_4:[],cpa:true,oca:'cp.changeState("Infotext_CYOA_Option1_22","Outcome");cp.actionChoicePauseMovie();',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,uab:1,chfn:cp.ch,osc:'',osct:0,ofc:'',ofct:0,pa:856,enabled:1,ma:-1,pfc:1,dclk:false,amc:true,eh:cp.cbKH,siq:false,sat:true,trin:0,trout:0,bstin:'Btn_CYOA_down01_20',stl:[{stn:'Normal',stt:0,stsi:[12138]}],stis:0,bstiid:12116,sipst:1,sicbs:true,sihhs:true,sihds:true,isDD:false},si12138c:{b:[1148,637,1200,684],uid:12138,dn:'si12138',visible:0,effectiveVi:1,JSONEffectData:false,accstr:' ',traccstr:'',ti:2500,acclng:'',sc:'#1a1a1a',sw:0,ss:0,fa:100,bc:'#171717',p0:[[0],[1,1174,637],[2,1148,684],[2,1200.00,684],[2,1174,637],[4]],svg:false,vbwr:[1148,637,1200,684],tr:'rotate(180deg)',sh:{i:false,a:45,d:3,b:4,o:0.4,c:'rgb(0, 0, 0)'},vb:[1148,637,1204,688]},Btn_CYOA_up01_21:{type:612,from:811,to:900,rp:0,rpa:0,mdi:'Btn_CYOA_up01_21c',retainState:false,immo:false,apsn:'Slide12481',JSONTT_4:[],cpa:true,oca:'cp.changeState("Infotext_CYOA_Option1_22","Normal");cp.actionChoicePauseMovie();',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,uab:1,chfn:cp.ch,osc:'',osct:0,ofc:'',ofct:0,pa:856,enabled:1,ma:-1,pfc:1,dclk:false,amc:true,eh:cp.cbKH,siq:false,sat:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[12158]},{stn:'RollOver',stt:2,stsi:[12171]},{stn:'Down',stt:1,stsi:[12184]}],stis:0,bstiid:-1,sipst:0,sicbs:false,sihhs:true,sihds:true,stc:['Btn_CYOA_up01_21','si12171','si12184'],isDD:false},Btn_CYOA_up01_21c:{b:[1148,384,1200,431],uid:12158,sr:cp.fd,ip:'dr/Btn_CYOA_up01_21.png',dn:'Btn_CYOA_up01_21',visible:1,effectiveVi:1,JSONEffectData:false,accstr:' ',traccstr:'',ti:2500,acclng:'',sc:'#1a1a1a',sw:0,ss:0,fa:100,bc:'#b85c53',p0:[[0],[1,1174,384],[2,1148,431],[2,1200.00,431],[2,1174,384],[4]],svg:false,vbwr:[1148,384,1200,431],sh:{i:false,a:45,d:3,b:4,o:0.4,c:'rgb(0, 0, 0)'},vb:[1148,384,1204,435]},si12171:{type:612,from:811,to:900,rp:0,rpa:0,mdi:'si12171c',retainState:false,immo:false,apsn:'Slide12481',JSONTT_4:[],cpa:true,oca:'cp.changeState("Infotext_CYOA_Option1_22","Normal");cp.actionChoicePauseMovie();',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,uab:1,chfn:cp.ch,osc:'',osct:0,ofc:'',ofct:0,pa:856,enabled:1,ma:-1,pfc:1,dclk:false,amc:true,eh:cp.cbKH,siq:false,sat:true,trin:0,trout:0,bstin:'Btn_CYOA_up01_21',stl:[{stn:'Normal',stt:0,stsi:[12171]}],stis:0,bstiid:12158,sipst:2,sicbs:true,sihhs:true,sihds:true,isDD:false},si12171c:{b:[1148,384,1200,431],uid:12171,sr:cp.fd,ip:'dr/si12171.png',dn:'si12171',visible:0,effectiveVi:1,JSONEffectData:false,accstr:' ',traccstr:'',ti:2500,acclng:'',sc:'#1a1a1a',sw:0,ss:0,fa:100,bc:'#737373',p0:[[0],[1,1174,384],[2,1148,431],[2,1200.00,431],[2,1174,384],[4]],svg:false,vbwr:[1148,384,1200,431],sh:{i:false,a:45,d:3,b:4,o:0.4,c:'rgb(0, 0, 0)'},vb:[1148,384,1204,435]},si12184:{type:612,from:811,to:900,rp:0,rpa:0,mdi:'si12184c',retainState:false,immo:false,apsn:'Slide12481',JSONTT_4:[],cpa:true,oca:'cp.changeState("Infotext_CYOA_Option1_22","Normal");cp.actionChoicePauseMovie();',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,uab:1,chfn:cp.ch,osc:'',osct:0,ofc:'',ofct:0,pa:856,enabled:1,ma:-1,pfc:1,dclk:false,amc:true,eh:cp.cbKH,siq:false,sat:true,trin:0,trout:0,bstin:'Btn_CYOA_up01_21',stl:[{stn:'Normal',stt:0,stsi:[12184]}],stis:0,bstiid:12158,sipst:1,sicbs:true,sihhs:true,sihds:true,isDD:false},si12184c:{b:[1148,384,1200,431],uid:12184,sr:cp.fd,ip:'dr/si12184.png',dn:'si12184',visible:0,effectiveVi:1,JSONEffectData:false,accstr:' ',traccstr:'',ti:2500,acclng:'',sc:'#1a1a1a',sw:0,ss:0,fa:100,bc:'#171717',p0:[[0],[1,1174,384],[2,1148,431],[2,1200.00,431],[2,1174,384],[4]],svg:false,vbwr:[1148,384,1200,431],sh:{i:false,a:45,d:3,b:4,o:0.4,c:'rgb(0, 0, 0)'},vb:[1148,384,1204,435]},Infotext_CYOA_Option1_22:{type:612,from:811,to:900,rp:0,rpa:0,mdi:'Infotext_CYOA_Option1_22c',retainState:false,immo:false,apsn:'Slide12481',JSONTT_4:[],cpa:true,oca:'cp.jumpToNextSlide();',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[12202]},{stn:'Outcome',stt:9,stsi:[12215]}],stis:0,bstiid:-1,sipst:0,sicbs:false,sihhs:false,sihds:false,stc:['Infotext_CYOA_Option1_22','si12215'],isDD:false},Infotext_CYOA_Option1_22c:{b:[400,344,1119,689],uid:12202,sr:cp.fd,ip:'dr/Infotext_CYOA_Option1_22.png',dn:'Infotext_CYOA_Option1_22',visible:1,effectiveVi:1,JSONEffectData:false,accstr:' “Since I’m the teacher of the class, I will tell you about my own sexual experiences to help you understand what sexuality is.” Scroll down for outcome ',traccstr:'',ti:-1,acclng:'',sc:'#1a1a1a',sw:2,ss:0,fa:100,bc:'#ffffff',p0:[[0],[1,400.00,344],[2,400.00,689],[2,1119,689],[2,1119,344],[2,400.00,344],[4]],svg:false,vbwr:[396,340,1123,693],sh:{i:false,a:45,d:3,b:4,o:0.4,c:'rgb(0, 0, 0)'},vb:[396,340,1127,697]},si12215:{type:612,from:811,to:900,rp:0,rpa:0,mdi:'si12215c',retainState:false,immo:false,apsn:'Slide12481',JSONTT_4:[],cpa:true,oca:'cp.jumpToNextSlide();',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,trin:0,trout:0,bstin:'Infotext_CYOA_Option1_22',stl:[{stn:'Normal',stt:0,stsi:[12215]}],stis:0,bstiid:12202,sipst:9,sicbs:true,sihhs:false,sihds:false,isDD:false},si12215c:{b:[400,344,1119,689],uid:12215,sr:cp.fd,ip:'dr/si12215.png',dn:'si12215',visible:0,effectiveVi:1,JSONEffectData:false,accstr:'*DON’T DO IT*This is an example of poor boundaries by the teacher and does not follow the healthy sexuality curriculum. ',traccstr:'',ti:-1,acclng:'',sc:'#1a1a1a',sw:2,ss:0,fa:100,bc:'#ffffff',p0:[[0],[1,400.00,344],[2,400.00,689],[2,1119,689],[2,1119,344],[2,400.00,344],[4]],svg:false,vbwr:[396,340,1123,693],sh:{i:false,a:45,d:3,b:4,o:0.4,c:'rgb(0, 0, 0)'},vb:[396,340,1127,697]},CYOA_01_characters_23:{type:612,from:811,to:900,rp:0,rpa:0,mdi:'CYOA_01_characters_23c',retainState:false,immo:false,apsn:'Slide12481',JSONTT_4:[],cpa:true,oca:'cp.jumpToNextSlide();',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[12233]},{stn:'Option_1',stt:9,stsi:[12244,12255]},{stn:'Option2',stt:9,stsi:[12266,12277]},{stn:'Option3',stt:9,stsi:[12288,12299]}],stis:0,bstiid:-1,sipst:0,sicbs:false,sihhs:false,sihds:false,stc:['CYOA_01_characters_23','si12244','si12266','si12288'],isDD:false},CYOA_01_characters_23c:{b:[73,312,316,606],uid:12233,sr:cp.fd,ip:'dr/CYOA_01_characters_23.png',dn:'CYOA_01_characters_23',visible:1,effectiveVi:1,JSONEffectData:false,accstr:' ',traccstr:'',ti:-1,acclng:'',sc:'#1a1a1a',sw:0,ss:0,fa:0,bc:'#ffffff',p0:[[0],[1,194.5,312],[3,127.40,312,73,377.81,73,459],[3,73,540.19,127.40,606,194.5,606],[3,261.6,606,316,540.19,316,459],[3,316,377.81,261.6,312,194.5,312],[4]],svg:false,vbwr:[73,312,316,606],vb:[73,312,316,606]},si12244:{type:612,from:811,to:900,rp:0,rpa:0,mdi:'si12244c',retainState:false,immo:false,apsn:'Slide12481',JSONTT_4:[],cpa:true,oca:'cp.jumpToNextSlide();',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,trin:0,trout:0,bstin:'CYOA_01_characters_23',stl:[{stn:'Normal',stt:0,stsi:[12244]}],stis:0,bstiid:12233,sipst:9,sicbs:true,sihhs:false,sihds:false,isDD:false},si12244c:{b:[73,312,316,606],uid:12244,sr:cp.fd,ip:'dr/si12244.png',dn:'si12244',visible:0,effectiveVi:1,JSONEffectData:false,accstr:' ',traccstr:'',ti:-1,acclng:'',sc:'#1a1a1a',sw:0,ss:0,fa:0,bc:'#ffffff',p0:[[0],[1,194.5,312],[3,127.40,312,73,377.81,73,459],[3,73,540.19,127.40,606,194.5,606],[3,261.6,606,316,540.19,316,459],[3,316,377.81,261.6,312,194.5,312],[4]],svg:false,vbwr:[73,312,316,606],vb:[73,312,316,606]},Image_22:{type:15,from:811,to:900,rp:0,rpa:0,mdi:'Image_22c',retainState:false,immo:false,apsn:'Slide12481',JSONTT_4:[],cpa:true,oca:'cp.jumpToNextSlide();',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[12255]}],stis:0,bstiid:12233,sipst:9,sicbs:false,sihhs:false,sihds:false,isDD:false},Image_22c:{b:[64,314,376,726],uid:12255,sr:cp.fd,ip:'dr/11395_312_412.png',dn:'Image_22',visible:0,effectiveVi:1,JSONEffectData:false,accstr:'Image ',traccstr:'',ti:-1,acclng:'',vbwr:[64,314,376,726],vb:[64,314,376,726]},si12266:{type:612,from:811,to:900,rp:0,rpa:0,mdi:'si12266c',retainState:false,immo:false,apsn:'Slide12481',JSONTT_4:[],cpa:true,oca:'cp.jumpToNextSlide();',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,trin:0,trout:0,bstin:'CYOA_01_characters_23',stl:[{stn:'Normal',stt:0,stsi:[12266]}],stis:0,bstiid:12233,sipst:9,sicbs:true,sihhs:false,sihds:false,isDD:false},si12266c:{b:[73,312,316,606],uid:12266,sr:cp.fd,ip:'dr/si12266.png',dn:'si12266',visible:0,effectiveVi:1,JSONEffectData:false,accstr:' ',traccstr:'',ti:-1,acclng:'',sc:'#1a1a1a',sw:0,ss:0,fa:0,bc:'#ffffff',p0:[[0],[1,194.5,312],[3,127.40,312,73,377.81,73,459],[3,73,540.19,127.40,606,194.5,606],[3,261.6,606,316,540.19,316,459],[3,316,377.81,261.6,312,194.5,312],[4]],svg:false,vbwr:[73,312,316,606],vb:[73,312,316,606]},Image_23:{type:15,from:811,to:900,rp:0,rpa:0,mdi:'Image_23c',retainState:false,immo:false,apsn:'Slide12481',JSONTT_4:[],cpa:true,oca:'cp.jumpToNextSlide();',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[12277]}],stis:0,bstiid:12233,sipst:9,sicbs:false,sihhs:false,sihds:false,isDD:false},Image_23c:{b:[28,301,369,740],uid:12277,sr:cp.fd,ip:'dr/11384_341_439.png',dn:'Image_23',visible:0,effectiveVi:1,JSONEffectData:false,accstr:'Image ',traccstr:'',ti:-1,acclng:'',vbwr:[28,301,369,740],vb:[28,301,369,740]},si12288:{type:612,from:811,to:900,rp:0,rpa:0,mdi:'si12288c',retainState:false,immo:false,apsn:'Slide12481',JSONTT_4:[],cpa:true,oca:'cp.jumpToNextSlide();',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,trin:0,trout:0,bstin:'CYOA_01_characters_23',stl:[{stn:'Normal',stt:0,stsi:[12288]}],stis:0,bstiid:12233,sipst:9,sicbs:true,sihhs:false,sihds:false,isDD:false},si12288c:{b:[73,312,316,606],uid:12288,sr:cp.fd,ip:'dr/si12288.png',dn:'si12288',visible:0,effectiveVi:1,JSONEffectData:false,accstr:' ',traccstr:'',ti:-1,acclng:'',sc:'#1a1a1a',sw:0,ss:0,fa:0,bc:'#ffffff',p0:[[0],[1,194.5,312],[3,127.40,312,73,377.81,73,459],[3,73,540.19,127.40,606,194.5,606],[3,261.6,606,316,540.19,316,459],[3,316,377.81,261.6,312,194.5,312],[4]],svg:false,vbwr:[73,312,316,606],vb:[73,312,316,606]},Image_24:{type:15,from:811,to:900,rp:0,rpa:0,mdi:'Image_24c',retainState:false,immo:false,apsn:'Slide12481',JSONTT_4:[],cpa:true,oca:'cp.jumpToNextSlide();',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[12299]}],stis:0,bstiid:12233,sipst:9,sicbs:false,sihhs:false,sihds:false,isDD:false},Image_24c:{b:[-4,304,443,734],uid:12299,sr:cp.fd,ip:'dr/11406_447_430.png',dn:'Image_24',visible:0,effectiveVi:1,JSONEffectData:false,accstr:'Image ',traccstr:'',ti:-1,acclng:'',vbwr:[-4,304,443,734],vb:[-4,304,443,734]},Btn_CYOA_Option3_24:{type:612,from:811,to:900,rp:0,rpa:0,mdi:'Btn_CYOA_Option3_24c',retainState:false,immo:false,apsn:'Slide12481',JSONTT_4:[],cpa:true,oca:'cp.show("CYOA_01_characters_23");\
cp.changeState("CYOA_01_characters_23","Option3");\
cp.show("Infotext_CYOA_Option3_16");\
cp.changeState("Infotext_CYOA_Option3_16","Normal");\
cp.show("Btn_CYOA_up03_15");\
cp.show("Btn_CYOA_down03_14");\
cp.hide("Infotext_CYOA_Option1_22");\
cp.hide("Infotext_CYOA_Option2_19");\
cp.hide("Btn_CYOA_up01_21");\
cp.hide("Btn_CYOA_down01_20");\
cp.hide("Btn_CYOA_up02_18");\
cp.hide("Btn_CYOA_down02_17");\
cpCmndPause = 1;',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,uab:1,chfn:cp.ch,osc:'',osct:0,ofc:'',ofct:0,pa:856,enabled:1,ma:-1,pfc:1,dclk:false,amc:true,ca:'Btn_CYOA_Option3_24ClkAd',eh:cp.cbKH,siq:false,sat:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[12322]},{stn:'RollOver',stt:2,stsi:[12335]},{stn:'Down',stt:1,stsi:[12348]}],stis:0,bstiid:-1,sipst:0,sicbs:false,sihhs:true,sihds:true,stc:['Btn_CYOA_Option3_24','si12335','si12348'],isDD:false},Btn_CYOA_Option3_24c:{b:[885,242,1200,296],uid:12322,sr:cp.fd,ip:'dr/Btn_CYOA_Option3_24.png',dn:'Btn_CYOA_Option3_24',visible:1,effectiveVi:1,JSONEffectData:false,accstr:'Option 3 ',traccstr:'',ti:2500,acclng:'',sc:'#1a1a1a',sw:0,ss:0,fa:100,bc:'#f9cfcb',p0:[[0],[1,885,242],[2,885,296],[2,1200.00,296],[2,1200.00,242],[2,885,242],[4]],svg:false,vbwr:[885,242,1200,296],sh:{i:false,a:45,d:3,b:4,o:0.4,c:'rgb(0, 0, 0)'},vb:[885,242,1204,300]},Btn_CYOA_Option3_24ClkAd:{src:'ar/Mouse.mp3',du:182},si12335:{type:612,from:811,to:900,rp:0,rpa:0,mdi:'si12335c',retainState:false,immo:false,apsn:'Slide12481',JSONTT_4:[],cpa:true,oca:'cp.show("CYOA_01_characters_23");\
cp.changeState("CYOA_01_characters_23","Option3");\
cp.show("Infotext_CYOA_Option3_16");\
cp.changeState("Infotext_CYOA_Option3_16","Normal");\
cp.show("Btn_CYOA_up03_15");\
cp.show("Btn_CYOA_down03_14");\
cp.hide("Infotext_CYOA_Option1_22");\
cp.hide("Infotext_CYOA_Option2_19");\
cp.hide("Btn_CYOA_up01_21");\
cp.hide("Btn_CYOA_down01_20");\
cp.hide("Btn_CYOA_up02_18");\
cp.hide("Btn_CYOA_down02_17");\
cpCmndPause = 1;',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,uab:1,chfn:cp.ch,osc:'',osct:0,ofc:'',ofct:0,pa:856,enabled:1,ma:-1,pfc:1,dclk:false,amc:true,ca:'si12335ClkAd',eh:cp.cbKH,siq:false,sat:true,trin:0,trout:0,bstin:'Btn_CYOA_Option3_24',stl:[{stn:'Normal',stt:0,stsi:[12335]}],stis:0,bstiid:12322,sipst:2,sicbs:true,sihhs:true,sihds:true,isDD:false},si12335c:{b:[885,242,1200,296],uid:12335,sr:cp.fd,ip:'dr/si12335.png',dn:'si12335',visible:0,effectiveVi:1,JSONEffectData:false,accstr:'Option 3 ',traccstr:'',ti:2500,acclng:'',sc:'#1a1a1a',sw:0,ss:0,fa:100,bc:'#737373',p0:[[0],[1,885,242],[2,885,296],[2,1200.00,296],[2,1200.00,242],[2,885,242],[4]],svg:false,vbwr:[885,242,1200,296],sh:{i:false,a:45,d:3,b:4,o:0.4,c:'rgb(0, 0, 0)'},vb:[885,242,1204,300]},si12335ClkAd:{src:'ar/Mouse.mp3',du:182},si12348:{type:612,from:811,to:900,rp:0,rpa:0,mdi:'si12348c',retainState:false,immo:false,apsn:'Slide12481',JSONTT_4:[],cpa:true,oca:'cp.show("CYOA_01_characters_23");\
cp.changeState("CYOA_01_characters_23","Option3");\
cp.show("Infotext_CYOA_Option3_16");\
cp.changeState("Infotext_CYOA_Option3_16","Normal");\
cp.show("Btn_CYOA_up03_15");\
cp.show("Btn_CYOA_down03_14");\
cp.hide("Infotext_CYOA_Option1_22");\
cp.hide("Infotext_CYOA_Option2_19");\
cp.hide("Btn_CYOA_up01_21");\
cp.hide("Btn_CYOA_down01_20");\
cp.hide("Btn_CYOA_up02_18");\
cp.hide("Btn_CYOA_down02_17");\
cpCmndPause = 1;',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,uab:1,chfn:cp.ch,osc:'',osct:0,ofc:'',ofct:0,pa:856,enabled:1,ma:-1,pfc:1,dclk:false,amc:true,ca:'si12348ClkAd',eh:cp.cbKH,siq:false,sat:true,trin:0,trout:0,bstin:'Btn_CYOA_Option3_24',stl:[{stn:'Normal',stt:0,stsi:[12348]}],stis:0,bstiid:12322,sipst:1,sicbs:true,sihhs:true,sihds:true,isDD:false},si12348c:{b:[885,242,1200,296],uid:12348,sr:cp.fd,ip:'dr/si12348.png',dn:'si12348',visible:0,effectiveVi:1,JSONEffectData:false,accstr:'Option 3 ',traccstr:'',ti:2500,acclng:'',sc:'#1a1a1a',sw:0,ss:0,fa:100,bc:'#171717',p0:[[0],[1,885,242],[2,885,296],[2,1200.00,296],[2,1200.00,242],[2,885,242],[4]],svg:false,vbwr:[885,242,1200,296],sh:{i:false,a:45,d:3,b:4,o:0.4,c:'rgb(0, 0, 0)'},vb:[885,242,1204,300]},si12348ClkAd:{src:'ar/Mouse.mp3',du:182},Btn_CYOA_Option2_25:{type:612,from:811,to:900,rp:0,rpa:0,mdi:'Btn_CYOA_Option2_25c',retainState:false,immo:false,apsn:'Slide12481',JSONTT_4:[],cpa:true,oca:'cp.show("CYOA_01_characters_23");\
cp.changeState("CYOA_01_characters_23","Option2");\
cp.show("Infotext_CYOA_Option2_19");\
cp.changeState("Infotext_CYOA_Option2_19","Normal");\
cp.show("Btn_CYOA_up02_18");\
cp.show("Btn_CYOA_down02_17");\
cp.hide("Infotext_CYOA_Option1_22");\
cp.hide("Btn_CYOA_up01_21");\
cp.hide("Btn_CYOA_down01_20");\
cp.hide("Infotext_CYOA_Option3_16");\
cp.hide("Btn_CYOA_up03_15");\
cp.hide("Btn_CYOA_down03_14");\
cpCmndPause = 1;',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,uab:1,chfn:cp.ch,osc:'',osct:0,ofc:'',ofct:0,pa:856,enabled:1,ma:-1,pfc:1,dclk:false,amc:true,ca:'Btn_CYOA_Option2_25ClkAd',eh:cp.cbKH,siq:false,sat:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[12371]},{stn:'RollOver',stt:2,stsi:[12384]},{stn:'Down',stt:1,stsi:[12397]}],stis:0,bstiid:-1,sipst:0,sicbs:false,sihhs:true,sihds:true,stc:['Btn_CYOA_Option2_25','si12384','si12397'],isDD:false},Btn_CYOA_Option2_25c:{b:[470,242,776,296],uid:12371,sr:cp.fd,ip:'dr/Btn_CYOA_Option2_25.png',dn:'Btn_CYOA_Option2_25',visible:1,effectiveVi:1,JSONEffectData:false,accstr:'Option 2 ',traccstr:'',ti:2500,acclng:'',sc:'#1a1a1a',sw:0,ss:0,fa:100,bc:'#f9cfcb',p0:[[0],[1,470.00,242],[2,470.00,296],[2,776,296],[2,776,242],[2,470.00,242],[4]],svg:false,vbwr:[470,242,776,296],sh:{i:false,a:45,d:3,b:4,o:0.4,c:'rgb(0, 0, 0)'},vb:[470,242,780,300]},Btn_CYOA_Option2_25ClkAd:{src:'ar/Mouse.mp3',du:182},si12384:{type:612,from:811,to:900,rp:0,rpa:0,mdi:'si12384c',retainState:false,immo:false,apsn:'Slide12481',JSONTT_4:[],cpa:true,oca:'cp.show("CYOA_01_characters_23");\
cp.changeState("CYOA_01_characters_23","Option2");\
cp.show("Infotext_CYOA_Option2_19");\
cp.changeState("Infotext_CYOA_Option2_19","Normal");\
cp.show("Btn_CYOA_up02_18");\
cp.show("Btn_CYOA_down02_17");\
cp.hide("Infotext_CYOA_Option1_22");\
cp.hide("Btn_CYOA_up01_21");\
cp.hide("Btn_CYOA_down01_20");\
cp.hide("Infotext_CYOA_Option3_16");\
cp.hide("Btn_CYOA_up03_15");\
cp.hide("Btn_CYOA_down03_14");\
cpCmndPause = 1;',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,uab:1,chfn:cp.ch,osc:'',osct:0,ofc:'',ofct:0,pa:856,enabled:1,ma:-1,pfc:1,dclk:false,amc:true,ca:'si12384ClkAd',eh:cp.cbKH,siq:false,sat:true,trin:0,trout:0,bstin:'Btn_CYOA_Option2_25',stl:[{stn:'Normal',stt:0,stsi:[12384]}],stis:0,bstiid:12371,sipst:2,sicbs:true,sihhs:true,sihds:true,isDD:false},si12384c:{b:[470,242,776,296],uid:12384,sr:cp.fd,ip:'dr/si12384.png',dn:'si12384',visible:0,effectiveVi:1,JSONEffectData:false,accstr:'Option 2 ',traccstr:'',ti:2500,acclng:'',sc:'#1a1a1a',sw:0,ss:0,fa:100,bc:'#737373',p0:[[0],[1,470.00,242],[2,470.00,296],[2,776,296],[2,776,242],[2,470.00,242],[4]],svg:false,vbwr:[470,242,776,296],sh:{i:false,a:45,d:3,b:4,o:0.4,c:'rgb(0, 0, 0)'},vb:[470,242,780,300]},si12384ClkAd:{src:'ar/Mouse.mp3',du:182},si12397:{type:612,from:811,to:900,rp:0,rpa:0,mdi:'si12397c',retainState:false,immo:false,apsn:'Slide12481',JSONTT_4:[],cpa:true,oca:'cp.show("CYOA_01_characters_23");\
cp.changeState("CYOA_01_characters_23","Option2");\
cp.show("Infotext_CYOA_Option2_19");\
cp.changeState("Infotext_CYOA_Option2_19","Normal");\
cp.show("Btn_CYOA_up02_18");\
cp.show("Btn_CYOA_down02_17");\
cp.hide("Infotext_CYOA_Option1_22");\
cp.hide("Btn_CYOA_up01_21");\
cp.hide("Btn_CYOA_down01_20");\
cp.hide("Infotext_CYOA_Option3_16");\
cp.hide("Btn_CYOA_up03_15");\
cp.hide("Btn_CYOA_down03_14");\
cpCmndPause = 1;',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,uab:1,chfn:cp.ch,osc:'',osct:0,ofc:'',ofct:0,pa:856,enabled:1,ma:-1,pfc:1,dclk:false,amc:true,ca:'si12397ClkAd',eh:cp.cbKH,siq:false,sat:true,trin:0,trout:0,bstin:'Btn_CYOA_Option2_25',stl:[{stn:'Normal',stt:0,stsi:[12397]}],stis:0,bstiid:12371,sipst:1,sicbs:true,sihhs:true,sihds:true,isDD:false},si12397c:{b:[470,242,776,296],uid:12397,sr:cp.fd,ip:'dr/si12397.png',dn:'si12397',visible:0,effectiveVi:1,JSONEffectData:false,accstr:'Option 2 ',traccstr:'',ti:2500,acclng:'',sc:'#1a1a1a',sw:0,ss:0,fa:100,bc:'#171717',p0:[[0],[1,470.00,242],[2,470.00,296],[2,776,296],[2,776,242],[2,470.00,242],[4]],svg:false,vbwr:[470,242,776,296],sh:{i:false,a:45,d:3,b:4,o:0.4,c:'rgb(0, 0, 0)'},vb:[470,242,780,300]},si12397ClkAd:{src:'ar/Mouse.mp3',du:182},Btn_CYOA_Option1_26:{type:612,from:811,to:900,rp:0,rpa:0,mdi:'Btn_CYOA_Option1_26c',retainState:false,immo:false,apsn:'Slide12481',JSONTT_4:[],cpa:true,oca:'cp.show("CYOA_01_characters_23");\
cp.changeState("CYOA_01_characters_23","Option_1");\
cp.show("Infotext_CYOA_Option1_22");\
cp.changeState("Infotext_CYOA_Option1_22","Normal");\
cp.show("Btn_CYOA_up01_21");\
cp.show("Btn_CYOA_down01_20");\
cp.hide("Infotext_CYOA_Option2_19");\
cp.hide("Btn_CYOA_up02_18");\
cp.hide("Btn_CYOA_down02_17");\
cp.hide("Infotext_CYOA_Option3_16");\
cp.hide("Btn_CYOA_up03_15");\
cp.hide("Btn_CYOA_down03_14");\
cpCmndPause = 1;',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,uab:1,chfn:cp.ch,osc:'',osct:0,ofc:'',ofct:0,pa:856,enabled:1,ma:-1,pfc:1,dclk:false,amc:true,ca:'Btn_CYOA_Option1_26ClkAd',eh:cp.cbKH,siq:false,sat:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[12421]},{stn:'RollOver',stt:2,stsi:[12434]},{stn:'Down',stt:1,stsi:[12447]}],stis:0,bstiid:-1,sipst:0,sicbs:false,sihhs:true,sihds:true,stc:['Btn_CYOA_Option1_26','si12434','si12447'],isDD:false},Btn_CYOA_Option1_26c:{b:[54,242,360,296],uid:12421,sr:cp.fd,ip:'dr/Btn_CYOA_Option1_26.png',dn:'Btn_CYOA_Option1_26',visible:1,effectiveVi:1,JSONEffectData:false,accstr:'Option 1 ',traccstr:'',ti:2500,acclng:'',sc:'#1a1a1a',sw:0,ss:0,fa:100,bc:'#f9cfcb',p0:[[0],[1,54,242],[2,54,296],[2,360.00,296],[2,360.00,242],[2,54,242],[4]],svg:false,vbwr:[54,242,360,296],sh:{i:false,a:45,d:3,b:4,o:0.4,c:'rgb(0, 0, 0)'},vb:[54,242,364,300]},Btn_CYOA_Option1_26ClkAd:{src:'ar/Mouse.mp3',du:182},si12434:{type:612,from:811,to:900,rp:0,rpa:0,mdi:'si12434c',retainState:false,immo:false,apsn:'Slide12481',JSONTT_4:[],cpa:true,oca:'cp.show("CYOA_01_characters_23");\
cp.changeState("CYOA_01_characters_23","Option_1");\
cp.show("Infotext_CYOA_Option1_22");\
cp.changeState("Infotext_CYOA_Option1_22","Normal");\
cp.show("Btn_CYOA_up01_21");\
cp.show("Btn_CYOA_down01_20");\
cp.hide("Infotext_CYOA_Option2_19");\
cp.hide("Btn_CYOA_up02_18");\
cp.hide("Btn_CYOA_down02_17");\
cp.hide("Infotext_CYOA_Option3_16");\
cp.hide("Btn_CYOA_up03_15");\
cp.hide("Btn_CYOA_down03_14");\
cpCmndPause = 1;',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,uab:1,chfn:cp.ch,osc:'',osct:0,ofc:'',ofct:0,pa:856,enabled:1,ma:-1,pfc:1,dclk:false,amc:true,ca:'si12434ClkAd',eh:cp.cbKH,siq:false,sat:true,trin:0,trout:0,bstin:'Btn_CYOA_Option1_26',stl:[{stn:'Normal',stt:0,stsi:[12434]}],stis:0,bstiid:12421,sipst:2,sicbs:true,sihhs:true,sihds:true,isDD:false},si12434c:{b:[54,242,360,296],uid:12434,sr:cp.fd,ip:'dr/si12434.png',dn:'si12434',visible:0,effectiveVi:1,JSONEffectData:false,accstr:'Option 1 ',traccstr:'',ti:2500,acclng:'',sc:'#1a1a1a',sw:0,ss:0,fa:100,bc:'#737373',p0:[[0],[1,54,242],[2,54,296],[2,360.00,296],[2,360.00,242],[2,54,242],[4]],svg:false,vbwr:[54,242,360,296],sh:{i:false,a:45,d:3,b:4,o:0.4,c:'rgb(0, 0, 0)'},vb:[54,242,364,300]},si12434ClkAd:{src:'ar/Mouse.mp3',du:182},si12447:{type:612,from:811,to:900,rp:0,rpa:0,mdi:'si12447c',retainState:false,immo:false,apsn:'Slide12481',JSONTT_4:[],cpa:true,oca:'cp.show("CYOA_01_characters_23");\
cp.changeState("CYOA_01_characters_23","Option_1");\
cp.show("Infotext_CYOA_Option1_22");\
cp.changeState("Infotext_CYOA_Option1_22","Normal");\
cp.show("Btn_CYOA_up01_21");\
cp.show("Btn_CYOA_down01_20");\
cp.hide("Infotext_CYOA_Option2_19");\
cp.hide("Btn_CYOA_up02_18");\
cp.hide("Btn_CYOA_down02_17");\
cp.hide("Infotext_CYOA_Option3_16");\
cp.hide("Btn_CYOA_up03_15");\
cp.hide("Btn_CYOA_down03_14");\
cpCmndPause = 1;',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,uab:1,chfn:cp.ch,osc:'',osct:0,ofc:'',ofct:0,pa:856,enabled:1,ma:-1,pfc:1,dclk:false,amc:true,ca:'si12447ClkAd',eh:cp.cbKH,siq:false,sat:true,trin:0,trout:0,bstin:'Btn_CYOA_Option1_26',stl:[{stn:'Normal',stt:0,stsi:[12447]}],stis:0,bstiid:12421,sipst:1,sicbs:true,sihhs:true,sihds:true,isDD:false},si12447c:{b:[54,242,360,296],uid:12447,sr:cp.fd,ip:'dr/si12447.png',dn:'si12447',visible:0,effectiveVi:1,JSONEffectData:false,accstr:'Option 1 ',traccstr:'',ti:2500,acclng:'',sc:'#1a1a1a',sw:0,ss:0,fa:100,bc:'#171717',p0:[[0],[1,54,242],[2,54,296],[2,360.00,296],[2,360.00,242],[2,54,242],[4]],svg:false,vbwr:[54,242,360,296],sh:{i:false,a:45,d:3,b:4,o:0.4,c:'rgb(0, 0, 0)'},vb:[54,242,364,300]},si12447ClkAd:{src:'ar/Mouse.mp3',du:182},CYOA_01_Title_27:{type:612,from:811,to:900,rp:0,rpa:0,mdi:'CYOA_01_Title_27c',retainState:false,immo:false,apsn:'Slide12481',JSONTT_4:[],cpa:true,oca:'cp.jumpToNextSlide();',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[12461]}],stis:0,bstiid:-1,sipst:0,sicbs:false,sihhs:false,sihds:false,isDD:false},CYOA_01_Title_27c:{b:[53,38,1160,107],uid:12461,sr:cp.fd,ip:'dr/CYOA_01_Title_27.png',dn:'CYOA_01_Title_27',visible:1,effectiveVi:1,JSONEffectData:false,accstr:'Choose your own adventure! ',traccstr:'',ti:-1,acclng:'',sc:'#1a1a1a',sw:0,ss:0,fa:0,bc:'#e6e6e6',p0:[[0],[1,53,38],[2,53,107],[2,1160.00,107],[2,1160.00,38],[2,53,38],[4]],svg:false,vbwr:[53,38,1160,107],vb:[53,38,1160,107]},Slide12481:{lb:'',id:12481,from:811,to:900,iols:0,i360qs:false,propTxtScaling:false,minFontSizeScaling:14,useng:true,transition:{type:0},mmot:false,mdi:'Slide12481c',st:'Normal Slide',ccProperties:{1280:{pos:7,x:35,y:88}},audCC:[],vidCC:[],accstr:' ',si:[{n:'Image_21',t:15},{n:'CYOA_01_description_13',t:612},{n:'Btn_CYOA_down03_14',t:612,d:{cur:1}},{n:'si11895',t:612,d:{cur:1}},{n:'si11906',t:612,d:{cur:1}},{n:'Btn_CYOA_up03_15',t:612,d:{cur:1}},{n:'si11938',t:612,d:{cur:1}},{n:'si11951',t:612,d:{cur:1}},{n:'Infotext_CYOA_Option3_16',t:612},{n:'si11984',t:612},{n:'Btn_CYOA_down02_17',t:612,d:{cur:1}},{n:'si12012',t:612,d:{cur:1}},{n:'si12023',t:612,d:{cur:1}},{n:'Btn_CYOA_up02_18',t:612,d:{cur:1}},{n:'si12055',t:612,d:{cur:1}},{n:'si12068',t:612,d:{cur:1}},{n:'Infotext_CYOA_Option2_19',t:612},{n:'si12099',t:612},{n:'Btn_CYOA_down01_20',t:612,d:{cur:1}},{n:'si12127',t:612,d:{cur:1}},{n:'si12138',t:612,d:{cur:1}},{n:'Btn_CYOA_up01_21',t:612,d:{cur:1}},{n:'si12171',t:612,d:{cur:1}},{n:'si12184',t:612,d:{cur:1}},{n:'Infotext_CYOA_Option1_22',t:612},{n:'si12215',t:612},{n:'CYOA_01_characters_23',t:612},{n:'si12244',t:612},{n:'Image_22',t:15},{n:'si12266',t:612},{n:'Image_23',t:15},{n:'si12288',t:612},{n:'Image_24',t:15},{n:'Btn_CYOA_Option3_24',t:612},{n:'si12335',t:612},{n:'si12348',t:612},{n:'Btn_CYOA_Option2_25',t:612},{n:'si12384',t:612},{n:'si12397',t:612},{n:'Btn_CYOA_Option1_26',t:612},{n:'si12434',t:612},{n:'si12447',t:612},{n:'CYOA_01_Title_27',t:612}],iph:[],ea:'Btn_CYOA_Option3_24ClkAd,si12335ClkAd,si12348ClkAd,Btn_CYOA_Option2_25ClkAd,si12384ClkAd,si12397ClkAd,Btn_CYOA_Option1_26ClkAd,si12434ClkAd,si12447ClkAd',v:false,bc:'#ffffff',JSONTT_0:[],sea:'cpCmndPause = 1;\
cp.enable("Btn_CYOA_Option1_26");\
cp.enable("Btn_CYOA_Option2_25");\
cp.enable("Btn_CYOA_Option3_24");\
cp.hide("Btn_CYOA_down01_20");\
cp.hide("Btn_CYOA_down02_17");\
cp.hide("Btn_CYOA_down03_14");\
cp.hide("Btn_CYOA_up01_21");\
cp.hide("Btn_CYOA_up02_18");\
cp.hide("Btn_CYOA_up03_15");\
cp.hide("CYOA_01_characters_23");\
cp.hide("Infotext_CYOA_Option1_22");\
cp.hide("Infotext_CYOA_Option2_19");\
cp.hide("Infotext_CYOA_Option3_16");',JSONTT_6:[],qs:''},Slide12481c:{b:[0,0,0,0],sr:cp.fd,uid:12481,dn:'Slide12481',visible:'1'},Image_25:{type:15,from:901,to:990,rp:0,rpa:0,mdi:'Image_25c',retainState:false,immo:false,apsn:'Slide12530',JSONTT_4:[],cpa:true,oca:'cp.jumpToNextSlide();',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[12493]}],stis:0,bstiid:-1,sipst:0,sicbs:false,sihhs:false,sihds:false,isDD:false},Image_25c:{b:[-740,-142,902,782],uid:12493,sr:cp.fd,ip:'dr/12485_1642_924Tr87.png',dn:'Image_25',visible:1,effectiveVi:1,JSONEffectData:false,accstr:'Image ',traccstr:'',ti:-1,acclng:'',vbwr:[-740,-142,902,782],vb:[-740,-142,902,782]},Text_Caption_17:{type:19,from:901,to:990,rp:0,rpa:0,mdi:'Text_Caption_17c',retainState:false,immo:false,apsn:'Slide12530',iflbx:false,ipflbx:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[12503]}],stis:0,bstiid:-1,sipst:0,sicbs:false,sihhs:false,sihds:false,isDD:false},Text_Caption_17c:{b:[173,131,806,456],uid:12503,sr:cp.fd,ip:'dr/Text_Caption_17.png',dn:'Text_Caption_17',visible:1,effectiveVi:1,JSONEffectData:false,accstr:'So let’s dive into some basic information about what is meant by the word, ‘sexuality’... ',traccstr:'',ti:-1,acclng:'',vbwr:[173,131,806,456],vb:[173,131,806,456]},Image_26:{type:15,from:901,to:990,rp:0,rpa:0,mdi:'Image_26c',retainState:false,immo:false,apsn:'Slide12530',JSONTT_4:[],cpa:true,oca:'cp.jumpToNextSlide();',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[12514]}],stis:0,bstiid:-1,sipst:0,sicbs:false,sihhs:false,sihds:false,isDD:false},Image_26c:{b:[634,99,1200,843],uid:12514,sr:cp.fd,ip:'dr/12506_566_744.png',dn:'Image_26',visible:1,effectiveVi:1,JSONEffectData:false,accstr:'Image ',traccstr:'',ti:-1,acclng:'',vbwr:[634,99,1200,843],vb:[634,99,1200,843]},Slide12530:{lb:'',id:12530,from:901,to:990,iols:0,i360qs:false,propTxtScaling:false,minFontSizeScaling:14,useng:true,transition:{type:0},mmot:false,mdi:'Slide12530c',st:'Normal Slide',ccProperties:{1280:{pos:7,x:35,y:88}},audCC:[],vidCC:[],accstr:' ',si:[{n:'Image_25',t:15},{n:'Text_Caption_17',t:19},{n:'Image_26',t:15}],iph:[],v:false,bc:'#ffffff',JSONTT_0:[],sea:'cpCmndPause = 1;',JSONTT_6:[],qs:''},Slide12530c:{b:[0,0,0,0],sr:cp.fd,uid:12530,dn:'Slide12530',visible:'1'},SmartShape_28:{type:612,from:991,to:1080,rp:0,rpa:0,mdi:'SmartShape_28c',retainState:false,immo:false,apsn:'Slide12596',JSONTT_4:[],cpa:true,oca:'cp.jumpToNextSlide();',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[12561]}],stis:0,bstiid:-1,sipst:0,sicbs:false,sihhs:false,sihds:false,isDD:false},SmartShape_28c:{b:[-1,-8,352,720],uid:12561,dn:'SmartShape_28',visible:1,effectiveVi:1,JSONEffectData:false,accstr:' ',traccstr:'',ti:-1,acclng:'',sc:'#ffffff',sw:0,ss:0,fa:80,bc:'#c3e8e1',p0:[[0],[1,-1,-8],[2,-1,720.00],[2,352,720.00],[2,352,-8],[2,-1,-8],[4]],svg:false,vbwr:[-1,-8,352,720],vb:[-1,-8,352,720]},Image_27:{type:15,from:991,to:1080,rp:0,rpa:0,mdi:'Image_27c',retainState:false,immo:false,apsn:'Slide12596',JSONTT_4:[],cpa:true,oca:'cp.jumpToNextSlide();',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[12572]}],stis:0,bstiid:-1,sipst:0,sicbs:false,sihhs:false,sihds:false,isDD:false},Image_27c:{b:[3,28,712,680],uid:12572,sr:cp.fd,ip:'dr/12564_709_652.png',dn:'Image_27',visible:1,effectiveVi:1,JSONEffectData:false,accstr:'Image ',traccstr:'',ti:-1,acclng:'',vbwr:[3,28,712,680],vb:[3,28,712,680]},Text_Caption_18:{type:19,from:991,to:1080,rp:0,rpa:0,mdi:'Text_Caption_18c',retainState:false,immo:false,apsn:'Slide12596',iflbx:false,ipflbx:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[12580]}],stis:0,bstiid:-1,sipst:0,sicbs:false,sihhs:false,sihds:false,isDD:false},Text_Caption_18c:{b:[715,29,1241,705],uid:12580,sr:cp.fd,ip:'dr/Text_Caption_18.png',dn:'Text_Caption_18',visible:1,effectiveVi:1,JSONEffectData:false,accstr:'THIS IS A SEXUALITY WHEEL Each part of the wheel represents one part of who we are, yet all parts are connected and influenced by each other. The boxes on the left side of the wheel show who we are by nature. The boxes on the right side of the wheel show who we are taught to be or learn to become. When all parts of the wheel are healthy, our sexuality is healthy. On the next page, you can explore an interactive wheel to learn more about each part ',traccstr:'',ti:-1,acclng:'',vbwr:[715,29,1241,705],vb:[715,29,1241,705]},Slide12596:{lb:'',id:12596,from:991,to:1080,iols:0,i360qs:false,propTxtScaling:false,minFontSizeScaling:14,useng:true,transition:{type:0},mmot:false,mdi:'Slide12596c',st:'Normal Slide',ccProperties:{1280:{pos:7,x:35,y:88}},audCC:[],vidCC:[],accstr:' ',si:[{n:'SmartShape_28',t:612},{n:'Image_27',t:15},{n:'Text_Caption_18',t:19}],iph:[],v:false,bc:'#ffffff',JSONTT_0:[],sea:'cpCmndPause = 1;',JSONTT_6:[],qs:''},Slide12596c:{b:[0,0,0,0],sr:cp.fd,uid:12596,dn:'Slide12596',visible:'1'},Image_28:{type:15,from:1081,to:1170,rp:0,rpa:0,mdi:'Image_28c',retainState:false,immo:false,apsn:'Slide13717',JSONTT_4:[],cpa:true,oca:'cp.jumpToNextSlide();',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[12607]}],stis:0,bstiid:-1,sipst:0,sicbs:false,sihhs:false,sihds:false,isDD:false},Image_28c:{b:[307,24,998,658],uid:12607,sr:cp.fd,ip:'dr/12564_691_634.png',dn:'Image_28',visible:1,effectiveVi:1,JSONEffectData:false,accstr:'Image ',traccstr:'',ti:-1,acclng:'',vbwr:[307,24,998,658],vb:[307,24,998,658]},Text_Caption_19:{type:19,from:1081,to:1170,rp:0,rpa:0,mdi:'Text_Caption_19c',retainState:false,immo:false,apsn:'Slide13717',iflbx:false,ipflbx:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[12617]}],stis:0,bstiid:-1,sipst:0,sicbs:false,sihhs:false,sihds:false,isDD:false},Text_Caption_19c:{b:[41,39,377,241],uid:12617,sr:cp.fd,ip:'dr/Text_Caption_19.png',dn:'Text_Caption_19',visible:1,effectiveVi:1,JSONEffectData:false,accstr:'Select each word to learn more: ',traccstr:'',ti:-1,acclng:'',vbwr:[41,39,377,241],vb:[41,39,377,241]},SmartShape_29:{type:612,from:1081,to:1170,rp:0,rpa:0,mdi:'SmartShape_29c',retainState:false,immo:false,apsn:'Slide13717',JSONTT_4:[],cpa:true,oca:'cp.show("SmartShape_WheelInfo_53");\
cp.changeState("SmartShape_WheelInfo_53","Values");',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,uab:1,chfn:cp.ch,osc:'',osct:0,ofc:'',ofct:0,pa:1099,enabled:1,ma:-1,pfc:1,dclk:false,amc:true,eh:cp.cbKH,siq:false,sat:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[12655]},{stn:'RollOver',stt:2,stsi:[12664,12668]},{stn:'Down',stt:1,stsi:[12677,12681]},{stn:'Visited',stt:10,stsi:[12690,12707,12718]}],stis:0,bstiid:-1,sipst:0,sicbs:false,sihhs:true,sihds:true,stc:['SmartShape_29','si12664','si12677','si12690'],isDD:false},SmartShape_29c:{b:[584,56,711,84],uid:12655,dn:'SmartShape_29',visible:1,effectiveVi:1,JSONEffectData:false,accstr:' ',traccstr:'',ti:2500,acclng:'',sc:'#1a1a1a',sw:0,ss:0,fa:0,bc:'#e6e6e6',p0:[[0],[1,584,56],[2,584,84],[2,711,84],[2,711,56],[2,584,56],[4]],svg:false,vbwr:[584,56,711,84],vb:[584,56,711,84]},si12664:{type:612,from:1081,to:1170,rp:0,rpa:0,mdi:'si12664c',retainState:false,immo:false,apsn:'Slide13717',JSONTT_4:[],cpa:true,oca:'cp.show("SmartShape_WheelInfo_53");\
cp.changeState("SmartShape_WheelInfo_53","Values");',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,uab:1,chfn:cp.ch,osc:'',osct:0,ofc:'',ofct:0,pa:1099,enabled:1,ma:-1,pfc:1,dclk:false,amc:true,eh:cp.cbKH,siq:false,sat:true,trin:0,trout:0,bstin:'SmartShape_29',stl:[{stn:'Normal',stt:0,stsi:[12664]}],stis:0,bstiid:12655,sipst:2,sicbs:true,sihhs:true,sihds:true,isDD:false},si12664c:{b:[584,56,711,84],uid:12664,dn:'si12664',visible:0,effectiveVi:1,JSONEffectData:false,accstr:' ',traccstr:'',ti:2500,acclng:'',sc:'#ff0000',sw:0,ss:0,fa:100,bc:'#ff9e9c',p0:[[0],[1,584,56],[2,584,84],[2,711,84],[2,711,56],[2,584,56],[4]],svg:false,vbwr:[584,56,711,84],vb:[584,56,711,84]},Text_Caption_20:{type:19,from:1081,to:1170,rp:0,rpa:0,mdi:'Text_Caption_20c',retainState:false,immo:false,apsn:'Slide13717',iflbx:false,ipflbx:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[12668]}],stis:0,bstiid:12655,sipst:2,sicbs:false,sihhs:false,sihds:false,isDD:false},Text_Caption_20c:{b:[574,49,721,84],uid:12668,sr:cp.fd,ip:'dr/Text_Caption_20.png',dn:'Text_Caption_20',visible:0,effectiveVi:1,JSONEffectData:false,accstr:'VALUES ',traccstr:'',ti:-1,acclng:'',vbwr:[574,49,721,84],vb:[574,49,721,84]},si12677:{type:612,from:1081,to:1170,rp:0,rpa:0,mdi:'si12677c',retainState:false,immo:false,apsn:'Slide13717',JSONTT_4:[],cpa:true,oca:'cp.show("SmartShape_WheelInfo_53");\
cp.changeState("SmartShape_WheelInfo_53","Values");',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,uab:1,chfn:cp.ch,osc:'',osct:0,ofc:'',ofct:0,pa:1099,enabled:1,ma:-1,pfc:1,dclk:false,amc:true,eh:cp.cbKH,siq:false,sat:true,trin:0,trout:0,bstin:'SmartShape_29',stl:[{stn:'Normal',stt:0,stsi:[12677]}],stis:0,bstiid:12655,sipst:1,sicbs:true,sihhs:true,sihds:true,isDD:false},si12677c:{b:[584,56,711,84],uid:12677,dn:'si12677',visible:0,effectiveVi:1,JSONEffectData:false,accstr:' ',traccstr:'',ti:2500,acclng:'',sc:'#ff0000',sw:0,ss:0,fa:100,bc:'#ff6b6a',p0:[[0],[1,584,56],[2,584,84],[2,711,84],[2,711,56],[2,584,56],[4]],svg:false,vbwr:[584,56,711,84],vb:[584,56,711,84]},Text_Caption_21:{type:19,from:1081,to:1170,rp:0,rpa:0,mdi:'Text_Caption_21c',retainState:false,immo:false,apsn:'Slide13717',iflbx:false,ipflbx:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[12681]}],stis:0,bstiid:12655,sipst:1,sicbs:false,sihhs:false,sihds:false,isDD:false},Text_Caption_21c:{b:[574,49,721,84],uid:12681,sr:cp.fd,ip:'dr/Text_Caption_21.png',dn:'Text_Caption_21',visible:0,effectiveVi:1,JSONEffectData:false,accstr:'VALUES ',traccstr:'',ti:-1,acclng:'',vbwr:[574,49,721,84],vb:[574,49,721,84]},si12690:{type:612,from:1081,to:1170,rp:0,rpa:0,mdi:'si12690c',retainState:false,immo:false,apsn:'Slide13717',JSONTT_4:[],cpa:true,oca:'cp.show("SmartShape_WheelInfo_53");\
cp.changeState("SmartShape_WheelInfo_53","Values");',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,uab:1,chfn:cp.ch,osc:'',osct:0,ofc:'',ofct:0,pa:1099,enabled:1,ma:-1,pfc:1,dclk:false,amc:true,eh:cp.cbKH,siq:false,sat:true,trin:0,trout:0,bstin:'SmartShape_29',stl:[{stn:'Normal',stt:0,stsi:[12690]}],stis:0,bstiid:12655,sipst:10,sicbs:true,sihhs:true,sihds:true,isDD:false},si12690c:{b:[584,56,711,84],uid:12690,dn:'si12690',visible:0,effectiveVi:1,JSONEffectData:false,accstr:' ',traccstr:'',ti:2500,acclng:'',sc:'#1a1a1a',sw:0,ss:0,fa:0,bc:'#e6e6e6',p0:[[0],[1,584,56],[2,584,84],[2,711,84],[2,711,56],[2,584,56],[4]],svg:false,vbwr:[584,56,711,84],vb:[584,56,711,84]},SmartShape_30:{type:612,from:1081,to:1170,rp:0,rpa:0,mdi:'SmartShape_30c',retainState:false,immo:false,apsn:'Slide13717',JSONTT_4:[],cpa:true,oca:'cp.jumpToNextSlide();',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[12707]}],stis:0,bstiid:12655,sipst:10,sicbs:false,sihhs:false,sihds:false,isDD:false},SmartShape_30c:{b:[718,59,741,83],uid:12707,dn:'SmartShape_30',visible:0,effectiveVi:1,JSONEffectData:false,accstr:' ',traccstr:'',ti:-1,acclng:'',sc:'#000000',sw:0,ss:0,fa:100,bc:'#666666',p0:[[0],[1,718,59],[2,718,83],[2,741,83],[2,741,59],[2,718,59],[4]],svg:false,vbwr:[718,59,741,83],vb:[718,59,741,83]},Image_29:{type:15,from:1081,to:1170,rp:0,rpa:0,mdi:'Image_29c',retainState:false,immo:false,apsn:'Slide13717',JSONTT_4:[],cpa:true,oca:'cp.jumpToNextSlide();',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[12718]}],stis:0,bstiid:12655,sipst:10,sicbs:false,sihhs:false,sihds:false,isDD:false},Image_29c:{b:[721,63,737,77],uid:12718,sr:cp.fd,ip:'dr/12710_16_14.png',dn:'Image_29',visible:0,effectiveVi:1,JSONEffectData:false,accstr:'Image ',traccstr:'',ti:-1,acclng:'',vbwr:[721,63,737,77],vb:[721,63,737,77]},SmartShape_31:{type:612,from:1081,to:1170,rp:0,rpa:0,mdi:'SmartShape_31c',retainState:false,immo:false,apsn:'Slide13717',JSONTT_4:[],cpa:true,oca:'cp.show("SmartShape_WheelInfo_53");\
cp.changeState("SmartShape_WheelInfo_53","Relationships");',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,uab:1,chfn:cp.ch,osc:'',osct:0,ofc:'',ofct:0,pa:1099,enabled:1,ma:-1,pfc:1,dclk:false,amc:true,eh:cp.cbKH,siq:false,sat:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[12738]},{stn:'RollOver',stt:2,stsi:[12747,12751]},{stn:'Down',stt:1,stsi:[12760,12764]},{stn:'Visited',stt:10,stsi:[12773,12784,12792]}],stis:0,bstiid:-1,sipst:0,sicbs:false,sihhs:true,sihds:true,stc:['SmartShape_31','si12747','si12760','si12773'],isDD:false},SmartShape_31c:{b:[734,98,860,126],uid:12738,dn:'SmartShape_31',visible:1,effectiveVi:1,JSONEffectData:false,accstr:' ',traccstr:'',ti:2500,acclng:'',sc:'#1a1a1a',sw:0,ss:0,fa:0,bc:'#e6e6e6',p0:[[0],[1,734,98],[2,734,126],[2,860.00,126],[2,860.00,98],[2,734,98],[4]],svg:false,vbwr:[734,98,860,126],vb:[734,98,860,126]},si12747:{type:612,from:1081,to:1170,rp:0,rpa:0,mdi:'si12747c',retainState:false,immo:false,apsn:'Slide13717',JSONTT_4:[],cpa:true,oca:'cp.show("SmartShape_WheelInfo_53");\
cp.changeState("SmartShape_WheelInfo_53","Relationships");',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,uab:1,chfn:cp.ch,osc:'',osct:0,ofc:'',ofct:0,pa:1099,enabled:1,ma:-1,pfc:1,dclk:false,amc:true,eh:cp.cbKH,siq:false,sat:true,trin:0,trout:0,bstin:'SmartShape_31',stl:[{stn:'Normal',stt:0,stsi:[12747]}],stis:0,bstiid:12738,sipst:2,sicbs:true,sihhs:true,sihds:true,isDD:false},si12747c:{b:[734,98,860,126],uid:12747,dn:'si12747',visible:0,effectiveVi:1,JSONEffectData:false,accstr:' ',traccstr:'',ti:2500,acclng:'',sc:'#ff0000',sw:0,ss:0,fa:100,bc:'#ff9e9c',p0:[[0],[1,734,98],[2,734,126],[2,860.00,126],[2,860.00,98],[2,734,98],[4]],svg:false,vbwr:[734,98,860,126],vb:[734,98,860,126]},Text_Caption_22:{type:19,from:1081,to:1170,rp:0,rpa:0,mdi:'Text_Caption_22c',retainState:false,immo:false,apsn:'Slide13717',iflbx:false,ipflbx:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[12751]}],stis:0,bstiid:12738,sipst:2,sicbs:false,sihhs:false,sihds:false,isDD:false},Text_Caption_22c:{b:[724,91,871,126],uid:12751,sr:cp.fd,ip:'dr/Text_Caption_22.png',dn:'Text_Caption_22',visible:0,effectiveVi:1,JSONEffectData:false,accstr:'RELATIONSHIPS ',traccstr:'',ti:-1,acclng:'',vbwr:[724,91,871,126],vb:[724,91,871,126]},si12760:{type:612,from:1081,to:1170,rp:0,rpa:0,mdi:'si12760c',retainState:false,immo:false,apsn:'Slide13717',JSONTT_4:[],cpa:true,oca:'cp.show("SmartShape_WheelInfo_53");\
cp.changeState("SmartShape_WheelInfo_53","Relationships");',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,uab:1,chfn:cp.ch,osc:'',osct:0,ofc:'',ofct:0,pa:1099,enabled:1,ma:-1,pfc:1,dclk:false,amc:true,eh:cp.cbKH,siq:false,sat:true,trin:0,trout:0,bstin:'SmartShape_31',stl:[{stn:'Normal',stt:0,stsi:[12760]}],stis:0,bstiid:12738,sipst:1,sicbs:true,sihhs:true,sihds:true,isDD:false},si12760c:{b:[734,98,860,126],uid:12760,dn:'si12760',visible:0,effectiveVi:1,JSONEffectData:false,accstr:' ',traccstr:'',ti:2500,acclng:'',sc:'#ff0000',sw:0,ss:0,fa:100,bc:'#ff6b6a',p0:[[0],[1,734,98],[2,734,126],[2,860.00,126],[2,860.00,98],[2,734,98],[4]],svg:false,vbwr:[734,98,860,126],vb:[734,98,860,126]},Text_Caption_23:{type:19,from:1081,to:1170,rp:0,rpa:0,mdi:'Text_Caption_23c',retainState:false,immo:false,apsn:'Slide13717',iflbx:false,ipflbx:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[12764]}],stis:0,bstiid:12738,sipst:1,sicbs:false,sihhs:false,sihds:false,isDD:false},Text_Caption_23c:{b:[724,91,871,126],uid:12764,sr:cp.fd,ip:'dr/Text_Caption_23.png',dn:'Text_Caption_23',visible:0,effectiveVi:1,JSONEffectData:false,accstr:'RELATIONSHIPS ',traccstr:'',ti:-1,acclng:'',vbwr:[724,91,871,126],vb:[724,91,871,126]},si12773:{type:612,from:1081,to:1170,rp:0,rpa:0,mdi:'si12773c',retainState:false,immo:false,apsn:'Slide13717',JSONTT_4:[],cpa:true,oca:'cp.show("SmartShape_WheelInfo_53");\
cp.changeState("SmartShape_WheelInfo_53","Relationships");',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,uab:1,chfn:cp.ch,osc:'',osct:0,ofc:'',ofct:0,pa:1099,enabled:1,ma:-1,pfc:1,dclk:false,amc:true,eh:cp.cbKH,siq:false,sat:true,trin:0,trout:0,bstin:'SmartShape_31',stl:[{stn:'Normal',stt:0,stsi:[12773]}],stis:0,bstiid:12738,sipst:10,sicbs:true,sihhs:true,sihds:true,isDD:false},si12773c:{b:[734,98,860,126],uid:12773,dn:'si12773',visible:0,effectiveVi:1,JSONEffectData:false,accstr:' ',traccstr:'',ti:2500,acclng:'',sc:'#1a1a1a',sw:0,ss:0,fa:0,bc:'#e6e6e6',p0:[[0],[1,734,98],[2,734,126],[2,860.00,126],[2,860.00,98],[2,734,98],[4]],svg:false,vbwr:[734,98,860,126],vb:[734,98,860,126]},SmartShape_32:{type:612,from:1081,to:1170,rp:0,rpa:0,mdi:'SmartShape_32c',retainState:false,immo:false,apsn:'Slide13717',JSONTT_4:[],cpa:true,oca:'cp.jumpToNextSlide();',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[12784]}],stis:0,bstiid:12738,sipst:10,sicbs:false,sihhs:false,sihds:false,isDD:false},SmartShape_32c:{b:[868,101,891,125],uid:12784,dn:'SmartShape_32',visible:0,effectiveVi:1,JSONEffectData:false,accstr:' ',traccstr:'',ti:-1,acclng:'',sc:'#000000',sw:0,ss:0,fa:100,bc:'#666666',p0:[[0],[1,868,101],[2,868,125],[2,891,125],[2,891,101],[2,868,101],[4]],svg:false,vbwr:[868,101,891,125],vb:[868,101,891,125]},Image_30:{type:15,from:1081,to:1170,rp:0,rpa:0,mdi:'Image_30c',retainState:false,immo:false,apsn:'Slide13717',JSONTT_4:[],cpa:true,oca:'cp.jumpToNextSlide();',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[12792]}],stis:0,bstiid:12738,sipst:10,sicbs:false,sihhs:false,sihds:false,isDD:false},Image_30c:{b:[871,105,887,119],uid:12792,sr:cp.fd,ip:'dr/12710_16_14.png',dn:'Image_30',visible:0,effectiveVi:1,JSONEffectData:false,accstr:'Image ',traccstr:'',ti:-1,acclng:'',vbwr:[871,105,887,119],vb:[871,105,887,119]},SmartShape_33:{type:612,from:1081,to:1170,rp:0,rpa:0,mdi:'SmartShape_33c',retainState:false,immo:false,apsn:'Slide13717',JSONTT_4:[],cpa:true,oca:'cp.show("SmartShape_WheelInfo_53");\
cp.changeState("SmartShape_WheelInfo_53","Sexual_Activity");',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,uab:1,chfn:cp.ch,osc:'',osct:0,ofc:'',ofct:0,pa:1099,enabled:1,ma:-1,pfc:1,dclk:false,amc:true,eh:cp.cbKH,siq:false,sat:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[12812]},{stn:'RollOver',stt:2,stsi:[12821,12825]},{stn:'Down',stt:1,stsi:[12834,12838]},{stn:'Visited',stt:10,stsi:[12847,12858,12866]}],stis:0,bstiid:-1,sipst:0,sicbs:false,sihhs:true,sihds:true,stc:['SmartShape_33','si12821','si12834','si12847'],isDD:false},SmartShape_33c:{b:[828,197,955,225],uid:12812,dn:'SmartShape_33',visible:1,effectiveVi:1,JSONEffectData:false,accstr:' ',traccstr:'',ti:2500,acclng:'',sc:'#1a1a1a',sw:0,ss:0,fa:0,bc:'#e6e6e6',p0:[[0],[1,828,197],[2,828,225],[2,955,225],[2,955,197],[2,828,197],[4]],svg:false,vbwr:[828,197,955,225],vb:[828,197,955,225]},si12821:{type:612,from:1081,to:1170,rp:0,rpa:0,mdi:'si12821c',retainState:false,immo:false,apsn:'Slide13717',JSONTT_4:[],cpa:true,oca:'cp.show("SmartShape_WheelInfo_53");\
cp.changeState("SmartShape_WheelInfo_53","Sexual_Activity");',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,uab:1,chfn:cp.ch,osc:'',osct:0,ofc:'',ofct:0,pa:1099,enabled:1,ma:-1,pfc:1,dclk:false,amc:true,eh:cp.cbKH,siq:false,sat:true,trin:0,trout:0,bstin:'SmartShape_33',stl:[{stn:'Normal',stt:0,stsi:[12821]}],stis:0,bstiid:12812,sipst:2,sicbs:true,sihhs:true,sihds:true,isDD:false},si12821c:{b:[828,197,955,225],uid:12821,dn:'si12821',visible:0,effectiveVi:1,JSONEffectData:false,accstr:' ',traccstr:'',ti:2500,acclng:'',sc:'#ff0000',sw:0,ss:0,fa:100,bc:'#ff9e9c',p0:[[0],[1,828,197],[2,828,225],[2,955,225],[2,955,197],[2,828,197],[4]],svg:false,vbwr:[828,197,955,225],vb:[828,197,955,225]},Text_Caption_24:{type:19,from:1081,to:1170,rp:0,rpa:0,mdi:'Text_Caption_24c',retainState:false,immo:false,apsn:'Slide13717',iflbx:false,ipflbx:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[12825]}],stis:0,bstiid:12812,sipst:2,sicbs:false,sihhs:false,sihds:false,isDD:false},Text_Caption_24c:{b:[818,190,965,225],uid:12825,sr:cp.fd,ip:'dr/Text_Caption_24.png',dn:'Text_Caption_24',visible:0,effectiveVi:1,JSONEffectData:false,accstr:'SEXUAL ACTIVITY ',traccstr:'',ti:-1,acclng:'',vbwr:[818,190,965,225],vb:[818,190,965,225]},si12834:{type:612,from:1081,to:1170,rp:0,rpa:0,mdi:'si12834c',retainState:false,immo:false,apsn:'Slide13717',JSONTT_4:[],cpa:true,oca:'cp.show("SmartShape_WheelInfo_53");\
cp.changeState("SmartShape_WheelInfo_53","Sexual_Activity");',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,uab:1,chfn:cp.ch,osc:'',osct:0,ofc:'',ofct:0,pa:1099,enabled:1,ma:-1,pfc:1,dclk:false,amc:true,eh:cp.cbKH,siq:false,sat:true,trin:0,trout:0,bstin:'SmartShape_33',stl:[{stn:'Normal',stt:0,stsi:[12834]}],stis:0,bstiid:12812,sipst:1,sicbs:true,sihhs:true,sihds:true,isDD:false},si12834c:{b:[828,197,955,225],uid:12834,dn:'si12834',visible:0,effectiveVi:1,JSONEffectData:false,accstr:' ',traccstr:'',ti:2500,acclng:'',sc:'#ff0000',sw:0,ss:0,fa:100,bc:'#ff6b6a',p0:[[0],[1,828,197],[2,828,225],[2,955,225],[2,955,197],[2,828,197],[4]],svg:false,vbwr:[828,197,955,225],vb:[828,197,955,225]},Text_Caption_25:{type:19,from:1081,to:1170,rp:0,rpa:0,mdi:'Text_Caption_25c',retainState:false,immo:false,apsn:'Slide13717',iflbx:false,ipflbx:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[12838]}],stis:0,bstiid:12812,sipst:1,sicbs:false,sihhs:false,sihds:false,isDD:false},Text_Caption_25c:{b:[818,190,965,225],uid:12838,sr:cp.fd,ip:'dr/Text_Caption_25.png',dn:'Text_Caption_25',visible:0,effectiveVi:1,JSONEffectData:false,accstr:'SEXUAL ACTIVITY ',traccstr:'',ti:-1,acclng:'',vbwr:[818,190,965,225],vb:[818,190,965,225]},si12847:{type:612,from:1081,to:1170,rp:0,rpa:0,mdi:'si12847c',retainState:false,immo:false,apsn:'Slide13717',JSONTT_4:[],cpa:true,oca:'cp.show("SmartShape_WheelInfo_53");\
cp.changeState("SmartShape_WheelInfo_53","Sexual_Activity");',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,uab:1,chfn:cp.ch,osc:'',osct:0,ofc:'',ofct:0,pa:1099,enabled:1,ma:-1,pfc:1,dclk:false,amc:true,eh:cp.cbKH,siq:false,sat:true,trin:0,trout:0,bstin:'SmartShape_33',stl:[{stn:'Normal',stt:0,stsi:[12847]}],stis:0,bstiid:12812,sipst:10,sicbs:true,sihhs:true,sihds:true,isDD:false},si12847c:{b:[828,197,955,225],uid:12847,dn:'si12847',visible:0,effectiveVi:1,JSONEffectData:false,accstr:' ',traccstr:'',ti:2500,acclng:'',sc:'#1a1a1a',sw:0,ss:0,fa:0,bc:'#e6e6e6',p0:[[0],[1,828,197],[2,828,225],[2,955,225],[2,955,197],[2,828,197],[4]],svg:false,vbwr:[828,197,955,225],vb:[828,197,955,225]},SmartShape_34:{type:612,from:1081,to:1170,rp:0,rpa:0,mdi:'SmartShape_34c',retainState:false,immo:false,apsn:'Slide13717',JSONTT_4:[],cpa:true,oca:'cp.jumpToNextSlide();',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[12858]}],stis:0,bstiid:12812,sipst:10,sicbs:false,sihhs:false,sihds:false,isDD:false},SmartShape_34c:{b:[962,200,985,224],uid:12858,dn:'SmartShape_34',visible:0,effectiveVi:1,JSONEffectData:false,accstr:' ',traccstr:'',ti:-1,acclng:'',sc:'#000000',sw:0,ss:0,fa:100,bc:'#666666',p0:[[0],[1,962,200.00],[2,962,224],[2,985,224],[2,985,200.00],[2,962,200.00],[4]],svg:false,vbwr:[962,200,985,224],vb:[962,200,985,224]},Image_31:{type:15,from:1081,to:1170,rp:0,rpa:0,mdi:'Image_31c',retainState:false,immo:false,apsn:'Slide13717',JSONTT_4:[],cpa:true,oca:'cp.jumpToNextSlide();',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[12866]}],stis:0,bstiid:12812,sipst:10,sicbs:false,sihhs:false,sihds:false,isDD:false},Image_31c:{b:[965,204,981,218],uid:12866,sr:cp.fd,ip:'dr/12710_16_14.png',dn:'Image_31',visible:0,effectiveVi:1,JSONEffectData:false,accstr:'Image ',traccstr:'',ti:-1,acclng:'',vbwr:[965,204,981,218],vb:[965,204,981,218]},SmartShape_35:{type:612,from:1081,to:1170,rp:0,rpa:0,mdi:'SmartShape_35c',retainState:false,immo:false,apsn:'Slide13717',JSONTT_4:[],cpa:true,oca:'cp.show("SmartShape_WheelInfo_53");\
cp.changeState("SmartShape_WheelInfo_53","Communication");',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,uab:1,chfn:cp.ch,osc:'',osct:0,ofc:'',ofct:0,pa:1099,enabled:1,ma:-1,pfc:1,dclk:false,amc:true,eh:cp.cbKH,siq:false,sat:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[12886]},{stn:'RollOver',stt:2,stsi:[12895,12899]},{stn:'Down',stt:1,stsi:[12908,12912]},{stn:'Visited',stt:10,stsi:[12921,12932,12940]}],stis:0,bstiid:-1,sipst:0,sicbs:false,sihhs:true,sihds:true,stc:['SmartShape_35','si12895','si12908','si12921'],isDD:false},SmartShape_35c:{b:[859,342,989,370],uid:12886,dn:'SmartShape_35',visible:1,effectiveVi:1,JSONEffectData:false,accstr:' ',traccstr:'',ti:2500,acclng:'',sc:'#1a1a1a',sw:0,ss:0,fa:0,bc:'#e6e6e6',p0:[[0],[1,859,342],[2,859,370.00],[2,989,370.00],[2,989,342],[2,859,342],[4]],svg:false,vbwr:[859,342,989,370],vb:[859,342,989,370]},si12895:{type:612,from:1081,to:1170,rp:0,rpa:0,mdi:'si12895c',retainState:false,immo:false,apsn:'Slide13717',JSONTT_4:[],cpa:true,oca:'cp.show("SmartShape_WheelInfo_53");\
cp.changeState("SmartShape_WheelInfo_53","Communication");',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,uab:1,chfn:cp.ch,osc:'',osct:0,ofc:'',ofct:0,pa:1099,enabled:1,ma:-1,pfc:1,dclk:false,amc:true,eh:cp.cbKH,siq:false,sat:true,trin:0,trout:0,bstin:'SmartShape_35',stl:[{stn:'Normal',stt:0,stsi:[12895]}],stis:0,bstiid:12886,sipst:2,sicbs:true,sihhs:true,sihds:true,isDD:false},si12895c:{b:[859,342,989,370],uid:12895,dn:'si12895',visible:0,effectiveVi:1,JSONEffectData:false,accstr:' ',traccstr:'',ti:2500,acclng:'',sc:'#ff0000',sw:0,ss:0,fa:100,bc:'#ff9e9c',p0:[[0],[1,859,342],[2,859,370.00],[2,989,370.00],[2,989,342],[2,859,342],[4]],svg:false,vbwr:[859,342,989,370],vb:[859,342,989,370]},Text_Caption_26:{type:19,from:1081,to:1170,rp:0,rpa:0,mdi:'Text_Caption_26c',retainState:false,immo:false,apsn:'Slide13717',iflbx:false,ipflbx:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[12899]}],stis:0,bstiid:12886,sipst:2,sicbs:false,sihhs:false,sihds:false,isDD:false},Text_Caption_26c:{b:[849,335,996,370],uid:12899,sr:cp.fd,ip:'dr/Text_Caption_26.png',dn:'Text_Caption_26',visible:0,effectiveVi:1,JSONEffectData:false,accstr:'COMMUNICATION ',traccstr:'',ti:-1,acclng:'',vbwr:[849,335,996,370],vb:[849,335,996,370]},si12908:{type:612,from:1081,to:1170,rp:0,rpa:0,mdi:'si12908c',retainState:false,immo:false,apsn:'Slide13717',JSONTT_4:[],cpa:true,oca:'cp.show("SmartShape_WheelInfo_53");\
cp.changeState("SmartShape_WheelInfo_53","Communication");',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,uab:1,chfn:cp.ch,osc:'',osct:0,ofc:'',ofct:0,pa:1099,enabled:1,ma:-1,pfc:1,dclk:false,amc:true,eh:cp.cbKH,siq:false,sat:true,trin:0,trout:0,bstin:'SmartShape_35',stl:[{stn:'Normal',stt:0,stsi:[12908]}],stis:0,bstiid:12886,sipst:1,sicbs:true,sihhs:true,sihds:true,isDD:false},si12908c:{b:[859,342,989,370],uid:12908,dn:'si12908',visible:0,effectiveVi:1,JSONEffectData:false,accstr:' ',traccstr:'',ti:2500,acclng:'',sc:'#ff0000',sw:0,ss:0,fa:100,bc:'#ff6b6a',p0:[[0],[1,859,342],[2,859,370.00],[2,989,370.00],[2,989,342],[2,859,342],[4]],svg:false,vbwr:[859,342,989,370],vb:[859,342,989,370]},Text_Caption_27:{type:19,from:1081,to:1170,rp:0,rpa:0,mdi:'Text_Caption_27c',retainState:false,immo:false,apsn:'Slide13717',iflbx:false,ipflbx:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[12912]}],stis:0,bstiid:12886,sipst:1,sicbs:false,sihhs:false,sihds:false,isDD:false},Text_Caption_27c:{b:[849,335,996,370],uid:12912,sr:cp.fd,ip:'dr/Text_Caption_27.png',dn:'Text_Caption_27',visible:0,effectiveVi:1,JSONEffectData:false,accstr:'COMMUNICATION ',traccstr:'',ti:-1,acclng:'',vbwr:[849,335,996,370],vb:[849,335,996,370]},si12921:{type:612,from:1081,to:1170,rp:0,rpa:0,mdi:'si12921c',retainState:false,immo:false,apsn:'Slide13717',JSONTT_4:[],cpa:true,oca:'cp.show("SmartShape_WheelInfo_53");\
cp.changeState("SmartShape_WheelInfo_53","Communication");',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,uab:1,chfn:cp.ch,osc:'',osct:0,ofc:'',ofct:0,pa:1099,enabled:1,ma:-1,pfc:1,dclk:false,amc:true,eh:cp.cbKH,siq:false,sat:true,trin:0,trout:0,bstin:'SmartShape_35',stl:[{stn:'Normal',stt:0,stsi:[12921]}],stis:0,bstiid:12886,sipst:10,sicbs:true,sihhs:true,sihds:true,isDD:false},si12921c:{b:[859,342,989,370],uid:12921,dn:'si12921',visible:0,effectiveVi:1,JSONEffectData:false,accstr:' ',traccstr:'',ti:2500,acclng:'',sc:'#1a1a1a',sw:0,ss:0,fa:0,bc:'#e6e6e6',p0:[[0],[1,859,342],[2,859,370.00],[2,989,370.00],[2,989,342],[2,859,342],[4]],svg:false,vbwr:[859,342,989,370],vb:[859,342,989,370]},SmartShape_36:{type:612,from:1081,to:1170,rp:0,rpa:0,mdi:'SmartShape_36c',retainState:false,immo:false,apsn:'Slide13717',JSONTT_4:[],cpa:true,oca:'cp.jumpToNextSlide();',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[12932]}],stis:0,bstiid:12886,sipst:10,sicbs:false,sihhs:false,sihds:false,isDD:false},SmartShape_36c:{b:[993,345,1016,369],uid:12932,dn:'SmartShape_36',visible:0,effectiveVi:1,JSONEffectData:false,accstr:' ',traccstr:'',ti:-1,acclng:'',sc:'#000000',sw:0,ss:0,fa:100,bc:'#666666',p0:[[0],[1,993,345],[2,993,369],[2,1016,369],[2,1016,345],[2,993,345],[4]],svg:false,vbwr:[993,345,1016,369],vb:[993,345,1016,369]},Image_32:{type:15,from:1081,to:1170,rp:0,rpa:0,mdi:'Image_32c',retainState:false,immo:false,apsn:'Slide13717',JSONTT_4:[],cpa:true,oca:'cp.jumpToNextSlide();',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[12940]}],stis:0,bstiid:12886,sipst:10,sicbs:false,sihhs:false,sihds:false,isDD:false},Image_32c:{b:[996,349,1012,363],uid:12940,sr:cp.fd,ip:'dr/12710_16_14.png',dn:'Image_32',visible:0,effectiveVi:1,JSONEffectData:false,accstr:'Image ',traccstr:'',ti:-1,acclng:'',vbwr:[996,349,1012,363],vb:[996,349,1012,363]},SmartShape_37:{type:612,from:1081,to:1170,rp:0,rpa:0,mdi:'SmartShape_37c',retainState:false,immo:false,apsn:'Slide13717',JSONTT_4:[],cpa:true,oca:'cp.show("SmartShape_WheelInfo_53");\
cp.changeState("SmartShape_WheelInfo_53","Socialization");',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,uab:1,chfn:cp.ch,osc:'',osct:0,ofc:'',ofct:0,pa:1099,enabled:1,ma:-1,pfc:1,dclk:false,amc:true,eh:cp.cbKH,siq:false,sat:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[12960]},{stn:'RollOver',stt:2,stsi:[12969,12973]},{stn:'Down',stt:1,stsi:[12982,12986]},{stn:'Visited',stt:10,stsi:[12995,13006,13014]}],stis:0,bstiid:-1,sipst:0,sicbs:false,sihhs:true,sihds:true,stc:['SmartShape_37','si12969','si12982','si12995'],isDD:false},SmartShape_37c:{b:[828,479,958,507],uid:12960,dn:'SmartShape_37',visible:1,effectiveVi:1,JSONEffectData:false,accstr:' ',traccstr:'',ti:2500,acclng:'',sc:'#1a1a1a',sw:0,ss:0,fa:0,bc:'#e6e6e6',p0:[[0],[1,828,479],[2,828,507],[2,958,507],[2,958,479],[2,828,479],[4]],svg:false,vbwr:[828,479,958,507],vb:[828,479,958,507]},si12969:{type:612,from:1081,to:1170,rp:0,rpa:0,mdi:'si12969c',retainState:false,immo:false,apsn:'Slide13717',JSONTT_4:[],cpa:true,oca:'cp.show("SmartShape_WheelInfo_53");\
cp.changeState("SmartShape_WheelInfo_53","Socialization");',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,uab:1,chfn:cp.ch,osc:'',osct:0,ofc:'',ofct:0,pa:1099,enabled:1,ma:-1,pfc:1,dclk:false,amc:true,eh:cp.cbKH,siq:false,sat:true,trin:0,trout:0,bstin:'SmartShape_37',stl:[{stn:'Normal',stt:0,stsi:[12969]}],stis:0,bstiid:12960,sipst:2,sicbs:true,sihhs:true,sihds:true,isDD:false},si12969c:{b:[828,479,958,507],uid:12969,dn:'si12969',visible:0,effectiveVi:1,JSONEffectData:false,accstr:' ',traccstr:'',ti:2500,acclng:'',sc:'#ff0000',sw:0,ss:0,fa:100,bc:'#ff9e9c',p0:[[0],[1,828,479],[2,828,507],[2,958,507],[2,958,479],[2,828,479],[4]],svg:false,vbwr:[828,479,958,507],vb:[828,479,958,507]},Text_Caption_28:{type:19,from:1081,to:1170,rp:0,rpa:0,mdi:'Text_Caption_28c',retainState:false,immo:false,apsn:'Slide13717',iflbx:false,ipflbx:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[12973]}],stis:0,bstiid:12960,sipst:2,sicbs:false,sihhs:false,sihds:false,isDD:false},Text_Caption_28c:{b:[818,472,965,507],uid:12973,sr:cp.fd,ip:'dr/Text_Caption_28.png',dn:'Text_Caption_28',visible:0,effectiveVi:1,JSONEffectData:false,accstr:'SOCIALIZATION ',traccstr:'',ti:-1,acclng:'',vbwr:[818,472,965,507],vb:[818,472,965,507]},si12982:{type:612,from:1081,to:1170,rp:0,rpa:0,mdi:'si12982c',retainState:false,immo:false,apsn:'Slide13717',JSONTT_4:[],cpa:true,oca:'cp.show("SmartShape_WheelInfo_53");\
cp.changeState("SmartShape_WheelInfo_53","Socialization");',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,uab:1,chfn:cp.ch,osc:'',osct:0,ofc:'',ofct:0,pa:1099,enabled:1,ma:-1,pfc:1,dclk:false,amc:true,eh:cp.cbKH,siq:false,sat:true,trin:0,trout:0,bstin:'SmartShape_37',stl:[{stn:'Normal',stt:0,stsi:[12982]}],stis:0,bstiid:12960,sipst:1,sicbs:true,sihhs:true,sihds:true,isDD:false},si12982c:{b:[828,479,958,507],uid:12982,dn:'si12982',visible:0,effectiveVi:1,JSONEffectData:false,accstr:' ',traccstr:'',ti:2500,acclng:'',sc:'#ff0000',sw:0,ss:0,fa:100,bc:'#ff6b6a',p0:[[0],[1,828,479],[2,828,507],[2,958,507],[2,958,479],[2,828,479],[4]],svg:false,vbwr:[828,479,958,507],vb:[828,479,958,507]},Text_Caption_29:{type:19,from:1081,to:1170,rp:0,rpa:0,mdi:'Text_Caption_29c',retainState:false,immo:false,apsn:'Slide13717',iflbx:false,ipflbx:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[12986]}],stis:0,bstiid:12960,sipst:1,sicbs:false,sihhs:false,sihds:false,isDD:false},Text_Caption_29c:{b:[818,472,965,507],uid:12986,sr:cp.fd,ip:'dr/Text_Caption_29.png',dn:'Text_Caption_29',visible:0,effectiveVi:1,JSONEffectData:false,accstr:'SOCIALIZATION ',traccstr:'',ti:-1,acclng:'',vbwr:[818,472,965,507],vb:[818,472,965,507]},si12995:{type:612,from:1081,to:1170,rp:0,rpa:0,mdi:'si12995c',retainState:false,immo:false,apsn:'Slide13717',JSONTT_4:[],cpa:true,oca:'cp.show("SmartShape_WheelInfo_53");\
cp.changeState("SmartShape_WheelInfo_53","Socialization");',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,uab:1,chfn:cp.ch,osc:'',osct:0,ofc:'',ofct:0,pa:1099,enabled:1,ma:-1,pfc:1,dclk:false,amc:true,eh:cp.cbKH,siq:false,sat:true,trin:0,trout:0,bstin:'SmartShape_37',stl:[{stn:'Normal',stt:0,stsi:[12995]}],stis:0,bstiid:12960,sipst:10,sicbs:true,sihhs:true,sihds:true,isDD:false},si12995c:{b:[828,479,958,507],uid:12995,dn:'si12995',visible:0,effectiveVi:1,JSONEffectData:false,accstr:' ',traccstr:'',ti:2500,acclng:'',sc:'#1a1a1a',sw:0,ss:0,fa:0,bc:'#e6e6e6',p0:[[0],[1,828,479],[2,828,507],[2,958,507],[2,958,479],[2,828,479],[4]],svg:false,vbwr:[828,479,958,507],vb:[828,479,958,507]},SmartShape_38:{type:612,from:1081,to:1170,rp:0,rpa:0,mdi:'SmartShape_38c',retainState:false,immo:false,apsn:'Slide13717',JSONTT_4:[],cpa:true,oca:'cp.jumpToNextSlide();',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[13006]}],stis:0,bstiid:12960,sipst:10,sicbs:false,sihhs:false,sihds:false,isDD:false},SmartShape_38c:{b:[962,482,985,506],uid:13006,dn:'SmartShape_38',visible:0,effectiveVi:1,JSONEffectData:false,accstr:' ',traccstr:'',ti:-1,acclng:'',sc:'#000000',sw:0,ss:0,fa:100,bc:'#666666',p0:[[0],[1,962,482],[2,962,506],[2,985,506],[2,985,482],[2,962,482],[4]],svg:false,vbwr:[962,482,985,506],vb:[962,482,985,506]},Image_33:{type:15,from:1081,to:1170,rp:0,rpa:0,mdi:'Image_33c',retainState:false,immo:false,apsn:'Slide13717',JSONTT_4:[],cpa:true,oca:'cp.jumpToNextSlide();',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[13014]}],stis:0,bstiid:12960,sipst:10,sicbs:false,sihhs:false,sihds:false,isDD:false},Image_33c:{b:[965,486,981,500],uid:13014,sr:cp.fd,ip:'dr/12710_16_14.png',dn:'Image_33',visible:0,effectiveVi:1,JSONEffectData:false,accstr:'Image ',traccstr:'',ti:-1,acclng:'',vbwr:[965,486,981,500],vb:[965,486,981,500]},SmartShape_39:{type:612,from:1081,to:1170,rp:0,rpa:0,mdi:'SmartShape_39c',retainState:false,immo:false,apsn:'Slide13717',JSONTT_4:[],cpa:true,oca:'cp.show("SmartShape_WheelInfo_53");\
cp.changeState("SmartShape_WheelInfo_53","Self_Image");',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,uab:1,chfn:cp.ch,osc:'',osct:0,ofc:'',ofct:0,pa:1099,enabled:1,ma:-1,pfc:1,dclk:false,amc:true,eh:cp.cbKH,siq:false,sat:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[13034]},{stn:'RollOver',stt:2,stsi:[13043,13047]},{stn:'Down',stt:1,stsi:[13056,13060]},{stn:'Visited',stt:10,stsi:[13069,13080,13088]}],stis:0,bstiid:-1,sipst:0,sicbs:false,sihhs:true,sihds:true,stc:['SmartShape_39','si13043','si13056','si13069'],isDD:false},SmartShape_39c:{b:[726,581,856,609],uid:13034,dn:'SmartShape_39',visible:1,effectiveVi:1,JSONEffectData:false,accstr:' ',traccstr:'',ti:2500,acclng:'',sc:'#1a1a1a',sw:0,ss:0,fa:0,bc:'#e6e6e6',p0:[[0],[1,726,581],[2,726,609],[2,856,609],[2,856,581],[2,726,581],[4]],svg:false,vbwr:[726,581,856,609],vb:[726,581,856,609]},si13043:{type:612,from:1081,to:1170,rp:0,rpa:0,mdi:'si13043c',retainState:false,immo:false,apsn:'Slide13717',JSONTT_4:[],cpa:true,oca:'cp.show("SmartShape_WheelInfo_53");\
cp.changeState("SmartShape_WheelInfo_53","Self_Image");',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,uab:1,chfn:cp.ch,osc:'',osct:0,ofc:'',ofct:0,pa:1099,enabled:1,ma:-1,pfc:1,dclk:false,amc:true,eh:cp.cbKH,siq:false,sat:true,trin:0,trout:0,bstin:'SmartShape_39',stl:[{stn:'Normal',stt:0,stsi:[13043]}],stis:0,bstiid:13034,sipst:2,sicbs:true,sihhs:true,sihds:true,isDD:false},si13043c:{b:[726,581,856,609],uid:13043,dn:'si13043',visible:0,effectiveVi:1,JSONEffectData:false,accstr:' ',traccstr:'',ti:2500,acclng:'',sc:'#ff0000',sw:0,ss:0,fa:100,bc:'#ff9e9c',p0:[[0],[1,726,581],[2,726,609],[2,856,609],[2,856,581],[2,726,581],[4]],svg:false,vbwr:[726,581,856,609],vb:[726,581,856,609]},Text_Caption_30:{type:19,from:1081,to:1170,rp:0,rpa:0,mdi:'Text_Caption_30c',retainState:false,immo:false,apsn:'Slide13717',iflbx:false,ipflbx:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[13047]}],stis:0,bstiid:13034,sipst:2,sicbs:false,sihhs:false,sihds:false,isDD:false},Text_Caption_30c:{b:[716,574,863,609],uid:13047,sr:cp.fd,ip:'dr/Text_Caption_30.png',dn:'Text_Caption_30',visible:0,effectiveVi:1,JSONEffectData:false,accstr:'SELF IMAGE ',traccstr:'',ti:-1,acclng:'',vbwr:[716,574,863,609],vb:[716,574,863,609]},si13056:{type:612,from:1081,to:1170,rp:0,rpa:0,mdi:'si13056c',retainState:false,immo:false,apsn:'Slide13717',JSONTT_4:[],cpa:true,oca:'cp.show("SmartShape_WheelInfo_53");\
cp.changeState("SmartShape_WheelInfo_53","Self_Image");',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,uab:1,chfn:cp.ch,osc:'',osct:0,ofc:'',ofct:0,pa:1099,enabled:1,ma:-1,pfc:1,dclk:false,amc:true,eh:cp.cbKH,siq:false,sat:true,trin:0,trout:0,bstin:'SmartShape_39',stl:[{stn:'Normal',stt:0,stsi:[13056]}],stis:0,bstiid:13034,sipst:1,sicbs:true,sihhs:true,sihds:true,isDD:false},si13056c:{b:[726,581,856,609],uid:13056,dn:'si13056',visible:0,effectiveVi:1,JSONEffectData:false,accstr:' ',traccstr:'',ti:2500,acclng:'',sc:'#ff0000',sw:0,ss:0,fa:100,bc:'#ff6b6a',p0:[[0],[1,726,581],[2,726,609],[2,856,609],[2,856,581],[2,726,581],[4]],svg:false,vbwr:[726,581,856,609],vb:[726,581,856,609]},Text_Caption_31:{type:19,from:1081,to:1170,rp:0,rpa:0,mdi:'Text_Caption_31c',retainState:false,immo:false,apsn:'Slide13717',iflbx:false,ipflbx:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[13060]}],stis:0,bstiid:13034,sipst:1,sicbs:false,sihhs:false,sihds:false,isDD:false},Text_Caption_31c:{b:[716,574,863,609],uid:13060,sr:cp.fd,ip:'dr/Text_Caption_31.png',dn:'Text_Caption_31',visible:0,effectiveVi:1,JSONEffectData:false,accstr:'SELF IMAGE ',traccstr:'',ti:-1,acclng:'',vbwr:[716,574,863,609],vb:[716,574,863,609]},si13069:{type:612,from:1081,to:1170,rp:0,rpa:0,mdi:'si13069c',retainState:false,immo:false,apsn:'Slide13717',JSONTT_4:[],cpa:true,oca:'cp.show("SmartShape_WheelInfo_53");\
cp.changeState("SmartShape_WheelInfo_53","Self_Image");',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,uab:1,chfn:cp.ch,osc:'',osct:0,ofc:'',ofct:0,pa:1099,enabled:1,ma:-1,pfc:1,dclk:false,amc:true,eh:cp.cbKH,siq:false,sat:true,trin:0,trout:0,bstin:'SmartShape_39',stl:[{stn:'Normal',stt:0,stsi:[13069]}],stis:0,bstiid:13034,sipst:10,sicbs:true,sihhs:true,sihds:true,isDD:false},si13069c:{b:[726,581,856,609],uid:13069,dn:'si13069',visible:0,effectiveVi:1,JSONEffectData:false,accstr:' ',traccstr:'',ti:2500,acclng:'',sc:'#1a1a1a',sw:0,ss:0,fa:0,bc:'#e6e6e6',p0:[[0],[1,726,581],[2,726,609],[2,856,609],[2,856,581],[2,726,581],[4]],svg:false,vbwr:[726,581,856,609],vb:[726,581,856,609]},SmartShape_40:{type:612,from:1081,to:1170,rp:0,rpa:0,mdi:'SmartShape_40c',retainState:false,immo:false,apsn:'Slide13717',JSONTT_4:[],cpa:true,oca:'cp.jumpToNextSlide();',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[13080]}],stis:0,bstiid:13034,sipst:10,sicbs:false,sihhs:false,sihds:false,isDD:false},SmartShape_40c:{b:[860,584,883,608],uid:13080,dn:'SmartShape_40',visible:0,effectiveVi:1,JSONEffectData:false,accstr:' ',traccstr:'',ti:-1,acclng:'',sc:'#000000',sw:0,ss:0,fa:100,bc:'#666666',p0:[[0],[1,860.00,584],[2,860.00,608],[2,883,608],[2,883,584],[2,860.00,584],[4]],svg:false,vbwr:[860,584,883,608],vb:[860,584,883,608]},Image_34:{type:15,from:1081,to:1170,rp:0,rpa:0,mdi:'Image_34c',retainState:false,immo:false,apsn:'Slide13717',JSONTT_4:[],cpa:true,oca:'cp.jumpToNextSlide();',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[13088]}],stis:0,bstiid:13034,sipst:10,sicbs:false,sihhs:false,sihds:false,isDD:false},Image_34c:{b:[863,588,879,602],uid:13088,sr:cp.fd,ip:'dr/12710_16_14.png',dn:'Image_34',visible:0,effectiveVi:1,JSONEffectData:false,accstr:'Image ',traccstr:'',ti:-1,acclng:'',vbwr:[863,588,879,602],vb:[863,588,879,602]},SmartShape_41:{type:612,from:1081,to:1170,rp:0,rpa:0,mdi:'SmartShape_41c',retainState:false,immo:false,apsn:'Slide13717',JSONTT_4:[],cpa:true,oca:'cp.show("SmartShape_WheelInfo_53");\
cp.changeState("SmartShape_WheelInfo_53","Experiences");',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,uab:1,chfn:cp.ch,osc:'',osct:0,ofc:'',ofct:0,pa:1099,enabled:1,ma:-1,pfc:1,dclk:false,amc:true,eh:cp.cbKH,siq:false,sat:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[13108]},{stn:'RollOver',stt:2,stsi:[13117,13121]},{stn:'Down',stt:1,stsi:[13130,13134]},{stn:'Visited',stt:10,stsi:[13143,13154,13162]}],stis:0,bstiid:-1,sipst:0,sicbs:false,sihhs:true,sihds:true,stc:['SmartShape_41','si13117','si13130','si13143'],isDD:false},SmartShape_41c:{b:[580,624,710,652],uid:13108,dn:'SmartShape_41',visible:1,effectiveVi:1,JSONEffectData:false,accstr:' ',traccstr:'',ti:2500,acclng:'',sc:'#1a1a1a',sw:0,ss:0,fa:0,bc:'#e6e6e6',p0:[[0],[1,580.00,624],[2,580.00,652],[2,710.00,652],[2,710.00,624],[2,580.00,624],[4]],svg:false,vbwr:[580,624,710,652],vb:[580,624,710,652]},si13117:{type:612,from:1081,to:1170,rp:0,rpa:0,mdi:'si13117c',retainState:false,immo:false,apsn:'Slide13717',JSONTT_4:[],cpa:true,oca:'cp.show("SmartShape_WheelInfo_53");\
cp.changeState("SmartShape_WheelInfo_53","Experiences");',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,uab:1,chfn:cp.ch,osc:'',osct:0,ofc:'',ofct:0,pa:1099,enabled:1,ma:-1,pfc:1,dclk:false,amc:true,eh:cp.cbKH,siq:false,sat:true,trin:0,trout:0,bstin:'SmartShape_41',stl:[{stn:'Normal',stt:0,stsi:[13117]}],stis:0,bstiid:13108,sipst:2,sicbs:true,sihhs:true,sihds:true,isDD:false},si13117c:{b:[580,624,710,652],uid:13117,dn:'si13117',visible:0,effectiveVi:1,JSONEffectData:false,accstr:' ',traccstr:'',ti:2500,acclng:'',sc:'#ff0000',sw:0,ss:0,fa:100,bc:'#ff9e9c',p0:[[0],[1,580.00,624],[2,580.00,652],[2,710.00,652],[2,710.00,624],[2,580.00,624],[4]],svg:false,vbwr:[580,624,710,652],vb:[580,624,710,652]},Text_Caption_32:{type:19,from:1081,to:1170,rp:0,rpa:0,mdi:'Text_Caption_32c',retainState:false,immo:false,apsn:'Slide13717',iflbx:false,ipflbx:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[13121]}],stis:0,bstiid:13108,sipst:2,sicbs:false,sihhs:false,sihds:false,isDD:false},Text_Caption_32c:{b:[570,617,717,652],uid:13121,sr:cp.fd,ip:'dr/Text_Caption_32.png',dn:'Text_Caption_32',visible:0,effectiveVi:1,JSONEffectData:false,accstr:'EXPERIENCES ',traccstr:'',ti:-1,acclng:'',vbwr:[570,617,717,652],vb:[570,617,717,652]},si13130:{type:612,from:1081,to:1170,rp:0,rpa:0,mdi:'si13130c',retainState:false,immo:false,apsn:'Slide13717',JSONTT_4:[],cpa:true,oca:'cp.show("SmartShape_WheelInfo_53");\
cp.changeState("SmartShape_WheelInfo_53","Experiences");',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,uab:1,chfn:cp.ch,osc:'',osct:0,ofc:'',ofct:0,pa:1099,enabled:1,ma:-1,pfc:1,dclk:false,amc:true,eh:cp.cbKH,siq:false,sat:true,trin:0,trout:0,bstin:'SmartShape_41',stl:[{stn:'Normal',stt:0,stsi:[13130]}],stis:0,bstiid:13108,sipst:1,sicbs:true,sihhs:true,sihds:true,isDD:false},si13130c:{b:[580,624,710,652],uid:13130,dn:'si13130',visible:0,effectiveVi:1,JSONEffectData:false,accstr:' ',traccstr:'',ti:2500,acclng:'',sc:'#ff0000',sw:0,ss:0,fa:100,bc:'#ff6b6a',p0:[[0],[1,580.00,624],[2,580.00,652],[2,710.00,652],[2,710.00,624],[2,580.00,624],[4]],svg:false,vbwr:[580,624,710,652],vb:[580,624,710,652]},Text_Caption_33:{type:19,from:1081,to:1170,rp:0,rpa:0,mdi:'Text_Caption_33c',retainState:false,immo:false,apsn:'Slide13717',iflbx:false,ipflbx:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[13134]}],stis:0,bstiid:13108,sipst:1,sicbs:false,sihhs:false,sihds:false,isDD:false},Text_Caption_33c:{b:[570,617,717,652],uid:13134,sr:cp.fd,ip:'dr/Text_Caption_33.png',dn:'Text_Caption_33',visible:0,effectiveVi:1,JSONEffectData:false,accstr:'EXPERIENCES ',traccstr:'',ti:-1,acclng:'',vbwr:[570,617,717,652],vb:[570,617,717,652]},si13143:{type:612,from:1081,to:1170,rp:0,rpa:0,mdi:'si13143c',retainState:false,immo:false,apsn:'Slide13717',JSONTT_4:[],cpa:true,oca:'cp.show("SmartShape_WheelInfo_53");\
cp.changeState("SmartShape_WheelInfo_53","Experiences");',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,uab:1,chfn:cp.ch,osc:'',osct:0,ofc:'',ofct:0,pa:1099,enabled:1,ma:-1,pfc:1,dclk:false,amc:true,eh:cp.cbKH,siq:false,sat:true,trin:0,trout:0,bstin:'SmartShape_41',stl:[{stn:'Normal',stt:0,stsi:[13143]}],stis:0,bstiid:13108,sipst:10,sicbs:true,sihhs:true,sihds:true,isDD:false},si13143c:{b:[580,624,710,652],uid:13143,dn:'si13143',visible:0,effectiveVi:1,JSONEffectData:false,accstr:' ',traccstr:'',ti:2500,acclng:'',sc:'#1a1a1a',sw:0,ss:0,fa:0,bc:'#e6e6e6',p0:[[0],[1,580.00,624],[2,580.00,652],[2,710.00,652],[2,710.00,624],[2,580.00,624],[4]],svg:false,vbwr:[580,624,710,652],vb:[580,624,710,652]},SmartShape_42:{type:612,from:1081,to:1170,rp:0,rpa:0,mdi:'SmartShape_42c',retainState:false,immo:false,apsn:'Slide13717',JSONTT_4:[],cpa:true,oca:'cp.jumpToNextSlide();',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[13154]}],stis:0,bstiid:13108,sipst:10,sicbs:false,sihhs:false,sihds:false,isDD:false},SmartShape_42c:{b:[714,627,737,651],uid:13154,dn:'SmartShape_42',visible:0,effectiveVi:1,JSONEffectData:false,accstr:' ',traccstr:'',ti:-1,acclng:'',sc:'#000000',sw:0,ss:0,fa:100,bc:'#666666',p0:[[0],[1,714,627],[2,714,651],[2,737,651],[2,737,627],[2,714,627],[4]],svg:false,vbwr:[714,627,737,651],vb:[714,627,737,651]},Image_35:{type:15,from:1081,to:1170,rp:0,rpa:0,mdi:'Image_35c',retainState:false,immo:false,apsn:'Slide13717',JSONTT_4:[],cpa:true,oca:'cp.jumpToNextSlide();',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[13162]}],stis:0,bstiid:13108,sipst:10,sicbs:false,sihhs:false,sihds:false,isDD:false},Image_35c:{b:[717,631,733,645],uid:13162,sr:cp.fd,ip:'dr/12710_16_14.png',dn:'Image_35',visible:0,effectiveVi:1,JSONEffectData:false,accstr:'Image ',traccstr:'',ti:-1,acclng:'',vbwr:[717,631,733,645],vb:[717,631,733,645]},SmartShape_43:{type:612,from:1081,to:1170,rp:0,rpa:0,mdi:'SmartShape_43c',retainState:false,immo:false,apsn:'Slide13717',JSONTT_4:[],cpa:true,oca:'cp.show("SmartShape_WheelInfo_53");\
cp.changeState("SmartShape_WheelInfo_53","Sex");',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,uab:1,chfn:cp.ch,osc:'',osct:0,ofc:'',ofct:0,pa:1099,enabled:1,ma:-1,pfc:1,dclk:false,amc:true,eh:cp.cbKH,siq:false,sat:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[13184]},{stn:'RollOver',stt:2,stsi:[13195,13199]},{stn:'Down',stt:1,stsi:[13210,13214]},{stn:'Visited',stt:10,stsi:[13225,13236,13244]}],stis:0,bstiid:-1,sipst:0,sicbs:false,sihhs:true,sihds:true,stc:['SmartShape_43','si13195','si13210','si13225'],isDD:false},SmartShape_43c:{b:[440,580,565,608],uid:13184,sr:cp.fd,ip:'dr/SmartShape_43.png',dn:'SmartShape_43',visible:1,effectiveVi:1,JSONEffectData:false,accstr:' ',traccstr:'',ti:2500,acclng:'',sc:'#1a1a1a',sw:0,ss:0,fa:0,bc:'#e6e6e6',p0:[[0],[1,440.00,580.00],[2,440.00,608],[2,565,608],[2,565,580.00],[2,440.00,580.00],[4]],svg:false,vbwr:[440,580,565,608],vb:[440,580,565,608]},si13195:{type:612,from:1081,to:1170,rp:0,rpa:0,mdi:'si13195c',retainState:false,immo:false,apsn:'Slide13717',JSONTT_4:[],cpa:true,oca:'cp.show("SmartShape_WheelInfo_53");\
cp.changeState("SmartShape_WheelInfo_53","Sex");',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,uab:1,chfn:cp.ch,osc:'',osct:0,ofc:'',ofct:0,pa:1099,enabled:1,ma:-1,pfc:1,dclk:false,amc:true,eh:cp.cbKH,siq:false,sat:true,trin:0,trout:0,bstin:'SmartShape_43',stl:[{stn:'Normal',stt:0,stsi:[13195]}],stis:0,bstiid:13184,sipst:2,sicbs:true,sihhs:true,sihds:true,isDD:false},si13195c:{b:[440,580,565,608],uid:13195,sr:cp.fd,ip:'dr/si13195.png',dn:'si13195',visible:0,effectiveVi:1,JSONEffectData:false,accstr:' ',traccstr:'',ti:2500,acclng:'',sc:'#ff0000',sw:0,ss:0,fa:100,bc:'#ff9e9c',p0:[[0],[1,440.00,580.00],[2,440.00,608],[2,565,608],[2,565,580.00],[2,440.00,580.00],[4]],svg:false,vbwr:[440,580,565,608],vb:[440,580,565,608]},Text_Caption_34:{type:19,from:1081,to:1170,rp:0,rpa:0,mdi:'Text_Caption_34c',retainState:false,immo:false,apsn:'Slide13717',iflbx:false,ipflbx:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[13199]}],stis:0,bstiid:13184,sipst:2,sicbs:false,sihhs:false,sihds:false,isDD:false},Text_Caption_34c:{b:[430,573,577,608],uid:13199,sr:cp.fd,ip:'dr/Text_Caption_34.png',dn:'Text_Caption_34',visible:0,effectiveVi:1,JSONEffectData:false,accstr:'SEX ',traccstr:'',ti:-1,acclng:'',vbwr:[430,573,577,608],vb:[430,573,577,608]},si13210:{type:612,from:1081,to:1170,rp:0,rpa:0,mdi:'si13210c',retainState:false,immo:false,apsn:'Slide13717',JSONTT_4:[],cpa:true,oca:'cp.show("SmartShape_WheelInfo_53");\
cp.changeState("SmartShape_WheelInfo_53","Sex");',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,uab:1,chfn:cp.ch,osc:'',osct:0,ofc:'',ofct:0,pa:1099,enabled:1,ma:-1,pfc:1,dclk:false,amc:true,eh:cp.cbKH,siq:false,sat:true,trin:0,trout:0,bstin:'SmartShape_43',stl:[{stn:'Normal',stt:0,stsi:[13210]}],stis:0,bstiid:13184,sipst:1,sicbs:true,sihhs:true,sihds:true,isDD:false},si13210c:{b:[440,580,565,608],uid:13210,sr:cp.fd,ip:'dr/si13210.png',dn:'si13210',visible:0,effectiveVi:1,JSONEffectData:false,accstr:' ',traccstr:'',ti:2500,acclng:'',sc:'#ff0000',sw:0,ss:0,fa:100,bc:'#ff6b6a',p0:[[0],[1,440.00,580.00],[2,440.00,608],[2,565,608],[2,565,580.00],[2,440.00,580.00],[4]],svg:false,vbwr:[440,580,565,608],vb:[440,580,565,608]},Text_Caption_35:{type:19,from:1081,to:1170,rp:0,rpa:0,mdi:'Text_Caption_35c',retainState:false,immo:false,apsn:'Slide13717',iflbx:false,ipflbx:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[13214]}],stis:0,bstiid:13184,sipst:1,sicbs:false,sihhs:false,sihds:false,isDD:false},Text_Caption_35c:{b:[430,573,577,608],uid:13214,sr:cp.fd,ip:'dr/Text_Caption_35.png',dn:'Text_Caption_35',visible:0,effectiveVi:1,JSONEffectData:false,accstr:'SEX ',traccstr:'',ti:-1,acclng:'',vbwr:[430,573,577,608],vb:[430,573,577,608]},si13225:{type:612,from:1081,to:1170,rp:0,rpa:0,mdi:'si13225c',retainState:false,immo:false,apsn:'Slide13717',JSONTT_4:[],cpa:true,oca:'cp.show("SmartShape_WheelInfo_53");\
cp.changeState("SmartShape_WheelInfo_53","Sex");',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,uab:1,chfn:cp.ch,osc:'',osct:0,ofc:'',ofct:0,pa:1099,enabled:1,ma:-1,pfc:1,dclk:false,amc:true,eh:cp.cbKH,siq:false,sat:true,trin:0,trout:0,bstin:'SmartShape_43',stl:[{stn:'Normal',stt:0,stsi:[13225]}],stis:0,bstiid:13184,sipst:10,sicbs:true,sihhs:true,sihds:true,isDD:false},si13225c:{b:[440,580,565,608],uid:13225,sr:cp.fd,ip:'dr/si13225.png',dn:'si13225',visible:0,effectiveVi:1,JSONEffectData:false,accstr:' ',traccstr:'',ti:2500,acclng:'',sc:'#1a1a1a',sw:0,ss:0,fa:0,bc:'#e6e6e6',p0:[[0],[1,440.00,580.00],[2,440.00,608],[2,565,608],[2,565,580.00],[2,440.00,580.00],[4]],svg:false,vbwr:[440,580,565,608],vb:[440,580,565,608]},SmartShape_44:{type:612,from:1081,to:1170,rp:0,rpa:0,mdi:'SmartShape_44c',retainState:false,immo:false,apsn:'Slide13717',JSONTT_4:[],cpa:true,oca:'cp.jumpToNextSlide();',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[13236]}],stis:0,bstiid:13184,sipst:10,sicbs:false,sihhs:false,sihds:false,isDD:false},SmartShape_44c:{b:[411,585,434,609],uid:13236,dn:'SmartShape_44',visible:0,effectiveVi:1,JSONEffectData:false,accstr:' ',traccstr:'',ti:-1,acclng:'',sc:'#000000',sw:0,ss:0,fa:100,bc:'#666666',p0:[[0],[1,411,585],[2,411,609],[2,434,609],[2,434,585],[2,411,585],[4]],svg:false,vbwr:[411,585,434,609],vb:[411,585,434,609]},Image_36:{type:15,from:1081,to:1170,rp:0,rpa:0,mdi:'Image_36c',retainState:false,immo:false,apsn:'Slide13717',JSONTT_4:[],cpa:true,oca:'cp.jumpToNextSlide();',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[13244]}],stis:0,bstiid:13184,sipst:10,sicbs:false,sihhs:false,sihds:false,isDD:false},Image_36c:{b:[414,589,430,603],uid:13244,sr:cp.fd,ip:'dr/12710_16_14.png',dn:'Image_36',visible:0,effectiveVi:1,JSONEffectData:false,accstr:'Image ',traccstr:'',ti:-1,acclng:'',vbwr:[414,589,430,603],vb:[414,589,430,603]},SmartShape_45:{type:612,from:1081,to:1170,rp:0,rpa:0,mdi:'SmartShape_45c',retainState:false,immo:false,apsn:'Slide13717',JSONTT_4:[],cpa:true,oca:'cp.show("SmartShape_WheelInfo_53");\
cp.changeState("SmartShape_WheelInfo_53","Sexual_Orientation");',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,uab:1,chfn:cp.ch,osc:'',osct:0,ofc:'',ofct:0,pa:1099,enabled:1,ma:-1,pfc:1,dclk:false,amc:true,eh:cp.cbKH,siq:false,sat:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[13264]},{stn:'RollOver',stt:2,stsi:[13273,13277]},{stn:'Down',stt:1,stsi:[13286,13290]},{stn:'Visited',stt:10,stsi:[13299,13310,13318]}],stis:0,bstiid:-1,sipst:0,sicbs:false,sihhs:true,sihds:true,stc:['SmartShape_45','si13273','si13286','si13299'],isDD:false},SmartShape_45c:{b:[344,480,474,508],uid:13264,dn:'SmartShape_45',visible:1,effectiveVi:1,JSONEffectData:false,accstr:' ',traccstr:'',ti:2500,acclng:'',sc:'#1a1a1a',sw:0,ss:0,fa:0,bc:'#e6e6e6',p0:[[0],[1,344,480.00],[2,344,508],[2,474,508],[2,474,480.00],[2,344,480.00],[4]],svg:false,vbwr:[344,480,474,508],vb:[344,480,474,508]},si13273:{type:612,from:1081,to:1170,rp:0,rpa:0,mdi:'si13273c',retainState:false,immo:false,apsn:'Slide13717',JSONTT_4:[],cpa:true,oca:'cp.show("SmartShape_WheelInfo_53");\
cp.changeState("SmartShape_WheelInfo_53","Sexual_Orientation");',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,uab:1,chfn:cp.ch,osc:'',osct:0,ofc:'',ofct:0,pa:1099,enabled:1,ma:-1,pfc:1,dclk:false,amc:true,eh:cp.cbKH,siq:false,sat:true,trin:0,trout:0,bstin:'SmartShape_45',stl:[{stn:'Normal',stt:0,stsi:[13273]}],stis:0,bstiid:13264,sipst:2,sicbs:true,sihhs:true,sihds:true,isDD:false},si13273c:{b:[344,480,474,508],uid:13273,dn:'si13273',visible:0,effectiveVi:1,JSONEffectData:false,accstr:' ',traccstr:'',ti:2500,acclng:'',sc:'#ff0000',sw:0,ss:0,fa:100,bc:'#ff9e9c',p0:[[0],[1,344,480.00],[2,344,508],[2,474,508],[2,474,480.00],[2,344,480.00],[4]],svg:false,vbwr:[344,480,474,508],vb:[344,480,474,508]},Text_Caption_36:{type:19,from:1081,to:1170,rp:0,rpa:0,mdi:'Text_Caption_36c',retainState:false,immo:false,apsn:'Slide13717',iflbx:false,ipflbx:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[13277]}],stis:0,bstiid:13264,sipst:2,sicbs:false,sihhs:false,sihds:false,isDD:false},Text_Caption_36c:{b:[334,471,481,516],uid:13277,sr:cp.fd,ip:'dr/Text_Caption_36.png',dn:'Text_Caption_36',visible:0,effectiveVi:1,JSONEffectData:false,accstr:'SEXUAL ORIENTATION ',traccstr:'',ti:-1,acclng:'',vbwr:[334,471,481,516],vb:[334,471,481,516]},si13286:{type:612,from:1081,to:1170,rp:0,rpa:0,mdi:'si13286c',retainState:false,immo:false,apsn:'Slide13717',JSONTT_4:[],cpa:true,oca:'cp.show("SmartShape_WheelInfo_53");\
cp.changeState("SmartShape_WheelInfo_53","Sexual_Orientation");',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,uab:1,chfn:cp.ch,osc:'',osct:0,ofc:'',ofct:0,pa:1099,enabled:1,ma:-1,pfc:1,dclk:false,amc:true,eh:cp.cbKH,siq:false,sat:true,trin:0,trout:0,bstin:'SmartShape_45',stl:[{stn:'Normal',stt:0,stsi:[13286]}],stis:0,bstiid:13264,sipst:1,sicbs:true,sihhs:true,sihds:true,isDD:false},si13286c:{b:[344,480,474,508],uid:13286,dn:'si13286',visible:0,effectiveVi:1,JSONEffectData:false,accstr:' ',traccstr:'',ti:2500,acclng:'',sc:'#ff0000',sw:0,ss:0,fa:100,bc:'#ff6b6a',p0:[[0],[1,344,480.00],[2,344,508],[2,474,508],[2,474,480.00],[2,344,480.00],[4]],svg:false,vbwr:[344,480,474,508],vb:[344,480,474,508]},Text_Caption_37:{type:19,from:1081,to:1170,rp:0,rpa:0,mdi:'Text_Caption_37c',retainState:false,immo:false,apsn:'Slide13717',iflbx:false,ipflbx:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[13290]}],stis:0,bstiid:13264,sipst:1,sicbs:false,sihhs:false,sihds:false,isDD:false},Text_Caption_37c:{b:[334,470,481,512],uid:13290,sr:cp.fd,ip:'dr/Text_Caption_37.png',dn:'Text_Caption_37',visible:0,effectiveVi:1,JSONEffectData:false,accstr:'SEXUAL ORIENTATION ',traccstr:'',ti:-1,acclng:'',vbwr:[334,470,481,512],vb:[334,470,481,512]},si13299:{type:612,from:1081,to:1170,rp:0,rpa:0,mdi:'si13299c',retainState:false,immo:false,apsn:'Slide13717',JSONTT_4:[],cpa:true,oca:'cp.show("SmartShape_WheelInfo_53");\
cp.changeState("SmartShape_WheelInfo_53","Sexual_Orientation");',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,uab:1,chfn:cp.ch,osc:'',osct:0,ofc:'',ofct:0,pa:1099,enabled:1,ma:-1,pfc:1,dclk:false,amc:true,eh:cp.cbKH,siq:false,sat:true,trin:0,trout:0,bstin:'SmartShape_45',stl:[{stn:'Normal',stt:0,stsi:[13299]}],stis:0,bstiid:13264,sipst:10,sicbs:true,sihhs:true,sihds:true,isDD:false},si13299c:{b:[344,480,474,508],uid:13299,dn:'si13299',visible:0,effectiveVi:1,JSONEffectData:false,accstr:' ',traccstr:'',ti:2500,acclng:'',sc:'#1a1a1a',sw:0,ss:0,fa:0,bc:'#e6e6e6',p0:[[0],[1,344,480.00],[2,344,508],[2,474,508],[2,474,480.00],[2,344,480.00],[4]],svg:false,vbwr:[344,480,474,508],vb:[344,480,474,508]},SmartShape_46:{type:612,from:1081,to:1170,rp:0,rpa:0,mdi:'SmartShape_46c',retainState:false,immo:false,apsn:'Slide13717',JSONTT_4:[],cpa:true,oca:'cp.jumpToNextSlide();',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[13310]}],stis:0,bstiid:13264,sipst:10,sicbs:false,sihhs:false,sihds:false,isDD:false},SmartShape_46c:{b:[315,482,338,506],uid:13310,dn:'SmartShape_46',visible:0,effectiveVi:1,JSONEffectData:false,accstr:' ',traccstr:'',ti:-1,acclng:'',sc:'#000000',sw:0,ss:0,fa:100,bc:'#666666',p0:[[0],[1,315,482],[2,315,506],[2,338,506],[2,338,482],[2,315,482],[4]],svg:false,vbwr:[315,482,338,506],vb:[315,482,338,506]},Image_37:{type:15,from:1081,to:1170,rp:0,rpa:0,mdi:'Image_37c',retainState:false,immo:false,apsn:'Slide13717',JSONTT_4:[],cpa:true,oca:'cp.jumpToNextSlide();',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[13318]}],stis:0,bstiid:13264,sipst:10,sicbs:false,sihhs:false,sihds:false,isDD:false},Image_37c:{b:[318,486,334,500],uid:13318,sr:cp.fd,ip:'dr/12710_16_14.png',dn:'Image_37',visible:0,effectiveVi:1,JSONEffectData:false,accstr:'Image ',traccstr:'',ti:-1,acclng:'',vbwr:[318,486,334,500],vb:[318,486,334,500]},SmartShape_47:{type:612,from:1081,to:1170,rp:0,rpa:0,mdi:'SmartShape_47c',retainState:false,immo:false,apsn:'Slide13717',JSONTT_4:[],cpa:true,oca:'cp.show("SmartShape_WheelInfo_53");\
cp.changeState("SmartShape_WheelInfo_53","Gender_Expression");',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,uab:1,chfn:cp.ch,osc:'',osct:0,ofc:'',ofct:0,pa:1099,enabled:1,ma:-1,pfc:1,dclk:false,amc:true,eh:cp.cbKH,siq:false,sat:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[13338]},{stn:'RollOver',stt:2,stsi:[13347,13351]},{stn:'Down',stt:1,stsi:[13360,13364]},{stn:'Visited',stt:10,stsi:[13373,13384,13392]}],stis:0,bstiid:-1,sipst:0,sicbs:false,sihhs:true,sihds:true,stc:['SmartShape_47','si13347','si13360','si13373'],isDD:false},SmartShape_47c:{b:[310,343,440,371],uid:13338,dn:'SmartShape_47',visible:1,effectiveVi:1,JSONEffectData:false,accstr:' ',traccstr:'',ti:2500,acclng:'',sc:'#1a1a1a',sw:0,ss:0,fa:0,bc:'#e6e6e6',p0:[[0],[1,310.00,343],[2,310.00,371],[2,440.00,371],[2,440.00,343],[2,310.00,343],[4]],svg:false,vbwr:[310,343,440,371],vb:[310,343,440,371]},si13347:{type:612,from:1081,to:1170,rp:0,rpa:0,mdi:'si13347c',retainState:false,immo:false,apsn:'Slide13717',JSONTT_4:[],cpa:true,oca:'cp.show("SmartShape_WheelInfo_53");\
cp.changeState("SmartShape_WheelInfo_53","Gender_Expression");',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,uab:1,chfn:cp.ch,osc:'',osct:0,ofc:'',ofct:0,pa:1099,enabled:1,ma:-1,pfc:1,dclk:false,amc:true,eh:cp.cbKH,siq:false,sat:true,trin:0,trout:0,bstin:'SmartShape_47',stl:[{stn:'Normal',stt:0,stsi:[13347]}],stis:0,bstiid:13338,sipst:2,sicbs:true,sihhs:true,sihds:true,isDD:false},si13347c:{b:[310,343,440,371],uid:13347,dn:'si13347',visible:0,effectiveVi:1,JSONEffectData:false,accstr:' ',traccstr:'',ti:2500,acclng:'',sc:'#ff0000',sw:0,ss:0,fa:100,bc:'#ff9e9c',p0:[[0],[1,310.00,343],[2,310.00,371],[2,440.00,371],[2,440.00,343],[2,310.00,343],[4]],svg:false,vbwr:[310,343,440,371],vb:[310,343,440,371]},Text_Caption_38:{type:19,from:1081,to:1170,rp:0,rpa:0,mdi:'Text_Caption_38c',retainState:false,immo:false,apsn:'Slide13717',iflbx:false,ipflbx:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[13351]}],stis:0,bstiid:13338,sipst:2,sicbs:false,sihhs:false,sihds:false,isDD:false},Text_Caption_38c:{b:[300,333,447,373],uid:13351,sr:cp.fd,ip:'dr/Text_Caption_38.png',dn:'Text_Caption_38',visible:0,effectiveVi:1,JSONEffectData:false,accstr:'GENDER EXPRESSION ',traccstr:'',ti:-1,acclng:'',vbwr:[300,333,447,373],vb:[300,333,447,373]},si13360:{type:612,from:1081,to:1170,rp:0,rpa:0,mdi:'si13360c',retainState:false,immo:false,apsn:'Slide13717',JSONTT_4:[],cpa:true,oca:'cp.show("SmartShape_WheelInfo_53");\
cp.changeState("SmartShape_WheelInfo_53","Gender_Expression");',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,uab:1,chfn:cp.ch,osc:'',osct:0,ofc:'',ofct:0,pa:1099,enabled:1,ma:-1,pfc:1,dclk:false,amc:true,eh:cp.cbKH,siq:false,sat:true,trin:0,trout:0,bstin:'SmartShape_47',stl:[{stn:'Normal',stt:0,stsi:[13360]}],stis:0,bstiid:13338,sipst:1,sicbs:true,sihhs:true,sihds:true,isDD:false},si13360c:{b:[310,343,440,371],uid:13360,dn:'si13360',visible:0,effectiveVi:1,JSONEffectData:false,accstr:' ',traccstr:'',ti:2500,acclng:'',sc:'#ff0000',sw:0,ss:0,fa:100,bc:'#ff6b6a',p0:[[0],[1,310.00,343],[2,310.00,371],[2,440.00,371],[2,440.00,343],[2,310.00,343],[4]],svg:false,vbwr:[310,343,440,371],vb:[310,343,440,371]},Text_Caption_39:{type:19,from:1081,to:1170,rp:0,rpa:0,mdi:'Text_Caption_39c',retainState:false,immo:false,apsn:'Slide13717',iflbx:false,ipflbx:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[13364]}],stis:0,bstiid:13338,sipst:1,sicbs:false,sihhs:false,sihds:false,isDD:false},Text_Caption_39c:{b:[300,333,447,373],uid:13364,sr:cp.fd,ip:'dr/Text_Caption_39.png',dn:'Text_Caption_39',visible:0,effectiveVi:1,JSONEffectData:false,accstr:'GENDER EXPRESSION ',traccstr:'',ti:-1,acclng:'',vbwr:[300,333,447,373],vb:[300,333,447,373]},si13373:{type:612,from:1081,to:1170,rp:0,rpa:0,mdi:'si13373c',retainState:false,immo:false,apsn:'Slide13717',JSONTT_4:[],cpa:true,oca:'cp.show("SmartShape_WheelInfo_53");\
cp.changeState("SmartShape_WheelInfo_53","Gender_Expression");',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,uab:1,chfn:cp.ch,osc:'',osct:0,ofc:'',ofct:0,pa:1099,enabled:1,ma:-1,pfc:1,dclk:false,amc:true,eh:cp.cbKH,siq:false,sat:true,trin:0,trout:0,bstin:'SmartShape_47',stl:[{stn:'Normal',stt:0,stsi:[13373]}],stis:0,bstiid:13338,sipst:10,sicbs:true,sihhs:true,sihds:true,isDD:false},si13373c:{b:[310,343,440,371],uid:13373,dn:'si13373',visible:0,effectiveVi:1,JSONEffectData:false,accstr:' ',traccstr:'',ti:2500,acclng:'',sc:'#1a1a1a',sw:0,ss:0,fa:0,bc:'#e6e6e6',p0:[[0],[1,310.00,343],[2,310.00,371],[2,440.00,371],[2,440.00,343],[2,310.00,343],[4]],svg:false,vbwr:[310,343,440,371],vb:[310,343,440,371]},SmartShape_48:{type:612,from:1081,to:1170,rp:0,rpa:0,mdi:'SmartShape_48c',retainState:false,immo:false,apsn:'Slide13717',JSONTT_4:[],cpa:true,oca:'cp.jumpToNextSlide();',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[13384]}],stis:0,bstiid:13338,sipst:10,sicbs:false,sihhs:false,sihds:false,isDD:false},SmartShape_48c:{b:[278,344,301,368],uid:13384,dn:'SmartShape_48',visible:0,effectiveVi:1,JSONEffectData:false,accstr:' ',traccstr:'',ti:-1,acclng:'',sc:'#000000',sw:0,ss:0,fa:100,bc:'#666666',p0:[[0],[1,278,344],[2,278,368],[2,301,368],[2,301,344],[2,278,344],[4]],svg:false,vbwr:[278,344,301,368],vb:[278,344,301,368]},Image_38:{type:15,from:1081,to:1170,rp:0,rpa:0,mdi:'Image_38c',retainState:false,immo:false,apsn:'Slide13717',JSONTT_4:[],cpa:true,oca:'cp.jumpToNextSlide();',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[13392]}],stis:0,bstiid:13338,sipst:10,sicbs:false,sihhs:false,sihds:false,isDD:false},Image_38c:{b:[281,348,297,362],uid:13392,sr:cp.fd,ip:'dr/12710_16_14.png',dn:'Image_38',visible:0,effectiveVi:1,JSONEffectData:false,accstr:'Image ',traccstr:'',ti:-1,acclng:'',vbwr:[281,348,297,362],vb:[281,348,297,362]},SmartShape_49:{type:612,from:1081,to:1170,rp:0,rpa:0,mdi:'SmartShape_49c',retainState:false,immo:false,apsn:'Slide13717',JSONTT_4:[],cpa:true,oca:'cp.show("SmartShape_WheelInfo_53");\
cp.changeState("SmartShape_WheelInfo_53","Gender_Identity");',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,uab:1,chfn:cp.ch,osc:'',osct:0,ofc:'',ofct:0,pa:1099,enabled:1,ma:-1,pfc:1,dclk:false,amc:true,eh:cp.cbKH,siq:false,sat:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[13412]},{stn:'RollOver',stt:2,stsi:[13421,13425]},{stn:'Down',stt:1,stsi:[13434,13438]},{stn:'Visited',stt:10,stsi:[13447,13458,13466]}],stis:0,bstiid:-1,sipst:0,sicbs:false,sihhs:true,sihds:true,stc:['SmartShape_49','si13421','si13434','si13447'],isDD:false},SmartShape_49c:{b:[334,198,459,226],uid:13412,dn:'SmartShape_49',visible:1,effectiveVi:1,JSONEffectData:false,accstr:' ',traccstr:'',ti:2500,acclng:'',sc:'#1a1a1a',sw:0,ss:0,fa:0,bc:'#e6e6e6',p0:[[0],[1,334,198],[2,334,226],[2,459,226],[2,459,198],[2,334,198],[4]],svg:false,vbwr:[334,198,459,226],vb:[334,198,459,226]},si13421:{type:612,from:1081,to:1170,rp:0,rpa:0,mdi:'si13421c',retainState:false,immo:false,apsn:'Slide13717',JSONTT_4:[],cpa:true,oca:'cp.show("SmartShape_WheelInfo_53");\
cp.changeState("SmartShape_WheelInfo_53","Gender_Identity");',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,uab:1,chfn:cp.ch,osc:'',osct:0,ofc:'',ofct:0,pa:1099,enabled:1,ma:-1,pfc:1,dclk:false,amc:true,eh:cp.cbKH,siq:false,sat:true,trin:0,trout:0,bstin:'SmartShape_49',stl:[{stn:'Normal',stt:0,stsi:[13421]}],stis:0,bstiid:13412,sipst:2,sicbs:true,sihhs:true,sihds:true,isDD:false},si13421c:{b:[334,198,459,226],uid:13421,dn:'si13421',visible:0,effectiveVi:1,JSONEffectData:false,accstr:' ',traccstr:'',ti:2500,acclng:'',sc:'#ff0000',sw:0,ss:0,fa:100,bc:'#ff9e9c',p0:[[0],[1,334,198],[2,334,226],[2,459,226],[2,459,198],[2,334,198],[4]],svg:false,vbwr:[334,198,459,226],vb:[334,198,459,226]},Text_Caption_40:{type:19,from:1081,to:1170,rp:0,rpa:0,mdi:'Text_Caption_40c',retainState:false,immo:false,apsn:'Slide13717',iflbx:false,ipflbx:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[13425]}],stis:0,bstiid:13412,sipst:2,sicbs:false,sihhs:false,sihds:false,isDD:false},Text_Caption_40c:{b:[324,191,471,226],uid:13425,sr:cp.fd,ip:'dr/Text_Caption_40.png',dn:'Text_Caption_40',visible:0,effectiveVi:1,JSONEffectData:false,accstr:'GENDER IDENTITY ',traccstr:'',ti:-1,acclng:'',vbwr:[324,191,471,226],vb:[324,191,471,226]},si13434:{type:612,from:1081,to:1170,rp:0,rpa:0,mdi:'si13434c',retainState:false,immo:false,apsn:'Slide13717',JSONTT_4:[],cpa:true,oca:'cp.show("SmartShape_WheelInfo_53");\
cp.changeState("SmartShape_WheelInfo_53","Gender_Identity");',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,uab:1,chfn:cp.ch,osc:'',osct:0,ofc:'',ofct:0,pa:1099,enabled:1,ma:-1,pfc:1,dclk:false,amc:true,eh:cp.cbKH,siq:false,sat:true,trin:0,trout:0,bstin:'SmartShape_49',stl:[{stn:'Normal',stt:0,stsi:[13434]}],stis:0,bstiid:13412,sipst:1,sicbs:true,sihhs:true,sihds:true,isDD:false},si13434c:{b:[334,198,459,226],uid:13434,dn:'si13434',visible:0,effectiveVi:1,JSONEffectData:false,accstr:' ',traccstr:'',ti:2500,acclng:'',sc:'#ff0000',sw:0,ss:0,fa:100,bc:'#ff6b6a',p0:[[0],[1,334,198],[2,334,226],[2,459,226],[2,459,198],[2,334,198],[4]],svg:false,vbwr:[334,198,459,226],vb:[334,198,459,226]},Text_Caption_41:{type:19,from:1081,to:1170,rp:0,rpa:0,mdi:'Text_Caption_41c',retainState:false,immo:false,apsn:'Slide13717',iflbx:false,ipflbx:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[13438]}],stis:0,bstiid:13412,sipst:1,sicbs:false,sihhs:false,sihds:false,isDD:false},Text_Caption_41c:{b:[324,191,471,226],uid:13438,sr:cp.fd,ip:'dr/Text_Caption_41.png',dn:'Text_Caption_41',visible:0,effectiveVi:1,JSONEffectData:false,accstr:'GENDER IDENTITY ',traccstr:'',ti:-1,acclng:'',vbwr:[324,191,471,226],vb:[324,191,471,226]},si13447:{type:612,from:1081,to:1170,rp:0,rpa:0,mdi:'si13447c',retainState:false,immo:false,apsn:'Slide13717',JSONTT_4:[],cpa:true,oca:'cp.show("SmartShape_WheelInfo_53");\
cp.changeState("SmartShape_WheelInfo_53","Gender_Identity");',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,uab:1,chfn:cp.ch,osc:'',osct:0,ofc:'',ofct:0,pa:1099,enabled:1,ma:-1,pfc:1,dclk:false,amc:true,eh:cp.cbKH,siq:false,sat:true,trin:0,trout:0,bstin:'SmartShape_49',stl:[{stn:'Normal',stt:0,stsi:[13447]}],stis:0,bstiid:13412,sipst:10,sicbs:true,sihhs:true,sihds:true,isDD:false},si13447c:{b:[334,198,459,226],uid:13447,dn:'si13447',visible:0,effectiveVi:1,JSONEffectData:false,accstr:' ',traccstr:'',ti:2500,acclng:'',sc:'#1a1a1a',sw:0,ss:0,fa:0,bc:'#e6e6e6',p0:[[0],[1,334,198],[2,334,226],[2,459,226],[2,459,198],[2,334,198],[4]],svg:false,vbwr:[334,198,459,226],vb:[334,198,459,226]},SmartShape_50:{type:612,from:1081,to:1170,rp:0,rpa:0,mdi:'SmartShape_50c',retainState:false,immo:false,apsn:'Slide13717',JSONTT_4:[],cpa:true,oca:'cp.jumpToNextSlide();',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[13458]}],stis:0,bstiid:13412,sipst:10,sicbs:false,sihhs:false,sihds:false,isDD:false},SmartShape_50c:{b:[307,201,330,225],uid:13458,dn:'SmartShape_50',visible:0,effectiveVi:1,JSONEffectData:false,accstr:' ',traccstr:'',ti:-1,acclng:'',sc:'#000000',sw:0,ss:0,fa:100,bc:'#666666',p0:[[0],[1,307,201],[2,307,225],[2,330.00,225],[2,330.00,201],[2,307,201],[4]],svg:false,vbwr:[307,201,330,225],vb:[307,201,330,225]},Image_39:{type:15,from:1081,to:1170,rp:0,rpa:0,mdi:'Image_39c',retainState:false,immo:false,apsn:'Slide13717',JSONTT_4:[],cpa:true,oca:'cp.jumpToNextSlide();',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[13466]}],stis:0,bstiid:13412,sipst:10,sicbs:false,sihhs:false,sihds:false,isDD:false},Image_39c:{b:[310,205,326,219],uid:13466,sr:cp.fd,ip:'dr/12710_16_14.png',dn:'Image_39',visible:0,effectiveVi:1,JSONEffectData:false,accstr:'Image ',traccstr:'',ti:-1,acclng:'',vbwr:[310,205,326,219],vb:[310,205,326,219]},SmartShape_51:{type:612,from:1081,to:1170,rp:0,rpa:0,mdi:'SmartShape_51c',retainState:false,immo:false,apsn:'Slide13717',JSONTT_4:[],cpa:true,oca:'cp.show("SmartShape_WheelInfo_53");\
cp.changeState("SmartShape_WheelInfo_53","Personality");',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,uab:1,chfn:cp.ch,osc:'',osct:0,ofc:'',ofct:0,pa:1099,enabled:1,ma:-1,pfc:1,dclk:false,amc:true,eh:cp.cbKH,siq:false,sat:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[13486]},{stn:'RollOver',stt:2,stsi:[13495,13499]},{stn:'Down',stt:1,stsi:[13508,13512]},{stn:'Visited',stt:10,stsi:[13521,13532,13540]}],stis:0,bstiid:-1,sipst:0,sicbs:false,sihhs:true,sihds:true,stc:['SmartShape_51','si13495','si13508','si13521'],isDD:false},SmartShape_51c:{b:[425,99,555,127],uid:13486,dn:'SmartShape_51',visible:1,effectiveVi:1,JSONEffectData:false,accstr:' ',traccstr:'',ti:2500,acclng:'',sc:'#1a1a1a',sw:0,ss:0,fa:0,bc:'#e6e6e6',p0:[[0],[1,425,99],[2,425,127],[2,555,127],[2,555,99],[2,425,99],[4]],svg:false,vbwr:[425,99,555,127],vb:[425,99,555,127]},si13495:{type:612,from:1081,to:1170,rp:0,rpa:0,mdi:'si13495c',retainState:false,immo:false,apsn:'Slide13717',JSONTT_4:[],cpa:true,oca:'cp.show("SmartShape_WheelInfo_53");\
cp.changeState("SmartShape_WheelInfo_53","Personality");',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,uab:1,chfn:cp.ch,osc:'',osct:0,ofc:'',ofct:0,pa:1099,enabled:1,ma:-1,pfc:1,dclk:false,amc:true,eh:cp.cbKH,siq:false,sat:true,trin:0,trout:0,bstin:'SmartShape_51',stl:[{stn:'Normal',stt:0,stsi:[13495]}],stis:0,bstiid:13486,sipst:2,sicbs:true,sihhs:true,sihds:true,isDD:false},si13495c:{b:[425,99,555,127],uid:13495,dn:'si13495',visible:0,effectiveVi:1,JSONEffectData:false,accstr:' ',traccstr:'',ti:2500,acclng:'',sc:'#ff0000',sw:0,ss:0,fa:100,bc:'#ff9e9c',p0:[[0],[1,425,99],[2,425,127],[2,555,127],[2,555,99],[2,425,99],[4]],svg:false,vbwr:[425,99,555,127],vb:[425,99,555,127]},Text_Caption_42:{type:19,from:1081,to:1170,rp:0,rpa:0,mdi:'Text_Caption_42c',retainState:false,immo:false,apsn:'Slide13717',iflbx:false,ipflbx:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[13499]}],stis:0,bstiid:13486,sipst:2,sicbs:false,sihhs:false,sihds:false,isDD:false},Text_Caption_42c:{b:[415,92,562,127],uid:13499,sr:cp.fd,ip:'dr/Text_Caption_42.png',dn:'Text_Caption_42',visible:0,effectiveVi:1,JSONEffectData:false,accstr:'PERSONALITY ',traccstr:'',ti:-1,acclng:'',vbwr:[415,92,562,127],vb:[415,92,562,127]},si13508:{type:612,from:1081,to:1170,rp:0,rpa:0,mdi:'si13508c',retainState:false,immo:false,apsn:'Slide13717',JSONTT_4:[],cpa:true,oca:'cp.show("SmartShape_WheelInfo_53");\
cp.changeState("SmartShape_WheelInfo_53","Personality");',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,uab:1,chfn:cp.ch,osc:'',osct:0,ofc:'',ofct:0,pa:1099,enabled:1,ma:-1,pfc:1,dclk:false,amc:true,eh:cp.cbKH,siq:false,sat:true,trin:0,trout:0,bstin:'SmartShape_51',stl:[{stn:'Normal',stt:0,stsi:[13508]}],stis:0,bstiid:13486,sipst:1,sicbs:true,sihhs:true,sihds:true,isDD:false},si13508c:{b:[425,99,555,127],uid:13508,dn:'si13508',visible:0,effectiveVi:1,JSONEffectData:false,accstr:' ',traccstr:'',ti:2500,acclng:'',sc:'#ff0000',sw:0,ss:0,fa:100,bc:'#ff6b6a',p0:[[0],[1,425,99],[2,425,127],[2,555,127],[2,555,99],[2,425,99],[4]],svg:false,vbwr:[425,99,555,127],vb:[425,99,555,127]},Text_Caption_43:{type:19,from:1081,to:1170,rp:0,rpa:0,mdi:'Text_Caption_43c',retainState:false,immo:false,apsn:'Slide13717',iflbx:false,ipflbx:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[13512]}],stis:0,bstiid:13486,sipst:1,sicbs:false,sihhs:false,sihds:false,isDD:false},Text_Caption_43c:{b:[415,92,562,127],uid:13512,sr:cp.fd,ip:'dr/Text_Caption_43.png',dn:'Text_Caption_43',visible:0,effectiveVi:1,JSONEffectData:false,accstr:'PERSONALITY ',traccstr:'',ti:-1,acclng:'',vbwr:[415,92,562,127],vb:[415,92,562,127]},si13521:{type:612,from:1081,to:1170,rp:0,rpa:0,mdi:'si13521c',retainState:false,immo:false,apsn:'Slide13717',JSONTT_4:[],cpa:true,oca:'cp.show("SmartShape_WheelInfo_53");\
cp.changeState("SmartShape_WheelInfo_53","Personality");',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,uab:1,chfn:cp.ch,osc:'',osct:0,ofc:'',ofct:0,pa:1099,enabled:1,ma:-1,pfc:1,dclk:false,amc:true,eh:cp.cbKH,siq:false,sat:true,trin:0,trout:0,bstin:'SmartShape_51',stl:[{stn:'Normal',stt:0,stsi:[13521]}],stis:0,bstiid:13486,sipst:10,sicbs:true,sihhs:true,sihds:true,isDD:false},si13521c:{b:[425,99,555,127],uid:13521,dn:'si13521',visible:0,effectiveVi:1,JSONEffectData:false,accstr:' ',traccstr:'',ti:2500,acclng:'',sc:'#1a1a1a',sw:0,ss:0,fa:0,bc:'#e6e6e6',p0:[[0],[1,425,99],[2,425,127],[2,555,127],[2,555,99],[2,425,99],[4]],svg:false,vbwr:[425,99,555,127],vb:[425,99,555,127]},SmartShape_52:{type:612,from:1081,to:1170,rp:0,rpa:0,mdi:'SmartShape_52c',retainState:false,immo:false,apsn:'Slide13717',JSONTT_4:[],cpa:true,oca:'cp.jumpToNextSlide();',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[13532]}],stis:0,bstiid:13486,sipst:10,sicbs:false,sihhs:false,sihds:false,isDD:false},SmartShape_52c:{b:[395,102,418,126],uid:13532,dn:'SmartShape_52',visible:0,effectiveVi:1,JSONEffectData:false,accstr:' ',traccstr:'',ti:-1,acclng:'',sc:'#000000',sw:0,ss:0,fa:100,bc:'#666666',p0:[[0],[1,395,102],[2,395,126],[2,418,126],[2,418,102],[2,395,102],[4]],svg:false,vbwr:[395,102,418,126],vb:[395,102,418,126]},Image_40:{type:15,from:1081,to:1170,rp:0,rpa:0,mdi:'Image_40c',retainState:false,immo:false,apsn:'Slide13717',JSONTT_4:[],cpa:true,oca:'cp.jumpToNextSlide();',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[13540]}],stis:0,bstiid:13486,sipst:10,sicbs:false,sihhs:false,sihds:false,isDD:false},Image_40c:{b:[398,106,414,120],uid:13540,sr:cp.fd,ip:'dr/12710_16_14.png',dn:'Image_40',visible:0,effectiveVi:1,JSONEffectData:false,accstr:'Image ',traccstr:'',ti:-1,acclng:'',vbwr:[398,106,414,120],vb:[398,106,414,120]},SmartShape_WheelInfo_53:{type:612,from:1081,to:1170,rp:0,rpa:0,mdi:'SmartShape_WheelInfo_53c',retainState:false,immo:false,apsn:'Slide13717',JSONTT_4:[],cpa:true,oca:'cp.jumpToNextSlide();',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[13565]},{stn:'Values',stt:9,stsi:[13576]},{stn:'Relationships',stt:9,stsi:[13587]},{stn:'Sexual_Activity',stt:9,stsi:[13598]},{stn:'Communication',stt:9,stsi:[13609]},{stn:'Socialization',stt:9,stsi:[13620]},{stn:'Self_Image',stt:9,stsi:[13631]},{stn:'Experiences',stt:9,stsi:[13642]},{stn:'Sex',stt:9,stsi:[13653]},{stn:'Sexual_Orientation',stt:9,stsi:[13664]},{stn:'Gender_Expression',stt:9,stsi:[13675]},{stn:'Gender_Identity',stt:9,stsi:[13686]},{stn:'Personality',stt:9,stsi:[13697]}],stis:0,bstiid:-1,sipst:0,sicbs:false,sihhs:false,sihds:false,stc:['SmartShape_WheelInfo_53','si13576','si13587','si13598','si13609','si13620','si13631','si13642','si13653','si13664','si13675','si13686','si13697'],isDD:false},SmartShape_WheelInfo_53c:{b:[445,139,854,562],uid:13565,dn:'SmartShape_WheelInfo_53',visible:1,effectiveVi:1,JSONEffectData:false,accstr:' ',traccstr:'',ti:-1,acclng:'',sc:'#42a591',sw:0,ss:0,fa:100,bc:'#ffffff',p0:[[0],[1,649.5,139],[3,536.56,139,445,233.69,445,350.5],[3,445,467.3,536.56,562,649.5,562],[3,762.44,562,854,467.3,854,350.5],[3,854,233.69,762.44,139,649.5,139],[4]],svg:false,vbwr:[445,139,854,562],vb:[445,139,854,562]},si13576:{type:612,from:1081,to:1170,rp:0,rpa:0,mdi:'si13576c',retainState:false,immo:false,apsn:'Slide13717',JSONTT_4:[],cpa:true,oca:'cp.jumpToNextSlide();',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,trin:0,trout:0,bstin:'SmartShape_WheelInfo_53',stl:[{stn:'Normal',stt:0,stsi:[13576]}],stis:0,bstiid:13565,sipst:9,sicbs:true,sihhs:false,sihds:false,isDD:false},si13576c:{b:[452,152,844,543],uid:13576,sr:cp.fd,ip:'dr/si13576.png',dn:'si13576',visible:0,effectiveVi:1,JSONEffectData:false,accstr:'Values:A collection of ideas that people see as important; a set of assumptions about how things are. ',traccstr:'',ti:-1,acclng:'',sc:'#ffffff',sw:0,ss:0,fa:100,bc:'#ffffff',p0:[[0],[1,648,152],[3,539.75,152,452,239.53,452,347.5],[3,452,455.47,539.75,543,648,543],[3,756.25,543,844,455.47,844,347.5],[3,844,239.53,756.25,152,648,152],[4]],svg:false,vbwr:[452,152,844,543],vb:[452,152,844,543]},si13587:{type:612,from:1081,to:1170,rp:0,rpa:0,mdi:'si13587c',retainState:false,immo:false,apsn:'Slide13717',JSONTT_4:[],cpa:true,oca:'cp.jumpToNextSlide();',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,trin:0,trout:0,bstin:'SmartShape_WheelInfo_53',stl:[{stn:'Normal',stt:0,stsi:[13587]}],stis:0,bstiid:13565,sipst:9,sicbs:true,sihhs:false,sihds:false,isDD:false},si13587c:{b:[445,139,854,562],uid:13587,sr:cp.fd,ip:'dr/si13587.png',dn:'si13587',visible:0,effectiveVi:1,JSONEffectData:false,accstr:'Relationships:The way people are connected and how they act toward one another. ',traccstr:'',ti:-1,acclng:'',sc:'#42a591',sw:0,ss:0,fa:100,bc:'#ffffff',p0:[[0],[1,649.5,139],[3,536.56,139,445,233.69,445,350.5],[3,445,467.3,536.56,562,649.5,562],[3,762.44,562,854,467.3,854,350.5],[3,854,233.69,762.44,139,649.5,139],[4]],svg:false,vbwr:[445,139,854,562],vb:[445,139,854,562]},si13598:{type:612,from:1081,to:1170,rp:0,rpa:0,mdi:'si13598c',retainState:false,immo:false,apsn:'Slide13717',JSONTT_4:[],cpa:true,oca:'cp.jumpToNextSlide();',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,trin:0,trout:0,bstin:'SmartShape_WheelInfo_53',stl:[{stn:'Normal',stt:0,stsi:[13598]}],stis:0,bstiid:13565,sipst:9,sicbs:true,sihhs:false,sihds:false,isDD:false},si13598c:{b:[445,139,854,562],uid:13598,sr:cp.fd,ip:'dr/si13598.png',dn:'si13598',visible:0,effectiveVi:1,JSONEffectData:false,accstr:'Sexual Activity:One way people experience or express their sexuality. Sexual activity includes kissing, sexual touching, and sexual intercourse (e.g. oral, anal, vaginal). ',traccstr:'',ti:-1,acclng:'',sc:'#42a591',sw:0,ss:0,fa:100,bc:'#ffffff',p0:[[0],[1,649.5,139],[3,536.56,139,445,233.69,445,350.5],[3,445,467.3,536.56,562,649.5,562],[3,762.44,562,854,467.3,854,350.5],[3,854,233.69,762.44,139,649.5,139],[4]],svg:false,vbwr:[445,139,854,562],vb:[445,139,854,562]},si13609:{type:612,from:1081,to:1170,rp:0,rpa:0,mdi:'si13609c',retainState:false,immo:false,apsn:'Slide13717',JSONTT_4:[],cpa:true,oca:'cp.jumpToNextSlide();',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,trin:0,trout:0,bstin:'SmartShape_WheelInfo_53',stl:[{stn:'Normal',stt:0,stsi:[13609]}],stis:0,bstiid:13565,sipst:9,sicbs:true,sihhs:false,sihds:false,isDD:false},si13609c:{b:[445,139,854,562],uid:13609,sr:cp.fd,ip:'dr/si13609.png',dn:'si13609',visible:0,effectiveVi:1,JSONEffectData:false,accstr:'Communication:The way people connect and share information, goals, ideas, comments, and create understanding. ',traccstr:'',ti:-1,acclng:'',sc:'#42a591',sw:0,ss:0,fa:100,bc:'#ffffff',p0:[[0],[1,649.5,139],[3,536.56,139,445,233.69,445,350.5],[3,445,467.3,536.56,562,649.5,562],[3,762.44,562,854,467.3,854,350.5],[3,854,233.69,762.44,139,649.5,139],[4]],svg:false,vbwr:[445,139,854,562],vb:[445,139,854,562]},si13620:{type:612,from:1081,to:1170,rp:0,rpa:0,mdi:'si13620c',retainState:false,immo:false,apsn:'Slide13717',JSONTT_4:[],cpa:true,oca:'cp.jumpToNextSlide();',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,trin:0,trout:0,bstin:'SmartShape_WheelInfo_53',stl:[{stn:'Normal',stt:0,stsi:[13620]}],stis:0,bstiid:13565,sipst:9,sicbs:true,sihhs:false,sihds:false,isDD:false},si13620c:{b:[445,139,854,562],uid:13620,sr:cp.fd,ip:'dr/si13620.png',dn:'si13620',visible:0,effectiveVi:1,JSONEffectData:false,accstr:'Socialization:Learned behaviours that include customs, attitudes, and values that are acceptable to a social group, community, or culture. ',traccstr:'',ti:-1,acclng:'',sc:'#42a591',sw:0,ss:0,fa:100,bc:'#ffffff',p0:[[0],[1,649.5,139],[3,536.56,139,445,233.69,445,350.5],[3,445,467.3,536.56,562,649.5,562],[3,762.44,562,854,467.3,854,350.5],[3,854,233.69,762.44,139,649.5,139],[4]],svg:false,vbwr:[445,139,854,562],vb:[445,139,854,562]},si13631:{type:612,from:1081,to:1170,rp:0,rpa:0,mdi:'si13631c',retainState:false,immo:false,apsn:'Slide13717',JSONTT_4:[],cpa:true,oca:'cp.jumpToNextSlide();',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,trin:0,trout:0,bstin:'SmartShape_WheelInfo_53',stl:[{stn:'Normal',stt:0,stsi:[13631]}],stis:0,bstiid:13565,sipst:9,sicbs:true,sihhs:false,sihds:false,isDD:false},si13631c:{b:[445,139,854,562],uid:13631,sr:cp.fd,ip:'dr/si13631.png',dn:'si13631',visible:0,effectiveVi:1,JSONEffectData:false,accstr:'Self Image:How a person thinks about or sees themselves, including their personality, their appearance, and their values. ',traccstr:'',ti:-1,acclng:'',sc:'#42a591',sw:0,ss:0,fa:100,bc:'#ffffff',p0:[[0],[1,649.5,139],[3,536.56,139,445,233.69,445,350.5],[3,445,467.3,536.56,562,649.5,562],[3,762.44,562,854,467.3,854,350.5],[3,854,233.69,762.44,139,649.5,139],[4]],svg:false,vbwr:[445,139,854,562],vb:[445,139,854,562]},si13642:{type:612,from:1081,to:1170,rp:0,rpa:0,mdi:'si13642c',retainState:false,immo:false,apsn:'Slide13717',JSONTT_4:[],cpa:true,oca:'cp.jumpToNextSlide();',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,trin:0,trout:0,bstin:'SmartShape_WheelInfo_53',stl:[{stn:'Normal',stt:0,stsi:[13642]}],stis:0,bstiid:13565,sipst:9,sicbs:true,sihhs:false,sihds:false,isDD:false},si13642c:{b:[445,139,854,562],uid:13642,sr:cp.fd,ip:'dr/si13642.png',dn:'si13642',visible:0,effectiveVi:1,JSONEffectData:false,accstr:'Experiences:What people have done, gone through, or been exposed to in their life. Personal experience helps form people’s values. ',traccstr:'',ti:-1,acclng:'',sc:'#42a591',sw:0,ss:0,fa:100,bc:'#ffffff',p0:[[0],[1,649.5,139],[3,536.56,139,445,233.69,445,350.5],[3,445,467.3,536.56,562,649.5,562],[3,762.44,562,854,467.3,854,350.5],[3,854,233.69,762.44,139,649.5,139],[4]],svg:false,vbwr:[445,139,854,562],vb:[445,139,854,562]},si13653:{type:612,from:1081,to:1170,rp:0,rpa:0,mdi:'si13653c',retainState:false,immo:false,apsn:'Slide13717',JSONTT_4:[],cpa:true,oca:'cp.jumpToNextSlide();',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,trin:0,trout:0,bstin:'SmartShape_WheelInfo_53',stl:[{stn:'Normal',stt:0,stsi:[13653]}],stis:0,bstiid:13565,sipst:9,sicbs:true,sihhs:false,sihds:false,isDD:false},si13653c:{b:[445,139,854,562],uid:13653,sr:cp.fd,ip:'dr/si13653.png',dn:'si13653',visible:0,effectiveVi:1,JSONEffectData:false,accstr:'Sex: Categories (male, female) to which people are typically assigned at birth based on physical characteristics (e.g. genitals). Some people may be assigned intersex when their reproductive, sexual, or genetic biology doesn’t fit the traditional definitions of male or female. ',traccstr:'',ti:-1,acclng:'',sc:'#42a591',sw:0,ss:0,fa:100,bc:'#ffffff',p0:[[0],[1,649.5,139],[3,536.56,139,445,233.69,445,350.5],[3,445,467.3,536.56,562,649.5,562],[3,762.44,562,854,467.3,854,350.5],[3,854,233.69,762.44,139,649.5,139],[4]],svg:false,vbwr:[445,139,854,562],vb:[445,139,854,562]},si13664:{type:612,from:1081,to:1170,rp:0,rpa:0,mdi:'si13664c',retainState:false,immo:false,apsn:'Slide13717',JSONTT_4:[],cpa:true,oca:'cp.jumpToNextSlide();',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,trin:0,trout:0,bstin:'SmartShape_WheelInfo_53',stl:[{stn:'Normal',stt:0,stsi:[13664]}],stis:0,bstiid:13565,sipst:9,sicbs:true,sihhs:false,sihds:false,isDD:false},si13664c:{b:[445,139,854,562],uid:13664,sr:cp.fd,ip:'dr/si13664.png',dn:'si13664',visible:0,effectiveVi:1,JSONEffectData:false,accstr:'Sexual Orientation:A person’s emotional and sexual attraction to other people. It can be fluid and may or may not reflect sexual behaviours. ',traccstr:'',ti:-1,acclng:'',sc:'#42a591',sw:0,ss:0,fa:100,bc:'#ffffff',p0:[[0],[1,649.5,139],[3,536.56,139,445,233.69,445,350.5],[3,445,467.3,536.56,562,649.5,562],[3,762.44,562,854,467.3,854,350.5],[3,854,233.69,762.44,139,649.5,139],[4]],svg:false,vbwr:[445,139,854,562],vb:[445,139,854,562]},si13675:{type:612,from:1081,to:1170,rp:0,rpa:0,mdi:'si13675c',retainState:false,immo:false,apsn:'Slide13717',JSONTT_4:[],cpa:true,oca:'cp.jumpToNextSlide();',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,trin:0,trout:0,bstin:'SmartShape_WheelInfo_53',stl:[{stn:'Normal',stt:0,stsi:[13675]}],stis:0,bstiid:13565,sipst:9,sicbs:true,sihhs:false,sihds:false,isDD:false},si13675c:{b:[445,139,854,562],uid:13675,sr:cp.fd,ip:'dr/si13675.png',dn:'si13675',visible:0,effectiveVi:1,JSONEffectData:false,accstr:'Gender Expression:How a person presents their gender. This can include appearance, name, pronoun, and social behaviour. ',traccstr:'',ti:-1,acclng:'',sc:'#42a591',sw:0,ss:0,fa:100,bc:'#ffffff',p0:[[0],[1,649.5,139],[3,536.56,139,445,233.69,445,350.5],[3,445,467.3,536.56,562,649.5,562],[3,762.44,562,854,467.3,854,350.5],[3,854,233.69,762.44,139,649.5,139],[4]],svg:false,vbwr:[445,139,854,562],vb:[445,139,854,562]},si13686:{type:612,from:1081,to:1170,rp:0,rpa:0,mdi:'si13686c',retainState:false,immo:false,apsn:'Slide13717',JSONTT_4:[],cpa:true,oca:'cp.jumpToNextSlide();',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,trin:0,trout:0,bstin:'SmartShape_WheelInfo_53',stl:[{stn:'Normal',stt:0,stsi:[13686]}],stis:0,bstiid:13565,sipst:9,sicbs:true,sihhs:false,sihds:false,isDD:false},si13686c:{b:[445,139,854,562],uid:13686,sr:cp.fd,ip:'dr/si13686.png',dn:'si13686',visible:0,effectiveVi:1,JSONEffectData:false,accstr:'Gender Identity:A person’s internal sense of identity as female, male, both, or neither, regardless of their sex assigned at birth. ',traccstr:'',ti:-1,acclng:'',sc:'#42a591',sw:0,ss:0,fa:100,bc:'#ffffff',p0:[[0],[1,649.5,139],[3,536.56,139,445,233.69,445,350.5],[3,445,467.3,536.56,562,649.5,562],[3,762.44,562,854,467.3,854,350.5],[3,854,233.69,762.44,139,649.5,139],[4]],svg:false,vbwr:[445,139,854,562],vb:[445,139,854,562]},si13697:{type:612,from:1081,to:1170,rp:0,rpa:0,mdi:'si13697c',retainState:false,immo:false,apsn:'Slide13717',JSONTT_4:[],cpa:true,oca:'cp.jumpToNextSlide();',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,trin:0,trout:0,bstin:'SmartShape_WheelInfo_53',stl:[{stn:'Normal',stt:0,stsi:[13697]}],stis:0,bstiid:13565,sipst:9,sicbs:true,sihhs:false,sihds:false,isDD:false},si13697c:{b:[445,139,854,562],uid:13697,sr:cp.fd,ip:'dr/si13697.png',dn:'si13697',visible:0,effectiveVi:1,JSONEffectData:false,accstr:'Personality:A combination of traits or characteristics that make up a person’s unique character. ',traccstr:'',ti:-1,acclng:'',sc:'#42a591',sw:0,ss:0,fa:100,bc:'#ffffff',p0:[[0],[1,649.5,139],[3,536.56,139,445,233.69,445,350.5],[3,445,467.3,536.56,562,649.5,562],[3,762.44,562,854,467.3,854,350.5],[3,854,233.69,762.44,139,649.5,139],[4]],svg:false,vbwr:[445,139,854,562],vb:[445,139,854,562]},Slide13717:{lb:'',id:13717,from:1081,to:1170,iols:0,i360qs:false,propTxtScaling:false,minFontSizeScaling:14,useng:true,transition:{type:0},mmot:false,mdi:'Slide13717c',st:'Normal Slide',ccProperties:{1280:{pos:7,x:35,y:88}},audCC:[],vidCC:[],accstr:' ',si:[{n:'Image_28',t:15},{n:'Text_Caption_19',t:19},{n:'SmartShape_29',t:612},{n:'si12664',t:612},{n:'Text_Caption_20',t:19},{n:'si12677',t:612},{n:'Text_Caption_21',t:19},{n:'si12690',t:612},{n:'SmartShape_30',t:612},{n:'Image_29',t:15},{n:'SmartShape_31',t:612},{n:'si12747',t:612},{n:'Text_Caption_22',t:19},{n:'si12760',t:612},{n:'Text_Caption_23',t:19},{n:'si12773',t:612},{n:'SmartShape_32',t:612},{n:'Image_30',t:15},{n:'SmartShape_33',t:612},{n:'si12821',t:612},{n:'Text_Caption_24',t:19},{n:'si12834',t:612},{n:'Text_Caption_25',t:19},{n:'si12847',t:612},{n:'SmartShape_34',t:612},{n:'Image_31',t:15},{n:'SmartShape_35',t:612},{n:'si12895',t:612},{n:'Text_Caption_26',t:19},{n:'si12908',t:612},{n:'Text_Caption_27',t:19},{n:'si12921',t:612},{n:'SmartShape_36',t:612},{n:'Image_32',t:15},{n:'SmartShape_37',t:612},{n:'si12969',t:612},{n:'Text_Caption_28',t:19},{n:'si12982',t:612},{n:'Text_Caption_29',t:19},{n:'si12995',t:612},{n:'SmartShape_38',t:612},{n:'Image_33',t:15},{n:'SmartShape_39',t:612},{n:'si13043',t:612},{n:'Text_Caption_30',t:19},{n:'si13056',t:612},{n:'Text_Caption_31',t:19},{n:'si13069',t:612},{n:'SmartShape_40',t:612},{n:'Image_34',t:15},{n:'SmartShape_41',t:612},{n:'si13117',t:612},{n:'Text_Caption_32',t:19},{n:'si13130',t:612},{n:'Text_Caption_33',t:19},{n:'si13143',t:612},{n:'SmartShape_42',t:612},{n:'Image_35',t:15},{n:'SmartShape_43',t:612},{n:'si13195',t:612},{n:'Text_Caption_34',t:19},{n:'si13210',t:612},{n:'Text_Caption_35',t:19},{n:'si13225',t:612},{n:'SmartShape_44',t:612},{n:'Image_36',t:15},{n:'SmartShape_45',t:612},{n:'si13273',t:612},{n:'Text_Caption_36',t:19},{n:'si13286',t:612},{n:'Text_Caption_37',t:19},{n:'si13299',t:612},{n:'SmartShape_46',t:612},{n:'Image_37',t:15},{n:'SmartShape_47',t:612},{n:'si13347',t:612},{n:'Text_Caption_38',t:19},{n:'si13360',t:612},{n:'Text_Caption_39',t:19},{n:'si13373',t:612},{n:'SmartShape_48',t:612},{n:'Image_38',t:15},{n:'SmartShape_49',t:612},{n:'si13421',t:612},{n:'Text_Caption_40',t:19},{n:'si13434',t:612},{n:'Text_Caption_41',t:19},{n:'si13447',t:612},{n:'SmartShape_50',t:612},{n:'Image_39',t:15},{n:'SmartShape_51',t:612},{n:'si13495',t:612},{n:'Text_Caption_42',t:19},{n:'si13508',t:612},{n:'Text_Caption_43',t:19},{n:'si13521',t:612},{n:'SmartShape_52',t:612},{n:'Image_40',t:15},{n:'SmartShape_WheelInfo_53',t:612},{n:'si13576',t:612},{n:'si13587',t:612},{n:'si13598',t:612},{n:'si13609',t:612},{n:'si13620',t:612},{n:'si13631',t:612},{n:'si13642',t:612},{n:'si13653',t:612},{n:'si13664',t:612},{n:'si13675',t:612},{n:'si13686',t:612},{n:'si13697',t:612}],iph:[],v:false,bc:'#ffffff',JSONTT_0:[],sea:'cpCmndPause = 1;\
cp.hide("SmartShape_WheelInfo_53");',JSONTT_6:[],qs:''},Slide13717c:{b:[0,0,0,0],sr:cp.fd,uid:13717,dn:'Slide13717',visible:'1'},Text_Caption_44:{type:19,from:1171,to:1260,rp:0,rpa:0,mdi:'Text_Caption_44c',retainState:false,immo:false,apsn:'Slide13759',iflbx:false,ipflbx:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[13727]}],stis:0,bstiid:-1,sipst:0,sicbs:false,sihhs:false,sihds:false,isDD:false},Text_Caption_44c:{b:[69,20,1204,83],uid:13727,sr:cp.fd,ip:'dr/Text_Caption_44.png',dn:'Text_Caption_44',visible:1,effectiveVi:1,JSONEffectData:false,accstr:'Why does sexuality education matter? ',traccstr:'',ti:-1,acclng:'',vbwr:[69,20,1204,83],vb:[69,20,1204,83]},Video_Object_2:{type:98,from:1171,to:1260,rp:0,rpa:0,mdi:'Video_Object_2c',retainState:false,immo:false,apsn:'Slide13759',iflbx:false,ipflbx:true,psv:1258,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[13743]}],stis:0,bstiid:-1,sipst:0,sicbs:false,sihhs:false,sihds:false,isDD:false},Video_Object_2c:{b:[162,90,1245,699],uid:13743,dn:'Video_Object_2',visible:1,effectiveVi:1,JSONEffectData:false,accstr:'Video ',traccstr:'',ti:-1,acclng:'',mp4:'vr/Vi4.mp4',vss:{vsRtt:'Rewind Video',vsPtt:'Play/Pause Video',vsStt:'Stop Video',vsFtt:'Switch to Full Screen',vsVtt:'Set Volume',vsMtt:'Mute/Unmute Sound',vsREb:'Rewind',vsPLb:'Play',vsPAb:'Pause',vsSTb:'Stop',vsPRb:'Progress, Video at ',vsFSb:'Full Screen',vsVOb:'Volume set to ',vsMUb:'Mute',vsUNb:'Unmute'},svc:true,au:0,ar:0,l:0,vbwr:[162,90,1246,700],vb:[162,90,1246,700]},Slide13759:{lb:'',id:13759,from:1171,to:1260,iols:0,i360qs:false,propTxtScaling:false,minFontSizeScaling:14,useng:true,transition:{type:0},mmot:false,mdi:'Slide13759c',st:'Normal Slide',ccProperties:{1280:{pos:7,x:35,y:88}},audCC:[],vidCC:[],accstr:' ',si:[{n:'Text_Caption_44',t:19},{n:'Video_Object_2',t:98}],iph:[],v:false,bc:'#ffffff',JSONTT_0:[],JSONTT_6:[],qs:''},Slide13759c:{b:[0,0,0,0],sr:cp.fd,uid:13759,dn:'Slide13759',visible:'1'},Image_41:{type:15,from:1261,to:1350,rp:0,rpa:0,mdi:'Image_41c',retainState:false,immo:false,apsn:'Slide13796',JSONTT_4:[],cpa:true,oca:'cp.jumpToNextSlide();',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[13770]}],stis:0,bstiid:-1,sipst:0,sicbs:false,sihhs:false,sihds:false,isDD:false},Image_41c:{b:[-73,122,1346,1221],uid:13770,sr:cp.fd,ip:'dr/10776_1419_1099Tr61.png',dn:'Image_41',visible:1,effectiveVi:1,JSONEffectData:false,accstr:'Image ',traccstr:'',ti:-1,acclng:'',vbwr:[-73,122,1346,1221],tr:'rotate(31deg)',vb:[-255,-165,1528,1508]},Text_Caption_45:{type:19,from:1261,to:1350,rp:0,rpa:0,mdi:'Text_Caption_45c',retainState:false,immo:false,apsn:'Slide13796',iflbx:false,ipflbx:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[13780]}],stis:0,bstiid:-1,sipst:0,sicbs:false,sihhs:false,sihds:false,isDD:false},Text_Caption_45c:{b:[121,133,1159,588],uid:13780,sr:cp.fd,ip:'dr/Text_Caption_45.png',dn:'Text_Caption_45',visible:1,effectiveVi:1,JSONEffectData:false,accstr:'Sexual health education can give students of all ages the knowledge and skills they need to make and act upon healthy decisions.Teachers play a key role in teaching comprehensive programs designed to promote sexual health. ',traccstr:'',ti:-1,acclng:'',vbwr:[121,133,1159,588],vb:[121,133,1159,588]},Slide13796:{lb:'',id:13796,from:1261,to:1350,iols:0,i360qs:false,propTxtScaling:false,minFontSizeScaling:14,useng:true,transition:{type:0},mmot:false,mdi:'Slide13796c',st:'Normal Slide',ccProperties:{1280:{pos:7,x:35,y:88}},audCC:[],vidCC:[],accstr:' ',si:[{n:'Image_41',t:15},{n:'Text_Caption_45',t:19}],iph:[],v:false,bc:'#ffffff',JSONTT_0:[],sea:'cpCmndPause = 1;',JSONTT_6:[],qs:''},Slide13796c:{b:[0,0,0,0],sr:cp.fd,uid:13796,dn:'Slide13796',visible:'1'},Text_Caption_46:{type:19,from:1351,to:1401,rp:0,rpa:0,mdi:'Text_Caption_46c',retainState:false,immo:false,apsn:'Slide13838',iflbx:false,ipflbx:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[13806]}],stis:0,bstiid:-1,sipst:0,sicbs:false,sihhs:false,sihds:false,isDD:false},Text_Caption_46c:{b:[69,20,1204,83],uid:13806,sr:cp.fd,ip:'dr/Text_Caption_46.png',dn:'Text_Caption_46',visible:1,effectiveVi:1,JSONEffectData:false,accstr:'Exploring challenges and biases... ',traccstr:'',ti:-1,acclng:'',vbwr:[69,20,1204,83],vb:[69,20,1204,83]},Video_Object_3:{type:98,from:1351,to:1401,rp:0,rpa:0,mdi:'Video_Object_3c',retainState:false,immo:false,apsn:'Slide13838',iflbx:false,ipflbx:true,psv:1399,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[13822]}],stis:0,bstiid:-1,sipst:0,sicbs:false,sihhs:false,sihds:false,isDD:false},Video_Object_3c:{b:[182,91,1242,687],uid:13822,dn:'Video_Object_3',visible:1,effectiveVi:1,JSONEffectData:false,accstr:'Video ',traccstr:'',ti:-1,acclng:'',mp4:'vr/Vi6.mp4',vss:{vsRtt:'Rewind Video',vsPtt:'Play/Pause Video',vsStt:'Stop Video',vsFtt:'Switch to Full Screen',vsVtt:'Set Volume',vsMtt:'Mute/Unmute Sound',vsREb:'Rewind',vsPLb:'Play',vsPAb:'Pause',vsSTb:'Stop',vsPRb:'Progress, Video at ',vsFSb:'Full Screen',vsVOb:'Volume set to ',vsMUb:'Mute',vsUNb:'Unmute'},svc:true,au:0,ar:0,l:0,vbwr:[182,91,1243,688],vb:[182,91,1243,688]},Slide13838:{lb:'',id:13838,from:1351,to:1401,iols:0,i360qs:false,propTxtScaling:false,minFontSizeScaling:14,useng:true,transition:{type:0},mmot:false,mdi:'Slide13838c',st:'Normal Slide',ccProperties:{1280:{pos:7,x:35,y:88}},audCC:[],vidCC:[],accstr:' ',si:[{n:'Text_Caption_46',t:19},{n:'Video_Object_3',t:98}],iph:[],v:false,bc:'#ffffff',JSONTT_0:[],sea:'cpCmndPause = 1;',JSONTT_6:[],qs:''},Slide13838c:{b:[0,0,0,0],sr:cp.fd,uid:13838,dn:'Slide13838',visible:'1'},Image_42:{type:15,from:1402,to:1491,rp:0,rpa:0,mdi:'Image_42c',retainState:false,immo:false,apsn:'Slide14068',JSONTT_4:[],cpa:true,oca:'cp.jumpToNextSlide();',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[13866]}],stis:0,bstiid:-1,sipst:0,sicbs:false,sihhs:false,sihds:false,isDD:false},Image_42c:{b:[-687,-621,979,365],uid:13866,sr:cp.fd,ip:'dr/11200_1666_986Tr90.png',dn:'Image_42',visible:1,effectiveVi:1,JSONEffectData:false,accstr:'Image ',traccstr:'',ti:-1,acclng:'',vbwr:[-687,-621,979,365],vb:[-687,-621,979,365]},si13880:{type:86,from:1402,to:1492,rp:0,rpa:0,mdi:'si13880c',retainState:false,immo:false,apsn:'Slide14068',iflbx:false,ipflbx:true,trin:0,trout:0,isDD:false},si13880c:{b:[80,54,1170,139],uid:13880,sr:cp.fd,ip:'dr/si13880.png',dn:'si13880',visible:1,effectiveVi:1,JSONEffectData:false,accstr:'True/False ',traccstr:'',ti:-1,acclng:'',t:86,vbwr:[79,53,1170,139],vb:[79,53,1170,139]},si13892:{type:79,from:1402,to:1492,rp:0,rpa:0,mdi:'si13892c',retainState:false,immo:false,apsn:'Slide14068',iflbx:false,ipflbx:true,trin:0,trout:0,isDD:false},si13892c:{b:[84,148,1229,315],uid:13892,sr:cp.fd,ip:'dr/si13892.png',dn:'si13892',visible:1,effectiveVi:1,JSONEffectData:false,accstr:'The more a child knows about healthy sexuality, the more they are likely to experiment sexually. ',traccstr:'',ti:-1,acclng:'',t:79,sc:'#000000',sw:2,ss:0,fa:100,bc:'#ffffff',vbwr:[82,146,1230,316],vb:[82,146,1230,316]},si13903:{type:10088,from:1402,to:1492,rp:0,rpa:0,mdi:'si13903c',retainState:false,immo:false,apsn:'Slide14068',iflbx:false,ipflbx:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[13903]}],stis:0,bstiid:-1,sipst:0,sicbs:false,sihhs:false,sihds:false,isDD:false},si13903c:{b:[107,349,143,396],uid:13903,sr:cp.fd,ip:'dr/si13903.png',dn:'si13903',visible:1,effectiveVi:1,JSONEffectData:false,accstr:'A) ',traccstr:'',ti:-1,acclng:'',vbwr:[107,349,143,396],vb:[107,349,143,396]},si13907:{type:80,from:1402,to:1492,rp:0,rpa:0,mdi:'si13907c',retainState:false,immo:false,apsn:'Slide14068',iflbx:false,ipflbx:true,qdi:'si13907r',ta:0,txtl:1,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[13907]}],stis:0,bstiid:-1,sipst:0,sicbs:false,sihhs:false,sihds:false,isDD:false},si13907c:{b:[148,347,1207,399],uid:13907,sr:cp.fd,ip:'dr/si13907.png',dn:'si13907',visible:1,effectiveVi:1,JSONEffectData:false,accstr:'True ',traccstr:'',ti:-1,acclng:'',isTrue:true,aid:'A',at:10082,atxtlms:'True',ti:0,ad:'',ic:false,ap:0,vbwr:[148,347,1207,399],vb:[148,347,1207,399]},si13907r:{b:[62,349,82,396],type:'radio',visible:1,ahn:'si13903_a',cn:'si13903c',actid:'si13907',aan:'si13925',aid:'A',rqs:'Slide14068',ic:false,ahl:148,aht:347,accstr:'',vbwr:[62,349,82,396],vb:[62,349,82,396]},si13914:{type:10088,from:1402,to:1492,rp:0,rpa:0,mdi:'si13914c',retainState:false,immo:false,apsn:'Slide14068',iflbx:false,ipflbx:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[13914]}],stis:0,bstiid:-1,sipst:0,sicbs:false,sihhs:false,sihds:false,isDD:false},si13914c:{b:[107,401,142,448],uid:13914,sr:cp.fd,ip:'dr/si13914.png',dn:'si13914',visible:1,effectiveVi:1,JSONEffectData:false,accstr:'B) ',traccstr:'',ti:-1,acclng:'',vbwr:[107,401,142,448],vb:[107,401,142,448]},si13918:{type:80,from:1402,to:1492,rp:0,rpa:0,mdi:'si13918c',retainState:false,immo:false,apsn:'Slide14068',iflbx:false,ipflbx:true,qdi:'si13918r',ta:0,txtl:1,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[13918]}],stis:0,bstiid:-1,sipst:0,sicbs:false,sihhs:false,sihds:false,isDD:false},si13918c:{b:[147,399,1207,450],uid:13918,sr:cp.fd,ip:'dr/si13918.png',dn:'si13918',visible:1,effectiveVi:1,JSONEffectData:false,accstr:'False ',traccstr:'',ti:-1,acclng:'',isTrue:false,aid:'B',at:10082,atxtlms:'False',ti:0,ad:'',ic:true,ap:0,vbwr:[147,399,1207,450],vb:[147,399,1207,450]},si13918r:{b:[62,401,82,448],type:'radio',visible:1,ahn:'si13914_a',cn:'si13914c',actid:'si13918',aan:'si13925',aid:'B',rqs:'Slide14068',ic:true,ahl:147,aht:399,accstr:'',vbwr:[62,401,82,448],vb:[62,401,82,448]},si13986:{type:91,from:1402,to:1492,rp:0,rpa:0,mdi:'si13986c',retainState:false,immo:false,apsn:'Slide14068',iflbx:false,ipflbx:true,chfn:cp.qsbch,enabled:1,amc:true,isDDB:false,subt:2,itr:false,stopt:true,sn:'Slide14068',iqb:true,qbt:'submit',pa:1447,ma:1,oca:'continue',eh:cp.qbKH,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[13986]},{stn:'RollOver',stt:2,stsi:[13998]},{stn:'Down',stt:1,stsi:[14010]}],stis:0,bstiid:-1,sipst:0,sicbs:false,sihhs:true,sihds:true,stc:['si13986','si13998','si14010'],isDD:false},si13986c:{b:[103,474,242,522],uid:13986,sr:cp.fd,ip:'dr/si13986.png',dn:'si13986',visible:1,effectiveVi:1,JSONEffectData:false,accstr:'SUBMIT ',traccstr:'',ti:2500,acclng:'',vbwr:[103,474,242,522],vb:[103,474,242,522]},si13998:{type:91,from:1402,to:1492,rp:0,rpa:0,mdi:'si13998c',retainState:false,immo:false,apsn:'Slide14068',iflbx:false,ipflbx:true,chfn:cp.qsbch,enabled:1,amc:true,isDDB:false,subt:2,itr:false,sn:'Slide14068',iqb:true,qbt:'submit',pa:1447,ma:1,oca:'continue',eh:cp.qbKH,trin:0,trout:0,bstin:'si13986',stl:[{stn:'Normal',stt:0,stsi:[13998]}],stis:0,bstiid:13986,sipst:2,sicbs:true,sihhs:true,sihds:true,isDD:false},si13998c:{b:[103,474,242,522],uid:13998,sr:cp.fd,ip:'dr/si13998.png',dn:'si13998',visible:0,effectiveVi:1,JSONEffectData:false,accstr:'SUBMIT ',traccstr:'',ti:2500,acclng:'',vbwr:[103,474,242,522],vb:[103,474,242,522]},si14010:{type:91,from:1402,to:1492,rp:0,rpa:0,mdi:'si14010c',retainState:false,immo:false,apsn:'Slide14068',iflbx:false,ipflbx:true,chfn:cp.qsbch,enabled:1,amc:true,isDDB:false,subt:2,itr:false,sn:'Slide14068',iqb:true,qbt:'submit',pa:1447,ma:1,oca:'continue',eh:cp.qbKH,trin:0,trout:0,bstin:'si13986',stl:[{stn:'Normal',stt:0,stsi:[14010]}],stis:0,bstiid:13986,sipst:1,sicbs:true,sihhs:true,sihds:true,isDD:false},si14010c:{b:[103,474,242,522],uid:14010,sr:cp.fd,ip:'dr/si14010.png',dn:'si14010',visible:0,effectiveVi:1,JSONEffectData:false,accstr:'SUBMIT ',traccstr:'',ti:2500,acclng:'',vbwr:[103,474,242,522],vb:[103,474,242,522]},si13956:{type:10174,from:1402,to:1491,rp:0,rpa:0,mdi:'si13956c',retainState:false,immo:false,apsn:'Slide14068',JSONTT_4:[],cpa:true,oca:'cp.jumpToNextSlide();',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,sc:{k:89,s:0,c:0,a:0},stl:[{stn:'Normal',stt:0,stsi:[13956]}],stis:0,bstiid:-1,sipst:0,sicbs:false,sihhs:false,sihds:false,isDD:false},si13956c:{b:[260,529,1021,613],uid:13956,sr:cp.fd,ip:'dr/si13956.png',dn:'si13956',visible:0,effectiveVi:0,JSONEffectData:false,accstr:'You must answer the question before continuing. ',traccstr:'',ti:-1,acclng:'',sc:'#ffffff',sw:0,ss:0,fa:100,bc:'#ffffff',p0:[[0],[1,260.00,529],[2,260.00,613],[2,1021,613],[2,1021,529],[2,260.00,529],[4]],svg:false,vbwr:[260,529,1021,613],vb:[260,529,1021,613]},si14041:{type:10166,from:1402,to:1491,rp:0,rpa:0,mdi:'si14041c',retainState:false,immo:false,apsn:'Slide14068',JSONTT_4:[],cpa:true,oca:'cp.jumpToNextSlide();',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,sc:{k:89,s:0,c:0,a:0},stl:[{stn:'Normal',stt:0,stsi:[14041]}],stis:0,bstiid:-1,sipst:0,sicbs:false,sihhs:false,sihds:false,isDD:false},si14041c:{b:[248,474,1258,720],uid:14041,sr:cp.fd,ip:'dr/si14041.png',dn:'si14041',visible:0,effectiveVi:0,JSONEffectData:false,accstr:'CorrectComprehensive sexual health education generally leads to a later first sexual encounter, not greater experimentation. Additionally, “a lack of high-quality, age- and developmentally-appropriate sexuality and relationship education may leave children and young people vulnerable to harmful sexual behaviours and sexual exploitation.” UNESCOClick anywhere or press ‘y’ to continue. ',traccstr:'',ti:-1,acclng:'',sc:'#0080ff',sw:0,ss:0,fa:100,bc:'#ffffff',p0:[[0],[1,248,474],[2,248,720.00],[2,1258,720.00],[2,1258,474],[2,248,474],[4]],svg:false,vbwr:[248,474,1258,720],vb:[248,474,1258,720]},si14054:{type:10172,from:1402,to:1491,rp:0,rpa:0,mdi:'si14054c',retainState:false,immo:false,apsn:'Slide14068',JSONTT_4:[],cpa:true,oca:'cp.jumpToNextSlide();',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,sc:{k:89,s:0,c:0,a:0},stl:[{stn:'Normal',stt:0,stsi:[14054]}],stis:0,bstiid:-1,sipst:0,sicbs:false,sihhs:false,sihds:false,isDD:false},si14054c:{b:[244,481,1273,716],uid:14054,sr:cp.fd,ip:'dr/si14054.png',dn:'si14054',visible:0,effectiveVi:0,JSONEffectData:false,accstr:'Incorrect Comprehensive sexual health education generally leads to a later first sexual encounter, not greater experimentation. Please try again ',traccstr:'',ti:-1,acclng:'',sc:'#ffffff',sw:0,ss:0,fa:100,bc:'#ffffff',p0:[[0],[1,244,481],[2,244,716],[2,1273,716],[2,1273,481],[2,244,481],[4]],svg:false,vbwr:[244,481,1273,716],vb:[244,481,1273,716]},Slide14068:{lb:'',id:14068,from:1402,to:1491,iols:0,i360qs:false,propTxtScaling:false,minFontSizeScaling:14,useng:true,transition:{type:0},mmot:false,mdi:'Slide14068c',st:'Question Slide',ccProperties:{1280:{pos:7,x:35,y:88}},audCC:[],vidCC:[],accstr:' ',si:[{n:'Image_42',t:15},{n:'si13880',t:86},{n:'si13892',t:79},{n:'si13903',t:10088},{n:'si13907',t:80},{n:'si13914',t:10088},{n:'si13918',t:80},{n:'si13986',t:91},{n:'si13998',t:91},{n:'si14010',t:91},{n:'si13956',t:10174},{n:'si14041',t:10166},{n:'si14054',t:10172}],iph:[],v:false,bc:'#ffffff',JSONTT_0:[],sea:'cpCmndResume = 1;',qs:'Slide14068q0',qnq:0,pa:1445},Slide14068c:{b:[0,0,0,0],sr:cp.fd,uid:14068,dn:'Slide14068',visible:'1'},Slide14068q0:{noa:9999,qt:'The more a child knows about healthy sexuality, the more they are likely to experiment sexually.',it:false,is:false,ipq:false,ikc:true,ish:false,ips:false,qnq:0,sn:'Slide14068',oid:'Quiz_20231130112353',iid:'13853',sra:false,w:0,nw:0,itp:'true-false',cal:['B'],qtp:'MCQ',gn:'Slide14068_ag',tl:0,sfrc:true,frc:'si14054',ifc:[],ofct:false,ao:['si13907c:0','si13918c:1'],qtc:'si13892c',JSONTT_4:[],oca:'cp.jumpToNextSlide();',JSONTT_5:[],ofa:'cpCmndResume = 1;',oic:'si13956',sic:true,osc:'si14041',osct:true},SmartShape_54:{type:612,from:1492,to:1581,rp:0,rpa:0,mdi:'SmartShape_54c',retainState:false,immo:false,apsn:'Slide14138',JSONTT_4:[],cpa:true,oca:'cp.jumpToNextSlide();',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[14099]}],stis:0,bstiid:-1,sipst:0,sicbs:false,sihhs:false,sihds:false,isDD:false},SmartShape_54c:{b:[474,193,1220,587],uid:14099,dn:'SmartShape_54',visible:1,effectiveVi:1,JSONEffectData:false,accstr:' ',traccstr:'',ti:-1,acclng:'',sc:'#1a1a1a',sw:2,ss:0,fa:0,bc:'#e6e6e6',p0:[[0],[1,474,193],[2,474,587],[2,1220.00,587],[2,1220.00,193],[2,474,193],[4]],svg:false,vbwr:[470,189,1224,591],vb:[470,189,1224,591]},Image_43:{type:15,from:1492,to:1581,rp:0,rpa:0,mdi:'Image_43c',retainState:false,immo:false,apsn:'Slide14138',JSONTT_4:[],cpa:true,oca:'cp.jumpToNextSlide();',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[14110]}],stis:0,bstiid:-1,sipst:0,sicbs:false,sihhs:false,sihds:false,isDD:false},Image_43c:{b:[25,13,520,874],uid:14110,sr:cp.fd,ip:'dr/14102_495_861.png',dn:'Image_43',visible:1,effectiveVi:1,JSONEffectData:false,accstr:'Image ',traccstr:'',ti:-1,acclng:'',vbwr:[25,13,520,874],vb:[25,13,520,874]},Text_Caption_53:{type:19,from:1492,to:1581,rp:0,rpa:0,mdi:'Text_Caption_53c',retainState:false,immo:false,apsn:'Slide14138',iflbx:false,ipflbx:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[14118]}],stis:0,bstiid:-1,sipst:0,sicbs:false,sihhs:false,sihds:false,isDD:false},Text_Caption_53c:{b:[520,216,1184,541],uid:14118,sr:cp.fd,ip:'dr/Text_Caption_53.png',dn:'Text_Caption_53',visible:1,effectiveVi:1,JSONEffectData:false,accstr:'It’s important to recognize that everyone uses different language when talking about sexuality. It can take a while for students to become comfortable with using body science terms. ',traccstr:'',ti:-1,acclng:'',vbwr:[520,216,1184,541],vb:[520,216,1184,541]},Text_Caption_54:{type:19,from:1492,to:1581,rp:0,rpa:0,mdi:'Text_Caption_54c',retainState:false,immo:false,apsn:'Slide14138',iflbx:false,ipflbx:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[14122]}],stis:0,bstiid:-1,sipst:0,sicbs:false,sihhs:false,sihds:false,isDD:false},Text_Caption_54c:{b:[474,56,767,191],uid:14122,sr:cp.fd,ip:'dr/Text_Caption_54.png',dn:'Text_Caption_54',visible:1,effectiveVi:1,JSONEffectData:false,accstr:'SLANG ',traccstr:'',ti:-1,acclng:'',vbwr:[474,56,767,191],vb:[474,56,767,191]},Slide14138:{lb:'',id:14138,from:1492,to:1581,iols:0,i360qs:false,propTxtScaling:false,minFontSizeScaling:14,useng:true,transition:{type:0},mmot:false,mdi:'Slide14138c',st:'Normal Slide',ccProperties:{1280:{pos:7,x:35,y:88}},audCC:[],vidCC:[],accstr:' ',si:[{n:'SmartShape_54',t:612},{n:'Image_43',t:15},{n:'Text_Caption_53',t:19},{n:'Text_Caption_54',t:19}],iph:[],v:false,bc:'#ffffff',JSONTT_0:[],sea:'cpCmndPause = 1;',JSONTT_6:[],qs:''},Slide14138c:{b:[0,0,0,0],sr:cp.fd,uid:14138,dn:'Slide14138',visible:'1'},Image_44:{type:15,from:1582,to:1671,rp:0,rpa:0,mdi:'Image_44c',retainState:false,immo:false,apsn:'Slide14288',JSONTT_4:[],cpa:true,oca:'cp.jumpToNextSlide();',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[14149]}],stis:0,bstiid:-1,sipst:0,sicbs:false,sihhs:false,sihds:false,isDD:false},Image_44c:{b:[-61,41,388,774],uid:14149,sr:cp.fd,ip:'dr/14141_449_733.png',dn:'Image_44',visible:1,effectiveVi:1,JSONEffectData:false,accstr:'Image ',traccstr:'',ti:-1,acclng:'',vbwr:[-61,41,388,774],vb:[-61,41,388,774]},Line_1:{type:142,from:1582,to:1671,rp:0,rpa:0,mdi:'Line_1c',retainState:false,immo:false,apsn:'Slide14288',iflbx:false,ipflbx:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[14152]}],stis:0,bstiid:-1,sipst:0,sicbs:false,sihhs:false,sihds:false,isDD:false},Line_1c:{b:[945,308,945,354],uid:14152,dn:'Line_1',visible:1,effectiveVi:1,JSONEffectData:false,accstr:'Line Item ',traccstr:'',ti:-1,acclng:'',sc:'#333333',sw:5,sst:0,est:0,ss:0,x1:945,y1:308,x2:945,y2:354,vbwr:[942,305,948,357],vb:[942,305,948,357]},Line_2:{type:142,from:1582,to:1671,rp:0,rpa:0,mdi:'Line_2c',retainState:false,immo:false,apsn:'Slide14288',iflbx:false,ipflbx:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[14155]}],stis:0,bstiid:-1,sipst:0,sicbs:false,sihhs:false,sihds:false,isDD:false},Line_2c:{b:[640,308,640,354],uid:14155,dn:'Line_2',visible:1,effectiveVi:1,JSONEffectData:false,accstr:'Line Item ',traccstr:'',ti:-1,acclng:'',sc:'#333333',sw:5,sst:0,est:0,ss:0,x1:640,y1:308,x2:640,y2:354,vbwr:[637,305,643,357],vb:[637,305,643,357]},SmartShape_55:{type:612,from:1582,to:1671,rp:0,rpa:0,mdi:'SmartShape_55c',retainState:false,immo:false,apsn:'Slide14288',JSONTT_4:[],cpa:true,oca:'cp.jumpToNextSlide();',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[14190]}],stis:0,bstiid:-1,sipst:0,sicbs:false,sihhs:false,sihds:false,isDD:false},SmartShape_55c:{b:[603,350,678,426],uid:14190,sr:cp.fd,ip:'dr/SmartShape_55.png',dn:'SmartShape_55',visible:1,effectiveVi:1,JSONEffectData:false,accstr:'YES ',traccstr:'',ti:-1,acclng:'',sc:'#1a1a1a',sw:0,ss:0,fa:100,bc:'#ff87b3',p0:[[0],[1,640.5,350.00],[3,619.79,350.00,603,367.01,603,388],[3,603,408.99,619.79,426,640.5,426],[3,661.21,426,678,408.99,678,388],[3,678,367.01,661.21,350.00,640.5,350.00],[4]],svg:false,vbwr:[603,350,678,426],sh:{i:false,a:45,d:3,b:4,o:0.4,c:'rgb(0, 0, 0)'},vb:[603,350,682,430]},Line_3:{type:142,from:1582,to:1671,rp:0,rpa:0,mdi:'Line_3c',retainState:false,immo:false,apsn:'Slide14288',iflbx:false,ipflbx:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[14193]}],stis:0,bstiid:-1,sipst:0,sicbs:false,sihhs:false,sihds:false,isDD:false},Line_3c:{b:[784,134,784,180],uid:14193,dn:'Line_3',visible:1,effectiveVi:1,JSONEffectData:false,accstr:'Line Item ',traccstr:'',ti:-1,acclng:'',sc:'#333333',sw:5,sst:0,est:0,ss:0,x1:784,y1:134,x2:784,y2:180,vbwr:[781,131,787,183],vb:[781,131,787,183]},SmartShape_56:{type:612,from:1582,to:1671,rp:0,rpa:0,mdi:'SmartShape_56c',retainState:false,immo:false,apsn:'Slide14288',JSONTT_4:[],cpa:true,oca:'cp.jumpToNextSlide();',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[14208]}],stis:0,bstiid:-1,sipst:0,sicbs:false,sihhs:false,sihds:false,isDD:false},SmartShape_56c:{b:[908,350,983,426],uid:14208,sr:cp.fd,ip:'dr/SmartShape_56.png',dn:'SmartShape_56',visible:1,effectiveVi:1,JSONEffectData:false,accstr:'NO ',traccstr:'',ti:-1,acclng:'',sc:'#1a1a1a',sw:0,ss:0,fa:100,bc:'#ff87b3',p0:[[0],[1,945.5,350.00],[3,924.79,350.00,908,367.01,908,388],[3,908,408.99,924.79,426,945.5,426],[3,966.21,426,983,408.99,983,388],[3,983,367.01,966.21,350.00,945.5,350.00],[4]],svg:false,vbwr:[908,350,983,426],sh:{i:false,a:45,d:3,b:4,o:0.4,c:'rgb(0, 0, 0)'},vb:[908,350,987,430]},CYOA_01_Title_57:{type:612,from:1582,to:1671,rp:0,rpa:0,mdi:'CYOA_01_Title_57c',retainState:false,immo:false,apsn:'Slide14288',JSONTT_4:[],cpa:true,oca:'cp.jumpToNextSlide();',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[14224]}],stis:0,bstiid:-1,sipst:0,sicbs:false,sihhs:false,sihds:false,isDD:false},CYOA_01_Title_57c:{b:[454,175,1115,308],uid:14224,sr:cp.fd,ip:'dr/CYOA_01_Title_57.png',dn:'CYOA_01_Title_57',visible:1,effectiveVi:1,JSONEffectData:false,accstr:'Is it hateful?(homophobic, transphobic, racist, misogynistic, or otherwise harmful) ',traccstr:'',ti:-1,acclng:'',sc:'#1a1a1a',sw:0,ss:0,fa:100,bc:'#c6f3ff',p0:[[0],[1,465.29,175],[3,459.06,175,454,180.06,454,186.29],[2,454,296.7],[3,454,302.94,459.06,308,465.29,308],[2,1103.7,308],[3,1109.94,308,1115,302.94,1115,296.7],[2,1115,186.29],[3,1115,180.06,1109.94,175,1103.7,175],[2,465.29,175],[4]],svg:false,vbwr:[454,175,1115,308],sh:{i:false,a:45,d:3,b:4,o:0.4,c:'rgb(0, 0, 0)'},vb:[454,175,1119,312]},CYOA_01_Title_58:{type:612,from:1582,to:1671,rp:0,rpa:0,mdi:'CYOA_01_Title_58c',retainState:false,immo:false,apsn:'Slide14288',JSONTT_4:[],cpa:true,oca:'cp.jumpToNextSlide();',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[14240]}],stis:0,bstiid:-1,sipst:0,sicbs:false,sihhs:false,sihds:false,isDD:false},CYOA_01_Title_58c:{b:[454,47,1115,140],uid:14240,sr:cp.fd,ip:'dr/CYOA_01_Title_58.png',dn:'CYOA_01_Title_58',visible:1,effectiveVi:1,JSONEffectData:false,accstr:'How to respond to slang ',traccstr:'',ti:-1,acclng:'',sc:'#1a1a1a',sw:0,ss:0,fa:100,bc:'#c6f3ff',p0:[[0],[1,461.90,47],[3,457.54,47,454,50.54,454,54.90],[2,454,132.1],[3,454,136.46,457.54,140.00,461.90,140.00],[2,1107.1,140.00],[3,1111.46,140.00,1115,136.46,1115,132.1],[2,1115,54.90],[3,1115,50.54,1111.46,47,1107.1,47],[2,461.90,47],[4]],svg:false,vbwr:[454,47,1115,140],sh:{i:false,a:45,d:3,b:4,o:0.4,c:'rgb(0, 0, 0)'},vb:[454,47,1119,144]},CYOA_01_Title_59:{type:612,from:1582,to:1671,rp:0,rpa:0,mdi:'CYOA_01_Title_59c',retainState:false,immo:false,apsn:'Slide14288',JSONTT_4:[],cpa:true,oca:'cp.jumpToNextSlide();',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[14256]}],stis:0,bstiid:-1,sipst:0,sicbs:false,sihhs:false,sihds:false,isDD:false},CYOA_01_Title_59c:{b:[363,443,785,684],uid:14256,sr:cp.fd,ip:'dr/CYOA_01_Title_59.png',dn:'CYOA_01_Title_59',visible:1,effectiveVi:1,JSONEffectData:false,accstr:'a) don’t repeat itb) reword to make the statement less harmfulc) talk about the importance of using respectful language ',traccstr:'',ti:-1,acclng:'',sc:'#1a1a1a',sw:0,ss:0,fa:100,bc:'#c6f3ff',p0:[[0],[1,383.46,443],[3,372.16,443,363,452.16,363,463.46],[2,363,663.54],[3,363,674.84,372.16,684,383.46,684],[2,764.54,684],[3,775.84,684,785,674.84,785,663.54],[2,785,463.46],[3,785,452.16,775.84,443,764.54,443],[2,383.46,443],[4]],svg:false,vbwr:[363,443,785,684],sh:{i:false,a:45,d:3,b:4,o:0.4,c:'rgb(0, 0, 0)'},vb:[363,443,789,688]},CYOA_01_Title_60:{type:612,from:1582,to:1671,rp:0,rpa:0,mdi:'CYOA_01_Title_60c',retainState:false,immo:false,apsn:'Slide14288',JSONTT_4:[],cpa:true,oca:'cp.jumpToNextSlide();',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[14272]}],stis:0,bstiid:-1,sipst:0,sicbs:false,sihhs:false,sihds:false,isDD:false},CYOA_01_Title_60c:{b:[809,443,1231,684],uid:14272,sr:cp.fd,ip:'dr/CYOA_01_Title_60.png',dn:'CYOA_01_Title_60',visible:1,effectiveVi:1,JSONEffectData:false,accstr:'a) repeat the slang b) define it c) then continue to use the accurate or “body science” term ',traccstr:'',ti:-1,acclng:'',sc:'#1a1a1a',sw:0,ss:0,fa:100,bc:'#c6f3ff',p0:[[0],[1,829.46,443],[3,818.16,443,809,452.16,809,463.46],[2,809,663.54],[3,809,674.84,818.16,684,829.46,684],[2,1210.54,684],[3,1221.84,684,1231,674.84,1231,663.54],[2,1231,463.46],[3,1231,452.16,1221.84,443,1210.54,443],[2,829.46,443],[4]],svg:false,vbwr:[809,443,1231,684],sh:{i:false,a:45,d:3,b:4,o:0.4,c:'rgb(0, 0, 0)'},vb:[809,443,1235,688]},Slide14288:{lb:'',id:14288,from:1582,to:1671,iols:0,i360qs:false,propTxtScaling:false,minFontSizeScaling:14,useng:true,transition:{type:0},mmot:false,mdi:'Slide14288c',st:'Normal Slide',ccProperties:{1280:{pos:7,x:35,y:88}},audCC:[],vidCC:[],accstr:' ',si:[{n:'Image_44',t:15},{n:'Line_1',t:142},{n:'Line_2',t:142},{n:'SmartShape_55',t:612},{n:'Line_3',t:142},{n:'SmartShape_56',t:612},{n:'CYOA_01_Title_57',t:612},{n:'CYOA_01_Title_58',t:612},{n:'CYOA_01_Title_59',t:612},{n:'CYOA_01_Title_60',t:612}],iph:[],v:false,bc:'#ffffff',JSONTT_0:[],sea:'cpCmndPause = 1;',JSONTT_6:[],qs:''},Slide14288c:{b:[0,0,0,0],sr:cp.fd,uid:14288,dn:'Slide14288',visible:'1'},Image_45:{type:15,from:1672,to:1761,rp:0,rpa:0,mdi:'Image_45c',retainState:false,immo:false,apsn:'Slide14443',JSONTT_4:[],cpa:true,oca:'cp.jumpToNextSlide();',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[14300]}],stis:0,bstiid:-1,sipst:0,sicbs:false,sihhs:false,sihds:false,isDD:false},Image_45c:{b:[-399,174,601,804],uid:14300,sr:cp.fd,ip:'dr/14292_1000_630Tr89.png',dn:'Image_45',visible:1,effectiveVi:1,JSONEffectData:false,accstr:'Image ',traccstr:'',ti:-1,acclng:'',vbwr:[-399,174,601,804],vb:[-399,174,601,804]},SmartShape_61:{type:612,from:1672,to:1761,rp:0,rpa:0,mdi:'SmartShape_61c',retainState:false,immo:false,apsn:'Slide14443',JSONTT_4:[],cpa:true,oca:'cp.jumpToNextSlide();',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[14333]}],stis:0,bstiid:-1,sipst:0,sicbs:false,sihhs:false,sihds:false,isDD:false},SmartShape_61c:{b:[118,140,1130,557],uid:14333,sr:cp.fd,ip:'dr/SmartShape_61.png',dn:'SmartShape_61',visible:1,effectiveVi:1,JSONEffectData:false,accstr:'How did I learn about sex and sexuality? Is the topic of sexuality comfortable for me to discuss? Why or why not? How could my own values and biases impact the way I teach sexuality content? How were my values and biases about sexuality influenced by how I was raised, family, peers, culture, religion, media, and/or personal experience? ',traccstr:'',ti:-1,acclng:'',sc:'#1a1a1a',sw:2,ss:0,fa:100,bc:'#ffffff',p0:[[0],[1,118,140.00],[2,118,557],[2,1130.00,557],[2,1130.00,140.00],[2,118,140.00],[4]],svg:false,vbwr:[114,136,1134,561],vb:[114,136,1134,561]},Text_Caption_55:{type:19,from:1672,to:1761,rp:0,rpa:0,mdi:'Text_Caption_55c',retainState:false,immo:false,apsn:'Slide14443',iflbx:false,ipflbx:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[14341]}],stis:0,bstiid:-1,sipst:0,sicbs:false,sihhs:false,sihds:false,isDD:false},Text_Caption_55c:{b:[119,30,1200,132],uid:14341,sr:cp.fd,ip:'dr/Text_Caption_55.png',dn:'Text_Caption_55',visible:1,effectiveVi:1,JSONEffectData:false,accstr:'TAKE A MOMENT TO ASK YOURSELF THE FOLLOWING QUESTIONS: ',traccstr:'',ti:-1,acclng:'',vbwr:[119,30,1200,132],vb:[119,30,1200,132]},Image_46:{type:15,from:1672,to:1761,rp:0,rpa:0,mdi:'Image_46c',retainState:false,immo:false,apsn:'Slide14443',JSONTT_4:[],cpa:true,oca:'cp.show("SmartShape_62");\
cp.changeState("SmartShape_62","writing_prompts");\
cp.hide("Text_Caption_55");',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,chfn:cp.ch,uab:1,osc:'',osct:0,ofc:'',ofct:0,enabled:1,pa:1717,ma:-1,pfc:1,dclk:false,amc:true,ca:'Image_46ClkAd',eh:cp.cbKH,siq:false,sat:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[14359]},{stn:'RollOver',stt:2,stsi:[14365]},{stn:'Down',stt:1,stsi:[14371]}],stis:0,bstiid:-1,sipst:0,sicbs:false,sihhs:true,sihds:true,stc:['Image_46','si14365','si14371'],isDD:false},Image_46c:{b:[1022,607,1132,713],uid:14359,sr:cp.fd,ip:'dr/14343_110_106.png',dn:'Image_46',visible:1,effectiveVi:1,JSONEffectData:false,accstr:'Image ',traccstr:'',ti:2500,acclng:'',vbwr:[1022,607,1132,713],vb:[1022,607,1132,713]},Image_46ClkAd:{src:'ar/Mouse.mp3',du:182},si14365:{type:15,from:1672,to:1761,rp:0,rpa:0,mdi:'si14365c',retainState:false,immo:false,apsn:'Slide14443',JSONTT_4:[],cpa:true,oca:'cp.show("SmartShape_62");\
cp.changeState("SmartShape_62","writing_prompts");\
cp.hide("Text_Caption_55");',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,chfn:cp.ch,uab:1,osc:'',osct:0,ofc:'',ofct:0,enabled:1,pa:1717,ma:-1,pfc:1,dclk:false,amc:true,ca:'si14365ClkAd',eh:cp.cbKH,siq:false,sat:true,trin:0,trout:0,bstin:'Image_46',stl:[{stn:'Normal',stt:0,stsi:[14365]}],stis:0,bstiid:14359,sipst:2,sicbs:true,sihhs:true,sihds:true,isDD:false},si14365c:{b:[1022,607,1132,713],uid:14365,sr:cp.fd,ip:'dr/14343_110_106.png',dn:'si14365',visible:0,effectiveVi:1,JSONEffectData:false,accstr:'Image ',traccstr:'',ti:2500,acclng:'',vbwr:[1022,607,1132,713],vb:[1022,607,1132,713]},si14365ClkAd:{src:'ar/Mouse.mp3',du:182},si14371:{type:15,from:1672,to:1761,rp:0,rpa:0,mdi:'si14371c',retainState:false,immo:false,apsn:'Slide14443',JSONTT_4:[],cpa:true,oca:'cp.show("SmartShape_62");\
cp.changeState("SmartShape_62","writing_prompts");\
cp.hide("Text_Caption_55");',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,chfn:cp.ch,uab:1,osc:'',osct:0,ofc:'',ofct:0,enabled:1,pa:1717,ma:-1,pfc:1,dclk:false,amc:true,ca:'si14371ClkAd',eh:cp.cbKH,siq:false,sat:true,trin:0,trout:0,bstin:'Image_46',stl:[{stn:'Normal',stt:0,stsi:[14371]}],stis:0,bstiid:14359,sipst:1,sicbs:true,sihhs:true,sihds:true,isDD:false},si14371c:{b:[1022,607,1132,713],uid:14371,sr:cp.fd,ip:'dr/14343_110_106.png',dn:'si14371',visible:0,effectiveVi:1,JSONEffectData:false,accstr:'Image ',traccstr:'',ti:2500,acclng:'',vbwr:[1022,607,1132,713],vb:[1022,607,1132,713]},si14371ClkAd:{src:'ar/Mouse.mp3',du:182},Text_Caption_56:{type:19,from:1672,to:1761,rp:0,rpa:0,mdi:'Text_Caption_56c',retainState:false,immo:false,apsn:'Slide14443',iflbx:false,ipflbx:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[14375]}],stis:0,bstiid:-1,sipst:0,sicbs:false,sihhs:false,sihds:false,isDD:false},Text_Caption_56c:{b:[121,569,1129,612],uid:14375,sr:cp.fd,ip:'dr/Text_Caption_56.png',dn:'Text_Caption_56',visible:1,effectiveVi:1,JSONEffectData:false,accstr:'Interested in a little more reflection? Click the pencil icon for more writing prompts ',traccstr:'',ti:-1,acclng:'',vbwr:[121,569,1129,612],vb:[121,569,1129,612]},SmartShape_62:{type:612,from:1672,to:1761,rp:0,rpa:0,mdi:'SmartShape_62c',retainState:false,immo:false,apsn:'Slide14443',JSONTT_4:[],cpa:true,oca:'cp.jumpToNextSlide();',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[14389]},{stn:'writing_prompts',stt:9,stsi:[14400]}],stis:0,bstiid:-1,sipst:0,sicbs:false,sihhs:false,sihds:false,stc:['SmartShape_62','si14400'],isDD:false},SmartShape_62c:{b:[118,140,1130,557],uid:14389,dn:'SmartShape_62',visible:1,effectiveVi:1,JSONEffectData:false,accstr:' ',traccstr:'',ti:-1,acclng:'',sc:'#1a1a1a',sw:2,ss:0,fa:100,bc:'#ffffff',p0:[[0],[1,118,140.00],[2,118,557],[2,1130.00,557],[2,1130.00,140.00],[2,118,140.00],[4]],svg:false,vbwr:[114,136,1134,561],vb:[114,136,1134,561]},si14400:{type:612,from:1672,to:1761,rp:0,rpa:0,mdi:'si14400c',retainState:false,immo:false,apsn:'Slide14443',JSONTT_4:[],cpa:true,oca:'cp.jumpToNextSlide();',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,trin:0,trout:0,bstin:'SmartShape_62',stl:[{stn:'Normal',stt:0,stsi:[14400]}],stis:0,bstiid:14389,sipst:9,sicbs:true,sihhs:false,sihds:false,isDD:false},si14400c:{b:[118,140,1130,557],uid:14400,sr:cp.fd,ip:'dr/si14400.png',dn:'si14400',visible:0,effectiveVi:1,JSONEffectData:false,accstr:'Write down a few words that reflect your early sexuality learning experiences. Were they hopeful? positive? non-existent? Now write some words that you would like your students’ learning experience to be like. Take some time to reflect on how you currently achieve these desired outcomes in your teaching. Which of these strategies would you feel most comfortable using in teaching healthy sexuality? ',traccstr:'',ti:-1,acclng:'',sc:'#1a1a1a',sw:2,ss:0,fa:100,bc:'#f0f0f0',p0:[[0],[1,118,140.00],[2,118,557],[2,1130.00,557],[2,1130.00,140.00],[2,118,140.00],[4]],svg:false,vbwr:[114,136,1134,561],vb:[114,136,1134,561]},SmartShape_63:{type:612,from:1672,to:1761,rp:0,rpa:0,mdi:'SmartShape_63c',retainState:false,immo:false,apsn:'Slide14443',JSONTT_4:[],cpa:true,oca:'cp.show("SmartShape_62");\
cp.changeState("SmartShape_62","writing_prompts");\
cp.hide("Text_Caption_55");',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,uab:1,chfn:cp.ch,osc:'',osct:0,ofc:'',ofct:0,pa:1717,enabled:1,ma:-1,pfc:1,dclk:false,amc:true,ca:'SmartShape_63ClkAd',eh:cp.cbKH,siq:false,sat:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[14414]},{stn:'Down',stt:1,stsi:[14423]}],stis:0,bstiid:-1,sipst:0,sicbs:false,sihhs:false,sihds:true,stc:['SmartShape_63','si14423'],isDD:false},SmartShape_63c:{b:[1034,619,1124,706],uid:14414,dn:'SmartShape_63',visible:1,effectiveVi:1,JSONEffectData:false,accstr:' ',traccstr:'',ti:2500,acclng:'',sc:'#1a1a1a',sw:0,ss:0,fa:0,bc:'#e6e6e6',p0:[[0],[1,1079,619],[3,1054.15,619,1034,638.48,1034,662.5],[3,1034,686.52,1054.15,706,1079,706],[3,1103.85,706,1124,686.52,1124,662.5],[3,1124,638.48,1103.85,619,1079,619],[4]],svg:false,vbwr:[1034,619,1124,706],vb:[1034,619,1124,706]},SmartShape_63ClkAd:{src:'ar/Mouse.mp3',du:182},si14423:{type:612,from:1672,to:1761,rp:0,rpa:0,mdi:'si14423c',retainState:false,immo:false,apsn:'Slide14443',JSONTT_4:[],cpa:true,oca:'cp.show("SmartShape_62");\
cp.changeState("SmartShape_62","writing_prompts");\
cp.hide("Text_Caption_55");',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,uab:1,chfn:cp.ch,osc:'',osct:0,ofc:'',ofct:0,pa:1717,enabled:1,ma:-1,pfc:1,dclk:false,amc:true,ca:'si14423ClkAd',eh:cp.cbKH,siq:false,sat:true,trin:0,trout:0,bstin:'SmartShape_63',stl:[{stn:'Normal',stt:0,stsi:[14423]}],stis:0,bstiid:14414,sipst:1,sicbs:true,sihhs:false,sihds:true,isDD:false},si14423c:{b:[1034,619,1124,706],uid:14423,dn:'si14423',visible:0,effectiveVi:1,JSONEffectData:false,accstr:' ',traccstr:'',ti:2500,acclng:'',sc:'#1a1a1a',sw:4,ss:0,fa:30,bc:'#171717',p0:[[0],[1,1079,619],[3,1054.15,619,1034,638.48,1034,662.5],[3,1034,686.52,1054.15,706,1079,706],[3,1103.85,706,1124,686.52,1124,662.5],[3,1124,638.48,1103.85,619,1079,619],[4]],svg:false,vbwr:[1026,611,1132,714],vb:[1026,611,1132,714]},si14423ClkAd:{src:'ar/Mouse.mp3',du:182},Slide14443:{lb:'',id:14443,from:1672,to:1761,iols:0,i360qs:false,propTxtScaling:false,minFontSizeScaling:14,useng:true,transition:{type:0},mmot:false,mdi:'Slide14443c',st:'Normal Slide',ccProperties:{1280:{pos:7,x:35,y:88}},audCC:[],vidCC:[],accstr:' ',si:[{n:'Image_45',t:15},{n:'SmartShape_61',t:612},{n:'Text_Caption_55',t:19},{n:'Image_46',t:15},{n:'si14365',t:15},{n:'si14371',t:15},{n:'Text_Caption_56',t:19},{n:'SmartShape_62',t:612},{n:'si14400',t:612},{n:'SmartShape_63',t:612},{n:'si14423',t:612}],iph:[],ea:'Image_46ClkAd,si14365ClkAd,si14371ClkAd,SmartShape_63ClkAd,si14423ClkAd',v:false,bc:'#ffffff',JSONTT_0:[],sea:'cpCmndPause = 1;\
cp.show("Text_Caption_55");\
cp.hide("SmartShape_62");',JSONTT_6:[],qs:''},Slide14443c:{b:[0,0,0,0],sr:cp.fd,uid:14443,dn:'Slide14443',visible:'1'},Image_47:{type:15,from:1762,to:1851,rp:0,rpa:0,mdi:'Image_47c',retainState:false,immo:false,apsn:'Slide14480',JSONTT_4:[],cpa:true,oca:'cp.jumpToNextSlide();',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[14454]}],stis:0,bstiid:-1,sipst:0,sicbs:false,sihhs:false,sihds:false,isDD:false},Image_47c:{b:[-74,123,1341,1220],uid:14454,sr:cp.fd,ip:'dr/10776_1415_1097Tr69.png',dn:'Image_47',visible:1,effectiveVi:1,JSONEffectData:false,accstr:'Image ',traccstr:'',ti:-1,acclng:'',vbwr:[-74,123,1341,1220],tr:'rotate(31deg)',vb:[-256,-164,1523,1507]},Text_Caption_57:{type:19,from:1762,to:1851,rp:0,rpa:0,mdi:'Text_Caption_57c',retainState:false,immo:false,apsn:'Slide14480',iflbx:false,ipflbx:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[14464]}],stis:0,bstiid:-1,sipst:0,sicbs:false,sihhs:false,sihds:false,isDD:false},Text_Caption_57c:{b:[158,40,1197,680],uid:14464,sr:cp.fd,ip:'dr/Text_Caption_57.png',dn:'Text_Caption_57',visible:1,effectiveVi:1,JSONEffectData:false,accstr:'Reflection and examination of personal biases can be a lot of work. We start with this, however, because best practice in teaching about sexuality happens when educators are able to differentiate their personal biases from content and understand how relevant and important the topic is. This work is ongoing. ',traccstr:'',ti:-1,acclng:'',vbwr:[158,40,1197,680],vb:[158,40,1197,680]},Slide14480:{lb:'',id:14480,from:1762,to:1851,iols:0,i360qs:false,propTxtScaling:false,minFontSizeScaling:14,useng:true,transition:{type:0},mmot:false,mdi:'Slide14480c',st:'Normal Slide',ccProperties:{1280:{pos:7,x:35,y:88}},audCC:[],vidCC:[],accstr:' ',si:[{n:'Image_47',t:15},{n:'Text_Caption_57',t:19}],iph:[],v:false,bc:'#ffffff',JSONTT_0:[],sea:'cpCmndPause = 1;',JSONTT_6:[],qs:''},Slide14480c:{b:[0,0,0,0],sr:cp.fd,uid:14480,dn:'Slide14480',visible:'1'},Image_48:{type:15,from:1852,to:1941,rp:0,rpa:0,mdi:'Image_48c',retainState:false,immo:false,apsn:'Slide14557',JSONTT_4:[],cpa:true,oca:'cp.jumpToNextSlide();',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[14492]}],stis:0,bstiid:-1,sipst:0,sicbs:false,sihhs:false,sihds:false,isDD:false},Image_48c:{b:[-131,88,1617,1804],uid:14492,sr:cp.fd,ip:'dr/11825_1748_1716Tr90.png',dn:'Image_48',visible:1,effectiveVi:1,JSONEffectData:false,accstr:'Image ',traccstr:'',ti:-1,acclng:'',vbwr:[-131,88,1617,1804],tr:'rotate(81deg)',vb:[-242,-52,1728,1944]},Text_Caption_58:{type:19,from:1852,to:1941,rp:0,rpa:0,mdi:'Text_Caption_58c',retainState:false,immo:false,apsn:'Slide14557',iflbx:false,ipflbx:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[14502]}],stis:0,bstiid:-1,sipst:0,sicbs:false,sihhs:false,sihds:false,isDD:false},Text_Caption_58c:{b:[108,108,1113,194],uid:14502,sr:cp.fd,ip:'dr/Text_Caption_58.png',dn:'Text_Caption_58',visible:1,effectiveVi:1,JSONEffectData:false,accstr:'Further resources: ',traccstr:'',ti:-1,acclng:'',vbwr:[108,108,1113,194],vb:[108,108,1113,194]},HL14508_0_0:{b:[513,82,967,129],oca:'cp.openURL(\'http://www.teachingsexualhealth.ca\',\'_blank\');cp.actionChoiceContinueMovie();',accstr:'teachingsexualhealth.ca',ti:0},Text_Caption_59:{type:19,from:1852,to:1941,rp:0,rpa:0,mdi:'Text_Caption_59c',retainState:false,immo:false,apsn:'Slide14557',iflbx:false,ipflbx:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[14510]}],stis:0,bstiid:-1,sipst:0,sicbs:false,sihhs:false,sihds:false,isDD:false},Text_Caption_59c:{b:[108,251,1203,540],uid:14510,sr:cp.fd,ip:'dr/Text_Caption_59.png',dn:'Text_Caption_59',visible:1,effectiveVi:1,JSONEffectData:false,accstr:'To learn more about the Sexuality Wheel and/or to learn more about values & biases, go to teachingsexualhealth.ca ',traccstr:'',ti:-1,acclng:'',hl:'HL14508_0_0,',vbwr:[108,251,1203,540],vb:[108,251,1203,540]},SmartShape_64:{type:612,from:1852,to:1941,rp:0,rpa:0,mdi:'SmartShape_64c',retainState:false,immo:false,apsn:'Slide14557',JSONTT_4:[],cpa:true,oca:'cp.openURL(\'https://www.teachingsexualhealth.ca\',\'_blank\');cp.actionChoicePauseMovie();',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,uab:1,chfn:cp.ch,osc:'',osct:0,ofc:'',ofct:0,pa:1897,enabled:1,ma:-1,pfc:1,dclk:false,amc:true,ca:'SmartShape_64ClkAd',eh:cp.cbKH,siq:false,sat:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[14541]}],stis:0,bstiid:-1,sipst:0,sicbs:false,sihhs:false,sihds:false,stc:['SmartShape_64'],isDD:false},SmartShape_64c:{b:[615,334,1090,385],uid:14541,dn:'SmartShape_64',visible:1,effectiveVi:1,JSONEffectData:false,accstr:' ',traccstr:'',ti:2500,acclng:'',sc:'#1a1a1a',sw:0,ss:0,fa:0,bc:'#e6e6e6',p0:[[0],[1,615,334],[2,615,385],[2,1090.00,385],[2,1090.00,334],[2,615,334],[4]],svg:false,vbwr:[615,334,1090,385],vb:[615,334,1090,385]},SmartShape_64ClkAd:{src:'ar/Mouse.mp3',du:182},Slide14557:{lb:'',id:14557,from:1852,to:1941,iols:0,i360qs:false,propTxtScaling:false,minFontSizeScaling:14,useng:true,transition:{type:0},mmot:false,mdi:'Slide14557c',st:'Normal Slide',ccProperties:{1280:{pos:7,x:35,y:88}},audCC:[],vidCC:[],accstr:' ',si:[{n:'Image_48',t:15},{n:'Text_Caption_58',t:19},{n:'Text_Caption_59',t:19},{n:'SmartShape_64',t:612}],iph:[],ea:'SmartShape_64ClkAd',v:false,bc:'#ffffff',JSONTT_0:[],sea:'cpCmndPause = 1;',JSONTT_6:[],qs:''},Slide14557c:{b:[0,0,0,0],sr:cp.fd,uid:14557,dn:'Slide14557',visible:'1'},Image_49:{type:15,from:1942,to:2031,rp:0,rpa:0,mdi:'Image_49c',retainState:false,immo:false,apsn:'Slide14626',JSONTT_4:[],cpa:true,oca:'cp.jumpToNextSlide();',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[14569]}],stis:0,bstiid:-1,sipst:0,sicbs:false,sihhs:false,sihds:false,isDD:false},Image_49c:{b:[-131,88,1617,1804],uid:14569,sr:cp.fd,ip:'dr/11825_1748_1716Tr88.png',dn:'Image_49',visible:1,effectiveVi:1,JSONEffectData:false,accstr:'Image ',traccstr:'',ti:-1,acclng:'',vbwr:[-131,88,1617,1804],tr:'rotate(81deg)',vb:[-242,-52,1728,1944]},SmartShape_65:{type:612,from:1942,to:2031,rp:0,rpa:0,mdi:'SmartShape_65c',retainState:false,immo:false,apsn:'Slide14626',JSONTT_4:[],cpa:true,oca:'cp.jumpToNextSlide();',JSONTT_5:[],ofa:'cpCmndResume = 1;',iflbx:false,ipflbx:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[14602]}],stis:0,bstiid:-1,sipst:0,sicbs:false,sihhs:false,sihds:false,isDD:false},SmartShape_65c:{b:[278,71,1003,649],uid:14602,sr:cp.fd,ip:'dr/SmartShape_65.png',dn:'SmartShape_65',visible:1,effectiveVi:1,JSONEffectData:false,accstr:'Congratulations!! You have completed Part 1 of the Teaching Sexuality series. ',traccstr:'',ti:-1,acclng:'',sc:'#1a1a1a',sw:2,ss:0,fa:100,bc:'#ffffff',p0:[[0],[1,278,71],[2,278,649],[2,1003,649],[2,1003,71],[2,278,71],[4]],svg:false,vbwr:[274,67,1008,653],vb:[274,67,1008,653]},Text_Caption_60:{type:19,from:1942,to:2031,rp:0,rpa:0,mdi:'Text_Caption_60c',retainState:false,immo:false,apsn:'Slide14626',iflbx:false,ipflbx:true,trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[14610]}],stis:0,bstiid:-1,sipst:0,sicbs:false,sihhs:false,sihds:false,isDD:false},Text_Caption_60c:{b:[705,656,1003,699],uid:14610,sr:cp.fd,ip:'dr/Text_Caption_60.png',dn:'Text_Caption_60',visible:1,effectiveVi:1,JSONEffectData:false,accstr:'Press Esc to exit fullscreen ',traccstr:'',ti:-1,acclng:'',vbwr:[705,656,1003,699],vb:[705,656,1003,699]},Slide14626:{lb:'',id:14626,from:1942,to:2031,iols:0,i360qs:false,propTxtScaling:false,minFontSizeScaling:14,useng:true,transition:{type:0},mmot:false,mdi:'Slide14626c',st:'Normal Slide',ccProperties:{1280:{pos:7,x:35,y:88}},audCC:[],vidCC:[],accstr:' ',si:[{n:'Image_49',t:15},{n:'SmartShape_65',t:612},{n:'Text_Caption_60',t:19}],iph:[],v:false,bc:'#ffffff',JSONTT_0:[],sea:'cpCmndPause = 1;',JSONTT_6:[],qs:''},Slide14626c:{b:[0,0,0,0],sr:cp.fd,uid:14626,dn:'Slide14626',visible:'1'},quizzingData:{allowBackwardMovement:true,allowReviewMode:true,isInReviewMode:false,allowSkipAnyScoreSlide:true,allowSkipFailScoreSlide:true,allowSkipPassScoreSlide:true,anyGradeAction:'',anyGradeActionArg1:'',anyGradeActionArg2:'',defaultActionType:'continue',defaultActionArg1:'',defaultActionArg2:'',failedScoreFeedback:'Sorry, you failed!',failingGradeAction:'cpCmndResume = 1;',JSONTT_5:[],passedScoreFeedback:'Congratulations, you passed the quiz!',passingGradeAction:'cpCmndResume = 1;',JSONTT_4:[],pretestAction:'',it:true,anyScoreSlide:-1,firstSlideInQuiz:-1,lastSlideInQuiz:-1,quizScopeEndSlide:-1,maxScore:0,minScore:0,maxPretestScore:0,numQuestionsInQuiz:1,numQuizAttemptsAllowed:1,passingScore:0,quizInfoCurrentAttempt:0,quizInfoPercentScored:0,quizProgress:'',questionAdvance:'optional',quizAdvance:'optional',quizID:379,showFinishButton:true,showProgress:true,questionPoolsInitialized:true,quizInfoAnswerChoice:'',quizInfoAttempts:1,quizInfoLastSlidePointScored:0,quizInfoMaxAttemptsOnCurrentQuestion:1,quizInfoPassFail:0,quizInfoPointsPerQuestionSlide:0,quizInfoPointsScored:0,quizInfoQuestionSlideTiming:0,quizInfoQuestionSlideType:'',quizInfoQuizPassPercent:80,quizInfoQuizPassPoints:0,quizInfoTotalCorrectAnswers:0,quizInfoTotalProjectPoints:0,quizInfoTotalQuestionsPerProject:1,quizInfoTotalQuizPoints:0,quizInfoTotalUnansweredQuestions:0,reportingVariables:0,reportingEnabled:true,submitAll:false,hidePlaybarInQuiz:false,quizBranchAware:false,passFailPassingScoreTypeInPrecent:true,passFailPassingScoreValue:80,progressIndicatorType:0,rpViDv:'This slide was viewed in device with different width.',progressIndicatorString:'Question %d of %d '},quizReportingData:{lWriteDebugInfo:false,lmsType:1,sendScoreAsPercent:false,trackingLevel:2,slideViewPercentage:100,reportingOption:0,slideViewsForSuccess:100,slideViewsTypeForSuccess:0,slideViewsForCompletion:100,slideViewsTypeForCompletion:0,quizCriteriaForCompletion:0,quizCriteriaForSuccess:0,completionCriteria:3,successCriteria:3,companyName:'',departmentName:'',courseName:'',courseNode:'',isTrackedFlag:true,trackingUrlEncodeVersionAndSession:1,commitDataOnEverySlide:true,trackingSendResumeData:true,cmiExitNormalAfterCompletion:false,lmsInitializationString:'cp.movie.playbackController.SetLMSType();cp.movie.playbackController.SetSendScoreAsPercent();cp.movie.playbackController.SetTrackingLevel();cp.movie.playbackController.SetSlideViewPercentage();cp.movie.playbackController.SetReportingOption();cp.movie.playbackController.SetSlideViewsForSuccess();cp.movie.playbackController.SetSlideViewsForCompletion();cp.movie.playbackController.SetQuizCriteriaForCompletion();cp.movie.playbackController.SetQuizCriteriaForSuccess();cp.movie.playbackController.SetCompletionCriteria();cp.movie.playbackController.SetSuccessCriteria();cp.movie.playbackController.SetDirectory();cp.movie.playbackController.SetCourseNode();cp.movie.playbackController.SetIsTrackedFlag();cp.movie.playbackController.SetTrackingUrlEncodeVersionAndSession();cp.movie.playbackController.SetCommitDataOnEverySlide();cp.movie.playbackController.SetTrackingSendResumeData();cp.movie.playbackController.SetCmiExitNormalAfterCompletion();'},rtDialog:{rtbgfc:'#cccccc',rtbgsc:'#808080',rtbtnfc:'#ffffff',rtbtnsc:'#808080',rtsc:'#808080',rttc:'#000000',rttsc:'#b3b3b3',rtfn:'Tahoma',rtt:'Submit All',rtsam:'You have answered all questions. What do you want to do next?',rtiqm:'One or more questions is incomplete. Answer all questions to continue.',rtsiqm:'You have not answered a few questions yet. Are you sure you want to proceed without answering those questions?',rtsanym:'You have reached the end of the quiz, but you have unanswered questions. What do you want to do?',rtmtqm:'You must answer at least one question to continue.',rtokb:'Ok',rtcb:'CANCEL',rtyb:'Yes',rtnb:'No',rtsab:'Submit All Answers',rtsanyb:'Submit Anyway',rtrtqb:'Return To Quiz',rtWarningTitle:'Adobe Captivate',rtUnsupportedBowser:'This browser does not support some of the content in the file you are trying to view. Use one of the following browsers:<ul><li>Internet Explorer 9 or later</li><li>Safari 5.1 or later</li><li>Google Chrome 17 or later</li><li>Firefox @FFVERSION or later</li></ul>',rtPopupBlkr:'Please goto your settings and disable popup blocker',mandatoryMsg1:'You did not answer some questions. Answer them first and then proceed.',mandatoryMsg2:'You have not viewed some hotspots. Please view them to proceed.',mandatoryTitle:'Information',hotspotsVisitedMsg:'You have explored all hotspots. Click to continue or use the navigation options to exit.'},sgMgr:{ri:0,sg:[[0,[[1,[2,2,2,2,2,23,2,2]]]],[1,[[2,[2,23]]]],[2,[[3,[2,2,23,2]]]],[3,[[4,[23,2]]]],[4,[[5,[2,2,23]]]],[5,[[6,[2,2,2,2,23]]]],[6,[[7,[2,2,2,2,2,23]]]],[7,[[8,[23]]]],[8,[[9,[2,2,23]]]],[9,[[10,[2,2,2,2,2,2,2,2,2,2,23]]]],[10,[[11,[23,2,2]]]],[11,[[12,[23,2,2]]]],[12,[[13,[2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,23,2]]]],[13,[[14,[23]]]],[14,[[15,[23,2]]]],[15,[[16,[23]]]],[16,[[17,[2,2,2,2,0,2]]]],[17,[[18,[23,2,2]]]],[18,[[19,[2,2,2,2,2,2,23,2]]]],[19,[[20,[2,23,2,2]]]],[20,[[21,[2,23]]]],[21,[[22,[2,23]]]]]},project:{fps:30,hasTOC:0,w:1280,h:720,iw:1280,ih:720,prm:[1,1,0,0],stateNameToLocalizedStateNameMap:{kCPNormalState:'Normal',kCPDownState:'Down',kCPRolloverState:'RollOver',kCPVisitedState:'Visited',kCPDragoverState:'DragOver',kCPDragstartState:'DragStart',kCPDropCorrect:'DropCorrect',kCPDropIncorrect:'DropIncorrect',kCPDropAccept:'DropAccept',kCPDropReject:'DropReject'},prjBgColor:'#ffffff',pkt:0,htmlBgColor:'#ffffff',shc:false,pN:'Reflective Perspective xAPI'},project_main:{from:1,to:2031,currentFrame:1,useResponsive:false,responsiveType:4,currentFrame:1,useWidgetVersion7:false,isPublishedFromLacuna:false,vestr:0,vim:0,slides:'Slide10968,Slide11009,Slide11088,Slide11125,Slide11196,Slide11370,Slide11613,Slide11655,Slide11821,Slide12481,Slide12530,Slide12596,Slide13717,Slide13759,Slide13796,Slide13838,Slide14068,Slide14138,Slide14288,Slide14443,Slide14480,Slide14557,Slide14626',questions:'Slide14068q0',autoplay:false,preloader:true,preloaderFileName:'dr/loading.gif',preloaderPercentage:100,preloaderimagel:625,preloaderimaget:345,pprtd:false,peon:false,fadeInAtStart:0,fadeOutAtEnd:0,endAction:'cp.stopMovie();'},borderProperties:{hasBorder:true,l:0,t:0,r:0,b:30,w:1280,h:750,hasSqEd:false,bc:'#c0c0c0'},playBarProperties:{hasPlayBar:true,jsfile:'playbarScript.js',cssfile:'playbarStyle.css',position:3,layout:3,showOnHover:false,overlay:false,tworow:false,hasRewind:true,hasBackward:true,hasPlay:true,hasEnterVR:false,hasSlider:true,hasForward:true,hasCC:false,hasAudioOn:true,hasExit:true,hasFastForward:true,applyColors:true,BkColor:{bc:'#d6d6d6',alpha:100},FaceColor:{bc:'#7f7f7f',alpha:100},GlowColor:{bc:'#146192',alpha:100},IconColor:{bc:'#ffffff',alpha:100},alpha:100,noToolTips:false,locale:0},tocProperties:{},ccProperties:{1280:{w:30,h:12,x:-1,y:-1,txtl:0,pos:7,v:false,c:'#ffffff',o:49}},trecs:[{link:10968,text:['Teaching Sexuality...','Part 1: Reflective Perspective','START COURSE','START COURSE','START COURSE']},{link:11009,text:['We acknowledge that Alberta, where this course has been created, is the traditional territory of Treaty 6, Treaty 7, and Treaty 8, and the home of eight Métis Settlements and the Métis Nation of Alberta. We recognize the many diverse First Nations, Métis, and Inuit whose ancestors walked this land before us, and whose land we share today. We make this acknowledgment as an act of reconciliation and gratitude, and strive to work in partnership to build strong, positive, and healthy relationships. Because of this, both Alberta Health Services\' MORE and Sexual & Reproductive Health teams acknowledge the truth that colonization has impacted the health, education, and sexuality of everyone living on these lands, Indigenous and non-Indigenous. We offer this course, and our ongoing work, as a resource for people to access as they see fit to build the health of their communities, families, and themselves, and as one starting point for continued conversation.','BEFORE WE START ']},{link:11088,text:['','Many teachers feel comfortable teaching about sexuality. Others do not feel confident. Taking time to reflect on one’s own perspectives about sexuality and recognizing how bias can influence practice helps increase capacity to teach comfortably and confidently about sexuality.']},{link:11125,text:['Comprehensive sexual health education is designed to give students skills to make healthy decisions and healthy sexual decisions.']},{link:11196,text:['Teaching sexuality is not necessarily about sex. Sex is a label assigned to people based on their reproductive anatomy. It is also an act, the act of sex. ','pSSSST...']},{link:11370,text:['According to the World Health Organization (WHO), sexuality is a central aspect of being human and is important to healthy development whether someone is sexually active or not. Sexuality encompasses sex, intimacy, reproduction, eroticism, pleasure, sexual orientation, gender identities and roles. ',' Then what is sexuality? What DOES sexual health deal with?Click on the screen to take a closer look at how the World Health Organization defines sexuality and the importance it plays in human development: ']},{link:11613,text:['Speaker Introductions','Kim, Chris, and Christine sat down with MORE to chat candidly about their experiences teaching sexuality in Alberta schools. Throughout this course and the rest of the course series, you’ll hear their perspectives and insights, facilitated by MORE Education Consultant, Natalie. Click on each audio link to listen to their bios. ','KIM (she/her) ','CHRIS (he/his) ','CHRISTINE (she/her) ']},{link:11655,text:['Getting ready to teach about sexuality...']},{link:11821,text:[' ',' ','• Non-judgmental language • Highlighting the positive outcomes of healthy decision making • Exploring healthy relationships • Teaching about a variety of risk prevention strategies • Discussing how to manage negative outcomes • Recognizing students are sexual beings and have the right to make choices based on objective information ','','','• Images of STIs • Statistics presented to groups that don’t understand statistics • Graphic discussion of symptoms, labor and delivery • Catastrophizing negative health outcomes • All or nothing thinking/discussion • Overgeneralization • Using scary content to influence students to avoid sexual activity ','Scare Tactics vs. Effective Sexuality Education Scare tactics only draw attention to the potential harm and are seldom effective to motivate learning or behaviour change. In the long term, building on effective strategies that increase student resilience is the best way to ensure sexual health.']},{link:12481,text:['It can feel like a wild ride when first starting conversations about healthy sexuality. Select each option to explore three ways to begin the conversation...and what the possible outcome might be! ','','','','“When I was growing up we didn’t get a chance to talk about this very much, so I might sometimes seem a bit awkward. But - this is an important topic to learn about and you deserve a better experience.”Scroll down for outcome','*Go for it!* This option shows healthy boundaries around self disclosure and development of rapport as a teacher, genuine concern for the student, and directs the flow of conversation in the classroom. ','','','','“Today we will start our first lesson on sexuality. Can you raise your hand if you are sexually active?” scroll down for outcome','*NO!*Asking students to self disclose their sexual experience(s) does not create a safe environment.','','','',' “Since I’m the teacher of the class, I will tell you about my own sexual experiences to help you understand what sexuality is.” Scroll down for outcome','*DON’T DO IT*This is an example of poor boundaries by the teacher and does not follow the healthy sexuality curriculum. ','','','','','Option 3','Option 3','Option 3','Option 2','Option 2','Option 2','Option 1','Option 1','Option 1','Choose your own adventure!']},{link:12530,text:['So let’s dive into some basic information about what is meant by the word, ‘sexuality’...']},{link:12596,text:['THIS IS A SEXUALITY WHEEL Each part of the wheel represents one part of who we are, yet all parts are connected and influenced by each other. The boxes on the left side of the wheel show who we are by nature. The boxes on the right side of the wheel show who we are taught to be or learn to become. When all parts of the wheel are healthy, our sexuality is healthy. On the next page, you can explore an interactive wheel to learn more about each part']},{link:13717,text:['Select each word to learn more:','VALUES','VALUES','RELATIONSHIPS','RELATIONSHIPS','SEXUAL ACTIVITY','SEXUAL ACTIVITY','COMMUNICATION','COMMUNICATION','SOCIALIZATION','SOCIALIZATION','SELF IMAGE','SELF IMAGE','EXPERIENCES','EXPERIENCES','','','SEX','','SEX','','SEXUAL ORIENTATION','SEXUAL ORIENTATION','GENDER EXPRESSION','GENDER EXPRESSION','GENDER IDENTITY','GENDER IDENTITY','PERSONALITY','PERSONALITY','Values:A collection of ideas that people see as important; a set of assumptions about how things are.','Relationships:The way people are connected and how they act toward one another.','Sexual Activity:One way people experience or express their sexuality. Sexual activity includes kissing, sexual touching, and sexual intercourse (e.g. oral, anal, vaginal).','Communication:The way people connect and share information, goals, ideas, comments, and create understanding.','Socialization:Learned behaviours that include customs, attitudes, and values that are acceptable to a social group, community, or culture.','Self Image:How a person thinks about or sees themselves, including their personality, their appearance, and their values.','Experiences:What people have done, gone through, or been exposed to in their life. Personal experience helps form people’s values.','Sex: Categories (male, female) to which people are typically assigned at birth based on physical characteristics (e.g. genitals). Some people may be assigned intersex when their reproductive, sexual, or genetic biology doesn’t fit the traditional definitions of male or female.','Sexual Orientation:A person’s emotional and sexual attraction to other people. It can be fluid and may or may not reflect sexual behaviours.','Gender Expression:How a person presents their gender. This can include appearance, name, pronoun, and social behaviour.','Gender Identity:A person’s internal sense of identity as female, male, both, or neither, regardless of their sex assigned at birth.','Personality:A combination of traits or characteristics that make up a person’s unique character.']},{link:13759,text:['Why does sexuality education matter?']},{link:13796,text:['Sexual health education can give students of all ages the knowledge and skills they need to make and act upon healthy decisions.Teachers play a key role in teaching comprehensive programs designed to promote sexual health.']},{link:13838,text:['Exploring challenges and biases...']},{link:14068,text:['True/False','The more a child knows about healthy sexuality, the more they are likely to experiment sexually.','A)','True','B)','False','SUBMIT','SUBMIT','SUBMIT','You must answer the question before continuing.','CorrectComprehensive sexual health education generally leads to a later first sexual encounter, not greater experimentation. Additionally, “a lack of high-quality, age- and developmentally-appropriate sexuality and relationship education may leave children and young people vulnerable to harmful sexual behaviours and sexual exploitation.” UNESCOClick anywhere or press ‘y’ to continue.','Incorrect Comprehensive sexual health education generally leads to a later first sexual encounter, not greater experimentation. Please try again ']},{link:14138,text:['It’s important to recognize that everyone uses different language when talking about sexuality. It can take a while for students to become comfortable with using body science terms. ','SLANG']},{link:14288,text:['YES','NO','Is it hateful?(homophobic, transphobic, racist, misogynistic, or otherwise harmful)','How to respond to slang','a) don’t repeat itb) reword to make the statement less harmfulc) talk about the importance of using respectful language ','a) repeat the slang b) define it c) then continue to use the accurate or “body science” term']},{link:14443,text:['How did I learn about sex and sexuality? Is the topic of sexuality comfortable for me to discuss? Why or why not? How could my own values and biases impact the way I teach sexuality content? How were my values and biases about sexuality influenced by how I was raised, family, peers, culture, religion, media, and/or personal experience? ','TAKE A MOMENT TO ASK YOURSELF THE FOLLOWING QUESTIONS:','Interested in a little more reflection? Click the pencil icon for more writing prompts','Write down a few words that reflect your early sexuality learning experiences. Were they hopeful? positive? non-existent? Now write some words that you would like your students’ learning experience to be like. Take some time to reflect on how you currently achieve these desired outcomes in your teaching. Which of these strategies would you feel most comfortable using in teaching healthy sexuality?']},{link:14480,text:['Reflection and examination of personal biases can be a lot of work. We start with this, however, because best practice in teaching about sexuality happens when educators are able to differentiate their personal biases from content and understand how relevant and important the topic is. This work is ongoing. ']},{link:14557,text:['Further resources:','To learn more about the Sexuality Wheel and/or to learn more about values & biases, go to teachingsexualhealth.ca']},{link:14626,text:['Congratulations!! You have completed Part 1 of the Teaching Sexuality series.','Press Esc to exit fullscreen']}],typekit:{kit_id:''},};cp.model.projectImages=['assets/htmlimages/Answer_checkbox_correct.png','assets/htmlimages/Answer_checkbox_hover.png','assets/htmlimages/Answer_checkbox_incorrect.png','assets/htmlimages/Answer_checkbox_normal.png','assets/htmlimages/Answer_checkbox_select.png','assets/htmlimages/Answer_radio_correct.png','assets/htmlimages/Answer_radio_hover.png','assets/htmlimages/Answer_radio_incorrect.png','assets/htmlimages/Answer_radio_normal.png','assets/htmlimages/Answer_radio_select.png','assets/htmlimages/Graph.jpg','assets/htmlimages/HotspotDisplayImage.png','assets/htmlimages/HotspotDisplayText.png','assets/htmlimages/HotspotQuestionOverlays.png','assets/htmlimages/Pause2x.gif','assets/htmlimages/Play2x.gif','assets/htmlimages/VR_move_left.png','assets/htmlimages/VR_move_right.png','assets/htmlimages/assessmenthotspotvisited.svg','assets/htmlimages/checkboxchecked.png','assets/htmlimages/checkboxunchecked.png','assets/htmlimages/correct_answer_normal.png','assets/htmlimages/correct_answer_small.png','assets/htmlimages/correct_question_normal.png','assets/htmlimages/correct_question_small.png','assets/htmlimages/expand_icon.png','assets/htmlimages/gesturemobileicon@2x.png','assets/htmlimages/gesturemobilelandscape.png','assets/htmlimages/gesturetabletimage.png','assets/htmlimages/img_trans.gif','assets/htmlimages/incorrect_answer_normal.png','assets/htmlimages/incorrect_answer_small.png','assets/htmlimages/incorrect_question_normal.png','assets/htmlimages/incorrect_question_small.png','assets/htmlimages/partial_correct_question_normal.png','assets/htmlimages/partial_correct_question_small.png','assets/htmlimages/placeholder.png','assets/htmlimages/radioButton_disabled.png','assets/htmlimages/radioButton_normal.png','assets/htmlimages/radioButton_selected.png','assets/htmlimages/radioButton_selectedDisabled.png','assets/htmlimages/radiochecked.png','assets/htmlimages/radiounchecked.png','assets/htmlimages/skip_answer_normal.png','assets/htmlimages/skip_answer_small.png','assets/htmlimages/skip_question_normal.png','assets/htmlimages/skip_question_small.png'];cp.model.images=['dr/10776_1294_1358Tr76.png','dr/10776_1352_1060Tr70.png','dr/10776_1415_1097Tr61.png','dr/10776_1415_1097Tr69.png','dr/10776_1419_1099Tr61.png','dr/10827_282_99.png','dr/10838_223_55.png','dr/10944_535_633.png','dr/11045_584_538Tr89.png','dr/11045_724_653Fl1Tr85.png','dr/11056_421_569.png','dr/11168_1164_654.png','dr/11200_1666_986Tr90.png','dr/11200_2141_1343Tr88.png','dr/11200_2288_1080Tr84.png','dr/11292_217_226.png','dr/11311_687_509.png','dr/11384_341_439.png','dr/11384_536_694.png','dr/11395_312_412.png','dr/11395_449_596.png','dr/11406_447_430.png','dr/11406_547_527.png','dr/11431_68_71.png','dr/11431_77_78.png','dr/11717_300_600.png','dr/11767_300_600.png','dr/11825_1160_842Tr89.png','dr/11825_1748_1716Tr88.png','dr/11825_1748_1716Tr90.png','dr/12485_1642_924Tr87.png','dr/12506_566_744.png','dr/12564_691_634.png','dr/12564_709_652.png','dr/12710_16_14.png','dr/14102_495_861.png','dr/14141_449_733.png','dr/14292_1000_630Tr89.png','dr/14343_110_106.png','dr/Btn_CYOA_Option1_26.png','dr/Btn_CYOA_Option2_25.png','dr/Btn_CYOA_Option3_24.png','dr/Btn_CYOA_up01_21.png','dr/Btn_CYOA_up02_18.png','dr/Btn_CYOA_up03_15.png','dr/Button_1.png','dr/CYOA_01_Title_27.png','dr/CYOA_01_Title_57.png','dr/CYOA_01_Title_58.png','dr/CYOA_01_Title_59.png','dr/CYOA_01_Title_60.png','dr/CYOA_01_characters_23.png','dr/CYOA_01_description_13.png','dr/Infotext_CYOA_Option1_22.png','dr/Infotext_CYOA_Option2_19.png','dr/Infotext_CYOA_Option3_16.png','dr/SmartShape_2.png','dr/SmartShape_43.png','dr/SmartShape_55.png','dr/SmartShape_56.png','dr/SmartShape_61.png','dr/SmartShape_65.png','dr/Strategy_Back01_12.png','dr/Strategy_Back02_11.png','dr/Text_Caption_1.png','dr/Text_Caption_10.png','dr/Text_Caption_11.png','dr/Text_Caption_12.png','dr/Text_Caption_13.png','dr/Text_Caption_14.png','dr/Text_Caption_15.png','dr/Text_Caption_16.png','dr/Text_Caption_17.png','dr/Text_Caption_18.png','dr/Text_Caption_19.png','dr/Text_Caption_2.png','dr/Text_Caption_20.png','dr/Text_Caption_21.png','dr/Text_Caption_22.png','dr/Text_Caption_23.png','dr/Text_Caption_24.png','dr/Text_Caption_25.png','dr/Text_Caption_26.png','dr/Text_Caption_27.png','dr/Text_Caption_28.png','dr/Text_Caption_29.png','dr/Text_Caption_3.png','dr/Text_Caption_30.png','dr/Text_Caption_31.png','dr/Text_Caption_32.png','dr/Text_Caption_33.png','dr/Text_Caption_34.png','dr/Text_Caption_35.png','dr/Text_Caption_36.png','dr/Text_Caption_37.png','dr/Text_Caption_38.png','dr/Text_Caption_39.png','dr/Text_Caption_4.png','dr/Text_Caption_40.png','dr/Text_Caption_41.png','dr/Text_Caption_42.png','dr/Text_Caption_43.png','dr/Text_Caption_44.png','dr/Text_Caption_45.png','dr/Text_Caption_46.png','dr/Text_Caption_5.png','dr/Text_Caption_53.png','dr/Text_Caption_54.png','dr/Text_Caption_55.png','dr/Text_Caption_56.png','dr/Text_Caption_57.png','dr/Text_Caption_58.png','dr/Text_Caption_59.png','dr/Text_Caption_6.png','dr/Text_Caption_60.png','dr/Text_Caption_7.png','dr/Text_Caption_8.png','dr/Text_Caption_9.png','dr/Title_AutoShape_2.png','dr/si10927.png','dr/si10941.png','dr/si11734.png','dr/si11747.png','dr/si11784.png','dr/si11797.png','dr/si11938.png','dr/si11951.png','dr/si11984.png','dr/si12055.png','dr/si12068.png','dr/si12099.png','dr/si12171.png','dr/si12184.png','dr/si12215.png','dr/si12244.png','dr/si12266.png','dr/si12288.png','dr/si12335.png','dr/si12348.png','dr/si12384.png','dr/si12397.png','dr/si12434.png','dr/si12447.png','dr/si13195.png','dr/si13210.png','dr/si13225.png','dr/si13576.png','dr/si13587.png','dr/si13598.png','dr/si13609.png','dr/si13620.png','dr/si13631.png','dr/si13642.png','dr/si13653.png','dr/si13664.png','dr/si13675.png','dr/si13686.png','dr/si13697.png','dr/si13880.png','dr/si13892.png','dr/si13903.png','dr/si13907.png','dr/si13914.png','dr/si13918.png','dr/si13956.png','dr/si13986.png','dr/si13998.png','dr/si14010.png','dr/si14041.png','dr/si14054.png','dr/si14400.png'];cp.model.videos=['vr/Vi2.mp4','vr/Vi4.mp4','vr/Vi6.mp4'];cp.model.slideVideos=[];cp.model.tocVideos=[];cp.model.audios=['ar/Mouse.mp3','ar/11489.mp3','ar/11525.mp3','ar/11569.mp3'];cp.initVariables = function(){cp.cv('CaptivateVersion','11.8.0',1,1000,0);cp.cv('cpCmndCC',0,1,15,0);cp.cv('cpCmndExit',0,1,15,0);cp.cv('cpCmndMute',0,1,15,0);cp.cv('cpCmndPause',0,1,15,0);cp.cv('cpCmndPlaybarMoved',0,1,15,0);cp.cv('cpCmndPrevious',0,1,15,0);cp.cv('cpCmndResume',0,1,15,0);cp.cv('cpCmndShowPlaybar',1,1,15,0);cp.cv('cpCmndTOCVisible',0,1,15,0);cp.cv('cpCmndVolume',100,1,15,0);cp.cv('cpInQuizScope',0,1,15,0);cp.cv('cpInReviewMode',0,1,15,0);cp.cv('cpInfoAuthor','author',1,15,0);cp.cv('cpInfoCompany','company',1,15,0);cp.cv('cpInfoCopyright','copyright',1,15,0);cp.cv('cpInfoCourseID',-1,1,15,0);cp.cv('cpInfoCourseName','Course Name',1,15,0);cp.cv('cpInfoCurrentDate','dd',1,15,0);cp.cv('cpInfoCurrentDateString','mm/dd/yyyy',1,15,0);cp.cv('cpInfoCurrentDateStringDDMMYYYY','dd/mm/yyyy',1,15,0);cp.cv('cpInfoCurrentDay',1,1,15,0);cp.cv('cpInfoCurrentFrame',1,1,15,0);cp.cv('cpInfoCurrentHour','hh',1,15,0);cp.cv('cpInfoCurrentLocaleDateString','',1,15,0);cp.cv('cpInfoCurrentMinutes','mm',1,15,0);cp.cv('cpInfoCurrentMonth','mm',1,15,0);cp.cv('cpInfoCurrentSlide',1,1,15,0);cp.cv('cpInfoCurrentSlideLabel','slide',1,15,0);cp.cv('cpInfoCurrentSlideType','Normal',1,15,0);cp.cv('cpInfoCurrentTime','hh:mm:ss',1,15,0);cp.cv('cpInfoCurrentYear','yyyy',1,15,0);cp.cv('cpInfoDescription','project description',1,15,0);cp.cv('cpInfoElapsedTimeMS',0,1,15,0);cp.cv('cpInfoEmail','author@company.com',1,15,0);cp.cv('cpInfoEpochMS',0,1,15,0);cp.cv('cpInfoFPS',1,1,15,0);cp.cv('cpInfoFrameCount',1,1,15,0);cp.cv('cpInfoGeoLocation','',1,15,0);cp.cv('cpInfoHasPlaybar',1,1,1000,0);cp.cv('cpInfoIsStandalone',1,1,15,0);cp.cv('cpInfoLastVisitedSlide',1,1,15,0);cp.cv('cpInfoMobileOS',0,1,15,0);cp.cv('cpInfoPercentage',0,1,15,0);cp.cv('cpInfoPrevSlide',-1,1,15,0);cp.cv('cpInfoProjectName','',1,15,0);cp.cv('cpInfoSlideCount',1,1,15,0);cp.cv('cpInfoSlidesInProject',23,1,1000,0);cp.cv('cpInfoWebsite','www.company.com',1,15,0);cp.cv('cpLockTOC',0,1,1000,0);cp.cv('cpQuizInfoAnswerChoice','',1,15,0);cp.cv('cpQuizInfoAttempts',0,1,15,0);cp.cv('cpQuizInfoLastSlidePointScored',0,1,15,0);cp.cv('cpQuizInfoMaxAttemptsOnCurrentQuestion',0,1,15,0);cp.cv('cpQuizInfoNegativePointsOnCurrentQuestionSlide',0,1,15,0);cp.cv('cpQuizInfoPassFail',0,1,15,0);cp.cv('cpQuizInfoPointsPerQuestionSlide',0,1,15,0);cp.cv('cpQuizInfoPointsscored',0,1,15,0);cp.cv('cpQuizInfoPreTestMaxScore',0,1,15,0);cp.cv('cpQuizInfoPreTestTotalCorrectAnswers',0,1,15,0);cp.cv('cpQuizInfoPreTestTotalQuestions',0,1,1000,0);cp.cv('cpQuizInfoPretestPointsscored',0,1,15,0);cp.cv('cpQuizInfoPretestScorePercentage',0,1,15,0);cp.cv('cpQuizInfoQuestionPartialScoreOn',0,1,15,0);cp.cv('cpQuizInfoQuestionSlideTiming',0,1,15,0);cp.cv('cpQuizInfoQuestionSlideType','choice',1,15,0);cp.cv('cpQuizInfoQuizPassPercent',80,1,1000,0);cp.cv('cpQuizInfoQuizPassPoints',0,1,1000,0);cp.cv('cpQuizInfoTotalCorrectAnswers',0,1,15,0);cp.cv('cpQuizInfoTotalProjectPoints',0,1,15,0);cp.cv('cpQuizInfoTotalQuestionsPerProject',0,1,15,0);cp.cv('cpQuizInfoTotalQuizPoints',0,1,1000,0);cp.cv('cpQuizInfoTotalUnansweredQuestions',0,1,15,0);cp.cv('cpInfoPrevFrame',0,1,15,0);cp.cv('cpQuizInfoStudentID','',0,15,0);cp.cv('cpQuizInfoStudentName','',0,15,0);};cp.ReportingVariables="";};cp.sbw=0;cp.useg=1;cp.geo=0;cp.pg=0;cp.win8=0;cp.autoGrow=1;cp.fluidFont=1;;var RuntimeBrowserDetect={init:function(a,c,e){this.BrowserEnum||(this.BrowserEnum={},this.BrowserEnum.UNKNOWN=0,this.BrowserEnum.MSIE=1,this.BrowserEnum.FIREFOX=2,this.BrowserEnum.CHROME=3,this.BrowserEnum.SAFARI=4,this.BrowserEnum.NETSCAPE=5,this.BrowserEnum.OPERA=6,this.BrowserEnum.CAMINO=7,this.BrowserEnum.FIREBIRD=8,this.BrowserEnum.MSIE_MIN_SUPPORTED_VERSION=9,this.BrowserEnum.CHROME_MIN_SUPPORTED_VERSION=17,this.BrowserEnum.SAFARI_MIN_SUPPORTED_VERSION=5.1,this.BrowserEnum.FF_MIN_SUPPORTED_VERSION_WIN=
22,this.BrowserEnum.FF_MIN_SUPPORTED_VERSION_MAC=35,this.BrowserEnum.FF_MIN_SUPPORTED_VERSION_FFOS=15,this.BrowserEnum.FF_MIN_SUPPORTED_VERSION_ANDROID=20);this.DeviceEnum||(this.DeviceEnum={},this.DeviceEnum.DESKTOP=0,this.DeviceEnum.IDEVICE=1,this.DeviceEnum.ANDROID=2);this.browserVersion=this.browser=this.BrowserEnum.UNKNOWN;this.device=this.DeviceEnum.DESKTOP;navigator.userAgent.match(/(iPhone|iPad|iPod)/i)?this.device=this.DeviceEnum.IDEVICE:navigator.userAgent.match(/android/i)&&(this.device=
this.DeviceEnum.ANDROID);navigator.userAgent.match(/MSIE/i)?(this.browser=this.BrowserEnum.MSIE,this.browserVersion=this.getCurrentBrowserVersion(navigator.userAgent,"MSIE")||this.getCurrentBrowserVersion(navigator.appVersion,"MSIE")||this.BrowserEnum.UNKNOWN):navigator.userAgent.match(/Firefox/i)?(this.browser=this.BrowserEnum.FIREFOX,this.browserVersion=this.getCurrentBrowserVersion(navigator.userAgent,"Firefox")||this.getCurrentBrowserVersion(navigator.appVersion,"Firefox")||this.BrowserEnum.UNKNOWN):
navigator.userAgent.match(/Chrome/i)?(this.browser=this.BrowserEnum.CHROME,this.browserVersion=this.getCurrentBrowserVersion(navigator.userAgent,"Chrome")||this.getCurrentBrowserVersion(navigator.appVersion,"Chrome")||this.BrowserEnum.UNKNOWN):navigator.userAgent.match(/Safari/i)?(this.browser=this.BrowserEnum.SAFARI,this.browserVersion=this.getCurrentBrowserVersion(navigator.userAgent,"Version")||this.getCurrentBrowserVersion(navigator.appVersion,"Version")||this.BrowserEnum.UNKNOWN):navigator.userAgent.match(/Netscape/i)?
(this.browser=this.BrowserEnum.NETSCAPE,this.browserVersion=this.getCurrentBrowserVersion(navigator.userAgent,"Netscape")||this.getCurrentBrowserVersion(navigator.appVersion,"Netscape")||this.BrowserEnum.UNKNOWN):navigator.userAgent.match(/Opera/i)?(this.browser=this.BrowserEnum.OPERA,this.browserVersion=this.getCurrentBrowserVersion(navigator.userAgent,"Version")||this.getCurrentBrowserVersion(navigator.appVersion,"Version")||this.BrowserEnum.UNKNOWN):navigator.userAgent.match(/Camino/i)?(this.browser=
this.BrowserEnum.CAMINO,this.browserVersion=this.getCurrentBrowserVersion(navigator.userAgent,"Camino")||this.getCurrentBrowserVersion(navigator.appVersion,"Camino")||this.BrowserEnum.UNKNOWN):navigator.userAgent.match(/Firebird/i)?this.browser=this.BrowserEnum.FIREBIRD:navigator.userAgent.match(/Trident/i)&&"netscape"==navigator.appName.toLowerCase()&&(this.browser=this.BrowserEnum.MSIE,this.browserVersion=this.getCurrentBrowserVersion(navigator.userAgent,"rv")||this.BrowserEnum.UNKNOWN);this.getIsBrowserSupported()||
this.showRuntimeWarning(a,c,e)},getCurrentBrowserVersion:function(a,c){var e=a.indexOf(c);return-1==e?this.BrowserEnum.UNKNOWN:parseFloat(a.substring(e+c.length+1))},getIsBrowserSupported:function(){var a=!1;if(this.browser==this.BrowserEnum.MSIE&&this.browserVersion>=this.BrowserEnum.MSIE_MIN_SUPPORTED_VERSION)a=!0;else if(this.browser==this.BrowserEnum.CHROME&&this.browserVersion>=this.BrowserEnum.CHROME_MIN_SUPPORTED_VERSION)a=!0;else if(this.browser==this.BrowserEnum.SAFARI&&this.browserVersion>=
this.BrowserEnum.SAFARI_MIN_SUPPORTED_VERSION)a=!0;else if(this.browser==this.BrowserEnum.FIREFOX&&(cp.OS==cp.MACOS&&this.browserVersion>=this.BrowserEnum.FF_MIN_SUPPORTED_VERSION_MAC||cp.OS==cp.WINDOWS&&this.browserVersion>=this.BrowserEnum.FF_MIN_SUPPORTED_VERSION_WIN))a=!0;return a},getPanelElement:function(a,c,e,d,f){var b=document.createElement("div");b.style.left=a;b.style.top=c;b.style.width=e;b.style.height=d;b.style.backgroundColor=f;b.style.border="1px solid #666666";b.style.borderRadius=
"14px";return b},getTextElement:function(a,c,e,d,f){var b=document.createElement("div");b.style.color=e;b.style.fontFamily=d;b.style.fontSize="14px";b.style.textAlign="left";b.style.left=a;b.style.top=c;b.style.position="relative";b.style.opacity=1;b.innerHTML=f;return b},showRuntimeWarning:function(a,c,e){if(document.body){var d=document.createElement("div");d.id="CPUnSupportedBrowserWarning_ID";var f=this.getPanelElement("0px","0px","455px","220px","#CCCCCC");f.style.margin="100px auto";"boxShadow"in
f.style&&(f.style.boxShadow="1px 1px 1px #000000");d.appendChild(f);var b=this.getPanelElement("2px","2px","450px","215px","#FEFEFE");b.style.position="relative";f.appendChild(b);c=this.getTextElement("10px","10px","#000000","Tahoma",c);b.appendChild(c);c=document.createElement("div");c.style.height="2px";c.style.backgroundColor="#000000";c.style.opacity=0.5;c.style.position="relative";c.style.marginLeft="10px";c.style.marginRight="10px";c.style.top="20px";b.appendChild(c);a=this.getTextElement("10px",
"30px","#000000","Tahoma",a);a.style.marginRight="10px";b.appendChild(a);a=this.getPanelElement("0px","auto","100px","33px","#CCCCCC");a.id="dismissWarningBox";a.style.bottom="10px";a.style.opacity=0.7;a.style.position="absolute";a.style.cursor="pointer";cp.registerGestureEvent(a,cp.GESTURE_EVENT_TYPES.TAP,function(){var a=document.getElementById("CPUnSupportedBrowserWarning_ID");a!=void 0&&document.body.removeChild(a)});"boxShadow"in a.style&&(a.style.boxShadow="1px 1px 1px #000000");e=this.getTextElement("0px",
"5px","#000000","Tahoma",e);e.style.textAlign="center";a.appendChild(e);b.appendChild(a);document.body.appendChild(d);d.style.visibility="visible";d.style.position="absolute";d.style.left="0px";d.style.top="0px";d.style.width="100%";d.style.height="100%";d.style.textAlign="center";d.style.zIndex="1000";d.style.backgroundColor="CCCCCC";a.style.left=(b.clientWidth-a.clientWidth)/2+"px"}}};
(function(i,m){var b=function(a,c){return new b.Instance(a,c||{})};b.defaults={stop_browser_behavior:{userSelect:"none",touchAction:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}};b.HAS_POINTEREVENTS=i.navigator.pointerEnabled||i.navigator.msPointerEnabled;b.HAS_TOUCHEVENTS="ontouchstart"in i;b.MOBILE_REGEX=/mobile|tablet|ip(ad|hone|od)|android|silk/i;b.NO_MOUSEEVENTS=b.HAS_TOUCHEVENTS&&i.navigator.userAgent.match(b.MOBILE_REGEX);b.EVENT_TYPES=
{};b.DIRECTION_DOWN="down";b.DIRECTION_LEFT="left";b.DIRECTION_UP="up";b.DIRECTION_RIGHT="right";b.POINTER_MOUSE="mouse";b.POINTER_TOUCH="touch";b.POINTER_PEN="pen";b.EVENT_START="start";b.EVENT_MOVE="move";b.EVENT_END="end";b.DOCUMENT=i.document;b.plugins=b.plugins||{};b.gestures=b.gestures||{};b.READY=!1;b.utils={extend:function(a,b,d){for(var e in b)a[e]!==m&&d||(a[e]=b[e]);return a},each:function(a,b,d){var e,f;if("forEach"in a)a.forEach(b,d);else if(a.length!==m){e=0;for(f=a.length;e<f&&!1!==
b.call(d,a[e],e,a);e++);}else for(e in a)if(a.hasOwnProperty(e)&&!1===b.call(d,a[e],e,a))break},hasParent:function(a,b){for(;a;){if(a==b)return!0;a=a.parentNode}return!1},getCenter:function(a){var c=[],d=[];b.utils.each(a,function(a){c.push("undefined"!==typeof a.clientX?a.clientX:a.pageX);d.push("undefined"!==typeof a.clientY?a.clientY:a.pageY)});return{pageX:(Math.min.apply(Math,c)+Math.max.apply(Math,c))/2,pageY:(Math.min.apply(Math,d)+Math.max.apply(Math,d))/2}},getVelocity:function(a,b,d){return{x:Math.abs(b/
a)||0,y:Math.abs(d/a)||0}},getAngle:function(a,b){return 180*Math.atan2(b.pageY-a.pageY,b.pageX-a.pageX)/Math.PI},getDirection:function(a,c){var d=Math.abs(a.pageX-c.pageX),e=Math.abs(a.pageY-c.pageY);return d>=e?0<a.pageX-c.pageX?b.DIRECTION_LEFT:b.DIRECTION_RIGHT:0<a.pageY-c.pageY?b.DIRECTION_UP:b.DIRECTION_DOWN},getDistance:function(a,b){var d=b.pageX-a.pageX,e=b.pageY-a.pageY;return Math.sqrt(d*d+e*e)},getScale:function(a,b){return 2<=a.length&&2<=b.length?this.getDistance(b[0],b[1])/this.getDistance(a[0],
a[1]):1},getRotation:function(a,b){return 2<=a.length&&2<=b.length?this.getAngle(b[1],b[0])-this.getAngle(a[1],a[0]):0},isVertical:function(a){return a==b.DIRECTION_UP||a==b.DIRECTION_DOWN},stopDefaultBrowserBehavior:function(a,c){if(c&&(a&&a.style)&&(b.utils.each("webkit khtml moz Moz ms o ".split(" "),function(d){b.utils.each(c,function(b,c){d&&(c=d+c.substring(0,1).toUpperCase()+c.substring(1));c in a.style&&(a.style[c]=b)})}),"none"==c.userSelect&&(a.onselectstart=function(){return!1}),"none"==
c.userDrag))a.ondragstart=function(){return false}}};b.Instance=function(a,c){var d=this;b.READY||(b.event.determineEventTypes(),b.utils.each(b.gestures,function(a){b.detection.register(a)}),b.event.onTouch(b.DOCUMENT,b.EVENT_MOVE,b.detection.detect),b.event.onTouch(b.DOCUMENT,b.EVENT_END,b.detection.detect),b.READY=!0);this.domHandlers={};this.element=a;this.enabled=!0;this.options=b.utils.extend(b.utils.extend({},b.defaults),c||{});this.options.stop_browser_behavior&&b.utils.stopDefaultBrowserBehavior(this.element,
this.options.stop_browser_behavior);var e=b.event.onTouch(a,b.EVENT_START,function(a){d.enabled&&b.detection.startDetect(d,a)}),f=this.domHandlers[b.EVENT_TYPES[b.EVENT_START]];f||(f=[],this.domHandlers[b.EVENT_TYPES[b.EVENT_START]]=f);f.push(e);return this};b.Instance.prototype={on:function(a,c){var d=a.split(" ");b.utils.each(d,function(a){this.element.addEventListener(a,c,!1)},this);return this},off:function(a,c){var d=a.split(" ");b.utils.each(d,function(a){this.element.removeEventListener(a,
c,!1)},this);return this},trigger:function(a,c){c||(c={});var d=b.DOCUMENT.createEvent("Event");d.initEvent(a,!0,!0);d.gesture=c;var e=this.element;b.utils.hasParent(c.target,e)&&(e=c.target);try{e.dispatchEvent(d)}catch(f){}return this},enable:function(a){this.enabled=a;return this},destroy:function(){for(var a in this.domHandlers)for(var b=this.domHandlers[a],d=0;d<b.length;++d)this.element.removeEventListener(a,b[d],!1);this.domHandlers={};this.element=null}};var j=null,k=!1,l=!1;b.event={bindDom:function(a,
c,d){c=c.split(" ");b.utils.each(c,function(b){a.addEventListener(b,d,!1)})},onTouch:function(a,c,d){function e(e){var g=e.type.toLowerCase();if(!g.match(/mouse/)||!l){g.match(/touch/)||g.match(/pointerdown/)||g.match(/mouse/)&&1===e.which?k=!0:g.match(/mouse/)&&!e.which&&(k=!1);g.match(/touch|pointer/)&&(l=!0);var h=0;if(k){b.HAS_POINTEREVENTS&&c!=b.EVENT_END?h=b.PointerEvent.updatePointer(c,e):g.match(/touch/)?h=e.touches.length:l||(h=g.match(/up/)?0:1);0<h&&c==b.EVENT_END?c=b.EVENT_MOVE:h||(c=
b.EVENT_END);if(h||null===j)j=e;d.call(b.detection,f.collectEventData(a,c,f.getTouchList(j,c),e));b.HAS_POINTEREVENTS&&c==b.EVENT_END&&(h=b.PointerEvent.updatePointer(c,e))}h||(j=null,l=k=!1,b.PointerEvent.reset())}}var f=this;this.bindDom(a,b.EVENT_TYPES[c],e);return e},determineEventTypes:function(){var a;a=b.HAS_POINTEREVENTS?b.PointerEvent.getEvents():b.NO_MOUSEEVENTS?["touchstart","touchmove","touchend touchcancel"]:["touchstart mousedown","touchmove mousemove","touchend touchcancel mouseup"];
b.EVENT_TYPES[b.EVENT_START]=a[0];b.EVENT_TYPES[b.EVENT_MOVE]=a[1];b.EVENT_TYPES[b.EVENT_END]=a[2]},getTouchList:function(a){if(b.HAS_POINTEREVENTS)return b.PointerEvent.getTouchList();if(a.touches)return a.touches;a.identifier=1;return[a]},collectEventData:function(a,c,d,e){a=b.POINTER_TOUCH;if(e.type.match(/mouse/)||b.PointerEvent.matchType(b.POINTER_MOUSE,e))a=b.POINTER_MOUSE;return{center:b.utils.getCenter(d),timeStamp:(new Date).getTime(),target:e.target,touches:d,eventType:c,pointerType:a,srcEvent:e,
preventDefault:function(){this.srcEvent.preventManipulation&&this.srcEvent.preventManipulation();this.srcEvent.preventDefault&&this.srcEvent.preventDefault()},stopPropagation:function(){this.srcEvent.stopPropagation()},stopDetect:function(){return b.detection.stopDetect()}}}};b.PointerEvent={pointers:{},getTouchList:function(){var a=[];b.utils.each(this.pointers,function(b){a.push(b)});return a},updatePointer:function(a,c){a==b.EVENT_END?this.pointers={}:(c.identifier=c.pointerId,this.pointers[c.pointerId]=
c);return Object.keys(this.pointers).length},matchType:function(a,c){if(!c.pointerType)return!1;var d=c.pointerType,e={};e[b.POINTER_MOUSE]=d===c.MSPOINTER_TYPE_MOUSE||d===b.POINTER_MOUSE;e[b.POINTER_TOUCH]=d===c.MSPOINTER_TYPE_TOUCH||d===b.POINTER_TOUCH;e[b.POINTER_PEN]=d===c.MSPOINTER_TYPE_PEN||d===b.POINTER_PEN;return e[a]},getEvents:function(){return["pointerdown MSPointerDown","pointermove MSPointerMove","pointerup pointercancel MSPointerUp MSPointerCancel"]},reset:function(){this.pointers={}}};
b.detection={gestures:[],current:null,previous:null,stopped:!1,startDetect:function(a,c){this.current||(this.stopped=!1,this.current={inst:a,startEvent:b.utils.extend({},c),lastEvent:!1,name:""},this.detect(c))},detect:function(a){if(this.current&&!this.stopped){var a=this.extendEventData(a),c=this.current.inst.options;b.utils.each(this.gestures,function(b){if(!this.stopped&&!1!==c[b.name]){if(!this.current)return!1;if(!1===b.handler.call(b,a,this.current.inst))return this.stopDetect(),!1}},this);
this.current&&(this.current.lastEvent=a);a.eventType==b.EVENT_END&&!a.touches.length-1&&this.stopDetect();return a}},stopDetect:function(){this.previous=b.utils.extend({},this.current);this.current=null;this.stopped=!0},extendEventData:function(a){var c=this.current.startEvent;if(c&&(a.touches.length!=c.touches.length||a.touches===c.touches))c.touches=[],b.utils.each(a.touches,function(a){c.touches.push(b.utils.extend({},a))});var d=a.timeStamp-c.timeStamp,e=a.center.pageX-c.center.pageX,f=a.center.pageY-
c.center.pageY,i=b.utils.getVelocity(d,e,f),g,h;"end"===a.eventType?(g=this.current.lastEvent&&this.current.lastEvent.interimAngle,h=this.current.lastEvent&&this.current.lastEvent.interimDirection):(g=this.current.lastEvent&&b.utils.getAngle(this.current.lastEvent.center,a.center),h=this.current.lastEvent&&b.utils.getDirection(this.current.lastEvent.center,a.center));b.utils.extend(a,{deltaTime:d,deltaX:e,deltaY:f,velocityX:i.x,velocityY:i.y,distance:b.utils.getDistance(c.center,a.center),angle:b.utils.getAngle(c.center,
a.center),interimAngle:g,direction:b.utils.getDirection(c.center,a.center),interimDirection:h,scale:b.utils.getScale(c.touches,a.touches),rotation:b.utils.getRotation(c.touches,a.touches),startEvent:c});return a},register:function(a){var c=a.defaults||{};c[a.name]===m&&(c[a.name]=!0);b.utils.extend(b.defaults,c,!0);a.index=a.index||1E3;this.gestures.push(a);this.gestures.sort(function(a,b){return a.index<b.index?-1:a.index>b.index?1:0});return this.gestures}};b.gestures.Drag={name:"drag",index:50,
defaults:{drag_min_distance:10,correct_for_drag_min_distance:!0,drag_max_touches:1,drag_block_horizontal:!1,drag_block_vertical:!1,drag_lock_to_axis:!1,drag_lock_min_distance:25},triggered:!1,handler:function(a,c){if(b.detection.current.name!=this.name&&this.triggered)c.trigger(this.name+"end",a),this.triggered=!1;else if(!(0<c.options.drag_max_touches&&a.touches.length>c.options.drag_max_touches))switch(a.eventType){case b.EVENT_START:this.triggered=!1;break;case b.EVENT_MOVE:if(a.distance<c.options.drag_min_distance&&
b.detection.current.name!=this.name)break;if(b.detection.current.name!=this.name&&(b.detection.current.name=this.name,c.options.correct_for_drag_min_distance&&0<a.distance)){var d=Math.abs(c.options.drag_min_distance/a.distance);b.detection.current.startEvent.center.pageX+=a.deltaX*d;b.detection.current.startEvent.center.pageY+=a.deltaY*d;a=b.detection.extendEventData(a)}if(b.detection.current.lastEvent.drag_locked_to_axis||c.options.drag_lock_to_axis&&c.options.drag_lock_min_distance<=a.distance)a.drag_locked_to_axis=
!0;d=b.detection.current.lastEvent.direction;a.drag_locked_to_axis&&d!==a.direction&&(a.direction=b.utils.isVertical(d)?0>a.deltaY?b.DIRECTION_UP:b.DIRECTION_DOWN:0>a.deltaX?b.DIRECTION_LEFT:b.DIRECTION_RIGHT);this.triggered||(c.trigger(this.name+"start",a),this.triggered=!0);c.trigger(this.name,a);c.trigger(this.name+a.direction,a);(c.options.drag_block_vertical&&b.utils.isVertical(a.direction)||c.options.drag_block_horizontal&&!b.utils.isVertical(a.direction))&&a.preventDefault();break;case b.EVENT_END:this.triggered&&
c.trigger(this.name+"end",a),this.triggered=!1}}};b.gestures.Hold={name:"hold",index:10,defaults:{hold_timeout:500,hold_threshold:1},timer:null,handler:function(a,c){switch(a.eventType){case b.EVENT_START:clearTimeout(this.timer);b.detection.current.name=this.name;this.timer=setTimeout(function(){"hold"==b.detection.current.name&&c.trigger("hold",a)},c.options.hold_timeout);break;case b.EVENT_MOVE:a.distance>c.options.hold_threshold&&clearTimeout(this.timer);break;case b.EVENT_END:clearTimeout(this.timer)}}};
b.gestures.Release={name:"release",index:Infinity,handler:function(a,c){a.eventType==b.EVENT_END&&c.trigger(this.name,a)}};b.gestures.Swipe={name:"swipe",index:40,defaults:{swipe_min_touches:1,swipe_max_touches:1,swipe_velocity:1},handler:function(a,c){if(a.eventType==b.EVENT_END&&!(0<c.options.swipe_max_touches&&a.touches.length<c.options.swipe_min_touches&&a.touches.length>c.options.swipe_max_touches)&&(a.velocityX>c.options.swipe_velocity||a.velocityY>c.options.swipe_velocity))c.trigger(this.name,
a),c.trigger(this.name+a.direction,a)}};b.gestures.Tap={name:"tap",evttouches:1,index:100,defaults:{tap_max_touchtime:250,tap_max_distance:10,tap_always:!0,doubletap_distance:20,doubletap_interval:300,evttouches:1,longtap_min_touchtime:500,longtap_max_touchtime:1E3,evtstarttime:0},handler:function(a,c){a.eventType==b.EVENT_START&&(c.options.evttouches=a.touches.length,c.options.evtstarttime=(new Date).getTime());a.eventType==b.EVENT_MOVE&&(c.options.evttouches=a.touches.length);if(a.eventType==b.EVENT_END&&
"touchcancel"!=a.srcEvent.type){var d=b.detection.previous,e=!1;if(d&&"tap"==d.name&&a.timeStamp-d.lastEvent.timeStamp<c.options.doubletap_interval&&a.distance<c.options.doubletap_distance){if(a.deltaTime>c.options.tap_max_touchtime||a.distance>c.options.tap_max_distance)return;c.trigger("doubletap",a);e=!0}if(!e||c.options.tap_always)(new Date).getTime()-c.options.evtstarttime>c.options.longtap_min_touchtime?a.distance>c.options.tap_max_distance||(b.detection.current.name="longtap",c.trigger(b.detection.current.name,
a)):a.deltaTime>c.options.tap_max_touchtime||a.distance>c.options.tap_max_distance||(b.detection.current.name="tap",c.trigger(b.detection.current.name,a))}}};b.gestures.Touch={name:"touch",index:-Infinity,defaults:{prevent_default:!1,prevent_mouseevents:!1},handler:function(a,c){c.options.prevent_mouseevents&&a.pointerType==b.POINTER_MOUSE?a.stopDetect():(c.options.prevent_default&&a.preventDefault(),a.eventType==b.EVENT_START&&c.trigger(this.name,a))}};b.gestures.Transform={name:"transform",index:45,
defaults:{transform_min_scale:0,transform_min_rotation:360,transform_always_block:!1},triggered:!1,handler:function(a,c){if(b.detection.current.name!=this.name&&this.triggered)c.trigger(this.name+"end",a),this.triggered=!1;else if(!(2>a.touches.length))switch(c.options.transform_always_block&&a.preventDefault(),a.eventType){case b.EVENT_START:this.triggered=!1;this.twofingertap=!0;break;case b.EVENT_MOVE:var d=Math.abs(1-a.scale),e=Math.abs(a.rotation);if(d<c.options.transform_min_scale&&e<c.options.transform_min_rotation)break;
this.twofingertap=!1;b.detection.current.name=this.name;this.triggered||(c.trigger(this.name+"start",a),this.triggered=!0);c.trigger(this.name,a);e>c.options.transform_min_rotation&&c.trigger("rotate",a);d>c.options.transform_min_scale&&(c.trigger("pinch",a),c.trigger("pinch"+(1>a.scale?"in":"out"),a));break;case b.EVENT_END:this.triggered&&c.trigger(this.name+"end",a),this.twofingertap&&c.trigger("taptwo",a),this.triggered=!1}}};"function"==typeof define&&define.amd?define(function(){return b}):
"object"===typeof module&&module.exports?module.exports=b:i.Hammer=b})(window);
(function(l,r,t){function ca(e,d,a){var c=e.runtimeStyle&&e.runtimeStyle[d],b,f=e.style;if(!/^-?[0-9]+\.?[0-9]*(?:px)?$/i.test(a)&&/^-?\d/.test(a)&&(b=f.left,c&&(e.runtimeStyle.left=e.currentStyle.left),f.left="fontSize"===d?"1em":a||0,a=f.pixelLeft+"px",f.left=b,c))e.runtimeStyle.left=c;return!/^(thin|medium|thick)$/i.test(a)?Math.round(parseFloat(a))+"px":a}function qa(e){return parseInt(e,10)}function ea(e,d,a,c,b,f){var d=g.Util.getCSS(d,e,b),y;1===d.length&&(b=d[0],d=[],d[0]=b,d[1]=b);-1!==d[0].toString().indexOf("%")?
(y=parseFloat(d[0])/100,b=a.width*y,"backgroundSize"!==e&&(b-=(f||c).width*y)):b="backgroundSize"===e?"auto"===d[0]?c.width:/contain|cover/.test(d[0])?g.Util.resizeBounds(c.width,c.height,a.width,a.height,d[0]).width:parseInt(d[0],10):parseInt(d[0],10);"auto"===d[1]?a=b/c.width*c.height:-1!==d[1].toString().indexOf("%")?(y=parseFloat(d[1])/100,a=a.height*y,"backgroundSize"!==e&&(a-=(f||c).height*y)):a=parseInt(d[1],10);return[b,a]}var g={},da;g.Util={};g.Util.log=function(e){g.logging&&(l.console&&
l.console.log)&&l.console.log(e)};var oa=String.prototype.trim;g.Util.trimText=function(e){return oa?oa.apply(e):((e||"")+"").replace(/^\s+|\s+$/g,"")};g.Util.asFloat=function(e){return parseFloat(e)};var ra=/((rgba|rgb)\([^\)]+\)(\s-?\d+px){0,})/g,sa=/(-?\d+px)|(#.+)|(rgb\(.+\))|(rgba\(.+\))/g;g.Util.parseTextShadows=function(e){if(!e||"none"===e)return[];for(var e=e.match(ra),d=[],a=0;e&&a<e.length;a++){var c=e[a].match(sa);d.push({color:c[0],offsetX:c[1]?c[1].replace("px",""):0,offsetY:c[2]?c[2].replace("px",
""):0,blur:c[3]?c[3].replace("px",""):0})}return d};g.Util.parseBackgroundImage=function(e){var d,a,c,b,f,y=[],g,h=0,U=0,u,q,m=function(){if(d){'"'===a.substr(0,1)&&(a=a.substr(1,a.length-2));a&&q.push(a);if("-"===d.substr(0,1)&&0<(b=d.indexOf("-",1)+1))c=d.substr(0,b),d=d.substr(b);y.push({prefix:c,method:d.toLowerCase(),value:f,args:q})}q=[];d=c=a=f=""};m();for(var l=0,t=e.length;l<t;l++)if(g=e[l],!(0===h&&-1<" \r\n\t".indexOf(g))){switch(g){case '"':u?u===g&&(u=null):u=g;break;case "(":if(u)break;
else if(0===h){h=1;f+=g;continue}else U++;break;case ")":if(u)break;else if(1===h)if(0===U){h=0;f+=g;m();continue}else U--;break;case ",":if(!u)if(0===h){m();continue}else if(1===h&&0===U&&!d.match(/^url$/i)){q.push(a);a="";f+=g;continue}}f+=g;0===h?d+=g:a+=g}m();return y};g.Util.Bounds=function(e){var d,a={};e.getBoundingClientRect&&(d=e.getBoundingClientRect(),a.top=d.top,a.bottom=d.bottom||d.top+d.height,a.left=d.left,a.width=e.offsetWidth,a.height=e.offsetHeight);return a};g.Util.OffsetBounds=
function(e){var d=e.offsetParent?g.Util.OffsetBounds(e.offsetParent):{top:0,left:0};return{top:e.offsetTop+d.top,bottom:e.offsetTop+e.offsetHeight+d.top,left:e.offsetLeft+d.left,width:e.offsetWidth,height:e.offsetHeight}};g.Util.getCSS=function(e,d,a){void 0!==e&&(da=r.defaultView.getComputedStyle(e,null));var c=da[d];if(/^background(Size|Position)$/.test(d)){a:{c=(c||"").split(",");c=c[a||0]||c[0]||"auto";c=g.Util.trimText(c).split(" ");if(!("backgroundSize"===d&&(!c[0]||c[0].match(/cover|contain|auto/)))){c[0]=
-1===c[0].indexOf("%")?ca(e,d+"X",c[0]):c[0];if(c[1]===t)if("backgroundSize"===d){c[1]="auto";e=c;break a}else c[1]=c[0];c[1]=-1===c[1].indexOf("%")?ca(e,d+"Y",c[1]):c[1]}e=c}return e}return/border(Top|Bottom)(Left|Right)Radius/.test(d)?(e=c.split(" "),1>=e.length&&(e[1]=e[0]),e.map(qa)):c};g.Util.resizeBounds=function(e,d,a,c,b){e/=d;!b||"auto"===b?(b=a,a=c):a/c<e^"contain"===b?(a=c,b=c*e):(b=a,a/=e);return{width:b,height:a}};g.Util.BackgroundPosition=function(e,d,a,c,b){e=ea("backgroundPosition",
e,d,a,c,b);return{left:e[0],top:e[1]}};g.Util.BackgroundSize=function(e,d,a,c){e=ea("backgroundSize",e,d,a,c);return{width:e[0],height:e[1]}};g.Util.Extend=function(e,d){for(var a in e)e.hasOwnProperty(a)&&(d[a]=e[a]);return d};g.Util.Children=function(e){var d;try{var a;if(e.nodeName&&"IFRAME"===e.nodeName.toUpperCase())a=e.contentDocument||e.contentWindow.document;else{var c=e.childNodes,e=[];if(null!==c){var b=e.length,f=0;if("number"===typeof c.length)for(var y=c.length;f<y;f++)e[b++]=c[f];else for(;c[f]!==
t;)e[b++]=c[f++];e.length=b}a=e}d=a}catch(k){g.Util.log("html2canvas.Util.Children failed with exception: "+k.message),d=[]}return d};g.Util.isTransparent=function(e){return"transparent"===e||"rgba(0, 0, 0, 0)"===e};var aa={};g.Util.Font=function(e,d,a){if(aa[e+"-"+d]!==t)return aa[e+"-"+d];var c=a.createElement("div"),b=a.createElement("img"),f=a.createElement("span"),g;c.style.visibility="hidden";c.style.fontFamily=e;c.style.fontSize=d;c.style.margin=0;c.style.padding=0;a.body.appendChild(c);b.src=
"data:image/gif;base64,R0lGODlhAQABAIABAP///wAAACwAAAAAAQABAAACAkQBADs=";b.width=1;b.height=1;b.style.margin=0;b.style.padding=0;b.style.verticalAlign="baseline";f.style.fontFamily=e;f.style.fontSize=d;f.style.margin=0;f.style.padding=0;f.appendChild(a.createTextNode("Hidden Text"));c.appendChild(f);c.appendChild(b);g=b.offsetTop-f.offsetTop+1;c.removeChild(f);c.appendChild(a.createTextNode("Hidden Text"));c.style.lineHeight="normal";b.style.verticalAlign="super";b={baseline:g,lineWidth:1,middle:b.offsetTop-
c.offsetTop+1};aa[e+"-"+d]=b;a.body.removeChild(c);return b};var D=function(e){return function(d){try{e.addColorStop(d.stop,d.color)}catch(a){ta.log(["failed to add color stop: ",a,"; tried to add: ",d])}}},ta=g.Util,E={};g.Generate=E;var pa=[/^(-webkit-linear-gradient)\(([a-z\s]+)([\w\d\.\s,%\(\)]+)\)$/,/^(-o-linear-gradient)\(([a-z\s]+)([\w\d\.\s,%\(\)]+)\)$/,/^(-webkit-gradient)\((linear|radial),\s((?:\d{1,3}%?)\s(?:\d{1,3}%?),\s(?:\d{1,3}%?)\s(?:\d{1,3}%?))([\w\d\.\s,%\(\)\-]+)\)$/,/^(-moz-linear-gradient)\(((?:\d{1,3}%?)\s(?:\d{1,3}%?))([\w\d\.\s,%\(\)]+)\)$/,
/^(-webkit-radial-gradient)\(((?:\d{1,3}%?)\s(?:\d{1,3}%?)),\s(\w+)\s([a-z\-]+)([\w\d\.\s,%\(\)]+)\)$/,/^(-moz-radial-gradient)\(((?:\d{1,3}%?)\s(?:\d{1,3}%?)),\s(\w+)\s?([a-z\-]*)([\w\d\.\s,%\(\)]+)\)$/,/^(-o-radial-gradient)\(((?:\d{1,3}%?)\s(?:\d{1,3}%?)),\s(\w+)\s([a-z\-]+)([\w\d\.\s,%\(\)]+)\)$/];E.parseGradient=function(e,d){var a,c,b=pa.length,f,g,k,h;for(c=0;c<b&&!(f=e.match(pa[c]));c+=1);if(f)switch(f[1]){case "-webkit-linear-gradient":case "-o-linear-gradient":a={type:"linear",x0:null,y0:null,
x1:null,y1:null,colorStops:[]};if(b=f[2].match(/\w+/g)){g=b.length;for(c=0;c<g;c+=1)switch(b[c]){case "top":a.y0=0;a.y1=d.height;break;case "right":a.x0=d.width;a.x1=0;break;case "bottom":a.y0=d.height;a.y1=0;break;case "left":a.x0=0,a.x1=d.width}}null===a.x0&&null===a.x1&&(a.x0=a.x1=d.width/2);null===a.y0&&null===a.y1&&(a.y0=a.y1=d.height/2);if(b=f[3].match(/((?:rgb|rgba)\(\d{1,3},\s\d{1,3},\s\d{1,3}(?:,\s[0-9\.]+)?\)(?:\s\d{1,3}(?:%|px))?)+/g)){g=b.length;k=1/Math.max(g-1,1);for(c=0;c<g;c+=1)h=
b[c].match(/((?:rgb|rgba)\(\d{1,3},\s\d{1,3},\s\d{1,3}(?:,\s[0-9\.]+)?\))\s*(\d{1,3})?(%|px)?/),h[2]?(f=parseFloat(h[2]),f="%"===h[3]?f/100:f/d.width):f=c*k,a.colorStops.push({color:h[1],stop:f})}break;case "-webkit-gradient":a={type:"radial"===f[2]?"circle":f[2],x0:0,y0:0,x1:0,y1:0,colorStops:[]};if(b=f[3].match(/(\d{1,3})%?\s(\d{1,3})%?,\s(\d{1,3})%?\s(\d{1,3})%?/))a.x0=b[1]*d.width/100,a.y0=b[2]*d.height/100,a.x1=b[3]*d.width/100,a.y1=b[4]*d.height/100;if(b=f[4].match(/((?:from|to|color-stop)\((?:[0-9\.]+,\s)?(?:rgb|rgba)\(\d{1,3},\s\d{1,3},\s\d{1,3}(?:,\s[0-9\.]+)?\)\))+/g)){g=
b.length;for(c=0;c<g;c+=1)h=b[c].match(/(from|to|color-stop)\(([0-9\.]+)?(?:,\s)?((?:rgb|rgba)\(\d{1,3},\s\d{1,3},\s\d{1,3}(?:,\s[0-9\.]+)?\))\)/),f=parseFloat(h[2]),"from"===h[1]&&(f=0),"to"===h[1]&&(f=1),a.colorStops.push({color:h[3],stop:f})}break;case "-moz-linear-gradient":a={type:"linear",x0:0,y0:0,x1:0,y1:0,colorStops:[]};if(b=f[2].match(/(\d{1,3})%?\s(\d{1,3})%?/))a.x0=b[1]*d.width/100,a.y0=b[2]*d.height/100,a.x1=d.width-a.x0,a.y1=d.height-a.y0;if(b=f[3].match(/((?:rgb|rgba)\(\d{1,3},\s\d{1,3},\s\d{1,3}(?:,\s[0-9\.]+)?\)(?:\s\d{1,3}%)?)+/g)){g=
b.length;k=1/Math.max(g-1,1);for(c=0;c<g;c+=1)h=b[c].match(/((?:rgb|rgba)\(\d{1,3},\s\d{1,3},\s\d{1,3}(?:,\s[0-9\.]+)?\))\s*(\d{1,3})?(%)?/),h[2]?(f=parseFloat(h[2]),h[3]&&(f/=100)):f=c*k,a.colorStops.push({color:h[1],stop:f})}break;case "-webkit-radial-gradient":case "-moz-radial-gradient":case "-o-radial-gradient":a={type:"circle",x0:0,y0:0,x1:d.width,y1:d.height,cx:0,cy:0,rx:0,ry:0,colorStops:[]};if(b=f[2].match(/(\d{1,3})%?\s(\d{1,3})%?/))a.cx=b[1]*d.width/100,a.cy=b[2]*d.height/100;b=f[3].match(/\w+/);
h=f[4].match(/[a-z\-]*/);if(b&&h)switch(h[0]){case "farthest-corner":case "cover":case "":c=Math.sqrt(Math.pow(a.cx,2)+Math.pow(a.cy,2));b=Math.sqrt(Math.pow(a.cx,2)+Math.pow(a.y1-a.cy,2));g=Math.sqrt(Math.pow(a.x1-a.cx,2)+Math.pow(a.y1-a.cy,2));h=Math.sqrt(Math.pow(a.x1-a.cx,2)+Math.pow(a.cy,2));a.rx=a.ry=Math.max(c,b,g,h);break;case "closest-corner":c=Math.sqrt(Math.pow(a.cx,2)+Math.pow(a.cy,2));b=Math.sqrt(Math.pow(a.cx,2)+Math.pow(a.y1-a.cy,2));g=Math.sqrt(Math.pow(a.x1-a.cx,2)+Math.pow(a.y1-
a.cy,2));h=Math.sqrt(Math.pow(a.x1-a.cx,2)+Math.pow(a.cy,2));a.rx=a.ry=Math.min(c,b,g,h);break;case "farthest-side":"circle"===b[0]?a.rx=a.ry=Math.max(a.cx,a.cy,a.x1-a.cx,a.y1-a.cy):(a.type=b[0],a.rx=Math.max(a.cx,a.x1-a.cx),a.ry=Math.max(a.cy,a.y1-a.cy));break;case "closest-side":case "contain":"circle"===b[0]?a.rx=a.ry=Math.min(a.cx,a.cy,a.x1-a.cx,a.y1-a.cy):(a.type=b[0],a.rx=Math.min(a.cx,a.x1-a.cx),a.ry=Math.min(a.cy,a.y1-a.cy))}if(b=f[5].match(/((?:rgb|rgba)\(\d{1,3},\s\d{1,3},\s\d{1,3}(?:,\s[0-9\.]+)?\)(?:\s\d{1,3}(?:%|px))?)+/g)){g=
b.length;k=1/Math.max(g-1,1);for(c=0;c<g;c+=1)h=b[c].match(/((?:rgb|rgba)\(\d{1,3},\s\d{1,3},\s\d{1,3}(?:,\s[0-9\.]+)?\))\s*(\d{1,3})?(%|px)?/),h[2]?(f=parseFloat(h[2]),f="%"===h[3]?f/100:f/d.width):f=c*k,a.colorStops.push({color:h[1],stop:f})}}return a};E.Gradient=function(e,d){if(!(0===d.width||0===d.height)){var a=r.createElement("canvas"),c=a.getContext("2d"),b,f;a.width=d.width;a.height=d.height;if(b=g.Generate.parseGradient(e,d))switch(b.type){case "linear":f=c.createLinearGradient(b.x0,b.y0,
b.x1,b.y1);b.colorStops.forEach(D(f));c.fillStyle=f;c.fillRect(0,0,d.width,d.height);break;case "circle":f=c.createRadialGradient(b.cx,b.cy,0,b.cx,b.cy,b.rx);b.colorStops.forEach(D(f));c.fillStyle=f;c.fillRect(0,0,d.width,d.height);break;case "ellipse":var y=r.createElement("canvas"),k=y.getContext("2d");f=Math.max(b.rx,b.ry);var h=2*f;y.width=y.height=h;f=k.createRadialGradient(b.rx,b.ry,0,b.rx,b.ry,f);b.colorStops.forEach(D(f));k.fillStyle=f;k.fillRect(0,0,h,h);c.fillStyle=b.colorStops[b.colorStops.length-
1].color;c.fillRect(0,0,a.width,a.height);c.drawImage(y,b.cx-b.rx,b.cy-b.ry,2*b.rx,2*b.ry)}return a}};E.ListAlpha=function(e){var d="",a;do a=e%26,d=String.fromCharCode(a+64)+d,e/=26;while(26<26*e);return d};E.ListRoman=function(e){var d="M CM D CD C XC L XL X IX V IV I".split(" "),a=[1E3,900,500,400,100,90,50,40,10,9,5,4,1],c="",b,f=d.length;if(0>=e||4E3<=e)return e;for(b=0;b<f;b+=1)for(;e>=a[b];)e-=a[b],c+=d[b];return c};g.Parse=function(e,d){function a(a,c){var b=parseInt(n(a,c),10);return isNaN(b)?
0:b}function c(a,c,b,e,d,f){"transparent"!==f&&(a.setVariable("fillStyle",f),a.fillRect(c,b,e,d))}function b(a,c,b){if(0<a.length)return c+b.toUpperCase()}function f(a,c){switch(c){case "lowercase":return a.toLowerCase();case "capitalize":return a.replace(/(^|\s|:|-|\(|\))([a-z])/g,b);case "uppercase":return a.toUpperCase();default:return a}}function y(a,c,b,e){var d=n(c,"fontWeight"),f=n(c,"fontFamily"),h=n(c,"fontSize"),g=x.parseTextShadows(n(c,"textShadow"));switch(parseInt(d,10)){case 401:d="bold";
break;case 400:d="normal"}a.setVariable("fillStyle",e);a.setVariable("font",[n(c,"fontStyle"),n(c,"fontVariant"),d,h,f].join(" "));a.setVariable("textAlign","left");g.length&&(a.setVariable("shadowColor",g[0].color),a.setVariable("shadowOffsetX",g[0].offsetX),a.setVariable("shadowOffsetY",g[0].offsetY),a.setVariable("shadowBlur",g[0].blur));if("none"!==b)return x.Font(f,h,z)}function k(a,b,e){var h=e.ctx,g=n(a,"color"),ka=n(a,"textDecoration"),w=n(a,"textAlign"),V,m,k=b,s=0;if(0<x.trimText(b.nodeValue).length){b.nodeValue=
f(b.nodeValue,n(a,"textTransform"));var w=w.replace(["-webkit-auto"],["auto"]),u;if(u=!d.letterRendering){if(w=/^(left|right|justify|auto)$/.test(w))w=n(a,"letterSpacing"),w=/^(normal|none|0px)$/.test(w);u=w}m=u?b.nodeValue.split(/(\b| )/):b.nodeValue.split("");V=y(h,a,ka,g);d.chinese&&m.forEach(function(a,c){/.*[\u4E00-\u9FA5].*$/.test(a)&&(a=a.split(""),a.unshift(c,1),m.splice.apply(m,a))});m.forEach(function(a,b){var C,d=b<m.length-1;C=e.transform.matrix;var f;if(E.rangeBounds&&!C){if("none"!==
ka||0!==x.trimText(a).length)C=k,d=s,f=z.createRange(),f.setStart(C,d),f.setEnd(C,d+a.length),f=f.getBoundingClientRect();s+=a.length}else if(k&&"string"===typeof k.nodeValue){var d=d?k.splitText(a.length):null,ga=k;f=ga.parentNode;var w=z.createElement("wrapper"),y=ga.cloneNode(!0);w.appendChild(ga.cloneNode(!0));f.replaceChild(w,ga);C=C?x.OffsetBounds(w):x.Bounds(w);f.replaceChild(y,w);f=C;k=d}if(C=f)switch(d=C.left,f=C.bottom,null!==a&&0<x.trimText(a).length&&h.fillText(a,d,f),ka){case "underline":c(h,
C.left,Math.round(C.top+V.baseline+V.lineWidth),C.width,1,g);break;case "overline":c(h,C.left,Math.round(C.top),C.width,1,g);break;case "line-through":c(h,C.left,Math.ceil(C.top+V.middle+V.lineWidth),C.width,1,g)}})}}function h(a){return(a=e[a])&&!0===a.succeeded?a.img:!1}function U(a,c){var b=Math.max(a.left,c.left),d=Math.max(a.top,c.top),e=Math.min(a.left+a.width,c.left+c.width),f=Math.min(a.top+a.height,c.top+c.height);return{left:b,top:d,width:e-b,height:f-d}}function u(c,b,d,e,f){var h=a(b,
"paddingLeft"),g=a(b,"paddingTop"),w=a(b,"paddingRight"),b=a(b,"paddingBottom");ha(c,d,0,0,d.width,d.height,e.left+h+f[3].width,e.top+g+f[0].width,e.width-(f[1].width+f[3].width+h+w),e.height-(f[0].width+f[2].width+g+b))}function q(a,c,b,d){var e=function(a,c,b){return{x:a.x+(c.x-a.x)*b,y:a.y+(c.y-a.y)*b}};return{start:a,startControl:c,endControl:b,end:d,subdivide:function(f){var h=e(a,c,f),g=e(c,b,f),w=e(b,d,f),V=e(h,g,f),g=e(g,w,f),f=e(V,g,f);return[q(a,h,V,f),q(f,g,w,d)]},curveTo:function(a){a.push(["bezierCurve",
c.x,c.y,b.x,b.y,d.x,d.y])},curveToReversed:function(d){d.push(["bezierCurve",b.x,b.y,c.x,c.y,a.x,a.y])}}}function m(a,c,b,d,e,f,h){0<c[0]||0<c[1]?(a.push(["line",d[0].start.x,d[0].start.y]),d[0].curveTo(a),d[1].curveTo(a)):a.push(["line",f,h]);(0<b[0]||0<b[1])&&a.push(["line",e[0].start.x,e[0].start.y])}function fa(a,c,b,d,e,f,h){var g=[];0<c[0]||0<c[1]?(g.push(["line",d[1].start.x,d[1].start.y]),d[1].curveTo(g)):g.push(["line",a.c1[0],a.c1[1]]);0<b[0]||0<b[1]?(g.push(["line",f[0].start.x,f[0].start.y]),
f[0].curveTo(g),g.push(["line",h[0].end.x,h[0].end.y]),h[0].curveToReversed(g)):(g.push(["line",a.c2[0],a.c2[1]]),g.push(["line",a.c3[0],a.c3[1]]));0<c[0]||0<c[1]?(g.push(["line",e[1].end.x,e[1].end.y]),e[1].curveToReversed(g)):g.push(["line",a.c4[0],a.c4[1]]);return g}function $(a,c){var b=a.drawShape();c.forEach(function(a,c){b[0===c?"moveTo":a[0]+"To"].apply(null,a.slice(1))});return b}function Y(a,c,b){var d=z.createElement("valuewrap");"lineHeight textAlign fontFamily color fontSize paddingLeft paddingTop width height border borderLeftWidth borderTopWidth".split(" ").forEach(function(c){try{d.style[c]=
n(a,c)}catch(b){x.log("html2canvas: Parse: Exception caught in renderFormValue: "+b.message)}});d.style.borderColor="black";d.style.borderStyle="solid";d.style.display="block";d.style.position="absolute";if(/^(submit|reset|button|text|password)$/.test(a.type)||"SELECT"===a.nodeName)d.style.lineHeight=n(a,"height");d.style.top=c.top+"px";d.style.left=c.left+"px";c="SELECT"===a.nodeName?(a.options[a.selectedIndex]||0).text:a.value;c||(c=a.placeholder);c=z.createTextNode(c);d.appendChild(c);ia.appendChild(d);
k(a,c,b);ia.removeChild(d)}function ha(a){a.drawImage.apply(a,Array.prototype.slice.call(arguments,1))}function J(a,c){var b=l.getComputedStyle(a,c);if(b&&b.content&&!("none"===b.content||"-moz-alt-content"===b.content||"none"===b.display)){var d=b.content+"",e=d.substr(0,1);e===d.substr(d.length-1)&&e.match(/'|"/)&&(d=d.substr(1,d.length-2));var e="url"===d.substr(0,3),f=r.createElement(e?"img":"span");f.className=Z+"-before "+Z+"-after";Object.keys(b).filter(ja).forEach(function(a){try{f.style[a]=
b[a]}catch(c){x.log(["Tried to assign readonly property ",a,"Error:",c])}});e?f.src=x.parseBackgroundImage(d)[0].args[0]:f.innerHTML=d;return f}}function ja(a){return isNaN(l.parseInt(a,10))}function ba(a,c,b,d){var e=Math.round(d.left+b.left),b=Math.round(d.top+b.top);a.createPattern(c);a.translate(e,b);a.fill();a.translate(-e,-b)}function w(a,c,b,d,e,f,g,h){var w=[];w.push(["line",Math.round(e),Math.round(f)]);w.push(["line",Math.round(e+g),Math.round(f)]);w.push(["line",Math.round(e+g),Math.round(h+
f)]);w.push(["line",Math.round(e),Math.round(h+f)]);$(a,w);a.save();a.clip();ba(a,c,b,d);a.restore()}function V(a){return a.replace("px","")}function s(b,e,f,k){var p,s,l,q,t,r,Q,K,v,j=n(b,"transform")||n(b,"-webkit-transform")||n(b,"-moz-transform")||n(b,"-ms-transform")||n(b,"-o-transform");v=n(b,"transform-origin")||n(b,"-webkit-transform-origin")||n(b,"-moz-transform-origin")||n(b,"-ms-transform-origin")||n(b,"-o-transform-origin")||"0px 0px";v=v.split(" ").map(V).map(x.asFloat);var i;if(j&&"none"!==
j&&(j=j.match(ea)))switch(j[1]){case "matrix":i=j[2].split(",").map(x.trimText).map(x.asFloat)}v={origin:v,matrix:i};i=v.matrix?x.OffsetBounds(b):x.Bounds(b);v.origin[0]+=i.left;v.origin[1]+=i.top;var D,j=!e?Math.max(Math.max(z.body.scrollWidth,z.documentElement.scrollWidth),Math.max(z.body.offsetWidth,z.documentElement.offsetWidth),Math.max(z.body.clientWidth,z.documentElement.clientWidth)):i.width;p=!e?Math.max(Math.max(z.body.scrollHeight,z.documentElement.scrollHeight),Math.max(z.body.offsetHeight,
z.documentElement.offsetHeight),Math.max(z.body.clientHeight,z.documentElement.clientHeight)):i.height;var L=[],j={storage:L,width:j,height:p,clip:function(){L.push({type:"function",name:"clip",arguments:arguments})},translate:function(){L.push({type:"function",name:"translate",arguments:arguments})},fill:function(){L.push({type:"function",name:"fill",arguments:arguments})},save:function(){L.push({type:"function",name:"save",arguments:arguments})},restore:function(){L.push({type:"function",name:"restore",
arguments:arguments})},fillRect:function(){L.push({type:"function",name:"fillRect",arguments:arguments})},createPattern:function(){L.push({type:"function",name:"createPattern",arguments:arguments})},drawShape:function(){var a=[];L.push({type:"function",name:"drawShape",arguments:a});return{moveTo:function(){a.push({name:"moveTo",arguments:arguments})},lineTo:function(){a.push({name:"lineTo",arguments:arguments})},arcTo:function(){a.push({name:"arcTo",arguments:arguments})},bezierCurveTo:function(){a.push({name:"bezierCurveTo",
arguments:arguments})},quadraticCurveTo:function(){a.push({name:"quadraticCurveTo",arguments:arguments})}}},drawImage:function(){L.push({type:"function",name:"drawImage",arguments:arguments})},fillText:function(){L.push({type:"function",name:"fillText",arguments:arguments})},setVariable:function(a,b){L.push({type:"variable",name:a,arguments:b});return b}};p=j.setVariable("globalAlpha",n(b,"opacity")*(e?e.opacity:1));var M=n(b,"position"),I;I=["Top","Right","Bottom","Left"].map(function(c){return{width:a(b,
"border"+c+"Width"),color:n(b,"border"+c+"Color")}});v={ctx:j,opacity:p,cssPosition:M,borders:I,transform:v,clip:e&&e.clip?x.Extend({},e.clip):null};M=(p="static"!==v.cssPosition)?n(b,"zIndex"):"auto";I=n(b,"opacity");var N="none"!==n(b,"cssFloat");v.zIndex=j={zindex:M,children:[]};j.isPositioned=p;j.isFloated=N;j.opacity=I;j.ownStacking="auto"!==M||1>I;e&&e.zIndex.children.push(v);!0===d.useOverflow&&(!0===/(hidden|scroll|auto)/.test(n(b,"overflow"))&&!1===/(BODY)/i.test(b.nodeName))&&(v.clip=v.clip?
U(v.clip,i):i);var j=v.borders,R=v.ctx,e=v.clip;p={left:i.left+j[3].width,top:i.top+j[0].width,width:i.width-(j[1].width+j[3].width),height:i.height-(j[0].width+j[2].width)};e&&(p=U(p,e));e=p;M=i.left;I=i.top;var N=i.width,S=i.height,W,B,A,G,H,O,o;o=["TopLeft","TopRight","BottomRight","BottomLeft"].map(function(a){return n(b,"border"+a+"Radius")});var T=i.left,F=i.top;r=i.width;Q=i.height;s=o[0][0];l=o[0][1];q=o[1][0];t=o[1][1];A=o[2][0];G=o[2][1];K=o[3][0];W=o[3][1];var E=r-q;H=Q-G;var ja=r-A;B=
Q-W;p=X(T,F,s,l).topLeft.subdivide(0.5);s=X(T+j[3].width,F+j[0].width,Math.max(0,s-j[3].width),Math.max(0,l-j[0].width)).topLeft.subdivide(0.5);l=X(T+E,F,q,t).topRight.subdivide(0.5);q=X(T+Math.min(E,r+j[3].width),F+j[0].width,E>r+j[3].width?0:q-j[3].width,t-j[0].width).topRight.subdivide(0.5);t=X(T+ja,F+H,A,G).bottomRight.subdivide(0.5);r=X(T+Math.min(ja,r+j[3].width),F+Math.min(H,Q+j[0].width),Math.max(0,A-j[1].width),Math.max(0,G-j[2].width)).bottomRight.subdivide(0.5);Q=X(T,F+B,K,W).bottomLeft.subdivide(0.5);
K=X(T+j[3].width,F+B,Math.max(0,K-j[3].width),Math.max(0,W-j[2].width)).bottomLeft.subdivide(0.5);F=[];switch(n(b,"backgroundClip")){case "content-box":case "padding-box":m(F,o[0],o[1],s,q,i.left+j[3].width,i.top+j[0].width);m(F,o[1],o[2],q,r,i.left+i.width-j[1].width,i.top+j[0].width);m(F,o[2],o[3],r,K,i.left+i.width-j[1].width,i.top+i.height-j[2].width);m(F,o[3],o[0],K,s,i.left+j[3].width,i.top+i.height-j[2].width);break;default:m(F,o[0],o[1],p,l,i.left,i.top),m(F,o[1],o[2],l,t,i.left+i.width,i.top),
m(F,o[2],o[3],t,Q,i.left+i.width,i.top+i.height),m(F,o[3],o[0],Q,p,i.left,i.top+i.height)}T=[];for(W=0;4>W;W++)if(0<j[W].width){B=M;A=I;G=N;H=S-j[2].width;switch(W){case 0:H=j[0].width;O=fa({c1:[B,A],c2:[B+G,A],c3:[B+G-j[1].width,A+H],c4:[B+j[3].width,A+H]},o[0],o[1],p,s,l,q);break;case 1:B=M+N-j[1].width;G=j[1].width;O=fa({c1:[B+G,A],c2:[B+G,A+H+j[2].width],c3:[B,A+H],c4:[B,A+j[0].width]},o[1],o[2],l,q,t,r);break;case 2:A=A+S-j[2].width;H=j[2].width;O=fa({c1:[B+G,A+H],c2:[B,A+H],c3:[B+j[3].width,
A],c4:[B+G-j[3].width,A]},o[2],o[3],t,r,Q,K);break;case 3:G=j[3].width,O=fa({c1:[B,A+H+j[2].width],c2:[B,A],c3:[B+G,A+j[0].width],c4:[B+G,A+H]},o[3],o[0],Q,K,p,s)}T.push({args:O,color:j[W].color})}O=aa.test(b.nodeName)?"#efefef":n(b,"backgroundColor");$(R,F);R.save();R.clip();if(0<e.height&&0<e.width&&!k){c(R,i.left,i.top,i.width,i.height,O);p=n(b,"backgroundImage");k=x.parseBackgroundImage(p);for(O=k.length;O--;)if(p=k[O],p.args&&0!==p.args.length)if(I=h("url"===p.method?p.args[0]:p.value))switch(o=
b,p=e,M=R,s=I,I=O,N=x.BackgroundSize(o,p,s,I),S=x.BackgroundPosition(o,p,s,I,N),o=n(o,"backgroundRepeat").split(",").map(x.trimText),s.width===N.width&&s.height===N.height||(l=void 0,q=z.createElement("canvas"),q.width=N.width,q.height=N.height,l=q.getContext("2d"),ha(l,s,0,0,s.width,s.height,0,0,N.width,N.height),s=q),o=o[I]||o[0],o){case "repeat-x":w(M,s,S,p,p.left,p.top+S.top,99999,s.height);break;case "repeat-y":w(M,s,S,p,p.left+S.left,p.top,s.width,99999);break;case "no-repeat":w(M,s,S,p,p.left+
S.left,p.top+S.top,s.width,s.height);break;default:ba(M,s,S,{top:p.top,left:p.left,width:s.width,height:s.height})}else x.log("html2canvas: Error loading background:",p)}else k&&(v.backgroundColor=O);R.restore();T.forEach(function(a){var b=a.args,a=a.color;if(a!=="transparent"){R.setVariable("fillStyle",a);$(R,b);R.fill()}});if(!f&&(f=J(b,":before"),k=J(b,":after"),f||k))if(f&&(b.className+=" "+Z+"-before",b.parentNode.insertBefore(f,b),la(f,v,!0),b.parentNode.removeChild(f),b.className=b.className.replace(Z+
"-before","").trim()),k)b.className+=" "+Z+"-after",b.appendChild(k),la(k,v,!0),b.removeChild(k),b.className=b.className.replace(Z+"-after","").trim();switch(b.nodeName){case "IMG":(D=h(b.getAttribute("src")))?u(R,b,D,i,j):x.log("html2canvas: Error loading <img>:"+b.getAttribute("src"));break;case "INPUT":/^(text|url|email|submit|button|reset)$/.test(b.type)&&0<(b.value||b.placeholder||"").length&&Y(b,i,v);break;case "TEXTAREA":0<(b.value||b.placeholder||"").length&&Y(b,i,v);break;case "SELECT":0<
(b.options||b.placeholder||"").length&&Y(b,i,v);break;case "LI":var P;D=v.ctx;f=n(b,"listStyleType");if(/^(decimal|decimal-leading-zero|upper-alpha|upper-latin|upper-roman|lower-alpha|lower-greek|lower-latin|lower-roman)$/i.test(f)){i=-1;k=1;j=b.parentNode.childNodes;if(b.parentNode){for(;j[++i]!==b;)1===j[i].nodeType&&k++;i=k}else i=-1;switch(f){case "decimal":P=i;break;case "decimal-leading-zero":P=1===i.toString().length?"0"+i.toString():i.toString();break;case "upper-roman":P=g.Generate.ListRoman(i);
break;case "lower-roman":P=g.Generate.ListRoman(i).toLowerCase();break;case "lower-alpha":P=g.Generate.ListAlpha(i).toLowerCase();break;case "upper-alpha":P=g.Generate.ListAlpha(i)}P+=". ";i=z.createElement("boundelement");i.style.display="inline";k=b.style.listStyleType;b.style.listStyleType="none";i.appendChild(z.createTextNode(P));b.insertBefore(i,b.firstChild);f=x.Bounds(i);b.removeChild(i);b.style.listStyleType=k;y(D,b,"none",n(b,"color"));"inside"===n(b,"listStylePosition")&&(D.setVariable("textAlign",
"left"),i=e.left,f=f.bottom,null!==P&&0<x.trimText(P).length&&D.fillText(P,i,f))}break;case "CANVAS":u(R,b,b,i,j)}return v}function la(a,b,c){"none"!==n(a,"display")&&("hidden"!==n(a,"visibility")&&!a.hasAttribute("data-html2canvas-ignore"))&&(b=s(a,b,c,!1)||b,aa.test(a.nodeName)||Q(a,b,c))}function Q(a,b,c){x.Children(a).forEach(function(d){d.nodeType===d.ELEMENT_NODE?la(d,b,c):d.nodeType===d.TEXT_NODE&&k(a,d,b)})}l.scroll(0,0);var K=d.elements===t?r.body:d.elements[0],z=K.ownerDocument,x=g.Util,
E=x.Support(d,z),aa=RegExp("("+d.ignoreElements+")"),ia=z.body,n=x.getCSS,Z="___html2canvas___pseudoelement",D=z.createElement("style");D.innerHTML="."+Z+'-before:before { content: "" !important; display: none !important; }.'+Z+'-after:after { content: "" !important; display: none !important; }';ia.appendChild(D);var e=e||{},X,ca=4*((Math.sqrt(2)-1)/3);X=function(a,b,c,d){var e=c*ca,f=d*ca,c=a+c,d=b+d;return{topLeft:q({x:a,y:d},{x:a,y:d-f},{x:c-e,y:b},{x:c,y:b}),topRight:q({x:a,y:b},{x:a+e,y:b},{x:c,
y:d-f},{x:c,y:d}),bottomRight:q({x:c,y:b},{x:c,y:b+f},{x:a+e,y:d},{x:a,y:d}),bottomLeft:q({x:c,y:d},{x:c-e,y:d},{x:a,y:b+f},{x:a,y:b})}};var ea=/(matrix)\((.+)\)/,ma=n(r.documentElement,"backgroundColor"),da=x.isTransparent(ma)&&K===r.body,na=s(K,null,!1,da);Q(K,na);da&&(ma=na.backgroundColor);ia.removeChild(D);return{backgroundColor:ma,stack:na}};g.Preload=function(e){function d(){u.log("html2canvas: start: images: "+h.numLoaded+" / "+h.numTotal+" (failed: "+h.numFailed+")");!h.firstRun&&h.numLoaded>=
h.numTotal&&(u.log("Finished loading images: # "+h.numTotal+" (failed: "+h.numFailed+")"),"function"===typeof e.complete&&e.complete(h))}function a(a,b,c){var f,g=e.proxy,m;J.href=a;a=J.href;f="html2canvas_"+D++;c.callbackname=f;g=-1<g.indexOf("?")?g+"&":g+"?";g+="url="+encodeURIComponent(a)+"&callback="+f;m=$.createElement("script");l[f]=function(a){"error:"===a.substring(0,6)?(c.succeeded=!1,h.numLoaded++,h.numFailed++,d()):(k(b,c),b.src=a);l[f]=t;try{delete l[f]}catch(e){}m.parentNode.removeChild(m);
m=null;delete c.script;delete c.callbackname};m.setAttribute("type","text/javascript");m.setAttribute("src",g);c.script=m;l.document.body.appendChild(m)}function c(a,b){var c=l.getComputedStyle(a,b),d=c.content;"url"===d.substr(0,3)&&q.loadImage(g.Util.parseBackgroundImage(d)[0].args[0]);f(c.backgroundImage,a)}function b(a){return a&&a.method&&a.args&&0<a.args.length}function f(a,c){var e;g.Util.parseBackgroundImage(a).filter(b).forEach(function(a){if("url"===a.method)q.loadImage(a.args[0]);else if(a.method.match(/\-?gradient$/)){e===
t&&(e=g.Util.Bounds(c));var a=a.value,b=g.Generate.Gradient(a,e);b!==t&&(h[a]={img:b,succeeded:!0},h.numTotal++,h.numLoaded++,d())}})}function y(a){var b=!1;try{u.Children(a).forEach(y)}catch(d){}try{b=a.nodeType}catch(e){b=!1,u.log("html2canvas: failed to access some element's nodeType - Exception: "+e.message)}if(1===b||b===t){c(a,":before");c(a,":after");try{f(u.getCSS(a,"backgroundImage"),a)}catch(g){u.log("html2canvas: failed to get background-image - Exception: "+g.message)}f(a)}}function k(b,
c){b.onload=function(){c.timer!==t&&l.clearTimeout(c.timer);h.numLoaded++;c.succeeded=!0;b.onerror=b.onload=null;d()};b.onerror=function(){if("anonymous"===b.crossOrigin&&(l.clearTimeout(c.timer),e.proxy)){var f=b.src;b=new Image;c.img=b;b.src=f;a(b.src,b,c);return}h.numLoaded++;h.numFailed++;c.succeeded=!1;b.onerror=b.onload=null;d()}}var h={numLoaded:0,numFailed:0,numTotal:0,cleanupDone:!1},U,u=g.Util,q,m,D=0;m=e.elements[0]||r.body;var $=m.ownerDocument,Y=m.getElementsByTagName("img"),ha=Y.length,
J=$.createElement("a"),E;E=(new Image).crossOrigin!==t;var ba;J.href=l.location.href;U=J.protocol+J.host;q={loadImage:function(b){var c,d;b&&h[b]===t&&(c=new Image,b.match(/data:image\/.*;base64,/i)?(c.src=b.replace(/url\(['"]{0,}|['"]{0,}\)$/ig,""),d=h[b]={img:c},h.numTotal++,k(c,d)):(J.href=b,J.href=J.href,J.protocol+J.host===U||!0===e.allowTaint?(d=h[b]={img:c},h.numTotal++,k(c,d),c.src=b):E&&!e.allowTaint&&e.useCORS?(c.crossOrigin="anonymous",d=h[b]={img:c},h.numTotal++,k(c,d),c.src=b):e.proxy&&
(d=h[b]={img:c},h.numTotal++,a(b,c,d))))},cleanupDOM:function(a){var b,c;if(!h.cleanupDone){a&&"string"===typeof a?u.log("html2canvas: Cleanup because: "+a):u.log("html2canvas: Cleanup after timeout: "+e.timeout+" ms.");for(c in h)if(h.hasOwnProperty(c)&&(b=h[c],"object"===typeof b&&b.callbackname&&b.succeeded===t)){l[b.callbackname]=t;try{delete l[b.callbackname]}catch(f){}b.script&&b.script.parentNode&&(b.script.setAttribute("src","about:blank"),b.script.parentNode.removeChild(b.script));h.numLoaded++;
h.numFailed++;u.log("html2canvas: Cleaned up failed img: '"+c+"' Steps: "+h.numLoaded+" / "+h.numTotal)}l.stop!==t?l.stop():r.execCommand!==t&&r.execCommand("Stop",!1);r.close!==t&&r.close();h.cleanupDone=!0;a&&"string"===typeof a||d()}},renderingDone:function(){ba&&l.clearTimeout(ba)}};0<e.timeout&&(ba=l.setTimeout(q.cleanupDOM,e.timeout));u.log("html2canvas: Preload starts: finding background-images");h.firstRun=!0;y(m);u.log("html2canvas: Preload: Finding images");for(m=0;m<ha;m+=1)q.loadImage(Y[m].getAttribute("src"));
h.firstRun=!1;u.log("html2canvas: Preload: Done.");h.numTotal===h.numLoaded&&d();return q};g.Renderer=function(e,d){var a;a=d.renderer;if("string"===typeof d.renderer&&g.Renderer[a]!==t)a=g.Renderer[a](d);else if("function"===typeof a)a=a(d);else throw Error("Unknown renderer");if("function"!==typeof a)throw Error("Invalid renderer defined");var c=r,b=function(a){Object.keys(a).sort().forEach(function(c){var d=[],e=[],g=[],k=[];a[c].forEach(function(a){a.node.zIndex.isPositioned||1>a.node.zIndex.opacity?
g.push(a):a.node.zIndex.isFloated?e.push(a):d.push(a)});(function Y(a){a.forEach(function(a){k.push(a);a.children&&Y(a.children)})})(d.concat(e,g));k.forEach(function(a){a.context?b(a.context):f.push(a.node)})})},f=[],y=function(a,b,c){var d="auto"===b.zIndex.zindex?0:Number(b.zIndex.zindex),e=a,f=b.zIndex.isPositioned,g=b.zIndex.isFloated,k={node:b},l=c;if(b.zIndex.ownStacking)e=k.context={"!":[{node:b,children:[]}]},l=t;else if(f||g)l=k.children=[];0===d&&c?c.push(k):(a[d]||(a[d]=[]),a[d].push(k));
b.zIndex.children.forEach(function(a){y(e,a,l)})},k={};y(k,e.stack);b(k);return a(e,d,c,f,g)};g.Util.Support=function(e,d){function a(){var a=new Image,b=d.createElement("canvas"),c=b.getContext===t?!1:b.getContext("2d");if(!1===c)return!1;b.width=b.height=10;a.src="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='10'><foreignObject width='10' height='10'><div xmlns='http://www.w3.org/1999/xhtml' style='width:10;height:10;'>sup</div></foreignObject></svg>";try{c.drawImage(a,
0,0),b.toDataURL()}catch(e){return!1}g.Util.log("html2canvas: Parse: SVG powered rendering available");return!0}var c,b,f=!1;d.createRange&&(c=d.createRange(),c.getBoundingClientRect&&(b=d.createElement("boundtest"),b.style.height="123px",b.style.display="block",d.body.appendChild(b),c.selectNode(b),c=c.getBoundingClientRect(),c=c.height,123===c&&(f=!0),d.body.removeChild(b)));return{rangeBounds:f,svgRendering:e.svgRendering&&a()}};l.html2canvas=function(e,d){var e=e.length?e:[e],a,c,b={logging:!1,
elements:e,background:"#fff",proxy:null,timeout:0,useCORS:!1,allowTaint:!1,svgRendering:!1,ignoreElements:"IFRAME|OBJECT|PARAM",useOverflow:!0,letterRendering:!1,chinese:!1,width:null,height:null,taintTest:!0,renderer:"Canvas"},b=g.Util.Extend(d,b);g.logging=b.logging;b.complete=function(d){if(!("function"===typeof b.onpreloaded&&!1===b.onpreloaded(d))&&(a=g.Parse(d,b),!("function"===typeof b.onparsed&&!1===b.onparsed(a))&&(c=g.Renderer(a,b),"function"===typeof b.onrendered)))b.onrendered(c)};l.setTimeout(function(){g.Preload(b)},
0);return{render:function(a,c){return g.Renderer(a,g.Util.Extend(c,b))},parse:function(a,c){return g.Parse(a,g.Util.Extend(c,b))},preload:function(a){return g.Preload(g.Util.Extend(a,b))},log:g.Util.log}};l.html2canvas.log=g.Util.log;l.html2canvas.Renderer={Canvas:t};g.Renderer.Canvas=function(e){var e=e||{},d=r,a=[],c=r.createElement("canvas"),b=c.getContext("2d"),f=g.Util,l=e.canvas||d.createElement("canvas");return function(g,h,r,u,q){var m=l.getContext("2d"),D,E=g.stack;l.width=l.style.width=
h.width||E.ctx.width;l.height=l.style.height=h.height||E.ctx.height;D=m.fillStyle;m.fillStyle=f.isTransparent(E.backgroundColor)&&h.background!==t?h.background:g.backgroundColor;m.fillRect(0,0,l.width,l.height);m.fillStyle=D;u.forEach(function(g){m.textBaseline="bottom";m.save();g.transform.matrix&&(m.translate(g.transform.origin[0],g.transform.origin[1]),m.transform.apply(m,g.transform.matrix),m.translate(-g.transform.origin[0],-g.transform.origin[1]));g.clip&&(m.beginPath(),m.rect(g.clip.left,g.clip.top,
g.clip.width,g.clip.height),m.clip());g.ctx.storage&&g.ctx.storage.forEach(function(g){var h=m;switch(g.type){case "variable":h[g.name]=g.arguments;break;case "function":switch(g.name){case "createPattern":if(g.arguments[0].width>0&&g.arguments[0].height>0)try{h.fillStyle=h.createPattern(g.arguments[0],"repeat")}catch(l){f.log("html2canvas: Renderer: Error creating pattern",l.message)}break;case "drawShape":g=g.arguments;h.beginPath();g.forEach(function(a){h[a.name].apply(h,a.arguments)});h.closePath();
break;case "drawImage":if(g.arguments[8]>0&&g.arguments[7]>0){var k;if(!(k=!e.taintTest))if(k=e.taintTest)a:{if(a.indexOf(g.arguments[0].src)===-1){b.drawImage(g.arguments[0],0,0);try{b.getImageData(0,0,1,1)}catch(q){c=d.createElement("canvas");b=c.getContext("2d");k=false;break a}a.push(g.arguments[0].src)}k=true}k&&h.drawImage.apply(h,g.arguments)}break;default:h[g.name].apply(h,g.arguments)}}});m.restore()});f.log("html2canvas: Renderer: Canvas renderer done - returning canvas obj");return 1===
h.elements.length&&"object"===typeof h.elements[0]&&"BODY"!==h.elements[0].nodeName?(g=q.Util.Bounds(h.elements[0]),r=r.createElement("canvas"),r.width=Math.ceil(g.width),r.height=Math.ceil(g.height),m=r.getContext("2d"),m.drawImage(l,g.left,g.top,g.width,g.height,0,0,g.width,g.height),l=null,r):l}}})(window,document);
cp.rtInherits=function(a,b){function c(){}c.prototype=b.prototype;a.prototype=new c;a.prototype.constructor=a;a.baseConstructor=b;a.superClass=b.prototype};cp.HexToRGBA=function(a,b){if(void 0==a)return a;var c=a;"#"==c.charAt(0)&&(c=c.substring(1));if(6>c.length)return a;var d=parseInt(c.substring(0,2),16),e=parseInt(c.substring(2,4),16),c=parseInt(c.substring(4,6),16);return"rgba("+d+","+e+","+c+","+b+")"};
cp.RuntimeDialogSeparator=function(a,b,c){this.m_parent=a;this.m_XPos=b;this.m_YPos=c;this.m_color="#000000";this.m_alpha=0.5;this.m_size=10;this.m_strokeWidth=2;this.m_shadowColor="#FFFFFF";this.m_shadowAlpha=0.65;this.m_shadowAngle=270;this.m_shadowBlur=2;this.m_shadowDistance=1};
cp.RuntimeDialogSeparator.prototype={setColor:function(a){this.m_color=a},setAlpha:function(a){this.m_alpha=a},setSize:function(a){this.m_size=a},setShadowColor:function(a){this.m_shadowColor=a},getComponentDiv:function(){var a=document.createElement("div");a.style.height=this.m_strokeWidth+"px";a.style.backgroundColor=this.m_color;a.style.opacity=this.m_alpha;a.style.position="relative";a.style.marginLeft=this.m_XPos+"px";a.style.marginRight=this.m_XPos+"px";a.style.top=this.m_YPos+"px";"webkitBoxShadow"in
a.style?a.style.webkitBoxShadow=this.m_shadowDistance+"px "+this.m_shadowDistance+"px "+this.m_shadowBlur+"px "+this.m_shadowColor:"MozBoxShadow"in a.style?a.style.MozBoxShadow=this.m_shadowDistance+"px "+this.m_shadowDistance+"px "+this.m_shadowBlur+"px "+this.m_shadowColor:a.style.boxShadow=this.m_shadowDistance+"px "+this.m_shadowDistance+"px "+this.m_shadowBlur+"px "+this.m_shadowColor;return a}};
cp.RuntimeDialogText=function(a,b,c){this.m_parent=a;this.m_fontName="Myriad Pro";this.m_XPos=b;this.m_YPos=c;this.m_fontSize=14;this.m_fontColor="#ff0000";this.m_text="Sample Text";this.m_multiline=!1;this.m_maxWidth="400px";this.m_maxHeight="80px";this.m_shadowColor="#FFFFFF";this.m_shadowAlpha=0.35;this.m_shadowAngle=270;this.m_shadowBlur=2;this.m_shadowDistance=1};
cp.RuntimeDialogText.prototype={setFontName:function(a){this.m_fontName=a},setFontSize:function(a){this.m_fontSize=a},setFontColor:function(a){this.m_fontColor=a},setText:function(a){this.m_text=a},setMultiline:function(a){this.m_multiline=a},setMaxWidth:function(a){this.m_maxWidth=a},setShadowColor:function(a){this.m_shadowColor=a},getTruncatedText:function(a){if(void 0==a)return this.m_text;var b=this.getMaxPossibleWidth(this.m_text);if(b<=a)return this.m_text;for(var c=this.m_text,d=c+"...",b=
this.getMaxPossibleWidth(d);0<d.length&&b>a;)c=c.substring(0,c.length-1),d=c+"...",b=this.getMaxPossibleWidth(d);return d},getMaxPossibleWidth:function(a){var b=document.createElement("div");b.style.color=this.m_fontColor;b.style.fontFamily=this.m_fontName;b.style.fontSize=this.m_fontSize+"px";b.style.width="auto";b.style.height="auto";b.style.position="absolute";b.style.visibilty="hidden";b.innerHTML=a;document.body.appendChild(b);a=b.clientWidth+4;document.body.removeChild(b);return a},getComponentDiv:function(){var a=
document.createElement("div");a.style.color=this.m_fontColor;a.style.fontFamily=this.m_fontName;a.style.fontSize=this.m_fontSize+"px";a.style.textAlign="left";a.style.left=this.m_XPos;a.style.top=this.m_YPos;a.style.position="relative";a.style.opacity=1;var b=cp.HexToRGBA(this.m_shadowColor,this.m_shadowAlpha);a.style.textShadow=this.m_shadowDistance+"px "+this.m_shadowDistance+"px "+this.m_shadowBlur+"px "+b;a.innerHTML=this.m_text;return a}};
cp.RuntimeDialogTextInput=function(a,b,c){this.m_parent=a;this.m_fontName="Myriad Pro";this.m_XPos=b;this.m_YPos=c;this.m_fontSize=14;this.m_fontColor="#ff0000";this.m_maxWidth=400;this.m_maxHeight=80;this.m_label="Text Input :";this.m_textInput=void 0};
cp.RuntimeDialogTextInput.prototype={setFontName:function(a){this.m_fontName=a},setFontSize:function(a){this.m_fontSize=a},setFontColor:function(a){this.m_fontColor=a},setText:function(a){this.m_text=a},setLabel:function(a){this.m_label=a},setMaxWidth:function(a){this.m_maxWidth=a},getValue:function(){return this.m_textInput.value},getComponentDiv:function(){var a=document.createElement("div");a.style.left=this.m_XPos+"px";a.style.top=this.m_YPos+"px";a.style.width=this.m_maxWidth+"px";var b=document.createElement("table");
b.style.width="100%";b.style.height="100%";a.appendChild(b);var c=document.createElement("tr");c.style.width="100%";c.style.height="50%";b.appendChild(c);var d=document.createElement("td");d.style.width="100%";d.style.height="100%";d.style.paddingBottom="0em";c.appendChild(d);c=new cp.RuntimeDialogText(d,this.MESSAGE_DEFAULT_LEFT_OFFSET+"px","0px");c.setText(this.m_label);c.setFontColor(this.m_fontColor);c.setFontName(this.m_fontName);c.setFontSize(14);c.setMultiline(!0);c=c.getComponentDiv();c.style.width=
"100%";d.appendChild(c);d=document.createElement("tr");d.style.width="100%";d.style.height="50%";b.appendChild(d);b=document.createElement("td");b.style.width="100%";b.style.height="100%";d.appendChild(b);d=document.createElement("input");d.type="text";d.value=this.m_text;d.style.color="#000000";d.style.fontFamily=this.m_fontName;d.style.fontSize=this.m_fontSize+"px";d.style.width="100%";d.style.opacity=1;this.m_textInput=d;b.appendChild(d);a.style.position="relative";return a}};
cp.RuntimeDialogPanel=function(a,b,c,d,e){this.m_parent=a;this.m_fillColor="#CCCCCC";this.m_alpha=0.5;this.m_strokeColor="#666666";this.m_XPos=b;this.m_YPos=c;this.m_strokeWidth=1;this.m_width=d;this.m_height=e;this.m_roundness=20;this.m_minHeight=this.m_minWidth=100;this.m_maxWidth=493;this.m_maxHeight=219;this.m_showShadow=!1;this.m_shadowColor="#000000";this.m_shadowAlpha=0.65;this.m_shadowAngle=270;this.m_shadowDistance=this.m_shadowBlur=2};
cp.RuntimeDialogPanel.prototype={setFillColor:function(a){this.m_fillColor=a},setAlpha:function(a){this.m_alpha=a},setStrokeColor:function(a){this.m_strokeColor=a},setStrokeWidth:function(a){this.m_strokeWidth=a},setWidth:function(a){this.m_width=a},getWidth:function(){var a=this.m_width;a<this.m_minWidth&&(a=this.m_minWidth);a>this.m_maxWidth&&(a=this.m_maxWidth);return a},setHeight:function(a){this.m_height=a},setMinWidth:function(a){a<this.m_maxWidth&&(this.m_minWidth=a)},setMinHeight:function(a){a<
this.m_maxHeight&&(this.m_minHeight=a)},setMaxWidth:function(a){a>this.m_minWidth&&(this.m_maxWidth=a)},setMaxHeight:function(a){a>this.m_minHeight&&(this.m_maxHeight=a)},setRoundness:function(a){this.m_roundness=a},showShadow:function(a){this.m_showShadow=a},setShadowColor:function(a){this.m_shadowColor=a},getComponentDiv:function(){var a=this.m_width,b=this.m_height,c=document.createElement("div");c.style.width=a;c.style.height=b;c.style.background=cp.HexToRGBA(this.m_fillColor,this.m_alpha);c.style.border=
this.m_strokeWidth+"px solid "+this.m_strokeColor;c.style.borderRadius=this.m_roundness+"px";c.style.left=this.m_XPos+"px";c.style.top=this.m_YPos+"px";this.m_showShadow&&("webkitBoxShadow"in c.style?c.style.webkitBoxShadow=this.m_shadowDistance+"px "+this.m_shadowDistance+"px "+this.m_shadowBlur+"px "+this.m_shadowColor:"MozBoxShadow"in c.style?c.style.MozBoxShadow=this.m_shadowDistance+"px "+this.m_shadowDistance+"px "+this.m_shadowBlur+"px "+this.m_shadowColor:c.style.boxShadow=this.m_shadowDistance+
"px "+this.m_shadowDistance+"px "+this.m_shadowBlur+"px "+this.m_shadowColor);return c}};
cp.RuntimeDialogButton=function(a,b,c,d,e){cp.RuntimeDialogButton.baseConstructor.call(this,a,b,c,d,e);this.m_label=void 0;this.m_labelText="OK";this.m_labelFontName="Myriad Pro";this.m_labelFontSize=16;this.m_labelFontColor="#000000";this.m_labelShadowColor="#FFFFFF";this.BUTTON_LABEL_TOP_PADDING=this.BUTTON_LABEL_LEFT_PADDING=5;this.m_fillColor="#CDCDCD";this.m_alpha=0.3;this.m_strokeColor="#000000";this.m_strokeWidth=1;this.m_maxWidth=230;this.m_minWidth=40;this.m_minHeight=m_maxHeight=25;this.m_roundness=
10};cp.rtInherits(cp.RuntimeDialogButton,cp.RuntimeDialogPanel);cp.RuntimeDialogButton.prototype.setButtonLabel=function(a){this.m_labelText=a};cp.RuntimeDialogButton.prototype.setButtonLabelFontName=function(a){this.m_labelFontName=a};cp.RuntimeDialogButton.prototype.setButtonLabelFontSize=function(a){this.m_labelFontSize=a};cp.RuntimeDialogButton.prototype.setButtonLabelFontColor=function(a){this.m_labelFontColor=a};
cp.RuntimeDialogButton.prototype.setButtonLabelShadowColor=function(a){this.m_labelShadowColor=a};cp.RuntimeDialogButton.prototype.setHandler=function(a){this.m_handler=a};
cp.RuntimeDialogButton.prototype.getComponentDiv=function(a){var b=cp.RuntimeDialogButton.superClass.getComponentDiv.call(this);b.id=a;b.style.position="absolute";b.style.cursor="pointer";var c=this.m_fillColor,d=this.m_alpha;b.onmouseover=function(){b.style.background=cp.HexToRGBA(c,0.1)};b.onmouseout=function(){b.style.background=cp.HexToRGBA(c,d)};cp.registerGestureEvent(b,cp.GESTURE_EVENT_TYPES.TAP,this.m_handler);b.onkeypress=this.m_handler;a=new cp.RuntimeDialogText(b,"0px","5px");a.setText(this.m_labelText);
a.setFontName(this.m_labelFontName);a.setFontColor(this.m_labelFontColor);a.setFontSize(this.m_labelFontSize);a.setShadowColor(this.m_labelShadowColor);a.setMaxWidth(this.m_maxWidth-2*this.BUTTON_LABEL_LEFT_PADDING);var e=a.getComponentDiv();e.style.textAlign="center";e.style.top="0px";var f=a.getMaxPossibleWidth(this.m_labelText);f>this.m_width&&(f>this.m_maxWidth&&(f=this.m_maxWidth,e.innerHTML=a.getTruncatedText(this.m_maxWidth)),b.style.width=f+"px");b.appendChild(e);b.style.display="flex";b.style.alignItems=
"center";b.style.justifyContent="center";return b};
cp.RuntimeMessageBox=function(a,b,c,d,e,f,g,h,i,j){this.m_parent=a;this.m_MessageBoxElement=void 0;this.m_id="CPRuntimeMsgBox_ID";this.m_titleText="Adobe Captivate";this.m_messageText="This is Adobe Captivate Run Time Message Dialog";this.m_firstButtonText="OK";this.m_secondButtonText="CANCEL";this.m_ChkBoxText="Don't ask me again";this.m_numberOfButtons=b;this.m_secondButtonHandler=this.m_firstButtonHandler=void 0;this.m_DontAskMe=!1;this.m_foregroundFillColor=c;this.m_foregroundStrokeColor=d;this.m_buttonFillColor=
e;this.m_buttonStrokeColor=f;this.m_separatorColor=g;this.m_textColor=h;this.m_textShadowColor=i;this.m_textFontName=j;this.TITLE_DEFAULT_TOP_OFFSET=this.MESSAGE_DEFAULT_LEFT_OFFSET=this.SEPARATOR_DEFAULT_LEFT_OFFSET=this.TITLE_DEFAULT_LEFT_OFFSET=10;this.SEPARATOR_DEFAULT_TOP_OFFSET=20;this.MESSAGE_DEFAULT_TOP_OFFSET=30;this.BUTTON_BOTTOM_OFFSET=10;this.BG_DEFAULT_WIDTH=493;this.BG_DEFAULT_HEIGHT=219;this.FG_DEFAULT_WIDTH=478;this.FG_DEFAULT_HEIGHT=198;this.BUTTON_DEFAULT_WIDTH=100;this.BUTTON_DEFAULT_HEIGHT=
33;this.INTER_BUTTON_OFFSET=15};
cp.RuntimeMessageBox.prototype={getDontAskMeInput:function(){if(this.m_DontAskMe){var a=document.getElementById("dont_ask_me_chk");if(a)return a.checked}return!1},setDontAskMe:function(a){this.m_DontAskMe=a},setDontAskMeText:function(a){this.m_ChkBoxText=a},setTitleText:function(a){this.m_titleText=a},setCheckBoxText:function(a){this.m_ChkBoxText=a},setMessageText:function(a){this.m_messageText=a},setFirstButtonText:function(a){this.m_firstButtonText=a},setSecondButtonText:function(a){this.m_secondButtonText=a},
registerFirstButtonHandler:function(a){void 0!=a&&(this.m_firstButtonHandler=a)},registerSecondButtonHandler:function(a){void 0!=a&&(this.m_secondButtonHandler=a)},isVisible:function(){var a=!1;void 0!=this.m_MessageBoxElement&&"visible"==this.m_MessageBoxElement.style.visibility&&(a=!0);return a},hide:function(a){if(cp.IDEVICE==cp.device||cp.device==cp.ANDROID){var b=document.getElementById("cpRTMBFirstBtn");b&&cp.clearGestureCache(b);(b=document.getElementById("cpRTMBSecondBtn"))&&cp.clearGestureCache(b)}var b=
this.m_parent?this.m_parent:document.getElementById("cpDocument"),c=document.getElementById("CPRuntimeMsgBox_ID");void 0!=c&&b.removeChild(c);void 0!=a&&void 0!=a.currentTarget&&(cp.IDEVICE==cp.device||cp.device==cp.ANDROID)&&cp.clearGestureCache(a.currentTarget);cp.isRTDialogShown=!1},show:function(){this.hide();this.m_MessageBoxElement=document.createElement("div");this.m_MessageBoxElement.id=this.m_id;var a=new cp.RuntimeDialogPanel(this.m_parent,0,0,"50%","35%");a.showShadow(!0);var b=a.getComponentDiv();
b.id="bgPanelDiv";b.style.margin="5% auto";b.style.display="flex";b.style.alignItems="center";this.m_MessageBoxElement.appendChild(b);a=new cp.RuntimeDialogPanel(b,(this.BG_DEFAULT_WIDTH-this.FG_DEFAULT_WIDTH)/2,(this.BG_DEFAULT_HEIGHT-this.FG_DEFAULT_HEIGHT)/2,"97%","90%");a.setFillColor(this.m_foregroundFillColor);a.setAlpha(1);a.setStrokeColor(this.m_foregroundStrokeColor);a=a.getComponentDiv();b.id="fgPanelDiv";b.className="RuntimeDialogfgPanelDiv";a.style.position="relative";a.style.left="0px";
a.style.top="0px";a.style.margin="2%";a.style.width="100%";b.appendChild(a);b=new cp.RuntimeDialogText(a,this.TITLE_DEFAULT_LEFT_OFFSET+"px",this.TITLE_DEFAULT_TOP_OFFSET+"px");b.setText(this.m_titleText);b.setFontSize(18);b.setFontColor(this.m_textColor);b.setFontName(this.m_textFontName);b.setShadowColor(this.m_textShadowColor);b=b.getComponentDiv();a.appendChild(b);b=new cp.RuntimeDialogSeparator(a,this.SEPARATOR_DEFAULT_LEFT_OFFSET,this.SEPARATOR_DEFAULT_TOP_OFFSET);b.setColor(this.m_separatorColor);
b=b.getComponentDiv();a.appendChild(b);b=new cp.RuntimeDialogText(a,this.MESSAGE_DEFAULT_LEFT_OFFSET+"px",this.MESSAGE_DEFAULT_TOP_OFFSET+"px");b.setText(this.m_messageText);b.setFontColor(this.m_textColor);b.setFontName(this.m_textFontName);b.setShadowColor(this.m_textShadowColor);b.setFontSize(14);b.setMultiline(!0);b=b.getComponentDiv();a.appendChild(b);if(this.m_DontAskMe){b=document.createElement("div");b.className="RuntimeDialogCheckBoxAndTextHolder";a.appendChild(b);var c=new cp.RuntimeDialogText(a,
this.MESSAGE_DEFAULT_LEFT_OFFSET+"px",this.MESSAGE_DEFAULT_TOP_OFFSET+"px");c.setText(this.m_ChkBoxText);c.setFontColor(this.m_textColor);c.setFontName(this.m_textFontName);c.setShadowColor(this.m_textShadowColor);c.setFontSize(14);c.setMultiline(!1);var c=c.getComponentDiv(),d=document.createElement("input");d.id="dont_ask_me_chk";d.type="checkbox";d.style.cssText="-webkit-appearance: checkbox;left:10px; bottom: 70px;width:20px; height:20px;";b.appendChild(d);b.appendChild(c);c.style.position="unset";
c.style.top="";c.style.bottom="75px";c.style.left="40px";if(cp.IDEVICE==cp.device||cp.device==cp.ANDROID)b=function(a){a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();d.checked=!d.checked},cp.registerGestureEvent(d,cp.GESTURE_EVENT_TYPES.TAP,b),cp.registerGestureEvent(c,cp.GESTURE_EVENT_TYPES.TAP,b)}b=document.createElement("div");b.className="RuntimeDialogButtonsHolder";a.appendChild(b);c=new cp.RuntimeDialogButton(a,0,0,"20%",this.BUTTON_DEFAULT_HEIGHT+"px");c.setFillColor(this.m_buttonFillColor);
c.setStrokeColor(this.m_buttonStrokeColor);c.setButtonLabel(this.m_firstButtonText);c.setButtonLabelFontSize(16);c.setButtonLabelFontColor(this.m_textColor);c.setButtonLabelFontName(this.m_textFontName);c.setButtonLabelShadowColor(this.m_textShadowColor);c.setHandler(this.m_firstButtonHandler);c=c.getComponentDiv("cpRTMBFirstBtn");c.className="cpRTMBFirstBtn";c.style.top="auto";c.tabIndex=0;c.style.left="40%";c.style.bottom=this.BUTTON_BOTTOM_OFFSET+"px";b.appendChild(c);c=void 0;2==this.m_numberOfButtons&&
(lSecondButton=new cp.RuntimeDialogButton(a,0,0,"20%",this.BUTTON_DEFAULT_HEIGHT+"px"),lSecondButton.setFillColor(this.m_buttonFillColor),lSecondButton.setStrokeColor(this.m_buttonStrokeColor),lSecondButton.setButtonLabel(this.m_secondButtonText),lSecondButton.setButtonLabelFontSize(16),lSecondButton.setButtonLabelFontColor(this.m_textColor),lSecondButton.setButtonLabelFontName(this.m_textFontName),lSecondButton.setButtonLabelShadowColor(this.m_textShadowColor),lSecondButton.setHandler(this.m_secondButtonHandler),
c=lSecondButton.getComponentDiv("cpRTMBSecondBtn"),c.className="cpRTMBSecondBtn",c.tabIndex=0,c.style.top="auto",c.style.bottom=this.BUTTON_BOTTOM_OFFSET+"px",c.style.left="70%",b.appendChild(c));this.m_parent.appendChild(this.m_MessageBoxElement);this.m_MessageBoxElement.style.visibility="visible";this.m_MessageBoxElement.style.position="absolute";this.m_MessageBoxElement.style.left="0px";this.m_MessageBoxElement.style.top="0px";this.m_MessageBoxElement.style.width="100%";this.m_MessageBoxElement.style.height=
"100%";this.m_MessageBoxElement.style.textAlign="center";this.m_MessageBoxElement.style.zIndex="1000";this.m_MessageBoxElement.style.background="rgba(240,240,240,0.2)";this.m_MessageBoxElement.style.zIndex=10020;cp.isRTDialogShown=!0;setTimeout(function(){var a=document.getElementById("dont_ask_me_chk");a&&a.focus()},500)},close:function(){var a=document.getElementById("cpDocument"),b=document.getElementById("CPRuntimeMsgBox_ID");a.removeChild(b)}};
cp.RuntimeMessageBoxDefault=function(a,b){var c=cp.D.rtDialog;cp.RuntimeMessageBoxDefault.baseConstructor.call(this,a,b,c.rtbgfc,c.rtbgsc,c.rtbtnfc,c.rtbtnsc,c.rtsc,c.rttc,c.rttsc,c.rtfn)};cp.rtInherits(cp.RuntimeMessageBoxDefault,cp.RuntimeMessageBox);cp.PostResultsMessageBox=function(a){this.m_StudentNameTextInputLabel="";this.m_StringsMap=a;a=document.getElementById("div_Slide");cp.PostResultsMessageBox.baseConstructor.call(this,a,2)};cp.rtInherits(cp.PostResultsMessageBox,cp.RuntimeMessageBoxDefault);
cp.PostResultsMessageBox.prototype.getLearnerName=function(){return this.m_studentNameTextInput.getValue()};cp.PostResultsMessageBox.prototype.getLearnerID=function(){return this.m_studentIDTextInput.getValue()};cp.PostResultsMessageBox.prototype.hide=function(){var a=document.getElementById("CPRuntimeMsgBox_ID");void 0!=a&&this.m_parent.removeChild(a)};
cp.PostResultsMessageBox.prototype.show=function(){this.setTitleText(this.m_StringsMap.ISRPostResultStr);this.setMessageText(this.m_StringsMap.ISRResultCalculatedStr);this.m_numberOfButtons=2;this.setFirstButtonText("Cancel");this.setSecondButtonText(this.m_StringsMap.ISRSendStr);this.hide();this.m_MessageBoxElement=document.createElement("div");this.m_MessageBoxElement.id=this.m_id;var a=new cp.RuntimeDialogPanel(this.m_parent,0,0,"80%","60%");a.showShadow(!0);var b=a.getComponentDiv();b.id="bgPanelDiv";
b.className="PostMessageDialogBgPanel";b.style.margin="5% auto";this.m_MessageBoxElement.appendChild(b);a=new cp.RuntimeDialogPanel(b,0,0,"100%","100%");a.setFillColor(this.m_foregroundFillColor);a.setAlpha(1);a.setStrokeColor(this.m_foregroundStrokeColor);a=a.getComponentDiv();a.id="fgPanelDiv";a.style.position="relative";b.appendChild(a);b=new cp.RuntimeDialogText(a,"0px","0px");b.setText(this.m_titleText);b.setFontSize(18);b.setFontColor("#ffffff");b.setFontName(this.m_textFontName);b.setShadowColor(this.m_textShadowColor);
b=b.getComponentDiv();b.style.backgroundColor="#000000";b.style.borderTopLeftRadius="20px";b.style.borderTopRightRadius="20px";b.style.textAlign="center";a.appendChild(b);b=new cp.RuntimeDialogText(a,this.MESSAGE_DEFAULT_LEFT_OFFSET+"px","10px");b.setText(this.m_messageText);b.setFontColor(this.m_textColor);b.setFontName(this.m_textFontName);b.setShadowColor(this.m_textShadowColor);b.setFontSize(14);b.setMultiline(!0);b=b.getComponentDiv();b.style.left="20px";b.style.width="90%";b.style.wordWrap=
"break-word";a.appendChild(b);b=document.createElement("div");b.className="PostResultDialogNameIdHolder";a.appendChild(b);var c=new cp.RuntimeDialogTextInput(a,"10px","10px");c.setLabel(this.m_StringsMap.ISREnterNameStr);c.setText("");c.setFontColor(this.m_textColor);c.setFontName(this.m_textFontName);c.setFontSize(14);this.m_studentNameTextInput=c;c=c.getComponentDiv();c.id="studentNameTextInput";c.className="PostResulDialogStudentNameIdInput";c.style.left="4%";c.style.top="10%";b.appendChild(c);
c=new cp.RuntimeDialogTextInput(a,"10px","0px");c.setLabel(this.m_StringsMap.ISREmailIDStr);c.setText("");c.setFontColor(this.m_textColor);c.setFontName(this.m_textFontName);c.setFontSize(14);this.m_studentIDTextInput=c;c=c.getComponentDiv();c.id="studentNameTextInput";c.className="PostResulDialogStudentNameIdInput";c.style.left="4%";c.style.top="10%";b.appendChild(c);b=document.createElement("div");b.className="PostResultDialogButtonsHolder";a.appendChild(b);c=new cp.RuntimeDialogButton(a,0,0,"20%",
this.BUTTON_DEFAULT_HEIGHT+"px");c.setFillColor(this.m_buttonFillColor);c.setStrokeColor(this.m_buttonStrokeColor);c.setButtonLabel(this.m_firstButtonText);c.setButtonLabelFontSize(16);c.setButtonLabelFontColor(this.m_textColor);c.setButtonLabelFontName(this.m_textFontName);c.setButtonLabelShadowColor(this.m_textShadowColor);c.setHandler(this.m_firstButtonHandler);c=c.getComponentDiv("cpPRMBFirstBtn");c.style.top="auto";c.style.bottom=this.BUTTON_BOTTOM_OFFSET+"px";c.style.left="40%";b.appendChild(c);
c=void 0;2==this.m_numberOfButtons&&(lSecondButton=new cp.RuntimeDialogButton(a,0,0,"20%",this.BUTTON_DEFAULT_HEIGHT+"px"),lSecondButton.setFillColor(this.m_buttonFillColor),lSecondButton.setStrokeColor(this.m_buttonStrokeColor),lSecondButton.setButtonLabel(this.m_secondButtonText),lSecondButton.setButtonLabelFontSize(16),lSecondButton.setButtonLabelFontColor(this.m_textColor),lSecondButton.setButtonLabelFontName(this.m_textFontName),lSecondButton.setButtonLabelShadowColor(this.m_textShadowColor),
lSecondButton.setHandler(this.m_secondButtonHandler),c=lSecondButton.getComponentDiv("cpPRMBSecondBtn"),c.style.top="auto",c.style.bottom=this.BUTTON_BOTTOM_OFFSET+"px",c.style.left="70%",b.appendChild(c));this.m_parent.appendChild(this.m_MessageBoxElement);this.m_MessageBoxElement.style.visibility="visible";this.m_MessageBoxElement.style.position="absolute";this.m_MessageBoxElement.style.left="0px";this.m_MessageBoxElement.style.top="0px";this.m_MessageBoxElement.style.width="100%";this.m_MessageBoxElement.style.height=
"100%";this.m_MessageBoxElement.style.textAlign="center";this.m_MessageBoxElement.style.zIndex="1000";this.m_MessageBoxElement.style.background="rgba(240,240,240,0.5)"};
(function(a){function ja(c){var b=c;(c=a.D[c])&&c.sicbs&&void 0!==c.bstiid&&-1!==c.bstiid&&(b=a.getDisplayObjNameByCP_UID(c.bstiid));return b}function X(a){a.stopPropagation();a.preventDefault()}function ka(a,b){for(var d=a.firstChild;d;d=d.nextSibling)"SPAN"==d.tagName&&("cp-actualText"==d.className||"cp-numbering"==d.className)?b(d):ka(d,b)}a.ropMap={};var D={};a.cpIDMap={};var ha=!1,Y={},ba=!1,qa=null,Z,A={},ca=!1,F=10,S=!1,M=1;a.fontMap=[];a.stateStack=[];"function"!=typeof Object.assign&&Object.defineProperty(Object,
"assign",{value:function(a,b){if(null==a)throw new TypeError("Cannot convert undefined or null to object");for(var d=Object(a),e=1;e<arguments.length;e++){var f=arguments[e];if(null!=f)for(var g in f)Object.prototype.hasOwnProperty.call(f,g)&&(d[g]=f[g])}return d},writable:!0,configurable:!0});a.inherits=function(a,b){function d(){}d.prototype=b.prototype;a.prototype=new d;a.prototype.constructor=a;a.baseConstructor=b;a.superClass=b.prototype};a.getParameterByName=function(a){a=a.replace(/[\[]/,"\\[").replace(/[\]]/,
"\\]");a=RegExp("[\\?&]"+a+"=([^&#]*)").exec(window.location.search);return null==a?"":decodeURIComponent(a[1].replace(/\+/g," "))};a.getObjectType=function(a){return a.target.getAttribute("cpid")};a.getObjName=function(c,b){c=parseInt(c,10);switch(c){case a.kCPOTTextEntryBoxItem:return b.target.id.replace("_inputField","")}};a.restoreROPDivStyle=function(c){var b=c.substring(0,c.length-1),d,b=document.getElementById(b);if(d=document.getElementById("re-"+c))d.style.display=a.ropItemsState[c].rewrapItemStyle.display,
d.style.zIndex=a.ropItemsState[c].rewrapItemStyle.zIndex,d.style.opacity=a.ropItemsState[c].rewrapItemStyle.opacity,d.style.left=a.ropItemsState[c].rewrapItemStyle.left,d.style.top=a.ropItemsState[c].rewrapItemStyle.top,d.style.width=a.ropItemsState[c].rewrapItemStyle.width,d.style.height=a.ropItemsState[c].rewrapItemStyle.height;b&&(b.style.display=a.ropItemsState[c].itemStyle.display,b.style.zIndex=a.ropItemsState[c].itemStyle.zIndex,b.style.opacity=a.ropItemsState[c].itemStyle.opacity,b.style.left=
a.ropItemsState[c].itemStyle.left,b.style.top=a.ropItemsState[c].itemStyle.top,b.style.width=a.ropItemsState[c].itemStyle.width,b.style.height=a.ropItemsState[c].itemStyle.height)};a.saveROPDivStyles=function(c){a.ropItemsState={};for(c in a.ropMap){var b=c.substring(0,c.length-1),d=document.getElementById("re-"+c),b=document.getElementById(b);a.ropItemsState[c]={};a.ropItemsState[c].rewrapItemStyle={};a.ropItemsState[c].itemStyle={};d&&(a.ropItemsState[c].rewrapItemStyle.display=d.style.display,
a.ropItemsState[c].rewrapItemStyle.zIndex=d.style.zIndex,a.ropItemsState[c].rewrapItemStyle.left=d.style.left,a.ropItemsState[c].rewrapItemStyle.top=d.style.top,a.ropItemsState[c].rewrapItemStyle.width=d.style.width,a.ropItemsState[c].rewrapItemStyle.height=d.style.height,a.ropItemsState[c].rewrapItemStyle.opacity=d.style.opacity);b&&(a.ropItemsState[c].itemStyle.display=b.style.display,a.ropItemsState[c].itemStyle.zIndex=b.style.zIndex,a.ropItemsState[c].itemStyle.left=b.style.left,a.ropItemsState[c].itemStyle.top=
b.style.top,a.ropItemsState[c].itemStyle.width=b.style.width,a.ropItemsState[c].itemStyle.height=b.style.height,a.ropItemsState[c].itemStyle.opacity=b.style.opacity)}};a.saveMainMasterSlideItems=function(){if(a.mmsItems){a.savedMMSItems={};for(var c in a.mmsItems){var b=c,b=[b,b+"c","re-"+b+"c",b+"c-vtext",b+"c-vtext_Handler",b+"_vTxtHandlerHolder",b+"_vTxtHolder"],d;for(d in b){var e=b[d];if(existingElem=document.getElementById(e))existingElem.id+="_layer0",a.savedMMSItems[e]={display:existingElem.style.display},
existingElem.display="none"}}}};a.getCustomSlideItemList=function(){for(var c=a.D.project_main.slides.split(","),b=[],d=0,e=0;e<c.length;e++){var f=c[e];b[d++]=f;if(f=a.D[f].si)for(var g=0;g<f.length;g++)b[d++]=f[g].n}return b};a.restoreMainMasterSlideItems=function(){if(a.savedMMSItems){for(var c in a.savedMMSItems){var b=document.getElementById(c);b&&(b.id+="_to_be_deleted");if(b=document.getElementById(c+"_layer0"))b.id=c,b.style.display=a.savedMMSItems[c].display}a.savedMMSItems=void 0}};a.pushState=
function(){a.saveROPDivStyles();a.saveMainMasterSlideItems();a.stateStack.push({ropMap:Object.assign({},a.ropMap),ropItemsState:a.ropItemsState,displayObjectMap:D,cpIDMap:a.cpIDMap,oldWindowDim:Y,flexRoot:ba,computedNode:qa,flexEngineRelayouter:Z,flexPositionMap:A,isTextCaptionShown:ca,SHOULD_PROP_SCALE:S,maxFontShrink:M,fontMap:a.fontMap,gestureHandler:a.m_gestureHandler,hammerStaticCache:window.hammerStaticCache,hammerVolatileCache:window.hammerVolatileCache});window.hammerStaticCache={};window.hammerVolatileCache=
{}};a.popState=function(){var c=a.stateStack.pop();c&&(a.restoreMainMasterSlideItems(),a.ropMap=c.ropMap,a.ropItemsState=c.ropItemsState,D=c.displayObjectMap,a.cpIDMap=c.cpIDMap,Y=c.oldWindowDim,ba=c.flexRoot,qa=c.computedNode,Z=c.flexEngineRelayouter,A=c.flexPositionMap,ca=c.isTextCaptionShown,S=c.SHOULD_PROP_SCALE,M=c.maxFontShrink,a.fontMap=c.fontMap,a.m_gestureHandler=c.gestureHandler,window.hammerVolatileCache=c.hammerVolatileCache,window.hammerStaticCache=c.hammerStaticCache)};a.getCorrectMediaPath=
function(c,b){var d=c;a.pg&&window.device&&"Android"===window.device.platform?d=a.Phonegap.getResourcePath(c):void 0!=b&&a.IsRunningInACAP&&"undefined"!=typeof a.ACAPVideoStreamingURLMap&&void 0!=a.ACAPVideoStreamingURLMap[b]&&""!=a.ACAPVideoStreamingURLMap[b]&&(d=a.ACAPVideoStreamingURLMap[b]);return d};a.log=function(c){a.customConsole?a.customConsole.value+=c:a.consolidateLogs&&a.logArray?a.logArray.push(c):console.log(c)};a.logObject=function(c,b){b||(b="");var d="object "+b+" : {",e;for(e in c)d+=
e+":"+c[e]+"; ";a.log(d+"}")};a.IsValidObj=function(a){return void 0!=a&&null!=a};a.getCurrentBrowserVersion=function(c,b){var d=c.indexOf(b);return-1==d?a.UNKNOWN:parseFloat(c.substring(d+b.length+1))};a.showColoredNonModalWarning=function(c){var b=a.newElem("div");b.style.position="fixed";b.style.right="10px";b.style.bottom="10px";b.style.backgroundColor="#7f7f7f";b.style.border="10px solid #FF0000";b.style.padding="10px";b.style.fontSize="22px";b.style.zIndex="10000";b.innerHTML=c;a.parentWindow.document.body.appendChild(b);
setTimeout(function(){a.parentWindow.document.body.removeChild(b)},1E3)};a.getRoundedValue=function(a,b){void 0==b&&(b=2);var d=Math.pow(10,b);return a=Math.round(a*d)/d};a.resetDisplayAndIdMap=function(){D={};a.cpIDMap={}};a.getDisplayObjByCP_UID=function(c){return D[a.cpIDMap[c]]};a.getDisplayObjFor3DSlideByCP_UID=function(a){return D["3DSlide"+a]};a.getDisplayObjByKeyOnAllLayers=function(c){var b=D[c];b||a.stateStack&&0<a.stateStack.length&&(b=a.stateStack[0].displayObjectMap[c]);return b};a.getDisplayObjByKey=
function(a){return D[a]};a.getDisplayObjNameByCP_UID=function(c){var c=a.cpIDMap[c],b="";c&&(b=a.D[c].dn);return b};a.getParentStateObjectForItem=function(c){var b=void 0,d=c.baseStateItemID;if(d&&-1!=d&&(d=a.getDisplayObjByCP_UID(d)))if(d=d.states)for(var e=0;e<d.length;++e){var f=d[e];if(f)for(var g=f.stsi,h=0;h<g.length;++h)if(g[h]==c.getAttribute("uid")){b=f;break}}return b};a.getCurrentStateObjectForItem=function(a){var b=void 0;if(a){var d=a.states,a=a.currentState;0<=a&&a<d.length&&(b=d[a])}return b};
a.hasStateOfType=function(a,b){var d=!1;if(a){var e=a.states;if(e)for(var f=0;f<e.length;++f){var g=e[f];if(g&&g.stt==b){d=!0;break}}}return d};a.getStateName=function(a,b){var d="";if(a){var e=a.states;e&&0<=b&&b<e.length&&(e=e[b])&&(d=e.stn)}return d};a.getBaseStateItem=function(c){var b=c;c&&-1!==c.baseStateItemID&&(c=a.getDisplayObjByCP_UID(c.baseStateItemID))&&(b=c);return b};a.getStateType=function(c,b){var d=a.kSTTNone;if(c){var e=c.states;e&&0<=b&&b<e.length&&(e=e[b])&&(d=e.stt)}return d};
a.canStateBeRetained_Type=function(c){return c==a.kSTTRollOver||c==a.kSTTDown||c==a.kSTTDragStart||c==a.kSTTDragOver||c==a.kSTTDropReject||c==a.kSTTDropAccept||c==a.kSTTDropCorrect||c==a.kSTTDropIncorrect?!1:!0};a.canStateBeRetained_Name=function(a){return"RollOver"==a||"Down"==a||"DragStart"==a||"DragOver"==a||"DropReject"==a||"DropAccept"==a||"DropCorrect"==a||"DropIncorrect"==a?!1:!0};a.isVisible=function(c){var b=!1;if(c){var b=c.visible,d=-1!==c.baseStateItemID,e=c.states&&0<c.states.length;
if(d||e){var f=c.getAttribute("uid"),g=a.getBaseStateItem(c);if(g){var b=g.getAttribute("effectiveVi"),e=!1,h=g.states,g=g.currentState;h&&0<=g&&g<h.length&&(e=-1!=h[g].stsi.indexOf(f));if(!d){var k,d=!0;c.actualParent&&(k=c.actualParent.id);var j;if(c=a.D[k])j=c.type,(c=c.stc)&&(0<=g&&g<c.length&&""===c[g])&&(d=!1);d&&a.isValidItemForStateOptimization({n:k,t:j})&&(e=!0)}b=b&&e}}}return b};a.isBaseItemInState=function(a){var b=!1;a&&(-1==a.baseStateItemID?b=!0:a.cloneOfBaseStateItem&&(b=!0));return b};
a.getInfoForStateChange=function(c,b,d){var e={bFound:!1,stateIndex:-1,showItemList:[],hideItemList:[]},c=a.D[c];if(!c)return e;void 0===d&&(d=!1);if(c=a.getDisplayObjByKey(c.mdi)){for(var c=c.states,f=[],g=[],h=0;h<c.length;h++){var k=c[h];if(k.stn==b)e.stateIndex=h,f=f.concat(k.stsi),e.bFound=!0;else if(d)for(var j=0;j<k.stsi.length;j++)g.push({uid:k.stsi[j],sti:h});else g=g.concat(k.stsi)}e.showItemList=f;e.hideItemList=g}return e};a.CanPauseAudioDuringHide=function(c){var b=!0;if(c){var d=!1,
e="",f=a.kSTTNone;if(-1===c.baseStateItemID)d=!0,e="Normal";else if(c.cloneOfBaseStateItem){var d=!0,g=a.getParentStateObjectForItem(c);g&&(e=g.stn,f=g.stt)}if(d&&(c=a.getBaseStateItem(c))){d=a.getCurrentStateObjectForItem(c);if(void 0!==d&&(d.stt===a.kSTTRollOver||d.stt===a.kSTTDown))(d=c.stateAtStartOfMouseEvents)&&e===d&&(b=!1);if(f===a.kSTTDragOver||f===a.kSTTDragStart||f===a.kSTTDropReject)if(f=a.GetCurrentInteractionManager())(f=f.getActiveInteraction())&&(f.m_DsFrameSetDataID===c.parentId&&
f.m_DragSourceCurrentTransientState===e)&&(b=!1)}}return b};a.GetBaseItemsInAllStates=function(c,b){void 0===b&&(b=!0);var d=[];if(c)for(var e=c.states,f=0;f<e.length;f++){var g=e[f];if(g&&(g=g.stsi))for(var h=0;h<g.length;h++){var k=a.getDisplayObjByCP_UID(g[h]);(b||k!=c)&&a.isBaseItemInState(k)&&d.push(k)}}return d};a.dispatchClickEvent=function(c,b,d){if(b&&c)if(a.MSIE!=a.browser&&window.MouseEvent){var e=new MouseEvent("click",{bubbles:!0,cancelable:!0,screenX:b.screenX,screenY:b.screenY,clientX:b.clientX,
clientY:b.clientY,ctrlKey:b.ctrlKey,altKey:b.altKey,shiftKey:b.shiftKey,metaKey:b.metaKey});e.cpCustomData=d;c.dispatchEvent(e)}else document&&document.createEvent?(e=document.createEvent("MouseEvents"),e.initMouseEvent("click",!0,!0,window,0,b.screenX,b.screenY,b.clientX,b.clientY,b.ctrlKey,b.altKey,b.shiftKey,b.metaKey,0,null),c.dispatchEvent(e)):document&&document.createEventObject&&(e=document.createEventObject(window.event),e.button=1,e.cpCustomData=d,e.target=c,c.fireEvent("onclick",e))};a.BringBaseItemToFrontWithinState=
function(c,b){function d(a,c){return a.zIndex>c.zIndex?1:a.zIndex<c.zIndex?-1:0}if(c){var e=[],f=c.states;if(f)for(var g=0;g<f.length;g++){var h=f[g];if(h&&h.stn==b){g=h.stsi;for(f=0;f<g.length;f++){var k=a.getDisplayObjNameByCP_UID(g[f]),h=a.getDisplayObjByCP_UID(g[f]);""===k&&c.actualParent&&(k=c.actualParent.id,h=c);if((k=a.D[k])&&h){var j=a.isBaseItemInState(h);(h=h.actualParent)&&e.push({frameSetDiv:h,zIndex:k.zIndex,isBaseItem:j})}}break}}if(0!=e.length){e.sort(d);f=e[e.length-1].zIndex;h=e[0].zIndex;
k=!1;for(g=0;g<e.length;g++)if((j=e[g])&&j.frameSetDiv)k&&(j.frameSetDiv.style.zIndex=h),j.isBaseItem&&(j.frameSetDiv.style.zIndex=f,k=!0),h=j.zIndex}}};a.ResetItemZIndicesWithinState=function(c,b){if(c){var d=c.states;if(d)for(var e=0;e<d.length;e++){var f=d[e];if(f&&f.stn==b&&(f=f.stsi))for(var g=0;g<f.length;g++){var h=a.getDisplayObjNameByCP_UID(f[g]),k=a.getDisplayObjByCP_UID(f[g]);""===h&&c.actualParent&&(h=c.actualParent.id,k=c);if((h=a.D[h])&&k)if(k=k.actualParent)k.style.zIndex=h.zIndex}}}};
a.scaleItem=function(c,b,d){a.applyTransform(c,"scaleX("+b+") scaleY("+d+")")};a.getCorrectBreakpoint=function(c){if(a.responsiveWidths&&!(0>=a.responsiveWidths.length)){var b=a.responsiveWidths.length;if(c<=a.responsiveWidths[0])return a.responsiveWidths[0];if(c>=a.responsiveWidths[a.responsiveWidths.length-1])return a.responsiveWidths[a.responsiveWidths.length-1];for(var d=0;d<=b-1;++d)if(c<=a.responsiveWidths[d])return a.responsiveWidths[d]}};a.getResponsiveCSS=function(c){if(c&&a.responsiveWidths&&
!(0>=a.responsiveWidths.length)){if(a.ResponsiveProjWidth)return c[a.ResponsiveProjWidth];var b=a.responsiveWidths.length,d=window.innerWidth;if(d<=a.responsiveWidths[0])return c[a.responsiveWidths[0]];if(d>=a.responsiveWidths[a.responsiveWidths.length-1])return c[a.responsiveWidths[a.responsiveWidths.length-1]];for(var e=0;e<=b-1;++e)if(d<=a.responsiveWidths[e])return c[a.responsiveWidths[e]]}};a.getMaxWHBpt=function(c,b){var d=a("cpTempElemForMaxWidth_123456"),e=a("cpTempInnerElemForMaxWidth_123456");
d||(d=a.newElem("div"),d.id="cpTempElemForMaxWidth_123456",d.style.display="block",d.style.zIndex="-1",d.tabIndex=-1,document.body.insertBefore(d,document.body.firstChild));d.style.display="block";d.style.position="absolute";d.style.left="0px";d.style.top="0px";d.style.width=b+"px";d.style.height=a.getCurrentSlideResponsiveHeight(b)+"px";e||(e=a.newElem("cpTempInnerElemForMaxWidth_123456"),e.id="cpTempInnerElemForMaxWidth_123456",d.appendChild(e));a.applyResponsiveStyles(e,c);e={w:e.clientWidth,h:e.clientHeight};
d.style.display="none";return e};a.getAccessibilityString=function(c){if(!c||!c.accstr)return"";var b=c.accstr,d=c.dn;if(void 0==b)return"";c=c.traccstr;"string"!=typeof b&&(b=b[a.ResponsiveProjWidth]);c&&(b+=" "+c);" "==b&&(b=d.substr(0,d.indexOf("_")));return b};a.getAccessibilityLanguage=function(c){if(!c||!c.acclng)return"";c=c.acclng;if(void 0==c)return"";"string"!=typeof c&&(c=c[a.ResponsiveProjWidth]);return c};a.createTempElemAndGetBoundingRect=function(c,b,d,e,f){void 0===e&&(e=!1);void 0===
f&&(f=a.ReasonForDrawing.kRegularDraw);var g=a.newElem("div");b||(b=a("div_Slide"));b.appendChild(g);a.applyResponsiveStyles(g,c,d,e,void 0,f);c=a.GetBoundingClientRectForElem(g,e);b.removeChild(g);return c};a.createTempTextElem=function(c,b,d){if(""==d||void 0==d)d=b.rpvt[a.ResponsiveProjWidth].vt;b=a("cpTempTextElem_123456");b||(b=a.newElem("div"),b.id="cpTempTextElem_123456",b.style.display="block",b.style.position="absolute",b.style.visibility="hidden",b.style.overflow="hidden",b.style.wordWrap=
"break-word",b.style.whiteSpace="pre-wrap",b.style.lineHeight="90%",b.style.left="-1999px",b.tabIndex="-1",document.body.insertBefore(b,document.body.firstChild));b.style.width=c+"px";b.setAttribute("aria-hidden","true");b.innerHTML=d;a.responsiveType==a.kCPPMEAutoResponsive&&b.firstChild&&(b.firstChild.style.position="");b.offsetHeight=b.offsetHeight;return b};a.createTempTextElemAndGetBoundingRect=function(c,b,d,e){c=a.createTempTextElem(c,b,d,e);e=a.GetBoundingClientRectForElem(c,e);b&&b.type===
a.kCPOTFillBlankCaption&&(c.innerHTML="");return e};a.getExpectedWindowWidthToFitText=function(a,b,d){var e=d;-1!=a.h.indexOf("%")||-1!=a.h.indexOf("px")?e=-1!=a.w.indexOf("%")?Math.floor(100*b/parseFloat(a.w)):window.innerWidth:-1!=a.h.indexOf("H%")?(a=a.h.split("H%")[0],e=Math.floor(100*d/parseFloat(a))):-1!=a.h.indexOf("auto")&&(parseFloat(a.apr),e=-1!=a.w.indexOf("H%")?Math.floor(100*d/parseFloat(a.h)):-1!=a.w.indexOf("%")?Math.floor(100*b/parseFloat(a.w)):window.innerWidth);return e};a.getInterpolatedFontSize=
function(a,b,d){return window.innerWidth>a.winW?b:b*d/a.expw};a.applyResponsiveStylesWRTItem=function(c,b,d){if(b)for(var e=a.rCSSProps.length,f=0;f<e;++f){var g=a.rCPProps[f],h=b[g];if(h){"h"==g?-1!=h.indexOf("auto")?(h=b.w,h=-1!=h.indexOf("%")?parseFloat(h)*d.clientWidth/100:parseFloat(h),h=a.getRoundedValue(h/parseFloat(b.apr))+"px"):-1!=h.indexOf("H%")?(h=h.split("H%")[0],h=a.getRoundedValue(h*d.clientWidth/100)+"px"):-1!=h.indexOf("%")&&(h=h.split("%")[0],h=a.getRoundedValue(h*d.clientHeight/
100)+"px"):"w"==g&&(-1!=h.indexOf("auto")?(h=b.h,h=-1!=h.indexOf("%")?parseFloat(h)*d.clientHeight/100:parseFloat(h),h=a.getRoundedValue(h*parseFloat(b.apr))+"px"):-1!=h.indexOf("H%")?(h=h.split("H%")[0],h=a.getRoundedValue(h*d.clientHeight/100)+"px"):-1!=h.indexOf("%")&&(h=h.split("%")[0],h=a.getRoundedValue(h*d.clientWidth/100)+"px"));var k=d.getBoundingClientRect(),j=a.movie.stage.getSlideDiv().getBoundingClientRect();if("auto"!=h){if("t"==g||"b"==g)-1!=h.indexOf("H%")?(h=h.split("H%")[0],h=a.getRoundedValue(h*
d.clientWidth/100)):-1!=h.indexOf("%")?(h=h.split("%")[0],h=a.getRoundedValue(h*d.clientHeight/100)):h=parseFloat(h);if("l"==g||"r"==g)-1!=h.indexOf("H%")?(h=h.split("H%")[0],h=a.getRoundedValue(h*d.clientHeight/100)):-1!=h.indexOf("%")?(h=h.split("%")[0],h=a.getRoundedValue(h*d.clientWidth/100)):h=parseFloat(h);"l"==g&&(h=h+k.left+"px");"r"==g&&(h=h+j.right-k.right+"px");"t"==g&&(h=h+k.top+"px");"b"==g&&(h=h+j.bottom-k.bottom+"px")}b.rpmm&&("width"==a.rCSSProps[f]?(k=b.rpmm.mw,j=b.rpmm.Mw,g=h,-1!=
k.indexOf("%")&&(k=parseFloat(k)*d.clientWidth/100),-1!=j.indexOf("%")&&(j=parseFloat(j)*d.clientWidth/100),-1!=g.indexOf("%")&&(g=parseFloat(g)*d.clientWidth/100),k=parseFloat(k),j=parseFloat(j),g=parseFloat(g),!isNaN(k)&&g<k?h=-1!=h.indexOf("%")?100*k/d.clientWidth+"%":k+"px":!isNaN(j)&&g>j&&(h=-1!=h.indexOf("%")?100*j/d.clientWidth+"%":j+"px")):"height"==a.rCSSProps[f]&&(k=b.rpmm.mh,j=b.rpmm.Mh,g=h,-1!=k.indexOf("%")&&(k=parseFloat(k)*d.clientHeight/100),-1!=j.indexOf("%")&&(j=parseFloat(j)*d.clientHeight/
100),-1!=g.indexOf("%")&&(g=parseFloat(g)*d.clientHeight/100),k=parseFloat(k),j=parseFloat(j),g=parseFloat(g),!isNaN(k)&&g<k?h=-1!=h.indexOf("%")?100*k/d.clientHeight+"%":k+"px":!isNaN(j)&&g>j&&(h=-1!=h.indexOf("%")?100*j/d.clientHeight+"%":j+"px")));c.style[a.rCSSProps[f]]=h}}};a.resetStyles=function(c){if(c)for(var b=a.rCSSProps.length,d=0;d<b;++d)c.style[a.rCSSProps[d]]=""};a.getMinMaxHeight=function(c){if(a.responsive){var b={},d=a("project").clientHeight;c.sh&&(d=parseFloat(c.sh));var e=c.rpmm.mh,
c=c.rpmm.Mh;-1!=e.indexOf("%")&&(e=parseFloat(e)*d/100);-1!=c.indexOf("%")&&(c=parseFloat(c)*d/100);b.minH=parseFloat(e);b.maxH=parseFloat(c);return b}};a.applyResponsiveStyles=function(c,b,d,e,f,g){if(b){void 0===e&&(e=!1);void 0===g&&(g=a.ReasonForDrawing.kRegularDraw);b.ipiv||(b.w="0.000%",b.h="0.000%",b.rpmm={mw:"0px",mh:"0px",Mw:"",Mh:""});var h=a.rCSSProps.length,k=!1,f=k?a.RespDefaultBptW:a.projectClientWidth,j=k?a.RespDefaultBptH:a.projectClientHeight;b.sh&&(j=parseFloat(b.sh),k=!0);var l=
null,m=b.cah,n=b.cav,o=!1,q=!1,r=void 0,u=void 0;if(d&&(b.lhID||b.lvID))r=a.getDisplayObjByCP_UID(b.lhID),u=b.lhID==b.lvID?r:a.getDisplayObjByCP_UID(b.lvID),r&&(o=r.isStarted&&r.isDrawnComplete),u&&(q=u.isStarted&&u.isDrawnComplete);for(var s,d=0;d<h;++d){var w=a.rCSSProps[d],z=a.rCPProps[d],p=b[z];if(p){"h"==z?-1!=p.indexOf("auto")?(p=b.w,p=-1!=p.indexOf("H%")?parseFloat(p)*j/100:-1!=p.indexOf("%")?parseFloat(p)*f/100:parseFloat(p),p=a.getRoundedValue(p/parseFloat(b.apr))+"px"):-1!=p.indexOf("H%")?
(p=p.split("H%")[0],p=a.getRoundedValue(p*f/100)+"px"):k&&-1!=p.indexOf("%")&&(p=p.split("%")[0],p=a.getRoundedValue(p*j/100)+"px"):"w"==z&&(-1!=p.indexOf("auto")?(p=b.h,p=-1!=p.indexOf("%")?parseFloat(p)*j/100:parseFloat(p),p=a.getRoundedValue(p*parseFloat(b.apr))+"px"):-1!=p.indexOf("H%")?(p=p.split("H%")[0],p=a.getRoundedValue(p*j/100)+"px"):k&&-1!=p.indexOf("%")&&(p=p.split("%")[0],p=a.getRoundedValue(p*f/100)+"px"));if(!m&&("l"==z||"r"==z))if(-1!=p.indexOf("H%")?(p=p.split("H%")[0],p=a.getRoundedValue(p*
j/100)+"px"):k&&-1!=p.indexOf("%")&&(p=p.split("%")[0],p=a.getRoundedValue(p*f/100)+"px"),o&&-1!=b.lhID&&"auto"!=p){var v=r.actualParent;if(v){a.verbose&&a.log("GetBoundingClientRectForBaseItem triggered by item : "+c.id);if(!s||b.lhID!==b.lvID)s=a.GetBoundingClientRectForBaseItem(r,e,g);var y=s?s:a.GetBoundingClientRectForElem(v,e);if(!s&&(v.tr||r.hasEffect)){var na=r.actualParent.style.transform||r.actualParent.style.msTransform||r.actualParent.style.MozTransform||r.actualParent.style.WebkitTransform||
r.actualParent.style.OTransform;a.applyTransform(r.actualParent,"");r.actualParent.offsetHeight=r.actualParent.offsetHeight;y=a.GetBoundingClientRectForElem(v,e);a.applyTransform(r.actualParent,na)}y&&(p=b.lhV,-1!=p.indexOf("H%")?(p=p.split("H%")[0],p=a.getRoundedValue(p*j/100)+"px"):-1!=p.indexOf("%")&&(p=p.split("%")[0],p=a.getRoundedValue(p*f/100)+"px"),l=a.GetBoundingClientRectForElem(a("div_Slide"),e),y=y[a.rLinkEdges[b.lhEID]],y="r"==z?l.right-y:y-l.left,p=y+parseFloat(p)+"px")}}if(!n&&("t"==
z||"b"==z))if(-1!=p.indexOf("H%")?(p=p.split("H%")[0],p=a.getRoundedValue(p*f/100)+"px"):k&&-1!=p.indexOf("%")&&(p=p.split("%")[0],p=a.getRoundedValue(p*j/100)+"px"),q&&-1!=b.lvID&&"auto"!=p)if(v=u.actualParent){a.verbose&&a.log("GetBoundingClientRectForBaseItem triggered by item : "+c.id);if(!s||b.lhID!==b.lvID)s=a.GetBoundingClientRectForBaseItem(u,e,g);y=s?s:a.GetBoundingClientRectForElem(v,e);if(!s&&(v.tr||u.hasEffect))na=u.actualParent.style.transform||u.actualParent.style.msTransform||u.actualParent.style.MozTransform||
u.actualParent.style.WebkitTransform||u.actualParent.style.OTransform,a.applyTransform(u.actualParent,""),u.actualParent.offsetHeight=u.actualParent.offsetHeight,y=a.GetBoundingClientRectForElem(v,e),a.applyTransform(u.actualParent,na);y&&(p=b.lvV,-1!=p.indexOf("H%")?(p=p.split("H%")[0],p=a.getRoundedValue(p*f/100)+"px"):-1!=p.indexOf("%")&&(p=p.split("%")[0],p=a.getRoundedValue(p*j/100)+"px"),l||(l=a.GetBoundingClientRectForElem(a("div_Slide"),e)),y=y[a.rLinkEdges[b.lvEID]],y="b"==z?l.bottom-y:y-
l.top,p=y+parseFloat(p)+"px")}b.rpmm&&("width"==w?(y=b.rpmm.mw,v=b.rpmm.Mw,z=p,-1!=y.indexOf("%")&&(y=parseFloat(y)*f/100),-1!=v.indexOf("%")&&(v=parseFloat(v)*f/100),-1!=z.indexOf("%")&&(z=parseFloat(z)*f/100),y=parseFloat(y),v=parseFloat(v),z=parseFloat(z),!isNaN(y)&&z<y?p=-1!=p.indexOf("%")?100*y/f+"%":y+"px":!isNaN(v)&&z>v&&(p=-1!=p.indexOf("%")?100*v/f+"%":v+"px")):"height"==w&&(y=b.rpmm.mh,v=b.rpmm.Mh,z=p,-1!=y.indexOf("%")&&(y=parseFloat(y)*j/100),-1!=v.indexOf("%")&&(v=parseFloat(v)*j/100),
-1!=z.indexOf("%")&&(z=parseFloat(z)*j/100),y=parseFloat(y),v=parseFloat(v),z=parseFloat(z),!isNaN(y)&&z<y?p=-1!=p.indexOf("%")?100*y/j+"%":y+"px":!isNaN(v)&&z>v&&(p=-1!=p.indexOf("%")?100*v/j+"%":v+"px")));c.style[w]=p}else c.style[w]=""}m&&(b.stickyItem?(g=a.GetBoundingClientRectForElem(c,e),c.style.right="auto",c.style.left=A[b.flexParentPlcHldUID].layout.m_rect.m_left+(A[b.flexParentPlcHldUID].layout.m_size.width-g.width)/2+"px"):b.isflexItem||(g=a.GetBoundingClientRectForElem(c,e),c.style.right=
"auto",c.style.left=(f-g.width)/2+"px"));n&&(b.stickyItem?(g=a.GetBoundingClientRectForElem(c,e),c.style.bottom="auto",c.style.top=A[b.flexParentPlcHldUID].layout.m_rect.m_top+(A[b.flexParentPlcHldUID].layout.m_size.height-g.height)/2+"px"):b.isflexItem||(g=a.GetBoundingClientRectForElem(c,e),c.style.bottom="auto",c.style.top=(j-g.height)/2+"px"))}};a.createResponsiveStyleObj=function(c,b,d,e,f,g,h,k,j){var l={};if(c){for(var m=0;m<arguments.length;++m)l[a.rCPProps[m]]=arguments[m+1];for(var m=a.rCPLinkProps.length,
n=0;n<m;++n){var o=a.rCPLinkProps[n];c[o]&&(l[o]=c[o])}l.ipiv=c.ipiv}return l};a.getCenterForRotation=function(c,b){void 0===b&&(b=!1);var d={x:0,y:0};if(!c)return 0;var e=a.GetBoundingClientRectForElem(a("div_Slide"),b),f=a.GetBoundingClientRectForElem(c,b),g=f.top-e.top+f.height/2;d.X=f.left-e.left+f.width/2;d.Y=g;return d};a.RotatePoint=function(a,b,d,e,f){var f=f*Math.PI/180,a=a-d,g=b-e,b=Math.atan2(g,a),a=Math.sqrt(a*a+g*g),b=b+f,f=Math.cos(b)*a,a=Math.sin(b)*a;return{x:f+d,y:a+e}};a.getBoundsForRotatedItem=
function(c,b,d,e,f){var g={};if(void 0==e)return g;var e=Math.PI*-e/180,h=-c/2,k=c/2,j=c/2,c=-c/2,l=-b/2,m=-b/2,n=b/2,o=b/2,b=h*Math.cos(e)+l*Math.sin(e),h=-h*Math.sin(e)+l*Math.cos(e),l=k*Math.cos(e)+m*Math.sin(e),k=-k*Math.sin(e)+m*Math.cos(e),m=j*Math.cos(e)+n*Math.sin(e),j=-j*Math.sin(e)+n*Math.cos(e),n=c*Math.cos(e)+o*Math.sin(e),e=-c*Math.sin(e)+o*Math.cos(e),c=Math.min(b,l,m,n),o=Math.max(b,l,m,n),b=Math.min(h,k,j,e);y_max=Math.max(h,k,j,e);f||(f=0);e=Math.round(100*(o-c+2*f))/100;f=Math.round(100*
(y_max-b+2*f))/100;b=a("div_Slide").getBoundingClientRect();g.l=Math.round(100*(d.X-e/2))/100+"px";g.r=b.width-Math.round(100*(d.X+e/2))/100+"px";g.t=Math.round(100*(d.Y-f/2))/100+"px";g.b=b.height-Math.round(100*(d.Y+f/2))/100+"px";g.w=e+"px";g.h=f+"px";return g};a.getBoundsForRotatedItem1=function(c,b,d,e,f,g,h){var k={};if(void 0==g)return k;var j={x:c,y:b},l={x:c+d,y:b},d={x:c+d,y:b+e},e={x:c,y:b+e},j=a.RotatePoint(j.x,j.y,f.X,f.Y,g),l=a.RotatePoint(l.x,l.y,f.X,f.Y,g),d=a.RotatePoint(d.x,d.y,
f.X,f.Y,g),e=a.RotatePoint(e.x,e.y,f.X,f.Y,g),f=a("div_Slide").getBoundingClientRect(),g=Math.min(j.x,l.x,d.x,e.x),c=Math.max(j.x,l.x,d.x,e.x),b=Math.min(j.y,l.y,d.y,e.y);y_max=Math.max(j.y,l.y,d.y,e.y);h||(h=0);d=Math.round(100*(c-g+2*h))/100;e=Math.round(100*(y_max-b+2*h))/100;k.l=g+"px";k.r=f.width-c+"px";k.t=b+"px";k.b=f.height-y_max+"px";k.w=d+"px";k.h=e+"px";return k};a.isCaptionItem=function(c){return c==a.kCPOTCaptionItem||c==a.kCPOTSuccessCaptionItem||c==a.kCPOTFailureCaptionItem||c==a.kCPRolloverCaptionItem||
c==a.kCPOTStageCorrectFeedback||c==a.kCPOTStageIncorrectFeedback||c==a.kCPOTStagePartialCorrectFeedback||c==a.kCPOTTimeoutFeedbackItem||c==a.kCPOTRetryFeedbackItem||c==a.kCPOTHintCaptionItem};a.isSupportedWebkitBasedBrowser=function(){var c=0,b=/( AppleWebKit\/)([^ ]+)/.exec(navigator.userAgent);if(!b||3>b.length)return!1;var d=b[2],e=/[^\\.0-9]/.exec(d);e&&(d=d.slice(0,e.index));b&&(c=parseFloat(d));a.verbose&&a.log("Webkit version : "+c);return 534<=c};a.canUseWebkitAnimations=function(){var c=
a.isSupportedWebkitBasedBrowser();return!c?!1:c&&a.device==a.IDEVICE};a.getIsBrowserSupported=function(){var c=!1;a.browser==a.MSIE&&a.browserVersion>=a.MSIE_MIN_SUPPORTED_VERSION?c=!0:a.browser==a.CHROME&&a.browserVersion>=a.CHROME_MIN_SUPPORTED_VERSION?c=!0:a.browser==a.SAFARI&&a.browserVersion>=a.SAFARI_MIN_SUPPORTED_VERSION?c=!0:a.browser==a.FIREFOX&&a.browserVersion>=a.FF_MIN_SUPPORTED_VERSION&&(c=!0);return c};a.ShowWarning=function(c,b,d,e){var f=a.D.rtDialog,g=f.rtbgfc,h=f.rtbgsc,k=f.rtbtnfc,
j=f.rtbtnsc,l=f.rtsc,m=f.rttc,n=f.rttsc,o=f.rtfn,q=f.rtokb,f=f.rtcb,r=1;e&&++r;e=new a.RuntimeMessageBox(document.getElementById("cpDocument"),r,g,h,k,j,l,m,n,o);e.setTitleText(b);e.setMessageText(c);e.setFirstButtonText(q);e.registerFirstButtonHandler(e.hide);e.setSecondButtonText(f);d||e.show();return e};a.getIdealFontSize=function(c,b,d,e){if(a.responsiveType==a.kCPPMEAutoResponsive){var f=!1,g=document.createElement("canvas");document.body.appendChild(g);var h=g.getContext("2d"),k=0;g.id="CursorLayer";
h.font=e+"px Arial";k=h.measureText(c).width;if(b*d<1.5*e*k){do h.font=e+"px Trebuchet MS",k=h.measureText(c).width,b*d<1.4*e*k?e--:f=!0;while(!f)}document.body.removeChild(g);return e}};a.alert=function(c,b){b||(b="Adobe Captivate");c||(c="");a.ShowWarning(c,b)};window.alert=a.alert;a.modifyAlternativeAccessibleText=function(c,b){if(""!=b&&c&&"undefined"!=c)if(a.SAFARI===a.browser)c.setAttribute("aria-label",b);else{if(0===a.D.pref.acc||""===b)b=" ";var d=c.firstChild;if(d){if("DIV"!==d.tagName||
"cp-accessibility"!=d.className)d=d.nextSibling;if(d&&(d=d.firstChild))d.innerHTML=b}}};a.removeAccessibilityOutline=function(c){if(!(a.browser!==a.SAFARI&&1!==a.D.pref.hsr&&1===a.D.pref.acc)&&c){switch(a.browser){case a.CHROME:case a.SAFARI:case a.FIREFOX:c.style.outlineStyle="none"}switch(a.device){case a.IDEVICE:case a.ANDROID:c.style.outlineStyle="none"}}};a.complete=function(){if(a.initiated&&(!a.loadedModules.playbar||a.PB.playbarCreated))if(!a.loadedModules.toc||a.toc.tocCreated)if(!a.loadedModules.border||
a.borderCreated){var c=a("initialLoading");c&&c.parentElement.removeChild(c);a.unblockFromLMS();a.passwordAccepted&&!a.completed&&(a.completed=!0,a.responsive&&a.adjustResponsiveItems(a.ReasonForDrawing.kRegularDraw),a.fireModuleReadyEvent(a.currentWindow),a.autoPlayNeedsUserClick()||a.D.project_main.autoplay&&(a.currentWindow.cpAPIInterface&&a.currentWindow.cpAPIInterface.canPlay())&&a.movie.play())}};a.newElem=function(c){c=document.createElement(c);a.shouldScale&&a.fixWebkitScaling(c);return c};
a.fixWebkitScaling=function(c){if(a.shouldScale&&c&&c.style){var b=c.style.WebkitTransform;b&&-1!=b.toString().indexOf("translate3d")||(c.style.WebkitTransform+="translate3d(0px, 0px, 0px)")}};a.addDCHDiv=function(c,b){var d=document.createElement("div");d.id=c.id+"dummyCHDiv";d.style.width=c.style.width;d.style.height=c.style.height;d.style.display="block";d.style.position="absolute";d.style.left="0px";d.style.top="0px";d.style.backgroundColor="#ffffff";d.style.opacity=0;a.clearGestureCache(d);a.registerGestureEvent(d,
a.GESTURE_EVENT_TYPES.TAP,b);c.appendChild(d);return d};a.clearCanvasProperly=function(a){a.element.width=a.element.width};a.cloneObject=function(c){if(null==c||"object"!=typeof c)return c;var b=c.constructor(),d;for(d in c)c.hasOwnProperty(d)&&(b[d]=a.cloneObject(c[d]));return b};a.showHint=function(c,b){a.disableInteractions||(b.hintFeedback=new a.Feedback(c,null,!1,a.FeedbackType.HINT),b.hintFeedback.onRollover())};a.hideHint=function(c,b){if(!a.disableInteractions&&b&&b.hintFeedback)b.hintFeedback.onRollout()};
a.addRewrapObjectAsPerRestOfProjectItem=function(c){if(c){var b=a.movie.stage.getSlideDiv().firstChild;if(b){var d=a.movie.stage.m_lowestRewrapElementThatIsRestOfProjectAndOnTop;d?b.insertBefore(c,d):b.appendChild(c)}}};a.addDivObjectAsPerRestOfProjectItem=function(c){if(c){var b=a.movie.stage.getSlideDiv();if(b){var d=a.movie.stage.m_lowestElementThatIsRestOfProjectAndOnTop;d?b.insertBefore(c,d):b.appendChild(c)}}};a.moveRewrapElemToTop=function(c){c&&(c.parentNode.removeChild(c),a.addRewrapObjectAsPerRestOfProjectItem(c))};
a.moveDivElemToTop=function(c){c&&(c.parentNode.removeChild(c),a.addDivObjectAsPerRestOfProjectItem(c))};a.redrawItem=function(c,b){void 0===b&&(b=!1);var d=a(c);if(d&&!a("dummyStyle")){var e=d.style.display,f;f=!1==b?document.createElement("style"):document.createTextNode("");f.id="dummyStyle";document.body.appendChild(f);setTimeout(function(){document.body.removeChild(f);d.style.display=e},50)}};a.g_clickTimer=0;a.isClickTimerRunning=function(){return 0!=a.g_clickTimer};a.startClickTimer=function(c,
b){a.isClickTimerRunning()||(a.g_clickTimer=setInterval(b,c))};a.stopClickTimer=function(){a.isClickTimerRunning()&&(clearInterval(a.g_clickTimer),a.g_clickTimer=0)};a.getGradientSvgStr=function(a,b,d,e,f){var g="";if(!a.cs||2>a.cs.length)return"";if(0==a.t){if(g="linearGradient",void 0==a.x1||void 0==a.x2||void 0==a.y1||void 0==a.y2)return""}else if(1==a.t){if(g="radialGradient",void 0==a.cx||void 0==a.cy||void 0==a.r)return""}else return"";if(void 0==e||0==e)e=1;if(void 0==f||0==f)f=1;var h="<"+
g+' id="grad1" gradientUnits="userSpaceOnUse"';0==a.t?h+=' x1="'+a.x1*e+'" y1="'+a.y1*f+'" x2="'+a.x2*e+'" y2="'+a.y2*f+'"':(h+=' cx="'+a.cx*e+'" cy="'+a.cy*f+'" r="'+a.r*e+'"',void 0!=a.tf&&(void 0!=a.tf.x&&void 0!=a.tf.y)&&(h+=' gradientTransform="translate('+a.tf.x*e+" "+a.tf.y*f+')"'));var k="pad";void 0!=a.s&&(1==a.s?k="reflect":2==a.s&&(k="repeat"));for(var j="",l=0;l<a.cs.length;++l)var m=a.cs[l],j=j+('<stop offset="'+m.p+'%" style="stop-color:'+m.c+";stop-opacity:"+m.o/255+'" />');return'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="'+
b*e+'" height="'+d*f+'"><defs>'+(h+(' spreadMethod="'+k+'">'))+j+"</"+g+"></defs>"+('<rect x="0" y="0" width="'+b*e+'" height="'+d*f+'" fill="url(#grad1)"/>')+"</svg>"};a.getGradientFill=function(c,b,d,e){if(!b||!c.cs||2>c.cs.length)return null;void 0==d&&(d=1);void 0==e&&(e=1);var f=null;if(0==c.t){if(void 0==c.x1||void 0==c.x2||void 0==c.y1||void 0==c.y2)return null;f=b.createLinearGradient(c.x1*d,c.y1*e,c.x2*d,c.y2*e)}else if(1==c.t){if(void 0==c.cx||void 0==c.cy||void 0==c.r)return null;var f=
c.cx,g=c.cy;void 0!=c.tf&&(void 0!=c.tf.x&&void 0!=c.tf.y)&&(f+=c.tf.x,g+=c.tf.y);f=b.createRadialGradient(f*d,g*e,0,f*d,g*e,c.r*d)}else return null;for(b=0;b<c.cs.length;++b)d=c.cs[b],e=a.getRGBA(d.c,d.o/255),f.addColorStop(d.p/100,e);return f};a.drawLineCapStyle=function(c,b,d,e,f,g,h,k,j){if(0!=Math.sqrt((e-b)*(e-b)+(f-d)*(f-d)))switch(k){case 1:a.drawSquareCap(c,b,d,e,f,g,h,j);break;case 2:a.drawRoundCap(c,b,d,e,f,g,h,j);break;case 3:a.drawDiamondCap(c,b,d,e,f,g,h,j);break;case 4:a.drawArrowCap(c,
b,d,e,f,g,h,j)}};a.drawRoundCap=function(a,b,d,e,f,g,h,k){var j=0,l=0,m=0,j=0,j=Math.sin(0.349),m=(4+h/(2*j))/2;0==k?(j=b,l=d):(j=e,l=f);a.save();a.beginPath();a.arc(j,l,m,0,2*Math.PI,!1);a.closePath();a.fillStyle=g;a.fill();a.restore()};a.drawSquareCap=function(a,b,d,e,f,g,h,k){var j=0,l=0,m=0,n=0,o=n=0,q=0,r=j=0,l=0,l=Math.sin(0.349),j=(4+h/(2*l))/2;0==k?(l=b,m=d):(l=e,m=f);n=e-b;0==n?(n=0,q=o=j,j=0):(r=(f-d)/n,0!=r?(n=Math.sqrt(j*j/(r*r+1)),o=r*n,r=-1/r,q=Math.sqrt(j*j/(r*r+1)),j=r*q):(n=j,q=o=
0));a.save();a.beginPath();a.moveTo(l-n-q,m-o-j);a.lineTo(l+n-q,m+o-j);a.lineTo(l+n+q,m+o+j);a.lineTo(l-n+q,m-o+j);a.lineTo(l-n-q,m-o-j);a.closePath();a.fillStyle=g;a.fill();a.restore()};a.drawDiamondCap=function(a,b,d,e,f,g,h,k){var j=0,l=0,m=0,n=0,o=n=0,q=0,r=j=0,l=0,l=Math.sin(0.349),j=(4+h/(2*l))/2;0==k?(l=b,m=d):(l=e,m=f);n=e-b;0==n?(n=0,q=o=j,j=0):(r=(f-d)/n,0!=r?(n=Math.sqrt(j*j/(r*r+1)),o=r*n,r=-1/r,q=Math.sqrt(j*j/(r*r+1)),j=r*q):(n=j,q=o=0));a.save();a.beginPath();a.moveTo(l-n,m-o);a.lineTo(l-
q,m-j);a.lineTo(l+n,m+o);a.lineTo(l+q,m+j);a.lineTo(l-n,m-o);a.closePath();a.fillStyle=g;a.fill();a.restore()};a.drawArrowCap=function(a,b,d,e,f,g,h,k){var j=0,l=0,m=0,n=0,o=j=n=0,q=0,r=0,u=0,s=q=u=r=0,n=0,n=Math.sqrt((e-b)*(e-b)+(f-d)*(f-d));if(0!=n){r=(e-b)/n;u=(f-d)/n;q=Math.cos(0.349);s=Math.sin(0.349);j=1;1<h&&(j=Math.sqrt(h));var n=h/(2*s),l=6*j+n,m=4+n,n=l*(r*q-u*s),j=l*(u*q+r*s),o=l*(r*q+u*s),q=l*(u*q-r*s),r=m*r,u=m*u,w=l=s=m=h=0,z=0;0==k?(h=b-r,m=d-u,s=b+n-r,l=d+j-u,w=b+o-r,z=d+q-u):(h=e+
r,m=f+u,s=e-n+r,l=f-j+u,w=e-o+r,z=f-q+u);a.save();a.beginPath();a.moveTo(h,m);a.lineTo(s,l);a.lineTo(w,z);a.lineTo(h,m);a.closePath();a.fillStyle=g;a.fill();a.restore()}};a.getPattern=function(a,b,d){var e=[];switch(a){case 1:e[0]=d*b;e[1]=b;break;case 2:e[0]=b;e[1]=b;break;case 3:e[0]=d*b;e[1]=b;e[2]=b;e[3]=b;break;case 4:e[0]=d*b;e[1]=b;e[2]=b;e[3]=b;e[4]=b;e[5]=b;break;default:e[0]=1E4*b,e[1]=0}return e};a.dashStruct=function(){this.m_drawingDash=!0;this.m_offset=this.m_patternIndex=0};a.drawDashedLineImpl=
function(a,b,d,e,f,g,h){var g=g-e,h=h-f,k=Math.sqrt(g*g+h*h),j=0,l=0,m=0,n=0,o=0;if(0!=k){g/=k;h/=k;j=k;l=-d.m_offset;k=d.m_drawingDash;for(m=d.m_patternIndex;l<j;)l+=b[m],l>=j&&(d.m_offset=b[m]-(l-j),d.m_patternIndex=m,d.m_drawingDash=k,l=j),n=e+l*g,o=f+l*h,k?a.lineTo(n,o):a.moveTo(n,o),k=!k,m=(m+1)%b.length}};a.drawDashedLine=function(c,b,d,e,f,g){var g=a.getPattern(g,7,3),h=new a.dashStruct;a.drawDashedLineImpl(c,g,h,b,d,e,f)};a.drawDashedCurve=function(a,b,d,e,f,g,h,k,j,l,m,n){var o=l=0,q=m=0,
r=q=0,u=0,s=-d.m_offset,w=d.m_drawingDash,z=d.m_patternIndex,p=u=0,v=0,y=r=0,A=o=0,C=0;if(0>n){n=0;l=e;o=f;for(u=1;100>u;++u)q=u/100,r=1-q,m=r*r*l+2*q*r*g+q*q*k,q=r*r*o+2*q*r*h+q*q*j,n+=Math.sqrt((m-l)*(m-l)+(q-o)*(q-o)),l=m,o=q;if(0>n||0==n)return}Math.sqrt((g-e)*(g-e)+(h-f)*(h-f));m=e;q=f;l=g;for(o=h;s<n;)s+=b[z],s>=n&&(d.m_offset=b[z]-(s-n),d.m_patternIndex=z,d.m_drawingDash=w,s=n),A=m,C=q,u=q-o,p=l-m,v=m*o-q*l,0==n&&(console.error("Resetting the value of R to 1 inorder to prevent Divide by zero."),
n=1),q=s/n,1<q&&(q=1),r=1-q,l=r*e+q*g,o=r*f+q*h,m=r*r*e+2*q*r*g+q*q*k,q=r*r*f+2*q*r*h+q*q*j,r=q-o,y=l-m,o=m*o-q*l,0!=y*u-p*r?(l=(p*o-y*v)/(y*u-p*r),o=(u*o-r*v)/(p*r-y*u)):(l=A,o=C),w?a.quadraticCurveTo(l,o,m,q):a.moveTo(m,q),w=!w,z=(z+1)%b.length};a.drawDashedOval=function(c,b,d,e,f,g){var h=0,k=0,j=0,l=0,m=0,n=m=0,o=0,q=0,r=0,u=0,s=0,w=new a.dashStruct,g=a.getPattern(g,7,3);0>f&&(f=e);h=Math.PI/4;k=e/Math.cos(h/2);j=f/Math.cos(h/2);c.beginPath();l=0;c.moveTo(b+e,d);r=b+e;u=d;for(s=0;8>s;++s)l+=h,
m=l-h/2,o=b+Math.cos(m)*k,q=d+Math.sin(m)*j,m=b+Math.cos(l)*e,n=d+Math.sin(l)*f,a.drawDashedCurve(c,g,w,r,u,o,q,m,n,e,f,-1),r=m,u=n;c.closePath()};a.drawDashedArc=function(c,b,d,e,f,g,h,k,j){var l=0,m=0,n=0,o=0,q=0,r=q=0,u=0,s=0,w=e-g,z=f,p=0;0>h&&(h=g);l=Math.PI/4;m=g/Math.cos(l/2);n=h/Math.cos(l/2);o=0;c.moveTo(e-g,f);for(p=0;16>p;++p)if(o+=l,q=o-l/2,u=e+Math.cos(q)*m,s=f+Math.sin(q)*n,q=e+Math.cos(o)*g,r=f+Math.sin(o)*h,o>k&&o<=j)a.drawDashedCurve(c,b,d,w,z,u,s,q,r,g,h,Math.PI*g/4),w=q,z=r;else if(o<=
k)w=q,z=r,c.moveTo(w,z);else if(o>j)break};a.drawDashedRectangle=function(c,b,d,e,f,g,h){var k=new a.dashStruct,h=a.getPattern(h,7,3);0>=g&&(g=0);c.beginPath();c.moveTo(b,d+f-g);a.drawDashedLineImpl(c,h,k,b,d+f-g,b,d+g);0<g&&a.drawDashedArc(c,h,k,b+g,d+g,g,g,Math.PI,3*Math.PI/2);a.drawDashedLineImpl(c,h,k,b+g,d,b+e-g,d);0<g&&a.drawDashedArc(c,h,k,b+e-g,d+g,g,g,3*Math.PI/2,2*Math.PI);a.drawDashedLineImpl(c,h,k,b+e,d+g,b+e,d+f-g);0<g&&a.drawDashedArc(c,h,k,b+e-g,d+f-g,g,g,2*Math.PI,5*Math.PI/2);a.drawDashedLineImpl(c,
h,k,b+e-g,d+f,b+g,d+f);0<g&&a.drawDashedArc(c,h,k,b+g,d+f-g,g,g,Math.PI/2,Math.PI);c.closePath()};a.drawDashedPolyLine=function(c,b,d,e,f){var g=new a.dashStruct,d=a.getPattern(d,7,3),h=0,k=0,j=0,l=0,m=0;if(0!=b.length){h=b[0].x;k=b[0].y;c.beginPath();c.moveTo(h,k);for(m=1;m<b.length;++m)j=b[m].x,l=b[m].y,a.drawDashedLineImpl(c,d,g,h*e,k*f,j*e,l*f),h=j,k=l;j=b[0].x;l=b[0].y;a.drawDashedLineImpl(c,d,g,h*e,k*f,j*e,l*f);c.closePath()}};a.moveTo=function(a,b,d){a.moveTo(b,d)};a.lineTo=function(a,b,d){a.lineTo(b,
d)};a.bezierCurveTo=function(a,b,d,e,f,g,h){a.bezierCurveTo(b,d,e,f,g,h)};a.getBezierLength=function(a,b,d,e,f,g,h,k,j){for(var l=0,m=0,n=0,o=0,q=0,m=0,r=a,u=b,l=1;l<j;++l)m=l/j,n=1-m,q=n*n*n*a+3*m*n*n*d+3*m*m*n*f+m*m*m*h,m=n*n*n*b+3*m*n*n*e+3*m*m*n*g+m*m*m*k,o+=Math.sqrt((q-r)*(q-r)+(m-u)*(m-u)),r=q,u=m;return o};a.getCPSlideData=function(){var c=[],b=a.movie.stage.slides.length;for(i=0;i<b;++i){var d=a.D[a.movie.stage.slides[i]],e={};e.slideNumber=i+1;e.title=d.lb;e.idealTime=(d.to-d.from+1)/cpInfoFPS;
e.isQuestionSlide=!1;if(a.movie.playbackController&&(d=a.movie.playbackController.GetQuizController()))d=d.GetSlideType(i),e.isQuestionSlide="Question"==d?!0:!1;e.isEndSlide=!1;c[i]=e}e.isEndSlide=!0;return c};a.doesCourseHasQuiz=function(){return!a.movie.playbackController?!1:a.movie.playbackController.HasQuiz()};a.drawDashedBezierCurve=function(c,b,d,e,f,g,h,k,j,l,m){var n=0,o=0,q=0,r=0,u=n=0,s=3,u=-d.m_offset,w=d.m_drawingDash,z=d.m_patternIndex,p=0,v=0,y=0,r=0,A=!1,q=a.getBezierLength(e,f,g,h,
k,j,l,m,100);if(!(0>=q))for(;u<q;){y=u;p=b[z];if(u+p>=q){if(d.m_offset=b[z]-(u+p-q),d.m_patternIndex=z,d.m_drawingDash=w,p=q-u,p>q&&(p=q),A=!0,!w){c.moveTo(l,m);break}}else{if(0>u){for(r=u;0>r;)r+=p;p=r;u=0}d.m_offset=0;d.m_patternIndex=0;d.m_drawingDash=!0}0>y&&(y=0);if(w&&0<p){p>q&&(p=q);s=3<p?3:p;v=p;do y=v>s?y+s:y+v,n=y/q,o=1-n,1<=n?(r=l,n=m):(r=o*o*o*e+3*n*o*o*g+3*n*n*o*k+n*n*n*l,n=o*o*o*f+3*n*o*o*h+3*n*n*o*j+n*n*n*m),c.lineTo(r,n),v-=s;while(0<v);if(A)break}else n=(u+p)/q,o=1-n,1<=n?(r=l,n=
m):(r=o*o*o*e+3*n*o*o*g+3*n*n*o*k+n*n*n*l,n=o*o*o*f+3*n*o*o*h+3*n*n*o*j+n*n*n*m),c.moveTo(r,n);w=!w;z=(z+1)%b.length;0>u&&(u=0);u+=p}};a.handleQuizzingItemsInReviewMode=function(c,b,d){if(a.movie.playbackController){var e=a.movie.playbackController.GetQuizController();if(e){var f=b.iqb,e=e.GetIsInReviewMode();if(f)switch(b.qbt){case "submit":case "submitAll":case "clear":case "skip":case "back":if(!0==e){b=a.movie.stage.currentSlide;if("Question Slide"==b.st){if((b=a.getQuestionObject(b.qs))&&b.getIsKnowledgeCheck())break;
a.hide(d)}c.tabIndex=-1}break;case "reviewModeNext":case "reviewModeBack":!1==e?(a.hide(d),c.tabIndex=-1):a.show(d);break;case "postResult":if(b=a.movie.playbackController.GetLMSType(),!a.movie.playbackController.CanPostResults()||b&&"INTERNALSERVER"==b.toUpperCase())a.hide(d),c.tabIndex=-1}}}};a.createCanvas=function(c,b,d,e,f,g,h){f||(f=a.newElem("canvas"));f.width=d;f.height=e;f.style.width=void 0==g?d+"px":g;f.style.height=void 0==h?e+"px":h;f.left=c;f.top=b;f.style.left=c+"px";f.style.top=b+
"px";return new a.Canvas(f)};a.createResponsiveCanvas=function(c,b,d,e,f){e||(e=a.newElem("canvas"));c.ipiv?(e.width=b,e.height=d):(e.width=0,e.height=0);a.applyResponsiveStyles(e,c,f,!0);return new a.Canvas(e)};a.preventEventDefault=function(a){a&&(a.preventDefault?a.preventDefault():a.returnValue=!1)};a.getHitTestingRect=function(c){var b={minX:0,minY:0,maxX:0,maxY:0};if(!c)return b;var d=c.getBoundingClientRect(),c=a.getScaledPosition(d.left,d.top),d=a.getScaledPosition(d.right,d.bottom);b.minX=
c.X;b.minY=c.Y;b.maxX=d.X;b.maxY=d.Y;b.width=b.maxX-b.minX;b.height=b.maxY-b.minY;return b};a.IsPointWithElem=function(a,b,d,e,f,g,h){var k=0,j=0,l=0;a.rotateAngle&&(k=a.rotateAngle);a=b-(e+g)/2;d-=(f+h)/2;j=a*Math.cos(Math.PI*-k/180)-d*Math.sin(Math.PI*-k/180);l=a*Math.sin(Math.PI*-k/180)+d*Math.cos(Math.PI*-k/180);j+=(e+g)/2;l+=(f+h)/2;return j>=e&&j<=g&&l>=f&&l<=h?!0:!1};a.handleDblClick=function(c){var b=null,d=null,b=null,b=a.getScaledPosition(getPageX(c),getPageY(c)),e=b.X,f=b.Y,g=null,h=0,
b=a.movie.stage.getClickManager(),d=b.getDoubleClickArr(cpInfoCurrentFrame);if(!(null==d||0==d.length)){a.stopClickTimer();for(h=0;h<d.length;++h)if(b=d[h])if(g=b.m_htmlElem,!b.m_obj||!b.m_obj.actionInProgress){var k=a.getHitTestingRect(g),j=!1;if(a.IsPointWithElem(g,e,f,k.minX,k.minY,k.maxX,k.maxY)&&b.m_obj&&(a.kCPOTWebObject==b.m_obj.type?(g=a.GetDataForElement(g,!0),g.isCanvasClicked&&g.isCanvasClicked(c,!0)&&(j=!0)):j=!0,j)){var c=0,l,m,f=b.m_obj.currentAttempt;void 0!=f&&(c=f);b.m_obj.mdi&&(m=
a.D[b.m_obj.mdi]);void 0!=m&&(l=m.dn);l&&a.SubmitInteractions(l,a.QuestionStatusEnum.CORRECT,c);a.clickSuccessHandler(b.m_obj);b.m_obj.handled=!0;return}}if((b=d[0])&&b.m_obj&&!b.m_obj.actionInProgress)if(c=a.D[b.m_obj.mdi].visible,e=0,f=b.m_obj.currentAttempt,void 0!=f&&(e=f),e+=1,b.m_obj.currentAttempt=e,f=b.m_obj.ma,d=-1!=f&&e==f&&c,h=(-1==f||e<=f)&&c,b.m_obj.mdi&&(m=a.D[b.m_obj.mdi]),void 0!=m&&(l=m.dn),l&&a.SubmitInteractions(l,a.QuestionStatusEnum.INCORRECT,e-1),a.clickFailureHandler(b.m_obj,
d,h),!b.m_obj.handled)b.m_obj.handled=-1!=f&&e>=f&&c}};a.handleRightClick=function(c){var b=null,d=null,b=null,b=a.getScaledPosition(getPageX(c),getPageY(c)),e=b.X,f=b.Y,g=null,d=!1,h=0,b=a.movie.stage.getClickManager(),d=b.getRightClickArr(cpInfoCurrentFrame);if(!(null==d||0==d.length)){a.stopClickTimer();for(h=0;h<d.length;++h)if((b=d[h])&&(!b.m_obj||!b.m_obj.actionInProgress)){var g=b.m_htmlElem,k=a.getHitTestingRect(g);if(b.m_obj&&a.IsPointWithElem(g,e,f,k.minX,k.minY,k.maxX,k.maxY)){var e=0,
j,l,f=b.m_obj.currentAttempt;void 0!=f&&(e=f);b.m_obj.mdi&&(l=a.D[b.m_obj.mdi]);void 0!=l&&(j=l.dn);j&&a.SubmitInteractions(j,a.QuestionStatusEnum.CORRECT,e);d=a.clickSuccessHandler(b.m_obj);b.m_obj.handled=!0;d&&a.preventEventDefault(c);return}}if((b=d[0])&&b.m_obj&&!b.m_obj.actionInProgress)if(c=a.D[b.m_obj.mdi].visible,e=0,f=b.m_obj.currentAttempt,void 0!=f&&(e=f),e+=1,b.m_obj.currentAttempt=e,f=b.m_obj.ma,d=-1!=f&&e==f&&c,g=(-1==f||e<=f)&&c,b.m_obj.mdi&&(l=a.D[b.m_obj.mdi]),void 0!=l&&(j=l.dn),
j&&a.SubmitInteractions(j,a.QuestionStatusEnum.INCORRECT,e-1),a.clickFailureHandler(b.m_obj,d,g),!b.m_obj.handled)b.m_obj.handled=-1!=f&&e>=f&&c}};a.handleMouseOut=function(){if(a.device==a.DESKTOP){var c=a.movie.stage.getSlideDiv();c&&(c.touchstartX=null,c.isMoving=!1)}};a.handleMouseMove=function(c){c=c.pageX+","+c.pageY;a.LastMousePosition!=c&&(a.LastMousePosition=c,c=document.getElementById("playbar"),void 0!=c&&c.animator&&c.animator.showPlaybar(cpInfoCurrentFrame>=a.movie.stage.lastFrame?!0:
!1))};a.handleMouseOver=function(){var c=document.getElementById("playbar");void 0!=c&&c.animator&&c.animator.showPlaybar(cpInfoCurrentFrame>=a.movie.stage.lastFrame?!0:!1)};var w={};a.initObjectFactory=function(){w.questionSlideReviewLabel=a.QuestionSlideReviewLabel;w.progressSlideLabel=a.ProgressSlideLabel;w.fibAnswer=a.FIBAnswer;w.shortAnswer=a.ShortAnswer;w.sequenceInput=a.SequenceInput;w.matchingAnswer=a.MatchingAnswer;w.matchingItem=a.MatchingItem;w.likertItem=a.LikertItem;w.hotspotInput=a.HotspotInput;
w.multipleChoiceInput=a.MCQInput;w.resultSlideLabel=a.ResultSlideLabel;w.singleChoiceInput=a.MCQInput;w.input=a.TextInput;w.textbutton=a.TextButton;w.shape=a.Shape;w.image=a.DisplayObject;w.group=a.Group;w.svg=a.DisplayObject;w.text=a.DisplayObject;w.placeholder=a.Placeholder;w.hb=a.HighlightBox;w.rai=a.RolloverAreaItem;w.mc=a.MouseClick;w.gf=a.Gradient;w.imgf=a.ImageFill;w.typingtext=a.TypingText;w.line=a.Line;w.drawingItem=a.DrawingItem;w.answerArea=a.AnswerArea;w.rectWithText=a.RectWithText;w.autoShape=
a.AutoShape;w.widget=a.Widget;w.WebObject=a.WebObject;w.ThreeDSlide=a.ThreeDSlide;w.ThreeDHotSpot=a.ThreeDHotSpot;w.eventVideo=a.EventVideo;w.slideVideo=a.SlideVideo;w.fmrVideo=a.FMRVideo;w.cpvcVideo=a.CPVCVideo;w.ytStreamingVideo=a.YTStreamingVideo;w.vimeoStreamingVideo=a.VimeoStreamingVideo;w.zoom=a.Zoom;w.ta=a.TextAnimation;w.animationItem=a.AnimationItem;if(a.extObjInfo&&a.IsValidObj(a.extObjInfo))for(var c=0;c<a.extObjInfo.length;++c)a.IsValidObj(a.extObjInfo[c])&&(w[a.extObjInfo[c].n]=a.extObjInfo[c].cls)};
a.parseChildren=function(c,b,d){var e=[],f=b.id+"c";c[f]&&e.push(c[f]);for(b=b.firstChild;b;b=b.nextSibling){var f=b,g=!1;"cp-rewrap"==b.className&&(f=b.firstChild,g=!0);if(f.nodeType==Node.ELEMENT_NODE){for(var h=(f.className+"").split(" "),k=null,j,l=!1,m="",n=0;n<h.length&&null==k;++n)if("cp-"==h[n].substr(0,3)){j=h[n].substr(3);var k=w[j],o=h[n].substr(3);if("gf"==o||"imgf"==o||"drawingItem"==o||"answerArea"==o||"rectWithText"==o||"autoShape"==o)l=!0;if(("gf"==o||"imgf"==o)&&f.parentElement)m=
f.parentElement.id}if(k){if(h=a.ropMap[f.id])h.restOfProjectDoOnNewSlide(),a.verbose&&a.log("resued childObj from cp.ropMap for "+f.id);else{l?(0==m.length&&(m=f.id),h=new k(f,m,d)):h=new k(f,d);a.verbose&&a.log("created new "+j);k=0;if(l=h.getAttribute("dn"))k=a.D[l].rp;f.id&&1==k&&(a.ropMap[f.id]=h,a.verbose&&a.log("added "+f.id+" to cp.ropMap"))}D[f.id]=h;g?c[f.id]=h:e.push(h)}}}return e};a.removeFromDisplayObjectMap=function(a){D[a]=void 0};a.addToDisplayObjectMap=function(a,b){D[a]=b};a.parseFrameset=
function(c,b){a.verbose&&a.log("parseFrameset "+b.id);var d=a.parseChildren(c,b);PPTXLib.instanceManager&&PPTXLib.addToInstanceManager(b.id,d[0]);d=new a.FrameSet(b,d);return D[b.id]=d};a.parseTimeline=function(c){return new a.Timeline(c)};a.shouldMoveTo=function(c){return a.movie.stage.canUpdateToFrame(c)};a.getCpInfoOriginalFPS=function(){return a.movie.fps};a.getCpInfoSpeed=function(){return a.movie.speed};a.getCpElapsedMovieTime=function(){return a.movie.elapsedMovieTime};a.getCpIsPlaying=function(){return!a.movie.paused};
a.showValue=function(c){a.showHideElements();a.movie.pause(a.ReasonForPause.SHOW_VALUE_AT_FRAME);a.movie.jumpToFrame(c)};a.hyperlinkClick=function(c){if(c=a.D[c])c=c.oca,a.movie.paused&&(c=c.replace("cpCmndResume = 1;",""),c=c.replace("cp.actionChoiceContinueMovie();","")),a.movie.executeAction(c)};a.SubmitInteractions=function(c,b,d,e,f){var g=a.D[c],c=ja(c),g=a.D[c],h=g.type,k=b==a.QuestionStatusEnum.CORRECT||b==a.QuestionStatusEnum.PARTIAL_CORRECT;if(g){var j=void 0!=g.siq&&g.siq;if(j){var l=a.getQuestionObject(c);
if(l){if(!a.movie.playbackController)return;var m=a.movie.playbackController.GetQuizController();if(!m)return;var n=l.isDisabled,o=!1;!m.GetIsInReviewMode()&&!m.GetIsQuizCompleted()&&l.setCurrentAttempt(d+1);d=e;if(void 0==d||void 0==f)if(!l.getIsInteractiveWidget()&&"fill-in"==l.getInteractionType()){f=document.getElementById(c+"_inputField");if(!f)return!1;d=g.exp;f=f.value}else d=["1"],f=k?"1":"0";l.questionData.cal=d;l.setSelectedAnswers(f);b==a.QuestionStatusEnum.CORRECT||b==a.QuestionStatusEnum.PARTIAL_CORRECT?
o=!0:l.getCurrentAttempt()>=l.getNumberOfAttempts()&&(o=!0);l.setShouldAddToTotal(void 0!=g.sat&&g.sat);!m.GetIsInReviewMode()&&!m.GetIsQuizCompleted()&&(o?(k?l.setQuestionStatus(l.QuestionStatusEnum.CORRECT):l.setQuestionStatus(l.QuestionStatusEnum.INCORRECT),n||l.endQuestion(!0)):l.endQuestion(!1))}}c={itemname:c,frameNumber:cpInfoCurrentFrame,objecttype:h,issuccess:k,slideNumber:cpInfoCurrentSlideIndex+1,includedInQuiz:j};l&&(c.questioneventdata=l.getQuestionEventData());a.em.fireEvent("CPInteractiveItemSubmit",
c)}};a.hotspotQuestionSlideHandler=function(c){a.m_gestureHandler.disableGestures();var b=c.currentTarget,d=a.getQuestionObject(b.childNodes[0].id);d&&d.hotspotQuestionHandler(b,getPageX(c),getPageY(c));a.m_gestureHandler.enableGestures()};a.handleClickExternal=function(c){function b(c){return a.kCPOTClickBoxItem==c.type||a.kCPOTScorableButtonItem==c.type||a.kCPOTAutoShape==c.type}function d(){n=!0;if(null==q&&(m.ofc||-1!=m.ma))r=o,q=m,z=s,w=u,p=h}function e(b){if("DIV"==b.nodeName&&"block"==b.style.display&&
("feedbackClickDiv"==b.id&&b.remover(),h=a.GetDataForElement(b,!0))){var d=h.mdi;if(d&&a.D[d].visible&&h.chfn&&void 0==h.val){d=h.mdi;drawingItemDivData=a.D[d];s=0;u=-1;var e=h.currentAttempt;void 0!=e&&(s=e);u=h.ma;m=h;o=b.id;if(void 0==m.amc||m.amc||!(a.device!=a.IDEVICE||a.device==a.ANDROID))if(h&&drawingItemDivData&&a.kCPOTWidgetItem==h.type&&drawingItemDivData.iiw)a.HandleInteractiveWidget(c,d);else return!0}}}function f(c){var d=ja(c.id);if(a.D[d].enabled){if(m.actionInProgress)return!1;if(m.dclk||
m.rclk){var d=function(){a.stopClickTimer();f+=1;e.currentAttempt=f;var d=e.ma,g=e.mdi,h=a.D[g].visible,g=a.showHideFeedbackCaptionsClickHandler(c,-1!=d&&f==d&&h,a.D[g].dn,(-1==d||f<=d)&&h);b(e)&&!e.handled&&(e.handled=-1!=d&&f>=d&&h);return g},e=m,f=s;a.isClickTimerRunning()||a.startClickTimer(500,d);return!1}d=m;if(!d||a.kCPOTAutoShape!=d.type)d=!0;else{var g=a.movie.stage.currentSlide,k=!1,j=!1,l=0;if(g&&(l=g.from,"Question Slide"==g.st&&g.qs)){var n=a.D[g.qs];n&&"Hotspot"==n.qtp&&(k=!0);(g=a.getQuestionObject(g.qs))&&
g.shouldDisableOptions()&&(j=!0)}d=!k||j?!0:!d.rp||!d.rpa||d.from>l?!1:!0}if(!d)return!1;d=h.chfn;a.SubmitInteractions(c.id,a.QuestionStatusEnum.CORRECT,s);k=a.movie.stage.currentSlide;d(c);k==a.movie.stage.currentSlide&&b(m)&&(m.handled=!0);return!0}}function g(a){if(!e(a))return!1;if(h.iqb||h.vid)return!0;a=f(a);if(void 0===a)n=!1;else return a;if(h.vid)return!1;d()}var h=null;if(a.isClickTimerRunning())return c.cpCustomData&&c.cpCustomData.asPartOfStateChange?a.handleDblClick(c):!1;var k=a.getScaledPosition(getPageX(c),
getPageY(c)),j=k.X-window.pageXOffset,l=k.Y-window.pageYOffset,m=null,k=a("div_Slide").childNodes,n=!1,o="",q=null,r="",u=-1,s=0,w=-1,z=0,p=null,v;v=0===c.screenX&&0===c.screenY&&0===c.clientX&&0===c.clientY&&0===c.x&&0===c.y?!0:!1;if(v){if(v=c.target,j=g(v,!1),!0===j||!1===j)return j}else for(var y=k.length-1;0<=y;--y)if(v=k[y],e(v)){var A;var C=A=0,D=0,P=0;void 0==v.getBoundingClientRect?(A=parseFloat(v.style.left),C=parseFloat(v.style.top),D=parseFloat(v.style.left)+parseFloat(v.style.width),P=
parseFloat(v.style.top)+parseFloat(v.style.height)):(A=void 0,v.rotateAngle&&(A=v.style.transform||v.style.msTransform||v.style.MozTransform||v.style.WebkitTransform||v.style.OTransform,a.applyTransform(v,"rotate(0)")),v.offsetHeight=v.offsetHeight,P=a.getHitTestingRect(v),v.rotateAngle&&a.applyTransform(v,A),A=P.minX,C=P.minY,D=P.maxX,P=P.maxY);var I=0;v.rotateAngle&&(I=v.rotateAngle);var L=j,F=l,L=L-(A+D)/2,F=F-(C+P)/2,M=L*Math.cos(Math.PI*-I/180)-F*Math.sin(Math.PI*-I/180),I=L*Math.sin(Math.PI*
-I/180)+F*Math.cos(Math.PI*-I/180),M=M+(A+D)/2,I=I+(C+P)/2;A=M>=A&&M<=D&&I>=C&&I<=P?!0:!1;if(A){if(h.iqb||h.vid)return!0;if((a.kCPOTAutoShape==m.type||a.kCPOTWebObject==m.type)&&h.isCanvasClicked&&!h.isCanvasClicked(c,!0,function(){a.handleClickExternal(c)}))d();else if(j=f(v),void 0===j){n=!1;break}else return j}else h.vid||d()}if(n){q&&(m=q,o=r,s=z,u=w,h=p);if(m&&m.actionInProgress)return!1;if(m&&!m.iqb){s+=1;m.currentAttempt=s;var Q,J;m.mdi&&(J=a.D[m.mdi]);J&&(Q=J.dn);a.SubmitInteractions(Q,a.QuestionStatusEnum.INCORRECT,
s-1)}Q=a.D[h.mdi].visible;J=-1!=u&&s==u&&Q;j=(-1==u||s<=u)&&Q;l="";m&&b(m)&&(l=o);a.showHideFeedbackCaptionsClickHandler(k[0],J,l,j);m&&(b(m)&&!m.handled)&&(m.handled=-1!=u&&s>=u&&Q)}return!1};a.handleClick=function(c){if(!a.disableInteractions&&(c.preventDefault&&c.preventDefault(),c.stopPropagation&&c.stopPropagation(),!a.handleClickExternal(c))){var b=a("div_Slide").childNodes[0];if(b&&("DIV"==b.nodeName&&"block"==b.style.display)&&(a.getQuestionObjectName&&(b=a.getQuestionObjectName(b.id),(b=
a.D[b])&&"Hotspot"==b.qtp&&a.hotspotQuestionSlideHandler(c)),a.extObjInfo))for(c=0;c<a.extObjInfo.length&&(!a.IsValidObj(a.extObjInfo[c].chcb)||!a.extObjInfo[c].chcb());++c);}};a.showHideElements=function(){a("blockUserInteraction").style.display="none";a.autoplayDiv.style.display="none";a.autoplayDiv.style.visibility="hidden";a.loadedModules.playbar&&(document.getElementById("playbar").style.display="block");var c=document.getElementById("firstSlideSnapshot");c&&(c.style.display="none");a.gesturesDiv&&
(a.gesturesDiv.style.display="none",a.gesturesDiv.parentElement.removeChild(a.gesturesDiv));a("gImage")&&(a("gImage").className="");a("gestureHint")&&(a("gestureHint").style.position="absolute",a("gestureHint").style.backgroundColor="")};a.beginMovie=function(){a.IsRunningInACAP&&a.ACAPPendingJumpToFrame&&(a.movie.jumpToFrame(a.ACAPPendingJumpToFrame),a.ACAPPendingJumpToFrame=null);a.showHideElements();1==cpInfoCurrentFrame&&a.movie.am.play(1,!0);a.movie.play();a.IsRunningInACAP&&(a.ACAPMovieStarted=
!0)};a.InitMedia=function(){a.movie.vdm.mute(!0);a.movie.vdm.deviceSpecificInit();a.movie.vdm.mute(!1);a.movie.am.mute(!0);a.movie.am.deviceSpecificInit();a.movie.am.mute(!1)};a.playMovie=function(){a.movie.play()};a.pauseMovie=function(){a.movie.pause()};a.mouse_click_draw=function(a,b){var d="#000000",e=3;void 0!=b.c&&(d=b.c,e=b.r);a.save();a.fillStyle=d;a.beginPath();a.arc(e,e,e,0,2*Math.PI,!0);a.closePath();a.fill();a.restore();return!0};a.mcd=function(c,b,d,e,f){return a.mouse_click_draw(c,b,
d,e,f)};a.tcd=function(c,b,d,e,f,g,h){if(!(0>=f||0>=g)){c.clearRect(d,e,f,g);c.translate(d,e);var e=b.width,d=b.height,k=e>f,j=d>g,l=k?f:e,m=j?g:d;c.drawImage(b,0,0,Math.ceil(l/2),Math.ceil(m/2),0,0,Math.ceil(l/2),Math.ceil(m/2));c.drawImage(b,Math.floor(e-l/2),0,Math.ceil(l/2),Math.ceil(m/2),Math.floor(f-l/2),0,Math.ceil(l/2),Math.ceil(m/2));c.drawImage(b,0,Math.floor(d-m/2),Math.ceil(l/2),Math.ceil(m/2),0,Math.floor(g-m/2),Math.ceil(l/2),Math.ceil(m/2));c.drawImage(b,Math.floor(e-l/2),Math.floor(d-
m/2),Math.ceil(l/2),Math.ceil(m/2),Math.floor(f-l/2),Math.floor(g-m/2),Math.ceil(l/2),Math.ceil(m/2));c.save();c.shadowColor=a.ConvertRGBToRGBA("#ffffff","1");c.shadowOffsetX=0;c.shadowOffsetY=0;c.shadowBlur=0;c.drawImage(b,0,0,Math.ceil(l/2),Math.ceil(m/2),0,0,Math.ceil(l/2),Math.ceil(m/2));c.drawImage(b,Math.floor(e-l/2),0,Math.ceil(l/2),Math.ceil(m/2),Math.floor(f-l/2),0,Math.ceil(l/2),Math.ceil(m/2));c.drawImage(b,0,Math.floor(d-m/2),Math.ceil(l/2),Math.ceil(m/2),0,Math.floor(g-m/2),Math.ceil(l/
2),Math.ceil(m/2));c.drawImage(b,Math.floor(e-l/2),Math.floor(d-m/2),Math.ceil(l/2),Math.ceil(m/2),Math.floor(f-l/2),Math.floor(g-m/2),Math.ceil(l/2),Math.ceil(m/2));c.fillStyle="rgba("+h[0]+","+h[1]+","+h[2]+","+h[3]+")";h=k?f:e;l=j?g:d;c.fillRect(Math.floor(h/2),Math.floor(l/2),f-h+1,g-l+1);h=3;k=!k?e/2:f/2;j=!j?d/2:g/2;for(l=Math.floor(d-j-1)-1;l<g-j;){m=g-l;m<h&&(h=m);var m=0,n=j-1,o=k,h=j-1+h,o=Math.ceil(o-m),h=Math.ceil(h-n);c.drawImage(b,Math.floor(m),Math.floor(n),o,h,0,l,o,h);m=e-k;o=e;o=
Math.ceil(o-m);c.drawImage(b,Math.floor(m),Math.floor(n),o,h,Math.floor(f-k),l,o,h);h=3>g-l?g-l:3;0>=h&&(h=1);l+=h-1}h=3;for(e=Math.floor(k)-1;e<f-k;)l=f-e,l<h&&(h=l),m=k-1,n=0,o=k-1+h,h=j,o=Math.ceil(o-m),h=Math.ceil(h-n),c.drawImage(b,Math.floor(m),n,o,h,e,0,o,h),n=d-j,h=Math.ceil(j),c.drawImage(b,Math.floor(m),Math.floor(n),o,h,e,Math.floor(g-j),o,h),h=3>f-e?f-e:3,0>=h&&(h=1),e+=h-1;c.restore()}};a.getIntersectionRect=function(a,b){var d=a[0]+a[2],e=a[1]+a[3],f=b[0]+b[2],g=b[1]+b[3],h={l:0,t:0,
w:0,h:0};if(d<b[0]||e<b[1]||a[0]>f||a[1]>g)return h;h.l=a[0]>b[0]?a[0]:b[0];h.t=a[1]>b[1]?a[1]:b[1];h.w=(d<f?d:f)-h.l;h.h=(e<g?e:g)-h.t;return h};a.frameset_mc_draw=function(c,b,d,e,f,g,h){if(""==b||void 0==b)return!0;var k=!1;c.save();var j=a.GetDataForElement(a(f),!0);j.shouldShowDisabledState&&(c.globalAlpha=0.5);var l=a.movie.im.images[b];try{if(l)if(l.complete&&l.nativeImage.complete){a.verbose&&a.log("drawing completed img "+b);if(c.centreImage&&(g||h))if(a.responsive){c.clearRect(-c.width,
-c.height,2*c.width,2*c.height);var m=j.clientWidth,n=j.clientHeight;a.isCaptionItem(j.type)?a.tcd(c,l.nativeImage,-m/2+c.tex,-n/2+c.tey,m,n,j.pixelColor):c.crop?c.drawImage(l.nativeImage,c.crop.x,c.crop.y,m,n,-m/2+c.tex,-n/2+c.tey,m,n):c.drawImage(l.nativeImage,-m/2+c.tex,-n/2+c.tey,m,n)}else c.clearRect(-c.width,-c.height,2*c.width,2*c.height),c.drawImage(l.nativeImage,-l.nativeImage.width/2+c.tex,-l.nativeImage.height/2+c.tey,l.nativeImage.width,l.nativeImage.height);else if(a.responsive)if(a.isCaptionItem(j.type))a.tcd(c,
l.nativeImage,0,0,j.clientWidth,j.clientHeight,j.pixelColor);else if(c.crop){var o=[c.crop.x,c.crop.y,j.clientWidth,j.clientHeight],q=a.getIntersectionRect([0,0,l.nativeImage.width,l.nativeImage.height],o);o[0]=0>c.crop.x?-c.crop.x:0;o[1]=0>c.crop.y?-c.crop.y:0;c.drawImage(l.nativeImage,q.l,q.t,q.w,q.h,o[0],o[1],q.w,q.h)}else if(j.type==a.kCPOTImageBoxItem){var r=a.D[a.D[j.mdi].dn],u=r.imageCanvasWidth,s=r.imageCanvasHeight,w=j.clientWidth,z=j.clientHeight;r.maintainAspectRatio?(g=0!=s?u/s:1,h=0!=
z?w/z:1,h>g&&(u=g*z,s=z),h<g&&(s=w/g,u=w),h==g&&(s=z,u=w),c.drawImage(l.nativeImage,0!=w-u?(w-u)/2:0,0!=z-s?(z-s)/2:0,u,s)):c.drawImage(l.nativeImage,0,0,w,z)}else c.drawImage(l.nativeImage,0,0,j.clientWidth,j.clientHeight);else c.drawImage(l.nativeImage,0,0);k=!0;d?(a.verbose&&a.log("hiding1 "+b),a.hide(d)):e||(a.verbose&&a.log("hiding2 "+b),a._hide(f))}else a.exceptionalLogs&&!a.responsive&&console.log("**** drawing failed. img incomplete "+b);else b&&a.exceptionalLogs&&!a.responsive&&console.log("***** drawing failed. img not found "+
b)}catch(p){console.log("***** drawing failed. img not found "+b)}return k};a.fd=function(c,b,d,e,f,g,h){return a.frameset_mc_draw(c,b,d,e,f,g,h)};a.setMovieLeftTopRightBottom=function(c,b,d,e){if(!a.responsive){var f=a.getProjectContainer();f.style.width=parseFloat(f.style.width)+c+d+"px";f.style.height=parseFloat(f.style.height)+b+e+"px";var g=a.getMainContainer(),h=(a.getInnerWidth()-parseFloat(g.style.width))/2;g.style.left=(0<h?h:0)+"px";g=a.getProject();a.movie.topOffset+=b+parseFloat(f.style.top);
g.style.top=b+"px";g.style.left=parseFloat(g.style.left)+c+"px";a.loadedModules.toc&&a.tocInit(a.D,c,b,d,e);a.updateBorderPosition(a.D);a.adjustWindow()}};a.setCCPosition=function(c){a.movie.cc.style.left=a.project.style.left;a.responsive?a.movie.cc.style.top=a("project").clientHeight-a.movie.cc.clientHeight+"px":a.movie.cc.style.bottom=c+"px"};a.ConvertRGBToRGBA=function(a,b){return a.replace(")"," ,"+(b+"")+")").replace("rgb","rgba")};a.ConvertColorToRGBA=function(a,b){return"rgba("+parseInt(a.substr(1,
2),16)+" ,"+parseInt(a.substr(3,2),16)+" ,"+parseInt(a.substr(5,2),16)+" ,"+b+")"};a.getAngleFromRotateStr=function(a){a=a.replace("rotate(","");return parseFloat(a.replace("deg)",""))};a.applyTransform=function(a,b){a.style.transform=b;a.style.msTransform=b;a.style.MozTransform=b;a.style.WebkitTransform=b;a.style.OTransform=b};a.applyShadow=function(c,b,d){c.style.mozBoxShadow=b;c.style.webkitBoxShadow=b;c.style.boxShadow=b;if(d){var e=b.a*Math.PI/180,d=a.getRoundedValue(b.d*Math.cos(e)),e=a.getRoundedValue(b.d*
Math.sin(e));c.style.textShadow=d+"px "+e+"px "+b.b+"px "+b.c}};a.setFillStrokeStyle=function(c,b,d,e){var f=b.getContext("2d");if(c.gf){if(0==c.gf.t)switch(c.gf.di){case 0:b=f.createLinearGradient(0,b.height/2,b.width,b.height/2);break;case 1:b=f.createLinearGradient(b.width,b.height/2,0,b.height/2);break;case 2:b=f.createLinearGradient(0,0,b.width,b.height);break;case 3:b=f.createLinearGradient(b.width,b.height,0,0);break;case 5:b=f.createLinearGradient(b.width/2,b.height,b.width/2,0);break;case 6:b=
f.createLinearGradient(0,b.height,b.width,b.height);break;case 7:b=f.createLinearGradient(b.width,b.height,0,b.height);break;default:case 4:b=f.createLinearGradient(b.width/2,0,b.width/2,b.height)}else{var g=0;switch(c.gf.di){case 0:b=f.createRadialGradient(b.width/2,b.height/2,0,b.width,b.height/2,b.width/2);break;case 2:g=b.width<b.height?b.width:b.height;b=f.createRadialGradient(0,0,0,g,0,g);break;case 3:b=f.createRadialGradient(b.width/2,0,0,b.width/2,b.height,b.height);break;case 4:g=b.width<
b.height?b.width:b.height;b=f.createRadialGradient(b.width,0,0,b.width,g,g);break;case 5:b=f.createRadialGradient(b.width,b.height/2,0,0,b.height/2,b.width);break;case 6:g=b.width<b.height?b.width:b.height;b=f.createRadialGradient(b.width,b.height,0,b.width-g,b.height-g,g);break;case 7:b=f.createRadialGradient(b.width/2,b.height,0,b.width/2,0,b.height);break;case 8:g=b.width<b.height?b.width:b.height;b=f.createRadialGradient(0,b.height,0,g,b.height,g);break;case 9:b=f.createRadialGradient(0,b.height/
2,0,b.width,b.height/2,b.width);break;default:case 4:b=f.createRadialGradient(b.width/2,b.height/2,0,b.width,b.height,Math.sqrt(b.width*b.width+b.height*b.height))}}for(g=0;g<c.gf.cs.length;++g){var h=c.gf.cs[g],k=a.getRGBA(h.c,h.o);b.addColorStop(h.p/100,k)}d?f.strokeStyle=b:f.fillStyle=b}else d?f.strokeStyle=c.bc:f.fillStyle=c.bc;e||(f.globalAlpha=c.alpha/100)};a.loadjscssfile=function(a,b,d){var e;if("js"==b)e=document.createElement("script"),e.setAttribute("type","text/javascript"),e.setAttribute("src",
a),e.onload=d;else if("css"==b){e=document.createElement("link");e.setAttribute("rel","stylesheet");e.setAttribute("type","text/css");e.setAttribute("href",a);e.onload=d;var f=document.styleSheets.length,g=setInterval(function(){document.styleSheets.length>f&&(clearInterval(g),d())},50)}void 0!=e&&document.getElementsByTagName("head")[0].appendChild(e);return e};a.CPPlayButtonHandle=function(c){var b;c.keyCode?b=c.keyCode:c.which&&(b=c.which);32==b&&a.movie.play()};a.handleVariablesInURLParams=function(){var c=
window.location.toString();if(-1!=c.indexOf("?"))for(var c=c.split("?")[1].split("&"),b=0;b<c.length;++b){var d=c[b];-1!=d.indexOf("=")&&(d=d.split("="),a.vm.setVariableValue(d[0],unescape(d[1]),!1))}};a.getInnerWidth=function(){a.offsetInnerWidth=!window.innerWidth||0==window.innerWidth?640:window.innerWidth;return a.offsetInnerWidth};a.getProjectContainer=function(){a.projectContainer||(a.projectContainer=a("project_container"));return a.projectContainer};a.getMainContainer=function(){a.mainContainer||
(a.mainContainer=a("main_container"));return a.mainContainer};a.getProject=function(){a.project||(a.project=a("project"));return a.project};a.adjustProjectWidth=function(){if(a.responsiveType==a.kCPPMEAutoResponsive)window.innerWidth<a.D.project.w?(a("project_container").style.width="100%",a("project_container").style.left="0px"):(a("project_container").style.width=a.D.project.w+"px",a("project_container").style.left=(window.innerWidth-a.D.project.w)/2+"px");else{var c=window.innerWidth;a.D.project_main.responsiveType!==
a.kCPPMEVR&&a.device==a.DESKTOP&&a.responsiveMaxWidth&&window.innerWidth>a.responsiveMaxWidth?(parseFloat(a("project_container").style.width)!=a.ResponsiveProjWidth&&(a("project_container").style.width=a.ResponsiveProjWidth+"px"),a("project_container").style.left=(c-a.ResponsiveProjWidth)/2+"px"):(a("project_container").style.width="100%",a.inVR&&window.innerWidth<a.D.project.w&&(a("project_container").style.width=a.D.project.w+"px"),a("project_container").style.left="0px")}};a.adjustProjectHeight=
function(c){if(a.responsive&&c){var b=a("playbar").clientHeight;a.PB&&(a.PB.MP&&a.PB.MP.PBP&&a.PB.MP.PBP.showOnHover&&a("playbar").animator)&&(b=0);if(a.shouldDrawSlideInPannableMode(c)){!a.prePSSState&&!a.prePSSState&&(a.prePSSState={projStyleHeight:a("project").style.height,projStyleWidth:a("project").style.width,projStyleOverflow:a("project").style.overflow,docStyleHeight:a("cpDocument").style.height,docStyleWidth:a("cpDocument").style.width,docStyleLeft:a("cpDocument").style.left,docStyleTop:a("cpDocument").style.top,
docStyleOverflow:a("cpDocument").style.overflow,divSlideLeft:a("div_Slide").style.left,divSlideTop:a("div_Slide").style.top,projContainerStyleOverflow:a("project_container").style.overflow,respGestureScaleFactor:a.respGestureScaleFactor});var d=a.D.project.w,e=a.D.project.h;a("project").style.height=e+"px";a("project").style.width=d+"px";a("project").style.overflow="scroll";a("cpDocument").style.width="100%";a("cpDocument").style.height="100%";a("project_container").style.height=e+b+"px";a.respGestureScaleFactor=
1;b=a.getPSSSlidePanRect(c);if(c=a("div_Slide"))if(e=a.D.project.w,d=a.D.project.h,e>window.innerWidth&&(e-=window.innerWidth,e=b.left<e?-b.left:-e,c.style.left=(0<e?0:e)+"px"),d>window.innerHeight)d-=window.innerHeight,b=b.top<d?-b.top:-d,c.style.top=(0<b?0:b)+"px"}else{a.prePSSState&&(a("project").style.height=a.prePSSState.projStyleHeight,a("project").style.width=a.prePSSState.projStyleWidth,a("project").style.overflow=a.prePSSState.projStyleOverflow,a("cpDocument").style.height=a.prePSSState.docStyleHeight,
a("cpDocument").style.width=a.prePSSState.docStyleWidth,a("cpDocument").style.left=a.prePSSState.docStyleLeft,a("cpDocument").style.top=a.prePSSState.docStyleTop,a("cpDocument").style.overflow=a.prePSSState.docStyleOverflow,a("div_Slide").style.left=a.prePSSState.divSlideLeft,a("div_Slide").style.top=a.prePSSState.divSlideTop,a("project_container").style.overflow=a.prePSSState.projContainerStyleOverflow,a.respGestureScaleFactor=a.prePSSState.respGestureScaleFactor,a.prePSSState=void 0);var d=parseFloat(a.D[c.mdi].css[a.getCurrentBreakpointWidth(window.innerWidth)].h),
e=a.D.project.w,f=a.D.project_main.responsiveType===a.kCPPMEVR;(a.responsiveType==a.kCPPMEAutoResponsive||f)&&a.parentWindow.resizeIFrameToHeight&&a.parentWindow.resizeIFrameToHeight(d+b);if(!(f=f&&a.device===a.DESKTOP))c=""!=a.D[c.mdi].css[a.getCurrentBreakpointWidth(window.innerWidth)].FLBDSS?!0:!1,f=c&&(window.innerWidth<e||d>window.innerHeight);f?(a("project_container").style.height=window.innerHeight+"px",a("project").style.height=window.innerHeight+"px",a("main_container").style.height="100%",
a("cpDocument").style.height="100%"):(a("project_container").style.height=d+b+"px",a("project").style.height=d+"px",a("main_container").style.height="100%",a("cpDocument").style.height=Math.max(window.innerHeight,d+b)+"px")}}};a.adjustSkins=function(c){if(a.responsive){void 0==c&&(c=a.ReasonForDrawing.kOrientationChangeOrResize);var b=a("project"),d=a("playbar");a.PB&&a.PB.playbarCreated&&(a.PB.rootObj&&(a.PB.rootObj.layoutPlaybar&&c==a.ReasonForDrawing.kOrientationChangeOrResize)&&a.PB.rootObj.layoutPlaybar(!0,
b.clientWidth),a.responsive&&(c=b.clientHeight+d.clientHeight,d.style.bottom=c<window.innerHeight&&0<b.clientHeight?window.innerHeight-c+"px":"0px",d.style.left=b.style.left,b=d.animator,a.PB&&a.PB.MP&&a.PB.MP.PBP&&a.PB.MP.PBP.showOnHover&&b?(b.resetStartEndValForResponsive(),d.style.bottom="",b.playbarHidden?(d.style.bottom="",d.style.top=a("div_Slide").getBoundingClientRect().bottom+"px"):(d.style.top="",d.style.bottom="0px"),d.style.position="absolute"):d.style.position="fixed",d.style.transform=
"scale(1)"));a.toc&&(a.toc.tocCreated&&a.toc.rootObj)&&a.toc.rootObj.adjustTOC();a.pbHeight=d.clientHeight;if(a.playImage&&(d=lPlayButtonT=0,d=a.project.clientWidth>a.getWindowInnerWidth(window)?(a.getWindowInnerWidth(window)-a.playImage.clientWidth)/2:(a.project.clientWidth-a.playImage.clientWidth)/2,lPlayButtonT=a.project.clientHeight>a.getWindowInnerHeight(window)?(a.getWindowInnerHeight(window)-a.playImage.clientHeight)/2:(a.project.clientHeight-a.playImage.clientHeight)/2,a.playImage.style.left=
d+"px",a.playImage.style.top=lPlayButtonT+"px",1===a.D.pref.hsr||1!==a.D.pref.acc))a.playImage.style.outlineStyle="none";if(a.autoplayImage&&(a.autoplayImage.style.left=(a.project.clientWidth-a.movie.autoplayimagew)/2+"px",a.autoplayImage.style.top=(a.project.clientHeight-a.movie.autoplayimageh)/2+"px",1===a.D.pref.hsr||1!==a.D.pref.acc))a.autoplayImage.style.outlineStyle="none"}};a.getCurrentBreakpointWidth=function(c){var b=a.responsiveWidths.length;if(c<=a.responsiveWidths[0])return a.responsiveWidths[0];
if(c>=a.responsiveWidths[a.responsiveWidths.length-1])return a.responsiveWidths[a.responsiveWidths.length-1];for(var d=0;d<=b-1;++d)if(c<=a.responsiveWidths[d])return a.responsiveWidths[d]};a.getCurrentBreakPointID=function(){var c=a.D.project.breakpointIdToWidthMap,b;for(b in c)if(c[b]==a.ResponsiveProjWidth)return b};a.updateResponsiveGlobals=function(){if(a.responsive&&a.responsiveWidths&&!(0>=a.responsiveWidths.length)){var c=window.innerWidth;a.RespDefaultBptW=a.responsiveWidths[a.responsiveWidths.length-
1];a.ResponsiveProjWidth=a.getCurrentBreakpointWidth(c);void 0==a.responsiveMaxWidth&&(a.responsiveMaxWidth=a.D.project.maxWidth)}};var ra=function(a){var b=a.flexNode,d=b.children;if(b.isSticky){var e={},f;for(f in b)if(b.hasOwnProperty(f))if("object"===typeof b[f]){e[f]={};for(var g in b[f])b[f].hasOwnProperty(g)&&(e[f][g]=b[f][g]);e[f].keepAspectRatio=!1}else e[f]=b[f];e.children=[];e.children.push(b);e.uid=-1*b.uid;b.style.bg_uid=0;a.flexNode=e}if(d)for(a=0;a<d.length;a++)b={flexNode:d[a]},ra(b),
d[a]=b.flexNode},sa=function(a,b,d){var e=!1;if(a){if(a.m_layout.m_ignore||!0===d)a.m_layout.m_size.height=0,a.m_layout.m_size.width=0,a.m_layout.m_rect.m_top=-1024,a.m_layout.m_rect.m_left=-1024,a.m_layout.m_rect.m_bottom=-1024,a.m_layout.m_rect.m_right=-1024,e=!0;A[b.uid]||(A[b.uid]={});A[b.uid].layout=a.m_layout;A[b.uid].origWidth=A[b.uid].layout.m_size.width;A[b.uid].origHeight=A[b.uid].layout.m_size.height;b.style&&b.style.hasOwnProperty("bg_uid")&&(A[b.style.bg_uid]=A[b.uid]);for(d=0;d<a.m_children.length;d++)sa(a.m_children[d],
b.children[d],e)}};a.resetFlexRoot=function(){ba=!1;A={};F=10;S=!1;M=1};a.rescaleFontSizes=function(){if(a.responsiveType==a.kCPPMEAutoResponsive&&S)for(var c=0;c<a.fontMap.length;c++){var b=a.fontMap[c].autoResponsiveOrigFont*M;b<F&&(b=a.fontMap[c].autoResponsiveOrigFont<F?a.fontMap[c].autoResponsiveOrigFont:F);b<a.fontMap[c].currentFontSize&&(a.fontMap[c].style.fontSize=b+"px")}};a.adjustResponsiveItems=function(c){if(a.responsive&&!(a.inVR&&a.device===a.IDEVICE)){void 0==c&&(c=a.ReasonForDrawing.kOrientationChangeOrResize);
var b=a.movie.stage.getCurrentSlideInteractionManager();b&&b.saveResponsiveInteractionState(c);var d=a.ResponsiveProjWidth;a.updateResponsiveGlobals();a.adjustProjectWidth();var e=a.movie.stage.currentSlide,f=a.movie.stage.getSlideIndexForFrame(cpInfoCurrentFrame);e||(e=a.movie.stage.getSlideNameForIndex(f),e=a.D[e]);a.adjustProjectHeight(e);a.projectClientWidth=a("project").clientWidth;a.projectClientHeight=a("project").clientHeight;"ThreeD Slide"==e.st?a.create3DSlideDiv(e,a.movie.stage.getSlideDiv()):
a.setupSlideBGDivAndCanvasInternal(e,a.movie.stage.getSlideDiv());a.adjustSkins(c);window.EventListeners&&(window.EventListeners[a.ITEMDRAWINGCOMPLETEEVENT]=[]);c==a.ReasonForDrawing.kOrientationChangeOrResize&&a.movie.pm.loadSlideAssets(cpInfoCurrentSlideIndex);a.adjustResponsiveCCProps();var e=!0,g;for(g in D){var h=D[g];if(a.responsiveType==a.kCPPMEAutoResponsive){var k=h;Z||(Z=new window.flexEngine);if(k.canvasObj&&k.canvasObj.css&&k.canvasObj.css[a.getCurrentBreakpointWidth(window.innerWidth)]&&
k.canvasObj.css[a.getCurrentBreakpointWidth(window.innerWidth)].FLBDSS){var j=k.canvasObj.css[a.getCurrentBreakpointWidth(window.innerWidth)].FLBDSS,j=","==j[j.length-1]?j.substr(0,j.length-1):j,j=JSON.parse(j),j={flexNode:j};ra(j);j=j.flexNode;ba||(ba=Z.createNode(j),ba=!0);M=1;Z.computeLayout({width:a.getProject().clientWidth,height:Math.min(a.getProject().clientHeight,window.innerHeight-a("playbar").clientHeight)});sa(Z.getRoot(),j);k.slideHasFlexBox=!0}else k.canvasObj&&k.canvasObj.uid&&k.canvasID?
A[k.canvasID]=A[k.canvasObj.uid]:k.canvasObj&&(k.canvasObj.uid&&k.parentDivName)&&(A[k.parentDivName]=A[k.canvasObj.uid]);if(void 0==k.parentObj||0>k.parentObj.bstiid){if(k.states&&0<k.states.length)for(j=0;j<k.states.length;j++)k.canvasObj&&k.canvasObj.uid&&(A[k.states[j].stsi[0]]=A[k.states[0].stsi[0]])}else if(k.states&&0<k.states.length)for(j=0;j<k.states.length;j++)k.canvasObj.uid&&(A[k.states[j].stsi[0]]=A[k.parentObj.bstiid])}h.itemData&&h.itemData.texts&&a.updateVarText(h.element,!0,!0);if(h&&
h.isStarted&&h.drawForResponsive){h.saveState&&h.saveState(d);h.drawForResponsive(!0,a.ReasonForDrawing.kOrientationChangeOrResize);if(k=h.element?a.GetDataForElement(h.element,!0):void 0){j=h.canvasObj?h.canvasObj.css:h.getAttribute("css");if(!j)continue;j=a.getResponsiveCSS(j);if(!j)continue;var l=j.ipiv;if(h.visible){j=a.D[k.dn];!j&&k.actid&&(j=a.D[k.actid]);if(!j)continue;l?(h.type==a.kCPOTVideo&&h.nativeVideo&&(h.nativeVideo.style.display="block"),h.element&&(k=h.element.firstElementChild)&&
"VIDEO"==k.tagName&&!0==this.started&&(!1==this.ended&&!1==this.paused)&&h.play(),j.ia&&a.movie.am.showHideObjectAudio(j.ia,!0),j.iea&&a.movie.am.playPauseEventAudio(j.iea,!0)):(h.type==a.kCPOTVideo&&(h.nativeVideo&&(h.nativeVideo.style.display="none"),h.pause&&h.pause()),j.ia&&a.movie.am.showHideObjectAudio(j.ia,!1),j.iea&&a.movie.am.playPauseEventAudio(j.iea,!1))}}e=e&&h.isDrawn}h.areDimensionsCalculated=!1}d=a.movie.stage.currentSlide;k=!1;if(d){if(k="Question Slide"==d.st)(k=a.getQuestionObject(d.qs))&&
k.adjustCustomObjects&&k.adjustCustomObjects(),k&&k.updateCustomReviewAreaTransforms&&k.updateCustomReviewAreaTransforms();F=d.minFontSizeScaling;S=d.propTxtScaling}a.movie.stage.forEachChild(a.updateVariableTextBounds,!0);cpInfoCurrentFrame&&a.movie.stage.syncMotionToFrame(cpInfoCurrentFrame,!0);if(b){try{for(g in D)if((h=D[g])&&(h.isStarted&&h.drawForResponsive)&&!h.isRegistered)try{b.registerDisplayObject(h.element.id,c)}catch(m){a.verbose&&a.log(m)}}catch(n){a.verbose&&a.log(n)}b.adjustResponsiveInteraction(c)}e||
a.movie.pm.loadSlideAssets(f)}};a.isCurrentSlideThreeDSlide=function(){var c=!1,b=a.movie.stage.currentSlide;b&&"ThreeD Slide"==b.st&&(c=!0);return c};a.getCurrentSlideResponsiveHeight=function(c){if(a.responsive){var b=void 0;!a.movie||!a.movie.stage?(b=a.D.project_main.slides.split(",")[0],b=a.D[b]):(b=a.movie.stage.currentSlide,b||(b=a.movie.stage.getSlideIndexForFrame(cpInfoCurrentFrame),b=a.movie.stage.getSlideNameForIndex(b),b=a.D[b]));c=a.D[b.mdi].css[a.getCorrectBreakpoint(c)];b=a("playbar").clientHeight;
a.PB&&(a.PB.MP&&a.PB.MP.PBP&&a.PB.MP.PBP.showOnHover)&&(b=0);return parseFloat(c.h)+b}};var $=!1,ta=void 0,T=void 0;a.adjustWindow=function(c){a.__adjustWindow(c);if(a.lpp){var c=window.innerWidth,b=window.innerHeight;320<c&&800>c&&c>b&&0<b&&c/b>4/3?$||(a.movie.paused||(a.movie.pause(a.ReasonForPause.BAD_ORIENTATION),a.movie.paused&&(ta=!0)),$=!0,T||(T=document.createElement("div"),T.classList.add("curtain"),document.body.appendChild(T),c=T,c.onclick=c.ondblclick=c.onmousedown=c.onmousemove=c.onmouseup=
c.onmouseover=c.onmouseout=X,c.addEventListener("touchstart",X),c.addEventListener("touchmove",X),c.addEventListener("touchend",X),c=document.createElement("div"),c.classList.add("curtainMsg"),c.innerText=a.lpm,T.appendChild(c)),T.style.display="table"):$&&(ta&&a.movie.play(a.ReasonForPlay.ORIENTATION_OK),T.style.display="none",$=!1)}};a.__adjustWindow=function(c){a.useg&&a.gesturesDiv&&(a.gesturesDiv.style.position=a.responsive||window.innerWidth<a.D.project.w?"fixed":"absolute");if(a.playImage&&
(a.playImage.style.left=a.D.project.w<=a.getWindowInnerWidth(window)||a.shouldScale?(a.D.project.w-116)/2+"px":(a.getWindowInnerWidth(window)-116)/2+"px",a.playImage.style.top=a.D.project.h<=a.getWindowInnerHeight(window)||a.shouldScale?(a.D.project.h-116)/2+"px":(a.getWindowInnerHeight(window)-116)/2+"px",1===a.D.pref.hsr||1!==a.D.pref.acc))a.playImage.style.outlineStyle="none";if(a.autoplayImage&&(a.autoplayImage.style.left=(a.D.project.w-a.movie.autoplayimagew)/2+"px",a.autoplayImage.style.top=
(a.D.project.h-a.movie.autoplayimageh)/2+"px",1===a.D.pref.hsr||1!==a.D.pref.acc))a.autoplayImage.style.outlineStyle="none";var b=a("playbar");if(a.responsive&&a.device!=a.DESKTOP)if(a.movie&&a.movie.stage){var d=a.movie.stage.currentSlide;if(!d)var e=a.movie.stage.getSlideIndexForFrame(cpInfoCurrentFrame),e=a.movie.stage.getSlideNameForIndex(e),d=a.D[e];e=a.getCurrentBreakpointWidth(window.innerWidth);if(d&&(d=a.D[d.mdi]))if(d=d.css)if(e=d[e])e=parseFloat(e.h)+b.clientHeight,b.style.position="fixed",
b.style.bottom=e>=window.innerHeight?"0px":window.innerHeight-e+"px"}else b.style.bottom="0px",b.style.position="fixed";c=c?c.type:c;if("resize"==c){if(a.em.fireEvent("CPWindowResized"),a.device!=a.DESKTOP){if(a.isTextInputInFocus()){if(a.device!=a.IDEVICE){if(e=document.activeElement,c=a.getMainContainer(),c.style.position="absolute",document.body.style.overflow="scroll",e=t=0,a.responsive||(e=parseFloat(c.parentElement.parentElement.style.left),t=parseFloat(c.parentElement.parentElement.style.top),
window.scrollTo(e,t)),a.responsive)b.style.top=a.project.clientHeight+"px",b.style.position="absolute",b.offsetHeight=b.offsetHeight}else if(a.responsive){var f=document.activeElement.onblur;document.activeElement.onblur=function(a){setTimeout("cp.adjustSkins();if(cp.m_gestureHandler){cp.m_gestureHandler.fitMovie();}",500);f&&f(a)}}return}if(a.responsive){b.style.top="";b.style.position="fixed";b.offsetHeight=b.offsetHeight;if(1!=a("div_Slide").scaleFactor)return;setTimeout("window.scrollTo(0,0);cp.fontMap = [];cp.adjustResponsiveItems();cp.rescaleFontSizes();cp.em.fireEvent('CPWindowResizeCompleted');",
500);return}}}else(e=document.activeElement)&&("input"==e.tagName.toLowerCase()&&"text"==e.type||"textarea"==e.tagName.toLowerCase())&&e.blur(),a.em.fireEvent("CPOrientationChanged");window.scrollTo(0,0);if(a.responsive){if(a.fontMap=[],M=1,a.adjustResponsiveItems(),a.rescaleFontSizes(),"resize"==c?a.em.fireEvent("CPWindowResizeCompleted"):a.em.fireEvent("CPOrientationChangeCompleted"),PPTXLib&&PPTXLib.resetAnimationsDueToResizeOrOrientationChange&&(document.getElementById("cpDocument").clientHeight!==
Y.height||document.getElementById("cpDocument").clientWidth!==Y.width))Y.height=document.getElementById("cpDocument").clientHeight,Y.width=document.getElementById("cpDocument").clientWidth,PPTXLib.onresize(),PPTXLib.resetAnimationsDueToResizeOrOrientationChange(),cpInfoCurrentFrame>=a.movie.stage.lastFrame&&(PPTXLib.updateAnimationManager(),PPTXLib.forceRedraw())}else{if(!a.SetScaleAndPosition()){a.getInnerWidth();var b=a.getMainContainer(),e=a.getProjectContainer(),d=a.getProject(),g=(a.offsetInnerWidth-
parseFloat(b.style.width))/2;b.style.left=(0<g?g:0)+"px";a.movie.offset=(0<g?g:0)+(a.movie.m_scaleFactor?a.movie.m_scaleFactor:1)*(parseFloat(d.style.left)+parseFloat(e.style.left))}a.useg&&(a.gesturesDiv&&a.shouldScale&&a.movie&&a.movie.virgin)&&(a.gesturesDiv.style.display="none",setTimeout('cp.gesturesDiv.style.display = "block";',500));a("blockUserInteraction").style.width="100%";a("blockUserInteraction").style.height="100%";"resize"==c?a.em.fireEvent("CPWindowResizeCompleted"):a.em.fireEvent("CPOrientationChangeCompleted")}};
a.getFontShrinkFactor=function(){return M};a.getOffsetPosition=function(c,b){var d={};d.X=c-a.movie.offset;d.Y=b-a.movie.topOffset;return d};a.getScaledPosition=function(c,b){if(a.responsive)return{X:c,Y:b};var d={};if(!a.shouldScale)return a.getOffsetPosition(c,b);var e=(b-a.movie.newMainContainerT)/a.movie.newMainContainerH,f=Math.round(a.movie.oldMainContainerW*((c-a.movie.newMainContainerL)/a.movie.newMainContainerW)),e=Math.round(a.movie.oldMainContainerH*e),g=a.getProjectContainer(),h=a.getProject();
d.X=f-parseFloat(g.style.left)-parseFloat(h.style.left);d.Y=e-parseFloat(g.style.top)-parseFloat(h.style.top);return d};a.SetScaleAndPosition=function(){var c=a.getMainContainer(),b=window,d=b.innerWidth,b=b.innerHeight;a.movie.oldMainContainerW=parseFloat(c.style.width);a.movie.oldMainContainerH=parseFloat(c.style.height);var e=void 0==a.movie.oldMainContainerW||0==a.movie.oldMainContainerW?1:d/a.movie.oldMainContainerW,f=void 0==a.movie.oldMainContainerH||0==a.movie.oldMainContainerH?1:b/a.movie.oldMainContainerH;
a.movie.m_scaleFactor=1;if(!a.shouldScale)return!1;a.movie.m_scaleFactor=e<f?e:f;a.verbose&&(a.log(a.D.project.shc),a.log(a.movie.m_scaleFactor),a.log(a.shouldScale));a.movie.newMainContainerW=Math.round(a.movie.m_scaleFactor*a.movie.oldMainContainerW);a.movie.newMainContainerH=Math.round(a.movie.m_scaleFactor*a.movie.oldMainContainerH);a.movie.oldMainContainerL=parseFloat(c.style.left);a.movie.oldMainContainerT=parseFloat(c.style.top);c.style.webkitTransformOrigin="left top";c.style.MozTransformOrigin=
"left top";c.style.msTransformOrigin="left top";a.movie.newMainContainerL=Math.round(0<(d-a.movie.newMainContainerW)/2?(d-a.movie.newMainContainerW)/2:0);a.movie.newMainContainerT=Math.round(0<(b-a.movie.newMainContainerH)/2?(b-a.movie.newMainContainerH)/2:0);c.style.left=a.movie.newMainContainerL+"px";c.style.top=a.movie.newMainContainerT+"px";a.movie.offset=a.movie.newMainContainerL;a.movie.topOffset=a.movie.newMainContainerT;c.style.webkitTransform="scale("+a.movie.m_scaleFactor+")";c.style.MozTransform=
"scale("+a.movie.m_scaleFactor+")";c.style.msTransform="scale("+a.movie.m_scaleFactor+")";document.body.style.overflow="hidden";c.style.position="fixed";return!0};a.trimStartingAndTrailingSpaces=function(a){var b="",b=a.replace(/^[\s|\t|\n]+/g,"");return b=b.replace(/[\s|\t|\n]+$/g,"")};a.cpJoin=function(a,b){if(a&&!(""==b||void 0==b)&&!(0>=a.length)){for(var d=a[0],e=1;e<a.length;++e)d+=b+a[e];return d}};a.getLeftTopAfterTranslate=function(a){var b=new WebKitCSSMatrix(window.getComputedStyle(a).webkitTransform),
d={};d.L=parseFloat(a.style.left)+b.m41;d.T=parseFloat(a.style.top)+b.m42;return d};a.createAlternativeAccessibleText=function(c,b,d){""!==d?(c.setAttribute("role",d),a.MSIE===a.browser?a.createAccessibilityDiv(c,b):c.setAttribute("aria-label",b)):a.SAFARI===a.browser?c.setAttribute("aria-label",b):a.createAccessibilityDiv(c,b)};a.createAccessibilityDiv=function(c,b){if(0===a.D.pref.acc||""===b)b=" ";var d=a.newElem("p");d.innerHTML=b;var e=a.newElem("div");e.id=c.id+"accStr";c.setAttribute("aria-labelledby",
e.id);e.className="cp-accessibility";e.appendChild(d);c.appendChild(e)};a.getRGBA=function(a,b){return"rgba("+parseInt(a.substring(1,3),16)+" , "+parseInt(a.substring(3,5),16)+" , "+parseInt(a.substring(5,7),16)+" , "+b+" )"};a.IsRunningInConnect=function(){return!document.location||!document.URL||!document.referrer?!1:-1!=document.location.href.indexOf("airspeed")||-1!=document.URL.indexOf("airspeed")||-1!=document.referrer.indexOf("airspeed")};a.isBlockedForLMS=function(){return"undefined"!=typeof a.LMSDriverHolder&&
a.LMSDriverHolder&&a.LMSDriverHolder.blockedForLMS};a.unblockFromLMS=function(){"undefined"!=typeof a.LMSDriverHolder&&a.LMSDriverHolder&&(a.LMSDriverHolder.blockedForLMS=!1);a("blockUserInteraction").style.display="none"};a.closeGesturesHint=function(){a("gestureHint")&&(a.removeGestureEvent(a("gestureHint"),a.GESTURE_EVENT_TYPES.TAP,a.closeGesturesHint),a("gestureHint").style.display="none")};a.showGesturesHint=function(){var c=a("gestureHint");a.useg&&c&&(c.style.display="block",c.style.zIndex=
10,a.registerGestureEvent(c,a.GESTURE_EVENT_TYPES.TAP,a.closeGesturesHint,!0))};a.getStartFrameOfMovie=function(){return a.loadedModules.toc&&a.toc.movieProperties.tocProperties.hasSelfPaced&&-1!=a.toc.tocPersistanceManager.lastVisitedEntry&&a.toc.movieProperties["Slide"+a.toc.rootObj.tocEntries[a.toc.tocPersistanceManager.lastVisitedEntry].link]?a.toc.movieProperties["Slide"+a.toc.rootObj.tocEntries[a.toc.tocPersistanceManager.lastVisitedEntry].link].from:cpInfoCurrentFrame};a.addAndUpdateProjectBackgroundDiv=
function(c){var b=a("proj_bg"),d=a("playbar"),e=a("toc"),f=c.playBarProperties;void 0==b&&(b=a.newElem("div"),b.id="proj_bg",e.parentElement.insertBefore(b,e),b.style.display="none",b.style.cssFloat="left",b.style.position="absolute",b.style.backgroundColor=c.project.prjBgColor);if(f.hasPlayBar&&!a.responsive){if(0==f.position||2==f.position)b.style.width=f.playBarHeight+"px",b.style.height=c.project.h+"px",b.style.top="0px",b.style.left=0==f.position?d.style.left:parseFloat(d.style.left)+c.project.w+
"px";else if(1==f.position||3==f.position)b.style.width=c.project.w+"px",b.style.height=f.playBarHeight+"px",b.style.top=1==f.position?"0px":c.project.h+"px",b.style.left=d.style.left;if(0==f.position&&0==a.lBorderW||1==f.position&&0==a.tBorderW||2==f.position&&0==a.rBorderW||3==f.position&&0==a.bBorderW)b.style.display="block"}};a.updateBorderPosition=function(c,b){var d=a("main_container"),e=document.getElementById("projectBorder"),f=a.getProjectContainer(),g=c.playBarProperties;g.playBarHeight=
void 0!=g.playBarHeight?g.playBarHeight:0;var h=c.borderProperties;if(h)if(!h.hasBorder&&!a.responsive)d.style.left=parseFloat(f.style.left)+"px",d.style.top=parseFloat(f.style.top)+"px",d.style.width=parseFloat(f.style.width)+"px",d.style.height=parseFloat(f.style.height)+"px";else if(a.lBorderW=void 0!=a.lBorderW?a.lBorderW:0,a.tBorderW=void 0!=a.tBorderW?a.tBorderW:0,a.rBorderW=void 0!=a.rBorderW?a.rBorderW:0,a.bBorderW=void 0!=a.bBorderW?a.bBorderW:0,b||a.addAndUpdateProjectBackgroundDiv(c),a.responsive)a.project.style.width=
"auto",a.project.style.height="auto",a.project.style.left=a.lBorderW+"%",a.project.style.right=a.rBorderW+"%",a.project.style.top=a.tBorderW+"%",a.project.style.bottom=a.bBorderW+"%";else{if(b)d.style.left=parseFloat(f.style.left)-a.lBorderW+"px";else if((0==g.position||2==g.position)&&!g.overlay){0==g.position?(g.playBarHeight>a.lBorderW&&(h.w+=g.playBarHeight-a.lBorderW,d.style.width=e.style.width=h.w+"px",a.lBorderW=g.playBarHeight),f.style.left=a.lBorderW-g.playBarHeight+"px"):(g.playBarHeight>
a.rBorderW&&(h.w+=g.playBarHeight-a.rBorderW,d.style.width=e.style.width=h.w+"px",a.rBorderW=g.playBarHeight),f.style.left=a.lBorderW+"px");var k=g&&g.playBarHeight?g.playBarHeight:0,k=0==g.position?k/2:-(k/2);d.style.left=parseFloat(d.style.left)+k+"px"}else f.style.left=a.lBorderW+"px";1!=g.position?(3==g.position&&(g.playBarHeight>a.bBorderW&&!g.overlay)&&(h.h+=g.playBarHeight-a.bBorderW,d.style.height=e.style.height=h.h+"px",a.bBorderW=g.playBarHeight),f.style.top=a.tBorderW+"px"):g.overlay?f.style.top=
a.tBorderW+"px":(g.playBarHeight>a.tBorderW&&(h.h+=g.playBarHeight-a.tBorderW,d.style.height=e.style.height=h.h+"px",a.tBorderW=g.playBarHeight),f.style.top=a.tBorderW-g.playBarHeight+"px")}};a.handleTOCOpenClose=function(){var c=a("toc");c&&c.animator&&(cpCmndTOCVisible?c.animator.hideTOC():c.animator.showTOC())};a.toggleMoviePlayPause=function(){var c="";a.movie.paused?(a.movie.play(a.ReasonForPause.PLAYBAR_ACTION),c="playAnimation"):(a.movie.pause(a.ReasonForPause.PLAYBAR_ACTION),c="pauseAnimation");
a.useg&&a.showGesturesAnim&&a.showGesturesAnim(c)};a.togglePlaybarShowHide=function(){if(cpInfoHasPlaybar){var c=a("playbar");if(c){if(a.movie.playbackController){var b=a.movie.playbackController.GetQuizController();b&&a.movie.stage&&(a.movie.stage.currentSlide&&"Question Slide"==a.movie.stage.currentSlide.st)&&b.GetHidePlaybarInQuiz()}c.animator?(c.animator.showPlaybar(cpInfoCurrentFrame>=a.movie.stage.lastFrame?!0:!1),c.shown=!0):(c.style.display=!c.shown?"block":"none",a.adjustSkins(),c.shown=
!c.shown)}}};a.isTextInputInFocus=function(){var a=document.activeElement;return a&&("input"==a.tagName.toLowerCase()&&"text"==a.type||"textarea"==a.tagName.toLowerCase())};a.adjustResponsiveCCProps=function(){a.responsive&&(a.movie.stage.updateCCProps(),a.movie.stage.audioCCItems&&a.movie.stage.updateAudioCC(),a.movie.stage.videoCCItems&&a.movie.stage.updateVideoCC())};a.markTOCEntryComplete=function(c){(c=a.D[a.movie.stage.getSlideNameForIndex(c)])&&c.tocEntry&&c.tocEntry.setVisited()};a.updateTextBounds=
function(c,b,d,e){if(a.responsive&&c&&d)for(var d=d[a.ResponsiveProjWidth],d=[d.l,d.t,d.w,d.h],e=[e[0],e[1],-(e[0]+e[2]),-(e[1]+e[3])],f=["left","top","width","height"],b=[c.parentElement.clientWidth,c.parentElement.clientHeight,b.clientWidth,b.clientHeight],g=0;4>g;++g){var h=d[g];c.style[f[g]]=-1!=h.indexOf("%")?a.getRoundedValue(parseFloat(h)*b[g]/100)+e[g]+"px":parseFloat(h)+e[g]+"px"}};a.addSpanToFontMap=function(c){if(c&&a.responsiveType==a.kCPPMEAutoResponsive&&S){var c=c.children,b;for(b in c){var d=
c[b];d&&(d.tagName&&"span"==d.tagName.toLowerCase())&&(d.autoResponsiveOrigFont||(d.autoResponsiveOrigFont=parseFloat(d.style.fontSize)||14),a.fontMap.push(d));a.addSpanToFontMap(d)}}};a.applyFontFactor=function(c,b){if(c){var d=c.children,e;for(e in d){var f=d[e];if(f&&f.tagName&&"span"==f.tagName.toLowerCase()){f.autoResponsiveOrigFont||(f.autoResponsiveOrigFont=parseFloat(f.style.fontSize),""===f.style.fontSize&&S&&(f.autoResponsiveOrigFont=parseFloat(f.parentElement.style.fontSize)));var g=f.autoResponsiveOrigFont*
b.value;g<F&&(g=F,b.minFontReached=!0,b.value=F/f.autoResponsiveOrigFont);f.style.fontSize=f.autoResponsiveOrigFont<F?f.autoResponsiveOrigFont+"px":g+"px";f.style.wordWrap="normal";isNaN(f.autoResponsiveOrigFont)||f.setAttribute("origfontsize",f.autoResponsiveOrigFont+"px");f.currentFontSize=g}a.applyFontFactor(f,b)}}};a.adjustFontSizesForVariableText=function(c,b){if(a.responsiveType==a.kCPPMEAutoResponsive){var d={value:1,minFontReached:!1},e=0.01,f=1,g=1,h=0,k=!1;do{a.applyFontFactor(c,d);if(c.scrollHeight<=
b.winH+3&&c.scrollWidth<=b.winW+3)k=!0,e=g=d.value;else{if(d.minFontReached&&!k){g=d.value;break}f=d.value}h++;d.value=(e+f)/2;if(k&&6<h)break;if(10<h){k||(g=d.value);break}}while(1);a.applyFontFactor(c,{value:g,minFontReached:!1});g<M&&(M=g)}};a.adjustFontSizesForVariableTextNonAutoResponsive=function(c,b,d){if(c){var c=c.children,e;for(e in c){var f=c[e];if(f&&f.tagName&&"span"==f.tagName.toLowerCase()){var g=parseFloat(f.style.fontSize),g=Math.floor(a.getInterpolatedFontSize(b,g,d));8>g&&(g=8);
f.style.fontSize=g+"px"}a.adjustFontSizesForVariableTextNonAutoResponsive(f,b,d)}}};a.adjustFontSizesForNonAutoGrowText=function(c,b,d){if(c){var c=c.children,e;for(e in c){var f=c[e];if(f&&f.tagName&&"span"==f.tagName.toLowerCase()){var g=parseFloat(f.style.fontSize),g=Math.floor(a.getAutoscaledFontSize(b,g,d));8>g&&(g=8);f.style.fontSize=g+"px"}a.adjustFontSizesForNonAutoGrowText(f,b,d)}}};a.getAutoscaledFontSize=function(a,b,d){return b*d/a};a.canAddTextExpIcon=function(c,b){var d=!0;if(a.responsiveType!=
a.kCPPMEAutoResponsive)d=!1;else if(!c||!b)d=!1;else if("visible"!=c.style.visibility)d=!1;else if(b&&!0==b.isDD)d=!1;else if(b&&(b.type==a.kCPOTSuccessShapeItem||b.type==a.kCPOTFailureShapeItem||b.type==a.kCPOTHintShapeItem))d=!1;return d};a.IsTextElementCut=function(a,b){var d=a.textContent&&""!=a.textContent;return(a.scrollHeight>a.clientHeight+3||a.scrollWidth>a.clientWidth+3)&&d&&!b?!0:!1};a.IsCutAfterRelaxingContainerDimension=function(c){if("hidden"==c.style.visibility)return!1;for(var b=c.getElementsByTagName("span"),
d=0;d<b.length;d++){for(var e=b[d],f=e.parentElement;f!=c.parentElement;){if(!a.IsChildVisible(f,e)&&("hidden"!=f.style.overflow&&"hidden"!=f.style.overflow,f.style.height=f.scrollHeight+"px",f.style.width=f.scrollWidth+"px",!a.IsChildVisible(f,e)))return!0;f=f.parentElement}if(!a.IsChildVisible(c.parentElement,e))return"hidden"!=c.parentElement.style.overflow&&(c.parentElement.style.overflow="hidden"),!0}return!1};a.IsChildVisible=function(a,b){var d=a.getBoundingClientRect(),e=b.getBoundingClientRect();
return!(e.bottom>d.bottom+5||e.right>d.right+5)};a.showExpandAfterTimeOut=function(c,b){window.requestAnimationFrame(function(){a.showExpandIconForCutElement(c,b)})};a.showExpandIconForCutElement=function(c,b){if(a.IsCutAfterRelaxingContainerDimension(c)){var d=b.id+"_vTxtHandlerHolder",e=a(d);if(e){if(0==parseFloat(e.style.height)||0==parseFloat(e.style.width))e.style.height="100%",e.style.width="100%"}else d=b.id,e=a(d);if(e){parseInt(e.style.height)>b.clientHeight&&(e.style.height=b.clientHeight+
"px");parseInt(e.style.width)&&(e.style.width=b.style.width+"px");var f=b.id+"_expandButtonDiv";(d=document.getElementById(f))||(d=a.newElem("div"));d.id=f;a.fixWebkitScaling(d);d.style.display="block";d.style.position="absolute";d.style.width="30px";d.style.height="30px";d.style.bottom="0px";d.style.right="0px";d.style.visibility="visible";e.appendChild(d);e=document.getElementById(b.id+"_expandIcon");if(!e||void 0==e)e=a.newElem("img"),e.id=b.id+"_expandIcon",e.src=a.movie.im.m_projectImages["assets/htmlimages/expand_icon.png"].nativeImage.src,
e.tabIndex=-1,e.style.position="absolute",e.style.width="30px",e.style.height="30px",e.style.bottom="0px",e.style.right="0px";d.appendChild(e);a.registerGestureEvent(e,a.GESTURE_EVENT_TYPES.TAP,function(c){c.stopPropagation&&c.stopPropagation();if(a.browser==a.MSIE||a.browser==a.MSEDGE&&c.cancelBubble)c.cancelBubble=true;var b=c.currentTarget.id.replace("_expandIcon",""),d=a(b+"_vTxtHolder");if(d&&d.childNodes.length>0)d.childNodes[0].childNodes&&d.childNodes[0].childNodes.length>0&&a.showLightBox(d.childNodes[0].childNodes[0]);
else{b=c.currentTarget.id.replace("_expandIcon","");(d=a(b+"canvasHolder"))||(d=a(b+"mtchicanvasHolder"));d||(d=a(b+"mtchacanvasHolder"));d||(d=a(b+"seqcanvasHolder"));d&&d.childNodes.length>0&&a.showLightBox(d.childNodes[2].childNodes[0])}});d.style.zIndex=1E3}}};a.showOrHideExpandIcon=function(c,b,d){c.style.height=c.clientHeight>a.getProject().clientHeight?a.getProject().clientHeight+"px":c.clientHeight+"px";if(!d&&a.IsCutAfterRelaxingContainerDimension(c))a.showExpandAfterTimeOut(c,b);else if(c=
document.getElementById(b.id+"_expandButtonDiv"))c.style.visibility="hidden"};a.updateVarText=function(c,b,d){if(a.responsive){a:{var e=0,f=0,g=0,h=0,k=0,j="",l="",m=!1,n=null,o=void 0,q=void 0,r=void 0,u=void 0;if(c.id){var s=a.GetDataForElement(c,!0),w=a.D[c.id];if(s){var z=s.vt,p=s.rpvt;if(p){var q=s.mdi,v=w.mdi,y=null,F=null,C=s.type;q&&(y=a.D[q],F=a(v));var M=a.isCaptionItem(C)&&a.D[s.mdi]&&a.D[s.mdi].ip,P=a.kCPOTAutoShape==C||a.kCPOTStageCorrectFeedbackShape==C||a.kCPOTSuccessShapeItem==C||
a.kCPOTStageIncorrectFeedbackShape==C||a.kCPOTFailureShapeItem==C||a.kCPOTHintShapeItem==C||a.kCPOTStagePartialCorrectFeedbackShape==C||a.kCPOTRetryFeedbackShape==C||a.kCPOTIncompleteFeedbackShape==C||a.kCPOTTimeoutFeedbackShape==C||a.kCPOTAnswerFeedbackShape==C,l=a.kCPOTStageAnswerLabel==C||a.kCPOTStageAnswerItem==C||a.kCPOTStageMatchingAnswerEntry==C||a.kCPOTStageMatchingQuestion==C;if(!(a.kCPOTScorableButtonItem==C||a.kCPOTRetakeButton==C||a.kCPOTStageQuestionNextButton==C||a.kCPOTStageQuestionClearButton==
C||a.kCPOTStageQuestionBackButton==C||a.kCPOTStageQuestionReviewModeNextButton==C||a.kCPOTStageQuestionReviewModeBackButton==C||a.kCPOTStageQuestionSubmitButton==C||a.kCPOTScoringReviewButton==C||a.kCPOTScoringContinueButton==C||a.kCPOTSubmitAllButton==C||a.kCPOTResetButton==C||a.kCPOTUndoButton==C||a.kCPOTDDSubmitButton==C||a.kCPOTTextEntryButtonItem==C)||!(void 0!=s.subt&&s.subt==a.kTextButton)){q=a(c.id+"_vTxtHolder");r=a(c.id+"_vTxtHandlerHolder");l&&(q=c.drawingBoard,r=c);var I=[0,0,0,0],L=marginT=
marginR=marginB=0;s.autoGrow=a.autoGrow&&!l;L=s.rplm?s.rplm[a.ResponsiveProjWidth]:0;marginT=s.rptm?s.rptm[a.ResponsiveProjWidth]:0;marginR=s.rprm?s.rprm[a.ResponsiveProjWidth]:0;marginB=s.rpbm?s.rpbm[a.ResponsiveProjWidth]:0;var T=s.rptl?s.rptl[a.ResponsiveProjWidth]:a.TextLayoutEnum.kTLCenter,Z=s.rpta?s.rpta[a.ResponsiveProjWidth]:a.TextAlignmentEnum.kTACenter,z=p[a.ResponsiveProjWidth].vt,Q="";if(z){if(c.drawingBoard&&q){var p=rrm=rtm=rbm=0,J=C==a.kCPOTFillBlankCaption;if(!J||d){var da=y.hl;if(y&&
y.b&&q){var x=null,B=null,l=v+"-vtext",x=a(l),B=a(l+"_Handler"),n=a.movie.stage.getFrameset(c.id);if(q&&!x&&!B){if(y&&(n&&n.isStarted&&1==y.visible&&"visible"==q.style.visible)&&(m=!0),x=a.newElem("div"),x.className="cp-vtxt",x.setAttribute("aria-hidden","true"),x.id=l,F&&(x.style.left=F.style.left),x.style.cssText="word-wrap:break-word;white-space:pre-wrap;overflow:hidden;line-height:90%;",x.style.cssText+="",m||(x.style.visibility="hidden"),n&&n.htmlDependents.push(x),a.movie.stage.addToParentChildMap(c.id,
q.id),a.movie.stage.addToParentChildMap(c.id,l),q.appendChild(x),da||J)if(B=a.newElem("div"),B.className="cp-vtxt",B.id=l+"_Handler",B.style.cssText="word-wrap:break-word;white-space:pre-wrap;overflow:hidden;line-height:90%;",B.style.cssText+="",m||(B.style.visibility="hidden"),a.movie.stage.addToParentChildMap(c.id,r.id),a.movie.stage.addToParentChildMap(c.id,B.id),r.appendChild(B),J&&(a(c.id).style.overflow="visible",B.style.overflow="visible"),F)B.style.left=F.style.left}else{if(!n||!n.isStarted){c=
void 0;break a}o=D[v];if(!o&&(m=w.qdi))o=(u=D[m])?u.answertextCanvasShape:void 0;if(!o){c=void 0;break a}J||(x=a(l));x&&b&&(y&&1==y.visible&&o&&o.isDrawn)&&(x.style.visibility="visible");if(da||J){if((B=document.getElementById(l+"_Handler"))&&b&&y&&1==y.visible)B.style.visibility="visible",da&&(B.style.backgroundColor="#ffffff",B.style.opacity=0);F&&(B.style.left=F.style.left)}x&&(F&&(x.style.left=F.style.left),x.style.width="",x.style.height="");B&&(B.style.width="",B.style.height="");if(P){var ea=
[L+p,marginT+rtm,marginR+rrm,marginB+rbm];x&&a.updateTextBounds(x,o.actualParent,y.tb,ea);B&&a.updateTextBounds(B,o.actualParent,y.tb,ea)}if(I&&!P&&(x&&(x.style.left=I[0]+L+p+"px",x.style.top=I[1]+marginT+rtm+"px",x.style.right=I[2]+marginR+rrm+"px",x.style.bottom=I[3]+marginB+rbm+"px"),B))B.style.left=I[0]+L+p+"px",B.style.top=I[1]+marginT+rtm+"px",B.style.right=I[2]+marginR+rrm+"px",B.style.bottom=I[3]+marginB+rbm+"px"}}try{var H=x?x:B;if(void 0!=s.vars&&void 0!=s.varLens&&void 0!=s.texts){for(var S=
a.ResponsiveProjWidth,Y=s.vars[S],ba=s.varLens[S],ca=s.texts[S],g=Y.length,h=ca.length;!(Q+=ca[f++],e<g&&(j=window[Y[e]],void 0==j&&(j=""),k=ba[e],j.length>k&&(j=j.substr(0,k)),++e,Q+=j),f>=h););x&&!J&&(x.innerHTML=Q,a.responsiveType==a.kCPPMEAutoResponsive&&(a.adjustFontSizesForVariableText(x,{winH:x.clientHeight,winW:x.clientWidth},x.clientWidth),a.rescaleFontSizes()));if(da||J){da&&(z=Q);if(""==B.innerHTML||da&&B.innerHTML!=z)B.innerHTML=z,a.responsiveType==a.kCPPMEAutoResponsive&&(a.adjustFontSizesForVariableText(B,
{winH:B.clientHeight,winW:B.clientWidth},B.clientWidth),a.rescaleFontSizes());var V={captionName:c.id,reason:"updateResponsiveVarText",callbackFn:function(){B.innerHTML=z;if(a.responsiveType==a.kCPPMEAutoResponsive){a.adjustFontSizesForVariableText(B,{winH:B.clientHeight,winW:B.clientWidth},B.clientWidth);a.rescaleFontSizes()}}};a.em.fireEvent("CPInputControlReplacedEvent",V)}}else if(x&&(x.innerHTML!=z&&!J)&&(x.innerHTML=z,a.responsiveType==a.kCPPMEAutoResponsive&&(a.adjustFontSizesForVariableText(x,
{winH:x.clientHeight,winW:x.clientWidth},x.clientWidth),a.rescaleFontSizes())),da||J){if(""==B.innerHTML||da&&B.innerHTML!=z)B.innerHTML=z,a.responsiveType==a.kCPPMEAutoResponsive&&(a.adjustFontSizesForVariableText(x,{winH:B.clientHeight,winW:B.clientWidth},x.clientWidth),a.rescaleFontSizes());V={captionName:c.id,reason:"updateResponsiveVarText",callbackFn:function(){B.innerHTML=z;if(a.responsiveType==a.kCPPMEAutoResponsive){a.adjustFontSizesForVariableText(x,{winH:B.clientHeight,winW:B.clientWidth},
x.clientWidth);a.rescaleFontSizes()}}};a.em.fireEvent("CPInputControlReplacedEvent",V)}d&&a.movie.stage.addHyperLinks({n:c.id,t:C},a(c.id));if(y.sh){b=!M;void 0!=y.fa&&(b=0==y.fa);var X;x&&(X=x.firstChild);var $;B&&($=B.firstChild);X&&X.firstChild&&a.applyShadow(X.firstChild,y.sh,b);$&&$.firstChild&&a.applyShadow($.firstChild,y.sh,b)}var ha=function(c){var b=c.clientWidth;if(J)b=c.parentElement.clientWidth;if(T===a.TextLayoutEnum.kTLBottom){var d=function(a){a.style.lineHeight="normal";if(a.children.length)for(var c=
0;c<a.children.length;c++)d(a.children[c])},c=a.createTempTextElem(b,s,c.innerHTML,void 0);d(c);b=a.GetBoundingClientRectForElem(c,void 0);if(s&&s.type===a.kCPOTFillBlankCaption)c.innerHTML="";return b}return a.createTempTextElemAndGetBoundingRect(b,s,c.innerHTML)},ia=ha(H);if(o){parseFloat(H.style.left);parseFloat(H.style.top);parseFloat(H.style.right);parseFloat(H.style.bottom);var oa=J||o&&o.currentCSS&&o.currentCSS.h&&-1==o.currentCSS.h.indexOf("H%")&&-1==o.currentCSS.h.indexOf("auto");a.responsiveType==
a.kCPPMEAutoResponsive&&(oa=void 0!=o.currentCSS.isflexItem?!1:oa);s.autoGrow=s.autoGrow&&!oa&&!s.isPartOfInteraction;a.addSpanToFontMap(H);a.rescaleFontSizes();if(s.autoGrow){b=!1;if(H&&H.clientHeight<ia.height){s.breakevenWidth||(s.breakevenWidth={});var O=s.breakevenWidth[a.ResponsiveProjWidth],R=o.actualParent.clientWidth-H.clientWidth,fa=o.actualParent.clientHeight-H.clientHeight;if(!O){var la=a.getMaxWHBpt(o.responsiveCSS[a.ResponsiveProjWidth],a.ResponsiveProjWidth).w-R,aa=a.createTempTextElemAndGetBoundingRect(la,
s,H.innerHTML),O={winW:a.getExpectedWindowWidthToFitText(o.currentCSS,aa.width+R,aa.height+fa,H.clientHeight),winH:x.clientHeight,expw:aa.width,hOffsets:R,vOffsets:fa};s.breakevenWidth[a.ResponsiveProjWidth]=O}s.minItemHeight=ia.height+fa;if(a.fluidFont){if(s.mdi&&D[s.mdi]){var G=a.isPartOfFlex(D[s.mdi]);G&&G.origWidth&&(O.winW=G.origWidth-R)}a.responsiveType==a.kCPPMEAutoResponsive&&(O.winH=x.clientHeight);x&&(a.responsiveType==a.kCPPMEAutoResponsive?(a.adjustFontSizesForVariableText(x,O,x.clientWidth),
a.rescaleFontSizes()):a.adjustFontSizesForVariableTextNonAutoResponsive(x,O,x.clientWidth));if(B){var W=B.clientWidth;x&&(W=x.clientWidth);O.winH=B.clientHeight;a.responsiveType==a.kCPPMEAutoResponsive?(a.adjustFontSizesForVariableText(B,O,W),a.rescaleFontSizes()):a.adjustFontSizesForVariableTextNonAutoResponsive(B,O,W)}}a.responsiveType==a.kCPPMEAutoResponsive&&(ia=ha(H));if(H.clientHeight<ia.height){var N=ia.height;N>parseInt(H.parentElement.style.height)&&a.responsiveType==a.kCPPMEAutoResponsive&&
(N=H.parentElement.style.height);s.minItemHeight=N+fa;var ga=a.getMinMaxHeight(o.currentCSS);!isNaN(ga.maxH)&&s.minItemHeight>ga.maxH&&(s.minItemHeight=ga.maxH,N=s.minItemHeight-fa);b=!0;x&&(x.style.height=N+"px");B&&(B.style.height=N+"px")}}if(null!=A[v]&&null!=A[v].layout){if(c.style.height=A[v].layout.m_size.height-marginT-marginB+"px",c.style.width=A[v].layout.m_size.width-L-marginR+"px",c.style.left=A[v].layout.m_rect.m_left+L+"px",c.style.top=A[v].layout.m_rect.m_top+marginT+"px",c.firstChild.style.width=
c.style.width,parseInt(q.style.height)>A[v].layout.m_size.height-marginT-marginB&&(q.style.height=A[v].layout.m_size.height-marginT-marginB+"px"),parseInt(q.style.width)>A[v].layout.m_size.width-L-marginR&&(q.style.width=A[v].layout.m_size.width-L-marginR+"px"),q.parentElement.style.height=A[v].layout.m_size.height+"px",q.parentElement.style.width=A[v].layout.m_size.width+"px",q.parentElement.style.left=A[v].layout.m_rect.m_left+"px",q.parentElement.style.top=A[v].layout.m_rect.m_top+"px",x)if(parseFloat(x.style.height)+
10>parseFloat(q.style.height)&&(x.style.height=parseFloat(q.style.height)-10+"px"),parseFloat(x.style.width)+10>parseFloat(q.style.width))x.style.width=parseFloat(q.style.width)-10+"px"}else{var E;E=v.slice(0,-1);if(A[E]&&x){ea=[L+p,marginT+rtm,marginR+rrm,marginB+rbm];x&&a.updateTextBounds(x,o.actualParent,y.tb,ea);B&&a.updateTextBounds(B,o.actualParent,y.tb,ea);var U,pa;U=x.getBoundingClientRect().bottom;pa=x.parentElement.getBoundingClientRect().bottom;U>pa&&(x.style.height=parseFloat(x.style.height)-
(U-pa)-marginB+"px")}}b&&(u?u.drawForResponsive(!0,a.ReasonForDrawing.kTextGrow):o.drawForResponsive(!0,a.ReasonForDrawing.kTextGrow))}}b=function(c){if(c){var b=x.clientHeight,d;d=a.responsiveType==a.kCPPMEAutoResponsive?ha(H):ia;c.style.width=d.width+"px";c.style.height=d.height+"px";c.style.position="absolute";switch(Z){case a.TextAlignmentEnum.kTARightJustify:c.style.textAlign="right";break;case a.TextAlignmentEnum.kTACenter:c.style.textAlign="center";break;default:c.style.textAlign="left"}switch(T){case a.TextLayoutEnum.kTLBottom:b=
b-d.height;J&&(b=H.parentElement.clientHeight-d.height);c.style.top=(b<0?0:b)+"px";break;case a.TextLayoutEnum.kTLCenter:b=(b-d.height)/2;J&&(b=(H.parentElement.clientHeight-d.height)/2);if(b>0){c.style.bottom="";c.style.top=b+"px"}break;default:c.style.top="0px"}}};x&&b(x.firstChild);B&&(b(B.firstChild),J&&(V={captionName:c.id,reason:"updateResponsiveVarText:textadjust"},a.em.fireEvent("CPInputControlReplacedEvent",V)));if(a.responsiveType==a.kCPPMEAutoResponsive){var K=s.type,ma=a.kCPOTScoringReviewButton==
K||a.kCPOTScoringContinueButton==K||a.kCPOTSubmitAllButton==K||a.kCPOTResetButton==K||a.kCPOTUndoButton==K||a.kCPOTDDSubmitButton==K||a.kCPOTRetakeButton==K||a.kCPOTStageQuestionNextButton==K||a.kCPOTStageQuestionClearButton==K||a.kCPOTStageQuestionBackButton==K||a.kCPOTStageQuestionReviewModeNextButton==K||a.kCPOTStageQuestionReviewModeBackButton==K||a.kCPOTStageQuestionSubmitButton==K||a.kCPOTStageAnswerLabel==K||a.kCPOTStageMatchingAnswerEntry==K;a.canAddTextExpIcon(H,s)&&!ma&&a.showOrHideExpandIcon(H,
c,!1)}}catch(ja){a.log(ja)}}}}else l=v+"-vtext",x=a(l),B=a(l+"_Handler"),(c=a(c.id+"_expandButtonDiv"))&&c.parentElement.removeChild(c),x&&x.parentElement.removeChild(x),B&&x.parentElement.removeChild(B)}}}}c=void 0}return c}O=ea=ma=K=V=0;W=R="";fa=!1;N=null;N=!1;b&&(N=!0);if(c.id&&(b=a.GetDataForElement(c,!0),U=a.D[c.id].mdi,b))if(la=b.vt,aa="",la){if(c.drawingBoard&&(W=b.mdi,G=null,W&&(G=a.D[W]),ga=c.drawingBoard,G&&G.b&&ga)){E=null;W=U+"-vtext";if(2>ga.children.length)void 0!=b.lm&&(L=b.lm,q=b.tm,
e=b.rm,f=b.bm),E=a.newElem("div"),E.className="cp-vtxt",E.id=W,N=a.movie.stage.getFrameset(c.id),G&&(N&&N.isStarted&&1==G.visible)&&(fa=!0),E.style.cssText="word-wrap:break-word;white-space:pre-wrap; width: "+(G.b[2]-G.b[0]-(L+e)+"px")+";height:"+(G.b[3]-G.b[1]-(q+f)+"px")+";line-height:90%;overflow:hidden;",U=""+("margin-left:"+(G.b[0]+L-G.vb[0])+"px;"),U+="margin-top:"+(G.b[1]+q-G.vb[1])+"px;",E.style.cssText+=U,fa||(E.style.visibility="hidden"),G.tr&&a.applyTransform(E,G.tr),G.sh&&a.applyShadow(E,
G.sh),N&&N.htmlDependents.push(E),a.movie.stage.addToParentChildMap(c.id,W),ga.appendChild(E);else if(c=D[U],(E=ga.children[1])&&N&&G&&1==G.visible&&c&&c.isDrawn)E.style.visibility="visible";try{if(void 0!=b.vars&&void 0!=b.varLens&&void 0!=b.texts){o=a.D.project.w;u=b.vars[o];v=b.varLens[o];y=b.texts[o];ma=u.length;for(ea=y.length;!(aa+=y[K++],V<ma&&(R=window[u[V]],void 0==R&&(R=""),O=v[V],R.length>O&&(R=R.substr(0,O)),++V,aa+=R),K>=ea););E.innerHTML=aa}else E.innerHTML=la;a.responsiveType==a.kCPPMEAutoResponsive&&
(a.adjustFontSizesForVariableText(E,{winH:E.clientHeight,winW:E.clientWidth},E.clientWidth),a.rescaleFontSizes())}catch(ka){a.log(ka)}}}else(E=a(U+"-vtext"))&&E.parentElement.removeChild(E)};a.updateVariableTextBounds=function(c,b){var d=c.element;d&&a.updateVarText(d,!0,b)};a.updateNoSkipFramesAndUpdateVarText=function(c){c.element&&(a.responsive||a.updateVarText(c.element,!0));c.pa&&(a.movie.stage.noSkipFrames[c.pa]=c.pa);c.psv&&(a.movie.stage.noSkipFrames[c.psv]=c.psv)};a.RegisterExternalObjects=
function(c,b,d,e){a.IsValidObj(a.extObjInfo)||(a.extObjInfo=[]);for(var f=!1,g=0;g<a.extObjInfo.length;++g)if(a.extObjInfo[g].cb==d){f=!0;break}f||(f={},f.n=c,f.cls=b,f.cb=d,f.chcb=e,a.extObjInfo.push(f))};a.AddNoSkipFrameExternal=function(c){a.movie.stage&&(a.movie.stage.noSkipFrames[c]=c)};a.AddExternalAudioCb=function(c){var b=!1;void 0==a.extAudioCallbacks&&(a.extAudioCallbacks=[]);for(var d=0;d<a.extAudioCallbacks.length;++d)if(a.extAudioCallbacks[d]==c){b=!0;break}b||a.extAudioCallbacks.push(c)};
a.showHideFeedbackCaptionsClickHandler=function(c,b,d,e){d||(d=a.D[c.id].topMostObjectInteractiveObject);return!d?!1:(c=a.D[d])&&void 0!=c.val?!1:a.clickFailureHandler(c,b,e)};a.getLocalisedStateName=function(c){return a.D.project.stateNameToLocalizedStateNameMap[c]};a.doesSupportStates=function(c){var b=!1;if(void 0==c)return b;switch(c){case a.kCPOTScorableButtonItem:case a.kCPOTTextEntryButtonItem:case a.kCPOTDDSubmitButton:case a.kCPOTResetButton:case a.kCPOTUndoButton:case a.kCPOTStageQuestionReviewModeNextButton:case a.kCPOTStageQuestionReviewModeBackButton:case a.kCPOTStageQuestionSubmitButton:case a.kCPOTStageQuestionNextButton:case a.kCPOTStageQuestionClearButton:case a.kCPOTStageQuestionBackButton:case a.kCPOTScoringReviewButton:case a.kCPOTScoringResultItem:case a.kCPOTScoringContinueButton:case a.kCPOTRetakeButton:case a.kCPOTAdvanceNextButton:case a.kCPOTAdvanceReviewButton:case a.kCPOTSubmitAllButton:case a.kCPOTImageBoxItem:case a.kCPOTWebObject:b=
!0}return b};a.shouldRelaxBrowserCheck=function(c){var b=!1;if(void 0==c)return b;switch(c){case a.kCPOTTextEntryButtonItem:case a.kCPOTStageQuestionReviewModeNextButton:case a.kCPOTStageQuestionReviewModeBackButton:case a.kCPOTStageQuestionSubmitButton:case a.kCPOTStageQuestionNextButton:case a.kCPOTStageQuestionClearButton:case a.kCPOTStageQuestionBackButton:case a.kCPOTScoringReviewButton:case a.kCPOTScoringResultItem:case a.kCPOTScoringContinueButton:case a.kCPOTRetakeButton:case a.kCPOTAdvanceNextButton:case a.kCPOTAdvanceReviewButton:case a.kCPOTSubmitAllButton:b=
!0}!0===a.vm.getVariableValue("cpInfoParentRequestToRelaxBrowserCheck")&&(b=!0);return b};a.toggleLMSPreviewDebugLogsColor=function(a){lBackgroundColorArray=["#FFFFFF","#D8D8D8"];a.getBackgroundColorForLogs()==lBackgroundColorArray[0]?a.setBackgroundColorForLogs(lBackgroundColorArray[1]):a.setBackgroundColorForLogs(lBackgroundColorArray[0])};a.isInbuiltState=function(a){a=a.stn;return"RollOver"==a||"Down"==a||"Visited"==a||"DragStart"==a||"DragOver"==a||"DropAccept"==a||"DropReject"==a||"DropCorrect"==
a||"DropIncorrect"==a?!0:!1};a.GetNextOrPreviousState=function(c,b,d){if(!c)return d;c=c.states;switch(b){case 0:if(0>d||d>=c.length)break;for(b=d==c.length-1?0:d+1;b<c.length&&a.isInbuiltState(c[b]);)b++;if(b==c.length)break;return b;case 1:if(0>d||d>=c.length)break;for(b=0==d?c.length-1:d-1;0<=b&&a.isInbuiltState(c[b]);)b--;if(0>b)break;return b}return d};a.GetNextOrPreviousStateOfItemNotPresent=function(c,b,d){var e=-1,c=a.D[c];if(!c)return e;for(var c=c.stl,f=0;f<c.length;++f)if(b===c[f].stn){e=
f;switch(d){case 0:for(b=f==c.length-1?0:f+1;b<c.length&&a.isInbuiltState(c[b]);)b++;if(b==c.length)break;return b;case 1:for(b=0==f?c.length-1:f-1;0<=b&&a.isInbuiltState(c[b]);)b--;if(0>b)break;return b}break}return e};a.setInitialVisibility=function(c){if(c){var b=[],d=!0,e=-1,f=a.D[c.element.id],g;if("undefined"!==c.baseStateItemID&&"undefined"!==c.initialState){if(-1==c.baseStateItemID)b=c.states,f&&f.visible&&(d=f.visible),e=c.currentState;else{var h=a.model.uidToDataMap[c.baseStateItemID];h&&
(g=a.D[h.dn],b=g.stl,d=h.effectiveVi,e=g.stis,g&&g.hasOwnProperty("currentState")&&(g=g.currentState,e=-1!=g?g:e))}if(!(0==b.length||-1==e)){(g=a.GetDataForElement(c.element,!0))&&(f=g);g=!1;if(c.currentState<b.length&&(b=b[e])){b=b.stsi;for(e=0;e<b.length;e++)if(h=b[e],f&&f.uid&&h==f.uid){g=!0;break}}c.visible=g&&d;f&&(f.visible=c.visible)}}}};a.GetMouseOverManager=function(){a.movie.mouseOverManager||(a.movie.mouseOverManager=new a.MouseOverManager);return a.movie.mouseOverManager};a.handleMouseMoveNew=
function(c){var b=a.GetMouseOverManager();b&&b.handleMouseMove(c)};a.initializeDimensions=function(c,b){if(c){var d=!1;""==c.actualParent.style.display&&(d=!0);b&&(c.actualParent.style.display="block",c.element.parentElement.style.display="block",c.drawForResponsive&&c.drawForResponsive(!0));var e=c.element.parentElement.style.transform||c.element.parentElement.style.msTransform||c.element.parentElement.style.MozTransform||c.element.parentElement.style.WebkitTransform||c.element.parentElement.style.OTransform;
a.applyTransform(c.element.parentElement,"");var f=c.element.parentElement.getBoundingClientRect(),g=a.movie.stage.getSlideDiv().getBoundingClientRect(),h={};h.left=f.left-g.left;h.top=f.top-g.top;h.width=f.width;h.height=f.height;c.dimensions=h;c.areDimensionsCalculated=!0;a.applyTransform(c.element.parentElement,e);b&&d&&(c.actualParent.style.visibility="hidden",c.element.parentElement.style.visibility="hidden")}};a.OnSVGObjectLoaded=function(a,b,d){if(a=a.target)if(a=a.contentDocument)if(a=a.getElementsByTagName("svg"))if(a=
a[0])if(0<=d&&void 0!=d&&a.setAttribute("opacity",d/100),a.setAttribute("onmouseup","{ if(window.parent.document.onmouseup) window.parent.document.onmouseup(arguments[0]);}"),d=a.getAttribute("viewBox"),-1!==b&&void 0!=b){var e=a.getBBox(),d=e.x,f=e.y,g=e.width,e=e.height;if(100!=b)var h=g/(b/100),b=e/(b/100),d=d+(g-h)/2,f=f+(e-b)/2,g=h,e=b;a.setAttribute("viewBox",d+" "+f+" "+g+" "+e);a.setAttribute("preserveAspectRatio","none")}else if(void 0==d||0==d.length)b=a.getAttribute("x"),d=a.getAttribute("y"),
f=a.getAttribute("width"),g=a.getAttribute("height"),void 0!=f&&void 0!=g?(void 0==b&&(b=0),void 0==d&&(d=0),d=b+" "+d+" "+f+" "+g):(d=a.getBBox(),d=d.x+" "+d.y+" "+d.width+" "+d.height),a.setAttribute("viewBox",d)};a.initializeVisibilityForGroupedItem=function(c){if(c){var b=c.getAttribute("dn");if((b=a.D[b])&&b.gm){var b=c.parentDivName,d=[],e=a.getDisplayObjByKey(b),f=cpInfoCurrentFrame>a.movie.stage.lastFrame?a.movie.stage.lastFrame:cpInfoCurrentFrame,c=a.isVisible(c);d.push(b);a.movie.stage.getChildrenForParent(b,
d);for(i=0;i<d.length;++i){var g=d[i],b=a.D[g];if(g&&(g=a(g)))if(e&&e.isInRange(f)&&(g.style.visibility=c?"visible":"hidden"),b&&b.type==a.kCPOTWebObject)if(b=g.getElementsByTagName("iframe")[0])b.style.visibility=c?"visible":"hidden"}}}};a.isItemInCurrentState=function(c){var b=a.D[c];if(!b)return!0;b.mdi||(b=a.D[b.dn]);if(!b||!b.mdi)return!0;var b=a.getDisplayObjByKey(b.mdi),d=[],e=-1;if(b){if("undefined"===b.baseStateItemID||"undefined"===b.initialState)return!0;if(-1==b.baseStateItemID)d=b.states,
e=b.currentState;else{var f=b.baseStateItemID,g=a.model.data,h;for(h in g){var k=g[h];if(k&&k.uid&&k.uid==f){d=a.D[k.dn].stl;e=a.D[k.dn].stis;(h=a.D[k.dn])&&h.hasOwnProperty("currentState")&&-1!=h.currentState&&(e=h.currentState);break}}}if(0==d.length||-1==e)return!0;f=!1;if(b.currentState<d.length&&(h=d[e])){d=h.stsi;for(h=0;h<d.length;h++)if(e=d[h],a.D[c]&&b.getAttribute("uid")&&e==b.getAttribute("uid")){f=!0;break}}return f}return!0};a.GetDataForElement=function(c,b){var d={};void 0===b&&(b=!1);
if(!c)return d;var e=a.D[c.id];if(!e)return d;d=e;e=d.sicbs||-1===d.bstiid;if(b){var f=0,g=!1,h=d;d.hasOwnProperty("dn")&&(h=a.D[d.dn],g=!0,h&&(e=h.sicbs||-1===h.bstiid));e&&(h&&h.hasOwnProperty("currentState"))&&(f=h.currentState,0<=f&&(h.hasOwnProperty("stc")&&f<h.stc.length)&&(d=g?a.D[h.stc[f]+"c"]:a.D[h.stc[f]]))}return d};a.isValidItemForStateOptimization=function(c){var b=!1,d=c.t,c=c.n;if(!d||!c)return b;if((c=a.D[c])&&c.isDD)return!1;if(a.kCPOTWebObject==d)(d=a.D[c.mdi])&&d.wosvg&&(b=!0);
else if(a.kCPOTScorableButtonItem==d||a.kCPOTResetButton==d||a.kCPOTUndoButton==d||a.kCPOTDDSubmitButton==d||a.kCPOTStageQuestionClearButton==d||a.kCPOTStageQuestionBackButton==d||a.kCPOTStageQuestionSubmitButton==d||a.kCPOTStageQuestionReviewModeNextButton==d||a.kCPOTStageQuestionNextButton==d||a.kCPOTStageQuestionReviewModeBackButton==d||a.kCPOTSubmitAllButton==d||a.kCPOTScoringReviewButton==d||a.kCPOTScoringContinueButton==d||a.kCPOTScoringResultItem==d||a.kCPOTScoringContinueButton==d||a.kCPOTRetakeButton==
d||a.kCPOTAdvanceNextButton==d||a.kCPOTAdvanceReviewButton==d)b=!0,c.hasOwnProperty("stopt")&&!c.stopt?b=!1:(d=a.D[c.bstin])&&(d.hasOwnProperty("stopt")&&!d.stopt)&&(b=!1);else if(a.kCPOTAutoShape==d||a.kCPOTAnimationItem==d||a.kCPOTCaptionItem==d||a.kCPHighlight==d||a.kCPOTTextEntryButtonItem==d||a.kCPRolloverAreaItem==d||a.kCPOTLineItem==d||a.kCPOTImageBoxItem==d||a.kCPOTWebObject==d)b=!0;return b};a.updateStudentNameVariableFromACAP=function(c){a.IsRunningInACAP&&c.then(function(c){a.vm.setVariableValue("cpQuizInfoStudentName",
c)},function(){a.vm.setVariableValue("cpQuizInfoStudentName","")})};a.GetBoundingClientRectForElem=function(c,b){var d={};if(!c)return d;var e=c.getBoundingClientRect();if(b){var f=a("div_Slide");f&&(f.scaleFactor&&e)&&(f=f.scaleFactor,d.left=e.left/f,d.top=e.top/f,d.width=e.width/f,d.height=e.height/f,d.right=e.right/f,d.bottom=e.bottom/f);Object.freeze(d)}else d=e;return d};a.GetBoundingClientRectForBaseItem=function(c,b,d){var e;void 0===b&&(b=!1);if(c&&0<c.currentState){if(c.baseItemBoundingRect)return c.baseItemBoundingRect;
var f=c.getAttribute("dn"),f=a.D[f],g=a.D[c.element.id];if(g&&f){a.verbose&&a.log("Getting Bounding Rect for item : "+c.actualParent.id);var h=c.currentState,k=c.canvasObj;c.currentState=0;f.currentState=0;c.canvasSwitchReason=a.ReasonForDrawing.kGettingBoundingRectInBaseState;c.canvasObj=g;if(g=c.actualParent)if(e=a.GetBoundingClientRectForElem(g,b),c.tr||c.hasEffect)a.applyTransform(g,""),g.offsetHeight=g.offsetHeight,e=a.GetBoundingClientRectForElem(g,b);b=a.getResponsiveCSS(c.responsiveCSS);c.currentState=
h;f.currentState=h;c.canvasObj=k;delete c.canvasSwitchReason;if(b&&(b.lhID||b.lvID)){var j,l;lCPHLinkedItem=a.getDisplayObjByCP_UID(b.lhID);lCPVLinkedItem=b.lhID==b.lvID?lCPHLinkedItem:a.getDisplayObjByCP_UID(b.lvID);lCPHLinkedItem&&(j=lCPHLinkedItem.isStarted&&lCPHLinkedItem.isDrawnComplete);lCPVLinkedItem&&(l=lCPVLinkedItem.isStarted&&lCPVLinkedItem.isDrawnComplete);j&&delete lCPHLinkedItem.baseItemBoundingRect;l&&delete lCPVLinkedItem.baseItemBoundingRect}}}d===a.ReasonForDrawing.kGettingBoundingRectInBaseState&&
(c.baseItemBoundingRect=e);return e};a.showLightBox=function(c){a.movie.paused||(a.movie.pause(a.ReasonForPause.INTERACTIVE_ITEM),ha=!0);!ca&&c&&(ca=!0,c=c.cloneNode(!0),c.style.position="static",c.style.width="auto",c.style.height="auto",c.style.marginLeft="30px",c.style.marginRight="30px",c.style.marginTop="30px",ka(c,function(a){if(a.getAttribute("origfontsize"))a.style.fontSize=a.getAttribute("origfontsize");a.style.color="#ffffff"}),a("lightBoxDiv").appendChild(c),c=a("lightBoxBackgroundDiv"),
c.style.display="flex",c.style.color="#000000",c.style.opacity="0.9")};a.imageList=[];a.isImageFirstTime=1;a.firtTimeImages=function(){a.isImageFirstTime=0;a.imageList.push("./assets/htmlimages/expand_icon.png");a.imageList.push("./assets/playbar/PlaybarIcons/FastForward.png");a.imageList.push("./assets/playbar/PlaybarIcons/FastForward1.png");a.imageList.push("./assets/playbar/PlaybarIcons/FastForward2.png");a.imageList.push("./assets/playbar/PlaybarIcons/Forward.png");a.imageList.push("./assets/playbar/PlaybarIcons/Backward.png")};
a.hideLightBox=function(){ca=!1;for(var c=a("lightBoxDiv");c.firstChild;)c.removeChild(c.firstChild);a("lightBoxBackgroundDiv").style.display="none";ha&&(a.movie.play(),ha=!1)};a.showImageStackView=function(c){a.isImageFirstTime&&a.firtTimeImages();a("imageStackBackgroundDiv").style.display="flex";void 0==c&&(c=a.imageList);0<c.length&&(a("mainImageDiv").style.backgroundImage="url("+c[0]+")")};a.nextImageStackImage=function(){var c=a("mainImageDiv"),b="";if(c)for(var b=c.style.backgroundImage,d=0;d<
a.imageList.length;d++)if('url("'+a.imageList[d]+'")'==b){c.style.backgroundImage="url("+a.imageList[(d+1)%a.imageList.length]+")";break}};a.previousImageStackImage=function(){var c=a("mainImageDiv"),b="";if(c)for(var b=c.style.backgroundImage,d=0;d<a.imageList.length;d++)if('url("'+a.imageList[d]+'")'==b){c.style.backgroundImage="url("+(0==d?a.imageList[a.imageList.length-1]:a.imageList[d-1])+")";break}};a.hideImageStack=function(){a("imageStackBackgroundDiv").style.display="none";a("mainImageDiv").style.backgroundImage=
""};a.getCSSFromLayouter=function(a,b){if(b){var d;d=null;if(b){var e=b.canvasObj,f=void 0;e&&e.uid&&A[e.uid]?f=A[e.uid].layout:b.itemData&&(b.itemData.uid&&A[b.itemData.uid])&&(f=A[b.itemData.uid].layout);if(f)e=f.m_rect,f=f.m_size,d={},d.l=(e.m_left||0)+"px",d.r=(e.m_right||0)+"px",d.t=(e.m_top||0)+"px",d.b=(e.m_bottom||0)+"px",d.w=(f.width||0)+"px",d.h=(f.height||0)+"px";else if((e=b.canvasObj&&b.canvasObj.flexParentPlcHldUID?b.canvasObj.flexParentPlcHldUID:a.flexParentPlcHldUID)&&A[e]){var f=
A[e].layout.m_rect,e=A[e].layout.m_size,g=a.placeHolderIteml,h=a.placeHolderItemr,k=a.placeHolderItemt,j=a.placeHolderItemb,l=a.placeHolderItemw,m=a.placeHolderItemh;d={stickyItem:!0};d.l=0>g.search("auto")?0>g.search("%")?g+f.m_left:0.01*e.width*parseFloat(g)+f.m_left+"px":g;d.t=0>k.search("auto")?0>k.search("%")?k+f.m_top:0.01*e.height*parseFloat(k)+f.m_top+"px":k;d.r=0>h.search("auto")?0>h.search("%")?h+f.m_left:0.01*e.width*parseFloat(h)+f.m_left+"px":h;d.b=0>j.search("auto")?0>j.search("%")?
j+f.m_top:0.01*e.height*parseFloat(j)+f.m_top+"px":j;d.w=0>l.search("auto")?0>l.search("%")?l:0.01*e.width*parseFloat(l)+"px":l;d.h=0>m.search("auto")?0>m.search("%")?m:0.01*e.height*parseFloat(m)+"px":m;0==e.width&&0==e.height&&(d.w="0px",d.h="0px")}}null!=d?(d.stickyItem?(a.stickyItem=!0,b.stickyItem=d.stickyItem):(b.stickyItem=!1,a.stickyItem=!1),b.isFlexItem=!0,a.isflexItem=!0,a.l=d.l,a.t=d.t,a.r=d.r,a.b=d.b,a.h=d.h,a.w=d.w):(b.isFlexItem=!1,a.stickyItem=!1)}};a.isPartOfFlex=function(a){return A[a.canvasObj.uid]};
a.isSlidePSS=function(a){return a?void 0!=a.pss:!1};a.shouldDrawSlideInPannableMode=function(c){if(!a.isSlidePSS(c))return!1;c=a.D.project.w;return a.D.project.h>window.innerHeight||c>window.innerWidth?!0:!1};a.shouldDrawCurrentSlideInPannableMode=function(){var c;return a.movie.stage&&(c=a.movie.stage.currentSlide)?a.shouldDrawSlideInPannableMode(c):!1};a.getPSSSlidePanRect=function(c){if(!a.isSlidePSS(c))return{left:0,top:0,right:0,bottom:0};c=c.pss;return{left:c.l,top:c.t,right:c.r,bottom:c.b}};
a.createDashPlayer=function(c,b){try{void 0!=Dash&&(source=document.createElement("source"),source.src=b,c.dashMediaPlayer&&(c.dashMediaPlayer.reset(),c.dashMediaPlayer=null),c.dashMediaPlayer=Dash.create(c,source))}catch(d){a.log("error in creating dash player:"+d)}};a.isBrightCoveUrl=function(c){var b=!1,d;for(d in a.ACAPVideoStreamingURLMap)if(a.ACAPVideoStreamingURLMap[d]==c){b=!0;break}return b};a.attachDashPlayerToVideoChannel=function(c,b){c&&"video"===c.tagName.toLowerCase()&&(c.className=
"dashjs-player",c.autoplay=!1,c.cpSrc=b,c.dashPlayer=a.createDashPlayer(c,b))};a.setSrcAndLoadVideoChannel=function(c,b){try{a.IsRunningInACAP&&a.isBrightCoveUrl(b)?a.attachDashPlayerToVideoChannel(c,b):(a.setSrcForVideoChannel(c,b),c.load())}catch(d){console.error("setSrcAndLoadVideoChannel error: "+d)}};a.setSrcForVideoChannel=function(c,b){a.IsRunningInACAP&&a.isBrightCoveUrl(b)?(c.cpSrc=b,a.attachDashPlayerToVideoChannel(c,b)):(c.cpSrc=b,c.src=b)};a.isDashPlayerAttached=function(a){return"dashjs-player"===
a.className};a.playAudioOrVideoChannel_Safari11Workaround=function(a){return a.play()};a.makeAsAccessibleButton=function(a){if(a){var b=a.element,d=a.ariaLabel,e=a.tabIndex||"0",f=a.clickTarget||a.element;b&&(b.setAttribute("tabindex",e),b.setAttribute("role","button"),d&&b.setAttribute("aria-label",d),b.addEventListener("keyup",function(a){a=a.keyCode;if((13==a||32==a)&&f&&"function"==typeof f.onclick)return f.onclick.call(f)}))}};a.autoPlayNeedsUserClick=function(){return!0};a.showNavToggleButton=
function(c){if(!a.navToggleButton){a.navToggleButton=document.createElement("img");a.navToggleButton.id="navToggle";a.navToggleButton.style.position="relative";a.navToggleButton.style.left="16px";a.navToggleButton.style.top="16px";a.navToggleButton.style.zIndex="1000";a.navToggleButton.style.width="52px";a.navToggleButton.style.height="52px";var b=document.getElementById("project_main");b&&a.device==a.DESKTOP?b.appendChild(a.navToggleButton):document.body.appendChild(a.navToggleButton);a.navToggleButton.onclick=
function(){if((a.device==a.IDEVICE||a.device==a.ANDROID||a.inVR)&&a.responsiveType!=a.kCPPMEVR)0==a.gestureEnabled?(a.gestureEnabled=1,a.m_gestureHandler.enableGestures()):(a.gestureEnabled=0,a.m_gestureHandler.disableGestures()),imgSrc=a.gestureEnabled?"assets/htmlimages/360_slide_OFF_Normal.svg":"assets/htmlimages/360_slide_ON_normal.svg",a.navToggleButton.setAttribute("src",imgSrc)}}a.gestureEnabled=!c;imgSrc=a.gestureEnabled?"assets/htmlimages/360_slide_OFF_Normal.svg":"assets/htmlimages/360_slide_ON_normal.svg";
a.navToggleButton.setAttribute("src",imgSrc);a.navToggleButton&&(a.navToggleButton.hidden=!c,a.navToggleButton.style.visibility=c?"visible":"hidden");c?a.m_gestureHandler.disableGestures():a.m_gestureHandler.enableGestures()};a.toggleEnterVR=function(){if(a.IsRunningInACAP){var c={};c.inVR=a.inVR;a.em.fireEvent("CPEnterVR",c)}};a.playVideoChannel=function(c){if(!a.IsRunningInACAP||!a.isBrightCoveUrl(c.cpSrc))a.playAudioOrVideoChannel_Safari11Workaround(c);else{c.shouldRetryPlayIfFails=!0;var b=function(b){if(b.shouldRetryPlayIfFails&&
b.paused)return a.playAudioOrVideoChannel_Safari11Workaround(b);throw"play failed";}.bind(null,c),d=function(a){if(a.shouldRetryPlayIfFails)return"should retry";throw"should not retry";}.bind(null,c);if("undefined"===typeof Promise){c.cpIsPlayErrorCallbackAttached||(c.cpIsPlayErrorCallbackAttached=!0,c.addEventListener("error",function(a){try{4==a.srcElement.error.code&&(a.stopPropagation(),setTimeout(function(){try{b()}catch(a){}},200))}catch(c){}}));try{b()}catch(e){}}else{for(var c=function(){return new Promise(function(a,
b){setTimeout(b.bind(null,"reject"),200)})},f=Promise.reject(),g=0;5>g;g++)f=f["catch"](b)["catch"](d).then(c);f["catch"](function(){})}}};a.pauseVideoChannel=function(a){a.shouldRetryPlayIfFails=!1;a.pause()};a.loadVideoChannel=function(c,b){try{a.IsRunningInACAP&&a.isBrightCoveUrl(b)?a.attachDashPlayerToVideoChannel(c,b):c.load()}catch(d){console.error("loadVideoChannel error: "+d)}};a.addClass=function(a,b){arr=a.className.split(" ");-1==arr.indexOf(b)&&(a.className+=" "+b)};a.removeClass=function(a,
b){var d=a.className.split(" "),e=d.indexOf(b);0<e&&(d=d.splice(e,1),a.className=d.join(" "))};a.isInReviewMode=function(){if(!a.movie||!a.movie.playbackController)return!1;var c=a.movie.playbackController.GetQuizController();return c?c.GetIsInReviewMode():!1};a.verboseLog=function(){a.verbose&&console.log.apply(null,arguments)};a.pauseMovieAndShowPlayIconOverlay=function(c){var b=a("project");a.movie.pause();b||(b=a("main_container"));var d=document.getElementById("__cpYTPlayIconOverlay"),e=document.getElementById("__cpYTPlayIcon");
d||(d=document.createElement("div"));d.id="__cpYTPlayIconOverlay";d.setAttribute("style","position: absolute;display: block; background-color:#000000;opacity:0.9; width: 100%; height: 100%;");e||(e=document.createElement("div"),d.appendChild(e));e.setAttribute("role","button");e.setAttribute("aria-label","play");e.setAttribute("style","position: absolute; display: block; left: 50%; top: 50%; transform: translate(-50%, -50%);");e.setAttribute("class","autoPlayButton");e=function(){if(a.movie.videoPlayUserInteractionCallback){a.movie.videoPlayUserInteractionCallback=
void 0;b.removeChild(d);c()}};d.addEventListener("tap",e);d.addEventListener("click",e);a.movie.videoPlayUserInteractionCallback=e;b.appendChild(d)}})(window.cp);
(function(a){a.UNKNOWN=0;a.WINDOWS=1;a.MACOS=2;a.ANDROIDOS=3;a.DESKTOP=1;a.IDEVICE=2;a.ANDROID=3;a.KINDLE=4;a.IPAD2=1;a.IPAD3=2;a.IPHONE=3;a.IOS1=1;a.IOS2=2;a.IOS3=3;a.IOS4=4;a.IOS5=5;a.IOS6=6;a.IOS7=7;a.IOS8=8;a.MSIE=1;a.FIREFOX=2;a.CHROME=3;a.SAFARI=4;a.NETSCAPE=5;a.OPERA=6;a.CAMINO=7;a.FIREBIRD=8;a.MSEDGE=9;a.MSIE_MIN_SUPPORTED_VERSION=9;a.CHROME_MIN_SUPPORTED_VERSION=17;a.SAFARI_MIN_SUPPORTED_VERSION=5.1;a.FF_MIN_SUPPORTED_VERSION_WIN=22;a.FF_MIN_SUPPORTED_VERSION_MAC=35;a.FF_MIN_SUPPORTED_VERSION_FFOS=
15;a.FF_MIN_SUPPORTED_VERSION_ANDROID=20;a.FF_MIN_SUPPORTED_VERSION=void 0;a.HAVE_NOTHING=0;a.HAVE_METADATA=1;a.HAVE_CURRENT_DATA=2;a.HAVE_FUTURE_DATA=3;a.HAVE_ENOUGH_DATA=4;a.disablePaceMaker=!1;a.verbose=!1;a.poolVerbose=!1;a.exceptionalLogs=!0;a.consolidateLogs=!1;a.dynamicLogControl=!1;a.projectContainer=null;a.project=null;a.playImage=null;a.autoplayImage=null;a.autoplayDiv=null;a.pwdv=null;a.exdv=null;a.preloaderImage=null;a.verbose&&a.log("navigator.userAgent = "+navigator.userAgent);a.OS=
a.UNKNOWN;a.device=a.DESKTOP;a.deviceFlavor=a.UNKNOWN;a.IOSMajor=a.UNKNOWN;a.IOSMinor=a.UNKNOWN;a.IOSBuild=a.UNKNOWN;a.browser=a.UNKNOWN;a.browserVersion=a.UNKNOWN;a.browser_supports_svg=!0;a.kTextButton=0;a.kTransparentButton=2;a.kImageButton=3;a.kCPRolloverCaptionItem=25;a.kCPRolloverImageItem=26;a.kCPOTRolloverAutoShape=617;a.kCPRolloverAreaItem=27;a.kCPOTAnimationItem=28;a.kCPOTCaptionItem=19;a.kCPHighlight=14;a.kCPOTImageBoxItem=15;a.kCPMouse=12;a.kCPMouseClick=15728652;a.kCPOTStageAnswerItem=
80;a.kCPOTIncompleteFeedbackItem=97;a.kCPZoomSource=99;a.kCPOTStageCorrectFeedback=10086;a.kCPOTStageIncorrectFeedback=10087;a.kCPOTStagePartialCorrectFeedback=10139;a.kCPOTTimeoutFeedbackItem=174;a.kCPOTRetryFeedbackItem=81;a.kCPOTStageSingleChoiceMultipleAnswer=10082;a.kCPOTStageMultipleChoiceMultipleAnswer=10081;a.kCPOTStageLikertQuestion=10112;a.kCPOTStageSequenceAnswer=10096;a.kCPOTStageMatchingAnswer=10097;a.kCPOTStageMatchingAnswerEntry=10098;a.kCPOTStageMatchingQuestion=10110;a.kCPOTQuestionColumn=
87;a.kCPOTQuestionFillBlank=10011;a.kCPOTStageShortAnswer=10094;a.kCPOTItemHotSpot=131;a.kCPOTFillBlankCaption=10106;a.kCPOTReviewArea=94;a.kCPOTProgressIndicator=92;a.kCPOTScoringResult=111;a.kCPOTClickBoxItem=13;a.kCPOTScorableButtonItem=177;a.kCPTypingText=64;a.kCPFullMotion=270;a.kCPOTFLVItem=98;a.kCPOTVideo=365;a.kCPOTVideoResource=359;a.kCPOTSuccessCaptionItem=21;a.kCPOTFailureCaptionItem=22;a.kCPOTHintCaptionItem=23;a.kCPOTTextEntryBoxItem=24;a.kCPOTTextEntryButtonItem=75;a.kCPOTRetakeButton=
175;a.kCPOTLineItem=142;a.kCPOTOvalItem=167;a.kCPOTRectangleItem=168;a.kCPOTPolygon=209;a.kCPOTAnswerArea=10142;a.kCPOTMatchingQuestionArea=10143;a.kCPOTMatchingAnswerArea=10144;a.kCPOTLikertHeaderArea=10146;a.kCPOTLikertQuestionArea=10147;a.kCPOTLikertTotalGroupArea=10148;a.kCPOTStageQuestionText=79;a.kCPOTStageQuestionTitle=86;a.kCPOTTitleAutoShape=589;a.kCPOTSubTitleAutoShape=590;a.kCPOTAutoShape=612;a.kCPOTWidgetItem=133;a.kCPOTWebObject=652;a.kCPOTTAItem=76;a.kCPOTStageAnswerLabel=10088;a.kCPOTStageQuestionNextButton=
83;a.kCPOTStageQuestionClearButton=84;a.kCPOTStageQuestionBackButton=85;a.kCPOTStageQuestionSubmitButton=91;a.kCPOTStageQuestionReviewModeNextButton=10180;a.kCPOTStageQuestionReviewModeBackButton=10182;a.kCPOTScoringResultItem=112;a.kCPOTScoringReviewButton=103;a.kCPOTScoringContinueButton=10119;a.kCPOTSubmitAllButton=10149;a.kCPOTResetButton=640;a.kCPOTUndoButton=639;a.kCPOTDDSubmitButton=641;a.kCPOTStageCorrectFeedbackShape=10166;a.kCPOTStageIncorrectFeedbackShape=10168;a.kCPOTStagePartialCorrectFeedbackShape=
10170;a.kCPOTRetryFeedbackShape=10172;a.kCPOTIncompleteFeedbackShape=10174;a.kCPOTAnswerFeedbackShape=10176;a.kCPOTTimeoutFeedbackShape=10178;a.kCPOTSuccessShapeItem=661;a.kCPOTFailureShapeItem=663;a.kCPOTHintShapeItem=665;a.kCPOTFlexBoxBackgroundItem=683;a.kCPOTYTStreamingVideo=688;a.kCPOTVimeoStreamingVideo=699;a.rCSSProps="position left top right bottom width height".split(" ");a.rCPProps="p l t r b w h apr cr rpmm sh".split(" ");a.rCPLinkProps="lhEID lhV lhID lvEID lvV lvID".split(" ");a.rLinkEdges=
["","left","top","right","bottom"];a.rLinkEdge={};a.rLinkEdge.UNKNOWN=0;a.rLinkEdge.LEFT=1;a.rLinkEdge.TOP=2;a.rLinkEdge.RIGHT=3;a.rLinkEdge.BOTTOM=4;a.ReasonForDrawing={};a.ReasonForDrawing.kRegularDraw=0;a.ReasonForDrawing.kOrientationChangeOrResize=1;a.ReasonForDrawing.kTextGrow=2;a.ReasonForDrawing.kMouseEvent=3;a.ReasonForDrawing.kMoviePaused=4;a.ReasonForDrawing.kSlideChanged=5;a.ReasonForDrawing.kLinkedToItemAppeared=6;a.ReasonForDrawing.kItemStateChanged=7;a.ReasonForDrawing.kGettingBoundingRectInBaseState=
8;a.TextAlignmentEnum={};a.TextAlignmentEnum.kTALeftJustify=0;a.TextAlignmentEnum.kTARightJustify=1;a.TextAlignmentEnum.kTACenter=2;a.TextAlignmentEnum.kTAJustified=3;a.TextLayoutEnum={};a.TextLayoutEnum.kTLTop=0;a.TextLayoutEnum.kTLCenter=1;a.TextLayoutEnum.kTLBottom=2;a.ReportingOptionsEnum={};a.ReportingOptionsEnum.breeze=0;a.ReportingOptionsEnum.quiz_only=1;a.ReportingOptionsEnum.quiz_and_views=2;a.ReportingOptionsEnum.views_only=3;a.ReportingOptionsEnum.access=4;a.ReportingOptionsEnum.completion_success=
5;a.ReportingOptionsEnum.incompleteToPassedOrFailed=6;a.ReportingOptionsEnum.completion_only=7;a.SlideViewsTypeEnum={};a.SlideViewsTypeEnum.percent=0;a.SlideViewsTypeEnum.number=1;a.QuizCriteriaEnum={};a.QuizCriteriaEnum.QuizIsPassed=0;a.QuizCriteriaEnum.QuizIsAttempted=1;a.QuizCriteriaEnum.QuizIsPassedOrAttempLimitReached=2;a.kBeginPath=0;a.kMoveTo=1;a.kLineTo=2;a.kBezierTo=3;a.kClosePath=4;a.kNotClosed=5;a.kNoStroke=6;a.kPathFillData=7;a.kPathFillAlpha=8;a.KPathStrokeColor=9;a.KPathStrokeWidth=
10;a.KPathStrokeAlpha=11;a.accOutlineStyleStr="";a.kPPTXSlideImagesStr="pxi";a.kPPTXSlideImagesDir="dr/pptxIm/";a.kTTNone=-1;a.kTTOnEnter=0;a.kTTOnClick=1;a.kTTOnTextEntry=2;a.kTTOnRollover=3;a.kTTOnSuccess=4;a.kTTOnFailure=5;a.kTTOnSlideExit=6;a.kTTOnHyperlink=7;a.kTTOnDropOfType=8;a.kSTTNone=-1;a.kSTTNormal=0;a.kSTTDown=1;a.kSTTRollOver=2;a.kSTTDragOver=3;a.kSTTDragStart=4;a.kSTTDropCorrect=5;a.kSTTDropIncorrect=6;a.kSTTDropAccept=7;a.kSTTDropReject=8;a.kSTTCustom=9;a.kSTTVisited=10;a.QuestionStatusEnum=
{};a.QuestionStatusEnum.INCOMPLETE=0;a.QuestionStatusEnum.INCORRECT=1;a.QuestionStatusEnum.CORRECT=2;a.QuestionStatusEnum.PARTIAL_CORRECT=3;a.mouseStateOver=1;a.mouseStateOut=2;a.mouseStateDown=3;a.mouseStateUp=4;a.mouseStateTouchStart=5;a.mouseStateTouchMove=6;a.mouseStateTouchEnd=7;a.ReasonForPause={};a.ReasonForPause.PLAYBAR_ACTION=0;a.ReasonForPause.INTERACTIVE_ITEM=1;a.ReasonForPause.MOVIE_ENDED=2;a.ReasonForPause.VIDEO_SYNC=3;a.ReasonForPause.FEEDBACK_ITEM=4;a.ReasonForPause.CANNOT_MOVE_AHEAD=
5;a.ReasonForPause.WAIT_FOR_RESOURCES=6;a.ReasonForPause.MOVIE_REWIND_STOP=7;a.ReasonForPause.CPCMNDPAUSE=8;a.ReasonForPause.SHOW_VALUE_AT_FRAME=9;a.ReasonForPause.DONT_CARE_DEPRECATED_CODE=10;a.ReasonForPause.EVENT_VIDEO_PAUSE=11;a.ReasonForPause.ONLY_ONE_MEDIUM_CAN_PLAY=12;a.ReasonForPause.PPTX_PAUSE_FOR_ONCLICK_ANIMATION=13;a.ReasonForPause.CPCMNDGOTOFRAME=14;a.ReasonForPause.BAD_ORIENTATION=15;a.ReasonForPause.WK_EXIT_FULL_SCREEN=16;a.ReasonForPause.ACTION_CHOICE=17;a.ReasonForPlay={};a.ReasonForPlay.PLAYBAR_ACTION=
0;a.ReasonForPlay.INTERNAL=1;a.ReasonForPlay.ORIENTATION_OK=2;a.ReasonForPlay.MOVIE_REWIND=3;a.ReasonForPlay.ACTION_CHOICE=4;a.kCPPMEResponsive=64;a.kCPPMEAutoResponsive=128;a.kCPPMEVR=256;a.CCPosition={};a.CCPosition.TopLeft=0;a.CCPosition.TopCenter=1;a.CCPosition.TopRight=2;a.CCPosition.MiddleLeft=3;a.CCPosition.MiddleCenter=4;a.CCPosition.MiddleRight=5;a.CCPosition.BottomLeft=6;a.CCPosition.BottomCenter=7;a.CCPosition.BottomRight=8;a.CCPosition.Custom=9;a.FeedbackType={SUCCESS:0,FAILURE:1,HINT:2,
OTHER:3};a.FeedbackCloseReason={SHOW_SUCCESS:1,SHOW_FAILURE:2,SHOW_HINT:3,SLIDE_CHANGE:4,OTHER:5};a.lastTouch=(new Date).getTime();-1!=navigator.appVersion.indexOf("Win")?a.OS=a.WINDOWS:-1!=navigator.appVersion.indexOf("Mac")&&(a.OS=a.MACOS);a.multiAudioTrack=!0;a.waitForAudio=!1;a.isTouchMacOS10_15OrMore=!1;if("MacIntel"===navigator.platform&&!window.msstream&&"ontouchstart"in window){var b=navigator.userAgent.match(/(Mac os X .._..)/i);if(b&&b[0]&&(b=b[0].split(" X "))&&1<b.length)b=b[1].split("_"),
1<b.length&&(10<=b[0]&&15<=b[1])&&(a.isTouchMacOS10_15OrMore=!0)}if(navigator.userAgent.match(/(iPhone|iPad)/i)||"MacIntel"===navigator.platform&&1<navigator.maxTouchPoints&&!window.MSStream||a.isTouchMacOS10_15OrMore){a.device=a.IDEVICE;a.browser_supports_svg=!1;a.accOutlineStyleStr="outline-style:none";b=window.devicePixelRatio?window.devicePixelRatio:1;if(-1!=navigator.userAgent.indexOf("iPhone"))a.deviceFlavor=a.IPHONE;else if(-1!=navigator.userAgent.indexOf("iPad")||"MacIntel"===navigator.platform&&
1<navigator.maxTouchPoints&&!window.MSStream)a.deviceFlavor=a.IPAD2,2<=b&&(a.deviceFlavor=a.IPAD3);if(!a.isTouchMacOS10_15OrMore&&((b=navigator.userAgent.match(/OS [1-9][0-9]*_[0-9][0-9]*_[0-9][0-9]*/))||(b=navigator.userAgent.match(/OS [1-9][0-9]*_[0-9][0-9]*/)),b&&b[0]&&(b=b[0].split("_"),a.IOSMajor=parseInt(b[0].substr(2),10),a.IOSMinor=parseInt(b[1],10),3<=b.length&&(a.IOSBuild=parseInt(b[2],10))),a.IOSMajor>=a.IOS5))a.waitForAudio=!0}else navigator.userAgent.match(/android/i)?(a.device=a.ANDROID,
a.OS=a.ANDROIDOS,a.waitForAudio=!0,a.accOutlineStyleStr="outline-style:none"):navigator.userAgent.match(/Silk/i)&&(a.device=a.KINDLE);navigator.userAgent.match(/MSIE/i)?(a.browser=a.MSIE,a.browserVersion=a.getCurrentBrowserVersion(navigator.userAgent,"MSIE")||a.getCurrentBrowserVersion(navigator.appVersion,"MSIE")||a.UNKNOWN):navigator.userAgent.match(/Edge/i)?(a.browser=a.MSEDGE,a.browserVersion=a.getCurrentBrowserVersion(navigator.userAgent,"Edge")||a.getCurrentBrowserVersion(navigator.appVersion,
"Edge")||a.UNKNOWN):navigator.userAgent.match(/Firefox/i)?(a.browser=a.FIREFOX,a.accOutlineStyleStr="outline-style:none",a.OS==a.WINDOWS?a.FF_MIN_SUPPORTED_VERSION=a.FF_MIN_SUPPORTED_VERSION_WIN:a.OS==a.MACOS?a.FF_MIN_SUPPORTED_VERSION=a.FF_MIN_SUPPORTED_VERSION_MAC:a.OS==a.ANDROIDOS&&(a.FF_MIN_SUPPORTED_VERSION=a.FF_MIN_SUPPORTED_VERSION_ANDROID),a.browserVersion=a.getCurrentBrowserVersion(navigator.userAgent,"Firefox")||a.getCurrentBrowserVersion(navigator.appVersion,"Firefox")||a.UNKNOWN):navigator.userAgent.match(/Chrome/i)?
(a.browser=a.CHROME,a.accOutlineStyleStr="outline-style:none",a.browserVersion=a.getCurrentBrowserVersion(navigator.userAgent,"Chrome")||a.getCurrentBrowserVersion(navigator.appVersion,"Chrome")||a.UNKNOWN):navigator.userAgent.match(/Safari/i)?(a.browser=a.SAFARI,a.browser_supports_svg=!1,a.accOutlineStyleStr="outline-style:none",a.browserVersion=a.getCurrentBrowserVersion(navigator.userAgent,"Version")||a.getCurrentBrowserVersion(navigator.appVersion,"Version")||a.UNKNOWN):navigator.userAgent.match(/Netscape/i)?
(a.browser=a.NETSCAPE,a.browserVersion=a.getCurrentBrowserVersion(navigator.userAgent,"Netscape")||a.getCurrentBrowserVersion(navigator.appVersion,"Netscape")||a.UNKNOWN):navigator.userAgent.match(/Opera/i)?(a.browser=a.OPERA,a.browserVersion=a.getCurrentBrowserVersion(navigator.userAgent,"Version")||a.getCurrentBrowserVersion(navigator.appVersion,"Version")||a.UNKNOWN):navigator.userAgent.match(/Camino/i)?(a.browser=a.CAMINO,a.browserVersion=a.getCurrentBrowserVersion(navigator.userAgent,"Camino")||
a.getCurrentBrowserVersion(navigator.appVersion,"Camino")||a.UNKNOWN):navigator.userAgent.match(/Firebird/i)?a.browser=a.FIREBIRD:navigator.userAgent.match(/Trident/i)&&"netscape"==navigator.appName.toLowerCase()&&(a.browser=a.MSIE,a.browserVersion=a.getCurrentBrowserVersion(navigator.userAgent,"rv")||a.UNKNOWN);a.NameBasedConstants={MSI:{stateOf:"state_of_",to:"_to_",statesVisited:"states_completed_"}};a.verbose&&(a.log("browser = "+a.browser),a.log("browserVersion = "+a.browserVersion),a.log("device = "+
a.device),a.device==a.IDEVICE&&(a.log("device flavor = "+a.deviceFlavor),a.log("IOS Version = "+a.IOSMajor+"_"+a.IOSMinor+"_"+a.IOSBuild)),a.log("browser_supports_svg = "+a.browser_supports_svg))})(window.cp);
(function(b){function g(c,a){try{c.id?b.updateVarText(c):c(a)}catch(d){}}function j(c){if("CPVariableValueChangedEvent"==c.cpName){var a=EventListeners[b.VARIABLE_CHANGED_EVENT];d(c,a);for(a=0;a<c.cpData.notify.length;++a)for(var i=c.cpData.notify[a],f=EventListeners[b.SPECIFIC_VARIABLE_CHANGED_EVENT],e=0;e<f.length;++e)if(f[e].n==i){var h=f[e].l;f[e].r&&(c.reciever=f[e].r);g(h,c)}}else"CPVariableCreatedEvent"==c.cpName?(a=EventListeners[b.VARIABLE_CREATED_EVENT],d(c,a)):"CPTime_Update"==c.cpName?
(a=EventListeners[b.TIMEUPDATEEVENT],d(c,a)):"CPSet_ResumeData"==c.cpName?(a=EventListeners[b.SET_RESUMEDATA],d(c,a)):"CPPlaybarStateChanged"==c.cpName?(a=EventListeners[b.PLAYBARSTATECHANGED],d(c,a)):"CPTocStateChanged"==c.cpName?(a=EventListeners[b.TOCSTATECHANGED],d(c,a)):"CPSlideEnter"==c.cpName?(a=EventListeners[b.SLIDEENTEREVENT],d(c,a)):"CPSlideExit"==c.cpName?(a=EventListeners[b.SLIDEEXITEVENT],d(c,a)):"CPInteractiveItemSubmit"==c.cpName?(a=EventListeners[b.INTERACTIVEITEMSUBMITEVENT],d(c,
a)):"CPMoviePause"==c.cpName?(a=EventListeners[b.MOVIEPAUSEEVENT],d(c,a)):"CPMovieResume"==c.cpName?(a=EventListeners[b.MOVIERESUMEEVENT],d(c,a)):"CPMovieStart"==c.cpName?(a=EventListeners[b.MOVIESTARTEVENT],d(c,a)):"CPMovieStop"==c.cpName?(a=EventListeners[b.MOVIESTOPEVENT],d(c,a)):"CPMovieExit"==c.cpName?(a=EventListeners[b.MOVIEEXITEVENT],d(c,a)):"CPQuestionSkip"==c.cpName?(a=EventListeners[b.QUESTIONSKIPEVENT],d(c,a)):"CPQuestionSubmit"==c.cpName?(a=EventListeners[b.QUESTIONSUBMITEVENT],d(c,a)):
"CPStartPlaybarScrubbing"==c.cpName?(a=EventListeners[b.STARTPLAYBARSCRUBBINGEVENT],d(c,a)):"CPEndPlaybarScrubbing"==c.cpName?(a=EventListeners[b.ENDPLAYBARSCRUBBINGEVENT],d(c,a)):"CPMovieFocusIn"==c.cpName?(a=EventListeners[b.MOVIEFOCUSINEVENT],d(c,a)):"CPMovieFocusLost"==c.cpName?(a=EventListeners[b.MOVIEFOCUSLOSTEVENT],d(c,a)):"CPMovieAudioMute"==c.cpName?(a=EventListeners[b.MOVIEAUDIOMUTEEVENT],d(c,a)):"CPInputControlReplacedEvent"==c.cpName?(a=EventListeners[b.INPUTCONTROLREPLACEDEVENT],d(c,
a)):"CPWindowResized"==c.cpName?(a=EventListeners[b.WINDOWRESIZEDEVENT],d(c,a)):"CPWindowResizeCompleted"==c.cpName?(a=EventListeners[b.WINDOWRESIZECOMPLETEDEVENT],d(c,a)):"CPOrientationChanged"==c.cpName?(a=EventListeners[b.ORIENTATIONCHANGEDEVENT],d(c,a)):"CPOrientationChangeCompleted"==c.cpName?(a=EventListeners[b.ORIENTATIONCHANGECOMPLETEDEVENT],d(c,a)):"CPItemDrawingCompleteEvent"==c.cpName?(a=EventListeners[b.ITEMDRAWINGCOMPLETEEVENT],d(c,a)):"CPQuizSlideReached"==c.cpName?(a=EventListeners[b.QUIZSLIDEREACHED],
g(c,a)):"CPMovieActualResume"==c.cpName?(a=EventListeners[b.MOVIEACTUALRESUMEEVENT],d(c,a)):"CPEnterVR"==c.cpName?(a=EventListeners[b.ENTERVR],d(c,a)):"CPNonSmoothFrameAdvance"==c.cpName&&(a=EventListeners[b.NON_SMOOTH_FRAME_ADVANCE_EVENT],d(c,a))}function d(b,a){for(var d=0;d<a.length;++d){var f=a[d];f.r&&(b.reciever=f.r);g(f.l,b)}}b.VARIABLE_CREATED_EVENT=0;b.VARIABLE_CHANGED_EVENT=1;b.SPECIFIC_VARIABLE_CHANGED_EVENT=2;b.SLIDEENTEREVENT=3;b.SLIDEEXITEVENT=4;b.INTERACTIVEITEMSUBMITEVENT=5;b.MOVIEPAUSEEVENT=
6;b.MOVIERESUMEEVENT=7;b.MOVIESTARTEVENT=8;b.MOVIESTOPEVENT=9;b.QUESTIONSKIPEVENT=10;b.QUESTIONSUBMITEVENT=11;b.STARTPLAYBARSCRUBBINGEVENT=12;b.ENDPLAYBARSCRUBBINGEVENT=13;b.MOVIEFOCUSINEVENT=14;b.MOVIEFOCUSLOSTEVENT=15;b.MOVIEAUDIOMUTEEVENT=16;b.INPUTCONTROLREPLACEDEVENT=17;b.WINDOWRESIZEDEVENT=18;b.WINDOWRESIZECOMPLETEDEVENT=19;b.ORIENTATIONCHANGEDEVENT=20;b.ORIENTATIONCHANGECOMPLETEDEVENT=21;b.TIMEUPDATEEVENT=22;b.SET_RESUMEDATA=23;b.PLAYBARSTATECHANGED=24;b.TOCSTATECHANGED=25;b.ITEMDRAWINGCOMPLETEEVENT=
26;b.MOVIEEXITEVENT=27;b.QUIZSLIDEREACHED=28;b.MOVIEACTUALRESUMEEVENT=29;b.ENTERVR=30;b.NON_SMOOTH_FRAME_ADVANCE_EVENT=31;window.EventListeners=[];window.EventListeners[b.VARIABLE_CREATED_EVENT]=[];window.EventListeners[b.VARIABLE_CHANGED_EVENT]=[];window.EventListeners[b.SPECIFIC_VARIABLE_CHANGED_EVENT]=[];window.EventListeners[b.SLIDEENTEREVENT]=[];window.EventListeners[b.SLIDEEXITEVENT]=[];window.EventListeners[b.INTERACTIVEITEMSUBMITEVENT]=[];window.EventListeners[b.MOVIEPAUSEEVENT]=[];window.EventListeners[b.MOVIERESUMEEVENT]=
[];window.EventListeners[b.MOVIESTARTEVENT]=[];window.EventListeners[b.MOVIESTOPEVENT]=[];window.EventListeners[b.QUESTIONSKIPEVENT]=[];window.EventListeners[b.QUESTIONSUBMITEVENT]=[];window.EventListeners[b.STARTPLAYBARSCRUBBINGEVENT]=[];window.EventListeners[b.ENDPLAYBARSCRUBBINGEVENT]=[];window.EventListeners[b.MOVIEFOCUSINEVENT]=[];window.EventListeners[b.MOVIEFOCUSLOSTEVENT]=[];window.EventListeners[b.MOVIEAUDIOMUTEEVENT]=[];window.EventListeners[b.INPUTCONTROLREPLACEDEVENT]=[];window.EventListeners[b.WINDOWRESIZEDEVENT]=
[];window.EventListeners[b.WINDOWRESIZECOMPLETEDEVENT]=[];window.EventListeners[b.ORIENTATIONCHANGEDEVENT]=[];window.EventListeners[b.ORIENTATIONCHANGECOMPLETEDEVENT]=[];window.EventListeners[b.TIMEUPDATEEVENT]=[];window.EventListeners[b.SET_RESUMEDATA]=[];window.EventListeners[b.PLAYBARSTATECHANGED]=[];window.EventListeners[b.TOCSTATECHANGED]=[];window.EventListeners[b.ITEMDRAWINGCOMPLETEEVENT]=[];window.EventListeners[b.MOVIEEXITEVENT]=[];window.EventListeners[b.QUIZSLIDEREACHED]=[];window.EventListeners[b.MOVIEACTUALRESUMEEVENT]=
[];window.EventListeners[b.ENTERVR]=[];window.EventListeners[b.NON_SMOOTH_FRAME_ADVANCE_EVENT]=[];b.EventManager=function(){b.em=this;(!document.createEvent||!document.addEventListener)&&alert("EVENT FIRING WILL NOT WORK");document.addEventListener("propertyChange",j,!1);this.verbose=!1};b.EventManager.prototype={fireEvent:function(b,a){if(document.createEvent){var d=document.createEvent("Events");d.initEvent("propertyChange",!0,!0,null);d.cpName=b;d.cpData=a;window.cpAPIEventEmitter&&(d.Name=b,d.Data=
a,window.cpAPIEventEmitter.trigger(d));return!document.dispatchEvent(d)}},addEventListener:function(c,a,d,f){this.verbose&&b.log("cp.em.addEventListener : "+c+" "+a+" "+d);if(a==b.VARIABLE_CREATED_EVENT||a==b.VARIABLE_CHANGED_EVENT||a==b.SLIDEENTEREVENT||a==b.SLIDEEXITEVENT||a==b.STARTPLAYBARSCRUBBINGEVENT||a==b.INTERACTIVEITEMSUBMITEVENT||a==b.MOVIEPAUSEEVENT||a==b.MOVIERESUMEEVENT||a==b.MOVIESTARTEVENT||a==b.MOVIESTOPEVENT||a==b.MOVIEEXITEVENT||a==b.QUESTIONSKIPEVENT||a==b.QUESTIONSUBMITEVENT||
a==b.MOVIEFOCUSINEVENT||a==b.MOVIEFOCUSLOSTEVENT||a==b.MOVIEAUDIOMUTEEVENT||a==b.ENDPLAYBARSCRUBBINGEVENT||a==b.INPUTCONTROLREPLACEDEVENT||a==b.WINDOWRESIZEDEVENT||a==b.ORIENTATIONCHANGEDEVENT||a==b.WINDOWRESIZECOMPLETEDEVENT||a==b.ORIENTATIONCHANGECOMPLETEDEVENT||a==b.TIMEUPDATEEVENT||a==b.SET_RESUMEDATA||a==b.ITEMDRAWINGCOMPLETEEVENT||a==b.QUIZSLIDEREACHED||a==b.MOVIEACTUALRESUMEEVENT||a==b.ENTERVR||a==b.NON_SMOOTH_FRAME_ADVANCE_EVENT)return a=EventListeners[a],a.push({l:c,r:f}),this.verbose&&b.log(a),
!0;if(a==b.SPECIFIC_VARIABLE_CHANGED_EVENT){for(var a=EventListeners[a],e=!1,h=0;h<a.length;++h){var g=a[h];if(g.l===c&&g.n===d&&g.r===f){e=!0;break}}e||a.push({l:c,n:d,r:f});this.verbose&&b.log(a);return!0}return!1},removeEventListener:function(c,a,d){this.verbose&&b.log("cp.em.removeEventListener : "+c+" "+a+" "+d);var f=!1;if(a==b.VARIABLE_CREATED_EVENT||a==b.VARIABLE_CHANGED_EVENT||a==b.SLIDEENTEREVENT||a==b.SLIDEEXITEVENT||a==b.STARTPLAYBARSCRUBBINGEVENT||a==b.INTERACTIVEITEMSUBMITEVENT||a==
b.MOVIEPAUSEEVENT||a==b.MOVIERESUMEEVENT||a==b.MOVIESTARTEVENT||a==b.MOVIESTOPEVENT||a==b.MOVIEEXITEVENT||a==b.QUESTIONSKIPEVENT||a==b.QUESTIONSUBMITEVENT||a==b.MOVIEFOCUSINEVENT||a==b.MOVIEFOCUSLOSTEVENT||a==b.MOVIEAUDIOMUTEEVENT||a==b.ENDPLAYBARSCRUBBINGEVENT||a==b.INPUTCONTROLREPLACEDEVENT||a==b.WINDOWRESIZEDEVENT||a==b.ORIENTATIONCHANGEDEVENT||a==b.WINDOWRESIZECOMPLETEDEVENT||a==b.ORIENTATIONCHANGECOMPLETEDEVENT||a==b.TIMEUPDATEEVENT||a==b.SET_RESUMEDATA||a==b.ITEMDRAWINGCOMPLETEEVENT||a==b.QUIZSLIDEREACHED||
a==b.NON_SMOOTH_FRAME_ADVANCE_EVENT){a=EventListeners[a];if(void 0!=c.id)for(var e=0;e<a.length;)a[e].l.id==c.id?(a.splice(e,1),f=!0):++e;else for(e=0;e<a.length;)a[e].l==c?(a.splice(e,1),f=!0):++e;f&&this.verbose&&b.log(a)}else if(a==b.SPECIFIC_VARIABLE_CHANGED_EVENT){a=EventListeners[a];if(void 0!=d&&""!=d)if(void 0!=c.id)for(e=0;e<a.length;)a[e].l.id==c.id&&a[e].n==d?(a.splice(e,1),f=!0):++e;else for(e=0;e<a.length;)a[e].l==c&&a[e].n==d?(a.splice(e,1),f=!0):++e;else if(void 0!=c.id)for(e=0;e<a.length;)a[e].l.id==
c.id?(a.splice(e,1),f=!0):++e;else for(e=0;e<a.length;)a[e].l==c?(a.splice(e,1),f=!0):++e;f&&this.verbose&&b.log(a)}return f}}})(window.cp);
(function(b){function Q(){for(var a=b.device!=b.DESKTOP,c="blackberry;symbian;smartphone;windows ce;windows phone;webos".split(";"),d=navigator.userAgent.toLowerCase(),e="other",f=0;f<c.length;++f)-1!=d.indexOf(c[f])&&(a=!0,e=c[f],e=e.split(" ").join("_"));if(a)switch(b.device){case b.IDEVICE:return 1;case b.ANDROID:return 2;default:return e}else return 0}function i(){return vh._CaptivateVersion?vh._CaptivateVersion:""}function R(){return vh._cpCmndVolume}function S(a){var c=a/100;0>c&&(c=0);1<c&&
(c=1);b.movie.am.setVolume(c);b.movie.vdm.setVolume(c);svvi("cpCmndVolume",a,["cpCmndVolume"])}function o(a){b.movie.am.mute(a);b.movie.vdm.mute(a);b.em.fireEvent("CPMovieAudioMute",b.movie.am.muted);svvi("cpCmndMute",a,["cpCmndMute","rdcmndMute"])}function p(){return vh._cpCmndMute}function q(){return vh._cpCmndPlaybarMoved}function r(a){svvi("cpCmndPlaybarMoved",a,["cpCmndPlaybarMoved","rdcmndPlaybarMoved"])}function T(){return vh._cpCmndShowPlaybar}function U(a){var c=void 0;b.movie&&b.movie.playbackController&&
(c=b.movie.playbackController.GetQuizController());c&&(c.m_showPlaybar=a);if(!!a!==!!cpCmndShowPlaybar){c=document.getElementById("playbar");if(void 0!=c){var d=document.getElementById("playbarBkGrnd");d&&(a?(c.style.display="block",d.style.visibility="visible"):(c.style.display="none",d.style.visibility="hidden"));b.responsive||b.PB&&b.PB.playbarCreated&&b.PB.rootObj&&b.PB.rootObj.layoutPlaybar&&b.PB.rootObj.refreshPlaybarButtons();b.adjustSkins()}svvi("cpCmndShowPlaybar",a,["cpCmndShowPlaybar"]);
b.em.fireEvent("CPPlaybarStateChanged",{visible:!!a,locked:!1})}}function s(){return vh._cpCmndCC}function V(a){b.CCInfo&&!b.CCInfo.selfTriggeredVisibilityChange&&(b.CCInfo.isUserVisibilityIntentSet=!0,b.CCInfo.userVisibilityIntent=a?!0:!1);a?(b.movie.cc.style.visibility="","auto"!=b.movie.cc.style.pointerEvents&&(b.movie.cc.style.pointerEvents="auto")):b.movie.cc.style.visibility="hidden";svvi("cpCmndCC",a,["cpCmndCC","rdcmndCC"])}function t(){return vh._cpCmndRewindAndPlay}function u(a){a&&b.movie.rewind();
svvi("cpCmndRewindAndPlay",a,["cpCmndRewindAndPlay","rdcmndRewindAndPlay"])}function v(){return vh._cpCmndRewindAndStop}function w(a){a&&(b.movie.jumpToFrame(1),b.movie.pause(b.ReasonForPause.MOVIE_REWIND_STOP));svvi("cpCmndRewindAndStop",a,["cpCmndRewindAndStop","rdcmndRewindAndStop"])}function j(){return vh._cpCmndPreviousSlide}function k(a){a&&b.jumpToPreviousSlide();svvi("cpCmndPreviousSlide",a,["cpCmndPreviousSlide","cpCmndPrevious","rdcmndPreviousSlide","rdcmndPrevious"])}function W(a){if(a&&
b.movie){var c=-1,d=!1;if(b.movie.playbackController){var e=b.movie.playbackController.GetQuizController(),d=e&&e.GetIsInReviewMode(),f=!1;b.responsiveType===b.kCPPMEVR&&(f=!0);d&&(c=e.GetPreviousQuestionSlideNumber(f))}d&&0<=c?cpCmndGotoSlideAndResume=c:cpCmndPreviousSlide=a}}function x(){return!b.movie.paused}function y(a){a&&b.movie.play();svvi("cpCmndResume",a,["cpCmndResume","rdcmndResume"])}function X(a){if(a&&b.movie){var c=-1,d=!1;if(b.movie.playbackController){var e=b.movie.playbackController.GetQuizController(),
d=e&&e.GetIsInReviewMode(),f=!1;b.responsiveType===b.kCPPMEVR&&(f=!0);d&&(c=e.GetNextQuestionSlideNumber(!1,f))}d&&0<=c?cpCmndGotoSlideAndResume=c:cpCmndNextSlide=a}}function z(a){var c=!b.movie.paused;b.movie.pause(b.ReasonForPause.CPCMNDGOTOFRAME);b.movie.jumpToFrame(a)?svvi("",a,["cpCmndGotoFrame","rdcmndGotoFrame"]):c&&b.movie.play()}function A(a){var c=a,a=b.movie.stage.getSlideIndexForFrame(a);if(b.movie.stage.is360QSlideIndex(a)){var c=b.movie.stage.getSlideNameForIndex(a),d=b.D[c],c=b.movie.stage.getFrameOf360QSlide(a);
b.ThreeDQuestionHelper.setActiveQSlideIndex(a);d&&b.ThreeDQuestionHelper.setActiveHotspot(d.phtsptname)}else b.movie.stage.isThreeDSlideIndex(a)&&b.ThreeDQuestionHelper&&b.ThreeDQuestionHelper.set360QuizMode(!1);b.movie.jumpToFrame(c);b.movie.play();svvi("",c,["cpCmndGotoFrameAndResume","rdcmndGotoFrameAndResume"])}function B(a){if((0>a||a>=b.movie.stage.slides.length)&&!b.movie.stage.hasOverlaySlide())cpCmndResume=!0;else{var c=b.movie.stage.getSlideNameForIndex(a);(c=b.D[c])&&b.movie.jumpToFrame(c.from);
svvi("",a,["cpCmndGotoSlide","rdcmndGotoSlide"])}}function Y(a){var c=b.movie.speed;switch(b.movie.speed){case 1:case 2:b.movie.speed*=2;break;default:b.movie.speed=1}c!=b.movie.speed&&(b.movie.resetFPS(),1==b.movie.speed?(b.movie.am.seekTo(cpInfoCurrentFrame),b.movie.vdm.seekTo(cpInfoCurrentFrame,!1)):b.movie.am.pause(b.ReasonForPause.PLAYBAR_ACTION),0!=g&&(0!=g&&(clearInterval(g),g=0),C()),svvi("",cpInfoFPS,["cpInfoFPS","rdinfoFPS"]),svvi("cpCmndFastForward",a,["cpCmndFastForward"]))}function Z(a){svvi("cpLockTOC",
a,["cpLockTOC"]);b.em.fireEvent("CPTocStateChanged",{visible:!!cpCmndTOCVisible,locked:!!a})}function $(){return vh._cpLockTOC}function aa(a){var c=document.getElementById("toc");void 0!=c&&b.D.tocProperties.overlay&&(c.animator&&(a?c.animator.showTOC():c.animator.hideTOC()),b.IsRunningInACAP&&(b.ACAPTOCVisibility=a),svvi("cpCmndTOCVisible",a,["cpCmndTOCVisible"]),b.IsRunningInACAP||b.em.fireEvent("CPTocStateChanged",{visible:!!a,locked:!!cpLockTOC}))}function ba(){var a=document.getElementById("toc");
return void 0!=a&&a.animator?a.animator.isVisible():b.IsRunningInACAP&&void 0!=b.ACAPTOCVisibility?b.ACAPTOCVisibility:!1}function ca(a){var c=-1;if(b.movie.stage.isOverlaySlideIndex(a)&&(c=b.movie.stage.getFrameOfOverlaySlide(a))){b.movie.jumpToFrame(c);b.movie.play();svvi("",a,["cpCmndGotoSlideAndResume"]);return}b.movie.stage.isThreeDSlideIndex(a)&&b.ThreeDQuestionHelper&&b.ThreeDQuestionHelper.set360QuizMode(!1);if((0>a||a>=b.movie.stage.slides.length)&&!b.movie.stage.hasOverlaySlide())cpCmndResume=
!0;else{var d=b.movie.stage.getSlideNameForIndex(a),d=b.D[d];b.movie.stage.is360QSlideIndex(a)?(c=b.movie.stage.getFrameOf360QSlide(a),b.ThreeDQuestionHelper.setActiveQSlideIndex(a),b.isInReviewMode()&&d&&b.ThreeDQuestionHelper.setActiveHotspot(d.phtsptname)):d&&(c=d.from);b.movie.jumpToFrame(c);b.movie.play();svvi("",a,["cpCmndGotoSlideAndResume"])}}function da(a){var c="Slide"+a,d=b.D[c];if(d){var e=d.from,c=b.movie.stage.getSlideIndexForName(c);d.iols?e=b.movie.stage.getFrameOfOverlaySlide(c):
d.i360qs&&(e=b.movie.stage.getFrameOf360QSlide(c),b.ThreeDQuestionHelper.setActiveQSlideIndex(c),b.isInReviewMode()&&d&&b.ThreeDQuestionHelper.setActiveHotspot(d.phtsptname));b.movie.stage.isThreeDSlideIndex(c)&&b.ThreeDQuestionHelper&&b.ThreeDQuestionHelper.set360QuizMode(!1);b.movie.jumpToFrame(e);b.movie.play();svvi("",a,["cpCmndGotoSlideByUIDAndResume"])}}function D(){return vh._cpCmndExit}function E(a){svvi("cpCmndExit",a,["cpCmndExit","rdcmndExit"]);DoCPExit&&DoCPExit()}function l(a){a&&b.jumpToNextSlide();
svvi("cpCmndNextSlide",a,["cpCmndNextSlide","cpCmndNext","rdcmndNextSlide","rdcmndNext"])}function F(a){a&&b.movie.pause(b.ReasonForPause.CPCMNDPAUSE);svvi("cpCmndPause",a,["cpCmndPause","rdcmndPause"])}function G(){return b.movie.paused}function H(a){svvi("cpCmndInfo",a,["cpCmndInfo","rdcmndInfo"])}function I(){return vh._cpCmndInfo}function ea(){return vh._cpInfoAuthor}function fa(){return vh._cpInfoDescription}function ga(){return vh._cpQuizInfoLastSlidePointScored}function ha(a){svvi("cpQuizInfoLastSlidePointScored",
a,["cpQuizInfoLastSlidePointScored"])}function ia(){return vh._cpQuizInfoPointsPerQuestionSlide}function ja(a){svvi("cpQuizInfoPointsPerQuestionSlide",a,["cpQuizInfoPointsPerQuestionSlide"])}function ka(){return vh._cpQuizInfoNegativePointsOnCurrentQuestionSlide}function la(a){svvi("cpQuizInfoNegativePointsOnCurrentQuestionSlide",a,["cpQuizInfoNegativePointsOnCurrentQuestionSlide"])}function ma(){return!!vh._cpQuizInfoQuestionPartialScoreOn}function na(a){svvi("cpQuizInfoQuestionPartialScoreOn",a,
["cpQuizInfoQuestionPartialScoreOn"])}function oa(){return vh._cpInfoCurrentSlideLabel}function pa(a){svvi("cpInfoCurrentSlideLabel",a,["cpInfoCurrentSlideLabel"])}function qa(){return vh._cpQuizInfoQuizPassPercent}function ra(a){svvi("cpQuizInfoQuizPassPercent",a,["cpQuizInfoQuizPassPercent"])}function sa(){return vh._cpQuizInfoTotalProjectPoints}function ta(a){svvi("cpQuizInfoTotalProjectPoints",a,["cpQuizInfoTotalProjectPoints"])}function ua(){return vh._cpInfoPrevSlide}function va(a){svvi("cpInfoPrevSlide",
a,["cpInfoPrevSlide"])}function wa(){if(!b.movie)return 0;if(b.movie.playbackController){var a=b.movie.playbackController.GetQuizController();if(a)return a.GetTotalCorrectQuestions()}return 0}function xa(a){svvi("cpQuizInfoTotalCorrectAnswers",a,["cpQuizInfoTotalCorrectAnswers"])}function ya(){if(!b.movie)return 0;if(b.movie.playbackController){var a=b.movie.playbackController.GetQuizController();if(a)return a.GetTotalPretestCorrectQuestions()}return 0}function za(a){svvi("cpQuizInfoPreTestTotalQuestions",
a,["cpQuizInfoPreTestTotalQuestions"])}function Aa(){return vh._cpQuizInfoPreTestTotalQuestions}function Ba(a){svvi("cpQuizInfoPreTestTotalCorrectAnswers",a,["cpQuizInfoPreTestTotalCorrectAnswers"])}function Ca(){if(!b.movie)return 0;if(b.movie.playbackController){var a=b.movie.playbackController.GetQuizController();if(a){var c=a.GetScore(),a=a.GetMaxScore();if(0!=a)return Math.round(100*c/a)}}return 0}function Da(a){svvi("cpInfoPercentage",a,["cpInfoPercentage"])}function Ea(){return vh._cpQuizInfoTotalQuestionsPerProject}
function Fa(a){svvi("cpQuizInfoTotalQuestionsPerProject",a,["cpQuizInfoTotalQuestionsPerProject"])}function Ga(){return vh._cpQuizInfoQuizPassPoints}function Ha(a){svvi("cpQuizInfoQuizPassPoints",a,["cpQuizInfoQuizPassPoints"])}function Ia(){return vh._cpQuizInfoQuestionSlideType}function Ja(a){svvi("cpQuizInfoQuestionSlideType",a,["cpQuizInfoQuestionSlideType"])}function Ka(){return!b.movie||!b.movie.playbackController?0:b.movie.playbackController.GetTotalUnansweredQuestions()}function La(a){svvi("cpQuizInfoTotalUnansweredQuestions",
a,["cpQuizInfoTotalUnansweredQuestions"])}function Ma(){return vh._cpInfoLastVisitedSlide}function Na(a){svvi("cpInfoLastVisitedSlide",a,["cpInfoLastVisitedSlide"])}function Oa(){return vh._cpQuizInfoMaxAttemptsOnCurrentQuestion}function Pa(a){svvi("cpQuizInfoMaxAttemptsOnCurrentQuestion",a,["cpQuizInfoMaxAttemptsOnCurrentQuestion"])}function Qa(){return vh._cpQuizInfoQuestionSlideTiming}function Ra(a){svvi("cpQuizInfoQuestionSlideTiming",a,["cpQuizInfoQuestionSlideTiming"])}function Sa(){return vh._cpInfoCompany}
function Ta(){return vh._cpQuizInfoAnswerChoice}function Ua(a){svvi("cpQuizInfoAnswerChoice",a,["cpQuizInfoAnswerChoice"])}function Va(){return vh._cpQuizInfoNoQuestionsPerQuiz}function Wa(a){svvi("cpQuizInfoNoQuestionsPerQuiz",a,["cpQuizInfoNoQuestionsPerQuiz"])}function Xa(){if(!b.movie)return 0;if(b.movie.playbackController){var a=b.movie.playbackController.GetQuizController();if(a)return a.GetScore()}return 0}function Ya(a){svvi("cpQuizInfoPointsscored",a,["cpQuizInfoPointsscored"])}function Za(){return vh._cpInfoCopyright}
function $a(){return vh._cpInfoWebsite}function ab(){return vh._cpInfoProjectName}function bb(){return vh._cpInfoEmail}function cb(){return!1}function db(){return vh._cpInfoHasPlaybar}function eb(){return vh._cpQuizInfoAttempts}function fb(a){svvi("cpQuizInfoAttempts",a,["cpQuizInfoAttempts"])}function gb(){return b.D.project_main.to}function hb(){return vh._cpQuizInfoTotalQuizPoints}function ib(a){svvi("cpQuizInfoTotalQuizPoints",a,["cpQuizInfoTotalQuizPoints"])}function m(a){var b=""+a;0<=a&&10>
a&&(b="0"+b);return b}function J(){var a=new Date,c=a.getTime();vh._cpInfoEpochMS!=c&&svvi("cpInfoEpochMS",c,["cpInfoEpochMS"]);c=cpInfoEpochMS-b.movie.startTime;vh._cpInfoElapsedTimeMS!=c&&svvi("cpInfoElapsedTimeMS",c,["cpInfoElapsedTimeMS"]);c=a.getMinutes();vh._cpInfoCurrentMinutes!=c&&svvi("cpInfoCurrentMinutes",c,["cpInfoCurrentMinutes"]);vh._cpInfoCurrentHour!=a.getHours()&&svvi("cpInfoCurrentHour",a.getHours(),["cpInfoCurrentHour"]);c=a.getHours()+":"+m(a.getMinutes())+":"+m(a.getSeconds());
vh._cpInfoCurrentTime!=c&&svvi("cpInfoCurrentTime",c,["cpInfoCurrentTime"]);vh._cpInfoCurrentDay!=a.getDay()+1&&svvi("cpInfoCurrentDay",a.getDay()+1,["cpInfoCurrentDay"]);vh._cpInfoCurrentYear!=a.getFullYear()&&svvi("cpInfoCurrentYear",a.getFullYear(),["cpInfoCurrentYear"]);vh._cpInfoCurrentMonth!=a.getMonth()+1&&svvi("cpInfoCurrentMonth",Number(m(a.getMonth()+1)),["cpInfoCurrentMonth"]);vh._cpInfoCurrentDate!=a.getDate()&&svvi("cpInfoCurrentDate",Number(m(a.getDate())),["cpInfoCurrentDate"]);c=a.getMonth()+
1+"/"+a.getDate()+"/"+a.getFullYear();vh._cpInfoCurrentDateString!=c&&svvi("cpInfoCurrentDateString",c,["cpInfoCurrentDateString"]);c=a.getDate()+"/"+(a.getMonth()+1)+"/"+a.getFullYear();vh._cpInfoCurrentDateStringDDMMYYYY!=c&&svvi("cpInfoCurrentDateStringDDMMYYYY",c,["cpInfoCurrentDateStringDDMMYYYY"]);a=a.toLocaleDateString(window.navigator.userLanguage||window.navigator.language,{day:"numeric",month:"long",year:"numeric",weekday:"long"});vh._cpInfoCurrentLocaleDateString!=a&&svvi("cpInfoCurrentLocaleDateString",
a,["cpInfoCurrentLocaleDateString"])}function C(){0==g&&(J(),g=setInterval(J,1E3/cpInfoFPS))}function jb(){return vh._cpInfoCurrentDateString}function kb(){return vh._cpInfoCurrentDateStringDDMMYYYY}function lb(){return vh._cpInfoCurrentLocaleDateString}function mb(){return vh._cpInfoCurrentDate}function nb(){return vh._cpInfoCurrentMonth}function ob(){return vh._cpInfoCurrentYear}function pb(){return vh._cpInfoCurrentDay}function qb(){return vh._cpInfoCurrentTime}function rb(){return vh._cpInfoCurrentHour}
function sb(){return vh._cpInfoCurrentMinutes}function tb(){return vh._cpInfoEpochMS}function ub(){return vh._cpInfoElapsedTimeMS}function vb(){var a=b.movie.stage.currentSlide,c="";if(a&&(c=a.st)&&"Question Slide"==c)a=a.qnq,void 0!=a&&(a=b.movie.questionObjs[a].questionData)&&(a.ikc&&!0==a.ikc)&&(c="Normal Slide");return c}function wb(){var a=b.movie.stage.currentSlide;return a&&(slideType=a.st)&&"Question Slide"==slideType&&void 0==a.qnq?!0:!1}function xb(){if(!b.movie)return!1;if(b.movie.playbackController){var a=
b.movie.playbackController.GetQuizController();if(a)return a.GetIsPassed()}return!1}function K(){return 0}function yb(){return vh._cpInfoPrevFrame}function h(){return vh._cpInfoCurrentFrame}function zb(a){var c=a.smoothAdvance,a=c?a.currFrame:a,d=h();svvi("cpInfoPrevFrame",d,[]);svvi("cpInfoCurrentFrame",a,["cpInfoCurrentFrame","rdinfoCurrentFrame"]);c||(b.movie.resetMovieElapsedTime(),b.em.fireEvent("CPNonSmoothFrameAdvance",{currentFrameInfo:cpInfoCurrentFrame}))}function n(){return b.movie.stage.hasOverlaySlide()?
vh._cpInfoCurrentFrameAtLayerZero:h()}function Ab(a){svvi("cpInfoCurrentFrameAtLayerZero",a,["cpInfoCurrentFrameAtLayerZero","rdinfoCurrentFrameAtLayerZero"])}function L(){return cpInfoCurrentSlide-1}function Bb(){return vh._cpInfoCurrentSlide}function Cb(a){svvi("cpInfoCurrentSlide",a,["cpInfoCurrentSlide"])}function M(){return b.movie.stage.slides.length}function N(){return b.movie.fps*b.movie.speed}function Db(){return vh._cpQuizScopeSlide}function Eb(a){svvi("cpQuizScopeSlide",a,["cpQuizScopeSlide"])}
function Fb(){return vh._cpInQuizScope}function Gb(a){if(cpInfoHasPlaybar&&b.movie&&b.movie.playbackController){var c=b.movie.playbackController.GetQuizController();c&&c.GetHidePlaybarInQuiz()&&(cpCmndShowPlaybar=a&&!c.GetIsInReviewMode()?0:1)}svvi("cpInQuizScope",a,["cpInQuizScope"])}function Hb(){if(!b.movie||!b.movie.playbackController)return 0;var a=b.movie.playbackController.GetQuizController();return a?a.GetPretestScore():0}function Ib(){return!b.movie||!b.movie.playbackController?!1:(lQuizController=
b.movie.playbackController.GetQuizController())?!!lQuizController.GetIsInReviewMode():!1}function Jb(){if(!b.movie||!b.movie.playbackController)return 0;var a=b.movie.playbackController.GetQuizController();return a?a.GetMaxPretestScore():0}function Kb(){if(!b.movie||!b.movie.playbackController)return 0;var a=b.movie.playbackController.GetQuizController();if(a){var c=a.GetMaxPretestScore(),a=a.GetPretestScore();return void 0==c||0>=c||void 0==a||0>=a?0:Math.round(100*a/c)}return 0}function Lb(a){if(b.movie&&
b.movie.playbackController){var c=b.movie.playbackController.GetQuizController();c&&c.GotoQuizScopeSlide(a)}}function Mb(){return vh._cpInfoCourseID}function Nb(){return vh._cpInfoCourseName}function O(){return vh._cpInfoGeoLocation?vh._cpInfoGeoLocation:""}function P(a){svvi("cpInfoGeoLocation",a,["cpInfoGeoLocation"]);b.movie&&(!b.movie.virgin&&b.D.geoProps.geoAct&&0<b.D.geoProps.geoAct.length)&&b.movie.executeAction(b.D.geoProps.geoAct)}function Ob(){}function Pb(){return null}window.vh={};window.svvi=
function(a,c,d){var e=null;if(""!=a){e=null;if(a&&""!=a){var f="_"+a,e=vh[f];vh[f]=c}b.em&&e!=c&&(a={captivateVersion:i(),varName:a,oldVal:e,newVal:c,notify:d},b.em.fireEvent("CPVariableValueChangedEvent",a))}else b.em&&(a={captivateVersion:i(),varName:"",newVal:c,notify:d},b.em.fireEvent("CPVariableValueChangedEvent",a))};var g=0;b.defineProp=function(a,c,d,e){try{null==d&&(d=Ob),null==e&&(e=Pb),Object.defineProperty?Object.defineProperty(a,c,{get:e,set:d}):a.__defineGetter__&&(e&&a.__defineGetter__(c,
e),d&&a.__defineSetter__(c,d))}catch(f){b.m_isPreview&&b.alert("Please correct the variable name. This might be a javascript variable. : '"+c+"'")}};window.asg=function(a,c,d){b.defineProp(window,a,c,d)};b.VarInfo=function(a,b,d){this.name=a;this.len=b;this.systemDefined=d};b.VariablesManager=function(){b.vm=this;this.varInfos=[];this.geoVarIndexes=[];!Object.defineProperty&&!window.__defineGetter__?alert("VARIABLES SETTER GETTER WILL NOT WORK"):(asg("_registerForUpdateTimeBasedSystemVariables",C,
null),asg("cpCmndVolume",S,R),asg("cpCmndMute",o,p),asg("rdcmndMute",o,p),asg("cpCmndCC",V,s),asg("rdcmndCC",null,s),asg("cpCmndNext",l,null),asg("rdcmndNext",l,null),asg("cpCmndNextSlide",l,null),asg("rdcmndNextSlide",l,null),asg("cpCmndPrevious",k,j),asg("rdcmndPrevious",k,j),asg("cpCmndNextOnReview",X,null),asg("cpCmndPreviousSlide",k,j),asg("rdcmndPreviousSlide",k,j),asg("cpCmndPreviousOnReview",W,null),asg("cpCmndPlaybarMoved",r,q),asg("rdcmndPlaybarMoved",r,q),asg("cpCmndShowPlaybar",U,T),asg("cpCmndFastForward",
Y,null),asg("cpCmndRewindAndPlay",u,t),asg("rdcmndRewindAndPlay",u,t),asg("cpCmndRewindAndStop",w,v),asg("rdcmndRewindAndStop",w,v),asg("cpCmndGotoFrame",z,null),asg("rdcmndGotoFrame",z,null),asg("cpCmndGotoFrameAndResume",A,null),asg("rdcmndGotoFrameAndResume",A,null),asg("cpCmndGotoSlide",B,null),asg("rdcmndGotoSlide",B,null),asg("cpCmndGotoSlideAndResume",ca,null),asg("cpCmndGotoSlideByUIDAndResume",da,null),asg("cpCmndResume",y,x),asg("rdcmndResume",y,x),asg("cpCmndPause",F,G),asg("rdcmndPause",
F,G),asg("cpCmndExit",E,D),asg("rdcmndExit",E,D),asg("cpLockTOC",Z,$),asg("cpCmndInfo",H,I),asg("rdcmndInfo",H,I),asg("cpCmndTOCVisible",aa,ba),asg("cpInfoSlidesInProject",null,K),asg("rdinfoSlidesInProject",null,K),asg("rdinfoCurrentSlideInProject",null,function(){return 0}),asg("cpInfoFPS",null,N),asg("rdinfoFPS",null,N),asg("cpInfoAuthor",null,ea),asg("cpInfoCompany",null,Sa),asg("cpInfoEmail",null,bb),asg("cpInfoWebsite",null,$a),asg("cpInfoCopyright",null,Za),asg("cpInfoProjectName",null,ab),
asg("cpInfoDescription",null,fa),asg("cpInfoCurrentFrame",null,h),asg("rdinfoCurrentFrame",null,h),asg("cpInfoCurrentFrameAtLayerZero",null,n),asg("rdinfoCurrentFrameAtLayerZero",null,n),asg("_cpInfoCurrentFrame",zb,null),asg("_rdinfoCurrentFrame",h,null),asg("_cpInfoCurrentFrameAtLayerZero",Ab,null),asg("_rdinfoCurrentFrameAtLayerZero",n,null),asg("cpInfoPrevFrame",null,yb),asg("cpInfoFrameCount",null,gb),asg("cpInfoPrevSlide",null,ua),asg("_cpInfoPrevSlide",va,null),asg("cpInfoLastVisitedSlide",
null,Ma),asg("_cpInfoLastVisitedSlide",Na,null),asg("cpInfoCurrentSlide",null,Bb),asg("rdinfoCurrentSlide",null,L),asg("cpInfoCurrentSlideIndex",null,L),asg("_cpInfoCurrentSlide",Cb,null),asg("cpInfoCurrentSlideLabel",null,oa),asg("_cpInfoCurrentSlideLabel",pa,null),asg("cpInfoSlideCount",null,M),asg("rdinfoSlideCount",null,M),asg("cpInfoIsStandalone",null,cb),asg("cpInfoHasPlaybar",null,db),asg("cpInfoCurrentSlideType",null,vb),asg("cpInfoIsResultSlide",null,wb),asg("cpInfoElapsedTimeMS",null,ub),
asg("cpInfoEpochMS",null,tb),asg("cpInfoCurrentMinutes",null,sb),asg("cpInfoCurrentHour",null,rb),asg("cpInfoCurrentTime",null,qb),asg("cpInfoCurrentDay",null,pb),asg("cpInfoCurrentYear",null,ob),asg("cpInfoCurrentMonth",null,nb),asg("cpInfoCurrentDate",null,mb),asg("cpInfoCurrentDateString",null,jb),asg("cpInfoCurrentDateStringDDMMYYYY",null,kb),asg("cpInfoCurrentLocaleDateString",null,lb),asg("cpCmndGotoQuizScopeSlide",Lb,null),asg("cpQuizInfoLastSlidePointScored",ha,ga),asg("cpQuizInfoQuestionSlideType",
Ja,Ia),asg("cpQuizInfoAnswerChoice",Ua,Ta),asg("cpQuizInfoMaxAttemptsOnCurrentQuestion",Pa,Oa),asg("cpQuizInfoPointsPerQuestionSlide",ja,ia),asg("cpQuizInfoNegativePointsOnCurrentQuestionSlide",la,ka),asg("cpQuizInfoQuestionSlideTiming",Ra,Qa),asg("cpQuizInfoQuizPassPoints",Ha,Ga),asg("cpQuizInfoQuizPassPercent",ra,qa),asg("cpQuizInfoTotalProjectPoints",ta,sa),asg("cpQuizInfoTotalUnansweredQuestions",La,Ka),asg("cpQuizInfoNoQuestionsPerQuiz",Wa,Va),asg("cpQuizInfoPointsscored",Ya,Xa),asg("cpQuizInfoPretestPointsscored",
null,Hb),asg("cpQuizInfoPretestScorePercentage",null,Kb),asg("cpQuizInfoTotalCorrectAnswers",xa,wa),asg("cpInfoPercentage",Da,Ca),asg("cpQuizInfoTotalQuizPoints",ib,hb),asg("cpQuizInfoAttempts",fb,eb),asg("cpQuizInfoTotalQuestionsPerProject",Fa,Ea),asg("cpQuizInfoQuestionPartialScoreOn",na,ma),asg("cpQuizScopeSlide",null,Db),b._cpQuizScopeSlide=Eb,asg("cpInQuizScope",null,Fb),b._cpInQuizScope=Gb,asg("cpQuizInfoPassFail",null,xb),asg("cpInfoCourseID",null,Mb),asg("cpInfoCourseName",null,Nb),asg("cpQuizInfoPreTestTotalCorrectAnswers",
Ba,ya),asg("cpInReviewMode",null,Ib),asg("cpQuizInfoPreTestTotalQuestions",za,Aa),asg("cpQuizInfoPreTestMaxScore",null,Jb),asg("CaptivateVersion",null,i),asg("cpInfoMobileOS",null,Q),b.geo&&b.startWatchingGeoLocationChange?(asg("cpInfoGeoLocation",P,O),b.startWatchingGeoLocationChange()):b.m_isPreview&&!b.m_isEdgeInspectPreview&&asg("cpInfoGeoLocation",P,O));b.initVariables();b.vm.createVariable("cpQuizScopeSlide",-1,!0,100,!1);b.initVariables=null};window.DefineProperty=function(a){eval("(function(){function get"+
a+"(){return vh._"+a+";}function set"+a+'(val){svvi("'+a+'", val, ["'+a+'"]);} asg("'+a+'",set'+a+",get"+a+");})();")};b.VariablesManager.prototype={hasOwnProperty:function(a){try{return void 0==eval("vh._"+a)?!1:!0}catch(b){return!1}},getVariableValue:function(a){var b=null;a&&""!=a&&(b=eval("vh._"+a));return b},createVariable:function(a,c,d,e,f){void 0==d&&(d=!0);return a&&""!=a&&!1==this.hasOwnProperty(a)?(this.addVarInfo(a,e,d,f),vh["_"+a]=c,b.em&&!0!=d&&(DefineProperty(a),a={captivateVersion:i(),
varName:a,varVal:c},b.em.fireEvent("CPVariableCreatedEvent",a)),!0):!1},setVariableValue:function(a,b,d){void 0==d&&(d=!0);var e=!0;d?!0==this.createVariable(a,b,!0,1E4,!1)&&(e=!1):!1==this.hasOwnProperty(a)&&(e=!1);e&&(vh["_"+a]=b)},addVarInfo:function(a,c,d,e){a=this.varInfos.push(new b.VarInfo(a,c,d));e&&this.geoVarIndexes.push(a-1)},getVariableLength:function(a){for(var b=0,b=0;b<this.varInfos.length;++b)if(a==this.varInfos[b].name)return this.varInfos[b].len;return 1E3},getGeoVarsInfo:function(){var a=
[],b;for(b in this.geoVarIndexes)a.push(this.varInfos[this.geoVarIndexes[b]]);return a}}})(window.cp);
(function(a){a.ImageObject=function(c,d,h){this.im=c;this.nativeImage=new Image;this.nativeImage.cpImage=this;this.src=d;this.complete=!1;this.loaders={};this.preloaded=!1;this.isProjectImage=h;this.includedInViews={};this.monitorFunc=function(c){c.target.cpImage.complete=!0;a.responsive&&(a.movie.stage&&a.movie.stage.lastFrame<cpInfoCurrentFrame)&&(a.movie.im&&!a.movie.im.imagesNotLoaded())&&(a.fontMap=[],a.adjustResponsiveItems(),a.rescaleFontSizes());a.movie.im.verbose&&a.log("loaded "+c.target.src)}};
a.ImageObject.prototype={isIncludedInView:function(){var c=!a.responsive;if(a.responsive){if(this.isProjectImage)return!0;var d=a.ResponsiveProjWidth;a.DESKTOP!=a.device?(window.innerWidth>window.innerHeight?(c=window.innerWidth,d=window.innerHeight):(c=window.innerHeight,d=window.innerWidth),c=a.getCorrectBreakpoint(c),d=a.getCorrectBreakpoint(d),c=1==this.includedInViews[c]||1==this.includedInViews[d]):a.m_isPreview?c=!0:(c=a.getCorrectBreakpoint(window.innerWidth),c=1==this.includedInViews[c])}return c},
load:function(c,d){if(!(void 0==this.src||""==this.src||null==this.src))if(!a.responsive||this.isIncludedInView()||!a.responsiveType!=a.kCPPMEVR)if(this.im.verbose&&(a.log("load (monitor = "+d+") "+this.src),this.complete&&a.log("completed"),this.nativeImage.onload&&a.log("onload is set")),!this.complete&&!this.nativeImage.onload&&(this.monitor=!0==d?!0:!1,this.nativeImage.onload=this.monitorFunc),!this.complete&&this.nativeImage.onload&&!0==d&&(this.monitor=!0),this.loaders[c]=1,this.im.verbose&&
a.log("loaded by = "+c),!0!=d&&(this.preloaded=!0),""==this.nativeImage.src)return this.im.verbose&&a.log("loading "+this.src),this.setImageDataURI(this.nativeImage,this.src),!0},setImageDataURI:function(c,d){a.movie.im.getImageDataURI(d,function(a){-1!=a.indexOf("data:image/svg;base64,")&&(a=a.substr(22,a.length-1),a="data:image/svg+xml,"+atob(a));c.src=a})},unload:function(c){this.im.verbose&&a.log("unload "+this.src+" preloaded = "+this.preloaded);this.loaders[c]&&delete this.loaders[c];var c=
0,d;for(d in this.loaders)++c;return 0==c?(this.im.verbose&&a.log("unloading "+this.src),this.nativeImage.src="",this.nativeImage=new Image,this.nativeImage.cpImage=this,this.monitor=this.preloaded=this.complete=!1,!0):!1}};a.ImageManager=function(){a.movie.im=this;this.images={};this.preloadingProjectImages=!1;this.m_projectImages={};this.verbose=!1;this.reset();for(var c=a.model.projectImages,d=0;d<c.length;++d)this.m_projectImages[c[d]]=new a.ImageObject(this,c[d],!0);c=a.model.images;for(d=0;d<
c.length;++d){var h=c[d],b=a.responsive?h.ip:h,f=new a.ImageObject(this,b,!1);a.responsive&&(f.includedInViews=h.ipiv);this.images[b]=f}};a.ImageManager.prototype={imagesNotLoaded:function(){var c=0;if(this.preloadingProjectImages)for(var d in this.m_projectImages)this.m_projectImages[d].monitor&&!this.m_projectImages[d].complete&&++c;else for(d in this.images)this.images[d].monitor&&!this.images[d].complete&&++c;this.verbose&&0<c&&a.log(c+" imaged pending");return 0<c},loadImages:function(c,d,h,
b){if(0!=d.length){this.preloadingProjectImages=b?!0:!1;for(var f=0;f<d.length;++f){var e=d[f],g=b?this.m_projectImages[e]:this.images[e];g||(g=new a.ImageObject(this,e,b),b?this.m_projectImages[e]=g:this.images[e]=g);g.load(c,h)}}},unloadImage:function(a,d){var h=this.images[d];h&&h.unload(a)},reset:function(){if(this.preloadingProjectImages)for(var a in this.m_projectImages)this.m_projectImages[a].monitor=!1;else for(a in this.images)this.images[a].monitor=!1},getImageDataURI:function(c,d){var h=
a.imageToJSONPathMap;if(void 0==h||!h[c])d(c);else{if(a.imagesJSONCacheForLocal&&void 0==a.imagesJSONCache){a.imagesJSONCache={};for(var b=1,f="imagesJSONCache00"+b.toString(),f=a[f];void 0!=f;){for(var e in f)a.imagesJSONCache[e]=f[e];f="imagesJSONCache";b++;var g="00";10<=b&&(g=100<=b?"":"0");f+=g+b.toString();f=a[f]}}if(a.imagesJSONCacheForLocal)b=a.imagesJSONCache[c],b="data:"+a.movie.im.getImageType(c)+";base64,"+b,d(b),found=!0;else{var i="dr/"+h[c];if(a.imagesJSONCache)for(e=0;e<a.imagesJSONCache.length;e++)if(a.imagesJSONCache[e].imageJSONPath==
i){b=a.imagesJSONCache[e].imageToDataURIMap[c];b="data:"+a.movie.im.getImageType(c)+";base64,"+b;e=a.imagesJSONCache.splice(e,1);a.imagesJSONCache.splice(0,0,e[0]);d(b);found=!0;return}a:{void 0==a.curFileList&&(a.curFileList=[]);for(e=0;e<a.curFileList.length;++e)if(a.curFileList[e].file==i){b={};b.imagePath=c;b.callback=d;void 0==a.curFileList[e].mp&&(a.curFileList[e].mp=[]);a.curFileList[e].mp[a.curFileList[e].mp.length]=b;break a}b={};b.file=i;e={};e.imagePath=c;e.callback=d;b.mp=[];b.mp[0]=e;
a.curFileList[a.curFileList.length]=b;var j=new XMLHttpRequest;j.open("GET",i,!0);j.onreadystatechange=function(){if(j.readyState==4)if(j.status==200){var b=j.responseText,b=b.slice(22,b.length-1),e=JSON.parse(b);a.imagesJSONCache=a.imagesJSONCache||[];a.imagesJSONCacheSize=4;a.imagesJSONCache.splice(0,0,{imageJSONPath:i,imageToDataURIMap:e});a.imagesJSONCache.splice(a.imagesJSONCacheSize);for(var f,b=0;b<a.curFileList.length;++b)if(a.curFileList[b].file==i){f=a.curFileList[b].mp;break}for(b=0;b<
f.length;++b){var g=e[f[b].imagePath],g="data:"+a.movie.im.getImageType(f[b].imagePath)+";base64,"+g,k=f[b].callback;k(g)}if(f.length>0)for(b=0;b<a.curFileList.length;++b)if(a.curFileList[b].file==i){a.curFileList.splice(b,1);break}}else if(a.imagesJSONCache){f="dr/"+h[c];for(b=0;b<a.imagesJSONCache.length;b++)if(a.imagesJSONCache[b].imageJSONPath==f){g=a.imagesJSONCache[b].imageToDataURIMap[c];g="data:"+a.movie.im.getImageType(c)+";base64,"+g;f=a.imagesJSONCache.splice(b,1);a.imagesJSONCache.splice(0,
0,f[0]);d(g);found=true;break}}};j.send()}}}},getImageType:function(a){return"image/"+a.split(".").pop()}}})(window.cp);
(function(a){a.redrawVideo=function(b){a.DESKTOP==a.device&&(a.SAFARI===a.browser&&7<=a.browserVersion)&&(setTimeout(function(){b.controls=!1},40),11<=a.browserVersion&&(b.controls=!1))};a.setPlaysInlineAttrib=function(a,c){a.WebkitPlaysInline=c;a.playsInline=c};a.MediaSeeker=function(){a.movie.ms=this;this.retryQueue={};this.enabled=this.verbose=!1;if(a.browser==a.MSIE&&a.browserVersion>=a.MSIE_MIN_SUPPORTED_VERSION||a.browser==a.FIREFOX&&a.browserVersion>=a.FF_MIN_SUPPORTED_VERSION||a.OS==a.WINDOWS&&
a.browser==a.CHROME&&a.browserVersion>=a.CHROME_MIN_SUPPORTED_VERSION||a.device==a.IDEVICE&&a.IOSMajor>=a.IOS4||a.device==a.ANDROID)this.enabled=!0;this.verbose&&a.log("MediaSeeker enabled = "+this.enabled)};a.MediaSeeker.prototype={resetFlags:function(a){delete a.retryCount;delete a.lastKnownBuffered;delete a.thulped;delete a.resting;delete a.rested;delete a.failure1;delete a.failure2},addToQueue:function(a){this.enabled&&(this.retryQueue[a.id]=a,a.retryCount=1,a.lastKnownBuffered=0,a.thulped=!1,
a.resting=!1,a.rested=!1,a.failure1=0,a.failure2=0)},removeFromQueue:function(a){this.enabled&&(this.resetFlags(a),delete this.retryQueue[a.id])},inQueue:function(a){return!this.enabled?!1:this.retryQueue[a.id]?!0:!1},hasSeeked:function(b){if(!this.enabled)return!0;++b.retryCount;var c=b.nativeAudio;c||(c=b.nativeVideo);if(!c)return this.verbose&&a.log("MediaSeeker: no native media to seek "+b.id),!0;if(a.device==a.IDEVICE&&3>c.readyState)return!1;if(void 0==b.seekToTime)return this.verbose&&a.log("MediaSeeker: seekToTime is undefined "+
b.id),!0;if(b.thulped)return 3>b.retryCount||(this.verbose&&a.log("retrying thulped media "+b.id+" seekToTime = "+b.seekToTime),b.thulped=!1,b.retryCount=0,a.setSrcAndLoadVideoChannel(c,b.src)),!1;if(b.resting)return 3<=b.retryCount&&(this.verbose&&a.log("retrying rested media "+b.id+" seekToTime = "+b.seekToTime),b.resting=!1,b.rested=!0,b.retryCount=0),!1;0>b.seekToTime&&(b.seekToTime=0);if(isNaN(c.duration)||!isFinite(c.duration)){this.verbose&&a.log("MediaSeeker: duration is NAN "+b.id);if(0==
b.seekToTime)return!0;if(b.rested){b.rested=!1;++b.failure1;if(2<=b.failure1)return a.exceptionalLogs&&console.log(b.id+" gotStuck while seeking (NAN). gave up seeking"),!0;b.thulped=!0;try{c.src="_cp_n_m_"}catch(e){}try{c.load()}catch(d){}}else b.resting=!0;return!1}if(b.src!==c.cpSrc&&b.nativeVideo)return b.seekToTimeInNewSource=b.seekToTime,!0;b.seekToTime>c.duration&&(b.seekToTime=c.duration);var f=!0;try{c.currentTime=b.seekToTime;var i=Math.abs(c.currentTime-b.seekToTime);if(0.05<=i){var f=
!1,g=c.buffered;g.end(g.length-1);if(b.lastKnownBuffered==g)if(b.rested){b.rested=!1;++b.failure2;if(2<=b.failure2)return a.exceptionalLogs&&console.log(b.id+" gotStuck while seeking (CONST BUFF). gave up seeking"),!0;b.thulped=!0;try{c.src="_cp_n_m_"}catch(h){}try{c.load()}catch(j){}}else b.resting=!0;else b.lastKnownBuffered=g}}catch(k){i=Math.abs(c.currentTime-b.seekToTime),f=0.05<=i?!1:!0}this.verbose&&f&&a.log("MediaSeeker: "+b.id+" currentTime = "+c.currentTime);return f},pendingItems:function(){if(!this.enabled)return 0;
var b=0,c;for(c in this.retryQueue){var e=this.retryQueue[c];this.hasSeeked(e)?(delete e.seekToTime,this.removeFromQueue(e),e.revoke&&(delete e.revoke,this.verbose&&a.log("MediaSeeker revoking play of "+e.id),e.seekToTimeInNewSource||e.play())):++b}this.verbose&&(b&&this.numPending!=b)&&a.log("MediaSeeker: "+b+" items pending seek");this.numPending=b;a.verbose&&0<b&&a.log(b+" pendingForSeek");return b},reset:function(){for(var a in this.retryQueue){var c=this.retryQueue[a];delete c.seekToTime;delete c.revoke;
this.resetFlags(c)}this.retryQueue={}}};a.NativeAudio=function(){var a=function(){this.duration=this.currentTime=0;this.ended=this.paused=!0;this.defaultPlaybackRate=0;this.playbackRate=1;this.fastSeek=this.seekable=this.seeking=this.played=!1;this.src="";this.autoplay=this.preload=this.crossorigin=!1;this.mediagroup="";this.controls=this.muted=this.loop=!1};a.prototype={load:function(){},play:function(){},pause:function(){},addEventListener:function(){},removeEventListener:function(){}};if("undefined"===
typeof Audio||!Audio){var c=document.createElement("audio");return void 0==c.load||void 0==c.play||void 0==c.pause||void 0==c.addEventListener?new a:c}return new Audio};a.AudioObject=function(b,c,e,d,f,i,g){this.am=b;this.id=c;this.nativeAudio=null;this.src=a.getCorrectMediaPath(e);this.from=d;this.to=f;i&&(this.duration=i/1E3);this.hidden=this.ended=!1;this.paused=!0;this.cploop=this.loop=!1;this.gotStuck=0;this.rp=g};a.AudioObject.prototype={load:function(){this.nativeAudio&&this.nativeAudio.load()},
setSrc:function(b){this.src=a.getCorrectMediaPath(b);this.nativeAudio&&(this.nativeAudio.cpSrc=a.getCorrectMediaPath(b),this.nativeAudio.src=a.getCorrectMediaPath(b),this.load())},play:function(){if(!(!0==this.ended||this.hidden))if(this.paused)if(this.paused&&this.am.webAudio&&this.am.playWebAudio(this))this.paused=!1;else if(a.lastMediaPlayReqTime&&50>(new Date).getTime()-a.lastMediaPlayReqTime.getTime())if(a.movie.paused){this.am.verbose&&a.log("crowded request postponed "+this.id);var b=this;
setTimeout(function(){b.play()},50)}else this.am.verbose&&a.log("crowded request denied "+this.id);else{if(this.paused=!1,this.am.verbose&&a.log("AdObjPlay "+this.id+" "+this.src),this.nativeAudio||this.am.allocAudioChannel(this,a.IDEVICE!=a.device&&a.device!=a.ANDROID),this.nativeAudio)this.isSeekPending()?this.finishPendingSeek():(a.device==a.IDEVICE&&a.multiAudioTrack&&(a.lastMediaPlayReqTime=new Date),-1==this.from&&(-1==this.to&&this.nativeAudio&&this.nativeAudio.currentTime&&0!=this.nativeAudio.currentTime)&&
(this.nativeAudio.currentTime=0),a.playAudioOrVideoChannel_Safari11Workaround(this.nativeAudio))}else if(a.device==a.IDEVICE&&!a.multiAudioTrack&&this.nativeAudio)if(this.lastTime==this.nativeAudio.currentTime){if(++this.gotStuck,30<=this.gotStuck){a.exceptionalLogs&&a.log(this.id+" "+this.src+" gotStuck @"+this.nativeAudio.currentTime);this.gotStuck=0;try{this.nativeAudio.src="_cp_n_m_"}catch(c){}this.nativeAudio.src=this.src;this.nativeAudio.load();a.playAudioOrVideoChannel_Safari11Workaround(this.nativeAudio)}}else this.lastTime=
this.nativeAudio.currentTime,this.gotStuck=0},resetAndPlay:function(){this.am.verbose&&a.log("AudioObject "+this.id+" resetAndPlay()");this.ended=!1;this.setCurrentTime(0);this.play()},show:function(){this.am.verbose&&a.log("AudioObject "+this.id+" show()");this.hidden=!1;this.shownAt=cpInfoCurrentFrame;this.resetAndPlay()},hide:function(){this.am.verbose&&a.log("AudioObject "+this.id+" hide()");this.hidden=!0;delete this.shownAt;this.pause()},pause:function(){if(!this.paused&&this.am.webAudio&&this.am.pauseWebAudio(this.src))!0===
this.onEndAutoPlayMovie&&a.movie.play(),this.paused=!0,this.am.verbose&&a.log("webAudio:pause "+this.id+" "+this.src);else if(this.isSeekPending()&&(this.am.verbose&&this.revoke&&a.log("AdObjPause deleting revoke "+this.id),delete this.revoke),!this.paused)this.paused=!0,this.am.verbose&&a.log("AdObjPause "+this.id+" "+this.src),this.nativeAudio&&(this.nativeAudio.pause(),this.nativeAudio.pausedAt=(new Date).getTime())},setLoop:function(b,c){this.loop=b;this.loopFrames=c;a.IDEVICE==a.device||a.device==
a.ANDROID?this.cploop=b:this.nativeAudio&&(b?this.nativeAudio.loop=!0:delete this.nativeAudio.loop)},setCurrentTime:function(b){if(!(-1==this.from&&-1==this.to))if(this.am.verbose&&a.log("AudioObject "+this.id+" setCurrentTime("+b+")"),this.nativeAudio)if(this.am.verbose&&a.log("this.nativeAudio.currentTime = "+this.nativeAudio.currentTime),0.1>Math.abs(this.nativeAudio.currentTime-b))this.am.verbose&&a.log("not seeking delta < 0.1"),a.movie.ms.inQueue(this)||delete this.seekToTime;else{delete this.seekToTime;
this.paused||(this.am.verbose&&a.log("setting revoke to true"),this.revoke=!0,this.pause());var c=!0;try{this.nativeAudio.currentTime=b;var e=Math.abs(this.nativeAudio.currentTime-b);0.05<=e&&(c=!1)}catch(d){e=Math.abs(this.nativeAudio.currentTime-b),c=0.05<=e?!1:!0}this.am.verbose&&a.log("seekSuccess = "+c);a.movie.ms.enabled?c?this.revoke&&(this.am.verbose&&a.log("revoking play"),delete this.revoke,this.play()):(this.am.verbose&&a.log("pause movie and add to seekQueue"),this.seekToTime=b,a.movie.ms.addToQueue(this)):
this.revoke&&(this.am.verbose&&a.log("revoking play"),delete this.revoke,this.play())}else this.seekToTime=b,this.am.verbose&&a.log("no native audio. Kept in pending...")},isSeekPending:function(){return-1==this.from&&-1==this.to?!1:void 0!=this.seekToTime},finishPendingSeek:function(){this.nativeAudio&&this.isSeekPending()&&(this.am.verbose&&a.log("AudioObject "+this.id+" finishPendingSeek"),this.setCurrentTime(this.seekToTime))},seekTo:function(b){if(-1==this.from&&-1==this.to)return!0;this.am.verbose&&
a.log("AudioObject "+this.id+" seekTo("+b+")");if(this.loop&&this.loopFrames){if(this.from<=b)return this.setCurrentTime((b-this.from)%this.loopFrames/cpInfoFPS),this.ended=!1,!0}else{if(this.from<=b&&this.to>=b)return this.setCurrentTime((b-this.from)/cpInfoFPS),this.ended=!1,!0;this.to>=b&&(this.setCurrentTime(0),this.ended=!1)}"bga"==this.id&&!this.loop&&(this.ended=!0);return!1}};a.ExtAudioObject=function(b,c,e,d,f){this.am=b;this.id=c;this.nativeAudio=null;this.src=a.getCorrectMediaPath(e);this.from=
d;this.to=f;this.hidden=this.ended=!1;this.paused=!0;this.cploop=this.loop=!1;this.gotStuck=0};a.ExtAudioObject.prototype={load:function(){this.nativeAudio&&this.nativeAudio.load()},play:function(){},pause:function(){this.paused||(this.paused=!0,this.nativeAudio&&(this.nativeAudio.pause(),this.nativeAudio.pausedAt=(new Date).getTime()))},isSeekPending:function(){return!1},finishPendingSeek:function(){},seekTo:function(){return!0},reset:function(){}};a.MediaView=function(b){this.a=b;a.MediaView.PROGRESS_WIDTH||
(a.MediaView.PROGRESS_WIDTH=300,a.MediaView.STATUS1_WIDTH=100,a.MediaView.STATUS2_WIDTH=100,a.MediaView.STATUS3_WIDTH=100,a.MediaView.STATUS4_WIDTH=50,a.MediaView.STATUS_WIDTH=a.MediaView.STATUS1_WIDTH+a.MediaView.STATUS2_WIDTH+a.MediaView.STATUS3_WIDTH+a.MediaView.STATUS4_WIDTH,a.MediaView.LEFT_OFFSET=260,a.MediaView.TOP_OFFSET=5,a.MediaView.HEIGHT=15,a.MediaView.GAP=5,a.MediaView.NUM_MEDIA_VIEWS=0);this.view=a.newElem("div");this.status=a.newElem("div");this.status2=a.newElem("div");this.status3=
a.newElem("div");this.status4=a.newElem("div");this.progressBar=a.newElem("div");this.srcNameBar=a.newElem("div");this.downloaded=a.newElem("div");this.playHead=a.newElem("div");document.body.appendChild(this.view);this.view.appendChild(this.status);this.view.appendChild(this.status2);this.view.appendChild(this.status3);this.view.appendChild(this.status4);this.view.appendChild(this.progressBar);this.progressBar.appendChild(this.downloaded);this.progressBar.appendChild(this.playHead);this.progressBar.appendChild(this.srcNameBar);
this.view.style.cssText="z-index:100;display:block; position:fixed; left:"+a.MediaView.LEFT_OFFSET+"px; top:"+(a.MediaView.TOP_OFFSET+a.MediaView.NUM_MEDIA_VIEWS*(a.MediaView.HEIGHT+a.MediaView.GAP))+"px; width:"+(a.MediaView.STATUS_WIDTH+a.MediaView.PROGRESS_WIDTH)+"px; height:"+a.MediaView.HEIGHT+"px; background-color:#555555;opacity:0.5";this.status.style.cssText="z-index:100;display:block; position:absolute; left:0px; top:0px; width:"+a.MediaView.STATUS1_WIDTH+"px; height:"+a.MediaView.HEIGHT+
"px;background-color:#0000ff";this.status2.style.cssText="z-index:100;display:block; position:absolute; left:"+a.MediaView.STATUS1_WIDTH+"px; top:0px; width:"+a.MediaView.STATUS2_WIDTH+"px; height:"+a.MediaView.HEIGHT+"px;background-color:#ffffff";this.status3.style.cssText="z-index:100;display:block; position:absolute; left:"+(a.MediaView.STATUS1_WIDTH+a.MediaView.STATUS2_WIDTH)+"px; top:0px; width:"+a.MediaView.STATUS3_WIDTH+"px; height:"+a.MediaView.HEIGHT+"px;background-color:#ffffff";this.status4.style.cssText=
"z-index:100;display:block; position:absolute; left:"+(a.MediaView.STATUS1_WIDTH+a.MediaView.STATUS2_WIDTH+a.MediaView.STATUS3_WIDTH)+"px; top:0px; width:"+a.MediaView.STATUS4_WIDTH+"px; height:"+a.MediaView.HEIGHT+"px;background-color:#ffffff";this.progressBar.style.cssText="z-index:100;display:block; position:absolute; left:"+a.MediaView.STATUS_WIDTH+"px; top:0px; width:"+a.MediaView.PROGRESS_WIDTH+"px; height:"+a.MediaView.HEIGHT+"px;background-color:#888888";this.srcNameBar.style.cssText="z-index:100;display:block; position:absolute; left:0px; top:0px; width:"+
a.MediaView.PROGRESS_WIDTH+"px; height:"+a.MediaView.HEIGHT+"px;white-space: nowrap; overflow: hidden;";this.downloaded.style.cssText="z-index:100;display:block; position:absolute; left:0px; top:0px; width:0px; height:"+a.MediaView.HEIGHT/3+"px;background-color:#10ff10;";this.playHead.style.cssText="z-index:100;display:block; position:absolute; left:0px; top:0px; width:2px; height:"+a.MediaView.HEIGHT/3+"px;background-color:#101010";++a.MediaView.NUM_MEDIA_VIEWS};a.MediaView.prototype={update:function(){var b=
this.a.cpAudio;b||(b=this.a.cpVideo);var c=this.a.src.indexOf("/ar/");-1==c&&(c=this.a.src.indexOf("/vr/"));-1==c&&(c=this.a.src.indexOf("_cp_n_m_"));-1==c&&(c=0);c=this.a.src.substr(c);b&&(c+="|"+b.src+"|"+b.id);this.srcNameBar.innerHTML="<font style='font-size:9px'>"+c+"</font>";c=this.a.paused?"paused":"playing";this.a.ended&&(c+=" end");this.status2.innerHTML="<font color='#000000' style='font-size:8px'>"+c+"</font>";b?(c=b.paused?"paused":"playing",b.ended&&(c+=" end"),b.hidden&&(c+=" hdn")):
c="NULL";this.status3.innerHTML="<font color='#000000' style='font-size:8px'>"+c+"</font>";switch(this.a.readyState){case a.HAVE_NOTHING:c="HaveNone";this.status4.style.backgroundColor="#ff0000";break;case a.HAVE_METADATA:c="HaveMeta";this.status4.style.backgroundColor="#ffaa00";break;case a.HAVE_CURRENT_DATA:c="HaveCurr";this.status4.style.backgroundColor="#aacc00";break;case a.HAVE_FUTURE_DATA:c="HaveMore";this.status4.style.backgroundColor="#55ff00";break;case a.HAVE_ENOUGH_DATA:c="HaveAll";this.status4.style.backgroundColor=
"#00ff00";break;default:c="???",this.status4.style.backgroundColor="#555555"}this.status4.innerHTML="<font color='#000000' style='font-size:8px'>"+c+"</font>";this.a.ended?(this.status.style.backgroundColor="#ffff00",this.status.innerHTML="<font color='#000000' style='font-size:8px'>Ended</font>"):this.a&&this.a.networkState==this.a.NETWORK_EMPTY?(this.status.style.backgroundColor="#000000",this.status.innerHTML="<font color='#ffffff' style='font-size:8px'>Empty</font>"):this.a&&this.a.networkState==
this.a.NETWORK_IDLE?(this.status.style.backgroundColor="#aaaaaa",this.status.innerHTML="<font color='#000000' style='font-size:8px'>Idle</font>"):this.a&&this.a.networkState==this.a.NETWORK_LOADING?(this.status.style.backgroundColor="#00ff00",this.status.innerHTML="<font color='#000000' style='font-size:8px'>Loading</font>"):this.a&&this.a.networkState==this.a.NETWORK_NO_SOURCE&&(this.status.style.backgroundColor="#ff0000",this.status.innerHTML="<font color='#ffffff' style='font-size:8px'>NoSrc</font>");
var e;this.a&&!isNaN(this.a.duration)&&isFinite(this.a.duration)?e=this.a.duration:b&&b.duration&&(e=b.duration);e?(b=this.a.buffered,b.length&&(b=b.end(b.length-1),this.downloaded.style.width=b/e*a.MediaView.PROGRESS_WIDTH+"px"),this.playHead.style.left=this.a.currentTime/e*a.MediaView.PROGRESS_WIDTH+"px"):(this.downloaded.style.width="0px",this.playHead.style.left="0px")}};a.AudioView=a.MediaView;a.VideoView=a.MediaView;a.AudioManager=function(){a.movie.am=this;this.volume=1;this.viewAudio=this.verbose=
this.loaded=this.muted=!1;if("http"==window.location.protocol.substr(0,4)){var b=!1;a.m_isLMSPreview&&(b=!0);var c=window.AudioContext||window.webkitAudioContext;c&&!b&&(this.webAudio=new c,this.webAudioCache={},this.webAudioLoaded=this.webAudioReq=0)}this.errorCallBackFn=function(b){-1==this.src.indexOf("_cp_n_m_")&&(a.exceptionalLogs&&(a.log("src = "+this.src+" error code = "+(this.error?this.error.code:"NULL")+" n/w state = "+this.networkState),a.log(b)),this.waitCount=0)};this.waitingFn=function(b){var c;
!isNaN(this.duration)&&isFinite(this.duration)?c=this.duration:this.cpAudio&&this.cpAudio.duration&&(c=this.cpAudio.duration);if(c){var f=Math.abs(this.currentTime-c);a.movie.am.verbose&&a.log(this.cpSrc+" wait came when delta = "+f+" duration = "+c);if(0.3>f){0.3>c||(a.movie.am.verbose&&a.log("simulating arrival of ended event"),a.movie.am.onEndedCallBackFn.call(this,b));return}}++this.waitCount;a.movie.am.verbose&&(b="wait "+this.waitCount+" "+this.cpSrc+" currTime = "+this.currentTime+" duration = "+
c+" curFrame = "+cpInfoCurrentFrame,this.cpAudio&&(b+=" id = "+this.cpAudio.id,b+=" from "+this.cpAudio.from,b+=" to "+this.cpAudio.to),a.log(b))};this.canPlayCallBackFn=function(){this.waitCount=0;a.movie.am.verbose&&a.log("cnPly "+this.cpSrc+" "+(this.cpAudio?this.cpAudio.id:""))};this.onEndedCallBackFn=function(){this.waitCount=0;this.cploop?(a.movie.am.verbose&&a.log(this.cpSrc+" loop"),this.cpAudio&&(this.cpAudio.pause(),this.cpAudio.seekTo(this.cpAudio.from),this.cpAudio.play())):(a.movie.am.verbose&&
a.log(this.cpSrc+" ended"),this.endedAt=(new Date).getTime(),this.cpAudio&&(this.cpAudio.ended=!0,this.cpAudio.pause(),this.cpAudio.onEndAutoPlayMovie&&(delete this.cpAudio.onEndAutoPlayMovie,a.movie.play())))};this.PlayPauseCallBackFn=function(){this.paused&&(this.pausedAt=(new Date).getTime());this.cpAudio&&(this.cpAudio.paused=this.paused)};this.MAX_AUDIO_CHANNELS=a.multiAudioTrack?10:1;this.audioChannels=[];for(b=0;b<this.MAX_AUDIO_CHANNELS;++b)c=a.NativeAudio(),c.cpSrc="",c.cpAudio=null,c.ended=
!1,c.addEventListener("ended",this.onEndedCallBackFn,!1),c.addEventListener("error",this.errorCallBackFn,!1),a.waitForAudio&&(c.addEventListener("waiting",this.waitingFn,!1),c.addEventListener("canplay",this.canPlayCallBackFn,!1)),c.addEventListener("play",this.PlayPauseCallBackFn,!1),c.addEventListener("pause",this.PlayPauseCallBackFn,!1),c.waitCount=0,c.muted=this.muted,c.volume=this.volume,this.audioChannels[b]=c;this.verbose&&(b=a.NativeAudio(),a.log("NetworkStates: NETWORK_EMPTY = "+b.NETWORK_EMPTY+
" NETWORK_IDLE = "+b.NETWORK_IDLE+" NETWORK_LOADING = "+b.NETWORK_LOADING+" NETWORK_NO_SOURCE = "+b.NETWORK_NO_SOURCE),b=null)};a.AudioManager.prototype={unlockWebAudio:function(){if(a.vm.getVariableValue("cpInfoParentRequestToRelaxBrowserCheck"))this.webAudio=null;else if(this.webAudio){var b=this.webAudio.createBuffer(1,1,22050),c=this.webAudio.createBufferSource();c.buffer=b;c.connect(this.webAudio.destination);c.noteOn=c.noteOn||c.start;c.noteOn(0);var e=this;setTimeout(function(){if(c.playbackState===
c.PLAYING_STATE||c.playbackState===c.FINISHED_STATE)e.webAudioUnlocked=!0,e.verbose&&a.log("web audio unlocked")},100)}},loadWebAudio:function(b){function c(d){try{e.webAudio.decodeAudioData(d.buf,function(c){var d={};d.buffer=c;e.webAudioCache[b]=d;this.verbose&&a.log("Loaded Success:"+b)},function(){a.exceptionalLogs&&a.log(b+" Error decoding. Attempting to sync stream");var e;var g=new Uint8Array(d.buf);g.indexOf=Array.prototype.indexOf;for(e=d.sync;;){++d.retry;e=g.indexOf(255,e);if(-1==e||g[e+
1]&1)break;++e}-1!=e?(g=d.buf.slice(e),delete d.buf,d.buf=g,d.sync=e,e=!0):e=!1;e&&c(d)})}catch(g){a.exceptionalLogs&&a.log(b+" Error decoding2 "+g)}}var e=this,d={sync:0,retry:0};if(this.webAudio&&!this.webAudioCache[b]){++this.webAudioReq;this.webAudioCache[b]={};var f=new XMLHttpRequest;f.open("GET",b,!0);f.setRequestHeader("X-Requested-With","XMLHttpRequest");f.responseType="arraybuffer";f.onload=function(f){e.verbose&&a.log("webAudio:loaded "+b);++e.webAudioLoaded;d.buf=f.target.response;c(d)};
f.send()}},playWebAudio:function(b){if(this.webAudio){var c=b.src,e=this.webAudioCache[c];if(e&&e.buffer)return e.source=this.webAudio.createBufferSource(),e.source.buffer=e.buffer,e.source.loop=!1,e.source.connect(this.webAudio.destination),e.source.noteOn=e.source.noteOn||e.source.start,e.source.onended=function(){b&&(a.movie.am.verbose&&a.log(b.cpSrc+" ended"),b.ended=!0,b.pause(!1),b.onEndAutoPlayMovie?(delete b.onEndAutoPlayMovie,a.movie.play()):a.isCurrentSlideThreeDSlide()&&a.ThreeDSlide.m_threeDMain.m_hotspotManager.shouldFocus(cpInfoCurrentFrame))},
e.source.noteOn(0),this.verbose&&a.log("webAudio:play "+c),!0}return!1},pauseWebAudio:function(b){if(this.webAudio){var c=this.webAudioCache[b];if(c)return c.source&&(c.source.onended=null,c.source.noteOff=c.source.noteOff||c.source.stop,c.source.noteOff(0),delete c.source),this.verbose&&a.log("webAudio:pause "+b),!0}return!1},pendingAudios:function(){var b=0;this.webAudio&&(b=this.webAudioReq-this.webAudioLoaded);for(var c=0;c<this.MAX_AUDIO_CHANNELS;++c){var e=this.audioChannels[c];0<e.waitCount&&
(!e.ended&&!e.paused)&&++b}0<b?this.numPending!=b&&(this.numPending=b,a.verbose&&a.log(b+" audios pending")):(this.numPending&&a.verbose&&a.log("no audios pending"),this.numPending=0);return b},resetAllWaitingAudios:function(){for(var a=0;a<this.MAX_AUDIO_CHANNELS;++a)this.audioChannels[a].waitCount=0},LRUAudioIndex:function(){for(var a=(new Date).getTime(),c=-1,e=cpInfoCurrentFrame,d=0;d<this.MAX_AUDIO_CHANNELS;++d){var f=this.audioChannels[d];if(f.ended||f.paused)f.ended&&f.endedAt?a>f.endedAt&&
(a=f.endedAt,c=d):f.paused&&f.pausedAt?a>f.pausedAt&&(a=f.pausedAt,c=d):-1==c&&e>f.cpTo&&(c=d)}return c},allocAudioChannel:function(b){this.verbose&&a.log("allocAudioChannel "+b.id+" "+b.src);if(this.webAudio&&this.webAudioCache[b.src])this.verbose&&a.log("found in web-audio cache");else{if(a.multiAudioTrack){for(var c=cpInfoCurrentFrame,e=0;e<this.MAX_AUDIO_CHANNELS;++e){var d=this.audioChannels[e],f=d.cpAudio&&d.cpAudio.from<=c&&d.cpAudio.to>=c;if(d.cpSrc==b.src&&(d.ended||d.paused)&&!f)return null!=
d.cpAudio&&(d.cpAudio.nativeAudio=null,d.cpAudio=null),b.nativeAudio=d,d.cpAudio=b,a.device==a.IDEVICE||a.device==a.ANDROID?d.cploop=b.cploop:d.loop=b.loop,d.ended=!1,d.cpTo=b.to,b.isSeekPending()||b.seekTo(b.from),b.finishPendingSeek(),this.verbose&&a.log("allocAudioChannel found existing @ "+e),!0}for(e=0;e<this.MAX_AUDIO_CHANNELS;++e)if(d=this.audioChannels[e],""==d.cpSrc)return d.waitCount=0,d.cpSrc=b.src,d.src=b.src,b.nativeAudio=d,d.cpAudio=b,a.device==a.IDEVICE||a.device==a.ANDROID?d.cploop=
b.cploop:d.loop=b.loop,d.ended=!1,d.cpTo=b.to,b.finishPendingSeek(),d.load(),this.verbose&&a.log("allocAudioChannel found empty slot @ "+e),!0;c=this.LRUAudioIndex();return-1!=c?(d=this.audioChannels[c],null!=d.cpAudio&&(d.cpAudio.nativeAudio=null,d.cpAudio=null),b.nativeAudio=d,d.cpAudio=b,a.device==a.IDEVICE||a.device==a.ANDROID?d.cploop=b.cploop:d.loop=b.loop,d.ended=!1,d.cpTo=b.to,d.cpSrc!=b.src?(d.waitCount=0,d.cpSrc=b.src,d.src=b.src):b.isSeekPending()||b.seekTo(b.from),b.finishPendingSeek(),
d.load(),this.verbose&&a.log("allocAudioChannel re-used LRU slot @ "+c),!0):!1}d=this.audioChannels[0];d.paused||(null!=d.cpAudio?d.cpAudio.pause():d.pause());null!=d.cpAudio&&(d.cpAudio.nativeAudio=null);b.nativeAudio=d;d.cpAudio=b;d.cploop=b.cploop;d.ended=!1;if(d.cpSrc!=b.src){d.waitCount=0;d.cpSrc=b.src;d.src=b.src;0<d.currentTime&&this.verbose&&a.log("currentTime after changing src = "+d.currentTime+" going to wait...");if(a.IOSFlavor<=a.IOS5)for(;0<d.currentTime;)d.load();else for(c=0;0<d.currentTime&&
100>++c;)a.verbose&&a.log("waiting for "+c+" time"),d.load();this.verbose&&a.log("finished waiting")}else b.isSeekPending()||b.seekTo(b.from);b.finishPendingSeek();d.load()}},allocSingletonAudioChannelForPlayAudioAction:function(b){this.verbose&&a.log("allocSingletonAudioChannelForPlayAudioAction "+b);var c=a.NativeAudio();c.addEventListener("ended",this.onEndedCallBackFn,!1);c.addEventListener("error",this.errorCallBackFn,!1);a.waitForAudio&&(c.addEventListener("waiting",this.waitingFn,!1),c.addEventListener("canplay",
this.canPlayCallBackFn,!1));c.addEventListener("play",this.PlayPauseCallBackFn,!1);c.addEventListener("pause",this.PlayPauseCallBackFn,!1);c.waitCount=0;c.cpSrc=b;c.src=b;a.movie.am.singletonPlayAudio.nativeAudio=c;c.cpAudio=a.movie.am.singletonPlayAudio;c.muted=this.muted;c.volume=this.volume;c.ended=!1;c.load();this.audioViews&&this.audioViews.push(new a.AudioView(c))},load:function(){var b=a.D.pbga;b&&(this.bgAudio=new a.AudioObject(this,"bga",b.src,1,b.to,b.du),b.l&&this.bgAudio.setLoop(!0),this.bgAudio.stopAtProjectEnd=
b.spe,this.bgAudio.lowerVolumeOnSlidesWithAudio=b.lv,this.bgAudio.lowerVolumePercentage=b.vp);b=(a.D.project_main.slideAudios||"").split(",");this.slideAudios={};for(var c=0;c<b.length;++c)if(""!=b[c]){var e=a.D[b[c]],d=new a.AudioObject(this,b[c],e.src,e.from,e.to,e.du);e.l&&d.setLoop(!0,e.lf);this.slideAudios[b[c]]=d}b={};this.objectAudios={};this.eventAudios={};c=(a.D.project_main.slides||"").split(",");for(e=0;e<c.length;++e){for(var f=a.D[c[e]],i=(f.oa||"").split(","),g={},h=!1,d=0;d<i.length;++d)if(""!=
i[d]){var j=a.D[i[d]],h=j.rp?b[i[d]]:void 0;h||(h=new a.AudioObject(this,i[d],j.src,j.from,j.to,j.du,j.rp),h.mouseAudio=j.msa,j.rp&&(b[i[d]]=h));g[i[d]]=h;h=!0}h&&(this.objectAudios[c[e]]=g);f=(f.ea||"").split(",");i={};h=!1;for(d=0;d<f.length;++d)""!=f[d]&&(g=a.D[f[d]],h=g.rp?b[f[d]]:void 0,h||(h=new a.AudioObject(this,f[d],g.src,-1,-1,g.du,g.rp),g.rp&&(b[f[d]]=h)),i[f[d]]=h,h=!0);h&&(this.eventAudios[c[e]]=i)}a.movie.playKeyTap&&(this.keyTap=new a.AudioObject(this,"pkt","ar/KeyClick.mp3",-1,-1,
void 0));this.singletonPlayAudio=new a.AudioObject(this,"spa","",-1,-1,void 0);this.extAudios={};if(a.extAudioCallbacks)for(b=0;b<a.extAudioCallbacks.length;++b)a.extAudioCallbacks[b](this);this.loaded=!0},deviceSpecificFlush:function(){if((a.IDEVICE==a.device||a.device==a.ANDROID)&&a.multiAudioTrack){for(var b=0,c=0;c<this.MAX_AUDIO_CHANNELS;++c){var e=this.audioChannels[c];if(-1!=e.src.indexOf("_cp_n_m_")&&(++b,b>=this.MAX_AUDIO_CHANNELS/2))return}for(c=0;c<this.MAX_AUDIO_CHANNELS;++c)if(e=this.audioChannels[c],
e.ended||e.paused)if(null!=e.cpAudio&&(e.cpAudio.nativeAudio=null,e.cpAudio=null),e.cpSrc="",e.waitCount=0,delete e.cploop,e.ended=!1,delete e.cpTo,-1==e.src.indexOf("_cp_n_m_")){try{e.src="_cp_n_m_"}catch(d){}try{e.load()}catch(f){}}}},deviceSpecificInit:function(){for(var a=0;a<this.MAX_AUDIO_CHANNELS;++a){var c=this.audioChannels[a];c.muted&&(c.muted=!1)}},playKeyTap:function(){this.verbose&&a.log("playKeyTap");if(!this.playWebAudio(this.keyTap)){if(a.device==a.IDEVICE||a.device==a.ANDROID)if(!a.multiAudioTrack&&
(this.audioPlaying||a.movie.stage.VideoPlaying)){this.verbose&&a.log("audioPlaying "+this.audioPlaying+" videoPlaying "+this.videoPlaying);return}!this.muted&&1==a.movie.speed&&(this.eventAudioPlaying=this.keyTap.id,this.keyTap.resetAndPlay())}},seekTo:function(b,c){if(!this.loaded)return-1;var e=a.movie.stage.getSlideIndexForFrame(b);if(-1==e)return-1;this.ssc=0;this.changeCurrentSlide(e,b,!1);if(this.currentSlide){var d=this.objectAudios[this.currentSlide];if(d)for(var f in d){var i=d[f];i&&(i.seekTo(b)||
i.pause())}}this.currentSlideAudio&&(d=this.slideAudios[this.currentSlideAudio])&&(d.seekTo(b)||d.pause());if(this.bgAudio&&(this.bgAudio.paused||this.bgAudio.ended))cpInfoCurrentFrame==a.movie.stage.currentSlide.from?a.playAudioOrVideoChannel_Safari11Workaround(this.bgAudio):this.bgAudio.pause();this.singletonPlayAudio&&c&&this.singletonPlayAudio.pause();return e},changeCurrentSlide:function(b,c,e){this.deviceSpecificFlush();var d=a.movie.stage.getSlideNameForIndex(b);if(!(""==d||this.currentSlide==
d)){this.verbose&&a.log("am changing slide from "+this.currentSlide+" to "+d+" seek = "+e);this.interactiveItemFound=!1;this.ssp=this.ssc=0;if(this.currentSlide){var f=this.objectAudios[this.currentSlide];if(f)for(var i in f){var g=f[i];g.mouseAudio?setTimeout(function(a){return function(){a.pause()}}(g),500):g.pause()}if(f=this.eventAudios[this.currentSlide])for(var h in f)g=f[h],5>=g.id.length||"ClkAd"!=g.id.substring(g.id.length-5)?g.pause():setTimeout(function(a){return function(){a.pause()}}(g),
500);this.singletonPlayAudio.pause();this.currentSlideAudio&&((h=this.slideAudios[this.currentSlideAudio],h.from>c||h.to<c)?(a.movie.stage.is360QSlideIndex(b)||h.pause(),h.nativeAudio&&(h.nativeAudio.cpAudio=null,h.nativeAudio=null),h.ended&&(h.ended=!1),delete this.currentSlideAudio):e&&cpInfoPrevFrame!=c-1&&h.seekTo(c));if(b=this.extAudios[this.currentSlide])for(i in b)b[i].reset()}this.currentSlide=d;this.currentSlideAudio||(this.currentSlideAudio=a.D[this.currentSlide].audioName,(h=this.slideAudios[this.currentSlideAudio])&&
h.seekTo(c));if(e&&this.currentSlide&&(f=this.objectAudios[this.currentSlide]))for(i in f)g=f[i],g.rp?g.ended&&g.seekTo(g.from):g.seekTo(g.from);this.stopBGAudio=(c=a.D[this.currentSlide])&&c.sba?!0:!1}},preload:function(b){if(this.webAudio){var c=this.eventAudios[b];if(c)for(var e in c){var d=c[e];d&&100>d.duration&&this.loadWebAudio(d.src)}this.keyTap&&a.movie.playKeyTap&&this.loadWebAudio(this.keyTap.src);var c=this.objectAudios[b],f;for(f in c)(d=c[f])&&d.mouseAudio&&this.loadWebAudio(d.src)}if(!(a.device==
a.IDEVICE||a.device==a.ANDROID||a.device==a.KINDLE)&&this.loaded&&1==a.movie.speed){this.verbose&&a.log("audio manager preload "+b);if(c=a.D[b])if((c=this.slideAudios[c.audioName])&&!c.nativeAudio&&!this.allocAudioChannel(c,!1))return;c=this.objectAudios[b];for(f in c)if(d=c[f],!d||!d.rp||!d.nativeAudio)if(d&&(!d.mouseAudio||!this.webAudio)&&!this.allocAudioChannel(d,!1))return;if(!this.webAudio){if(c=this.eventAudios[b])for(e in c)if((d=c[e])&&(!d.rp||!d.nativeAudio)&&!this.allocAudioChannel(d,!1))return;
if(this.keyTap&&a.movie.playKeyTap&&!this.allocAudioChannel(this.keyTap,!1))return}b=this.extAudios[b];for(f in b)if((e=b[f])&&!this.allocAudioChannel(e,!1))break}},play:function(b,c){this.pace=null;if(this.loaded&&1==a.movie.speed){if((a.device==a.IDEVICE||a.device==a.ANDROID)&&!a.multiAudioTrack){var e=this.audioChannels[0];if(!e.paused&&!e.ended&&e.cpAudio&&e.cpAudio.id==this.eventAudioPlaying||a.movie.stage.VideoPlaying)return}var e=!1,d=null,f=null;if(!c){if(this.currentSlide){var i=this.objectAudios[this.currentSlide];
if(i)for(var g in i){var h=i[g];h&&!h.ended&&(h.from<=b&&h.to>=b||h.shownAt&&h.shownAt<=b&&h.shownAt+h.to-h.from>=b||h.rp?((a.device==a.IDEVICE||a.device==a.ANDROID)&&!a.multiAudioTrack?null==d&&(d=h):(null==d&&(d=h),a.playAudioOrVideoChannel_Safari11Workaround(h)),e=!0):h.mouseAudio?this.webAudio&&h.pause():h.pause())}}if(this.currentSlideAudio&&(g=this.slideAudios[this.currentSlideAudio])&&!g.ended)g.from<=b&&g.to>=b?(a.device==a.IDEVICE||a.device==a.ANDROID)&&!a.multiAudioTrack?(null==d&&(f=d=
g),1!=this.ssc&&1!=this.ssp&&(e=!0)):1!=this.ssc&&1!=this.ssp?(g.play(),null==d&&(d=g),f=g,e=!0):g.pause():g.pause()}this.bgAudio&&((e?this.bgAudio.lowerVolumeOnSlidesWithAudio&&this.bgAudio.nativeAudio&&(this.bgAudio.nativeAudio.volume=this.volume*(this.bgAudio.lowerVolumePercentage/100)):this.bgAudio.nativeAudio&&(this.bgAudio.nativeAudio.volume=this.volume),(a.device==a.IDEVICE||a.device==a.ANDROID)&&!a.multiAudioTrack)?null==d&&(d=this.bgAudio):this.stopBGAudio?this.bgAudio.pause():a.playAudioOrVideoChannel_Safari11Workaround(this.bgAudio));
this.audioPlaying=null;if((a.device==a.IDEVICE||a.device==a.ANDROID)&&d&&!a.multiAudioTrack)f==d?1!=this.ssc&&1!=this.ssp&&(this.audioPlaying=d.id,d.play()):this.bgAudio==d?this.stopBGAudio?d.pause():(this.audioPlaying=d.id,d.play()):(this.audioPlaying=d.id,d.play());a.IDEVICE==a.device||a.device==a.ANDROID?1==a.movie.speed&&(d&&d!=this.bgAudio&&!d.shownAt&&!d.ended&&!d.paused&&!d.loop&&d.nativeAudio&&0<d.nativeAudio.currentTime?(this.pace=d.from+d.nativeAudio.currentTime*cpInfoFPS,this.pace>d.to&&
(this.pace=d.to)):this.pace=a.movie.vdm.pace()):1==a.movie.speed&&!this.interactiveItemFound&&(f&&!f.ended&&!f.paused&&!f.loop&&f.nativeAudio&&0<f.nativeAudio.currentTime?(this.pace=f.from+f.nativeAudio.currentTime*cpInfoFPS,this.pace>f.to&&(this.pace=a.movie.vdm.pace()?null:f.to)):this.pace=a.movie.vdm.pace())}},pause:function(b){this.reasonForPause=b;if((b==a.ReasonForPause.PLAYBAR_ACTION||b==a.ReasonForPause.CPCMNDPAUSE||b==a.ReasonForPause.MOVIE_REWIND_STOP||b==a.ReasonForPause.EVENT_VIDEO_PAUSE||
b==a.ReasonForPause.ONLY_ONE_MEDIUM_CAN_PLAY||b==a.ReasonForPause.PPTX_PAUSE_FOR_ONCLICK_ANIMATION||b==a.ReasonForPause.CPCMNDGOTOFRAME||b==a.ReasonForPause.ACTION_CHOICE)&&this.currentSlide){var c=this.objectAudios[this.currentSlide];if(c&&b!=a.ReasonForPause.ACTION_CHOICE)for(var e in c)c[e].pause();if(c=this.extAudios[this.currentSlide])for(e in c)c[e].pause(b)}e=cpInfoCurrentFrame;this.currentSlideAudio&&(c=this.slideAudios[this.currentSlideAudio])&&(c.from<=e&&c.to>=e?b==a.ReasonForPause.INTERACTIVE_ITEM?
1==this.ssp&&c.pause():(b==a.ReasonForPause.PLAYBAR_ACTION||b==a.ReasonForPause.CPCMNDPAUSE||b==a.ReasonForPause.MOVIE_REWIND_STOP||b==a.ReasonForPause.EVENT_VIDEO_PAUSE||b==a.ReasonForPause.ONLY_ONE_MEDIUM_CAN_PLAY||b==a.ReasonForPause.PPTX_PAUSE_FOR_ONCLICK_ANIMATION||b==a.ReasonForPause.CPCMNDGOTOFRAME||b==a.ReasonForPause.WK_EXIT_FULL_SCREEN||b==a.ReasonForPause.FEEDBACK_ITEM)&&c.pause():c.pause());this.bgAudio&&(b==a.ReasonForPause.MOVIE_ENDED?this.bgAudio.stopAtProjectEnd&&this.bgAudio.pause():
(b==a.ReasonForPause.PLAYBAR_ACTION||b==a.ReasonForPause.MOVIE_REWIND_STOP||b==a.ReasonForPause.EVENT_VIDEO_PAUSE||b==a.ReasonForPause.ONLY_ONE_MEDIUM_CAN_PLAY)&&this.bgAudio.pause())},pauseCurrentSlideAudioForInteractiveClick:function(){this.verbose&&a.log("pause currentSlide Audio for SSC");var b=cpInfoCurrentFrame;if(this.currentSlideAudio){var c=this.slideAudios[this.currentSlideAudio];c&&(c.from<=b&&c.to>=b)&&(this.ssc=1,c.pause())}},mute:function(a){var a=!0==a||0<a?!0:!1,c=document.getElementById("playbar");
a&&void 0!=c.mute&&c.mute();!a&&void 0!=c.unmute&&c.unmute();for(c=0;c<this.MAX_AUDIO_CHANNELS;++c)this.audioChannels[c].muted=a;this.muted=a},setVolume:function(a){0>a&&(a=0);1<a&&(a=1);this.volume=a;for(var c=0;c<this.MAX_AUDIO_CHANNELS;++c)this.audioChannels[c].volume=a},playPauseEventAudio:function(b,c){if(c&&(a.device==a.IDEVICE||a.device==a.ANDROID)&&!a.multiAudioTrack)if(this.audioPlaying||a.movie.stage.VideoPlaying)return;if((!c||!(this.muted||1!=a.movie.speed))&&this.currentSlide){var e=
this.eventAudios[this.currentSlide];if(e){var d=e[b];d&&(c?(this.eventAudioPlaying=d.id,d.resetAndPlay(),5<d.id.length&&"ClkAd"==d.id.substring(d.id.length-5)&&(d.duration?setTimeout(function(){d.pause()},1E3*(d.duration+0.2)):setTimeout(function(){d.pause()},500))):d.pause())}}},showHideObjectAudio:function(a,c){if(this.currentSlide){var e=this.objectAudios[this.currentSlide];e&&(e=e[a])&&(c?e.hidden&&e.show():e.hidden||e.hide())}},doesAudioStartBetween:function(b,c){if(this.currentSlide){var e=
this.objectAudios[this.currentSlide];if(e)for(var d in e){var f=e[d];if(f&&!f.ended&&f.from>=b&&f.from<=c)return this.verbose&&a.log("objAudio "+f.id+" starts between "+b+" & "+c),!0}}return this.currentSlideAudio&&(e=this.slideAudios[this.currentSlideAudio])&&!e.ended&&e.from>=b&&e.from<=c?(this.verbose&&a.log("slideAudio "+e.id+" starts between "+b+" & "+c),!0):!1},updateAudioViews:function(){if(this.viewAudio&&this.audioViews)for(var a in this.audioViews)this.audioViews[a].update()}};a.NativeVideo=
function(b){makeItDummyNativeVideo=function(b){b.currentTime=0;b.duration=0;b.paused=!0;b.ended=!0;b.defaultPlaybackRate=0;b.playbackRate=1;b.played=!1;b.seeking=!1;b.seekable=!1;b.fastSeek=!1;b.src="";b.crossorigin=!1;b.preload=!1;b.autoplay=!1;b.mediagroup="";b.loop=!1;b.muted=!1;b.controls=!1;a.setPlaysInlineAttrib(b,!1);b.style={};b.load=function(){};b.play=function(){};b.pause=function(){};b.addEventListener=function(){};b.removeEventListener=function(){}};var c=a.newElem("video");if("undefined"===
typeof Video||!Video)(void 0==c.load||void 0==c.play||void 0==c.pause||void 0==c.addEventListener)&&makeItDummyNativeVideo(c);b&&(c.id=b);return c};a.getYoutubeVideoIdFromURL=function(a){var c=document.createElement("a");c.href=a;if("youtu.be"==c.hostname)return c.pathname.substring(1);a=c.search.substring(1).split("&");for(c=0;c<a.length;c++){var e=a[c].split("=");if(2==e.length&&"v"===e[0])return e[1]}return""};a.getVimeoVideoIdFromURL=function(a){var c=document.createElement("a");c.href=a;return c.hostname.includes("vimeo.com")?
c.pathname.substring(1):""};a.YoutubeVideo=function(b,c,e,d){if(window.CPYTAPIReady){if("undefined"===typeof a.autoPlayUnsupportedOnPrimeApp){var f=a.getParameterByName("autoplay_unsupported");a.autoPlayUnsupportedOnPrimeApp=!f||""===f||"0"==f||"false"===f?!1:!0}this.m_width=200<=c?c:640;this.m_height=200<=e?e:390;d=d?d:document.body;this.m_videoId=b?b:"laC6Brkfmy412";a.ytVideoIDCounter=a.ytVideoIDCounter||0;this.muted=this.paused=!1;this.getDiv=function(){return this.ytVideoContainerDiv};this.init=
function(b){this.cpSrc=this.src="https://www.youtube.com/watch?v="+this.m_videoId;this.waitCount=0;this.playerReady=!1;this.pendingTasksQueue=[];this.ytVideoContainerDiv=document.createElement("div");a.ytVideoIDCounter++;this.ytVideoContainerDiv.id="cp-ytvideo-container"+a.ytVideoIDCounter;this.ytVideoContainerDiv.style.position="absolute";this.ytVideoContainerDiv.style.width="100%";this.ytVideoContainerDiv.style.height="100%";this.userInitiatedThePlay=!1;var c=document.createElement("div");c.id=
"cp-ytvideo-"+a.ytVideoIDCounter;this.ytIFrameId=c.id;this.ytVideoContainerDiv.appendChild(c);b.appendChild(this.ytVideoContainerDiv);this.m_YTPlayer=new YT.Player(c.id,{height:"100%",width:"100%",videoId:this.m_videoId,playerVars:{autoplay:0,controls:0,rel:0,disablekb:1,modestbranding:1,fs:0,playsinline:1,enablejsapi:1},events:{onReady:this.onPlayerReady.bind(this),onStateChange:this.onPlayerStateChange.bind(this),onError:this.onPlayerError.bind(this)}});this.m_shouldShow=!0;a.movie.vdm.waitingFn.call(this)};
this.onPlayerReady=function(){for(this.playerReady=!0;0<this.pendingTasksQueue.length;)this.pendingTasksQueue.shift()();a.movie.vdm.canPlayCallBackFn.call(this)};this.onPlayerStateChange=function(b){console.log("onPlayerStateChange: "+b.data);b.data==YT.PlayerState.BUFFERING?(!this.seekPending||!a.movie.paused)&&a.movie.vdm.waitingFn.call(this):a.movie.vdm.canPlayCallBackFn.call(this);this.paused=b.data==YT.PlayerState.PAUSED?!0:!1;this.seekPending&&a.movie.paused&&b.data==YT.PlayerState.PLAYING?
this.pause():this.seekPending&&(!a.movie.paused&&this.paused)&&this.play();if(b.data==YT.PlayerState.PLAYING||b.data==YT.PlayerState.PAUSED||b.data==YT.PlayerState.ENDED)this.seekPending=!1;this.setMuted(a.movie.vdm.muted)};this.onPlayerError=function(b){console.log("onPlayerError: "+b.data);a.movie.vdm.errorCallBackFn.call(this)};this.play=function(){if(this.playerReady){try{if((a.IDEVICE==a.device||a.autoPlayUnsupportedOnPrimeApp)&&!this.userInitiatedThePlay){var b=this;a.pauseMovieAndShowPlayIconOverlay(function(){a.movie.play();
b.m_YTPlayer.playVideo();b.userInitiatedThePlay=!0})}else this.m_YTPlayer.playVideo()}catch(c){a.movie.vdm.verbose&&console.error("Error in play: "+c)}this.paused=!1}else this.pendingTasksQueue.push(function(){this.play()}.bind(this))};this.pause=function(){if(this.playerReady){this.paused=!0;try{this.m_YTPlayer.pauseVideo()}catch(b){a.movie.vdm.verbose&&console.error("Error in pause: "+b)}}else this.pendingTasksQueue.push(function(){this.pause()}.bind(this))};this.stop=function(){if(this.playerReady)try{this.m_YTPlayer.stopVideo(),
this.ended=!0}catch(b){a.movie.vdm.verbose&&console.error("Error in stop: "+b)}else this.pendingTasksQueue.push(function(){this.stop()}.bind(this))};this.seekToTime=function(b){if(this.playerReady)try{this.seekPending=!0,this.m_YTPlayer.seekTo(b,!0)}catch(c){a.movie.vdm.verbose&&console.error("Error in seekToTime: "+c)}else this.pendingTasksQueue.push(function(a){this.seekToTime(a)}.bind(this,b))};this.onPushOverlaySlide=function(){this.seekPending=!1};this.loadVideo=function(b){if(this.playerReady)try{var c=
a.getYoutubeVideoIdFromURL(b);this.m_YTPlayer.loadVideoById(c)}catch(d){a.movie.vdm.verbose&&console.error("Error in loadVideo: "+d)}else this.pendingTasksQueue.push(function(a){this.loadVideo(a)}.bind(this,b))};this.show=function(a){this.m_shouldShow=a;this.ytVideoContainerDiv.style.display=a?"block":"none";a?this.play():this.pause()};this.hide=function(){this.show(!1)};this.setMuted=function(b){if(this.playerReady)try{b?this.m_YTPlayer.mute():this.m_YTPlayer.unMute(),this.muted=this.m_YTPlayer.isMuted()}catch(c){a.movie.vdm.verbose&&
console.error("Error in setMuted: "+c)}else this.pendingTasksQueue.push(function(a){this.setMuted(a)}.bind(this,b))};try{this.init(d)}catch(i){console.error("Youtube video init failed: "+i)}}else console.error("CPYTAPI not ready")};a.VimeoVideo=function(b,c,e,d){if("undefined"===typeof a.autoPlayUnsupportedOnPrimeApp){var f=a.getParameterByName("autoplay_unsupported");a.autoPlayUnsupportedOnPrimeApp=!f||""===f||"0"==f||"false"===f?!1:!0}this.m_width=200<=c?c:640;this.m_height=200<=e?e:390;d=d?d:document.body;
this.m_videoUrl=b?b:"";a.vimeoVideoIDCounter=a.vimeoVideoIDCounter||0;this.muted=this.paused=!1;this.isFirstProgress=!0;this.getDiv=function(){return this.vimeoVideoContainerDiv};this.init=function(b){this.cpSrc=this.src=this.m_videoUrl;this.waitCount=0;this.playerReady=!1;this.pendingTasksQueue=[];this.vimeoVideoContainerDiv=document.createElement("div");a.vimeoVideoIDCounter++;this.vimeoVideoContainerDiv.id="cp-vimeovideo-container"+a.vimeoVideoIDCounter;this.vimeoVideoContainerDiv.style.position=
"absolute";this.vimeoVideoContainerDiv.style.width="100%";this.vimeoVideoContainerDiv.style.height="100%";this.userInitiatedThePlay=!1;var c=document.createElement("div");c.id="cp-vimeovideo-"+a.vimeoVideoIDCounter;this.vimeoIFrameId=c.id;this.show(!1);this.vimeoVideoContainerDiv.appendChild(c);b.appendChild(this.vimeoVideoContainerDiv);a.movie.vdm.waitingFn.call(this);this.m_vimeoPlayer=new Vimeo.Player(c.id,{height:this.m_height,width:this.m_width,url:this.m_videoUrl,autoplay:!1,transparent:!0,
muted:!0,responsive:!0,muted:!0,playsinline:!0,background:!0});this.m_shouldShow=!0;this.m_vimeoPlayer.on("error",this.onPlayerError);this.m_vimeoPlayer.on("bufferstart",this.onBufferStart.bind(this));this.m_vimeoPlayer.on("bufferend",this.onBufferEnd.bind(this));this.m_vimeoPlayer.on("progress",this.onProgress.bind(this));this.initiatePlayer()};this.initiatePlayer=function(){var b=this;this.m_vimeoPlayer.ready().then(function(){b.playerReady=!0;b.setMuted(a.movie.vdm.muted);for(window.CPVimeoAPIReady=
!0;0<b.pendingTasksQueue.length;)b.pendingTasksQueue.shift()()})};this.onBufferStart=function(){a.movie.vdm.waitingFn.call(this)};this.onProgress=function(){!0===this.isFirstProgress&&(console.log("Progress Called"),this.pause(),a.movie.vdm.canPlayCallBackFn.call(this),this.isFirstProgress=!1)};this.onBufferEnd=function(){a.movie.vdm.canPlayCallBackFn.call(this)};this.onVideoLoaded=function(){console.log("Video Loaded")};this.onPlayerError=function(b){console.log("onPlayerError: "+b.data);a.movie.vdm.errorCallBackFn.call(this)};
this.play=function(){if(this.playerReady){this.vimeoVideoContainerDiv.style.display="block";this.vimeoVideoContainerDiv.children[0].children[0].style.position="unset";try{if((a.IDEVICE==a.device||a.autoPlayUnsupportedOnPrimeApp)&&!this.userInitiatedThePlay){var b=this;a.pauseMovieAndShowPlayIconOverlay(function(){a.movie.play();b.m_vimeoPlayer.play();b.userInitiatedThePlay=!0})}else this.m_vimeoPlayer.play()}catch(c){a.movie.vdm.verbose&&console.error("Error in play: "+c)}this.paused=!1}else this.pendingTasksQueue.push(function(){this.play()}.bind(this))};
this.pause=function(){if(this.playerReady){this.paused=!0;try{this.m_vimeoPlayer.pause()}catch(b){a.movie.vdm.verbose&&console.error("Error in pause: "+b)}}else this.pendingTasksQueue.push(function(){this.pause()}.bind(this))};this.stop=function(){if(this.playerReady)try{this.m_vimeoPlayer.setCurrentTime(0),this.m_vimeoPlayer.pause(),this.ended=!0}catch(b){a.movie.vdm.verbose&&console.error("Error in stop: "+b)}else this.pendingTasksQueue.push(function(){this.stop()}.bind(this))};this.seekToTime=
function(b){console.log("Seek time: "+b);if(this.playerReady)try{this.seekPending=!0,this.m_vimeoPlayer.setCurrentTime(b)}catch(c){a.movie.vdm.verbose&&console.error("Error in seekToTime: "+c)}else this.pendingTasksQueue.push(function(a){this.seekToTime(a)}.bind(this,b))};this.onPushOverlaySlide=function(){this.seekPending=!1};this.loadVideo=function(b){if(this.playerReady)try{var c=a.getVimeoVideoIdFromURL(b);this.m_vimeoPlayer.loadVideo(c)}catch(d){a.movie.vdm.verbose&&console.error("Error in loadVideo: "+
d)}else this.pendingTasksQueue.push(function(a){this.loadVideo(a)}.bind(this,b))};this.show=function(a){this.m_shouldShow=a;this.vimeoVideoContainerDiv.style.display=a?"block":"none";a?this.play():this.pause()};this.hide=function(){this.show(!1)};this.setMuted=function(b){if(this.playerReady)try{b?this.m_vimeoPlayer.setVolume(0):this.m_vimeoPlayer.setVolume(0.7),this.muted=b}catch(c){a.movie.vdm.verbose&&console.error("Error in setMuted: "+c)}else this.pendingTasksQueue.push(function(a){this.setMuted(a)}.bind(this,
b))};try{this.init(d)}catch(i){console.error("Vimeo video init failed: "+i)}};a.VideoManager=function(){a.movie.vdm=this;this.viewVideo=this.verbose=this.loaded=!1;this.addEventListener=function(b){a.em.addEventListener(this.syncVideoOnPageVisibilityChange,b)};this.syncVideoOnPageVisibilityChange=function(b){if(!0===a.pageSetInvisibile){a.pageSetInvisibile=!1;var c=function(a,b,c){a&&0.05<=Math.abs(c-((b-a.from)/cpInfoFPS+a.seek_From))&&a.seekTo(b)},e=b.Data.currentFrameInfo,g=0,h;this.slideVideoChannel&&
this.slideVideoChannel.cpVideo&&(h=this.slideVideoChannel.cpVideo,g=h.nativeVideo.currentTime,c(h,e,g));this.tocVideoChannel&&this.tocVideoChannel.cpVideo&&(h=this.tocVideoChannel.cpVideo,g=h.nativeVideo.currentTime,c(h,e,g));this.demoVideo&&this.demoVideo.cpVideo&&(h=this.demoVideo.cpVideo,g=h.nativeVideo.currentTime,c(h,e,g));this.ThreeDBgVideo&&(h=this.ThreeDBgVideo,g=h.nativeVideo.currentTime,c(h,e,g));this.youtubeSlideVideoChannel&&this.youtubeSlideVideoChannel.cpVideo&&(h=this.youtubeSlideVideoChannel.cpVideo,
g=h.nativeVideo.m_YTPlayer.getCurrentTime(),c(h,e,g));this.vimeoSlideVideoChannel&&this.vimeoSlideVideoChannel.cpVideo&&(h=this.vimeoSlideVideoChannel.cpVideo,h.nativeVideo.m_VimeoPlayer.getCurrentTime().then(function(a){g=a;c(h,e,g)}));a.em.removeEventListener(this.syncVideoOnPageVisibilityChange,a.NON_SMOOTH_FRAME_ADVANCE_EVENT)}}.bind(this);this.errorCallBackFn=function(b){-1==this.src.indexOf("_cp_n_m_")&&(a.exceptionalLogs&&(a.log("src = "+this.src+" error code = "+(this.error?this.error.code:
"NULL")+" n/w state = "+this.networkState),a.log(b)),this.cpVideo&&(b=a.D[this.cpVideo.id],b.psv&&(b.pausedOnce=!0)),this.waitCount=0)};this.waitingFn=function(){++this.waitCount;a.movie.vdm.verbose&&a.log("wait "+this.waitCount+" "+this.cpSrc+" "+(this.cpVideo?this.cpVideo.id:""))};this.canPlayCallBackFn=function(){if(!1==this.CPcanPlay){var b=100;a.device==a.ANDROID?b=2E3:(this.CPcanPlay=!0,this.waitCount=0);var c=this;setTimeout(function(){c.CPcanPlay=true;c.waitCount=0;var b=cpInfoCurrentFrame;
if(c.from<=b&&b<=c.to){c.style.position="static";c.style.left="0px";c.CPtoc&&a.toc.rootObj.showVideo(true)}},b)}else this.waitCount=0;this.cpVideo&&this.cpVideo.displayForDurationOfVideo&&(a.D[this.cpVideo.parentDivName].to=this.duration*a.movie.fps);a.movie.vdm.verbose&&a.log("cnPly "+this.cpSrc+" "+(this.cpVideo?this.cpVideo.id:""))};this.onEndedCallBackFn=function(){this.waitCount=0;this.cploop?(a.movie.vdm.verbose&&a.log(this.cpSrc+" loop"),this.cpVideo&&(this.cpVideo.pause(),this.cpVideo.seekTo(this.cpVideo.from),
this.cpVideo.play())):(a.movie.vdm.verbose&&a.log(this.cpSrc+" ended"),this.cpVideo?this.cpVideo.autoRewind?(this.cpVideo.pause(),this.cpVideo.seekTo(this.cpVideo.from)):(this.cpVideo.ended=!0,this.endedAt=(new Date).getTime(),this.cpVideo.pause()):this.endedAt=(new Date).getTime(),a.movie.paused?a.ReasonForPause.EVENT_VIDEO_PAUSE==a.movie.reasonForPause&&(this.cpVideo.nativeVideo&&(Document&&Document.exitFullscreen?Document.exitFullscreen():Document&&Document.webkitExitFullscreen?Document.webkitExitFullscreen():
this.cpVideo.nativeVideo.exitFullscreen?this.cpVideo.nativeVideo.exitFullscreen():this.cpVideo.nativeVideo.msExitFullscreen?this.cpVideo.nativeVideo.msExitFullscreen():this.cpVideo.nativeVideo.mozCancelFullScreen&&this.cpVideo.nativeVideo.mozCancelFullScreen()),a.movie.play()):this.cpVideo&&(this.cpVideo.actualParent.pausedOnce=!0),this.cpVideo&&this.cpVideo.displayForDurationOfVideo&&this.cpVideo.reset())};this.PlayPauseCallBackFn=function(){this.paused&&(this.pausedAt=(new Date).getTime());this.cpVideo&&
(this.cpVideo.paused=this.paused)};if(a.device==a.IDEVICE||a.device==a.ANDROID){this.slideVideoChannel=new a.NativeVideo("slidevid");this.slideVideoChannel.cpSrc="";this.slideVideoChannel.cpVideo=null;this.slideVideoChannel.ended=!1;a.setPlaysInlineAttrib(this.slideVideoChannel,!0);this.slideVideoChannel.addEventListener("error",this.errorCallBackFn,!1);if(a.IOSMajor>=a.IOS5||a.device==a.ANDROID)this.slideVideoChannel.addEventListener("waiting",this.waitingFn,!1),this.slideVideoChannel.addEventListener("canplay",
this.canPlayCallBackFn,!1);this.slideVideoChannel.addEventListener("play",this.PlayPauseCallBackFn,!1);this.slideVideoChannel.addEventListener("pause",this.PlayPauseCallBackFn,!1);this.slideVideoChannel.waitCount=0;var b=this.slideVideoChannel;this.slideVideoChannel.addEventListener("webkitbeginfullscreen",function(){""!=b.src&&("_cp_n_m_"!=b.src&&!b.paused)&&(b.pauseMovieOnExitFullScreen=!0)},!1);this.slideVideoChannel.addEventListener("webkitendfullscreen",function(){b.pauseMovieOnExitFullScreen&&
(b.pauseMovieOnExitFullScreen=!1,a.movie.pause(a.ReasonForPause.WK_EXIT_FULL_SCREEN))},!1)}else this.slideVideoChannel0=new a.NativeVideo("slidevid0"),this.slideVideoChannel0.cpSrc="",this.slideVideoChannel0.cpVideo=null,this.slideVideoChannel0.ended=!1,this.slideVideoChannel0.addEventListener("error",this.errorCallBackFn,!1),this.slideVideoChannel0.addEventListener("waiting",this.waitingFn,!1),this.slideVideoChannel0.addEventListener("canplay",this.canPlayCallBackFn,!1),this.slideVideoChannel0.addEventListener("play",
this.PlayPauseCallBackFn,!1),this.slideVideoChannel0.addEventListener("pause",this.PlayPauseCallBackFn,!1),this.slideVideoChannel0.waitCount=0,this.slideVideoChannel1=new a.NativeVideo("slidevid1"),this.slideVideoChannel1.cpSrc="",this.slideVideoChannel1.cpVideo=null,this.slideVideoChannel1.ended=!1,this.slideVideoChannel1.addEventListener("error",this.errorCallBackFn,!1),this.slideVideoChannel1.addEventListener("waiting",this.waitingFn,!1),this.slideVideoChannel1.addEventListener("canplay",this.canPlayCallBackFn,
!1),this.slideVideoChannel1.addEventListener("play",this.PlayPauseCallBackFn,!1),this.slideVideoChannel1.addEventListener("pause",this.PlayPauseCallBackFn,!1),this.slideVideoChannel1.waitCount=0,this.slideVideoChannel=this.slideVideoChannel0;this.ThreeDBgVideoChannel||(this.ThreeDBgVideoChannel=document.createElement("video"));this.ThreeDBgFeedbackVideoChannel||(this.ThreeDBgFeedbackVideoChannel=document.createElement("video"));if(a.loadedModules.toc)if(a.device==a.IDEVICE||a.device==a.ANDROID){this.tocVideoChannel=
document.getElementById("tocVideo");this.tocVideoChannel||(this.tocVideoChannel=new a.NativeVideo("tocVideo"));this.tocVideoChannel.cpSrc="";this.tocVideoChannel.cpVideo=null;this.tocVideoChannel.ended=!1;this.tocVideoChannel.addEventListener("error",this.errorCallBackFn,!1);if(a.IOSMajor>=a.IOS5||a.device==a.ANDROID)this.tocVideoChannel.addEventListener("waiting",this.waitingFn,!1),this.tocVideoChannel.addEventListener("canplay",this.canPlayCallBackFn,!1);this.tocVideoChannel.addEventListener("play",
this.PlayPauseCallBackFn,!1);this.tocVideoChannel.addEventListener("pause",this.PlayPauseCallBackFn,!1);this.tocVideoChannel.waitCount=0}else this.tocVideoChannel0=document.getElementById("tocVideo"),this.tocVideoChannel0||(this.tocVideoChannel0=new a.NativeVideo("tocVideo")),this.tocVideoChannel0.cpSrc="",this.tocVideoChannel0.cpVideo=null,this.tocVideoChannel0.ended=!1,this.tocVideoChannel0.addEventListener("error",this.errorCallBackFn,!1),this.tocVideoChannel0.addEventListener("waiting",this.waitingFn,
!1),this.tocVideoChannel0.addEventListener("canplay",this.canPlayCallBackFn,!1),this.tocVideoChannel0.addEventListener("play",this.PlayPauseCallBackFn,!1),this.tocVideoChannel0.addEventListener("pause",this.PlayPauseCallBackFn,!1),this.tocVideoChannel0.waitCount=0,this.tocVideoChannel1=new a.NativeVideo("tocVideo1"),this.tocVideoChannel1.cpSrc="",this.tocVideoChannel1.cpVideo=null,this.tocVideoChannel1.ended=!1,this.tocVideoChannel1.addEventListener("error",this.errorCallBackFn,!1),this.tocVideoChannel1.addEventListener("waiting",
this.waitingFn,!1),this.tocVideoChannel1.addEventListener("canplay",this.canPlayCallBackFn,!1),this.tocVideoChannel1.addEventListener("play",this.PlayPauseCallBackFn,!1),this.tocVideoChannel1.addEventListener("pause",this.PlayPauseCallBackFn,!1),this.tocVideoChannel1.waitCount=0,this.tocVideoChannel=this.tocVideoChannel0;this.MAX_VIDEO_CHANNELS=a.device==a.IDEVICE||a.device==a.ANDROID?2:10;this.videoChannels=[];for(var c=0;c<this.MAX_VIDEO_CHANNELS;++c){var e=new a.NativeVideo("cpnvc"+c);e.cpSrc=
"";e.cpVideo=null;e.ended=!1;e.addEventListener("ended",this.onEndedCallBackFn,!1);e.addEventListener("error",this.errorCallBackFn,!1);if(a.device==a.DESKTOP||a.device==a.IDEVICE&&a.IOSMajor>=a.IOS5||a.device==a.ANDROID)e.addEventListener("waiting",this.waitingFn,!1),e.addEventListener("canplay",this.canPlayCallBackFn,!1);e.addEventListener("play",this.PlayPauseCallBackFn,!1);e.addEventListener("pause",this.PlayPauseCallBackFn,!1);e.waitCount=0;this.videoChannels[c]=e}};a.VideoManager.prototype={pendingVideos:function(){var b=
0,c=this.youtubeSlideVideoChannel;c&&(0<c.waitCount&&!c.ended&&!c.paused)&&++b;(c=this.vimeoSlideVideoChannel)&&(0<c.waitCount&&!c.ended&&!c.paused)&&++b;c=this.slideVideoChannel;0<c.waitCount&&(!c.ended&&!c.paused)&&++b;(c=this.tocVideoChannel)&&(0<c.waitCount&&!c.ended&&!c.paused)&&++b;for(c=0;c<this.MAX_VIDEO_CHANNELS;++c){var e=this.videoChannels[c];0<e.waitCount&&(!e.ended&&!e.paused)&&++b}0<b?this.numPending!=b&&(this.numPending=b,a.verbose&&a.log(b+" videos pending")):(this.numPending&&a.verbose&&
a.log("no videos pending"),this.numPending=0);return b},changeCurrentSlide:function(){this.ThreeDBgVideo&&!a.movie.stage.hasOverlaySlide()&&this.ThreeDBgVideo.unloadVideo();a.isCurrentSlideThreeDSlide()&&a.ThreeDSlide.m_threeDMain&&a.ThreeDSlide.m_threeDMain.m_hotspotManager.closeActiveVideoFeedback()},resetAllWaitingVideos:function(){for(var a=0;a<this.MAX_VIDEO_CHANNELS;++a)this.videoChannels[a].waitCount=0;this.slideVideoChannel&&(this.slideVideoChannel.waitCount=0);this.slideVideoChannel0&&(this.slideVideoChannel0.waitCount=
0);this.slideVideoChannel1&&(this.slideVideoChannel1.waitCount=0);this.youtubeSlideVideoChannel&&(this.youtubeSlideVideoChannel.waitCount=0);this.vimeoSlideVideoChannel&&(this.vimeoSlideVideoChannel.waitCount=0)},mute:function(a){var c;c=!0==a||0<a?!0:!1;for(var e in this.videoChannels)this.videoChannels[e].muted=c;this.slideVideoChannel.muted=c;this.tocVideoChannel&&(this.tocVideoChannel.muted=c);this.youtubeSlideVideoChannel&&this.youtubeSlideVideoChannel.setMuted&&this.youtubeSlideVideoChannel.setMuted(a);
this.vimeoSlideVideoChannel&&this.vimeoSlideVideoChannel.setMuted&&this.vimeoSlideVideoChannel.setMuted(a);this.ThreeDBgVideoChannel&&(this.ThreeDBgVideoChannel.muted=c);this.ThreeDBgFeedbackVideoChannel&&(this.ThreeDBgFeedbackVideoChannel.muted=c);this.muted=c},setVolume:function(a){0>a&&(a=0);1<a&&(a=1);this.volume=a;for(var c in this.videoChannels)this.videoChannels[c].volume=a;this.slideVideoChannel.volume=a;this.tocVideoChannel&&(this.tocVideoChannel.volume=a)},LRUVideoIndex:function(){for(var a=
(new Date).getTime(),c=-1,e=cpInfoCurrentFrame,d=0;d<this.MAX_VIDEO_CHANNELS;++d){var f=this.videoChannels[d];if(f.ended||f.paused)f.ended&&f.endedAt?a>f.endedAt&&(a=f.endedAt,c=d):f.paused&&f.pausedAt?a>f.pausedAt&&(a=f.pausedAt,c=d):-1==c&&e>f.cpTo&&(c=d)}return c},allocVideoChannel:function(b){this.verbose&&a.log("allocVideoChannel "+b.id+" "+b.src);if(a.IDEVICE==a.device||a.device==a.ANDROID){this._LRUVideoIndex=void 0==this._LRUVideoIndex?0:1-this._LRUVideoIndex;this.verbose&&a.log("picking video @ index "+
this._LRUVideoIndex);var c=this.videoChannels[this._LRUVideoIndex];null!=c.cpVideo&&(c.cpVideo.nativeVideo=null);b.nativeVideo=c;c.cpVideo=b;c.cploop=b.cploop;c.ended=!1;c.waitCount=0;a.setSrcAndLoadVideoChannel(c,b.src)}else{for(var e=cpInfoCurrentFrame,d=0;d<this.MAX_VIDEO_CHANNELS;++d){var c=this.videoChannels[d],f=c.cpVideo&&c.cpVideo.from<=e&&c.cpVideo.to>=e;if(c.cpSrc==b.src&&(c.ended||c.paused)&&!f)return null!=c.cpVideo&&(c.cpVideo.nativeVideo=null,c.cpVideo=null),b.nativeVideo=c,c.cpVideo=
b,c.loop=b.loop,c.ended=!1,c.cpTo=b.to,b.isSeekPending()||b.seekTo(b.from),b.finishPendingSeek(),this.verbose&&a.log("allocVideoChannel found existing @ "+d),!0}for(d=0;d<this.MAX_VIDEO_CHANNELS;++d)if(c=this.videoChannels[d],""==c.cpSrc)return c.waitCount=0,b.nativeVideo=c,c.cpVideo=b,c.loop=b.loop,c.ended=!1,c.cpTo=b.to,b.finishPendingSeek(),a.setSrcAndLoadVideoChannel(c,b.src),this.verbose&&a.log("allocVideoChannel found empty slot @ "+d),!0;e=this.LRUVideoIndex();return-1!=e?(c=this.videoChannels[e],
null!=c.cpVideo&&(c.cpVideo.nativeVideo=null,c.cpVideo=null),b.nativeVideo=c,c.cpVideo=b,c.loop=b.loop,c.ended=!1,c.cpTo=b.to,c.cpSrc!=b.src?(c.waitCount=0,a.setSrcForVideoChannel(c,b.src)):b.isSeekPending()||b.seekTo(b.from),b.finishPendingSeek(),a.loadVideoChannel(c,b.src),this.verbose&&a.log("allocVideoChannel re-used LRU slot @ "+e),!0):!1}},preallocVideoChannel:function(b,c){if(!a.IsRunningInACAP||a.ACAPStreamingURLsLoaded){b=a.getCorrectMediaPath(b,c);this.verbose&&a.log("preallocVideoChannel "+
b);for(var e=0;e<this.MAX_VIDEO_CHANNELS;++e){var d=this.videoChannels[e];if(d.cpSrc==b)return this.verbose&&a.log("preallocVideoChannel found existing @ "+e),!0}for(e=0;e<this.MAX_VIDEO_CHANNELS;++e)if(d=this.videoChannels[e],""==d.cpSrc)return d.waitCount=0,d.ended=!1,delete d.cpTo,a.setSrcAndLoadVideoChannel(d,b),this.verbose&&a.log("preallocVideoChannel found empty slot @ "+e),!0;return!1}},deviceSpecificInit:function(){function b(a){a.muted&&(a.muted=!1)}for(var c=0;c<this.MAX_VIDEO_CHANNELS;++c)b(this.videoChannels[c]);
a.IDEVICE==a.device||a.device==a.ANDROID?(b(this.slideVideoChannel),this.tocVideoChannel&&b(this.tocVideoChannel)):(b(this.slideVideoChannel0),b(this.slideVideoChannel1),this.tocVideoChannel0&&b(this.tocVideoChannel0),this.tocVideoChannel1&&b(this.tocVideoChannel1));this.ThreeDBgVideoChannel&&b(this.ThreeDBgVideoChannel);this.ThreeDBgFeedbackVideoChannel&&b(this.ThreeDBgFeedbackVideoChannel)},load:function(){this.loaded=!0},preload2:function(b){if(this.loaded&&1==a.movie.speed&&(this.verbose&&a.log("video manager preload "+
b),b=a.D[b],b.videos))for(var c=!0,e=!0,d=!0,f=0;f<b.videos.length;++f){var i=a.D[b.videos[f]];if(i.type==a.kCPFullMotion||i.type==a.kCPOTVideoResource||i.type==a.kCPOTFLVItem)c&&(i=a.D[i.mdi],c=this.preallocVideoChannel(i.mp4,i.dn));else if(i.type==a.kCPOTVideo)if(i=a.D[i.mdi],i.sit){if(e){var g=a.getCorrectMediaPath(i.mp4,i.dn);this.tocVideoChannel0.cpSrc==g||this.tocVideoChannel1.cpSrc==g?this.verbose&&a.log("vdm preload found existing "+g):this.tocVideoChannel0.cpVideo?this.tocVideoChannel1.cpVideo?
e=!1:(a.setSrcAndLoadVideoChannel(this.tocVideoChannel1,g),this.verbose&&a.log("vdm preloaded tocV1 with "+g)):(a.setSrcAndLoadVideoChannel(this.tocVideoChannel0,g),this.verbose&&a.log("vdm preloaded tocV0 with "+g))}}else d&&(g=a.getCorrectMediaPath(i.mp4,i.dn),this.slideVideoChannel0.cpSrc==g||this.slideVideoChannel1.cpSrc==g?this.verbose&&a.log("vdm preload found existing "+g):this.slideVideoChannel0.cpVideo?this.slideVideoChannel1.cpVideo?d=!1:(this.slideVideoChannel1.originalSrc=i.mp4,a.setSrcAndLoadVideoChannel(this.slideVideoChannel1,
g),this.verbose&&a.log("vdm preloaded SV1 with "+g)):(this.slideVideoChannel0.originalSrc=i.mp4,a.setSrcAndLoadVideoChannel(this.slideVideoChannel0,g),this.verbose&&a.log("vdm preloaded SV0 with "+g)))}},preload:function(b){if(!(a.device==a.IDEVICE||a.device==a.ANDROID)){var c=a.D[b];if(!(c&&"ThreeD Slide"==c.st))return this.preload2(b)}},seekTo:function(a,c){var e,d,f,i,g;this.slideVideoChannel&&(e=this.slideVideoChannel.cpVideo);this.tocVideoChannel&&(d=this.tocVideoChannel.cpVideo);this.demoVideo&&
(f=this.demoVideo.cpVideo);this.youtubeSlideVideoChannel&&(i=this.youtubeSlideVideoChannel.cpVideo);this.vimeoSlideVideoChannel&&(i=this.vimeoSlideVideoChannel.cpVideo);this.ThreeDBgVideo&&(g=this.ThreeDBgVideo);c&&(e&&e.pause(),d&&d.pause(),f&&f.pause(),i&&i.pause(),g&&g.pause());e&&e.seekTo(a);d&&d.seekTo(a);f&&f.seekTo(a);i&&i.seekTo(a);g&&g.seekTo(a)},pause:function(b){this.reasonForPause=b;if(b==a.ReasonForPause.PLAYBAR_ACTION||b==a.ReasonForPause.CPCMNDPAUSE||b==a.ReasonForPause.MOVIE_REWIND_STOP||
b==a.ReasonForPause.EVENT_VIDEO_PAUSE||b==a.ReasonForPause.PPTX_PAUSE_FOR_ONCLICK_ANIMATION||b==a.ReasonForPause.INTERACTIVE_ITEM||b==a.ReasonForPause.CPCMNDGOTOFRAME)this.slideVideoChannel&&this.slideVideoChannel.cpVideo&&this.slideVideoChannel.cpVideo.pause(),this.tocVideoChannel&&this.tocVideoChannel.cpVideo&&this.tocVideoChannel.cpVideo.pause(),this.demoVideo&&this.demoVideo.cpVideo&&this.demoVideo.cpVideo.pause(),this.youtubeSlideVideoChannel&&this.youtubeSlideVideoChannel.cpVideo&&this.youtubeSlideVideoChannel.cpVideo.pause(),
this.vimeoSlideVideoChannel&&this.vimeoSlideVideoChannel.cpVideo&&this.vimeoSlideVideoChannel.cpVideo.pause(),this.ThreeDBgVideo&&this.ThreeDBgVideo.pause()},play:function(){this.slideVideoChannel&&this.slideVideoChannel.cpVideo&&this.slideVideoChannel.cpVideo.play();this.tocVideoChannel&&this.tocVideoChannel.cpVideo&&this.tocVideoChannel.cpVideo.play();this.demoVideo&&this.demoVideo.cpVideo&&this.demoVideo.cpVideo.play();this.youtubeSlideVideoChannel&&this.youtubeSlideVideoChannel.play&&this.youtubeSlideVideoChannel.play();
this.vimeoSlideVideoChannel&&this.vimeoSlideVideoChannel.play&&this.vimeoSlideVideoChannel.cpVideo.play();this.ThreeDBgVideo&&this.ThreeDBgVideo.play()},pace:function(){if((a.device==a.IDEVICE||a.device==a.ANDROID)&&!a.movie.stage.VideoPlaying)return null;var b=this.slideVideoChannel;if(b){var c=b.cpVideo;if(c&&!c.ended&&!c.paused&&!c.loop&&0<b.currentTime)return c.pacedAt=(new Date).getTime(),c.from+(b.currentTime-c.seek_From)*cpInfoFPS}if(b=this.tocVideoChannel)if((c=b.cpVideo)&&!b.ended&&!b.paused&&
!c.loop&&0<b.currentTime)return c.from+(b.currentTime-c.seek_From)*cpInfoFPS;if(b=this.demoVideo)if((c=b.cpVideo)&&!b.ended&&!b.paused&&!c.loop&&0<b.currentTime)return c.from+b.currentTime*cpInfoFPS;return null},updateVideoViews:function(){if(this.viewVideo&&this.videoViews)for(var a in this.videoViews)this.videoViews[a].update()}};a.handleACAPStreamingURLs=function(b){a.IsRunningInACAP&&("undefined"!==typeof window.MediaSource&&"undefined"!==typeof window.SourceBuffer)&&(b.then(function(b){a.ACAPVideoStreamingURLMap=
b},function(b){a.log(b)}),a.ACAPStreamingURLsLoaded=!0)}})(window.cp);
(function(a){a.enable=function(c){if(c=a.D[c])if(c.enabled=1,c.mdi){if(c.type==a.kCPOTTextEntryBoxItem){var b=a(c.mdi);if(b&&(b=b.firstChild)&&("INPUT"==b.tagName||"TEXTAREA"==b.tagName))b.disabled=!1}if(b=a.getDisplayObjByKeyOnAllLayers(c.mdi))b.enabled=1;c.type==a.kCPOTAutoShape&&c.canvasPainterObject&&c.canvasPainterObject.addMouseHandlers()}};a.animateItem=function(c,b,d,e,f){var d=a.getDisplayObjByKeyOnAllLayers(e),h=a.D[e];if(void 0!=h&&(void 0!=h.qtp&&(d=a.getDisplayObjByKeyOnAllLayers(h.sn)),
void 0!=d)){e=!0;"Self"!=f?d.m_triggerTimelineIds=h["JSONTT_"+f]:(f=h.selfAnimationTrigger.split(";"),d.m_triggerTimelineIds=f,e=!1);f=c.split("CPGroupTriggerEffectsDelimiterString");for(i=0;i<f.length;i++)""!=f[i]&&(c=f[i]+"_"+b,console.log(c),console.log(d),PPTXLib.processTriggerForObject(d,c,e),a.getDisplayObjByCP_UID(f[i]))}};a.disable=function(c){if(c=a.D[c])if(c.enabled=0,c.mdi){if(c.type==a.kCPOTTextEntryBoxItem){var b=a(c.mdi);if(b&&(b=b.firstChild)&&("INPUT"==b.tagName||"TEXTAREA"==b.tagName))b.disabled=
!0}if(b=a.getDisplayObjByKeyOnAllLayers(c.mdi))b.enabled=0,!0==c.handCursor&&(b.actualParent.style.cursor="auto");c.type==a.kCPOTAutoShape&&c.canvasPainterObject&&c.canvasPainterObject.removeMouseHandlers()}};a.contains=function(a,b){"string"==typeof a||a instanceof String||(a=""+a+"");"string"==typeof b||b instanceof String||(b=""+b+"");return-1!=a.indexOf(b)};a.actionChoicePauseMovie=function(){a.movie.pause(a.ReasonForPause.ACTION_CHOICE)};a.actionChoiceContinueMovie=function(){a.movie.play(a.ReasonForPlay.ACTION_CHOICE)};
a.showQuestions=function(c){if(a.ThreeDQuestionHelper&&!a.movie.stage.hasOverlaySlide()){a.ThreeDQuestionHelper.set360QuizMode(!0);a.ThreeDQuestionHelper.setActiveHotspot(c);var b=a.D[c];b&&b.tdq&&a.ThreeDQuestionHelper.setActiveQSlideIndex(a.movie.stage.slides.indexOf(b.tdq[0]));a.ThreeDQuestionHelper.showQuestions(c)}};a.show=function(c,b){var d=0,e=[],f,h;f=null;if(!b||!b.specificToEffects){e.push(c);a.getDisplayObjByKeyOnAllLayers(c);a.movie.stage.getChildrenForParent(c,e);for(d=0;d<e.length;++d)if(h=
e[d],f=a.D[h])if(f.effectiveVi=1,f.mdi&&(f=a.D[f.mdi]))f.effectiveVi=1}a._show(c);(!b||!b.specificToEffects)&&a._showCurrentState(c);e=[];e.push(c);a.movie.stage.getChildrenForParent(c,e);for(d=0;d<e.length;++d)if(h=e[d],f=a.D[h],(h=a(h))&&f&&f.mdi){var j=a(f.mdi+"-vtext");a.responsiveType==a.kCPPMEAutoResponsive&&(b?j&&a.showOrHideExpandIcon&&b.forceHideTextScalingIcon&&a.canAddTextExpIcon(h,f)?a.showOrHideExpandIcon(j,h,!0):j&&(a.showOrHideExpandIcon&&b.specificToEffects&&a.canAddTextExpIcon(h,
f))&&a.showOrHideExpandIcon(j,h,!1):j&&(a.showOrHideExpandIcon&&a.canAddTextExpIcon(h,f))&&a.showOrHideExpandIcon(j,h,!1))}};a._show=function(c,b,d){try{a._showNoTryCatch(c,b,d)}catch(e){console.error(e)}};a._showNoTryCatch=function(c,b,d){if("ThreeD Slide"==a.movie.stage.currentSlide.st)a.showInThreeDSlide(c);else{void 0===b&&(b=!0);var e=0,f=[],h=[],j,g=null;f.push(c);if((e=a.D[c])&&e.mdi)h.push(c),h.push(e.mdi);var l=a.getDisplayObjByKeyOnAllLayers(c);a.movie.stage.getChildrenForParent(c,f);for(var n=
cpInfoCurrentFrame>a.movie.stage.lastFrame?a.movie.stage.lastFrame:cpInfoCurrentFrame,k=!1,e=0;e<f.length;++e)if(c=f[e],-1!=h.indexOf(c)||a.isItemInCurrentState(c)){if(j=a.D[c]){j.visible=1;var m=!0;if(j.mdi){if(g=a.D[j.mdi])g.visible=1;if(g=a.getDisplayObjByKeyOnAllLayers(j.mdi)){g.visible=1;!b&&a.isBaseItemInState(g)&&(m=!1);g.type==a.kCPOTVideo&&g.nativeVideo&&(k=!0,g.nativeVideo.style.display="block");if((g.type==a.kCPOTYTStreamingVideo||g.type==a.kCPOTVimeoStreamingVideo)&&g.nativeVideo)k=!0,
g.nativeVideo.show(!0),g.seekTo(cpInfoCurrentFrame);if(g.element){var o=g.element.firstElementChild;o&&"VIDEO"==o.tagName&&((k=!0,g.nativeVideo.style.display="block",g.seekTo(g.from),g.showControls&&g.nativeVideo&&(a.IDEVICE!=a.device||a.IOSMajor>=a.IOS8?(a.movie.stage.NativeVideoElement&&(a.movie.stage.NativeVideoElement.style.backgroundColor="#000000"),a.addVideoSkin(g.actualParent,g,g.autoPlay)):g.nativeVideo.controls=!0),g.autoPlay)?g.play():(g.nativeVideo.style.position="static",g.nativeVideo.style.left=
"0px"))}}else if(!b&&(-1==j.bstiid||j.sicbs))m=!1}if(g=a(c)){if(k||l&&"function"===typeof l.isInRange&&l.isInRange(n))g.style.visibility="visible",g.style.display="block";if(j.type==a.kCPOTWebObject&&(g=g.getElementsByTagName("iframe")[0]))g.style.visibility="visible",g.style.display="block"}j.ia&&m&&a.movie.am.showHideObjectAudio(j.ia,!0);j.iea&&m&&a.movie.am.playPauseEventAudio(j.iea,!0)}else if((g=a(c))&&(k||l&&l.isInRange(n)))if(g.style.visibility="visible",j=c.indexOf("-vtext_Handler"),a.responsive&&
-1!=j&&(j=c.substr(0,j),(j=a.D[j])&&j.hl))g.style.backgroundColor="#ffffff",g.style.opacity=0;a.redrawItem(c,d)}}};a._showData=function(c,b){void 0===b&&(b=!0);var d=0,e=[],f=[],h,j=null;e.push(c);if((d=a.D[c])&&d.mdi)f.push(c),f.push(d.mdi);a.getDisplayObjByKeyOnAllLayers(c);a.movie.stage.getChildrenForParent(c,e);for(d=0;d<e.length;++d)if(h=e[d],-1!=f.indexOf(h)||a.isItemInCurrentState(h))if(h=a.D[h]){h.visible=1;var g=!0;if(h.mdi){if(j=a.D[h.mdi])j.visible=1;if(!b&&(-1==h.bstiid||h.sicbs))g=!1}h.ia&&
g&&a.movie.am.showHideObjectAudio(h.ia,!0);h.iea&&g&&a.movie.am.playPauseEventAudio(h.iea,!0)}};a.hide=function(c){var b=0,d=[],e;d.push(c);a.movie.stage.getChildrenForParent(c,d);for(b=0;b<d.length;++b)if(e=d[b],e=a.D[e])if(e.effectiveVi=0,e.mdi&&(canvasDataItem=a.D[e.mdi]))canvasDataItem.effectiveVi=0;a._hide(c);a._hideCurrentState(c)};a._hideData=function(c,b){void 0===b&&(b=!0);var d=0,e=[],f;e.push(c);a.movie.stage.getChildrenForParent(c,e);for(d=0;d<e.length;++d)if(f=e[d],f=a.D[f]){f.visible=
0;var h=!0;if(f.mdi){if(canvasDataItem=a.D[f.mdi])canvasDataItem.visible=0;if(!b&&(-1==f.bstiid||f.sicbs))h=!1}f.ia&&h&&a.movie.am.showHideObjectAudio(f.ia,!1);f.iea&&h&&a.movie.am.playPauseEventAudio(f.iea,!1)}};a._hide=function(c,b){if("ThreeD Slide"==a.movie.stage.currentSlide.st&&a.hideInThreeDSlide)a.hideInThreeDSlide(c);else{void 0===b&&(b=!0);var d=0,e=[],f,h;e.push(c);a.movie.stage.getChildrenForParent(c,e);for(d=0;d<e.length;++d)if(h=e[d],f=a.D[h]){f.visible=0;var j=!0;if(f.mdi){if(canvasDataItem=
a.D[f.mdi])canvasDataItem.visible=0;var g=a.getDisplayObjByKeyOnAllLayers(f.mdi);if(g){g.visible=0;!b&&a.isBaseItemInState(g)&&(j=!1);a.CanPauseAudioDuringHide(g)||(j=!1);var l=!1;if(g.type==a.kCPOTVideo)l=!0;else if(g.element){var n=g.element.firstElementChild;n&&"VIDEO"==n.tagName&&(l=!0)}l&&(g.nativeVideo&&(g.nativeVideo.style.display="none"),g.pause&&g.pause())}else if(!b&&(-1==f.bstiid||f.sicbs))j=!1}if(g=a(h)){g.style.visibility="hidden";if(f.type==a.kCPOTWebObject&&(g=g.getElementsByTagName("iframe")[0]))g.style.visibility=
"hidden",g.style.display="none";g=a(h);(h=a(f.mdi+"-vtext"))&&(a.showOrHideExpandIcon&&a.responsiveType==a.kCPPMEAutoResponsive)&&a.showOrHideExpandIcon(h,g,!0)}f.ia&&j&&a.movie.am.showHideObjectAudio(f.ia,!1);f.iea&&j&&a.movie.am.playPauseEventAudio(f.iea,!1)}else if(g=a(h))g.style.visibility="hidden"}};a.jumpToPreviousSlide=function(){var c=a.movie.stage.previousSlideStartFrame;0>=c&&(c=1);if(a.ThreeDQuestionHelper){var b=a.movie.stage.getSlideIndexForFrame(c);a.movie.stage.isThreeDSlideIndex(b)&&
a.ThreeDQuestionHelper.set360QuizMode(!1)}a.movie.jumpToFrame(c)&&a.movie.play()};a.jumpToNextSlide=function(){var c=a.movie.stage.nextSlideStartFrame;if(-1!=c){if(a.ThreeDQuestionHelper){var b=a.movie.stage.getSlideIndexForFrame(c);a.movie.stage.isThreeDSlideIndex(b)&&a.ThreeDQuestionHelper.set360QuizMode(!1)}a.movie.jumpToFrame(c)&&a.movie.play()}else!a.movie.virgin&&a.movie.stage.slides.length-1==cpInfoCurrentSlideIndex&&a.movie.play()};a.jumpToLastVisitedSlide=function(){if(a.ThreeDQuestionHelper){var c=
a.movie.stage.getSlideIndexForFrame(a.movie.cpInfoLastVisitedSlideStartFrame);a.movie.stage.isThreeDSlideIndex(c)&&a.ThreeDQuestionHelper.set360QuizMode(!1)}a.movie.jumpToFrame("cpInfoLastVisitedSlide");a.movie.play()};a.openURL=function(c,b){var d=c;if(a.MSIE!=a.browser){var e;rURL=decodeURIComponent(c);e=rURL!==c?!0:!1;e||(d=encodeURI(c))}if(a.m_isPreview)d=a.parentWindow.open(d,b);else{if(e=a.IsRunningInACAP)if(e="_self"==b||"_parent"==b||"_blank"==b)e=d,e=-1!=e.search("http:")||-1!=e.search("https:")||
-1!=e.search("www.")?!0:!1;d=e?a.parentWindow.open(d,"_blank"):a.currentWindow.open(d,b)}(!d||d.closed||"undefined"==typeof d.closed)&&!a.IsRunningInACAP&&alert(a.D.rtDialog.rtPopupBlkr)};a.openMovie=function(c,b){return a.openURL(c,b)};a.sendEmail=function(c){a.m_isPreview?window.location.href="mailto:"+c:a.currentWindow.open("mailto:"+c,"_blank")};a.showMessage=function(c){a.alert(c)};a.runJavascript=function(c,b){a.verbose&&a.log("runJavascript ["+c+"]");try{a.__isUserCustomJS=!0;var d=window;
switch(b){case "_self":d=window;break;case "_blank":d=window.open("");break;case "_parent":d=window.parent;break;case "_top":d=window.top}d.execScript?d.execScript(c):d.eval.call(d,c);a.__isUserCustomJS=!1}catch(e){a.log(e)}};a.stopMovie=function(){};a.loopMovie=function(){cpCmndGotoSlideAndResume=0};a.closeMovie=function(){DoCPExit&&DoCPExit()};a.playAudio2=function(c){return a.playAudio(c,!1)};a.playAudio=function(c,b){var d=a.movie.am;if(a.lastMediaPlayReqTime&&50>(new Date).getTime()-a.lastMediaPlayReqTime.getTime())d.verbose&&
a.log("crowded request postponed "+c),setTimeout(function(){a.playAudio(c,b)},50);else if(!(d.muted||1!=a.movie.speed)){d.verbose&&a.log("cp.playAudio "+c+", "+b);if(a.device==a.IDEVICE||a.device==a.ANDROID)if(!a.multiAudioTrack&&(d.audioPlaying||a.movie.stage.VideoPlaying)){d.verbose&&a.log("audioPlaying "+d.audioPlaying+" videoPlaying "+a.movie.stage.VideoPlaying);return}var e=a.D["PA"+c].src;void 0==b&&(b=!0);d=d.singletonPlayAudio;d.pause();null!=d.nativeAudio&&(d.nativeAudio.cpAudio=null,d.nativeAudio=
null);d.onEndAutoPlayMovie=b;d.setSrc(e);d.resetAndPlay()}};a.stopAudio=function(){a.movie.am.singletonPlayAudio.pause()};a.cv=function(c,b,d,e,f){return a.vm.createVariable(c,b,1==d?!0:!1,e,1==f?!0:!1)};a.getCurrentStateNameForSlideItem=function(c){var b=void 0,b="",c=a.D[c];if(!c)return b;var d=a.getDisplayObjByKeyOnAllLayers(c.mdi);d?(c=d.states,d=d.currentState,0<=d&&d<c.length&&(b=c[d],b=b.stn)):(d=c.stl,void 0!==d&&(b=c.stis,b=d[b].stn,c.temporaryInitialState&&-1!=c.temporaryInitialState&&(b=
c.temporaryInitialState,b=d[b].stn)));return b};a.ho=function(a){if("string"==typeof a){var b;try{isNaN(Number(a))&&(b=window[a])&&("object"==typeof b&&b===document.getElementById(a))&&(b=void 0)}catch(d){}if(void 0!=b)return b;try{isNaN(Number(a))||(b=eval(a))}catch(e){}if(void 0!=b){if("string"==typeof b){var f;try{f=eval(b)}catch(h){}if(void 0!=f)return f}return b}}return a};a.playPause=function(c){var b;a.movie.paused?(!0==c&&(b=a.ReasonForPlay.PLAYBAR_ACTION),a.movie.play(b)):(!0==c&&(b=a.ReasonForPause.PLAYBAR_ACTION),
a.movie.pause(b))};a.goToPreviousSlide=function(){a.jumpToPreviousSlide()};a.goToNextSlide=function(){a.jumpToNextSlide()};a.jumpToSlide=function(a){cpCmndGotoSlideByUIDAndResume=a};a.rewind=function(){cpCmndRewindAndPlay=1};a.showHideCC=function(){cpCmndCC=cpCmndCC?0:1};a.showHideTOC=function(){var a=document.getElementById("toc");void 0!=a&&a.animator&&(0==a.animator.direction?a.animator.showTOC():a.animator.hideTOC())};a.enterVR=function(){};a.fastForward=function(){cpCmndFastForward=1};a.handleCCClick=
function(c){if(a.DESKTOP==a.device){var b=document.getElementById("div_Slide");if(a.ccdv)if(document.getElementById("cc").style.display="none",b=document.elementFromPoint(c.clientX,c.clientY),document.getElementById("cc").style.display="block",c.initMouseEvent){var d=document.createEvent("MouseEvent");d.initMouseEvent("click",!0,!0,window,0,c.screenX,c.screenY,c.clientX,c.clientY,c.ctrlKey,c.altKey,c.shiftKey,c.metaKey,0,null);b.dispatchEvent(d)}else document.createEventObject&&(d=document.createEventObject(window.event),
d.button=1,b.fireEvent("onclick",d))}};a.showInfoDialog=function(){var c=!1;a.movie.paused||(a.movie.pause(a.ReasonForPause.PLAYBAR_ACTION),c=!0);var b=a.infoBgImg,d=a.newElem("div");a.project.appendChild(d);d.id="infoDialog";d.style.position="absolute";d.style.backgroundImage="url("+b.src+")";var e=a.D.project.w,f=a.D.project.h;a.responsive&&(f=a("div_Slide"),e=f.clientWidth,f=f.clientHeight>window.innerHeight?window.innerHeight:f.clientHeight);d.style.left=(e-b.width)/2+"px";d.style.top=(f-b.height)/
2+"px";d.style.width=b.width+"px";d.style.height=b.height+"px";d.style.zIndex=1E4;e=a.newElem("div");e.id="infoDlgCloseBtn";b=function(){a.project.removeChild(d);c&&a.movie.play()};a.clearGestureCache(e);a.registerGestureEvent(e,a.GESTURE_EVENT_TYPES.TAP,b);e.style.cursor="pointer";e.style.backgroundColor="#ffffff";e.style.opacity=0;e.style.left="170px";e.style.top="5px";e.style.width="15px";e.style.height="15px";e.style.position="absolute";e.style.display="block";e.style.zIndex=1E4;d.appendChild(e);
b=a.newElem("div");e="<ul style='padding-left:15px;padding-right:15px;padding-top:20px;list-style-type: none;text-indent: 0em;'>"+("<li style='overflow:hidden'>"+cpInfoAuthor+"</li>");e+="<li style='overflow:hidden'>"+cpInfoCompany+"</li>";e+="<li style='overflow:hidden;cursor:pointer;' onclick='cp.sendEmail(\""+cpInfoEmail+"\")'>"+cpInfoEmail+"</li>";f="http://";f=-1==cpInfoWebsite.indexOf("://")?f+cpInfoWebsite:cpInfoWebsite;e+="<li style='overflow:hidden;cursor:pointer;' onclick='cp.openURL(\""+
f+"\")'>"+cpInfoWebsite+"</li>";e+="<li style='overflow:hidden'>"+cpInfoCopyright+"</li>";b.innerHTML=e+"</ul>";d.appendChild(b);e=a.newElem("div");e.id="infoDlgLinkBtn";b=function(){a.openURL("http://www.adobe.com/products/captivate")};a.clearGestureCache(e);a.registerGestureEvent(e,a.GESTURE_EVENT_TYPES.TAP,b);e.style.cursor="pointer";e.style.backgroundColor="#ffffff";e.style.opacity=0;e.style.left="10px";e.style.bottom="10px";e.style.width="170px";e.style.height="25px";e.style.position="absolute";
e.style.display="block";d.appendChild(e)};a.toggleMute=function(){a.movie.am.muted?a.movie.am.mute(!1):a.movie.am.mute(!0);a.movie.vdm.muted?a.movie.vdm.mute(!1):a.movie.vdm.mute(!0);a.em.fireEvent("CPMovieAudioMute",a.movie.am.muted)};a.playbarMoved=function(){cpCmndPlaybarMoved=1};document.Captivate=window.cp;window.m_VarHandle=window;a.cpEIGetValue=function(a){return eval.call(window,a)};a.cpEISetValue=function(a,b){eval.call(window,a+'="'+b+'"')};a.goToNextState=function(c){var b=a.D[c];if(b){var d=
a.getDisplayObjByKeyOnAllLayers(b.mdi);if(d&&(b=d.states,d=d.currentState,!(0>d||d>b.length-1))){for(d=d==b.length-1?0:d+1;d<b.length&&a.isInbuiltState(b[d]);)d++;d!=b.length&&(b=b[d])&&a.changeState(c,b.stn)}}};a.isInbuiltState=function(a){a=a.stn;return"RollOver"==a||"Down"==a||"Visited"==a||"DragStart"==a||"DragOver"==a||"DropAccept"==a||"DropReject"==a||"DropCorrect"==a||"DropIncorrect"==a?!0:!1};a.goToPreviousState=function(c){var b=a.D[c];if(b){var d=a.getDisplayObjByKeyOnAllLayers(b.mdi);if(d&&
(b=d.states,d=d.currentState,!(0>d||d>=b.length))){for(d=0==d?b.length-1:d-1;0<=d&&a.isInbuiltState(b[d]);)d--;0>d||(b=b[d])&&a.changeState(c,b.stn)}}};a.changeState=function(c,b,d,e){var f=a.D[c];if(f){var h=a.getDisplayObjByKeyOnAllLayers(f.mdi);if(h){var j=a.getInfoForStateChange(c,b);j.bFound&&(h.getAttribute("effectiveVi")?a._changeState(c,b,!1,d,e):(h.currentState=j.stateIndex,f.currentState=j.stateIndex,!0===f.retainState&&a.canStateBeRetained_Name(b)&&(f.temporaryInitialState=j.stateIndex)))}else{c=
f.stl;d=-1;if(0<c.length)for(e=0;e<c.length;e++)if(c[e].stn==b){d=e;break}-1!=d&&(f.currentState=d);a.canStateBeRetained_Name(b)&&(f.temporaryInitialState=d)}}};a._changeState=function(c,b,d,e,f){var h=a.D[c];if(h){void 0===e&&(e=!0);var j=a.getDisplayObjByKeyOnAllLayers(h.mdi);if(j){var g=a.getInfoForStateChange(c,b,!0);if(g.bFound){var l=j.currentState;if(d||l!==g.stateIndex){var d=!1,n=a.movie.stage.getCurrentSlideInteractionManager();null!=n&&(d=n.DoNecessaryStuffBeforeChangeState(c));j.currentState=
g.stateIndex;h.currentState=g.stateIndex;!0===h.retainState&&a.canStateBeRetained_Name(b)&&(h.temporaryInitialState=g.stateIndex);h.hasOwnProperty("stc")&&""===h.stc[l]&&a._show(c,e,f);b=a.isValidItemForStateOptimization({t:h.type,n:c});for(l=0;l<g.showItemList.length;++l){var k=a.getDisplayObjNameByCP_UID(g.showItemList[l]);if(b){""==k&&(k=h.stc[g.stateIndex]);var m=a.D[k];if(m&&(m.sicbs||-1==m.bstiid))j.canvasObj=a.D[m.mdi],j.parentStateType=j.states[g.stateIndex].stt,j.parentStateType!==a.kSTTRollOver&&
(j.actualParent.style.zIndex=m.zIndex),j.element.parentElement.style.zIndex=m.zIndex}a._show(k,e,f);if(a.D[k]&&(m=a.D[k].selfAnimationScript))if(eval(m),k=a.D[k])(k=a.getDisplayObjByKeyOnAllLayers(k.mdi))&&k.updateEffects&&k.updateEffects(!0)}for(l=0;l<g.hideItemList.length;++l){f=g.hideItemList[l];k=a.getDisplayObjNameByCP_UID(f.uid);if(b){""==k&&0<=f.sti&&f.sti<h.stc.length&&(k=h.stc[f.sti]);if(""===k)continue;if(k==c&&h.hasOwnProperty("stc")&&""!==h.stc[g.stateIndex]){a._hideData(k,e);continue}}(m=
a.D[k].selfAnimationScript)&&PPTXLib.resetObjects&&PPTXLib.resetObjects(k);a._hide(k,e)}null!=n&&n.DoNecessaryStuffAfterChangeState(c,d)}}}}};a._showCurrentState=function(c){var b=a.D[c];if(b){var d=a.getDisplayObjByKeyOnAllLayers(b.mdi);d&&(b=d.currentState,d=d.states,0<=b&&b<d.length&&(b=d[b])&&a._changeState(c,b.stn,!0))}};a._hideCurrentState=function(c){if(c=a.D[c]){var b=a.getDisplayObjByKeyOnAllLayers(c.mdi);if(b){var d=b.currentState,b=b.states;if(0<=d&&d<b.length&&(b=b[d])){for(var b=b.stsi,
e=0;e<b.length;++e){var f=a.getDisplayObjNameByCP_UID(b[e]);a._hide(f)}c.hasOwnProperty("stc")&&(0<d&&d<c.stc.length)&&a._hide(c.stc[d])}}}};a.Executewhile=function(a,b){if(!0==eval(a)){var a=a.replace(/'/g,"\\'"),d=b.replace(/'/g,"\\'"),d=b.replace("#@LOOP-END@#","cp.Executewhile('"+a+"','"+d+"');");eval(d)}};a.jumpToBookmark=function(c,b){var d=a.D["Slide"+c];if(d)return d=a.movie.jumpToFrame(d.from+b),a.movie.stage.preventAdvanceFrame=!0,d&&a.movie.play(),d};a.showFeedback=function(a){alert(a)};
a.MSIItemClick=function(c,b){a.isInbuiltState({stn:b})||"Normal"==b||(a.changeState(c,b),a.setStateAsVisited(c,b),a.handleMSICompletion(c))};a.getStateArr=function(c){c=a.D[c];if(!c)return retVal;if(c=a.getDisplayObjByKey(c.mdi))return c.states};a.setStateAsVisited=function(c,b){var d=a.getStateArr(c);if(d)for(var e=0;e<d.length;e++){var f=d[e];f.stn==b&&(!a.isInbuiltState(f)&&"Normal"!=f.stn)&&(f.visited=!0)}};a.handleMSICompletion=function(c){var b=a.getStateArr(c);if(b&&b.length){for(var d=!1,
e=0;e<b.length;e++){var f=b[e];if(f&&(!a.isInbuiltState(f)&&"Normal"!=f.stn)&&(d=!0,!f.visited))return}d&&a.show(c.substr(3)+"_completed")}};a.clearMSIVisitedInfo=function(c){if(c&&c.length)for(var b=0;b<c.length;b++){var d=c[b],e=a.getStateArr(d);if(e&&e.length){for(var f=0;f<e.length;f++){var h=e[f];h&&(!a.isInbuiltState(h)&&"Normal"!=h.stn)&&(h.visited=!1)}a.hide(d.substr(3)+"_completed")}}}})(window.cp);
(function(a){a.Canvas=function(a){this.element=a;this.gc=a.getContext("2d")};if("undefined"==typeof PPTXLib||void 0==PPTXLib)a.dummyPPTXLib={},PPTXLib=a.dummyPPTXLib,PPTXLib.PptxAnimatableDisplayItem=function(){},PPTXLib.PptxAnimatableDisplayItem.prototype.updateEffects=function(){},PPTXLib.PptxAnimatableDisplayItem.prototype.updateFrameData=function(){},PPTXLib.initializeAnimationManagerForCPSlide=function(){},PPTXLib.hasAnimationInfo=function(){return!1},PPTXLib.updateNoSkipFramesFromEffectData=
function(){},PPTXLib.updateAnimationManager=function(){},PPTXLib.initializePPTXLibrary=function(){},PPTXLib.processTriggerForObject=function(){};a.DisplayObject=function(c){var d=a.D[c.id];d&&(this.isCpObject=!0,d.isCpObject=!0);this.itemData=d;a.DisplayObject.baseConstructor.call(this,c.id,d);this.element=c;this.hasEffect=this.getAttribute("JSONEffectData");a.responsive&&(this.isStarted=!1);if(d&&(c=a.D[this.getAttribute("dn")]))if(this.states=c.stl,void 0!==this.states){this.initialState=this.currentState=
c.stis;d=c.hasOwnProperty("retainState")&&!0===c.retainState;c.hasOwnProperty("temporaryInitialState")&&-1!=c.temporaryInitialState&&(this.currentState=c.temporaryInitialState,d||(c.temporaryInitialState=-1));c.currentState=this.currentState;this.baseStateItemID=c.bstiid;this.parentStateType=c.sipst;this.cloneOfBaseStateItem=c.sicbs;this.itemOrParentHasHoverState=c.sihhs;this.itemOrParentHasDownState=c.sihds;for(c=0;c<this.states.length;c++)if((d=this.states[c])&&d.stt==a.kSTTVisited){this.visitedState=
d.stn;break}}else this.parentStateType=this.baseStateItemID=this.initialState=this.currentState=-1,this.itemOrParentHasDownState=this.itemOrParentHasHoverState=this.cloneOfBaseStateItem=!1,this.states=[],c.currentState=-1;a.setInitialVisibility(this)};a.inherits(a.DisplayObject,PPTXLib.PptxAnimatableDisplayItem);a.DisplayObject.prototype.updateInputFontStyle=function(c){if(c&&(this.ResponsiveFontProp=this.canvasObj?this.canvasObj.rpfont:this.getAttribute("rpfont"),this.font=this.ResponsiveFontProp[a.ResponsiveProjWidth].font))c.style.fontFamily=
this.font.n,c.style.fontSize=this.font.s+"px",c.style.color=this.font.c,c.style.fontWeight=this.font.B?"bold":"normal",c.style.textDecoration=this.font.u?"underline":"none",c.style.fontStyle=this.font.i?"italic":"normal"};a.DisplayObject.prototype.subscribeToItemDrawingCompleteHandler=function(){if(a.responsive){var c=this,d=a.getResponsiveCSS(c.getAttribute("css"));d&&(d.lhID&&d.lvID&&(-1!=d.lhID||-1!=d.lvID))&&a.em.addEventListener(function(a){c.linkedItemDrawingCompleteHandler(a)},a.ITEMDRAWINGCOMPLETEEVENT)}};
a.DisplayObject.prototype.linkedItemDrawingCompleteHandler=function(c){if(a.responsive&&this.drawForResponsive&&this.isStarted){var d=a.getResponsiveCSS(this.getAttribute("css"));c.cpData&&c.cpData.uid&&!(c.cpData.uid!=d.lhID&&c.cpData.uid!=d.lvID)&&(a.linksVerbose&&a.log("drawing "+this.element.id+", for "+c.cpData.uid),this.drawForResponsive(!0,a.ReasonForDrawing.kLinkedToItemAppeared),a.updateVarText(this.actualParent.id,!0,!0))}};a.DisplayObject.prototype.forEachChild=function(a,d){if(this.children)for(var e=
this.children,g=e.length,h=0;h<g;++h)a(e[h],d)};a.DisplayObject.prototype.updateFrame=function(){this.updateEffects(this.hasEffect);this.forEachChild(function(c){a.responsive&&!c.isDrawn&&c.drawIfNeeded?(a.lSameSlideSeek||!c.itemData||!a.getDisplayObjByCP_UID(c.itemData.uid))&&c.drawIfNeeded():c.updateFrame()})};a.DisplayObject.prototype.updateEffects=function(c){a.DisplayObject.superClass.updateEffects.call(this,c);if(this.actualParent&&c){var c=a.D[this.actualParent.id],d=c.from;if(!c.rp&&!(c.rpa||
this.type==a.kCPOTVideo))cpInfoCurrentFrame<=d+2?(a.verbose&&a.log("hiding "+this.parentDivName),d=a.isVisible(this),a._hide(this.parentDivName),c.hiddenFromFrame=cpInfoCurrentFrame,c.hiddenFromFlicker=!0,this.visible=d):c.hiddenFromFlicker&&this.visible&&(a.verbose&&a.log("showing "+this.parentDivName),a.show(this.parentDivName,{specificToEffects:!0}),c.hiddenFromFlicker=!1)}};a.DisplayObject.prototype.isSizeNPositionUpdated=function(c,d){return!a.responsive?!1:!c||!d?(a.linksVerbose&&a.log("first time initialization. lastSizeNPosition = null"),
!0):c.l!=d.l?(a.linksVerbose&&a.log(c.l+"!="+d.l),!0):c.t!=d.t?(a.linksVerbose&&a.log(c.t+"!="+d.t),!0):c.r!=d.r?(a.linksVerbose&&a.log(c.r+"!="+d.r),!0):c.b!=d.b?(a.linksVerbose&&a.log(c.b+"!="+d.b),!0):c.w!=d.w?(a.linksVerbose&&a.log(c.w+"!="+d.w),!0):c.h!=d.h?(a.linksVerbose&&a.log(c.h+"!="+d.h),!0):!1};a.DisplayObject.prototype.drawComplete=function(c){if(!this.isRegistered){a.verbose&&a.log("draw completed: "+this.element.id);var d=a.movie.stage.getCurrentSlideInteractionManager();null!=d&&(!a.responsive||
a.lSameSlideSeek)&&d.registerDisplayObject(this.element.id,c)}if(a.responsive||c===a.ReasonForDrawing.kItemStateChanged)if(d=a.GetDataForElement(this.element,!0)){var e=a.D[d.dn],g=!0;e&&e.type==a.kCPOTStageMatchingAnswerEntry&&(g=!1);d&&g&&d&&(d=a.getAccessibilityString(d),void 0!=d&&a.modifyAlternativeAccessibleText(this.actualParent,d))}if(a.responsive){if(c==a.ReasonForDrawing.kRegularDraw||c==a.ReasonForDrawing.kOrientationChangeOrResize)a.linksVerbose&&a.log("subscribeToItemDrawingCompleteHandler : "+
this.element.id),this.subscribeToItemDrawingCompleteHandler();if(this.actualParent){d=this.actualParent.getBoundingClientRect();e=a("div_Slide").getBoundingClientRect();d={l:d.left-e.left,t:d.top-e.top,r:d.right-e.right,b:d.bottom-e.bottom,w:d.width,h:d.height};if(c==a.ReasonForDrawing.kMoviePaused&&!this.isStarted||c==a.ReasonForDrawing.kRegularDraw||c==a.ReasonForDrawing.kOrientationChangeOrResize||c==a.ReasonForDrawing.kTextGrow||c==a.ReasonForDrawing.kLinkedToItemAppeared||c==a.ReasonForDrawing.kItemStateChanged&&
0===this.currentState)if(e={uid:this.getAttribute("uid")},this.isStarted=this.isDrawnComplete=!0,this.isSizeNPositionUpdated(this.lastSizeNPosition,d))return a.linksVerbose&&a.log("firing event for : "+this.actualParent.id),this.lastSizeNPosition=d,a.em.fireEvent("CPItemDrawingCompleteEvent",e);if(!c==a.ReasonForDrawing.kItemStateChanged||0===this.currentState)this.lastSizeNPosition=d}}};a.DisplayObject.prototype.setTransformOrigin=function(c){if(c){var d=a.D[c.id],e=a.D[d.dn],g=0,h=0;if(a.responsive){if(h=
a.getCurrentBreakPointID(),g=e["xorig_"+h],h=e["yorig_"+h],e.gm){for(var i=0;i<e.gm.length;++i){var j=e.gm[i];(j=a.getDisplayObjByCP_UID(j))&&(!j.isStarted&&!j.areDimensionsCalculated?a.initializeDimensions(j,!0):j.isStarted&&!j.areDimensionsCalculated&&a.initializeDimensions(j))}var f=0,l=0,m=0,k=0,i=e.vgm[0];if(i=a.getDisplayObjByCP_UID(i))j=i.dimensions,f=j.left,l=j.top,m=j.top+j.height,k=j.left+j.width;for(i=1;i<e.vgm.length;++i)if(j=e.vgm[i],j=a.getDisplayObjByCP_UID(j))j=j.dimensions,tempLeft=
j.left,tempTop=j.top,tempBottom=j.top+j.height,tempRight=j.left+j.width,tempLeft<f&&(f=tempLeft),tempTop<l&&(l=tempTop),tempBottom>m&&(m=tempBottom),tempRight>k&&(k=tempRight);g*=f+k;h*=l+m;d=a.getDisplayObjByKey(d.dn+"c").dimensions;e=d.left;i=d.top;j=d.width;d=d.height;g=(g-e)/j;h=(h-i)/d}}else if(g=e.xorig,h=e.yorig,e.gm){k=m=l=f=0;i=e.gm[0];if(i=a.getDisplayObjByCP_UID(i))j=a.D[i.mUniqueName].vb,f=j[0],l=j[1],k=j[2],m=j[3];for(i=1;i<e.gm.length;++i)if(j=e.gm[i],j=a.getDisplayObjByCP_UID(j))j=
a.D[j.mUniqueName].vb,j[0]<f&&(f=j[0]),j[1]<l&&(l=j[1]),j[2]>k&&(k=j[2]),j[3]>m&&(m=j[3]);e=d.vb[0];i=d.vb[1];j=d.vb[2]-d.vb[0];d=d.vb[3]-d.vb[1];g=((f+k)*g-e)/j;h=((l+m)*h-i)/d}l=d="0px";this.actualParent&&(d=100*g+"%",l=100*h+"%");g=d+" "+l;void 0!=c&&(c.parentElement.style["-ms-transform-origin"]=g,c.parentElement.style["-moz-transform-origin"]=g,c.parentElement.style["-webkit-transform-origin"]=g,c.parentElement.style["-o-transform-origin"]=g,c.parentElement.style["transform-origin"]=g)}};a.DisplayObject.prototype.start=
function(c,d){if(!this.effectIsStarted||c)this.areDimensionsCalculated=!1,this.updateEffects(),this.effectIsStarted=!0;this.forEachChild(function(e){e.start(c,d);a.responsive&&(e.isStarted=!0)})};a.DisplayObject.prototype.reset=function(c){this.isRegistered=!1;this.forEachChild(function(d){d.reset(c);a.responsive&&(d.currentCSS=void 0,d.isStarted=!1)});this.effectIsStarted=!1};a.DisplayObject.prototype.onEndOfMovie=function(){this.forEachChild(function(a){a.onEndOfMovie()})};a.DisplayObject.prototype.getAttribute=
function(a){var d=this.itemData;return!d?null:d[a]};a.DisplayObject.prototype.setAttribute=function(a,d){var e=this.itemData;e&&(e[a]=d)};a.DisplayObject.prototype.restOfProjectDoOnNewSlide=function(){if(this.itemData){var c=this.itemData.dn,d;c&&(d=a.D[c]);d&&((d.type==a.kCPOTImageBoxItem||d.type==a.kCPOTWebObject)&&d.uab)&&this.setUpClickHandler()}};a.DisplayObject.prototype.deleteFromRopMap=function(c){delete a.ropMap[c.id]};a.DisplayObject.prototype.ForceMouseOut=function(){if(a.DESKTOP===a.device){var c=
a.kSTTNone;if(0<=this.currentState&&this.currentState<this.states.length){var d=this.states[this.currentState];d&&(c=d.stt)}this.HandleMouseEventOnStateItems&&this.HandleMouseEventOnStateItems("mouseout",c,void 0)}};a.Shape=function(c,d){function e(c){f.visible=f.getAttribute("visible");f.isDrawn=!1;a.responsive&&(f.currentCSS=void 0);!1==f.supportsStates?a.device==a.IDEVICE||a.device==a.ANDROID?f.downImage&&(f.currImage=f.downImage):f.hoverImage&&(f.currImage=f.hoverImage):f.changeStateOnMouseEvents&&
(a.device==a.IDEVICE||a.device==a.ANDROID?f.changeStateOnMouseEvents("mousedown",c):f.changeStateOnMouseEvents("mouseover",c));var c=f.transIn,d=f.modifyParent;f.modifyParent=a.responsive;f.transIn=null;f.drawIfNeeded();f.transIn=c;f.modifyParent=d}function g(c){f.visible=f.getAttribute("visible");f.isDrawn=!1;a.responsive&&(f.currentCSS=void 0);!1==f.supportsStates?f.currImage=f.normalImage:f.changeStateOnMouseEvents&&(a.device==a.IDEVICE||a.device==a.ANDROID?f.changeStateOnMouseEvents("mouseup",
c):f.changeStateOnMouseEvents("mouseout",c));var c=f.transIn,d=f.modifyParent;f.modifyParent=a.responsive;f.transIn=null;f.drawIfNeeded();f.transIn=c;f.modifyParent=d}function h(c){f.isDrawn=!1;a.responsive&&(f.currentCSS=void 0);!1==f.supportsStates?f.downImage&&(f.currImage=f.downImage):f.changeStateOnMouseEvents&&f.changeStateOnMouseEvents("mousedown",c);var c=f.transIn,d=f.modifyParent;f.modifyParent=a.responsive;f.transIn=null;f.drawIfNeeded();f.transIn=c;f.modifyParent=d}function i(c){f.isDrawn=
!1;a.responsive&&(f.currentCSS=void 0);!1==f.supportsStates?f.currImage=f.hoverImage&&a.device!=a.IDEVICE&&a.device!=a.ANDROID?f.hoverImage:f.normalImage:f.changeStateOnMouseEvents&&f.changeStateOnMouseEvents("mouseup",c);var c=f.transIn,d=f.modifyParent;f.modifyParent=a.responsive;f.transIn=null;f.drawIfNeeded();f.transIn=c;f.modifyParent=d}function j(c,d,e,g){return function(h){if(!a.disableInteractions&&(!(f.parentData&&void 0!=f.parentData.enabled)||f.parentData.enabled))g&&g(),e&&f.mouseState==
c||(f.mouseState=c,d(h))}}var f=this;this.mouseState=a.mouseStateOut;this.setVBounds=function(){var c=f.canvasObj,d=0;c.sw>f.canvasObj.sw&&(d=c.sw-f.canvasObj.sw);a.responsive&&(d=0);c=f.canvasObj.vbwr;f._wrvBounds={minX:c[0]-2*d,minY:c[1]-2*d,maxX:c[2]+2*d,maxY:c[3]+2*d,width:c[2]-c[0]+4*d,height:c[3]-c[1]+4*d};c=f.canvasObj.vb;f._vbounds={minX:c[0]-2*d,minY:c[1]-2*d,maxX:c[2]+2*d,maxY:c[3]+2*d,width:c[2]-c[0]+4*d,height:c[3]-c[1]+4*d}};a.Shape.baseConstructor.call(this,c);this.baseItemBoundingRect=
null;this.args=d;this.isDrawn=!1;this.canvas=null;this.visible=this.getAttribute("visible");this.canvasID=c.id;this._canvasObj=a.D[this.canvasID];this.divName=this.getAttribute("dns")?this.getAttribute("dns"):this.getAttribute("dn");var l=this.currentState,m=a.D[this.divName];if(void 0!=m){if(m.hasOwnProperty("stc")&&(l<m.stc.length&&0<=l)&&(m=a.D[m.stc[l]]))this._canvasObj=a.D[m.mdi];this.prevCanvasObj=this._canvasObj}this._tex=this.getAttribute("tex")?this._canvasObj.tex:0;this._tey=this.getAttribute("tey")?
this._canvasObj.tey:0;if(m=this._canvasObj.sr)this._shape=m;a.responsive&&(this.responsiveCSS=this._canvasObj.responsiveCSS);m=this._canvasObj.b;this._bounds={minX:m[0],minY:m[1],maxX:m[2],maxY:m[3]};m=this._canvasObj.vb;this._vbounds=null;this._vbounds=m?{minX:m[0],minY:m[1],maxX:m[2],maxY:m[3]}:this._bounds;this.parentData&&((this.parentData.type==a.kCPOTImageBoxItem||this.parentData.type==a.kCPOTWebObject)&&1==this.parentData.uab)&&this.setUpClickHandler();this._parentData=a.D[this.divName];this.isParentOfTypeSlide=
void 0==this._parentData.type;this.modifyParent=!this.isParentOfTypeSlide;this._transIn=this._parentData.transIn;this._normalImage=this._canvasObj.normalImage;a.responsive&&(!this.normalImage&&this._parentData.subt&&this._parentData.subt==a.kImageButton)&&(this._normalImage=this._canvasObj.uImg);if(!this.normalImage&&(a.device==a.IDEVICE||a.device==a.ANDROID))this._normalImage=this._canvasObj.normalImage;this._currImage=this.normalImage;this.isMouse=!1;this.parentData.mp&&(this.isMouse=!0);var m=
this._canvasObj.hImg,k=this._canvasObj.pImg,x=a.doesSupportStates(this._parentData.type),q=!0;if(a.device==a.IDEVICE||a.device==a.ANDROID)if(this.itemOrParentHasHoverState||this.itemOrParentHasDownState)q=!1;a.kSTTDown==this.parentStateType&&(a.kCPOTScorableButtonItem==this.parentData.type&&a.kImageButton==this.parentData.subt&&k)&&(this._currImage=this.normalImage=k,m&&(m=k));var n=document.getElementById(this.divName);n&&(n.drawingBoard=this.element.parentElement,n.bounds=this.bounds,n.drawingBoard.bounds=
this.vbounds);if((this.actualParent=n)&&void 0!=this._parentData.pa&&this._bounds){-1!=this._parentData.pa&&this._parentData.immo&&(a.movie.stage.currentSlide&&(this._parentData.pa=a.movie.stage.currentSlide.to-1),this.setAttribute("clickedOnce",!1));var s=this._bounds.maxX-this._bounds.minX,u=this._bounds.maxY-this._bounds.minY,w=1,o=1,p=0,v=0;10<s&&(w=(s-4)/s);10<u&&(o=(u-4)/u);if(1>w&&1>o){var p=!1,p=a.responsive?this.sh&&!this.sh.i:this.sh&&!this.sh.i||this.re,y=(p&&a.D.project.w>this._vbounds.maxX?
a.D.project.w:this._vbounds.maxX)-(0<this._vbounds.minX&&p?0:this._vbounds.minX),v=(p&&a.D.project.h>this._vbounds.maxY?a.D.project.h:this._vbounds.maxY)-(0<this._vbounds.minY&&p?0:this._vbounds.minY),u=(this._vbounds.maxX+this._vbounds.minX)/2,s=(this._vbounds.maxY+this._vbounds.minY)/2,y=y/2-(y/2-u)*w,v=v/2-(v/2-s)*o;p?(p=y-u,v-=s):v=p=0;this.oldMouseOver=n.onmouseover;this.oldMouseOut=n.onmouseout;this.dataObjForMouseStates={sx:w,sy:o,tx:-p,ty:-v,p:n,old_tr:this.tr}}}if(m||x)if(m&&(this.hoverImage=
m),n){q&&(n.onmouseover=j(a.mouseStateOver,e,!1,n.onmouseover),n.onmouseout=j(a.mouseStateOut,g,!1,n.onmouseout));if(a.device==a.IDEVICE||a.device==a.ANDROID)n.ontouchstart=j(a.mouseStateTouchStart,e);if(a.device==a.IDEVICE||a.device==a.ANDROID)n.ontouchend=j(a.mouseStateTouchEnd,g);if(k||x)if(k&&(this.downImage=k),q)if(n.onmousedown=j(a.mouseStateDown,h),n.onmouseup=j(a.mouseStateUp,i),a.device==a.IDEVICE||a.device==a.ANDROID)n.ontouchmove=j(a.mouseStateTouchMove,h,!0)}this.shouldShowRollOver=!0;
this._tr=this._canvasObj.tr;this._sh=this._canvasObj.sh;this._re=this._canvasObj.re;!1==this.cloneOfBaseStateItem&&-1!=this.baseStateItemID&&(this.playEffectsOnStart=!0);this.supportsStates=a.doesSupportStates(this.parentData.type);a.setInitialVisibility(this);if(this._parentData.hasOwnProperty("stc")){m=this._parentData.stc;for(k=0;k<m.length;++k)k!=l&&a._hideData(m[k])}};a.inherits(a.Shape,a.DisplayObject);Object.defineProperties(a.Shape.prototype,{canvasObj:{get:function(){return this._canvasObj},
set:function(c){this.prevCanvasObj=this._canvasObj;this._canvasObj=c;this.prevCanvasObj.dn!==this._canvasObj.dn&&(this._shape=this._tey=this._tex=this._font=this._rpfont=this._aip=this._uImg=this._pImg=this._hImg=this._currImage=this._transIn=this._parentObj=this._normalImage=this._tr=this._re=this._sh=this._vbounds=this._bounds=this._responsiveCSS=this._parentData=null,this.isDrawn=!1,c=this.canvasSwitchReason,this._canvasObj.visible=!0,this.drawIfNeeded(!0,c?c:a.ReasonForDrawing.kItemStateChanged),
a.updateVarText(this.actualParent,!0,!0))}},bounds:{get:function(){if(!this._bounds){var a=this.canvasObj.b;this._bounds={minX:a[0],minY:a[1],maxX:a[2],maxY:a[3]}}return this._bounds},set:function(a){this._bounds=a}},vbounds:{get:function(){if(!this._vbounds){var a=this.canvasObj.vb;this._vbounds=a?{minX:a[0],minY:a[1],maxX:a[2],maxY:a[3]}:this.bounds}return this._vbounds}},tr:{get:function(){this._tr||(this._tr=this.canvasObj.tr);return this._tr},set:function(a){this._tr=a}},sh:{get:function(){this._sh||
(this._sh=this.canvasObj.sh);return this._sh},set:function(a){this._sh=a}},re:{get:function(){this._re||(this._re=this.canvasObj.re);return this._re},set:function(a){this._re=a}},currImage:{get:function(){this._currImage||(this._currImage=this.canvasObj.ip);return this._currImage},set:function(a){this._currImage=a}},hImg:{get:function(){this._hImg||(this._hImg=this.canvasObj.hImg);return this._hImg},set:function(a){this._hImg=a}},pImg:{get:function(){this._pImg||(this._pImg=this.canvasObj.pImg);return this._pImg},
set:function(a){this._pImg=a}},normalImage:{get:function(){this._normalImage||(this._normalImage=this.canvasObj.ip);return this._normalImage},set:function(a){this._normalImage=a}},uImg:{get:function(){this._uImg||(this._uImg=this.canvasObj.uImg);return this._uImg},set:function(a){this._uImg=a}},aip:{get:function(){this._aip||(this._aip=this.canvasObj.aip);return this._aip},set:function(a){this._aip=a}},parentData:{get:function(){this._parentData||(this._parentData=a.D[this.canvasObj.dn]);return this._parentData},
set:function(a){this._parentData=a}},responsiveCSS:{get:function(){this._responsiveCSS||(this._responsiveCSS=this.canvasObj.css);return this._responsiveCSS},set:function(a){this._responsiveCSS=a}},parentObj:{get:function(){this._parentObj||(this._parentObj=a.D[this.canvasObj.dn]);return this._parentObj},set:function(a){this._parentObj=a}},transIn:{get:function(){this._transIn||(this._transIn=this.parentObj.trin);return this._transIn},set:function(a){this._transIn=a}},rpfont:{get:function(){this._rpfont||
(this._rpfont=this.canvasObj.rpfont);return this._rpfont},set:function(a){this._rpfont=a}},font:{get:function(){this._font||(this._font=this.canvasObj.rpfont[a.ResponsiveProjWidth].font);return this._font},set:function(a){this._font=a}},tex:{get:function(){void 0==this._tex&&(this._tex=this.canvasObj.tex?this.canvasObj.tex:0);return this._tex},set:function(a){this._tex=a}},tey:{get:function(){void 0==this._tey&&(this._tey=this.canvasObj.tey?this.canvasObj.tey:0);return this._tey},set:function(a){this._tey=
a}},shape:{get:function(){if(void 0==this._shape){var a=this.canvasObj.sr;a&&(this._shape=a)}return this._shape},set:function(a){this._shape=a}}});a.Shape.prototype.start=function(a,d){this.drawIfNeeded(a,d);if(!this.effectIsStarted||a)this.areDimensionsCalculated=!1,this.updateEffects(this.hasEffect),this.effectIsStarted=!0};a.Shape.prototype.reset=function(c){delete a.ropMap[this.element.id];this.canvas=null;this.isDrawn=!1;var d=!0;this.parentData&&this.parentData.st&&(d=!1);d&&(this.element.width=
"0",this.element.height="0",this.element.style.width="0px",this.element.style.height="0px",this.element.left="0",this.element.top="0",this.element.style.left="0px",this.element.style.top="0px");this.effectIsStarted=!1;if(c==a.Timeline.ReasonForUpdate.PROGRESS||c==a.Timeline.ReasonForUpdate.JUMP)if(this.element.drawingBoard&&(this.element.drawingBoard=null),this.element.originalParent&&(this.element.originalParent=null),this.actualParent&&(this.actualParent=null),this.actualDrawingElement)this.actualDrawingElement=
null};a.Shape.prototype.setUpClickHandler=function(){if(this.bounds){var c=this.bounds.maxX-this.bounds.minX,d=this.bounds.maxY-this.bounds.minY,e=1,g=1;10<c&&(e=(c-4)/c);10<d&&(g=(d-4)/d);if(1>e&&1>g){e=a.movie.stage.currentSlide;d=c=!1;if((c="Question Slide"==e.st)&&e.qs)(e=a.D[e.qs])&&"Hotspot"==e.qtp&&(d=!0);if(this.actualParent=document.getElementById(this.divName))c&&!d&&!this.actualParent.onclick?(c=function(c){return function(){a.clickSuccessHandler(c)}},this.parentData&&a.registerGestureEvent(this.actualParent,
a.GESTURE_EVENT_TYPES.TAP,c(this.parentData))):(this.actualParent.onclick=null,a.removeGestureEvent(this.actualParent,a.GESTURE_EVENT_TYPES.TAP))}}};a.Shape.prototype.drawIfNeeded=function(c,d){if((!a.responsive||!this.drawForResponsive(c,d))&&!this.isDrawn){var e=this.getAttribute("dn"),g=a.D[this.canvasObj.dn];this.parentDivName=e;var e=this.bounds,h=-e.minX+e.maxX,i=-e.minY+e.maxY;if(0==h||0==i)this.isDrawn=!0,this.drawComplete();else{this.args&&(h+=Number(this.args[1])+Number(this.args[2]),i+=
Number(this.args[1])+Number(this.args[3]));var j=g.type,h=(j==a.kCPOTClickBoxItem?this.canvas=a.createCanvas(e.minX,e.minY,0,0,this.element):this.canvas=a.createCanvas(e.minX,e.minY,Math.ceil(h),Math.ceil(i),this.element)).gc;this.element.style.left=e.minX+"px";this.element.style.top=e.minY+"px";this.element.style.width=e.maxX-e.minX+"px";this.element.style.height=e.maxY-e.minY+"px";var i=!1,i=this.re||this.sh&&!this.sh.i,f=void 0!=this.tr,l=this.currImage,m=this.modifyParent&&!this.isParentOfTypeSlide;
h.save();if(!this.isMouse){var k=e.minX,x=e.minY,q=e.maxX-e.minX,n=e.maxY-e.minY,s=this.actualParent;if(s){m&&(s.style.left=k+"px",s.style.top=x+"px",s.style.width=q+"px",s.style.height=n+"px");var u=0;this.tr&&(m&&(a.applyTransform(s,this.tr),s.tr=this.tr),u=a.getAngleFromRotateStr(this.tr));this.element.style.display="block";this.element.style.position="absolute";m&&(s.rotateAngle=u,a.movie.stage.addToParentChildMap(s.id,this.element.id),this.element.parentElement.style.left=this.vbounds.minX+"px",
this.element.parentElement.style.top=this.vbounds.minY+"px",this.element.parentElement.style.width=this.vbounds.maxX-this.vbounds.minX+"px",this.element.parentElement.style.height=this.vbounds.maxY-this.vbounds.minY+"px",this.element.parentElement.style.webkitBoxReflect=this.re?"below "+this.re.d+"px -webkit-gradient(linear, left top, left bottom, from(transparent), color-stop("+(1-this.re.s/100)+", transparent), to(rgba(255, 255, 255, "+(1-this.re.p/100)+")))":"unset")}this.init=!0;this.element.originalParent=
s;k=0<this.vbounds.minX&&i?0:this.vbounds.minX;x=0<this.vbounds.minY&&i?0:this.vbounds.minY;m=i&&a.D.project.h>this.vbounds.maxY?a.D.project.h:this.vbounds.maxY;q=(i&&a.D.project.w>this.vbounds.maxX?a.D.project.w:this.vbounds.maxX)-k;n=m-x;this.canvas=j==a.kCPOTClickBoxItem?a.createCanvas(0,0,0,0,this.element):a.createCanvas(void 0!=g.st?k:0,void 0!=g.st?x:0,q,n,this.element);this.element.style.display="block";this.element.style.position="absolute";this.isParentOfTypeSlide||(this.element.style.marginLeft=
k-this.vbounds.minX+"px",this.element.style.marginTop=x-this.vbounds.minY+"px");this.sh&&!this.sh.i&&(h.shadowOffsetX=this.sh.d*Math.cos(a.PIBy180*this.sh.a),h.shadowOffsetY=this.sh.d*Math.sin(a.PIBy180*this.sh.a),h.shadowBlur=this.sh.b,h.shadowColor=a.ConvertRGBToRGBA(this.sh.c,this.sh.o));u=0;this.tr&&(u=a.getAngleFromRotateStr(this.tr));i?(h.setTransform(1,0,0,1,0>k?-k:0,0>x?-x:0),h.translate((e.minX+e.maxX)/2,(e.minY+e.maxY)/2)):f&&h.translate(q/2,n/2);h.rotate(a.PIBy180*u);h.tex=this.tex;h.tey=
this.tey;h.centreImage=!0;h.width=q;h.height=n}if(this.shape)try{var w=this.getAttribute("objectToBeHidden");if(this.shape(h,l,w,a.isVisible(this),this.divName,i,f)||j==a.kCPOTClickBoxItem)this.isDrawn=!0,this.drawComplete()}catch(o){}h.restore();a.handleQuizzingItemsInReviewMode(this.element,g,this.divName);this.transIn&&(void 0!=d&&d!==a.ReasonForDrawing.kItemStateChanged)&&(this.element.parentElement.style.opacity=0);a.isVisible(this)?a._show(this.divName):a._hide(this.divName);a.isVisible(this)&&
this.playEffectsOnStart&&(e=this.parentDivName,(g=a.D[e].selfAnimationScript)&&eval(g),this.playEffectsOnStart=!1)}}};a.Shape.prototype.createTextHoldersIfRequired=function(c){var d=this.actualParent.clientWidth,e=this.actualParent.clientHeight;if(c.rpvt){var c=this.actualParent.id+"_vTxtHandlerHolder",g=a(c);g||(g=a.newElem("div"),g.id=c,g.style.display="block",g.style.position="absolute",g.style.width=d+"px",g.style.height=e+"px",g.style.visibility="hidden",this.actualParent.appendChild(g));c=this.actualParent.id+
"_vTxtHolder";g=a(c);g||(g=a.newElem("div"),g.id=c,g.style.display="block",g.style.position="absolute",g.style.width=d+"px",g.style.height=e+"px",this.element.parentElement.appendChild(g))}};a.Shape.prototype.drawForResponsive=function(c,d){if(!this.responsiveCSS)return!1;if(this.isDrawn&&!c)return a.initializeVisibilityForGroupedItem(this),!0;var e=a.getResponsiveCSS(this.responsiveCSS);a.getCSSFromLayouter(e,this);var g=!1,g=this.sh&&!this.sh.i,h=void 0!=this.tr;if(this.isDrawn&&this.currentCSS==
e&&(!c||d==a.ReasonForDrawing.kMoviePaused))return!0;var i=d===a.ReasonForDrawing.kItemStateChanged||d===a.ReasonForDrawing.kGettingBoundingRectInBaseState||d===a.ReasonForDrawing.kLinkedToItemAppeared,j=!0;this.currentCSS=e;var f=this.getAttribute("dn"),l=a.D[this.canvasObj.dn];this.parentDivName=f;var m=this.getAttribute("aan"),k=e,x=this.prevCanvasObj,f=this.modifyParent&&!this.isParentOfTypeSlide,q=0,n=this.actualParent.style.transform||this.actualParent.style.msTransform||this.actualParent.style.MozTransform||
this.actualParent.style.WebkitTransform||this.actualParent.style.OTransform,s=this.element.parentElement.style.transform||this.element.parentElement.style.msTransform||this.element.parentElement.style.MozTransform||this.element.parentElement.style.WebkitTransform||this.element.parentElement.style.OTransform;a.applyTransform(this.actualParent,"");a.applyTransform(this.element.parentElement,"");this.createTextHoldersIfRequired(l);this.isMouse||f&&!this.flex&&a.applyResponsiveStyles(this.actualParent,
e,j,i,void 0,d);this.parentElementClientBoundingRect=a.GetBoundingClientRectForElem(this.element.parentElement,i);var u=a.GetBoundingClientRectForElem(a.movie.stage.getSlideDiv(),i);if(!this.isMouse){if(f&&!a.isPartOfFlex(this)){if(l.rpvt&&l.autoGrow&&(d==a.ReasonForDrawing.kTextGrow||d==a.ReasonForDrawing.kMoviePaused)){var w=l.minItemHeight;w&&this.actualParent.clientHeight<w&&(this.actualParent.style.height=w+"px");k=a.createResponsiveStyleObj(e,e.p,e.l,e.t,e.r,e.b,this.actualParent.clientWidth+
"px",this.actualParent.clientHeight+"px",e.crop)}a.adjustPositionWithAnswerArea&&(l.type==a.kCPOTStageAnswerLabel||l.type==a.kCPOTStageAnswerItem||l.type==a.kCPOTFillBlankCaption||l.type==a.kCPOTStageMatchingAnswerEntry)&&a.adjustPositionWithAnswerArea(e,this.actualParent,m);this.actualParentClientBoundingRect=a.GetBoundingClientRectForElem(this.actualParent,i);if(this.tr){q=a.getAngleFromRotateStr(this.tr);if(!this.m_centrePoint||d==a.ReasonForDrawing.kOrientationChangeOrResize||d==a.ReasonForDrawing.kLinkedToItemAppeared)this.m_centrePoint=
a.getCenterForRotation(this.actualParent);j=a.getBoundsForRotatedItem1(this.actualParentClientBoundingRect.left-u.left,this.actualParentClientBoundingRect.top-u.top,this.actualParentClientBoundingRect.width,this.actualParentClientBoundingRect.height,this.m_centrePoint,q,this.strokeWidth);w=t=r=b=void 0;"auto"!=e.l&&(w=j.l);"auto"!=e.t&&(t=j.t);"auto"!=e.r&&(r=j.r);"auto"!=e.b&&(b=j.b);k=a.createResponsiveStyleObj(e,e.p,w,t,r,b,j.w,j.h,e.crop);j=!1}}this.isParentOfTypeSlide||a.applyResponsiveStyles(this.element.parentElement,
k,j,i,void 0,d)}w=j=0;this.m_centrePoint&&(j=this.m_centrePoint.X-(this.actualParentClientBoundingRect.left-u.left),w=this.m_centrePoint.Y-(this.actualParentClientBoundingRect.top-u.top));q=this.actualParent.clientWidth;k=this.actualParent.clientHeight;if(l.rpvt){var o=l.offsets;o||(o=[0,0,0,0]);var p=this.actualParent.id+"_vTxtHandlerHolder",v=a(p);v||(v=a.newElem("div"),v.id=p,v.style.display="block",v.style.position="absolute",v.style.width=q+"px",v.style.height=k+"px",v.style.visibility="hidden",
this.actualParent.appendChild(v));v.style.left=o[0]+"px";v.style.top=o[1]+"px";v.style.width=q-(o[0]+o[2])+"px";v.style.height=k-(o[1]+o[3])+"px";v=this.actualParent.id+"_vTxtHolder";p=a(v);p||(p=a.newElem("div"),p.id=v,p.style.display="block",p.style.position="absolute",p.style.width=q+"px",p.style.height=k+"px",this.element.parentElement.appendChild(p));a.applyTransform(p,"rotate(0)");p.style.left=o[0]+"px";p.style.top=o[1]+"px";p.style.width=q-(o[0]+o[2])+"px";p.style.height=k-(o[1]+o[3])+"px";
(d==a.ReasonForDrawing.kOrientationChangeOrResize||d==a.ReasonForDrawing.kItemStateChanged||d==a.ReasonForDrawing.kGettingBoundingRectInBaseState)&&a.updateVarText(this.actualParent,!0,!0);this.tr&&(p.style.left=(this.element.parentElement.clientWidth-p.clientWidth)/2+"px",p.style.top=(this.element.parentElement.clientHeight-p.clientHeight)/2+"px",k="center center",p.style["-ms-transform-origin"]=k,p.style["-moz-transform-origin"]=k,p.style["-webkit-transform-origin"]=k,p.style["-o-transform-origin"]=
k,p.style["transform-origin"]=k,a.applyTransform(p,this.tr))}a.applyTransform(this.actualParent,n);a.applyTransform(this.element.parentElement,s);a.adjustPositionWithAnswerArea&&(l.type==a.kCPOTStageAnswerLabel||l.type==a.kCPOTStageAnswerItem||l.type==a.kCPOTFillBlankCaption||l.type==a.kCPOTStageMatchingAnswerEntry)&&a.adjustPositionWithAnswerArea(e,this.element.parentElement,m);this.parentElementClientBoundingRect=a.GetBoundingClientRectForElem(this.element.parentElement,i);i=l.type;s=n=0;m=this.parentElementClientBoundingRect.left-
u.left;u=this.parentElementClientBoundingRect.top-u.top;if(i==a.kCPOTClickBoxItem)k=a.createResponsiveStyleObj(e,void 0,"0px","0px","0px","0px","0px","0px",void 0);else if(g)n=a("div_Slide").clientWidth,s=a("div_Slide").clientHeight,k=a.createResponsiveStyleObj(e,void 0,"0px","0px","0px","0px",n+"px",s+"px",void 0);else if(this.isMouse){n=this.bounds.maxX-this.bounds.minX;s=this.bounds.maxY-this.bounds.minY;l.clientWidth=n;l.clientHeight=s;o=k="0px";if(q=l.mpa)o=(k=a.movie.stage.isSlideBGCropped())?
a.RespDefaultBptW:a.project.clientWidth,q=q.b[a.ResponsiveProjWidth],k=k?q[0]:a.getRoundedValue(o*q[0]/a.ResponsiveProjWidth),k+="px",o=a.getRoundedValue(q[1])+"px";k=a.createResponsiveStyleObj(e,void 0,k,o,"0px","0px",n+"px",s+"px",void 0)}else n=this.element.parentElement.clientWidth,s=this.element.parentElement.clientHeight,k=a.createResponsiveStyleObj(e,void 0,"0px","0px","0px","0px","100%","100%",void 0);this.canvas=this.isParentOfTypeSlide?a.movie.stage.isSlideBGCropped()?a.createCanvas(0,0,
a("div_Slide").clientWidth,a("div_Slide").clientHeight,this.element):a.shouldDrawCurrentSlideInPannableMode()?a.createCanvas(0,0,a("div_Slide").clientWidth,a("div_Slide").clientHeight,this.element):a.createCanvas((a("project").clientWidth-this.element.clientWidth)/2,(a("project").clientHeight-this.element.clientHeight)/2,this.element.clientWidth,this.element.clientHeight,this.element):a.createResponsiveCanvas(k,n,s,this.element);n=this.canvas.gc;n.crop=e.crop?e.crop:void 0;!this.isParentOfTypeSlide&&
g&&(this.element.style.marginLeft=(0>m?1:-1)*m+"px",this.element.style.marginTop=(0>u?1:-1)*u+"px");s=this.currImage;n.save();if(!this.isMouse){if(o=this.actualParent){q=0;if(this.tr)f&&(k=j?100*j/o.clientWidth+"%":"center",k+=" ",k=w?k+(100*w/o.clientHeight+"%"):k+"center",o.style["-ms-transform-origin"]=k,o.style["-moz-transform-origin"]=k,o.style["-webkit-transform-origin"]=k,o.style["-o-transform-origin"]=k,o.style["transform-origin"]=k,a.applyTransform(o,this.tr),o.tr=this.tr),q=a.getAngleFromRotateStr(this.tr);
else if(f&&(d===a.ReasonForDrawing.kItemStateChanged||d==a.ReasonForDrawing.kGettingBoundingRectInBaseState)&&x&&x.tr)k="initial",o.style["-ms-transform-origin"]=k,o.style["-moz-transform-origin"]=k,o.style["-webkit-transform-origin"]=k,o.style["-o-transform-origin"]=k,o.style["transform-origin"]=k,x=(o.style.transform||o.style.msTransform||o.style.MozTransform||o.style.WebkitTransform||o.style.OTransform).replace(x.tr,""),a.applyTransform(o,x),o.tr=void 0;if(f)if(o.rotateAngle=q,a.movie.stage.addToParentChildMap(o.id,
this.element.id),this.re)this.element.parentElement.style.webkitBoxReflect="below "+this.re.d+"px -webkit-gradient(linear, left top, left bottom, from(transparent), color-stop("+(1-this.re.s/100)+", transparent), to(rgba(255, 255, 255, "+(1-this.re.p/100)+")))";else if(d===a.ReasonForDrawing.kItemStateChanged||d==a.ReasonForDrawing.kGettingBoundingRectInBaseState)this.element.parentElement.style.webkitBoxReflect="unset"}this.init=!0;this.element.originalParent=o;this.sh&&!this.sh.i&&(n.shadowOffsetX=
this.sh.d*Math.cos(a.PIBy180*this.sh.a),n.shadowOffsetY=this.sh.d*Math.sin(a.PIBy180*this.sh.a),n.shadowBlur=this.sh.b,n.shadowColor=a.ConvertRGBToRGBA(this.sh.c,this.sh.o));q=0;this.tr&&(q=a.getAngleFromRotateStr(this.tr));g?(n.setTransform(1,0,0,1,0>m?-m:0,0>u?-u:0),n.translate(m+this.element.parentElement.clientWidth/2,u+this.element.parentElement.clientHeight/2)):h&&n.translate(this.element.parentElement.clientWidth/2,this.element.parentElement.clientHeight/2);n.rotate(a.PIBy180*q);n.tex=this.tex;
n.tey=this.tey;n.centreImage=!0;n.width=this.element.clientWidth;n.height=this.element.clientHeight;this.isParentOfTypeSlide?(l.clientWidth=this.element.clientWidth,l.clientHeight=this.element.clientHeight):h?(l.clientWidth=this.actualParent.clientWidth,l.clientHeight=this.actualParent.clientHeight):(l.clientWidth=this.element.parentElement.clientWidth,l.clientHeight=this.element.parentElement.clientHeight);a.isCaptionItem(l.type)&&(this.shape?l.pixelColor=this.getAttribute("bc"):(this.isDrawn=!0,
this.drawComplete(d)))}f=a.isVisible(this);if(this.shape)try{var y=this.getAttribute("objectToBeHidden");if(this.shape(n,s,y,f,this.divName,g,h)||i==a.kCPOTClickBoxItem||!e.ipiv)this.isDrawn=!0,this.drawComplete(d);else return!1}catch(z){}if(l.type==a.kCPOTScoringResultItem||l.type==a.kCPOTStageAnswerLabel||l.type==a.kCPOTStageAnswerItem||l.type==a.kCPOTFillBlankCaption||l.type==a.kCPOTStageMatchingAnswerEntry||l.type==a.kCPOTQuestionColumn)this.isDrawn=!0,this.drawComplete(d);n.restore();a.handleQuizzingItemsInReviewMode(this.element,
l,this.divName);this.transIn&&d==a.ReasonForDrawing.kRegularDraw&&(this.element.parentElement.style.opacity=0);f||a._hide(this.divName);f&&this.playEffectsOnStart&&((e=a.D[this.canvasObj.dn].selfAnimationScript)&&eval(e),this.playEffectsOnStart=!1);return!0};a.Shape.prototype.playPath=function(a){var d=a.length,e=0,g=this.canvas.gc;for(g.beginPath();e<d;)switch(a[e++]){case "M":g.moveTo(a[e++],a[e++]);break;case "L":g.lineTo(a[e++],a[e++]);break;case "Z":g.closePath();break;case "Q":g.quadraticCurveTo(a[e++],
a[e++],a[e++],a[e++]);break;case "C":g.bezierCurveTo(a[e++],a[e++],a[e++],a[e++],a[e++],a[e++])}};a.Shape.prototype.shrinkShapeButtonInAllStates=function(){for(var c=a.GetBaseItemsInAllStates(this,!0),d=0;d<c.length;d++){var e=c[d];e&&e.shrinkShapeButton()}};a.Shape.prototype.expandShapeButtonInAllStates=function(){for(var c=a.GetBaseItemsInAllStates(this,!0),d=0;d<c.length;d++){var e=c[d];e&&e.expandShapeButton()}};a.Shape.prototype.shrinkShapeButton=function(){if(this.dataObjForMouseStates){var c=
{sx:this.dataObjForMouseStates.sx,sy:this.dataObjForMouseStates.sy,tx:this.dataObjForMouseStates.tx,ty:this.dataObjForMouseStates.ty,p:this.dataObjForMouseStates.p,old_tr:this.dataObjForMouseStates.old_tr};if(a.responsive)if(c=this.element,a.responsive){var d=c.getBoundingClientRect(),e=c.parentElement.getBoundingClientRect(),c=this.actualParent.getBoundingClientRect(),g=a("div_Slide").getBoundingClientRect(),h=c.width,i=c.height,j=c=1,f=0,l=0;10<h&&(c=(h-4)/h);10<i&&(j=(i-4)/i);1>c&&1>j&&(h=a.project.clientWidth,
i=a.project.clientHeight,f=!1,f=this.sh&&!this.sh.i,h=(f&&h>d.right-g.left?h:d.right-g.left)-(0<d.left-g.left&&f?0:d.left-g.left),i=(f&&i>d.bottom-g.top?i:d.bottom-g.top)-(0<d.top-g.top&&f?0:d.top-g.top),d=e.left-g.left+e.width/2,e=e.top-g.top+e.height/2,g=h/2-(h/2-d)*c,h=i/2-(i/2-e)*j,f?(f=g-d,l=h-e):l=f=0);c={sx:c,sy:j,tx:-f,ty:-l,p:this.actualParent,old_tr:this.tr}}else c=void 0;c="translate("+c.tx/a("div_Slide").scaleFactor+"px,"+c.ty/a("div_Slide").scaleFactor+"px) scalex("+c.sx+") scaley("+
c.sy+")";a.applyTransform(this.element,c);this.setVBounds();(1==a("div_Slide").scaleFactor||!a.responsive)&&this.drawIfNeeded(!0,a.ReasonForDrawing.kMouseEvent)}};a.Shape.prototype.expandShapeButton=function(){this.dataObjForMouseStates&&(a.applyTransform(this.element,""),this.setVBounds(),(1==a("div_Slide").scaleFactor||!a.responsive)&&this.drawIfNeeded(!0,a.ReasonForDrawing.kMouseEvent))};a.Shape.prototype.changeStateOnMouseEvents=function(c,d){var e=null;-1==this.baseStateItemID?e=this:this.cloneOfBaseStateItem&&
(e=a.getDisplayObjByCP_UID(this.baseStateItemID));e&&void 0!==e.HandleMouseEventOnStateItems&&e.HandleMouseEventOnStateItems(c,this.parentStateType,d)};a.Shape.prototype.HandleMouseEventOnStateItems=function(c,d,e){var g=!1,h=a.D[this.divName];h&&(g=a.isValidItemForStateOptimization({n:this.divName,t:h.type}));if((g||this.parentStateType==a.kSTTNormal)&&(!(h&&void 0!=h.enabled)||h.enabled)){var i=a.kSTTNone,j="";if(0<=this.currentState&&this.currentState<this.states.length){var f=this.states[this.currentState];
f&&(i=f.stt,j=f.stn)}f=!(a.device==a.IDEVICE||a.device==a.ANDROID)||"mouseup"!=c;if(!(!g&&f&&i!=d)){var d=!1,l="",m=!1;if("mouseover"==c){if((i==a.kSTTNormal||i==a.kSTTCustom||i==a.kSTTVisited)&&this.shouldShowRollOver)if(d=!0,l=a.getLocalisedStateName("kCPRolloverState"),this.stateAtStartOfMouseEvents=j,a.BringBaseItemToFrontWithinState(this,a.getLocalisedStateName("kCPRolloverState")),a.device===a.DESKTOP&&(c=a.GetMouseOverManager())){var k=this;c.addMouseOverItem(this,function(){k.ForceMouseOut()})}}else if("mouseout"==
c){if(i==a.kSTTRollOver||i==a.kSTTDown)d=!0,l=this.stateAtStartOfMouseEvents,a.device===a.DESKTOP&&(c=a.GetMouseOverManager())&&c.removeMouseOverItem(this);if(i==a.kSTTNormal||i==a.kSTTCustom||i==a.kSTTVisited)a.browser==a.CHROME&&this.ignoreMouseOutEventOnNormal?this.ignoreMouseOutEventOnNormal=!1:this.shouldShowRollOver=!0}else if("mousedown"==c){if(i==a.kSTTNormal||i==a.kSTTRollOver||i==a.kSTTCustom||i==a.kSTTVisited)if(d=!0,l=a.getLocalisedStateName("kCPDownState"),this.bShouldListenForMouseUpOnDownState=
!0,i==a.kSTTNormal||i==a.kSTTCustom||i==a.kSTTVisited)this.stateAtStartOfMouseEvents=j,this.ignoreMouseOutEventOnNormal=!0;this.shrinkShapeButtonInAllStates()}else if("mouseup"==c){if(!f||i==a.kSTTDown)d=!0,l=this.stateAtStartOfMouseEvents,this.shouldShowRollOver=!1,this.bShouldListenForMouseUpOnDownState&&(m=!0);this.expandShapeButtonInAllStates()}d&&(l!==a.getLocalisedStateName("kCPRolloverState")&&a.ResetItemZIndicesWithinState(this,a.getLocalisedStateName("kCPRolloverState")),a.changeState(this.actualParent.id,
l,!1));m&&!g&&(!a.IsGestureSupportedDevice()&&(a.shouldRelaxBrowserCheck(h.type)||a.CHROME!=a.browser&&a.MSIE!=a.browser||a.m_isLMSPreview))&&a.dispatchClickEvent(this.actualParent,e,{asPartOfStateChange:!0})}}};a.FrameSet=function(c,d){function e(c,d,e,g,h,i){var d=new a.Shortcut(d.k,d.c?!0:!1,d.s?!0:!1,d.a?!0:!1),q="";void 0!=e.eh&&(q=g.dn);return new a.KeyHandler(function(a){return c(e,g,a)},d,h,i,q)}a.FrameSet.baseConstructor.call(this,c);this.children=d;this.from=this.getAttribute("from");this.to=
this.getAttribute("to");this.afrom=this.getAttribute("afrom");this.ato=this.getAttribute("ato");this.transIn=this.getAttribute("trin");this.transIn||(this.transIn=0);this.transOut=this.getAttribute("trout");this.transOut||(this.transOut=0);this.element.drawingBoard&&(this.element.drawingBoard.style.display="block",this.element.drawingBoard.style.opacity=0<this.transIn?0:1,this.element.drawingBoard.isOverlay&&(this.element.drawingBoard.style.opacity=a.movie.stage.overlayOpacity));"mouse"==this.getAttribute("mp")&&
(this.motionPathMover=a.movie.mousePath,this.motionPathArgs=this.getAttribute("mpa"));this.type=this.getAttribute("type");this.itemData=a.D[this.element.id];this.itemCanvasData=null;this.itemData&&this.itemData.mdi&&(this.itemCanvasData=a.D[this.itemData.mdi]);this.itemCanvasData&&(a.cpIDMap[this.itemCanvasData.uid]=this.itemData.mdi);this.pa=this.getAttribute("pa");this.alwaysPause=this.getAttribute("cpa");var g=this.getAttribute("psv");g&&(this.psv=g);if(void 0!=this.pa){this.element.style.WebkitTapHighlightColor=
"rgba(0,0,0,0.3)";this.setAttribute("handled",!1);this.setAttribute("clickedOnce",!1);this.setAttribute("currentAttempt",0);this.setAttribute("actionInProgress",!1);if(void 0!=this.getAttribute("iqb")&&this.getAttribute("iqb")){var g=this.getAttribute("sn"),g=a.D[g].qs,h;g&&-1==g.indexOf(",")&&(h=a.getQuestionObject(g));g=this.getAttribute("qbt");this.element.style.cursor="pointer";var i=this.getAttribute("bstiid"),i=i&&-1!==i;if(g)switch(g){case "submit":h.registerSubmitButton(this.element,i);break;
case "back":h.registerBackButton(this.element,i);break;case "skip":h.registerSkipButton(this.element,i);break;case "clear":h.registerClearButton(this.element,i);break;case "submitAll":h.registerSubmitAllButton(this.element,i);break;case "reviewModeNext":h.registerReviewModeNextButton(this.element,i);break;case "reviewModeBack":h.registerReviewModeBackButton(this.element,i);break;case "continue":case "retake":case "postResult":case "review":a.registerGestureEvent(this.element,a.GESTURE_EVENT_TYPES.TAP,
a.QuizButtonCH,null,!0);a.ThreeDQuestionHelper&&a.ThreeDQuestionHelper.registerEventHandlingDiv(this.element,"click");break;default:a.registerGestureEvent(this.element,a.GESTURE_EVENT_TYPES.TAP,a.QuizButtonCH,null,!0)}}this.dependents=this.getAttribute("dep");if(1==this.getAttribute("rp")&&(a.kCPOTAutoShape==this.type||a.kCPOTImageBoxItem==this.type||a.kCPOTWebObject==this.type))if((h=a.movie.stage.currentSlide)&&h.from>this.pa)this.rp_pa=h.from+this.pa-this.from}this.htmlDependents=[];void 0!=this.psv&&
this.setAttribute("pausedOnce",!1);if(h=this.getAttribute("onShow"))this.onShow=window[h];if(this.keyHandler=this.getAttribute("kh"))if(this.keyShortcut=this.getAttribute("sc"))(h=e(this.keyHandler,this.keyShortcut,a.D[this.element.id],a.D[this.element.id+"c"],this.from,this.to))&&a.movie.stage.addKeyHandler(h);if(!this.keyHandler&&(this.keyHandler=this.getAttribute("eh")))(h=e(this.keyHandler,"",a.D[this.element.id],a.D[this.element.id+"c"],this.from,this.to))&&a.movie.stage.addKeyHandler(h);this.isStarted=
!1;if(a.kCPOTClickBoxItem==this.type||a.kCPOTScorableButtonItem==this.type||a.kCPOTAutoShape==this.type||a.kCPOTImageBoxItem==this.type||a.kCPOTWebObject==this.type)(this.dblClick=this.getAttribute("dclk"))?a.movie.stage.getClickManager().addDoubleClick(a.D[this.element.id],a.D[this.element.id+"c"],this.element):a.kCPOTClickBoxItem==this.type&&(this.rightClick=this.getAttribute("rclk"))&&a.movie.stage.getClickManager().addRightClick(a.D[this.element.id],a.D[this.element.id+"c"],this.element);a.kCPOTTextEntryButtonItem==
this.type&&(this.parentId=this.getAttribute("vid"))&&a.movie.stage.addToParentChildMap(this.parentId,this.element.id);if(a.MSIE==a.browser&&void 0!=this.type)switch(this.type){case a.kCPOTStageShortAnswer:case a.kCPOTQuestionFillBlank:case a.kCPOTFillBlankCaption:case a.kCPOTWidgetItem:case a.kCPOTProgressIndicator:case a.kCPOTReviewArea:case a.kCPOTScoringResult:case a.kCPOTStageAnswerItem:case a.kCPOTStageAnswerLabel:case a.kCPOTStageMatchingQuestion:case a.kCPOTStageMatchingAnswerEntry:case a.kCPOTFLVItem:break;
case a.kCPOTWebObject:if(this.itemCanvasData&&(h=this.itemCanvasData.wosvg)&&""!=h)c.style.backgroundColor="rgba(255,255,255,0)";break;default:c.style.backgroundColor="rgba(255,255,255,0)"}};a.inherits(a.FrameSet,a.DisplayObject);a.FrameSet.prototype.isInRange=function(c){if(0==this.from&&0==this.to)return!0;var d=a.getDisplayObjByKey(this.itemData.mdi);return d&&-1!==d.baseStateItemID&&(d=a.getBaseStateItem(d))&&d.parentData&&(a.kCPOTSuccessCaptionItem==d.parentData.type||a.kCPOTFailureCaptionItem==
d.parentData.type||a.kCPOTHintCaptionItem==d.parentData.type||a.kCPRolloverCaptionItem==d.parentData.type||a.kCPRolloverImageItem==d.parentData.type||a.kCPOTRolloverAutoShape==d.parentData.type||a.kCPOTSuccessShapeItem==d.parentData.type||a.kCPOTFailureShapeItem==d.parentData.type||a.kCPOTHintShapeItem==d.parentData.type)?!0:a.kCPOTSuccessCaptionItem==this.type||a.kCPOTFailureCaptionItem==this.type||a.kCPOTHintCaptionItem==this.type||a.kCPRolloverCaptionItem==this.type||a.kCPRolloverImageItem==this.type||
a.kCPOTRolloverAutoShape==this.type||a.kCPOTSuccessShapeItem==this.type||a.kCPOTFailureShapeItem==this.type||a.kCPOTHintShapeItem==this.type?!0:this.from<=c&&this.to>=c};a.FrameSet.prototype.updateOpacity=function(){if(this.element.drawingBoard&&!(a.kCPOTSuccessCaptionItem==this.type||a.kCPOTFailureCaptionItem==this.type||a.kCPOTHintCaptionItem==this.type||a.kCPOTSuccessShapeItem==this.type||a.kCPOTFailureShapeItem==this.type||a.kCPOTHintShapeItem==this.type)){var c=cpInfoCurrentFrame-this.from+1,
d=this.to-cpInfoCurrentFrame;this.transIn&&0<c&&c<=this.transIn?this.element.drawingBoard.style.opacity=c/this.transIn:this.transOut&&0<=d&&d<this.transOut?this.element.drawingBoard.style.opacity=d/this.transOut:this.element.isOverlayBackground?this.element.drawingBoard.style.opacity=a.movie.stage.overlayOpacity:"1"!=this.element.drawingBoard.style.opacity&&(this.element.drawingBoard.style.opacity=1)}};a.FrameSet.prototype.updateFrame=function(c){this.updateOpacity();a.FrameSet.superClass.updateFrame.call(this);
c==a.Timeline.ReasonForUpdate.JUMP&&this.setAttribute("clickedOnce",!1)};a.FrameSet.prototype.start=function(c,d){var e=0,g=!this.isStarted;this.isStarted=!0;this.element.drawingBoard&&(this.element.drawingBoard.style.display="block");void 0!=this.pa&&null!=a.movie.stage.currentSlide&&((e=-1!=this.pa)||(e=a.kCPOTClickBoxItem==this.type||a.kCPOTScorableButtonItem==this.type||a.kCPOTAutoShape==this.type||a.kCPOTTextEntryBoxItem==this.type),e&&(a.movie.stage.currentSlide.topMostObjectInteractiveObject=
this.element.id));a.FrameSet.superClass.start.call(this,c,d);var h;(e=a.GetDataForElement(this.element,!0))&&e.mdi&&(h=a.D[e.mdi]);if(h&&1==h.visible)for(e=0;e<this.htmlDependents.length;++e)this.htmlDependents[e].style.visibility="visible";this.updateOpacity();if(this.onShow)try{this.onShow.call(this.timeline)}catch(i){}if("undefined"!=typeof cptb&&!cptb.isObjectDrawn(this))cptb.onObjectEnter(this);a.responsive&&g&&(a.updateVarText(this.element,!0,!0),this.element&&(g=a.D[this.element.id])&&(void 0!=
g.rpvt||void 0!=g.vt)&&a.updateVarText(this.element,!0,!0))};a.FrameSet.prototype.reset=function(c){if("undefined"!=typeof cptb&&!cptb.isObjectReset(this))cptb.onObjectExit(this);var d=0;delete a.ropMap[this.element.id];a.FrameSet.superClass.reset.call(this,c);this.isStarted=!1;var e=!0;this.itemData.st&&(e=!1);c==a.Timeline.ReasonForUpdate.PROGRESS&&this.children&&(this.children[0]&&this.children[0].continueToNextSlide)&&(e=!1);e&&(this.element.style.display="none");if(void 0!=this.pa&&(this.setAttribute("handled",
!1),this.setAttribute("clickedOnce",!1),void 0!=this.dependents))for(d=0;d<this.dependents.length;++d)a.hide(this.dependents[d]);for(d=0;d<this.htmlDependents.length;++d)this.htmlDependents[d].style.visibility="hidden";void 0!=this.psv&&this.setAttribute("pausedOnce",!1);e&&this.element.drawingBoard&&(this.element.drawingBoard.style.opacity=0,this.element.drawingBoard.style.display="none");if(c==a.Timeline.ReasonForUpdate.PROGRESS||c==a.Timeline.ReasonForUpdate.JUMP)if(this.element.drawingBoard&&
(this.element.drawingBoard=null),this.element.originalParent&&(this.element.originalParent=null),this.actualParent&&(this.actualParent=null),this.actualDrawingElement)this.actualDrawingElement=null};a.FrameSet.prototype.ApplyMotion=function(a,d){if(null!=this.motionPathMover)try{this.motionPathMover(this,a,d)}catch(e){}};a.FrameSet.prototype.handleRewind=function(){void 0!=this.pa&&(this.setAttribute("handled",!1),this.setAttribute("clickedOnce",!1));void 0!=this.psv&&this.setAttribute("pausedOnce",
!1);void 0!=this.type&&a.kCPOTWidgetItem==this.type&&!this.itemData.rp&&1==this.children.length&&this.reset()};a.FrameSet.prototype.onEndOfSlide=function(c){var d=this.isStarted&&!this.isInRange(cpInfoCurrentFrame);d||(d=a.kCPOTSuccessCaptionItem==this.type||a.kCPOTFailureCaptionItem==this.type||a.kCPOTHintCaptionItem==this.type||a.kCPOTAutoShape==this.type&&1!=this.getAttribute("rp")||a.kCPRolloverCaptionItem==this.type||a.kCPRolloverImageItem==this.type||a.kCPOTRolloverAutoShape==this.type||a.kCPOTSuccessShapeItem==
this.type||a.kCPOTFailureShapeItem==this.type||a.kCPOTHintShapeItem==this.type)||this.type==a.kCPOTWidgetItem&&!this.itemData.rp&&(d=!0);if(d)this.reset(c);else if(1==this.getAttribute("uab")&&(a.kCPOTAutoShape==this.type&&(c=this.children[0])&&c.removeMouseHandlers(),a.kCPOTImageBoxItem==this.type||a.kCPOTWebObject==this.type))if((c=this.children[0])&&c.actualParent)c.actualParent.onclick=null}})(window.cp);
(function(a){a.Timeline=function(b){a.Timeline.baseConstructor.call(this,b);this.updateTimeline();this.pools=this.getAttribute("pools");this.currentSlideStartFrame=this.nextSlideStartFrame=this.previousSlideStartFrame=-1;this.movieEndAction=this.getAttribute("endAction");this.fadeInAtStart=this.getAttribute("fadeInAtStart");this.fadeOutAtEnd=this.getAttribute("fadeOutAtEnd");this.noSkipFrames={};this.m_useWidgetVersion7=this.getAttribute("useWidgetVersion7");var c=this;this.paused=!1;this.cStart=
this.lastFrame+1;this.cEnd=-1;this.imagesToBeCleared=[];this.slideDiv=null;this.eventListeners=[];this.feedbacks=[];this.m_keyManager=new a.KeyManager;this.m_clickManager=new a.ClickManager;this.parentChildMap={};this.ccProperties=this.videoCCItems=this.audioCCItems=null;this.curVidCCItem=this.curAudCCItem=-1;this.ccVisibility=0;this.itemsNotLoaded=[];this.rewind=!1;this.interactivePauseFrame=-1;this.currentFrameHasAudioCC=this.currentFrameHasVideoCC=!1;this.customSlideItemList=a.getCustomSlideItemList();
this.m_interactionManagers=[];this.mainSlideDiv=this.element.children[0];this.mainSlideDiv.style.display="block";this.slideDivTemplate=this.mainSlideDiv.cloneNode();this.slideDivTemplate.style.display="none";this.slideLayers=[this.mainSlideDiv];if(b=document.getElementById("cpDocument"))jQuery(document).keydown(function(a){c.m_keyManager.handleKeyDown(a)}),jQuery(document).keyup(function(a){c.m_keyManager.handleKeyUp(a)}),jQuery(document).focusout(function(a){c.m_keyManager.handleFocusOut(a)});b.style.backgroundColor=
a.D.project.htmlBgColor;this.verbose=!1;a.CCInfo={selfTriggeredVisibilityChange:!1,isUserVisibilityIntentSet:!1,userVisibilityIntent:!1}};a.inherits(a.Timeline,a.DisplayObject);a.Timeline.prototype.getCurrentSlideName=function(){var a=cpInfoCurrentSlideIndex;1<this.slideLayers.length&&(a=this.slideLayers[this.slideLayers.length-1].currentFrameInfo.slideIndex);return this.getSlideNameForIndex(a)};a.Timeline.prototype.isOverlaySlideIndex=function(b){return 0>b||b>=this.slides.length?!1:a.D[this.slides[b]].iols?
!0:!1};a.Timeline.prototype.is360QSlideIndex=function(b){return 0>b||b>=this.slides.length?!1:a.D[this.slides[b]].i360qs?!0:!1};a.Timeline.prototype.isThreeDSlideIndex=function(b){return 0>b||b>=this.slides.length?!1:"ThreeD Slide"===a.D[this.slides[b]].st?!0:!1};a.Timeline.prototype.getFrameOfOverlaySlide=function(a){return this.overlayslideToFrameNumMap[a]};a.Timeline.prototype.getFrameOf360QSlide=function(a){return this._360QSlideIndexToFrameNumMap[a]};a.Timeline.prototype.isInvalidSlideIndex=
function(a){return 0>a?!0:a<this.slides.length||this.isOverlaySlideIndex(a)?!1:!0};a.Timeline.prototype.replaceTopSlideLayer=function(b){var c=!1,d=b.si;1<this.slideLayers.length&&(c=!0,this.popSlideLayer(!0));a.isInReviewMode()?cpCmndGotoSlideAndResume=d:this.pushSlideLayer(b,c)};a.Timeline.prototype.replaceTopSlideLayerFor360QSlide=function(a){var c=!1;1<this.slideLayers.length&&(c=!0,this.popSlideLayer(!0));this.pushSlideLayer(a,c)};a.Timeline.prototype.pushSlideLayer=function(b,c){var d=this.slideDivTemplate.cloneNode(),
e=this.getSlideDiv(),f=!1,g=a.movie.playbackController.GetQuizController(),j=b.si,i=a.D[b.olin],h=1,h=!1;i&&(this.overlayOpacity=h=i.op/100,(h=i.rsqsoe)&&a.allowQuizResubmit());i=this.getSlideNameForIndex(j);i=a.D[i];i.i360qs&&(h=0);g&&g.GetIsInReviewMode()&&(f=!0);e.id="div_Slide"+this.slideLayers.length;d.id="div_Slide";d.scaleFactor=e.scaleFactor;if(this.pendingDivDeleters)for(g=this.pendingDivDeleters.length-1;0<=g;g--)this.pendingDivDeleters.pop()();var g=e.style.pointerEvents,h=e.style.filter,
k=e.style.transition;e.style.pointerEvents="none";f="all "+(f?0.1:1)+"s ease-in-out";c?d.style.opacity=i.i360qs?0:1:(d.style.opacity=0,d.style.transition=f,a.addClass(d,"overlaySlide"),i.i360qs||setTimeout(function(){d.style.opacity=1;e.style.filter="blur(5px)"},50));d.style.display="block";a.pushState();this.element.appendChild(d);a.IsGestureSupportedDevice()&&a.initializeGestureEvents&&(a.m_gestureHandler=void 0,a.m_gestureHandler=a.useg?new a.HammerGestureHandler:new a.GestureHandler);this.slideLayers.push({currentFrameInfo:{frame:i.from,
slideIndex:j,slideDiv:d},returnFrameInfo:{frame:cpInfoCurrentFrame,slideIndex:cpInfoCurrentSlideIndex,slideDiv:e,children:this.children,oldPointerEventsVal:g,oldFilterVal:h,oldTransitionVal:k}});if(a.movie.vdm&&a.movie.vdm.youtubeSlideVideoChannel&&a.movie.vdm.youtubeSlideVideoChannel.onPushOverlaySlide)a.movie.vdm.youtubeSlideVideoChannel.onPushOverlaySlide();if(a.movie.vdm&&a.movie.vdm.vimeoSlideVideoChannel&&a.movie.vdm.vimeoSlideVideoChannel.onPushOverlaySlide)a.movie.vdm.vimeoSlideVideoChannel.onPushOverlaySlide();
_cpInfoCurrentFrameAtLayerZero=cpInfoCurrentFrame;this.preventAdvanceFrame=!1;this.ignoreOverlayOnFrame=-1;this.pendingOnSlideLayerAddedAction=!0;a.movie.jumpToFrame(i.from)};a.Timeline.prototype.debugLog=console.log;a.Timeline.prototype.makeLayerZeroSlideMRUIfOnOverlaySlide=function(){try{!this.pendingOnSlideLayerAddedAction&&this.hasOverlaySlide()&&a.movie.pm.ifPrefetchedMakeMRU(this.slideLayers[1].returnFrameInfo.slideIndex)}catch(b){consol.error("Error in makeLayerZeroSlideMRUIfOnOverlaySlide: "+
b)}};a.Timeline.prototype.popSlideLayer=function(b){if(1==this.slideLayers.length)this.getSlideDiv().id="div_Slide";else{this.pendingPopSlideLayer=!1;var c=this,d=this.slideLayers.pop(),e=d.currentFrameInfo.slideDiv,f=d.returnFrameInfo.slideDiv,g=a.movie.playbackController.GetQuizController(),j=d.returnFrameInfo.oldTransitionVal;g&&g.GetIsInReviewMode();e.id="div_Slide_toBeDeleted";f.id="div_Slide";f.style.filter=d.returnFrameInfo.oldFilterVal;f.style.pointerEvents=d.returnFrameInfo.oldPointerEventsVal;
e.style.opacity=0;d.returnFrameInfo.frame+1 in this.overlayslideframes?(void 0==this.m_backgroundStyleFilter&&(this.m_backgroundStyleFilter=d.returnFrameInfo.oldFilterVal),f.style.filter="blur(5px)"):(f.style.filter=this.m_backgroundStyleFilter,this.m_backgroundStyleFilter=void 0);g=this.getSlideIndexForFrame(cpInfoPrevFrame);!b&&(0<=g&&this.getSlideIndexForFrame(d.currentFrameInfo.frame)!=g)&&(b=!0);this.pendingDivDeleters||(this.pendingDivDeleters=[]);var i=function(){try{f.style.transition=j;c.element.removeChild(e)}catch(a){}};
this.pendingDivDeleters.push(i);setTimeout(function(){i()},1E3);this.cEnd=-1;this.layerInfo=d;this.children=d.returnFrameInfo.children;this.pendingOnSlideLayerRemovedAction=!0;b?this.getSlideIndexForFrame(cpInfoCurrentFrame)!=d.returnFrameInfo.slideIndex&&a.stateStack.pop():(this.ignoreOverlayOnFrame=b=d.returnFrameInfo.frame,a.movie.jumpToFrame(b))}};a.Timeline.prototype.hasOverlaySlide=function(){return 1<this.slideLayers.length};a.Timeline.prototype.currentSlideName=function(){return this.getSlideNameForIndex(cpInfoCurrentSlideIndex)};
a.Timeline.prototype.updateTimeline=function(){var a,c,d;this.slides=(this.getAttribute("slides")||"").split(",");a=this.getAttribute("overlayslides");d=this.getAttribute("_360questionslides");this.overlayslides=a?a.split(","):[];this._360questionslides=d?d.split(","):[];this.overlayslideframes=this.getAttribute("overlayslideframes")||{};this.overlayslideToFrameNumMap={};this._360AssessmentHotspotFrames=this.getAttribute("taf");this._360QSlideIndexToFrameNumMap=this.getAttribute("_360questionslideframes");
for(c in this.overlayslideframes)d=this.overlayslideframes[c].si,a=this.overlayslideToFrameNumMap[d],void 0!==a&&console.error("Error: same slide is being added at multiple frames. Which one is picked is not defined."),this.overlayslideToFrameNumMap[d]=parseInt(c);this.questions=[];c=this.getAttribute("questions")||"";0<c.length&&(this.questions=c.split(","));this.lastFrame=this.getAttribute("to")};a.Timeline.prototype.addToItemNotLoaded=function(a){this.itemsNotLoaded.push(a)};a.Timeline.prototype.removeFromItemNotLoaded=
function(a){for(var c=0;c<this.itemsNotLoaded.length;++c)if(a==this.itemsNotLoaded[c]){this.itemsNotLoaded.splice(c,1);break}};a.Timeline.prototype.hasItemsLoaded=function(){var b=0<this.itemsNotLoaded.length;a.verbose&&0<b&&a.log(b+" widgets pending");return!b};a.Timeline.prototype.addToParentChildMap=function(a,c){if(!(""==a||""==c)){var d=this.parentChildMap[a];d||(d=this.parentChildMap[a]={});d[c]=!0}};a.Timeline.prototype.clearParentChildMap=function(){this.parentChildMap={}};a.Timeline.prototype.getChildrenForParent=
function(a,c){if(""!=a){var d=this.parentChildMap[a];if(d)for(var e in d)c.push(e),this.getChildrenForParent(e,c)}};a.Timeline.prototype.addKeyHandler=function(a){a&&this.m_keyManager.addHandler(a)};a.Timeline.prototype.removeKeyHandler=function(a){a&&this.m_keyManager.removeHandler(a)};a.Timeline.prototype.getClickManager=function(){return this.m_clickManager};a.Timeline.prototype.setupSlideItemDiv=function(b,c,d,e,f,g,j){var g="canvas",i="cp-shape",d=!0;if(a.kCPHighlight==b.t)i="cp-hb";else if(a.kCPRolloverAreaItem==
b.t)i="cp-rai";else if(a.kCPZoomSource==b.t)i="cp-zoom";else if(a.kCPMouse==b.t)d=!0;else if(a.kCPMouseClick==b.t)i="cp-mc",d=!0;else if(a.kCPOTReviewArea==b.t)g="div",i="cp-questionSlideReviewLabel",d=!1;else if(a.kCPOTProgressIndicator==b.t)g="div",i="cp-progressSlideLabel",d=!1;else if(a.kCPOTScoringResult==b.t)g="div",i="cp-resultSlideLabel",d=!1;else if(a.kCPTypingText==b.t)g="div",i="cp-typingtext";else if(a.kCPOTTextEntryBoxItem==b.t)g="div",i="cp-input",d=!1;else if(a.kCPOTLineItem==b.t)i=
"cp-line";else if(a.kCPOTAnswerArea==b.t||a.kCPOTMatchingQuestionArea==b.t||a.kCPOTMatchingAnswerArea==b.t||a.kCPOTLikertQuestionArea==b.t||a.kCPOTLikertTotalGroupArea==b.t)i="cp-answerArea";else if(a.kCPOTStageQuestionText==b.t||a.kCPOTStageQuestionTitle==b.t)i="cp-rectWithText";else if(a.kCPOTWidgetItem==b.t)g="div",i="cp-widget",d=this.m_useWidgetVersion7;else if(a.kCPOTWebObject==b.t){if(g="div",i="cp-WebObject",d=this.m_useWidgetVersion7,!0!==d&&c.mdi){var h=a.D[c.mdi];h&&(d=void 0!=h.wosvg)}}else if(a.kCPOTTAItem==
b.t)g="div",i="cp-ta";else if(a.kCPOTFLVItem==b.t)g="div",i="cp-eventVideo",d=!0;else if(a.kCPOTVideo==b.t)g="div",c.vestr?(i="cp-ytStreamingVideo",b.t=a.kCPOTYTStreamingVideo):c.vim?(i="cp-vimeoStreamingVideo",b.t=a.kCPOTVimeoStreamingVideo):i="cp-slideVideo",d=!0;else if(a.kCPFullMotion==b.t)g="div",i="cp-fmrVideo",d=!0;else if(a.kCPOTYTStreamingVideo==b.t)g="div",i="cp-ytStreamingVideo",d=!0;else if(a.kCPOTVimeoStreamingVideo==b.t)g="div",i="cp-vimeoStreamingVideo",d=!0;else if(a.kCPOTVideoResource==
b.t)g="div",i="cp-cpvcVideo",d=!0;else if(a.kCPOTAnimationItem==b.t)g="div",i="cp-animationItem",d=!0;else if(a.extObjInfo)for(h=0;h<a.extObjInfo.length;++h)if(a.IsValidObj(a.extObjInfo[h].cb)){var k={};k.elemType=g;k.classType=i;k.rewrap=d;if(a.extObjInfo[h].cb(b.t,k)){g=k.elemType;i=k.classType;d=k.rewrap;break}}k="c";a.kCPOTStageAnswerItem==b.t&&(h=a.D[b.n+"c"],h=h.at,h==a.kCPOTStageSingleChoiceMultipleAnswer?(k="r",i="cp-singleChoiceInput"):h==a.kCPOTStageMultipleChoiceMultipleAnswer?(k="ch",
i="cp-multipleChoiceInput"):h==a.kCPOTStageSequenceAnswer?(k="seq",i="cp-sequenceInput"):h==a.kCPOTStageMatchingAnswer&&(k="mtcha",i="cp-matchingAnswer"),g="div",d=!1);a.kCPOTQuestionFillBlank==b.t&&(i="cp-fibAnswer",k="fib",g="div",d=!1);a.kCPOTStageShortAnswer==b.t&&(i="cp-shortAnswer",k="sha",g="div",d=!1);a.kCPOTItemHotSpot==b.t&&(i="cp-hotspotInput",k="hotspot",g="div",d=!1);a.kCPOTStageMatchingQuestion==b.t&&(i="cp-matchingItem",k="mtchi",g="div",d=!1);if(a.kCPOTStageLikertQuestion==b.t)i="cp-likertItem",
k="li",g="div",d=!1;else if(a.kCPOTOvalItem==b.t||a.kCPOTRectangleItem==b.t||a.kCPOTPolygon==b.t||a.kCPOTAnswerArea==b.t||a.kCPOTMatchingQuestionArea==b.t||a.kCPOTMatchingAnswerArea==b.t||a.kCPOTLikertQuestionArea==b.t||a.kCPOTLikertTotalGroupArea==b.t)i="cp-drawingItem";else if(a.kCPOTTitleAutoShape==b.t||a.kCPOTSubTitleAutoShape==b.t||a.kCPOTAutoShape==b.t||a.kCPOTRolloverAutoShape==b.t||a.kCPOTStageCorrectFeedbackShape==b.t||a.kCPOTSuccessShapeItem==b.t||a.kCPOTStageIncorrectFeedbackShape==b.t||
a.kCPOTFailureShapeItem==b.t||a.kCPOTHintShapeItem==b.t||a.kCPOTStagePartialCorrectFeedbackShape==b.t||a.kCPOTRetryFeedbackShape==b.t||a.kCPOTIncompleteFeedbackShape==b.t||a.kCPOTTimeoutFeedbackShape==b.t||a.kCPOTAnswerFeedbackShape==b.t||a.kCPOTFlexBoxBackgroundItem==b.t)i="cp-autoShape";else if((a.kCPOTScorableButtonItem==b.t||a.kCPOTRetakeButton==b.t||a.kCPOTStageQuestionNextButton==b.t||a.kCPOTStageQuestionClearButton==b.t||a.kCPOTStageQuestionBackButton==b.t||a.kCPOTStageQuestionReviewModeNextButton==
b.t||a.kCPOTStageQuestionReviewModeBackButton==b.t||a.kCPOTStageQuestionSubmitButton==b.t||a.kCPOTScoringReviewButton==b.t||a.kCPOTScoringContinueButton==b.t||a.kCPOTSubmitAllButton==b.t||a.kCPOTResetButton==b.t||a.kCPOTUndoButton==b.t||a.kCPOTDDSubmitButton==b.t||a.kCPOTTextEntryButtonItem==b.t)&&a.responsive)h=a.D[b.n],h.subt!=a.kImageButton&&(h.subt==a.kTextButton?(g="div",i="cp-textbutton"):i="cp-drawingItem");this.SetItemVisibility(b);j?g=a(b.n+k):(g=a.newElem(g),g.id=b.n+k,g.setAttribute("class",
i));a.kCPOTStageAnswerItem==b.t&&(c=a.D[b.n+"c"],h=c.at,h==a.kCPOTStageSequenceAnswer&&(g.setAttribute("tabIndex","-1"),a.removeAccessibilityOutline(g)));if(a.kCPOTTextEntryBoxItem==b.t&&b.d&&(b.d.hc&&(0<b.d.hc.length&&a.device!=a.IDEVICE&&a.device!=a.ANDROID)&&(g.setAttribute("onmouseover",'cp.showHint("'+b.d.hc+'",this)'),f.setAttribute("onmousemove",'cp.showHint("'+b.d.hc+'",this)'),g.setAttribute("onmouseout",'cp.hideHint("'+b.d.hc+'",this)')),b.d.cur))g.style.cursor="text";i=void 0;if(d){j?f=
a("re-"+g.id):(f=a.newElem("div"),f.id="re-"+g.id,f.setAttribute("tabIndex",-1),f.setAttribute("class","cp-rewrap"),f.appendChild(g));a.removeAccessibilityOutline(f);i=f;d=!1;if(b.t==a.kCPOTWebObject&&(h=b.n))if(h=a.D[h],(k=a.D[h.mdi])&&k.wosvg&&g&&0<g.innerHTML.length)d=!0,h.uab&&f.setAttribute("role","button");(d||!j||!(a.kCPOTWidgetItem==b.t||a.kCPOTWebObject==b.t))&&e.appendChild(f)}else i=f,j?a.kCPOTWidgetItem!=b.t&&a.kCPOTWebObject!=b.t&&e.appendChild(f):f.appendChild(g);i.style.zIndex=c.zIndex;
a.fixWebkitScaling(i)};a.Timeline.prototype.SetItemVisibility=function(b){if(b&&a.kCPOTRetakeButton==b.t&&a.movie.playbackController&&(b=a.D[b.n])){var b=a.D[b.mdi],c=a.movie.playbackController.GetQuizController();b&&c&&(c=c.CanShowRetakeButton(),b.visible=c,b.effectiveVi=c)}};a.create3DSlideDiv=function(b,c){var d=a.D.project.w,e=a.D.project.h,f=a.createSlideDiv(b,c),g=f.slideDiv,f=f.oldSlideId;g.firstChild&&"__bgDiv__"==g.firstChild.id&&g.removeChild(g.firstChild);var j=document.getElementById(f+
"c");j&&g.removeChild(j);j=!1;f=document.getElementById("3D"+f);!f&&"ThreeD Slide"==b.st&&(f=a.newElem("div"),j=!0);f&&(f.setAttribute("class","cp-ThreeDSlide"),f.id="3DSlide"+b.id,f.style.position="absolute",a.responsive?(f.style.width="100%",f.style.height="100%"):(f.style.width=d+"px",f.style.height=e+"px"),j&&g.appendChild(f))};a.createSlideDiv=function(b,c){var d=!1,e=c.firstChild,f=a.D.project.w,g=a.D.project.h;e||(e=a.newElem("div"),e.setAttribute("class","cp-frameset"),d=!0);var j=e.id;e.id=
"Slide"+b.id;e.style.zIndex="0";a.responsive?(e.style.width="100%",e.style.height="100%"):(e.style.left="0px",e.style.width=f+"px",e.style.height=g+"px");d&&c.appendChild(e);return{slideDivCreated:d,slideDiv:e,oldSlideId:j}};a.setupSlideBGDivAndCanvasInternal=function(b,c,d){var e=a.D.project.w,f=a.D.project.h,g=a.createSlideDiv(b,c),j=g.slideDivCreated,c=g.slideDiv,g=g.oldSlideId,i,h=!1;j?h=!1:c.firstChild&&"__bgDiv__"==c.firstChild.id&&(i=c.firstChild,h=!0);var k=!1,l=!1;if(b.gf)if(l=!0,h||(i=a.newElem("div"),
i.id="__bgDiv__",k=!0),a.browser_supports_svg){var p=a.getGradientSvgStr(b.gf,e,f,a("project").clientWidth/e,a("project").clientHeight/f);0<p.length&&(i.setAttribute("class",""),i.style.position="absolute",a.responsive?(i.style.width="100%",i.style.height="100%"):(i.style.width=e+"px",i.style.height=f+"px"),i.innerHTML=p)}else i.setAttribute("class","cp-gf"),i.style.position="absolute",a.responsive?(i.style.width="100%",i.style.height="100%"):(i.style.width=e+"px",i.style.height=f+"px"),i.firstChild&&
"CANVAS"==i.firstChild.nodeName?i.firstChild.id="Slide"+b.id+"gf":i.innerHTML='<canvas id="Slide'+b.id+'gf"></canvas>';else b.imgf&&(l=!0,h||(i=a.newElem("div"),i.id="__bgDiv__",k=!0),i.setAttribute("class","cp-imgf"),i.style.position="absolute",a.responsive?(i.style.width="100%",i.style.height="100%"):(i.style.width=e+"px",i.style.height=f+"px"),i.firstChild&&"CANVAS"==i.firstChild.nodeName?i.firstChild.id="Slide"+b.id+"imgf":i.innerHTML='<canvas id="Slide'+b.id+'imgf"></canvas>');l?k&&(c.firstChild?
c.insertBefore(i,c.firstChild):c.appendChild(i)):h&&c.removeChild(i);var m;j||(m=document.getElementById(g+"c"));m||(m=a.newElem("canvas"),m.setAttribute("class","cp-shape"),c.appendChild(m));m.id="Slide"+b.id+"c";f=a.D[m.id];h=f.b;j=h[2]-h[0];g=h[3]-h[1];e=!0;if(a.responsive){var l=a("project").clientWidth,p=a("project").clientHeight,h=j,k=g,n=l/j,o=p/g,n=n<o?n:o;f.aip?(e=!0,h*=n,k*=n):(j>l&&(h=l),g>p&&(k=p));if(l=f.css[a.ResponsiveProjWidth].crop)if((p=a.movie.im.images[f.ip])&&p.nativeImage&&p.nativeImage.complete)if(l=
a.getIntersectionRect([0,0,p.nativeImage.width,p.nativeImage.height],[l.x,l.y,h,k]),0<=l.w&&l.w<h||0<=l.h&&l.h<k)e=!0;m.style.width=h+"px";m.style.height=k+"px";m.style.left=(a("project").clientWidth-h)/2+"px";m.style.top=(a("project").clientHeight-k)/2+"px"}else m.style.width=j+"px",m.style.height=g+"px",m.style.left=h[0]+"px",m.style.top=h[1]+"px";if(d&&(0<j&&0<g)&&(d=f.aip?f.aip:f.ip))(d=a.movie.im.images[d])&&d.nativeImage.complete&&m.getContext("2d").drawImage(d.nativeImage,0,0,m.clientWidth,
m.clientHeight);c.style.backgroundColor!=b.bc&&e&&(c.style.backgroundColor=b.bc);if(b.iols&&(m&&(m.style.opacity=a.movie.stage.overlayOpacity),i&&(i.style.opacity=a.movie.stage.overlayOpacity),c))b.bc&&(c.style.backgroundColor=a.getRGBA(b.bc,a.movie.stage.overlayOpacity)),c.isOverlay=!0,c.overlayOpacity=a.movie.stage.overlayOpacity};a.Timeline.prototype.isSlideBGCropped=function(){if(!a.responsive||!this.currentSlide||!a.D[this.currentSlide.mdi])return!1;var b=a.D[this.currentSlide.mdi];if(!b)return!1;
b=b.css;if(!b)return!1;b=b[a.ResponsiveProjWidth];if(!b)return!1;var c=void 0!=b.crop;c&&(this.currentSlide.cropX=b.crop.x,this.currentSlide.cropY=b.crop.y);return c};a.Timeline.prototype.setup3DSlide=function(b,c){a.create3DSlideDiv(b,c);a.registerGestureEvent(c,a.GESTURE_EVENT_TYPES.TAP,a.handleClick);a.device==a.DESKTOP&&(c.onmousemove=a.handleMouseMoveNew)};a.Timeline.prototype.rearrangeROPItemsOnMainSlideDivChange=function(b){for(var c in a.ropMap){var d=c.substring(0,c.length-1),e=a.D[d],d=
{n:d,t:e.type},f=this.getSlideNameForIndex(b),g=a.D[f],f=a("div_Slide"),j=f.firstChild,i=document.getElementById("Slide"+g.id+"c"),h,k=document.getElementById(d.n);document.getElementById(c);if(k){h=k;this.setupSlideItemDiv(d,e,g,j,h,i,!0);1==e.rp&&-1!==h.tabIndex&&(1==e.rpa?h.setAttribute("tabIndex",2499):h.setAttribute("tabIndex",2500+e.zIndex));e=!1;if(d.t==a.kCPOTWebObject&&(g=d.n))if(g=a.D[g],(j=a.D[g.mdi])&&j.wosvg)g.uab&&h.setAttribute("role","button"),e=!0;h&&(a.kCPOTWidgetItem==d.t||a.kCPOTWebObject==
d.t?(this.m_useWidgetVersion7||!k||e)&&f.appendChild(h):f.appendChild(h),a.fixWebkitScaling(h));a.restoreROPDivStyle(c);a.ropMap[c].restOfProjectDoOnNewSlide()}}};a.Timeline.prototype.setupSlideDiv=function(b,c){if("ThreeD Slide"==b.st)document.body.style["overscroll-behavior"]="none",this.setup3DSlide(b,c),a.showNavToggleButton(a.device==a.DESKTOP||a.D.project_main.responsiveType!=a.kCPPMEVR),a.D.project_main.responsiveType==a.kCPPMEVR&&(document.getElementById("project").style.backgroundColor="#3C3C3C");
else{document.body.style["overscroll-behavior"]="auto";a.showNavToggleButton(!1);a.clearGestureCache();a.setupSlideBGDivAndCanvasInternal(b,c,!1);var d=c.firstChild,e=document.getElementById("Slide"+b.id+"c");d.offsetHeight=d.offsetHeight;e.offsetHeight=e.offsetHeight;if("Question Slide"==b.st){c.onclick=void 0;var f=a.getQuestionObjectName(d.id);(f=a.D[f])&&("Hotspot"!=f.qtp?a.removeGestureEvent(c,a.GESTURE_EVENT_TYPES.TAP):a.registerGestureEvent(c,a.GESTURE_EVENT_TYPES.TAP,a.handleClick))}else a.registerGestureEvent(c,
a.GESTURE_EVENT_TYPES.TAP,a.handleClick),a.device==a.DESKTOP&&(c.onmousemove=a.handleMouseMoveNew);this.m_EffectAnimationManager=void 0;if(this.m_SlideHasEffects||a.movie.PPTXSlide)this.m_EffectAnimationManager=PPTXLib.initializeAnimationManagerForCPSlide(b);if(0<b.si.length){f=b.si;a.mmsItems={};for(var g=0;g<f.length;++g){var j=f[g],i=a.D[j.n];i.zIndex=g;!1!==i.immo&&(a.mmsItems[j.n]={});var h,k=document.getElementById(j.n);if(k)h=k,this.setupSlideItemDiv(j,i,b,d,h,e,!0),1==i.rp&&-1!==h.tabIndex&&
(1==i.rpa?h.setAttribute("tabIndex",2499):h.setAttribute("tabIndex",2500+i.zIndex));else{var l=a.D[j.n],p=a.isValidItemForStateOptimization(j);!p&&(l&&l.hasOwnProperty("stc"))&&delete l.stc;l=l.sicbs&&p;if((a.kCPOTAutoShape==j.t||a.kCPOTImageBoxItem)&&j.d&&j.d.cur)i.handCursor=!0;if(!l){h=a.newElem("div");h.id=j.n;h.setAttribute("class","cp-frameset");setTimeout(this.setupAccessibility.bind(this,j,h),1);this.addHyperLinks(j,h);a.kCPOTTextEntryButtonItem==j.t&&a.registerGestureEvent(h,a.GESTURE_EVENT_TYPES.TAP,
function(b){return function(){a.disableInteractions||a.TEBValidator(b)}}(h));if(j.d&&(a.kCPOTScorableButtonItem==j.t||a.kCPOTClickBoxItem==j.t||a.kCPOTAutoShape==j.t||a.kCPOTImageBoxItem==j.t))if(j.d.hc&&(0<j.d.hc.length&&a.device!=a.IDEVICE&&a.device!=a.ANDROID)&&(h.setAttribute("onmouseover",'cp.showHint("'+j.d.hc+'",this)'),h.setAttribute("onmouseout",'cp.hideHint("'+j.d.hc+'",this)')),j.d.cur&&a.kCPOTAutoShape!=j.t)h.style.cursor="pointer";this.setupSlideItemDiv(j,i,b,d,h,e);!0===i.immo&&-1!==
h.tabIndex&&(b.mmot?h.setAttribute("tabIndex",2499):h.setAttribute("tabIndex",2500+f.length))}}b.iols&&(0==g&&a.kCPOTVideoResource==j.t)&&(h.isOverlayBackground=!0,h.style.opacity=a.movie.stage.overlayOpacity);i=i.zIndex;h&&(a.kCPOTWidgetItem==j.t||a.kCPOTWebObject==j.t?(this.m_useWidgetVersion7||!k)&&c.appendChild(h):c.appendChild(h),h.style.zIndex=i,a.fixWebkitScaling(h))}}a.createAlternativeAccessibleText(d,b.accstr,"img");a.removeAccessibilityOutline(d);h=b.accstr;0===a.D.pref.acc&&(h=" ");a.SAFARI===
a.browser?(d.setAttribute("role","img"),d.setAttribute("aria-label",h)):(e=a.newElem("p"),e.innerHTML=h,h=a.newElem("div"),h.id=d.id+"accStr2",h.style.opacity=0,h.style.width="0px",h.style.height="0px",h.style.left="-1999px",h.style.position="fixed",h.appendChild(e),h.setAttribute("tabIndex","2400"),d.appendChild(h))}};a.Timeline.prototype.addHyperLinks=function(b,c){var d=function(b){return function(){a.hyperlinkClick(b)}};if(b){var e=a.D[b.n+"c"];if(void 0!=e&&!1!=e.hasOwnProperty("hl"))for(var e=
e.hl.split(","),f=0;f<e.length;++f){var g=e[f];if(""!=g){var j=a.D[g];if(void 0==j)break;if(""==j.oca)break;var i=j.b;if(""==i)break;var h;if(a.responsive){if(h=a(g))break;h=g.split("_");h=h[0].substr(2);h=document.getElementsByClassName(h);h=h[0];if(!h)continue}else h=a.newElem("div");h.id=g;h.setAttribute("tabIndex",j.ti);h.setAttribute("aria-label",j.accstr);1===a.D.pref.hsr&&a.removeAccessibilityOutline(h);h.setAttribute("role","link");a.responsive||(h.style.display="block",h.style.position="absolute",
h.style.width=i[2]-i[0]+"px",h.style.height=i[3]-i[1]+"px",h.style.top=i[1]+"px",h.style.left=i[0]+"px",h.style.backgroundColor="#FFFFFF",h.style.opacity=0,c.appendChild(h));a.responsive||a.registerGestureEvent(h,a.GESTURE_EVENT_TYPES.TAP,d(g));h.style.cursor="pointer"}}}};a.Timeline.prototype.setupAccessibility=function(b,c){if(b){var d=a.D[b.n+"c"],e=a.D[b.n];if(void 0!=d&&!1!==d.hasOwnProperty("accstr")){var f=d.ti,g=a.getAccessibilityString(d),j=a.getAccessibilityLanguage(d);if(b.t==a.kCPOTCaptionItem||
b.t==a.kCPOTTitleAutoShape||b.t==a.kCPOTScoringResultItem||a.kCPOTSuccessCaptionItem==b.t||a.kCPOTImageBoxItem==b.t&&!e.uab||a.kCPOTFailureCaptionItem==b.t||a.kCPOTHintCaptionItem==b.t||a.kCPOTIncompleteFeedbackItem==b.t||a.kCPOTStageCorrectFeedback==b.t||a.kCPOTStageIncorrectFeedback==b.t||a.kCPOTStagePartialCorrectFeedback==b.t||a.kCPOTTimeoutFeedbackItem==b.t||a.kCPOTRetryFeedbackItem==b.t||a.kCPOTFillBlankCaption==b.t||a.kCPOTStageMatchingQuestion==b.t||a.kCPOTStageMatchingAnswer==b.t||a.kCPOTStageAnswerItem==
b.t||a.kCPOTQuestionColumn==b.t||a.kCPRolloverCaptionItem==b.t||a.kCPRolloverImageItem==b.t||a.kCPOTStageCorrectFeedbackShape==b.t||a.kCPOTSuccessShapeItem==b.t||a.kCPOTStageIncorrectFeedbackShape==b.t||a.kCPOTFailureShapeItem==b.t||a.kCPOTHintShapeItem==b.t||a.kCPOTStagePartialCorrectFeedbackShape==b.t||a.kCPOTRetryFeedbackShape==b.t||a.kCPOTIncompleteFeedbackShape==b.t||a.kCPOTTimeoutFeedbackShape==b.t)c.setAttribute("tabIndex",-1),a.kCPOTFillBlankCaption==b.t?a.createAlternativeAccessibleText(c,
d.fibText,"img"):a.kCPOTStageAnswerItem!==b.t&&(a.createAlternativeAccessibleText(c,g,"img"),b.t==a.kCPOTCaptionItem||a.kCPOTIncompleteFeedbackItem==b.t||a.kCPOTStageCorrectFeedback==b.t||a.kCPOTStageIncorrectFeedback==b.t||a.kCPOTStagePartialCorrectFeedback==b.t||a.kCPOTTimeoutFeedbackItem==b.t||a.kCPOTRetryFeedbackItem==b.t||a.kCPOTStageCorrectFeedbackShape==b.t||a.kCPOTStageIncorrectFeedbackShape==b.t||a.kCPOTStagePartialCorrectFeedbackShape==b.t||a.kCPOTRetryFeedbackShape==b.t||a.kCPOTIncompleteFeedbackShape==
b.t||a.kCPOTTimeoutFeedbackShape==b.t||a.kCPOTImageBoxItem==b.t&&!e.uab?c.setAttribute("tabIndex",-1):c.setAttribute("tabIndex",2500)),""!==j&&c.setAttribute("lang",j),a.removeAccessibilityOutline(c);else if(b.t==a.kCPOTWebObject){if(d=b.n)if(d=a.D[d],(d=a.D[d.mdi])&&d.wosvg)e.uab?(a.createAlternativeAccessibleText(c,g,"img"),1==a.D.pref.hsr&&a.removeAccessibilityOutline(c),c.setAttribute("tabIndex",f)):c.setAttribute("tabIndex",-1),""!==j&&c.setAttribute("lang",j)}else a.kCPOTStageMatchingAnswerEntry==
b.t?(c.setAttribute("tabIndex",-1),a.createAlternativeAccessibleText(c,"","img"),a.removeAccessibilityOutline(c)):b.t==a.kCPOTScorableButtonItem||b.t==a.kCPOTRetakeButton||b.t==a.kCPOTScoringReviewButton||b.t==a.kCPOTScoringContinueButton?(c.setAttribute("tabIndex",f),a.createAlternativeAccessibleText(c,g,"button"),1===a.D.pref.hsr&&a.removeAccessibilityOutline(c)):b.t==a.kCPOTTextEntryButtonItem?(c.setAttribute("tabIndex",f),a.createAlternativeAccessibleText(c,g,"button"),1===a.D.pref.hsr&&a.removeAccessibilityOutline(c)):
b.t==a.kCPOTClickBoxItem?(c.setAttribute("tabIndex",-1),a.removeAccessibilityOutline(c),a.createAlternativeAccessibleText(c,g,"button")):b.t==a.kCPOTLineItem||b.t==a.kCPOTOvalItem||b.t==a.kCPOTRectangleItem||b.t==a.kCPOTPolygon||b.t==a.kCPOTAutoShape||b.t==a.kCPOTImageBoxItem&&e.uab?(c.setAttribute("tabIndex",f),a.createAlternativeAccessibleText(c,g,"img"),1===a.D.pref.hsr&&a.removeAccessibilityOutline(c)):b.t==a.kCPOTStageQuestionText||b.t==a.kCPOTStageQuestionTitle?(c.setAttribute("tabIndex",-1),
a.removeAccessibilityOutline(c),a.createAlternativeAccessibleText(c,g,"img")):b.t==a.kCPOTStageQuestionNextButton||b.t==a.kCPOTStageQuestionClearButton||b.t==a.kCPOTStageQuestionBackButton||b.t==a.kCPOTStageQuestionReviewModeBackButton||b.t==a.kCPOTStageQuestionReviewModeNextButton||b.t==a.kCPOTStageQuestionSubmitButton||b.t==a.kCPOTSubmitAllButton?(c.setAttribute("tabIndex",f),c.setAttribute("aria-label",g),a.createAlternativeAccessibleText(c,g,"button"),1===a.D.pref.hsr&&a.removeAccessibilityOutline(c)):
b.t==a.kCPOTAnimationItem||b.t==a.kCPOTTAItem||b.t==a.kCPOTTitleAutoShape||b.t==a.kCPOTSubTitleAutoShape?(c.setAttribute("tabIndex",-1),a.removeAccessibilityOutline(c),a.createAlternativeAccessibleText(c,g,"img")):b.t==a.kCPOTFLVItem?(c.setAttribute("tabIndex",f),a.createAlternativeAccessibleText(c,g,"presentation")):b.t==a.kCPOTWidgetItem&&(c.setAttribute("tabIndex",f),a.createAlternativeAccessibleText(c,g,"application"),1===a.D.pref.hsr&&a.removeAccessibilityOutline(c));if(e.uab)if(b.t===a.kCPOTAutoShape||
b.t==a.kCPOTImageBoxItem)c.setAttribute("role","button");else if(b.t==a.kCPOTWebObject&&(d=b.n))d=a.D[d],(d=a.D[d.mdi])&&d.wosvg&&c.setAttribute("role","button");""!==j&&c.setAttribute("lang",j)}}};a.Timeline.prototype.getSlideDiv=function(){return this.hasOverlaySlide()?this.slideLayers[this.slideLayers.length-1].currentFrameInfo.slideDiv:this.mainSlideDiv};a.Timeline.prototype.canUpdateToFrame=function(a,c){var d=c;d||(d=this.getSlideIndexForFrame(a));return this.canUpdateToSlide(d)};a.Timeline.prototype.canUpdateToSlide=
function(b){return b>=this.slides.length||0>b?!1:a.movie.playbackController?""==a.movie.playbackController.AllowedToGoToSlide(cpInfoCurrentSlideIndex,b):!0};a.Timeline.prototype.getSlideIndexForFrame=function(b){for(var c=0;c<this.slides.length;++c){var d=a.D[this.slides[c]],e=d.to;if(b>=d.from&&b<=e)return c}return-1};a.Timeline.prototype.getAllSlideNames=function(){return this.slides};a.Timeline.prototype.getSlideNameForIndex=function(a){return 0<=a&&a<this.slides.length?this.slides[a]:""};a.Timeline.prototype.setSlideNameForSlideAtIndex=
function(a,c){0<=a&&a<this.slides.length&&(this.slides[a]=c)};a.Timeline.prototype.getSlideIndexForName=function(a){if(void 0==a||""==a)return-1;for(var c=0;c<this.slides.length;++c)if(a==this.slides[c])return c;return-1};a.Timeline.prototype.updatePlaybar=function(b){a.verbose&&a.log("update playbar "+b);a.responsive&&(a.PB&&a.PB.playbarCreated&&a.PB.rootObj&&a.PB.rootObj.slider)&&(this.frameSlider=a.PB.rootObj.slider);this.frameSlider||(this.frameSlider=document.getElementById("playbarSlider"));
void 0!=this.frameSlider&&this.frameSlider.updateSlider&&this.frameSlider.updateSlider(a.movie.framesToSkipForPlaybar?b-(Math.floor(a.movie.framesToSkipForPlaybar)-a.movie.framesToSkipForPlaybar):b)};a.Timeline.prototype.updateToc=function(b){a.loadedModules.toc&&a.D.tocProperties.showTotalD&&(this.toc||(this.toc=document.getElementById("tocFooterText")),void 0!=this.toc&&this.toc.updateTime(b))};a.Timeline.prototype.updateSlideNumber=function(){};a.Timeline.prototype.setAdjacentSlidesStartFrames=
function(b,c){this.updateSlideNumber(c);var d=void 0,e=void 0,f=c;do d=a.D[b[f-1]],f--;while(0<f&&(d.iols||d.i360qs));f=c;do e=a.D[b[f+1]],f++;while(f<b.length-1&&(e.iols||e.i360qs));this.previousSlideStartFrame=d?d.from:-1;e?(e.i360qs&&(e=a.D[b[c]]),this.nextSlideStartFrame=e.from):this.nextSlideStartFrame=-1};a.Timeline.prototype.AddEventListeners=function(b){if(0<b.si.length)for(var b=b.si,c=0;c<b.length;++c){var d=b[c],e=a.D[d.n],f=a(d.n);!f&&(e&&e.sicbs&&a.isValidItemForStateOptimization(d))&&
-1!==e.bstiid&&(d=a.getDisplayObjNameByCP_UID(e.bstiid))&&(f=a(d));if(f&&e){var d=!1,g={};if(a.responsive){if(e.rpvt){var j=e.rpvt,i;for(i in j){var h=j[i].vt;g[i]=[];g[i].push(h)}}}else g[a.D.project.w]=[],g[a.D.project.w].push(e.vt);for(var k in g){j=g[k];void 0==e.vars&&(void 0==e.varLens&&void 0==e.texts)&&(e.vars={},e.varLens={},e.texts={});for(h=0;h<j.length;++h)if(text=j[h],void 0!=text&&""!=text)if(void 0==e.vars[k]&&void 0==e.varLens[k]&&void 0==e.texts[k]){var l=[],p=[],m=[],n=text.split("$$");
if(3<=n.length)for(var o=0;o<n.length;o+=2){if(m.push(n[o]),o+1<n.length){var q=n[o+1];if(!a.vm||!a.vm.hasOwnProperty(q))m.push("$$"+q+"$$");else{var r=0;q&&""!=q&&(d=a.em.addEventListener(f,a.SPECIFIC_VARIABLE_CHANGED_EVENT,q),r=a.vm.getVariableLength(q));void 0==q&&(q="");l.push(q);p.push(r)}}}else m.push(text);e.vars[k]=l;e.varLens[k]=p;e.texts[k]=m}else for(var s in e.vars)if(l=e.vars[s])for(o=0;o<l.length;++o)d=a.em.addEventListener(f,a.SPECIFIC_VARIABLE_CHANGED_EVENT,l[o])}d&&this.eventListeners.push(f)}}};
a.Timeline.prototype.AddFeedback=function(a){a&&this.feedbacks.push(a)};a.Timeline.prototype.RemoveFeedbacks=function(b){for(var c=0,d=[],c=0;c<this.feedbacks.length;++c)a.FeedbackCloseReason.SLIDE_CHANGE==b||this.feedbacks[c].canHide(b)?this.feedbacks[c].hide():d.push(this.feedbacks[c]);this.feedbacks=[];for(c=0;c<d.length;++c)this.feedbacks.push(d[c])};a.Timeline.prototype.RemoveFeedback=function(a){for(var c=0;c<this.feedbacks.length;++c)if(this.feedbacks[c]==a){this.feedbacks.splice(c,1);break}};
a.Timeline.prototype.UpdateFeedbacks=function(){for(var a=0;a<this.feedbacks.length;++a)this.feedbacks[a].update()};a.Timeline.prototype.RemoveEventListeners=function(){for(var b=0;b<this.eventListeners.length;++b)a.em.removeEventListener(this.eventListeners[b],a.SPECIFIC_VARIABLE_CHANGED_EVENT);this.eventListeners.length=0};a.Timeline.prototype.getFrameset=function(a){for(var c=0,c=0;c<this.children.length;++c)if(a==this.children[c].element.id)return this.children[c];return null};a.Timeline.prototype.selectivelyRemoveHTMLObjects=
function(b){var c=b.firstChild;if(c){var d={};if(this.children)for(var e=1;e<this.children.length;++e){var f=this.children[e],g=!1;if(f.itemData.rp||f.itemData.ddv)f.itemData.from<=cpInfoCurrentFrame&&f.itemData.to>=cpInfoCurrentFrame&&(g=!0);if(a.kCPOTVideo==f.type){var j=f.children[0];j&&j.element&&(j=j.element.firstChild)&&"VIDEO"==j.tagName&&(g=!0)}else if(a.IDEVICE==a.device||a.device==a.ANDROID)if(a.kCPOTFLVItem==f.type||a.kCPFullMotion==f.type||a.kCPOTVideo==f.type||a.kCPOTVideoResource==f.type)if((j=
f.children[0])&&j.element)(j=j.element.firstChild)&&"VIDEO"==j.tagName&&(g=!0);if(g){for(var i in f.children)j=f.children[i],j.element&&(g=j.element.parentElement)&&("cp-rewrap"==g.className?d[g.id]=1:d[j.element.id]=1);f.element&&(d[f.element.id]=1);if(a.IDEVICE==a.device||a.device==a.ANDROID)f.suppliedElement&&(d[f.suppliedElement.id]=1)}}for(f=c.firstChild;f;f=e)if(e=f.nextSibling,f&&!("__bgDiv__"==f.id||c.id+"c"==f.id||d[f.id]||a.inVR&&"cp-ThreeDSlide"===f.className))f.onmouseover=null,f.onmouseout=
null,f.ontouchstart=null,f.ontouchend=null,f.onmousedown=null,f.onmouseup=null,f.ontouchmove=null,f.onclick=null,a.removeGestureEvent(f,a.GESTURE_EVENT_TYPES.TAP),a.verbose&&a.log("removing "+f.id),c.removeChild(f);for(c=c.nextSibling;c;c=e)e=c.nextSibling,d[c.id]||(c.onmouseover=null,c.onmouseout=null,c.ontouchstart=null,c.ontouchend=null,c.onmousedown=null,c.onmouseup=null,c.ontouchmove=null,c.onclick=null,a.removeGestureEvent(c,a.GESTURE_EVENT_TYPES.TAP),a.verbose&&a.log("removing "+c.id),b.removeChild(c));
for(var h in this.parentChildMap)d[h]||(this.parentChildMap[h]=null)}};a.Timeline.prototype.loadAssetsForSlideAtIndex=function(b){a.verbose&&a.log("loadAssetsForSlideAtIndex "+b);a.movie.pm.loadSlideAssets(b);var c=a.movie.pm.numSlidesToAttemptPreloaded(),d=!1,e=a.D.sgMgr;if(e&&(e=e.sg)&&e.length>b)for(var e=e[b][1],f=e.length,g=0;0<c--&&g<f;)b<this.slides.length-1&&a.movie.pm.preloadSlideAssets(e[g][0]),++g,d=!0;d||b<this.slides.length-1&&a.movie.pm.preloadSlideAssets(b+1)};a.Timeline.prototype.addFramesetsForSlideAtIndex=
function(b){a.verbose&&a.log("addFramesetsForSlideAtIndex "+b);var c=this.getSlideNameForIndex(b),c=a.D[c],d=this.getSlideDiv();this.RemoveFeedbacks(a.FeedbackCloseReason.SLIDE_CHANGE);this.m_keyManager.clearHandlers();this.m_clickManager.clearClicks();this.selectivelyRemoveHTMLObjects(d);this.m_lowestRewrapElementThatIsRestOfProjectAndOnTop=this.m_lowestElementThatIsRestOfProjectAndOnTop=null;this.itemsNotLoaded=[];this.setupSlideDiv(c,d);var e=c.qs.split(",");if(this.m_GraphManager)this.m_GraphManager.onSlideJump(b);
if(a.movie.playbackController){var f=a.movie.playbackController.GetQuizController();if(e&&""!=e&&0<e.length){if(!f)return;for(var g=0;g<e.length;++g){var j=a.getQuestionObject(e[g]);j&&(this.verbose&&a.log("Starting question for : "+e[g]),j.m_isStarted=!1)}}f&&(b==f.GetAnyScoreSlideIndex()?(f.GetScore(),!f.GetIsAllowReviewMode()&&f.GetIsQuizCompleted()&&(a.movie.paused=!0,shouldShowSlide=!1),f.GetCurrentAttempt()>=f.GetNumberOfQuizAttempts()&&(f.GetIsAllowReviewMode()&&f.SetIsInReviewMode(!0),f.SetIsQuizCompleted(!0)),
f.GetIsPassed()&&f.SetIsQuizCompleted(!0),f.GetScore()):shouldShowSlide=!1);c.i360qs&&a.ThreeDQuestionHelper&&a.ThreeDQuestionHelper.addQuestionOverlay()}b={};e=[];for(d=d.firstChild;d;d=d.nextSibling)if(d.nodeType==Node.ELEMENT_NODE&&"IMG"!=d.nodeName){f=!1;if("Slide"+c.id==d.id)f=!0;else for(g=0;g<c.si.length;++g)if(c.si[g].n==d.id){f=!0;break}j=(d.className+"").split(" ");g=-1!=j.indexOf("cp-frameset");j=-1!=j.indexOf("cp-mask");if((g||j)&&g)g=a.parseFrameset(b,d),g.considerForUpdate=f,g.timeline=
self,e.push(g)}this.children=e;c=this.getCurrentSlideName();b=null;e=a.D[c].iph;null!=e&&0<e.length&&(b=this.m_interactionManagers[c],void 0==b&&(b=a.CreateInteractionManager(e))&&(this.m_interactionManagers[c]=b),a.SetCurrentInteractionManager(b));this.m_EffectAnimationManager&&this.m_EffectAnimationManager.start()};a.Timeline.prototype.getCurrentSlideInteractionManager=function(){return this.m_interactionManagers[this.getCurrentSlideName()]};a.Timeline.prototype.handleRewindForFramesets=function(){for(var a=
0;a<this.children.length;++a)this.children[a].handleRewind()};a.Timeline.prototype.initializeGraphManager=function(){a.D.baq&&void 0!=a.D.sgMgr&&(this.m_GraphManager=a.movie.playbackController?a.movie.playbackController.GetGraphManager():new a.SlideGraphManager,void 0!=this.m_GraphManager&&this.m_GraphManager.initialize())};a.Timeline.prototype.createQuestionObjs=function(){this.questions=[];var b=this.getAttribute("questions")||"";0<b.length&&(this.questions=b.split(","));for(b=0;b<this.questions.length;++b){var c=
this.questions[b];if(""!=c){var d=a.D[c],e=d.sn;switch(d.qtp){case "MCQ":c=new a.MultipleChoiceQuestion(c,e);break;case "Hotspot":c=new a.HotspotQuestion(c,e);break;case "Sequence":c=new a.SequenceQuestion(c,e);break;case "Matching":c=new a.MatchingQuestion(c,e);break;case "FIB":c=new a.FIBQuestion(c,e);break;case "ShortAnswer":c=new a.ShortAnswerQuestion(c,e);break;case "Widget":c=new a.WidgetQuestion(c,e);break;case "InteractiveItemQuestion":c=new a.InteractiveItemQuestion(c,e);break;case "InteractiveWidgetQuestion":c=
new a.InteractiveWidgetQuestion(c,e);break;case "DragDropQuestion":d=d.itn;c=new a.DragDropQuestion(c,e,d);break;case "LIKERT":d=d.itn;c=new a.LikertQuestion(c,e,d);break;default:c=new a.Question(c,e)}if(!c)break;a.movie.questionObjs[b]=c}}};a.Timeline.prototype.getNextBoundForNoLoad=function(b){this.isOverlaySlideIndex(b)||(b=b<this.slides.length?b:this.slides.length-1);b=this.getSlideNameForIndex(b);return a.D[b].to};a.Timeline.prototype.getPreviousBoundForNoLoad=function(b){b=this.getSlideNameForIndex(0<=
b?b:0);return a.D[b].from};a.Timeline.prototype.updateNoSkipFramesFromOverlaySlideData=function(){for(var a in this.overlayslideframes)this.noSkipFrames[a]=parseInt(a)};a.Timeline.prototype.updateNoSkipFramesFromThreeDSlideData=function(){if("ThreeD Slide"==this.GetCurrentSlideType()&&this.currentSlide)for(var b in this.currentSlide.si){var c=a.D[this.currentSlide.si[b].n];c&&(this.noSkipFrames[c.pa]=c.pa)}};a.Timeline.prototype.GetCurrentSlideType=function(){var a=void 0;this.currentSlide&&(a=this.currentSlide.st);
return a};a.Timeline.prototype.loadSlideAtIndex=function(b){if(!(0>=this.slides.length)){a.ThreeDQuestionHelper&&a.ThreeDQuestionHelper.removeQuestionOverlay();a.resetDisplayAndIdMap();var c=this.getSlideNameForIndex(b),d=a.D[c],e=d.from,f=d.to;d.nonAdjustedStartFrame=d.from;d.from=e;d.to=f;_cpInfoCurrentSlide=b+1;_cpInfoCurrentSlideLabel=d.lb;this.currentSlide=d;this.currentSlideName=c;a.adjustProjectHeight(this.currentSlide);this.cStart=e;this.cEnd=f;this.audioCCItems=this.FilterVTMLContent(d.audCC);
this.videoCCItems=this.FilterVTMLContent(d.vidCC);this.ccProperties=d.ccProperties;this.updateCCProps();this.curVidCCItem=this.curAudCCItem=-1;a.movie.PPTXSlide="PPTX Slide"==d.st;this.m_SlideHasEffects=PPTXLib.hasAnimationInfo(d);a.movie.resetMovieElapsedTime(a.movie.PPTXSlide);a.movie.am.changeCurrentSlide(b,e,!0);a.movie.vdm.changeCurrentSlide();d.v=!0;a.D.project_main.currentFrame=e;this.slideEnterAction=d.sea;this.slideExitAction=d.sxa;this.currentOverlaySlideParentFrame=this.currentSlideStartFrame=
e;this.currentSlideStartTime=1E3*this.currentSlideStartFrame/a.getCpInfoOriginalFPS();e=b;d.iols?(this.currentOverlaySlideParentFrame=e=this.getFrameOfOverlaySlide(b),e=this.getSlideIndexForFrame(e),0>e&&(e=b)):d.i360qs&&(this.currentOverlaySlideParentFrame=e=this.getFrameOf360QSlide(b),e=this.getSlideIndexForFrame(e),0>e&&(e=b));this.setAdjacentSlidesStartFrames(this.slides,e);try{this.RemoveEventListeners();var g=document.getElementById("Slide"+d.id);if(!this.pendingOnSlideLayerRemovedAction||!g)this.addFramesetsForSlideAtIndex(b);
else{var j=this.getSlideNameForIndex(b);this.updateAnimationsIfFramesetsExist(j)}this.AddEventListeners(d);this.noSkipFrames={};this.forEachChild(a.updateNoSkipFramesAndUpdateVarText);PPTXLib.updateNoSkipFramesFromEffectData(d);this.updateNoSkipFramesFromOverlaySlideData();this.updateNoSkipFramesFromThreeDSlideData();this.noSkipFrames[this.cEnd]=this.cEnd;this.noSkipFrames[this.cEnd+1]=this.cEnd+1;var i=this.m_interactionManagers[c];if(i){var h=i.PauseAtFrame();-1!=h&&(this.noSkipFrames[h]=h)}}catch(k){a.log(k),
k.stack&&a.log(k.stack)}}};a.Timeline.ReasonForUpdate={};a.Timeline.ReasonForUpdate.PROGRESS=1;a.Timeline.ReasonForUpdate.JUMP=2;a.Timeline.prototype.fallsOutsideCurrentSlide=function(){return this.cEnd<cpInfoCurrentFrame||this.cStart>cpInfoCurrentFrame};a.Timeline.prototype.updateSlideTransition=function(){this.currentSlide&&this.currentTransition&&(this.cStart+15<cpInfoCurrentFrame?this.currentTransition.reset():this.currentTransition.update(cpInfoCurrentFrame))};a.Timeline.prototype.handleSlideExit=
function(b,c){if(b){var d=this.getCurrentSlideName(),e=this.m_interactionManagers[d];e&&e.handleSlideExit();d=a.D[d];d.slideNumber=cpInfoCurrentSlideIndex+1;d.lcpversion=CaptivateVersion;d.frameNumber=cpInfoCurrentFrame;e=-1;if(a.movie){var f=a.movie.playbackController;f&&(e=f.GetPercentageSlidesSeen())}d.percentageSlideSeen=e;a.IsRunningInACAP&&(d.navid=this.getCurrentSlideName());a.em.fireEvent("CPSlideExit",d)}this.onEndOfSlide(c);!0==a.movie.stage.rewind?(_cpInfoLastVisitedSlide=1,a.movie.stage.rewind=
!1):_cpInfoLastVisitedSlide=cpInfoCurrentSlideIndex+1;d=a.movie.stage.getSlideIndexForFrame(cpInfoCurrentFrame);_cpInfoPrevSlide=0==d?d+1:d;a.movie.cpInfoLastVisitedSlideStartFrame=this.currentOverlaySlideParentFrame||this.currentSlideStartFrame};a.Timeline.prototype.updateFrame=function(b){a.lSameSlideSeek=!0;this.updatingFrame=cpInfoCurrentFrame;a.movie.executedActionOnFrame!=this.updatingFrame&&(a.movie.executedActionOnFrame=void 0);this.updatePlaybar(cpInfoCurrentFrameAtLayerZero);this.updateToc(cpInfoCurrentFrameAtLayerZero);
var c={};c.frame=cpInfoCurrentFrameAtLayerZero;c.timeInMillSecs=1E3*(c.frame/cpInfoFPS);a.em.fireEvent("CPTime_Update",c);if(cpInfoCurrentFrame>this.lastFrame&&!this.hasOverlaySlide())this.onEndOfMovie();else{if(this.cEnd==cpInfoCurrentFrame){if(a.movie.playbackController&&(c=a.movie.playbackController.GetQuizController())){var d=a.movie.playbackController.GetLMSType();d&&(d=d.toUpperCase());c.GetIsReportingEnabled()&&("EMAIL"!=d&&"ACROBAT"!=d&&"INTERNALSERVER"!=d)&&(a.m_isLMSPreview&&void 0!=a.LMSDriverHolder&&
a.toggleLMSPreviewDebugLogsColor(a.LMSDriverHolder),a.movie.playbackController.SendCourseData(!1))}d=1;cpInfoCurrentSlideIndex&&(d=cpInfoCurrentSlideIndex+1);var e=a.D[this.getSlideNameForIndex(d)];if(e){c=cpInfoCurrentFrame;_cpInfoCurrentFrame=e.from;this.adjustFrameToNextNonOverlayFrameOnLayerZero();var e=this.getSlideIndexForFrame(cpInfoCurrentFrame),f=a.D[this.getSlideNameForIndex(e)];f&&!0==f.dummyResultSlide&&(d=e);_cpInfoCurrentFrame=c}if(d>=this.slides.length&&a.movie.playbackController&&
(c=a.movie.playbackController.GetQuizController())&&c.DoSubmitAll(cpInfoCurrentSlideIndex)){a.movie.pause(a.ReasonForPause.CANNOT_MOVE_AHEAD);return}if(!this.canUpdateToSlide(d)&&d<this.slides.length){a.movie.pause(a.ReasonForPause.CANNOT_MOVE_AHEAD);return}a.movie.play();e=cpInfoCurrentFrame;f=!1;if(a.movie.playbackController&&(c=a.movie.playbackController.GetQuizController()))if(d=c.GetSlideType(cpInfoCurrentSlideIndex),"Question"==d||"AnyScoreSlide"==d)f=c.LeaveSlide(cpInfoCurrentSlideIndex);if("undefined"!=
typeof cptb&&cptb.onSlideExit)cptb.onSlideExit(a.D[this.getCurrentSlideName()]);f||a.movie.frameBasedExecuteAction(this.slideExitAction);if(e!=cpInfoCurrentFrame)return}c=!1;if(this.fallsOutsideCurrentSlide(cpInfoCurrentFrame)){c=!1;!this.pendingOnSlideLayerAddedAction&&a.movie.stage.hasOverlaySlide()&&(c=!0);this.currentTransition&&this.currentTransition.reset&&(this.currentTransition.reset(),this.currentTransition=void 0);this.pendingOnSlideLayerAddedAction||this.handleSlideExit(-1!=this.cEnd,b);
e=void 0;if(c){e=a.Timeline.ReasonForUpdate.JUMP==b;if(c=a.movie.playbackController.GetQuizController())d=c.GetSlideType(cpInfoCurrentSlideIndex),"AnyScoreSlide"==d&&(c=a.D[this.getCurrentSlideName()])&&(c.i360qs&&-1!=this.getSlideIndexForFrame(cpInfoCurrentFrame))&&(e=!0);a.movie.stage.popSlideLayer(e);e=this.getSlideIndexForFrame(cpInfoCurrentFrame);this.layerInfo.returnFrameInfo.slideIndex!=e&&(a.popState(),this.handleSlideExit(!0,a.Timeline.ReasonForUpdate.JUMP))}e=e||this.getSlideIndexForFrame(cpInfoCurrentFrame);
a.movie.playbackController&&a.movie.playbackController.LeaveCurrentSlide(e);this.loadSlideAtIndex(e);c=!0;this.pendingOnSlideLayerRemovedAction&&(this.layerInfo.returnFrameInfo.slideIndex==e&&a.popState(),this.rearrangeROPItemsOnMainSlideDivChange(this.layerInfo.returnFrameInfo.slideIndex));a.movie.playbackController&&a.movie.playbackController.SetCurrentSlide(e);if("undefined"!=typeof cptb&&cptb.onSlideEnter)cptb.onSlideEnter(a.D[this.getCurrentSlideName()]);a.movie.playbackController&&!this.pendingOnSlideLayerRemovedAction&&
a.movie.playbackController.ClearTimeouts();a.movie.frameBasedExecuteAction(this.slideEnterAction);d=a.D[this.getCurrentSlideName()];d.slideNumber=cpInfoCurrentSlideIndex+1;d.frameNumber=cpInfoCurrentFrame;d.lcpversion=CaptivateVersion;f=-1;if(a.movie){var g=a.movie.playbackController;g&&(f=g.GetPercentageSlidesSeen())}d.percentageSlideSeen=f;a.IsRunningInACAP&&(d.navid=this.getCurrentSlideName());a.em.fireEvent("CPSlideEnter",d);"Question Slide"==d.st&&(f={},f.slideNum=d.slideNumber,a.em.fireEvent("CPQuizSlideReached",
f));var j=document.getElementById(this.getSlideNameForIndex(e));j&&setTimeout(function(){var a=document.getElementById(j.id+"accStr2");a&&a.focus()},1);a.lSameSlideSeek=!1;this.currentTransition=a.getSlideTransition(this.currentSlide);a.movie.stage.currentSlide&&"ThreeD Slide"==a.movie.stage.GetCurrentSlideType()&&(d=a.getDisplayObjFor3DSlideByCP_UID(a.movie.stage.currentSlide.id))&&d.updateFrame()}else 1==cpInfoCurrentFrame&&b==a.Timeline.ReasonForUpdate.JUMP&&this.slideEnterAction&&a.movie.frameBasedExecuteAction(this.slideEnterAction);
this.syncMotionToFrame(cpInfoCurrentFrame);this.updateSlideTransition(cpInfoCurrentFrame);this.updateToFrame(cpInfoCurrentFrame,!1,b);a.responsive&&!a.lSameSlideSeek&&(a.resetFlexRoot(),a.fontMap=[],a.adjustResponsiveItems(a.ReasonForDrawing.kSlideChanged),a.rescaleFontSizes());this.pendingOnSlideLayerAddedAction?(a.movie.am.pause(a.ReasonForPause.INTERACTIVE_ITEM),a.movie.vdm.pause(a.ReasonForPause.INTERACTIVE_ITEM)):b==a.Timeline.ReasonForUpdate.JUMP?(a.movie.am.seekTo(cpInfoCurrentFrame,a.lSameSlideSeek),
a.movie.vdm.seekTo(cpInfoCurrentFrame,!0),a.ignoreSeekOnNextJumpToFrame=-1):this.pendingOnSlideLayerRemovedAction&&!(cpInfoCurrentFrame in this.overlayslideframes)&&(a.movie.am.play(),a.movie.vdm.play());c&&(b=this.getSlideIndexForFrame(cpInfoCurrentFrame)+1,b=a.movie.stage.getSlideNameForIndex(b),a.multiAudioTrack&&""!=b&&a.movie.am.preload(b),""!=b&&a.movie.vdm.preload(b));d=a.D[this.getCurrentSlideName()];if(0<d.si.length){b=d.si;e=-1;for(f=0;f<b.length;++f){var i=b[f],g=document.getElementById(i.n);
i.t===a.kCPOTTextEntryBoxItem&&(-1===e?e=f:(i=document.getElementById(b[e].n),g.tabIndex<i.tabIndex&&(e=f)))}-1!==e&&(this.inputField=document.getElementById(b[e].n+"_inputField"))&&this.inputField.focus()}this.pauseAtFrame(cpInfoCurrentFrame);if("ThreeD Slide"!==d.st||!this.pendingOnSlideLayerRemovedAction)a.movie.paused?1==cpInfoCurrentFrame&&a.movie.am.play(1,!0):a.movie.am.play(cpInfoCurrentFrame);this.pendingOnSlideLayerAddedAction=this.pendingOnSlideLayerRemovedAction=!1;c&&a.ThreeDQuestionHelper&&
(d.i360qs?a.ThreeDQuestionHelper.loadQuestionSlide(d):!0==d.dummyResultSlide&&d.si&&d.si[0]&&a.showQuestions(d.si[0].n))}};a.Timeline.prototype.getNextSkipFrame=function(){if(!1==a.getCpIsPlaying())return cpInfoCurrentFrame;var b=cpInfoCurrentFrame,c=-1,d;for(d in this.noSkipFrames){var e=this.noSkipFrames[d];if(e>=b){c=e;break}}return c};a.Timeline.prototype.canAdvanceCurrentFrameForEffects=function(b){var c=cpInfoCurrentFrame,d=-1,e;for(e in this.noSkipFrames){var f=this.noSkipFrames[e];if(f>=c){d=
f;break}}c=1E3*(d-a.movie.stage.currentSlideStartFrame)/a.getCpInfoOriginalFPS();return b>c?!1:!0};a.Timeline.prototype.adjustFrameToNextNonOverlayFrameOnLayerZero=function(){if(!this.hasOverlaySlide()){var b=this.overlayslides.concat(this._360questionslides);if(b&&0!=b.length){b.sort(function(b,c){return a.D[b].from-a.D[c].from});var c=cpInfoCurrentFrame,d;for(d in b){var e=a.D[b[d]];c>=e.from&&c<=e.to&&(c=e.to+1)}_cpInfoCurrentFrame=c}}};a.Timeline.prototype.attemptToAdvanceCurrentFrameByOffset=
function(a){if(!(0>=a)){var c=!0,a=cpInfoCurrentFrame+a,d;for(d in this.noSkipFrames){var e=this.noSkipFrames[d];if(cpInfoCurrentFrame<e&&a>e){a=e;c=!1;break}}d=a;c&&(d={currFrame:a,smoothAdvance:!0});_cpInfoCurrentFrame=d}};a.Timeline.prototype.updateFrameCurrentOnPause=function(){this.updateToFrame(cpInfoCurrentFrame,!0)};a.Timeline.prototype.pauseAtFrame=function(b){if(!this.paused){this.paused=!1;this.forEachChild(function(c){var e=a.GetDataForElement(c.suppliedElement||c.element,!0);if(e){var f=
a.D[e.mdi].visible;if(b!=a.movie.stage.interactivePauseFrame)if(f&&(c.pa==b||c.rp_pa&&b==c.rp_pa)){if((f=e.handled)&&(a.kCPOTClickBoxItem==e.type||a.kCPOTScorableButtonItem==e.type||a.kCPOTAutoShape==e.type||a.kCPOTImageBoxItem==e.type))f=!1;if(!f&&(!e.iqb&&!e.clickedOnce)&&(void 0==e.enabled||e.enabled))if(a.movie.am.interactiveItemFound=!0,a.D[c.element.id].ssp&&(a.movie.am.ssp=1),a.movie.pause(a.ReasonForPause.INTERACTIVE_ITEM),a.movie.paused&&null!=a.movie.stage.currentSlide)a.movie.stage.currentSlide.topMostObjectInteractiveObject=
c.element.id}else if(c.psv==b&&f&&!e.pausedOnce&&(void 0==e.enabled||e.enabled)){if(c=c.children[0])if(f=c.element)if((f=f.firstChild)&&"VIDEO"==f.tagName&&c.started&&(c.paused||c.ended))return;e.pausedOnce=!0;a.movie.pause(a.ReasonForPause.EVENT_VIDEO_PAUSE)}}});var c=this.m_interactionManagers[this.getCurrentSlideName()];void 0!=c&&b!=a.movie.stage.interactivePauseFrame&&c.CheckInteractionPause(b)&&a.movie.pause(a.ReasonForPause.INTERACTIVE_ITEM)}};a.Timeline.prototype.getCCBreakpointWidth=function(b){if(!b||
"undefined"==typeof b)b=this.ccProperties;var c=a.getProject(),c=parseInt(c.style.width);if(a.responsive)for(var c=a.ResponsiveProjWidth,d=Object.keys(b),e=a.project.clientWidth,f=0;f<d.length;++f)if(e<=d[f]&&b[c]){c=d[f];break}return c};a.Timeline.prototype.showCC=function(b){"undefined"==typeof b&&(b=!0);a.CCInfo.selfTriggeredVisibilityChange=!0;cpCmndCC=b?1:0;a.CCInfo.selfTriggeredVisibilityChange=!1};a.Timeline.prototype.updateCCProps=function(){if(this.ccProperties){a.getProject();var b=null,
c=this.getCCBreakpointWidth(this.ccProperties);try{var d=a.ccdv,e,f,g,j=0,i=0;d.style.overflow="hidden";d.style["word-wrap"]="break-word";d.style.transform="scale(1);";d.style.webkitTransform="scale(1);translate3d(0,0,0)";d.style["z-index"]=99;b=this.ccProperties[c];ccProjPropsElem=a.D.ccProperties[c];f=b.hasOwnProperty("w")?b.w:ccProjPropsElem.w;g=b.hasOwnProperty("h")?b.h:ccProjPropsElem.h;i=b.hasOwnProperty("x")?b.x:ccProjPropsElem.x;j=b.hasOwnProperty("y")?b.y:ccProjPropsElem.y;e=b.hasOwnProperty("txtl")?
b.txtl:ccProjPropsElem.txtl;var h=d.firstElementChild;a.movie.ccText=h.firstElementChild;$(a.movie.ccText).attr("cpAlign",e);h.style.backgroundColor=b.hasOwnProperty("c")&&b.hasOwnProperty("o")?a.ConvertColorToRGBA(b.c,b.o/100):a.ConvertColorToRGBA(ccProjPropsElem.c,ccProjPropsElem.o/100);a.movie.ccText.innerHTML="";this.ccVisibility=b.hasOwnProperty("v")?b.v:ccProjPropsElem.v;var k=a.project.clientWidth,l=a.project.clientHeight,p=parseFloat(k*f/100),m=parseFloat(l*g/100);40>m&&(m=40,g=4E3/l);60>
p&&(f=6E3/k);if(a.responsive){switch(b.hasOwnProperty("pos")?b.pos:ccProjPropsElem.pos){case a.CCPosition.TopLeft:j=i=0;break;case a.CCPosition.TopCenter:i=(100-f)/2;j=0;break;case a.CCPosition.TopRight:i=100-f;j=0;break;case a.CCPosition.MiddleLeft:j=(100-g)/2;i=0;break;case a.CCPosition.MiddleCenter:j=(100-g)/2;i=(100-f)/2;break;case a.CCPosition.MiddleRight:j=(100-g)/2;i=100-f;break;case a.CCPosition.BottomLeft:j=100-g;i=0;break;case a.CCPosition.BottomCenter:j=100-g;i=(100-f)/2;break;case a.CCPosition.BottomRight:j=
100-g,i=100-f}100<j+g&&(j=100-g)}d.style.position="absolute";d.style.width=f+"%";d.style.height=g+"%";d.style.top=j+"%";d.style.left=i+"%";if(a.responsive){var n=window.innerHeight;a.playbar&&(n-=a.playbar.playBarHeight);if(l>n-5){var o=parseFloat(j*l/100);m+o>n-5&&(d.style.top=n-m+"px")}}var q=a("ccClose");q&&(q.style.right="0px")}catch(r){console.log(r)}}};a.Timeline.prototype.updateAudioCC=function(){if(this.audioCCItems){var b=a.movie.am.slideAudios[a.movie.am.currentSlideAudio];if(b&&b.nativeAudio){var c=
b.nativeAudio.currentTime*a.movie.fps,d=0;0!=c&&(d=c+b.from);this.currentFrameHasVideoCC||this.updateCC(this.audioCCItems,this.curAudCCItem,d,!0)}}};a.Timeline.prototype.updateVideoCC=function(a){this.videoCCItems&&this.updateCC(this.videoCCItems,this.curVidCCItem,a,!1)};a.Timeline.prototype.updateCC=function(b,c,d,e){try{if(!a.CCInfo&&!this.ccVisibility&&cpCmndCC||a.CCInfo&&(!(!a.CCInfo.isUserVisibilityIntentSet&&this.ccVisibility||a.CCInfo.userVisibilityIntent)||!b.length&&!this.currentFrameHasAudioCC&&
!this.currentFrameHasVideoCC&&cpCmndCC))this.showCC(!1);else{e?this.currentFrameHasAudioCC=!1:this.currentFrameHasVideoCC=!1;var f=a.movie.ccText,g=a.movie.cc.style.height;d>parseInt(d)&&(d=parseInt(d)+1);var g="%"==g[g.length-1]?parseFloat(g)*a.project.clientHeight/100:parseFloat(g),d=d-(this.cStart-1),j=b.length-1,i=1,h=this.cEnd-this.cStart+1;0<=j&&(i=b[j].sf,h=b[j].ef);for(a.getProject();0<=j;--j)if(i>b[j].sf&&(i=b[j].sf),h<b[j].ef&&(h=b[j].ef),b[j].sf<=d&&b[j].ef>=d){e?this.currentFrameHasAudioCC=
!0:this.currentFrameHasVideoCC=!0;if(c==j)return;var k="",l=this.getCCBreakpointWidth(b[j].t),k=b[j].t.hasOwnProperty(l)?b[j].t[l]:"";""!=k?this.showCC():this.showCC(!1);f.innerHTML=k;var p=$(f).attr("cpAlign"),k=3,m=parseInt($(f).css("height"));switch(parseInt(p)){case a.TextLayoutEnum.kTLBottom:k=g-m;k=3<k?k-3:0;break;case a.TextLayoutEnum.kTLCenter:k=g-m,k=3<k?k/2:0}parseInt(f.style["margin-top"])!=k&&(f.style["margin-top"]=k+"px");if(g<m+2)try{for(var n=parseInt(jQuery(f).find("span.cp-actualText")[0].style["font-size"]),
k=10;n>k;){var o=parseInt((n+k)/2);$(f).find("span.cp-actualText").css("font-size",o+"px");if(o==k||o==n||10==o)break;m=parseInt($(f).css("height"));g<m?n=o:k=o}}catch(q){$(f).find("span.cp-actualText").css("font-size","10px")}}if((d<i||d>h)&&!this.currentFrameHasAudioCC&&!this.currentFrameHasVideoCC)f.innerHTML="",this.showCC(!1)}}catch(r){console.log(r)}};a.Timeline.prototype.updateToFrame=function(b,c,d){if(!(b>this.lastFrame)&&(this.currentFrameHasVideoCC=this.currentFrameHasAudioCC=!1,this.updateAudioCC(),
!this.paused&&!this.yield)){var e=this.lastFrame-b;if(this.fadeInAtStart&&b<=this.fadeInAtStart)this.mainSlideDiv.style.opacity=b/this.fadeInAtStart;else if(this.fadeOutAtEnd&&b>this.lastFrame-this.fadeOutAtEnd)this.mainSlideDiv.style.opacity=e/this.fadeOutAtEnd;else if(!this.currentTransition||!(this.currentTransition.type==a.SlideTransitionType.kFTFade||this.currentTransition.type==a.SlideTransitionType.kFTPhoto))this.mainSlideDiv.style.opacity=1;this.updateVideoCC(b);if(!a.movie.waitingForResources()){this.interactivePauseFrame!=
b&&(this.interactivePauseFrame=-1);this.forEachChild(function(a){if(a.considerForUpdate&&a.isInRange(b)&&(!a.isStarted||c))a.element.style.display="block"});var f=this;this.forEachChild(function(e){if(e.considerForUpdate)if(e.isInRange(b))if(e.isStarted)c?e.start(c,a.ReasonForDrawing.kMoviePaused):(f.overlayslideframes==void 0||!(cpInfoCurrentFrame in f.overlayslideframes))&&e.updateFrame(d);else{e.start(c,a.ReasonForDrawing.kRegularDraw);a.lSameSlideSeek=false}else e.isStarted&&e.reset()});void 0!=
this.m_EffectAnimationManager&&(a.movie.PPTXSlide||this.m_SlideHasEffects)&&PPTXLib.updateAnimationManager()}}};a.Timeline.prototype.onEndOfSlide=function(a){this.forEachChild(function(c){c.onEndOfSlide(a)})};a.Timeline.prototype.onEndOfMovie=function(){void 0!=this.onEndOfMovieExecutedFrame&&this.onEndOfMovieExecutedFrame<this.updatingFrame||(this.onEndOfMovieExecutedFrame=this.updatingFrame,a.em.fireEvent("CPMovieStop"),this.forEachChild(function(a){a.onEndOfMovie()}),a.movie.vdm.changeCurrentSlide(),
a.movie.pause(a.ReasonForPause.MOVIE_ENDED),a.movie.frameBasedExecuteAction(this.movieEndAction))};a.Timeline.prototype.syncMotionToFrame=function(a,c){this.forEachChild(function(d){d.isStarted&&d.isInRange(a)&&d.ApplyMotion(a,c)})};a.Timeline.prototype.start=function(){this.paused=!1;this.element.style.display="block";this.m_keyManager.clearHandlers();this.m_clickManager.clearClicks();1>=cpInfoCurrentFrame&&(_cpInfoCurrentFrame=1);this.updateToFrame(cpInfoCurrentFrame);this.RemoveFeedbacks(a.FeedbackCloseReason.SLIDE_CHANGE);
this.clearParentChildMap()};a.Timeline.prototype.reset=function(){this.paused=!1;this.element.style.display="none";this.m_keyManager.clearHandlers();this.m_clickManager.clearClicks();_cpInfoCurrentFrame=0;this.updateToFrame(cpInfoCurrentFrame);this.RemoveFeedbacks(a.FeedbackCloseReason.SLIDE_CHANGE);this.clearParentChildMap()};a.Timeline.prototype.stop=function(){this.paused=!0};a.Timeline.prototype.FilterVTMLContent=function(a){for(var c=a.length-1;0<=c;c--)for(var d=a[c],e=Object.keys(d.t),c=e.length-
1;0<=c;c--)if(d.t.hasOwnProperty(e[c])){var f=d.t[e[c]],g="",j=/<vtml/i,i=/<\/vtml/i;do{var h=f.search(j);if(0>h){g+=f;break}else{g+=f.substr(0,h);f=f.substr(h+8);h=f.search(">");if(0>h)break;f=f.substr(h+4);h=f.search(i);if(0>h){g+=f.substr(0);break}g+=f.substr(0,h);f=f.substr(h+9);h=f.search(">");if(0>h)break;f=f.substr(h+4);if(!f.length)break}}while(1);d.t[e[c]]=g}return a};a.Timeline.prototype.updateAnimationsIfFramesetsExist=function(b){if(void 0===this.m_EffectAnimationManager&&
(this.m_SlideHasEffects||a.movie.PPTXSlide)){this.m_EffectAnimationManager=PPTXLib.initializeAnimationManagerForCPSlide(a.D[b]);for(b=this.getSlideDiv().firstChild;b;b=b.nextSibling){var c=this.getFrameset(b.id);PPTXLib.instanceManager&&c&&c.children&&0<c.children.length&&PPTXLib.addToInstanceManager(b.id,c.children[0])}this.m_EffectAnimationManager&&this.m_EffectAnimationManager.start()}}})(window.cp);
(function(a){a.SlideTransitionType={};a.SlideTransitionType.kFTNone=0;a.SlideTransitionType.kFTBlinds=1;a.SlideTransitionType.kFTFade=2;a.SlideTransitionType.kFTFly=3;a.SlideTransitionType.kFTIris=4;a.SlideTransitionType.kFTPhoto=5;a.SlideTransitionType.kFTPixelDissolve=6;a.SlideTransitionType.kFTRotate=7;a.SlideTransitionType.kFTSqeeze=8;a.SlideTransitionType.kFTWipe=9;a.SlideTransitionType.kFTZoom=10;a.getSlideTransition=function(b){if(b){var c=b.transition;if(c)switch(c.type){case a.SlideTransitionType.kFTFade:return new a.FadeInTransition(b);
case a.SlideTransitionType.kFTFly:return new a.FlyTransition(b);case a.SlideTransitionType.kFTIris:return new a.IrisTransition(b);case a.SlideTransitionType.kFTPhoto:return new a.PhotoTransition(b);case a.SlideTransitionType.kFTRotate:return new a.RotateTransition(b);case a.SlideTransitionType.kFTSqeeze:return new a.SqueezeTransition(b);case a.SlideTransitionType.kFTZoom:return new a.ZoomTransition(b);case a.SlideTransitionType.kFTBlinds:return new a.BlindsTransition(b);case a.SlideTransitionType.kFTPixelDissolve:return new a.PixelTransition(b);
case a.SlideTransitionType.kFTWipe:return new a.WipeTransition(b);default:return new a.SlideTransition(b)}}};a.SlideTransition=function(b){this.item=a("div_Slide");this.data=b.transition;this.duration=15;this.from=b.from;this.type=a.SlideTransitionType.kFTNone};a.SlideTransition.prototype={update:function(){},isCompleted:function(a){return 0<a-this.from-this.duration},reset:function(){}};a.FadeInTransition=function(b){a.FadeInTransition.baseConstructor.call(this,b);a("div_Slide");this.finalOpacity=
1;this.type=a.SlideTransitionType.kFTFade};a.inherits(a.FadeInTransition,a.SlideTransition);a.FadeInTransition.prototype.reset=function(){this.item.style.opacity="1"};a.FadeInTransition.prototype.update=function(a){this.isCompleted(a)||(this.item.style.opacity=((a-this.from)*this.finalOpacity/this.duration).toString())};a.FlyTransition=function(b){a.FlyTransition.baseConstructor.call(this,b);this.steps=this.item.clientWidth/this.duration;this.type=a.SlideTransitionType.kFTFly};a.inherits(a.FlyTransition,
a.SlideTransition);a.FlyTransition.prototype.reset=function(){this.item.style.left="0px"};a.FlyTransition.prototype.update=function(a){this.isCompleted(a)||(this.item.style.left=(a-this.from)*this.steps-this.item.clientWidth+"px")};a.IrisTransition=function(b){a.IrisTransition.baseConstructor.call(this,b);this.stepsH=1/this.duration;this.stepsV=1/this.duration;this.item.style["-ms-transform-origin"]="center";this.item.style["-moz-transform-origin"]="center";this.item.style["-webkit-transform-origin"]=
"center";this.item.style["-o-transform-origin"]="center";this.item.style["transform-origin"]="center";a.applyTransform(this.item,"scale(0,0)");this.type=a.SlideTransitionType.kFTIris};a.inherits(a.IrisTransition,a.SlideTransition);a.IrisTransition.prototype.reset=function(){a.applyTransform(this.item,"")};a.IrisTransition.prototype.update=function(b){this.isCompleted(b)||a.applyTransform(this.item,"scale("+(b-this.from)*this.stepsH+","+(b-this.from)*this.stepsV+")")};a.PhotoTransition=function(b){a.PhotoTransition.baseConstructor.call(this,
b);this.type=a.SlideTransitionType.kFTPhoto};a.inherits(a.PhotoTransition,a.SlideTransition);a.PhotoTransition.prototype.reset=function(){this.item.style.opacity="1"};a.PhotoTransition.prototype.update=function(a){this.isCompleted(a)||(a-=this.from,this.item.style.opacity=10>=a?(a/this.duration).toString():13>=a?"0":"1")};a.RotateTransition=function(b){a.RotateTransition.baseConstructor.call(this,b);this.stepsR=90/this.duration;a.applyTransform(this.item,"rotate(-90deg)");this.type=a.SlideTransitionType.kFTRotate};
a.inherits(a.RotateTransition,a.SlideTransition);a.RotateTransition.prototype.reset=function(){a.applyTransform(this.item,"")};a.RotateTransition.prototype.update=function(b){this.isCompleted(b)||(this.item.style["-ms-transform-origin"]="left top",this.item.style["-moz-transform-origin"]="left top",this.item.style["-webkit-transform-origin"]="left top",this.item.style["-o-transform-origin"]="left top",this.item.style["transform-origin"]="left top",a.applyTransform(this.item,"rotate("+(this.duration-
(b-this.from))*this.stepsR+"deg)"))};a.SqueezeTransition=function(b){a.SqueezeTransition.baseConstructor.call(this,b);this.stepsH=1/this.duration;a.applyTransform(this.item,"scale(0,1)");this.type=a.SlideTransitionType.kFTSqeeze};a.inherits(a.SqueezeTransition,a.SlideTransition);a.SqueezeTransition.prototype.reset=function(){a.applyTransform(this.item,"")};a.SqueezeTransition.prototype.update=function(b){this.isCompleted(b)||a.applyTransform(this.item,"scale("+(b-this.from)*this.stepsH+",1)")};a.ZoomTransition=
function(b){a.ZoomTransition.baseConstructor.call(this,b);this.stepsH=1/this.duration;this.stepsV=1/this.duration;this.item.style["-ms-transform-origin"]="left top";this.item.style["-moz-transform-origin"]="left top";this.item.style["-webkit-transform-origin"]="left top";this.item.style["-o-transform-origin"]="left top";this.item.style["transform-origin"]="left top";a.applyTransform(this.item,"scale(0,0)");this.type=a.SlideTransitionType.kFTZoom};a.inherits(a.ZoomTransition,a.SlideTransition);a.ZoomTransition.prototype.reset=
function(){a.applyTransform(this.item,"")};a.ZoomTransition.prototype.update=function(b){this.isCompleted(b)||a.applyTransform(this.item,"scale("+(b-this.from)*this.stepsH+","+(b-this.from)*this.stepsV+")")};a.BlindsTransition=function(b){a.BlindsTransition.baseConstructor.call(this,b);b=a("div_Slide");this.item=a("slide_transition_canvas");this.item.width=b.clientWidth;this.item.height=b.clientHeight;this.gc=this.item.getContext("2d");this.totalRects=10;this.hsteps=this.item.width;this.vstepsMajor=
this.item.height/this.totalRects;this.vstepsMinor=this.vstepsMajor/this.duration;this.type=a.SlideTransitionType.kFTBlinds};a.inherits(a.BlindsTransition,a.SlideTransition);a.BlindsTransition.prototype.reset=function(){this.gc.fillStyle="rgba(255, 255, 255, 1)";this.gc.fillRect(0,0,this.item.width,this.item.height);this.item.style.display="none"};a.BlindsTransition.prototype.update=function(a){if(this.isCompleted(a))this.item.style.display="none";else{this.item.style.display="block";this.gc.fillStyle=
"rgba(255, 255, 255, 1)";this.gc.fillRect(0,0,this.item.width,this.item.height);for(var a=(a-this.from)*this.vstepsMinor,c=0;c<this.totalRects;++c)this.gc.clearRect(0,c*this.vstepsMajor,this.hsteps,a)}};a.PixelTransition=function(b){a.PixelTransition.baseConstructor.call(this,b);b=a("div_Slide");this.item=a("slide_transition_canvas");this.item.width=b.clientWidth;this.item.height=b.clientHeight;this.gc=this.item.getContext("2d");this.totalHPixels=this.item.width;this.totalVPixels=this.item.height;
this.totalRects=this.totalHPixels*this.totalVPixels;this.pixelArr=[];for(b=0;b<this.totalRects;++b)this.pixelArr.push(b);this.gc.fillStyle="rgba(255, 255, 255, 1)";this.gc.fillRect(0,0,this.item.width,this.item.height);this.type=a.SlideTransitionType.kFTPixelDissolve};a.inherits(a.PixelTransition,a.SlideTransition);a.PixelTransition.prototype.reset=function(){this.gc.fillStyle="rgba(255, 255, 255, 1)";this.gc.fillRect(0,0,this.item.width,this.item.height);this.item.style.display="none"};a.PixelTransition.prototype.update=
function(a){if(this.isCompleted(a))this.item.style.display="none";else{this.item.style.display="block";for(a=0;0<this.pixelArr.length&&a<this.totalRects/this.duration;++a){var c=Math.floor(Math.random()*this.pixelArr.length),d=c;this.pixelArr.splice(c,1);this.gc.clearRect(d/this.totalVPixels,d/this.totalHPixels,1,1)}}};a.WipeTransition=function(b){a.WipeTransition.baseConstructor.call(this,b);b=a("div_Slide");this.item=a("slide_transition_canvas");this.item.width=b.clientWidth;this.item.height=b.clientHeight;
this.gc=this.item.getContext("2d");this.steps=this.item.width/this.duration;this.gc.fillStyle="rgba(255, 255, 255, 1)";this.gc.fillRect(0,0,this.item.width,this.item.height);this.type=a.SlideTransitionType.kFTWipe};a.inherits(a.WipeTransition,a.SlideTransition);a.WipeTransition.prototype.reset=function(){this.gc.fillStyle="rgba(255, 255, 255, 1)";this.gc.fillRect(0,0,this.item.width,this.item.height);this.item.style.display="none";this.item.style.left="0px"};a.WipeTransition.prototype.update=function(a){this.isCompleted(a)||
(this.item.style.display="block",this.item.style.left=(a-this.from)*this.steps+"px")}})(window.cp);
(function(b){function t(a){var c=a;a&&a.sicbs&&void 0!==a.bstiid&&-1!==a.bstiid&&(c=b.D[b.getDisplayObjNameByCP_UID(a.bstiid)]);return c}b.clickHandler=function(a){b.clickSuccessHandler(b.D[a.id])};b.ch=function(a){return b.clickHandler(a)};b.wch=function(a){return b.HandleInteractiveWidget(a)};b.clickSuccessHandler=function(a){var a=t(a),c=a.vid,g=!0;c&&(a=b.D[c],g=b.isTEBValueCorrect(c,a));if(a){!1==a.cpa&&(a.clickedOnce=!0);a.ssc&&b.movie.am.pauseCurrentSlideAudioForInteractiveClick();(c=a.ca)&&
b.movie.am.playPauseEventAudio(c,!0);var c=a.osct,d=a.osc,f=a.oca,h=a.stl;if(h&&0<h.length)for(var j=0;j<h.length;j++){var e=h[j];if(e&&e.stt==b.kSTTVisited){var k="",e=e.stn,k=a.hasOwnProperty("dn")?a.dn:b.D[a.mdi].dn;b.changeState(k,e)}}h=null;j=!0;void 0==d&&(j=!1);void 0!=d&&2>d.length&&(j=!1);c&&j&&(h=f);k=1==a.pfc&&c;a.handled&&(k=!1);e=null;j&&(e=new b.Feedback(d,h,k,b.FeedbackType.SUCCESS,a));(!c||!j)&&g&&b.movie.executeAction(f);j&&e.show();return!0}return!1};b.clickFailureHandler=function(a,
c,g){var d=!1;if(a=t(a)){if(a.handled&&"cpCmndResume = 1;"==a.oca)return!0;var f=a.ofct,d=a.ofc,h=a.ofa;if(!d||2>d.length)g=!1;var j=null;f&&(c&&g)&&(j=h);var e=null;g&&(e=new b.Feedback(d,j,!1,b.FeedbackType.FAILURE,a));d=!0;(!f||!g)&&c?(!1==a.cpa&&(a.clickedOnce=!0),b.movie.executeAction(h)):d=!1;g?e.show():d=!1}return d};b.cbKH=function(a,c,g){if(!a)return!1;var d=a.stl,f=a&&a.enabled&&c&&c.visible;if(!1==f&&d&&0<d.length)for(var h=0;h<d.length&&!f;h++){var j=d[h];if(j&&(j=j.stsi)&&0<j.length)for(var e=
0;e<j.length;e++){var f=b.getDisplayObjNameByCP_UID(j[e]),f=b.D[f],k=b.getDisplayObjByKey(f.mdi),f=f&&f.enabled&&k&&k.visible;if(!0==f)break}}if(!f||a.actionInProgress)return!1;var l,d=0,h=!1,h=a.currentAttempt;void 0!=h&&(d=h);void 0!=c&&(l=c.dn);if(g)return l&&b.SubmitInteractions(l,b.QuestionStatusEnum.CORRECT,d),h=b.clickSuccessHandler(a),a.handled=!0,h;c=a.ma;d+=1;a.currentAttempt=d;g=-1!=c&&d==c;h=-1==c||d<=c;l&&b.SubmitInteractions(l,b.QuestionStatusEnum.INCORRECT,d-1);h=b.clickFailureHandler(a,
g,h);a.handled||(a.handled=-1!=c&&d>=c);return h};b.qbKH=function(a,c,g){if(!a||!c)return!1;var d=a.stl,f=a.enabled&&c.visible;if(!1==f&&d&&0<d.length)for(var h=0;h<d.length&&!f;h++){var j=d[h];if(j&&(j=j.stsi)&&0<j.length)for(var e=0;e<j.length;e++){var f=b.getDisplayObjNameByCP_UID(j[e]),f=b.D[f],k=b.getDisplayObjByKey(f.mdi),f=f&&f.enabled&&k&&k.visible;if(!0==f)break}}if(!f)return!1;a=a.qbt;if(!a||!g)return!1;c=c.dn;if(!c)return!1;c=document.getElementById(c);if(!c)return!1;g=!1;switch(a){case "clear":b.quizClearButtonClickHandler(c);
g=!0;break;case "back":b.quizBackButtonClickHandler(c);g=!0;break;case "skip":b.quizSkipButtonClickHandler(c);g=!0;break;case "submit":b.quizSubmitButtonClickHandler(c);g=!0;break;case "submitAll":b.quizSubmitAllButtonClickHandler(c);g=!0;break;case "continue":b.quizContinueButtonClickHandler(c);g=!0;break;case "review":b.quizReviewButtonClickHandler(c);g=!0;break;case "retake":b.quizRetakeButtonClickHandler(c);g=!0;break;case "reviewModeNext":b.quizReviewModeNextButtonClickHandler(c);g=!0;break;
case "reviewModeBack":b.quizReviewModeBackButtonClickHandler(c),g=!0}return g};b.isTEBValueCorrect=function(a,c){if(!c.vuin)return!0;var b=document.getElementById(a+"_inputField");if(!b)return!1;var b=b.value,d=c.exp||[],f=c.cs,h=d.length,j=!1;if(0==h&&""==b)return!0;for(var e=0;e<h&&!j;++e)j=f?b==d[e]:b.toLowerCase()==d[e].toLowerCase();return j};b.tebKH=function(a,c,g){var d=!1,f=0,d=1E3,h=!1,j;if(!a)return!1;if(c&&c.keyHandledOnce)return c.keyHandledOnce=!1;if(!g||a&&a.handled)return!1;var g=a.stl,
e=a&&a.enabled&&c&&c.visible;if(!1==e&&g&&0<g.length)for(d=0;d<g.length&&!e;d++)if(h=g[d])if((h=h.stsi)&&0<h.length)for(var k=0;k<h.length;k++){var e=b.getDisplayObjNameByCP_UID(h[k]),e=b.D[e],l=b.getDisplayObjByKey(e.mdi),e=e&&e.enabled&&l&&l.visible;if(!0==e)break}if(!e)return!1;g=a.currentAttempt;void 0!=g&&(f=g);void 0!=c&&(j=c.dn);if(d=b.isTEBValueCorrect(a.id,a))return a.handled=!0,j&&b.SubmitInteractions(j,b.QuestionStatusEnum.CORRECT,f),b.clickSuccessHandler(a);d=a.ma;f+=1;a.currentAttempt=
f;h=-1!=d&&f==d;c=-1==d||f<=d;a.handled||(a.handled=-1!=d&&f>=d);j&&b.SubmitInteractions(j,b.QuestionStatusEnum.INCORRECT,f-1);return b.clickFailureHandler(a,h,c)};b.ClickData=function(a,c,b){this.m_obj=a;this.m_objc=c;this.m_htmlElem=b;this.m_from=a.from;this.m_to=a.to};b.ClickData.prototype.isValid=function(){return void 0!=this.m_obj&&void 0!=this.m_objc&&void 0!=this.m_htmlElem&&this.m_to>=this.m_from};b.ClickData.prototype.isClickable=function(a){return!this.m_obj||!this.m_obj.enabled||!this.m_objc||
!this.m_objc.visible?!1:this.m_from<=a&&a<=this.m_to};b.ClickManager=function(){this.m_rightClickArr=[];this.m_doubleClickArr=[]};b.ClickManager.prototype.addRightClick=function(a,c,g){a=new b.ClickData(a,c,g);this.m_rightClickArr.push(a)};b.ClickManager.prototype.addDoubleClick=function(a,c,g){a=new b.ClickData(a,c,g);this.m_doubleClickArr.push(a)};b.ClickManager.prototype.removeRightClick=function(a){for(var c=0,c=0;c<this.m_rightClickArr.length;++c)if(this.m_rightClickArr[c].m_obj==a){this.m_rightClickArr.splice(c,
1);break}};b.ClickManager.prototype.removeDoubleClick=function(a){for(var c=0,c=0;c<this.m_doubleClickArr.length;++c)if(this.m_doubleClickArr[c].m_obj==a){this.m_doubleClickArr.splice(c,1);break}};b.ClickManager.prototype.clearClicks=function(){this.m_rightClickArr=[];this.m_doubleClickArr=[]};b.ClickManager.prototype.getRightClickArr=function(a){for(var c=[],b=0,b=this.m_rightClickArr.length-1;0<=b;--b)this.m_rightClickArr[b].isClickable(a)&&c.push(this.m_rightClickArr[b]);return c};b.ClickManager.prototype.getDoubleClickArr=
function(a){for(var c=[],b=0,b=this.m_doubleClickArr.length-1;0<=b;--b)this.m_doubleClickArr[b].isClickable(a)&&c.push(this.m_doubleClickArr[b]);return c};b.Shortcut=function(a,b,g,d){this.m_keyCode=void 0!=a?a:null;this.m_isCtrl=void 0!=b&&b?b:!1;this.m_isShift=void 0!=g&&g?g:!1;this.m_isAlt=void 0!=d&&d?d:!1};b.Shortcut.prototype.isValid=function(){return void 0!=this.m_keyCode&&null!=this.m_keyCode};b.Shortcut.prototype.isSame=function(a){return this.m_keyCode==a.m_keyCode&&this.m_isCtrl==a.m_isCtrl&&
this.m_isShift==a.m_isShift&&this.m_isAlt==a.m_isAlt};b.getShortCutFromKeyEvent=function(a){return new b.Shortcut(a.keyCode,1==a.ctrlKey,1==a.shiftKey,1==a.altKey)};b.KeyHandler=function(a,c,g,d,f){this.m_handler=a;this.m_shortcut=null;c instanceof b.Shortcut&&(this.m_shortcut=c);this.m_startFrame=g;this.m_endFrame=d;this.m_name=f};b.KeyHandler.prototype.isValid=function(){return this.m_handler&&this.m_shortcut};b.SHIFT=16;b.CONTROL=17;b.ALT=18;b.KeyManager=function(){this.m_keys=[];this.m_shift=
this.m_alt=this.m_ctrl=!1;this.m_keyHandlers=[];this.m_prevKeyCode=!1};b.KeyManager.prototype.handleKeyDown=function(a){a:{var c=this.m_prevKeyCode=!1;a.keyCode==b.SHIFT?c=this.m_shift=!0:a.keyCode==b.CONTROL?c=this.m_ctrl=!0:a.keyCode==b.ALT&&(c=this.m_alt=!0);this.m_shift=1==a.shiftKey;this.m_ctrl=1==a.ctrlKey;this.m_alt=1==a.altKey;if(!c){for(c=0;c<this.m_keys.length;++c)if(a.keyCode==this.m_keys[c])break a;this.m_keys.push(a.keyCode)}}for(var c=-1,g=Infinity,d,f,h=0,j=document.querySelectorAll("[tabindex]"),
e=[],k=0;k<j.length;k++)0<j[k].tabIndex&&9999>j[k].tabIndex&&(e[h++]=j[k]);if(1==b.D.pref.rkt&&9==a.keyCode){for(var l,m,h=!1,k=0;k<e.length;k++){if(null!==e[k].parentElement){for(l=e[k];"div_Slide"!==l.parentElement.id;)l=l.parentElement;l=l.id;for(j=0;j<b.movie.stage.customSlideItemList.length;j++)if(b.movie.stage.customSlideItemList[j]==l){h=!0;break}}if(l&&h&&(b.D[l].mdi&&(m=b.D[l].mdi),1==b.D[m].visible))(e[k].tabIndex<g&&(g=e[k].tabIndex,f=e[k]),e[k].tabIndex>c)?(c=e[k].tabIndex,d=e[k]):e[k].tabIndex==
c&&(d=e[k])}m=a.target.getAttribute("tabindex");a=a.target.id;m=parseInt(m,10);m==c&&d.id==a&&document.getElementById(f.id).focus()}};b.KeyManager.prototype.handleKeyUp=function(a){this.check(a);a:{this.m_prevKeyCode=!0;var c=!1;a.keyCode==b.SHIFT?(this.m_shift=!1,c=!0):a.keyCode==b.CONTROL?(this.m_ctrl=!1,c=!0):a.keyCode==b.ALT&&(this.m_alt=!1,c=!0);this.m_shift=1==a.shiftKey;this.m_ctrl=1==a.ctrlKey;this.m_alt=1==a.altKey;if(!c)for(c=0;c<this.m_keys.length;++c)if(a.keyCode==this.m_keys[c]){this.m_keys.splice(c,
1);break a}}};b.KeyManager.prototype.handleFocusOut=function(){this.m_keys=[];this.m_shift=this.m_alt=this.m_ctrl=!1};b.KeyManager.prototype.check=function(a){var c=null,g=cpInfoCurrentFrame,d=0,f=!1,h=null,j=b.getObjectType(a);if(j==b.kCPOTTextEntryBoxItem)var e=b.getObjName(j,a);for(d=0;d<this.m_keyHandlers.length;++d)if(c=this.m_keyHandlers[d],c.m_startFrame<=g&&c.m_endFrame>=g){for(var f=c.m_shortcut,k=!1,l=0;l<this.m_keys.length&&!k;++l){var m;m=f.m_keyCode;var n=this.m_keys[l];if(m===n)m=!0;
else{if(m>n){var q=m;m=n;n=q}m=48<=m&&57>=m&&96<=n&&105>=n&&m-48===n-96||109<=m&&111>=m&&189<=n&&191>=n&&m-109===n-189?!0:!1}m&&(k=!0)}f=!k?0==f.m_keyCode&&0==this.m_keys.length&&!this.m_prevKeyCode&&(f.m_isCtrl&&this.m_ctrl&&!this.m_shift&&!this.m_alt||f.m_isShift&&this.m_shift&&!this.m_ctrl&&!this.m_alt)?!0:!1:this.m_ctrl==f.m_isCtrl&&this.m_shift==f.m_isShift&&this.m_alt==f.m_isAlt;1===b.D.pref.acc&&c.m_shortcut.m_keyCode===a.keyCode&&(f=!0);if(f)if(j==b.kCPOTTextEntryBoxItem){if(c.m_name==e){h=
c;if(c.m_handler(f))return!0;break}}else{h=c;if(c.m_handler(f))return!0;break}}for(d=0;d<this.m_keyHandlers.length;++d)if(c=this.m_keyHandlers[d],h!=c&&!1!=c.m_shortcut.isValid()&&c.m_startFrame<=g&&c.m_endFrame>=g&&c.m_handler(!1))return!0;var o;a.keyCode?o=a.keyCode:a.which&&(o=a.which);if(13==o||32==o){var p,h="";a.target?p=a.target:a.srcElement&&(p=a.srcElement);3==p.nodeType&&(p=p.parentNode);p&&(h=p.id);if(""!=h)for(d=0;d<this.m_keyHandlers.length;++d)if(c=this.m_keyHandlers[d],c.m_name==h&&
c.m_startFrame<=g&&c.m_endFrame>=g&&c.m_handler(!0))return!0}return!1};b.KeyManager.prototype.addHandler=function(a){a&&a.isValid()&&this.m_keyHandlers.push(a)};b.KeyManager.prototype.removeHandler=function(a){if(a&&a.isValid()){a=a.m_shortcut;for(i=0;i<this.m_keyHandlers.length;++i){var b=this.m_keyHandlers[i].m_shortcut;b.m_keyCode===a.m_keyCode&&(b.m_isAlt===a.m_isAlt&&b.m_isCtrl===a.m_isCtrl&&b.m_isShift===a.m_isShift&&a.m_handler===b.m_handler)&&this.m_keyHandlers.splice(i,1)}}};b.KeyManager.prototype.clearHandlers=
function(){this.m_keyHandlers=[]};b.MouseOverManager=function(){this.m_TimerID=this.m_mouseOutHandler=this.m_mouseOverItem=void 0};b.MouseOverManager.prototype.addMouseOverItem=function(a,c){b.DESKTOP===b.device&&(c&&a)&&(this.DoMouseOutOnCurrMouseOverItem(),this.m_mouseOverItem=a,this.m_mouseOutHandler=c)};b.MouseOverManager.prototype.removeMouseOverItem=function(a){b.DESKTOP===b.device&&a&&this.m_mouseOverItem===a&&(this.m_mouseOutHandler=this.m_mouseOverItem=void 0)};b.MouseOverManager.prototype.DoMouseOutOnCurrMouseOverItem=
function(){b.DESKTOP===b.device&&void 0!==this.m_mouseOverItem&&(this.m_mouseOutHandler&&this.m_mouseOutHandler(),this.m_mouseOutHandler=this.m_mouseOverItem=void 0)};b.MouseOverManager.prototype.CheckIfCurrMouseOverItemIsHit=function(a){if(b.DESKTOP===b.device){var c=!1;if(!a||void 0===this.m_mouseOverItem)return c;if(this.m_mouseOverItem.actualParent){var g=this.m_mouseOverItem.actualParent.id,d=a.id,a=b.D[a.id];if(!a)return c;void 0!==a.bstiid&&-1!==a.bstiid&&(d=b.getDisplayObjNameByCP_UID(a.bstiid));
c=g===d}return c}};b.MouseOverManager.prototype.handleMouseMove=function(a){function c(){g.m_TimerID=void 0;if(void 0!==g.m_mouseOverItem){var c;a:{var f=b.getScaledPosition(getPageX(a),getPageY(a));c=f.X-window.pageXOffset;for(var f=f.Y-window.pageYOffset,h=b("div_Slide").childNodes,j=h.length-1;0<=j;--j){var e=h[j];if("DIV"==e.nodeName&&"block"==e.style.display){var k=b.GetDataForElement(e,!0);if(k&&b.D[k.mdi].visible){drawingItemDivData=b.D[k.mdi];var l=k=0,m=0,n=0;if(void 0==e.getBoundingClientRect)k=
parseFloat(e.style.left),l=parseFloat(e.style.top),m=parseFloat(e.style.left)+parseFloat(e.style.width),n=parseFloat(e.style.top)+parseFloat(e.style.height);else{var q;e.rotateAngle&&(q=e.style.transform||e.style.msTransform||e.style.MozTransform||e.style.WebkitTransform||e.style.OTransform,b.applyTransform(e,"rotate(0)"));e.offsetHeight=e.offsetHeight;n=b.getHitTestingRect(e);e.rotateAngle&&b.applyTransform(e,q);k=n.minX;l=n.minY;m=n.maxX;n=n.maxY}var o=0;e.rotateAngle&&(o=e.rotateAngle);var p=c,
r=f,p=p-(k+m)/2,r=r-(l+n)/2,s=p*Math.cos(Math.PI*-o/180)-r*Math.sin(Math.PI*-o/180),o=p*Math.sin(Math.PI*-o/180)+r*Math.cos(Math.PI*-o/180),s=s+(k+m)/2,o=o+(l+n)/2;if(s>=k&&s<=m&&o>=l&&o<=n){c=e;break a}}}}c=void 0}void 0!==c&&!1==g.CheckIfCurrMouseOverItemIsHit(c)&&g.DoMouseOutOnCurrMouseOverItem()}}if(b.DESKTOP===b.device)if(void 0===this.m_mouseOverItem)void 0!==this.m_TimerID&&(clearTimeout(this.m_TimerID),this.m_TimerID=void 0);else{var g=this;void 0!==this.m_TimerID&&(clearTimeout(this.m_TimerID),
this.m_TimerID=void 0);this.m_TimerID=setTimeout(c,300)}}})(window.cp);
(function(b){b.Gradient=function(a,f,d){b.Gradient.baseConstructor.call(this,a);this.visible=1;this.parentId=f;if(this.parentObj=b.D[f])this.gradientData=this.parentObj.gf,a=this.gradientData.b,this.bounds={minX:a[0],minY:a[1],maxX:a[2],maxY:a[3]},this.args=d;this.isDrawn=!1};b.inherits(b.Gradient,b.DisplayObject);b.Gradient.prototype.start=function(a,b){this.drawIfNeeded(a,b);if(!this.effectIsStarted||a)this.updateEffects(this.hasEffect),this.effectIsStarted=!0};b.Gradient.prototype.reset=function(){delete b.ropMap[this.element.id];
this.isDrawn=!1;this.element.width="0";this.element.height="0";this.element.style.width="0px";this.element.style.height="0px";this.element.left="0";this.element.top="0";this.element.style.left="0px";this.element.style.top="0px";this.effectIsStarted=!1};b.Gradient.prototype.drawIfNeeded=function(a,f){if((!b.responsive||!this.drawForResponsive(a,f))&&!this.isDrawn&&this.gradientData){if(void 0==this.canvasElem)for(var d=this.element.firstChild;d;d=d.nextSibling)if(d.nodeType==Node.ELEMENT_NODE&&d.id&&
d.id==this.parentId+"gf"){this.canvasElem=d;break}if(this.canvasElem){var c=this.bounds,e=c.minX,g=c.minY,d=c.maxX-c.minX,c=c.maxY-c.minY;this.canvasElem.style.position="absolute";e=(this.canvas=b.createCanvas(e,g,d,c,this.canvasElem)).gc;e.save();if(g=b.getGradientFill(this.gradientData,e))e.fillStyle=g,e.fillRect(0,0,d,c);e.restore();this.isDrawn=!0}}};b.Gradient.prototype.drawForResponsive=function(a){if(!b.responsive)return!1;if(this.isDrawn&&!a)return!0;if(!this.gradientData)return!1;if(void 0==
this.canvasElem)for(a=this.element.firstChild;a;a=a.nextSibling)if(a.nodeType==Node.ELEMENT_NODE&&a.id&&a.id==this.parentId+"gf"){this.canvasElem=a;break}if(!this.canvasElem)return!1;this.canvasElem.style.width="100%";this.canvasElem.style.height="100%";a=b.createResponsiveStyleObj(void 0,void 0,"0px","0px",void 0,void 0,"100%","100%",void 0);a.ipiv=!0;a=(this.canvas=b.createResponsiveCanvas(a,this.canvasElem.clientWidth,this.canvasElem.clientHeight,this.canvasElem)).gc;a.save();var f=b.getGradientFill(this.gradientData,
a,this.canvasElem.clientWidth/b.D.project.w,this.canvasElem.clientHeight/b.D.project.h);f&&(a.fillStyle=f,a.fillRect(0,0,this.canvasElem.clientWidth,this.canvasElem.clientHeight));a.restore();return this.isDrawn=!0};b.ImageFill=function(a,f,d){b.ImageFill.baseConstructor.call(this,a);this.visible=1;this.parentId=f;if(this.parentObj=b.D[f])this.tileData=this.parentObj.imgf,a=this.tileData.b,this.bounds={minX:a[0],minY:a[1],maxX:a[2],maxY:a[3]},this.args=d;this.isDrawn=!1};b.inherits(b.ImageFill,b.DisplayObject);
b.ImageFill.prototype.start=function(a,b){this.drawIfNeeded(a,b);if(!this.effectIsStarted||a)this.updateEffects(this.hasEffect),this.effectIsStarted=!0};b.ImageFill.prototype.reset=function(){delete b.ropMap[this.element.id];this.isDrawn=!1;this.element.width="0";this.element.height="0";this.element.style.width="0px";this.element.style.height="0px";this.element.left="0";this.element.top="0";this.element.style.left="0px";this.element.style.top="0px"};b.ImageFill.prototype.getTranslationValuesForTiletype=
function(a){var f=a.img.tiletype,d=0,c=0,e=a.b[2]-a.b[0],g=a.b[3]-a.b[1],h=a.img.w,a=a.img.h,i=this.canvasElem.clientWidth/b.D.project.w,j=this.canvasElem.clientHeight/b.D.project.h;b.responsive&&(e=Math.floor(e*i),g=Math.floor(g*j));switch(f){case "t":d=(e-h)/2;break;case "tr":d=e-h;break;case "l":c=(g-a)/2;break;case "c":d=(e-h)/2;c=(g-a)/2;break;case "r":d=e-imageWidthimageWidth;c=(g-a)/2;break;case "bl":c=g-a;break;case "b":d=(e-h)/2;c=g-a;break;case "br":d=e-h,c=g-a}0<d&&(d=d%h-h);0<c&&(c=c%
a-a);return{x:d,y:c}};b.ImageFill.prototype.drawIfNeeded=function(a,f){if((!b.responsive||!this.drawForResponsive(a,f))&&!this.isDrawn&&this.tileData&&this.tileData.img&&this.tileData.img.ip){if(void 0==this.canvasElem)for(var d=this.element.firstChild;d;d=d.nextSibling)if(d.nodeType==Node.ELEMENT_NODE&&d.id&&d.id==this.parentId+"imgf"){this.canvasElem=d;break}if(this.canvasElem){var c=this.bounds,e=c.minX,g=c.minY,d=c.maxX-c.minX,h=c.maxY-c.minY;this.canvasElem.style.position="absolute";this.canvasElem.style.backgroundColor=
"#FFFFFF";if((c=b.movie.im.images[this.tileData.img.ip])&&c.nativeImage.complete)e=(this.canvas=b.createCanvas(e,g,d,h,this.canvasElem)).gc,e.save(),g=this.tileData.s,this.tileData.t?(e.rect(0,0,d,h),d=this.getTranslationValuesForTiletype(this.tileData),e.translate(d.x,d.y),d=e.createPattern(c.nativeImage,"repeat"),e.fillStyle=d,e.fill()):g?e.drawImage(c.nativeImage,0,0,d,h):(e.translate((d-this.tileData.img.w)/2,(h-this.tileData.img.h)/2),e.drawImage(c.nativeImage,0,0)),e.restore(),this.isDrawn=
!0}}};b.ImageFill.prototype.drawForResponsive=function(a){if(!b.responsive)return!1;if(this.isDrawn&&!a)return!0;if(!this.tileData||!this.tileData.img||!this.tileData.img.ip)return!1;if(void 0==this.canvasElem)for(a=this.element.firstChild;a;a=a.nextSibling)if(a.nodeType==Node.ELEMENT_NODE&&a.id&&a.id==this.parentId+"imgf"){this.canvasElem=a;break}if(!this.canvasElem)return!1;var f=this.bounds,a=f.maxX-f.minX,d=f.maxY-f.minY;this.canvasElem.style.width="100%";this.canvasElem.style.height="100%";this.canvasElem.style.position=
"absolute";this.canvasElem.style.backgroundColor="#FFFFFF";if((f=b.movie.im.images[this.tileData.img.ip])&&f.nativeImage.complete){var c=b.createResponsiveStyleObj(void 0,void 0,"0px","0px",void 0,void 0,"100%","100%",void 0);c.ipiv=!0;c=(this.canvas=b.createResponsiveCanvas(c,this.canvasElem.clientWidth,this.canvasElem.clientHeight,this.canvasElem)).gc;c.save();var e=this.tileData.s;if(this.tileData.t)c.rect(0,0,this.canvasElem.clientWidth,this.canvasElem.clientHeight),a=this.getTranslationValuesForTiletype(this.tileData),
c.translate(a.x,a.y),a=c.createPattern(f.nativeImage,"repeat"),c.fillStyle=a,c.fill();else if(e)c.drawImage(f.nativeImage,0,0,this.canvasElem.clientWidth,this.canvasElem.clientHeight);else{var e=this.canvasElem.clientWidth/b.D.project.w,g=this.canvasElem.clientHeight/b.D.project.h,h=f.nativeImage.width*e,i=f.nativeImage.height*g;c.translate(Math.floor((a*e-h)/2),Math.floor((d*g-i)/2));c.drawImage(f.nativeImage,0,0,Math.floor(h),Math.floor(i))}c.restore();return this.isDrawn=!0}return!1}})(window.cp);
(function(g){g.SlideGraphManager=function(){this.m_CurrentBranch=[];this.m_BranchHistory=[];this.m_SlideGraphObj={};this.m_RootSlideIndex=-1;this.m_InvalidSlideJump=!1;this.m_CompletionBranch=[];this.m_CompletionBranchSet=!1;this.m_CompletionBranchSlideCount=-1;this.m_CompletionBranchSlideCountSet=!1;this.m_BranchNumber=0;this.m_PrevBranch=[];this.BranchEnum||(this.BranchEnum={},this.BranchEnum.kBranchNotFound=0,this.BranchEnum.kBranchFound=1,this.BranchEnum.kLoopBranchFound=2,this.BranchEnum.kMultipleBranchFound=
3)};g.SlideGraphManager.prototype={countUniqItems:function(a){for(var b={},c=0,d=0;d<a.length;++d){var e=a[d];void 0==b[e]&&(b[e]=e,++c)}return c},findCompletionBranchTraverse:function(a,b,c){var d=!1,e=-1;!d&&void 0==this.m_SlideGraphObj[a]&&(e=this.BranchEnum.kBranchFound,d=!0);!d&&void 0!=c[a]&&(e=this.BranchEnum.kLoopBranchFound,d=!0);b.push(a);c[a]=a;if(d){++this.m_BranchNumber;if(1==this.m_BranchNumber)return this.m_CompletionBranch=this.m_CurrentBranch.concat(b),this.m_CompletionBranchSet=
!0,e==this.BranchEnum.kLoopBranchFound&&a==b[0]||(this.m_CompletionBranchSlideCount=this.countUniqItems(this.m_CurrentBranch.concat(b)),this.m_CompletionBranchSlideCountSet=!0),b.pop(),delete c[a],this.BranchEnum.kBranchFound;if(2<=this.m_BranchNumber){this.m_CompletionBranchSet=!1;if(this.m_CompletionBranchSlideCountSet){var f=this.countUniqItems(this.m_CurrentBranch.concat(b));if(!(e==this.BranchEnum.kLoopBranchFound&&a==b[0])&&f==this.m_CompletionBranchSlideCount)return b.pop(),delete c[a],this.BranchEnum.kBranchFound;
this.m_CompletionBranchSlideCountSet=!1;b.pop();delete c[a];return this.BranchEnum.kMultipleBranchFound}b.pop();delete c[a];return this.BranchEnum.kMultipleBranchFound}}e=this.m_SlideGraphObj[a];d=!1;for(f in e)switch(this.findCompletionBranchTraverse(Number(f),b,c)){case this.BranchEnum.kBranchFound:d=!0;case this.BranchEnum.kBranchNotFound:break;case this.BranchEnum.kMultipleBranchFound:return this.BranchEnum.kMultipleBranchFound}b.pop();delete c[a];return d?this.BranchEnum.kBranchFound:this.BranchEnum.kBranchNotFound},
findCompletionBranch:function(){this.m_CompletionBranch=[];this.m_CompletionBranchSet=!1;this.m_BranchNumber=0;this.findCompletionBranchTraverse(1<=this.m_CurrentBranch.length?this.m_CurrentBranch[this.m_CurrentBranch.length-1]:this.m_RootSlideIndex,[],{})},initialize:function(){if(g.D.baq){var a=g.D.sgMgr;if(void 0!=a){var b=a.ri,a=a.sg;if(!(void 0==b||void 0==a)){this.m_InvalidSlideJump=!1;this.m_RootSlideIndex=b;for(b=0;b<a.length;++b){var c=a[b];if(!(void 0==c||2!=c.length)){this.m_SlideGraphObj[c[0]]=
{};for(var d=c[1],e=0;e<d.length;++e){var f=d[e];if(!(void 0==f||2!=f.length)){this.m_SlideGraphObj[c[0]][f[0]]={};for(var j=f[1],h=0;h<j.length;++h){var i=j[h];void 0!=i&&(this.m_SlideGraphObj[c[0]][f[0]][i]=i)}}}}}}}}},onSlideJump:function(a){if(0<this.m_CurrentBranch.length){var b=this.m_CurrentBranch[this.m_CurrentBranch.length-1];if(a==b)return;if(void 0==this.m_SlideGraphObj[b]){this.m_BranchHistory.push(a);this.m_InvalidSlideJump=!0;return}if(void 0==this.m_SlideGraphObj[b][a]){this.m_InvalidSlideJump=
!0;this.updateCurrentBranch(a);this.m_BranchHistory.push(a);return}}this.m_BranchHistory.push(a);this.m_CurrentBranch.push(a)},getSlideViewPercentage:function(){!this.m_CompletionBranchSet&&!this.m_CompletionBranchSlideCountSet&&this.findCompletionBranch();if(!this.m_CompletionBranchSet&&!this.m_CompletionBranchSlideCountSet)return"NaN";var a=this.countUniqItems(this.m_CurrentBranch),b=-1,b=this.m_CompletionBranchSlideCountSet?this.m_CompletionBranchSlideCount:this.countUniqItems(this.m_CompletionBranch);
return 0>=b?"NaN":100*a/b},isSlidePartOfCurrentBranch:function(a){return 0<this.m_CurrentBranch.length&&-1!=this.m_CurrentBranch.indexOf(a)?!0:!1},getCompletionBranch:function(){this.m_CompletionBranchSet||this.findCompletionBranch();return!this.m_CompletionBranchSet?[]:this.m_CompletionBranch},getCurrentBranch:function(){return this.m_CurrentBranch},getBranchHistory:function(){return this.m_BranchHistory},restoreCompletionBranchState:function(a){0<a.length&&(this.m_CompletionBranch=[],this.m_CompletionBranch=
a,this.m_CompletionBranchSet=!0)},restoreCurrentBranchState:function(a){0<a.length&&(this.m_CurrentBranch=[],this.m_CurrentBranch=a,this.m_BranchHistory=[],this.m_BranchHistory=a.slice())},resetCurrentBranch:function(a){if(!(0>a)){for(var b=-1,c=0;c<this.m_CurrentBranch.length;++c)if(this.m_CurrentBranch[c]==a){b=a;break}0<=b&&b+1<this.m_CurrentBranch.length&&this.m_CurrentBranch.splice(b+1)}},updateCurrentBranch:function(){},getMaxQuizScore:function(){return 0},getMinQuizScore:function(){return 0},
getQuizScorePercentage:function(){return 0},getNextAttemptFirstQuestionSlideIndex:function(){return-1},getReviewFirstQuestionSlideIndex:function(){return-1},getNumQuestions:function(){return 0},getQuestionSlideProgressNumber:function(){return"NaN"},setQuestionSlideProgressNumber:function(){},getLastQuestionSlideIndex:function(){return-1},getNextSlideList:function(a){var b=[];if(void 0!=this.m_SlideGraphObj[a]){var a=this.m_SlideGraphObj[a],c;for(c in a)b.push(Number(c))}return b},getIsJumpValid:function(a,
b){return void 0==this.m_SlideGraphObj[a]||void 0==this.m_SlideGraphObj[a][b]?!1:!0},SaveCurrentBranch:function(){this.m_PrevBranch=this.m_CurrentBranch.slice()},GetPrevBranch:function(){return this.m_PrevBranch}}})(window.cp);
if("undefined"===typeof console||"undefined"===typeof console.log)console={log:function(){}};window.Node||(window.Node={},Node.ELEMENT_NODE=1,Node.ATTRIBUTE_NODE=2,Node.TEXT_NODE=3,Node.CDATA_SECTION_NODE=4,Node.ENTITY_REFERENCE_NODE=5,Node.ENTITY_NODE=6,Node.PROCESSING_INSTRUCTION_NODE=7,Node.COMMENT_NODE=8,Node.DOCUMENT_NODE=9,Node.DOCUMENT_TYPE_NODE=10,Node.DOCUMENT_FRAGMENT_NODE=11,Node.NOTATION_NODE=12);
Array.indexOf||(Array.prototype.indexOf=function(m){for(var k=0;k<this.length;++k)if(this[k]==m)return k;return-1});
(function(){function m(a,b){var d=[],c=cp.movie.stage;if(!c||!(a>c.slides.length-1)||c.isOverlaySlideIndex(a)){var c=c.getSlideNameForIndex(a),c=cp.D[c],f=cp.D[c.mdi],e=f.ip;if(!e&&(cp.device==cp.IDEVICE||cp.device==cp.ANDROID))e=f.aip;e&&d.push(e);c.imgf&&(c.imgf.img&&c.imgf.img.ip&&c.imgf.img.ip.length>0)&&d.push(c.imgf.img.ip);c=c.si;for(f=0;f<c.length;++f){e=cp.D[c[f].n];e.hpImgPath&&d.push(e.hpImgPath);e.oca&&e.fbImg&&d.push(e.fbImg);if(e=cp.D[e.mdi]){var g=e.ip;if(g)if(typeof g==="object")for(var j in g)d.push(g[j]);
else d.push(g);(g=e.uImg)&&d.push(g);(g=e.hImg)&&d.push(g);(g=e.pImg)&&d.push(g);(g=e.imgf)&&(g.img&&g.img.ip&&g.img.ip.length>0)&&d.push(g.img.ip);(g=e.asbos)&&(g.imgf&&g.imgf.img&&g.imgf.img.ip&&g.imgf.img.ip.length>0)&&d.push(g.imgf.img.ip);(g=e.asbds)&&(g.imgf&&g.imgf.img&&g.imgf.img.ip&&g.imgf.img.ip.length>0)&&d.push(g.imgf.img.ip);if(e=e[cp.kPPTXSlideImagesStr])for(g=0;g<e.length;++g)e[g].ip.length>0&&d.push(cp.kPPTXSlideImagesDir+e[g].ip)}}cp.movie.im.loadImages(a,d,b)}}function k(){eval('function handlePasswordProtected(){if(cp.D.secret){var a=lMainModelData.pwd,b=lMainModelData.pwdRetryMsg,d=function(){var d=document.getElementById("k333"),c=!0;d&&d.value!=a&&(c=!1);if(c)HideEverything();else if(cp.verbose&&cp.log("incorrect pwd"),d=document.getElementById("a5__px"))d.innerHTML=b};cp.passwordDiv.innerHTML="<table id=\'a5__px\' style=\'position:absolute;background-color:#FFFFFF;left:0px;top:0px;width:100%;height:100%\'><tr style=\'width:100%;height:100%;text-align:center;vertical-align:middle\'><td><table style=\'width:100%;text-align:center;vertical-align:middle\'><tr style=\'text-align:center;vertical-align:middle\'><td id=\'a5__px\'>"+lMainModelData.pwdMsg+"</td></tr><tr style=\'text-align:center;vertical-align:middle\'><td><input id=\'k333\' type=\'password\' style=\'width:"+lMainModelData.pwdTxtBoxW+"px;height:"+lMainModelData.pwdTxtBoxH+"px;\'/></td></tr><tr style=\'text-align:center;vertical-align:middle\'><td><button id=\'checkPwdButton\'>Continue</button></td></tr></table></td></tr>";cp.registerGestureEvent(document.getElementById("checkPwdButton"),cp.GESTURE_EVENT_TYPES.TAP,d);document.getElementById(lPwdTxtBoxVarName).onkeyup=function(){d()};ShowEverything()}}function handleExpiry(){if(cp.D.expiryDate){var a=new Date;a.setFullYear(lMainModelData.prjExpY,lMainModelData.prjExpM-1,lMainModelData.prjExpD-1);(new Date).getTime()<=a.getTime()||(a=lMainModelData.prjExpMsg,cp("__z_21").style.visibility="hidden",cp("a5__px").style.visibility="hidden",cp("md5").style.visibility="hidden",cp.expiryDiv.innerHTML="<div id=\'md5\' style=\'width:380px;height:54px;left:"+(cp.D.project.w-380)/2+"px;top:"+(cp.D.project.h-54)/2+"px;position:absolute\'><div id=\'expImg\' style=\'width:100%;height:100%;background-image:url(assets/htmlimages/movieexpire.png);background-repeat:no-repeat;\'></div><div id=\'a5__px\' style=\'color:#ffffff; width:300px;left:65px; position:absolute; height:15px; top:20px; font-size:12px; text-align:left; text-overflow: clip;overflow: hidden\'/>"+a+"</div></div>")}else cp.expiryDiv.style.display="none",cp.expiryDiv.style.visibility="hidden"}function handleAutoplay(){var a=cp.D[cp.movie.main.id].autoplay;document.getElementById("playImage");a?cp.autoPlayNeedsUserClick()?(cp.autoplayImage.style.display="none",cp.autoplayImage.style.visibility="hidden"):cp("autoplayDiv").style.display="none":(cp.movie.autoplayimagew=0,cp.movie.autoplayimageh=0,a=cp.D[cp.movie.main.id].autoplayFileName,void 0!=a?(cp.movie.im.getImageDataURI(a,function(a){cp.autoplayImage.src=a}),cp.autoplayImage.style.opacity=0.7,cp.movie.autoplayimagew=cp.D[cp.movie.main.id].autoplayimagew,cp.movie.autoplayimageh=cp.D[cp.movie.main.id].autoplayimageh):(cp.autoplayImage.style.display="none",cp.autoplayImage.style.visibility="hidden"));a=function(a){if(!a.target||!(a.target.tagName.toUpperCase()=="INPUT"||a.target.tagName.toUpperCase()=="SELECT"||a.target.tagName.toUpperCase()=="TEXTAREA")){(cp.isTextInputInFocus()||document.activeElement.tagName.toUpperCase()=="SELECT")&&document.activeElement.blur();a.preventDefault()}};if(cp.D[cp.movie.main.id].pprtd){var b=cp.D[cp.movie.main.id],d=b.ps,f=function(a){if(a){cp("project").style.visibility="visible";cp("playbar").style.visibility="visible";cp("toc").style.visibility="visible";cp.pwdv.parentNode.removeChild(cp.pwdv)}else{cp("project").style.visibility="hidden";cp("playbar").style.visibility="hidden";cp("toc").style.visibility="hidden"}},c=function(){var a=document.getElementById("pwdt"),e=true;if(a){a=(new cp.sha1).HashUTF16Str(a.value);if(d.length==a.length)for(var c=0;c<a.length&&e;++c)d[c]!=a[c]&&(e=false);else e=false}if(e){f(true);cp.passwordAccepted=true;window.scrollTo(0,0);cp.complete()}else if(e=document.getElementById("promptMsg"))e.innerHTML=b.prm};cp.pwdv.innerHTML="<table id=\'pwdTable\' style=\'position:absolute;background-color:#FFFFFF;left:0px;top:0px;width:100%;height:100%\'><tr style=\'width:100%;height:100%;text-align:center;vertical-align:middle\'><td><table style=\'width:100%;text-align:center;vertical-align:middle\'><tr style=\'text-align:center;vertical-align:middle\'><td id=\'promptMsg\'>"+b.pm+"</td></tr><tr style=\'text-align:center;vertical-align:middle\'><td><input id=\'pwdt\' type=\'password\' style=\'width:"+b.ptw+"px;height:"+b.pth+"px;\'/></td></tr><tr style=\'text-align:center;vertical-align:middle\'><td><button id=\'checkPwdButton\'>Continue</button></td></tr></table></td></tr>";cp.useg&&Hammer&&Hammer(cp.pwdv,{no_mouseevents:!0,transform_min_scale:1,drag_block_horizontal:!0,drag_block_vertical:!0,drag_min_distance:0});cp.registerGestureEvent(cp.pwdv,"touchstart",a);cp.registerGestureEvent(cp.pwdv,"touchmove",a);cp.registerGestureEvent(cp.pwdv,"touchend",a);cp.registerGestureEvent(cp.pwdv,"touchcancel",a);cp.registerGestureEvent(document.getElementById("checkPwdButton"),cp.GESTURE_EVENT_TYPES.TAP,c);a=document.getElementById("pwdt");a.focus();a.onkeyup=function(a){a.keyCode==13&&c()};f(!1)}else cp.pwdv.style.display="none",cp.pwdv.style.visibility="hidden",cp.passwordAccepted=!0,cp.complete()}function handlePreloader(){var a=cp.D[cp.movie.main.id].preloader,b=cp.D[cp.movie.main.id].preloaderFileName;void 0!=b&&""!=b&&a?(cp.movie.im.getImageDataURI(b,function(a){cp.preloaderImage.src=a}),-1!=b.indexOf("loading.gif")?cp.preloaderImage.defaultImage=!0:cp("loadingString").style.display="none"):cp.preloaderImage.style.display="none";cp.movie.preloadProjectAssets();cp.isExpired=!0;cp.D[cp.movie.main.id].peon?(a=cp.D[cp.movie.main.id],b=new Date,b.setFullYear(a.pey,a.pem-1,a.ped-1),(new Date).getTime()<=b.getTime()?(cp.exdv&&cp.exdv.parentNode.removeChild(cp.exdv),cp.isExpired=!1):(cp("project").style.visibility="hidden",cp("playbar").style.visibility="hidden",cp("toc").style.visibility="hidden",a="<div id=\'pems\' style=\'width:380px;height:54px;left:0px;top:0px;right:0px;bottom:0px;margin:auto;position:absolute\'><div id=\'pemi\' style=\'width:100%;height:100%;background-image:url(assets/htmlimages/movieexpire.png);background-repeat:no-repeat;\'></div><div id=\'pet\' style=\'color:#ffffff; width:300px;left:65px; position:absolute; height:15px; top:20px; font-size:12px; text-align:left; text-overflow: clip;overflow: hidden\'/>"+a.pems+"</div></div>",cp.exdv.style.backgroundColor=cp.D[cp.movie.element.id].prjBgColor,cp.exdv.innerHTML=a)):(cp.exdv.style.display="none",cp.exdv.style.visibility="hidden",cp.isExpired=!1)}function _handleProjOptions(){handleAutoplay();handlePreloader()};_handleProjOptions();')}
function y(a){var b=[],d;for(d in a)b.push(cp.vm.getVariableValue(a[d].name));return b}window.getPageX=function(a){var b=0;cp.m_gestureHandler&&(b=cp.m_gestureHandler.getEventPageX(a));return b};window.getPageY=function(a){var b=0;cp.m_gestureHandler&&(b=cp.m_gestureHandler.getEventPageY(a));return b};cp.CacheView=function(a){this.index=a;if(!cp.CacheView.DIM){cp.CacheView.DIM=20;cp.CacheView.GAP=5;cp.CacheView.LEFT_OFFSET=100;cp.CacheView.TOP_OFFSET=30;cp.CacheView.NUM_CACHE_VIEWS=0}this.view=cp.newElem("div");
document.body.appendChild(this.view);this.view.style.cssText="z-index:100;display:block; position:fixed; left:"+(cp.CacheView.LEFT_OFFSET+cp.CacheView.NUM_CACHE_VIEWS*(cp.CacheView.DIM+cp.CacheView.GAP))+"px; top:"+cp.CacheView.TOP_OFFSET+"px; width:"+cp.CacheView.DIM+"px; height:"+cp.CacheView.DIM+"px; background-color:#555555;opacity:0.8";this.view.innerHTML="<font color='#000000' style='font-size:10px'>-1</font>";++cp.CacheView.NUM_CACHE_VIEWS};cp.CacheView.prototype={update:function(){var a=cp.movie.pm.cache[this.index];
this.view.innerHTML="<font color='#000000' style='font-size:10px'>"+a+"</font>";this.view.style.backgroundColor=this.index==cp.movie.pm.tail?"#ffff00":this.index==cp.movie.pm.head?"#0000ff":a!=-1?"#00ff00":"#555555"}};cp.PrefetchManager=function(){cp.movie.pm=this;this.cache=cp.device==cp.DESKTOP?Array(7):Array(4);for(var a=0;a<this.cache.length;++a)this.cache[a]=-1;this.tail=this.head=0;this.viewCache=false};cp.PrefetchManager.prototype={numSlidesToAttemptPreloaded:function(){return this.cache.length-
3},print:function(){for(var a="[ ",b=this.tail;b!=this.head;b=(b+1)%this.cache.length){a=a+this.cache[b];a=a+" "}console.log("cached slides:"+(a+"]"))},showCache:function(){if(this.viewCache)for(var a=0;a<this.cacheViews.length;++a)this.cacheViews[a].update()},slideWasPrefetched:function(a){for(var b=this.tail;b!=this.head;b=(b+1)%this.cache.length)if(this.cache[b]==a)return true;return false},ifPrefetchedMakeMRU:function(a){for(var b=this.tail;b!=this.head;b=(b+1)%this.cache.length)if(this.cache[b]==
a){for(var d=(b+1)%this.cache.length;d!=this.head;){this.cache[b]=this.cache[d];b=d;d=(b+1)%this.cache.length}this.cache[b]=a;return true}return false},throwAwayLRUSlide:function(){if(this.head!=this.tail){var a=this.cache[this.tail];cp.movie.im.verbose&&cp.log("throwing Away LRU Slide "+a);var b=cp.movie.stage.getSlideNameForIndex(a),b=cp.D[b],d=cp.D[b.mdi].ip;d!=""&&cp.movie.im.unloadImage(a,d);if(b=b.si)for(d=0;d<b.length;++d){var c=cp.D[b[d].n],f=cp.D[c.mdi];if(f){var e=f.ip;if(e){var g=false;
c.pa||(g=c.rp=="1");if(!g){cp.movie.im.unloadImage(a,e);(e=f.uImg)&&cp.movie.im.unloadImage(a,e);(e=f.hImg)&&cp.movie.im.unloadImage(a,e);(e=f.pImg)&&cp.movie.im.unloadImage(a,e);(c=f.imgf)&&(c.img&&c.img.ip&&c.img.ip.length>0)&&cp.movie.im.unloadImage(a,c.img.ip);if(f=f[cp.kPPTXSlideImagesStr])for(c=0;c<f.length;++c)f[c].ip.length>0&&cp.movie.im.unloadImage(a,cp.kPPTXSlideImagesDir+f[c].ip)}}}}this.cache[this.tail]=-1;this.tail=(this.tail+1)%this.cache.length}},isLoading:function(){return this.loading},
loadSlideAssets:function(a){if(this.loading)return false;this.loading=true;try{cp.movie.im.verbose&&cp.log("loading assets of slide "+a);if(this.ifPrefetchedMakeMRU(a))m(a,true);else{var b=(this.head+1)%this.cache.length;b==this.tail&&this.throwAwayLRUSlide();m(a,true);this.cache[this.head]=a;this.head=b}cp.movie.im.verbose&&this.print()}catch(d){}this.loading=false;this.showCache();return true},preloadSlideAssets:function(a){cp.movie.im.verbose&&cp.log("preloading assets of slide "+a);if(!this.slideWasPrefetched(a)){var b=
(this.head+1)%this.cache.length;b==this.tail&&this.throwAwayLRUSlide();m(a);this.cache[this.head]=a;this.head=b}cp.movie.im.verbose&&this.print();this.showCache()}};cp.Movie=function(a){this.virgin=true;this.element=a;this.symbols={};this.main=null;this.cc=document.getElementById("cc");this.cpInfoLastVisitedSlideStartFrame=0;this.fps=cp.D[a.id].fps;this.hidePlaybarInQuiz=cp.D.quizzingData.hidePlaybarInQuiz;this.offset=(cp.offsetInnerWidth-cp.D[a.id].w+(cp.loadedModules.toc&&!cp.D.tocProperties.overlay?
cp.D.tocProperties.position==1?cp.D.tocProperties.width:-cp.D.tocProperties.width:0))/2;this.paused=true;this._parseElements();this.questions=[];this.questionObjs=[];this.element.style.backgroundColor=cp.D[this.element.id].prjBgColor;this.currAudioType="bg";this.currAudioStopFrame=this.currAudioStartFrame=-1;this.counter=0;this.speed=1;this.playKeyTap=cp.D[a.id].pkt;this.m_hasIsTrackedBeenSet=false;this.MIN_WAIT_TIME_TO_PAUSE_MOVIE=this.waitedForResources=0;this.MIN_WAIT_TIME_TO_BLOCK_UI=2E3;if(cp.device==
cp.ANDROID)this.MIN_WAIT_TIME_TO_BLOCK_UI=4E3;this.MAX_WAIT_TIME=2E4;this.mRequestAnimationFrameFunc=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||null;if(!this.mRequestAnimationFrameFunc){var b=0;this.mRequestAnimationFrameFunc=window.requestAnimationFrame=function(a){var c=(new Date).getTime(),f=Math.max(0,(window.cpInfoFPS?1E3/window.cpInfoFPS:100/3)-(c-b));b=c+f;return window.setTimeout(function(){a(b)},
f)}}this.m_scaleFactor=1};cp.Movie.prototype={updateMovie:function(){var a=cp.D[this.main.id].questions;if(a){this.questions=a.split(",");this.questionObjs=[]}this.stage.updateTimeline()},handleProjectOptions:function(){k()},preloadProjectAssets:function(){var a=cp.model.projectImages;a&&a.length!=0&&cp.movie.im.loadImages(-1,a,true,true)},rewind:function(){this.stage.handleRewindForFramesets();this.stage.RemoveFeedbacks(cp.FeedbackCloseReason.SLIDE_CHANGE);cp.movie.stage.itemsNotLoaded=[];cp.movie.stage.rewind=
true;_cpInfoLastVisitedSlide=_cpInfoPrevSlide=1;if(cp.ThreeDQuestionHelper){var a=cp.movie.stage.getSlideIndexForFrame(1);cp.movie.stage.isThreeDSlideIndex(a)&&cp.ThreeDQuestionHelper.set360QuizMode(false)}this.jumpToFrame(1);this.play(cp.ReasonForPlay.MOVIE_REWIND)},_parseElements:function(){for(var a=this.element.firstChild;a;a=a.nextSibling)if(a.nodeType==Node.ELEMENT_NODE){var b=(a.className+"").split(" ");if(b.indexOf("cp-timeline")!=-1){var d=b.indexOf("cp-main")!=-1;b.indexOf("cp-symbol")!=
-1&&(this.symbols[a.id]=a);if(d)this.main=a}}if(this.main!=null)this.stage=cp.parseTimeline(this.main)},resetFPS:function(){if(cpInfoFPS!=0){this.POLL_INTERVAL=1E3/cpInfoFPS;if(!this.useRequestAnimationFrame||!this.mRequestAnimationFrameFunc){if(this.interval){clearInterval(this.interval);this.interval=0}var a=this;delete a.lastRequestTime;this.step=function(b,d){var c=(new Date).getTime();if(c){var f=a.lastRequestTime?c-a.lastRequestTime:0;if(!a.lastRequestTime||f>a.POLL_INTERVAL){a.lastRequestTime=
c-f%a.POLL_INTERVAL;a._onEnterFrame()}}d||window.requestAnimationFrame(a.step)};window.requestAnimationFrame(a.step)}else{if(this.interval){clearInterval(this.interval);this.interval=0}this.mRequestAnimationFrameFunc.call(window,this.animationLoop)}}},resetMovieElapsedTime:function(a){this.startMovieTime=(new Date).getTime()-cpInfoCurrentFrame*1E3/(cp.movie.fps*cp.movie.speed);if(arguments.length>0&&this.useRequestAnimationFrame!=a){this.useRequestAnimationFrame=a;this.resetFPS()}},animationLoop:function(){cp.movie.useRequestAnimationFrame&&
cp.movie.mRequestAnimationFrameFunc.call(window,cp.movie.animationLoop);cp.movie._onEnterFrame()},startTimer:function(){if(!this.interval){this.stage.start();this.element.style.display="block";this.resetFPS()}},stop:function(){this.stage.reset();this.element.style.display="none";var a=document.getElementById("playbar");a.pause!=void 0&&a.pause()},play:function(a){if(!cp.isBlockedForLMS())if(cp.movie.videoPlayUserInteractionCallback&&a==cp.ReasonForPlay.PLAYBAR_ACTION)cp.movie.videoPlayUserInteractionCallback();
else{cp.verbose&&cp.log("movie.play deleting pendingPlay");delete this.pendingPlay;var b=this.stage.getSlideDiv();if(this.stage.m_backgroundStyleFilter!=void 0&&!(_cpInfoCurrentFrame+1 in this.stage.overlayslideframes))b.style.filter=this.stage.m_backgroundStyleFilter;this.resetMovieElapsedTime();if(this.virgin){cp.verbose&&cp.log("movie virgin play");this.virgin=false;a=cp.getStartFrameOfMovie();1<a&&(_cpInfoCurrentFrame=a);this.am.unlockWebAudio();cp.InitMedia();cp.beginMovie();return true}if(!this.paused){a&&
(a==cp.ReasonForPlay.MOVIE_REWIND&&cpInfoCurrentFrame<this.stage.lastFrame)&&cp.em.fireEvent("CPMovieStart");return false}if(this.waitingForResources()){cp.verbose&&cp.log("set pendingPlay = true. movie cannot play since resources not available");this.pendingPlay=true;return false}cp.verbose&&cp.log("movie play");this.am.ssp=0;var d=document.getElementById("playbar");d&&d.play!=void 0&&d.play();if(!this.tocPlaybarHandlerSet){this.tocPlaybarHandlerSet=true;d&&d.animator&&d.animator.startTimer();if((b=
this.stage.getSlideDiv())&&d&&d.animator){cp.mainContainer.onmouseover=cp.handleMouseOver;if(cp.device==cp.DESKTOP)cp.mainContainer.onmousemove=cp.handleMouseMove;cp.mainContainer.onmouseout=cp.handleMouseOut}}this.now=new Date;this.elapsedFramesResidue=0;b=false;if(this.startTime==void 0){this.startTime=this.now;cp.em.fireEvent("CPMovieStart")}else if(this.reasonForPause==cp.ReasonForPause.MOVIE_ENDED&&cpInfoCurrentFrame<this.stage.lastFrame){cp.em.fireEvent("CPMovieStart");b=true}else if(a&&a==
cp.ReasonForPlay.MOVIE_REWIND&&cpInfoCurrentFrame<this.stage.lastFrame)cp.em.fireEvent("CPMovieStart");else{cp.em.fireEvent("CPMovieResume",a);b=true}this.paused=false;b&&cp.em.fireEvent("CPMovieActualResume",a);return _registerForUpdateTimeBasedSystemVariables=true}},pause:function(a){if(this.paused&&a!=cp.ReasonForPause.WAIT_FOR_RESOURCES&&(this.waitingForResources()||this.reasonForPause==cp.ReasonForPause.WAIT_FOR_RESOURCES)){cp.verbose&&cp.log("set pendingPause = true. movie cannot pause since resources not available");
this.pendingPause=true;this.pendingReasonForPause=a}else if(this.paused){if(this.reasonForPause!=a&&this.reasonForPause==cp.ReasonForPause.MOVIE_ENDED){this.reasonForPause=a;cp.em.fireEvent("CPMovieStart")}this.am&&this.am.reasonForPause!=a&&this.am.pause(a);this.vdm&&this.vdm.reasonForPause!=a&&this.vdm.pause(a)}else{cp.verbose&&cp.log("movie pause "+a);this.reasonForPause=a;cp.verbose&&cp.log("movie.pause deleting pendingPlay");delete this.pendingPlay;if(a==cp.ReasonForPause.INTERACTIVE_ITEM)this.stage.interactivePauseFrame=
cpInfoCurrentFrame;var b=document.getElementById("playbar");b&&b.pause!=void 0&&a!=cp.ReasonForPause.WAIT_FOR_RESOURCES&&b.pause();a==cp.ReasonForPause.MOVIE_ENDED&&(b&&b.animator)&&b.animator.showPlaybar(true);this.paused=true;this.am&&this.am.pause(a);this.vdm&&this.vdm.pause(a);cp.em.fireEvent("CPMoviePause",a)}},blockUI:function(){if(!this.blockedUI){this.blockedUI=true;cp("blockUserInteraction").style.display="block";cp("blockUserInteraction").style.width="100%";cp("blockUserInteraction").style.height=
"100%";cp("blockUserInteraction").style.zIndex=1E4;this.preloadRot=0}},unblockUI:function(){if(this.blockedUI){this.blockedUI=false;cp("blockUserInteraction").style.display="none"}},jumpToFrame:function(a){if(a=="cpInfoLastVisitedSlide")a=this.cpInfoLastVisitedSlideStartFrame;var b=cp.movie.stage.getSlideIndexForFrame(a),d=this.stage.getSlideDiv();if(this.stage.m_backgroundStyleFilter!=void 0&&!(a+1 in this.stage.overlayslideframes))d.style.filter=this.stage.m_backgroundStyleFilter;if(this.waitingForResources()){if(b!=
cpInfoCurrentSlideIndex){this.am.resetAllWaitingAudios();this.vdm.resetAllWaitingVideos();cp.verbose&&cp.log("movie jumping to another slide. resetting pending audio/video")}else cp.verbose&&cp.log("movie cannot jumpToFrame since resources not available");this.pendingJump=a;return false}if(!this.stage.canUpdateToFrame(a,b)){cp.verbose&&cp.log("movie cannotUpdateToFrame "+a);return false}if(this.pm.isLoading()){cp.verbose&&cp.log("movie cannot jumpToFrame since prefetchManager is loading");this.pendingJump=
a;return false}_cpInfoCurrentFrame=a;this.stage.adjustFrameToNextNonOverlayFrameOnLayerZero();this._jumpFrame=cpInfoCurrentFrame;if(!this.stage.pendingOnSlideLayerRemovedAction&&(this.stage.overlayslideframes[a]||cp.ThreeDQuestionHelper&&cp.ThreeDQuestionHelper.isAssessmentHotspotFrame(a)))this.stage.preventAdvanceFrame=true;return true},executeAction:function(a){cp.verbose&&cp.log("execute action str ["+a+"]");if(a&&a!="")try{eval(a)}catch(b){cp.log(b)}},frameBasedExecuteAction:function(a){if(this.executedActionOnFrame!=
this.stage.updatingFrame){this.executedActionOnFrame=this.stage.updatingFrame;this.executeAction(a)}},mousePath:function(a,b,d){if(!(b<a.afrom||b>a.ato)||d){var c=a.ato-a.afrom;if(c!=0){c=c-Math.floor(cpInfoFPS*0.5);c<=0&&(c=0);var f=this.motionPathArgs,e=cp.cloneObject(f.b);if(cp.responsive){e=e[cp.ResponsiveProjWidth];if(!cp.movie.stage.isSlideBGCropped()){e[0]=cp.project.clientWidth*e[0]/cp.ResponsiveProjWidth;e[2]=cp.project.clientWidth*e[2]/cp.ResponsiveProjWidth}}var g=e[2]-e[0],j=e[3]-e[1],
h=b-a.afrom;if(!(h<0)){var b=e[0],d=e[1],n=e[2],e=e[3],i=1;f.s==1&&(i=0.5);var l=n,o=e;if(c>0&&h<c){l=0==f.t||0==g||0==j;c=Math.pow(h/c,i);if(l){l=b+g*c;o=d+j*c}else{g=c*c;j=1-c;f=j*j;l=b*f+2*n*j*c+n*g;o=d*f+2*d*j*c+e*g}}a.children[0].element.left=l;a.children[0].element.style.left=l+"px";a.children[0].element.top=o;a.children[0].element.style.top=o+"px"}}}},waitingForResources:function(){var a=this.im&&this.im.imagesNotLoaded(),b=this.stage&&!this.stage.hasItemsLoaded(),d=this.am&&this.am.pendingAudios()>
0,c=this.vdm&&this.vdm.pendingVideos()>0,f=this.ms&&this.ms.pendingItems()>0;if(a||b||d||c||f){cp.verbose&&cp.log("waiting for "+a+" "+b+" "+d+" "+c+" "+f+" yield = "+this.stage.yield);return true}return false},resetAllWaitingResources:function(){this.im&&this.im.reset();if(this.stage)this.stage.itemsNotLoaded=[];this.am&&this.am.resetAllWaitingAudios();this.vdm&&this.vdm.resetAllWaitingVideos();this.ms&&this.ms.reset();this.waitedForResources=0},_saveStateBeforePushSlideLayer:function(a){this.pendingPushSlideLayerInfo&&
this._restoreStateAfterPushSlideLayerIfNeeded();if(this.pendingPushSlideLayerInfo==void 0){this.pendingPushSlideLayerInfo={};this.pendingPushSlideLayerInfo.frame=cpInfoCurrentFrame;this.pendingPushSlideLayerInfo.audioMuted=this.am.muted;this.pendingPushSlideLayerInfo.videoMuted=this.vdm.muted;this.pendingPushSlideLayerInfo.overlaySlideItemData=a;this.am.mute(true);this.vdm.mute(true)}},_restoreStateAfterPushSlideLayerIfNeeded:function(){if(this.pendingPushSlideLayerInfo&&this.pendingPushSlideLayerInfo.frame!=
cpInfoCurrentFrame){this.am.mute(this.pendingPushSlideLayerInfo.audioMuted);this.vdm.mute(this.pendingPushSlideLayerInfo.videoMuted);this.pendingPushSlideLayerInfo=void 0}},_onEnterFrame:function(){if(!cp.isBlockedForLMS()){var a=void 0;this._restoreStateAfterPushSlideLayerIfNeeded();if(!this.stage.pendingOnSlideLayerRemovedAction)if((a=this.stage.overlayslideframes[cpInfoCurrentFrame])&&a.si>=0){if(this.stage.ignoreOverlayOnFrame!=cpInfoCurrentFrame){this._saveStateBeforePushSlideLayer(a);this.stage.hasOverlaySlide()&&
this.stage.popSlideLayer(true)}}else this._jumpFrame!==cpInfoCurrentFrame&&(!this.stage.hasOverlaySlide()&&cp.ThreeDQuestionHelper&&cp.ThreeDQuestionHelper.isIn360QuizMode()&&cp.ThreeDQuestionHelper.isAssessmentHotspotFrame(cpInfoCurrentFrame))&&cp.ThreeDQuestionHelper.showQuestions();this.am.updateAudioViews();this.vdm.updateVideoViews();if(this.waitingForResources()){this.waitedForResources=this.waitedForResources+this.POLL_INTERVAL;if(this.waitedForResources>=this.MAX_WAIT_TIME){cp.verbose&&cp.log("waited too long...given up waiting! Paused = "+
this.paused+" reason = "+this.reasonForPause+" pendingPlay = "+this.pendingPlay);this.resetAllWaitingResources();this.unblockUI();if(!this.paused&&this.pendingPause){this.pause(this.pendingReasonForPause);delete this.pendingPause;delete this.pendingReasonForPause}else(this.paused&&this.reasonForPause==cp.ReasonForPause.WAIT_FOR_RESOURCES||this.pendingPlay)&&this.play()}else if(this.waitedForResources>=this.MIN_WAIT_TIME_TO_BLOCK_UI){this.pause(cp.ReasonForPause.WAIT_FOR_RESOURCES);this.blockUI()}else this.waitedForResources>=
this.MIN_WAIT_TIME_TO_PAUSE_MOVIE&&this.pause(cp.ReasonForPause.WAIT_FOR_RESOURCES)}else{this.waitedForResources>0&&cp.verbose&&cp.log("finished waiting! Paused = "+this.paused+" reason = "+this.reasonForPause+" pendingPlay = "+this.pendingPlay);this.waitedForResources=0;this.unblockUI();if(!this.paused&&this.pendingPause){this.pause(this.pendingReasonForPause);delete this.pendingPause;delete this.pendingReasonForPause}else if(this.paused&&this.reasonForPause==cp.ReasonForPause.WAIT_FOR_RESOURCES||
this.pendingPlay)this.play();else if(a=this.pendingJump){cp.verbose&&cp.log("jumping to pending jump frame "+a);delete this.pendingJump;this.jumpToFrame(a)}else if(this.paused){if(cpInfoCurrentFrame==this._jumpFrame){if(this.stage.fallsOutsideCurrentSlide(cpInfoCurrentFrame)){this.stage.makeLayerZeroSlideMRUIfOnOverlaySlide();this.stage.adjustFrameToNextNonOverlayFrameOnLayerZero();var b=this.stage.getSlideIndexForFrame(cpInfoCurrentFrame);if(b!=-1)if(this.stage.yield)delete this.stage.yield;else{this.stage.loadAssetsForSlideAtIndex(b);
this.stage.yield=1;return}}this._jumpFrame=-1;this.stage.updateFrame(cp.Timeline.ReasonForUpdate.JUMP)}this.stage.UpdateFeedbacks();this.stage.updateFrameCurrentOnPause()}else{this.elapsedMovieTime=((new Date).getTime()-this.startMovieTime)*cp.movie.speed;a=new Date;this.stage.UpdateFeedbacks();if(this.stage.fallsOutsideCurrentSlide(cpInfoCurrentFrame)){this.stage.makeLayerZeroSlideMRUIfOnOverlaySlide();this.stage.adjustFrameToNextNonOverlayFrameOnLayerZero();b=this.stage.getSlideIndexForFrame(cpInfoCurrentFrame);
if(b!=-1)if(this.stage.yield)delete this.stage.yield;else{this.stage.loadAssetsForSlideAtIndex(b);this.stage.yield=1;return}}if(cpInfoCurrentFrame==this._jumpFrame){this._jumpFrame=-1;this.stage.updateFrame(cp.Timeline.ReasonForUpdate.JUMP);b=this.stage.getSlideDiv();if(this.stage.m_backgroundStyleFilter!=void 0&&!(cpInfoCurrentFrame+1 in this.stage.overlayslideframes))b.style.filter=this.stage.m_backgroundStyleFilter}else this.stage.updateFrame(cp.Timeline.ReasonForUpdate.PROGRESS);if(cp.movie.stage.currentSlide&&
cp.movie.stage.GetCurrentSlideType()=="ThreeD Slide")if(b=cp.getDisplayObjFor3DSlideByCP_UID(cp.movie.stage.currentSlide.id))b.onEnterFrame();if(!this.paused)if(this.pendingPushSlideLayerInfo&&this.pendingPushSlideLayerInfo.frame==cpInfoCurrentFrame){this.stage.pushSlideLayer(this.pendingPushSlideLayerInfo.overlaySlideItemData,this.pendingPushSlideLayerInfo.disableAnimation);this.stage.ignoreOverlayOnFrame=cpInfoCurrentFrame;this._restoreStateAfterPushSlideLayerIfNeeded();this._onEnterFrame()}else{if(this.stage.ignoreOverlayOnFrame!=
cpInfoCurrentFrame)this.stage.ignoreOverlayOnFrame=-1;var d=new Date,b=this.now;this.now=d;if(cp.disablePaceMaker)this.framesToSkip=1;else{if(this.elapsedFramesResidue==void 0)this.elapsedFramesResidue=0;var c=0;if(1==this.speed&&this.am.pace)c=this.am.pace-cpInfoCurrentFrame;else{a=d.getTime()-a.getTime();cp.movie.PPTXSlide&&(a=0);c=(this.now.getTime()-b.getTime()-a)*cpInfoFPS/1E3}this.framesToSkipForPlaybar=this.elapsedFramesResidue=this.elapsedFramesResidue+c;this.framesToSkip=Math.floor(this.framesToSkipForPlaybar);
this.elapsedFramesResidue=this.elapsedFramesResidue-this.framesToSkip}cp.verbose&&cp.log("am.pace = "+this.am.pace+" elapsedFramesResidue = "+this.elapsedFramesResidue+" skipping = "+this.framesToSkip);this.stage.preventAdvanceFrame?this.stage.preventAdvanceFrame=false:this.stage.attemptToAdvanceCurrentFrameByOffset(this.framesToSkip)}}}}},registerQuizVariableSetters:function(){if(cp.movie.playbackController){var a=cp.movie.playbackController.GetQuizController();if(a){a.quizInScopeSetter=cp._cpInQuizScope;
a.quizScopeSlideSetter=cp._cpQuizScopeSlide}}},initLMS:function(){if(this.playbackController){this.playbackController.GetLoadingResumeDataBln();if(!this.m_hasIsTrackedBeenSet){this.playbackController.GetIsTrackedFlag()?this.playbackController.SetIsTracked(true):this.playbackController.SetIsTracked(false);this.m_hasIsTrackedBeenSet=true;this.playbackController.GetLoadingResumeDataBln()}typeof cp.LMSDriverHolder=="undefined"&&(!this.playbackController.LMSIsAICC()&&!this.playbackController.IsRunningInConnect())&&
cp.handleVariablesInURLParams();!this.playbackController.IsRunningInConnect()&&(typeof cp.LMSDriverHolder!="undefined"&&cp.LMSDriverHolder&&cp.LMSDriverHolder.GetStudentName)&&cp.vm.setVariableValue("cpQuizInfoStudentName",cp.LMSDriverHolder.GetStudentName(),false)}},resumeMovieSpecificValue:function(){if(this.playbackController){var a=this.playbackController.GetRestoredQuizSlide();a>=0&&(_cpInfoCurrentFrame=a)}}};cp.QuizLibraryInit=function(){cp.g_ShouldRandomize&&cp.NewQuizLibraryInit()};cp.NewQuizLibraryInit=
function(){if(cp.PlaybackController&&!cp.movie.playbackController){cp.movie.playbackController=cp.IsRunningInACAP?new cp.ACAPPlaybackController:new cp.PlaybackController;cp.movie.playbackController.InitializeReportingVariables();cp.movie.playbackController.InitializePlaybackController()}cp.movie.registerQuizVariableSetters();if(cp.g_ShouldRandomize)cp.ContinueQuizLibraryInit();else if(cp.resumeDataChunk!=""&&cp.resumeDataChunk!=void 0&&cp.resumeDataChunk!="0"){var a=cp.movie.playbackController;a&&
a.RestoreQuizState()}cp.movie.initLMS()};cp.ContinueQuizLibraryInit=function(){cp.movie.updateMovie();cp.movie.stage.createQuestionObjs();cp.movie.playbackController&&cp.movie.playbackController.AddQuestionSlideNames();cp.movie.stage.initializeGraphManager()};cp.CPPreInit=function(){cp.CPProjInit();cp.shouldScale=cp.D.project.shc;cp.responsive=cp.D.project_main.useResponsive;cp.responsiveType=cp.D.project_main.responsiveType;if(cp.IsRunningInACAP||cp.IsRunningInALEC){cp.D.playBarProperties.hasPlayBar=
false;cp.D.borderProperties.hasBorder=false;cp.D.project.hasTOC=false}cp.loadedModules={playbar:cp.D.playBarProperties.hasPlayBar&&cp("playbar")!=void 0,border:cp.D.borderProperties.hasBorder,toc:cp.D.project.hasTOC&&cp("toc")!=void 0};if(cp.device==cp.IDEVICE)if(cp.mat==void 0){if(cp.IOSMajor<=cp.IOS5)cp.multiAudioTrack=false}else cp.multiAudioTrack=false;if(cp.device==cp.ANDROID)cp.multiAudioTrack=true;var a=cp.D.project_main.pools;if(a==void 0||a.length<=0)cp.poolManager=void 0;else{cp.poolManager=
new cp.PoolManager;cp.poolManager.loadPools();cp.g_ShouldRandomize&&cp.poolManager.randomizePools()}PPTXLib.initializePPTXLibrary();if(a=cp.D.project_main.slideVideos)for(var b=0,d=1;d<a.length;++b,++d){var c=cp.D[a[b]],f=cp.D[a[d]];if(c.to+1==f.from){c=cp.D[c.mdi];f=cp.D[f.mdi];if(Math.abs(c.vst-f.vsf)<=0.1&&c.mp4==f.mp4){c.continueToNextSlide=1;f.continueFromPrevSlide=1}}}for(var a=(cp.D.project_main.slideAudios||"").split(","),b=(cp.D.project_main.slides||"").split(","),d=a.length,f=b.length,e=
c=0;e<f&&c<d;++e){var g=cp.D[b[e]];if(!g)break;var j=cp.D[a[c]];if(!j)break;if(j.from<=g.to)g.audioName=a[c];g.to>=j.to&&++c}a=(cp.D.project_main.slides||"").split(",");b=a.length;for(d=0;d<b;++d){f=cp.D[a[d]];if(!f)break;for(var h in f.si){c=f.si[h];if(cp.kCPOTFLVItem==c.t||cp.kCPOTVideo==c.t||cp.kCPFullMotion==c.t||cp.kCPOTVideoResource==c.t){if(!f.videos)f.videos=[];f.videos.push(c.n)}}}if(cp.responsive){shouldShowResponsivePreview=true;if(cp.responsiveWidths==void 0)cp.responsiveWidths=cp.D.project.cssWidths;
if(cp.responsiveAllBPWidths==void 0)cp.responsiveAllBPWidths=cp.D.project.allbpswidth;if(cp.responsiveType==cp.kCPPMEAutoResponsive||cp.responsiveType==cp.kCPPMEVR)shouldShowResponsivePreview=false;(cp.m_isPreview||cp.m_isLMSPreview)&&cp.parentWindow.initializeResponsivePreview&&cp.parentWindow.initializeResponsivePreview(shouldShowResponsivePreview,cp.D.project.upperBoundWidth,cp.D.project.w,cp.D.project.h,cp.D.project_main.cBW,cp.DESKTOP==cp.device);cp.updateResponsiveGlobals()}cp.offsetInnerWidth=
0;cp.getInnerWidth();h=cp.getProjectContainer();if(cp.responsive){h.style.width="100%";h.style.height="100%"}else{h.style.width=cp.D.project.w+(cp.loadedModules.toc&&!cp.D.tocProperties.overlay?cp.D.tocProperties.width:0)+"px";h.style.height=cp.D.project.h+"px"}h=cp.getMainContainer();a=(cp.offsetInnerWidth-parseFloat(h.style.width))/2;h.style.left=cp.responsive?"0px":(a>0?a:0)+"px";if(!cp.playImage)cp.playImage=cp("playImage");if(!cp.autoplayImage)cp.autoplayImage=cp("autoplayImage");if(!cp.autoplayDiv)cp.autoplayDiv=
cp("autoplayDiv");if(!cp.gesturesDiv){cp.gesturesDiv=cp("gestureIcon");if(cp.useg){cp.gesturesDiv.style.display="block";cp.registerGestureEvent(cp.gesturesDiv,cp.GESTURE_EVENT_TYPES.TAP,cp.showGesturesHint,true)}else cp.gesturesDiv.style.display="none"}if(cp.autoPlayNeedsUserClick())cp.playImage.className="autoPlayButton";if(cp.device!=cp.DESKTOP){cp.playImage.className="autoPlayButton";if(cp.useg)cp.gesturesDiv.style.display="block"}else{if(!cp.D.project_main.autoplay)cp.playImage.className="autoPlayButton";
cp.gesturesDiv.style.display="none"}if(!cp.ccdv){cp.ccdv=cp("cc");cp.fixWebkitScaling(cp.ccdv)}if(!cp.pwdv)cp.pwdv=cp("pwdv");if(!cp.exdv)cp.exdv=cp("exdv");if(!cp.preloaderImage)cp.preloaderImage=cp("preloaderImage");if(cp.movie==void 0){cp.movie=new cp.Movie(cp("project"));cp.eventManager=new cp.EventManager;cp.variablesManager=new cp.VariablesManager;cp.movie.audioManager=new cp.AudioManager;cp.movie.videoManager=new cp.VideoManager;cp.movie.mediaSeeker=new cp.MediaSeeker;if(cp.IsRunningInACAP){h=
{Name:"CPGetEvent"};h.cpName=h.Name;h.Data={};h.Data.ask="capiVariable";h.Data.askData="capiStudentName";h.Data.callback=cp.updateStudentNameVariableFromACAP;h.cpData=h.Data;cp.currentWindow.cpAPIEventEmitter.trigger(h)}cp.g_ShouldRandomize||cp.NewQuizLibraryInit();cp.movie.vdm.load();cp.movie.am.load();h=cp.movie.stage.getSlideNameForIndex(0);cp.multiAudioTrack&&h!=""&&cp.movie.am.preload(h);h!=""&&cp.movie.vdm.preload(h);cp.movie.imageManager=new cp.ImageManager;cp.movie.prefetchManager=new cp.PrefetchManager;
cp.movie.handleProjectOptions();cp.movie.pm.preloadSlideAssets(0);cp.movie.topOffset=0;h=cp.getProject();if(!cp.responsive)h.style.left=(cp.loadedModules.toc&&!cp.D.tocProperties.overlay&&cp.D.tocProperties.position==1?cp.D.tocProperties.width:0)+"px"}if(h=cp.movie.stage.getSlideDiv()){h.ondblclick=cp.handleDblClick;h.oncontextmenu=cp.handleRightClick}cp.loadedModules.border&&cp.borderInit(cp.D);cp.loadedModules.playbar?cp.playBarInit(cp.D):cp.setMovieLeftTopRightBottom(0,0,0,0);cp.loadedModules.toc&&
cp.responsive&&cp.tocInit(cp.D,0,0,0,0);cp("project").style.zIndex=1;if(cp.loadedModules.toc)cp("toc").style.zIndex=2;if(cp.loadedModules.playbar)cp("playbar").style.zIndex=3;cp.ccdv=cp("cc");cp.pwdv=cp("pwdv");cp.exdv=cp("exdv");if(cp.ccdv)cp.ccdv.style.zIndex=4;if(cp.gesturesDiv)cp.gesturesDiv.style.zIndex=4;if(cp.pwdv)cp.pwdv.style.zIndex=5;if(cp.exdv)cp.exdv.style.zIndex=6;if(cp.m_isPreview&&!cp.m_isEdgeInspectPreview&&!cp.responsive){h=cp.vm.getGeoVarsInfo();if(h.length>0&&!cp.fakeGeo){cp.fakeGeo=
document.createElement("div");cp.fakeGeo.id="cpFakeGeo";a=document.createElement("div");a.innerHTML=cp.D.geoProps.geoEmul||"Emulate Geolocation";a.id="cpFakeGeoTitle";cp.fakeGeo.appendChild(a);var n=document.createElement("select");n.id="cpFakeGeoList";(a=cp.D.geoProps.geoNone)||(a="nowhere");n.options[0]=new Option("<"+a+">","");for(var i in h)n.options[n.options.length]=new Option(h[i].name,cp.vm.getVariableValue(h[i].name));n.addEventListener("change",function(){cpInfoGeoLocation=n.value});cp.fakeGeo.appendChild(n);
cp.fakeGeo.style.zIndex=7;document.body.appendChild(cp.fakeGeo)}}if(cp.dynamicLogControl){if(cp.consolidateLogs)cp.logArray=[];var l=cp.newElem("div");l.style.cssText="z-index:100;position:absolute;left:0px; top:0px; width:20px; height:20px;display:block;background-image:url(assets/htmlimages/hotspot_correct_answer_normal.png);opacity:"+(cp.consolidateLogs?1:0.5);l.onclick=function(){if(!cp.logArray)cp.logArray=[];if(cp.consolidateLogs){for(var a=0;a<cp.logArray.length;++a)console.log(cp.logArray[a]);
cp.logArray.length=0}cp.consolidateLogs=!cp.consolidateLogs;l.style.opacity=cp.consolidateLogs?1:0.5};l.innerHTML="<font color='#000000' style='font-size:10px'>consolidateLogs</font>";document.body.appendChild(l);var o=cp.newElem("div");o.style.cssText="z-index:100;position:absolute;left:0px; top:30px; width:20px; height:20px;display:block;background-image:url(assets/htmlimages/hotspot_correct_answer_normal.png);opacity:"+(cp.movie.im.verbose?1:0.5);o.onclick=function(){cp.movie.im.verbose=!cp.movie.im.verbose;
o.style.opacity=cp.movie.im.verbose?1:0.5};o.innerHTML="<font color='#000000' style='font-size:10px'>imageLogs</font>";document.body.appendChild(o);var k=cp.newElem("div");k.style.cssText="z-index:100;position:absolute;left:60px; top:30px; width:20px; height:20px;display:block;background-image:url(assets/htmlimages/arrow_right.gif);opacity:"+(cp.movie.pm.viewCache?1:0.5);k.onclick=function(){cp.movie.pm.viewCache=!cp.movie.pm.viewCache;if(cp.movie.pm.viewCache){cp.movie.pm.cacheViews=[];for(var a=
0;a<cp.movie.pm.cache.length;++a)cp.movie.pm.cacheViews[a]=new cp.CacheView(a);cp.movie.pm.showCache()}else{for(a in cp.movie.pm.cacheViews){document.body.removeChild(cp.movie.pm.cacheViews[a].view);--cp.CacheView.NUM_CACHE_VIEWS}delete cp.movie.am.cacheViews}k.style.opacity=cp.movie.pm.viewCache?1:0.5};k.innerHTML="<font color='#000000' style='font-size:10px'>view</font>";document.body.appendChild(k);var m=cp.newElem("div");m.style.cssText="z-index:100;position:absolute;left:0px; top:60px; width:20px; height:20px;display:block;background-image:url(assets/htmlimages/hotspot_correct_answer_normal.png);opacity:"+
(cp.movie.am.verbose?1:0.5);m.onclick=function(){cp.movie.am.verbose=!cp.movie.am.verbose;m.style.opacity=cp.movie.am.verbose?1:0.5};m.innerHTML="<font color='#000000' style='font-size:10px'>audioLogs</font>";document.body.appendChild(m);var p=cp.newElem("div");p.style.cssText="z-index:100;position:absolute;left:60px; top:60px; width:20px; height:20px;display:block;background-image:url(assets/htmlimages/arrow_right.gif);opacity:"+(cp.movie.am.viewAudio?1:0.5);p.onclick=function(){cp.movie.am.viewAudio=
!cp.movie.am.viewAudio;p.style.opacity=cp.movie.am.viewAudio?1:0.5;if(cp.movie.am.viewAudio){cp.movie.am.audioViews=[];for(var a=0;a<cp.movie.am.MAX_AUDIO_CHANNELS;++a){var b=cp.movie.am.audioChannels[a];cp.movie.am.audioViews[a]=new cp.AudioView(b)}}else{for(a in cp.movie.am.audioViews){b=cp.movie.am.audioViews[a];document.body.removeChild(b.view);--cp.MediaView.NUM_MEDIA_VIEWS}delete cp.movie.am.audioViews}};p.innerHTML="<font color='#000000' style='font-size:10px'>view</font>";document.body.appendChild(p);
i=cp.newElem("div");i.style.cssText="z-index:100;position:absolute;left:120px; top:60px; width:20px; height:20px;display:block;background-image:url(assets/htmlimages/hotspot_correct_answer_normal.png);opacity:1";i.onclick=function(){cp.movie.am.resetAllWaitingAudios()};i.innerHTML="<font color='#000000' style='font-size:10px'>!Wait</font>";document.body.appendChild(i);var q=cp.newElem("div");q.style.cssText="z-index:100;position:absolute;left:0px; top:90px; width:20px; height:20px;display:block;background-image:url(assets/htmlimages/hotspot_correct_answer_normal.png);opacity:"+
(cp.movie.vdm.verbose?1:0.5);q.onclick=function(){cp.movie.vdm.verbose=!cp.movie.vdm.verbose;q.style.opacity=cp.movie.vdm.verbose?1:0.5};q.innerHTML="<font color='#000000' style='font-size:10px'>videoLogs</font>";document.body.appendChild(q);var r=cp.newElem("div");r.style.cssText="z-index:100;position:absolute;left:60px; top:90px; width:20px; height:20px;display:block;background-image:url(assets/htmlimages/arrow_right.gif);opacity:"+(cp.movie.vdm.viewVideo?1:0.5);r.onclick=function(){cp.movie.vdm.viewVideo=
!cp.movie.vdm.viewVideo;r.style.opacity=cp.movie.vdm.viewVideo?1:0.5;if(cp.movie.vdm.viewVideo){cp.movie.vdm.videoViews=[];if(cp.device==cp.IDEVICE||cp.device==cp.ANDROID){cp.movie.vdm.slideVideoChannel&&cp.movie.vdm.videoViews.push(new cp.VideoView(cp.movie.vdm.slideVideoChannel));cp.movie.vdm.tocVideoChannel&&cp.movie.vdm.videoViews.push(new cp.VideoView(cp.movie.vdm.tocVideoChannel))}else{cp.movie.vdm.slideVideoChannel0&&cp.movie.vdm.videoViews.push(new cp.VideoView(cp.movie.vdm.slideVideoChannel0));
cp.movie.vdm.slideVideoChannel1&&cp.movie.vdm.videoViews.push(new cp.VideoView(cp.movie.vdm.slideVideoChannel1));cp.movie.vdm.tocVideoChannel0&&cp.movie.vdm.videoViews.push(new cp.VideoView(cp.movie.vdm.tocVideoChannel0));cp.movie.vdm.tocVideoChannel1&&cp.movie.vdm.videoViews.push(new cp.VideoView(cp.movie.vdm.tocVideoChannel1))}for(var a=0;a<cp.movie.vdm.MAX_VIDEO_CHANNELS;++a){var b=cp.movie.vdm.videoChannels[a];cp.movie.vdm.videoViews.push(new cp.VideoView(b))}}else{for(a in cp.movie.vdm.videoViews){b=
cp.movie.vdm.videoViews[a];document.body.removeChild(b.view);--cp.MediaView.NUM_MEDIA_VIEWS}delete cp.movie.vdm.videoViews}};r.innerHTML="<font color='#000000' style='font-size:10px'>view</font>";document.body.appendChild(r);i=cp.newElem("div");i.style.cssText="z-index:100;position:absolute;left:120px; top:90px; width:20px; height:20px;display:block;background-image:url(assets/htmlimages/hotspot_correct_answer_normal.png);opacity:1";i.onclick=function(){cp.movie.vdm.resetAllWaitingVideos()};i.innerHTML=
"<font color='#000000' style='font-size:10px'>!Wait</font>";document.body.appendChild(i);var s=cp.newElem("div");s.style.cssText="z-index:100;position:absolute;left:0px; top:120px; width:20px; height:20px;display:block;background-image:url(assets/htmlimages/hotspot_incorrect_answer_normal.png);opacity:"+(cp.exceptionalLogs?1:0.5);s.onclick=function(){cp.exceptionalLogs=!cp.exceptionalLogs;s.style.opacity=cp.exceptionalLogs?1:0.5};s.innerHTML="<font color='#000000' style='font-size:10px'>ErrorExcpn</font>";
document.body.appendChild(s);var t=cp.newElem("div");t.style.cssText="z-index:100;position:absolute;left:0px; top:150px; width:20px; height:20px;display:block;background-image:url(assets/htmlimages/hotspot_correct_answer_normal.png);opacity:"+(cp.verbose?1:0.5);t.onclick=function(){cp.verbose=!cp.verbose;t.style.opacity=cp.verbose?1:0.5};t.innerHTML="<font color='#000000' style='font-size:10px'>verbose</font>";document.body.appendChild(t);var u=cp.newElem("div");u.style.cssText="z-index:100;position:absolute;left:0px; top:180px; width:20px; height:20px;display:block;background-image:url(assets/htmlimages/hotspot_correct_answer_normal.png);opacity:"+
(cp.disablePaceMaker?0.5:1);u.onclick=function(){cp.disablePaceMaker=!cp.disablePaceMaker;u.style.opacity=cp.disablePaceMaker?0.5:1};u.innerHTML="<font color='#000000' style='font-size:10px'>PaceMaker</font>";document.body.appendChild(u);var v=cp.newElem("div");v.style.cssText="z-index:100;position:absolute;left:0px; top:210px; width:20px; height:20px;display:block;background-image:url(assets/htmlimages/hotspot_correct_answer_normal.png);opacity:"+(cp.movie.ms.verbose?1:0.5);v.onclick=function(){cp.movie.ms.verbose=
!cp.movie.ms.verbose;v.style.opacity=cp.movie.ms.verbose?1:0.5};v.innerHTML="<font color='#000000' style='font-size:10px'>seekLogs</font>";document.body.appendChild(v);if(cp.device!=cp.IDEVICE){var w=cp.newElem("div");w.style.cssText="z-index:100;position:absolute;left:0px; top:240px; width:20px; height:20px;display:block;background-image:url(assets/htmlimages/hotspot_correct_answer_normal.png);opacity:"+(cp.device==cp.IDEVICE?0.5:1);w.onclick=function(){if(cp.origDevice){cp.device=cp.origDevice;
delete cp.origDevice}else{cp.origDevice=cp.device;cp.device=cp.IDEVICE}w.style.opacity=cp.device==cp.IDEVICE?0.5:1};w.innerHTML="<font color='#000000' style='font-size:10px'>emulateiDevice</font>";document.body.appendChild(w)}var x=cp.newElem("div");x.style.cssText="z-index:100;position:absolute;left:0px; top:270px; width:20px; height:20px;display:block;background-image:url(assets/htmlimages/hotspot_correct_answer_normal.png);opacity:"+(cp.customConsole?0.5:1);x.onclick=function(){if(cp.customConsole){document.body.removeChild(cp.customConsole);
delete cp.customConsole}else{cp.customConsole=cp.newElem("textarea");cp.customConsole.style.cssText="z-index:100;position:absolute;left:0px; top:300px; width:300px; height:100px;display:block;";cp.customConsole.readonly=true;document.body.appendChild(cp.customConsole);cp.log("navigator.userAgent = "+navigator.userAgent);cp.log("browser = "+cp.browser);cp.log("browserVersion = "+cp.browserVersion);cp.log("device = "+cp.device);if(cp.device==cp.IDEVICE){cp.log("device flavor = "+cp.deviceFlavor);cp.log("IOS Version = "+
cp.IOSMajor+"_"+cp.IOSMinor+"_"+cp.IOSBuild)}}x.style.opacity=cp.customConsole?0.5:1};x.innerHTML="<font color='#000000' style='font-size:10px'>customConsole</font>";document.body.appendChild(x)}this.m_gestureHandler&&this.m_gestureHandler.addCPEventListeners()};cp.CPPostInit=function(){cp.initObjectFactory();cp.loadedModules.playbar&&cp.setPlaybarCallback(cp.movie);cp.loadedModules.toc&&cp.setTOCCallback(cp.movie,cp.em);typeof cptb!="undefined"&&cptb.PostInit();cp.adjustWindow();setTimeout("window.scrollTo(0,0);",
500);cp.movie.startTimer();window.onorientationchange=window.onresize=cp.adjustWindow;if(cp.responsive&&cp.responsiveType!=cp.kCPPMEVR&&!cp.IsRunningInRoboHelp&&cp.parentWindow&&cp.parentWindow.createSliders)if(cp.responsiveType==cp.kCPPMEAutoResponsive){var a=cp.D.project.w;if(window.innerWidth<a+20)a=window.innerWidth;cp.parentWindow.createSliders([a],cp.getCurrentSlideResponsiveHeight(cp.D.project_main.cBW),cp.D.project_main.cBW)}else cp.parentWindow.createSliders(cp.D.project.upperBoundWidth,
cp.getCurrentSlideResponsiveHeight(cp.D.project_main.cBW),cp.D.project_main.cBW);var b=cp.m_isPreview&&!cp.m_isEdgeInspectPreview&&cp.responsive;window.addEventListener("message",function(a){if(b){if(window.location.origin!=a.origin)return;if(a.data=="cpgetGeoVarsInfo"){var c=cp.vm.getGeoVarsInfo();a.source.postMessage("cpfakeGeo"+JSON.stringify({geoVarsInfo:c,geoValues:y(c),title:cp.D.geoProps.geoEmul,dfltLoc:cp.D.geoProps.geoNone}),a.origin);return}if(a.data.substr(0,9)=="cpfakeGeo"){cpInfoGeoLocation=
a.data.substr(9);return}if(a.data=="cpindexInited")return}(a=JSON.parse(a.data))&&a.hasOwnProperty("cpParentRequestToRelaxBrowserCheck")&&(a.cpParentRequestToRelaxBrowserCheck==true?cp.vm.setVariableValue("cpInfoParentRequestToRelaxBrowserCheck",true):cp.vm.setVariableValue("cpInfoParentRequestToRelaxBrowserCheck",false))},false);if(b&&cp.responsiveType!=cp.kCPPMEVR&&window.parent&&window.parent.postMessage&&!((cp.MSIE==cp.browser||cp.FIREFOX==cp.browser)&&window.location.protocol=="file:")){if(!window.location.origin)window.location.origin=
window.location.protocol+"//"+window.location.hostname+(window.location.port?":"+window.location.port:"");window.parent.postMessage("cpindexInited",window.location.origin)}}})();
window.cpAPIInterface=void 0;window.cpAPIEventEmitter=void 0;cp.EventEmitterClass=function(){this.callbackFns={}};cp.EventEmitterClass.prototype.getGenericEventName=function(a){a=a.replace(/^CP/,"");a=a.replace(/Event$/,"");return a.toUpperCase()};
cp.EventEmitterClass.prototype.addEventListener=function(a,b,c){void 0==a&&(a="Default");var d=[];c&&""!=c?(void 0==this.callbackFns[a]&&(this.callbackFns[a]={}),void 0==this.callbackFns[a][c]&&(this.callbackFns[a][c]=[]),d=this.callbackFns[a][c]):(void 0==this.callbackFns[a]&&(this.callbackFns[a]=[]),d=this.callbackFns[a]);0>d.indexOf(b)&&d.push(b)};
cp.EventEmitterClass.prototype.removeEventListener=function(a,b,c){void 0==a&&(a="Default");var d=[];if(c&&""!=c){if(void 0==this.callbackFns[a]||void 0==this.callbackFns[a][c])return;d=this.callbackFns[a][c]}else{if(void 0==this.callbackFns[a])return;d=this.callbackFns[a]}a=d.indexOf(b);-1<a&&d.splice(a,1)};
cp.EventEmitterClass.prototype.trigger=function(a){if(a){a.Name="CPAPI_"+this.getGenericEventName(a.cpName);var b=this.callbackFns[a.Name];if("CPAPI_VARIABLEVALUECHANGED"==a.Name){if(!b)return;b=b[a.Data.varName]}if(b)for(var c=0;c<b.length;c++)b[c](a)}};cp.ACAPEventEmitterClass=function(){cp.ACAPEventEmitterClass.baseConstructor.call(this)};cp.inherits(cp.ACAPEventEmitterClass,cp.EventEmitterClass);
cp.ACAPEventEmitterClass.prototype.addEventListener=function(a,b){cp.__isUserCustomJS?cp.ACAPEventEmitterClass.superClass.addEventListener.call(this,a,b):cp.ACAPEventEmitterClass.superClass.addEventListener.call(this,b,a)};cp.ACAPEventEmitterClass.prototype.removeEventListener=function(a,b){cp.__isUserCustomJS?cp.ACAPEventEmitterClass.superClass.removeEventListener.call(this,a,b):cp.ACAPEventEmitterClass.superClass.removeEventListener.call(this,b,a)};
cp.ACAPEventEmitterClass.prototype.trigger=function(a){cp.ACAPEventEmitterClass.superClass.trigger.call(this,a);a.Name="CAPI_"+this.getGenericEventName(a.cpName);var b=this.callbackFns.Default;if(b)for(var c=0;c<b.length;c++)b[c](a)};cp.ACAPEventEmitterClass.prototype.getEvent=function(a,b,c){b=document.createEvent("Events");b.initEvent("getData",!0,!0,null);b.data=a;b.get=c;for(a=0;a<this.callbackFns.length;a++)this.callbackFns[a](event)};cp.CPAPIInterfaceClass=function(){this.m_eventEmitter=void 0};
cp.CPAPIInterfaceClass.prototype={canPlay:function(){return cp.isExpired||!cp.passwordAccepted?!1:!0},play:function(){this.canPlay()&&cp.movie.paused&&cp.playPause(!0)},pause:function(){cp.movie.paused||cp.playPause(!0)},rewind:function(){cp.rewind()},next:function(){cp.goToNextSlide()},previous:function(){cp.goToPreviousSlide()},fastForward:function(){cp.fastForward()},getPlaySpeed:function(){return cpInfoFPS},getDurationInFrames:function(){return cpInfoFrameCount},getDurationInSeconds:function(){return this.getDurationInFrames()/
this.getPlaySpeed()},getVolume:function(){return cpCmndVolume},setVolume:function(a){cpCmndVolume=a},navigateToTime:function(a){a=a*cpInfoFPS/1E3;0<=a&&1>a&&(a=1);var b=cp.D.project_main.autoplay;cp.IsRunningInACAP&&!1===b&&!cp.ACAPMovieStarted?cp.ACAPPendingJumpToFrame=a:cp.movie.jumpToFrame(a)},gotoSlide:function(a){cpCmndGotoSlide=a},canNavigateToTime:function(a){a=a*cpInfoFPS/1E3;0<=a&&1>a&&(a=1);return cp.shouldMoveTo(a)},getCurrentFrame:function(){return cpInfoCurrentFrameAtLayerZero},getCurrentFrameAtTopMostLayer:function(){return cpInfoCurrentFrame},
getCurrentSlideIndex:function(){return cpInfoCurrentSlide},getEventEmitter:function(){void 0==this.m_eventEmitter&&(this.m_eventEmitter=cp.IsRunningInACAP?new cp.ACAPEventEmitterClass:new cp.EventEmitterClass);return this.m_eventEmitter},getVariableValue:function(a){return window[a]},setVariableValue:function(a,b){window[a]=b},close:function(){window.DoCPExit()},setAllowForceQuitContainer:function(a){cp.setAllowForceQuitContainer=a?!0:!1},isSWFOrHTMLContent:function(){return"html"},getCurrentDeviceMode:function(){return cp.ResponsiveProjWidth==
cp.responsiveWidths[0]?"mobile":cp.ResponsiveProjWidth==cp.responsiveWidths[1]?"tablet":"desktop"}};
cp.ACAPInterfaceClass=function(){this.ReportingCriteriaMap={};this.ReportingCriteriaMap.user_access=cp.ReportingOptionsEnum.access;this.ReportingCriteriaMap.quiz_only=cp.ReportingOptionsEnum.quiz_only;this.ReportingCriteriaMap.slideviews_only=cp.ReportingOptionsEnum.views_only;this.ReportingCriteriaMap.quiz_and_slideviews=cp.ReportingOptionsEnum.quiz_and_views;this.QuizCriteriaMap={};this.QuizCriteriaMap.quiz_passed=cp.QuizCriteriaEnum.QuizIsPassed;this.QuizCriteriaMap.quiz_attempted=cp.QuizCriteriaEnum.QuizIsAttempted;
this.QuizCriteriaMap.quizpassed_or_limitreached=cp.QuizCriteriaEnum.QuizIsPassedOrAttempLimitReached;cp.ACAPTOCVisibility=!1;cp.ACAPMovieStarted=!1};cp.inherits(cp.ACAPInterfaceClass,cp.CPAPIInterfaceClass);cp.ACAPInterfaceClass.prototype.controlVisibility=function(a,b){"playbar"==a?cp.D.playBarProperties.hasPlayBar="function"==typeof cp.playBarInit?b:!1:"toc"==a?(cp.D.project.hasTOC=b?1:0,cp.ACAPTOCVisibility=b):"cc"==a&&(cp.D.playBarProperties.hasCC=b)};
cp.ACAPInterfaceClass.prototype.navigateToItem=function(a){cp.movie.jumpToFrame(cp.D[a].from)};cp.ACAPInterfaceClass.prototype.canNavigateToItem=function(a){return cp.shouldMoveTo(cp.D[a].from)};cp.ACAPInterfaceClass.prototype.enterReviewMode=function(){setCpInfoCurrentFrame(0)};cp.ACAPInterfaceClass.prototype.prepareForACAPRender=function(){this.controlVisibility("playbar",!1);this.controlVisibility("cc",!1);this.controlVisibility("toc",!1)};
cp.ACAPInterfaceClass.prototype.stop=function(){cpCmndRewindAndStop=!0};cp.ACAPInterfaceClass.prototype.showTOC=function(a){a?this.setVariableValue("cpCmndTOCVisible",1):this.setVariableValue("cpCmndTOCVisible",0)};
cp.ACAPInterfaceClass.prototype.setReportingOptions=function(a,b){this.completionCriteria=this.ReportingCriteriaMap[b.criteriaChosen];this.quizCriteriaForCompletion=this.QuizCriteriaMap[b.quizCriteria];this.slideViewsForCompletion=b.slideviewsValue;this.slideViewsTypeForCompletion=cp.SlideViewsTypeEnum.percent;b.isPercentageSlideviews||(this.slideViewsTypeForCompletion=cp.SlideViewsTypeEnum.number);this.successCriteria=this.ReportingCriteriaMap[a.criteriaChosen];this.quizCriteriaForSuccess=this.QuizCriteriaMap[a.quizCriteria];
this.slideViewsForSuccess=a.slideviewsValue;this.slideViewsTypeForSuccess=cp.SlideViewsTypeEnum.percent;a.isPercentageSlideviews||(this.slideViewsTypeForSuccess=cp.SlideViewsTypeEnum.number)};cp.ConnectInterfaceClass=function(){};cp.inherits(cp.ConnectInterfaceClass,cp.CPAPIInterfaceClass);cp.ConnectInterfaceClass.prototype.goToScrubPosition=function(a){a=a*cpInfoFPS/1E3;0<=a&&1>a&&(a=1);var b=cp.movie.stage.currentSlide,c=b.from,b=b.to;a<c?cp.movie.jumpToFrame(c):a>b?cp.movie.jumpToFrame(b):cp.movie.jumpToFrame(a)};
cp.ConnectInterfaceClass.prototype.setAllowForceQuitContainer=function(a){cp.setAllowForceQuitContainer=a?!0:!1};cp.ConnectInterfaceClass.prototype.close=function(){window.DoCPExit()};
cp.ConnectInterfaceClass.prototype.showUI=function(a,b){if("playbar"==a)return b?(this.setVariableValue("cpCmndShowPlaybar",1),cp.disableInteractions=!1):(this.setVariableValue("cpCmndShowPlaybar",0),cp.disableInteractions=!0),!0;if("closeButton"==a){if(!1==cpCmndShowPlaybar)return!1;for(var c=cp.PB.rootObj.firstRowArray,d,e=0;e<c.length;e++)c[e].iconName==cp.PB.Btns.kBtnExit&&(d=c[e]);if(void 0==d)return!1;b?(d.currDiv.style.display="block",cp.PB.hideExitButton=!1,cp.adjustSkins&&cp.adjustSkins()):
(d.currDiv.style.display="none",cp.PB.hideExitButton=!0)}return!1};
(function(a){a.Feedback=function(d,c,b,e,f){this.lastFrame=this.startFrame=this.currentFrame=0;this.itemName=d;this.endAction=c;this.parentSlide=a.movie.stage.currentSlide;this.element=document.getElementById(d);this.item=a.D[d];this.type=a.FeedbackType.OTHER;if(void 0!=e)switch(e){case a.FeedbackType.SUCCESS:case a.FeedbackType.FAILURE:case a.FeedbackType.HINT:this.type=e}this.actionObj=f;a.FeedbackType.SUCCESS==this.type&&this.actionObj&&(this.actionObj.actionInProgress=!0);this.item&&(this.transIn=
this.item.trin,this.effectObj=this.item.ef);this.transIn||(this.transIn=0);this.drawingBoard=null;this.element&&this.element.drawingBoard&&(this.element.drawingBoard.style.opacity=0,this.drawingBoard=this.element.drawingBoard);this.item&&(this.transOut=this.item.trout);this.transOut||(this.transOut=0);this.pause=b;this.onMouse=!1;this.item&&(this.item.to&&this.item.from)&&(this.lastFrame=this.item.to-this.item.from);this.item&&void 0!=this.item.du&&(this.lastFrame=this.item.du);this.createCSSAnimationRule()};
a.Feedback.prototype={update:function(){this.currentFrame++;this.currentFrame>this.lastFrame&&(a.movie.stage.RemoveFeedback(this),this.hide(),this.endAction&&a.movie.executeAction(this.endAction));if(this.effectObj){var d=this.effectObj["ef"+this.effectObj.id];if(d&&d.length)for(var c=0;c<d.length;++c){var b=d[c],e=this.currentFrame;if(b.sf-1>e||b.sf-1+b.du<=e)b.ci=-1;else{for(var f,e=e-(b.sf-1),g=0;g<b.kf.length-1;++g)if(b.kf[g].f<=e&&b.kf[g+1].f>e){b.ci=g;break}f=b.kf[b.ci];var i=b.io,l=b.fo,h=
b.kf[b.ci+1],j=e-f.f,k=0>b.ease?-b.ease/100+1:1-b.ease/200,g=f.x+(h.x-f.x)*Math.pow(j/(h.f-f.f),k);f=f.y+(h.y-f.y)*Math.pow(j/(h.f-f.f),k);b=(i+(l-i)*e/b.du)/100;b=0>b?0:b;b=1<b?1:b;this.element.style.left=this.element.bounds.minX+g+"px";this.element.style.top=this.element.bounds.minY+f+"px";this.element.drawingBoard&&(this.element.drawingBoard.style.left=this.element.drawingBoard.bounds.minX+g+"px",this.element.drawingBoard.style.top=this.element.drawingBoard.bounds.minY+f+"px",this.element.drawingBoard.style.opacity=
b+"")}}}if(this.drawingBoard)if(d=a.canUseWebkitAnimations()&&a.FeedbackType.HINT!=this.type,c=this.currentFrame,b=this.lastFrame-this.currentFrame,c<this.transIn)d||(this.drawingBoard.style.opacity=a.device!=a.DESKTOP?1:c/this.transIn);else if(d||(this.drawingBoard.style.opacity=a.device!=a.DESKTOP?1:c>this.lastFrame-this.transOut?b/this.transOut:1),this.onMouse)this.currentFrame=this.lastFrame-this.transOut-1},onRollover:function(){this.onMouse=!0;this.currentFrame=0;this.show()},onRollout:function(){this.onMouse=
!1;this.currentFrame=this.lastFrame-this.transOut},createCSSAnimationRule:function(){function d(){var a=document.styleSheets[0];if(a&&!a.cssRules)return!1;for(var c=0;c<a.cssRules.length;++c)if(a.cssRules[c].type==window.CSSRule.WEBKIT_KEYFRAMES_RULE&&a.cssRules[c].name==b)return!0;return!1}var c=a.D[this.itemName];if(c&&a.canUseWebkitAnimations()&&a.FeedbackType.HINT!=this.type){var b=this.itemName+"_rule";if(d())a.verbose&&a.log("rule exists");else{var e="";if(0!=c.trin&&void 0!=c.trin)var f=Math.round(1E4*
c.trin/c.du)/100,e=e+(" { 0% { opacity:0; } "+f+"% { opacity:1; } ");else e+=" { 0% { opacity:1; } ";0!=c.trout&&void 0!=c.trout?(c=Math.round(1E4*(c.du-c.trout)/c.du)/100,e+=" "+c+"% { opacity:1; } 100% { opacity:0; } }"):e+=" 100% { opacity:1; } }";c=document.styleSheets[0];a.verbose&&a.log(b+", "+e);c.insertRule("@-webkit-keyframes "+b+e)}this.webkitAnimationRule=b}},show:function(){var d=a.D[this.itemName];if(d&&(this.drawingBoard&&(a.canUseWebkitAnimations()&&a.FeedbackType.HINT!=this.type?
(a.verbose&&a.log("Using Webkit animation"),this.drawingBoard.style.webkitAnimationName=this.webkitAnimationRule,this.drawingBoard.style.webkitAnimationDuration=d.du/a.movie.fps+"s"):this.drawingBoard.style.opacity=a.device!=a.DESKTOP?1:0),void 0!=this.parentSlide&&this.parentSlide==a.movie.stage.currentSlide)){this.pause&&!a.movie.paused&&a.movie.pause(a.ReasonForPause.FEEDBACK_ITEM);var c=a.FeedbackCloseReason.OTHER;switch(this.type){case a.FeedbackType.SUCCESS:c=a.FeedbackCloseReason.SHOW_SUCCESS;
break;case a.FeedbackType.FAILURE:c=a.FeedbackCloseReason.SHOW_FAILURE;break;case a.FeedbackType.HINT:c=a.FeedbackCloseReason.SHOW_HINT}a.movie.stage.RemoveFeedbacks(c);a.movie.stage.AddFeedback(this);a.moveDivElemToTop(this.element);d=document.getElementById(d.mdi);void 0!=d&&a.moveRewrapElemToTop(d.parentNode);a.show(this.itemName)}},hide:function(){a.FeedbackType.SUCCESS==this.type&&this.actionObj&&(this.actionObj.actionInProgress=!1);a.hide(this.itemName);this.drawingBoard&&(this.drawingBoard.style.opacity=
1)},canHide:function(d){return a.FeedbackType.HINT==this.type||a.FeedbackType.OTHER==this.type||a.FeedbackCloseReason.SLIDE_CHANGE==d||a.FeedbackCloseReason.OTHER==d?!0:a.FeedbackCloseReason.SHOW_HINT==d||a.FeedbackType.SUCCESS==this.type?!1:!0}}})(window.cp);
(function(a){a.Line=function(i,p){a.Line.baseConstructor.call(this,i);this.baseItemBoundingRect=null;var d=this.currentState;if(void 0!=this._parentObj){this._canvasObj=a.D[this._parentObj.mdi];if(this._parentObj.hasOwnProperty("stc")&&d<this._parentObj.stc.length&&0<=d){var b=a.D[this._parentObj.stc[d]];b&&(this._canvasObj=a.D[b.mdi])}this.prevCanvasObj=this._canvasObj}this._visible=this.getAttribute("visible");this._data=a.D[this.element.id];this._parentDivName=this.getAttribute("dn");this.actualParent=
b=document.getElementById(this.parentDivName);this.canvasID=i.id;this._canvasObj=a.D[this.canvasID];var j=this.data.b;this._bounds={minX:j[0],minY:j[1],maxX:j[2],maxY:j[3]};j=this.data.vb;this._vbounds={minX:j[0],minY:j[1],maxX:j[2],maxY:j[3],width:j[2]-j[0],height:j[3]-j[1]};b&&(b.drawingBoard=this.element.parentElement,b.bounds=this.bounds,b.drawingBoard.bounds=this.vbounds);this.args=p;this.isDrawn=!1;this._sh=this.getAttribute("sh");this._re=this.getAttribute("re");a.responsive&&(this._responsiveCSS=
this.getAttribute("css"));!1==this.cloneOfBaseStateItem&&-1!=this.baseStateItemID&&(this.playEffectsOnStart=!0);a.setInitialVisibility(this);if(this._data.hasOwnProperty("stc")){b=this._data.stc;for(j=0;j<b.length;++j)j!=d&&a._hideData(b[j])}};a.inherits(a.Line,a.DisplayObject);Object.defineProperties(a.Line.prototype,{canvasObj:{get:function(){return this._canvasObj},set:function(i){this.prevCanvasObj=this._canvasObj;this._data=this._canvasObj=i;this.prevCanvasObj.dn!==this._canvasObj.dn&&(this._tr=
this._re=this._sh=this._vbounds=this._bounds=this._responsiveCSS=null,this.isDrawn=!1,i=this.canvasSwitchReason,this.drawIfNeeded(!0,i?i:a.ReasonForDrawing.kItemStateChanged))}},data:{get:function(){return this._canvasObj},set:function(a){this._data=a}},bounds:{get:function(){if(this._vbounds){var a=this.canvasObj.b;this._vbounds={minX:a[0],minY:a[1],maxX:a[2],maxY:a[3]}}return this._vbounds},set:function(a){this._bounds=a}},vbounds:{get:function(){if(!this._vbounds){var a=this.canvasObj.vb;a&&(this._vbounds=
{minX:a[0],minY:a[1],maxX:a[2],maxY:a[3]})}return this._vbounds},set:function(a){this._vbounds=a}},tr:{get:function(){this._tr||(this._tr=this.canvasObj.tr);return this._tr},set:function(a){this._tr=a}},sh:{get:function(){this._sh||(this._sh=this.canvasObj.sh);return this._sh},set:function(a){this._sh=a}},re:{get:function(){this._re||(this._re=this.canvasObj.re);return this._re},set:function(a){this._re=a}},responsiveCSS:{get:function(){this._responsiveCSS||(this._responsiveCSS=this.canvasObj.css);
return this._responsiveCSS},set:function(a){this._responsiveCSS=a}},parentDivName:{get:function(){return this._parentDivName},set:function(a){this._parentDivName=a}}});a.Line.prototype.start=function(a,p){this.drawIfNeeded(a,p);if(!this.effectIsStarted||a)this.areDimensionsCalculated=!1,this.updateEffects(this.hasEffect),this.effectIsStarted=!0};a.Line.prototype.reset=function(){delete a.ropMap[this.element.id];this.isDrawn=!1;this.element.width="0";this.element.height="0";this.element.style.width=
"0px";this.element.style.height="0px";this.element.left="0";this.element.top="0";this.element.style.left="0px";this.element.style.top="0px";this.effectIsStarted=!1};a.Line.prototype.getLinkOffsets=function(i,p,d){void 0===p&&(p=!1);void 0===d&&(d=a.ReasonForDrawing.kRegularDraw);var b={l:0,t:0,r:0,b:0,hOff:{}};b.hOff.offset=0;b.hOff.poleVal={init:0,curr:0};b.vOff={};b.vOff.offset=0;b.vOff.poleVal={init:0,curr:0};var j=a.GetBoundingClientRectForElem(a("div_Slide"),p),m=a("project").clientWidth,e=a("project").clientHeight,
f=!1,k=!1,g=void 0,q=void 0;if(i.lhID||i.lvID)g=a.getDisplayObjByCP_UID(i.lhID),q=i.lhID==i.lvID?g:a.getDisplayObjByCP_UID(i.lvID),g&&(f=g.isStarted&&g.isDrawnComplete),q&&(k=q.isStarted&&q.isDrawnComplete);if(f&&-1!=i.lhID){var c=g.actualParent;if(c){var l=a.GetBoundingClientRectForBaseItem(g,p,d),f=l?l:a.GetBoundingClientRectForElem(c,p);!l&&c.tr&&(l=g.actualParent.style.transform||g.actualParent.style.msTransform||g.actualParent.style.MozTransform||g.actualParent.style.WebkitTransform||g.actualParent.style.OTransform,
a.applyTransform(g.actualParent,""),f=a.GetBoundingClientRectForElem(c,p),a.applyTransform(g.actualParent,l));if(f&&(c=i.lhV,-1!=c.indexOf("H%")?(c=c.split("H%")[0],c=a.getRoundedValue(c*e/100)+"px"):-1!=c.indexOf("%")&&(c=c.split("%")[0],c=a.getRoundedValue(c*m/100)+"px"),f=f[a.rLinkEdges[i.lhEID]],f-=j.left,b.hOff.poleVal.curr=f,"auto"!=i.l&&""!=i.l&&(b.hOff.offset=parseFloat(c)),"auto"!=i.r&&""!=i.r))b.hOff.offset=-parseFloat(c);g=a.createTempElemAndGetBoundingRect(g.currentCSS,void 0,!1);b.hOff.poleVal.init=
g[a.rLinkEdges[i.lhEID]]-j.left}}else b.hOff=void 0;if(k&&-1!=i.lvID){if(c=q.actualParent){f=(l=a.GetBoundingClientRectForBaseItem(q,p,d))?l:a.GetBoundingClientRectForElem(c,p);!l&&c.tr&&(l=q.actualParent.style.transform||q.actualParent.style.msTransform||q.actualParent.style.MozTransform||q.actualParent.style.WebkitTransform||q.actualParent.style.OTransform,a.applyTransform(q.actualParent,""),f=a.GetBoundingClientRectForElem(c,p),a.applyTransform(q.actualParent,l));if(f&&(c=i.lvV,-1!=c.indexOf("H%")?
(c=c.split("H%")[0],c=a.getRoundedValue(c*m/100)+"px"):-1!=c.indexOf("%")&&(c=c.split("%")[0],c=a.getRoundedValue(c*e/100)+"px"),f=f[a.rLinkEdges[i.lvEID]],f-=j.top,b.vOff.poleVal.curr=f,"auto"!=i.t&&""!=i.t&&(b.vOff.offset=parseFloat(c)),"auto"!=i.b&&""!=i.b))b.vOff.offset=-parseFloat(c);g=a.createTempElemAndGetBoundingRect(q.currentCSS,void 0,!1);b.vOff.poleVal.init=g[a.rLinkEdges[i.lvEID]]-j.top}}else b.vOff=void 0;return b};a.Line.prototype.drawForResponsive=function(i,p){if(!this.responsiveCSS)return!1;
if(this.isDrawn&&!i)return a.initializeVisibilityForGroupedItem(this),!0;if(!this.data)return!1;var d=a.getResponsiveCSS(this.responsiveCSS);a.getCSSFromLayouter(d,this);var b=!1,b=this.sh&&!this.sh.i,j=void 0!=this.tr;if(this.isDrawn&&this.currentCSS==d&&!b&&!j&&(!i||p==a.ReasonForDrawing.kMoviePaused))return!0;this.currentCSS=d;this.parentDivName=b=this.getAttribute("dn");var m=d,e=p===a.ReasonForDrawing.kItemStateChanged||p===a.ReasonForDrawing.kGettingBoundingRectInBaseState||p===a.ReasonForDrawing.kLinkedToItemAppeared,
f=this.getLinkOffsets(d,e,p),b=this.actualParent.style.transform||this.actualParent.style.msTransform||this.actualParent.style.MozTransform||this.actualParent.style.WebkitTransform||this.actualParent.style.OTransform,j=this.element.parentElement.style.transform||this.element.parentElement.style.msTransform||this.element.parentElement.style.MozTransform||this.element.parentElement.style.WebkitTransform||this.element.parentElement.style.OTransform;a.applyTransform(this.actualParent,"");a.applyTransform(this.element.parentElement,
"");a.applyResponsiveStyles(this.element.parentElement,m,!0,e,void 0,p);a.applyResponsiveStyles(this.actualParent,d,!0,e,void 0,p);var k=a.GetBoundingClientRectForElem(a.movie.stage.mainSlideDiv,e);this.parentElementClientBoundingRect=a.GetBoundingClientRectForElem(this.element.parentElement,e);var g=this.parentElementClientBoundingRect.left-k.left,q=this.parentElementClientBoundingRect.top-k.top;this.actualParentClientBoundingRect=a.GetBoundingClientRectForElem(this.actualParent,e);var c=this.actualParent,
l=0,s=0,e=a("div_Slide").clientWidth,k=a("div_Slide").clientHeight,l=e>this.element.parentElement.clientWidth?e:this.element.parentElement.clientWidth,s=k>this.element.parentElement.clientHeight?k:this.element.parentElement.clientHeight,m=a.createResponsiveStyleObj(d,void 0,"0px","0px","0px","0px",l+"px",s+"px",void 0),m=this.canvas=a.createResponsiveCanvas(m,l,s,this.element);this.element.style.marginLeft=-g+"px";this.element.style.marginTop=-q+"px";this.element.parentElement.style.webkitBoxReflect=
this.re?"below "+this.re.d+"px -webkit-gradient(linear, left top, left bottom, from(transparent), color-stop("+(1-this.re.s/100)+", transparent), to(rgba(255, 255, 255, "+(1-this.re.p/100)+")))":"unset";a.movie.stage.addToParentChildMap(c.id,this.element.id);this.element.originalParent=c;g=m.gc;g.clearRect(0,0,this.element.getBoundingClientRect().width,this.element.getBoundingClientRect().height);a.DESKTOP==a.device&&(a.MSIE==a.browser||a.MSEDGE==a.browser||a.FIREFOX==a.browser)&&g.beginPath();g.save();
this.sh&&!this.sh.i&&(g.shadowOffsetX=this.sh.d*Math.cos(Math.PI*this.sh.a/180),g.shadowOffsetY=this.sh.d*Math.sin(Math.PI*this.sh.a/180),g.shadowBlur=this.sh.b,g.shadowColor=a.ConvertRGBToRGBA(this.sh.c,this.sh.o));var n=d.l,o=d.t,c=d.w,l=d.h,s=a.getResponsiveCSS(this.data);if(-1!=c.indexOf("H%"))var h=c.split("H%")[0],c=a.getRoundedValue(h*k/100);else-1!=c.indexOf("%")?(h=c.split("%")[0],c=a.getRoundedValue(h*e/100)):c=c.split("px")[0];-1!=l.indexOf("H%")?(h=l.split("H%")[0],l=a.getRoundedValue(h*
e/100)):-1!=l.indexOf("%")?(h=l.split("%")[0],l=a.getRoundedValue(h*k/100)):l=l.split("px")[0];c=parseFloat(c);l=parseFloat(l);m=d.cah;q=d.cav;m?n=(e-c)/2:"auto"!=d.l?-1!=n.indexOf("H%")?(h=n.split("H%")[0],n=a.getRoundedValue(h*k/100)):-1!=n.indexOf("%")?(h=n.split("%")[0],n=a.getRoundedValue(h*e/100)):n=n.split("px")[0]:(n=d.r,-1!=n.indexOf("H%")?(h=n.split("H%")[0],n=a.getRoundedValue(h*k/100)):-1!=n.indexOf("%")?(h=n.split("%")[0],n=a.getRoundedValue(h*e/100)):n=n.split("px")[0],n=parseFloat(n),
n=e-(n+c));q?o=(k-l)/2:"auto"!=d.t?-1!=o.indexOf("H%")?(h=o.split("H%")[0],o=a.getRoundedValue(h*e/100)):-1!=o.indexOf("%")?(h=o.split("%")[0],o=a.getRoundedValue(h*k/100)):o=o.split("px")[0]:(o=d.b,-1!=o.indexOf("H%")?(h=o.split("H%")[0],o=a.getRoundedValue(h*e/100)):-1!=o.indexOf("%")?(h=o.split("%")[0],o=a.getRoundedValue(h*k/100)):o=o.split("px")[0],o=parseFloat(o),o=k-(o+l));var n=parseFloat(n),o=parseFloat(o),r=h=k=e=0;"false"!=s.rpX1IsLeft?(e=n,k=n+c):(e=n+c,k=n);"false"!=s.rpY1IsTop?(h=o,
r=o+l):(h=o+l,r=o);c=lRightPoint=lTopPoint=lBottomPoint=0;e>k?(c=k,lRightPoint=e):(c=e,lRightPoint=k);h>r?(lTopPoint=r,lBottomPoint=h):(lTopPoint=h,lBottomPoint=r);f.hOff&&!m&&(m=0,""!=d.l&&"auto"!=d.l?(m=c,c=f.hOff.poleVal.curr+f.hOff.offset,lRightPoint+=c-m):""!=d.r&&"auto"!=d.r&&(m=lRightPoint,lRightPoint=f.hOff.poleVal.curr+f.hOff.offset,c+=lRightPoint-m));f.vOff&&!q&&(q=0,""!=d.t&&"auto"!=d.t?(q=lTopPoint,lTopPoint=f.vOff.poleVal.curr+f.vOff.offset,lBottomPoint+=lTopPoint-q):""!=d.b&&"auto"!=
d.b&&(q=lBottomPoint,lBottomPoint=f.vOff.poleVal.curr+f.vOff.offset,lTopPoint+=lBottomPoint-q));e>k?(k=c,e=lRightPoint):(e=c,k=lRightPoint);h>r?(r=lTopPoint,h=lBottomPoint):(h=lTopPoint,r=lBottomPoint);d=this.canvasObj.sw;5>d&&(d=5);g.lineWidth=this.canvasObj.sw;g.strokeStyle=this.canvasObj.sc;g.moveTo(e,h);0==this.canvasObj.ss?g.lineTo(k,r):a.drawDashedLine(g,e,h,k,r,this.canvasObj.ss);g.stroke();a.drawLineCapStyle(g,e,h,k,r,this.canvasObj.sc,d,this.canvasObj.sst,0);a.drawLineCapStyle(g,e,h,k,r,
this.canvasObj.sc,d,this.canvasObj.est,1);g.restore();a.applyTransform(this.actualParent,b);a.applyTransform(this.element.parentElement,j);this.isDrawn=!0;this.drawComplete(p);a.isVisible(this)?a._show(this.parentDivName):a._hide(this.parentDivName);a.isVisible(this)&&this.playEffectsOnStart&&(b=this.parentDivName,(d=a.D[b].selfAnimationScript)&&eval(d),this.playEffectsOnStart=!1);return!0};a.Line.prototype.drawIfNeeded=function(i,p){if((!a.responsive||!this.drawForResponsive(i,p))&&!this.isDrawn){var d=
this.bounds,b=this.vbounds,j=this.canvasObj.sw;5>j&&(j=5);var m=d.minX,e=d.minY,f=d.maxX-d.minX,k=d.maxY-d.minY,d=this.actualParent;d.style.left=m+"px";d.style.top=e+"px";d.style.width=f+"px";d.style.height=k+"px";m=0<b.minX?0:b.minX;e=0<b.minY?0:b.minY;k=a.D.project.h>b.maxY?a.D.project.h:b.maxY;f=(a.D.project.w>b.maxX?a.D.project.w:b.maxX)-m;b=this.canvas=a.createCanvas(0,0,f,k-e,this.element);this.element.style.display="block";this.element.style.position="absolute";this.element.parentElement.style.left=
this.vbounds.minX+"px";this.element.parentElement.style.top=this.vbounds.minY+"px";this.element.parentElement.style.width=this.vbounds.maxX-this.vbounds.minX+"px";this.element.parentElement.style.height=this.vbounds.maxY-this.vbounds.minY+"px";this.element.style.marginLeft=m-this.vbounds.minX+"px";this.element.style.marginTop=e-this.vbounds.minY+"px";this.element.parentElement.style.webkitBoxReflect=this.re?"below "+this.re.d+"px -webkit-gradient(linear, left top, left bottom, from(transparent), color-stop("+
(1-this.re.s/100)+", transparent), to(rgba(255, 255, 255, "+(1-this.re.p/100)+")))":"unset";a.movie.stage.addToParentChildMap(d.id,this.element.id);this.element.originalParent=d;b=b.gc;b.save();b.translate(0>m?-m:0,0>e?-e:0);this.sh&&!this.sh.i&&(b.shadowOffsetX=this.sh.d*Math.cos(Math.PI*this.sh.a/180),b.shadowOffsetY=this.sh.d*Math.sin(Math.PI*this.sh.a/180),b.shadowBlur=this.sh.b,b.shadowColor=a.ConvertRGBToRGBA(this.sh.c,this.sh.o));m=this.canvasObj.x1;e=this.canvasObj.y1;f=this.canvasObj.x2;
d=this.canvasObj.y2;b.lineWidth=this.canvasObj.sw;b.strokeStyle=this.canvasObj.sc;b.moveTo(m,e);0==this.canvasObj.ss?b.lineTo(f,d):a.drawDashedLine(b,m,e,f,d,this.canvasObj.ss);b.stroke();a.drawLineCapStyle(b,m,e,f,d,this.canvasObj.sc,j,this.canvasObj.sst,0);a.drawLineCapStyle(b,m,e,f,d,this.canvasObj.sc,j,this.canvasObj.est,1);b.restore();this.isDrawn=!0;a.isVisible(this)?a._show(this.parentDivName):a._hide(this.parentDivName);a.isVisible(this)&&this.playEffectsOnStart&&((j=a.D[this.parentDivName].selfAnimationScript)&&
eval(j),this.playEffectsOnStart=!1)}}})(window.cp);
(function(a){a.DrawingItem=function(g,d,c){function e(a){k.changeStateOnMouseEvents&&k.changeStateOnMouseEvents("mouseover",a)}function j(a){k.changeStateOnMouseEvents&&k.changeStateOnMouseEvents("mouseout",a)}function l(a){k.changeStateOnMouseEvents&&k.changeStateOnMouseEvents("mousedown",a)}function i(a){k.changeStateOnMouseEvents&&k.changeStateOnMouseEvents("mouseup",a)}function f(a,c,g,d){return function(e){if(!(k.parentObj&&void 0!=k.parentObj.enabled)||k.parentObj.enabled)d&&d(),g&&k.mouseState==
a||(k.mouseState=a,c(e))}}var k=this;this.mouseState=a.mouseStateOut;a.DrawingItem.baseConstructor.call(this,g);this.baseItemBoundingRect=null;this.visible=this.getAttribute("visible");this.parentId=a.D[d].dn;this._parentObj=a.D[this.parentId];this._canvasObj=null;void 0!=this._parentObj&&(this._canvasObj=a.D[this._parentObj.mdi]);this.parentDivName=this.getAttribute("dn");this.actualParent=d=document.getElementById(this.parentDivName);g=this.currentState;if(void 0!=this._parentObj){if(this._parentObj.hasOwnProperty("stc")&&
g<this._parentObj.stc.length&&0<=g){var m=a.D[this._parentObj.stc[g]];m&&(this._canvasObj=a.D[m.mdi])}this.prevCanvasObj=this._canvasObj}this._parentObj=a.D[this._canvasObj.dn];this._transIn=this._parentObj.trin;this._canvasObj&&(this.type=this._canvasObj.t,m=this._canvasObj.b,this._bounds={minX:m[0],minY:m[1],maxX:m[2],maxY:m[3],width:m[2]-m[0],height:m[3]-m[1]},this.args=c,c=this.canvasObj.vb,this._vbounds={minX:c[0],minY:c[1],maxX:c[2],maxY:c[3],width:c[2]-c[0],height:c[3]-c[1]},this._sh=this._canvasObj.sh,
this._re=this._canvasObj.re,this._tr=this._canvasObj.tr,this._currImage=this._canvasObj.ip);d&&(d.drawingBoard=this.element.parentElement,d.bounds=this._bounds,d.drawingBoard.bounds=this._vbounds);this._parentObj&&a.doesSupportStates(this._parentObj.type)&&d&&(a.device==a.IDEVICE||a.device==a.ANDROID?(d.ontouchstart=f(a.mouseStateTouchStart,l),d.ontouchend=f(a.mouseStateTouchEnd,i)):(d.onmouseover=f(a.mouseStateOver,e,!1,d.onmouseover),d.onmouseout=f(a.mouseStateOut,j,!1,d.onmouseout),d.onmousedown=
f(a.mouseStateDown,l),d.onmouseup=f(a.mouseStateUp,i)));this.shouldShowRollOver=!0;this.isDrawn=!1;a.responsive&&(this._responsiveCSS=this.getAttribute("css"));!1==this.cloneOfBaseStateItem&&-1!=this.baseStateItemID&&(this.playEffectsOnStart=!0);a.setInitialVisibility(this);if(this._parentObj.hasOwnProperty("stc")){c=this._parentObj.stc;for(d=0;d<c.length;++d)d!=g&&a._hideData(c[d])}};a.inherits(a.DrawingItem,a.DisplayObject);Object.defineProperties(a.DrawingItem.prototype,{canvasObj:{get:function(){return this._canvasObj},
set:function(g){this.prevCanvasObj=this._canvasObj;this._canvasObj=g;this.prevCanvasObj.dn!==this._canvasObj.dn&&(this._parentObj=this._tr=this._re=this._sh=this._vbounds=this._bounds=this._responsiveCSS=null,this.isDrawn=!1,g=this.canvasSwitchReason,this.drawIfNeeded(!0,g?g:a.ReasonForDrawing.kItemStateChanged),a.responsive||a.updateVarText(this.actualParent,!0,!0))}},parentObj:{get:function(){this._parentObj||(this._parentObj=a.D[this.canvasObj.dn]);return this._parentObj},set:function(a){this._parentObj=
a}},transIn:{get:function(){this._transIn||(this._transIn=a.D[this.canvasObj.dn].trin);return this._transIn},set:function(a){this._transIn=a}},currImage:{get:function(){this._currImage||(this._currImage=this.canvasObj.ip);return this._currImage},set:function(a){this._currImage=a}},bounds:{get:function(){if(!this._bounds){var a=this.canvasObj.b;this._bounds={minX:a[0],minY:a[1],maxX:a[2],maxY:a[3],width:a[2]-a[0],height:a[3]-a[1]}}return this._bounds},set:function(a){this._bounds=a}},vbounds:{get:function(){if(!this._vbounds){var a=
this.canvasObj.vb;this._vbounds={minX:a[0],minY:a[1],maxX:a[2],maxY:a[3],width:a[2]-a[0],height:a[3]-a[1]}}return this._vbounds},set:function(a){this._vbounds=a}},sh:{get:function(){this._sh||(this._sh=this.canvasObj.sh);return this._sh},set:function(a){this._sh=a}},re:{get:function(){this._re||(this._re=this.canvasObj.re);return this._re},set:function(a){this._re=a}},tr:{get:function(){this._tr||(this._tr=this.canvasObj.tr);return this._tr},set:function(a){this._tr=a}},responsiveCSS:{get:function(){this._responsiveCSS||
(this._responsiveCSS=this.canvasObj.css);return this._responsiveCSS},set:function(a){this._responsiveCSS=a}}});a.DrawingItem.prototype.start=function(a,d){this.drawIfNeeded(a,d);if(!this.effectIsStarted||a)this.areDimensionsCalculated=!1,this.updateEffects(this.hasEffect),this.effectIsStarted=!0};a.DrawingItem.prototype.reset=function(){delete a.ropMap[this.element.id];this.isDrawn=!1;this.element.width="0";this.element.height="0";this.element.style.width="0px";this.element.style.height="0px";this.element.left=
"0";this.element.top="0";this.element.style.left="0px";this.element.style.top="0px";this.effectIsStarted=!1};a.DrawingItem.prototype.drawForResponsive=function(g,d){if(!this.responsiveCSS)return!1;if(this.isDrawn&&!g)return a.initializeVisibilityForGroupedItem(this),!0;var c=a.getResponsiveCSS(this.responsiveCSS);a.getCSSFromLayouter(c,this);var e=!1,e=this.sh&&!this.sh.i;if(!this.isDrawn||!(this.currentCSS==c&&g&&d==a.ReasonForDrawing.kMoviePaused)){var j=d===a.ReasonForDrawing.kItemStateChanged||
d===a.ReasonForDrawing.kGettingBoundingRectInBaseState||d===a.ReasonForDrawing.kLinkedToItemAppeared;this.currentCSS=c;if(this.canvasObj&&this.type){var l=this.canvasObj,i=this.parentObj,f=c,k=this.actualParent.style.transform||this.actualParent.style.msTransform||this.actualParent.style.MozTransform||this.actualParent.style.WebkitTransform||this.actualParent.style.OTransform,m=this.element.parentElement.style.transform||this.element.parentElement.style.msTransform||this.element.parentElement.style.MozTransform||
this.element.parentElement.style.WebkitTransform||this.element.parentElement.style.OTransform;a.applyTransform(this.actualParent,"");a.applyTransform(this.element.parentElement,"");a.applyResponsiveStyles(this.actualParent,c,!0,j,void 0,d);if(i.rpvt&&i.autoGrow&&(d==a.ReasonForDrawing.kTextGrow||d==a.ReasonForDrawing.kMouseEvent)){var p=i.minItemHeight;if(!p){p=i.variableText;void 0==p&&(p=i.rpvt[a.ResponsiveProjWidth].vt);var o=this.actualParent.clientWidth,q=i.offsets;q&&(o-=q[0]+q[2]);o-=(i.rplm?
i.rplm[a.ResponsiveProjWidth]:0)+(i.rprm?i.rprm[a.ResponsiveProjWidth]:0);p=a.createTempTextElemAndGetBoundingRect(o,i,p,j).height}this.actualParent.clientHeight<p&&(this.actualParent.style.height=p+"px");a.createResponsiveStyleObj(c,c.p,c.l,c.t,c.r,c.b,this.actualParent.clientWidth+"px",this.actualParent.clientHeight+"px",c.crop)}this.actualParent.offsetHeight=this.actualParent.offsetHeight;this.actualParentClientBoundingRect=a.GetBoundingClientRectForElem(this.actualParent,j);q=a.GetBoundingClientRectForElem(a.movie.stage.getSlideDiv(),
j);this.HFactor=this.WFactor=1;this.WFactor=parseInt(100*this.actualParent.clientWidth/this.bounds.width)/100;this.HFactor=parseInt(100*this.actualParent.clientHeight/this.bounds.height)/100;p=0;this.tr&&(p=a.getAngleFromRotateStr(this.tr));if(!this.m_centrePoint||d==a.ReasonForDrawing.kOrientationChangeOrResize||d==a.ReasonForDrawing.kLinkedToItemAppeared)this.m_centrePoint=a.getCenterForRotation(this.actualParent);o=a.getBoundsForRotatedItem1(this.actualParentClientBoundingRect.left-q.left,this.actualParentClientBoundingRect.top-
q.top,this.actualParentClientBoundingRect.width,this.actualParentClientBoundingRect.height,this.m_centrePoint,p,this.strokeWidth);f=t=r=b=void 0;"auto"!=c.l&&(f=o.l);"auto"!=c.t&&(t=o.t);"auto"!=c.r&&(r=o.r);"auto"!=c.b&&(b=o.b);f=a.createResponsiveStyleObj(c,c.p,f,t,r,b,o.w,o.h,c.crop);a.applyResponsiveStyles(this.element.parentElement,f);this.parentElementClientBoundingRect=a.GetBoundingClientRectForElem(this.element.parentElement,j);o=j=0;this.m_centrePoint&&(j=this.m_centrePoint.X-(this.actualParentClientBoundingRect.left-
q.left),o=this.m_centrePoint.Y-(this.actualParentClientBoundingRect.top-q.top));if(i.rpvt){var f=this.actualParent.id+"_vTxtHandlerHolder",n=a(f);n||(n=a.newElem("div"),n.id=f,n.style.display="block",n.style.position="absolute",n.style.width=this.actualParent.clientWidth+"px",n.style.height=this.actualParent.clientHeight+"px",n.style.visibility="hidden",this.actualParent.appendChild(n));n.style.left="0px";n.style.top="0px";n.style.width=this.actualParent.clientWidth+"px";n.style.height=this.actualParent.clientHeight+
"px";n=this.actualParent.id+"_vTxtHolder";f=a(n);f||(f=a.newElem("div"),f.id=n,f.style.display="block",f.style.position="absolute",this.element.parentElement.appendChild(f),f.style.width=this.actualParent.clientWidth+"px",f.style.height=this.actualParent.clientHeight+"px");a.applyTransform(f,"rotate(0)");n=this.actualParentClientBoundingRect.top-this.parentElementClientBoundingRect.top+this.actualParent.clientHeight/2;f.style.left=this.actualParentClientBoundingRect.left-this.parentElementClientBoundingRect.left+
this.actualParent.clientWidth/2-this.actualParent.clientWidth/2+"px";f.style.top=n-this.actualParent.clientHeight/2+"px";f.style.width=this.actualParent.clientWidth+"px";f.style.height=this.actualParent.clientHeight+"px";(d==a.ReasonForDrawing.kOrientationChangeOrResize||d==a.ReasonForDrawing.kItemStateChanged)&&a.updateVarText(this.actualParent,!0,!0);this.tr?(f.style.left=(this.element.parentElement.clientWidth-f.clientWidth)/2+"px",f.style.top=(this.element.parentElement.clientHeight-f.clientHeight)/
2+"px",n="center center",f.style["-ms-transform-origin"]=n,f.style["-moz-transform-origin"]=n,f.style["-webkit-transform-origin"]=n,f.style["-o-transform-origin"]=n,f.style["transform-origin"]=n,a.applyTransform(f,this.tr)):a.applyTransform(f,"none")}a.applyTransform(this.actualParent,k);a.applyTransform(this.element.parentElement,m);var m=this.actualParent,s=k=0;e?(k=a("div_Slide").clientWidth,s=a("div_Slide").clientHeight):(k=this.element.parentElement.clientWidth,s=this.element.parentElement.clientHeight);
f=a.createResponsiveStyleObj(c,void 0,"0px","0px","0px","0px",k+"px",s+"px",void 0);n=this.parentElementClientBoundingRect.left-q.left;q=this.parentElementClientBoundingRect.top-q.top;f=this.canvas=a.createResponsiveCanvas(f,k,s,this.element);this.isParentOfTypeSlide||(e?(this.element.style.marginLeft=(0>n?1:-1)*n+"px",this.element.style.marginTop=(0>q?1:-1)*q+"px"):(this.element.style.marginLeft="0px",this.element.style.marginTop="0px"));this.element.parentElement.style.webkitBoxReflect=this.re?
"below "+this.re.d+"px -webkit-gradient(linear, left top, left bottom, from(transparent), color-stop("+(1-this.re.s/100)+", transparent), to(rgba(255, 255, 255, "+(1-this.re.p/100)+")))":"unset";a.movie.stage.addToParentChildMap(m.id,this.element.id);this.element.originalParent=m;k=f.gc;k.crop=c.crop?c.crop:void 0;k.save();e&&(k.setTransform(1,0,0,1,0>n?-n:0,0>q?-q:0),k.translate(n,q),k.shadowOffsetX=this.sh.d*Math.cos(Math.PI*this.sh.a/180),k.shadowOffsetY=this.sh.d*Math.sin(Math.PI*this.sh.a/180),
k.shadowBlur=this.sh.b,c=this.sh.o,1==c&&(c=0.999),k.shadowColor=a.ConvertRGBToRGBA(this.sh.c,c));this.element.style.display="block";this.element.style.position="absolute";k=f.gc;k.save();this.tr?(n=j?100*j/m.clientWidth+"%":"center",n+=" ",n=o?n+(100*o/m.clientHeight+"%"):n+"center",m.style["-ms-transform-origin"]=n,m.style["-moz-transform-origin"]=n,m.style["-webkit-transform-origin"]=n,m.style["-o-transform-origin"]=n,m.style["transform-origin"]=n,a.applyTransform(m,this.tr),m.tr=this.tr):(m.tr=
void 0,a.applyTransform(m,"none"));m.rotateAngle=p;c=this.element.parentElement.clientWidth/2;e=this.element.parentElement.clientHeight/2;c=this.actualParentClientBoundingRect.left-this.parentElementClientBoundingRect.left+j;e=this.actualParentClientBoundingRect.top-this.parentElementClientBoundingRect.top+o;k.translate(c,e);0!=p?k.rotate(Math.PI*p/180):k.rotate(0.02*Math.PI/180);k.translate(-j,-o);c=0;void 0!=l.ss&&(c=l.ss);if((l=this.draw(k,c))&&void 0!=this.normalImage)(c=a.movie.im.images[this.normalImage])&&
c.nativeImage.complete?(this.sh&&!this.sh.i&&(k.shadowOffsetX=0,k.shadowOffsetY=0,k.shadowBlur=0,k.shadowColor="rgba(0,0,0,0)"),k.drawImage(c.nativeImage,-c.nativeImage.width/2,-c.nativeImage.height/2,c.nativeImage.width,c.nativeImage.height)):l=!1;k.restore();this.transIn&&d==a.ReasonForDrawing.kRegularDraw&&(this.element.parentElement.style.opacity=0);a.handleQuizzingItemsInReviewMode(this.element,i,this.parentDivName);this.isDrawn=l;!0==this.isDrawn&&this.drawComplete(d);a.isVisible(this)?a._show(this.parentDivName):
a._hide(this.parentDivName);a.isVisible(this)&&this.playEffectsOnStart&&((i=this.parentObj.selfAnimationScript)&&eval(i),this.playEffectsOnStart=!1);return!0}}};a.DrawingItem.prototype.drawIfNeeded=function(g,d){if((!a.responsive||!this.drawForResponsive(g,d))&&!this.isDrawn&&this.canvasObj&&this.type&&this.canvasObj.b){this.HFactor=this.WFactor=1;var c=this.bounds,e=this.vbounds,j=this.parentObj,l=c.minX,i=c.minY,f=c.maxX-c.minX,k=c.maxY-c.minY,m=this.actualParent;m.style.left=l+"px";m.style.top=
i+"px";m.style.width=f+"px";m.style.height=k+"px";var k=!1,k=this.re||this.sh&&!this.sh.i,l=0<e.minX&&k?0:e.minX,i=0<e.minY&&k?0:e.minY,p=k&&a.D.project.h>e.maxY?a.D.project.h:e.maxY,f=(k&&a.D.project.w>e.maxX?a.D.project.w:e.maxX)-l,f=this.canvas=a.createCanvas(0,0,f,p-i,this.element);this.element.style.display="block";this.element.style.position="absolute";this.element.parentElement.style.left=this.vbounds.minX+"px";this.element.parentElement.style.top=this.vbounds.minY+"px";this.element.parentElement.style.width=
this.vbounds.maxX-this.vbounds.minX+"px";this.element.parentElement.style.height=this.vbounds.maxY-this.vbounds.minY+"px";this.element.style.marginLeft=l-this.vbounds.minX+"px";this.element.style.marginTop=i-this.vbounds.minY+"px";this.element.parentElement.style.webkitBoxReflect=this.re?"below "+this.re.d+"px -webkit-gradient(linear, left top, left bottom, from(transparent), color-stop("+(1-this.re.s/100)+", transparent), to(rgba(255, 255, 255, "+(1-this.re.p/100)+")))":"unset";a.movie.stage.addToParentChildMap(m.id,
this.element.id);this.element.originalParent=m;e=f.gc;e.save();k?e.setTransform(1,0,0,1,0>l?-l:0,0>i?-i:0):e.translate(-this.vbounds.minX,-this.vbounds.minY);this.sh&&!this.sh.i&&(e.shadowOffsetX=this.sh.d*Math.cos(Math.PI*this.sh.a/180),e.shadowOffsetY=this.sh.d*Math.sin(Math.PI*this.sh.a/180),e.shadowBlur=this.sh.b,e.shadowColor=a.ConvertRGBToRGBA(this.sh.c,this.sh.o));this.element.style.display="block";this.element.style.position="absolute";e=f.gc;e.save();l=0;this.tr&&(l=a.getAngleFromRotateStr(this.tr));
m.rotateAngle=l;if(this.sh||0!=l)e.translate((c.minX+c.maxX)/2,(c.minY+c.maxY)/2),0!=l?e.rotate(Math.PI*l/180):e.rotate(0.02*Math.PI/180),e.translate(-(c.minX+c.maxX)/2,-(c.minY+c.maxY)/2);m=0;void 0!=this.canvasObj.ss&&(m=this.canvasObj.ss);if((m=this.draw(e,m))&&void 0!=this.currImage)(l=a.movie.im.images[this.currImage])&&l.nativeImage.complete?(e.translate((c.minX+c.maxX)/2,(c.minY+c.maxY)/2),e.drawImage(l.nativeImage,-l.nativeImage.width/2,-l.nativeImage.height/2,l.nativeImage.width,l.nativeImage.height)):
m=!1;a.handleQuizzingItemsInReviewMode(this.element,j,this.parentDivName);e.restore();this.transIn&&(this.element.parentElement.style.opacity=0);this.isDrawn=m;!0==this.isDrawn&&this.drawComplete(d);a.isVisible(this)&&this.playEffectsOnStart&&((c=this.parentObj.selfAnimationScript)&&eval(c),this.playEffectsOnStart=!1)}};a.DrawingItem.prototype.draw=function(g,d){switch(this.type){case a.kCPOTOvalItem:this.drawOval(g,0);break;case a.kCPOTAnswerArea:case a.kCPOTMatchingQuestionArea:case a.kCPOTMatchingAnswerArea:case a.kCPOTStageQuestionText:case a.kCPOTStageQuestionTitle:case a.kCPOTRectangleItem:case a.kCPOTLikertQuestionArea:case a.kCPOTLikertTotalGroupArea:case a.kCPOTScorableButtonItem:case a.kCPOTTextEntryButtonItem:case a.kCPOTRetakeButton:case a.kCPOTStageQuestionNextButton:case a.kCPOTStageQuestionClearButton:case a.kCPOTStageQuestionBackButton:case a.kCPOTStageQuestionReviewModeNextButton:case a.kCPOTStageQuestionReviewModeBackButton:case a.kCPOTStageQuestionSubmitButton:case a.kCPOTScoringReviewButton:case a.kCPOTScoringContinueButton:case a.kCPOTSubmitAllButton:case a.kCPOTResetButton:case a.kCPOTUndoButton:case a.kCPOTDDSubmitButton:this.drawRectangle(g,
0);break;case a.kCPOTPolygon:this.drawPolygon(g,0);break;default:return!0}var c=1;void 0!=this.canvasObj.fa&&(c=this.canvasObj.fa/100);var e=g.globalAlpha;g.globalAlpha=c;a.responsive&&a.D[this.parentDivName].shouldShowDisabledState&&(g.globalAlpha=0.5);c=this.setFill(g);g.globalAlpha=e;if(0!=d&&0<this.canvasObj.sw)switch(this.type){case a.kCPOTOvalItem:this.drawOval(g,d);break;case a.kCPOTAnswerArea:case a.kCPOTMatchingQuestionArea:case a.kCPOTMatchingAnswerArea:case a.kCPOTStageQuestionText:case a.kCPOTStageQuestionTitle:case a.kCPOTRectangleItem:case a.kCPOTLikertQuestionArea:case a.kCPOTLikertTotalGroupArea:case a.kCPOTScorableButtonItem:case a.kCPOTTextEntryButtonItem:case a.kCPOTRetakeButton:case a.kCPOTStageQuestionNextButton:case a.kCPOTStageQuestionClearButton:case a.kCPOTStageQuestionBackButton:case a.kCPOTStageQuestionReviewModeNextButton:case a.kCPOTStageQuestionReviewModeBackButton:case a.kCPOTStageQuestionSubmitButton:case a.kCPOTScoringReviewButton:case a.kCPOTScoringContinueButton:case a.kCPOTSubmitAllButton:case a.kCPOTResetButton:case a.kCPOTUndoButton:case a.kCPOTDDSubmitButton:this.drawRectangle(g,
d);break;case a.kCPOTPolygon:this.drawPolygon(g,d);break;default:return!0}0<this.canvasObj.sw&&(g.lineWidth=this.canvasObj.sw,g.strokeStyle=this.canvasObj.sc,g.stroke());return c};a.DrawingItem.prototype.getTranslationValuesForTiletype=function(){var g=this.canvasObj;if(g){var d=g.imgf;if(d){var c=d.img.tiletype,e=0,j=0,l=d.b[2]-d.b[0],i=d.b[3]-d.b[1],f=d.img.w,d=d.img.h;a.responsive&&(l=Math.floor(l*this.WFactor)+g.sw,i=Math.floor(i*this.HFactor)+g.sw);switch(c){case "t":e=(l-f)/2;break;case "tr":e=
l-f;break;case "l":j=(i-d)/2;break;case "c":e=(l-f)/2;j=(i-d)/2;break;case "r":e=l-imageWidthimageWidth;j=(i-d)/2;break;case "bl":j=i-d;break;case "b":e=(l-f)/2;j=i-d;break;case "br":e=l-f,j=i-d}0<e&&(e=e%f-f);0<j&&(j=j%d-d);a.responsive||(e+=g.b[0],j+=g.b[1]);return{x:e,y:j}}}};a.DrawingItem.prototype.setFill=function(g){var d=null,c="",c=null,e=[],j=0,l=0,i=0,f=1,c=c=null,i=!0,k=0,m=0,e=k=1,p=m=!1,o=g.canvas;if(0==o.width||0==o.height)return!0;if(this.canvasObj.gf){if(c=a.getGradientFill(this.canvasObj.gf,
g))g.fillStyle=c}else if(this.canvasObj.imgf){i=!1;d=this.canvasObj.imgf;if(void 0==d.img||void 0==d.img.ip)return!1;c=d.img.ip;if((c=a.movie.im.images[c])&&c.nativeImage.complete){i=d.s;if(f=d.t)d=this.getTranslationValuesForTiletype(),m=!0,g.translate(d.x,d.y),c=g.createPattern(c.nativeImage,"repeat"),g.fillStyle=c;else if(i)void 0!=this.canvasObj.b&&4==this.canvasObj.b.length&&(e=this.canvasObj.b,k=e[2]-e[0],h=e[3]-e[1],a.responsive&&(k*=this.WFactor,h*=this.HFactor),k/=d.img.w,e=h/d.img.h,g.scale(k,
e),c=g.createPattern(c.nativeImage,"no-repeat"),g.fillStyle=c);else{i=document.createElement("canvas");f=i.getContext("2d");o=g.canvas;i.left=o.left;i.right=o.right;i.top=o.top;i.bottom=o.bottom;i.width=o.width;i.height=o.height;var o=c.nativeImage.width,q=c.nativeImage.height,j=d.b[2]-d.b[0],l=d.b[3]-d.b[1];a.responsive?(j=Math.floor(j*this.WFactor)+this.canvasObj.sw,l=Math.floor(l*this.HFactor)+this.canvasObj.sw,j=-(o-j)/2,l=-(q-l)/2,f.translate(j,l)):(m=(l-imageHeight)/2,f.translate((j-o)/2,m),
j=this.canvasObj.b[0],l=this.canvasObj.b[1],m=!0,g.translate(j,l));d=f.globalAlpha;f.globalAlpha=0;f.fillStyle="#FFFFFF";f.fill();f.globalAlpha=d;c=f.createPattern(c.nativeImage,"no-repeat");f.fillStyle=c;f.fillRect(0,0,o,q);c=g.createPattern(i,"no-repeat");g.fillStyle=c}i=!0}}else this.canvasObj.bc?g.fillStyle=this.canvasObj.bc:this.currImage&&(p=!0,i=!1);i&&g.fill();(1!=k||1!=e)&&g.scale(1/k,1/e);m&&g.translate(-j,-l);return i||p};a.DrawingItem.prototype.drawRectangle=function(g,d){var c=0,e=[],
j=0,l=0,i=0,f=i=0,k=0,e=0;void 0==this.canvasObj.b||4!=this.canvasObj.b.length||((e=this.canvasObj.b,j=e[2]-e[0],l=e[3]-e[1],i=j,l<j&&(i=l),void 0!=this.canvasObj.cr&&(c=this.canvasObj.cr,c=i*c/100),i=e[0],f=e[1],k=e[2],e=e[3],a.responsive&&(k=Math.round(this.WFactor*(k-i)),e=Math.round(this.HFactor*(e-f)),i=Math.round(this.WFactor*(i-i)),f=Math.round(this.HFactor*(f-f)),l=e-f,j=k-i),0!=d)?a.drawDashedRectangle(g,i,f,j,l,c,d):(g.beginPath(),a.moveTo(g,i,e-c,d),a.lineTo(g,i,f+c,d),0<c&&a.bezierCurveTo(g,
i,f+c,i,f,i+c,f,d),a.lineTo(g,i+c,f,d),a.lineTo(g,k-c,f,d),0<c&&a.bezierCurveTo(g,k-c,f,k,f,k,f+c,d),a.lineTo(g,k,f+c,d),a.lineTo(g,k,e-c,d),0<c&&a.bezierCurveTo(g,k,e-c,k,e,k-c,e,d),a.lineTo(g,k-c,e,d),a.lineTo(g,i+c,e,d),0<c&&a.bezierCurveTo(g,i+c,e,i,e,i,e-c,d),g.closePath()))};a.DrawingItem.prototype.drawOval=function(g,d){var c=[],e=c=0,j=0,l=0,i=0,f=0,k=0,m=0;void 0==this.canvasObj.b||4!=this.canvasObj.b.length||((c=this.canvasObj.b,j=c[0],l=c[1],i=c[2],f=c[3],a.responsive&&(j*=this.WFactor,
l*=this.HFactor,i*=this.WFactor,f*=this.HFactor),c=(i-j)/2,e=(f-l)/2,k=0.55285*c,m=0.55285*e,0!=d)?a.drawDashedOval(g,(j+i)/2,(l+f)/2,c,e,d):(g.beginPath(),a.moveTo(g,i,l+e,d),a.bezierCurveTo(g,i,l+e+m,j+c+k,f,j+c,f,d),a.bezierCurveTo(g,j+c-k,f,j,l+e+m,j,l+e,d),a.bezierCurveTo(g,j,l+e-m,j+c-k,l,j+c,l,d),a.bezierCurveTo(g,j+c+k,l,i,l+e-m,i,l+e,d),g.closePath()))};a.DrawingItem.prototype.drawPolygon=function(g,d){var c=null,e=this.canvasObj.pta,j=0;if(!(void 0==e||2>e.length))if(0!=d)a.drawDashedPolyLine(g,
e,d,this.WFactor,this.HFactor);else{g.beginPath();c=e[0];a.moveTo(g,this.WFactor*c.x,this.HFactor*c.y,d);for(j=1;j<e.length;++j)c=e[j],a.lineTo(g,this.WFactor*c.x,this.HFactor*c.y,d);g.closePath()}};a.DrawingItem.prototype.changeStateOnMouseEvents=function(g,d){var c=null;-1==this.baseStateItemID?c=this:this.cloneOfBaseStateItem&&(c=a.getDisplayObjByCP_UID(this.baseStateItemID));c&&void 0!==c.HandleMouseEventOnStateItems&&c.HandleMouseEventOnStateItems(g,this.parentStateType,d)};a.DrawingItem.prototype.HandleMouseEventOnStateItems=
function(g,d,c){var e=!1,j=a.D[this.parentDivName];j&&(e=a.isValidItemForStateOptimization({n:this.parentDivName,t:j.type}));if((e||this.parentStateType==a.kSTTNormal)&&(!(j&&void 0!=j.enabled)||j.enabled)){var j=a.kSTTNone,l="";if(0<=this.currentState&&this.currentState<this.states.length){var i=this.states[this.currentState];i&&(j=i.stt,l=i.stn)}i=!(a.device==a.IDEVICE||a.device==a.ANDROID)||"mouseup"!=g;if(!(!e&&i&&j!=d)){var d=!1,f="",k=!1;if("mouseover"==g){if((j==a.kSTTNormal||j==a.kSTTCustom||
j==a.kSTTVisited)&&this.shouldShowRollOver)if(d=!0,f=a.getLocalisedStateName("kCPRolloverState"),this.stateAtStartOfMouseEvents=l,a.BringBaseItemToFrontWithinState(this,a.getLocalisedStateName("kCPRolloverState")),a.device===a.DESKTOP&&(g=a.GetMouseOverManager())){var m=this;g.addMouseOverItem(this,function(){m.ForceMouseOut()})}}else if("mouseout"==g){if(j==a.kSTTRollOver||j==a.kSTTDown)d=!0,f=this.stateAtStartOfMouseEvents,a.device===a.DESKTOP&&(g=a.GetMouseOverManager())&&g.removeMouseOverItem(this);
if(j==a.kSTTNormal||j==a.kSTTCustom||j==a.kSTTVisited)a.browser==a.CHROME&&this.ignoreMouseOutEventOnNormal?this.ignoreMouseOutEventOnNormal=!1:this.shouldShowRollOver=!0}else if("mousedown"==g){if(j==a.kSTTNormal||j==a.kSTTRollOver||j==a.kSTTCustom||j==a.kSTTVisited)if(d=!0,f=a.getLocalisedStateName("kCPDownState"),this.bShouldListenForMouseUpOnDownState=!0,j==a.kSTTNormal||j==a.kSTTCustom||j==a.kSTTVisited)this.stateAtStartOfMouseEvents=l,this.ignoreMouseOutEventOnNormal=!0}else if("mouseup"==g&&
(!i||j==a.kSTTDown))d=!0,f=this.stateAtStartOfMouseEvents,this.shouldShowRollOver=!1,this.bShouldListenForMouseUpOnDownState&&(k=!0);d&&(f!==a.getLocalisedStateName("kCPRolloverState")&&a.ResetItemZIndicesWithinState(this,a.getLocalisedStateName("kCPRolloverState")),a.changeState(this.actualParent.id,f,!1));k&&!e&&(!a.IsGestureSupportedDevice()&&(a.shouldRelaxBrowserCheck(this.parentObj.type)||a.CHROME!=a.browser&&a.MSIE!=a.browser||a.m_isLMSPreview))&&a.dispatchClickEvent(this.actualParent,c,{asPartOfStateChange:!0})}}};
a.AnswerArea=function(g,d){a.AnswerArea.baseConstructor.call(this,g,d);this.canvasElem=this.element};a.inherits(a.AnswerArea,a.DrawingItem);a.RectWithText=function(g,d){a.RectWithText.baseConstructor.call(this,g,d);this.canvasElem=this.element;this.currImage=this.getAttribute("ip")};a.inherits(a.RectWithText,a.DrawingItem)})(window.cp);
cp.AutoShape=function(c,a,d){function f(a,c,d){e.AutoShapeState=2;e.changeStateOnMouseEvents&&e.changeStateOnMouseEvents("mousedown",d)}function i(a,d,c){e.AutoShapeState=0;e.changeStateOnMouseEvents&&e.changeStateOnMouseEvents("mouseup",c)}function g(a,c,d){i(a);e.parentData&&(e.parentData.dep&&0<e.parentData.dep.length)&&(cp.verbose&&cp.log("hiding hint"),e.hintVisible=!1,cp.hideHint(e.parentData.dep[0],a));e.changeStateOnMouseEvents&&e.changeStateOnMouseEvents("mouseout",d)}function j(a,d,c){e.AutoShapeState=
1;e.isDrawn=!1;e.setVBounds();e.changeStateOnMouseEvents&&e.changeStateOnMouseEvents("mouseover",c);(1==cp("div_Slide").scaleFactor||!cp.responsive)&&e.drawIfNeeded(!0,cp.ReasonForDrawing.kMouseEvent)}function l(a,c,d){c?(e.parentData&&e.parentData.handCursor&&(e.actualParent.style.cursor="pointer"),!e.hintVisible&&(e.parentData&&e.parentData.dep&&0<e.parentData.dep.length)&&(cp.verbose&&cp.log("showing hint"),e.hintVisible=!0,cp.showHint(e.parentData.dep[0],a)),0==e.AutoShapeState&&j(a,c,d)):(e.actualParent.style.cursor=
"default",e.parentData&&(e.parentData.dep&&0<e.parentData.dep.length)&&(cp.log("hiding hint"),e.hintVisible=!1,cp.hideHint(e.parentData.dep[0],a)),0!=e.AutoShapeState&&g(a,c,d))}function k(a,c,d,f){return function(a){if(void 0!=a&&!cp.disableInteractions){var g=a.type.toLowerCase(),i=0!=e.canvasObj.ss||e.is_inside_canvas(a);if("mousemove"!=g)e.clicked="mousedown"==a.type.toLowerCase();else{if(e.clicked||s.x==a.clientX&&s.y==a.clientY)return;s.x=a.clientX;s.y=a.clientY}if(("mousemove"==a.type.toLowerCase()||
"mousedown"==a.type.toLowerCase()||"mouseover"==a.type.toLowerCase()||"touch"==a.type.toLowerCase()||"touchstart"==a.type.toLowerCase())&&!i)d&&(cp.device==cp.DESKTOP&&"mousemove"==a.type.toLowerCase())&&d(c,i,a);else if(g=e,e.cloneOfBaseStateItem&&(g=cp.getDisplayObjByCP_UID(e.baseStateItemID)),!g||!(g.parentData&&void 0!=g.parentData.enabled)||g.parentData.enabled)f&&f(),d&&d(c,i,a)}}}var e=this;this.tMatrixMultiplyPoint=function(a,d,c){return[d*a[0]+c*a[2]+a[4],d*a[1]+c*a[3]+a[5]]};this.tInvertMatrix=
function(a){var d=1/(a[0]*a[3]-a[1]*a[2]);return[a[3]*d,-a[1]*d,-a[2]*d,a[0]*d,d*(a[2]*a[5]-a[3]*a[4]),d*(a[1]*a[4]-a[0]*a[5])]};this.is_inside_canvas=function(a,d){if(void 0==a)return!1;var c;if(!e.element)return!1;if((c=e.canvasObj)&&c.svg||c&&c.ss&&0!=c.ss)return!0;var g=c=void 0,f=void 0,i=void 0,j=void 0;if(d&&(e.sh&&!e.sh.i||e.re))(c=e.element.style.transform)&&(e.element.style.transform=""),(g=e.element.style.WebkitTransform)&&(e.element.style.WebkitTransform=""),(f=e.element.style.MozTransform)&&
(e.element.style.MozTransform=""),(i=e.element.style.msTransform)&&(e.element.style.msTransform=""),(j=e.element.style.OTransform)&&(e.element.style.OTransform="");var l=e.element.parentElement.getBoundingClientRect(),k=e.element.getBoundingClientRect();cp("div_Slide").getBoundingClientRect();var m=cp.getScaledPosition(getPageX(a),getPageY(a)),n=l.left-cp.movie.offset,q=l.top-cp.movie.topOffset,s=k.left-cp.movie.offset,v=k.top-cp.movie.topOffset,u=parseFloat(e.element.style.marginLeft),w=parseFloat(e.element.style.marginTop),
u=!isNaN(u)?u:0,w=!isNaN(w)?w:0,A=e.element.getContext("2d");if(A){if(cp.responsive)z=m.X-window.pageXOffset-k.left,k=m.Y-window.pageYOffset-k.top,z/=cp("div_Slide").scaleFactor,k/=cp("div_Slide").scaleFactor;else{var z=m.X-window.pageXOffset/cp.movie.m_scaleFactor-(0>u?s:n)/cp.movie.m_scaleFactor,k=m.Y-window.pageYOffset/cp.movie.m_scaleFactor-(0>w?v:q)/cp.movie.m_scaleFactor;cp.shouldScale&&(cp.loadedModules.toc&&(!cp.toc.movieProperties.tocProperties.overlay&&1==cp.toc.movieProperties.tocProperties.position)&&
(z+=cp.toc.movieProperties.tocProperties.width),cp.loadedModules.playbar&&!cp.PB.MP.PBP.overlay&&(0==cp.PB.MP.PBP.position?z+=cp.PB.playBarHeight:1==cp.PB.MP.PBP.position&&(k+=cp.PB.playBarHeight)));z*=parseFloat(e.element.parentElement.style.width)/l.width*cp.movie.m_scaleFactor;k*=parseFloat(e.element.parentElement.style.height)/l.height*cp.movie.m_scaleFactor;cp.verbose&&(cp.log("lParentOffsetL : "+n+","+q),cp.log("lElemL : "+s+","+v),cp.log("lElemMarginL : "+u+w),cp.log("X : "+z+","+k))}if(d&&
(e.sh&&!e.sh.i||e.re))c&&(e.element.style.transform=c),g&&(e.element.style.WebkitTransform=g),f&&(e.element.style.MozTransform=f),i&&(e.element.style.msTransform=i),j&&(e.element.style.OTransform=j);return c=A.isPointInPath(z,k)}return!1};this.setVBounds=function(){var a=e.canvasObj,c=0;a.sw>e.canvasObj.sw&&(c=a.sw-e.canvasObj.sw);cp.responsive&&(c=0);a=e.canvasObj.vbwr;e._wrvBounds={minX:a[0]-2*c,minY:a[1]-2*c,maxX:a[2]+2*c,maxY:a[3]+2*c,width:a[2]-a[0]+4*c,height:a[3]-a[1]+4*c};a=e.canvasObj.vb;
e._vbounds={minX:a[0]-2*c,minY:a[1]-2*c,maxX:a[2]+2*c,maxY:a[3]+2*c,width:a[2]-a[0]+4*c,height:a[3]-a[1]+4*c}};var s={};cp.AutoShape.baseConstructor.call(this,c);this.baseItemBoundingRect=null;this.visible=this.getAttribute("visible");this.parentId=cp.D[a].dn;this._parentObj=cp.D[this.parentId];this.prevCanvasObj=this._canvasObj=null;c=this.currentState;if(void 0!=this._parentObj){this._canvasObj=cp.D[this._parentObj.mdi];if(this._parentObj.hasOwnProperty("stc")&&(c<this._parentObj.stc.length&&0<=
c)&&(a=cp.D[this._parentObj.stc[c]]))this._canvasObj=cp.D[a.mdi];this.prevCanvasObj=this._canvasObj}this._transIn=this._parentObj.trin;this.parentDivName=this.getAttribute("dn");this._parentData=cp.D[this.parentDivName];this._parentData.isCanvasClicked=this.is_inside_canvas;this._parentData.canvasPainterObject=this;this.actualParent=a=document.getElementById(this.parentDivName);1!==this._parentData.uab&&cp.removeAccessibilityOutline(this.actualParent);if(this._canvasObj){var m=this._canvasObj.b;this._bounds=
{minX:m[0],minY:m[1],maxX:m[2],maxY:m[3],width:m[2]-m[0],height:m[3]-m[1]};this.args=d;this.setVBounds();this._sh=this._canvasObj.sh;this._re=this._canvasObj.re;this._tr=this._canvasObj.tr;this._normalImage=this._canvasObj.ip;this.prevState=this.AutoShapeState=0}a&&(a.drawingBoard=this.element.parentElement,a.bounds=this._bounds,a.drawingBoard.bounds=this._vbounds);if(a&&void 0!=this._parentData.pa&&this._bounds){-1!=this._parentData.pa&&this._parentData.immo&&(cp.movie.stage.currentSlide&&(this._parentData.pa=
cp.movie.stage.currentSlide.to-1),this.setAttribute("clickedOnce",!1));var q=this._bounds.maxX-this._bounds.minX,n=this._bounds.maxY-this._bounds.minY,m=d=1,u=0,w=0;10<q&&(d=(q-4)/q);10<n&&(m=(n-4)/n);if(1>d&&1>m){var u=!1,u=cp.responsive?this.sh&&!this.sh.i:this.sh&&!this.sh.i||this.re,v=(u&&cp.D.project.w>this._vbounds.maxX?cp.D.project.w:this._vbounds.maxX)-(0<this._vbounds.minX&&u?0:this._vbounds.minX),w=(u&&cp.D.project.h>this._vbounds.maxY?cp.D.project.h:this._vbounds.maxY)-(0<this._vbounds.minY&&
u?0:this._vbounds.minY),n=(this._vbounds.maxX+this._vbounds.minX)/2,q=(this._vbounds.maxY+this._vbounds.minY)/2,v=v/2-(v/2-n)*d,w=w/2-(w/2-q)*m;u?(u=v-n,w-=q):w=u=0;this.oldMouseOver=a.onmouseover;this.oldMouseOut=a.onmouseout;this.dataObjForMouseStates={sx:d,sy:m,tx:-u,ty:-w,p:a,old_tr:this.tr};d=window.event||Event;cp.device==cp.IDEVICE||cp.device==cp.ANDROID?(this.ontouchstartHandler=k(d,this.element,f),this.ontouchendHandler=k(d,this.element,i),a.ontouchstart=k(d,this.element,f),a.ontouchend=
k(d,this.element,i)):(a.onmouseover=k(d,this.element,j,a.onmouseover),a.onmousemove=k(d,this.element,l,a.onmousemove),a.onmouseout=k(d,this.element,g,a.onmouseout),a.onmousedown=k(d,this.element,f),a.onmouseup=k(d,this.element,i),this.onmouseoverHandler=a.onmouseover,this.onmousemoveHandler=a.onmousemove,this.onmouseoutHandler=a.onmouseout,this.onmousedownHandler=a.onmousedown,this.onmouseupHandler=a.onmouseup);this.shouldShowRollOver=!0;this.setUpClickHandler()}}this.isDrawn=!1;cp.responsive&&(this._responsiveCSS=
this._canvasObj.css);!1==this.cloneOfBaseStateItem&&-1!=this.baseStateItemID&&(this.playEffectsOnStart=!0);cp.setInitialVisibility(this);if(this._parentData.hasOwnProperty("stc")){a=this._parentData.stc;for(d=0;d<a.length;++d)d!=c&&cp._hideData(a[d])}};cp.inherits(cp.AutoShape,cp.DisplayObject);
Object.defineProperties(cp.AutoShape.prototype,{canvasObj:{get:function(){return this._canvasObj},set:function(c){this.prevCanvasObj=this._canvasObj;this._canvasObj=c;this.prevCanvasObj.dn!==this._canvasObj.dn&&(this._transIn=this._parentObj=this._normalImage=this._tr=this._re=this._sh=this._wrvBounds=this._vbounds=this._bounds=this._responsiveCSS=this._parentData=null,this.isDrawn=!1,c=this.canvasSwitchReason,this._canvasObj.visible=!0,this.drawIfNeeded(!0,c?c:cp.ReasonForDrawing.kItemStateChanged),
cp.updateVarText(this.actualParent,!0,!0))}},parentData:{get:function(){this._parentData||(this._parentData=cp.D[this.canvasObj.dn]);return this._parentData},set:function(c){this._parentData=c}},responsiveCSS:{get:function(){this._responsiveCSS||(this._responsiveCSS=this.canvasObj.css);return this._responsiveCSS},set:function(c){this._responsiveCSS=c}},bounds:{get:function(){if(!this._bounds){var c=this.canvasObj.b;this._bounds={minX:c[0],minY:c[1],maxX:c[2],maxY:c[3],width:c[2]-c[0],height:c[3]-
c[1]}}return this._bounds},set:function(c){this._bounds=c}},vbounds:{get:function(){if(!this._vbounds){var c=0;this.prevCanvasObj.sw>this.canvasObj.sw&&(c=this.prevCanvasObj.sw-this.canvasObj.sw);cp.responsive&&(c=0);var a=this.canvasObj.vb;this._vbounds={minX:a[0]-2*c,minY:a[1]-2*c,maxX:a[2]+2*c,maxY:a[3]+2*c,width:a[2]-a[0]+4*c,height:a[3]-a[1]+4*c}}return this._vbounds},set:function(c){this._vbounds=c}},wrvBounds:{get:function(){if(!this._wrvBounds){var c=0;this.prevCanvasObj.sw>this.canvasObj.sw&&
(c=this.prevCanvasObj.sw-this.canvasObj.sw);cp.responsive&&(c=0);var a=this.canvasObj.vbwr;this._wrvBounds={minX:a[0]-2*c,minY:a[1]-2*c,maxX:a[2]+2*c,maxY:a[3]+2*c,width:a[2]-a[0]+4*c,height:a[3]-a[1]+4*c}}return this._wrvBounds},set:function(c){this._wrvBounds=c}},sh:{get:function(){this._sh||(this._sh=this.canvasObj.sh);return this._sh},set:function(c){this._sh=c}},re:{get:function(){this._re||(this._re=this.canvasObj.re);return this._re},set:function(c){this._re=c}},tr:{get:function(){this._tr||
(this._tr=this.canvasObj.tr);return this._tr},set:function(c){this._tr=c}},normalImage:{get:function(){this._normalImage||(this._normalImage=this.canvasObj.ip);return this._normalImage},set:function(c){this._normalImage=c}},parentObj:{get:function(){this._parentObj||(this._parentObj=cp.D[this.canvasObj.dn]);return this._parentObj},set:function(c){this._parentObj=c}},transIn:{get:function(){this._transIn||(this._transIn=this.parentObj.trin);return this._transIn},set:function(c){this._transIn=c}}});
cp.AutoShape.prototype.start=function(c,a){this.drawIfNeeded(c,a);if(!this.effectIsStarted||c)this.areDimensionsCalculated=!1,this.updateEffects(this.hasEffect),this.effectIsStarted=!0};
cp.AutoShape.prototype.reset=function(){delete cp.ropMap[this.element.id];this.isDrawn=!1;this.element.width="0";this.element.height="0";this.element.style.width="0px";this.element.style.height="0px";this.element.left="0";this.element.top="0";this.element.style.left="0px";this.element.style.top="0px";this.removeMouseHandlers(!0);this.effectIsStarted=!1;this.parentData.canvasPainterObject=null;this.parentData.isCanvasClicked=null};
cp.AutoShape.prototype.getCurrentCanvasObj=function(){if(this.canvasObj&&this.canvasObj.b&&this.canvasObj.p0)return this.canvasObj};
cp.AutoShape.prototype.addMouseHandlers=function(){cp.device==cp.IDEVICE||cp.device==cp.ANDROID?(cp.registerGestureEvent(this.actualParent,cp.GESTURE_EVENT_TYPES.TOUCH,this.ontouchstartHandler),cp.registerGestureEvent(this.actualParent,cp.GESTURE_EVENT_TYPES.RELEASE,this.ontouchendHandler)):(this.actualParent.onmouseover=this.onmouseoverHandler,this.actualParent.onmousemove=this.onmousemoveHandler,this.actualParent.onmouseout=this.onmouseoutHandler,this.actualParent.onmousedown=this.onmousedownHandler,
this.actualParent.onmouseup=this.onmouseupHandler)};
cp.AutoShape.prototype.removeMouseHandlers=function(c){if(this.actualParent)if(this.actualParent.onclick=null,cp.device==cp.IDEVICE||cp.device==cp.ANDROID)cp.removeGestureEvent(this.actualParent,cp.GESTURE_EVENT_TYPES.TOUCH,this.ontouchstartHandler),cp.removeGestureEvent(this.actualParent,cp.GESTURE_EVENT_TYPES.RELEASE,this.ontouchendHandler),c&&(this.ontouchendHandler=this.ontouchstartHandler=null);else if(this.actualParent.onmouseout=null,this.actualParent.onmousedown=null,this.actualParent.onmouseup=
null,this.actualParent.onmouseover=null,this.oldMouseOver&&(this.actualParent.onmouseover=this.oldMouseOver),this.oldMouseOut)this.actualParent.onmouseout=this.oldMouseOut;c&&(this.oldMouseOut=this.oldMouseOver=null)};
cp.AutoShape.prototype.setUpClickHandler=function(){var c=this,a=!1,d=!1,a=!1,f=cp.movie.stage.currentSlide;if(this.actualParent&&f){if((a="Question Slide"==f.st)&&f.qs)(f=cp.D[f.qs])&&"Hotspot"==f.qtp&&(d=!0);(a=a&&!d)&&!this.actualParent.onclick?cp.registerGestureEvent(this.actualParent,cp.GESTURE_EVENT_TYPES.TAP,function(a){return function(d){c.is_inside_canvas(d)&&cp.clickSuccessHandler(a)}}(this.parentData),null,!0):(this.actualParent.onclick=null,cp.removeGestureEvent(this.actualParent,cp.GESTURE_EVENT_TYPES.TAP,
null,!0))}this.needsOwnHandler=a};
function getTransformDataForMouseStates(c,a){if(cp.responsive){var d=c.getBoundingClientRect(),f=c.parentElement.getBoundingClientRect(),i=a.actualParent.getBoundingClientRect(),g=cp("div_Slide").getBoundingClientRect(),j=i.width,l=i.height,k=i=1,e=0,s=0;10<j&&(i=(j-4)/j);10<l&&(k=(l-4)/l);1>i&&1>k&&(j=cp.project.clientWidth,l=cp.project.clientHeight,e=!1,e=a.sh&&!a.sh.i,j=(e&&j>d.right-g.left?j:d.right-g.left)-(0<d.left-g.left&&e?0:d.left-g.left),d=(e&&l>d.bottom-g.top?l:d.bottom-g.top)-(0<d.top-
g.top&&e?0:d.top-g.top),l=f.left-g.left+f.width/2,f=f.top-g.top+f.height/2,e?(e=j/2-(j/2-l)*i-l,s=d/2-(d/2-f)*k-f):s=e=0);return{sx:i,sy:k,tx:-e,ty:-s,p:a.actualParent,old_tr:a.tr}}}cp.AutoShape.prototype.shrinkShapeButtonInAllStates=function(){for(var c=cp.GetBaseItemsInAllStates(this,!0),a=0;a<c.length;a++){var d=c[a];d&&d.shrinkShapeButton()}};cp.AutoShape.prototype.expandShapeButtonInAllStates=function(){for(var c=cp.GetBaseItemsInAllStates(this,!0),a=0;a<c.length;a++){var d=c[a];d&&d.expandShapeButton()}};
cp.AutoShape.prototype.shrinkShapeButton=function(){if(this.dataObjForMouseStates){var c={sx:this.dataObjForMouseStates.sx,sy:this.dataObjForMouseStates.sy,tx:this.dataObjForMouseStates.tx,ty:this.dataObjForMouseStates.ty,p:this.dataObjForMouseStates.p,old_tr:this.dataObjForMouseStates.old_tr};cp.responsive&&(c=getTransformDataForMouseStates(this.element,this));c="translate("+c.tx/cp("div_Slide").scaleFactor+"px,"+c.ty/cp("div_Slide").scaleFactor+"px) scalex("+c.sx+") scaley("+c.sy+")";cp.applyTransform(this.element,
c);this.setVBounds();(1==cp("div_Slide").scaleFactor||!cp.responsive)&&this.drawIfNeeded(!0,cp.ReasonForDrawing.kMouseEvent)}};cp.AutoShape.prototype.expandShapeButton=function(){this.dataObjForMouseStates&&(cp.applyTransform(this.element,""),this.setVBounds(),(1==cp("div_Slide").scaleFactor||!cp.responsive)&&this.drawIfNeeded(!0,cp.ReasonForDrawing.kMouseEvent))};cp.AutoShape.prototype.restOfProjectDoOnNewSlide=function(){this.addMouseHandlers();this.setUpClickHandler()};
cp.AutoShape.prototype.drawForResponsive=function(c,a){if(!this.responsiveCSS)return!1;if(this.isDrawn&&!c)return cp.initializeVisibilityForGroupedItem(this),!0;var d=cp.getResponsiveCSS(this.responsiveCSS);cp.getCSSFromLayouter(d,this);var f=!1,f=this.sh&&!this.sh.i,i=void 0!=this.tr;if(this.currentCSS==d&&c&&this.isDrawn&&a==cp.ReasonForDrawing.kMoviePaused)return cp.verbose&&cp.log("Returning because this.isDrawn : "+this.isDrawn),!0;var g=a===cp.ReasonForDrawing.kItemStateChanged||a===cp.ReasonForDrawing.kGettingBoundingRectInBaseState||
a===cp.ReasonForDrawing.kLinkedToItemAppeared;this.currentCSS=d;var j=this.canvasObj,l=this.prevCanvasObj,k=d,e=this.actualParent.style.transform||this.actualParent.style.msTransform||this.actualParent.style.MozTransform||this.actualParent.style.WebkitTransform||this.actualParent.style.OTransform,s=this.element.parentElement.style.transform||this.element.parentElement.style.msTransform||this.element.parentElement.style.MozTransform||this.element.parentElement.style.WebkitTransform||this.element.parentElement.style.OTransform;
cp.applyTransform(this.actualParent,"");cp.applyTransform(this.element.parentElement,"");cp.applyResponsiveStyles(this.actualParent,d,!0,g,void 0,a);var m=this.parentData;if(m.rpvt&&m.autoGrow&&(a==cp.ReasonForDrawing.kTextGrow||a==cp.ReasonForDrawing.kLinkedToItemAppeared||a==cp.ReasonForDrawing.kMouseEvent||a==cp.ReasonForDrawing.kMoviePaused)&&!cp.isPartOfFlex(this)){var q=m.minItemHeight;q&&this.actualParent.clientHeight<q&&(this.actualParent.style.height=q+"px");cp.createResponsiveStyleObj(d,
d.p,d.l,d.t,d.r,d.b,this.actualParent.clientWidth+"px",this.actualParent.clientHeight+"px",d.crop)}m.minItemHeight=this.actualParent.clientHeight;this.actualParent.offsetHeight=this.actualParent.offsetHeight;this.actualParentClientBoundingRect=cp.GetBoundingClientRectForElem(this.actualParent,g);var n=cp.GetBoundingClientRectForElem(cp.movie.stage.getSlideDiv(),g);this.HFactor=this.WFactor=1;this.WFactor=Math.round(1E4*this.actualParent.clientWidth/this.bounds.width)/1E4;this.HFactor=Math.round(1E4*
this.actualParent.clientHeight/this.bounds.height)/1E4;var u,w,v,y,q=this.wrvBounds.minY-this.bounds.minY;u=(this.wrvBounds.minX-this.bounds.minX)*this.WFactor;w=q*this.HFactor;v=this.wrvBounds.width*this.WFactor;y=this.wrvBounds.height*this.HFactor;k=cp.createResponsiveStyleObj(d,d.p,this.actualParentClientBoundingRect.left-n.left+u-j.sw/2+"px",this.actualParentClientBoundingRect.top-n.top+w-j.sw/2+"px","0px","0px",v+j.sw+"px",y+j.sw+"px",d.crop);cp.applyResponsiveStyles(this.element.parentElement,
k);this.parentElementClientBoundingRect=cp.GetBoundingClientRectForElem(this.element.parentElement,g);q=0;if(this.tr){q=cp.getAngleFromRotateStr(this.tr);this.actualParent.offsetHeight=this.actualParent.offsetHeight;if(!this.m_centrePoint||a==cp.ReasonForDrawing.kOrientationChangeOrResize||a==cp.ReasonForDrawing.kLinkedToItemAppeared||a==cp.ReasonForDrawing.kItemStateChanged||a==cp.ReasonForDrawing.kGettingBoundingRectInBaseState)this.m_centrePoint=cp.getCenterForRotation(this.actualParent,a==cp.ReasonForDrawing.kItemStateChanged);
this.actualParentClientBoundingRect=cp.GetBoundingClientRectForElem(this.actualParent,g);var x=cp.getBoundsForRotatedItem1(this.parentElementClientBoundingRect.left-n.left,this.parentElementClientBoundingRect.top-n.top,this.parentElementClientBoundingRect.width,this.parentElementClientBoundingRect.height,this.m_centrePoint,q,j.sw),p=t=r=b=void 0;"auto"!=d.l&&(p=x.l);"auto"!=d.t&&(t=x.t);"auto"!=d.r&&(r=x.r);"auto"!=d.b&&(b=x.b);k=cp.createResponsiveStyleObj(k,d.p,p,t,r,b,x.w,x.h,d.crop);cp.applyResponsiveStyles(this.element.parentElement,
k)}this.parentElementClientBoundingRect=cp.GetBoundingClientRectForElem(this.element.parentElement,g);x=g=0;this.m_centrePoint&&(g=this.m_centrePoint.X-(this.actualParentClientBoundingRect.left-n.left),x=this.m_centrePoint.Y-(this.actualParentClientBoundingRect.top-n.top));if(m.rpvt){var k=this.actualParent.clientWidth,m=this.actualParent.clientHeight,p=this.actualParent.id+"_vTxtHandlerHolder",o=cp(p);o||(o=cp.newElem("div"),o.id=p,o.style.display="block",o.style.position="absolute",o.style.visibility=
"hidden",this.actualParent.appendChild(o));o.style.left="0px";o.style.top="0px";o.style.width=k+"px";o.style.height=m+"px";o=this.actualParent.id+"_vTxtHolder";p=cp(o);p||(p=cp.newElem("div"),p.id=o,p.style.display="block",p.style.position="absolute",p.style.zIndex=1,this.element.parentElement.appendChild(p));p.style.left=this.actualParentClientBoundingRect.left-this.parentElementClientBoundingRect.left+"px";p.style.top=this.actualParentClientBoundingRect.top-this.parentElementClientBoundingRect.top+
"px";p.style.width=k+"px";p.style.height=m+"px";(a==cp.ReasonForDrawing.kOrientationChangeOrResize||a==cp.ReasonForDrawing.kItemStateChanged||a==cp.ReasonForDrawing.kGettingBoundingRectInBaseState)&&cp.updateVarText(this.actualParent,!0,!0);if(this.tr)o="center center",o=(g?100*g/k+"%":"center")+" ",o=x?o+(100*x/m+"%"):o+"center",p.style["-ms-transform-origin"]=o,p.style["-moz-transform-origin"]=o,p.style["-webkit-transform-origin"]=o,p.style["-o-transform-origin"]=o,p.style["transform-origin"]=o,
cp.applyTransform(p,this.tr);else if((a===cp.ReasonForDrawing.kItemStateChanged||a===cp.ReasonForDrawing.kGettingBoundingRectInBaseState)&&l&&l.tr)o="initial",p.style["-ms-transform-origin"]=o,p.style["-moz-transform-origin"]=o,p.style["-webkit-transform-origin"]=o,p.style["-o-transform-origin"]=o,p.style["transform-origin"]=o,k=p.style.transform||p.style.msTransform||p.style.MozTransform||p.style.WebkitTransform||p.style.OTransform,k=k.replace(l.tr,""),cp.applyTransform(p,k)}cp.applyTransform(this.actualParent,
e);cp.applyTransform(this.element.parentElement,s);e=this.actualParent;m=s=0;s=v+2*j.sw;m=y+2*j.sw;f?(v=this.element.parentElement.clientWidth,y=this.element.parentElement.clientHeight,k=cp("div_Slide").clientWidth,p=cp("div_Slide").clientHeight,s=s>k?s:k,m=m>p?m:p,s=s>v?s:v,m=m>y?m:y):(s=Math.ceil(parseFloat(this.element.parentElement.style.width)),m=Math.ceil(parseFloat(this.element.parentElement.style.height)));k=cp.createResponsiveStyleObj(d,void 0,"0px","0px","0px","0px",s+"px",m+"px",void 0);
v=this.parentElementClientBoundingRect.left-n.left;y=this.parentElementClientBoundingRect.top-n.top;s=this.canvas=cp.createResponsiveCanvas(k,s,m,this.element);this.isParentOfTypeSlide||(f?(this.element.style.marginLeft=(0>v?0:-1)*v+"px",this.element.style.marginTop=(0>y?0:-1)*y+"px"):(this.element.style.marginLeft="0px",this.element.style.marginTop="0px"));if(this.re)this.element.parentElement.style.webkitBoxReflect="below "+this.re.d+"px -webkit-gradient(linear, left top, left bottom, from(transparent), color-stop("+
(1-this.re.s/100)+", transparent), to(rgba(255, 255, 255, "+(1-this.re.p/100)+")))";else if((a===cp.ReasonForDrawing.kItemStateChanged||a==cp.ReasonForDrawing.kGettingBoundingRectInBaseState)&&l&&l.re)this.element.parentElement.style.webkitBoxReflect="unset";cp.movie.stage.addToParentChildMap(e.id,this.element.id);this.element.originalParent=e;n=s.gc;n.crop=d.crop?d.crop:void 0;n.save();f?(n.setTransform(1,0,0,1,0>v?-v:0,0>y?-y:0),n.translate(v,y),n.shadowOffsetX=this.sh.d*Math.cos(cp.PIBy180*this.sh.a),
n.shadowOffsetY=this.sh.d*Math.sin(cp.PIBy180*this.sh.a),n.shadowBlur=this.sh.b,d=this.sh.o,1==d&&(d=0.999),n.shadowColor=cp.ConvertRGBToRGBA(this.sh.c,d)):i||(n.translate(-u,-w),n.translate(j.sw/2,j.sw/2));this.element.style.display="block";this.element.style.position="absolute";n=s.gc;n.save();if(this.tr)o=g?100*g/e.clientWidth+"%":"center",o+=" ",o=x?o+(100*x/e.clientHeight+"%"):o+"center",e.style["-ms-transform-origin"]=o,e.style["-moz-transform-origin"]=o,e.style["-webkit-transform-origin"]=
o,e.style["-o-transform-origin"]=o,e.style["transform-origin"]=o,cp.applyTransform(e,this.tr),e.tr=this.tr;else if((a===cp.ReasonForDrawing.kItemStateChanged||a==cp.ReasonForDrawing.kGettingBoundingRectInBaseState)&&l&&l.tr)k=e.style.transform||e.style.msTransform||e.style.MozTransform||e.style.WebkitTransform||e.style.OTransform,k=k.replace(l.tr,""),cp.applyTransform(e,k),e.tr=void 0;e.rotateAngle=q;if(f||i)f=this.element.parentElement.clientWidth/2,i=this.element.parentElement.clientHeight/2,f=
this.actualParentClientBoundingRect.left-this.parentElementClientBoundingRect.left+g,i=this.actualParentClientBoundingRect.top-this.parentElementClientBoundingRect.top+x,n.translate(f,i),0!=q?n.rotate(cp.PIBy180*q):n.rotate(0.02*cp.PIBy180),n.translate(-g,-x);n.clearRect(0,0,this.element.getBoundingClientRect().width,this.element.getBoundingClientRect().height);cp.DESKTOP==cp.device&&(cp.MSIE==cp.browser||cp.MSEDGE==cp.browser||cp.FIREFOX==cp.browser)&&n.beginPath();f=0;void 0!=j.ss&&(f=j.ss);i=1;
void 0!=j.fa&&(i=j.fa/100);void 0!=this.normalImage&&1!=i&&(j=cp.movie.im.images[this.normalImage])&&j.nativeImage.complete&&n.drawImage(j.nativeImage,-j.nativeImage.width/2,-j.nativeImage.height/2,j.nativeImage.width,j.nativeImage.height);if((f=this.draw(n,f))&&void 0!=this.normalImage)(j=cp.movie.im.images[this.normalImage])&&j.nativeImage.complete?(this.sh&&!this.sh.i&&(n.shadowOffsetX=0,n.shadowOffsetY=0,n.shadowBlur=0,n.shadowColor="rgba(0,0,0,0)"),n.drawImage(j.nativeImage,-j.nativeImage.width/
2,-j.nativeImage.height/2,j.nativeImage.width,j.nativeImage.height)):f=!1;n.restore();this.transIn&&a==cp.ReasonForDrawing.kRegularDraw&&(this.element.parentElement.style.opacity=0);this.isDrawn=f;!0==this.isDrawn&&this.drawComplete(a);void 0!=this.parentData.enabled&&!this.parentData.enabled&&this.removeMouseHandlers();cp.isVisible(this)?cp._show(this.parentDivName):cp._hide(this.parentDivName);cp.isVisible(this)&&this.playEffectsOnStart&&((j=this.parentData.selfAnimationScript)&&eval(j),this.playEffectsOnStart=
!1);return!0};
cp.AutoShape.prototype.drawIfNeeded=function(c,a){if((!cp.responsive||!this.drawForResponsive(c,a))&&!this.isDrawn){this.HFactor=this.WFactor=1;var d=this.canvasObj,f=this.bounds,i=d.sw;void 0==i&&(i=1);1!=i&&void 0==this.vbounds&&(this.vbounds.minX+=3*i/2,this.vbounds.minY+=3*i/2,this.vbounds.maxX-=3*i/2,this.vbounds.maxY-=3*i/2);var g=this.vbounds,j=f.minX,l=f.minY,k=f.maxX-f.minX,e=f.maxY-f.minY,i=this.actualParent;i.style.left=j+"px";i.style.top=l+"px";i.style.width=k+"px";i.style.height=e+"px";
var e=!1,e=this.re||this.sh&&!this.sh.i,j=0<g.minX&&e?0:g.minX,l=0<g.minY&&e?0:g.minY,s=e&&cp.D.project.h>g.maxY?cp.D.project.h:g.maxY,k=(e&&cp.D.project.w>g.maxX?cp.D.project.w:g.maxX)-j,g=this.canvas=cp.createCanvas(0,0,k,s-l,this.element);this.element.style.display="block";this.element.style.position="absolute";this.element.parentElement.style.left=this.vbounds.minX+"px";this.element.parentElement.style.top=this.vbounds.minY+"px";this.element.parentElement.style.width=this.vbounds.maxX-this.vbounds.minX+
"px";this.element.parentElement.style.height=this.vbounds.maxY-this.vbounds.minY+"px";this.element.style.marginLeft=j-this.vbounds.minX+"px";this.element.style.marginTop=l-this.vbounds.minY+"px";this.element.parentElement.style.webkitBoxReflect=this.re?"below "+this.re.d+"px -webkit-gradient(linear, left top, left bottom, from(transparent), color-stop("+(1-this.re.s/100)+", transparent), to(rgba(255, 255, 255, "+(1-this.re.p/100)+")))":"unset";cp.movie.stage.addToParentChildMap(i.id,this.element.id);
this.element.originalParent=i;g=g.gc;g.clearRect(0,0,this.element.getBoundingClientRect().width,this.element.getBoundingClientRect().height);cp.DESKTOP==cp.device&&(cp.MSIE==cp.browser||cp.FIREFOX==cp.browser||cp.MSEDGE==cp.browser)&&g.beginPath();g.save();e?g.setTransform(1,0,0,1,0>j?-j:0,0>l?-l:0):g.translate(-this.vbounds.minX,-this.vbounds.minY);this.sh&&!this.sh.i&&(g.shadowOffsetX=this.sh.d*Math.cos(cp.PIBy180*this.sh.a),g.shadowOffsetY=this.sh.d*Math.sin(cp.PIBy180*this.sh.a),g.shadowBlur=
this.sh.b,j=this.sh.o,1==j&&(j=0.999),g.shadowColor=cp.ConvertRGBToRGBA(this.sh.c,j));this.element.style.display="block";this.element.style.position="absolute";j=0;this.tr&&(cp.applyTransform(i,this.tr),i.tr=this.tr,j=cp.getAngleFromRotateStr(this.tr));i.rotateAngle=j;if(this.sh||0!=j)g.translate((f.minX+f.maxX)/2,(f.minY+f.maxY)/2),0!=j?g.rotate(cp.PIBy180*j):g.rotate(0.02*cp.PIBy180),g.translate(-(f.minX+f.maxX)/2,-(f.minY+f.maxY)/2);i=0;void 0!=d.ss&&(i=d.ss);j=1;void 0!=d.fa&&(j=d.fa/100);if(void 0!=
this.normalImage&&1!=j&&(d=cp.movie.im.images[this.normalImage])&&d.nativeImage.complete)g.translate((f.minX+f.maxX)/2,(f.minY+f.maxY)/2),g.drawImage(d.nativeImage,-d.nativeImage.width/2,-d.nativeImage.height/2,d.nativeImage.width,d.nativeImage.height),g.translate(-(f.minX+f.maxX)/2,-(f.minY+f.maxY)/2);if((i=this.draw(g,i))&&void 0!=this.normalImage)(d=cp.movie.im.images[this.normalImage])&&d.nativeImage.complete?(this.sh&&!this.sh.i&&(g.shadowOffsetX=0,g.shadowOffsetY=0,g.shadowBlur=0,g.shadowColor=
"rgba(0,0,0,0)"),g.translate((f.minX+f.maxX)/2,(f.minY+f.maxY)/2),g.drawImage(d.nativeImage,-d.nativeImage.width/2,-d.nativeImage.height/2,d.nativeImage.width,d.nativeImage.height)):i=!1;g.restore();this.transIn&&a==cp.ReasonForDrawing.kRegularDraw&&(this.element.parentElement.style.opacity=0);this.isDrawn=i;!0==this.isDrawn&&this.drawComplete(a);void 0!=this.parentData.enabled&&!this.parentData.enabled&&this.removeMouseHandlers();cp.isVisible(this)?cp._show(this.parentDivName):cp._hide(this.parentDivName);
cp.isVisible(this)&&this.playEffectsOnStart&&((f=this.parentData.selfAnimationScript)&&eval(f),this.playEffectsOnStart=!1)}};
cp.AutoShape.prototype.draw=function(c,a){if(this.canvasObj.svg)return this.drawSVGShape(c),!0;var d=!1;this.drawFillBoundary(c,!0);var f=this.canvasObj;if(f){d=1;void 0!=f.fa&&(d=f.fa/100);var i=c.globalAlpha;0!=a&&0<f.sw&&(c.globalAlpha=d,this.setFill(c),c.globalAlpha=i,this.drawBoundary(c,a));c.globalAlpha=d;d=this.setFill(c);c.globalAlpha=i;0==a&&0<f.sw&&this.drawFillBoundary(c,!1);0<f.sw&&(c.lineWidth=f.sw,c.strokeStyle=f.sc,c.stroke());0!=f.sw&&(c.shadowOffsetX=0,c.shadowOffsetY=0,c.shadowBlur=
0,c.shadowColor="rgba(0,0,0,0)",c.stroke());return d}};
cp.AutoShape.prototype.drawSVGShape=function(c){var a=null,d=this.canvasObj.p0,f=0,i=1,g=1;if(d)for(f=0;f<d.length;++f)if(a=d[f],!(0>=a.length))switch(a[0]){case cp.kBeginPath:this.canvasObj.svg&&c.beginPath();break;case cp.kMoveTo:c.moveTo(a[1]*this.WFactor,a[2]*this.HFactor);break;case cp.kLineTo:c.lineTo(a[1]*this.WFactor,a[2]*this.HFactor);break;case cp.kBezierTo:c.bezierCurveTo(a[1]*this.WFactor,a[2]*this.HFactor,a[3]*this.WFactor,a[4]*this.HFactor,a[5]*this.WFactor,a[6]*this.HFactor);break;
case cp.kClosePath:c.closePath();break;case cp.kPathFillData:if(this.canvasObj.svg)if(a=a[1],a.indexOf("gf"))a=eval("{"+a+"}"),c.fillStyle=a;else{var j={},a=a.substr(3);j.gf=eval("("+a+")");if(j.gf&&(a=cp.getGradientFill(j.gf,c,this.WFactor,this.HFactor)))c.fillStyle=a}break;case cp.kPathFillAlpha:i=a[1];break;case cp.KPathStrokeColor:c.strokeStyle="#"+a[1];break;case cp.KPathStrokeWidth:a=a[1];j=c.globalAlpha;c.globalAlpha=i;c.fill();a&&(c.lineWidth=a,c.globalAlpha=g,c.stroke());c.globalAlpha=j;
break;case cp.KPathStrokeAlpha:g=a[1]}};
cp.AutoShape.prototype.drawFillBoundary=function(c,a){var d=null,f=this.canvasObj.p0,i=0;if(f)for(i=0;i<f.length;++i)if(d=f[i],!(0>=d.length))switch(d[0]){case cp.kMoveTo:c.moveTo(d[1]*this.WFactor,d[2]*this.HFactor);break;case cp.kLineTo:c.lineTo(d[1]*this.WFactor,d[2]*this.HFactor);break;case cp.kBezierTo:c.bezierCurveTo(d[1]*this.WFactor,d[2]*this.HFactor,d[3]*this.WFactor,d[4]*this.HFactor,d[5]*this.WFactor,d[6]*this.HFactor);break;case cp.kClosePath:c.closePath();break;case cp.kNotClosed:if(!a)break;
case cp.kNoStroke:i<f.length-1&&(d=f[++i][0],cp.kBeginPath!=d&&--i);for(;i<f.length-1;)if(d=f[++i][0],cp.kNotClosed==d||cp.kNoStroke==d||cp.kBeginPath==d){--i;break}}};
cp.AutoShape.prototype.drawBoundary=function(c,a){var d=null,f=this.canvasObj.p0,i=0,g=0,j=0;if(f){var l=new cp.dashStruct,k=cp.getPattern(a,7,3);c.beginPath();for(j=0;j<f.length;++j)if(d=f[j],!(0>=d.length))switch(d[0]){case cp.kMoveTo:c.moveTo(d[1]*this.WFactor,d[2]*this.HFactor);i=d[1]*this.WFactor;g=d[2]*this.HFactor;l=new cp.dashStruct;break;case cp.kLineTo:cp.drawDashedLineImpl(c,k,l,i,g,d[1]*this.WFactor,d[2]*this.HFactor);i=d[1]*this.WFactor;g=d[2]*this.HFactor;break;case cp.kBezierTo:cp.drawDashedBezierCurve(c,
k,l,i,g,d[1]*this.WFactor,d[2]*this.HFactor,d[3]*this.WFactor,d[4]*this.HFactor,d[5]*this.WFactor,d[6]*this.HFactor);i=d[5]*this.WFactor;g=d[6]*this.HFactor;break;case cp.kClosePath:l=new cp.dashStruct}}};
cp.AutoShape.prototype.getTranslationValuesForTiletype=function(){var c=this.canvasObj;if(c){var a=c.imgf;if(a){var d=a.img.tiletype,f=0,i=0,g=a.b[2]-a.b[0],j=a.b[3]-a.b[1],l=a.img.w,a=a.img.h;cp.responsive&&(g=Math.floor(g*this.WFactor)+c.sw,j=Math.floor(j*this.HFactor)+c.sw);switch(d){case "t":f=(g-l)/2;break;case "tr":f=g-l;break;case "l":i=(j-a)/2;break;case "c":f=(g-l)/2;i=(j-a)/2;break;case "r":f=g-l;i=(j-a)/2;break;case "bl":i=j-a;break;case "b":f=(g-l)/2;i=j-a;break;case "br":f=g-l,i=j-a}0<
f&&(f=f%l-l);0<i&&(i=i%a-a);cp.responsive||(f+=c.b[0],i+=c.b[1]);return{x:f,y:i}}}};
cp.AutoShape.prototype.setFill=function(c){var a=null,d="",d=null,f=[],i=0,g=0,j=0,l=1,d=d=null,j=!0,k=0,f=k=1,e=!1,s=!1,m=this.canvasObj;if(m){var q=c.canvas;if(0==q.width||0==q.height)return!0;if(m.gf){if(d=cp.getGradientFill(m.gf,c,this.WFactor,this.HFactor))c.fillStyle=d}else if(m.imgf){j=!1;a=m.imgf;if(void 0==a.img||void 0==a.img.ip)return!1;d=a.img.ip;if((d=cp.movie.im.images[d])&&d.nativeImage.complete){j=a.s;if(l=a.t)g=this.getTranslationValuesForTiletype(),e=!0,i=g.x,g=g.y,c.translate(i,
g),d=c.createPattern(d.nativeImage,"repeat"),c.fillStyle=d;else if(j)void 0!=this.canvasObj.b&&4==this.canvasObj.b.length&&(cp.responsive?(i=Math.floor(i*this.WFactor)+m.sw,g=Math.floor(g*this.HFactor)+m.sw):(i+=this.canvasObj.b[0],g+=this.canvasObj.b[1]),f=this.canvasObj.b,k=f[2]-f[0],h=f[3]-f[1],cp.responsive&&(k*=this.WFactor,h*=this.HFactor),k/=a.img.w,f=h/a.img.h,c.translate(i,g),e=!0,c.scale(k,f),d=c.createPattern(d.nativeImage,"no-repeat"),c.fillStyle=d);else{j=document.createElement("canvas");
l=j.getContext("2d");q=c.canvas;j.left=q.left;j.right=q.right;j.top=q.top;j.bottom=q.bottom;j.width=q.width;j.height=q.height;var q=d.nativeImage.width,n=d.nativeImage.height,i=a.b[2]-a.b[0],g=a.b[3]-a.b[1];cp.responsive?(i=Math.floor(i*this.WFactor)+m.sw,g=Math.floor(g*this.HFactor)+m.sw,i=-(q-i)/2,g=-(n-g)/2,l.translate(i,g)):(l.translate((i-q)/2,(g-n)/2),i=this.canvasObj.b[0],g=this.canvasObj.b[1],e=!0,c.translate(i,g));a=l.globalAlpha;l.globalAlpha=0;l.globalAlpha=a;d=l.createPattern(d.nativeImage,
"no-repeat");l.fillStyle=d;l.fillRect(0,0,q,n);d=c.createPattern(j,"no-repeat");c.fillStyle=d}j=!0}}else m.bc?c.fillStyle=m.bc:this.normalImage&&(s=!0,j=!1);j&&c.fill();(1!=k||1!=f)&&c.scale(1/k,1/f);e&&c.translate(-i,-g);return j||s}};
cp.AutoShape.prototype.changeStateOnMouseEvents=function(c,a){var d=null;-1==this.baseStateItemID?d=this:this.cloneOfBaseStateItem&&(d=cp.getDisplayObjByCP_UID(this.baseStateItemID));d&&void 0!==d.HandleMouseEventOnStateItems&&d.HandleMouseEventOnStateItems(c,this.parentStateType,a)};
cp.AutoShape.prototype.HandleMouseEventOnStateItems=function(c,a,d){var f=cp.D[this.parentDivName];if(!(f&&void 0!=f.enabled)||f.enabled){var a=cp.kSTTNone,i="";if(0<=this.currentState&&this.currentState<this.states.length){var g=this.states[this.currentState];g&&(a=g.stt,i=g.stn)}var j=!(cp.device==cp.IDEVICE||cp.device==cp.ANDROID)||"mouseup"!=c,g=!1,l="",k=!1,e=!1;f&&(e=cp.isValidItemForStateOptimization({n:this.parentDivName,t:f.type}));if("mouseover"==c){if((a==cp.kSTTNormal||a==cp.kSTTCustom||
a==cp.kSTTVisited)&&this.shouldShowRollOver)if(g=!0,l=cp.getLocalisedStateName("kCPRolloverState"),this.stateAtStartOfMouseEvents=i,cp.BringBaseItemToFrontWithinState(this,cp.getLocalisedStateName("kCPRolloverState")),cp.device===cp.DESKTOP&&(c=cp.GetMouseOverManager())){var s=this;c.addMouseOverItem(this,function(){s.ForceMouseOut()})}}else if("mouseout"==c){if(a==cp.kSTTRollOver||a==cp.kSTTDown)g=!0,l=this.stateAtStartOfMouseEvents,cp.device===cp.DESKTOP&&(c=cp.GetMouseOverManager())&&c.removeMouseOverItem(this);
if(a==cp.kSTTNormal||a==cp.kSTTCustom||a==cp.kSTTVisited)cp.browser==cp.CHROME&&this.ignoreMouseOutEventOnNormal?this.ignoreMouseOutEventOnNormal=!1:this.shouldShowRollOver=!0}else if("mousedown"==c){if(a==cp.kSTTNormal||a==cp.kSTTRollOver||a==cp.kSTTCustom||a==cp.kSTTVisited)if(g=!0,l=cp.getLocalisedStateName("kCPDownState"),this.bShouldListenForMouseUpOnDownState=!0,a==cp.kSTTNormal||a==cp.kSTTCustom||a==cp.kSTTVisited)this.stateAtStartOfMouseEvents=i,this.ignoreMouseOutEventOnNormal=!0;this.shrinkShapeButtonInAllStates()}else if("mouseup"==
c){if(!j||a==cp.kSTTDown)a==cp.kSTTDown&&(g=!0,l=this.stateAtStartOfMouseEvents),this.shouldShowRollOver=!1,this.bShouldListenForMouseUpOnDownState&&(k=!0);this.expandShapeButtonInAllStates()}g&&(l!==cp.getLocalisedStateName("kCPRolloverState")&&cp.ResetItemZIndicesWithinState(this,cp.getLocalisedStateName("kCPRolloverState")),cp.changeState(this.actualParent.id,l,!1));k&&!e&&(!cp.IsGestureSupportedDevice()&&!cp.disableInteractions&&(this.needsOwnHandler||cp.shouldRelaxBrowserCheck(this.parentData.type)||
cp.CHROME!=cp.browser&&cp.MSIE!=cp.browser||cp.m_isLMSPreview))&&cp.dispatchClickEvent(this.actualParent,d,{asPartOfStateChange:!0})}};
(function(a){document.addEventListener("visibilitychange",function(){"hidden"==document.visibilityState&&(a.movie&&a.movie.vdm&&a.movie.vdm.addEventListener(a.NON_SMOOTH_FRAME_ADVANCE_EVENT),a.pageSetInvisibile=!0)});a.EventVideo=function(b){this.vdm=a.movie.vdm;this.vdm.verbose&&a.log("EventVideo being constructed for el "+b.id);a.EventVideo.baseConstructor.call(this,b);this.id=this.parentDivName=this.getAttribute("dn");b=a.D[this.parentDivName];this.from=b.from;this.to=b.to;this.displayForDurationOfVideo=
b.ddv;a.IDEVICE==a.device||a.device==a.ANDROID?this.cploop=this.getAttribute("l"):this.loop=this.getAttribute("l");if(this.showControls=this.getAttribute("svc"))this.videoSkinStrings=this.getAttribute("vss");this.autoPlay=this.getAttribute("au");this.autoRewind=this.getAttribute("ar");this.src=a.getCorrectMediaPath(this.getAttribute("mp4"),this.id);if((a.device==a.IDEVICE||a.device==a.ANDROID)&&!a.multiAudioTrack){var c=a.getCorrectMediaPath(this.getAttribute("amp4"),this.id);c&&(this.src=c)}this.nativeVideo=
null;this.ended=!1;this.paused=!0;this.started=!1;this.visible=this.getAttribute("visible");this.transIn=b.trin;this.element.parentElement.drawingBoard=this.element.parentElement;c=this.getAttribute("b");this.actualParent=b=document.getElementById(this.parentDivName);this.actualDrawingElement=this.element;this.bounds={minX:c[0],minY:c[1],maxX:c[2],maxY:c[3]};c=this.getAttribute("vb");this.vbounds={minX:c[0],minY:c[1],maxX:c[2],maxY:c[3],width:c[2]-c[0],height:c[3]-c[1]};b&&(b.drawingBoard=this.element.parentElement,
b.bounds=this.bounds,b.drawingBoard.bounds=this.vbounds);this.isDrawn=!1;this.tr=this.getAttribute("tr");this.tr||(this.tr="rotate(0deg)");this.sh=this.getAttribute("sh");this.re=this.getAttribute("re");a.movie.stage.addToParentChildMap(b.id,this.element.id);a.responsive&&(this.responsiveCSS=this.getAttribute("css"))};a.inherits(a.EventVideo,a.DisplayObject);a.EventVideo.prototype.start=function(b,c){function e(d){if((a.device==a.IDEVICE||a.device==a.ANDROID)&&a.multiAudioTrack){var f=d.from;f<cpInfoCurrentFrame&&
(f=cpInfoCurrentFrame);var g=f+0.5*cpInfoFPS;g>d.to&&(g=d.to);if(a.movie.am.doesAudioStartBetween(f,g)){d.vdm.verbose&&a.log("500mS delay in start of "+d.id);d.delayStartTimer=setTimeout(function(){e(d)},500);return}}d.drawIfNeeded(b,c);d.addNativeVideoIfNeeded();a.applyTransform(d.actualParent.drawingBoard,"")}e(this,b);if(!this.effectIsStarted||b)this.areDimensionsCalculated=!1,this.updateEffects(this.hasEffect),this.effectIsStarted=!0};a.EventVideo.prototype.reset=function(b){this.vdm.verbose&&
a.log("EventVideo "+this.id+" reset("+b+")");this.delayStartTimer&&(clearTimeout(this.delayStartTimer),delete this.delayStartTimer);delete a.ropMap[this.element.id];this.pause();if(this.nativeVideo){this.nativeVideo.cpVideo=null;try{this.nativeVideo.currentTime=0}catch(c){}this.nativeVideo.style.display="none";if(a.device==a.IDEVICE||a.device==a.ANDROID){b=this.src;this.src="_cp_n_m_";var e=this.nativeVideo;if(e.cpSrc==b){e.cpSrc="_cp_n_m_";try{e.src="_cp_n_m_"}catch(d){}try{e.load()}catch(f){}}}this.nativeVideo=
null}this.isDrawn=!1;if((a.device!=a.IDEVICE||a.IOSMajor>=a.IOS8)&&a.removeVideoSkin)this.element.style.backgroundColor="",a.removeVideoSkin(this.actualParent);this.element.width=0;this.element.height=0;this.element.style.width="0px";this.element.style.height="0px";this.element.left=0;this.element.top=0;this.element.style.left="0px";this.element.style.top="0px";if(a.device==a.IDEVICE||a.device==a.ANDROID)a.movie.stage.VideoPlaying=!1;this.ended=!1;delete this.seekToTime};a.EventVideo.prototype.onEndOfMovie=
function(){this.vdm.verbose&&a.log("EventVideo "+this.id+" onEndOfMovie()");if(!this.displayForDurationOfVideo){this.pause();if(a.device==a.IDEVICE||a.device==a.ANDROID)a.movie.stage.VideoPlaying=!1;this.ended=!1;delete this.seekToTime}};a.EventVideo.prototype.drawForResponsive=function(b,c){if(!this.responsiveCSS)return!1;if(this.isDrawn&&!b)return a.initializeVisibilityForGroupedItem(this),!0;var e=a.getResponsiveCSS(this.responsiveCSS);this.canvasObj=a.D[this.parentDivName+"c"];a.getCSSFromLayouter(e,
this);var d=!1,d=this.sh&&!this.sh.i,f=void 0!=this.tr;if(this.isDrawn&&this.currentCSS==e&&!d&&!f&&(!b||c==a.ReasonForDrawing.kMoviePaused))return!0;var g=this.currentCSS=e;if(!b){if(a.device==a.IDEVICE||a.device==a.ANDROID){if(a.movie.stage.VideoPlaying)return!1;a.multiAudioTrack||a.movie.am.pause(a.ReasonForPause.ONLY_ONE_MEDIUM_CAN_PLAY);a.movie.stage.VideoPlaying=!0}this.vdm.verbose&&a.log("EventVideo "+this.id+" start()")}f=0;this.tr&&(f=a.getAngleFromRotateStr(this.tr));var d=this.element,
h=this.actualParent;a.applyResponsiveStyles(h,g,!0);a.applyResponsiveStyles(d,g,!0);g=a.movie.stage.mainSlideDiv.getBoundingClientRect();g=a.createResponsiveStyleObj(e,void 0,"0px","0px","0px","0px",g.width+"px",g.height+"px",void 0);a.applyResponsiveStyles(d.parentElement,g);this.parentElementClientBoundingRect=d.parentElement.getBoundingClientRect();d.rotateAngle=f;this.tr&&(a.applyTransform(d,this.tr),a.applyTransform(h,this.tr),d.tr=this.tr,h.tr=this.tr);this.sh&&!this.sh.i&&(e=this.sh.a-f,a.applyShadow(d,
this.sh.d*Math.cos(Math.PI*e/180)+"px "+this.sh.d*Math.sin(Math.PI*e/180)+"px "+this.sh.b+"px "+a.ConvertRGBToRGBA(this.sh.c,this.sh.o)+(this.sh.i?" inset":"")));this.re&&(d.style.webkitBoxReflect="below "+this.re.d+"px -webkit-gradient(linear, left top, left bottom, from(transparent), color-stop("+(1-this.re.s/100)+", transparent), to(rgba(255, 255, 255, "+(1-this.re.p/100)+")))");this.transIn&&c==a.ReasonForDrawing.kRegularDraw&&(d.parentElement.style.opacity=0);a.isVisible(this)||a._hide(this.parentDivName);
this.isDrawn=!0;a.isVisible(this)&&this.playEffectsOnStart&&((e=a.D[this.parentDivName].selfAnimationScript)&&eval(e),this.playEffectsOnStart=!1);b&&(1==c&&this.showControls)&&a.updateVideoProgressBar(this.actualParent);return!0};a.EventVideo.prototype.drawIfNeeded=function(b,c){if((!a.responsive||!this.drawForResponsive(b,c))&&!this.isDrawn){if(a.device==a.IDEVICE||a.device==a.ANDROID){if(a.movie.stage.VideoPlaying)return;a.multiAudioTrack||a.movie.am.pause(a.ReasonForPause.ONLY_ONE_MEDIUM_CAN_PLAY);
a.movie.stage.VideoPlaying=!0}this.vdm.verbose&&a.log("EventVideo "+this.id+" start()");var e=this.bounds,d=0;this.tr&&(d=a.getAngleFromRotateStr(this.tr));var f=this.element,g=this.actualParent;g.style.left=e.minX+"px";g.style.top=e.minY+"px";g.style.width=e.maxX-e.minX+"px";g.style.height=e.maxY-e.minY+"px";var h=f.parentElement;h.style.left="0px";h.style.top="0px";h.style.width=a.D.project.w+"px";h.style.height=a.D.project.h+"px";f.rotateAngle=d;f.style.left=e.minX+"px";f.style.top=e.minY+"px";
f.style.width=e.maxX-e.minX+"px";f.style.height=e.maxY-e.minY+"px";f.style.display="block";f.style.position="absolute";this.tr&&(a.applyTransform(f,this.tr),a.applyTransform(g,this.tr),f.tr=this.tr,g.tr=this.tr);this.sh&&!this.sh.i&&(e=this.sh.a-d,a.applyShadow(f,this.sh.d*Math.cos(Math.PI*e/180)+"px "+this.sh.d*Math.sin(Math.PI*e/180)+"px "+this.sh.b+"px "+a.ConvertRGBToRGBA(this.sh.c,this.sh.o)+(this.sh.i?" inset":"")));this.re&&(f.style.webkitBoxReflect="below "+this.re.d+"px -webkit-gradient(linear, left top, left bottom, from(transparent), color-stop("+
(1-this.re.s/100)+", transparent), to(rgba(255, 255, 255, "+(1-this.re.p/100)+")))");this.transIn&&(f.parentElement.style.opacity=0);a.isVisible(this)||a._hide(this.parentDivName);this.isDrawn=!0;a.isVisible(this)&&this.playEffectsOnStart&&((f=a.D[this.parentDivName].selfAnimationScript)&&eval(f),this.playEffectsOnStart=!1)}};a.EventVideo.prototype.addNativeVideoIfNeeded=function(){if(this.isDrawn&&!this.nativeVideo){var b=this.element;this.vdm.allocVideoChannel(this);if(this.nativeVideo){var c=this.bounds;
a.SAFARI===a.browser&&7<=a.browserVersion&&(this.nativeVideo.controls=!0);this.nativeVideo.style.display="block";a.responsive?(this.nativeVideo.style.width="100%",this.nativeVideo.style.height="100%"):(this.nativeVideo.style.width=c.maxX-c.minX+"px",this.nativeVideo.style.height=c.maxY-c.minY+"px");if(a.device==a.IDEVICE&&a.IOSMajor>=a.IOS5||a.device==a.ANDROID)this.nativeVideo.CPcanPlay=!1,this.nativeVideo.from=this.from,this.nativeVideo.to=this.to,this.nativeVideo.style.position="fixed",this.nativeVideo.style.left=
"-99999px";b.appendChild(this.nativeVideo);if(a.isVisible(this)){b.style.display="block";b.style.visibility="visible";if(this.showControls&&this.nativeVideo)if(a.IDEVICE!=a.device||a.IOSMajor>=a.IOS8)b.style.backgroundColor="#000000",a.addVideoSkin(this.actualParent,this,this.autoPlay);else{this.nativeVideo.controls=!0;var e=this;this.nativeVideo.addEventListener("webkitbeginfullscreen",function(){a.movie.pause()});this.nativeVideo.addEventListener("webkitendfullscreen",function(){e.nativeVideo.ended&&
a.movie.play()})}if(this.nativeVideo&&this.type==a.kCPOTVideoResource){var d=this.nativeVideo;d.addEventListener("webkitbeginfullscreen",function(){if(d.src!=""&&d.src!="_cp_n_m_"&&!d.paused)d.pauseMovieOnExitFullScreen=true},!1);d.addEventListener("webkitendfullscreen",function(){if(d.pauseMovieOnExitFullScreen){d.pauseMovieOnExitFullScreen=false;a.movie.pause(a.ReasonForPause.WK_EXIT_FULL_SCREEN)}},!1)}this.autoPlay&&this.play()}}a.redrawVideo(this.nativeVideo)}};a.EventVideo.prototype.load=function(){this.nativeVideo&&
this.nativeVideo.load()};a.EventVideo.prototype.play=function(){if(!(!0==this.ended||!1==this.paused))if(a.lastMediaPlayReqTime&&50>(new Date).getTime()-a.lastMediaPlayReqTime.getTime()){this.vdm.verbose&&a.log("crowded request postponed "+this.id);var b=this;setTimeout(function(){b.play()},50)}else if(this.nativeVideo)if(this.isSeekPending()&&this.src===this.nativeVideo.cpSrc)this.vdm.verbose&&a.log("EventVideo.Play setting revoke "+this.id),this.revoke=!0,this.finishPendingSeek();else{this.paused=
!1;-1==this.nativeVideo.cpSrc.indexOf(this.src)&&a.setSrcAndLoadVideoChannel(this.nativeVideo,this.src);a.IsRunningInACAP&&(!a.isDashPlayerAttached(this.nativeVideo)&&a.isBrightCoveUrl(this.nativeVideo.cpSrc))&&a.attachDashPlayerToVideoChannel(this.nativeVideo,this.nativeVideo.cpSrc);this.vdm.verbose&&a.log("EventVideo.Play "+this.id+" "+this.src);if((a.device==a.IDEVICE||a.device==a.ANDROID)&&a.multiAudioTrack)a.lastMediaPlayReqTime=new Date;try{a.playVideoChannel(this.nativeVideo),this.started=
!0,a.movie.stage.VideoPlaying=!0}catch(c){console.error("EventVideo.play error:"+c)}}};a.EventVideo.prototype.pause=function(){this.isSeekPending()&&(this.vdm.verbose&&a.log("EventVideo.Pause deleting revoke "+this.id),delete this.revoke);this.paused||(this.paused=!0,this.vdm.verbose&&a.log("EventVideo.Pause "+this.id+" "+this.src),this.nativeVideo&&(a.pauseVideoChannel(this.nativeVideo),this.nativeVideo.pausedAt=(new Date).getTime(),a.movie.stage.VideoPlaying=!1))};a.EventVideo.prototype.setLoop=
function(b,c){this.loop=b;this.loopFrames=c;a.IDEVICE==a.device||a.device==a.ANDROID?this.cploop=b:this.nativeVideo&&(b?this.nativeVideo.loop=!0:delete this.nativeVideo.loop)};a.EventVideo.prototype.setCurrentTime=function(b){this.vdm.verbose&&a.log("VideoObject "+this.id+"src "+this.src+" setCurrentTime("+b+")");if(this.nativeVideo){delete this.seekToTime;this.paused||(this.vdm.verbose&&a.log("setting revoke"),this.revoke=!0,this.pause());var c=!0;try{if(3<=this.nativeVideo.readyState||a.device!=
a.IDEVICE){this.nativeVideo.currentTime=b;var e=Math.abs(this.nativeVideo.currentTime-b);0.05<=e&&(c=!1)}else c=!1,this.nativeVideo.addEventListener("loadeddata",function(a){isNaN(parseFloat(b))&&(b=0);a.target.currentTime=b})}catch(d){e=Math.abs(this.nativeVideo.currentTime-b),c=0.05<=e?!1:!0}this.vdm.verbose&&a.log("seekSuccess = "+c);if(a.movie.ms.enabled)c?this.revoke?(this.vdm.verbose&&a.log("revoking play"),delete this.revoke,this.play()):this.nativeVideo.duration>this.nativeVideo.currentTime&&
(this.ended=!1):(this.vdm.verbose&&a.log("pause movie and add to seekQueue"),this.seekToTime=b,a.movie.ms.addToQueue(this));else if(this.revoke&&(this.vdm.verbose&&a.log("revoking play"),delete this.revoke,this.play()),c&&this.nativeVideo.duration>this.nativeVideo.currentTime)this.ended=!1}else this.seekToTime=b,this.vdm.verbose&&a.log("no native video. Kept in pending...")};a.EventVideo.prototype.isSeekPending=function(){return void 0!=this.seekToTime||void 0!=this.seekToTimeInNewSource};a.EventVideo.prototype.finishPendingSeek=
function(){this.nativeVideo&&this.isSeekPending()&&(this.vdm.verbose&&a.log("VideoObject "+this.id+" finishPendingSeek"),this.seekToTime=this.seekToTime||this.seekToTimeInNewSource,delete this.seekToTimeInNewSource,this.setCurrentTime(this.seekToTime))};a.EventVideo.prototype.seekTo=function(b){this.vdm.verbose&&a.log("VideoObject "+this.id+" seekTo("+b+")");if(this.loop&&this.loopFrames){if(this.from<=b)return this.setCurrentTime((b-this.from)%this.loopFrames/cpInfoFPS),this.ended=!1,!0}else{if(this.from<=
b&&this.to>=b)return this.setCurrentTime((b-this.from)/cpInfoFPS),this.ended=!1,!0;this.to>=b&&(this.setCurrentTime(0),this.ended=!1)}return!1};a.FMRVideo=function(b){a.FMRVideo.baseConstructor.call(this,b);this.type=a.kCPFullMotion};a.inherits(a.FMRVideo,a.EventVideo);a.FMRVideo.prototype.addNativeVideoIfNeeded=function(){a.FMRVideo.superClass.addNativeVideoIfNeeded.call(this);(a.device==a.IDEVICE||a.device==a.ANDROID)&&a.setPlaysInlineAttrib(this.nativeVideo,!0);this.vdm.demoVideo=this.nativeVideo};
a.FMRVideo.prototype.reset=function(b){a.FMRVideo.superClass.reset.call(this,b);this.vdm.demoVideo=this.nativeVideo};a.FMRVideo.prototype.onEndOfMovie=function(){a.FMRVideo.superClass.onEndOfMovie.call(this);this.vdm.demoVideo=this.nativeVideo};a.FMRVideo.prototype.updateFrame=function(){this.paused&&(!a.movie.paused&&this.autoPlay&&this.visible)&&this.play()};a.CPVCVideo=function(b){a.CPVCVideo.baseConstructor.call(this,b);this.type=a.kCPOTVideoResource};a.inherits(a.CPVCVideo,a.FMRVideo);a.ThreeDBgVideo=
function(b){a.movie.vdm.ThreeDBgVideo=this;this.ThreeDSlide=b};a.ThreeDBgVideo.prototype.seekTo=function(a){this.ThreeDSlide.seekTo(a)};a.ThreeDBgVideo.prototype.pause=function(){this.ThreeDSlide.pause()};a.ThreeDBgVideo.prototype.unloadVideo=function(){this.ThreeDSlide.unloadVideo()};a.ThreeDBgVideo.prototype.play=function(){this.ThreeDSlide.play()};a.ThreeDBgVideo.prototype.updateFrame=function(){this.ThreeDSlide.updateFrame()};a.SlideVideo=function(b){a.SlideVideo.baseConstructor.call(this,b);
this.autoPlay=1;this.seek_From=this.getAttribute("vsf");this.seek_To=this.getAttribute("vst");this.showInTOC=this.getAttribute("sit");this.continueToNextSlide=this.getAttribute("continueToNextSlide");this.continueFromPrevSlide=this.getAttribute("continueFromPrevSlide");this.type=a.kCPOTVideo};a.inherits(a.SlideVideo,a.EventVideo);a.SlideVideo.prototype.reset=function(b){this.vdm.verbose&&a.log("SlideVideo "+this.id+" reset("+b+")");this.delayStartTimer&&(clearTimeout(this.delayStartTimer),delete this.delayStartTimer);
if(b==a.Timeline.ReasonForUpdate.PROGRESS&&this.continueToNextSlide)this.nativeVideo&&(this.nativeVideo=this.nativeVideo.cpVideo=null);else if(this.pause(),this.showInTOC){if(a.toc.rootObj.showVideo(!1),this.nativeVideo){this.nativeVideo.cpVideo=null;if(a.device==a.IDEVICE||a.device==a.ANDROID){var c=this.src;this.src="_cp_n_m_";var e=this.nativeVideo;(function(){if(e.cpSrc==c){e.cpSrc="_cp_n_m_";try{e.src="_cp_n_m_"}catch(a){}try{e.load()}catch(b){}}})()}this.nativeVideo=null}}else if(this.nativeVideo){this.nativeVideo.cpVideo=
null;this.nativeVideo.style.display="none";if(a.device==a.IDEVICE||a.device==a.ANDROID)c=this.src,this.src="_cp_n_m_",e=this.nativeVideo,function(){if(e.cpSrc==c){e.cpSrc="_cp_n_m_";try{e.src="_cp_n_m_"}catch(a){}try{e.load()}catch(b){}}}();this.nativeVideo=null}this.isDrawn=!1;if(b!=a.Timeline.ReasonForUpdate.PROGRESS||!this.continueToNextSlide)this.element.style.width="0px",this.element.style.height="0px",this.element.style.left="0px",this.element.style.top="0px";if(a.device==a.IDEVICE||a.device==
a.ANDROID)a.movie.stage.VideoPlaying=!1;this.ended=!1;delete this.seekToTime};a.SlideVideo.prototype.onEndOfMovie=function(){this.vdm.verbose&&a.log("SlideVideo "+this.id+" onEndOfMovie()");this.pause();this.nativeVideo&&(this.nativeVideo=this.nativeVideo.cpVideo=null);this.isDrawn=!1;if(a.device==a.IDEVICE||a.device==a.ANDROID)a.movie.stage.VideoPlaying=!1;this.ended=!1;delete this.seekToTime};a.SlideVideo.prototype.drawForResponsive=function(b,c){if(!this.responsiveCSS)return!1;if(this.isDrawn&&
!b)return!0;var e=a.getResponsiveCSS(this.responsiveCSS);this.canvasObj=a.D[this.parentDivName+"c"];a.getCSSFromLayouter(e,this);var d=!1,d=this.sh&&!this.sh.i,f=void 0!=this.tr;if(this.isDrawn&&this.currentCSS==e&&!d&&!f&&(!b||c==a.ReasonForDrawing.kMoviePaused))return!0;var g=this.currentCSS=e;if(!b){if(a.device==a.IDEVICE||a.device==a.ANDROID){if(a.movie.stage.VideoPlaying)return!1;a.movie.stage.VideoPlaying=!0}this.vdm.verbose&&a.log("SlideVideo "+this.id+" start()")}if(this.showInTOC)return this.isDrawn=
!0,!1;f=0;this.tr&&(f=a.getAngleFromRotateStr(this.tr));(d=a.movie.stage.NativeSlideVideoElement)?d.parentElement.style.zIndex=a.D[a.D[this.element.id].dn].zIndex:(d=this.element,a.movie.stage.NativeSlideVideoElement=this.element);this.actualDrawingElement=a.movie.stage.NativeSlideVideoElement;var h=this.actualParent;a.applyResponsiveStyles(h,g,!0);a.applyResponsiveStyles(d,g,!0);g=a.movie.stage.mainSlideDiv.getBoundingClientRect();g=a.createResponsiveStyleObj(e,void 0,"0px","0px","0px","0px",g.width+
"px",g.height+"px",void 0);a.applyResponsiveStyles(d.parentElement,g);this.parentElementClientBoundingRect=d.parentElement.getBoundingClientRect();d.rotateAngle=f;this.tr&&(a.applyTransform(d,this.tr),a.applyTransform(h,this.tr),d.tr=this.tr,h.tr=this.tr);this.sh&&!this.sh.i&&(e=this.sh.a-f,a.applyShadow(d,this.sh.d*Math.cos(Math.PI*e/180)+"px "+this.sh.d*Math.sin(Math.PI*e/180)+"px "+this.sh.b+"px "+a.ConvertRGBToRGBA(this.sh.c,this.sh.o)+(this.sh.i?" inset":"")));this.re&&(d.parentElement.style.webkitBoxReflect=
"below "+this.re.d+"px -webkit-gradient(linear, left top, left bottom, from(transparent), color-stop("+(1-this.re.s/100)+", transparent), to(rgba(255, 255, 255, "+(1-this.re.p/100)+")))");this.transIn&&c==a.ReasonForDrawing.kRegularDraw&&(d.parentElement.style.opacity=0);this.visible||a.hide(this.parentDivName);return this.isDrawn=!0};a.SlideVideo.prototype.drawIfNeeded=function(b){if((!a.responsive||!this.drawForResponsive(b))&&!this.isDrawn){if(a.device==a.IDEVICE||a.device==a.ANDROID){if(a.movie.stage.VideoPlaying)return;
a.movie.stage.VideoPlaying=!0}if(!this.showInTOC){this.vdm.verbose&&a.log("SlideVideo "+this.id+" start()");var c=this.bounds,e=0;this.tr&&(e=a.getAngleFromRotateStr(this.tr));(b=a.movie.stage.NativeSlideVideoElement)?b.parentElement.style.zIndex=a.D[a.D[this.element.id].dn].zIndex:(b=this.element,a.movie.stage.NativeSlideVideoElement=this.element);this.actualDrawingElement=a.movie.stage.NativeSlideVideoElement;var d=this.actualParent;d.style.left=c.minX+"px";d.style.top=c.minY+"px";d.style.width=
c.maxX-c.minX+"px";d.style.height=c.maxY-c.minY+"px";var f=b.parentElement;f.style.left="0px";f.style.top="0px";f.style.width=a.D.project.w+"px";f.style.height=a.D.project.h+"px";b.rotateAngle=e;b.style.left=c.minX+"px";b.style.top=c.minY+"px";b.style.width=c.maxX-c.minX+"px";b.style.height=c.maxY-c.minY+"px";b.style.display="block";b.style.position="absolute";this.tr&&(a.applyTransform(b,this.tr),a.applyTransform(d,this.tr),b.tr=this.tr,d.tr=this.tr);this.sh&&!this.sh.i&&(c=this.sh.a-e,a.applyShadow(b,
this.sh.d*Math.cos(Math.PI*c/180)+"px "+this.sh.d*Math.sin(Math.PI*c/180)+"px "+this.sh.b+"px "+a.ConvertRGBToRGBA(this.sh.c,this.sh.o)+(this.sh.i?" inset":"")));this.re&&(b.parentElement.style.webkitBoxReflect="below "+this.re.d+"px -webkit-gradient(linear, left top, left bottom, from(transparent), color-stop("+(1-this.re.s/100)+", transparent), to(rgba(255, 255, 255, "+(1-this.re.p/100)+")))");this.transIn&&(b.parentElement.style.opacity=0);this.visible||a.hide(this.parentDivName)}this.isDrawn=
!0}};a.SlideVideo.prototype.addNativeVideoIfNeeded=function(){if(this.isDrawn&&!this.nativeVideo){this.showInTOC?(a.device==a.IDEVICE||a.device==a.ANDROID||(this.vdm.tocVideoChannel.cpVideo=null,this.vdm.tocVideoChannel0.cpSrc==this.src?(this.vdm.verbose&&a.log("TOCVideo "+this.id+" found existing @ tocV0"),this.vdm.tocVideoChannel=this.vdm.tocVideoChannel0):this.vdm.tocVideoChannel1.cpSrc==this.src?(this.vdm.verbose&&a.log("TOCVideo "+this.id+" found existing @ tocV1"),this.vdm.tocVideoChannel=this.vdm.tocVideoChannel1):
this.vdm.tocVideoChannel=this.vdm.tocVideoChannel0),this.nativeVideo=this.vdm.tocVideoChannel):(a.device==a.IDEVICE||a.device==a.ANDROID||(this.vdm.slideVideoChannel0.cpVideo=null,this.vdm.slideVideoChannel0.cpSrc==this.src?(this.vdm.verbose&&a.log("SlideVideo "+this.id+" found existing @ SV0"),this.vdm.slideVideoChannel=this.vdm.slideVideoChannel0):this.vdm.slideVideoChannel1.cpSrc==this.src?(this.vdm.verbose&&a.log("SlideVideo "+this.id+" found existing @ SV1"),this.vdm.slideVideoChannel=this.vdm.slideVideoChannel1):
this.vdm.slideVideoChannel=this.vdm.slideVideoChannel0),this.nativeVideo=this.vdm.slideVideoChannel);this.nativeVideo.cpVideo=this;this.paused=this.nativeVideo.paused;var b=!1;if(this.continueFromPrevSlide)this.nativeVideo.paused&&this.seekTo(cpInfoCurrentFrame);else if(this.nativeVideo.cpSrc==this.src)this.seekTo(this.from);else{if(a.device==a.IDEVICE||a.device==a.ANDROID){try{this.nativeVideo.src="_cp_n_m_"}catch(c){}try{this.nativeVideo.load()}catch(e){}}a.setSrcAndLoadVideoChannel(this.nativeVideo,
this.src);this.seekTo(this.from);b=!0}if(this.showInTOC)this.nativeVideo.CPtoc=!0,b&&(a.device==a.IDEVICE&&a.IOSMajor>=a.IOS5||a.device==a.ANDROID)?(this.nativeVideo.CPcanPlay=!1,this.nativeVideo.style.position="fixed",this.nativeVideo.style.left="-99999px",this.nativeVideo.style.width="192px",this.nativeVideo.style.height="144px",this.nativeVideo.from=this.from,this.nativeVideo.to=this.to,a.toc.rootObj.showVideo(!1)):a.toc.rootObj.showVideo(!0);else{this.nativeVideo.CPtoc=!1;var d=this.bounds;this.nativeVideo.style.display=
"block";a.responsive?(this.nativeVideo.style.width="100%",this.nativeVideo.style.height="100%"):(this.nativeVideo.style.width=d.maxX-d.minX+"px",this.nativeVideo.style.height=d.maxY-d.minY+"px");if(b&&(a.device==a.IDEVICE&&a.IOSMajor>=a.IOS5||a.device==a.ANDROID))this.nativeVideo.CPcanPlay=!1,this.nativeVideo.style.position="fixed",this.nativeVideo.style.left="-99999px",this.nativeVideo.from=this.from,this.nativeVideo.to=this.to;b=a.movie.stage.NativeSlideVideoElement;b.appendChild(this.nativeVideo);
this.actualParent.drawingBoard=b.parentElement;this.visible&&(b.style.display="block",b.style.visibility="visible")}if(this.visible){if(b=a.DESKTOP==a.device&&a.SAFARI===a.browser&&7<=a.browserVersion)this.nativeVideo.controls=!0;this.autoPlay?this.play():this.nativeVideo&&b&&(this.nativeVideo.controls=!0)}else this.visible||a.hide(this.parentDivName);a.redrawVideo(this.nativeVideo)}};a.SlideVideo.prototype.updateFrame=function(){this.updateEffects(this.hasEffect);if(this.paused&&!a.movie.paused&&
this.autoPlay&&this.visible){if(!this.ended&&this.nativeVideo&&this.nativeVideo.ended&&250>(new Date).getTime()-this.pacedAt||this.nativeVideo&&this.nativeVideo.currentTime>=this.nativeVideo.duration&&this.src==this.nativeVideo.cpSrc)return;this.play()}this.effectIsStarted||(this.effectIsStarted=!0)};a.SlideVideo.prototype.seekTo=function(b){this.vdm.verbose&&a.log("SlideVideo "+this.id+" seekTo("+b+")");if(this.loop&&this.loopFrames){if(this.from<=b)return this.setCurrentTime((b-this.from)%this.loopFrames/
cpInfoFPS+this.seek_From),this.ended=!1,!0}else{if(this.from<=b&&this.to>=b)return this.setCurrentTime((b-this.from)/cpInfoFPS+this.seek_From),this.ended=!1,!0;this.to>=b&&(this.setCurrentTime(this.seek_From),this.ended=!1)}return!1};a.SlideVideo.prototype.pause=function(){var b=this.nativeVideo&&!this.nativeVideo.paused&&!this.nativeVideo.ended;a.SlideVideo.superClass.pause.call(this);if(a.device==a.IDEVICE||a.device==a.ANDROID)if(b&&this.nativeVideo&&(this.nativeVideo.paused||this.nativeVideo.ended))a.movie.stage.VideoPlaying=
!1};a.SlideVideo.prototype.play=function(){var b=this.nativeVideo&&!this.nativeVideo.paused&&!this.nativeVideo.ended;a.SlideVideo.superClass.play.call(this);if((a.device==a.IDEVICE||a.device==a.ANDROID)&&!b&&this.nativeVideo&&!this.nativeVideo.paused&&!this.nativeVideo.ended)a.movie.stage.VideoPlaying=!0};a.YTStreamingVideo=function(b){a.YTStreamingVideo.baseConstructor.call(this,b);this.type=a.kCPOTYTStreamingVideo;a.movie.stage.NativeSlideVideoElement=b;this.createChannel(b);b=a.movie.vdm.youtubeSlideVideoChannel;
cpInfoCurrentFrame>=this.from&&cpInfoCurrentFrame<=this.to&&b.show(this.visible);this.nativeVideo=b;this.nativeVideo.cpVideo=this};a.inherits(a.YTStreamingVideo,a.SlideVideo);a.YTStreamingVideo.prototype.createChannel=function(b){var c=this.bounds.maxX-this.bounds.minX,e=this.bounds.maxY-this.bounds.minY;a.movie.vdm.youtubeSlideVideoChannel=new a.YoutubeVideo(a.getYoutubeVideoIdFromURL(this.src),c,e,b);(0!=this.seek_From||cpInfoCurrentFrame>=this.from)&&this.seekTo(this.from)};a.YTStreamingVideo.prototype.addNativeVideoIfNeeded=
function(){if(this.isDrawn&&!this.nativeVideo){this.vdm.youtubeSlideVideoChannel||this.createChannel(this.element);this.nativeVideo=a.movie.vdm.youtubeSlideVideoChannel;this.nativeVideo.cpVideo=this;this.paused=this.nativeVideo.paused;var b=a.movie.stage.NativeSlideVideoElement;this.visible?(a.show(this.parentDivName),b.style.display="block",b.style.visibility="visible",this.nativeVideo.show(!0),this.autoPlay&&this.play()):(a.hide(this.parentDivName),this.nativeVideo.show(!1))}};a.YTStreamingVideo.prototype.play=
function(){var b=this.nativeVideo&&!this.nativeVideo.paused&&!this.nativeVideo.ended,c=a.movie.vdm.youtubeSlideVideoChannel;this.paused=!1;if(c&&(c.play(),(a.device==a.IDEVICE||a.device==a.ANDROID)&&!b&&this.nativeVideo&&!this.nativeVideo.paused&&!this.nativeVideo.ended))a.movie.stage.VideoPlaying=!0};a.YTStreamingVideo.prototype.pause=function(){var b=this.nativeVideo&&!this.nativeVideo.paused&&!this.nativeVideo.ended,c=a.movie.vdm.youtubeSlideVideoChannel;this.paused=!0;if(c&&(c.pause(),a.device==
a.IDEVICE||a.device==a.ANDROID))if(b&&this.nativeVideo&&(this.nativeVideo.paused||this.nativeVideo.ended))a.movie.stage.VideoPlaying=!1};a.YTStreamingVideo.prototype.reset=function(){this.nativeVideo&&(this.nativeVideo.stop(),this.nativeVideo.hide());this.isDrawn=!1;if(a.device==a.IDEVICE||a.device==a.ANDROID)a.movie.stage.VideoPlaying=!1;this.ended=!1;this.nativeVideo=void 0;a.movie.stage.NativeSlideVideoElement=void 0;a.movie.vdm.youtubeSlideVideoChannel=void 0};a.YTStreamingVideo.prototype.setCurrentTime=
function(b){var c=a.movie.vdm.youtubeSlideVideoChannel;c&&c.seekToTime(b)};a.YTStreamingVideo.prototype.onEndOfMovie=function(){a.YTStreamingVideo.superClass.onEndOfMovie.call(this);var b=a.movie.vdm.youtubeSlideVideoChannel;this.isDrawn=!1;b&&b.stop()};a.YTStreamingVideo.prototype.updateFrame=function(){this.updateEffects(this.hasEffect);var b=a.movie.vdm.youtubeSlideVideoChannel,b=b?b.paused:!1;(this.paused||b)&&(!a.movie.paused&&this.autoPlay&&this.visible)&&this.play();this.effectIsStarted||(this.effectIsStarted=
!0)};a.VimeoStreamingVideo=function(b){a.VimeoStreamingVideo.baseConstructor.call(this,b);this.type=a.kCPOTVimeoStreamingVideo;a.movie.stage.NativeSlideVideoElement=b;this.createChannel(b);b=a.movie.vdm.vimeoSlideVideoChannel;cpInfoCurrentFrame>=this.from&&cpInfoCurrentFrame<=this.to&&b.show(this.visible);this.nativeVideo=b;this.nativeVideo.cpVideo=this};a.inherits(a.VimeoStreamingVideo,a.SlideVideo);a.VimeoStreamingVideo.prototype.createChannel=function(b){a.movie.vdm.vimeoSlideVideoChannel=new a.VimeoVideo(this.src,
this.bounds.maxX-this.bounds.minX,this.bounds.maxY-this.bounds.minY,b);(0!=this.seek_From||cpInfoCurrentFrame>=this.from)&&this.seekTo(this.from)};a.VimeoStreamingVideo.prototype.addNativeVideoIfNeeded=function(){if(this.isDrawn&&!this.nativeVideo){this.vdm.vimeoSlideVideoChannel||this.createChannel(this.element);this.nativeVideo=a.movie.vdm.vimeoSlideVideoChannel;this.nativeVideo.cpVideo=this;this.paused=this.nativeVideo.paused;var b=a.movie.stage.NativeSlideVideoElement;this.visible?(a.show(this.parentDivName),
b.style.display="block",b.style.visibility="visible",this.nativeVideo.show(!0),this.autoPlay&&this.play()):(a.hide(this.parentDivName),this.nativeVideo.show(!1))}};a.VimeoStreamingVideo.prototype.play=function(){var b=this.nativeVideo&&!this.nativeVideo.paused&&!this.nativeVideo.ended,c=a.movie.vdm.vimeoSlideVideoChannel;this.paused=!1;if(c&&(c.play(),(a.device==a.IDEVICE||a.device==a.ANDROID)&&!b&&this.nativeVideo&&!this.nativeVideo.paused&&!this.nativeVideo.ended))a.movie.stage.VideoPlaying=!0};
a.VimeoStreamingVideo.prototype.pause=function(){var b=this.nativeVideo&&!this.nativeVideo.paused&&!this.nativeVideo.ended,c=a.movie.vdm.vimeoSlideVideoChannel;this.paused=!0;if(c&&(c.pause(),a.device==a.IDEVICE||a.device==a.ANDROID))if(b&&this.nativeVideo&&(this.nativeVideo.paused||this.nativeVideo.ended))a.movie.stage.VideoPlaying=!1};a.VimeoStreamingVideo.prototype.reset=function(){this.nativeVideo&&(this.nativeVideo.stop(),this.nativeVideo.hide());this.isDrawn=!1;if(a.device==a.IDEVICE||a.device==
a.ANDROID)a.movie.stage.VideoPlaying=!1;this.ended=!1;this.nativeVideo=void 0;a.movie.stage.NativeSlideVideoElement=void 0;a.movie.vdm.vimeoSlideVideoChannel=void 0};a.VimeoStreamingVideo.prototype.setCurrentTime=function(b){var c=a.movie.vdm.vimeoSlideVideoChannel;c&&c.seekToTime(b)};a.VimeoStreamingVideo.prototype.onEndOfMovie=function(){a.VimeoStreamingVideo.superClass.onEndOfMovie.call(this);var b=a.movie.vdm.vimeoSlideVideoChannel;this.isDrawn=!1;b&&b.stop()};a.VimeoStreamingVideo.prototype.updateFrame=
function(){this.updateEffects(this.hasEffect);var b=a.movie.vdm.vimeoSlideVideoChannel,b=b?b.paused:!1;(this.paused||b)&&(!a.movie.paused&&this.autoPlay&&this.visible)&&this.play();this.effectIsStarted||(this.effectIsStarted=!0)}})(window.cp);
cp.GESTURE_EVENT_TYPES={};cp.GESTURE_EVENT_TYPES.TAP="tap";cp.GESTURE_EVENT_TYPES.DOUBLE_TAP="doubletap";cp.GESTURE_EVENT_TYPES.LONG_TAP="longtap";cp.GESTURE_EVENT_TYPES.HOLD="hold";cp.GESTURE_EVENT_TYPES.ROTATE="rotate";cp.GESTURE_EVENT_TYPES.DRAG="drag";cp.GESTURE_EVENT_TYPES.DRAG_START="dragstart";cp.GESTURE_EVENT_TYPES.DRAG_END="dragend";cp.GESTURE_EVENT_TYPES.SWIPE_UP="swipeup";cp.GESTURE_EVENT_TYPES.SWIPE_DOWN="swipedown";cp.GESTURE_EVENT_TYPES.SWIPE_LEFT="swipeleft";
cp.GESTURE_EVENT_TYPES.SWIPE_RIGHT="swiperight";cp.GESTURE_EVENT_TYPES.TOUCH="touch";cp.GESTURE_EVENT_TYPES.RELEASE="release";cp.GESTURE_EVENT_TYPES.PINCH_OUT="pinchout";cp.GESTURE_EVENT_TYPES.PINCH_IN="pinchin";cp.GESTURE_EVENT_TYPES.TAP_ONE="tapone";cp.GESTURE_EVENT_TYPES.TAP_TWO="taptwo";cp.GESTURE_EVENT_TYPES.TAP_THREE="tapthree";cp.GESTURE_EVENT_TYPES.SWIPE_MOVE="swipemove";cp.GESTURE_EVENT_TYPES.SWIPE_ONE="swipeone";cp.GESTURE_EVENT_TYPES.SWIPE_TWO="swipetwo";
cp.GESTURE_EVENT_TYPES.SWIPE_THREE="swipethree";cp.GESTURE_EVENT_TYPES.SWIPE_FOUR="swipefour";cp.GESTURE_EVENT_TYPES.SWIPE_LEFT_UP="swipeleftup";cp.GESTURE_EVENT_TYPES.SWIPE_LEFT_DOWN="swipeleftdown";cp.GESTURE_EVENT_TYPES.SWIPE_RIGHT_UP="swiperightup";cp.GESTURE_EVENT_TYPES.SWIPE_RIGHT_DOWN="swiperightdown";cp.GESTURE_EVENT_TYPES.PINCH="pinch";cp.GESTURE_EVENT_TYPES.PINCH_OPEN="pinchopen";cp.GESTURE_EVENT_TYPES.PINCH_CLOSE="pinchclose";cp.GESTURE_EVENT_TYPES.ROTATECW="rotatecw";
cp.GESTURE_EVENT_TYPES.ROTATECCW="rotateccw";cp.GESTURE_EVENT_TYPES.SHAKE="shake";cp.GESTURE_EVENT_TYPES.SHAKE_FRONT_BACK="shakefrontback";cp.GESTURE_EVENT_TYPES.SHAKE_LEFT_RIGHT="shakeleftright";cp.GESTURE_EVENT_TYPES.SHAKE_UP_DOWN="shakeupdown";cp.GestureHandler=function(){this.movie=cp.movie;this.enabled=!0;this.initializeDefaultGestureEvents()};
cp.GestureHandler.prototype.scaleMovie=function(a,b){a.gesture.stopPropagation();a.gesture.preventDefault();var c=cp("div_Slide");c.style.webkitTransformOrigin=""+a.gesture.center.pageX+" "+a.gesture.center.pageY+"";c.style.MozTransformOrigin=""+a.gesture.center.pageX+" "+a.gesture.center.pageY+"";c.style.msTransformOrigin=""+a.gesture.center.pageX+" "+a.gesture.center.pageY+"";c.style.webkitTransform="scale("+!b?a.gesture.scale:"1)";c.style.MozTransform="scale("+!b?a.gesture.scale:"1)";c.style.msTransform=
"scale("+!b?a.gesture.scale:"1)"};cp.GestureHandler.prototype.addCPEventListeners=function(){if(cp.device!=cp.DESKTOP){var a=this;cp.em.addEventListener(function(b){a.resetZoom.call(a,b);a.resetScroll.call(a,b)},cp.SLIDEENTEREVENT);cp.em.addEventListener(function(b){a.resetZoom.call(a,b);a.resetScroll.call(a,b)},cp.ORIENTATIONCHANGEDEVENT)}};cp.GestureHandler.prototype.registerGestureEvent=function(a,b,c){if(!cp.IsGestureSupportedDevice()||!cp.useg)a.onclick=c};
cp.GestureHandler.prototype.removeGestureEvent=function(a){if(!cp.IsGestureSupportedDevice()||!cp.useg)a.onclick=void 0};cp.GestureHandler.prototype.clearCache=function(){};cp.GestureHandler.prototype.clearStaticCache=function(){};cp.GestureHandler.prototype.enableGestures=function(){this.enabled=!0;"undefined"!=typeof Hammer&&(Hammer&&Hammer.detection)&&(Hammer.detection.current=null)};cp.GestureHandler.prototype.disableGestures=function(){this.enabled=!1};
cp.GestureHandler.prototype.addScaleEvent=function(){};cp.GestureHandler.prototype.changeClickEventsToTouch=function(){this.registerGestureEvent(cp("playImage"),cp.GESTURE_EVENT_TYPES.TAP,function(){cp.movie.play()},!0);this.registerGestureEvent(cp("ccClose"),cp.GESTURE_EVENT_TYPES.TAP,function(){cp.showHideCC()},!0)};cp.GestureHandler.prototype.scrollH=function(a){var b=cp.responsive?cp("project"):cp("main_container"),a=b.getBoundingClientRect().left+a;b.style.left=a+"px"};
cp.GestureHandler.prototype.scrollV=function(a){var b=cp.responsive?cp("project"):cp("main_container"),a=b.getBoundingClientRect().top+a;b.style.top=a+"px"};
cp.GestureHandler.prototype.getDefaultGestureHandler=function(a){switch(a){case cp.GESTURE_EVENT_TYPES.TAP_TWO:return function(){cp.m_gestureHandler.enabled&&cp.handlePlaybarShowHide()};case cp.GESTURE_EVENT_TYPES.LONG_TAP:return function(){cp.m_gestureHandler.enabled&&cp.toggleMoviePlayPause()};case cp.GESTURE_EVENT_TYPES.HOLD:return function(){cp.m_gestureHandler.enabled&&cp.handlePlaybarShowHide()};case cp.GESTURE_EVENT_TYPES.DOUBLE_TAP:return function(){cp.m_gestureHandler.enabled&&cp.handleTOCOpenClose()};
case cp.GESTURE_EVENT_TYPES.SWIPE_UP:return function(a){if(cp.m_gestureHandler.enabled){if(cp.canScroll("up",cp.GESTURE_EVENT_TYPES.SWIPE_UP))return!1;50>a.gesture.distance||(a.gesture.stopPropagation(),a.gesture.preventDefault(),cp("div_Slide").scaleFactor&&1!=cp("div_Slide").scaleFactor||cp.shouldDrawCurrentSlideInPannableMode()||cp.togglePlaybarShowHide())}};case cp.GESTURE_EVENT_TYPES.SWIPE_DOWN:return function(a){if(cp.m_gestureHandler.enabled){if(cp.canScroll("down",cp.GESTURE_EVENT_TYPES.SWIPE_DOWN))return!1;
50>a.gesture.distance||(a.gesture.stopPropagation(),a.gesture.preventDefault(),cp("div_Slide").scaleFactor&&1!=cp("div_Slide").scaleFactor||cp.shouldDrawCurrentSlideInPannableMode()||cp.togglePlaybarShowHide())}};case cp.GESTURE_EVENT_TYPES.SWIPE_LEFT:return function(a){if(cp.m_gestureHandler.enabled){if(!cp.responsive&&cp.canScroll("left",cp.GESTURE_EVENT_TYPES.SWIPE_LEFT))return!1;if(!(50>a.gesture.distance)&&(a.gesture.stopPropagation(),a.gesture.preventDefault(),!(cp("div_Slide").scaleFactor&&
1!=cp("div_Slide").scaleFactor)&&!cp.shouldDrawCurrentSlideInPannableMode()&&(!cp.D||!cp.D.baq))){var a=cp.goToNextSlide,c=window;if(cp.movie.stage&&cp.movie.stage.currentSlide){var d=cp.movie.stage.currentSlide;if(!d.useng)return;if("Question Slide"==d.st&&(d=cp.getQuestionObject(cp.D[d.mdi].dn)))a=d.moveForward,c=d}a.call(c,void 0)}}};case cp.GESTURE_EVENT_TYPES.SWIPE_RIGHT:return function(a){if(cp.m_gestureHandler.enabled){if(!cp.responsive&&cp.canScroll("right",cp.GESTURE_EVENT_TYPES.SWIPE_RIGHT))return!1;
if(!(50>a.gesture.distance)&&(a.gesture.stopPropagation(),a.gesture.preventDefault(),!(cp("div_Slide").scaleFactor&&1!=cp("div_Slide").scaleFactor)&&!cp.shouldDrawCurrentSlideInPannableMode()&&(!cp.D||!cp.D.baq))){var a=cp.goToPreviousSlide,c=window;if(cp.movie.stage&&cp.movie.stage.currentSlide){var d=cp.movie.stage.currentSlide;if(!d.useng)return;if("Question Slide"==d.st&&(d=cp.getQuestionObject(cp.D[d.mdi].dn)))a=d.moveBackward,c=d}a.call(c,void 0)}}}}};
cp.GestureHandler.prototype.initializeDefaultGestureEvents=function(){cp("div_Slide").scaleFactor=1;if(cp.IsGestureSupportedDevice()&&cp.useg){this.changeClickEventsToTouch();var a=cp("div_Slide"),b=cp("main_container");cp.D.project.shc||this.addScaleEvent();this.registerGestureEvent(a,cp.GESTURE_EVENT_TYPES.LONG_TAP,this.getDefaultGestureHandler(cp.GESTURE_EVENT_TYPES.LONG_TAP),!0);cp.isTouchMacOS10_15OrMore&&cp.D.project.shc?(a.addEventListener("dblclick",cp.handleTOCOpenClose),b.addEventListener("dblclick",
cp.handleTOCOpenClose)):this.registerGestureEvent(a,cp.GESTURE_EVENT_TYPES.DOUBLE_TAP,this.getDefaultGestureHandler(cp.GESTURE_EVENT_TYPES.DOUBLE_TAP),!0);this.registerGestureEvent(a,cp.GESTURE_EVENT_TYPES.SWIPE_UP,this.getDefaultGestureHandler(cp.GESTURE_EVENT_TYPES.SWIPE_UP),!0);this.registerGestureEvent(a,cp.GESTURE_EVENT_TYPES.SWIPE_DOWN,this.getDefaultGestureHandler(cp.GESTURE_EVENT_TYPES.SWIPE_DOWN),!0);this.registerGestureEvent(a,cp.GESTURE_EVENT_TYPES.SWIPE_LEFT,this.getDefaultGestureHandler(cp.GESTURE_EVENT_TYPES.SWIPE_LEFT),
!0);this.registerGestureEvent(a,cp.GESTURE_EVENT_TYPES.SWIPE_RIGHT,this.getDefaultGestureHandler(cp.GESTURE_EVENT_TYPES.SWIPE_RIGHT),!0)}};cp.GestureHandler.prototype.resetZoom=function(){};cp.GestureHandler.prototype.resetScroll=function(){};cp.GestureHandler.prototype.initializeProjectGestures=function(){if(cp.useg){var a=cp.D.project.GestureData;if(a)for(var b in a)cp.registerGestureEvent(cp("project"),b,a[b],!0)}};
cp.GestureHandler.prototype.getEventPageX=function(a){var b=a;a.changedTouches&&0<a.changedTouches.length&&(b=a.changedTouches[0]);if(!b)return 0;if(b.pageX)return b.pageX;var a=document.documentElement,c=document.body;return b.clientX+(a&&a.scrollLeft||c&&c.scrollLeft||0)-(a&&a.clientLeft||c&&c.clientLeft||0)};
cp.GestureHandler.prototype.getEventPageY=function(a){var b=a;a.changedTouches&&0<a.changedTouches.length&&(b=a.changedTouches[0]);if(!b)return 0;if(b.pageY)return b.pageY;var a=document.documentElement,c=document.body;return b.clientY+(a&&a.scrollTop||c&&c.scrollTop||0)-(a&&a.clientTop||c&&c.clientTop||0)};cp.registerGestureEvent=function(a,b,c,d,e){a&&(b&&c&&cp.m_gestureHandler)&&cp.m_gestureHandler.registerGestureEvent(a,b,c,d,e)};
cp.removeGestureEvent=function(a,b,c,d){a&&(b&&cp.m_gestureHandler)&&cp.m_gestureHandler.removeGestureEvent(a,b,c,d)};cp.clearGestureCache=function(a){cp.m_gestureHandler&&cp.m_gestureHandler.clearCache(a)};cp.clearStaticGestureCache=function(a){cp.m_gestureHandler&&cp.m_gestureHandler.clearStaticCache(a)};cp.IsGestureSupportedDevice=function(){return(cp.device==cp.IDEVICE||cp.device==cp.ANDROID)&&cp.D.project_main.responsiveType!==cp.kCPPMEVR&&!(cp.movie&&cp.movie.stage&&"ThreeD Slide"==cp.movie.stage.GetCurrentSlideType())};
cp.initializeGestureEvents=function(){cp.m_gestureHandler||(cp.IsGestureSupportedDevice()&&(cp("cpDocument").style.overflow="auto"),cp.m_gestureHandler=!cp.IsGestureSupportedDevice()||!cp.useg?new cp.GestureHandler:new cp.HammerGestureHandler,cp.m_gestureHandler.initializeProjectGestures())};cp.getMainWindow=function(a){if(cp.device===cp.IDEVICE&&(cp.browser===cp.UNKNOWN||cp.browser===cp.SAFARI))for(;a.frameElement;)a=a.parent.window;return a};
cp.getWindowInnerHeight=function(a){var b=0;if(cp.device===cp.IDEVICE&&(cp.browser===cp.UNKNOWN||cp.browser===cp.SAFARI)){if(a.frameElement){var c=a.frameElement.parentElement;c&&"IFRAME"!==c.tagName&&(b=c.getBoundingClientRect()?c.getBoundingClientRect().height:0)}return 0==b?a.innerHeight:b}return a.innerHeight};
cp.getWindowInnerWidth=function(a){var b=0;if(cp.device===cp.IDEVICE&&(cp.browser===cp.UNKNOWN||cp.browser===cp.SAFARI)){if(a.frameElement){var c=a.frameElement.parentElement;c&&"IFRAME"!==c.tagName&&(b=c.getBoundingClientRect()?c.getBoundingClientRect().width:0)}return 0==b?a.innerWidth:b}return a.innerWidth};
cp.canScroll=function(a,b){if(!cp.m_gestureHandler||!cp.m_gestureHandler.enabled||cp.D.project.shc||1!=cp("div_Slide").scaleFactor)return!1;if(b!=cp.GESTURE_EVENT_TYPES.DRAG&&cp.m_gestureHandler.isScrolling)return!0;var c=cp.responsive?cp("project").getBoundingClientRect():cp("main_container").getBoundingClientRect();switch(a){case "up":return c.bottom>cp.getWindowInnerHeight(window);case "down":return 0>c.top;case "left":return c.right>cp.getWindowInnerWidth(window);case "right":return 0>c.left;
default:return!1}};
cp.HammerGestureHandler=function(){cp.HammerGestureHandler.baseConstructor.call(this)};cp.inherits(cp.HammerGestureHandler,cp.GestureHandler);
cp.HammerGestureHandler.prototype.scaleMovie=function(a,c){a.gesture.stopPropagation();a.gesture.preventDefault();var b=cp("div_Slide");b.style.webkitTransformOrigin=""+a.gesture.center.pageX+" "+a.gesture.center.pageY+"";b.style.MozTransformOrigin=""+a.gesture.center.pageX+" "+a.gesture.center.pageY+"";b.style.msTransformOrigin=""+a.gesture.center.pageX+" "+a.gesture.center.pageY+"";b.style.webkitTransform="scale("+!c?a.gesture.scale:"1)";b.style.MozTransform="scale("+!c?a.gesture.scale:"1)";b.style.msTransform=
"scale("+!c?a.gesture.scale:"1)"};var hammerVolatileCache={},hammerStaticCache={};cp.__debugHammerCache=function(){return[hammerVolatileCache,hammerStaticCache]};
cp.HammerGestureHandler.prototype.registerGestureEvent=function(a,c,b,d,h){if(a&&c&&b)if(a.onclick=void 0,h&&c==cp.GESTURE_EVENT_TYPES.TAP)a.addEventListener("touchstart",b,!1);else{var h=!1,f;(f=d?hammerStaticCache[a.id]:hammerVolatileCache[a.id])||(h=!0);a&&("input"==a.tagName.toLowerCase()&&"text"==a.type||"textarea"==a.tagName.toLowerCase()||"select"==a.tagName.toLowerCase()||"toccontent"==a.id.toLowerCase())?(f||(f=Hammer(a)),f.on(cp.GESTURE_EVENT_TYPES.DRAG_END,this.fitMovie)):f||(f=Hammer(a,
{prevent_default:!0}));f.on(c,b);h&&(d?hammerStaticCache[a.id]=f:hammerVolatileCache[a.id]=f)}};cp.HammerGestureHandler.prototype.removeGestureEvent=function(a,c,b,d){a&&c&&(d&&c==cp.GESTURE_EVENT_TYPES.TAP?a.removeEventListener("touchstart",b,!1):((d=hammerVolatileCache[a.id])&&d.off(c,b),(d=hammerStaticCache[a.id])&&d.off(c,b)))};
cp.HammerGestureHandler.prototype.clearCache=function(a){if(a&&a.id){var c=hammerVolatileCache[a.id];if(c){c.destroy();delete hammerVolatileCache[a.id];return}}if(!a){for(var b in hammerVolatileCache)hammerVolatileCache[b].destroy();hammerVolatileCache={}}};
cp.GestureHandler.prototype.clearStaticCache=function(a){if(a&&a.id){var c=hammerStaticCache[a.id];if(c){c.destroy();delete hammerStaticCache[a.id];return}}if(!a){for(var b in hammerStaticCache)hammerStaticCache[b].destroy();hammerStaticCache={}}};
cp.HammerGestureHandler.prototype.fitMovie=function(a){if(!cp.m_gestureHandler.enabled)return!1;if(1==cp("div_Slide").scaleFactor){window.scrollTo(0,0);var c=cp.responsive?cp("project"):cp("main_container"),b=c.getBoundingClientRect();if(a&&a.gesture&&a.gesture.direction)switch(a.gesture.direction){case "up":b.bottom<window.innerHeight&&b.height>window.innerHeight&&(c.style.top=window.innerHeight-b.height+"px");break;case "down":0<b.top&&b.height>window.innerHeight&&(c.style.top="0px");break;case "left":b.right<
window.innerWidth&&b.width>window.innerWidth&&(c.style.left=window.innerWidth-b.width+"px");break;case "right":0<b.left&&b.width>window.innerWidth&&(c.style.left="0px");break;default:return!1}else cp.responsive&&(c.style.top=b.bottom<=window.innerHeight&&b.height>window.innerHeight?window.innerHeight-b.height+"px":"0px",0<=b.top&&(c.style.top="0px"))}a&&a.stopDetect&&a.stopDetect();return!1};
cp.HammerGestureHandler.prototype.addScaleEvent=function(){function a(a){if(!a.target||!("INPUT"==a.target.tagName.toUpperCase()||"SELECT"==a.target.tagName.toUpperCase()||"TEXTAREA"==a.target.tagName.toUpperCase()))(cp.isTextInputInFocus()||"SELECT"==document.activeElement.tagName.toUpperCase())&&document.activeElement.blur(),a.preventDefault()}cp("main_container");var c=cp("project"),b=cp("div_Slide");b.scaleFactor=1;Hammer(c,{prevent_default:!0,no_mouseevents:!0,transform_min_scale:1,drag_block_horizontal:!0,
drag_block_vertical:!0,drag_min_distance:0});this.previousScaleFactor=this.scaleFactor=b.scaleFactor=1;var d=0,h=0,f=0,n=0,o=0,p=0,q="",g=this;this.registerGestureEvent(c,"transformstart",function(a){if(!cp.m_gestureHandler.enabled)return!1;a.gesture.stopPropagation();a.gesture.preventDefault();e=a.gesture;d=[e.touches[0].pageX,e.touches[0].pageY];h=[e.touches[1].pageX,e.touches[1].pageY];f=(d[0]+h[0])/2;n=(d[1]+h[1])/2;o=f;p=n;a=b.getBoundingClientRect();q=(-a.left+o)/g.scaleFactor+"px "+(-a.top+
p)/g.scaleFactor+"px"},!0);this.registerGestureEvent(c,"transform",function(a){if(!cp.m_gestureHandler.enabled)return!1;a.gesture.stopPropagation();a.gesture.preventDefault();g.scaleFactor=g.previousScaleFactor*a.gesture.scale;g.scaleFactor=Math.max(1,Math.min(g.scaleFactor,3));b.scaleFactor=g.scaleFactor;g.transform(b,g.scaleFactor,q)},!0);this.registerGestureEvent(c,"transformend",function(a){if(!cp.m_gestureHandler.enabled)return!1;a.gesture.stopPropagation();a.gesture.preventDefault();b.scaleFactor=
g.scaleFactor;g.previousScaleFactor=g.scaleFactor;a.gesture.stopDetect&&a.gesture.stopDetect()},!0);var k,l,r,s,i,j,t=function(a){if(!cp.m_gestureHandler.enabled)return!1;1==b.scaleFactor&&!cp.shouldDrawCurrentSlideInPannableMode()?(g.fitMovie(a),b.scrollDeltaX=0,b.scrollDeltaY=0):(a.gesture.stopPropagation(),a.gesture.preventDefault(),a=a.gesture.touches||[a.gesture],k={pageX:a[0].pageX,pageY:a[0].pageY},l={pageX:a[0].pageX,pageY:a[0].pageY},r=parseFloat(b.style.left),s=parseFloat(b.style.top))},
u=function(a){if(!cp.m_gestureHandler.enabled)return!1;var d=cp.shouldDrawCurrentSlideInPannableMode();if(1==b.scaleFactor&&!d)if("up"==a.gesture.direction&&cp.canScroll("up",cp.GESTURE_EVENT_TYPES.DRAG)||"down"==a.gesture.direction&&cp.canScroll("down",cp.GESTURE_EVENT_TYPES.DRAG))g.scrollV(a.gesture.deltaY-b.scrollDeltaY),b.scrollDeltaY=a.gesture.deltaY,g.isScrolling=!0;else{if(!cp.responsive&&("left"==a.gesture.direction&&cp.canScroll("left",cp.GESTURE_EVENT_TYPES.DRAG)||"right"==a.gesture.direction&&
cp.canScroll("right",cp.GESTURE_EVENT_TYPES.DRAG)))g.scrollH(a.gesture.deltaX-b.scrollDeltaX),b.scrollDeltaX=a.gesture.deltaX,g.isScrolling=!0}else a.gesture.stopPropagation(),a.gesture.preventDefault(),c.getBoundingClientRect(),a=a.gesture.touches||[a.gesture],i=r+(a[0].pageX-k.pageX),j=s+(a[0].pageY-k.pageY),l={pageX:a[0].pageX,pageY:a[0].pageY},b.style.left=i+"px",b.style.top=j+"px"},v=function(a){a.gesture.stopDetect&&a.gesture.stopDetect();g.isScrolling=!1;cp.shouldDrawCurrentSlideInPannableMode()||
g.fitMovie(a);if(1==b.scaleFactor&&l&&k){var d=0.5<a.gesture.velocityY?a.gesture.velocityY:0,d=0<(0.5<a.gesture.velocityX?a.gesture.velocityX:0)||0<d;i+=(l.pageX-k.pageX)*a.gesture.velocityX;j+=(l.pageY-k.pageY)*a.gesture.velocityY;var f=c.getBoundingClientRect(),a=f.right-f.left,f=f.bottom-f.top,h=window.innerWidth,m=window.innerHeight;0<i||a<h?(i=0,d=!0):i<h-a&&(i=h-a,d=!0);0<j||f<m?(j=0,d=!0):j<m-f&&(j=m-f,d=!0);d&&$(b).animate({left:i,top:j},100,function(){})}};this.registerGestureEvent(b,"touchstart",
a,!0);this.registerGestureEvent(b,"touchmove",a,!0);this.registerGestureEvent(b,"touchend",a,!0);this.registerGestureEvent(b,"touchcancel",a,!0);this.registerGestureEvent(b,cp.GESTURE_EVENT_TYPES.DRAG_START,t,!0);this.registerGestureEvent(b,cp.GESTURE_EVENT_TYPES.DRAG,u,!0);this.registerGestureEvent(b,cp.GESTURE_EVENT_TYPES.DRAG_END,v,!0);this.ondragstarthandler=t;this.ondraghandler=u;this.ondragendhandler=v};
cp.HammerGestureHandler.prototype.transform=function(a,c,b){a.scaleFactor=c;var d="scaleX("+c+") scaleY("+c+")";a.style.webkitTransform=d;b&&(a.style.webkitTransformOrigin=b);a.style.transform=d;b&&(a.style.transformOrigin=b);if(1==c){if("div_Slide"===a.id&&cp.shouldDrawCurrentSlideInPannableMode()){var h;cp.movie.stage&&(h=cp.movie.stage.currentSlide)&&cp.adjustProjectHeight(h)}else a.style.left="0px",a.style.top="0px";this.previousScaleFactor>c&&(cp.fontMap=[],cp.adjustResponsiveItems(cp.ReasonForDrawing.kOrientationChangeOrResize),
cp.rescaleFontSizes());this.previousScaleFactor=this.scaleFactor=1}};cp.HammerGestureHandler.prototype.resetZoom=function(){cp.isTextInputInFocus()||"SELECT"==document.activeElement.tagName.toUpperCase()||this.transform(cp("div_Slide"),1)};cp.HammerGestureHandler.prototype.resetScroll=function(a){cp.device!=cp.DESKTOP&&(cp.responsive?cp("project"):cp("main_container"),cp.m_gestureHandler.fitMovie(a))};
cp.HammerGestureHandler.prototype.initializeDefaultGestureEvents=function(){var a=cp("div_Slide"),c=cp("cpDocument");Hammer(c,{prevent_default:!0,no_mouseevents:!0});Hammer(a,{prevent_default:!1,no_mouseevents:!0});cp.HammerGestureHandler.superClass.initializeDefaultGestureEvents.call(this)};
cp.HammerGestureHandler.prototype.getEventPageX=function(a){var c=a.gesture;if(!c||!c.center)return cp.HammerGestureHandler.superClass.getEventPageX.call(this,a);c=c.center;if(c.pageX)return c.pageX;var a=document.documentElement,b=document.body;return c.clientX+(a&&a.scrollLeft||b&&b.scrollLeft||0)-(a&&a.clientLeft||b&&b.clientLeft||0)};
cp.HammerGestureHandler.prototype.getEventPageY=function(a){var c=a.gesture;if(!c||!c.center)return cp.HammerGestureHandler.superClass.getEventPageY.call(this,a);c=c.center;if(c.pageY)return c.pageY;var a=document.documentElement,b=document.body;return c.clientY+(a&&a.scrollTop||b&&b.scrollTop||0)-(a&&a.clientTop||b&&b.clientTop||0)};
cp.removeVideoSkin=function(a){$("#videoContainer"+a.id)&&$("#videoContainer"+a.id).remove();$("#dummyHandler_"+a.id)&&$("#dummyHandler_"+a.id).remove()};var lWidthToBeReduced=0;
cp.addVideoSkin=function(a,f,o){var c=f.videoSkinStrings,p=function(b,f){var e=$("#volume"+a.id),g=cp.getScaledPosition(e.offset().left,e.offset().top),e=f?100*f:100*(b-g.X)/e.width();100<e&&(e=100);0>e&&(e=0);$("#volumeBar"+a.id).css("width",e+"%");d.volume=e/100;0==d.volume?$("#sound"+a.id).removeClass("sound2").addClass("muted"):0.5<d.volume?$("#sound"+a.id).removeClass("muted").addClass("sound2"):$("#sound"+a.id).removeClass("muted").removeClass("sound2");$("#volumeThumb"+a.id).css("left",e+"%");
cp.modifyAlternativeAccessibleText($("#volumeThumb"+a.id)[0],c.vsVOb+" "+d.volume)},i=2500+parseFloat(a.style.zIndex);a.setAttribute("tabindex",i);var h='<div id="control'+a.id+'" class="control" tabindex=-1>\t<div id="btmControl'+a.id+'" class="btmControl" tabindex=-1> <div id="btnRewind'+a.id+'" class="btnRewind btn" title="'+c.vsRtt+'" tabindex='+i+'> </div><div id="btnPlay'+a.id+'" class="btnPlay btn" title="'+c.vsPtt+'" tabindex='+i+'> </div><div id="btnStop'+a.id+'" class="btnStop btn" title="'+
c.vsStt+'" tabindex='+i+'></div>\t<div id="progress'+a.id+'" class="progress" tabindex=-1><span id="timeBar'+a.id+'" class="timeBar" tabindex=-1></span><div id="progressThumb'+a.id+'" class="progressThumb" tabindex='+i+'></div></div><div id="btnFS'+a.id+'" class="btnFS btn" title="'+c.vsFtt+'" tabindex='+i+'></div><div id="volume'+a.id+'" class="volume" title="'+c.vsVtt+'" tabindex=-1><span id="volumeBar'+a.id+'" class="volumeBar" style="width: 70%;" tabindex=-1></span><div id="volumeThumb'+a.id+
'" class="volumeThumb" tabindex='+i+'></div></div><div id="sound'+a.id+'" class="sound sound2 btn" title="'+c.vsMtt+'" tabindex='+i+"></div></div></div>",q="videoContainer"+a.id;if(!cp(q)){var g=document.createElement("div");g.className="videoContainer";g.style.zIndex=10;g.id=q;g.innerHTML=h;cp.browser==cp.MSIE&&(h=document.createElement("div"),h.style.width="100%",h.style.height="100%",h.style.backgroundColor="#ffffff",h.style.opacity=0,h.id="dummyHandler_"+a.id,h.setAttribute("tabindex",-1),a.appendChild(h));
a.appendChild(g);a.style.position="absolute";var d=f.nativeVideo;d.removeAttribute("controls");p(0,1,!0);g=$("#control"+a.id).outerWidth(!0);$("#btnRewind"+a.id).outerWidth(!0);var h=$("#btnPlay"+a.id).outerWidth(!0),q=$("#btnStop"+a.id).outerWidth(!0),j=$("#volume"+a.id).outerWidth(!0),k=$("#volumeBar"+a.id).outerWidth(!0),j=j>k?j:k,k=$(".sound").outerWidth(!0)>$(".sound2").outerWidth(!0)?$(".sound").outerWidth(!0):$(".sound2").outerWidth(!0),s=$("#btnFS"+a.id).outerWidth(!0);lWidthToBeReduced=h+
q+j+k+s+75;if(cp.device!=cp.DESKTOP&&(cp.IDEVICE!=cp.device||cp.IOSMajor>=cp.IOS8)&&"none"!=$("#volume"+a.id).css("display"))$("#volume"+a.id).css("display","none"),$("#sound"+a.id).css("display","none"),lWidthToBeReduced-=j+k;cp.browser==cp.MSIE&&"none"!=$("#btnFS"+a.id).css("display")&&($("#btnFS"+a.id).css("display","none"),lWidthToBeReduced-=s);if(150>=g)$("#progress"+a.id).css("display","none"),$("#volume"+a.id).css("display","none"),$("#btnFS"+a.id).css("display","none");else if(250>=g)$("#progress"+
a.id).css("display","none"),$("#volume"+a.id).css("display","none");else if(350>=g&&"none"!=$("#volume"+a.id).css("display")&&($("#volume"+a.id).css("display","none"),lWidthToBeReduced-=j+15),cp.IOSMajor>=cp.IOS8&&($("#progressThumb"+a.id).addClass("progressThumbIOS"),$("#progress"+a.id).addClass("progressIOS")),g-=lWidthToBeReduced,$("#progress"+a.id).css("width",g+"px"),cp.createAlternativeAccessibleText($("#btnRewind"+a.id)[0],c.vsREb,"button"),cp.createAlternativeAccessibleText($("#btnPlay"+a.id)[0],
c.vsPLb,"button"),cp.createAlternativeAccessibleText($("#btnStop"+a.id)[0],c.vsSTb,"button"),cp.IOSMajor>=cp.IOS8?cp.createAlternativeAccessibleText($("#progress"+a.id)[0],c.vsPRb+" 0 seconds","button"):cp.createAlternativeAccessibleText($("#progressThumb"+a.id)[0],c.vsPRb+" 0 seconds","button"),cp.createAlternativeAccessibleText($("#btnFS"+a.id)[0],c.vsFSb,"button"),cp.createAlternativeAccessibleText($("#volumeThumb"+a.id)[0],c.vsVOb+" 1","button"),cp.createAlternativeAccessibleText($("#sound"+a.id)[0],
c.vsMUb,"button"),cp.D&&cp.D.pref&&1===cp.D.pref.hsr)cp.removeAccessibilityOutline($("#btnRewind"+a.id)[0]),cp.removeAccessibilityOutline($("#btnPlay"+a.id)[0]),cp.removeAccessibilityOutline($("#btnStop"+a.id)[0]),cp.removeAccessibilityOutline($("#progressThumb"+a.id)[0]),cp.removeAccessibilityOutline($("#btnFS"+a.id)[0]),cp.removeAccessibilityOutline($("#volumeThumb"+a.id)[0]),cp.removeAccessibilityOutline($("#sound"+a.id)[0]);var B=function(){var b=cp("videoContainer"+a.id);b.style.bottom=b.style.bottom!=
"-60px"?"-60px":"0px"},t=function(){$("#videoContainer"+a.id).stop().animate({bottom:0},500)},u=function(){!l&&!m&&$("#videoContainer"+a.id).stop().animate({bottom:-60},500)},v=function(){$("#videoContainer"+a.id).css("height",40);$("#videoContainer"+a.id).css("bottom","-60px");$("#btnPlay"+a.id).addClass("paused");if(cp.MSIE==cp.browser){$("#dummyHandler_"+a.id).mouseenter(t);$("#dummyHandler_"+a.id).mouseleave(function(b){b.toElement.id!="control"+a.id&&u(b)})}else cp.device==cp.ANDROID||cp.device==
cp.IDEVICE&&cp.IOSMajor>=cp.IOS8?cp.registerGestureEvent(cp(a.id),cp.GESTURE_EVENT_TYPES.RELEASE,B):$("#"+a.id).hover(t,u);$("#"+a.id).css("overflow","hidden");$("#control"+a.id).show()};if(o)v();else{var r=function(){$("#init"+a.id).remove();v();cp.removeGestureEvent(cp("videoContainer"+a.id),cp.GESTURE_EVENT_TYPES.TAP,r);$("#videoContainer"+a.id).unbind("keyup");cp.modifyAlternativeAccessibleText($("#btnPlay"+a.id)[0],c.vsPAb);$("#btnPlay"+a.id)[0].focus();f.play();$("#videoContainer"+a.id).stop().animate({bottom:0},
500)};$("#videoContainer"+a.id).append('<div id="init'+a.id+'" class="init" tabindex='+i+"></div>");cp.registerGestureEvent(cp("videoContainer"+a.id),cp.GESTURE_EVENT_TYPES.TAP,r);$("#videoContainer"+a.id).keyup(function(a){(a.which==13||a.which==32)&&r()});$("#init"+a.id).fadeIn(200);cp.createAlternativeAccessibleText($("#init"+a.id)[0],c.vsPLb,"button")}d.addEventListener("timeupdate",function(){var b=d.currentTime,f=100*b/d.duration;$("#timeBar"+a.id).css("width",f+"%");if(cp.IOSMajor>=8)cp.modifyAlternativeAccessibleText($("#progress"+
a.id)[0],c.vsPRb+Math.round(b*100)/100+" seconds");else{var f=$("#timeBar"+a.id).width(),e=$("#progressThumb"+a.id);if(e&&e.offset())(e=cp.getScaledPosition(e.offset().left,e.offset().top))&&(e.X>$("#timeBar"+a.id).width()-50?$("#progressThumb"+a.id).css("left",f+"px"):$("#progressThumb"+a.id).css("left",e.X+"px"));cp.modifyAlternativeAccessibleText($("#progressThumb"+a.id)[0],c.vsPRb+Math.round(b*100)/100+" seconds")}});o=function(){w()};cp.registerGestureEvent(d,cp.GESTURE_EVENT_TYPES.TAP,o);cp.registerGestureEvent(cp("btnPlay"+
a.id),cp.GESTURE_EVENT_TYPES.TAP,o);$("#btnPlay"+a.id).keyup(function(a){(a.which==13||a.which==32)&&w()});var w=function(){if(f.paused||f.ended){$("#btnPlay"+a.id).addClass("paused");f.play();cp.modifyAlternativeAccessibleText($("#btnPlay"+a.id)[0],c.vsPAb)}else{$("#btnPlay"+a.id).removeClass("paused");f.pause();cp.modifyAlternativeAccessibleText($("#btnPlay"+a.id)[0],c.vsPLb)}},x=function(){$("#btnPlay"+a.id).addClass("paused");cp.modifyAlternativeAccessibleText($("#btnPlay"+a.id)[0],c.vsPAb);var b=
$("#progress"+a.id).offset(),b=cp.getScaledPosition(b.left,b.top);n(b.X);f.play()};cp.registerGestureEvent(cp("btnRewind"+a.id),cp.GESTURE_EVENT_TYPES.TAP,x);$("#btnRewind"+a.id).keyup(function(a){(a.which==13||a.which==32)&&x()});var y=function(){$("#btnPlay"+a.id).removeClass("paused");cp.modifyAlternativeAccessibleText($("#btnPlay"+a.id)[0],c.vsPLb);var b=$("#progress"+a.id).offset(),b=cp.getScaledPosition(b.left,b.top);n(b.X);f.pause()};cp.registerGestureEvent(cp("btnStop"+a.id),cp.GESTURE_EVENT_TYPES.TAP,
y);$("#btnStop"+a.id).keyup(function(a){(a.which==13||a.which==32)&&y()});var z=function(){$.isFunction(d.requestFullscreen)?d.requestFullscreen():$.isFunction(d.webkitRequestFullscreen)?d.webkitRequestFullscreen():$.isFunction(d.webkitEnterFullscreen)?d.webkitEnterFullscreen():$.isFunction(d.mozRequestFullScreen)?d.mozRequestFullScreen():alert("Your browsers doesn't support fullscreen")};d.addEventListener("webkitbeginfullscreen",function(){cp.movie.pause()});d.addEventListener("webkitendfullscreen",
function(){d.ended&&cp.movie.play();if(d.ended||d.paused){$("#btnPlay"+a.id).removeClass("paused");cp.modifyAlternativeAccessibleText($("#btnPlay"+a.id)[0],c.vsPLb)}});cp.registerGestureEvent(cp("btnFS"+a.id),cp.GESTURE_EVENT_TYPES.TAP,z);$("#btnFS"+a.id).keyup(function(a){(a.which==13||a.which==32)&&z()});var A=function(){d.muted=!d.muted;$("#sound"+a.id).toggleClass("muted");if(d.muted){$("#volumeBar"+a.id).css("width",0);$("#volumeThumb"+a.id).css("left",0);cp.modifyAlternativeAccessibleText($("#sound"+
a.id)[0],c.vsUNb)}else{$("#volumeBar"+a.id).css("width",d.volume*100+"%");$("#volumeThumb"+a.id).css("left",$("#volumeBar"+a.id).width()+"px");cp.modifyAlternativeAccessibleText($("#sound"+a.id)[0],c.vsMUb)}};cp.registerGestureEvent(cp("sound"+a.id),cp.GESTURE_EVENT_TYPES.TAP,A);$("#sound"+a.id).keyup(function(a){(a.which==13||a.which==32)&&A()});d.addEventListener("ended",function(){$("#btnPlay"+a.id).removeClass("paused");f.pause()});var m=!1;$("#progress"+a.id).mousedown(function(a){m=true;a=cp.getScaledPosition(window.getPageX(a),
window.getPageY(a));n(a.X)});$(document).mouseup(function(a){if(m){m=false;a=cp.getScaledPosition(window.getPageX(a),window.getPageY(a));n(a.X)}});$(document).mousemove(function(a){if(m){a=cp.getScaledPosition(window.getPageX(a),window.getPageY(a));n(a.X)}});var n=function(b){var c=$("#progress"+a.id),e=d.duration,g=cp.getScaledPosition(c.offset().left,c.offset().top),b=100*(b-g.X)/c.width();b>100&&(b=100);b<0&&(b=0);f.setCurrentTime(e*b/100);$("#timeBar"+a.id).css("width",b+"%");e=$("#timeBar"+a.id).width();
if((b=$("#progressThumb"+a.id))&&b.offset())(b=cp.getScaledPosition(b.offset().left,b.offset().top))&&(b.X>$("#timeBar"+a.id).width()-50?$("#progressThumb"+a.id).css("left",e+"px"):$("#progressThumb"+a.id).css("left",b.X+"px"))},l=!1;$("#volume"+a.id).mousedown(function(b){l=true;d.muted=false;$("#sound"+a.id).removeClass("muted");b=cp.getScaledPosition(window.getPageX(b),window.getPageY(b));p(b.X)});$(document).mouseup(function(a){if(l){l=false;a=cp.getScaledPosition(window.getPageX(a),window.getPageY(a));
p(a.X)}});$(document).mousemove(function(a){if(l){a=cp.getScaledPosition(window.getPageX(a),window.getPageY(a));p(a.X)}})}};cp.updateVideoProgressBar=function(a){var f=$("#control"+a.id).outerWidth(!0)-lWidthToBeReduced;$("#progress"+a.id).css("width",f+"px")};
cp.user_responseIdentifierArr=[];cp.correct_responseIdentifierArr=[];cp.ConvertToInteractionResultConstant=function(a){if(!cp.IsRunningInACAP){var b;switch(a.toLowerCase()){case "correct":b=!0;break;case "wrong":b=!1;break;case "unanticipated":b=cp.LMSDriverHolder.INTERACTION_RESULT_UNANTICIPATED;break;case "neutral":b=cp.LMSDriverHolder.INTERACTION_RESULT_NEUTRAL;break;case "incorrect":b=!1;break;default:cp.verbose&&cp.log("Could not find appropriate token for interaction result! -"+a)}return b}};
cp.quizContinueButtonClickHandler=function(){cp.ThreeDQuestionHelper&&cp.ThreeDQuestionHelper.set360QuizMode(!1);cp.movie.play()};cp.qcnch=function(a){return cp.quizContinueButtonClickHandler(a)};cp.defaultHandlerForRuntimeMessageBox=function(){var a=cp.movie.playbackController.GetQuizController();a&&a.DefaultHandlerForRuntimeMessageBox()};cp.returnToQuiz=function(){var a=cp.movie.playbackController.GetQuizController();a&&a.ReturnToQuiz()};
cp.allowQuizResubmit=function(){var a=cp.movie.playbackController.GetQuizController();a&&a.AllowQuizResubmit()};cp.forceSubmitAll=function(){var a=cp.movie.playbackController.GetQuizController();a&&a.ForceSubmitAll()};
cp.quizReviewButtonClickHandler=function(a){var a=cp.D[a.id],b=cp.movie.playbackController.GetQuizController();b&&cp.movie.playbackController.HasQuiz()&&(b.SetIsInReviewMode(!0),cp.ThreeDQuestionHelper&&cp.ThreeDQuestionHelper.set360QuizMode(!0),a&&(a=cp.getFirstSlideInQuiz(),-1!=a&&(cpCmndGotoSlideAndResume=a)))};
cp.getFirstSlideInQuiz=function(){var a;if(a=cp.movie.playbackController.GetQuizController()){var b=cp.movie.playbackController.GetSlideNames();if(cp.responsiveType==cp.kCPPMEVR){for(var c=0;c<b.length;++c){var d="",e=a.GetQuestionsOnSlide(c);if(e){for(var f=0;f<e.length;){var g;e[f]&&(g=cp.D[e[f].questionObjName]);g&&"InteractiveItemQuestion"==g.qtp?e.splice(f,1):f++}if(0<e.length&&(e=e[0],!e||!e.getIsKnowledgeCheck()))d="Question"}else a.GetAnyScoreSlideIndex()==c&&(d="AnyScoreSlide");if("AnyScoreSlide"==
d||"Question"==d)return c}return-1}a=a.GetFirstSlideInQuizIndex();return void 0==a?-1:a}};cp.qrch=function(a){return cp.quizReviewButtonClickHandler(a)};cp.resetQuizData=function(){var a=cp.movie.playbackController.GetQuizController();if(a){var b=cp.movie.questionObjs;if(!b)return 0;var c=b.length;if(!(0>=c)){for(var d=0;d<c;++d)b[d]&&(b[d].getIsPretest()||b[d].resetQuestionData());a.GetScore()}}};
cp.quizRetakeButtonClickHandler=function(a){var b=cp.movie.playbackController.GetQuizController();if(b&&(cp.movie.playbackController.HasQuiz()&&cp.D[a.id])&&(a=cp.movie.playbackController.GetSlideNames(),b=b.GetFirstSlideInQuizIndex(),0<=b&&(a=cp.D[a[b]]))){var c=cp.movie.playbackController.GetGraphManager();void 0!=c&&c.resetCurrentBranch(b);cp.resetQuizData();cp.ThreeDQuestionHelper&&cp.ThreeDQuestionHelper.set360QuizMode(!0);cpCmndGotoFrameAndResume=a.from}};cp.qrtch=function(a){return cp.quizRetakeButtonClickHandler(a)};
cp.quizPostResultButtonClickHandler=function(){cp.movie.playbackController.PostQuizResults()};cp.qprch=function(a){return cp.quizPostResultButtonClickHandler(a)};cp.quizClearButtonClickHandler=function(a){var b=cp.movie.playbackController.GetQuizController();if(b){var c=cp.D[a.id];c&&(c=cp.getQuestionObject(c.sn))&&(!c.getIsPretest()||!b.GetIsPretestQuestionsDisabled())&&c.clearButtonClickHandler(a)}};cp.qcch=function(a){return cp.quizClearButtonClickHandler(a)};
cp.quizSkipButtonClickHandler=function(a){var b=cp.movie.playbackController.GetQuizController();if(b){var c=cp.D[a.id];if(c&&(c=cp.getQuestionObject(c.sn))){if(!b.GetIsInReviewMode()){if(c.getIsLastPretestQuestion())return b.ExecutePretestAction(cp.movie.playbackController.GetCurrentSlideIndex());var d=b.GetIsSubmitAll();if("mustAnswer"==b.GetQuestionAdvanceType()&&!d&&!c.m_answersDisabled&&!c.getIsPretest()&&!c.getIsKnowledgeCheck())return;var e=c.getSlideIndex();if(0<=e&&!c.getIsPretest()&&!c.getIsKnowledgeCheck()&&
!d){d=!1;b=b.GetGraphManager();if(void 0!=b){var f=b.getNextSlideList(e);if(void 0!=f)if(1==f.length)d=!1;else if(d=!0,f=b.getBranchHistory(),void 0!=f)for(var g=f.length-1;0<=g;--g){var i=f[g];if(i==e&&g!=f.length-1&&b.getIsJumpValid(i,f[g+1])){d=!1;break}}}if(d)return}if(""!=cp.movie.playbackController.AllowedToGoToSlide(cpInfoCurrentSlideIndex,cpInfoCurrentSlideIndex+1))return}cpQuizInfoTotalUnansweredQuestions+=1;c.skipButtonClickHandler(a)}}};cp.qskch=function(a){return cp.quizSkipButtonClickHandler(a)};
cp.quizBackButtonClickHandler=function(a){var b=cp.movie.playbackController.GetQuizController();if(b){var c=cp.D[a.id];c&&(c=cp.getQuestionObject(c.sn))&&(b.GetIsInReviewMode()||""==cp.movie.playbackController.AllowedToGoToSlide(cpInfoCurrentSlideIndex,cpInfoCurrentSlideIndex-1))&&c.backButtonClickHandler(a)}};cp.qbch=function(a){return cp.quizBackButtonClickHandler(a)};
cp.quizReviewModeNextButtonClickHandler=function(a){var b=cp.movie.playbackController.GetQuizController();if(b){var c=cp.D[a.id];c&&(c=cp.getQuestionObject(c.sn))&&b.GetIsInReviewMode()&&c.reviewModeNextButtonClickHandler(a)}};cp.qrmnch=function(a){return cp.quizReviewModeNextButtonClickHandler(a)};cp.quizReviewModeBackButtonClickHandler=function(a){var b=cp.movie.playbackController.GetQuizController();if(b){var c=cp.D[a.id];c&&(c=cp.getQuestionObject(c.sn))&&b.GetIsInReviewMode()&&c.reviewModeBackButtonClickHandler(a)}};
cp.qrmbch=function(a){return cp.quizReviewModeBackButtonClickHandler(a)};cp.quizSubmitButtonClickHandler=function(a){var b=cp.movie.playbackController.GetQuizController();if(b&&(a=cp.D[a.id]))if((a=cp.getQuestionObject(a.sn))&&(!a.getIsPretest()||!b.GetIsPretestQuestionsDisabled()))a.getWasJudged()||a.judge(!1,!1),cpQuizInfoTotalUnansweredQuestions-=1};cp.qsbch=function(a){return cp.quizSubmitButtonClickHandler(a)};
cp.quizSubmitAllButtonClickHandler=function(){var a=cp.movie.playbackController.GetQuizController();a&&a.SubmitAllQuestions(!0,!1)};cp.qsabch=function(a){return cp.quizSubmitAllButtonClickHandler(a)};cp.intTimeoutID="";cp.CallFunctionAfterAPIIsLoaded=function(a){if(IsLoaded())return""!=intTimeoutID&&(window.clearTimeout(intTimeoutID),intTimeoutID=""),eval(a);intTimeoutID=window.setTimeout("CallFunctionAfterAPIIsLoaded("+a+")",100)};
cp.UnloadActivties=function(){if(!(cp.LMSUnloaded||void 0==cp.LMSDriverHolder&&!cp.IsRunningInACAP)){var a=cp.movie.playbackController;a&&(a.GetIsTracked()&&"EMAIL"!=a.m_lmsType.toUpperCase()&&"ACROBAT"!=a.m_lmsType.toUpperCase()&&"INTERNALSERVER"!=a.m_lmsType.toUpperCase())&&(cp.movie.virgin&&a.RestoreQuizState(),a.IsRunningInConnect()?a.ExitCourse():a.SendCourseData(!0),a.ClearPendingCalls());cp.LMSDriverHolder&&(cp.LMSDriverHolder.CommitData&&cp.LMSDriverHolder.CommitData(),cp.LMSDriverHolder.Unload&&
cp.LMSDriverHolder.Unload());cp.LMSUnloaded=!0}};cp.intQuestionSymbolCounter=0;cp.ASCII_QUESTION=63;cp.CheckForDebugCommand=function(a){if(!cp.IsRunningInACAP){var b=0,b=window.event?window.event.keyCode:a.which;b==cp.ASCII_QUESTION?(cp.intQuestionSymbolCounter++,3==cp.intQuestionSymbolCounter&&(cp.intQuestionSymbolCounter=0,cp.LMSDriverHolder.ShowDebugWindow())):0!=b&&(cp.intQuestionSymbolCounter=0)}};cp.CheckForDebugCommandOnDevices=function(a){cp.IsRunningInACAP||30<a.rotation&&cp.LMSDriverHolder.ShowDebugWindow()};
cp.topWindowBeforeUnloadHandler=void 0;cp.topWindowUnloadHandler=void 0;function RegisterForCloseOnTopWindow(){if(!cp.IsRunningInACAP&&cp.MSIE==cp.browser&&void 0!=cp.topWindow&&cp.topWindow!=cp.LMSDriverHolder.self){var a=cp.topWindow;a.onbeforeunload&&void 0!=a.onbeforeunload&&(cp.topWindowBeforeUnloadHandler=a.onbeforeunload);a.onunload&&void 0!=a.onunload&&(cp.topWindowUnloadHandler=a.onunload);a.onbeforeunload=cp.CPDoBeforeUnload;a.onunload=cp.CPDoUnload}}
cp.CPDoBeforeUnload=function(){var a=window.onbeforeunload;a&&a();topWindowBeforeUnloadHandler&&topWindowBeforeUnloadHandler()};cp.CPDoUnload=function(){cp.UnloadActivties();topWindowUnloadHandler&&topWindowUnloadHandler()};cp.g_ShouldRandomize=!0;cp.startBlnStr=!1;
cp.handleACAPResumeData=function(a){cp.IsRunningInACAP&&a.then(function(a){cp.resumeDataChunk=unescape(a);""!=cp.resumeDataChunk&&void 0!=cp.resumeDataChunk&&"0"!=cp.resumeDataChunk?(cp.g_ShouldRandomize=!1,a=void 0,cp.movie&&(a=cp.movie.playbackController),a&&a.RestoreQuizState()):cp.g_ShouldRandomize=!0;cp.ContinueCPInit();cp.unblockFromLMS()},function(){cp.g_ShouldRandomize=!0;cp.ContinueCPInit();cp.unblockFromLMS()})};
cp.fireResumeDataEvent=function(a){cp.IsRunningInACAP&&cp.em.fireEvent("CPSet_ResumeData",{ResumeData:a})};
cp.LoadActivities=function(){if(!cp.IsRunningInACAP)if(cp.IsRunningInConnect())cp.DoConnectRelatedLMSLoad();else if(!cp.IsRunningInALEC&&"undefined"!=typeof cp.LMSDriverHolder){if(cp.m_isLMSPreview){var a=cp.LMSDriverHolder.WriteToDebug;cp.LMSDriverHolder.WriteToDebug=function(b,c){a(b,c);cp.LMSDriverHolder.winDebug&&cp.LMSDriverHolder.winDebug.scrollTo(0,cp.LMSDriverHolder.winDebug.document.body.scrollHeight)};cp.LMSDriverHolder.ShowDebugWindow(!0)}var b=cp.D.quizReportingData;b&&(cp.LMSDriverHolder.blnDebug=
b.lWriteDebugInfo);cp.LMSDriverHolder.blockedForLMS||(cp.LMSDriverHolder.blockedForLMS=!0,cp("blockUserInteraction").style.display="block",cp("blockUserInteraction").style.width="100%",cp("blockUserInteraction").style.height="100%",cp("blockUserInteraction").style.zIndex=1E4);var c=cp.LMSDriverHolder.confirm;cp.LMSDriverHolder.confirm=function(a){cp.LMSDriverHolder.confirm=c;LoadContent();return c(a)};RegisterForCloseOnTopWindow();cp.m_isLMSPreview&&(cp.LMSDriverHolder.LoadContent=LoadContent);cp.LMSDriverHolder.Start()}};
function LoadContent(){cp.verbose&&cp.log("LoadContent called...IsContentLoaded : "+cp.IsContentLoaded);if(!cp.IsRunningInACAP&&!cp.IsContentLoaded){try{var a=cp.LMSDriverHolder.IsLoaded();cp.startBlnStr=a;if(!a){cp.log("LMS Driver not loaded.");cp.ContinueCPInit();cp.unblockFromLMS();return}document.onkeypress=cp.CheckForDebugCommand;cp.DESKTOP!=cp.device&&(document.ongesturechange=cp.CheckForDebugCommandOnDevices)}catch(b){cp.log("LMS Driver not found.");cp.ContinueCPInit();cp.unblockFromLMS();
return}a=cp.LMSDriverHolder.GetEntryMode();if(a==cp.LMSDriverHolder.ENTRY_FIRST_TIME)cp.resumeDataChunk=unescape(cp.LMSDriverHolder.GetDataChunk()),""!=cp.resumeDataChunk&&void 0!=cp.resumeDataChunk&&"0"!=cp.resumeDataChunk?(cp.g_ShouldRandomize=!1,a=void 0,cp.movie&&(a=cp.movie.playbackController),a&&a.RestoreQuizState()):(cp.LMSDriverHolder.SetBookmark("0"),cp.LMSDriverHolder.SetDataChunk("0"));else if(a==cp.LMSDriverHolder.ENTRY_REVIEW&&cp.D.quizReportingData.cmiExitNormalAfterCompletion)cp.LMSDriverHolder.SetBookmark("0"),
cp.LMSDriverHolder.SetDataChunk("0"),cp.g_ShouldRandomize=!0;else if(cp.LMSDriverHolder.GetBookmark(),cp.resumeDataChunk=unescape(cp.LMSDriverHolder.GetDataChunk()),""!=cp.resumeDataChunk&&void 0!=cp.resumeDataChunk&&"0"!=cp.resumeDataChunk){if(cp.g_ShouldRandomize=!1,a=void 0,cp.movie&&(a=cp.movie.playbackController),a&&a.RestoreQuizState(),cp.verbose)cp.log(cp.resumeDataChunk),cp.log("Unblocking UI")}else cp.g_ShouldRandomize=!0;cp.ContinueCPInit();cp.unblockFromLMS();cp.IsContentLoaded=!0}}
cp.resumeValuesFromDataChunk=function(){if(cp.resumeDataChunk&&"0"!=cp.resumeDataChunk){var a=cp.D.quizReportingData;if(!(a&&!0!=a.trackingSendResumeData)&&cp.movie.playbackController){a=new cp.QuizState;a.init();a.fromString(cp.resumeDataChunk);var a=cp.resumeDataChunk.split(cp.movie.playbackController.m_courseStatesSeparator),b=new cp.QuizState;b.init();b.fromString(a[0]);var c=new cp.QuizState;c.init();c.fromString(a[1]);c&&cp.movie.playbackController.restoreObjectsFromState(c);cp.movie.playbackController.restoreQuizFromState(b)}}};
cp.createAndGetDataChunk=function(){if(!cp.movie.playbackController)return"";var a=new cp.QuizState;a.init();cp.movie.playbackController.saveQuizState(a);var b=new cp.QuizState;b.init();cp.movie.playbackController.saveObjectsState(b);return a.toString()+cp.movie.playbackController.m_courseStatesSeparator+b.toString()};cp.getQuestionNumberInQuiz=function(a){var b=-1,a=cp.D[a];void 0!=a&&(b=a.qnq);return b};
cp.getQuestionObjectName=function(a){var b,a=cp.getQuestionNumberInQuiz(a);-1!=a&&(b=cp.movie.questions[a]);return b};cp.getQuestionObject=function(a){var b,a=cp.getQuestionNumberInQuiz(a);-1!=a&&(b=cp.movie.questionObjs[a]);return b};
cp.QuizState=function(){this.m_curReadPos=0;this.m_b64Alphabet="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_-";this.m_to64=[];this.m_from64=[];this.m_escAlphabet="$.!*+";this.m_doubleEsc="~";this.m_esc=[];this.m_mask=[63,4095,262143,16777215,1073741823];this.m_fromEsc=[];this.m_state=""};
cp.QuizState.prototype={init:function(){for(var a=0;a<this.m_b64Alphabet.length;a++)this.m_to64[a]=this.m_b64Alphabet.charAt(a),this.m_from64[this.m_b64Alphabet.charCodeAt(a)]=a;for(a=0;a<this.m_escAlphabet.length;++a)this.m_esc[a]=this.m_escAlphabet.charAt(a),this.m_fromEsc[this.m_escAlphabet.charAt(a)]=a+1},toString:function(){return escape(this.m_state)},fromString:function(a){this.m_state=a;this.m_curReadPos=0},writeNumber:function(a){var b,c,d,a=Math.floor(a);if(a>this.m_mask[this.m_mask.length-
1])this.m_state=this.m_state.concat(this.m_doubleEsc),this.writeNumber(a/(this.m_mask[this.m_mask.length-1]+1)),this.writeNumber(a&this.m_mask[this.m_mask.length-1]);else for(b=0;b<this.m_esc.length;b++)if((a&this.m_mask[b])==a){0<b&&(this.m_state=this.m_state.concat(this.m_esc[b-1]));for(var e=c=0;e<=b;e++)d=a>>c&63,this.m_state=this.m_state.concat(this.m_to64[d]),c+=6;break}},readNumber:function(){var a=this.m_state.charAt(this.m_curReadPos),b=this.m_state.charCodeAt(this.m_curReadPos++),c,d=0,
e;if(a==this.m_doubleEsc)return d=this.readNumber(),a=this.readNumber(),d*(this.m_mask[this.m_mask.length-1]+1)+a;a=this.m_fromEsc[a];if(0==a||void 0==a)d=this.m_from64[b];else for(b=e=0;b<=a;b++)c=this.m_from64[this.m_state.charCodeAt(this.m_curReadPos++)],d|=c<<e,e+=6;return d},writeBoolean:function(a){this.m_state=this.m_state.concat(a?"1":"0")},readBoolean:function(){return"1"==this.m_state.charAt(this.m_curReadPos++)},writeString:function(a){this.writeNumber(a.length);this.m_state=this.m_state.concat(a)},
readString:function(){var a=this.readNumber(),b=this.m_state.substr(this.m_curReadPos,a);this.m_curReadPos+=a;return b},getReadPos:function(){return this.m_curReadPos},setReadPos:function(a){this.m_curReadPos=a},getWritePos:function(){return this.m_curReadPos},setWritePos:function(a){this.m_curReadPos=a},getData:function(){return this.toString()},setData:function(a){this.fromString(a)}};
cp.QuizController=function(){this.m_showPlaybar=!0;this.quizInProgress=!1;this.quizNumFinishes=this.quizNumStarts=0;this.sawAnyScoreSlide=!1;this.m_QuizzingData=void 0;this.m_questionSlideNames=[];this.m_playbackController=void 0;this.m_scoreDisplay={};this.m_GoToQuizScopeActionExecuted=!1;this.m_RunTimeMsgBox=void 0;this.m_ExecutingPretestAction=this.m_PretestQuestionsDisabled=this.m_FirstNonPretestQuestionEncountered=this.m_forceAbsoluteProgressType=this.verbose=this.m_submittedAllQuestions=this.m_HandledSubmitAll=
!1;cp.vm.createVariable("cpQuizHandledAll",!1,!1,15,!1)};
cp.QuizController.prototype={GetIsCurrentSlideLastPrestest:function(){if(!this.m_playbackController)return!1;var a=this.m_playbackController.GetCurrentSlideIndex();if(cp.movie.stage.isInvalidSlideIndex(a))return!1;a=this.GetQuestionsOnSlide(a);return!a||0>=a.length?!1:(a=a[0])?a.getIsLastPretestQuestion():!1},GetIsPretestQuestionsDisabled:function(){return this.m_PretestQuestionsDisabled},GetForceAbsoluteProgressType:function(){return this.m_forceAbsoluteProgressType},SetForceAbsoluteProgressType:function(a){this.m_forceAbsoluteProgressType=
a},GetFirstNonPretestQuestionEncountered:function(){return this.m_FirstNonPretestQuestionEncountered},SetFirstNonPretestQuestionEncountered:function(a){this.m_FirstNonPretestQuestionEncountered=a},GetQuestionScoresToSend:function(){var a=[],b=cp.movie.stage.getAllSlideNames();if(!b)return[];for(var c=0;c<b.length;++c)if(cp.D[b[c]].v)for(var d=this.GetQuestionsOnSlide(c),e=0;e<d.length;++e){var f=d[e];f&&a.push(f.getQuestionScore())}return a},saveState:function(a){a.writeBoolean(this.GetIsInReviewMode());
a.writeBoolean(!1);a.writeBoolean(this.quizInProgress);a.writeNumber(this.quizNumStarts);a.writeNumber(this.quizNumFinishes);a.writeBoolean(this.sawAnyScoreSlide);a.writeBoolean(this.m_submittedAllQuestions);a.writeBoolean(this.m_PretestQuestionsDisabled);a.writeBoolean(cpInQuizScope);a.writeString(""+cpQuizScopeSlide);var b=this.GetQuestionScoresToSend();a.writeNumber(b.length);for(whichQuestionScore in b){var c=b[whichQuestionScore];c&&c.saveState(a)}this.saveBranchInfo(a)},saveBranchInfo:function(a){var b=
"",c=this.GetGraphManager();a.writeBoolean(void 0!=c);if(c){var d=c.getCompletionBranch();a.writeNumber(d.length);for(var e=0;e<d.length;++e)a.writeNumber(d[e]);d=c.getCurrentBranch();a.writeNumber(d.length);for(e=0;e<d.length;++e)a.writeNumber(d[e]);if(void 0!=c.m_SlideNumToQuestionNumMap)for(var f in c.m_SlideNumToQuestionNumMap)b+=f+"_"+c.m_SlideNumToQuestionNumMap[f]+",";a.writeString(b)}},restoreState:function(a){if(a){this.SetIsInReviewMode(a.readBoolean());a.readBoolean();this.quizInProgress=
a.readBoolean();this.quizNumStarts=a.readNumber();this.quizNumFinishes=a.readNumber();this.sawAnyScoreSlide=a.readBoolean();this.m_submittedAllQuestions=a.readBoolean();this.m_PretestQuestionsDisabled=a.readBoolean();svvi("cpInQuizScope",a.readBoolean(),["cpInQuizScope"]);this.quizScopeSlideSetter(parseFloat(a.readString()));for(var b=a.readNumber(),c=0;c<b;++c)(new cp.QuestionScore).restoreState(a);this.restoreBranchInfo(a)}},restoreBranchInfo:function(a){if(a){var b=[],c=[],d="";if(a.readBoolean()){for(var d=
a.readNumber(),e=0;e<d;++e)b.push(a.readNumber());d=a.readNumber();for(e=0;e<d;++e)c.push(a.readNumber());d=a.readString()}if(a=this.GetGraphManager())a.restoreCompletionBranchState(b),a.restoreCurrentBranchState(c),this.RestoreGraphProgressIndicatorMap(d)}},ResumeState:function(a,b){this.verbose&&cp.log("QuizController :: ResumeState()");switch(a){case "isInReviewMode":this.SetIsInReviewMode("true"==b);break;case "quizInProgress":this.quizInProgress="true"==b;break;case "quizNumStarts":this.quizNumStarts=
parseFloat(b);break;case "quizNumFinishes":this.quizNumFinishes=parseFloat(b);break;case "sawAnyScoreSlide":this.sawAnyScoreSlide="true"==b;break;case "submittedAllQuestions":this.m_submittedAllQuestions="true"==b;break;case "quizScopeSlide":this.quizScopeSlideSetter(parseFloat(b));break;case "completionBranch":this.RestoreCompletionBranchState(b);break;case "currentBranch":this.RestoreCurrentBranchState(b);break;case "qpiMap":this.RestoreGraphProgressIndicatorMap(b)}},RestoreGraphProgressIndicatorMap:function(a){if(!(void 0==
a||""==a)){for(var b=a.split(","),a={},c=0,d=0;d<b.length;++d){var e=b[d].split("_");if(2==e.length){var f=parseInt(e[0]),e=parseInt(e[1]);a[f]=e;c<e&&(c=e)}}b=this.GetGraphManager();void 0!=b&&(void 0!=b.m_SlideNumToQuestionNumMap&&void 0!=b.m_progressNumber)&&(b.m_SlideNumToQuestionNumMap=a,b.m_progressNumber=c)}},RestoreCompletionBranchState:function(a){if(void 0!=a){for(var b=a.split(","),a=[],c=0;c<b.length;++c)a.push(parseInt(b[c]));b=this.GetGraphManager();void 0!=b&&b.restoreCompletionBranchState(a)}},
RestoreCurrentBranchState:function(a){if(void 0!=a){for(var b=a.split(","),a=[],c=0;c<b.length;++c)a.push(parseInt(b[c]));b=this.GetGraphManager();void 0!=b&&b.restoreCurrentBranchState(a)}},SaveQuestionScore:function(a){this.GetIsInReviewMode()||(this.AddQuestionScore(a.GetQuestionScore()),a.SetQuestionScore(void 0))},AddQuestionScore:function(a){for(var b in this.questionScores)if(this.questionScores[b].questionNumInQuiz==a.questionNumInQuiz){this.questionScores[b]=a;return}-1!=a.questionNumInQuiz?
questionScores[a.questionNumInQuiz]=a:questionScores.push(a)},HasQuiz:function(){return void 0!=this.m_QuizzingData?!0:!1},InitializeQuizController:function(){this.verbose&&cp.log("QuizController :: InitializeQuizController()");this.m_QuizzingData=cp.D.quizzingData},GetGraphManager:function(){var a=void 0;this.m_playbackController&&(a=this.m_playbackController.GetGraphManager());return a},GetGoToQuizScopeActionExecuted:function(){return this.m_GoToQuizScopeActionExecuted},SetGoToQuizScopeActionExecuted:function(a){this.m_GoToQuizScopeActionExecuted=
a},GetIsInReviewMode:function(){return!this.m_QuizzingData?!1:this.m_QuizzingData.isInReviewMode},SetIsInReviewMode:function(a){if(this.m_QuizzingData){if(a&&!this.m_QuizzingData.isInReviewMode){var b=this.GetGraphManager();b&&b.SaveCurrentBranch()}this.m_QuizzingData.isInReviewMode=a}},SetQuizInProgress:function(a){a&&!this.quizInProgress?(this.m_HandledSubmitAll=!1,cp.vm.setVariableValue("cpQuizHandledAll",!1,!1),cp.resetQuizData(),this.m_playbackController&&(this.m_playbackController.GetIsTracked()&&
"EMAIL"!=this.m_playbackController.m_lmsType.toUpperCase()&&"ACROBAT"!=this.m_playbackController.m_lmsType.toUpperCase()&&"INTERNALSERVER"!=this.m_playbackController.m_lmsType.toUpperCase()?this.m_playbackController.SendCourseData(!this.m_playbackController.LMSIsAICC()||!this.m_playbackController.IsRunningInConnect()):this.m_playbackController.SendCourseData(!1)),this.m_submittedAllQuestions=!1,this.IncrementCurrentAttempt(),this.sawAnyScoreSlide=!1):!a&&this.quizInProgress&&(this.quizNumFinishes+=
1);this.quizInProgress=a;this.quizInScopeSetter(a)},GetIsAttemptFinished:function(){return 0<this.quizNumStarts&&this.quizNumStarts==this.quizNumFinishes||this.sawAnyScoreSlide?!0:!1},GetCurrentSlideType:function(){this.m_playbackController.GetCurrentSlide();var a=this.m_playbackController.GetCurrentSlideIndex(),b=this.GetQuestionsOnSlide(a);return b&&0<b.length?"Question":this.GetAnyScoreSlideIndex()==a?"AnyScoreSlide":""},IsNonPretestQuestionSlide:function(a){if((a=this.GetQuestionsOnSlide(a))&&
0<a.length){for(var b=!1,c=0;c<a.length;++c){var d=a[c];if(d&&d.getIsPretest()){b=!0;break}}return!b}return!1},IsNonKnowledgeCheck:function(a){if((a=this.GetQuestionsOnSlide(a))&&0<a.length){for(var b=!1,c=0;c<a.length;++c){var d=a[c];if(d&&d.getIsKnowledgeCheck()){b=!0;break}}return!b}return!1},getQuizSlideMaxScore:function(a){var b=0;if((a=this.GetQuestionsOnSlide(a))&&0<a.length)for(var c=0;c<a.length;++c){var d=a[c];d&&!d.getIsPretest()&&(b+=d.getWeighting())}return b},getQuizSlideMinScore:function(a){var b=
0;if((a=this.GetQuestionsOnSlide(a))&&0<a.length)for(var c=0;c<a.length;++c){var d=a[c];d&&!d.getIsPretest()&&(b+=d.getNegativeWeight())}return b},getQuizSlideScore:function(a){var b=0;if((a=this.GetQuestionsOnSlide(a))&&0<a.length)for(var c=0;c<a.length;++c){var d=a[c];d&&!d.getIsPretest()&&(b+=d.getScore())}return b},GetSlideType:function(a){if(!cp.movie.stage)return"";var b=this.GetQuestionsOnSlide(a);return b&&0<b.length?"Question":this.GetAnyScoreSlideIndex()==a?"AnyScoreSlide":""},GetTotalUnansweredQuestions:function(){if(!cp.movie)return 0;
var a=cp.movie.questionObjs;if(!a)return 0;for(var b=0,c=0;c<a.length;++c){var d=a[c];void 0==d?b++:d.getIsIncomplete()?b++:d.getWasJudged()||b++}return b},GetTotalQuestionsInProject:function(){if(!cp.movie)return 0;var a=cp.movie.questionObjs;return!a?0:a.length},GetNumQuestions:function(){var a=this.GetGraphManager();return void 0!=a?a.getNumQuestions():this.GetTotalQuestionsInProject()},GotoQuizScopeSlide:function(a){if(cp.movie&&cp.movie.stage)if(0>a||a>=cpInfoSlideCount)cpCmndResume=!0;else if("Question"==
this.GetCurrentSlideType())cpCmndResume=!0;else{var b=!1;this.GetIsInReviewMode()&&(b=!0);b?cpCmndResume=!0:(this.m_GoToQuizScopeActionExecuted=!0,cpCmndGotoSlideAndResume=a)}},EnterCurrentSlide:function(){var a=!1,b=this.GetCurrentSlideType(),c=this.m_playbackController.GetCurrentSlideIndex(),d=this.GetQuizScopeEndSlideIndex();if(cpInfoHasPlaybar&&this.GetHidePlaybarInQuiz()&&!this.GetIsInReviewMode()){var e=!1;"Question"==b?e=!0:0<=c&&(c==d&&"AnyScoreSlide"!=b)&&(e=!0);e&&(this.m_showPlaybar=!1)}cpCmndShowPlaybar=
this.m_showPlaybar;d=!1;if(this.m_playbackController){c=this.m_playbackController.GetCurrentSlideIndex();if(cp.movie.stage.isInvalidSlideIndex(c))return!1;if((e=this.GetQuestionsOnSlide(c))&&0<e.length)(e=e[0])&&e.getIsKnowledgeCheck()&&(d=!0)}!1==d&&("Question"==b&&!this.quizInProgress&&!this.GetIsInReviewMode())&&(this.SetQuizInProgress(!0),cpQuizInfoTotalProjectPoints=this.GetMaxScore(),cpQuizInfoAttempts=this.quizNumStarts,cpQuizInfoTotalQuestionsPerProject=this.GetTotalQuestionsInProject());
"AnyScoreSlide"==b&&("INTERNALSERVER"==this.m_playbackController.m_lmsType.toUpperCase()&&!a&&this.m_playbackController.PostQuizResults(),this.quizInScopeSetter(!1),this.sawAnyScoreSlide=a=!0);if(b=this.GetQuestionsOnSlide(c))for(a=0;a<b.length;++a)this.StartQuestion(b[a]);else a&&(this.m_scoreDisplay={},this.m_scoreDisplay.score=this.GetScore(),this.m_scoreDisplay.maxScore=this.GetMaxScore(),this.m_scoreDisplay.numQuestions=this.GetNumQuestions(),this.m_scoreDisplay.numRetries=this.GetTotalRetries(),
this.m_scoreDisplay.numQuizAttempts=this.quizNumStarts,this.m_scoreDisplay.percentCorrect=this.GetPercentCorrect(),this.m_scoreDisplay.numQuestionsCorrect=this.GetTotalCorrectQuestions(),this.m_scoreDisplay.passed=this.GetIsPassed(),this.m_scoreDisplay.feedback=this.GetIsPassed()?this.GetPassedScoreFeedback():this.GetFailedScoreFeedback(),this.m_scoreDisplay.quizController=this);this.m_playbackController&&(this.m_playbackController.GetIsTracked()&&"EMAIL"!=this.m_playbackController.m_lmsType.toUpperCase()&&
"ACROBAT"!=this.m_playbackController.m_lmsType.toUpperCase()&&this.m_playbackController.m_lmsType.toUpperCase(),this.m_playbackController.SendCourseData(!1));cp.IsRunningInACAP&&(a=this.GetScore(),b=this.GetMaxScore(),c=this.GetMinScore(),void 0!=b&&(void 0!=a&&void 0!=c)&&cp.em.fireEvent("SCORE",{score:a,maxScore:b,minScore:c,quizId:cp.D.quizzingData.quizID}))},LeaveSlide:function(a,b){var c=!1;if(!this.m_QuizzingData)return c;var d=this.m_QuizzingData.quizScopeEndSlide;if(void 0==d)return c;this.verbose&&
cp.log("Inside Leave Slide");0<=b?c=0<=a&&b>a&&a==d:0<=a&&a==d&&(c=!0);0<=a&&(a==this.GetAnyScoreSlideIndex()&&!this.GetIsInReviewMode())&&(c=!0);var e=this.GetSlideType(a);if("Question"==e){var f=this.GetQuestionsOnSlide(a);if(f)for(var g=0;g<f.length;++g){var i=f[g];i&&(i.endQuestion(!1),this.GetIsSubmitAll()||i.clearAnswers())}}else"AnyScoreSlide"==e&&cp.ThreeDQuestionHelper&&(c&&this.GetIsInReviewMode())&&cp.ThreeDQuestionHelper.set360QuizMode(!1);if(!this.m_playbackController||!this.m_playbackController.HasQuiz())c=
!1;f=this.quizInProgress;c&&this.SetQuizInProgress(!1);c&&(!this.GetIsInReviewMode()&&(this.quizNumStarts>=this.GetNumberOfQuizAttempts()&&this.GetIsAllowReviewMode())&&this.SetIsInReviewMode(!0),this.SetQuizInProgress(!1),void 0==b&&f&&(f=this.GetDefaultActionType(),f=this.GetIsPassed()?this.GetPassingGradeAction():this.GetFailingGradeAction(),cp.movie.frameBasedExecuteAction(f)));cpInfoHasPlaybar&&this.GetHidePlaybarInQuiz()&&(f=!1,"Question"==e?f=!0:0<=a&&(a==d&&"AnyScoreSlide"!=e)&&(f=!0),f&&
(this.m_showPlaybar=!0));return c},ExecutePretestAction:function(a){if(this.m_ExecutingPretestAction||void 0==a||cp.movie.stage.isInvalidSlideIndex(a))return!1;var b=this.GetQuestionsOnSlide(a);if(void 0==b||0>=b.length||void 0==b[0])return!1;var c=b[0],b=a+1;b>=cp.movie.stage.slides.length&&!cp.movie.stage.isOverlaySlideIndex(b)&&(b=-1);var d=void 0;-1!=b&&(d=this.GetQuestionsOnSlide(b));var e=!1;void 0!=d&&(0<d.length&&void 0!=d[0])&&(e=d[0].getIsPretest());c=c.getIsPretest();if(!c||-1!=b&&e)return!1;
for(;void 0!=a&&0<=a;){b=this.GetQuestionsOnSlide(a);if(void 0==b||0>=b.length||void 0==b[0]||!b[0].getIsPretest())break;a-=1}this.m_PretestQuestionsDisabled=!0;a=this.GetPretestAction();void 0!=a&&(this.m_ExecutingPretestAction=!0,cp.movie.executeAction(a),this.m_ExecutingPretestAction=!1);return!0},GetProgressType:function(){return!this.m_QuizzingData?0:this.m_QuizzingData.progressIndicatorType},GetProgressTemplateString:function(){return!this.m_QuizzingData?"":this.m_QuizzingData.progressIndicatorString},
GetIsReportingEnabled:function(){return!this.m_QuizzingData?!1:this.m_QuizzingData.reportingEnabled},GetParameterValueByName:function(a){if(!this.m_QuizzingData||!this.m_playbackController||!this.m_playbackController.HasQuiz())return"";var b="";switch(a){case "quizInfoPointsScored":b=this.GetScore();break;case "quizInfoTotalQuizPoints":b=this.GetMaxScore();break;case "quizInfoTotalCorrectAnswers":b=this.GetTotalCorrectQuestions();break;case "numQuestionsInQuiz":b=this.GetNumQuestions();if(void 0==
this.GetGraphManager()){var a=0,c=cp.movie.questionObjs,d=0;c&&(d=c.length);for(var e=0;e<d;++e)c[e]&&c[e].getIsKnowledgeCheck()&&a++;b-=a}break;case "quizInfoPercentScored":b=this.GetPercentCorrect();break;case "quizInfoCurrentAttempt":b=this.quizNumStarts;break;default:b=this.m_scoreDisplay.feedback}return b},GetPassedScoreFeedback:function(){return!this.m_QuizzingData?"":this.m_QuizzingData.passedScoreFeedback},GetFailedScoreFeedback:function(){return!this.m_QuizzingData?"":this.m_QuizzingData.failedScoreFeedback},
GetIsAllowReviewMode:function(){return!this.m_QuizzingData?!1:this.m_QuizzingData.allowReviewMode},GetIsQuizCompleted:function(){return!this.m_QuizzingData?!1:this.m_QuizzingData.quizCompleted},SetIsQuizCompleted:function(a){this.m_QuizzingData&&(this.m_QuizzingData.quizCompleted=a)},GetAnyScoreSlideIndex:function(){if(!this.m_QuizzingData)return-1;var a=this.m_QuizzingData.anyScoreSlide;return void 0!=a?a:-1},GetPretestAction:function(){var a=void 0;this.m_QuizzingData&&(a=this.m_QuizzingData.pretestAction);
return a},GetQuizScopeEndSlideIndex:function(){if(!this.m_QuizzingData)return-1;var a=this.m_QuizzingData.quizScopeEndSlide;return void 0!=a?a:-1},GetFirstSlideInQuizIndex:function(){var a=this.GetGraphManager();if(void 0!=a){a=a.getReviewFirstQuestionSlideIndex();if(void 0==a||0>a||"NaN"==a)a=-1;return a}if(!this.m_QuizzingData)return-1;a=this.m_QuizzingData.firstSlideInQuiz;return void 0!=a?a:-1},GetLastSlideInQuizIndex:function(){var a=this.GetGraphManager();if(void 0!=a){a=a.getLastQuestionSlideIndex();
if(void 0==a||0>a||"NaN"==a)a=-1;return a}if(!this.m_QuizzingData)return-1;a=this.m_QuizzingData.lastSlideInQuiz;return void 0!=a?a:-1},GetLastQuestionSlideInQuiz:function(){if(!cp.movie||!cp.movie.stage)return-1;var a=-1,b=cp.movie.playbackController.GetSlideNames(),c=this.GetFirstSlideInQuizIndex(),d=this.GetLastSlideInQuizIndex();if(-1==c||-1==d)return-1;for(var e=0;e<b.length;++e)if("Question"==this.GetSlideType(e)&&(e>=c&&e<=d)&&(-1!=a||e>a))a=e;return a},GetNumberOfQuizAttempts:function(){return!this.m_QuizzingData?
0:this.m_QuizzingData.numQuizAttemptsAllowed},GetIsPassed:function(){if(!this.m_QuizzingData)return!1;var a=parseFloat(this.GetScore()),b=parseFloat(this.GetPassingScore());return a>=b},GetScore:function(){if(!this.m_QuizzingData)return 0;var a=this.GetGraphManager(),b=cp.movie.questionObjs,c=0;if(!b)return 0;for(var d=0;d<b.length;++d)b[d]&&(b[d].getIsPretest()||(void 0!=a?a.isSlidePartOfCurrentBranch(b[d].getSlideIndex())&&(c+=b[d].getScore()):c+=b[d].getScore()));this.m_QuizzingData.quizInfoPointsScored=
c;this.m_QuizzingData.quizInfoPercentScored=(100*this.m_QuizzingData.quizInfoPointsScored/this.m_QuizzingData.quizInfoTotalQuizPoints).toFixed(2)+"%";return this.m_QuizzingData.quizInfoPointsScored},GetMaxScore:function(){if(!this.m_QuizzingData)return 0;var a=this.GetGraphManager();return void 0!=a?a.getMaxQuizScore():this.m_QuizzingData.maxScore},GetMinScore:function(){if(!this.m_QuizzingData)return 0;var a=this.GetGraphManager();return void 0!=a?a.getMinQuizScore():this.m_QuizzingData.minScore},
GetMaxPretestScore:function(){return!this.m_QuizzingData?0:this.m_QuizzingData.maxPretestScore},GetPretestScore:function(){if(!this.m_QuizzingData)return 0;var a=cp.movie.questionObjs,b=0;if(!a)return 0;for(var c=0;c<a.length;++c)a[c]&&a[c].getIsPretest()&&(b+=a[c].getScore());return b},GetCurrentAttempt:function(){return this.quizNumStarts},GetIsSubmitAll:function(){return!this.m_QuizzingData?!1:this.m_QuizzingData.submitAll},GetHidePlaybarInQuiz:function(){return!this.m_QuizzingData?!1:this.m_QuizzingData.hidePlaybarInQuiz},
GetQuizBranchAware:function(){return!this.m_QuizzingData?!1:this.m_QuizzingData.quizBranchAware},GetPassFailPassingScoreTypeInPrecent:function(){return!this.m_QuizzingData?!1:this.m_QuizzingData.passFailPassingScoreTypeInPrecent},GetPassFailPassingScoreValue:function(){return!this.m_QuizzingData?0:this.m_QuizzingData.passFailPassingScoreValue},IncrementCurrentAttempt:function(){this.m_QuizzingData&&(this.quizNumStarts+=1,this.m_QuizzingData.quizInfoCurrentAttempt+=1)},CanShowRetakeButton:function(){return this.GetCurrentAttempt()>=
this.GetNumberOfQuizAttempts()||this.GetIsPassed()||this.GetIsInReviewMode()?!1:!0},GetQuizAdvanceType:function(){return!this.m_QuizzingData?"optional":this.m_QuizzingData.quizAdvance},GetQuestionAdvanceType:function(){return!this.m_QuizzingData?"optional":this.m_QuizzingData.questionAdvance},GetDefaultActionType:function(){return!this.m_QuizzingData?"":this.m_QuizzingData.defaultActionType},GetDefaultActionArgument:function(){return!this.m_QuizzingData?"":this.m_QuizzingData.defaultActionArg1},GetPassingGradeAction:function(){return!this.m_QuizzingData?
"":this.m_QuizzingData.passingGradeAction},GetFailingGradeAction:function(){return!this.m_QuizzingData?"":this.m_QuizzingData.failingGradeAction},GetTotalCorrectAnswers:function(){return!this.m_QuizzingData?0:this.m_QuizzingData.quizInfoTotalCorrectAnswers},GetNumberOfQuestionsInQuiz:function(){return!this.m_QuizzingData?0:this.m_QuizzingData.numQuestionsInQuiz},GetAllowSkipAnyScoreSlide:function(){return!this.m_QuizzingData?!0:this.m_QuizzingData.allowSkipAnyScoreSlide},GetPassingScore:function(){if(!this.m_QuizzingData)return 0;
if(this.GetPassFailPassingScoreTypeInPrecent()){var a=this.GetGraphManager();if(void 0!=a)return a=a.getMaxQuizScore(),"NaN"==a?"NaN":0>=a?0:this.GetPassFailPassingScoreValue()/100*a}return this.m_QuizzingData.passingScore},GetAllowBackwardMovementInQuiz:function(){return!this.m_QuizzingData?!1:this.m_QuizzingData.allowBackwardMovement},GetIsSlideJudged:function(a){a=this.GetQuestionsOnSlide(a);if(!a||0>=a.length)return!1;for(var b=!0,c=0;c<a.length;++c){var d=a[c],b=b&&d.getWasJudged();if(!b)return!1}return b},
GetQuestionsOnSlide:function(a){var b=[];if(!cp.movie.stage)return"";a=this.m_playbackController.GetSlideNameAtIndex(a);if(void 0==a)return"";a=cp.D[a].qs;if(0>=a.length||""==a)return"";if((lQuestionsOnSlide=a.split(","))&&""!=lQuestionsOnSlide&&0<lQuestionsOnSlide.length)for(a=0;a<lQuestionsOnSlide.length;++a){var c=cp.getQuestionObject(lQuestionsOnSlide[a]);c&&b.push(c)}return b},GetTotalRetries:function(){var a=0,b=cp.movie.questionObjs;if(!b)return 0;var c=b.length;if(0>=c)return 0;for(var d=
0;d<c;++d)b[d]&&(a+=b[d].currentAttempt);return a},CanDoSubmitAll:function(){if("mustTake"==this.GetQuizAdvanceType()&&1>=this.GetCurrentAttempt()){var a=!1,a=this.GetQuizBranchAware()?this.GetAnyQuestionInBranchAnswered():this.GetAnyQuestionsAnswered();if(!a)return"QUIZ_ERROR_MUST_TAKE_QUIZ"}return""},GetAnyQuestionInBranchAnswered:function(){var a=this.GetGraphManager();if(!a)return!1;a=a.getCompletionBranch();if(void 0==a||0>=a.length)return!1;for(var b=0;b<a.length;++b){var c=this.GetQuestionsOnSlide(a[b]);
if(c&&0<c.length)for(var d=0;d<c.length;++d){var e=c[d];if(!e.getIsPretest()&&e.getWasJudged()&&!e.getIsIncomplete())return!0}}return!1},GetAnyQuestionsAnswered:function(){var a=cp.movie.questionObjs;if(!a)return!1;var b=a.length;if(0>=b)return!1;for(var c=0;c<b;++c)if(a[c]&&a[c].getWasJudged()&&!a[c].getIsIncomplete())return!0;return!1},GetAnyNonPreTestQuestionAnswered:function(){var a=cp.movie.questionObjs;if(!a)return!1;var b=a.length;if(0>=b)return!1;for(var c=0;c<b;++c)if(a[c]&&!a[c].getIsPretest()&&
a[c].getWasJudged()&&!a[c].getIsIncomplete())return!0;return!1},CanEnterSlide:function(a){if(!this.m_playbackController||!this.m_playbackController.HasQuiz(!0))return"";var b=this.m_playbackController.GetSlideNameAtIndex(a);if(b&&(b=cp.D[b])&&b.dummyResultSlide)return this.CanEnterSlide(this.GetAnyScoreSlideIndex());var b=0,c=cp.movie.questionObjs,d=0;c&&(d=c.length);if(0<d){for(var e=0;e<d;++e)c[e]&&c[e].getIsKnowledgeCheck()&&b++;if(b==d)return""}a=this.GetSlideType(a);b=!1;if(cpInfoCurrentSlideIndex==
this.GetAnyScoreSlideIndex()&&"Question"==a&&!this.GetIsInReviewMode()&&this.GetCurrentAttempt()>=this.GetNumberOfQuizAttempts())return this.GetIsAllowReviewMode()?"":"QUIZ_ERROR_TOO_MANY_QUIZ_ATTEMPTS";if(!this.quizInProgress||"optional"==this.GetQuestionAdvanceType()&&0<this.GetTotalRetries()){switch(a){case "Question":if(!this.GetIsInReviewMode()&&!this.quizInProgress&&this.GetCurrentAttempt()>=this.GetNumberOfQuizAttempts())return this.GetIsAllowReviewMode()?"":"QUIZ_ERROR_TOO_MANY_QUIZ_ATTEMPTS";
break;case "AnyScoreSlide":b=!0}if(b&&!this.quizInProgress&&!this.GetIsInReviewMode())return"QUIZ_ERROR_MUST_START_QUIZ_TO_SEE_SCORE_SLIDE"}return""},CanLeavePretestQuestionSlide:function(){return""},CanLeaveQuestionSlide:function(a,b){var c=!1,d=this.GetQuestionsOnSlide(a);if(d)for(var e=0;e<d.length;e++){var f=d[e];if(f&&f.getIsPretest())return this.CanLeavePretestQuestionSlide(b,f);c=!1;f&&f.getIsKnowledgeCheck()&&(c=!0)}d=this.GetIsSubmitAll();e=this.GetQuizBranchAware();if("mustAnswer"==this.GetQuestionAdvanceType()&&
!this.GetIsInReviewMode()&&!d&&!e){d=this.GetQuestionsOnSlide(a);if(!d)return"";for(e=0;e<d.length;e++){if((f=d[e])&&f.getIsKnowledgeCheck())return"";if(!b&&f&&0==f.currentAttempt)return"QUIZ_ERROR_MUST_ANSWER_QUESTION"}}if(!b&&a==this.GetLastQuestionSlideInQuiz()){if("mustTake"==this.GetQuizAdvanceType()&&!this.GetAnyQuestionsAnswered()&&1>=this.GetCurrentAttempt())return"QUIZ_ERROR_MUST_TAKE_QUIZ"}else if(b&&!c&&!this.GetIsInReviewMode()&&!this.GetAllowBackwardMovementInQuiz()&&cpInfoCurrentSlideIndex==
a)return"QUIZ_ERROR_CANNOT_MOVE_BACKWARD_IN_QUIZ";return""},CanLeaveSlide:function(a,b){if(!this.m_playbackController||!this.m_playbackController.HasQuiz())return"";var c="",d=this.GetSlideType(a),e=this.GetQuizScopeEndSlideIndex();if("Question"==d&&(c=this.CanLeaveQuestionSlide(a,b),""!=c))return c;if(0<=a&&a==e){if("AnyScoreSlide"==d&&!this.GetAllowSkipAnyScoreSlide()&&!this.sawAnyScoreSlide&&this.quizInProgress)return"QUIZ_ERROR_MUST_SEE_SCORE_SLIDE";d=this.GetPassingScore();if(!b&&"mustPass"==
this.GetQuizAdvanceType()&&"NaN"!=d&&this.GetScore()<d)return"QUIZ_ERROR_MUST_PASS_QUIZ";if(this.GetIsSubmitAll()&&"mustAnswer"==this.GetQuestionAdvanceType()&&!b&&!this.m_submittedAllQuestions)return"QUIZ_ERROR_MUST_ANSWER_QUESTION"}return c},RemoveIncludeInQuizQuestions:function(a){if(a)for(var b=0;b<a.length;){var c;a[b]&&(c=cp.D[a[b].questionObjName]);c&&"InteractiveItemQuestion"==c.qtp?a.splice(b,1):b++}},GetPreviousQuestionSlideNumber:function(a){void 0==a&&(a=!1);var b=-1;if(!cp.movie||!cp.movie.stage)return-1;
var c=cpInfoCurrentSlideIndex,d=this.GetGraphManager();if(void 0!=d){for(var d=d.getCompletionBranch(),e=0;e<d.length;++e){var f=d[e],g="",i=this.GetQuestionsOnSlide(f);a&&this.RemoveIncludeInQuizQuestions(i);if(i&&0<i.length){var h=!1;(i=i[0])&&i.getIsKnowledgeCheck()&&(h=!0);h||(g="Question")}else this.GetAnyScoreSlideIndex()==f&&(g="AnyScoreSlide");if(("AnyScoreSlide"==g||"Question"==g)&&f<c)if(-1==b||f>b)b=f}-1==b&&(a=d.indexOf(c),0<a&&(b=d[a-1]))}else{c=cpInfoCurrentSlideIndex;if((i=this.GetQuestionsOnSlide(c))&&
0<i.length)if((i=i[0])&&i.getIsKnowledgeCheck())return 1<c?c-1:c;d=this.m_playbackController.GetSlideNames();for(f=0;f<d.length;++f)if(g="",i=this.GetQuestionsOnSlide(f),a&&this.RemoveIncludeInQuizQuestions(i),i&&0<i.length?(h=!1,(i=i[0])&&i.getIsKnowledgeCheck()&&(h=!0),h||(g="Question")):this.GetAnyScoreSlideIndex()==f&&(g="AnyScoreSlide"),("AnyScoreSlide"==g||"Question"==g)&&f<c)if(-1==b||f>b)b=f}return b},GetNextQuestionSlideNumber:function(a,b){void 0==a&&(a=!1);void 0==b&&(b=!1);var c=-1;if(!cp.movie||
!cp.movie.stage)return-1;var d=cpInfoCurrentSlideIndex,e=this.GetGraphManager();if(void 0!=e)for(var f=e.getCurrentBranch(),g=0;g<f.length;++g){var e=f[g],i="",h=this.GetQuestionsOnSlide(e);b&&this.RemoveIncludeInQuizQuestions(h);if(h&&0<h.length){var k=!1;(h=h[0])&&h.getIsKnowledgeCheck()&&(k=!0);if(!k||a)i="Question"}else this.GetAnyScoreSlideIndex()==e&&(i="AnyScoreSlide");if(("AnyScoreSlide"==i||"Question"==i)&&e>d)if(-1==c||e<c||c==d)c=e}else{f=this.m_playbackController.GetSlideNames();for(e=
0;e<f.length;++e){i="";h=this.GetQuestionsOnSlide(e);b&&this.RemoveIncludeInQuizQuestions(h);if(h&&0<h.length){if(k=!1,(h=h[0])&&h.getIsKnowledgeCheck()&&(k=!0),!k||a)i="Question"}else this.GetAnyScoreSlideIndex()==e&&(i="AnyScoreSlide");if(("AnyScoreSlide"==i||"Question"==i)&&e>d)if(-1==c||e<c){c=e;break}}}return c},GetPercentCorrect:function(){var a=this.GetMaxScore();return 0==a||!a?" ":Math.round(100*(100*this.GetScore()/a))/100+"%"},GetTotalPretestCorrectQuestions:function(){if(!this.m_QuizzingData)return 0;
var a=cp.movie.questionObjs;if(!a)return 0;for(var b=0,c=0;c<a.length;++c)a[c]&&a[c].getWasJudged()&&(a[c].getAnsweredCorrectly()&&a[c].getIsPretest())&&(b+=1);return b},GetTotalCorrectQuestions:function(){if(!this.m_QuizzingData)return 0;var a=this.GetGraphManager(),b=cp.movie.questionObjs;if(!b)return 0;for(var c=0,d=0;d<b.length;++d)b[d]&&(b[d].getIsPretest()||b[d].getIsKnowledgeCheck()||(void 0!=a?a.isSlidePartOfCurrentBranch(b[d].getSlideIndex())&&(b[d].getWasJudged()&&b[d].getAnsweredCorrectly())&&
(c+=1):b[d].getWasJudged()&&b[d].getAnsweredCorrectly()&&(c+=1)));return c},StartQuestion:function(a){void 0!=a&&(a.slide=this.m_playbackController.GetCurrentSlide(),a.startQuestion())},GetFailingGradeActionString:function(){return!this.m_QuizzingData?!1:this.m_QuizzingData.failingGradeActionString},GetFailingGradeActionParam:function(){return!this.m_QuizzingData?!1:this.m_QuizzingData.failingGradeActionParam},GetIsTracked:function(){return!this.m_QuizzingData?!1:this.m_QuizzingData.it},GetQuestionSlidesNames:function(){return this.m_questionSlideNames},
AddQuestionSlideNames:function(a){this.m_questionSlideNames||(this.m_questionSlideNames=[]);this.m_questionSlideNames.push(a)},GetAllQuestionsInBranchAnswered:function(){var a=this.GetGraphManager();if(!a)return!1;a=a.getCompletionBranch();if(void 0==a||0>=a.length)return!1;for(var b=0;b<a.length;++b){var c=this.GetQuestionsOnSlide(a[b]);if(c&&0<c.length)for(var d=0;d<c.length;++d){var e=c[d];if((!e.getIsPretest()||!this.m_PretestQuestionsDisabled)&&!e.getIsKnowledgeCheck()){var f=this.GetIsSubmitAll()&&
!e.getIsPretest();if(0<=e.getWeighting()&&(!e.getWasJudged()&&!f||e.getIsIncomplete()||0==e.getCurrentAttempt()))return!1}}}return!0},GetAllQuestionsAnswered:function(){if(!0==this.GetQuizBranchAware()&&this.GetAllQuestionsInBranchAnswered())return!0;var a=this.GetQuestionScoresToSend(),b=[];for(whichQuestionScore in a){var c=a[whichQuestionScore];c&&(b[c.getslideNum()]=!0)}var d=this.m_QuizzingData.firstSlideInQuiz,c=this.m_QuizzingData.lastSlideInQuiz;if(void 0==d||-1==d||void 0==c||-1==c)return!0;
for(;d<=c;d++)if(!b[d]){var e=this.GetQuestionsOnSlide(d);if(e&&0<e.length&&(e=e[0].questionData,!e||!(e.ikc&&!0==e.ikc)))return!1}for(whichQuestionScore in a)if((c=a[whichQuestionScore])&&!c.getIsKnowledgeCheck()&&(!c.getIsPretest()||!this.m_PretestQuestionsDisabled))if(b=this.GetIsSubmitAll()&&!c.getIsPretest(),0<=c.getweighting()&&(!c.getwasJudged()&&!b||c.getAnswersIncomplete()||0==c.getNumTries()))return!1;return!0},SendInteractionData:function(a,b){if(!this.m_QuizzingData)return!1;this.verbose&&
cp.log("QuizController::SendInteraction()");this.GetIsTracked()&&this.m_playbackController.SendInteractionData(a,b)},SendQuestionEventDataForSubmitAll:function(){var a=this.GetQuestionScoresToSend();for(whichQuestionScore in a){var b=a[whichQuestionScore];b&&(b.getisPretestQuestion()||this.m_playbackController.SendQuestionEventData(b))}},SendInteractionsForSubmitAll:function(){var a=this.GetQuestionScoresToSend();for(whichQuestionScore in a){var b=a[whichQuestionScore];if(b){var c=b.getdescriptionText(),
d=cp.movie.questionObjs[b.m_questionNumInQuiz];d&&d.shouldReportAnswers&&(b.getisPretestQuestion()||b.getanswersIncomplete()||(d.sendInteractionDataForEachAnswer?d.sendInteractionDataForEachAnswer(c):this.SendInteractionData(b,c)))}}},DoSubmitAll:function(a){if(void 0==a||0>a)return!1;var b=this.GetQuizScopeEndSlideIndex();if(void 0==b||0>b||a!=b||void 0!=this.m_RunTimeMsgBox||this.m_HandledSubmitAll||!0==cp.vm.getVariableValue("cpQuizHandledAll")||!1==this.GetIsSubmitAll())return!1;this.SubmitAllQuestions(!0,
!1);return!0},SubmitAllDialogShown:function(a,b){if(void 0==a||0>a||void 0==b||0>b)return!1;if(void 0!=this.m_RunTimeMsgBox)return!0;if(a>=b||this.m_HandledSubmitAll||!0==cp.vm.getVariableValue("cpQuizHandledAll")||this.GetIsInReviewMode()||!1==this.GetIsSubmitAll())return!1;var c=this.GetAnyScoreSlideIndex(),d=this.GetQuizScopeEndSlideIndex();if(0<=c){if(b==c)return this.SubmitAllQuestions(!0,!1),!0}else if(0<=d&&a==d)return this.SubmitAllQuestions(!0,!1),!0;return!1},ReturnToQuiz:function(){if(void 0!=
this.m_RunTimeMsgBox){this.m_RunTimeMsgBox.hide();this.m_RunTimeMsgBox=void 0;var a=this.m_playbackController.GetCurrentSlideIndex();if(a=this.GetQuestionsOnSlide(a))for(var b=0;b<a.length;++b){var c=a[b];c.state=c.StateEnum.PAUSED}}a=this.GetFirstSlideInQuizIndex();0<=a&&(cpCmndGotoSlideAndResume=a,this.m_HandledSubmitAll=!1,cp.vm.setVariableValue("cpQuizHandledAll",!1,!1))},AllowQuizResubmit:function(){this.m_GoToQuizScopeActionExecuted=!0},ForceSubmitAll:function(){if(this.m_playbackController){if(void 0!=
this.m_RunTimeMsgBox){this.m_RunTimeMsgBox.hide();this.m_RunTimeMsgBox=void 0;var a=this.m_playbackController.GetCurrentSlideIndex();if(a=this.GetQuestionsOnSlide(a))for(var b=0;b<a.length;++b){var c=a[b];c.state=c.StateEnum.PAUSED}}a=this.GetAnyScoreSlideIndex();b=this.GetQuizScopeEndSlideIndex();if(0<=a)cpCmndGotoSlideAndResume=a;else if(0<=b){var a=-1,c=this.m_playbackController.GetSlideNames(),d=c.length;if(0<d&&b<d&&(b=c[b]))if(b=cp.D[b])a=b.to;cpCmndGotoFrameAndResume=a-1;!this.GetIsInReviewMode()&&
(this.GetCurrentAttempt()>=this.GetNumberOfQuizAttempts()&&this.GetIsAllowReviewMode())&&this.SetIsInReviewMode(!0)}this.m_submittedAllQuestions=!0;this.m_playbackController&&this.m_playbackController.GetSendCourseDataWithInteractionData()&&(this.SendInteractionsForSubmitAll(),this.SendQuestionEventDataForSubmitAll(),a=this.m_playbackController.GetLMSType().toUpperCase(),this.m_playbackController.GetIsTracked()&&"EMAIL"!=a&&"ACROBAT"!=a&&"INTERNALSERVER"!=a?this.m_playbackController.SendCourseData(!0):
"INTERNALSERVER"==a?this.m_playbackController.PostQuizResults():this.m_playbackController.SendCourseData(!1));a=this.GetPassingScore();b=this.GetMaxScore();isNaN(a)||(cpQuizInfoQuizPassPoints=a);0!=b&&(!isNaN(b)&&!isNaN(a))&&(cpQuizInfoQuizPassPercent=100*a/b);cpQuizInfoTotalProjectPoints=b}},DefaultHandlerForRuntimeMessageBox:function(){if(this.m_playbackController&&void 0!=this.m_RunTimeMsgBox){this.m_RunTimeMsgBox.hide();this.m_RunTimeMsgBox=void 0;var a=this.m_playbackController.GetCurrentSlideIndex(),
b=this.GetQuestionsOnSlide(a);if(b)for(var c=0;c<b.length;++c){var d=b[c];d.state=d.StateEnum.PAUSED}this.m_HandledSubmitAll=!1;cp.vm.setVariableValue("cpQuizHandledAll",!1,!1);b=this.GetQuizScopeEndSlideIndex();0<=a&&(0<=b&&a==b)&&(b=this.m_playbackController.GetCurrentSlide(),(b=cp.D[b])&&cpInfoCurrentFrame>=b.to&&(cpCmndGotoSlideAndResume=a))}},SubmitAllQuestions:function(a,b){this.m_HandledSubmitAll=!0;cp.vm.setVariableValue("cpQuizHandledAll",!0,!1);if(!1==a)return ForceSubmitAll();void 0!=this.m_RunTimeMsgBox&&
(this.m_RunTimeMsgBox.hide(),this.m_RunTimeMsgBox=void 0);var c="mustAnswer"==this.GetQuestionAdvanceType(),d=this.m_playbackController.GetCurrentSlideIndex();if(d=this.GetQuestionsOnSlide(d))for(var e=0;e<d.length;++e){var f=d[e];f&&f.endQuestion(!1)}var g=cp.D.rtDialog,d=g.rtbgfc,e=g.rtbgsc,f=g.rtbtnfc,i=g.rtbtnsc,h=g.rtsc,k=g.rttc,l=g.rttsc,m=g.rtfn,j=g.rtt,o=g.rtsam,q=g.rtiqm,p=g.rtsiqm,n=g.rtsanym,r=g.rtokb,s=g.rtyb,v=g.rtnb,w=g.rtsab,x=g.rtsanyb,t=g.rtrtqb,g=g.rtmtqm,u=this.GetAllQuestionsAnswered();
"QUIZ_ERROR_MUST_TAKE_QUIZ"==this.CanDoSubmitAll()?(this.m_RunTimeMsgBox=new cp.RuntimeMessageBox(document.getElementById("cpDocument"),1,d,e,f,i,h,k,l,m),this.m_RunTimeMsgBox.setTitleText(j),this.m_RunTimeMsgBox.setMessageText(g),this.m_RunTimeMsgBox.setFirstButtonText(r),this.m_RunTimeMsgBox.registerFirstButtonHandler(cp.defaultHandlerForRuntimeMessageBox)):c&&!u?(this.m_RunTimeMsgBox=new cp.RuntimeMessageBox(document.getElementById("cpDocument"),1,d,e,f,i,h,k,l,m),this.m_RunTimeMsgBox.setTitleText(j),
this.m_RunTimeMsgBox.setMessageText(q),this.m_RunTimeMsgBox.setFirstButtonText(r),this.m_RunTimeMsgBox.registerFirstButtonHandler(cp.defaultHandlerForRuntimeMessageBox)):u?(this.m_RunTimeMsgBox=new cp.RuntimeMessageBox(document.getElementById("cpDocument"),2,d,e,f,i,h,k,l,m),this.m_RunTimeMsgBox.setTitleText(j),this.m_RunTimeMsgBox.setMessageText(o),this.m_RunTimeMsgBox.setFirstButtonText(w),this.m_RunTimeMsgBox.registerFirstButtonHandler(cp.forceSubmitAll),this.m_RunTimeMsgBox.setSecondButtonText(t),
this.m_RunTimeMsgBox.registerSecondButtonHandler(cp.returnToQuiz)):(this.m_RunTimeMsgBox=new cp.RuntimeMessageBox(document.getElementById("cpDocument"),2,d,e,f,i,h,k,l,m),this.m_RunTimeMsgBox.setTitleText(j),b?(this.m_RunTimeMsgBox.setMessageText(n),this.m_RunTimeMsgBox.setFirstButtonText(x),this.m_RunTimeMsgBox.setSecondButtonText(t),this.m_RunTimeMsgBox.registerSecondButtonHandler(cp.returnToQuiz)):(this.m_RunTimeMsgBox.setMessageText(p),this.m_RunTimeMsgBox.setFirstButtonText(s),this.m_RunTimeMsgBox.setSecondButtonText(v),
this.m_RunTimeMsgBox.registerSecondButtonHandler(cp.defaultHandlerForRuntimeMessageBox)),this.m_RunTimeMsgBox.registerFirstButtonHandler(cp.forceSubmitAll));this.m_RunTimeMsgBox.show()},GetPlaybackController:function(){return this.m_playbackController},SetPlaybackController:function(a){this.m_playbackController=a}};cp.ACAPQuizController=function(){cp.ACAPQuizController.baseConstructor.call(this)};cp.inherits(cp.ACAPQuizController,cp.QuizController);
cp.ACAPQuizController.prototype.GetIsReportingEnabled=function(){return!0};
cp.PlaybackController=function(){this.m_QuizReportingData=cp.D.quizReportingData;this.ReportingOptionsEnum=cp.ReportingOptionsEnum;this.SlideViewsTypeEnum=cp.SlideViewsTypeEnum;this.QuizCriteriaEnum=cp.QuizCriteriaEnum;this.m_sendCourseDataWithInteractionData=!0;this.m_completionValueToSend="default";this.m_successSlideViewsType=this.m_completionSlideViewsType=this.m_completionQuizCriteria=this.m_successQuizCriteria=this.m_successCriteria=this.m_completionCriteria=this.m_slideViewsForCompletion=this.m_slideViewsForSuccess=
this.m_completionTrigger=-1;this.m_sendIncompleteToPassedOrFailed=!1;this.m_beginSendingSuccessStatus=!0;this.m_VarHandle=void 0;this.m_GoToQuizScopeActionExeuted=!1;this.m_UseRusticiAdapter=!0;this.m_lmsType="";this.m_AuthorwareDelimeter=void 0;this.m_sendScoreAsPercent=!1;this.m_trackingLevel=0;this.m_completionSlideViewPercentage=100;this.m_reportingOption=0;this.m_courseNode=this.m_courseName=this.m_departmentName=this.m_companyName=this.m_internalServerURL=this.m_emailAddress="";this.m_isTrackedFlag=
!1;this.m_trackingUrlEncodeVersionAndSession=!0;this.m_trackingCharsToNotUrlEncode="";this.m_commitDataOnEverySlide=!1;this.m_CmiExitNormalAfterCompletion=this.m_trackingSendResumeData=!0;this.m_loadingResumeData=this.m_trackingIsOn=!1;this.m_quizController=void 0;this.currentSlide="";this.currentSlideIndex=0;this.m_slideNames=[];this.verbose=this.m_isTracked=this.m_lastCourseDataSent=!1;this.m_GraphManager=void 0;this.m_courseStatesSeparator="$_#-#_$";this.m_timeouts=[]};
cp.PlaybackController.prototype={InitializePlaybackController:function(){var a=cp.movie.stage.getAllSlideNames();if(a){this.GetQuizController();for(var b=0;b<a.length;++b)this.AddSlideInfo(a[b])}},ClearTimeouts:function(){if(this.m_timeouts&&this.m_timeouts.length)for(;this.m_timeouts&&this.m_timeouts.length;)clearTimeout(this.m_timeouts.pop())},AddTimeout:function(a){this.m_timeouts.push(a)},GetTotalUnansweredQuestions:function(){var a=this.GetQuizController();return!a?-1:a.GetTotalUnansweredQuestions()},
AddQuestionSlideNames:function(){var a=cp.movie.stage.getAllSlideNames();if(a){var b=this.GetQuizController();if(b)for(var c=0;c<a.length;++c){var d=b.GetQuestionsOnSlide(c);d&&0<d.length&&b.AddQuestionSlideNames(a[c])}}},HasQuiz:function(a){"undefined"===typeof a&&(a=!1);var b=!1;if(a){var a=cp.movie.questionObjs,c=0;a&&(c=a.length);if(c){for(var d=c,e=0;e<c;++e)a[e]&&a[e].getIsKnowledgeCheck()&&d--;0<d&&(b=!0)}}else if(a=this.GetQuizController())a=a.GetQuestionSlidesNames(),void 0!=a&&0<a.length&&
(b=!0);return b},InitializeReportingVariables:function(){if(this.m_QuizReportingData){var a=this.m_QuizReportingData.lmsInitializationString;a&&""!=a&&(eval(a),(cp.IsRunningInACAP||cp.NotRunningInLMS)&&this.ResetReportingOptions())}},GetGraphManager:function(){if(cp.D.baq&&void 0!=cp.D.sgMgr){if(void 0==this.m_GraphManager){var a=void 0,b=this.GetQuizController();b&&(a=b.GetQuestionSlidesNames());void 0!=a&&0<a.length&&(this.m_GraphManager=new cp.QuizSlideGraphManager)}return this.m_GraphManager}},
GetLoadingResumeDataBln:function(){return this.m_loadingResumeData},SetLoadingResumeData:function(a){this.m_loadingResumeData=a},saveObjectsState:function(a){for(var b in cp.D){var c=cp.D[b];if(c&&c.hasOwnProperty("retainState")&&!0==c.retainState&&c.hasOwnProperty("temporaryInitialState")&&-1!=c.temporaryInitialState){var d=c.temporaryInitialState,c=c.stl;0<=d&&d<c.length&&(a.writeString(b),a.writeString(c[d].stn))}}},restoreObjectsFromState:function(a){if(a){var b=a.toString();if(!(0>=b.length))for(;a.getReadPos()<
b.length;){var c=a.readString(),d=a.readString();if(c=cp.D[c]){var e=c.stl;if(0<e.length)for(var f=0;f<e.length;f++)if(e[f].stn==d){c.temporaryInitialState=f;break}}}}},saveQuizState:function(a){var b=cpInfoCurrentSlideIndex;if(cp.movie.stage.is360QSlideIndex(b)){var c=void 0,d=b;do c=cp.D[cp.movie.stage.slides[d-1]],d--;while(0<d&&(c.iols||c.i360qs));c&&(b=cp.movie.stage.getSlideIndexForFrame(c.from))}a.writeNumber(b);for(c=0;c<this.m_slideNames.length;++c){var d=this.m_slideNames[c],e=cp.D[d];if(e)if(a.writeBoolean(e.v),
void 0!=e.pn){b=cp.D[e.qs];a.writeString(e.pn);var f=999,e=cp.D[e.pn].pqs;if(b)for(b=0;b<e.length;++b)d==e[b]&&(f=b);a.writeNumber(f)}else a.writeString(""),a.writeNumber(999)}b=cp.movie.playbackController.GetQuizController();c=cp.movie.playbackController.HasQuiz();b&&c&&b.saveState(a);d=[];f=cp.vm.varInfos.length;for(b=0;b<f;++b)(c=cp.vm.varInfos[b])&&!c.systemDefined&&d.push(c);b=0;f=d.length;a.writeNumber(f);for(b=0;b<f;++b)c=d[b],e=cp.vm.getVariableValue(c.name),null==e&&void 0==e&&(e=0),a.writeString(c.name),
isNaN(e)?(a.writeNumber(0),a.writeString(e)):(a.writeNumber(1),a.writeNumber(e))},restoreQuizFromState:function(a){if(a&&!(0>=a.toString().length)){for(var b=a.readNumber(),c=0;c<this.m_slideNames.length;++c){var d=cp.D[this.m_slideNames[c]];if(d){d.v=a.readBoolean();a.readString();var e=a.readNumber(),f=d.pn;f&&""!=f&&(e=cp.D[f].pqs[e],this.m_slideNames[c]=e,f=cp.movie.stage.getSlideNameForIndex(c),cp.movie.stage.setSlideNameForSlideAtIndex(c,e),-1!=f.indexOf("rq")&&(f=f.split("rq")[1],""!=f&&(cp.D[f]=
cp.D[e])),cp.poolManager&&cp.poolManager.updateSlideData(e,c,d))}}cp.poolManager&&cp.poolManager.updateMainMovieData();cp.ContinueQuizLibraryInit();c=cp.movie.playbackController.GetQuizController();d=cp.movie.playbackController.HasQuiz();c&&d&&c.restoreState(a);f=c=0;e=a.readNumber();for(c=0;c<e;++c)d=a.readString(),f=a.readNumber(),f=0==f?a.readString():a.readNumber(),cp.vm.hasOwnProperty(d)&&cp.vm.setVariableValue(d,f,!1);this.UpdateRestoredSlideIndex(b)}},UpdateRestoredSlideIndex:function(a){var b=
!1;a>=cp.movie.stage.slides.length-1&&(b=!0);var c=cp.movie.playbackController.GetQuizController(),d=!1,e=!1;c&&(d=c.GetIsSlideJudged(a),e=c.GetIsSubmitAll());!b&&(!e&&d)&&(a+=1);b=cp.D.project_main;if(!cp.movie.stage.isInvalidSlideIndex(a)&&b&&(a=cp.movie.stage.getSlideNameForIndex(a)))if(a=cp.D[a])a=a.from,void 0!=a&&(b.currentFrame=a)},AddSlideInfo:function(a){this.m_slideNames||(this.m_slideNames=[]);this.m_slideNames.push(a)},GetNumSlides:function(){return!this.m_slideNames?0:this.m_slideNames.length},
GetSlideNameAtIndex:function(a){if(this.m_slideNames&&0<=a&&a<this.m_slideNames.length)return this.m_slideNames[a]},GetSlideNames:function(){return this.m_slideNames},LeaveCurrentSlide:function(a){this.verbose&&cp.log("CPQuizLibrary :: PlaybackController :: Calling LeaveCurrentSlide");this.m_quizController&&(void 0==a||0>a||this.currentSlideIndex!=a&&this.m_quizController.LeaveSlide(this.currentSlideIndex,a))},SetCurrentSlide:function(a){this.verbose&&cp.log("CPQuizLibrary :: QuizController :: inside SetCurrentSlide - "+
a);var b=this.GetSlideNameAtIndex(a);b!=this.currentSlide&&(b!=this.currentSlide&&0<=a&&a<this.m_slideNames.length&&this.m_trackingAdapter&&this.GetIsTracked()&&("EMAIL"!=this.m_lmsType.toUpperCase()&&"ACROBAT"!=this.m_lmsType.toUpperCase()&&"INTERNALSERVER"!=this.m_lmsType.toUpperCase())&&this.m_trackingAdapter.SendSlideView(a),this.currentSlide=b,this.currentSlideIndex=a,b=this.GetGraphManager(),void 0!=b&&b.updateCurrentBranch(a),this.m_quizController&&this.m_quizController.EnterCurrentSlide(a))},
GetCurrentSlideIndex:function(){return this.currentSlideIndex},GetCurrentSlide:function(){return this.currentSlide},GetQuizController:function(){this.m_quizController||(this.m_quizController=cp.IsRunningInACAP?new cp.ACAPQuizController:new cp.QuizController,this.m_quizController.InitializeQuizController(),this.m_quizController.SetPlaybackController(this));return this.m_quizController},IsRunningInConnect:function(){var a=cp.IsRunningInConnect();a&&(this.m_lmsType="BREEZE");return a},ClearPendingCalls:function(){this.m_trackingAdapter&&
this.m_trackingAdapter.ClearPendingCalls()},LMSIsBreeze:function(){return this.IsRunningInConnect()},LMSIsAICC:function(){return"AICC"==this.m_lmsType.toUpperCase()},LMSIsAlternateReporting:function(){return"ACROBAT"==this.m_lmsType.toUpperCase()||"INTERNALSERVER"==this.m_lmsType.toUpperCase()},GetTrackingData:function(){if(this.IsRunningInConnect())if(this.verbose&&cp.log("Playback controller :: GetTrackingData()"),cp.BreezeTrackingAdapterObj&&!cp.BreezeTrackingAdapterObj.IsTrackingDataLoaded())this.TurnOffTracking();
else if(this.m_trackingAdapter&&this.m_trackingAdapter.GetTrackingData(),this.m_trackingAdapter&&this.m_trackingAdapter.IsTrackingDataLoaded()){this.m_trackingAdapter.GetLessonLocation();var a=this.m_trackingAdapter.GetLessonData();this.verbose&&cp.log("Playback controller :: GetTrackingData() :: quizStateStr :: "+a)}else this.TurnOffTracking()},CreateTrackingAdapter:function(){this.verbose&&cp.log("Playback controller :: CreateTrackingAdapter() :"+this.m_lmsType);var a={},b=-1!=this.m_lmsType.toUpperCase().indexOf("SCORM");
b&&(a.exitNormal=this.m_CmiExitNormalAfterCompletion,a.reportingOption=this.m_reportingOption);var c=!0,d=cp.D.quizReportingData;d&&(c=d.trackingSendResumeData);cp.IsRunningInACAP?(this.m_trackingAdapter=new cp.TrackingAdapter,this.m_trackingAdapter.SetLessonDataTracked(c),this.m_trackingAdapter.SetAdapterSpecificData(a),this.m_trackingAdapter.Initialize(),window.onbeforeunload=cp.UnloadActivties):(this.m_trackingAdapter=this.IsRunningInConnect()?cp.BreezeTrackingAdapterObj?cp.BreezeTrackingAdapterObj:
new cp.Breeze:this.LMSIsAlternateReporting()?new cp.InternalServerAdapter:new cp.SCORM_Rustici(b),window.onbeforeunload=cp.UnloadActivties,this.m_trackingAdapter?this.m_trackingAdapter!=cp.BreezeTrackingAdapterObj&&(void 0!=c&&this.m_trackingAdapter.SetLessonDataTracked(c),this.m_trackingAdapter.SetAdapterSpecificData(a),this.m_trackingAdapter.Initialize(),this.m_trackingAdapter.IsInitialized()&&this.IsRunningInConnect()&&this.GetTrackingData()):this.m_trackingIsOn=this.m_loadingResumeData=!1)},TurnOnTracking:function(){this.verbose&&
cp.log("Playback controller :: TurnOnTracking()");if(!this.m_trackingIsOn||cp.IsRunningInACAP)this.m_trackingIsOn=this.m_loadingResumeData=!0,this.CreateTrackingAdapter()},TurnOffTracking:function(){this.verbose&&cp.log("Playback controller :: TurnOffTracking()");this.m_trackingIsOn&&(this.m_trackingIsOn=this.m_loadingResumeData=!1)},GetIsTracked:function(){return this.m_isTracked},SetIsTracked:function(a){if(cp.IsRunningInACAP)return this.TurnOnTracking();this.IsRunningInConnect()?a=!0:this.LMSIsAlternateReporting()||
"undefined"==typeof cp.LMSDriverHolder&&(a=!1);this.verbose&&cp.log("Playback controller :: SetIsTracked()");a&&a!=this.m_isTracked?this.TurnOnTracking():a||(a!=this.m_isTracked?this.TurnOffTracking():this.m_loadingResumeData=!1);this.m_isTracked=a},AllowedToGoToSlide:function(a,b){if(!this.m_quizController||a==b)return"";if(0>a||0>b)return"QUIZ_ERROR_BAD_SLIDE_NUM";var c=b<a;if(this.m_quizController.SubmitAllDialogShown(a,b))return"QUIZ_ERROR_SUBMIT_ALL";for(var d=a<b?1:-1,e="",f=a;;){if(f==b)return this.m_quizController.CanEnterSlide(b);
e=this.m_quizController.CanLeaveSlide(f,c);if(""!=e)return e;f+=d}},GetTotalQuizScore:function(){if(this.m_quizController)return this.m_quizController.GetScore()},GetTotalQuizMaxScore:function(){if(this.m_quizController)return this.m_quizController.GetMaxScore()},GetTotalQuizMinScore:function(){if(this.m_quizController)return this.m_quizController.GetMinScore()},GetTotalQuizLocation:function(){return this.currentSlideIndex},HasQuizzes:function(){return!this.m_quizController?!1:this.m_quizController.HasQuiz()},
GetAllQuestionsAnswered:function(){return!this.m_quizController||!this.m_quizController.GetAllQuestionsAnswered()?!1:!0},GetAllQuizAttemptsFinished:function(){return!this.m_quizController||!this.m_quizController.GetIsAttemptFinished()?!1:!0},GetAllQuizzesPassed:function(){return!this.m_quizController||!this.m_quizController.GetIsPassed()?!1:!0},GetNumberOfSlidesSeen:function(){var a=0;if(!this.m_slideNames)return!1;for(var b=0;b<this.m_slideNames.length;++b)cp.D[this.m_slideNames[b]].v&&a++;return a},
GetPercentageSlidesSeen:function(){var a=this.GetGraphManager();if(void 0!=a)return a=a.getSlideViewPercentage(),"NaN"==a?0:a;if(!this.m_slideNames)return!1;a=this.m_slideNames.length;if(0<a)return 100*(this.GetNumberOfSlidesSeen()/a)},GetAllSlidesSeen:function(){if(!this.m_slideNames)return!1;for(var a=0;a<this.m_slideNames.length;++a)if(!cp.D[this.m_slideNames[a]].v)return!1;return!0},GetAllQuizzesPassingScore:function(){return!this.m_quizController?!1:this.m_quizController.GetPassingScore()},GetIsQuizAttempted:function(){var a=
!1;if(this.m_quizController)return a=this.m_quizController.GetQuizBranchAware()?this.m_quizController.GetAnyNonPreTestQuestionAnswered():this.m_quizController.GetAnyQuestionsAnswered()},EvaluateQuizStatus:function(a){var b=!1;switch(a){case this.QuizCriteriaEnum.QuizIsPassed:this.GetAllQuizzesPassed()&&(b=!0);break;case this.QuizCriteriaEnum.QuizIsAttempted:b=this.GetIsQuizAttempted();break;case this.QuizCriteriaEnum.QuizIsPassedOrAttempLimitReached:if(this.GetAllQuizzesPassed())return!0;if(this.m_quizController&&
this.m_quizController.quizNumStarts<this.m_quizController.GetNumberOfQuizAttempts())break;return!0;default:this.verbose&&cp.log("Illegal parameter to EvaluateQuizStatus: "+a)}return b},EvaluateViewStatus:function(a,b){var c=!1,d=this.GetNumberOfSlidesSeen();if(this.m_slideNames&&0<this.m_slideNames.length)totalSlides=this.m_slideNames.length;else return this.verbose&&cp.log("In EvaluateViewStatus,totalSlides not obtained or found to be zero. Returning."),!1;switch(b){case this.SlideViewsTypeEnum.percent:this.GetPercentageSlidesSeen()>=
a&&(c=!0);break;case this.SlideViewsTypeEnum.number:d>=a&&(c=!0);break;default:this.verbose&&cp.log("Illegal arg to EvaluateViewStatus:"+a+","+b)}return c},EvaluateStatus:function(a){var b=!1,c=this.QuizCriteriaEnum,d=this.SlideViewsTypeEnum,e=0,f=this.ReportingOptionsEnum;if("completion"==a)c=this.m_completionQuizCriteria,d=this.m_completionSlideViewsType,e=this.m_slideViewsForCompletion,f=this.m_completionCriteria;else if("success"==a)c=this.m_successQuizCriteria,d=this.m_successSlideViewsType,
e=this.m_slideViewsForSuccess,f=this.m_successCriteria;else return this.verbose&&cp.log("Illegal status type to evaluateStatus:"+a),!1;switch(f){case this.ReportingOptionsEnum.quiz_only:b=this.EvaluateQuizStatus(c);break;case this.ReportingOptionsEnum.quiz_and_views:this.EvaluateQuizStatus(c)&&this.EvaluateViewStatus(e,d)&&(b=!0);break;case this.ReportingOptionsEnum.views_only:b=this.EvaluateViewStatus(e,d);break;case this.ReportingOptionsEnum.access:b=1<=this.GetNumberOfSlidesSeen();break;default:this.verbose&&
cp.log("Illegal value of criteria in evaluateStatus():"+a)}return b},IsSlideVisited:function(a){if(a=cp.D[a])return a.v},ShouldSendSuccessStatus:function(){var a=!1;if(this.m_successCriteria==this.ReportingOptionsEnum.access)a=1<=this.GetNumberOfSlidesSeen();else if(this.m_successCriteria==this.ReportingOptionsEnum.quiz_only){if(a=!0,this.m_quizController){var b=this.m_slideNames[this.m_quizController.GetLastSlideInQuizIndex()];this.IsSlideVisited(b)||(a=!1)}}else if(this.m_successCriteria==this.ReportingOptionsEnum.quiz_and_views){if(this.m_quizController&&
(b=this.m_slideNames[this.m_quizController.GetLastSlideInQuizIndex()],!this.IsSlideVisited(b)))return a;if(!this.GetAllQuizzesPassed()||this.IsSlideVisited(this.m_slideNames[this.m_slideNames.length-1]))a=!0}else this.m_successCriteria==this.ReportingOptionsEnum.views_only&&(a=this.IsSlideVisited(this.m_slideNames[this.m_slideNames.length-1]));return a},GetTotalQuizStatusAll:function(){var a={isPassed:!1,isCompleted:!1,sendCompletion:!0,sendNothing:!1},b=this.ReportingOptionsEnum,b=this.LMSIsBreeze()?
this.ReportingOptionsEnum.breeze:this.GetReportingOption();switch(b){case this.ReportingOptionsEnum.breeze:this.HasQuiz(!0)?this.GetAllQuizAttemptsFinished()?(a.isPassed=this.GetAllQuizzesPassed()?!0:!1,a.isCompleted=!0,a.sendCompletion=!1):(a.isPassed=!1,a.isCompleted=!1,a.sendCompletion=!0):(this.GetAllSlidesSeen()?(a.isPassed=!0,a.isCompleted=!0):(a.isPassed=!1,a.isCompleted=!1),a.sendCompletion=!0);break;case this.ReportingOptionsEnum.completion_success:a.sendCompletion=!1;a.isCompleted=this.EvaluateStatus("completion");
a.isPassed=this.EvaluateStatus("success");break;case this.ReportingOptionsEnum.completion_only:a.sendCompletion=!0;a.isCompleted=this.EvaluateStatus("completion");break;case this.ReportingOptionsEnum.incompleteToPassedOrFailed:a.isPassed=this.EvaluateStatus("success");this.m_beginSendingSuccessStatus=this.ShouldSendSuccessStatus();break;case this.ReportingOptionsEnum.access:break;default:1>this.GetNumberOfSlidesSeen()?(a.isPassed=!1,a.isCompleted=!1):(a.isPassed=!0,a.isCompleted=!0),a.sendCompletion=
!0}return a},GetTotalQuizPassed:function(){return this.GetTotalQuizStatusAll().isPassed?"passed":"failed"},GetTotalQuizCompleted:function(){return this.GetTotalQuizStatusAll().isCompleted?"completed":"incomplete"},GetTotalQuizSendCompletion:function(){var a=!0;switch(this.m_completionValueToSend){case "completion":a=!0;break;case "passed":a=!1;break;default:a=this.GetTotalQuizStatusAll().sendCompletion}return a},GetTotalQuizState:function(){return""},GetProgressMeasure:function(){return 0==this.m_slideNames.length?
0:this.GetNumberOfSlidesSeen()/this.m_slideNames.length},ShouldFlushCourseData:function(a,b){a?a.printCourseData():this.verbose&&cp.log("lastData is undefined");b?(this.verbose&&cp.log("thisData "),b.printCourseData()):this.verbose&&cp.log("thisData is undefined");if("EMAIL"==this.m_lmsType.toUpperCase()||"ACROBAT"==this.m_lmsType.toUpperCase()||"INTERNALSERVER"==this.m_lmsType.toUpperCase())return this.verbose&&cp.log("return false0"),!1;if(void 0==b)return this.verbose&&cp.log("return false1"),
!1;if(void 0==a)return this.verbose&&cp.log("return true0"),!0;if(b.quizMinScore!=a.quizMinScore||b.quizMaxScore!=a.quizMaxScore||b.sendScoreAsPercent!=a.sendScoreAsPercent||b.quizSendCompletion!=a.quizSendCompletion)return this.verbose&&cp.log("return true1"),!0;if(b.quizScore!=a.quizScore||b.quizCompleted!=a.quizCompleted||b.quizPassed!=a.quizPassed)return this.verbose&&cp.log("return true2"),!0;this.verbose&&cp.log("return false2");return!1},ShouldSendCourseData:function(a,b){a?(this.verbose&&
cp.log("lastData "),a.printCourseData()):this.verbose&&cp.log("lastData is undefined");b?(this.verbose&&cp.log("thisData "),b.printCourseData()):this.verbose&&cp.log("thisData is undefined");if("EMAIL"==this.m_lmsType.toUpperCase()||"ACROBAT"==this.m_lmsType.toUpperCase()||"INTERNALSERVER"==this.m_lmsType.toUpperCase())return this.verbose&&cp.log("return false -2"),!1;if(void 0==b)return this.verbose&&cp.log("return false -1"),!1;if(void 0==a)return this.verbose&&cp.log("return true0"),!0;this.verbose&&
cp.log("function shouldSendCourseData 33");if(b.slideCount>=a.slideCount+10)return this.verbose&&cp.log("return true1"),!0;if(b.quizMinScore!=a.quizMinScore||b.quizMaxScore!=a.quizMaxScore||b.sendScoreAsPercent!=a.sendScoreAsPercent||b.quizSendCompletion!=a.quizSendCompletion)return this.verbose&&cp.log("return true2"),!0;if(b.quizScore!=a.quizScore||b.quizCompleted!=a.quizCompleted||b.quizPassed!=a.quizPassed)return this.verbose&&cp.log("return true3"),!0;if(b.quizLocation!=a.quizLocation)return!0;
this.verbose&&cp.log("return false4");return!1},SendSuspendDataOnly:function(){this.verbose&&cp.log("PlaybackController::SendSuspendDataOnly()");var a=cp.createAndGetDataChunk();this.GetIsTracked()&&this.m_trackingAdapter&&(cp.m_isLMSPreview&&void 0!=cp.LMSDriverHolder&&cp.toggleLMSPreviewDebugLogsColor(cp.LMSDriverHolder),this.m_trackingAdapter.SendSuspendData(a));cp.IsRunningInACAP&&cp.fireResumeDataEvent(a)},CanSendCourseData:function(){return!0},GetCourseData:function(){var a={printCourseData:function(){}};
a.slideCount=this.GetCurrentSlideIndex();a.quizScore=this.GetTotalQuizScore();a.quizMinScore=this.GetTotalQuizMinScore();a.quizMaxScore=this.GetTotalQuizMaxScore();a.sendScoreAsPercent=this.GetSendScoreAsPercent();a.quizLocation=""+this.GetTotalQuizLocation()+"";a.quizCompleted=this.GetTotalQuizCompleted();a.quizPassed=this.GetTotalQuizPassed();a.quizSendCompletion=this.GetTotalQuizSendCompletion();a.quizTime=void 0;a.quizState=this.GetTotalQuizState();a.progressMeasure=this.GetProgressMeasure();
a.sendIncompleteToPassedOrFailed=this.m_sendIncompleteToPassedOrFailed;a.beginSendingSuccessStatus=this.m_beginSendingSuccessStatus;return a},SendCourseData:function(a){var b=this.GetQuizController();b&&b.GetIsSubmitAll()&&b.quizInProgress&&!b.m_submittedAllQuestions?this.SendSuspendDataOnly():this.CanSendCourseData()&&(this.SetBreezeDefaults(),this.m_trackingAdapter&&this.GetIsTracked()&&(b=this.GetCourseData(),a=a||this.ShouldFlushCourseData(this.m_lastCourseDataSent,b),this.verbose&&cp.log("sendCourseData flush "+
a),a||this.ShouldSendCourseData(this.m_lastCourseDataSent,b)?(this.m_lastCourseDataSent=b,this.verbose&&cp.log("sending course data flush "+a),this.m_trackingAdapter.SendTrackingData(b.quizScore,b.quizMinScore,b.quizMaxScore,b.sendScoreAsPercent,b.quizLocation,b.quizCompleted,b.quizPassed,b.quizSendCompletion,b.quizTime,b.quizState,b.progressMeasure,b.sendIncompleteToPassedOrFailed,b.beginSendingSuccessStatus),a&&this.m_trackingAdapter.Flush()):this.verbose&&cp.log("NOT sending course data")))},SendQuestionEventData:function(a){this.verbose&&
cp.log("PlaybackController::SendQuestionData()");var b=0,c=this.GetQuizController();c&&(b=c.GetMaxScore());b={slideNumber:a.getslideNum(),questionNumber:a.getquestionNumInQuiz(),questionScoringType:a.getQuestionScoringType(),interactionType:a.getinteractionType(),weighting:a.getWeighting(),questionAnswered:!1==a.getanswersIncomplete(),questionAnsweredCorrectly:a.getansweredCorrectly(),questionMaxScore:b,questionScore:a.getscoredPoints(),questionMaxAttempts:a.getmaxTries(),infiniteAttempts:9999==a.getmaxTries(),
questionAttempts:a.getnumTries(),interactionID:a.getinteractionID(),quizName:"QuizName",objectiveID:a.getobjectiveID(),selectedAnswer:a.m_chosenAnswersAsString};cp.IsRunningInACAP&&(b.descriptionData=a.m_descriptionTexts);cp.em.fireEvent("CPQuestionSubmit",b)},SetBreezeDefaults:function(){this.LMSIsBreeze()&&(this.m_completionValueToSend="default",this.m_completionTrigger=this.ReportingOptionsEnum.breeze,this.m_completionSlideViewPercentage=100,this.m_sendScoreAsPercent=!1,this.m_trackingLevel="interactions",
this.m_trackingUrlEncodeVersionAndSession=!0,this.m_trackingCharsToNotUrlEncode="",this.m_trackingSendResumeData=!0)},SendInteractionData:function(a,b){this.verbose&&cp.log("PlaybackController::SendInteraction()");this.SetBreezeDefaults();if(this.GetIsTracked()&&"interactions"==this.m_trackingLevel){var c=this.GetQuizController();c&&c.GetScore();if(this.LMSIsAICC()||this.IsRunningInConnect())this.m_trackingAdapter&&this.m_trackingAdapter.SendInteractionData(a.m_interactionID,a.m_objectiveID,a.m_interactionType,
a.m_correctAnswersAsString,a.m_chosenAnswersAsString,a.m_isCorrectAsString,a.m_weighting,a.m_latencyAsSeconds,a.m_curDateAsString2,a.m_curTimeAsSecondsSinceMidnight,a.m_scoredPoints,a.m_negativeWeight,b);else{this.LMSIsAlternateReporting()&&(escapeAnswers=!1);var d=a.m_correctAnswersAsString;if(this.LMSIsAlternateReporting()&&c){var e=c.GetQuestionsOnSlide(this.currentSlide);e&&0!=e.length&&(e=e[0])&&e.GetIsSurvey()&&(d=" ");this.m_trackingAdapter&&this.m_trackingAdapter.SetCurrentAttempt(c.quizNumStarts)}this.m_trackingAdapter&&
this.m_trackingAdapter.SendInteractionData(a.m_interactionID,a.m_objectiveID,a.m_interactionType,d,a.m_chosenAnswersAsString,a.m_isCorrectAsString,a.m_weighting,a.m_latencyAsSeconds,a.m_curDateAsString,a.m_curTimeAsSecondsSinceMidnight,a.m_scoredPoints,a.m_negativeWeight,b)}}},OnEndQuiz:function(){this.GetIsTracked()&&("EMAIL"!=this.m_lmsType.toUpperCase()&&"ACROBAT"!=this.m_lmsType.toUpperCase()&&"INTERNALSERVER"!=this.m_lmsType.toUpperCase())&&this.SendCourseData(!0)},SendEmailResults:function(){this.GetIsTracked()&&
"EMAIL"==this.m_lmsType.toUpperCase()&&(this.verbose&&cp.log("sending course data from sendEmailResults"),this.SendCourseData(!0))},PostQuizResults:function(){if(this.GetIsTracked()&&("ACROBAT"==this.m_lmsType.toUpperCase()||"INTERNALSERVER"==this.m_lmsType.toUpperCase()))this.verbose&&cp.log("sending course data from PostQuizResults"),this.CanPostResults()&&this.SendCourseData(!0)},CanPostResults:function(){return this.GetAllQuizzesPassed()||this.m_quizController&&(this.m_quizController.m_numStarts>=
this.m_quizController.m_numQuizAttemptsAllowed||this.m_quizController.GetIsInReviewMode())?!0:!1},DoSendLMSTrackingData:function(){this.GetIsTracked()&&"EMAIL"!=this.m_lmsType.toUpperCase()&&"ACROBAT"!=this.m_lmsType.toUpperCase()&&"INTERNALSERVER"!=this.m_lmsType.toUpperCase()?this.SendCourseData(!this.LMSIsAICC()||!this.m_playbackController.IsRunningInConnect()):this.SendCourseData(!1)},RestoreQuizState:function(){this.verbose&&cp.log("PlaybackController :: RestoreQuizState()");var a=this.GetQuizController();
a&&a.GetIsReportingEnabled()&&(cp.resumeValuesFromDataChunk(),cp.movie.resumeMovieSpecificValue())},GetRestoredQuizSlide:function(){this.verbose&&cp.log("PlaybackController :: GoToRestoredQuizSlide()");var a=cp.D.project_main.currentFrame;this.verbose&&cp.log("Restoring frame :: "+a);return a},DoPollLMSGetTrackingDataLoaded:function(){this.GetIsTracked()&&(this.m_trackingAdapter?this.m_trackingAdapter.IsTrackingDataLoaded()&&(this.m_trackingAdapter.GetLessonLocation(),this.m_trackingAdapter.GetLessonData()):
(this.verbose&&cp.log("_doPollLMSGetTrackingDataLoaded else"),turnOffTracking()))},ExitCourse:function(){this.verbose&&cp.log("function exitCourse 1 "+isTracked);this.m_trackingAdapter&&this.GetIsTracked()?(this.verbose&&cp.log("function exitCourse isTracked "),"EMAIL"!=this.m_lmsType.toUpperCase()&&("ACROBAT"!=this.m_lmsType.toUpperCase()&&"INTERNALSERVER"!=this.m_lmsType.toUpperCase())&&(this.verbose&&cp.log("function exitCourse sendCourseData "),this.SendCourseData(!0)),this.m_trackingAdapter.Finish()):
this.verbose&&cp.log("doFinalExit();")},GetSendCourseDataWithInteractionData:function(){return this.m_sendCourseDataWithInteractionData},GetLMSType:function(){return this.m_lmsType},SetLMSType:function(){this.verbose&&cp.log("SetLMSType");switch(this.m_QuizReportingData.lmsType){case 1:this.m_lmsType="SCORM2004";break;case 2:this.m_lmsType="SCORM12";break;case 3:this.m_lmsType="Authorware";break;case 4:this.m_lmsType="AICC";break;case 5:this.m_lmsType="Questionmark";break;case 6:this.m_lmsType="email";
break;case 7:this.m_lmsType="AICC";break;case 8:this.m_lmsType="Acrobat";break;case 9:this.m_lmsType="InternalServer";break;default:this.m_lmsType=""}},SetAuthorwareDelimeter:function(){this.verbose&&cp.log("SetAuthorwareDelimeter");this.m_AuthorwareDelimeter=this.m_QuizReportingData.authorwareDelimeter},SetSendScoreAsPercent:function(){this.verbose&&cp.log("SetSendScoreAsPercent");this.m_sendScoreAsPercent=this.m_QuizReportingData.sendScoreAsPercent?!0:!1},GetSendScoreAsPercent:function(){return this.IsRunningInConnect()?
!1:this.m_sendScoreAsPercent},SetSendCompletionFlag:function(){this.m_completionValueToSend=this.m_QuizReportingData.sendCompletionFlag?"completion":"passed"},GetSendCompletionFlag:function(){return this.m_completionValueToSend},SetTrackingLevel:function(){this.verbose&&cp.log("SetTrackingLevel");switch(this.m_QuizReportingData.trackingLevel){case 0:this.m_trackingLevel="interactions";break;case 2:this.m_trackingLevel="score"}},SetSlideViewPercentage:function(){this.verbose&&cp.log("SetSlideViewPercentage");
this.m_completionSlideViewPercentage=this.m_QuizReportingData.slideViewPercentage},SetReportingOption:function(){this.verbose&&cp.log("SetReportingOption");switch(this.m_QuizReportingData.reportingOption){case 0:this.m_reportingOption=this.ReportingOptionsEnum.completion_success;break;case 1:this.m_reportingOption=this.ReportingOptionsEnum.completion_only;break;case 2:this.m_reportingOption=this.ReportingOptionsEnum.incompleteToPassedOrFailed;this.m_sendIncompleteToPassedOrFailed=!0;break;case 4:this.m_reportingOption=
this.ReportingOptionsEnum.breeze;break;default:this.m_reportingOption=""}this.m_completionTrigger=this.m_reportingOption},GetReportingOption:function(){return this.m_reportingOption},SetSlideViewsForSuccess:function(){this.verbose&&cp.log("SetSlideViewsForSuccess");this.m_slideViewsForSuccess=this.m_QuizReportingData.slideViewsForSuccess;switch(this.m_QuizReportingData.slideViewsTypeForSuccess){case 0:this.m_successSlideViewsType=this.SlideViewsTypeEnum.percent;break;case 1:this.m_successSlideViewsType=
this.SlideViewsTypeEnum.number;break;default:this.m_successSlideViewsType=this.SlideViewsTypeEnum.percent}},SetSlideViewsForCompletion:function(){this.verbose&&cp.log("SetSlideViewsForCompletion");this.m_slideViewsForCompletion=this.m_QuizReportingData.slideViewsForCompletion;switch(this.m_QuizReportingData.slideViewsTypeForCompletion){case 0:this.m_completionSlideViewsType=this.SlideViewsTypeEnum.percent;break;case 1:this.m_completionSlideViewsType=this.SlideViewsTypeEnum.number;break;default:this.m_completionSlideViewsType=
this.SlideViewsTypeEnum.percent}},SetQuizCriteriaForCompletion:function(){this.verbose&&cp.log("SetQuizCriteriaForCompletion");switch(this.m_QuizReportingData.quizCriteriaForCompletion){case 0:this.m_completionQuizCriteria=this.QuizCriteriaEnum.QuizIsPassed;break;case 1:this.m_completionQuizCriteria=this.QuizCriteriaEnum.QuizIsAttempted;break;case 2:this.m_completionQuizCriteria=this.QuizCriteriaEnum.QuizIsPassedOrAttempLimitReached;break;default:this.verbose&&cp.log("Value of quizCriteria not valid in setQuizCriteriaForCompletion()!"),
this.m_completionQuizCriteria=this.QuizCriteriaEnum.QuizIsPassed}},SetQuizCriteriaForSuccess:function(){this.verbose&&cp.log("SetQuizCriteriaForSuccess");switch(this.m_QuizReportingData.quizCriteriaForSuccess){case 0:this.m_successQuizCriteria=this.QuizCriteriaEnum.QuizIsPassed;break;case 1:this.m_successQuizCriteria=this.QuizCriteriaEnum.QuizIsAttempted;break;case 2:this.m_successQuizCriteria=this.QuizCriteriaEnum.QuizIsPassedOrAttempLimitReached;break;default:this.verbose&&cp.log("Value of quizCriteria not valid in setQuizCriteriaForSuccess()!"),
this.m_successQuizCriteria=this.QuizCriteriaEnum.QuizIsPassed}},SetCompletionCriteria:function(){this.verbose&&cp.log("SetCompletionCriteria");switch(this.m_QuizReportingData.completionCriteria){case 0:this.m_completionCriteria=this.ReportingOptionsEnum.breeze;break;case 1:this.m_completionCriteria=this.ReportingOptionsEnum.quiz_only;break;case 2:this.m_completionCriteria=this.ReportingOptionsEnum.quiz_and_views;break;case 3:this.m_completionCriteria=this.ReportingOptionsEnum.views_only;break;case 4:this.m_completionCriteria=
this.ReportingOptionsEnum.access;break;case 5:this.m_completionCriteria=this.ReportingOptionsEnum.completion_success;break;case 6:this.m_completionCriteria=this.ReportingOptionsEnum.incompleteToPassedOrFailed;break;default:this.verbose&&cp.log("Invalid criteria recd in setOnlySuccessCriteria")}},SetSuccessCriteria:function(){this.verbose&&cp.log("SetSuccessCriteria");switch(this.m_QuizReportingData.successCriteria){case 0:this.m_successCriteria=this.ReportingOptionsEnum.breeze;break;case 1:this.m_successCriteria=
this.ReportingOptionsEnum.quiz_only;break;case 2:this.m_successCriteria=this.ReportingOptionsEnum.quiz_and_views;break;case 3:this.m_successCriteria=this.ReportingOptionsEnum.views_only;break;case 4:this.m_successCriteria=this.ReportingOptionsEnum.access;break;case 5:this.m_successCriteria=this.ReportingOptionsEnum.completion_success;break;case 6:this.m_successCriteria=this.ReportingOptionsEnum.incompleteToPassedOrFailed;break;default:this.verbose&&cp.log("Invalid criteria recd in setOnlySuccessCriteria")}},
SetEmailAddress:function(){this.verbose&&cp.log("SetEmailAddress");this.m_emailAddress=this.m_QuizReportingData.emailAddress},SetInternalServerURL:function(){this.verbose&&cp.log("SetInternalServerURL");this.m_internalServerURL=this.m_QuizReportingData.internalServerURL},SetDirectory:function(){this.verbose&&cp.log("SetDirectory");this.m_companyName=this.m_QuizReportingData.companyName;this.m_departmentName=this.m_QuizReportingData.departmentName;this.m_courseName=this.m_QuizReportingData.courseName},
SetCourseNode:function(){this.verbose&&cp.log("SetCourseNode");this.m_courseNode=this.m_QuizReportingData.courseNode},GetIsTrackedFlag:function(){return this.m_isTrackedFlag},SetIsTrackedFlag:function(){this.verbose&&cp.log("SetIsTrackedFlag");this.m_isTrackedFlag=this.m_QuizReportingData.isTrackedFlag},SetTrackingUrlEncodeVersionAndSession:function(){this.verbose&&cp.log("SetTrackingUrlEncodeVersionAndSession");this.m_trackingSendResumeData=this.m_QuizReportingData.trackingUrlEncodeVersionAndSession?
!0:!1},SetTrackingCharsToNotUrlEncode:function(){this.verbose&&cp.log("SetTrackingCharsToNotUrlEncode");this.m_trackingCharsToNotUrlEncode=this.m_QuizReportingData.trackingCharsToNotUrlEncode},SetCommitDataOnEverySlide:function(){this.verbose&&cp.log("SetOptimizeCommitData");this.m_commitDataOnEverySlide=this.m_QuizReportingData.commitDataOnEverySlide?!0:!1},SetTrackingSendResumeData:function(){this.verbose&&cp.log("SetTrackingSendResumeData");this.m_trackingSendResumeData=this.m_QuizReportingData.trackingSendResumeData?
!0:!1},SetCmiExitNormalAfterCompletion:function(){this.verbose&&cp.log("SetCmiExitNormalAfterCompletion");this.m_CmiExitNormalAfterCompletion=this.m_QuizReportingData.cmiExitNormalAfterCompletion},ResetReportingOptions:function(){this.m_sendCourseDataWithInteractionData=!1;this.m_completionValueToSend="default";this.m_completionTrigger=cp.ReportingOptionsEnum.completion_success;this.m_slideViewsForCompletion=this.m_slideViewsForSuccess=0;this.m_successCriteria=this.m_completionCriteria=cp.ReportingOptionsEnum.access;
this.m_completionQuizCriteria=this.m_successQuizCriteria=cp.QuizCriteriaEnum.QuizIsPassed;this.m_successSlideViewsType=this.m_completionSlideViewsType=cp.SlideViewsTypeEnum.percent;this.m_UseRusticiAdapter=this.m_beginSendingSuccessStatus=this.m_sendIncompleteToPassedOrFailed=!1;this.m_lmsType="";this.m_sendScoreAsPercent=!1;this.m_trackingLevel=0;this.m_completionSlideViewPercentage=100;this.m_reportingOption=cp.ReportingOptionsEnum.completion_success;this.m_courseNode=this.m_courseName=this.m_departmentName=
this.m_companyName=this.m_internalServerURL=this.m_emailAddress="";this.m_isTrackedFlag=!1;this.m_trackingUrlEncodeVersionAndSession=!0;this.m_trackingCharsToNotUrlEncode="";this.m_isTracked=this.m_loadingResumeData=this.m_trackingIsOn=this.m_CmiExitNormalAfterCompletion=this.m_trackingSendResumeData=this.m_commitDataOnEverySlide=!1}};cp.ACAPPlaybackController=function(){cp.ACAPPlaybackController.baseConstructor.call(this);this.ResetReportingOptions()};cp.inherits(cp.ACAPPlaybackController,cp.PlaybackController);
cp.ACAPPlaybackController.prototype.ResetReportingOptions=function(){this.m_sendCourseDataWithInteractionData=!0;this.m_completionValueToSend="default";this.m_completionTrigger=cp.ReportingOptionsEnum.completion_success;this.m_slideViewsForSuccess=window.cpAPIInterface.slideViewsForSuccess;this.m_slideViewsForCompletion=window.cpAPIInterface.slideViewsForCompletion;this.m_completionCriteria=window.cpAPIInterface.completionCriteria;this.m_successCriteria=window.cpAPIInterface.successCriteria;this.m_successQuizCriteria=
window.cpAPIInterface.quizCriteriaForSuccess;this.m_completionQuizCriteria=window.cpAPIInterface.quizCriteriaForCompletion;this.m_completionSlideViewsType=window.cpAPIInterface.slideViewsTypeForCompletion;this.m_successSlideViewsType=window.cpAPIInterface.slideViewsTypeForSuccess;this.m_sendIncompleteToPassedOrFailed=!1;this.m_beginSendingSuccessStatus=!0;this.m_UseRusticiAdapter=!1;this.m_lmsType="";this.m_sendScoreAsPercent=!1;this.m_trackingLevel=0;this.m_completionSlideViewPercentage=100;this.m_reportingOption=
cp.ReportingOptionsEnum.completion_success;this.m_courseNode=this.m_courseName=this.m_departmentName=this.m_companyName=this.m_internalServerURL=this.m_emailAddress="";this.m_trackingUrlEncodeVersionAndSession=this.m_isTrackedFlag=!0;this.m_trackingCharsToNotUrlEncode="";this.m_isTracked=this.m_loadingResumeData=this.m_trackingIsOn=this.m_CmiExitNormalAfterCompletion=this.m_commitDataOnEverySlide=!0};
cp.TrackingAdapter=function(){this.m_trackingAdapterType={};this.m_trackingDataLoaded_bln=this.m_initialized=!1;this.m_escapeAICCvs_bln=this.m_lessonDataTracked_bln=this.m_interactionDataTracked_bln=!0;this.m_ignoreEscapeList_str="";this.m_timer_int=this.m_currentAttempt=0;this.m_timer_str="";this.m_score_tot=this.m_score_pass=this.m_score_scaled_cp=this.m_score_max=this.m_score_min=this.m_score_raw=0;this.m_success_status=this.m_time="";this.m_statusType_int=1;this.m_exit=this.m_entry=this.m_credit=
this.m_student_name=this.m_student_id=this.m_lesson_mode="";this.m_progressMeasure=0;this.m_interaction_ary=[];this.m_comments=this.m_comments_from_lms=this.m_launch_data=this.m_vendor_data=this.m_suspend_data=this.m_lesson_data=this.m_lessonLocation="";this.m_lesson_status=void 0;this.m_lesson_status_array=[];this.m_score_array=[];this.m_mastery_score=0;this.m_time_limit_action=this.m_max_time_allowed="";this.m_isRDStandAlone=this.m_isRDPreview=!1;this.m_adapterReportingVariables=cp.ReportingVariables.split(",");
this.verbose=!1};
cp.TrackingAdapter.prototype={GetInteractionArray:function(){return this.m_interaction_ary},GetCurrentAttempt:function(){return this.m_currentAttempt},SetCurrentAttempt:function(a){this.m_currentAttempt=a},Initialize:function(){this.IsInitialized()||this.SetInitialized("true")},SetInitialized:function(a){"true"==a?a=!0:"false"==a&&(a=!1);this.m_initialized=a},IsInitialized:function(){return this.m_initialized},IsInteractionDataTracked:function(){return this.m_interactionDataTracked_bln},IsLessonDataTracked:function(){return this.m_lessonDataTracked_bln},
IsTrackingDataLoaded:function(){return this.m_trackingDataLoaded_bln},IsAICCvsEscaped:function(){return this.m_escapeAICCvs_bln},GetTrackingAdapterType:function(){return this.m_trackingAdapterType},SetTrackingAdapterType:function(a,b){this.m_trackingAdapterType.type_int=a;this.m_trackingAdapterType.type_str=b},Flush:function(){},Finish:function(){},GetInteractionDataTracked:function(){return this.m_interactionDataTracked_bln},GetLessonDataTracked:function(){return this.m_lessonDataTracked_bln},GetEscapeAICCvs:function(){return this.m_escapeAICCvs_bln},
GetIgnoreEscapeList:function(){return this.m_ignoreEscapeList_str},SetInteractionDataTracked:function(a){this.m_interactionDataTracked_bln=a},SetLessonDataTracked:function(a){this.m_lessonDataTracked_bln=a},SetEscapeAICCvs:function(a){this.m_escapeAICCvs_bln=a},SetIgnoreEscapeList:function(a){this.m_ignoreEscapeList_str=a},SetTrackingDataLoaded:function(a){return this.m_trackingDataLoaded_bln=a},SetTrackingFinished:function(){this.SetInitialized(!1);this.SetTrackingDataLoaded(!1)},SetStatusType:function(a){this.m_statusType_int=
a},GetStatusType:function(){return this.m_statusType_int},GetScore:function(a){var b=this.GetScoreRaw();""==b&&(b=" ");if(void 0==a||!1==a)""!=this.GetScoreMax()&&""!=this.GetScoreMin()&&(b=b+","+this.GetScoreMax()+","+this.GetScoreMin());return b},GetScoreRaw:function(){void 0==this.m_score_raw&&(this.m_score_raw="");return this.m_score_raw},GetScoreMax:function(){if(void 0==this.m_score_max||""==this.m_score_max||" "==this.m_score_max)this.m_score_max="";return this.m_score_max},GetScoreMin:function(){if(void 0==
this.m_score_min||""==this.m_score_min||" "==this.m_score_min)this.m_score_min="";return this.m_score_min},GetScoreScaled:function(){if(void 0==this.m_score_scaled_cp||""==this.m_score_scaled_cp||" "==this.m_score_scaled_cp)this.m_score_scaled_cp=1;return this.m_score_scaled_cp},GetScorePass:function(){return this.m_score_pass},GetScoreTot:function(){return this.m_score_tot},GetTimeInSession:function(){return this.m_time},GetLessonLocation:function(){if(void 0==this.m_lessonLocation||""==this.m_lessonLocation)this.m_lessonLocation=
" ";return this.m_lessonLocation},GetLessonStatus:function(){void 0==this.m_lesson_status&&(this.m_lesson_status="incomplete");return this.m_lesson_status},GetSuccessStatus:function(){return this.m_success_status},GetLessonMode:function(){return this.m_lesson_mode},GetStudentID:function(){return this.m_student_id},GetStudentName:function(){return this.m_student_name},GetCredit:function(){return this.m_credit},GetEntry:function(){return this.m_entry},GetProgressMeasure:function(){return this.m_progressMeasure},
SetScore:function(a,b,c){void 0!=a&&this.SetScoreRaw(a);void 0!=b&&this.SetScoreMin(b);void 0!=c&&this.SetScoreMax(c);void 0!=c&&0!=c&&void 0!=a?this.SetScoreScaled(a/c):void 0!=a&&this.SetScoreScaled(a/100)},ValidateScore:function(a){switch(typeof a){case "null":a=void 0;break;case "string":a=Number(a)==a?Number(a):void 0;break;case "number":a=isNaN(a)?void 0:a;break;default:a=void 0}void 0!=a?(a=this.RoundDecimals(a,2),a=a.toString()):a=" ";return a},SetScoreRaw:function(a){this.m_score_raw=this.ValidateScore(a)},
SetScoreMax:function(a){this.m_score_max=this.ValidateScore(a)},SetScoreMin:function(a){this.m_score_min=this.ValidateScore(a)},SetScoreScaled:function(a){this.m_score_scaled_cp=this.ValidateScore(a)},SetScorePass:function(a){this.m_score_pass=a},SetScoreTot:function(a){this.m_score_tot=a},SetProgressMeasure:function(a){0>a||1<a||(this.m_progressMeasure=a)},SetTimeInSession:function(a){void 0==a||""==a||null==a?(cp.movie.startTime||(cp.movie.startTime=new Date),a=(new Date).getTime()-cp.movie.startTime.getTime(),
a=this.FormatTime(Math.floor(a/1E3))):typeof("number"==a)&&(a=this.FormatTime(a));this.timer_str=this.m_time=a},SetLessonLocation:function(a){this.m_lessonLocation=a},SetLessonStatus:function(a,b){this.m_lesson_status=!a||"n"==a.substring(0,1)||""==a||void 0==a||" "==a?"incomplete":a;void 0!=b&&(this.m_success_status=b)},SetStudentID:function(a){this.m_student_id=a},SetStudentName:function(a){this.m_student_name=a},SetCredit:function(a){this.m_credit=a},GetLessonData:function(){(void 0==this.m_lesson_data||
!1==this.IsLessonDataTracked())&&this.SetLessonData("");return this.m_lesson_data},SetLessonMode:function(a){this.m_lesson_mode=a},SetLessonData:function(a){this.m_lesson_data=a},GetVendorData:function(){return this.m_vendor_data},SetVendorData:function(a){this.m_vendor_data=a},GetLessonStatusArray:function(){return this.m_lesson_status_array},GetScoreArray:function(){return this.m_score_array},GetMasteryScore:function(){return this.m_mastery_score},GetMaxTimeAllowed:function(){return this.m_max_time_allowed},
GetTimeLimitAction:function(){return this.m_time_limit_action},AddToLessonStatusArray:function(a){this.m_lesson_status_array.push(a)},AddToScoreArray:function(a){this.m_score_array.push(a)},SetMasteryScore:function(a){this.m_mastery_score=a},SetMaxTimeAllowed:function(a){this.m_max_time_allowed=a},SetTimeLimitAction:function(a){this.m_time_limit_action=a},SetSlideView:function(){},SendSlideView:function(){},SendSuspendData:function(a){void 0!=a&&this.SetLessonData(a)},SendTrackingData:function(a,
b,c,d,e,f,g,i,h,k,l,m,j){void 0==h&&(h="");this.SetTrackingData(a,b,c,d,e,f,g,i,h,k);if(m){if(a={quizId:cp.D.quizzingData.quizID},cp.movie.playbackController&&(b=cp.movie.playbackController.GetQuizController())&&b.GetIsPassed())"passed"==this.GetSuccessStatus()?(cp.em.fireEvent("PASSED",a),cp.em.fireEvent("COMPLETED")):j&&cp.em.fireEvent("FAILED",a)}else"completed"==this.GetLessonStatus()&&(cp.em.fireEvent("COMPLETED"),this.GetSuccessStatus()&&(a={quizId:cp.D.quizzingData.quizID},"passed"==this.GetSuccessStatus()?
cp.em.fireEvent("PASSED",a):"failed"==this.GetSuccessStatus()&&cp.em.fireEvent("FAILED",a)));this.IsLessonDataTracked()&&(j=cp.createAndGetDataChunk(),cp.fireResumeDataEvent(j))},SetTrackingData:function(a,b,c,d,e,f,g,i,h,k){!0==d?void 0!=a&&void 0!=c&&!isNaN(Math.round(100*(a/c)))&&0!=c?this.SetScore(Math.round(100*(100*a/c))/100):this.SetScore(Math.round(100*a)/100):void 0!=a&&void 0!=b&&void 0!=c?this.SetScore(a,b,c):void 0!=a&&void 0!=c?this.SetScore(a,0,c):void 0!=a&&this.SetScore(a);void 0!=
e&&this.SetLessonLocation(e);void 0!=i?!0==i&&void 0!=f?this.SetLessonStatus(f):void 0!=g&&void 0!=f&&this.SetLessonStatus(f,g):void 0!=f?this.SetLessonStatus(f):void 0!=g&&this.SetLessonStatus(g);void 0!=h&&this.SetTimeInSession(h);void 0!=k&&this.SetLessonData(k)},GetTrackingData:function(){this.IsTrackingDataLoaded()||this.SetTrackingDataLoaded(!0)},GetTrackingDataCore:function(){this.IsTrackingDataLoaded()||this.SetTrackingDataLoaded(!0)},SetInteractionData:function(a,b,c,d,e,f,g,i,h,k,l){this.m_interaction_ary||
(this.m_interaction_ary=[]);var m=this.m_interaction_ary.length;this.m_interaction_ary[m]=[];this.m_interaction_ary[m].interactionID_str=a;this.m_interaction_ary[m].objectiveID_str=b;this.m_interaction_ary[m].type_str=c;this.m_interaction_ary[m].correctResponse_str=d;this.m_interaction_ary[m].studentResponse_str=e;this.m_interaction_ary[m].result_bln=f;this.m_interaction_ary[m].weight_int=g;this.m_interaction_ary[m].description_texts=l;void 0==i||""==i||"0"==i?i=this.FormatTime(0):"number"==typeof i&&
(i=this.FormatTime(i));this.m_interaction_ary[m].latency_str=i;if(void 0==h||""==h)h=this.FormatDate();this.m_interaction_ary[m].date_str=h;void 0==k||""==k?k=this.FormatTime(0):"number"==typeof k&&(k=this.FormatTime(k));this.m_interaction_ary[m].time_str=k},SendInteractionData:function(a,b,c,d,e,f,g,i,h,k,l,m,j){void 0!=a&&""!=a&&this.SetInteractionData(a,b,c,d,e,f,g,i,h,k,l,m,j)},ClearPendingCalls:function(){},RoundDecimals:function(a,b){b=!b&&0!=b?2:b;return Math.round(a*Math.pow(10,b))/Math.pow(10,
b)},FormatNum:function(a,b){var c="",d=0,e="'"+a+"'";if(!(e.length>b))for(d=1;d<=b-e.length;d++)c+="0";return c+a},FormatTime:function(a,b,c){var d;d=b="00";c=this.FormatNum(Math.floor(a),2);59<c&&(b=Math.floor(c/60),c-=60*b,b=this.FormatNum(b,2),c=this.FormatNum(c,2));59<b&&(d=Math.floor(b/60),b-=60*d,d=this.FormatNum(d,2),b=this.FormatNum(b,2));return d+":"+b+":"+c},FormatDate:function(a,b,c,d){void 0==a?(c=new Date,a=this.FormatNum(c.getMonth()+1,2),b=this.FormatNum(c.getDate(),2),c=c.getFullYear()):
"string"==typeof a&&-1<a.indexOf("/")&&(c=a.split("/"),a=this.FormatNum(c[0],2),b=this.FormatNum(c[1],2),c=this.FormatNum(c[2],4));return 1==d?c+"/"+a+"/"+b:a+"/"+b+"/"+c},SetAdapterSpecificData:function(){}};cp.SCORM_Rustici=function(a){cp.SCORM_Rustici.baseConstructor.call(this);this.m_cmiEntryValue=this.m_cmiExitValue="";this.m_isTincan=this.verbose=this.m_ExitNormal=!1;this.m_isScorm=a};cp.inherits(cp.SCORM_Rustici,cp.TrackingAdapter);
cp.SCORM_Rustici.prototype.SetAdapterSpecificData=function(a){this.SetExitNormal(a.exitNormal);this.SetReportingOption(a.reportingOption)};cp.SCORM_Rustici.prototype.SetExitNormal=function(a){this.m_ExitNormal=a};cp.SCORM_Rustici.prototype.GetExitNormal=function(){return this.m_ExitNormal};cp.SCORM_Rustici.prototype.SetReportingOption=function(a){this.m_ReportingOption=a};
cp.SCORM_Rustici.prototype.GetReportingOption=function(){switch(this.m_reportingOption){case 5:return"completion_success";case 7:return"completion_only";case 6:return"incompleteToPassedOrFailed";case 0:return"breeze";default:return""}};
cp.SCORM_Rustici.prototype.Initialize=function(){if(!this.IsInitialized()){if((!cp.LMSDriverHolder||!cp.LMSDriverHolder.IsLoaded())&&!cp.IsRunningInACAP)return;this.SetInitialized(cp.startBlnStr)}this.m_isScorm&&!cp.IsRunningInACAP&&("incompleteToPassedOrFailed"==this.GetReportingOption()?this.m_ExitNormal?(cp.LMSDriverHolder.EXIT_SUSPEND_IF_COMPLETED=!1,cp.LMSDriverHolder.EXIT_NORMAL_IF_PASSED=!0):(cp.LMSDriverHolder.EXIT_SUSPEND_IF_COMPLETED=!1,cp.LMSDriverHolder.EXIT_NORMAL_IF_PASSED=!1):(cp.LMSDriverHolder.EXIT_SUSPEND_IF_COMPLETED=
this.m_ExitNormal?!1:!0,cp.LMSDriverHolder.EXIT_NORMAL_IF_PASSED=!1));void 0!=cp.LMSDriverHolder.objLMS&&(void 0!=cp.LMSDriverHolder.objLMS.Standard&&"TCAPI"==cp.LMSDriverHolder.objLMS.Standard)&&(this.m_isTincan=!0);return this.IsInitialized()};cp.SCORM_Rustici.prototype.GetTrackingData=function(){this.IsTrackingDataLoaded()||(this.GetTrackingDataCore(),cp.LMSDriverHolder&&cp.LMSDriverHolder.GetLaunchData(this.GetVendorData()))};
cp.SCORM_Rustici.prototype.GetTrackingDataCore=function(){this.verbose&&cp.log("cp.SCORM_Rustici :: function getTrackingDataCore ");void 0!=cp.LMSDriverHolder&&(this.m_cmiEntryValue=cp.LMSDriverHolder.GetEntryMode(),this.SetLessonData(cp.LMSDriverHolder.GetDataChunk()),this.SetLessonLocation(cp.LMSDriverHolder.GetBookMark()))};
cp.SCORM_Rustici.prototype.SetTrackingData=function(a,b,c,d,e,f,g,i,h,k,l,m){this.verbose&&cp.log("function setTrackingData ");!0==d?void 0!=a&&void 0!=c&&!isNaN(Math.round(100*(a/c)))&&0!=c?this.SetScore(Math.round(100*(100*a/c))/100,0,100):this.SetScore(Math.round(100*a)/100):void 0!=a&&void 0!=b&&void 0!=c?this.SetScore(a,b,c):void 0!=a&&void 0!=c?this.SetScore(a,0,c):void 0!=a?this.SetScore(a):this.SetScore();void 0!=l&&this.SetProgressMeasure(l);void 0!=e&&this.SetLessonLocation(e);m?this.SetLessonStatus(f,
g):void 0!=i&&!0==i?this.SetLessonStatus(f):this.SetLessonStatus(f,g);this.SetTimeInSession(h);void 0!=k&&this.SetLessonData(k)};cp.SCORM_Rustici.prototype.SendSuspendData=function(a){void 0!=a&&this.SetLessonData(a);if(this.IsLessonDataTracked()&&(a=cp.createAndGetDataChunk(),""!=a)){var b=[];b.push(a);this.SCORMbuild("SetDataChunk",b)}};
cp.SCORM_Rustici.prototype.SendTrackingData=function(a,b,c,d,e,f,g,i,h,k,l,m,j){this.verbose&&cp.log("function sendTrackingData ");this.SetTrackingData(a,b,c,d,e,f,g,i,h,k,l,m);m?(a={quizId:cp.D.quizzingData.quizID},"passed"==this.GetSuccessStatus()?(cp.em.fireEvent("PASSED",a),cp.em.fireEvent("COMPLETED"),j=[],j.push(""),this.SCORMbuild("SetPassed",j)):j&&(cp.em.fireEvent("FAILED",a),j=[],j.push(""),this.SCORMbuild("SetFailed",j))):"completed"==this.GetLessonStatus()&&(j=[],j.push(""),this.SCORMbuild("SetReachedEnd",
j),cp.em.fireEvent("COMPLETED"),this.GetSuccessStatus()&&(a={quizId:cp.D.quizzingData.quizID},"passed"==this.GetSuccessStatus()?(j=[],j.push(""),this.SCORMbuild("SetPassed",j),cp.em.fireEvent("PASSED",a)):"failed"==this.GetSuccessStatus()&&(j=[],j.push(""),this.SCORMbuild("SetFailed",j),cp.em.fireEvent("FAILED",a))));j=[];j.push(this.GetScoreRaw());j.push(this.GetScoreMax());j.push(this.GetScoreMin());this.SCORMbuild("SetPointBasedScore",j);j=[];j.push(this.GetLessonLocation());this.SCORMbuild("SetBookmark",
j);this.IsLessonDataTracked()&&(a=cp.createAndGetDataChunk(),""!=a&&(this.verbose&&cp.log("Calling SCORM_Rustici::SendTrackingData::SetDataChunk"),j=[],j.push(a),this.SCORMbuild("SetDataChunk",j),cp.fireResumeDataEvent(a)))};cp.SCORM_Rustici.prototype.SetLessonLocation=function(a){var b=cpInfoCurrentSlideLabel;this.m_lessonLocation=""!=b?escape(b):"Slide_"+(parseInt(a)+1)};
cp.SCORM_Rustici.prototype.Flush=function(){this.verbose&&cp.log("function flush ");var a=[];a.push("");cp.movie.playbackController.m_commitDataOnEverySlide||this.SCORMbuild("CommitData",a)};cp.SCORM_Rustici.prototype.SetFinishedBln=function(a){var b=typeof a;"boolean"!=b&&("string"==b?"true"==a.toLowerCase()?a=!0:"false"==a.toLowerCase()&&(a=!1):a=!1);this.SetInitialized(!a)};
cp.SCORM_Rustici.prototype.Finish=function(){var a=[];a.push("");cp.movie.playbackController.m_commitDataOnEverySlide||this.SCORMbuild("CommitData",a);this.SetFinishedBln(cp.LMSDriverHolder.Finish())};cp.SCORM_Rustici.prototype.SetTrackingComplete=function(){this.Finish()};cp.SCORM_Rustici.prototype.AICCTokenToSCORMToken=function(a,b){for(var c=a.split(","),d=b.substr(0,1).toLowerCase(),e=0;e<c.length;e++)if(d==c[e].substr(0,1))return c[e];return b};
cp.SCORM_Rustici.prototype.NormalizeStatus=function(a){return this.AICCTokenToSCORMToken("completed,incomplete,not attempted,failed,passed",a)};cp.SCORM_Rustici.prototype.NormalizeInteractionType=function(a){a="long-fill-in"==a.toLowerCase()?"long-fill-in":this.AICCTokenToSCORMToken("true-false,choice,fill-in,matching,performance,sequencing,likert,numeric",a);if(""==a||void 0==a)a="other";return a};
cp.SCORM_Rustici.prototype.NormalizeInteractionResult=function(a){a=this.AICCTokenToSCORMToken("correct,wrong,unanticipated,neutral",a);return"wrong"==a?"incorrect":a};cp.SCORM_Rustici.prototype.NormalizeRespose=function(a){return this.AICCTokenToSCORMToken("true,false",a)};cp.SCORM_Rustici.prototype.FormatTimestamp=function(a){return this.FormatDate()+"T"+this.FormatTime(a,void 0,void 0,2)};
cp.SCORM_Rustici.prototype.SetInteractionData=function(a,b,c,d,e,f,g,i,h,k,l,m,j){this.verbose&&cp.log("function setInteractionData ");this.m_interaction_ary||(this.m_interaction_ary=[]);d=this.m_interaction_ary.length;this.m_interaction_ary[d]=[];this.m_interaction_ary[d].interactionID_str=a;this.m_interaction_ary[d].objectiveID_str=b;this.m_interaction_ary[d].type_str=this.NormalizeInteractionType(c);this.m_interaction_ary[d].correctResponse_str=correct_responseIdentifierArr;this.m_interaction_ary[d].studentResponse_str=
user_responseIdentifierArr;this.m_interaction_ary[d].result_str=this.NormalizeInteractionResult(f);this.m_interaction_ary[d].weight_int=g;this.m_interaction_ary[d].latency_str=parseFloat(i);this.m_interaction_ary[d].description_texts=j;this.m_isTincan&&(this.m_interaction_ary[d].score_raw=l,this.m_interaction_ary[d].score_min=m);h=void 0==h||""==h?this.FormatDate():this.FormatDate(h);this.m_interaction_ary[d].date_str=h;k=void 0==k||""==k?this.FormatTimestamp(0):this.FormatTimestamp(k);this.m_interaction_ary[d].time_str=
k};
cp.SCORM_Rustici.prototype.SendInteractionData=function(a,b,c,d,e,f,g,i,h,k,l,m,j){this.verbose&&cp.log("Rustici SCORM:: SendInteractionData ");if(!(void 0==cp.LMSDriverHolder||cp.IsRunningInACAP)&&this.IsInteractionDataTracked()){if(void 0!=a&&""!=a){user_responseIdentifierArr=[];correct_responseIdentifierArr=[];var o=[],q=[];0<e.length&&(-1!=e.indexOf(";")?o=e.split(";"):o.push(e));0<d.length&&(-1!=d.indexOf(";")?q=d.split(";"):q.push(d));this.SetInteractionData(a,b,c,d,e,f,g,i,h,k,l,m,j)}c=j.questionText;
f=this.m_interaction_ary.length-1;switch(this.m_interaction_ary[f].type_str){case "choice":case "hotspot":case "widget":e=j.answerTexts.answerTextMap;h="hotspot"==this.m_interaction_ary[f].type_str;for(d=0;d<o.length;++d)j=h?o[d]:e?e[o[d]]:o[d],user_responseIdentifierArr.push(cp.LMSDriverHolder.CreateResponseIdentifier(o[d],j));for(o=0;o<q.length;++o)j=h?q[o]:e?e[q[o]]:q[o],correct_responseIdentifierArr.push(cp.LMSDriverHolder.CreateResponseIdentifier(q[o],j));h=[];h.push(a);h.push(user_responseIdentifierArr);
h.push(cp.ConvertToInteractionResultConstant(this.m_interaction_ary[f].result_str));h.push(correct_responseIdentifierArr);h.push(c);h.push(g);h.push(i);h.push(b);this.m_isTincan&&(h.push(l),h.push(m));this.SCORMbuild("RecordMultipleChoiceInteraction",h);break;case "true-false":h=[];h.push(a);h.push(Boolean(e));h.push(cp.ConvertToInteractionResultConstant(this.m_interaction_ary[f].result_str));h.push(Boolean(d));h.push(c);h.push(g);h.push(i);h.push(b);this.m_isTincan&&(h.push(l),h.push(m));this.SCORMbuild("RecordTrueFalseInteraction",
h);break;case "fill-in":case "long-fill-in":h=[];h.push(a);h.push(e);h.push(cp.ConvertToInteractionResultConstant(this.m_interaction_ary[f].result_str));h.push(d);h.push(c);h.push(g);h.push(i);h.push(b);this.m_isTincan&&(h.push(l),h.push(m));this.SCORMbuild("RecordFillInInteraction",h);break;case "matching":for(var h=j.answerTexts.left,j=j.answerTexts.right,q=[],o=[],d=d.split(","),k=0,p,n,k=0;k<d.length;++k){p=d[k];n=p.split(".");p=n[0];n=n[1];var r=h[p],s=j[n];if(void 0==r||""==r)r=p;if(void 0==
s||""==s)s=n;p=cp.LMSDriverHolder.CreateResponseIdentifier(p,r);n=cp.LMSDriverHolder.CreateResponseIdentifier(n,s);q.push(new cp.LMSDriverHolder.MatchingResponse(p,n))}d=e.split(",");for(k=0;k<d.length;++k){p=d[k];n=p.split(".");p=n[0];n=n[1];r=h[p];s=j[n];if(void 0==r||""==r)r=p;if(void 0==s||""==s)s=n;p=cp.LMSDriverHolder.CreateResponseIdentifier(p,r);n=cp.LMSDriverHolder.CreateResponseIdentifier(n,s);o.push(new cp.LMSDriverHolder.MatchingResponse(p,n))}f=cp.ConvertToInteractionResultConstant(this.m_interaction_ary[f].result_str);
h=[];h.push(a);h.push(o);h.push(f);h.push(q);h.push(c);h.push(g);h.push(i);h.push(b);this.m_isTincan&&(h.push(l),h.push(m));this.SCORMbuild("RecordMatchingInteraction",h);break;case "sequencing":h=[];h.push(a);h.push(cp.LMSDriverHolder.CreateResponseIdentifier(e.substring(0,1),j.answerTexts.learner_response));h.push(cp.ConvertToInteractionResultConstant(this.m_interaction_ary[f].result_str));h.push(cp.LMSDriverHolder.CreateResponseIdentifier(d.substring(0,1),j.answerTexts.correct_response));h.push(c);
h.push(g);h.push(i);h.push(b);this.m_isTincan&&(h.push(l),h.push(m));this.SCORMbuild("RecordSequencingInteraction",h);break;case "likert":cp.ConvertToInteractionResultConstant(this.m_interaction_ary[f].result_str),h=[],h.push(a),h.push(cp.LMSDriverHolder.CreateResponseIdentifier(e.substring(0,1),e)),h.push(!0),h.push(null),h.push(c),h.push(g),h.push(i),h.push(b),this.m_isTincan&&(h.push(l),h.push(m)),this.SCORMbuild("RecordLikertInteraction",h)}this.m_interaction_ary=[]}};
cp.SCORM_Rustici.prototype.ClearPendingCalls=function(){if(!(void 0==cp.LMSDriverHolder||cp.IsRunningInACAP)&&this.AICCQueue&&!(0>=this.AICCQueue.length)){this.AICCLMSCallTimer=void 0;clearInterval(this.AICCLMSCallTimer);for(var a=this.AICCQueue.length,b=0;b<a;++b){var c=this.AICCQueue.shift();this.ProcessLMSCalls(c.function_str,c.argsArr)}}};
cp.SCORM_Rustici.prototype.SCORMbuild=function(a,b){void 0==cp.LMSDriverHolder||cp.IsRunningInACAP||(cp.movie.playbackController.LMSIsAICC()?this.AddToQueue(a,b):this.ProcessLMSCalls(a,b))};
cp.SCORM_Rustici.prototype.ProcessLMSCalls=function(a,b){var c="cp.LMSDriverHolder."+a+"("+function(){var a="";if(0<b.length)for(var a="string"==typeof b[0]?"'"+b[0]+"'":b[0],c=1;c<b.length;++c)a+=",",a="string"==typeof b[c]?a+("'"+b[c]+"'"):a+b[c];return a}()+")";cp.verbose&&cp.log(c);try{switch(a){case "RecordMultipleChoiceInteraction":this.m_isTincan?cp.LMSDriverHolder.RecordMultipleChoiceInteraction(b[0],b[1],b[2],b[3],b[4],b[5],b[6],b[7],b[8],b[9]):cp.LMSDriverHolder.RecordMultipleChoiceInteraction(b[0],
b[1],b[2],b[3],b[4],b[5],b[6],b[7]);break;case "RecordTrueFalseInteraction":this.m_isTincan?cp.LMSDriverHolder.RecordTrueFalseInteraction(b[0],b[1],b[2],b[3],b[4],b[5],b[6],b[7],b[8],b[9]):cp.LMSDriverHolder.RecordTrueFalseInteraction(b[0],b[1],b[2],b[3],b[4],b[5],b[6],b[7],b[8]);break;case "RecordSequencingInteraction":this.m_isTincan?cp.LMSDriverHolder.RecordSequencingInteraction(b[0],b[1],b[2],b[3],b[4],b[5],b[6],b[7],b[8],b[9]):cp.LMSDriverHolder.RecordSequencingInteraction(b[0],b[1],b[2],b[3],
b[4],b[5],b[6],b[7]);break;case "RecordFillInInteraction":this.m_isTincan?cp.LMSDriverHolder.RecordFillInInteraction(b[0],b[1],b[2],b[3],b[4],b[5],b[6],b[7],b[8],b[9]):cp.LMSDriverHolder.RecordFillInInteraction(b[0],b[1],b[2],b[3],b[4],b[5],b[6],b[7]);break;case "RecordMatchingInteraction":this.m_isTincan?cp.LMSDriverHolder.RecordMatchingInteraction(b[0],b[1],b[2],b[3],b[4],b[5],b[6],b[7],b[8],b[9]):cp.LMSDriverHolder.RecordMatchingInteraction(b[0],b[1],b[2],b[3],b[4],b[5],b[6],b[7]);break;case "RecordLikertInteraction":this.m_isTincan?
cp.LMSDriverHolder.RecordLikertInteraction(b[0],b[1],b[2],b[3],b[4],b[5],b[6],b[7],b[8],b[9]):cp.LMSDriverHolder.RecordLikertInteraction(b[0],b[1],b[2],b[3],b[4],b[5],b[6],b[7]);break;default:eval(c)}}catch(d){console.log(d)}};
cp.SCORM_Rustici.prototype.AddToQueue=function(a,b){this.AICCQueue||(this.AICCQueue=[]);var c={};c.function_str=a;c.argsArr=b;this.AICCQueue.push(c);var d=this;this.AICCLMSCallTimer||(this.AICCLMSCallTimer=setInterval(function(){if(d.AICCQueue.length<=0){clearInterval(d.AICCLMSCallTimer);d.AICCLMSCallTimer=void 0}else{var a=d.AICCQueue.shift();d.ProcessLMSCalls(a.function_str,a.argsArr)}},100))};
cp.InternalServerAdapter=function(){cp.InternalServerAdapter.baseConstructor.call(this);this.m_cmiEntryValue=this.m_cmiExitValue="";this.verbose=this.m_ExitNormal=!1;this.m_StudentID=this.m_StudentName="";this.m_resultsAlreadyPosted=!1;var a=cp.D.quizReportingData;this.m_strings={};this.m_strings.ISRUnknownErrorStr=a.ISRUnknownErrorStr;this.m_strings.ISRNoConnectionErrorStr=a.ISRNoConnectionErrorStr;this.m_strings.ISRWrongURLErrorStr=a.ISRWrongURLErrorStr;this.m_strings.ISRLoginErrorStr=a.ISRLoginErrorStr;
this.m_strings.ISRConnectingStr=a.ISRConnectingStr;this.m_strings.ISRResultPostedStr=a.ISRResultPostedStr;this.m_strings.ISRPostResultStr=a.ISRPostResultStr;this.m_strings.ISRResultCalculatedStr=a.ISRResultCalculatedStr;this.m_strings.ISREnterNameStr=a.ISREnterNameStr;this.m_strings.ISREmailIDStr=a.ISREmailIDStr;this.m_strings.ISRSendStr=a.ISRSendStr;this.m_strings.ISRStatusStr=a.ISRStatusStr;this.m_strings.ISRErrorStr=a.ISRErrorStr;this.m_strings.ISROkStr=a.ISROkStr};
cp.inherits(cp.InternalServerAdapter,cp.TrackingAdapter);cp.InternalServerAdapter.prototype.SetAdapterSpecificData=function(a){this.SetExitNormal(a.exitNormal);this.SetReportingOption(a.reportingOption)};cp.InternalServerAdapter.prototype.SetExitNormal=function(a){this.m_ExitNormal=a};cp.InternalServerAdapter.prototype.GetExitNormal=function(){return this.m_ExitNormal};cp.InternalServerAdapter.prototype.SetReportingOption=function(a){this.m_ReportingOption=a};
cp.InternalServerAdapter.prototype.GetReportingOption=function(){switch(this.m_reportingOption){case 5:return"completion_success";case 7:return"completion_only";case 6:return"incompleteToPassedOrFailed";case 0:return"breeze";default:return""}};cp.InternalServerAdapter.prototype.Initialize=function(){this.IsInitialized()||this.SetInitialized(!0);return this.IsInitialized()};cp.InternalServerAdapter.prototype.GetTrackingData=function(){this.IsTrackingDataLoaded()||this.SetTrackingDataLoaded(!0)};
cp.InternalServerAdapter.prototype.GetTrackingDataCore=function(){this.GetTrackingData()};
cp.InternalServerAdapter.prototype.SetTrackingData=function(a,b,c,d,e,f,g,i,h,k,l,m,j){this.verbose&&cp.log("function setTrackingData ");!0==d?void 0!=a&&void 0!=c&&!isNaN(Math.round(100*(a/c)))&&0!=c?this.SetScore(Math.round(100*(100*a/c))/100,0,100):this.SetScore(Math.round(100*a)/100):void 0!=a&&void 0!=b&&void 0!=c?this.SetScore(a,b,c):void 0!=a&&void 0!=c?this.SetScore(a,0,c):void 0!=a?this.SetScore(a):this.SetScore();void 0!=l&&this.SetProgressMeasure(l);void 0!=e&&this.SetLessonLocation(e);
m?"passed"==g?this.SetLessonStatus(g):j?this.SetLessonStatus(g):this.SetLessonStatus(f):this.SetLessonStatus(f);this.SetTimeInSession(h);void 0!=k&&this.SetLessonData(k)};cp.InternalServerAdapter.prototype.SendTrackingData=function(a,b,c,d,e,f,g,i,h,k,l,m,j){this.verbose&&cp.log("function sendTrackingData ");this.m_sendScoreAsPercent=d;this.SetTrackingData(a,b,c,d,e,f,g,i,h,k,l,m,j);this.dataModified_bln=!0};cp.InternalServerAdapter.prototype.Flush=function(){this.PostQuizResults()};
cp.InternalServerAdapter.prototype.Finish=function(){this.IsInitialized();this.SetInitialized(!1)};cp.InternalServerAdapter.prototype.SetTrackingComplete=function(){this.Finish()};
cp.InternalServerAdapter.prototype.SetInteractionData=function(a,b,c,d,e,f,g,i,h,k,l,m,j){this.verbose&&cp.log("function setInteractionData ");this.m_interaction_ary||(this.m_interaction_ary=[]);l=this.m_interaction_ary.length;this.m_interaction_ary[l]=[];"likert"==c&&(d=" ",a=a.split(" ").join("_"));this.m_interaction_ary[l].interactionID_str=a;this.m_interaction_ary[l].objectiveID_str=b;"hotspot"==c&&(c="choice");this.m_interaction_ary[l].type_str=c;"sequencing"==c&&(d=j.answerTexts.correct_response,
e=j.answerTexts.learner_response);this.m_interaction_ary[l].correctResponse_str=d;this.m_interaction_ary[l].studentResponse_str=e;this.m_interaction_ary[l].result_str=f;this.m_interaction_ary[l].weight_int=g;i=void 0==i||""==i?this.FormatTime(0):this.FormatTime(i/1E3);this.m_interaction_ary[l].latency_str=i;this.m_interaction_ary[l].description_texts=j;h=void 0==h||""==h?this.FormatDate():this.FormatDate(h);this.m_interaction_ary[l].date_str=h;k=void 0==k||""==k?this.FormatTime(0):this.FormatTime(k);
this.m_interaction_ary[l].time_str=k;this.m_interaction_ary[l].currentAttempt=this.GetCurrentAttempt()};cp.InternalServerAdapter.prototype.FormatTimestamp=function(a){return this.FormatDate()+"T"+this.FormatTime(a,void 0,void 0,2)};
cp.InternalServerAdapter.prototype.SendInteractionData=function(a,b,c,d,e,f,g,i,h,k,l,m,j){this.verbose&&cp.log("Rustici SCORM:: SendInteractionData ");this.IsInteractionDataTracked()&&(void 0!=a&&""!=a)&&(this.SetInteractionData(a,b,c,d,e,f,g,i,h,k,l,m,j),this.dataModified_bln=!0)};
cp.InternalServerAdapter.prototype.ShowResultDialog=function(a){this.m_errorDialog=new cp.RuntimeMessageBoxDefault(document.getElementById("div_Slide"),1);this.m_errorDialog.setMessageText(a?this.m_strings.ISRResultPostedStr:this.m_strings.ISRUnknownErrorStr);this.m_errorDialog.setFirstButtonText(this.m_strings.ISROkStr);var b=this;this.m_errorDialog.registerFirstButtonHandler(function(){b.m_errorDialog.hide();cpCmndShowPlaybar=!0;cpLockTOC=!1});this.m_errorDialog.show()};
cp.InternalServerAdapter.prototype.CreateInputDialog=function(){this.m_inputDialog=new cp.PostResultsMessageBox(this.m_strings);var a=this;this.m_inputDialog.registerFirstButtonHandler(function(){a.m_inputDialog.hide();cpCmndShowPlaybar=!0;cpLockTOC=!1});this.m_inputDialog.registerSecondButtonHandler(function(){a.HandleInputDialog();cpCmndShowPlaybar=!0;cpLockTOC=!1})};
cp.InternalServerAdapter.prototype.HandleInputDialog=function(){this.m_StudentName=this.m_inputDialog.getLearnerName();this.m_StudentID=this.m_inputDialog.getLearnerID();""==this.m_StudentName&&""==this.m_StudentID||(this.m_inputDialog.hide(),this.SendDataToURL())};
cp.InternalServerAdapter.prototype.PostQuizResults=function(){if(!this.m_resultsAlreadyPosted){cp.log("Post results");this.m_resultXML="<Course>\r\t";var a=!1;cp.vm&&(a=!cp.vm.hasOwnProperty("cpQuizInfoStudentID")||""==cp.vm.getVariableValue("cpQuizInfoStudentID"));a?(this.CreateInputDialog(),this.m_inputDialog.show()):(this.m_StudentName=cp.vm.hasOwnProperty("cpQuizInfoStudentName")?cpQuizInfoStudentName:"",this.m_StudentID=cpQuizInfoStudentID,this.SendDataToURL());cpCmndShowPlaybar=!1;cpLockTOC=
!0;this.dataModified_bln=!1}};
cp.InternalServerAdapter.prototype.SendDataToURL=function(){if(!this.m_StudentName||""==this.m_StudentName)this.m_StudentName=this.m_StudentID;if(!this.m_StudentID||""==this.m_StudentID)this.m_StudentID=this.m_StudentName;this.m_resultXML+='<CompanyName value="'+cp.movie.playbackController.m_companyName+'"/>\r\t';this.m_resultXML+='<DepartmentName value="'+cp.movie.playbackController.m_departmentName+'"/>\r\t';this.m_resultXML+='<CourseName value="'+cp.movie.playbackController.m_courseName+'"/>\r\t';
this.m_resultXML+='<LearnerName value="'+this.m_StudentName+'"/>\r\t';this.m_resultXML+='<LearnerID value="'+this.m_StudentID+'"/>\r\t';var a=cpInfoProjectName;""==a&&(a=cp.D.project.pN);this.m_resultXML+='<LessonName value="'+a+'"/>\r\t';this.m_resultXML+='<QuizAttempts value="'+cpQuizInfoAttempts+'"/>\r\t';this.m_resultXML+='<TotalQuestions value="'+cpQuizInfoTotalQuestionsPerProject+'"/>\r\t';0<this.m_adapterReportingVariables.length&&(this.m_resultXML+=this.BuildReportingVariablesXML());this.m_resultXML+=
this.BuildResultXML();this.m_resultXML+="</Course>";this.PostNormalRequest(this.m_resultXML,a+"_"+this.m_StudentName+"_"+cpInfoEpochMS+".xml")};
cp.InternalServerAdapter.prototype.PostNormalRequest=function(a,b){var c=new XMLHttpRequest,d=cp.movie.playbackController.m_internalServerURL,e;e="CompanyName="+cp.movie.playbackController.m_companyName;e+="&DepartmentName="+cp.movie.playbackController.m_departmentName;e+="&CourseName="+cp.movie.playbackController.m_courseName;e=e+("&Filename="+b)+("&Filedata="+escape(a));try{c.open("POST",d,!1);c.setRequestHeader("Content-Type","application/x-www-form-urlencoded");var f=this;c.onreadystatechange=
function(){4==c.readyState&&200==c.status?(f.m_resultsAlreadyPosted=!0,f.ShowResultDialog(!0)):f.ShowResultDialog(!1)};c.send(e)}catch(g){this.ShowResultDialog(!1)}};cp.InternalServerAdapter.prototype.BuildXMLRootNode=function(){return escape("")};
cp.InternalServerAdapter.prototype.BuildReportingVariablesXML=function(){for(var a="<Variables>\r\t",b=this.m_adapterReportingVariables.length,c=0;c<b;++c){var d=this.m_adapterReportingVariables[c];d&&""!=d&&(a+="<"+d+' value="'+m_VarHandle[d]+'"/>\r\t')}return a+"</Variables>\r\t"};cp.InternalServerAdapter.prototype.BuildResultXML=function(){var a;a="<Result>\r\t"+this.BuildResultXMLBodyCore();a+=this.BuildResultXMLBodyInteraction();return a+"</Result>\r\t"};
cp.InternalServerAdapter.prototype.BuildResultXMLBodyCore=function(){var a;a="<CoreData>\r\t"+('<Status value="'+this.GetLessonStatus()+'"/>\r\t');a+='<Location value="'+this.GetLessonLocation()+'"/>\r\t';this.m_sendScoreAsPercent?a+='<Score value="'+this.GetScore(this.m_sendScoreAsPercent)+'"/>\r\t':(a+='<RawScore value="'+this.GetScoreRaw()+'"/>\r\t',a+='<MaxScore value="'+this.GetScoreMax()+'"/>\r\t',a+='<MinScore value="'+this.GetScoreMin()+'"/>\r\t');a+='<SessionTime value="'+this.GetTimeInSession()+
'"/>\r\t';return a+"</CoreData>\r\t"};cp.InternalServerAdapter.prototype.BuildResultXMLBodyInteraction=function(){var a="<InteractionData>\r\t";if(this.IsInteractionDataTracked()&&0<this.m_interaction_ary.length)for(var b=0;b<this.m_interaction_ary.length;b++)a+=this.BuildInteractionsNode(b);return a+"</InteractionData>\r\t"};
cp.InternalServerAdapter.prototype.BuildInteractionsNode=function(a){var b;b="<Interactions>\r\t"+('<Date value="'+this.m_interaction_ary[a].date_str+'"/>\r\t');b+='<InteractionTime value="'+this.m_interaction_ary[a].time_str+'"/>\r\t';b+='<InteractionID value="'+this.m_interaction_ary[a].interactionID_str+'"/>\r\t';b+='<ObjectiveID value="'+this.m_interaction_ary[a].objectiveID_str+'"/>\r\t';b+='<InteractionType value="'+this.m_interaction_ary[a].type_str+'"/>\r\t';b+='<CorrectResponse value="'+
this.m_interaction_ary[a].correctResponse_str+'"/>\r\t';b+='<StudentResponse value="'+this.m_interaction_ary[a].studentResponse_str+'"/>\r\t';b+='<Result value="'+this.m_interaction_ary[a].result_str+'"/>\r\t';b+='<Weight value="'+this.m_interaction_ary[a].weight_int+'"/>\r\t';b+='<Latency value="'+this.m_interaction_ary[a].latency_str+'"/>\r\t';b+='<Attempt value="'+this.m_interaction_ary[a].currentAttempt+'"/>\r\t';return b+"</Interactions>\r\t"};
cp.AnswerScore=function(){this.m_correctAnswer=this.m_chosenAnswer=this.m_answerID=""};cp.ChoiceQuestionSpecificScore=function(){this.m_answerOrderArrayAsString=""};cp.ChoiceQuestionSpecificScore.prototype={saveState:function(a){void 0==this.m_answerOrderArrayAsString||""==this.m_answerOrderArrayAsString?a.writeString(""):a.writeString(this.m_answerOrderArrayAsString)},restoreState:function(a){this.m_answerOrderArrayAsString=a.readString()},reset:function(){this.m_answerOrderArrayAsString=""}};
cp.HotSpotQuestionSpecificScore=function(){this.m_BreakPointWidth=this.m_hotSpotIsCorrect=this.m_hotSpot_ychordsAsString=this.m_hotSpot_xchordsAsString=this.m_hotSpotNamesArrayAsString=""};
cp.HotSpotQuestionSpecificScore.prototype={saveState:function(a){void 0==this.m_hotSpotNamesArrayAsString||""==this.m_hotSpotNamesArrayAsString?a.writeString("nil"):a.writeString(this.m_hotSpotNamesArrayAsString);void 0==this.m_hotSpot_xchordsAsString||""==this.m_hotSpot_xchordsAsString?a.writeString("nil"):a.writeString(this.m_hotSpot_xchordsAsString);void 0==this.m_hotSpot_ychordsAsString||""==this.m_hotSpot_ychordsAsString?a.writeString("nil"):a.writeString(this.m_hotSpot_ychordsAsString);cp.responsive&&
(void 0==this.m_hotSpotIsCorrect||""==this.m_hotSpotIsCorrect?a.writeString("nil"):a.writeString(this.m_hotSpotIsCorrect),a.writeString(this.m_BreakPointWidth))},restoreState:function(a){this.m_hotSpotNamesArrayAsString=a.readString();"nil"==this.m_hotSpotNamesArrayAsString&&(this.m_hotSpotNamesArrayAsString="");this.m_hotSpot_xchordsAsString=a.readString();"nil"==this.m_hotSpot_xchordsAsString&&(this.m_hotSpot_xchordsAsString="");this.m_hotSpot_ychordsAsString=a.readString();"nil"==this.m_hotSpot_ychordsAsString&&
(this.m_hotSpot_ychordsAsString="");cp.responsive&&(this.m_hotSpotIsCorrect=a.readString(),"nil"==this.m_hotSpotIsCorrect&&(this.m_hotSpotIsCorrect=""),this.m_BreakPointWidth=a.readString())},reset:function(){this.m_answerOrderArrayAsString=""}};
cp.QuestionScore=function(){this.m_weighting=this.m_interactionID=this.m_objectiveID=this.m_interactionType=this.m_endTime=this.m_startTime=this.m_slideNum=void 0;this.m_negativeWeight=0;this.m_answerScores=[];this.m_numTries=0;this.m_answersIncomplete=!0;this.m_answeredCorrectly=!1;this.m_pausedMsecs=0;this.m_questionNumInQuiz=-1;this.m_wasJudged=void 0;this.m_isKnowledgeCheck=this.m_isPretestQuestion=!1;this.m_escapeAnswers=!0;this.m_questionSpecificScore=void 0;this.m_restoredFromLMS=!1;this.m_scoringType=
this.m_scoredPoints=0;this.m_maxTries=-1;this.m_descriptionTexts=this.m_isCorrectAsString=this.m_correctAnswersAsString=this.m_chosenAnswersAsString="";this.m_latencyAsSeconds=0;this.m_curDateAsString=this.m_latencyAsString="";this.m_curTimeAsSecondsSinceMidnight=0;this.m_partiallyCorrect=this.m_isShuffled=!1};
cp.QuestionScore.prototype={getdescriptionText:function(){return this.m_descriptionTexts},getrestoredFromLMS:function(){return this.m_restoredFromLMS},setrestoredFromLMS:function(a){this.m_restoredFromLMS=a},getslideNum:function(){return this.m_slideNum},setslideNum:function(a){this.m_slideNum=a},getstartTime:function(){return this.m_startTime},setstartTime:function(a){this.m_startTime=a},getendTime:function(){return this.m_endTime},getQuestionScoringType:function(){return this.m_scoringType},setendTime:function(a){this.m_endTime=
a},getpausedMsecs:function(){return this.m_pausedMsecs},setpausedMsecs:function(a){this.m_pausedMsecs=a},getinteractionType:function(){return this.m_interactionType},setinteractionType:function(a){this.m_interactionType=a;this.createQuestionSpecificScore()},getobjectiveID:function(){return this.m_objectiveID},setobjectiveID:function(a){this.m_objectiveID=a},getquestionNumInQuiz:function(){return this.m_questionNumInQuiz},setquestionNumInQuiz:function(a){this.m_questionNumInQuiz=a},getlatency:function(){return(startTime?
this.m_endTime.getTime()-this.m_startTime.getTime()-this.m_pausedMsecs:0)/1E3},getanswerScores:function(){return this.m_answerScores},setanswerScores:function(a){this.m_answerScores=a},getanswersIncomplete:function(){return this.m_answersIncomplete},setanswersIncomplete:function(a){this.m_answersIncomplete=a},getescapeAnswers:function(){return this.m_escapeAnswers},setescapeAnswers:function(a){this.m_escapeAnswers=a},setquestionSpecificScore:function(a){this.m_questionSpecificScore=a},getquestionSpecificScore:function(){return this.m_questionSpecificScore},
answersAsString:function(){},getcorrectAnswersAsString:function(){return this.answersAsString("correctAnswer",!1)},getchosenAnswersAsString:function(){return this.answersAsString("chosenAnswer",!1)},getcorrectAnswersForReview:function(){return this.answersAsString("correctAnswer",!0)},getchosenAnswersForReview:function(){return this.answersAsString("chosenAnswer",!0)},getansweredCorrectly:function(){return this.m_answeredCorrectly},setansweredCorrectly:function(a){this.m_answeredCorrectly=a},getisCorrectAsString:function(){return this.m_answeredCorrectly?
"C":"W"},getnumTries:function(){return this.m_numTries},getmaxTries:function(){return this.m_maxTries},setnumTries:function(a){this.m_numTries=a},getweighting:function(){return this.m_weighting},setweighting:function(a){this.m_weighting=a},getnegativeWeight:function(){return this.m_negativeWeight},setnegativeWeight:function(a){this.m_negativeWeight=a},getscoredPoints:function(){return this.m_scoredPoints},setscoredPoints:function(a){this.m_scoredPoints=a},addLeadingZero:function(a){return 10>a?"0"+
String(a):String(a)},getlatencyAsString:function(){return addLeadingZero(Math.round(latency/3600))+":"+addLeadingZero(Math.round(latency%3600/60))+":"+addLeadingZero(Math.round(latency)%60)},getlatencyAsSeconds:function(){return latency},getcurDateAsString:function(){var a=new Date;return addLeadingZero(a.getMonth()+1)+"/"+addLeadingZero(a.getDate())+"/"+a.getFullYear()},getcurDateAsString2:function(){var a=new Date;return a.getFullYear()+"/"+addLeadingZero(a.getMonth()+1)+"/"+addLeadingZero(a.getDate())},
getcurTimeAsString:function(){var a=new Date;return addLeadingZero(a.getHours())+":"+addLeadingZero(a.getMinutes())+":"+addLeadingZero(a.getSeconds())},getcurTimeAsSecondsSinceMidnight:function(){return 3600*(void 0).getHours()+60*(void 0).getMinutes()+(void 0).getSeconds()},getscore:function(){return this.m_wasJudged?this.m_scoredPoints:0},getwasJudged:function(){return this.m_wasJudged},setwasJudged:function(a){this.m_wasJudged=a},getisPretestQuestion:function(){return this.m_isPretestQuestion},
setisPretestQuestion:function(a){this.m_isPretestQuestion=a},getisKnowledgeCheck:function(){return this.m_isKnowledgeCheck},setisKnowledgeCheck:function(a){this.m_isKnowledgeCheck=a},saveState:function(a){a.writeNumber(this.m_slideNum);a.writeNumber(this.m_questionNumInQuiz);void 0!=this.m_startTime&&0!=this.m_startTime?a.writeNumber(this.m_startTime.getTime()):a.writeNumber(0);void 0!=this.m_endTime&&0!=this.m_endTime?a.writeNumber(this.m_endTime.getTime()):a.writeNumber(0);a.writeBoolean(this.m_wasJudged);
a.writeBoolean(this.m_partiallyCorrect);a.writeBoolean(this.m_answeredCorrectly);a.writeBoolean(this.m_answersIncomplete);a.writeNumber(this.m_numTries);a.writeBoolean(this.m_isShuffled);var b=!1,c=this.m_scoredPoints;0>c&&(b=!0,c=-c);a.writeBoolean(b);a.writeNumber(c);a.writeNumber(this.m_answerScores.length);b=0;switch(this.m_interactionType){case "choice":b=0;break;case "true-false":b=1;break;case "fill-in":b=2;break;case "matching":b=4;break;case "sequencing":b=5;break;case "hotspot":b=6;break;
case "likert":b=7;break;case "widget":b=8}a.writeNumber(b);this.m_questionSpecificScore&&this.m_questionSpecificScore.saveState(a);for(b=0;b<this.m_answerScores.length;b++)a.writeString(this.m_answerScores[b].m_answerID),a.writeString(this.m_answerScores[b].m_chosenAnswer),a.writeString(this.m_answerScores[b].m_correctAnswer)},restoreState:function(a){if(a){this.m_slideNum=a.readNumber();this.m_questionNumInQuiz=a.readNumber();if(void 0==this.m_startTime||0==this.m_startTime)this.m_startTime=new Date;
this.m_startTime.setTime(a.readNumber());if(void 0==this.m_endTime||0==this.m_endTime)this.m_endTime=new Date;this.m_endTime.setTime(a.readNumber());this.m_wasJudged=a.readBoolean();this.m_partiallyCorrect=a.readBoolean();this.m_answeredCorrectly=a.readBoolean();this.m_answersIncomplete=a.readBoolean();this.m_numTries=a.readNumber();this.m_isShuffled=a.readBoolean();var b=a.readBoolean();this.m_scoredPoints=a.readNumber();b&&(this.m_scoredPoints=-this.m_scoredPoints);var b=a.readNumber(),c="choice";
switch(a.readNumber()){case 0:c="choice";break;case 1:c="true-false";break;case 2:c="fill-in";break;case 5:c="sequencing";break;case 6:c="hotspot";break;case 7:c="likert";break;case 8:c="widget"}this.setinteractionType(c);this.m_questionSpecificScore&&this.m_questionSpecificScore.restoreState(a);for(c=0;c<b;++c){var d=new cp.AnswerScore;d.m_answerID=a.readString();d.m_chosenAnswer=a.readString();d.m_correctAnswer=a.readString();this.m_answerScores.push(d)}this.restoreQuestionProperties()}},restoreQuestionProperties:function(){if(cp.movie.questionObjs&&
!(0>this.m_questionNumInQuiz||this.m_questionNumInQuiz>=cp.movie.questionObjs.length)){var a=cp.movie.questionObjs[this.m_questionNumInQuiz];a&&(a.questionNumberInQuiz=this.m_questionNumInQuiz,a.startTime=this.m_startTime,a.endTime=this.m_endTime,a.wasJudged=this.m_wasJudged,a.currentAttempt=this.m_numTries,a.setScore(this.m_scoredPoints),a.m_isShuffled=this.m_isShuffled,a.m_QuestionStatus=this.m_partiallyCorrect?a.QuestionStatusEnum.PARTIAL_CORRECT:this.m_answersIncomplete?a.QuestionStatusEnum.INCOMPLETE:
this.m_answeredCorrectly?a.QuestionStatusEnum.CORRECT:a.QuestionStatusEnum.INCORRECT,a.restoreFromQuestionSpecificScoreProperties(this.m_questionSpecificScore),a.resumeSelectedAnswers(this.m_answerScores.slice(0)),a.m_questionScore=this)}},getinteractionID:function(){return this.m_interactionID},setinteractionID:function(a){this.m_interactionID=a},setQuestionDatafromQuestion:function(a,b,c,d){this.m_objectiveID=a;this.m_interactionID=b;this.m_weighting=c;this.m_negativeWeight=d},createQuestionSpecificScore:function(){this.m_questionSpecificScore||
(this.m_questionSpecificScore="hotspot"==this.m_interactionType?new cp.HotSpotQuestionSpecificScore:new cp.ChoiceQuestionSpecificScore)},getSlideNum:function(){return this.m_slideNum},setSlideNum:function(a){this.m_slideNum=a},getStartTime:function(){return this.m_startTime},setStartTime:function(a){this.m_startTime=a},getEndTime:function(){return this.m_endTime},setEndTime:function(a){this.m_endTime=a},getInteractionTypeForLMS:function(){var a;switch(this.m_interactionType){case cpInteractionTypeEnum.Choice:case cpInteractionTypeEnum.HotSpot:a=
"choice";break;case cpInteractionTypeEnum.TrueFalse:a="true-false";break;case cpInteractionTypeEnum.FillIn:a="fill-in";break;case cpInteractionTypeEnum.LongFillIn:a="long-fill-in";break;case cpInteractionTypeEnum.Matching:a="matching";break;case cpInteractionTypeEnum.Sequence:a="sequencing";break;case cpInteractionTypeEnum.Likert:a="likert";break;case cpInteractionTypeEnum.Widget:a="widget"}return a},getInteractionType:function(){var a;switch(this.m_interactionType){case cpInteractionTypeEnum.Choice:a=
"choice";break;case cpInteractionTypeEnum.TrueFalse:a="true-false";break;case cpInteractionTypeEnum.FillIn:a="fill-in";break;case cpInteractionTypeEnum.LongFillIn:a="long-fill-in";break;case cpInteractionTypeEnum.Matching:a="matching";break;case cpInteractionTypeEnum.Sequence:a="sequencing";break;case cpInteractionTypeEnum.Likert:a="likert";break;case cpInteractionTypeEnum.HotSpot:a="hotspot";break;case cpInteractionTypeEnum.Widget:a="widget"}return a},setInteractionType:function(a){var b;switch(a){case "choice":b=
cpInteractionTypeEnum.Choice;break;case "true-false":b=cpInteractionTypeEnum.TrueFalse;break;case "fill-in":b=cpInteractionTypeEnum.FillIn;break;case "long-fill-in":b=cpInteractionTypeEnum.LongFillIn;break;case "matching":b=cpInteractionTypeEnum.Matching;break;case "sequencing":b=cpInteractionTypeEnum.Sequence;break;case "hotspot":b=cpInteractionTypeEnum.HotSpot;break;case "likert":b=cpInteractionTypeEnum.Likert;break;case "widget":b=cpInteractionTypeEnum.Widget}this.m_interactionType=b},getObjectiveID:function(){return this.m_objectiveID},
setObjectiveID:function(a){this.m_objectiveID=a},getInteractionID:function(){return this.m_interactionID},setInteractionID:function(a){this.m_interactionID=a},getWeighting:function(){return this.m_weighting},setWeighting:function(a){this.m_weighting=a},getNegativeWeight:function(){return this.m_negativeWeight},setNegativeWeight:function(a){this.m_negativeWeight=a},getAnswerScores:function(){return this.m_answerScores},setAnswerScores:function(a){this.m_answerScores=a},getNumTries:function(){return this.m_numTries},
setNumTries:function(a){this.m_numTries=a},getAnswersIncomplete:function(){return this.m_answersIncomplete},setAnswersIncomplete:function(a){this.m_answersIncomplete=a},getAnsweredCorrectly:function(){return this.m_answeredCorrectly},setAnsweredCorrectly:function(a){this.m_answeredCorrectly=a},getPausedMsecs:function(){return this.m_pausedMsecs},setPausedMsecs:function(a){this.m_pausedMsecs=a},getQuestionNumInQuiz:function(){return this.m_questionNumInQuiz},setQuestionNumInQuiz:function(a){this.m_questionNumInQuiz=
a},getWasJudged:function(){return this.m_wasJudged},setIsPretest:function(a){this.m_isPretestQuestion=a},getIsPretest:function(){return this.m_isPretestQuestion},setIsKnowledgeCheck:function(a){this.m_isKnowledgeCheck=a},getIsKnowledgeCheck:function(){return this.m_isKnowledgeCheck},setWasJudged:function(a){this.m_wasJudged=a},resetScore:function(){this.m_answerScores=[];this.m_numTries=0;this.m_endTime=this.m_startTime=void 0;this.m_answeredCorrectly=this.m_answersIncomplete=!1;this.m_pausedMsecs=
0;this.m_wasJudged=!1;this.m_questionSpecificScore&&this.m_questionSpecificScore.reset()}};cp.QuizSlideGraphManager=function(){cp.QuizSlideGraphManager.baseConstructor.call(this);this.m_CompletionBranchMinQuizScore=this.m_CompletionBranchMaxQuizScore=0;this.m_CompletionBranchMinQuizScoreSet=this.m_CompletionBranchMaxQuizScoreSet=!1;this.m_SlideNumToQuestionNumMap={};this.m_progressNumber=0;this.m_startSlideIndex=-1};cp.inherits(cp.QuizSlideGraphManager,cp.SlideGraphManager);
cp.QuizSlideGraphManager.prototype.getPlaybackController=function(){return cp.movie.playbackController};cp.QuizSlideGraphManager.prototype.countQuizSlides=function(a){for(var b={},c=0,d=0;d<a.length;++d){var e=a[d];void 0==b[e]&&(b[e]=e,this.IsNonPretestQuestionSlide(e)&&this.IsNonKnowledgeCheckSlide(e)&&++c)}return c};
cp.QuizSlideGraphManager.prototype.countQuizMaxScore=function(a){var b=this.getPlaybackController();if(void 0==b)return"NaN";b=b.GetQuizController();if(!b)return 0;for(var c={},d=0,e=0;e<a.length;++e){var f=a[e];void 0==c[f]&&(c[f]=f,d+=b.getQuizSlideMaxScore(f))}return d};
cp.QuizSlideGraphManager.prototype.countQuizMinScore=function(a){var b=this.getPlaybackController();if(void 0==b)return"NaN";b=b.GetQuizController();if(!b)return 0;for(var c={},d=0,e=0;e<a.length;++e){var f=a[e];void 0==c[f]&&(c[f]=f,d+=b.getQuizSlideMinScore(f))}return d};
cp.QuizSlideGraphManager.prototype.countQuizScore=function(a){var b=this.getPlaybackController();if(void 0==b)return"NaN";b=b.GetQuizController();if(!b)return 0;for(var c={},d=0,e=0;e<a.length;++e){var f=a[e];void 0==c[f]&&(c[f]=f,d+=b.getQuizSlideScore(f))}return d};
cp.QuizSlideGraphManager.prototype.findCompletionBranchTraverse=function(a,b,c){var d=!1,e=-1;!d&&void 0==this.m_SlideGraphObj[a]&&(e=this.BranchEnum.kBranchFound,d=!0);!d&&void 0!=c[a]&&(e=this.BranchEnum.kLoopBranchFound,d=!0);e!=this.BranchEnum.kLoopBranchFound&&(b.push(a),c[a]=a);if(d){++this.m_BranchNumber;if(1==this.m_BranchNumber){var e=[],e=this.m_CurrentBranch.length,f=b.length;0<e&&0<f&&this.m_CurrentBranch[e-1]==b[0]?(e=this.m_CurrentBranch.slice(0,e-1),e=e.concat(b),this.m_CompletionBranch=
e.slice()):this.m_CompletionBranch=this.m_CurrentBranch.concat(b);this.m_CompletionBranchSet=!0;this.m_CompletionBranchMaxQuizScore=this.countQuizMaxScore(this.m_CompletionBranch);this.m_CompletionBranchMaxQuizScoreSet=!0;this.m_CompletionBranchMinQuizScore=this.countQuizMinScore(this.m_CompletionBranch);this.m_CompletionBranchMinQuizScoreSet=!0;b.pop();delete c[a];return this.BranchEnum.kBranchFound}if(2<=this.m_BranchNumber){this.m_CompletionBranchSet=!1;if(this.m_CompletionBranchMaxQuizScoreSet){if(this.countQuizMaxScore(this.m_CurrentBranch.concat(b))==
this.m_CompletionBranchMaxQuizScore)return e!=this.BranchEnum.kLoopBranchFound&&(b.pop(),delete c[a]),this.BranchEnum.kBranchFound;this.m_CompletionBranchMaxQuizScoreSet=!1;e!=this.BranchEnum.kLoopBranchFound&&(b.pop(),delete c[a]);return this.BranchEnum.kMultipleBranchFound}e!=this.BranchEnum.kLoopBranchFound&&(b.pop(),delete c[a]);return this.BranchEnum.kMultipleBranchFound}}var d=this.m_SlideGraphObj[a],g=!1;for(f in d)switch(this.findCompletionBranchTraverse(Number(f),b,c)){case this.BranchEnum.kBranchFound:g=
!0;case this.BranchEnum.kBranchNotFound:break;case this.BranchEnum.kMultipleBranchFound:return this.BranchEnum.kMultipleBranchFound}e!=this.BranchEnum.kLoopBranchFound&&(b.pop(),delete c[a]);return g?this.BranchEnum.kBranchFound:this.BranchEnum.kBranchNotFound};
cp.QuizSlideGraphManager.prototype.findCompletionBranch=function(){var a=1<=this.m_CurrentBranch.length?this.m_CurrentBranch[this.m_CurrentBranch.length-1]:this.m_RootSlideIndex;this.m_startSlideIndex=a;this.m_CompletionBranch=[];this.m_CompletionBranchSet=!1;this.m_BranchNumber=0;this.findCompletionBranchTraverse(a,[],{})};
cp.QuizSlideGraphManager.prototype.IsNonPretestQuestionSlide=function(a){var b=this.getPlaybackController();return b&&(b=b.GetQuizController())?b.IsNonPretestQuestionSlide(a):!1};cp.QuizSlideGraphManager.prototype.IsNonKnowledgeCheckSlide=function(a){var b=this.getPlaybackController();return b&&(b=b.GetQuizController())?b.IsNonKnowledgeCheck(a):!1};
cp.QuizSlideGraphManager.prototype.findFirstNonPretestQuestionSlide=function(){for(var a=this.m_CurrentBranch.length,b=0;b<a;++b)if(this.IsNonPretestQuestionSlide(this.m_CurrentBranch[b])&&this.IsNonKnowledgeCheckSlide(this.m_CurrentBranch[b]))return this.m_CurrentBranch[b];return-1};
cp.QuizSlideGraphManager.prototype.getMaxQuizScore=function(){!this.m_CompletionBranchSet&&!this.m_CompletionBranchMaxQuizScoreSet&&this.findCompletionBranch();if(!this.m_CompletionBranchSet&&!this.m_CompletionBranchMaxQuizScoreSet)return"NaN";var a=-1;return a=this.m_CompletionBranchMaxQuizScoreSet?this.m_CompletionBranchMaxQuizScore:this.countQuizMaxScore(this.m_CompletionBranch)};
cp.QuizSlideGraphManager.prototype.getMinQuizScore=function(){!this.m_CompletionBranchSet&&!this.m_CompletionBranchMinQuizScoreSet&&this.findCompletionBranch();if(!this.m_CompletionBranchSet&&!this.m_CompletionBranchMinQuizScoreSet)return"NaN";var a="NaN";return a=this.m_CompletionBranchMinQuizScoreSet?this.m_CompletionBranchMinQuizScore:this.countQuizMinScore(this.m_CompletionBranch)};
cp.QuizSlideGraphManager.prototype.getQuizScorePercentage=function(){!this.m_CompletionBranchSet&&!this.m_CompletionBranchMaxQuizScoreSet&&this.findCompletionBranch();if(!this.m_CompletionBranchSet&&!this.m_CompletionBranchMaxQuizScoreSet)return"NaN";var a=this.countQuizScore(this.m_CurrentBranch),b=-1,b=this.m_CompletionBranchSlideCountSet?this.m_CompletionBranchSlideCount:this.countQuizMaxScore(this.m_CompletionBranch);return 0>=b?"NaN":100*a/b};
cp.QuizSlideGraphManager.prototype.getNextAttemptFirstQuestionSlideIndex=function(){return this.findFirstNonPretestQuestionSlide()};cp.QuizSlideGraphManager.prototype.getReviewFirstQuestionSlideIndex=function(){return this.findFirstNonPretestQuestionSlide()};cp.QuizSlideGraphManager.prototype.getNumQuestions=function(){!this.m_CompletionBranchSet&&!this.m_CompletionBranchMaxQuizScoreSet&&this.findCompletionBranch();return!this.m_CompletionBranchSet&&!this.m_CompletionBranchMaxQuizScoreSet?"NaN":this.countQuizSlides(this.m_CompletionBranch)};
cp.QuizSlideGraphManager.prototype.getQuestionSlideProgressNumber=function(a){return this.m_SlideNumToQuestionNumMap&&void 0!=this.m_SlideNumToQuestionNumMap[a]?this.m_SlideNumToQuestionNumMap[a]:"NaN"};cp.QuizSlideGraphManager.prototype.setQuestionSlideProgressNumber=function(a){this.m_SlideNumToQuestionNumMap||(this.m_SlideNumToQuestionNumMap={});void 0==this.m_SlideNumToQuestionNumMap[a]&&(this.m_SlideNumToQuestionNumMap[a]=++this.m_progressNumber)};
cp.QuizSlideGraphManager.prototype.getLastQuestionSlideIndex=function(){if(!this.getPlaybackController())return-1;this.m_CompletionBranchSet||this.findCompletionBranch();if(!this.m_CompletionBranchSet)return-1;for(var a=-1,b=this.m_CompletionBranch.length,c=0;c<b;++c){var d=this.m_CompletionBranch[c];this.IsNonPretestQuestionSlide(d)&&d>a&&(a=d)}return a};
cp.QuizSlideGraphManager.prototype.resetCurrentBranch=function(a){if(!(0>a)){for(var b=-1,c=0;c<this.m_CurrentBranch.length;++c)if(this.m_CurrentBranch[c]==a){b=a;break}0<=b&&b+1<this.m_CurrentBranch.length&&this.m_CurrentBranch.splice(b+1);a={};for(c=b=0;c<this.m_CurrentBranch.length;++c){var d=this.m_CurrentBranch[c];this.m_SlideNumToQuestionNumMap.hasOwnProperty(d)&&(a[d]=this.m_SlideNumToQuestionNumMap[d],b<this.m_SlideNumToQuestionNumMap[d]&&(b=this.m_SlideNumToQuestionNumMap[d]))}this.m_SlideNumToQuestionNumMap=
a;this.m_progressNumber=b;this.m_CompletionBranchMinQuizScore=this.m_CompletionBranchMaxQuizScore=0;this.m_CompletionBranchMinQuizScoreSet=this.m_CompletionBranchMaxQuizScoreSet=!1;this.findCompletionBranch()}};
cp.QuizSlideGraphManager.prototype.findLastContinousBranchFromHistory=function(a,b){for(var c=[],d=this.m_BranchHistory.length-1;0<=d;--d)if(c=[],this.m_BranchHistory[d]==a){for(var e=-1,f=!0,g=d;g<this.m_BranchHistory.length;++g){c.push(this.m_BranchHistory[g]);if(this.m_BranchHistory[g]==b){e=g;break}if(g!=this.m_BranchHistory.length-1&&!this.getIsJumpValid(this.m_BranchHistory[g],this.m_BranchHistory[g+1])){f=!1;break}}if(-1!=e&&f)return c}return c=[]};
cp.QuizSlideGraphManager.prototype.updateCurrentBranch=function(a){if(!(0>a)){var b=this.getPlaybackController();if(b&&((b=b.GetQuizController())||!b.GetIsInReviewMode())){for(var c=this.m_CurrentBranch.length,d=-1,e=0;e<this.m_CurrentBranch.length;++e)if(this.m_CurrentBranch[e]==a){d=e;break}if(-1!=d&&d+1<c){this.m_CurrentBranch.splice(d+1);b={};for(c=a=0;c<this.m_CurrentBranch.length;++c)d=this.m_CurrentBranch[c],this.m_SlideNumToQuestionNumMap.hasOwnProperty(d)&&(b[d]=this.m_SlideNumToQuestionNumMap[d],
a<this.m_SlideNumToQuestionNumMap[d]&&(a=this.m_SlideNumToQuestionNumMap[d]));this.m_SlideNumToQuestionNumMap=b;this.m_progressNumber=a}else if(0<this.m_CurrentBranch.length&&-1==d){a=this.findLastContinousBranchFromHistory(this.m_CurrentBranch[this.m_CurrentBranch.length-1],a);for(c=0;c<a.length;++c)this.m_CurrentBranch.push(a[c]),this.m_BranchHistory.push(a[c]),b&&"Question"==b.GetSlideType(a[c])&&b.IsNonKnowledgeCheck(a[c])&&this.setQuestionSlideProgressNumber(a[c])}this.m_CompletionBranchMinQuizScore=
this.m_CompletionBranchMaxQuizScore=0;this.m_CompletionBranchMinQuizScoreSet=this.m_CompletionBranchMaxQuizScoreSet=!1;this.findCompletionBranch()}}};cp.PoolManager=function(){this.m_framesAddedSoFar=0};
cp.PoolManager.prototype={updateQuestionData:function(a,b){var c=cp.D[a];c&&(c.w=b.w,c.it=b.it,c.oid=b.oid,c.sra=b.sra,c.nw=b.nw,c.oca=b.oca,c.ofa=b.ofa)},updateModelDataForSlides:function(a,b){var c=-1,d=-1,e=cp.D.project_main.slides;if(e&&!(0>=e.length)){var e=e.split(","),f=e[a],g=cp.D[f];g.w=b.w;g.oca=b.oca;g.ofa=b.ofa;g.v=b.v;this.updateQuestionData(g.qs,b);var i=g.to-g.from+1;this.m_framesAddedSoFar+=i;var h=-1;0==a?(c=1,d=g.to,h=0):(h=cp.D[e[a-1]],c=h.to+1,d=h.to+i,h=h.to);cp.poolVerbose&&
cp.log("Slide Name : "+f+", from : "+g.from+", pauseAt : "+g.pa+", to : "+g.to);g.from=c;g.pa+=c-1;g.to=d;g.audioName&&(d=cp.D[g.audioName],cp.poolVerbose&&cp.log("Random : "+g.audioName+" : "+d.from+", "+d.to+". Adding : "+(c-1)),d.from+=c-1,d.to+=c-1,cp.poolVerbose&&cp.log("Random : "+g.audioName+" after addition : "+d.from+", "+d.to));cp.poolVerbose&&cp.log("Slide Name : "+f+", from : "+g.from+", pauseAt : "+g.pa+", to : "+g.to);this.updateStartEndFramesForSlideItems(h,f,g.to);cp.poolVerbose&&
cp.log("Adding : "+i);c=void 0;for(f=a+1;f<e.length;++f){var d=e[f],h=cp.D[d],k=h.pn;k&&""!=k||(cp.poolVerbose&&cp.log(d+" : "+h.from+", "+h.to+". Adding : "+i),void 0==c&&(c=h.from),h.from+=i,h.to+=i,cp.poolVerbose&&cp.log(d+" after addition : "+h.from+", "+h.to),h.pa+=i,this.updateStartEndFramesForSlideItems(i,d,h.to))}this.updateStartEndFramesForSlideAudios(i,c,g.audioName)}},updateStartEndFramesForSlideAudios:function(a,b,c){var d=cp.D.project_main.slideAudios;d||(d="");for(var e=[],d=d.split(","),
f=!0,g=0;g<d.length;++g){var i=cp.D[d[g]];i&&(i.to<b?e.push(d[g]):(c&&f&&(e.push(c),f=!1),e.push(d[g]),cp.poolVerbose&&cp.log(d[g]+" : "+i.from+", "+i.to+". Adding : "+a),i.from+=a,i.to+=a,cp.poolVerbose&&cp.log(d[g]+" after addition : "+i.from+", "+i.to)))}c&&f&&e.push(c);cp.D.project_main.slideAudios=e.toString()},updateStartEndFramesForSlideItems:function(a,b,c){var d=cp.D[b],e=d.si;if(e&&!(0>=e.length)){for(var f in e){var g=cp.D[e[f].n];if(void 0!=g&&(!0==g.immo?g.to=c:1!=g.rp&&1!=g.rpa||g.apsn==
b?(g.from+=a,g.pa&&(g.pa+=a),g.to+=a):g.to=c,void 0!=g.ia)){var i=cp.D[g.ia];i&&(1!=g.rp&&1!=g.rpa&&g.apsn==b)&&(i.from+=a-1,i.to+=a)}}if((b=d.iph)&&0<b.length)for(var h in b)void 0!=b[h]&&(c=cp.D[b[h].n],void 0!=c&&c.pa&&(c.pa+=a))}},updateSlideDataFromRandomSlideData:function(a,b){var c=b.qnq;if(void 0!=c){var d=cp.D[a];cp.D[d.qs+c]=cp.D[d.qs];cp.D[d.qs+c].qnq=c;cp.D[d.qs+c].oid=b.oid;d.qnq=c;d.pn=b.pn;d.rsi=b.rsi;this.updateQuestionNameAtIndex(d.qs,c)}},loadPools:function(){var a=cp.D.project_main.pools;
if(!(void 0==a||0>=a.length))for(var b=0;b<a.length;++b)this.loadPoolDataIntoModel(a[b])},loadPoolDataIntoModel:function(a){for(var b=cp.model[a+"Data"],c=cp.D[a].pqs,d=0;d<c.length;++d){var e=b[c[d]+"Data"],f;for(f in e)cp.D[f]=e[f]}if(cp.poolResources){if(b=cp.poolResources[a+"Images"])for(d=0;d<b.length;++d)cp.model.images.push(b[d]);if(d=cp.poolResources[a+"Videos"])for(b=0;b<d.length;++b)cp.model.videos.push(d[b]);if(a=cp.poolResources[a+"SlideVideos"])for(d=0;d<a.length;++d)cp.model.slideVideos.push(a[d])}},
updateSlideNameAtIndex:function(a,b){var c=cp.D.project_main.slides;0>=c.length||(c=c.split(","),b>c.length-1||(c[b]=a,cp.D.project_main.slides=c.toString()))},updateQuestionNameAtIndex:function(a,b){var c=cp.D.project_main.questions;0>=c.length||(c=c.split(","),b>c.length-1||(c[b]=a,cp.movie&&(cp.movie.questions=c),cp.D.project_main.questions=c.toString()))},removeAllReferences:function(a){var b=cp.D.project_main.questions;if(0<b.length){for(var c=b.split(","),d=[],b=0;b<c.length;++b)c[b]!=a&&d.push(c[b]);
cp.D.project_main.questions=d.toString()}b=cp.D.project_main.slides;if(0<b.length){c=b.split(",");d=[];for(b=0;b<c.length;++b)c[b]!=a&&d.push(c[b]);cp.D.project_main.slides=d.toString()}},updateSlidesAndQuestionsFromPool:function(){var a=cp.D.project_main.pools;if(!(void 0==a||0>=a.length))if(a=cp.D.project_main.slides,!(void 0==a||0>=a.length)){for(var a=a.split(","),b=0,c=0;c<a.length;++c){var d=a[c],e=cp.D[d],f=e.pn;if(f&&""!=f){var g=cp.D[f],f=g.pqs,i=-1;if(e.is){g=g.rsqs;if(0>=g.length){this.removeAllReferences(d);
b++;continue}void 0==f.sindex?f.sindex=0:f.sindex++;i=Number(g[f.sindex])}else{g=g.rgqs;if(0>=g.length){this.removeAllReferences(d);b++;continue}void 0==f.gindex?f.gindex=0:f.gindex++;i=Number(g[f.gindex])}f=f[i];this.updateSlideNameAtIndex(f,c-b);e.qnq-=b;this.updateSlideDataFromRandomSlideData(f,e);this.updateModelDataForSlides(c-b,e);-1!=d.indexOf("rq")&&(d=d.split("rq")[1],""!=d&&(cp.D[d]=cp.D[f]))}}this.updateMainMovieData()}},updateMainMovieData:function(){var a=cp.D.project_main.slides;0>=
a.length||(a=a.split(","),cp.D.project_main.to=cp.D[a[a.length-1]].to)},updateSlideData:function(a,b,c){this.updateSlideNameAtIndex(a,b);this.updateSlideDataFromRandomSlideData(a,c);this.updateModelDataForSlides(b,c)},randomizePools:function(){if(!(""!=cp.resumeDataChunk&&void 0!=cp.resumeDataChunk&&"0"!=cp.resumeDataChunk)){var a=cp.D.project_main.pools;if(a){var b=a.length;if(!(0>=b)){cp.poolVerbose&&cp.log("Randomizing");for(var c=0;c<b;++c){for(var d=cp.D[a[c]],e=d.rsqs,f=e.length,g=f;g--;){var i=
parseInt(Math.random()*f),h=e[g];e[g]=e[i];e[i]=h}d.rsqs=e;e=d.rgqs;for(g=f=e.length;g--;)i=parseInt(Math.random()*f),h=e[g],e[g]=e[i],e[i]=h;d.rgqs=e}this.updateSlidesAndQuestionsFromPool()}}}}};
cp.QuizButtonCH=function(a){if(!cp.disableInteractions){a.stopPropagation&&a.stopPropagation();var c=a.target.id,a=a.target,b=cp.D[c];b&&(b.sicbs&&void 0!==b.bstiid&&-1!==b.bstiid)&&(c=cp.getDisplayObjNameByCP_UID(b.bstiid),a=cp(c));c=cp.D[c].chfn;c(a)}};
cp.QuestionSlideReviewLabel=function(a,c){cp.QuestionSlideReviewLabel.baseConstructor.call(this,a);this.textAlign=this.getAttribute("ta");this.bold=this.getAttribute("B");this.color=this.getAttribute("c");this.font=this.getAttribute("f");this.italic=this.getAttribute("i");this.size=this.getAttribute("sz");this.underline=this.getAttribute("u");this.id=this.getAttribute("id");this.canvasObj=cp.D[this.element.id];this.visible=this.getAttribute("visible");this.re=this.getAttribute("re");this.sh=this.getAttribute("sh");
var b=this.getAttribute("b");this.parentDivName=this.getAttribute("dn");this.relatedQuestionSlide=this.getAttribute("rqs");cp.responsive&&(this.responsiveCSS=this.getAttribute("css"));if(void 0!=this.relatedQuestionSlide){var d=cp.getQuestionObject(this.relatedQuestionSlide);void 0!=d&&(d.m_correctFeedbackText=this.getAttribute("cf"),d.m_partialCorrectFeedbackText=this.getAttribute("pcf"),d.m_incorrectDisplayChosenText=this.getAttribute("idc"),d.m_incorrectDisplayCorrectText=this.getAttribute("ict"))}this.bounds=
{minX:b[0],minY:b[1],maxX:b[2],maxY:b[3]};b=this.getAttribute("vb");this.vbounds={minX:b[0],minY:b[1],maxX:b[2],maxY:b[3]};this.args=c;this.element&&(this.element.parentElement.drawingBoard=this.element.parentElement,this.element.parentElement.bounds=this.bounds);this.isDrawn=!1};cp.inherits(cp.QuestionSlideReviewLabel,cp.DisplayObject);cp.QuestionSlideReviewLabel.prototype.start=function(a){this.addIfNeeded();if(!this.effectIsStarted||a)this.updateEffects(this.hasEffect),this.effectIsStarted=!0};
cp.QuestionSlideReviewLabel.prototype.reset=function(){delete cp.ropMap[this.element.id];this.isDrawn=!1;this.element.width="0";this.element.height="0";this.element.style.width="0px";this.element.style.height="0px";this.element.left="0";this.element.top="0";this.element.style.left="0px";this.element.style.top="0px"};
cp.QuestionSlideReviewLabel.prototype.drawForResponsive=function(a,c){var b=cp.getQuestionObject(this.relatedQuestionSlide);if(!b||!b.getIsStarted()||!this.responsiveCSS)return!1;if(this.isDrawn&&!a)return!0;var d=cp.getResponsiveCSS(this.responsiveCSS);cp.getCSSFromLayouter(d,this);var e=!1,e=this.re||this.sh&&!this.sh.i||this.fillOuterArea,f=void 0!=this.tr;if(this.currentCSS==d&&!e&&!f&&!a)return!0;this.currentCSS=d;if(!cp.movie.playbackController)return!1;e=cp.movie.playbackController.GetQuizController();
if(!e||!1==e.GetIsInReviewMode())return!1;this.actualParent=cp(this.parentDivName);if(!b.getIsIncomplete()||b.getIsSurvey()||b.getIsPretest())return this.isDrawn=b.showCustomReviewArea(this.element.id),this.drawComplete(c),!0==this.isDrawn;this.zIndex=cp.D[this.parentDivName].zIndex;cp.applyResponsiveStyles(this.element.parentElement,d,!0);this.element.parentElement.offsetHeight=this.element.parentElement.offsetHeight;this.actualParentClientBoundingRect=this.element.parentElement.getBoundingClientRect();
e=cp("re-"+this.element.id);e||(e=cp.newElem("div"),e.id="re-"+this.element.id,cp.fixWebkitScaling(e),cp.addRewrapObjectAsPerRestOfProjectItem(e));cp.applyResponsiveStyles(e,d,!0);e.offsetHeight=e.offsetHeight;this.parentElementClientBoundingRect=e.getBoundingClientRect();this.element.style.left="0px";this.element.style.top="0px";this.element.style.width="100%";this.element.style.height="100%";this.isDrawn||(this.sh&&(this.element.style.textShadow=(this.sh.i?"inset ":"")+this.sh.d*Math.cos(Math.PI*
this.sh.a/180)+"px "+this.sh.d*Math.sin(Math.PI*this.sh.a/180)+"px "+this.sh.b+"px "+cp.ConvertRGBToRGBA(this.sh.c,this.sh.o)),this.re&&(e.style.webkitBoxReflect="below "+this.re.d+"px -webkit-gradient(linear, left top, left bottom, from(transparent), color-stop("+(1-this.re.s/100)+", transparent), to(rgba(255, 255, 255, "+(1-this.re.p/100)+")))"),this.element.style.position="absolute",this.visible=1,this.text=b.getIsIncomplete()?this.getAttribute("icf"):"",void 0!=this.getAttribute("accstr")&&(this.element.setAttribute("tabIndex",
"-1"),this.element.setAttribute("aria-label",this.text),cp.removeAccessibilityOutline(this.element),this.element.setAttribute("role","img")),""==this.element.innerHTML&&(this.element.innerHTML+=this.text),this.element.parentNode.removeChild(this.element),e.setAttribute("class","cp-rewrap"),e.style.zIndex=this.zIndex,e.appendChild(this.element));b=this.getAttribute("rpfont")[cp.ResponsiveProjWidth].font;this.element.style.fontWeight=b.B?"bold":"normal";this.element.style.fontStyle=b.i?"italic":"normal";
this.element.style.textDecoration=b.u?"underline":"none";this.element.style.color=b.c;this.element.style.fontFamily=b.n;this.element.style.fontSize=b.s+"px";this.element.style.textAlign=this.textAlign;this.element.style.verticalAlign="middle";this.isDrawn=!0;this.drawComplete(c);this.visible||cp.hide(this.parentDivName);return!0};
cp.QuestionSlideReviewLabel.prototype.addIfNeeded=function(a,c){if((!cp.responsive||!this.drawForResponsive(a))&&!this.isDrawn){var b=cp.getQuestionObject(this.relatedQuestionSlide);if(b&&b.getIsStarted()&&cp.movie.playbackController){var d=cp.movie.playbackController.GetQuizController();d&&!1!=d.GetIsInReviewMode()&&((this.actualParent=cp(this.parentDivName),!b.getIsIncomplete()||b.getIsSurvey()||b.getIsPretest())?(this.isDrawn=b.showCustomReviewArea(this.element.id),this.drawComplete(c)):(this.zIndex=
cp.D[this.parentDivName].zIndex,d=cp.newElem("div"),d.id="re-"+this.element.id,cp.fixWebkitScaling(d),d.style.position="absolute",d.style.left=this.vbounds.minX+"px",d.style.top=this.vbounds.minY+"px",d.style.width=this.vbounds.maxX-this.vbounds.minX+"px",d.style.height=this.vbounds.maxY-this.vbounds.minY+"px",this.element.parentElement.style.position="absolute",this.element.parentElement.style.left=this.bounds.minX+"px",this.element.parentElement.style.top=this.bounds.minY+"px",this.element.parentElement.style.width=
this.bounds.maxX-this.bounds.minX+"px",this.element.parentElement.style.height=this.bounds.maxY-this.bounds.minY+"px",this.element.style.left="0px",this.element.style.top="0px",this.element.style.width="100%",this.element.style.height="100%",this.sh&&(this.element.style.textShadow=(this.sh.i?"inset ":"")+this.sh.d*Math.cos(Math.PI*this.sh.a/180)+"px "+this.sh.d*Math.sin(Math.PI*this.sh.a/180)+"px "+this.sh.b+"px "+cp.ConvertRGBToRGBA(this.sh.c,this.sh.o)),this.re&&(d.style.webkitBoxReflect="below "+
this.re.d+"px -webkit-gradient(linear, left top, left bottom, from(transparent), color-stop("+(1-this.re.s/100)+", transparent), to(rgba(255, 255, 255, "+(1-this.re.p/100)+")))"),this.element.style.position="absolute",this.element.style.textAlign=this.textAlign,this.element.style.verticalAlign="middle",this.visible=1,this.text=b.getIsIncomplete()?this.getAttribute("icf"):"",void 0!=this.getAttribute("accstr")&&(this.element.setAttribute("tabIndex","-1"),this.element.setAttribute("aria-label",this.text),
cp.removeAccessibilityOutline(this.element),this.element.setAttribute("role","img")),this.element.style.color=this.color,this.element.style.fontFamily=this.font,this.element.style.fontSize=this.size+"px",this.element.style.fontWeight=this.bold?"bold":"normal",this.element.style.fontStyle=this.italic?"italic":"normal",this.element.style.textDecoration=this.underline?"underline":"none",""==this.element.innerHTML&&(this.element.innerHTML+=this.text),this.element.parentNode.removeChild(this.element),
cp.addRewrapObjectAsPerRestOfProjectItem(d),d.setAttribute("class","cp-rewrap"),d.appendChild(this.element),d.style.zIndex=this.zIndex,this.isDrawn=!0,this.drawComplete(c),this.visible||cp.hide(this.parentDivName)))}}};
cp.ProgressSlideLabel=function(a,c){cp.ProgressSlideLabel.baseConstructor.call(this,a);this.id=this.getAttribute("id");this.visible=this.getAttribute("visible");this.textAlign=this.getAttribute("ta");this.bold=this.getAttribute("B");this.color=this.getAttribute("c");this.font=this.getAttribute("f");this.italic=this.getAttribute("i");this.size=this.getAttribute("sz");this.underline=this.getAttribute("u");this.quizParam=this.getAttribute("qp");if(cp.movie.playbackController){var b=cp.movie.playbackController.GetQuizController();
b&&(b.GetParameterValueByName(this.quizParam),this.relatedQuestionSlide=this.getAttribute("rqs"),cp.responsive&&(this.responsiveCSS=this.getAttribute("css")),this.parentDivName=this.getAttribute("dn"),b=this.getAttribute("b"),this.bounds={minX:b[0],minY:b[1],maxX:b[2],maxY:b[3]},this.tr=this.getAttribute("tr"),this.re=this.getAttribute("re"),this.sh=this.getAttribute("sh"),b=this.getAttribute("vb"),this.vbounds={minX:b[0],minY:b[1],maxX:b[2],maxY:b[3]},this.element&&(this.element.parentElement.drawingBoard=
this.element.parentElement,this.element.parentElement.bounds=this.bounds),this.args=c,this.isDrawn=!1)}};cp.inherits(cp.ProgressSlideLabel,cp.DisplayObject);cp.ProgressSlideLabel.prototype.start=function(a){this.addIfNeeded();if(!this.effectIsStarted||a)this.updateEffects(this.hasEffect),this.effectIsStarted=!0};
cp.ProgressSlideLabel.prototype.reset=function(){delete cp.ropMap[this.element.id];this.isDrawn=!1;this.element.width="0";this.element.height="0";this.element.style.width="0px";this.element.style.height="0px";this.element.left="0";this.element.top="0";this.element.style.left="0px";this.element.style.top="0px"};
cp.ProgressSlideLabel.prototype.drawForResponsive=function(a){var c=cp.getQuestionObject(this.relatedQuestionSlide);if(!c||!c.getIsStarted()||!this.responsiveCSS)return!1;if(this.isDrawn&&!a)return!0;var b=cp.getResponsiveCSS(this.responsiveCSS);cp.getCSSFromLayouter(b,this);var d=!1,d=this.re||this.sh&&!this.sh.i||this.fillOuterArea,e=void 0!=this.tr;if(this.currentCSS==b&&!d&&!e&&!a)return!0;this.currentCSS=b;var f=!0,a=cp.D[this.parentDivName],e=cp.D[a.mdi],d=cp("re-"+this.element.id);d||(d=cp.newElem("div"),
d.id="re-"+this.element.id,cp.fixWebkitScaling(d),cp.addRewrapObjectAsPerRestOfProjectItem(d));var h=b;this.getAttribute("useV")&&(h=cp.createResponsiveStyleObj(b,b.p,b.vl,b.vt,b.vr,b.vb,b.vw,b.vh,b.crop));cp.applyResponsiveStyles(this.element.parentElement,b,f);this.element.parentElement.offsetHeight=this.element.parentElement.offsetHeight;this.parentElementClientBoundingRect=this.element.parentElement.getBoundingClientRect();var g=0;this.tr&&(g=cp.getAngleFromRotateStr(this.tr),f=cp.getCenterForRotation(this.element.parentElement),
g=cp.getBoundsForRotatedItem(this.element.parentElement.clientWidth,this.element.parentElement.clientHeight,f,g),h=cp.createResponsiveStyleObj(b,b.p,g.l,g.t,g.r,g.b,g.w,g.h,b.crop),cp.applyTransform(this.element,this.tr),g=cp.getAngleFromRotateStr(this.tr),this.element.tr=this.tr,this.element.parentElement.tr=this.tr,cp.applyTransform(this.element.parentElement,this.tr),f=!1);cp.applyResponsiveStyles(d,h,f);this.element.rotateAngle=g;this.element.parentElement.rotateAngle=g;this.element.style.left=
"0px";this.element.style.top="0px";this.element.style.width="100%";this.element.style.height="100%";this.element.style.display="block";this.element.style.position="absolute";this.isDrawn||(this.text=this.getAttribute("text"),this.text=c?c.getProgressString(this.text):"",!0===e.hasOwnProperty("accstr")&&(c=document.getElementById(this.parentDivName),cp.createAlternativeAccessibleText(c,this.text,"img"),cp.removeAccessibilityOutline(c)),this.zIndex=a.zIndex,this.sh&&(this.element.style.textShadow=this.sh.d*
Math.cos(Math.PI*this.sh.a/180)+"px "+this.sh.d*Math.sin(Math.PI*this.sh.a/180)+"px "+this.sh.b+"px "+cp.ConvertRGBToRGBA(this.sh.c,this.sh.o)+(this.sh.i?" inset":"")),this.re&&(d.style.webkitBoxReflect="below "+this.re.d+"px -webkit-gradient(linear, left top, left bottom, from(transparent), color-stop("+(1-this.re.s/100)+", transparent), to(rgba(255, 255, 255, "+(1-this.re.p/100)+")))"),""==this.element.innerHTML&&(this.element.innerHTML+="<table style='width=100%;height:100%;'><tr style='width=100%;height:100%;'><td style='width=100%;height:100%;vertical-align:middle;'>"+
this.text+"</td></tr></table>"),this.element.parentNode.removeChild(this.element),d.setAttribute("class","cp-rewrap"),d.appendChild(this.element),d.style.zIndex=this.zIndex);c=this.getAttribute("rpfont")[cp.ResponsiveProjWidth].font;this.element.style.fontWeight=c.B?"bold":"normal";this.element.style.fontStyle=c.i?"italic":"normal";this.element.style.textDecoration=c.u?"underline":"none";this.element.style.color=c.c;this.element.style.fontFamily=c.n;this.element.style.fontSize=c.s+"px";this.element.style.textAlign=
this.textAlign;this.element.style.verticalAlign="middle";this.isDrawn=!0;this.visible||cp.hide(this.parentDivName);return!0};
cp.ProgressSlideLabel.prototype.addIfNeeded=function(a){if(!cp.responsive||!this.drawForResponsive(a))if((a=cp.getQuestionObject(this.relatedQuestionSlide))&&a.getIsStarted()&&!this.isDrawn){this.text=this.getAttribute("text");this.text=a?a.getProgressString(this.text):"";var a=this.bounds,c=cp.D[this.parentDivName];if(!0===cp.D[c.mdi].hasOwnProperty("accstr")){var b=document.getElementById(this.parentDivName);cp.createAlternativeAccessibleText(b,this.text,"img");cp.removeAccessibilityOutline(b)}this.zIndex=
c.zIndex;this.element.style.width=a.maxX-a.minX+"px";this.element.style.height=a.maxY-a.minY+"px";c=cp.newElem("div");c.id="re-"+this.element.id;cp.fixWebkitScaling(c);this.element.style.textAlign=this.textAlign;this.element.style.verticalAlign="middle";b=0;this.tr&&(cp.applyTransform(this.element,this.tr),b=cp.getAngleFromRotateStr(this.tr),this.element.tr=this.tr,this.element.parentElement.tr=this.tr,cp.applyTransform(this.element.parentElement,this.tr));this.element.rotateAngle=b;this.element.parentElement.rotateAngle=
b;this.sh&&(this.element.style.textShadow=this.sh.d*Math.cos(Math.PI*this.sh.a/180)+"px "+this.sh.d*Math.sin(Math.PI*this.sh.a/180)+"px "+this.sh.b+"px "+cp.ConvertRGBToRGBA(this.sh.c,this.sh.o)+(this.sh.i?" inset":""));this.re&&(c.style.webkitBoxReflect="below "+this.re.d+"px -webkit-gradient(linear, left top, left bottom, from(transparent), color-stop("+(1-this.re.s/100)+", transparent), to(rgba(255, 255, 255, "+(1-this.re.p/100)+")))");this.element.parentElement.style.position="absolute";this.element.parentElement.style.left=
this.bounds.minX+"px";this.element.parentElement.style.top=this.bounds.minY+"px";this.element.parentElement.style.width=this.bounds.maxX-this.bounds.minX+"px";this.element.parentElement.style.height=this.bounds.maxY-this.bounds.minY+"px";c.style.position="absolute";c.style.left=this.vbounds.minX+"px";c.style.top=this.vbounds.minY+"px";c.style.width=this.vbounds.maxX-this.vbounds.minX+"px";c.style.height=this.vbounds.maxY-this.vbounds.minY+"px";this.element.style.marginLeft=-(this.vbounds.minX-a.minX)+
"px";this.element.style.marginTop=-(this.vbounds.minY-a.minY)+"px";this.element.style.display="block";this.element.style.position="absolute";this.element.style.color=this.color;this.element.style.fontFamily=this.font;this.element.style.fontSize=this.size+"px";this.element.style.fontWeight=this.bold?"bold":"normal";this.element.style.fontStyle=this.italic?"italic":"normal";this.element.style.textDecoration=this.underline?"underline":"none";""==this.element.innerHTML&&(this.element.innerHTML+="<table style='width=100%;height:100%;'><tr style='width=100%;height:100%;'><td style='width=100%;height:100%;vertical-align:middle;'>"+
this.text+"</td></tr></table>");this.element.parentNode.removeChild(this.element);cp.addRewrapObjectAsPerRestOfProjectItem(c);c.setAttribute("class","cp-rewrap");c.appendChild(this.element);c.style.zIndex=this.zIndex;this.isDrawn=!0;this.visible||cp.hide(this.parentDivName)}};
cp.Answer=function(a){cp.Answer.baseConstructor.call(this,a);this.id=this.getAttribute("id");this.type=this.getAttribute("type");this.visible=this.getAttribute("visible");this.answerID=this.getAttribute("aid");this.relatedQuestionSlide=this.getAttribute("rqs");this.m_questionObj=cp.getQuestionObject(this.relatedQuestionSlide);if(cp.responsive&&(a=cp.D[this.element.id]))this.answerAreaItemName=a.aan;this.isDrawn=!1};cp.inherits(cp.Answer,cp.DisplayObject);
cp.Answer.prototype.start=function(a){this.addIfNeeded();if(!this.effectIsStarted||a)this.updateEffects(this.hasEffect),this.effectIsStarted=!0};cp.Answer.prototype.reset=function(){delete cp.ropMap[this.element.id];this.isDrawn=!1;this.element.width="0";this.element.height="0";this.element.style.width="0px";this.element.style.height="0px";this.element.left="0";this.element.top="0";this.element.style.left="0px";this.element.style.top="0px"};
cp.adjustPositionWithAnswerArea=function(a,c,b,d){if(cp.responsive&&a&&c&&b){var e=cp(b),f=cp.D[b],b=0;f&&!d&&(b=cp.D[f.mdi].sw);d=e.getBoundingClientRect();e=cp.movie.stage.mainSlideDiv.getBoundingClientRect();cp.applyResponsiveStyles(c,a);var f=a.l,h=a.t,g=a.r,a=a.b;"auto"!=f&&(f=-1!=f.indexOf("%")?cp.getRoundedValue(parseFloat(f)*e.width/100):parseFloat(f),d&&(f+=d.left+b-e.left),c.style.left=f+"px");"auto"!=h&&(h=-1!=h.indexOf("%")?cp.getRoundedValue(parseFloat(h)*e.height/100):parseFloat(h),
d&&(h+=d.top-e.top),c.style.top=h+"px");"auto"!=g&&(g=-1!=g.indexOf("%")?cp.getRoundedValue(parseFloat(g)*e.width/100):parseFloat(g),d&&(g+=e.right-d.right-b),c.style.right=g+"px");"auto"!=a&&(a=-1!=a.indexOf("%")?cp.getRoundedValue(parseFloat(a)*e.height/100):parseFloat(a),d&&(a+=e.bottom-d.bottom),c.style.bottom=a+"px")}};cp.Answer.prototype.adjustPositionWithAnswerArea=function(a,c,b){cp.adjustPositionWithAnswerArea(a,c,this.answerAreaItemName,b)};cp.Answer.prototype.addIfNeeded=function(){};
cp.Answer.prototype.getAnswerAreaBoundingRect=function(a,c){if(cp.responsive&&a&&c&&this.answerAreaItemName)return cp(this.answerAreaItemName).getBoundingClientRect()};
cp.Answer.prototype.linkedItemDrawingCompleteHandler=function(a){if(cp.responsive&&this.drawForResponsive)if(this.answerAreaItemName){var c=cp.D[this.answerAreaItemName];c&&(c=cp.D[c.mdi],a.cpData&&a.cpData.uid&&a.cpData.uid==c.uid&&(cp.verbose&&cp.log("drawing "+this.element.id+", for "+a.cpData.uid),this.drawForResponsive(!0,cp.ReasonForDrawing.kLinkedToItemAppeared)))}else cp.Answer.superClass.linkedItemDrawingCompleteHandler.call(this,a)};
cp.Answer.prototype.subscribeToItemDrawingCompleteHandler=function(a){if(cp.responsive)if(this.answerAreaItemName){if(a=cp.D[this.answerAreaItemName])if(a=cp.D[a.mdi]){var c=this;(a=cp.getResponsiveCSS(a.css))&&(-1!=a.lhID||-1!=a.lvID)&&cp.em.addEventListener(function(a){c.linkedItemDrawingCompleteHandler(a)},cp.ITEMDRAWINGCOMPLETEEVENT)}}else cp.Answer.superClass.subscribeToItemDrawingCompleteHandler.call(this,a)};
cp.Question=function(a,c){if(cp.movie.playbackController&&(this.m_quizController=cp.movie.playbackController.GetQuizController()))this.m_questionScore=void 0,this.wasJudged=!1,this.m_isSurvey=this.m_isTracked=!0,this.associatedObjName=c,this.m_slideIndex=-1,cp.movie.stage&&(this.m_slideIndex=cp.movie.stage.getSlideIndexForName(c)),this.questionObjName=a,this.progressString="",this.questionData=cp.D[this.questionObjName],this.latencyTimer=void 0,this.latency=0,this.timer=void 0,this.score=this.timeBeforePause=
this.pausedMsecs=this.endTime=this.startTime=0,this.m_selectedAnswersArr=[],this.isPartialScore=this.questionData.ips,this.timeLimit=this.questionData.tl,this.questionTextCanvasName=this.questionData.qtc,this.feedbackCaptionToBeShown="",this.currentAttempt=0,this.numberOfAttempts=this.questionData.noa,this.incorrectFeedbackCaptions=this.questionData.ifc,this.reviewModeBackButtonDivElement=this.reviewModeNextButtonDivElement=this.backButtonDivElement=this.skipButtonDivElement=this.clearButtonDivElement=
this.submitAllButtonDivElement=this.submitButtonDivElement=void 0,this.shouldReportAnswers=this.questionData.sra,this.lastFeedbackShown=void 0,this.QuestionStatusEnum||(this.QuestionStatusEnum={},this.QuestionStatusEnum.INCOMPLETE=cp.QuestionStatusEnum.INCOMPLETE,this.QuestionStatusEnum.INCORRECT=cp.QuestionStatusEnum.INCORRECT,this.QuestionStatusEnum.CORRECT=cp.QuestionStatusEnum.CORRECT,this.QuestionStatusEnum.PARTIAL_CORRECT=cp.QuestionStatusEnum.PARTIAL_CORRECT),this.m_QuestionStatus=this.QuestionStatusEnum.INCOMPLETE,
this.StateEnum||(this.StateEnum={},this.StateEnum.INIT=0,this.StateEnum.PLAYING=1,this.StateEnum.PAUSED=2,this.StateEnum.ENDED=3),this.state=this.StateEnum.INIT,this.QuestionScoringTypeEnum||(this.QuestionScoringTypeEnum={},this.QuestionScoringTypeEnum.SURVEY=0,this.QuestionScoringTypeEnum.PRETEST=1,this.QuestionScoringTypeEnum.GRADED=2),this.m_scoringType=this.QuestionScoringTypeEnum.SURVEY,!0==this.getIsPretest()?this.m_scoringType=this.QuestionScoringTypeEnum.PRETEST:!0==this.getIsSurvey()?this.m_scoringType=
this.QuestionScoringTypeEnum.SURVEY:this.m_scoringType=this.QuestionScoringTypeEnum.GRADED,this.verbose=!1,this.shouldAddToTotal=!0,this.m_answersDisabled=this.m_isShuffled=!1,this.m_answerOrderArray=[],this.m_eachAnswerIsSeparateInteraction=this.m_isStarted=this.m_areButtonsDisabled=!1,this.m_reviewIconImage=null};
cp.Question.prototype={shouldDisableOptions:function(){var a=!1,c=this.m_quizController.GetIsInReviewMode()&&!this.getIsKnowledgeCheck(),a=this.m_quizController.GetIsSubmitAll()&&!this.getIsPretest(),a=!this.m_quizController.GetIsAttemptFinished()&&this.getWasJudged()&&!a;this.getIsPretest()&&this.m_quizController.GetIsPretestQuestionsDisabled()&&(a=!0);return this.m_answersDisabled=a||c},showCustomReviewArea:function(){return!1},getIsLastPretestQuestion:function(){if(!this.getIsPretest())return!1;
var a=this.m_slideIndex+1;return a>=cp.movie.stage.slides.length?!0:this.m_quizController?(a=this.m_quizController.GetQuestionsOnSlide(a))&&0<a.length?!a[0].getIsPretest():!0:!1},getAnswerOptions:function(){var a=[],c=this.questionData.ao;if(!c||0>=c.length)return"";for(var b=0;b<c.length;++b){var d=c[b].split(":");a.push(d[0])}return a},setShouldAddToTotal:function(a){this.shouldAddToTotal=a},setQuestionStatus:function(a){this.m_QuestionStatus=a},getQuestionStatus:function(){return this.m_QuestionStatus},
getQuestionScoringType:function(){return this.m_scoringType},getIsCorrect:function(){return this.getQuestionStatus()==this.QuestionStatusEnum.CORRECT},getIsPartiallyCorrect:function(){return this.getQuestionStatus()==this.QuestionStatusEnum.PARTIAL_CORRECT},getIsIncomplete:function(){return this.getQuestionStatus()==this.QuestionStatusEnum.INCOMPLETE},getIsIncorrect:function(){return this.getQuestionStatus()==this.QuestionStatusEnum.INCORRECT},registerSubmitButton:function(a,c){void 0===c&&(c=!1);
c||(this.submitButtonDivElement=a);this.m_areButtonsDisabled?this.disableButton(a):this.enableButton(a)},registerSubmitAllButton:function(a,c){void 0===c&&(c=!1);c||(this.submitAllButtonDivElement=a);this.m_areButtonsDisabled?this.disableButton(a):this.enableButton(a)},registerSkipButton:function(a,c){void 0===c&&(c=!1);c||(this.skipButtonDivElement=a);if(this.shouldDisableSkipButton())cp.disable(a.id),b=cp.D[a.id],b.shouldShowDisabledState=!0,a.disabled="disabled",a.tabIndex=-1,a.onclick="",cp.removeGestureEvent(a,
cp.GESTURE_EVENT_TYPES.TAP,null,!0),cp.ThreeDQuestionHelper&&cp.ThreeDQuestionHelper.deregisterEventHandlingDiv(a,"click"),a.style.cursor="default";else{cp.enable(a.id);var b=cp.D[a.id];b.shouldShowDisabledState=!1;a.disabled=!1;a.style.cursor="pointer";cp.registerGestureEvent(a,cp.GESTURE_EVENT_TYPES.TAP,cp.QuizButtonCH,null,!0);cp.ThreeDQuestionHelper&&cp.ThreeDQuestionHelper.registerEventHandlingDiv(a,"click")}},registerClearButton:function(a,c){void 0===c&&(c=!1);c||(this.clearButtonDivElement=
a);this.m_areButtonsDisabled?this.disableButton(a):this.enableButton(a)},registerBackButton:function(a,c){void 0===c&&(c=!1);c||(this.backButtonDivElement=a);this.enableButton(a)},registerReviewModeNextButton:function(a,c){void 0===c&&(c=!1);c||(this.reviewModeNextButtonDivElement=a);if(this.shouldDisableReviewModeNextButton())cp.disable(a.id),b=cp.D[a.id],b.shouldShowDisabledState=!0,a.disabled="disabled",a.tabIndex=-1,a.onclick="",cp.removeGestureEvent(a,cp.GESTURE_EVENT_TYPES.TAP,null,!0),cp.ThreeDQuestionHelper&&
cp.ThreeDQuestionHelper.deregisterEventHandlingDiv(a,"click"),a.style.cursor="default";else{cp.enable(a.id);var b=cp.D[a.id];b.shouldShowDisabledState=!1;a.disabled=!1;a.style.cursor="pointer";cp.registerGestureEvent(a,cp.GESTURE_EVENT_TYPES.TAP,cp.QuizButtonCH,null,!0);cp.ThreeDQuestionHelper&&cp.ThreeDQuestionHelper.registerEventHandlingDiv(a,"click")}},registerReviewModeBackButton:function(a,c){void 0===c&&(c=!1);c||(this.reviewModeBackButtonDivElement=a);this.enableButton(a)},shouldShowSuccessCaption:function(){return this.questionData.osct},
shouldShowPartialCorrectCaption:function(){return this.questionData.spcc},shouldShowFailureCaption:function(){return this.questionData.ofct},shouldShowIncompleteCaption:function(){return this.questionData.sic},shouldShowRetryCaption:function(){return this.questionData.sfrc},shouldShowTimeOutCaption:function(){return this.questionData.stfc},getSuccessCaptionName:function(){return this.questionData.osc},getSuccessFeedback:function(){var a={};a.name=this.getSuccessCaptionName();a.action=this.getSuccessAction();
a.captionToBeShown=this.shouldShowSuccessCaption();return a},getPartialCorrectCaptionName:function(){return this.questionData.opcc},getPartialCorrectFeedback:function(){var a={};a.name=this.getPartialCorrectCaptionName();a.action=this.getSuccessAction();a.captionToBeShown=this.shouldShowPartialCorrectCaption();return a},getRetryCaptionName:function(){return this.questionData.frc},getRetryFeedback:function(){var a={};a.name=this.getRetryCaptionName();a.action="";a.captionToBeShown=this.shouldShowRetryCaption();
return a},getFailureCaptionName:function(a){return this.incorrectFeedbackCaptions&&0==this.incorrectFeedbackCaptions.length||a>=this.incorrectFeedbackCaptions.length||0>a?void 0:this.incorrectFeedbackCaptions[a]},getFailureFeedback:function(a){var c={};c.name=this.getFailureCaptionName(a);this.currentAttempt>=this.numberOfAttempts?(cp.verbose&&cp.log("Last Attempt. Setting action now."),c.action=this.getFailureAction()):(cp.verbose&&cp.log("Current Attempt :"+this.currentAttempt),c.action="");c.captionToBeShown=
this.shouldShowFailureCaption();return c},getIncompleteCaptionName:function(){return this.questionData.oic},getIncompleteFeedback:function(){var a={};a.name=this.getIncompleteCaptionName();a.action="";a.captionToBeShown=this.shouldShowIncompleteCaption();return a},getTimeOutCaptionName:function(){return this.questionData.tfcn},getTimeOutFeedback:function(){var a={};a.name=this.getTimeOutCaptionName();a.action="cpCmndResume = 1;";a.captionToBeShown=this.shouldShowTimeOutCaption();return a},getSuccessAction:function(){return this.questionData.oca},
getFailureAction:function(){return this.questionData.ofa},getSlideIndex:function(){return this.m_slideIndex},resetQuestionData:function(){this.score=this.latency=0;this.wasJudged=!1;this.m_QuestionStatus=this.QuestionStatusEnum.INCOMPLETE;this.setCurrentAttempt(0);this.enableQuizButtons();this.m_answersDisabled=!1;this.m_questionScore&&this.m_questionScore.resetScore()},setActionToBeExecuted:function(a){this.actionToBeExecuted=a},getActionToBeExecuted:function(){return this.actionToBeExecuted},getName:function(){return this.questionObjName},
startLatency:function(){if(!this.getWasJudged()&&!this.m_quizController.GetIsInReviewMode()){this.latency=0;var a=this;this.latencyTimer=setInterval(function(){a.latencyTimer+=100},100);this.timeLimit&&0<this.timeLimit&&(this.timer=setTimeout(function(){a.verbose&&cp.log("Calling Timeout");a.disableAllOptions();a.stopLatencyTimer();a.autoJudge()},this.timeLimit))}},stopLatencyTimer:function(){this.timer&&(this.verbose&&cp.log("Clearing Timeout"),clearTimeout(this.timer));this.latencyTimer&&clearInterval(this.latencyTimer)},
getLatency:function(){return this.latency=void 0!=this.startTime&&0!=this.startTime&&void 0!=this.endTime&&0!=this.endTime?this.endTime.getTime()-this.startTime.getTime()-this.pausedMsecs:0},getAssociatedObjName:function(){return this.associatedObjName},getQuestionType:function(){return this.questionType=this.questionData.qtp},getAnswerGroupName:function(){return this.answerGroupName=this.questionData.gn},getQuestionText:function(){this.questionText=this.questionData.qt;if(cp.responsive){var a=cp.D[this.questionTextCanvasName];
if(a&&(a=cp.D[a.dn]))this.questionText=a.rpvt[cp.responsiveWidths[cp.responsiveWidths.length-1]].text}return this.questionText},getSelectedAnswerTextList:function(){return""},getExpectedCorrectAnswerTextList:function(){return""},getAnswerTexts:function(){var a={};a.learner_response=this.getSelectedAnswerTextList("-");a.correct_response=this.getExpectedCorrectAnswerTextList("-");return a},getDescriptionText:function(){var a={};a.questionText=this.getQuestionText();a.answerTexts=this.getAnswerTexts();
return a},getProgressString:function(a){this.progressString="";if(!this.m_quizController)return this.progressString;var c=this.getQuestionNumberInQuiz()+1,b=this.m_quizController.GetNumberOfQuestionsInQuiz(),d=0,e=0,f=cp.movie.questionObjs,h=0;f&&(h=f.length);for(var g=0;g<h;++g)f[g]&&f[g].getIsKnowledgeCheck()&&(d++,g<c&&e++);c-=e;b-=d;if(d=this.m_quizController.GetGraphManager())c=d.getQuestionSlideProgressNumber(this.m_slideIndex),b=d.getNumQuestions();if("NaN"==c)return this.progressString;d=
this.m_quizController.GetProgressType();(e=this.m_quizController.GetForceAbsoluteProgressType())&&(d=1);0==d?"NaN"==b&&(a=a.substr(0,a.indexOf("%d")+2)):e&&(a=a.substr(0,a.indexOf("%d")+2));return this.progressString=a.replace("%d",c).replace("%d",b)},getAnsweredCorrectly:function(){var a=this.getQuestionStatus();return a==this.QuestionStatusEnum.CORRECT||a==this.QuestionStatusEnum.PARTIAL_CORRECT?!0:!1},getIsTracked:function(){return this.isTracked=this.questionData.it},getIsSurvey:function(){return this.isSurvey=
this.questionData.is},getIsPretest:function(){return this.questionData.ipq},getIsKnowledgeCheck:function(){return this.questionData.ikc},getNumberOfAttempts:function(){return this.numberOfAttempts},getCurrentAttempt:function(){return this.currentAttempt},setCurrentAttempt:function(a){var c=this.m_quizController&&this.m_quizController.GetIsSubmitAll()&&!this.m_quizController.GetIsInReviewMode();this.m_questionScore&&(this.m_questionScore.m_numTries=a);this.currentAttempt=a;if(this.currentAttempt>=
this.numberOfAttempts&&!c&&(this.disableAllOptions(),this.submitButtonDivElement&&(this.submitButtonDivElement.enable=!1),this.clearButtonDivElement))this.clearButtonDivElement.enable=!1},getQuestionNumberInQuiz:function(){return this.questionNumberInQuiz=this.questionData.qnq},getObjectiveId:function(){return this.objectiveID=this.questionData.oid},getInteractionId:function(){this.interactionID=this.questionData.iid;var a=this.m_quizController.GetPlaybackController(),c=a.GetLMSType();c&&(c=c.toUpperCase());
if(!a.IsRunningInConnect()&&("SCORM12"==c||"AICC"==c))a=this.getQuestionText(),this.interactionID=this.interactionID+"_"+a;return this.interactionID},getWeighting:function(){return this.weighting=this.questionData.w},getNegativeWeight:function(){return this.questionData.nw},getInteractionType:function(){return this.interactionType=this.questionData.itp},getScore:function(){return this.score},setScore:function(a){this.score=this.shouldAddToTotal?a:0},getSelectedAnswerChoices:function(){return this.getSelectedAnswersAsString()},
getSelectedAnswersAsString:function(){var a="";if(!this.m_selectedAnswersArr||0>=this.m_selectedAnswersArr.length)return a;for(var a=a+this.m_selectedAnswersArr[0],c=1;c<this.m_selectedAnswersArr.length;++c)a+=";",a+=this.m_selectedAnswersArr[c];return a},setSelectedAnswers:function(a){this.m_selectedAnswersArr=[];this.m_selectedAnswersArr.push(a)},getAnswerOrder:function(){if(!this.answerOptions||0>=this.answerOptions.length)return"";for(var a="",a=this.answerOptions[0],c=1;c<this.answerOptions.length;++c)a+=
";",a+=this.answerOptions[c];return a},setAnswerOrder:function(a){a&&!(0>=a.length)&&(this.answerOptions=a.split(";"),this.m_answerOrderArray=this.answerOptions.slice(0))},getAnswerID:function(a){a=cp(cp.D[a.parentNode.parentNode.id].answerTextCanvasHolder).firstChild;return cp.D[a.id].aid},getExpectedCorrectAnswerIDList:function(){return this.questionData.cal},getQuestionLevelScoredPoints:function(){var a=0;return a=this.getAnsweredCorrectly()?this.getWeighting():this.getNegativeWeight()},getQuestionScoredPoints:function(){return this.getIsSurvey()||
!this.wasJudged?0:this.getQuestionLevelScoredPoints()},getChosenAnswerFeedback:function(){},getFeedbackToShow:function(a,c){var b={},b=this.getChosenAnswerFeedback();if(c&&this.shouldShowTimeOutCaption())return b=this.getTimeOutFeedback();if(this.getIsIncomplete()&&!a&&this.shouldShowIncompleteCaption())return b=this.getIncompleteFeedback();if(b)return b;this.getAnsweredCorrectly()?b=this.getIsPartiallyCorrect()?this.getPartialCorrectFeedback():this.getSuccessFeedback():this.shouldShowRetryCaption()&&
this.currentAttempt<this.numberOfAttempts?b=this.getRetryFeedback():this.getIsIncomplete()&&a||this.currentAttempt>=this.numberOfAttempts?(b=0,this.incorrectFeedbackCaptions&&(b=this.incorrectFeedbackCaptions.length-1),b=this.getFailureFeedback(b)):b=this.currentAttempt<=this.incorrectFeedbackCaptions.length?this.getFailureFeedback(this.currentAttempt-1):void 0;return b},hideLastFeedback:function(){this.lastFeedbackShown&&cp.hide(this.lastFeedbackShown.name);this.lastFeedbackShown=void 0},saveAnswerOrder:function(){},
pauseQuestion:function(){if(this.state==this.StateEnum.PLAYING){this.state=this.StateEnum.PAUSED;this.stopLatencyTimer();var a=new Date;this.timeBeforePause=this.startTime.getMilliseconds()-a.getMilliseconds();this.pausedMsecs+=this.timeBeforePause;this.timeLimit-=this.timeBeforePause;this.timeBeforePause=0}},resumeQuestion:function(){this.state==this.StateEnum.PAUSED&&(this.state=this.StateEnum.PLAYING,!this.m_quizController.GetIsInReviewMode()&&0<this.timeLimit&&this.startLatency())},endQuestion:function(a){this.verbose&&
cp.log("End Question Called");if(this.state==this.StateEnum.PLAYING||this.state==this.StateEnum.PAUSED){this.state=this.StateEnum.ENDED;this.stopLatencyTimer();var c=this.m_quizController&&this.m_quizController.GetIsSubmitAll()&&!this.getIsPretest(),b=this.m_quizController&&this.m_quizController.GetIsInReviewMode();c&&!b&&this.checkAndSetQuestionStatus();b||this.saveAnswerOrder();var d=this.getAnsweredCorrectly();this.endTime=new Date;this.m_questionScore.m_endTime=this.endTime;this.m_questionScore.m_answerScores=
this.getAnswerScores();var e=this.getIsIncomplete();this.m_questionScore.m_answersIncomplete=a||b||this.m_answersDisabled||c?e:!0;this.m_questionScore.m_answeredCorrectly=this.getAnsweredCorrectly();this.m_questionScore.m_isShuffled=this.m_isShuffled;this.m_questionScore.m_partiallyCorrect=this.getIsPartiallyCorrect();a?(this.wasJudged=this.m_questionScore.m_wasJudged=a,this.disableAllOptions(),this.disableQuizButtons(),this.setHandledClick(!0),this.stopLatencyTimer(),b=this.getQuestionScoredPoints(),
this.setScore(b),this.m_questionScore.m_scoredPoints=this.getScore(),this.getIsPretest()||(d?this.m_quizController&&cp._cpQuizScopeSlide(this.m_quizController.GetNextQuestionSlideNumber()):cp._cpQuizScopeSlide(cpInfoCurrentSlideIndex))):(!this.getIsPretest()&&!this.getIsKnowledgeCheck()&&cp._cpQuizScopeSlide(cpInfoCurrentSlideIndex),c?(this.m_questionScore.m_wasJudged=!e,this.setCurrentAttempt(1),this.wasJudged=!this.getIsIncomplete(),b=this.getQuestionScoredPoints(),this.setScore(b),this.m_questionScore.m_scoredPoints=
this.getScore()):this.getWasJudged()||(this.wasJudged=this.m_questionScore.m_wasJudged=!1,this.setScore(0),this.m_questionScore.m_scoredPoints=0));cp.ThreeDQuestionHelper&&(a&&(b=!0,this.m_quizController.GetIsInReviewMode()&&(b=cp.ThreeDQuestionHelper.isActiveQuestionKC()),cp.ThreeDQuestionHelper.setActiveQSlideIndex(this.m_quizController.GetNextQuestionSlideNumber(b))),cp.ThreeDQuestionHelper.disable360QuizModeIfValid());d&&(c||this.disableAllOptions(),this.getIsPretest()&&(cpQuizInfoPreTestTotalCorrectAnswers+=
1),cpQuizInfoTotalCorrectAnswers+=1);cpQuizInfoAnswerChoice=this.getSelectedAnswerChoices();this.getIsSurvey()?cpQuizInfoLastSlidePointScored=0:(cpQuizInfoNoQuestionsPerQuiz+=1,cpQuizInfoLastSlidePointScored=this.getQuestionScoredPoints());d=this.getDescriptionText();a&&(this.getIsTracked()&&!this.m_quizController.GetIsInReviewMode())&&(this.m_eachAnswerIsSeparateInteraction?this.shouldReportAnswers&&this.sendInteractionDataForEachAnswer&&this.sendInteractionDataForEachAnswer(d):this.shouldReportAnswers&&
this.m_quizController.SendInteractionData(this.getQuestionScore(),d),a=this.m_quizController.GetScore(),d=this.m_quizController.GetMaxScore(),b=this.m_quizController.GetMinScore(),cp.em.fireEvent("SCORE",{score:a,maxScore:d,minScore:b,quizId:cp.D.quizzingData.quizID}));a=this.m_quizController.GetPlaybackController();cp.m_isLMSPreview&&void 0!=cp.LMSDriverHolder&&cp.toggleLMSPreviewDebugLogsColor(cp.LMSDriverHolder);d=a.GetSendCourseDataWithInteractionData();this.wasJudged&&(d&&!c)&&((c=a.GetLMSType())&&
c.toUpperCase(),a.GetIsTracked(),a.SendCourseData(!1))}},autoJudge:function(){this.verbose&&cp.log("inside autojudge");this.setCurrentAttempt(this.numberOfAttempts-1);this.judge(!0,!0)},checkAndSetQuestionStatus:function(){},judge:function(a,c){this.verbose&&cp.log("inside judge");this.saveAnswerOrder();this.hideLastFeedback(!1);var b=this.shouldShowIncompleteCaption(),d=this.getIsSurvey(),e;this.checkAndSetQuestionStatus();d?(this.verbose&&cp.log("inside judge : isSurvey"),this.getIsIncomplete()?
(this.verbose&&cp.log("inside judge : incomplete"),e=this.getFeedbackToShow(a,c)):(this.setCurrentAttempt(this.currentAttempt+1),this.endQuestion(!0),e=this.getFeedbackToShow(a,!1))):this.currentAttempt<this.numberOfAttempts&&(this.getIsIncomplete()&&!a&&b?e=this.getFeedbackToShow(a,c):(this.setCurrentAttempt(this.currentAttempt+1),e=this.getFeedbackToShow(a,c),this.currentAttempt>=this.numberOfAttempts||this.getAnsweredCorrectly()?this.endQuestion(!0):(this.getIsIncorrect()&&this.setQuestionStatus(this.QuestionStatusEnum.INCOMPLETE),
b=this.m_quizController.GetPlaybackController(),b.GetSendCourseDataWithInteractionData()&&((d=b.GetLMSType())&&(d=d.toUpperCase()),b.GetIsTracked()&&"EMAIL"!=d&&"ACROBAT"!=d&&"INTERNALSERVER"!=d&&"AICC"!=d?b.SendCourseData(!0):b.SendCourseData(!1)))));if(e&&(cp.D[e.name]&&e.captionToBeShown?this.showFeedbackCaptionAndDoAction(e):cp.movie.executeAction(e.action),this.m_quizController&&this.getIsLastPretestQuestion()&&(this.currentAttempt>=this.numberOfAttempts||this.getAnsweredCorrectly())))this.m_quizController.m_PretestQuestionsDisabled=
!0;e=this.getQuestionEventData();cp.em.fireEvent("CPQuestionSubmit",e)},getQuestionEventData:function(){var a={};switch(this.getQuestionScoringType()){case this.QuestionScoringTypeEnum.GRADED:a.Name="GradedQuestion";break;case this.QuestionScoringTypeEnum.SURVEY:a.Name="SurveyQuestion";break;case this.QuestionScoringTypeEnum.PRETEST:a.Name="PretestQuestion";break;default:a.Name="GradedQuestion"}var c=this.getInteractionType(),b=this.getDescriptionText(),d=this.getCorrectAnswerAsString(),e=this.getChosenAnswerAsString();
switch(c){case "sequencing":d=b.answerTexts.correct_response.split("-").join(",");e=b.answerTexts.learner_response.split("-").join(",");break;case "likert":d=e=b.answerTexts.learner_response}a={questionType:"hotspot"==c?"hot-spot":c,objectiveID:this.getObjectiveId(),questionScoringType:a,questionMaxScore:this.getWeighting(),correctAnswer:String(d),questionMaxAttempts:this.numberOfAttempts,selectedAnswer:String(e),slideNumber:this.m_slideIndex,quizName:"QuizName",interactionID:this.getInteractionId(),
questionAttempts:this.currentAttempt,questionNumber:this.getQuestionNumberInQuiz(),questionAnswered:!1==this.getIsIncomplete(),questionScore:this.getScore(),reportAnswers:this.shouldReportAnswers,questionAnsweredCorrectly:this.getAnsweredCorrectly(),infiniteAttempts:9999==this.numberOfAttempts,interactionType:this.getInteractionType(),weighting:this.getWeighting()};cp.IsRunningInACAP&&(a.descriptionData=b);return a},showFeedbackCaptionAndDoAction:function(a){function c(){b.parentNode.removeChild(b);
cp.hide(d);h.setHandledClick(f);cp.movie.executeAction(a.action);cp.ThreeDQuestionHelper&&cp.ThreeDQuestionHelper.renderQuestionSlide()}var b,d=a.name,e=cp.D[d].mdi;this.hideLastFeedback(!0);var f;this.slide&&(f=cp.D[this.slide].handled);this.setHandledClick(!1);this.lastFeedbackShown=a;var h=this,g=document.getElementById(d);cp.moveDivElemToTop(g);e=document.getElementById(e);void 0!=e&&cp.moveRewrapElemToTop(e.parentNode);e=cp.D[d];g=e.sc;g=new cp.Shortcut(g.k,g.c?!0:!1,g.s?!0:!1,g.a?!0:!1);if(e=
new cp.KeyHandler(function(a){a&&c()},g,e.from,e.to,""))cp.movie.stage.removeKeyHandler(e),cp.movie.stage.addKeyHandler(e);cp.show(d,{forceHideTextScalingIcon:!0});e=cp.movie.stage.getSlideDiv();b=cp.newElem("div");cp.fixWebkitScaling(b);b.id="feedbackClickDiv";b.style.left="0px";b.style.top="0px";b.style.width="100%";b.style.height="100%";b.style.cursor="pointer";cp.MSIE!=cp.browser?(b.style.backgroundColor="#FFFFFF",b.style.opacity=0):b.style.backgroundColor="rgba(255,255,255,0)";b.style.display=
"block";b.style.position="absolute";b.style.WebkitTapHighlightColor="rgba(0,0,0,0)";e.parentNode.appendChild(b);cp.clearGestureCache(b);cp.registerGestureEvent(b,cp.GESTURE_EVENT_TYPES.TAP,c);cp.registerGestureEvent(b,cp.GESTURE_EVENT_TYPES.DRAG_START,cp.m_gestureHandler.ondragstarthandler);cp.registerGestureEvent(b,cp.GESTURE_EVENT_TYPES.DRAG,cp.m_gestureHandler.ondraghandler);cp.registerGestureEvent(b,cp.GESTURE_EVENT_TYPES.DRAG_END,cp.m_gestureHandler.ondragendhandler);b.style.zIndex=1E4},clearButtonClickHandler:function(){this.clearAnswers()},
reviewmodemoveForward:function(){if(this.reviewModeNextButtonDivElement&&!this.reviewModeNextButtonDivElement.disabled&&this.m_quizController){if(!1==this.m_quizController.GetIsInReviewMode()&&(this.getIsPretest()||!this.m_quizController||!this.m_quizController.GetIsSubmitAll())){var a=this.getQuestionEventData();cp.em.fireEvent("CPQuestionSkip",a)}a=this.m_quizController&&this.m_quizController.GetIsSubmitAll();!this.getWasJudged()&&!a&&this.clearAnswers();if(cpInfoCurrentSlideIndex==cpInfoSlideCount)cpCmndResume=
!0;else if(this.getIsLastPretestQuestion())this.m_quizController&&this.m_quizController.ExecutePretestAction(this.getSlideIndex());else{a=-1;if(this.m_quizController){var c=this.m_quizController.GetGraphManager();if(c&&(a=this.m_quizController.GetNextQuestionSlideNumber(),-1==a))for(var c=c.GetPrevBranch(),b=cpInfoCurrentSlideIndex,d=0;d<c.length;++d){var e=c[d],f="",h=this.m_quizController.GetQuestionsOnSlide(e);if(h&&0<h.length){var g=!1;(h=h[0])&&h.getIsKnowledgeCheck()&&(g=!0);g||(f="Question")}else this.m_quizController.GetAnyScoreSlideIndex()==
e&&(f="AnyScoreSlide");if(("AnyScoreSlide"==f||"Question"==f)&&e>b){a=e;break}}}-1==a?cpCmndNextOnReview=!0:cpCmndGotoSlideAndResume=a}}},moveForward:function(){if(this.skipButtonDivElement&&!this.skipButtonDivElement.disabled&&this.m_quizController){var a=this.m_quizController.GetIsInReviewMode();if(!1==a&&(this.getIsPretest()||!this.m_quizController||!this.m_quizController.GetIsSubmitAll())){var c=this.getQuestionEventData();cp.em.fireEvent("CPQuestionSkip",c)}c=this.m_quizController&&this.m_quizController.GetIsSubmitAll();
!this.getWasJudged()&&!c&&this.clearAnswers();if(cpInfoCurrentSlideIndex==cpInfoSlideCount||cp.movie.stage.hasOverlaySlide())cp.ThreeDQuestionHelper&&cp.ThreeDQuestionHelper.isIn360QuizMode()&&cp.ThreeDQuestionHelper.setActiveQSlideIndex(cp.ThreeDQuestionHelper.getActiveQSlideIndex()+1),cpCmndResume=!0;else if(this.getIsLastPretestQuestion())this.m_quizController&&this.m_quizController.ExecutePretestAction(this.getSlideIndex());else{if((a=!1==a&&!(this.getIsPretest()||c))&&this.m_quizController)if(a=
this.m_quizController.GetGraphManager(),void 0!=a){c=a.getNextSlideList(this.getSlideIndex());if(1==c.length)cpCmndGotoSlideAndResume=c[0];else for(var c=a.getBranchHistory(),b=c.length-1;0<=b;--b){var d=c[b];if(d==this.getSlideIndex()&&b!=c.length-1){var e=c[b+1];if(a.getIsJumpValid(d,e)){cpCmndGotoSlideAndResume=e;break}}}return}cpCmndNextOnReview=!0}}},moveBackward:function(){if(this.backButtonDivElement&&!this.backButtonDivElement.disabled&&this.m_quizController)if(!this.getWasJudged()&&!c&&this.clearAnswers(),
cp.movie.stage.hasOverlaySlide()&&cp.ThreeDQuestionHelper&&cp.ThreeDQuestionHelper.isIn360QuizMode()&&0<cp.ThreeDQuestionHelper.getActiveQSlideIndex())cpCmndGotoSlideAndResume=cp.ThreeDQuestionHelper.getActiveQSlideIndex()-1;else{var a=this.m_quizController.GetIsInReviewMode(),c=this.m_quizController&&this.m_quizController.GetIsSubmitAll();if(!1==a&&this.m_quizController&&(a=this.m_quizController.GetGraphManager(),void 0!=a)){for(var b=a.getBranchHistory(),d=b.length-1;0<=d;--d){var e=b[d];if(e==
this.getSlideIndex()&&0!=d){var f=b[d-1];if(a.getIsJumpValid(f,e)){!this.getWasJudged()&&!c&&this.clearAnswers();cpCmndGotoSlideAndResume=f;break}}}return}cpCmndPreviousOnReview=!0}},reviewmodemoveBackward:function(){if(this.reviewModeBackButtonDivElement&&!this.reviewModeBackButtonDivElement.disabled&&this.m_quizController){this.m_quizController.GetIsInReviewMode();var a=this.m_quizController&&this.m_quizController.GetIsSubmitAll();!this.getWasJudged()&&!a&&this.clearAnswers();cpCmndPreviousOnReview=
!0}},skipButtonClickHandler:function(a){cp.D[a.id]&&this.moveForward()},backButtonClickHandler:function(a){cp.D[a.id]&&this.moveBackward()},reviewModeNextButtonClickHandler:function(a){cp.D[a.id]&&this.reviewmodemoveForward()},reviewModeBackButtonClickHandler:function(a){cp.D[a.id]&&this.reviewmodemoveBackward()},clearAnswers:function(){},disableAllOptions:function(){},getIsStarted:function(){return this.m_isStarted},startQuestion:function(){if(this.m_quizController){void 0==this.m_questionScore&&
(this.m_questionScore=new cp.QuestionScore);var a=this.m_quizController.GetIsInReviewMode(),c=this.m_quizController.GetGoToQuizScopeActionExecuted();if(c&&!a||this.getIsKnowledgeCheck())this.getIsPretest()||this.resetQuestionData(),this.m_quizController.SetGoToQuizScopeActionExecuted(!1);this.verbose&&cp.log("current state : "+this.state);if(this.state==this.StateEnum.INIT||this.state==this.StateEnum.ENDED){this.verbose&&cp.log("startQuestion");this.state=this.StateEnum.PLAYING;this.updateQuizProgressIndicator();
if((a||this.getWasJudged())&&!this.getIsKnowledgeCheck()){var b=c&&!this.getIsPretest()&&!this.getIsKnowledgeCheck();if(a||!b)this.disableAllOptions(),this.disableQuizButtons();a&&this.canShowReviewIcons()&&this.markQuestionFeedback()}else this.startLatency(),this.startTime=new Date,0==this.m_questionScore.m_numTries&&(this.m_questionScore.m_startTime=this.startTime);a=this.m_quizController.GetIsSubmitAll()&&!this.getIsPretest();if(0==this.getCurrentAttempt()&&!a||this.getIsIncomplete())if(this.getCurrentAttempt()<
this.getNumberOfAttempts()&&(!this.m_quizController.GetIsPretestQuestionsDisabled()||!this.getIsPretest()))c||this.clearAnswers();cpQuizInfoPointsPerQuestionSlide=this.getWeighting();cpQuizInfoNegativePointsOnCurrentQuestionSlide=this.getNegativeWeight();cpQuizInfoQuestionPartialScoreOn=this.isPartialScore;void 0!=this.timeLimit&&(cpQuizInfoQuestionSlideTiming=this.timeLimit/1E3);cpQuizInfoAnswerChoice="";cpQuizInfoQuestionSlideType=this.getInteractionType();cpQuizInfoMaxAttemptsOnCurrentQuestion=
this.numberOfAttempts;c=this.m_quizController.GetPassingScore();a=this.m_quizController.GetMaxScore();cpQuizInfoQuizPassPoints=c;0!=a&&(cpQuizInfoQuizPassPercent=parseInt(100*c/a))}this.m_isStarted=!0}},markQuestionFeedback:function(){if(this.getWasJudged()&&this.questionTextCanvasName){var a=cp.D[this.questionTextCanvasName],c="re-"+this.questionTextCanvasName,b=cp.newElem("img");cp.fixWebkitScaling(b);var d=this.getQuestionStatus();d==this.QuestionStatusEnum.CORRECT?(b.src=cp.movie.im.m_projectImages["assets/htmlimages/correct_question_normal.png"].nativeImage.src,
b.setAttribute("tabIndex","-1"),void 0!=this.m_correctFeedbackText&&(b.setAttribute("aria-label",this.m_correctFeedbackText),cp.removeAccessibilityOutline(b),b.setAttribute("role","img"))):d==this.QuestionStatusEnum.PARTIAL_CORRECT?(b.src=cp.movie.im.m_projectImages["assets/htmlimages/partial_correct_question_normal.png"].nativeImage.src,b.setAttribute("tabIndex","-1"),void 0!=this.m_partialCorrectFeedbackText&&(b.setAttribute("aria-label",this.m_partialCorrectFeedbackText),cp.removeAccessibilityOutline(b),
b.setAttribute("role","img"))):(b.src=cp.movie.im.m_projectImages["assets/htmlimages/incorrect_question_normal.png"].nativeImage.src,void 0!=this.m_incorrectDisplayChosenText&&(void 0!=this.m_incorrectDisplayCorrectText&&"Hotspot"!=this.getQuestionType())&&(d="".concat(this.m_incorrectDisplayChosenText," ",this.getChosenAnswerAsStringForReview()," ",this.m_incorrectDisplayCorrectText," ",this.getCorrectAnswerAsStringForReview()),b.setAttribute("tabIndex","-1"),b.setAttribute("aria-label",d),cp.removeAccessibilityOutline(b),
b.setAttribute("role","img")));a.sh&&(d=a.sh.a,cp.applyShadow(b,a.sh.d*Math.cos(Math.PI*d/180)+"px "+a.sh.d*Math.sin(Math.PI*d/180)+"px "+a.sh.b+"px "+cp.ConvertRGBToRGBA(a.sh.c,a.sh.o)+(a.sh.i?" inset":"")));b.style.left="-30px";b.style.top="0px";b.style.position="absolute";(a=document.getElementById(c))?(a.appendChild(b),this.m_reviewIconImage=b):console.error("currDiv is null")}},getWasJudged:function(){return this.wasJudged},setHandledClick:function(a){this.slide&&(cp.D[this.slide].handled=a)},
enableButton:function(a){void 0!=a&&(cp.enable(a.id),a.disabled=!1,a.style.cursor="pointer",cp.registerGestureEvent(a,cp.GESTURE_EVENT_TYPES.TAP,cp.QuizButtonCH,null,!0),cp.ThreeDQuestionHelper&&cp.ThreeDQuestionHelper.registerEventHandlingDiv(a,"click"))},enableQuizButtons:function(){this.verbose&&cp.log("Enabling buttons");this.enableButton(this.submitButtonDivElement);this.enableButton(this.clearButtonDivElement);this.enableButton(this.submitAllButtonDivElement);this.m_areButtonsDisabled=!1},disableButton:function(a){void 0!=
a&&(cp.disable(a.id),a.disabled="disabled",a.style.cursor="default",a.onclick="",cp.removeGestureEvent(a,cp.GESTURE_EVENT_TYPES.TAP,null,!0),cp.ThreeDQuestionHelper&&cp.ThreeDQuestionHelper.deregisterEventHandlingDiv(a,"click"))},disableQuizButtons:function(){this.verbose&&cp.log("Disabling buttons");if(this.m_quizController){var a=!0;this.m_quizController.GetIsSubmitAll()&&!this.getIsPretest()&&(!this.m_quizController.GetIsInReviewMode()&&!this.m_quizController.m_submittedAllQuestions)&&(a=!1);a&&
(this.disableButton(this.submitButtonDivElement),this.disableButton(this.clearButtonDivElement),this.disableButton(this.submitAllButtonDivElement),this.m_areButtonsDisabled=!0)}},shouldDisableSkipButton:function(){var a=!1;if(this.m_quizController.GetIsInReviewMode())return!1;var c=this.m_quizController.GetIsSubmitAll();if("mustAnswer"==this.m_quizController.GetQuestionAdvanceType()&&!c&&!this.m_answersDisabled&&!this.getIsPretest()&&!this.getIsKnowledgeCheck())return!0;var b=this.getSlideIndex();
if(0<=b&&(!this.getIsPretest()&&!c)&&(c=this.m_quizController.GetGraphManager(),void 0!=c)){var d=c.getNextSlideList(b);if(void 0!=d)if(1==d.length)a=!1;else if(a=!0,d=c.getBranchHistory(),void 0!=d)for(var e=d.length-1;0<=e;--e){var f=d[e];if(f==b&&e!=d.length-1&&c.getIsJumpValid(f,d[e+1])){a=!1;break}}}return a},shouldDisableReviewModeNextButton:function(){return this.m_quizController.GetIsInReviewMode()?!1:!0},canShowReviewIcons:function(){return this.getIsSurvey()||this.getIsIncomplete()||!this.m_quizController||
!this.m_quizController.GetIsInReviewMode()||this.getIsPretest()||this.getIsKnowledgeCheck()?!1:!0},getIsAttempted:function(){return 0<this.currentAttempt},resumeSelectedAnswers:function(a){if(void 0!=a){this.m_selectedAnswersArr=[];for(var c=0;c<a.length;++c)"1"==a[c].m_chosenAnswer&&this.m_selectedAnswersArr.push(a[c].m_answerID)}},getChosenAnswerAsString:function(){return this.getSelectedAnswersAsString()},getCorrectAnswerAsString:function(){var a=this.getExpectedCorrectAnswerIDList();if(0>=a.length)return"0";
for(var c=a[0],b=1;b<a.length;++b)c+=";"+a[b];return c},getChosenAnswerAsStringForReview:function(){return""},getCorrectAnswerAsStringForReview:function(){return""},getAnswerScores:function(){var a=[];if(!this.answerOptions)return a;for(var c=this.m_selectedAnswersArr.slice(0),b={},d=0;d<c.length;++d)b[c[d]]=c[d];for(c=0;c<this.answerOptions.length;++c)if(d=cp.D[this.answerOptions[c]]){var e=new cp.AnswerScore;e.m_answerID=d.aid;e.m_correctAnswer=d.ic?"1":"0";e.m_chosenAnswer=b[e.m_answerID]?"1":
"0";a.push(e)}return a},getQuestionScore:function(){if(this.m_questionScore){this.m_questionScore.m_isPretestQuestion=this.getIsPretest();this.m_questionScore.m_isKnowledgeCheck=this.getIsKnowledgeCheck();this.m_questionScore.m_slideNum=this.m_slideIndex;this.m_questionScore.m_questionNumInQuiz=this.getQuestionNumberInQuiz();this.getQuestionStatus();this.m_questionScore.m_numTries=this.getCurrentAttempt();this.m_questionScore.setinteractionType(this.getInteractionType());this.setQuestionSpecificScoreProperties(this.m_questionScore.m_questionSpecificScore);
this.m_questionScore.m_interactionID=this.getInteractionId();this.m_questionScore.m_objectiveID=this.getObjectiveId();this.m_questionScore.m_chosenAnswersAsString=this.getChosenAnswerAsString();this.m_questionScore.m_isCorrectAsString=this.getAnsweredCorrectly()?"C":"W";this.m_questionScore.m_correctAnswersAsString=this.getCorrectAnswerAsString();this.m_questionScore.m_scoringType=this.getQuestionScoringType();this.m_questionScore.m_maxTries=this.numberOfAttempts;var a=this.getDescriptionText();this.m_questionScore.m_descriptionTexts=
a;this.m_questionScore.m_weighting=this.getWeighting();this.m_questionScore.m_scoredPoints=this.getScore();this.m_questionScore.m_negativeWeight=this.getNegativeWeight();addLeadingZero=function(a){return 10>a?"0"+a:a};a=this.getLatency();this.m_questionScore.m_latencyAsSeconds=a;this.m_questionScore.m_latencyAsString=addLeadingZero(Math.round(a/3600))+":"+addLeadingZero(Math.round(a%3600/60))+":"+addLeadingZero(Math.round(a)%60);a=new Date;this.m_questionScore.m_curDateAsString=addLeadingZero(a.getMonth()+
1)+"/"+addLeadingZero(a.getDate())+"/"+a.getFullYear();this.m_questionScore.m_curDateAsString2=a.getFullYear()+"/"+addLeadingZero(a.getMonth()+1)+"/"+addLeadingZero(a.getDate());this.m_questionScore.m_curTimeAsSecondsSinceMidnight=3600*a.getHours()+60*a.getMinutes()+a.getSeconds();return this.m_questionScore}},getSlide:function(){return this.slide},updateQuizProgressIndicator:function(){if(this.m_quizController&&!(0>=this.m_quizController.GetQuestionsOnSlide(this.m_slideIndex).length)&&this.state==
this.StateEnum.PLAYING){var a=this.m_quizController.GetGraphManager();a&&(!this.getIsPretest()&&!this.getIsKnowledgeCheck())&&(a.setQuestionSlideProgressNumber(this.m_slideIndex),this.m_quizController.GetFirstNonPretestQuestionEncountered()||(this.m_quizController.SetFirstNonPretestQuestionEncountered(!0),0>=a.getCompletionBranch().length&&this.m_quizController.SetForceAbsoluteProgressType(!0)))}},setQuestionSpecificScoreProperties:function(a){if(void 0!=a){var c="",b=this.questionData.ao,d=this.m_answerOrderArray;
if(d&&b&&0<d.length&&d.length==b.length){for(var e={},f=0;f<b.length;++f){var h=b[f].split(":");e[h[0]]=h[1]}b=d[0];c+=e[b];for(f=1;f<d.length;++f)b=d[f],c+=";"+e[b]}a.m_answerOrderArrayAsString=c}},restoreFromQuestionSpecificScoreProperties:function(a){if(void 0!=a&&(a=a.m_answerOrderArrayAsString,!(void 0==a||""==a))){var a=a.split(";"),c=this.questionData.ao,b=this.answerOptions;if(b&&c&&!(0>=b.length||b.length!=c.length||b.length!=a.length)){for(var b={},d=0;d<c.length;++d){var e=c[d].split(":");
b[e[1]]=e[0]}d=a[0];c=""+b[d];for(e=1;e<a.length;++e)d=a[e],c+=";"+b[d];this.setAnswerOrder(c)}}}};
var RADIO_TAB_INDEX=2400;
cp.MCQInput=function(a,c){cp.MCQInput.baseConstructor.call(this,a);this.isSingleChoice="radio"==this.type;if(cp.responsive){var b=cp.D[cp.D[this.element.id].ahn];this.responsiveCSS=b?b.css:this.getAttribute("css")}this.isCorrect=this.getAttribute("ic");this.tabIndex=-1;this.accessibilityText=this.getAttribute("ad");this.canvasDivName=this.getAttribute("cn");this.value="enabled";this.checked="unchecked";b=this.getAttribute("b");this.bounds={minX:b[0],minY:b[1],maxX:b[2],maxY:b[3]};b=this.getAttribute("vb");
this.vbounds={minX:b[0],minY:b[1],maxX:b[2],maxY:b[3]};this.answerHolderLeft=this.getAttribute("ahl");this.answerHolderTop=this.getAttribute("aht");this.sh=this.getAttribute("sh");this.args=c};cp.inherits(cp.MCQInput,cp.Answer);cp.MCQInput.prototype.start=function(a){this.addIfNeeded();if(!this.effectIsStarted||a)this.updateEffects(this.hasEffect),this.effectIsStarted=!0};
cp.MCQInput.prototype.reset=function(){delete cp.ropMap[this.element.id];this.isDrawn=!1;this.element.width="0";this.element.height="0";this.element.style.width="0px";this.element.style.height="0px";this.element.left="0";this.element.top="0";this.element.style.left="0px";this.element.style.top="0px"};
cp.MCQInput.prototype.disableOption=function(){if("disabled"!=this.value&&(this.element.style.cursor="default",this.value="disabled",this.inputControl.disabled="disabled",this.inputControl.style.cursor="default",this.inputControl.parentNode.style.cursor="default",this.inputControl.parentNode.parentNode.style.cursor="default","checked"==this.checked||this.inputControl.checked?this.loadAndDrawImage(this.m_questionObj.getImageForState(this.type,"selectedDisabled")):this.loadAndDrawImage(this.m_questionObj.getImageForState(this.type,
"disabled")),this.m_questionObj.getWasJudged()&&this.m_questionObj.canShowReviewIcons())){if(!this.reviewIconImage){this.reviewIconImage=cp.newElem("img");this.reviewIconImage.tabIndex=-1;this.reviewIconImage.style.position="absolute";this.reviewIconImage.style.zIndex=this.zIndex;if(this.sh){var a=this.sh.a;cp.applyShadow(this.reviewIconImage,this.sh.d*Math.cos(Math.PI*a/180)+"px "+this.sh.d*Math.sin(Math.PI*a/180)+"px "+this.sh.b+"px "+cp.ConvertRGBToRGBA(this.sh.c,this.sh.o)+(this.sh.i?" inset":
""))}this.isCorrect?(this.reviewIconImage.src=this.isSingleChoice?cp.movie.im.m_projectImages["assets/htmlimages/correct_answer_normal.png"].nativeImage.src:"checked"==this.checked?cp.movie.im.m_projectImages["assets/htmlimages/correct_answer_normal.png"].nativeImage.src:cp.movie.im.m_projectImages["assets/htmlimages/skip_answer_normal.png"].nativeImage.src,this.element.parentNode.appendChild(this.reviewIconImage)):this.m_questionObj.getWasJudged()&&"checked"==this.checked?(this.reviewIconImage.src=
cp.movie.im.m_projectImages["assets/htmlimages/incorrect_answer_normal.png"].nativeImage.src,this.element.parentNode.appendChild(this.reviewIconImage)):this.reviewIconImage=void 0}if(this.reviewIconImage){var a=this.inputControlCanvasElement.parentElement.getBoundingClientRect(),c=cp("div_Slide").getBoundingClientRect();cp.responsive?(this.element.parentElement.getBoundingClientRect(),this.element.getBoundingClientRect(),this.reviewIconImage.style.left=parseFloat(this.inputControl.style.left)-20+
"px",this.reviewIconImage.style.top=this.inputControl.style.top):(this.reviewIconImage.style.left=parseFloat(this.element.style.left)-20+"px",this.reviewIconImage.style.top=(a.top-c.top)/cp.movie.m_scaleFactor+"px")}}};
cp.MCQInput.prototype.loadAndDrawImage=function(a){var c=this.sh&&!this.sh.i,b=cp.movie.im.m_projectImages[a].nativeImage;null==this.loadedBtnImages&&(this.loadedBtnImages={});this.loadedBtnImages[a]=b;this.inputControlCanvasElement.img=a;cp.clearCanvasProperly(this.canvas);b=this.canvas.gc;if(!cp.responsive){var d=0<this.vbounds.minX&&c?0:this.vbounds.minX,e=0<this.vbounds.minY&&c?0:this.vbounds.minY,f=(cp.model.data.project.h>this.vbounds.maxY&&c?cp.model.data.project.h:this.vbounds.maxY+4)-e;b.width=
(cp.model.data.project.w>this.vbounds.maxX&&c?cp.model.data.project.w:this.vbounds.maxX+4)-d;b.height=f;b.left=d;b.top=e}this.sh&&!this.sh.i&&(b.shadowOffsetX=this.sh.d*Math.cos(Math.PI*this.sh.a/180),b.shadowOffsetY=this.sh.d*Math.sin(Math.PI*this.sh.a/180),b.shadowBlur=this.sh.b,b.shadowColor=cp.ConvertRGBToRGBA(this.sh.c,this.sh.o));c?cp.responsive?(c=this.answerLabelCanvasParentElement.getBoundingClientRect(),d=cp("div_Slide").getBoundingClientRect(),b.drawImage(this.loadedBtnImages[a],c.left-
d.left-30,c.top-d.top)):b.drawImage(this.loadedBtnImages[a],this.bounds.minX-2,this.bounds.minY-2):cp.responsiveType==cp.kCPPMEAutoResponsive?(d=cp.getProject().clientWidth/cp.D.project.w,c=14<this.loadedBtnImages[a].width*d?this.loadedBtnImages[a].width*d:14,d=14<this.loadedBtnImages[a].height*d?this.loadedBtnImages[a].height*d:14,e=0,this.loadedBtnImages[a].width>c&&(e=(this.loadedBtnImages[a].width-c)/2),f=0,this.loadedBtnImages[a].height>d&&(f=(this.loadedBtnImages[a].height-d)/2),b.drawImage(this.loadedBtnImages[a],
e,f,c,d)):b.drawImage(this.loadedBtnImages[a],0,0)};
cp.MCQInput.prototype.addHighlightBoxMouseHandlers=function(){if(cp.DESKTOP==cp.device){var a=this,c=document.getElementById(this.element.id+"_dummyhighlight");this.highlightElement.onmouseover=function(){if(!cp.disableInteractions&&"disabled"!=a.value&&(c.style.backgroundColor="#000000",c.style.opacity="0.3",a.sh)){var b=a.sh.a;cp.applyShadow(c,a.sh.d*Math.cos(Math.PI*b/180)+"px "+a.sh.d*Math.sin(Math.PI*b/180)+"px "+a.sh.b+"px "+cp.ConvertRGBToRGBA(a.sh.c,a.sh.o)+(a.sh.i?" inset":""))}};this.highlightElement.onmouseout=
function(){!cp.disableInteractions&&"disabled"!=a.value&&(c.style.backgroundColor="transparent",cp.applyShadow(c,""))}}};
cp.MCQInput.prototype.addDummyHighlightDiv=function(a,c){var b=cp(this.element.id+"_dummyhighlight");b||(b=cp.newElem("div"),cp.fixWebkitScaling(b),a.insertBefore(b,this.answerLabelCanvasElement.parentElement),b.id=this.element.id+"_dummyhighlight",b.style.cursor=c,b.style.position="absolute",b.style.zIndex=this.zIndex,b.style.borderRadius="5px");var d=cp.movie.stage.mainSlideDiv.getBoundingClientRect(),e=this.element.getBoundingClientRect(),f=this.inputControlCanvasElement.parentElement.getBoundingClientRect();
b.style.left=(f.left-d.left-5)/cp.movie.m_scaleFactor+"px";b.style.top=(e.top-d.top-2)/cp.movie.m_scaleFactor+"px";b.style.width=this.element.clientWidth+"px";b.style.height=this.element.clientHeight+"px"};
cp.MCQInput.prototype.adjustVerticalAlignment=function(a,c,b,d){if(c&&b){d=d?0:parseFloat(c.parentElement.style.top);switch(a){case cp.TextLayoutEnum.kTLCenter:d+=(c.parentElement.clientHeight-b.clientHeight)/2;break;case cp.TextLayoutEnum.kTLBottom:d+=c.parentElement.clientHeight-b.clientHeight}b.style.top=d+"px"}};
cp.MCQInput.prototype.drawForResponsive=function(a){if(!this.m_questionObj||!this.m_questionObj.getIsStarted()||!this.responsiveCSS)return!1;if(this.isDrawn&&!a)return!0;var c=cp.getResponsiveCSS(this.responsiveCSS);cp.getCSSFromLayouter(c,this);var b=!1,b=this.re||this.sh&&!this.sh.i||this.fillOuterArea,d=void 0!=this.tr;if(this.currentCSS==c&&!b&&!d&&!a)return!0;this.currentCSS=c;a=this.element.id;if(cp.movie.playbackController){var e=cp.movie.playbackController.GetQuizController();if(e){var f=
cp.D[this.element.id],h=cp.D[f.actid+"c"];this.answerTextCanvasDivName||(this.answerTextCanvasDivName=this.m_questionObj.getAnswerOption(f));if(this.answerLabelCanvasElement=document.getElementById(this.canvasDivName)){var d=cp.movie.stage.getSlideDiv().firstChild,j=cp.D[this.answerTextCanvasDivName],i=cp.D[f.cn];e.GetIsInReviewMode();var l=(e=this.m_questionObj.shouldDisableOptions())?"default":"pointer";this.group=this.m_questionObj.getAnswerGroupName();this.accessibilityText=cp.getAccessibilityString(j);
this.isCorrect=j.ic;f.ic=this.isCorrect;this.value="enabled";this.m_questionObj.getIfSelected(this.answerID)&&(this.checked="checked");this.zIndex=cp.D[f.actid].zIndex;this.inputIdSuffix=this.isSingleChoice?"_radioInputField":"_checkBoxInputField";if(""==this.element.innerHTML){var g="";1===cp.D.pref.hsr&&(g="outline-style:none");this.element.innerHTML+="<div id='"+this.element.id+"_highlight' style='"+g+";cursor:"+l+";border-radius:5px; left:0px;top: 0px;width:100%;height:100%;position:absolute;background-color:#FF0000;opacity:.5'><label><input type='"+
this.type+"' "+this.value+" "+this.checked+" name='"+this.group+"' id='"+a+this.inputIdSuffix+"' aria-label='"+this.accessibilityText+"' style='cursor:"+l+";opacity:0;left: 0px; top:0px;width: 22px; height: 22px;position:absolute;border-radius:0px;'></input></label></div>"}this.inputControl=document.getElementById(this.element.id+this.inputIdSuffix);this.inputControl.answerObject=this;this.inputControl.tabIndex=RADIO_TAB_INDEX;0===cp.D.pref.hsr&&(this.inputControl.onfocus=function(){var a=document.getElementById(this.element.id+
"_dummyhighlight");a.style.border="solid #015ab2 2px";a.style.opacity="0.3"}.bind(this),this.inputControl.onfocusout=function(){document.getElementById(this.element.id+"_dummyhighlight").style.border="none"}.bind(this));var k=f.actid,g=cp(k+"canvasHolder");g||(g=cp.newElem("div"),cp.fixWebkitScaling(g),d.insertBefore(g,this.answerLabelCanvasElement.parentElement),g.setAttribute("class","cp-rewrap"),g.id=k+"canvasHolder",f.answerTextCanvasHolder=g.id,g.style.zIndex=this.zIndex,this.answertextCanvas=
cp(this.answerTextCanvasDivName),this.answertextCanvas||(this.answertextCanvas=cp.newElem("canvas"),this.answertextCanvas.setAttribute("class","cp-shape"),this.answertextCanvas.id=this.answerTextCanvasDivName,g.appendChild(this.answertextCanvas)),f=document.getElementById(j.dn),f.drawingBoard=g,cp.D[this.answerTextCanvasDivName].dns=this.element.id,this.answertextCanvasShape||(this.answertextCanvasShape=new cp.Shape(this.answertextCanvas,cp.D[this.answerTextCanvasDivName]),this.answertextCanvasShape.start()),
cp.updateVarText(f));f=cp.movie.stage.mainSlideDiv.getBoundingClientRect();this.parentElementClientBoundingRect=this.element.parentElement.getBoundingClientRect();this.isDrawn||(this.answerLabelCanvasParentElement=this.answerLabelCanvasElement.parentElement,this.answerLabelCanvasParentSiblingElement=this.answerLabelCanvasParentElement.nextSibling,d.removeChild(this.answerLabelCanvasParentElement),d.insertBefore(this.answerLabelCanvasParentElement,this.answerLabelCanvasParentSiblingElement));this.inputControlCanvasElement||
(this.inputControlCanvasElement=cp.newElem("canvas"),g=b?cp.project.clientWidth:26,k=b?cp.project.clientHeight:26,canvas=this.canvas=cp.createCanvas(0,0,g,k,this.inputControlCanvasElement),this.inputControlCanvasElement.style.display="block",this.inputControlCanvasElement.style.position="absolute",g=cp.newElem("div"),cp.fixWebkitScaling(g),d.insertBefore(g,this.answerLabelCanvasParentSiblingElement),g.appendChild(this.inputControlCanvasElement),g.style.display="block",g.style.position="absolute",
g.style.width="22px",g.style.height="22px",g.style.zIndex=this.zIndex);this.adjustPositionWithAnswerArea(i.css[cp.ResponsiveProjWidth],this.answerLabelCanvasParentElement);this.adjustPositionWithAnswerArea(i.css[cp.ResponsiveProjWidth],cp(i.dn));this.adjustPositionWithAnswerArea(h.css[cp.ResponsiveProjWidth],this.answertextCanvas.parentElement);this.inputControlCanvasElement&&this.inputControlCanvasElement.img&&(g=b?cp.project.clientWidth:26,k=b?cp.project.clientHeight:26,this.inputControlCanvasElement.width=
g,this.inputControlCanvasElement.height=k,this.inputControlCanvasElement.style.width=g+"px",this.inputControlCanvasElement.style.height=k+"px",this.loadAndDrawImage(this.inputControlCanvasElement.img));h=this.answerLabelCanvasParentElement.getBoundingClientRect();g=this.answertextCanvas.parentElement.getBoundingClientRect();this.inputControlCanvasElement.parentElement.style.left=h.left-f.left-30+"px";this.inputControlCanvasElement.parentElement.style.top=h.top-f.top+"px";b&&(this.inputControlCanvasElement.style.left=
-(h.left-f.left-30)+"px",this.inputControlCanvasElement.style.top=-(h.top-f.top)+"px");b=this.inputControlCanvasElement.parentElement.getBoundingClientRect();this.element.style.left="0px";this.element.style.top="0px";this.element.style.right="auto";this.element.style.bottom="auto";this.element.style.width="100%";this.element.style.height="100%";this.element.style.position="absolute";this.element.style.backgroundColor="#ff0000";this.element.style.opacity=0;this.adjustPositionWithAnswerArea(c,this.element.parentElement);
k=this.element.getBoundingClientRect();this.answertextCanvas.parentElement.style.top=k.top-f.top+"px";this.element.parentElement.style.width=b.width+h.width+g.width+20+"px";this.element.parentElement.style.height=g.height+6+"px";if((c=this.getAnswerAreaBoundingRect(c,this.element.parentElement))&&cp.responsiveType==cp.kCPPMEAutoResponsive&&c.width<parseFloat(this.element.parentElement.style.width))this.element.parentElement.style.width=c.width+"px",this.answertextCanvas.parentElement.style.width=
c.width-b.width-h.width+"px";c=cp.D[j.dn];j=c.rptl[cp.ResponsiveProjWidth];this.adjustVerticalAlignment(j,this.answertextCanvas,this.answerLabelCanvasParentElement);this.adjustVerticalAlignment(j,this.answertextCanvas,this.inputControlCanvasElement.parentElement);this.adjustVerticalAlignment(j,this.answertextCanvas,this.inputControl,!0);this.addDummyHighlightDiv(d,l);this.element.parentElement.style.left=b.left-f.left-5+"px";cp.D[i.dn].rptl=c.rptl;if(!this.isDrawn){var m=this;this.highlightElement=
document.getElementById(a+"_highlight");this.addHighlightBoxMouseHandlers();a=function(){cp.disableInteractions||m.value!="disabled"&&m.m_questionObj.selectAnswerOption(m)};cp.ThreeDQuestionHelper&&cp.ThreeDQuestionHelper.registerEventHandlingDiv(this.element,"click");cp.registerGestureEvent(this.element,cp.GESTURE_EVENT_TYPES.TAP,a);cp.DESKTOP==cp.device?cp.registerGestureEvent(this.inputControl,cp.GESTURE_EVENT_TYPES.TAP,a):cp.useg||(this.inputControl.onclick=a);"checked"==this.checked?this.loadAndDrawImage(this.m_questionObj.getImageForState(this.type,
"selected")):this.loadAndDrawImage(this.m_questionObj.getImageForState(this.type,"default"))}e&&this.disableOption();this.isDrawn=!0;this.visible||(this.element.style.visibility="hidden");return!0}}}};
cp.MCQInput.prototype.addIfNeeded=function(a){if((!cp.responsive||!this.drawForResponsive(a))&&this.m_questionObj&&!this.isDrawn&&this.m_questionObj.getIsStarted()){var a=this.element.id,c=this.type;if(cp.movie.playbackController){var b=cp.movie.playbackController.GetQuizController();if(b){b.GetIsInReviewMode();b=this.m_questionObj.shouldDisableOptions();this.group=this.m_questionObj.getAnswerGroupName();var d=b?"default":"pointer",e=cp.D[this.element.id];this.answerTextCanvasDivName=this.m_questionObj.getAnswerOption(e);
if(this.answerLabelCanvasElement=document.getElementById(this.canvasDivName)){var f=cp.movie.stage.getSlideDiv().firstChild,h=cp.D[this.answerTextCanvasDivName];this.m_questionObj.getIfSelected(this.answerID)&&(this.checked="checked");this.accessibilityText=cp.getAccessibilityString(h);this.isCorrect=h.ic;e.ic=this.isCorrect;var j=!1,j=this.re||this.sh&&!this.sh.i,i=h.b;this.answerTextCanvasImageBounds={minX:i[0],minY:i[1],maxX:i[2],maxY:i[3]};i=cp.D[e.cn].b;this.lAnswerLabelBounds={minX:i[0],minY:i[1],
maxX:i[2],maxY:i[3]};this.zIndex=cp.D[e.actid].zIndex;this.inputIdSuffix=this.isSingleChoice?"_radioInputField":"_checkBoxInputField";""==this.element.innerHTML&&(i="",1===cp.D.pref.hsr&&(i="outline-style:none"),this.element.innerHTML+="<div id='"+a+"_highlight' style='"+i+";cursor:"+d+";border-radius:5px; left: -5px; top: -1px;width: "+(this.answerTextCanvasImageBounds.maxX-this.answerTextCanvasImageBounds.minX+50)+"px;height: "+(this.answerTextCanvasImageBounds.maxY-this.answerTextCanvasImageBounds.minY+
6)+"px;position:absolute;background-color:#FF0000;opacity:.5'><label><input type='"+c+"' "+this.value+" "+this.checked+" aria-label='"+this.accessibilityText+"' name='"+this.group+"' id='"+a+this.inputIdSuffix+"' style='cursor:"+d+";opacity:0;left: 0px; top: "+(this.lAnswerLabelBounds.maxY-this.lAnswerLabelBounds.minY-22)/2+"px;width: 22px; height: 22px;position:absolute;border-radius:0px;'></input></label></div>");this.inputControl=document.getElementById(a+this.inputIdSuffix);this.inputControl.answerObject=
this;this.inputControl.tabIndex=RADIO_TAB_INDEX;c=e.actid;i=cp.newElem("div");cp.fixWebkitScaling(i);f.insertBefore(i,this.answerLabelCanvasElement.parentElement);i.setAttribute("class","cp-rewrap");i.id=c+"canvasHolder";e.answerTextCanvasHolder=i.id;e=cp.newElem("canvas");e.setAttribute("class","cp-shape");e.id=this.answerTextCanvasDivName;i.appendChild(e);i.style.zIndex=this.zIndex;var l=document.getElementById(h.dn);l.drawingBoard=i;cp.updateVarText(l);cp.D[this.answerTextCanvasDivName].dns=this.element.id;
(new cp.Shape(e,cp.D[this.answerTextCanvasDivName])).start();i=cp.D[c].mdi;e.parentElement.style.left=parseFloat(e.parentElement.style.left)+(cp.D[i].b[0]-this.answerTextCanvasImageBounds.minX)+"px";e.parentElement.style.top=parseFloat(e.parentElement.style.top)+(cp.D[i].b[1]-this.answerTextCanvasImageBounds.minY)+"px";c=this.answerLabelCanvasElement.parentElement;l=c.nextSibling;f.removeChild(c);f.insertBefore(c,l);this.inputControlCanvasElement=cp.newElem("canvas");canvas=this.canvas=cp.createCanvas(0,
0,(cp.model.data.project.w>this.vbounds.maxX&&j?cp.model.data.project.w:this.vbounds.maxX+4)-(0<this.vbounds.minX&&j?0:this.vbounds.minX),(cp.model.data.project.h>this.vbounds.maxY&&j?cp.model.data.project.h:this.vbounds.maxY+4)-(0<this.vbounds.minY&&j?0:this.vbounds.minY),this.inputControlCanvasElement);this.inputControlCanvasElement.style.display="block";this.inputControlCanvasElement.style.position="absolute";var g=cp.newElem("div");cp.fixWebkitScaling(g);f.insertBefore(g,l);g.appendChild(this.inputControlCanvasElement);
g.style.display="block";g.style.position="absolute";g.style.left=this.vbounds.minX+"px";g.style.top=this.lAnswerLabelBounds.minY+(this.lAnswerLabelBounds.maxY-this.lAnswerLabelBounds.minY-22)/2+"px";g.style.width="22px";g.style.height="22px";g.style.zIndex=this.zIndex;j?(this.inputControlCanvasElement.style.marginLeft=-this.vbounds.minX+"px",this.inputControlCanvasElement.style.marginTop=-this.lAnswerLabelBounds.minY+"px"):(this.inputControlCanvasElement.style.marginLeft="-2px",this.inputControlCanvasElement.style.marginTop=
"-2px");var k=this;this.element.style.left=parseFloat(e.parentElement.style.left)+(cp.D[i].b[0]-this.answerTextCanvasImageBounds.minX)+"px";this.element.style.top=cp.D[i].b[1]+"px";this.element.style.width=this.answerTextCanvasImageBounds.maxX-this.answerTextCanvasImageBounds.minX+50+"px";this.element.style.height=this.answerTextCanvasImageBounds.maxY-this.answerTextCanvasImageBounds.minY+6+"px";this.element.style.position="absolute";this.element.style.backgroundColor="#ff0000";this.element.style.opacity=
0;h=cp.D[h.dn].txtl;this.adjustVerticalAlignment(h,e,c);this.adjustVerticalAlignment(h,e,this.inputControlCanvasElement.parentElement);this.adjustVerticalAlignment(h,e,this.inputControl,!0);h=this.inputControlCanvasElement.parentElement.getBoundingClientRect();j=cp.movie.stage.mainSlideDiv.getBoundingClientRect();this.addDummyHighlightDiv(f,d);this.highlightElement=document.getElementById(a+"_highlight");this.addHighlightBoxMouseHandlers();this.element.style.left=(h.left-j.left-5)/cp.movie.m_scaleFactor+
"px";a=function(){cp.disableInteractions||k.value!="disabled"&&k.m_questionObj.selectAnswerOption(k)};cp.registerGestureEvent(this.element,cp.GESTURE_EVENT_TYPES.TAP,a);cp.DESKTOP==cp.device?cp.registerGestureEvent(this.inputControl,cp.GESTURE_EVENT_TYPES.TAP,a):cp.useg||(this.inputControl.onclick=a);"checked"==this.checked?this.loadAndDrawImage(this.m_questionObj.getImageForState(this.type,"selected")):this.loadAndDrawImage(this.m_questionObj.getImageForState(this.type,"default"));b&&this.disableOption();
this.isDrawn=!0;this.visible||(this.element.style.visibility="hidden")}}}}};
cp.MultipleChoiceQuestion=function(a,c){cp.MultipleChoiceQuestion.baseConstructor.call(this,a,c);this.answerOptions=this.getAnswerOptions();this.shuffleCounter=-1;this.isShuffleEnabled=this.questionData.ish;this.correctAnswersList="";this.chosenAnswerHasAdvancedFeedback=!1;this.typeStatesMap={radio:{"default":"assets/htmlimages/radioButton_normal.png",selected:"assets/htmlimages/radioButton_selected.png",disabled:"assets/htmlimages/radioButton_disabled.png",selectedDisabled:"assets/htmlimages/radioButton_selectedDisabled.png"},
checkbox:{"default":"assets/htmlimages/checkBox_normal.png",selected:"assets/htmlimages/checkBox_selected.png",disabled:"assets/htmlimages/checkBox_disabled.png",selectedDisabled:"assets/htmlimages/checkBox_selectedDisabled.png"}};this.verbose=!1};cp.inherits(cp.MultipleChoiceQuestion,cp.Question);cp.MultipleChoiceQuestion.prototype.getImageForState=function(a,c){return this.typeStatesMap[a][c]};
cp.MultipleChoiceQuestion.prototype.getAnswerScore=function(a){for(var c=0,b=0;b<this.answerOptions.length;++b){var d=cp.D[this.answerOptions[b]];if(a==d.aid){c=d.ap;break}}return c};
cp.MultipleChoiceQuestion.prototype.getSelectedAnswerChoices=function(){var a="",c=this.m_selectedAnswersArr.slice(0);if(c&&0>=c.length)return"";for(var b=[],d=this.questionData.ao,e=0;e<d.length;++e)for(var f=d[e].split(":"),f=cp.D[f[0]],h=0;h<c.length;++h)f.aid==c[h]&&b.push(cp.D[this.answerOptions[e]].aid);a+=b[0];for(c=1;c<b.length;++c)a+=";",a+=b[c];return a};
cp.MultipleChoiceQuestion.prototype.getAnswerScores=function(){var a=[];if(!this.answerOptions)return a;for(var c=document.getElementsByName(this.getAnswerGroupName()),b=this.m_selectedAnswersArr.slice(0),d={},e=0;e<b.length;++e)d[b[e]]=b[e];for(b=0;b<c.length;++b){var e=cp.D[c[b].parentElement.parentElement.parentElement.id],f=cp(e.answerTextCanvasHolder).firstChild,f=cp.D[f.id],h=new cp.AnswerScore;h.m_answerID=e.aid;h.m_correctAnswer=f.ic?"1":"0";h.m_chosenAnswer=d[e.aid]?"1":"0";a.push(h)}return a};
cp.MultipleChoiceQuestion.prototype.getQuestionScoredPoints=function(){if(this.getIsSurvey()||!this.getWasJudged())return 0;if(!this.isPartialScore)return this.getQuestionLevelScoredPoints();var a=this.getSelectedOptions(this.getAnswerGroupName());if(!a)return 0;for(var c=0,b=0;b<a.length;++b){var d=this.getAnswerID(a[b].parentNode);d&&(c+=this.getAnswerScore(d))}return c};
cp.MultipleChoiceQuestion.prototype.shuffleAnswers=function(){var a=!this.m_quizController.GetIsAttemptFinished()&&this.getWasJudged()&&!this.m_quizController.GetIsSubmitAll(),c=this.getIsPretest()&&this.m_quizController.GetIsPretestQuestionsDisabled();if(this.isShuffleEnabled&&(!a&&!this.m_quizController.GetIsInReviewMode()&&!c)&&!this.m_isShuffled){for(var b=this.answerOptions.length,d,c=[],a=0;a<b;++a)c[a]=this.answerOptions[a];for(a=b;1<a;a--)b=Math.floor(Math.random()*a),b!=a&&(d=c[b],c[b]=c[a-
1],c[a-1]=d);this.answerOptions=c;this.m_isShuffled=!0}};cp.MultipleChoiceQuestion.prototype.getAnswerOption=function(){this.shuffleAnswers();return this.answerOptions[++this.shuffleCounter]};cp.MultipleChoiceQuestion.prototype.getIfSelected=function(a){if(!this.m_selectedAnswersArr||0>=this.m_selectedAnswersArr.length)return!1;for(var c=0;c<this.m_selectedAnswersArr.length;++c)if(a==this.m_selectedAnswersArr[c])return!0;return!1};
cp.MultipleChoiceQuestion.prototype.resetQuestionData=function(){cp.MultipleChoiceQuestion.superClass.resetQuestionData.call(this);this.m_quizController.GetGoToQuizScopeActionExecuted()||(this.m_selectedAnswersArr=[]);this.correctAnswersList="";this.shuffleCounter=-1;this.chosenAnswerHasAdvancedFeedback=!1};
cp.MultipleChoiceQuestion.prototype.selectAnswerOption=function(a){if(a&&(a.inputControl&&!a.inputControl.disabled)&&!this.m_answersDisabled){this.getSelectedOptions();for(var c=document.getElementsByName(this.getAnswerGroupName()),b=0;b<c.length;++b){var d=c[b],e=d.answerObject;a.isSingleChoice?(a.inputControl==d?(d.checked=!0,a.checked=!0):(d.checked=!1,a.checked=!1),d.checked?e.loadAndDrawImage(this.getImageForState(a.type,"selected")):e.loadAndDrawImage(this.getImageForState(a.type,"default"))):
a.inputControl==d&&(d.checked=!d.checked,d.checked?(e.loadAndDrawImage(this.getImageForState(a.type,"selected")),a.checked=!0):(e.loadAndDrawImage(this.getImageForState(a.type,"default")),a.checked=!1))}}};cp.MultipleChoiceQuestion.prototype.setSelectedAnswers=function(){var a=this.getSelectedOptions(this.getAnswerGroupName());if(a&&!(0>=a.length)){this.m_selectedAnswersArr=[];for(var c=0;c<a.length;++c)this.m_selectedAnswersArr.push(cp.D[a[c].parentElement.parentElement.parentElement.id].aid)}};
cp.MultipleChoiceQuestion.prototype.disableAllOptions=function(){if(this.m_quizController){var a=!0;this.m_quizController.GetIsSubmitAll()&&!this.getIsPretest()&&(!this.m_quizController.GetIsInReviewMode()&&!this.m_quizController.m_submittedAllQuestions)&&(a=!1);if(a&&(a=document.getElementsByName(this.getAnswerGroupName()),!(1>a.length))){for(var c=0;c<a.length;++c){var b=a[c].answerObject;b&&b.disableOption&&b.disableOption()}this.m_answersDisabled=!0}}};
cp.MultipleChoiceQuestion.prototype.getChosenAnswerFeedback=function(){for(var a=document.getElementsByName(this.getAnswerGroupName()),c=0,b,d=0;d<a.length;++d)if(!0==a[d].checked){c++;var e=cp(cp.D[a[d].parentElement.parentElement.parentElement.id].answerTextCanvasHolder).firstChild,f=cp.D[e.id],e=f.fb,f=f.ac;if(e||f)if(b={},void 0!=e&&cp.D[e]&&(b.name=e,b.captionToBeShown=!0),void 0!=f)b.action=f}return b};
cp.MultipleChoiceQuestion.prototype.getSelectedOptions=function(a){for(var a=document.getElementsByName(a),c=[],b=0,d=0;d<a.length;++d)!0==a[d].checked&&(c[b++]=a[d]);return c};
cp.MultipleChoiceQuestion.prototype.clearAnswers=function(){this.verbose&&cp.log("Inside Clear Answers");var a=this.m_quizController&&this.m_quizController.GetIsSubmitAll()&&!this.getIsPretest(),a=(a=!1==this.getWasJudged()||a&&!1==this.m_quizController.m_submittedAllQuestions)&&!this.m_quizController.GetIsInReviewMode();if(!1!=a&&(this.m_selectedAnswersArr=[],this.verbose&&cp.log("Not Attempted. Hence Clearing"),a=document.getElementsByName(this.getAnswerGroupName()),!(1>a.length)))for(var c=0;c<
a.length;++c){var b=a[c];b&&(b.checked=!1,b.answerObject&&b.answerObject.loadAndDrawImage(this.getImageForState(b.type,"default")))}};cp.MultipleChoiceQuestion.prototype.checkIfPartiallyCorrect=function(a){if(!this.isPartialScore)return!1;for(var c=this.getExpectedCorrectAnswerIDList(),b={},d=c.length,e=0;e<c.length;++e)b[c[e]]=c[e];for(var f=e=c=0;f<a.length;++f){var h=this.getAnswerID(a[f].parentNode);b[h]?++c:++e}a=!1;0<c&&(a=!0,c==d&&0==e&&(a=!1));return a};
cp.MultipleChoiceQuestion.prototype.checkIfCorrect=function(a){for(var c=this.getExpectedCorrectAnswerIDList(),b={},d=0;d<c.length;++d)b[c[d]]=c[d];for(var e=[],d={},f=0,h=0;h<a.length;++h){var j=a[h];if(!cp.D[j.parentNode.parentNode.parentNode.id].ic)return!1;j=this.getAnswerID(j.parentNode);if(!b[j])return!1;e[f++]=j;d[j]=j}if(e.length!=c.length)return!1;for(a=0;a<c.length;++a)if(!d[c[a]])return!1;return!0};
cp.MultipleChoiceQuestion.prototype.getChosenAnswerAsString=function(){if("choice"==this.getInteractionType())return this.getSelectedAnswerChoices();for(var a=this.getAnsweredCorrectly(),c=0;c<this.answerOptions.length;++c){var b=cp.D[this.answerOptions[c]];if(b.ic){if(a)return b.isTrue}else if(!a)return b.isTrue}};
cp.MultipleChoiceQuestion.prototype.getCorrectAnswerAsString=function(){if("choice"==this.getInteractionType()){var a=this.getExpectedCorrectAnswerIDList();if(0>=a.length)return"0";for(var c=a[0],b=1;b<a.length;++b)c+=";"+a[b];return c}for(b=0;b<this.answerOptions.length;++b)if(a=cp.D[this.answerOptions[b]],a.ic)return a.isTrue};cp.MultipleChoiceQuestion.prototype.getChosenAnswerAsStringForReview=function(){return this.getSelectedAnswerChoices()};
cp.MultipleChoiceQuestion.prototype.getCorrectAnswerAsStringForReview=function(){var a=this.getExpectedCorrectAnswerIDList();if(0>=a.length)return"0";for(var c=a[0],b=1;b<a.length;++b)c+=";"+a[b];return c};
cp.MultipleChoiceQuestion.prototype.getExpectedCorrectAnswerTextList=function(a){for(var c=[],b=-1,d=0;d<this.answerOptions.length;++d){var e=cp.D[this.answerOptions[d]];e.ic&&(c[++b]=cp.trimStartingAndTrailingSpaces(e.atxtlms))}if(0>=c.length)return"";b=c[0];for(d=1;d<c.length;++d)b+=a+c[d];cp.verbose&&cp.log("Expected Answer Text List : "+b);return b};
cp.MultipleChoiceQuestion.prototype.getSelectedAnswerTextList=function(a){var c=[];this.m_quizController.GetIsSubmitAll()&&this.getIsPretest();var b=this.m_selectedAnswersArr.slice(0);if(b&&0>=b.length)return"";for(var d=this.questionData.ao,e=0;e<d.length;++e)for(var f=d[e].split(":"),f=cp.D[f[0]],h=0;h<b.length;++h)f.aid==b[h]&&c.push(cp.D[this.answerOptions[e]].accstr);if(0>=c.length)return"";b=c[0];for(e=1;e<c.length;++e)b+=a+c[e];cp.verbose&&cp.log("Expected Answer Text List : "+b);return b};
cp.MultipleChoiceQuestion.prototype.getAnswerTexts=function(){for(var a=cp.MultipleChoiceQuestion.superClass.getAnswerTexts.call(this),c={},b=this.questionData.ao,d=0;d<b.length;++d){var e=b[d].split(":"),e=cp.D[e[0]];c[e.aid]=cp.trimStartingAndTrailingSpaces(e.atxtlms)}a.answerTextMap=c;return a};cp.MultipleChoiceQuestion.prototype.saveAnswerOrder=function(){this.m_answerOrderArray=this.answerOptions.slice(0);this.setSelectedAnswers()};
cp.MultipleChoiceQuestion.prototype.checkAndSetQuestionStatus=function(){var a=this.QuestionStatusEnum.INCOMPLETE,a=this.getSelectedOptions(this.getAnswerGroupName()),a=!a||0==a.length?this.QuestionStatusEnum.INCOMPLETE:this.getIsSurvey()?this.QuestionStatusEnum.CORRECT:this.checkIfPartiallyCorrect(a)?this.QuestionStatusEnum.PARTIAL_CORRECT:this.checkIfCorrect(a)?this.QuestionStatusEnum.CORRECT:this.QuestionStatusEnum.INCORRECT;this.setQuestionStatus(a)};
cp.MultipleChoiceQuestion.prototype.startQuestion=function(){this.chosenAnswerFeedback=this.correctAnswersList="";this.shuffleCounter=-1;this.chosenAnswerHasAdvancedFeedback=!1;cp.MultipleChoiceQuestion.superClass.startQuestion.call(this)};
(function(){cp.borderInit=function(d){cp.borderCreated=!1;cp.lBorderW=0;cp.tBorderW=0;cp.rBorderW=0;cp.bBorderW=0;var a=d.borderProperties;if(a){var b=document.getElementById("projectBorder"),c=cp.getMainContainer();cp.responsive||(c.style.width=b.style.width=a.w+"px",c.style.height=b.style.height=a.h+"px");a.l=void 0!=a.l?a.l:0;a.t=void 0!=a.t?a.t:0;a.r=void 0!=a.r?a.r:0;a.b=void 0!=a.b?a.b:0;cp.lBorderW=a.l;cp.tBorderW=a.t;cp.rBorderW=a.r;cp.bBorderW=a.b;b.style.backgroundColor=a.bc;if(c=a.ip)b.style.backgroundImage=
"url('"+c+"')";a.hasSqEd||(b.style.borderRadius="20px");cp.updateBorderPosition(d,!0);cp.borderCreated=!0;cp.complete()}}})();
cp.playbar=function(a){return document.getElementById(a)};cp.PB=cp.playbar;cp.PB.Btns={kBtnAudioOff:"AudioOff",kBtnAudioOn:"AudioOn",kBtnBackward:"Backward",kBtnCC:"CC",kBtnExit:"Exit",kBtnFastForward:"FastForward",kBtnFastForward1:"FastForward1",kBtnFastForward2:"FastForward2",kBtnForward:"Forward",kBtnInfo:"Info",kBtnLogo:"Logo",kBtnPlay:"Play",kBtnPause:"Pause",kBtnPrint:"Print",kBtnProgress:"Progress",kBtnRewind:"Rewind",kBtnThumb:"Thumb",kBtnThumbBase:"ThumbBase",kBtnTOC:"TOC",kBtnVR:"EnterVR"};
cp.PB.BtnStyleImages="Color ColorSmall Glow GlowSmall Height Shadow ShadowSmall InnerStroke InnerStrokeSmall Shade ShadeSmall Stroke StrokeSmall".split(" ");cp.PB.kLargeBtn=0;cp.PB.kSmallBtn=1;cp.PB.kBtnMargin=2;cp.PB.kIndentMargin=8;cp.PB.movieProperties=null;cp.PB.assetsLoaded=0;cp.PB.assetsLoadedArray={};cp.PB.isVertical=!1;cp.PB.numBtns=0;cp.PB.playBarDim=0;cp.PB.mainMovie=null;cp.PB.playBarOtherDim=0;cp.PB.playbarHasLogo=!1;cp.PB.playbarHasInfo=!1;cp.PB.playbarHasPrint=!1;
cp.PB.loadedAssetArr={};cp.PB.playBarIconsFolder="./assets/playbar/PlaybarIcons/";cp.PB.PNGSuffix=".png";cp.PB.btnSizeMap={};cp.PB.btnSizeMap[cp.PB.Btns.kBtnAudioOff]=cp.PB.kSmallBtn;cp.PB.btnSizeMap[cp.PB.Btns.kBtnAudioOn]=cp.PB.kSmallBtn;cp.PB.btnSizeMap[cp.PB.Btns.kBtnBackward]=cp.PB.kSmallBtn;cp.PB.btnSizeMap[cp.PB.Btns.kBtnCC]=cp.PB.kSmallBtn;cp.PB.btnSizeMap[cp.PB.Btns.kBtnExit]=cp.PB.kSmallBtn;cp.PB.btnSizeMap[cp.PB.Btns.kBtnFastForward]=cp.PB.kSmallBtn;
cp.PB.btnSizeMap[cp.PB.Btns.kBtnFastForward1]=cp.PB.kSmallBtn;cp.PB.btnSizeMap[cp.PB.Btns.kBtnFastForward2]=cp.PB.kSmallBtn;cp.PB.btnSizeMap[cp.PB.Btns.kBtnForward]=cp.PB.kSmallBtn;cp.PB.btnSizeMap[cp.PB.Btns.kBtnPlay]=cp.PB.kLargeBtn;cp.PB.btnSizeMap[cp.PB.Btns.kBtnVR]=cp.PB.kLargeBtn;cp.PB.btnSizeMap[cp.PB.Btns.kBtnPause]=cp.PB.kLargeBtn;cp.PB.btnSizeMap[cp.PB.Btns.kBtnRewind]=cp.PB.kSmallBtn;cp.PB.btnSizeMap[cp.PB.Btns.kBtnTOC]=cp.PB.kSmallBtn;cp.PB.btnSizeMap[cp.PB.Btns.kBtnInfo]=cp.PB.kSmallBtn;
cp.PB.btnSizeMap[cp.PB.Btns.kBtnPrint]=cp.PB.kSmallBtn;cp.PB.playBarHeight=0;cp.PB.playBarCSSLoaded=!1;cp.PB.toolTips={};cp.PB.toolTips[cp.PB.Btns.kBtnRewind]="Rewind ;\u5012\u5e36 ;Rembobiner ;Zur\u00fcckspulen ;Riavvolgi ;\u5dfb\u304d\u623b\u3057 ;Rebobinar ;\ub418\uac10\uae30 ;Retroceder ".split(";");cp.PB.toolTips[cp.PB.Btns.kBtnBackward]="Back ;\u5f8c\u9000 ;Retour ;Zur\u00fcck ;Indietro ;\u623b\u308b ;Atr\u00e1s ;\ub4a4\ub85c ;Voltar ".split(";");cp.PB.toolTips[cp.PB.Btns.kBtnPlay]="Play ;\u64ad\u653e ;Lire ;Abspielen ;Esegui ;\u518d\u751f ;Reproducir ;\uc7ac\uc0dd ;Reproduzir ".split(";");
cp.PB.toolTips[cp.PB.Btns.kBtnVR]="Play ;\u64ad\u653e ;Lire ;Abspielen ;Esegui ;\u518d\u751f ;Reproducir ;\uc7ac\uc0dd ;Reproduzir ".split(";");cp.PB.toolTips[cp.PB.Btns.kBtnPause]="Pause ;\u66ab\u505c ;Pause ;Anhalten ;Pausa ;\u4e00\u6642\u505c\u6b62 ;Pausa ;\uc77c\uc2dc \uc911\uc9c0 ;Pausar ".split(";");cp.PB.toolTips[cp.PB.Btns.kBtnForward]="Forward ;\u524d\u9032 ;Avancer ;Weiter ;Avanti ;\u9032\u3080 ;Adelante ;\uc55e\uc73c\ub85c ;Avan\u00e7ar ".split(";");cp.PB.toolTips[cp.PB.Btns.kBtnCC]="Closed Captioning ;\u96b1\u85cf\u5f0f\u5b57\u5e55 ;Sous-titrage ;Bilduntertitel ;Didascalie ;\u30af\u30ed\u30fc\u30ba\u30c9\u30ad\u30e3\u30d7\u30b7\u30e7\u30f3 ;Subt\u00edtulos opcionales ;\ud3d0\uc1c4 \ucea1\uc158 ;Legenda codificada ".split(";");
cp.PB.toolTips[cp.PB.Btns.kBtnAudioOn]="Audio Off ;\u95dc\u9589\u97f3\u8a0a ;Audio d\u00e9sactiv\u00e9 ;Audio aus ;Audio spento ;\u97f3\u58f0 \u30aa\u30d5 ;Audio desact. ;\uc624\ub514\uc624 \ub044\uae30 ;\u00c1udio ligado ".split(";");cp.PB.toolTips[cp.PB.Btns.kBtnAudioOff]="Audio On ;\u958b\u555f\u97f3\u8a0a ;Audio activ\u00e9 ;Audio an ;Audio acceso ;\u97f3\u58f0 \u30aa\u30f3 ;Audio act.;\uc624\ub514\uc624 \ucf1c\uae30 ;\u00c1udio desligado ".split(";");cp.PB.toolTips[cp.PB.Btns.kBtnExit]="Exit ;\u7d50\u675f ;Quitter ;Beenden ;Esci ;\u9589\u3058\u308b ;Salir ;\ub05d\ub0b4\uae30 ;Sair ".split(";");
cp.PB.toolTips[cp.PB.Btns.kBtnInfo]="Information ;\u8cc7\u8a0a ;Informations ;Informationen ;Informazioni ;\u60c5\u5831 ;Informaci\u00f3n ;\uc815\ubcf4 ;Informa\u00e7\u00f5es ".split(";");cp.PB.toolTips[cp.PB.Btns.kBtnTOC]="Table of Contents ;\u76ee\u9304 ;Table des mati\u00e8res ;Inhaltsverzeichnis ;Sommario ;\u76ee\u6b21 ;Contenido ;\ubaa9\ucc28 ;\u00cdndice anal\u00edtico ".split(";");cp.PB.toolTips[cp.PB.Btns.kBtnFastForward]="2x Fast Forward Speed ;2 \u500d\u901f\u5feb\u8f49 ;Vitesse d'avance rapide x2 ;Zweifache Vorspulgeschwindigkeit ;Velocit\u00e0 avanzamento rapido 2x ;2 \u500d\u901f ;Velocidad de avance r\u00e1pido 2x ;2\ubc30\uc18d \ube68\ub9ac \uac10\uae30 ;Velocidade 2x de avan\u00e7ar ".split(";");
cp.PB.toolTips[cp.PB.Btns.kBtnFastForward1]="4x Fast Forward Speed ;4 \u500d\u901f\u5feb\u8f49 ;Vitesse d'avance rapide x4 ;Vierfache Vorspulgeschwindigkeit ;Velocit\u00e0 avanzamento rapido 4x ;4 \u500d\u901f ;Velocidad de avance r\u00e1pido 4x ;4\ubc30\uc18d \ube68\ub9ac \uac10\uae30 ;Velocidade 4x de avan\u00e7ar ".split(";");cp.PB.toolTips[cp.PB.Btns.kBtnFastForward2]="Normal Speed ;\u6b63\u5e38\u901f\u5ea6 ;Vitesse normale ;Normale Geschwindigkeit ;Velocit\u00e0 normale ;\u6a19\u6e96\u901f\u5ea6 ;Velocidad normal ;\uc77c\ubc18 \uc18d\ub3c4 ;Velocidade normal ".split(";");
cp.PB.toolTips[cp.PB.Btns.kBtnPrint]="Print;\u5217\u5370 ;Imprimer ;Drucken ;Stampa ;\u5370\u5237 ;Imprimir ;\uc778\uc1c4 ;Imprimir ".split(";");cp.PB.toolTipLocaleIndex=0;cp.PB.hideExitButton=0;cp.localizeToolTips=function(a){return cp.playbarTooltips&&cp.playbarTooltips[a]?cp.playbarTooltips[a]:cp.PB.toolTips[a][cp.PB.toolTipLocaleIndex]?cp.PB.toolTips[a][cp.PB.toolTipLocaleIndex]:a};
cp.PB.PlayBarButton=function(a,b,c){this.SmallSuffix="Small";this.isSmall=cp.PB.btnSizeMap[a];this.iconName=a;this.playBarDiv=b;this.currDiv=document.createElement("canvas");this.currDiv.parentObj=this;this.playBarDiv.appendChild(this.currDiv);this.currDiv.setAttribute("class",this.isSmall?"playbarSmallButton":"playbarBigButton");this.currDiv.width=this.currDiv.clientWidth;this.currDiv.height=this.currDiv.clientHeight;this.ctx=this.currDiv.getContext("2d");this.currDiv.imgElemArray=[];this.currDiv.toggleimgElemArray=
[];this.currDiv.title=cp.PB.MP.PBP.noToolTips?"":this.iconName;this.currDiv.curIcon=0;this.currDiv.tabIndex=0;this.currDiv.setAttribute("role","button");this.clickHandler=c;this.currDiv.style.marginTop=0==cp.PB.MP.PBP.tworow?(this.playBarDiv.height-this.currDiv.height)/2+"px":"0px";this.currDiv.style.marginLeft="0px"};
cp.PB.PlayBarButton.prototype={setImage:function(a){var b=cp.PB.loadedAssetArr[a+(this.isSmall?this.SmallSuffix:"")];void 0!=b&&(b.isGlow="Glow"==a,b.showImage=!0,b.imageName=a+(this.isSmall?this.SmallSuffix:""),this.currDiv.imgElemArray[this.currDiv.imgElemArray.length]=b)},getWidth:function(){void 0==this.actualClientWidth&&(this.actualClientWidth=this.currDiv.clientWidth);return this.actualClientWidth},destroy:function(){this.currDiv&&(this.currDiv.style.display="none",this.currDiv.parentElement&&
this.currDiv.parentElement.removeChild(this.currDiv))},setPosNWidth:function(a,b,c,d){if(0>=d)return 0;this.currDiv.ontouchstart=this.onMouseOver;cp.clearStaticGestureCache(this.currDiv);cp.registerGestureEvent(this.currDiv,cp.GESTURE_EVENT_TYPES.TAP,this.onClick,!0,!0);this.currDiv.ontouchend=this.onMouseOut;this.currDiv.onkeydown=this.onKeyDown;d=a?0:parseFloat(window.getComputedStyle(this.currDiv).marginLeft.replace("px",""));this.currDiv.style.marginLeft=d+b+"px";b=parseFloat(window.getComputedStyle(this.currDiv).marginTop.replace("px",
""));this.currDiv.style.marginTop=b+(a?0:c)+"px";this.refresh();return cp.PB.kBtnMargin},setIcon:function(a){var b=cp.PB.loadedAssetArr[a];b.parentElem=this.currDiv;b.isGlow=!1;b.imageName=a;cp.PB.isVertical&&cp.applyTransform(b,"matrix(0,1,-1,0,0,0)");this.currDiv.toggleimgElemArray[this.currDiv.toggleimgElemArray.length]=b;this.currDiv.currImageName=a;this.currDiv.title=cp.PB.MP.PBP.noToolTips?"":cp.localizeToolTips(this.currDiv.toggleimgElemArray[this.currDiv.curIcon].imageName)},onClick:function(a){cp.isCurrentSlideThreeDSlide()?
a&&a.currentTarget&&("Backward"==a.currentTarget.id||"Play"==a.currentTarget.id||"Forward"==a.currentTarget.id||"FastForward"==a.currentTarget.id)?cp.ThreeDSlide.m_threeDMain.m_hotspotManager.shouldAllowToPerformNavigationAction()&&(this.parentObj.toggleImage(a),void 0!=this.parentObj.clickHandler&&this.parentObj.clickHandler()):(this.parentObj.toggleImage(a),void 0!=this.parentObj.clickHandler&&this.parentObj.clickHandler()):(this.parentObj.toggleImage(a),void 0!=this.parentObj.clickHandler&&this.parentObj.clickHandler())},
onKeyDown:function(a){var b;a.keyCode?b=a.keyCode:a.which&&(b=a.which);32==b&&(this.parentObj.toggleImage(a),void 0!=this.parentObj.clickHandler&&this.parentObj.clickHandler())},toggleImage:function(a){var b=this.currDiv;null==b&&(b=this);b.curIcon=(b.curIcon+1)%b.toggleimgElemArray.length;var c=cp.localizeToolTips(b.toggleimgElemArray[b.curIcon].imageName);b.title=cp.PB.MP.PBP.noToolTips?"":c;cp.modifyAlternativeAccessibleText(b,c);if("tap"==a.type)b.parentObj.onMouseOut(a);else b.parentObj.onMouseOver(a)},
changeImage:function(a){var b=this.currDiv;null==b&&(b=this);this.currDiv.currImageName=a;for(var c=0;c<b.toggleimgElemArray.length;++c)if(a==b.toggleimgElemArray[c].imageName){if(c==b.curIcon)return;b.curIcon=c;b.title=cp.localizeToolTips(b.toggleimgElemArray[b.curIcon].imageName)}if(b.rollover)b.parentObj.onMouseOver(null);else b.parentObj.onMouseOut(null)},refresh:function(){this.onMouseOut(null)},onMouseOver:function(){var a=this.ctx,b=this.currDiv;null==b&&(b=this);null==a&&(a=this.getContext("2d"));
b.rollover=!0;var c;a.clearRect(0,0,b.clientWidth,b.clientHeight);for(var d=0;d<b.imgElemArray.length;++d)c=b.imgElemArray[d],a.drawImage(c,(b.clientWidth-c.width)/2,(b.clientHeight-c.height)/2);c=b.toggleimgElemArray[b.curIcon];var d=b.clientWidth/2,f=b.clientHeight/2,g=c.width,e=c.height;a.translate(d,f);a.rotate(Math.PI/180*(cp.PB.isVertical?-90:0));a.drawImage(c,-g/2,-e/2,g,e);b.currImageName=c.imageName;a.rotate(Math.PI/180*(cp.PB.isVertical?90:0));a.translate(-d,-f)},onMouseOut:function(){var a=
this.ctx,b=this.currDiv;null==b&&(b=this);null==a&&(a=this.getContext("2d"));b.rollover=!1;a.clearRect(0,0,b.clientWidth,b.clientHeight);if(b.imgElemArray){for(var c=0;c<b.imgElemArray.length;++c){var d=b.imgElemArray[c];d.isGlow||a.drawImage(d,(b.clientWidth-d.width)/2,(b.clientHeight-d.height)/2)}var d=b.toggleimgElemArray[b.curIcon],c=b.clientWidth/2,f=b.clientHeight/2,g=d.width,e=d.height;a.translate(c,f);a.rotate(Math.PI/180*(cp.PB.isVertical?-90:0));a.drawImage(d,-g/2,-e/2,g,e);b.currImageName=
d.imageName;a.rotate(Math.PI/180*(cp.PB.isVertical?90:0));a.translate(-c,-f)}}};
cp.PB.PlayBarSlider=function(a){this.thumbBase="ThumbBase";this.progress="Progress";this.thumb="Thumb";this.playBarDiv=a;this.currDiv=document.createElement("div");this.currDiv.setAttribute("class","playbarSlider");this.playBarDiv.appendChild(this.currDiv);this.currDiv.border="0px";this.currDiv.margin="0px";this.currDiv.padding="0px";this.progressDiv=document.createElement("canvas");this.currDiv.appendChild(this.progressDiv);this.currDiv.progressDiv=this.progressDiv;this.progressDiv.id="playbarSlider";
this.thumbimg=cp.PB.loadedAssetArr[this.thumb];this.thumbDiv=document.createElement("div");a=-1;0===cp.D.pref.rkt&&(a=10006);this.thumbDiv.setAttribute("tabindex",a);this.thumbDiv.setAttribute("class","playbarSliderThumb");this.currDiv.appendChild(this.thumbDiv);cp.fixWebkitScaling(this.thumbDiv);this.thumbimg.style.display="block";this.thumbDiv.appendChild(this.thumbimg);this.progressDiv.thumbDiv=this.thumbDiv;this.thumbDiv.progressDiv=this.progressDiv;this.thumbDiv.id="playbarSliderThumb";this.currDiv.style.marginLeft=
"0px";""==this.currDiv.style.marginTop&&(this.currDiv.style.marginTop="0px");this.currDiv.height=1==cp.PB.MP.PBP.tworow?this.playBarDiv.height/2:this.playBarDiv.height;cp.D.project_main.responsiveType===cp.kCPPMEVR&&(this.currDiv.style.visibility="hidden")};
cp.PB.PlayBarSlider.prototype={adjustWidth:function(){this.currDiv.style.width="58px"},setPosNWidth:function(a,b,c,d){d-=this.progressDiv.thumbDiv.clientWidth;if(0>=d)return 0;this.currDiv.width=d;this.currDiv.style.width=d+"px";d=a?0:parseFloat(window.getComputedStyle(this.currDiv).marginLeft.replace("px",""));this.currDiv.style.marginLeft=d+b+2*cp.PB.kBtnMargin+"px";b=a?0:parseFloat(window.getComputedStyle(this.currDiv).marginTop.replace("px",""));a||(this.currDiv.style.marginTop=b+c+"px");this.init(a);
this.refresh(a);this.currDiv.style.display="inline";return 2*cp.PB.kBtnMargin},getWidth:function(){void 0==this.actualClientWidth&&(this.actualClientWidth=this.currDiv.clientWidth+this.progressDiv.thumbDiv.clientWidth);return this.actualClientWidth},destroy:function(){this.currDiv&&(this.currDiv.style.display="none",this.currDiv.parentElement&&this.currDiv.parentElement.removeChild(this.currDiv))},init:function(){this.thumbDiv.width=this.thumbDiv.clientWidth;this.thumbDiv.height=this.thumbDiv.clientHeight;
var a=cp.PB.loadedAssetArr[this.thumbBase];this.progressDiv.parentObj=this;cp.clearStaticGestureCache(this.progressDiv);cp.registerGestureEvent(this.progressDiv,cp.GESTURE_EVENT_TYPES.TAP,this.moveSlider,!0,!0);this.progressDiv.updateSlider=this.updateSlider;this.progressDiv.thumbBasePattern=this.progressDiv.getContext("2d").createPattern(a,"repeat");a=cp.PB.loadedAssetArr[this.progress];this.progressDiv.progressPattern=this.progressDiv.getContext("2d").createPattern(a,"repeat");this.progressDiv.width=
this.currDiv.width;this.progressDiv.height=a.height;this.progressDiv.style.marginTop="0px";this.progressDiv.style.marginLeft=this.thumbDiv.width/2+"px";this.progressDiv.maxFrameWidth=this.progressDiv.width;this.progressDiv.maxFrameHeight=this.progressDiv.height;this.progressDiv.style.marginTop=0==cp.PB.MP.PBP.tworow?(this.playBarDiv.height-this.progressDiv.height)/2+"px":(this.playBarDiv.height/2-this.progressDiv.height)/2+"px";this.currDiv.width+=this.thumbDiv.width;this.currDiv.style.width=this.currDiv.width+
"px";this.currDiv.height=this.playBarDiv.height;cp.device==cp.IDEVICE?this.thumbDiv.ontouchstart=this.onMouseDown:this.thumbDiv.onmousedown=this.onMouseDown;a=parseFloat(window.getComputedStyle(this.thumbDiv).top.replace("px",""));if(1==cp.PB.MP.PBP.tworow){var b=0;cp.responsive&&(b=-this.thumbDiv.clientHeight/2);this.thumbDiv.style.top=a+b+this.playBarDiv.height/2+(this.playBarDiv.height/2-this.progressDiv.height)/2+"px"}else this.thumbDiv.style.top=a+(this.playBarDiv.height-this.progressDiv.height)/
2+"px";cp.pg||cp.createAlternativeAccessibleText(this.thumbDiv,"Progress, Slide "+(cpInfoCurrentSlideIndex+1)+" of "+cp.movie.stage.slides.length,"slider")},refresh:function(){cp.responsive?this.updateSlider(cpInfoCurrentFrameAtLayerZero):this.updateSlider(1)},onMouseDown:function(a){this.underDrag=!0;cp.em&&cp.em.fireEvent("CPStartPlaybarScrubbing");this.style.position="absolute";var b=document.getElementById("playbarSliderThumb").progressDiv,c=b.progLen,d=document.onmousemove,f=document.onmouseup;
cp.device==cp.IDEVICE&&(d=document.ontouchmove,f=document.ontouchend);var g=a;cp.device==cp.IDEVICE&&(g=a.touches[0]);a=function(a){cp.playbarMoved();a.stopPropagation();var d=a;if(cp.device==cp.IDEVICE){d=a.touches[0];a.preventDefault()}a=0;a=cp.PB.isVertical?d.clientY-g.clientY:d.clientX-g.clientX;if(a!=0){d=Math.round((c+a)*cp.PB.MP.project_main.to/b.width);if(d<1)d=1;else if(cp.frame>cp.PB.MP.project_main.to)d=cp.PB.MP.project_main.to;if(cp.PB.mainMovie&&!cp.PB.mainMovie.virgin){cp.PB.mainMovie.pause(cp.ReasonForPause.PLAYBAR_ACTION);
cp.PB.mainMovie.jumpToFrame(d)}}};cp.device==cp.IDEVICE?document.ontouchmove=a:document.onmousemove=a;a=function(){if(cp.device==cp.IDEVICE){document.ontouchmove=d;document.ontouchend=f}else{document.onmousemove=d;document.onmouseup=f}cp.em&&cp.em.fireEvent("CPEndPlaybarScrubbing")};cp.device==cp.IDEVICE?document.ontouchend=a:document.onmouseup=a;return!1},moveSlider:function(a){if(!cp.movie.stage.hasOverlaySlide()){cp.playbarMoved();var b=void 0==a.offsetX?a.layerX-a.currentTarget.offsetLeft:a.offsetX;
isNaN(b)&&("tap"===a.type&&a.gesture&&a.gesture.center)&&(b=a.gesture.center.pageX-a.currentTarget.offsetLeft);a=Math.round(b*cp.PB.MP.project_main.to/this.width);1>a?a=1:a>cp.PB.MP.project_main.to&&(a=cp.PB.MP.project_main.to);cp.PB.mainMovie&&!cp.PB.mainMovie.virgin&&(cp.PB.mainMovie.pause(cp.ReasonForPause.PLAYBAR_ACTION),cp.PB.mainMovie.jumpToFrame(a))}},updateSlider:function(a){a>cp.PB.MP.project_main.to&&(a=cp.PB.MP.project_main.to);var b=this.progressDiv;null==b&&(b=this);var c=b.getContext("2d");
c.clearRect(0,0,b.width,b.height);c.fillStyle=b.thumbBasePattern;c.fillRect(0,0,b.width,b.height);c.fillStyle=b.progressPattern;c.fillRect(0,0,b.width*a/cp.PB.MP.project_main.to,b.height);b.progLen=b.width*a/cp.PB.MP.project_main.to;b.thumbDiv.style.marginLeft=b.progLen+"px";b.thumbDiv.title=cpInfoCurrentSlideIndex+1+"/"+cp.movie.stage.slides.length;cp.modifyAlternativeAccessibleText(this.thumbDiv,"Progress, Slide "+(cpInfoCurrentSlideIndex+1)+" of "+cp.movie.stage.slides.length)}};
cp.PB.playBarConstruct=function(a){this.playBarDiv=a;this.slider=this.bkGrndDiv=null;this.firstRowArray=[];this.secondRowArray=[];this.btnMap={};this.secondRowMinWidth=this.firstRowMinWidth=this.minWidth=0;this.logo=null};
cp.PB.playBarConstruct.prototype={createSlider:function(a,b,c){this.slider&&cp.responsive&&this.slider.destroy();if(void 0==cp.PB.MP.playBarProperties.hasSlider||0==cp.PB.MP.playBarProperties.hasSlider)return 0;this.slider=new cp.PB.PlayBarSlider(this.bkGrndDiv);if(this.slider.getWidth()+4*cp.PB.kBtnMargin+c+2*cp.PB.kIndentMargin>cp.PB.playBarDim)return this.slider.destroy(),0;b[b.length]=this.slider;this.slider.expectedWidth=this.slider.getWidth();return this.slider.expectedWidth+4*cp.PB.kBtnMargin},
createBackground:function(){var a=document.getElementById("playbarBkGrnd");a.height=a.clientHeight;this.bkGrndDiv=a},setBackGroundWidth:function(a){this.bkGrndDiv.width=a;this.bkGrndDiv.style.width=a+"px";a=cp.PB.loadedAssetArr.BackGround.src;if(cp.PB.MP.PBP.applyColors){var b=document.createElement("canvas");b.width=this.bkGrndDiv.width;b.height=this.bkGrndDiv.height;a=b.getContext("2d");a.clearRect(0,0,this.bkGrndDiv.width,this.bkGrndDiv.height);a.globalAlpha=cp.PB.MP.PBP.alpha/100;cp.setFillStrokeStyle(cp.PB.MP.PBP.BkColor,
b);a.fillRect(0,0,this.bkGrndDiv.width,this.bkGrndDiv.height);""==this.bkGrndDiv.style.backgroundImage&&(a=b.toDataURL("image/png"),this.bkGrndDiv.style.backgroundImage='url("'+a+'")');this.bkGrndDiv.style.backgroundSize="100% 100%"}else b=document.createElement("canvas"),this.bkGrndDiv.insertBefore(b,this.bkGrndDiv.firstChild),b.width=this.bkGrndDiv.width,b.height=this.bkGrndDiv.height,b.style.position="absolute",b.style.display="block",a=b.getContext("2d"),a.clearRect(0,0,this.bkGrndDiv.width,this.bkGrndDiv.height),
a.globalAlpha=cp.PB.MP.PBP.alpha/100,a.drawImage(cp.PB.loadedAssetArr.BackGround,0,0,this.bkGrndDiv.width,this.bkGrndDiv.height),b.style.zIndex=-10},createButton:function(a,b,c,d,f,g){var e,h;if(cp.responsive&&(e=this.btnMap[b[0]]))e.currDiv&&(h=e.currDiv.currImageName),e.destroy();if(b[0]!=cp.PB.Btns.kBtnInfo&&b[0]!=cp.PB.Btns.kBtnPrint){if(void 0==cp.PB.MP.playBarProperties["has"+b[0]]||0==cp.PB.MP.playBarProperties["has"+b[0]])return 0}else if(b[0]==cp.PB.Btns.kBtnInfo&&!1==cp.PB.playbarHasInfo||
b[0]==cp.PB.Btns.kBtnPrint&&!1==cp.PB.playbarHasPrint)return 0;if(void 0==cp.PB.loadedAssetArr[b[0]])return 0;e=new cp.PB.PlayBarButton(b[0],this.bkGrndDiv,d);if(e.getWidth()+cp.PB.kBtnMargin+f+2*cp.PB.kIndentMargin>cp.PB.playBarDim)return e.destroy(),0;e.setImage("Shadow");e.setImage("Stroke");e.setImage("Color");e.setImage("Shade");e.setImage("InnerStroke");e.setImage("Glow");e.setImage("InnerShade");a&&(e.currDiv.style.display="block");for(d=0;d<b.length;++d)e.setIcon(b[d]),a&&e.changeImage(h),
this.btnMap[b[d]]=e;e.currDiv.id=b[0];e.currDiv.setAttribute("tabindex",g);cp.createAlternativeAccessibleText(e.currDiv,cp.localizeToolTips(b[0]),"");e.currDiv.onmouseover=e.onMouseOver;cp.clearStaticGestureCache(e.currDiv);cp.registerGestureEvent(e.currDiv,cp.GESTURE_EVENT_TYPES.TOUCH,e.onMouseOver,!0);e.currDiv.ontouchstart=e.onMouseOver;cp.registerGestureEvent(e.currDiv,cp.GESTURE_EVENT_TYPES.TAP,e.toggleImage,!0,!0);e.currDiv.ontouchend=e.onMouseOut;e.currDiv.onmouseout=e.onMouseOut;c[c.length]=
e;e.expectedWidth=e.getWidth();b[0]==cp.PB.Btns.kBtnExit&&cp.PB.hideExitButton&&(e.currDiv&&e.currDiv.style.display)&&(e.currDiv.style.display="none");return e.expectedWidth+cp.PB.kBtnMargin},createLogo:function(a,b){if(!1==cp.PB.playbarHasLogo)return 0;var c;a?(c=document.getElementById("playbarLogo"),this.bkGrndDiv.removeChild(c),this.bkGrndDiv.appendChild(c)):(c=document.createElement("div"),c.id="playbarLogo",this.bkGrndDiv.appendChild(c),c.setAttribute("class","playbarLogo"));c.style.marginTop=
0==cp.PB.MP.PBP.tworow?(this.bkGrndDiv.height-c.clientHeight)/2+"px":"0px";if(c.clientWidth+cp.PB.kBtnMargin+b+2*cp.PB.kIndentMargin>cp.PB.playBarDim)return this.bkGrndDiv.removeChild(c),0;this.logo=c;return c.clientWidth+cp.PB.kBtnMargin},initComponents:function(a){var b=cp.D.quizzingData.quizBranchAware;if(0==cp.PB.MP.PBP.tworow){for(var c=cp.PB.kIndentMargin,d=0,d=void 0==this.slider&&!b?1<this.firstRowArray.length?(this.bkGrndDiv.width-this.firstRowMinWidth)/(this.firstRowArray.length-1):(this.bkGrndDiv.width-
this.firstRowMinWidth)/2:0,b=0;b<this.firstRowArray.length;++b)cp.responsive&&0>=this.firstRowArray[b].expectedWidth||(c=this.firstRowArray[b].setPosNWidth(a,c,0,this.firstRowArray[b].expectedWidth),c+=d);null!=this.logo&&(this.logo.style.marginLeft=c+"px")}else{for(var c=cp.PB.kIndentMargin,d=1<this.firstRowArray.length?(this.bkGrndDiv.width-this.firstRowMinWidth)/(this.firstRowArray.length-1):(this.bkGrndDiv.width-this.firstRowMinWidth)/2,f=0,b=0;b<this.firstRowArray.length;++b)c=this.firstRowArray[b].setPosNWidth(a,
c,(this.bkGrndDiv.height/2-this.firstRowArray[b].currDiv.height)/2,this.firstRowArray[b].expectedWidth),c+=d,f<(this.bkGrndDiv.height/2+this.firstRowArray[b].currDiv.height)/2&&(f=(this.bkGrndDiv.height/2+this.firstRowArray[b].currDiv.height)/2);c=cp.PB.kIndentMargin;d=void 0==this.slider?1<this.secondRowArray.length?(this.bkGrndDiv.width-this.secondRowMinWidth)/(this.secondRowArray.length-1):(this.bkGrndDiv.width-this.secondRowMinWidth)/2:0;for(b=0;b<this.secondRowArray.length;++b)c=this.secondRowArray[b].setPosNWidth(a,
c,this.bkGrndDiv.height/2-f+(this.bkGrndDiv.height/2-this.secondRowArray[b].currDiv.height)/2,this.secondRowArray[b].expectedWidth),c+=d;null!=this.logo&&(this.logo.style.marginLeft=c+"px",this.logo.style.marginTop=this.bkGrndDiv.height/2-f+(this.bkGrndDiv.height/2-this.secondRowArray[b].currDiv.height)/2+"px")}},transformPlaybar:function(){var a="matrix(",a=cp.PB.isVertical?a+"0,1,-1,0,":a+"1,0,0,1,";this.playBarDiv.style.left="0px";this.playBarDiv.style.top="0px";var b=0,c=0;switch(cp.PB.MP.PBP.position){case 2:b+=
cp.PB.playBarOtherDim,cp.PB.MP.PBP.overlay&&(b-=this.bkGrndDiv.height);case 0:b+=(-this.bkGrndDiv.width+this.bkGrndDiv.height)/2;cp.loadedModules.toc&&(1==cp.toc.movieProperties.tocProperties.position&&0!=cp.PB.MP.PBP.position&&!(2==cp.PB.MP.PBP.position&&cp.toc.movieProperties.tocProperties.overlay))&&(b+=cp.D.tocProperties.width);switch(cp.PB.MP.PBP.layout){case 0:c=(this.bkGrndDiv.width-this.bkGrndDiv.height)/2;break;case 1:c=(cp.PB.playBarDim-this.bkGrndDiv.height)/2;break;case 2:c=cp.PB.playBarDim-
(this.bkGrndDiv.width+this.bkGrndDiv.height)/2;break;case 3:c=(cp.PB.playBarDim-this.bkGrndDiv.height)/2}break;case 3:c+=cp.PB.playBarOtherDim,cp.PB.MP.PBP.overlay&&(c-=this.bkGrndDiv.height);case 1:switch(cp.PB.MP.PBP.layout){case 0:b=0;break;case 1:b=cp.PB.playBarDim-this.bkGrndDiv.width;break;case 2:b=(cp.PB.playBarDim-this.bkGrndDiv.width)/2;break;case 3:b=0}cp.loadedModules.toc&&(1==cp.toc.movieProperties.tocProperties.position&&!cp.toc.movieProperties.tocProperties.overlay)&&(b+=cp.D.tocProperties.width)}cp.applyTransform(this.playBarDiv,
a+(b+","+c+")"))},applyColor:function(a,b){var c=document.createElement("canvas"),d=document.createElement("canvas");d.width=b.width;d.height=b.height;c.width=b.width;c.height=b.height;var f=c.getContext("2d");f.clearRect(0,0,b.width,b.height);cp.setFillStrokeStyle(a,c,void 0,!0);f.fillRect(0,0,b.width,b.height);f=d.getContext("2d");f.clearRect(0,0,b.width,b.height);f.globalAlpha=a.alpha/100;f.drawImage(b,0,0,b.width,b.height);f.globalCompositeOperation="source-atop";f.drawImage(c,0,0,b.width,b.height);
return d},setHasButtons:function(){if(cp.responsive&&cp.PB&&(cp.PB.MP&&cp.PB.MP.PBP)&&cp.responsiveButtons){cp.PB.MP.PBPO||(cp.PB.MP.PBPO={});var a=cp.responsiveAllBPWidths.indexOf(cp.ResponsiveProjWidth);if(!(0>a||a>=cp.responsiveAllBPWidths.length)){var a=cp.responsiveAllBPWidths.length-1-a,b;for(b in cp.responsiveButtons){if(void 0===cp.PB.MP.PBPO["has"+b]||"undefined"===cp.PB.MP.PBPO["has"+b])cp.PB.MP.PBPO["has"+b]=cp.PB.MP.PBP["has"+b];cp.PB.MP.PBPO["has"+b]&&(cp.PB.MP.PBP["has"+b]=cp.responsiveButtons[b][a])}}}},
refreshPlaybarButtons:function(){if(0==cp.PB.MP.PBP.tworow)for(var a=0;a<this.firstRowArray.length;++a)this.firstRowArray[a].refresh();else{for(a=0;a<this.firstRowArray.length;++a)this.firstRowArray[a].refresh();for(a=0;a<this.secondRowArray.length;++a)this.secondRowArray[a].refresh()}},layoutPlaybar:function(a){this.firstRowArray=[];this.secondRowArray=[];var b=0,c=-cp.PB.kBtnMargin;cp.PB.isVertical=0==cp.PB.MP.PBP.position%2?!0:!1;cp.responsive?(this.setHasButtons(),cp("project").clientWidth*cp.respGestureScaleFactor>
window.innerWidth?cp.PB.playBarDim=window.innerWidth:cp.PB.MP.PBP.showOnHover?(b=document.body.style.overflow,document.body.style.overflow="hidden",cp.PB.playBarDim=cp("project").clientWidth,document.body.style.overflow=b):cp.PB.playBarDim=cp("project").clientWidth):cp.PB.playBarDim=cp.PB.isVertical?cp.PB.MP.project.h:cp.PB.MP.project.w;cp.PB.playBarOtherDim=!1==cp.PB.isVertical?cp.PB.MP.project.h:cp.PB.MP.project.w;this.createBackground(cp.PB.playBarDim);cp.IDEVICE!==cp.device&&cp.device!==cp.ANDROID&&
cp.PB.MP.playBarProperties&&(cp.PB.MP.playBarProperties.hasEnterVR=!1);if(cp.PB.MP.PBP.tworow)c+=this.createButton(a,[cp.PB.Btns.kBtnRewind],this.firstRowArray,this.rewindHandler,c),c+=this.createButton(a,[cp.PB.Btns.kBtnBackward],this.firstRowArray,this.backwardHandler,c),c+=this.createButton(a,[cp.PB.Btns.kBtnPlay,cp.PB.Btns.kBtnPause],this.firstRowArray,this.playPauseHandler,c),c+=this.createButton(a,[cp.PB.Btns.kBtnVR],this.firstRowArray,this.enterVRHandler,c),c+=this.createButton(a,[cp.PB.Btns.kBtnForward],
this.firstRowArray,this.forwardHandler,c),c+=this.createButton(a,[cp.PB.Btns.kBtnFastForward,cp.PB.Btns.kBtnFastForward1,cp.PB.Btns.kBtnFastForward2],this.firstRowArray,this.fastForwardHandler,c),this.firstRowMinWidth=c+=2*cp.PB.kIndentMargin,c=-cp.PB.kBtnMargin,c+=this.createButton(a,[cp.PB.Btns.kBtnTOC],this.secondRowArray,this.tocHandler,c),c+=this.createButton(a,[cp.PB.Btns.kBtnPrint],this.secondRowArray,this.printHandler,c),c+=this.createButton(a,[cp.PB.Btns.kBtnExit],this.secondRowArray,this.exitHandler,
c),d=this.createSlider(a,this.secondRowArray,c),cp.device!=cp.IDEVICE&&(c+=this.createButton(a,[cp.PB.Btns.kBtnAudioOn,cp.PB.Btns.kBtnAudioOff],this.secondRowArray,this.audioOnOffHandler,c)),c+=this.createButton(a,[cp.PB.Btns.kBtnCC],this.secondRowArray,this.ccHandler,c),c+=this.createButton(a,[cp.PB.Btns.kBtnInfo],this.secondRowArray,this.showInfoHandler,c),c+=this.createLogo(a,c),c+=2*cp.PB.kIndentMargin,this.secondRowMinWidth=c+d,this.minWidth=this.firstRowMinWidth>this.secondRowMinWidth?this.firstRowMinWidth:
this.secondRowMinWidth,3==cp.PB.MP.PBP.layout?(b=cp.PB.playBarDim,void 0!=this.slider&&(d=b-c-4*cp.PB.kBtnMargin,this.slider.expectedWidth=d,cp.responsive&&58>=this.slider.expectedWidth&&(this.slider.destroy(),this.slider=void 0))):b=this.minWidth;else{if(0===cp.D.pref.rkt){var c=c+this.createButton(a,[cp.PB.Btns.kBtnRewind],this.firstRowArray,this.rewindHandler,c,10001),c=c+this.createButton(a,[cp.PB.Btns.kBtnPlay,cp.PB.Btns.kBtnPause],this.firstRowArray,this.playPauseHandler,c,10002),c=c+this.createButton(a,
[cp.PB.Btns.kBtnVR],this.firstRowArray,this.enterVRHandler,c,10003),c=c+this.createButton(a,[cp.PB.Btns.kBtnBackward],this.firstRowArray,this.backwardHandler,c,10004),c=c+this.createButton(a,[cp.PB.Btns.kBtnForward],this.firstRowArray,this.forwardHandler,c,10005),c=c+this.createButton(a,[cp.PB.Btns.kBtnFastForward,cp.PB.Btns.kBtnFastForward1,cp.PB.Btns.kBtnFastForward2],this.firstRowArray,this.fastForwardHandler,c,10006),d=this.createSlider(a,this.firstRowArray,c);cp.device!=cp.IDEVICE&&(c+=this.createButton(a,
[cp.PB.Btns.kBtnAudioOn,cp.PB.Btns.kBtnAudioOff],this.firstRowArray,this.audioOnOffHandler,c,10008));c+=this.createButton(a,[cp.PB.Btns.kBtnCC],this.firstRowArray,this.ccHandler,c,10009);c+=this.createButton(a,[cp.PB.Btns.kBtnTOC],this.firstRowArray,this.tocHandler,c,10010);c+=this.createButton(a,[cp.PB.Btns.kBtnPrint],this.firstRowArray,this.printHandler,c,10011);c+=this.createButton(a,[cp.PB.Btns.kBtnExit],this.firstRowArray,this.exitHandler,c,10012);c+=this.createButton(a,[cp.PB.Btns.kBtnInfo],
this.firstRowArray,this.showInfoHandler,c,10013)}else c+=this.createButton(a,[cp.PB.Btns.kBtnRewind],this.firstRowArray,this.rewindHandler,c,-1),c+=this.createButton(a,[cp.PB.Btns.kBtnPlay,cp.PB.Btns.kBtnPause],this.firstRowArray,this.playPauseHandler,c,-1),c+=this.createButton(a,[cp.PB.Btns.kBtnVR],this.firstRowArray,this.enterVRHandler,c,-1),c+=this.createButton(a,[cp.PB.Btns.kBtnBackward],this.firstRowArray,this.backwardHandler,c,-1),c+=this.createButton(a,[cp.PB.Btns.kBtnForward],this.firstRowArray,
this.forwardHandler,c,-1),c+=this.createButton(a,[cp.PB.Btns.kBtnFastForward,cp.PB.Btns.kBtnFastForward1,cp.PB.Btns.kBtnFastForward2],this.firstRowArray,this.fastForwardHandler,c,-1),d=this.createSlider(a,this.firstRowArray,c),cp.device!=cp.IDEVICE&&(c+=this.createButton(a,[cp.PB.Btns.kBtnAudioOn,cp.PB.Btns.kBtnAudioOff],this.firstRowArray,this.audioOnOffHandler,c,-1)),c+=this.createButton(a,[cp.PB.Btns.kBtnCC],this.firstRowArray,this.ccHandler,c,-1),c+=this.createButton(a,[cp.PB.Btns.kBtnTOC],this.firstRowArray,
this.tocHandler,c,-1),c+=this.createButton(a,[cp.PB.Btns.kBtnPrint],this.firstRowArray,this.printHandler,c,-1),c+=this.createButton(a,[cp.PB.Btns.kBtnExit],this.firstRowArray,this.exitHandler,c,-1),c+=this.createButton(a,[cp.PB.Btns.kBtnInfo],this.firstRowArray,this.showInfoHandler,c,-1);c+=this.createLogo(a,c);this.minWidth=this.firstRowMinWidth=c+=2*cp.PB.kIndentMargin;3==cp.PB.MP.PBP.layout?(b=cp.PB.playBarDim,void 0!=this.slider&&(d=b-c-4*cp.PB.kBtnMargin,this.slider.expectedWidth=d,cp.responsive&&
58>=this.slider.expectedWidth&&(this.slider.destroy(),this.slider=void 0))):b=c+d}this.setBackGroundWidth(b);this.initComponents(a);cp.responsive||this.transformPlaybar();this.playBarDiv.constrObj=this;this.playBarDiv.play=this.onMovieResume;this.playBarDiv.pause=this.onMoviePaused;this.playBarDiv.mute=this.onAudioOff;this.playBarDiv.unmute=this.onAudioOn;cp.handleSpecialForPlaybar(this);cp.PB.MP.PBP.showOnHover&&!cp("playbar").animator&&(a=new cp.PB.playbarAnimator(this.playBarDiv),a.init(cp.PB.playBarHeight),
this.playBarDiv.animator=a)},morphImages:function(){for(var a=0;a<cp.playbarAssetArr.length;++a){var b=cp.PB.loadedAssetArr[cp.playbarAssetArr[a]];if(void 0!=b){var c=b.playbarassetName,c=c.replace("Small","");if("Glow"==c||"Progress"==c)cp.PB.loadedAssetArr[cp.playbarAssetArr[a]]=this.applyColor(cp.PB.MP.PBP.GlowColor,b);else if("Color"==c||"ThumbBase"==c)cp.PB.loadedAssetArr[cp.playbarAssetArr[a]]=this.applyColor(cp.PB.MP.PBP.FaceColor,b);else if(c==cp.PB.Btns.kBtnAudioOff||c==cp.PB.Btns.kBtnAudioOn||
c==cp.PB.Btns.kBtnBackward||c==cp.PB.Btns.kBtnCC||c==cp.PB.Btns.kBtnExit||c==cp.PB.Btns.kBtnFastForward||c==cp.PB.Btns.kBtnFastForward1||c==cp.PB.Btns.kBtnFastForward2||c==cp.PB.Btns.kBtnForward||c==cp.PB.Btns.kBtnPlay||c==cp.PB.Btns.kBtnVR||c==cp.PB.Btns.kBtnPause||c==cp.PB.Btns.kBtnRewind||c==cp.PB.Btns.kBtnPrint||c==cp.PB.Btns.kBtnTOC)cp.PB.loadedAssetArr[cp.playbarAssetArr[a]]=this.applyColor(cp.PB.MP.PBP.IconColor,b)}}},exitHandler:function(){DoCPExit&&DoCPExit()},showInfoHandler:function(){cp.infoBgImg?
cp.showInfoDialog():(cp.infoBgImg=new Image,cp.infoBgImg.onload=function(){cp.showInfoDialog()},cp.infoBgImg.src="assets/playbar/PlaybarIcons/infobg.png")},printHandler:function(){window.print()},audioOnOffHandler:function(){cp.toggleMute()},playPauseHandler:function(){cp.playPause(!0)},backwardHandler:function(){cp.goToPreviousSlide()},forwardHandler:function(){cp.goToNextSlide()},fastForwardHandler:function(){cp.fastForward();cp.movie.play(cp.ReasonForPlay.PLAYBAR_ACTION)},rewindHandler:function(){cp.rewind()},
ccHandler:function(){cp.showHideCC()},tocHandler:function(){cp.showHideTOC()},enterVRHandler:function(){cp.enterVR()},onMoviePaused:function(){var a=this.constrObj;void 0!=a&&void 0!=a.btnMap[cp.PB.Btns.kBtnPause]&&a.btnMap[cp.PB.Btns.kBtnPause].changeImage(cp.PB.Btns.kBtnPlay)},onMovieResume:function(){var a=this.constrObj;void 0!=a&&void 0!=a.btnMap[cp.PB.Btns.kBtnPlay]&&a.btnMap[cp.PB.Btns.kBtnPlay].changeImage(cp.PB.Btns.kBtnPause)},onAudioOn:function(){var a=this.constrObj;void 0!=a&&void 0!=
a.btnMap[cp.PB.Btns.kBtnAudioOff]&&a.btnMap[cp.PB.Btns.kBtnAudioOff].changeImage(cp.PB.Btns.kBtnAudioOn)},onAudioOff:function(){var a=this.constrObj;void 0!=a&&void 0!=a.btnMap[cp.PB.Btns.kBtnAudioOn]&&a.btnMap[cp.PB.Btns.kBtnAudioOn].changeImage(cp.PB.Btns.kBtnAudioOff)},playbarAssetsLoaded:function(a){a&&a.target&&(a=a.target.playbarassetName,!1==cp.PB.assetsLoadedArray[a]&&(cp.PB.assetsLoadedArray[a]=!0,cp.PB.assetsLoaded++));cp.PB.assetsLoaded==cp.playbarAssetArr.length&&(cp.PB.MP.PBP.applyColors&&
this.parentObj.morphImages(),this.parentObj.layoutPlaybar(),cp.PB.playbarCreated=!0,cp.complete())},createBkDiv:function(){if(!(0<document.getElementsByClassName("playbarBackGround").length)){var a=document.createElement("div");this.playBarDiv.appendChild(a);a.setAttribute("class","playbarBackGround");a.style.webkitBoxShadow="";a.style.boxShadow="";a.style.mozBoxShadow="";a.id="playbarBkGrnd";cp.PB.MP.PBP.tworow&&(a.style.height=2*a.clientHeight+"px");a=parseFloat(window.getComputedStyle(a).height.replace("px",
""));cp.PB.playBarHeight=a;cp.PB.MP.PBP.playBarHeight=a;if(cp.PB.MP.PBP.overlay)cp.setMovieLeftTopRightBottom(0,0,0,0);else{var b=0,c=0,d=0,f=0;0==cp.PB.MP.PBP.position?b=a:1==cp.PB.MP.PBP.position?c=a:2==cp.PB.MP.PBP.position?d=a:3==cp.PB.MP.PBP.position&&(f=a);cp.setMovieLeftTopRightBottom(b,c,d,f)}3==cp.PB.MP.PBP.position?cp.setCCPosition(a):cp.setCCPosition(0)}},loadPlaybarAssets:function(){for(var a=0;a<cp.playbarAssetArr.length;++a){var b=new Image;b.playbarassetName=cp.playbarAssetArr[a];cp.playbarAssetArr[a]==
cp.PB.Btns.kBtnLogo&&(cp.PB.playbarHasLogo=!0);cp.playbarAssetArr[a]==cp.PB.Btns.kBtnInfo&&(cp.PB.playbarHasInfo=!0);cp.playbarAssetArr[a]==cp.PB.Btns.kBtnPrint&&(cp.PB.playbarHasPrint=!0);b.parentObj=this;cp.PB.loadedAssetArr[cp.playbarAssetArr[a]]=b;b.onload=this.playbarAssetsLoaded;b.onerror=this.playbarAssetsLoaded;b.src=cp.PB.playBarIconsFolder+cp.playbarAssetArr[a]+cp.PB.PNGSuffix}},shrinkPlaybarAssetsArr:function(){var a={},b;for(b in cp.PB.Btns)a[cp.PB.Btns[b]]=cp.playbarAssetArr.indexOf(cp.PB.Btns[b]);
!cp.PB.MP.PBP.hasRewind&&0<=a[cp.PB.Btns.kBtnRewind]&&delete cp.playbarAssetArr[a[cp.PB.Btns.kBtnRewind]];!cp.PB.MP.PBP.hasBackward&&0<=a[cp.PB.Btns.kBtnBackward]&&delete cp.playbarAssetArr[a[cp.PB.Btns.kBtnBackward]];!cp.PB.MP.PBP.hasForward&&0<=a[cp.PB.Btns.kBtnForward]&&delete cp.playbarAssetArr[a[cp.PB.Btns.kBtnForward]];!cp.PB.MP.PBP.hasCC&&0<=a[cp.PB.Btns.kBtnCC]&&delete cp.playbarAssetArr[a[cp.PB.Btns.kBtnCC]];!cp.PB.MP.PBP.hasExit&&0<=a[cp.PB.Btns.kBtnExit]&&delete cp.playbarAssetArr[a[cp.PB.Btns.kBtnExit]];
cp.PB.MP.PBP.hasPlay||(0<=a[cp.PB.Btns.kBtnPlay]&&delete cp.playbarAssetArr[a[cp.PB.Btns.kBtnPlay]],0<=a[cp.PB.Btns.kBtnPause]&&delete cp.playbarAssetArr[a[cp.PB.Btns.kBtnPause]]);cp.PB.MP.PBP.hasSlider||(0<=a[cp.PB.Btns.kBtnProgress]&&delete cp.playbarAssetArr[a[cp.PB.Btns.kBtnProgress]],0<=a[cp.PB.Btns.kBtnThumb]&&delete cp.playbarAssetArr[a[cp.PB.Btns.kBtnThumb]],0<=a[cp.PB.Btns.kBtnThumbBase]&&delete cp.playbarAssetArr[a[cp.PB.Btns.kBtnThumbBase]]);cp.PB.MP.PBP.hasAudioOn||(0<=a[cp.PB.Btns.kBtnAudioOn]&&
delete cp.playbarAssetArr[a[cp.PB.Btns.kBtnAudioOn]],0<=a[cp.PB.Btns.kBtnAudioOff]&&delete cp.playbarAssetArr[a[cp.PB.Btns.kBtnAudioOff]]);cp.PB.MP.PBP.hasFastForward||(0<=a[cp.PB.Btns.kBtnFastForward]&&delete cp.playbarAssetArr[a[cp.PB.Btns.kBtnFastForward]],0<=a[cp.PB.Btns.kBtnFastForward1]&&delete cp.playbarAssetArr[a[cp.PB.Btns.kBtnFastForward1]],0<=a[cp.PB.Btns.kBtnFastForward2]&&delete cp.playbarAssetArr[a[cp.PB.Btns.kBtnFastForward2]]);(!cp.PB.MP.project.hasTOC||!cp.PB.MP.tocProperties.overlay)&&
0<=a[cp.PB.Btns.kBtnTOC]&&delete cp.playbarAssetArr[a[cp.PB.Btns.kBtnTOC]];a=!1;for(b in cp.PB.Btns)cp.playbarAssetArr.indexOf(0<=cp.PB.Btns[b])&&(a=!0);if(!a)for(b=0;b<cp.PB.BtnStyleImages.length;++b)a=cp.playbarAssetArr.indexOf(cp.PB.BtnStyleImages[b]),0<=a&&cp.playbarAssetArr.splice(a,1);for(b=cp.playbarAssetArr.length-1;0<=b;--b)void 0==cp.playbarAssetArr[b]&&cp.playbarAssetArr.splice(b,1)}};
cp.loadplaybar=function(){!0!=cp.PB.playbarCreated?(cp.PB.rootObj.createBkDiv(),cp.PB.rootObj.shrinkPlaybarAssetsArr(),cp.PB.rootObj.loadPlaybarAssets()):cp.PB.rootObj.layoutPlaybar(!0)};cp.PB.playbarAnimator=function(a){this.endVal=this.startVal=0;this.param="";this.objDiv=a;this.totalSteps=25;this.currStep=0;this.direction=1;this.intervalId=this.timeoutId=-1;this.isAnimating=!1};
cp.PB.playbarAnimator.prototype={init:function(a){3==cp.PB.MP.PBP.position?(this.startVal=cp.responsive?cp("div_Slide").getBoundingClientRect().bottom-a:parseFloat(window.getComputedStyle(this.objDiv).top.replace("px","")),this.endVal=this.startVal+a,this.param="top"):2==cp.PB.MP.PBP.position?(this.startVal=cp.responsive?this.objDiv.getBoundingClientRect().left:parseFloat(window.getComputedStyle(this.objDiv).left.replace("px","")),this.endVal=this.startVal+a,cp.loadedModules.toc&&0==cp.toc.movieProperties.tocProperties.position&&
(this.endVal+=cp.toc.movieProperties.tocProperties.width),this.param="left"):1==cp.PB.MP.PBP.position?(this.startVal=cp.responsive?this.objDiv.getBoundingClientRect().top:parseFloat(window.getComputedStyle(this.objDiv).top.replace("px","")),this.endVal=this.startVal-a,this.param="top"):0==cp.PB.MP.PBP.position&&(this.startVal=cp.responsive?this.objDiv.getBoundingClientRect().left:parseFloat(window.getComputedStyle(this.objDiv).left.replace("px","")),this.endVal=this.startVal-a,cp.loadedModules.toc&&
1==cp.toc.movieProperties.tocProperties.position&&(this.endVal-=cp.toc.movieProperties.tocProperties.width),this.param="left")},resetStartEndValForResponsive:function(){cp.responsive&&(this.startVal=cp("div_Slide").getBoundingClientRect().bottom-cp.PB.playBarHeight,this.endVal=this.startVal+cp.PB.playBarHeight)},startTimer:function(){clearTimeout(this.timeoutId);this.timeoutId=setTimeout(this.hidePlaybar,2E3)},easeOut:function(a,b){var c=a+Math.pow(1/this.totalSteps*this.currStep,0.3)*(b-a);return Math.ceil(c)},
beginAnim:function(){var a=document.getElementById("playbar");if(null!=a){a.style.position="absolute";var b=a.animator;b.direction?(b.currStep++,b.currStep>=b.totalSteps?(clearInterval(b.intervalId),b.currStep=0,b.isAnimating=!1,a.style[b.param]=b.endVal+"px"):a.style[b.param]=b.easeOut(b.startVal,b.endVal)+"px"):(b.currStep++,b.currStep>=b.totalSteps?(clearInterval(b.intervalId),b.currStep=0,b.isAnimating=!1,a.style[b.param]=b.startVal+"px"):a.style[b.param]=b.easeOut(b.endVal,b.startVal)+"px")}},
hidePlaybar:function(){var a=document.getElementById("playbar");a&&(clearTimeout(a.animator.timeoutId),a.animator.direction=1,a.animator.isAnimating=!0,clearInterval(a.animator.intervalId),a.animator.playbarHidden=!0,a.animator.intervalId=setInterval(a.animator.beginAnim,20))},showPlaybar:function(a){var b=document.getElementById("playbar");if(b&&(clearTimeout(b.animator.timeoutId),a||(b.animator.timeoutId=setTimeout(b.animator.hidePlaybar,2E3)),!(b.animator.isAnimating&&0==b.animator.direction)&&
parseFloat(window.getComputedStyle(b)[b.animator.param].replace("px",""))!=this.startVal))b.animator.direction=0,b.animator.isAnimating=!0,clearInterval(b.animator.intervalId),b.animator.playbarHidden=!1,b.animator.intervalId=setInterval(b.animator.beginAnim,20)}};
cp.playBarInit=function(a,b){if(!cp.PB.playbarCreated){cp.PB.movieProperties=a;cp.PB.MP=cp.PB.movieProperties;cp.PB.MP.PBP=cp.PB.MP.playBarProperties;cp.PB.MP.PBP.locale&&(cp.PB.toolTipLocaleIndex=cp.PB.MP.PBP.locale);var c=document.getElementById("playbar");cp.PB.MP.PBP.hasPlayBar||(c.style.display="none",cp.setMovieLeftTopRightBottom(0,0,0,0));cp.PB.rootObj=new cp.PB.playBarConstruct(c);for(var d=0;d<cp.playbarAssetArr.length;d++)cp.PB.assetsLoadedArray[cp.playbarAssetArr[d]]=!1;cp.responsive||
(c.style.left=0==cp.PB.MP.PBP.position?"0px":(cp.PB.MP.project.hasTOC&&!cp.PB.MP.tocProperties.overlay?cp.D.tocProperties.width:0)+"px",c.style.top="0px");cp.PB.MP.project.hasTOC&&cp.PB.MP.tocProperties.overlay&&(cp.PB.MP.PBP.hasTOC=!0);cp.PB.MP.PBP.hasPlayBar&&cp.loadplaybar(b)}};cp.setPlaybarCallback=function(a){cp.PB.mainMovie=a};
cp.CPProjInit();cp.fireModuleReadyEvent=function(b){if((cp.IsRunningInACAP||!cp.isExpired&&cp.passwordAccepted)&&document.createEvent){var a=document.createEvent("Events");a.initEvent("moduleReadyEvent",!0,!0,null);a.Data=cp.currentWindow.cpAPIInterface;b.dispatchEvent(a)}};
cp.DoCPInit=function(){function b(){c();cp.Automate()}cp.disableInteractions=!1;cp.initializeGestureEvents&&cp.initializeGestureEvents();if(!cp.pg&&!cp.sbw&&(!cp.getIsBrowserSupported()&&!cp.isSupportedWebkitBasedBrowser())&&RuntimeBrowserDetect){var a="This browser does not support some of the content in the file you are trying to view. Use one of the following browsers:<ul><li>Internet Explorer 9 or later</li><li>Safari 5.1 or later</li><li>Google Chrome 17 or later</li><li>Firefox "+cp.FF_MIN_SUPPORTED_VERSION+
" or later</li></ul>",f="Adobe Captivate",e="OK";if(cp&&cp.model&&cp.model.data){var g=cp.model.data.rtDialog;g&&(a=g.rtUnsupportedBowser,-1!=a.indexOf("@FFVERSION")&&(a=a.replace("@FFVERSION",cp.FF_MIN_SUPPORTED_VERSION)),f=g.rtWarningTitle,e=g.rtokb)}RuntimeBrowserDetect.init(a,f,e)}cp.initiated=!1;var a=cp.model.uidToDataMap={},f=cp.model.data,d;for(d in f)e=f[d],e.hasOwnProperty("uid")&&(a[e.uid]=e);cp.LMSTypes={};cp.LMSTypes.NONE=0;cp.LMSTypes.SCORM2004=1;cp.LMSTypes.SCORM12=2;cp.LMSTypes.Authorware=
3;cp.LMSTypes.AICC=4;cp.LMSTypes.QuestionMark=5;cp.LMSTypes.Email=6;cp.LMSTypes.Breeze=7;cp.LMSTypes.Acrobat=8;cp.LMSTypes.InternalServer=9;cp.LMSTypes.TinCan=10;cp.PIBy180=Math.PI/180;var c=cp.ContinueCPInit;d=function(){jQuery(window).on("unload",function(){cp.UnloadActivties()})};cp.currentWindow=window;cp.parentWindow=window.parent;cp.topWindow=window.top;cp.setAllowForceQuitContainer=!0;try{cp.parentWindow.document&&cp.verbose&&console.log("tring to access document of parent window")}catch(h){cp.parentWindow=
cp.currentWindow}try{cp.topWindow.document&&cp.verbose&&console.log("tring to access document of top window")}catch(i){cp.topWindow=cp.currentWindow;try{for(;cp.topWindow.parent.document;)cp.topWindow=cp.topWindow.parent}catch(j){}}cp.IsRunningInACAP=1==cp.getParameterByName("capi_player");cp.IsRunningInALEC=1==cp.getParameterByName("CPinsideAlec");cp.IsRunningInRoboHelp="true"==cp.getParameterByName("CPinsideRH");cp.ACAPVideoStreamingURLMap={};cp.ACAPStreamingURLsLoaded=!1;cp.currentWindow.cpAPIInterface=
cp.IsRunningInACAP?new cp.ACAPInterfaceClass:cp.IsRunningInConnect()?new cp.ConnectInterfaceClass:new cp.CPAPIInterfaceClass;cp.currentWindow.cpAPIEventEmitter=cp.currentWindow.cpAPIInterface.getEventEmitter();if(cp.IsRunningInACAP)cp.fireModuleReadyEvent(cp.parentWindow),a={Name:"CPGetEvent"},a.cpName=a.Name,a.Data={},a.Data.ask="VideoManifest",a.Data.callback=cp.handleACAPStreamingURLs,a.cpData=a.Data,cp.currentWindow.cpAPIEventEmitter.trigger(a),a={Name:"CPGetEvent"},a.cpName=a.Name,a.Data={},
a.Data.ask="resumeData",a.Data.callback=cp.handleACAPResumeData,a.cpData=a.Data,cp.currentWindow.cpAPIEventEmitter.trigger(a),a={Name:"CPGetEvent"},a.cpName=a.Name,a.Data={},a.Data.ask="capiVariable",a.Data.askData="capiStudentName",a.Data.callback=cp.updateStudentNameVariableFromACAP,a.cpData=a.Data,cp.currentWindow.cpAPIEventEmitter.trigger(a),d();else{if(!cp.IsRunningInACAP&&cp.D&&cp.D.quizReportingData)switch(a=cp.D.quizReportingData.lmsType,cp.LMSDriverHolder=void 0,a){case cp.LMSTypes.SCORM2004:case cp.LMSTypes.SCORM12:cp.LMSDriverHolder=
window;c=cp.LoadActivities;d();break;case cp.LMSTypes.TinCan:a=cp.D.project_main.useResponsive;cp.LMSDriverHolder=cp.m_isLMSPreview&&a?window.parent.parent:cp.m_isLMSPreview?window.parent:window;c=cp.LoadActivities;d();cp.D.quizReportingData.lmsType=cp.LMSTypes.SCORM2004;break;case cp.LMSTypes.AICC:a=cp.D.project_main.useResponsive;cp.LMSDriverHolder=cp.m_isLMSPreview&&a?window.parent.parent:window.parent;cp.LMSDriverHolder.blockedForLMS||(cp.LMSDriverHolder.blockedForLMS=!0,cp("blockUserInteraction").style.display=
"block",cp("blockUserInteraction").style.width="100%",cp("blockUserInteraction").style.height="100%");c=cp.LMSDriverHolder.HTMLContentLoadedCallback;d();break;default:cp.LMSDriverHolder=void 0}c=cp.IsRunningInConnect()?cp.LoadActivities:c;c||(c=cp.ContinueCPInit,cp.NotRunningInLMS=!0);cp.pg&&window.device&&"iOS"===window.device.platform&&StatusBar&&StatusBar.overlaysWebView(!1);cp.pg&&window.device&&"Android"===window.device.platform?cp.Phonegap.loadResources(b):b()}};
cp.ContinueCPInit=function(){cp.CPPreInit();cp.QuizLibraryInit();cp.CPPostInit();"undefined"!=typeof CPAutomator&&CPAutomator.init();document.getElementById("playImage").focus();cp.initiated=!0;cp.complete()};
window.DoCPExit=function(){try{cp.em.fireEvent("CPMovieExit");if(cp.IsRunningInACAP||cp.IsRunningInALEC||cp.m_isLMSPreview){cp.currentWindow.open("goodbye.html","_self");return}if(cp.IsRunningInRoboHelp){var b=cp.currentWindow.open("","_self");b.close();return}cp.currentWindow!=cp.parentWindow&&cp.parentWindow&&cp.parentWindow.hasOwnProperty("DoCPExit")?cp.setAllowForceQuitContainer?cp.parentWindow.DoCPExit():cp.currentWindow.close():cp.IsRunningInConnect()?cp.setAllowForceQuitContainer?cp.parentWindow.close():
cp.currentWindow.close():cp.topWindow==self?(b=window.open("","_self"),b.close()):cp.setAllowForceQuitContainer?(b=cp.topWindow.open("","_self"),b.top.close()):(b=window.open("","_self"),b.close())}catch(a){}cp.pg&&navigator&&navigator.app&&"function"===typeof navigator.app.exitApp&&navigator.app.exitApp();cp.win8&&(window&&window.parent)&&window.parent.postMessage({name:"WIN8APPCLOSE",data:{}},"*");cp.currentWindow.open("goodbye.html","_self")};
cp.Automate=function(){"undefined"!=typeof CPAutomator&&CPAutomator.CPRunSuite.model.workflow&&setTimeout(function(){CPAutomator.Replay.init()},1E4)};
(function(k){function h(j){if(e[j])return e[j].exports;var f=e[j]={i:j,l:!1,exports:{}};k[j].call(f.exports,f,f.exports,h);f.l=!0;return f.exports}var e={};h.m=k;h.c=e;h.d=function(e,f,l){h.o(e,f)||Object.defineProperty(e,f,{configurable:!1,enumerable:!0,get:l})};h.n=function(e){var f=e&&e.__esModule?function(){return e["default"]}:function(){return e};h.d(f,"a",f);return f};h.o=function(e,f){return Object.prototype.hasOwnProperty.call(e,f)};h.p="";return h(h.s=3)})([function(k,h,e){var j,f;!(j=[e,
h],f=function(e,d){var a=d.Direction||(d.Direction={});a[a.COLUMN=0]="COLUMN";a[a.COLUMN_REVERSE=1]="COLUMN_REVERSE";a[a.ROW=2]="ROW";a[a.ROW_REVERSE=3]="ROW_REVERSE";a=d.AlignItems||(d.AlignItems={});a[a.START=0]="START";a[a.CENTER=1]="CENTER";a[a.END=2]="END";a[a.SPACE_BETWEEN=3]="SPACE_BETWEEN";a[a.SPACE_AROUND=4]="SPACE_AROUND";a[a.STRETCH=5]="STRETCH";a=d.SelfAlign||(d.SelfAlign={});a[a.AUTO=0]="AUTO";a[a.START=1]="START";a[a.END=2]="END";a[a.CENTER=3]="CENTER";a[a.STRETCH=4]="STRETCH";a=d.ChildAlign||
(d.ChildAlign={});a[a.AUTO=0]="AUTO";a[a.START=1]="START";a[a.END=2]="END";a[a.CENTER=3]="CENTER";a[a.STRETCH=4]="STRETCH";a=d.CSSPosition||(d.CSSPosition={});a[a.POSITION_RELATIVE=0]="POSITION_RELATIVE";a[a.POSITION_ABSOLUTE=1]="POSITION_ABSOLUTE";a=d.Wrap||(d.Wrap={});a[a.WRAP=0]="WRAP";a[a.ALL_OR_ONE=1]="ALL_OR_ONE";a[a.SYMMETRY=2]="SYMMETRY";a[a.NO_WRAP=3]="NO_WRAP";a=d.LayoutMode||(d.LayoutMode={});a[a.FIXED_HEIGHT=0]="FIXED_HEIGHT";a[a.DYNAMIC_HEIGHT=1]="DYNAMIC_HEIGHT"}.apply(h,j),void 0!==
f&&(k.exports=f))},function(k,h,e){var j,f;!(j=[e,h],f=function(e,d){var a=function(){this.height=this.width=0};a.prototype.isDefined=function(){return 0!==this.width&&0!==this.height};a.prototype.isWidthDefined=function(){return 0!==this.width};a.prototype.isHeightDefined=function(){return 0!==this.height};a.MAX_HEIGHT_SUPPORTED=4294967296;d.Size=a;var f;f=function(){this.m_bottom=this.m_right=this.m_left=this.m_top=0};d.Rect=f;var g=function(a,g){this.x=a;this.y=g};g.prototype.set=function(a,g){this.x=
a;this.y=g};g.prototype.copy=function(a){this.set(a.x,a.y)};d.Position=g;g=function(){this.m_size=new a;this.m_rect=new f;this.m_ignore=!1};g.prototype.getleft=function(){return this.m_rect.m_left};g.prototype.getright=function(){return this.m_rect.m_right};g.prototype.getbottom=function(){return this.m_rect.m_bottom};g.prototype.gettop=function(){return this.m_rect.m_top};g.prototype.getwidth=function(){return this.m_size.width};g.prototype.getheight=function(){return this.m_size.height};d.Layout=
g}.apply(h,j),void 0!==f&&(k.exports=f))},function(k,h,e){var j,f;!(j=[e,h,e(0)],f=function(f,d,a){var e=function(){};e.isRowDirection=function(g){return g===a.Direction.ROW||g===a.Direction.ROW_REVERSE};e.isColumnDirection=function(g){return g===a.Direction.COLUMN||g===a.Direction.COLUMN_REVERSE};e.getSimplifiedDirection=function(g){return e.isRowDirection(g)?a.Direction.ROW:a.Direction.COLUMN};e.round=function(a){var d=0;return d=Math.floor(a+0.5)};d.Utils=e}.apply(h,j),void 0!==f&&(k.exports=f))},
function(k,h,e){var j,f;!(j=[e,h,e(4),e(5),e(6),e(1),e(0)],f=function(e,d,a,f,g,m,h){e=function(){};e.prototype.createNodeRecursive=function(a,i){var b=new f.InputStyle,c;for(c in a.style)a.style.hasOwnProperty(c)&&(b[c]=a.style[c]);b=new g.Node(b,i);b.init();if(a.children)for(c=0;c<a.children.length;c++){var n=this.createNodeRecursive(a.children[c],b);b.addChild(n)}return b};e.prototype.createNode=function(g){this.m_inputNode=this.createNodeRecursive(g,null);this.m_layouter=new a.Layouter(this.m_inputNode,
h.LayoutMode.FIXED_HEIGHT)};e.prototype.computeLayout=function(a){var i=new m.Size;i.width=a.width;i.height=a.height;this.m_inputNode.setSize(i);this.m_layouter.layoutForSize(a.width,a.height)};e.prototype.getRoot=function(){return this.m_inputNode};d.Main=e;window.flexEngine=e}.apply(h,j),void 0!==f&&(k.exports=f))},function(k,h,e){var j,f;!(j=[e,h,e(1),e(0)],f=function(e,d,a,f){e=function(g,d){this.m_layoutMode=f.LayoutMode.DYNAMIC_HEIGHT;this.m_maxHeight=this.m_maxWidth=a.Size.MAX_HEIGHT_SUPPORTED;
this.m_inputRoot=g;this.m_layoutMode=d};e.prototype.layout=function(){this.layoutNode(this.m_inputRoot)};e.prototype.layoutForSize=function(g,d){this.setWidth(g);this.m_layoutMode===f.LayoutMode.DYNAMIC_HEIGHT&&(d=a.Size.MAX_HEIGHT_SUPPORTED);this.setHeight(d);this.layout()};e.prototype.layoutNode=function(a){a.layout(this.m_layoutMode)};e.prototype.setWidth=function(a){this.m_maxWidth=a};e.prototype.setHeight=function(a){this.m_maxHeight=a};e.prototype.setLayoutMode=function(a){this.m_layoutMode=
a};d.Layouter=e}.apply(h,j),void 0!==f&&(k.exports=f))},function(k,h,e){var j,f;!(j=[e,h],f=function(e,d){d.InputStyle=function(){this.height=this.width=-1;this.flexGrow=0;this.stretchCrossAxis=!1;this.flexShrink=1;this.flexBasis=this.width;this.flexOrder=0;this.justifyContentCrossAxis=this.justifyContent="start";this.direction="row";this.wrap="wrap";this.optional=this.keepAspectRatio=!1;this.verticalPadding=this.horizontalPadding=0;this.wrapPoint=80}}.apply(h,j),void 0!==f&&(k.exports=f))},function(k,
h,e){var j,f;!(j=[e,h,e(7),e(0)],f=function(e,d,a,f){var g=function(a,d){this.m_parent=null;this.m_isDirty=!0;this.m_layout=this.m_inputStyle=this.m_computedStyle=null;this.m_children=[];this.m_lines=[];this.m_inputStyle=a;this.m_isDirty=!0;this.m_parent=d;this.m_id=g.m_counter++};g.prototype.init=function(){this.m_computedStyle=a.PaddedStyle.createStyle(this,this.m_parent,this.m_inputStyle)};g.prototype.addChild=function(a){this.m_children.push(a)};g.prototype.getId=function(){return this.m_id};
g.prototype.getChildren=function(){return this.m_children};g.prototype.isFlexible=function(){return this.m_computedStyle.isFlexible()};g.prototype.canGrow=function(){return 0<this.m_computedStyle.getFlexProps().grow};g.prototype.canShrink=function(){return 0<this.m_computedStyle.getFlexProps().shrink};g.prototype.isFlexContainer=function(){return this.m_computedStyle.isFlexContainer()};g.prototype.getComputedStyle=function(){return this.m_computedStyle};g.prototype.setSize=function(a){this.m_computedStyle.setSize(a.width,
a.height)};g.prototype.setLines=function(a){this.m_lines=a};g.prototype.getLines=function(){return this.m_lines};g.prototype.layout=function(a){g.wrapRecursive(this,a);g.layoutRecursive(this,a);this.m_isDirty=!1};g.wrapRecursive=function(a,d){a.m_computedStyle.wrapNScale(d);for(var e=0;e<a.getChildren().length;e++){var i=a.getChildren()[e];g.wrapRecursive(i,d)}0<a.getChildren().length&&d===f.LayoutMode.DYNAMIC_HEIGHT&&a.getComputedStyle().updateHeight()};g.layoutRecursive=function(a,d){a.m_layout=
a.m_computedStyle.layoutNode(d);for(var e=0;e<a.getChildren().length;e++){var i=a.getChildren()[e];g.layoutRecursive(i,d)}};g.prototype.getLayout=function(){return this.m_layout};g.prototype.getComputedSize=function(){return this.m_computedStyle.getComputedDimension()};g.prototype.getPosition=function(){return this.m_computedStyle.getPosition()};g.prototype.setPosition=function(a){this.m_computedStyle.setPosition(a.x,a.y)};g.prototype.translateBy=function(a){this.m_computedStyle.translateBy(a);for(var d=
0;d<this.m_lines.length;d++)this.m_lines[d].translateBy(a)};g.prototype.getInputStyle=function(){return this.m_inputStyle};g.prototype.getParent=function(){return this.m_parent};g.m_counter=0;d.Node=g}.apply(h,j),void 0!==f&&(k.exports=f))},function(k,h,e){var j,f,l=this&&this.__extends||function(d,a){function e(){this.constructor=d}for(var g in a)a.hasOwnProperty(g)&&(d[g]=a[g]);d.prototype=null===a?Object.create(a):(e.prototype=a.prototype,new e)};!(j=[e,h,e(8),e(1),e(2),e(0)],f=function(d,a,e,
g,f,h){var j=e.ComputedStyle,i=function(b,c,a){j.call(this,b,c,a);this.m_paddedPosition=new g.Position(0,0);this.m_paddedSize=new g.Size;this.m_padding=new g.Size;this.m_childrenPadding=new g.Size};l(i,j);i.createStyle=function(b,c,a){b=new i(b,c,a);b.processStyle();return b};i.prototype.processStyle=function(){this.m_childrenPadding.height=this.m_inputStyle.verticalPadding;this.m_childrenPadding.width=this.m_inputStyle.horizontalPadding;var b=this.m_node.getParent();b&&(this.m_padding=b.getComputedStyle().getChildrenPadding());
j.prototype.processStyle.call(this)};i.prototype.setPosition=function(b,c){j.prototype.setPosition.call(this,b+this.getProportionalMainAxisPadding(this.getComputedMainSize(h.Direction.ROW),h.Direction.ROW),c+this.getProportionalCrossAxisPadding(this.getComputedCrossSize(h.Direction.ROW),h.Direction.ROW));this.m_paddedPosition.x=b;this.m_paddedPosition.y=c};i.prototype.setX=function(b){j.prototype.setX.call(this,b+this.getProportionalMainAxisPadding(this.getComputedMainSize(h.Direction.ROW),h.Direction.ROW));
this.m_paddedPosition.x=b};i.prototype.setY=function(b){j.prototype.setY.call(this,b+this.getProportionalCrossAxisPadding(this.getComputedCrossSize(h.Direction.ROW),h.Direction.ROW));this.m_paddedPosition.y=b};i.prototype.translateBy=function(b){this.setPosition(this.m_paddedPosition.x+b.x,this.m_paddedPosition.y+b.y)};i.prototype.setComputedWidth=function(b){var c=b-2*this.getProportionalMainAxisPadding(b,h.Direction.ROW);j.prototype.setComputedWidth.call(this,c);0>b&&(b=0);this.m_paddedSize.width=
b;this.setPosition(this.m_paddedPosition.x,this.m_paddedPosition.y)};i.prototype.setComputedHeight=function(b){var c=b-2*this.getProportionalCrossAxisPadding(b,h.Direction.ROW);j.prototype.setComputedHeight.call(this,c);0>b&&(b=0);this.m_paddedSize.height=b;this.setPosition(this.m_paddedPosition.x,this.m_paddedPosition.y)};i.prototype.getComputedCrossSize=function(b){var c=0;return c=h.Direction.ROW===b?this.m_paddedSize.height:this.m_paddedSize.width};i.prototype.getComputedMainSize=function(b){var c=
0;return c=h.Direction.ROW===b?this.m_paddedSize.width:this.m_paddedSize.height};i.prototype.getHypotheticalMainSize=function(b){return j.prototype.getHypotheticalMainSize.call(this,b)+2*this.getMainAxisPadding(b)};i.prototype.getHypotheticalCrossSize=function(b){return j.prototype.getHypotheticalCrossSize.call(this,b)+2*this.getCrossAxisPadding(b)};i.prototype.getProportionalMainAxisPadding=function(b,c){var a=this.getMainAxisPadding(c);b<this.getHypotheticalMainSize(c)&&(a*=1-(this.getHypotheticalMainSize(c)-
b)/this.getHypotheticalMainSize(c));return f.Utils.round(a)};i.prototype.getProportionalCrossAxisPadding=function(b,c){var a=this.getCrossAxisPadding(c);b<this.getHypotheticalCrossSize(c)&&(a*=1-(this.getHypotheticalCrossSize(c)-b)/this.getHypotheticalCrossSize(c));return f.Utils.round(a)};i.prototype.getMainAxisPadding=function(b){var c=this.m_padding.width;h.Direction.COLUMN===b&&(c=this.m_padding.height);return c};i.prototype.getCrossAxisPadding=function(b){var c=this.m_padding.height;h.Direction.COLUMN===
b&&(c=this.m_padding.width);return c};i.prototype.getChildrenPadding=function(){return this.m_childrenPadding};a.PaddedStyle=i}.apply(h,j),void 0!==f&&(k.exports=f))},function(k,h,e){var j,f;!(j=[e,h,e(0),e(1),e(9),e(2)],f=function(e,d,a,f,g,h){var j;j=function(c){this.enable=!1;this.wrap=a.Wrap.WRAP;this.direction=a.Direction.ROW;this.wrapPoint=100;this.justifyContent=i.parseJustifyContent(c.justifyContent);this.direction=i.parseDirectionValue(c.direction);this.wrap=i.parseWrap(c.wrap);this.justifyContentCrossAxis=
i.parseJustifyContentCrossAxis(c.justifyContentCrossAxis);this.wrapPoint=c.wrapPoint};d.FlexContainerProps=j;var k;k=function(){this.crossAxisStretch=this.ignore=this.optional=this.keepAspectRatio=!1;this.basis=this.shrink=this.grow=1;this.order=0};d.FlexChildProps=k;var i,e=function(){};e.parseDirectionValue=function(c){var b=a.Direction.ROW;"column"===c?b=a.Direction.COLUMN:"row-reverse"===c?b=a.Direction.ROW_REVERSE:"column-reverse"===c&&(b=a.Direction.COLUMN_REVERSE);return b};e.parseWrap=function(c){var b=
a.Wrap.WRAP;"no-wrap"===c?b=a.Wrap.NO_WRAP:"all-or-one"===c?b=a.Wrap.ALL_OR_ONE:"symmetry"===c&&(b=a.Wrap.SYMMETRY);return b};e.parseJustifyContent=function(c){var b=a.AlignItems.SPACE_AROUND;"start"===c?b=a.AlignItems.START:"center"===c?b=a.AlignItems.CENTER:"end"===c?b=a.AlignItems.END:"space-between"===c?b=a.AlignItems.SPACE_BETWEEN:"stretch"===c&&(b=a.AlignItems.STRETCH);return b};e.parseJustifyContentCrossAxis=function(c){var b=a.AlignItems.SPACE_AROUND;"start"===c?b=a.AlignItems.START:"center"===
c?b=a.AlignItems.CENTER:"end"===c?b=a.AlignItems.END:"space-between"===c?b=a.AlignItems.SPACE_BETWEEN:"stretch"===c&&(b=a.AlignItems.STRETCH);return b};i=e;var b=function(c,b,a){this.m_widthComputed=this.m_heightComputed=!1;this.m_lines=[];this.m_position=new f.Position(0,0);this.m_margin=[];this.m_border=[];this.m_dimension=new f.Size;this.m_totalChildrenDimension=new f.Size;this.m_minDimensions=new f.Size;this.m_maxDimensions=new f.Size;this.m_computedDimensions=new f.Size;this.m_node=null;this.m_crossAxisStretch=
!1;this.m_crossToMainRatio=1;this.m_inputStyle=a;this.m_node=c};b.createStyle=function(c,a,i){c=new b(c,a,i);c.processStyle();return c};b.prototype.getInputStyle=function(){return this.m_inputStyle};b.prototype.processStyle=function(){this.m_inputStyle.width&&(this.m_dimension.width=this.m_inputStyle.width);this.m_inputStyle.height&&(this.m_dimension.height=this.m_inputStyle.height);this.m_flexChildProps=new k;this.m_flexChildProps.grow=this.m_inputStyle.flexGrow;this.m_flexChildProps.shrink=this.m_inputStyle.flexShrink;
this.m_flexChildProps.basis=this.m_inputStyle.flexBasis;this.m_flexChildProps.order=this.m_inputStyle.flexOrder;this.m_flexChildProps.keepAspectRatio=this.m_inputStyle.keepAspectRatio;this.m_flexChildProps.crossAxisStretch=this.m_inputStyle.stretchCrossAxis;this.m_flexChildProps.keepAspectRatio&&(this.m_crossToMainRatio=this.m_dimension.height/this.m_inputStyle.width);this.m_flexChildProps.optional=this.m_inputStyle.optional;this.m_flexContainerProps=new j(this.m_inputStyle)};b.prototype.boundDimension=
function(c,b,a){void 0!==a&&(0<a&&c>a)&&(c=a);void 0!==b&&(0<b&&c<b)&&(c=b);return c};b.prototype.getHypotheticalWidth=function(){return this.boundDimension(this.m_dimension.width,this.m_minDimensions.width,this.m_maxDimensions.width)};b.prototype.getHypotheticalHeight=function(){return this.boundDimension(this.m_dimension.height,this.m_minDimensions.height,this.m_maxDimensions.height)};b.prototype.getHypotheticalMainSize=function(c){var b=0;return b=a.Direction.ROW===c?this.getHypotheticalWidth():
this.getHypotheticalHeight()};b.prototype.getHypotheticalCrossSize=function(c){var b=0;return b=a.Direction.ROW===c?this.getHypotheticalHeight():this.getHypotheticalWidth()};b.prototype.getActualMainSize=function(c){var b=0;return b=a.Direction.ROW===c?this.getHypotheticalWidth():this.getHypotheticalHeight()};b.prototype.getActualCrossSize=function(c){var b=0;return b=a.Direction.ROW===c?this.getHypotheticalHeight():this.getHypotheticalWidth()};b.prototype.setComputedWidth=function(c){this.m_computedDimensions.width=
c;this.m_widthComputed=!0};b.prototype.setComputedHeight=function(c){this.m_computedDimensions.height=c;this.m_heightComputed=!0};b.prototype.setComputedCrossSize=function(c,b){0>c&&(c=0);a.Direction.ROW===b?this.setComputedHeight(c):this.setComputedWidth(c)};b.prototype.setComputedMainSize=function(c,b){0>c&&(c=0);a.Direction.ROW===b?this.setComputedWidth(c):this.setComputedHeight(c)};b.prototype.setSize=function(c,b){this.m_dimension.width=c;this.m_dimension.height=b};b.prototype.grow=function(c,
b,a,i){var d=0,d=h.Utils.round(this.m_flexChildProps.grow*c),c=this.getHypotheticalMainSize(b),e=c+d,d=this.getHypotheticalCrossSize(b),g=0,g=i?this.getComputedCrossSize(b):d;this.m_flexChildProps.keepAspectRatio&&(i=e/c,g=a/d,a=i,g<i&&(a=g),g=h.Utils.round(d*a),e=h.Utils.round(c*a));this.setComputedCrossSize(g,b);this.setComputedMainSize(e,b);return d=e-this.getHypotheticalMainSize(b)};b.prototype.shrink=function(c,b,a,i){var d=h.Utils.round(this.m_flexChildProps.shrink*c),e=0,c=0;i?(a=this.getComputedCrossSize(b),
c=this.getComputedMainSize(b)):(a=this.getHypotheticalCrossSize(b),c=this.getHypotheticalMainSize(b));c>d?e=this.getHypotheticalMainSize(b)-d:(d=c-1,e=1);this.getHypotheticalMainSize(b);this.m_flexChildProps.keepAspectRatio&&(i=e/=this.getHypotheticalMainSize(b),d=0,this.getHypotheticalCrossSize(b)&&(d=a/this.getHypotheticalCrossSize(b)),d<e&&0!==d&&(i=d),e=h.Utils.round(this.getHypotheticalMainSize(b)*i),a=h.Utils.round(this.getHypotheticalCrossSize(b)*i),d=c-e);this.setComputedMainSize(e,b);this.setComputedCrossSize(a,
b);return d};b.prototype.getCrossSize=function(c){var b=0;return b=a.Direction.ROW===c?this.m_dimension.height:this.m_dimension.width};b.prototype.getMainSize=function(c){var b=0;return b=a.Direction.ROW===c?this.m_dimension.width:this.m_dimension.height};b.prototype.setCrossPositionByAlignment=function(c,b,i,d){var e=this.getComputedCrossSize(i);switch(b){case a.AlignItems.START:this.setCrossPosition(c,i);break;case a.AlignItems.CENTER:this.setCrossPosition(c+h.Utils.round((d-e)/2),i);break;case a.AlignItems.END:this.setCrossPosition(c+
(d-e),i);break;case a.AlignItems.STRETCH:this.setCrossPosition(c+h.Utils.round((d-e)/2),i)}};b.prototype.getComputedCrossSize=function(c){var b=0;return b=a.Direction.ROW===c?this.m_computedDimensions.height:this.m_computedDimensions.width};b.prototype.getComputedMainSize=function(c){var b=0;return b=a.Direction.ROW===c?this.m_computedDimensions.width:this.m_computedDimensions.height};b.prototype.getPosition=function(){return this.m_position};b.prototype.setPosition=function(c,b){this.m_position.x=
c;this.m_position.y=b};b.prototype.setX=function(c){this.m_position.x=c};b.prototype.setY=function(c){this.m_position.y=c};b.prototype.setMainAxisOffset=function(c,b){a.Direction.ROW===b?this.setX(c):this.setY(c)};b.prototype.setCrossPosition=function(c,b){a.Direction.ROW===b?this.setY(c):this.setX(c)};b.prototype.translateBy=function(c){this.setPosition(this.m_position.x+c.x,this.m_position.y+c.y)};b.prototype.clearLines=function(){this.m_lines=[];this.m_totalChildrenDimension.width=0;this.m_totalChildrenDimension.height=
0};b.prototype.addLine=function(c){a.Direction.ROW===this.m_flexContainerProps.direction?this.m_totalChildrenDimension.height+=c.getHeight():this.m_totalChildrenDimension.width+=c.getWidth();this.m_lines.push(c)};b.prototype.updateHeight=function(){for(var c=this.m_totalChildrenDimension.height=0;c<this.m_lines.length;c++)this.m_lines[c].updateHeight(),this.m_totalChildrenDimension.height+=this.m_lines[c].getHeight();this.m_computedDimensions.height=this.m_totalChildrenDimension.height};b.prototype.wrapNScale=
function(c){this.m_heightComputed||this.setComputedHeight(this.m_dimension.height);this.m_widthComputed||this.setComputedWidth(this.m_dimension.width);var b=this.m_node.getChildren();this.m_crossAxisStretch=!1;for(var a=0;a<b.length;a++)b[a].getComputedStyle().getFlexProps().ignore=!1,b[a].getComputedStyle().getFlexProps().crossAxisStretch&&(this.m_crossAxisStretch=!0);this.wrapContents(c);this.resizeChildren(c)};b.prototype.resizeChildren=function(c){this.resizeChildrenMainAxis()||(this.wrapContents(c),
this.resizeChildrenMainAxis());this.resizeLinesCrossSize(c);this.resizeChildrenCrossAxis(c);this.resizeChildrenMainAxisForAR()};b.prototype.wrapContents=function(c){var b=this.m_node.getChildren();if(0<b.length){this.clearLines();var i=new f.Position(0,0);i.copy(this.m_position);switch(c===a.LayoutMode.DYNAMIC_HEIGHT&&this.m_flexContainerProps.direction===a.Direction.COLUMN?a.Wrap.NO_WRAP:this.m_flexContainerProps.wrap){case a.Wrap.NO_WRAP:for(var d=new g.LineInfo(this.getNode(),this.m_flexContainerProps.direction,
i,this.m_computedDimensions),c=0;c<b.length;c++)d.addItem(b[c]);this.addLine(d);break;case a.Wrap.WRAP:for(var d=new g.LineInfo(this.getNode(),this.m_flexContainerProps.direction,i,this.m_computedDimensions),e=0,c=0;c<b.length;c++)if(!d.tryAddingItem(b[c])){this.addLine(d);var h=new f.Position(0,0);h.copy(i);e+=d.getCrossSize();this.translateCrossAxisBy(h,e);d=new g.LineInfo(this.getNode(),this.m_flexContainerProps.direction,h,this.m_computedDimensions);d.addItem(b[c])}0<b.length&&this.addLine(d);
break;case a.Wrap.SYMMETRY:if(0===b.length%2){for(c=d=0;d<=this.getComputedMainSize(this.m_flexContainerProps.direction)&&c<b.length;)d+=b[c].getComputedStyle().getActualMainSize(this.m_flexContainerProps.direction),c++;c=1<c?c-1:1;if(d>this.getComputedMainSize(this.m_flexContainerProps.direction))for(var j=b.length/this.getAccomadableChildCount(b.length,c),m=0,e=0,d=new g.LineInfo(this.getNode(),this.m_flexContainerProps.direction,i,this.m_computedDimensions),c=0;c<b.length;c++,m++)m===j&&(this.addLine(d),
e+=d.getCrossSize(),m=0,h=new f.Position(0,0),h.copy(i),this.translateCrossAxisBy(h,e),d=new g.LineInfo(this.getNode(),this.m_flexContainerProps.direction,h,this.m_computedDimensions)),d.addItem(b[c]);else{d=new g.LineInfo(this.getNode(),this.m_flexContainerProps.direction,i,this.m_computedDimensions);for(c=0;c<b.length;c++)d.addItem(b[c])}this.addLine(d);break}case a.Wrap.ALL_OR_ONE:for(c=d=0;c<b.length;c++)d+=b[c].getComputedStyle().getActualMainSize(this.m_flexContainerProps.direction);if(d<=this.getComputedMainSize(this.m_flexContainerProps.direction)){d=
new g.LineInfo(this.getNode(),this.m_flexContainerProps.direction,i,this.m_computedDimensions);for(c=0;c<b.length;c++)d.addItem(b[c]);this.addLine(d)}else for(c=e=0;c<b.length;c++)h=new f.Position(0,0),h.copy(i),this.translateCrossAxisBy(h,e),d=new g.LineInfo(this.getNode(),this.m_flexContainerProps.direction,h,this.m_computedDimensions),e+=d.getCrossSize(),d.addItem(b[c]),this.addLine(d)}this.m_node.setLines(this.m_lines)}};b.prototype.getAccomadableChildCount=function(b,a){for(var i=1;a;){if(0===
b%a){i=b/a;break}a--}return i};b.prototype.translateCrossAxisBy=function(b,i){a.Direction.ROW===this.m_flexContainerProps.direction?b.y+=i:b.x+=i};b.prototype.getAvailableCrossSize=function(){var b=0;return b=a.Direction.ROW===this.m_flexContainerProps.direction?this.m_computedDimensions.height-this.m_totalChildrenDimension.height:this.m_computedDimensions.width-this.m_totalChildrenDimension.width};b.prototype.getCrossSizeOffsetForLines=function(){var b=0;return b=a.Direction.ROW===this.m_flexContainerProps.direction?
this.m_position.y:this.m_position.x};b.prototype.resizeLinesCrossSize=function(b){var i=this.m_node.getLines();if(0<i.length){var d=0;if(b===a.LayoutMode.FIXED_HEIGHT||this.m_flexContainerProps.direction===a.Direction.COLUMN)d=this.getAvailableCrossSize();0>d&&(d=0);var e=this.getFlexContainerProps().justifyContentCrossAxis;this.getFlexContainerProps();var g=0,f=this.getCrossSizeOffsetForLines(),j=0,k=0,k=0;if(this.m_crossAxisStretch)f=a.Direction.ROW===this.m_flexContainerProps.direction?this.m_position.y:
this.m_position.x,g=h.Utils.round(d/i.length);else switch(e){case a.AlignItems.START:f=a.Direction.ROW===this.m_flexContainerProps.direction?this.m_position.y:this.m_position.x;break;case a.AlignItems.CENTER:f=a.Direction.ROW===this.m_flexContainerProps.direction?this.m_position.y:this.m_position.x;f+=h.Utils.round(d/2);break;case a.AlignItems.END:f=a.Direction.ROW===this.m_flexContainerProps.direction?this.m_position.y:this.m_position.x,f+=d}for(d=0;d<i.length;d++)i[d].justifyContentCrossSize(g,
f,e),f+=i[d].getCrossSize(),j+=i[d].getCrossSize();k=this.getAvailableCrossSize();if(b===a.LayoutMode.FIXED_HEIGHT){if(0>k){b=(j+k)/j;k=this.getCrossSizeOffsetForLines();for(d=0;d<i.length;d++)i[d].setCrossSizeBound(h.Utils.round(b*i[d].getCrossSize()),k,e),k+=i[d].getCrossSize()}}else this.setComputedCrossSize(j,this.m_flexContainerProps.direction)}};b.prototype.shouldChildrenCrossAxisStretch=function(){return this.m_crossAxisStretch};b.prototype.resizeChildrenMainAxis=function(){for(var b=this.m_node.getLines(),
a=!0,i=0;i<b.length&&!(a=b[i].resizeChildrenMainAxis(!1),!1===a);i++);return a};b.prototype.resizeChildrenCrossAxis=function(){for(var b=this.m_node.getLines(),a=!0,i=0;i<b.length&&!(a=b[i].resizeChildrenCrossAxis(this.m_flexContainerProps.justifyContentCrossAxis),!1===a);i++);return a};b.prototype.resizeChildrenMainAxisForAR=function(){for(var b=this.m_node.getLines(),a=this.getCrossSizeOffsetForLines(),i=0;i<b.length;i++)b[i].m_hasAspectRatioItem&&(b[i].resetChildren(),b[i].resizeChildrenMainAxis(!0),
b[i].realignChildrenCrossAxis(this.getFlexContainerProps().justifyContentCrossAxis,a),a+=b[i].getCrossSize())};b.prototype.resizeChildrenCrossAxisForAR=function(){for(var b=this.m_node.getLines(),a=this.getCrossSizeOffsetForLines(),i=0,d=this.getFlexContainerProps().justifyContentCrossAxis,e=0,g=0;g<b.length;g++)b[g].isCrossAxisGreedy()||(i+=b[g].getCrossSize()-b[g].getUsedCrossAxisSize(),b[g].setCrossSizeBound(b[g].getUsedCrossAxisSize(),b[g].getCrossOffset(),d),e+=1);e=b.length-e;for(g=0;g<b.length;g++)b[g].isCrossAxisGreedy()?
b[g].justifyContentCrossSize(h.Utils.round(i/e),a,d):b[g].justifyContentCrossSize(0,a,d),a+=b[g].getCrossSize()};b.prototype.shouldReLayoutItems=function(b){var a=!1;!b.isMixtureOfNonGrowNGrow()&&b.m_hasAspectRatioItem&&(a=!0);return a};b.prototype.justifyContent=function(){for(var b=this.m_node.getLines(),a=0;a<b.length;a++)b[a].justifyContent(this.m_flexContainerProps.justifyContent)};b.prototype.layoutNode=function(){this.justifyContent();var b=new f.Layout;b.m_ignore=this.getFlexProps().ignore;
b.m_rect.m_left=this.m_position.x;b.m_rect.m_top=this.m_position.y;b.m_rect.m_right=this.m_position.x+this.m_computedDimensions.width;b.m_rect.m_bottom=this.m_position.y+this.m_computedDimensions.height;b.m_size.width=this.m_computedDimensions.width;b.m_size.height=this.m_computedDimensions.height;this.m_widthComputed=this.m_heightComputed=!1;return b};b.prototype.isFlexible=function(){return void 0!==this.m_flexChildProps};b.prototype.isFlexContainer=function(){return void 0!==this.m_flexContainerProps};
b.prototype.getFlexProps=function(){return this.m_flexChildProps};b.prototype.getFlexContainerProps=function(){return this.m_flexContainerProps};b.prototype.getNode=function(){return this.m_node};b.prototype.getComputedDimension=function(){return this.m_computedDimensions};d.ComputedStyle=b}.apply(h,j),void 0!==f&&(k.exports=f))},function(k,h,e){var j,f,l=this&&this.__extends||function(d,a){function e(){this.constructor=d}for(var g in a)a.hasOwnProperty(g)&&(d[g]=a[g]);d.prototype=null===a?Object.create(a):
(e.prototype=a.prototype,new e)};!(j=[e,h,e(10),e(1),e(0),e(2)],f=function(d,a,e,g,f,h){var j=e.NodeList,d=function(a,b,c,d){j.call(this);this.m_greedyCrossAxis=!1;this.m_flexChildren=new e.NodeList;this.m_totalFlexShrink=this.m_totalFlexGrow=0;this.m_dimension=new g.Size;this.m_rawDimension=new g.Size;this.m_maxDimension=new g.Size;this.m_position=new g.Position(0,0);this.m_parentNode=a;this.m_maxDimension.width=d.width;this.m_maxDimension.height=d.height;this.m_position.x=c.x;this.m_position.y=
c.y;this.m_direction=b;this.m_hasAspectRatioItem=!1};l(d,j);d.prototype.getMainSize=function(){return f.Direction.ROW===this.m_direction?this.getWidth():this.getHeight()};d.prototype.getMainOffset=function(){return f.Direction.ROW===this.m_direction?this.m_position.x:this.m_position.y};d.prototype.getCrossOffset=function(){return f.Direction.ROW===this.m_direction?this.m_position.y:this.m_position.x};d.prototype.getUsedCrossAxisSize=function(){for(var a=this.getFirst(),b=0;a;){var c=a.getNode();this.m_direction===
f.Direction.ROW?b<c.getComputedSize().height&&(b=c.getComputedSize().height):b<c.getComputedSize().width&&(b=c.getComputedSize().width);a=a.getNext()}return b};d.prototype.getCrossSize=function(){return f.Direction.ROW===this.m_direction?this.getHeight():this.getWidth()};d.prototype.setCrossSize=function(a){f.Direction.ROW===this.m_direction?this.setHeight(a):this.setWidth(a)};d.prototype.isCrossAxisGreedy=function(){return this.m_greedyCrossAxis};d.prototype.setMainSize=function(a){f.Direction.ROW===
this.m_direction?this.setWidth(a):this.setHeight(a)};d.prototype.setCrossSizeOffset=function(a){f.Direction.ROW===this.m_direction?this.m_position.y=a:this.m_position.x=a};d.prototype.setCrossSizeBound=function(a,b,c){this.setCrossSize(a);this.setCrossSizeOffset(b);this.setCrossSizeBoundChildren(a,b,c)};d.prototype.setCrossSizeBoundChildren=function(a,b,c){for(var d=this.getFirst(),e=0,f=0;d;){var g=d.getNode();this.translateChildMainAxisBy(g,f);var j=g.getComputedStyle().getComputedMainSize(this.m_direction),
k=j;a<g.getComputedStyle().getComputedCrossSize(this.m_direction)&&(g.getInputStyle().keepAspectRatio&&(j=a/g.getComputedStyle().getComputedCrossSize(this.m_direction),j=h.Utils.round(k*j),g.getComputedStyle().setComputedMainSize(j,this.m_direction)),f+=j-k,g.getComputedStyle().setComputedCrossSize(a,this.m_direction));e+=j;g.getComputedStyle().setCrossPosition(b,this.m_direction);g.getComputedStyle().setCrossPositionByAlignment(b,c,this.m_direction,this.getCrossSize());d=d.getNext()}this.setMainSize(e)};
d.prototype.updateHeight=function(){var a=this.getFirst();for(this.m_dimension.height=0;a;){var b=a.getNode();this.m_direction===f.Direction.ROW?this.getHeight()<b.getComputedSize().height&&this.setHeight(b.getComputedSize().height):this.setHeight(this.getHeight()+b.getComputedSize().height);a=a.getNext()}};d.prototype.updateCrossSize=function(){var a=this.getFirst();for(this.m_dimension.height=0;a;){var b=a.getNode();this.m_direction===f.Direction.ROW?this.m_dimension.height<b.getComputedSize().height&&
(this.m_dimension.height=b.getComputedSize().height):this.m_dimension.width<b.getComputedSize().width&&(this.m_dimension.width=b.getComputedSize().width);b.getComputedStyle().getFlexProps().keepAspectRatio&&(this.m_greedyCrossAxis=!0);a=a.getNext()}};d.prototype.getHeight=function(){return this.m_dimension.height};d.prototype.setHeight=function(a){this.m_dimension.height=a};d.prototype.getWidth=function(){return this.m_dimension.width};d.prototype.setWidth=function(a){this.m_dimension.width=a};d.prototype.getRawWidth=
function(){return this.m_rawDimension.width};d.prototype.setRawWidth=function(a){this.m_rawDimension.width=a};d.prototype.getRawHeight=function(){return this.m_rawDimension.height};d.prototype.setRawHeight=function(a){this.m_rawDimension.height=a};d.prototype.getAvailableMainAxisSpace=function(){var a=0;return a=f.Direction.ROW===this.m_direction?this.m_maxDimension.width-this.getWidth():this.m_maxDimension.height-this.getHeight()};d.prototype.getAvailableCrossAxisSpace=function(){var a=0;return a=
f.Direction.ROW===this.m_direction?this.m_maxDimension.height-this.getHeight():this.m_maxDimension.width-this.getWidth()};d.prototype.getCurrentMainAxisSize=function(){var a=0;return a=f.Direction.ROW===this.m_direction?this.getWidth():this.getHeight()};d.prototype.translateBy=function(a){for(var b=this.getFirst();b;){var c=b.getNode(),b=b.getNext();c.translateBy(a)}};d.prototype.translateChildMainAxisBy=function(a,b){var c=null,c=f.Direction.ROW===this.m_direction?new g.Position(b,0):new g.Position(0,
b);a.translateBy(c)};d.prototype.justifyContent=function(a){var b=this.getAvailableMainAxisSpace();switch(a){case f.AlignItems.STRETCH:a=this.getFirst();for(b=h.Utils.round(b/2);a;){var c=a.getNode();this.translateChildMainAxisBy(c,b);a=a.getNext()}break;case f.AlignItems.CENTER:a=this.getFirst();for(b=h.Utils.round(b/2);a;)c=a.getNode(),this.translateChildMainAxisBy(c,b),a=a.getNext();break;case f.AlignItems.END:for(a=this.getFirst();a;)c=a.getNode(),this.translateChildMainAxisBy(c,b),a=a.getNext();
break;case f.AlignItems.SPACE_AROUND:for(var a=this.getFirst(),d=h.Utils.round(b/(this.m_size+1)),b=0;a;)b+=d,c=a.getNode(),this.translateChildMainAxisBy(c,b),a=a.getNext();break;case f.AlignItems.SPACE_BETWEEN:a=this.getFirst();d=h.Utils.round(b/(this.m_size-1));for(b=0;a;)c=a.getNode(),this.translateChildMainAxisBy(c,b),b+=d,a=a.getNext()}};d.prototype.justifyContentCrossSize=function(a,b,c){var d=0,a=this.getCrossSize()+a;f.Direction.ROW===this.m_direction?(this.m_dimension.height=a,this.m_position.y=
b):(this.m_dimension.width=a,this.m_position.x=b);this.resizeChildrenCrossAxis(c);d=0;switch(c){case f.AlignItems.START:c=this.m_flexChildren.getFirst();if(0<a)for(;c;){var e=c.getNode();this.getBoundedChildCrossSize(e,a);d=b;e.getComputedStyle().setCrossPosition(d,this.m_direction);c=c.getNext()}break;case f.AlignItems.CENTER:c=this.m_flexChildren.getFirst();if(0<a)for(;c;)e=c.getNode(),d=this.getBoundedChildCrossSize(e,a),d=h.Utils.round((a-d)/2)+b,e.getComputedStyle().setCrossPosition(d,this.m_direction),
c=c.getNext();break;case f.AlignItems.END:c=this.m_flexChildren.getFirst();if(0<a)for(;c;)e=c.getNode(),d=this.getBoundedChildCrossSize(e,a),d=a-d+b,e.getComputedStyle().setCrossPosition(d,this.m_direction),c=c.getNext();break;case f.AlignItems.STRETCH:if(c=this.m_flexChildren.getFirst(),0<a)for(;c;)e=c.getNode(),this.getBoundedChildCrossSize(e,a),d=b,e.getComputedStyle().setCrossPosition(d,this.m_direction),c=c.getNext()}};d.prototype.getBoundedChildMainSize=function(a,b){var c=a.getComputedStyle().getComputedMainSize(this.m_direction);
b<c&&(c=b);return c};d.prototype.getChildCount=function(){return this.m_size};d.prototype.getBoundedChildCrossSize=function(a,b){var c=a.getComputedStyle().getComputedCrossSize(this.m_direction);b<c&&(c=b);return c};d.prototype.append=function(a){var b=this.m_dimension.width,c=this.m_dimension.height,d=a.getComputedStyle(),e=d.getHypotheticalMainSize(this.m_direction),h=d.getHypotheticalCrossSize(this.m_direction);d.getFlexProps().keepAspectRatio||(this.m_greedyCrossAxis=!0);f.Direction.ROW===this.m_direction?
(b=new g.Position(this.m_position.x+b,this.m_position.y),this.setWidth(this.getWidth()+e),this.getHeight()<h&&this.setHeight(h),this.setRawWidth(this.getRawWidth()+d.getActualMainSize(this.m_direction))):(b=new g.Position(this.m_position.x,this.m_position.y+c),this.setHeight(this.getHeight()+e),this.getWidth()<h&&this.setWidth(h),this.setRawHeight(this.getRawHeight()+d.getActualMainSize(this.m_direction)));d.isFlexible()&&(this.m_totalFlexGrow+=d.getFlexProps().grow,this.m_totalFlexShrink+=d.getFlexProps().shrink,
this.m_flexChildren.append(a));a.setPosition(b);return j.prototype.append.call(this,a)};d.prototype.addItem=function(a){a.getComputedStyle().getFlexProps().ignore||this.append(a)};d.prototype.tryAddingItem=function(a){var b=!0;if(!a.getComputedStyle().getFlexProps().ignore){var c=a.getComputedStyle(),d=c.getActualMainSize(this.m_direction);c.getActualCrossSize(this.m_direction);f.Direction.ROW===this.m_direction?this.m_maxDimension.isWidthDefined()&&(this.m_maxDimension.width<this.m_rawDimension.width+
d&&0<this.m_size)&&(b=!1):this.m_maxDimension.isHeightDefined()&&(this.m_maxDimension.height<this.m_rawDimension.height+d&&0<this.m_size)&&(b=!1);b&&this.append(a)}return b};d.prototype.resizeChildrenCrossAxis=function(){for(var a=this.m_flexChildren.getFirst();a;){var b=a.getNode().getComputedStyle();this.m_parentNode.getComputedStyle().shouldChildrenCrossAxisStretch()&&(b.getInputStyle().stretchCrossAxis&&!b.getFlexProps().keepAspectRatio)&&b.setComputedCrossSize(this.getCrossSize(),this.m_direction);
a=a.getNext()}return!0};d.prototype.getBoundedCrossSize=function(a){for(var b=0,c=this.m_flexChildren.getFirst();c;)b<c.getNode().getInputStyle().height&&(b=c.getNode().getInputStyle().height),c=c.getNext();a<b&&(b=a);return b};d.prototype.growChildren=function(a){for(var b=this.m_flexChildren.getFirst(),c=this.getAvailableMainAxisSpace(),d=c/this.m_totalFlexGrow,e=0,f=0;b;){var g=b.getNode(),h=g.getComputedStyle();g.canGrow()&&h.getFlexProps().keepAspectRatio&&(this.m_hasAspectRatioItem=!0,e+=h.grow(d,
this.m_direction,this.getCrossSize(),a),f+=h.getFlexProps().grow);b=b.getNext()}b=this.m_flexChildren.getFirst();d=(c-e)/(this.m_totalFlexGrow-f);for(c=0;b;)g=b.getNode(),h=g.getComputedStyle(),this.translateChildMainAxisBy(g,c),g.canGrow()?(g=0,h.getFlexProps().keepAspectRatio?(this.m_hasAspectRatioItem=!0,g=h.getComputedMainSize(this.m_direction)-h.getHypotheticalMainSize(this.m_direction)):g=h.grow(d,this.m_direction,this.getCrossSize(),a),c+=g):g=h.grow(0,this.m_direction,this.getCrossSize(),
!1),this.addToMainAxis(g),b=b.getNext();return!0};d.prototype.realignChildrenCrossAxis=function(a){for(var b=this.m_flexChildren.getFirst();b;)b.getNode().getComputedStyle().setCrossPositionByAlignment(this.getCrossOffset(),a,this.m_direction,this.getCrossSize()),b=b.getNext()};d.prototype.shrinkChildren=function(a){for(var b=this.m_flexChildren.getFirst(),c=Math.abs(this.getAvailableMainAxisSpace()),d=!0,b=this.getFirst(),e=!1;b;)b.getNode().getComputedStyle().getFlexProps().optional?(b.getNode().getComputedStyle().getFlexProps().ignore=
!0,d=!1):e=!0,b=b.getNext();if(!e)for(b=this.m_flexChildren.getFirst();b;)b.getNode().getComputedStyle().getFlexProps().ignore=!1,d=!0,b=b.getNext();if(d){for(var e=-1,g=this.m_totalFlexShrink,b=this.m_flexChildren.getFirst();b;){var f=b.getNode();if(f.getInputStyle().keepAspectRatio){this.m_hasAspectRatioItem=!0;0!==g&&(e=c/g);var h=f.getComputedStyle().shrink(e,this.m_direction,this.getCrossSize(),a);this.addToMainAxis(-1*h);c-=h;g-=f.getComputedStyle().getFlexProps().shrink}b=b.getNext()}for(b=
this.m_flexChildren.getFirst();b;)f=b.getNode(),f.getInputStyle().keepAspectRatio||(0!==g&&(e=c/g),h=f.getComputedStyle().shrink(e,this.m_direction,this.getCrossSize(),a),this.addToMainAxis(-1*h),c-=h,g-=f.getComputedStyle().getFlexProps().shrink),b=b.getNext();a=this.getMainOffset();for(b=this.m_flexChildren.getFirst();b;)c=b.getNode(),c.getComputedStyle().setMainAxisOffset(a,this.m_direction),a+=c.getComputedStyle().getComputedMainSize(this.m_direction),b=b.getNext()}return d};d.prototype.resizeChildrenMainAxis=
function(a){var b=0,c=!0,b=this.getAvailableMainAxisSpace();0<b&&0<this.m_totalFlexGrow?c=this.growChildren(a):0>b?c=this.shrinkChildren(a):this.setChildrenInputSize();return c};d.prototype.isMixtureOfNonGrowNGrow=function(){for(var a=0,b=0,c=this.m_flexChildren.getFirst();c;)c.getNode().getInputStyle().flexGrow?a++:b++,c=c.getNext();return 0<a&&0<b};d.prototype.setChildrenInputSize=function(){for(var a=this.m_flexChildren.getFirst();a;){var b=a.getNode();b.getComputedStyle().setComputedCrossSize(b.getComputedStyle().getHypotheticalCrossSize(this.m_direction),
this.m_direction);b.getComputedStyle().setComputedMainSize(b.getComputedStyle().getHypotheticalMainSize(this.m_direction),this.m_direction);a=a.getNext()}};d.prototype.resetChildren=function(){for(var a=this.m_flexChildren.getFirst(),b=this.getMainOffset();a;){var c=a.getNode(),d=c.getComputedStyle().getHypotheticalMainSize(this.m_direction);c.getComputedStyle().setComputedMainSize(d,this.m_direction);c.getComputedStyle().setMainAxisOffset(b,this.m_direction);b+=d;a=a.getNext()}this.m_direction===
f.Direction.ROW?this.setWidth(b-this.getMainOffset()):this.setHeight(b-this.getMainOffset())};d.prototype.centerAlignARItems=function(){for(var a=this.m_flexChildren.getFirst();a;){var b=a.getNode();b.getInputStyle().keepAspectRatio&&(f.Direction.ROW===this.m_direction?b.getPosition().y=h.Utils.round((this.getHeight()-b.getComputedSize().height)/2)+this.m_position.y:b.getPosition().x=h.Utils.round((this.getWidth()-b.getComputedSize().width)/2)+this.m_position.x);a=a.getNext()}};d.prototype.recalculateMainAxisAvailableSpace=
function(){for(var a=0,b=this.m_flexChildren.getFirst();b;){var c=b.getNode();f.Direction.ROW===this.m_direction?(c.getComputedSize().width=c.getInputStyle().width,c.getPosition().x=this.m_position.x+a,a+=c.getInputStyle().width):(c.getComputedSize().height=c.getInputStyle().height,c.getPosition().y=this.m_position.y+a,a+=c.getInputStyle().height);b=b.getNext()}f.Direction.ROW===this.m_direction?this.setWidth(a):this.setHeight(a)};d.prototype.addToMainAxis=function(a){f.Direction.ROW===this.m_direction?
this.setWidth(this.getWidth()+a):this.setHeight(this.getHeight()+a)};d.prototype.addToCrossAxis=function(a){f.Direction.ROW===this.m_direction?this.setHeight(this.getHeight()+a):this.setWidth(this.getWidth()+a)};a.LineInfo=d}.apply(h,j),void 0!==f&&(k.exports=f))},function(k,h,e){var j,f;!(j=[e,h],f=function(e,d){var a=function(){};a.prototype.getNext=function(){return this.m_next};a.prototype.getNode=function(){return this.m_node};var f=function(){this.m_tail=this.m_head=null;this.m_size=0};f.prototype.append=
function(d){var e=new a;e.m_node=d;e.m_next=null;null==this.m_head?this.m_tail=this.m_head=e:(this.m_tail.m_next=e,this.m_tail=this.m_tail.m_next);this.m_size++;return this.m_size};f.prototype.getFirst=function(){return null==this.m_head?null:this.m_head};f.prototype.getLast=function(){return null==this.m_tail?null:this.m_tail};f.prototype.getSize=function(){return this.m_size};d.NodeList=f}.apply(h,j),void 0!==f&&(k.exports=f))}]);
/**
* The copyright in this software is being made available under the BSD License,
* included below. This software may be subject to other third party and contributor
* rights, including patent rights, and no such rights are granted under this license.
*
* Copyright (c) 2013, Dash Industry Forum.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation and/or
* other materials provided with the distribution.
* * Neither the name of Dash Industry Forum nor the names of its
* contributors may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
function X2JS(matchers, attrPrefix, ignoreRoot) {
if (attrPrefix === null || attrPrefix === undefined) {
attrPrefix = "_";
}
if (ignoreRoot === null || ignoreRoot === undefined) {
ignoreRoot = false;
}
var VERSION = "1.0.11";
var escapeMode = false;
var DOMNodeTypes = {
ELEMENT_NODE: 1,
TEXT_NODE: 3,
CDATA_SECTION_NODE: 4,
COMMENT_NODE: 8,
DOCUMENT_NODE: 9
};
function getNodeLocalName(node) {
var nodeLocalName = node.localName;
if (nodeLocalName == null) nodeLocalName = node.baseName;
if (nodeLocalName == null || nodeLocalName == "") nodeLocalName = node.nodeName;
return nodeLocalName;
}
function getNodePrefix(node) {
return node.prefix;
}
function escapeXmlChars(str) {
if (typeof str == "string") return str.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'").replace(/\//g, "/"); else return str;
}
function unescapeXmlChars(str) {
return str.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, '"').replace(/'/g, "'").replace(///g, "/");
}
function parseDOMChildren(node) {
if (node.nodeType == DOMNodeTypes.DOCUMENT_NODE) {
var result, child = node.firstChild, i, len;
for (i = 0, len = node.childNodes.length; i < len; i += 1) {
if (node.childNodes[i].nodeType !== DOMNodeTypes.COMMENT_NODE) {
child = node.childNodes[i];
break;
}
}
if (ignoreRoot) {
result = parseDOMChildren(child);
} else {
result = {};
var childName = getNodeLocalName(child);
result[childName] = parseDOMChildren(child);
}
return result;
} else if (node.nodeType == DOMNodeTypes.ELEMENT_NODE) {
var result = new Object();
result.__cnt = 0;
var nodeChildren = node.childNodes;
for (var cidx = 0; cidx < nodeChildren.length; cidx++) {
var child = nodeChildren.item(cidx);
var childName = getNodeLocalName(child);
result.__cnt++;
if (result[childName] == null) {
result[childName] = parseDOMChildren(child);
result[childName + "_asArray"] = new Array(1);
result[childName + "_asArray"][0] = result[childName];
} else {
if (result[childName] != null) {
if (!(result[childName] instanceof Array)) {
var tmpObj = result[childName];
result[childName] = new Array();
result[childName][0] = tmpObj;
result[childName + "_asArray"] = result[childName];
}
}
var aridx = 0;
while (result[childName][aridx] != null) aridx++;
result[childName][aridx] = parseDOMChildren(child);
}
}
for (var aidx = 0; aidx < node.attributes.length; aidx++) {
var attr = node.attributes.item(aidx);
result.__cnt++;
var value2 = attr.value;
for (var m = 0, ml = matchers.length; m < ml; m++) {
var matchobj = matchers[m];
if (matchobj.test.call(this, attr)) value2 = matchobj.converter.call(this, attr.value);
}
result[attrPrefix + attr.name] = value2;
}
var nodePrefix = getNodePrefix(node);
if (nodePrefix != null && nodePrefix != "") {
result.__cnt++;
result.__prefix = nodePrefix;
}
if (result.__cnt == 1 && result["#text"] != null) {
result = result["#text"];
}
if (result["#text"] != null) {
result.__text = result["#text"];
if (escapeMode) result.__text = unescapeXmlChars(result.__text);
delete result["#text"];
delete result["#text_asArray"];
}
if (result["#cdata-section"] != null) {
result.__cdata = result["#cdata-section"];
delete result["#cdata-section"];
delete result["#cdata-section_asArray"];
}
if (result.__text != null || result.__cdata != null) {
result.toString = function() {
return (this.__text != null ? this.__text : "") + (this.__cdata != null ? this.__cdata : "");
};
}
return result;
} else if (node.nodeType == DOMNodeTypes.TEXT_NODE || node.nodeType == DOMNodeTypes.CDATA_SECTION_NODE) {
return node.nodeValue;
} else if (node.nodeType == DOMNodeTypes.COMMENT_NODE) {
return null;
}
}
function startTag(jsonObj, element, attrList, closed) {
var resultStr = "<" + (jsonObj != null && jsonObj.__prefix != null ? jsonObj.__prefix + ":" : "") + element;
if (attrList != null) {
for (var aidx = 0; aidx < attrList.length; aidx++) {
var attrName = attrList[aidx];
var attrVal = jsonObj[attrName];
resultStr += " " + attrName.substr(1) + "='" + attrVal + "'";
}
}
if (!closed) resultStr += ">"; else resultStr += "/>";
return resultStr;
}
function endTag(jsonObj, elementName) {
return "</" + (jsonObj.__prefix != null ? jsonObj.__prefix + ":" : "") + elementName + ">";
}
function endsWith(str, suffix) {
return str.indexOf(suffix, str.length - suffix.length) !== -1;
}
function jsonXmlSpecialElem(jsonObj, jsonObjField) {
if (endsWith(jsonObjField.toString(), "_asArray") || jsonObjField.toString().indexOf("_") == 0 || jsonObj[jsonObjField] instanceof Function) return true; else return false;
}
function jsonXmlElemCount(jsonObj) {
var elementsCnt = 0;
if (jsonObj instanceof Object) {
for (var it in jsonObj) {
if (jsonXmlSpecialElem(jsonObj, it)) continue;
elementsCnt++;
}
}
return elementsCnt;
}
function parseJSONAttributes(jsonObj) {
var attrList = [];
if (jsonObj instanceof Object) {
for (var ait in jsonObj) {
if (ait.toString().indexOf("__") == -1 && ait.toString().indexOf("_") == 0) {
attrList.push(ait);
}
}
}
return attrList;
}
function parseJSONTextAttrs(jsonTxtObj) {
var result = "";
if (jsonTxtObj.__cdata != null) {
result += "<![CDATA[" + jsonTxtObj.__cdata + "]]>";
}
if (jsonTxtObj.__text != null) {
if (escapeMode) result += escapeXmlChars(jsonTxtObj.__text); else result += jsonTxtObj.__text;
}
return result;
}
function parseJSONTextObject(jsonTxtObj) {
var result = "";
if (jsonTxtObj instanceof Object) {
result += parseJSONTextAttrs(jsonTxtObj);
} else if (jsonTxtObj != null) {
if (escapeMode) result += escapeXmlChars(jsonTxtObj); else result += jsonTxtObj;
}
return result;
}
function parseJSONArray(jsonArrRoot, jsonArrObj, attrList) {
var result = "";
if (jsonArrRoot.length == 0) {
result += startTag(jsonArrRoot, jsonArrObj, attrList, true);
} else {
for (var arIdx = 0; arIdx < jsonArrRoot.length; arIdx++) {
result += startTag(jsonArrRoot[arIdx], jsonArrObj, parseJSONAttributes(jsonArrRoot[arIdx]), false);
result += parseJSONObject(jsonArrRoot[arIdx]);
result += endTag(jsonArrRoot[arIdx], jsonArrObj);
}
}
return result;
}
function parseJSONObject(jsonObj) {
var result = "";
var elementsCnt = jsonXmlElemCount(jsonObj);
if (elementsCnt > 0) {
for (var it in jsonObj) {
if (jsonXmlSpecialElem(jsonObj, it)) continue;
var subObj = jsonObj[it];
var attrList = parseJSONAttributes(subObj);
if (subObj == null || subObj == undefined) {
result += startTag(subObj, it, attrList, true);
} else if (subObj instanceof Object) {
if (subObj instanceof Array) {
result += parseJSONArray(subObj, it, attrList);
} else {
var subObjElementsCnt = jsonXmlElemCount(subObj);
if (subObjElementsCnt > 0 || subObj.__text != null || subObj.__cdata != null) {
result += startTag(subObj, it, attrList, false);
result += parseJSONObject(subObj);
result += endTag(subObj, it);
} else {
result += startTag(subObj, it, attrList, true);
}
}
} else {
result += startTag(subObj, it, attrList, false);
result += parseJSONTextObject(subObj);
result += endTag(subObj, it);
}
}
}
result += parseJSONTextObject(jsonObj);
return result;
}
this.parseXmlString = function(xmlDocStr) {
var xmlDoc;
if (window.DOMParser) {
var parser = new window.DOMParser();
xmlDoc = parser.parseFromString(xmlDocStr, "text/xml");
} else {
if (xmlDocStr.indexOf("<?") == 0) {
xmlDocStr = xmlDocStr.substr(xmlDocStr.indexOf("?>") + 2);
}
xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async = "false";
xmlDoc.loadXML(xmlDocStr);
}
return xmlDoc;
};
this.xml2json = function(xmlDoc) {
return parseDOMChildren(xmlDoc);
};
this.xml_str2json = function(xmlDocStr) {
var xmlDoc = this.parseXmlString(xmlDocStr);
return this.xml2json(xmlDoc);
};
this.json2xml_str = function(jsonObj) {
return parseJSONObject(jsonObj);
};
this.json2xml = function(jsonObj) {
var xmlDocStr = this.json2xml_str(jsonObj);
return this.parseXmlString(xmlDocStr);
};
this.getVersion = function() {
return VERSION;
};
this.escapeMode = function(enabled) {
escapeMode = enabled;
};
}
function ObjectIron(map) {
var lookup;
lookup = [];
for (i = 0, len = map.length; i < len; i += 1) {
if (map[i].isRoot) {
lookup.push("root");
} else {
lookup.push(map[i].name);
}
}
var mergeValues = function(parentItem, childItem) {
var name, parentValue, childValue;
if (parentItem === null || childItem === null) {
return;
}
for (name in parentItem) {
if (parentItem.hasOwnProperty(name)) {
if (!childItem.hasOwnProperty(name)) {
childItem[name] = parentItem[name];
}
}
}
}, mapProperties = function(properties, parent, child) {
var i, len, property, parentValue, childValue;
if (properties === null || properties.length === 0) {
return;
}
for (i = 0, len = properties.length; i < len; i += 1) {
property = properties[i];
if (parent.hasOwnProperty(property.name)) {
if (child.hasOwnProperty(property.name)) {
if (property.merge) {
parentValue = parent[property.name];
childValue = child[property.name];
if (typeof parentValue === "object" && typeof childValue === "object") {
mergeValues(parentValue, childValue);
} else {
if (property.mergeFunction != null) {
child[property.name] = property.mergeFunction(parentValue, childValue);
} else {
child[property.name] = parentValue + childValue;
}
}
}
} else {
child[property.name] = parent[property.name];
}
}
}
}, mapItem = function(obj, node) {
var item = obj, i, len, v, len2, array, childItem, childNode, property;
if (item.children === null || item.children.length === 0) {
return;
}
for (i = 0, len = item.children.length; i < len; i += 1) {
childItem = item.children[i];
if (node.hasOwnProperty(childItem.name)) {
if (childItem.isArray) {
array = node[childItem.name + "_asArray"];
for (v = 0, len2 = array.length; v < len2; v += 1) {
childNode = array[v];
mapProperties(item.properties, node, childNode);
mapItem(childItem, childNode);
}
} else {
childNode = node[childItem.name];
mapProperties(item.properties, node, childNode);
mapItem(childItem, childNode);
}
}
}
}, performMapping = function(source) {
var i, len, pi, pp, item, node, array;
if (source === null) {
return source;
}
if (typeof source !== "object") {
return source;
}
for (i = 0, len = lookup.length; i < len; i += 1) {
if (lookup[i] === "root") {
item = map[i];
node = source;
mapItem(item, node);
}
}
for (pp in source) {
if (source.hasOwnProperty(pp)) {
pi = lookup.indexOf(pp);
if (pi !== -1) {
item = map[pi];
if (item.isArray) {
array = source[pp + "_asArray"];
for (i = 0, len = array.length; i < len; i += 1) {
node = array[i];
mapItem(item, node);
}
} else {
node = source[pp];
mapItem(item, node);
}
}
performMapping(source[pp]);
}
}
return source;
};
return {
run: performMapping
};
}
(function(scope) {
"use strict";
var dijon = {
VERSION: "0.5.3"
};
dijon.System = function() {
this._mappings = {};
this._outlets = {};
this._handlers = {};
this.strictInjections = true;
this.autoMapOutlets = false;
this.postInjectionHook = "setup";
};
dijon.System.prototype = {
_createAndSetupInstance: function(key, Clazz) {
var instance = new Clazz();
this.injectInto(instance, key);
return instance;
},
_retrieveFromCacheOrCreate: function(key, overrideRules) {
if (typeof overrideRules === "undefined") {
overrideRules = false;
}
var output;
if (this._mappings.hasOwnProperty(key)) {
var config = this._mappings[key];
if (!overrideRules && config.isSingleton) {
if (config.object == null) {
config.object = this._createAndSetupInstance(key, config.clazz);
}
output = config.object;
} else {
if (config.clazz) {
output = this._createAndSetupInstance(key, config.clazz);
} else {
output = config.object;
}
}
} else {
throw new Error(1e3);
}
return output;
},
mapOutlet: function(sourceKey, targetKey, outletName) {
if (typeof sourceKey === "undefined") {
throw new Error(1010);
}
targetKey = targetKey || "global";
outletName = outletName || sourceKey;
if (!this._outlets.hasOwnProperty(targetKey)) {
this._outlets[targetKey] = {};
}
this._outlets[targetKey][outletName] = sourceKey;
return this;
},
getObject: function(key) {
if (typeof key === "undefined") {
throw new Error(1020);
}
return this._retrieveFromCacheOrCreate(key);
},
mapValue: function(key, useValue) {
if (typeof key === "undefined") {
throw new Error(1030);
}
this._mappings[key] = {
clazz: null,
object: useValue,
isSingleton: true
};
if (this.autoMapOutlets) {
this.mapOutlet(key);
}
if (this.hasMapping(key)) {
this.injectInto(useValue, key);
}
return this;
},
hasMapping: function(key) {
if (typeof key === "undefined") {
throw new Error(1040);
}
return this._mappings.hasOwnProperty(key);
},
mapClass: function(key, clazz) {
if (typeof key === "undefined") {
throw new Error(1050);
}
if (typeof clazz === "undefined") {
throw new Error(1051);
}
this._mappings[key] = {
clazz: clazz,
object: null,
isSingleton: false
};
if (this.autoMapOutlets) {
this.mapOutlet(key);
}
return this;
},
mapSingleton: function(key, clazz) {
if (typeof key === "undefined") {
throw new Error(1060);
}
if (typeof clazz === "undefined") {
throw new Error(1061);
}
this._mappings[key] = {
clazz: clazz,
object: null,
isSingleton: true
};
if (this.autoMapOutlets) {
this.mapOutlet(key);
}
return this;
},
instantiate: function(key) {
if (typeof key === "undefined") {
throw new Error(1070);
}
return this._retrieveFromCacheOrCreate(key, true);
},
injectInto: function(instance, key) {
if (typeof instance === "undefined") {
throw new Error(1080);
}
if (typeof instance === "object") {
var o = [];
if (this._outlets.hasOwnProperty("global")) {
o.push(this._outlets["global"]);
}
if (typeof key !== "undefined" && this._outlets.hasOwnProperty(key)) {
o.push(this._outlets[key]);
}
for (var i in o) {
var l = o[i];
for (var outlet in l) {
var source = l[outlet];
if (!this.strictInjections || outlet in instance) {
instance[outlet] = this.getObject(source);
}
}
}
if ("setup" in instance) {
instance.setup.call(instance);
}
}
return this;
},
unmap: function(key) {
if (typeof key === "undefined") {
throw new Error(1090);
}
delete this._mappings[key];
return this;
},
unmapOutlet: function(target, outlet) {
if (typeof target === "undefined") {
throw new Error(1100);
}
if (typeof outlet === "undefined") {
throw new Error(1101);
}
delete this._outlets[target][outlet];
return this;
},
mapHandler: function(eventName, key, handler, oneShot, passEvent) {
if (typeof eventName === "undefined") {
throw new Error(1110);
}
key = key || "global";
handler = handler || eventName;
if (typeof oneShot === "undefined") {
oneShot = false;
}
if (typeof passEvent === "undefined") {
passEvent = false;
}
if (!this._handlers.hasOwnProperty(eventName)) {
this._handlers[eventName] = {};
}
if (!this._handlers[eventName].hasOwnProperty(key)) {
this._handlers[eventName][key] = [];
}
this._handlers[eventName][key].push({
handler: handler,
oneShot: oneShot,
passEvent: passEvent
});
return this;
},
unmapHandler: function(eventName, key, handler) {
if (typeof eventName === "undefined") {
throw new Error(1120);
}
key = key || "global";
handler = handler || eventName;
if (this._handlers.hasOwnProperty(eventName) && this._handlers[eventName].hasOwnProperty(key)) {
var handlers = this._handlers[eventName][key];
for (var i in handlers) {
var config = handlers[i];
if (config.handler === handler) {
handlers.splice(i, 1);
break;
}
}
}
return this;
},
notify: function(eventName) {
if (typeof eventName === "undefined") {
throw new Error(1130);
}
var argsWithEvent = Array.prototype.slice.call(arguments);
var argsClean = argsWithEvent.slice(1);
if (this._handlers.hasOwnProperty(eventName)) {
var handlers = this._handlers[eventName];
for (var key in handlers) {
var configs = handlers[key];
var instance;
if (key !== "global") {
instance = this.getObject(key);
}
var toBeDeleted = [];
var i, n;
for (i = 0, n = configs.length; i < n; i++) {
var handler;
var config = configs[i];
if (instance && typeof config.handler === "string") {
handler = instance[config.handler];
} else {
handler = config.handler;
}
if (config.oneShot) {
toBeDeleted.unshift(i);
}
if (config.passEvent) {
handler.apply(instance, argsWithEvent);
} else {
handler.apply(instance, argsClean);
}
}
for (i = 0, n = toBeDeleted.length; i < n; i++) {
configs.splice(toBeDeleted[i], 1);
}
}
}
return this;
}
};
scope.dijon = dijon;
})(this);
if (typeof utils == "undefined") {
var utils = {};
}
if (typeof utils.Math == "undefined") {
utils.Math = {};
}
utils.Math.to64BitNumber = function(low, high) {
var highNum, lowNum, expected;
highNum = new goog.math.Long(0, high);
lowNum = new goog.math.Long(low, 0);
expected = highNum.add(lowNum);
return expected.toNumber();
};
goog = {};
goog.math = {};
goog.math.Long = function(low, high) {
this.low_ = low | 0;
this.high_ = high | 0;
};
goog.math.Long.IntCache_ = {};
goog.math.Long.fromInt = function(value) {
if (-128 <= value && value < 128) {
var cachedObj = goog.math.Long.IntCache_[value];
if (cachedObj) {
return cachedObj;
}
}
var obj = new goog.math.Long(value | 0, value < 0 ? -1 : 0);
if (-128 <= value && value < 128) {
goog.math.Long.IntCache_[value] = obj;
}
return obj;
};
goog.math.Long.fromNumber = function(value) {
if (isNaN(value) || !isFinite(value)) {
return goog.math.Long.ZERO;
} else if (value <= -goog.math.Long.TWO_PWR_63_DBL_) {
return goog.math.Long.MIN_VALUE;
} else if (value + 1 >= goog.math.Long.TWO_PWR_63_DBL_) {
return goog.math.Long.MAX_VALUE;
} else if (value < 0) {
return goog.math.Long.fromNumber(-value).negate();
} else {
return new goog.math.Long(value % goog.math.Long.TWO_PWR_32_DBL_ | 0, value / goog.math.Long.TWO_PWR_32_DBL_ | 0);
}
};
goog.math.Long.fromBits = function(lowBits, highBits) {
return new goog.math.Long(lowBits, highBits);
};
goog.math.Long.fromString = function(str, opt_radix) {
if (str.length == 0) {
throw Error("number format error: empty string");
}
var radix = opt_radix || 10;
if (radix < 2 || 36 < radix) {
throw Error("radix out of range: " + radix);
}
if (str.charAt(0) == "-") {
return goog.math.Long.fromString(str.substring(1), radix).negate();
} else if (str.indexOf("-") >= 0) {
throw Error('number format error: interior "-" character: ' + str);
}
var radixToPower = goog.math.Long.fromNumber(Math.pow(radix, 8));
var result = goog.math.Long.ZERO;
for (var i = 0; i < str.length; i += 8) {
var size = Math.min(8, str.length - i);
var value = parseInt(str.substring(i, i + size), radix);
if (size < 8) {
var power = goog.math.Long.fromNumber(Math.pow(radix, size));
result = result.multiply(power).add(goog.math.Long.fromNumber(value));
} else {
result = result.multiply(radixToPower);
result = result.add(goog.math.Long.fromNumber(value));
}
}
return result;
};
goog.math.Long.TWO_PWR_16_DBL_ = 1 << 16;
goog.math.Long.TWO_PWR_24_DBL_ = 1 << 24;
goog.math.Long.TWO_PWR_32_DBL_ = goog.math.Long.TWO_PWR_16_DBL_ * goog.math.Long.TWO_PWR_16_DBL_;
goog.math.Long.TWO_PWR_31_DBL_ = goog.math.Long.TWO_PWR_32_DBL_ / 2;
goog.math.Long.TWO_PWR_48_DBL_ = goog.math.Long.TWO_PWR_32_DBL_ * goog.math.Long.TWO_PWR_16_DBL_;
goog.math.Long.TWO_PWR_64_DBL_ = goog.math.Long.TWO_PWR_32_DBL_ * goog.math.Long.TWO_PWR_32_DBL_;
goog.math.Long.TWO_PWR_63_DBL_ = goog.math.Long.TWO_PWR_64_DBL_ / 2;
goog.math.Long.ZERO = goog.math.Long.fromInt(0);
goog.math.Long.ONE = goog.math.Long.fromInt(1);
goog.math.Long.NEG_ONE = goog.math.Long.fromInt(-1);
goog.math.Long.MAX_VALUE = goog.math.Long.fromBits(4294967295 | 0, 2147483647 | 0);
goog.math.Long.MIN_VALUE = goog.math.Long.fromBits(0, 2147483648 | 0);
goog.math.Long.TWO_PWR_24_ = goog.math.Long.fromInt(1 << 24);
goog.math.Long.prototype.toInt = function() {
return this.low_;
};
goog.math.Long.prototype.toNumber = function() {
return this.high_ * goog.math.Long.TWO_PWR_32_DBL_ + this.getLowBitsUnsigned();
};
goog.math.Long.prototype.toString = function(opt_radix) {
var radix = opt_radix || 10;
if (radix < 2 || 36 < radix) {
throw Error("radix out of range: " + radix);
}
if (this.isZero()) {
return "0";
}
if (this.isNegative()) {
if (this.equals(goog.math.Long.MIN_VALUE)) {
var radixLong = goog.math.Long.fromNumber(radix);
var div = this.div(radixLong);
var rem = div.multiply(radixLong).subtract(this);
return div.toString(radix) + rem.toInt().toString(radix);
} else {
return "-" + this.negate().toString(radix);
}
}
var radixToPower = goog.math.Long.fromNumber(Math.pow(radix, 6));
var rem = this;
var result = "";
while (true) {
var remDiv = rem.div(radixToPower);
var intval = rem.subtract(remDiv.multiply(radixToPower)).toInt();
var digits = intval.toString(radix);
rem = remDiv;
if (rem.isZero()) {
return digits + result;
} else {
while (digits.length < 6) {
digits = "0" + digits;
}
result = "" + digits + result;
}
}
};
goog.math.Long.prototype.getHighBits = function() {
return this.high_;
};
goog.math.Long.prototype.getLowBits = function() {
return this.low_;
};
goog.math.Long.prototype.getLowBitsUnsigned = function() {
return this.low_ >= 0 ? this.low_ : goog.math.Long.TWO_PWR_32_DBL_ + this.low_;
};
goog.math.Long.prototype.getNumBitsAbs = function() {
if (this.isNegative()) {
if (this.equals(goog.math.Long.MIN_VALUE)) {
return 64;
} else {
return this.negate().getNumBitsAbs();
}
} else {
var val = this.high_ != 0 ? this.high_ : this.low_;
for (var bit = 31; bit > 0; bit--) {
if ((val & 1 << bit) != 0) {
break;
}
}
return this.high_ != 0 ? bit + 33 : bit + 1;
}
};
goog.math.Long.prototype.isZero = function() {
return this.high_ == 0 && this.low_ == 0;
};
goog.math.Long.prototype.isNegative = function() {
return this.high_ < 0;
};
goog.math.Long.prototype.isOdd = function() {
return (this.low_ & 1) == 1;
};
goog.math.Long.prototype.equals = function(other) {
return this.high_ == other.high_ && this.low_ == other.low_;
};
goog.math.Long.prototype.notEquals = function(other) {
return this.high_ != other.high_ || this.low_ != other.low_;
};
goog.math.Long.prototype.lessThan = function(other) {
return this.compare(other) < 0;
};
goog.math.Long.prototype.lessThanOrEqual = function(other) {
return this.compare(other) <= 0;
};
goog.math.Long.prototype.greaterThan = function(other) {
return this.compare(other) > 0;
};
goog.math.Long.prototype.greaterThanOrEqual = function(other) {
return this.compare(other) >= 0;
};
goog.math.Long.prototype.compare = function(other) {
if (this.equals(other)) {
return 0;
}
var thisNeg = this.isNegative();
var otherNeg = other.isNegative();
if (thisNeg && !otherNeg) {
return -1;
}
if (!thisNeg && otherNeg) {
return 1;
}
if (this.subtract(other).isNegative()) {
return -1;
} else {
return 1;
}
};
goog.math.Long.prototype.negate = function() {
if (this.equals(goog.math.Long.MIN_VALUE)) {
return goog.math.Long.MIN_VALUE;
} else {
return this.not().add(goog.math.Long.ONE);
}
};
goog.math.Long.prototype.add = function(other) {
var a48 = this.high_ >>> 16;
var a32 = this.high_ & 65535;
var a16 = this.low_ >>> 16;
var a00 = this.low_ & 65535;
var b48 = other.high_ >>> 16;
var b32 = other.high_ & 65535;
var b16 = other.low_ >>> 16;
var b00 = other.low_ & 65535;
var c48 = 0, c32 = 0, c16 = 0, c00 = 0;
c00 += a00 + b00;
c16 += c00 >>> 16;
c00 &= 65535;
c16 += a16 + b16;
c32 += c16 >>> 16;
c16 &= 65535;
c32 += a32 + b32;
c48 += c32 >>> 16;
c32 &= 65535;
c48 += a48 + b48;
c48 &= 65535;
return goog.math.Long.fromBits(c16 << 16 | c00, c48 << 16 | c32);
};
goog.math.Long.prototype.subtract = function(other) {
return this.add(other.negate());
};
goog.math.Long.prototype.multiply = function(other) {
if (this.isZero()) {
return goog.math.Long.ZERO;
} else if (other.isZero()) {
return goog.math.Long.ZERO;
}
if (this.equals(goog.math.Long.MIN_VALUE)) {
return other.isOdd() ? goog.math.Long.MIN_VALUE : goog.math.Long.ZERO;
} else if (other.equals(goog.math.Long.MIN_VALUE)) {
return this.isOdd() ? goog.math.Long.MIN_VALUE : goog.math.Long.ZERO;
}
if (this.isNegative()) {
if (other.isNegative()) {
return this.negate().multiply(other.negate());
} else {
return this.negate().multiply(other).negate();
}
} else if (other.isNegative()) {
return this.multiply(other.negate()).negate();
}
if (this.lessThan(goog.math.Long.TWO_PWR_24_) && other.lessThan(goog.math.Long.TWO_PWR_24_)) {
return goog.math.Long.fromNumber(this.toNumber() * other.toNumber());
}
var a48 = this.high_ >>> 16;
var a32 = this.high_ & 65535;
var a16 = this.low_ >>> 16;
var a00 = this.low_ & 65535;
var b48 = other.high_ >>> 16;
var b32 = other.high_ & 65535;
var b16 = other.low_ >>> 16;
var b00 = other.low_ & 65535;
var c48 = 0, c32 = 0, c16 = 0, c00 = 0;
c00 += a00 * b00;
c16 += c00 >>> 16;
c00 &= 65535;
c16 += a16 * b00;
c32 += c16 >>> 16;
c16 &= 65535;
c16 += a00 * b16;
c32 += c16 >>> 16;
c16 &= 65535;
c32 += a32 * b00;
c48 += c32 >>> 16;
c32 &= 65535;
c32 += a16 * b16;
c48 += c32 >>> 16;
c32 &= 65535;
c32 += a00 * b32;
c48 += c32 >>> 16;
c32 &= 65535;
c48 += a48 * b00 + a32 * b16 + a16 * b32 + a00 * b48;
c48 &= 65535;
return goog.math.Long.fromBits(c16 << 16 | c00, c48 << 16 | c32);
};
goog.math.Long.prototype.div = function(other) {
if (other.isZero()) {
throw Error("division by zero");
} else if (this.isZero()) {
return goog.math.Long.ZERO;
}
if (this.equals(goog.math.Long.MIN_VALUE)) {
if (other.equals(goog.math.Long.ONE) || other.equals(goog.math.Long.NEG_ONE)) {
return goog.math.Long.MIN_VALUE;
} else if (other.equals(goog.math.Long.MIN_VALUE)) {
return goog.math.Long.ONE;
} else {
var halfThis = this.shiftRight(1);
var approx = halfThis.div(other).shiftLeft(1);
if (approx.equals(goog.math.Long.ZERO)) {
return other.isNegative() ? goog.math.Long.ONE : goog.math.Long.NEG_ONE;
} else {
var rem = this.subtract(other.multiply(approx));
var result = approx.add(rem.div(other));
return result;
}
}
} else if (other.equals(goog.math.Long.MIN_VALUE)) {
return goog.math.Long.ZERO;
}
if (this.isNegative()) {
if (other.isNegative()) {
return this.negate().div(other.negate());
} else {
return this.negate().div(other).negate();
}
} else if (other.isNegative()) {
return this.div(other.negate()).negate();
}
var res = goog.math.Long.ZERO;
var rem = this;
while (rem.greaterThanOrEqual(other)) {
var approx = Math.max(1, Math.floor(rem.toNumber() / other.toNumber()));
var log2 = Math.ceil(Math.log(approx) / Math.LN2);
var delta = log2 <= 48 ? 1 : Math.pow(2, log2 - 48);
var approxRes = goog.math.Long.fromNumber(approx);
var approxRem = approxRes.multiply(other);
while (approxRem.isNegative() || approxRem.greaterThan(rem)) {
approx -= delta;
approxRes = goog.math.Long.fromNumber(approx);
approxRem = approxRes.multiply(other);
}
if (approxRes.isZero()) {
approxRes = goog.math.Long.ONE;
}
res = res.add(approxRes);
rem = rem.subtract(approxRem);
}
return res;
};
goog.math.Long.prototype.modulo = function(other) {
return this.subtract(this.div(other).multiply(other));
};
goog.math.Long.prototype.not = function() {
return goog.math.Long.fromBits(~this.low_, ~this.high_);
};
goog.math.Long.prototype.and = function(other) {
return goog.math.Long.fromBits(this.low_ & other.low_, this.high_ & other.high_);
};
goog.math.Long.prototype.or = function(other) {
return goog.math.Long.fromBits(this.low_ | other.low_, this.high_ | other.high_);
};
goog.math.Long.prototype.xor = function(other) {
return goog.math.Long.fromBits(this.low_ ^ other.low_, this.high_ ^ other.high_);
};
goog.math.Long.prototype.shiftLeft = function(numBits) {
numBits &= 63;
if (numBits == 0) {
return this;
} else {
var low = this.low_;
if (numBits < 32) {
var high = this.high_;
return goog.math.Long.fromBits(low << numBits, high << numBits | low >>> 32 - numBits);
} else {
return goog.math.Long.fromBits(0, low << numBits - 32);
}
}
};
goog.math.Long.prototype.shiftRight = function(numBits) {
numBits &= 63;
if (numBits == 0) {
return this;
} else {
var high = this.high_;
if (numBits < 32) {
var low = this.low_;
return goog.math.Long.fromBits(low >>> numBits | high << 32 - numBits, high >> numBits);
} else {
return goog.math.Long.fromBits(high >> numBits - 32, high >= 0 ? 0 : -1);
}
}
};
goog.math.Long.prototype.shiftRightUnsigned = function(numBits) {
numBits &= 63;
if (numBits == 0) {
return this;
} else {
var high = this.high_;
if (numBits < 32) {
var low = this.low_;
return goog.math.Long.fromBits(low >>> numBits | high << 32 - numBits, high >>> numBits);
} else if (numBits == 32) {
return goog.math.Long.fromBits(high, 0);
} else {
return goog.math.Long.fromBits(high >>> numBits - 32, 0);
}
}
};
var UTF8 = {};
UTF8.encode = function(s) {
var u = [];
for (var i = 0; i < s.length; ++i) {
var c = s.charCodeAt(i);
if (c < 128) {
u.push(c);
} else if (c < 2048) {
u.push(192 | c >> 6);
u.push(128 | 63 & c);
} else if (c < 65536) {
u.push(224 | c >> 12);
u.push(128 | 63 & c >> 6);
u.push(128 | 63 & c);
} else {
u.push(240 | c >> 18);
u.push(128 | 63 & c >> 12);
u.push(128 | 63 & c >> 6);
u.push(128 | 63 & c);
}
}
return u;
};
UTF8.decode = function(u) {
var a = [];
var i = 0;
while (i < u.length) {
var v = u[i++];
if (v < 128) {} else if (v < 224) {
v = (31 & v) << 6;
v |= 63 & u[i++];
} else if (v < 240) {
v = (15 & v) << 12;
v |= (63 & u[i++]) << 6;
v |= 63 & u[i++];
} else {
v = (7 & v) << 18;
v |= (63 & u[i++]) << 12;
v |= (63 & u[i++]) << 6;
v |= 63 & u[i++];
}
a.push(String.fromCharCode(v));
}
return a.join("");
};
var BASE64 = {};
(function(T) {
var encodeArray = function(u) {
var i = 0;
var a = [];
var n = 0 | u.length / 3;
while (0 < n--) {
var v = (u[i] << 16) + (u[i + 1] << 8) + u[i + 2];
i += 3;
a.push(T.charAt(63 & v >> 18));
a.push(T.charAt(63 & v >> 12));
a.push(T.charAt(63 & v >> 6));
a.push(T.charAt(63 & v));
}
if (2 == u.length - i) {
var v = (u[i] << 16) + (u[i + 1] << 8);
a.push(T.charAt(63 & v >> 18));
a.push(T.charAt(63 & v >> 12));
a.push(T.charAt(63 & v >> 6));
a.push("=");
} else if (1 == u.length - i) {
var v = u[i] << 16;
a.push(T.charAt(63 & v >> 18));
a.push(T.charAt(63 & v >> 12));
a.push("==");
}
return a.join("");
};
var R = function() {
var a = [];
for (var i = 0; i < T.length; ++i) {
a[T.charCodeAt(i)] = i;
}
a["=".charCodeAt(0)] = 0;
return a;
}();
var decodeArray = function(s) {
var i = 0;
var u = [];
var n = 0 | s.length / 4;
while (0 < n--) {
var v = (R[s.charCodeAt(i)] << 18) + (R[s.charCodeAt(i + 1)] << 12) + (R[s.charCodeAt(i + 2)] << 6) + R[s.charCodeAt(i + 3)];
u.push(255 & v >> 16);
u.push(255 & v >> 8);
u.push(255 & v);
i += 4;
}
if (u) {
if ("=" == s.charAt(i - 2)) {
u.pop();
u.pop();
} else if ("=" == s.charAt(i - 1)) {
u.pop();
}
}
return u;
};
var ASCII = {};
ASCII.encode = function(s) {
var u = [];
for (var i = 0; i < s.length; ++i) {
u.push(s.charCodeAt(i));
}
return u;
};
ASCII.decode = function(u) {
for (var i = 0; i < s.length; ++i) {
a[i] = String.fromCharCode(a[i]);
}
return a.join("");
};
BASE64.decodeArray = function(s) {
var u = decodeArray(s);
return new Uint8Array(u);
};
BASE64.encodeASCII = function(s) {
var u = ASCII.encode(s);
return encodeArray(u);
};
BASE64.decodeASCII = function(s) {
var a = decodeArray(s);
return ASCII.decode(a);
};
BASE64.encode = function(s) {
var u = UTF8.encode(s);
return encodeArray(u);
};
BASE64.decode = function(s) {
var u = decodeArray(s);
return UTF8.decode(u);
};
})("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/");
if (undefined === btoa) {
var btoa = BASE64.encode;
}
if (undefined === atob) {
var atob = BASE64.decode;
}
MediaPlayer = function(context) {
"use strict";
var VERSION = "1.4.0", DEFAULT_TIME_SERVER = "https://time.akamai.com/?iso", DEFAULT_TIME_SOURCE_SCHEME = "urn:mpeg:dash:utc:http-xsdate:2014", numOfParallelRequestAllowed = 0, system, abrController, element, source, protectionController = null, protectionData = null, streamController, rulesController, playbackController, metricsExt, metricsModel, videoModel, DOMStorage, initialized = false, playing = false, autoPlay = true, scheduleWhilePaused = false, bufferMax = MediaPlayer.dependencies.BufferController.BUFFER_SIZE_REQUIRED, useManifestDateHeaderTimeSource = true, UTCTimingSources = [], liveDelayFragmentCount = 4, usePresentationDelay = false, isReady = function() {
return !!element && !!source;
}, play = function() {
if (!initialized) {
throw "MediaPlayer not initialized!";
}
if (!this.capabilities.supportsMediaSource()) {
this.errHandler.capabilityError("mediasource");
return;
}
if (!element || !source) {
throw "Missing view or source.";
}
playing = true;
this.debug.log("Playback initiated!");
streamController = system.getObject("streamController");
playbackController.subscribe(MediaPlayer.dependencies.PlaybackController.eventList.ENAME_PLAYBACK_SEEKING, streamController);
playbackController.subscribe(MediaPlayer.dependencies.PlaybackController.eventList.ENAME_PLAYBACK_TIME_UPDATED, streamController);
playbackController.subscribe(MediaPlayer.dependencies.PlaybackController.eventList.ENAME_CAN_PLAY, streamController);
playbackController.subscribe(MediaPlayer.dependencies.PlaybackController.eventList.ENAME_PLAYBACK_ERROR, streamController);
playbackController.setLiveDelayAttributes(liveDelayFragmentCount, usePresentationDelay);
streamController.initialize(autoPlay, protectionController, protectionData);
DOMStorage.checkInitialBitrate();
if (typeof source === "string") {
streamController.load(source);
} else {
streamController.loadWithManifest(source);
}
streamController.setUTCTimingSources(UTCTimingSources, useManifestDateHeaderTimeSource);
system.mapValue("scheduleWhilePaused", scheduleWhilePaused);
system.mapOutlet("scheduleWhilePaused", "stream");
system.mapOutlet("scheduleWhilePaused", "scheduleController");
system.mapValue("numOfParallelRequestAllowed", numOfParallelRequestAllowed);
system.mapOutlet("numOfParallelRequestAllowed", "scheduleController");
system.mapValue("bufferMax", bufferMax);
system.mapOutlet("bufferMax", "bufferController");
rulesController.initialize();
}, doAutoPlay = function() {
if (isReady()) {
play.call(this);
}
}, getDVRInfoMetric = function() {
var metric = metricsModel.getReadOnlyMetricsFor("video") || metricsModel.getReadOnlyMetricsFor("audio");
return metricsExt.getCurrentDVRInfo(metric);
}, getDVRWindowSize = function() {
return getDVRInfoMetric.call(this).manifestInfo.DVRWindowSize;
}, getDVRSeekOffset = function(value) {
var metric = getDVRInfoMetric.call(this), val = metric.range.start + value;
if (val > metric.range.end) {
val = metric.range.end;
}
return val;
}, seek = function(value) {
this.getVideoModel().getElement().currentTime = this.getDVRSeekOffset(value);
}, time = function() {
var metric = getDVRInfoMetric.call(this);
return metric === null ? 0 : this.duration() - (metric.range.end - metric.time);
}, duration = function() {
var metric = getDVRInfoMetric.call(this), range;
if (metric === null) {
return 0;
}
range = metric.range.end - metric.range.start;
return range < metric.manifestInfo.DVRWindowSize ? range : metric.manifestInfo.DVRWindowSize;
}, getAsUTC = function(valToConvert) {
var metric = getDVRInfoMetric.call(this), availableFrom, utcValue;
if (metric === null) {
return 0;
}
availableFrom = metric.manifestInfo.availableFrom.getTime() / 1e3;
utcValue = valToConvert + (availableFrom + metric.range.start);
return utcValue;
}, timeAsUTC = function() {
return getAsUTC.call(this, this.time());
}, durationAsUTC = function() {
return getAsUTC.call(this, this.duration());
}, formatUTC = function(time, locales, hour12) {
var dt = new Date(time * 1e3);
var d = dt.toLocaleDateString(locales);
var t = dt.toLocaleTimeString(locales, {
hour12: hour12
});
return t + " " + d;
}, convertToTimeCode = function(value) {
value = Math.max(value, 0);
var h = Math.floor(value / 3600);
var m = Math.floor(value % 3600 / 60);
var s = Math.floor(value % 3600 % 60);
return (h === 0 ? "" : h < 10 ? "0" + h.toString() + ":" : h.toString() + ":") + (m < 10 ? "0" + m.toString() : m.toString()) + ":" + (s < 10 ? "0" + s.toString() : s.toString());
}, updateRules = function(type, rules, override) {
if (!rules || type === undefined || type === null) return;
if (override) {
rulesController.setRules(type, rules);
} else {
rulesController.addRules(type, rules);
}
}, doReset = function() {
if (playing && streamController) {
playbackController.unsubscribe(MediaPlayer.dependencies.PlaybackController.eventList.ENAME_PLAYBACK_SEEKING, streamController);
playbackController.unsubscribe(MediaPlayer.dependencies.PlaybackController.eventList.ENAME_PLAYBACK_TIME_UPDATED, streamController);
playbackController.unsubscribe(MediaPlayer.dependencies.PlaybackController.eventList.ENAME_CAN_PLAY, streamController);
playbackController.unsubscribe(MediaPlayer.dependencies.PlaybackController.eventList.ENAME_PLAYBACK_ERROR, streamController);
streamController.reset();
abrController.reset();
rulesController.reset();
playbackController.reset();
streamController = null;
playing = false;
}
};
var _getObject = dijon.System.prototype.getObject;
dijon.System.prototype.getObject = function(name) {
var obj = _getObject.call(this, name);
if (typeof obj === "object" && !obj.getName) {
obj.getName = function() {
return name;
};
obj.setMediaType = function(mediaType) {
obj.mediaType = mediaType;
};
obj.getMediaType = function() {
return obj.mediaType;
};
}
return obj;
};
system = new dijon.System();
system.mapValue("system", system);
system.mapOutlet("system");
system.injectInto(context);
return {
notifier: undefined,
debug: undefined,
eventBus: undefined,
capabilities: undefined,
adapter: undefined,
errHandler: undefined,
uriQueryFragModel: undefined,
videoElementExt: undefined,
setup: function() {
metricsExt = system.getObject("metricsExt");
abrController = system.getObject("abrController");
rulesController = system.getObject("rulesController");
metricsModel = system.getObject("metricsModel");
DOMStorage = system.getObject("DOMStorage");
playbackController = system.getObject("playbackController");
this.restoreDefaultUTCTimingSources();
},
addEventListener: function(type, listener, useCapture) {
type = type.toLowerCase();
this.eventBus.addEventListener(type, listener, useCapture);
},
removeEventListener: function(type, listener, useCapture) {
type = type.toLowerCase();
this.eventBus.removeEventListener(type, listener, useCapture);
},
getVersion: function() {
return VERSION;
},
startup: function() {
if (!initialized) {
system.injectInto(this);
initialized = true;
}
},
getDebug: function() {
return this.debug;
},
getVideoModel: function() {
return videoModel;
},
setLiveDelayFragmentCount: function(value) {
liveDelayFragmentCount = value;
},
useSuggestedPresentationDelay: function(value) {
usePresentationDelay = value;
},
enableLastBitrateCaching: function(enable, ttl) {
DOMStorage.enableLastBitrateCaching(enable, ttl);
},
setNumOfParallelRequestAllowed: function(value) {
numOfParallelRequestAllowed = value;
},
setMaxAllowedBitrateFor: function(type, value) {
abrController.setMaxAllowedBitrateFor(type, value);
},
getMaxAllowedBitrateFor: function(type) {
return abrController.getMaxAllowedBitrateFor(type);
},
setAutoPlay: function(value) {
autoPlay = value;
},
getAutoPlay: function() {
return autoPlay;
},
setScheduleWhilePaused: function(value) {
scheduleWhilePaused = value;
},
getScheduleWhilePaused: function() {
return scheduleWhilePaused;
},
setBufferMax: function(value) {
bufferMax = value;
},
getBufferMax: function() {
return bufferMax;
},
getMetricsExt: function() {
return metricsExt;
},
getMetricsFor: function(type) {
return metricsModel.getReadOnlyMetricsFor(type);
},
getQualityFor: function(type) {
return abrController.getQualityFor(type, streamController.getActiveStreamInfo());
},
setQualityFor: function(type, value) {
abrController.setPlaybackQuality(type, streamController.getActiveStreamInfo(), value);
},
getBitrateInfoListFor: function(type) {
var streamInfo = streamController.getActiveStreamInfo(), stream = streamController.getStreamById(streamInfo.id);
return stream.getBitrateListFor(type);
},
setInitialBitrateFor: function(type, value) {
abrController.setInitialBitrateFor(type, value);
},
getInitialBitrateFor: function(type) {
return abrController.getInitialBitrateFor(type);
},
getAutoSwitchQuality: function() {
return abrController.getAutoSwitchBitrate();
},
setAutoSwitchQuality: function(value) {
abrController.setAutoSwitchBitrate(value);
},
setSchedulingRules: function(newRulesCollection) {
updateRules.call(this, rulesController.SCHEDULING_RULE, newRulesCollection, true);
},
addSchedulingRules: function(newRulesCollection) {
updateRules.call(this, rulesController.SCHEDULING_RULE, newRulesCollection, false);
},
setABRRules: function(newRulesCollection) {
updateRules.call(this, rulesController.ABR_RULE, newRulesCollection, true);
},
addABRRules: function(newRulesCollection) {
updateRules.call(this, rulesController.ABR_RULE, newRulesCollection, false);
},
createProtection: function() {
return system.getObject("protectionController");
},
retrieveManifest: function(url, callback) {
(function(manifestUrl) {
var manifestLoader = system.getObject("manifestLoader"), uriQueryFragModel = system.getObject("uriQueryFragModel"), cbObj = {};
cbObj[MediaPlayer.dependencies.ManifestLoader.eventList.ENAME_MANIFEST_LOADED] = function(e) {
if (!e.error) {
callback(e.data.manifest);
} else {
callback(null, e.error);
}
manifestLoader.unsubscribe(MediaPlayer.dependencies.ManifestLoader.eventList.ENAME_MANIFEST_LOADED, this);
};
manifestLoader.subscribe(MediaPlayer.dependencies.ManifestLoader.eventList.ENAME_MANIFEST_LOADED, cbObj);
manifestLoader.load(uriQueryFragModel.parseURI(manifestUrl));
})(url);
},
addUTCTimingSource: function(schemeIdUri, value) {
this.removeUTCTimingSource(schemeIdUri, value);
var vo = new Dash.vo.UTCTiming();
vo.schemeIdUri = schemeIdUri;
vo.value = value;
UTCTimingSources.push(vo);
},
removeUTCTimingSource: function(schemeIdUri, value) {
UTCTimingSources.forEach(function(obj, idx) {
if (obj.schemeIdUri === schemeIdUri && obj.value === value) {
UTCTimingSources.splice(idx, 1);
}
});
},
clearDefaultUTCTimingSources: function() {
UTCTimingSources = [];
},
restoreDefaultUTCTimingSources: function() {
this.addUTCTimingSource(DEFAULT_TIME_SOURCE_SCHEME, DEFAULT_TIME_SERVER);
},
enableManifestDateHeaderTimeSource: function(value) {
useManifestDateHeaderTimeSource = value;
},
attachView: function(view) {
if (!initialized) {
throw "MediaPlayer not initialized!";
}
element = view;
videoModel = null;
if (element) {
videoModel = system.getObject("videoModel");
videoModel.setElement(element);
}
doReset.call(this);
if (isReady.call(this)) {
doAutoPlay.call(this);
}
},
attachSource: function(urlOrManifest, protectionCtrl, data) {
if (!initialized) {
throw "MediaPlayer not initialized!";
}
if (typeof urlOrManifest === "string") {
this.uriQueryFragModel.reset();
source = this.uriQueryFragModel.parseURI(urlOrManifest);
} else {
source = urlOrManifest;
}
protectionController = protectionCtrl;
protectionData = data;
doReset.call(this);
if (isReady.call(this)) {
doAutoPlay.call(this);
}
},
reset: function() {
this.attachSource(null);
this.attachView(null);
protectionController = null;
protectionData = null;
},
play: play,
isReady: isReady,
seek: seek,
time: time,
duration: duration,
timeAsUTC: timeAsUTC,
durationAsUTC: durationAsUTC,
getDVRWindowSize: getDVRWindowSize,
getDVRSeekOffset: getDVRSeekOffset,
formatUTC: formatUTC,
convertToTimeCode: convertToTimeCode
};
};
MediaPlayer.prototype = {
constructor: MediaPlayer
};
MediaPlayer.dependencies = {};
MediaPlayer.dependencies.protection = {};
MediaPlayer.dependencies.protection.servers = {};
MediaPlayer.utils = {};
MediaPlayer.models = {};
MediaPlayer.vo = {};
MediaPlayer.vo.metrics = {};
MediaPlayer.vo.protection = {};
MediaPlayer.rules = {};
MediaPlayer.di = {};
MediaPlayer.events = {
METRICS_CHANGED: "metricschanged",
METRIC_CHANGED: "metricchanged",
METRIC_UPDATED: "metricupdated",
METRIC_ADDED: "metricadded",
MANIFEST_LOADED: "manifestloaded",
STREAM_SWITCH_STARTED: "streamswitchstarted",
STREAM_SWITCH_COMPLETED: "streamswitchcompleted",
STREAM_INITIALIZED: "streaminitialized",
TEXT_TRACK_ADDED: "texttrackadded",
BUFFER_LOADED: "bufferloaded",
BUFFER_EMPTY: "bufferstalled",
ERROR: "error",
LOG: "log"
};
MediaPlayer.di.Context = function() {
"use strict";
var mapProtectionModel = function() {
var videoElement = document.createElement("video");
if (MediaPlayer.models.ProtectionModel_21Jan2015.detect(videoElement)) {
this.system.mapClass("protectionModel", MediaPlayer.models.ProtectionModel_21Jan2015);
} else if (MediaPlayer.models.ProtectionModel_3Feb2014.detect(videoElement)) {
this.system.mapClass("protectionModel", MediaPlayer.models.ProtectionModel_3Feb2014);
} else if (MediaPlayer.models.ProtectionModel_01b.detect(videoElement)) {
this.system.mapClass("protectionModel", MediaPlayer.models.ProtectionModel_01b);
} else {
var debug = this.system.getObject("debug");
debug.log("No supported version of EME detected on this user agent!");
debug.log("Attempts to play encrypted content will fail!");
}
};
return {
system: undefined,
setup: function() {
this.system.autoMapOutlets = true;
this.system.mapSingleton("debug", MediaPlayer.utils.Debug);
this.system.mapSingleton("eventBus", MediaPlayer.utils.EventBus);
this.system.mapSingleton("capabilities", MediaPlayer.utils.Capabilities);
this.system.mapSingleton("DOMStorage", MediaPlayer.utils.DOMStorage);
this.system.mapClass("customTimeRanges", MediaPlayer.utils.CustomTimeRanges);
this.system.mapSingleton("virtualBuffer", MediaPlayer.utils.VirtualBuffer);
this.system.mapSingleton("textTrackExtensions", MediaPlayer.utils.TextTrackExtensions);
this.system.mapSingleton("vttParser", MediaPlayer.utils.VTTParser);
this.system.mapSingleton("ttmlParser", MediaPlayer.utils.TTMLParser);
this.system.mapSingleton("videoModel", MediaPlayer.models.VideoModel);
this.system.mapSingleton("manifestModel", MediaPlayer.models.ManifestModel);
this.system.mapSingleton("metricsModel", MediaPlayer.models.MetricsModel);
this.system.mapSingleton("uriQueryFragModel", MediaPlayer.models.URIQueryAndFragmentModel);
this.system.mapSingleton("ksPlayReady", MediaPlayer.dependencies.protection.KeySystem_PlayReady);
this.system.mapSingleton("ksWidevine", MediaPlayer.dependencies.protection.KeySystem_Widevine);
this.system.mapSingleton("ksClearKey", MediaPlayer.dependencies.protection.KeySystem_ClearKey);
this.system.mapSingleton("serverPlayReady", MediaPlayer.dependencies.protection.servers.PlayReady);
this.system.mapSingleton("serverWidevine", MediaPlayer.dependencies.protection.servers.Widevine);
this.system.mapSingleton("serverClearKey", MediaPlayer.dependencies.protection.servers.ClearKey);
this.system.mapSingleton("serverDRMToday", MediaPlayer.dependencies.protection.servers.DRMToday);
this.system.mapSingleton("requestModifierExt", MediaPlayer.dependencies.RequestModifierExtensions);
this.system.mapSingleton("textSourceBuffer", MediaPlayer.dependencies.TextSourceBuffer);
this.system.mapSingleton("mediaSourceExt", MediaPlayer.dependencies.MediaSourceExtensions);
this.system.mapSingleton("sourceBufferExt", MediaPlayer.dependencies.SourceBufferExtensions);
this.system.mapSingleton("abrController", MediaPlayer.dependencies.AbrController);
this.system.mapSingleton("errHandler", MediaPlayer.dependencies.ErrorHandler);
this.system.mapSingleton("videoExt", MediaPlayer.dependencies.VideoModelExtensions);
this.system.mapSingleton("protectionExt", MediaPlayer.dependencies.ProtectionExtensions);
this.system.mapClass("protectionController", MediaPlayer.dependencies.ProtectionController);
this.system.mapSingleton("playbackController", MediaPlayer.dependencies.PlaybackController);
mapProtectionModel.call(this);
this.system.mapSingleton("liveEdgeFinder", MediaPlayer.dependencies.LiveEdgeFinder);
this.system.mapClass("metrics", MediaPlayer.models.MetricsList);
this.system.mapClass("insufficientBufferRule", MediaPlayer.rules.InsufficientBufferRule);
this.system.mapClass("bufferOccupancyRule", MediaPlayer.rules.BufferOccupancyRule);
this.system.mapClass("throughputRule", MediaPlayer.rules.ThroughputRule);
this.system.mapSingleton("abrRulesCollection", MediaPlayer.rules.ABRRulesCollection);
this.system.mapSingleton("rulesController", MediaPlayer.rules.RulesController);
this.system.mapClass("bufferLevelRule", MediaPlayer.rules.BufferLevelRule);
this.system.mapClass("pendingRequestsRule", MediaPlayer.rules.PendingRequestsRule);
this.system.mapClass("playbackTimeRule", MediaPlayer.rules.PlaybackTimeRule);
this.system.mapClass("sameTimeRequestRule", MediaPlayer.rules.SameTimeRequestRule);
this.system.mapClass("abandonRequestRule", MediaPlayer.rules.AbandonRequestsRule);
this.system.mapSingleton("scheduleRulesCollection", MediaPlayer.rules.ScheduleRulesCollection);
this.system.mapClass("liveEdgeBinarySearchRule", MediaPlayer.rules.LiveEdgeBinarySearchRule);
this.system.mapClass("liveEdgeWithTimeSynchronizationRule", MediaPlayer.rules.LiveEdgeWithTimeSynchronizationRule);
this.system.mapSingleton("synchronizationRulesCollection", MediaPlayer.rules.SynchronizationRulesCollection);
this.system.mapSingleton("xlinkController", MediaPlayer.dependencies.XlinkController);
this.system.mapSingleton("xlinkLoader", MediaPlayer.dependencies.XlinkLoader);
this.system.mapClass("streamProcessor", MediaPlayer.dependencies.StreamProcessor);
this.system.mapClass("eventController", MediaPlayer.dependencies.EventController);
this.system.mapClass("textController", MediaPlayer.dependencies.TextController);
this.system.mapClass("bufferController", MediaPlayer.dependencies.BufferController);
this.system.mapClass("manifestLoader", MediaPlayer.dependencies.ManifestLoader);
this.system.mapSingleton("manifestUpdater", MediaPlayer.dependencies.ManifestUpdater);
this.system.mapClass("fragmentController", MediaPlayer.dependencies.FragmentController);
this.system.mapClass("fragmentLoader", MediaPlayer.dependencies.FragmentLoader);
this.system.mapClass("fragmentModel", MediaPlayer.dependencies.FragmentModel);
this.system.mapSingleton("streamController", MediaPlayer.dependencies.StreamController);
this.system.mapClass("stream", MediaPlayer.dependencies.Stream);
this.system.mapClass("scheduleController", MediaPlayer.dependencies.ScheduleController);
this.system.mapSingleton("timeSyncController", MediaPlayer.dependencies.TimeSyncController);
this.system.mapSingleton("notifier", MediaPlayer.dependencies.Notifier);
}
};
};
Dash = function() {
"use strict";
return {
modules: {},
dependencies: {},
vo: {},
di: {}
};
}();
Dash.di.DashContext = function() {
"use strict";
return {
system: undefined,
setup: function() {
Dash.di.DashContext.prototype.setup.call(this);
this.system.mapClass("parser", Dash.dependencies.DashParser);
this.system.mapClass("indexHandler", Dash.dependencies.DashHandler);
this.system.mapSingleton("baseURLExt", Dash.dependencies.BaseURLExtensions);
this.system.mapClass("fragmentExt", Dash.dependencies.FragmentExtensions);
this.system.mapClass("trackController", Dash.dependencies.RepresentationController);
this.system.mapSingleton("manifestExt", Dash.dependencies.DashManifestExtensions);
this.system.mapSingleton("metricsExt", Dash.dependencies.DashMetricsExtensions);
this.system.mapSingleton("timelineConverter", Dash.dependencies.TimelineConverter);
this.system.mapSingleton("adapter", Dash.dependencies.DashAdapter);
}
};
};
Dash.di.DashContext.prototype = new MediaPlayer.di.Context();
Dash.di.DashContext.prototype.constructor = Dash.di.DashContext;
Dash.dependencies.DashAdapter = function() {
"use strict";
var periods = [], adaptations = {}, getRepresentationForTrackInfo = function(trackInfo, representationController) {
return representationController.getRepresentationForQuality(trackInfo.quality);
}, getAdaptationForMediaInfo = function(mediaInfo) {
return adaptations[mediaInfo.streamInfo.id][mediaInfo.index];
}, getPeriodForStreamInfo = function(streamInfo) {
var period, ln = periods.length, i = 0;
for (i; i < ln; i += 1) {
period = periods[i];
if (streamInfo.id === period.id) return period;
}
return null;
}, convertRepresentationToTrackInfo = function(manifest, representation) {
var trackInfo = new MediaPlayer.vo.TrackInfo(), a = representation.adaptation.period.mpd.manifest.Period_asArray[representation.adaptation.period.index].AdaptationSet_asArray[representation.adaptation.index], r = this.manifestExt.getRepresentationFor(representation.index, a);
trackInfo.id = representation.id;
trackInfo.quality = representation.index;
trackInfo.bandwidth = this.manifestExt.getBandwidth(r);
trackInfo.DVRWindow = representation.segmentAvailabilityRange;
trackInfo.fragmentDuration = representation.segmentDuration || (representation.segments && representation.segments.length > 0 ? representation.segments[0].duration : NaN);
trackInfo.MSETimeOffset = representation.MSETimeOffset;
trackInfo.useCalculatedLiveEdgeTime = representation.useCalculatedLiveEdgeTime;
trackInfo.mediaInfo = convertAdaptationToMediaInfo.call(this, manifest, representation.adaptation);
return trackInfo;
}, convertAdaptationToMediaInfo = function(manifest, adaptation) {
var mediaInfo = new MediaPlayer.vo.MediaInfo(), self = this, a = adaptation.period.mpd.manifest.Period_asArray[adaptation.period.index].AdaptationSet_asArray[adaptation.index];
mediaInfo.id = adaptation.id;
mediaInfo.index = adaptation.index;
mediaInfo.type = adaptation.type;
mediaInfo.streamInfo = convertPeriodToStreamInfo.call(this, manifest, adaptation.period);
mediaInfo.trackCount = this.manifestExt.getRepresentationCount(a);
mediaInfo.lang = this.manifestExt.getLanguageForAdaptation(a);
mediaInfo.codec = this.manifestExt.getCodec(a);
mediaInfo.mimeType = this.manifestExt.getMimeType(a);
mediaInfo.contentProtection = this.manifestExt.getContentProtectionData(a);
mediaInfo.bitrateList = this.manifestExt.getBitrateListForAdaptation(a);
if (mediaInfo.contentProtection) {
mediaInfo.contentProtection.forEach(function(item) {
item.KID = self.manifestExt.getKID(item);
});
}
mediaInfo.isText = this.manifestExt.getIsTextTrack(mediaInfo.mimeType);
return mediaInfo;
}, convertPeriodToStreamInfo = function(manifest, period) {
var streamInfo = new MediaPlayer.vo.StreamInfo(), THRESHOLD = 1;
streamInfo.id = period.id;
streamInfo.index = period.index;
streamInfo.start = period.start;
streamInfo.duration = period.duration;
streamInfo.manifestInfo = convertMpdToManifestInfo.call(this, manifest, period.mpd);
streamInfo.isLast = manifest.Period_asArray.length === 1 || Math.abs(streamInfo.start + streamInfo.duration - streamInfo.manifestInfo.duration) < THRESHOLD;
return streamInfo;
}, convertMpdToManifestInfo = function(manifest, mpd) {
var manifestInfo = new MediaPlayer.vo.ManifestInfo();
manifestInfo.DVRWindowSize = mpd.timeShiftBufferDepth;
manifestInfo.loadedTime = mpd.manifest.loadedTime;
manifestInfo.availableFrom = mpd.availabilityStartTime;
manifestInfo.minBufferTime = mpd.manifest.minBufferTime;
manifestInfo.maxFragmentDuration = mpd.maxSegmentDuration;
manifestInfo.duration = this.manifestExt.getDuration(manifest);
manifestInfo.isDynamic = this.manifestExt.getIsDynamic(manifest);
return manifestInfo;
}, getMediaInfoForType = function(manifest, streamInfo, type) {
var periodInfo = getPeriodForStreamInfo(streamInfo), periodId = periodInfo.id, data = this.manifestExt.getAdaptationForType(manifest, streamInfo.index, type), idx;
if (!data) return null;
idx = this.manifestExt.getIndexForAdaptation(data, manifest, streamInfo.index);
adaptations[periodId] = adaptations[periodId] || this.manifestExt.getAdaptationsForPeriod(manifest, periodInfo);
return convertAdaptationToMediaInfo.call(this, manifest, adaptations[periodId][idx]);
}, getStreamsInfoFromManifest = function(manifest) {
var mpd, streams = [], ln, i;
if (!manifest) return null;
mpd = this.manifestExt.getMpd(manifest);
periods = this.manifestExt.getRegularPeriods(manifest, mpd);
mpd.checkTime = this.manifestExt.getCheckTime(manifest, periods[0]);
adaptations = {};
ln = periods.length;
for (i = 0; i < ln; i += 1) {
streams.push(convertPeriodToStreamInfo.call(this, manifest, periods[i]));
}
return streams;
}, getMpdInfo = function(manifest) {
var mpd = this.manifestExt.getMpd(manifest);
return convertMpdToManifestInfo.call(this, manifest, mpd);
}, getInitRequest = function(streamProcessor, quality) {
var representation = streamProcessor.trackController.getRepresentationForQuality(quality);
return streamProcessor.indexHandler.getInitRequest(representation);
}, getNextFragmentRequest = function(streamProcessor, trackInfo) {
var representation = getRepresentationForTrackInfo(trackInfo, streamProcessor.trackController);
return streamProcessor.indexHandler.getNextSegmentRequest(representation);
}, getFragmentRequestForTime = function(streamProcessor, trackInfo, time, options) {
var representation = getRepresentationForTrackInfo(trackInfo, streamProcessor.trackController);
return streamProcessor.indexHandler.getSegmentRequestForTime(representation, time, options);
}, generateFragmentRequestForTime = function(streamProcessor, trackInfo, time) {
var representation = getRepresentationForTrackInfo(trackInfo, streamProcessor.trackController);
return streamProcessor.indexHandler.generateSegmentRequestForTime(representation, time);
}, getIndexHandlerTime = function(streamProcessor) {
return streamProcessor.indexHandler.getCurrentTime();
}, setIndexHandlerTime = function(streamProcessor, value) {
return streamProcessor.indexHandler.setCurrentTime(value);
}, updateData = function(manifest, streamProcessor) {
var periodInfo = getPeriodForStreamInfo(streamProcessor.getStreamInfo()), mediaInfo = streamProcessor.getMediaInfo(), adaptation = getAdaptationForMediaInfo(mediaInfo), type = streamProcessor.getType(), id, data;
id = mediaInfo.id;
data = id ? this.manifestExt.getAdaptationForId(id, manifest, periodInfo.index) : this.manifestExt.getAdaptationForIndex(mediaInfo.index, manifest, periodInfo.index);
streamProcessor.trackController.updateData(data, adaptation, type);
}, getTrackInfoForQuality = function(manifest, representationController, quality) {
var representation = representationController.getRepresentationForQuality(quality);
return representation ? convertRepresentationToTrackInfo.call(this, manifest, representation) : null;
}, getCurrentTrackInfo = function(manifest, representationController) {
var representation = representationController.getCurrentRepresentation();
return representation ? convertRepresentationToTrackInfo.call(this, manifest, representation) : null;
}, getEvent = function(eventBox, eventStreams, startTime) {
var event = new Dash.vo.Event(), schemeIdUri = eventBox[0], value = eventBox[1], timescale = eventBox[2], presentationTimeDelta = eventBox[3], duration = eventBox[4], id = eventBox[5], messageData = eventBox[6], presentationTime = startTime * timescale + presentationTimeDelta;
if (!eventStreams[schemeIdUri]) return null;
event.eventStream = eventStreams[schemeIdUri];
event.eventStream.value = value;
event.eventStream.timescale = timescale;
event.duration = duration;
event.id = id;
event.presentationTime = presentationTime;
event.messageData = messageData;
event.presentationTimeDelta = presentationTimeDelta;
return event;
}, getEventsFor = function(manifest, info, streamProcessor) {
var events = [];
if (info instanceof MediaPlayer.vo.StreamInfo) {
events = this.manifestExt.getEventsForPeriod(manifest, getPeriodForStreamInfo(info));
} else if (info instanceof MediaPlayer.vo.MediaInfo) {
events = this.manifestExt.getEventStreamForAdaptationSet(manifest, getAdaptationForMediaInfo(info));
} else if (info instanceof MediaPlayer.vo.TrackInfo) {
events = this.manifestExt.getEventStreamForRepresentation(manifest, getRepresentationForTrackInfo(info, streamProcessor.trackController));
}
return events;
};
return {
system: undefined,
manifestExt: undefined,
timelineConverter: undefined,
metricsList: {
TCP_CONNECTION: "TcpConnection",
HTTP_REQUEST: "HttpRequest",
HTTP_REQUEST_TRACE: "HttpRequestTrace",
TRACK_SWITCH: "RepresentationSwitch",
BUFFER_LEVEL: "BufferLevel",
BUFFER_STATE: "BufferState",
DVR_INFO: "DVRInfo",
DROPPED_FRAMES: "DroppedFrames",
SCHEDULING_INFO: "SchedulingInfo",
MANIFEST_UPDATE: "ManifestUpdate",
MANIFEST_UPDATE_STREAM_INFO: "ManifestUpdatePeriodInfo",
MANIFEST_UPDATE_TRACK_INFO: "ManifestUpdateRepresentationInfo",
PLAY_LIST: "PlayList",
PLAY_LIST_TRACE: "PlayListTrace"
},
convertDataToTrack: convertRepresentationToTrackInfo,
convertDataToMedia: convertAdaptationToMediaInfo,
convertDataToStream: convertPeriodToStreamInfo,
getDataForTrack: getRepresentationForTrackInfo,
getDataForMedia: getAdaptationForMediaInfo,
getDataForStream: getPeriodForStreamInfo,
getStreamsInfo: getStreamsInfoFromManifest,
getManifestInfo: getMpdInfo,
getMediaInfoForType: getMediaInfoForType,
getCurrentTrackInfo: getCurrentTrackInfo,
getTrackInfoForQuality: getTrackInfoForQuality,
updateData: updateData,
getInitRequest: getInitRequest,
getNextFragmentRequest: getNextFragmentRequest,
getFragmentRequestForTime: getFragmentRequestForTime,
generateFragmentRequestForTime: generateFragmentRequestForTime,
getIndexHandlerTime: getIndexHandlerTime,
setIndexHandlerTime: setIndexHandlerTime,
getEventsFor: getEventsFor,
getEvent: getEvent,
reset: function() {
periods = [];
adaptations = {};
}
};
};
Dash.dependencies.DashAdapter.prototype = {
constructor: Dash.dependencies.DashAdapter
};
Dash.create = function(video, source, context) {
if (typeof video === "undefined" || video.nodeName != "VIDEO") return null;
var player, videoID = video.id || video.name || "video element";
context = context || new Dash.di.DashContext();
source = source || [].slice.call(video.querySelectorAll("source")).filter(function(s) {
return s.type == Dash.supportedManifestMimeTypes.mimeType;
})[0];
if (source === undefined && video.src) {
source = document.createElement("source");
source.src = video.src;
} else if (source === undefined && !video.src) {
return null;
}
player = new MediaPlayer(context);
player.startup();
player.attachView(video);
player.setAutoPlay(video.autoplay);
player.attachSource(source.src);
player.getDebug().log("Converted " + videoID + " to dash.js player and added content: " + source.src);
return player;
};
Dash.createAll = function(className, scope, context) {
var aPlayers = [];
className = className || ".dashjs-player";
scope = scope || document;
context = context || new Dash.di.DashContext();
var videos = scope.querySelectorAll(className);
for (var i = 0; i < videos.length; i++) {
var player = Dash.create(videos[i], undefined, context);
aPlayers.push(player);
}
return aPlayers;
};
Dash.supportedManifestMimeTypes = {
mimeType: "application/dash+xml"
};
Dash.dependencies.DashHandler = function() {
"use strict";
var index = -1, requestedTime, isDynamic, type, currentTime = 0, absUrl = new RegExp("^(?:(?:[a-z]+:)?/)?/", "i"), zeroPadToLength = function(numStr, minStrLength) {
while (numStr.length < minStrLength) {
numStr = "0" + numStr;
}
return numStr;
}, replaceTokenForTemplate = function(url, token, value) {
var startPos, endPos, tokenLen = token.length, formatTag = "%0", formatTagLen = formatTag.length, formatTagPos, specifier, width, paddedValue;
while (true) {
startPos = url.indexOf("$" + token);
if (startPos < 0) {
return url;
}
endPos = url.indexOf("$", startPos + tokenLen);
if (endPos < 0) {
return url;
}
formatTagPos = url.indexOf(formatTag, startPos + tokenLen);
if (formatTagPos > startPos && formatTagPos < endPos) {
specifier = url.charAt(endPos - 1);
width = parseInt(url.substring(formatTagPos + formatTagLen, endPos - 1), 10);
switch (specifier) {
case "d":
case "i":
case "u":
paddedValue = zeroPadToLength(value.toString(), width);
break;
case "x":
paddedValue = zeroPadToLength(value.toString(16), width);
break;
case "X":
paddedValue = zeroPadToLength(value.toString(16), width).toUpperCase();
break;
case "o":
paddedValue = zeroPadToLength(value.toString(8), width);
break;
default:
this.log("Unsupported/invalid IEEE 1003.1 format identifier string in URL");
return url;
}
} else {
paddedValue = value;
}
url = url.substring(0, startPos) + paddedValue + url.substring(endPos + 1);
}
}, unescapeDollarsInTemplate = function(url) {
return url.split("$$").join("$");
}, replaceIDForTemplate = function(url, value) {
if (value === null || url.indexOf("$RepresentationID$") === -1) {
return url;
}
var v = value.toString();
return url.split("$RepresentationID$").join(v);
}, getNumberForSegment = function(segment, segmentIndex) {
return segment.representation.startNumber + segmentIndex;
}, getRequestUrl = function(destination, representation) {
var baseURL = representation.adaptation.period.mpd.manifest.Period_asArray[representation.adaptation.period.index].AdaptationSet_asArray[representation.adaptation.index].Representation_asArray[representation.index].BaseURL, url;
if (destination === baseURL) {
url = destination;
} else if (absUrl.test(destination)) {
url = destination;
} else {
url = baseURL + destination;
}
return url;
}, generateInitRequest = function(representation, mediaType) {
var self = this, period, request = new MediaPlayer.vo.FragmentRequest(), presentationStartTime;
period = representation.adaptation.period;
request.mediaType = mediaType;
request.type = "Initialization Segment";
request.url = getRequestUrl(representation.initialization, representation);
request.range = representation.range;
presentationStartTime = period.start;
request.availabilityStartTime = self.timelineConverter.calcAvailabilityStartTimeFromPresentationTime(presentationStartTime, representation.adaptation.period.mpd, isDynamic);
request.availabilityEndTime = self.timelineConverter.calcAvailabilityEndTimeFromPresentationTime(presentationStartTime + period.duration, period.mpd, isDynamic);
request.quality = representation.index;
return request;
}, getInit = function(representation) {
var self = this, request;
if (!representation) return null;
request = generateInitRequest.call(self, representation, type);
return request;
}, isMediaFinished = function(representation) {
var sDuration, period = representation.adaptation.period, isFinished = false, seg, fTime;
if (index < 0) {
isFinished = false;
} else if (isDynamic || index < representation.availableSegmentsNumber) {
seg = getSegmentByIndex(index, representation);
if (seg) {
fTime = seg.presentationStartTime - period.start;
sDuration = representation.adaptation.period.duration;
this.log(representation.segmentInfoType + ": " + fTime + " / " + sDuration);
isFinished = fTime >= sDuration;
}
} else {
isFinished = true;
}
return isFinished;
}, getIndexBasedSegment = function(representation, index) {
var self = this, seg, duration, presentationStartTime, presentationEndTime;
duration = representation.segmentDuration;
if (isNaN(duration)) {
duration = representation.adaptation.period.duration;
}
presentationStartTime = representation.adaptation.period.start + index * duration;
presentationEndTime = presentationStartTime + duration;
seg = new Dash.vo.Segment();
seg.representation = representation;
seg.duration = duration;
seg.presentationStartTime = presentationStartTime;
seg.mediaStartTime = self.timelineConverter.calcMediaTimeFromPresentationTime(seg.presentationStartTime, representation);
seg.availabilityStartTime = self.timelineConverter.calcAvailabilityStartTimeFromPresentationTime(seg.presentationStartTime, representation.adaptation.period.mpd, isDynamic);
seg.availabilityEndTime = self.timelineConverter.calcAvailabilityEndTimeFromPresentationTime(presentationEndTime, representation.adaptation.period.mpd, isDynamic);
seg.wallStartTime = self.timelineConverter.calcWallTimeForSegment(seg, isDynamic);
seg.replacementNumber = getNumberForSegment(seg, index);
seg.availabilityIdx = index;
return seg;
}, getSegmentsFromTimeline = function(representation) {
var self = this, template = representation.adaptation.period.mpd.manifest.Period_asArray[representation.adaptation.period.index].AdaptationSet_asArray[representation.adaptation.index].Representation_asArray[representation.index].SegmentTemplate, timeline = template.SegmentTimeline, isAvailableSegmentNumberCalculated = representation.availableSegmentsNumber > 0, maxSegmentsAhead = 10, segments = [], fragments, frag, i, len, j, repeat, repeatEndTime, nextFrag, time = 0, scaledTime = 0, availabilityIdx = -1, calculatedRange, hasEnoughSegments, requiredMediaTime, startIdx, endIdx, fTimescale, createSegment = function(s) {
return getTimeBasedSegment.call(self, representation, time, s.d, fTimescale, template.media, s.mediaRange, availabilityIdx);
};
fTimescale = representation.timescale;
fragments = timeline.S_asArray;
calculatedRange = decideSegmentListRangeForTimeline.call(self, representation);
if (calculatedRange) {
startIdx = calculatedRange.start;
endIdx = calculatedRange.end;
} else {
requiredMediaTime = self.timelineConverter.calcMediaTimeFromPresentationTime(requestedTime || 0, representation);
}
for (i = 0, len = fragments.length; i < len; i += 1) {
frag = fragments[i];
repeat = 0;
if (frag.hasOwnProperty("r")) {
repeat = frag.r;
}
if (frag.hasOwnProperty("t")) {
time = frag.t;
scaledTime = time / fTimescale;
}
if (repeat < 0) {
nextFrag = fragments[i + 1];
if (nextFrag && nextFrag.hasOwnProperty("t")) {
repeatEndTime = nextFrag.t / fTimescale;
} else {
repeatEndTime = self.timelineConverter.calcMediaTimeFromPresentationTime(representation.segmentAvailabilityRange.end, representation);
representation.segmentDuration = frag.d / fTimescale;
}
repeat = Math.ceil((repeatEndTime - scaledTime) / (frag.d / fTimescale)) - 1;
}
if (hasEnoughSegments) {
if (isAvailableSegmentNumberCalculated) break;
availabilityIdx += repeat + 1;
continue;
}
for (j = 0; j <= repeat; j += 1) {
availabilityIdx += 1;
if (calculatedRange) {
if (availabilityIdx > endIdx) {
hasEnoughSegments = true;
if (isAvailableSegmentNumberCalculated) break;
continue;
}
if (availabilityIdx >= startIdx) {
segments.push(createSegment.call(self, frag));
}
} else {
if (segments.length > maxSegmentsAhead) {
hasEnoughSegments = true;
if (isAvailableSegmentNumberCalculated) break;
continue;
}
if (scaledTime >= requiredMediaTime - frag.d / fTimescale) {
segments.push(createSegment.call(self, frag));
}
}
time += frag.d;
scaledTime = time / fTimescale;
}
}
if (!isAvailableSegmentNumberCalculated) {
representation.availableSegmentsNumber = availabilityIdx + 1;
}
return segments;
}, getSegmentsFromTemplate = function(representation) {
var segments = [], self = this, template = representation.adaptation.period.mpd.manifest.Period_asArray[representation.adaptation.period.index].AdaptationSet_asArray[representation.adaptation.index].Representation_asArray[representation.index].SegmentTemplate, duration = representation.segmentDuration, availabilityWindow = representation.segmentAvailabilityRange, segmentRange, periodSegIdx, startIdx, endIdx, seg = null, start, url = null;
start = representation.startNumber;
if (isNaN(duration) && !isDynamic) {
segmentRange = {
start: start,
end: start
};
} else {
segmentRange = decideSegmentListRangeForTemplate.call(self, representation);
}
startIdx = segmentRange.start;
endIdx = segmentRange.end;
for (periodSegIdx = startIdx; periodSegIdx <= endIdx; periodSegIdx += 1) {
seg = getIndexBasedSegment.call(self, representation, periodSegIdx);
seg.replacementTime = (start + periodSegIdx - 1) * representation.segmentDuration;
url = template.media;
url = replaceTokenForTemplate(url, "Number", seg.replacementNumber);
url = replaceTokenForTemplate(url, "Time", seg.replacementTime);
seg.media = url;
segments.push(seg);
seg = null;
}
if (isNaN(duration)) {
representation.availableSegmentsNumber = 1;
} else {
representation.availableSegmentsNumber = Math.ceil((availabilityWindow.end - availabilityWindow.start) / duration);
}
return segments;
}, decideSegmentListRangeForTemplate = function(representation) {
var self = this, duration = representation.segmentDuration, minBufferTime = representation.adaptation.period.mpd.manifest.minBufferTime, availabilityWindow = representation.segmentAvailabilityRange, periodRelativeRange = {
start: self.timelineConverter.calcPeriodRelativeTimeFromMpdRelativeTime(representation, availabilityWindow.start),
end: self.timelineConverter.calcPeriodRelativeTimeFromMpdRelativeTime(representation, availabilityWindow.end)
}, originAvailabilityTime = NaN, originSegment = null, currentSegmentList = representation.segments, availabilityLowerLimit = 2 * duration, availabilityUpperLimit = Math.max(2 * minBufferTime, 10 * duration), start, end, range;
if (!periodRelativeRange) {
periodRelativeRange = self.timelineConverter.calcSegmentAvailabilityRange(representation, isDynamic);
}
periodRelativeRange.start = Math.max(periodRelativeRange.start, 0);
if (isDynamic && !self.timelineConverter.isTimeSyncCompleted()) {
start = Math.floor(periodRelativeRange.start / duration);
end = Math.floor(periodRelativeRange.end / duration);
range = {
start: start,
end: end
};
return range;
}
if (currentSegmentList && currentSegmentList.length > 0) {
originSegment = getSegmentByIndex(index, representation);
originAvailabilityTime = originSegment ? self.timelineConverter.calcPeriodRelativeTimeFromMpdRelativeTime(representation, originSegment.presentationStartTime) : index > 0 ? index * duration : self.timelineConverter.calcPeriodRelativeTimeFromMpdRelativeTime(representation, requestedTime || currentSegmentList[0].presentationStartTime);
} else {
originAvailabilityTime = index > 0 ? index * duration : isDynamic ? periodRelativeRange.end : periodRelativeRange.start;
}
start = Math.floor(Math.max(originAvailabilityTime - availabilityLowerLimit, periodRelativeRange.start) / duration);
end = Math.floor(Math.min(start + availabilityUpperLimit / duration, periodRelativeRange.end / duration));
range = {
start: start,
end: end
};
return range;
}, decideSegmentListRangeForTimeline = function() {
var availabilityLowerLimit = 2, availabilityUpperLimit = 10, firstIdx = 0, lastIdx = Number.POSITIVE_INFINITY, start, end, range;
if (isDynamic && !this.timelineConverter.isTimeSyncCompleted()) {
range = {
start: firstIdx,
end: lastIdx
};
return range;
}
if (!isDynamic && requestedTime || index < 0) return null;
start = Math.max(index - availabilityLowerLimit, firstIdx);
end = Math.min(index + availabilityUpperLimit, lastIdx);
range = {
start: start,
end: end
};
return range;
}, getTimeBasedSegment = function(representation, time, duration, fTimescale, url, range, index) {
var self = this, scaledTime = time / fTimescale, scaledDuration = Math.min(duration / fTimescale, representation.adaptation.period.mpd.maxSegmentDuration), presentationStartTime, presentationEndTime, seg;
presentationStartTime = self.timelineConverter.calcPresentationTimeFromMediaTime(scaledTime, representation);
presentationEndTime = presentationStartTime + scaledDuration;
seg = new Dash.vo.Segment();
seg.representation = representation;
seg.duration = scaledDuration;
seg.mediaStartTime = scaledTime;
seg.presentationStartTime = presentationStartTime;
seg.availabilityStartTime = representation.adaptation.period.mpd.manifest.loadedTime;
seg.availabilityEndTime = self.timelineConverter.calcAvailabilityEndTimeFromPresentationTime(presentationEndTime, representation.adaptation.period.mpd, isDynamic);
seg.wallStartTime = self.timelineConverter.calcWallTimeForSegment(seg, isDynamic);
seg.replacementTime = time;
seg.replacementNumber = getNumberForSegment(seg, index);
url = replaceTokenForTemplate(url, "Number", seg.replacementNumber);
url = replaceTokenForTemplate(url, "Time", seg.replacementTime);
seg.media = url;
seg.mediaRange = range;
seg.availabilityIdx = index;
return seg;
}, getSegmentsFromList = function(representation) {
var self = this, segments = [], list = representation.adaptation.period.mpd.manifest.Period_asArray[representation.adaptation.period.index].AdaptationSet_asArray[representation.adaptation.index].Representation_asArray[representation.index].SegmentList, baseURL = representation.adaptation.period.mpd.manifest.Period_asArray[representation.adaptation.period.index].AdaptationSet_asArray[representation.adaptation.index].Representation_asArray[representation.index].BaseURL, len = list.SegmentURL_asArray.length, periodSegIdx, seg, s, range, startIdx, endIdx, start;
start = representation.startNumber;
range = decideSegmentListRangeForTemplate.call(self, representation);
startIdx = Math.max(range.start, 0);
endIdx = Math.min(range.end, list.SegmentURL_asArray.length - 1);
for (periodSegIdx = startIdx; periodSegIdx <= endIdx; periodSegIdx += 1) {
s = list.SegmentURL_asArray[periodSegIdx];
seg = getIndexBasedSegment.call(self, representation, periodSegIdx);
seg.replacementTime = (start + periodSegIdx - 1) * representation.segmentDuration;
seg.media = s.media ? s.media : baseURL;
seg.mediaRange = s.mediaRange;
seg.index = s.index;
seg.indexRange = s.indexRange;
segments.push(seg);
seg = null;
}
representation.availableSegmentsNumber = len;
return segments;
}, getSegments = function(representation) {
var segments, self = this, type = representation.segmentInfoType;
if (type === "SegmentBase" || type === "BaseURL" || !isSegmentListUpdateRequired.call(self, representation)) {
segments = representation.segments;
} else {
if (type === "SegmentTimeline") {
segments = getSegmentsFromTimeline.call(self, representation);
} else if (type === "SegmentTemplate") {
segments = getSegmentsFromTemplate.call(self, representation);
} else if (type === "SegmentList") {
segments = getSegmentsFromList.call(self, representation);
}
onSegmentListUpdated.call(self, representation, segments);
}
return segments;
}, onSegmentListUpdated = function(representation, segments) {
var lastIdx, liveEdge, metrics, lastSegment;
representation.segments = segments;
lastIdx = segments.length - 1;
if (isDynamic && isNaN(this.timelineConverter.getExpectedLiveEdge())) {
lastSegment = segments[lastIdx];
liveEdge = lastSegment.presentationStartTime;
metrics = this.metricsModel.getMetricsFor("stream");
this.timelineConverter.setExpectedLiveEdge(liveEdge);
this.metricsModel.updateManifestUpdateInfo(this.metricsExt.getCurrentManifestUpdate(metrics), {
presentationStartTime: liveEdge
});
}
}, updateSegmentList = function(representation) {
var self = this;
if (!representation) {
throw new Error("no representation");
}
representation.segments = null;
getSegments.call(self, representation);
return representation;
}, updateRepresentation = function(representation, keepIdx) {
var self = this, hasInitialization = representation.initialization, hasSegments = representation.segmentInfoType !== "BaseURL" && representation.segmentInfoType !== "SegmentBase", error;
if (!representation.segmentDuration && !representation.segments) {
updateSegmentList.call(self, representation);
}
representation.segmentAvailabilityRange = null;
representation.segmentAvailabilityRange = self.timelineConverter.calcSegmentAvailabilityRange(representation, isDynamic);
if (representation.segmentAvailabilityRange.end < representation.segmentAvailabilityRange.start && !representation.useCalculatedLiveEdgeTime) {
error = new MediaPlayer.vo.Error(Dash.dependencies.DashHandler.SEGMENTS_UNAVAILABLE_ERROR_CODE, "no segments are available yet", {
availabilityDelay: Math.abs(representation.segmentAvailabilityRange.end)
});
self.notify(Dash.dependencies.DashHandler.eventList.ENAME_REPRESENTATION_UPDATED, {
representation: representation
}, error);
return;
}
if (!keepIdx) index = -1;
if (representation.segmentDuration) {
updateSegmentList.call(self, representation);
}
if (!hasInitialization) {
self.baseURLExt.loadInitialization(representation);
}
if (!hasSegments) {
self.baseURLExt.loadSegments(representation, type, representation.indexRange);
}
if (hasInitialization && hasSegments) {
self.notify(Dash.dependencies.DashHandler.eventList.ENAME_REPRESENTATION_UPDATED, {
representation: representation
});
}
}, getIndexForSegments = function(time, representation, timeThreshold) {
var segments = representation.segments, ln = segments ? segments.length : null, idx = -1, epsilon, frag, ft, fd, i;
if (segments && ln > 0) {
for (i = 0; i < ln; i += 1) {
frag = segments[i];
ft = frag.presentationStartTime;
fd = frag.duration;
epsilon = timeThreshold === undefined || timeThreshold === null ? fd / 2 : timeThreshold;
if (time + epsilon >= ft && time - epsilon < ft + fd) {
idx = frag.availabilityIdx;
break;
}
}
}
return idx;
}, getSegmentByIndex = function(index, representation) {
if (!representation || !representation.segments) return null;
var ln = representation.segments.length, seg, i;
for (i = 0; i < ln; i += 1) {
seg = representation.segments[i];
if (seg.availabilityIdx === index) {
return seg;
}
}
return null;
}, isSegmentListUpdateRequired = function(representation) {
var updateRequired = false, segments = representation.segments, upperIdx, lowerIdx;
if (!segments || segments.length === 0) {
updateRequired = true;
} else {
lowerIdx = segments[0].availabilityIdx;
upperIdx = segments[segments.length - 1].availabilityIdx;
updateRequired = index < lowerIdx || index > upperIdx;
}
return updateRequired;
}, getRequestForSegment = function(segment) {
if (segment === null || segment === undefined) {
return null;
}
var request = new MediaPlayer.vo.FragmentRequest(), representation = segment.representation, bandwidth = representation.adaptation.period.mpd.manifest.Period_asArray[representation.adaptation.period.index].AdaptationSet_asArray[representation.adaptation.index].Representation_asArray[representation.index].bandwidth, url;
url = getRequestUrl(segment.media, representation);
url = replaceTokenForTemplate(url, "Number", segment.replacementNumber);
url = replaceTokenForTemplate(url, "Time", segment.replacementTime);
url = replaceTokenForTemplate(url, "Bandwidth", bandwidth);
url = replaceIDForTemplate(url, representation.id);
url = unescapeDollarsInTemplate(url);
request.mediaType = type;
request.type = "Media Segment";
request.url = url;
request.range = segment.mediaRange;
request.startTime = segment.presentationStartTime;
request.duration = segment.duration;
request.timescale = representation.timescale;
request.availabilityStartTime = segment.availabilityStartTime;
request.availabilityEndTime = segment.availabilityEndTime;
request.wallStartTime = segment.wallStartTime;
request.quality = representation.index;
request.index = segment.availabilityIdx;
return request;
}, getForTime = function(representation, time, options) {
var request, segment, finished, idx = index, keepIdx = options ? options.keepIdx : false, timeThreshold = options ? options.timeThreshold : null, ignoreIsFinished = options && options.ignoreIsFinished ? true : false, self = this;
if (!representation) {
return null;
}
requestedTime = time;
self.log("Getting the request for time: " + time);
index = getIndexForSegments.call(self, time, representation, timeThreshold);
getSegments.call(self, representation);
if (index < 0) {
index = getIndexForSegments.call(self, time, representation, timeThreshold);
}
self.log("Index for time " + time + " is " + index);
finished = !ignoreIsFinished ? isMediaFinished.call(self, representation) : false;
if (finished) {
request = new MediaPlayer.vo.FragmentRequest();
request.action = request.ACTION_COMPLETE;
request.index = index;
request.mediaType = type;
self.log("Signal complete.");
self.log(request);
} else {
segment = getSegmentByIndex(index, representation);
request = getRequestForSegment.call(self, segment);
}
if (keepIdx) {
index = idx;
}
return request;
}, generateForTime = function(representation, time) {
var step = (representation.segmentAvailabilityRange.end - representation.segmentAvailabilityRange.start) / 2;
representation.segments = null;
representation.segmentAvailabilityRange = {
start: time - step,
end: time + step
};
return getForTime.call(this, representation, time, {
keepIdx: false,
ignoreIsFinished: true
});
}, getNext = function(representation) {
var request, segment, finished, idx, self = this;
if (!representation) {
return null;
}
if (index === -1) {
throw "You must call getSegmentRequestForTime first.";
}
requestedTime = null;
index += 1;
idx = index;
finished = isMediaFinished.call(self, representation);
if (finished) {
request = new MediaPlayer.vo.FragmentRequest();
request.action = request.ACTION_COMPLETE;
request.index = idx;
request.mediaType = type;
self.log("Signal complete.");
} else {
getSegments.call(self, representation);
segment = getSegmentByIndex(idx, representation);
request = getRequestForSegment.call(self, segment);
}
return request;
}, onInitializationLoaded = function(e) {
var representation = e.data.representation;
if (!representation.segments) return;
this.notify(Dash.dependencies.DashHandler.eventList.ENAME_REPRESENTATION_UPDATED, {
representation: representation
});
}, onSegmentsLoaded = function(e) {
if (e.error || type !== e.data.mediaType) return;
var self = this, fragments = e.data.segments, representation = e.data.representation, i, len, s, segments = [], count = 0, seg;
for (i = 0, len = fragments.length; i < len; i += 1) {
s = fragments[i];
seg = getTimeBasedSegment.call(self, representation, s.startTime, s.duration, s.timescale, s.media, s.mediaRange, count);
segments.push(seg);
seg = null;
count += 1;
}
representation.segmentAvailabilityRange = {
start: segments[0].presentationStartTime,
end: segments[len - 1].presentationStartTime
};
representation.availableSegmentsNumber = len;
onSegmentListUpdated.call(self, representation, segments);
if (!representation.initialization) return;
this.notify(Dash.dependencies.DashHandler.eventList.ENAME_REPRESENTATION_UPDATED, {
representation: representation
});
};
return {
log: undefined,
baseURLExt: undefined,
timelineConverter: undefined,
metricsModel: undefined,
metricsExt: undefined,
notify: undefined,
subscribe: undefined,
unsubscribe: undefined,
setup: function() {
this[Dash.dependencies.BaseURLExtensions.eventList.ENAME_INITIALIZATION_LOADED] = onInitializationLoaded;
this[Dash.dependencies.BaseURLExtensions.eventList.ENAME_SEGMENTS_LOADED] = onSegmentsLoaded;
},
initialize: function(streamProcessor) {
this.subscribe(Dash.dependencies.DashHandler.eventList.ENAME_REPRESENTATION_UPDATED, streamProcessor.trackController);
type = streamProcessor.getType();
this.setMediaType(type);
isDynamic = streamProcessor.isDynamic();
this.streamProcessor = streamProcessor;
},
getType: function() {
return type;
},
setType: function(value) {
type = value;
},
getIsDynamic: function() {
return isDynamic;
},
setIsDynamic: function(value) {
isDynamic = value;
},
setCurrentTime: function(value) {
currentTime = value;
},
getCurrentTime: function() {
return currentTime;
},
reset: function() {
currentTime = 0;
requestedTime = undefined;
index = -1;
isDynamic = undefined;
this.unsubscribe(Dash.dependencies.DashHandler.eventList.ENAME_REPRESENTATION_UPDATED, this.streamProcessor.trackController);
},
getInitRequest: getInit,
getSegmentRequestForTime: getForTime,
getNextSegmentRequest: getNext,
generateSegmentRequestForTime: generateForTime,
updateRepresentation: updateRepresentation
};
};
Dash.dependencies.DashHandler.prototype = {
constructor: Dash.dependencies.DashHandler
};
Dash.dependencies.DashHandler.SEGMENTS_UNAVAILABLE_ERROR_CODE = 1;
Dash.dependencies.DashHandler.eventList = {
ENAME_REPRESENTATION_UPDATED: "representationUpdated"
};
Dash.dependencies.DashParser = function() {
"use strict";
var SECONDS_IN_YEAR = 365 * 24 * 60 * 60, SECONDS_IN_MONTH = 30 * 24 * 60 * 60, SECONDS_IN_DAY = 24 * 60 * 60, SECONDS_IN_HOUR = 60 * 60, SECONDS_IN_MIN = 60, MINUTES_IN_HOUR = 60, MILLISECONDS_IN_SECONDS = 1e3, durationRegex = /^([-])?P(([\d.]*)Y)?(([\d.]*)M)?(([\d.]*)D)?T?(([\d.]*)H)?(([\d.]*)M)?(([\d.]*)S)?/, datetimeRegex = /^([0-9]{4})-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2})(?::([0-9]*)(\.[0-9]*)?)?(?:([+-])([0-9]{2})([0-9]{2}))?/, numericRegex = /^[-+]?[0-9]+[.]?[0-9]*([eE][-+]?[0-9]+)?$/, matchers = [ {
type: "duration",
test: function(attr) {
var attributeList = [ "minBufferTime", "mediaPresentationDuration", "minimumUpdatePeriod", "timeShiftBufferDepth", "maxSegmentDuration", "maxSubsegmentDuration", "suggestedPresentationDelay", "start", "starttime", "duration" ], len = attributeList.length;
for (var i = 0; i < len; i++) {
if (attr.nodeName === attributeList[i]) {
return durationRegex.test(attr.value);
}
}
return false;
},
converter: function(str) {
var match = durationRegex.exec(str);
var result = parseFloat(match[2] || 0) * SECONDS_IN_YEAR + parseFloat(match[4] || 0) * SECONDS_IN_MONTH + parseFloat(match[6] || 0) * SECONDS_IN_DAY + parseFloat(match[8] || 0) * SECONDS_IN_HOUR + parseFloat(match[10] || 0) * SECONDS_IN_MIN + parseFloat(match[12] || 0);
if (match[1] !== undefined) {
result = -result;
}
return result;
}
}, {
type: "datetime",
test: function(attr) {
return datetimeRegex.test(attr.value);
},
converter: function(str) {
var match = datetimeRegex.exec(str), utcDate;
utcDate = Date.UTC(parseInt(match[1], 10), parseInt(match[2], 10) - 1, parseInt(match[3], 10), parseInt(match[4], 10), parseInt(match[5], 10), match[6] && parseInt(match[6], 10) || 0, match[7] && parseFloat(match[7]) * MILLISECONDS_IN_SECONDS || 0);
if (match[9] && match[10]) {
var timezoneOffset = parseInt(match[9], 10) * MINUTES_IN_HOUR + parseInt(match[10], 10);
utcDate += (match[8] === "+" ? -1 : +1) * timezoneOffset * SECONDS_IN_MIN * MILLISECONDS_IN_SECONDS;
}
return new Date(utcDate);
}
}, {
type: "numeric",
test: function(attr) {
return numericRegex.test(attr.value);
},
converter: function(str) {
return parseFloat(str);
}
} ], getCommonValuesMap = function() {
var adaptationSet, representation, subRepresentation, common;
common = [ {
name: "profiles",
merge: false
}, {
name: "width",
merge: false
}, {
name: "height",
merge: false
}, {
name: "sar",
merge: false
}, {
name: "frameRate",
merge: false
}, {
name: "audioSamplingRate",
merge: false
}, {
name: "mimeType",
merge: false
}, {
name: "segmentProfiles",
merge: false
}, {
name: "codecs",
merge: false
}, {
name: "maximumSAPPeriod",
merge: false
}, {
name: "startsWithSap",
merge: false
}, {
name: "maxPlayoutRate",
merge: false
}, {
name: "codingDependency",
merge: false
}, {
name: "scanType",
merge: false
}, {
name: "FramePacking",
merge: true
}, {
name: "AudioChannelConfiguration",
merge: true
}, {
name: "ContentProtection",
merge: true
} ];
adaptationSet = {};
adaptationSet.name = "AdaptationSet";
adaptationSet.isRoot = false;
adaptationSet.isArray = true;
adaptationSet.parent = null;
adaptationSet.children = [];
adaptationSet.properties = common;
representation = {};
representation.name = "Representation";
representation.isRoot = false;
representation.isArray = true;
representation.parent = adaptationSet;
representation.children = [];
representation.properties = common;
adaptationSet.children.push(representation);
subRepresentation = {};
subRepresentation.name = "SubRepresentation";
subRepresentation.isRoot = false;
subRepresentation.isArray = true;
subRepresentation.parent = representation;
subRepresentation.children = [];
subRepresentation.properties = common;
representation.children.push(subRepresentation);
return adaptationSet;
}, getSegmentValuesMap = function() {
var period, adaptationSet, representation, common;
common = [ {
name: "SegmentBase",
merge: true
}, {
name: "SegmentTemplate",
merge: true
}, {
name: "SegmentList",
merge: true
} ];
period = {};
period.name = "Period";
period.isRoot = false;
period.isArray = true;
period.parent = null;
period.children = [];
period.properties = common;
adaptationSet = {};
adaptationSet.name = "AdaptationSet";
adaptationSet.isRoot = false;
adaptationSet.isArray = true;
adaptationSet.parent = period;
adaptationSet.children = [];
adaptationSet.properties = common;
period.children.push(adaptationSet);
representation = {};
representation.name = "Representation";
representation.isRoot = false;
representation.isArray = true;
representation.parent = adaptationSet;
representation.children = [];
representation.properties = common;
adaptationSet.children.push(representation);
return period;
}, getBaseUrlValuesMap = function() {
var mpd, period, adaptationSet, representation, common;
common = [ {
name: "BaseURL",
merge: true,
mergeFunction: function(parentValue, childValue) {
var mergedValue;
if (childValue.indexOf("http://") === 0) {
mergedValue = childValue;
} else {
mergedValue = parentValue + childValue;
}
return mergedValue;
}
} ];
mpd = {};
mpd.name = "mpd";
mpd.isRoot = true;
mpd.isArray = true;
mpd.parent = null;
mpd.children = [];
mpd.properties = common;
period = {};
period.name = "Period";
period.isRoot = false;
period.isArray = true;
period.parent = null;
period.children = [];
period.properties = common;
mpd.children.push(period);
adaptationSet = {};
adaptationSet.name = "AdaptationSet";
adaptationSet.isRoot = false;
adaptationSet.isArray = true;
adaptationSet.parent = period;
adaptationSet.children = [];
adaptationSet.properties = common;
period.children.push(adaptationSet);
representation = {};
representation.name = "Representation";
representation.isRoot = false;
representation.isArray = true;
representation.parent = adaptationSet;
representation.children = [];
representation.properties = common;
adaptationSet.children.push(representation);
return mpd;
}, getDashMap = function() {
var result = [];
result.push(getCommonValuesMap());
result.push(getSegmentValuesMap());
result.push(getBaseUrlValuesMap());
return result;
}, internalParse = function(data, baseUrl) {
var manifest, converter = new X2JS(matchers, "", true), iron = new ObjectIron(getDashMap()), start = new Date(), json = null, ironed = null;
try {
manifest = converter.xml_str2json(data);
json = new Date();
if (!manifest.hasOwnProperty("BaseURL")) {
manifest.BaseURL = baseUrl;
} else {
manifest.BaseURL = manifest.BaseURL_asArray[0];
if (manifest.BaseURL.toString().indexOf("http") !== 0) {
manifest.BaseURL = baseUrl + manifest.BaseURL;
}
}
if (manifest.hasOwnProperty("Location")) {
manifest.Location = manifest.Location_asArray[0];
}
iron.run(manifest);
ironed = new Date();
this.xlinkController.setMatchers(matchers);
this.xlinkController.setIron(iron);
this.log("Parsing complete: ( xml2json: " + (json.getTime() - start.getTime()) + "ms, objectiron: " + (ironed.getTime() - json.getTime()) + "ms, total: " + (ironed.getTime() - start.getTime()) / 1e3 + "s)");
} catch (err) {
this.errHandler.manifestError("parsing the manifest failed", "parse", data);
return null;
}
return manifest;
};
return {
log: undefined,
errHandler: undefined,
xlinkController: undefined,
parse: internalParse
};
};
Dash.dependencies.DashParser.prototype = {
constructor: Dash.dependencies.DashParser
};
Dash.dependencies.TimelineConverter = function() {
"use strict";
var clientServerTimeShift = 0, isClientServerTimeSyncCompleted = false, expectedLiveEdge = NaN, calcAvailabilityTimeFromPresentationTime = function(presentationTime, mpd, isDynamic, calculateEnd) {
var availabilityTime = NaN;
if (calculateEnd) {
if (isDynamic && mpd.timeShiftBufferDepth != Number.POSITIVE_INFINITY) {
availabilityTime = new Date(mpd.availabilityStartTime.getTime() + (presentationTime + mpd.timeShiftBufferDepth) * 1e3);
} else {
availabilityTime = mpd.availabilityEndTime;
}
} else {
if (isDynamic) {
availabilityTime = new Date(mpd.availabilityStartTime.getTime() + (presentationTime - clientServerTimeShift) * 1e3);
} else {
availabilityTime = mpd.availabilityStartTime;
}
}
return availabilityTime;
}, calcAvailabilityStartTimeFromPresentationTime = function(presentationTime, mpd, isDynamic) {
return calcAvailabilityTimeFromPresentationTime.call(this, presentationTime, mpd, isDynamic);
}, calcAvailabilityEndTimeFromPresentationTime = function(presentationTime, mpd, isDynamic) {
return calcAvailabilityTimeFromPresentationTime.call(this, presentationTime, mpd, isDynamic, true);
}, calcPresentationTimeFromWallTime = function(wallTime, period) {
return (wallTime.getTime() - period.mpd.availabilityStartTime.getTime() + clientServerTimeShift * 1e3) / 1e3;
}, calcPresentationTimeFromMediaTime = function(mediaTime, representation) {
var periodStart = representation.adaptation.period.start, presentationOffset = representation.presentationTimeOffset;
return mediaTime + (periodStart - presentationOffset);
}, calcMediaTimeFromPresentationTime = function(presentationTime, representation) {
var periodStart = representation.adaptation.period.start, presentationOffset = representation.presentationTimeOffset;
return presentationTime - periodStart + presentationOffset;
}, calcWallTimeForSegment = function(segment, isDynamic) {
var suggestedPresentationDelay, displayStartTime, wallTime;
if (isDynamic) {
suggestedPresentationDelay = segment.representation.adaptation.period.mpd.suggestedPresentationDelay;
displayStartTime = segment.presentationStartTime + suggestedPresentationDelay;
wallTime = new Date(segment.availabilityStartTime.getTime() + displayStartTime * 1e3);
}
return wallTime;
}, calcSegmentAvailabilityRange = function(representation, isDynamic) {
var start = representation.adaptation.period.start, end = start + representation.adaptation.period.duration, range = {
start: start,
end: end
}, d = representation.segmentDuration || (representation.segments && representation.segments.length ? representation.segments[representation.segments.length - 1].duration : 0), checkTime, now;
if (!isDynamic) return range;
if (!isClientServerTimeSyncCompleted && representation.segmentAvailabilityRange) {
return representation.segmentAvailabilityRange;
}
checkTime = representation.adaptation.period.mpd.checkTime;
now = calcPresentationTimeFromWallTime(new Date(), representation.adaptation.period);
start = Math.max(now - representation.adaptation.period.mpd.timeShiftBufferDepth, 0);
end = (isNaN(checkTime) ? now : Math.min(checkTime, now)) - d;
range = {
start: start,
end: end
};
return range;
}, calcPeriodRelativeTimeFromMpdRelativeTime = function(representation, mpdRelativeTime) {
var periodStartTime = representation.adaptation.period.start;
return mpdRelativeTime - periodStartTime;
}, calcMpdRelativeTimeFromPeriodRelativeTime = function(representation, periodRelativeTime) {
var periodStartTime = representation.adaptation.period.start;
return periodRelativeTime + periodStartTime;
}, onLiveEdgeSearchCompleted = function(e) {
if (isClientServerTimeSyncCompleted || e.error) return;
clientServerTimeShift += e.data.liveEdge - (expectedLiveEdge + e.data.searchTime);
isClientServerTimeSyncCompleted = true;
}, onTimeSyncComplete = function(e) {
if (isClientServerTimeSyncCompleted || e.error) {
return;
}
clientServerTimeShift = e.data.offset / 1e3;
isClientServerTimeSyncCompleted = true;
}, calcMSETimeOffset = function(representation) {
var presentationOffset = representation.presentationTimeOffset;
var periodStart = representation.adaptation.period.start;
return periodStart - presentationOffset;
}, reset = function() {
clientServerTimeShift = 0;
isClientServerTimeSyncCompleted = false;
expectedLiveEdge = NaN;
};
return {
setup: function() {
this[MediaPlayer.dependencies.LiveEdgeFinder.eventList.ENAME_LIVE_EDGE_SEARCH_COMPLETED] = onLiveEdgeSearchCompleted;
this[MediaPlayer.dependencies.TimeSyncController.eventList.ENAME_TIME_SYNCHRONIZATION_COMPLETED] = onTimeSyncComplete;
},
calcAvailabilityStartTimeFromPresentationTime: calcAvailabilityStartTimeFromPresentationTime,
calcAvailabilityEndTimeFromPresentationTime: calcAvailabilityEndTimeFromPresentationTime,
calcPresentationTimeFromWallTime: calcPresentationTimeFromWallTime,
calcPresentationTimeFromMediaTime: calcPresentationTimeFromMediaTime,
calcPeriodRelativeTimeFromMpdRelativeTime: calcPeriodRelativeTimeFromMpdRelativeTime,
calcMpdRelativeTimeFromPeriodRelativeTime: calcMpdRelativeTimeFromPeriodRelativeTime,
calcMediaTimeFromPresentationTime: calcMediaTimeFromPresentationTime,
calcSegmentAvailabilityRange: calcSegmentAvailabilityRange,
calcWallTimeForSegment: calcWallTimeForSegment,
calcMSETimeOffset: calcMSETimeOffset,
reset: reset,
isTimeSyncCompleted: function() {
return isClientServerTimeSyncCompleted;
},
setTimeSyncCompleted: function(value) {
isClientServerTimeSyncCompleted = value;
},
getClientTimeOffset: function() {
return clientServerTimeShift;
},
getExpectedLiveEdge: function() {
return expectedLiveEdge;
},
setExpectedLiveEdge: function(value) {
expectedLiveEdge = value;
}
};
};
Dash.dependencies.TimelineConverter.prototype = {
constructor: Dash.dependencies.TimelineConverter
};
Dash.dependencies.RepresentationController = function() {
"use strict";
var data = null, dataIndex = -1, updating = true, availableRepresentations = [], currentRepresentation, updateData = function(dataValue, adaptation, type) {
var self = this, bitrate = null, streamInfo = self.streamProcessor.getStreamInfo(), quality, maxQuality = self.abrController.getTopQualityIndexFor(type, streamInfo.id);
updating = true;
self.notify(Dash.dependencies.RepresentationController.eventList.ENAME_DATA_UPDATE_STARTED);
availableRepresentations = updateRepresentations.call(self, adaptation);
if (data === null) {
bitrate = self.abrController.getInitialBitrateFor(type, streamInfo);
quality = self.abrController.getQualityForBitrate(self.streamProcessor.getMediaInfo(), bitrate);
} else {
quality = self.abrController.getQualityFor(type, streamInfo);
}
if (quality > maxQuality) {
quality = maxQuality;
}
currentRepresentation = getRepresentationForQuality.call(self, quality);
data = dataValue;
if (type !== "video" && type !== "audio" && type !== "fragmentedText") {
updating = false;
self.notify(Dash.dependencies.RepresentationController.eventList.ENAME_DATA_UPDATE_COMPLETED, {
data: data,
currentRepresentation: currentRepresentation
});
return;
}
for (var i = 0; i < availableRepresentations.length; i += 1) {
self.indexHandler.updateRepresentation(availableRepresentations[i], true);
}
}, addRepresentationSwitch = function() {
var now = new Date(), currentRepresentation = this.getCurrentRepresentation(), currentVideoTime = this.streamProcessor.playbackController.getTime();
this.metricsModel.addTrackSwitch(currentRepresentation.adaptation.type, now, currentVideoTime, currentRepresentation.id);
}, addDVRMetric = function() {
var streamProcessor = this.streamProcessor, range = this.timelineConverter.calcSegmentAvailabilityRange(currentRepresentation, streamProcessor.isDynamic());
this.metricsModel.addDVRInfo(streamProcessor.getType(), streamProcessor.playbackController.getTime(), streamProcessor.getStreamInfo().manifestInfo, range);
}, getRepresentationForQuality = function(quality) {
return availableRepresentations[quality];
}, getQualityForRepresentation = function(representation) {
return availableRepresentations.indexOf(representation);
}, isAllRepresentationsUpdated = function() {
for (var i = 0, ln = availableRepresentations.length; i < ln; i += 1) {
var segmentInfoType = availableRepresentations[i].segmentInfoType;
if (availableRepresentations[i].segmentAvailabilityRange === null || availableRepresentations[i].initialization === null || (segmentInfoType === "SegmentBase" || segmentInfoType === "BaseURL") && !availableRepresentations[i].segments) {
return false;
}
}
return true;
}, updateRepresentations = function(adaptation) {
var self = this, reps, manifest = self.manifestModel.getValue();
dataIndex = self.manifestExt.getIndexForAdaptation(data, manifest, adaptation.period.index);
reps = self.manifestExt.getRepresentationsForAdaptation(manifest, adaptation);
return reps;
}, updateAvailabilityWindow = function(isDynamic) {
var self = this, rep;
for (var i = 0, ln = availableRepresentations.length; i < ln; i += 1) {
rep = availableRepresentations[i];
rep.segmentAvailabilityRange = self.timelineConverter.calcSegmentAvailabilityRange(rep, isDynamic);
}
}, postponeUpdate = function(availabilityDelay) {
var self = this, delay = (availabilityDelay + currentRepresentation.segmentDuration * 3) * 1e3, update = function() {
if (this.isUpdating()) return;
updating = true;
self.notify(Dash.dependencies.RepresentationController.eventList.ENAME_DATA_UPDATE_STARTED);
for (var i = 0; i < availableRepresentations.length; i += 1) {
self.indexHandler.updateRepresentation(availableRepresentations[i], true);
}
};
updating = false;
setTimeout(update.bind(this), delay);
}, onRepresentationUpdated = function(e) {
if (!this.isUpdating()) return;
var self = this, r = e.data.representation, streamMetrics = self.metricsModel.getMetricsFor("stream"), metrics = self.metricsModel.getMetricsFor(this.getCurrentRepresentation().adaptation.type), manifestUpdateInfo = self.metricsExt.getCurrentManifestUpdate(streamMetrics), repInfo, err, alreadyAdded = false, repSwitch;
if (e.error && e.error.code === Dash.dependencies.DashHandler.SEGMENTS_UNAVAILABLE_ERROR_CODE) {
addDVRMetric.call(this);
postponeUpdate.call(this, e.error.data.availabilityDelay);
err = new MediaPlayer.vo.Error(Dash.dependencies.RepresentationController.SEGMENTS_UPDATE_FAILED_ERROR_CODE, "Segments update failed", null);
this.notify(Dash.dependencies.RepresentationController.eventList.ENAME_DATA_UPDATE_COMPLETED, {
data: data,
currentRepresentation: currentRepresentation
}, err);
return;
}
if (manifestUpdateInfo) {
for (var i = 0; i < manifestUpdateInfo.trackInfo.length; i += 1) {
repInfo = manifestUpdateInfo.trackInfo[i];
if (repInfo.index === r.index && repInfo.mediaType === self.streamProcessor.getType()) {
alreadyAdded = true;
break;
}
}
if (!alreadyAdded) {
self.metricsModel.addManifestUpdateTrackInfo(manifestUpdateInfo, r.id, r.index, r.adaptation.period.index, self.streamProcessor.getType(), r.presentationTimeOffset, r.startNumber, r.segmentInfoType);
}
}
if (isAllRepresentationsUpdated()) {
updating = false;
self.abrController.setPlaybackQuality(self.streamProcessor.getType(), self.streamProcessor.getStreamInfo(), getQualityForRepresentation.call(this, currentRepresentation));
self.metricsModel.updateManifestUpdateInfo(manifestUpdateInfo, {
latency: currentRepresentation.segmentAvailabilityRange.end - self.streamProcessor.playbackController.getTime()
});
repSwitch = self.metricsExt.getCurrentRepresentationSwitch(metrics);
if (!repSwitch) {
addRepresentationSwitch.call(self);
}
this.notify(Dash.dependencies.RepresentationController.eventList.ENAME_DATA_UPDATE_COMPLETED, {
data: data,
currentRepresentation: currentRepresentation
});
}
}, onWallclockTimeUpdated = function(e) {
updateAvailabilityWindow.call(this, e.data.isDynamic);
}, onLiveEdgeSearchCompleted = function(e) {
if (e.error) return;
updateAvailabilityWindow.call(this, true);
this.indexHandler.updateRepresentation(currentRepresentation, false);
var manifest = this.manifestModel.getValue(), period = currentRepresentation.adaptation.period, streamInfo = this.streamController.getActiveStreamInfo();
if (streamInfo.isLast) {
period.mpd.checkTime = this.manifestExt.getCheckTime(manifest, period);
period.duration = this.manifestExt.getEndTimeForLastPeriod(this.manifestModel.getValue(), period) - period.start;
streamInfo.duration = period.duration;
}
}, onBufferLevelUpdated = function() {
addDVRMetric.call(this);
}, onQualityChanged = function(e) {
var self = this;
if (e.data.mediaType !== self.streamProcessor.getType() || self.streamProcessor.getStreamInfo().id !== e.data.streamInfo.id) return;
currentRepresentation = self.getRepresentationForQuality(e.data.newQuality);
setLocalStorage.call(self, e.data.mediaType, currentRepresentation.bandwidth);
addRepresentationSwitch.call(self);
}, setLocalStorage = function(type, bitrate) {
if (this.DOMStorage.isSupported(MediaPlayer.utils.DOMStorage.STORAGE_TYPE_LOCAL) && (type === "video" || type === "audio")) {
localStorage.setItem(MediaPlayer.utils.DOMStorage["LOCAL_STORAGE_" + type.toUpperCase() + "_BITRATE_KEY"], JSON.stringify({
bitrate: bitrate / 1e3,
timestamp: new Date().getTime()
}));
}
};
return {
system: undefined,
log: undefined,
manifestExt: undefined,
manifestModel: undefined,
metricsModel: undefined,
metricsExt: undefined,
abrController: undefined,
streamController: undefined,
timelineConverter: undefined,
notify: undefined,
subscribe: undefined,
unsubscribe: undefined,
DOMStorage: undefined,
setup: function() {
this[MediaPlayer.dependencies.AbrController.eventList.ENAME_QUALITY_CHANGED] = onQualityChanged;
this[Dash.dependencies.DashHandler.eventList.ENAME_REPRESENTATION_UPDATED] = onRepresentationUpdated;
this[MediaPlayer.dependencies.PlaybackController.eventList.ENAME_WALLCLOCK_TIME_UPDATED] = onWallclockTimeUpdated;
this[MediaPlayer.dependencies.LiveEdgeFinder.eventList.ENAME_LIVE_EDGE_SEARCH_COMPLETED] = onLiveEdgeSearchCompleted;
this[MediaPlayer.dependencies.BufferController.eventList.ENAME_BUFFER_LEVEL_UPDATED] = onBufferLevelUpdated;
},
initialize: function(streamProcessor) {
this.streamProcessor = streamProcessor;
this.indexHandler = streamProcessor.indexHandler;
},
getData: function() {
return data;
},
getDataIndex: function() {
return dataIndex;
},
isUpdating: function() {
return updating;
},
updateData: updateData,
getRepresentationForQuality: getRepresentationForQuality,
getCurrentRepresentation: function() {
return currentRepresentation;
}
};
};
Dash.dependencies.RepresentationController.prototype = {
constructor: Dash.dependencies.RepresentationController
};
Dash.dependencies.RepresentationController.SEGMENTS_UPDATE_FAILED_ERROR_CODE = 1;
Dash.dependencies.RepresentationController.eventList = {
ENAME_DATA_UPDATE_COMPLETED: "dataUpdateCompleted",
ENAME_DATA_UPDATE_STARTED: "dataUpdateStarted"
};
Dash.dependencies.BaseURLExtensions = function() {
"use strict";
var parseSIDX = function(ab, ab_first_byte_offset) {
var d = new DataView(ab), sidx = {}, pos = 0, offset, time, sidxEnd, i, ref_type, ref_size, ref_dur, type, size, charCode;
while (type !== "sidx" && pos < d.byteLength) {
size = d.getUint32(pos);
pos += 4;
type = "";
for (i = 0; i < 4; i += 1) {
charCode = d.getInt8(pos);
type += String.fromCharCode(charCode);
pos += 1;
}
if (type !== "moof" && type !== "traf" && type !== "sidx") {
pos += size - 8;
} else if (type === "sidx") {
pos -= 8;
}
}
sidxEnd = d.getUint32(pos, false) + pos;
if (sidxEnd > ab.byteLength) {
throw "sidx terminates after array buffer";
}
sidx.version = d.getUint8(pos + 8);
pos += 12;
sidx.timescale = d.getUint32(pos + 4, false);
pos += 8;
if (sidx.version === 0) {
sidx.earliest_presentation_time = d.getUint32(pos, false);
sidx.first_offset = d.getUint32(pos + 4, false);
pos += 8;
} else {
sidx.earliest_presentation_time = utils.Math.to64BitNumber(d.getUint32(pos + 4, false), d.getUint32(pos, false));
sidx.first_offset = (d.getUint32(pos + 8, false) << 32) + d.getUint32(pos + 12, false);
pos += 16;
}
sidx.first_offset += sidxEnd + (ab_first_byte_offset || 0);
sidx.reference_count = d.getUint16(pos + 2, false);
pos += 4;
sidx.references = [];
offset = sidx.first_offset;
time = sidx.earliest_presentation_time;
for (i = 0; i < sidx.reference_count; i += 1) {
ref_size = d.getUint32(pos, false);
ref_type = ref_size >>> 31;
ref_size = ref_size & 2147483647;
ref_dur = d.getUint32(pos + 4, false);
pos += 12;
sidx.references.push({
size: ref_size,
type: ref_type,
offset: offset,
duration: ref_dur,
time: time,
timescale: sidx.timescale
});
offset += ref_size;
time += ref_dur;
}
if (pos !== sidxEnd) {
throw "Error: final pos " + pos + " differs from SIDX end " + sidxEnd;
}
return sidx;
}, parseSegments = function(data, media, offset) {
var parsed, ref, segments, segment, i, len, start, end;
parsed = parseSIDX.call(this, data, offset);
ref = parsed.references;
segments = [];
for (i = 0, len = ref.length; i < len; i += 1) {
segment = new Dash.vo.Segment();
segment.duration = ref[i].duration;
segment.media = media;
segment.startTime = ref[i].time;
segment.timescale = ref[i].timescale;
start = ref[i].offset;
end = ref[i].offset + ref[i].size - 1;
segment.mediaRange = start + "-" + end;
segments.push(segment);
}
this.log("Parsed SIDX box: " + segments.length + " segments.");
return segments;
}, findInit = function(data, info, callback) {
var ftyp, moov, start, end, d = new DataView(data), pos = 0, type = "", size = 0, i, c, request, loaded = false, irange, self = this;
self.log("Searching for initialization.");
while (type !== "moov" && pos < d.byteLength) {
size = d.getUint32(pos);
pos += 4;
type = "";
for (i = 0; i < 4; i += 1) {
c = d.getInt8(pos);
type += String.fromCharCode(c);
pos += 1;
}
if (type === "ftyp") {
ftyp = pos - 8;
}
if (type === "moov") {
moov = pos - 8;
}
if (type !== "moov") {
pos += size - 8;
}
}
if (type !== "moov") {
self.log("Loading more bytes to find initialization.");
info.range.start = 0;
info.range.end = info.bytesLoaded + info.bytesToLoad;
request = new XMLHttpRequest();
request.onloadend = function() {
if (!loaded) {
callback.call(self, null, new Error("Error loading initialization."));
}
};
request.onload = function() {
loaded = true;
info.bytesLoaded = info.range.end;
findInit.call(self, request.response, function(segments) {
callback.call(self, segments);
});
};
request.onerror = function() {
callback.call(self, null, new Error("Error loading initialization."));
};
sendRequest.call(self, request, info);
} else {
start = ftyp === undefined ? moov : ftyp;
end = moov + size - 1;
irange = start + "-" + end;
self.log("Found the initialization. Range: " + irange);
callback.call(self, irange);
}
}, loadInit = function(representation) {
var request = new XMLHttpRequest(), needFailureReport = true, self = this, media = representation.adaptation.period.mpd.manifest.Period_asArray[representation.adaptation.period.index].AdaptationSet_asArray[representation.adaptation.index].Representation_asArray[representation.index].BaseURL, info = {
url: media,
range: {},
searching: false,
bytesLoaded: 0,
bytesToLoad: 1500,
request: request
};
self.log("Start searching for initialization.");
info.range.start = 0;
info.range.end = info.bytesToLoad;
request.onload = function() {
if (request.status < 200 || request.status > 299) {
return;
}
needFailureReport = false;
info.bytesLoaded = info.range.end;
findInit.call(self, request.response, info, function(range) {
representation.range = range;
representation.initialization = media;
self.notify(Dash.dependencies.BaseURLExtensions.eventList.ENAME_INITIALIZATION_LOADED, {
representation: representation
});
});
};
request.onloadend = request.onerror = function() {
if (!needFailureReport) {
return;
}
needFailureReport = false;
self.errHandler.downloadError("initialization", info.url, request);
self.notify(Dash.dependencies.BaseURLExtensions.eventList.ENAME_INITIALIZATION_LOADED, {
representation: representation
});
};
sendRequest.call(self, request, info);
self.log("Perform init search: " + info.url);
}, findSIDX = function(data, info, representation, callback) {
var segments, d = new DataView(data), request = new XMLHttpRequest(), pos = 0, type = "", size = 0, bytesAvailable, sidxBytes, sidxSlice, sidxOut, i, c, needFailureReport = true, parsed, ref, loadMultiSidx = false, self = this;
self.log("Searching for SIDX box.");
self.log(info.bytesLoaded + " bytes loaded.");
while (type !== "sidx" && pos < d.byteLength) {
size = d.getUint32(pos);
pos += 4;
type = "";
for (i = 0; i < 4; i += 1) {
c = d.getInt8(pos);
type += String.fromCharCode(c);
pos += 1;
}
if (type !== "sidx") {
pos += size - 8;
}
}
bytesAvailable = d.byteLength - pos;
if (type !== "sidx") {
callback.call(self);
} else if (bytesAvailable < size - 8) {
self.log("Found SIDX but we don't have all of it.");
info.range.start = 0;
info.range.end = info.bytesLoaded + (size - bytesAvailable);
request.onload = function() {
if (request.status < 200 || request.status > 299) {
return;
}
needFailureReport = false;
info.bytesLoaded = info.range.end;
findSIDX.call(self, request.response, info, representation, callback);
};
request.onloadend = request.onerror = function() {
if (!needFailureReport) {
return;
}
needFailureReport = false;
self.errHandler.downloadError("SIDX", info.url, request);
callback.call(self);
};
sendRequest.call(self, request, info);
} else {
info.range.start = pos - 8;
info.range.end = info.range.start + size;
self.log("Found the SIDX box. Start: " + info.range.start + " | End: " + info.range.end);
sidxBytes = new ArrayBuffer(info.range.end - info.range.start);
sidxOut = new Uint8Array(sidxBytes);
sidxSlice = new Uint8Array(data, info.range.start, info.range.end - info.range.start);
sidxOut.set(sidxSlice);
parsed = this.parseSIDX.call(this, sidxBytes, info.range.start);
ref = parsed.references;
if (ref !== null && ref !== undefined && ref.length > 0) {
loadMultiSidx = ref[0].type === 1;
}
if (loadMultiSidx) {
self.log("Initiate multiple SIDX load.");
var j, len, ss, se, r, segs = [], count = 0, tmpCallback = function(segments) {
if (segments) {
segs = segs.concat(segments);
count += 1;
if (count >= len) {
callback.call(self, segs);
}
} else {
callback.call(self);
}
};
for (j = 0, len = ref.length; j < len; j += 1) {
ss = ref[j].offset;
se = ref[j].offset + ref[j].size - 1;
r = ss + "-" + se;
loadSegments.call(self, representation, null, r, tmpCallback);
}
} else {
self.log("Parsing segments from SIDX.");
segments = parseSegments.call(self, sidxBytes, info.url, info.range.start);
callback.call(self, segments);
}
}
}, loadSegments = function(representation, type, theRange, callback) {
var request = new XMLHttpRequest(), segments, parts, media = representation.adaptation.period.mpd.manifest.Period_asArray[representation.adaptation.period.index].AdaptationSet_asArray[representation.adaptation.index].Representation_asArray[representation.index].BaseURL, needFailureReport = true, self = this, info = {
url: media,
range: {},
searching: false,
bytesLoaded: 0,
bytesToLoad: 1500,
request: request
};
if (theRange === null) {
self.log("No known range for SIDX request.");
info.searching = true;
info.range.start = 0;
info.range.end = info.bytesToLoad;
} else {
parts = theRange.split("-");
info.range.start = parseFloat(parts[0]);
info.range.end = parseFloat(parts[1]);
}
request.onload = function() {
if (request.status < 200 || request.status > 299) {
return;
}
needFailureReport = false;
if (info.searching) {
info.bytesLoaded = info.range.end;
findSIDX.call(self, request.response, info, representation, function(segments) {
if (segments) {
callback.call(self, segments, representation, type);
}
});
} else {
segments = parseSegments.call(self, request.response, info.url, info.range.start);
callback.call(self, segments, representation, type);
}
};
request.onloadend = request.onerror = function() {
if (!needFailureReport) {
return;
}
needFailureReport = false;
self.errHandler.downloadError("SIDX", info.url, request);
callback.call(self, null, representation, type);
};
sendRequest.call(self, request, info);
self.log("Perform SIDX load: " + info.url);
}, sendRequest = function(request, info) {
request.open("GET", this.requestModifierExt.modifyRequestURL(info.url));
request.responseType = "arraybuffer";
request.setRequestHeader("Range", "bytes=" + info.range.start + "-" + info.range.end);
request = this.requestModifierExt.modifyRequestHeader(request);
request.send(null);
}, onLoaded = function(segments, representation, type) {
var self = this;
if (segments) {
self.notify(Dash.dependencies.BaseURLExtensions.eventList.ENAME_SEGMENTS_LOADED, {
segments: segments,
representation: representation,
mediaType: type
});
} else {
self.notify(Dash.dependencies.BaseURLExtensions.eventList.ENAME_SEGMENTS_LOADED, {
segments: null,
representation: representation,
mediaType: type
}, new MediaPlayer.vo.Error(null, "error loading segments", null));
}
};
return {
log: undefined,
errHandler: undefined,
requestModifierExt: undefined,
notify: undefined,
subscribe: undefined,
unsubscribe: undefined,
loadSegments: function(representation, type, range) {
loadSegments.call(this, representation, type, range, onLoaded.bind(this));
},
loadInitialization: loadInit,
parseSegments: parseSegments,
parseSIDX: parseSIDX,
findSIDX: findSIDX
};
};
Dash.dependencies.BaseURLExtensions.prototype = {
constructor: Dash.dependencies.BaseURLExtensions
};
Dash.dependencies.BaseURLExtensions.eventList = {
ENAME_INITIALIZATION_LOADED: "initializationLoaded",
ENAME_SEGMENTS_LOADED: "segmentsLoaded"
};
Dash.dependencies.DashManifestExtensions = function() {
"use strict";
this.timelineConverter = undefined;
};
Dash.dependencies.DashManifestExtensions.prototype = {
constructor: Dash.dependencies.DashManifestExtensions,
getIsTypeOf: function(adaptation, type) {
"use strict";
var i, len, col = adaptation.ContentComponent_asArray, mimeTypeRegEx = type !== "text" ? new RegExp(type) : new RegExp("(vtt|ttml)"), representation, result = false, found = false;
if (adaptation.Representation_asArray.length > 0 && adaptation.Representation_asArray[0].hasOwnProperty("codecs") && adaptation.Representation_asArray[0].codecs == "stpp") {
return type == "fragmentedText";
}
if (col) {
for (i = 0, len = col.length; i < len; i += 1) {
if (col[i].contentType === type) {
result = true;
found = true;
}
}
}
if (adaptation.hasOwnProperty("mimeType")) {
result = mimeTypeRegEx.test(adaptation.mimeType);
found = true;
}
if (!found) {
i = 0;
len = adaptation.Representation_asArray.length;
while (!found && i < len) {
representation = adaptation.Representation_asArray[i];
if (representation.hasOwnProperty("mimeType")) {
result = mimeTypeRegEx.test(representation.mimeType);
found = true;
}
i += 1;
}
}
return result;
},
getIsAudio: function(adaptation) {
"use strict";
return this.getIsTypeOf(adaptation, "audio");
},
getIsVideo: function(adaptation) {
"use strict";
return this.getIsTypeOf(adaptation, "video");
},
getIsFragmentedText: function(adaptation) {
"use strict";
return this.getIsTypeOf(adaptation, "fragmentedText");
},
getIsText: function(adaptation) {
"use strict";
return this.getIsTypeOf(adaptation, "text");
},
getIsTextTrack: function(type) {
return type === "text/vtt" || type === "application/ttml+xml";
},
getLanguageForAdaptation: function(adaptation) {
var lang = "";
if (adaptation.hasOwnProperty("lang")) {
lang = adaptation.lang;
}
return lang;
},
getIsMain: function() {
"use strict";
return false;
},
processAdaptation: function(adaptation) {
"use strict";
if (adaptation.Representation_asArray !== undefined && adaptation.Representation_asArray !== null) {
adaptation.Representation_asArray.sort(function(a, b) {
return a.bandwidth - b.bandwidth;
});
}
return adaptation;
},
getAdaptationForId: function(id, manifest, periodIndex) {
"use strict";
var adaptations = manifest.Period_asArray[periodIndex].AdaptationSet_asArray, i, len;
for (i = 0, len = adaptations.length; i < len; i += 1) {
if (adaptations[i].hasOwnProperty("id") && adaptations[i].id === id) {
return adaptations[i];
}
}
return null;
},
getAdaptationForIndex: function(index, manifest, periodIndex) {
"use strict";
var adaptations = manifest.Period_asArray[periodIndex].AdaptationSet_asArray;
return adaptations[index];
},
getIndexForAdaptation: function(adaptation, manifest, periodIndex) {
"use strict";
var adaptations = manifest.Period_asArray[periodIndex].AdaptationSet_asArray, i, len;
for (i = 0, len = adaptations.length; i < len; i += 1) {
if (adaptations[i] === adaptation) {
return i;
}
}
return -1;
},
getAdaptationsForType: function(manifest, periodIndex, type) {
"use strict";
var self = this, adaptationSet = manifest.Period_asArray[periodIndex].AdaptationSet_asArray, i, len, adaptations = [];
for (i = 0, len = adaptationSet.length; i < len; i += 1) {
if (this.getIsTypeOf(adaptationSet[i], type)) {
adaptations.push(self.processAdaptation(adaptationSet[i]));
}
}
return adaptations;
},
getAdaptationForType: function(manifest, periodIndex, type) {
"use strict";
var i, len, adaptations, self = this;
adaptations = this.getAdaptationsForType(manifest, periodIndex, type);
if (!adaptations || adaptations.length === 0) return null;
for (i = 0, len = adaptations.length; i < len; i += 1) {
if (self.getIsMain(adaptations[i])) return adaptations[i];
}
return adaptations[0];
},
getCodec: function(adaptation) {
"use strict";
var representation = adaptation.Representation_asArray[0];
return representation.mimeType + ';codecs="' + representation.codecs + '"';
},
getMimeType: function(adaptation) {
"use strict";
return adaptation.Representation_asArray[0].mimeType;
},
getKID: function(adaptation) {
"use strict";
if (!adaptation || !adaptation.hasOwnProperty("cenc:default_KID")) {
return null;
}
return adaptation["cenc:default_KID"];
},
getContentProtectionData: function(adaptation) {
"use strict";
if (!adaptation || !adaptation.hasOwnProperty("ContentProtection_asArray") || adaptation.ContentProtection_asArray.length === 0) {
return null;
}
return adaptation.ContentProtection_asArray;
},
getIsDynamic: function(manifest) {
"use strict";
var isDynamic = false, LIVE_TYPE = "dynamic";
if (manifest.hasOwnProperty("type")) {
isDynamic = manifest.type === LIVE_TYPE;
}
return isDynamic;
},
getIsDVR: function(manifest) {
"use strict";
var isDynamic = this.getIsDynamic(manifest), containsDVR, isDVR;
containsDVR = !isNaN(manifest.timeShiftBufferDepth);
isDVR = isDynamic && containsDVR;
return isDVR;
},
getIsOnDemand: function(manifest) {
"use strict";
var isOnDemand = false;
if (manifest.profiles && manifest.profiles.length > 0) {
isOnDemand = manifest.profiles.indexOf("urn:mpeg:dash:profile:isoff-on-demand:2011") !== -1;
}
return isOnDemand;
},
getDuration: function(manifest) {
var mpdDuration;
if (manifest.hasOwnProperty("mediaPresentationDuration")) {
mpdDuration = manifest.mediaPresentationDuration;
} else {
mpdDuration = Number.MAX_VALUE;
}
return mpdDuration;
},
getBandwidth: function(representation) {
"use strict";
return representation.bandwidth;
},
getRefreshDelay: function(manifest) {
"use strict";
var delay = NaN, minDelay = 2;
if (manifest.hasOwnProperty("minimumUpdatePeriod")) {
delay = Math.max(parseFloat(manifest.minimumUpdatePeriod), minDelay);
}
return delay;
},
getRepresentationCount: function(adaptation) {
"use strict";
return adaptation.Representation_asArray.length;
},
getBitrateListForAdaptation: function(adaptation) {
if (!adaptation || !adaptation.Representation_asArray || !adaptation.Representation_asArray.length) return null;
var a = this.processAdaptation(adaptation), reps = a.Representation_asArray, ln = reps.length, bitrateList = [];
for (var i = 0; i < ln; i += 1) {
bitrateList.push(reps[i].bandwidth);
}
return bitrateList;
},
getRepresentationFor: function(index, adaptation) {
"use strict";
return adaptation.Representation_asArray[index];
},
getRepresentationsForAdaptation: function(manifest, adaptation) {
var self = this, a = self.processAdaptation(manifest.Period_asArray[adaptation.period.index].AdaptationSet_asArray[adaptation.index]), representations = [], representation, initialization, segmentInfo, r, s;
for (var i = 0; i < a.Representation_asArray.length; i += 1) {
r = a.Representation_asArray[i];
representation = new Dash.vo.Representation();
representation.index = i;
representation.adaptation = adaptation;
if (r.hasOwnProperty("id")) {
representation.id = r.id;
}
if (r.hasOwnProperty("bandwidth")) {
representation.bandwidth = r.bandwidth;
}
if (r.hasOwnProperty("maxPlayoutRate")) {
representation.maxPlayoutRate = r.maxPlayoutRate;
}
if (r.hasOwnProperty("SegmentBase")) {
segmentInfo = r.SegmentBase;
representation.segmentInfoType = "SegmentBase";
} else if (r.hasOwnProperty("SegmentList")) {
segmentInfo = r.SegmentList;
representation.segmentInfoType = "SegmentList";
representation.useCalculatedLiveEdgeTime = true;
} else if (r.hasOwnProperty("SegmentTemplate")) {
segmentInfo = r.SegmentTemplate;
if (segmentInfo.hasOwnProperty("SegmentTimeline")) {
representation.segmentInfoType = "SegmentTimeline";
s = segmentInfo.SegmentTimeline.S_asArray[segmentInfo.SegmentTimeline.S_asArray.length - 1];
if (!s.hasOwnProperty("r") || s.r >= 0) {
representation.useCalculatedLiveEdgeTime = true;
}
} else {
representation.segmentInfoType = "SegmentTemplate";
}
if (segmentInfo.hasOwnProperty("initialization")) {
representation.initialization = segmentInfo.initialization.split("$Bandwidth$").join(r.bandwidth).split("$RepresentationID$").join(r.id);
}
} else {
segmentInfo = r.BaseURL;
representation.segmentInfoType = "BaseURL";
}
if (segmentInfo.hasOwnProperty("Initialization")) {
initialization = segmentInfo.Initialization;
if (initialization.hasOwnProperty("sourceURL")) {
representation.initialization = initialization.sourceURL;
} else if (initialization.hasOwnProperty("range")) {
representation.initialization = r.BaseURL;
representation.range = initialization.range;
}
} else if (r.hasOwnProperty("mimeType") && self.getIsTextTrack(r.mimeType)) {
representation.initialization = r.BaseURL;
representation.range = 0;
}
if (segmentInfo.hasOwnProperty("timescale")) {
representation.timescale = segmentInfo.timescale;
}
if (segmentInfo.hasOwnProperty("duration")) {
representation.segmentDuration = segmentInfo.duration / representation.timescale;
}
if (segmentInfo.hasOwnProperty("startNumber")) {
representation.startNumber = segmentInfo.startNumber;
}
if (segmentInfo.hasOwnProperty("indexRange")) {
representation.indexRange = segmentInfo.indexRange;
}
if (segmentInfo.hasOwnProperty("presentationTimeOffset")) {
representation.presentationTimeOffset = segmentInfo.presentationTimeOffset / representation.timescale;
}
representation.MSETimeOffset = self.timelineConverter.calcMSETimeOffset(representation);
representations.push(representation);
}
return representations;
},
getAdaptationsForPeriod: function(manifest, period) {
var p = manifest.Period_asArray[period.index], adaptations = [], adaptationSet, a;
for (var i = 0; i < p.AdaptationSet_asArray.length; i += 1) {
a = p.AdaptationSet_asArray[i];
adaptationSet = new Dash.vo.AdaptationSet();
if (a.hasOwnProperty("id")) {
adaptationSet.id = a.id;
}
adaptationSet.index = i;
adaptationSet.period = period;
if (this.getIsAudio(a)) {
adaptationSet.type = "audio";
} else if (this.getIsVideo(a)) {
adaptationSet.type = "video";
} else if (this.getIsFragmentedText(a)) {
adaptationSet.type = "fragmentedText";
} else {
adaptationSet.type = "text";
}
adaptations.push(adaptationSet);
}
return adaptations;
},
getRegularPeriods: function(manifest, mpd) {
var self = this, periods = [], isDynamic = self.getIsDynamic(manifest), i, len, p1 = null, p = null, vo1 = null, vo = null;
for (i = 0, len = manifest.Period_asArray.length; i < len; i += 1) {
p = manifest.Period_asArray[i];
if (p.hasOwnProperty("start")) {
vo = new Dash.vo.Period();
vo.start = p.start;
} else if (p1 !== null && p.hasOwnProperty("duration") && vo1 !== null) {
vo = new Dash.vo.Period();
vo.start = vo1.start + vo1.duration;
vo.duration = p.duration;
} else if (i === 0 && !isDynamic) {
vo = new Dash.vo.Period();
vo.start = 0;
}
if (vo1 !== null && isNaN(vo1.duration)) {
vo1.duration = vo.start - vo1.start;
}
if (vo !== null && p.hasOwnProperty("id")) {
vo.id = p.id;
}
if (vo !== null && p.hasOwnProperty("duration")) {
vo.duration = p.duration;
}
if (vo !== null) {
vo.index = i;
vo.mpd = mpd;
periods.push(vo);
p1 = p;
vo1 = vo;
}
p = null;
vo = null;
}
if (periods.length === 0) {
return periods;
}
if (vo1 !== null && isNaN(vo1.duration)) {
vo1.duration = self.getEndTimeForLastPeriod(manifest, vo1) - vo1.start;
}
return periods;
},
getMpd: function(manifest) {
var mpd = new Dash.vo.Mpd();
mpd.manifest = manifest;
if (manifest.hasOwnProperty("availabilityStartTime")) {
mpd.availabilityStartTime = new Date(manifest.availabilityStartTime.getTime());
} else {
mpd.availabilityStartTime = new Date(manifest.loadedTime.getTime());
}
if (manifest.hasOwnProperty("availabilityEndTime")) {
mpd.availabilityEndTime = new Date(manifest.availabilityEndTime.getTime());
}
if (manifest.hasOwnProperty("suggestedPresentationDelay")) {
mpd.suggestedPresentationDelay = manifest.suggestedPresentationDelay;
}
if (manifest.hasOwnProperty("timeShiftBufferDepth")) {
mpd.timeShiftBufferDepth = manifest.timeShiftBufferDepth;
}
if (manifest.hasOwnProperty("maxSegmentDuration")) {
mpd.maxSegmentDuration = manifest.maxSegmentDuration;
}
return mpd;
},
getFetchTime: function(manifest, period) {
return this.timelineConverter.calcPresentationTimeFromWallTime(manifest.loadedTime, period);
},
getCheckTime: function(manifest, period) {
var self = this, checkTime = NaN, fetchTime;
if (manifest.hasOwnProperty("minimumUpdatePeriod")) {
fetchTime = self.getFetchTime(manifest, period);
checkTime = fetchTime + manifest.minimumUpdatePeriod;
}
return checkTime;
},
getEndTimeForLastPeriod: function(manifest, period) {
var periodEnd, checkTime = this.getCheckTime(manifest, period);
if (manifest.mediaPresentationDuration) {
periodEnd = manifest.mediaPresentationDuration;
} else if (!isNaN(checkTime)) {
periodEnd = checkTime;
} else {
throw new Error("Must have @mediaPresentationDuration or @minimumUpdatePeriod on MPD or an explicit @duration on the last period.");
}
return periodEnd;
},
getEventsForPeriod: function(manifest, period) {
var periodArray = manifest.Period_asArray, eventStreams = periodArray[period.index].EventStream_asArray, events = [];
if (eventStreams) {
for (var i = 0; i < eventStreams.length; i += 1) {
var eventStream = new Dash.vo.EventStream();
eventStream.period = period;
eventStream.timescale = 1;
if (eventStreams[i].hasOwnProperty("schemeIdUri")) {
eventStream.schemeIdUri = eventStreams[i].schemeIdUri;
} else {
throw "Invalid EventStream. SchemeIdUri has to be set";
}
if (eventStreams[i].hasOwnProperty("timescale")) {
eventStream.timescale = eventStreams[i].timescale;
}
if (eventStreams[i].hasOwnProperty("value")) {
eventStream.value = eventStreams[i].value;
}
for (var j = 0; j < eventStreams[i].Event_asArray.length; j += 1) {
var event = new Dash.vo.Event();
event.presentationTime = 0;
event.eventStream = eventStream;
if (eventStreams[i].Event_asArray[j].hasOwnProperty("presentationTime")) {
event.presentationTime = eventStreams[i].Event_asArray[j].presentationTime;
}
if (eventStreams[i].Event_asArray[j].hasOwnProperty("duration")) {
event.duration = eventStreams[i].Event_asArray[j].duration;
}
if (eventStreams[i].Event_asArray[j].hasOwnProperty("id")) {
event.id = eventStreams[i].Event_asArray[j].id;
}
events.push(event);
}
}
}
return events;
},
getEventStreams: function(inbandStreams, representation) {
var eventStreams = [];
if (!inbandStreams) return eventStreams;
for (var i = 0; i < inbandStreams.length; i++) {
var eventStream = new Dash.vo.EventStream();
eventStream.timescale = 1;
eventStream.representation = representation;
if (inbandStreams[i].hasOwnProperty("schemeIdUri")) {
eventStream.schemeIdUri = inbandStreams[i].schemeIdUri;
} else {
throw "Invalid EventStream. SchemeIdUri has to be set";
}
if (inbandStreams[i].hasOwnProperty("timescale")) {
eventStream.timescale = inbandStreams[i].timescale;
}
if (inbandStreams[i].hasOwnProperty("value")) {
eventStream.value = inbandStreams[i].value;
}
eventStreams.push(eventStream);
}
return eventStreams;
},
getEventStreamForAdaptationSet: function(manifest, adaptation) {
var inbandStreams = manifest.Period_asArray[adaptation.period.index].AdaptationSet_asArray[adaptation.index].InbandEventStream_asArray;
return this.getEventStreams(inbandStreams, null);
},
getEventStreamForRepresentation: function(manifest, representation) {
var inbandStreams = manifest.Period_asArray[representation.adaptation.period.index].AdaptationSet_asArray[representation.adaptation.index].Representation_asArray[representation.index].InbandEventStream_asArray;
return this.getEventStreams(inbandStreams, representation);
},
getUTCTimingSources: function(manifest) {
"use strict";
var self = this, isDynamic = self.getIsDynamic(manifest), hasAST = manifest.hasOwnProperty("availabilityStartTime"), utcTimingsArray = manifest.UTCTiming_asArray, utcTimingEntries = [];
if (isDynamic || hasAST) {
if (utcTimingsArray) {
utcTimingsArray.forEach(function(utcTiming) {
var entry = new Dash.vo.UTCTiming();
if (utcTiming.hasOwnProperty("schemeIdUri")) {
entry.schemeIdUri = utcTiming.schemeIdUri;
} else {
return;
}
if (utcTiming.hasOwnProperty("value")) {
entry.value = utcTiming.value.toString();
} else {
return;
}
utcTimingEntries.push(entry);
});
}
}
return utcTimingEntries;
}
};
Dash.dependencies.DashMetricsExtensions = function() {
"use strict";
var findRepresentationIndex = function(period, representationId) {
var adaptationSet, adaptationSetArray, representation, representationArray, adaptationSetArrayIndex, representationArrayIndex;
adaptationSetArray = period.AdaptationSet_asArray;
for (adaptationSetArrayIndex = 0; adaptationSetArrayIndex < adaptationSetArray.length; adaptationSetArrayIndex = adaptationSetArrayIndex + 1) {
adaptationSet = adaptationSetArray[adaptationSetArrayIndex];
representationArray = adaptationSet.Representation_asArray;
for (representationArrayIndex = 0; representationArrayIndex < representationArray.length; representationArrayIndex = representationArrayIndex + 1) {
representation = representationArray[representationArrayIndex];
if (representationId === representation.id) {
return representationArrayIndex;
}
}
}
return -1;
}, findRepresentation = function(period, representationId) {
var adaptationSet, adaptationSetArray, representation, representationArray, adaptationSetArrayIndex, representationArrayIndex;
adaptationSetArray = period.AdaptationSet_asArray;
for (adaptationSetArrayIndex = 0; adaptationSetArrayIndex < adaptationSetArray.length; adaptationSetArrayIndex = adaptationSetArrayIndex + 1) {
adaptationSet = adaptationSetArray[adaptationSetArrayIndex];
representationArray = adaptationSet.Representation_asArray;
for (representationArrayIndex = 0; representationArrayIndex < representationArray.length; representationArrayIndex = representationArrayIndex + 1) {
representation = representationArray[representationArrayIndex];
if (representationId === representation.id) {
return representation;
}
}
}
return null;
}, adaptationIsType = function(adaptation, bufferType) {
return this.manifestExt.getIsTypeOf(adaptation, bufferType);
}, findMaxBufferIndex = function(period, bufferType) {
var adaptationSet, adaptationSetArray, representationArray, adaptationSetArrayIndex;
if (!period || !bufferType) return -1;
adaptationSetArray = period.AdaptationSet_asArray;
for (adaptationSetArrayIndex = 0; adaptationSetArrayIndex < adaptationSetArray.length; adaptationSetArrayIndex = adaptationSetArrayIndex + 1) {
adaptationSet = adaptationSetArray[adaptationSetArrayIndex];
representationArray = adaptationSet.Representation_asArray;
if (adaptationIsType.call(this, adaptationSet, bufferType)) {
return representationArray.length;
}
}
return -1;
}, getBandwidthForRepresentation = function(representationId, periodId) {
var self = this, manifest = self.manifestModel.getValue(), representation, period = manifest.Period_asArray[periodId];
representation = findRepresentation.call(self, period, representationId);
if (representation === null) {
return null;
}
return representation.bandwidth;
}, getIndexForRepresentation = function(representationId, periodIdx) {
var self = this, manifest = self.manifestModel.getValue(), representationIndex, period = manifest.Period_asArray[periodIdx];
representationIndex = findRepresentationIndex.call(self, period, representationId);
return representationIndex;
}, getMaxIndexForBufferType = function(bufferType, periodIdx) {
var self = this, manifest = self.manifestModel.getValue(), maxIndex, period = manifest.Period_asArray[periodIdx];
maxIndex = findMaxBufferIndex.call(this, period, bufferType);
return maxIndex;
}, getMaxAllowedIndexForBufferType = function(bufferType, periodId) {
var abrController = this.system.getObject("abrController"), idx = 0;
if (abrController) {
idx = abrController.getTopQualityIndexFor(bufferType, periodId);
}
return idx;
}, getCurrentRepresentationSwitch = function(metrics) {
if (metrics === null) {
return null;
}
var repSwitch = metrics.RepSwitchList, repSwitchLength, repSwitchLastIndex, currentRepSwitch;
if (repSwitch === null || repSwitch.length <= 0) {
return null;
}
repSwitchLength = repSwitch.length;
repSwitchLastIndex = repSwitchLength - 1;
currentRepSwitch = repSwitch[repSwitchLastIndex];
return currentRepSwitch;
}, getCurrentBufferLevel = function(metrics) {
if (metrics === null) {
return null;
}
var bufferLevel = metrics.BufferLevel, bufferLevelLength, bufferLevelLastIndex, currentBufferLevel;
if (bufferLevel === null || bufferLevel.length <= 0) {
return null;
}
bufferLevelLength = bufferLevel.length;
bufferLevelLastIndex = bufferLevelLength - 1;
currentBufferLevel = bufferLevel[bufferLevelLastIndex];
return currentBufferLevel;
}, getCurrentPlaybackRate = function(metrics) {
if (metrics === null) {
return null;
}
var playList = metrics.PlayList, trace, currentRate;
if (playList === null || playList.length <= 0) {
return null;
}
trace = playList[playList.length - 1].trace;
if (trace === null || trace.length <= 0) {
return null;
}
currentRate = trace[trace.length - 1].playbackspeed;
return currentRate;
}, getCurrentHttpRequest = function(metrics) {
if (metrics === null) {
return null;
}
var httpList = metrics.HttpList, httpListLength, httpListLastIndex, currentHttpList = null;
if (httpList === null || httpList.length <= 0) {
return null;
}
httpListLength = httpList.length;
httpListLastIndex = httpListLength - 1;
while (httpListLastIndex >= 0) {
if (httpList[httpListLastIndex].responsecode) {
currentHttpList = httpList[httpListLastIndex];
break;
}
httpListLastIndex -= 1;
}
return currentHttpList;
}, getHttpRequests = function(metrics) {
if (metrics === null) {
return [];
}
return !!metrics.HttpList ? metrics.HttpList : [];
}, getCurrentDroppedFrames = function(metrics) {
if (metrics === null) {
return null;
}
var droppedFrames = metrics.DroppedFrames, droppedFramesLength, droppedFramesLastIndex, currentDroppedFrames;
if (droppedFrames === null || droppedFrames.length <= 0) {
return null;
}
droppedFramesLength = droppedFrames.length;
droppedFramesLastIndex = droppedFramesLength - 1;
currentDroppedFrames = droppedFrames[droppedFramesLastIndex];
return currentDroppedFrames;
}, getCurrentSchedulingInfo = function(metrics) {
if (metrics === null) return null;
var schedulingInfo = metrics.SchedulingInfo, ln, lastIdx, currentSchedulingInfo;
if (schedulingInfo === null || schedulingInfo.length <= 0) {
return null;
}
ln = schedulingInfo.length;
lastIdx = ln - 1;
currentSchedulingInfo = schedulingInfo[lastIdx];
return currentSchedulingInfo;
}, getCurrentManifestUpdate = function(metrics) {
if (metrics === null) return null;
var manifestUpdate = metrics.ManifestUpdate, ln, lastIdx, currentManifestUpdate;
if (manifestUpdate === null || manifestUpdate.length <= 0) {
return null;
}
ln = manifestUpdate.length;
lastIdx = ln - 1;
currentManifestUpdate = manifestUpdate[lastIdx];
return currentManifestUpdate;
}, getCurrentDVRInfo = function(metrics) {
if (metrics === null) {
return null;
}
var dvrInfo = metrics.DVRInfo, dvrInfoLastIndex, curentDVRInfo;
if (dvrInfo === null || dvrInfo.length <= 0) {
return null;
}
dvrInfoLastIndex = dvrInfo.length - 1;
curentDVRInfo = dvrInfo[dvrInfoLastIndex];
return curentDVRInfo;
}, getLatestMPDRequestHeaderValueByID = function(metrics, id) {
if (metrics === null) return null;
var httpRequestList = getHttpRequests(metrics), httpRequest = httpRequestList[httpRequestList.length - 1], headers;
if (httpRequest.type === "MPD") {
headers = parseResponseHeaders(httpRequest.responseHeaders);
}
return headers[id] === undefined ? null : headers[id];
}, getLatestFragmentRequestHeaderValueByID = function(metrics, id) {
if (metrics === null) return null;
var httpRequest = getCurrentHttpRequest(metrics), headers;
if (httpRequest === null || httpRequest.responseHeaders === null) return null;
headers = parseResponseHeaders(httpRequest.responseHeaders);
return headers[id] === undefined ? null : headers[id];
}, parseResponseHeaders = function(headerStr) {
var headers = {};
if (!headerStr) {
return headers;
}
var headerPairs = headerStr.split("\r\n");
for (var i = 0, ilen = headerPairs.length; i < ilen; i++) {
var headerPair = headerPairs[i];
var index = headerPair.indexOf(": ");
if (index > 0) {
headers[headerPair.substring(0, index)] = headerPair.substring(index + 2);
}
}
return headers;
};
return {
manifestModel: undefined,
manifestExt: undefined,
system: undefined,
getBandwidthForRepresentation: getBandwidthForRepresentation,
getIndexForRepresentation: getIndexForRepresentation,
getMaxIndexForBufferType: getMaxIndexForBufferType,
getMaxAllowedIndexForBufferType: getMaxAllowedIndexForBufferType,
getCurrentRepresentationSwitch: getCurrentRepresentationSwitch,
getCurrentBufferLevel: getCurrentBufferLevel,
getCurrentPlaybackRate: getCurrentPlaybackRate,
getCurrentHttpRequest: getCurrentHttpRequest,
getHttpRequests: getHttpRequests,
getCurrentDroppedFrames: getCurrentDroppedFrames,
getCurrentSchedulingInfo: getCurrentSchedulingInfo,
getCurrentDVRInfo: getCurrentDVRInfo,
getCurrentManifestUpdate: getCurrentManifestUpdate,
getLatestFragmentRequestHeaderValueByID: getLatestFragmentRequestHeaderValueByID,
getLatestMPDRequestHeaderValueByID: getLatestMPDRequestHeaderValueByID
};
};
Dash.dependencies.DashMetricsExtensions.prototype = {
constructor: Dash.dependencies.DashMetricsExtensions
};
function intTobitArray(integer, integerSizeInBit) {
var bitArray = [];
for (var i = 0; i < integerSizeInBit; i++) {
bitArray.push((integer & Math.pow(2, i)) > 0);
}
return bitArray;
}
Dash.dependencies.FragmentExtensions = function() {
"use strict";
var TFHD_BASE_DATA_OFFSET_PRESENT_FLAG_INDEX = 0, TFHD_SAMPLE_DESCRIPTION_INDEX_PRESENT_FLAG_INDEX = 1, TFHD_DEFAULT_SAMPLE_DURATION_PRESENT_FLAG_INDEX = 3, TFHD_DEFAULT_SAMPLE_SIZE_PRESENT_FLAG_INDEX = 4, TFHD_DEFAULT_SAMPLE_FLAGS_PRESENT_FLAG_INDEX = 5, TRUN_DATA_OFFSET_PRESENT_FLAG_INDEX = 0, TRUN_FIRST_SAMPLE_FLAGS_PRESENT_FLAG_INDEX = 2, TRUN_SAMPLE_DURATION_PRESENT_FLAG_INDEX = 8, TRUN_SAMPLE_SIZE_PRESENT_FLAG_INDEX = 9, TRUN_SAMPLE_FLAGS_PRESENT_FLAG_INDEX = 10, TRUN_SAMPLE_COMPOSITION_TIME_OFFSET_PRESENT_FLAG_INDEX = 11;
var parseTFDT = function(ab) {
var d = new DataView(ab), pos = 0, base_media_decode_time, version, size, type, i, c;
while (type !== "tfdt" && pos < d.byteLength) {
size = d.getUint32(pos);
pos += 4;
type = "";
for (i = 0; i < 4; i += 1) {
c = d.getInt8(pos);
type += String.fromCharCode(c);
pos += 1;
}
if (type !== "moof" && type !== "traf" && type !== "tfdt") {
pos += size - 8;
}
}
if (pos === d.byteLength) {
throw "Error finding live offset.";
}
version = d.getUint8(pos);
if (version === 0) {
pos += 4;
base_media_decode_time = d.getUint32(pos, false);
} else {
pos += size - 16;
base_media_decode_time = utils.Math.to64BitNumber(d.getUint32(pos + 4, false), d.getUint32(pos, false));
}
return {
version: version,
base_media_decode_time: base_media_decode_time
};
}, parseSIDX = function(ab) {
var d = new DataView(ab), pos = 0, version, timescale, earliest_presentation_time, i, type, size, charCode;
while (type !== "sidx" && pos < d.byteLength) {
size = d.getUint32(pos);
pos += 4;
type = "";
for (i = 0; i < 4; i += 1) {
charCode = d.getInt8(pos);
type += String.fromCharCode(charCode);
pos += 1;
}
if (type !== "moof" && type !== "traf" && type !== "sidx") {
pos += size - 8;
} else if (type === "sidx") {
pos -= 8;
}
}
version = d.getUint8(pos + 8);
pos += 12;
timescale = d.getUint32(pos + 4, false);
pos += 8;
if (version === 0) {
earliest_presentation_time = d.getUint32(pos, false);
} else {
earliest_presentation_time = utils.Math.to64BitNumber(d.getUint32(pos + 4, false), d.getUint32(pos, false));
}
return {
earliestPresentationTime: earliest_presentation_time,
timescale: timescale
};
}, parseTFHD = function(ab) {
var d = new DataView(ab), pos = 0, size, type, flags, flagsBits, tfhd, i, c;
while (type !== "tfhd" && pos < d.byteLength) {
size = d.getUint32(pos);
pos += 4;
type = "";
for (i = 0; i < 4; i += 1) {
c = d.getInt8(pos);
type += String.fromCharCode(c);
pos += 1;
}
if (type !== "moof" && type !== "traf" && type !== "tfhd") {
pos += size - 8;
}
}
if (pos === d.byteLength) {
throw "Error finding live offset.";
}
tfhd = {
baseDataOffset: 0,
descriptionIndex: 0,
sampleDuration: 0,
sampleSize: 0,
defaultSampleFlags: 0
};
pos += 1;
pos += 2;
flags = d.getUint8(pos);
pos += 1;
flagsBits = intTobitArray(flags, 8);
pos += 4;
if (flagsBits[TFHD_BASE_DATA_OFFSET_PRESENT_FLAG_INDEX]) {
tfhd.baseDataOffset = utils.Math.to64BitNumber(d.getUint32(pos + 4, false), d.getUint32(pos, false));
pos += 8;
}
if (flagsBits[TFHD_SAMPLE_DESCRIPTION_INDEX_PRESENT_FLAG_INDEX]) {
tfhd.descriptionIndex = d.getUint32(pos);
pos += 4;
}
if (flagsBits[TFHD_DEFAULT_SAMPLE_DURATION_PRESENT_FLAG_INDEX]) {
tfhd.sampleDuration = d.getUint32(pos);
pos += 4;
}
if (flagsBits[TFHD_DEFAULT_SAMPLE_SIZE_PRESENT_FLAG_INDEX]) {
tfhd.sampleSize = d.getUint32(pos);
pos += 4;
}
if (flagsBits[TFHD_DEFAULT_SAMPLE_FLAGS_PRESENT_FLAG_INDEX]) {
tfhd.defaultSampleFlags = d.getUint32(pos);
pos += 4;
}
return tfhd;
}, getMediaTimescaleFromMoov = function(ab) {
var d = new DataView(ab), pos = 0, version, size, type, i, c;
while (type !== "mdhd" && pos < d.byteLength) {
size = d.getUint32(pos);
pos += 4;
type = "";
for (i = 0; i < 4; i += 1) {
c = d.getInt8(pos);
type += String.fromCharCode(c);
pos += 1;
}
if (type !== "moov" && type !== "trak" && type !== "mdia" && type !== "mdhd") {
pos += size - 8;
}
}
if (pos === d.byteLength) {
throw "Error finding live offset.";
}
version = d.getUint8(pos);
pos += 12;
if (version == 1) {
pos += 8;
}
return d.getUint32(pos, false);
}, getSamplesInfo = function(ab) {
var d = new DataView(ab), pos = 0, size, type, sampleDuration, sampleCompostionTimeOffset, sampleCount, sampleSize, sampleDts, sampleList, flags, flagsBits, i, c, moofPosition, tfhd, tfdt, dataOffset;
tfhd = parseTFHD(ab);
tfdt = parseTFDT(ab);
while (type !== "trun" && pos < d.byteLength) {
size = d.getUint32(pos);
pos += 4;
type = "";
for (i = 0; i < 4; i += 1) {
c = d.getInt8(pos);
type += String.fromCharCode(c);
pos += 1;
}
if (type !== "moof" && type !== "traf" && type !== "trun") {
pos += size - 8;
}
if (type == "moof") {
moofPosition = pos - 8;
}
}
if (pos === d.byteLength) {
throw "Error finding live offset.";
}
pos += 1;
pos += 1;
flags = d.getUint16(pos);
pos += 2;
flagsBits = intTobitArray(flags, 16);
sampleCount = d.getUint32(pos);
pos += 4;
sampleDts = tfdt.base_media_decode_time;
if (flagsBits[TRUN_DATA_OFFSET_PRESENT_FLAG_INDEX]) {
dataOffset = d.getUint32(pos) + tfhd.baseDataOffset;
pos += 4;
} else {
dataOffset = tfhd.baseDataOffset;
}
if (flagsBits[TRUN_FIRST_SAMPLE_FLAGS_PRESENT_FLAG_INDEX]) {
pos += 4;
}
sampleList = [];
for (i = 0; i < sampleCount; i++) {
if (flagsBits[TRUN_SAMPLE_DURATION_PRESENT_FLAG_INDEX]) {
sampleDuration = d.getUint32(pos);
pos += 4;
} else {
sampleDuration = tfhd.sampleDuration;
}
if (flagsBits[TRUN_SAMPLE_SIZE_PRESENT_FLAG_INDEX]) {
sampleSize = d.getUint32(pos);
pos += 4;
} else {
sampleSize = tfhd.sampleSize;
}
if (flagsBits[TRUN_SAMPLE_FLAGS_PRESENT_FLAG_INDEX]) {
pos += 4;
}
if (flagsBits[TRUN_SAMPLE_COMPOSITION_TIME_OFFSET_PRESENT_FLAG_INDEX]) {
sampleCompostionTimeOffset = d.getUint32(pos);
pos += 4;
} else {
sampleCompostionTimeOffset = 0;
}
sampleList.push({
dts: sampleDts,
cts: sampleDts + sampleCompostionTimeOffset,
duration: sampleDuration,
offset: moofPosition + dataOffset,
size: sampleSize
});
dataOffset += sampleSize;
sampleDts += sampleDuration;
}
return sampleList;
}, loadFragment = function(media) {
var self = this, request = new XMLHttpRequest(), url = media, loaded = false, errorStr = "Error loading fragment: " + url, error = new MediaPlayer.vo.Error(null, errorStr, null), parsed;
request.onloadend = function() {
if (!loaded) {
errorStr = "Error loading fragment: " + url;
self.notify(Dash.dependencies.FragmentExtensions.eventList.ENAME_FRAGMENT_LOADING_COMPLETED, {
fragment: null
}, error);
}
};
request.onload = function() {
loaded = true;
parsed = parseTFDT(request.response);
self.notify(Dash.dependencies.FragmentExtensions.eventList.ENAME_FRAGMENT_LOADING_COMPLETED, {
fragment: parsed
});
};
request.onerror = function() {
errorStr = "Error loading fragment: " + url;
self.notify(Dash.dependencies.FragmentExtensions.eventList.ENAME_FRAGMENT_LOADING_COMPLETED, {
fragment: null
}, error);
};
request.responseType = "arraybuffer";
request.open("GET", url);
request.send(null);
};
return {
log: undefined,
notify: undefined,
subscribe: undefined,
unsubscribe: undefined,
loadFragment: loadFragment,
parseTFDT: parseTFDT,
parseSIDX: parseSIDX,
getSamplesInfo: getSamplesInfo,
getMediaTimescaleFromMoov: getMediaTimescaleFromMoov
};
};
Dash.dependencies.FragmentExtensions.prototype = {
constructor: Dash.dependencies.FragmentExtensions
};
Dash.dependencies.FragmentExtensions.eventList = {
ENAME_FRAGMENT_LOADING_COMPLETED: "fragmentLoadingCompleted"
};
Dash.vo.AdaptationSet = function() {
"use strict";
this.period = null;
this.index = -1;
this.type = null;
};
Dash.vo.AdaptationSet.prototype = {
constructor: Dash.vo.AdaptationSet
};
Dash.vo.Event = function() {
"use strict";
this.duration = NaN;
this.presentationTime = NaN;
this.id = NaN;
this.messageData = "";
this.eventStream = null;
this.presentationTimeDelta = NaN;
};
Dash.vo.Event.prototype = {
constructor: Dash.vo.Event
};
Dash.vo.EventStream = function() {
"use strict";
this.adaptionSet = null;
this.representation = null;
this.period = null;
this.timescale = 1;
this.value = "";
this.schemeIdUri = "";
};
Dash.vo.EventStream.prototype = {
constructor: Dash.vo.EventStream
};
Dash.vo.Mpd = function() {
"use strict";
this.manifest = null;
this.suggestedPresentationDelay = 0;
this.availabilityStartTime = null;
this.availabilityEndTime = Number.POSITIVE_INFINITY;
this.timeShiftBufferDepth = Number.POSITIVE_INFINITY;
this.maxSegmentDuration = Number.POSITIVE_INFINITY;
this.checkTime = NaN;
this.clientServerTimeShift = 0;
this.isClientServerTimeSyncCompleted = false;
};
Dash.vo.Mpd.prototype = {
constructor: Dash.vo.Mpd
};
Dash.vo.Period = function() {
"use strict";
this.id = null;
this.index = -1;
this.duration = NaN;
this.start = NaN;
this.mpd = null;
};
Dash.vo.Period.prototype = {
constructor: Dash.vo.Period
};
Dash.vo.Representation = function() {
"use strict";
this.id = null;
this.index = -1;
this.adaptation = null;
this.segmentInfoType = null;
this.initialization = null;
this.segmentDuration = NaN;
this.timescale = 1;
this.startNumber = 1;
this.indexRange = null;
this.range = null;
this.presentationTimeOffset = 0;
this.MSETimeOffset = NaN;
this.segmentAvailabilityRange = null;
this.availableSegmentsNumber = 0;
this.bandwidth = NaN;
this.maxPlayoutRate = NaN;
};
Dash.vo.Representation.prototype = {
constructor: Dash.vo.Representation
};
Dash.vo.Segment = function() {
"use strict";
this.indexRange = null;
this.index = null;
this.mediaRange = null;
this.media = null;
this.duration = NaN;
this.replacementTime = null;
this.replacementNumber = NaN;
this.mediaStartTime = NaN;
this.presentationStartTime = NaN;
this.availabilityStartTime = NaN;
this.availabilityEndTime = NaN;
this.availabilityIdx = NaN;
this.wallStartTime = NaN;
this.representation = null;
};
Dash.vo.Segment.prototype = {
constructor: Dash.vo.Segment
};
Dash.vo.UTCTiming = function() {
"use strict";
this.schemeIdUri = "";
this.value = "";
};
Dash.vo.UTCTiming.prototype = {
constructor: Dash.vo.UTCTiming
};
MediaPlayer.dependencies.ErrorHandler = function() {
"use strict";
var errorEvent = MediaPlayer.events.ERROR;
return {
eventBus: undefined,
capabilityError: function(err) {
this.eventBus.dispatchEvent({
type: errorEvent,
error: "capability",
event: err
});
},
downloadError: function(id, url, request) {
this.eventBus.dispatchEvent({
type: errorEvent,
error: "download",
event: {
id: id,
url: url,
request: request
}
});
},
manifestError: function(message, id, manifest) {
this.eventBus.dispatchEvent({
type: errorEvent,
error: "manifestError",
event: {
message: message,
id: id,
manifest: manifest
}
});
},
closedCaptionsError: function(message, id, ccContent) {
this.eventBus.dispatchEvent({
type: errorEvent,
error: "cc",
event: {
message: message,
id: id,
cc: ccContent
}
});
},
mediaSourceError: function(err) {
this.eventBus.dispatchEvent({
type: errorEvent,
error: "mediasource",
event: err
});
},
mediaKeySessionError: function(err) {
this.eventBus.dispatchEvent({
type: errorEvent,
error: "key_session",
event: err
});
},
mediaKeyMessageError: function(err) {
this.eventBus.dispatchEvent({
type: errorEvent,
error: "key_message",
event: err
});
},
mediaKeySystemSelectionError: function(err) {
this.eventBus.dispatchEvent({
type: errorEvent,
error: "key_system_selection",
event: err
});
}
};
};
MediaPlayer.dependencies.ErrorHandler.prototype = {
constructor: MediaPlayer.dependencies.ErrorHandler
};
MediaPlayer.dependencies.FragmentLoader = function() {
"use strict";
var RETRY_ATTEMPTS = 3, RETRY_INTERVAL = 500, xhrs = [], doLoad = function(request, remainingAttempts) {
var req = new XMLHttpRequest(), httpRequestMetrics = null, firstProgress = true, needFailureReport = true, lastTraceTime = null, self = this, handleLoaded = function(requestVO, succeeded) {
needFailureReport = false;
var currentTime = new Date(), bytes = req.response, latency, download;
if (!requestVO.firstByteDate) {
requestVO.firstByteDate = requestVO.requestStartDate;
}
requestVO.requestEndDate = currentTime;
latency = requestVO.firstByteDate.getTime() - requestVO.requestStartDate.getTime();
download = requestVO.requestEndDate.getTime() - requestVO.firstByteDate.getTime();
self.log((succeeded ? "loaded " : "failed ") + requestVO.mediaType + ":" + requestVO.type + ":" + requestVO.startTime + " (" + req.status + ", " + latency + "ms, " + download + "ms)");
httpRequestMetrics.tresponse = requestVO.firstByteDate;
httpRequestMetrics.tfinish = requestVO.requestEndDate;
httpRequestMetrics.responsecode = req.status;
httpRequestMetrics.responseHeaders = req.getAllResponseHeaders();
self.metricsModel.appendHttpTrace(httpRequestMetrics, currentTime, currentTime.getTime() - lastTraceTime.getTime(), [ bytes ? bytes.byteLength : 0 ]);
lastTraceTime = currentTime;
};
xhrs.push(req);
request.requestStartDate = new Date();
httpRequestMetrics = self.metricsModel.addHttpRequest(request.mediaType, null, request.type, request.url, null, request.range, request.requestStartDate, null, null, null, null, request.duration, null);
self.metricsModel.appendHttpTrace(httpRequestMetrics, request.requestStartDate, request.requestStartDate.getTime() - request.requestStartDate.getTime(), [ 0 ]);
lastTraceTime = request.requestStartDate;
req.open("GET", self.requestModifierExt.modifyRequestURL(request.url), true);
req.responseType = "arraybuffer";
req = self.requestModifierExt.modifyRequestHeader(req);
if (request.range) {
req.setRequestHeader("Range", "bytes=" + request.range);
}
req.onprogress = function(event) {
var currentTime = new Date();
if (firstProgress) {
firstProgress = false;
if (!event.lengthComputable || event.lengthComputable && event.total != event.loaded) {
request.firstByteDate = currentTime;
httpRequestMetrics.tresponse = currentTime;
}
}
if (event.lengthComputable) {
request.bytesLoaded = event.loaded;
request.bytesTotal = event.total;
}
self.metricsModel.appendHttpTrace(httpRequestMetrics, currentTime, currentTime.getTime() - lastTraceTime.getTime(), [ req.response ? req.response.byteLength : 0 ]);
lastTraceTime = currentTime;
self.notify(MediaPlayer.dependencies.FragmentLoader.eventList.ENAME_LOADING_PROGRESS, {
request: request
});
};
req.onload = function() {
if (req.status < 200 || req.status > 299) return;
handleLoaded(request, true);
self.notify(MediaPlayer.dependencies.FragmentLoader.eventList.ENAME_LOADING_COMPLETED, {
request: request,
response: req.response
});
};
req.onloadend = req.onerror = function() {
if (xhrs.indexOf(req) === -1) {
return;
} else {
xhrs.splice(xhrs.indexOf(req), 1);
}
if (!needFailureReport) return;
handleLoaded(request, false);
if (remainingAttempts > 0) {
self.log("Failed loading fragment: " + request.mediaType + ":" + request.type + ":" + request.startTime + ", retry in " + RETRY_INTERVAL + "ms" + " attempts: " + remainingAttempts);
remainingAttempts--;
setTimeout(function() {
doLoad.call(self, request, remainingAttempts);
}, RETRY_INTERVAL);
} else {
self.log("Failed loading fragment: " + request.mediaType + ":" + request.type + ":" + request.startTime + " no retry attempts left");
self.errHandler.downloadError("content", request.url, req);
self.notify(MediaPlayer.dependencies.FragmentLoader.eventList.ENAME_LOADING_COMPLETED, {
request: request,
bytes: null
}, new MediaPlayer.vo.Error(null, "failed loading fragment", null));
}
};
req.send();
}, checkForExistence = function(request) {
var self = this, req = new XMLHttpRequest(), isSuccessful = false;
req.open("HEAD", request.url, true);
req.onload = function() {
if (req.status < 200 || req.status > 299) return;
isSuccessful = true;
self.notify(MediaPlayer.dependencies.FragmentLoader.eventList.ENAME_CHECK_FOR_EXISTENCE_COMPLETED, {
request: request,
exists: true
});
};
req.onloadend = req.onerror = function() {
if (isSuccessful) return;
self.notify(MediaPlayer.dependencies.FragmentLoader.eventList.ENAME_CHECK_FOR_EXISTENCE_COMPLETED, {
request: request,
exists: false
});
};
req.send();
};
return {
metricsModel: undefined,
errHandler: undefined,
log: undefined,
requestModifierExt: undefined,
notify: undefined,
subscribe: undefined,
unsubscribe: undefined,
load: function(req) {
if (!req) {
this.notify(MediaPlayer.dependencies.FragmentLoader.eventList.ENAME_LOADING_COMPLETED, {
request: req,
bytes: null
}, new MediaPlayer.vo.Error(null, "request is null", null));
} else {
doLoad.call(this, req, RETRY_ATTEMPTS);
}
},
checkForExistence: function(req) {
if (!req) {
this.notify(MediaPlayer.dependencies.FragmentLoader.eventList.ENAME_CHECK_FOR_EXISTENCE_COMPLETED, {
request: req,
exists: false
});
return;
}
checkForExistence.call(this, req);
},
abort: function() {
var i, req, ln = xhrs.length;
for (i = 0; i < ln; i += 1) {
req = xhrs[i];
xhrs[i] = null;
req.abort();
req = null;
}
xhrs = [];
}
};
};
MediaPlayer.dependencies.FragmentLoader.prototype = {
constructor: MediaPlayer.dependencies.FragmentLoader
};
MediaPlayer.dependencies.FragmentLoader.eventList = {
ENAME_LOADING_COMPLETED: "loadingCompleted",
ENAME_LOADING_PROGRESS: "loadingProgress",
ENAME_CHECK_FOR_EXISTENCE_COMPLETED: "checkForExistenceCompleted"
};
MediaPlayer.dependencies.LiveEdgeFinder = function() {
"use strict";
var isSearchStarted = false, searchStartTime = NaN, rules, liveEdge = null, ruleSet = MediaPlayer.rules.SynchronizationRulesCollection.prototype.BEST_GUESS_RULES, onSearchCompleted = function(req) {
var searchTime = (new Date().getTime() - searchStartTime) / 1e3;
liveEdge = req.value;
this.notify(MediaPlayer.dependencies.LiveEdgeFinder.eventList.ENAME_LIVE_EDGE_SEARCH_COMPLETED, {
liveEdge: liveEdge,
searchTime: searchTime
}, liveEdge === null ? new MediaPlayer.vo.Error(MediaPlayer.dependencies.LiveEdgeFinder.LIVE_EDGE_NOT_FOUND_ERROR_CODE, "live edge has not been found", null) : null);
}, onStreamUpdated = function(e) {
var self = this;
if (!self.streamProcessor.isDynamic() || isSearchStarted || e.error) {
return;
}
rules = self.synchronizationRulesCollection.getRules(ruleSet);
isSearchStarted = true;
searchStartTime = new Date().getTime();
self.rulesController.applyRules(rules, self.streamProcessor, onSearchCompleted.bind(self), null, function(currentValue, newValue) {
return newValue;
});
}, onTimeSyncComplete = function(e) {
if (e.error) {
ruleSet = MediaPlayer.rules.SynchronizationRulesCollection.prototype.BEST_GUESS_RULES;
} else {
ruleSet = MediaPlayer.rules.SynchronizationRulesCollection.prototype.TIME_SYNCHRONIZED_RULES;
}
};
return {
system: undefined,
synchronizationRulesCollection: undefined,
rulesController: undefined,
notify: undefined,
subscribe: undefined,
unsubscribe: undefined,
setup: function() {
this[MediaPlayer.dependencies.Stream.eventList.ENAME_STREAM_UPDATED] = onStreamUpdated;
this[MediaPlayer.dependencies.TimeSyncController.eventList.ENAME_TIME_SYNCHRONIZATION_COMPLETED] = onTimeSyncComplete;
},
initialize: function(streamProcessor) {
this.streamProcessor = streamProcessor;
this.fragmentLoader = streamProcessor.fragmentLoader;
},
abortSearch: function() {
isSearchStarted = false;
searchStartTime = NaN;
},
getLiveEdge: function() {
return liveEdge;
},
reset: function() {
this.abortSearch();
liveEdge = null;
}
};
};
MediaPlayer.dependencies.LiveEdgeFinder.prototype = {
constructor: MediaPlayer.dependencies.LiveEdgeFinder
};
MediaPlayer.dependencies.LiveEdgeFinder.eventList = {
ENAME_LIVE_EDGE_SEARCH_COMPLETED: "liveEdgeFound"
};
MediaPlayer.dependencies.LiveEdgeFinder.LIVE_EDGE_NOT_FOUND_ERROR_CODE = 1;
MediaPlayer.dependencies.ManifestLoader = function() {
"use strict";
var RETRY_ATTEMPTS = 3, RETRY_INTERVAL = 500, parseBaseUrl = function(url) {
var base = "";
if (url.indexOf("/") !== -1) {
if (url.indexOf("?") !== -1) {
url = url.substring(0, url.indexOf("?"));
}
base = url.substring(0, url.lastIndexOf("/") + 1);
}
return base;
}, doLoad = function(url, remainingAttempts) {
var baseUrl = parseBaseUrl(url), request = new XMLHttpRequest(), requestTime = new Date(), loadedTime = null, needFailureReport = true, manifest, onload, report, self = this;
onload = function() {
if (request.status < 200 || request.status > 299) {
return;
}
needFailureReport = false;
loadedTime = new Date();
self.metricsModel.addHttpRequest("stream", null, "MPD", url, null, null, requestTime, loadedTime, null, request.status, null, null, request.getAllResponseHeaders());
if (request.responseURL) {
baseUrl = parseBaseUrl(request.responseURL);
url = request.responseURL;
}
manifest = self.parser.parse(request.responseText, baseUrl);
if (manifest) {
manifest.url = url;
manifest.loadedTime = loadedTime;
self.metricsModel.addManifestUpdate("stream", manifest.type, requestTime, loadedTime, manifest.availabilityStartTime);
self.xlinkController.resolveManifestOnLoad(manifest);
} else {
self.notify(MediaPlayer.dependencies.ManifestLoader.eventList.ENAME_MANIFEST_LOADED, {
manifest: null
}, new MediaPlayer.vo.Error(null, "Failed loading manifest: " + url, null));
}
};
report = function() {
if (!needFailureReport) {
return;
}
needFailureReport = false;
self.metricsModel.addHttpRequest("stream", null, "MPD", url, null, null, requestTime, new Date(), request.status, null, null, request.getAllResponseHeaders());
if (remainingAttempts > 0) {
self.log("Failed loading manifest: " + url + ", retry in " + RETRY_INTERVAL + "ms" + " attempts: " + remainingAttempts);
remainingAttempts--;
setTimeout(function() {
doLoad.call(self, url, remainingAttempts);
}, RETRY_INTERVAL);
} else {
self.log("Failed loading manifest: " + url + " no retry attempts left");
self.errHandler.downloadError("manifest", url, request);
self.notify(MediaPlayer.dependencies.ManifestLoader.eventList.ENAME_MANIFEST_LOADED, null, new Error("Failed loading manifest: " + url + " no retry attempts left"));
}
};
try {
request.onload = onload;
request.onloadend = report;
request.onerror = report;
request.open("GET", self.requestModifierExt.modifyRequestURL(url), true);
request.send();
} catch (e) {
request.onerror();
}
}, onXlinkReady = function(event) {
this.notify(MediaPlayer.dependencies.ManifestLoader.eventList.ENAME_MANIFEST_LOADED, {
manifest: event.data.manifest
});
};
return {
log: undefined,
parser: undefined,
errHandler: undefined,
metricsModel: undefined,
requestModifierExt: undefined,
notify: undefined,
subscribe: undefined,
unsubscribe: undefined,
xlinkController: undefined,
load: function(url) {
doLoad.call(this, url, RETRY_ATTEMPTS);
},
setup: function() {
onXlinkReady = onXlinkReady.bind(this);
this.xlinkController.subscribe(MediaPlayer.dependencies.XlinkController.eventList.ENAME_XLINK_READY, this, onXlinkReady);
}
};
};
MediaPlayer.dependencies.ManifestLoader.prototype = {
constructor: MediaPlayer.dependencies.ManifestLoader
};
MediaPlayer.dependencies.ManifestLoader.eventList = {
ENAME_MANIFEST_LOADED: "manifestLoaded"
};
MediaPlayer.dependencies.ManifestUpdater = function() {
"use strict";
var refreshDelay = NaN, refreshTimer = null, isStopped = true, isUpdating = false, manifestLoader, clear = function() {
if (refreshTimer !== null) {
clearInterval(refreshTimer);
refreshTimer = null;
}
}, start = function() {
clear.call(this);
if (!isNaN(refreshDelay)) {
this.log("Refresh manifest in " + refreshDelay + " seconds.");
refreshTimer = setTimeout(onRefreshTimer.bind(this), Math.min(refreshDelay * 1e3, Math.pow(2, 31) - 1), this);
}
}, update = function(manifest) {
var delay, timeSinceLastUpdate;
this.manifestModel.setValue(manifest);
this.log("Manifest has been refreshed.");
delay = this.manifestExt.getRefreshDelay(manifest);
timeSinceLastUpdate = (new Date().getTime() - manifest.loadedTime.getTime()) / 1e3;
refreshDelay = Math.max(delay - timeSinceLastUpdate, 0);
this.notify(MediaPlayer.dependencies.ManifestUpdater.eventList.ENAME_MANIFEST_UPDATED, {
manifest: manifest
});
if (!isStopped) {
start.call(this);
}
}, onRefreshTimer = function() {
var self = this, manifest, url;
if (isStopped || isUpdating) return;
isUpdating = true;
manifest = self.manifestModel.getValue();
url = manifest.url;
if (manifest.hasOwnProperty("Location")) {
url = manifest.Location;
}
manifestLoader.load(url);
}, onManifestLoaded = function(e) {
if (!e.error) {
update.call(this, e.data.manifest);
}
}, onPlaybackStarted = function() {
isStopped = false;
start.call(this);
}, onPlaybackPaused = function() {
isStopped = true;
clear.call(this);
}, onStreamsComposed = function() {
isUpdating = false;
};
return {
log: undefined,
system: undefined,
subscribe: undefined,
unsubscribe: undefined,
notify: undefined,
manifestModel: undefined,
manifestExt: undefined,
setup: function() {
this[MediaPlayer.dependencies.StreamController.eventList.ENAME_STREAMS_COMPOSED] = onStreamsComposed;
this[MediaPlayer.dependencies.ManifestLoader.eventList.ENAME_MANIFEST_LOADED] = onManifestLoaded;
this[MediaPlayer.dependencies.PlaybackController.eventList.ENAME_PLAYBACK_STARTED] = onPlaybackStarted;
this[MediaPlayer.dependencies.PlaybackController.eventList.ENAME_PLAYBACK_PAUSED] = onPlaybackPaused;
},
initialize: function(loader) {
isUpdating = false;
isStopped = true;
manifestLoader = loader;
manifestLoader.subscribe(MediaPlayer.dependencies.ManifestLoader.eventList.ENAME_MANIFEST_LOADED, this);
},
setManifest: function(m) {
update.call(this, m);
},
getManifestLoader: function() {
return manifestLoader;
},
reset: function() {
isStopped = true;
isUpdating = false;
clear.call(this);
manifestLoader.unsubscribe(MediaPlayer.dependencies.ManifestLoader.eventList.ENAME_MANIFEST_LOADED, this);
refreshDelay = NaN;
}
};
};
MediaPlayer.dependencies.ManifestUpdater.prototype = {
constructor: MediaPlayer.dependencies.ManifestUpdater
};
MediaPlayer.dependencies.ManifestUpdater.eventList = {
ENAME_MANIFEST_UPDATED: "manifestUpdated"
};
MediaPlayer.dependencies.Notifier = function() {
"use strict";
var OBSERVABLE_ID_PROP = "observableId", system, id = 0, getId = function() {
if (!this[OBSERVABLE_ID_PROP]) {
id += 1;
this[OBSERVABLE_ID_PROP] = "_id_" + id;
}
return this[OBSERVABLE_ID_PROP];
};
return {
system: undefined,
setup: function() {
system = this.system;
system.mapValue("notify", this.notify);
system.mapValue("subscribe", this.subscribe);
system.mapValue("unsubscribe", this.unsubscribe);
},
notify: function() {
var eventId = arguments[0] + getId.call(this), event = new MediaPlayer.vo.Event();
event.sender = this;
event.type = arguments[0];
event.data = arguments[1];
event.error = arguments[2];
event.timestamp = new Date().getTime();
system.notify.call(system, eventId, event);
},
subscribe: function(eventName, observer, handler, oneShot) {
if (!handler && observer[eventName]) {
handler = observer[eventName] = observer[eventName].bind(observer);
}
if (!observer) throw "observer object cannot be null or undefined";
if (!handler) throw "event handler cannot be null or undefined";
eventName += getId.call(this);
system.mapHandler(eventName, undefined, handler, oneShot);
},
unsubscribe: function(eventName, observer, handler) {
handler = handler || observer[eventName];
eventName += getId.call(this);
system.unmapHandler(eventName, undefined, handler);
}
};
};
MediaPlayer.dependencies.Notifier.prototype = {
constructor: MediaPlayer.dependencies.Notifier
};
MediaPlayer.dependencies.Stream = function() {
"use strict";
var streamProcessors = [], isStreamActivated = false, isMediaInitialized = false, streamInfo = null, updateError = {}, isUpdating = false, isInitialized = false, protectionController, ownProtectionController = false, eventController = null, onProtectionError = function(event) {
this.errHandler.mediaKeySessionError(event.data);
this.log(event.data);
this.reset();
}, initializeMediaForType = function(type, mediaSource) {
var self = this, mimeType = null, manifest = self.manifestModel.getValue(), codec, getCodecOrMimeType = function(mediaInfo) {
return mediaInfo.codec;
}, streamProcessor, mediaInfo = self.adapter.getMediaInfoForType(manifest, streamInfo, type);
if (type === "text") {
getCodecOrMimeType = function(mediaInfo) {
mimeType = mediaInfo.mimeType;
return mimeType;
};
}
if (mediaInfo !== null) {
var codecOrMime = getCodecOrMimeType.call(self, mediaInfo), contentProtectionData;
if (type !== "text" && type !== "fragmentedText") {
codec = codecOrMime;
self.log(type + " codec: " + codec);
contentProtectionData = mediaInfo.contentProtection;
if (!!contentProtectionData && !self.capabilities.supportsEncryptedMedia()) {
self.errHandler.capabilityError("encryptedmedia");
} else {
if (!self.capabilities.supportsCodec(self.videoModel.getElement(), codec)) {
var msg = type + "Codec (" + codec + ") is not supported.";
self.errHandler.manifestError(msg, "codec", manifest);
self.log(msg);
return;
}
}
}
streamProcessor = self.system.getObject("streamProcessor");
streamProcessors.push(streamProcessor);
streamProcessor.initialize(mimeType || type, self.fragmentController, mediaSource, self, eventController);
self.abrController.updateTopQualityIndex(mediaInfo);
streamProcessor.updateMediaInfo(manifest, mediaInfo);
} else {
self.log("No " + type + " data.");
}
}, initializeMedia = function(mediaSource) {
var self = this, manifest = self.manifestModel.getValue(), events;
eventController = self.system.getObject("eventController");
events = self.adapter.getEventsFor(manifest, streamInfo);
eventController.addInlineEvents(events);
isUpdating = true;
initializeMediaForType.call(self, "video", mediaSource);
initializeMediaForType.call(self, "audio", mediaSource);
initializeMediaForType.call(self, "text", mediaSource);
initializeMediaForType.call(self, "fragmentedText", mediaSource);
createBuffers.call(self);
isMediaInitialized = true;
isUpdating = false;
if (streamProcessors.length === 0) {
var msg = "No streams to play.";
self.errHandler.manifestError(msg, "nostreams", manifest);
self.log(msg);
} else {
self.liveEdgeFinder.initialize(streamProcessors[0]);
self.liveEdgeFinder.subscribe(MediaPlayer.dependencies.LiveEdgeFinder.eventList.ENAME_LIVE_EDGE_SEARCH_COMPLETED, self.playbackController);
}
checkIfInitializationCompleted.call(this);
}, checkIfInitializationCompleted = function() {
var self = this, ln = streamProcessors.length, hasError = !!updateError.audio || !!updateError.video, error = hasError ? new MediaPlayer.vo.Error(MediaPlayer.dependencies.Stream.DATA_UPDATE_FAILED_ERROR_CODE, "Data update failed", null) : null, i = 0;
for (i; i < ln; i += 1) {
if (streamProcessors[i].isUpdating() || isUpdating) return;
}
isInitialized = true;
self.eventBus.dispatchEvent({
type: MediaPlayer.events.STREAM_INITIALIZED,
data: {
streamInfo: streamInfo
}
});
self.notify(MediaPlayer.dependencies.Stream.eventList.ENAME_STREAM_UPDATED, {
streamInfo: streamInfo
}, error);
if (!isMediaInitialized || isStreamActivated) return;
protectionController.init(self.manifestModel.getValue(), getMediaInfo.call(this, "audio"), getMediaInfo.call(this, "video"));
isStreamActivated = true;
}, getMediaInfo = function(type) {
var ln = streamProcessors.length, mediaCtrl = null;
for (var i = 0; i < ln; i += 1) {
mediaCtrl = streamProcessors[i];
if (mediaCtrl.getType() === type) return mediaCtrl.getMediaInfo();
}
return null;
}, createBuffers = function() {
for (var i = 0, ln = streamProcessors.length; i < ln; i += 1) {
streamProcessors[i].createBuffer();
}
}, onBufferingCompleted = function() {
var processors = getAudioVideoProcessors(), ln = processors.length, i = 0;
for (i; i < ln; i += 1) {
if (!processors[i].isBufferingCompleted()) return;
}
this.notify(MediaPlayer.dependencies.Stream.eventList.ENAME_STREAM_BUFFERING_COMPLETED, {
streamInfo: streamInfo
});
}, onDataUpdateCompleted = function(e) {
var type = e.sender.streamProcessor.getType();
updateError[type] = e.error;
checkIfInitializationCompleted.call(this);
}, getAudioVideoProcessors = function() {
var arr = [], i = 0, ln = streamProcessors.length, type, controller;
for (i; i < ln; i += 1) {
controller = streamProcessors[i];
type = controller.getType();
if (type === "audio" || type === "video") {
arr.push(controller);
}
}
return arr;
}, updateData = function(updatedStreamInfo) {
var self = this, ln = streamProcessors.length, manifest = self.manifestModel.getValue(), i = 0, mediaInfo, events, controller;
isStreamActivated = false;
streamInfo = updatedStreamInfo;
self.log("Manifest updated... set new data on buffers.");
if (eventController) {
events = self.adapter.getEventsFor(manifest, streamInfo);
eventController.addInlineEvents(events);
}
isUpdating = true;
isInitialized = false;
for (i; i < ln; i += 1) {
controller = streamProcessors[i];
mediaInfo = self.adapter.getMediaInfoForType(manifest, streamInfo, controller.getType());
this.abrController.updateTopQualityIndex(mediaInfo);
controller.updateMediaInfo(manifest, mediaInfo);
}
isUpdating = false;
checkIfInitializationCompleted.call(self);
};
return {
system: undefined,
eventBus: undefined,
manifestModel: undefined,
sourceBufferExt: undefined,
adapter: undefined,
videoModel: undefined,
fragmentController: undefined,
playbackController: undefined,
capabilities: undefined,
log: undefined,
errHandler: undefined,
liveEdgeFinder: undefined,
abrController: undefined,
notify: undefined,
subscribe: undefined,
unsubscribe: undefined,
setup: function() {
this[MediaPlayer.dependencies.BufferController.eventList.ENAME_BUFFERING_COMPLETED] = onBufferingCompleted;
this[Dash.dependencies.RepresentationController.eventList.ENAME_DATA_UPDATE_COMPLETED] = onDataUpdateCompleted;
this[MediaPlayer.dependencies.ProtectionController.eventList.ENAME_PROTECTION_ERROR] = onProtectionError.bind(this);
},
initialize: function(strmInfo, protectionCtrl, protectionData) {
streamInfo = strmInfo;
if (this.capabilities.supportsEncryptedMedia()) {
if (!protectionCtrl) {
protectionCtrl = this.system.getObject("protectionController");
ownProtectionController = true;
}
protectionController = protectionCtrl;
protectionController.subscribe(MediaPlayer.dependencies.ProtectionController.eventList.ENAME_PROTECTION_ERROR, this);
protectionController.setMediaElement(this.videoModel.getElement());
if (protectionData) {
protectionController.setProtectionData(protectionData);
}
}
},
activate: function(mediaSource) {
if (!isStreamActivated) {
initializeMedia.call(this, mediaSource);
} else {
createBuffers.call(this);
}
},
deactivate: function() {
var ln = streamProcessors.length, i = 0;
for (i; i < ln; i += 1) {
streamProcessors[i].reset();
}
streamProcessors = [];
isStreamActivated = false;
isMediaInitialized = false;
this.resetEventController();
},
reset: function(errored) {
this.playbackController.pause();
var ln = streamProcessors.length, i = 0, processors;
for (i; i < ln; i += 1) {
processors = streamProcessors[i];
processors.reset(errored);
processors = null;
}
if (!!eventController) {
eventController.reset();
}
streamProcessors = [];
isUpdating = false;
isInitialized = false;
if (this.fragmentController) {
this.fragmentController.reset();
}
this.fragmentController = undefined;
this.liveEdgeFinder.abortSearch();
this.liveEdgeFinder.unsubscribe(MediaPlayer.dependencies.LiveEdgeFinder.eventList.ENAME_LIVE_EDGE_SEARCH_COMPLETED, this.playbackController);
if (protectionController) {
protectionController.unsubscribe(MediaPlayer.dependencies.ProtectionController.eventList.ENAME_PROTECTION_ERROR, this);
if (ownProtectionController) {
protectionController.teardown();
protectionController = null;
ownProtectionController = false;
}
}
isMediaInitialized = false;
isStreamActivated = false;
updateError = {};
},
getDuration: function() {
return streamInfo.duration;
},
getStartTime: function() {
return streamInfo.start;
},
getStreamIndex: function() {
return streamInfo.index;
},
getId: function() {
return streamInfo.id;
},
getStreamInfo: function() {
return streamInfo;
},
hasMedia: function(type) {
return getMediaInfo.call(this, type) !== null;
},
getBitrateListFor: function(type) {
var mediaInfo = getMediaInfo.call(this, type);
return this.abrController.getBitrateList(mediaInfo);
},
startEventController: function() {
eventController.start();
},
resetEventController: function() {
eventController.reset();
},
isActivated: function() {
return isStreamActivated;
},
isInitialized: function() {
return isInitialized;
},
updateData: updateData
};
};
MediaPlayer.dependencies.Stream.prototype = {
constructor: MediaPlayer.dependencies.Stream
};
MediaPlayer.dependencies.Stream.DATA_UPDATE_FAILED_ERROR_CODE = 1;
MediaPlayer.dependencies.Stream.eventList = {
ENAME_STREAM_UPDATED: "streamUpdated",
ENAME_STREAM_BUFFERING_COMPLETED: "streamBufferingCompleted"
};
MediaPlayer.dependencies.StreamProcessor = function() {
"use strict";
var isDynamic, stream = null, mediaInfo = null, type = null, eventController = null, createBufferControllerForType = function(type) {
var self = this, controllerName = type === "video" || type === "audio" || type === "fragmentedText" ? "bufferController" : "textController";
return self.system.getObject(controllerName);
};
return {
system: undefined,
videoModel: undefined,
indexHandler: undefined,
liveEdgeFinder: undefined,
timelineConverter: undefined,
abrController: undefined,
playbackController: undefined,
baseURLExt: undefined,
adapter: undefined,
manifestModel: undefined,
initialize: function(typeValue, fragmentController, mediaSource, streamValue, eventControllerValue) {
var self = this, trackController = self.system.getObject("trackController"), scheduleController = self.system.getObject("scheduleController"), liveEdgeFinder = self.liveEdgeFinder, abrController = self.abrController, indexHandler = self.indexHandler, baseUrlExt = self.baseURLExt, playbackController = self.playbackController, fragmentModel, fragmentLoader = this.system.getObject("fragmentLoader"), bufferController = createBufferControllerForType.call(self, typeValue);
stream = streamValue;
type = typeValue;
eventController = eventControllerValue;
isDynamic = stream.getStreamInfo().manifestInfo.isDynamic;
self.bufferController = bufferController;
self.scheduleController = scheduleController;
self.trackController = trackController;
self.fragmentController = fragmentController;
self.fragmentLoader = fragmentLoader;
trackController.subscribe(Dash.dependencies.RepresentationController.eventList.ENAME_DATA_UPDATE_COMPLETED, bufferController);
fragmentController.subscribe(MediaPlayer.dependencies.FragmentController.eventList.ENAME_INIT_FRAGMENT_LOADED, bufferController);
trackController.subscribe(Dash.dependencies.RepresentationController.eventList.ENAME_DATA_UPDATE_COMPLETED, stream);
if (type === "video" || type === "audio" || type === "fragmentedText") {
abrController.subscribe(MediaPlayer.dependencies.AbrController.eventList.ENAME_QUALITY_CHANGED, bufferController);
abrController.subscribe(MediaPlayer.dependencies.AbrController.eventList.ENAME_QUALITY_CHANGED, trackController);
abrController.subscribe(MediaPlayer.dependencies.AbrController.eventList.ENAME_QUALITY_CHANGED, scheduleController);
liveEdgeFinder.subscribe(MediaPlayer.dependencies.LiveEdgeFinder.eventList.ENAME_LIVE_EDGE_SEARCH_COMPLETED, this.timelineConverter);
liveEdgeFinder.subscribe(MediaPlayer.dependencies.LiveEdgeFinder.eventList.ENAME_LIVE_EDGE_SEARCH_COMPLETED, trackController);
liveEdgeFinder.subscribe(MediaPlayer.dependencies.LiveEdgeFinder.eventList.ENAME_LIVE_EDGE_SEARCH_COMPLETED, scheduleController);
trackController.subscribe(Dash.dependencies.RepresentationController.eventList.ENAME_DATA_UPDATE_STARTED, scheduleController);
trackController.subscribe(Dash.dependencies.RepresentationController.eventList.ENAME_DATA_UPDATE_COMPLETED, scheduleController);
stream.subscribe(MediaPlayer.dependencies.Stream.eventList.ENAME_STREAM_UPDATED, scheduleController);
trackController.subscribe(Dash.dependencies.RepresentationController.eventList.ENAME_DATA_UPDATE_COMPLETED, playbackController);
fragmentController.subscribe(MediaPlayer.dependencies.FragmentController.eventList.ENAME_MEDIA_FRAGMENT_LOADED, bufferController);
fragmentController.subscribe(MediaPlayer.dependencies.FragmentController.eventList.ENAME_MEDIA_FRAGMENT_LOADING_START, scheduleController);
fragmentController.subscribe(MediaPlayer.dependencies.FragmentController.eventList.ENAME_STREAM_COMPLETED, scheduleController);
fragmentController.subscribe(MediaPlayer.dependencies.FragmentController.eventList.ENAME_STREAM_COMPLETED, bufferController);
fragmentController.subscribe(MediaPlayer.dependencies.FragmentController.eventList.ENAME_STREAM_COMPLETED, scheduleController.scheduleRulesCollection.bufferLevelRule);
bufferController.subscribe(MediaPlayer.dependencies.BufferController.eventList.ENAME_BUFFER_LEVEL_STATE_CHANGED, playbackController);
bufferController.subscribe(MediaPlayer.dependencies.BufferController.eventList.ENAME_BUFFER_CLEARED, scheduleController);
bufferController.subscribe(MediaPlayer.dependencies.BufferController.eventList.ENAME_BYTES_APPENDED, scheduleController);
bufferController.subscribe(MediaPlayer.dependencies.BufferController.eventList.ENAME_BUFFER_LEVEL_UPDATED, scheduleController);
bufferController.subscribe(MediaPlayer.dependencies.BufferController.eventList.ENAME_BUFFER_LEVEL_UPDATED, trackController);
bufferController.subscribe(MediaPlayer.dependencies.BufferController.eventList.ENAME_BUFFER_LEVEL_STATE_CHANGED, scheduleController);
bufferController.subscribe(MediaPlayer.dependencies.BufferController.eventList.ENAME_INIT_REQUESTED, scheduleController);
bufferController.subscribe(MediaPlayer.dependencies.BufferController.eventList.ENAME_BUFFERING_COMPLETED, stream);
bufferController.subscribe(MediaPlayer.dependencies.BufferController.eventList.ENAME_QUOTA_EXCEEDED, scheduleController);
bufferController.subscribe(MediaPlayer.dependencies.BufferController.eventList.ENAME_BUFFER_LEVEL_OUTRUN, scheduleController.scheduleRulesCollection.bufferLevelRule);
bufferController.subscribe(MediaPlayer.dependencies.BufferController.eventList.ENAME_BUFFER_LEVEL_BALANCED, scheduleController.scheduleRulesCollection.bufferLevelRule);
bufferController.subscribe(MediaPlayer.dependencies.BufferController.eventList.ENAME_BYTES_APPENDED, playbackController);
playbackController.subscribe(MediaPlayer.dependencies.PlaybackController.eventList.ENAME_PLAYBACK_PROGRESS, bufferController);
playbackController.subscribe(MediaPlayer.dependencies.PlaybackController.eventList.ENAME_PLAYBACK_TIME_UPDATED, bufferController);
playbackController.subscribe(MediaPlayer.dependencies.PlaybackController.eventList.ENAME_PLAYBACK_RATE_CHANGED, bufferController);
playbackController.subscribe(MediaPlayer.dependencies.PlaybackController.eventList.ENAME_PLAYBACK_RATE_CHANGED, scheduleController);
playbackController.subscribe(MediaPlayer.dependencies.PlaybackController.eventList.ENAME_PLAYBACK_SEEKING, bufferController);
playbackController.subscribe(MediaPlayer.dependencies.PlaybackController.eventList.ENAME_PLAYBACK_SEEKING, scheduleController);
playbackController.subscribe(MediaPlayer.dependencies.PlaybackController.eventList.ENAME_PLAYBACK_STARTED, scheduleController);
playbackController.subscribe(MediaPlayer.dependencies.PlaybackController.eventList.ENAME_PLAYBACK_SEEKING, scheduleController.scheduleRulesCollection.playbackTimeRule);
playbackController.subscribe(MediaPlayer.dependencies.PlaybackController.eventList.ENAME_PLAYBACK_SEEKING, abrController.abrRulesCollection.insufficientBufferRule);
if (isDynamic) {
playbackController.subscribe(MediaPlayer.dependencies.PlaybackController.eventList.ENAME_WALLCLOCK_TIME_UPDATED, trackController);
}
playbackController.subscribe(MediaPlayer.dependencies.PlaybackController.eventList.ENAME_WALLCLOCK_TIME_UPDATED, bufferController);
playbackController.subscribe(MediaPlayer.dependencies.PlaybackController.eventList.ENAME_WALLCLOCK_TIME_UPDATED, scheduleController);
baseUrlExt.subscribe(Dash.dependencies.BaseURLExtensions.eventList.ENAME_INITIALIZATION_LOADED, indexHandler);
baseUrlExt.subscribe(Dash.dependencies.BaseURLExtensions.eventList.ENAME_SEGMENTS_LOADED, indexHandler);
} else {
bufferController.subscribe(MediaPlayer.dependencies.TextController.eventList.ENAME_CLOSED_CAPTIONING_REQUESTED, scheduleController);
}
indexHandler.initialize(this);
indexHandler.setCurrentTime(playbackController.getStreamStartTime(this.getStreamInfo()));
bufferController.initialize(type, mediaSource, self);
scheduleController.initialize(type, this);
abrController.initialize(type, this);
fragmentModel = this.getFragmentModel();
fragmentModel.setLoader(fragmentLoader);
fragmentModel.subscribe(MediaPlayer.dependencies.FragmentModel.eventList.ENAME_FRAGMENT_LOADING_STARTED, fragmentController);
fragmentModel.subscribe(MediaPlayer.dependencies.FragmentModel.eventList.ENAME_FRAGMENT_LOADING_COMPLETED, fragmentController);
fragmentModel.subscribe(MediaPlayer.dependencies.FragmentModel.eventList.ENAME_STREAM_COMPLETED, fragmentController);
fragmentModel.subscribe(MediaPlayer.dependencies.FragmentModel.eventList.ENAME_FRAGMENT_LOADING_COMPLETED, scheduleController);
fragmentLoader.subscribe(MediaPlayer.dependencies.FragmentLoader.eventList.ENAME_LOADING_COMPLETED, fragmentModel);
fragmentLoader.subscribe(MediaPlayer.dependencies.FragmentLoader.eventList.ENAME_LOADING_PROGRESS, abrController);
if (type === "video" || type === "audio" || type === "fragmentedText") {
bufferController.subscribe(MediaPlayer.dependencies.BufferController.eventList.ENAME_BUFFER_LEVEL_OUTRUN, fragmentModel);
bufferController.subscribe(MediaPlayer.dependencies.BufferController.eventList.ENAME_BUFFER_LEVEL_BALANCED, fragmentModel);
bufferController.subscribe(MediaPlayer.dependencies.BufferController.eventList.ENAME_BYTES_REJECTED, fragmentModel);
}
trackController.initialize(this);
},
isUpdating: function() {
return this.trackController.isUpdating();
},
getType: function() {
return type;
},
getABRController: function() {
return this.abrController;
},
getFragmentLoader: function() {
return this.fragmentLoader;
},
getFragmentModel: function() {
return this.scheduleController.getFragmentModel();
},
getStreamInfo: function() {
return stream.getStreamInfo();
},
updateMediaInfo: function(manifest, newMediaInfo) {
if (newMediaInfo !== mediaInfo && (!newMediaInfo || !mediaInfo || newMediaInfo.type === mediaInfo.type)) {
mediaInfo = newMediaInfo;
}
this.adapter.updateData(manifest, this);
},
getMediaInfo: function() {
return mediaInfo;
},
getScheduleController: function() {
return this.scheduleController;
},
getEventController: function() {
return eventController;
},
start: function() {
this.scheduleController.start();
},
stop: function() {
this.scheduleController.stop();
},
getCurrentTrack: function() {
return this.adapter.getCurrentTrackInfo(this.manifestModel.getValue(), this.trackController);
},
getTrackForQuality: function(quality) {
return this.adapter.getTrackInfoForQuality(this.manifestModel.getValue(), this.trackController, quality);
},
isBufferingCompleted: function() {
return this.bufferController.isBufferingCompleted();
},
createBuffer: function() {
return this.bufferController.getBuffer() || this.bufferController.createBuffer(mediaInfo);
},
isDynamic: function() {
return isDynamic;
},
reset: function(errored) {
var self = this, bufferController = self.bufferController, trackController = self.trackController, scheduleController = self.scheduleController, liveEdgeFinder = self.liveEdgeFinder, fragmentController = self.fragmentController, abrController = self.abrController, playbackController = self.playbackController, indexHandler = this.indexHandler, baseUrlExt = this.baseURLExt, fragmentModel = this.getFragmentModel(), fragmentLoader = this.fragmentLoader;
abrController.unsubscribe(MediaPlayer.dependencies.AbrController.eventList.ENAME_QUALITY_CHANGED, bufferController);
abrController.unsubscribe(MediaPlayer.dependencies.AbrController.eventList.ENAME_QUALITY_CHANGED, trackController);
abrController.unsubscribe(MediaPlayer.dependencies.AbrController.eventList.ENAME_QUALITY_CHANGED, scheduleController);
liveEdgeFinder.unsubscribe(MediaPlayer.dependencies.LiveEdgeFinder.eventList.ENAME_LIVE_EDGE_SEARCH_COMPLETED, this.timelineConverter);
liveEdgeFinder.unsubscribe(MediaPlayer.dependencies.LiveEdgeFinder.eventList.ENAME_LIVE_EDGE_SEARCH_COMPLETED, scheduleController);
liveEdgeFinder.unsubscribe(MediaPlayer.dependencies.LiveEdgeFinder.eventList.ENAME_LIVE_EDGE_SEARCH_COMPLETED, trackController);
trackController.unsubscribe(Dash.dependencies.RepresentationController.eventList.ENAME_DATA_UPDATE_STARTED, scheduleController);
trackController.unsubscribe(Dash.dependencies.RepresentationController.eventList.ENAME_DATA_UPDATE_COMPLETED, bufferController);
trackController.unsubscribe(Dash.dependencies.RepresentationController.eventList.ENAME_DATA_UPDATE_COMPLETED, scheduleController);
trackController.unsubscribe(Dash.dependencies.RepresentationController.eventList.ENAME_DATA_UPDATE_COMPLETED, stream);
trackController.unsubscribe(Dash.dependencies.RepresentationController.eventList.ENAME_DATA_UPDATE_COMPLETED, playbackController);
stream.unsubscribe(MediaPlayer.dependencies.Stream.eventList.ENAME_STREAM_UPDATED, scheduleController);
fragmentController.unsubscribe(MediaPlayer.dependencies.FragmentController.eventList.ENAME_INIT_FRAGMENT_LOADED, bufferController);
fragmentController.unsubscribe(MediaPlayer.dependencies.FragmentController.eventList.ENAME_MEDIA_FRAGMENT_LOADED, bufferController);
fragmentController.unsubscribe(MediaPlayer.dependencies.FragmentController.eventList.ENAME_MEDIA_FRAGMENT_LOADING_START, scheduleController);
fragmentController.unsubscribe(MediaPlayer.dependencies.FragmentController.eventList.ENAME_STREAM_COMPLETED, scheduleController);
fragmentController.unsubscribe(MediaPlayer.dependencies.FragmentController.eventList.ENAME_STREAM_COMPLETED, bufferController);
fragmentController.unsubscribe(MediaPlayer.dependencies.FragmentController.eventList.ENAME_STREAM_COMPLETED, scheduleController.scheduleRulesCollection.bufferLevelRule);
bufferController.unsubscribe(MediaPlayer.dependencies.BufferController.eventList.ENAME_BUFFER_LEVEL_STATE_CHANGED, playbackController);
bufferController.unsubscribe(MediaPlayer.dependencies.BufferController.eventList.ENAME_BUFFER_CLEARED, scheduleController);
bufferController.unsubscribe(MediaPlayer.dependencies.BufferController.eventList.ENAME_BYTES_APPENDED, scheduleController);
bufferController.unsubscribe(MediaPlayer.dependencies.BufferController.eventList.ENAME_BUFFER_LEVEL_UPDATED, scheduleController);
bufferController.unsubscribe(MediaPlayer.dependencies.BufferController.eventList.ENAME_BUFFER_LEVEL_UPDATED, trackController);
bufferController.unsubscribe(MediaPlayer.dependencies.BufferController.eventList.ENAME_BUFFER_LEVEL_STATE_CHANGED, scheduleController);
bufferController.unsubscribe(MediaPlayer.dependencies.BufferController.eventList.ENAME_INIT_REQUESTED, scheduleController);
bufferController.unsubscribe(MediaPlayer.dependencies.BufferController.eventList.ENAME_BUFFERING_COMPLETED, stream);
bufferController.unsubscribe(MediaPlayer.dependencies.BufferController.eventList.ENAME_CLOSED_CAPTIONING_REQUESTED, scheduleController);
bufferController.unsubscribe(MediaPlayer.dependencies.BufferController.eventList.ENAME_BUFFER_LEVEL_OUTRUN, scheduleController.scheduleRulesCollection.bufferLevelRule);
bufferController.unsubscribe(MediaPlayer.dependencies.BufferController.eventList.ENAME_BUFFER_LEVEL_BALANCED, scheduleController.scheduleRulesCollection.bufferLevelRule);
bufferController.unsubscribe(MediaPlayer.dependencies.BufferController.eventList.ENAME_BYTES_APPENDED, playbackController);
playbackController.unsubscribe(MediaPlayer.dependencies.PlaybackController.eventList.ENAME_PLAYBACK_PROGRESS, bufferController);
playbackController.unsubscribe(MediaPlayer.dependencies.PlaybackController.eventList.ENAME_PLAYBACK_TIME_UPDATED, bufferController);
playbackController.unsubscribe(MediaPlayer.dependencies.PlaybackController.eventList.ENAME_PLAYBACK_RATE_CHANGED, bufferController);
playbackController.unsubscribe(MediaPlayer.dependencies.PlaybackController.eventList.ENAME_PLAYBACK_RATE_CHANGED, scheduleController);
playbackController.unsubscribe(MediaPlayer.dependencies.PlaybackController.eventList.ENAME_PLAYBACK_SEEKING, bufferController);
playbackController.unsubscribe(MediaPlayer.dependencies.PlaybackController.eventList.ENAME_PLAYBACK_SEEKING, scheduleController);
playbackController.unsubscribe(MediaPlayer.dependencies.PlaybackController.eventList.ENAME_PLAYBACK_STARTED, scheduleController);
playbackController.unsubscribe(MediaPlayer.dependencies.PlaybackController.eventList.ENAME_WALLCLOCK_TIME_UPDATED, trackController);
playbackController.unsubscribe(MediaPlayer.dependencies.PlaybackController.eventList.ENAME_WALLCLOCK_TIME_UPDATED, bufferController);
playbackController.unsubscribe(MediaPlayer.dependencies.PlaybackController.eventList.ENAME_WALLCLOCK_TIME_UPDATED, scheduleController);
playbackController.unsubscribe(MediaPlayer.dependencies.PlaybackController.eventList.ENAME_PLAYBACK_SEEKING, scheduleController.scheduleRulesCollection.playbackTimeRule);
playbackController.unsubscribe(MediaPlayer.dependencies.PlaybackController.eventList.ENAME_PLAYBACK_SEEKING, abrController.abrRulesCollection.insufficientBufferRule);
baseUrlExt.unsubscribe(Dash.dependencies.BaseURLExtensions.eventList.ENAME_INITIALIZATION_LOADED, indexHandler);
baseUrlExt.unsubscribe(Dash.dependencies.BaseURLExtensions.eventList.ENAME_SEGMENTS_LOADED, indexHandler);
bufferController.unsubscribe(MediaPlayer.dependencies.BufferController.eventList.ENAME_BUFFER_LEVEL_OUTRUN, fragmentModel);
bufferController.unsubscribe(MediaPlayer.dependencies.BufferController.eventList.ENAME_BUFFER_LEVEL_BALANCED, fragmentModel);
bufferController.unsubscribe(MediaPlayer.dependencies.BufferController.eventList.ENAME_BYTES_REJECTED, fragmentModel);
fragmentModel.unsubscribe(MediaPlayer.dependencies.FragmentModel.eventList.ENAME_FRAGMENT_LOADING_STARTED, fragmentController);
fragmentModel.unsubscribe(MediaPlayer.dependencies.FragmentModel.eventList.ENAME_FRAGMENT_LOADING_COMPLETED, fragmentController);
fragmentModel.unsubscribe(MediaPlayer.dependencies.FragmentModel.eventList.ENAME_STREAM_COMPLETED, fragmentController);
fragmentModel.unsubscribe(MediaPlayer.dependencies.FragmentModel.eventList.ENAME_FRAGMENT_LOADING_COMPLETED, scheduleController);
fragmentLoader.unsubscribe(MediaPlayer.dependencies.FragmentLoader.eventList.ENAME_LOADING_COMPLETED, fragmentModel);
fragmentLoader.unsubscribe(MediaPlayer.dependencies.FragmentLoader.eventList.ENAME_LOADING_PROGRESS, abrController);
fragmentModel.reset();
indexHandler.reset();
this.bufferController.reset(errored);
this.scheduleController.reset();
this.bufferController = null;
this.scheduleController = null;
this.trackController = null;
this.videoModel = null;
this.fragmentController = null;
isDynamic = undefined;
stream = null;
mediaInfo = null;
type = null;
eventController = null;
}
};
};
MediaPlayer.dependencies.StreamProcessor.prototype = {
constructor: MediaPlayer.dependencies.StreamProcessor
};
MediaPlayer.utils.TTMLParser = function() {
"use strict";
var SECONDS_IN_HOUR = 60 * 60, SECONDS_IN_MIN = 60, timingRegex = /^(0[0-9]|1[0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])((\.[0-9][0-9][0-9])|(:[0-9][0-9]))$/, ttml, parseTimings = function(timingStr) {
var test = timingRegex.test(timingStr), timeParts, parsedTime, frameRate;
if (!test) {
return NaN;
}
timeParts = timingStr.split(":");
parsedTime = parseFloat(timeParts[0]) * SECONDS_IN_HOUR + parseFloat(timeParts[1]) * SECONDS_IN_MIN + parseFloat(timeParts[2]);
if (timeParts[3]) {
frameRate = ttml.tt.frameRate;
if (frameRate && !isNaN(frameRate)) {
parsedTime += parseFloat(timeParts[3]) / frameRate;
} else {
return NaN;
}
}
return parsedTime;
}, passStructuralConstraints = function() {
var passed = false, hasTt = ttml.hasOwnProperty("tt"), hasHead = hasTt ? ttml.tt.hasOwnProperty("head") : false, hasLayout = hasHead ? ttml.tt.head.hasOwnProperty("layout") : false, hasStyling = hasHead ? ttml.tt.head.hasOwnProperty("styling") : false, hasBody = hasTt ? ttml.tt.hasOwnProperty("body") : false;
if (hasTt && hasHead && hasLayout && hasStyling && hasBody) {
passed = true;
}
return passed;
}, getNamespacePrefix = function(json, ns) {
var r = Object.keys(json).filter(function(k) {
return k.split(":")[0] === "xmlns" && json[k] === ns;
}).map(function(k) {
return k.split(":")[1];
});
if (r.length != 1) {
return null;
}
return r[0];
}, internalParse = function(data) {
var captionArray = [], converter = new X2JS([], "", false), errorMsg, cues, cue, startTime, endTime, nsttp, text, i, j;
ttml = converter.xml_str2json(data);
if (!passStructuralConstraints()) {
errorMsg = "TTML document has incorrect structure";
throw errorMsg;
}
nsttp = getNamespacePrefix(ttml.tt, "http://www.w3.org/ns/ttml#parameter");
if (ttml.tt.hasOwnProperty(nsttp + ":frameRate")) {
ttml.tt.frameRate = parseInt(ttml.tt[nsttp + ":frameRate"], 10);
}
if (ttml.tt.body.div_asArray) {
cues = ttml.tt.body.div_asArray[0].p_asArray;
} else {
cues = ttml.tt.body.p_asArray;
}
if (!cues || cues.length === 0) {
errorMsg = "TTML document does not contain any cues";
throw errorMsg;
}
for (i = 0; i < cues.length; i += 1) {
cue = cues[i];
startTime = parseTimings(cue.begin);
endTime = parseTimings(cue.end);
if (isNaN(startTime) || isNaN(endTime)) {
errorMsg = "TTML document has incorrect timing value";
throw errorMsg;
}
if (cue["smpte:backgroundImage"] !== undefined) {
var images = ttml.tt.head.metadata.image_asArray;
for (j = 0; j < images.length; j += 1) {
if ("#" + images[j]["xml:id"] == cue["smpte:backgroundImage"]) {
captionArray.push({
start: startTime,
end: endTime,
id: images[j]["xml:id"],
data: "data:image/" + images[j].imagetype.toLowerCase() + ";base64, " + images[j].__text,
type: "image"
});
}
}
} else {
if (cue.span_asArray) {
text = cue.span_asArray[0].__text;
} else {
text = cue.__text;
}
captionArray.push({
start: startTime,
end: endTime,
data: text,
type: "text"
});
}
}
return captionArray;
};
return {
parse: internalParse
};
};
MediaPlayer.dependencies.TextSourceBuffer = function() {
var mediaInfo, mimeType;
return {
system: undefined,
videoModel: undefined,
eventBus: undefined,
errHandler: undefined,
initialize: function(type, bufferController) {
mimeType = type;
mediaInfo = bufferController.streamProcessor.getCurrentTrack().mediaInfo;
this.buffered = this.system.getObject("customTimeRanges");
this.initializationSegmentReceived = false;
this.timescale = 9e4;
},
append: function(bytes, chunk) {
var self = this, result, label, lang, samplesInfo, i, ccContent;
if (mimeType == "fragmentedText") {
var fragmentExt;
if (!this.initializationSegmentReceived) {
this.initializationSegmentReceived = true;
label = mediaInfo.id;
lang = mediaInfo.lang;
this.textTrackExtensions = self.getTextTrackExtensions();
this.textTrackExtensions.addTextTrack(self.videoModel.getElement(), result, label, lang, true);
self.eventBus.dispatchEvent({
type: MediaPlayer.events.TEXT_TRACK_ADDED
});
fragmentExt = self.system.getObject("fragmentExt");
this.timescale = fragmentExt.getMediaTimescaleFromMoov(bytes.buffer);
} else {
fragmentExt = self.system.getObject("fragmentExt");
samplesInfo = fragmentExt.getSamplesInfo(bytes.buffer);
for (i = 0; i < samplesInfo.length; i++) {
if (!this.firstSubtitleStart) {
this.firstSubtitleStart = samplesInfo[0].cts - chunk.start * this.timescale;
}
samplesInfo[i].cts -= this.firstSubtitleStart;
this.buffered.add(samplesInfo[i].cts / this.timescale, (samplesInfo[i].cts + samplesInfo[i].duration) / this.timescale);
ccContent = window.UTF8.decode(new Uint8Array(bytes.buffer.slice(samplesInfo[i].offset, samplesInfo[i].offset + samplesInfo[i].size)));
var parser = this.system.getObject("ttmlParser");
try {
result = parser.parse(ccContent);
this.textTrackExtensions.addCaptions(this.firstSubtitleStart / this.timescale, result);
} catch (e) {}
}
}
} else {
ccContent = window.UTF8.decode(bytes);
try {
result = self.getParser().parse(ccContent);
label = mediaInfo.id;
lang = mediaInfo.lang;
self.getTextTrackExtensions().addTextTrack(self.videoModel.getElement(), result, label, lang, true);
self.eventBus.dispatchEvent({
type: MediaPlayer.events.TEXT_TRACK_ADDED
});
} catch (e) {
self.errHandler.closedCaptionsError(e, "parse", ccContent);
}
}
},
abort: function() {
this.getTextTrackExtensions().deleteCues(this.videoModel.getElement());
},
getParser: function() {
var parser;
if (mimeType === "text/vtt") {
parser = this.system.getObject("vttParser");
} else if (mimeType === "application/ttml+xml") {
parser = this.system.getObject("ttmlParser");
}
return parser;
},
getTextTrackExtensions: function() {
return this.system.getObject("textTrackExtensions");
},
addEventListener: function(type, listener, useCapture) {
this.eventBus.addEventListener(type, listener, useCapture);
},
removeEventListener: function(type, listener, useCapture) {
this.eventBus.removeEventListener(type, listener, useCapture);
}
};
};
MediaPlayer.dependencies.TextSourceBuffer.prototype = {
constructor: MediaPlayer.dependencies.TextSourceBuffer
};
MediaPlayer.dependencies.TimeSyncController = function() {
"use strict";
var HTTP_TIMEOUT_MS = 5e3, offsetToDeviceTimeMs = 0, isSynchronizing = false, isInitialised = false, useManifestDateHeaderTimeSource, setIsSynchronizing = function(value) {
isSynchronizing = value;
}, getIsSynchronizing = function() {
return isSynchronizing;
}, setIsInitialised = function(value) {
isInitialised = value;
}, setOffsetMs = function(value) {
offsetToDeviceTimeMs = value;
}, getOffsetMs = function() {
return offsetToDeviceTimeMs;
}, alternateXsdatetimeDecoder = function(xsdatetimeStr) {
var SECONDS_IN_MIN = 60, MINUTES_IN_HOUR = 60, MILLISECONDS_IN_SECONDS = 1e3, datetimeRegex = /^([0-9]{4})-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2})(?::([0-9]*)(\.[0-9]*)?)?(?:([+\-])([0-9]{2})([0-9]{2}))?/, match = datetimeRegex.exec(xsdatetimeStr), utcDate, timezoneOffset;
utcDate = Date.UTC(parseInt(match[1], 10), parseInt(match[2], 10) - 1, parseInt(match[3], 10), parseInt(match[4], 10), parseInt(match[5], 10), match[6] && (parseInt(match[6], 10) || 0), match[7] && parseFloat(match[7]) * MILLISECONDS_IN_SECONDS || 0);
if (match[9] && match[10]) {
timezoneOffset = parseInt(match[9], 10) * MINUTES_IN_HOUR + parseInt(match[10], 10);
utcDate += (match[8] === "+" ? -1 : +1) * timezoneOffset * SECONDS_IN_MIN * MILLISECONDS_IN_SECONDS;
}
return new Date(utcDate).getTime();
}, xsdatetimeDecoder = function(xsdatetimeStr) {
var parsedDate = Date.parse(xsdatetimeStr);
if (isNaN(parsedDate)) {
parsedDate = alternateXsdatetimeDecoder(xsdatetimeStr);
}
return parsedDate;
}, iso8601Decoder = function(isoStr) {
return Date.parse(isoStr);
}, rfc1123Decoder = function(dateStr) {
return Date.parse(dateStr);
}, notSupportedHandler = function(url, onSuccessCB, onFailureCB) {
onFailureCB();
}, directHandler = function(xsdatetimeStr, onSuccessCB, onFailureCB) {
var time = xsdatetimeDecoder(xsdatetimeStr);
if (!isNaN(time)) {
onSuccessCB(time);
return;
}
onFailureCB();
}, httpHandler = function(decoder, url, onSuccessCB, onFailureCB, isHeadRequest) {
var oncomplete, onload, complete = false, req = new XMLHttpRequest(), verb = isHeadRequest ? "HEAD" : "GET", urls = url.match(/\S+/g);
url = urls.shift();
oncomplete = function() {
if (complete) {
return;
}
complete = true;
if (urls.length) {
httpHandler(decoder, urls.join(" "), onSuccessCB, onFailureCB, isHeadRequest);
} else {
onFailureCB();
}
};
onload = function() {
var time, result;
if (req.status === 200) {
time = isHeadRequest ? req.getResponseHeader("Date") : req.response;
result = decoder(time);
if (!isNaN(result)) {
onSuccessCB(result);
complete = true;
}
}
};
req.open(verb, url);
req.timeout = HTTP_TIMEOUT_MS || 0;
req.onload = onload;
req.onloadend = oncomplete;
req.send();
}, httpHeadHandler = function(url, onSuccessCB, onFailureCB) {
httpHandler.call(this, rfc1123Decoder, url, onSuccessCB, onFailureCB, true);
}, handlers = {
"urn:mpeg:dash:utc:http-head:2014": httpHeadHandler,
"urn:mpeg:dash:utc:http-xsdate:2014": httpHandler.bind(null, xsdatetimeDecoder),
"urn:mpeg:dash:utc:http-iso:2014": httpHandler.bind(null, iso8601Decoder),
"urn:mpeg:dash:utc:direct:2014": directHandler,
"urn:mpeg:dash:utc:http-head:2012": httpHeadHandler,
"urn:mpeg:dash:utc:http-xsdate:2012": httpHandler.bind(null, xsdatetimeDecoder),
"urn:mpeg:dash:utc:http-iso:2012": httpHandler.bind(null, iso8601Decoder),
"urn:mpeg:dash:utc:direct:2012": directHandler,
"urn:mpeg:dash:utc:http-ntp:2014": notSupportedHandler,
"urn:mpeg:dash:utc:ntp:2014": notSupportedHandler,
"urn:mpeg:dash:utc:sntp:2014": notSupportedHandler
}, checkForDateHeader = function() {
var metrics = this.metricsModel.getReadOnlyMetricsFor("stream"), dateHeaderValue = this.metricsExt.getLatestMPDRequestHeaderValueByID(metrics, "Date"), dateHeaderTime = dateHeaderValue !== null ? new Date(dateHeaderValue).getTime() : Number.NaN;
if (!isNaN(dateHeaderTime)) {
setOffsetMs(dateHeaderTime - new Date().getTime());
completeTimeSyncSequence.call(this, false, dateHeaderTime / 1e3, offsetToDeviceTimeMs);
} else {
completeTimeSyncSequence.call(this, true);
}
}, completeTimeSyncSequence = function(failed, time, offset) {
setIsSynchronizing(false);
this.notify(MediaPlayer.dependencies.TimeSyncController.eventList.ENAME_TIME_SYNCHRONIZATION_COMPLETED, {
time: time,
offset: offset
}, failed ? new MediaPlayer.vo.Error(MediaPlayer.dependencies.TimeSyncController.TIME_SYNC_FAILED_ERROR_CODE) : null);
}, attemptSync = function(sources, sourceIndex) {
var self = this, index = sourceIndex || 0, source = sources[index], onComplete = function(time, offset) {
var failed = !time || !offset;
if (failed && useManifestDateHeaderTimeSource) {
checkForDateHeader.call(self);
} else {
completeTimeSyncSequence.call(self, failed, time, offset);
}
};
setIsSynchronizing(true);
if (source) {
if (handlers.hasOwnProperty(source.schemeIdUri)) {
handlers[source.schemeIdUri](source.value, function(serverTime) {
var deviceTime = new Date().getTime(), offset = serverTime - deviceTime;
setOffsetMs(offset);
self.log("Local time: " + new Date(deviceTime));
self.log("Server time: " + new Date(serverTime));
self.log("Difference (ms): " + offset);
onComplete.call(self, serverTime, offset);
}, function() {
attemptSync.call(self, sources, index + 1);
});
} else {
attemptSync.call(self, sources, index + 1);
}
} else {
setOffsetMs(0);
onComplete.call(self);
}
};
return {
log: undefined,
notify: undefined,
subscribe: undefined,
unsubscribe: undefined,
metricsModel: undefined,
metricsExt: undefined,
getOffsetToDeviceTimeMs: function() {
return getOffsetMs();
},
initialize: function(timingSources, useManifestDateHeader) {
useManifestDateHeaderTimeSource = useManifestDateHeader;
if (!getIsSynchronizing()) {
attemptSync.call(this, timingSources);
setIsInitialised(true);
}
},
reset: function() {
setIsInitialised(false);
setIsSynchronizing(false);
}
};
};
MediaPlayer.dependencies.TimeSyncController.prototype = {
constructor: MediaPlayer.dependencies.TimeSyncController
};
MediaPlayer.dependencies.TimeSyncController.eventList = {
ENAME_TIME_SYNCHRONIZATION_COMPLETED: "timeSynchronizationComplete"
};
MediaPlayer.dependencies.TimeSyncController.TIME_SYNC_FAILED_ERROR_CODE = 1;
MediaPlayer.utils.VTTParser = function() {
"use strict";
var regExNewLine = /(?:\r\n|\r|\n)/gm, regExToken = /-->/, regExWhiteSpace = /(^[\s]+|[\s]+$)/g, regExWhiteSpaceWordBoundry = /\s\b/g, convertCuePointTimes = function(time) {
var timeArray = time.split(":"), len = timeArray.length - 1;
time = parseInt(timeArray[len - 1], 10) * 60 + parseFloat(timeArray[len]);
if (len === 2) {
time += parseInt(timeArray[0], 10) * 3600;
}
return time;
}, parseItemAttributes = function(data) {
var vttCuePoints = data.split(regExToken);
var arr = vttCuePoints[1].split(regExWhiteSpaceWordBoundry);
arr.shift();
vttCuePoints[1] = arr[0];
arr.shift();
return {
cuePoints: vttCuePoints,
styles: getCaptionStyles(arr)
};
}, getCaptionStyles = function(arr) {
var styleObject = {};
arr.forEach(function(element) {
if (element.split(/:/).length > 1) {
var val = element.split(/:/)[1];
if (val && val.search(/%/) != -1) {
val = parseInt(val.replace(/%/, ""));
}
if (element.match(/align/) || element.match(/A/)) {
styleObject.align = val;
}
if (element.match(/line/) || element.match(/L/)) {
styleObject.line = val;
}
if (element.match(/position/) || element.match(/P/)) {
styleObject.position = val;
}
if (element.match(/size/) || element.match(/S/)) {
styleObject.size = val;
}
}
});
return styleObject;
}, getSublines = function(data, idx) {
var lineCount, i = idx, subline = "", lineData = "";
while (data[i] !== "" && i < data.length) {
i++;
}
lineCount = i - idx;
if (lineCount > 1) {
for (var j = 0; j < lineCount; j++) {
lineData = data[idx + j];
if (!lineData.match(regExToken)) {
subline += lineData;
if (j !== lineCount - 1) {
subline += "\n";
}
} else {
subline = "";
break;
}
}
} else {
lineData = data[idx];
if (!lineData.match(regExToken)) subline = lineData;
}
return decodeURI(subline);
};
return {
log: undefined,
parse: function(data) {
var captionArray = [], len, lastStartTime;
data = data.split(regExNewLine);
len = data.length;
lastStartTime = -1;
for (var i = 0; i < len; i++) {
var item = data[i];
if (item.length > 0 && item !== "WEBVTT") {
if (item.match(regExToken)) {
var attributes = parseItemAttributes(item), cuePoints = attributes.cuePoints, styles = attributes.styles, text = getSublines(data, i + 1), startTime = convertCuePointTimes(cuePoints[0].replace(regExWhiteSpace, "")), endTime = convertCuePointTimes(cuePoints[1].replace(regExWhiteSpace, ""));
if (!Number.isNaN(startTime) && !Number.isNaN(endTime) && startTime >= lastStartTime && endTime > startTime) {
if (text !== "") {
lastStartTime = startTime;
captionArray.push({
start: startTime,
end: endTime,
data: text,
styles: styles
});
} else {
this.log("Skipping cue due to empty/malformed cue text");
}
} else {
this.log("Skipping cue due to incorrect cue timing");
}
}
}
}
return captionArray;
}
};
};
MediaPlayer.dependencies.XlinkLoader = function() {
"use strict";
var RETRY_ATTEMPTS = 1, RETRY_INTERVAL = 500, RESOLVE_TO_ZERO = "urn:mpeg:dash:resolve-to-zero:2013", doLoad = function(url, element, resolveObject, remainingAttempts) {
var request = new XMLHttpRequest(), self = this, report, onload, content, loadedTime = null, needFailureReport = true, requestTime = new Date();
onload = function() {
if (request.status < 200 || request.status > 299) {
return;
}
needFailureReport = false;
self.metricsModel.addHttpRequest("stream", null, "XLink", url, null, null, requestTime, loadedTime, null, request.status, null, null, request.getAllResponseHeaders());
content = request.responseText;
element.resolved = true;
if (content) {
element.resolvedContent = content;
self.notify(MediaPlayer.dependencies.XlinkLoader.eventList.ENAME_XLINKELEMENT_LOADED, {
element: element,
resolveObject: resolveObject
});
} else {
element.resolvedContent = null;
self.notify(MediaPlayer.dependencies.XlinkLoader.eventList.ENAME_XLINKELEMENT_LOADED, {
element: element,
resolveObject: resolveObject
}, new MediaPlayer.vo.Error(null, "Failed loading Xlink element: " + url, null));
}
};
report = function() {
if (!needFailureReport) {
return;
}
needFailureReport = false;
self.metricsModel.addHttpRequest("stream", null, "xlink", url, null, null, requestTime, new Date(), request.status, null, null, request.getAllResponseHeaders());
if (remainingAttempts > 0) {
console.log("Failed loading xLink content: " + url + ", retry in " + RETRY_INTERVAL + "ms" + " attempts: " + remainingAttempts);
remainingAttempts--;
setTimeout(function() {
doLoad.call(self, url, element, resolveObject, remainingAttempts);
}, RETRY_INTERVAL);
} else {
console.log("Failed loading Xlink content: " + url + " no retry attempts left");
self.errHandler.downloadError("xlink", url, request);
element.resolvedContent = null;
self.notify(MediaPlayer.dependencies.XlinkLoader.eventList.ENAME_XLINKELEMENT_LOADED, {
element: element,
resolveObject: resolveObject
}, new Error("Failed loading xlink Element: " + url + " no retry attempts left"));
}
};
try {
request.onload = onload;
request.onloadend = report;
request.onerror = report;
request.open("GET", self.requestModifierExt.modifyRequestURL(url), true);
request.send();
} catch (e) {
console.log("Error");
request.onerror();
}
};
return {
errHandler: undefined,
metricsModel: undefined,
requestModifierExt: undefined,
notify: undefined,
subscribe: undefined,
unsubscribe: undefined,
load: function(url, element, resolveObject) {
if (url === RESOLVE_TO_ZERO) {
element.resolvedContent = null;
element.resolved = true;
this.notify(MediaPlayer.dependencies.XlinkLoader.eventList.ENAME_XLINKELEMENT_LOADED, {
element: element,
resolveObject: resolveObject
});
} else {
doLoad.call(this, url, element, resolveObject, RETRY_ATTEMPTS);
}
}
};
};
MediaPlayer.dependencies.XlinkLoader.prototype = {
constructor: MediaPlayer.dependencies.XlinkLoader
};
MediaPlayer.dependencies.XlinkLoader.eventList = {
ENAME_XLINKELEMENT_LOADED: "xlinkElementLoaded"
};
MediaPlayer.dependencies.AbrController = function() {
"use strict";
var autoSwitchBitrate = true, topQualities = {}, qualityDict = {}, confidenceDict = {}, bitrateDict = {}, streamProcessorDict = {}, abandonmentStateDict = {}, abandonmentTimeout, getInternalQuality = function(type, id) {
var quality;
qualityDict[id] = qualityDict[id] || {};
if (!qualityDict[id].hasOwnProperty(type)) {
qualityDict[id][type] = 0;
}
quality = qualityDict[id][type];
return quality;
}, setInternalQuality = function(type, id, value) {
qualityDict[id] = qualityDict[id] || {};
qualityDict[id][type] = value;
}, getInternalConfidence = function(type, id) {
var confidence;
confidenceDict[id] = confidenceDict[id] || {};
if (!confidenceDict[id].hasOwnProperty(type)) {
confidenceDict[id][type] = 0;
}
confidence = confidenceDict[id][type];
return confidence;
}, setInternalConfidence = function(type, id, value) {
confidenceDict[id] = confidenceDict[id] || {};
confidenceDict[id][type] = value;
}, setTopQualityIndex = function(type, id, value) {
topQualities[id] = topQualities[id] || {};
topQualities[id][type] = value;
}, getInitialBitrate = function(type) {
return bitrateDict[type];
}, setInitialBitrate = function(type, value) {
bitrateDict[type] = value;
}, getMaxBitrate = function(type) {
if (bitrateDict.hasOwnProperty("max") && bitrateDict.max.hasOwnProperty(type)) {
return bitrateDict.max[type];
}
return NaN;
}, setMaxBitrate = function(type, value) {
bitrateDict.max = bitrateDict.max || {};
bitrateDict.max[type] = value;
}, getTopQualityIndex = function(type, id) {
var idx;
topQualities[id] = topQualities[id] || {};
if (!topQualities[id].hasOwnProperty(type)) {
topQualities[id][type] = 0;
}
idx = checkMaxBitrate.call(this, topQualities[id][type], type);
return idx;
}, checkMaxBitrate = function(idx, type) {
var maxBitrate = getMaxBitrate(type);
if (isNaN(maxBitrate)) {
return idx;
}
var maxIdx = this.getQualityForBitrate(streamProcessorDict[type].getMediaInfo(), maxBitrate);
return Math.min(idx, maxIdx);
}, onFragmentLoadProgress = function(evt) {
if (MediaPlayer.dependencies.ScheduleController.LOADING_REQUEST_THRESHOLD === 0) {
var self = this, type = evt.data.request.mediaType, rules = self.abrRulesCollection.getRules(MediaPlayer.rules.ABRRulesCollection.prototype.ABANDON_FRAGMENT_RULES), schduleController = streamProcessorDict[type].getScheduleController(), fragmentModel = schduleController.getFragmentModel(), callback = function(switchRequest) {
function setupTimeout(type) {
abandonmentTimeout = setTimeout(function() {
self.setAbandonmentStateFor(type, MediaPlayer.dependencies.AbrController.ALLOW_LOAD);
}, MediaPlayer.dependencies.AbrController.ABANDON_TIMEOUT);
}
if (switchRequest.confidence === MediaPlayer.rules.SwitchRequest.prototype.STRONG) {
var requests = fragmentModel.getRequests({
state: MediaPlayer.dependencies.FragmentModel.states.LOADING
}), newQuality = switchRequest.value, currentQuality = self.getQualityFor(type, self.streamController.getActiveStreamInfo());
if (newQuality < currentQuality) {
fragmentModel.abortRequests();
self.setAbandonmentStateFor(type, MediaPlayer.dependencies.AbrController.ABANDON_LOAD);
self.setPlaybackQuality(type, self.streamController.getActiveStreamInfo(), newQuality);
schduleController.replaceCanceledRequests(requests);
setupTimeout(type);
}
}
};
self.rulesController.applyRules(rules, streamProcessorDict[type], callback, evt, function(currentValue, newValue) {
return newValue;
});
}
};
return {
log: undefined,
abrRulesCollection: undefined,
rulesController: undefined,
notify: undefined,
subscribe: undefined,
unsubscribe: undefined,
streamController: undefined,
setup: function() {
this[MediaPlayer.dependencies.FragmentLoader.eventList.ENAME_LOADING_PROGRESS] = onFragmentLoadProgress;
},
initialize: function(type, streamProcessor) {
streamProcessorDict[type] = streamProcessor;
abandonmentStateDict[type] = abandonmentStateDict[type] || {};
abandonmentStateDict[type].state = MediaPlayer.dependencies.AbrController.ALLOW_LOAD;
},
getAutoSwitchBitrate: function() {
return autoSwitchBitrate;
},
setAutoSwitchBitrate: function(value) {
autoSwitchBitrate = value;
},
getPlaybackQuality: function(streamProcessor) {
var self = this, type = streamProcessor.getType(), streamId = streamProcessor.getStreamInfo().id, quality, oldQuality, rules, confidence, callback = function(res) {
var topQualityIdx = getTopQualityIndex.call(self, type, streamId);
quality = res.value;
confidence = res.confidence;
if (quality < 0) {
quality = 0;
}
if (quality > topQualityIdx) {
quality = topQualityIdx;
}
oldQuality = getInternalQuality(type, streamId);
if (quality === oldQuality || abandonmentStateDict[type].state === MediaPlayer.dependencies.AbrController.ABANDON_LOAD && quality > oldQuality) return;
setInternalQuality(type, streamId, quality);
setInternalConfidence(type, streamId, confidence);
self.notify(MediaPlayer.dependencies.AbrController.eventList.ENAME_QUALITY_CHANGED, {
mediaType: type,
streamInfo: streamProcessor.getStreamInfo(),
oldQuality: oldQuality,
newQuality: quality
});
};
quality = getInternalQuality(type, streamId);
confidence = getInternalConfidence(type, streamId);
if (!autoSwitchBitrate) return;
rules = self.abrRulesCollection.getRules(MediaPlayer.rules.ABRRulesCollection.prototype.QUALITY_SWITCH_RULES);
self.rulesController.applyRules(rules, streamProcessor, callback.bind(self), quality, function(currentValue, newValue) {
currentValue = currentValue === MediaPlayer.rules.SwitchRequest.prototype.NO_CHANGE ? 0 : currentValue;
return Math.max(currentValue, newValue);
});
},
setPlaybackQuality: function(type, streamInfo, newPlaybackQuality) {
var id = streamInfo.id, quality = getInternalQuality(type, id), isInt = newPlaybackQuality !== null && !isNaN(newPlaybackQuality) && newPlaybackQuality % 1 === 0;
if (!isInt) throw "argument is not an integer";
if (newPlaybackQuality !== quality && newPlaybackQuality >= 0 && newPlaybackQuality <= getTopQualityIndex.call(this, type, id)) {
setInternalQuality(type, streamInfo.id, newPlaybackQuality);
this.notify(MediaPlayer.dependencies.AbrController.eventList.ENAME_QUALITY_CHANGED, {
mediaType: type,
streamInfo: streamInfo,
oldQuality: quality,
newQuality: newPlaybackQuality
});
}
},
setAbandonmentStateFor: function(type, state) {
abandonmentStateDict[type].state = state;
},
getAbandonmentStateFor: function(type) {
return abandonmentStateDict[type].state;
},
getQualityFor: function(type, streamInfo) {
return getInternalQuality(type, streamInfo.id);
},
getConfidenceFor: function(type, streamInfo) {
return getInternalConfidence(type, streamInfo.id);
},
setInitialBitrateFor: function(type, value) {
setInitialBitrate(type, value);
},
getInitialBitrateFor: function(type) {
return getInitialBitrate(type);
},
setMaxAllowedBitrateFor: function(type, value) {
setMaxBitrate(type, value);
},
getMaxAllowedBitrateFor: function(type) {
return getMaxBitrate(type);
},
getQualityForBitrate: function(mediaInfo, bitrate) {
var bitrateList = this.getBitrateList(mediaInfo), ln = bitrateList.length, bitrateInfo;
for (var i = 0; i < ln; i += 1) {
bitrateInfo = bitrateList[i];
if (bitrate * 1e3 <= bitrateInfo.bitrate) {
return Math.max(i - 1, 0);
}
}
return ln - 1;
},
getBitrateList: function(mediaInfo) {
if (!mediaInfo || !mediaInfo.bitrateList) return null;
var bitrateList = mediaInfo.bitrateList, type = mediaInfo.type, infoList = [], bitrateInfo;
for (var i = 0, ln = bitrateList.length; i < ln; i += 1) {
bitrateInfo = new MediaPlayer.vo.BitrateInfo();
bitrateInfo.mediaType = type;
bitrateInfo.qualityIndex = i;
bitrateInfo.bitrate = bitrateList[i];
infoList.push(bitrateInfo);
}
return infoList;
},
updateTopQualityIndex: function(mediaInfo) {
var type = mediaInfo.type, streamId = mediaInfo.streamInfo.id, max;
max = mediaInfo.trackCount - 1;
setTopQualityIndex(type, streamId, max);
return max;
},
isPlayingAtTopQuality: function(streamInfo) {
var self = this, isAtTop, streamId = streamInfo.id, audioQuality = self.getQualityFor("audio", streamInfo), videoQuality = self.getQualityFor("video", streamInfo);
isAtTop = audioQuality === getTopQualityIndex.call(this, "audio", streamId) && videoQuality === getTopQualityIndex.call(this, "video", streamId);
return isAtTop;
},
getTopQualityIndexFor: getTopQualityIndex,
reset: function() {
autoSwitchBitrate = true;
topQualities = {};
qualityDict = {};
confidenceDict = {};
streamProcessorDict = {};
abandonmentStateDict = {};
clearTimeout(abandonmentTimeout);
abandonmentTimeout = null;
}
};
};
MediaPlayer.dependencies.AbrController.prototype = {
constructor: MediaPlayer.dependencies.AbrController
};
MediaPlayer.dependencies.AbrController.eventList = {
ENAME_QUALITY_CHANGED: "qualityChanged"
};
MediaPlayer.dependencies.AbrController.DEFAULT_VIDEO_BITRATE = 1e3;
MediaPlayer.dependencies.AbrController.DEFAULT_AUDIO_BITRATE = 100;
MediaPlayer.dependencies.AbrController.ABANDON_LOAD = "abandonload";
MediaPlayer.dependencies.AbrController.ALLOW_LOAD = "allowload";
MediaPlayer.dependencies.AbrController.ABANDON_TIMEOUT = 1e4;
MediaPlayer.dependencies.AbrController.BANDWIDTH_SAFETY = .9;
MediaPlayer.dependencies.BufferController = function() {
"use strict";
var STALL_THRESHOLD = .5, requiredQuality = 0, currentQuality = -1, isBufferingCompleted = false, bufferLevel = 0, bufferTarget = 0, criticalBufferLevel = Number.POSITIVE_INFINITY, mediaSource, maxAppendedIndex = -1, lastIndex = -1, type, buffer = null, minBufferTime, hasSufficientBuffer = null, appendedBytesInfo, isBufferLevelOutrun = false, isAppendingInProgress = false, inbandEventFound = false, createBuffer = function(mediaInfo) {
if (!mediaInfo || !mediaSource || !this.streamProcessor) return null;
var sourceBuffer = null;
try {
sourceBuffer = this.sourceBufferExt.createSourceBuffer(mediaSource, mediaInfo);
if (sourceBuffer && sourceBuffer.hasOwnProperty("initialize")) {
sourceBuffer.initialize(type, this);
}
} catch (e) {
this.errHandler.mediaSourceError("Error creating " + type + " source buffer.");
}
this.setBuffer(sourceBuffer);
updateBufferTimestampOffset.call(this, this.streamProcessor.getTrackForQuality(requiredQuality).MSETimeOffset);
return sourceBuffer;
}, isActive = function() {
var thisStreamId = this.streamProcessor.getStreamInfo().id, activeStreamId = this.streamController.getActiveStreamInfo().id;
return thisStreamId === activeStreamId;
}, waitingForInit = function() {
var loadingReqs = this.streamProcessor.getFragmentModel().getRequests({
state: MediaPlayer.dependencies.FragmentModel.states.LOADING
}), streamId = getStreamId.call(this), mediaData = this.virtualBuffer.getChunks({
streamId: streamId,
mediaType: type,
segmentType: MediaPlayer.vo.metrics.HTTPRequest.MEDIA_SEGMENT_TYPE,
quality: currentQuality
});
if (currentQuality > requiredQuality && (hasDataForQuality(mediaData, currentQuality) || hasDataForQuality(loadingReqs, currentQuality))) {
return false;
}
return currentQuality !== requiredQuality;
}, hasDataForQuality = function(arr, quality) {
var i = 0, ln = arr.length;
for (i; i < ln; i += 1) {
if (arr[i].quality === quality) return true;
}
return false;
}, onInitializationLoaded = function(e) {
var self = this, chunk;
if (e.data.fragmentModel !== self.streamProcessor.getFragmentModel()) return;
self.log("Initialization finished loading");
chunk = e.data.chunk;
this.virtualBuffer.append(chunk);
if (chunk.quality !== requiredQuality || !waitingForInit.call(self)) return;
switchInitData.call(self);
}, onMediaLoaded = function(e) {
if (e.data.fragmentModel !== this.streamProcessor.getFragmentModel()) return;
var events, chunk = e.data.chunk, bytes = chunk.bytes, quality = chunk.quality, index = chunk.index, request = this.streamProcessor.getFragmentModel().getRequests({
state: MediaPlayer.dependencies.FragmentModel.states.EXECUTED,
quality: quality,
index: index
})[0], currentTrack = this.streamProcessor.getTrackForQuality(quality), manifest = this.manifestModel.getValue(), eventStreamMedia = this.adapter.getEventsFor(manifest, currentTrack.mediaInfo, this.streamProcessor), eventStreamTrack = this.adapter.getEventsFor(manifest, currentTrack, this.streamProcessor);
if (eventStreamMedia.length > 0 || eventStreamTrack.length > 0) {
events = handleInbandEvents.call(this, bytes, request, eventStreamMedia, eventStreamTrack);
this.streamProcessor.getEventController().addInbandEvents(events);
}
chunk.bytes = deleteInbandEvents.call(this, bytes);
this.virtualBuffer.append(chunk);
appendNext.call(this);
}, appendToBuffer = function(chunk) {
isAppendingInProgress = true;
appendedBytesInfo = chunk;
var self = this, quality = chunk.quality, isInit = isNaN(chunk.index);
if (quality !== requiredQuality && isInit || quality !== currentQuality && !isInit) {
onMediaRejected.call(self, quality, chunk.index);
return;
}
self.sourceBufferExt.append(buffer, chunk);
}, onAppended = function(e) {
if (buffer !== e.data.buffer) return;
if (this.isBufferingCompleted() && this.streamProcessor.getStreamInfo().isLast) {
this.mediaSourceExt.signalEndOfStream(mediaSource);
}
var self = this, ranges;
if (e.error) {
if (e.error.code === MediaPlayer.dependencies.SourceBufferExtensions.QUOTA_EXCEEDED_ERROR_CODE) {
self.virtualBuffer.append(appendedBytesInfo);
criticalBufferLevel = self.sourceBufferExt.getTotalBufferedTime(buffer) * .8;
self.notify(MediaPlayer.dependencies.BufferController.eventList.ENAME_QUOTA_EXCEEDED, {
criticalBufferLevel: criticalBufferLevel
});
clearBuffer.call(self);
}
isAppendingInProgress = false;
return;
}
updateBufferLevel.call(self);
if (!hasEnoughSpaceToAppend.call(self)) {
self.notify(MediaPlayer.dependencies.BufferController.eventList.ENAME_QUOTA_EXCEEDED, {
criticalBufferLevel: criticalBufferLevel
});
clearBuffer.call(self);
}
ranges = self.sourceBufferExt.getAllRanges(buffer);
if (ranges) {
if (ranges.length > 0) {
var i, len;
for (i = 0, len = ranges.length; i < len; i += 1) {
self.log("Buffered Range: " + ranges.start(i) + " - " + ranges.end(i));
}
}
}
self.notify(MediaPlayer.dependencies.BufferController.eventList.ENAME_BYTES_APPENDED, {
quality: appendedBytesInfo.quality,
index: appendedBytesInfo.index,
bufferedRanges: ranges
});
onAppendToBufferCompleted.call(self, appendedBytesInfo.quality, appendedBytesInfo.index);
}, updateBufferLevel = function() {
var self = this, currentTime = self.playbackController.getTime();
bufferLevel = self.sourceBufferExt.getBufferLength(buffer, currentTime);
self.notify(MediaPlayer.dependencies.BufferController.eventList.ENAME_BUFFER_LEVEL_UPDATED, {
bufferLevel: bufferLevel
});
checkGapBetweenBuffers.call(self);
checkIfSufficientBuffer.call(self);
if (bufferLevel < STALL_THRESHOLD) {
notifyIfSufficientBufferStateChanged.call(self, false);
}
return true;
}, handleInbandEvents = function(data, request, mediaInbandEvents, trackInbandEvents) {
var events = [], i = 0, identifier, size, expTwo = Math.pow(256, 2), expThree = Math.pow(256, 3), fragmentStarttime = Math.max(isNaN(request.startTime) ? 0 : request.startTime, 0), eventStreams = [], event, inbandEvents;
inbandEventFound = false;
inbandEvents = mediaInbandEvents.concat(trackInbandEvents);
for (var loop = 0; loop < inbandEvents.length; loop++) {
eventStreams[inbandEvents[loop].schemeIdUri] = inbandEvents[loop];
}
while (i < data.length) {
identifier = String.fromCharCode(data[i + 4], data[i + 5], data[i + 6], data[i + 7]);
size = data[i] * expThree + data[i + 1] * expTwo + data[i + 2] * 256 + data[i + 3] * 1;
if (identifier == "moov" || identifier == "moof") {
break;
} else if (identifier == "emsg") {
inbandEventFound = true;
var eventBox = [ "", "", 0, 0, 0, 0, "" ], arrIndex = 0, j = i + 12;
while (j < size + i) {
if (arrIndex === 0 || arrIndex == 1 || arrIndex == 6) {
if (data[j] !== 0) {
eventBox[arrIndex] += String.fromCharCode(data[j]);
} else {
arrIndex += 1;
}
j += 1;
} else {
eventBox[arrIndex] = data[j] * expThree + data[j + 1] * expTwo + data[j + 2] * 256 + data[j + 3] * 1;
j += 4;
arrIndex += 1;
}
}
event = this.adapter.getEvent(eventBox, eventStreams, fragmentStarttime);
if (event) {
events.push(event);
}
}
i += size;
}
return events;
}, deleteInbandEvents = function(data) {
if (!inbandEventFound) {
return data;
}
var length = data.length, i = 0, j = 0, identifier, size, expTwo = Math.pow(256, 2), expThree = Math.pow(256, 3), modData = new Uint8Array(data.length);
while (i < length) {
identifier = String.fromCharCode(data[i + 4], data[i + 5], data[i + 6], data[i + 7]);
size = data[i] * expThree + data[i + 1] * expTwo + data[i + 2] * 256 + data[i + 3] * 1;
if (identifier != "emsg") {
for (var l = i; l < i + size; l++) {
modData[j] = data[l];
j += 1;
}
}
i += size;
}
return modData.subarray(0, j);
}, checkGapBetweenBuffers = function() {
var leastLevel = getLeastBufferLevel.call(this), acceptableGap = minBufferTime * 2, actualGap = bufferLevel - leastLevel;
if (actualGap >= acceptableGap && !isBufferLevelOutrun) {
isBufferLevelOutrun = true;
this.notify(MediaPlayer.dependencies.BufferController.eventList.ENAME_BUFFER_LEVEL_OUTRUN);
} else if (actualGap < acceptableGap / 2 && isBufferLevelOutrun) {
this.notify(MediaPlayer.dependencies.BufferController.eventList.ENAME_BUFFER_LEVEL_BALANCED);
isBufferLevelOutrun = false;
appendNext.call(this);
}
}, getLeastBufferLevel = function() {
var videoMetrics = this.metricsModel.getReadOnlyMetricsFor("video"), videoBufferLevel = this.metricsExt.getCurrentBufferLevel(videoMetrics), audioMetrics = this.metricsModel.getReadOnlyMetricsFor("audio"), audioBufferLevel = this.metricsExt.getCurrentBufferLevel(audioMetrics), leastLevel = null;
if (videoBufferLevel === null || audioBufferLevel === null) {
leastLevel = audioBufferLevel !== null ? audioBufferLevel.level : videoBufferLevel !== null ? videoBufferLevel.level : null;
} else {
leastLevel = Math.min(audioBufferLevel.level, videoBufferLevel.level);
}
return leastLevel;
}, hasEnoughSpaceToAppend = function() {
var self = this, totalBufferedTime = self.sourceBufferExt.getTotalBufferedTime(buffer);
return totalBufferedTime < criticalBufferLevel;
}, clearBuffer = function() {
var self = this, currentTime, removeStart, removeEnd, range, req;
if (!buffer) return;
currentTime = self.playbackController.getTime();
req = self.streamProcessor.getFragmentModel().getRequests({
state: MediaPlayer.dependencies.FragmentModel.states.EXECUTED,
time: currentTime
})[0];
removeEnd = req && !isNaN(req.startTime) ? req.startTime : Math.floor(currentTime);
range = self.sourceBufferExt.getBufferRange(buffer, currentTime);
if (range === null && buffer.buffered.length > 0) {
removeEnd = buffer.buffered.end(buffer.buffered.length - 1);
}
removeStart = buffer.buffered.start(0);
self.sourceBufferExt.remove(buffer, removeStart, removeEnd, mediaSource);
}, onRemoved = function(e) {
if (buffer !== e.data.buffer) return;
updateBufferLevel.call(this);
this.notify(MediaPlayer.dependencies.BufferController.eventList.ENAME_BUFFER_CLEARED, {
from: e.data.from,
to: e.data.to,
hasEnoughSpaceToAppend: hasEnoughSpaceToAppend.call(this)
});
if (hasEnoughSpaceToAppend.call(this)) return;
setTimeout(clearBuffer.bind(this), minBufferTime * 1e3);
}, checkIfBufferingCompleted = function() {
var isLastIdxAppended = maxAppendedIndex === lastIndex - 1;
if (!isLastIdxAppended || isBufferingCompleted) return;
isBufferingCompleted = true;
this.notify(MediaPlayer.dependencies.BufferController.eventList.ENAME_BUFFERING_COMPLETED);
}, checkIfSufficientBuffer = function() {
var timeToEnd = this.playbackController.getTimeToStreamEnd();
if (bufferLevel < STALL_THRESHOLD && minBufferTime < timeToEnd || minBufferTime >= timeToEnd && !isBufferingCompleted) {
notifyIfSufficientBufferStateChanged.call(this, false);
} else {
notifyIfSufficientBufferStateChanged.call(this, true);
}
}, getBufferState = function() {
return hasSufficientBuffer ? MediaPlayer.dependencies.BufferController.BUFFER_LOADED : MediaPlayer.dependencies.BufferController.BUFFER_EMPTY;
}, notifyIfSufficientBufferStateChanged = function(state) {
if (hasSufficientBuffer === state) return;
hasSufficientBuffer = state;
var bufferState = getBufferState(), eventName = bufferState === MediaPlayer.dependencies.BufferController.BUFFER_LOADED ? MediaPlayer.events.BUFFER_LOADED : MediaPlayer.events.BUFFER_EMPTY;
addBufferMetrics.call(this);
this.eventBus.dispatchEvent({
type: eventName,
data: {
bufferType: type
}
});
this.notify(MediaPlayer.dependencies.BufferController.eventList.ENAME_BUFFER_LEVEL_STATE_CHANGED, {
hasSufficientBuffer: state
});
this.log(hasSufficientBuffer ? "Got enough buffer to start." : "Waiting for more buffer before starting playback.");
}, updateBufferTimestampOffset = function(MSETimeOffset) {
if (buffer && buffer.timestampOffset !== MSETimeOffset && !isNaN(MSETimeOffset)) {
buffer.timestampOffset = MSETimeOffset;
}
}, updateBufferState = function() {
if (!buffer) return;
var self = this, fragmentsToLoad = this.streamProcessor.getScheduleController().getFragmentToLoadCount(), fragmentDuration = this.streamProcessor.getCurrentTrack().fragmentDuration;
updateBufferLevel.call(self);
bufferTarget = fragmentsToLoad > 0 ? fragmentsToLoad * fragmentDuration + bufferLevel : bufferTarget;
addBufferMetrics.call(this);
appendNext.call(self);
}, appendNext = function() {
if (waitingForInit.call(this)) {
switchInitData.call(this);
} else {
appendNextMedia.call(this);
}
}, addBufferMetrics = function() {
if (!isActive.call(this)) return;
this.metricsModel.addBufferState(type, getBufferState(), bufferTarget);
var level = bufferLevel, virtualLevel;
virtualLevel = this.virtualBuffer.getTotalBufferLevel(this.streamProcessor.getMediaInfo());
if (virtualLevel) {
level += virtualLevel;
}
this.metricsModel.addBufferLevel(type, new Date(), level);
}, getStreamId = function() {
return this.streamProcessor.getStreamInfo().id;
}, onAppendToBufferCompleted = function(quality, index) {
isAppendingInProgress = false;
if (!isNaN(index)) {
onMediaAppended.call(this, index);
} else {
onInitAppended.call(this, quality);
}
appendNext.call(this);
}, onMediaRejected = function(quality, index) {
isAppendingInProgress = false;
this.notify(MediaPlayer.dependencies.BufferController.eventList.ENAME_BYTES_REJECTED, {
quality: quality,
index: index
});
appendNext.call(this);
}, onInitAppended = function(quality) {
currentQuality = quality;
}, onMediaAppended = function(index) {
maxAppendedIndex = Math.max(index, maxAppendedIndex);
checkIfBufferingCompleted.call(this);
}, appendNextMedia = function() {
var streamId = getStreamId.call(this), chunk;
if (!buffer || isBufferLevelOutrun || isAppendingInProgress || waitingForInit.call(this) || !hasEnoughSpaceToAppend.call(this)) return;
chunk = this.virtualBuffer.extract({
streamId: streamId,
mediaType: type,
segmentType: MediaPlayer.vo.metrics.HTTPRequest.MEDIA_SEGMENT_TYPE,
limit: 1
})[0];
if (!chunk) return;
appendToBuffer.call(this, chunk);
}, onDataUpdateCompleted = function(e) {
if (e.error) return;
var self = this, bufferLength;
updateBufferTimestampOffset.call(self, e.data.currentRepresentation.MSETimeOffset);
bufferLength = self.streamProcessor.getStreamInfo().manifestInfo.minBufferTime;
if (minBufferTime !== bufferLength) {
self.setMinBufferTime(bufferLength);
self.notify(MediaPlayer.dependencies.BufferController.eventList.ENAME_MIN_BUFFER_TIME_UPDATED, {
minBufferTime: bufferLength
});
}
}, onStreamCompleted = function(e) {
var self = this;
if (e.data.fragmentModel !== self.streamProcessor.getFragmentModel()) return;
lastIndex = e.data.request.index;
checkIfBufferingCompleted.call(self);
}, onQualityChanged = function(e) {
if (type !== e.data.mediaType || this.streamProcessor.getStreamInfo().id !== e.data.streamInfo.id) return;
var self = this, newQuality = e.data.newQuality;
if (requiredQuality === newQuality) return;
updateBufferTimestampOffset.call(self, self.streamProcessor.getTrackForQuality(newQuality).MSETimeOffset);
requiredQuality = newQuality;
if (!waitingForInit.call(self)) return;
switchInitData.call(self);
}, onChunkAppended = function() {
addBufferMetrics.call(this);
}, switchInitData = function() {
var self = this, streamId = getStreamId.call(self), filter = {
streamId: streamId,
mediaType: type,
segmentType: MediaPlayer.vo.metrics.HTTPRequest.INIT_SEGMENT_TYPE,
quality: requiredQuality
}, chunk = self.virtualBuffer.getChunks(filter)[0];
if (chunk) {
if (isAppendingInProgress || !buffer) return;
appendToBuffer.call(self, chunk);
} else {
self.notify(MediaPlayer.dependencies.BufferController.eventList.ENAME_INIT_REQUESTED, {
requiredQuality: requiredQuality
});
}
}, onWallclockTimeUpdated = function() {
appendNext.call(this);
}, onPlaybackRateChanged = function() {
checkIfSufficientBuffer.call(this);
};
return {
sourceBufferExt: undefined,
eventBus: undefined,
bufferMax: undefined,
manifestModel: undefined,
errHandler: undefined,
mediaSourceExt: undefined,
metricsModel: undefined,
metricsExt: undefined,
streamController: undefined,
playbackController: undefined,
adapter: undefined,
log: undefined,
abrController: undefined,
system: undefined,
notify: undefined,
subscribe: undefined,
unsubscribe: undefined,
virtualBuffer: undefined,
setup: function() {
this[Dash.dependencies.RepresentationController.eventList.ENAME_DATA_UPDATE_COMPLETED] = onDataUpdateCompleted;
this[MediaPlayer.dependencies.FragmentController.eventList.ENAME_INIT_FRAGMENT_LOADED] = onInitializationLoaded;
this[MediaPlayer.dependencies.FragmentController.eventList.ENAME_MEDIA_FRAGMENT_LOADED] = onMediaLoaded;
this[MediaPlayer.dependencies.FragmentController.eventList.ENAME_STREAM_COMPLETED] = onStreamCompleted;
this[MediaPlayer.dependencies.AbrController.eventList.ENAME_QUALITY_CHANGED] = onQualityChanged;
this[MediaPlayer.dependencies.PlaybackController.eventList.ENAME_PLAYBACK_PROGRESS] = updateBufferState;
this[MediaPlayer.dependencies.PlaybackController.eventList.ENAME_PLAYBACK_SEEKING] = updateBufferState;
this[MediaPlayer.dependencies.PlaybackController.eventList.ENAME_PLAYBACK_TIME_UPDATED] = updateBufferState;
this[MediaPlayer.dependencies.PlaybackController.eventList.ENAME_PLAYBACK_RATE_CHANGED] = onPlaybackRateChanged;
this[MediaPlayer.dependencies.PlaybackController.eventList.ENAME_WALLCLOCK_TIME_UPDATED] = onWallclockTimeUpdated;
onAppended = onAppended.bind(this);
onRemoved = onRemoved.bind(this);
onChunkAppended = onChunkAppended.bind(this);
this.sourceBufferExt.subscribe(MediaPlayer.dependencies.SourceBufferExtensions.eventList.ENAME_SOURCEBUFFER_APPEND_COMPLETED, this, onAppended);
this.sourceBufferExt.subscribe(MediaPlayer.dependencies.SourceBufferExtensions.eventList.ENAME_SOURCEBUFFER_REMOVE_COMPLETED, this, onRemoved);
this.virtualBuffer.subscribe(MediaPlayer.utils.VirtualBuffer.eventList.CHUNK_APPENDED, this, onChunkAppended);
},
initialize: function(typeValue, source, streamProcessor) {
var self = this;
type = typeValue;
self.setMediaType(type);
self.setMediaSource(source);
self.streamProcessor = streamProcessor;
self.fragmentController = streamProcessor.fragmentController;
self.scheduleController = streamProcessor.scheduleController;
requiredQuality = self.abrController.getQualityFor(type, streamProcessor.getStreamInfo());
},
createBuffer: createBuffer,
getStreamProcessor: function() {
return this.streamProcessor;
},
setStreamProcessor: function(value) {
this.streamProcessor = value;
},
getBuffer: function() {
return buffer;
},
setBuffer: function(value) {
buffer = value;
},
getBufferLevel: function() {
return bufferLevel;
},
getMinBufferTime: function() {
return minBufferTime;
},
setMinBufferTime: function(value) {
minBufferTime = value;
},
getCriticalBufferLevel: function() {
return criticalBufferLevel;
},
setMediaSource: function(value) {
mediaSource = value;
},
isBufferingCompleted: function() {
return isBufferingCompleted;
},
reset: function(errored) {
var self = this;
criticalBufferLevel = Number.POSITIVE_INFINITY;
hasSufficientBuffer = null;
minBufferTime = null;
currentQuality = -1;
lastIndex = -1;
maxAppendedIndex = -1;
requiredQuality = 0;
self.sourceBufferExt.unsubscribe(MediaPlayer.dependencies.SourceBufferExtensions.eventList.ENAME_SOURCEBUFFER_APPEND_COMPLETED, self, onAppended);
self.sourceBufferExt.unsubscribe(MediaPlayer.dependencies.SourceBufferExtensions.eventList.ENAME_SOURCEBUFFER_REMOVE_COMPLETED, self, onRemoved);
appendedBytesInfo = null;
this.virtualBuffer.unsubscribe(MediaPlayer.utils.VirtualBuffer.eventList.CHUNK_APPENDED, self, onChunkAppended);
isBufferLevelOutrun = false;
isAppendingInProgress = false;
if (!errored) {
self.sourceBufferExt.abort(mediaSource, buffer);
self.sourceBufferExt.removeSourceBuffer(mediaSource, buffer);
}
buffer = null;
}
};
};
MediaPlayer.dependencies.BufferController.BUFFER_SIZE_REQUIRED = "required";
MediaPlayer.dependencies.BufferController.BUFFER_SIZE_MIN = "min";
MediaPlayer.dependencies.BufferController.BUFFER_SIZE_INFINITY = "infinity";
MediaPlayer.dependencies.BufferController.DEFAULT_MIN_BUFFER_TIME = 12;
MediaPlayer.dependencies.BufferController.LOW_BUFFER_THRESHOLD = 4;
MediaPlayer.dependencies.BufferController.BUFFER_TIME_AT_TOP_QUALITY = 30;
MediaPlayer.dependencies.BufferController.BUFFER_TIME_AT_TOP_QUALITY_LONG_FORM = 300;
MediaPlayer.dependencies.BufferController.LONG_FORM_CONTENT_DURATION_THRESHOLD = 600;
MediaPlayer.dependencies.BufferController.RICH_BUFFER_THRESHOLD = 20;
MediaPlayer.dependencies.BufferController.BUFFER_LOADED = "bufferLoaded";
MediaPlayer.dependencies.BufferController.BUFFER_EMPTY = "bufferStalled";
MediaPlayer.dependencies.BufferController.prototype = {
constructor: MediaPlayer.dependencies.BufferController
};
MediaPlayer.dependencies.BufferController.eventList = {
ENAME_BUFFER_LEVEL_STATE_CHANGED: "bufferLevelStateChanged",
ENAME_BUFFER_LEVEL_UPDATED: "bufferLevelUpdated",
ENAME_QUOTA_EXCEEDED: "quotaExceeded",
ENAME_BYTES_APPENDED: "bytesAppended",
ENAME_BYTES_REJECTED: "bytesRejected",
ENAME_BUFFERING_COMPLETED: "bufferingCompleted",
ENAME_BUFFER_CLEARED: "bufferCleared",
ENAME_INIT_REQUESTED: "initRequested",
ENAME_BUFFER_LEVEL_OUTRUN: "bufferLevelOutrun",
ENAME_BUFFER_LEVEL_BALANCED: "bufferLevelBalanced",
ENAME_MIN_BUFFER_TIME_UPDATED: "minBufferTimeUpdated"
};
MediaPlayer.dependencies.EventController = function() {
"use strict";
var inlineEvents = {}, inbandEvents = {}, activeEvents = {}, eventInterval = null, refreshDelay = 100, presentationTimeThreshold = refreshDelay / 1e3, MPD_RELOAD_SCHEME = "urn:mpeg:dash:event:2012", MPD_RELOAD_VALUE = 1, reset = function() {
clear();
inlineEvents = null;
inbandEvents = null;
activeEvents = null;
}, clear = function() {
if (eventInterval !== null) {
clearInterval(eventInterval);
eventInterval = null;
}
}, start = function() {
var self = this;
self.log("Start Event Controller");
if (!isNaN(refreshDelay)) {
eventInterval = setInterval(onEventTimer.bind(this), refreshDelay);
}
}, addInlineEvents = function(values) {
var self = this;
inlineEvents = {};
if (values) {
for (var i = 0; i < values.length; i++) {
var event = values[i];
inlineEvents[event.id] = event;
self.log("Add inline event with id " + event.id);
}
}
self.log("Added " + values.length + " inline events");
}, addInbandEvents = function(values) {
var self = this;
for (var i = 0; i < values.length; i++) {
var event = values[i];
if (!(event.id in inbandEvents)) {
inbandEvents[event.id] = event;
self.log("Add inband event with id " + event.id);
} else {
self.log("Repeated event with id " + event.id);
}
}
}, onEventTimer = function() {
triggerEvents.call(this, inbandEvents);
triggerEvents.call(this, inlineEvents);
removeEvents.call(this);
}, triggerEvents = function(events) {
var self = this, currentVideoTime = this.videoModel.getCurrentTime(), presentationTime;
if (events) {
var eventIds = Object.keys(events);
for (var i = 0; i < eventIds.length; i++) {
var eventId = eventIds[i];
var curr = events[eventId];
if (curr !== undefined) {
presentationTime = curr.presentationTime / curr.eventStream.timescale;
if (presentationTime === 0 || presentationTime <= currentVideoTime && presentationTime + presentationTimeThreshold > currentVideoTime) {
self.log("Start Event " + eventId + " at " + currentVideoTime);
if (curr.duration > 0) activeEvents[eventId] = curr;
if (curr.eventStream.schemeIdUri == MPD_RELOAD_SCHEME && curr.eventStream.value == MPD_RELOAD_VALUE) refreshManifest.call(this);
delete events[eventId];
}
}
}
}
}, removeEvents = function() {
var self = this;
if (activeEvents) {
var currentVideoTime = this.videoModel.getCurrentTime();
var eventIds = Object.keys(activeEvents);
for (var i = 0; i < eventIds.length; i++) {
var eventId = eventIds[i];
var curr = activeEvents[eventId];
if (curr !== null && (curr.duration + curr.presentationTime) / curr.eventStream.timescale < currentVideoTime) {
self.log("Remove Event " + eventId + " at time " + currentVideoTime);
curr = null;
delete activeEvents[eventId];
}
}
}
}, refreshManifest = function() {
var manifest = this.manifestModel.getValue(), url = manifest.url;
if (manifest.hasOwnProperty("Location")) {
url = manifest.Location;
}
this.log("Refresh manifest @ " + url);
this.manifestUpdater.getManifestLoader().load(url);
};
return {
manifestModel: undefined,
manifestUpdater: undefined,
log: undefined,
system: undefined,
videoModel: undefined,
addInlineEvents: addInlineEvents,
addInbandEvents: addInbandEvents,
reset: reset,
clear: clear,
start: start
};
};
MediaPlayer.dependencies.EventController.prototype = {
constructor: MediaPlayer.dependencies.EventController
};
MediaPlayer.dependencies.FragmentController = function() {
"use strict";
var fragmentModels = [], inProgress = false, findModel = function(context) {
var ln = fragmentModels.length;
for (var i = 0; i < ln; i++) {
if (fragmentModels[i].getContext() == context) {
return fragmentModels[i];
}
}
return null;
}, getRequestsToLoad = function(current, callback) {
var self = this, streamProcessor = fragmentModels[0].getContext().streamProcessor, streamId = streamProcessor.getStreamInfo().id, rules = self.scheduleRulesCollection.getRules(MediaPlayer.rules.ScheduleRulesCollection.prototype.FRAGMENTS_TO_EXECUTE_RULES);
if (rules.indexOf(this.scheduleRulesCollection.sameTimeRequestRule) !== -1) {
this.scheduleRulesCollection.sameTimeRequestRule.setFragmentModels(fragmentModels, streamId);
}
self.rulesController.applyRules(rules, streamProcessor, callback, current, function(currentValue, newValue) {
return newValue;
});
}, createDataChunk = function(bytes, request, streamId) {
var chunk = new MediaPlayer.vo.DataChunk();
chunk.streamId = streamId;
chunk.mediaType = request.mediaType;
chunk.segmentType = request.type;
chunk.start = request.startTime;
chunk.duration = request.duration;
chunk.end = chunk.start + chunk.duration;
chunk.bytes = bytes;
chunk.index = request.index;
chunk.quality = request.quality;
return chunk;
}, onFragmentLoadingStart = function(e) {
var self = this, request = e.data.request;
if (self.isInitializationRequest(request)) {
self.notify(MediaPlayer.dependencies.FragmentController.eventList.ENAME_INIT_FRAGMENT_LOADING_START, {
request: request,
fragmentModel: e.sender
});
} else {
self.notify(MediaPlayer.dependencies.FragmentController.eventList.ENAME_MEDIA_FRAGMENT_LOADING_START, {
request: request,
fragmentModel: e.sender
});
}
}, onFragmentLoadingCompleted = function(e) {
var self = this, request = e.data.request, bytes = self.process(e.data.response), streamId = e.sender.getContext().streamProcessor.getStreamInfo().id, isInit = this.isInitializationRequest(request), eventName = isInit ? MediaPlayer.dependencies.FragmentController.eventList.ENAME_INIT_FRAGMENT_LOADED : MediaPlayer.dependencies.FragmentController.eventList.ENAME_MEDIA_FRAGMENT_LOADED, chunk;
if (bytes === null) {
self.log("No " + request.mediaType + " bytes to push.");
return;
}
chunk = createDataChunk.call(this, bytes, request, streamId);
self.notify(eventName, {
chunk: chunk,
fragmentModel: e.sender
});
executeRequests.call(this);
}, onStreamCompleted = function(e) {
this.notify(MediaPlayer.dependencies.FragmentController.eventList.ENAME_STREAM_COMPLETED, {
request: e.data.request,
fragmentModel: e.sender
});
}, onBufferLevelBalanced = function() {
executeRequests.call(this);
}, onGetRequests = function(result) {
var reqsToExecute = result.value, mediaType, r, m, i, j;
for (i = 0; i < reqsToExecute.length; i += 1) {
r = reqsToExecute[i];
if (!r) continue;
for (j = 0; j < fragmentModels.length; j += 1) {
m = fragmentModels[j];
mediaType = m.getContext().streamProcessor.getType();
if (r.mediaType !== mediaType) continue;
if (!(r instanceof MediaPlayer.vo.FragmentRequest)) {
r = m.getRequests({
state: MediaPlayer.dependencies.FragmentModel.states.PENDING,
time: r.startTime
})[0];
}
m.executeRequest(r);
}
}
inProgress = false;
}, executeRequests = function(request) {
if (inProgress) return;
inProgress = true;
getRequestsToLoad.call(this, request, onGetRequests.bind(this));
};
return {
system: undefined,
log: undefined,
scheduleRulesCollection: undefined,
rulesController: undefined,
notify: undefined,
subscribe: undefined,
unsubscribe: undefined,
setup: function() {
this[MediaPlayer.dependencies.FragmentModel.eventList.ENAME_FRAGMENT_LOADING_STARTED] = onFragmentLoadingStart;
this[MediaPlayer.dependencies.FragmentModel.eventList.ENAME_FRAGMENT_LOADING_COMPLETED] = onFragmentLoadingCompleted;
this[MediaPlayer.dependencies.FragmentModel.eventList.ENAME_STREAM_COMPLETED] = onStreamCompleted;
this[MediaPlayer.dependencies.BufferController.eventList.ENAME_BUFFER_LEVEL_BALANCED] = onBufferLevelBalanced;
if (this.scheduleRulesCollection.sameTimeRequestRule) {
this.subscribe(MediaPlayer.dependencies.FragmentController.eventList.ENAME_STREAM_COMPLETED, this.scheduleRulesCollection.sameTimeRequestRule);
}
},
process: function(bytes) {
var result = null;
if (bytes !== null && bytes !== undefined && bytes.byteLength > 0) {
result = new Uint8Array(bytes);
}
return result;
},
getModel: function(context) {
if (!context) return null;
var model = findModel(context);
if (!model) {
model = this.system.getObject("fragmentModel");
model.setContext(context);
fragmentModels.push(model);
}
return model;
},
detachModel: function(model) {
var idx = fragmentModels.indexOf(model);
if (idx > -1) {
fragmentModels.splice(idx, 1);
}
},
isInitializationRequest: function(request) {
return request && request.type && request.type === MediaPlayer.vo.metrics.HTTPRequest.INIT_SEGMENT_TYPE;
},
prepareFragmentForLoading: function(fragmentModel, request) {
if (!fragmentModel || !request) return;
if (fragmentModel.addRequest(request)) {
executeRequests.call(this, request);
}
},
executePendingRequests: function() {
executeRequests.call(this);
},
reset: function() {
fragmentModels = [];
if (this.scheduleRulesCollection.sameTimeRequestRule) {
this.unsubscribe(MediaPlayer.dependencies.FragmentController.eventList.ENAME_STREAM_COMPLETED, this.scheduleRulesCollection.sameTimeRequestRule);
}
}
};
};
MediaPlayer.dependencies.FragmentController.prototype = {
constructor: MediaPlayer.dependencies.FragmentController
};
MediaPlayer.dependencies.FragmentController.eventList = {
ENAME_STREAM_COMPLETED: "streamCompleted",
ENAME_INIT_FRAGMENT_LOADING_START: "initFragmentLoadingStart",
ENAME_MEDIA_FRAGMENT_LOADING_START: "mediaFragmentLoadingStart",
ENAME_INIT_FRAGMENT_LOADED: "initFragmentLoaded",
ENAME_MEDIA_FRAGMENT_LOADED: "mediaFragmentLoaded"
};
MediaPlayer.dependencies.PlaybackController = function() {
"use strict";
var WALLCLOCK_TIME_UPDATE_INTERVAL = 1e3, currentTime = 0, liveStartTime = NaN, wallclockTimeIntervalId = null, commonEarliestTime = {}, firstAppended = {}, streamInfo, videoModel, isDynamic, liveDelayFragmentCount = NaN, useSuggestedPresentationDelay, getStreamStartTime = function(streamInfo) {
var presentationStartTime, startTimeOffset = parseInt(this.uriQueryFragModel.getURIFragmentData().s);
if (isDynamic) {
if (!isNaN(startTimeOffset) && startTimeOffset > 1262304e3) {
presentationStartTime = startTimeOffset - streamInfo.manifestInfo.availableFrom.getTime() / 1e3;
if (presentationStartTime > liveStartTime || presentationStartTime < liveStartTime - streamInfo.manifestInfo.DVRWindowSize) {
presentationStartTime = null;
}
}
presentationStartTime = presentationStartTime || liveStartTime;
} else {
if (!isNaN(startTimeOffset) && startTimeOffset < streamInfo.duration && startTimeOffset >= 0) {
presentationStartTime = startTimeOffset;
} else {
presentationStartTime = streamInfo.start;
}
}
return presentationStartTime;
}, getActualPresentationTime = function(currentTime) {
var self = this, metrics = self.metricsModel.getReadOnlyMetricsFor("video") || self.metricsModel.getReadOnlyMetricsFor("audio"), DVRMetrics = self.metricsExt.getCurrentDVRInfo(metrics), DVRWindow = DVRMetrics ? DVRMetrics.range : null, actualTime;
if (!DVRWindow) return NaN;
if (currentTime >= DVRWindow.start && currentTime <= DVRWindow.end) {
return currentTime;
}
actualTime = Math.max(DVRWindow.end - streamInfo.manifestInfo.minBufferTime * 2, DVRWindow.start);
return actualTime;
}, startUpdatingWallclockTime = function() {
if (wallclockTimeIntervalId !== null) return;
var self = this, tick = function() {
onWallclockTime.call(self);
};
wallclockTimeIntervalId = setInterval(tick, WALLCLOCK_TIME_UPDATE_INTERVAL);
}, stopUpdatingWallclockTime = function() {
clearInterval(wallclockTimeIntervalId);
wallclockTimeIntervalId = null;
}, initialStart = function() {
if (firstAppended[streamInfo.id] || this.isSeeking()) return;
var initialSeekTime = getStreamStartTime.call(this, streamInfo);
this.log("Starting playback at offset: " + initialSeekTime);
this.seek(initialSeekTime);
}, updateCurrentTime = function() {
if (this.isPaused() || !isDynamic || videoModel.getElement().readyState === 0) return;
var currentTime = this.getTime(), actualTime = getActualPresentationTime.call(this, currentTime), timeChanged = !isNaN(actualTime) && actualTime !== currentTime;
if (timeChanged) {
this.seek(actualTime);
}
}, onDataUpdateCompleted = function(e) {
if (e.error) return;
var track = this.adapter.convertDataToTrack(this.manifestModel.getValue(), e.data.currentRepresentation), info = track.mediaInfo.streamInfo;
if (streamInfo.id !== info.id) return;
streamInfo = track.mediaInfo.streamInfo;
updateCurrentTime.call(this);
}, onLiveEdgeSearchCompleted = function(e) {
if (e.error || videoModel.getElement().readyState === 0) return;
initialStart.call(this);
}, removeAllListeners = function() {
if (!videoModel) return;
videoModel.unlisten("play", onPlaybackStart);
videoModel.unlisten("playing", onPlaybackPlaying);
videoModel.unlisten("pause", onPlaybackPaused);
videoModel.unlisten("error", onPlaybackError);
videoModel.unlisten("seeking", onPlaybackSeeking);
videoModel.unlisten("seeked", onPlaybackSeeked);
videoModel.unlisten("timeupdate", onPlaybackTimeUpdated);
videoModel.unlisten("progress", onPlaybackProgress);
videoModel.unlisten("ratechange", onPlaybackRateChanged);
videoModel.unlisten("loadedmetadata", onPlaybackMetaDataLoaded);
videoModel.unlisten("ended", onPlaybackEnded);
}, onCanPlay = function() {
this.notify(MediaPlayer.dependencies.PlaybackController.eventList.ENAME_CAN_PLAY);
}, onPlaybackStart = function() {
this.log("<video> play");
updateCurrentTime.call(this);
startUpdatingWallclockTime.call(this);
this.notify(MediaPlayer.dependencies.PlaybackController.eventList.ENAME_PLAYBACK_STARTED, {
startTime: this.getTime()
});
}, onPlaybackPlaying = function() {
this.log("<video> playing");
this.notify(MediaPlayer.dependencies.PlaybackController.eventList.ENAME_PLAYBACK_PLAYING, {
playingTime: this.getTime()
});
}, onPlaybackPaused = function() {
this.log("<video> pause");
this.notify(MediaPlayer.dependencies.PlaybackController.eventList.ENAME_PLAYBACK_PAUSED);
}, onPlaybackSeeking = function() {
this.log("<video> seek");
startUpdatingWallclockTime.call(this);
this.notify(MediaPlayer.dependencies.PlaybackController.eventList.ENAME_PLAYBACK_SEEKING, {
seekTime: this.getTime()
});
}, onPlaybackSeeked = function() {
this.log("<video> seeked");
this.notify(MediaPlayer.dependencies.PlaybackController.eventList.ENAME_PLAYBACK_SEEKED);
}, onPlaybackTimeUpdated = function() {
var time = this.getTime();
if (time === currentTime) return;
currentTime = time;
this.notify(MediaPlayer.dependencies.PlaybackController.eventList.ENAME_PLAYBACK_TIME_UPDATED, {
timeToEnd: this.getTimeToStreamEnd()
});
}, onPlaybackProgress = function() {
var ranges = videoModel.getElement().buffered, lastRange, bufferEndTime, remainingUnbufferedDuration;
if (ranges.length) {
lastRange = ranges.length - 1;
bufferEndTime = ranges.end(lastRange);
remainingUnbufferedDuration = getStreamStartTime.call(this, streamInfo) + streamInfo.duration - bufferEndTime;
}
this.notify(MediaPlayer.dependencies.PlaybackController.eventList.ENAME_PLAYBACK_PROGRESS, {
bufferedRanges: videoModel.getElement().buffered,
remainingUnbufferedDuration: remainingUnbufferedDuration
});
}, onPlaybackRateChanged = function() {
this.log("<video> ratechange: ", this.getPlaybackRate());
this.notify(MediaPlayer.dependencies.PlaybackController.eventList.ENAME_PLAYBACK_RATE_CHANGED);
}, onPlaybackMetaDataLoaded = function() {
this.log("<video> loadedmetadata");
if (!isDynamic || this.timelineConverter.isTimeSyncCompleted()) {
initialStart.call(this);
}
this.notify(MediaPlayer.dependencies.PlaybackController.eventList.ENAME_PLAYBACK_METADATA_LOADED);
startUpdatingWallclockTime.call(this);
}, onPlaybackEnded = function() {
this.log("<video> ended");
stopUpdatingWallclockTime.call(this);
this.notify(MediaPlayer.dependencies.PlaybackController.eventList.ENAME_PLAYBACK_ENDED);
}, onPlaybackError = function(event) {
this.notify(MediaPlayer.dependencies.PlaybackController.eventList.ENAME_PLAYBACK_ERROR, {
error: event.srcElement.error
});
}, onWallclockTime = function() {
this.notify(MediaPlayer.dependencies.PlaybackController.eventList.ENAME_WALLCLOCK_TIME_UPDATED, {
isDynamic: isDynamic,
time: new Date()
});
}, onBytesAppended = function(e) {
var bufferedStart, ranges = e.data.bufferedRanges, id = streamInfo.id, time = this.getTime(), type = e.sender.streamProcessor.getType(), stream = this.system.getObject("streamController").getStreamById(streamInfo.id), currentEarliestTime = commonEarliestTime[id];
if (e.data.index === 0) {
firstAppended[id] = firstAppended[id] || {};
firstAppended[id][type] = true;
firstAppended.ready = !(stream.hasMedia("audio") && !firstAppended[id].audio || stream.hasMedia("video") && !firstAppended[id].video);
}
if (!ranges || !ranges.length) return;
bufferedStart = Math.max(ranges.start(0), streamInfo.start);
commonEarliestTime[id] = commonEarliestTime[id] === undefined ? bufferedStart : Math.max(commonEarliestTime[id], bufferedStart);
if (currentEarliestTime === commonEarliestTime[id] && time === currentEarliestTime || !firstAppended.ready || time > commonEarliestTime[id]) return;
this.seek(commonEarliestTime[id]);
}, onBufferLevelStateChanged = function(e) {
var type = e.sender.streamProcessor.getType(), senderStreamInfo = e.sender.streamProcessor.getStreamInfo();
if (senderStreamInfo.id !== streamInfo.id) return;
videoModel.setStallState(type, !e.data.hasSufficientBuffer);
}, setupVideoModel = function() {
videoModel.listen("canplay", onCanPlay);
videoModel.listen("play", onPlaybackStart);
videoModel.listen("playing", onPlaybackPlaying);
videoModel.listen("pause", onPlaybackPaused);
videoModel.listen("error", onPlaybackError);
videoModel.listen("seeking", onPlaybackSeeking);
videoModel.listen("seeked", onPlaybackSeeked);
videoModel.listen("timeupdate", onPlaybackTimeUpdated);
videoModel.listen("progress", onPlaybackProgress);
videoModel.listen("ratechange", onPlaybackRateChanged);
videoModel.listen("loadedmetadata", onPlaybackMetaDataLoaded);
videoModel.listen("ended", onPlaybackEnded);
};
return {
system: undefined,
log: undefined,
timelineConverter: undefined,
uriQueryFragModel: undefined,
metricsModel: undefined,
metricsExt: undefined,
manifestModel: undefined,
manifestExt: undefined,
videoModel: undefined,
notify: undefined,
subscribe: undefined,
unsubscribe: undefined,
adapter: undefined,
setup: function() {
this[Dash.dependencies.RepresentationController.eventList.ENAME_DATA_UPDATE_COMPLETED] = onDataUpdateCompleted;
this[MediaPlayer.dependencies.LiveEdgeFinder.eventList.ENAME_LIVE_EDGE_SEARCH_COMPLETED] = onLiveEdgeSearchCompleted;
this[MediaPlayer.dependencies.BufferController.eventList.ENAME_BYTES_APPENDED] = onBytesAppended;
this[MediaPlayer.dependencies.BufferController.eventList.ENAME_BUFFER_LEVEL_STATE_CHANGED] = onBufferLevelStateChanged;
onCanPlay = onCanPlay.bind(this);
onPlaybackStart = onPlaybackStart.bind(this);
onPlaybackPlaying = onPlaybackPlaying.bind(this);
onPlaybackPaused = onPlaybackPaused.bind(this);
onPlaybackError = onPlaybackError.bind(this);
onPlaybackSeeking = onPlaybackSeeking.bind(this);
onPlaybackSeeked = onPlaybackSeeked.bind(this);
onPlaybackTimeUpdated = onPlaybackTimeUpdated.bind(this);
onPlaybackProgress = onPlaybackProgress.bind(this);
onPlaybackRateChanged = onPlaybackRateChanged.bind(this);
onPlaybackMetaDataLoaded = onPlaybackMetaDataLoaded.bind(this);
onPlaybackEnded = onPlaybackEnded.bind(this);
},
initialize: function(streamInfoValue) {
videoModel = this.videoModel;
streamInfo = streamInfoValue;
commonEarliestTime = {};
removeAllListeners.call(this);
setupVideoModel.call(this);
isDynamic = streamInfo.manifestInfo.isDynamic;
liveStartTime = streamInfoValue.start;
},
getStreamStartTime: getStreamStartTime,
getTimeToStreamEnd: function() {
var currentTime = videoModel.getCurrentTime();
return getStreamStartTime.call(this, streamInfo) + streamInfo.duration - currentTime;
},
getStreamId: function() {
return streamInfo.id;
},
getStreamDuration: function() {
return streamInfo.duration;
},
getTime: function() {
return videoModel.getCurrentTime();
},
getPlaybackRate: function() {
return videoModel.getPlaybackRate();
},
getPlayedRanges: function() {
return videoModel.getElement().played;
},
setLiveStartTime: function(value) {
liveStartTime = value;
},
getLiveStartTime: function() {
return liveStartTime;
},
setLiveDelayAttributes: function(count, useSPD) {
liveDelayFragmentCount = count;
useSuggestedPresentationDelay = useSPD;
},
getLiveDelay: function(fragmentDuration) {
var delay, mpd = this.manifestExt.getMpd(this.manifestModel.getValue());
if (useSuggestedPresentationDelay && mpd.hasOwnProperty("suggestedPresentationDelay")) {
delay = mpd.suggestedPresentationDelay;
} else if (!isNaN(fragmentDuration)) {
delay = fragmentDuration * liveDelayFragmentCount;
} else {
delay = streamInfo.manifestInfo.minBufferTime * 2;
}
return delay;
},
start: function() {
videoModel.play();
},
isPaused: function() {
return videoModel.isPaused();
},
pause: function() {
if (videoModel) {
videoModel.pause();
}
},
isSeeking: function() {
return videoModel.getElement().seeking;
},
seek: function(time) {
if (!videoModel || time === this.getTime()) return;
this.log("Do seek: " + time);
videoModel.setCurrentTime(time);
},
reset: function() {
stopUpdatingWallclockTime.call(this);
removeAllListeners.call(this);
videoModel = null;
streamInfo = null;
currentTime = 0;
liveStartTime = NaN;
commonEarliestTime = {};
firstAppended = {};
isDynamic = undefined;
useSuggestedPresentationDelay = undefined;
liveDelayFragmentCount = NaN;
}
};
};
MediaPlayer.dependencies.PlaybackController.prototype = {
constructor: MediaPlayer.dependencies.PlaybackController
};
MediaPlayer.dependencies.PlaybackController.eventList = {
ENAME_CAN_PLAY: "canPlay",
ENAME_PLAYBACK_STARTED: "playbackStarted",
ENAME_PLAYBACK_PLAYING: "playbackPlaying",
ENAME_PLAYBACK_STOPPED: "playbackStopped",
ENAME_PLAYBACK_PAUSED: "playbackPaused",
ENAME_PLAYBACK_ENDED: "playbackEnded",
ENAME_PLAYBACK_SEEKING: "playbackSeeking",
ENAME_PLAYBACK_SEEKED: "playbackSeeked",
ENAME_PLAYBACK_TIME_UPDATED: "playbackTimeUpdated",
ENAME_PLAYBACK_PROGRESS: "playbackProgress",
ENAME_PLAYBACK_RATE_CHANGED: "playbackRateChanged",
ENAME_PLAYBACK_METADATA_LOADED: "playbackMetaDataLoaded",
ENAME_PLAYBACK_ERROR: "playbackError",
ENAME_WALLCLOCK_TIME_UPDATED: "wallclockTimeUpdated"
};
MediaPlayer.dependencies.ProtectionController = function() {
"use strict";
var keySystems = null, pendingNeedKeyData = [], pendingLicenseRequests = [], audioInfo, videoInfo, protDataSet, getProtData = function(keySystem) {
var protData = null, keySystemString = keySystem.systemString;
if (protDataSet) {
protData = keySystemString in protDataSet ? protDataSet[keySystemString] : null;
}
return protData;
}, onKeyMessage = function(e) {
if (e.error) {
this.log(e.error);
} else {
var keyMessageEvent = e.data;
pendingLicenseRequests.push(keyMessageEvent.sessionToken);
this.protectionExt.requestLicense(this.keySystem, getProtData(this.keySystem), keyMessageEvent.message, keyMessageEvent.defaultURL, keyMessageEvent.sessionToken);
}
}, onLicenseRequestComplete = function(e) {
var i, sessionToken = e.error ? e.data : e.data.requestData;
for (i = 0; i < pendingLicenseRequests.length; i++) {
if (pendingLicenseRequests[i] === sessionToken) {
pendingLicenseRequests.splice(i, 1);
if (!e.error) {
this.log("DRM: License request successful. Session ID = " + e.data.requestData.getSessionID());
this.updateKeySession(sessionToken, e.data.message);
} else {
this.log("DRM: License request failed! -- " + e.error);
}
break;
}
}
}, onKeySystemSelected = function() {
if (!this.keySystem) {
this.keySystem = this.protectionModel.keySystem;
this.protectionExt.subscribe(MediaPlayer.dependencies.protection.KeySystem.eventList.ENAME_LICENSE_REQUEST_COMPLETE, this);
}
for (var i = 0; i < pendingNeedKeyData.length; i++) {
this.createKeySession(pendingNeedKeyData[i]);
}
pendingNeedKeyData = [];
}, onNeedKey = function(event) {
if (event.data.initDataType !== "cenc") {
this.log("DRM: Only 'cenc' initData is supported! Ignoring initData of type: " + event.data.initDataType);
return;
}
var abInitData = event.data.initData;
if (ArrayBuffer.isView(abInitData)) {
abInitData = abInitData.buffer;
}
if (this.keySystem) {
this.createKeySession(abInitData);
} else if (this.keySystem === undefined) {
this.keySystem = null;
pendingNeedKeyData.push(abInitData);
try {
this.protectionExt.autoSelectKeySystem(this.protectionExt.getSupportedKeySystems(abInitData), this, videoInfo, audioInfo);
} catch (error) {
this.notify(MediaPlayer.dependencies.ProtectionController.eventList.ENAME_PROTECTION_ERROR, "DRM: Unable to select a key system from needkey initData. -- " + error.message);
}
} else {
pendingNeedKeyData.push(abInitData);
}
}, onKeySystemAccessComplete = function(event) {
if (!event.error) {
this.log("KeySystem Access Granted");
} else {
this.notify(MediaPlayer.dependencies.ProtectionController.eventList.ENAME_PROTECTION_ERROR, "DRM: KeySystem Access Denied! -- " + event.error);
}
}, onServerCertificateUpdated = function(event) {
if (!event.error) {
this.log("DRM: License server certificate successfully updated.");
} else {
this.notify(MediaPlayer.dependencies.ProtectionController.eventList.ENAME_PROTECTION_ERROR, "DRM: Failed to update license server certificate. -- " + event.error);
}
}, onKeySessionCreated = function(event) {
if (!event.error) {
this.log("DRM: Session created. SessionID = " + event.data.getSessionID());
} else {
this.notify(MediaPlayer.dependencies.ProtectionController.eventList.ENAME_PROTECTION_ERROR, "DRM: Failed to create key session. -- " + event.error);
}
}, onKeyAdded = function() {
this.log("DRM: Key added.");
}, onKeyError = function(event) {
this.notify(MediaPlayer.dependencies.ProtectionController.eventList.ENAME_PROTECTION_ERROR, "DRM: MediaKeyError - sessionId: " + event.data.sessionToken.getSessionID() + ". " + event.data.error);
}, onKeySessionClosed = function(event) {
if (!event.error) {
this.log("DRM: Session closed. SessionID = " + event.data);
} else {
this.notify(MediaPlayer.dependencies.ProtectionController.eventList.ENAME_PROTECTION_ERROR, "DRM Failed to close key session. -- " + event.error);
}
}, onKeySessionRemoved = function(event) {
if (!event.error) {
this.log("DRM: Session removed. SessionID = " + event.data);
} else {
this.notify(MediaPlayer.dependencies.ProtectionController.eventList.ENAME_PROTECTION_ERROR, "DRM: Failed to remove key session. -- " + event.error);
}
};
return {
system: undefined,
log: undefined,
notify: undefined,
subscribe: undefined,
unsubscribe: undefined,
protectionExt: undefined,
keySystem: undefined,
sessionType: "temporary",
setup: function() {
this[MediaPlayer.models.ProtectionModel.eventList.ENAME_KEY_MESSAGE] = onKeyMessage.bind(this);
this[MediaPlayer.models.ProtectionModel.eventList.ENAME_KEY_SYSTEM_SELECTED] = onKeySystemSelected.bind(this);
this[MediaPlayer.models.ProtectionModel.eventList.ENAME_KEY_SYSTEM_ACCESS_COMPLETE] = onKeySystemAccessComplete.bind(this);
this[MediaPlayer.models.ProtectionModel.eventList.ENAME_NEED_KEY] = onNeedKey.bind(this);
this[MediaPlayer.models.ProtectionModel.eventList.ENAME_SERVER_CERTIFICATE_UPDATED] = onServerCertificateUpdated.bind(this);
this[MediaPlayer.models.ProtectionModel.eventList.ENAME_KEY_ADDED] = onKeyAdded.bind(this);
this[MediaPlayer.models.ProtectionModel.eventList.ENAME_KEY_ERROR] = onKeyError.bind(this);
this[MediaPlayer.models.ProtectionModel.eventList.ENAME_KEY_SESSION_CREATED] = onKeySessionCreated.bind(this);
this[MediaPlayer.models.ProtectionModel.eventList.ENAME_KEY_SESSION_CLOSED] = onKeySessionClosed.bind(this);
this[MediaPlayer.models.ProtectionModel.eventList.ENAME_KEY_SESSION_REMOVED] = onKeySessionRemoved.bind(this);
this[MediaPlayer.dependencies.protection.KeySystem.eventList.ENAME_LICENSE_REQUEST_COMPLETE] = onLicenseRequestComplete.bind(this);
keySystems = this.protectionExt.getKeySystems();
this.protectionModel = this.system.getObject("protectionModel");
this.protectionModel.init();
},
init: function(manifest, aInfo, vInfo) {
this.protectionModel.subscribe(MediaPlayer.models.ProtectionModel.eventList.ENAME_SERVER_CERTIFICATE_UPDATED, this);
this.protectionModel.subscribe(MediaPlayer.models.ProtectionModel.eventList.ENAME_KEY_ADDED, this);
this.protectionModel.subscribe(MediaPlayer.models.ProtectionModel.eventList.ENAME_KEY_ERROR, this);
this.protectionModel.subscribe(MediaPlayer.models.ProtectionModel.eventList.ENAME_KEY_SESSION_CREATED, this);
this.protectionModel.subscribe(MediaPlayer.models.ProtectionModel.eventList.ENAME_KEY_SESSION_CLOSED, this);
this.protectionModel.subscribe(MediaPlayer.models.ProtectionModel.eventList.ENAME_KEY_SESSION_REMOVED, this);
this.protectionModel.subscribe(MediaPlayer.models.ProtectionModel.eventList.ENAME_KEY_MESSAGE, this);
var adapter, streamInfo;
if (!aInfo && !vInfo) {
adapter = this.system.getObject("adapter");
streamInfo = adapter.getStreamsInfo(manifest)[0];
}
audioInfo = aInfo || (streamInfo ? adapter.getMediaInfoForType(manifest, streamInfo, "audio") : null);
videoInfo = vInfo || (streamInfo ? adapter.getMediaInfoForType(manifest, streamInfo, "video") : null);
var mediaInfo = videoInfo ? videoInfo : audioInfo;
var self = this;
var useNeedKey = function() {
self.protectionModel.subscribe(MediaPlayer.models.ProtectionModel.eventList.ENAME_NEED_KEY, self);
self.protectionModel.subscribe(MediaPlayer.models.ProtectionModel.eventList.ENAME_KEY_SYSTEM_SELECTED, self);
self.protectionModel.subscribe(MediaPlayer.models.ProtectionModel.eventList.ENAME_KEY_SYSTEM_ACCESS_COMPLETE, self);
};
var supportedKS = this.protectionExt.getSupportedKeySystemsFromContentProtection(mediaInfo.contentProtection);
if (supportedKS && supportedKS.length > 0) {
var ksSelected = {};
ksSelected[MediaPlayer.models.ProtectionModel.eventList.ENAME_KEY_SYSTEM_ACCESS_COMPLETE] = function(event) {
if (event.error) {
self.log("DRM: Could not select key system from ContentProtection elements! Falling back to needkey mechanism...");
useNeedKey();
self.protectionModel.unsubscribe(MediaPlayer.models.ProtectionModel.eventList.ENAME_KEY_SYSTEM_SELECTED, ksSelected);
}
};
ksSelected[MediaPlayer.models.ProtectionModel.eventList.ENAME_KEY_SYSTEM_SELECTED] = function(event) {
if (!event.error) {
self.keySystem = self.protectionModel.keySystem;
self.protectionExt.subscribe(MediaPlayer.dependencies.protection.KeySystem.eventList.ENAME_LICENSE_REQUEST_COMPLETE, self);
for (var ksIdx = 0; ksIdx < supportedKS.length; ksIdx++) {
if (self.keySystem === supportedKS[ksIdx].ks) {
self.createKeySession(supportedKS[ksIdx].initData);
break;
}
}
} else {
self.log("DRM: Could not select key system from ContentProtection elements! Falling back to needkey mechanism...");
useNeedKey();
}
};
this.protectionModel.subscribe(MediaPlayer.models.ProtectionModel.eventList.ENAME_KEY_SYSTEM_SELECTED, ksSelected, undefined, true);
this.protectionModel.subscribe(MediaPlayer.models.ProtectionModel.eventList.ENAME_KEY_SYSTEM_ACCESS_COMPLETE, ksSelected, undefined, true);
this.protectionExt.autoSelectKeySystem(supportedKS, this, videoInfo, audioInfo);
} else {
useNeedKey();
}
},
teardown: function() {
this.protectionModel.unsubscribe(MediaPlayer.models.ProtectionModel.eventList.ENAME_KEY_MESSAGE, this);
this.protectionModel.unsubscribe(MediaPlayer.models.ProtectionModel.eventList.ENAME_KEY_SYSTEM_SELECTED, this);
if (this.keySystem) {
this.protectionExt.unsubscribe(MediaPlayer.dependencies.protection.KeySystem.eventList.ENAME_LICENSE_REQUEST_COMPLETE, this);
}
this.protectionModel.unsubscribe(MediaPlayer.models.ProtectionModel.eventList.ENAME_SERVER_CERTIFICATE_UPDATED, this);
this.protectionModel.unsubscribe(MediaPlayer.models.ProtectionModel.eventList.ENAME_KEY_ADDED, this);
this.protectionModel.unsubscribe(MediaPlayer.models.ProtectionModel.eventList.ENAME_KEY_ERROR, this);
this.protectionModel.unsubscribe(MediaPlayer.models.ProtectionModel.eventList.ENAME_KEY_SESSION_CREATED, this);
this.protectionModel.unsubscribe(MediaPlayer.models.ProtectionModel.eventList.ENAME_KEY_SESSION_CLOSED, this);
this.protectionModel.unsubscribe(MediaPlayer.models.ProtectionModel.eventList.ENAME_KEY_SESSION_REMOVED, this);
this.protectionModel.unsubscribe(MediaPlayer.models.ProtectionModel.eventList.ENAME_KEY_SYSTEM_ACCESS_COMPLETE, this);
this.keySystem = undefined;
this.protectionModel.teardown();
this.protectionModel = undefined;
},
requestKeySystemAccess: function(ksConfiguration) {
this.protectionModel.requestKeySystemAccess(ksConfiguration);
},
selectKeySystem: function(keySystemAccess) {
if (this.keySystem) {
throw new Error("DRM: KeySystem already selected!");
}
this.protectionModel.selectKeySystem(keySystemAccess);
},
createKeySession: function(initData) {
var initDataForKS = MediaPlayer.dependencies.protection.CommonEncryption.getPSSHForKeySystem(this.keySystem, initData);
if (initDataForKS) {
try {
this.protectionModel.createKeySession(initDataForKS, this.sessionType);
} catch (error) {
this.notify(MediaPlayer.dependencies.ProtectionController.eventList.ENAME_PROTECTION_ERROR, "Error creating key session! " + error.message);
}
} else {
this.log("Selected key system is " + this.keySystem.systemString + ". needkey/encrypted event contains no initData corresponding to that key system!");
}
},
updateKeySession: function(sessionToken, message) {
this.protectionModel.updateKeySession(sessionToken, message);
},
loadKeySession: function(sessionID) {
this.protectionModel.loadKeySession(sessionID);
},
removeKeySession: function(sessionToken) {
this.protectionModel.removeKeySession(sessionToken);
},
closeKeySession: function(sessionToken) {
this.protectionModel.closeKeySession(sessionToken);
},
setServerCertificate: function(serverCertificate) {
this.protectionModel.setServerCertificate(serverCertificate);
},
setMediaElement: function(element) {
this.protectionModel.setMediaElement(element);
},
setSessionType: function(sessionType) {
this.sessionType = sessionType;
},
setProtectionData: function(data) {
protDataSet = data;
}
};
};
MediaPlayer.dependencies.ProtectionController.eventList = {
ENAME_PROTECTION_ERROR: "protectionError"
};
MediaPlayer.dependencies.ProtectionController.prototype = {
constructor: MediaPlayer.dependencies.ProtectionController
};
MediaPlayer.dependencies.ScheduleController = function() {
"use strict";
var fragmentsToLoad = 0, type, ready, fragmentModel, isDynamic, currentTrackInfo, initialPlayback = true, lastValidationTime = null, isStopped = false, playListMetrics = null, playListTraceMetrics = null, playListTraceMetricsClosed = true, clearPlayListTraceMetrics = function(endTime, stopreason) {
var duration = 0, startTime = null;
if (playListTraceMetricsClosed === false) {
startTime = playListTraceMetrics.start;
duration = endTime.getTime() - startTime.getTime();
playListTraceMetrics.duration = duration;
playListTraceMetrics.stopreason = stopreason;
playListTraceMetricsClosed = true;
}
}, doStart = function() {
if (!ready) return;
isStopped = false;
if (initialPlayback) {
initialPlayback = false;
}
this.log("start");
validate.call(this);
}, startOnReady = function() {
if (initialPlayback) {
getInitRequest.call(this, currentTrackInfo.quality);
addPlaylistMetrics.call(this, MediaPlayer.vo.metrics.PlayList.INITIAL_PLAY_START_REASON);
}
doStart.call(this);
}, doStop = function(cancelPending) {
if (isStopped) return;
isStopped = true;
this.log("stop");
if (cancelPending) {
fragmentModel.cancelPendingRequests();
}
clearPlayListTraceMetrics(new Date(), MediaPlayer.vo.metrics.PlayList.Trace.USER_REQUEST_STOP_REASON);
}, getNextFragment = function(callback) {
var self = this, rules = self.scheduleRulesCollection.getRules(MediaPlayer.rules.ScheduleRulesCollection.prototype.NEXT_FRAGMENT_RULES);
self.rulesController.applyRules(rules, self.streamProcessor, callback, null, function(currentValue, newValue) {
return newValue;
});
}, getInitRequest = function(quality) {
var self = this, request;
request = self.adapter.getInitRequest(self.streamProcessor, quality);
if (request !== null) {
self.fragmentController.prepareFragmentForLoading(fragmentModel, request);
}
return request;
}, getRequiredFragmentCount = function(callback) {
var self = this, rules = self.scheduleRulesCollection.getRules(MediaPlayer.rules.ScheduleRulesCollection.prototype.FRAGMENTS_TO_SCHEDULE_RULES);
self.rulesController.applyRules(rules, self.streamProcessor, callback, fragmentsToLoad, function(currentValue, newValue) {
currentValue = currentValue === MediaPlayer.rules.SwitchRequest.prototype.NO_CHANGE ? 0 : currentValue;
return Math.max(currentValue, newValue);
});
}, replaceCanceledRequests = function(canceledRequests) {
var ln = canceledRequests.length, EPSILON = .1, request, time, i;
for (i = 0; i < ln; i += 1) {
request = canceledRequests[i];
time = request.startTime + request.duration / 2 + EPSILON;
request = this.adapter.getFragmentRequestForTime(this.streamProcessor, currentTrackInfo, time, {
timeThreshold: 0,
ignoreIsFinished: true
});
this.fragmentController.prepareFragmentForLoading(fragmentModel, request);
}
}, onGetRequiredFragmentCount = function(result) {
var self = this;
fragmentsToLoad = result.value;
if (fragmentsToLoad <= 0) {
self.fragmentController.executePendingRequests();
return;
}
getNextFragment.call(self, onNextFragment.bind(self));
}, onNextFragment = function(result) {
var request = result.value;
if (request !== null && !(request instanceof MediaPlayer.vo.FragmentRequest)) {
request = this.adapter.getFragmentRequestForTime(this.streamProcessor, currentTrackInfo, request.startTime);
}
if (request) {
fragmentsToLoad--;
this.fragmentController.prepareFragmentForLoading(fragmentModel, request);
} else {
this.fragmentController.executePendingRequests();
}
}, validate = function() {
var now = new Date().getTime(), isEnoughTimeSinceLastValidation = lastValidationTime ? now - lastValidationTime > fragmentModel.getLoadingTime() : true;
this.abrController.getPlaybackQuality(this.streamProcessor);
if (!isEnoughTimeSinceLastValidation || isStopped || this.playbackController.isPaused() && this.playbackController.getPlayedRanges().length > 0 && (!this.scheduleWhilePaused || isDynamic)) return;
lastValidationTime = now;
getRequiredFragmentCount.call(this, onGetRequiredFragmentCount.bind(this));
}, onDataUpdateCompleted = function(e) {
if (e.error) return;
currentTrackInfo = this.adapter.convertDataToTrack(this.manifestModel.getValue(), e.data.currentRepresentation);
}, onStreamUpdated = function(e) {
if (e.error) return;
currentTrackInfo = this.streamProcessor.getCurrentTrack();
if (!isDynamic || this.liveEdgeFinder.getLiveEdge() !== null) {
ready = true;
}
if (ready) {
startOnReady.call(this);
}
}, onStreamCompleted = function(e) {
if (e.data.fragmentModel !== this.streamProcessor.getFragmentModel()) return;
this.log("Stream is complete");
clearPlayListTraceMetrics(new Date(), MediaPlayer.vo.metrics.PlayList.Trace.END_OF_CONTENT_STOP_REASON);
}, onMediaFragmentLoadingStart = function(e) {
var self = this;
if (e.data.fragmentModel !== self.streamProcessor.getFragmentModel()) return;
validate.call(self);
}, onFragmentLoadingCompleted = function(e) {
if (!e.error) return;
doStop.call(this);
}, onBytesAppended = function() {
addPlaylistTraceMetrics.call(this);
}, onDataUpdateStarted = function() {
doStop.call(this, false);
}, onInitRequested = function(e) {
getInitRequest.call(this, e.data.requiredQuality);
}, onBufferCleared = function(e) {
fragmentModel.removeExecutedRequestsBeforeTime(e.data.to);
if (e.data.hasEnoughSpaceToAppend) {
doStart.call(this);
}
}, onBufferLevelStateChanged = function(e) {
var self = this;
if (!e.data.hasSufficientBuffer && !self.playbackController.isSeeking()) {
self.log("Stalling Buffer");
clearPlayListTraceMetrics(new Date(), MediaPlayer.vo.metrics.PlayList.Trace.REBUFFERING_REASON);
}
}, onBufferLevelUpdated = function() {
validate.call(this);
}, onQuotaExceeded = function() {
doStop.call(this, false);
}, onQualityChanged = function(e) {
if (type !== e.data.mediaType || this.streamProcessor.getStreamInfo().id !== e.data.streamInfo.id) return;
var self = this, canceledReqs;
canceledReqs = fragmentModel.cancelPendingRequests(e.data.oldQuality);
currentTrackInfo = self.streamProcessor.getTrackForQuality(e.data.newQuality);
if (currentTrackInfo === null || currentTrackInfo === undefined) {
throw "Unexpected error!";
}
replaceCanceledRequests.call(self, canceledReqs);
clearPlayListTraceMetrics(new Date(), MediaPlayer.vo.metrics.PlayList.Trace.REPRESENTATION_SWITCH_STOP_REASON);
}, addPlaylistMetrics = function(stopReason) {
var currentTime = new Date(), presentationTime = this.playbackController.getTime();
clearPlayListTraceMetrics(currentTime, MediaPlayer.vo.metrics.PlayList.Trace.USER_REQUEST_STOP_REASON);
playListMetrics = this.metricsModel.addPlayList(type, currentTime, presentationTime, stopReason);
}, addPlaylistTraceMetrics = function() {
var self = this, currentVideoTime = self.playbackController.getTime(), rate = self.playbackController.getPlaybackRate(), currentTime = new Date();
if (playListTraceMetricsClosed === true && currentTrackInfo && playListMetrics) {
playListTraceMetricsClosed = false;
playListTraceMetrics = self.metricsModel.appendPlayListTrace(playListMetrics, currentTrackInfo.id, null, currentTime, currentVideoTime, null, rate, null);
}
}, onClosedCaptioningRequested = function(e) {
var self = this, req = getInitRequest.call(self, e.data.CCIndex);
fragmentModel.executeRequest(req);
}, onPlaybackStarted = function() {
doStart.call(this);
}, onPlaybackSeeking = function(e) {
if (!initialPlayback) {
fragmentModel.cancelPendingRequests();
}
var metrics = this.metricsModel.getMetricsFor("stream"), manifestUpdateInfo = this.metricsExt.getCurrentManifestUpdate(metrics);
this.log("seek: " + e.data.seekTime);
addPlaylistMetrics.call(this, MediaPlayer.vo.metrics.PlayList.SEEK_START_REASON);
this.metricsModel.updateManifestUpdateInfo(manifestUpdateInfo, {
latency: currentTrackInfo.DVRWindow.end - this.playbackController.getTime()
});
}, onPlaybackRateChanged = function() {
addPlaylistTraceMetrics.call(this);
}, onWallclockTimeUpdated = function() {
validate.call(this);
}, onLiveEdgeSearchCompleted = function(e) {
if (e.error) return;
var self = this, liveEdgeTime = e.data.liveEdge, manifestInfo = currentTrackInfo.mediaInfo.streamInfo.manifestInfo, startTime = liveEdgeTime - Math.min(self.playbackController.getLiveDelay(currentTrackInfo.fragmentDuration), manifestInfo.DVRWindowSize / 2), request, metrics = self.metricsModel.getMetricsFor("stream"), manifestUpdateInfo = self.metricsExt.getCurrentManifestUpdate(metrics), currentLiveStart = self.playbackController.getLiveStartTime(), actualStartTime;
request = self.adapter.getFragmentRequestForTime(self.streamProcessor, currentTrackInfo, startTime, {
ignoreIsFinished: true
});
actualStartTime = request.startTime;
if (isNaN(currentLiveStart) || actualStartTime > currentLiveStart) {
self.playbackController.setLiveStartTime(actualStartTime);
}
self.metricsModel.updateManifestUpdateInfo(manifestUpdateInfo, {
currentTime: actualStartTime,
presentationStartTime: liveEdgeTime,
latency: liveEdgeTime - actualStartTime,
clientTimeOffset: self.timelineConverter.getClientTimeOffset()
});
ready = true;
if (currentTrackInfo) {
startOnReady.call(self);
}
};
return {
log: undefined,
system: undefined,
metricsModel: undefined,
manifestModel: undefined,
metricsExt: undefined,
scheduleWhilePaused: undefined,
timelineConverter: undefined,
abrController: undefined,
playbackController: undefined,
adapter: undefined,
scheduleRulesCollection: undefined,
rulesController: undefined,
numOfParallelRequestAllowed: undefined,
setup: function() {
this[MediaPlayer.dependencies.LiveEdgeFinder.eventList.ENAME_LIVE_EDGE_SEARCH_COMPLETED] = onLiveEdgeSearchCompleted;
this[MediaPlayer.dependencies.AbrController.eventList.ENAME_QUALITY_CHANGED] = onQualityChanged;
this[Dash.dependencies.RepresentationController.eventList.ENAME_DATA_UPDATE_STARTED] = onDataUpdateStarted;
this[Dash.dependencies.RepresentationController.eventList.ENAME_DATA_UPDATE_COMPLETED] = onDataUpdateCompleted;
this[MediaPlayer.dependencies.Stream.eventList.ENAME_STREAM_UPDATED] = onStreamUpdated;
this[MediaPlayer.dependencies.FragmentController.eventList.ENAME_MEDIA_FRAGMENT_LOADING_START] = onMediaFragmentLoadingStart;
this[MediaPlayer.dependencies.FragmentModel.eventList.ENAME_FRAGMENT_LOADING_COMPLETED] = onFragmentLoadingCompleted;
this[MediaPlayer.dependencies.FragmentController.eventList.ENAME_STREAM_COMPLETED] = onStreamCompleted;
this[MediaPlayer.dependencies.BufferController.eventList.ENAME_BUFFER_CLEARED] = onBufferCleared;
this[MediaPlayer.dependencies.BufferController.eventList.ENAME_BYTES_APPENDED] = onBytesAppended;
this[MediaPlayer.dependencies.BufferController.eventList.ENAME_BUFFER_LEVEL_STATE_CHANGED] = onBufferLevelStateChanged;
this[MediaPlayer.dependencies.BufferController.eventList.ENAME_BUFFER_LEVEL_UPDATED] = onBufferLevelUpdated;
this[MediaPlayer.dependencies.BufferController.eventList.ENAME_INIT_REQUESTED] = onInitRequested;
this[MediaPlayer.dependencies.BufferController.eventList.ENAME_QUOTA_EXCEEDED] = onQuotaExceeded;
this[MediaPlayer.dependencies.TextController.eventList.ENAME_CLOSED_CAPTIONING_REQUESTED] = onClosedCaptioningRequested;
this[MediaPlayer.dependencies.PlaybackController.eventList.ENAME_PLAYBACK_STARTED] = onPlaybackStarted;
this[MediaPlayer.dependencies.PlaybackController.eventList.ENAME_PLAYBACK_SEEKING] = onPlaybackSeeking;
this[MediaPlayer.dependencies.PlaybackController.eventList.ENAME_PLAYBACK_RATE_CHANGED] = onPlaybackRateChanged;
this[MediaPlayer.dependencies.PlaybackController.eventList.ENAME_WALLCLOCK_TIME_UPDATED] = onWallclockTimeUpdated;
},
initialize: function(typeValue, streamProcessor) {
var self = this;
type = typeValue;
self.setMediaType(type);
self.streamProcessor = streamProcessor;
self.fragmentController = streamProcessor.fragmentController;
self.liveEdgeFinder = streamProcessor.liveEdgeFinder;
self.bufferController = streamProcessor.bufferController;
isDynamic = streamProcessor.isDynamic();
fragmentModel = this.fragmentController.getModel(this);
MediaPlayer.dependencies.ScheduleController.LOADING_REQUEST_THRESHOLD = self.numOfParallelRequestAllowed;
if (self.scheduleRulesCollection.bufferLevelRule) {
self.scheduleRulesCollection.bufferLevelRule.setScheduleController(self);
}
if (self.scheduleRulesCollection.pendingRequestsRule) {
self.scheduleRulesCollection.pendingRequestsRule.setScheduleController(self);
}
if (self.scheduleRulesCollection.playbackTimeRule) {
self.scheduleRulesCollection.playbackTimeRule.setScheduleController(self);
}
},
getFragmentModel: function() {
return fragmentModel;
},
getFragmentToLoadCount: function() {
return fragmentsToLoad;
},
replaceCanceledRequests: replaceCanceledRequests,
reset: function() {
var self = this;
doStop.call(self, true);
self.bufferController.unsubscribe(MediaPlayer.dependencies.BufferController.eventList.ENAME_BUFFER_LEVEL_OUTRUN, self.scheduleRulesCollection.bufferLevelRule);
self.bufferController.unsubscribe(MediaPlayer.dependencies.BufferController.eventList.ENAME_BUFFER_LEVEL_BALANCED, self.scheduleRulesCollection.bufferLevelRule);
fragmentModel.abortRequests();
self.fragmentController.detachModel(fragmentModel);
fragmentsToLoad = 0;
},
start: doStart,
stop: doStop
};
};
MediaPlayer.dependencies.ScheduleController.prototype = {
constructor: MediaPlayer.dependencies.ScheduleController
};
MediaPlayer.dependencies.ScheduleController.LOADING_REQUEST_THRESHOLD = 0;
MediaPlayer.dependencies.StreamController = function() {
"use strict";
var streams = [], activeStream, protectionController, protectionData, STREAM_END_THRESHOLD = .2, autoPlay = true, canPlay = false, isStreamSwitchingInProgress = false, isUpdating = false, hasMediaError = false, mediaSource, UTCTimingSources, useManifestDateHeaderTimeSource, attachEvents = function(stream) {
stream.subscribe(MediaPlayer.dependencies.Stream.eventList.ENAME_STREAM_UPDATED, this.liveEdgeFinder);
stream.subscribe(MediaPlayer.dependencies.Stream.eventList.ENAME_STREAM_BUFFERING_COMPLETED, this);
}, detachEvents = function(stream) {
stream.unsubscribe(MediaPlayer.dependencies.Stream.eventList.ENAME_STREAM_UPDATED, this.liveEdgeFinder);
stream.unsubscribe(MediaPlayer.dependencies.Stream.eventList.ENAME_STREAM_BUFFERING_COMPLETED, this);
}, fireSwitchEvent = function(stage, fromStream, toStream) {
this.eventBus.dispatchEvent({
type: stage,
data: {
fromStreamInfo: fromStream ? fromStream.getStreamInfo() : null,
toStreamInfo: toStream.getStreamInfo()
}
});
}, startAutoPlay = function() {
if (!activeStream || !activeStream.isActivated() || !canPlay) return;
if (activeStream.getStreamInfo().index === 0) {
activeStream.startEventController();
if (autoPlay) {
this.playbackController.start();
}
}
}, onCanPlay = function() {
canPlay = true;
startAutoPlay.call(this);
}, onError = function(e) {
try{
var code = e.data.error.code, msg = "";
if (code === -1) {
return;
}
switch (code) {
case 1:
msg = "MEDIA_ERR_ABORTED";
break;
case 2:
msg = "MEDIA_ERR_NETWORK";
break;
case 3:
msg = "MEDIA_ERR_DECODE";
break;
case 4:
{
msg = "MEDIA_ERR_SRC_NOT_SUPPORTED";
if( typeof Promise === "undefined" ){
// Fix for CPRIME-6831, for IE11, which does not support promises.
return;
}
}
break;
case 5:
msg = "MEDIA_ERR_ENCRYPTED";
break;
}
hasMediaError = true;
this.log("Video Element Error: " + msg);
this.log(e.error);
this.errHandler.mediaSourceError(msg);
this.reset();
}catch(e){
console.error("dash player onError" + e);
}
}, onTimeupdate = function(e) {
var self = this, playbackQuality = self.videoExt.getPlaybackQuality(self.videoModel.getElement());
if (playbackQuality) {
self.metricsModel.addDroppedFrames("video", playbackQuality);
}
if (self.playbackController.isSeeking()) return;
if (e.data.timeToEnd < STREAM_END_THRESHOLD) {
this.mediaSourceExt.signalEndOfStream(mediaSource);
}
}, onEnded = function() {
switchStream.call(this, activeStream, getNextStream());
}, onSeeking = function(e) {
var seekingStream = getStreamForTime(e.data.seekTime);
if (seekingStream && seekingStream !== activeStream) {
switchStream.call(this, activeStream, seekingStream, e.data.seekTime);
}
}, onStreamBufferingEnd = function(e) {
var nextStream = getNextStream(), isLast = e.data.streamInfo.isLast;
if (mediaSource && isLast) {
this.mediaSourceExt.signalEndOfStream(mediaSource);
}
if (!nextStream) return;
nextStream.activate(mediaSource);
}, getNextStream = function() {
var start = activeStream.getStreamInfo().start, duration = activeStream.getStreamInfo().duration;
return streams.filter(function(stream) {
return stream.getStreamInfo().start === start + duration;
})[0];
}, getStreamForTime = function(time) {
var duration = 0, stream = null, ln = streams.length;
if (ln > 0) {
duration += streams[0].getStartTime();
}
for (var i = 0; i < ln; i++) {
stream = streams[i];
duration += stream.getDuration();
if (time < duration) {
return stream;
}
}
return null;
}, switchStream = function(from, to, seekTo) {
if (isStreamSwitchingInProgress || !from || !to || from === to) return;
fireSwitchEvent.call(this, MediaPlayer.events.STREAM_SWITCH_STARTED, from, to);
isStreamSwitchingInProgress = true;
var self = this, onMediaSourceReady = function() {
if (seekTo !== undefined) {
self.playbackController.seek(seekTo);
}
self.playbackController.start();
activeStream.startEventController();
isStreamSwitchingInProgress = false;
fireSwitchEvent.call(self, MediaPlayer.events.STREAM_SWITCH_COMPLETED, from, to);
};
setTimeout(function() {
detachEvents.call(self, from);
from.deactivate();
activeStream = to;
attachEvents.call(self, to);
self.playbackController.initialize(activeStream.getStreamInfo());
setupMediaSource.call(self, onMediaSourceReady);
}, 0);
}, setupMediaSource = function(callback) {
var self = this, sourceUrl, onMediaSourceOpen = function(e) {
self.log("MediaSource is open!");
self.log(e);
window.URL.revokeObjectURL(sourceUrl);
mediaSource.removeEventListener("sourceopen", onMediaSourceOpen);
mediaSource.removeEventListener("webkitsourceopen", onMediaSourceOpen);
setMediaDuration.call(self);
activeStream.activate(mediaSource);
if (callback) {
callback();
}
};
if (!mediaSource) {
mediaSource = self.mediaSourceExt.createMediaSource();
} else {
self.mediaSourceExt.detachMediaSource(self.videoModel);
}
mediaSource.addEventListener("sourceopen", onMediaSourceOpen, false);
mediaSource.addEventListener("webkitsourceopen", onMediaSourceOpen, false);
sourceUrl = self.mediaSourceExt.attachMediaSource(mediaSource, self.videoModel);
}, setMediaDuration = function() {
var self = this, manifestDuration, mediaDuration;
manifestDuration = activeStream.getStreamInfo().manifestInfo.duration;
mediaDuration = self.mediaSourceExt.setDuration(mediaSource, manifestDuration);
self.log("Duration successfully set to: " + mediaDuration);
}, composeStreams = function() {
var self = this, manifest = self.manifestModel.getValue(), metrics = self.metricsModel.getMetricsFor("stream"), manifestUpdateInfo = self.metricsExt.getCurrentManifestUpdate(metrics), streamInfo, pLen, sLen, pIdx, sIdx, streamsInfo, remainingStreams = [], stream;
if (!manifest) return;
streamsInfo = self.adapter.getStreamsInfo(manifest);
try {
if (streamsInfo.length === 0) {
throw new Error("There are no streams");
}
self.metricsModel.updateManifestUpdateInfo(manifestUpdateInfo, {
currentTime: self.videoModel.getCurrentTime(),
buffered: self.videoModel.getElement().buffered,
presentationStartTime: streamsInfo[0].start,
clientTimeOffset: self.timelineConverter.getClientTimeOffset()
});
isUpdating = true;
for (pIdx = 0, pLen = streamsInfo.length; pIdx < pLen; pIdx += 1) {
streamInfo = streamsInfo[pIdx];
for (sIdx = 0, sLen = streams.length; sIdx < sLen; sIdx += 1) {
if (streams[sIdx].getId() === streamInfo.id) {
stream = streams[sIdx];
remainingStreams.push(stream);
stream.updateData(streamInfo);
}
}
if (!stream) {
stream = self.system.getObject("stream");
stream.initialize(streamInfo, protectionController, protectionData);
stream.subscribe(MediaPlayer.dependencies.Stream.eventList.ENAME_STREAM_UPDATED, self);
remainingStreams.push(stream);
if (activeStream) {
stream.updateData(streamInfo);
}
}
self.metricsModel.addManifestUpdateStreamInfo(manifestUpdateInfo, streamInfo.id, streamInfo.index, streamInfo.start, streamInfo.duration);
stream = null;
}
streams = remainingStreams;
if (!activeStream) {
activeStream = streams[0];
fireSwitchEvent.call(self, MediaPlayer.events.STREAM_SWITCH_STARTED, null, activeStream);
self.playbackController.initialize(activeStream.getStreamInfo());
attachEvents.call(self, activeStream);
fireSwitchEvent.call(self, MediaPlayer.events.STREAM_SWITCH_COMPLETED, null, activeStream);
}
if (!mediaSource) {
setupMediaSource.call(this);
}
isUpdating = false;
checkIfUpdateCompleted.call(self);
} catch (e) {
self.errHandler.manifestError(e.message, "nostreamscomposed", manifest);
self.reset();
}
}, checkIfUpdateCompleted = function() {
if (isUpdating) return;
var self = this, ln = streams.length, i = 0;
startAutoPlay.call(this);
for (i; i < ln; i += 1) {
if (!streams[i].isInitialized()) return;
}
self.notify(MediaPlayer.dependencies.StreamController.eventList.ENAME_STREAMS_COMPOSED);
}, onStreamUpdated = function() {
checkIfUpdateCompleted.call(this);
}, onTimeSyncAttemptCompleted = function() {
composeStreams.call(this);
}, onManifestUpdated = function(e) {
if (!e.error) {
this.log("Manifest has loaded.");
var manifestUTCTimingSources = this.manifestExt.getUTCTimingSources(e.data.manifest), allUTCTimingSources = manifestUTCTimingSources.concat(UTCTimingSources);
this.timeSyncController.initialize(allUTCTimingSources, useManifestDateHeaderTimeSource);
} else {
this.reset();
}
};
return {
system: undefined,
videoModel: undefined,
manifestUpdater: undefined,
manifestLoader: undefined,
manifestModel: undefined,
manifestExt: undefined,
adapter: undefined,
playbackController: undefined,
log: undefined,
metricsModel: undefined,
metricsExt: undefined,
videoExt: undefined,
liveEdgeFinder: undefined,
mediaSourceExt: undefined,
timelineConverter: undefined,
protectionExt: undefined,
timeSyncController: undefined,
virtualBuffer: undefined,
errHandler: undefined,
eventBus: undefined,
notify: undefined,
subscribe: undefined,
unsubscribe: undefined,
setup: function() {
this[MediaPlayer.dependencies.ManifestUpdater.eventList.ENAME_MANIFEST_UPDATED] = onManifestUpdated;
this[MediaPlayer.dependencies.Stream.eventList.ENAME_STREAM_UPDATED] = onStreamUpdated;
this[MediaPlayer.dependencies.Stream.eventList.ENAME_STREAM_BUFFERING_COMPLETED] = onStreamBufferingEnd;
this[MediaPlayer.dependencies.PlaybackController.eventList.ENAME_PLAYBACK_SEEKING] = onSeeking;
this[MediaPlayer.dependencies.PlaybackController.eventList.ENAME_PLAYBACK_TIME_UPDATED] = onTimeupdate;
this[MediaPlayer.dependencies.PlaybackController.eventList.ENAME_PLAYBACK_ENDED] = onEnded;
this[MediaPlayer.dependencies.TimeSyncController.eventList.ENAME_TIME_SYNCHRONIZATION_COMPLETED] = onTimeSyncAttemptCompleted;
this[MediaPlayer.dependencies.PlaybackController.eventList.ENAME_CAN_PLAY] = onCanPlay;
this[MediaPlayer.dependencies.PlaybackController.eventList.ENAME_PLAYBACK_ERROR] = onError;
},
getAutoPlay: function() {
return autoPlay;
},
getActiveStreamInfo: function() {
return activeStream ? activeStream.getStreamInfo() : null;
},
isStreamActive: function(streamInfo) {
return activeStream.getId() === streamInfo.id;
},
setUTCTimingSources: function(value, value2) {
UTCTimingSources = value;
useManifestDateHeaderTimeSource = value2;
},
getStreamById: function(id) {
return streams.filter(function(item) {
return item.getId() === id;
})[0];
},
initialize: function(autoPl, protCtrl, protData) {
autoPlay = autoPl;
protectionController = protCtrl;
protectionData = protData;
this.timeSyncController.subscribe(MediaPlayer.dependencies.TimeSyncController.eventList.ENAME_TIME_SYNCHRONIZATION_COMPLETED, this.timelineConverter);
this.timeSyncController.subscribe(MediaPlayer.dependencies.TimeSyncController.eventList.ENAME_TIME_SYNCHRONIZATION_COMPLETED, this.liveEdgeFinder);
this.timeSyncController.subscribe(MediaPlayer.dependencies.TimeSyncController.eventList.ENAME_TIME_SYNCHRONIZATION_COMPLETED, this);
this.playbackController.subscribe(MediaPlayer.dependencies.PlaybackController.eventList.ENAME_PLAYBACK_STARTED, this.manifestUpdater);
this.playbackController.subscribe(MediaPlayer.dependencies.PlaybackController.eventList.ENAME_PLAYBACK_PAUSED, this.manifestUpdater);
this.playbackController.subscribe(MediaPlayer.dependencies.PlaybackController.eventList.ENAME_PLAYBACK_ENDED, this);
this.subscribe(MediaPlayer.dependencies.StreamController.eventList.ENAME_STREAMS_COMPOSED, this.manifestUpdater);
this.manifestUpdater.subscribe(MediaPlayer.dependencies.ManifestUpdater.eventList.ENAME_MANIFEST_UPDATED, this);
this.manifestUpdater.initialize(this.manifestLoader);
},
load: function(url) {
this.manifestLoader.load(url);
},
loadWithManifest: function(manifest) {
this.manifestUpdater.setManifest(manifest);
},
reset: function() {
if (!!activeStream) {
detachEvents.call(this, activeStream);
}
this.timeSyncController.unsubscribe(MediaPlayer.dependencies.TimeSyncController.eventList.ENAME_TIME_SYNCHRONIZATION_COMPLETED, this.timelineConverter);
this.timeSyncController.unsubscribe(MediaPlayer.dependencies.TimeSyncController.eventList.ENAME_TIME_SYNCHRONIZATION_COMPLETED, this.liveEdgeFinder);
this.timeSyncController.unsubscribe(MediaPlayer.dependencies.TimeSyncController.eventList.ENAME_TIME_SYNCHRONIZATION_COMPLETED, this);
this.timeSyncController.reset();
for (var i = 0, ln = streams.length; i < ln; i++) {
var stream = streams[i];
stream.unsubscribe(MediaPlayer.dependencies.Stream.eventList.ENAME_STREAM_UPDATED, this);
stream.reset(hasMediaError);
}
streams = [];
this.unsubscribe(MediaPlayer.dependencies.StreamController.eventList.ENAME_STREAMS_COMPOSED, this.manifestUpdater);
this.playbackController.unsubscribe(MediaPlayer.dependencies.PlaybackController.eventList.ENAME_PLAYBACK_STARTED, this.manifestUpdater);
this.playbackController.unsubscribe(MediaPlayer.dependencies.PlaybackController.eventList.ENAME_PLAYBACK_PAUSED, this.manifestUpdater);
this.playbackController.unsubscribe(MediaPlayer.dependencies.PlaybackController.eventList.ENAME_PLAYBACK_ENDED, this);
this.manifestUpdater.unsubscribe(MediaPlayer.dependencies.ManifestUpdater.eventList.ENAME_MANIFEST_UPDATED, this);
this.manifestUpdater.reset();
this.metricsModel.clearAllCurrentMetrics();
this.manifestModel.setValue(null);
this.timelineConverter.reset();
this.liveEdgeFinder.reset();
this.adapter.reset();
this.virtualBuffer.reset();
isStreamSwitchingInProgress = false;
isUpdating = false;
activeStream = null;
canPlay = false;
hasMediaError = false;
protectionController = null;
protectionData = null;
if (!mediaSource) return;
this.mediaSourceExt.detachMediaSource(this.videoModel);
mediaSource = null;
}
};
};
MediaPlayer.dependencies.StreamController.prototype = {
constructor: MediaPlayer.dependencies.StreamController
};
MediaPlayer.dependencies.StreamController.eventList = {
ENAME_STREAMS_COMPOSED: "streamsComposed"
};
MediaPlayer.dependencies.TextController = function() {
var initialized = false, mediaSource = null, buffer = null, type = null, onDataUpdateCompleted = function() {
this.notify(MediaPlayer.dependencies.TextController.eventList.ENAME_CLOSED_CAPTIONING_REQUESTED, {
CCIndex: 0
});
}, onInitFragmentLoaded = function(e) {
var self = this;
if (e.data.fragmentModel !== self.streamProcessor.getFragmentModel() || !e.data.chunk.bytes) return;
self.sourceBufferExt.append(buffer, e.data.chunk);
};
return {
sourceBufferExt: undefined,
log: undefined,
system: undefined,
errHandler: undefined,
videoModel: undefined,
notify: undefined,
subscribe: undefined,
unsubscribe: undefined,
setup: function() {
this[Dash.dependencies.RepresentationController.eventList.ENAME_DATA_UPDATE_COMPLETED] = onDataUpdateCompleted;
this[MediaPlayer.dependencies.FragmentController.eventList.ENAME_INIT_FRAGMENT_LOADED] = onInitFragmentLoaded;
},
initialize: function(typeValue, source, streamProcessor) {
var self = this;
type = typeValue;
self.setMediaSource(source);
self.trackController = streamProcessor.trackController;
self.streamProcessor = streamProcessor;
},
createBuffer: function(mediaInfo) {
try {
buffer = this.sourceBufferExt.createSourceBuffer(mediaSource, mediaInfo);
if (!initialized) {
if (buffer.hasOwnProperty("initialize")) {
buffer.initialize(type, this);
}
initialized = true;
}
} catch (e) {
this.errHandler.mediaSourceError("Error creating " + type + " source buffer.");
}
return buffer;
},
getBuffer: function() {
return buffer;
},
setBuffer: function(value) {
buffer = value;
},
setMediaSource: function(value) {
mediaSource = value;
},
reset: function(errored) {
if (!errored) {
this.sourceBufferExt.abort(mediaSource, buffer);
this.sourceBufferExt.removeSourceBuffer(mediaSource, buffer);
}
}
};
};
MediaPlayer.dependencies.TextController.prototype = {
constructor: MediaPlayer.dependencies.TextController
};
MediaPlayer.dependencies.TextController.eventList = {
ENAME_CLOSED_CAPTIONING_REQUESTED: "closedCaptioningRequested"
};
MediaPlayer.dependencies.XlinkController = function() {
"use strict";
var matchers, iron, manifest, converter, RESOLVE_TYPE_ONLOAD = "onLoad", RESOLVE_TYPE_ONACTUATE = "onActuate", ELEMENT_TYPE_PERIOD = "Period", ELEMENT_TYPE_ADAPTATIONSET = "AdaptationSet", ELEMENT_TYPE_EVENTSTREAM = "EventStream", RESOLVE_TO_ZERO = "urn:mpeg:dash:resolve-to-zero:2013", resolveManifestOnLoad = function(mpd) {
var self = this, elements;
converter = new X2JS(matchers, "", true);
manifest = mpd;
elements = getElementsToResolve(manifest.Period_asArray, manifest, ELEMENT_TYPE_PERIOD, RESOLVE_TYPE_ONLOAD);
resolve.call(self, elements, ELEMENT_TYPE_PERIOD, RESOLVE_TYPE_ONLOAD);
}, resolve = function(elements, type, resolveType) {
var self = this, element, url, resolveObject = {}, i;
resolveObject.elements = elements;
resolveObject.type = type;
resolveObject.resolveType = resolveType;
if (resolveObject.elements.length === 0) {
onXlinkAllElementsLoaded.call(self, resolveObject);
}
for (i = 0; i < resolveObject.elements.length; i += 1) {
element = resolveObject.elements[i];
if (element.url.indexOf("http://") !== -1) {
url = element.url;
} else {
url = element.originalContent.BaseURL + element.url;
}
self.xlinkLoader.load(url, element, resolveObject);
}
}, onXlinkElementLoaded = function(event) {
var element, resolveObject, index, openingTag = "<response>", closingTag = "</response>", mergedContent = "";
element = event.data.element;
resolveObject = event.data.resolveObject;
if (element.resolvedContent) {
index = element.resolvedContent.indexOf(">") + 1;
mergedContent = element.resolvedContent.substr(0, index) + openingTag + element.resolvedContent.substr(index) + closingTag;
element.resolvedContent = converter.xml_str2json(mergedContent);
}
if (isResolvingFinished.call(this, resolveObject)) {
onXlinkAllElementsLoaded.call(this, resolveObject);
}
}, onXlinkAllElementsLoaded = function(resolveObject) {
var elements = [], i, obj;
mergeElementsBack.call(this, resolveObject);
if (resolveObject.resolveType === RESOLVE_TYPE_ONACTUATE) {
this.notify(MediaPlayer.dependencies.XlinkController.eventList.ENAME_XLINK_READY, {
manifest: manifest
});
}
if (resolveObject.resolveType === RESOLVE_TYPE_ONLOAD) {
switch (resolveObject.type) {
case ELEMENT_TYPE_PERIOD:
for (i = 0; i < manifest[ELEMENT_TYPE_PERIOD + "_asArray"].length; i++) {
obj = manifest[ELEMENT_TYPE_PERIOD + "_asArray"][i];
if (obj.hasOwnProperty(ELEMENT_TYPE_ADAPTATIONSET + "_asArray")) {
elements = elements.concat(getElementsToResolve.call(this, obj[ELEMENT_TYPE_ADAPTATIONSET + "_asArray"], obj, ELEMENT_TYPE_ADAPTATIONSET, RESOLVE_TYPE_ONLOAD));
}
if (obj.hasOwnProperty(ELEMENT_TYPE_EVENTSTREAM + "_asArray")) {
elements = elements.concat(getElementsToResolve.call(this, obj[ELEMENT_TYPE_EVENTSTREAM + "_asArray"], obj, ELEMENT_TYPE_EVENTSTREAM, RESOLVE_TYPE_ONLOAD));
}
}
resolve.call(this, elements, ELEMENT_TYPE_ADAPTATIONSET, RESOLVE_TYPE_ONLOAD);
break;
case ELEMENT_TYPE_ADAPTATIONSET:
this.notify(MediaPlayer.dependencies.XlinkController.eventList.ENAME_XLINK_READY, {
manifest: manifest
});
break;
}
}
}, getElementsToResolve = function(elements, parentElement, type, resolveType) {
var toResolve = [], element, i, xlinkObject;
for (i = elements.length - 1; i >= 0; i -= 1) {
element = elements[i];
if (element.hasOwnProperty("xlink:href") && element["xlink:href"] === RESOLVE_TO_ZERO) {
elements.splice(i, 1);
}
}
for (i = 0; i < elements.length; i++) {
element = elements[i];
if (element.hasOwnProperty("xlink:href") && element.hasOwnProperty("xlink:actuate") && element["xlink:actuate"] === resolveType) {
xlinkObject = createXlinkObject(element["xlink:href"], parentElement, type, i, resolveType, element);
toResolve.push(xlinkObject);
}
}
return toResolve;
}, mergeElementsBack = function(resolveObject) {
var element, type, resolvedElements = [], obj, i, j, k;
for (i = resolveObject.elements.length - 1; i >= 0; i--) {
element = resolveObject.elements[i];
type = element.type + "_asArray";
if (!element.resolvedContent || isInappropriateTarget()) {
delete element.originalContent["xlink:actuate"];
delete element.originalContent["xlink:href"];
resolvedElements.push(element.originalContent);
} else if (element.resolvedContent) {
for (j = 0; j < element.resolvedContent[type].length; j++) {
obj = element.resolvedContent[type][j];
resolvedElements.push(obj);
}
}
element.parentElement[type].splice(element.index, 1);
for (k = 0; k < resolvedElements.length; k++) {
element.parentElement[type].splice(element.index + k, 0, resolvedElements[k]);
}
resolvedElements = [];
}
if (resolveObject.elements.length > 0) {
iron.run(manifest);
}
}, createXlinkObject = function(url, parentElement, type, index, resolveType, originalContent) {
return {
url: url,
parentElement: parentElement,
type: type,
index: index,
resolveType: resolveType,
originalContent: originalContent,
resolvedContent: null,
resolved: false
};
}, isResolvingFinished = function(elementsToResolve) {
var i, obj;
for (i = 0; i < elementsToResolve.elements.length; i++) {
obj = elementsToResolve.elements[i];
if (obj.resolved === false) {
return false;
}
}
return true;
}, isInappropriateTarget = function() {
return false;
};
return {
xlinkLoader: undefined,
notify: undefined,
subscribe: undefined,
unsubscribe: undefined,
setup: function() {
onXlinkElementLoaded = onXlinkElementLoaded.bind(this);
this.xlinkLoader.subscribe(MediaPlayer.dependencies.XlinkLoader.eventList.ENAME_XLINKELEMENT_LOADED, this, onXlinkElementLoaded);
},
resolveManifestOnLoad: function(manifest) {
resolveManifestOnLoad.call(this, manifest);
},
setMatchers: function(value) {
matchers = value;
},
setIron: function(value) {
iron = value;
}
};
};
MediaPlayer.dependencies.XlinkController.prototype = {
constructor: MediaPlayer.dependencies.XlinkController
};
MediaPlayer.dependencies.XlinkController.eventList = {
ENAME_XLINK_ALLELEMENTSLOADED: "xlinkAllElementsLoaded",
ENAME_XLINK_READY: "xlinkReady"
};
MediaPlayer.dependencies.MediaSourceExtensions = function() {
"use strict";
};
MediaPlayer.dependencies.MediaSourceExtensions.prototype = {
constructor: MediaPlayer.dependencies.MediaSourceExtensions,
createMediaSource: function() {
"use strict";
var hasWebKit = "WebKitMediaSource" in window, hasMediaSource = "MediaSource" in window;
if (hasMediaSource) {
return new MediaSource();
} else if (hasWebKit) {
return new WebKitMediaSource();
}
return null;
},
attachMediaSource: function(source, videoModel) {
"use strict";
var objectURL = window.URL.createObjectURL(source);
videoModel.setSource(objectURL);
return objectURL;
},
detachMediaSource: function(videoModel) {
"use strict";
videoModel.setSource("");
},
setDuration: function(source, value) {
"use strict";
if(isNaN(value)){ //Captivate
return source.duration;
}
if (source.duration != value) source.duration = value;
return source.duration;
},
signalEndOfStream: function(source) {
"use strict";
if( !source )
return;
var buffers = source.sourceBuffers, ln = buffers.length, i = 0;
if (source.readyState !== "open") return;
for (i; i < ln; i += 1) {
if (buffers[i].updating) return;
}
source.endOfStream();
}
};
MediaPlayer.dependencies.ProtectionExtensions = function() {
"use strict";
this.system = undefined;
this.log = undefined;
this.keySystems = [];
this.notify = undefined;
this.subscribe = undefined;
this.unsubscribe = undefined;
this.clearkeyKeySystem = undefined;
};
MediaPlayer.dependencies.ProtectionExtensions.prototype = {
constructor: MediaPlayer.dependencies.ProtectionExtensions,
setup: function() {
var keySystem;
keySystem = this.system.getObject("ksPlayReady");
this.keySystems.push(keySystem);
keySystem = this.system.getObject("ksWidevine");
this.keySystems.push(keySystem);
keySystem = this.system.getObject("ksClearKey");
this.keySystems.push(keySystem);
this.clearkeyKeySystem = keySystem;
},
getKeySystems: function() {
return this.keySystems;
},
getKeySystemBySystemString: function(systemString) {
for (var i = 0; i < this.keySystems.length; i++) {
if (this.keySystems[i].systemString === systemString) {
return this.keySystems[i];
}
}
return null;
},
isClearKey: function(keySystem) {
return keySystem === this.clearkeyKeySystem;
},
initDataEquals: function(initData1, initData2) {
if (initData1.byteLength === initData2.byteLength) {
for (var j = 0; j < initData1.byteLength; j++) {
if (initData1[j] !== initData2[j]) {
return false;
}
}
return true;
}
return false;
},
getSupportedKeySystemsFromContentProtection: function(cps) {
var cp, ks, ksIdx, cpIdx, supportedKS = [];
if (cps) {
for (ksIdx = 0; ksIdx < this.keySystems.length; ++ksIdx) {
ks = this.keySystems[ksIdx];
for (cpIdx = 0; cpIdx < cps.length; ++cpIdx) {
cp = cps[cpIdx];
if (cp.schemeIdUri.toLowerCase() === ks.schemeIdURI) {
var initData = ks.getInitData(cp);
if (!!initData) {
supportedKS.push({
ks: this.keySystems[ksIdx],
initData: initData
});
}
}
}
}
}
return supportedKS;
},
getSupportedKeySystems: function(initData) {
var ksIdx, supportedKS = [], pssh = MediaPlayer.dependencies.protection.CommonEncryption.parsePSSHList(initData);
for (ksIdx = 0; ksIdx < this.keySystems.length; ++ksIdx) {
if (this.keySystems[ksIdx].uuid in pssh) {
supportedKS.push({
ks: this.keySystems[ksIdx],
initData: pssh[this.keySystems[ksIdx].uuid]
});
}
}
return supportedKS;
},
autoSelectKeySystem: function(supportedKS, protectionController, videoInfo, audioInfo) {
if (supportedKS.length === 0) {
throw new Error("DRM system for this content not supported by the player!");
}
var audioCapabilities = [], videoCapabilities = [];
if (videoInfo) {
videoCapabilities.push(new MediaPlayer.vo.protection.MediaCapability(videoInfo.codec));
}
if (audioInfo) {
audioCapabilities.push(new MediaPlayer.vo.protection.MediaCapability(audioInfo.codec));
}
var ksConfig = new MediaPlayer.vo.protection.KeySystemConfiguration(audioCapabilities, videoCapabilities);
var requestedKeySystems = [];
for (var i = 0; i < supportedKS.length; i++) {
requestedKeySystems.push({
ks: supportedKS[i].ks,
configs: [ ksConfig ]
});
}
var self = this;
(function(protCtrl) {
var cbObj = {};
cbObj[MediaPlayer.models.ProtectionModel.eventList.ENAME_KEY_SYSTEM_ACCESS_COMPLETE] = function(event) {
protCtrl.protectionModel.unsubscribe(MediaPlayer.models.ProtectionModel.eventList.ENAME_KEY_SYSTEM_ACCESS_COMPLETE, this);
if (!event.error) {
var keySystemAccess = event.data;
self.log("KeySystem Access Granted (" + keySystemAccess.keySystem.systemString + ")!");
protCtrl.selectKeySystem(keySystemAccess);
} else {
self.log(event.error);
}
};
protCtrl.protectionModel.subscribe(MediaPlayer.models.ProtectionModel.eventList.ENAME_KEY_SYSTEM_ACCESS_COMPLETE, cbObj);
protCtrl.requestKeySystemAccess(requestedKeySystems);
})(protectionController);
},
requestLicense: function(keySystem, protData, message, laURL, requestData) {
var licenseServerData = null;
if (protData && protData.hasOwnProperty("drmtoday")) {
licenseServerData = this.system.getObject("serverDRMToday");
} else if (keySystem.systemString === "com.widevine.alpha") {
licenseServerData = this.system.getObject("serverWidevine");
} else if (keySystem.systemString === "com.microsoft.playready") {
licenseServerData = this.system.getObject("serverPlayReady");
} else if (keySystem.systemString === "org.w3.clearkey") {
licenseServerData = this.system.getObject("serverClearKey");
} else {
this.notify(MediaPlayer.dependencies.protection.KeySystem.eventList.ENAME_LICENSE_REQUEST_COMPLETE, requestData, new Error("DRM: Unknown key system! -- " + keySystem.keySystemStr));
return;
}
if (keySystem.systemString === "org.w3.clearkey") {
try {
var clearkeys = licenseServerData.getClearKeysFromProtectionData(protData, message);
if (clearkeys) {
var event = new MediaPlayer.vo.protection.LicenseRequestComplete(clearkeys, requestData);
this.notify(MediaPlayer.dependencies.protection.KeySystem.eventList.ENAME_LICENSE_REQUEST_COMPLETE, event);
return;
}
} catch (error) {
this.notify(MediaPlayer.dependencies.protection.KeySystem.eventList.ENAME_LICENSE_REQUEST_COMPLETE, requestData, error.message);
return;
}
}
var xhr = new XMLHttpRequest(), url = protData && protData.laURL && protData.laURL !== "" ? protData.laURL : laURL, self = this;
url = licenseServerData.getServerURLFromMessage(url, message);
if (!url) {
this.notify(MediaPlayer.dependencies.protection.KeySystem.eventList.ENAME_LICENSE_REQUEST_COMPLETE, requestData, new Error("DRM: No license server URL specified!"));
return;
}
xhr.open(licenseServerData.getHTTPMethod(), url, true);
xhr.responseType = licenseServerData.getResponseType(keySystem.systemString);
xhr.onload = function() {
if (this.status == 200) {
var event = new MediaPlayer.vo.protection.LicenseRequestComplete(licenseServerData.getLicenseMessage(this.response, keySystem.systemString), requestData);
self.notify(MediaPlayer.dependencies.protection.KeySystem.eventList.ENAME_LICENSE_REQUEST_COMPLETE, event);
} else {
self.notify(MediaPlayer.dependencies.protection.KeySystem.eventList.ENAME_LICENSE_REQUEST_COMPLETE, requestData, new Error("DRM: " + keySystem.systemString + ' update, XHR status is "' + this.statusText + '" (' + this.status + "), expected to be 200. readyState is " + this.readyState) + ". Response is " + (this.response ? licenseServerData.getErrorResponse(this.response, keySystem.systemString) : "NONE"));
}
};
xhr.onabort = function() {
self.notify(MediaPlayer.dependencies.protection.KeySystem.eventList.ENAME_LICENSE_REQUEST_COMPLETE, requestData, new Error("DRM: " + keySystem.systemString + ' update, XHR aborted. status is "' + this.statusText + '" (' + this.status + "), readyState is " + this.readyState));
};
xhr.onerror = function() {
self.notify(MediaPlayer.dependencies.protection.KeySystem.eventList.ENAME_LICENSE_REQUEST_COMPLETE, requestData, new Error("DRM: " + keySystem.systemString + ' update, XHR error. status is "' + this.statusText + '" (' + this.status + "), readyState is " + this.readyState));
};
var updateHeaders = function(headers) {
var key;
if (headers) {
for (key in headers) {
if ("authorization" === key.toLowerCase()) {
xhr.withCredentials = true;
}
xhr.setRequestHeader(key, headers[key]);
}
}
};
if (protData) {
updateHeaders(protData.httpRequestHeaders);
}
updateHeaders(keySystem.getRequestHeadersFromMessage(message));
if (protData && protData.withCredentials) {
xhr.withCredentials = true;
}
xhr.send(keySystem.getLicenseRequestFromMessage(message));
}
};
MediaPlayer.dependencies.RequestModifierExtensions = function() {
"use strict";
return {
modifyRequestURL: function(url) {
return url;
},
modifyRequestHeader: function(request) {
return request;
}
};
};
MediaPlayer.dependencies.SourceBufferExtensions = function() {
"use strict";
this.system = undefined;
this.notify = undefined;
this.subscribe = undefined;
this.unsubscribe = undefined;
};
MediaPlayer.dependencies.SourceBufferExtensions.prototype = {
constructor: MediaPlayer.dependencies.SourceBufferExtensions,
createSourceBuffer: function(mediaSource, mediaInfo) {
"use strict";
var self = this, codec = mediaInfo.codec, buffer = null;
try {
buffer = mediaSource.addSourceBuffer(codec);
} catch (ex) {
if (mediaInfo.isText || codec.indexOf('codecs="stpp"') != -1) {
buffer = self.system.getObject("textSourceBuffer");
} else {
throw ex;
}
}
return buffer;
},
removeSourceBuffer: function(mediaSource, buffer) {
"use strict";
try {
mediaSource.removeSourceBuffer(buffer);
} catch (ex) {}
},
getBufferRange: function(buffer, time, tolerance) {
"use strict";
var ranges = null, start = 0, end = 0, firstStart = null, lastEnd = null, gap = 0, toler = tolerance || .15, len, i;
try {
ranges = buffer.buffered;
} catch (ex) {
return null;
}
if (ranges !== null && ranges !== undefined) {
for (i = 0, len = ranges.length; i < len; i += 1) {
start = ranges.start(i);
end = ranges.end(i);
if (firstStart === null) {
gap = Math.abs(start - time);
if (time >= start && time < end) {
firstStart = start;
lastEnd = end;
} else if (gap <= toler) {
firstStart = start;
lastEnd = end;
}
} else {
gap = start - lastEnd;
if (gap <= toler) {
lastEnd = end;
} else {
break;
}
}
}
if (firstStart !== null) {
return {
start: firstStart,
end: lastEnd
};
}
}
return null;
},
getAllRanges: function(buffer) {
var ranges = null;
try {
ranges = buffer.buffered;
return ranges;
} catch (ex) {
return null;
}
},
getTotalBufferedTime: function(buffer) {
var ranges = this.getAllRanges(buffer), totalBufferedTime = 0, ln, i;
if (!ranges) return totalBufferedTime;
for (i = 0, ln = ranges.length; i < ln; i += 1) {
totalBufferedTime += ranges.end(i) - ranges.start(i);
}
return totalBufferedTime;
},
getBufferLength: function(buffer, time, tolerance) {
"use strict";
var self = this, range, length;
range = self.getBufferRange(buffer, time, tolerance);
if (range === null) {
length = 0;
} else {
length = range.end - time;
}
return length;
},
waitForUpdateEnd: function(buffer, callback) {
"use strict";
var intervalId, CHECK_INTERVAL = 50, checkIsUpdateEnded = function() {
if (buffer.updating) return;
clearInterval(intervalId);
callback();
}, updateEndHandler = function() {
if (buffer.updating) return;
buffer.removeEventListener("updateend", updateEndHandler, false);
callback();
};
if (!buffer.updating) {
callback();
return;
}
if (typeof buffer.addEventListener === "function") {
try {
buffer.addEventListener("updateend", updateEndHandler, false);
} catch (err) {
intervalId = setInterval(checkIsUpdateEnded, CHECK_INTERVAL);
}
} else {
intervalId = setInterval(checkIsUpdateEnded, CHECK_INTERVAL);
}
},
append: function(buffer, chunk) {
var self = this, bytes = chunk.bytes, appendMethod = "append" in buffer ? "append" : "appendBuffer" in buffer ? "appendBuffer" : null;
if (!appendMethod) return;
try {
self.waitForUpdateEnd(buffer, function() {
buffer[appendMethod](bytes, chunk);
self.waitForUpdateEnd(buffer, function() {
self.notify(MediaPlayer.dependencies.SourceBufferExtensions.eventList.ENAME_SOURCEBUFFER_APPEND_COMPLETED, {
buffer: buffer,
bytes: bytes
});
});
});
} catch (err) {
self.notify(MediaPlayer.dependencies.SourceBufferExtensions.eventList.ENAME_SOURCEBUFFER_APPEND_COMPLETED, {
buffer: buffer,
bytes: bytes
}, new MediaPlayer.vo.Error(err.code, err.message, null));
}
},
remove: function(buffer, start, end, mediaSource) {
var self = this;
try {
self.waitForUpdateEnd(buffer, function() {
if (start >= 0 && end > start && mediaSource.readyState !== "ended") {
buffer.remove(start, end);
}
self.waitForUpdateEnd(buffer, function() {
self.notify(MediaPlayer.dependencies.SourceBufferExtensions.eventList.ENAME_SOURCEBUFFER_REMOVE_COMPLETED, {
buffer: buffer,
from: start,
to: end
});
});
});
} catch (err) {
self.notify(MediaPlayer.dependencies.SourceBufferExtensions.eventList.ENAME_SOURCEBUFFER_REMOVE_COMPLETED, {
buffer: buffer,
from: start,
to: end
}, new MediaPlayer.vo.Error(err.code, err.message, null));
}
},
abort: function(mediaSource, buffer) {
"use strict";
try {
if (mediaSource.readyState === "open") {
buffer.abort();
}
} catch (ex) {}
}
};
MediaPlayer.dependencies.SourceBufferExtensions.QUOTA_EXCEEDED_ERROR_CODE = 22;
MediaPlayer.dependencies.SourceBufferExtensions.eventList = {
ENAME_SOURCEBUFFER_REMOVE_COMPLETED: "sourceBufferRemoveCompleted",
ENAME_SOURCEBUFFER_APPEND_COMPLETED: "sourceBufferAppendCompleted"
};
MediaPlayer.utils.TextTrackExtensions = function() {
"use strict";
var Cue;
return {
setup: function() {
Cue = window.VTTCue || window.TextTrackCue;
},
addTextTrack: function(video, captionData, label, scrlang, isDefaultTrack) {
this.track = video.addTextTrack("captions", label, scrlang);
this.track.default = isDefaultTrack;
this.track.mode = "showing";
this.video = video;
this.addCaptions(0, captionData);
return this.track;
},
addCaptions: function(timeOffset, captionData) {
for (var item in captionData) {
var cue;
var currentItem = captionData[item];
var video = this.video;
if (currentItem.type == "image") {
cue = new Cue(currentItem.start - timeOffset, currentItem.end - timeOffset, "");
cue.image = currentItem.data;
cue.id = currentItem.id;
cue.size = 0;
cue.type = "image";
cue.onenter = function() {
var img = new Image();
img.id = "ttmlImage_" + this.id;
img.src = this.image;
img.className = "cue-image";
video.parentNode.appendChild(img);
};
cue.onexit = function() {
var imgs = video.parentNode.childNodes;
var i;
for (i = 0; i < imgs.length; i++) {
if (imgs[i].id == "ttmlImage_" + this.id) {
video.parentNode.removeChild(imgs[i]);
}
}
};
} else {
cue = new Cue(currentItem.start - timeOffset, currentItem.end - timeOffset, currentItem.data);
if (currentItem.styles) {
if (currentItem.styles.align !== undefined && cue.hasOwnProperty("align")) {
cue.align = currentItem.styles.align;
}
if (currentItem.styles.line !== undefined && cue.hasOwnProperty("line")) {
cue.line = currentItem.styles.line;
}
if (currentItem.styles.position !== undefined && cue.hasOwnProperty("position")) {
cue.position = currentItem.styles.position;
}
if (currentItem.styles.size !== undefined && cue.hasOwnProperty("size")) {
cue.size = currentItem.styles.size;
}
}
}
this.track.addCue(cue);
}
},
deleteCues: function(video) {
var i = 0, firstValidTrack = false;
while (!firstValidTrack) {
if (video.textTracks[i].cues !== null) {
firstValidTrack = true;
break;
}
i++;
}
var track = video.textTracks[i], cues = track.cues, lastIdx = cues.length - 1;
for (i = lastIdx; i >= 0; i--) {
track.removeCue(cues[i]);
}
track.mode = "disabled";
track.default = false;
}
};
};
MediaPlayer.dependencies.VideoModelExtensions = function() {
"use strict";
return {
getPlaybackQuality: function(videoElement) {
var hasWebKit = "webkitDroppedFrameCount" in videoElement, hasQuality = "getVideoPlaybackQuality" in videoElement, result = null;
if (hasQuality) {
result = videoElement.getVideoPlaybackQuality();
} else if (hasWebKit) {
result = {
droppedVideoFrames: videoElement.webkitDroppedFrameCount,
creationTime: new Date()
};
}
return result;
}
};
};
MediaPlayer.dependencies.VideoModelExtensions.prototype = {
constructor: MediaPlayer.dependencies.VideoModelExtensions
};
MediaPlayer.dependencies.FragmentModel = function() {
"use strict";
var context = null, executedRequests = [], pendingRequests = [], loadingRequests = [], rejectedRequests = [], isLoadingPostponed = false, loadCurrentFragment = function(request) {
var self = this;
self.notify(MediaPlayer.dependencies.FragmentModel.eventList.ENAME_FRAGMENT_LOADING_STARTED, {
request: request
});
self.fragmentLoader.load(request);
}, removeRequest = function(arr, request) {
var idx = arr.indexOf(request);
if (idx !== -1) {
arr.splice(idx, 1);
}
}, getRequestForTime = function(arr, time, threshold) {
var lastIdx = arr.length - 1, start = NaN, end = NaN, req = null, i;
for (i = lastIdx; i >= 0; i -= 1) {
req = arr[i];
start = req.startTime;
end = start + req.duration;
threshold = threshold || req.duration / 2;
if (!isNaN(start) && !isNaN(end) && time + threshold >= start && time - threshold < end || isNaN(start) && isNaN(time)) {
return req;
}
}
return null;
}, filterRequests = function(arr, filter) {
if (!filter) return arr;
if (filter.hasOwnProperty("time")) {
return [ getRequestForTime.call(this, arr, filter.time, filter.threshold) ];
}
return arr.filter(function(request) {
for (var prop in filter) {
if (prop === "state") continue;
if (filter.hasOwnProperty(prop) && request[prop] != filter[prop]) return false;
}
return true;
});
}, getRequestsForState = function(state) {
var requests;
switch (state) {
case MediaPlayer.dependencies.FragmentModel.states.PENDING:
requests = pendingRequests;
break;
case MediaPlayer.dependencies.FragmentModel.states.LOADING:
requests = loadingRequests;
break;
case MediaPlayer.dependencies.FragmentModel.states.EXECUTED:
requests = executedRequests;
break;
case MediaPlayer.dependencies.FragmentModel.states.REJECTED:
requests = rejectedRequests;
break;
default:
requests = [];
}
return requests;
}, addSchedulingInfoMetrics = function(request, state) {
if (!request) return;
var mediaType = request.mediaType, now = new Date(), type = request.type, startTime = request.startTime, availabilityStartTime = request.availabilityStartTime, duration = request.duration, quality = request.quality, range = request.range;
this.metricsModel.addSchedulingInfo(mediaType, now, type, startTime, availabilityStartTime, duration, quality, range, state);
}, onLoadingCompleted = function(e) {
var request = e.data.request, response = e.data.response, error = e.error;
loadingRequests.splice(loadingRequests.indexOf(request), 1);
if (response && !error) {
executedRequests.push(request);
}
addSchedulingInfoMetrics.call(this, request, error ? MediaPlayer.dependencies.FragmentModel.states.FAILED : MediaPlayer.dependencies.FragmentModel.states.EXECUTED);
this.notify(MediaPlayer.dependencies.FragmentModel.eventList.ENAME_FRAGMENT_LOADING_COMPLETED, {
request: request,
response: response
}, error);
}, onBytesRejected = function(e) {
var req = this.getRequests({
state: MediaPlayer.dependencies.FragmentModel.states.EXECUTED,
quality: e.data.quality,
index: e.data.index
})[0];
if (req) {
removeRequest.call(this, executedRequests, req);
if (!isNaN(e.data.index)) {
rejectedRequests.push(req);
addSchedulingInfoMetrics.call(this, req, MediaPlayer.dependencies.FragmentModel.states.REJECTED);
}
}
}, onBufferLevelOutrun = function() {
isLoadingPostponed = true;
}, onBufferLevelBalanced = function() {
isLoadingPostponed = false;
};
return {
system: undefined,
log: undefined,
metricsModel: undefined,
notify: undefined,
subscribe: undefined,
unsubscribe: undefined,
setup: function() {
this[MediaPlayer.dependencies.BufferController.eventList.ENAME_BUFFER_LEVEL_OUTRUN] = onBufferLevelOutrun;
this[MediaPlayer.dependencies.BufferController.eventList.ENAME_BUFFER_LEVEL_BALANCED] = onBufferLevelBalanced;
this[MediaPlayer.dependencies.BufferController.eventList.ENAME_BYTES_REJECTED] = onBytesRejected;
this[MediaPlayer.dependencies.FragmentLoader.eventList.ENAME_LOADING_COMPLETED] = onLoadingCompleted;
},
setLoader: function(value) {
this.fragmentLoader = value;
},
setContext: function(value) {
context = value;
},
getContext: function() {
return context;
},
getIsPostponed: function() {
return isLoadingPostponed;
},
addRequest: function(value) {
if (!value || this.isFragmentLoadedOrPending(value)) return false;
pendingRequests.push(value);
addSchedulingInfoMetrics.call(this, value, MediaPlayer.dependencies.FragmentModel.states.PENDING);
return true;
},
isFragmentLoadedOrPending: function(request) {
var isEqualComplete = function(req1, req2) {
return req1.action === "complete" && req1.action === req2.action;
}, isEqualMedia = function(req1, req2) {
return req1.url === req2.url && req1.startTime === req2.startTime;
}, isEqualInit = function(req1, req2) {
return isNaN(req1.index) && isNaN(req2.index) && req1.quality === req2.quality;
}, check = function(arr) {
var req, isLoaded = false, ln = arr.length, i;
for (i = 0; i < ln; i += 1) {
req = arr[i];
if (isEqualMedia(request, req) || isEqualInit(request, req) || isEqualComplete(request, req)) {
isLoaded = true;
break;
}
}
return isLoaded;
};
return check(pendingRequests) || check(loadingRequests) || check(executedRequests);
},
getRequests: function(filter) {
var requests = [], filteredRequests = [], states, ln = 1;
if (!filter || !filter.state) return requests;
if (filter.state instanceof Array) {
ln = filter.state.length;
states = filter.state;
} else {
states = [ filter.state ];
}
for (var i = 0; i < ln; i += 1) {
requests = getRequestsForState.call(this, states[i]);
filteredRequests = filteredRequests.concat(filterRequests.call(this, requests, filter));
}
return filteredRequests;
},
getLoadingTime: function() {
var loadingTime = 0, req, i;
for (i = executedRequests.length - 1; i >= 0; i -= 1) {
req = executedRequests[i];
if (req.requestEndDate instanceof Date && req.firstByteDate instanceof Date) {
loadingTime = req.requestEndDate.getTime() - req.firstByteDate.getTime();
break;
}
}
return loadingTime;
},
removeExecutedRequest: function(request) {
removeRequest.call(this, executedRequests, request);
},
removeRejectedRequest: function(request) {
removeRequest.call(this, rejectedRequests, request);
},
removeExecutedRequestsBeforeTime: function(time) {
var lastIdx = executedRequests.length - 1, start = NaN, req = null, i;
for (i = lastIdx; i >= 0; i -= 1) {
req = executedRequests[i];
start = req.startTime;
if (!isNaN(start) && start < time) {
removeRequest.call(this, executedRequests, req);
}
}
},
cancelPendingRequests: function(quality) {
var self = this, reqs = pendingRequests, canceled = reqs;
pendingRequests = [];
if (quality !== undefined) {
pendingRequests = reqs.filter(function(request) {
if (request.quality === quality) {
return false;
}
canceled.splice(canceled.indexOf(request), 1);
return true;
});
}
canceled.forEach(function(request) {
addSchedulingInfoMetrics.call(self, request, MediaPlayer.dependencies.FragmentModel.states.CANCELED);
});
return canceled;
},
abortRequests: function() {
var reqs = [];
this.fragmentLoader.abort();
while (loadingRequests.length > 0) {
reqs.push(loadingRequests[0]);
removeRequest.call(this, loadingRequests, loadingRequests[0]);
}
loadingRequests = [];
return reqs;
},
executeRequest: function(request) {
var self = this, idx = pendingRequests.indexOf(request);
if (!request || idx === -1) return;
pendingRequests.splice(idx, 1);
switch (request.action) {
case "complete":
executedRequests.push(request);
addSchedulingInfoMetrics.call(self, request, MediaPlayer.dependencies.FragmentModel.states.EXECUTED);
self.notify(MediaPlayer.dependencies.FragmentModel.eventList.ENAME_STREAM_COMPLETED, {
request: request
});
break;
case "download":
loadingRequests.push(request);
addSchedulingInfoMetrics.call(self, request, MediaPlayer.dependencies.FragmentModel.states.LOADING);
loadCurrentFragment.call(self, request);
break;
default:
this.log("Unknown request action.");
}
},
reset: function() {
this.abortRequests();
this.cancelPendingRequests();
context = null;
executedRequests = [];
pendingRequests = [];
loadingRequests = [];
rejectedRequests = [];
isLoadingPostponed = false;
}
};
};
MediaPlayer.dependencies.FragmentModel.prototype = {
constructor: MediaPlayer.dependencies.FragmentModel
};
MediaPlayer.dependencies.FragmentModel.eventList = {
ENAME_STREAM_COMPLETED: "streamCompleted",
ENAME_FRAGMENT_LOADING_STARTED: "fragmentLoadingStarted",
ENAME_FRAGMENT_LOADING_COMPLETED: "fragmentLoadingCompleted"
};
MediaPlayer.dependencies.FragmentModel.states = {
PENDING: "pending",
LOADING: "loading",
EXECUTED: "executed",
REJECTED: "rejected",
CANCELED: "canceled",
FAILED: "failed"
};
MediaPlayer.models.ManifestModel = function() {
"use strict";
var manifest;
return {
system: undefined,
eventBus: undefined,
notify: undefined,
subscribe: undefined,
unsubscribe: undefined,
getValue: function() {
return manifest;
},
setValue: function(value) {
manifest = value;
this.eventBus.dispatchEvent({
type: MediaPlayer.events.MANIFEST_LOADED,
data: value
});
this.notify(MediaPlayer.models.ManifestModel.eventList.ENAME_MANIFEST_UPDATED, {
manifest: value
});
}
};
};
MediaPlayer.models.ManifestModel.prototype = {
constructor: MediaPlayer.models.ManifestModel
};
MediaPlayer.models.ManifestModel.eventList = {
ENAME_MANIFEST_UPDATED: "manifestUpdated"
};
MediaPlayer.models.MetricsModel = function() {
"use strict";
return {
system: undefined,
eventBus: undefined,
adapter: undefined,
streamMetrics: {},
metricsChanged: function() {
this.eventBus.dispatchEvent({
type: MediaPlayer.events.METRICS_CHANGED,
data: {}
});
},
metricChanged: function(mediaType) {
this.eventBus.dispatchEvent({
type: MediaPlayer.events.METRIC_CHANGED,
data: {
stream: mediaType
}
});
this.metricsChanged();
},
metricUpdated: function(mediaType, metricType, vo) {
this.eventBus.dispatchEvent({
type: MediaPlayer.events.METRIC_UPDATED,
data: {
stream: mediaType,
metric: metricType,
value: vo
}
});
this.metricChanged(mediaType);
},
metricAdded: function(mediaType, metricType, vo) {
this.eventBus.dispatchEvent({
type: MediaPlayer.events.METRIC_ADDED,
data: {
stream: mediaType,
metric: metricType,
value: vo
}
});
this.metricChanged(mediaType);
},
clearCurrentMetricsForType: function(type) {
delete this.streamMetrics[type];
this.metricChanged(type);
},
clearAllCurrentMetrics: function() {
var self = this;
this.streamMetrics = {};
this.metricsChanged.call(self);
},
getReadOnlyMetricsFor: function(type) {
if (this.streamMetrics.hasOwnProperty(type)) {
return this.streamMetrics[type];
}
return null;
},
getMetricsFor: function(type) {
var metrics;
if (this.streamMetrics.hasOwnProperty(type)) {
metrics = this.streamMetrics[type];
} else {
metrics = this.system.getObject("metrics");
this.streamMetrics[type] = metrics;
}
return metrics;
},
addTcpConnection: function(mediaType, tcpid, dest, topen, tclose, tconnect) {
var vo = new MediaPlayer.vo.metrics.TCPConnection();
vo.tcpid = tcpid;
vo.dest = dest;
vo.topen = topen;
vo.tclose = tclose;
vo.tconnect = tconnect;
this.getMetricsFor(mediaType).TcpList.push(vo);
this.metricAdded(mediaType, this.adapter.metricsList.TCP_CONNECTION, vo);
return vo;
},
addHttpRequest: function(mediaType, tcpid, type, url, actualurl, range, trequest, tresponse, tfinish, responsecode, interval, mediaduration, responseHeaders) {
var vo = new MediaPlayer.vo.metrics.HTTPRequest();
vo.stream = mediaType;
vo.tcpid = tcpid;
vo.type = type;
vo.url = url;
vo.actualurl = actualurl;
vo.range = range;
vo.trequest = trequest;
vo.tresponse = tresponse;
vo.tfinish = tfinish;
vo.responsecode = responsecode;
vo.interval = interval;
vo.mediaduration = mediaduration;
vo.responseHeaders = responseHeaders;
this.getMetricsFor(mediaType).HttpList.push(vo);
this.metricAdded(mediaType, this.adapter.metricsList.HTTP_REQUEST, vo);
return vo;
},
appendHttpTrace: function(httpRequest, s, d, b) {
var vo = new MediaPlayer.vo.metrics.HTTPRequest.Trace();
vo.s = s;
vo.d = d;
vo.b = b;
httpRequest.trace.push(vo);
this.metricUpdated(httpRequest.stream, this.adapter.metricsList.HTTP_REQUEST_TRACE, httpRequest);
return vo;
},
addTrackSwitch: function(mediaType, t, mt, to, lto) {
var vo = new MediaPlayer.vo.metrics.TrackSwitch();
vo.t = t;
vo.mt = mt;
vo.to = to;
vo.lto = lto;
this.getMetricsFor(mediaType).RepSwitchList.push(vo);
this.metricAdded(mediaType, this.adapter.metricsList.TRACK_SWITCH, vo);
return vo;
},
addBufferLevel: function(mediaType, t, level) {
var vo = new MediaPlayer.vo.metrics.BufferLevel();
vo.t = t;
vo.level = level;
this.getMetricsFor(mediaType).BufferLevel.push(vo);
this.metricAdded(mediaType, this.adapter.metricsList.BUFFER_LEVEL, vo);
return vo;
},
addBufferState: function(mediaType, state, target) {
var vo = new MediaPlayer.vo.metrics.BufferState();
vo.target = target;
vo.state = state;
this.getMetricsFor(mediaType).BufferState.push(vo);
this.metricAdded(mediaType, this.adapter.metricsList.BUFFER_STATE, vo);
return vo;
},
addDVRInfo: function(mediaType, currentTime, mpd, range) {
var vo = new MediaPlayer.vo.metrics.DVRInfo();
vo.time = currentTime;
vo.range = range;
vo.manifestInfo = mpd;
this.getMetricsFor(mediaType).DVRInfo.push(vo);
this.metricAdded(mediaType, this.adapter.metricsList.DVR_INFO, vo);
return vo;
},
addDroppedFrames: function(mediaType, quality) {
var vo = new MediaPlayer.vo.metrics.DroppedFrames(), list = this.getMetricsFor(mediaType).DroppedFrames;
vo.time = quality.creationTime;
vo.droppedFrames = quality.droppedVideoFrames;
if (list.length > 0 && list[list.length - 1] == vo) {
return list[list.length - 1];
}
list.push(vo);
this.metricAdded(mediaType, this.adapter.metricsList.DROPPED_FRAMES, vo);
return vo;
},
addSchedulingInfo: function(mediaType, t, type, startTime, availabilityStartTime, duration, quality, range, state) {
var vo = new MediaPlayer.vo.metrics.SchedulingInfo();
vo.mediaType = mediaType;
vo.t = t;
vo.type = type;
vo.startTime = startTime;
vo.availabilityStartTime = availabilityStartTime;
vo.duration = duration;
vo.quality = quality;
vo.range = range;
vo.state = state;
this.getMetricsFor(mediaType).SchedulingInfo.push(vo);
this.metricAdded(mediaType, this.adapter.metricsList.SCHEDULING_INFO, vo);
return vo;
},
addManifestUpdate: function(mediaType, type, requestTime, fetchTime, availabilityStartTime, presentationStartTime, clientTimeOffset, currentTime, buffered, latency) {
var vo = new MediaPlayer.vo.metrics.ManifestUpdate(), metrics = this.getMetricsFor("stream");
vo.mediaType = mediaType;
vo.type = type;
vo.requestTime = requestTime;
vo.fetchTime = fetchTime;
vo.availabilityStartTime = availabilityStartTime;
vo.presentationStartTime = presentationStartTime;
vo.clientTimeOffset = clientTimeOffset;
vo.currentTime = currentTime;
vo.buffered = buffered;
vo.latency = latency;
metrics.ManifestUpdate.push(vo);
this.metricAdded(mediaType, this.adapter.metricsList.MANIFEST_UPDATE, vo);
return vo;
},
updateManifestUpdateInfo: function(manifestUpdate, updatedFields) {
if (manifestUpdate) {
for (var field in updatedFields) {
manifestUpdate[field] = updatedFields[field];
}
this.metricUpdated(manifestUpdate.mediaType, this.adapter.metricsList.MANIFEST_UPDATE, manifestUpdate);
}
},
addManifestUpdateStreamInfo: function(manifestUpdate, id, index, start, duration) {
if (manifestUpdate) {
var vo = new MediaPlayer.vo.metrics.ManifestUpdate.StreamInfo();
vo.id = id;
vo.index = index;
vo.start = start;
vo.duration = duration;
manifestUpdate.streamInfo.push(vo);
this.metricUpdated(manifestUpdate.mediaType, this.adapter.metricsList.MANIFEST_UPDATE_STREAM_INFO, manifestUpdate);
return vo;
}
return null;
},
addManifestUpdateTrackInfo: function(manifestUpdate, id, index, streamIndex, mediaType, presentationTimeOffset, startNumber, fragmentInfoType) {
if (manifestUpdate) {
var vo = new MediaPlayer.vo.metrics.ManifestUpdate.TrackInfo();
vo.id = id;
vo.index = index;
vo.streamIndex = streamIndex;
vo.mediaType = mediaType;
vo.startNumber = startNumber;
vo.fragmentInfoType = fragmentInfoType;
vo.presentationTimeOffset = presentationTimeOffset;
manifestUpdate.trackInfo.push(vo);
this.metricUpdated(manifestUpdate.mediaType, this.adapter.metricsList.MANIFEST_UPDATE_TRACK_INFO, manifestUpdate);
return vo;
}
return null;
},
addPlayList: function(mediaType, start, mstart, starttype) {
var vo = new MediaPlayer.vo.metrics.PlayList();
vo.stream = mediaType;
vo.start = start;
vo.mstart = mstart;
vo.starttype = starttype;
this.getMetricsFor(mediaType).PlayList.push(vo);
this.metricAdded(mediaType, this.adapter.metricsList.PLAY_LIST, vo);
return vo;
},
appendPlayListTrace: function(playList, trackId, subreplevel, start, mstart, duration, playbackspeed, stopreason) {
var vo = new MediaPlayer.vo.metrics.PlayList.Trace();
vo.representationid = trackId;
vo.subreplevel = subreplevel;
vo.start = start;
vo.mstart = mstart;
vo.duration = duration;
vo.playbackspeed = playbackspeed;
vo.stopreason = stopreason;
playList.trace.push(vo);
this.metricUpdated(playList.stream, this.adapter.metricsList.PLAY_LIST_TRACE, playList);
return vo;
}
};
};
MediaPlayer.models.MetricsModel.prototype = {
constructor: MediaPlayer.models.MetricsModel
};
MediaPlayer.models.ProtectionModel = {};
MediaPlayer.models.ProtectionModel.eventList = {
ENAME_NEED_KEY: "needkey",
ENAME_KEY_SYSTEM_ACCESS_COMPLETE: "keySystemAccessComplete",
ENAME_KEY_SYSTEM_SELECTED: "keySystemSelected",
ENAME_VIDEO_ELEMENT_SELECTED: "videoElementSelected",
ENAME_SERVER_CERTIFICATE_UPDATED: "serverCertificateUpdated",
ENAME_KEY_MESSAGE: "keyMessage",
ENAME_KEY_ADDED: "keyAdded",
ENAME_KEY_ERROR: "keyError",
ENAME_KEY_SESSION_CREATED: "keySessionCreated",
ENAME_KEY_SESSION_REMOVED: "keySessionRemoved",
ENAME_KEY_SESSION_CLOSED: "keySessionClosed",
ENAME_KEY_STATUSES_CHANGED: "keyStatusesChanged"
};
MediaPlayer.models.ProtectionModel_01b = function() {
var videoElement = null, api = null, pendingSessions = [], sessions = [], moreSessionsAllowed, createEventHandler = function() {
var self = this;
return {
handleEvent: function(event) {
var sessionToken = null;
switch (event.type) {
case api.needkey:
self.notify(MediaPlayer.models.ProtectionModel.eventList.ENAME_NEED_KEY, new MediaPlayer.vo.protection.NeedKey(event.initData, "cenc"));
break;
case api.keyerror:
sessionToken = findSessionByID(sessions, event.sessionId);
if (!sessionToken) {
sessionToken = findSessionByID(pendingSessions, event.sessionId);
}
if (sessionToken) {
var msg = "";
switch (event.errorCode.code) {
case 1:
msg += "MEDIA_KEYERR_UNKNOWN - An unspecified error occurred. This value is used for errors that don't match any of the other codes.";
break;
case 2:
msg += "MEDIA_KEYERR_CLIENT - The Key System could not be installed or updated.";
break;
case 3:
msg += "MEDIA_KEYERR_SERVICE - The message passed into update indicated an error from the license service.";
break;
case 4:
msg += "MEDIA_KEYERR_OUTPUT - There is no available output device with the required characteristics for the content protection system.";
break;
case 5:
msg += "MEDIA_KEYERR_HARDWARECHANGE - A hardware configuration change caused a content protection error.";
break;
case 6:
msg += "MEDIA_KEYERR_DOMAIN - An error occurred in a multi-device domain licensing configuration. The most common error is a failure to join the domain.";
break;
}
msg += " System Code = " + event.systemCode;
self.notify(MediaPlayer.models.ProtectionModel.eventList.ENAME_KEY_ERROR, new MediaPlayer.vo.protection.KeyError(sessionToken, msg));
} else {
self.log("No session token found for key error");
}
break;
case api.keyadded:
sessionToken = findSessionByID(sessions, event.sessionId);
if (!sessionToken) {
sessionToken = findSessionByID(pendingSessions, event.sessionId);
}
if (sessionToken) {
self.notify(MediaPlayer.models.ProtectionModel.eventList.ENAME_KEY_ADDED, sessionToken);
} else {
self.log("No session token found for key added");
}
break;
case api.keymessage:
moreSessionsAllowed = event.sessionId !== null && event.sessionId !== undefined;
if (moreSessionsAllowed) {
sessionToken = findSessionByID(sessions, event.sessionId);
if (!sessionToken && pendingSessions.length > 0) {
sessionToken = pendingSessions.shift();
sessions.push(sessionToken);
sessionToken.sessionID = event.sessionId;
}
} else if (pendingSessions.length > 0) {
sessionToken = pendingSessions.shift();
sessions.push(sessionToken);
if (pendingSessions.length !== 0) {
self.errHandler.mediaKeyMessageError("Multiple key sessions were creates with a user-agent that does not support sessionIDs!! Unpredictable behavior ahead!");
}
}
if (sessionToken) {
sessionToken.keyMessage = event.message;
self.notify(MediaPlayer.models.ProtectionModel.eventList.ENAME_KEY_MESSAGE, new MediaPlayer.vo.protection.KeyMessage(sessionToken, event.message, event.defaultURL));
} else {
self.log("No session token found for key message");
}
break;
}
}
};
}, eventHandler = null, findSessionByID = function(sessionArray, sessionID) {
if (!sessionID || !sessionArray) {
return null;
} else {
var len = sessionArray.length;
for (var i = 0; i < len; i++) {
if (sessionArray[i].sessionID == sessionID) {
return sessionArray[i];
}
}
return null;
}
}, removeEventListeners = function() {
videoElement.removeEventListener(api.keyerror, eventHandler);
videoElement.removeEventListener(api.needkey, eventHandler);
videoElement.removeEventListener(api.keymessage, eventHandler);
videoElement.removeEventListener(api.keyadded, eventHandler);
};
return {
system: undefined,
log: undefined,
errHandler: undefined,
notify: undefined,
subscribe: undefined,
unsubscribe: undefined,
protectionExt: undefined,
keySystem: null,
setup: function() {
eventHandler = createEventHandler.call(this);
},
init: function() {
var tmpVideoElement = document.createElement("video");
api = MediaPlayer.models.ProtectionModel_01b.detect(tmpVideoElement);
},
teardown: function() {
if (videoElement) {
removeEventListeners();
}
for (var i = 0; i < sessions.length; i++) {
this.closeKeySession(sessions[i]);
}
},
requestKeySystemAccess: function(ksConfigurations) {
var ve = videoElement;
if (!ve) {
ve = document.createElement("video");
}
var found = false;
for (var ksIdx = 0; ksIdx < ksConfigurations.length; ksIdx++) {
var systemString = ksConfigurations[ksIdx].ks.systemString;
var configs = ksConfigurations[ksIdx].configs;
var supportedAudio = null;
var supportedVideo = null;
for (var configIdx = 0; configIdx < configs.length; configIdx++) {
var videos = configs[configIdx].videoCapabilities;
if (videos && videos.length !== 0) {
supportedVideo = [];
for (var videoIdx = 0; videoIdx < videos.length; videoIdx++) {
if (ve.canPlayType(videos[videoIdx].contentType, systemString) !== "") {
supportedVideo.push(videos[videoIdx]);
}
}
}
if (!supportedAudio && !supportedVideo || supportedAudio && supportedAudio.length === 0 || supportedVideo && supportedVideo.length === 0) {
continue;
}
found = true;
var ksConfig = new MediaPlayer.vo.protection.KeySystemConfiguration(supportedAudio, supportedVideo);
var ks = this.protectionExt.getKeySystemBySystemString(systemString);
var ksAccess = new MediaPlayer.vo.protection.KeySystemAccess(ks, ksConfig);
this.notify(MediaPlayer.models.ProtectionModel.eventList.ENAME_KEY_SYSTEM_ACCESS_COMPLETE, ksAccess);
break;
}
}
if (!found) {
this.notify(MediaPlayer.models.ProtectionModel.eventList.ENAME_KEY_SYSTEM_ACCESS_COMPLETE, null, "Key system access denied! -- No valid audio/video content configurations detected!");
}
},
selectKeySystem: function(keySystemAccess) {
this.keySystem = keySystemAccess.keySystem;
this.notify(MediaPlayer.models.ProtectionModel.eventList.ENAME_KEY_SYSTEM_SELECTED);
},
setMediaElement: function(mediaElement) {
if (videoElement) {
removeEventListeners();
}
videoElement = mediaElement;
videoElement.addEventListener(api.keyerror, eventHandler);
videoElement.addEventListener(api.needkey, eventHandler);
videoElement.addEventListener(api.keymessage, eventHandler);
videoElement.addEventListener(api.keyadded, eventHandler);
this.notify(MediaPlayer.models.ProtectionModel.eventList.ENAME_VIDEO_ELEMENT_SELECTED);
},
createKeySession: function(initData) {
if (!this.keySystem) {
throw new Error("Can not create sessions until you have selected a key system");
}
var i;
for (i = 0; i < sessions.length; i++) {
if (this.protectionExt.initDataEquals(initData, sessions[i].initData)) {
return;
}
}
for (i = 0; i < pendingSessions.length; i++) {
if (this.protectionExt.initDataEquals(initData, pendingSessions[i].initData)) {
return;
}
}
if (moreSessionsAllowed || sessions.length === 0) {
var newSession = {
prototype: new MediaPlayer.models.SessionToken().prototype,
sessionID: null,
initData: initData,
getSessionID: function() {
return this.sessionID;
}
};
pendingSessions.push(newSession);
videoElement[api.generateKeyRequest](this.keySystem.systemString, new Uint8Array(initData));
return newSession;
} else {
throw new Error("Multiple sessions not allowed!");
}
},
updateKeySession: function(sessionToken, message) {
var sessionID = sessionToken.sessionID;
if (!this.protectionExt.isClearKey(this.keySystem)) {
videoElement[api.addKey](this.keySystem.systemString, message, sessionToken.initData, sessionID);
} else {
for (var i = 0; i < message.keyPairs.length; i++) {
videoElement[api.addKey](this.keySystem.systemString, message.keyPairs[i].key, message.keyPairs[i].keyID, sessionID);
}
}
},
closeKeySession: function(sessionToken) {
videoElement[api.cancelKeyRequest](this.keySystem.systemString, sessionToken.sessionID);
},
setServerCertificate: function() {},
loadKeySession: function() {},
removeKeySession: function() {}
};
};
MediaPlayer.models.ProtectionModel_01b.prototype = {
constructor: MediaPlayer.models.ProtectionModel_01b
};
MediaPlayer.models.ProtectionModel_01b.APIs = [ {
generateKeyRequest: "generateKeyRequest",
addKey: "addKey",
cancelKeyRequest: "cancelKeyRequest",
needkey: "needkey",
keyerror: "keyerror",
keyadded: "keyadded",
keymessage: "keymessage"
}, {
generateKeyRequest: "webkitGenerateKeyRequest",
addKey: "webkitAddKey",
cancelKeyRequest: "webkitCancelKeyRequest",
needkey: "webkitneedkey",
keyerror: "webkitkeyerror",
keyadded: "webkitkeyadded",
keymessage: "webkitkeymessage"
} ];
MediaPlayer.models.ProtectionModel_01b.detect = function(videoElement) {
var apis = MediaPlayer.models.ProtectionModel_01b.APIs;
for (var i = 0; i < apis.length; i++) {
var api = apis[i];
if (typeof videoElement[api.generateKeyRequest] !== "function") {
continue;
}
if (typeof videoElement[api.addKey] !== "function") {
continue;
}
if (typeof videoElement[api.cancelKeyRequest] !== "function") {
continue;
}
return api;
}
return null;
};
MediaPlayer.models.ProtectionModel_21Jan2015 = function() {
var videoElement = null, mediaKeys = null, sessions = [], requestKeySystemAccessInternal = function(ksConfigurations, idx) {
var self = this;
(function(i) {
var keySystem = ksConfigurations[i].ks;
var configs = ksConfigurations[i].configs;
navigator.requestMediaKeySystemAccess(keySystem.systemString, configs).then(function(mediaKeySystemAccess) {
var configuration = typeof mediaKeySystemAccess.getConfiguration === "function" ? mediaKeySystemAccess.getConfiguration() : null;
var keySystemAccess = new MediaPlayer.vo.protection.KeySystemAccess(keySystem, configuration);
keySystemAccess.mksa = mediaKeySystemAccess;
self.notify(MediaPlayer.models.ProtectionModel.eventList.ENAME_KEY_SYSTEM_ACCESS_COMPLETE, keySystemAccess);
}).catch(function() {
if (++i < ksConfigurations.length) {
requestKeySystemAccessInternal.call(self, ksConfigurations, i);
} else {
self.notify(MediaPlayer.models.ProtectionModel.eventList.ENAME_KEY_SYSTEM_ACCESS_COMPLETE, null, "Key system access denied!");
}
});
})(idx);
}, createEventHandler = function() {
var self = this;
return {
handleEvent: function(event) {
switch (event.type) {
case "encrypted":
self.notify(MediaPlayer.models.ProtectionModel.eventList.ENAME_NEED_KEY, new MediaPlayer.vo.protection.NeedKey(event.initData, event.initDataType));
break;
}
}
};
}, eventHandler = null, removeSession = function(token) {
for (var i = 0; i < sessions.length; i++) {
if (sessions[i] === token) {
sessions.splice(i, 1);
break;
}
}
}, createSessionToken = function(session, initData) {
var self = this;
var token = {
prototype: new MediaPlayer.models.SessionToken().prototype,
session: session,
initData: initData,
handleEvent: function(event) {
switch (event.type) {
case "keystatuseschange":
self.notify(MediaPlayer.models.ProtectionModel.eventList.ENAME_KEY_STATUSES_CHANGED, this);
break;
case "message":
self.notify(MediaPlayer.models.ProtectionModel.eventList.ENAME_KEY_MESSAGE, new MediaPlayer.vo.protection.KeyMessage(this, event.message, undefined, event.messageType));
break;
}
},
getSessionID: function() {
return this.session.sessionId;
},
getExpirationTime: function() {
return this.session.expiration;
},
getKeyStatuses: function() {
return this.session.keyStatuses;
}
};
session.addEventListener("keystatuseschange", token);
session.addEventListener("message", token);
session.closed.then(function() {
removeSession(token);
self.notify(MediaPlayer.models.ProtectionModel.eventList.ENAME_KEY_SESSION_CLOSED, token.getSessionID());
});
sessions.push(token);
return token;
};
return {
system: undefined,
notify: undefined,
subscribe: undefined,
unsubscribe: undefined,
protectionExt: undefined,
keySystem: null,
setup: function() {
eventHandler = createEventHandler.call(this);
},
init: function() {},
teardown: function() {
if (videoElement) {
videoElement.removeEventListener("encrypted", eventHandler);
videoElement.setMediaKeys(null);
}
for (var i = 0; i < sessions.length; i++) {
this.closeKeySession(sessions[i]);
}
},
requestKeySystemAccess: function(ksConfigurations) {
requestKeySystemAccessInternal.call(this, ksConfigurations, 0);
},
selectKeySystem: function(keySystemAccess) {
var self = this;
keySystemAccess.mksa.createMediaKeys().then(function(mkeys) {
self.keySystem = keySystemAccess.keySystem;
mediaKeys = mkeys;
if (videoElement) {
videoElement.setMediaKeys(mediaKeys);
}
self.notify(MediaPlayer.models.ProtectionModel.eventList.ENAME_KEY_SYSTEM_SELECTED);
}).catch(function() {
self.notify(MediaPlayer.models.ProtectionModel.eventList.ENAME_KEY_SYSTEM_SELECTED, null, "Error selecting keys system (" + keySystemAccess.keySystem.systemString + ")! Could not create MediaKeys -- TODO");
});
},
setMediaElement: function(mediaElement) {
if (videoElement) {
videoElement.removeEventListener("encrypted", eventHandler);
}
videoElement = mediaElement;
videoElement.addEventListener("encrypted", eventHandler);
if (mediaKeys) {
videoElement.setMediaKeys(mediaKeys);
}
},
setServerCertificate: function(serverCertificate) {
if (!this.keySystem || !mediaKeys) {
throw new Error("Can not set server certificate until you have selected a key system");
}
var self = this;
mediaKeys.setServerCertificate(serverCertificate).then(function() {
self.notify(MediaPlayer.models.ProtectionModel.eventList.ENAME_SERVER_CERTIFICATE_UPDATED);
}).catch(function(error) {
self.notify(MediaPlayer.models.ProtectionModel.eventList.ENAME_SERVER_CERTIFICATE_UPDATED, null, "Error updating server certificate -- " + error.name);
});
},
createKeySession: function(initData, sessionType) {
if (!this.keySystem || !mediaKeys) {
throw new Error("Can not create sessions until you have selected a key system");
}
for (var i = 0; i < sessions.length; i++) {
if (this.protectionExt.initDataEquals(initData, sessions[i].initData)) {
return;
}
}
var session = mediaKeys.createSession(sessionType);
var sessionToken = createSessionToken.call(this, session, initData);
var self = this;
session.generateRequest("cenc", initData).then(function() {
self.notify(MediaPlayer.models.ProtectionModel.eventList.ENAME_KEY_SESSION_CREATED, sessionToken);
}).catch(function(error) {
removeSession(sessionToken);
self.notify(MediaPlayer.models.ProtectionModel.eventList.ENAME_KEY_SESSION_CREATED, null, "Error generating key request -- " + error.name);
});
},
updateKeySession: function(sessionToken, message) {
var session = sessionToken.session;
var self = this;
if (this.protectionExt.isClearKey(this.keySystem)) {
message = message.toJWK();
}
session.update(message).catch(function(error) {
self.notify(MediaPlayer.models.ProtectionModel.eventList.ENAME_KEY_ERROR, new MediaPlayer.vo.protection.KeyError(sessionToken, "Error sending update() message! " + error.name));
});
},
loadKeySession: function(sessionID) {
if (!this.keySystem || !mediaKeys) {
throw new Error("Can not load sessions until you have selected a key system");
}
var session = mediaKeys.createSession();
var self = this;
session.load(sessionID).then(function(success) {
if (success) {
var sessionToken = createSessionToken.call(this, session);
self.notify(MediaPlayer.models.ProtectionModel.eventList.ENAME_KEY_SESSION_CREATED, sessionToken);
} else {
self.notify(MediaPlayer.models.ProtectionModel.eventList.ENAME_KEY_SESSION_CREATED, null, "Could not load session! Invalid Session ID (" + sessionID + ")");
}
}).catch(function(error) {
self.notify(MediaPlayer.models.ProtectionModel.eventList.ENAME_KEY_SESSION_CREATED, null, "Could not load session (" + sessionID + ")! " + error.name);
});
},
removeKeySession: function(sessionToken) {
var session = sessionToken.session;
var self = this;
session.remove().then(function() {
self.notify(MediaPlayer.models.ProtectionModel.eventList.ENAME_KEY_SESSION_REMOVED, sessionToken.getSessionID());
}).catch(function(error) {
self.notify(MediaPlayer.models.ProtectionModel.eventList.ENAME_KEY_SESSION_REMOVED, null, "Error removing session (" + sessionToken.getSessionID() + "). " + error.name);
});
},
closeKeySession: function(sessionToken) {
var session = sessionToken.session;
session.removeEventListener("keystatuseschange", sessionToken);
session.removeEventListener("message", sessionToken);
var self = this;
session.close().catch(function(error) {
self.notify(MediaPlayer.models.ProtectionModel.eventList.ENAME_KEY_SESSION_CLOSED, null, "Error closing session (" + sessionToken.getSessionID() + ") " + error.name);
});
}
};
};
MediaPlayer.models.ProtectionModel_21Jan2015.detect = function(videoElement) {
if (videoElement.onencrypted === undefined || videoElement.mediaKeys === undefined) {
return false;
}
if (navigator.requestMediaKeySystemAccess === undefined || typeof navigator.requestMediaKeySystemAccess !== "function") {
return false;
}
return true;
};
MediaPlayer.models.ProtectionModel_21Jan2015.prototype = {
constructor: MediaPlayer.models.ProtectionModel_21Jan2015
};
MediaPlayer.models.ProtectionModel_3Feb2014 = function() {
var videoElement = null, mediaKeys = null, keySystemAccess = null, api = null, sessions = [], createEventHandler = function() {
var self = this;
return {
handleEvent: function(event) {
switch (event.type) {
case api.needkey:
self.notify(MediaPlayer.models.ProtectionModel.eventList.ENAME_NEED_KEY, new MediaPlayer.vo.protection.NeedKey(event.initData, "cenc"));
break;
}
}
};
}, eventHandler = null, setMediaKeys = function() {
var doSetKeys = function() {
videoElement[api.setMediaKeys](mediaKeys);
this.notify(MediaPlayer.models.ProtectionModel.eventList.ENAME_VIDEO_ELEMENT_SELECTED);
};
if (videoElement.readyState >= 1) {
doSetKeys.call(this);
} else {
videoElement.addEventListener("loadedmetadata", doSetKeys.bind(this));
}
}, createSessionToken = function(keySession, initData) {
var self = this;
return {
prototype: new MediaPlayer.models.SessionToken().prototype,
session: keySession,
initData: initData,
handleEvent: function(event) {
switch (event.type) {
case api.error:
var errorStr = "KeyError";
self.notify(MediaPlayer.models.ProtectionModel.eventList.ENAME_KEY_ERROR, new MediaPlayer.vo.protection.KeyError(this, errorStr));
break;
case api.message:
self.notify(MediaPlayer.models.ProtectionModel.eventList.ENAME_KEY_MESSAGE, new MediaPlayer.vo.protection.KeyMessage(this, event.message, event.destinationURL));
break;
case api.ready:
self.notify(MediaPlayer.models.ProtectionModel.eventList.ENAME_KEY_ADDED, this);
break;
case api.close:
self.notify(MediaPlayer.models.ProtectionModel.eventList.ENAME_KEY_SESSION_CLOSED, this.getSessionID());
break;
}
},
getSessionID: function() {
return this.session.sessionId;
}
};
};
return {
system: undefined,
notify: undefined,
subscribe: undefined,
unsubscribe: undefined,
protectionExt: undefined,
keySystem: null,
setup: function() {
eventHandler = createEventHandler.call(this);
},
init: function() {
var tmpVideoElement = document.createElement("video");
api = MediaPlayer.models.ProtectionModel_3Feb2014.detect(tmpVideoElement);
},
teardown: function() {
if (videoElement) {
videoElement.removeEventListener(api.needkey, eventHandler);
}
for (var i = 0; i < sessions.length; i++) {
this.closeKeySession(sessions[i]);
}
},
requestKeySystemAccess: function(ksConfigurations) {
var found = false;
for (var ksIdx = 0; ksIdx < ksConfigurations.length; ksIdx++) {
var systemString = ksConfigurations[ksIdx].ks.systemString;
var configs = ksConfigurations[ksIdx].configs;
var supportedAudio = null;
var supportedVideo = null;
for (var configIdx = 0; configIdx < configs.length; configIdx++) {
var audios = configs[configIdx].audioCapabilities;
var videos = configs[configIdx].videoCapabilities;
if (audios && audios.length !== 0) {
supportedAudio = [];
for (var audioIdx = 0; audioIdx < audios.length; audioIdx++) {
if (window[api.MediaKeys].isTypeSupported(systemString, audios[audioIdx].contentType)) {
supportedAudio.push(audios[audioIdx]);
}
}
}
if (videos && videos.length !== 0) {
supportedVideo = [];
for (var videoIdx = 0; videoIdx < videos.length; videoIdx++) {
if (window[api.MediaKeys].isTypeSupported(systemString, videos[videoIdx].contentType)) {
supportedVideo.push(videos[videoIdx]);
}
}
}
if (!supportedAudio && !supportedVideo || supportedAudio && supportedAudio.length === 0 || supportedVideo && supportedVideo.length === 0) {
continue;
}
found = true;
var ksConfig = new MediaPlayer.vo.protection.KeySystemConfiguration(supportedAudio, supportedVideo);
var ks = this.protectionExt.getKeySystemBySystemString(systemString);
var ksAccess = new MediaPlayer.vo.protection.KeySystemAccess(ks, ksConfig);
this.notify(MediaPlayer.models.ProtectionModel.eventList.ENAME_KEY_SYSTEM_ACCESS_COMPLETE, ksAccess);
break;
}
}
if (!found) {
this.notify(MediaPlayer.models.ProtectionModel.eventList.ENAME_KEY_SYSTEM_ACCESS_COMPLETE, null, "Key system access denied! -- No valid audio/video content configurations detected!");
}
},
selectKeySystem: function(ksAccess) {
try {
mediaKeys = ksAccess.mediaKeys = new window[api.MediaKeys](ksAccess.keySystem.systemString);
this.keySystem = ksAccess.keySystem;
keySystemAccess = ksAccess;
if (videoElement) {
setMediaKeys.call(this);
}
this.notify(MediaPlayer.models.ProtectionModel.eventList.ENAME_KEY_SYSTEM_SELECTED);
} catch (error) {
this.notify(MediaPlayer.models.ProtectionModel.eventList.ENAME_KEY_SYSTEM_SELECTED, null, "Error selecting keys system (" + this.keySystem.systemString + ")! Could not create MediaKeys -- TODO");
}
},
setMediaElement: function(mediaElement) {
if (videoElement) {
videoElement.removeEventListener(api.needkey, eventHandler);
}
videoElement = mediaElement;
videoElement.addEventListener(api.needkey, eventHandler);
if (mediaKeys) {
setMediaKeys.call(this);
}
},
createKeySession: function(initData) {
if (!this.keySystem || !mediaKeys || !keySystemAccess) {
throw new Error("Can not create sessions until you have selected a key system");
}
for (var i = 0; i < sessions.length; i++) {
if (this.protectionExt.initDataEquals(initData, sessions[i].initData)) {
return;
}
}
var contentType = keySystemAccess.ksConfiguration.videoCapabilities[0].contentType;
var session = mediaKeys.createSession(contentType, new Uint8Array(initData));
var sessionToken = createSessionToken.call(this, session, initData);
session.addEventListener(api.error, sessionToken);
session.addEventListener(api.message, sessionToken);
session.addEventListener(api.ready, sessionToken);
session.addEventListener(api.close, sessionToken);
sessions.push(sessionToken);
this.notify(MediaPlayer.models.ProtectionModel.eventList.ENAME_KEY_SESSION_CREATED, sessionToken);
},
updateKeySession: function(sessionToken, message) {
var session = sessionToken.session;
if (!this.protectionExt.isClearKey(this.keySystem)) {
session.update(message);
} else {
session.update(new Uint8Array(message.toJWK()));
}
},
closeKeySession: function(sessionToken) {
var session = sessionToken.session;
session.removeEventListener(api.error, sessionToken);
session.removeEventListener(api.message, sessionToken);
session.removeEventListener(api.ready, sessionToken);
session.removeEventListener(api.close, sessionToken);
for (var i = 0; i < sessions.length; i++) {
if (sessions[i] === sessionToken) {
sessions.splice(i, 1);
break;
}
}
session[api.release]();
},
setServerCertificate: function() {},
loadKeySession: function() {},
removeKeySession: function() {}
};
};
MediaPlayer.models.ProtectionModel_3Feb2014.APIs = [ {
setMediaKeys: "setMediaKeys",
MediaKeys: "MediaKeys",
release: "close",
needkey: "needkey",
error: "keyerror",
message: "keymessage",
ready: "keyadded",
close: "keyclose"
}, {
setMediaKeys: "msSetMediaKeys",
MediaKeys: "MSMediaKeys",
release: "close",
needkey: "msneedkey",
error: "mskeyerror",
message: "mskeymessage",
ready: "mskeyadded",
close: "mskeyclose"
} ];
MediaPlayer.models.ProtectionModel_3Feb2014.detect = function(videoElement) {
var apis = MediaPlayer.models.ProtectionModel_3Feb2014.APIs;
for (var i = 0; i < apis.length; i++) {
var api = apis[i];
if (typeof videoElement[api.setMediaKeys] !== "function") {
continue;
}
if (typeof window[api.MediaKeys] !== "function") {
continue;
}
return api;
}
return null;
};
MediaPlayer.models.ProtectionModel_3Feb2014.prototype = {
constructor: MediaPlayer.models.ProtectionModel_3Feb2014
};
MediaPlayer.models.URIQueryAndFragmentModel = function() {
"use strict";
var URIFragmentDataVO = new MediaPlayer.vo.URIFragmentData(), URIQueryData = [], parseURI = function(uri) {
if (!uri) return null;
var URIFragmentData = [], testQuery = new RegExp(/[?]/), testFragment = new RegExp(/[#]/), isQuery = testQuery.test(uri), isFragment = testFragment.test(uri), mappedArr;
function reduceArray(previousValue, currentValue, index, array) {
var arr = array[0].split(/[=]/);
array.push({
key: arr[0],
value: arr[1]
});
array.shift();
return array;
}
function mapArray(currentValue, index, array) {
if (index > 0) {
if (isQuery && URIQueryData.length === 0) {
URIQueryData = array[index].split(/[&]/);
} else if (isFragment) {
URIFragmentData = array[index].split(/[&]/);
}
}
return array;
}
mappedArr = uri.split(/[?#]/).map(mapArray);
if (URIQueryData.length > 0) {
URIQueryData = URIQueryData.reduce(reduceArray, null);
}
if (URIFragmentData.length > 0) {
URIFragmentData = URIFragmentData.reduce(reduceArray, null);
URIFragmentData.forEach(function(object) {
URIFragmentDataVO[object.key] = object.value;
});
}
return uri;
};
return {
parseURI: parseURI,
getURIFragmentData: function() {
return URIFragmentDataVO;
},
getURIQueryData: function() {
return URIQueryData;
},
reset: function() {
URIFragmentDataVO = new MediaPlayer.vo.URIFragmentData();
URIQueryData = [];
}
};
};
MediaPlayer.models.URIQueryAndFragmentModel.prototype = {
constructor: MediaPlayer.models.URIQueryAndFragmentModel
};
MediaPlayer.models.VideoModel = function() {
"use strict";
var element, stalledStreams = [], isStalled = function() {
return stalledStreams.length > 0;
}, addStalledStream = function(type) {
if (type === null || element.seeking) {
return;
}
this.setPlaybackRate(0);
if (stalledStreams[type] === true) {
return;
}
stalledStreams.push(type);
stalledStreams[type] = true;
}, removeStalledStream = function(type) {
if (type === null) {
return;
}
stalledStreams[type] = false;
var index = stalledStreams.indexOf(type);
if (index !== -1) {
stalledStreams.splice(index, 1);
}
if (isStalled() === false) {
this.setPlaybackRate(1);
}
}, stallStream = function(type, isStalled) {
if (isStalled) {
addStalledStream.call(this, type);
} else {
removeStalledStream.call(this, type);
}
};
return {
system: undefined,
play: function() {
element.play();
},
pause: function() {
element.pause();
},
isPaused: function() {
return element.paused;
},
getPlaybackRate: function() {
return element.playbackRate;
},
setPlaybackRate: function(value) {
if (!element || element.readyState < 2) return;
element.playbackRate = value;
},
getCurrentTime: function() {
return element.currentTime;
},
setCurrentTime: function(currentTime) {
if (element.currentTime == currentTime) return;
try {
element.currentTime = currentTime;
} catch (e) {
if (element.readyState === 0 && e.code === e.INVALID_STATE_ERR) {
setTimeout(function() {
element.currentTime = currentTime;
}, 400);
}
}
},
setStallState: function(type, state) {
stallStream.call(this, type, state);
},
listen: function(type, callback) {
element.addEventListener(type, callback, false);
},
unlisten: function(type, callback) {
element.removeEventListener(type, callback, false);
},
getElement: function() {
return element;
},
setElement: function(value) {
element = value;
},
setSource: function(source) {
try{
element.src = source;
}catch(e){
console.error("dash player setSource error:" + e);
}
}
};
};
MediaPlayer.models.VideoModel.prototype = {
constructor: MediaPlayer.models.VideoModel
};
MediaPlayer.dependencies.protection.CommonEncryption = {
findCencContentProtection: function(cpArray) {
var retVal = null;
for (var i = 0; i < cpArray.length; ++i) {
var cp = cpArray[i];
if (cp.schemeIdUri.toLowerCase() === "urn:mpeg:dash:mp4protection:2011" && cp.value.toLowerCase() === "cenc") retVal = cp;
}
return retVal;
},
getPSSHData: function(pssh) {
return pssh.slice(32);
},
getPSSHForKeySystem: function(keySystem, initData) {
var psshList = MediaPlayer.dependencies.protection.CommonEncryption.parsePSSHList(initData);
if (psshList.hasOwnProperty(keySystem.uuid.toLowerCase())) {
return psshList[keySystem.uuid.toLowerCase()];
}
return null;
},
parseInitDataFromContentProtection: function(cpData) {
if ("pssh" in cpData) {
return BASE64.decodeArray(cpData.pssh.__text).buffer;
}
return null;
},
parsePSSHList: function(data) {
if (data === null) return [];
var dv = new DataView(data), done = false;
var pssh = {};
var byteCursor = 0;
while (!done) {
var size, nextBox, version, systemID, psshDataSize, boxStart = byteCursor;
if (byteCursor >= dv.buffer.byteLength) break;
size = dv.getUint32(byteCursor);
nextBox = byteCursor + size;
byteCursor += 4;
if (dv.getUint32(byteCursor) !== 1886614376) {
byteCursor = nextBox;
continue;
}
byteCursor += 4;
version = dv.getUint8(byteCursor);
if (version !== 0 && version !== 1) {
byteCursor = nextBox;
continue;
}
byteCursor += 1;
byteCursor += 3;
systemID = "";
var i, val;
for (i = 0; i < 4; i++) {
val = dv.getUint8(byteCursor + i).toString(16);
systemID += val.length === 1 ? "0" + val : val;
}
byteCursor += 4;
systemID += "-";
for (i = 0; i < 2; i++) {
val = dv.getUint8(byteCursor + i).toString(16);
systemID += val.length === 1 ? "0" + val : val;
}
byteCursor += 2;
systemID += "-";
for (i = 0; i < 2; i++) {
val = dv.getUint8(byteCursor + i).toString(16);
systemID += val.length === 1 ? "0" + val : val;
}
byteCursor += 2;
systemID += "-";
for (i = 0; i < 2; i++) {
val = dv.getUint8(byteCursor + i).toString(16);
systemID += val.length === 1 ? "0" + val : val;
}
byteCursor += 2;
systemID += "-";
for (i = 0; i < 6; i++) {
val = dv.getUint8(byteCursor + i).toString(16);
systemID += val.length === 1 ? "0" + val : val;
}
byteCursor += 6;
systemID = systemID.toLowerCase();
psshDataSize = dv.getUint32(byteCursor);
byteCursor += 4;
pssh[systemID] = dv.buffer.slice(boxStart, nextBox);
byteCursor = nextBox;
}
return pssh;
}
};
MediaPlayer.dependencies.protection.KeySystem = {
eventList: {
ENAME_LICENSE_REQUEST_COMPLETE: "licenseRequestComplete"
}
};
MediaPlayer.dependencies.protection.KeySystem_Access = function() {
"use strict";
};
MediaPlayer.dependencies.protection.KeySystem_Access.prototype = {
constructor: MediaPlayer.dependencies.protection.KeySystem_Access
};
MediaPlayer.dependencies.protection.KeySystem_ClearKey = function() {
"use strict";
var keySystemStr = "org.w3.clearkey", keySystemUUID = "1077efec-c0b2-4d02-ace3-3c1e52e2fb4b";
return {
system: undefined,
schemeIdURI: "urn:uuid:" + keySystemUUID,
systemString: keySystemStr,
uuid: keySystemUUID,
getInitData: MediaPlayer.dependencies.protection.CommonEncryption.parseInitDataFromContentProtection,
getRequestHeadersFromMessage: function() {
return null;
},
getLicenseRequestFromMessage: function(message) {
return new Uint8Array(message);
}
};
};
MediaPlayer.dependencies.protection.KeySystem_ClearKey.prototype = {
constructor: MediaPlayer.dependencies.protection.KeySystem_ClearKey
};
MediaPlayer.dependencies.protection.KeySystem_PlayReady = function() {
"use strict";
var keySystemStr = "com.microsoft.playready", keySystemUUID = "9a04f079-9840-4286-ab92-e65be0885f95", getRequestHeaders = function(message) {
var msg, xmlDoc, headers = {}, parser = new DOMParser();
msg = String.fromCharCode.apply(null, new Uint16Array(message.buffer));
xmlDoc = parser.parseFromString(msg, "application/xml");
var headerNameList = xmlDoc.getElementsByTagName("name");
var headerValueList = xmlDoc.getElementsByTagName("value");
for (var i = 0; i < headerNameList.length; i++) {
headers[headerNameList[i].childNodes[0].nodeValue] = headerValueList[i].childNodes[0].nodeValue;
}
return headers;
}, getLicenseRequest = function(message) {
var msg, xmlDoc, parser = new DOMParser(), licenseRequest = null;
msg = String.fromCharCode.apply(null, new Uint16Array(message.buffer));
xmlDoc = parser.parseFromString(msg, "application/xml");
if (xmlDoc.getElementsByTagName("Challenge")[0]) {
var Challenge = xmlDoc.getElementsByTagName("Challenge")[0].childNodes[0].nodeValue;
if (Challenge) {
licenseRequest = BASE64.decode(Challenge);
}
}
return licenseRequest;
}, parseInitDataFromContentProtection = function(cpData) {
var byteCursor = 0, PROSize, PSSHSize, PSSHBoxType = new Uint8Array([ 112, 115, 115, 104, 0, 0, 0, 0 ]), playreadySystemID = new Uint8Array([ 154, 4, 240, 121, 152, 64, 66, 134, 171, 146, 230, 91, 224, 136, 95, 149 ]), uint8arraydecodedPROHeader = null, PSSHBoxBuffer, PSSHBox, PSSHData;
if ("pssh" in cpData) {
return MediaPlayer.dependencies.protection.CommonEncryption.parseInitDataFromContentProtection(cpData);
}
if ("pro" in cpData) {
uint8arraydecodedPROHeader = BASE64.decodeArray(cpData.pro.__text);
} else if ("prheader" in cpData) {
uint8arraydecodedPROHeader = BASE64.decodeArray(cpData.prheader.__text);
} else {
return null;
}
PROSize = uint8arraydecodedPROHeader.length;
PSSHSize = 4 + PSSHBoxType.length + playreadySystemID.length + 4 + PROSize;
PSSHBoxBuffer = new ArrayBuffer(PSSHSize);
PSSHBox = new Uint8Array(PSSHBoxBuffer);
PSSHData = new DataView(PSSHBoxBuffer);
PSSHData.setUint32(byteCursor, PSSHSize);
byteCursor += 4;
PSSHBox.set(PSSHBoxType, byteCursor);
byteCursor += PSSHBoxType.length;
PSSHBox.set(playreadySystemID, byteCursor);
byteCursor += playreadySystemID.length;
PSSHData.setUint32(byteCursor, PROSize);
byteCursor += 4;
PSSHBox.set(uint8arraydecodedPROHeader, byteCursor);
byteCursor += PROSize;
return PSSHBox.buffer;
};
return {
schemeIdURI: "urn:uuid:" + keySystemUUID,
systemString: keySystemStr,
uuid: keySystemUUID,
getInitData: parseInitDataFromContentProtection,
getRequestHeadersFromMessage: getRequestHeaders,
getLicenseRequestFromMessage: getLicenseRequest
};
};
MediaPlayer.dependencies.protection.KeySystem_PlayReady.prototype = {
constructor: MediaPlayer.dependencies.protection.KeySystem_PlayReady
};
MediaPlayer.dependencies.protection.KeySystem_Widevine = function() {
"use strict";
var keySystemStr = "com.widevine.alpha", keySystemUUID = "edef8ba9-79d6-4ace-a3c8-27dcd51d21ed";
return {
schemeIdURI: "urn:uuid:" + keySystemUUID,
systemString: keySystemStr,
uuid: keySystemUUID,
getInitData: MediaPlayer.dependencies.protection.CommonEncryption.parseInitDataFromContentProtection,
getRequestHeadersFromMessage: function() {
return null;
},
getLicenseRequestFromMessage: function(message) {
return new Uint8Array(message);
}
};
};
MediaPlayer.dependencies.protection.KeySystem_Widevine.prototype = {
constructor: MediaPlayer.dependencies.protection.KeySystem_Widevine
};
MediaPlayer.dependencies.protection.servers.ClearKey = function() {
"use strict";
return {
getServerURLFromMessage: function(url, message) {
var jsonMsg = JSON.parse(String.fromCharCode.apply(null, new Uint8Array(message)));
url += "/?";
for (var i = 0; i < jsonMsg.kids.length; i++) {
url += jsonMsg.kids[i] + "&";
}
url = url.substring(0, url.length - 1);
return url;
},
getHTTPMethod: function() {
return "GET";
},
getResponseType: function() {
return "json";
},
getLicenseMessage: function(serverResponse) {
if (!serverResponse.hasOwnProperty("keys")) {
return null;
}
var i, keyPairs = [];
for (i = 0; i < serverResponse.keys.length; i++) {
var keypair = serverResponse.keys[i], keyid = keypair.kid.replace(/=/g, ""), key = keypair.k.replace(/=/g, "");
keyPairs.push(new MediaPlayer.vo.protection.KeyPair(keyid, key));
}
return new MediaPlayer.vo.protection.ClearKeyKeySet(keyPairs);
},
getErrorResponse: function(serverResponse) {
return String.fromCharCode.apply(null, new Uint8Array(serverResponse));
},
getClearKeysFromProtectionData: function(protData, message) {
var clearkeySet = null;
if (protData) {
var jsonMsg = JSON.parse(String.fromCharCode.apply(null, new Uint8Array(message)));
var keyPairs = [];
for (var i = 0; i < jsonMsg.kids.length; i++) {
var clearkeyID = jsonMsg.kids[i], clearkey = protData.clearkeys.hasOwnProperty(clearkeyID) ? protData.clearkeys[clearkeyID] : null;
if (!clearkey) {
throw new Error("DRM: ClearKey keyID (" + clearkeyID + ") is not known!");
}
keyPairs.push(new MediaPlayer.vo.protection.KeyPair(clearkeyID, clearkey));
}
clearkeySet = new MediaPlayer.vo.protection.ClearKeyKeySet(keyPairs);
}
return clearkeySet;
}
};
};
MediaPlayer.dependencies.protection.servers.ClearKey.prototype = {
constructor: MediaPlayer.dependencies.protection.servers.ClearKey
};
MediaPlayer.dependencies.protection.servers.DRMToday = function() {
"use strict";
var keySystems = {
"com.widevine.alpha": {
responseType: "json",
getLicenseMessage: function(response) {
return new Uint8Array(BASE64.decodeArray(response.license));
},
getErrorResponse: function(response) {
return response;
}
},
"com.microsoft.playready": {
responseType: "arraybuffer",
getLicenseMessage: function(response) {
return new Uint8Array(response);
},
getErrorResponse: function(response) {
return String.fromCharCode.apply(null, new Uint8Array(response));
}
}
};
return {
getServerURLFromMessage: function(url) {
return url;
},
getHTTPMethod: function() {
return "POST";
},
getResponseType: function(keySystemStr) {
return keySystems[keySystemStr].responseType;
},
getLicenseMessage: function(serverResponse, keySystemStr) {
return keySystems[keySystemStr].getLicenseMessage(serverResponse);
},
getErrorResponse: function(serverResponse, keySystemStr) {
return keySystems[keySystemStr].getErrorResponse(serverResponse);
}
};
};
MediaPlayer.dependencies.protection.servers.DRMToday.prototype = {
constructor: MediaPlayer.dependencies.protection.servers.DRMToday
};
MediaPlayer.dependencies.protection.servers.PlayReady = function() {
"use strict";
return {
getServerURLFromMessage: function(url) {
return url;
},
getHTTPMethod: function() {
return "POST";
},
getResponseType: function() {
return "arraybuffer";
},
getLicenseMessage: function(serverResponse) {
return new Uint8Array(serverResponse);
},
getErrorResponse: function(serverResponse) {
return String.fromCharCode.apply(null, new Uint8Array(serverResponse));
}
};
};
MediaPlayer.dependencies.protection.servers.PlayReady.prototype = {
constructor: MediaPlayer.dependencies.protection.servers.PlayReady
};
MediaPlayer.dependencies.protection.servers.Widevine = function() {
"use strict";
return {
getServerURLFromMessage: function(url) {
return url;
},
getHTTPMethod: function() {
return "POST";
},
getResponseType: function() {
return "arraybuffer";
},
getLicenseMessage: function(serverResponse) {
return new Uint8Array(serverResponse);
},
getErrorResponse: function(serverResponse) {
return String.fromCharCode.apply(null, new Uint8Array(serverResponse));
}
};
};
MediaPlayer.dependencies.protection.servers.Widevine.prototype = {
constructor: MediaPlayer.dependencies.protection.servers.Widevine
};
MediaPlayer.rules.ABRRulesCollection = function() {
"use strict";
var qualitySwitchRules = [], adandonFragmentRules = [];
return {
insufficientBufferRule: undefined,
bufferOccupancyRule: undefined,
throughputRule: undefined,
abandonRequestRule: undefined,
getRules: function(type) {
switch (type) {
case MediaPlayer.rules.ABRRulesCollection.prototype.QUALITY_SWITCH_RULES:
return qualitySwitchRules;
case MediaPlayer.rules.ABRRulesCollection.prototype.ABANDON_FRAGMENT_RULES:
return adandonFragmentRules;
default:
return null;
}
},
setup: function() {
qualitySwitchRules.push(this.insufficientBufferRule);
qualitySwitchRules.push(this.throughputRule);
qualitySwitchRules.push(this.bufferOccupancyRule);
adandonFragmentRules.push(this.abandonRequestRule);
}
};
};
MediaPlayer.rules.ABRRulesCollection.prototype = {
constructor: MediaPlayer.rules.ABRRulesCollection,
QUALITY_SWITCH_RULES: "qualitySwitchRules",
ABANDON_FRAGMENT_RULES: "abandonFragmentRules"
};
MediaPlayer.rules.AbandonRequestsRule = function() {
"use strict";
var GRACE_TIME_THRESHOLD = 500, ABANDON_MULTIPLIER = 1.5, fragmentDict = {}, abandonDict = {}, setFragmentRequestDict = function(type, id) {
fragmentDict[type] = fragmentDict[type] || {};
fragmentDict[type][id] = fragmentDict[type][id] || {};
};
return {
metricsExt: undefined,
log: undefined,
execute: function(context, callback) {
var now = new Date().getTime(), mediaInfo = context.getMediaInfo(), mediaType = mediaInfo.type, progressEvent = context.getCurrentValue(), trackInfo = context.getTrackInfo(), req = progressEvent.data.request, abrController = context.getStreamProcessor().getABRController(), fragmentInfo, switchRequest = new MediaPlayer.rules.SwitchRequest(MediaPlayer.rules.SwitchRequest.prototype.NO_CHANGE, MediaPlayer.rules.SwitchRequest.prototype.WEAK);
if (!isNaN(req.index)) {
setFragmentRequestDict(mediaType, req.index);
fragmentInfo = fragmentDict[mediaType][req.index];
if (fragmentInfo === null || req.firstByteDate === null || abandonDict.hasOwnProperty(fragmentInfo.id)) {
callback(switchRequest);
return;
}
if (fragmentInfo.firstByteTime === undefined) {
fragmentInfo.firstByteTime = req.firstByteDate.getTime();
fragmentInfo.segmentDuration = req.duration;
fragmentInfo.bytesTotal = req.bytesTotal;
fragmentInfo.id = req.index;
}
fragmentInfo.bytesLoaded = req.bytesLoaded;
fragmentInfo.elapsedTime = now - fragmentInfo.firstByteTime;
if (fragmentInfo.bytesLoaded < fragmentInfo.bytesTotal && fragmentInfo.elapsedTime >= GRACE_TIME_THRESHOLD) {
fragmentInfo.measuredBandwidthInKbps = Math.round(fragmentInfo.bytesLoaded * 8 / fragmentInfo.elapsedTime);
fragmentInfo.estimatedTimeOfDownload = (fragmentInfo.bytesTotal * 8 * .001 / fragmentInfo.measuredBandwidthInKbps).toFixed(2);
if (fragmentInfo.estimatedTimeOfDownload < fragmentInfo.segmentDuration * ABANDON_MULTIPLIER || trackInfo.quality === 0) {
callback(switchRequest);
return;
} else if (!abandonDict.hasOwnProperty(fragmentInfo.id)) {
var newQuality = abrController.getQualityForBitrate(mediaInfo, fragmentInfo.measuredBandwidthInKbps * MediaPlayer.dependencies.AbrController.BANDWIDTH_SAFETY);
switchRequest = new MediaPlayer.rules.SwitchRequest(newQuality, MediaPlayer.rules.SwitchRequest.prototype.STRONG);
abandonDict[fragmentInfo.id] = fragmentInfo;
this.log("AbandonRequestsRule ( ", mediaType, "frag id", fragmentInfo.id, ") is asking to abandon and switch to quality to ", newQuality, " measured bandwidth was", fragmentInfo.measuredBandwidthInKbps);
delete fragmentDict[mediaType][fragmentInfo.id];
}
} else if (fragmentInfo.bytesLoaded === fragmentInfo.bytesTotal) {
delete fragmentDict[mediaType][fragmentInfo.id];
}
}
callback(switchRequest);
},
reset: function() {
fragmentDict = {};
abandonDict = {};
}
};
};
MediaPlayer.rules.AbandonRequestsRule.prototype = {
constructor: MediaPlayer.rules.AbandonRequestsRule
};
MediaPlayer.rules.BufferOccupancyRule = function() {
"use strict";
var lastSwitchTime = 0;
return {
log: undefined,
metricsModel: undefined,
execute: function(context, callback) {
var self = this, now = new Date().getTime() / 1e3, mediaInfo = context.getMediaInfo(), trackInfo = context.getTrackInfo(), mediaType = mediaInfo.type, waitToSwitchTime = !isNaN(trackInfo.fragmentDuration) ? trackInfo.fragmentDuration / 2 : 2, current = context.getCurrentValue(), streamProcessor = context.getStreamProcessor(), abrController = streamProcessor.getABRController(), metrics = this.metricsModel.getReadOnlyMetricsFor(mediaType), lastBufferLevelVO = metrics.BufferLevel.length > 0 ? metrics.BufferLevel[metrics.BufferLevel.length - 1] : null, lastBufferStateVO = metrics.BufferState.length > 0 ? metrics.BufferState[metrics.BufferState.length - 1] : null, isBufferRich = false, maxIndex = mediaInfo.trackCount - 1, switchRequest = new MediaPlayer.rules.SwitchRequest(MediaPlayer.rules.SwitchRequest.prototype.NO_CHANGE, MediaPlayer.rules.SwitchRequest.prototype.WEAK);
if (now - lastSwitchTime < waitToSwitchTime || abrController.getAbandonmentStateFor(mediaType) === MediaPlayer.dependencies.AbrController.ABANDON_LOAD) {
callback(switchRequest);
return;
}
if (lastBufferLevelVO !== null && lastBufferStateVO !== null) {
if (lastBufferLevelVO.level > lastBufferStateVO.target) {
isBufferRich = lastBufferLevelVO.level - lastBufferStateVO.target > MediaPlayer.dependencies.BufferController.RICH_BUFFER_THRESHOLD;
if (isBufferRich && mediaInfo.trackCount > 1) {
switchRequest = new MediaPlayer.rules.SwitchRequest(maxIndex, MediaPlayer.rules.SwitchRequest.prototype.STRONG);
}
}
}
if (switchRequest.value !== MediaPlayer.rules.SwitchRequest.prototype.NO_CHANGE && switchRequest.value !== current) {
self.log("BufferOccupancyRule requesting switch to index: ", switchRequest.value, "type: ", mediaType, " Priority: ", switchRequest.priority === MediaPlayer.rules.SwitchRequest.prototype.DEFAULT ? "Default" : switchRequest.priority === MediaPlayer.rules.SwitchRequest.prototype.STRONG ? "Strong" : "Weak");
}
callback(switchRequest);
},
reset: function() {
lastSwitchTime = 0;
}
};
};
MediaPlayer.rules.BufferOccupancyRule.prototype = {
constructor: MediaPlayer.rules.BufferOccupancyRule
};
MediaPlayer.rules.InsufficientBufferRule = function() {
"use strict";
var bufferStateDict = {}, lastSwitchTime = 0, waitToSwitchTime = 1e3, setBufferInfo = function(type, state) {
bufferStateDict[type] = bufferStateDict[type] || {};
bufferStateDict[type].state = state;
if (state === MediaPlayer.dependencies.BufferController.BUFFER_LOADED && !bufferStateDict[type].firstBufferLoadedEvent) {
bufferStateDict[type].firstBufferLoadedEvent = true;
}
}, onPlaybackSeeking = function() {
bufferStateDict = {};
};
return {
log: undefined,
metricsModel: undefined,
playbackController: undefined,
setup: function() {
this[MediaPlayer.dependencies.PlaybackController.eventList.ENAME_PLAYBACK_SEEKING] = onPlaybackSeeking;
},
execute: function(context, callback) {
var self = this, now = new Date().getTime(), mediaType = context.getMediaInfo().type, current = context.getCurrentValue(), metrics = self.metricsModel.getReadOnlyMetricsFor(mediaType), lastBufferStateVO = metrics.BufferState.length > 0 ? metrics.BufferState[metrics.BufferState.length - 1] : null, switchRequest = new MediaPlayer.rules.SwitchRequest(MediaPlayer.rules.SwitchRequest.prototype.NO_CHANGE, MediaPlayer.rules.SwitchRequest.prototype.WEAK);
if (now - lastSwitchTime < waitToSwitchTime || lastBufferStateVO === null) {
callback(switchRequest);
return;
}
setBufferInfo(mediaType, lastBufferStateVO.state);
if (lastBufferStateVO.state === MediaPlayer.dependencies.BufferController.BUFFER_EMPTY && bufferStateDict[mediaType].firstBufferLoadedEvent !== undefined) {
switchRequest = new MediaPlayer.rules.SwitchRequest(0, MediaPlayer.rules.SwitchRequest.prototype.STRONG);
}
if (switchRequest.value !== MediaPlayer.rules.SwitchRequest.prototype.NO_CHANGE && switchRequest.value !== current) {
self.log("InsufficientBufferRule requesting switch to index: ", switchRequest.value, "type: ", mediaType, " Priority: ", switchRequest.priority === MediaPlayer.rules.SwitchRequest.prototype.DEFAULT ? "Default" : switchRequest.priority === MediaPlayer.rules.SwitchRequest.prototype.STRONG ? "Strong" : "Weak");
}
lastSwitchTime = now;
callback(switchRequest);
},
reset: function() {
bufferStateDict = {};
lastSwitchTime = 0;
}
};
};
MediaPlayer.rules.InsufficientBufferRule.prototype = {
constructor: MediaPlayer.rules.InsufficientBufferRule
};
MediaPlayer.rules.ThroughputRule = function() {
"use strict";
var throughputArray = [], lastSwitchTime = 0, AVERAGE_THROUGHPUT_SAMPLE_AMOUNT_LIVE = 2, AVERAGE_THROUGHPUT_SAMPLE_AMOUNT_VOD = 3, storeLastRequestThroughputByType = function(type, lastRequestThroughput) {
throughputArray[type] = throughputArray[type] || [];
if (lastRequestThroughput !== Infinity && lastRequestThroughput !== throughputArray[type][throughputArray[type].length - 1]) {
throughputArray[type].push(lastRequestThroughput);
}
}, getAverageThroughput = function(type, isDynamic) {
var averageThroughput = 0, sampleAmount = isDynamic ? AVERAGE_THROUGHPUT_SAMPLE_AMOUNT_LIVE : AVERAGE_THROUGHPUT_SAMPLE_AMOUNT_VOD, arr = throughputArray[type], len = arr.length;
sampleAmount = len < sampleAmount ? len : sampleAmount;
if (len > 0) {
var startValue = len - sampleAmount, totalSampledValue = 0;
for (var i = startValue; i < len; i++) {
totalSampledValue += arr[i];
}
averageThroughput = totalSampledValue / sampleAmount;
}
if (arr.length > sampleAmount) {
arr.shift();
}
return averageThroughput * MediaPlayer.dependencies.AbrController.BANDWIDTH_SAFETY;
};
return {
log: undefined,
metricsExt: undefined,
metricsModel: undefined,
manifestExt: undefined,
manifestModel: undefined,
execute: function(context, callback) {
var self = this, now = new Date().getTime() / 1e3, mediaInfo = context.getMediaInfo(), mediaType = mediaInfo.type, current = context.getCurrentValue(), trackInfo = context.getTrackInfo(), metrics = self.metricsModel.getReadOnlyMetricsFor(mediaType), streamProcessor = context.getStreamProcessor(), abrController = streamProcessor.getABRController(), isDynamic = streamProcessor.isDynamic(), lastRequest = self.metricsExt.getCurrentHttpRequest(metrics), waitToSwitchTime = !isNaN(trackInfo.fragmentDuration) ? trackInfo.fragmentDuration / 2 : 2, downloadTime, averageThroughput, lastRequestThroughput, bufferStateVO = metrics.BufferState.length > 0 ? metrics.BufferState[metrics.BufferState.length - 1] : null, bufferLevelVO = metrics.BufferLevel.length > 0 ? metrics.BufferLevel[metrics.BufferLevel.length - 1] : null, switchRequest = new MediaPlayer.rules.SwitchRequest(MediaPlayer.rules.SwitchRequest.prototype.NO_CHANGE, MediaPlayer.rules.SwitchRequest.prototype.WEAK);
if (now - lastSwitchTime < waitToSwitchTime || !metrics || lastRequest === null || lastRequest.type !== MediaPlayer.vo.metrics.HTTPRequest.MEDIA_SEGMENT_TYPE || bufferStateVO === null || bufferLevelVO === null) {
callback(switchRequest);
return;
}
downloadTime = (lastRequest.tfinish.getTime() - lastRequest.tresponse.getTime()) / 1e3;
lastRequestThroughput = Math.round(lastRequest.trace[lastRequest.trace.length - 1].b * 8 / downloadTime);
storeLastRequestThroughputByType(mediaType, lastRequestThroughput);
averageThroughput = Math.round(getAverageThroughput(mediaType, isDynamic));
if (abrController.getAbandonmentStateFor(mediaType) !== MediaPlayer.dependencies.AbrController.ABANDON_LOAD) {
if (bufferStateVO.state === MediaPlayer.dependencies.BufferController.BUFFER_LOADED && (bufferLevelVO.level >= MediaPlayer.dependencies.BufferController.LOW_BUFFER_THRESHOLD * 2 || isDynamic)) {
var newQuality = abrController.getQualityForBitrate(mediaInfo, averageThroughput / 1e3);
switchRequest = new MediaPlayer.rules.SwitchRequest(newQuality, MediaPlayer.rules.SwitchRequest.prototype.DEFAULT);
}
if (switchRequest.value !== MediaPlayer.rules.SwitchRequest.prototype.NO_CHANGE && switchRequest.value !== current) {
self.log("ThroughputRule requesting switch to index: ", switchRequest.value, "type: ", mediaType, " Priority: ", switchRequest.priority === MediaPlayer.rules.SwitchRequest.prototype.DEFAULT ? "Default" : switchRequest.priority === MediaPlayer.rules.SwitchRequest.prototype.STRONG ? "Strong" : "Weak", "Average throughput", Math.round(averageThroughput / 1024), "kbps");
}
}
callback(switchRequest);
},
reset: function() {
throughputArray = [];
lastSwitchTime = 0;
}
};
};
MediaPlayer.rules.ThroughputRule.prototype = {
constructor: MediaPlayer.rules.ThroughputRule
};
MediaPlayer.rules.RulesContext = function(streamProcessor, currentValue) {
"use strict";
var trackInfo = streamProcessor.getCurrentTrack(), sp = streamProcessor;
return {
getStreamInfo: function() {
return trackInfo.mediaInfo.streamInfo;
},
getMediaInfo: function() {
return trackInfo.mediaInfo;
},
getTrackInfo: function() {
return trackInfo;
},
getCurrentValue: function() {
return currentValue;
},
getManifestInfo: function() {
return trackInfo.mediaInfo.streamInfo.manifestInfo;
},
getStreamProcessor: function() {
return sp;
}
};
};
MediaPlayer.rules.RulesContext.prototype = {
constructor: MediaPlayer.rules.RulesContext
};
MediaPlayer.rules.RulesController = function() {
"use strict";
var rules = {}, ruleMandatoryProperties = [ "execute" ], isRuleTypeSupported = function(ruleType) {
return ruleType === this.SCHEDULING_RULE || ruleType === this.ABR_RULE;
}, isRule = function(obj) {
var ln = ruleMandatoryProperties.length, i = 0;
for (i; i < ln; i += 1) {
if (!obj.hasOwnProperty(ruleMandatoryProperties[i])) return false;
}
return true;
}, getRulesContext = function(streamProcessor, currentValue) {
return new MediaPlayer.rules.RulesContext(streamProcessor, currentValue);
}, normalizeRule = function(rule) {
var exec = rule.execute.bind(rule);
rule.execute = function(context, callback) {
var normalizedCallback = function(result) {
callback.call(rule, new MediaPlayer.rules.SwitchRequest(result.value, result.priority));
};
exec(context, normalizedCallback);
};
if (typeof rule.reset !== "function") {
rule.reset = function() {};
}
return rule;
}, updateRules = function(currentRulesCollection, newRulesCollection, override) {
var rule, ruleSubType, subTypeRuleSet, ruleArr, ln, i;
for (ruleSubType in newRulesCollection) {
ruleArr = newRulesCollection[ruleSubType];
ln = ruleArr.length;
if (!ln) continue;
for (i = 0; i < ln; i += 1) {
rule = ruleArr[i];
if (!isRule.call(this, rule)) continue;
rule = normalizeRule.call(this, rule);
subTypeRuleSet = currentRulesCollection.getRules(ruleSubType);
if (override) {
override = false;
subTypeRuleSet.length = 0;
}
this.system.injectInto(rule);
subTypeRuleSet.push(rule);
}
}
};
return {
system: undefined,
log: undefined,
SCHEDULING_RULE: 0,
ABR_RULE: 1,
SYNC_RULE: 2,
initialize: function() {
rules[this.ABR_RULE] = this.system.getObject("abrRulesCollection");
rules[this.SCHEDULING_RULE] = this.system.getObject("scheduleRulesCollection");
rules[this.SYNC_RULE] = this.system.getObject("synchronizationRulesCollection");
},
setRules: function(ruleType, rulesCollection) {
if (!isRuleTypeSupported.call(this, ruleType) || !rulesCollection) return;
updateRules.call(this, rules[ruleType], rulesCollection, true);
},
addRules: function(ruleType, rulesCollection) {
if (!isRuleTypeSupported.call(this, ruleType) || !rulesCollection) return;
updateRules.call(this, rules[ruleType], rulesCollection, false);
},
applyRules: function(rulesArr, streamProcessor, callback, current, overrideFunc) {
var rulesCount = rulesArr.length, ln = rulesCount, values = {}, rulesContext = getRulesContext.call(this, streamProcessor, current), rule, i, callbackFunc = function(result) {
var value, confidence;
if (result.value !== MediaPlayer.rules.SwitchRequest.prototype.NO_CHANGE) {
values[result.priority] = overrideFunc(values[result.priority], result.value);
}
if (--rulesCount) return;
if (values[MediaPlayer.rules.SwitchRequest.prototype.WEAK] !== MediaPlayer.rules.SwitchRequest.prototype.NO_CHANGE) {
confidence = MediaPlayer.rules.SwitchRequest.prototype.WEAK;
value = values[MediaPlayer.rules.SwitchRequest.prototype.WEAK];
}
if (values[MediaPlayer.rules.SwitchRequest.prototype.DEFAULT] !== MediaPlayer.rules.SwitchRequest.prototype.NO_CHANGE) {
confidence = MediaPlayer.rules.SwitchRequest.prototype.DEFAULT;
value = values[MediaPlayer.rules.SwitchRequest.prototype.DEFAULT];
}
if (values[MediaPlayer.rules.SwitchRequest.prototype.STRONG] !== MediaPlayer.rules.SwitchRequest.prototype.NO_CHANGE) {
confidence = MediaPlayer.rules.SwitchRequest.prototype.STRONG;
value = values[MediaPlayer.rules.SwitchRequest.prototype.STRONG];
}
if (confidence != MediaPlayer.rules.SwitchRequest.prototype.STRONG && confidence != MediaPlayer.rules.SwitchRequest.prototype.WEAK) {
confidence = MediaPlayer.rules.SwitchRequest.prototype.DEFAULT;
}
callback({
value: value !== undefined ? value : current,
confidence: confidence
});
};
values[MediaPlayer.rules.SwitchRequest.prototype.STRONG] = MediaPlayer.rules.SwitchRequest.prototype.NO_CHANGE;
values[MediaPlayer.rules.SwitchRequest.prototype.WEAK] = MediaPlayer.rules.SwitchRequest.prototype.NO_CHANGE;
values[MediaPlayer.rules.SwitchRequest.prototype.DEFAULT] = MediaPlayer.rules.SwitchRequest.prototype.NO_CHANGE;
for (i = 0; i < ln; i += 1) {
rule = rulesArr[i];
if (!isRule.call(this, rule)) {
rulesCount--;
continue;
}
rule.execute(rulesContext, callbackFunc);
}
},
reset: function() {
var abrRules = rules[this.ABR_RULE], schedulingRules = rules[this.SCHEDULING_RULE], synchronizationRules = rules[this.SYNC_RULE], allRules = (abrRules.getRules(MediaPlayer.rules.ABRRulesCollection.prototype.QUALITY_SWITCH_RULES) || []).concat(schedulingRules.getRules(MediaPlayer.rules.ScheduleRulesCollection.prototype.NEXT_FRAGMENT_RULES) || []).concat(schedulingRules.getRules(MediaPlayer.rules.ScheduleRulesCollection.prototype.FRAGMENTS_TO_SCHEDULE_RULES) || []).concat(schedulingRules.getRules(MediaPlayer.rules.ScheduleRulesCollection.prototype.FRAGMENTS_TO_EXECUTE_RULES) || []).concat(synchronizationRules.getRules(MediaPlayer.rules.SynchronizationRulesCollection.prototype.TIME_SYNCHRONIZED_RULES) || []).concat(synchronizationRules.getRules(MediaPlayer.rules.SynchronizationRulesCollection.prototype.BEST_GUESS_RULES) || []), ln = allRules.length, rule, i;
for (i = 0; i < ln; i += 1) {
rule = allRules[i];
if (typeof rule.reset !== "function") continue;
rule.reset();
}
rules = {};
}
};
};
MediaPlayer.rules.RulesController.prototype = {
constructor: MediaPlayer.rules.RulesController
};
MediaPlayer.rules.BufferLevelRule = function() {
"use strict";
var isBufferLevelOutran = {}, isCompleted = {}, scheduleController = {}, getCurrentHttpRequestLatency = function(metrics) {
var httpRequest = this.metricsExt.getCurrentHttpRequest(metrics);
if (httpRequest !== null) {
return (httpRequest.tresponse.getTime() - httpRequest.trequest.getTime()) / 1e3;
}
return 0;
}, decideBufferLength = function(minBufferTime, duration, isDynamic) {
var minBufferTarget;
if (isDynamic) {
minBufferTarget = this.playbackController.getLiveDelay();
} else if (isNaN(duration) || MediaPlayer.dependencies.BufferController.DEFAULT_MIN_BUFFER_TIME < duration && minBufferTime < duration) {
minBufferTarget = Math.max(MediaPlayer.dependencies.BufferController.DEFAULT_MIN_BUFFER_TIME, minBufferTime);
} else if (minBufferTime >= duration) {
minBufferTarget = Math.min(duration, MediaPlayer.dependencies.BufferController.DEFAULT_MIN_BUFFER_TIME);
} else {
minBufferTarget = Math.min(duration, minBufferTime);
}
return minBufferTarget;
}, getRequiredBufferLength = function(isDynamic, duration, scheduleController) {
var self = this, criticalBufferLevel = scheduleController.bufferController.getCriticalBufferLevel(), vmetrics = self.metricsModel.getReadOnlyMetricsFor("video"), ametrics = self.metricsModel.getReadOnlyMetricsFor("audio"), minBufferTarget = decideBufferLength.call(this, scheduleController.bufferController.getMinBufferTime(), duration, isDynamic), currentBufferTarget = minBufferTarget, bufferMax = scheduleController.bufferController.bufferMax, requiredBufferLength = 0;
if (bufferMax === MediaPlayer.dependencies.BufferController.BUFFER_SIZE_MIN) {
requiredBufferLength = minBufferTarget;
} else if (bufferMax === MediaPlayer.dependencies.BufferController.BUFFER_SIZE_INFINITY) {
requiredBufferLength = duration;
} else if (bufferMax === MediaPlayer.dependencies.BufferController.BUFFER_SIZE_REQUIRED) {
if (!isDynamic && self.abrController.isPlayingAtTopQuality(scheduleController.streamProcessor.getStreamInfo())) {
currentBufferTarget = MediaPlayer.dependencies.BufferController.BUFFER_TIME_AT_TOP_QUALITY;
}
requiredBufferLength = currentBufferTarget + Math.max(getCurrentHttpRequestLatency.call(self, vmetrics), getCurrentHttpRequestLatency.call(self, ametrics));
}
requiredBufferLength = Math.min(requiredBufferLength, criticalBufferLevel);
return requiredBufferLength;
}, isCompletedT = function(streamId, type) {
return isCompleted[streamId] && isCompleted[streamId][type];
}, isBufferLevelOutranT = function(streamId, type) {
return isBufferLevelOutran[streamId] && isBufferLevelOutran[streamId][type];
}, onStreamCompleted = function(e) {
var streamId = e.data.fragmentModel.getContext().streamProcessor.getStreamInfo().id;
isCompleted[streamId] = isCompleted[streamId] || {};
isCompleted[streamId][e.data.request.mediaType] = true;
}, onBufferLevelOutrun = function(e) {
var streamId = e.sender.streamProcessor.getStreamInfo().id;
isBufferLevelOutran[streamId] = isBufferLevelOutran[streamId] || {};
isBufferLevelOutran[streamId][e.sender.streamProcessor.getType()] = true;
}, onBufferLevelBalanced = function(e) {
var streamId = e.sender.streamProcessor.getStreamInfo().id;
isBufferLevelOutran[streamId] = isBufferLevelOutran[streamId] || {};
isBufferLevelOutran[streamId][e.sender.streamProcessor.getType()] = false;
};
return {
metricsExt: undefined,
metricsModel: undefined,
abrController: undefined,
playbackController: undefined,
setup: function() {
this[MediaPlayer.dependencies.BufferController.eventList.ENAME_BUFFER_LEVEL_OUTRUN] = onBufferLevelOutrun;
this[MediaPlayer.dependencies.BufferController.eventList.ENAME_BUFFER_LEVEL_BALANCED] = onBufferLevelBalanced;
this[MediaPlayer.dependencies.FragmentController.eventList.ENAME_STREAM_COMPLETED] = onStreamCompleted;
},
setScheduleController: function(scheduleControllerValue) {
var id = scheduleControllerValue.streamProcessor.getStreamInfo().id;
scheduleController[id] = scheduleController[id] || {};
scheduleController[id][scheduleControllerValue.streamProcessor.getType()] = scheduleControllerValue;
},
execute: function(context, callback) {
var streamInfo = context.getStreamInfo(), streamId = streamInfo.id, mediaType = context.getMediaInfo().type;
if (isBufferLevelOutranT(streamId, mediaType)) {
callback(new MediaPlayer.rules.SwitchRequest(0, MediaPlayer.rules.SwitchRequest.prototype.STRONG));
return;
}
var metrics = this.metricsModel.getReadOnlyMetricsFor(mediaType), bufferLevel = this.metricsExt.getCurrentBufferLevel(metrics) ? this.metricsExt.getCurrentBufferLevel(metrics).level : 0, scheduleCtrl = scheduleController[streamId][mediaType], track = scheduleCtrl.streamProcessor.getCurrentTrack(), isDynamic = scheduleCtrl.streamProcessor.isDynamic(), rate = this.metricsExt.getCurrentPlaybackRate(metrics), duration = streamInfo.manifestInfo.duration, bufferedDuration = bufferLevel / Math.max(rate, 1), fragmentDuration = track.fragmentDuration, currentTime = this.playbackController.getTime(), timeToEnd = isDynamic ? Number.POSITIVE_INFINITY : duration - currentTime, requiredBufferLength = Math.min(getRequiredBufferLength.call(this, isDynamic, duration, scheduleCtrl), timeToEnd), remainingDuration = Math.max(requiredBufferLength - bufferedDuration, 0), fragmentCount;
fragmentCount = Math.ceil(remainingDuration / fragmentDuration);
if (bufferedDuration >= timeToEnd && !isCompletedT(streamId, mediaType)) {
fragmentCount = fragmentCount || 1;
}
callback(new MediaPlayer.rules.SwitchRequest(fragmentCount, MediaPlayer.rules.SwitchRequest.prototype.DEFAULT));
},
reset: function() {
isBufferLevelOutran = {};
isCompleted = {};
scheduleController = {};
}
};
};
MediaPlayer.rules.BufferLevelRule.prototype = {
constructor: MediaPlayer.rules.BufferLevelRule
};
MediaPlayer.rules.PendingRequestsRule = function() {
"use strict";
var LIMIT = 3, scheduleController = {};
return {
metricsExt: undefined,
setScheduleController: function(scheduleControllerValue) {
var streamId = scheduleControllerValue.streamProcessor.getStreamInfo().id;
scheduleController[streamId] = scheduleController[streamId] || {};
scheduleController[streamId][scheduleControllerValue.streamProcessor.getType()] = scheduleControllerValue;
},
execute: function(context, callback) {
var mediaType = context.getMediaInfo().type, streamId = context.getStreamInfo().id, current = context.getCurrentValue(), sc = scheduleController[streamId][mediaType], model = sc.getFragmentModel(), requests = model.getRequests({
state: [ MediaPlayer.dependencies.FragmentModel.states.PENDING, MediaPlayer.dependencies.FragmentModel.states.LOADING ]
}), rejectedRequests = model.getRequests({
state: MediaPlayer.dependencies.FragmentModel.states.REJECTED
}), rLn = rejectedRequests.length, ln = requests.length, count = Math.max(current - ln, 0);
if (rLn > 0) {
callback(new MediaPlayer.rules.SwitchRequest(rLn, MediaPlayer.rules.SwitchRequest.prototype.DEFAULT));
return;
}
if (ln > LIMIT) {
callback(new MediaPlayer.rules.SwitchRequest(0, MediaPlayer.rules.SwitchRequest.prototype.DEFAULT));
return;
}
if (current === 0) {
callback(new MediaPlayer.rules.SwitchRequest(count, MediaPlayer.rules.SwitchRequest.prototype.NO_CHANGE));
return;
}
callback(new MediaPlayer.rules.SwitchRequest(count, MediaPlayer.rules.SwitchRequest.prototype.DEFAULT));
},
reset: function() {
scheduleController = {};
}
};
};
MediaPlayer.rules.PendingRequestsRule.prototype = {
constructor: MediaPlayer.rules.PendingRequestsRule
};
MediaPlayer.rules.PlaybackTimeRule = function() {
"use strict";
var seekTarget = {}, scheduleController = {}, onPlaybackSeeking = function(e) {
setTimeout(function() {
var time = e.data.seekTime;
seekTarget.audio = time;
seekTarget.video = time;
seekTarget.fragmentedText = time;
}, 0);
};
return {
adapter: undefined,
sourceBufferExt: undefined,
playbackController: undefined,
setup: function() {
this[MediaPlayer.dependencies.PlaybackController.eventList.ENAME_PLAYBACK_SEEKING] = onPlaybackSeeking;
},
setScheduleController: function(scheduleControllerValue) {
var streamId = scheduleControllerValue.streamProcessor.getStreamInfo().id;
scheduleController[streamId] = scheduleController[streamId] || {};
scheduleController[streamId][scheduleControllerValue.streamProcessor.getType()] = scheduleControllerValue;
},
execute: function(context, callback) {
var mediaType = context.getMediaInfo().type, streamId = context.getStreamInfo().id, sc = scheduleController[streamId][mediaType], EPSILON = .1, streamProcessor = scheduleController[streamId][mediaType].streamProcessor, track = streamProcessor.getCurrentTrack(), st = seekTarget ? seekTarget[mediaType] : null, hasSeekTarget = st !== undefined && st !== null, p = hasSeekTarget ? MediaPlayer.rules.SwitchRequest.prototype.STRONG : MediaPlayer.rules.SwitchRequest.prototype.DEFAULT, rejected = sc.getFragmentModel().getRequests({
state: MediaPlayer.dependencies.FragmentModel.states.REJECTED
})[0], keepIdx = !!rejected && !hasSeekTarget, currentTime = this.adapter.getIndexHandlerTime(streamProcessor), playbackTime = this.playbackController.getTime(), rejectedEnd = rejected ? rejected.startTime + rejected.duration : null, useRejected = !hasSeekTarget && rejected && (rejectedEnd > playbackTime && rejected.startTime <= currentTime || isNaN(currentTime)), buffer = streamProcessor.bufferController.getBuffer(), range = null, time, request;
time = hasSeekTarget ? st : useRejected ? rejected.startTime : currentTime;
if (rejected) {
sc.getFragmentModel().removeRejectedRequest(rejected);
}
if (isNaN(time)) {
callback(new MediaPlayer.rules.SwitchRequest(null, p));
return;
}
if (hasSeekTarget) {
seekTarget[mediaType] = null;
}
if (buffer) {
range = this.sourceBufferExt.getBufferRange(streamProcessor.bufferController.getBuffer(), time);
if (range !== null) {
time = range.end;
}
}
request = this.adapter.getFragmentRequestForTime(streamProcessor, track, time, {
keepIdx: keepIdx
});
if (useRejected && request && request.index !== rejected.index) {
request = this.adapter.getFragmentRequestForTime(streamProcessor, track, rejected.startTime + rejected.duration / 2 + EPSILON, {
keepIdx: keepIdx,
timeThreshold: 0
});
}
while (request && streamProcessor.getFragmentModel().isFragmentLoadedOrPending(request)) {
if (request.action === "complete") {
request = null;
this.adapter.setIndexHandlerTime(streamProcessor, NaN);
break;
}
request = this.adapter.getNextFragmentRequest(streamProcessor, track);
}
if (request && !useRejected) {
this.adapter.setIndexHandlerTime(streamProcessor, request.startTime + request.duration);
}
callback(new MediaPlayer.rules.SwitchRequest(request, p));
},
reset: function() {
seekTarget = {};
scheduleController = {};
}
};
};
MediaPlayer.rules.PlaybackTimeRule.prototype = {
constructor: MediaPlayer.rules.PlaybackTimeRule
};
MediaPlayer.rules.SameTimeRequestRule = function() {
"use strict";
var lastMediaRequestIdxs = {}, findClosestToTime = function(fragmentModels, time) {
var req, r, pendingReqs, i = 0, j, pln, ln = fragmentModels.length;
for (i; i < ln; i += 1) {
pendingReqs = fragmentModels[i].getRequests({
state: MediaPlayer.dependencies.FragmentModel.states.PENDING
});
sortRequestsByProperty.call(this, pendingReqs, "index");
for (j = 0, pln = pendingReqs.length; j < pln; j++) {
req = pendingReqs[j];
if (isNaN(req.startTime) && req.action !== "complete") {
r = req;
break;
}
if (req.startTime > time && (!r || req.startTime < r.startTime)) {
r = req;
}
}
}
return r || req;
}, getForTime = function(fragmentModels, currentTime) {
var ln = fragmentModels.length, req, r = null, i;
for (i = 0; i < ln; i += 1) {
req = fragmentModels[i].getRequests({
state: MediaPlayer.dependencies.FragmentModel.states.PENDING,
time: currentTime
})[0];
if (req && (!r || req.startTime > r.startTime)) {
r = req;
}
}
return r;
}, sortRequestsByProperty = function(requestsArray, sortProp) {
var compare = function(req1, req2) {
if (req1[sortProp] < req2[sortProp] || isNaN(req1[sortProp]) && req1.action !== "complete") return -1;
if (req1[sortProp] > req2[sortProp]) return 1;
return 0;
};
requestsArray.sort(compare);
}, getLastMediaRequestIdx = function(streamId, type) {
return lastMediaRequestIdxs[streamId] && lastMediaRequestIdxs[streamId][type] ? lastMediaRequestIdxs[streamId][type] : NaN;
}, onStreamCompleted = function(e) {
var model = e.data.fragmentModel, req = e.data.request, streamId = model.getContext().streamProcessor.getStreamInfo().id, type = req.mediaType;
lastMediaRequestIdxs[streamId] = lastMediaRequestIdxs[streamId] || {};
lastMediaRequestIdxs[streamId][type] = req.index - 1;
};
return {
playbackController: undefined,
setup: function() {
this[MediaPlayer.dependencies.FragmentController.eventList.ENAME_STREAM_COMPLETED] = onStreamCompleted;
},
setFragmentModels: function(fragmentModels, streamid) {
this.fragmentModels = this.fragmentModels || {};
this.fragmentModels[streamid] = fragmentModels;
},
execute: function(context, callback) {
var streamId = context.getStreamInfo().id, current = context.getCurrentValue(), p = MediaPlayer.rules.SwitchRequest.prototype.DEFAULT, fragmentModels = this.fragmentModels[streamId], type, model, sameTimeReq, mIdx, req, currentTime, wallclockTime = new Date(), time = null, reqForCurrentTime, mLength = fragmentModels ? fragmentModels.length : null, shouldWait = false, reqsToExecute = [], pendingReqs, loadingLength;
if (!fragmentModels || !mLength) {
callback(new MediaPlayer.rules.SwitchRequest([], p));
return;
}
currentTime = this.playbackController.getTime();
reqForCurrentTime = getForTime(fragmentModels, currentTime);
req = reqForCurrentTime || findClosestToTime(fragmentModels, currentTime) || current;
if (!req) {
callback(new MediaPlayer.rules.SwitchRequest([], p));
return;
}
for (mIdx = 0; mIdx < mLength; mIdx += 1) {
model = fragmentModels[mIdx];
type = model.getContext().streamProcessor.getType();
if (type !== "video" && type !== "audio" && type !== "fragmentedText") continue;
pendingReqs = model.getRequests({
state: MediaPlayer.dependencies.FragmentModel.states.PENDING
});
loadingLength = model.getRequests({
state: MediaPlayer.dependencies.FragmentModel.states.LOADING
}).length;
if (model.getIsPostponed() && !isNaN(req.startTime)) continue;
if (loadingLength > MediaPlayer.dependencies.ScheduleController.LOADING_REQUEST_THRESHOLD) {
callback(new MediaPlayer.rules.SwitchRequest([], p));
return;
}
time = time || (req === reqForCurrentTime ? currentTime : req.startTime);
if (pendingReqs.indexOf(req) !== -1) {
reqsToExecute.push(req);
continue;
}
sameTimeReq = model.getRequests({
state: MediaPlayer.dependencies.FragmentModel.states.PENDING,
time: time
})[0];
if (!sameTimeReq && req.index === 0) {
sameTimeReq = pendingReqs.filter(function(r) {
return r.index === req.index;
})[0];
}
if (sameTimeReq) {
reqsToExecute.push(sameTimeReq);
continue;
}
sameTimeReq = model.getRequests({
state: MediaPlayer.dependencies.FragmentModel.states.LOADING,
time: time
})[0] || model.getRequests({
state: MediaPlayer.dependencies.FragmentModel.states.EXECUTED,
time: time
})[0];
if (!sameTimeReq && req.index !== getLastMediaRequestIdx.call(this, streamId, req.mediaType)) {
shouldWait = true;
break;
}
}
reqsToExecute = reqsToExecute.filter(function(req) {
return req.action === "complete" || wallclockTime.getTime() >= req.availabilityStartTime.getTime();
});
if (shouldWait) {
callback(new MediaPlayer.rules.SwitchRequest([], p));
return;
}
callback(new MediaPlayer.rules.SwitchRequest(reqsToExecute, p));
},
reset: function() {
lastMediaRequestIdxs = {};
}
};
};
MediaPlayer.rules.SameTimeRequestRule.prototype = {
constructor: MediaPlayer.rules.SameTimeRequestRule
};
MediaPlayer.rules.ScheduleRulesCollection = function() {
"use strict";
var fragmentsToScheduleRules = [], fragmentsToExecuteRules = [], nextFragmentRules = [];
return {
bufferLevelRule: undefined,
pendingRequestsRule: undefined,
playbackTimeRule: undefined,
sameTimeRequestRule: undefined,
getRules: function(type) {
switch (type) {
case MediaPlayer.rules.ScheduleRulesCollection.prototype.FRAGMENTS_TO_SCHEDULE_RULES:
return fragmentsToScheduleRules;
case MediaPlayer.rules.ScheduleRulesCollection.prototype.NEXT_FRAGMENT_RULES:
return nextFragmentRules;
case MediaPlayer.rules.ScheduleRulesCollection.prototype.FRAGMENTS_TO_EXECUTE_RULES:
return fragmentsToExecuteRules;
default:
return null;
}
},
setup: function() {
fragmentsToScheduleRules.push(this.bufferLevelRule);
fragmentsToScheduleRules.push(this.pendingRequestsRule);
nextFragmentRules.push(this.playbackTimeRule);
fragmentsToExecuteRules.push(this.sameTimeRequestRule);
}
};
};
MediaPlayer.rules.ScheduleRulesCollection.prototype = {
constructor: MediaPlayer.rules.ScheduleRulesCollection,
FRAGMENTS_TO_SCHEDULE_RULES: "fragmentsToScheduleRules",
NEXT_FRAGMENT_RULES: "nextFragmentRules",
FRAGMENTS_TO_EXECUTE_RULES: "fragmentsToExecuteRules"
};
MediaPlayer.rules.SwitchRequest = function(v, p) {
"use strict";
this.value = v;
this.priority = p;
if (this.value === undefined) {
this.value = 999;
}
if (this.priority === undefined) {
this.priority = .5;
}
};
MediaPlayer.rules.SwitchRequest.prototype = {
constructor: MediaPlayer.rules.SwitchRequest,
NO_CHANGE: 999,
DEFAULT: .5,
STRONG: 1,
WEAK: 0
};
MediaPlayer.rules.LiveEdgeBinarySearchRule = function() {
"use strict";
var SEARCH_TIME_SPAN = 12 * 60 * 60, liveEdgeInitialSearchPosition = NaN, liveEdgeSearchRange = null, liveEdgeSearchStep = NaN, trackInfo = null, useBinarySearch = false, fragmentDuration = NaN, p = MediaPlayer.rules.SwitchRequest.prototype.DEFAULT, callback, fragmentLoader, streamProcessor, findLiveEdge = function(searchTime, onSuccess, onError, request) {
var self = this, req;
if (request === null) {
req = self.adapter.generateFragmentRequestForTime(streamProcessor, trackInfo, searchTime);
findLiveEdge.call(self, searchTime, onSuccess, onError, req);
} else {
var handler = function(e) {
fragmentLoader.unsubscribe(MediaPlayer.dependencies.FragmentLoader.eventList.ENAME_CHECK_FOR_EXISTENCE_COMPLETED, self, handler);
if (e.data.exists) {
onSuccess.call(self, e.data.request, searchTime);
} else {
onError.call(self, e.data.request, searchTime);
}
};
fragmentLoader.subscribe(MediaPlayer.dependencies.FragmentLoader.eventList.ENAME_CHECK_FOR_EXISTENCE_COMPLETED, self, handler);
fragmentLoader.checkForExistence(request);
}
}, onSearchForFragmentFailed = function(request, lastSearchTime) {
var searchTime, req, searchInterval;
if (useBinarySearch) {
binarySearch.call(this, false, lastSearchTime);
return;
}
searchInterval = lastSearchTime - liveEdgeInitialSearchPosition;
searchTime = searchInterval > 0 ? liveEdgeInitialSearchPosition - searchInterval : liveEdgeInitialSearchPosition + Math.abs(searchInterval) + liveEdgeSearchStep;
if (searchTime < liveEdgeSearchRange.start && searchTime > liveEdgeSearchRange.end) {
callback(new MediaPlayer.rules.SwitchRequest(null, p));
} else {
req = this.adapter.getFragmentRequestForTime(streamProcessor, trackInfo, searchTime, {
ignoreIsFinished: true
});
findLiveEdge.call(this, searchTime, onSearchForFragmentSucceeded, onSearchForFragmentFailed, req);
}
}, onSearchForFragmentSucceeded = function(request, lastSearchTime) {
var startTime = request.startTime, self = this, req, searchTime;
if (!useBinarySearch) {
if (!trackInfo.fragmentDuration) {
callback(new MediaPlayer.rules.SwitchRequest(startTime, p));
return;
}
useBinarySearch = true;
liveEdgeSearchRange.end = startTime + 2 * liveEdgeSearchStep;
if (lastSearchTime === liveEdgeInitialSearchPosition) {
searchTime = lastSearchTime + fragmentDuration;
req = self.adapter.getFragmentRequestForTime(streamProcessor, trackInfo, searchTime, {
ignoreIsFinished: true
});
findLiveEdge.call(self, searchTime, function() {
binarySearch.call(self, true, searchTime);
}, function() {
callback(new MediaPlayer.rules.SwitchRequest(searchTime, p));
}, req);
return;
}
}
binarySearch.call(this, true, lastSearchTime);
}, binarySearch = function(lastSearchSucceeded, lastSearchTime) {
var isSearchCompleted, req, searchTime;
if (lastSearchSucceeded) {
liveEdgeSearchRange.start = lastSearchTime;
} else {
liveEdgeSearchRange.end = lastSearchTime;
}
isSearchCompleted = Math.floor(liveEdgeSearchRange.end - liveEdgeSearchRange.start) <= fragmentDuration;
if (isSearchCompleted) {
callback(new MediaPlayer.rules.SwitchRequest(lastSearchSucceeded ? lastSearchTime : lastSearchTime - fragmentDuration, p));
} else {
searchTime = (liveEdgeSearchRange.start + liveEdgeSearchRange.end) / 2;
req = this.adapter.getFragmentRequestForTime(streamProcessor, trackInfo, searchTime, {
ignoreIsFinished: true
});
findLiveEdge.call(this, searchTime, onSearchForFragmentSucceeded, onSearchForFragmentFailed, req);
}
};
return {
metricsExt: undefined,
adapter: undefined,
timelineConverter: undefined,
execute: function(context, callbackFunc) {
var self = this, request, DVRWindow;
callback = callbackFunc;
streamProcessor = context.getStreamProcessor();
fragmentLoader = streamProcessor.getFragmentLoader();
trackInfo = context.getTrackInfo();
fragmentDuration = trackInfo.fragmentDuration;
DVRWindow = trackInfo.DVRWindow;
liveEdgeInitialSearchPosition = DVRWindow.end;
if (trackInfo.useCalculatedLiveEdgeTime) {
var actualLiveEdge = self.timelineConverter.getExpectedLiveEdge();
self.timelineConverter.setExpectedLiveEdge(liveEdgeInitialSearchPosition);
callback(new MediaPlayer.rules.SwitchRequest(actualLiveEdge, p));
return;
}
liveEdgeSearchRange = {
start: Math.max(0, liveEdgeInitialSearchPosition - SEARCH_TIME_SPAN),
end: liveEdgeInitialSearchPosition + SEARCH_TIME_SPAN
};
liveEdgeSearchStep = Math.floor((DVRWindow.end - DVRWindow.start) / 2);
request = self.adapter.getFragmentRequestForTime(streamProcessor, trackInfo, liveEdgeInitialSearchPosition, {
ignoreIsFinished: true
});
findLiveEdge.call(self, liveEdgeInitialSearchPosition, onSearchForFragmentSucceeded, onSearchForFragmentFailed, request);
},
reset: function() {
liveEdgeInitialSearchPosition = NaN;
liveEdgeSearchRange = null;
liveEdgeSearchStep = NaN;
trackInfo = null;
useBinarySearch = false;
fragmentDuration = NaN;
streamProcessor = null;
fragmentLoader = null;
}
};
};
MediaPlayer.rules.LiveEdgeBinarySearchRule.prototype = {
constructor: MediaPlayer.rules.LiveEdgeBinarySearchRule
};
MediaPlayer.rules.LiveEdgeWithTimeSynchronizationRule = function() {
"use strict";
return {
timelineConverter: undefined,
execute: function(context, callback) {
var trackInfo = context.getTrackInfo(), liveEdgeInitialSearchPosition = trackInfo.DVRWindow.end, p = MediaPlayer.rules.SwitchRequest.prototype.DEFAULT;
if (trackInfo.useCalculatedLiveEdgeTime) {
var actualLiveEdge = this.timelineConverter.getExpectedLiveEdge();
this.timelineConverter.setExpectedLiveEdge(liveEdgeInitialSearchPosition);
this.timelineConverter.setTimeSyncCompleted(false);
callback(new MediaPlayer.rules.SwitchRequest(actualLiveEdge, p));
} else {
callback(new MediaPlayer.rules.SwitchRequest(liveEdgeInitialSearchPosition, p));
}
}
};
};
MediaPlayer.rules.LiveEdgeWithTimeSynchronizationRule.prototype = {
constructor: MediaPlayer.rules.LiveEdgeWithTimeSynchronizationRule
};
MediaPlayer.rules.SynchronizationRulesCollection = function() {
"use strict";
var withAccurateTimeSourceRules = [], bestGuestRules = [];
return {
liveEdgeBinarySearchRule: undefined,
liveEdgeWithTimeSynchronizationRule: undefined,
getRules: function(type) {
switch (type) {
case MediaPlayer.rules.SynchronizationRulesCollection.prototype.TIME_SYNCHRONIZED_RULES:
return withAccurateTimeSourceRules;
case MediaPlayer.rules.SynchronizationRulesCollection.prototype.BEST_GUESS_RULES:
return bestGuestRules;
default:
return null;
}
},
setup: function() {
withAccurateTimeSourceRules.push(this.liveEdgeWithTimeSynchronizationRule);
bestGuestRules.push(this.liveEdgeBinarySearchRule);
}
};
};
MediaPlayer.rules.SynchronizationRulesCollection.prototype = {
constructor: MediaPlayer.rules.SynchronizationRulesCollection,
TIME_SYNCHRONIZED_RULES: "withAccurateTimeSourceRules",
BEST_GUESS_RULES: "bestGuestRules"
};
MediaPlayer.utils.Capabilities = function() {
"use strict";
};
MediaPlayer.utils.Capabilities.prototype = {
constructor: MediaPlayer.utils.Capabilities,
system: undefined,
log: undefined,
supportsMediaSource: function() {
"use strict";
var hasWebKit = "WebKitMediaSource" in window, hasMediaSource = "MediaSource" in window;
return hasWebKit || hasMediaSource;
},
supportsEncryptedMedia: function() {
return this.system.hasMapping("protectionModel");
},
supportsCodec: function(element, codec) {
"use strict";
if (!(element instanceof HTMLMediaElement)) {
throw "element must be of type HTMLMediaElement.";
}
var canPlay = element.canPlayType(codec);
return canPlay === "probably" || canPlay === "maybe";
}
};
MediaPlayer.utils.CustomTimeRanges = function() {
return {
customTimeRangeArray: [],
length: 0,
add: function(start, end) {
var i = 0;
for (i = 0; i < this.customTimeRangeArray.length && start > this.customTimeRangeArray[i].start; i++) ;
this.customTimeRangeArray.splice(i, 0, {
start: start,
end: end
});
for (i = 0; i < this.customTimeRangeArray.length - 1; i++) {
if (this.mergeRanges(i, i + 1)) {
i--;
}
}
this.length = this.customTimeRangeArray.length;
},
remove: function(start, end) {
for (var i = 0; i < this.customTimeRangeArray.length; i++) {
if (start <= this.customTimeRangeArray[i].start && end >= this.customTimeRangeArray[i].end) {
this.customTimeRangeArray.splice(i, 1);
i--;
} else if (start > this.customTimeRangeArray[i].start && end < this.customTimeRangeArray[i].end) {
this.customTimeRangeArray.splice(i + 1, 0, {
start: end,
end: this.customTimeRangeArray[i].end
});
this.customTimeRangeArray[i].end = start;
break;
} else if (start > this.customTimeRangeArray[i].start && start < this.customTimeRangeArray[i].end) {
this.customTimeRangeArray[i].end = start;
} else if (end > this.customTimeRangeArray[i].start && end < this.customTimeRangeArray[i].end) {
this.customTimeRangeArray[i].start = end;
}
}
this.length = this.customTimeRangeArray.length;
},
mergeRanges: function(rangeIndex1, rangeIndex2) {
var range1 = this.customTimeRangeArray[rangeIndex1];
var range2 = this.customTimeRangeArray[rangeIndex2];
if (range1.start <= range2.start && range2.start <= range1.end && range1.end <= range2.end) {
range1.end = range2.end;
this.customTimeRangeArray.splice(rangeIndex2, 1);
return true;
} else if (range2.start <= range1.start && range1.start <= range2.end && range2.end <= range1.end) {
range1.start = range2.start;
this.customTimeRangeArray.splice(rangeIndex2, 1);
return true;
} else if (range2.start <= range1.start && range1.start <= range2.end && range1.end <= range2.end) {
this.customTimeRangeArray.splice(rangeIndex1, 1);
return true;
} else if (range1.start <= range2.start && range2.start <= range1.end && range2.end <= range1.end) {
this.customTimeRangeArray.splice(rangeIndex2, 1);
return true;
}
return false;
},
start: function(index) {
return this.customTimeRangeArray[index].start;
},
end: function(index) {
return this.customTimeRangeArray[index].end;
}
};
};
MediaPlayer.utils.CustomTimeRanges.prototype = {
constructor: MediaPlayer.utils.CustomTimeRanges
};
MediaPlayer.utils.DOMStorage = function() {
var enableLastBitrateCaching = true, checkInitialBitrate = function() {
[ "video", "audio" ].forEach(function(value) {
if (this.abrController.getInitialBitrateFor(value) === undefined) {
if (this.isSupported(MediaPlayer.utils.DOMStorage.STORAGE_TYPE_LOCAL) && enableLastBitrateCaching) {
var key = MediaPlayer.utils.DOMStorage["LOCAL_STORAGE_" + value.toUpperCase() + "_BITRATE_KEY"], obj = JSON.parse(localStorage.getItem(key)) || {}, isExpired = new Date().getTime() - parseInt(obj.timestamp) >= MediaPlayer.utils.DOMStorage.LOCAL_STORAGE_BITRATE_EXPIRATION || false, bitrate = parseInt(obj.bitrate);
if (!isNaN(bitrate) && !isExpired) {
this.abrController.setInitialBitrateFor(value, bitrate);
this.log("Last bitrate played for " + value + " was " + bitrate);
} else if (isExpired) {
localStorage.removeItem(key);
}
}
if (this.abrController.getInitialBitrateFor(value) === undefined) {
this.abrController.setInitialBitrateFor(value, MediaPlayer.dependencies.AbrController["DEFAULT_" + value.toUpperCase() + "_BITRATE"]);
}
}
}, this);
};
return {
system: undefined,
log: undefined,
abrController: undefined,
checkInitialBitrate: checkInitialBitrate,
enableLastBitrateCaching: function(enable, ttl) {
enableLastBitrateCaching = enable;
if (ttl !== undefined && !isNaN(ttl) && typeof ttl === "number") {
MediaPlayer.utils.DOMStorage.LOCAL_STORAGE_BITRATE_EXPIRATION = ttl;
}
},
isSupported: function(type) {
if (type === MediaPlayer.utils.DOMStorage.STORAGE_TYPE_LOCAL) {
return window.localStorage || false;
} else if (type === MediaPlayer.utils.DOMStorage.STORAGE_TYPE_SESSION) {
return window.sessionStorage || false;
} else {
return false;
}
}
};
};
MediaPlayer.utils.DOMStorage.LOCAL_STORAGE_VIDEO_BITRATE_KEY = "dashjs_vbitrate";
MediaPlayer.utils.DOMStorage.LOCAL_STORAGE_AUDIO_BITRATE_KEY = "dashjs_abitrate";
MediaPlayer.utils.DOMStorage.LOCAL_STORAGE_BITRATE_EXPIRATION = 36e4;
MediaPlayer.utils.DOMStorage.STORAGE_TYPE_LOCAL = "local";
MediaPlayer.utils.DOMStorage.STORAGE_TYPE_SESSION = "session";
MediaPlayer.utils.DOMStorage.prototype = {
constructor: MediaPlayer.utils.DOMStorage
};
MediaPlayer.utils.Debug = function() {
"use strict";
var logToBrowserConsole = true, showLogTimestamp = false, showCalleeName = false, startTime = new Date().getTime(), eventBus;
return {
system: undefined,
eventBus: undefined,
setup: function() {
this.system.mapValue("log", this.log);
eventBus = this.eventBus;
},
setLogTimestampVisible: function(value) {
showLogTimestamp = value;
},
showCalleeName: function(value) {
showCalleeName = value;
},
setLogToBrowserConsole: function(value) {
logToBrowserConsole = value;
},
getLogToBrowserConsole: function() {
return logToBrowserConsole;
},
log: function() {
return; //CP disabling log
var message = "", logTime = null;
if (showLogTimestamp) {
logTime = new Date().getTime();
message += "[" + (logTime - startTime) + "]";
}
if (showCalleeName && this.getName) {
message += "[" + this.getName() + "]";
}
if (this.getMediaType && this.getMediaType()) {
message += "[" + this.getMediaType() + "]";
}
if (message.length > 0) {
message += " ";
}
Array.apply(null, arguments).forEach(function(item) {
message += item + " ";
});
if (logToBrowserConsole) {
console.log(message);
}
eventBus.dispatchEvent({
type: "log",
message: message
});
}
};
};
MediaPlayer.utils.EventBus = function() {
"use strict";
var registrations, getListeners = function(type, useCapture) {
var captype = (useCapture ? "1" : "0") + type;
if (!(captype in registrations)) {
registrations[captype] = [];
}
return registrations[captype];
}, init = function() {
registrations = {};
};
init();
return {
addEventListener: function(type, listener, useCapture) {
var listeners = getListeners(type, useCapture);
var idx = listeners.indexOf(listener);
if (idx === -1) {
listeners.push(listener);
}
},
removeEventListener: function(type, listener, useCapture) {
var listeners = getListeners(type, useCapture);
var idx = listeners.indexOf(listener);
if (idx !== -1) {
listeners.splice(idx, 1);
}
},
dispatchEvent: function(evt) {
var listeners = getListeners(evt.type, false).slice();
for (var i = 0; i < listeners.length; i++) {
listeners[i].call(this, evt);
}
return !evt.defaultPrevented;
}
};
};
MediaPlayer.utils.VirtualBuffer = function() {
var data = {}, sortArrayByProperty = function(array, sortProp) {
var compare = function(obj1, obj2) {
if (obj1[sortProp] < obj2[sortProp]) return -1;
if (obj1[sortProp] > obj2[sortProp]) return 1;
return 0;
};
array.sort(compare);
}, findData = function(filter) {
var streamId = filter.streamId, mediaType = filter.mediaType;
if (!data[streamId]) return null;
return data[streamId][mediaType];
}, createDataStorage = function() {
var data = {};
data.audio = {
buffered: new MediaPlayer.utils.CustomTimeRanges()
};
data.audio[MediaPlayer.vo.metrics.HTTPRequest.MEDIA_SEGMENT_TYPE] = [];
data.audio[MediaPlayer.vo.metrics.HTTPRequest.INIT_SEGMENT_TYPE] = [];
data.video = {
buffered: new MediaPlayer.utils.CustomTimeRanges()
};
data.video[MediaPlayer.vo.metrics.HTTPRequest.MEDIA_SEGMENT_TYPE] = [];
data.video[MediaPlayer.vo.metrics.HTTPRequest.INIT_SEGMENT_TYPE] = [];
data.fragmentedText = {
buffered: new MediaPlayer.utils.CustomTimeRanges()
};
data.fragmentedText[MediaPlayer.vo.metrics.HTTPRequest.MEDIA_SEGMENT_TYPE] = [];
data.fragmentedText[MediaPlayer.vo.metrics.HTTPRequest.INIT_SEGMENT_TYPE] = [];
return data;
};
return {
system: undefined,
sourceBufferExt: undefined,
notify: undefined,
subscribe: undefined,
unsubscribe: undefined,
append: function(chunk) {
var streamId = chunk.streamId, mediaType = chunk.mediaType, segmentType = chunk.segmentType, start = chunk.start, end = chunk.end;
data[streamId] = data[streamId] || createDataStorage();
data[streamId][mediaType][segmentType].push(chunk);
sortArrayByProperty(data[streamId][mediaType][segmentType], "index");
if (!isNaN(start) && !isNaN(end)) {
data[streamId][mediaType].buffered.add(start, end);
this.notify(MediaPlayer.utils.VirtualBuffer.eventList.CHUNK_APPENDED, {
chunk: chunk
});
}
},
getChunks: function(filter) {
var originData = findData.call(this, filter), segmentType = filter.segmentType, removeOrigin = filter.removeOrigin, limit = filter.limit || Number.POSITIVE_INFINITY, ln = 0, result = [];
if (!originData) return result;
delete filter.streamId;
delete filter.mediaType;
delete filter.segmentType;
delete filter.removeOrigin;
delete filter.limit;
result = originData[segmentType].filter(function(item, idx, arr) {
if (ln >= limit) return false;
for (var prop in filter) {
if (filter.hasOwnProperty(prop) && item[prop] != filter[prop]) return false;
}
if (removeOrigin) {
originData.buffered.remove(item.start, item.end);
arr.splice(idx, 1);
}
ln += 1;
return true;
});
return result;
},
extract: function(filter) {
filter.removeOrigin = true;
return this.getChunks(filter);
},
getTotalBufferLevel: function(mediaInfo) {
var mediaType = mediaInfo.type, level = 0;
for (var streamId in data) {
if (data.hasOwnProperty(streamId)) {
level += this.sourceBufferExt.getTotalBufferedTime(data[streamId][mediaType]);
}
}
return level;
},
reset: function() {
data = {};
}
};
};
MediaPlayer.utils.VirtualBuffer.prototype = {
constructor: MediaPlayer.utils.VirtualBuffer
};
MediaPlayer.utils.VirtualBuffer.eventList = {
CHUNK_APPENDED: "chunkAppended"
};
MediaPlayer.vo.BitrateInfo = function() {
"use strict";
this.mediaType = null;
this.bitrate = null;
this.qualityIndex = NaN;
};
MediaPlayer.vo.BitrateInfo.prototype = {
constructor: MediaPlayer.vo.BitrateInfo
};
MediaPlayer.vo.DataChunk = function() {
"use strict";
this.streamId = null;
this.mediaType = null;
this.segmentType = null;
this.quality = NaN;
this.index = NaN;
this.bytes = null;
this.start = NaN;
this.end = NaN;
this.duration = NaN;
};
MediaPlayer.vo.DataChunk.prototype = {
constructor: MediaPlayer.vo.DataChunk
};
MediaPlayer.vo.Error = function(code, message, data) {
"use strict";
this.code = code || null;
this.message = message || null;
this.data = data || null;
};
MediaPlayer.vo.Error.prototype = {
constructor: MediaPlayer.vo.Error
};
MediaPlayer.vo.Event = function() {
"use strict";
this.type = null;
this.sender = null;
this.data = null;
this.error = null;
this.timestamp = NaN;
};
MediaPlayer.vo.Event.prototype = {
constructor: MediaPlayer.vo.Event
};
MediaPlayer.vo.FragmentRequest = function() {
"use strict";
this.action = "download";
this.startTime = NaN;
this.mediaType = null;
this.type = null;
this.duration = NaN;
this.timescale = NaN;
this.range = null;
this.url = null;
this.requestStartDate = null;
this.firstByteDate = null;
this.requestEndDate = null;
this.quality = NaN;
this.index = NaN;
this.availabilityStartTime = null;
this.availabilityEndTime = null;
this.wallStartTime = null;
this.bytesLoaded = NaN;
this.bytesTotal = NaN;
};
MediaPlayer.vo.FragmentRequest.prototype = {
constructor: MediaPlayer.vo.FragmentRequest,
ACTION_DOWNLOAD: "download",
ACTION_COMPLETE: "complete"
};
MediaPlayer.vo.ManifestInfo = function() {
"use strict";
this.DVRWindowSize = NaN;
this.loadedTime = null;
this.availableFrom = null;
this.minBufferTime = NaN;
this.duration = NaN;
this.isDynamic = false;
this.maxFragmentDuration = null;
};
MediaPlayer.vo.ManifestInfo.prototype = {
constructor: MediaPlayer.vo.ManifestInfo
};
MediaPlayer.vo.MediaInfo = function() {
"use strict";
this.id = null;
this.index = null;
this.type = null;
this.streamInfo = null;
this.trackCount = 0;
this.lang = null;
this.codec = null;
this.mimeType = null;
this.contentProtection = null;
this.isText = false;
this.KID = null;
this.bitrateList = null;
};
MediaPlayer.vo.MediaInfo.prototype = {
constructor: MediaPlayer.vo.MediaInfo
};
MediaPlayer.models.MetricsList = function() {
"use strict";
return {
TcpList: [],
HttpList: [],
RepSwitchList: [],
BufferLevel: [],
BufferState: [],
PlayList: [],
DroppedFrames: [],
SchedulingInfo: [],
DVRInfo: [],
ManifestUpdate: []
};
};
MediaPlayer.models.MetricsList.prototype = {
constructor: MediaPlayer.models.MetricsList
};
MediaPlayer.vo.StreamInfo = function() {
"use strict";
this.id = null;
this.index = null;
this.start = NaN;
this.duration = NaN;
this.manifestInfo = null;
this.isLast = true;
};
MediaPlayer.vo.StreamInfo.prototype = {
constructor: MediaPlayer.vo.StreamInfo
};
MediaPlayer.vo.TrackInfo = function() {
"use strict";
this.id = null;
this.quality = null;
this.DVRWindow = null;
this.fragmentDuration = null;
this.mediaInfo = null;
this.MSETimeOffset = null;
};
MediaPlayer.vo.TrackInfo.prototype = {
constructor: MediaPlayer.vo.TrackInfo
};
MediaPlayer.vo.URIFragmentData = function() {
"use strict";
this.t = null;
this.xywh = null;
this.track = null;
this.id = null;
this.s = null;
};
MediaPlayer.vo.URIFragmentData.prototype = {
constructor: MediaPlayer.vo.URIFragmentData
};
MediaPlayer.vo.metrics.BufferLevel = function() {
"use strict";
this.t = null;
this.level = null;
};
MediaPlayer.vo.metrics.BufferLevel.prototype = {
constructor: MediaPlayer.vo.metrics.BufferLevel
};
MediaPlayer.vo.metrics.BufferState = function() {
"use strict";
this.target = null;
this.state = MediaPlayer.dependencies.BufferController.BUFFER_EMPTY;
};
MediaPlayer.vo.metrics.BufferState.prototype = {
constructor: MediaPlayer.vo.metrics.BufferState
};
MediaPlayer.vo.metrics.DVRInfo = function() {
"use strict";
this.time = null;
this.range = null;
this.manifestInfo = null;
};
MediaPlayer.vo.metrics.DVRInfo.prototype = {
constructor: MediaPlayer.vo.metrics.DVRInfo
};
MediaPlayer.vo.metrics.DroppedFrames = function() {
"use strict";
this.time = null;
this.droppedFrames = null;
};
MediaPlayer.vo.metrics.DroppedFrames.prototype = {
constructor: MediaPlayer.vo.metrics.DroppedFrames
};
MediaPlayer.vo.metrics.HTTPRequest = function() {
"use strict";
this.stream = null;
this.tcpid = null;
this.type = null;
this.url = null;
this.actualurl = null;
this.range = null;
this.trequest = null;
this.tresponse = null;
this.tfinish = null;
this.responsecode = null;
this.interval = null;
this.mediaduration = null;
this.responseHeaders = null;
this.trace = [];
};
MediaPlayer.vo.metrics.HTTPRequest.prototype = {
constructor: MediaPlayer.vo.metrics.HTTPRequest
};
MediaPlayer.vo.metrics.HTTPRequest.Trace = function() {
"use strict";
this.s = null;
this.d = null;
this.b = [];
};
MediaPlayer.vo.metrics.HTTPRequest.Trace.prototype = {
constructor: MediaPlayer.vo.metrics.HTTPRequest.Trace
};
MediaPlayer.vo.metrics.HTTPRequest.MEDIA_SEGMENT_TYPE = "Media Segment";
MediaPlayer.vo.metrics.HTTPRequest.INIT_SEGMENT_TYPE = "Initialization Segment";
MediaPlayer.vo.metrics.HTTPRequest.MPD_TYPE = "MPD";
MediaPlayer.vo.metrics.ManifestUpdate = function() {
"use strict";
this.mediaType = null;
this.type = null;
this.requestTime = null;
this.fetchTime = null;
this.availabilityStartTime = null;
this.presentationStartTime = 0;
this.clientTimeOffset = 0;
this.currentTime = null;
this.buffered = null;
this.latency = 0;
this.streamInfo = [];
this.trackInfo = [];
};
MediaPlayer.vo.metrics.ManifestUpdate.StreamInfo = function() {
"use strict";
this.id = null;
this.index = null;
this.start = null;
this.duration = null;
};
MediaPlayer.vo.metrics.ManifestUpdate.TrackInfo = function() {
"use strict";
this.id = null;
this.index = null;
this.mediaType = null;
this.streamIndex = null;
this.presentationTimeOffset = null;
this.startNumber = null;
this.fragmentInfoType = null;
};
MediaPlayer.vo.metrics.ManifestUpdate.prototype = {
constructor: MediaPlayer.vo.metrics.ManifestUpdate
};
MediaPlayer.vo.metrics.ManifestUpdate.StreamInfo.prototype = {
constructor: MediaPlayer.vo.metrics.ManifestUpdate.StreamInfo
};
MediaPlayer.vo.metrics.ManifestUpdate.TrackInfo.prototype = {
constructor: MediaPlayer.vo.metrics.ManifestUpdate.TrackInfo
};
MediaPlayer.vo.metrics.PlayList = function() {
"use strict";
this.stream = null;
this.start = null;
this.mstart = null;
this.starttype = null;
this.trace = [];
};
MediaPlayer.vo.metrics.PlayList.Trace = function() {
"use strict";
this.representationid = null;
this.subreplevel = null;
this.start = null;
this.mstart = null;
this.duration = null;
this.playbackspeed = null;
this.stopreason = null;
};
MediaPlayer.vo.metrics.PlayList.prototype = {
constructor: MediaPlayer.vo.metrics.PlayList
};
MediaPlayer.vo.metrics.PlayList.INITIAL_PLAY_START_REASON = "initial_start";
MediaPlayer.vo.metrics.PlayList.SEEK_START_REASON = "seek";
MediaPlayer.vo.metrics.PlayList.Trace.prototype = {
constructor: MediaPlayer.vo.metrics.PlayList.Trace()
};
MediaPlayer.vo.metrics.PlayList.Trace.USER_REQUEST_STOP_REASON = "user_request";
MediaPlayer.vo.metrics.PlayList.Trace.REPRESENTATION_SWITCH_STOP_REASON = "representation_switch";
MediaPlayer.vo.metrics.PlayList.Trace.END_OF_CONTENT_STOP_REASON = "end_of_content";
MediaPlayer.vo.metrics.PlayList.Trace.REBUFFERING_REASON = "rebuffering";
MediaPlayer.vo.metrics.TrackSwitch = function() {
"use strict";
this.t = null;
this.mt = null;
this.to = null;
this.lto = null;
};
MediaPlayer.vo.metrics.TrackSwitch.prototype = {
constructor: MediaPlayer.vo.metrics.TrackSwitch
};
MediaPlayer.vo.metrics.SchedulingInfo = function() {
"use strict";
this.mediaType = null;
this.t = null;
this.type = null;
this.startTime = null;
this.availabilityStartTime = null;
this.duration = null;
this.quality = null;
this.range = null;
this.state = null;
};
MediaPlayer.vo.metrics.SchedulingInfo.prototype = {
constructor: MediaPlayer.vo.metrics.SchedulingInfo
};
MediaPlayer.vo.metrics.TCPConnection = function() {
"use strict";
this.tcpid = null;
this.dest = null;
this.topen = null;
this.tclose = null;
this.tconnect = null;
};
MediaPlayer.vo.metrics.TCPConnection.prototype = {
constructor: MediaPlayer.vo.metrics.TCPConnection
};
MediaPlayer.vo.protection.ClearKeyKeySet = function(keyPairs, type) {
if (type && type !== "persistent" && type !== "temporary") throw new Error("Invalid ClearKey key set type! Must be one of 'persistent' or 'temporary'");
this.keyPairs = keyPairs;
this.type = type;
this.toJWK = function() {
var i, numKeys = this.keyPairs.length, jwk = {};
jwk.keys = [];
for (i = 0; i < numKeys; i++) {
var key = {
kty: "oct",
alg: "A128KW",
kid: this.keyPairs[i].keyID,
k: this.keyPairs[i].key
};
jwk.keys.push(key);
}
if (this.type) {
jwk.type = this.type;
}
var jwkString = JSON.stringify(jwk);
var len = jwkString.length;
var buf = new ArrayBuffer(len);
var bView = new Uint8Array(buf);
for (i = 0; i < len; i++) bView[i] = jwkString.charCodeAt(i);
return buf;
};
};
MediaPlayer.vo.protection.ClearKeyKeySet.prototype = {
constructor: MediaPlayer.vo.protection.ClearKeyKeySet
};
MediaPlayer.vo.protection.KeyError = function(sessionToken, errorString) {
"use strict";
this.sessionToken = sessionToken;
this.error = errorString;
};
MediaPlayer.vo.protection.KeyError.prototype = {
constructor: MediaPlayer.vo.protection.KeyError
};
MediaPlayer.vo.protection.KeyMessage = function(sessionToken, message, defaultURL, messageType) {
"use strict";
this.sessionToken = sessionToken;
this.message = message;
this.defaultURL = defaultURL;
this.messageType = messageType;
};
MediaPlayer.vo.protection.KeyMessage.prototype = {
constructor: MediaPlayer.vo.protection.KeyMessage
};
MediaPlayer.vo.protection.KeyPair = function(keyID, key) {
"use strict";
this.keyID = keyID;
this.key = key;
};
MediaPlayer.vo.protection.KeyPair.prototype = {
constructor: MediaPlayer.vo.protection.KeyPair
};
MediaPlayer.vo.protection.KeySystemAccess = function(keySystem, ksConfiguration) {
this.keySystem = keySystem;
this.ksConfiguration = ksConfiguration;
};
MediaPlayer.vo.protection.KeySystemAccess.prototype = {
constructor: MediaPlayer.vo.protection.KeySystemAccess
};
MediaPlayer.vo.protection.KeySystemConfiguration = function(audioCapabilities, videoCapabilities, distinctiveIdentifier, persistentState) {
this.initDataTypes = [ "cenc" ];
this.audioCapabilities = audioCapabilities;
this.videoCapabilities = videoCapabilities;
this.distinctiveIdentifier = distinctiveIdentifier;
this.persistentState = persistentState;
};
MediaPlayer.vo.protection.KeySystemConfiguration.prototype = {
constructor: MediaPlayer.vo.protection.KeySystemConfiguration
};
MediaPlayer.vo.protection.LicenseRequestComplete = function(message, requestData) {
"use strict";
this.message = message;
this.requestData = requestData;
};
MediaPlayer.vo.protection.LicenseRequestComplete.prototype = {
constructor: MediaPlayer.vo.protection.LicenseRequestComplete
};
MediaPlayer.vo.protection.MediaCapability = function(contentType, robustness) {
this.contentType = contentType;
this.robustness = robustness;
};
MediaPlayer.vo.protection.MediaCapability.prototype = {
constructor: MediaPlayer.vo.protection.MediaCapability
};
MediaPlayer.vo.protection.NeedKey = function(initData, initDataType) {
this.initData = initData;
this.initDataType = initDataType;
};
MediaPlayer.vo.protection.NeedKey.prototype = {
constructor: MediaPlayer.vo.protection.NeedKey
};
MediaPlayer.vo.protection.ProtectionData = function(laURL, httpRequestHeaders, clearkeys) {
this.laURL = laURL;
this.httpRequestHeaders = httpRequestHeaders;
this.clearkeys = clearkeys;
};
MediaPlayer.vo.protection.ProtectionData.prototype = {
constructor: MediaPlayer.vo.protection.ProtectionData
};
MediaPlayer.models.SessionToken = function() {
"use strict";
};
MediaPlayer.models.SessionToken.prototype = {
initData: null,
getSessionID: function() {
return "";
},
getExpirationTime: function() {
return NaN;
},
getKeyStatuses: function() {
return null;
}
};