(()=>{"use strict";var e,t={567:e=>{e.exports=window.jQuery}},i={};function n(e){var r=i[e];if(void 0!==r)return r.exports;var s=i[e]={exports:{}};return t[e](s,s.exports,n),s.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),e=n(567),n.n(e)()((function(e){const t=window.jetpackSocialClassicEditorInitialState??{},i=e("#publicize-form");if(!t||t.sharesRemaining>t.numberOfConnections)return;const n=e("#publicize-form").find('input[type="checkbox"]');0!==t.sharesRemaining?i.click((function(r){const s=e(r.target);if(!s.is("input")||s.is(":disabled"))return;const a=i.find('input[type="checkbox"]:checked').length>=t.sharesRemaining;n.each((function(){this.id!==s.attr("id")&&(this.checked||(e(this).parent().toggleClass("wpas-disabled",a),e(this).prop("disabled",a)))}))})):n.each((function(){e(this).parent().addClass("wpas-disabled"),e(this).prop("disabled",!0)}))}))})();