HEX
Server: Apache/2.4.54 (Unix) OpenSSL/1.0.2k-fips
System: Linux f17.eelserver.com 3.10.0-1160.80.1.el7.x86_64 #1 SMP Tue Nov 8 15:48:59 UTC 2022 x86_64
User: zulfiqar (1155)
PHP: 8.2.0
Disabled: mail, exec, system, popen, proc_open, shell_exec, passthru, show_source
Upload Files
File: /home/zulfiqar/public_html/wp-content/plugins/stream/build/alerts.js
(()=>{"use strict";var t={n:e=>{var n=e&&e.__esModule?()=>e.default:()=>e;return t.d(n,{a:n}),n},d:(e,n)=>{for(var a in n)t.o(n,a)&&!t.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:n[a]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e)};const e=window.jQuery;var n=t.n(e);let a,i;function r(t){const e=n()(t);e.find(".select2-select.connector_or_context").each((function(t,e){n()(e).select2({allowClear:!0,placeholder:window["wp-stream-alerts"].anyContext,templateResult:t=>void 0===t.id?t.text:-1===t.id.indexOf("-")?n()('<span class="parent">'+t.text+"</span>"):n()('<span class="child">'+t.text+"</span>"),matcher(t,e){const a=n().extend(!0,{},e);if(null===t.term||""===n().trim(t.term))return a;const i=t.term.toLowerCase();if(a.id=a.id.replace("blogs","sites"),a.id.toLowerCase().indexOf(i)>=0)return a;if(a.children){for(let t=a.children.length-1;t>=0;t--)-1===a.children[t].id.toLowerCase().indexOf(i)&&a.children.splice(t,1);if(a.children.length>0)return a}return null}}).change((function(){const t=n()(this).val();if(t){const e=t.split("-");n()(this).siblings(".connector").val(e[0]),n()(this).siblings(".context").val(e[1])}}));const a=[n()(e).siblings(".connector").val(),n()(e).siblings(".context").val()];""===a[1]&&a.splice(1,1),n()(e).val(a.join("-")).trigger("change")})),e.find("select.select2-select:not(.connector_or_context)").each((function(){const t=n()(this).attr("id").split("_"),e=t[t.length-1].charAt(0).toUpperCase()+t[t.length-1].slice(1);n()(this).select2({allowClear:!0,placeholder:window["wp-stream-alerts"].any+" "+e})}))}const s=n()("#wp_stream_alert_type");function o(t){const e={action:"load_alerts_settings",alert_type:t},a=n()("#wp_stream_alert_type").closest("tr").attr("id");e.post_id=a.split("-")[1],n().post(window.ajaxurl,e,(function(t){const e=n()("#wp_stream_alert_type_form");"none"!==n()("#wp_stream_alert_type").val()?(e.html(t.data.html),e.show()):e.hide()}))}function l(t){t.preventDefault(),n()("#add-new-alert").find("p.submit.inline-edit-save span.spinner").css("visibility","visible");const e={action:"save_new_alert",wp_stream_alerts_nonce:n()("#wp_stream_alerts_nonce").val(),wp_stream_trigger_author:n()("#wp_stream_trigger_author").val(),wp_stream_trigger_context:n()("#wp_stream_trigger_connector_or_context").val(),wp_stream_trigger_action:n()("#wp_stream_trigger_action").val(),wp_stream_alert_type:n()("#wp_stream_alert_type").val(),wp_stream_alert_status:n()("#wp_stream_alert_status").val()};n()("#wp_stream_alert_type_form").find(":input").each((function(){const t=n()(this).attr("id");n()(this).val()&&(e[t]=n()(this).val())})),n().post(window.ajaxurl,e,(function(t){!0===t.success&&(n()("#add-new-alert").find("p.submit.inline-edit-save span.spinner").css("visibility","hidden"),location.reload())}))}n()("#the-list").on("change","#wp_stream_trigger_connector_or_context",(function(){if("wp_stream_trigger_connector_or_context"===n()(this).attr("id")){let t=n()(this).val();if(t&&0<t.indexOf("-")){const e=t.split("-");t=e[0]}!function(t){const e=n()("#wp_stream_trigger_action");e.empty(),e.prop("disabled",!0);const a=n()("<option/>",{value:"",text:""});e.append(a);const i={action:"get_actions",connector:t};n().post(window.ajaxurl,i,(function(t){const a=t.success,i=t.data;if(a){for(const t in i)if(i.hasOwnProperty(t)){const a=i[t],r=n()("<option/>",{value:t,text:a});e.append(r)}e.prop("disabled",!1),n()(document).trigger("alert-actions-updated")}}))}(t)}})),s.change((function(){o(n()(this).val())})),n()("#wpbody-content").on("click","a.page-title-action",(function(t){t.preventDefault(),n()("#add-new-alert").remove(),n()(".inline-edit-wp_stream_alerts").length>0&&n()(".inline-edit-wp_stream_alerts .inline-edit-save button.button-secondary.cancel").trigger("click");let e="";n().post(window.ajaxurl,{action:"get_new_alert_triggers_notifications"},(function(t){if(!0===t.success){e=t.data.html,n()("tbody#the-list").prepend('<tr id="add-new-alert" class="inline-edit-row inline-edit-row-page inline-edit-page quick-edit-row quick-edit-row-page inline-edit-page inline-editor" style=""><td colspan="4" class="colspanchange">'+e+'<p class="submit inline-edit-save"> <button type="button" class="button-secondary cancel alignleft">Cancel</button> <input type="hidden" id="_inline_edit" name="_inline_edit" value="3550d271fe"> <button type="button" class="button-primary save alignright">Save</button> <span class="spinner"></span><span class="error" style="display:none"></span> <br class="clear"></p></td></tr>');const a=n()("#add-new-alert"),i=a.css("background-color");a.css("background-color","#C1E1B9"),setTimeout((function(){a.css("background-color",i)}),250),n()("#wp_stream_alert_type").change((function(){o(n()(this).val())})),a.on("click",".button-secondary.cancel",(function(){n()("#add-new-alert").remove()})),a.on("click",".button-primary.save",l),r("#add-new-alert")}}))}));const c=window.inlineEditPost.edit;if(window.inlineEditPost.edit=function(t){c.apply(this,arguments);let e=0;if("object"==typeof t&&(e=parseInt(this.getId(t),10)),e>0){i=n()("#edit-"+e),a=n()("#post-"+e);const t=a.find('input[name="wp_stream_trigger_connector"]').val(),s=a.find('input[name="wp_stream_trigger_context"]').val(),o=t+"-"+s,l=a.find('input[name="wp_stream_trigger_action"]').val(),c=a.find('input[name="wp_stream_alert_status"]').val();i.find('input[name="wp_stream_trigger_connector"]').attr("value",t),i.find('input[name="wp_stream_trigger_context"]').attr("value",s),i.find('select[name="wp_stream_trigger_connector_or_context"] option[value="'+o+'"]').attr("selected","selected"),n()(document).one("alert-actions-updated",(function(){i.find('input[name="wp_stream_trigger_action"]').attr("value",l),i.find('select[name="wp_stream_trigger_action"] option[value="'+l+'"]').attr("selected","selected").trigger("change")})),i.find('select[name="wp_stream_alert_status"] option[value="'+c+'"]').attr("selected","selected"),r("#edit-"+e),n()("#wp_stream_alert_type_form").hide();const d=a.find('input[name="wp_stream_alert_type"]').val();i.find('select[name="wp_stream_alert_type"] option[value="'+d+'"]').attr("selected","selected").trigger("change")}},window.location.hash){const t=n()(window.location.hash);if(t.length){const e=t.offset().top-n()("#wpadminbar").height();n()("html, body").animate({scrollTop:e},1e3),t.find(".row-actions a.editinline").trigger("click")}}})();