CoreFiles by mySites.guru
core.min.js1 lines, 11,760 bytes, from Joomla_4.0.0-alpha5-Alpha-Full_Package.zip
Raw History Compare with 4.0.0-alpha3
md5
31f4a6b7b6b59ddd19e00c3323ff175d
sha1
b3b935e3eb015d62943d0768325b2da66e56cce6
sha256
29d18e43e135bee783e0b189a905e83c7c76d10bfe421f3d03b4ce965320b01f
var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_this=this;!function(){if("function"==typeof window.CustomEvent)return!1;var e=function(e,t){var o=document.createEvent("CustomEvent"),n=t||{bubbles:!1,cancelable:!1,detail:void 0};return o.initCustomEvent(e,n.bubbles,n.cancelable,n.detail),o};e.prototype=window.Event.prototype,window.CustomEvent=e}(),Joomla=window.Joomla||{},Joomla.editors=Joomla.editors||{},Joomla.editors.instances=Joomla.editors.instances||{},Joomla.Modal={current:"",setCurrent:function(e){_this.current=e},getCurrent:function(){return _this.current}},function(e,t){"use strict";e.submitform=function(e,o,n){var r=o,s=e;r||(r=t.getElementById("adminForm")),s&&(r.task.value=s),r.noValidate=!n,n?r.hasAttribute("novalidate")&&r.removeAttribute("novalidate"):r.setAttribute("novalidate","");var a=t.createElement("input");a.style.display="none",a.type="submit",r.appendChild(a).click(),r.removeChild(a)},e.submitbutton=function(o,n,r){var s=t.querySelector(n||"form.form-validate"),a=r;if("string"==typeof n&&null===s&&(s=t.querySelector("#"+n)),s){if(void 0===a||null===a){var i=o.split("."),l=s.getAttribute("data-cancel-task");l||(l=i[0]+".cancel"),a=o!==l}a&&!t.formvalidator.isValid(s)||e.submitform(o,s)}else e.submitform(o)},e.Text={strings:{},_:function(t,o){var n=t,r=o,s=e.getOptions("joomla.jtext");return s&&(e.Text.load(s),e.loadOptions({"joomla.jtext":null})),r=void 0===r?"":r,n=n.toUpperCase(),void 0!==e.Text.strings[n]?e.Text.strings[n]:r},load:function(t){return[].slice.call(Object.keys(t)).forEach(function(o){e.Text.strings[o.toUpperCase()]=t[o]}),e.Text}},e.JText=e.Text,e.optionsStorage=e.optionsStorage||null,e.getOptions=function(t,o){return e.optionsStorage||e.loadOptions(),void 0!==e.optionsStorage[t]?e.optionsStorage[t]:o},e.loadOptions=function(o){if(!o){var n=0;if([].slice.call(t.querySelectorAll(".joomla-script-options.new")).forEach(function(t){var o=t.text||t.textContent,r=JSON.parse(o);r&&(e.loadOptions(r),n+=1),t.className=t.className.replace(" new"," loaded")}),n)return}e.optionsStorage?o&&[].slice.call(Object.keys(o)).forEach(function(t){null!==o[t]&&"object"===_typeof(e.optionsStorage[t])&&"object"===_typeof(o[t])?e.optionsStorage[t]=e.extend(e.optionsStorage[t],o[t]):e.optionsStorage[t]=o[t]}):e.optionsStorage=o||{}},e.replaceTokens=function(e){/^[0-9A-F]{32}$/i.test(e)&&[].slice.call(t.getElementsByTagName("input")).forEach(function(t){"hidden"===t.type&&"1"===t.value&&32===t.name.length&&(t.name=e)})},e.checkAll=function(t,o){if(!t.form)return!1;var n=o||"cb",r=0;return[].slice.call(t.form.elements).forEach(function(e){e.type===t.type&&0===e.id.indexOf(n)&&(e.checked=t.checked,r+=e.checked?1:0)}),t.form.boxchecked&&(t.form.boxchecked.value=r,e.Event.dispatch(t.form.boxchecked,"change")),!0},e.renderMessages=function(o,n,r,s){var a=void 0,i=void 0,l=void 0,c=void 0,d=void 0,u=void 0;a=void 0===n||n&&"#system-message-container"===n?t.getElementById("system-message-container"):t.querySelector(n),(void 0===r||r&&!1===r)&&e.removeMessages(a),[].slice.call(Object.keys(o)).forEach(function(n){if(i=o[n],"object"===_typeof(window.customElements)&&"function"==typeof window.customElements.get("joomla-alert"))l=t.createElement("joomla-alert"),["notice","message","error"].indexOf(n)>-1?(u="notice"===n?"info":n,u="message"===n?"success":u,u="error"===n?"danger":u):u="info",l.setAttribute("type",u),l.setAttribute("dismiss","true"),s&&parseInt(s,10)>0&&l.setAttribute("autodismiss",s);else{l=t.createElement("div"),["notice","message","error"].indexOf(n)>-1?(u="notice"===n?"info":n,u="message"===n?"success":u,u="error"===n?"danger":u):u="info",l.className="alert "+u;var r=t.createElement("button");r.setAttribute("type","button"),r.setAttribute("data-dismiss","alert"),r.className="close",r.innerHTML="×",l.appendChild(r)}void 0!==e.JText._(n)&&((c=t.createElement("h4")).className="alert-heading",c.innerHTML=e.JText._(n)?e.JText._(n):n,l.appendChild(c)),i.forEach(function(e){(d=t.createElement("div")).innerHTML=e,l.appendChild(d)}),a.appendChild(l),"object"!==_typeof(window.customElements)&&"function"!=typeof window.customElements.get("joomla-alert")&&s&&parseInt(s,10)>0&&setTimeout(function(){e.removeMessages(a)},s)})},e.removeMessages=function(e){var o=void 0;if(o=e||t.getElementById("system-message-container"),"object"===_typeof(window.customElements)&&window.customElements.get("joomla-alert")){var n=[].slice.call(o.querySelectorAll("joomla-alert"));n.length&&n.forEach(function(e){e.close()})}else{for(;o.firstChild;)o.removeChild(o.firstChild);o.style.display="none",delete o.offsetHeight,o.style.display=""}},e.ajaxErrorsMessages=function(t,o){var n={};if("parsererror"===o){for(var r=[],s=t.responseText.trim(),a=s.length-1;a>=0;a--)r.unshift(["&#",s[a].charCodeAt(),";"].join(""));s=r.join(""),n.error=[e.JText._("JLIB_JS_AJAX_ERROR_PARSE").replace("%s",s)]}else"nocontent"===o?n.error=[e.JText._("JLIB_JS_AJAX_ERROR_NO_CONTENT")]:"timeout"===o?n.error=[e.JText._("JLIB_JS_AJAX_ERROR_TIMEOUT")]:"abort"===o?n.error=[e.JText._("JLIB_JS_AJAX_ERROR_CONNECTION_ABORT")]:t.responseJSON&&t.responseJSON.message?n.error=[e.JText._("JLIB_JS_AJAX_ERROR_OTHER").replace("%s",t.status)+" <em>"+t.responseJSON.message+"</em>"]:t.statusText?n.error=[e.JText._("JLIB_JS_AJAX_ERROR_OTHER").replace("%s",t.status)+" <em>"+t.statusText+"</em>"]:n.error=[e.JText._("JLIB_JS_AJAX_ERROR_OTHER").replace("%s",t.status)];return n},e.isChecked=function(o,n){var r=n;if(void 0===r?r=t.getElementById("adminForm"):"string"==typeof n&&(r=t.getElementById(n)),r.boxchecked.value=o?parseInt(r.boxchecked.value,10)+1:parseInt(r.boxchecked.value,10)-1,e.Event.dispatch(r.boxchecked,"change"),r.elements["checkall-toggle"]){var s,a=!0,i=void 0,l=void 0;for(i=0,s=r.elements.length;i<s;i++)if("checkbox"===(l=r.elements[i]).type&&"checkall-toggle"!==l.name&&!l.checked){a=!1;break}r.elements["checkall-toggle"].checked=a}},e.tableOrdering=function(o,n,r,s){var a=s;void 0===a?a=t.getElementById("adminForm"):"string"==typeof s&&(a=t.getElementById(s)),a.filter_order.value=o,a.filter_order_Dir.value=n,e.submitform(r,a)},e.listItemTask=function(o,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,s=r,a=(s=null!==r?t.getElementById(r):t.adminForm)[o],i=0,l=void 0;if(!a)return!1;for(;l=s["cb"+i];)l.checked=!1,i+=1;return a.checked=!0,s.boxchecked.value=1,e.submitform(n,s),!1},e.loadingLayer=function(o,n){var r=o||"show",s=n||t.body;if("load"===r){var a=(e.getOptions("system.paths")||{}).root||"",i=t.createElement("div");i.id="loading-logo",i.style.position="fixed",i.style.top="0",i.style.left="0",i.style.width="100%",i.style.height="100%",i.style.opacity="0.8",i.style.filter="alpha(opacity=80)",i.style.overflow="hidden",i.style["z-index"]="10000",i.style.display="none",i.style["background-color"]="#fff",i.style["background-image"]='url("'+a+'/media/system/images/ajax-loader.gif")',i.style["background-position"]="center",i.style["background-repeat"]="no-repeat",i.style["background-attachment"]="fixed",s.appendChild(i)}else t.getElementById("loading-logo")||e.loadingLayer("load",s),t.getElementById("loading-logo").style.display="show"===r?"block":"none";return t.getElementById("loading-logo")},e.extend=function(e,t){var o=e;return null===e&&(o={}),[].slice.call(Object.keys(t)).forEach(function(e){o[e]=t[e]}),e},e.request=function(t){var o=void 0,n=e.extend({url:"",method:"GET",data:null,perform:!0},t);try{if((o=new XMLHttpRequest).open(n.method,n.url,!0),o.setRequestHeader("X-Requested-With","XMLHttpRequest"),o.setRequestHeader("X-Ajax-Engine","Joomla!"),"GET"!==n.method){var r=e.getOptions("csrf.token","");r&&o.setRequestHeader("X-CSRF-Token",r),n.headers&&n.headers["Content-Type"]||o.setRequestHeader("Content-Type","application/x-www-form-urlencoded")}if(n.headers&&[].slice.call(Object.keys(n.headers)).forEach(function(e){"Content-Type"===e&&"false"===n.headers["Content-Type"]||o.setRequestHeader(e,n.headers[e])}),o.onreadystatechange=function(){4===o.readyState&&(200===o.status?n.onSuccess&&n.onSuccess.call(window,o.responseText,o):n.onError&&n.onError.call(window,o))},n.perform){if(n.onBefore&&!1===n.onBefore.call(window,o))return o;o.send(n.data)}}catch(e){return window.console&&console.log(e),!1}return o},e.localStorageEnabled=function(){var e="joomla-cms";try{return localStorage.setItem(e,e),localStorage.removeItem(e),!0}catch(e){return!1}},e.WebComponents=function(){var o=e.getOptions("webcomponents");if(o&&o.length){var n=!1,r=[],s=!1,a=void 0,i=function(){window.WebComponents.ready=!0,t.dispatchEvent(new CustomEvent("WebComponentsReady",{bubbles:!0})),u()},l=function(){window.customElements&&customElements.polyfillWrapFlushCallback&&customElements.polyfillWrapFlushCallback(function(e){a=e,s&&a()})},c=function(){window.HTMLTemplateElement&&HTMLTemplateElement.bootstrap&&HTMLTemplateElement.bootstrap(window.document),n=!0,d().then(i)},d=function(){s=!1;return Promise.all(r.map(function(e){return e instanceof Function?e():e})).then(function(){s=!0,r.length=0,a&&a()}).catch(function(e){console.error(e)})};window.WebComponents=window.WebComponents||{ready:!1,_batchCustomElements:l,waitFor:function(e){e&&(r.push(e),n&&d())}};var u=function(){o&&o.length&&o.forEach(function(e){var o=void 0;if(e.match(/\.js/g))if(o=t.createElement("script"),function(){try{return new Function("(a = 0) => a"),!0}catch(e){return!1}}())o.src=e;else{var n=void 0;e.match(/\.min\.js/g)?n=e.replace(/\.min\.js/g,"-es5.min.js"):e.match(/\.js/g)&&(n=e.replace(/\.js/g,"-es5.js")),o.src=n}o&&t.head.appendChild(o)})},m="core.min.js",f=t.querySelector('script[src*="'+m+'"]');if(f||(m="core.js",f=t.querySelector('script[src*="'+m+'"]')),!f)throw new Error("core(.min).js is not registered correctly!");var p=[];(!("attachShadow"in Element.prototype&&"getRootNode"in Element.prototype)||window.ShadyDOM&&window.ShadyDOM.force)&&p.push("sd"),window.customElements&&!window.customElements.forcePolyfill||p.push("ce");var h=function(){var e=t.createElement("template");if(!("content"in e))return!0;if(!(e.content.cloneNode()instanceof DocumentFragment))return!0;var o=t.createElement("template");o.content.appendChild(t.createElement("div")),e.content.appendChild(o);var n=e.cloneNode(!0);return 0===n.content.childNodes.length||0===n.content.firstChild.content.childNodes.length}();if(window.Promise&&Array.from&&window.URL&&window.Symbol&&!h||(p=["sd-ce-pf"]),p.length){var y=t.createElement("script"),v="media/vendor/webcomponentsjs/js/webcomponents-"+p.join("-")+".min.js",g=f.src.match(/\?.*/)[0],E=e.getOptions("system.paths");if(!E)throw new Error("core(.min).js is not registered correctly!");y.src=E.rootFull+v+(g||""),"loading"===t.readyState?(y.setAttribute("onload","window.WebComponents._batchCustomElements()"),t.write(y.outerHTML),t.addEventListener("DOMContentLoaded",c)):(y.addEventListener("load",function(){l(),c()}),y.addEventListener("error",function(){throw new Error("Could not load polyfill bundle"+(E.rootFull+v))}),t.head.appendChild(y))}else n=!0,"complete"===t.readyState?i():(window.addEventListener("load",c),window.addEventListener("DOMContentLoaded",function(){window.removeEventListener("load",c),c()}))}}}(Joomla,document),function(e,t){"use strict";t.Event||(t.Event={},t.Event.dispatch=function(t,o,n){var r=t,s=o,a=n;"string"==typeof t&&(a=o,s=t,r=e),a=a||{},r.dispatchEvent(new CustomEvent(s,{detail:a,bubbles:!0,cancelable:!0}))},t.Event.listenOnce=function(e,t,o){e.addEventListener(t,function n(r){return e.removeEventListener(t,n),o.call(e,r)})})}(window,Joomla),document.addEventListener("DOMContentLoaded",Joomla.WebComponents);

No other release has this exact content. See every version of this file.