System.register(["./state-legacy.BfeTROjz.js","./modal-manager-legacy.BN0zLM7v.js","./post-context-legacy.5zEEEe4U.js","./form-handler-legacy.B4uCdMtW.js","./field-updater-legacy.CGuGhQjx.js","./button-positioning-legacy.BTflcQZs.js","./ui-helpers-legacy.DZ1NznsM.js","../../../common/credit-toast-legacy.BMoKCCCk.js","../../../common/index-legacy.sLMPZLm9.js","../../../common/modal-legacy.DcruUX9x.js"],(function(e,t){"use strict";var n,a,c,o,i,s,l,u,d,m;return{setters:[e=>{n=e.s,a=e.a},e=>{c=e.o,o=e.c},e=>{i=e.e},e=>{s=e.g},e=>{l=e.s},e=>{u=e.m},e=>{d=e.u,m=e.a},null,null,null],execute:function(){e({a:function(){const e=jQuery;e(document).on("click saai_move_button",".media-modal:visible li.attachment",u),e("#wp-media-grid").on("click","li.attachment",u),e(document).on("click",'[data-action="close"]',(function(e){e.preventDefault(),o()})),e(document).on("click",".saai-generate-button",(function(e){e.preventDefault(),s()})),e(document).on("click",".saai-save-button",(function(e){e.preventDefault(),l()})),e(document).on("keydown",(function(e){const t=jQuery("#saai-image-alt-tags-modal");"Escape"===e.key&&t&&"none"!==t.css("display")&&o()})),e(document).on("change","#saai-check-all",(function(){const t=e(this).prop("checked");e(".saai-generate-field").prop("checked",t),d()})),e(document).on("change",".saai-generate-field",(function(e){m(),d()}))},b:function(){const e=jQuery;e(document).on("click",".saai-generate-alt-tags-button",(function(t){t.preventDefault();const o=e(this),s=parseInt(o.attr("data-attachment-id")||"0");n(s);const l=i();a(l),c()}))}})}}}));
