const g_wiggle_canvas=$('#captions-'+'canvas-wig'+'gle-contai'+'ner-canvas');let g_wiggle_animation_running=![];function applyWiggleAnimationToPreview(Y,Q,g){const N={'SEgIz':function(c,m,M,v){return c(m,M,v);},'NBqTi':function(c,m){return c(m);},'MraOr':'#checkbox-'+'captions-g'+'raphics-wi'+'ggle','WJfNK':':checked','YDKkO':function(c,m){return c/m;},'MigNb':'captions-c'+'anvas-wigg'+'le-contain'+'er-canvas','VvPSe':function(c,m){return c!==m;},'yjmFn':'Wiggle\x20can'+'vas\x20dimens'+'ions\x20chang'+'ed\x20from','pKHoh':function(c,m){return c>m;},'jyiVJ':'Wiggle\x20buf'+'fer\x20canvas'+'\x20not\x20ready'+',\x20skipping'+'\x20frame'};if(!N['NBqTi']($,N['MraOr'])['is'](N['WJfNK'])){g_wiggle_animation_running=![];return;}const {dx:V,dy:h}=g_captions_styled['wiggleOffs'+'et'](N['YDKkO'](Q,0x137a+-0xa84+-0x50e)),L=document['getElement'+'ById'](N['MigNb']);(N['VvPSe'](L['width'],window['g_wiggle_o'+'riginal_wi'+'dth'])||L['height']!==window['g_wiggle_o'+'riginal_he'+'ight'])&&(console['log'](N['yjmFn'],L['width'],'x',L['height'],'to',window['g_wiggle_o'+'riginal_wi'+'dth'],'x',window['g_wiggle_o'+'riginal_he'+'ight']),L['width']=window['g_wiggle_o'+'riginal_wi'+'dth'],L['height']=window['g_wiggle_o'+'riginal_he'+'ight']);const C=L['getContext']('2d');C['clearRect'](-0x2*0x110e+0x1a87*-0x1+0x3ca3,-0x1ee7+-0x24b*0xe+0x3f01,L['width'],L['height']);if(window['g_wiggle_b'+'uffer_canv'+'as']&&N['pKHoh'](g_wiggle_buffer_canvas['width'],-0x531*0x3+-0x1d4*-0x15+-0x16d1)&&g_wiggle_buffer_canvas['height']>0x503*-0x6+0x1b91*0x1+0x281)C['drawImage'](g_wiggle_buffer_canvas,V,h);else{console['warn'](N['jyiVJ']),g_wiggle_animation_running=![];return;}requestAnimationFrame(c=>{N['SEgIz'](applyWiggleAnimationToPreview,Y,c,!![]);});}async function startWiggleAnimation(){const Y={'eBZUW':'#checkbox-'+'captions-g'+'raphics-wi'+'ggle','ilHRm':':checked','VEpiv':'captions-c'+'anvas-cont'+'ainer-canv'+'as','iGznX':'captions-c'+'anvas-wigg'+'le-contain'+'er-canvas','xtTzr':'Wiggle\x20can'+'vas\x20initia'+'lized\x20with'+'\x20dimension'+'s:','GpgVR':function(m){return m();},'DHCOl':'canvas','ZQMQp':function(m,M,v,T,A,p){return m(M,v,T,A,p);},'pEtlP':'all','lxirY':'Wiggle\x20buf'+'fer\x20render'+'\x20result:','aHTYv':'Wiggle\x20buf'+'fer\x20has\x20co'+'ntent:'};if(!$(Y['eBZUW'])['is'](Y['ilHRm'])||g_wiggle_animation_running)return;g_wiggle_animation_running=!![];const Q=await jsxProject['sequenceWi'+'dth'](),g=document['getElement'+'ById'](Y['VEpiv']),N=document['getElement'+'ById'](Y['iGznX']);N['width']=g['width'],N['height']=g['height'],window['g_wiggle_o'+'riginal_wi'+'dth']=N['width'],window['g_wiggle_o'+'riginal_he'+'ight']=N['height'],console['log'](Y['xtTzr'],N['width'],'x',N['height']);const V=Y['GpgVR'](test_76_get_caption_render_params);window['g_wiggle_b'+'uffer_canv'+'as']=document['createElem'+'ent'](Y['DHCOl']),g_wiggle_buffer_canvas['width']=N['width'],g_wiggle_buffer_canvas['height']=N['height'],console['log']('Creating\x20w'+'iggle\x20buff'+'er\x20canvas:',g_wiggle_buffer_canvas['width'],'x',g_wiggle_buffer_canvas['height']);const h=Y['ZQMQp'](test_74_render_captions_by_index,g_wiggle_buffer_canvas,-0x2*-0x124c+0x1*-0x73f+-0x1d59,0x10dc+-0x62f*0x1+-0x38f*0x3,V,Y['pEtlP']);console['log'](Y['lxirY'],h);const L=g_wiggle_buffer_canvas['getContext']('2d'),C=L['getImageDa'+'ta'](0x2028*-0x1+0x1c27*0x1+0x401,-0x2322+-0x14b*0x17+0x40df,g_wiggle_buffer_canvas['width'],g_wiggle_buffer_canvas['height']),c=C['data']['some'](m=>m!==0x78d*0x3+0xd7*-0x18+0x1*-0x27f);console['log'](Y['aHTYv'],c),applyWiggleAnimationToPreview(Q,performance['now'](),![]);}function updateWiggleBuffer(){const Y={'XmNFI':function(N){return N();},'xUkTW':function(N,V,h,L,C,c){return N(V,h,L,C,c);}};if(!g_wiggle_animation_running||!window['g_wiggle_b'+'uffer_canv'+'as'])return;console['log']('Updating\x20w'+'iggle\x20buff'+'er\x20due\x20to\x20'+'position\x20c'+'hange');const Q=Y['XmNFI'](test_76_get_caption_render_params),g=g_wiggle_buffer_canvas['getContext']('2d');g['clearRect'](-0x2698+-0x1b78+-0x4b8*-0xe,-0x18a3+0x11a+-0x5*-0x4b5,g_wiggle_buffer_canvas['width'],g_wiggle_buffer_canvas['height']),Y['xUkTW'](test_74_render_captions_by_index,g_wiggle_buffer_canvas,0x389+0xbb1+0xf3a*-0x1,0x8c*-0x11+-0x1541+0x1e8d,Q,'all');}