芝麻web文件管理V1.00
编辑当前文件:/home2/sdektunc/public_html/media/system/js/fields/joomla-field-permissions-es5.min.js
!function(){"use strict";function t(e){return(t=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(e)}function e(t,o){return(e=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,o)}function o(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function n(t,r,i){return(n=o()?Reflect.construct:function(t,o,n){var r=[null];r.push.apply(r,o);var i=new(Function.bind.apply(t,r));return n&&e(i,n.prototype),i}).apply(null,arguments)}function r(o){var i="function"==typeof Map?new Map:void 0;return(r=function(o){if(null===o||(r=o,-1===Function.toString.call(r).indexOf("[native code]")))return o;var r;if("function"!=typeof o)throw new TypeError("Super expression must either be null or a function");if(void 0!==i){if(i.has(o))return i.get(o);i.set(o,s)}function s(){return n(o,arguments,t(this).constructor)}return s.prototype=Object.create(o.prototype,{constructor:{value:s,enumerable:!1,writable:!0,configurable:!0}}),e(s,o)})(o)}function i(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}window.customElements.define("joomla-field-permissions",function(t){var o,n;function r(){var e;if(e=t.call(this)||this,!Joomla)throw new Error("Joomla API is not properly initiated");if(!e.getAttribute("data-uri"))throw new Error("No valid url for validation");return e.query=window.location.search.substring(1),e.buttons="",e.buttonDataSelector="data-onchange-task",e.onDropdownChange=e.onDropdownChange.bind(i(e)),e.getUrlParam=e.getUrlParam.bind(i(e)),e.component=e.getUrlParam("component"),e.extension=e.getUrlParam("extension"),e.option=e.getUrlParam("option"),e.view=e.getUrlParam("view"),e.asset="not",e.context="",e}n=t,(o=r).prototype=Object.create(n.prototype),o.prototype.constructor=o,e(o,n);var s=r.prototype;return s.connectedCallback=function(){var t=this;this.buttons=[].slice.call(document.querySelectorAll("["+this.buttonDataSelector+"]")),this.buttons&&this.buttons.forEach((function(e){e.addEventListener("change",t.onDropdownChange)}))},s.disconnectedCallback=function(){var t=this;this.buttons&&this.buttons.forEach((function(e){e.removeEventListener("change",t.onDropdownChange)}))},s.onDropdownChange=function(t){t.preventDefault(),"permissions.apply"===t.target.getAttribute(this.buttonDataSelector)&&this.sendPermissions(t)},s.sendPermissions=function(t){var e=t.target,o=document.getElementById("icon_"+e.id);o.removeAttribute("class"),o.setAttribute("class","joomla-icon joomla-field-permissions__spinner");var n=e.value;if(document.getElementById("jform_context")){this.context=document.getElementById("jform_context").value;var r=this.context.split(".");this.context=r[0]}"com_config"!==this.option||this.component||this.extension?this.extension||"component"!==this.view?this.context?("group"===this.view?this.asset=this.context+".fieldgroup."+this.getUrlParam("id"):this.asset=this.context+".field.{this.getUrlParam('id')}",this.title=document.getElementById("jform_title").value):this.extension&&this.view?(this.asset=this.extension+"."+this.view+"."+this.getUrlParam("id"),this.title=document.getElementById("jform_title").value):!this.extension&&this.view&&(this.asset=this.option+"."+this.view+"."+this.getUrlParam("id"),this.title=document.getElementById("jform_title").value):this.asset=this.component:this.asset="root.1";var i=e.id.replace("jform_rules_",""),s=i.lastIndexOf("_"),a={comp:this.asset,action:i.substring(0,s),rule:i.substring(s+1),value:n,title:this.title};Joomla.removeMessages(),Joomla.request({url:this.getAttribute("data-uri"),method:"POST",data:JSON.stringify(a),perform:!0,headers:{"Content-Type":"application/json"},onSuccess:function(t){var n;try{n=JSON.parse(t)}catch(t){console.error(t)}if(o.removeAttribute("class"),n.data&&n.data.result){o.setAttribute("class","joomla-icon joomla-field-permissions__allowed");var r=e.parentNode.parentNode.nextElementSibling.querySelector("span");r.removeAttribute("class"),r.setAttribute("class",n.data.class),r.innerHTML=Joomla.sanitizeHtml(n.data.text)}"object"==typeof n.messages&&null!==n.messages&&(Joomla.renderMessages(n.messages),n.data&&n.data.result?o.setAttribute("class","joomla-icon joomla-field-permissions__allowed"):o.setAttribute("class","joomla-icon joomla-field-permissions__denied"))},onError:function(t){o.removeAttribute("style"),Joomla.renderMessages(Joomla.ajaxErrorsMessages(t,t.statusText)),o.setAttribute("class","joomla-icon joomla-field-permissions__denied")}})},s.getUrlParam=function(t){for(var e=this.query.split("&"),o=0;o