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/admin-exclude.js
(()=>{"use strict";var e={n:t=>{var s=t&&t.__esModule?()=>t.default:()=>t;return e.d(s,{a:s}),s},d:(t,s)=>{for(var n in s)e.o(s,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:s[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)};const t=window.jQuery;var s=e.n(t);const n=s()(".stream-exclude-list tbody tr:not(.hidden)"),c=s()(".stream-exclude-list tr.helper"),l=function(e){let t;s()("select.select2-select.connector_or_context",e).each((function(e,t){s()(t).select2({allowClear:!0,templateResult:e=>void 0===e.id?e.text:-1===e.id.indexOf("-")?s()('<span class="parent">'+e.text+"</span>"):s()('<span class="child">'+e.text+"</span>"),matcher(e,t){const n=s().extend(!0,{},t);if(null===e.term||""===s().trim(e.term))return n;const c=e.term.toLowerCase();if(n.id=n.id.replace("blogs","sites"),n.id.toLowerCase().indexOf(c)>=0)return n;if(n.children){for(let e=n.children.length-1;e>=0;e--)-1===n.children[e].id.toLowerCase().indexOf(c)&&n.children.splice(e,1);if(n.children.length>0)return n}return null}}).on("change",(function(){const e=s()(this).closest("tr");let t=s()(this).val();if(t&&0<t.indexOf("-")){const e=t.split("-");t=e[0]}!function(e,t){const n=s()(".select2-select.action",e),c=n.val();n.empty(),n.prop("disabled",!0);const l=s()("<option/>",{value:"",text:""});n.append(l);const i={action:"get_actions",connector:t};s().post(window.ajaxurl,i,(function(e){const t=e.success,l=e.data;if(t){for(const e in l)if(l.hasOwnProperty(e)){const t=l[e],c=s()("<option/>",{value:e,text:t});n.append(c)}n.val(c),n.prop("disabled",!1),s()(document).trigger("alert-actions-updated")}}))}(e,t)}))})),s()("select.select2-select.action",e).each((function(e,t){s()(t).select2({allowClear:!0})})),s()("select.select2-select.author_or_role",e).each((function(e,n){t=s()(n),t.select2({ajax:{type:"POST",url:window.ajaxurl,dataType:"json",quietMillis:500,data:(e,s)=>({find:e,limit:10,pager:s,action:"stream_get_users",nonce:t.data("nonce")}),processResults(e){const t={results:[{text:"",id:""},{text:"Roles",children:[]},{text:"Users",children:[]}]};if(!0!==e.success||void 0===e.data||!0!==e.data.status)return t;if(void 0===e.data.users||void 0===e.data.roles)return t;const n=[];return s().each(e.data.roles,(function(e,t){n.push({id:e,text:t})})),t.results[1].children=n,t.results[2].children=e.data.users,t}},templateResult(e){const t=s()("<div>").text(e.text);return void 0!==e.icon&&e.icon&&(t.prepend(s()('<img src="'+e.icon+'" class="wp-stream-select2-icon">')),t.attr("title",e.tooltip)),void 0!==e.tooltip?t.attr("title",e.tooltip):void 0!==e.user_count&&t.attr("title",e.user_count),t},templateSelection(e){const t=s()("<div>").text(e.text);return s().isNumeric(e.id)&&e.text.indexOf("icon-users")<0&&t.append(s()('<i class="icon16 icon-users"></i>')),t},allowClear:!0,placeholder:t.data("placeholder")}).on("change",(function(){const e=s()(this).select2("data");s()(this).data("selected-id",e.id),s()(this).data("selected-text",e.text)}))})),s()("select.select2-select.ip_address",e).each((function(e,t){const n=s()(t);let c="";n.select2({ajax:{type:"POST",url:window.ajaxurl,dataType:"json",quietMillis:500,data:e=>(c=e.term,{find:e,limit:10,action:"stream_get_ips",nonce:n.data("nonce")}),processResults(e){const t={results:[]};let n=[];return!0===e.success&&void 0!==e.data&&s().each(e.data,(function(e,s){t.results.push({id:s,text:s})})),void 0===c||(n=c.match(/^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/),null===n||(n.shift(),n=s().grep(n,(function(e){const t=parseInt(e,10);return t<=255&&t.toString()===e})),n.length>=4&&t.results.push({id:c,text:c}))),t}},allowClear:!1,multiple:!0,maximumSelectionSize:1,placeholder:n.data("placeholder"),tags:!0})})).on("change",(function(){s()(this).prev(".select2-container").find("input.select2-input").blur()})),s()("ul.select2-choices, ul.select2-choices li, input.select2-input",".stream-exclude-list tr:not(.hidden) .ip_address").on("mousedown click focus",(function(){const e=s()(this).closest(".select2-container"),t=e.find("input.select2-input");if(e.select2("data").length>=1)return t.blur(),!1})),s()(".exclude_rules_remove_rule_row",e).on("click",(function(e){s()(this).closest("tr").remove(),o(),i(),e.preventDefault()}))};function i(){const e=s()("table.stream-exclude-list tbody tr:not( .hidden ) input.cb-select:checked"),t=s()("#exclude_rules_remove_rules");0===e.length?t.prop("disabled",!0):t.prop("disabled",!1)}function o(){const e=s()("table.stream-exclude-list tbody tr:not( .hidden )"),t=s()("table.stream-exclude-list tbody tr.no-items"),n=s()(".check-column.manage-column input.cb-select"),c=s()("#exclude_rules_remove_rules");0===e.length?(t.show(),n.prop("disabled",!0),c.prop("disabled",!0)):(t.hide(),n.prop("disabled",!1)),function(e){if(!e.length)return!1;e.removeClass("alternate"),e.each((function(e){s()(this).addClass(e%2?"":"alternate")}))}(e)}l(n),s()("select.select2-select.author_or_role",n).each((function(){const e=s()("<option selected>"+s()(this).data("selected-text")+"</option>").val(s()(this).data("selected-id"));s()(this).append(e).trigger("change")})),s()("select.select2-select.connector_or_context",n).each((function(){const e=[s()(this).siblings(".connector").val(),s()(this).siblings(".context").val()];""===e[1]&&e.splice(1,1),s()(this).val(e.join("-")).trigger("change")})),s()("#exclude_rules_new_rule").on("click",(function(){const e=c.clone();e.removeAttr("class"),e.insertBefore(c),l(e),o(),i()})),s()("#exclude_rules_remove_rules").on("click",(function(){const e=s()("table.stream-exclude-list"),t=s()("tbody input.cb-select:checked",e).closest("tr");s()("tbody tr",e).length-t.length>=2?t.remove():(s()(":input",t).val(""),s()(t).not(":first").remove(),s()(".select2-select",t).select2("val","")),e.find("input.cb-select").prop("checked",!1),o(),i()})),s()(".stream-exclude-list").closest("form").submit((function(){s()(".stream-exclude-list tbody tr.hidden",this).each((function(){s()(this).find(":input").removeAttr("name")})),s()(".stream-exclude-list tbody tr:not(.hidden) select.select2-select.connector_or_context",this).each((function(){const e=s()(this).val().split("-");s()(this).siblings(".connector").val(e[0]),s()(this).siblings(".context").val(e.slice(1).join("-")),s()(this).removeAttr("name")})),s()(".stream-exclude-list tbody tr:not(.hidden) select.select2-select.ip_address",this).each((function(){const e=s()("option:selected",this).first();e.length||s()(this).append('<option selected="selected"></option>'),s()("option:selected:not(:first)",this).each((function(){e.attr("value",e.attr("value")+","+s()(this).attr("value")),s()(this).removeAttr("selected")}))}))})),s()(".stream-exclude-list").closest("td").prev("th").hide(),s()("table.stream-exclude-list").on("click","input.cb-select",(function(){i()})),s()(document).ready((function(){o(),i()}))})();