const DEFAULT_DURATION_MS=0xfa;function prefersReducedMotion(){try{return window['matchMedia']&&window['matchMedia']('(prefers-reduced-motion:\x20reduce)')['matches'];}catch{return![];}}function safeCancelAnimations(_0x33b234){if(!_0x33b234||typeof _0x33b234['getAnimations']!=='function')return;try{_0x33b234['getAnimations']()['forEach'](_0x53cbb0=>_0x53cbb0['cancel']());}catch{}}function animateRestoreFlip({contentEl:_0x3b1149,fromRect:_0x2dabfd,toRect:_0x12ca41,durationMs:_0x35d26f}){if(!_0x3b1149)return;if(!_0x2dabfd||!_0x12ca41)return;if(prefersReducedMotion())return;const _0x592a86=_0x12ca41['width']||0x0,_0x301c7e=_0x12ca41['height']||0x0,_0x3b1925=_0x2dabfd['width']||0x0,_0x1d1d78=_0x2dabfd['height']||0x0;if(_0x592a86<=0x0||_0x301c7e<=0x0||_0x3b1925<=0x0||_0x1d1d78<=0x0)return;const _0x242d7d=_0x2dabfd['left']-_0x12ca41['left'],_0x417613=_0x2dabfd['top']-_0x12ca41['top'],_0x45b7e9=_0x3b1925/_0x592a86,_0x45c8ad=_0x1d1d78/_0x301c7e;if(!Number['isFinite'](_0x242d7d)||!Number['isFinite'](_0x417613)||!Number['isFinite'](_0x45b7e9)||!Number['isFinite'](_0x45c8ad))return;safeCancelAnimations(_0x3b1149);const _0x552f18=_0x3b1149['style']['transition'],_0x2ed170=_0x3b1149['style']['transformOrigin'],_0x462ab1=_0x3b1149['style']['willChange'];_0x3b1149['style']['transition']='none',_0x3b1149['style']['transformOrigin']='top\x20left',_0x3b1149['style']['willChange']='transform';const _0x2d4387='translate('+_0x242d7d+'px,\x20'+_0x417613+'px)\x20scale('+_0x45b7e9+',\x20'+_0x45c8ad+')',_0x3b730b=_0x3b1149['animate']([{'transform':_0x2d4387},{'transform':'none'}],{'duration':_0x35d26f,'easing':'ease','fill':'both'}),_0x45cf2f=()=>{_0x3b1149['style']['transition']=_0x552f18,_0x3b1149['style']['transformOrigin']=_0x2ed170,_0x3b1149['style']['willChange']=_0x462ab1;};_0x3b730b['addEventListener']('finish',_0x45cf2f,{'once':!![]}),_0x3b730b['addEventListener']('cancel',_0x45cf2f,{'once':!![]});}export function toggleModalMaximize(_0xb7baf4,_0xd49ea5={}){if(!_0xb7baf4)return;const {storageKey:_0xec934c,updateIcon:_0x149957,onAfterToggle:_0x2a923e,durationMs:durationMs=DEFAULT_DURATION_MS}=_0xd49ea5,_0x5aa4e1=_0xb7baf4['querySelector']('.modal-content'),_0x3e021a=_0xb7baf4['classList']['contains']('maximized'),_0x390c7e=!_0x3e021a;if(!_0x5aa4e1){_0xb7baf4['classList']['toggle']('maximized'),_0x149957?.(_0x390c7e),_0x2a923e?.(_0x390c7e);if(_0xec934c)try{localStorage['setItem'](_0xec934c,String(_0x390c7e));}catch{}return;}if(_0x3e021a&&!prefersReducedMotion()){const _0x5d4185=_0x5aa4e1['getBoundingClientRect']();_0xb7baf4['classList']['remove']('maximized');const _0x192abb=_0x5aa4e1['getBoundingClientRect']();animateRestoreFlip({'contentEl':_0x5aa4e1,'fromRect':_0x5d4185,'toRect':_0x192abb,'durationMs':durationMs});}else _0xb7baf4['classList']['toggle']('maximized');_0x149957?.(_0x390c7e),_0x2a923e?.(_0x390c7e);if(_0xec934c)try{localStorage['setItem'](_0xec934c,String(_0x390c7e));}catch{}}